[
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ngithub: [rui314] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]\npatreon: # Replace with a single Patreon username\nopen_collective: # Replace with a single Open Collective username\nko_fi: # Replace with a single Ko-fi username\ntidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel\ncommunity_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry\nliberapay: # Replace with a single Liberapay username\nissuehunt: # Replace with a single IssueHunt username\notechie: # Replace with a single Otechie username\nlfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry\ncustom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']\n"
  },
  {
    "path": ".github/workflows/build-all.yml",
    "content": "name: Build all tarballs\n\non:\n  schedule:\n    - cron: '0 0 * * *'\n  workflow_dispatch:\n\njobs:\n  build-linux:\n    strategy:\n      matrix:\n        include:\n          - { target: x86_64,      os: ubuntu-24.04 }\n          - { target: aarch64,     os: ubuntu-24.04-arm }\n          - { target: arm,         os: ubuntu-24.04-arm }\n          - { target: riscv64,     os: ubuntu-24.04 }\n          - { target: ppc64le,     os: ubuntu-24.04 }\n          - { target: s390x,       os: ubuntu-24.04 }\n          - { target: loongarch64, os: ubuntu-24.04 }\n\n    runs-on: ${{ matrix.os }}\n\n    permissions:\n      contents: read\n      packages: write\n\n    steps:\n    - name: Checkout Repository\n      uses: actions/checkout@v4\n\n    - name: Install Podman\n      run: sudo apt-get update && sudo apt-get install -y podman qemu-user-static\n\n    - name: Login to GitHub Container Registry\n      uses: redhat-actions/podman-login@v1\n      with:\n        registry: ghcr.io\n        username: ${{ github.repository_owner }}\n        password: ${{ secrets.GITHUB_TOKEN }}\n\n    - name: Build a tarball\n      run: ./dist.sh ${{ matrix.target }}\n\n    - name: Upload artifact\n      uses: actions/upload-artifact@v4\n      with:\n        name: ${{ matrix.target }}\n        path: dist/mold-*.tar.gz\n        compression-level: 0\n\n  build-windows:\n    runs-on: windows-latest\n    steps:\n    - name: Checkout Repository\n      uses: actions/checkout@v4\n\n    - name: Build and Archive\n      shell: pwsh\n      run: |\n        mkdir build\n        cd build\n        cmake -T clangcl ..\n        cmake --build . --config Release -j $Env:NUMBER_OF_PROCESSORS\n        cmake --install . --config Release --prefix ../mold-install\n        cd ..\n        New-Item -ItemType Directory -Force dist | Out-Null\n        $version = $Env:TAG -replace '^v', ''\n        Compress-Archive -Path mold-install\\* -DestinationPath dist\\mold-$version-windows-x86_64.zip\n\n    - name: Upload artifact\n      uses: actions/upload-artifact@v4\n      with:\n        name: win-x86_64\n        path: dist/mold-*.*\n"
  },
  {
    "path": ".github/workflows/build-native.yml",
    "content": "name: Build native tarballs\n\non:\n  push:\n  workflow_dispatch:\n\njobs:\n  build-tarballs:\n    strategy:\n      matrix:\n        include:\n          - { target: x86_64,  os: ubuntu-24.04 }\n          - { target: aarch64, os: ubuntu-24.04-arm }\n          - { target: arm,     os: ubuntu-24.04-arm }\n\n    runs-on: ${{ matrix.os }}\n\n    permissions:\n      contents: read\n      packages: write\n\n    steps:\n    - name: Checkout Repository\n      uses: actions/checkout@v4\n\n    - name: Install Podman\n      run: sudo apt-get update && sudo apt-get install -y podman qemu-user-static\n\n    - name: Login to GitHub Container Registry\n      uses: redhat-actions/podman-login@v1\n      with:\n        registry: ghcr.io\n        username: ${{ github.repository_owner }}\n        password: ${{ secrets.GITHUB_TOKEN }}\n\n    - name: Build a tarball\n      run: ./dist.sh ${{ matrix.target }}\n\n    - name: Upload artifact\n      uses: actions/upload-artifact@v4\n      with:\n        name: ${{ matrix.target }}\n        path: dist/mold-*.tar.gz\n        compression-level: 0\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "content": "name: CI\non:\n  push:\n  pull_request:\nenv:\n  UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1\njobs:\n  build-asan-tsan:\n    strategy:\n      matrix:\n        target:\n        - ''\n        - '-DMOLD_USE_ASAN=On'\n        - '-DMOLD_USE_TSAN=On'\n    runs-on: ubuntu-24.04\n    timeout-minutes: 60\n    steps:\n    - uses: actions/checkout@v4\n    - uses: rui314/setup-mold@staging\n    - run: sudo ./install-build-deps.sh\n    - name: build\n      run: |\n        sudo apt-get install -y clang-18 clang gcc-multilib gdb dwarfdump zstd\n        mkdir build\n        cd build\n        cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 ${{ matrix.target }} ..\n        cmake --build . -j$(nproc)\n    - run: cd build; ctest --output-on-failure -j$(nproc)\n    - name: archive test results\n      uses: actions/upload-artifact@v4\n      if: failure()\n      with:\n        name: test-results-clang\n        path: |\n          build\n          !build/CMakeFiles\n\n  build-msan:\n    runs-on: ubuntu-24.04\n    timeout-minutes: 60\n    steps:\n    - uses: actions/checkout@v4\n    - uses: redhat-actions/podman-login@v1\n      with:\n        registry: ghcr.io\n        username: ${{ github.repository_owner }}\n        password: ${{ secrets.GITHUB_TOKEN }}\n    - run: .github/workflows/run-msan.sh\n\n  build-multi-archs:\n    runs-on: ubuntu-24.04\n    timeout-minutes: 60\n    steps:\n    - uses: actions/checkout@v4\n    - name: install-build-deps\n      run: |\n        sudo ./install-build-deps.sh\n        sudo ./install-cross-tools.sh\n        sudo .github/workflows/install-extras.sh\n    - name: build\n      run: |\n        mkdir build\n        cd build\n        cmake ..\n        cmake --build . -j$(nproc)\n    - run: cd build; ctest --output-on-failure -j$(nproc)\n    - name: archive test results\n      uses: actions/upload-artifact@v4\n      if: failure()\n      with:\n        name: test-results-multi-archs\n        path: |\n          build\n          !build/CMakeFiles\n\n  build-distros:\n    strategy:\n      matrix:\n        distro:\n        - alpine\n        - archlinux\n        - debian:11 # GCC 10 and CMake 3.18 - the minimum supported by mold\n        - fedora\n        - gentoo/stage3\n        - opensuse/tumbleweed\n        - ubuntu:22.04\n        - ubuntu:25.04\n    runs-on: ubuntu-latest\n    timeout-minutes: 60\n    container: ${{ matrix.distro }}\n    steps:\n    - uses: actions/checkout@v4\n    - run: ./install-build-deps.sh\n    - name: build\n      run: |\n        mkdir build\n        cd build\n        cmake ..\n        cmake --build . -j$(nproc)\n    - run: cd build; ctest --output-on-failure -j$(nproc)\n    - name: archive test results\n      uses: actions/upload-artifact@v4\n      if: failure()\n      with:\n        name: test-results-${{ matrix.distro }}\n        path: |\n          build\n          !build/CMakeFiles\n\n  build-macos:\n    runs-on: macos-latest\n    timeout-minutes: 60\n    steps:\n    - uses: actions/checkout@v4\n    - name: build\n      run: |\n        mkdir build\n        cd build\n        cmake ..\n        cmake --build . -j$(sysctl -n hw.physicalcpu)\n\n  build-windows:\n    runs-on: windows-latest\n    timeout-minutes: 60\n    steps:\n    - uses: actions/checkout@v4\n    - name: build\n      run: |\n        mkdir build\n        cd build\n        cmake -T clangcl ..\n        cmake --build . -j $Env:NUMBER_OF_PROCESSORS\n\n  build-msys:\n    runs-on: windows-latest\n    timeout-minutes: 60\n    steps:\n    - uses: actions/checkout@v4\n    - name: Setup MSYS2\n      uses: msys2/setup-msys2@v2\n      with:\n        msystem: UCRT64\n        update: true\n        pacboy: gcc-libs:p libwinpthread-git:p tbb:p zlib:p zstd:p dlfcn:p cc:p cmake:p ninja:p\n    - name: build\n      shell: msys2 {0}\n      run: |\n        mkdir build\n        cd build\n        cmake -GNinja -DMOLD_USE_MIMALLOC=OFF -DMOLD_USE_SYSTEM_TBB=ON ..\n        cmake --build . -j $(nproc)\n\n  build-freebsd:\n    runs-on: ubuntu-latest\n    timeout-minutes: 60\n    steps:\n    - uses: actions/checkout@v4\n    - name: Build and test\n      uses: vmactions/freebsd-vm@v1\n      with:\n        usesh: true\n        run: |\n          ./install-build-deps.sh\n          mkdir build\n          cd build\n          cmake ..\n          cmake --build . -j$(nproc)\n          ctest --output-on-failure -j$(nproc)\n"
  },
  {
    "path": ".github/workflows/install-extras.sh",
    "content": "#!/bin/bash -x\n\napt-get update\napt-get install -y wget xz-utils\n\n# Install a 32-bit RISC-V toolchain\nmkdir /rv32\nwget -O- --progress=dot:mega https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2025.06.13/riscv32-glibc-ubuntu-24.04-gcc-nightly-2025.06.13-nightly.tar.xz | tar -C /rv32 --strip-components=1 --xz -xf -\n\nln -sf /rv32/sysroot /usr/riscv32-linux-gnu\necho '/rv32/bin/riscv32-unknown-linux-gnu-gcc -L/usr/riscv32-linux-gnu \"$@\"' > /usr/bin/riscv32-linux-gnu-gcc\necho '/rv32/bin/riscv32-unknown-linux-gnu-g++ -L/usr/riscv32-linux-gnu \"$@\"' > /usr/bin/riscv32-linux-gnu-g++\nchmod 755 /usr/bin/riscv32-linux-gnu-{gcc,g++}\n\nfor i in objdump objcopy strip; do\n  ln -sf /rv32/bin/riscv32-unknown-linux-gnu-$i /usr/bin/riscv32-linux-gnu-$i\ndone\n\n# Install a LoongArch toolchain\nmkdir /larch\nwget -O- --progress=dot:mega https://github.com/loongson/build-tools/releases/download/2025.06.06/x86_64-cross-tools-loongarch64-binutils_2.44-gcc_15.1.0-glibc_2.41.tar.xz | tar -C /larch --strip-components=1 --xz -xf -\n\ncp -r /larch/loongarch64-unknown-linux-gnu/lib/* /larch/target/lib64\nln -sf /larch/target /usr/loongarch64-linux-gnu\n\nfor i in gcc g++ objdump objcopy strip; do\n  ln -sf /larch/bin/loongarch64-unknown-linux-gnu-$i /usr/bin/loongarch64-linux-gnu-$i\ndone\n\nwget -O /usr/local/bin/qemu-loongarch64 --progress=dot:mega https://github.com/loongson/build-tools/releases/download/2025.06.06/qemu-loongarch64\nchmod 755 /usr/local/bin/qemu-loongarch64\n\n# Install ARM32 big-endian toolchain\nmkdir /armeb\nwget -O- --progress=dot:mega https://toolchains.bootlin.com/downloads/releases/toolchains/armebv7-eabihf/tarballs/armebv7-eabihf--glibc--stable-2024.05-1.tar.xz | tar -C /armeb --strip-components=1 --xz -xf -\n\nln -sf /armeb/armeb-buildroot-linux-gnueabihf/sysroot /usr/armeb-linux-gnueabihf\necho '/armeb/bin/armeb-linux-gcc -L/usr/armeb-linux-gnu \"$@\"' > /usr/bin/armeb-linux-gnueabihf-gcc\necho '/armeb/bin/armeb-linux-g++ -L/usr/armeb-linux-gnu \"$@\"' > /usr/bin/armeb-linux-gnueabihf-g++\nchmod 755 /usr/bin/armeb-linux-gnueabihf-{gcc,g++}\n\nfor i in objdump objcopy strip; do\n  ln -sf /armeb/bin/armeb-linux-$i /usr/bin/armeb-linux-gnueabihf-$i\ndone\n\n# Install ARM64 big-endian toolchain\nmkdir /aarch64be\nwget -O- --progress=dot:mega https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64be/tarballs/aarch64be--glibc--stable-2024.05-1.tar.xz | tar -C /aarch64be --strip-components=1 --xz -xf -\n\nln -sf /aarch64be/aarch64_be-buildroot-linux-gnu/sysroot /usr/aarch64_be-linux-gnu\necho '/aarch64be/bin/aarch64_be-linux-gcc -L/usr/aarch64_be-linux-gnu \"$@\"' > /usr/bin/aarch64_be-linux-gnu-gcc\necho '/aarch64be/bin/aarch64_be-linux-g++ -L/usr/aarch64_be-linux-gnu \"$@\"' > /usr/bin/aarch64_be-linux-gnu-g++\nchmod 755 /usr/bin/aarch64_be-linux-gnu-{gcc,g++}\n\nfor i in objdump objcopy strip; do\n  ln -sf /aarch64be/bin/aarch64_be-linux-$i /usr/bin/aarch64_be-linux-gnu-$i\ndone\n\n# Install SH4 big-endian toolchain\nmkdir /sh4aeb\nwget -O- --progress=dot:mega https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4aeb/tarballs/sh-sh4aeb--glibc--stable-2024.05-1.tar.xz | tar -C /sh4aeb --strip-components=1 --xz -xf -\n\nln -sf /sh4aeb/sh4aeb-buildroot-linux-gnu/sysroot /usr/sh4aeb-linux-gnu\necho '/sh4aeb/bin/sh4aeb-linux-gcc -L/usr/sh4aeb-linux-gnu \"$@\"' > /usr/bin/sh4aeb-linux-gnu-gcc\necho '/sh4aeb/bin/sh4aeb-linux-g++ -L/usr/sh4aeb-linux-gnu \"$@\"' > /usr/bin/sh4aeb-linux-gnu-g++\nchmod 755 /usr/bin/sh4aeb-linux-gnu-{gcc,g++}\n\nfor i in objdump objcopy strip; do\n  ln -sf /sh4aeb/bin/sh4aeb-linux-$i /usr/bin/sh4aeb-linux-gnu-$i\ndone\n\n# Install Intel SDE CPU emulator for CET-related tests\nmkdir /sde\nwget -O- --progress=dot:mega https://downloadmirror.intel.com/850782/sde-external-9.53.0-2025-03-16-lin.tar.xz | tar -C /sde --strip-components=1 --xz -xf -\nln -s /sde/sde64 /usr/bin\n"
  },
  {
    "path": ".github/workflows/release-assets.yml",
    "content": "name: Build & attach tarballs on tag push\n\non:\n  push:\n    tags: ['v[0-9]*']\n\npermissions:\n  contents: write\n  packages: write\n  id-token: write\n\nenv:\n  TAG: ${{ github.ref_name }}\n\njobs:\n  build-linux:\n    strategy:\n      matrix:\n        include:\n        - { target: x86_64,      os: ubuntu-24.04 }\n        - { target: aarch64,     os: ubuntu-24.04-arm }\n        - { target: arm,         os: ubuntu-24.04-arm }\n        - { target: riscv64,     os: ubuntu-24.04 }\n        - { target: ppc64le,     os: ubuntu-24.04 }\n        - { target: s390x,       os: ubuntu-24.04 }\n        - { target: loongarch64, os: ubuntu-24.04 }\n\n    runs-on: ${{ matrix.os }}\n\n    steps:\n    - uses: actions/checkout@v4\n\n    - name: Install Podman\n      run: sudo apt-get update && sudo apt-get install -y podman qemu-user-static\n\n    - name: Login to GitHub Container Registry\n      uses: redhat-actions/podman-login@v1\n      with:\n        registry: ghcr.io\n        username: ${{ github.repository_owner }}\n        password: ${{ secrets.GITHUB_TOKEN }}\n\n    - run: ./dist.sh ${{ matrix.target }}\n\n    - uses: actions/upload-artifact@v4\n      with:\n        name: ${{ matrix.target }}\n        path: dist/mold-*.tar.gz\n\n  build-windows:\n    runs-on: windows-latest\n    steps:\n    - uses: actions/checkout@v4\n\n    - name: Build and Archive\n      shell: pwsh\n      run: |\n        mkdir build\n        cd build\n        cmake -T clangcl ..\n        cmake --build . --config Release -j $Env:NUMBER_OF_PROCESSORS\n        cmake --install . --config Release --prefix ../mold-install\n        cd ..\n        New-Item -ItemType Directory -Force dist | Out-Null\n        $version = $Env:TAG -replace '^v', ''\n        Compress-Archive -Path mold-install\\* -DestinationPath dist\\mold-$version-x86_64-windows.zip\n\n    - uses: actions/upload-artifact@v4\n      with:\n        name: win-x86_64\n        path: dist/mold-*.*\n\n  publish:\n    needs: [build-linux, build-windows]\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v4\n\n    - uses: actions/download-artifact@v4\n      with:\n        path: dist\n        pattern: '*'\n        merge-multiple: true\n\n    - name: Ensure release exists (create if missing)\n      env:\n        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      run: |\n        set -e\n        if gh release view \"$TAG\" >& /dev/null; then\n          echo \"Existing release found for $TAG\"\n        else\n          echo \"Creating draft release for $TAG\"\n          gh release create \"$TAG\" --draft \\\n            --title \"$TAG\" \\\n            --notes \"Automated draft – fill the changelog later.\"\n        fi\n\n    - name: Upload tarballs\n      env:\n        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      run: |\n        gh release upload \"$TAG\" dist/* --clobber\n        gh release view \"$TAG\" --json assets --jq '.assets[].name'\n"
  },
  {
    "path": ".github/workflows/run-msan.sh",
    "content": "#!/bin/bash\nset -e -x\ncd \"$(dirname $0)\"/../..\n\nif [ \"$GITHUB_REPOSITORY\" = '' ]; then\n  image=mold-msan\n  image_build=\"podman build -t $image -\"\nelse\n  # If this script is running on GitHub Actions, we want to cache\n  # the created container image in GitHub's container repostiory.\n  image=ghcr.io/$GITHUB_REPOSITORY/mold-msan\n  image_build=\"podman build -t $image --output=type=registry --layers --cache-to $image --cache-from $image -\"\nfi\n\ncat <<EOF | $image_build\nFROM mirror.gcr.io/library/ubuntu:24.04\nRUN apt-get update && \\\n  apt-get install -y --no-install-recommends build-essential gcc g++ wget ca-certificates make cmake ninja-build python3 clang-20 llvm-20-dev libclang-20-dev libclang-rt-20-dev libtbb-dev mold && \\\n  rm -rf /var/lib/apt/lists\nRUN mkdir /llvm && \\\n  cd /llvm && \\\n  wget -O- --progress=dot:mega https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-21.1.1.tar.gz | tar xzf - --strip-components=1 && \\\n  cmake -S ./runtimes -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi;libunwind' -DCMAKE_C_COMPILER=clang-20 -DCMAKE_CXX_COMPILER=clang++-20 -DLLVM_USE_SANITIZER=MemoryWithOrigins && \\\n  cmake --build build -j\\$(nproc) && \\\n  cmake --install build --prefix /msan && \\\n  rm -rf /llvm\nEOF\n\n# Build mold and run its tests\npodman run -it --rm --pull=never -v \"$(pwd):/mold:ro\" --security-opt seccomp=unconfined $image bash -c \"\nset -e\nmkdir /build\ncd /build\ncmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang-20 -DCMAKE_CXX_COMPILER=clang++-20 -DMOLD_USE_MSAN=ON -DMOLD_STDLIB_PREFIX=/msan -DMOLD_USE_MIMALLOC=0 -DMOLD_USE_SYSTEM_TBB=1 -DMOLD_USE_MOLD=1 /mold\ncmake --build . -j\\$(nproc)\nsetarch -R ctest --output-on-failure -j\\$(nproc)\n\"\n"
  },
  {
    "path": ".github/workflows/update-manpage.yml",
    "content": "name: Update manpage\n\non:\n  push:\n    paths:\n      - 'docs/mold.md'\n    branches:\n      - main\n  workflow_dispatch:\n\njobs:\n  update-manpage:\n    runs-on: ubuntu-latest\n\n    steps:\n    - name: Check out repository\n      uses: actions/checkout@v4\n\n    - name: Install ronn\n      run: sudo apt-get update && sudo apt-get install -y ronn\n\n    - name: Generate mold.1 from mold.md\n      run: ronn --roff docs/mold.md\n\n    - name: Configure Git\n      run: |\n        git config --global user.name 'Rui Ueyama'\n        git config --global user.email 'rui314@gmail.com'\n\n    - name: Commit and push if mold.1 is updated\n      run: |\n        git add docs/mold.1\n        git diff --staged --quiet || (git commit -m \"Update mold.1 (automated commit)\" && git push)\n"
  },
  {
    "path": ".gitignore",
    "content": "*.o\n*.so\n*~\n**/.DS_Store\n.cache\ncore\ngentoo\n/mold-*.tar.gz\n/build*\n/mold\n/dist\n"
  },
  {
    "path": "CMakeLists.txt",
    "content": "# You can customize a build by specifying CMake options. An option may be\n# given in the -Dvariable=value form. For a boolean variable, `ON` or `1`\n# means true, while `OFF` or `0` means false.\n#\n# Here are a couple of common cmake options:\n#\n#  -DCMAKE_C_COMPILER=<command-name>\n#\n#   Specifies the C compiler name to use. The default value is `cc`.\n#\n#  -DCMAKE_CXX_COMPILER=<command-name>\n#\n#   Specifies the C++ compiler name to use. The default value is `c++`.\n#\n#  -DCMAKE_INSTALL_PREFIX=<directory>\n#\n#   Specifies the install target directory. The default value is `/usr/local`.\n#\n#  -DCMAKE_BUILD_TYPE=[Debug | Release | RelWithDebInfo | MinSizeRel]\n#\n#   Specifies the build type. The default is `Release`, which is the right\n#   option unless you are debugging mold.\n#\n# An example of a cmake command line is shown below:\n#\n#   $ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_CXX_COMPILER=g++-12 ..\n#\n# where `..` refers to this directory.\n#\n# With cmake, you may run `cmake --install .` instead of `make install` to\n# install build artifacts to system directories. If you want to install\n# artifacts to a temporary target directory, run `cmake --install . --prefix\n# <dir>`.\n#\n# You can see the current cmake variables and their values by running\n# `cmake -N -L .` in a build directory.\n#\n# Note that in this file, we provide various dials and knobs to configure\n# how to build mold. However, as a policy, we do not provide a way to\n# enable/disable any individual mold's feature. In other words, we do not\n# provide options like `--enable-foo` or `--disable-foo`. The motivation\n# behind this is build reproducibility. We want to guarantee that all builds\n# of the mold linker of the same version will have the exact same set of\n# features and behave exactly the same.\n\ncmake_minimum_required(VERSION 3.14)\nproject(mold VERSION 2.40.4)\n\ninclude(CMakeDependentOption)\ninclude(CheckSymbolExists)\ninclude(GNUInstallDirs)\n\nadd_executable(mold)\ntarget_compile_features(mold PRIVATE cxx_std_20)\n\nif(MINGW)\n  target_link_libraries(mold PRIVATE dl)\nelse()\n  target_link_libraries(mold PRIVATE ${CMAKE_DL_LIBS})\nendif()\n\n# Build mold itself using mold if -DMOLD_USE_MOLD=ON\noption(MOLD_USE_MOLD \"Use mold to build mold\" OFF)\nif(MOLD_USE_MOLD)\n  target_link_options(mold PRIVATE -fuse-ld=mold)\n\n  if(CMAKE_BUILD_TYPE MATCHES \"Deb\")\n    target_link_options(mold PRIVATE -Wl,--gdb-index)\n  endif()\n\n  if(CMAKE_BUILD_TYPE MATCHES \"^Rel\")\n    target_link_options(mold PRIVATE -Wl,--gc-sections,--icf=safe)\n  endif()\nendif()\n\nif(NOT \"${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}\" STREQUAL \"MSVC\")\n  target_compile_options(mold PRIVATE\n    -fno-exceptions\n    -fno-unwind-tables\n    -fno-asynchronous-unwind-tables\n    -ffunction-sections\n    -fdata-sections\n    -Wall\n    -Wextra\n    -Wno-sign-compare\n    -Wno-unused-function\n    -Wno-unused-parameter\n    -Wno-missing-field-initializers\n    -ggnu-pubnames)\nendif()\n\nif(CMAKE_BUILD_TYPE STREQUAL \"Debug\")\n  target_compile_options(mold PRIVATE -D_GLIBCXX_ASSERTIONS)\nendif()\n\nif(CMAKE_SYSTEM_NAME STREQUAL \"OpenBSD\")\n  set(OPENBSD ON)\nendif()\n\n# Build mold with -flto if -DMOLD_LTO=ON\noption(MOLD_LTO \"Build mold with link-time optimization enabled\")\nif(MOLD_LTO)\n  set_property(TARGET mold PROPERTY INTERPROCEDURAL_OPTIMIZATION ON)\nendif()\n\n# Enable AddressSanitizer if -DMOLD_USE_ASAN=ON\noption(MOLD_USE_ASAN \"Build mold with AddressSanitizer\" OFF)\nif(MOLD_USE_ASAN)\n  target_compile_options(mold PRIVATE -fsanitize=address -fsanitize=undefined)\n  target_link_options(mold PRIVATE -fsanitize=address -fsanitize=undefined)\nendif()\n\n# Enabled ThreadSanitizer if -DMOLD_USE_TSAN=ON\noption(MOLD_USE_TSAN \"Build mold with ThreadSanitizer\" OFF)\nif(MOLD_USE_TSAN)\n  target_compile_options(mold PRIVATE -fsanitize=thread)\n  target_link_options(mold PRIVATE -fsanitize=thread)\nendif()\n\n# Enable MemorySanitizer if -DMOLD_USE_MSAN=ON\noption(MOLD_USE_MSAN \"Build mold with MemorySanitizer\" OFF)\nif(MOLD_USE_MSAN)\n  set(MOLD_STDLIB_PREFIX /usr CACHE FILEPATH \"prefix of instrumented stdlib\")\n  target_compile_options(mold PRIVATE\n    -g -Og -fsanitize=memory -fsanitize-memory-track-origins\n    -nostdinc++ -isystem ${MOLD_STDLIB_PREFIX}/include/c++/v1\n    -DENABLE_MSAN_UNPOISON\n  )\n  target_link_options(mold PRIVATE\n    -fsanitize=memory\n    -nostdlib++ -L ${MOLD_STDLIB_PREFIX}/lib -lc++\n    -Wl,-rpath,${MOLD_STDLIB_PREFIX}/lib\n  )\nendif()\n\n# Statically-link libstdc++ if -DMOLD_MOSTLY_STATIC=ON.\n#\n# This option is intended to be used by `./dist.sh` script to create a\n# mold binary that works on various Linux distros. You probably don't\n# need nor want to set this to ON.\noption(MOLD_MOSTLY_STATIC \"Statically link libstdc++ and some other libraries\" OFF)\nif(MOLD_MOSTLY_STATIC)\n  target_link_options(mold PRIVATE -static-libstdc++)\nendif()\n\n# Find zlib. If libz.so is not found, we compile a bundled one and\n# statically-link it to mold.\nfind_package(ZLIB QUIET)\nif(ZLIB_FOUND AND NOT MOLD_MOSTLY_STATIC)\n  target_link_libraries(mold PRIVATE ZLIB::ZLIB)\nelse()\n  set(ZLIB_BUILD_EXAMPLES OFF CACHE INTERNAL \"\")\n  add_subdirectory(third-party/zlib EXCLUDE_FROM_ALL)\n  target_include_directories(zlibstatic INTERFACE third-party/zlib\n    $<TARGET_PROPERTY:zlibstatic,BINARY_DIR>)\n  target_link_libraries(mold PRIVATE zlibstatic)\nendif()\n\n# Find BLAKE3 cryptographic hash library. Just like zlib, if libblkae3.so\n# is not found, we compile a bundled one and statically-link it to mold.\nfind_package(BLAKE3 QUIET)\nif(BLAKE3_FOUND AND NOT MOLD_MOSTLY_STATIC)\n  target_link_libraries(mold PRIVATE BLAKE3::blake3)\nelse()\n  function(mold_add_blake3)\n    set(BUILD_SHARED_LIBS OFF)\n    add_subdirectory(third-party/blake3/c EXCLUDE_FROM_ALL)\n    target_link_libraries(mold PRIVATE blake3)\n    target_include_directories(mold PUBLIC third-party/blake3/c)\n  endfunction()\n\n  mold_add_blake3()\nendif()\n\n# Find zstd compression library. If zstd.h is not found, we compile a\n# bundled one and statically-link it to mold.\ninclude(CheckIncludeFile)\ncheck_include_file(zstd.h HAVE_ZSTD_H)\n\nif(HAVE_ZSTD_H AND NOT MOLD_MOSTLY_STATIC)\n  target_link_libraries(mold PRIVATE zstd)\nelse()\n  set(ZSTD_BUILD_PROGRAMS OFF)\n  set(ZSTD_BUILD_CONTRIB OFF)\n  set(ZSTD_BUILD_TESTS OFF)\n  set(ZSTD_MULTITHREAD_SUPPORT OFF)\n  set(ZSTD_BUILD_SHARED OFF)\n  set(ZSTD_BUILD_STATIC ON)\n  add_subdirectory(third-party/zstd/build/cmake EXCLUDE_FROM_ALL)\n  target_include_directories(mold PUBLIC third-party/zstd/lib)\n  target_link_libraries(mold PRIVATE libzstd_static)\nendif()\n\n# Find mimalloc. mimalloc is an alternative malloc implementation\n# optimized for multi-threaded applications.\n#\n# If you want to use the usual libc's malloc, pass -DMOLD_USE_MIMALLOC=OFF.\n#\n# We enable mimalloc by default for 64-bit targets. It doesn't seem to\n# be stable on 32-bit targets.\ncmake_dependent_option(\n  MOLD_USE_MIMALLOC \"Use mimalloc\" ON\n  \"CMAKE_SIZEOF_VOID_P EQUAL 8; NOT APPLE; NOT ANDROID; NOT OPENBSD; NOT MOLD_USE_ASAN; NOT MOLD_USE_TSAN\" OFF)\n\ncmake_dependent_option(\n  MOLD_USE_SYSTEM_MIMALLOC \"Use system or vendored mimalloc\" OFF\n  MOLD_USE_MIMALLOC OFF)\n\n# By default, we build a bundled mimalloc and statically-link it to\n# mold. If you want to dynamically link to the system's\n# libmimalloc.so, pass -DMOLD_USE_SYSTEM_MIMALLOC=ON.\nif(MOLD_USE_MIMALLOC)\n  if(MOLD_USE_SYSTEM_MIMALLOC)\n    find_package(mimalloc REQUIRED)\n    target_link_libraries(mold PRIVATE mimalloc)\n  else()\n    function(mold_add_mimalloc)\n      set(MI_BUILD_STATIC ON CACHE INTERNAL \"\")\n      set(MI_BUILD_TESTS OFF CACHE INTERNAL \"\")\n      set(MI_NO_OPT_ARCH ON CACHE INTERNAL \"\")\n      add_subdirectory(third-party/mimalloc EXCLUDE_FROM_ALL)\n      target_compile_definitions(mimalloc-static PRIVATE MI_USE_ENVIRON=0)\n      target_link_libraries(mold PRIVATE mimalloc-static)\n    endfunction()\n\n    mold_add_mimalloc()\n  endif()\nendif()\n\n# Find TBB. TBB (OneTBB or Intel TBB) is a high-level threading library.\n# Use of this library is mandatory.\n#\n# By default, we build a bundled one and statically-link the library\n# to mold. If you want to link to the system's libtbb2.so, pass\n# -DMOLD_USE_SYSTEM_TBB=ON.\noption(MOLD_USE_SYSTEM_TBB \"Use system or vendored TBB\" OFF)\nif(MOLD_USE_SYSTEM_TBB OR BLAKE3_USE_TBB)\n  find_package(TBB REQUIRED)\n  target_link_libraries(mold PRIVATE TBB::tbb)\nelse()\n  function(mold_add_tbb)\n    set(BUILD_SHARED_LIBS OFF)\n    set(TBB_TEST OFF CACHE INTERNAL \"\")\n    set(TBB_STRICT OFF CACHE INTERNAL \"\")\n    add_subdirectory(third-party/tbb EXCLUDE_FROM_ALL)\n    target_compile_definitions(tbb PRIVATE __TBB_DYNAMIC_LOAD_ENABLED=0)\n    target_link_libraries(mold PRIVATE TBB::tbb)\n  endfunction()\n\n  mold_add_tbb()\nendif()\n\n# We always use Clang to build mold on Windows. MSVC can't compile mold.\nif(WIN32)\n  if(MSVC AND NOT CMAKE_CXX_COMPILER_ID STREQUAL \"Clang\")\n    message(FATAL_ERROR\n      \"Your compiler is not supported; install Clang from Visual Studio Installer and re-run cmake with '-T clangcl'\")\n  endif()\n\n  target_compile_definitions(mold PRIVATE NOGDI NOMINMAX)\n  if(MINGW)\n    target_compile_definitions(mold PRIVATE _WIN32_WINNT=0xA00)\n    target_link_libraries(mold PRIVATE bcrypt)\n  endif()\nelse()\n  include(CheckLibraryExists)\n  check_library_exists(m pow \"\" LIBM_FOUND)\n  if(LIBM_FOUND)\n    target_link_libraries(mold PRIVATE m)\n  endif()\nendif()\n\n# Build mold-wrapper.so\nif(NOT APPLE AND NOT WIN32)\n  add_library(mold-wrapper SHARED)\n  install(TARGETS mold-wrapper DESTINATION ${CMAKE_INSTALL_LIBDIR}/mold)\n\n  # Remove the default `lib` prefix\n  set_target_properties(mold-wrapper PROPERTIES PREFIX \"\")\n  target_link_libraries(mold-wrapper PRIVATE ${CMAKE_DL_LIBS})\n  target_sources(mold-wrapper PRIVATE src/mold-wrapper.c)\nendif()\n\n# If atomics doesn't work by default, add -latomic.\n# We need the flag on riscv, armv6 and m68k.\ninclude(CheckCXXSourceCompiles)\ncheck_cxx_source_compiles(\"#include <atomic>\nint main() {\n  std::atomic_uint8_t  a;\n  std::atomic_uint16_t b;\n  std::atomic_uint32_t c;\n  std::atomic_uint64_t d;\n  return ++a + ++b + ++c + ++d;\n}\" HAVE_FULL_ATOMIC_SUPPORT)\n\nif(NOT HAVE_FULL_ATOMIC_SUPPORT)\n  target_link_libraries(mold PRIVATE atomic)\nendif()\n\n# Add -pthread\nif(NOT APPLE AND NOT MSVC)\n  target_compile_options(mold PRIVATE -pthread)\n  target_link_options(mold PRIVATE -pthread)\nendif()\n\ncheck_symbol_exists(madvise sys/mman.h HAVE_MADVISE)\ncheck_symbol_exists(uname sys/utsname.h HAVE_UNAME)\n\n# Create a .cc file containing the current git hash for `mold --version`.\nadd_custom_target(git_hash\n  COMMAND ${CMAKE_COMMAND}\n    -DSOURCE_DIR=${CMAKE_SOURCE_DIR}\n    -DOUTPUT_FILE=${CMAKE_BINARY_DIR}/mold-git-hash.h\n    -P ${CMAKE_SOURCE_DIR}/lib/update-git-hash.cmake\n  DEPENDS lib/update-git-hash.cmake\n  BYPRODUCTS mold-git-hash.h\n  VERBATIM)\n\nadd_dependencies(mold git_hash)\n\n# Almost all functions are template in mold which take a target type\n# (e.g. X86_64) as its type parameter. Since we suport more than 10\n# targets, compiling a single source file for all the targets is very\n# slow.\n#\n# As a workaround, we create a .cc file for each target and spawn many\n# compiler instances. This is hacky but greatly reduces compile time\n# on a multicore machine.\n#\n# You can build mold for a specific set of targets by passing, e.g.,\n# -DMOLD_TARGETS='X86_64;ARM64LE', though this is strongly discouraged\n# for build reproducibility. Use this option only if you build mold\n# frequently for your personal use; otherwise, always build mold with all\n# targets enabled. We provide this flag in the trust that you will not\n# abuse it, so please don’t betray that trust.\nset(MOLD_TARGETS\n  X86_64 I386 ARM64LE ARM64BE ARM32LE ARM32BE RV32LE RV32BE RV64LE\n  RV64BE PPC32 PPC64V1 PPC64V2 S390X SPARC64 M68K SH4LE SH4BE\n  LOONGARCH32 LOONGARCH64\n  CACHE STRING \"List of supported targets\")\n\nlist(GET MOLD_TARGETS 0 MOLD_FIRST_TARGET)\n\nlist(APPEND MOLD_TEMPLATE_FILES\n  src/arch-arm32.cc\n  src/arch-arm64.cc\n  src/arch-i386.cc\n  src/arch-loongarch.cc\n  src/arch-m68k.cc\n  src/arch-ppc32.cc\n  src/arch-ppc64v1.cc\n  src/arch-ppc64v2.cc\n  src/arch-riscv.cc\n  src/arch-s390x.cc\n  src/arch-sh4.cc\n  src/arch-sparc64.cc\n  src/arch-x86-64.cc\n  src/archive-file.cc\n  src/cmdline.cc\n  src/error.cc\n  src/filetype.cc\n  src/gc-sections.cc\n  src/gdb-index.cc\n  src/icf.cc\n  src/input-files.cc\n  src/input-sections.cc\n  src/linker-script.cc\n  src/main.cc\n  src/mapfile.cc\n  src/output-chunks.cc\n  src/passes.cc\n  src/relocatable.cc\n  src/shrink-sections.cc\n  src/thunks.cc\n  src/tls.cc\n  )\n\nif(WIN32 AND NOT MINGW)\n  list(APPEND MOLD_TEMPLATE_FILES src/lto-win32.cc)\nelse()\n  list(APPEND MOLD_TEMPLATE_FILES src/lto-unix.cc)\nendif()\n\nif(WIN32)\n  list(APPEND MOLD_TEMPLATE_FILES\n    src/output-file-win32.cc\n    src/subprocess-win32.cc\n    )\nelse()\n  list(APPEND MOLD_TEMPLATE_FILES\n    src/output-file-unix.cc\n    src/subprocess-unix.cc\n  )\nendif()\n\nfunction(mold_instantiate_templates SOURCE TARGET)\n  set(PATH ${CMAKE_BINARY_DIR}/${SOURCE}.${TARGET}.cc)\n  if(NOT EXISTS ${PATH})\n    file(WRITE ${PATH} \"#define MOLD_${TARGET} 1\n#define MOLD_TARGET ${TARGET}\n#include \\\"${CMAKE_SOURCE_DIR}/${SOURCE}\\\"\n\")\n  endif()\n  target_sources(mold PRIVATE ${PATH})\nendfunction()\n\nforeach (SOURCE IN LISTS MOLD_TEMPLATE_FILES)\n  foreach(TARGET IN LISTS MOLD_TARGETS)\n    mold_instantiate_templates(${SOURCE} ${TARGET})\n    set(HAVE_TARGET_${TARGET} 1)\n  endforeach()\nendforeach()\n\n# Add other non-template source files.\ntarget_sources(mold PRIVATE\n  lib/aho-corasick.cc\n  lib/compress.cc\n  lib/crc32.cc\n  lib/demangle.cc\n  lib/filepath.cc\n  lib/glob.cc\n  lib/hyperloglog.cc\n  lib/perf.cc\n  lib/random.cc\n  lib/tar.cc\n  src/elf.cc\n  src/entry.cc\n  third-party/rust-demangle/rust-demangle.c\n  )\n\nif(WIN32)\n  target_sources(mold PRIVATE\n    src/jobs-win32.cc\n    src/mapped-file-win32.cc\n    src/signal-win32.cc\n    )\nelse()\n  target_sources(mold PRIVATE\n    src/jobs-unix.cc\n    src/mapped-file-unix.cc\n    src/signal-unix.cc\n    )\nendif()\n\n# Create config.h file\nconfigure_file(lib/config.h.in config.h)\ninclude_directories(${CMAKE_CURRENT_BINARY_DIR})\n\n# Test configs\ninclude(CTest)\n\nif(BUILD_TESTING)\n  # Create the ld symlinks required for testing\n  if(NOT WIN32)\n    add_custom_command(\n      TARGET mold POST_BUILD\n      COMMAND ${CMAKE_COMMAND} -E create_symlink mold ld\n      BYPRODUCTS ld\n      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}\n      VERBATIM)\n  endif()\n\n  if(${UNIX})\n    add_subdirectory(test)\n  endif()\nendif()\n\nif(NOT CMAKE_SKIP_INSTALL_RULES)\n  install(TARGETS mold RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})\n  install(FILES docs/mold.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/)\n  install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})\n\n  function(mold_install_relative_symlink OLD NEW)\n    install(CODE \"\n      get_filename_component(PREFIX_ABS \\${CMAKE_INSTALL_PREFIX}/ ABSOLUTE)\n      get_filename_component(OLD_ABS ${OLD} ABSOLUTE BASE_DIR \\${PREFIX_ABS})\n      get_filename_component(NEW_ABS ${NEW} ABSOLUTE BASE_DIR \\${PREFIX_ABS})\n      get_filename_component(NEW_DIR \\${NEW_ABS} DIRECTORY)\n      file(RELATIVE_PATH OLD_REL \\${NEW_DIR} \\${OLD_ABS})\n      message(STATUS \\\"Installing symlink: \\$ENV{DESTDIR}\\${NEW_ABS} -> \\${OLD_REL}\\\")\n      file(MAKE_DIRECTORY \\$ENV{DESTDIR}\\${NEW_DIR})\n      file(CREATE_LINK \\${OLD_REL} \\$ENV{DESTDIR}\\${NEW_ABS} SYMBOLIC)\")\n  endfunction()\n\n  if(NOT WIN32)\n    mold_install_relative_symlink(${CMAKE_INSTALL_BINDIR}/mold${CMAKE_EXECUTABLE_SUFFIX}\n      ${CMAKE_INSTALL_LIBEXECDIR}/mold/ld${CMAKE_EXECUTABLE_SUFFIX})\n    mold_install_relative_symlink(${CMAKE_INSTALL_BINDIR}/mold${CMAKE_EXECUTABLE_SUFFIX}\n      ${CMAKE_INSTALL_BINDIR}/ld.mold${CMAKE_EXECUTABLE_SUFFIX})\n    mold_install_relative_symlink(${CMAKE_INSTALL_MANDIR}/man1/mold.1\n      ${CMAKE_INSTALL_MANDIR}/man1/ld.mold.1)\n  endif()\nendif()\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2023 Rui Ueyama\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# mold: A Modern Linker\n\nmold is a faster drop-in replacement for existing Unix linkers. It is several\ntimes quicker than the LLVM lld linker, the second-fastest open-source linker,\nwhich I initially developed a few years ago. mold aims to enhance developer\nproductivity by minimizing build time, particularly in rapid\ndebug-edit-rebuild cycles.\n\nHere is a performance comparison of GNU ld, GNU gold, LLVM lld, and\nmold when linking final debuginfo-enabled executables for major large\nprograms on a simulated 16-core, 32-thread machine.\n\n![Link speed comparison](docs/chart.svg)\n\n| Program (linker output size)  | GNU ld | GNU gold | LLVM lld | mold\n|-------------------------------|--------|----------|----------|------\n| MySQL 8.3 (0.47 GiB)          | 10.84s | 7.47s    | 1.64s    | 0.46s\n| Clang 19 (1.56 GiB)           | 42.07s | 33.13s   | 5.20s    | 1.35s\n| Chromium 124 (1.35 GiB)       | N/A    | 27.40s   | 6.10s    | 1.52s\n\nmold is so fast that it is only 2x _slower_ than the `cp` command on the same\nmachine. If you find that mold is not faster than other linkers, feel\nfree to [file a bug report](https://github.com/rui314/mold/issues).\n\nmold supports x86-64, i386, ARM64, ARM32, 64-bit/32-bit little/big-endian\nRISC-V, 32-bit PowerPC, 64-bit big-endian PowerPC ELFv1, 64-bit little-endian\nPowerPC ELFv2, s390x, 64-bit/32-bit LoongArch, SPARC64, m68k, and SH-4.\n\n## Why does linking speed matter?\n\nIf you are using a compiled language such as C, C++, or Rust, a build consists\nof two phases. In the first phase, a compiler compiles source files into\nobject files (`.o` files). In the second phase, a linker takes all object\nfiles and combines them into a single executable or shared library file.\n\nThe second phase can be time-consuming if your build output is large. mold can\nspeed up this process, saving you time and preventing distractions while\nwaiting for a lengthy build to finish. The difference is most noticeable\nduring rapid debug-edit-rebuild cycles.\n\n## Installation\n\nBinary packages for the following systems are currently available:\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/mold.svg)](https://repology.org/project/mold/versions)\n\n## How to Build\n\nmold is written in C++20, so if you build mold yourself, you will need a\nrecent version of a C++ compiler and a C++ standard library. We recommend GCC\n10.2 or Clang 16.0.0 (or later) and libstdc++ 10 or libc++ 7 (or later).\n\n### Install Dependencies\n\nTo install build dependencies, run `./install-build-deps.sh` in this\ndirectory. It will detect your Linux distribution and attempt to install the\nnecessary packages. You may need to run it as root.\n\n### Compile mold\n\n```shell\ngit clone --branch stable https://github.com/rui314/mold.git\ncd mold\n./install-build-deps.sh\ncmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=c++ -B build\ncmake --build build -j$(nproc)\nsudo cmake --build build --target install\n```\n\nYou might need to pass a C++20 compiler command name to `cmake`. In the\nexample above, `c++` is passed. If that doesn't work for you, try a specific\nversion of a compiler, such as `g++-10` or `clang++-12`.\n\nBy default, `mold` is installed to `/usr/local/bin`. You can change the\ninstallation location by passing `-DCMAKE_INSTALL_PREFIX=<directory>`.\nFor other cmake options, see the comments in `CMakeLists.txt`.\n\nIf you are not using a recent enough Linux distribution, or if `cmake` does\nnot work for you for any reason, you can use Podman to build mold in a\ncontainer. To do so, run `./dist.sh` in this directory instead of using\n`cmake`. The shell script will pull a container image, build mold and auxiliary\nfiles inside it, and package them into a single tar file named\n`dist/mold-$version-$arch-linux.tar.gz`. You can extract the tar file anywhere\nand use the mold executable in it.\n\n## How to use\n\n<details><summary>A classic way to use mold</summary>\n\nOn Unix, the linker command (usually `/usr/bin/ld`) is indirectly invoked by\nthe compiler driver (typically `cc`, `gcc`, or `clang`), which is in turn\nindirectly invoked by `make` or other build system commands.\n\nIf you can specify an additional command line option for your compiler driver\nby modifying the build system's config files, add one of the following flags\nto use mold instead of `/usr/bin/ld`:\n\n- For Clang: pass `-fuse-ld=mold`\n\n- For GCC 12.1.0 or later: pass `-fuse-ld=mold`\n\n- For GCC before 12.1.0: the `-fuse-ld` option does not accept `mold` as a\n  valid argument, so you need to use the `-B` option instead. The `-B` option\n  tells GCC where to look for external commands like `ld`.\n\n  If you have installed mold with `make install`, there should be a directory\n  named `/usr/libexec/mold` (or `/usr/local/libexec/mold`, depending on your\n  `$PREFIX`), and the `ld` command should be there. The `ld` is actually a\n  symlink to `mold`. So, all you need is to pass `-B/usr/libexec/mold` (or\n  `-B/usr/local/libexec/mold`) to GCC.\n\nIf you haven't installed `ld.mold` to any `$PATH`, you can still pass\n`-fuse-ld=/absolute/path/to/mold` to clang to use mold. However, GCC does not\naccept an absolute path as an argument for `-fuse-ld`.\n\n</details>\n\n<details><summary>If you are using Rust</summary>\n\nCreate `.cargo/config.toml` in your project directory with the following:\n\n```toml\n[target.'cfg(target_os = \"linux\")']\nlinker = \"clang\"\nrustflags = [\"-C\", \"link-arg=-fuse-ld=/path/to/mold\"]\n```\n\nwhere `/path/to/mold` is an absolute path to the mold executable. In the\nexample above, we use `clang` as a linker driver since it always accepts the\n`-fuse-ld` option. If your GCC is recent enough to recognize the option, you\nmay be able to remove the `linker = \"clang\"` line.\n\n```toml\n[target.'cfg(target_os = \"linux\")']\nrustflags = [\"-C\", \"link-arg=-fuse-ld=mold\"]\n```\n\nIf you want to use mold for all projects, add the above snippet to\n`~/.cargo/config.toml`.\n\n</details>\n\n<details><summary>If you are using Nim</summary>\n\nCreate `config.nims` in your project directory with the following:\n\n```nim\nwhen findExe(\"mold\").len > 0 and defined(linux):\n  switch(\"passL\", \"-fuse-ld=mold\")\n```\n\nwhere `mold` must be included in the `PATH` environment variable. In this\nexample, `gcc` is used as the linker driver. Use the `-fuse-ld` option if your\nGCC is recent enough to recognize this option.\n\nIf you want to use mold for all projects, add the above snippet to\n`~/.config/config.nims`.\n\n</details>\n\n<details><summary>If you are using Conan package manager</summary>\n\nYou can configure [Conan](https://github.com/conan-io) to download the latest\nversion of `mold` and use it as the linker when building your dependencies and\nprojects from source. Please see the instructions [here](https://conan.io/center/recipes/mold).\n\n</details>\n\n<details><summary>mold -run</summary>\n\nIt is sometimes very hard to pass an appropriate command line option to `cc`\nto specify an alternative linker. To address this situation, mold has a\nfeature to intercept all invocations of `ld`, `ld.bfd`, `ld.lld`, or `ld.gold`\nand redirect them to itself. To use this feature, run `make` (or another build\ncommand) as a subcommand of mold as follows:\n\n```shell\nmold -run make <make-options-if-any>\n```\n\nInternally, mold invokes a given command with the `LD_PRELOAD` environment\nvariable set to its companion shared object file. The shared object file\nintercepts all function calls to `exec(3)`-family functions to replace\n`argv[0]` with `mold` if it is `ld`, `ld.bf`, `ld.gold`, or `ld.lld`.\n\n</details>\n\n<details><summary>GitHub Actions</summary>\n\nYou can use our [setup-mold](https://github.com/rui314/setup-mold) GitHub\nAction to speed up GitHub-hosted continuous builds. Although GitHub Actions\nrun on a 4 core machine, mold is still significantly faster than the default\nGNU linker, especially when linking large programs.\n\n</details>\n\n<details><summary>Verify that you are using mold</summary>\n\nmold leaves its identification string in the `.comment` section of an output\nfile. You can print it out to verify that you are actually using mold.\n\n```shell\n$ readelf -p .comment <executable-file>\n\nString dump of section '.comment':\n  [     0]  GCC: (Ubuntu 10.2.0-5ubuntu1~20.04) 10.2.0\n  [    2b]  mold 9a1679b47d9b22012ec7dfbda97c8983956716f7\n```\n\nIf `mold` is present in the `.comment` section, the file was created by mold.\n\n</details>\n\n<details><summary>Online manual</summary>\n\nSince mold is a drop-in replacement, you should be able to use it without\nreading its manual. However, if you need it, [mold's man page](docs/mold.md)\nis available online. You can read the same manual by running `man mold`.\n\n</details>\n\n## Why is mold so fast?\n\nOne reason is that it utilizes faster algorithms and more efficient data\nstructures compared to other linkers. Another reason is that mold is highly\nparallelized.\n\nHere is a side-by-side comparison of per-core CPU usage for lld (left) and\nmold (right), linking the same program, a Chromium executable.\n\n![CPU usage comparison in htop animation](docs/htop.gif)\n\nAs you can see, mold uses all available cores throughout its execution and\nfinishes quickly. In contrast, lld fails to utilize available cores most of\nthe time. In this demo, the maximum parallelism is artificially capped at 16,\nso that the bars fit in the GIF.\n\nFor details, please see the [design notes](docs/design.md).\n\n## Sponsors\n\nIt is taken for granted nowadays that compiler toolchains can be easily\ninstalled and used for free, and people may not think too much about the\nindividuals behind these \"free tools\". mold supports many projects, but it\nis essentially a one-person project. This situation is similar to the one\ndepicted in the following xkcd illustration.\n\n[![xkcd 2347](https://imgs.xkcd.com/comics/dependency.png)](https://xkcd.com/2347)\n\nIf you think that the \"Nebraska guy\" should be rewarded, please consider\nbecoming our [GitHub sponsor](https://github.com/sponsors/rui314)!\n\nWe thank everyone who sponsors our project. In particular, we'd like to acknowledge\nthe following people and organizations who have sponsored $128/month or more:\n\n### Corporate sponsors\n\n<a href=\"https://mercury.com\"><img src=\"docs/mercury-logo.png\" align=center height=120 width=400 alt=Mercury></a>\n\n<a href=\"https://cybozu-global.com\"><img src=\"docs/cyboze-logo.png\" align=center height=120 width=133 alt=Cybozu></a>\n\n<a href=\"https://www.emergetools.com\"><img src=\"docs/emerge-tools-logo.png\" align=center height=120 width=240 alt=\"Emerge Tools\"></a><br>\n\n- [G-Research](https://www.gresearch.co.uk)\n- [Signal Slot Inc.](https://github.com/signal-slot)\n- [GlareDB](https://github.com/GlareDB)\n\n### Individual sponsors\n\n- [Wei Wu](https://github.com/lazyparser)\n- [kyle-elliott](https://github.com/kyle-elliott)\n- [Bryant Biggs](https://github.com/bryantbiggs)\n- [kraptor23](https://github.com/kraptor23)\n- [Jinkyu Yi](https://github.com/jincreator)\n- [Pedro Navarro](https://github.com/pedronavf)\n"
  },
  {
    "path": "dist.sh",
    "content": "#!/bin/bash\n#\n# This script creates a mold binary distribution. The output is written to\n# the `dist` directory as `mold-$version-$arch-linux.tar.gz` (e.g.\n# `mold-2.40.0-x86_64-linux.tar.gz`).\n#\n# This script aims to produce reproducible outputs. That means each time\n# it's run on the same git commit, it generates a bit-for-bit identical\n# binary file regardless of when or where it's executed. This property\n# serves as a strong safeguard against supply chain attacks. With a\n# reproducible build, anyone can independently verify that the binary\n# files published on our GitHub release page were built from the git\n# commit tagged for release by rebuilding the binaries themselves.\n#\n# Debian provides snapshot.debian.org to host all historical binary\n# packages. We use it to construct a container image pinned to a\n# particular timestamp. snapshot.debian.org is known to be very slow,\n# but that shouldn't be a big problem for us because we only need that\n# site the first time.\n#\n# The mold executable created by this script is statically linked to\n# libstdc++, but dynamically linked to glibc, libm and a few other\n# libraries, as these libraries are almost always available on any Linux\n# system. We can't statically link glibc because doing so would disable\n# dlopen(), which is required to load the LTO linker plugin.\n#\n# We use a reasonably old Debian version for the build environment because\n# a binary dynamically linked against a newer version of glibc won't work\n# on a system with an older version of glibc.\n#\n# We prefer to build mold with Clang rather than GCC because mold's\n# Identical Code Folding works best with the LLVM address significance\n# table (.llvm_addrsig). Building a release binary with GCC produces a\n# slightly larger binary than with Clang.\n#\n# We need a recent version of Clang to build mold. If it's not available\n# via apt-get, we'll build it ourselves.\n#\n# This script can be used to create non-native binaries (e.g., building\n# aarch64 binary on x86-64) because Podman automatically runs everything\n# under QEMU if the container image is not native. To use this script for\n# non-native builds, you may need to install the qemu-user-static package.\n\nset -e -x\ncd \"$(dirname $0)\"\n\nusage() {\n  echo \"Usage: $0 [ x86_64 | aarch64 | arm | riscv64 | ppc64le | s390x | loongarch64 ]\"\n  exit 1\n}\n\ncase $# in\n0)\n  arch=$(uname -m)\n  if [ $arch = arm64 ]; then\n    arch=aarch64\n  elif [[ $arch = arm* ]]; then\n    arch=arm\n  fi\n  ;;\n1)\n  arch=\"$1\"\n  ;;\n*)\n  usage\nesac\n\n# Create a Podman image.\nif [ \"$GITHUB_REPOSITORY\" = '' ]; then\n  image=mold-builder-$arch\n  image_build=\"podman build --arch $arch -t $image -\"\nelse\n  # If this script is running on GitHub Actions, we want to cache\n  # the created container image in GitHub's container repostiory.\n  image=ghcr.io/$GITHUB_REPOSITORY/mold-builder-$arch\n  image_build=\"podman build --arch $arch -t $image --output=type=registry --layers --cache-to $image --cache-from $image -\"\nfi\n\ncase $arch in\nx86_64)\n  # Debian 9 (Stretch) released in June 2017.\n  #\n  # We use a Google-provided mirror (gcr.io) instead of the official Docker\n  # Hub (docker.io) because docker.io has a strict rate limit policy.\n  #\n  # The toolchain in Debian 9 is too old to build mold, so we rebuild it\n  # from source. We download source archives from official sites and build\n  # them locally, rather than downloading pre-built binaries from somewhere\n  # else, to avoid relying on unverifiable third-party binary blobs. Podman\n  # caches the result of each RUN command, so rebuilding is done only once\n  # per host.\n  cat <<EOF | $image_build\nFROM mirror.gcr.io/library/debian:stretch@sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be\nENV DEBIAN_FRONTEND=noninteractive TZ=UTC\nRUN sed -i -e '/^deb/d' -e 's/^# deb /deb /g' /etc/apt/sources.list && \\\n  echo 'Acquire::Retries \"10\"; Acquire::http::timeout \"10\"; Acquire::Check-Valid-Until \"false\";' > /etc/apt/apt.conf.d/80-retries && \\\n  apt-get update && \\\n  apt-get install -y --no-install-recommends wget file make gcc g++ zlib1g-dev libssl-dev ca-certificates && \\\n  rm -rf /var/lib/apt/lists\n\n# Build CMake 3.27\nRUN mkdir /build && \\\n  cd /build && \\\n  wget -O- --progress=dot:mega https://cmake.org/files/v3.27/cmake-3.27.7.tar.gz | tar xzf - --strip-components=1 && \\\n  ./bootstrap --parallel=\\$(nproc) && \\\n  make -j\\$(nproc) && \\\n  make install && \\\n  rm -rf /build\n\n# Build GCC 14\nRUN mkdir /build && \\\n  cd /build && \\\n  wget -O- --progress=dot:mega https://ftpmirror.gnu.org/gcc/gcc-14.2.0/gcc-14.2.0.tar.gz | tar xzf - --strip-components=1 && \\\n  mkdir gmp mpc mpfr && \\\n  wget -O- --progress=dot:mega https://ftpmirror.gnu.org/gmp/gmp-6.3.0.tar.gz | tar xzf - --strip-components=1 -C gmp && \\\n  wget -O- --progress=dot:mega https://ftpmirror.gnu.org/mpc/mpc-1.3.1.tar.gz | tar xzf - --strip-components=1 -C mpc && \\\n  wget -O- --progress=dot:mega https://ftpmirror.gnu.org/mpfr/mpfr-4.2.1.tar.gz | tar xzf - --strip-components=1 -C mpfr && \\\n  ./configure --prefix=/usr --enable-languages=c,c++ --disable-bootstrap --disable-multilib && \\\n  make -j\\$(nproc) && \\\n  make install && \\\n  ln -sf /usr/lib64/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libstdc++.so.6 && \\\n  rm -rf /build\n\n# Build GNU binutils 2.43\nRUN mkdir /build && \\\n  cd /build && \\\n  wget -O- --progress=dot:mega https://ftpmirror.gnu.org/binutils/binutils-2.43.tar.gz | tar xzf - --strip-components=1 && \\\n  ./configure --prefix=/usr && \\\n  make -j\\$(nproc) && \\\n  make install && \\\n  rm -fr /build\n\n# Build Python 3.12.7\nRUN mkdir /build && \\\n  cd /build && \\\n  wget -O- --progress=dot:mega https://www.python.org/ftp/python/3.12.7/Python-3.12.7.tgz | tar xzf - --strip-components=1 && \\\n  ./configure && \\\n  make -j\\$(nproc) && \\\n  make install && \\\n  rm -rf /build\n\n# Build LLVM 20\nRUN mkdir /build && \\\n  cd /build && \\\n  wget -O- --progress=dot:mega https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-20.1.3.tar.gz | tar xzf - --strip-components=1 && \\\n  mkdir b && \\\n  cd b && \\\n  cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS=clang ../llvm && \\\n  cmake --build . -j\\$(nproc) && \\\n  cmake --install . --strip && \\\n  rm -rf /build\nEOF\n  ;;\naarch64 | arm | ppc64le | s390x)\n  # Debian 11 (Bullseye) released in August 2021\n  #\n  # We don't want to build Clang for these targets on QEMU becuase it\n  # would take an extremely long time. Also, I believe old Linux boxes\n  # are typically x86-64.\n  cat <<EOF | $image_build\nFROM mirror.gcr.io/library/debian:bullseye-20240904@sha256:8ccc486c29a3ad02ad5af7f1156e2152dff3ba5634eec9be375269ef123457d8\nENV DEBIAN_FRONTEND=noninteractive TZ=UTC\nRUN sed -i -e '/^deb/d' -e 's/^# deb /deb /g' /etc/apt/sources.list && \\\n  echo 'Acquire::Retries \"10\"; Acquire::http::timeout \"10\"; Acquire::Check-Valid-Until \"false\";' > /etc/apt/apt.conf.d/80-retries && \\\n  apt-get update && \\\n  apt-get install -y --no-install-recommends build-essential gcc-10 g++-10 clang-16 cmake && \\\n  ln -sf /usr/bin/clang-16 /usr/bin/clang && \\\n  ln -sf /usr/bin/clang++-16 /usr/bin/clang++ && \\\n  rm -rf /var/lib/apt/lists\nEOF\n  ;;\nriscv64)\n  cat <<EOF | $image_build\nFROM mirror.gcr.io/riscv64/debian:unstable-20240926@sha256:25654919c2926f38952cdd14b3300d83d13f2d820715f78c9f4b7a1d9399bf48\nENV DEBIAN_FRONTEND=noninteractive TZ=UTC\nRUN sed -i -e '/^URIs/d' -e 's/^# http/URIs: http/' /etc/apt/sources.list.d/debian.sources && \\\n  echo 'Acquire::Retries \"10\"; Acquire::http::timeout \"10\"; Acquire::Check-Valid-Until \"false\";' > /etc/apt/apt.conf.d/80-retries && \\\n  apt-get update && \\\n  apt-get install -y --no-install-recommends build-essential gcc-14 g++-14 clang-18 cmake && \\\n  ln -sf /usr/bin/clang-18 /usr/bin/clang && \\\n  ln -sf /usr/bin/clang++-18 /usr/bin/clang++ && \\\n  rm -rf /var/lib/apt/lists\nEOF\n  ;;\nloongarch64)\n  cat <<EOF | $image_build\nFROM mirror.gcr.io/loongarch64/debian:sid@sha256:0356df4e494bbb86bb469377a00789a5b42bbf67d5ff649a3f9721b745cbef77\nENV DEBIAN_FRONTEND=noninteractive TZ=UTC\nRUN sed -i -e 's!http[^ ]*!http://snapshot.debian.org/archive/debian-ports/20250620T014755Z!g' /etc/apt/sources.list && \\\n  echo 'Acquire::Retries \"10\"; Acquire::http::timeout \"10\"; Acquire::Check-Valid-Until \"false\";' > /etc/apt/apt.conf.d/80-retries && \\\n  apt-get update && \\\n  apt-get install -y --no-install-recommends build-essential gcc-14 g++-14 clang-19 cmake && \\\n  ln -sf /usr/bin/clang-19 /usr/bin/clang && \\\n  ln -sf /usr/bin/clang++-19 /usr/bin/clang++ && \\\n  rm -rf /var/lib/apt/lists\nEOF\n  ;;\n*)\n  usage\n  ;;\nesac\n\nversion=$(sed -n 's/^project(mold VERSION \\(.*\\))/\\1/p' CMakeLists.txt)\ndest=mold-$version-$arch-linux\n\n# Source tarballs available on GitHub don't contain .git directory.\n# Clone the repo if missing.\n[ -d .git ] || git clone --branch v$version --depth 1 --bare https://github.com/rui314/mold .git\n\n# We use the timestamp of the last Git commit as the file timestamp\n# for build artifacts.\ntimestamp=$(git log -1 --format=%ct)\n\n# `uname -m` in an ARM32 container running on an ARM64 host reports it\n# not as ARM32 but as ARM64. That confuses BLAKE3's cmake script and\n# erroneously enables NEON SIMD instructions. `setarch` can be used to\n# change the output of `uname -m`.\nsetarch=\n[ $arch = arm ] && setarch='setarch linux32'\n\nmkdir -p dist\n\n# Build mold in a container.\n#\n# SOURCE_DATE_EPOCH is a standardized environment variable that allows\n# build artifacts to appear as if they were built at a specific time.\n# We use it to control how the compiler expands the C/C++ __DATE__ and\n# __TIME__ macros.\npodman run --arch $arch -it --rm --userns=host --pids-limit=-1 --network=none \\\n  --pull=never -v \"$(pwd):/mold:ro\" -v \"$(pwd)/dist:/dist\" $image \\\n   $setarch bash -c \"\nset -e\nexport SOURCE_DATE_EPOCH=$timestamp\nmkdir /build\ncd /build\ncmake -DCMAKE_BUILD_TYPE=Release -DMOLD_MOSTLY_STATIC=1 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ /mold\ncmake --build . -j\\$(nproc)\ncmake --install .\ncmake -DMOLD_USE_MOLD=1 .\ncmake --build . -j\\$(nproc)\nctest --output-on-failure -j\\$(nproc)\ncmake --install . --prefix $dest --strip\nfind $dest -print | xargs touch --no-dereference --date=@$timestamp\nfind $dest -print | sort | tar -cf - --no-recursion --files-from=- | gzip -9nc > /dist/$dest.tar.gz\ncp mold /dist\nsha256sum /dist/$dest.tar.gz\n\"\n"
  },
  {
    "path": "docs/bugs.md",
    "content": "This is a note about interesting bugs that I met during the\ndevelopment of the mold linker.\n\n## GNU IFUNC\n\nProblem: A statically-linked \"hello world\" program mysteriously\ncrashed in `__libc_start_main` function which is called just after\n`_start`.\n\nInvestigation: I opened up gdb and found that the program reads a\nbogus value from some array. It looks like `memcpy` failed to copy\nproper data there.  After some investigation, I noticed that `memcpy`\ndid't copy data at all but instead returned the address of\n`__memcpy_avx_unaligned` function, which is a real `memcpy` function\noptimized for machines with the AVX registers.\n\nThis odd issue was caused by the GNU IFUNC mechanism.  That is, if a\nfunction symbol has type `STT_GNU_IFUNC`, the function does not do\nwhat its name suggests to do but instead returns a pointer to a\nfunction that does the actual job. In this case, `memcpy` is an IFUNC\nfunction, and it returns an address of `__memcpy_avx_unaligned` which\nis a real `memcpy` function.\n\nIFUNC function addresses are stored to `.got` section in an ELF\nexecutable.  The dynamic loader executes all IFUNC functions at\nstartup to replace their GOT entries with their return values. This\nmechanism allows programs to choose the best implementation among\nvariants of the same function at runtime based on the machine info.\n\nIf a program is statically-linked, there's no dynamic loader that\nrewrites the GOT entries. Therefore, if a program is\nstatically-linked, a libc's startup routine does that on behalf of the\ndynamic loader. Concretely, a startup routine interprets all dynamic\nrelocations between `__rela_iplt_start` and `__rela_iplt_stop`\nsymbols.  It is linker's responsibility to emit dynamic relocations\nfor IFUNC symbols even if it is linking a statically-linked program\nand mark the beginning and the ending of a `.rela.dyn` section with\nthe symbols, so that the startup routine can find the relocations.\n\nThe bug was my linker didn't define `__rela_iplt_start` and\n`__rela_iplt_stop` symbols. Since these symbols are weak, they are\ninitialized to zero. From the point of the initializer function,\nthere's no dynamic relocations between `__rela_iplt_start` and\n`__rela_iplt_stop` symbols. That left GOT entries for IFUNC symbols\nuntouched.\n\nThe proper fix was to emit dynamic relocations for IFUNC symbols and\ndefine the linker-synthesized symbols. I did that, and the bug was\nfixed.\n\n## stdio buffering\n\nProblem: A statically-linked \"Hello world\" program prints out the\nmessage if executed as `./hello`, but it doesn't output anything if\nexecuted as `./hello | cat`.\n\nInvestigation: I knew that the default buffering mode for stdout is\nline buffering (buffer is flushed on every '\\n'), but if it is not\nconnected to the terminal (i.e. `isatty(2)` returns 0 on\n`STDOUT_FILENO`), it automatically switches to full buffering (buffer\nis flushed when it becomes full). So, it looks like libc failed to\nflush the stdout on program exit for some reason.\n\nI traced all function calls using gdb and noticed that `__libc_atexit`\nwas not called. That function seemed to be responsible for buffer\nflushing. I don't know how exactly I found the root cause, but after\nspending an hour or two, I found that `__start___libc_atexit` and\n`__stop___libc_atexit` have value 0 in my linker's output while they\nmark a section containing the address of `__libc_atexit` in GNU ld's\noutput.\n\nSo, libc doesn't directly call `__libc_atexit` but instead call all\nfunction pointers between `__start___libc_atexit` and\n`__stop___libc_atexit` symbols. libc puts `__libc_atexit` address in\n`_libc_atexit` section, expecting that the linker automatically\ncreates the start and the end marker symbols for the section.\n\nThere's an obscure linker feature: if a section name is valid as a C\nidentifier (e.g. `foo` or `_foo_bar` but not `.foo`), the linker\nautomatically creates marker symbols by prepending `__start_` and\n`__stop_` to the section name. My linker lacked the feature.\n\nI implemented the feature, and the bug was fixed.\n\n## TLS variable initialization\n\nProblem: A statically-linked \"hello world\" program crashes after\nreading a thread-local variable.\n\nInvestigation: Thread-local variables are very different from other\ntypes of varaibles because there may be more than one instance of the\nsame variable in memory. Each thread has its copy of thread-local\nvaraibles. `%fs` segment register points the end of the variable area\nfor the current thread, and the variables are accessed as an offset\nfrom `%fs`.\n\nThread-local variables may be initialized (e.g. `thread_local int x =\n5;`). The linker gathers all thread-local variables and put them into\n`PT_TLS` segment. At runtime, the contents of the segment is used as\nan \"initialization image\" for new threads. When a new thread is\ncreated, the image is memcpy'ed to the new thread's thread-local\nvariable area. The initialization image itself is read-only at\nruntime.\n\nIt took more than a day to find out that memcpy copies the\ninitialization image to a different place than the thread-local\nvariables reside. That means, thread-local variables had garbage as\ninitial values, and the program crashed when using them.\n\nThe problem is that I set a very large value (4096) to the alignment\nof `PT_TLS` segment. All `PT_LOAD` segments are naturally aligned to\nthe page boundary, so I use the same value for `PT_TLS`, but that was\na mistake. When a thread initialization routine sets a value to `%fs`,\nit first aligns the end of the thread-local variable area address to\n`PT_TLS` alignment value. So, if you set a large value to `PT_TLS`\nalignment, `%fs` is set to a wrong place.\n\nI fixed `PT_TLS` alignment, and the bug was gone.\n\n## stdio buffering (another issue)\n\nI noticed that a dynamically-linked \"hello world\" program didn't\nflush its stdout buffer on exit. The cause of the problem was that the\nexecutable had more than one DT_NEEDED entry for `libc.so`.\n\nDT_NEEDED entries in `.dynamic` section specify a list of shared\nobject file names which need to be linked at runtime. I added one\nDT_NEEDED entry for each library specified with the `-l` option.\nThe pitfall is, unlike object files, libraries are allowed to\nappear more than once in a command line, and the linker has to\nde-duplicate them before processing. Adding more than one DT_NEEDED\nentry for the same shared object causes mysterious issues like this.\n\n# Copy relocations and symbol aliases\n\nenviron, _environ and __environ point to the same location in libc.so,\nso when we create a copy relocation for one of the symbols, we need to\ndo that for all of them. Otherwise, they'll end up pointing to different\nplaces which causes a very mysterious issue.\n\n# DT_DEBUG and gdb\n\nIf you forget to add an entry with type DT_DEBUG to .dynamic, gdb's\n`info sharedlibrary` command doesn't print out a list of shared\nlibraries loaded to memory. The value of the entry doesn't matter, so\nit can be just zero. The existence of it is important.\n\n#\n\n__EH_FRAME_BEGIN__ in libgcc/crtstuff.c\n"
  },
  {
    "path": "docs/coding-guidelines.md",
    "content": "# Coding Guidelines\n\nmold is written in C++20, but as is the case with every C++ project,\nit has local coding rules. In this document, I'll explain some of them\nand try to give justifications for why I chose such rules.\n\n## DOs\n\n- Always use `i64` (which is a type alias for `int64_t` in mold) for\n  integers unless you have a reason not to. For example, even if you know\n  that a loop counter won't exceed 100, you should stop thinking about it\n  and just use `i64`.\n\n  Justification: Local variables are usually on CPU registers, so on\n  64-bit CPUs, there's no performance peanlty on choosing `i64` over\n  `i32`. Even if a compiler has to spill register values to the stack,\n  I don't think there's an observable difference between `i32` and\n  `i64`. Therefore, extra 32 bits are essentially free. On 32-bit CPUs,\n  they are not free, but that's OK because we are writing mold for modern\n  computers. mold will still run on 32-bit computers but a bit slowly.\n\n  By always using `i64`, we can eliminate the need to think about the\n  \"right\" size for each variable. It also reduces the risk of integer\n  overflow.\n\n  Exceptions: If you have to allocate a very large number (e.g. millions)\n  of the same object, its size matters. In that case, use a smaller type.\n\n## DON'Ts\n\n- Don't use `auto` unless its actual type is obvious in the very narrow\n  context. Currently, we use `auto` only for lambdas.\n\n  Justification: I think `auto` makes code writing easier but code reading\n  harder, because readers have to make a guess as to what is the actual\n  type of `auto`. If you are already familiar with the existing codebase,\n  you may be able to guess it easily, but that's not always the case.\n  I want to keep the mold codebase friendly to first-time readers.\n\n- Don't over-use inheritance. In mold, most classes don't have parents,\n  and even if they do, their class hierarchy is very shallow. Currently\n  its height is just two (i.e. abstract classes and their implementations).\n\n  Justification: Designing class hierarchies is fun as it feels like\n  taxonomy, but I don't think that always help writing code. It looks like\n  simpler class hierarchy makes its code simpler.\n"
  },
  {
    "path": "docs/design.md",
    "content": "[This document was written in 2020, and the contents are outdated.\nSpecifically, we no longer believe that object preloading is a good\nidea. That being said, most of the points in this document still hold\neven today. Therefore, I'll keep this document as-is.]\n\n## Design and implementation of mold\n\nFor the rest of this documentation, I'll explain the design and the\nimplementation of mold. If you are only interested in using mold, you\ndon't need to read the below.\n\n### Motivation\n\nHere is why I'm writing a new linker:\n\n- Even though lld has significantly improved the situation, linking is\n  still one of the slowest steps in a build. It is especially\n  annoying when I changed one line of code and had to wait for a few\n  seconds or even more for a linker to complete. It should be\n  instantaneous. There's a need for a faster linker.\n\n- The number of cores on a PC has increased a lot lately, and this\n  trend is expected to continue. However, the existing linkers can't\n  take the advantage of the trend because they don't scale well for more\n  cores. I have a 64-core/128-thread machine, so my goal is to create\n  a linker that uses the CPU nicely. mold should be much faster than\n  other linkers on 4 or 8-core machines too, though.\n\n- It looks to me that the designs of the existing linkers are somewhat\n  too similar, and I believe there are a lot of drastically different\n  designs that haven't been explored yet. Developers generally don't\n  care about linkers as long as they work correctly, and they don't\n  even think about creating a new one. So there may be lots of low\n  hanging fruits there in this area.\n\n### Basic design\n\n- In order to achieve a `cp`-like performance, the most important\n  thing is to fix the layout of an output file as quickly as possible, so\n  that we can start copying actual data from input object files to an\n  output file as soon as possible.\n\n- Copying data from input files to an output file is I/O-bounded, so\n  there should be room for doing computationally-intensive tasks while\n  copying data from one file to another.\n\n- We should allow the linker to preload object files from disk and\n  parse them in memory before a complete set of input object files\n  is ready. To do so, we need\n  to split the linker into two in such a way that the latter half of\n  the process finishes as quickly as possible by speculatively parsing\n  and preprocessing input files in the first half of the process.\n\n- One of the most computationally-intensive stage among linker stages\n  is symbol resolution. To resolve symbols, we basically have to throw\n  all symbol strings into a hash table to match undefined symbols with\n  defined symbols. But this can be done in the preloading stage using\n  [string interning](https://en.wikipedia.org/wiki/String_interning).\n\n- Object files may contain a special section called a mergeable string\n  section. The section contains lots of null-terminated strings, and\n  the linker is expected to gather all mergeable string sections and\n  merge their contents. So, if two object files contain the same\n  string literal, for example, the resulting output will contain a\n  single merged string. This step is computationally intensive, but string\n  merging can be done in the preloading stage using string interning.\n\n- Static archives (.a files) contain object files, but the static\n  archive's string table contains only defined symbols of member\n  object files and lacks other types of symbols. That makes static\n  archives unsuitable for speculative parsing. Therefore, the linker\n  should ignore the symbol table of static archive and directly read\n  static archive members.\n\n- If there's a relocation that uses a GOT of a symbol, then we have to\n  create a GOT entry for that symbol. Otherwise, we shouldn't. That\n  means we need to scan all relocation tables to fix the length and\n  the contents of a .got section. This is computationally intensive,\n  but this step is parallelizable.\n\n### Linker Script\n\nLinker script is an embedded language for the linker. It is mainly\nused to control how input sections are mapped to output sections and\nthe layout of the output, but it can also do a lot of tricky stuff.\nIts feature is useful especially for embedded programming, but it's\nalso an awfully underdocumented and complex language.\n\nWe have to implement a subset of the linker script language anwyay,\nbecause on Linux, /usr/lib/x86_64-linux-gnu/libc.so is (despite its\nname) not a shared object file but actually an ASCII file containing\nlinker script code to load the _actual_ libc.so file. But the feature\nset for this purpose is very limited, and it is okay to implement them\nto mold.\n\nBesides that, we really don't want to implement the linker script\nlanguage. But at the same time, we want to satisfy the user needs that\nare currently satisfied with the linker script language. So, what\nshould we do? Here is my observation:\n\n- Linker script allows doing a lot of tricky stuff, such as specifying\n  the exact layout of a file, inserting arbitrary bytes between\n  sections, etc. But most of them can be done with a post-link binary\n  editing tool (such as `objcopy`).\n\n- It looks like there are two things that truly cannot be done by a\n  post-link editing tool: (a) mapping input sections to output\n  sections, and (b) applying relocations.\n\nFrom the above observation, I believe we need to provide only the\nfollowing features instead of the entire linker script language:\n\n- A method to specify how input sections are mapped to output\n  sections, and\n\n- a method to set addresses to output sections, so that relocations\n  are applied based on desired addresses.\n\nI believe everything else can be done with a post-link binary editing\ntool.\n\n### Details\n\n- As we aim to the 1-second goal for Chromium, every millisecond\n  counts. We can't ignore the latency of process exit. If we mmap a\n  lot of files, \\_exit(2) is not instantaneous but takes a few hundred\n  milliseconds because the kernel has to clean up a lot of\n  resources. As a workaround, we should organize the linker command as\n  two processes; the first process forks the second process, and the\n  second process does the actual work. As soon as the second process\n  writes a result file to a filesystem, it notifies the first process,\n  and the first process exits. The second process can take time to\n  exit, because it is not an interactive process.\n\n- At least on Linux, it looks like the filesystem's performance to\n  allocate new blocks to a new file is the limiting factor when\n  creating a new large file and filling its contents using mmap.\n  If you already have a large file in the buffer cache, writing to it is\n  much faster than creating a new fresh file and writing to it.\n  Based on this observation, mold overwrites to an existing\n  executable file if exists. My quick benchmark showed that I could\n  save 300 milliseconds when creating a 2 GiB output file.\n  Linux doesn't allow to open an executable for writing if it is\n  running (you'll get a \"text busy\" error if you attempt). mold\n  falls back to the usual way if it fails to open an output file.\n\n- The output from the linker should be deterministic for the sake of\n  [build reproducibility](https://en.wikipedia.org/wiki/Reproducible_builds)\n  and ease of debugging. This might add a little bit of overhead to\n  the linker, but that shouldn't be too much.\n\n- A .build-id, a unique ID embedded to an output file, is usually\n  computed by applying a cryptographic hash function (e.g. SHA-1) to\n  an output file. This is a slow step, but we can speed it up by\n  splitting a file into small chunks, computing SHA-1 for each chunk,\n  and then computing SHA-1 of the concatenated SHA-1 hashes\n  (i.e. constructing a [Merkle\n  Tree](https://en.wikipedia.org/wiki/Merkle_tree) of height 2).\n  Modern x86 processors have purpose-built instructions for SHA-1 and\n  can compute SHA-1 pretty quickly at about 2 GiB/s. Using 16\n  cores, a build-id for a 2 GiB executable can be computed in 60 to 70\n  milliseconds.\n\n- BFD, gold, and lld support section garbage collection. That is, a\n  linker runs a mark-sweep garbage collection on an input graph, where\n  sections are vertices and relocations are edges, to discard all\n  sections that are not reachable from the entry point symbol\n  (i.e. `_start`) or a few other root sections. In mold, we are using\n  multiple threads to mark sections concurrently.\n\n- Similarly, BFD, gold an lld support Identical Comdat Folding (ICF)\n  as yet another size optimization. ICF merges two or more read-only\n  sections that happen to have the same contents and relocations.\n  To do that, we have to find isomorphic subgraphs from larger graphs.\n  I implemented a new algorithm for mold, which is 5x faster than lld\n  to do ICF for Chromium (from 5 seconds to 1 second).\n\n- [Intel Threading Building\n  Blocks](https://github.com/oneapi-src/oneTBB) (TBB) is a good\n  library for parallel execution and has several concurrent\n  containers. We are particularly interested in using\n  `parallel_for_each` and `concurrent_hash_map`.\n\n- TBB provides `tbbmalloc` which works better for multi-threaded\n  applications than the glib'c malloc, but it looks like\n  [jemalloc](https://github.com/jemalloc/jemalloc) and\n  [mimalloc](https://github.com/microsoft/mimalloc) are a little bit\n  more scalable than `tbbmalloc`.\n\n### Size of the problem\n\nWhen linking Chrome, a linker reads 3,430,966,844 bytes of data in\ntotal. The data contains the following items:\n\n| Data item                | Number\n| ------------------------ | ------\n| Object files             | 30,723\n| Public undefined symbols | 1,428,149\n| Mergeable strings        | 1,579,996\n| Comdat groups            | 9,914,510\n| Regular sections¹        | 10,345,314\n| Public defined symbols   | 10,512,135\n| Symbols                  | 23,953,607\n| Sections                 | 27,543,225\n| Relocations against SHF_ALLOC sections | 39,496,375\n| Relocations              | 62,024,719\n\n¹ Sections that have to be copied from input object files to an\noutput file. Sections that contain relocations or symbols are for\nexample excluded.\n\n### Internals\n\nIn this section, I'll explain the internals of mold linker.\n\n#### A brief history of Unix and the Unix linker\n\nConceptually, what a linker does is pretty simple. A compiler compiles\na fragment of a program (a single source file) into a fragment of\nmachine code and data (an object file, which typically has the .o\nextension), and a linker stitches them together into a single\nexecutable or a shared library image.\n\nIn reality, modern linkers for Unix-like systems are much more\ncomplicated than the naive understanding because they have gradually\ngained one feature at a time over the 50 years history of Unix, and\nthey are now something like a bag of lots of miscellaneous features in\nwhich none of the features is more important than the others. It is\nvery easy to miss the forest for the trees, since for those who don't\nknow the details of the Unix linker, it is not clear which feature is\nessential and which is not.\n\nThat being said, one thing is clear that at any point of Unix history,\na Unix linker has a coherent feature set for the Unix of that age. So,\nlet me entangle the history to see how the operating system, runtime,\nand linker have gained features that we see today. That should give\nyou an idea of why a particular feature has been added to a linker in the\nfirst place.\n\n1. Original Unix didn't support shared libraries, and a program was\n   always loaded to a fixed address. An executable was something like\n   a memory dump that was just loaded to a particular address by the\n   kernel. After loading, the kernel started executing the program by\n   setting the instruction pointer to a particular address.\n\n   The most essential feature for any linker is relocation processing.\n   The original Unix linker of course supported that. Let me explain\n   what that is.\n\n   Individual object files are inevitably incomplete as a program,\n   because when a compiler created them, it only see a part of an\n   entire program. For example, if an object file contains a function\n   call that refers to another object file, the `call` instruction in the\n   object cannot be complete, as the compiler has no idea as to what\n   is the called function's address. To deal with this, the compiler\n   emits a placeholder value (typically just zero) instead of a real\n   address and leaves metadata in an object file saying \"fix offset X\n   of this file with an address of Y\". That metadata is called\n   \"relocation\". Relocations are typically processed by the linker.\n\n   It is easy for a linker to apply relocations for the original Unix\n   because a program is always loaded to a fixed address. It exactly\n   knows the addresses of all functions and data when linking a\n   program.\n\n   Static library support, which is still an important feature of Unix\n   linker, also dates back to this early period of Unix history.\n   To understand what it is, imagine that you are trying to compile\n   a program for the early Unix. You don't want to waste time to\n   compile libc functions every time you compile your program (the\n   computers of the era were incredibly slow), so you have already\n   placed each libc function into a separate source file and compiled\n   them individually. That means you have object files for each libc\n   function, e.g., printf.o, scanf.o, atoi.o, write.o, etc.\n\n   Given this configuration, all you have to do to link your program\n   against libc functions is to pick up the right set of libc object\n   files and give them to the linker along with the object files of your\n   program. But, keeping the linker command line in sync with the\n   libc functions you are using in your program is bothersome. You can\n   be conservative; you can specify all libc object files to the\n   command line, but that leads to program bloat because the linker\n   unconditionally link all object files given to it no matter whether\n   they are used or not. So, a new feature was added to the linker to\n   fix the problem. That is the static library, which is also called\n   the archive file.\n\n   An archive file is just a bundle of object files, just like zip\n   file but in an uncompressed form. An archive file typically has the\n   .a file extension and named after its contents. For example, the\n   archive file containing all libc objects is named `libc.a`.\n\n   If you pass an archive file along with other object files to the\n   linker, the linker pulls out an object file from the archive _only\n   when_ it is referenced by other object files. In other words,\n   unlike object files directly given to a linker, object files\n   wrapped in an archive are not linked to the output by default.\n   An archive works as a supplement to complete your program.\n\n   Even today, you can still find a libc archive file. Run `ar t\n   /usr/lib/x86_64-linux-gnu/libc.a` on Linux should give you a list\n   of object files in the libc archive.\n\n2. In the '80s, Sun Microsystems, a leading commercial Unix vendor at the\n   time, added shared library support to their Unix variant, SunOS.\n\n(This section is incomplete.)\n\n### Concurrency strategy\n\nIn this section, I'll explain the high-level concurrency strategy of\nmold.\n\nIn most places, mold adopts data parallelism. That is, we have a huge\nnumber of pieces of data of the same kind, and we process each of them\nindividually using parallel for-loop. For example, after identifying\nthe exact set of input object files, we need to scan all relocation\ntables to determine the sizes of .got and .plt sections. We do that\nusing a parallel for-loop. The granularity of parallel processing in\nthis case is the relocation table.\n\nData parallelism is very efficient and scalable because there's no\nneed for threads to communicate with each other while working on each\nelement of data. In addition to that, data parallelism is easy to\nunderstand, as it is just a for-loop in which multiple iterations may\nbe executed in parallel. We don't use high-level communication or\nsynchronization mechanisms such as channels, futures, promises,\nlatches or something like that in mold.\n\nIn some cases, we need to share a little bit of data between threads\nwhile executing a parallel for-loop. For example, the loop to scan\nrelocations turns on \"requires GOT\" or \"requires PLT\" flags in a\nsymbol. Symbol is a shared resource, and writing to them from multiple\nthreads without synchronization is unsafe. To deal with it, we made\nthe flag an atomic variable.\n\nThe other common pattern you can find in mold which is build on top of\nthe parallel for-loop is the map-reduce pattern. That is, we run a\nparallel for-loop on a large data set to produce a small data set and\nprocess the small data set with a single thread. Let me take a\nbuild-id computation as an example. Build-id is typically computed by\napplying a cryptographic hash function such as SHA-1 on a linker's\noutput file. To compute it, we first consider an output as a sequence\nof 1 MiB blocks and compute a SHA-1 hash for each block in parallel.\nThen, we concatenate the SHA-1 hashes and compute a SHA-1 hash on the\nhashes to get a final build-id.\n\nFinally, we use concurrent hashmap at a few places in mold. Concurrent\nhashmap is a hashmap to which multiple threads can safely insert items\nin parallel. We use it in the symbol resolution stage, for example.\nTo resolve symbols, we basically have to throw in all defined symbols\ninto a hash table, so that we can find a matching defined symbol for\nan undefined symbol by name. We do the hash table insertion from a\nparallel for-loop which iterates over a list of input files.\n\nOverall, even though mold is highly scalable, it succeeded to avoid\ncomplexties you often find in complex parallel programs. From high\nlevel, mold just serially executes the linker's internal passes one by\none. Each pass is parallelized using parallel for-loops.\n\n### Rejected ideas\n\nIn this section, I'll explain the alternative designs I currently do\nnot plan to implement and why I turned them down.\n\n- Placing variable-length sections at end of an output file and start\n  copying file contents before fixing the output file layout\n\n  Idea: Fixing the layout of regular sections seems easy, and if we\n  place them at beginning of a file, we can start copying their\n  contents from their input files to an output file. While copying\n  file contents, we can compute the sizes of variable-length sections\n  such as .got or .plt and place them at end of the file.\n\n  Reason for rejection: I did not choose this design because I doubt\n  if it could actually shorten link time and I think I don't need it\n  anyway.\n\n  The linker has to de-duplicate comdat sections (i.e. inline\n  functions that are included in multiple object files), so we\n  cannot compute the layout of regular sections until we resolve all\n  symbols and de-duplicate comdats. That takes a few hundred\n  milliseconds. After that, we can compute the sizes of\n  variable-length sections in less than 100 milliseconds. It's quite\n  fast, so it doesn't seem to make much sense to proceed without\n  fixing the final file layout.\n\n  The other reason to reject this idea is because there's good a\n  chance for this idea to have a negative impact on linker's overall\n  performance. If we copy file contents before fixing the layout, we\n  can't apply relocations to them while copying because symbol\n  addresses are not available yet. If we fix the file layout first, we\n  can apply relocations while copying, which is effectively zero-cost\n  due to a very good data locality. On the other hand, if we apply\n  relocations long after we copy file contents, it's pretty expensive\n  because section contents are very likely to have been evicted from\n  CPU cache.\n\n- Incremental linking\n\n  Idea: Incremental linking is a technique to patch a previous linker's\n  output file so that only functions or data that are updated from the\n  previous build are written to it. It is expected to significantly\n  reduce the amount of data copied from input files to an output file\n  and thus speed up linking. GNU BFD and gold linkers support it.\n\n  Reason for rejection: I turned it down because it (1) is\n  complicated, (2) doesn't seem to speed it up that much and (3) has\n  several practical issues. Let me explain each of them.\n\n  First, incremental linking for real C/C++ programs is not as easy as\n  one might think. Let me take malloc as an example. malloc is usually\n  defined by libc, but you can implement it in your program, and if\n  that's the case, the symbol `malloc` will be resolved to your\n  function instead of the one in libc. If you include a library that\n  defines malloc (such as libjemalloc or libtbbmallc) before libc,\n  their malloc will override libc's malloc.\n\n  Assume that you are using a nonstandard malloc. What if you remove\n  your malloc from your code, or remove `-ljemalloc` from your\n  Makefile? The linker has to include a malloc from libc, which may\n  include more object files to satisfy its dependencies. Such code\n  change can affect the entire program rather than just replacing one\n  function. The same is true for adding malloc to your program. Making\n  a local change doesn't necessarily result in a local change in the\n  binary level.  It can easily have cascading effects.\n\n  Some ELF fancy features make incremental linking even harder to\n  implement. Take the weak symbol as an example. If you define `atoi`\n  as a weak symbol in your program, and if you are not using `atoi`\n  at all in your program, that symbol will be resolved to address\n  0. But if you start using some libc function that indirectly calls\n  `atoi`, then `atoi` will be included in your program, and your weak\n  symbol will be resolved to that function. I don't know how to\n  efficiently fix up a binary for this case.\n\n  This is a hard problem, so existing linkers don't try too hard to\n  solve it. For example, IIRC, gold falls back to full link if any\n  function is removed from a previous build. If you want to not annoy\n  users in the fallback case, you need to make full link fast anyway.\n\n  Second, incremental linking itself has an overhead. It has to detect\n  updated files, patch an existing output file and write additional\n  data to an output file for future incremental linking. GNU gold, for\n  instance, takes almost 30 seconds on my machine to do a null\n  incremental link (i.e. no object files are updated from a previous\n  build) for chrome. It's just too slow.\n\n  Third, there are other practical issues in incremental linking. It's\n  not reproducible, so your binary isn't going to be the same as other\n  binaries even if you are compiling the same source tree using the\n  same compiler toolchain. Or, it is complex and there might be a bug\n  in it. If something doesn't work correctly, \"remove --incremental\n  from your Makefile and try again\" could be a piece of advice, but\n  that isn't ideal.\n\n  So, all in all, incremental linking is tricky. I wanted to make full\n  link as fast as possible, so that we don't have to think about how\n  to work around the slowness of full link.\n\n- Defining a completely new file format and use it\n\n  Idea: Sometimes, the ELF file format itself seems to be a limiting\n  factor in improving the linker's performance. We might be able to make a\n  far better one if we create a new file format.\n\n  Reason for rejection: I rejected the idea because it apparently has\n  a practical issue (backward compatibility issue) and also doesn't\n  seem to improve the performance of linkers that much. As clearly\n  demonstrated by mold, we can create a fast linker for ELF. I believe\n  ELF isn't that bad, after all. The semantics of the existing Unix\n  linkers, such as the name resolution algorithm or the linker script,\n  have slowed the linkers down, but that's not a problem of the file\n  format itself.\n\n- Watching object files using inotify(2)\n\n  Idea: When mold is running as a daemon for preloading, use\n  inotify(2) to watch file system updates so that it can reload files\n  as soon as they are updated.\n\n  Reason for rejection: Just like the maximum number of files you can\n  simultaneously open, the maximum number of files you can watch using\n  inotify(2) isn't that large. Maybe just a single instance of mold is\n  fine with inotify(2), but it may fail if you run multiple of it.\n\n  The other reason for not doing it is because mold is quite fast\n  without it anyway. Invoking stat(2) on each file for file update\n  check takes less than 100 milliseconds for Chrome, and if most of\n  the input files are not updated, parsing updated files takes almost\n  no time.\n"
  },
  {
    "path": "docs/execstack.md",
    "content": "This page explains the following warning message and how to fix it.\nmold emits this message when it sees an object file that may not be\ncompatible with mold.\n\n\n```\nmold: warning: foo.o: this file may cause a segmentation fault because it requires an executable stack. See https://github.com/rui314/mold/tree/main/docs/execstack.md for more info.\n```\n\n# Background\n\nOn modern computers, the stack area (to which local variables are\nstored) cannot contain executable code. If the control reaches the\nstack area, the CPU refuses to execute any code there and the program\nis usually terminated due to segmentation fault.\n\nThis is a security measure. The stack area used to be executable (old\nCPUs generally execute any code as long as it is in a readable memory\nregion), but that provided an easy attack vector to a malicious user.\nThey wrote executable code to the stack area using some buffer\noverflow bug and jumped there to run arbitrary code in a remote server\nprocess.\n\nTo prevent this type of attack, the stack area is no longer executable\nsince the early 2000s. On Linux, the stack's executable-ness is\ncontrolled by a bit in an executable, and the loader respects that\nbit. The bit is set by the linker.\n\nGCC had (and still has) a feature that depends on the executable\nstack, so they invented a way to tell the linker to mark the stack\nexecutable. Specifically, if an object file contains a\n`.note.GNU-stack` section with the `SHF_EXECSTACK` bit, GNU linker\nsilently makes the stack of an output file executable.\n\nBut the GNU linker's behavior is dangerous. If you accidentally link\nan object file that has that marker section, the entire stack area\nsilently becomes executable, disabling the security mechanism.\n\nTherefore, mold simply ignores that marker section. If you are using\nmold, you need to explicitly pass `-z execstack` to the linker to make\nthe stack executable.\n\n# What caused this issue?\n\nYou are likely to use GCC's [Nested\nFunctions](https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html)\nfeature which still depends on the executable stack.\n\n# How to fix it?\n\nIf you know what you are doing, pass `-z execstack` to mold. Beware\nthat this will significantly weaken your program's security.\n\nIf you don't want to pass `-z execstack`, rewrite your code so that\nyour code does not depend on the executable stack.\n"
  },
  {
    "path": "docs/glossary.md",
    "content": "The very concept of linking is simple: a compiler compiles a piece of\nsource code into an object file (a file containing machine code), and\na linker combines object files into a single executable or a shared\nlibrary file. However, the actual implementation of the linker for\nmodern systems is much more complicated because hardware, operating\nsystem, compiler and linker all have many more features.\n\nIn this file, I'll explain random topics in the glossary format that\nyou need to understand to read mold code.\n\n## DSO\n\nA .so file. Short for Dynamic Shared Object. Often called as a\nshared library, a dynamic libray or a shared object as well.\n\nAn DSO contains common functions and data that are used by multiple\nexecutables and/or other DSOs. At runtime, a DSO is loaded to a\ncontiguous region in the virtual address.\n\n## Object file\n\nA .o file. An object file contains machine code and data, but it\ncannot be executed because it's not self-contained. For example,\nif you compile a C source file containing a call of `printf`,\nthe actual function code of `printf` is not included in the resulting\nobject file. You include `stdio.h`, but that teaches the compiler\nonly about `printf`'s type, and the compiler still don't know what\n`printf` actually does. Therefore, it cannot emit code for `printf`.\n\nYou need to link an object file with other object file or a shared\nlibrary to make it exectuable.\n\n## Virtual address space\n\nA pointer has a value like 0x803020 which is an address of the\npointee. But it doesn't mean that the pointee resides at the\nphysical memory address 0x803020 on the computer. Modern CPUs\ncontains so-called Mmeory Management Unit (MMU), and all access to\nthe memory are first translated by MMU to the physical address.\nThe address before translation is called the \"virtual address\".\nUnless you are doing the kernel programming, all addresses you\nhandle are virtual addresses.\n\nThe OS kernel controls the MMU so that each process owns the entire\nvirtual address space. So, even if two process uses the same virtual\naddress, they don't conflict. They are mapped to different physical\naddresses.\n\nThe existence of MMU has several implications to the linker. First,\nwe can link the main executable to a specific address. On process\nstartup, there's no code or data in the virtual address space, so\nthe mapping of the main executable always succeed. However, it's not\ntrue to DSOs because they are loaded after the main executable and\npossibly other DSOs. Therefore, shared libraries must be linked in a\nway that they can be loaded to any address in the virtual address\nspace.\n\n## Relocation\n\nA piece of information for the linker as to how to link object files\nor a dynamic objects.\n\nObject files can refer functions or data in other object files. For\nexample, if you compile a function which calls a non-local function\n`foo`, the resulting code contains something like this:\n\n```\n  26:   e8 00 00 00 00          callq  2b <bar+0xb>\n                        27: R_X86_64_PLT32      foo-0x4\n```\n\nThe above `callq` is the instruction to call a function at the\nmachine code level. It's opcode is `0xe8` in x86-64, so the\ninstruction begins with `0xe8`. The following four bytes are\ndisplacement; that is, the address of the branch target relative to\nthe end of this `callq` instruction. Notice that the displacement is\n0. The compiler couldn't fill the displacement because it has no\nidea as to where `foo` will be at runtime. So, the compiler write 0\nas a placeholder and instead write a relocation `R_X86_64_PLT32`\nwith `foo` as its associated symbol. The linker reads this\nrelocation, computes the offsets between this call instruction and\nfunction `foo` and overwrite the placeholder value 0 with an actual\ndisplacement.\n\nThere are many different types of relocations. For example, if you\nwant to fix up not with a displacement but with an absolute address\nof a symbol, you need to use `R_X86_64_ABS64` instead.\n\n## Static library\n\nA .a file. Often called as an archive file or just archive as well.\n\nA static library is a container just like tar or zip. Actually,\nthere's no technical reason to not use tar or (uncompressed) zip,\nbut traditionally the .a file format is used by the linker.\n\nA static library contains object files and can be passed to the\nlinker along with other object files and/or archives.\n\nA linker pulls out object files from an archive only if it is needed\nto resolve undefined symbols. In other words, object files in an\narchive are not linked by default and used as a complement to supply\nmissing definitions. This is ideal for a library because you don't\nwant to link library functions unless you are actually using them.\n\nContrary to archive files, object files directly given to a linker\nare always linked to the output.\n\nTo maximize the benefit of archive files, a library often used as a\nstatic library is broken down to small files to separate each\nfunction individually (for example, look at\nhttps://git.musl-libc.org/cgit/musl/tree/src/stdio). By doing this,\nyou import only used functions.\n\nA static file is created by `ar`, whose command line arguments are\nsimilar to `tar`. A static library contains the symbol table which\noffers a quick way to look up an object file for a defined symbol,\nbut mold does not use the static library's symbol table. mold\ndoesdn't need a symbol table to exist in an archive, and if exists,\nmold just ignores it.\n\nSee also: DSO (dynamic library)\n\n## Symbol\n\nA symbol is a label assigned to a specific location in an input file\nor an output file. For example, if you define function `foo` and\ncompile it, the resulting object file contains a symbol `foo`\npointing to the beginning of the machine code for `foo`.\n\nUsually, a symbol name is a function or a variable name. If an\nobject is anonymous (such the one for a string literal), a compiler\ngenerated a unique symbol, which often starts with `.` to avoid\nconflict with user-defined symbols.\n\nFor C++, symbol name is a complex \"mangled\" name. We need to mangle\nidentifiers because a simple name such as `foo` cannot be uniquely\nidentify a function or a data in C++, because for example `foo` may\nbe in a namespace or defined as a static member in some class. If\n`foo` is an overloaded function, we need to distinguish different\n`foo`s by its type. Therefore, C++ compiler mangles an identifier by\nappending nmaepsace names, type information and such so that\ndifferent things get different names.\n\nFor example, a function `int foo(int)` in a namespace `bar` is\nmangled as `_ZN3bar3fooEi`.\n\nA symbol can be either defined or undefined. A defined symbol points\nto some location in a file which may contain the function's machine\ncode or the variable's initial value. An undefined symbol does not\npoint to anywhere. It needs to be merged with a defined symbol with\nthe same name at link-time. This merging process is called \"name\nresolution\".\n\nFor example, if your program is using `printf`, it usually contains\n`printf` as an undefined symbol. You need to link it with `libc.a`\nor `libc.so`, which contain a defined symbol of `printf`, to make a\ncomplete program.\n"
  },
  {
    "path": "docs/memory-sanitizer.md",
    "content": "# Instrumenting mold with MemorySanitizer\n\n## Introduction\n\nPer <https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo>:\n\n> If you want MemorySanitizer to work properly and not produce any false\n> positives, you must ensure that all the code in your program and in\n> libraries it uses is instrumented (i.e. built with `-fsanitize=memory`).\n> In particular, you would need to link against an MSan-instrumented C++\n> standard library. We recommend to use [libc++](https://libcxx.llvm.org/)\n> for that purpose.\n\n## Building instrumented libc++\n\nBuild an MSan-instrumented libc++ from source:\n\n```sh\ncd ~\ngit clone https://github.com/llvm/llvm-project\ncd llvm-project\ncmake -S ./runtimes -B build-libcxx -G Ninja  \\\n    -DCMAKE_BUILD_TYPE=Release                \\\n    -DLLVM_ENABLE_RUNTIMES=\"libcxx;libcxxabi\" \\\n    -DCMAKE_C_COMPILER=clang                  \\\n    -DCMAKE_CXX_COMPILER=clang++              \\\n    -DLLVM_USE_SANITIZER=MemoryWithOrigins\ncmake --build build-libcxx -- cxx cxxabi\nexport LIBCXX=\"$HOME/llvm-project/build-libcxx\" # for subsequent build steps\n```\n\nUpon success, `./build-libcxx/{include,lib}` will contain the resulting\nheaders and shared libraries.\n\n## Linking mold against instrumented libc++\n\nUse the `MOLD_USE_MSAN` and `MOLD_STDLIB_PREFIX` cmake variables to link\nmold against the instrumented build of libc++:\n\n```sh\ncd ~\ngit clone https://github.com/rui314/mold.git\ncd mold\ncmake -B build -G Ninja            \\\n    -DCMAKE_BUILD_TYPE=Debug       \\\n    -DCMAKE_C_COMPILER=clang       \\\n    -DCMAKE_CXX_COMPILER=clang++   \\\n    -DMOLD_USE_MSAN=ON             \\\n    -DMOLD_STDLIB_PREFIX=\"$LIBCXX\" \\\n    -DMOLD_USE_MIMALLOC=OFF        \\\n    -DMOLD_USE_SYSTEM_TBB=ON\ncmake --build build\n```\n\nMost of mold's tests (except those for `-flto`) should work at this\npoint. Run them like normal:\n\n```sh\nctest --test-dir build\n```\n\nAny resulting MemorySanitizer errors should be visible in\n`./build/Temporary/Testing/LastTest.log`.\n\n## Building instrumented LTO plugin (experimental)\n\nExercising `-flto` with MemorySanitizer (and without false positives)\nrequires instrumenting the transitive dependencies of `lto-unix.cc`:\n\n- `libiberty.a`\n- `liblto_plugin.so`\n- `LLVMgold.so`\n\n> [!NOTE]\n> This is more involved and time-consuming than building only libc++ from\n> source. The cost-benefit ratio of this additional instrumentation and\n> test coverage may be unfavorable in many cases.\n\n> [!IMPORTANT]\n> The following steps are experimental and unlikely to work exactly as-is\n> under CI runners and individual developer environments. Consider the\n> following a starting point rather than a complete HOWTO.\n\nBuild an MSan-instrumented GNU libiberty:\n\n```sh\ncd ~\ngit clone git@github.com:gcc-mirror/gcc.git\ncd gcc/libiberty\nexport CC=clang\nexport CFLAGS=\"-g -Og -fsanitize=memory -fsanitize-memory-track-origins\"\nexport LDFLAGS=\"-fsanitize=memory\"\n./configure\nmake -j$(nproc)\nunset CC CFLAGS LDFLAGS\n```\n\nInstall the resulting `./libiberty.a` into the build toolchain being\ntested with mold. If the system image is ephemeral or disposable (e.g. a\nshort-lived VM or container), a quick-and-dirty install could look like:\n\n```sh\nsudo cp /usr/lib/libiberty.a{,.bak}\nsudo cp ./libiberty.a /usr/lib/\n```\n\nBuild an MSan-instrumented GCC LTO plugin library:\n\n```sh\ncd ~/gcc/lto-plugin # use already-cloned repo from earlier step\nexport CC=clang\nexport CFLAGS=\"-g -Og -fsanitize=memory -fsanitize-memory-track-origins\"\nexport LDFLAGS=\"-fsanitize=memory\"\n./configure --with-libiberty=/usr/lib\nmake -j$(nproc)\nunset CC CFLAGS LDFLAGS\n```\n\nInstall the resulting `liblto_plugin.so`. With the same caveats discussed\nabove, a simple install into an ephemeral environment could look like:\n\n```sh\nexport GCC_VERSION=\"$(gcc -dumpversion)\"\nsudo cp /usr/lib/gcc/x86_64-pc-linux-gnu/$GCC_VERSION/liblto_plugin.so{,.bak}\nsudo cp .libs/liblto_plugin.so /usr/lib/gcc/x86_64-pc-linux-gnu/$GCC_VERSION/\n```\n\nBuild an MSan-instrumented LLVM LTO plugin library:\n\n```sh\ncd ~/llvm-project # use already-cloned repo from earlier step\n\nCF=\"-nostdinc++ -isystem $LIBCXX/include/c++/v1\"\nINCDIR=\"$(find /usr -name plugin-api.h -type f | head -1 | xargs dirname)\"\n\nfunction configure\n{\n    cmake -S ./llvm -B build-plugin -G Ninja   \\\n        -DLLVM_ENABLE_PROJECTS=clang           \\\n        -DLLVM_TARGETS_TO_BUILD=X86            \\\n        -DCMAKE_BUILD_TYPE=Release             \\\n        -DCMAKE_C_COMPILER=clang               \\\n        -DCMAKE_CXX_COMPILER=clang++           \\\n        -DCMAKE_C_FLAGS=\"$CF\"                  \\\n        -DCMAKE_CXX_FLAGS=\"$CF\"                \\\n        -DCMAKE_EXE_LINKER_FLAGS=\"$1\"          \\\n        -DCMAKE_POSITION_INDEPENDENT_CODE=ON   \\\n        -DLLVM_BINUTILS_INCDIR=\"$INCDIR\"       \\\n        -DLLVM_USE_SANITIZER=MemoryWithOrigins\n}\n\n# workaround for linker issues: configure twice with different LDFLAGS\nconfigure \"-nostdlib++ -L $LIBCXX/lib -Wl,--rpath=$LIBCXX/lib\"\nconfigure \"-nostdlib++ -L $LIBCXX/lib -lc++ -Wl,--rpath=$LIBCXX/lib\"\n\ncmake --build build-plugin -- LLVMgold.so\n```\n\nInstall the resulting `LLVMgold.so`. With the same caveats discussed\nabove, a simple install into an ephemeral environment could look like:\n\n```sh\nsudo cp /usr/lib/LLVMgold.so{,.bak}\nsudo cp ./build-plugin/lib/LLVMgold.so /usr/lib/\n```\n\nmold's tests for `-flto` should now (mostly) work, though there do seem\nto be issues around `gcc` inferring `-flto` when not explicitly specified.\nOne workaround is to use `clang` as `TEST_CC`:\n\n```sh\ncd ~/mold # use already-cloned and built repo from earlier step\nTEST_CC=clang TEST_CXX=clang++ ctest --test-dir build\n```\n\n## References\n\n- <https://github.com/google/sanitizers/wiki/MemorySanitizerBootstrappingClang>\n- <https://llvm.org/docs/GoldPlugin.html#lto-how-to-build>\n"
  },
  {
    "path": "docs/mold.1",
    "content": ".\\\" generated with Ronn-NG/v0.9.1\n.\\\" http://github.com/apjanke/ronn-ng/tree/0.9.1\n.TH \"MOLD\" \"1\" \"December 2025\" \"\"\n.SH \"NAME\"\n\\fBmold\\fR \\- a modern linker\n.SH \"SYNOPSIS\"\n\\fBmold\\fR [\\fIoption\\fR\\|\\.\\|\\.\\|\\.] \\fIfile\\fR\\|\\.\\|\\.\\|\\.\n.SH \"DESCRIPTION\"\n\\fBmold\\fR is a faster drop\\-in replacement for the default GNU ld(1)\\.\n.SS \"How to use\"\nSee \\fIhttps://github\\.com/rui314/mold#how\\-to\\-use\\fR\\.\n.SS \"Compatibility\"\n\\fBmold\\fR is designed to be a drop\\-in replacement for the GNU linkers for linking user\\-land programs\\. If your user\\-land program cannot be built due to missing command\\-line options, please file a bug at \\fIhttps://github\\.com/rui314/mold/issues\\fR\\.\n.P\n\\fBmold\\fR supports a very limited set of linker script features, which is just sufficient to read \\fB/usr/lib/x86_64\\-linux\\-gnu/libc\\.so\\fR on Linux systems (on Linux, that file is contrary to its name not a shared library but an ASCII linker script that loads a real \\fBlibc\\.so\\fR file\\.)\n.P\nBeyond that, we have no plan to support any additional linker script features\\. The linker script is an ad\\-hoc, over\\-designed, complex language which we believe needs to be replaced by a simpler mechanism\\. We have a plan to add a replacement for the linker script to \\fBmold\\fR instead\\.\n.SS \"Archive symbol resolution\"\nTraditionally, Unix linkers are sensitive to the order in which input files appear on the command line\\. They process input files from the first (leftmost) file to the last (rightmost) file one\\-by\\-one\\. While reading input files, they maintain sets of defined and undefined symbols\\. When visiting an archive file (\\fB\\.a\\fR files), they pull out object files to resolve as many undefined symbols as possible and move on to the next input file\\. Object files that weren't pulled out will never have a chance for a second look\\.\n.P\nDue to this behavior, you usually have to add archive files at the end of a command line, so that when a linker reaches archive files, it knows what symbols remain as undefined\\.\n.P\nIf you put archive files at the beginning of a command line, a linker doesn't have any undefined symbols, and thus no object files will be pulled out from archives\\. You can change the processing order by using the \\fB\\-\\-start\\-group\\fR and \\fB\\-\\-end\\-group\\fR options, though they make a linker slower\\.\n.P\n\\fBmold\\fR, as well as the LLVM lld(1) linker, takes a different approach\\. They remember which symbols can be resolved from archive files instead of forgetting them after processing each archive\\. Therefore, \\fBmold\\fR and lld(1) can \"go back\" in a command line to pull out object files from archives if they are needed to resolve remaining undefined symbols\\. They are not sensitive to the input file order\\.\n.P\n\\fB\\-\\-start\\-group\\fR and \\fB\\-\\-end\\-group\\fR are still accepted by \\fBmold\\fR and lld(1) for compatibility with traditional linkers, but they are silently ignored\\.\n.SS \"Dynamic symbol resolution\"\nSome Unix linker features are difficult to understand without comprehending the semantics of dynamic symbol resolution\\. Therefore, even though it's not specific to \\fBmold\\fR, we'll explain it here\\.\n.P\nWe use \"ELF module\" or just \"module\" as a collective term to refer to an executable or a shared library file in the ELF format\\.\n.P\nAn ELF module may have lists of imported symbols and exported symbols, as well as a list of shared library names from which imported symbols should be imported\\. The point is that imported symbols are not bound to any specific shared library until runtime\\.\n.P\nHere is how the Unix dynamic linker resolves dynamic symbols\\. Upon the start of an ELF program, the dynamic linker constructs a list of ELF modules which, as a whole, consist of a complete program\\. The executable file is always at the beginning of the list followed by its dependent shared libraries\\. An imported symbol is searched from the beginning of the list to the end\\. If two or more modules define the same symbol, the one that appears first in the list takes precedence over the others\\.\n.P\nThis Unix semantics are contrary to systems such as Windows that have a two\\-level namespace for dynamic symbols\\. On Windows, for example, dynamic symbols are represented as a tuple of (\\fBsymbol\\-name\\fR, \\fBshared\\-library\\-name\\fR), so that each dynamic symbol is guaranteed to be resolved from some specific library\\.\n.P\nTypically, an ELF module that exports a symbol also imports the same symbol\\. Such a symbol is usually resolved to itself, but that's not the case if a module that appears before it in the symbol search list provides another definition of the same symbol\\.\n.P\nLet's take \\fBmalloc\\fR as an example\\. Assume that you define your version of \\fBmalloc\\fR in your main executable file\\. Then, all \\fBmalloc\\fR calls from any module are resolved to your function instead of the one in libc, because the executable is always at the beginning of the dynamic symbol search list\\. Note that even \\fBmalloc\\fR calls within libc are resolved to your definition since libc exports and imports \\fBmalloc\\fR\\. Therefore, by defining \\fBmalloc\\fR yourself, you can overwrite a library function, and the \\fBmalloc\\fR in libc becomes dead code\\.\n.P\nThese Unix semantics are tricky and sometimes considered harmful\\. For example, assume that you accidentally define \\fBatoi\\fR as a global function in your executable that behaves completely differently from the one in the C standard\\. Then, all \\fBatoi\\fR function calls from any modules (even function calls within libc) are redirected to your function instead of the one in libc, which will very likely cause a problem\\. That is a somewhat surprising consequence for an accidental name conflict\\. On the other hand, this semantic is sometimes useful because it allows users to override library functions without rebuilding modules containing them\\.\n.P\nWhether good or bad, you should keep these semantics in mind to understand Unix linkers' behaviors\\.\n.SS \"Build reproducibility\"\n\\fBmold\\fR's output is deterministic\\. That is, if you pass the same object files and the same command\\-line options to the same version of \\fBmold\\fR, it is guaranteed that \\fBmold\\fR produces the bit\\-for\\-bit identical output\\. The linker's internal randomness, such as the timing of thread scheduling or iteration orders of hash tables, doesn't affect the output\\.\n.P\n\\fBmold\\fR does not have any host\\-specific default settings\\. This is contrary to the GNU linkers, for which some configurable values, such as system\\-dependent library search paths, are hard\\-coded\\. \\fBmold\\fR depends only on its command\\-line arguments\\.\n.SH \"OPTION NOTATIONS\"\nMulti\\-letter long options may precede either a single dash or double dashes, except for those starting with the letter \"o\"\\. For historical reasons, long options beginning with \"o\" must precede double dashes\\.\n.P\nFor example, you can spell \\fB\\-\\-as\\-needed\\fR as \\fB\\-as\\-needed\\fR, but \\fB\\-\\-omagic\\fR must not be spelled as \\fB\\-omagic\\fR\\. \\fB\\-omagic\\fR will be interpreted not as \\fB\\-\\-omagic\\fR but as \\fB\\-o magic\\fR\\.\n.SH \"MOLD\\-SPECIFIC OPTIONS\"\n.TP\n\\fB\\-\\-chroot\\fR=\\fIdir\\fR\nSet \\fIdir\\fR as the root directory\\.\n.TP\n\\fB\\-\\-color\\-diagnostics\\fR=[ \\fIauto\\fR | \\fIalways\\fR | \\fInever\\fR ]\nShow diagnostic messages in color using ANSI escape sequences\\. \\fBauto\\fR means that \\fBmold\\fR prints out messages in color only if the standard output is connected to a TTY\\. Default is \\fBauto\\fR\\.\n.TP\n\\fB\\-\\-color\\-diagnostics\\fR\nSynonym for \\fB\\-\\-color\\-diagnostics=auto\\fR\\.\n.TP\n\\fB\\-\\-no\\-color\\-diagnostics\\fR\nSynonym for \\fB\\-\\-color\\-diagnostics=never\\fR\\.\n.TP\n\\fB\\-\\-detach\\fR, \\fB\\-\\-no\\-detach\\fR\nPermit or do not permit mold to create a debug info file in the background\\.\n.TP\n\\fB\\-\\-fork\\fR, \\fB\\-\\-no\\-fork\\fR\nSpawn a child process and let it do the actual linking\\. When linking a large program, the OS kernel can take a few hundred milliseconds to terminate a \\fBmold\\fR process\\. \\fB\\-\\-fork\\fR hides that latency\\. By default, it does fork\\.\n.IP\nNote that \\fB\\-\\-fork\\fR also hides the resource usage statistics reported by time(2), since it doesn't call waitpid(2) on the child process\\. If you need those statistics, pass \\fB\\-\\-no\\-fork\\fR\\.\n.TP\n\\fB\\-\\-perf\\fR\nPrint performance statistics\\.\n.TP\n\\fB\\-\\-print\\-dependencies\\fR\nPrint out dependency information for input files\\.\n.IP\nEach line of the output for this option shows which file depends on which file to use a specific symbol\\. This option is useful for debugging why some object file in a static archive got linked or why some shared library is kept in an output file's dependency list even with \\fB\\-\\-as\\-needed\\fR\\.\n.TP\n\\fB\\-\\-relocatable\\-merge\\-sections\\fR\nBy default, \\fBmold\\fR doesn't merge input sections by name when merging input object files into a single output object file for \\fB\\-r\\fR\\. For example, \\fB\\.text\\.foo\\fR and \\fB\\.text\\.bar\\fR aren't merged for \\fB\\-r\\fR even though they are merged into \\fB\\.text\\fR based on the default section merging rules\\.\n.IP\nThis option changes the behavior so that \\fBmold\\fR merges input sections by name by the default section merging rules\\.\n.TP\n\\fB\\-\\-repro\\fR\nArchive input files, as well as a text file containing command line options, in a tar file so that you can run \\fBmold\\fR with the exact same inputs again\\. This is useful for reporting a bug with a reproducer\\. The output filename is \\fBpath/to/output\\.tar\\fR, where \\fBpath/to/output\\fR is an output filename specified by \\fB\\-o\\fR\\.\n.TP\n\\fB\\-\\-reverse\\-sections\\fR\nReverse the order of input sections before assigning them the offsets in the output file\\.\n.IP\nThis option is useful for finding bugs that depend on the initialization order of global objects\\. In C++, constructors of global objects in a single source file are guaranteed to be executed in the source order, but there's no such guarantee across compilation units\\. Usually, constructors are executed in the order given to the linker, but depending on it is a mistake\\.\n.IP\nBy reversing the order of input sections using \\fB\\-\\-reverse\\-sections\\fR, you can easily test that your program works in the reversed initialization order\\.\n.TP\n\\fB\\-\\-run\\fR \\fIcommand\\fR \\fIarg\\fR\\|\\.\\|\\.\\|\\.\nRun \\fIcommand\\fR with \\fBmold\\fR as \\fB/usr/bin/ld\\fR\\. Specifically, \\fBmold\\fR runs a given command with the \\fBLD_PRELOAD\\fR environment set to intercept exec(3) family functions and replaces \\fBargv[0]\\fR with itself if it is \\fBld\\fR, \\fBld\\.gold\\fR, or \\fBld\\.lld\\fR\\.\n.TP\n\\fB\\-\\-separate\\-debug\\-file\\fR, \\fB\\-\\-separate\\-debug\\-file\\fR=\\fIfile\\fR\nBundle debug info sections into a separate file instead of embedding them in an output executable or a shared library\\. mold creates a debug info file in the background by default, so that you can start running your executable as soon as possible\\.\n.IP\nBy default, the debug info file is created in the same directory as is the output file, with the \\fB\\.dbg\\fR file extension\\. That filename is embedded into the output file so that \\fBgdb\\fR can automatically find the debug info file for the output file\\. For more info about gdb features related to separate debug files, see \\fIhttps://sourceware\\.org/gdb/current/onlinedocs/gdb\\.html/Separate\\-Debug\\-Files\\.html\\fR\\.\n.IP\nmold holds a file lock with flock(2) while creating a debug info file in the background\\.\n.IP\nIf you don't want to create a debug info file in the background, pass the \\fB\\-\\-no\\-detach\\fR option\\.\n.TP\n\\fB\\-\\-shuffle\\-sections\\fR, \\fB\\-\\-shuffle\\-sections\\fR=\\fInumber\\fR\nRandomize the output by shuffling the order of input sections before assigning them the offsets in the output file\\. If a \\fInumber\\fR is given, it's used as a seed for the random number generator, so that the linker produces the same output for the same seed\\. If no seed is given, a random number is used as a seed\\.\n.IP\nThis option is useful for benchmarking\\. Modern CPUs are sensitive to a program's memory layout\\. A seemingly benign change in program layout, such as a small size increase of a function in the middle of a program, can affect the program's performance\\. Therefore, even if you write new code and get a good benchmark result, it is hard to say whether the new code improves the program's performance; it is possible that the new memory layout happens to perform better\\.\n.IP\nBy running a benchmark multiple times with randomized memory layouts using \\fB\\-\\-shuffle\\-sections\\fR, you can isolate your program's real performance number from the randomness caused by memory layout changes\\.\n.TP\n\\fB\\-\\-spare\\-program\\-headers\\fR=\\fInumber\\fR\nAppend the given number of \\fBPT_NULL\\fR entries to the end of the program header, so that post\\-link processing tools can easily add new segments by overwriting the null entries\\.\n.IP\nNote that ELF requires all \\fBPT_LOAD\\fR segments to be sorted by \\fBp_vaddr\\fR\\. Therefore, if you add a new LOAD segment, you may need to sort the entire program header\\.\n.TP\n\\fB\\-\\-stats\\fR\nPrint input statistics\\.\n.TP\n\\fB\\-\\-thread\\-count\\fR=\\fIcount\\fR\nUse \\fIcount\\fR number of threads\\.\n.TP\n\\fB\\-\\-threads\\fR, \\fB\\-\\-no\\-threads\\fR\nUse multiple threads\\. By default, \\fBmold\\fR uses as many threads as the number of cores or 32, whichever is smaller\\. The reason it is capped at 32 is because \\fBmold\\fR doesn't scale well beyond that point\\. To use only one thread, pass \\fB\\-\\-no\\-threads\\fR or \\fB\\-\\-thread\\-count=1\\fR\\.\n.TP\n\\fB\\-\\-quick\\-exit\\fR, \\fB\\-\\-no\\-quick\\-exit\\fR\nUse or do not use \\fBquick_exit\\fR to exit\\.\n.TP\n\\fB\\-\\-zero\\-to\\-bss\\fR\nConvert all\\-zero data sections into BSS\\.\n.IP\nWhen this option is enabled, \\fBmold\\fR scans input data sections that are not of type \\fBSHT_NOBITS\\fR and checks whether their contents consist solely of zero bytes\\. Such sections are then converted into BSS (\\fBSHT_NOBITS\\fR) sections\\. This reduces the size of the output file, since BSS sections occupy no space in the file image\\.\n.IP\nThis behavior is especially useful for user\\-defined sections created with \\fB__attribute__((section(\"\\.sectname\")))\\fR that contain uninitialized global variables\\. GCC and Clang do not automatically mark such sections as BSS even if their contents are entirely zero, and instead emit them as regular data sections\\.\n.IP\nFor example, consider \\fB__attribute__((section(\"\\.sectname\"))) int vec[256];\\fR\\.\n.IP\nBy default, this results in a \\fB\\.sectname\\fR section of type \\fBSHT_PROGBITS\\fR filled with zeros\\. With \\fB\\-\\-zero\\-to\\-bss\\fR, the linker will recognize it as empty data and convert it to a \\fBSHT_NOBITS\\fR section, reducing the output file size without changing runtime semantics\\.\n.TP\n\\fB\\-z rewrite\\-endbr\\fR, \\fB\\-z norewrite\\-endbr\\fR\nAs a security measure, some CPU instruction sets have recently gained a feature to protect control flow integrity by disallowing indirect branches by default\\. If the feature is enabled, the instruction that is executed immediately after an indirect branch must be an branch target marker instruction, or a CPU\\-level fault will raise\\. The marker instruction is also known as \"landing pad\" instruction, to which indirect branches can land\\. This feature makes ROP attacks harder to conduct\\.\n.IP\nTo use the feature, a function whose pointer is taken needs to begin with a landing pad because a function call via a function pointer is compiled to an indirect branch\\. On the other hand, if a function is called only directly (i\\.e\\. referred to only by \\fIdirect\\fR branch instructions), it doesn't have to begin with it\\.\n.IP\nBy default, the compiler always emits a landing pad at the beginning of each global function because it doesn't know whether or not the function's pointer is taken in another translation unit\\. As a result, the resulting binary has more attack surface than necessary\\.\n.IP\nIf \\fB\\-\\-rewrite\\-endbr\\fR is given, mold conducts a whole program analysis to identify functions whose addresses are actually taken and rewrites landing pads with no\\-ops for non\\-address\\-taken functions, reducing the attack surface\\.\n.IP\nThis feature is currently available only on x86\\-64\\.\n.SH \"GNU\\-COMPATIBLE OPTIONS\"\n.TP\n\\fB\\-\\-help\\fR\nReport usage information to stdout and exit\\.\n.TP\n\\fB\\-v\\fR, \\fB\\-\\-version\\fR\nReport version information to stdout\\.\n.TP\n\\fB\\-V\\fR\nReport version and target information to stdout\\.\n.TP\n\\fB\\-E\\fR, \\fB\\-\\-export\\-dynamic\\fR, \\fB\\-\\-no\\-export\\-dynamic\\fR\nWhen creating an executable, using the \\fB\\-E\\fR option causes all global symbols to be put into the dynamic symbol table, so that the symbols are visible from other ELF modules at runtime\\.\n.IP\nBy default, or if \\fB\\-\\-no\\-export\\-dynamic\\fR is given, only symbols that are referenced by DSOs at link\\-time are exported from an executable\\.\n.TP\n\\fB\\-F\\fR \\fIlibname\\fR, \\fB\\-\\-filter\\fR=\\fIlibname\\fR\nSet the \\fBDT_FILTER\\fR dynamic section field to \\fIlibname\\fR\\.\n.TP\n\\fB\\-I\\fR \\fIfile\\fR, \\fB\\-\\-dynamic\\-linker\\fR=\\fIfile\\fR, \\fB\\-\\-no\\-dynamic\\-linker\\fR\nSet the dynamic linker path to \\fIfile\\fR\\. If no \\fB\\-I\\fR option is given, or if \\fB\\-\\-no\\-dynamic\\-linker\\fR is given, no dynamic linker path is set to an output file\\. This is contrary to the GNU linkers which set a default dynamic linker path in that case\\. This difference doesn't usually make any difference because the compiler driver always passes \\fB\\-I\\fR to the linker\\.\n.TP\n\\fB\\-L\\fR \\fIdir\\fR, \\fB\\-\\-library\\-path\\fR=\\fIdir\\fR\nAdd \\fIdir\\fR to the list of library search paths from which \\fBmold\\fR searches libraries for the \\fB\\-l\\fR option\\.\n.IP\nUnlike the GNU linkers, \\fBmold\\fR does not have default search paths\\. This difference doesn't usually make any difference because the compiler driver always passes all necessary search paths to the linker\\.\n.TP\n\\fB\\-M\\fR, \\fB\\-\\-print\\-map\\fR\nWrite a map file to stdout\\.\n.TP\n\\fB\\-N\\fR, \\fB\\-\\-omagic\\fR, \\fB\\-\\-no\\-omagic\\fR\nForce \\fBmold\\fR to emit an output file with an old\\-fashioned memory layout\\. First, it makes the first data segment not aligned to a page boundary\\. Second, text segments are marked as writable if the option is given\\.\n.TP\n\\fB\\-S\\fR, \\fB\\-\\-strip\\-debug\\fR\nOmit \\fB\\.debug_*\\fR sections from the output file\\.\n.TP\n\\fB\\-T\\fR \\fIfile\\fR, \\fB\\-\\-script\\fR=\\fIfile\\fR\nRead linker script from \\fIfile\\fR\\.\n.TP\n\\fB\\-X\\fR, \\fB\\-\\-discard\\-locals\\fR\nDiscard temporary local symbols to reduce the sizes of the symbol table and the string table\\. Temporary local symbols are local symbols starting with \\fB\\.L\\fR\\. Compilers usually generate such symbols for unnamed program elements such as string literals or floating\\-point literals\\.\n.TP\n\\fB\\-e\\fR \\fIsymbol\\fR, \\fB\\-\\-entry\\fR=\\fIsymbol\\fR:\n\n.TP\n\\fB\\-f\\fR \\fIshlib\\fR, \\fB\\-\\-auxiliary\\fR=\\fIshlib\\fR\nSet the \\fBDT_AUXILIARY\\fR dynamic section field to \\fIshlib\\fR\\.\n.TP\n\\fB\\-h\\fR \\fIlibname\\fR, \\fB\\-\\-soname\\fR=\\fIlibname\\fR\nSet the \\fBDT_SONAME\\fR dynamic section field to \\fIlibname\\fR\\. This option is used when creating a shared object file\\. Typically, when you create \\fBlibfoo\\.so\\fR, you want to pass \\fB\\-\\-soname=foo\\fR to a linker\\.\n.TP\n\\fB\\-l\\fR \\fIlibname\\fR\nSearch for \\fBlib\\fR\\fIlibname\\fR\\fB\\.so\\fR or \\fBlib\\fR\\fIlibname\\fR\\fB\\.a\\fR from library search paths\\.\n.TP\n\\fB\\-m\\fR \\fItarget\\fR\nChoose a \\fItarget\\fR\\.\n.TP\n\\fB\\-o\\fR \\fIfile\\fR, \\fB\\-\\-output\\fR=\\fIfile\\fR\nUse \\fIfile\\fR as the output file name instead of the default name \\fBa\\.out\\fR\\.\n.TP\n\\fB\\-r\\fR, \\fB\\-\\-relocatable\\fR\nInstead of generating an executable or a shared object file, combine input object files to generate another object file that can be used as an input to a linker\\.\n.TP\n\\fB\\-s\\fR, \\fB\\-\\-strip\\-all\\fR\nOmit \\fB\\.symtab\\fR section from the output file\\.\n.TP\n\\fB\\-u\\fR \\fIsymbol\\fR, \\fB\\-\\-undefined\\fR=\\fIsymbol\\fR\nIf \\fIsymbol\\fR remains as an undefined symbol after reading all object files, and if there is a static archive that contains an object file defining \\fIsymbol\\fR, pull out the object file and link it so that the output file contains a definition of \\fIsymbol\\fR\\.\n.TP\n\\fB\\-y\\fR \\fIsymbol\\fR, \\fB\\-\\-trace\\-symbol\\fR=\\fIsymbol\\fR\nTrace references to \\fIsymbol\\fR\\.\n.TP\n\\fB\\-\\-Bdynamic\\fR\nLink against shared libraries\\.\n.TP\n\\fB\\-\\-Bstatic\\fR\nDo not link against shared libraries\\.\n.TP\n\\fB\\-\\-Bsymbolic\\fR\nWhen creating a shared library, make global symbols export\\-only (i\\.e\\. do not import the same symbol)\\. As a result, references within a shared library are always resolved locally, negating symbol override at runtime\\. See \"Dynamic symbol resolution\" for more information about symbol imports and exports\\.\n.TP\n\\fB\\-\\-Bsymbolic\\-functions\\fR\nThis option has the same effect as \\fB\\-\\-Bsymbolic\\fR but works only for function symbols\\. Data symbols remain being both imported and exported\\.\n.TP\n\\fB\\-\\-Bsymbolic\\-non\\-weak\\fR\nThis option has the same effect as \\fB\\-\\-Bsymbolic\\fR but works only for non\\-weak symbols\\. Weak symbols remain being both imported and exported\\.\n.TP\n\\fB\\-\\-Bsymbolic\\-non\\-weak\\-functions\\fR\nThis option has the same effect as \\fB\\-\\-Bsymbolic\\fR but works only for non\\-weak function symbols\\. Data symbols and weak function symbols remain being both imported and exported\\.\n.TP\n\\fB\\-\\-Bno\\-symbolic\\fR\nCancel \\fB\\-\\-Bsymbolic\\fR, \\fB\\-\\-Bsymbolic\\-functions\\fR, \\fB\\-\\-Bsymbolic\\-non\\-weak\\fR and \\fB\\-\\-Bsymbolic\\-non\\-weak\\-functions\\fR\\.\n.TP\n\\fB\\-\\-Map\\fR=\\fIfile\\fR\nWrite map file to \\fIfile\\fR\\.\n.TP\n\\fB\\-\\-Tbss\\fR=\\fIaddress\\fR\nAlias for \\fB\\-\\-section\\-start=\\.bss=\\fR\\fIaddress\\fR\\.\n.TP\n\\fB\\-\\-Tdata\\fR=\\fIaddress\\fR\nAlias for \\fB\\-\\-section\\-start=\\.data=\\fR\\fIaddress\\fR\\.\n.TP\n\\fB\\-\\-Ttext\\fR=\\fIaddress\\fR\nAlias for \\fB\\-\\-section\\-start=\\.text=\\fR\\fIaddress\\fR\\.\n.TP\n\\fB\\-\\-allow\\-multiple\\-definition\\fR\nNormally, the linker reports an error if there are more than one definition of a symbol\\. This option changes the default behavior so that it doesn't report an error for duplicate definitions and instead use the first definition\\.\n.TP\n\\fB\\-\\-allow\\-shlib\\-undefined\\fR, \\fB\\-\\-no\\-allow\\-shlib\\-undefined\\fR\nEven if mold succeeds in linking a main executable without undefined symbol errors, you may still encounter symbol lookup errors at runtime because the dynamic linker cannot find some symbols in shared libraries in any ELF module\\. This occurs because mold ignores undefined symbols in shared libraries by default\\.\n.IP\nIf you pass \\fB\\-\\-no\\-allow\\-shlib\\-undefined\\fR, mold verifies that undefined symbols in shared libraries given to the linker can be resolved at link\\-time\\. In other words, this converts the runtime error to a link\\-time error\\.\n.IP\nNote that you need to pass all shared libraries, including indirectly dependent ones, to the linker as arguments for \\fB\\-l\\fR\\. If a shared library depends on a library that's not passed to the linker, the verification will be skipped for that file\\.\n.TP\n\\fB\\-\\-as\\-needed\\fR, \\fB\\-\\-no\\-as\\-needed\\fR\nBy default, shared libraries given to the linker are unconditionally added to the list of required libraries in an output file\\. However, shared libraries after \\fB\\-\\-as\\-needed\\fR are added to the list only when at least one symbol is actually used by the output file\\. In other words, shared libraries after \\fB\\-\\-as\\-needed\\fR are not added to the list of needed libraries if they are not needed by a program\\.\n.IP\nThe \\fB\\-\\-no\\-as\\-needed\\fR option restores the default behavior for subsequent files\\.\n.TP\n\\fB\\-\\-build\\-id\\fR=[ \\fBmd5\\fR | \\fBsha1\\fR | \\fBsha256\\fR | \\fBfast\\fR | \\fBuuid\\fR | \\fB0x\\fR\\fIhexstring\\fR | \\fBnone\\fR ]\nCreate a \\fB\\.note\\.gnu\\.build\\-id\\fR section containing a byte string to uniquely identify an output file\\. \\fBsha256\\fR compute a 256\\-bit cryptographic hash of an output file and set it to build\\-id\\. \\fBmd5\\fR and \\fBsha1\\fR compute the same hash but truncate it to 128 and 160 bits, respectively, before setting it to build\\-id\\. \\fBuuid\\fR sets a random 128\\-bit UUID\\. \\fB0x\\fR\\fIhexstring\\fR sets \\fIhexstring\\fR\\. \\fBfast\\fR is a synonym for \\fBsha256\\fR\\.\n.TP\n\\fB\\-\\-build\\-id\\fR\nSynonym for \\fB\\-\\-build\\-id=sha256\\fR\\.\n.TP\n\\fB\\-\\-no\\-build\\-id\\fR\nSynonym for \\fB\\-\\-build\\-id=none\\fR\\.\n.TP\n\\fB\\-\\-compress\\-debug\\-sections\\fR=[ \\fBzlib\\fR | \\fBzlib\\-gabi\\fR | \\fBzstd\\fR | \\fBnone\\fR ]\nCompress DWARF debug info (\\fB\\.debug_*\\fR sections) using the zlib or zstd compression algorithm\\. \\fBzlib\\-gabi\\fR is an alias for \\fBzlib\\fR\\.\n.TP\n\\fB\\-\\-defsym\\fR=\\fIsymbol\\fR=\\fIvalue\\fR\nDefine \\fIsymbol\\fR as an alias for \\fIvalue\\fR\\.\n.IP\n\\fIvalue\\fR is either an integer (in decimal or hexadecimal with \\fB0x\\fR prefix) or a symbol name\\. If an integer is given as a value, \\fIsymbol\\fR is defined as an absolute symbol with the given value\\.\n.TP\n\\fB\\-\\-default\\-symver\\fR\nUse soname as a symbol version and append that version to all symbols\\.\n.TP\n\\fB\\-\\-demangle\\fR, \\fB\\-\\-no\\-demangle\\fR\nDemangle C++ and Rust symbols in log messages\\.\n.TP\n\\fB\\-\\-dependency\\-file\\fR=\\fIfile\\fR\nWrite a dependency file to \\fIfile\\fR\\. The contents of the written file is readable by make(1), which defines only one rule with the linker's output file as a target and all input files as its prerequisites\\. Users are expected to include the generated dependency file into a Makefile to automate the dependency management\\. This option is analogous to the compiler's \\fB\\-MM \\-MF\\fR options\\.\n.TP\n\\fB\\-\\-dynamic\\-list\\fR=\\fIfile\\fR\nRead a list of dynamic symbols from \\fIfile\\fR\\. Same as \\fB\\-\\-export\\-dynamic\\-symbol\\-list\\fR, except that it implies \\fB\\-\\-Bsymbolic\\fR\\. If \\fIfile\\fR does not exist in the current directory, it is searched from library search paths for the sake of compatibility with GNU ld\\.\n.TP\n\\fB\\-\\-eh\\-frame\\-hdr\\fR, \\fB\\-\\-no\\-eh\\-frame\\-hdr\\fR\nCreate \\fB\\.eh_frame_hdr\\fR section\\.\n.TP\n\\fB\\-\\-emit\\-relocs\\fR\nThe linker usually \"consumes\" relocation sections\\. That is, the linker applies relocations to other sections, and relocation sections themselves are discarded\\.\n.IP\nThe \\fB\\-\\-emit\\-relocs\\fR instructs the linker to leave relocation sections in the output file\\. Some post\\-link binary analysis or optimization tools such as LLVM Bolt need them\\.\n.TP\n\\fB\\-\\-enable\\-new\\-dtags\\fR, \\fB\\-\\-disable\\-new\\-dtags\\fR\nBy default, \\fBmold\\fR emits \\fBDT_RUNPATH\\fR for \\fB\\-\\-rpath\\fR\\. If you pass \\fB\\-\\-disable\\-new\\-dtags\\fR, \\fBmold\\fR emits \\fBDT_RPATH\\fR for \\fB\\-\\-rpath\\fR instead\\.\n.TP\n\\fB\\-\\-execute\\-only\\fR:\n\n.TP\n\\fB\\-\\-exclude\\-libs\\fR=\\fIlibraries\\fR \\|\\.\\|\\.\\|\\.\nMark all symbols in the given \\fIlibraries\\fR hidden\\.\n.TP\n\\fB\\-\\-export\\-dynamic\\-symbol\\fR=\\fIsymbol\\fR\nPut symbols matching \\fIsymbol\\fR in the dynamic symbol table\\. \\fIsymbol\\fR may be a glob pattern in the same syntax as for the \\fB\\-\\-export\\-dynamic\\-symbol\\-list\\fR or \\fB\\-\\-version\\-script\\fR options\\.\n.TP\n\\fB\\-\\-export\\-dynamic\\-symbol\\-list\\fR=\\fIfile\\fR\nRead a list of dynamic symbols from \\fIfile\\fR\\.\n.TP\n\\fB\\-\\-fatal\\-warnings\\fR, \\fB\\-\\-no\\-fatal\\-warnings\\fR\nTreat warnings as errors\\.\n.TP\n\\fB\\-\\-fini\\fR=\\fIsymbol\\fR\nCall \\fIsymbol\\fR at unload\\-time\\.\n.TP\n\\fB\\-\\-gc\\-sections\\fR, \\fB\\-\\-no\\-gc\\-sections\\fR\nRemove unreferenced sections\\.\n.TP\n\\fB\\-\\-gdb\\-index\\fR\nCreate a \\fB\\.gdb_index\\fR section to speed up GNU debugger\\. To use this, you need to compile source files with the \\fB\\-ggnu\\-pubnames\\fR compiler flag\\.\n.TP\n\\fB\\-\\-hash\\-style\\fR=[ \\fBsysv\\fR | \\fBgnu\\fR | \\fBboth\\fR | \\fBnone\\fR ]\nSet hash style\\.\n.TP\n\\fB\\-\\-icf\\fR=[ \\fBsafe\\fR | \\fBall\\fR | \\fBnone\\fR ], \\fB\\-\\-no\\-icf\\fR\nIt is not uncommon for a program to contain many identical functions that differ only in name\\. For example, a C++ template \\fBstd::vector\\fR is very likely to be instantiated to the identical code for \\fBstd::vector<int>\\fR and \\fBstd::vector<unsigned>\\fR because the container cares only about the size of the parameter type\\. Identical Code Folding (ICF) is a size optimization to identify and merge such identical functions\\.\n.IP\nIf \\fB\\-\\-icf=all\\fR is given, \\fBmold\\fR tries to merge all identical functions\\. This reduces the size of the output most, but it is not a \"safe\" optimization\\. It is guaranteed in C and C++ that two pointers pointing two different functions will never be equal, but \\fB\\-\\-icf=all\\fR breaks that assumption as two identical functions have the same address after merging\\. So a care must be taken when you use this flag that your program does not depend on the function pointer uniqueness\\.\n.IP\n\\fB\\-\\-icf=safe\\fR is a flag to merge functions only when it is safe to do so\\. That is, if a program does not take an address of a function, it is safe to merge that function with other function, as you cannot compare a function pointer with something else without taking an address of a function\\.\n.IP\n\\fB\\-\\-icf=safe\\fR needs to be used with a compiler that supports \\fB\\.llvm_addrsig\\fR section which contains the information as to what symbols are address\\-taken\\. LLVM/Clang supports that section by default\\. Since GCC does not support it yet, you cannot use \\fB\\-\\-icf=safe\\fR with GCC (it doesn't do any harm but can't optimize at all\\.)\n.IP\n\\fB\\-\\-icf=none\\fR and \\fB\\-\\-no\\-icf\\fR disables ICF\\.\n.TP\n\\fB\\-\\-ignore\\-data\\-address\\-equality\\fR\nMake ICF to merge not only functions but also data\\. This option should be used in combination with \\fB\\-\\-icf=all\\fR\\.\n.TP\n\\fB\\-\\-image\\-base\\fR=\\fIaddr\\fR\nSet the base address to \\fIaddr\\fR\\.\n.TP\n\\fB\\-\\-init\\fR=\\fIsymbol\\fR\nCall \\fIsymbol\\fR at load\\-time\\.\n.TP\n\\fB\\-\\-no\\-undefined\\fR\nReport undefined symbols (even with \\fB\\-\\-shared\\fR)\\.\n.TP\n\\fB\\-\\-noinhibit\\-exec\\fR\nCreate an output file even if errors occur\\.\n.TP\n\\fB\\-\\-package\\-metadata\\fR=\\fIpercent\\-encoded\\-string\\fR\nEmbed a specified string into the \\fB\\.note\\.package\\fR section\\. This option is designed for build scripts that generate binary packages, such as \\fB\\.rpm\\fR or \\fB\\.deb\\fR, to include package metadata in each executable\\. It simplifies the process of identifying the corresponding package for a given executable or core file\\.\n.IP\nAn argument to this option is treated as percent\\-encoded and decoded before being inserted into the section, allowing you to avoid the use of the comma (\\fB,\\fR) character in the argument\\. This is useful because the compiler replaces all occurrences of commas in \\fB\\-Wl,\\fR with spaces before forwarding them to the linker\\. Note that \\fBmold\\fR always interprets the argument as percent\\-encoded, so you also need to escape all occurrences of \\fB%\\fR as \\fB%25\\fR\\.\n.TP\n\\fB\\-\\-pack\\-dyn\\-relocs\\fR=[ \\fBrelr\\fR | \\fBnone\\fR ]\nIf \\fBrelr\\fR is specified, all \\fBR_*_RELATIVE\\fR relocations are put into \\fB\\.relr\\.dyn\\fR section instead of \\fB\\.rel\\.dyn\\fR or \\fB\\.rela\\.dyn\\fR section\\. Since \\fB\\.relr\\.dyn\\fR section uses a space\\-efficient encoding scheme, specifying this flag can reduce the size of the output\\. This is typically most effective for position\\-independent executable\\.\n.IP\nNote that a runtime loader has to support \\fB\\.relr\\.dyn\\fR to run executables or shared libraries linked with \\fB\\-\\-pack\\-dyn\\-relocs=relr\\fR\\. As of 2022, only ChromeOS, Android and Fuchsia support it\\.\n.TP\n\\fB\\-\\-pie\\fR, \\fB\\-\\-pic\\-executable\\fR, \\fB\\-\\-no\\-pie\\fR, \\fB\\-\\-no\\-pic\\-executable\\fR\nCreate a position\\-independent executable\\.\n.TP\n\\fB\\-\\-print\\-gc\\-sections\\fR, \\fB\\-\\-no\\-print\\-gc\\-sections\\fR\nPrint removed unreferenced sections\\.\n.TP\n\\fB\\-\\-print\\-icf\\-sections\\fR, \\fB\\-\\-no\\-print\\-icf\\-sections\\fR\nPrint folded identical sections\\.\n.TP\n\\fB\\-\\-push\\-state\\fR, \\fB\\-\\-pop\\-state\\fR\n\\fB\\-\\-push\\-state\\fR saves the current values of \\fB\\-\\-as\\-needed\\fR, \\fB\\-\\-whole\\-archive\\fR, \\fB\\-\\-static\\fR, and \\fB\\-\\-start\\-lib\\fR\\. The saved values can be restored by pop\\-state\\.\n.IP\n\\fB\\-\\-push\\-state\\fR and \\fB\\-\\-pop\\-state\\fR pairs can nest\\.\n.IP\nThese options are useful when you want to construct linker command line options programmatically\\. For example, if you want to link \\fBlibfoo\\.so\\fR by as\\-needed basis but don't want to change the global state of \\fB\\-\\-as\\-needed\\fR, you can append \\fB\\-\\-push\\-state \\-\\-as\\-needed \\-lfoo \\-\\-pop\\-state\\fR to the linker command line options\\.\n.TP\n\\fB\\-\\-relax, \\-\\-no\\-relax\\fR\nRewrite machine instructions with more efficient ones for some relocations\\. The feature is enabled by default\\.\n.TP\n\\fB\\-\\-require\\-defined\\fR=\\fIsymbol\\fR\nLike \\fB\\-\\-undefined\\fR, except the new symbol must be defined by the end of the link\\.\n.TP\n\\fB\\-\\-retain\\-symbols\\-file\\fR=\\fIfile\\fR\nKeep only symbols listed in \\fIfile\\fR\\. \\fIfile\\fR is a text file containing a symbol name on each line\\. \\fBmold\\fR discards all local symbols as well as global symbol that are not in \\fIfile\\fR\\. Note that this option removes symbols only from \\fB\\.symtab\\fR section and does not affect \\fB\\.dynsym\\fR section, which is used for dynamic linking\\.\n.TP\n\\fB\\-\\-rpath\\fR=\\fIdir\\fR\nAdd \\fIdir\\fR to runtime search paths\\.\n.TP\n\\fB\\-\\-section\\-start\\fR=\\fIsection\\fR=\\fIaddress\\fR\nSet \\fIaddress\\fR to section\\. \\fIaddress\\fR is a hexadecimal number that may start with an optional \\fB0x\\fR\\.\n.TP\n\\fB\\-\\-shared\\fR, \\fB\\-\\-Bshareable\\fR\nCreate a share library\\.\n.TP\n\\fB\\-\\-spare\\-dynamic\\-tags\\fR=\\fInumber\\fR\nAppend the given number of \\fBDT_NULL\\fR entries to the end of the \\fB\\.dynamic\\fR section, so that post\\-link processing tools can easily add new dynamic tags by overwriting the null entries\\.\n.TP\n\\fB\\-\\-start\\-lib\\fR, \\fB\\-\\-end\\-lib\\fR\nHandle object files between \\fB\\-\\-start\\-lib\\fR and \\fB\\-\\-end\\-lib\\fR as if they were in an archive file\\. That means object files between them are linked only when they are needed to resolve undefined symbols\\. The options are useful if you want to link object files only when they are needed but want to avoid the overhead of running ar(3)\\.\n.TP\n\\fB\\-\\-static\\fR\nDo not link against shared libraries\\.\n.TP\n\\fB\\-\\-sysroot\\fR=\\fIdir\\fR\nSet target system root directory to \\fIdir\\fR\\.\n.TP\n\\fB\\-\\-trace\\fR\nPrint name of each input file\\.\n.TP\n\\fB\\-\\-undefined\\-glob\\fR=\\fIpattern\\fR\nSynonym for \\fB\\-\\-undefined\\fR, except that \\fB\\-\\-undefined\\-glob\\fR takes a glob pattern instead of just a single symbol name\\.\n.TP\n\\fB\\-\\-undefined\\-version\\fR, \\fB\\-\\-no\\-undefined\\-version\\fR\nBy default, \\fBmold\\fR warns on a symbol specified by a version script or by \\fB\\-\\-export\\-dynamic\\-symbol\\fR if it is not defined\\. You can silence the warning by \\fB\\-\\-undefined\\-version\\fR\\.\n.TP\n\\fB\\-\\-unique\\fR=\\fIpattern\\fR\nDon't merge input sections that match the given glob pattern \\fIpattern\\fR\\.\n.TP\n\\fB\\-\\-unresolved\\-symbols\\fR=[ \\fBreport\\-all\\fR | \\fBignore\\-all\\fR | \\fBignore\\-in\\-object\\-files\\fR | \\fBignore\\-in\\-shared\\-libs\\fR ]\nHow to handle undefined symbols\\.\n.TP\n\\fB\\-\\-version\\-script\\fR=\\fIfile\\fR\nRead version script from \\fIfile\\fR\\. If \\fIfile\\fR does not exist in the current directory, it is searched from library search paths for the sake of compatibility with GNU ld\\.\n.TP\n\\fB\\-\\-warn\\-common\\fR, \\fB\\-\\-no\\-warn\\-common\\fR\nWarn about common symbols\\.\n.TP\n\\fB\\-\\-warn\\-once\\fR\nOnly warn once for each undefined symbol instead of warn for each relocation referring an undefined symbol\\.\n.TP\n\\fB\\-\\-warn\\-unresolved\\-symbols\\fR, \\fB\\-\\-error\\-unresolved\\-symbols\\fR\nNormally, the linker reports an error for unresolved symbols\\. \\fB\\-\\-warn\\-unresolved\\-symbols\\fR option turns it into a warning\\. \\fB\\-\\-error\\-unresolved\\-symbols\\fR option restores the default behavior\\.\n.TP\n\\fB\\-\\-whole\\-archive\\fR, \\fB\\-\\-no\\-whole\\-archive\\fR\nWhen archive files (\\fB\\.a\\fR files) are given to the linker, only object files that are needed to resolve undefined symbols are extracted from them and linked to an output file\\. \\fB\\-\\-whole\\-archive\\fR changes that behavior for subsequent archives so that the linker extracts all object files and links them to an output\\. For example, if you are creating a shared object file and you want to include all archive members to the output, you should pass \\fB\\-\\-whole\\-archive\\fR\\. \\fB\\-\\-no\\-whole\\-archive\\fR restores the default behavior for subsequent archives\\.\n.TP\n\\fB\\-\\-wrap\\fR=\\fIsymbol\\fR\nMake \\fIsymbol\\fR be resolved to \\fB__wrap_\\fR\\fIsymbol\\fR\\. The original symbol can be resolved as \\fB__real_\\fR\\fIsymbol\\fR\\. This option is typically used for wrapping an existing function\\.\n.TP\n\\fB\\-z cet\\-report\\fR=[ \\fBwarning\\fR | \\fBerror\\fR | \\fBnone\\fR ]\nIntel Control\\-flow Enforcement Technology (CET) is a new x86 feature available since Tiger Lake which is released in 2020\\. It defines new instructions to harden security to protect programs from control hijacking attacks\\. You can tell the compiler to use the feature by specifying the \\fB\\-fcf\\-protection\\fR flag\\.\n.IP\n\\fB\\-z cet\\-report\\fR flag is used to make sure that all object files were compiled with a correct \\fB\\-fcf\\-protection\\fR flag\\. If \\fBwarning\\fR or \\fBerror\\fR are given, \\fBmold\\fR prints out a warning or an error message if an object file was not compiled with the compiler flag\\.\n.IP\n\\fBmold\\fR looks for \\fBGNU_PROPERTY_X86_FEATURE_1_IBT\\fR bit and \\fBGNU_PROPERTY_X86_FEATURE_1_SHSTK\\fR bit in \\fB\\.note\\.gnu\\.property\\fR section to determine whether or not an object file was compiled with \\fB\\-fcf\\-protection\\fR\\.\n.TP\n\\fB\\-z now\\fR, \\fB\\-z lazy\\fR\nBy default, functions referring to other ELF modules are resolved by the dynamic linker when they are called for the first time\\. \\fB\\-z now\\fR marks an executable or a shared library file so that all dynamic symbols are resolved when a file is loaded to memory\\. \\fB\\-z lazy\\fR restores the default behavior\\.\n.TP\n\\fB\\-z origin\\fR\nMark object requiring immediate \\fB$ORIGIN\\fR processing at runtime\\.\n.TP\n\\fB\\-z ibt\\fR\nTurn on \\fBGNU_PROPERTY_X86_FEATURE_1_IBT\\fR bit in \\fB\\.note\\.gnu\\.property\\fR section to indicate that the output uses IBT\\-enabled PLT\\. This option implies \\fB\\-z ibtplt\\fR\\.\n.TP\n\\fB\\-z ibtplt\\fR\nGenerate Intel Branch Tracking (IBT)\\-enabled PLT which is the default on x86\\-64\\. This is the default\\.\n.TP\n\\fB\\-z execstack\\fR, \\fB\\-z noexecstack\\fR\nBy default, the pages for the stack area (i\\.e\\. the pages where local variables reside) are not executable for security reasons\\. \\fB\\-z execstack\\fR makes it executable\\. \\fB\\-z noexecstack\\fR restores the default behavior\\.\n.TP\n\\fB\\-z keep\\-text\\-section\\-prefix\\fR, \\fB\\-z nokeep\\-text\\-section\\-prefix\\fR\nKeep \\fB\\.text\\.hot\\fR, \\fB\\.text\\.unknown\\fR, \\fB\\.text\\.unlikely\\fR, \\fB\\.text\\.startup\\fR, and \\fB\\.text\\.exit\\fR as separate sections in the final binary instead of merging them as \\fB\\.text\\fR\\.\n.TP\n\\fB\\-z rodynamic\\fR\nMake the \\fB\\.dynamic\\fR section read\\-only\\.\n.TP\n\\fB\\-z relro\\fR, \\fB\\-z norelro\\fR\nSome sections such as \\fB\\.dynamic\\fR have to be writable only during a module is being loaded to memory\\. Once the dynamic linker finishes its job, such sections won't be mutated by anyone\\. As a security mitigation, it is preferred to make such segments read\\-only during program execution\\.\n.IP\n\\fB\\-z relro\\fR puts such sections into a special segment called \\fBrelro\\fR\\. The dynamic linker makes a relro segment read\\-only after it finishes its job\\.\n.IP\nBy default, \\fBmold\\fR generates a relro segment\\. \\fB\\-z norelro\\fR disables the feature\\.\n.TP\n\\fB\\-z sectionheader\\fR, \\fB\\-z nosectionheader\\fR\n\\fB\\-z nosectionheader\\fR tell the linker to omit the section header\\. By default, the linker does not omit the section header\\.\n.TP\n\\fB\\-z separate\\-loadable\\-segments\\fR, \\fB\\-z separate\\-code\\fR, \\fB\\-z noseparate\\-code\\fR\nIf one memory page contains multiple segments, the page protection bits are set in such a way that the needed attributes (writable or executable) are satisfied for all segments\\. This usually happens at a boundary of two segments with two different attributes\\.\n.IP\n\\fBseparate\\-loadable\\-segments\\fR adds paddings between segments with different attributes so that they do not share the same page\\.\n.IP\n\\fBseparate\\-code\\fR adds paddings only between executable and non\\-executable segments\\. This is the default\\.\n.IP\n\\fBnoseparate\\-code\\fR does not add any paddings between segments\\.\n.TP\n\\fB\\-z defs\\fR, \\fB\\-z nodefs\\fR\nReport undefined symbols (even with \\fB\\-\\-shared\\fR)\\.\n.TP\n\\fB\\-z shstk\\fR\nEnforce shadow stack by turning \\fBGNU_PROPERTY_X86_FEATURE_1_SHSTK\\fR bit in \\fB\\.note\\.gnu\\.property\\fR output section\\. Shadow stack is part of Intel Control\\-flow Enforcement Technology (CET), which is available since Tiger Lake (2020)\\.\n.TP\n\\fB\\-z start_stop_visibility\\fR=[ \\fBhidden\\fR | \\fBprotected\\fR ]\nIf a section name is valid as a C identifier (i\\.e\\., it matches \\fB/^[_a\\-zA\\-Z][_a\\-zA\\-Z0\\-9]*$/\\fR), mold creates \\fB__start_SECNAME\\fR and \\fB__stop_SECNAME\\fR symbols to mark the beginning and end of the section, where \\fBSECNAME\\fR is the section name\\.\n.IP\nYou can make these marker symbols visible from other ELF modules by passing \\fB\\-z start_stop_visibility=protected\\fR\\. Default is \\fBhidden\\fR\\.\n.TP\n\\fB\\-z text\\fR, \\fB\\-z notext\\fR, \\fB\\-z textoff\\fR\n\\fBmold\\fR by default reports an error if dynamic relocations are created in read\\-only sections\\. If \\fB\\-z notext\\fR or \\fB\\-z textoff\\fR are given, \\fBmold\\fR creates such dynamic relocations without reporting an error\\. \\fB\\-z text\\fR restores the default behavior\\.\n.TP\n\\fB\\-z max\\-page\\-size\\fR=\\fInumber\\fR\nSome CPU ISAs support multiple memory page sizes\\. This option specifies the maximum page size that an output binary can run on\\. In general, binaries built for a larger page size can run on a system with a smaller page size, but not vice versa\\. The default value is 4 KiB for i386, x86\\-64, and RISC\\-V, and 64 KiB for ARM64\\.\n.TP\n\\fB\\-z nodefaultlib\\fR\nMake the dynamic loader ignore default search paths\\.\n.TP\n\\fB\\-z nodelete\\fR\nMark DSO non\\-deletable at runtime\\.\n.TP\n\\fB\\-z nodlopen\\fR\nMark DSO not available to dlopen(3)\\. This option makes it possible for the linker to optimize thread\\-local variable accesses by rewriting instructions for some targets\\.\n.TP\n\\fB\\-z nodump\\fR\nMark DSO not available to dldump(3)\\.\n.TP\n\\fB\\-z nocopyreloc\\fR\nDo not create copy relocations\\.\n.TP\n\\fB\\-z initfirst\\fR\nMark DSO to be initialized first at runtime\\.\n.TP\n\\fB\\-z interpose\\fR\nMark object to interpose all DSOs but executable\\.\n.TP\n\\fB\\-(\\fR, \\fB\\-)\\fR, \\fB\\-EL\\fR, \\fB\\-O\\fR\\fInumber\\fR, \\fB\\-\\-dc\\fR, \\fB\\-\\-dp\\fR, \\fB\\-\\-end\\-group\\fR, \\fB\\-\\-no\\-add\\-needed\\fR, \\fB\\-\\-no\\-copy\\-dt\\-needed\\-entries\\fR, \\fB\\-\\-nostdlib\\fR, \\fB\\-\\-rpath\\-link=Ar dir\\fR, \\fB\\-\\-sort\\-common\\fR, \\fB\\-\\-sort\\-section\\fR, \\fB\\-\\-start\\-group\\fR, \\fB\\-\\-warn\\-constructors\\fR, \\fB\\-\\-warn\\-once\\fR, \\fB\\-\\-fix\\-cortex\\-a53\\-835769\\fR, \\fB\\-\\-fix\\-cortex\\-a53\\-843419\\fR, \\fB\\-z combreloc\\fR, \\fB\\-z common\\-page\\-size\\fR, \\fB\\-z nocombreloc\\fR\nIgnored\n.SH \"ENVIRONMENT VARIABLES\"\n.TP\n\\fBMOLD_JOBS\\fR\nIf this variable is set to \\fB1\\fR, only one \\fBmold\\fR process will run at a time\\. If a new mold process is initiated while another is already active, the new process will wait until the active one completes before starting\\.\n.IP\nThe primary reason for this environment variable is to minimize peak memory usage\\. Since mold is designed to operate with high parallelism, running multiple mold instances simultaneously may not be beneficial\\. If you execute N instances of mold concurrently, it could require N times the time and N times the memory\\. On the other hand, running them one after the other might still take N times longer, but the peak memory usage would be the same as running just a single instance\\.\n.IP\nIf your build system invokes multiple linker processes simultaneously and some of them often get killed due to out\\-of\\-memory errors, you might consider setting this environment variable to \\fB1\\fR to see if it addresses the OOM issue\\.\n.IP\nCurrently, any value other than \\fB1\\fR is silently ignored\\.\n.TP\n\\fBMOLD_DEBUG\\fR\nIf this variable is set to a non\\-empty string, \\fBmold\\fR embeds its command\\-line options in the output file's \\fB\\.comment\\fR section\\.\n.TP\n\\fBMOLD_REPRO\\fR\nSetting this variable to a non\\-empty string has the same effect as passing the \\fB\\-\\-repro\\fR option\\.\n.SH \"SEE ALSO\"\ngold(1), ld(1), elf(5), ld\\.so(8)\n.SH \"AUTHOR\"\nRui Ueyama \\fIruiu@cs\\.stanford\\.edu\\fR\n.SH \"BUGS\"\nReport bugs to \\fIhttps://github\\.com/rui314/mold/issues\\fR\\.\n"
  },
  {
    "path": "docs/mold.md",
    "content": "mold(1) -- a modern linker\n==========================\n\n## SYNOPSIS\n\n`mold` [_option_...] _file_...\n\n## DESCRIPTION\n`mold` is a faster drop-in replacement for the default GNU ld(1).\n\n### How to use\nSee <https://github.com/rui314/mold#how-to-use>.\n\n### Compatibility\n\n`mold` is designed to be a drop-in replacement for the GNU linkers for\nlinking user-land programs. If your user-land program cannot be built due to\nmissing command-line options, please file a bug at\n<https://github.com/rui314/mold/issues>.\n\n`mold` supports a very limited set of linker script features, which is just\nsufficient to read `/usr/lib/x86_64-linux-gnu/libc.so` on Linux systems (on\nLinux, that file is contrary to its name not a shared library but an ASCII\nlinker script that loads a real `libc.so` file.)\n\nBeyond that, we have no plan to support any additional linker script features.\nThe linker script is an ad-hoc, over-designed, complex language which we\nbelieve needs to be replaced by a simpler mechanism. We have a plan to add a\nreplacement for the linker script to `mold` instead.\n\n### Archive symbol resolution\n\nTraditionally, Unix linkers are sensitive to the order in which input files\nappear on the command line. They process input files from the first (leftmost)\nfile to the last (rightmost) file one-by-one. While reading input files, they\nmaintain sets of defined and undefined symbols. When visiting an archive file\n(`.a` files), they pull out object files to resolve as many undefined symbols\nas possible and move on to the next input file. Object files that weren't\npulled out will never have a chance for a second look.\n\nDue to this behavior, you usually have to add archive files at the end of a\ncommand line, so that when a linker reaches archive files, it knows what\nsymbols remain as undefined.\n\nIf you put archive files at the beginning of a command line, a linker doesn't\nhave any undefined symbols, and thus no object files will be pulled out from\narchives. You can change the processing order by using the `--start-group` and\n`--end-group` options, though they make a linker slower.\n\n`mold`, as well as the LLVM lld(1) linker, takes a different approach. They\nremember which symbols can be resolved from archive files instead of\nforgetting them after processing each archive. Therefore, `mold` and lld(1)\ncan \"go back\" in a command line to pull out object files from archives if they\nare needed to resolve remaining undefined symbols. They are not sensitive to\nthe input file order.\n\n`--start-group` and `--end-group` are still accepted by `mold` and lld(1)\nfor compatibility with traditional linkers, but they are silently ignored.\n\n### Dynamic symbol resolution\n\nSome Unix linker features are difficult to understand without comprehending\nthe semantics of dynamic symbol resolution. Therefore, even though it's not\nspecific to `mold`, we'll explain it here.\n\nWe use \"ELF module\" or just \"module\" as a collective term to refer to an\nexecutable or a shared library file in the ELF format.\n\nAn ELF module may have lists of imported symbols and exported symbols, as well\nas a list of shared library names from which imported symbols should be\nimported. The point is that imported symbols are not bound to any specific\nshared library until runtime.\n\nHere is how the Unix dynamic linker resolves dynamic symbols. Upon the start\nof an ELF program, the dynamic linker constructs a list of ELF modules which,\nas a whole, consist of a complete program. The executable file is always at\nthe beginning of the list followed by its dependent shared libraries. An\nimported symbol is searched from the beginning of the list to the end. If two\nor more modules define the same symbol, the one that appears first in the list\ntakes precedence over the others.\n\nThis Unix semantics are contrary to systems such as Windows that have a\ntwo-level namespace for dynamic symbols. On Windows, for example, dynamic\nsymbols are represented as a tuple of (`symbol-name`, `shared-library-name`),\nso that each dynamic symbol is guaranteed to be resolved from some specific\nlibrary.\n\nTypically, an ELF module that exports a symbol also imports the same symbol.\nSuch a symbol is usually resolved to itself, but that's not the case if a\nmodule that appears before it in the symbol search list provides another\ndefinition of the same symbol.\n\nLet's take `malloc` as an example. Assume that you define your version of\n`malloc` in your main executable file. Then, all `malloc` calls from any\nmodule are resolved to your function instead of the one in libc, because the\nexecutable is always at the beginning of the dynamic symbol search list. Note\nthat even `malloc` calls within libc are resolved to your definition since\nlibc exports and imports `malloc`. Therefore, by defining `malloc` yourself,\nyou can overwrite a library function, and the `malloc` in libc becomes dead\ncode.\n\nThese Unix semantics are tricky and sometimes considered harmful. For example,\nassume that you accidentally define `atoi` as a global function in your\nexecutable that behaves completely differently from the one in the C standard.\nThen, all `atoi` function calls from any modules (even function calls within\nlibc) are redirected to your function instead of the one in libc, which will\nvery likely cause a problem. That is a somewhat surprising consequence for an\naccidental name conflict. On the other hand, this semantic is sometimes useful\nbecause it allows users to override library functions without rebuilding\nmodules containing them.\n\nWhether good or bad, you should keep these semantics in mind to understand\nUnix linkers' behaviors.\n\n### Build reproducibility\n\n`mold`'s output is deterministic. That is, if you pass the same object files\nand the same command-line options to the same version of `mold`, it is\nguaranteed that `mold` produces the bit-for-bit identical output. The linker's\ninternal randomness, such as the timing of thread scheduling or iteration\norders of hash tables, doesn't affect the output.\n\n`mold` does not have any host-specific default settings. This is contrary to the\nGNU linkers, for which some configurable values, such as system-dependent\nlibrary search paths, are hard-coded. `mold` depends only on its command-line\narguments.\n\n## OPTION NOTATIONS\n\nMulti-letter long options may precede either a single dash or double dashes,\nexcept for those starting with the letter \"o\". For historical reasons, long\noptions beginning with \"o\" must precede double dashes.\n\nFor example, you can spell `--as-needed` as `-as-needed`, but `--omagic` must\nnot be spelled as `-omagic`. `-omagic` will be interpreted not as `--omagic`\nbut as `-o magic`.\n\n## MOLD-SPECIFIC OPTIONS\n\n* `--chroot`=_dir_:\n  Set _dir_ as the root directory.\n\n* `--color-diagnostics`=[ _auto_ | _always_ | _never_ ]:\n  Show diagnostic messages in color using ANSI escape sequences. `auto` means\n  that `mold` prints out messages in color only if the standard output is\n  connected to a TTY. Default is `auto`.\n\n* `--color-diagnostics`:\n  Synonym for `--color-diagnostics=auto`.\n\n* `--no-color-diagnostics`:\n  Synonym for `--color-diagnostics=never`.\n\n* `--detach`, `--no-detach`:\n  Permit or do not permit mold to create a debug info file in the background.\n\n* `--fork`, `--no-fork`:\n  Spawn a child process and let it do the actual linking. When linking a large\n  program, the OS kernel can take a few hundred milliseconds to terminate a\n  `mold` process. `--fork` hides that latency. By default, it does fork.\n\n  Note that `--fork` also hides the resource usage statistics reported by\n  time(2), since it doesn't call waitpid(2) on the child process. If you\n  need those statistics, pass `--no-fork`.\n\n* `--perf`:\n  Print performance statistics.\n\n* `--print-dependencies`:\n  Print out dependency information for input files.\n\n  Each line of the output for this option shows which file depends on which\n  file to use a specific symbol. This option is useful for debugging why some\n  object file in a static archive got linked or why some shared library is\n  kept in an output file's dependency list even with `--as-needed`.\n\n* `--relocatable-merge-sections`:\n  By default, `mold` doesn't merge input sections by name when merging input\n  object files into a single output object file for `-r`. For example,\n  `.text.foo` and `.text.bar` aren't merged for `-r` even though they are\n  merged into `.text` based on the default section merging rules.\n\n  This option changes the behavior so that `mold` merges input sections by\n  name by the default section merging rules.\n\n* `--repro`:\n  Archive input files, as well as a text file containing command line options,\n  in a tar file so that you can run `mold` with the exact same inputs again.\n  This is useful for reporting a bug with a reproducer. The output filename is\n  `path/to/output.tar`, where `path/to/output` is an output filename specified\n  by `-o`.\n\n* `--reverse-sections`:\n  Reverse the order of input sections before assigning them the offsets in the\n  output file.\n\n  This option is useful for finding bugs that depend on the initialization\n  order of global objects. In C++, constructors of global objects in a single\n  source file are guaranteed to be executed in the source order, but there's\n  no such guarantee across compilation units. Usually, constructors are\n  executed in the order given to the linker, but depending on it is a mistake.\n\n  By reversing the order of input sections using `--reverse-sections`, you can\n  easily test that your program works in the reversed initialization order.\n\n* `--run` _command_ _arg_...:\n  Run _command_ with `mold` as `/usr/bin/ld`. Specifically, `mold` runs a\n  given command with the `LD_PRELOAD` environment set to intercept exec(3)\n  family functions and replaces `argv[0]` with itself if it is `ld`,\n  `ld.gold`, or `ld.lld`.\n\n* `--separate-debug-file`, `--separate-debug-file`=_file_:\n  Bundle debug info sections into a separate file instead of embedding them in\n  an output executable or a shared library. mold creates a debug info file in\n  the background by default, so that you can start running your executable as\n  soon as possible.\n\n  By default, the debug info file is created in the same directory as is the\n  output file, with the `.dbg` file extension. That filename is embedded into\n  the output file so that `gdb` can automatically find the debug info file for\n  the output file. For more info about gdb features related to separate debug\n  files, see\n  <https://sourceware.org/gdb/current/onlinedocs/gdb.html/Separate-Debug-Files.html>.\n\n  mold holds a file lock with flock(2) while creating a debug info file in the\n  background.\n\n  If you don't want to create a debug info file in the background, pass the\n  `--no-detach` option.\n\n* `--shuffle-sections`, `--shuffle-sections`=_number_:\n  Randomize the output by shuffling the order of input sections before\n  assigning them the offsets in the output file. If a _number_ is given, it's\n  used as a seed for the random number generator, so that the linker produces\n  the same output for the same seed. If no seed is given, a random number is\n  used as a seed.\n\n  This option is useful for benchmarking. Modern CPUs are sensitive to a\n  program's memory layout. A seemingly benign change in program layout, such\n  as a small size increase of a function in the middle of a program, can\n  affect the program's performance. Therefore, even if you write new code and\n  get a good benchmark result, it is hard to say whether the new code improves\n  the program's performance; it is possible that the new memory layout happens\n  to perform better.\n\n  By running a benchmark multiple times with randomized memory layouts using\n  `--shuffle-sections`, you can isolate your program's real performance number\n  from the randomness caused by memory layout changes.\n\n* `--spare-program-headers`=_number_:\n  Append the given number of `PT_NULL` entries to the end of the program\n  header, so that post-link processing tools can easily add new segments by\n  overwriting the null entries.\n\n  Note that ELF requires all `PT_LOAD` segments to be sorted by `p_vaddr`.\n  Therefore, if you add a new LOAD segment, you may need to sort the entire\n  program header.\n\n* `--stats`:\n  Print input statistics.\n\n* `--thread-count`=_count_:\n  Use _count_ number of threads.\n\n* `--threads`, `--no-threads`:\n  Use multiple threads. By default, `mold` uses as many threads as the number of\n  cores or 32, whichever is smaller. The reason it is capped at 32 is because\n  `mold` doesn't scale well beyond that point. To use only one thread, pass\n  `--no-threads` or `--thread-count=1`.\n\n* `--quick-exit`, `--no-quick-exit`:\n  Use or do not use `quick_exit` to exit.\n\n* `--zero-to-bss`:\n  Convert all-zero data sections into BSS.\n\n  When this option is enabled, `mold` scans input data sections that are not\n  of type `SHT_NOBITS` and checks whether their contents consist solely of\n  zero bytes. Such sections are then converted into BSS (`SHT_NOBITS`)\n  sections. This reduces the size of the output file, since BSS sections\n  occupy no space in the file image.\n\n  This behavior is especially useful for user-defined sections created with\n  `__attribute__((section(\".sectname\")))` that contain uninitialized global\n  variables. GCC and Clang do not automatically mark such sections as BSS\n  even if their contents are entirely zero, and instead emit them as regular\n  data sections.\n\n  For example, consider `__attribute__((section(\".sectname\"))) int vec[256];`.\n\n  By default, this results in a `.sectname` section of type `SHT_PROGBITS`\n  filled with zeros. With `--zero-to-bss`, the linker will recognize it as\n  empty data and convert it to a `SHT_NOBITS` section, reducing the output\n  file size without changing runtime semantics.\n\n* `-z rewrite-endbr`, `-z norewrite-endbr`:\n  As a security measure, some CPU instruction sets have recently gained a\n  feature to protect control flow integrity by disallowing indirect branches\n  by default. If the feature is enabled, the instruction that is executed\n  immediately after an indirect branch must be an branch target marker\n  instruction, or a CPU-level fault will raise. The marker instruction is also\n  known as \"landing pad\" instruction, to which indirect branches can land.\n  This feature makes ROP attacks harder to conduct.\n\n  To use the feature, a function whose pointer is taken needs to begin with a\n  landing pad because a function call via a function pointer is compiled to an\n  indirect branch. On the other hand, if a function is called only directly\n  (i.e. referred to only by _direct_ branch instructions), it doesn't have to\n  begin with it.\n\n  By default, the compiler always emits a landing pad at the beginning of each\n  global function because it doesn't know whether or not the function's\n  pointer is taken in another translation unit. As a result, the resulting\n  binary has more attack surface than necessary.\n\n  If `--rewrite-endbr` is given, mold conducts a whole program analysis\n  to identify functions whose addresses are actually taken and rewrites\n  landing pads with no-ops for non-address-taken functions, reducing the\n  attack surface.\n\n  This feature is currently available only on x86-64.\n\n## GNU-COMPATIBLE OPTIONS\n\n* `--help`:\n  Report usage information to stdout and exit.\n\n* `-v`, `--version`:\n  Report version information to stdout.\n\n* `-V`:\n  Report version and target information to stdout.\n\n* `-E`, `--export-dynamic`, `--no-export-dynamic`:\n  When creating an executable, using the `-E` option causes all global symbols\n  to be put into the dynamic symbol table, so that the symbols are visible\n  from other ELF modules at runtime.\n\n  By default, or if `--no-export-dynamic` is given, only symbols that are\n  referenced by DSOs at link-time are exported from an executable.\n\n* `-F` _libname_, `--filter`=_libname_:\n  Set the `DT_FILTER` dynamic section field to _libname_.\n\n* `-I` _file_, `--dynamic-linker`=_file_, `--no-dynamic-linker`:\n  Set the dynamic linker path to _file_. If no `-I` option is given, or if\n  `--no-dynamic-linker` is given, no dynamic linker path is set to an output\n  file. This is contrary to the GNU linkers which set a default dynamic linker\n  path in that case. This difference doesn't usually make any difference\n  because the compiler driver always passes `-I` to the linker.\n\n* `-L` _dir_, `--library-path`=_dir_:\n  Add _dir_ to the list of library search paths from which `mold` searches\n  libraries for the `-l` option.\n\n  Unlike the GNU linkers, `mold` does not have default search paths. This\n  difference doesn't usually make any difference because the compiler driver\n  always passes all necessary search paths to the linker.\n\n* `-M`, `--print-map`:\n  Write a map file to stdout.\n\n* `-N`, `--omagic`, `--no-omagic`:\n  Force `mold` to emit an output file with an old-fashioned memory layout.\n  First, it makes the first data segment not aligned to a page boundary.\n  Second, text segments are marked as writable if the option is given.\n\n* `-S`, `--strip-debug`:\n  Omit `.debug_*` sections from the output file.\n\n* `-T` _file_, `--script`=_file_:\n  Read linker script from _file_.\n\n* `-X`, `--discard-locals`:\n  Discard temporary local symbols to reduce the sizes of the symbol table and\n  the string table. Temporary local symbols are local symbols starting with\n  `.L`. Compilers usually generate such symbols for unnamed program elements\n  such as string literals or floating-point literals.\n\n* `-e` _symbol_, `--entry`=_symbol_:\n\n  Use _symbol_ as the entry point symbol instead of the default entry\n  point symbol _start.\n\n* `-f` _shlib_, `--auxiliary`=_shlib_:\n  Set the `DT_AUXILIARY` dynamic section field to _shlib_.\n\n* `-h` _libname_, `--soname`=_libname_:\n  Set the `DT_SONAME` dynamic section field to _libname_. This option is used\n  when creating a shared object file. Typically, when you create `libfoo.so`,\n  you want to pass `--soname=foo` to a linker.\n\n* `-l` _libname_:\n  Search for `lib`_libname_`.so` or `lib`_libname_`.a` from library search\n  paths.\n\n* `-m` _target_:\n  Choose a _target_.\n\n* `-o` _file_, `--output`=_file_:\n  Use _file_ as the output file name instead of the default name `a.out`.\n\n* `-r`, `--relocatable`:\n  Instead of generating an executable or a shared object file, combine input\n  object files to generate another object file that can be used as an input to\n  a linker.\n\n* `-s`, `--strip-all`:\n  Omit `.symtab` section from the output file.\n\n* `-u` _symbol_, `--undefined`=_symbol_:\n  If _symbol_ remains as an undefined symbol after reading all object files,\n  and if there is a static archive that contains an object file defining\n  _symbol_, pull out the object file and link it so that the output file\n  contains a definition of _symbol_.\n\n* `-y` _symbol_, `--trace-symbol`=_symbol_:\n  Trace references to _symbol_.\n\n* `--Bdynamic`:\n  Link against shared libraries.\n\n* `--Bstatic`:\n  Do not link against shared libraries.\n\n* `--Bsymbolic`:\n  When creating a shared library, make global symbols export-only (i.e. do not\n  import the same symbol). As a result, references within a shared library are\n  always resolved locally, negating symbol override at runtime. See \"Dynamic\n  symbol resolution\" for more information about symbol imports and exports.\n\n* `--Bsymbolic-functions`:\n  This option has the same effect as `--Bsymbolic` but works only for function\n  symbols. Data symbols remain being both imported and exported.\n\n* `--Bsymbolic-non-weak`:\n  This option has the same effect as `--Bsymbolic` but works only for non-weak\n  symbols. Weak symbols remain being both imported and exported.\n\n* `--Bsymbolic-non-weak-functions`:\n  This option has the same effect as `--Bsymbolic` but works only for non-weak\n  function symbols. Data symbols and weak function symbols remain being both\n  imported and exported.\n\n* `--Bno-symbolic`:\n  Cancel `--Bsymbolic`, `--Bsymbolic-functions`, `--Bsymbolic-non-weak` and\n  `--Bsymbolic-non-weak-functions`.\n\n* `--Map`=_file_:\n  Write map file to _file_.\n\n* `--Tbss`=_address_:\n  Alias for `--section-start=.bss=`_address_.\n\n* `--Tdata`=_address_:\n  Alias for `--section-start=.data=`_address_.\n\n* `--Ttext`=_address_:\n  Alias for `--section-start=.text=`_address_.\n\n* `--allow-multiple-definition`:\n  Normally, the linker reports an error if there are more than one definition\n  of a symbol. This option changes the default behavior so that it doesn't\n  report an error for duplicate definitions and instead use the first\n  definition.\n\n* `--allow-shlib-undefined`, `--no-allow-shlib-undefined`:\n  Even if mold succeeds in linking a main executable without undefined symbol\n  errors, you may still encounter symbol lookup errors at runtime because the\n  dynamic linker cannot find some symbols in shared libraries in any ELF\n  module. This occurs because mold ignores undefined symbols in shared\n  libraries by default.\n\n  If you pass `--no-allow-shlib-undefined`, mold verifies that undefined\n  symbols in shared libraries given to the linker can be resolved at\n  link-time. In other words, this converts the runtime error to a link-time\n  error.\n\n  Note that you need to pass all shared libraries, including indirectly\n  dependent ones, to the linker as arguments for `-l`. If a shared library\n  depends on a library that's not passed to the linker, the verification will\n  be skipped for that file.\n\n* `--as-needed`, `--no-as-needed`:\n  By default, shared libraries given to the linker are unconditionally added\n  to the list of required libraries in an output file. However, shared\n  libraries after `--as-needed` are added to the list only when at least one\n  symbol is actually used by the output file. In other words, shared libraries\n  after `--as-needed` are not added to the list of needed libraries if they\n  are not needed by a program.\n\n  The `--no-as-needed` option restores the default behavior for subsequent\n  files.\n\n* `--build-id`=[ `md5` | `sha1` | `sha256` | `fast` | `uuid` | `0x`_hexstring_ | `none` ]:\n  Create a `.note.gnu.build-id` section containing a byte string to uniquely\n  identify an output file. `sha256` compute a 256-bit cryptographic hash of an\n  output file and set it to build-id. `md5` and `sha1` compute the same hash\n  but truncate it to 128 and 160 bits, respectively, before setting it to\n  build-id. `uuid` sets a random 128-bit UUID. `0x`_hexstring_ sets\n  _hexstring_. `fast` is a synonym for `sha256`.\n\n* `--build-id`:\n  Synonym for `--build-id=sha256`.\n\n* `--no-build-id`:\n  Synonym for `--build-id=none`.\n\n* `--compress-debug-sections`=[ `zlib` | `zlib-gabi` | `zstd` | `none` ]:\n  Compress DWARF debug info (`.debug_*` sections) using the zlib or zstd\n  compression algorithm. `zlib-gabi` is an alias for `zlib`.\n\n* `--defsym`=_symbol_=_value_:\n  Define _symbol_ as an alias for _value_.\n\n  _value_ is either an integer (in decimal or hexadecimal with `0x` prefix) or\n  a symbol name. If an integer is given as a value, _symbol_ is defined as an\n  absolute symbol with the given value.\n\n* `--default-symver`:\n  Use soname as a symbol version and append that version to all symbols.\n\n* `--demangle`, `--no-demangle`:\n  Demangle C++ and Rust symbols in log messages.\n\n* `--dependency-file`=_file_:\n  Write a dependency file to _file_. The contents of the written file is\n  readable by make(1), which defines only one rule with the linker's output\n  file as a target and all input files as its prerequisites. Users are\n  expected to include the generated dependency file into a Makefile to\n  automate the dependency management. This option is analogous to the\n  compiler's `-MM -MF` options.\n\n* `--dynamic-list`=_file_:\n  Read a list of dynamic symbols from _file_. Same as\n  `--export-dynamic-symbol-list`, except that it implies `--Bsymbolic`. If\n  _file_ does not exist in the current directory, it is searched from library\n  search paths for the sake of compatibility with GNU ld.\n\n* `--eh-frame-hdr`, `--no-eh-frame-hdr`:\n  Create `.eh_frame_hdr` section.\n\n* `--emit-relocs`:\n  The linker usually \"consumes\" relocation sections. That is, the linker\n  applies relocations to other sections, and relocation sections themselves\n  are discarded.\n\n  The `--emit-relocs` instructs the linker to leave relocation sections in the\n  output file. Some post-link binary analysis or optimization tools such as\n  LLVM Bolt need them.\n\n* `--enable-new-dtags`, `--disable-new-dtags`:\n  By default, `mold` emits `DT_RUNPATH` for `--rpath`. If you pass\n  `--disable-new-dtags`, `mold` emits `DT_RPATH` for `--rpath` instead.\n\n* `--execute-only`:\n\n  Traditionally, setting the executable bit to 1 for a memory page implies\n  that the page also become readable, which allows machine code to be read\n  as data at runtime. That is actually what an attacker often does after\n  gaining a limited control of a process to find pieces of machine code\n  they can use to gain the full control of the process. As a mitigation,\n  recent processors including some ARM64 ones allows \"execute-only\" pages.\n  If a page is execute-only, you can call a function there as long as you\n  know its address but can't read it as data.\n\n  This option marks text segments as execute-only by setting just the \"X\"\n  bit instead of \"RX\". Note that on most systems, the absence of the \"R\"\n  bit in the text segment serves just as a hint. If you run a program\n  linked with `--execute-only` on a processor that doesn't support\n  execute-only pages, your executable will likely still function normally,\n  but the text segment will remain readable.\n\n* `--exclude-libs`=_libraries_ ...:\n  Mark all symbols in the given _libraries_ hidden.\n\n* `--export-dynamic-symbol`=_symbol_:\n  Put symbols matching _symbol_ in the dynamic symbol table. _symbol_ may be a\n  glob pattern in the same syntax as for the `--export-dynamic-symbol-list` or\n  `--version-script` options.\n\n* `--export-dynamic-symbol-list`=_file_:\n  Read a list of dynamic symbols from _file_.\n\n* `--fatal-warnings`, `--no-fatal-warnings`:\n  Treat warnings as errors.\n\n* `--fini`=_symbol_:\n  Call _symbol_ at unload-time.\n\n* `--gc-sections`, `--no-gc-sections`:\n  Remove unreferenced sections.\n\n* `--gdb-index`:\n  Create a `.gdb_index` section to speed up GNU debugger. To use this, you\n  need to compile source files with the `-ggnu-pubnames` compiler flag.\n\n* `--hash-style`=[ `sysv` | `gnu` | `both` | `none` ]:\n  Set hash style.\n\n* `--icf`=[ `safe` | `all` | `none` ], `--no-icf`:\n  It is not uncommon for a program to contain many identical functions that\n  differ only in name. For example, a C++ template `std::vector` is very\n  likely to be instantiated to the identical code for `std::vector<int>` and\n  `std::vector<unsigned>` because the container cares only about the size of\n  the parameter type. Identical Code Folding (ICF) is a size optimization to\n  identify and merge such identical functions.\n\n  If `--icf=all` is given, `mold` tries to merge all identical functions. This\n  reduces the size of the output most, but it is not a \"safe\" optimization. It\n  is guaranteed in C and C++ that two pointers pointing two different\n  functions will never be equal, but `--icf=all` breaks that assumption as two\n  identical functions have the same address after merging. So a care must be\n  taken when you use this flag that your program does not depend on the\n  function pointer uniqueness.\n\n  `--icf=safe` is a flag to merge functions only when it is safe to do so.\n  That is, if a program does not take an address of a function, it is safe to\n  merge that function with other function, as you cannot compare a function\n  pointer with something else without taking an address of a function.\n\n  `--icf=safe` needs to be used with a compiler that supports `.llvm_addrsig`\n  section which contains the information as to what symbols are address-taken.\n  LLVM/Clang supports that section by default. Since GCC does not support it\n  yet, you cannot use `--icf=safe` with GCC (it doesn't do any harm but can't\n  optimize at all.)\n\n  `--icf=none` and `--no-icf` disables ICF.\n\n* `--ignore-data-address-equality`:\n  Make ICF to merge not only functions but also data. This option should be\n  used in combination with `--icf=all`.\n\n* `--image-base`=_addr_:\n  Set the base address to _addr_.\n\n* `--init`=_symbol_:\n  Call _symbol_ at load-time.\n\n* `--no-undefined`:\n  Report undefined symbols (even with `--shared`).\n\n* `--noinhibit-exec`:\n  Create an output file even if errors occur.\n\n* `--package-metadata`=_percent-encoded-string_:\n  Embed a specified string into the `.note.package` section. This option\n  is designed for build scripts that generate binary packages, such as\n  `.rpm` or `.deb`, to include package metadata in each executable. It\n  simplifies the process of identifying the corresponding package for a\n  given executable or core file.\n\n  An argument to this option is treated as percent-encoded and decoded\n  before being inserted into the section, allowing you to avoid the use of\n  the comma (`,`) character in the argument. This is useful because the\n  compiler replaces all occurrences of commas in `-Wl,` with spaces before\n  forwarding them to the linker. Note that `mold` always interprets the\n  argument as percent-encoded, so you also need to escape all occurrences\n  of `%` as `%25`.\n\n* `--pack-dyn-relocs`=[ `relr` | `none` ]:\n  If `relr` is specified, all `R_*_RELATIVE` relocations are put into\n  `.relr.dyn` section instead of `.rel.dyn` or `.rela.dyn` section. Since\n  `.relr.dyn` section uses a space-efficient encoding scheme, specifying this\n  flag can reduce the size of the output. This is typically most effective for\n  position-independent executable.\n\n  Note that a runtime loader has to support `.relr.dyn` to run executables or\n  shared libraries linked with `--pack-dyn-relocs=relr`. As of 2022, only\n  ChromeOS, Android and Fuchsia support it.\n\n* `--pie`, `--pic-executable`, `--no-pie`, `--no-pic-executable`:\n  Create a position-independent executable.\n\n* `--print-gc-sections`, `--no-print-gc-sections`:\n  Print removed unreferenced sections.\n\n* `--print-icf-sections`, `--no-print-icf-sections`:\n  Print folded identical sections.\n\n* `--push-state`, `--pop-state`:\n  `--push-state` saves the current values of `--as-needed`, `--whole-archive`,\n  `--static`, and `--start-lib`. The saved values can be restored by\n  pop-state.\n\n  `--push-state` and `--pop-state` pairs can nest.\n\n  These options are useful when you want to construct linker command line\n  options programmatically. For example, if you want to link `libfoo.so` by\n  as-needed basis but don't want to change the global state of `--as-needed`,\n  you can append `--push-state --as-needed -lfoo --pop-state` to the linker\n  command line options.\n\n* `--relax, --no-relax`:\n  Rewrite machine instructions with more efficient ones for some relocations.\n  The feature is enabled by default.\n\n* `--require-defined`=_symbol_:\n  Like `--undefined`, except the new symbol must be defined by the end of the\n  link.\n\n* `--retain-symbols-file`=_file_:\n  Keep only symbols listed in _file_. _file_ is a text file containing a\n  symbol name on each line. `mold` discards all local symbols as well as\n  global symbol that are not in _file_. Note that this option removes symbols\n  only from `.symtab` section and does not affect `.dynsym` section, which is\n  used for dynamic linking.\n\n* `--rpath`=_dir_:\n  Add _dir_ to runtime search paths.\n\n* `--section-start`=_section_=_address_:\n  Set _address_ to section. _address_ is a hexadecimal number that may start\n  with an optional `0x`.\n\n* `--shared`, `--Bshareable`:\n  Create a share library.\n\n* `--spare-dynamic-tags`=_number_:\n  Append the given number of `DT_NULL` entries to the end of the `.dynamic`\n  section, so that post-link processing tools can easily add new dynamic tags\n  by overwriting the null entries.\n\n* `--start-lib`, `--end-lib`:\n  Handle object files between `--start-lib` and `--end-lib` as if they were in\n  an archive file. That means object files between them are linked only when\n  they are needed to resolve undefined symbols. The options are useful if you\n  want to link object files only when they are needed but want to avoid the\n  overhead of running ar(3).\n\n* `--static`:\n  Do not link against shared libraries.\n\n* `--sysroot`=_dir_:\n  Set target system root directory to _dir_.\n\n* `--trace`:\n  Print name of each input file.\n\n* `--undefined-glob`=_pattern_:\n  Synonym for `--undefined`, except that `--undefined-glob` takes a glob\n  pattern instead of just a single symbol name.\n\n* `--undefined-version`, `--no-undefined-version`:\n  By default, `mold` warns on a symbol specified by a version script or by\n  `--export-dynamic-symbol` if it is not defined. You can silence the warning\n  by `--undefined-version`.\n\n* `--unique`=_pattern_:\n  Don't merge input sections that match the given glob pattern _pattern_.\n\n* `--unresolved-symbols`=[ `report-all` | `ignore-all` | `ignore-in-object-files` | `ignore-in-shared-libs` ]:\n  How to handle undefined symbols.\n\n* `--version-script`=_file_:\n  Read version script from _file_. If _file_ does not exist in the current\n  directory, it is searched from library search paths for the sake of\n  compatibility with GNU ld.\n\n* `--warn-common`, `--no-warn-common`:\n  Warn about common symbols.\n\n* `--warn-once`:\n  Only warn once for each undefined symbol instead of warn for each relocation\n  referring an undefined symbol.\n\n* `--warn-unresolved-symbols`, `--error-unresolved-symbols`:\n  Normally, the linker reports an error for unresolved symbols.\n  `--warn-unresolved-symbols` option turns it into a warning.\n  `--error-unresolved-symbols` option restores the default behavior.\n\n* `--whole-archive`, `--no-whole-archive`:\n  When archive files (`.a` files) are given to the linker, only object files\n  that are needed to resolve undefined symbols are extracted from them and\n  linked to an output file. `--whole-archive` changes that behavior for\n  subsequent archives so that the linker extracts all object files and links\n  them to an output. For example, if you are creating a shared object file and\n  you want to include all archive members to the output, you should pass\n  `--whole-archive`. `--no-whole-archive` restores the default behavior for\n  subsequent archives.\n\n* `--wrap`=_symbol_:\n  Make _symbol_ be resolved to `__wrap_`_symbol_. The original symbol can be\n  resolved as `__real_`_symbol_. This option is typically used for wrapping an\n  existing function.\n\n* `-z cet-report`=[ `warning` | `error` | `none` ]:\n  Intel Control-flow Enforcement Technology (CET) is a new x86 feature\n  available since Tiger Lake which is released in 2020. It defines new\n  instructions to harden security to protect programs from control hijacking\n  attacks. You can tell the compiler to use the feature by specifying the\n  `-fcf-protection` flag.\n\n  `-z cet-report` flag is used to make sure that all object files were\n  compiled with a correct `-fcf-protection` flag. If `warning` or `error` are\n  given, `mold` prints out a warning or an error message if an object file was\n  not compiled with the compiler flag.\n\n  `mold` looks for `GNU_PROPERTY_X86_FEATURE_1_IBT` bit and\n  `GNU_PROPERTY_X86_FEATURE_1_SHSTK` bit in `.note.gnu.property` section to\n  determine whether or not an object file was compiled with `-fcf-protection`.\n\n* `-z now`, `-z lazy`:\n  By default, functions referring to other ELF modules are resolved by the\n  dynamic linker when they are called for the first time. `-z now` marks an\n  executable or a shared library file so that all dynamic symbols are resolved\n  when a file is loaded to memory. `-z lazy` restores the default behavior.\n\n* `-z origin`:\n  Mark object requiring immediate `$ORIGIN` processing at runtime.\n\n* `-z ibt`:\n  Turn on `GNU_PROPERTY_X86_FEATURE_1_IBT` bit in `.note.gnu.property` section\n  to indicate that the output uses IBT-enabled PLT. This option implies `-z\n  ibtplt`.\n\n* `-z ibtplt`:\n  Generate Intel Branch Tracking (IBT)-enabled PLT which is the default on\n  x86-64. This is the default.\n\n* `-z execstack`, `-z noexecstack`:\n  By default, the pages for the stack area (i.e. the pages where local\n  variables reside) are not executable for security reasons. `-z execstack`\n  makes it executable. `-z noexecstack` restores the default behavior.\n\n* `-z keep-text-section-prefix`, `-z nokeep-text-section-prefix`:\n  Keep `.text.hot`, `.text.unknown`, `.text.unlikely`, `.text.startup`, and\n  `.text.exit` as separate sections in the final binary instead of merging\n  them as `.text`.\n\n* `-z rodynamic`:\n  Make the `.dynamic` section read-only.\n\n* `-z relro`, `-z norelro`:\n  Some sections such as `.dynamic` have to be writable only during a module is\n  being loaded to memory. Once the dynamic linker finishes its job, such\n  sections won't be mutated by anyone. As a security mitigation, it is\n  preferred to make such segments read-only during program execution.\n\n  `-z relro` puts such sections into a special segment called `relro`. The\n  dynamic linker makes a relro segment read-only after it finishes its job.\n\n  By default, `mold` generates a relro segment. `-z norelro` disables the\n  feature.\n\n* `-z sectionheader`, `-z nosectionheader`:\n  `-z nosectionheader` tell the linker to omit the section header.\n  By default, the linker does not omit the section header.\n\n* `-z separate-loadable-segments`, `-z separate-code`, `-z noseparate-code`:\n  If one memory page contains multiple segments, the page protection bits are\n  set in such a way that the needed attributes (writable or executable) are\n  satisfied for all segments. This usually happens at a boundary of two\n  segments with two different attributes.\n\n  `separate-loadable-segments` adds paddings between segments with different\n  attributes so that they do not share the same page.\n\n  `separate-code` adds paddings only between executable and non-executable\n  segments. This is the default.\n\n  `noseparate-code` does not add any paddings between segments.\n\n* `-z defs`, `-z nodefs`:\n  Report undefined symbols (even with `--shared`).\n\n* `-z shstk`:\n  Enforce shadow stack by turning `GNU_PROPERTY_X86_FEATURE_1_SHSTK` bit in\n  `.note.gnu.property` output section. Shadow stack is part of Intel\n  Control-flow Enforcement Technology (CET), which is available since Tiger\n  Lake (2020).\n\n* `-z start_stop_visibility`=[ `hidden` | `protected` ]:\n  If a section name is valid as a C identifier (i.e., it matches\n  `/^[_a-zA-Z][_a-zA-Z0-9]*$/`), mold creates `__start_SECNAME` and\n  `__stop_SECNAME` symbols to mark the beginning and end of the section,\n  where `SECNAME` is the section name.\n\n  You can make these marker symbols visible from other ELF modules by passing\n  `-z start_stop_visibility=protected`. Default is `hidden`.\n\n* `-z text`, `-z notext`, `-z textoff`:\n  `mold` by default reports an error if dynamic relocations are created in\n  read-only sections. If `-z notext` or `-z textoff` are given, `mold` creates\n  such dynamic relocations without reporting an error. `-z text` restores the\n  default behavior.\n\n* `-z max-page-size`=_number_:\n  Some CPU ISAs support multiple memory page sizes. This option specifies the\n  maximum page size that an output binary can run on. In general, binaries\n  built for a larger page size can run on a system with a smaller page size,\n  but not vice versa. The default value is 4 KiB for i386, x86-64, and RISC-V,\n  and 64 KiB for ARM64.\n\n* `-z nodefaultlib`:\n  Make the dynamic loader ignore default search paths.\n\n* `-z nodelete`:\n  Mark DSO non-deletable at runtime.\n\n* `-z nodlopen`:\n  Mark DSO not available to dlopen(3). This option makes it possible for the\n  linker to optimize thread-local variable accesses by rewriting instructions\n  for some targets.\n\n* `-z nodump`:\n  Mark DSO not available to dldump(3).\n\n* `-z nocopyreloc`:\n  Do not create copy relocations.\n\n* `-z initfirst`:\n  Mark DSO to be initialized first at runtime.\n\n* `-z interpose`:\n  Mark object to interpose all DSOs but executable.\n\n* `-(`, `-)`, `-EL`, `-O`_number_, `--dc`, `--dp`, `--end-group`, `--no-add-needed`, `--no-copy-dt-needed-entries`, `--nostdlib`, `--rpath-link=Ar dir`, `--sort-common`, `--sort-section`, `--start-group`, `--warn-constructors`, `--warn-once`, `--fix-cortex-a53-835769`, `--fix-cortex-a53-843419`, `-z combreloc`, `-z common-page-size`, `-z nocombreloc`:\n  Ignored\n\n## ENVIRONMENT VARIABLES\n\n* `MOLD_JOBS`:\n  If this variable is set to `1`, only one `mold` process will run at a time.\n  If a new mold process is initiated while another is already active, the new\n  process will wait until the active one completes before starting.\n\n  The primary reason for this environment variable is to minimize peak memory\n  usage. Since mold is designed to operate with high parallelism, running\n  multiple mold instances simultaneously may not be beneficial. If you execute\n  N instances of mold concurrently, it could require N times the time and N\n  times the memory. On the other hand, running them one after the other might\n  still take N times longer, but the peak memory usage would be the same as\n  running just a single instance.\n\n  If your build system invokes multiple linker processes simultaneously and\n  some of them often get killed due to out-of-memory errors, you might\n  consider setting this environment variable to `1` to see if it addresses the\n  OOM issue.\n\n  Currently, any value other than `1` is silently ignored.\n\n* `MOLD_DEBUG`:\n  If this variable is set to a non-empty string, `mold` embeds its\n  command-line options in the output file's `.comment` section.\n\n* `MOLD_REPRO`:\n  Setting this variable to a non-empty string has the same effect as passing\n  the `--repro` option.\n\n## SEE ALSO\n\ngold(1), ld(1), elf(5), ld.so(8)\n\n## AUTHOR\n\nRui Ueyama <ruiu@cs.stanford.edu>\n\n## BUGS\n\nReport bugs to <https://github.com/rui314/mold/issues>.\n"
  },
  {
    "path": "install-build-deps.sh",
    "content": "#!/bin/sh\n# This script installs binary packages needed to build mold.\n# Feel free to send me a PR if your OS is not on this list.\n\nset -e\n. /etc/os-release\n\nset -x\n\ncase \"$ID\" in\nubuntu | pop | linuxmint | debian | raspbian | neon | zorin)\n  apt-get update\n  apt-get install -y cmake gcc g++ clang gdb\n  ;;\nfedora | fedora-* | amzn | rhel | centos)\n  dnf install -y gcc-c++ cmake glibc-static libstdc++-static diffutils util-linux tar\n  ;;\nrocky | ol)\n  dnf install -y gcc-c++ cmake diffutils util-linux\n  ;;\nopensuse-*)\n  zypper install -y make cmake gcc-c++ glibc-devel-static tar diffutils util-linux\n  ;;\ngentoo)\n  emerge-webrsync\n  FEATURES='getbinpkg binpkg-request-signature' emerge dev-build/cmake\n  ;;\narch | archarm | artix | endeavouros | manjaro | cachyos)\n  pacman -Sy --needed --noconfirm base-devel cmake util-linux\n  ;;\nvoid)\n  xbps-install -Sy xbps bash make cmake gcc tar diffutils util-linux\n  ;;\nalpine)\n  apk update\n  apk add bash make linux-headers cmake gcc g++\n  ;;\nclear-linux-os)\n  swupd update\n  swupd bundle-add c-basic diffutils\n  ;;\nalmalinux)\n  dnf install -y gcc-toolset-13-gcc-c++ gcc-toolset-13-libstdc++-devel cmake diffutils\n  ;;\naltlinux)\n  apt-get update\n  apt-get install -y gcc-c++ make cmake ctest diffutils util-linux\n  ;;\nfreebsd)\n  pkg update\n  pkg install -y cmake bash binutils gcc\n  ;;\n*)\n  echo \"Error: don't know anything about build dependencies on $ID-$VERSION_ID\"\n  exit 1\nesac\n"
  },
  {
    "path": "install-cross-tools.sh",
    "content": "#!/bin/bash\nset -e\n. /etc/os-release\n\nset -x\n\n# This script install packages for -DMOLD_ENABLE_QEMU_TESTS=1\n# to enable cross-target tests.\n#\n# Feel free to send me a PR if your OS is not on this list.\n\ncase \"$ID\" in\nubuntu | pop | linuxmint | debian | raspbian)\n  apt-get install -y qemu-user {gcc,g++}-{i686,aarch64,riscv64,powerpc,powerpc64,powerpc64le,s390x,sparc64,m68k,sh4}-linux-gnu {gcc,g++}-arm-linux-gnueabihf\n  ;;\n*)\n  echo \"Error: don't know anything about build dependencies on $ID-$VERSION_ID\"\n  exit 1\nesac\n"
  },
  {
    "path": "lib/aho-corasick.cc",
    "content": "// This file implements the Aho-Corasick algorithm to search multiple\n// strings within an input string simultaneously. It is essentially a\n// trie with additional links. For details, see\n// https://en.wikipedia.org/wiki/Aho-Corasick_algorithm.\n//\n// We use it for simple glob patterns in version scripts or dynamic\n// list files. Here are some examples of glob patterns:\n//\n//    qt_private_api_tag*\n//    *16QAccessibleCache*\n//    *32QAbstractFileIconProviderPrivate*\n//    *17QPixmapIconEngine*\n//\n// Aho-Corasick can do only substring search, so it cannot handle\n// complex glob patterns such as `*foo*bar*`. We handle such patterns\n// with the Glob class.\n\n#include \"lib.h\"\n\n#include <queue>\n\nnamespace mold {\n\nbool AhoCorasick::can_handle(std::string_view pat) {\n  if (pat.starts_with('*'))\n    pat.remove_prefix(1);\n  if (pat.ends_with('*'))\n    pat.remove_suffix(1);\n  return pat.find_first_of(\"*?[\") == pat.npos;\n}\n\ni64 AhoCorasick::find(std::string_view str) {\n  if (nodes.empty())\n    return -1;\n\n  i64 idx = 0;\n  i64 val = -1;\n\n  auto walk = [&](u8 c) {\n    for (i64 j = idx; j != -1; j = nodes[j].suffix_link) {\n      i64 child = nodes[j].children[c];\n      if (child != -1) {\n        idx = child;\n        val = std::max(val, nodes[child].value);\n        return;\n      }\n    }\n    idx = 0;\n  };\n\n  walk('\\0');\n  for (u8 c : str)\n    walk(c);\n  walk('\\0');\n  return val;\n}\n\nbool AhoCorasick::add(std::string_view pat, i64 val) {\n  assert(can_handle(pat));\n  if (nodes.empty())\n    nodes.resize(1);\n  i64 idx = 0;\n\n  auto walk = [&](u8 c) {\n    if (nodes[idx].children[c] == -1) {\n      nodes[idx].children[c] = nodes.size();\n      nodes.resize(nodes.size() + 1);\n    }\n    idx = nodes[idx].children[c];\n  };\n\n  // We handle \"foo\" as if \"\\0foo\\0\", \"*foo\" as if \"foo\\0\", \"foo*\" as\n  // if \"\\0foo\", and \"*foo*\" as if \"foo\". Aho-Corasick can do only\n  // substring matching, so we use \\0 as a beginning/end-of-string\n  // markers.\n  if (!pat.starts_with('*'))\n    walk('\\0');\n  for (u8 c : pat)\n    if (c != '*')\n      walk(c);\n  if (!pat.ends_with('*'))\n    walk('\\0');\n\n  nodes[idx].value = std::max(nodes[idx].value, val);\n  return true;\n}\n\nvoid AhoCorasick::compile() {\n  if (nodes.empty())\n    return;\n  fix_suffix_links(0);\n  fix_values();\n}\n\nvoid AhoCorasick::fix_suffix_links(i64 idx) {\n  for (i64 i = 0; i < 256; i++) {\n    i64 child = nodes[idx].children[i];\n    if (child == -1)\n      continue;\n\n    i64 j = nodes[idx].suffix_link;\n    for (; j != -1; j = nodes[j].suffix_link) {\n      if (nodes[j].children[i] != -1) {\n        nodes[child].suffix_link = j;\n        break;\n      }\n    }\n    if (j == -1)\n      nodes[child].suffix_link = 0;\n    fix_suffix_links(child);\n  }\n}\n\nvoid AhoCorasick::fix_values() {\n  std::queue<i64> queue;\n  queue.push(0);\n\n  do {\n    i64 idx = queue.front();\n    queue.pop();\n\n    for (i64 child : nodes[idx].children) {\n      if (child != -1) {\n        i64 suffix = nodes[child].suffix_link;\n        nodes[child].value = std::max(nodes[child].value, nodes[suffix].value);\n        queue.push(child);\n      }\n    }\n  } while (!queue.empty());\n}\n\n} // namespace mold\n"
  },
  {
    "path": "lib/atomics.h",
    "content": "// This is the same as std::atomic except that the default memory\n// order is relaxed instead of sequential consistency.\n\n#pragma once\n\n#include <atomic>\n\nnamespace mold {\n\ntemplate <typename T>\nstruct Atomic : std::atomic<T> {\n  static constexpr std::memory_order relaxed = std::memory_order_relaxed;\n\n  using std::atomic<T>::atomic;\n\n  Atomic(const Atomic<T> &other) : std::atomic<T>(other.load()) {}\n\n  Atomic<T> &operator=(const Atomic<T> &other) {\n    store(other.load());\n    return *this;\n  }\n\n  void operator=(T val) { store(val); }\n  operator T() const { return load(); }\n\n  void store(T val, std::memory_order order = relaxed) {\n    std::atomic<T>::store(val, order);\n  }\n\n  T load(std::memory_order order = relaxed) const {\n    return std::atomic<T>::load(order);\n  }\n\n  T exchange(T val) { return std::atomic<T>::exchange(val, relaxed); }\n  T operator|=(T val) { return std::atomic<T>::fetch_or(val, relaxed); }\n  T operator++() { return std::atomic<T>::fetch_add(1, relaxed) + 1; }\n  T operator--() { return std::atomic<T>::fetch_sub(1, relaxed) - 1; }\n  T operator++(int) { return std::atomic<T>::fetch_add(1, relaxed); }\n  T operator--(int) { return std::atomic<T>::fetch_sub(1, relaxed); }\n\n  bool test_and_set() {\n    // A relaxed load + branch (assuming miss) takes only around 20 cycles,\n    // while an atomic RMW can easily take hundreds on x86. We note that it's\n    // common that another thread beat us in marking, so doing an optimistic\n    // early test tends to improve performance in the ~20% ballpark.\n    return load() || exchange(true);\n  }\n};\n\n} // namespace mold\n"
  },
  {
    "path": "lib/bitvector.h",
    "content": "#pragma once\n\n#include \"integers.h\"\n\n#include <cassert>\n#include <vector>\n\nnamespace mold {\n\nclass BitvectorProxy {\npublic:\n  BitvectorProxy(u64 &word, size_t pos)\n    : word(word), mask(1ULL << pos) {}\n\n  BitvectorProxy &operator=(bool val) {\n    if (val)\n      word |= mask;\n    else\n      word &= ~mask;\n    return *this;\n  }\n\n  BitvectorProxy &operator=(const BitvectorProxy &other) {\n    return *this = (bool)other;\n  }\n\n  operator bool() const {\n    return word & mask;\n  }\n\nprivate:\n  u64 &word;\n  u64 mask;\n};\n\nclass Bitvector {\npublic:\n  Bitvector() = default;\n  Bitvector(i64 n) : size(n), words((n + 63) / 64) {}\n\n  void resize(i64 n) {\n    words.clear();\n    words.resize((n + 63) / 64);\n    size = n;\n  }\n\n  Bitvector &operator|=(const Bitvector &x) {\n    assert(size == x.size);\n    for (i64 i = 0; i < words.size(); i++)\n      words[i] |= x.words[i];\n    return *this;\n  }\n\n  Bitvector &operator&=(const Bitvector &x) {\n    assert(size == x.size);\n    for (i64 i = 0; i < words.size(); i++)\n      words[i] &= x.words[i];\n    return *this;\n  }\n\n  Bitvector &operator<<=(size_t n) {\n    assert(n == 1);\n    for (i64 i = words.size() - 1; i > 0; i--)\n      words[i] = (words[i] << 1) | (words[i - 1] >> 63);\n    words[0] <<= 1;\n    return *this;\n  }\n\n  BitvectorProxy operator[](size_t pos) {\n    assert(pos < size);\n    return {words[pos / 64], pos % 64};\n  }\n\n  i64 size = 0;\n  std::vector<u64> words;\n};\n\n} // namespace mold\n"
  },
  {
    "path": "lib/compress.cc",
    "content": "// This file implements a multi-threaded zlib and zstd compression\n// routine.\n//\n// zlib-compressed data can be merged just by concatenation as long as\n// each piece of data is flushed with Z_SYNC_FLUSH. In this file, we\n// split input data into multiple shards, compress them individually\n// and concatenate them. We then append a header, a trailer and a\n// checksum so that the concatenated data is valid zlib-format data.\n//\n// zstd-compressed data can be merged in the same way.\n//\n// Using threads to compress data has a downside. Since the dictionary\n// is reset on boundaries of shards, compression ratio is sacrificed\n// a little bit. However, if a shard size is large enough, that loss\n// is negligible in practice.\n\n#include \"lib.h\"\n\n#include <tbb/parallel_for_each.h>\n#include <zlib.h>\n#include <zstd.h>\n\n#define CHECK(fn)                               \\\n  do {                                          \\\n    [[maybe_unused]] int r = (fn);              \\\n    assert(r == Z_OK);                          \\\n  } while (0)\n\nnamespace mold {\n\nstatic constexpr i64 SHARD_SIZE = 1024 * 1024;\n\nCompressor::~Compressor() {\n  for (std::span<u8> shard : shards)\n    delete[] shard.data();\n}\n\nstatic std::vector<std::span<u8>> split(std::span<u8> input) {\n  std::vector<std::span<u8>> vec;\n  while (!input.empty()) {\n    i64 sz = std::min<i64>(SHARD_SIZE, input.size());\n    vec.push_back(input.subspan(0, sz));\n    input = input.subspan(sz);\n  }\n  return vec;\n}\n\nstatic std::span<u8> zlib_compress(std::span<u8> input) {\n  // Initialize zlib stream. Since debug info is generally compressed\n  // pretty well with lower compression levels, we chose compression\n  // level 1.\n  z_stream strm = {};\n  CHECK(deflateInit2(&strm, 1, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY));\n\n  // Set an input buffer\n  strm.avail_in = input.size();\n  strm.next_in = input.data();\n\n  // Set an output buffer. deflateBound() returns an upper bound\n  // on the compression size. +16 for Z_SYNC_FLUSH.\n  i64 bufsize = deflateBound(&strm, strm.avail_in) + 16;\n  u8 *buf = new u8[bufsize];\n\n  // Compress data. It writes all compressed bytes except the last\n  // partial byte, so up to 7 bits can be held to be written to the\n  // buffer.\n  strm.avail_out = bufsize;\n  strm.next_out = buf;\n  CHECK(deflate(&strm, Z_BLOCK));\n\n  // This is a workaround for libbacktrace before 2022-04-06.\n  //\n  // Zlib is a bit stream, and what Z_SYNC_FLUSH does is to write a\n  // three bit value indicating the start of an uncompressed data\n  // block followed by four byte data 00 00 ff ff which indicates that\n  // the length of the block is zero. libbacktrace uses its own zlib\n  // inflate routine, and it had a bug that if that particular three\n  // bit value happens to end at a byte boundary, it accidentally\n  // skipped the next byte.\n  //\n  // In order to avoid triggering that bug, we should avoid calling\n  // deflate() with Z_SYNC_FLUSH if the current bit position is 5.\n  // If it's 5, we insert an empty block consisting of 10 bits so\n  // that the bit position is 7 in the next byte.\n  //\n  // https://github.com/ianlancetaylor/libbacktrace/pull/87\n  int nbits = 0;\n  deflatePending(&strm, Z_NULL, &nbits);\n  if (nbits == 5)\n    CHECK(deflatePrime(&strm, 10, 2));\n  CHECK(deflate(&strm, Z_SYNC_FLUSH));\n\n  deflateEnd(&strm);\n  return {buf, (size_t)(bufsize - strm.avail_out)};\n}\n\nZlibCompressor::ZlibCompressor(u8 *buf, i64 size) {\n  std::vector<std::span<u8>> inputs = split(std::span(buf, size));\n  std::vector<u32> adlers(inputs.size());\n  shards.resize(inputs.size());\n\n  // Compress each shard\n  tbb::parallel_for((i64)0, (i64)inputs.size(), [&](i64 i) {\n    std::span<u8> in = inputs[i];\n    adlers[i] = adler32(1, in.data(), in.size());\n    shards[i] = zlib_compress(in);\n  });\n\n  // Combine checksums\n  checksum = adlers[0];\n  for (i64 i = 1; i < inputs.size(); i++)\n    checksum = adler32_combine(checksum, adlers[i], inputs[i].size());\n\n  // Comput the total size\n  compressed_size = 8; // the header and the trailer\n  for (std::span<u8> &shard : shards)\n    compressed_size += shard.size();\n}\n\nvoid ZlibCompressor::write_to(u8 *buf) {\n  // Write a zlib-format header\n  buf[0] = 0x78;\n  buf[1] = 0x9c;\n\n  // Copy compressed data\n  std::vector<i64> offsets(shards.size());\n  offsets[0] = 2; // +2 for the header\n  for (i64 i = 1; i < shards.size(); i++)\n    offsets[i] = offsets[i - 1] + shards[i - 1].size();\n\n  tbb::parallel_for((i64)0, (i64)shards.size(), [&](i64 i) {\n    memcpy(buf + offsets[i], shards[i].data(), shards[i].size());\n  });\n\n  // Write a trailer\n  u8 *end = buf + compressed_size;\n  end[-6] = 3;\n  end[-5] = 0;\n  *(ub32 *)(end - 4) = checksum;\n}\n\nstatic std::span<u8> zstd_compress(std::span<u8> input) {\n  i64 bufsize = ZSTD_COMPRESSBOUND(input.size());\n  u8 *buf = new u8[bufsize];\n  int level = 3; // compression level; must be between 1 to 22\n  size_t sz = ZSTD_compress(buf, bufsize, input.data(), input.size(), level);\n  assert(!ZSTD_isError(sz));\n  return {buf, sz};\n}\n\nZstdCompressor::ZstdCompressor(u8 *buf, i64 size) {\n  std::vector<std::span<u8>> inputs = split(std::span(buf, size));\n  shards.resize(inputs.size());\n\n  // Compress each shard\n  tbb::parallel_for((i64)0, (i64)inputs.size(), [&](i64 i) {\n    shards[i] = zstd_compress(inputs[i]);\n  });\n\n  compressed_size = 0;\n  for (std::span<u8> &shard : shards)\n    compressed_size += shard.size();\n}\n\nvoid ZstdCompressor::write_to(u8 *buf) {\n  // Copy compressed data\n  std::vector<i64> offsets(shards.size());\n  for (i64 i = 1; i < shards.size(); i++)\n    offsets[i] = offsets[i - 1] + shards[i - 1].size();\n\n  tbb::parallel_for((i64)0, (i64)shards.size(), [&](i64 i) {\n    memcpy(buf + offsets[i], shards[i].data(), shards[i].size());\n  });\n}\n\n} // namespace mold\n"
  },
  {
    "path": "lib/config.h.in",
    "content": "#define MOLD_VERSION \"@mold_VERSION@\"\n#define MOLD_LIBDIR \"@CMAKE_INSTALL_FULL_LIBDIR@\"\n#define MOLD_FIRST_TARGET @MOLD_FIRST_TARGET@\n\n#cmakedefine01 HAVE_MADVISE\n#cmakedefine01 HAVE_UNAME\n#cmakedefine01 MOLD_USE_MIMALLOC\n#cmakedefine01 MOLD_USE_SYSTEM_MIMALLOC\n\n#cmakedefine01 HAVE_TARGET_X86_64\n#cmakedefine01 HAVE_TARGET_I386\n#cmakedefine01 HAVE_TARGET_ARM64LE\n#cmakedefine01 HAVE_TARGET_ARM64BE\n#cmakedefine01 HAVE_TARGET_ARM32LE\n#cmakedefine01 HAVE_TARGET_ARM32BE\n#cmakedefine01 HAVE_TARGET_RV32LE\n#cmakedefine01 HAVE_TARGET_RV32BE\n#cmakedefine01 HAVE_TARGET_RV64LE\n#cmakedefine01 HAVE_TARGET_RV64BE\n#cmakedefine01 HAVE_TARGET_PPC32\n#cmakedefine01 HAVE_TARGET_PPC64V1\n#cmakedefine01 HAVE_TARGET_PPC64V2\n#cmakedefine01 HAVE_TARGET_S390X\n#cmakedefine01 HAVE_TARGET_SPARC64\n#cmakedefine01 HAVE_TARGET_M68K\n#cmakedefine01 HAVE_TARGET_SH4LE\n#cmakedefine01 HAVE_TARGET_SH4BE\n#cmakedefine01 HAVE_TARGET_LOONGARCH64\n#cmakedefine01 HAVE_TARGET_LOONGARCH32\n"
  },
  {
    "path": "lib/crc32.cc",
    "content": "#include \"lib.h\"\n\n#include <tbb/parallel_for_each.h>\n#include <zlib.h>\n\nnamespace mold {\n\n// This function \"forges\" a CRC. That is, given the current and a desired\n// CRC32 value, crc32_solve() returns a binary blob to add to the end of\n// the original data to yield the desired CRC. Trailing garbage is ignored\n// by many bianry file formats, so you can create a file with a desired\n// CRC using crc32_solve(). We need it for --separate-debug-file.\nstd::vector<u8> crc32_solve(u32 current, u32 desired) {\n  constexpr u32 poly = 0xedb88320;\n  u32 x = ~desired;\n\n  // Each iteration computes x = (x * x^-1) mod poly.\n  for (i64 i = 0; i < 32; i++) {\n    x = std::rotl(x, 1);\n    x ^= (x & 1) * (poly << 1);\n  }\n\n  x ^= ~current;\n\n  std::vector<u8> out(4);\n  out[0] = x;\n  out[1] = x >> 8;\n  out[2] = x >> 16;\n  out[3] = x >> 24;\n  return out;\n}\n\n// Compute a CRC for given data in parallel\nu32 compute_crc32(u32 crc, u8 *buf, i64 len) {\n  struct Shard {\n    u8 *buf;\n    i64 len;\n    u32 crc;\n  };\n\n  constexpr i64 shard_size = 1024 * 1024; // 1 MiB\n  std::vector<Shard> shards;\n\n  while (len > 0) {\n    i64 sz = std::min(len, shard_size);\n    shards.push_back({buf, sz, 0});\n    buf += sz;\n    len -= sz;\n  }\n\n  tbb::parallel_for_each(shards, [](Shard &shard) {\n    shard.crc = crc32(0, shard.buf, shard.len);\n  });\n\n  for (Shard &shard : shards)\n    crc = crc32_combine(crc, shard.crc, shard.len);\n  return crc;\n}\n\n} // namespace mold\n"
  },
  {
    "path": "lib/demangle.cc",
    "content": "#include \"lib.h\"\n\n#include <cstdlib>\n\n#ifndef _WIN32\n#include <cxxabi.h>\n#endif\n\n#include \"../third-party/rust-demangle/rust-demangle.h\"\n\nnamespace mold {\n\nstd::optional<std::string_view> demangle_cpp(std::string_view name) {\n  static thread_local char *buf;\n  static thread_local size_t buflen;\n\n  // TODO(cwasser): Actually demangle Symbols on Windows using e.g.\n  // `UnDecorateSymbolName` from Dbghelp, maybe even Itanium symbols?\n#ifndef _WIN32\n  if (name.starts_with(\"_Z\")) {\n    int status;\n    char *p = abi::__cxa_demangle(std::string(name).c_str(), buf, &buflen, &status);\n    if (status == 0) {\n      buf = p;\n      return p;\n    }\n  }\n#endif\n\n  return {};\n}\n\nstd::optional<std::string_view> demangle_rust(std::string_view name) {\n  static thread_local char *buf;\n  free(buf);\n  buf = rust_demangle(std::string(name).c_str(), 0);\n  if (buf)\n    return buf;\n  return {};\n}\n\n} // namespace mold\n"
  },
  {
    "path": "lib/filepath.cc",
    "content": "#include \"lib.h\"\n\n#include <filesystem>\n#include <sys/stat.h>\n\n#ifdef __APPLE__\n# include <mach-o/dyld.h>\n#endif\n\n#ifdef __FreeBSD__\n# include <sys/sysctl.h>\n#endif\n\nnamespace mold {\n\n// Returns the path of the mold executable itself\nstd::string get_self_path() {\n#if __APPLE__ || _WIN32\n  fprintf(stderr, \"mold: get_self_path is not supported\");\n  exit(1);\n#elif __FreeBSD__\n  // /proc may not be mounted on FreeBSD. The proper way to get the\n  // current executable's path is to use sysctl(2).\n  int mib[4];\n  mib[0] = CTL_KERN;\n  mib[1] = KERN_PROC;\n  mib[2] = KERN_PROC_PATHNAME;\n  mib[3] = -1;\n\n  size_t size;\n  sysctl(mib, 4, NULL, &size, NULL, 0);\n\n  std::string path;\n  path.resize(size);\n  sysctl(mib, 4, path.data(), &size, NULL, 0);\n  return path;\n#else\n  return std::filesystem::read_symlink(\"/proc/self/exe\").string();\n#endif\n}\n\n} // namespace mold\n"
  },
  {
    "path": "lib/gentoo-test.sh",
    "content": "#!/bin/bash\n#\n# This test script takes a Gentoo package name and tries to build it\n# using mold in a Podman environment. We chose Gentoo Linux as a test\n# target, because its source-based package allows us to build programs\n# locally and run their test suites without any hassle.\n#\n# You can get a complete list of Gentoo packages availalbe for testing\n# with the following command:\n#\n# podman run --rm mold-gentoo emerge --color n -s '' | \\\n#   perl -ne 'next unless m!^\\*\\s+(\\S+/\\S+)!; print \"$1\\n\"'\n\npackage=\"$1\"\n\nif [ \"$package\" = \"\" ]; then\n  echo \"Usage: $0 gentoo-package-name\"\n  exit 1\nfi\n\nset -x\n\n# Create a Podman image\nif ! podman image ls mold-gentoo | grep -q mold-gentoo; then\n  set -e\n  cat <<EOF | podman build -t mold-gentoo -\nFROM docker.io/gentoo/stage3\nRUN emerge-webrsync\nRUN echo 'USE=\"X ssl elogind -systemd corefonts truetype jpeg jpeg2k tiff zstd static-libs binary -perl\"' >> /etc/portage/make.conf && \\\n    echo 'ACCEPT_KEYWORDS=\"~amd64\"' >> /etc/portage/make.conf && \\\n    echo 'ACCEPT_LICENSE=\"* -@EULA\"' >> /etc/portage/make.conf && \\\n    echo 'FEATURES=\"\\${FEATURE} noclean nostrip ccache -ipc-sandbox -network-sandbox -pid-sandbox -sandbox\"' >> /etc/portage/make.conf && \\\n    echo 'CCACHE_DIR=\"/ccache\"' >> /etc/portage/make.conf && \\\n    FEATURES='getbinpkg binpkg-request-signature' emerge gdb lld llvm-core/clang vim emacs strace ccache xeyes dev-build/cmake dev-vcs/git && \\\n    rm -rf /var/tmp/portage\nEOF\n  set +e\nfi\n\ngit_hash=$(./dist/mold --version | perl -ne '/\\((\\w+)/; print $1;')\n\nif [ \"$package\" = dev-libs/concurrencykit ]; then\n  echo \"Skipping known broken package: $package\"\n  exit 0\nfi\n\n# Build a given package in Podman\ncmd1='(cd /usr/bin; ln -sf /mold/dist/mold $(realpath ld))'\ncmd2=\"MAKEOPTS=-'j$(nproc) --load-average=100' emerge --onlydeps $package\"\ncmd3=\"MAKEOPTS='-j$(nproc) --load-average=100' FEATURES=test emerge $package\"\nfilename=`echo \"$package\" | sed 's!/!_!g'`\npodman=\"podman run --rm --pids-limit=-1 --cap-add=SYS_PTRACE -v `pwd`:/mold:ro -v /var/cache/ccache-gentoo:/ccache mold-gentoo timeout -v -k 15s 3h\"\ndir=gentoo/$git_hash\n\nmkdir -p \"$dir\"/success \"$dir\"/failure\n\n$podman chrt --idle 0 nice -n 19 bash -c \"$cmd1 && $cmd2 && $cmd3\" >& \"$dir\"/\"$filename\".mold\nif [ $? = 0 ]; then\n  mv \"$dir\"/\"$filename\".mold \"$dir\"/success\nelse\n  mv \"$dir\"/\"$filename\".mold \"$dir\"/failure\nfi\n\n$podman chrt --idle 0 nice -n 19 bash -c \"$cmd2 && $cmd3\" >& \"$dir\"/\"$filename\".ld\nif [ $? = 0 ]; then\n  mv \"$dir\"/\"$filename\".ld \"$dir\"/success\nelse\n  mv \"$dir\"/\"$filename\".ld \"$dir\"/failure\nfi\n"
  },
  {
    "path": "lib/glob.cc",
    "content": "// This file implements a glob matcher that can run multiple glob patterns\n// against an input string. mold uses the glob matcher for symbol name\n// patterns in a version script or a dynamic list file. Since we may need to\n// match hundreds of glob patterns against millions of symbol names, the\n// speed of the matcher is very important.\n//\n// The pattern match implemented in this file is NFA-based, although the\n// cost of the function is O(n*m), where n is the number of NFA states and m\n// is the length of the input string. We do not use recursion or\n// backtracking, unlike a generic NFA-based regular expression matcher. This\n// is doable because glob patterns are very limited subsets of regexes.\n//\n// Here is the explanation of the algorithm. Observe that the only \"tricky\"\n// meta-character in a glob pattern is \"*\", which matches zero or more\n// characters. Other characters and meta-characters always match a single\n// input character. So the key of the algorithm is to handle \"*\" efficiently.\n//\n// We can represent a glob pattern \"a*b*\" with three NFA states: q_start, q1\n// and q_accept, with the following transition functions:\n//\n//   δ(q_start, \"a\") = q1\n//   δ(q1, <any character>) = q1\n//   δ(q1, \"b\") = q_accept\n//   δ(q_accept, <any character>) = q_accept\n//\n// We can construct such an NFA in a straightforward manner. We maintain NFA\n// states as a list, with the initial contents being the start state. Each\n// character except for \"*\" creates a new NFA state, adds a transition from\n// the last state in the list to the new one, and appends the new state at\n// the end of the list. \"*\" sets the \"is_star\" flag on the last NFA state.\n// The flag indicates that the state machine can remain in the state for any\n// input character.\n//\n// An NFA constructed this way doesn't have any complicated loops,\n// ε-transitions, or anything like that. Each state has only one incoming\n// edge. The only loops in the state transition are the self-loops on states\n// followed by a \"*\". Aside from that, the state machine progresses linearly\n// from the start state to the accept state.\n//\n// Each state of an NFA can be represented by a single bit. If a bit is 1,\n// the non-deterministic state machine is in that state. Otherwise, it's\n// not. Observe that a state with the \"is_star\" flag will continued to be 1\n// once it becomes 1, since the state machine can loop over the state on any\n// input character.\n//\n// With that observation, we can represent an NFA with a bit vector of N\n// bits, where N is the number of NFA states. For each input character, bit\n// M becomes 1 if\n//\n//   - bit M-1 is 1 and there's a transition from state_{M-1} to state_M\n//     with the given character, or\n//   - bit M is 1 and state_M's \"is_star\" flag is 1.\n//\n// Initially, the 0th bit is 1 for the start state. At each step, the bits\n// propagate from least significant to most significant positions, at most\n// one bit at a time. If the most significant bit is 1 after the entire\n// input has been processed, the string matches.\n//\n// This propagation can be implemented with bitwise OR, bitwise AND, and a\n// one-bit bit shift on the bit vector. All these operations are very cheap.\n//\n// We can combine multiple glob matchers into a single matcher by simply\n// concatenating the bit vectors of their state machines.\n\n#include \"lib.h\"\n\n#include <cstring>\n\nnamespace mold {\n\nstatic std::vector<MultiGlob::State> parse_glob(std::string_view pat) {\n  std::vector<MultiGlob::State> vec(1);\n\n  while (!pat.empty()) {\n    u8 c = pat[0];\n    pat = pat.substr(1);\n    std::bitset<256> chars;\n\n    switch (c) {\n    case '*':\n      vec.back().is_star = true;\n      continue;\n    case '?':\n      chars.set();\n      break;\n    case '\\\\':\n      if (pat.empty())\n        return {};\n      chars[pat[0]] = true;\n      pat = pat.substr(1);\n      break;\n    case '[': {\n      // Here are a few bracket pattern examples:\n      //\n      // [abc]: a, b or c\n      // [$\\]!]: $, ] or !\n      // [a-czg-i]: a, b, c, z, g, h, or i\n      // [^a-z]: Any character except lowercase letters\n      bool negate = false;\n      bool closed = false;\n\n      if (!pat.empty() && pat[0] == '^') {\n        negate = true;\n        pat = pat.substr(1);\n      }\n\n      while (!pat.empty()) {\n        if (pat[0] == ']') {\n          pat = pat.substr(1);\n          closed = true;\n          break;\n        }\n\n        if (pat[0] == '\\\\') {\n          pat = pat.substr(1);\n          if (pat.empty())\n            return {};\n        }\n\n        if (pat.size() >= 3 && pat[1] == '-') {\n          u8 start = pat[0];\n          u8 end = pat[2];\n          pat = pat.substr(3);\n\n          if (end == '\\\\') {\n            if (pat.empty())\n              return {};\n            end = pat[0];\n            pat = pat.substr(1);\n          }\n\n          if (end < start)\n            return {};\n\n          for (i64 i = start; i <= end; i++)\n            chars[i] = true;\n        } else {\n          chars[pat[0]] = true;\n          pat = pat.substr(1);\n        }\n      }\n\n      if (!closed)\n        return {};\n\n      if (negate)\n        chars.flip();\n      break;\n    }\n    default:\n      chars[c] = true;\n      break;\n    }\n\n    vec.push_back({chars, false});\n  }\n  return vec;\n}\n\n// Instead of returning just a match/no match boolean value, our glob\n// matcher returns an integer value associated with each given pattern.\n// If multiple patterns match at the same time, the largest associated\n// value will be returned by find().\nbool MultiGlob::add(std::string_view pat, i64 val) {\n  std::vector<State> vec = parse_glob(pat);\n  if (vec.empty())\n    return false;\n  patterns.push_back({std::move(vec), val});\n  return true;\n}\n\nvoid MultiGlob::compile() {\n  if (patterns.empty())\n    return;\n\n  ranges::stable_sort(patterns, ranges::greater(), &GlobPattern::value);\n\n  std::vector<State> states;\n  for (GlobPattern &p : patterns)\n    append(states, p.states);\n  i64 sz = states.size();\n\n  start_states.resize(sz);\n  for (i64 pos = 0; GlobPattern &p : patterns) {\n    start_states[pos] = true;\n    pos += p.states.size();\n  }\n\n  star_mask.resize(sz);\n  for (i64 i = 0; i < sz; i++)\n    if (states[i].is_star)\n      star_mask[i] = true;\n\n  for (i64 i = 0; i < 256; i++) {\n    char_mask[i].resize(sz);\n    for (i64 j = 0; j < sz; j++)\n      if (states[j].incoming_edge[i])\n        char_mask[i][j] = true;\n  }\n}\n\ni64 MultiGlob::find(std::string_view str) {\n  if (patterns.empty())\n    return -1;\n\n  Bitvector bits = start_states;\n  Bitvector tmp;\n\n  for (u8 c : str) {\n    // This is equivalent to\n    //\n    //   bits = (bits & star_mask) | ((bits << 1) & char_mask[c])\n    //\n    // but we update the existing objects in place to avoid allocating\n    // temporary objects.\n    tmp = bits;\n    tmp &= star_mask;\n    bits <<= 1;\n    bits &= char_mask[c];\n    bits |= tmp;\n  }\n\n  for (i64 pos = 0; GlobPattern &p : patterns) {\n    pos += p.states.size();\n    if (bits[pos - 1])\n      return p.value;\n  }\n  return -1;\n}\n\nbool Glob::add(std::string_view pat, i64 val) {\n  assert(val >= 0);\n  assert(!is_compiled);\n\n  // If the pattern requires only a single substring search, the\n  // Aho-Corasick algorithm is even faster than our glob matcher.\n  if (aho_corasick.can_handle(pat))\n    return aho_corasick.add(pat, val);\n  return multi_glob.add(pat, val);\n}\n\ni64 Glob::find(std::string_view str) {\n  std::call_once(once, [&] {\n    multi_glob.compile();\n    aho_corasick.compile();\n    is_compiled = true;\n  });\n\n  return std::max(multi_glob.find(str), aho_corasick.find(str));\n}\n\n} // namespace mold\n"
  },
  {
    "path": "lib/hyperloglog.cc",
    "content": "// This file implements HyperLogLog algorithm, which estimates\n// the number of unique items in a given multiset.\n//\n// For more info, read\n// https://engineering.fb.com/2018/12/13/data-infrastructure/hyperloglog\n\n#include \"lib.h\"\n\n#include <cmath>\n\nnamespace mold {\n\ni64 HyperLogLog::get_cardinality() const {\n  double z = 0;\n  for (i64 val : buckets)\n    z += std::ldexp(1.0, -val);\n  return ALPHA * NBUCKETS * NBUCKETS / z;\n}\n\n} // namespace mold\n"
  },
  {
    "path": "lib/integers.h",
    "content": "// This file defines integral types for file input/output. We need to use\n// these types instead of the plain integers (such as uint32_t or int32_t)\n// when reading from/writing to an mmap'ed file area for the following\n// reasons:\n//\n// 1. mold is always a cross linker and should not depend on what host it\n//    is running on. For example, users should be able to run mold on a\n//    little-endian x86 machine to create a big-endian s390x binary.\n//\n// 2. Even though data members in all ELF data strucutres are naturally\n//    aligned, they are not guaranteed to be aligned on memory because of\n//    archive files. Archive files (.a files) align each file only to a\n//    2 byte boundary, so anything larger than 2 bytes may be misaligned\n//    in an mmap'ed memory. Misaligned access is an undefined behavior in\n//    C/C++, so we shouldn't cast an arbitrary pointer to a uint32_t, for\n//    example, to read a 32 bit value.\n//\n// The data types defined in this file are independent of the host byte\n// order and are designed to avoid unaligned access.\n//\n// Note that in C/C++, memcpy is a portable and efficient way to access\n// unaligned data, as it is typically treated as an intrinsic. Compilers\n// can easily optimize memcpy calls in this file into a single load or\n// store instruction.\n\n#pragma once\n\n#include <bit>\n#include <cstdint>\n#include <cstring>\n#include <type_traits>\n\n#if !defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)\n# if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__\n#  define __LITTLE_ENDIAN__ 1\n# elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__\n#  define __BIG_ENDIAN__ 1\n# else\n#  error \"unknown host byte order\"\n# endif\n#endif\n\nnamespace mold {\n\ntemplate <typename T, bool is_le, int size = sizeof(T)>\nclass Integer {\npublic:\n  constexpr Integer() = default;\n\n  constexpr Integer(T v) {\n    if (std::is_constant_evaluated() || size == 3) {\n      for (int i = 0; i < size; i++)\n        buf[is_le ? i : (size - i - 1)] = v >> (i * 8);\n    } else {\n      if (!is_native)\n        v = bswap(v);\n      memcpy(buf, &v, size);\n    }\n  }\n\n  operator T() const {\n    if (size == 3) {\n      if (is_le)\n        return buf[2] << 16 | buf[1] << 8 | buf[0];\n      return buf[0] << 16 | buf[1] << 8 | buf[2];\n    }\n\n    T v;\n    memcpy(&v, buf, size);\n    return is_native ? v : bswap(v);\n  }\n\n  Integer &operator=(T v)  { new (this) Integer(v); return *this; }\n  Integer &operator++()    { return *this = *this + 1; }\n  Integer operator++(int)  { auto x = *this; ++*this; return x; }\n  Integer &operator--()    { return *this = *this - 1; }\n  Integer operator--(int)  { auto x = *this; --*this; return x; }\n  Integer &operator+=(T v) { return *this = *this + v; }\n  Integer &operator-=(T v) { return *this = *this - v; }\n  Integer &operator&=(T v) { return *this = *this & v; }\n  Integer &operator|=(T v) { return *this = *this | v; }\n\nprivate:\n  static constexpr bool is_native =\n    (std::endian::native == (is_le ? std::endian::little : std::endian::big));\n\n  static T bswap(T v) {\n    switch (size) {\n    case 2: return __builtin_bswap16(v);\n    case 4: return __builtin_bswap32(v);\n    case 8: return __builtin_bswap64(v);\n    }\n    __builtin_unreachable();\n  }\n\n  uint8_t buf[size];\n};\n\nusing i8 = int8_t;\nusing i16 = int16_t;\nusing i32 = int32_t;\nusing i64 = int64_t;\n\nusing u8 = uint8_t;\nusing u16 = uint16_t;\nusing u32 = uint32_t;\nusing u64 = uint64_t;\n\nusing il16 = Integer<i16, true>;\nusing il32 = Integer<i32, true>;\nusing il64 = Integer<i64, true>;\n\nusing ul16 = Integer<u16, true>;\nusing ul24 = Integer<u32, true, 3>;\nusing ul32 = Integer<u32, true>;\nusing ul64 = Integer<u64, true>;\n\nusing ib16 = Integer<i16, false>;\nusing ib32 = Integer<i32, false>;\nusing ib64 = Integer<i64, false>;\n\nusing ub16 = Integer<u16, false>;\nusing ub24 = Integer<u32, false, 3>;\nusing ub32 = Integer<u32, false>;\nusing ub64 = Integer<u64, false>;\n\n} // namespace mold\n"
  },
  {
    "path": "lib/lib.h",
    "content": "#pragma once\n\n#include \"atomics.h\"\n#include \"integers.h\"\n#include \"bitvector.h\"\n\n#include <array>\n#include <atomic>\n#include <bit>\n#include <bitset>\n#include <cassert>\n#include <cstdio>\n#include <cstdlib>\n#include <cstring>\n#include <fcntl.h>\n#include <filesystem>\n#include <iostream>\n#include <mutex>\n#include <optional>\n#include <span>\n#include <sstream>\n#include <string>\n#include <string_view>\n#include <sys/stat.h>\n#include <sys/types.h>\n#include <tbb/concurrent_vector.h>\n#include <tbb/enumerable_thread_specific.h>\n#include <tbb/parallel_for.h>\n#include <vector>\n\n#ifdef _WIN32\n# include <io.h>\n#else\n# include <sys/mman.h>\n# include <unistd.h>\n#endif\n\n#define XXH_INLINE_ALL 1\n#include \"../third-party/xxhash/xxhash.h\"\n\n#ifdef NDEBUG\n# define unreachable() __builtin_unreachable()\n#else\n# define unreachable() assert(0 && \"unreachable\")\n#endif\n\ninline uint64_t hash_string(std::string_view str) {\n  return XXH3_64bits(str.data(), str.size());\n}\n\nclass HashCmp {\npublic:\n  static size_t hash(const std::string_view &k) {\n    return hash_string(k);\n  }\n\n  static bool equal(const std::string_view &k1, const std::string_view &k2) {\n    return k1 == k2;\n  }\n};\n\nnamespace mold {\n\nnamespace ranges = std::ranges;\nusing namespace std::literals::string_literals;\nusing namespace std::literals::string_view_literals;\n\ninline u64 combine_hash(u64 a, u64 b) {\n  return a ^ (b + 0x9e3779b9 + (a << 6) + (a >> 2));\n}\n\n//\n// perf.cc\n//\n\n// Counter is used to collect statistics numbers.\nclass Counter {\npublic:\n  Counter(std::string_view name, i64 value = 0) : name(name), values(value) {\n    static std::mutex mu;\n    std::scoped_lock lock(mu);\n    instances.push_back(this);\n  }\n\n  Counter &operator++(int) {\n    if (enabled) [[unlikely]]\n      values.local()++;\n    return *this;\n  }\n\n  Counter &operator+=(int delta) {\n    if (enabled) [[unlikely]]\n      values.local() += delta;\n    return *this;\n  }\n\n  static void print();\n\n  static inline bool enabled = false;\n\nprivate:\n  i64 get_value();\n\n  std::string_view name;\n  tbb::enumerable_thread_specific<i64> values;\n\n  static inline std::vector<Counter *> instances;\n};\n\n// Timer and TimeRecord records elapsed time (wall clock time)\n// used by each pass of the linker.\nstruct TimerRecord {\n  TimerRecord(std::string name, TimerRecord *parent = nullptr);\n  void stop();\n\n  std::string name;\n  TimerRecord *parent;\n  tbb::concurrent_vector<TimerRecord *> children;\n  i64 start;\n  i64 end;\n  i64 user;\n  i64 sys;\n  bool stopped = false;\n};\n\nvoid\nprint_timer_records(tbb::concurrent_vector<std::unique_ptr<TimerRecord>> &);\n\ntemplate <typename Context>\nclass Timer {\npublic:\n  Timer(Context &ctx, std::string name, Timer *parent = nullptr) {\n    record = new TimerRecord(name, parent ? parent->record : nullptr);\n    ctx.timer_records.emplace_back(record);\n  }\n\n  Timer(const Timer &) = delete;\n\n  ~Timer() {\n    record->stop();\n  }\n\n  void stop() {\n    record->stop();\n  }\n\nprivate:\n  TimerRecord *record;\n};\n\n//\n// Utility functions\n//\n\n// Some C++ libraries haven't implemented std::has_single_bit yet.\ninline bool has_single_bit(u64 val) {\n  return std::popcount(val) == 1;\n}\n\n// Some C++ libraries haven't implemented std::bit_ceil yet.\ninline u64 bit_ceil(u64 val) {\n  if (has_single_bit(val))\n    return val;\n  return 1LL << (64 - std::countl_zero(val));\n}\n\ninline u64 align_to(u64 val, u64 align) {\n  if (align == 0)\n    return val;\n  assert(has_single_bit(align));\n  return (val + align - 1) & ~(align - 1);\n}\n\ninline u64 align_down(u64 val, u64 align) {\n  assert(has_single_bit(align));\n  return val & ~(align - 1);\n}\n\ninline u64 bit(u64 val, i64 pos) {\n  return (val >> pos) & 1;\n};\n\n// Returns [hi:lo] bits of val.\ninline u64 bits(u64 val, u64 hi, u64 lo) {\n  return (val >> lo) & ((1LL << (hi - lo + 1)) - 1);\n}\n\n// Cast val to a signed N bit integer.\n// For example, sign_extend(x, 32) == (i32)x for any integer x.\ninline i64 sign_extend(u64 val, i64 n) {\n  return (i64)(val << (64 - n)) >> (64 - n);\n}\n\ninline bool is_int(u64 val, i64 n) {\n  return sign_extend(val, n) == val;\n}\n\ntemplate <typename T, typename Compare = std::less<T>>\nvoid update_minimum(std::atomic<T> &atomic, u64 new_val, Compare cmp = {}) {\n  T old_val = atomic.load(std::memory_order_relaxed);\n  while (cmp(new_val, old_val) &&\n         !atomic.compare_exchange_weak(old_val, new_val,\n                                       std::memory_order_relaxed));\n}\n\ntemplate <typename T, typename Compare = std::less<T>>\nvoid update_maximum(std::atomic<T> &atomic, u64 new_val, Compare cmp = {}) {\n  T old_val = atomic.load(std::memory_order_relaxed);\n  while (cmp(old_val, new_val) &&\n         !atomic.compare_exchange_weak(old_val, new_val,\n                                       std::memory_order_relaxed));\n}\n\ntemplate <typename T>\ninline void append(std::vector<T> &x, const auto &y) {\n  x.insert(x.end(), y.begin(), y.end());\n}\n\ntemplate <typename T>\ninline std::vector<T> flatten(std::vector<std::vector<T>> &vec) {\n  i64 size = 0;\n  for (std::vector<T> &v : vec)\n    size += v.size();\n\n  std::vector<T> ret;\n  ret.reserve(size);\n  for (std::vector<T> &v : vec)\n    append(ret, v);\n  return ret;\n}\n\ntemplate <typename T>\ninline void remove_duplicates(std::vector<T> &vec) {\n  vec.erase(std::unique(vec.begin(), vec.end()), vec.end());\n}\n\ninline i64 write_string(void *buf, std::string_view str) {\n  memcpy(buf, str.data(), str.size());\n  *((u8 *)buf + str.size()) = '\\0';\n  return str.size() + 1;\n}\n\ntemplate <typename T>\ninline void write_vector(void *buf, const std::vector<T> &vec) {\n  if (!vec.empty())\n    memcpy(buf, vec.data(), vec.size() * sizeof(T));\n}\n\ninline void encode_uleb(std::vector<u8> &vec, u64 val) {\n  do {\n    u8 byte = val & 0x7f;\n    val >>= 7;\n    vec.push_back(val ? (byte | 0x80) : byte);\n  } while (val);\n}\n\ninline void encode_sleb(std::vector<u8> &vec, i64 val) {\n  for (;;) {\n    u8 byte = val & 0x7f;\n    val >>= 7;\n\n    bool neg = (byte & 0x40);\n    if ((val == 0 && !neg) || (val == -1 && neg)) {\n      vec.push_back(byte);\n      break;\n    }\n    vec.push_back(byte | 0x80);\n  }\n}\n\ninline i64 write_uleb(u8 *buf, u64 val) {\n  i64 i = 0;\n  do {\n    u8 byte = val & 0x7f;\n    val >>= 7;\n    buf[i++] = val ? (byte | 0x80) : byte;\n  } while (val);\n  return i;\n}\n\ninline u64 read_uleb(u8 **buf) {\n  u64 val = 0;\n  u8 shift = 0;\n  u8 byte;\n  do {\n    byte = *(*buf)++;\n    val |= (byte & 0x7f) << shift;\n    shift += 7;\n  } while (byte & 0x80);\n  return val;\n}\n\ninline u64 read_uleb(u8 *buf) {\n  u8 *tmp = buf;\n  return read_uleb(&tmp);\n}\n\ninline i64 read_sleb(u8 **buf) {\n  u64 val = 0;\n  u8 shift = 0;\n  u8 byte;\n  do {\n    byte = *(*buf)++;\n    val |= (byte & 0x7f) << shift;\n    shift += 7;\n  } while (byte & 0x80);\n  return sign_extend(val, shift);\n}\n\ninline i64 read_sleb(u8 *buf) {\n  u8 *tmp = buf;\n  return read_sleb(&tmp);\n}\n\ninline u64 read_uleb(std::string_view *str) {\n  u8 *start = (u8 *)str->data();\n  u8 *ptr = start;\n  u64 val = read_uleb(&ptr);\n  *str = str->substr(ptr - start);\n  return val;\n}\n\ninline u64 read_uleb(std::string_view str) {\n  std::string_view tmp = str;\n  return read_uleb(&tmp);\n}\n\ninline i64 uleb_size(u64 val) {\n  for (int i = 1; i < 9; i++)\n    if (val < (1LL << (7 * i)))\n      return i;\n  return 9;\n}\n\ninline void overwrite_uleb(u8 *loc, u64 val) {\n  while (*loc & 0b1000'0000) {\n    *loc++ = 0b1000'0000 | (val & 0b0111'1111);\n    val >>= 7;\n  }\n  *loc = val & 0b0111'1111;\n}\n\nstatic inline void pause() {\n#if defined(__x86_64__)\n  asm volatile(\"pause\");\n#elif defined(__aarch64__)\n  asm volatile(\"yield\");\n#elif defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_8A__)\n  asm volatile(\"yield\");\n#endif\n}\n\n//\n// Concurrent Map\n//\n\n// This is an implementation of a fast concurrent hash map. Unlike\n// ordinary hash tables, this impl just aborts if it becomes full.\n// So you need to give a correct estimation of the final size before\n// using it. We use this hash map to uniquify pieces of data in\n// mergeable sections.\n//\n// We've implemented this ourselves because the performance of\n// conrurent hash map is critical for our linker.\ntemplate <typename T>\nclass ConcurrentMap {\npublic:\n  ConcurrentMap() = default;\n\n  ConcurrentMap(i64 nbuckets) {\n    resize(nbuckets);\n  }\n\n  ~ConcurrentMap() {\n    if (entries) {\n#ifdef _WIN32\n      _aligned_free(entries);\n#else\n      munmap(entries, sizeof(Entry) * nbuckets);\n#endif\n    }\n  }\n\n  // In order to avoid unnecessary cache-line false sharing, we want\n  // to make this object to be aligned to a reasonably large\n  // power-of-two address.\n  struct alignas(32) Entry {\n    Atomic<const char *> key;\n    u32 keylen;\n    T value;\n  };\n\n  void resize(i64 nbuckets) {\n    assert(!entries);\n    this->nbuckets = std::max<i64>(MIN_NBUCKETS, bit_ceil(nbuckets));\n    i64 bufsize = sizeof(Entry) * this->nbuckets;\n\n    // Allocate a zero-initialized buffer. We use mmap() if available\n    // because it's faster than malloc() and memset().\n#ifdef _WIN32\n    entries = (Entry *)_aligned_malloc(bufsize, alignof(Entry));\n    memset((void *)entries, 0, bufsize);\n#else\n    entries = (Entry *)mmap(nullptr, bufsize, PROT_READ | PROT_WRITE,\n                            MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);\n#endif\n  }\n\n  std::pair<T *, bool> insert(std::string_view key, u64 hash, const T &val) {\n    assert(has_single_bit(nbuckets));\n\n    u64 begin = hash & (nbuckets - 1);\n    u64 mask = nbuckets / NUM_SHARDS - 1;\n\n    for (i64 i = 0; i < MAX_RETRY; i++) {\n      u64 idx = (begin & ~mask) | ((begin + i) & mask);\n      Entry &ent = entries[idx];\n\n      // It seems avoiding compare-and-swap is faster overall at least\n      // on my Zen4 machine, so do it.\n      if (const char *ptr = ent.key.load(std::memory_order_acquire);\n          ptr != nullptr && ptr != (char *)-1) {\n        if (key == std::string_view(ptr, ent.keylen))\n          return {&ent.value, false};\n        continue;\n      }\n\n      // Otherwise, use CAS to atomically claim the ownership of the slot.\n      const char *ptr = nullptr;\n      bool claimed = ent.key.compare_exchange_strong(ptr, (char *)-1,\n                                                     std::memory_order_acquire);\n\n      // If we successfully claimed the ownership of the slot,\n      // copy values to it.\n      if (claimed) {\n        new (&ent.value) T(val);\n        ent.keylen = key.size();\n        ent.key.store(key.data(), std::memory_order_release);\n        return {&ent.value, true};\n      }\n\n      // If someone is copying values to the slot, do busy wait.\n      while (ptr == (char *)-1) {\n        pause();\n        ptr = ent.key.load(std::memory_order_acquire);\n      }\n\n      // If the same key is already present, this is the slot we are\n      // looking for.\n      if (key == std::string_view(ptr, ent.keylen))\n        return {&ent.value, false};\n    }\n\n    std::cerr << \"ConcurrentMap is full\\n\";\n    abort();\n  }\n\n  i64 get_idx(T *value) const {\n    uintptr_t addr = (uintptr_t)value - (uintptr_t)value % sizeof(Entry);\n    return (Entry *)addr - entries;\n  }\n\n  // Return a list of map entries sorted in a deterministic order.\n  std::vector<Entry *> get_sorted_entries(i64 shard_idx) {\n    if (nbuckets == 0)\n      return {};\n\n    i64 shard_size = nbuckets / NUM_SHARDS;\n    i64 begin = shard_idx * shard_size;\n    i64 end = begin + shard_size;\n\n    i64 sz = 0;\n    for (i64 i = begin; i < end; i++)\n      if (entries[i].key)\n        sz++;\n\n    std::vector<Entry *> vec;\n    vec.reserve(sz);\n\n    // Since the shard is circular, we need to handle the last entries\n    // as if they were next to the first entries.\n    while (begin < end && entries[end - 1].key)\n      vec.push_back(entries + --end);\n\n    // Find entries contiguous in the buckets and sort them.\n    i64 last = 0;\n    for (i64 i = begin; i < end;) {\n      while (i < end && entries[i].key)\n        vec.push_back(entries + i++);\n\n      std::sort(vec.begin() + last, vec.end(), [](Entry *a, Entry *b) {\n        if (a->keylen != b->keylen)\n          return a->keylen < b->keylen;\n        return memcmp(a->key, b->key, a->keylen) < 0;\n      });\n\n      last = vec.size();\n\n      while (i < end && !entries[i].key)\n        i++;\n    }\n    return vec;\n  }\n\n  std::vector<Entry *> get_sorted_entries_all() {\n    std::vector<std::vector<Entry *>> vec(NUM_SHARDS);\n    tbb::parallel_for((i64)0, NUM_SHARDS, [&](i64 i) {\n      vec[i] = get_sorted_entries(i);\n    });\n    return flatten(vec);\n  }\n\n  static constexpr i64 MIN_NBUCKETS = 4096;\n  static constexpr i64 NUM_SHARDS = 16;\n  static constexpr i64 MAX_RETRY = 256;\n\n  Entry *entries = nullptr;\n  u64 nbuckets = 0;\n};\n\n//\n// random.cc\n//\n\nvoid get_random_bytes(u8 *buf, i64 size);\n\n//\n// hyperloglog.cc\n//\n\nclass HyperLogLog {\npublic:\n  void insert(u64 hash) {\n    update_maximum(buckets[hash & (NBUCKETS - 1)], std::countl_zero(hash) + 1);\n  }\n\n  i64 get_cardinality() const;\n\n  void merge(const HyperLogLog &other) {\n    for (i64 i = 0; i < NBUCKETS; i++)\n      update_maximum(buckets[i], other.buckets[i]);\n  }\n\nprivate:\n  static constexpr i64 NBUCKETS = 2048;\n  static constexpr double ALPHA = 0.79402;\n\n  Atomic<u8> buckets[NBUCKETS];\n};\n\n//\n// aho-corasick.cc\n//\n\nclass AhoCorasick {\npublic:\n  bool add(std::string_view pat, i64 val);\n  bool empty() const { return nodes.empty(); }\n  void compile();\n  i64 find(std::string_view str);\n\n  static bool can_handle(std::string_view str);\n\nprivate:\n  struct TrieNode {\n    TrieNode() { children.fill(-1); }\n    i64 value = -1;\n    i32 suffix_link = -1;\n    std::array<i32, 256> children;\n  };\n\n  void fix_suffix_links(i64 idx);\n  void fix_values();\n\n  std::vector<TrieNode> nodes;\n};\n\n//\n// glob.cc\n//\n\nclass MultiGlob {\npublic:\n  bool add(std::string_view pat, i64 val);\n  bool empty() const { return patterns.empty(); }\n  void compile();\n  i64 find(std::string_view str);\n\n  struct State {\n    std::bitset<256> incoming_edge;\n    bool is_star = false;\n  };\n\n  struct GlobPattern {\n    std::vector<State> states;\n    i64 value = -1;\n  };\n\nprivate:\n  std::vector<GlobPattern> patterns;\n  Bitvector start_states;\n  Bitvector star_mask;\n  Bitvector char_mask[256];\n};\n\nclass Glob {\npublic:\n  bool add(std::string_view pat, i64 val);\n  bool empty() const { return multi_glob.empty() && aho_corasick.empty(); }\n  i64 find(std::string_view str);\n\nprivate:\n  std::once_flag once;\n  bool is_compiled = false;\n\n  MultiGlob multi_glob;\n  AhoCorasick aho_corasick;\n};\n\n//\n// filepath.cc\n//\n\ninline std::filesystem::path path_dirname(std::string_view path) {\n  return std::filesystem::path(path).parent_path();\n}\n\ninline std::string path_filename(std::string_view path) {\n  return std::filesystem::path(path).filename().string();\n}\n\ninline std::string path_clean(std::string_view path) {\n  return std::filesystem::path(path).lexically_normal().string();\n}\n\nstd::string get_self_path();\n\n//\n// demangle.cc\n//\n\nstd::optional<std::string_view> demangle_cpp(std::string_view name);\nstd::optional<std::string_view> demangle_rust(std::string_view name);\n\n//\n// crc32.cc\n//\n\nu32 compute_crc32(u32 crc, u8 *buf, i64 len);\nstd::vector<u8> crc32_solve(u32 current, u32 desired);\n\n//\n// compress.cc\n//\n\nclass Compressor {\npublic:\n  virtual void write_to(u8 *buf) = 0;\n  virtual ~Compressor();\n  i64 compressed_size = 0;\n\nprotected:\n  std::vector<std::span<u8>> shards;\n};\n\nclass ZlibCompressor : public Compressor {\npublic:\n  ZlibCompressor(u8 *buf, i64 size);\n  void write_to(u8 *buf) override;\n\nprivate:\n  u32 checksum = 0;\n};\n\nclass ZstdCompressor : public Compressor {\npublic:\n  ZstdCompressor(u8 *buf, i64 size);\n  void write_to(u8 *buf) override;\n};\n\n//\n// tar.cc\n//\n\n// TarFile is a class to create a tar file.\n//\n// If you pass `--repro` to mold, mold collects all input files and\n// put them into `<output-file-path>.repro.tar`, so that it is easy to\n// run the same command with the same command line arguments.\nclass TarWriter {\npublic:\n  static std::unique_ptr<TarWriter>\n  open(std::string output_path, std::string basedir);\n\n  ~TarWriter();\n  void append(std::string path, std::string_view data);\n\nprivate:\n  TarWriter(FILE *out, std::string basedir) : out(out), basedir(basedir) {}\n\n  FILE *out = nullptr;\n  std::string basedir;\n};\n\n} // namespace mold\n"
  },
  {
    "path": "lib/perf.cc",
    "content": "#include \"lib.h\"\n\n#include <functional>\n#include <iomanip>\n#include <ios>\n#include <tbb/concurrent_vector.h>\n\n#ifndef _WIN32\n#include <sys/resource.h>\n#include <sys/time.h>\n#endif\n\nnamespace mold {\n\ni64 Counter::get_value() {\n  return values.combine(std::plus());\n}\n\nvoid Counter::print() {\n  ranges::stable_sort(instances, {}, [](Counter *x) { return x->get_value(); });\n\n  for (Counter *c : instances)\n    std::cout << std::setw(20) << std::right << c->name\n              << \"=\" << c->get_value() << \"\\n\";\n}\n\nstatic i64 now_nsec() {\n  return (i64)std::chrono::steady_clock::now().time_since_epoch().count();\n}\n\nstatic std::pair<i64, i64> get_usage() {\n#ifdef _WIN32\n  auto to_nsec = [](FILETIME t) -> i64 {\n    return (((u64)t.dwHighDateTime << 32) + (u64)t.dwLowDateTime) * 100;\n  };\n\n  FILETIME creation, exit, kernel, user;\n  GetProcessTimes(GetCurrentProcess(), &creation, &exit, &kernel, &user);\n  return {to_nsec(user), to_nsec(kernel)};\n#else\n  auto to_nsec = [](struct timeval t) -> i64 {\n    return (i64)t.tv_sec * 1'000'000'000 + t.tv_usec * 1'000;\n  };\n\n  struct rusage ru;\n  getrusage(RUSAGE_SELF, &ru);\n  return {to_nsec(ru.ru_utime), to_nsec(ru.ru_stime)};\n#endif\n}\n\nTimerRecord::TimerRecord(std::string name, TimerRecord *parent)\n  : name(name), parent(parent) {\n  start = now_nsec();\n  std::tie(user, sys) = get_usage();\n  if (parent)\n    parent->children.push_back(this);\n}\n\nvoid TimerRecord::stop() {\n  if (stopped)\n    return;\n  stopped = true;\n\n  i64 user2;\n  i64 sys2;\n  std::tie(user2, sys2) = get_usage();\n\n  end = now_nsec();\n  user = user2 - user;\n  sys = sys2 - sys;\n}\n\nstatic void print_rec(TimerRecord &rec, i64 indent) {\n  printf(\" % 8.3f % 8.3f % 8.3f  %s%s\\n\",\n         ((double)rec.user / 1'000'000'000),\n         ((double)rec.sys / 1'000'000'000),\n         (((double)rec.end - rec.start) / 1'000'000'000),\n         std::string(indent * 2, ' ').c_str(),\n         rec.name.c_str());\n\n  ranges::stable_sort(rec.children, {}, &TimerRecord::start);\n\n  for (TimerRecord *child : rec.children)\n    print_rec(*child, indent + 1);\n}\n\nvoid print_timer_records(\n    tbb::concurrent_vector<std::unique_ptr<TimerRecord>> &records) {\n  for (i64 i = records.size() - 1; i >= 0; i--)\n    records[i]->stop();\n\n  for (i64 i = 0; i < records.size(); i++) {\n    TimerRecord &inner = *records[i];\n    if (inner.parent)\n      continue;\n\n    for (i64 j = i - 1; j >= 0; j--) {\n      TimerRecord &outer = *records[j];\n      if (outer.start <= inner.start && inner.end <= outer.end) {\n        inner.parent = &outer;\n        outer.children.push_back(&inner);\n        break;\n      }\n    }\n  }\n\n  std::cout << \"     User   System     Real  Name\\n\";\n\n  for (std::unique_ptr<TimerRecord> &rec : records)\n    if (!rec->parent)\n      print_rec(*rec, 0);\n\n  std::cout << std::flush;\n}\n\n} // namespace mold\n"
  },
  {
    "path": "lib/random.cc",
    "content": "#include \"lib.h\"\n\n#include <random>\n\nnamespace mold {\n\nvoid get_random_bytes(u8 *buf, i64 size) {\n  std::random_device rand;\n  i64 i = 0;\n\n  for (; i < size - 4; i += 4) {\n    u32 val = rand();\n    memcpy(buf + i, &val, 4);\n  }\n\n  u32 val = rand();\n  memcpy(buf + i, &val, size - i);\n}\n\n} // namespace mold\n"
  },
  {
    "path": "lib/siphash.h",
    "content": "// This is a header-only C++20 implementation of SipHash based on the\n// reference implementation. To use, just copy this header file into\n// your project and #include it.\n//\n// https://github.com/rui314/siphash/blob/main/siphash.h\n\n#include <bit>\n#include <cstdint>\n#include <cstring>\n\ntemplate <int C_ROUNDS, int D_ROUNDS, int OUTLEN>\nclass SipHashTmpl {\npublic:\n  static_assert(OUTLEN == 64 || OUTLEN == 128);\n\n  SipHashTmpl(void *key) {\n    uint64_t k0 = read64(key);\n    uint64_t k1 = read64((char *)key + 8);\n\n    v0 = 0x736f6d6570736575 ^ k0;\n    v1 = 0x646f72616e646f6d ^ k1;\n    v2 = 0x6c7967656e657261 ^ k0;\n    v3 = 0x7465646279746573 ^ k1;\n\n    if (OUTLEN == 128)\n      v1 ^= 0xee;\n  }\n\n  void update(void *msgp, int64_t msglen) {\n    char *msg = (char *)msgp;\n    sum += msglen;\n\n    if (buflen) {\n      if (buflen + msglen < 8) {\n        memcpy(buf + buflen, msg, msglen);\n        buflen += msglen;\n        return;\n      }\n\n      int j = 8 - buflen;\n      memcpy(buf + buflen, msg, j);\n      compress(read64(buf));\n\n      msg += j;\n      msglen -= j;\n      buflen = 0;\n    }\n\n    while (msglen >= 8) {\n      compress(read64(msg));\n      msg += 8;\n      msglen -= 8;\n    }\n\n    memcpy(buf, msg, msglen);\n    buflen = msglen;\n  }\n\n  void finish(void *out) {\n    memset(buf + buflen, 0, 8 - buflen);\n    compress(((uint64_t)sum << 56) | read64(buf));\n\n    v2 ^= (OUTLEN == 128) ? 0xee : 0xff;\n    finalize();\n    write64(out, v0 ^ v1 ^ v2 ^ v3);\n\n    if (OUTLEN == 128) {\n      v1 ^= 0xdd;\n      finalize();\n      write64((char *)out + 8, v0 ^ v1 ^ v2 ^ v3);\n    }\n  }\n\n  static void hash(void *out, void *key, void *in, int inlen) {\n    SipHashTmpl<C_ROUNDS, D_ROUNDS, OUTLEN> h(key);\n    h.update(in, inlen);\n    h.finish(out);\n  }\n\nprivate:\n  uint64_t v0, v1, v2, v3;\n  uint8_t buf[8];\n  uint8_t buflen = 0;\n  uint8_t sum = 0;\n\n  uint64_t read64(void *loc) {\n    uint64_t val;\n    memcpy(&val, loc, 8);\n    if (std::endian::native == std::endian::big)\n      val = bswap(val);\n    return val;\n  }\n\n  void write64(void *loc, uint64_t val) {\n    if (std::endian::native == std::endian::big)\n      val = bswap(val);\n    memcpy(loc, &val, 8);\n  }\n\n  uint64_t bswap(uint64_t val) {\n    return ((val << 56) & 0xff00000000000000) |\n           ((val << 40) & 0x00ff000000000000) |\n           ((val << 24) & 0x0000ff0000000000) |\n           ((val << 8)  & 0x000000ff00000000) |\n           ((val >> 8)  & 0x00000000ff000000) |\n           ((val >> 24) & 0x0000000000ff0000) |\n           ((val >> 40) & 0x000000000000ff00) |\n           ((val >> 56) & 0x00000000000000ff);\n  }\n\n  void round() {\n    v0 += v1;\n    v1 = std::rotl(v1, 13);\n    v1 ^= v0;\n    v0 = std::rotl(v0, 32);\n    v2 += v3;\n    v3 = std::rotl(v3, 16);\n    v3 ^= v2;\n    v0 += v3;\n    v3 = std::rotl(v3, 21);\n    v3 ^= v0;\n    v2 += v1;\n    v1 = std::rotl(v1, 17);\n    v1 ^= v2;\n    v2 = std::rotl(v2, 32);\n  }\n\n  void compress(uint64_t m) {\n    v3 ^= m;\n    for (int i = 0; i < C_ROUNDS; i++)\n      round();\n    v0 ^= m;\n  }\n\n  void finalize() {\n    for (int i = 0; i < D_ROUNDS; i++)\n      round();\n  }\n};\n\nusing SipHash = SipHashTmpl<2, 4, 64>;\nusing SipHash128 = SipHashTmpl<2, 4, 128>;\nusing SipHash13 = SipHashTmpl<1, 3, 64>;\nusing SipHash13_128 = SipHashTmpl<1, 3, 128>;\n"
  },
  {
    "path": "lib/tar.cc",
    "content": "// This file contains functions to create a tar file.\n\n#include \"lib.h\"\n\n#ifdef _WIN32\n# define ftruncate _chsize_s\n#endif\n\nnamespace mold {\n\nstatic constexpr i64 BLOCK_SIZE = 512;\n\n// A tar file consists of one or more Ustar header followed by data.\n// Each Ustar header represents a single file in an archive.\n//\n// tar is an old file format, and its `name` field is only 100 bytes long.\n// If `name` is longer than 100 bytes, we can emit a PAX header before a\n// Ustar header to store a long filename.\n//\n// For simplicity, we always emit a PAX header even for a short filename.\nstruct UstarHeader {\n  char name[100];\n  char mode[8];\n  char uid[8];\n  char gid[8];\n  char size[12];\n  char mtime[12];\n  char checksum[8];\n  char typeflag[1];\n  char linkname[100];\n  char magic[6];\n  char version[2];\n  char uname[32];\n  char gname[32];\n  char devmajor[8];\n  char devminor[8];\n  char prefix[155];\n  char pad[12];\n};\n\nstatic_assert(sizeof(UstarHeader) == BLOCK_SIZE);\n\nstatic void finalize(UstarHeader &hdr) {\n  memset(hdr.checksum, ' ', sizeof(hdr.checksum));\n  memcpy(hdr.magic, \"ustar\", 5);\n  memcpy(hdr.version, \"00\", 2);\n\n  // Compute checksum\n  int sum = 0;\n  for (i64 i = 0; i < sizeof(hdr); i++)\n    sum += ((u8 *)&hdr)[i];\n\n  // We need to convince the compiler that sum isn't too big to silence\n  // -Werror=format-truncation.\n  if (sum >= 01'000'000)\n    unreachable();\n  snprintf(hdr.checksum, sizeof(hdr.checksum), \"%06o\", sum);\n}\n\nstatic std::string encode_path(std::string basedir, std::string path) {\n  path = path_clean(basedir + \"/\" + path);\n\n  // Construct a string which contains something like\n  // \"16 path=foo/bar\\n\" where 16 is the size of the string\n  // including the size string itself.\n  i64 len = std::string(\" path=\\n\").size() + path.size();\n  i64 total = std::to_string(len).size() + len;\n  total = std::to_string(total).size() + len;\n  return std::to_string(total) + \" path=\" + path + \"\\n\";\n}\n\nstd::unique_ptr<TarWriter>\nTarWriter::open(std::string output_path, std::string basedir) {\n  FILE *out = fopen(output_path.c_str(), \"w\");\n  if (!out)\n    return nullptr;\n  return std::unique_ptr<TarWriter>(new TarWriter(out, basedir));\n}\n\nTarWriter::~TarWriter() {\n  fclose(out);\n}\n\nvoid TarWriter::append(std::string path, std::string_view data) {\n  // Write PAX header\n  UstarHeader pax = {};\n\n  std::string attr = encode_path(basedir, path);\n  snprintf(pax.size, sizeof(pax.size), \"%011zo\", attr.size());\n  pax.name[0] = '/';\n  pax.typeflag[0] = 'x';\n  finalize(pax);\n  fwrite(&pax, sizeof(pax), 1, out);\n\n  // Write pathname\n  fwrite(attr.data(), attr.size(), 1, out);\n  fseek(out, align_to(ftell(out), BLOCK_SIZE), SEEK_SET);\n\n  // Write Ustar header\n  UstarHeader ustar = {};\n  memcpy(ustar.mode, \"0000664\", 8);\n  snprintf(ustar.size, sizeof(ustar.size), \"%011zo\", data.size());\n  finalize(ustar);\n  fwrite(&ustar, sizeof(ustar), 1, out);\n\n  // Write file contents\n  fwrite(data.data(), data.size(), 1, out);\n  fseek(out, align_to(ftell(out), BLOCK_SIZE), SEEK_SET);\n\n  // A tar file must ends with two empty blocks\n  (void)!ftruncate(fileno(out), ftell(out) + BLOCK_SIZE * 2);\n}\n\n} // namespace mold\n"
  },
  {
    "path": "lib/update-git-hash.cmake",
    "content": "# Get a git hash value. We do not want to use git command here\n# because we don't want to make git a build-time dependency.\nif(EXISTS \"${SOURCE_DIR}/.git/HEAD\")\n  file(READ \"${SOURCE_DIR}/.git/HEAD\" HASH)\n  string(STRIP \"${HASH}\" HASH)\n\n  if(HASH MATCHES \"^ref: (.*)\")\n    set(HEAD \"${CMAKE_MATCH_1}\")\n    if(EXISTS \"${SOURCE_DIR}/.git/${HEAD}\")\n      file(READ \"${SOURCE_DIR}/.git/${HEAD}\" HASH)\n      string(STRIP \"${HASH}\" HASH)\n    else()\n      file(READ \"${SOURCE_DIR}/.git/packed-refs\" PACKED_REFS)\n      string(REGEX REPLACE \".*\\n([0-9a-f]+) ${HEAD}\\n.*\" \"\\\\1\" HASH \"\\n${PACKED_REFS}\")\n    endif()\n  endif()\nendif()\n\n# Create new file contents and update a given file if necessary.\nif(\"${HASH}\" STREQUAL \"\")\n  set(NEW_CONTENTS \"\")\nelse()\n  set(NEW_CONTENTS \"#define MOLD_GIT_HASH \\\"${HASH}\\\"\\n\")\nendif()\n\nif(EXISTS \"${OUTPUT_FILE}\")\n  file(READ \"${OUTPUT_FILE}\" OLD_CONTENTS)\n  if(NOT \"${NEW_CONTENTS}\" STREQUAL \"${OLD_CONTENTS}\")\n    file(WRITE \"${OUTPUT_FILE}\" \"${NEW_CONTENTS}\")\n  endif()\nelse()\n  file(WRITE \"${OUTPUT_FILE}\" \"${NEW_CONTENTS}\")\nendif()\n"
  },
  {
    "path": "src/arch-arm32.cc",
    "content": "// ARM32 is a bit special from the linker's viewpoint because ARM\n// processors support two different instruction encodings: Thumb and\n// ARM (in a narrower sense). Thumb instructions are either 16 bits or\n// 32 bits, while ARM instructions are all 32 bits. Feature-wise,\n// Thumb is a subset of ARM, so not all ARM instructions are\n// representable in Thumb.\n//\n// ARM processors originally supported only ARM instructions. Thumb\n// instructions were later added to increase code density.\n//\n// ARM processors runs in either ARM mode or Thumb mode. The mode can\n// be switched using BX (branch and mode exchange)-family instructions.\n// We need to use that instructions to, for example, call a function\n// encoded in Thumb from a function encoded in ARM. Sometimes, the\n// linker even has to emit interworking thunk code to switch mode.\n//\n// ARM instructions are aligned to 4 byte boundaries. Thumb are to 2\n// byte boundaries. So the least significant bit of a function address\n// is always 0.\n//\n// To distinguish Thumb functions from ARM fucntions, the LSB of a\n// function address is repurposed as a boolean flag. If the LSB is 0,\n// the function referred to by the address is encoded in ARM;\n// otherwise, Thumb.\n//\n// For example, if a symbol `foo` is of type STT_FUNC and has value\n// 0x2001, `foo` is a function using Thumb instructions whose address\n// is 0x2000 (not 0x2001, as Thumb instructions are always 2-byte\n// aligned). Likewise, if a function pointer has value 0x2001, it\n// refers a Thumb function at 0x2000.\n//\n// https://github.com/ARM-software/abi-aa/blob/main/aaelf32/aaelf32.rst\n\n#if MOLD_ARM32LE || MOLD_ARM32BE\n\n#include \"mold.h\"\n\n#include <tbb/parallel_for.h>\n#include <tbb/parallel_for_each.h>\n\nnamespace mold {\n\nusing E = MOLD_TARGET;\n\ntemplate <>\ni64 get_addend(u8 *loc, const ElfRel<E> &rel) {\n  U32<E> *arm = (U32<E> *)loc;\n  U16<E> *thm = (U16<E> *)loc;\n\n  switch (rel.r_type) {\n  case R_ARM_ABS32:\n  case R_ARM_REL32:\n  case R_ARM_BASE_PREL:\n  case R_ARM_GOTOFF32:\n  case R_ARM_GOT_PREL:\n  case R_ARM_GOT_BREL:\n  case R_ARM_TLS_GD32:\n  case R_ARM_TLS_LDM32:\n  case R_ARM_TLS_LDO32:\n  case R_ARM_TLS_IE32:\n  case R_ARM_TLS_LE32:\n  case R_ARM_TLS_GOTDESC:\n  case R_ARM_TARGET1:\n  case R_ARM_TARGET2:\n    return (I32<E>)*arm;\n  case R_ARM_THM_JUMP8:\n    return sign_extend(thm[0], 8) << 1;\n  case R_ARM_THM_JUMP11:\n    return sign_extend(thm[0], 11) << 1;\n  case R_ARM_THM_JUMP19: {\n    // https://developer.arm.com/documentation/ddi0597/2024-12/Base-Instructions/B--Branch-\n    u32 S = bit(thm[0], 10);\n    u32 J2 = bit(thm[1], 11);\n    u32 J1 = bit(thm[1], 13);\n    u32 imm6 = bits(thm[0], 5, 0);\n    u32 imm11 = bits(thm[1], 10, 0);\n    u32 val = (S << 20) | (J2 << 19) | (J1 << 18) | (imm6 << 12) | (imm11 << 1);\n    return sign_extend(val, 21);\n  }\n  case R_ARM_THM_CALL:\n  case R_ARM_THM_JUMP24:\n  case R_ARM_THM_TLS_CALL: {\n    // https://developer.arm.com/documentation/ddi0597/2024-12/Base-Instructions/BL--BLX--immediate---Branch-with-Link-and-optional-Exchange--immediate--\n    u32 S = bit(thm[0], 10);\n    u32 J1 = bit(thm[1], 13);\n    u32 J2 = bit(thm[1], 11);\n    u32 I1 = !(J1 ^ S);\n    u32 I2 = !(J2 ^ S);\n    u32 imm10 = bits(thm[0], 9, 0);\n    u32 imm11 = bits(thm[1], 10, 0);\n    u32 val = (S << 24) | (I1 << 23) | (I2 << 22) | (imm10 << 12) | (imm11 << 1);\n    return sign_extend(val, 25);\n  }\n  case R_ARM_CALL:\n  case R_ARM_JUMP24:\n  case R_ARM_PLT32:\n  case R_ARM_TLS_CALL:\n    return sign_extend(*arm, 24) << 2;\n  case R_ARM_MOVW_PREL_NC:\n  case R_ARM_MOVW_ABS_NC:\n  case R_ARM_MOVT_PREL:\n  case R_ARM_MOVT_ABS: {\n    // https://developer.arm.com/documentation/ddi0597/2024-12/Base-Instructions/MOV--MOVS--immediate---Move--immediate--\n    u32 imm4 = bits(*arm, 19, 16);\n    u32 imm12 = bits(*arm, 11, 0);\n    u32 val = (imm4 << 12) | imm12;\n    return sign_extend(val, 16);\n  }\n  case R_ARM_PREL31:\n    return sign_extend(*arm, 31);\n  case R_ARM_THM_MOVW_PREL_NC:\n  case R_ARM_THM_MOVW_ABS_NC:\n  case R_ARM_THM_MOVT_PREL:\n  case R_ARM_THM_MOVT_ABS: {\n    // https://developer.arm.com/documentation/ddi0597/2024-12/Base-Instructions/MOVT--Move-Top-\n    u32 imm4 = bits(thm[0], 3, 0);\n    u32 i = bit(thm[0], 10);\n    u32 imm3 = bits(thm[1], 14, 12);\n    u32 imm8 = bits(thm[1], 7, 0);\n    u32 val = (imm4 << 12) | (i << 11) | (imm3 << 8) | imm8;\n    return sign_extend(val, 16);\n  }\n  default:\n    return 0;\n  }\n}\n\nstatic void write_arm_mov(u8 *loc, u32 val) {\n  u32 imm12 = bits(val, 11, 0);\n  u32 imm4 = bits(val, 15, 12);\n  *(U32<E> *)loc = (*(U32<E> *)loc & 0xfff0'f000) | (imm4 << 16) | imm12;\n}\n\nstatic void write_thm_b21(u8 *loc, u32 val) {\n  u32 S = bit(val, 20);\n  u32 J2 = bit(val, 19);\n  u32 J1 = bit(val, 18);\n  u32 imm6 = bits(val, 17, 12);\n  u32 imm11 = bits(val, 11, 1);\n\n  U16<E> *buf = (U16<E> *)loc;\n  buf[0] = (buf[0] & 0b1111'1011'1100'0000) | (S << 10) | imm6;\n  buf[1] = (buf[1] & 0b1101'0000'0000'0000) | (J1 << 13) | (J2 << 11) | imm11;\n}\n\nstatic void write_thm_b25(u8 *loc, u32 val) {\n  u32 S = bit(val, 24);\n  u32 I1 = bit(val, 23);\n  u32 I2 = bit(val, 22);\n  u32 J1 = !I1 ^ S;\n  u32 J2 = !I2 ^ S;\n  u32 imm10 = bits(val, 21, 12);\n  u32 imm11 = bits(val, 11, 1);\n\n  U16<E> *buf = (U16<E> *)loc;\n  buf[0] = (buf[0] & 0b1111'1000'0000'0000) | (S << 10) | imm10;\n  buf[1] = (buf[1] & 0b1101'0000'0000'0000) | (J1 << 13) | (J2 << 11) | imm11;\n}\n\nstatic void write_thm_mov(u8 *loc, u32 val) {\n  u32 imm4 = bits(val, 15, 12);\n  u32 i = bit(val, 11);\n  u32 imm3 = bits(val, 10, 8);\n  u32 imm8 = bits(val, 7, 0);\n\n  U16<E> *buf = (U16<E> *)loc;\n  buf[0] = (buf[0] & 0b1111'1011'1111'0000) | (i << 10) | imm4;\n  buf[1] = (buf[1] & 0b1000'1111'0000'0000) | (imm3 << 12) | imm8;\n}\n\ntemplate <>\nvoid write_addend(u8 *loc, i64 val, const ElfRel<E> &rel) {\n  switch (rel.r_type) {\n  case R_ARM_NONE:\n    break;\n  case R_ARM_ABS32:\n  case R_ARM_REL32:\n  case R_ARM_BASE_PREL:\n  case R_ARM_GOTOFF32:\n  case R_ARM_GOT_PREL:\n  case R_ARM_GOT_BREL:\n  case R_ARM_TLS_GD32:\n  case R_ARM_TLS_LDM32:\n  case R_ARM_TLS_LDO32:\n  case R_ARM_TLS_IE32:\n  case R_ARM_TLS_LE32:\n  case R_ARM_TLS_GOTDESC:\n  case R_ARM_TARGET1:\n  case R_ARM_TARGET2:\n    *(U32<E> *)loc = val;\n    break;\n  case R_ARM_THM_JUMP8:\n    *(U16<E> *)loc = (*(U16<E> *)loc & 0xff00) | bits(val, 8, 1);\n    break;\n  case R_ARM_THM_JUMP11:\n    *(U16<E> *)loc = (*(U16<E> *)loc & 0xf800) | bits(val, 11, 1);\n    break;\n  case R_ARM_THM_CALL:\n  case R_ARM_THM_JUMP24:\n  case R_ARM_THM_TLS_CALL:\n    write_thm_b25(loc, val);\n    break;\n  case R_ARM_CALL:\n  case R_ARM_JUMP24:\n  case R_ARM_PLT32:\n    *(U32<E> *)loc = (*(U32<E> *)loc & 0xff00'0000) | bits(val, 25, 2);\n    break;\n  case R_ARM_MOVW_PREL_NC:\n  case R_ARM_MOVW_ABS_NC:\n  case R_ARM_MOVT_PREL:\n  case R_ARM_MOVT_ABS:\n    write_arm_mov(loc, val);\n    break;\n  case R_ARM_PREL31:\n    *(U32<E> *)loc = (*(U32<E> *)loc & 0x8000'0000) | (val & 0x7fff'ffff);\n    break;\n  case R_ARM_THM_MOVW_PREL_NC:\n  case R_ARM_THM_MOVW_ABS_NC:\n  case R_ARM_THM_MOVT_PREL:\n  case R_ARM_THM_MOVT_ABS:\n    write_thm_mov(loc, val);\n    break;\n  default:\n    unreachable();\n  }\n}\n\ntemplate <>\nvoid write_plt_header(Context<E> &ctx, u8 *buf) {\n  constexpr ul32 insn[] = {\n    0xe52d'e004, //    push {lr}\n    0xe59f'e004, //    ldr lr, 2f\n    0xe08f'e00e, // 1: add lr, pc, lr\n    0xe5be'f008, //    ldr pc, [lr, #8]!\n    0x0000'0000, // 2: .word .got.plt - 1b - 8\n    0x0000'0000, //    (padding)\n    0x0000'0000, //    (padding)\n    0x0000'0000, //    (padding)\n  };\n\n  memcpy(buf, insn, sizeof(insn));\n  *(U32<E> *)(buf + 16) = ctx.gotplt->shdr.sh_addr - ctx.plt->shdr.sh_addr - 16;\n}\n\nstatic constexpr ul32 plt_entry[] = {\n  0xe59f'c004, // 1: ldr ip, 2f\n  0xe08c'c00f, //    add ip, ip, pc\n  0xe59c'f000, //    ldr pc, [ip]\n  0x0000'0000, // 2: .word sym@GOT - 1b\n};\n\ntemplate <>\nvoid write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  memcpy(buf, plt_entry, sizeof(plt_entry));\n  *(U32<E> *)(buf + 12) = sym.get_gotplt_addr(ctx) - sym.get_plt_addr(ctx) - 12;\n}\n\ntemplate <>\nvoid write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  memcpy(buf, plt_entry, sizeof(plt_entry));\n  *(U32<E> *)(buf + 12) = sym.get_got_pltgot_addr(ctx) - sym.get_plt_addr(ctx) - 12;\n}\n\ntemplate <>\nvoid EhFrameSection<E>::apply_eh_reloc(Context<E> &ctx, const ElfRel<E> &rel,\n                                       u64 offset, u64 val) {\n  u8 *loc = ctx.buf + this->shdr.sh_offset + offset;\n\n  switch (rel.r_type) {\n  case R_NONE:\n    break;\n  case R_ARM_ABS32:\n    *(U32<E> *)loc = val;\n    break;\n  case R_ARM_REL32:\n    *(U32<E> *)loc = val - this->shdr.sh_addr - offset;\n    break;\n  default:\n    Fatal(ctx) << \"unsupported relocation in .eh_frame: \" << rel;\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || rel.r_type == R_ARM_V4BX)\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    u64 S = sym.get_addr(ctx);\n    u64 A = get_addend(*this, rel);\n    u64 P = get_addr() + rel.r_offset;\n    u64 T = S & 1;\n    u64 G = sym.get_got_idx(ctx) * sizeof(Word<E>);\n    u64 GOT = ctx.got->shdr.sh_addr;\n\n    auto check = [&](i64 val, i64 lo, i64 hi) {\n      check_range(ctx, i, val, lo, hi);\n    };\n\n    auto get_thumb_thunk_addr = [&] { return sym.get_thunk_addr(ctx, P); };\n    auto get_arm_thunk_addr   = [&] { return sym.get_thunk_addr(ctx, P) + 4; };\n\n    auto get_tlsdesc_trampoline_addr = [&] {\n      auto it = ranges::upper_bound(output_section->thunks, P, {},\n                                    [](std::unique_ptr<Thunk<E>> &thunk) {\n        return thunk->get_addr();\n      });\n      return (*it)->get_addr();\n    };\n\n    switch (rel.r_type) {\n    case R_ARM_ABS32:\n    case R_ARM_TARGET1:\n      break;\n    case R_ARM_REL32:\n      *(U32<E> *)loc = S + A - P;\n      break;\n    case R_ARM_THM_CALL: {\n      if (sym.is_remaining_undef_weak()) {\n        // On ARM, calling an weak undefined symbol jumps to the\n        // next instruction.\n        *(U32<E> *)loc = 0x8000'f3af; // NOP.W\n        break;\n      }\n\n      // THM_CALL relocation refers to either BL or BLX instruction.\n      // They are different in only one bit. We need to use BL if\n      // the jump target is Thumb. Otherwise, use BLX.\n      i64 val1 = S + A - P;\n      i64 val2 = align_to(S + A - P, 4);\n\n      if (T && is_int(val1, 25)) {\n        *(U16<E> *)(loc + 2) |= 0x1000;  // BL\n        write_thm_b25(loc, val1);\n      } else if (!T && is_int(val2, 25)) {\n        *(U16<E> *)(loc + 2) &= ~0x1000; // BLX\n        write_thm_b25(loc, val2);\n      } else {\n        *(U16<E> *)(loc + 2) |= 0x1000;  // BL\n        write_thm_b25(loc, get_thumb_thunk_addr() + A - P);\n      }\n      break;\n    }\n    case R_ARM_BASE_PREL:\n      *(U32<E> *)loc = GOT + A - P;\n      break;\n    case R_ARM_GOTOFF32:\n      *(U32<E> *)loc = ((S + A) | T) - GOT;\n      break;\n    case R_ARM_GOT_PREL:\n    case R_ARM_TARGET2:\n      *(U32<E> *)loc = GOT + G + A - P;\n      break;\n    case R_ARM_GOT_BREL:\n      *(U32<E> *)loc = G + A;\n      break;\n    case R_ARM_CALL: {\n      if (sym.is_remaining_undef_weak()) {\n        *(U32<E> *)loc = 0xe320'f000; // NOP\n        break;\n      }\n\n      // Just like THM_CALL, ARM_CALL relocation refers to either BL or\n      // BLX instruction. We may need to rewrite BL → BLX or BLX → BL.\n      bool is_bl = ((*(U32<E> *)loc & 0xff00'0000) == 0xeb00'0000);\n      bool is_blx = ((*(U32<E> *)loc & 0xfe00'0000) == 0xfa00'0000);\n      if (!is_bl && !is_blx)\n        Fatal(ctx) << *this << \": R_ARM_CALL refers to neither BL nor BLX\";\n\n      i64 val = S + A - P;\n      if (is_int(val, 26)) {\n        if (T) {\n          *(U32<E> *)loc = 0xfa00'0000; // BLX\n          *(U32<E> *)loc |= (bit(val, 1) << 24) | bits(val, 25, 2);\n        } else {\n          *(U32<E> *)loc = 0xeb00'0000; // BL\n          *(U32<E> *)loc |= bits(val, 25, 2);\n        }\n      } else {\n        *(U32<E> *)loc = 0xeb00'0000; // BL\n        *(U32<E> *)loc |= bits(get_arm_thunk_addr() + A - P, 25, 2);\n      }\n      break;\n    }\n    case R_ARM_JUMP24: {\n      if (sym.is_remaining_undef_weak()) {\n        *(U32<E> *)loc = 0xe320'f000; // NOP\n        break;\n      }\n\n      // These relocs refers to a B (unconditional branch) instruction.\n      // Unlike BL or BLX, we can't rewrite B to BX in place when the\n      // processor mode switch is required because BX doesn't takes an\n      // immediate; it takes only a register. So if mode switch is\n      // required, we jump to a linker-synthesized thunk which does the\n      // job with a longer code sequence.\n      i64 val = S + A - P;\n      if (T || !is_int(val, 26))\n        val = get_arm_thunk_addr() + A - P;\n      *(U32<E> *)loc = (*(U32<E> *)loc & 0xff00'0000) | bits(val, 25, 2);\n      break;\n    }\n    case R_ARM_PLT32:\n      if (sym.is_remaining_undef_weak()) {\n        *(U32<E> *)loc = 0xe320'f000; // NOP\n      } else {\n        u64 val = (T ? get_arm_thunk_addr() : S) + A - P;\n        *(U32<E> *)loc = (*(U32<E> *)loc & 0xff00'0000) | bits(val, 25, 2);\n      }\n      break;\n    case R_ARM_THM_JUMP8:\n      check(S + A - P, -(1 << 8), 1 << 8);\n      *(U16<E> *)loc &= 0xff00;\n      *(U16<E> *)loc |= bits(S + A - P, 8, 1);\n      break;\n    case R_ARM_THM_JUMP11:\n      check(S + A - P, -(1 << 11), 1 << 11);\n      *(U16<E> *)loc &= 0xf800;\n      *(U16<E> *)loc |= bits(S + A - P, 11, 1);\n      break;\n    case R_ARM_THM_JUMP19:\n      check(S + A - P, -(1 << 20), 1 << 20);\n      write_thm_b21(loc, S + A - P);\n      break;\n    case R_ARM_THM_JUMP24: {\n      if (sym.is_remaining_undef_weak()) {\n        *(U32<E> *)loc = 0x8000'f3af; // NOP\n        break;\n      }\n\n      // Just like R_ARM_JUMP24, we need to jump to a thunk if we need to\n      // switch processor mode.\n      i64 val = S + A - P;\n      if (!T || !is_int(val, 25))\n        val = get_thumb_thunk_addr() + A - P;\n      write_thm_b25(loc, val);\n      break;\n    }\n    case R_ARM_MOVW_PREL_NC:\n      write_arm_mov(loc, ((S + A) | T) - P);\n      break;\n    case R_ARM_MOVW_ABS_NC:\n      write_arm_mov(loc, (S + A) | T);\n      break;\n    case R_ARM_THM_MOVW_PREL_NC:\n      write_thm_mov(loc, ((S + A) | T) - P);\n      break;\n    case R_ARM_PREL31:\n      check(S + A - P, -(1LL << 30), 1LL << 30);\n      *(U32<E> *)loc &= 0x8000'0000;\n      *(U32<E> *)loc |= (S + A - P) & 0x7fff'ffff;\n      break;\n    case R_ARM_THM_MOVW_ABS_NC:\n      write_thm_mov(loc, (S + A) | T);\n      break;\n    case R_ARM_MOVT_PREL:\n      write_arm_mov(loc, (S + A - P) >> 16);\n      break;\n    case R_ARM_THM_MOVT_PREL:\n      write_thm_mov(loc, (S + A - P) >> 16);\n      break;\n    case R_ARM_MOVT_ABS:\n      write_arm_mov(loc, (S + A) >> 16);\n      break;\n    case R_ARM_THM_MOVT_ABS:\n      write_thm_mov(loc, (S + A) >> 16);\n      break;\n    case R_ARM_TLS_GD32:\n      *(U32<E> *)loc = sym.get_tlsgd_addr(ctx) + A - P;\n      break;\n    case R_ARM_TLS_LDM32:\n      *(U32<E> *)loc = ctx.got->get_tlsld_addr(ctx) + A - P;\n      break;\n    case R_ARM_TLS_LDO32:\n      *(U32<E> *)loc = S + A - ctx.dtp_addr;\n      break;\n    case R_ARM_TLS_IE32:\n      *(U32<E> *)loc = sym.get_gottp_addr(ctx) + A - P;\n      break;\n    case R_ARM_TLS_LE32:\n      *(U32<E> *)loc = S + A - ctx.tp_addr;\n      break;\n    case R_ARM_TLS_GOTDESC:\n      // ARM32 TLSDESC uses the following code sequence to materialize\n      // a TP-relative address in r0.\n      //\n      //       ldr     r0, .L2\n      //  .L1: bl      foo\n      //           R_ARM_TLS_CALL\n      //  .L2: .word   foo + . - .L1\n      //           R_ARM_TLS_GOTDESC\n      //\n      // We may relax the instructions to the following if its TP-relative\n      // address is known at link-time\n      //\n      //       ldr     r0, .L2\n      //  .L1: nop\n      //       ...\n      //  .L2: .word   foo(tpoff)\n      //\n      // or to the following if the TP-relative address is known at\n      // process startup time.\n      //\n      //       ldr     r0, .L2\n      //  .L1: ldr r0, [pc, r0]\n      //       ...\n      //  .L2: .word   foo(gottpoff) + . - .L1\n      if (sym.has_tlsdesc(ctx)) {\n        // A is odd if the corresponding TLS_CALL is Thumb.\n        *(U32<E> *)loc = sym.get_tlsdesc_addr(ctx) - P + A - ((A & 1) ? 6 : 4);\n      } else if (sym.has_gottp(ctx)) {\n        *(U32<E> *)loc = sym.get_gottp_addr(ctx) - P + A - ((A & 1) ? 5 : 8);\n      } else {\n        *(U32<E> *)loc = S - ctx.tp_addr;\n      }\n      break;\n    case R_ARM_TLS_CALL:\n      if (sym.has_tlsdesc(ctx)) {\n        *(U32<E> *)loc = 0xeb00'0000; // bl 0\n        *(U32<E> *)loc |= bits(get_tlsdesc_trampoline_addr() - P - 8, 25, 2);\n      } else if (sym.has_gottp(ctx)) {\n        *(U32<E> *)loc = 0xe79f'0000; // ldr r0, [pc, r0]\n      } else {\n        *(U32<E> *)loc = 0xe320'f000; // nop\n      }\n      break;\n    case R_ARM_THM_TLS_CALL:\n      if (sym.has_tlsdesc(ctx)) {\n        u64 val = align_to(get_tlsdesc_trampoline_addr() - P - 4, 4);\n        write_thm_b25(loc, val);\n        *(U16<E> *)(loc + 2) &= ~0x1000; // rewrite BL with BLX\n      } else if (sym.has_gottp(ctx)) {\n        // Since `ldr r0, [pc, r0]` is not representable in Thumb,\n        // we use two instructions instead.\n        *(U16<E> *)loc = 0x4478;         // add r0, pc\n        *(U16<E> *)(loc + 2) = 0x6800;   // ldr r0, [r0]\n      } else {\n        *(U32<E> *)loc = 0x8000'f3af;    // nop.w\n      }\n      break;\n    default:\n      Error(ctx) << *this << \": unknown relocation: \" << rel;\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_nonalloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    SectionFragment<E> *frag;\n    i64 frag_addend;\n    std::tie(frag, frag_addend) = get_fragment(ctx, rel);\n\n    u64 S = frag ? frag->get_addr(ctx) : sym.get_addr(ctx);\n    u64 A = frag ? frag_addend : get_addend(*this, rel);\n\n    switch (rel.r_type) {\n    case R_ARM_ABS32:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(U32<E> *)loc = *val;\n      else\n        *(U32<E> *)loc = S + A;\n      break;\n    case R_ARM_TLS_LDO32:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(U32<E> *)loc = *val;\n      else\n        *(U32<E> *)loc = S + A - ctx.dtp_addr;\n      break;\n    default:\n      Fatal(ctx) << *this << \": invalid relocation for non-allocated sections: \"\n                 << rel;\n      break;\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::scan_relocations(Context<E> &ctx) {\n  assert(shdr().sh_flags & SHF_ALLOC);\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  // Scan relocations\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n\n    if (sym.is_ifunc())\n      sym.flags |= NEEDS_GOT | NEEDS_PLT;\n\n    switch (rel.r_type) {\n    case R_ARM_MOVW_ABS_NC:\n    case R_ARM_THM_MOVW_ABS_NC:\n      scan_absrel(ctx, sym, rel);\n      break;\n    case R_ARM_THM_CALL:\n    case R_ARM_CALL:\n    case R_ARM_JUMP24:\n    case R_ARM_PLT32:\n    case R_ARM_THM_JUMP24:\n      if (sym.is_imported)\n        sym.flags |= NEEDS_PLT;\n      break;\n    case R_ARM_GOT_PREL:\n    case R_ARM_GOT_BREL:\n    case R_ARM_TARGET2:\n      sym.flags |= NEEDS_GOT;\n      break;\n    case R_ARM_MOVT_PREL:\n    case R_ARM_THM_MOVT_PREL:\n    case R_ARM_PREL31:\n      scan_pcrel(ctx, sym, rel);\n      break;\n    case R_ARM_TLS_GD32:\n      sym.flags |= NEEDS_TLSGD;\n      break;\n    case R_ARM_TLS_LDM32:\n      ctx.needs_tlsld = true;\n      break;\n    case R_ARM_TLS_IE32:\n      sym.flags |= NEEDS_GOTTP;\n      break;\n    case R_ARM_TLS_CALL:\n    case R_ARM_THM_TLS_CALL:\n      scan_tlsdesc(ctx, sym);\n      break;\n    case R_ARM_TLS_LE32:\n      check_tlsle(ctx, sym, rel);\n      break;\n    case R_ARM_ABS32:\n    case R_ARM_TARGET1:\n    case R_ARM_MOVT_ABS:\n    case R_ARM_THM_MOVT_ABS:\n    case R_ARM_REL32:\n    case R_ARM_BASE_PREL:\n    case R_ARM_GOTOFF32:\n    case R_ARM_THM_JUMP8:\n    case R_ARM_THM_JUMP11:\n    case R_ARM_THM_JUMP19:\n    case R_ARM_MOVW_PREL_NC:\n    case R_ARM_THM_MOVW_PREL_NC:\n    case R_ARM_TLS_LDO32:\n    case R_ARM_V4BX:\n    case R_ARM_TLS_GOTDESC:\n      break;\n    default:\n      Error(ctx) << *this << \": unknown relocation: \" << rel;\n    }\n  }\n}\n\ntemplate <>\nvoid Thunk<E>::copy_buf(Context<E> &ctx) {\n  // TLS trampoline code. ARM32's TLSDESC is designed so that this\n  // common piece of code is factored out from object files to reduce\n  // output size. Since no one provide, the linker has to synthesize it.\n  constexpr ul32 hdr[] = {\n    0xe08e'0000, // add r0, lr, r0\n    0xe590'1004, // ldr r1, [r0, #4]\n    0xe12f'ff11, // bx  r1\n    0xe320'f000, // nop\n  };\n\n  // This is a range extension and mode switch thunk.\n  // It has two entry points: +0 for Thumb and +4 for ARM.\n  constexpr u8 entry[] = {\n    // .thumb\n    0x78, 0x47,             //    bx   pc  # jumps to 1f\n    0xc0, 0x46,             //    nop\n    // .arm\n    0x00, 0xc0, 0x9f, 0xe5, // 1: ldr  ip, 3f\n    0x0f, 0xf0, 0x8c, 0xe0, // 2: add  pc, ip, pc\n    0x00, 0x00, 0x00, 0x00, // 3: .word sym - 2b\n  };\n\n  static_assert(E::thunk_hdr_size == sizeof(hdr));\n  static_assert(E::thunk_size == sizeof(entry));\n\n  u8 *base = ctx.buf + output_section.shdr.sh_offset + offset;\n  memcpy(base, hdr, sizeof(hdr));\n\n  for (i64 i = 0; i < symbols.size(); i++) {\n    u64 S = symbols[i]->get_addr(ctx);\n    u64 P = get_addr() + offsets[i];\n    u8 *buf = base + offsets[i];\n    memcpy(buf, entry, sizeof(entry));\n    *(U32<E> *)(buf + 12) = S - P - 16;\n  }\n}\n\ntemplate <>\nu64 get_eflags(Context<E> &ctx) {\n  if constexpr (E::is_le)\n    return EF_ARM_EABI_VER5;\n  else\n    return EF_ARM_EABI_VER5 | EF_ARM_BE8;\n}\n\ntemplate <>\nvoid create_arm_exidx_section<E>(Context<E> &ctx) {\n  for (i64 i = 0; i < ctx.chunks.size(); i++) {\n    OutputSection<E> *osec = ctx.chunks[i]->to_osec();\n\n    if (osec && osec->shdr.sh_type == SHT_ARM_EXIDX) {\n      auto *sec = new Arm32ExidxSection(*osec);\n      ctx.extra.exidx = sec;\n      ctx.chunks[i] = sec;\n      ctx.chunk_pool.emplace_back(sec);\n\n      for (InputSection<E> *isec : osec->members)\n        isec->is_alive = false;\n      break;\n    }\n  }\n}\n\ntemplate <>\nvoid Arm32ExidxSection<E>::compute_section_size(Context<E> &ctx) {\n  output_section.compute_section_size(ctx);\n  this->shdr.sh_size = output_section.shdr.sh_size + 8; // +8 for sentinel\n}\n\ntemplate <>\nvoid Arm32ExidxSection<E>::update_shdr(Context<E> &ctx) {\n  // .ARM.exidx's sh_link should be set to the .text section index.\n  // Runtime doesn't care about it, but the binutils's strip command does.\n  if (Chunk<E> *chunk = find_chunk(ctx, \".text\"))\n    this->shdr.sh_link = chunk->shndx;\n}\n\n// Returns the end of the text segment\nstatic u64 get_text_end(Context<E> &ctx) {\n  u64 ret = 0;\n  for (Chunk<E> *chunk : ctx.chunks)\n    if (chunk->shdr.sh_flags & SHF_EXECINSTR)\n      ret = std::max<u64>(ret, chunk->shdr.sh_addr + chunk->shdr.sh_size);\n  return ret;\n}\n\n// ARM executables use an .ARM.exidx section to look up an exception\n// handling record for the current instruction pointer. The table needs\n// to be sorted by their addresses.\n//\n// Other target uses .eh_frame_hdr instead for the same purpose.\n// I don't know why only ARM uses the different mechanism, but it's\n// likely that it's due to some historical reason.\n//\n// This function returns contents of .ARM.exidx.\ntemplate <>\nstd::vector<u8> Arm32ExidxSection<E>::get_contents(Context<E> &ctx) {\n  // .ARM.exidx records consists of a signed 31-bit relative address\n  // and a 32-bit value. The relative address indicates the start\n  // address of a function that the record covers. The value is one of\n  // the followings:\n  //\n  // 1. CANTUNWIND indicating that there's no unwinding info for the function,\n  // 2. a compact unwinding record encoded into a 32-bit value, or\n  // 3. a 31-bit relative address which points to a larger record in\n  //    the .ARM.extab section.\n  //\n  // CANTUNWIND is value 1. The most significant bit is set in (2) but\n  // not in (3). So we can distinguished them just by looking at a value.\n  const u32 CANTUNWIND = 1;\n\n  struct Entry {\n    U32<E> addr;\n    U32<E> val;\n  };\n\n  // We reserve one extra slot for the sentinel\n  i64 num_entries = output_section.shdr.sh_size / sizeof(Entry) + 1;\n  std::vector<u8> buf(num_entries * sizeof(Entry));\n  Entry *ent = (Entry *)buf.data();\n\n  // Write section contents to the buffer\n  output_section.shdr.sh_addr = this->shdr.sh_addr;\n  output_section.write_to(ctx, buf.data());\n\n  // Fill in sentinel fields\n  u64 sentinel_addr = this->shdr.sh_addr + sizeof(Entry) * (num_entries - 1);\n  ent[num_entries - 1].addr = get_text_end(ctx) - sentinel_addr;\n  ent[num_entries - 1].val = CANTUNWIND;\n\n  // Entry's addresses are relative to themselves. In order to sort\n  // records by address, we first translate them so that the addresses\n  // are relative to the beginning of the section.\n  auto is_relative = [](u32 val) {\n    return val != CANTUNWIND && !(val & 0x8000'0000);\n  };\n\n  tbb::parallel_for((i64)0, num_entries, [&](i64 i) {\n    i64 offset = sizeof(Entry) * i;\n    ent[i].addr = sign_extend(ent[i].addr, 31) + offset;\n    if (is_relative(ent[i].val))\n      ent[i].val = 0x7fff'ffff & (ent[i].val + offset);\n  });\n\n  ranges::sort(ent, ent + num_entries, {}, &Entry::addr);\n\n  // Remove duplicate adjacent entries. That is, if two adjacent functions\n  // have the same compact unwind info or are both CANTUNWIND, we can\n  // merge them into a single address range.\n  auto tail = ranges::unique(ent, ent + num_entries, {}, &Entry::val);\n  num_entries -= tail.size();\n  buf.resize(num_entries * sizeof(Entry));\n\n  // Make addresses relative to themselves.\n  tbb::parallel_for((i64)0, num_entries, [&](i64 i) {\n    i64 offset = sizeof(Entry) * i;\n    ent[i].addr = 0x7fff'ffff & (ent[i].addr - offset);\n    if (is_relative(ent[i].val))\n      ent[i].val = 0x7fff'ffff & (ent[i].val - offset);\n  });\n\n  return buf;\n}\n\ntemplate <>\nvoid Arm32ExidxSection<E>::remove_duplicate_entries(Context<E> &ctx) {\n  this->shdr.sh_size = get_contents(ctx).size();\n}\n\ntemplate <>\nvoid Arm32ExidxSection<E>::copy_buf(Context<E> &ctx) {\n  std::vector<u8> contents = get_contents(ctx);\n  assert(this->shdr.sh_size == contents.size());\n  write_vector(ctx.buf + this->shdr.sh_offset, contents);\n}\n\n// Even though using ARM32 in big-endian mode is very rare, the processor\n// technically supports both little- and big-endian modes. There are two\n// variants of big-endian mode: BE32 and BE8. In BE32, instructions and\n// data are encoded in big-endian. In BE8, instructions are encoded in\n// little-endian, and only data is in big-endian. BE8 is the de facto\n// standard for ARMv6 or later. We support only BE8.\n//\n// A tricky thing is that instructions in an object file are always\n// big-endian if the file is compiled for big-endian mode. In other words,\n// the compiler always emit code in BE32 if -mbig-endian is specified. It\n// is the linker's responsibility to rewrite instructions from big-endian\n// to little-endian for an BE8 output. This function does that.\n//\n// The text section may contain a mix of 32-bit ARM instructions, 16-bit\n// Thumb instructions, and data. We need to distinguish them to swap 4\n// bytes, 2 bytes, or not swap bytes, respectively. The beginning of ARM\n// code, Thumb code, and data is labeled with a mapping symbol of $a, $t,\n// and $d, respectively. We use mapping symbols to determine what to do\n// with the text section.\n//\n// This function is called after we copy the input section contents to the\n// output file. We rewrite instructions in the output buffer in place.\n#if MOLD_ARM32BE\nvoid arm32be_swap_bytes(Context<E> &ctx) {\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    // Collect mapping symbols\n    std::vector<Symbol<E> *> syms;\n\n    for (Symbol<E> *sym : file->get_local_syms())\n      if (InputSection<E> *isec = sym->get_input_section())\n        if (isec->is_alive && (isec->shdr().sh_flags & SHF_EXECINSTR))\n          if (std::string_view x = sym->name();\n              x == \"$a\" || x.starts_with(\"$a.\") ||\n              x == \"$t\" || x.starts_with(\"$t.\") ||\n              x == \"$d\" || x.starts_with(\"$d.\"))\n            syms.push_back(sym);\n\n    // Group mapping symbols by input section and sort by address\n    ranges::stable_sort(syms, {}, [](const Symbol<E> *sym) {\n      return std::tuple{(uintptr_t)sym->get_input_section(), sym->value};\n    });\n\n    // Swap bytes\n    for (i64 i = 0; i < syms.size(); i++) {\n      Symbol<E> &sym = *syms[i];\n      if (sym.name().starts_with(\"$d\"))\n        continue;\n\n      InputSection<E> &isec = *sym.get_input_section();\n      u8 *base = ctx.buf + isec.output_section->shdr.sh_offset + isec.offset;\n      u8 *start = base + sym.value;\n      u8 *end;\n\n      if (i + 1 < syms.size() && syms[i + 1]->get_input_section() == &isec)\n        end = base + syms[i + 1]->value;\n      else\n        end = base + isec.sh_size;\n\n      i64 sz = sym.name().starts_with(\"$a\") ? 4 : 2;\n      for (u8 *p = start; p < end; p += sz)\n        std::reverse(p, p + sz);\n    }\n  });\n}\n#endif\n\n} // namespace mold\n\n#endif\n"
  },
  {
    "path": "src/arch-arm64.cc",
    "content": "// This file contains ARM64-specific code. Being new, the ARM64's ELF\n// psABI doesn't have anything peculiar. ARM64 is a clean RISC\n// instruction set that supports PC-relative load/store instructions.\n//\n// Unlike ARM32, instructions length doesn't vary. All ARM64\n// instructions are 4 bytes long.\n//\n// Branch instructions used for function call can jump within ±128 MiB.\n// We need to create range extension thunks to support binaries whose\n// .text is larger than that.\n//\n// Unlike most other targets, the TLSDESC access model is used by default\n// for -fPIC to access thread-local variables instead of the less\n// efficient GD model. You can still enable GD but it needs the\n// -mtls-dialect=trad flag. Since GD is used rarely, we don't need to\n// implement GD → LE relaxation.\n//\n// https://github.com/ARM-software/abi-aa/blob/main/aaelf64/aaelf64.rst\n\n#if MOLD_ARM64LE || MOLD_ARM64BE\n\n#include \"mold.h\"\n\nnamespace mold {\n\nusing E = MOLD_TARGET;\n\nstatic void write_adrp(u8 *buf, u64 val) {\n  *(ul32 *)buf |= (bits(val, 13, 12) << 29) | (bits(val, 32, 14) << 5);\n}\n\nstatic void write_adr(u8 *buf, u64 val) {\n  *(ul32 *)buf |= (bits(val, 1, 0) << 29) | (bits(val, 20, 2) << 5);\n}\n\nstatic void write_movn_movz(u8 *buf, i64 val) {\n  *(ul32 *)buf &= 0b0000'0000'0110'0000'0000'0000'0001'1111;\n\n  if (val >= 0)\n    *(ul32 *)buf |= 0xd280'0000 | (bits(val, 15, 0) << 5);  // rewrite to movz\n  else\n    *(ul32 *)buf |= 0x9280'0000 | (bits(~val, 15, 0) << 5); // rewrite to movn\n}\n\nstatic u64 page(u64 val) {\n  return val & 0xffff'ffff'ffff'f000;\n}\n\ntemplate <>\nvoid write_plt_header(Context<E> &ctx, u8 *buf) {\n  constexpr ul32 insn[] = {\n    0xa9bf'7bf0, // stp  x16, x30, [sp,#-16]!\n    0x9000'0010, // adrp x16, .got.plt[2]\n    0xf940'0211, // ldr  x17, [x16, .got.plt[2]]\n    0x9100'0210, // add  x16, x16, .got.plt[2]\n    0xd61f'0220, // br   x17\n    0xd420'7d00, // brk\n    0xd420'7d00, // brk\n    0xd420'7d00, // brk\n };\n\n  u64 gotplt = ctx.gotplt->shdr.sh_addr + 16;\n  u64 plt = ctx.plt->shdr.sh_addr;\n\n  memcpy(buf, insn, sizeof(insn));\n  write_adrp(buf + 4, page(gotplt) - page(plt + 4));\n  *(ul32 *)(buf + 8) |= bits(gotplt, 11, 3) << 10;\n  *(ul32 *)(buf + 12) |= (gotplt & 0xfff) << 10;\n}\n\ntemplate <>\nvoid write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  constexpr ul32 insn[] = {\n    0x9000'0010, // adrp x16, .got.plt[n]\n    0xf940'0211, // ldr  x17, [x16, .got.plt[n]]\n    0x9100'0210, // add  x16, x16, .got.plt[n]\n    0xd61f'0220, // br   x17\n  };\n\n  u64 gotplt = sym.get_gotplt_addr(ctx);\n  u64 plt = sym.get_plt_addr(ctx);\n\n  memcpy(buf, insn, sizeof(insn));\n  write_adrp(buf, page(gotplt) - page(plt));\n  *(ul32 *)(buf + 4) |= bits(gotplt, 11, 3) << 10;\n  *(ul32 *)(buf + 8) |= (gotplt & 0xfff) << 10;\n}\n\ntemplate <>\nvoid write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  constexpr ul32 insn[] = {\n    0x9000'0010, // adrp x16, GOT[n]\n    0xf940'0211, // ldr  x17, [x16, GOT[n]]\n    0xd61f'0220, // br   x17\n    0xd420'7d00, // brk\n  };\n\n  u64 got = sym.get_got_pltgot_addr(ctx);\n  u64 plt = sym.get_plt_addr(ctx);\n\n  memcpy(buf, insn, sizeof(insn));\n  write_adrp(buf, page(got) - page(plt));\n  *(ul32 *)(buf + 4) |= bits(got, 11, 3) << 10;\n}\n\ntemplate <>\nvoid EhFrameSection<E>::apply_eh_reloc(Context<E> &ctx, const ElfRel<E> &rel,\n                                       u64 offset, u64 val) {\n  u8 *loc = ctx.buf + this->shdr.sh_offset + offset;\n\n  switch (rel.r_type) {\n  case R_NONE:\n    break;\n  case R_AARCH64_ABS64:\n    *(U64<E> *)loc = val;\n    break;\n  case R_AARCH64_PREL32:\n    *(U32<E> *)loc = val - this->shdr.sh_addr - offset;\n    break;\n  case R_AARCH64_PREL64:\n    *(U64<E> *)loc = val - this->shdr.sh_addr - offset;\n    break;\n  default:\n    Fatal(ctx) << \"unsupported relocation in .eh_frame: \" << rel;\n  }\n}\n\nstatic bool is_adrp(u8 *loc) {\n  // https://developer.arm.com/documentation/ddi0596/2021-12/Base-Instructions/ADRP--Form-PC-relative-address-to-4KB-page-\n  u32 insn = *(ul32 *)loc;\n  return (bits(insn, 31, 24) & 0b1001'1111) == 0b1001'0000;\n}\n\nstatic bool is_ldr(u8 *loc) {\n  // https://developer.arm.com/documentation/ddi0596/2021-12/Base-Instructions/LDR--immediate---Load-Register--immediate--\n  u32 insn = *(ul32 *)loc;\n  return (bits(insn, 31, 20) & 0b1111'1111'1100) == 0b1111'1001'0100;\n}\n\nstatic bool is_add(u8 *loc) {\n  // https://developer.arm.com/documentation/ddi0596/2021-12/Base-Instructions/ADD--immediate---Add--immediate--\n  u32 insn = *(ul32 *)loc;\n  return (bits(insn, 31, 20) & 0b1111'1111'1100) == 0b1001'0001'0000;\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE)\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    u64 S = sym.get_addr(ctx);\n    u64 A = rel.r_addend;\n    u64 P = get_addr() + rel.r_offset;\n    u64 G = sym.get_got_idx(ctx) * sizeof(Word<E>);\n    u64 GOT = ctx.got->shdr.sh_addr;\n\n    auto check = [&](i64 val, i64 lo, i64 hi) {\n      check_range(ctx, i, val, lo, hi);\n    };\n\n    switch (rel.r_type) {\n    case R_AARCH64_ABS64:\n      break;\n    case R_AARCH64_LDST8_ABS_LO12_NC:\n    case R_AARCH64_ADD_ABS_LO12_NC:\n      *(ul32 *)loc |= bits(S + A, 11, 0) << 10;\n      break;\n    case R_AARCH64_LDST16_ABS_LO12_NC:\n      *(ul32 *)loc |= bits(S + A, 11, 1) << 10;\n      break;\n    case R_AARCH64_LDST32_ABS_LO12_NC:\n      *(ul32 *)loc |= bits(S + A, 11, 2) << 10;\n      break;\n    case R_AARCH64_LDST64_ABS_LO12_NC:\n      *(ul32 *)loc |= bits(S + A, 11, 3) << 10;\n      break;\n    case R_AARCH64_LDST128_ABS_LO12_NC:\n      *(ul32 *)loc |= bits(S + A, 11, 4) << 10;\n      break;\n    case R_AARCH64_MOVW_UABS_G0:\n      check(S + A, 0, 1 << 16);\n      *(ul32 *)loc |= bits(S + A, 15, 0) << 5;\n      break;\n    case R_AARCH64_MOVW_UABS_G0_NC:\n      *(ul32 *)loc |= bits(S + A, 15, 0) << 5;\n      break;\n    case R_AARCH64_MOVW_UABS_G1:\n      check(S + A, 0, 1LL << 32);\n      *(ul32 *)loc |= bits(S + A, 31, 16) << 5;\n      break;\n    case R_AARCH64_MOVW_UABS_G1_NC:\n      *(ul32 *)loc |= bits(S + A, 31, 16) << 5;\n      break;\n    case R_AARCH64_MOVW_UABS_G2:\n      check(S + A, 0, 1LL << 48);\n      *(ul32 *)loc |= bits(S + A, 47, 32) << 5;\n      break;\n    case R_AARCH64_MOVW_UABS_G2_NC:\n      *(ul32 *)loc |= bits(S + A, 47, 32) << 5;\n      break;\n    case R_AARCH64_MOVW_UABS_G3:\n      *(ul32 *)loc |= bits(S + A, 63, 48) << 5;\n      break;\n    case R_AARCH64_ADR_GOT_PAGE:\n      if (sym.has_got(ctx)) {\n        i64 val = page(G + GOT + A) - page(P);\n        check(val, -(1LL << 32), 1LL << 32);\n        write_adrp(loc, val);\n      } else {\n        // Relax GOT-loading ADRP+LDR to an immediate ADRP+ADD\n        i64 val = page(S + A) - page(P);\n        check(val, -(1LL << 32), 1LL << 32);\n        write_adrp(loc, val);\n\n        u32 reg = bits(*(ul32 *)loc, 4, 0);\n        *(ul32 *)(loc + 4) = 0x9100'0000 | (reg << 5) | reg; // ADD\n        *(ul32 *)(loc + 4) |= bits(S + A, 11, 0) << 10;\n        i++;\n      }\n      break;\n    case R_AARCH64_ADR_PREL_PG_HI21:\n    case R_AARCH64_ADR_PREL_PG_HI21_NC: {\n      // The ARM64 psABI defines that an `ADRP x0, foo` and `ADD x0, x0,\n      // :lo12: foo` instruction pair to materialize a PC-relative address\n      // in a register can be relaxed to `NOP` followed by `ADR x0, foo`\n      // if foo is in PC ± 1 MiB.\n      if (ctx.arg.relax && sym.is_pcrel_linktime_const(ctx) &&\n          i + 1 < rels.size()) {\n        i64 val = S + A - P - 4;\n        const ElfRel<E> &rel2 = rels[i + 1];\n        if (is_int(val, 21) &&\n            rel2.r_type == R_AARCH64_ADD_ABS_LO12_NC &&\n            rel2.r_sym == rel.r_sym &&\n            rel2.r_offset == rel.r_offset + 4 &&\n            rel2.r_addend == rel.r_addend &&\n            is_adrp(loc) &&\n            is_add(loc + 4)) {\n          u32 reg1 = bits(*(ul32 *)loc, 4, 0);\n          u32 reg2 = bits(*(ul32 *)(loc + 4), 4, 0);\n          if (reg1 == reg2) {\n            *(ul32 *)loc = 0xd503'201f;              // nop\n            *(ul32 *)(loc + 4) = 0x1000'0000 | reg1; // adr\n            write_adr(loc + 4, val);\n            i++;\n            break;\n          }\n        }\n      }\n\n      i64 val = page(S + A) - page(P);\n      if (rel.r_type == R_AARCH64_ADR_PREL_PG_HI21)\n        check(val, -(1LL << 32), 1LL << 32);\n      write_adrp(loc, val);\n      break;\n    }\n    case R_AARCH64_ADR_PREL_LO21:\n      check(S + A - P, -(1LL << 20), 1LL << 20);\n      write_adr(loc, S + A - P);\n      break;\n    case R_AARCH64_CALL26:\n    case R_AARCH64_JUMP26: {\n      if (sym.is_remaining_undef_weak()) {\n        // On ARM, calling an weak undefined symbol jumps to the\n        // next instruction.\n        *(ul32 *)loc = 0xd503'201f; // nop\n        break;\n      }\n\n      i64 val = S + A - P;\n      if (!is_int(val, 28))\n        val = sym.get_thunk_addr(ctx, P) + A - P;\n      *(ul32 *)loc |= bits(val, 27, 2);\n      break;\n    }\n    case R_AARCH64_PLT32:\n      check(S + A - P, -(1LL << 31), 1LL << 31);\n      *(U32<E> *)loc = S + A - P;\n      break;\n    case R_AARCH64_CONDBR19:\n    case R_AARCH64_LD_PREL_LO19:\n      check(S + A - P, -(1LL << 20), 1LL << 20);\n      *(ul32 *)loc |= bits(S + A - P, 20, 2) << 5;\n      break;\n    case R_AARCH64_PREL16:\n      check(S + A - P, -(1LL << 15), 1LL << 16);\n      *(U16<E> *)loc = S + A - P;\n      break;\n    case R_AARCH64_PREL32:\n      check(S + A - P, -(1LL << 31), 1LL << 32);\n      *(U32<E> *)loc = S + A - P;\n      break;\n    case R_AARCH64_PREL64:\n      *(U64<E> *)loc = S + A - P;\n      break;\n    case R_AARCH64_LD64_GOT_LO12_NC:\n      *(ul32 *)loc |= bits(G + GOT + A, 11, 3) << 10;\n      break;\n    case R_AARCH64_LD64_GOTPAGE_LO15: {\n      i64 val = G + GOT + A - page(GOT);\n      check(val, 0, 1 << 15);\n      *(ul32 *)loc |= bits(val, 14, 3) << 10;\n      break;\n    }\n    case R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21: {\n      i64 val = page(sym.get_gottp_addr(ctx) + A) - page(P);\n      check(val, -(1LL << 32), 1LL << 32);\n      write_adrp(loc, val);\n      break;\n    }\n    case R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:\n      *(ul32 *)loc |= bits(sym.get_gottp_addr(ctx) + A, 11, 3) << 10;\n      break;\n    case R_AARCH64_TLSLE_MOVW_TPREL_G0: {\n      i64 val = S + A - ctx.tp_addr;\n      check(val, -(1 << 15), 1 << 15);\n      write_movn_movz(loc, val);\n      break;\n    }\n    case R_AARCH64_TLSLE_MOVW_TPREL_G0_NC:\n      *(ul32 *)loc |= bits(S + A - ctx.tp_addr, 15, 0) << 5;\n      break;\n    case R_AARCH64_TLSLE_MOVW_TPREL_G1: {\n      i64 val = S + A - ctx.tp_addr;\n      check(val, -(1LL << 31), 1LL << 31);\n      write_movn_movz(loc, val >> 16);\n      break;\n    }\n    case R_AARCH64_TLSLE_MOVW_TPREL_G1_NC:\n      *(ul32 *)loc |= bits(S + A - ctx.tp_addr, 31, 16) << 5;\n      break;\n    case R_AARCH64_TLSLE_MOVW_TPREL_G2: {\n      i64 val = S + A - ctx.tp_addr;\n      check(val, -(1LL << 47), 1LL << 47);\n      write_movn_movz(loc, val >> 32);\n      break;\n    }\n    case R_AARCH64_TLSLE_ADD_TPREL_HI12: {\n      i64 val = S + A - ctx.tp_addr;\n      check(val, 0, 1LL << 24);\n      *(ul32 *)loc |= bits(val, 23, 12) << 10;\n      break;\n    }\n    case R_AARCH64_TLSLE_ADD_TPREL_LO12:\n      check(S + A - ctx.tp_addr, 0, 1 << 12);\n      *(ul32 *)loc |= bits(S + A - ctx.tp_addr, 11, 0) << 10;\n      break;\n    case R_AARCH64_TLSLE_ADD_TPREL_LO12_NC:\n      *(ul32 *)loc |= bits(S + A - ctx.tp_addr, 11, 0) << 10;\n      break;\n    case R_AARCH64_TLSGD_ADR_PAGE21: {\n      i64 val = page(sym.get_tlsgd_addr(ctx) + A) - page(P);\n      check(val, -(1LL << 32), 1LL << 32);\n      write_adrp(loc, val);\n      break;\n    }\n    case R_AARCH64_TLSGD_ADD_LO12_NC:\n      *(ul32 *)loc |= bits(sym.get_tlsgd_addr(ctx) + A, 11, 0) << 10;\n      break;\n    case R_AARCH64_TLSDESC_ADR_PAGE21:\n      // ARM64 TLSDESC uses the following code sequence to materialize\n      // a TP-relative address in x0.\n      //\n      //   adrp    x0, 0\n      //       R_AARCH64_TLSDESC_ADR_PAGE21 foo\n      //   ldr     x1, [x0]\n      //       R_AARCH64_TLSDESC_LD64_LO12  foo\n      //   add     x0, x0, #0\n      //       R_AARCH64_TLSDESC_ADD_LO12   foo\n      //   blr     x1\n      //       R_AARCH64_TLSDESC_CALL       foo\n      //\n      // We may relax the instructions to the following if its TP-relative\n      // address is known at link-time\n      //\n      //   nop\n      //   nop\n      //   movz    x0, :tls_offset_hi:foo, lsl #16\n      //   movk    x0, :tls_offset_lo:foo\n      //\n      // or to the following if the TP-relative address is known at\n      // process startup time.\n      //\n      //   nop\n      //   nop\n      //   adrp    x0, :gottprel:foo\n      //   ldr     x0, [x0, :gottprel_lo12:foo]\n      if (sym.has_tlsdesc(ctx)) {\n        i64 val = page(sym.get_tlsdesc_addr(ctx) + A) - page(P);\n        check(val, -(1LL << 32), 1LL << 32);\n        write_adrp(loc, val);\n      } else {\n        *(ul32 *)loc = 0xd503'201f; // nop\n      }\n      break;\n    case R_AARCH64_TLSDESC_LD64_LO12:\n      if (sym.has_tlsdesc(ctx))\n        *(ul32 *)loc |= bits(sym.get_tlsdesc_addr(ctx) + A, 11, 3) << 10;\n      else\n        *(ul32 *)loc = 0xd503'201f; // nop\n      break;\n    case R_AARCH64_TLSDESC_ADD_LO12:\n      if (sym.has_tlsdesc(ctx)) {\n        *(ul32 *)loc |= bits(sym.get_tlsdesc_addr(ctx) + A, 11, 0) << 10;\n      } else if (sym.has_gottp(ctx)) {\n        *(ul32 *)loc = 0x9000'0000; // adrp x0, 0\n        write_adrp(loc, page(sym.get_gottp_addr(ctx) + A) - page(P));\n      } else {\n        *(ul32 *)loc = 0xd2a0'0000; // movz x0, 0, lsl #16\n        *(ul32 *)loc |= bits(S + A - ctx.tp_addr, 32, 16) << 5;\n      }\n      break;\n    case R_AARCH64_TLSDESC_CALL:\n      if (sym.has_tlsdesc(ctx)) {\n        // Do nothing\n      } else if (sym.has_gottp(ctx)) {\n        *(ul32 *)loc = 0xf940'0000; // ldr x0, [x0, 0]\n        *(ul32 *)loc |= bits(sym.get_gottp_addr(ctx) + A, 11, 3) << 10;\n      } else {\n        *(ul32 *)loc = 0xf280'0000; // movk x0, 0\n        *(ul32 *)loc |= bits(S + A - ctx.tp_addr, 15, 0) << 5;\n      }\n      break;\n    default:\n      unreachable();\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_nonalloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    SectionFragment<E> *frag;\n    i64 frag_addend;\n    std::tie(frag, frag_addend) = get_fragment(ctx, rel);\n\n    u64 S = frag ? frag->get_addr(ctx) : sym.get_addr(ctx);\n    u64 A = frag ? frag_addend : (i64)rel.r_addend;\n\n    auto check = [&](i64 val, i64 lo, i64 hi) {\n      check_range(ctx, val, i, lo, hi);\n    };\n\n    switch (rel.r_type) {\n    case R_AARCH64_ABS64:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(U64<E> *)loc = *val;\n      else\n        *(U64<E> *)loc = S + A;\n      break;\n    case R_AARCH64_ABS32:\n      check(S + A, 0, 1LL << 32);\n      *(U32<E> *)loc = S + A;\n      break;\n    default:\n      Fatal(ctx) << *this << \": invalid relocation for non-allocated sections: \"\n                 << rel;\n      break;\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::scan_relocations(Context<E> &ctx) {\n  assert(shdr().sh_flags & SHF_ALLOC);\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  // Scan relocations\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = (u8 *)(contents.data() + rel.r_offset);\n\n    if (sym.is_ifunc())\n      sym.flags |= NEEDS_GOT | NEEDS_PLT;\n\n    switch (rel.r_type) {\n    case R_AARCH64_MOVW_UABS_G3:\n      scan_absrel(ctx, sym, rel);\n      break;\n    case R_AARCH64_ADR_GOT_PAGE:\n      // An ADR_GOT_PAGE and GOT_LO12_NC relocation pair is used to load a\n      // symbol's address from GOT. If the GOT value is a link-time\n      // constant, we may be able to rewrite the ADRP+LDR instruction pair\n      // with an ADRP+ADD, eliminating a GOT memory load.\n      if (ctx.arg.relax && sym.is_pcrel_linktime_const(ctx) &&\n          i + 1 < rels.size()) {\n        // ADRP+LDR must be consecutive and use the same register to relax.\n        const ElfRel<E> &rel2 = rels[i + 1];\n        if (rel2.r_type == R_AARCH64_LD64_GOT_LO12_NC &&\n            rel2.r_offset == rel.r_offset + 4 &&\n            rel2.r_sym == rel.r_sym &&\n            rel.r_addend == 0 &&\n            rel2.r_addend == 0 &&\n            is_adrp(loc) &&\n            is_ldr(loc + 4)) {\n          u32 rd = bits(*(ul32 *)loc, 4, 0);\n          u32 rn = bits(*(ul32 *)(loc + 4), 9, 5);\n          u32 rt = bits(*(ul32 *)(loc + 4), 4, 0);\n          if (rd == rn && rn == rt) {\n            i++;\n            break;\n          }\n        }\n      }\n      sym.flags |= NEEDS_GOT;\n      break;\n    case R_AARCH64_LD64_GOT_LO12_NC:\n    case R_AARCH64_LD64_GOTPAGE_LO15:\n      sym.flags |= NEEDS_GOT;\n      break;\n    case R_AARCH64_CALL26:\n    case R_AARCH64_JUMP26:\n    case R_AARCH64_PLT32:\n      if (sym.is_imported)\n        sym.flags |= NEEDS_PLT;\n      break;\n    case R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21:\n    case R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:\n      sym.flags |= NEEDS_GOTTP;\n      break;\n    case R_AARCH64_ADR_PREL_PG_HI21:\n    case R_AARCH64_ADR_PREL_PG_HI21_NC:\n      scan_pcrel(ctx, sym, rel);\n      break;\n    case R_AARCH64_TLSGD_ADR_PAGE21:\n      sym.flags |= NEEDS_TLSGD;\n      break;\n    case R_AARCH64_TLSDESC_CALL:\n      scan_tlsdesc(ctx, sym);\n      break;\n    case R_AARCH64_TLSLE_MOVW_TPREL_G2:\n    case R_AARCH64_TLSLE_ADD_TPREL_LO12:\n    case R_AARCH64_TLSLE_ADD_TPREL_LO12_NC:\n      check_tlsle(ctx, sym, rel);\n      break;\n    case R_AARCH64_ABS64:\n    case R_AARCH64_ADD_ABS_LO12_NC:\n    case R_AARCH64_ADR_PREL_LO21:\n    case R_AARCH64_CONDBR19:\n    case R_AARCH64_LD_PREL_LO19:\n    case R_AARCH64_LDST16_ABS_LO12_NC:\n    case R_AARCH64_LDST32_ABS_LO12_NC:\n    case R_AARCH64_LDST64_ABS_LO12_NC:\n    case R_AARCH64_LDST128_ABS_LO12_NC:\n    case R_AARCH64_LDST8_ABS_LO12_NC:\n    case R_AARCH64_MOVW_UABS_G0:\n    case R_AARCH64_MOVW_UABS_G0_NC:\n    case R_AARCH64_MOVW_UABS_G1:\n    case R_AARCH64_MOVW_UABS_G1_NC:\n    case R_AARCH64_MOVW_UABS_G2:\n    case R_AARCH64_MOVW_UABS_G2_NC:\n    case R_AARCH64_PREL16:\n    case R_AARCH64_PREL32:\n    case R_AARCH64_PREL64:\n    case R_AARCH64_TLSGD_ADD_LO12_NC:\n    case R_AARCH64_TLSLE_MOVW_TPREL_G0:\n    case R_AARCH64_TLSLE_MOVW_TPREL_G0_NC:\n    case R_AARCH64_TLSLE_MOVW_TPREL_G1:\n    case R_AARCH64_TLSLE_MOVW_TPREL_G1_NC:\n    case R_AARCH64_TLSLE_ADD_TPREL_HI12:\n    case R_AARCH64_TLSDESC_ADR_PAGE21:\n    case R_AARCH64_TLSDESC_LD64_LO12:\n    case R_AARCH64_TLSDESC_ADD_LO12:\n      break;\n    default:\n      Error(ctx) << *this << \": unknown relocation: \" << rel;\n    }\n  }\n}\n\n// The size of a thunk entry varies on ARM64 depending on the distance to\n// the branch target. This function computes the size of each thunk entry.\ntemplate <>\nvoid Thunk<E>::shrink_size(Context<E> &ctx) {\n  offsets.clear();\n  offsets.push_back(0);\n  i64 off = 0;\n\n  // The distance between S and P is only reduced by shrink_size(), but\n  // page(S) – page(P) may still increase by one page due to address\n  // changes, so we add a safety margin.\n  //\n  // For example, page(0x1200) – page(0x1000) is 0, whereas\n  // page(0x1100) – page(0xfff) is 0x1000, even though the latter\n  // distance is shorter than the former.\n  auto is_small = [](i64 prel) {\n    return is_int(prel + 0x1000, 33) && is_int(prel - 0x1000, 33);\n  };\n\n  for (Symbol<E> *sym : symbols) {\n    u64 S = sym->get_addr(ctx);\n    u64 P = get_addr() + off;\n    i64 prel = page(S) - page(P);\n    off += is_small(prel) ? 16 : 32;\n    offsets.push_back(off);\n  }\n}\n\ntemplate <>\nvoid Thunk<E>::copy_buf(Context<E> &ctx) {\n  // Short thunk with a 33 bit displacement\n  constexpr ul32 insn1[] = {\n    0x9000'0010, // adrp x16, 0\n    0x9100'0210, // add  x16, x16\n    0xd61f'0200, // br   x16\n    0xd420'7d00, // brk\n  };\n\n  // Long thunk with a 64 bit displacement\n  constexpr ul32 insn2[] = {\n    0x1000'0010, // adr  x16, 0\n    0xd2a0'0011, // movz x17, 0, lsl #16\n    0xf2c0'0011, // movk x17, 0, lsl #32\n    0xf2e0'0011, // movk x17, 0, lsl #48\n    0x8b11'0210, // add  x16, x16, x17\n    0xd61f'0200, // br   x16\n    0xd420'7d00, // brk\n    0xd420'7d00, // brk\n  };\n\n  u8 *base = ctx.buf + output_section.shdr.sh_offset + offset;\n\n  for (i64 i = 0; i < symbols.size(); i++) {\n    u64 S = symbols[i]->get_addr(ctx);\n    u64 P = get_addr() + offsets[i];\n    u8 *buf = base + offsets[i];\n\n    if (offsets[i + 1] - offsets[i] == 16) {\n      i64 prel = page(S) - page(P);\n      assert(is_int(prel, 33));\n      memcpy(buf, insn1, sizeof(insn1));\n      write_adrp(buf, prel);\n      *(ul32 *)(buf + 4) |= bits(S, 11, 0) << 10;\n    } else {\n      memcpy(buf, insn2, sizeof(insn2));\n      write_adr(buf, bits(S - P, 15, 0));\n      *(ul32 *)(buf + 4) |= bits(S - P, 31, 16) << 5;\n      *(ul32 *)(buf + 8) |= bits(S - P, 47, 32) << 5;\n      *(ul32 *)(buf + 12) |= bits(S - P, 63, 48) << 5;\n    }\n  }\n}\n\ntemplate class Thunk<E>;\n\n} // namespace mold\n\n#endif\n"
  },
  {
    "path": "src/arch-i386.cc",
    "content": "// i386 is similar to x86-64 but lacks PC-relative memory access\n// instructions. So it's not straightforward to support position-\n// independent code (PIC) on that target.\n//\n// If an object file is compiled with -fPIC, a function that needs to load\n// a value from memory first obtains its own address with the following\n// code\n//\n//   call __x86.get_pc_thunk.bx\n//\n// where __x86.get_pc_thunk.bx is defined as\n//\n//   __x86.get_pc_thunk.bx:\n//     mov (%esp), %ebx  # move the return address to %ebx\n//     ret\n//\n// . With the function's own address (or, more precisely, the address\n// immediately after the call instruction), the function can compute an\n// absolute address of a variable with its address + link-time constant.\n//\n// Executing call-mov-ret isn't very cheap, and allocating one register to\n// store PC isn't cheap too, especially given that i386 has only 8\n// general-purpose registers. But that's the cost of PIC on i386. You need\n// to pay it when creating a .so and a position-independent executable.\n//\n// When a position-independent function calls another function, it sets\n// %ebx to the address of .got. Position-independent PLT entries use that\n// register to load values from .got.plt/.got.\n//\n// If we are creating a position-dependent executable (PDE), we can't\n// assume that %ebx is set to .got. For PDE, we need to create position-\n// dependent PLT entries which don't use %ebx.\n//\n// https://github.com/rui314/psabi/blob/main/i386.pdf\n\n#if MOLD_I386\n\n#include \"mold.h\"\n\nnamespace mold {\n\nusing E = I386;\n\ntemplate <>\ni64 get_addend(u8 *loc, const ElfRel<E> &rel) {\n  switch (rel.r_type) {\n  case R_386_8:\n  case R_386_PC8:\n    return *loc;\n  case R_386_16:\n  case R_386_PC16:\n    return *(ul16 *)loc;\n  case R_386_32:\n  case R_386_PC32:\n  case R_386_GOT32:\n  case R_386_GOT32X:\n  case R_386_PLT32:\n  case R_386_GOTOFF:\n  case R_386_GOTPC:\n  case R_386_TLS_LDM:\n  case R_386_TLS_GOTIE:\n  case R_386_TLS_LE:\n  case R_386_TLS_IE:\n  case R_386_TLS_GD:\n  case R_386_TLS_LDO_32:\n  case R_386_SIZE32:\n  case R_386_TLS_GOTDESC:\n    return *(ul32 *)loc;\n  default:\n    return 0;\n  }\n}\n\ntemplate <>\nvoid write_addend(u8 *loc, i64 val, const ElfRel<E> &rel) {\n  switch (rel.r_type) {\n  case R_386_NONE:\n    break;\n  case R_386_8:\n  case R_386_PC8:\n    *loc = val;\n    break;\n  case R_386_16:\n  case R_386_PC16:\n    *(ul16 *)loc = val;\n    break;\n  case R_386_32:\n  case R_386_PC32:\n  case R_386_GOT32:\n  case R_386_GOT32X:\n  case R_386_PLT32:\n  case R_386_GOTOFF:\n  case R_386_GOTPC:\n  case R_386_TLS_LDM:\n  case R_386_TLS_GOTIE:\n  case R_386_TLS_LE:\n  case R_386_TLS_IE:\n  case R_386_TLS_GD:\n  case R_386_TLS_LDO_32:\n  case R_386_SIZE32:\n  case R_386_TLS_GOTDESC:\n    *(ul32 *)loc = val;\n    break;\n  default:\n    unreachable();\n  }\n}\n\ntemplate <>\nvoid write_plt_header(Context<E> &ctx, u8 *buf) {\n  if (ctx.arg.pic) {\n    static const u8 insn[] = {\n      0x51,                   // push   %ecx\n      0x8d, 0x8b, 0, 0, 0, 0, // lea    GOTPLT+4(%ebx), %ecx\n      0xff, 0x31,             // push   (%ecx)\n      0xff, 0x61, 0x04,       // jmp    *0x4(%ecx)\n      0xcc, 0xcc, 0xcc, 0xcc, // (padding)\n    };\n    memcpy(buf, insn, sizeof(insn));\n    *(ul32 *)(buf + 3) = ctx.gotplt->shdr.sh_addr - ctx.got->shdr.sh_addr + 4;\n  } else {\n    static const u8 insn[] = {\n      0x51,                         // push   %ecx\n      0xb9, 0, 0, 0, 0,             // mov    GOTPLT+4, %ecx\n      0xff, 0x31,                   // push   (%ecx)\n      0xff, 0x61, 0x04,             // jmp    *0x4(%ecx)\n      0xcc, 0xcc, 0xcc, 0xcc, 0xcc, // (padding)\n    };\n    memcpy(buf, insn, sizeof(insn));\n    *(ul32 *)(buf + 2) = ctx.gotplt->shdr.sh_addr + 4;\n  }\n}\n\ntemplate <>\nvoid write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  if (ctx.arg.pic) {\n    static const u8 insn[] = {\n      0xb9, 0, 0, 0, 0,             // mov $reloc_offset, %ecx\n      0xff, 0xa3, 0, 0, 0, 0,       // jmp *foo@GOT(%ebx)\n      0xcc, 0xcc, 0xcc, 0xcc, 0xcc, // (padding)\n    };\n    memcpy(buf, insn, sizeof(insn));\n    *(ul32 *)(buf + 1) = sym.get_plt_idx(ctx) * sizeof(ElfRel<E>);\n    *(ul32 *)(buf + 7) = sym.get_gotplt_addr(ctx) - ctx.got->shdr.sh_addr;\n  } else {\n    static const u8 insn[] = {\n      0xb9, 0, 0, 0, 0,             // mov $reloc_offset, %ecx\n      0xff, 0x25, 0, 0, 0, 0,       // jmp *foo@GOT\n      0xcc, 0xcc, 0xcc, 0xcc, 0xcc, // (padding)\n    };\n    memcpy(buf, insn, sizeof(insn));\n    *(ul32 *)(buf + 1) = sym.get_plt_idx(ctx) * sizeof(ElfRel<E>);\n    *(ul32 *)(buf + 7) = sym.get_gotplt_addr(ctx);\n  }\n}\n\ntemplate <>\nvoid write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  if (ctx.arg.pic) {\n    static const u8 insn[] = {\n      0xff, 0xa3, 0, 0, 0, 0, // jmp *foo@GOT(%ebx)\n      0xcc, 0xcc,             // (padding)\n    };\n    memcpy(buf, insn, sizeof(insn));\n    *(ul32 *)(buf + 2) = sym.get_got_pltgot_addr(ctx) - ctx.got->shdr.sh_addr;\n  } else {\n    static const u8 insn[] = {\n      0xff, 0x25, 0, 0, 0, 0, // jmp *foo@GOT\n      0xcc, 0xcc,             // (padding)\n    };\n    memcpy(buf, insn, sizeof(insn));\n    *(ul32 *)(buf + 2) = sym.get_got_pltgot_addr(ctx);\n  }\n}\n\ntemplate <>\nvoid EhFrameSection<E>::apply_eh_reloc(Context<E> &ctx, const ElfRel<E> &rel,\n                                       u64 offset, u64 val) {\n  u8 *loc = ctx.buf + this->shdr.sh_offset + offset;\n\n  switch (rel.r_type) {\n  case R_NONE:\n    break;\n  case R_386_32:\n    *(ul32 *)loc = val;\n    break;\n  case R_386_PC32:\n    *(ul32 *)loc = val - this->shdr.sh_addr - offset;\n    break;\n  default:\n    Fatal(ctx) << \"unsupported relocation in .eh_frame: \" << rel;\n  }\n}\n\nstatic u32 relax_got32x(u8 *loc) {\n  // mov imm(%reg1), %reg2 -> lea imm(%reg1), %reg2\n  if (loc[0] == 0x8b)\n    return 0x8d00 | loc[1];\n  return 0;\n}\n\n// Relax GD to LE\nstatic void relax_gd_to_le(u8 *loc, ElfRel<E> rel, u64 val) {\n  static const u8 insn[] = {\n    0x65, 0xa1, 0, 0, 0, 0, // mov %gs:0, %eax\n    0x81, 0xc0, 0, 0, 0, 0, // add $tp_offset, %eax\n  };\n\n  switch (rel.r_type) {\n  case R_386_PLT32:\n  case R_386_PC32:\n    memcpy(loc - 3, insn, sizeof(insn));\n    *(ul32 *)(loc + 5) = val;\n    break;\n  case R_386_GOT32:\n  case R_386_GOT32X:\n    memcpy(loc - 2, insn, sizeof(insn));\n    *(ul32 *)(loc + 6) = val;\n    break;\n  default:\n    unreachable();\n  }\n}\n\n// Relax LD to LE\nstatic void relax_ld_to_le(u8 *loc, ElfRel<E> rel, u64 tls_size) {\n  switch (rel.r_type) {\n  case R_386_PLT32:\n  case R_386_PC32: {\n    static const u8 insn[] = {\n      0x65, 0xa1, 0, 0, 0, 0, // mov %gs:0, %eax\n      0x2d, 0, 0, 0, 0,       // sub $tls_size, %eax\n    };\n    memcpy(loc - 2, insn, sizeof(insn));\n    *(ul32 *)(loc + 5) = tls_size;\n    break;\n  }\n  case R_386_GOT32:\n  case R_386_GOT32X: {\n    static const u8 insn[] = {\n      0x65, 0xa1, 0, 0, 0, 0, // mov %gs:0, %eax\n      0x81, 0xe8, 0, 0, 0, 0, // sub $tls_size, %eax\n    };\n    memcpy(loc - 2, insn, sizeof(insn));\n    *(ul32 *)(loc + 6) = tls_size;\n    break;\n  }\n  default:\n    unreachable();\n  }\n}\n\nstatic u32 relax_tlsdesc_to_ie(u8 *loc) {\n  switch ((loc[0] << 8) | loc[1]) {\n  case 0x8d83: return 0x8b83; // lea 0(%ebx), %eax -> mov 0(%ebx), %eax\n  case 0x8d9b: return 0x8b9b; // lea 0(%ebx), %ebx -> mov 0(%ebx), %ebx\n  case 0x8d8b: return 0x8b8b; // lea 0(%ebx), %ecx -> mov 0(%ebx), %ecx\n  case 0x8d93: return 0x8b93; // lea 0(%ebx), %edx -> mov 0(%ebx), %edx\n  case 0x8db3: return 0x8bb3; // lea 0(%ebx), %esi -> mov 0(%ebx), %esi\n  case 0x8dbb: return 0x8bbb; // lea 0(%ebx), %edi -> mov 0(%ebx), %edi\n  case 0x8da3: return 0x8ba3; // lea 0(%ebx), %esp -> mov 0(%ebx), %esp\n  case 0x8dab: return 0x8bab; // lea 0(%ebx), %ebp -> mov 0(%ebx), %ebp\n  }\n  return 0;\n}\n\nstatic u32 relax_tlsdesc_to_le(u8 *loc) {\n  switch ((loc[0] << 8) | loc[1]) {\n  case 0x8d83: return 0x90b8; // lea 0(%ebx), %eax -> mov $0, %eax\n  case 0x8d9b: return 0x90bb; // lea 0(%ebx), %ebx -> mov $0, %ebx\n  case 0x8d8b: return 0x90b9; // lea 0(%ebx), %ecx -> mov $0, %ecx\n  case 0x8d93: return 0x90ba; // lea 0(%ebx), %edx -> mov $0, %edx\n  case 0x8db3: return 0x90be; // lea 0(%ebx), %esi -> mov $0, %esi\n  case 0x8dbb: return 0x90bf; // lea 0(%ebx), %edi -> mov $0, %edi\n  case 0x8da3: return 0x90bc; // lea 0(%ebx), %esp -> mov $0, %esp\n  case 0x8dab: return 0x90bd; // lea 0(%ebx), %ebp -> mov $0, %ebp\n  }\n  return 0;\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE)\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    u64 S = sym.get_addr(ctx);\n    u64 A = get_addend(*this, rel);\n    u64 P = get_addr() + rel.r_offset;\n    u64 G = sym.get_got_idx(ctx) * sizeof(Word<E>);\n    u64 GOT = ctx.got->shdr.sh_addr;\n\n    auto check = [&](i64 val, i64 lo, i64 hi) {\n      check_range(ctx, i, val, lo, hi);\n    };\n\n    switch (rel.r_type) {\n    case R_386_8:\n      check(S + A, 0, 1 << 8);\n      *loc = S + A;\n      break;\n    case R_386_16:\n      check(S + A, 0, 1 << 16);\n      *(ul16 *)loc = S + A;\n      break;\n    case R_386_32:\n      break;\n    case R_386_PC8:\n      check(S + A - P, -(1 << 7), 1 << 7);\n      *loc = S + A - P;\n      break;\n    case R_386_PC16:\n      check(S + A - P, -(1 << 15), 1 << 15);\n      *(ul16 *)loc = S + A - P;\n      break;\n    case R_386_PC32:\n    case R_386_PLT32:\n      *(ul32 *)loc = S + A - P;\n      break;\n    case R_386_GOT32:\n      *(ul32 *)loc = G + A;\n      break;\n    case R_386_GOT32X:\n      if (sym.has_got(ctx)) {\n        *(ul32 *)loc = G + A;\n      } else {\n        u32 insn = relax_got32x(loc - 2);\n        assert(insn);\n        loc[-2] = insn >> 8;\n        loc[-1] = insn;\n        *(ul32 *)loc = S + A - GOT;\n      }\n      break;\n    case R_386_GOTOFF:\n      *(ul32 *)loc = S + A - GOT;\n      break;\n    case R_386_GOTPC:\n      *(ul32 *)loc = GOT + A - P;\n      break;\n    case R_386_TLS_GOTIE:\n      *(ul32 *)loc = sym.get_gottp_addr(ctx) + A - GOT;\n      break;\n    case R_386_TLS_LE:\n      *(ul32 *)loc = S + A - ctx.tp_addr;\n      break;\n    case R_386_TLS_IE:\n      *(ul32 *)loc = sym.get_gottp_addr(ctx) + A;\n      break;\n    case R_386_TLS_GD:\n      if (sym.has_tlsgd(ctx))\n        *(ul32 *)loc = sym.get_tlsgd_addr(ctx) + A - GOT;\n      else\n        relax_gd_to_le(loc, rels[++i], S - ctx.tp_addr);\n      break;\n    case R_386_TLS_LDM:\n      if (ctx.got->has_tlsld(ctx))\n        *(ul32 *)loc = ctx.got->get_tlsld_addr(ctx) + A - GOT;\n      else\n        relax_ld_to_le(loc, rels[++i], ctx.tp_addr - ctx.tls_begin);\n      break;\n    case R_386_TLS_LDO_32:\n      *(ul32 *)loc = S + A - ctx.dtp_addr;\n      break;\n    case R_386_SIZE32:\n      *(ul32 *)loc = sym.esym().st_size + A;\n      break;\n    case R_386_TLS_GOTDESC:\n      // i386 TLSDESC uses the following code sequence to materialize\n      // a TP-relative address in %eax.\n      //\n      //   lea    0(%ebx), %eax\n      //       R_386_TLS_GOTDESC   foo\n      //   call   *(%eax)\n      //       R_386_TLS_DESC_CALL foo\n      //\n      // We may relax the instructions to the following if its TP-relative\n      // address is known at link-time\n      //\n      //   mov     $foo@TPOFF, %eax\n      //   nop\n      //\n      // or to the following if the TP-relative address is known at\n      // process startup time.\n      //\n      //   mov     foo@GOTTPOFF(%ebx), %eax\n      //   nop\n      //\n      // We allow the following alternative code sequence too because\n      // LLVM emits such code.\n      //\n      //   lea    0(%ebx), %reg\n      //       R_386_TLS_GOTDESC   foo\n      //   mov    %reg, %eax\n      //   call   *(%eax)\n      //       R_386_TLS_DESC_CALL foo\n      //\n      // Note that the compiler always uses the local-exec TLS model\n      // for -fno-pic, so TLSDESC code is always PIC (i.e. uses %ebx to\n      // store the address of GOT.)\n      if (sym.has_tlsdesc(ctx)) {\n        *(ul32 *)loc = sym.get_tlsdesc_addr(ctx) + A - GOT;\n      } else if (sym.has_gottp(ctx)) {\n        u32 insn = relax_tlsdesc_to_ie(loc - 2);\n        if (!insn)\n          Fatal(ctx) << *this << \": illegal instruction sequence for TLSDESC\";\n        loc[-2] = insn >> 8;\n        loc[-1] = insn;\n        *(ul32 *)loc = sym.get_gottp_addr(ctx) + A - GOT;\n      } else {\n        u32 insn = relax_tlsdesc_to_le(loc - 2);\n        if (!insn)\n          Fatal(ctx) << *this << \": illegal instruction sequence for TLSDESC\";\n        loc[-2] = insn >> 8;\n        loc[-1] = insn;\n        *(ul32 *)loc = S + A - ctx.tp_addr;\n      }\n      break;\n    case R_386_TLS_DESC_CALL:\n      if (!sym.has_tlsdesc(ctx)) {\n        // call *(%eax) -> nop\n        loc[0] = 0x66;\n        loc[1] = 0x90;\n      }\n      break;\n    default:\n      unreachable();\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_nonalloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    SectionFragment<E> *frag;\n    i64 frag_addend;\n    std::tie(frag, frag_addend) = get_fragment(ctx, rel);\n\n    u64 S = frag ? frag->get_addr(ctx) : sym.get_addr(ctx);\n    u64 A = frag ? frag_addend : get_addend(*this, rel);\n    u64 GOT = ctx.got->shdr.sh_addr;\n\n    auto check = [&](i64 val, i64 lo, i64 hi) {\n      check_range(ctx, val, i, lo, hi);\n    };\n\n    switch (rel.r_type) {\n    case R_386_8:\n      check(S + A, 0, 1 << 8);\n      *loc = S + A;\n      break;\n    case R_386_16:\n      check(S + A, 0, 1 << 16);\n      *(ul16 *)loc = S + A;\n      break;\n    case R_386_32:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(ul32 *)loc = *val;\n      else\n        *(ul32 *)loc = S + A;\n      break;\n    case R_386_PC8:\n      check(S + A, -(1 << 7), 1 << 7);\n      *loc = S + A;\n      break;\n    case R_386_PC16:\n      check(S + A, -(1 << 15), 1 << 15);\n      *(ul16 *)loc = S + A;\n      break;\n    case R_386_PC32:\n      *(ul32 *)loc = S + A;\n      break;\n    case R_386_GOTPC:\n      *(ul32 *)loc = GOT + A;\n      break;\n    case R_386_GOTOFF:\n      *(ul32 *)loc = S + A - GOT;\n      break;\n    case R_386_TLS_LDO_32:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(ul32 *)loc = *val;\n      else\n        *(ul32 *)loc = S + A - ctx.dtp_addr;\n      break;\n    case R_386_SIZE32:\n      *(ul32 *)loc = sym.esym().st_size + A;\n      break;\n    default:\n      unreachable();\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::scan_relocations(Context<E> &ctx) {\n  assert(shdr().sh_flags & SHF_ALLOC);\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  // Scan relocations\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = (u8 *)(contents.data() + rel.r_offset);\n\n    if (sym.is_ifunc())\n      sym.flags |= NEEDS_GOT | NEEDS_PLT;\n\n    if (rel.r_type == R_386_TLS_GD || rel.r_type == R_386_TLS_LDM) {\n      if (i + 1 == rels.size())\n        Fatal(ctx) << *this << \": \" << rel << \" must be followed by PLT or GOT32\";\n\n      if (u32 ty = rels[i + 1].r_type;\n          ty != R_386_PLT32 && ty != R_386_PC32 &&\n          ty != R_386_GOT32 && ty != R_386_GOT32X)\n        Fatal(ctx) << *this << \": \" << rel << \" must be followed by PLT or GOT32\";\n    }\n\n    switch (rel.r_type) {\n    case R_386_8:\n    case R_386_16:\n      scan_absrel(ctx, sym, rel);\n      break;\n    case R_386_PC8:\n    case R_386_PC16:\n    case R_386_PC32:\n      scan_pcrel(ctx, sym, rel);\n      break;\n    case R_386_GOT32:\n    case R_386_GOTPC:\n      sym.flags |= NEEDS_GOT;\n      break;\n    case R_386_GOT32X:\n      // We always want to relax GOT32X even if --no-relax is given\n      // because static PIE doesn't work without it.\n      if (sym.is_pcrel_linktime_const(ctx) && relax_got32x(loc - 2)) {\n        // Do nothing\n      } else {\n        sym.flags |= NEEDS_GOT;\n      }\n      break;\n    case R_386_PLT32:\n      if (sym.is_imported)\n        sym.flags |= NEEDS_PLT;\n      break;\n    case R_386_TLS_GOTIE:\n    case R_386_TLS_IE:\n      sym.flags |= NEEDS_GOTTP;\n      break;\n    case R_386_TLS_GD:\n      // We always relax if -static because libc.a doesn't contain\n      // __tls_get_addr().\n      if (ctx.arg.static_ || (ctx.arg.relax && sym.is_tprel_linktime_const(ctx)))\n        i++;\n      else\n        sym.flags |= NEEDS_TLSGD;\n      break;\n    case R_386_TLS_LDM:\n      // We always relax if -static because libc.a doesn't contain\n      // __tls_get_addr().\n      if (ctx.arg.static_ || (ctx.arg.relax && !ctx.arg.shared))\n        i++;\n      else\n        ctx.needs_tlsld = true;\n      break;\n    case R_386_TLS_GOTDESC:\n      scan_tlsdesc(ctx, sym);\n      break;\n    case R_386_TLS_LE:\n      check_tlsle(ctx, sym, rel);\n      break;\n    case R_386_32:\n    case R_386_GOTOFF:\n    case R_386_TLS_LDO_32:\n    case R_386_SIZE32:\n    case R_386_TLS_DESC_CALL:\n      break;\n    default:\n      Error(ctx) << *this << \": unknown relocation: \" << rel;\n    }\n  }\n}\n\n} // namespace mold\n\n#endif\n"
  },
  {
    "path": "src/arch-loongarch.cc",
    "content": "// LoongArch is a new RISC ISA announced in 2021 by Loongson. The ISA\n// feels like a modernized MIPS with a hint of RISC-V flavor, although\n// it's not compatible with either one.\n//\n// While LoongArch is a fresh and clean ISA, its technological advantage\n// over other modern RISC ISAs such as RISC-V doesn't seem to be very\n// significant. It appears that the real selling point of LoongArch is\n// that the ISA is developed and controlled by a Chinese company,\n// reflecting a desire for domestic CPUs. Loongson is actively working on\n// bootstrapping the entire ecosystem for LoongArch, sending patches to\n// Linux, GCC, LLVM, etc.\n//\n// Speaking of the ISA, all instructions are 4 byte long and aligned to 4\n// byte boundaries in LoongArch. It has 32 general-purpose registers.\n// Among these, $t0 - $t8 (aliases for $r12 - $r20) are temporary\n// registers that we can use in our PLT.\n//\n// Just like RISC-V, LoongArch supports section-shrinking relaxations.\n// That is, it allows linkers to rewrite certain instruction sequences to\n// shorter ones. Sections are not an atomic unit of copying.\n//\n// https://github.com/loongson/la-abi-specs/blob/release/laelf.adoc\n\n#if MOLD_LOONGARCH64 || MOLD_LOONGARCH32\n\n#include \"mold.h\"\n\nnamespace mold {\n\nusing E = MOLD_TARGET;\n\nstatic u64 page(u64 val) {\n  return val & 0xffff'ffff'ffff'f000;\n}\n\nstatic u64 hi20(u64 val, u64 pc) {\n  // A PC-relative address with a 32 bit offset is materialized in a\n  // register with the following instructions:\n  //\n  //   pcalau12i $rN, %pc_hi20(sym)\n  //   addi.d    $rN, $rN, %lo12(sym)\n  //\n  // PCALAU12I materializes bits [63:12] by computing (pc + imm << 12)\n  // and zero-clear [11:0]. ADDI.D sign-extends its 12 bit immediate and\n  // add it to the register. To compensate the sign-extension, PCALAU12I\n  // needs to materialize a 0x1000 larger value than the desired [63:12]\n  // if [11:0] is sign-extended.\n  //\n  // This is similar but different from RISC-V because RISC-V's AUIPC\n  // doesn't zero-clear [11:0].\n  return bits(page(val + 0x800) - page(pc), 31, 12);\n}\n\nstatic u64 higher(u64 val, u64 pc) {\n  // A PC-relative 64-bit address is materialized with the following\n  // instructions for the large code model:\n  //\n  //   pcalau12i $rN, %pc_hi20(sym)\n  //   addi.d    $rM, $zero, %lo12(sym)\n  //   lu32i.d   $rM, %pc64_lo20(sym)\n  //   lu52i.d   $rM, $r12, %pc64_hi12(sym)\n  //   add.d     $rN, $rN, $rM\n  //\n  // PCALAU12I computes (pc + imm << 12) to materialize a 64-bit value.\n  // ADDI.D adds a sign-extended 12 bit value to a register. LU32I.D and\n  // LU52I.D simply set bits to [51:31] and to [63:53], respectively.\n  //\n  // Compensating all the sign-extensions is a bit complicated. The\n  // psABI gives the following formula.\n  val = val + 0x8000'0000 + ((val & 0x800) ? (0x1000 - 0x1'0000'0000) : 0);\n  return page(val) - page(pc - 8);\n}\n\nstatic u64 higher20(u64 val, u64 pc) {\n  return bits(higher(val, pc), 51, 32);\n}\n\nstatic u64 highest12(u64 val, u64 pc) {\n  return bits(higher(val, pc), 63, 52);\n}\n\nstatic void write_k12(u8 *loc, u32 val) {\n  // opcode, [11:0], rj, rd\n  *(ul32 *)loc &= 0b1111111111'000000000000'11111'11111;\n  *(ul32 *)loc |= bits(val, 11, 0) << 10;\n}\n\nstatic void write_k16(u8 *loc, u32 val) {\n  // opcode, [15:0], rj, rd\n  *(ul32 *)loc &= 0b111111'0000000000000000'11111'11111;\n  *(ul32 *)loc |= bits(val, 15, 0) << 10;\n}\n\nstatic void write_j20(u8 *loc, u32 val) {\n  // opcode, [19:0], rd\n  *(ul32 *)loc &= 0b1111111'00000000000000000000'11111;\n  *(ul32 *)loc |= bits(val, 19, 0) << 5;\n}\n\nstatic void write_d5k16(u8 *loc, u32 val) {\n  // opcode, [15:0], rj, [20:16]\n  *(ul32 *)loc &= 0b111111'0000000000000000'11111'00000;\n  *(ul32 *)loc |= bits(val, 15, 0) << 10;\n  *(ul32 *)loc |= bits(val, 20, 16);\n}\n\nstatic void write_d10k16(u8 *loc, u32 val) {\n  // opcode, [15:0], [25:16]\n  *(ul32 *)loc &= 0b111111'0000000000000000'0000000000;\n  *(ul32 *)loc |= bits(val, 15, 0) << 10;\n  *(ul32 *)loc |= bits(val, 25, 16);\n}\n\nstatic u32 get_rd(u32 insn) {\n  return bits(insn, 4, 0);\n}\n\nstatic u32 get_rj(u32 insn) {\n  return bits(insn, 9, 5);\n}\n\nstatic void set_rj(u8 *loc, u32 rj) {\n  assert(rj < 32);\n  *(ul32 *)loc &= 0b111111'1111111111111111'00000'11111;\n  *(ul32 *)loc |= rj << 5;\n}\n\n// Returns true if isec's i'th relocation refers to the following\n// relaxable instructioon pair.\n//\n//   pcalau12i $t0, 0         # R_LARCH_GOT_PC_HI20, R_LARCH_RELAX\n//   ld.d      $t0, $t0, 0    # R_LARCH_GOT_PC_LO12, R_LARCH_RELAX\nstatic bool is_relaxable_got_load(Context<E> &ctx, InputSection<E> &isec, i64 i) {\n  std::span<const ElfRel<E>> rels = isec.get_rels(ctx);\n  Symbol<E> &sym = *isec.file.symbols[rels[i].r_sym];\n  u8 *buf = (u8 *)isec.contents.data();\n\n  if (ctx.arg.relax &&\n      sym.is_pcrel_linktime_const(ctx) &&\n      i + 3 < rels.size() &&\n      rels[i + 1].r_type == R_LARCH_RELAX &&\n      rels[i + 2].r_type == R_LARCH_GOT_PC_LO12 &&\n      rels[i + 2].r_offset == rels[i].r_offset + 4 &&\n      rels[i + 3].r_type == R_LARCH_RELAX) {\n    u32 insn1 = *(ul32 *)(buf + rels[i].r_offset);\n    u32 insn2 = *(ul32 *)(buf + rels[i].r_offset + 4);\n    bool is_ld_d = (insn2 & 0xffc0'0000) == 0x28c0'0000;\n    return get_rd(insn1) == get_rd(insn2) && get_rd(insn2) == get_rj(insn2) &&\n           is_ld_d;\n  }\n  return false;\n}\n\ntemplate <>\nvoid write_plt_header<E>(Context<E> &ctx, u8 *buf) {\n  constexpr ul32 insn_64[] = {\n    0x1a00'000e, // pcalau12i $t2, %pc_hi20(.got.plt)\n    0x0011'bdad, // sub.d     $t1, $t1, $t3\n    0x28c0'01cf, // ld.d      $t3, $t2, %lo12(.got.plt) # _dl_runtime_resolve\n    0x02ff'51ad, // addi.d    $t1, $t1, -44             # .plt entry\n    0x02c0'01cc, // addi.d    $t0, $t2, %lo12(.got.plt) # &.got.plt\n    0x0045'05ad, // srli.d    $t1, $t1, 1               # .plt entry offset\n    0x28c0'218c, // ld.d      $t0, $t0, 8               # link map\n    0x4c00'01e0, // jr        $t3\n  };\n\n  constexpr ul32 insn_32[] = {\n    0x1a00'000e, // pcalau12i $t2, %pc_hi20(.got.plt)\n    0x0011'3dad, // sub.w     $t1, $t1, $t3\n    0x2880'01cf, // ld.w      $t3, $t2, %lo12(.got.plt) # _dl_runtime_resolve\n    0x02bf'51ad, // addi.w    $t1, $t1, -44             # .plt entry\n    0x0280'01cc, // addi.w    $t0, $t2, %lo12(.got.plt) # &.got.plt\n    0x0044'89ad, // srli.w    $t1, $t1, 2               # .plt entry offset\n    0x2880'118c, // ld.w      $t0, $t0, 4               # link map\n    0x4c00'01e0, // jr        $t3\n  };\n\n  u64 gotplt = ctx.gotplt->shdr.sh_addr;\n  u64 plt = ctx.plt->shdr.sh_addr;\n\n  memcpy(buf, E::is_64 ? insn_64 : insn_32, E::plt_hdr_size);\n  write_j20(buf, hi20(gotplt, plt));\n  write_k12(buf + 8, gotplt);\n  write_k12(buf + 16, gotplt);\n}\n\nstatic constexpr ul32 plt_entry_64[] = {\n  0x1a00'000f, // pcalau12i $t3, %pc_hi20(func@.got.plt)\n  0x28c0'01ef, // ld.d      $t3, $t3, %lo12(func@.got.plt)\n  0x4c00'01ed, // jirl      $t1, $t3, 0\n  0x002a'0000, // break\n};\n\nstatic constexpr ul32 plt_entry_32[] = {\n  0x1a00'000f, // pcalau12i $t3, %pc_hi20(func@.got.plt)\n  0x2880'01ef, // ld.w      $t3, $t3, %lo12(func@.got.plt)\n  0x4c00'01ed, // jirl      $t1, $t3, 0\n  0x002a'0000, // break\n};\n\ntemplate <>\nvoid write_plt_entry<E>(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  u64 gotplt = sym.get_gotplt_addr(ctx);\n  u64 plt = sym.get_plt_addr(ctx);\n\n  memcpy(buf, E::is_64 ? plt_entry_64 : plt_entry_32, E::plt_size);\n  write_j20(buf, hi20(gotplt, plt));\n  write_k12(buf + 4, gotplt);\n}\n\ntemplate <>\nvoid write_pltgot_entry<E>(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  u64 got = sym.get_got_pltgot_addr(ctx);\n  u64 plt = sym.get_plt_addr(ctx);\n\n  memcpy(buf, E::is_64 ? plt_entry_64 : plt_entry_32, E::plt_size);\n  write_j20(buf, hi20(got, plt));\n  write_k12(buf + 4, got);\n}\n\ntemplate <>\nvoid EhFrameSection<E>::apply_eh_reloc(Context<E> &ctx, const ElfRel<E> &rel,\n                                       u64 offset, u64 val) {\n  u8 *loc = ctx.buf + this->shdr.sh_offset + offset;\n\n  switch (rel.r_type) {\n  case R_NONE:\n    break;\n  case R_LARCH_ADD6:\n    *loc = (*loc & 0b1100'0000) | ((*loc + val) & 0b0011'1111);\n    break;\n  case R_LARCH_ADD8:\n    *loc += val;\n    break;\n  case R_LARCH_ADD16:\n    *(ul16 *)loc += val;\n    break;\n  case R_LARCH_ADD32:\n    *(ul32 *)loc += val;\n    break;\n  case R_LARCH_ADD64:\n    *(ul64 *)loc += val;\n    break;\n  case R_LARCH_SUB6:\n    *loc = (*loc & 0b1100'0000) | ((*loc - val) & 0b0011'1111);\n    break;\n  case R_LARCH_SUB8:\n    *loc -= val;\n    break;\n  case R_LARCH_SUB16:\n    *(ul16 *)loc -= val;\n    break;\n  case R_LARCH_SUB32:\n    *(ul32 *)loc -= val;\n    break;\n  case R_LARCH_SUB64:\n    *(ul64 *)loc -= val;\n    break;\n  case R_LARCH_32_PCREL:\n    *(ul32 *)loc = val - this->shdr.sh_addr - offset;\n    break;\n  case R_LARCH_64_PCREL:\n    *(ul64 *)loc = val - this->shdr.sh_addr - offset;\n    break;\n  default:\n    Fatal(ctx) << \"unsupported relocation in .eh_frame: \" << rel;\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n  std::span<RelocDelta> deltas = extra.r_deltas;\n  i64 k = 0;\n  u8 *buf = (u8 *)contents.data();\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n\n    if (rel.r_type == R_NONE || rel.r_type == R_LARCH_RELAX ||\n        rel.r_type == R_LARCH_MARK_LA || rel.r_type == R_LARCH_MARK_PCREL ||\n        rel.r_type == R_LARCH_ALIGN)\n      continue;\n\n    i64 removed_bytes = 0;\n    i64 r_delta = 0;\n\n    if (!deltas.empty()) {\n      while (k < deltas.size() && deltas[k].offset < rel.r_offset)\n        k++;\n      if (k < deltas.size() && deltas[k].offset == rel.r_offset)\n        removed_bytes = get_removed_bytes(deltas, k);\n      if (k > 0)\n        r_delta = deltas[k - 1].delta;\n    }\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    i64 r_offset = rel.r_offset - r_delta;\n    u8 *loc = base + r_offset;\n\n    // Unlike other psABIs, the LoongArch ABI uses the same relocation\n    // types to refer to GOT entries for thread-local symbols and regular\n    // ones. Therefore, G may refer to a TLSGD or a regular GOT slot\n    // depending on the symbol type.\n    //\n    // Note that even though LoongArch defines relocations for TLSLD, TLSLD\n    // is not actually supported on it. GCC and LLVM emit identical machine\n    // code for -ftls-model=global-dynamic and -ftls-model=local-dynamic,\n    // and we need to handle TLSLD relocations as equivalent to TLSGD\n    // relocations. This is clearly a compiler bug, but it's too late to\n    // fix. The only way to fix it would be to define a new set of\n    // relocations for true TLSLD and deprecate the current ones. But it\n    // appears that migrating to TLSDESC is a better choice, so it's\n    // unlikely to happen.\n    i64 got_idx =\n      sym.has_tlsgd(ctx) ? sym.get_tlsgd_idx(ctx) : sym.get_got_idx(ctx);\n\n    u64 S = sym.get_addr(ctx);\n    u64 A = rel.r_addend;\n    u64 P = get_addr() + r_offset;\n    u64 G = got_idx * sizeof(Word<E>);\n    u64 GOT = ctx.got->shdr.sh_addr;\n\n    auto check = [&](i64 val, i64 lo, i64 hi) {\n      check_range(ctx, i, val, lo, hi);\n    };\n\n    auto check_branch = [&](i64 val, i64 lo, i64 hi) {\n      check(val, lo, hi);\n      if (val & 0b11)\n        Error(ctx) << *this << \": misaligned symbol \" << sym\n                   << \" for relocation \" << rel;\n    };\n\n    switch (rel.r_type) {\n    case R_LARCH_32:\n      assert(E::is_64);\n      *(ul32 *)loc = S + A;\n      break;\n    case R_LARCH_B16:\n      check_branch(S + A - P, -(1 << 17), 1 << 17);\n      write_k16(loc, (S + A - P) >> 2);\n      break;\n    case R_LARCH_B21:\n      check_branch(S + A - P, -(1 << 22), 1 << 22);\n      write_d5k16(loc, (S + A - P) >> 2);\n      break;\n    case R_LARCH_B26:\n      check_branch(S + A - P, -(1 << 27), 1 << 27);\n      write_d10k16(loc, (S + A - P) >> 2);\n      break;\n    case R_LARCH_ABS_LO12:\n      write_k12(loc, S + A);\n      break;\n    case R_LARCH_ABS_HI20:\n      write_j20(loc, (S + A) >> 12);\n      break;\n    case R_LARCH_ABS64_LO20:\n      write_j20(loc, (S + A) >> 32);\n      break;\n    case R_LARCH_ABS64_HI12:\n      write_k12(loc, (S + A) >> 52);\n      break;\n    case R_LARCH_PCALA_LO12:\n      // It looks like R_LARCH_PCALA_LO12 is sometimes used for JIRL even\n      // though the instruction takes a 16 bit immediate rather than 12 bits.\n      // It is contrary to the psABI document, but GNU ld has special\n      // code to handle it, so we accept it too.\n      if ((*(ul32 *)loc & 0xfc00'0000) == 0x4c00'0000)\n        write_k16(loc, sign_extend(S + A, 12) >> 2);\n      else\n        write_k12(loc, S + A);\n      break;\n    case R_LARCH_PCALA_HI20:\n      if (removed_bytes == 0) {\n        write_j20(loc, hi20(S + A, P));\n      } else {\n        // Rewrite pcalau12i + addi.d with pcaddi\n        assert(removed_bytes == 4);\n        *(ul32 *)loc = 0x1800'0000 | get_rd(*(ul32 *)loc); // pcaddi\n        write_j20(loc, (S + A - P) >> 2);\n        i += 3;\n      }\n      break;\n    case R_LARCH_PCALA64_LO20:\n      write_j20(loc, higher20(S + A, P));\n      break;\n    case R_LARCH_PCALA64_HI12:\n      write_k12(loc, highest12(S + A, P));\n      break;\n    case R_LARCH_GOT_PC_LO12:\n      write_k12(loc, GOT + G + A);\n      break;\n    case R_LARCH_GOT_PC_HI20:\n      if (removed_bytes == 0) {\n        // If the PC-relative symbol address is known at link-time, we can\n        // rewrite the following GOT load\n        //\n        //   pcalau12i $t0, 0         # R_LARCH_GOT_PC_HI20\n        //   ld.d      $t0, $t0, 0    # R_LARCH_GOT_PC_LO12\n        //\n        // with the following address materialization\n        //\n        //   pcalau12i $t0, 0\n        //   addi.d    $t0, $t0, 0\n        if (is_relaxable_got_load(ctx, *this, i)) {\n          i64 dist = compute_distance(ctx, sym, *this, rel);\n          if (is_int(dist, 32)) {\n            u32 rd = get_rd(*(ul32 *)loc);\n            *(ul32 *)(loc + 4) = 0x02c0'0000 | (rd << 5) | rd; // addi.d\n\n            write_j20(loc, hi20(S + A, P));\n            write_k12(loc + 4, S + A);\n            i += 3;\n            break;\n          }\n        }\n        write_j20(loc, hi20(GOT + G + A, P));\n      } else {\n        // Rewrite pcalau12i + ld.d with pcaddi\n        assert(removed_bytes == 4);\n        *(ul32 *)loc = 0x1800'0000 | get_rd(*(ul32 *)loc); // pcaddi\n        write_j20(loc, (S + A - P) >> 2);\n        i += 3;\n      }\n      break;\n    case R_LARCH_GOT64_PC_LO20:\n      write_j20(loc, higher20(GOT + G + A, P));\n      break;\n    case R_LARCH_GOT64_PC_HI12:\n      write_k12(loc, highest12(GOT + G + A, P));\n      break;\n    case R_LARCH_GOT_LO12:\n      write_k12(loc, GOT + G + A);\n      break;\n    case R_LARCH_GOT_HI20:\n      write_j20(loc, (GOT + G + A) >> 12);\n      break;\n    case R_LARCH_GOT64_LO20:\n      write_j20(loc, (GOT + G + A) >> 32);\n      break;\n    case R_LARCH_GOT64_HI12:\n      write_k12(loc, (GOT + G + A) >> 52);\n      break;\n    case R_LARCH_TLS_LE_LO12:\n      write_k12(loc, S + A - ctx.tp_addr);\n      break;\n    case R_LARCH_TLS_LE_HI20:\n      write_j20(loc, (S + A - ctx.tp_addr) >> 12);\n      break;\n    case R_LARCH_TLS_LE64_LO20:\n      write_j20(loc, (S + A - ctx.tp_addr) >> 32);\n      break;\n    case R_LARCH_TLS_LE64_HI12:\n      write_k12(loc, (S + A - ctx.tp_addr) >> 52);\n      break;\n    case R_LARCH_TLS_IE_PC_LO12:\n      write_k12(loc, sym.get_gottp_addr(ctx) + A);\n      break;\n    case R_LARCH_TLS_IE_PC_HI20:\n      write_j20(loc, hi20(sym.get_gottp_addr(ctx) + A, P));\n      break;\n    case R_LARCH_TLS_IE64_PC_LO20:\n      write_j20(loc, higher20(sym.get_gottp_addr(ctx) + A, P));\n      break;\n    case R_LARCH_TLS_IE64_PC_HI12:\n      write_k12(loc, highest12(sym.get_gottp_addr(ctx) + A, P));\n      break;\n    case R_LARCH_TLS_IE_LO12:\n      write_k12(loc, sym.get_gottp_addr(ctx) + A);\n      break;\n    case R_LARCH_TLS_IE_HI20:\n      write_j20(loc, (sym.get_gottp_addr(ctx) + A) >> 12);\n      break;\n    case R_LARCH_TLS_IE64_LO20:\n      write_j20(loc, (sym.get_gottp_addr(ctx) + A) >> 32);\n      break;\n    case R_LARCH_TLS_IE64_HI12:\n      write_k12(loc, (sym.get_gottp_addr(ctx) + A) >> 52);\n      break;\n    case R_LARCH_TLS_GD_PC_HI20:\n    case R_LARCH_TLS_LD_PC_HI20:\n      check(sym.get_tlsgd_addr(ctx) + A - P, -(1LL << 31), 1LL << 31);\n      write_j20(loc, hi20(sym.get_tlsgd_addr(ctx) + A, P));\n      break;\n    case R_LARCH_TLS_GD_HI20:\n    case R_LARCH_TLS_LD_HI20:\n      write_j20(loc, (sym.get_tlsgd_addr(ctx) + A) >> 12);\n      break;\n    case R_LARCH_ADD6:\n      *loc = (*loc & 0b1100'0000) | ((*loc + S + A) & 0b0011'1111);\n      break;\n    case R_LARCH_ADD8:\n      *loc += S + A;\n      break;\n    case R_LARCH_ADD16:\n      *(ul16 *)loc += S + A;\n      break;\n    case R_LARCH_ADD32:\n      *(ul32 *)loc += S + A;\n      break;\n    case R_LARCH_ADD64:\n      *(ul64 *)loc += S + A;\n      break;\n    case R_LARCH_SUB6:\n      *loc = (*loc & 0b1100'0000) | ((*loc - S - A) & 0b0011'1111);\n      break;\n    case R_LARCH_SUB8:\n      *loc -= S + A;\n      break;\n    case R_LARCH_SUB16:\n      *(ul16 *)loc -= S + A;\n      break;\n    case R_LARCH_SUB32:\n      *(ul32 *)loc -= S + A;\n      break;\n    case R_LARCH_SUB64:\n      *(ul64 *)loc -= S + A;\n      break;\n    case R_LARCH_32_PCREL:\n      check(S + A - P, -(1LL << 31), 1LL << 31);\n      *(ul32 *)loc = S + A - P;\n      break;\n    case R_LARCH_64_PCREL:\n      *(ul64 *)loc = S + A - P;\n      break;\n    case R_LARCH_CALL36:\n      if (removed_bytes == 0) {\n        i64 val = S + A - P;\n        check_branch(val, -(1LL << 37) - 0x20000, (1LL << 37) - 0x20000);\n        write_j20(loc, (val + 0x20000) >> 18);\n        write_k16(loc + 4, val >> 2);\n      } else {\n        // Rewrite PCADDU18I + JIRL to B or BL\n        assert(removed_bytes == 4);\n        if (get_rd(*(ul32 *)(buf + rel.r_offset + 4)) == 0)\n          *(ul32 *)loc = 0x5000'0000; // B\n        else\n          *(ul32 *)loc = 0x5400'0000; // BL\n        write_d10k16(loc, (S + A - P) >> 2);\n      }\n      break;\n    case R_LARCH_ADD_ULEB128:\n      overwrite_uleb(loc, read_uleb(loc) + S + A);\n      break;\n    case R_LARCH_SUB_ULEB128:\n      overwrite_uleb(loc, read_uleb(loc) - S - A);\n      break;\n    case R_LARCH_TLS_DESC_PC_HI20:\n      // LoongArch TLSDESC uses the following code sequence to materialize\n      // a TP-relative address in a0.\n      //\n      //   pcalau12i $a0, 0\n      //       R_LARCH_TLS_DESC_PC_HI20    foo\n      //   addi.[dw] $a0, $a0, 0\n      //       R_LARCH_TLS_DESC_PC_LO12    foo\n      //   ld.d      $ra, $a0, 0\n      //       R_LARCH_TLS_DESC_LD         foo\n      //   jirl      $ra, $ra, 0\n      //       R_LARCH_TLS_DESC_CALL       foo\n      //\n      // We may relax the instructions to the following if its TP-relative\n      // address is known at link-time\n      //\n      //   <deleted>\n      //   <deleted>\n      //   lu12i.w   $a0, foo@TPOFF\n      //   addi.w    $a0, $a0, foo@TPOFF\n      //\n      // or to the following if the TP offset is small enough.\n      //\n      //   <deleted>\n      //   <deleted>\n      //   <deleted>\n      //   ori       $a0, $zero, foo@TPOFF\n      //\n      // If the TP-relative address is known at process startup time, we\n      // may relax the instructions to the following.\n      //\n      //   <deleted>\n      //   <deleted>\n      //   pcalau12i $a0, foo@GOTTP\n      //   ld.[dw]   $a0, $a0, foo@GOTTP\n      //\n      // If we don't know anything about the symbol, we can still relax\n      // the first two instructions to a single pcaddi as shown below.\n      //\n      //   <deleted>\n      //   pcaddi    $a0, foo@GOTDESC\n      //   ld.d      $ra, $a0, 0\n      //   jirl      $ra, $ra, 0\n      if (sym.has_tlsdesc(ctx) && removed_bytes == 0)\n        write_j20(loc, hi20(sym.get_tlsdesc_addr(ctx) + A, P));\n      break;\n    case R_LARCH_TLS_DESC_PC_LO12:\n      if (sym.has_tlsdesc(ctx) && removed_bytes == 0) {\n        i64 dist = sym.get_tlsdesc_addr(ctx) + A - P;\n        if (is_int(dist, 22)) {\n          *(ul32 *)loc = 0x1800'0000 | get_rd(*(ul32 *)loc); // pcaddi\n          write_j20(loc, dist >> 2);\n        } else {\n          write_k12(loc, sym.get_tlsdesc_addr(ctx) + A);\n        }\n      }\n      break;\n    case R_LARCH_TLS_DESC_LD:\n      if (sym.has_tlsdesc(ctx) || removed_bytes == 4) {\n        // Do nothing\n      } else if (sym.has_gottp(ctx)) {\n        *(ul32 *)loc = 0x1a00'0004; // pcalau12i $a0, 0\n        write_j20(loc, hi20(sym.get_gottp_addr(ctx) + A, P));\n      } else {\n        *(ul32 *)loc = 0x1400'0004; // lu12i.w   $a0, 0\n        write_j20(loc, (S + A + 0x800 - ctx.tp_addr) >> 12);\n      }\n      break;\n    case R_LARCH_TLS_DESC_CALL:\n      if (sym.has_tlsdesc(ctx)) {\n        // Do nothing\n      } else if (sym.has_gottp(ctx)) {\n        if (E::is_64)\n          *(ul32 *)loc = 0x28c0'0084; // ld.d $a0, $a0, 0\n        else\n          *(ul32 *)loc = 0x2880'0084; // ld.w $a0, $a0, 0\n        write_k12(loc, sym.get_gottp_addr(ctx) + A);\n      } else {\n        i64 val = S + A - ctx.tp_addr;\n        if (0 <= val && val < 0x1000)\n          *(ul32 *)loc = 0x0380'0004; // ori    $a0, $zero, 0\n        else\n          *(ul32 *)loc = 0x0280'0084; // addi.w $a0, $a0, 0\n        write_k12(loc, val);\n      }\n      break;\n    case R_LARCH_TLS_LE_HI20_R:\n      if (removed_bytes == 0)\n        write_j20(loc, (S + A + 0x800 - ctx.tp_addr) >> 12);\n      break;\n    case R_LARCH_TLS_LE_LO12_R: {\n      i64 val = S + A - ctx.tp_addr;\n      write_k12(loc, val);\n\n      // Rewrite `addi.d $t0, $t0, <offset>` with `addi.d $t0, $tp, <offset>`\n      // if the offset is directly accessible using tp. tp is r2.\n      if (is_int(val, 12))\n        set_rj(loc, 2);\n      break;\n    }\n    case R_LARCH_64:\n    case R_LARCH_TLS_LE_ADD_R:\n      break;\n    default:\n      unreachable();\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_nonalloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE)\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    if (!sym.file) {\n      record_undef_error(ctx, rel);\n      continue;\n    }\n\n    SectionFragment<E> *frag;\n    i64 frag_addend;\n    std::tie(frag, frag_addend) = get_fragment(ctx, rel);\n\n    u64 S = frag ? frag->get_addr(ctx) : sym.get_addr(ctx);\n    u64 A = frag ? frag_addend : (i64)rel.r_addend;\n\n    switch (rel.r_type) {\n    case R_LARCH_32:\n      *(ul32 *)loc = S + A;\n      break;\n    case R_LARCH_64:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(ul64 *)loc = *val;\n      else\n        *(ul64 *)loc = S + A;\n      break;\n    case R_LARCH_ADD6:\n      *loc = (*loc & 0b1100'0000) | ((*loc + S + A) & 0b0011'1111);\n      break;\n    case R_LARCH_ADD8:\n      *loc += S + A;\n      break;\n    case R_LARCH_ADD16:\n      *(ul16 *)loc += S + A;\n      break;\n    case R_LARCH_ADD32:\n      *(ul32 *)loc += S + A;\n      break;\n    case R_LARCH_ADD64:\n      *(ul64 *)loc += S + A;\n      break;\n    case R_LARCH_SUB6:\n      *loc = (*loc & 0b1100'0000) | ((*loc - S - A) & 0b0011'1111);\n      break;\n    case R_LARCH_SUB8:\n      *loc -= S + A;\n      break;\n    case R_LARCH_SUB16:\n      *(ul16 *)loc -= S + A;\n      break;\n    case R_LARCH_SUB32:\n      *(ul32 *)loc -= S + A;\n      break;\n    case R_LARCH_SUB64:\n      *(ul64 *)loc -= S + A;\n      break;\n    case R_LARCH_TLS_DTPREL32:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(ul32 *)loc = *val;\n      else\n        *(ul32 *)loc = S + A - ctx.dtp_addr;\n      break;\n    case R_LARCH_TLS_DTPREL64:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(ul64 *)loc = *val;\n      else\n        *(ul64 *)loc = S + A - ctx.dtp_addr;\n      break;\n    case R_LARCH_ADD_ULEB128:\n      overwrite_uleb(loc, read_uleb(loc) + S + A);\n      break;\n    case R_LARCH_SUB_ULEB128:\n      overwrite_uleb(loc, read_uleb(loc) - S - A);\n      break;\n    default:\n      Fatal(ctx) << *this << \": invalid relocation for non-allocated sections: \"\n                 << rel;\n      break;\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::scan_relocations(Context<E> &ctx) {\n  assert(shdr().sh_flags & SHF_ALLOC);\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  // Scan relocations\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n\n    if (rel.r_type == R_NONE || rel.r_type == R_LARCH_RELAX ||\n        rel.r_type == R_LARCH_MARK_LA || rel.r_type == R_LARCH_MARK_PCREL ||\n        rel.r_type == R_LARCH_ALIGN)\n      continue;\n\n    if (record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n\n    if (sym.is_ifunc())\n      sym.flags |= NEEDS_GOT | NEEDS_PLT;\n\n    switch (rel.r_type) {\n    case R_LARCH_32:\n      if constexpr (E::is_64)\n        scan_absrel(ctx, sym, rel);\n      break;\n    case R_LARCH_B26:\n    case R_LARCH_PCALA_HI20:\n    case R_LARCH_CALL36:\n      if (sym.is_imported)\n        sym.flags |= NEEDS_PLT;\n      break;\n    case R_LARCH_GOT_HI20:\n    case R_LARCH_GOT_PC_HI20:\n      sym.flags |= NEEDS_GOT;\n      break;\n    case R_LARCH_TLS_IE_HI20:\n    case R_LARCH_TLS_IE_PC_HI20:\n      sym.flags |= NEEDS_GOTTP;\n      break;\n    case R_LARCH_TLS_GD_PC_HI20:\n    case R_LARCH_TLS_LD_PC_HI20:\n    case R_LARCH_TLS_GD_HI20:\n    case R_LARCH_TLS_LD_HI20:\n      sym.flags |= NEEDS_TLSGD;\n      break;\n    case R_LARCH_32_PCREL:\n    case R_LARCH_64_PCREL:\n      scan_pcrel(ctx, sym, rel);\n      break;\n    case R_LARCH_TLS_LE_HI20:\n    case R_LARCH_TLS_LE_LO12:\n    case R_LARCH_TLS_LE64_LO20:\n    case R_LARCH_TLS_LE64_HI12:\n    case R_LARCH_TLS_LE_HI20_R:\n    case R_LARCH_TLS_LE_LO12_R:\n      check_tlsle(ctx, sym, rel);\n      break;\n    case R_LARCH_TLS_DESC_CALL:\n      scan_tlsdesc(ctx, sym);\n      break;\n    case R_LARCH_64:\n    case R_LARCH_B16:\n    case R_LARCH_B21:\n    case R_LARCH_ABS_HI20:\n    case R_LARCH_ABS_LO12:\n    case R_LARCH_ABS64_LO20:\n    case R_LARCH_ABS64_HI12:\n    case R_LARCH_PCALA_LO12:\n    case R_LARCH_PCALA64_LO20:\n    case R_LARCH_PCALA64_HI12:\n    case R_LARCH_GOT_PC_LO12:\n    case R_LARCH_GOT64_PC_LO20:\n    case R_LARCH_GOT64_PC_HI12:\n    case R_LARCH_GOT_LO12:\n    case R_LARCH_GOT64_LO20:\n    case R_LARCH_GOT64_HI12:\n    case R_LARCH_TLS_IE_PC_LO12:\n    case R_LARCH_TLS_IE64_PC_LO20:\n    case R_LARCH_TLS_IE64_PC_HI12:\n    case R_LARCH_TLS_IE_LO12:\n    case R_LARCH_TLS_IE64_LO20:\n    case R_LARCH_TLS_IE64_HI12:\n    case R_LARCH_ADD6:\n    case R_LARCH_SUB6:\n    case R_LARCH_ADD8:\n    case R_LARCH_SUB8:\n    case R_LARCH_ADD16:\n    case R_LARCH_SUB16:\n    case R_LARCH_ADD32:\n    case R_LARCH_SUB32:\n    case R_LARCH_ADD64:\n    case R_LARCH_SUB64:\n    case R_LARCH_ADD_ULEB128:\n    case R_LARCH_SUB_ULEB128:\n    case R_LARCH_TLS_DESC_PC_HI20:\n    case R_LARCH_TLS_DESC_PC_LO12:\n    case R_LARCH_TLS_DESC_LD:\n    case R_LARCH_TLS_LE_ADD_R:\n      break;\n    default:\n      Error(ctx) << *this << \": unknown relocation: \" << rel;\n    }\n  }\n}\n\ntemplate <>\nvoid shrink_section(Context<E> &ctx, InputSection<E> &isec) {\n  std::span<const ElfRel<E>> rels = isec.get_rels(ctx);\n  std::vector<RelocDelta> &deltas = isec.extra.r_deltas;\n  i64 r_delta = 0;\n  u8 *buf = (u8 *)isec.contents.data();\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &r = rels[i];\n    Symbol<E> &sym = *isec.file.symbols[r.r_sym];\n\n    auto remove = [&](i64 d) {\n      r_delta += d;\n      deltas.push_back(RelocDelta{r.r_offset, r_delta});\n    };\n\n    // A R_LARCH_ALIGN relocation refers to the beginning of a nop\n    // sequence. We need to remove some or all of them so that the\n    // instruction that immediately follows that is aligned to a specified\n    // boundary. To allow that, a R_LARCH_ALIGN relocation that requests\n    // 2^n alignment refers to 2^n - 4 bytes of nop instructions.\n    if (r.r_type == R_LARCH_ALIGN) {\n      // The actual rule for storing the alignment size is a bit weird.\n      // In particular, the most significant 56 bits of r_addend is\n      // sometimes used to store the upper limit of the alignment,\n      // allowing the instruction that follows nops _not_ to be aligned at\n      // all. I think that's a spec bug, so we don't want to support that.\n      i64 alignment;\n      if (r.r_sym) {\n        if (r.r_addend >> 8)\n          Fatal(ctx) << isec << \": ternary R_LARCH_ALIGN is not supported: \" << i;\n        alignment = 1 << r.r_addend;\n      } else {\n        if (!has_single_bit(r.r_addend + 4))\n          Fatal(ctx) << isec << \": R_LARCH_ALIGN: invalid alignment requirement: \"\n                     << i;\n        alignment = r.r_addend + 4;\n      }\n\n      u64 P = isec.get_addr() + r.r_offset - r_delta;\n      u64 desired = align_to(P, alignment);\n      u64 actual = P + alignment - 4;\n      if (desired != actual)\n        remove(actual - desired);\n      continue;\n    }\n\n    // Handling other relocations is optional.\n    if (!ctx.arg.relax || i == rels.size() - 1 ||\n        rels[i + 1].r_type != R_LARCH_RELAX)\n      continue;\n\n    // Skip linker-synthesized symbols because their final addresses\n    // are not fixed yet.\n    if (sym.file == ctx.internal_obj)\n      continue;\n\n    switch (r.r_type) {\n    case R_LARCH_TLS_LE_HI20_R:\n    case R_LARCH_TLS_LE_ADD_R:\n      // LoongArch uses the following three instructions to access\n      // TP ± 2 GiB.\n      //\n      //  lu12i.w $t0, 0           # R_LARCH_TLS_LE_HI20_R\n      //  add.d   $t0, $t0, $tp    # R_LARCH_TLS_LE_ADD_R\n      //  addi.d  $t0, $t0, 0      # R_LARCH_TLS_LE_LO12_R\n      //\n      // If the thread-local variable is within TP ± 2 KiB, we can\n      // relax them into the following single instruction.\n      //\n      //  addi.d  $t0, $tp, <tp-offset>\n      if (i64 val = sym.get_addr(ctx) + r.r_addend - ctx.tp_addr;\n          is_int(val, 12))\n        remove(4);\n      break;\n    case R_LARCH_PCALA_HI20:\n      // The following two instructions are used to materialize a\n      // PC-relative address with a 32 bit displacement.\n      //\n      //   pcalau12i $t0, 0         # R_LARCH_PCALA_HI20\n      //   addi.d    $t0, $t0, 0    # R_LARCH_PCALA_LO12\n      //\n      // If the displacement is within ±2 MiB, we can relax them to\n      // the following instruction.\n      //\n      //   pcaddi    $t0, <offset>\n      if (i + 3 < rels.size() &&\n          rels[i + 2].r_type == R_LARCH_PCALA_LO12 &&\n          rels[i + 2].r_offset == rels[i].r_offset + 4 &&\n          rels[i + 3].r_type == R_LARCH_RELAX) {\n        i64 dist = compute_distance(ctx, sym, isec, r);\n        u32 insn1 = *(ul32 *)(buf + rels[i].r_offset);\n        u32 insn2 = *(ul32 *)(buf + rels[i].r_offset + 4);\n        bool is_addi_d = (insn2 & 0xffc0'0000) == 0x02c0'0000;\n\n        if ((dist & 0b11) == 0 && is_int(dist, 22) &&\n            is_addi_d && get_rd(insn1) == get_rd(insn2) &&\n            get_rd(insn2) == get_rj(insn2))\n          remove(4);\n      }\n      break;\n    case R_LARCH_CALL36:\n      // A CALL36 relocation referes to the following instruction pair\n      // to jump to PC ± 128 GiB.\n      //\n      //   pcaddu18i $t0,       0         # R_LARCH_CALL36\n      //   jirl      $zero/$ra, $t0, 0\n      //\n      // If the displacement is PC ± 128 MiB, we can use B or BL instead.\n      // Note that $zero is $r0 and $ra is $r1.\n      if (i64 dist = compute_distance(ctx, sym, isec, r);\n          is_int(dist, 28))\n        if (u32 jirl = *(ul32 *)(buf + rels[i].r_offset + 4);\n            get_rd(jirl) == 0 || get_rd(jirl) == 1)\n          remove(4);\n      break;\n    case R_LARCH_GOT_PC_HI20:\n      // The following two instructions are used to load a symbol address\n      // from the GOT.\n      //\n      //   pcalau12i $t0, 0         # R_LARCH_GOT_PC_HI20\n      //   ld.d      $t0, $t0, 0    # R_LARCH_GOT_PC_LO12\n      //\n      // If the PC-relative symbol address is known at link-time, we can\n      // relax them to the following instruction.\n      //\n      //   pcaddi    $t0, <offset>\n      if (is_relaxable_got_load(ctx, isec, i))\n        if (i64 dist = compute_distance(ctx, sym, isec, r);\n            is_int(dist, 22))\n          remove(4);\n      break;\n    case R_LARCH_TLS_DESC_PC_HI20:\n      if (sym.has_tlsdesc(ctx)) {\n        u64 P = isec.get_addr() + r.r_offset;\n        i64 dist = sym.get_tlsdesc_addr(ctx) + r.r_addend - P;\n        if (is_int(dist, 22))\n          remove(4);\n      } else {\n        remove(4);\n      }\n      break;\n    case R_LARCH_TLS_DESC_PC_LO12:\n      if (!sym.has_tlsdesc(ctx))\n        remove(4);\n      break;\n    case R_LARCH_TLS_DESC_LD:\n      if (!sym.has_tlsdesc(ctx) && !sym.has_gottp(ctx))\n        if (i64 val = sym.get_addr(ctx) + r.r_addend - ctx.tp_addr;\n            0 <= val && val < 0x1000)\n          remove(4);\n      break;\n    }\n  }\n\n  isec.sh_size -= r_delta;\n}\n\n} // namespace mold\n\n#endif\n"
  },
  {
    "path": "src/arch-m68k.cc",
    "content": "// This file contains code for the Motorola 68000 series microprocessors,\n// which is often abbreviated as m68k. Running a Unix-like system on a\n// m68k-based machine today is a retro-computing hobby activity, but the\n// processor was a popular choice to build Unix computers during '80s.\n// Early Sun workstations for example used m68k. Macintosh until 1994 were\n// based on m68k as well until they switched to PowerPC (and then to x86\n// and to ARM.)\n//\n// From the linker's point of view, it is not hard to support m68k. It's\n// just a 32-bit big-endian CISC ISA. Compared to comtemporary i386,\n// m68k's psABI is actually simpler because m68k has PC-relative memory\n// access instructions and therefore can support position-independent\n// code without too much hassle.\n//\n// https://github.com/rui314/psabi/blob/main/m68k.pdf\n\n#if MOLD_M68K\n\n#include \"mold.h\"\n\nnamespace mold {\n\nusing E = M68K;\n\ntemplate <>\nvoid write_plt_header(Context<E> &ctx, u8 *buf) {\n  static const u8 insn[] = {\n    0x2f, 0x00,                         // move.l %d0, -(%sp)\n    0x2f, 0x3b, 0x01, 0x70, 0, 0, 0, 0, // move.l (GOTPLT+4, %pc), -(%sp)\n    0x4e, 0xfb, 0x01, 0x71, 0, 0, 0, 0, // jmp    ([GOTPLT+8, %pc])\n  };\n\n  memcpy(buf, insn, sizeof(insn));\n  *(ub32 *)(buf + 6) = ctx.gotplt->shdr.sh_addr - ctx.plt->shdr.sh_addr;\n  *(ub32 *)(buf + 14) = ctx.gotplt->shdr.sh_addr - ctx.plt->shdr.sh_addr - 4;\n}\n\ntemplate <>\nvoid write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  static const u8 insn[] = {\n    0x20, 0x3c, 0, 0, 0, 0,             // move.l PLT_OFFSET, %d0\n    0x4e, 0xfb, 0x01, 0x71, 0, 0, 0, 0, // jmp    ([GOTPLT_ENTRY, %pc])\n  };\n\n  memcpy(buf, insn, sizeof(insn));\n  *(ub32 *)(buf + 2) = sym.get_plt_idx(ctx) * sizeof(ElfRel<E>);\n  *(ub32 *)(buf + 10) = sym.get_gotplt_addr(ctx) - sym.get_plt_addr(ctx) - 8;\n}\n\ntemplate <>\nvoid write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  static const u8 insn[] = {\n    0x4e, 0xfb, 0x01, 0x71, 0, 0, 0, 0, // jmp ([GOT_ENTRY, %pc])\n  };\n\n  memcpy(buf, insn, sizeof(insn));\n  *(ub32 *)(buf + 4) = sym.get_got_pltgot_addr(ctx) - sym.get_plt_addr(ctx) - 2;\n}\n\ntemplate <>\nvoid EhFrameSection<E>::apply_eh_reloc(Context<E> &ctx, const ElfRel<E> &rel,\n                                       u64 offset, u64 val) {\n  u8 *loc = ctx.buf + this->shdr.sh_offset + offset;\n\n  switch (rel.r_type) {\n  case R_NONE:\n    break;\n  case R_68K_32:\n    *(ub32 *)loc = val;\n    break;\n  case R_68K_PC32:\n    *(ub32 *)loc = val - this->shdr.sh_addr - offset;\n    break;\n  default:\n    Fatal(ctx) << \"unsupported relocation in .eh_frame: \" << rel;\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE)\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    u64 S = sym.get_addr(ctx);\n    u64 A = rel.r_addend;\n    u64 P = get_addr() + rel.r_offset;\n    u64 G = sym.get_got_idx(ctx) * sizeof(Word<E>);\n    u64 GOT = ctx.got->shdr.sh_addr;\n\n    auto check = [&](i64 val, i64 lo, i64 hi) {\n      check_range(ctx, i, val, lo, hi);\n    };\n\n    auto write16 = [&](u64 val) {\n      check(val, 0, 1 << 16);\n      *(ub16 *)loc = val;\n    };\n\n    auto write16s = [&](u64 val) {\n      check(val, -(1 << 15), 1 << 15);\n      *(ub16 *)loc = val;\n    };\n\n    auto write8 = [&](u64 val) {\n      check(val, 0, 1 << 8);\n      *loc = val;\n    };\n\n    auto write8s = [&](u64 val) {\n      check(val, -(1 << 7), 1 << 7);\n      *loc = val;\n    };\n\n    switch (rel.r_type) {\n    case R_68K_32:\n      break;\n    case R_68K_16:\n      write16(S + A);\n      break;\n    case R_68K_8:\n      write8(S + A);\n      break;\n    case R_68K_PC32:\n    case R_68K_PLT32:\n      *(ub32 *)loc = S + A - P;\n      break;\n    case R_68K_PC16:\n    case R_68K_PLT16:\n      write16s(S + A - P);\n      break;\n    case R_68K_PC8:\n    case R_68K_PLT8:\n      write8s(S + A - P);\n      break;\n    case R_68K_GOTPCREL32:\n      *(ub32 *)loc = GOT + A - P;\n      break;\n    case R_68K_GOTPCREL16:\n      write16s(GOT + A - P);\n      break;\n    case R_68K_GOTPCREL8:\n      write8s(GOT + A - P);\n      break;\n    case R_68K_GOTOFF32:\n      *(ub32 *)loc = G + A;\n      break;\n    case R_68K_GOTOFF16:\n      write16(G + A);\n      break;\n    case R_68K_GOTOFF8:\n      write8(G + A);\n      break;\n    case R_68K_TLS_GD32:\n      *(ub32 *)loc = sym.get_tlsgd_addr(ctx) + A - GOT;\n      break;\n    case R_68K_TLS_GD16:\n      write16(sym.get_tlsgd_addr(ctx) + A - GOT);\n      break;\n    case R_68K_TLS_GD8:\n      write8(sym.get_tlsgd_addr(ctx) + A - GOT);\n      break;\n    case R_68K_TLS_LDM32:\n      *(ub32 *)loc = ctx.got->get_tlsld_addr(ctx) + A - GOT;\n      break;\n    case R_68K_TLS_LDM16:\n      write16(ctx.got->get_tlsld_addr(ctx) + A - GOT);\n      break;\n    case R_68K_TLS_LDM8:\n      write8(ctx.got->get_tlsld_addr(ctx) + A - GOT);\n      break;\n    case R_68K_TLS_LDO32:\n      *(ub32 *)loc = S + A - ctx.dtp_addr;\n      break;\n    case R_68K_TLS_LDO16:\n      write16s(S + A - ctx.dtp_addr);\n      break;\n    case R_68K_TLS_LDO8:\n      write8s(S + A - ctx.dtp_addr);\n      break;\n    case R_68K_TLS_IE32:\n      *(ub32 *)loc = sym.get_gottp_addr(ctx) + A - GOT;\n      break;\n    case R_68K_TLS_IE16:\n      write16(sym.get_gottp_addr(ctx) + A - GOT);\n      break;\n    case R_68K_TLS_IE8:\n      write8(sym.get_gottp_addr(ctx) + A - GOT);\n      break;\n    case R_68K_TLS_LE32:\n      *(ub32 *)loc = S + A - ctx.tp_addr;\n      break;\n    case R_68K_TLS_LE16:\n      write16(S + A - ctx.tp_addr);\n      break;\n    case R_68K_TLS_LE8:\n      write8(S + A - ctx.tp_addr);\n      break;\n    default:\n      unreachable();\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_nonalloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    SectionFragment<E> *frag;\n    i64 frag_addend;\n    std::tie(frag, frag_addend) = get_fragment(ctx, rel);\n\n    u64 S = frag ? frag->get_addr(ctx) : sym.get_addr(ctx);\n    u64 A = frag ? frag_addend : (i64)rel.r_addend;\n\n    switch (rel.r_type) {\n    case R_68K_32:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(ub32 *)loc = *val;\n      else\n        *(ub32 *)loc = S + A;\n      break;\n    default:\n      Fatal(ctx) << *this << \": invalid relocation for non-allocated sections: \"\n                 << rel;\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::scan_relocations(Context<E> &ctx) {\n  assert(shdr().sh_flags & SHF_ALLOC);\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n\n    if (sym.is_ifunc())\n      Error(ctx) << sym << \": GNU ifunc symbol is not supported on m68k\";\n\n    switch (rel.r_type) {\n    case R_68K_16:\n    case R_68K_8:\n      scan_absrel(ctx, sym, rel);\n      break;\n    case R_68K_PC32:\n    case R_68K_PC16:\n    case R_68K_PC8:\n      scan_pcrel(ctx, sym, rel);\n      break;\n    case R_68K_GOTPCREL32:\n    case R_68K_GOTPCREL16:\n    case R_68K_GOTPCREL8:\n    case R_68K_GOTOFF32:\n    case R_68K_GOTOFF16:\n    case R_68K_GOTOFF8:\n      sym.flags |= NEEDS_GOT;\n      break;\n    case R_68K_PLT32:\n    case R_68K_PLT16:\n    case R_68K_PLT8:\n      if (sym.is_imported)\n        sym.flags |= NEEDS_PLT;\n      break;\n    case R_68K_TLS_GD32:\n    case R_68K_TLS_GD16:\n    case R_68K_TLS_GD8:\n      sym.flags |= NEEDS_TLSGD;\n      break;\n    case R_68K_TLS_LDM32:\n    case R_68K_TLS_LDM16:\n    case R_68K_TLS_LDM8:\n      ctx.needs_tlsld = true;\n      break;\n    case R_68K_TLS_IE32:\n    case R_68K_TLS_IE16:\n    case R_68K_TLS_IE8:\n      sym.flags |= NEEDS_GOTTP;\n      break;\n    case R_68K_TLS_LE32:\n    case R_68K_TLS_LE16:\n    case R_68K_TLS_LE8:\n      check_tlsle(ctx, sym, rel);\n      break;\n    case R_68K_32:\n    case R_68K_TLS_LDO32:\n    case R_68K_TLS_LDO16:\n    case R_68K_TLS_LDO8:\n      break;\n    default:\n      Error(ctx) << *this << \": unknown relocation: \" << rel;\n    }\n  }\n}\n\n} // namespace mold\n\n#endif\n"
  },
  {
    "path": "src/arch-ppc32.cc",
    "content": "// This file implements the PowerPC 32-bit ISA. For 64-bit PowerPC, see\n// arch-ppc64v1.cpp and arch-ppc64v2.cpp.\n//\n// PPC32 is a RISC ISA. It has 32 general-purpose registers (GPRs).\n// r0, r11 and r12 are reserved for static linkers, so we can use these\n// registers in PLTs and range extension thunks. In addition to that, it\n// has a few special registers. Notable ones are LR which holds a return\n// address and CTR which we can use to store a branch target address.\n//\n// It feels that the PPC32 psABI is unnecessarily complicated at first\n// glance, but that is mainly stemmed from the fact that the ISA lacks\n// PC-relative load/store instructions. Since machine instructions cannot\n// load data relative to its own address, it is not straightforward to\n// support position-independent code (PIC) on PPC32.\n//\n// A position-independent function typically contains the following code\n// in the prologue to obtain its own address:\n//\n//    mflr  r0        // save the current return address to %r0\n//    bcl   20, 31, 4 // call the next instruction as if it were a function\n//    mtlr  r12       // save the return address to %r12\n//    mtlr  r0        // restore the original return address\n//\n// An object file compiled with -fPIC contains a data section named\n// `.got2` to store addresses of locally-defined global variables and\n// constants. A PIC function usually computes its .got2+0x8000 and set it\n// to %r30. This scheme allows the function to access global objects\n// defined in the same input file with a single %r30-relative load/store\n// instruction with a 16-bit offset, given that .got2 is smaller than\n// 0x10000 (or 65536) bytes.\n//\n// Since each object file has its own .got2, %r30 refers to different\n// places in a merged .got2 for two functions that came from different\n// input files. Therefore, %r30 makes sense only within a single function.\n//\n// Technically, we can reuse a %r30 value in our PLT if we create a PLT\n// _for each input file_ (that's what GNU ld seems to be doing), but that\n// doesn't seems to be worth its complexity. Our PLT simply doesn't rely\n// on a %r30 value.\n//\n// https://github.com/rui314/psabi/blob/main/ppc32.pdf\n\n#if MOLD_PPC32\n\n#include \"mold.h\"\n\nnamespace mold {\n\nusing E = PPC32;\n\nstatic u64 lo(u64 x)    { return x & 0xffff; }\nstatic u64 hi(u64 x)    { return x >> 16; }\nstatic u64 ha(u64 x)    { return (x + 0x8000) >> 16; }\nstatic u64 high(u64 x)  { return (x >> 16) & 0xffff; }\nstatic u64 higha(u64 x) { return ((x + 0x8000) >> 16) & 0xffff; }\n\ntemplate <>\nvoid write_plt_header(Context<E> &ctx, u8 *buf) {\n  constexpr ub32 insn[] = {\n    // Get the address of this PLT section\n    0x7c08'02a6, //    mflr    r0\n    0x429f'0005, //    bcl     20, 31, 4\n    0x7d88'02a6, // 1: mflr    r12\n    0x7c08'03a6, //    mtlr    r0\n\n    // Compute the runtime address of GOTPLT+12\n    0x3d8c'0000, //    addis   r12, r12, (GOTPLT - 1b)@higha\n    0x398c'0000, //    addi    r12, r12, (GOTPLT - 1b)@lo\n\n    // Compute the PLT entry offset\n    0x7d6c'5850, //    sub     r11, r11, r12\n    0x1d6b'0003, //    mulli   r11, r11, 3\n\n    // Load GOTPLT[2] and branch to GOTPLT[1]\n    0x800c'fff8, //    lwz     r0,  -8(r12)\n    0x7c09'03a6, //    mtctr   r0\n    0x818c'fffc, //    lwz     r12, -4(r12)\n    0x4e80'0420, //    bctr\n    0x6000'0000, //    nop\n    0x6000'0000, //    nop\n    0x6000'0000, //    nop\n    0x6000'0000, //    nop\n  };\n\n  static_assert(sizeof(insn) == E::plt_hdr_size);\n  memcpy(buf, insn, sizeof(insn));\n\n  ub32 *loc = (ub32 *)buf;\n  loc[4] |= higha(ctx.gotplt->shdr.sh_addr - ctx.plt->shdr.sh_addr + 4);\n  loc[5] |= lo(ctx.gotplt->shdr.sh_addr - ctx.plt->shdr.sh_addr + 4);\n}\n\nstatic constexpr ub32 plt_entry[] = {\n  // Get the address of this PLT entry\n  0x7c08'02a6, // mflr    r0\n  0x429f'0005, // bcl     20, 31, 4\n  0x7d88'02a6, // mflr    r12\n  0x7c08'03a6, // mtlr    r0\n\n  // Load an address from the GOT/GOTPLT entry and jump to that address\n  0x3d6c'0000, // addis   r11, r12, OFFSET@higha\n  0x396b'0000, // addi    r11, r11, OFFSET@lo\n  0x818b'0000, // lwz     r12, 0(r11)\n  0x7d89'03a6, // mtctr   r12\n  0x4e80'0420, // bctr\n};\n\ntemplate <>\nvoid write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  static_assert(E::plt_size == sizeof(plt_entry));\n  memcpy(buf, plt_entry, sizeof(plt_entry));\n\n  ub32 *loc = (ub32 *)buf;\n  i64 offset = sym.get_gotplt_addr(ctx) - sym.get_plt_addr(ctx) - 8;\n  loc[4] |= higha(offset);\n  loc[5] |= lo(offset);\n}\n\ntemplate <>\nvoid write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  static_assert(E::pltgot_size == sizeof(plt_entry));\n  memcpy(buf, plt_entry, sizeof(plt_entry));\n\n  ub32 *loc = (ub32 *)buf;\n  i64 offset = sym.get_got_pltgot_addr(ctx) - sym.get_plt_addr(ctx) - 8;\n  loc[4] |= higha(offset);\n  loc[5] |= lo(offset);\n}\n\ntemplate <>\nvoid EhFrameSection<E>::apply_eh_reloc(Context<E> &ctx, const ElfRel<E> &rel,\n                                       u64 offset, u64 val) {\n  u8 *loc = ctx.buf + this->shdr.sh_offset + offset;\n\n  switch (rel.r_type) {\n  case R_NONE:\n    break;\n  case R_PPC_ADDR32:\n    *(ub32 *)loc = val;\n    break;\n  case R_PPC_REL32:\n    *(ub32 *)loc = val - this->shdr.sh_addr - offset;\n    break;\n  default:\n    Fatal(ctx) << \"unsupported relocation in .eh_frame: \" << rel;\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  u64 GOT2 = file.extra.got2 ? file.extra.got2->get_addr() : 0;\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE)\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    u64 S = sym.get_addr(ctx);\n    u64 A = rel.r_addend;\n    u64 P = get_addr() + rel.r_offset;\n    u64 G = sym.get_got_idx(ctx) * sizeof(Word<E>);\n    u64 GOT = ctx.got->shdr.sh_addr;\n\n    switch (rel.r_type) {\n    case R_PPC_ADDR14:\n      *(ub32 *)loc |= bits(S + A, 15, 2) << 2;\n      break;\n    case R_PPC_ADDR16:\n    case R_PPC_UADDR16:\n    case R_PPC_ADDR16_LO:\n      *(ub16 *)loc = lo(S + A);\n      break;\n    case R_PPC_ADDR16_HI:\n      *(ub16 *)loc = hi(S + A);\n      break;\n    case R_PPC_ADDR16_HA:\n      *(ub16 *)loc = ha(S + A);\n      break;\n    case R_PPC_ADDR24:\n      *(ub32 *)loc |= bits(S + A, 25, 2) << 2;\n      break;\n    case R_PPC_ADDR30:\n      *(ub32 *)loc |= bits(S + A, 31, 2) << 2;\n      break;\n    case R_PPC_PLT16_LO:\n      *(ub16 *)loc = lo(G + GOT - A - GOT2);\n      break;\n    case R_PPC_PLT16_HI:\n      *(ub16 *)loc = hi(G + GOT - A - GOT2);\n      break;\n    case R_PPC_PLT16_HA:\n      *(ub16 *)loc = ha(G + GOT - A - GOT2);\n      break;\n    case R_PPC_PLT32:\n      *(ub32 *)loc = G + GOT - A - GOT2;\n      break;\n    case R_PPC_REL14:\n      *(ub32 *)loc |= bits(S + A - P, 15, 2) << 2;\n      break;\n    case R_PPC_REL16:\n    case R_PPC_REL16_LO:\n      *(ub16 *)loc = lo(S + A - P);\n      break;\n    case R_PPC_REL16_HI:\n      *(ub16 *)loc = hi(S + A - P);\n      break;\n    case R_PPC_REL16_HA:\n      *(ub16 *)loc = ha(S + A - P);\n      break;\n    case R_PPC_REL24:\n    case R_PPC_LOCAL24PC: {\n      i64 val = S + A - P;\n      if (!is_int(val, 26))\n        val = sym.get_thunk_addr(ctx, P) - P;\n      *(ub32 *)loc |= bits(val, 25, 2) << 2;\n      break;\n    }\n    case R_PPC_PLTREL24: {\n      i64 val = S - P;\n      if (sym.has_plt(ctx) || !is_int(val, 26))\n        val = sym.get_thunk_addr(ctx, P) - P;\n      *(ub32 *)loc |= bits(val, 25, 2) << 2;\n      break;\n    }\n    case R_PPC_REL32:\n    case R_PPC_PLTREL32:\n      *(ub32 *)loc = S + A - P;\n      break;\n    case R_PPC_GOT16:\n    case R_PPC_GOT16_LO:\n      *(ub16 *)loc = lo(G + A);\n      break;\n    case R_PPC_GOT16_HI:\n      *(ub16 *)loc = hi(G + A);\n      break;\n    case R_PPC_GOT16_HA:\n      *(ub16 *)loc = ha(G + A);\n      break;\n    case R_PPC_TPREL16_LO:\n      *(ub16 *)loc = lo(S + A - ctx.tp_addr);\n      break;\n    case R_PPC_TPREL16_HI:\n      *(ub16 *)loc = hi(S + A - ctx.tp_addr);\n      break;\n    case R_PPC_TPREL16_HA:\n      *(ub16 *)loc = ha(S + A - ctx.tp_addr);\n      break;\n    case R_PPC_DTPREL16_LO:\n      *(ub16 *)loc = lo(S + A - ctx.dtp_addr);\n      break;\n    case R_PPC_DTPREL16_HI:\n      *(ub16 *)loc = hi(S + A - ctx.dtp_addr);\n      break;\n    case R_PPC_DTPREL16_HA:\n      *(ub16 *)loc = ha(S + A - ctx.dtp_addr);\n      break;\n    case R_PPC_GOT_TLSGD16:\n      *(ub16 *)loc = sym.get_tlsgd_addr(ctx) - GOT;\n      break;\n    case R_PPC_GOT_TLSLD16:\n      *(ub16 *)loc = ctx.got->get_tlsld_addr(ctx) - GOT;\n      break;\n    case R_PPC_GOT_TPREL16:\n      *(ub16 *)loc = sym.get_gottp_addr(ctx) - GOT;\n      break;\n    case R_PPC_ADDR32:\n    case R_PPC_UADDR32:\n    case R_PPC_TLS:\n    case R_PPC_TLSGD:\n    case R_PPC_TLSLD:\n    case R_PPC_PLTSEQ:\n    case R_PPC_PLTCALL:\n      break;\n    default:\n      unreachable();\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_nonalloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    SectionFragment<E> *frag;\n    i64 frag_addend;\n    std::tie(frag, frag_addend) = get_fragment(ctx, rel);\n\n    u64 S = frag ? frag->get_addr(ctx) : sym.get_addr(ctx);\n    u64 A = frag ? frag_addend : (i64)rel.r_addend;\n\n    switch (rel.r_type) {\n    case R_PPC_ADDR32:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(ub32 *)loc = *val;\n      else\n        *(ub32 *)loc = S + A;\n      break;\n    case R_PPC_DTPREL32:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(ub32 *)loc = *val;\n      else\n        *(ub32 *)loc = S + A - ctx.dtp_addr;\n      break;\n    default:\n      Fatal(ctx) << *this << \": invalid relocation for non-allocated sections: \"\n                 << rel;\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::scan_relocations(Context<E> &ctx) {\n  assert(shdr().sh_flags & SHF_ALLOC);\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  // Scan relocations\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n\n    if (sym.is_ifunc())\n      sym.flags |= NEEDS_GOT | NEEDS_PLT;\n\n    switch (rel.r_type) {\n    case R_PPC_ADDR14:\n    case R_PPC_ADDR16:\n    case R_PPC_UADDR16:\n    case R_PPC_ADDR16_LO:\n    case R_PPC_ADDR16_HI:\n    case R_PPC_ADDR16_HA:\n    case R_PPC_ADDR24:\n    case R_PPC_ADDR30:\n      scan_absrel(ctx, sym, rel);\n      break;\n    case R_PPC_REL14:\n    case R_PPC_REL16:\n    case R_PPC_REL16_LO:\n    case R_PPC_REL16_HI:\n    case R_PPC_REL16_HA:\n    case R_PPC_REL32:\n      scan_pcrel(ctx, sym, rel);\n      break;\n    case R_PPC_GOT16:\n    case R_PPC_GOT16_LO:\n    case R_PPC_GOT16_HI:\n    case R_PPC_GOT16_HA:\n    case R_PPC_PLT16_LO:\n    case R_PPC_PLT16_HI:\n    case R_PPC_PLT16_HA:\n    case R_PPC_PLT32:\n      sym.flags |= NEEDS_GOT;\n      break;\n    case R_PPC_REL24:\n    case R_PPC_PLTREL24:\n    case R_PPC_PLTREL32:\n      if (sym.is_imported)\n        sym.flags |= NEEDS_PLT;\n      break;\n    case R_PPC_GOT_TLSGD16:\n      sym.flags |= NEEDS_TLSGD;\n      break;\n    case R_PPC_GOT_TLSLD16:\n      ctx.needs_tlsld = true;\n      break;\n    case R_PPC_GOT_TPREL16:\n      sym.flags |= NEEDS_GOTTP;\n      break;\n    case R_PPC_TPREL16_LO:\n    case R_PPC_TPREL16_HI:\n    case R_PPC_TPREL16_HA:\n      check_tlsle(ctx, sym, rel);\n      break;\n    case R_PPC_ADDR32:\n    case R_PPC_UADDR32:\n    case R_PPC_LOCAL24PC:\n    case R_PPC_TLS:\n    case R_PPC_TLSGD:\n    case R_PPC_TLSLD:\n    case R_PPC_DTPREL16_LO:\n    case R_PPC_DTPREL16_HI:\n    case R_PPC_DTPREL16_HA:\n    case R_PPC_PLTSEQ:\n    case R_PPC_PLTCALL:\n      break;\n    default:\n      Error(ctx) << *this << \": unknown relocation: \" << rel;\n    }\n  }\n}\n\ntemplate <>\nvoid Thunk<E>::copy_buf(Context<E> &ctx) {\n  constexpr ub32 local_thunk[] = {\n    // Get this thunk's address\n    0x7c08'02a6, // mflr    r0\n    0x429f'0005, // bcl     20, 31, 4\n    0x7d88'02a6, // mflr    r12\n    0x7c08'03a6, // mtlr    r0\n\n    // Materialize the destination's address in %r11 and jump to that address\n    0x3d6c'0000, // addis   r11, r12, OFFSET@higha\n    0x396b'0000, // addi    r11, r11, OFFSET@lo\n    0x7d69'03a6, // mtctr   r11\n    0x4e80'0420, // bctr\n    0x6000'0000, // nop\n  };\n\n  static_assert(E::thunk_size == sizeof(plt_entry));\n  static_assert(E::thunk_size == sizeof(local_thunk));\n\n  u8 *base = ctx.buf + output_section.shdr.sh_offset + offset;\n\n  for (i64 i = 0; i < symbols.size(); i++) {\n    Symbol<E> &sym = *symbols[i];\n    u64 P = get_addr() + offsets[i];\n    u8 *buf = base + offsets[i];\n\n    if (sym.has_plt(ctx)) {\n      u64 got = sym.has_got(ctx) ? sym.get_got_addr(ctx) : sym.get_gotplt_addr(ctx);\n      i64 val = got - P - 8;\n      memcpy(buf, plt_entry, sizeof(plt_entry));\n      *(ub32 *)(buf + 16) |= higha(val);\n      *(ub32 *)(buf + 20) |= lo(val);\n    } else {\n      i64 val = sym.get_addr(ctx) - P - 8;\n      memcpy(buf, local_thunk, sizeof(local_thunk));\n      *(ub32 *)(buf + 16) |= higha(val);\n      *(ub32 *)(buf + 20) |= lo(val);\n    }\n  }\n}\n\n} // namespace mold\n\n#endif\n"
  },
  {
    "path": "src/arch-ppc64v1.cc",
    "content": "// This file contains code for the 64-bit PowerPC ELFv1 ABI that is\n// commonly used for big-endian PPC systems. Modern PPC systems that use\n// the processor in the little-endian mode use the ELFv2 ABI instead. For\n// ELFv2, see arch-ppc64v2.cc.\n//\n// Even though they are similiar, ELFv1 isn't only different from ELFv2 in\n// endianness. The most notable difference is, in ELFv1, a function\n// pointer doesn't directly refer to the entry point of a function but\n// instead refers to a data structure so-called \"function descriptor\".\n//\n// The function descriptor is essentially a pair of a function entry point\n// address and a value that should be set to %r2 before calling that\n// function. There is also a third member for \"the environment pointer for\n// languages such as Pascal and PL/1\" according to the psABI, but it looks\n// like no one acutally uses it. In total, the function descriptor is 24\n// bytes long. Here is why we need it.\n//\n// PPC generally lacks PC-relative data access instructions. Position-\n// independent code sets GOT + 0x8000 to %r2 and access global variables\n// relative to %r2.\n//\n// Each ELF file has its own GOT. If a function calls another function in\n// the same ELF file, it doesn't have to reset %r2. However, if it is in\n// other file (e.g. other .so), it has to set a new value to %r2 so that\n// the register contains the callee's GOT + 0x8000.\n//\n// In this way, you can't call a function just by knowing the function's\n// entry point address. You also need to know a proper %r2 value for the\n// function. This is why a function pointer refers to a tuple of an\n// address and a %r2 value.\n//\n// If a function call is made through PLT, PLT takes care of restoring %r2.\n// Therefore, the caller has to restore %r2 only for function calls\n// through function pointers.\n//\n// .opd (short for \"official procedure descriptors\") contains function\n// descriptors.\n//\n// You can think OPD as this: even in other targets, a function can have a\n// few different addresses for different purposes. It may not only have an\n// entry point address but may also have PLT and/or GOT addresses.\n// In PPCV1, it may have an OPD address in addition to these. OPD address\n// is used for relocations that refers to the address of a function as a\n// function pointer.\n//\n// https://github.com/rui314/psabi/blob/main/ppc64v1.pdf\n\n#if MOLD_PPC64V1\n\n#include \"mold.h\"\n\n#include <algorithm>\n#include <tbb/parallel_for_each.h>\n\nnamespace mold {\n\nusing E = PPC64V1;\n\nstatic u64 lo(u64 x)    { return x & 0xffff; }\nstatic u64 hi(u64 x)    { return x >> 16; }\nstatic u64 ha(u64 x)    { return (x + 0x8000) >> 16; }\nstatic u64 high(u64 x)  { return (x >> 16) & 0xffff; }\nstatic u64 higha(u64 x) { return ((x + 0x8000) >> 16) & 0xffff; }\n\n// .plt is used only for lazy symbol resolution on PPC64. All PLT\n// calls are made via range extension thunks even if they are within\n// reach. Thunks read addresses from .got.plt and jump there.\n// Therefore, once PLT symbols are resolved and final addresses are\n// written to .got.plt, thunks just skip .plt and directly jump to the\n// resolved addresses.\ntemplate <>\nvoid write_plt_header(Context<E> &ctx, u8 *buf) {\n  constexpr ub32 insn[] = {\n    0x7d88'02a6, // mflr    r12\n    0x429f'0005, // bcl     20, 31, 4 // obtain PC\n    0x7d68'02a6, // mflr    r11\n    0x7d88'03a6, // mtlr    r12\n    0x3d6b'0000, // addis   r11, r11, GOTPLT_OFFSET@ha\n    0x396b'0000, // addi    r11, r11, GOTPLT_OFFSET@lo\n    0xe98b'0000, // ld      r12,0(r11)\n    0xe84b'0008, // ld      r2,8(r11)\n    0x7d89'03a6, // mtctr   r12\n    0xe96b'0010, // ld      r11,16(r11)\n    0x4e80'0420, // bctr\n  };\n\n  static_assert(sizeof(insn) == E::plt_hdr_size);\n  memcpy(buf, insn, sizeof(insn));\n\n  i64 val = ctx.gotplt->shdr.sh_addr - ctx.plt->shdr.sh_addr - 8;\n  *(ub32 *)(buf + 16) |= higha(val);\n  *(ub32 *)(buf + 20) |= lo(val);\n}\n\ntemplate <>\nvoid write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  ub32 *loc = (ub32 *)buf;\n  i64 idx = sym.get_plt_idx(ctx);\n\n  // The PPC64 ELFv1 ABI requires PLT entries to be vary in size depending\n  // on their indices. Unlike other targets, .got.plt is filled not by us\n  // but by the loader, so we don't have a control over where the initial\n  // call to the PLT entry jumps to. So we need to strictly follow the PLT\n  // section layout as the loader expect it to be.\n  if (idx < 0x8000) {\n    constexpr ub32 insn[] = {\n      0x3800'0000, // li      r0, PLT_INDEX\n      0x4b00'0000, // b       plt0\n    };\n\n    memcpy(loc, insn, sizeof(insn));\n    loc[0] |= idx;\n    loc[1] |= (ctx.plt->shdr.sh_addr - sym.get_plt_addr(ctx) - 4) & 0x00ff'ffff;\n  } else {\n    constexpr ub32 insn[] = {\n      0x3c00'0000, // lis     r0, PLT_INDEX@high\n      0x6000'0000, // ori     r0, r0, PLT_INDEX@lo\n      0x4b00'0000, // b       plt0\n    };\n\n    memcpy(loc, insn, sizeof(insn));\n    loc[0] |= high(idx);\n    loc[1] |= lo(idx);\n    loc[2] |= (ctx.plt->shdr.sh_addr - sym.get_plt_addr(ctx) - 8) & 0x00ff'ffff;\n  }\n}\n\n// .plt.got is not necessary on PPC64 because range extension thunks\n// directly read GOT entries and jump there.\ntemplate <>\nvoid write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {}\n\ntemplate <>\nvoid EhFrameSection<E>::apply_eh_reloc(Context<E> &ctx, const ElfRel<E> &rel,\n                                       u64 offset, u64 val) {\n  u8 *loc = ctx.buf + this->shdr.sh_offset + offset;\n\n  switch (rel.r_type) {\n  case R_NONE:\n    break;\n  case R_PPC64_ADDR64:\n    *(ub64 *)loc = val;\n    break;\n  case R_PPC64_REL32:\n    *(ub32 *)loc = val - this->shdr.sh_addr - offset;\n    break;\n  case R_PPC64_REL64:\n    *(ub64 *)loc = val - this->shdr.sh_addr - offset;\n    break;\n  default:\n    Fatal(ctx) << \"unsupported relocation in .eh_frame: \" << rel;\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE)\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    u64 S = sym.get_addr(ctx);\n    u64 A = rel.r_addend;\n    u64 P = get_addr() + rel.r_offset;\n    u64 G = sym.get_got_idx(ctx) * sizeof(Word<E>);\n    u64 GOT = ctx.got->shdr.sh_addr;\n    u64 TOC = ctx.extra.TOC->value;\n\n    auto check = [&](i64 val, i64 lo, i64 hi) {\n      check_range(ctx, i, val, lo, hi);\n    };\n\n    switch (rel.r_type) {\n    case R_PPC64_TOC:\n      break;\n    case R_PPC64_TOC16_HA:\n      *(ub16 *)loc = ha(S + A - TOC);\n      break;\n    case R_PPC64_TOC16_LO:\n      *(ub16 *)loc = lo(S + A - TOC);\n      break;\n    case R_PPC64_TOC16_DS:\n      check(S + A - TOC, -(1 << 15), 1 << 15);\n      *(ub16 *)loc |= (S + A - TOC) & 0xfffc;\n      break;\n    case R_PPC64_TOC16_LO_DS:\n      *(ub16 *)loc |= (S + A - TOC) & 0xfffc;\n      break;\n    case R_PPC64_REL24: {\n      i64 val = sym.get_addr(ctx, NO_OPD) + A - P;\n      if (sym.has_plt(ctx) || !is_int(val, 26))\n        val = sym.get_thunk_addr(ctx, P) + A - P;\n\n      check(val, -(1 << 25), 1 << 25);\n      *(ub32 *)loc |= bits(val, 25, 2) << 2;\n\n      // If a callee is an external function, PLT saves %r2 to the\n      // caller's r2 save slot. We need to restore it after function\n      // return. To do so, there's usually a NOP as a placeholder\n      // after a BL. 0x6000'0000 is a NOP.\n      if (sym.has_plt(ctx) && *(ub32 *)(loc + 4) == 0x6000'0000)\n        *(ub32 *)(loc + 4) = 0xe841'0028; // ld r2, 40(r1)\n      break;\n    }\n    case R_PPC64_REL32:\n      *(ub32 *)loc = S + A - P;\n      break;\n    case R_PPC64_REL64:\n      *(ub64 *)loc = S + A - P;\n      break;\n    case R_PPC64_REL16_HA:\n      *(ub16 *)loc = ha(S + A - P);\n      break;\n    case R_PPC64_REL16_LO:\n      *(ub16 *)loc = lo(S + A - P);\n      break;\n    case R_PPC64_GOT16:\n      *(ub16 *)loc = G - TOC;\n      break;\n    case R_PPC64_PLT16_HA:\n      *(ub16 *)loc = ha(G + GOT - TOC);\n      break;\n    case R_PPC64_PLT16_HI:\n      *(ub16 *)loc = hi(G + GOT - TOC);\n      break;\n    case R_PPC64_PLT16_LO:\n      *(ub16 *)loc = lo(G + GOT - TOC);\n      break;\n    case R_PPC64_PLT16_LO_DS:\n      *(ub16 *)loc |= (G + GOT - TOC) & 0xfffc;\n      break;\n    case R_PPC64_GOT_TPREL16_HA:\n      *(ub16 *)loc = ha(sym.get_gottp_addr(ctx) - TOC);\n      break;\n    case R_PPC64_GOT_TLSGD16_HA:\n      *(ub16 *)loc = ha(sym.get_tlsgd_addr(ctx) - TOC);\n      break;\n    case R_PPC64_GOT_TLSGD16_LO:\n      *(ub16 *)loc = lo(sym.get_tlsgd_addr(ctx) - TOC);\n      break;\n    case R_PPC64_GOT_TLSLD16_HA:\n      *(ub16 *)loc = ha(ctx.got->get_tlsld_addr(ctx) - TOC);\n      break;\n    case R_PPC64_GOT_TLSLD16_LO:\n      *(ub16 *)loc = lo(ctx.got->get_tlsld_addr(ctx) - TOC);\n      break;\n    case R_PPC64_DTPREL16_HA:\n      *(ub16 *)loc = ha(S + A - ctx.dtp_addr);\n      break;\n    case R_PPC64_DTPREL16_LO:\n      *(ub16 *)loc = lo(S + A - ctx.dtp_addr);\n      break;\n    case R_PPC64_DTPREL16_LO_DS:\n      *(ub16 *)loc |= (S + A - ctx.dtp_addr) & 0xfffc;\n      break;\n    case R_PPC64_TPREL16_HA:\n      *(ub16 *)loc = ha(S + A - ctx.tp_addr);\n      break;\n    case R_PPC64_TPREL16_LO:\n      *(ub16 *)loc = lo(S + A - ctx.tp_addr);\n      break;\n    case R_PPC64_TPREL16_LO_DS:\n      *(ub16 *)loc |= (S + A - ctx.tp_addr) & 0xfffc;\n      break;\n    case R_PPC64_GOT_TPREL16_LO_DS:\n      *(ub16 *)loc |= (sym.get_gottp_addr(ctx) - TOC) & 0xfffc;\n      break;\n    case R_PPC64_ADDR64:\n    case R_PPC64_PLTSEQ:\n    case R_PPC64_PLTCALL:\n    case R_PPC64_TLS:\n    case R_PPC64_TLSGD:\n    case R_PPC64_TLSLD:\n      break;\n    default:\n      unreachable();\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_nonalloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    SectionFragment<E> *frag;\n    i64 frag_addend;\n    std::tie(frag, frag_addend) = get_fragment(ctx, rel);\n\n    u64 S = frag ? frag->get_addr(ctx) : sym.get_addr(ctx);\n    u64 A = frag ? frag_addend : (i64)rel.r_addend;\n\n    auto check = [&](i64 val, i64 lo, i64 hi) {\n      check_range(ctx, val, i, lo, hi);\n    };\n\n    switch (rel.r_type) {\n    case R_PPC64_ADDR64:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(ub64 *)loc = *val;\n      else\n        *(ub64 *)loc = S + A;\n      break;\n    case R_PPC64_ADDR32:\n      check(S + A, 0, 1LL << 32);\n      *(ub32 *)loc = S + A;\n      break;\n    case R_PPC64_DTPREL64:\n      *(ub64 *)loc = S + A - ctx.dtp_addr;\n      break;\n    default:\n      Fatal(ctx) << *this << \": invalid relocation for non-allocated sections: \"\n                 << rel;\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::scan_relocations(Context<E> &ctx) {\n  assert(shdr().sh_flags & SHF_ALLOC);\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  // Scan relocations\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n\n    if (sym.is_ifunc())\n      sym.flags |= NEEDS_GOT | NEEDS_PLT | NEEDS_PPC_OPD;\n\n    // Any relocation except R_PPC64_REL24 is considered as an\n    // address-taking relocation.\n    if (rel.r_type != R_PPC64_REL24 && sym.get_type() == STT_FUNC)\n      sym.flags |= NEEDS_PPC_OPD;\n\n    switch (rel.r_type) {\n    case R_PPC64_GOT_TPREL16_HA:\n      sym.flags |= NEEDS_GOTTP;\n      break;\n    case R_PPC64_REL24:\n      if (sym.is_imported)\n        sym.flags |= NEEDS_PLT;\n      break;\n    case R_PPC64_GOT16:\n    case R_PPC64_PLT16_HA:\n      sym.flags |= NEEDS_GOT;\n      break;\n    case R_PPC64_GOT_TLSGD16_HA:\n      sym.flags |= NEEDS_TLSGD;\n      break;\n    case R_PPC64_GOT_TLSLD16_HA:\n      ctx.needs_tlsld = true;\n      break;\n    case R_PPC64_TPREL16_HA:\n    case R_PPC64_TPREL16_LO:\n    case R_PPC64_TPREL16_LO_DS:\n      check_tlsle(ctx, sym, rel);\n      break;\n    case R_PPC64_ADDR64:\n    case R_PPC64_TOC:\n    case R_PPC64_REL32:\n    case R_PPC64_REL64:\n    case R_PPC64_TOC16_HA:\n    case R_PPC64_TOC16_LO:\n    case R_PPC64_TOC16_LO_DS:\n    case R_PPC64_TOC16_DS:\n    case R_PPC64_REL16_HA:\n    case R_PPC64_REL16_LO:\n    case R_PPC64_PLT16_HI:\n    case R_PPC64_PLT16_LO:\n    case R_PPC64_PLT16_LO_DS:\n    case R_PPC64_PLTSEQ:\n    case R_PPC64_PLTCALL:\n    case R_PPC64_GOT_TPREL16_LO_DS:\n    case R_PPC64_GOT_TLSGD16_LO:\n    case R_PPC64_GOT_TLSLD16_LO:\n    case R_PPC64_TLS:\n    case R_PPC64_TLSGD:\n    case R_PPC64_TLSLD:\n    case R_PPC64_DTPREL16_HA:\n    case R_PPC64_DTPREL16_LO:\n    case R_PPC64_DTPREL16_LO_DS:\n      break;\n    default:\n      Error(ctx) << *this << \": unknown relocation: \" << rel;\n    }\n  }\n}\n\ntemplate <>\nvoid Thunk<E>::copy_buf(Context<E> &ctx) {\n  // If the destination is .plt.got, we save the current r2, read an\n  // address of a function descriptor from .got, restore %r2 and jump\n  // to the function.\n  constexpr ub32 pltgot_thunk[] = {\n    // Store the caller's %r2\n    0xf841'0028, // std   %r2, 40(%r1)\n\n    // Load an address of a function descriptor\n    0x3d82'0000, // addis %r12, %r2,  foo@got@toc@ha\n    0xe98c'0000, // ld    %r12, foo@got@toc@lo(%r12)\n\n    // Restore the callee's %r2\n    0xe84c'0008, // ld    %r2,  8(%r12)\n\n    // Jump to the function\n    0xe98c'0000, // ld    %r12, 0(%r12)\n    0x7d89'03a6, // mtctr %r12\n    0x4e80'0420, // bctr\n  };\n\n  // If the destination is .plt, read a function descriptor from .got.plt.\n  constexpr ub32 plt_thunk[] = {\n    // Store the caller's %r2\n    0xf841'0028, // std   %r2, 40(%r1)\n\n    // Materialize an address of a function descriptor\n    0x3d82'0000, // addis %r12, %r2,  foo@gotplt@toc@ha\n    0x398c'0000, // addi  %r12, %r12, foo@gotplt@toc@lo\n\n    // Restore the callee's %r2\n    0xe84c'0008, // ld    %r2,  8(%r12)\n\n    // Jump to the function\n    0xe98c'0000, // ld    %r12, 0(%r12)\n    0x7d89'03a6, // mtctr %r12\n    0x4e80'0420, // bctr\n  };\n\n  // If the destination is a non-imported function, we directly jump\n  // to the function entry address.\n  constexpr ub32 local_thunk[] = {\n    0x3d82'0000, // addis r12, r2,  foo@toc@ha\n    0x398c'0000, // addi  r12, r12, foo@toc@lo\n    0x7d89'03a6, // mtctr r12\n    0x4e80'0420, // bctr\n    0x6000'0000, // nop\n    0x6000'0000, // nop\n    0x6000'0000, // nop\n  };\n\n  static_assert(E::thunk_size == sizeof(pltgot_thunk));\n  static_assert(E::thunk_size == sizeof(plt_thunk));\n  static_assert(E::thunk_size == sizeof(local_thunk));\n\n  u8 *base = ctx.buf + output_section.shdr.sh_offset + offset;\n  u64 TOC = ctx.extra.TOC->value;\n\n  for (i64 i = 0; i < symbols.size(); i++) {\n    Symbol<E> &sym = *symbols[i];\n    u8 *buf = base + offsets[i];\n\n    if (sym.has_got(ctx)) {\n      memcpy(buf, pltgot_thunk, sizeof(pltgot_thunk));\n      i64 val = sym.get_got_addr(ctx) - TOC;\n      *(ub32 *)(buf + 4) |= higha(val);\n      *(ub32 *)(buf + 8) |= lo(val);\n    } else if(sym.has_plt(ctx)) {\n      memcpy(buf, plt_thunk, sizeof(plt_thunk));\n      i64 val = sym.get_gotplt_addr(ctx) - TOC;\n      *(ub32 *)(buf + 4) |= higha(val);\n      *(ub32 *)(buf + 8) |= lo(val);\n    } else {\n      memcpy(buf, local_thunk, sizeof(local_thunk));\n      i64 val = sym.get_addr(ctx, NO_OPD) - TOC;\n      *(ub32 *)buf |= higha(val);\n      *(ub32 *)(buf + 4) |= lo(val);\n    }\n  }\n}\n\nstatic InputSection<E> *get_opd_section(ObjectFile<E> &file) {\n  for (std::unique_ptr<InputSection<E>> &isec : file.sections)\n    if (isec && isec->name() == \".opd\")\n      return isec.get();\n  return nullptr;\n}\n\nstatic ElfRel<E> *\nget_relocation_at(Context<E> &ctx, InputSection<E> &isec, u64 offset) {\n  std::span<ElfRel<E>> rels = isec.get_rels(ctx);\n  auto it = ranges::lower_bound(rels, offset, {}, [](const ElfRel<E> &r) {\n    return (u64)r.r_offset;\n  });\n  if (it == rels.end() || it->r_offset != offset)\n    return nullptr;\n  return &*it;\n}\n\nnamespace {\nstruct OpdSymbol {\n  u64 r_offset = 0;\n  Symbol<E> *sym = nullptr;\n};\n}\n\nstatic Symbol<E> *\nget_opd_sym_at(std::span<OpdSymbol> syms, u64 offset) {\n  auto it = ranges::lower_bound(syms, offset, {}, &OpdSymbol::r_offset);\n  if (it == syms.end() || it->r_offset != offset)\n    return nullptr;\n  return it->sym;\n}\n\n// Compiler creates an .opd entry for each function symbol. The intention\n// is to make it possible to create an output .opd section just by linking\n// input .opd sections in the same manner as we do to other normal input\n// sections.\n//\n// However, in reality, .opd isn't a normal input section. It needs many\n// special treatments as follows:\n//\n// 1. A function symbol refers to not a .text but an .opd. Its address\n//    works fine for address-taking relocations such as R_PPC64_ADDR64.\n//    However, R_PPC64_REL24 (which is used for branch instruction) needs\n//    a function's real address instead of the function's .opd address.\n//    We need to read .opd contents to find out a function entry point\n//    address to apply R_PPC64_REL24.\n//\n// 2. Output .opd entries are needed only for functions whose addresses\n//    are taken. Just copying input .opd sections to an output would\n//    produces lots of dead .opd entries.\n//\n// 3. In this design, all function symbols refer to an .opd section, and\n//    that doesn't work well with graph traversal optimizations such as\n//    garbage collection or identical comdat folding. For example, garbage\n//    collector would mark an .opd alive which in turn mark all functions\n//    thatare referenced by .opd as alive, effectively keeping all\n//    functions as alive.\n//\n// The problem is that the compiler creates a half-baked .opd section, and\n// the linker has to figure out what all these .opd entries and\n// relocations are trying to achieve. It's like the compiler would emit a\n// half-baked .plt section in an object file and the linker has to deal\n// with that. That's not a good design.\n//\n// So, in this function, we undo what the compiler did to .opd. We remove\n// function symbols from .opd and reattach them to their function entry\n// points. We also rewrite relocations that directly refer to an input\n// .opd  section so that they refer to function symbols instead. We then\n// mark input .opd sections as dead.\n//\n// After this function, we mark symbols with the NEEDS_PPC_OPD flag if the\n// symbol needs an .opd entry. We then create an output .opd just like we\n// do for .plt or .got.\nvoid ppc64v1_rewrite_opd(Context<E> &ctx) {\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    InputSection<E> *opd = get_opd_section(*file);\n    if (!opd)\n      return;\n    opd->is_alive = false;\n\n    // Move symbols from .opd to .text.\n    std::vector<OpdSymbol> opd_syms;\n\n    for (Symbol<E> *sym : file->symbols) {\n      if (sym->file != file || sym->get_input_section() != opd)\n        continue;\n\n      if (u32 ty = sym->get_type(); ty != STT_FUNC && ty != STT_GNU_IFUNC)\n        continue;\n\n      ElfRel<E> *rel = get_relocation_at(ctx, *opd, sym->value);\n      if (!rel)\n        Fatal(ctx) << *file << \": cannot find a relocation in .opd for \"\n                   << *sym << \" at offset 0x\" << std::hex << (u64)sym->value;\n\n      Symbol<E> *sym2 = file->symbols[rel->r_sym];\n      if (sym2->get_type() != STT_SECTION)\n        Fatal(ctx) << *file << \": bad relocation in .opd referring to \" << *sym2;\n\n      opd_syms.push_back({sym->value, sym});\n\n      sym->set_input_section(sym2->get_input_section());\n      sym->value = rel->r_addend;\n    }\n\n    // Sort symbols so that get_opd_sym_at() can do binary search.\n    ranges::stable_sort(opd_syms, {}, &OpdSymbol::r_offset);\n\n    // Rewrite relocations so that they directly refer to .opd.\n    for (std::unique_ptr<InputSection<E>> &isec : file->sections) {\n      if (!isec || !isec->is_alive || isec.get() == opd)\n        continue;\n\n      for (ElfRel<E> &r : isec->get_rels(ctx)) {\n        Symbol<E> &sym = *file->symbols[r.r_sym];\n        if (sym.get_input_section() != opd)\n          continue;\n\n        Symbol<E> *real_sym = get_opd_sym_at(opd_syms, r.r_addend);\n        if (!real_sym)\n          Fatal(ctx) << *isec << \": cannot find a symbol in .opd for \" << r\n                     << \" at offset 0x\" << std::hex << (u64)r.r_addend;\n\n        r.r_sym = real_sym->sym_idx;\n        r.r_addend = 0;\n      }\n    }\n  });\n}\n\n// When a function is exported, the dynamic symbol for the function should\n// refers to the function's .opd entry. This function marks such symbols\n// with NEEDS_PPC_OPD.\nvoid ppc64v1_scan_symbols(Context<E> &ctx) {\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    for (Symbol<E> *sym : file->symbols)\n      if (sym->file == file && sym->is_exported)\n        if (u32 ty = sym->get_type(); ty == STT_FUNC || ty == STT_GNU_IFUNC)\n          sym->flags |= NEEDS_PPC_OPD;\n  });\n\n  // Functions referenced by the ELF header also have to have .opd entries.\n  if (!ctx.arg.entry->is_imported)\n    ctx.arg.entry->flags |= NEEDS_PPC_OPD;\n\n  if (!ctx.arg.init->is_imported)\n    ctx.arg.init->flags |= NEEDS_PPC_OPD;\n\n  if (!ctx.arg.fini->is_imported)\n    ctx.arg.fini->flags |= NEEDS_PPC_OPD;\n}\n\nvoid PPC64OpdSection::add_symbol(Context<E> &ctx, Symbol<E> *sym) {\n  sym->set_opd_idx(ctx, symbols.size());\n  symbols.push_back(sym);\n  this->shdr.sh_size += ENTRY_SIZE;\n}\n\ni64 PPC64OpdSection::get_reldyn_size(Context<E> &ctx) const {\n  if (ctx.arg.pic)\n    return symbols.size() * 2;\n  return 0;\n}\n\nvoid PPC64OpdSection::copy_buf(Context<E> &ctx) {\n  ub64 *buf = (ub64 *)(ctx.buf + this->shdr.sh_offset);\n\n  ElfRel<E> *rel = nullptr;\n  if (ctx.arg.pic)\n    rel = (ElfRel<E> *)(ctx.buf + ctx.reldyn->shdr.sh_offset + reldyn_offset);\n\n  for (Symbol<E> *sym : symbols) {\n    u64 addr = sym->get_addr(ctx, NO_PLT | NO_OPD);\n    *buf++ = addr;\n    *buf++ = ctx.extra.TOC->value;\n    *buf++ = 0;\n\n    if (ctx.arg.pic) {\n      u64 loc = sym->get_opd_addr(ctx);\n      *rel++ = ElfRel<E>(loc, E::R_RELATIVE, 0, addr);\n      *rel++ = ElfRel<E>(loc + 8, E::R_RELATIVE, 0, ctx.extra.TOC->value);\n    }\n  }\n}\n\n} // namespace mold\n\n#endif\n"
  },
  {
    "path": "src/arch-ppc64v2.cc",
    "content": "// This file implements the PowerPC ELFv2 ABI which was standardized in\n// 2014. Modern little-endian PowerPC systems are based on this ABI.\n// The ABI is often referred to as \"ppc64le\". This shouldn't be confused\n// with \"ppc64\" which refers to the original, big-endian PowerPC systems.\n//\n// PPC64 is a bit tricky to support because PC-relative load/store\n// instructions hadn't been available until Power10 which debuted in 2021.\n// Prior to Power10, it wasn't trivial for position-independent code (PIC)\n// to load a value from, for example, .got, as we can't do that with [PC +\n// the offset to the .got entry].\n//\n// In the following, I'll explain how PIC is supported on pre-Power10\n// systems first and then explain what has changed with Power10.\n//\n//\n// Position-independent code on Power9 or earlier:\n//\n// We can get the program counter on older PPC64 systems with the\n// following four instructions\n//\n//   mflr  r1  // save the current link register to r1\n//   bl    .+4 // branch to the next instruction as if it were a function\n//   mflr  r0  // copy the return address to r0\n//   mtlr  r1  // restore the original link register value\n//\n// , but it's too expensive to do if we do this for each load/store.\n//\n// As a workaround, most functions are compiled in such a way that r2 is\n// assumed to always contain the address of .got + 0x8000. With this, we\n// can for example load the first entry of .got with a single instruction\n// `lw r0, -0x8000(r2)`. r2 is called the TOC pointer.\n//\n// There's only one .got for each ELF module. Therefore, if a callee is in\n// the same ELF module, r2 doesn't have to be recomputed. Most function\n// calls are usually within the same ELF module, so this mechanism is\n// efficient.\n//\n// A function compiled for pre-Power10 usually has two entry points,\n// global and local. The global entry point usually 8 bytes precedes\n// the local entry point. In between is the following instructions:\n//\n//   addis r2, r12, .TOC.@ha\n//   addi  r2, r2,  .TOC.@lo + 4;\n//\n// The global entry point assumes that the address of itself is in r12,\n// and it computes its own TOC pointer from r12. It's easy to do so for\n// the callee because the offset between its .got + 0x8000 and the\n// function is known at link-time. The above code sequence then falls\n// through to the local entry point that assumes r2 is .got + 0x8000.\n//\n// So, if a callee's TOC pointer is different from the current one\n// (e.g. calling a function in another .so), we first load the callee's\n// address to r12 (e.g. from .got.plt with a r2-relative load) and branch\n// to that address. Then the callee computes its own TOC pointer using\n// r12.\n//\n//\n// Position-independent code on Power10:\n//\n// Power10 added 8-bytes-long instructions to the ISA. Some of them are\n// PC-relative load/store instructions that take 34 bits offsets.\n// Functions compiled with `-mcpu=power10` use these instructions for PIC.\n// r2 does not have a special meaning in such fucntions.\n//\n// When a fucntion compiled for Power10 calls a function that uses the TOC\n// pointer, we need to compute a correct value for TOC and set it to r2\n// before transferring the control to the callee. Thunks are responsible\n// for doing it.\n//\n// `_NOTOC` relocations such as `R_PPC64_REL24_NOTOC` indicate that the\n// callee does not use TOC (i.e. compiled with `-mcpu=power10`). If a\n// function using TOC is referenced via a `_NOTOC` relocation, that call\n// is made through a range extension thunk.\n//\n//\n// Note on section names: the PPC64 psABI uses a weird naming convention\n// which calls .got.plt .plt. We ignored that part because it's just\n// confusing. Since the runtime only cares about segments, we should be\n// able to name sections whatever we want.\n//\n// https://github.com/rui314/psabi/blob/main/ppc64v2.pdf\n\n#if MOLD_PPC64V2\n\n#include \"mold.h\"\n\nnamespace mold {\n\nusing E = PPC64V2;\n\nstatic u64 lo(u64 x)    { return x & 0xffff; }\nstatic u64 hi(u64 x)    { return x >> 16; }\nstatic u64 ha(u64 x)    { return (x + 0x8000) >> 16; }\nstatic u64 high(u64 x)  { return (x >> 16) & 0xffff; }\nstatic u64 higha(u64 x) { return ((x + 0x8000) >> 16) & 0xffff; }\n\nstatic void write34(u8 *loc, u64 x) {\n  ul32 *buf = (ul32 *)loc;\n  buf[0] = (buf[0] & 0xfffc'0000) | bits(x, 33, 16);\n  buf[1] = (buf[1] & 0xffff'0000) | bits(x, 15, 0);\n}\n\n// .plt is used only for lazy symbol resolution on PPC64. All PLT\n// calls are made via range extension thunks even if they are within\n// reach. Thunks read addresses from .got.plt and jump there.\n// Therefore, once PLT symbols are resolved and final addresses are\n// written to .got.plt, thunks just skip .plt and directly jump to the\n// resolved addresses.\ntemplate <>\nvoid write_plt_header(Context<E> &ctx, u8 *buf) {\n  constexpr ul32 insn[] = {\n    // Get PC\n    0x7c08'02a6, // mflr    r0\n    0x429f'0005, // bcl     20, 31, 4 // obtain PC\n    0x7d68'02a6, // mflr    r11\n    0x7c08'03a6, // mtlr    r0\n\n    // Compute the PLT entry index\n    0x398c'ffd4, // addi    r12, r12, -44\n    0x7c0b'6050, // subf    r0, r11, r12\n    0x7800'f082, // rldicl  r0, r0, 62, 2\n\n    // Compute the address of .got.plt\n    0x3d6b'0000, // addis   r11, r11, GOTPLT_OFFSET@ha\n    0x396b'0000, // addi    r11, r11, GOTPLT_OFFSET@lo\n\n    // Load .got.plt[0] and .got.plt[1] and branch to .got.plt[0]\n    0xe98b'0000, // ld      r12, 0(r11)\n    0x7d89'03a6, // mtctr   r12\n    0xe96b'0008, // ld      r11, 8(r11)\n    0x4e80'0420, // bctr\n  };\n\n  memcpy(buf, insn, sizeof(insn));\n\n  i64 val = ctx.gotplt->shdr.sh_addr - ctx.plt->shdr.sh_addr - 8;\n  *(ul32 *)(buf + 28) |= higha(val);\n  *(ul32 *)(buf + 32) |= lo(val);\n}\n\ntemplate <>\nvoid write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  // When the control is transferred to a PLT entry, the PLT entry's\n  // address is already set to %r12 by the caller.\n  i64 offset = ctx.plt->shdr.sh_addr - sym.get_plt_addr(ctx);\n  *(ul32 *)buf = 0x4b00'0000 | (offset & 0x00ff'ffff);        // b plt0\n}\n\n// .plt.got is not necessary on PPC64 because range extension thunks\n// directly read GOT entries and jump there.\ntemplate <>\nvoid write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {}\n\ntemplate <>\nvoid EhFrameSection<E>::apply_eh_reloc(Context<E> &ctx, const ElfRel<E> &rel,\n                                       u64 offset, u64 val) {\n  u8 *loc = ctx.buf + this->shdr.sh_offset + offset;\n\n  switch (rel.r_type) {\n  case R_NONE:\n    break;\n  case R_PPC64_ADDR64:\n    *(ul64 *)loc = val;\n    break;\n  case R_PPC64_REL32:\n    *(ul32 *)loc = val - this->shdr.sh_addr - offset;\n    break;\n  case R_PPC64_REL64:\n    *(ul64 *)loc = val - this->shdr.sh_addr - offset;\n    break;\n  default:\n    Fatal(ctx) << \"unsupported relocation in .eh_frame: \" << rel;\n  }\n}\n\nstatic u64 get_local_entry_offset(Context<E> &ctx, Symbol<E> &sym) {\n  i64 val = sym.esym().ppc64_local_entry;\n  assert(val <= 7);\n  if (val == 7)\n    Fatal(ctx) << sym << \": local entry offset 7 is reserved\";\n\n  if (val == 0 || val == 1)\n    return 0;\n  return 1 << val;\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE)\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    u64 S = sym.get_addr(ctx);\n    u64 A = rel.r_addend;\n    u64 P = get_addr() + rel.r_offset;\n    u64 G = sym.get_got_idx(ctx) * sizeof(Word<E>);\n    u64 GOT = ctx.got->shdr.sh_addr;\n    u64 TOC = ctx.extra.TOC->value;\n\n    auto r2save_thunk_addr = [&] { return sym.get_thunk_addr(ctx, P); };\n    auto no_r2save_thunk_addr = [&] { return sym.get_thunk_addr(ctx, P) + 8; };\n\n    switch (rel.r_type) {\n    case R_PPC64_TOC16_HA:\n      *(ul16 *)loc = ha(S + A - TOC);\n      break;\n    case R_PPC64_TOC16_LO:\n      *(ul16 *)loc = lo(S + A - TOC);\n      break;\n    case R_PPC64_TOC16_DS:\n    case R_PPC64_TOC16_LO_DS:\n      *(ul16 *)loc |= (S + A - TOC) & 0xfffc;\n      break;\n    case R_PPC64_REL24:\n      if (sym.has_plt(ctx) || !sym.esym().ppc64_preserves_r2()) {\n        i64 val = r2save_thunk_addr() + A - P;\n        *(ul32 *)loc |= bits(val, 25, 2) << 2;\n\n        // The thunk saves %r2 to the caller's r2 save slot. We need to\n        // restore it after function return. To do so, there's usually a\n        // NOP as a placeholder after a BL. 0x6000'0000 is a NOP.\n        if (*(ul32 *)(loc + 4) == 0x6000'0000)\n          *(ul32 *)(loc + 4) = 0xe841'0018; // ld r2, 24(r1)\n      } else {\n        i64 val = S + get_local_entry_offset(ctx, sym) + A - P;\n        if (!is_int(val, 26))\n          val = no_r2save_thunk_addr() + A - P;\n        *(ul32 *)loc |= bits(val, 25, 2) << 2;\n      }\n      break;\n    case R_PPC64_REL24_NOTOC:\n      if (sym.has_plt(ctx) || sym.esym().ppc64_uses_toc()) {\n        i64 val = no_r2save_thunk_addr() + A - P;\n        *(ul32 *)loc |= bits(val, 25, 2) << 2;\n      } else {\n        i64 val = S + A - P;\n        if (!is_int(val, 26))\n          val = no_r2save_thunk_addr() + A - P;\n        *(ul32 *)loc |= bits(val, 25, 2) << 2;\n      }\n      break;\n    case R_PPC64_REL14:\n      *(ul32 *)loc |= bits(S + A - P, 15, 2) << 2;\n      break;\n    case R_PPC64_REL32:\n      *(ul32 *)loc = S + A - P;\n      break;\n    case R_PPC64_REL64:\n      *(ul64 *)loc = S + A - P;\n      break;\n    case R_PPC64_REL16_HA:\n      *(ul16 *)loc = ha(S + A - P);\n      break;\n    case R_PPC64_REL16_LO:\n      *(ul16 *)loc = lo(S + A - P);\n      break;\n    case R_PPC64_GOT16:\n      *(ul16 *)loc = G - TOC;\n      break;\n    case R_PPC64_GOT16_LO:\n      *(ul16 *)loc = lo(G - TOC);\n      break;\n    case R_PPC64_GOT16_HI:\n      *(ul16 *)loc = hi(G - TOC);\n      break;\n    case R_PPC64_GOT16_HA:\n      *(ul16 *)loc = ha(G - TOC);\n      break;\n    case R_PPC64_PLT16_HA:\n      *(ul16 *)loc = ha(G + GOT - TOC);\n      break;\n    case R_PPC64_PLT16_HI:\n      *(ul16 *)loc = hi(G + GOT - TOC);\n      break;\n    case R_PPC64_PLT16_LO:\n      *(ul16 *)loc = lo(G + GOT - TOC);\n      break;\n    case R_PPC64_PLT16_LO_DS:\n      *(ul16 *)loc |= (G + GOT - TOC) & 0xfffc;\n      break;\n    case R_PPC64_PLT_PCREL34:\n    case R_PPC64_PLT_PCREL34_NOTOC:\n    case R_PPC64_GOT_PCREL34:\n      write34(loc, G + GOT - P);\n      break;\n    case R_PPC64_PCREL34:\n      write34(loc, S + A - P);\n      break;\n    case R_PPC64_GOT_TPREL16_HA:\n      *(ul16 *)loc = ha(sym.get_gottp_addr(ctx) - TOC);\n      break;\n    case R_PPC64_GOT_TPREL16_LO_DS:\n      *(ul16 *)loc |= (sym.get_gottp_addr(ctx) - TOC) & 0xfffc;\n      break;\n    case R_PPC64_GOT_TPREL_PCREL34:\n      write34(loc, sym.get_gottp_addr(ctx) - P);\n      break;\n    case R_PPC64_GOT_TLSGD16_HA:\n      *(ul16 *)loc = ha(sym.get_tlsgd_addr(ctx) - TOC);\n      break;\n    case R_PPC64_GOT_TLSGD16_LO:\n      *(ul16 *)loc = lo(sym.get_tlsgd_addr(ctx) - TOC);\n      break;\n    case R_PPC64_GOT_TLSGD_PCREL34:\n      write34(loc, sym.get_tlsgd_addr(ctx) - P);\n      break;\n    case R_PPC64_GOT_TLSLD16_HA:\n      *(ul16 *)loc = ha(ctx.got->get_tlsld_addr(ctx) - TOC);\n      break;\n    case R_PPC64_GOT_TLSLD16_LO:\n      *(ul16 *)loc = lo(ctx.got->get_tlsld_addr(ctx) - TOC);\n      break;\n    case R_PPC64_GOT_TLSLD_PCREL34:\n      write34(loc, ctx.got->get_tlsld_addr(ctx) - P);\n      break;\n    case R_PPC64_DTPREL16_HA:\n      *(ul16 *)loc = ha(S + A - ctx.dtp_addr);\n      break;\n    case R_PPC64_DTPREL16_LO:\n      *(ul16 *)loc = lo(S + A - ctx.dtp_addr);\n      break;\n    case R_PPC64_DTPREL16_LO_DS:\n      *(ul16 *)loc |= (S + A - ctx.dtp_addr) & 0xfffc;\n      break;\n    case R_PPC64_DTPREL34:\n      write34(loc, S + A - ctx.dtp_addr);\n      break;\n    case R_PPC64_TPREL16_HA:\n      *(ul16 *)loc = ha(S + A - ctx.tp_addr);\n      break;\n    case R_PPC64_TPREL16_LO:\n      *(ul16 *)loc = lo(S + A - ctx.tp_addr);\n      break;\n    case R_PPC64_TPREL16_LO_DS:\n      *(ul16 *)loc |= (S + A - ctx.tp_addr) & 0xfffc;\n      break;\n    case R_PPC64_TPREL34:\n      write34(loc, S + A - ctx.tp_addr);\n      break;\n    case R_PPC64_ADDR64:\n    case R_PPC64_PLTSEQ:\n    case R_PPC64_PLTSEQ_NOTOC:\n    case R_PPC64_PLTCALL:\n    case R_PPC64_PLTCALL_NOTOC:\n    case R_PPC64_TLS:\n    case R_PPC64_TLSGD:\n    case R_PPC64_TLSLD:\n    case R_PPC64_ENTRY:\n      break;\n    default:\n      unreachable();\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_nonalloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    SectionFragment<E> *frag;\n    i64 frag_addend;\n    std::tie(frag, frag_addend) = get_fragment(ctx, rel);\n\n    u64 S = frag ? frag->get_addr(ctx) : sym.get_addr(ctx);\n    u64 A = frag ? frag_addend : (i64)rel.r_addend;\n\n    auto check = [&](i64 val, i64 lo, i64 hi) {\n      check_range(ctx, i, val, lo, hi);\n    };\n\n    switch (rel.r_type) {\n    case R_PPC64_ADDR64:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(ul64 *)loc = *val;\n      else\n        *(ul64 *)loc = S + A;\n      break;\n    case R_PPC64_ADDR32:\n      check(S + A, 0, 1LL << 32);\n      *(ul32 *)loc = S + A;\n      break;\n    case R_PPC64_DTPREL64:\n      *(ul64 *)loc = S + A - ctx.dtp_addr;\n      break;\n    default:\n      Fatal(ctx) << *this << \": invalid relocation for non-allocated sections: \"\n                 << rel;\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::scan_relocations(Context<E> &ctx) {\n  assert(shdr().sh_flags & SHF_ALLOC);\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  // Scan relocations\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n\n    if (sym.is_ifunc())\n      sym.flags |= NEEDS_GOT | NEEDS_PLT;\n\n    switch (rel.r_type) {\n    case R_PPC64_GOT_TPREL16_HA:\n    case R_PPC64_GOT_TPREL_PCREL34:\n      sym.flags |= NEEDS_GOTTP;\n      break;\n    case R_PPC64_REL24:\n      if (sym.is_imported)\n        sym.flags |= NEEDS_PLT;\n      break;\n    case R_PPC64_REL24_NOTOC:\n      if (sym.is_imported)\n        sym.flags |= NEEDS_PLT;\n      ctx.extra.is_power10 = true;\n      break;\n    case R_PPC64_GOT16:\n    case R_PPC64_GOT16_LO:\n    case R_PPC64_GOT16_HI:\n    case R_PPC64_GOT16_HA:\n    case R_PPC64_PLT16_HA:\n    case R_PPC64_PLT_PCREL34:\n    case R_PPC64_PLT_PCREL34_NOTOC:\n    case R_PPC64_GOT_PCREL34:\n      sym.flags |= NEEDS_GOT;\n      break;\n    case R_PPC64_GOT_TLSGD16_HA:\n    case R_PPC64_GOT_TLSGD_PCREL34:\n      sym.flags |= NEEDS_TLSGD;\n      break;\n    case R_PPC64_GOT_TLSLD16_HA:\n    case R_PPC64_GOT_TLSLD_PCREL34:\n      ctx.needs_tlsld = true;\n      break;\n    case R_PPC64_TPREL16_HA:\n    case R_PPC64_TPREL34:\n      check_tlsle(ctx, sym, rel);\n      break;\n    case R_PPC64_ADDR64:\n    case R_PPC64_REL14:\n    case R_PPC64_REL32:\n    case R_PPC64_REL64:\n    case R_PPC64_TOC16_HA:\n    case R_PPC64_TOC16_LO:\n    case R_PPC64_TOC16_LO_DS:\n    case R_PPC64_TOC16_DS:\n    case R_PPC64_REL16_HA:\n    case R_PPC64_REL16_LO:\n    case R_PPC64_PLT16_HI:\n    case R_PPC64_PLT16_LO:\n    case R_PPC64_PLT16_LO_DS:\n    case R_PPC64_PCREL34:\n    case R_PPC64_PLTSEQ:\n    case R_PPC64_PLTSEQ_NOTOC:\n    case R_PPC64_PLTCALL:\n    case R_PPC64_PLTCALL_NOTOC:\n    case R_PPC64_GOT_TPREL16_LO_DS:\n    case R_PPC64_GOT_TLSGD16_LO:\n    case R_PPC64_GOT_TLSLD16_LO:\n    case R_PPC64_TPREL16_LO:\n    case R_PPC64_TPREL16_LO_DS:\n    case R_PPC64_TLS:\n    case R_PPC64_TLSGD:\n    case R_PPC64_TLSLD:\n    case R_PPC64_DTPREL16_HA:\n    case R_PPC64_DTPREL16_LO:\n    case R_PPC64_DTPREL16_LO_DS:\n    case R_PPC64_DTPREL34:\n    case R_PPC64_ENTRY:\n      break;\n    default:\n      Error(ctx) << *this << \": unknown relocation: \" << rel;\n    }\n  }\n}\n\ntemplate <>\nvoid Thunk<E>::copy_buf(Context<E> &ctx) {\n  // If the destination is PLT, we read an address from .got.plt or .got\n  // and jump there.\n  constexpr ul32 plt_thunk[] = {\n    0xf841'0018, // std   r2, 24(r1)\n    0x6000'0000, // nop\n    0x3d82'0000, // addis r12, r2, foo@gotplt@toc@ha\n    0xe98c'0000, // ld    r12, foo@gotplt@toc@lo(r12)\n    0x7d89'03a6, // mtctr r12\n    0x4e80'0420, // bctr\n  };\n\n  constexpr ul32 plt_thunk_power10[] = {\n    0xf841'0018, // std   r2, 24(r1)\n    0x6000'0000, // nop\n    0x0410'0000, // pld   r12, foo@gotplt@pcrel\n    0xe580'0000,\n    0x7d89'03a6, // mtctr r12\n    0x4e80'0420, // bctr\n  };\n\n  // If the destination is a non-imported function, we directly jump\n  // to its local entry point.\n  constexpr ul32 local_thunk[] = {\n    0xf841'0018, // std   r2, 24(r1)\n    0x6000'0000, // nop\n    0x3d82'0000, // addis r12, r2,  foo@toc@ha\n    0x398c'0000, // addi  r12, r12, foo@toc@lo\n    0x7d89'03a6, // mtctr r12\n    0x4e80'0420, // bctr\n  };\n\n  constexpr ul32 local_thunk_power10[] = {\n    0xf841'0018, // std   r2, 24(r1)\n    0x6000'0000, // nop\n    0x0610'0000, // pla   r12, foo@pcrel\n    0x3980'0000,\n    0x7d89'03a6, // mtctr r12\n    0x4e80'0420, // bctr\n  };\n\n  static_assert(E::thunk_size == sizeof(plt_thunk));\n  static_assert(E::thunk_size == sizeof(plt_thunk_power10));\n  static_assert(E::thunk_size == sizeof(local_thunk));\n  static_assert(E::thunk_size == sizeof(local_thunk_power10));\n\n  u8 *base = ctx.buf + output_section.shdr.sh_offset + offset;\n  u64 TOC = ctx.extra.TOC->value;\n\n  for (i64 i = 0; i < symbols.size(); i++) {\n    Symbol<E> &sym = *symbols[i];\n    u64 P = get_addr() + offsets[i];\n    u8 *buf = base + offsets[i];\n\n    if (sym.has_plt(ctx)) {\n      u64 got = sym.has_got(ctx) ? sym.get_got_addr(ctx) : sym.get_gotplt_addr(ctx);\n      if (ctx.extra.is_power10) {\n        memcpy(buf, plt_thunk_power10, E::thunk_size);\n        write34(buf + 8, got - P - 8);\n      } else {\n        memcpy(buf, plt_thunk, E::thunk_size);\n        *(ul32 *)(buf + 8) |= higha(got - TOC);\n        *(ul32 *)(buf + 12) |= lo(got - TOC);\n      }\n    } else {\n      u64 S = sym.get_addr(ctx);\n      if (ctx.extra.is_power10) {\n        memcpy(buf, local_thunk_power10, E::thunk_size);\n        write34(buf + 8, S - P - 8);\n      } else {\n        memcpy(buf, local_thunk, E::thunk_size);\n        *(ul32 *)(buf + 8) |= higha(S - TOC);\n        *(ul32 *)(buf + 12) |= lo(S - TOC);\n      }\n    }\n  }\n}\n\n// GCC may emit references to the following functions in function prologue\n// and epiilogue if -Os is specified. For some reason, these functions are\n// not in libgcc.a and expected to be synthesized by the linker.\nconst std::vector<std::pair<std::string_view, u32>>\nppc64_save_restore_insns = {\n  { \"_savegpr0_14\", 0xf9c1ff70 }, // std r14,-144(r1)\n  { \"_savegpr0_15\", 0xf9e1ff78 }, // std r15,-136(r1)\n  { \"_savegpr0_16\", 0xfa01ff80 }, // std r16,-128(r1)\n  { \"_savegpr0_17\", 0xfa21ff88 }, // std r17,-120(r1)\n  { \"_savegpr0_18\", 0xfa41ff90 }, // std r18,-112(r1)\n  { \"_savegpr0_19\", 0xfa61ff98 }, // std r19,-104(r1)\n  { \"_savegpr0_20\", 0xfa81ffa0 }, // std r20,-96(r1)\n  { \"_savegpr0_21\", 0xfaa1ffa8 }, // std r21,-88(r1)\n  { \"_savegpr0_22\", 0xfac1ffb0 }, // std r22,-80(r1)\n  { \"_savegpr0_23\", 0xfae1ffb8 }, // std r23,-72(r1)\n  { \"_savegpr0_24\", 0xfb01ffc0 }, // std r24,-64(r1)\n  { \"_savegpr0_25\", 0xfb21ffc8 }, // std r25,-56(r1)\n  { \"_savegpr0_26\", 0xfb41ffd0 }, // std r26,-48(r1)\n  { \"_savegpr0_27\", 0xfb61ffd8 }, // std r27,-40(r1)\n  { \"_savegpr0_28\", 0xfb81ffe0 }, // std r28,-32(r1)\n  { \"_savegpr0_29\", 0xfba1ffe8 }, // std r29,-24(r1)\n  { \"_savegpr0_30\", 0xfbc1fff0 }, // std r30,-16(r1)\n  { \"_savegpr0_31\", 0xfbe1fff8 }, // std r31,-8(r1)\n  { \"\",             0xf8010010 }, // std r0,16(r1)\n  { \"\",             0x4e800020 }, // blr\n\n  { \"_restgpr0_14\", 0xe9c1ff70 }, // ld r14,-144(r1)\n  { \"_restgpr0_15\", 0xe9e1ff78 }, // ld r15,-136(r1)\n  { \"_restgpr0_16\", 0xea01ff80 }, // ld r16,-128(r1)\n  { \"_restgpr0_17\", 0xea21ff88 }, // ld r17,-120(r1)\n  { \"_restgpr0_18\", 0xea41ff90 }, // ld r18,-112(r1)\n  { \"_restgpr0_19\", 0xea61ff98 }, // ld r19,-104(r1)\n  { \"_restgpr0_20\", 0xea81ffa0 }, // ld r20,-96(r1)\n  { \"_restgpr0_21\", 0xeaa1ffa8 }, // ld r21,-88(r1)\n  { \"_restgpr0_22\", 0xeac1ffb0 }, // ld r22,-80(r1)\n  { \"_restgpr0_23\", 0xeae1ffb8 }, // ld r23,-72(r1)\n  { \"_restgpr0_24\", 0xeb01ffc0 }, // ld r24,-64(r1)\n  { \"_restgpr0_25\", 0xeb21ffc8 }, // ld r25,-56(r1)\n  { \"_restgpr0_26\", 0xeb41ffd0 }, // ld r26,-48(r1)\n  { \"_restgpr0_27\", 0xeb61ffd8 }, // ld r27,-40(r1)\n  { \"_restgpr0_28\", 0xeb81ffe0 }, // ld r28,-32(r1)\n  { \"_restgpr0_29\", 0xe8010010 }, // ld r0,16(r1)\n  { \"\",             0xeba1ffe8 }, // ld r29,-24(r1)\n  { \"\",             0x7c0803a6 }, // mtlr r0\n  { \"\",             0xebc1fff0 }, // ld r30,-16(r1)\n  { \"\",             0xebe1fff8 }, // ld r31,-8(r1)\n  { \"\",             0x4e800020 }, // blr\n  { \"_restgpr0_30\", 0xebc1fff0 }, // ld r30,-16(r1)\n  { \"_restgpr0_31\", 0xe8010010 }, // ld r0,16(r1)\n  { \"\",             0xebe1fff8 }, // ld r31,-8(r1)\n  { \"\",             0x7c0803a6 }, // mtlr r0\n  { \"\",             0x4e800020 }, // blr\n\n  { \"_savegpr1_14\", 0xf9ccff70 }, // std r14,-144(r12)\n  { \"_savegpr1_15\", 0xf9ecff78 }, // std r15,-136(r12)\n  { \"_savegpr1_16\", 0xfa0cff80 }, // std r16,-128(r12)\n  { \"_savegpr1_17\", 0xfa2cff88 }, // std r17,-120(r12)\n  { \"_savegpr1_18\", 0xfa4cff90 }, // std r18,-112(r12)\n  { \"_savegpr1_19\", 0xfa6cff98 }, // std r19,-104(r12)\n  { \"_savegpr1_20\", 0xfa8cffa0 }, // std r20,-96(r12)\n  { \"_savegpr1_21\", 0xfaacffa8 }, // std r21,-88(r12)\n  { \"_savegpr1_22\", 0xfaccffb0 }, // std r22,-80(r12)\n  { \"_savegpr1_23\", 0xfaecffb8 }, // std r23,-72(r12)\n  { \"_savegpr1_24\", 0xfb0cffc0 }, // std r24,-64(r12)\n  { \"_savegpr1_25\", 0xfb2cffc8 }, // std r25,-56(r12)\n  { \"_savegpr1_26\", 0xfb4cffd0 }, // std r26,-48(r12)\n  { \"_savegpr1_27\", 0xfb6cffd8 }, // std r27,-40(r12)\n  { \"_savegpr1_28\", 0xfb8cffe0 }, // std r28,-32(r12)\n  { \"_savegpr1_29\", 0xfbacffe8 }, // std r29,-24(r12)\n  { \"_savegpr1_30\", 0xfbccfff0 }, // std r30,-16(r12)\n  { \"_savegpr1_31\", 0xfbecfff8 }, // std r31,-8(r12)\n  { \"\",             0x4e800020 }, // blr\n\n  { \"_restgpr1_14\", 0xe9ccff70 }, // ld r14,-144(r12)\n  { \"_restgpr1_15\", 0xe9ecff78 }, // ld r15,-136(r12)\n  { \"_restgpr1_16\", 0xea0cff80 }, // ld r16,-128(r12)\n  { \"_restgpr1_17\", 0xea2cff88 }, // ld r17,-120(r12)\n  { \"_restgpr1_18\", 0xea4cff90 }, // ld r18,-112(r12)\n  { \"_restgpr1_19\", 0xea6cff98 }, // ld r19,-104(r12)\n  { \"_restgpr1_20\", 0xea8cffa0 }, // ld r20,-96(r12)\n  { \"_restgpr1_21\", 0xeaacffa8 }, // ld r21,-88(r12)\n  { \"_restgpr1_22\", 0xeaccffb0 }, // ld r22,-80(r12)\n  { \"_restgpr1_23\", 0xeaecffb8 }, // ld r23,-72(r12)\n  { \"_restgpr1_24\", 0xeb0cffc0 }, // ld r24,-64(r12)\n  { \"_restgpr1_25\", 0xeb2cffc8 }, // ld r25,-56(r12)\n  { \"_restgpr1_26\", 0xeb4cffd0 }, // ld r26,-48(r12)\n  { \"_restgpr1_27\", 0xeb6cffd8 }, // ld r27,-40(r12)\n  { \"_restgpr1_28\", 0xeb8cffe0 }, // ld r28,-32(r12)\n  { \"_restgpr1_29\", 0xebacffe8 }, // ld r29,-24(r12)\n  { \"_restgpr1_30\", 0xebccfff0 }, // ld r30,-16(r12)\n  { \"_restgpr1_31\", 0xebecfff8 }, // ld r31,-8(r12)\n  { \"\",             0x4e800020 }, // blr\n};\n\nvoid PPC64SaveRestoreSection::copy_buf(Context<E> &ctx) {\n  ul32 *buf = (ul32 *)(ctx.buf + this->shdr.sh_offset);\n  for (auto [label, insn] : ppc64_save_restore_insns)\n    *buf++ = insn;\n}\n\ntemplate <>\nu64 get_eflags(Context<E> &ctx) {\n  return 2;\n}\n\n} // namespace mold\n\n#endif\n"
  },
  {
    "path": "src/arch-riscv.cc",
    "content": "// RISC-V is a clean RISC ISA. It supports PC-relative load/store for\n// position-independent code. Its 32-bit and 64-bit ISAs are almost\n// identical. That is, you can think RV32 as a RV64 without 64-bit\n// operations. In this file, we support both RV64 and RV32.\n//\n// RISC-V is essentially little-endian, but the big-endian version is\n// available as an extension. GCC supports `-mbig-endian` to generate\n// big-endian code. Even in big-endian mode, machine instructions are\n// defined to be encoded in little-endian, though. Only the behavior of\n// load/store instructions are different between LE RISC-V and BE RISC-V.\n//\n// From the linker's point of view, the RISC-V's psABI is unique because\n// sections in input object files can be shrunk while being copied to the\n// output file. That is contrary to other psABIs in which sections are an\n// atomic unit of copying. See file comments in shrink-sections.cc for\n// details.\n//\n// https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc\n\n#if MOLD_RV64LE || MOLD_RV64BE || MOLD_RV32LE || MOLD_RV32BE\n\n#include \"mold.h\"\n\n#include <regex>\n\nnamespace mold {\n\nusing E = MOLD_TARGET;\n\nstatic void write_itype(u8 *loc, u32 val) {\n  *(ul32 *)loc &= 0b000000'00000'11111'111'11111'1111111;\n  *(ul32 *)loc |= bits(val, 11, 0) << 20;\n}\n\nstatic void write_stype(u8 *loc, u32 val) {\n  *(ul32 *)loc &= 0b000000'11111'11111'111'00000'1111111;\n  *(ul32 *)loc |= bits(val, 11, 5) << 25 | bits(val, 4, 0) << 7;\n}\n\nstatic void write_btype(u8 *loc, u32 val) {\n  *(ul32 *)loc &= 0b000000'11111'11111'111'00000'1111111;\n  *(ul32 *)loc |= bit(val, 12) << 31   | bits(val, 10, 5) << 25 |\n                  bits(val, 4, 1) << 8 | bit(val, 11) << 7;\n}\n\nstatic void write_utype(u8 *loc, u32 val) {\n  *(ul32 *)loc &= 0b000000'00000'00000'000'11111'1111111;\n\n  // U-type instructions are used in combination with I-type\n  // instructions. U-type insn sets an immediate to the upper 20-bits\n  // of a register. I-type insn sign-extends a 12-bits immediate and\n  // adds it to a register value to construct a complete value. 0x800\n  // is added here to compensate for the sign-extension.\n  *(ul32 *)loc |= (val + 0x800) & 0xffff'f000;\n}\n\nstatic void write_jtype(u8 *loc, u32 val) {\n  *(ul32 *)loc &= 0b000000'00000'00000'000'11111'1111111;\n  *(ul32 *)loc |= bit(val, 20) << 31 | bits(val, 10, 1)  << 21 |\n                  bit(val, 11) << 20 | bits(val, 19, 12) << 12;\n}\n\nstatic void write_citype(u8 *loc, u32 val) {\n  *(ul16 *)loc &= 0b111'0'11111'00000'11;\n  *(ul16 *)loc |= bit(val, 5) << 12 | bits(val, 4, 0) << 2;\n}\n\nstatic void write_cbtype(u8 *loc, u32 val) {\n  *(ul16 *)loc &= 0b111'000'111'00000'11;\n  *(ul16 *)loc |= bit(val, 8) << 12 | bit(val, 4) << 11 | bit(val, 3) << 10 |\n                  bit(val, 7) << 6  | bit(val, 6) << 5  | bit(val, 2) << 4  |\n                  bit(val, 1) << 3  | bit(val, 5) << 2;\n}\n\nstatic void write_cjtype(u8 *loc, u32 val) {\n  *(ul16 *)loc &= 0b111'00000000000'11;\n  *(ul16 *)loc |= bit(val, 11) << 12 | bit(val, 4)  << 11 | bit(val, 9) << 10 |\n                  bit(val, 8)  << 9  | bit(val, 10) << 8  | bit(val, 6) << 7  |\n                  bit(val, 7)  << 6  | bit(val, 3)  << 5  | bit(val, 2) << 4  |\n                  bit(val, 1)  << 3  | bit(val, 5)  << 2;\n}\n\nstatic void set_rs1(u8 *loc, u32 rs1) {\n  assert(rs1 < 32);\n  *(ul32 *)loc &= 0b111111'11111'00000'111'11111'1111111;\n  *(ul32 *)loc |= rs1 << 15;\n}\n\nstatic u32 get_rd(u8 *loc) {\n  return bits(*(u32 *)loc, 11, 7);\n};\n\ntemplate <>\nvoid write_plt_header<E>(Context<E> &ctx, u8 *buf) {\n  constexpr ul32 insn_64[] = {\n    0x0000'0397, // auipc  t2, %pcrel_hi(.got.plt)\n    0x41c3'0333, // sub    t1, t1, t3               # .plt entry + hdr + 12\n    0x0003'be03, // ld     t3, %pcrel_lo(1b)(t2)    # _dl_runtime_resolve\n    0xfd43'0313, // addi   t1, t1, -44              # .plt entry\n    0x0003'8293, // addi   t0, t2, %pcrel_lo(1b)    # &.got.plt\n    0x0013'5313, // srli   t1, t1, 1                # .plt entry offset\n    0x0082'b283, // ld     t0, 8(t0)                # link map\n    0x000e'0067, // jr     t3\n  };\n\n  constexpr ul32 insn_32[] = {\n    0x0000'0397, // auipc  t2, %pcrel_hi(.got.plt)\n    0x41c3'0333, // sub    t1, t1, t3               # .plt entry + hdr + 12\n    0x0003'ae03, // lw     t3, %pcrel_lo(1b)(t2)    # _dl_runtime_resolve\n    0xfd43'0313, // addi   t1, t1, -44              # .plt entry\n    0x0003'8293, // addi   t0, t2, %pcrel_lo(1b)    # &.got.plt\n    0x0023'5313, // srli   t1, t1, 2                # .plt entry offset\n    0x0042'a283, // lw     t0, 4(t0)                # link map\n    0x000e'0067, // jr     t3\n  };\n\n  u64 gotplt = ctx.gotplt->shdr.sh_addr;\n  u64 plt = ctx.plt->shdr.sh_addr;\n\n  memcpy(buf, E::is_64 ? insn_64 : insn_32, E::plt_hdr_size);\n  write_utype(buf, gotplt - plt);\n  write_itype(buf + 8, gotplt - plt);\n  write_itype(buf + 16, gotplt - plt);\n}\n\nstatic constexpr ul32 plt_entry_64[] = {\n  0x0000'0e17, // auipc   t3, %pcrel_hi(function@.got.plt)\n  0x000e'3e03, // ld      t3, %pcrel_lo(1b)(t3)\n  0x000e'0367, // jalr    t1, t3\n  0x0010'0073, // ebreak\n};\n\nstatic constexpr ul32 plt_entry_32[] = {\n  0x0000'0e17, // auipc   t3, %pcrel_hi(function@.got.plt)\n  0x000e'2e03, // lw      t3, %pcrel_lo(1b)(t3)\n  0x000e'0367, // jalr    t1, t3\n  0x0010'0073, // ebreak\n};\n\ntemplate <>\nvoid write_plt_entry<E>(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  u64 gotplt = sym.get_gotplt_addr(ctx);\n  u64 plt = sym.get_plt_addr(ctx);\n\n  memcpy(buf, E::is_64 ? plt_entry_64 : plt_entry_32, E::plt_size);\n  write_utype(buf, gotplt - plt);\n  write_itype(buf + 4, gotplt - plt);\n}\n\ntemplate <>\nvoid write_pltgot_entry<E>(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  u64 got = sym.get_got_pltgot_addr(ctx);\n  u64 plt = sym.get_plt_addr(ctx);\n\n  memcpy(buf, E::is_64 ? plt_entry_64 : plt_entry_32, E::plt_size);\n  write_utype(buf, got - plt);\n  write_itype(buf + 4, got - plt);\n}\n\ntemplate <>\nvoid EhFrameSection<E>::apply_eh_reloc(Context<E> &ctx, const ElfRel<E> &rel,\n                                       u64 offset, u64 val) {\n  u8 *loc = ctx.buf + this->shdr.sh_offset + offset;\n\n  switch (rel.r_type) {\n  case R_NONE:\n    break;\n  case R_RISCV_ADD32:\n    *(U32<E> *)loc += val;\n    break;\n  case R_RISCV_SUB8:\n    *loc -= val;\n    break;\n  case R_RISCV_SUB16:\n    *(U16<E> *)loc -= val;\n    break;\n  case R_RISCV_SUB32:\n    *(U32<E> *)loc -= val;\n    break;\n  case R_RISCV_SUB6:\n    *loc = (*loc & 0b1100'0000) | ((*loc - val) & 0b0011'1111);\n    break;\n  case R_RISCV_SET6:\n    *loc = (*loc & 0b1100'0000) | (val & 0b0011'1111);\n    break;\n  case R_RISCV_SET8:\n    *loc = val;\n    break;\n  case R_RISCV_SET16:\n    *(U16<E> *)loc = val;\n    break;\n  case R_RISCV_SET32:\n    *(U32<E> *)loc = val;\n    break;\n  case R_RISCV_32_PCREL:\n    *(U32<E> *)loc = val - this->shdr.sh_addr - offset;\n    break;\n  default:\n    Fatal(ctx) << \"unsupported relocation in .eh_frame: \" << rel;\n  }\n}\n\n// RISC-V generally uses the AUIPC + ADDI/LW/SW/etc instruction pair\n// to access the AUIPC's address ± 2 GiB. AUIPC materializes the most\n// significant 52 bits in a PC-relative manner, and the following\n// instruction specifies the remaining least significant 12 bits.\n// There are several HI20 and LO12 relocation types for them.\n//\n// LO12 relocations need to materialize an address relative to AUIPC's\n// address, not relative to the instruction that the relocation\n// directly refers to.\n//\n// The problem here is that the instruction pair may not always be\n// adjacent. We need a mechanism to find a paired AUIPC for a given\n// LO12 relocation. For this purpose, the compiler creates a local\n// symbol for each location to which HI20 refers, and the LO12\n// relocation refers to that symbol.\n//\n// This function returns a paired HI20 relocation for a given LO12.\n// Since the instructions are typically adjacent, we do a linear\n// search.\nstatic const ElfRel<E> &\nfind_paired_reloc(Context<E> &ctx, InputSection<E> &isec,\n                  std::span<const ElfRel<E>> rels,\n                  Symbol<E> &sym, i64 i) {\n  auto is_hi20 = [](u32 ty) {\n    return ty == R_RISCV_GOT_HI20 || ty == R_RISCV_TLS_GOT_HI20 ||\n           ty == R_RISCV_TLS_GD_HI20 || ty == R_RISCV_PCREL_HI20 ||\n           ty == R_RISCV_TLSDESC_HI20;\n  };\n\n  u64 value = sym.esym().st_value;\n\n  if (value <= rels[i].r_offset) {\n    for (i64 j = i - 1; j >= 0; j--)\n      if (is_hi20(rels[j].r_type) && value == rels[j].r_offset)\n        return rels[j];\n  } else {\n    for (i64 j = i + 1; j < rels.size(); j++)\n      if (is_hi20(rels[j].r_type) && value == rels[j].r_offset)\n        return rels[j];\n  }\n  Fatal(ctx) << isec << \": paired relocation is missing: \" << i;\n}\n\n// Returns true if isec's i'th relocation refers to the following\n// GOT-load instructioon pair, which is an expeanded form of\n// `la t0, foo` pseudo assembly instruction.\n//\n// .L0\n//   auipc t0, 0      # R_RISCV_GOT_HI20(foo),     R_RISCV_RELAX\n//   ld    t0, 0(t0)  # R_RISCV_PCREL_LO12_I(.L0), R_RISCV_RELAX\nstatic bool is_got_load_pair(Context<E> &ctx, InputSection<E> &isec,\n                             std::span<const ElfRel<E>> rels, i64 i) {\n  u8 *buf = (u8 *)isec.contents.data();\n  return i + 3 < rels.size() &&\n         rels[i].r_type == R_RISCV_GOT_HI20 &&\n         rels[i + 1].r_type == R_RISCV_RELAX &&\n         rels[i + 2].r_type == R_RISCV_PCREL_LO12_I &&\n         rels[i + 3].r_type == R_RISCV_RELAX &&\n         rels[i].r_offset == rels[i + 2].r_offset - 4 &&\n         rels[i].r_offset == isec.file.symbols[rels[i + 2].r_sym]->value &&\n         get_rd(buf + rels[i].r_offset) == get_rd(buf + rels[i + 2].r_offset);\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n  std::span<RelocDelta> deltas = extra.r_deltas;\n  i64 k = 0;\n  u8 *buf = (u8 *)contents.data();\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || rel.r_type == R_RISCV_RELAX)\n      continue;\n\n    i64 removed_bytes = 0;\n    i64 r_delta = 0;\n\n    if (!deltas.empty()) {\n      while (k < deltas.size() && deltas[k].offset < rel.r_offset)\n        k++;\n      if (k < deltas.size() && deltas[k].offset == rel.r_offset)\n        removed_bytes = get_removed_bytes(deltas, k);\n      if (k > 0)\n        r_delta = deltas[k - 1].delta;\n    }\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    i64 r_offset = rel.r_offset - r_delta;\n    u8 *loc = base + r_offset;\n\n    u64 S = sym.get_addr(ctx);\n    u64 A = rel.r_addend;\n    u64 P = get_addr() + r_offset;\n    u64 G = sym.get_got_idx(ctx) * sizeof(Word<E>);\n    u64 GOT = ctx.got->shdr.sh_addr;\n\n    auto check = [&](i64 val, i64 lo, i64 hi) {\n      check_range(ctx, i, val, lo, hi);\n    };\n\n    auto utype = [&](i64 val) {\n      check(val, -(1LL << 31) - 0x800, (1LL << 31) - 0x800);\n      write_utype(loc, val);\n    };\n\n    switch (rel.r_type) {\n    case R_RISCV_32:\n      if (E::is_64)\n        *(U32<E> *)loc = S + A;\n      break;\n    case R_RISCV_64:\n      break;\n    case R_RISCV_BRANCH:\n      check(S + A - P, -(1 << 12), 1 << 12);\n      write_btype(loc, S + A - P);\n      break;\n    case R_RISCV_JAL:\n      check(S + A - P, -(1 << 20), 1 << 20);\n      write_jtype(loc, S + A - P);\n      break;\n    case R_RISCV_CALL:\n    case R_RISCV_CALL_PLT: {\n      i64 val = S + A - P;\n      i64 rd = get_rd(buf + rel.r_offset + 4);\n\n      if (removed_bytes == 4) {\n        // auipc + jalr -> jal\n        *(ul32 *)loc = (rd << 7) | 0b1101111;\n        write_jtype(loc, val);\n      } else if (removed_bytes == 6 && rd == 0) {\n        // auipc + jalr -> c.j\n        *(ul16 *)loc = 0b101'00000000000'01;\n        write_cjtype(loc, val);\n      } else if (removed_bytes == 6 && rd == 1) {\n        // auipc + jalr -> c.jal\n        assert(!E::is_64);\n        *(ul16 *)loc = 0b001'00000000000'01;\n        write_cjtype(loc, val);\n      } else {\n        assert(removed_bytes == 0);\n        utype(val);\n        write_itype(loc + 4, val);\n      }\n      break;\n    }\n    case R_RISCV_GOT_HI20: {\n      // This relocation usually refers to an AUIPC + LD instruction\n      // pair to load a symbol value from the GOT. If the symbol value\n      // is actually a link-time constant, we can materialize the value\n      // directly into a register to eliminate a memory load.\n      i64 rd = get_rd(buf + rel.r_offset);\n\n      if (removed_bytes == 6) {\n        // c.li <rd>, val\n        *(ul16 *)loc = 0b010'0'00000'00000'01 | (rd << 7);\n        write_citype(loc, sym.get_addr(ctx));\n        i += 3;\n      } else if (removed_bytes == 4) {\n        // addi <rd>, zero, val\n        *(ul32 *)loc = 0b0010011 | (rd << 7);\n        write_itype(loc, sym.get_addr(ctx));\n        i += 3;\n      } else {\n        assert(removed_bytes == 0);\n\n        i64 val = S + A - P;\n        if (ctx.arg.relax && sym.is_pcrel_linktime_const(ctx) &&\n            is_got_load_pair(ctx, *this, rels, i) && is_int(val, 32)) {\n          // auipc <rd>, %hi20(val)\n          utype(val);\n\n          // addi <rd>, <rd>, %lo12(val)\n          *(ul32 *)(loc + 4) = 0b0010011 | (rd << 15) | (rd << 7);\n          write_itype(loc + 4, val);\n          i += 3;\n        } else {\n          utype(G + GOT + A - P);\n        }\n      }\n      break;\n    }\n    case R_RISCV_TLS_GOT_HI20:\n      utype(sym.get_gottp_addr(ctx) + A - P);\n      break;\n    case R_RISCV_TLS_GD_HI20:\n      utype(sym.get_tlsgd_addr(ctx) + A - P);\n      break;\n    case R_RISCV_PCREL_HI20:\n      utype(S + A - P);\n      break;\n    case R_RISCV_PCREL_LO12_I:\n    case R_RISCV_PCREL_LO12_S: {\n      const ElfRel<E> &rel2 = find_paired_reloc(ctx, *this, rels, sym, i);\n      Symbol<E> &sym2 = *file.symbols[rel2.r_sym];\n\n      auto write =\n        (rel.r_type == R_RISCV_PCREL_LO12_I) ? write_itype : write_stype;\n\n      u64 S = sym2.get_addr(ctx);\n      u64 A = rel2.r_addend;\n      u64 P = get_addr() + rel2.r_offset - get_r_delta(*this, rel2.r_offset);\n      u64 G = sym2.get_got_idx(ctx) * sizeof(Word<E>);\n\n      switch (rel2.r_type) {\n      case R_RISCV_GOT_HI20:\n        write(loc, G + GOT + A - P);\n        break;\n      case R_RISCV_TLS_GOT_HI20:\n        write(loc, sym2.get_gottp_addr(ctx) + A - P);\n        break;\n      case R_RISCV_TLS_GD_HI20:\n        write(loc, sym2.get_tlsgd_addr(ctx) + A - P);\n        break;\n      case R_RISCV_PCREL_HI20:\n        write(loc, S + A - P);\n        break;\n      }\n      break;\n    }\n    case R_RISCV_HI20:\n      if (removed_bytes == 2) {\n        // Rewrite LUI with C.LUI\n        i64 rd = get_rd(buf + rel.r_offset);\n        *(ul16 *)loc = 0b011'0'00000'00000'01 | (rd << 7);\n        write_citype(loc, (S + A + 0x800) >> 12);\n      } else if (removed_bytes == 0) {\n        utype(S + A);\n      }\n      break;\n    case R_RISCV_LO12_I:\n    case R_RISCV_LO12_S:\n      if (rel.r_type == R_RISCV_LO12_I)\n        write_itype(loc, S + A);\n      else\n        write_stype(loc, S + A);\n\n      // Rewrite `lw t1, 0(t0)` with `lw t1, 0(x0)` if the address is\n      // accessible relative to the zero register because if that's the\n      // case, corresponding LUI might have been removed by relaxation.\n      if (is_int(S + A, 12))\n        set_rs1(loc, 0);\n      break;\n    case R_RISCV_TPREL_HI20:\n      assert(removed_bytes == 0 || removed_bytes == 4);\n      if (removed_bytes == 0)\n        utype(S + A - ctx.tp_addr);\n      break;\n    case R_RISCV_TPREL_ADD:\n      // This relocation just annotates an ADD instruction that can be\n      // removed when a TPREL is relaxed. No value is needed to be\n      // written.\n      assert(removed_bytes == 0 || removed_bytes == 4);\n      break;\n    case R_RISCV_TPREL_LO12_I:\n    case R_RISCV_TPREL_LO12_S: {\n      i64 val = S + A - ctx.tp_addr;\n      if (rel.r_type == R_RISCV_TPREL_LO12_I)\n        write_itype(loc, val);\n      else\n        write_stype(loc, val);\n\n      // Rewrite `lw t1, 0(t0)` with `lw t1, 0(tp)` if the address is\n      // directly accessible using tp. tp is x4.\n      if (is_int(val, 12))\n        set_rs1(loc, 4);\n      break;\n    }\n    case R_RISCV_TLSDESC_HI20:\n      // RISC-V TLSDESC uses the following code sequence to materialize\n      // a TP-relative address in a0.\n      //\n      //   .L0:\n      //   auipc  tX, 0\n      //       R_RISCV_TLSDESC_HI20         foo\n      //   l[d|w] tY, tX, 0\n      //       R_RISCV_TLSDESC_LOAD_LO12_I  .L0\n      //   addi   a0, tX, 0\n      //       R_RISCV_TLSDESC_ADD_LO12_I   .L0\n      //   jalr   t0, tY\n      //       R_RISCV_TLSDESC_CALL         .L0\n      //\n      // For non-dlopen'd DSO, we may relax the instructions to the following:\n      //\n      //   <deleted>\n      //   <deleted>\n      //   auipc  a0, %gottp_hi(a0)\n      //   l[d|w] a0, %gottp_lo(a0)\n      //\n      // For executable, if the TP offset is small enough, we'll relax\n      // it to the following:\n      //\n      //   <deleted>\n      //   <deleted>\n      //   <deleted>\n      //   addi   a0, zero, %tpoff_lo(a0)\n      //\n      // Otherwise, the following sequence is used:\n      //\n      //   <deleted>\n      //   <deleted>\n      //   lui    a0, %tpoff_hi(a0)\n      //   addi   a0, a0, %tpoff_lo(a0)\n      //\n      // If the code-shrinking relaxation is disabled, we may leave\n      // original useless instructions instead of deleting them, but we\n      // accept that because relaxations are enabled by default.\n      if (sym.has_tlsdesc(ctx) && removed_bytes == 0)\n        utype(sym.get_tlsdesc_addr(ctx) + A - P);\n      break;\n    case R_RISCV_TLSDESC_LOAD_LO12:\n    case R_RISCV_TLSDESC_ADD_LO12:\n    case R_RISCV_TLSDESC_CALL: {\n      if (removed_bytes == 4)\n        break;\n\n      const ElfRel<E> &rel2 = find_paired_reloc(ctx, *this, rels, sym, i);\n      Symbol<E> &sym2 = *file.symbols[rel2.r_sym];\n\n      u64 S = sym2.get_addr(ctx);\n      u64 A = rel2.r_addend;\n      u64 P = get_addr() + rel2.r_offset - get_r_delta(*this, rel2.r_offset);\n\n      switch (rel.r_type) {\n      case R_RISCV_TLSDESC_LOAD_LO12:\n        if (sym2.has_tlsdesc(ctx))\n          write_itype(loc, sym2.get_tlsdesc_addr(ctx) + A - P);\n        else\n          *(ul32 *)loc = 0x13; // nop\n        break;\n      case R_RISCV_TLSDESC_ADD_LO12:\n        if (sym2.has_tlsdesc(ctx)) {\n          write_itype(loc, sym2.get_tlsdesc_addr(ctx) + A - P);\n        } else if (sym2.has_gottp(ctx)) {\n          *(ul32 *)loc = 0x517; // auipc a0,<hi20>\n          utype(sym2.get_gottp_addr(ctx) + A - P);\n        } else {\n          *(ul32 *)loc = 0x537; // lui a0,<hi20>\n          utype(S + A - ctx.tp_addr);\n        }\n        break;\n      case R_RISCV_TLSDESC_CALL:\n        if (sym2.has_tlsdesc(ctx)) {\n          // Do nothing\n        } else if (sym2.has_gottp(ctx)) {\n          // l[d|w] a0,<lo12>\n          *(ul32 *)loc = E::is_64 ? 0x53503 : 0x52503;\n          write_itype(loc, sym2.get_gottp_addr(ctx) + A - P);\n        } else {\n          i64 val = S + A - ctx.tp_addr;\n          if (is_int(val, 12))\n            *(ul32 *)loc = 0x513;   // addi a0,zero,<lo12>\n          else\n            *(ul32 *)loc = 0x50513; // addi a0,a0,<lo12>\n          write_itype(loc, val);\n        }\n        break;\n      }\n      break;\n    }\n    case R_RISCV_ADD8:\n      loc += S + A;\n      break;\n    case R_RISCV_ADD16:\n      *(U16<E> *)loc += S + A;\n      break;\n    case R_RISCV_ADD32:\n      *(U32<E> *)loc += S + A;\n      break;\n    case R_RISCV_ADD64:\n      *(U64<E> *)loc += S + A;\n      break;\n    case R_RISCV_SUB8:\n      loc -= S + A;\n      break;\n    case R_RISCV_SUB16:\n      *(U16<E> *)loc -= S + A;\n      break;\n    case R_RISCV_SUB32:\n      *(U32<E> *)loc -= S + A;\n      break;\n    case R_RISCV_SUB64:\n      *(U64<E> *)loc -= S + A;\n      break;\n    case R_RISCV_ALIGN: {\n      // A R_RISCV_ALIGN is followed by a NOP sequence. We need to remove\n      // zero or more bytes so that the instruction after R_RISCV_ALIGN is\n      // aligned to a given alignment boundary.\n      //\n      // We need to guarantee that the NOP sequence is valid after byte\n      // removal (e.g. we can't remove the first 2 bytes of a 4-byte NOP).\n      // For the sake of simplicity, we always rewrite the entire NOP sequence.\n      i64 padding_bytes = rel.r_addend - removed_bytes;\n      assert((padding_bytes & 1) == 0);\n\n      i64 i = 0;\n      for (; i <= padding_bytes - 4; i += 4)\n        *(ul32 *)(loc + i) = 0x0000'0013; // nop\n      if (i < padding_bytes)\n        *(ul16 *)(loc + i) = 0x0001;      // c.nop\n      break;\n    }\n    case R_RISCV_RVC_BRANCH:\n      check(S + A - P, -(1 << 8), 1 << 8);\n      write_cbtype(loc, S + A - P);\n      break;\n    case R_RISCV_RVC_JUMP:\n      check(S + A - P, -(1 << 11), 1 << 11);\n      write_cjtype(loc, S + A - P);\n      break;\n    case R_RISCV_SUB6:\n      *loc = (*loc & 0b1100'0000) | ((*loc - S - A) & 0b0011'1111);\n      break;\n    case R_RISCV_SET6:\n      *loc = (*loc & 0b1100'0000) | ((S + A) & 0b0011'1111);\n      break;\n    case R_RISCV_SET8:\n      *loc = S + A;\n      break;\n    case R_RISCV_SET16:\n      *(U16<E> *)loc = S + A;\n      break;\n    case R_RISCV_SET32:\n      *(U32<E> *)loc = S + A;\n      break;\n    case R_RISCV_PLT32:\n    case R_RISCV_32_PCREL:\n      *(U32<E> *)loc = S + A - P;\n      break;\n    case R_RISCV_SET_ULEB128:\n      overwrite_uleb(loc, S + A);\n      break;\n    case R_RISCV_SUB_ULEB128:\n      overwrite_uleb(loc, read_uleb(loc) - S - A);\n      break;\n    default:\n      unreachable();\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_nonalloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    SectionFragment<E> *frag;\n    i64 frag_addend;\n    std::tie(frag, frag_addend) = get_fragment(ctx, rel);\n\n    u64 S = frag ? frag->get_addr(ctx) : sym.get_addr(ctx);\n    u64 A = frag ? frag_addend : (i64)rel.r_addend;\n\n    switch (rel.r_type) {\n    case R_RISCV_32:\n      *(U32<E> *)loc = S + A;\n      break;\n    case R_RISCV_64:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(U64<E> *)loc = *val;\n      else\n        *(U64<E> *)loc = S + A;\n      break;\n    case R_RISCV_ADD8:\n      *loc += S + A;\n      break;\n    case R_RISCV_ADD16:\n      *(U16<E> *)loc += S + A;\n      break;\n    case R_RISCV_ADD32:\n      *(U32<E> *)loc += S + A;\n      break;\n    case R_RISCV_ADD64:\n      *(U64<E> *)loc += S + A;\n      break;\n    case R_RISCV_SUB8:\n      *loc -= S + A;\n      break;\n    case R_RISCV_SUB16:\n      *(U16<E> *)loc -= S + A;\n      break;\n    case R_RISCV_SUB32:\n      *(U32<E> *)loc -= S + A;\n      break;\n    case R_RISCV_SUB64:\n      *(U64<E> *)loc -= S + A;\n      break;\n    case R_RISCV_SUB6:\n      *loc = (*loc & 0b1100'0000) | ((*loc - S - A) & 0b0011'1111);\n      break;\n    case R_RISCV_SET6:\n      *loc = (*loc & 0b1100'0000) | ((S + A) & 0b0011'1111);\n      break;\n    case R_RISCV_SET8:\n      *loc = S + A;\n      break;\n    case R_RISCV_SET16:\n      *(U16<E> *)loc = S + A;\n      break;\n    case R_RISCV_SET32:\n      *(U32<E> *)loc = S + A;\n      break;\n    case R_RISCV_SET_ULEB128:\n      overwrite_uleb(loc, S + A);\n      break;\n    case R_RISCV_SUB_ULEB128:\n      overwrite_uleb(loc, read_uleb(loc) - S - A);\n      break;\n    default:\n      Fatal(ctx) << *this << \": invalid relocation for non-allocated sections: \"\n                 << rel;\n      break;\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::scan_relocations(Context<E> &ctx) {\n  assert(shdr().sh_flags & SHF_ALLOC);\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  // Scan relocations\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n\n    if (sym.is_ifunc())\n      sym.flags |= NEEDS_GOT | NEEDS_PLT;\n\n    switch (rel.r_type) {\n    case R_RISCV_32:\n      if constexpr (E::is_64)\n        scan_absrel(ctx, sym, rel);\n      break;\n    case R_RISCV_HI20:\n      scan_absrel(ctx, sym, rel);\n      break;\n    case R_RISCV_CALL:\n    case R_RISCV_CALL_PLT:\n    case R_RISCV_PLT32:\n      if (sym.is_imported)\n        sym.flags |= NEEDS_PLT;\n      break;\n    case R_RISCV_GOT_HI20:\n      sym.flags |= NEEDS_GOT;\n      break;\n    case R_RISCV_TLS_GOT_HI20:\n      sym.flags |= NEEDS_GOTTP;\n      break;\n    case R_RISCV_TLS_GD_HI20:\n      sym.flags |= NEEDS_TLSGD;\n      break;\n    case R_RISCV_TLSDESC_HI20:\n      scan_tlsdesc(ctx, sym);\n      break;\n    case R_RISCV_32_PCREL:\n    case R_RISCV_PCREL_HI20:\n      scan_pcrel(ctx, sym, rel);\n      break;\n    case R_RISCV_TPREL_HI20:\n      check_tlsle(ctx, sym, rel);\n      break;\n    case R_RISCV_64:\n    case R_RISCV_BRANCH:\n    case R_RISCV_JAL:\n    case R_RISCV_PCREL_LO12_I:\n    case R_RISCV_PCREL_LO12_S:\n    case R_RISCV_LO12_I:\n    case R_RISCV_LO12_S:\n    case R_RISCV_TPREL_LO12_I:\n    case R_RISCV_TPREL_LO12_S:\n    case R_RISCV_TPREL_ADD:\n    case R_RISCV_TLSDESC_LOAD_LO12:\n    case R_RISCV_TLSDESC_ADD_LO12:\n    case R_RISCV_TLSDESC_CALL:\n    case R_RISCV_ADD8:\n    case R_RISCV_ADD16:\n    case R_RISCV_ADD32:\n    case R_RISCV_ADD64:\n    case R_RISCV_SUB8:\n    case R_RISCV_SUB16:\n    case R_RISCV_SUB32:\n    case R_RISCV_SUB64:\n    case R_RISCV_ALIGN:\n    case R_RISCV_RVC_BRANCH:\n    case R_RISCV_RVC_JUMP:\n    case R_RISCV_RELAX:\n    case R_RISCV_SUB6:\n    case R_RISCV_SET6:\n    case R_RISCV_SET8:\n    case R_RISCV_SET16:\n    case R_RISCV_SET32:\n    case R_RISCV_SET_ULEB128:\n    case R_RISCV_SUB_ULEB128:\n      break;\n    default:\n      Error(ctx) << *this << \": unknown relocation: \" << rel;\n    }\n  }\n}\n\ntemplate <>\nu64 get_eflags(Context<E> &ctx) {\n  std::vector<ObjectFile<E> *> objs = ctx.objs;\n  std::erase(objs, ctx.internal_obj);\n\n  if (objs.empty())\n    return 0;\n\n  u32 ret = objs[0]->get_eflags();\n  for (i64 i = 1; i < objs.size(); i++) {\n    u32 flags = objs[i]->get_eflags();\n    if (flags & EF_RISCV_RVC)\n      ret |= EF_RISCV_RVC;\n\n    if ((flags & EF_RISCV_FLOAT_ABI) != (ret & EF_RISCV_FLOAT_ABI))\n      Error(ctx) << *objs[i] << \": cannot link object files with different\"\n                 << \" floating-point ABI from \" << *objs[0];\n\n    if ((flags & EF_RISCV_RVE) != (ret & EF_RISCV_RVE))\n      Error(ctx) << *objs[i] << \": cannot link object files with different\"\n                 << \" EF_RISCV_RVE from \" << *objs[0];\n  }\n  return ret;\n}\n\n// Scan relocations to shrink a given section.\ntemplate <>\nvoid shrink_section(Context<E> &ctx, InputSection<E> &isec) {\n  std::span<const ElfRel<E>> rels = isec.get_rels(ctx);\n  std::vector<RelocDelta> &deltas = isec.extra.r_deltas;\n  i64 r_delta = 0;\n  u8 *buf = (u8 *)isec.contents.data();\n\n  // True if we can use 2-byte instructions. This is usually true on\n  // Unix because RV64GC is generally considered the baseline hardware.\n  bool use_rvc = isec.file.get_eflags() & EF_RISCV_RVC;\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &r = rels[i];\n    Symbol<E> &sym = *isec.file.symbols[r.r_sym];\n\n    auto remove = [&](i64 d) {\n      r_delta += d;\n      deltas.push_back(RelocDelta{r.r_offset, r_delta});\n    };\n\n    // Handling R_RISCV_ALIGN is mandatory.\n    //\n    // R_RISCV_ALIGN refers to NOP instructions. We need to eliminate some\n    // or all of the instructions so that the instruction that immediately\n    // follows the NOPs is aligned to a specified alignment boundary.\n    if (r.r_type == R_RISCV_ALIGN) {\n      // The total bytes of NOPs is stored to r_addend, so the next\n      // instruction is r_addend away.\n      u64 P = isec.get_addr() + r.r_offset - r_delta;\n      u64 desired = align_to(P, bit_ceil(r.r_addend));\n      u64 actual = P + r.r_addend;\n      if (desired != actual)\n        remove(actual - desired);\n      continue;\n    }\n\n    // Handling other relocations is optional.\n    if (!ctx.arg.relax || i == rels.size() - 1 ||\n        rels[i + 1].r_type != R_RISCV_RELAX)\n      continue;\n\n    // Linker-synthesized symbols haven't been assigned their final\n    // values when we are shrinking sections because actual values can\n    // be computed only after we fix the file layout. Therefore, we\n    // assume that relocations against such symbols are always\n    // non-relaxable.\n    if (sym.file == ctx.internal_obj)\n      continue;\n\n    switch (r.r_type) {\n    case R_RISCV_CALL:\n    case R_RISCV_CALL_PLT: {\n      // These relocations refer to an AUIPC + JALR instruction pair to\n      // allow to jump to anywhere in PC ± 2 GiB. If the jump target is\n      // close enough to PC, we can use C.J, C.JAL or JAL instead.\n      i64 dist = compute_distance(ctx, sym, isec, r);\n      if (dist & 1)\n        break;\n\n      i64 rd = get_rd(buf + r.r_offset + 4);\n\n      if (use_rvc && rd == 0 && is_int(dist, 12)) {\n        // If rd is x0 and the jump target is within ±2 KiB, we can use\n        // C.J, saving 6 bytes.\n        remove(6);\n      } else if (use_rvc && !E::is_64 && rd == 1 && is_int(dist, 12)) {\n        // If rd is x1 and the jump target is within ±2 KiB, we can use\n        // C.JAL. This is RV32 only because C.JAL is RV32-only instruction.\n        remove(6);\n      } else if (is_int(dist, 21)) {\n        // If the jump target is within ±1 MiB, we can use JAL.\n        remove(4);\n      }\n      break;\n    }\n    case R_RISCV_GOT_HI20:\n      // A GOT_HI20 followed by a PCREL_LO12_I is used to load a value from\n      // GOT. If the loaded value is a link-time constant, we can rewrite\n      // the instructions to directly materialize the value, eliminating a\n      // memory load.\n      if (sym.is_absolute() && is_got_load_pair(ctx, isec, rels, i)) {\n        u64 val = sym.get_addr(ctx) + r.r_addend;\n        if (use_rvc && is_int(val, 6) && get_rd(buf + r.r_offset) != 0) {\n          // Replace AUIPC + LD with C.LI.\n          remove(6);\n        } else if (is_int(val, 12)) {\n          // Replace AUIPC + LD with ADDI.\n          remove(4);\n        }\n      }\n      break;\n    case R_RISCV_HI20: {\n      u64 val = sym.get_addr(ctx) + r.r_addend;\n      i64 rd = get_rd(buf + r.r_offset);\n\n      if (is_int(val, 12)) {\n        // We can replace `lui t0, %hi(foo)` and `add t0, t0, %lo(foo)`\n        // instruction pair with `add t0, x0, %lo(foo)` if foo's bits\n        // [32:11] are all one or all zero.\n        remove(4);\n      } else if (use_rvc && rd != 0 && rd != 2 && is_int(val + 0x800, 18)) {\n        // If the upper 20 bits can actually be represented in 6 bits,\n        // we can use C.LUI instead of LUI.\n        remove(2);\n      }\n      break;\n    }\n    case R_RISCV_TPREL_HI20:\n    case R_RISCV_TPREL_ADD:\n      // These relocations are used to add a high 20-bit value to the\n      // thread pointer. The following two instructions materializes\n      // TP + %tprel_hi20(foo) in %t0, for example.\n      //\n      //  lui  t0, %tprel_hi(foo)         # R_RISCV_TPREL_HI20\n      //  add  t0, t0, tp                 # R_RISCV_TPREL_ADD\n      //\n      // Then thread-local variable `foo` is accessed with the low\n      // 12-bit offset like this:\n      //\n      //  sw   t0, %tprel_lo(foo)(t0)     # R_RISCV_TPREL_LO12_S\n      //\n      // However, if the variable is at TP ± 2 KiB, TP + %tprel_hi20(foo)\n      // is the same as TP, so we can instead access the thread-local\n      // variable directly using TP like this:\n      //\n      //  sw   t0, %tprel_lo(foo)(tp)\n      //\n      // Here, we remove `lui` and `add` if the offset is within ±2 KiB.\n      if (i64 val = sym.get_addr(ctx) + r.r_addend - ctx.tp_addr;\n          is_int(val, 12))\n        remove(4);\n      break;\n    case R_RISCV_TLSDESC_HI20:\n      if (!sym.has_tlsdesc(ctx))\n        remove(4);\n      break;\n    case R_RISCV_TLSDESC_LOAD_LO12:\n    case R_RISCV_TLSDESC_ADD_LO12: {\n      const ElfRel<E> &rel2 = find_paired_reloc(ctx, isec, rels, sym, i);\n      Symbol<E> &sym2 = *isec.file.symbols[rel2.r_sym];\n\n      if (r.r_type == R_RISCV_TLSDESC_LOAD_LO12) {\n        if (!sym2.has_tlsdesc(ctx))\n          remove(4);\n      } else {\n        assert(r.r_type == R_RISCV_TLSDESC_ADD_LO12);\n        if (!sym2.has_tlsdesc(ctx) && !sym2.has_gottp(ctx))\n          if (i64 val = sym2.get_addr(ctx) + rel2.r_addend - ctx.tp_addr;\n              is_int(val, 12))\n            remove(4);\n      }\n      break;\n    }\n    }\n  }\n\n  isec.sh_size -= r_delta;\n}\n\n// ISA name handlers\n//\n// An example of ISA name is \"rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0\".\n// An ISA name starts with the base name (e.g. \"rv64i2p1\") followed by\n// ISA extensions separated by underscores.\n//\n// There are lots of ISA extensions defined for RISC-V, and they are\n// identified by name. Some extensions are of single-letter alphabet such\n// as \"m\" or \"q\". Newer extension names start with \"z\" followed by one or\n// more alphabets (i.e. \"zicsr\"). \"s\" and \"x\" prefixes are reserved\n// for supervisor-level extensions and private extensions, respectively.\n//\n// Each extension consists of a name, a major version and a minor version.\n// For example, \"m2p0\" indicates the \"m\" extension of version 2.0. \"p\" is\n// just a separator. Versions are often omitted in documents, but they are\n// mandatory in .riscv.attributes. Likewise, abbreviations such as \"G\"\n// (which is short for \"IMAFD\") are not allowed in .riscv.attributes.\n//\n// Each RISC-V object file contains an ISA string enumerating extensions\n// used by the object file. We need to merge input objects' ISA strings\n// into a single ISA string.\n//\n// In order to guarantee string uniqueness, extensions have to be ordered\n// in a specific manner. The exact rule is unfortunately a bit complicated.\n//\n// The following functions takes care of ISA strings.\n\nnamespace {\nstruct Extn {\n  std::string name;\n  i64 major;\n  i64 minor;\n};\n}\n\n// As per the RISC-V spec, the extension names must be sorted in a very\n// specific way, and unfortunately that's not just an alphabetical order.\n// For example, rv64imafd is a legal ISA string, whereas rv64iafdm is not.\n// The exact rule is somewhat arbitrary.\n//\n// This function returns true if the first extension name should precede\n// the second one as per the rule.\nstatic bool extn_name_less(std::string_view x, std::string_view y) {\n  auto get_single_letter_rank = [](char c) -> i64 {\n    std::string_view exts = \"iemafdqlcbkjtpvnh\";\n    size_t pos = exts.find_first_of(c);\n    if (pos != exts.npos)\n      return pos;\n    return c - 'a' + exts.size();\n  };\n\n  auto get_rank = [&](std::string_view str) -> i64 {\n    switch (str[0]) {\n    case 'x':\n      return 1 << 20;\n    case 's':\n      return 1 << 19;\n    case 'z':\n      return (1 << 18) + get_single_letter_rank(str[1]);\n    default:\n      return get_single_letter_rank(str[0]);\n    }\n  };\n\n  return std::tuple{get_rank(x), x} < std::tuple{get_rank(y), y};\n}\n\nstatic std::vector<Extn> parse_arch_string(std::string_view str) {\n  auto flags = std::regex_constants::optimize | std::regex_constants::ECMAScript;\n  static std::regex re(R\"(^([a-z]|[a-z][a-z0-9]*[a-z])(\\d+)p(\\d+)(_|$))\", flags);\n\n  std::vector<Extn> vec;\n\n  for (;;) {\n    std::cmatch m;\n    if (!std::regex_search(str.data(), str.data() + str.size(), m, re))\n      return {};\n\n    vec.push_back(Extn{m[1], (i64)std::stoul(m[2]), (i64)std::stoul(m[3])});\n    if (m[4].length() == 0)\n      return vec;\n\n    str = str.substr(m.length());\n  }\n}\n\nstatic std::vector<Extn> merge_extensions(std::span<Extn> x, std::span<Extn> y) {\n  std::vector<Extn> vec;\n\n  // The base part (i.e. \"rv64i\" or \"rv32i\") must match.\n  if (x[0].name != y[0].name)\n    return {};\n\n  // Merge ISA extension strings\n  while (!x.empty() && !y.empty()) {\n    if (x[0].name == y[0].name) {\n      if (std::tuple{x[0].major, x[0].minor} < std::tuple{y[0].major, y[0].minor})\n        vec.push_back(y[0]);\n      else\n        vec.push_back(x[0]);\n      x = x.subspan(1);\n      y = y.subspan(1);\n    } else if (extn_name_less(x[0].name, y[0].name)) {\n      vec.push_back(x[0]);\n      x = x.subspan(1);\n    } else {\n      vec.push_back(y[0]);\n      y = y.subspan(1);\n    }\n  }\n\n  append(vec, x);\n  append(vec, y);\n  return vec;\n}\n\nstatic std::string to_string(std::span<Extn> v) {\n  std::ostringstream os;\n  os << v[0].name << v[0].major << 'p' << v[0].minor;\n  for (Extn &e : v.subspan(1))\n    os << '_' << e.name << e.major << 'p' << e.minor;\n  return os.str();\n}\n\n//\n// Output .riscv.attributes class\n//\n\ntemplate <>\nvoid RiscvAttributesSection<E>::update_shdr(Context<E> &ctx) {\n  if (!contents.empty())\n    return;\n\n  i64 stack = -1;\n  std::vector<Extn> arch;\n  bool unaligned = false;\n\n  for (ObjectFile<E> *file : ctx.objs) {\n    if (file->extra.stack_align) {\n      i64 val = *file->extra.stack_align;\n      if (stack != -1 && stack != val)\n        Error(ctx) << *file << \": stack alignment requirement mistmatch\";\n      stack = val;\n    }\n\n    if (file->extra.arch) {\n      std::vector<Extn> arch2 = parse_arch_string(*file->extra.arch);\n      if (arch2.empty())\n        Error(ctx) << *file << \": corrupted .riscv.attributes ISA string: \"\n                   << *file->extra.arch;\n\n      if (arch.empty()) {\n        arch = arch2;\n      } else {\n        arch = merge_extensions(arch, arch2);\n        if (arch.empty())\n          Error(ctx) << *file << \": incompatible .riscv.attributes ISA string: \"\n                     << *file->extra.arch;\n      }\n    }\n\n    if (file->extra.unaligned_access)\n      unaligned = true;\n  }\n\n  if (arch.empty())\n    return;\n\n  std::string arch_str = to_string(arch);\n  contents.resize(arch_str.size() + 100);\n\n  u8 *p = (u8 *)contents.data();\n  *p++ = 'A';                             // Format version\n  U32<E> *sub_sz = (U32<E> *)p;           // Sub-section length\n  p += 4;\n  p += write_string(p, \"riscv\");          // Vendor name\n  u8 *sub_sub_start = p;\n  *p++ = ELF_TAG_FILE;                    // Sub-section tag\n  U32<E> *sub_sub_sz = (U32<E> *)p;       // Sub-sub-section length\n  p += 4;\n\n  if (stack != -1) {\n    p += write_uleb(p, ELF_TAG_RISCV_STACK_ALIGN);\n    p += write_uleb(p, stack);\n  }\n\n  p += write_uleb(p, ELF_TAG_RISCV_ARCH);\n  p += write_string(p, arch_str);\n\n  if (unaligned) {\n    p += write_uleb(p, ELF_TAG_RISCV_UNALIGNED_ACCESS);\n    p += write_uleb(p, 1);\n  }\n\n  i64 sz = p - (u8 *)contents.data();\n  *sub_sz = sz - 1;\n  *sub_sub_sz = p - sub_sub_start;\n  contents.resize(sz);\n  this->shdr.sh_size = sz;\n}\n\ntemplate <>\nvoid RiscvAttributesSection<E>::copy_buf(Context<E> &ctx) {\n  write_vector(ctx.buf + this->shdr.sh_offset, contents);\n}\n\n} // namespace mold\n\n#endif\n"
  },
  {
    "path": "src/arch-s390x.cc",
    "content": "// This file contains code for the IBM z/Architecture 64-bit ISA, which is\n// commonly referred to as \"s390x\" on Linux.\n//\n// z/Architecture is a 64-bit CISC ISA developed by IBM around 2000 for\n// IBM's \"big iron\" mainframe computers. The computers are direct\n// descendents of IBM System/360 all the way back in 1966. I've never\n// actually seen a mainframe, and you probaly haven't either, but it looks\n// like the mainframe market is still large enough to sustain its ecosystem.\n// Ubuntu for example provides the official support for s390x as of 2022.\n// Since they are being actively maintained, we need to support them.\n//\n// As an instruction set, s390x isn't particularly odd. It has 16 general-\n// purpose registers. Instructions are 2, 4 or 6 bytes long and always\n// aligned to 2 bytes boundaries. Despite unfamiliarty, I found that it\n// just feels like an x86-64 in a parallel universe.\n//\n// Here is the register usage in this ABI:\n//\n//   r0-r1: reserved as scratch registers so we can use them in our PLT\n//   r2:    parameter passing and return values\n//   r3-r6: parameter passing\n//   r12:   address of GOT if position-independent code\n//   r14:   return address\n//   r15:   stack pointer\n//   a1:    upper 32 bits of TP (thread pointer)\n//   a2:    lower 32 bits of TP (thread pointer)\n//\n// Thread-local storage (TLS) is supported on s390x in the same way as it\n// is on other targets with one exeption. On other targets, __tls_get_addr\n// is used to get an address of a thread-local variable. On s390x,\n// __tls_get_offset is used instead. The difference is __tls_get_offset\n// returns an address of a thread-local variable as an offset from TP. So\n// we need to add TP to a return value before use. I don't know why it is\n// different, but that is the way it is.\n//\n// https://github.com/IBM/s390x-abi/releases/download/v1.6.1/lzsabi_s390x.pdf\n\n#if MOLD_S390X\n\n#include \"mold.h\"\n\nnamespace mold {\n\nusing E = S390X;\n\nstatic void write_mid20(u8 *loc, u64 val) {\n  *(ub32 *)loc |= (bits(val, 11, 0) << 16) | (bits(val, 19, 12) << 8);\n}\n\ntemplate <>\nvoid write_plt_header(Context<E> &ctx, u8 *buf) {\n  static u8 insn[] = {\n    // Compute the offset into .rela.plt. This is equivalent to\n    // (%r0 - %r1 - 48 - 14) * 3/2 where %r0 is the PLT entry address\n    // plus 14, %r1 is the start address of .plt, and 48 is the size\n    // of this PLT header. We multiply by 3/2 because each PLT entry\n    // is 16 bytes, whereas each .rela.plt entry is 24 bytes.\n    0xb9, 0x09, 0x00, 0x01,             // sgr   %r0, %r1\n    0xa7, 0x0b, 0xff, 0xc2,             // aghi  %r0, -62\n    0xeb, 0x10, 0x00, 0x01, 0x00, 0x0c, // srlg  %r1, %r0, 1\n    0xb9, 0x08, 0x00, 0x01,             // agr   %r0, %r1\n    // Store the computed value to 56(%r15) and .got.plt[1] to 48(%15)\n    // where %r15 is the stack pointer.\n    0xe3, 0x00, 0xf0, 0x38, 0x00, 0x24, // stg   %r0, 56(%r15)\n    0xc0, 0x10, 0, 0, 0, 0,             // larl  %r1, GOTPLT_OFFSET\n    0xd2, 0x07, 0xf0, 0x30, 0x10, 0x08, // mvc   48(8, %r15), 8(%r1)\n    // Branch to _dl_runtime_resolve\n    0xe3, 0x10, 0x10, 0x10, 0x00, 0x04, // lg    %r1, 16(%r1)\n    0x07, 0xf1,                         // br    %r1\n    0x00, 0x00, 0x00, 0x00,             // (filler)\n  };\n\n  memcpy(buf, insn, sizeof(insn));\n  *(ub32 *)(buf + 26) =\n    (ctx.gotplt->shdr.sh_addr - ctx.plt->shdr.sh_addr - 24) >> 1;\n}\n\ntemplate <>\nvoid write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  static u8 insn[] = {\n    0xc0, 0x10, 0, 0, 0, 0,             // larl  %r1, GOTPLT_ENTRY_OFFSET\n    0xe3, 0x10, 0x10, 0x00, 0x00, 0x04, // lg    %r1, (%r1)\n    0x0d, 0x01,                         // basr  %r0, %r1\n    0x00, 0x00,                         // (filler)\n  };\n\n  memcpy(buf, insn, sizeof(insn));\n  *(ub32 *)(buf + 2) = (sym.get_gotplt_addr(ctx) - sym.get_plt_addr(ctx)) >> 1;\n}\n\ntemplate <>\nvoid write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  static u8 insn[] = {\n    0xc0, 0x10, 0, 0, 0, 0,             // larl  %r1, GOT_ENTRY_OFFSET\n    0xe3, 0x10, 0x10, 0x00, 0x00, 0x04, // lg    %r1, (%r1)\n    0x07, 0xf1,                         // br    %r1\n    0x00, 0x00,                         // (filler)\n  };\n\n  memcpy(buf, insn, sizeof(insn));\n  *(ub32 *)(buf + 2) = (sym.get_got_pltgot_addr(ctx) - sym.get_plt_addr(ctx)) >> 1;\n}\n\ntemplate <>\nvoid EhFrameSection<E>::apply_eh_reloc(Context<E> &ctx, const ElfRel<E> &rel,\n                                       u64 offset, u64 val) {\n  u8 *loc = ctx.buf + this->shdr.sh_offset + offset;\n\n  switch (rel.r_type) {\n  case R_NONE:\n    break;\n  case R_390_PC32:\n    *(ub32 *)loc = val - this->shdr.sh_addr - offset;\n    break;\n  case R_390_64:\n    *(ub64 *)loc = val;\n    break;\n  default:\n    Fatal(ctx) << \"unsupported relocation in .eh_frame: \" << rel;\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE)\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    u64 S = sym.get_addr(ctx);\n    u64 A = rel.r_addend;\n    u64 P = get_addr() + rel.r_offset;\n    u64 G = sym.get_got_idx(ctx) * sizeof(Word<E>);\n    u64 GOT = ctx.got->shdr.sh_addr;\n\n    auto check = [&](i64 val, i64 lo, i64 hi) {\n      check_range(ctx, i, val, lo, hi);\n    };\n\n    auto check_dbl = [&](i64 val, i64 lo, i64 hi) {\n      // R_390_*DBL relocs should never refer to a symbol at an odd address\n      check(val, lo, hi);\n      if (val & 1)\n        Error(ctx) << *this << \": misaligned symbol \" << sym\n                   << \" for relocation \" << rel;\n    };\n\n    switch (rel.r_type) {\n    case R_390_64:\n      break;\n    case R_390_8:\n      check(S + A, 0, 1 << 8);\n      *loc = S + A;\n      break;\n    case R_390_12:\n      check(S + A, 0, 1 << 12);\n      *(ul16 *)loc |= bits(S + A, 11, 0);\n      break;\n    case R_390_16:\n      check(S + A, 0, 1 << 16);\n      *(ub16 *)loc = S + A;\n      break;\n    case R_390_20:\n      check(S + A, 0, 1 << 20);\n      write_mid20(loc, S + A);\n      break;\n    case R_390_32:\n    case R_390_PLT32:\n      check(S + A, 0, 1LL << 32);\n      *(ub32 *)loc = S + A;\n      break;\n    case R_390_PC12DBL:\n    case R_390_PLT12DBL:\n      check_dbl(S + A - P, -(1 << 12), 1 << 12);\n      *(ul16 *)loc |= bits(S + A - P, 12, 1);\n      break;\n    case R_390_PC16:\n      check(S + A - P, -(1 << 15), 1 << 15);\n      *(ub16 *)loc = S + A - P;\n      break;\n    case R_390_PC32:\n      check(S + A - P, -(1LL << 31), 1LL << 31);\n      *(ub32 *)loc = S + A - P;\n      break;\n    case R_390_PC64:\n    case R_390_PLT64:\n      *(ub64 *)loc = S + A - P;\n      break;\n    case R_390_PC16DBL:\n    case R_390_PLT16DBL:\n      check_dbl(S + A - P, -(1 << 16), 1 << 16);\n      *(ub16 *)loc = (S + A - P) >> 1;\n      break;\n    case R_390_PC24DBL:\n    case R_390_PLT24DBL:\n      check_dbl(S + A - P, -(1 << 24), 1 << 24);\n      *(ub32 *)loc |= bits(S + A - P, 24, 1);\n      break;\n    case R_390_PC32DBL:\n    case R_390_PLT32DBL:\n      check_dbl(S + A - P, -(1LL << 32), 1LL << 32);\n      *(ub32 *)loc = (S + A - P) >> 1;\n      break;\n    case R_390_GOT12:\n    case R_390_GOTPLT12:\n      check(G + A, 0, 1 << 12);\n      *(ul16 *)loc |= bits(G + A, 11, 0);\n      break;\n    case R_390_GOT16:\n    case R_390_GOTPLT16:\n      check(G + A, 0, 1 << 16);\n      *(ub16 *)loc = G + A;\n      break;\n    case R_390_GOT20:\n    case R_390_GOTPLT20:\n      check(G + A, 0, 1 << 20);\n      write_mid20(loc, G + A);\n      break;\n    case R_390_GOT32:\n    case R_390_GOTPLT32:\n      check(G + A, 0, 1LL << 32);\n      *(ub32 *)loc = G + A;\n      break;\n    case R_390_GOT64:\n    case R_390_GOTPLT64:\n      *(ub64 *)loc = G + A;\n      break;\n    case R_390_GOTOFF16:\n    case R_390_PLTOFF16:\n      check(S + A - GOT, -(1 << 15), 1 << 15);\n      *(ub16 *)loc = S + A - GOT;\n      break;\n    case R_390_GOTOFF32:\n    case R_390_PLTOFF32:\n      check(S + A - GOT, -(1LL << 31), 1LL << 31);\n      *(ub32 *)loc = S + A - GOT;\n      break;\n    case R_390_GOTOFF64:\n    case R_390_PLTOFF64:\n      *(ub64 *)loc = S + A - GOT;\n      break;\n    case R_390_GOTPC:\n      *(ub64 *)loc = GOT + A - P;\n      break;\n    case R_390_GOTPCDBL:\n      check_dbl(GOT + A - P, -(1LL << 32), 1LL << 32);\n      *(ub32 *)loc = (GOT + A - P) >> 1;\n      break;\n    case R_390_GOTENT:\n      // If we can relax a GOT-loading LGRL to an address-materializing\n      // LARL, do that. The format of LGRL is 0xc 0x4 <reg> 0x8 followed\n      // by a 32-bit offset. LARL is 0xc 0x0 <reg> 0x0.\n      if (ctx.arg.relax && sym.is_pcrel_linktime_const(ctx)) {\n        u64 op = *(ub16 *)(loc - 2);\n        u64 val = S + A - P;\n        if ((op & 0xff0f) == 0xc408 && A == 2 && (val & 1) == 0 &&\n            is_int(val, 33)) {\n          *(ub16 *)(loc - 2) = 0xc000 | (op & 0x00f0);\n          *(ub32 *)loc = val >> 1;\n          break;\n        }\n      }\n      check_dbl(GOT + G + A - P, -(1LL << 32), 1LL << 32);\n      *(ub32 *)loc = (GOT + G + A - P) >> 1;\n      break;\n    case R_390_TLS_LE32:\n      *(ub32 *)loc = S + A - ctx.tp_addr;\n      break;\n    case R_390_TLS_LE64:\n      *(ub64 *)loc = S + A - ctx.tp_addr;\n      break;\n    case R_390_TLS_GOTIE20:\n      write_mid20(loc, sym.get_gottp_addr(ctx) + A - GOT);\n      break;\n    case R_390_TLS_IEENT:\n      *(ub32 *)loc = (sym.get_gottp_addr(ctx) + A - P) >> 1;\n      break;\n    case R_390_TLS_GD32:\n      if (sym.has_tlsgd(ctx))\n        *(ub32 *)loc = sym.get_tlsgd_addr(ctx) + A - GOT;\n      else if (sym.has_gottp(ctx))\n        *(ub32 *)loc = sym.get_gottp_addr(ctx) + A - GOT;\n      else\n        *(ub32 *)loc = S + A - ctx.tp_addr;\n      break;\n    case R_390_TLS_GD64:\n      if (sym.has_tlsgd(ctx))\n        *(ub64 *)loc = sym.get_tlsgd_addr(ctx) + A - GOT;\n      else if (sym.has_gottp(ctx))\n        *(ub64 *)loc = sym.get_gottp_addr(ctx) + A - GOT;\n      else\n        *(ub64 *)loc = S + A - ctx.tp_addr;\n      break;\n    case R_390_TLS_GDCALL:\n      if (sym.has_tlsgd(ctx)) {\n        // do nothing\n      } else if (sym.has_gottp(ctx)) {\n        // lg %r2, 0(%r2, %r12)\n        static u8 insn[] = { 0xe3, 0x22, 0xc0, 0x00, 0x00, 0x04 };\n        memcpy(loc, insn, sizeof(insn));\n      } else {\n        // nop\n        static u8 insn[] = { 0xc0, 0x04, 0x00, 0x00, 0x00, 0x00 };\n        memcpy(loc, insn, sizeof(insn));\n      }\n      break;\n    case R_390_TLS_LDM32:\n      if (ctx.got->has_tlsld(ctx))\n        *(ub32 *)loc = ctx.got->get_tlsld_addr(ctx) + A - GOT;\n      else\n        *(ub32 *)loc = ctx.dtp_addr - ctx.tp_addr;\n      break;\n    case R_390_TLS_LDM64:\n      if (ctx.got->has_tlsld(ctx))\n        *(ub64 *)loc = ctx.got->get_tlsld_addr(ctx) + A - GOT;\n      else\n        *(ub64 *)loc = ctx.dtp_addr - ctx.tp_addr;\n      break;\n    case R_390_TLS_LDCALL:\n      if (!ctx.got->has_tlsld(ctx)) {\n        // nop\n        static u8 insn[] = { 0xc0, 0x04, 0x00, 0x00, 0x00, 0x00 };\n        memcpy(loc, insn, sizeof(insn));\n      }\n      break;\n    case R_390_TLS_LDO32:\n      *(ub32 *)loc = S + A - ctx.dtp_addr;\n      break;\n    case R_390_TLS_LDO64:\n      *(ub64 *)loc = S + A - ctx.dtp_addr;\n      break;\n    default:\n      unreachable();\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_nonalloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    SectionFragment<E> *frag;\n    i64 frag_addend;\n    std::tie(frag, frag_addend) = get_fragment(ctx, rel);\n\n    u64 S = frag ? frag->get_addr(ctx) : sym.get_addr(ctx);\n    u64 A = frag ? frag_addend : (i64)rel.r_addend;\n\n    auto check = [&](i64 val, i64 lo, i64 hi) {\n      check_range(ctx, val, i, lo, hi);\n    };\n\n    switch (rel.r_type) {\n    case R_390_32:\n      check(S + A, 0, 1LL << 32);\n      *(ub32 *)loc = S + A;\n      break;\n    case R_390_64:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(ub64 *)loc = *val;\n      else\n        *(ub64 *)loc = S + A;\n      break;\n    case R_390_TLS_LDO64:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(ub64 *)loc = *val;\n      else\n        *(ub64 *)loc = S + A - ctx.dtp_addr;\n      break;\n    default:\n      Fatal(ctx) << *this << \": apply_reloc_nonalloc: \" << rel;\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::scan_relocations(Context<E> &ctx) {\n  assert(shdr().sh_flags & SHF_ALLOC);\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  // Scan relocations\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n\n    if (sym.is_ifunc())\n      sym.flags |= NEEDS_GOT | NEEDS_PLT;\n\n    switch (rel.r_type) {\n    case R_390_8:\n    case R_390_12:\n    case R_390_16:\n    case R_390_20:\n    case R_390_32:\n      scan_absrel(ctx, sym, rel);\n      break;\n    case R_390_PC12DBL:\n    case R_390_PC16:\n    case R_390_PC16DBL:\n    case R_390_PC24DBL:\n    case R_390_PC32:\n    case R_390_PC32DBL:\n    case R_390_PC64:\n      scan_pcrel(ctx, sym, rel);\n      break;\n    case R_390_GOT12:\n    case R_390_GOT16:\n    case R_390_GOT20:\n    case R_390_GOT32:\n    case R_390_GOT64:\n    case R_390_GOTOFF16:\n    case R_390_GOTOFF32:\n    case R_390_GOTOFF64:\n    case R_390_GOTPLT12:\n    case R_390_GOTPLT16:\n    case R_390_GOTPLT20:\n    case R_390_GOTPLT32:\n    case R_390_GOTPLT64:\n    case R_390_GOTPC:\n    case R_390_GOTPCDBL:\n    case R_390_GOTENT:\n      sym.flags |= NEEDS_GOT;\n      break;\n    case R_390_PLT12DBL:\n    case R_390_PLT16DBL:\n    case R_390_PLT24DBL:\n    case R_390_PLT32:\n    case R_390_PLT32DBL:\n    case R_390_PLT64:\n    case R_390_PLTOFF16:\n    case R_390_PLTOFF32:\n    case R_390_PLTOFF64:\n      if (sym.is_imported)\n        sym.flags |= NEEDS_PLT;\n      break;\n    case R_390_TLS_GOTIE20:\n    case R_390_TLS_IEENT:\n      sym.flags |= NEEDS_GOTTP;\n      break;\n    case R_390_TLS_GD32:\n    case R_390_TLS_GD64:\n      // We always want to relax calls to __tls_get_offset() in statically-\n      // linked executables because __tls_get_offset() in libc.a just calls\n      // abort().\n      if (ctx.arg.static_ || (ctx.arg.relax && sym.is_tprel_linktime_const(ctx))) {\n        // Do nothing\n      } else if (ctx.arg.relax && sym.is_tprel_runtime_const(ctx)) {\n        sym.flags |= NEEDS_GOTTP;\n      } else {\n        sym.flags |= NEEDS_TLSGD;\n      }\n      break;\n    case R_390_TLS_LDM32:\n    case R_390_TLS_LDM64:\n      if (ctx.arg.static_ || (ctx.arg.relax && !ctx.arg.shared)) {\n        // Do nothing\n      } else {\n        ctx.needs_tlsld = true;\n      }\n      break;\n    case R_390_TLS_LE32:\n    case R_390_TLS_LE64:\n      check_tlsle(ctx, sym, rel);\n      break;\n    case R_390_64:\n    case R_390_TLS_LDO32:\n    case R_390_TLS_LDO64:\n    case R_390_TLS_GDCALL:\n    case R_390_TLS_LDCALL:\n      break;\n    default:\n      Error(ctx) << *this << \": unknown relocation: \" << rel;\n    }\n  }\n}\n\n} // namespace mold\n\n#endif\n"
  },
  {
    "path": "src/arch-sh4.cc",
    "content": "// SH-4 (SuperH 4) is a 32-bit RISC ISA developed by Hitachi in the early\n// '90s. Some relatively powerful systems were developed with SH-4.\n// A notable example is Sega's Dreamcast game console which debuted in 1998.\n// Hitachi later spun off its semiconductor division as an independent\n// company, Renesas, and Renesas is still selling SH-4 processors for the\n// embedded market. It has never been as popular as ARM is, and its\n// popularity continues to decline though.\n//\n// SH-4's most distinctive feature compared to other RISC ISAs is that its\n// instructions are 16 bits in length instead of more common 32 bits for\n// better code density. This difference affects various aspects of its\n// instruction set as shown below:\n//\n//  - SH-4 has 16 general-purpose registers (GPRs) instead of the most\n//    commmon 32 GPR configuration to save one bit to specify a register.\n//\n//  - Binary instructions such as ADD normally take three register in\n//    RISC ISAs (e.g. x ← y ⊕ z where x, y and z are registers), but\n//    SH-4's instructions take only two registers. The result of an\n//    operation is written to one of the source registers (e.g. x ← x ⊕ y).\n//\n//  - Usual RISC ISAs have \"load high\" and \"load low\" instructions to set\n//    an immediate to most significant and least significant bits in a\n//    register to construct a full 32-bit value in a register. This\n//    technique is hard to use in SH-4, as 16 bit instructions are too\n//    small to contain large immediates. On SH-4, large immediates are\n//    loaded from memory using `mov.l` PC-relative load instruction.\n//\n//  - Many RISC ISAs are, despite their name, actually fairly complex.\n//    They tend to have hundreds if not thousands of different instructions.\n//    SH-4 doesn't really have that many instructions because its 16-bit\n//    machine code simply can't encode many different opcodes. As a\n//    result, the number of relocations the linker has to support is also\n//    small.\n//\n// Beside these, SH-4 has a delay branch slot just like contemporary MIPS\n// and SPARC. That is, one instruction after a branch instruction will\n// always be executed even if the branch is taken. Delay branch slot allows\n// a pipelined CPU to start and finish executing an instruction after a\n// branch regardless of the branch's condition, simplifying the processor's\n// implementation. It's considered a bad premature optimization nowadays,\n// though. Modern RISC processors don't have it.\n//\n// Here are notes about the SH-4 psABI:\n//\n//  - If a source file is compiled with -fPIC, each function starts\n//    with a piece of code to store the address of .got to %r12.\n//    We can use the register in our PLT for position-independent output.\n//\n//  - Even though it uses the RELA-type relocations, relocation addends\n//    are stored not to the r_addend field but to the relocated section\n//    contents for some reason. Therefore, it's effectively REL.\n//\n//  - It looks like the ecosystem has bit-rotted. Some tests, especially\n//    one using C++ exceptions, don't pass even with GNU ld.\n//\n//  - GCC/SH4 tends to write dynamically-relocated data into .text, so the\n//    output from the linker contains lots of text relocations. That's not\n//    a problem with embedded programming, I guess.\n\n#if MOLD_SH4LE || MOLD_SH4BE\n\n#include \"mold.h\"\n\nnamespace mold {\n\nusing E = MOLD_TARGET;\n\n// Even though SH-4 uses RELA-type relocations, addends are stored to\n// relocated places for some reason.\ntemplate <>\ni64 get_addend(u8 *loc, const ElfRel<E> &rel) {\n  switch (rel.r_type) {\n  case R_SH_DIR32:\n  case R_SH_REL32:\n  case R_SH_TLS_GD_32:\n  case R_SH_TLS_LD_32:\n  case R_SH_TLS_LDO_32:\n  case R_SH_TLS_IE_32:\n  case R_SH_TLS_LE_32:\n  case R_SH_TLS_DTPMOD32:\n  case R_SH_TLS_DTPOFF32:\n  case R_SH_TLS_TPOFF32:\n  case R_SH_GOT32:\n  case R_SH_PLT32:\n  case R_SH_GOTOFF:\n  case R_SH_GOTPC:\n  case R_SH_GOTPLT32:\n    return *(U32<E> *)loc;\n  default:\n    return 0;\n  }\n}\n\ntemplate <>\nvoid write_addend(u8 *loc, i64 val, const ElfRel<E> &rel) {\n  switch (rel.r_type) {\n  case R_SH_DIR32:\n  case R_SH_REL32:\n  case R_SH_TLS_GD_32:\n  case R_SH_TLS_LD_32:\n  case R_SH_TLS_LDO_32:\n  case R_SH_TLS_IE_32:\n  case R_SH_TLS_LE_32:\n  case R_SH_TLS_DTPMOD32:\n  case R_SH_TLS_DTPOFF32:\n  case R_SH_TLS_TPOFF32:\n  case R_SH_GOT32:\n  case R_SH_PLT32:\n  case R_SH_GOTOFF:\n  case R_SH_GOTPC:\n  case R_SH_GOTPLT32:\n    *(U32<E> *)loc = val;\n  }\n}\n\ntemplate <>\nvoid write_plt_header(Context<E> &ctx, u8 *buf) {\n  if (ctx.arg.pic) {\n    constexpr U16<E> insn[] = {\n      0xd202, //    mov.l   1f, r2\n      0x32cc, //    add     r12, r2\n      0x5022, //    mov.l   @(8, r2), r0\n      0x5221, //    mov.l   @(4, r2), r2\n      0x402b, //    jmp     @r0\n      0xe000, //    mov     #0, r0\n      0, 0,   // 1: .long GOTPLT\n    };\n\n    static_assert(sizeof(insn) == E::plt_hdr_size);\n    memcpy(buf, insn, sizeof(insn));\n    *(U32<E> *)(buf + 12) = ctx.gotplt->shdr.sh_addr - ctx.got->shdr.sh_addr;\n  } else {\n    constexpr U16<E> insn[] = {\n      0xd202, //    mov.l   1f, r2\n      0x5022, //    mov.l   @(8, r2), r0\n      0x5221, //    mov.l   @(4, r2), r2\n      0x402b, //    jmp     @r0\n      0xe000, //    mov     #0, r0\n      0xfffd, //    (illegal)\n      0, 0,   // 1: .long GOTPLT\n    };\n\n    static_assert(sizeof(insn) == E::plt_hdr_size);\n    memcpy(buf, insn, sizeof(insn));\n    *(U32<E> *)(buf + 12) = ctx.gotplt->shdr.sh_addr;\n  }\n}\n\ntemplate <>\nvoid write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  if (ctx.arg.pic) {\n    constexpr U16<E> insn[] = {\n      0xd001, //    mov.l   1f, r0\n      0x00ce, //    mov.l   @(r0, r12), r0\n      0x402b, //    jmp     @r0\n      0xd101, //    mov.l   2f, r1\n      0, 0,   // 1: .long GOTPLT_ENTRY\n      0, 0,   // 2: .long INDEX_IN_RELPLT\n    };\n\n    static_assert(sizeof(insn) == E::plt_size);\n    memcpy(buf, insn, sizeof(insn));\n    *(U32<E> *)(buf + 8) = sym.get_gotplt_addr(ctx) - ctx.got->shdr.sh_addr;\n    *(U32<E> *)(buf + 12) = sym.get_plt_idx(ctx) * sizeof(ElfRel<E>);\n  } else {\n    constexpr U16<E> insn[] = {\n      0xd001, //    mov.l   1f, r0\n      0x6002, //    mov.l   @r0, r0\n      0x402b, //    jmp     @r0\n      0xd101, //    mov.l   2f, r1\n      0, 0,   // 1: .long GOTPLT_ENTRY\n      0, 0,   // 2: .long INDEX_IN_RELPLT\n    };\n\n    static_assert(sizeof(insn) == E::plt_size);\n    memcpy(buf, insn, sizeof(insn));\n    *(U32<E> *)(buf + 8) = sym.get_gotplt_addr(ctx);\n    *(U32<E> *)(buf + 12) = sym.get_plt_idx(ctx) * sizeof(ElfRel<E>);\n  }\n}\n\ntemplate <>\nvoid write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  if (ctx.arg.pic) {\n    constexpr U16<E> insn[] = {\n      0xd001, //    mov.l   1f, r0\n      0x00ce, //    mov.l   @(r0, r12), r0\n      0x402b, //    jmp     @r0\n      0x0009, //    nop\n      0, 0,   // 1: .long GOT_ENTRY\n    };\n\n    static_assert(sizeof(insn) == E::pltgot_size);\n    memcpy(buf, insn, sizeof(insn));\n    *(U32<E> *)(buf + 8) = sym.get_got_pltgot_addr(ctx) - ctx.got->shdr.sh_addr;\n  } else {\n    constexpr U16<E> insn[] = {\n      0xd001, //    mov.l   1f, r0\n      0x6002, //    mov.l   @r0, r0\n      0x402b, //    jmp     @r0\n      0x0009, //    nop\n      0, 0,   // 1: .long GOT_ENTRY\n    };\n\n    static_assert(sizeof(insn) == E::pltgot_size);\n    memcpy(buf, insn, sizeof(insn));\n    *(U32<E> *)(buf + 8) = sym.get_got_pltgot_addr(ctx);\n  }\n}\n\ntemplate <>\nvoid EhFrameSection<E>::apply_eh_reloc(Context<E> &ctx, const ElfRel<E> &rel,\n                                       u64 offset, u64 val) {\n  u8 *loc = ctx.buf + this->shdr.sh_offset + offset;\n\n  switch (rel.r_type) {\n  case R_NONE:\n    break;\n  case R_SH_DIR32:\n    *(U32<E> *)loc = val;\n    break;\n  case R_SH_REL32:\n    *(U32<E> *)loc = val - this->shdr.sh_addr - offset;\n    break;\n  default:\n    Fatal(ctx) << \"unsupported relocation in .eh_frame: \" << rel;\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE)\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    u64 S = sym.get_addr(ctx);\n    u64 A = get_addend(loc, rel);\n    u64 P = get_addr() + rel.r_offset;\n    u64 G = sym.get_got_idx(ctx) * sizeof(Word<E>);\n    u64 GOT = ctx.got->shdr.sh_addr;\n\n    switch (rel.r_type) {\n    case R_SH_DIR32:\n      break;\n    case R_SH_REL32:\n    case R_SH_PLT32:\n      *(U32<E> *)loc = S + A - P;\n      break;\n    case R_SH_GOT32:\n      *(U32<E> *)loc = G;\n      break;\n    case R_SH_GOTPC:\n      *(U32<E> *)loc = GOT + A - P;\n      break;\n    case R_SH_GOTOFF:\n      *(U32<E> *)loc = S + A - GOT;\n      break;\n    case R_SH_TLS_GD_32:\n      *(U32<E> *)loc = sym.get_tlsgd_addr(ctx) + A - GOT;\n      break;\n    case R_SH_TLS_LD_32:\n      *(U32<E> *)loc = ctx.got->get_tlsld_addr(ctx) + A - GOT;\n      break;\n    case R_SH_TLS_LDO_32:\n      *(U32<E> *)loc = S + A - ctx.dtp_addr;\n      break;\n    case R_SH_TLS_IE_32:\n      *(U32<E> *)loc = sym.get_gottp_addr(ctx) + A - GOT;\n      break;\n    case R_SH_TLS_LE_32:\n      *(U32<E> *)loc = S + A - ctx.tp_addr;\n      break;\n    default:\n      unreachable();\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_nonalloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    SectionFragment<E> *frag;\n    i64 frag_addend;\n    std::tie(frag, frag_addend) = get_fragment(ctx, rel);\n\n    u64 S = frag ? frag->get_addr(ctx) : sym.get_addr(ctx);\n    u64 A = frag ? frag_addend : get_addend(loc, rel);\n\n    switch (rel.r_type) {\n    case R_SH_DIR32:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(U32<E> *)loc = *val;\n      else\n        *(U32<E> *)loc = S + A;\n      break;\n    default:\n      Fatal(ctx) << *this << \": invalid relocation for non-allocated sections: \"\n                 << rel;\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::scan_relocations(Context<E> &ctx) {\n  assert(shdr().sh_flags & SHF_ALLOC);\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n\n    if (sym.is_ifunc())\n      Error(ctx) << sym << \": GNU ifunc symbol is not supported on sh4\";\n\n    switch (rel.r_type) {\n    case R_SH_REL32:\n      scan_pcrel(ctx, sym, rel);\n      break;\n    case R_SH_GOT32:\n      sym.flags |= NEEDS_GOT;\n      break;\n    case R_SH_PLT32:\n      if (sym.is_imported)\n        sym.flags |= NEEDS_PLT;\n      break;\n    case R_SH_TLS_GD_32:\n      sym.flags |= NEEDS_TLSGD;\n      break;\n    case R_SH_TLS_LD_32:\n      ctx.needs_tlsld = true;\n      break;\n    case R_SH_TLS_IE_32:\n      sym.flags |= NEEDS_GOTTP;\n      break;\n    case R_SH_TLS_LE_32:\n      check_tlsle(ctx, sym, rel);\n      break;\n    case R_SH_DIR32:\n    case R_SH_GOTPC:\n    case R_SH_GOTOFF:\n    case R_SH_TLS_LDO_32:\n      break;\n    default:\n      Fatal(ctx) << *this << \": unknown relocation: \" << rel;\n    }\n  }\n}\n\n} // namespace mold\n\n#endif\n"
  },
  {
    "path": "src/arch-sparc64.cc",
    "content": "// SPARC is a RISC ISA developed by Sun Microsystems.\n//\n// The byte order of the processor is big-endian. Anything larger than a\n// byte is stored in the \"reverse\" order compared to little-endian\n// processors such as x86-64.\n//\n// All instructions are 4 bytes long and aligned to 4 bytes boundaries.\n//\n// A notable feature of SPARC is that, unlike other RISC ISAs, it doesn't\n// need range extension thunks. It is because the SPARC's CALL instruction\n// contains a whopping 30 bits immediate. The processor scales it by 4 to\n// extend it to 32 bits (this is doable because all instructions are\n// aligned to 4 bytes boundaries, so the least significant two bits are\n// always zero). That means CALL's reach is PC ± 2 GiB, elinating the\n// need of range extension thunks. It comes with the cost that the CALL\n// instruction alone takes 1/4th of the instruction encoding space,\n// though.\n//\n// SPARC has 32 general purpose registers. CALL instruction saves a return\n// address to %o7, which is an alias for %r15. Thread pointer is stored to\n// %g7 which is %r7.\n//\n// SPARC does not have PC-relative load/store instructions. To access data\n// in the position-independent manner, we usually first set the address of\n// .got to, for example, %l7, with the following piece of code\n//\n//   sethi  %hi(. - _GLOBAL_OFFSET_TABLE_), %l7\n//   add  %l7, %lo(. - _GLOBAL_OFFSET_TABLE_), %l7\n//   call __sparc_get_pc_thunk.l7\n//   nop\n//\n// where __sparc_get_pc_thunk.l7 is defined as\n//\n//   retl\n//   add  %o7, %l7, %l7\n//\n// . SETHI and the following ADD materialize a 32 bits offset to .got.\n// CALL instruction sets a return address to $o7, and the subsequent ADD\n// adds it to the GOT offset to materialize the absolute address of .got.\n//\n// Note that we have a NOP after CALL and an ADD after RETL because of\n// SPARC's delay branch slots. That is, the SPARC processor always\n// executes one instruction after a branch even if the branch is taken.\n// This may seem like an odd behavior, and indeed it is considered as such\n// (that's a premature optimization for the early pipelined SPARC\n// processors), but that's been a part of the ISA's spec so that's what it\n// is.\n//\n// Note also that the .got address obtained this way is not shared between\n// functions, so functions can use an arbitrary register to hold the .got\n// address. That also means each function needs to execute the above piece\n// of code to become position-independent.\n//\n// https://github.com/rui314/psabi/blob/main/sparc.pdf\n\n#if MOLD_SPARC64\n\n#include \"mold.h\"\n\nnamespace mold {\n\nusing E = SPARC64;\n\n// SPARC's PLT section is writable despite containing executable code.\n// We don't need to write the PLT header entry because the dynamic loader\n// will do that for us.\n//\n// We also don't need a .got.plt section to store the result of lazy PLT\n// symbol resolution because the dynamic symbol resolver directly mutates\n// instructions in PLT so that they jump to the right places next time.\n// That's why each PLT entry contains lots of NOPs; they are a placeholder\n// for the runtime to add more instructions.\n//\n// Self-modifying code is nowadays considered really bad from the security\n// point of view, though.\ntemplate <>\nvoid write_plt_header(Context<E> &ctx, u8 *buf) {\n  memset(buf, 0, E::plt_hdr_size);\n}\n\ntemplate <>\nvoid write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  static ub32 insn[] = {\n    0x0300'0000, // sethi (. - .PLT0), %g1\n    0x3068'0000, // ba,a  %xcc, .PLT1\n    0x0100'0000, // nop\n    0x0100'0000, // nop\n    0x0100'0000, // nop\n    0x0100'0000, // nop\n    0x0100'0000, // nop\n    0x0100'0000, // nop\n  };\n\n  u64 plt0 = ctx.plt->shdr.sh_addr;\n  u64 plt1 = ctx.plt->shdr.sh_addr + E::plt_size;\n  u64 entry = sym.get_plt_addr(ctx);\n\n  memcpy(buf, insn, sizeof(insn));\n  *(ub32 *)buf |= bits(entry - plt0, 21, 0);\n  *(ub32 *)(buf + 4) |= bits(plt1 - entry - 4, 20, 2);\n}\n\ntemplate <>\nvoid write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  static ub32 entry[] = {\n    0x8a10'000f, // mov  %o7, %g5\n    0x4000'0002, // call . + 8\n    0xc25b'e014, // ldx  [ %o7 + 20 ], %g1\n    0xc25b'c001, // ldx  [ %o7 + %g1 ], %g1\n    0x81c0'4000, // jmp  %g1\n    0x9e10'0005, // mov  %g5, %o7\n    0x0000'0000, // .quad $plt_entry - $got_entry\n    0x0000'0000,\n  };\n\n  memcpy(buf, entry, sizeof(entry));\n  *(ub64 *)(buf + 24) = sym.get_got_pltgot_addr(ctx) - sym.get_plt_addr(ctx) - 4;\n}\n\ntemplate <>\nvoid EhFrameSection<E>::apply_eh_reloc(Context<E> &ctx, const ElfRel<E> &rel,\n                                       u64 offset, u64 val) {\n  u8 *loc = ctx.buf + this->shdr.sh_offset + offset;\n\n  switch (rel.r_type) {\n  case R_NONE:\n    break;\n  case R_SPARC_64:\n  case R_SPARC_UA64:\n    *(ub64 *)loc = val;\n    break;\n  case R_SPARC_DISP32:\n    *(ub32 *)loc = val - this->shdr.sh_addr - offset;\n    break;\n  default:\n    Fatal(ctx) << \"unsupported relocation in .eh_frame: \" << rel;\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  // We iterate over relocations in reverse order so that it is easy\n  // to swap instructions for R_SPARC_TLS_GD_CALL.\n  for (i64 i = (i64)rels.size() - 1; i >= 0; i--) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE)\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    u64 S = sym.get_addr(ctx);\n    u64 A = rel.r_addend;\n    u64 P = get_addr() + rel.r_offset;\n    u64 G = sym.get_got_idx(ctx) * sizeof(Word<E>);\n    u64 GOT = ctx.got->shdr.sh_addr;\n\n    auto check = [&](i64 val, i64 lo, i64 hi) {\n      check_range(ctx, i, val, lo, hi);\n    };\n\n    auto rs1 = [&] { return *(ub32 *)loc & (0b11111 << 14); };\n    auto rs2 = [&] { return *(ub32 *)loc & 0b11111; };\n    auto rd  = [&] { return *(ub32 *)loc & (0b11111 << 25); };\n\n    switch (rel.r_type) {\n    case R_SPARC_5:\n      check(S + A, 0, 1 << 5);\n      *(ub32 *)loc |= bits(S + A, 4, 0);\n      break;\n    case R_SPARC_6:\n      check(S + A, 0, 1 << 6);\n      *(ub32 *)loc |= bits(S + A, 5, 0);\n      break;\n    case R_SPARC_7:\n      check(S + A, 0, 1 << 7);\n      *(ub32 *)loc |= bits(S + A, 6, 0);\n      break;\n    case R_SPARC_8:\n      check(S + A, 0, 1 << 8);\n      *loc = S + A;\n      break;\n    case R_SPARC_10:\n      check(S + A, 0, 1 << 10);\n      *(ub32 *)loc |= bits(S + A, 9, 0);\n      break;\n    case R_SPARC_LO10:\n    case R_SPARC_LOPLT10:\n      *(ub32 *)loc |= bits(S + A, 9, 0);\n      break;\n    case R_SPARC_11:\n      check(S + A, 0, 1 << 11);\n      *(ub32 *)loc |= bits(S + A, 10, 0);\n      break;\n    case R_SPARC_13:\n      check(S + A, 0, 1 << 13);\n      *(ub32 *)loc |= bits(S + A, 12, 0);\n      break;\n    case R_SPARC_16:\n    case R_SPARC_UA16:\n      check(S + A, 0, 1 << 16);\n      *(ub16 *)loc = S + A;\n      break;\n    case R_SPARC_22:\n      check(S + A, 0, 1 << 22);\n      *(ub32 *)loc |= bits(S + A, 21, 0);\n      break;\n    case R_SPARC_32:\n    case R_SPARC_UA32:\n    case R_SPARC_PLT32:\n      check(S + A, 0, 1LL << 32);\n      *(ub32 *)loc = S + A;\n      break;\n    case R_SPARC_PLT64:\n    case R_SPARC_REGISTER:\n      *(ub64 *)loc = S + A;\n      break;\n    case R_SPARC_DISP8:\n      check(S + A - P, -(1 << 7), 1 << 7);\n      *loc = S + A - P;\n      break;\n    case R_SPARC_DISP16:\n      check(S + A - P, -(1 << 15), 1 << 15);\n      *(ub16 *)loc = S + A - P;\n      break;\n    case R_SPARC_DISP32:\n    case R_SPARC_PCPLT32:\n      check(S + A - P, -(1LL << 31), 1LL << 31);\n      *(ub32 *)loc = S + A - P;\n      break;\n    case R_SPARC_DISP64:\n      *(ub64 *)loc = S + A - P;\n      break;\n    case R_SPARC_WDISP16: {\n      i64 val = S + A - P;\n      check(val, -(1 << 16), 1 << 16);\n      *(ub16 *)loc |= (bit(val, 16) << 21) | bits(val, 15, 2);\n      break;\n    }\n    case R_SPARC_WDISP19:\n      check(S + A - P, -(1 << 20), 1 << 20);\n      *(ub32 *)loc |= bits(S + A - P, 20, 2);\n      break;\n    case R_SPARC_WDISP22:\n      check(S + A - P, -(1 << 23), 1 << 23);\n      *(ub32 *)loc |= bits(S + A - P, 23, 2);\n      break;\n    case R_SPARC_WDISP30:\n    case R_SPARC_WPLT30:\n      check(S + A - P, -(1LL << 31), 1LL << 31);\n      *(ub32 *)loc |= bits(S + A - P, 31, 2);\n      break;\n    case R_SPARC_HI22:\n    case R_SPARC_HIPLT22:\n    case R_SPARC_LM22:\n      *(ub32 *)loc |= bits(S + A, 31, 10);\n      break;\n    case R_SPARC_GOT10:\n      *(ub32 *)loc |= bits(G, 9, 0);\n      break;\n    case R_SPARC_GOT13:\n      check(G, 0, 1 << 12);\n      *(ub32 *)loc |= bits(G, 12, 0);\n      break;\n    case R_SPARC_GOT22:\n      *(ub32 *)loc |= bits(G, 31, 10);\n      break;\n    case R_SPARC_GOTDATA_HIX22: {\n      i64 val = S + A - GOT;\n      *(ub32 *)loc |= bits(val < 0 ? ~val : val, 31, 10);\n      break;\n    }\n    case R_SPARC_GOTDATA_LOX10: {\n      i64 val = S + A - GOT;\n      *(ub32 *)loc |= bits(val, 9, 0) | (val < 0 ? 0b1'1100'0000'0000 : 0);\n      break;\n    }\n    case R_SPARC_GOTDATA_OP_HIX22:\n      // We always have to relax a GOT load to a load immediate if a\n      // symbol is local, because R_SPARC_GOTDATA_OP cannot represent\n      // an addend for a local symbol.\n      if (sym.is_absolute()) {\n        i64 val = S + A;\n        *(ub32 *)loc |= bits(val < 0 ? ~val : val, 31, 10);\n      } else if (sym.is_pcrel_linktime_const(ctx)) {\n        i64 val = S + A - GOT;\n        *(ub32 *)loc |= bits(val < 0 ? ~val : val, 31, 10);\n      } else {\n        *(ub32 *)loc |= bits(G, 31, 10);\n      }\n      break;\n    case R_SPARC_GOTDATA_OP_LOX10:\n      if (sym.is_absolute()) {\n        i64 val = S + A;\n        *(ub32 *)loc |= bits(val, 9, 0) | (val < 0 ? 0b1'1100'0000'0000 : 0);\n      } else if (sym.is_pcrel_linktime_const(ctx)) {\n        i64 val = S + A - GOT;\n        *(ub32 *)loc |= bits(val, 9, 0) | (val < 0 ? 0b1'1100'0000'0000 : 0);\n      } else {\n        *(ub32 *)loc |= bits(G, 9, 0);\n      }\n      break;\n    case R_SPARC_GOTDATA_OP:\n      if (sym.is_absolute()) {\n        // ldx [ %rs1 + %rs2 ], %rd  →  mov %rs2, %rd\n        *(ub32 *)loc = 0x8010'0000 | rs2() | rd();\n      } else if (sym.is_pcrel_linktime_const(ctx)) {\n        // ldx [ %rs1 + %rs2 ], %rd  →  add %rs1, %rs2, %rd\n        *(ub32 *)loc = 0x8000'0000 | rs1() | rs2() | rd();\n      }\n      break;\n    case R_SPARC_PC10:\n    case R_SPARC_PCPLT10:\n      *(ub32 *)loc |= bits(S + A - P, 9, 0);\n      break;\n    case R_SPARC_PC22:\n    case R_SPARC_PCPLT22:\n    case R_SPARC_PC_LM22:\n      *(ub32 *)loc |= bits(S + A - P, 31, 10);\n      break;\n    case R_SPARC_OLO10:\n      *(ub32 *)loc |= bits(bits(S + A, 9, 0) + rel.r_type_data, 12, 0);\n      break;\n    case R_SPARC_HH22:\n      *(ub32 *)loc |= bits(S + A, 63, 42);\n      break;\n    case R_SPARC_HM10:\n      *(ub32 *)loc |= bits(S + A, 41, 32);\n      break;\n    case R_SPARC_PC_HH22:\n      *(ub32 *)loc |= bits(S + A - P, 63, 42);\n      break;\n    case R_SPARC_PC_HM10:\n      *(ub32 *)loc |= bits(S + A - P, 41, 32);\n      break;\n    case R_SPARC_HIX22:\n      *(ub32 *)loc |= bits(~(S + A), 31, 10);\n      break;\n    case R_SPARC_LOX10:\n      *(ub32 *)loc |= bits(S + A, 9, 0) | 0b1'1100'0000'0000;\n      break;\n    case R_SPARC_H44:\n      *(ub32 *)loc |= bits(S + A, 43, 22);\n      break;\n    case R_SPARC_M44:\n      *(ub32 *)loc |= bits(S + A, 21, 12);\n      break;\n    case R_SPARC_L44:\n      *(ub32 *)loc |= bits(S + A, 11, 0);\n      break;\n    case R_SPARC_TLS_GD_HI22:\n      if (sym.has_tlsgd(ctx)) {\n        *(ub32 *)loc |= bits(sym.get_tlsgd_addr(ctx) + A - GOT, 31, 10);\n      } else if (sym.has_gottp(ctx)) {\n        *(ub32 *)loc |= bits(sym.get_gottp_addr(ctx) + A - GOT, 31, 10);\n      } else {\n        *(ub32 *)loc |= bits(~(S + A - ctx.tp_addr), 31, 10);\n      }\n      break;\n    case R_SPARC_TLS_GD_LO10:\n      if (sym.has_tlsgd(ctx)) {\n        *(ub32 *)loc |= bits(sym.get_tlsgd_addr(ctx) + A - GOT, 9, 0);\n      } else if (sym.has_gottp(ctx)) {\n        // add %rs1, %rs2, %rd → or  %rs1, $imm, %rd\n        *(ub32 *)loc = 0x8010'2000 | rs1() | rd();\n        *(ub32 *)loc |= bits(sym.get_gottp_addr(ctx) + A - GOT, 9, 0);\n      } else {\n        // add %rs1, %rs2, %rd → xor %rs1, $imm, %rd\n        *(ub32 *)loc = 0x8018'2000 | rs1() | rd();\n        *(ub32 *)loc |= bits(S + A - ctx.tp_addr, 9, 0) | 0b1'1100'0000'0000;\n      }\n      break;\n    case R_SPARC_TLS_GD_ADD:\n      if (sym.has_tlsgd(ctx)) {\n        // do nothing\n      } else if (sym.has_gottp(ctx)) {\n        // add %rs1, %rs2, %rd → ldx [ %rs1 + %rs2 ], %rd\n        *(ub32 *)loc = 0xc058'0000 | rs1() | rs2() | rd();\n      } else {\n        // add %rs1, %rs2, %rd → add %g7, %rs2, %rd\n        *(ub32 *)loc = 0x8001'c000 | rs2() | rd();\n      }\n      break;\n    case R_SPARC_TLS_GD_CALL:\n      if (sym.has_tlsgd(ctx)) {\n        u64 addr = ctx.extra.tls_get_addr->get_addr(ctx);\n        *(ub32 *)loc |= bits(addr + A - P, 31, 2);\n      } else if (sym.has_gottp(ctx)) {\n        // When we rewrite a branch instruction with a non-branch one,\n        // we need to swap the instruction and the following one so that\n        // the original execution order, which is inverted due to the\n        // branch delay slot, is preserved.\n        //\n        // Since we apply relocations from the end to the beginning,\n        // the instruction at loc + 4 is already complete.\n        memcpy(loc, loc + 4, 4);\n        *(ub32 *)(loc + 4) = 0x9001'c008; // add %g7, %o0, %o0\n      } else {\n        *(ub32 *)loc = 0x0100'0000; // call → nop\n      }\n      break;\n    case R_SPARC_TLS_LDM_HI22:\n      if (ctx.got->has_tlsld(ctx))\n        *(ub32 *)loc |= bits(ctx.got->get_tlsld_addr(ctx) + A - GOT, 31, 10);\n      else\n        *(ub32 *)loc |= bits(ctx.tp_addr - ctx.tls_begin, 31, 10);\n      break;\n    case R_SPARC_TLS_LDM_LO10:\n      if (ctx.got->has_tlsld(ctx))\n        *(ub32 *)loc |= bits(ctx.got->get_tlsld_addr(ctx) + A - GOT, 9, 0);\n      else\n        *(ub32 *)loc |= bits(ctx.tp_addr - ctx.tls_begin, 9, 0);\n      break;\n    case R_SPARC_TLS_LDM_ADD:\n      if (!ctx.got->has_tlsld(ctx))\n        *(ub32 *)loc = 0x8021'c000 | rs2() | rd(); // sub %g7, %rs2, %rd\n      break;\n    case R_SPARC_TLS_LDM_CALL:\n      if (ctx.got->has_tlsld(ctx)) {\n        u64 addr = ctx.extra.tls_get_addr->get_addr(ctx);\n        *(ub32 *)loc |= bits(addr + A - P, 31, 2);\n      } else {\n        *(ub32 *)loc = 0x0100'0000; // nop\n      }\n      break;\n    case R_SPARC_TLS_LDO_HIX22:\n      *(ub32 *)loc |= bits(S + A - ctx.dtp_addr, 31, 10);\n      break;\n    case R_SPARC_TLS_LDO_LOX10:\n      *(ub32 *)loc |= bits(S + A - ctx.dtp_addr, 9, 0);\n      break;\n    case R_SPARC_TLS_IE_HI22:\n      *(ub32 *)loc |= bits(sym.get_gottp_addr(ctx) + A - GOT, 31, 10);\n      break;\n    case R_SPARC_TLS_IE_LO10:\n      *(ub32 *)loc |= bits(sym.get_gottp_addr(ctx) + A - GOT, 9, 0);\n      break;\n    case R_SPARC_TLS_LE_HIX22:\n      *(ub32 *)loc |= bits(~(S + A - ctx.tp_addr), 31, 10);\n      break;\n    case R_SPARC_TLS_LE_LOX10:\n      *(ub32 *)loc |= bits(S + A - ctx.tp_addr, 9, 0) | 0b1'1100'0000'0000;\n      break;\n    case R_SPARC_SIZE32:\n      *(ub32 *)loc = sym.esym().st_size + A;\n      break;\n    case R_SPARC_64:\n    case R_SPARC_UA64:\n    case R_SPARC_TLS_LDO_ADD:\n    case R_SPARC_TLS_IE_LD:\n    case R_SPARC_TLS_IE_LDX:\n    case R_SPARC_TLS_IE_ADD:\n      break;\n    default:\n      unreachable();\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::apply_reloc_nonalloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    SectionFragment<E> *frag;\n    i64 frag_addend;\n    std::tie(frag, frag_addend) = get_fragment(ctx, rel);\n\n    u64 S = frag ? frag->get_addr(ctx) : sym.get_addr(ctx);\n    u64 A = frag ? frag_addend : (i64)rel.r_addend;\n\n    auto check = [&](i64 val, i64 lo, i64 hi) {\n      check_range(ctx, val, i, lo, hi);\n    };\n\n    switch (rel.r_type) {\n    case R_SPARC_64:\n    case R_SPARC_UA64:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(ub64 *)loc = *val;\n      else\n        *(ub64 *)loc = S + A;\n      break;\n    case R_SPARC_32:\n    case R_SPARC_UA32:\n      check(S + A, 0, 1LL << 32);\n      *(ub32 *)loc = S + A;\n      break;\n    case R_SPARC_TLS_DTPOFF32:\n      *(ub32 *)loc = S + A - ctx.dtp_addr;\n      break;\n    case R_SPARC_TLS_DTPOFF64:\n      *(ub64 *)loc = S + A - ctx.dtp_addr;\n      break;\n    default:\n      Fatal(ctx) << *this << \": apply_reloc_nonalloc: \" << rel;\n    }\n  }\n}\n\ntemplate <>\nvoid InputSection<E>::scan_relocations(Context<E> &ctx) {\n  assert(shdr().sh_flags & SHF_ALLOC);\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n  bool needs_tlsgd = false;\n\n  // Scan relocations\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n\n    if (sym.is_ifunc())\n      sym.flags |= NEEDS_GOT | NEEDS_PLT;\n\n    switch (rel.r_type) {\n    case R_SPARC_8:\n    case R_SPARC_5:\n    case R_SPARC_6:\n    case R_SPARC_7:\n    case R_SPARC_10:\n    case R_SPARC_11:\n    case R_SPARC_13:\n    case R_SPARC_16:\n    case R_SPARC_22:\n    case R_SPARC_32:\n    case R_SPARC_REGISTER:\n    case R_SPARC_UA16:\n    case R_SPARC_UA32:\n    case R_SPARC_PC_HM10:\n    case R_SPARC_OLO10:\n    case R_SPARC_LOX10:\n    case R_SPARC_HM10:\n    case R_SPARC_M44:\n    case R_SPARC_HIX22:\n    case R_SPARC_LO10:\n    case R_SPARC_L44:\n    case R_SPARC_LM22:\n    case R_SPARC_HI22:\n    case R_SPARC_H44:\n    case R_SPARC_HH22:\n      scan_absrel(ctx, sym, rel);\n      break;\n    case R_SPARC_PLT32:\n    case R_SPARC_WPLT30:\n    case R_SPARC_WDISP30:\n    case R_SPARC_HIPLT22:\n    case R_SPARC_LOPLT10:\n    case R_SPARC_PCPLT32:\n    case R_SPARC_PCPLT22:\n    case R_SPARC_PCPLT10:\n    case R_SPARC_PLT64:\n      if (sym.is_imported)\n        sym.flags |= NEEDS_PLT;\n      break;\n    case R_SPARC_GOT13:\n    case R_SPARC_GOT10:\n    case R_SPARC_GOT22:\n    case R_SPARC_GOTDATA_HIX22:\n      sym.flags |= NEEDS_GOT;\n      break;\n    case R_SPARC_GOTDATA_OP_HIX22:\n      if (sym.is_imported)\n        sym.flags |= NEEDS_GOT;\n      break;\n    case R_SPARC_DISP16:\n    case R_SPARC_DISP32:\n    case R_SPARC_DISP64:\n    case R_SPARC_DISP8:\n    case R_SPARC_PC10:\n    case R_SPARC_PC22:\n    case R_SPARC_PC_LM22:\n    case R_SPARC_WDISP16:\n    case R_SPARC_WDISP19:\n    case R_SPARC_WDISP22:\n    case R_SPARC_PC_HH22:\n      scan_pcrel(ctx, sym, rel);\n      break;\n    case R_SPARC_TLS_GD_HI22:\n      if (ctx.arg.static_ || (ctx.arg.relax && sym.is_tprel_linktime_const(ctx))) {\n        // We always relax if -static because libc.a doesn't contain\n        // __tls_get_addr().\n      } else if (ctx.arg.relax && sym.is_tprel_runtime_const(ctx)) {\n        sym.flags |= NEEDS_GOTTP;\n      } else {\n        sym.flags |= NEEDS_TLSGD;\n        needs_tlsgd = true;\n      }\n      break;\n    case R_SPARC_TLS_LDM_HI22:\n      if (ctx.arg.static_ || (ctx.arg.relax && !ctx.arg.shared)) {\n        // We always relax if -static because libc.a doesn't contain\n        // __tls_get_addr().\n      } else {\n        ctx.needs_tlsld = true;\n      }\n      break;\n    case R_SPARC_TLS_IE_HI22:\n      sym.flags |= NEEDS_GOTTP;\n      break;\n    case R_SPARC_TLS_LE_HIX22:\n    case R_SPARC_TLS_LE_LOX10:\n      check_tlsle(ctx, sym, rel);\n      break;\n    case R_SPARC_64:\n    case R_SPARC_UA64:\n    case R_SPARC_GOTDATA_OP_LOX10:\n    case R_SPARC_GOTDATA_OP:\n    case R_SPARC_GOTDATA_LOX10:\n    case R_SPARC_TLS_GD_LO10:\n    case R_SPARC_TLS_GD_ADD:\n    case R_SPARC_TLS_GD_CALL:\n    case R_SPARC_TLS_LDM_LO10:\n    case R_SPARC_TLS_LDM_ADD:\n    case R_SPARC_TLS_LDM_CALL:\n    case R_SPARC_TLS_LDO_HIX22:\n    case R_SPARC_TLS_LDO_LOX10:\n    case R_SPARC_TLS_LDO_ADD:\n    case R_SPARC_TLS_IE_ADD:\n    case R_SPARC_TLS_IE_LD:\n    case R_SPARC_TLS_IE_LDX:\n    case R_SPARC_TLS_IE_LO10:\n    case R_SPARC_SIZE32:\n      break;\n    default:\n      Error(ctx) << *this << \": unknown relocation: \" << rel;\n    }\n  }\n\n  // TLS_GD_CALL and TLS_LDM_CALL relocations implicitly refer to\n  // __tls_get_addr, which may be dynamically linked from libc.so.\n  Symbol<E> &sym = *ctx.extra.tls_get_addr;\n  if (sym.is_imported && (needs_tlsgd || ctx.needs_tlsld))\n    sym.flags |= NEEDS_PLT;\n}\n\n} // namespace mold\n\n#endif\n"
  },
  {
    "path": "src/arch-x86-64.cc",
    "content": "// Supporting x86-64 is straightforward. Unlike its predecessor, i386,\n// x86-64 supports PC-relative addressing for position-independent code.\n// Being CISC, its instructions are variable in size. Branch instructions\n// take 4 bytes offsets, so we don't need range extension thunks.\n//\n// The psABI specifies %r11 as neither caller- nor callee-saved. It's\n// intentionally left out so that we can use it as a scratch register in\n// PLT.\n//\n// Thread Pointer (TP) is stored not to a general-purpose register but to\n// FS segment register. Segment register is a 64-bits register which can\n// be used as a base address for memory access. Each thread has a unique\n// FS value, and they access their thread-local variables relative to FS\n// as %fs:offset_from_tp.\n//\n// The value of a segment register itself is not generally readable from\n// the user space. As a workaround, libc initializes %fs:0 (the first word\n// referenced by FS) to the value of %fs itself. So we can obtain TP just\n// by `mov %fs:0, %rax` if we need it.\n//\n// For historical reasons, TP points past the end of the TLS block on x86.\n// This is contrary to other psABIs which usually use the beginning of the\n// TLS block as TP (with some addend). As a result, offsets from TP to\n// thread-local variables (TLVs) in the main executable are all negative.\n//\n// https://gitlab.com/x86-psABIs/x86-64-ABI\n\n#if MOLD_X86_64\n\n#include \"mold.h\"\n#include <tbb/parallel_for_each.h>\n\nnamespace mold {\n\nusing E = X86_64;\n\n// This is a security-enhanced version of the regular PLT. The PLT\n// header and each PLT entry starts with endbr64 for the Intel's\n// control-flow enforcement security mechanism.\n//\n// Note that our IBT-enabled PLT instruction sequence is different\n// from the one used in GNU ld. GNU's IBTPLT implementation uses two\n// separate sections (.plt and .plt.sec) in which one PLT entry takes\n// 32 bytes in total. Our IBTPLT consists of just .plt and each entry\n// is 16 bytes long.\n//\n// Our PLT entry clobbers %r11, but that's fine because the resolver\n// function (_dl_runtime_resolve) clobbers %r11 anyway.\ntemplate <>\nvoid write_plt_header(Context<E> &ctx, u8 *buf) {\n  static const u8 insn[] = {\n    0xf3, 0x0f, 0x1e, 0xfa, // endbr64\n    0x41, 0x53,             // push %r11\n    0xff, 0x35, 0, 0, 0, 0, // push GOTPLT+8(%rip)\n    0xff, 0x25, 0, 0, 0, 0, // jmp *GOTPLT+16(%rip)\n    0xcc, 0xcc, 0xcc, 0xcc, // (padding)\n    0xcc, 0xcc, 0xcc, 0xcc, // (padding)\n    0xcc, 0xcc, 0xcc, 0xcc, // (padding)\n    0xcc, 0xcc,             // (padding)\n  };\n\n  memcpy(buf, insn, sizeof(insn));\n  *(ul32 *)(buf + 8) = ctx.gotplt->shdr.sh_addr - ctx.plt->shdr.sh_addr - 4;\n  *(ul32 *)(buf + 14) = ctx.gotplt->shdr.sh_addr - ctx.plt->shdr.sh_addr - 2;\n}\n\ntemplate <>\nvoid write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  // Only a canonical PLT can be address-taken; there's no way to take\n  // an address of a non-canonical PLT. Therefore, a non-canonical PLT\n  // doesn't have to start with an endbr64.\n  if (sym.is_canonical) {\n    static const u8 insn[] = {\n      0xf3, 0x0f, 0x1e, 0xfa, // endbr64\n      0x41, 0xbb, 0, 0, 0, 0, // mov $index_in_relplt, %r11d\n      0xff, 0x25, 0, 0, 0, 0, // jmp *foo@GOTPLT\n    };\n\n    memcpy(buf, insn, sizeof(insn));\n    *(ul32 *)(buf + 6) = sym.get_plt_idx(ctx);\n    *(ul32 *)(buf + 12) = sym.get_gotplt_addr(ctx) - sym.get_plt_addr(ctx) - 16;\n  } else {\n    static const u8 insn[] = {\n      0x41, 0xbb, 0, 0, 0, 0, // mov $index_in_relplt, %r11d\n      0xff, 0x25, 0, 0, 0, 0, // jmp *foo@GOTPLT\n      0xcc, 0xcc, 0xcc, 0xcc, // (padding)\n    };\n\n    memcpy(buf, insn, sizeof(insn));\n    *(ul32 *)(buf + 2) = sym.get_plt_idx(ctx);\n    *(ul32 *)(buf + 8) = sym.get_gotplt_addr(ctx) - sym.get_plt_addr(ctx) - 12;\n  }\n}\n\ntemplate <>\nvoid write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {\n  static const u8 insn[] = {\n    0xff, 0x25, 0, 0, 0, 0, // jmp *foo@GOT\n    0xcc, 0xcc,             // (padding)\n  };\n\n  memcpy(buf, insn, sizeof(insn));\n  *(ul32 *)(buf + 2) = sym.get_got_pltgot_addr(ctx) - sym.get_plt_addr(ctx) - 6;\n}\n\ntemplate <>\nvoid EhFrameSection<E>::apply_eh_reloc(Context<E> &ctx, const ElfRel<E> &rel,\n                                       u64 offset, u64 val) {\n  u8 *loc = ctx.buf + this->shdr.sh_offset + offset;\n\n  switch (rel.r_type) {\n  case R_NONE:\n    break;\n  case R_X86_64_32:\n    *(ul32 *)loc = val;\n    break;\n  case R_X86_64_64:\n    *(ul64 *)loc = val;\n    break;\n  case R_X86_64_PC32:\n    *(ul32 *)loc = val - this->shdr.sh_addr - offset;\n    break;\n  case R_X86_64_PC64:\n    *(ul64 *)loc = val - this->shdr.sh_addr - offset;\n    break;\n  default:\n    Fatal(ctx) << \"unsupported relocation in .eh_frame: \" << rel;\n  }\n}\n\nstatic u32 relax_gotpcrelx(u8 *loc, const ElfRel<E> &rel) {\n  if (rel.r_type == R_X86_64_GOTPCRELX) {\n    switch ((loc[-2] << 8) | loc[-1]) {\n    case 0xff15: return 0x40e8; // call *0(%rip) -> call 0\n    case 0xff25: return 0x40e9; // jmp  *0(%rip) -> jmp  0\n    }\n  } else {\n    assert(rel.r_type == R_X86_64_REX_GOTPCRELX ||\n           rel.r_type == R_X86_64_CODE_4_GOTPCRELX);\n    switch ((loc[-3] << 16) | (loc[-2] << 8) | loc[-1]) {\n    case 0x488b05: return 0x8d05; // mov 0(%rip), %rax -> lea 0(%rip), %rax\n    case 0x488b0d: return 0x8d0d; // mov 0(%rip), %rcx -> lea 0(%rip), %rcx\n    case 0x488b15: return 0x8d15; // mov 0(%rip), %rdx -> lea 0(%rip), %rdx\n    case 0x488b1d: return 0x8d1d; // mov 0(%rip), %rbx -> lea 0(%rip), %rbx\n    case 0x488b25: return 0x8d25; // mov 0(%rip), %rsp -> lea 0(%rip), %rsp\n    case 0x488b2d: return 0x8d2d; // mov 0(%rip), %rbp -> lea 0(%rip), %rbp\n    case 0x488b35: return 0x8d35; // mov 0(%rip), %rsi -> lea 0(%rip), %rsi\n    case 0x488b3d: return 0x8d3d; // mov 0(%rip), %rdi -> lea 0(%rip), %rdi\n    case 0x4c8b05: return 0x8d05; // mov 0(%rip), %r8  -> lea 0(%rip), %r8\n    case 0x4c8b0d: return 0x8d0d; // mov 0(%rip), %r9  -> lea 0(%rip), %r9\n    case 0x4c8b15: return 0x8d15; // mov 0(%rip), %r10 -> lea 0(%rip), %r10\n    case 0x4c8b1d: return 0x8d1d; // mov 0(%rip), %r11 -> lea 0(%rip), %r11\n    case 0x4c8b25: return 0x8d25; // mov 0(%rip), %r12 -> lea 0(%rip), %r12\n    case 0x4c8b2d: return 0x8d2d; // mov 0(%rip), %r13 -> lea 0(%rip), %r13\n    case 0x4c8b35: return 0x8d35; // mov 0(%rip), %r14 -> lea 0(%rip), %r14\n    case 0x4c8b3d: return 0x8d3d; // mov 0(%rip), %r15 -> lea 0(%rip), %r15\n    }\n  }\n  return 0;\n}\n\nstatic u32 relax_gottpoff(u8 *loc, const ElfRel<E> &rel) {\n  if (rel.r_type == R_X86_64_GOTTPOFF) {\n    switch ((loc[-3] << 16) | (loc[-2] << 8) | loc[-1]) {\n    case 0x488b05: return 0x48c7c0; // mov 0(%rip), %rax -> mov $0, %rax\n    case 0x488b0d: return 0x48c7c1; // mov 0(%rip), %rcx -> mov $0, %rcx\n    case 0x488b15: return 0x48c7c2; // mov 0(%rip), %rdx -> mov $0, %rdx\n    case 0x488b1d: return 0x48c7c3; // mov 0(%rip), %rbx -> mov $0, %rbx\n    case 0x488b25: return 0x48c7c4; // mov 0(%rip), %rsp -> mov $0, %rsp\n    case 0x488b2d: return 0x48c7c5; // mov 0(%rip), %rbp -> mov $0, %rbp\n    case 0x488b35: return 0x48c7c6; // mov 0(%rip), %rsi -> mov $0, %rsi\n    case 0x488b3d: return 0x48c7c7; // mov 0(%rip), %rdi -> mov $0, %rdi\n    case 0x4c8b05: return 0x49c7c0; // mov 0(%rip), %r8  -> mov $0, %r8\n    case 0x4c8b0d: return 0x49c7c1; // mov 0(%rip), %r9  -> mov $0, %r9\n    case 0x4c8b15: return 0x49c7c2; // mov 0(%rip), %r10 -> mov $0, %r10\n    case 0x4c8b1d: return 0x49c7c3; // mov 0(%rip), %r11 -> mov $0, %r11\n    case 0x4c8b25: return 0x49c7c4; // mov 0(%rip), %r12 -> mov $0, %r12\n    case 0x4c8b2d: return 0x49c7c5; // mov 0(%rip), %r13 -> mov $0, %r13\n    case 0x4c8b35: return 0x49c7c6; // mov 0(%rip), %r14 -> mov $0, %r14\n    case 0x4c8b3d: return 0x49c7c7; // mov 0(%rip), %r15 -> mov $0, %r15\n    }\n  } else {\n    assert(rel.r_type == R_X86_64_CODE_4_GOTTPOFF);\n    switch ((loc[-3] << 16) | (loc[-2] << 8) | loc[-1]) {\n    case 0x488b05: return 0x18c7c0; // mov 0(%rip), %r16 -> mov $0, %r16\n    case 0x488b0d: return 0x18c7c1; // mov 0(%rip), %r17 -> mov $0, %r17\n    case 0x488b15: return 0x18c7c2; // mov 0(%rip), %r18 -> mov $0, %r18\n    case 0x488b1d: return 0x18c7c3; // mov 0(%rip), %r19 -> mov $0, %r19\n    case 0x488b25: return 0x18c7c4; // mov 0(%rip), %r20 -> mov $0, %r20\n    case 0x488b2d: return 0x18c7c5; // mov 0(%rip), %r21 -> mov $0, %r21\n    case 0x488b35: return 0x18c7c6; // mov 0(%rip), %r22 -> mov $0, %r22\n    case 0x488b3d: return 0x18c7c7; // mov 0(%rip), %r23 -> mov $0, %r23\n    case 0x4c8b05: return 0x19c7c0; // mov 0(%rip), %r24 -> mov $0, %r24\n    case 0x4c8b0d: return 0x19c7c1; // mov 0(%rip), %r25 -> mov $0, %r25\n    case 0x4c8b15: return 0x19c7c2; // mov 0(%rip), %r26 -> mov $0, %r26\n    case 0x4c8b1d: return 0x19c7c3; // mov 0(%rip), %r27 -> mov $0, %r27\n    case 0x4c8b25: return 0x19c7c4; // mov 0(%rip), %r28 -> mov $0, %r28\n    case 0x4c8b2d: return 0x19c7c5; // mov 0(%rip), %r29 -> mov $0, %r29\n    case 0x4c8b35: return 0x19c7c6; // mov 0(%rip), %r30 -> mov $0, %r30\n    case 0x4c8b3d: return 0x19c7c7; // mov 0(%rip), %r31 -> mov $0, %r31\n    }\n  }\n  return 0;\n}\n\nstatic u32 relax_tlsdesc_to_ie(u8 *loc, const ElfRel<E> &rel) {\n  if (rel.r_type == R_X86_64_GOTPC32_TLSDESC) {\n    switch ((loc[-3] << 16) | (loc[-2] << 8) | loc[-1]) {\n    case 0x488d05: return 0x488b05; // lea 0(%rip), %rax -> mov 0(%rip), %rax\n    case 0x488d0d: return 0x488b0d; // lea 0(%rip), %rcx -> mov 0(%rip), %rcx\n    case 0x488d15: return 0x488b15; // lea 0(%rip), %rdx -> mov 0(%rip), %rdx\n    case 0x488d1d: return 0x488b1d; // lea 0(%rip), %rbx -> mov 0(%rip), %rbx\n    case 0x488d25: return 0x488b25; // lea 0(%rip), %rsp -> mov 0(%rip), %rsp\n    case 0x488d2d: return 0x488b2d; // lea 0(%rip), %rbp -> mov 0(%rip), %rbp\n    case 0x488d35: return 0x488b35; // lea 0(%rip), %rsi -> mov 0(%rip), %rsi\n    case 0x488d3d: return 0x488b3d; // lea 0(%rip), %rdi -> mov 0(%rip), %rdi\n    case 0x4c8d05: return 0x4c8b05; // lea 0(%rip), %r8  -> mov 0(%rip), %r8\n    case 0x4c8d0d: return 0x4c8b0d; // lea 0(%rip), %r9  -> mov 0(%rip), %r9\n    case 0x4c8d15: return 0x4c8b15; // lea 0(%rip), %r10 -> mov 0(%rip), %r10\n    case 0x4c8d1d: return 0x4c8b1d; // lea 0(%rip), %r11 -> mov 0(%rip), %r11\n    case 0x4c8d25: return 0x4c8b25; // lea 0(%rip), %r12 -> mov 0(%rip), %r12\n    case 0x4c8d2d: return 0x4c8b2d; // lea 0(%rip), %r13 -> mov 0(%rip), %r13\n    case 0x4c8d35: return 0x4c8b35; // lea 0(%rip), %r14 -> mov 0(%rip), %r14\n    case 0x4c8d3d: return 0x4c8b3d; // lea 0(%rip), %r15 -> mov 0(%rip), %r15\n    }\n  } else {\n    assert(rel.r_type == R_X86_64_CODE_4_GOTPC32_TLSDESC);\n    switch ((loc[-3] << 16) | (loc[-2] << 8) | loc[-1]) {\n    case 0x488d05: return 0x488b05; // lea 0(%rip), %r16 -> mov 0(%rip), %r16\n    case 0x488d0d: return 0x488b0d; // lea 0(%rip), %r17 -> mov 0(%rip), %r17\n    case 0x488d15: return 0x488b15; // lea 0(%rip), %r18 -> mov 0(%rip), %r18\n    case 0x488d1d: return 0x488b1d; // lea 0(%rip), %r19 -> mov 0(%rip), %r19\n    case 0x488d25: return 0x488b25; // lea 0(%rip), %r20 -> mov 0(%rip), %r20\n    case 0x488d2d: return 0x488b2d; // lea 0(%rip), %r21 -> mov 0(%rip), %r21\n    case 0x488d35: return 0x488b35; // lea 0(%rip), %r22 -> mov 0(%rip), %r22\n    case 0x488d3d: return 0x488b3d; // lea 0(%rip), %r23 -> mov 0(%rip), %r23\n    case 0x4c8d05: return 0x4c8b05; // lea 0(%rip), %r24 -> mov 0(%rip), %r24\n    case 0x4c8d0d: return 0x4c8b0d; // lea 0(%rip), %r25 -> mov 0(%rip), %r25\n    case 0x4c8d15: return 0x4c8b15; // lea 0(%rip), %r26 -> mov 0(%rip), %r26\n    case 0x4c8d1d: return 0x4c8b1d; // lea 0(%rip), %r27 -> mov 0(%rip), %r27\n    case 0x4c8d25: return 0x4c8b25; // lea 0(%rip), %r28 -> mov 0(%rip), %r28\n    case 0x4c8d2d: return 0x4c8b2d; // lea 0(%rip), %r29 -> mov 0(%rip), %r29\n    case 0x4c8d35: return 0x4c8b35; // lea 0(%rip), %r30 -> mov 0(%rip), %r30\n    case 0x4c8d3d: return 0x4c8b3d; // lea 0(%rip), %r31 -> mov 0(%rip), %r31\n    }\n  }\n  return 0;\n}\n\nstatic u32 relax_tlsdesc_to_le(u8 *loc, const ElfRel<E> &rel) {\n  if (rel.r_type == R_X86_64_GOTPC32_TLSDESC) {\n    switch ((loc[-3] << 16) | (loc[-2] << 8) | loc[-1]) {\n    case 0x488d05: return 0x48c7c0; // lea 0(%rip), %rax -> mov $0, %rax\n    case 0x488d0d: return 0x48c7c1; // lea 0(%rip), %rcx -> mov $0, %rcx\n    case 0x488d15: return 0x48c7c2; // lea 0(%rip), %rdx -> mov $0, %rdx\n    case 0x488d1d: return 0x48c7c3; // lea 0(%rip), %rbx -> mov $0, %rbx\n    case 0x488d25: return 0x48c7c4; // lea 0(%rip), %rsp -> mov $0, %rsp\n    case 0x488d2d: return 0x48c7c5; // lea 0(%rip), %rbp -> mov $0, %rbp\n    case 0x488d35: return 0x48c7c6; // lea 0(%rip), %rsi -> mov $0, %rsi\n    case 0x488d3d: return 0x48c7c7; // lea 0(%rip), %rdi -> mov $0, %rdi\n    case 0x4c8d05: return 0x49c7c0; // lea 0(%rip), %r8  -> mov $0, %r8\n    case 0x4c8d0d: return 0x49c7c1; // lea 0(%rip), %r9  -> mov $0, %r9\n    case 0x4c8d15: return 0x49c7c2; // lea 0(%rip), %r10 -> mov $0, %r10\n    case 0x4c8d1d: return 0x49c7c3; // lea 0(%rip), %r11 -> mov $0, %r11\n    case 0x4c8d25: return 0x49c7c4; // lea 0(%rip), %r12 -> mov $0, %r12\n    case 0x4c8d2d: return 0x49c7c5; // lea 0(%rip), %r13 -> mov $0, %r13\n    case 0x4c8d35: return 0x49c7c6; // lea 0(%rip), %r14 -> mov $0, %r14\n    case 0x4c8d3d: return 0x49c7c7; // lea 0(%rip), %r15 -> mov $0, %r15\n    }\n  } else {\n    assert(rel.r_type == R_X86_64_CODE_4_GOTPC32_TLSDESC);\n    switch ((loc[-3] << 16) | (loc[-2] << 8) | loc[-1]) {\n    case 0x488d05: return 0x18c7c0; // lea 0(%rip), %r16 -> mov $0, %r16\n    case 0x488d0d: return 0x18c7c1; // lea 0(%rip), %r17 -> mov $0, %r17\n    case 0x488d15: return 0x18c7c2; // lea 0(%rip), %r18 -> mov $0, %r18\n    case 0x488d1d: return 0x18c7c3; // lea 0(%rip), %r19 -> mov $0, %r19\n    case 0x488d25: return 0x18c7c4; // lea 0(%rip), %r20 -> mov $0, %r20\n    case 0x488d2d: return 0x18c7c5; // lea 0(%rip), %r21 -> mov $0, %r21\n    case 0x488d35: return 0x18c7c6; // lea 0(%rip), %r22 -> mov $0, %r22\n    case 0x488d3d: return 0x18c7c7; // lea 0(%rip), %r23 -> mov $0, %r23\n    case 0x4c8d05: return 0x19c7c0; // lea 0(%rip), %r24 -> mov $0, %r24\n    case 0x4c8d0d: return 0x19c7c1; // lea 0(%rip), %r25 -> mov $0, %r25\n    case 0x4c8d15: return 0x19c7c2; // lea 0(%rip), %r26 -> mov $0, %r26\n    case 0x4c8d1d: return 0x19c7c3; // lea 0(%rip), %r27 -> mov $0, %r27\n    case 0x4c8d25: return 0x19c7c4; // lea 0(%rip), %r28 -> mov $0, %r28\n    case 0x4c8d2d: return 0x19c7c5; // lea 0(%rip), %r29 -> mov $0, %r29\n    case 0x4c8d35: return 0x19c7c6; // lea 0(%rip), %r30 -> mov $0, %r30\n    case 0x4c8d3d: return 0x19c7c7; // lea 0(%rip), %r31 -> mov $0, %r31\n    }\n  }\n  return 0;\n}\n\n// Rewrite a function call to __tls_get_addr to a cheaper instruction\n// sequence. We can do this when we know the thread-local variable's TP-\n// relative address at link-time.\nstatic void relax_gd_to_le(u8 *loc, const ElfRel<E> &rel, u64 val) {\n  switch (rel.r_type) {\n  case R_X86_64_PLT32:\n  case R_X86_64_PC32:\n  case R_X86_64_GOTPCREL:\n  case R_X86_64_GOTPCRELX: {\n    // The original instructions are the following:\n    //\n    //  66 48 8d 3d 00 00 00 00    lea  foo@tlsgd(%rip), %rdi\n    //  66 66 48 e8 00 00 00 00    call __tls_get_addr\n    //\n    // or\n    //\n    //  66 48 8d 3d 00 00 00 00    lea foo@tlsgd(%rip), %rdi\n    //  66 48 ff 15 00 00 00 00    call *__tls_get_addr@GOT(%rip)\n    static const u8 insn[] = {\n      0x64, 0x48, 0x8b, 0x04, 0x25, 0, 0, 0, 0, // mov %fs:0, %rax\n      0x48, 0x81, 0xc0, 0, 0, 0, 0,             // add $tp_offset, %rax\n    };\n    memcpy(loc - 4, insn, sizeof(insn));\n    *(ul32 *)(loc + 8) = val;\n    break;\n  }\n  case R_X86_64_PLTOFF64: {\n    // The original instructions are the following:\n    //\n    //  48 8d 3d 00 00 00 00           lea    foo@tlsgd(%rip), %rdi\n    //  48 b8 00 00 00 00 00 00 00 00  movabs __tls_get_addr, %rax\n    //  48 01 d8                       add    %rbx, %rax\n    //  ff d0                          call   *%rax\n    static const u8 insn[] = {\n      0x64, 0x48, 0x8b, 0x04, 0x25, 0, 0, 0, 0, // mov %fs:0, %rax\n      0x48, 0x81, 0xc0, 0, 0, 0, 0,             // add $tp_offset, %rax\n      0x66, 0x0f, 0x1f, 0x44, 0x00, 0x00,       // nop\n    };\n    memcpy(loc - 3, insn, sizeof(insn));\n    *(ul32 *)(loc + 9) = val;\n    break;\n  }\n  default:\n    unreachable();\n  }\n}\n\nstatic void relax_gd_to_ie(u8 *loc, const ElfRel<E> &rel, u64 val) {\n  switch (rel.r_type) {\n  case R_X86_64_PLT32:\n  case R_X86_64_PC32:\n  case R_X86_64_GOTPCREL:\n  case R_X86_64_GOTPCRELX: {\n    static const u8 insn[] = {\n      0x64, 0x48, 0x8b, 0x04, 0x25, 0, 0, 0, 0, // mov %fs:0, %rax\n      0x48, 0x03, 0x05, 0, 0, 0, 0,             // add foo@gottpoff(%rip), %rax\n    };\n    memcpy(loc - 4, insn, sizeof(insn));\n    *(ul32 *)(loc + 8) = val - 12;\n    break;\n  }\n  case R_X86_64_PLTOFF64: {\n    static const u8 insn[] = {\n      0x64, 0x48, 0x8b, 0x04, 0x25, 0, 0, 0, 0, // mov %fs:0, %rax\n      0x48, 0x03, 0x05, 0, 0, 0, 0,             // add foo@gottpoff(%rip), %rax\n      0x66, 0x0f, 0x1f, 0x44, 0x00, 0x00,       // nop\n    };\n    memcpy(loc - 3, insn, sizeof(insn));\n    *(ul32 *)(loc + 9) = val - 13;\n    break;\n  }\n  default:\n    unreachable();\n  }\n}\n\n// Rewrite a function call to __tls_get_addr to a cheaper instruction\n// sequence. The difference from relax_gd_to_le is that we are materializing\n// the address of the beginning of TLS block instead of an address of a\n// particular thread-local variable.\nstatic void relax_ld_to_le(u8 *loc, const ElfRel<E> &rel, i64 tls_size) {\n  switch (rel.r_type) {\n  case R_X86_64_PLT32:\n  case R_X86_64_PC32: {\n    // The original instructions are the following:\n    //\n    //  48 8d 3d 00 00 00 00    lea    foo@tlsld(%rip), %rdi\n    //  e8 00 00 00 00          call   __tls_get_addr\n    //\n    // Because the original instruction sequence is so short that we need a\n    // little bit of code golfing here. \"mov %fs:0, %rax\" is 9 byte long, so\n    // xor + mov is shorter. Note that `xor %eax, %eax` zero-clears %eax.\n    static const u8 insn[] = {\n      0x31, 0xc0,                   // xor %eax, %eax\n      0x64, 0x48, 0x8b, 0x00,       // mov %fs:(%rax), %rax\n      0x48, 0x2d, 0, 0, 0, 0,       // sub $tls_size, %rax\n    };\n    memcpy(loc - 3, insn, sizeof(insn));\n    *(ul32 *)(loc + 5) = tls_size;\n    break;\n  }\n  case R_X86_64_GOTPCREL:\n  case R_X86_64_GOTPCRELX: {\n    // The original instructions are the following:\n    //\n    //  48 8d 3d 00 00 00 00    lea    foo@tlsld(%rip), %rdi\n    //  ff 15 00 00 00 00       call   *__tls_get_addr@GOT(%rip)\n    static const u8 insn[] = {\n      0x48, 0x31, 0xc0,             // xor %rax, %rax\n      0x64, 0x48, 0x8b, 0x00,       // mov %fs:(%rax), %rax\n      0x48, 0x2d, 0, 0, 0, 0,       // sub $tls_size, %rax\n    };\n    memcpy(loc - 3, insn, sizeof(insn));\n    *(ul32 *)(loc + 6) = tls_size;\n    break;\n  }\n  case R_X86_64_PLTOFF64: {\n    // The original instructions are the following:\n    //\n    //  48 8d 3d 00 00 00 00           lea    foo@tlsld(%rip), %rdi\n    //  48 b8 00 00 00 00 00 00 00 00  movabs __tls_get_addr@GOTOFF, %rax\n    //  48 01 d8                       add    %rbx, %rax\n    //  ff d0                          call   *%rax\n    static const u8 insn[] = {\n      0x64, 0x48, 0x8b, 0x04, 0x25, 0, 0, 0, 0, // mov %fs:0, %rax\n      0x48, 0x2d, 0, 0, 0, 0,                   // sub $tls_size, %rax\n      0x0f, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00, // nop\n    };\n    memcpy(loc - 3, insn, sizeof(insn));\n    *(ul32 *)(loc + 8) = tls_size;\n    break;\n  }\n  default:\n    unreachable();\n  }\n}\n\n// Apply relocations to SHF_ALLOC sections (i.e. sections that are\n// mapped to memory at runtime) based on the result of\n// scan_relocations().\ntemplate <>\nvoid InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE)\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    u64 S = sym.get_addr(ctx);\n    u64 A = rel.r_addend;\n    u64 P = get_addr() + rel.r_offset;\n    u64 G = sym.get_got_addr(ctx) - ctx.gotplt->shdr.sh_addr;\n    u64 GOT = ctx.gotplt->shdr.sh_addr;\n\n    auto check = [&](i64 val, i64 lo, i64 hi) {\n      check_range(ctx, i, val, lo, hi);\n    };\n\n    auto write32 = [&](u64 val) {\n      check(val, 0, 1LL << 32);\n      *(ul32 *)loc = val;\n    };\n\n    auto write32s = [&](u64 val) {\n      check(val, -(1LL << 31), 1LL << 31);\n      *(ul32 *)loc = val;\n    };\n\n    switch (rel.r_type) {\n    case R_X86_64_8:\n      check(S + A, 0, 1 << 8);\n      *loc = S + A;\n      break;\n    case R_X86_64_16:\n      check(S + A, 0, 1 << 16);\n      *(ul16 *)loc = S + A;\n      break;\n    case R_X86_64_32:\n      write32(S + A);\n      break;\n    case R_X86_64_32S:\n      write32s(S + A);\n      break;\n    case R_X86_64_64:\n      break;\n    case R_X86_64_PC8:\n      check(S + A - P, -(1 << 7), 1 << 7);\n      *loc = S + A - P;\n      break;\n    case R_X86_64_PC16:\n      check(S + A - P, -(1 << 15), 1 << 15);\n      *(ul16 *)loc = S + A - P;\n      break;\n    case R_X86_64_PC32:\n    case R_X86_64_PLT32:\n      write32s(S + A - P);\n      break;\n    case R_X86_64_PC64:\n      *(ul64 *)loc = S + A - P;\n      break;\n    case R_X86_64_GOT32:\n      write32(G + A);\n      break;\n    case R_X86_64_GOT64:\n      *(ul64 *)loc = G + A;\n      break;\n    case R_X86_64_GOTOFF64:\n    case R_X86_64_PLTOFF64:\n      *(ul64 *)loc = S + A - GOT;\n      break;\n    case R_X86_64_GOTPC32:\n      write32s(GOT + A - P);\n      break;\n    case R_X86_64_GOTPC64:\n      *(ul64 *)loc = GOT + A - P;\n      break;\n    case R_X86_64_GOTPCREL:\n      write32s(G + GOT + A - P);\n      break;\n    case R_X86_64_GOTPCREL64:\n      *(ul64 *)loc = G + GOT + A - P;\n      break;\n    case R_X86_64_GOTPCRELX:\n    case R_X86_64_REX_GOTPCRELX:\n    case R_X86_64_CODE_4_GOTPCRELX:\n      // We always want to relax GOTPCRELX relocs even if --no-relax\n      // was given because some static PIE runtime code depends on these\n      // relaxations.\n      if (sym.is_pcrel_linktime_const(ctx) && is_int(S + A - P, 32)) {\n        if (u32 insn = relax_gotpcrelx(loc, rel)) {\n          loc[-2] = insn >> 8;\n          loc[-1] = insn;\n          *(ul32 *)loc = S + A - P;\n          break;\n        }\n      }\n      write32s(G + GOT + A - P);\n      break;\n    case R_X86_64_TLSGD:\n      if (sym.has_tlsgd(ctx))\n        write32s(sym.get_tlsgd_addr(ctx) + A - P);\n      else if (sym.has_gottp(ctx))\n        relax_gd_to_ie(loc, rels[++i], sym.get_gottp_addr(ctx) - P);\n      else\n        relax_gd_to_le(loc, rels[++i], S - ctx.tp_addr);\n      break;\n    case R_X86_64_TLSLD:\n      if (ctx.got->has_tlsld(ctx))\n        write32s(ctx.got->get_tlsld_addr(ctx) + A - P);\n      else\n        relax_ld_to_le(loc, rels[++i], ctx.tp_addr - ctx.tls_begin);\n      break;\n    case R_X86_64_DTPOFF32:\n      write32s(S + A - ctx.dtp_addr);\n      break;\n    case R_X86_64_DTPOFF64:\n      *(ul64 *)loc = S + A - ctx.dtp_addr;\n      break;\n    case R_X86_64_TPOFF32:\n      write32s(S + A - ctx.tp_addr);\n      break;\n    case R_X86_64_TPOFF64:\n      *(ul64 *)loc = S + A - ctx.tp_addr;\n      break;\n    case R_X86_64_GOTTPOFF:\n    case R_X86_64_CODE_4_GOTTPOFF:\n      if (sym.has_gottp(ctx)) {\n        write32s(sym.get_gottp_addr(ctx) + A - P);\n      } else {\n        u32 insn = relax_gottpoff(loc, rel);\n        loc[-3] = insn >> 16;\n        loc[-2] = insn >> 8;\n        loc[-1] = insn;\n        write32s(S - ctx.tp_addr);\n      }\n      break;\n    case R_X86_64_CODE_6_GOTTPOFF:\n      write32s(sym.get_gottp_addr(ctx) + A - P);\n      break;\n    case R_X86_64_GOTPC32_TLSDESC:\n    case R_X86_64_CODE_4_GOTPC32_TLSDESC:\n      // x86-64 TLSDESC uses the following code sequence to materialize\n      // a TP-relative address in %rax.\n      //\n      //   lea    0(%rip), %rax\n      //       R_X86_64_GOTPC32_TLSDESC    foo\n      //   call   *(%rax)\n      //       R_X86_64_TLSDESC_CALL       foo\n      //\n      // We may relax the instructions to the following if its TP-relative\n      // address is known at link-time\n      //\n      //   mov     $foo@TPOFF, %rax\n      //   nop\n      //\n      // or to the following if the TP-relative address is known at\n      // process startup time.\n      //\n      //   mov     foo@GOTTPOFF(%rip), %rax\n      //   nop\n      //\n      // We allow the following alternative code sequence too because\n      // LLVM emits such code.\n      //\n      //   lea    0(%rip), %reg\n      //       R_X86_64_GOTPC32_TLSDESC    foo\n      //   mov    %reg, %rax\n      //   call   *(%rax)\n      //       R_X86_64_TLSDESC_CALL       foo\n      if (sym.has_tlsdesc(ctx)) {\n        write32s(sym.get_tlsdesc_addr(ctx) + A - P);\n      } else if (sym.has_gottp(ctx)) {\n        u32 insn = relax_tlsdesc_to_ie(loc, rel);\n        if (!insn)\n          Fatal(ctx) << *this << \": illegal instruction sequence for \" << rel;\n        loc[-3] = insn >> 16;\n        loc[-2] = insn >> 8;\n        loc[-1] = insn;\n        write32s(sym.get_gottp_addr(ctx) + A - P);\n      } else {\n        u32 insn = relax_tlsdesc_to_le(loc, rel);\n        if (!insn)\n          Fatal(ctx) << *this << \": illegal instruction sequence for \" << rel;\n        loc[-3] = insn >> 16;\n        loc[-2] = insn >> 8;\n        loc[-1] = insn;\n        write32s(S - ctx.tp_addr);\n      }\n      break;\n    case R_X86_64_TLSDESC_CALL:\n      if (!sym.has_tlsdesc(ctx)) {\n        // call *(%rax) -> nop\n        loc[0] = 0x66;\n        loc[1] = 0x90;\n      }\n      break;\n    case R_X86_64_SIZE32:\n      write32(sym.esym().st_size + A);\n      break;\n    case R_X86_64_SIZE64:\n      *(ul64 *)loc = sym.esym().st_size + A;\n      break;\n    default:\n      unreachable();\n    }\n  }\n}\n\n// This function is responsible for applying relocations against\n// non-SHF_ALLOC sections (i.e. sections that are not mapped to memory\n// at runtime).\n//\n// Relocations against non-SHF_ALLOC sections are much easier to\n// handle than that against SHF_ALLOC sections. It is because, since\n// they are not mapped to memory, they don't contain any variable or\n// function and never need PLT or GOT. Non-SHF_ALLOC sections are\n// mostly debug info sections.\n//\n// Relocations against non-SHF_ALLOC sections are not scanned by\n// scan_relocations.\ntemplate <>\nvoid InputSection<E>::apply_reloc_nonalloc(Context<E> &ctx, u8 *base) {\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = base + rel.r_offset;\n\n    SectionFragment<E> *frag;\n    i64 frag_addend;\n    std::tie(frag, frag_addend) = get_fragment(ctx, rel);\n\n    u64 S = frag ? frag->get_addr(ctx) : sym.get_addr(ctx);\n    u64 A = frag ? frag_addend : (i64)rel.r_addend;\n\n    auto check = [&](i64 val, i64 lo, i64 hi) {\n      check_range(ctx, i, val, lo, hi);\n    };\n\n    auto write32 = [&](u64 val) {\n      check(val, 0, 1LL << 32);\n      *(ul32 *)loc = val;\n    };\n\n    auto write32s = [&](u64 val) {\n      check(val, -(1LL << 31), 1LL << 31);\n      *(ul32 *)loc = val;\n    };\n\n    switch (rel.r_type) {\n    case R_X86_64_8:\n      check(S + A, 0, 1 << 8);\n      *loc = S + A;\n      break;\n    case R_X86_64_16:\n      check(S + A, 0, 1 << 16);\n      *(ul16 *)loc = S + A;\n      break;\n    case R_X86_64_32:\n      write32(S + A);\n      break;\n    case R_X86_64_32S:\n      write32s(S + A);\n      break;\n    case R_X86_64_64:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(ul64 *)loc = *val;\n      else\n        *(ul64 *)loc = S + A;\n      break;\n    case R_X86_64_DTPOFF32:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(ul32 *)loc = *val;\n      else\n        write32s(S + A - ctx.dtp_addr);\n      break;\n    case R_X86_64_DTPOFF64:\n      if (std::optional<u64> val = get_tombstone(sym, frag))\n        *(ul64 *)loc = *val;\n      else\n        *(ul64 *)loc = S + A - ctx.dtp_addr;\n      break;\n    case R_X86_64_GOTOFF64:\n      *(ul64 *)loc = S + A - ctx.gotplt->shdr.sh_addr;\n      break;\n    case R_X86_64_GOTPC64:\n      // PC-relative relocation doesn't make sense for non-memory-allocated\n      // section, but GCC 6.3.0 seems to create this reloc for\n      // _GLOBAL_OFFSET_TABLE_.\n      *(ul64 *)loc = ctx.gotplt->shdr.sh_addr + A;\n      break;\n    case R_X86_64_SIZE32:\n      write32(sym.esym().st_size + A);\n      break;\n    case R_X86_64_SIZE64:\n      *(ul64 *)loc = sym.esym().st_size + A;\n      break;\n    default:\n      Fatal(ctx) << *this << \": invalid relocation for non-allocated sections: \"\n                 << rel;\n      break;\n    }\n  }\n}\n\n// Linker has to create data structures in an output file to apply\n// some type of relocations. For example, if a relocation refers a GOT\n// or a PLT entry of a symbol, linker has to create an entry in .got\n// or in .plt for that symbol. In order to fix the file layout, we\n// need to scan relocations.\ntemplate <>\nvoid InputSection<E>::scan_relocations(Context<E> &ctx) {\n  assert(shdr().sh_flags & SHF_ALLOC);\n  std::span<const ElfRel<E>> rels = get_rels(ctx);\n\n  // Scan relocations\n  for (i64 i = 0; i < rels.size(); i++) {\n    const ElfRel<E> &rel = rels[i];\n    if (rel.r_type == R_NONE || record_undef_error(ctx, rel))\n      continue;\n\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    u8 *loc = (u8 *)(contents.data() + rel.r_offset);\n\n    if (sym.is_ifunc())\n      sym.flags |= NEEDS_GOT | NEEDS_PLT;\n\n    if (rel.r_type == R_X86_64_TLSGD || rel.r_type == R_X86_64_TLSLD) {\n      if (i + 1 == rels.size())\n        Fatal(ctx) << *this << \": \" << rel\n                   << \" must be followed by PLT or GOTPCREL\";\n\n      if (u32 ty = rels[i + 1].r_type;\n          ty != R_X86_64_PLT32 && ty != R_X86_64_PC32 &&\n          ty != R_X86_64_PLTOFF64 && ty != R_X86_64_GOTPCREL &&\n          ty != R_X86_64_GOTPCRELX)\n        Fatal(ctx) << *this << \": \" << rel\n                   << \" must be followed by PLT or GOTPCREL\";\n    }\n\n    switch (rel.r_type) {\n    case R_X86_64_8:\n    case R_X86_64_16:\n    case R_X86_64_32:\n    case R_X86_64_32S:\n      scan_absrel(ctx, sym, rel);\n      break;\n    case R_X86_64_PC8:\n    case R_X86_64_PC16:\n    case R_X86_64_PC32:\n    case R_X86_64_PC64:\n      scan_pcrel(ctx, sym, rel);\n      break;\n    case R_X86_64_GOT32:\n    case R_X86_64_GOT64:\n    case R_X86_64_GOTPC32:\n    case R_X86_64_GOTPC64:\n    case R_X86_64_GOTPCREL:\n    case R_X86_64_GOTPCREL64:\n    case R_X86_64_GOTPCRELX:\n    case R_X86_64_REX_GOTPCRELX:\n    case R_X86_64_CODE_4_GOTPCRELX:\n      sym.flags |= NEEDS_GOT;\n      break;\n    case R_X86_64_PLT32:\n    case R_X86_64_PLTOFF64:\n      if (sym.is_imported)\n        sym.flags |= NEEDS_PLT;\n      break;\n    case R_X86_64_TLSGD:\n      if (ctx.arg.static_ || (ctx.arg.relax && sym.is_tprel_linktime_const(ctx))) {\n        // We always relax if -static because libc.a doesn't contain\n        // __tls_get_addr().\n        i++;\n      } else if (ctx.arg.relax && sym.is_tprel_runtime_const(ctx)) {\n        sym.flags |= NEEDS_GOTTP;\n        i++;\n      } else {\n        sym.flags |= NEEDS_TLSGD;\n      }\n      break;\n    case R_X86_64_TLSLD:\n      // We always relax if -static because libc.a doesn't contain\n      // __tls_get_addr().\n      if (ctx.arg.static_ || (ctx.arg.relax && !ctx.arg.shared))\n        i++;\n      else\n        ctx.needs_tlsld = true;\n      break;\n    case R_X86_64_GOTTPOFF:\n    case R_X86_64_CODE_4_GOTTPOFF:\n      if (!ctx.arg.relax || !sym.is_tprel_linktime_const(ctx) ||\n          !relax_gottpoff(loc, rel))\n        sym.flags |= NEEDS_GOTTP;\n      break;\n    case R_X86_64_CODE_6_GOTTPOFF:\n      sym.flags |= NEEDS_GOTTP;\n      break;\n    case R_X86_64_TLSDESC_CALL:\n      scan_tlsdesc(ctx, sym);\n      break;\n    case R_X86_64_TPOFF32:\n    case R_X86_64_TPOFF64:\n      check_tlsle(ctx, sym, rel);\n      break;\n    case R_X86_64_64:\n    case R_X86_64_GOTOFF64:\n    case R_X86_64_DTPOFF32:\n    case R_X86_64_DTPOFF64:\n    case R_X86_64_SIZE32:\n    case R_X86_64_SIZE64:\n    case R_X86_64_GOTPC32_TLSDESC:\n    case R_X86_64_CODE_4_GOTPC32_TLSDESC:\n      break;\n    default:\n      Error(ctx) << *this << \": unknown relocation: \" << rel;\n    }\n  }\n}\n\n// Intel CET is a relatively new CPU feature to enhance security by\n// protecting control flow integrity. If the feature is enabled, indirect\n// branches (i.e. branch instructions that take a register instead of an\n// immediate) must land on a \"landing pad\" instruction, or a CPU-level fault\n// will raise. That prevents an attacker to branch to a middle of a random\n// function, making ROP or JOP much harder to conduct.\n//\n// On x86-64, the landing pad instruction is ENDBR64. That is actually a\n// repurposed NOP instruction to provide binary compatibility with older\n// hardware that doesn't support CET.\n//\n// The problem here is that the compiler always emits a landing pad at the\n// beginning fo a global function because it doesn't know whether or not the\n// function's address is taken in other translation units. As a result, the\n// resulting binary contains more landing pads than necessary.\n//\n// This function rewrites a landing pad with a nop if the function's address\n// was not actually taken. We can do what the compiler cannot because we\n// know about all translation units.\nvoid rewrite_endbr(Context<E> &ctx) {\n  Timer t(ctx, \"rewrite_endbr\");\n\n  constexpr u8 endbr64[] = {0xf3, 0x0f, 0x1e, 0xfa};\n  constexpr u8 nop[] = {0x0f, 0x1f, 0x40, 0x00};\n\n  // Rewrite all endbr64 instructions referred to by function symbols with\n  // NOPs. We handle only global symbols because the compiler doesn't emit\n  // an endbr64 for a file-scoped function in the first place if its address\n  // is not taken within the file.\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    for (Symbol<E> *sym : file->get_global_syms()) {\n      if (sym->file == file && sym->esym().st_type == STT_FUNC) {\n        if (InputSection<E> *isec = sym->get_input_section();\n            isec && (isec->shdr().sh_flags & SHF_EXECINSTR)) {\n          if (OutputSection<E> *osec = isec->output_section) {\n            u8 *buf = ctx.buf + osec->shdr.sh_offset + isec->offset + sym->value;\n            if (memcmp(buf, endbr64, 4) == 0)\n              memcpy(buf, nop, 4);\n          }\n        }\n      }\n    }\n  });\n\n  auto write_back = [&](InputSection<E> *isec, i64 offset) {\n    // If isec has an endbr64 at a given offset, copy that instruction to\n    // the output buffer, possibly overwriting a nop written in the above\n    // loop.\n    if (isec && isec->output_section &&\n        (isec->shdr().sh_flags & SHF_EXECINSTR) &&\n        0 <= offset && offset <= isec->contents.size() - 4 &&\n        memcmp(isec->contents.data() + offset, endbr64, 4) == 0)\n      memcpy(ctx.buf + isec->output_section->shdr.sh_offset + isec->offset + offset,\n             endbr64, 4);\n  };\n\n  // Write back endbr64 instructions if they are referred to by address-taking\n  // relocations.\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    for (std::unique_ptr<InputSection<E>> &isec : file->sections) {\n      if (isec && isec->is_alive && (isec->shdr().sh_flags & SHF_ALLOC)) {\n        for (const ElfRel<E> &rel : isec->get_rels(ctx)) {\n          if (!is_func_call_rel(rel)) {\n            Symbol<E> *sym = file->symbols[rel.r_sym];\n            if (sym->esym().st_type == STT_SECTION)\n              write_back(sym->get_input_section(), rel.r_addend);\n            else\n              write_back(sym->get_input_section(), sym->value);\n          }\n        }\n      }\n    }\n  });\n\n  // We record addresses of some symbols in the ELF header, .dynamic or in\n  // .dynsym. We need to retain endbr64s for such symbols.\n  auto keep = [&](Symbol<E> *sym) {\n    if (sym)\n      write_back(sym->get_input_section(), sym->value);\n  };\n\n  keep(ctx.arg.entry);\n  keep(ctx.arg.init);\n  keep(ctx.arg.fini);\n\n  if (ctx.dynsym)\n    for (Symbol<E> *sym : ctx.dynsym->symbols)\n      if (sym && sym->is_exported)\n        keep(sym);\n}\n\n} // namespace mold\n\n#endif\n"
  },
  {
    "path": "src/archive-file.cc",
    "content": "// This file contains functions to read an archive file (.a file).\n// An archive file is just a bundle of object files. It's similar to\n// tar or zip, but the contents are not compressed.\n//\n// An archive file is either \"regular\" or \"thin\". A regular archive\n// contains object files directly, while a thin archive contains only\n// pathnames. In the latter case, actual file contents have to be read\n// from given pathnames. A regular archive is sometimes called \"fat\"\n// archive as opposed to \"thin\".\n//\n// If an archive file is given to the linker, the linker pulls out\n// object files that are needed to resolve undefined symbols. So,\n// bunding object files as an archive and giving that archive to the\n// linker has a different meaning than directly giving the same set of\n// object files to the linker. The former links only needed object\n// files, while the latter links all the given object files.\n//\n// Therefore, if you link libc.a for example, not all the libc\n// functions are linked to your binary. Instead, only object files\n// that provides functions and variables used in your program get\n// linked. To make this efficient, static library functions are\n// usually separated to each object file in an archive file. You can\n// see the contents of libc.a by running `ar t\n// /usr/lib/x86_64-linux-gnu/libc.a`.\n\n#include \"mold.h\"\n\nnamespace mold {\n\nnamespace {\nstruct ArHdr {\n  char ar_name[16];\n  char ar_date[12];\n  char ar_uid[6];\n  char ar_gid[6];\n  char ar_mode[8];\n  char ar_size[10];\n  char ar_fmag[2];\n\n  bool starts_with(std::string_view s) const {\n    return std::string_view(ar_name, s.size()) == s;\n  }\n\n  bool is_strtab() const {\n    return starts_with(\"// \");\n  }\n\n  bool is_symtab() const {\n    return starts_with(\"/ \") || starts_with(\"/SYM64/ \");\n  }\n\n  std::string read_name(std::string_view strtab, u8 *&ptr) const {\n    // BSD-style long filename\n    if (starts_with(\"#1/\")) {\n      int namelen = atoi(ar_name + 3);\n      std::string name{(char *)ptr, (size_t)namelen};\n      ptr += namelen;\n\n      if (size_t pos = name.find('\\0'))\n        name = name.substr(0, pos);\n      return name;\n    }\n\n    // SysV-style long filename\n    if (starts_with(\"/\")) {\n      const char *start = strtab.data() + atoi(ar_name + 1);\n      return {start, (const char *)strstr(start, \"/\\n\")};\n    }\n\n    // Short fileanme\n    if (const char *end = (char *)memchr(ar_name, '/', sizeof(ar_name)))\n      return {ar_name, end};\n    return {ar_name, sizeof(ar_name)};\n  }\n};\n}\n\ntemplate <typename E>\nstd::vector<MappedFile *>\nread_thin_archive_members(Context<E> &ctx, MappedFile *mf) {\n  u8 *begin = mf->data;\n  u8 *data = begin + 8;\n  std::vector<MappedFile *> vec;\n  std::string_view strtab;\n\n  while (data < begin + mf->size) {\n    // Each header is aligned to a 2 byte boundary.\n    if ((begin - data) % 2)\n      data++;\n\n    ArHdr &hdr = *(ArHdr *)data;\n    u8 *body = data + sizeof(hdr);\n    u64 size = atol(hdr.ar_size);\n\n    // Read a string table.\n    if (hdr.is_strtab()) {\n      strtab = {(char *)body, (size_t)size};\n      data = body + size;\n      continue;\n    }\n\n    // Skip a symbol table.\n    if (hdr.is_symtab()) {\n      data = body + size;\n      continue;\n    }\n\n    if (!hdr.starts_with(\"#1/\") && !hdr.starts_with(\"/\"))\n      Fatal(ctx) << mf->name << \": filename is not stored as a long filename\";\n\n    std::string name = hdr.read_name(strtab, body);\n\n    // Skip if symbol table\n    if (name == \"__.SYMDEF\" || name == \"__.SYMDEF SORTED\")\n      continue;\n\n    std::string path = name.starts_with('/') ?\n      name : (path_dirname(mf->name) / name).string();\n    vec.push_back(must_open_file(ctx, path));\n    vec.back()->thin_parent = mf;\n    data = body;\n  }\n  return vec;\n}\n\ntemplate <typename E>\nstd::vector<MappedFile *>\nread_fat_archive_members(Context<E> &ctx, MappedFile *mf) {\n  u8 *begin = mf->data;\n  u8 *data = begin + 8;\n  std::vector<MappedFile *> vec;\n  std::string_view strtab;\n\n  while (begin + mf->size - data >= 2) {\n    if ((begin - data) % 2)\n      data++;\n\n    ArHdr &hdr = *(ArHdr *)data;\n    u8 *body = data + sizeof(hdr);\n    u64 size = atol(hdr.ar_size);\n    data = body + size;\n\n    // Read if string table\n    if (hdr.is_strtab()) {\n      strtab = {(char *)body, (size_t)size};\n      continue;\n    }\n\n    // Skip if symbol table\n    if (hdr.is_symtab())\n      continue;\n\n    // Read the name field\n    std::string name = hdr.read_name(strtab, body);\n\n    // Skip if symbol table\n    if (name == \"__.SYMDEF\" || name == \"__.SYMDEF SORTED\")\n      continue;\n\n    vec.push_back(mf->slice(ctx, name, body - begin, data - body));\n  }\n  return vec;\n}\n\ntemplate <typename E>\nstd::vector<MappedFile *>\nread_archive_members(Context<E> &ctx, MappedFile *mf) {\n  std::string_view str = mf->get_contents();\n\n  if (str.starts_with(\"!<arch>\\n\"))\n    return read_fat_archive_members(ctx, mf);\n\n  assert(str.starts_with(\"!<thin>\\n\"));\n  return read_thin_archive_members(ctx, mf);\n}\n\nusing E = MOLD_TARGET;\n\ntemplate std::vector<MappedFile *>\nread_thin_archive_members(Context<E> &, MappedFile *);\n\ntemplate std::vector<MappedFile *>\nread_fat_archive_members(Context<E> &, MappedFile *);\n\ntemplate std::vector<MappedFile *>\nread_archive_members(Context<E> &, MappedFile *);\n\n} // namespace mold\n"
  },
  {
    "path": "src/cmdline.cc",
    "content": "#include \"config.h\"\n#include \"mold.h\"\n\n#include <filesystem>\n#include <random>\n#include <regex>\n#include <sstream>\n#include <system_error>\n#include <tbb/global_control.h>\n#include <unordered_set>\n\n#if __has_include(<sys/utsname.h>)\n# include <sys/utsname.h>\n#endif\n\n#if __has_include(<unistd.h>)\n# include <unistd.h>\n#else\n# include <direct.h>\n# define isatty _isatty\n# define chdir _chdir\n# define STDERR_FILENO (_fileno(stderr))\n#endif\n\nnamespace mold {\n\nstatic const char helpmsg[] = R\"(\nOptions:\n  --help                      Report usage information\n  -v, --version               Report version information\n  -V                          Report version and target information\n  -(, --start-group           Ignored\n  -), --end-group             Ignored\n  -C DIR, --directory DIR     Change to DIR before doing anything\n  -E, --export-dynamic        Put symbols in the dynamic symbol table\n    --no-export-dynamic\n  -F LIBNAME, --filter LIBNAME\n                              Set DT_FILTER to the specified value\n  -I FILE, --dynamic-linker FILE\n                              Set dynamic linker path\n    --no-dynamic-linker\n  -L DIR, --library-path DIR  Add DIR to library search path\n  -M, --print-map             Write map file to stdout\n  -N, --omagic                Do not page align data; do not make text readonly\n    --no-omagic\n  -O NUMBER                   Ignored\n  -P AUDITLIB, --depaudit AUDITLIB\n                              Set DT_DEPAUDIT to the specified value\n  -S, --strip-debug           Strip .debug_* sections\n  -T FILE, --script FILE      Read linker script\n  -X, --discard-locals        Discard temporary local symbols\n  -e SYMBOL, --entry SYMBOL   Set program entry point\n  -f SHLIB, --auxiliary SHLIB Set DT_AUXILIARY to the specified value\n  -h LIBNAME, --soname LIBNAME\n                              Set shared library name\n  -l LIBNAME, --library LIBNAME\n                              Search for a given library\n  -m TARGET                   Set target\n  -o FILE, --output FILE      Set output filename\n  -q, --emit-relocs           Leaves relocation sections in the output\n  -r, --relocatable           Generate relocatable output\n  -s, --strip-all             Strip .symtab section\n  -u SYMBOL, --undefined SYMBOL\n                              Force to resolve SYMBOL\n  -y SYMBOL, --trace-symbol SYMBOL\n                              Trace references to SYMBOL\n  --Bdynamic, --dy            Link against shared libraries (default)\n  --Bstatic, --dn, --static   Do not link against shared libraries\n  --Bsymbolic                 Bind all symbols locally\n  --Bsymbolic-functions       Bind function symbols locally\n  --Bsymbolic-non-weak        Bind all but weak symbols locally\n  --Bsymbolic-non-weak-functions\n                              Bind all but weak function symbols locally\n  --Bno-symbolic              Cancel --Bsymbolic options\n  --Map FILE                  Write map file to a given file\n  --Tbss=ADDR                 Set address to .bss\n  --Tdata=ADDR                Set address to .data\n  --Ttext=ADDR                Set address to .text\n  --allow-multiple-definition Allow multiple definitions\n  --apply-dynamic-relocs      Apply link-time values for dynamic relocations (default)\n    --no-apply-dynamic-relocs\n  --as-needed                 Only set DT_NEEDED if used\n    --no-as-needed\n  --audit LIBNAME             Set DT_AUDIT to the specified value\n  --build-id [none,md5,sha1,sha256,fast,uuid,HEXSTRING]\n                              Generate build ID\n    --no-build-id\n  --chroot DIR                Set a given path to the root directory\n  --color-diagnostics=[auto,always,never]\n                              Use colors in diagnostics\n  --color-diagnostics         Alias for --color-diagnostics=always\n  --compress-debug-sections [none,zlib,zlib-gabi,zstd]\n                              Compress .debug_* sections\n  --dc                        Ignored\n  --dependency-file=FILE      Write Makefile-style dependency rules to FILE\n  --defsym=SYMBOL=VALUE       Define a symbol alias\n  --demangle                  Demangle C++ symbols in log messages (default)\n    --no-demangle\n  --detach                    Create separate debug info file in the background (default)\n    --no-detach\n  --enable-new-dtags          Emit DT_RUNPATH for --rpath (default)\n    --disable-new-dtags       Emit DT_RPATH for --rpath\n  --execute-only              Make executable segments unreadable\n  --dp                        Ignored\n  --dynamic-list=FILE         Read a list of dynamic symbols (implies -Bsymbolic)\n  --dynamic-list-data         Add data symbols to dynamic symbols\n  --eh-frame-hdr              Create .eh_frame_hdr section\n    --no-eh-frame-hdr\n  --exclude-libs LIB,LIB,..   Mark all symbols in given libraries as hidden\n  --export-dynamic-symbol     Put symbols matching glob in the dynamic symbol table\n  --export-dynamic-symbol-list=FILE\n                              Read a list of dynamic symbols\n  --fatal-warnings            Treat warnings as errors\n    --no-fatal-warnings       Do not treat warnings as errors (default)\n  --fini SYMBOL               Call SYMBOL at unload-time\n  --fork                      Spawn a child process (default)\n    --no-fork\n  --gc-sections               Remove unreferenced sections\n    --no-gc-sections\n  --gdb-index                 Create .gdb_index for faster gdb startup\n  --hash-style [sysv,gnu,both,none]\n                              Set hash style\n  --icf=[all,safe,none]       Fold identical code\n    --no-icf\n  --ignore-data-address-equality\n                              Allow merging non-executable sections with --icf\n  --image-base ADDR           Set the base address to a given value\n  --init SYMBOL               Call SYMBOL at load-time\n  --nmagic                    Do not page align sections\n    --no-nmagic\n  --no-undefined              Report undefined symbols (even with --shared)\n  --noinhibit-exec            Create an output file even if errors occur\n  --oformat=binary            Omit ELF, section, and program headers\n  --pack-dyn-relocs=[relr,none]\n                              Pack dynamic relocations\n  --package-metadata=PERCENT_ENCODED_STRING\n                              Set a given string to .note.package\n  --perf                      Print performance statistics\n  --pie, --pic-executable     Create a position-independent executable\n    --no-pie, --no-pic-executable\n  --pop-state                 Restore the state of flags governing input file handling\n  --print-gc-sections[=FILE]  Print, or save in FILE, removed unreferenced sections\n    --no-print-gc-sections\n  --print-icf-sections[=FILE] Print, or save in FILE, folded identical sections\n    --no-print-icf-sections\n  --push-state                Save the state of flags governing input file handling\n  --quick-exit                Use quick_exit to exit (default)\n    --no-quick-exit\n  --relax                     Optimize instructions (default)\n    --no-relax\n  --repro                     Embed input files in .repro section\n  --require-defined SYMBOL    Require SYMBOL be defined in the final output\n  --retain-symbols-file FILE  Keep only symbols listed in FILE\n  --reverse-sections          Reverse input sections in the output file\n  --rosegment                 Put read-only non-executable sections in their own segment (default)\n    --no-rosegment            Put read-only non-executable sections in an executable segment\n  --rpath DIR                 Add DIR to the runtime search path\n  --rpath-link DIR            Ignored\n  --run COMMAND ARG...        Run COMMAND with mold as /usr/bin/ld\n  --section-start=SECTION=ADDR Set address for section\n  --separate-debug-file[=FILE] Separate debug info to the specified file\n    --no-separate-debug-file\n  --shared, --Bshareable      Create a shared library\n  --shuffle-sections[=SEED]   Randomize the output by shuffling input sections\n  --sort-common               Ignored\n  --sort-section              Ignored\n  --spare-dynamic-tags NUMBER Reserve the given number of tags in the .dynamic section\n  --spare-program-headers NUMBER\n                              Reserve the given number of slots in the program header\n  --start-lib                 Give following object files in-archive-file semantics\n    --end-lib                 End the effect of --start-lib\n  --stats                     Print input statistics\n  --sysroot DIR               Set the target system root directory\n  --thread-count COUNT, --threads=COUNT\n                              Use COUNT number of threads\n  --threads                   Use multiple threads (default)\n    --no-threads\n  --trace                     Print the name of each input file\n  --undefined-glob PATTERN    Force to resolve all symbols that match a given pattern\n  --undefined-version         Do not report version scripts that refer to undefined symbols\n    --no-undefined-version    Report version scripts that refer to undefined symbols (default)\n  --unique PATTERN            Don't merge input sections that match a given pattern\n  --unresolved-symbols [report-all,ignore-all,ignore-in-object-files,ignore-in-shared-libs]\n                              Handle unresolved symbols\n  --version-script FILE       Read version script\n  --warn-common               Warn about common symbols\n    --no-warn-common\n  --warn-once                 Only warn once for each undefined symbol\n  --warn-shared-textrel       Warn if the output .so needs text relocations\n  --warn-textrel              Warn if the output file needs text relocations\n  --warn-unresolved-symbols   Report unresolved symbols as warnings\n    --error-unresolved-symbols\n                              Report unresolved symbols as errors (default)\n  --whole-archive             Include all objects from static archives\n    --no-whole-archive\n  --wrap SYMBOL               Use a wrapper function for a given symbol\n  --zero-to-bss               Convert all-zero data sections into BSS\n  -z defs                     Report undefined symbols (even with --shared)\n    -z nodefs\n  -z common-page-size=VALUE   Ignored\n  -z execstack                Require an executable stack\n    -z noexecstack\n  -z execstack-if-needed      Make the stack area executable if an input file explicitly requests it\n  -z initfirst                Mark DSO to be initialized first at runtime\n  -z interpose                Mark object to interpose all DSOs but the executable\n  -z keep-text-section-prefix Keep .text.{hot,unknown,unlikely,startup,exit} as separate sections in the final binary\n    -z nokeep-text-section-prefix\n  -z lazy                     Enable lazy function resolution (default)\n  -z max-page-size=VALUE      Use VALUE as the memory page size\n  -z nocopyreloc              Do not create copy relocations\n  -z nodefaultlib             Make the dynamic loader ignore default search paths\n  -z nodelete                 Mark DSO non-deletable at runtime\n  -z nodlopen                 Mark DSO not available to dlopen\n  -z nodump                   Mark DSO not available to dldump\n  -z now                      Disable lazy function resolution\n  -z origin                   Mark object requiring immediate $ORIGIN processing at runtime\n  -z pack-relative-relocs     Alias for --pack-dyn-relocs=relr\n    -z nopack-relative-relocs\n  -z sectionheader            Do not omit section header (default)\n    -z nosectionheader        Omit section header\n  -z start_stop_visibility=[hidden,protected]\n                              Specify symbol visibility for \"__start_SECNAME\" and \"__stop_SECNAME\" symbols\n  -z separate-loadable-segments\n                              Separate all loadable segments onto different pages\n    -z separate-code          Separate code and data onto different pages\n    -z noseparate-code        Allow overlap in pages\n  -z stack-size=VALUE         Set the size of the stack segment\n  -z relro                    Make some sections read-only after relocation (default)\n    -z norelro\n  -z rewrite-endbr            Rewrite indirect branch target instructions with NOPs\n    -z norewrite-endbr\n  -z rodynamic                Make the .dynamic section read-only\n  -z text                     Report error if DT_TEXTREL is set\n    -z notext\n    -z textoff\n\nmold: supported targets: elf32-i386 elf64-x86-64 elf32-littlearm elf64-littleaarch64 elf64-bigaarch64 elf32-littleriscv elf32-bigriscv elf64-littleriscv elf64-bigriscv elf32-powerpc elf64-powerpc elf64-powerpc elf64-powerpcle elf64-s390 elf64-sparc elf32-m68k elf32-sh-linux elf64-loongarch elf32-loongarch\nmold: supported emulations: elf_i386 elf_x86_64 armelf_linux_eabi aarch64elf aarch64linux aarch64elfb aarch64linuxb elf32lriscv elf32briscv elf64lriscv elf64briscv elf32ppc elf32ppclinux elf64ppc elf64lppc elf64_s390 elf64_sparc m68kelf shlelf_linux shelf_linux elf64loongarch elf32loongarch)\";\n\n// If a command line argument is in the form of `@path/to/some/file` (i.e.\n// it starts with an atsign), the linker reads the given file and\n// interprets its contents as a list of command line arguments. A file\n// containing command line arguments is called a \"response file\".\n//\n// A response file is often used to pass a very large number of arguments\n// to the linker without exceeding the kernel's command line length limit.\n//\n// This function opens a given file, tokenizes its contents, and returns a\n// list of tokens.\ntemplate <typename E>\nstatic std::vector<std::string_view>\nread_response_file(Context<E> &ctx, std::string_view path, i64 depth) {\n  if (depth > 10)\n    Fatal(ctx) << path << \": response file nesting too deep\";\n\n  MappedFile *mf = must_open_file(ctx, std::string(path));\n  mf->is_dependency = false;\n\n  std::vector<std::string> vec;\n  std::ostringstream os;\n  char quote = 0;\n\n  // Each state represents the type of characters currently being read.\n  // SPACE indicates blank characters between tokens, BARE indicates an\n  // unquoted token, and QUOTED indicates a quoted token.\n  enum { SPACE, BARE, QUOTED } state = SPACE;\n\n  for (i64 i = 0; i <= mf->size; i++) {\n    char c = (i < mf->size) ? mf->data[i] : 0;\n    char c2 = (i + 1 < mf->size) ? mf->data[i + 1] : 0;\n\n    if (c == '\\\\' && c2 == 0)\n      Fatal(ctx) << path << \": premature end of input\";\n\n    switch (state) {\n    case SPACE:\n      if (c == 0 || isspace(c))\n        break;\n\n      if (c == '\\\\') {\n        os << c2;\n        state = BARE;\n        i++;\n        break;\n      }\n\n      if (c == '\\'' || c == '\"') {\n        quote = c;\n        state = QUOTED;\n        break;\n      }\n\n      os << c;\n      state = BARE;\n      break;\n    case BARE:\n      if (c == 0 || isspace(c)) {\n        vec.push_back(os.str());\n        os = {};\n        state = SPACE;\n        break;\n      }\n\n      if (c == '\\\\') {\n        os << c2;\n        i++;\n        break;\n      }\n\n      if (c == '\\'' || c == '\"') {\n        quote = c;\n        state = QUOTED;\n        break;\n      }\n\n      os << c;\n      break;\n    case QUOTED:\n      if (c == 0)\n        Fatal(ctx) << path << \": premature end of input\";\n\n      if (c == '\\\\') {\n        os << c2;\n        i++;\n        break;\n      }\n\n      if (c == quote) {\n        state = BARE;\n        break;\n      }\n\n      os << c;\n      break;\n    }\n  }\n\n  std::vector<std::string_view> vec2;\n  for (std::string &tok : vec) {\n    if (tok.starts_with('@'))\n      append(vec2, read_response_file(ctx, tok.substr(1), depth + 1));\n    else\n      vec2.push_back(save_string(ctx, tok));\n  }\n  return vec2;\n}\n\n// Replace \"@path/to/some/text/file\" with its file contents.\ntemplate <typename E>\nstd::vector<std::string_view>\nexpand_response_files(Context<E> &ctx, char **argv) {\n  std::vector<std::string_view> vec;\n  for (i64 i = 0; argv[i]; i++) {\n    if (argv[i][0] == '@')\n      append(vec, read_response_file(ctx, argv[i] + 1, 1));\n    else\n      vec.push_back(argv[i]);\n  }\n  return vec;\n}\n\nstatic std::string_view string_trim(std::string_view str) {\n  size_t pos = str.find_first_not_of(\" \\t\");\n  if (pos == str.npos)\n    return \"\";\n  str = str.substr(pos);\n\n  pos = str.find_last_not_of(\" \\t\");\n  if (pos == str.npos)\n    return str;\n  return str.substr(0, pos + 1);\n}\n\nstatic std::vector<std::string> add_dashes(std::string name) {\n  // Single-letter option\n  if (name.size() == 1)\n    return {\"-\" + name};\n\n  // Multi-letter linker options can be preceded by either a single\n  // dash or double dashes except ones starting with \"o\", which must\n  // be preceded by double dashes. For example, \"-omagic\" is\n  // interpreted as \"-o magic\". If you really want to specify the\n  // \"omagic\" option, you have to pass \"--omagic\".\n  if (name[0] == 'o')\n    return {\"--\" + name};\n  return {\"-\" + name, \"--\" + name};\n}\n\ntemplate <typename E>\nstatic i64 parse_hex(Context<E> &ctx, std::string opt, std::string_view value) {\n  auto flags = std::regex_constants::optimize | std::regex_constants::ECMAScript;\n  static std::regex re(R\"((?:0x|0X)?([0-9a-fA-F]+))\", flags);\n\n  std::cmatch m;\n  if (!std::regex_match(value.data(), value.data() + value.size(), m, re))\n    Fatal(ctx) << \"option -\" << opt << \": not a hexadecimal number\";\n  return std::stoul(m[1], nullptr, 16);\n}\n\ntemplate <typename E>\nstatic i64 parse_number(Context<E> &ctx, std::string opt,\n                        std::string_view value) {\n  size_t nread;\n\n  if (value.starts_with('-')) {\n    i64 ret = std::stoul(std::string(value.substr(1)), &nread, 0);\n    if (value.size() - 1 != nread)\n      Fatal(ctx) << \"option -\" << opt << \": not a number: \" << value;\n    return -ret;\n  }\n\n  i64 ret = std::stoul(std::string(value), &nread, 0);\n  if (value.size() != nread)\n    Fatal(ctx) << \"option -\" << opt << \": not a number: \" << value;\n  return ret;\n}\n\nstatic char from_hex(char c) {\n  if ('0' <= c && c <= '9')\n    return c - '0';\n  if ('a' <= c && c <= 'f')\n    return c - 'a' + 10;\n  assert('A' <= c && c <= 'F');\n  return c - 'A' + 10;\n}\n\ntemplate <typename E>\nstatic std::vector<u8> parse_hex_build_id(Context<E> &ctx, std::string_view arg) {\n  auto flags = std::regex_constants::optimize | std::regex_constants::ECMAScript;\n  static std::regex re(R\"(0[xX]([0-9a-fA-F][0-9a-fA-F])+)\", flags);\n\n  if (!std::regex_match(arg.begin(), arg.end(), re))\n    Fatal(ctx) << \"invalid build-id: \" << arg;\n\n  std::vector<u8> vec;\n  for (i64 i = 2; i < arg.size(); i += 2)\n    vec.push_back((from_hex(arg[i]) << 4) | from_hex(arg[i + 1]));\n  return vec;\n}\n\ntemplate <typename E>\nstatic std::string\nparse_package_metadata(Context<E> &ctx, std::string_view arg) {\n  auto flags = std::regex_constants::optimize | std::regex_constants::ECMAScript;\n  static std::regex re(R\"(([^%]|%[0-9a-fA-F][0-9a-fA-F])*)\", flags);\n\n  if (!std::regex_match(arg.begin(), arg.end(), re))\n    Fatal(ctx) << \"--package-metadata: invalid string: \" << arg;\n\n  std::ostringstream out;\n  while (!arg.empty()) {\n    if (arg[0] == '%') {\n      out << (char)((from_hex(arg[1]) << 4) | from_hex(arg[2]));\n      arg = arg.substr(3);\n    } else {\n      out << arg[0];\n      arg = arg.substr(1);\n    }\n  }\n  return out.str();\n}\n\nstatic std::vector<std::string_view>\nsplit_string(std::string_view str, std::string_view sep) {\n  std::vector<std::string_view> vec;\n\n  for (;;) {\n    i64 pos = str.find_first_of(sep);\n    if (pos == str.npos) {\n      vec.push_back(str);\n      break;\n    }\n    vec.push_back(str.substr(0, pos));\n    str = str.substr(pos + 1);\n  }\n  return vec;\n}\n\ntemplate <typename E>\nstatic void read_retain_symbols_file(Context<E> &ctx, std::string_view path) {\n  MappedFile *mf = must_open_file(ctx, std::string(path));\n  std::string_view data((char *)mf->data, mf->size);\n  std::vector<Symbol<E> *> vec;\n\n  while (!data.empty()) {\n    size_t pos = data.find('\\n');\n    std::string_view name;\n\n    if (pos == data.npos) {\n      name = data;\n      data = \"\";\n    } else {\n      name = data.substr(0, pos);\n      data = data.substr(pos + 1);\n    }\n\n    name = string_trim(name);\n    if (!name.empty())\n      vec.push_back(get_symbol(ctx, name));\n  }\n\n  ctx.arg.retain_symbols_file = std::move(vec);\n}\n\nstatic bool is_file(const std::filesystem::path& path) {\n  std::error_code error;\n  return !std::filesystem::is_directory(path, error) && !error;\n}\n\ntemplate <typename E>\nstatic std::vector<SectionOrder>\nparse_section_order(Context<E> &ctx, std::string_view arg) {\n  auto flags = std::regex_constants::ECMAScript | std::regex_constants::icase |\n               std::regex_constants::optimize;\n  static std::regex re1(R\"(TEXT|DATA|RODATA|BSS)\", flags);\n  static std::regex re2(R\"([a-zA-Z0-9_.]\\S*|EHDR|PHDR)\", flags);\n  static std::regex re3(R\"(=(0x[0-9a-f]+|\\d+))\", flags);\n  static std::regex re4(R\"(%(0x[0-9a-f]+|\\d+))\", flags);\n  static std::regex re5(R\"(!(\\S+))\", flags);\n\n  std::vector<SectionOrder> vec;\n\n  for (std::string_view tok : split_string(arg, \" \\t\")) {\n    if (tok.empty())\n      continue;\n\n    vec.push_back(SectionOrder{ .token = tok });\n    SectionOrder &ord = vec.back();\n    std::cmatch m;\n\n    if (std::regex_match(tok.data(), tok.data() + tok.size(), m, re1)) {\n      ord.type = SectionOrder::GROUP;\n      ord.name = m[0].str();\n    } else if (std::regex_match(tok.data(), tok.data() + tok.size(), m, re2)) {\n      ord.type = SectionOrder::SECTION;\n      ord.name = m[0].str();\n    } else if (std::regex_match(tok.data(), tok.data() + tok.size(), m, re3)) {\n      ord.type = SectionOrder::ADDR;\n      std::string s = m[1];\n      ord.value = std::stoull(s, nullptr, s.starts_with(\"0x\") ? 16 : 10);\n    } else if (std::regex_match(tok.data(), tok.data() + tok.size(), m, re4)) {\n      ord.type = SectionOrder::ALIGN;\n      std::string s = m[1];\n      ord.value = std::stoull(s, nullptr, s.starts_with(\"0x\") ? 16 : 10);\n    } else if (std::regex_match(tok.data(), tok.data() + tok.size(), m, re5)) {\n      ord.type = SectionOrder::SYMBOL;\n      ord.name = m[1].str();\n    } else {\n      Fatal(ctx) << \"--section-order: parse error: \" << arg;\n    }\n  }\n\n  bool is_first = true;\n  for (SectionOrder &ord : vec) {\n    if (ord.type == SectionOrder::SECTION) {\n      if (is_first) {\n        is_first = false;\n      } else if (ord.name == \"EHDR\") {\n        Fatal(ctx) << \"--section-order: EHDR must be the first \"\n                   << \"section specifier: \" << arg;\n      }\n    }\n  }\n  return vec;\n}\n\ntemplate <typename E>\nstatic std::variant<Symbol<E> *, u64>\nparse_defsym_value(Context<E> &ctx, std::string_view s) {\n  if (s.starts_with(\"0x\") || s.starts_with(\"0X\")) {\n    size_t nread;\n    u64 addr = std::stoull(std::string(s), &nread, 16);\n    if (s.size() != nread)\n      return {};\n    return addr;\n  }\n\n  if (s.find_first_not_of(\"0123456789\") == s.npos)\n    return (u64)std::stoull(std::string(s), nullptr, 10);\n  return get_symbol(ctx, s);\n}\n\n// Parses a kernel version string, e.g. \"6.8.0-47-generic\".\nstatic std::tuple<int, int, int>\nparse_kernel_version(std::string str) {\n  auto flags = std::regex_constants::optimize | std::regex_constants::ECMAScript;\n  static std::regex re(R\"(^(\\d+)\\.(\\d+)\\.(\\d+))\", flags);\n  std::smatch m;\n\n  if (!std::regex_search(str, m, re))\n    return {0, 0, 0};\n  return {std::stoi(m[1]), std::stoi(m[2]), std::stoi(m[3])};\n}\n\n// Version 6.11 and 6.12 of the Linux kernel does not return ETXTBSY for\n// open(2) on an executable file that is currently running. This function\n// returns true if we are running on a Linux kernel older than 6.11 or newer\n// than 6.12.\nstatic bool returns_etxtbsy() {\n#if HAVE_UNAME\n  struct utsname buf;\n  if (uname(&buf) == 0 && strcmp(buf.sysname, \"Linux\") == 0) {\n    std::tuple<int, int, int> ver = parse_kernel_version(buf.release);\n    return ver < std::tuple{6, 11, 0} || std::tuple{6, 13, 0} <= ver;\n  }\n#endif\n  return false;\n}\n\ntemplate <typename E>\nstd::vector<std::string> parse_nonpositional_args(Context<E> &ctx) {\n  std::span<std::string_view> args = ctx.cmdline_args;\n  args = args.subspan(1);\n\n  std::vector<std::string> remaining;\n  std::string_view arg;\n\n  ctx.arg.color_diagnostics = isatty(STDERR_FILENO);\n\n  bool version_shown = false;\n  bool warn_shared_textrel = false;\n  bool error_unresolved_symbols = true;\n  std::optional<SeparateCodeKind> z_separate_code;\n  std::optional<bool> allow_shlib_undefined;\n  std::optional<bool> report_undefined;\n  std::optional<bool> z_relro;\n  std::optional<bool> z_dynamic_undefined_weak;\n  std::optional<std::string> separate_debug_file;\n  std::optional<u64> shuffle_sections_seed;\n  std::unordered_set<std::string_view> rpaths;\n  std::vector<std::string_view> version_scripts;\n\n  auto add_rpath = [&](std::string_view arg) {\n    if (rpaths.insert(arg).second) {\n      if (!ctx.arg.rpaths.empty())\n        ctx.arg.rpaths += ':';\n      ctx.arg.rpaths += arg;\n    }\n  };\n\n  // RISC-V and LoongArch object files contains lots of local symbols,\n  // so by default we discard them. This is compatible with GNU ld.\n  if constexpr (is_riscv<E> || is_loongarch<E>)\n    ctx.arg.discard_locals = true;\n\n  // We generally don't need to write addends to relocated places if the\n  // relocation type is RELA because RELA records contain addends.\n  // However, there are too much code that wrongly assumes that addends\n  // are written to both RELA records and relocated places, so we write\n  // addends to relocated places by default. There are a few exceptions:\n  //\n  // - It looks like the SPARC's dynamic linker takes both RELA's r_addend\n  //   and the value at the relocated place. So we don't want to write\n  //   values to relocated places.\n  //\n  // - Static PIE binaries crash on startup in some RISC-V environment if\n  //   we write addends to relocated places.\n  ctx.arg.apply_dynamic_relocs = !is_sparc<E> && !is_riscv<E>;\n\n  auto read_arg = [&](std::string name) {\n    for (const std::string &opt : add_dashes(name)) {\n      if (args[0] == opt) {\n        if (args.size() == 1)\n          Fatal(ctx) << \"option -\" << name << \": argument missing\";\n        arg = args[1];\n        args = args.subspan(2);\n        return true;\n      }\n\n      std::string prefix = (name.size() == 1) ? opt : opt + \"=\";\n      if (args[0].starts_with(prefix)) {\n        arg = args[0].substr(prefix.size());\n        args = args.subspan(1);\n        return true;\n      }\n    }\n    return false;\n  };\n\n  auto read_eq = [&](std::string name) {\n    for (const std::string &opt : add_dashes(name)) {\n      if (args[0].starts_with(opt + \"=\")) {\n        arg = args[0].substr(opt.size() + 1);\n        args = args.subspan(1);\n        return true;\n      }\n    }\n    return false;\n  };\n\n  auto read_flag = [&](std::string name) {\n    for (const std::string &opt : add_dashes(name)) {\n      if (args[0] == opt) {\n        args = args.subspan(1);\n        return true;\n      }\n    }\n    return false;\n  };\n\n  auto read_z_flag = [&](std::string name) {\n    if (args.size() >= 2 && args[0] == \"-z\" && args[1] == name) {\n      args = args.subspan(2);\n      return true;\n    }\n\n    if (!args.empty() && args[0] == \"-z\" + name) {\n      args = args.subspan(1);\n      return true;\n    }\n    return false;\n  };\n\n  auto read_z_arg = [&](std::string name) {\n    if (args.size() >= 2 && args[0] == \"-z\" && args[1].starts_with(name + \"=\")) {\n      arg = args[1].substr(name.size() + 1);\n      args = args.subspan(2);\n      return true;\n    }\n\n    if (!args.empty() && args[0].starts_with(\"-z\" + name + \"=\")) {\n      arg = args[0].substr(name.size() + 3);\n      args = args.subspan(1);\n      return true;\n    }\n    return false;\n  };\n\n  while (!args.empty()) {\n    if (read_flag(\"help\")) {\n      Out(ctx) << \"Usage: \" << ctx.cmdline_args[0]\n               << \" [options] file...\\n\" << helpmsg;\n      exit(0);\n    }\n\n    if (read_arg(\"o\") || read_arg(\"output\")) {\n      ctx.arg.output = arg;\n    } else if (read_arg(\"dynamic-linker\") || read_arg(\"I\")) {\n      ctx.arg.dynamic_linker = arg;\n    } else if (read_flag(\"no-dynamic-linker\")) {\n      ctx.arg.dynamic_linker = \"\";\n    } else if (read_flag(\"v\")) {\n      Out(ctx) << mold_version;\n      version_shown = true;\n    } else if (read_flag(\"version\")) {\n      Out(ctx) << mold_version;\n      exit(0);\n    } else if (read_flag(\"V\")) {\n      Out(ctx) << mold_version\n               << \"\\n  Supported emulations:\\n   elf_x86_64\\n   elf_i386\\n\"\n               << \"   aarch64elf\\n   aarch64linux\\n   aarch64elfb\\n\"\n               << \"   aarch64linuxb\\n   armelf_linux_eabi\\n   elf64lriscv\\n\"\n               << \"   elf64briscv\\n   elf32lriscv\\n   elf32briscv\\n\"\n               << \"   elf32ppc\\n   elf64ppc\\n   elf64lppc\\n   elf64_s390\\n\"\n               << \"   elf64_sparc\\n   m68kelf\\n   shlelf_linux\\n\"\n               << \"   shelf_linux\\n   elf64loongarch\\n   elf32loongarch\";\n      version_shown = true;\n    } else if (read_arg(\"mllvm\")) {\n      ctx.arg.plugin_opt.emplace_back(arg);\n    } else if (read_arg(\"m\")) {\n      auto check = [&](bool supported, std::string_view name) {\n        if (!supported)\n          Fatal(ctx) << \"'-m \" << arg << \"' is not supported; you may want to\"\n                     << \" rebuild mold with \" << name << \" support\";\n      };\n\n      if (arg == \"elf_x86_64\") {\n        check(HAVE_TARGET_X86_64, X86_64::name);\n        ctx.arg.emulation = X86_64::name;\n      } else if (arg == \"elf_i386\") {\n        check(HAVE_TARGET_I386, I386::name);\n        ctx.arg.emulation = I386::name;\n      } else if (arg == \"aarch64elf\" || arg == \"aarch64linux\") {\n        check(HAVE_TARGET_ARM64LE, ARM64LE::name);\n        ctx.arg.emulation = ARM64LE::name;\n      } else if (arg == \"aarch64elfb\" || arg == \"aarch64linuxb\") {\n        check(HAVE_TARGET_ARM64BE, ARM64BE::name);\n        ctx.arg.emulation = ARM64BE::name;\n      } else if (arg == \"armelf_linux_eabi\") {\n        check(HAVE_TARGET_ARM32LE, ARM32LE::name);\n        ctx.arg.emulation = ARM32LE::name;\n      } else if (arg == \"armelfb_linux_eabi\") {\n        check(HAVE_TARGET_ARM32BE, ARM32BE::name);\n        ctx.arg.emulation = ARM32BE::name;\n      } else if (arg == \"elf64lriscv\") {\n        check(HAVE_TARGET_RV64LE, RV64LE::name);\n        ctx.arg.emulation = RV64LE::name;\n      } else if (arg == \"elf64briscv\") {\n        check(HAVE_TARGET_RV64BE, RV64BE::name);\n        ctx.arg.emulation = RV64BE::name;\n      } else if (arg == \"elf32lriscv\") {\n        check(HAVE_TARGET_RV32LE, RV32LE::name);\n        ctx.arg.emulation = RV32LE::name;\n      } else if (arg == \"elf32briscv\") {\n        check(HAVE_TARGET_RV32BE, RV32BE::name);\n        ctx.arg.emulation = RV32BE::name;\n      } else if (arg == \"elf32ppc\" || arg == \"elf32ppclinux\") {\n        check(HAVE_TARGET_PPC32, PPC32::name);\n        ctx.arg.emulation = PPC32::name;\n      } else if (arg == \"elf64ppc\") {\n        check(HAVE_TARGET_PPC64V1, PPC64V1::name);\n        ctx.arg.emulation = PPC64V1::name;\n      } else if (arg == \"elf64lppc\") {\n        check(HAVE_TARGET_PPC64V2, PPC64V2::name);\n        ctx.arg.emulation = PPC64V2::name;\n      } else if (arg == \"elf64_s390\") {\n        check(HAVE_TARGET_S390X, S390X::name);\n        ctx.arg.emulation = S390X::name;\n      } else if (arg == \"elf64_sparc\") {\n        check(HAVE_TARGET_SPARC64, SPARC64::name);\n        ctx.arg.emulation = SPARC64::name;\n      } else if (arg == \"m68kelf\") {\n        check(HAVE_TARGET_M68K, M68K::name);\n        ctx.arg.emulation = M68K::name;\n      } else if (arg == \"shlelf\" || arg == \"shlelf_linux\") {\n        check(HAVE_TARGET_SH4LE, SH4LE::name);\n        ctx.arg.emulation = SH4LE::name;\n      } else if (arg == \"shelf\" || arg == \"shelf_linux\") {\n        check(HAVE_TARGET_SH4BE, SH4BE::name);\n        ctx.arg.emulation = SH4BE::name;\n      } else if (arg == \"elf64loongarch\") {\n        check(HAVE_TARGET_LOONGARCH64, LOONGARCH64::name);\n        ctx.arg.emulation = LOONGARCH64::name;\n      } else if (arg == \"elf32loongarch\") {\n        check(HAVE_TARGET_LOONGARCH32, LOONGARCH32::name);\n        ctx.arg.emulation = LOONGARCH32::name;\n      } else {\n        Fatal(ctx) << \"unknown -m argument: \" << arg;\n      }\n    } else if (read_flag(\"end-lib\")) {\n      remaining.emplace_back(\"--end-lib\");\n    } else if (read_flag(\"export-dynamic\") || read_flag(\"E\")) {\n      ctx.arg.export_dynamic = true;\n    } else if (read_flag(\"no-export-dynamic\")) {\n      ctx.arg.export_dynamic = false;\n    } else if (read_flag(\"Bsymbolic\")) {\n      ctx.arg.Bsymbolic = BSYMBOLIC_ALL;\n    } else if (read_flag(\"Bsymbolic-functions\")) {\n      ctx.arg.Bsymbolic = BSYMBOLIC_FUNCTIONS;\n    } else if (read_flag(\"Bsymbolic-non-weak\")) {\n      ctx.arg.Bsymbolic = BSYMBOLIC_NON_WEAK;\n    } else if (read_flag(\"Bsymbolic-non-weak-functions\")) {\n      ctx.arg.Bsymbolic = BSYMBOLIC_NON_WEAK_FUNCTIONS;\n    } else if (read_flag(\"Bno-symbolic\")) {\n      ctx.arg.Bsymbolic = BSYMBOLIC_NONE;\n    } else if (read_arg(\"exclude-libs\")) {\n      for (std::string_view lib : split_string(arg, \",:\"))\n        ctx.arg.exclude_libs.insert(lib);\n    } else if (read_flag(\"q\") || read_flag(\"emit-relocs\")) {\n      ctx.arg.emit_relocs = true;\n      ctx.arg.discard_locals = false;\n    } else if (read_arg(\"e\") || read_arg(\"entry\")) {\n      ctx.arg.entry = get_symbol(ctx, arg);\n    } else if (read_arg(\"Map\")) {\n      ctx.arg.Map = arg;\n      ctx.arg.print_map = true;\n    } else if (read_flag(\"print-dependencies\")) {\n      ctx.arg.print_dependencies = true;\n    } else if (read_flag(\"print-map\") || read_flag(\"M\")) {\n      ctx.arg.print_map = true;\n    } else if (read_flag(\"Bstatic\") || read_flag(\"dn\") || read_flag(\"static\")) {\n      remaining.emplace_back(\"--Bstatic\");\n    } else if (read_flag(\"Bdynamic\") || read_flag(\"dy\")) {\n      remaining.emplace_back(\"--Bdynamic\");\n    } else if (read_flag(\"shared\") || read_flag(\"Bshareable\")) {\n      ctx.arg.shared = true;\n    } else if (read_arg(\"spare-dynamic-tags\")) {\n      ctx.arg.spare_dynamic_tags = parse_number(ctx, \"spare-dynamic-tags\", arg);\n    } else if (read_arg(\"spare-program-headers\")) {\n      ctx.arg.spare_program_headers\n        = parse_number(ctx, \"spare-program-headers\", arg);\n    } else if (read_flag(\"start-lib\")) {\n      remaining.emplace_back(\"--start-lib\");\n    } else if (read_flag(\"start-stop\")) {\n      ctx.arg.start_stop = true;\n    } else if (read_arg(\"dependency-file\")) {\n      ctx.arg.dependency_file = arg;\n    } else if (read_arg(\"defsym\")) {\n      size_t pos = arg.find('=');\n      if (pos == arg.npos || pos == arg.size() - 1)\n        Fatal(ctx) << \"-defsym: syntax error: \" << arg;\n      ctx.arg.defsyms.emplace_back(get_symbol(ctx, arg.substr(0, pos)),\n                                   parse_defsym_value(ctx, arg.substr(pos + 1)));\n    } else if (read_flag(\":lto-pass2\")) {\n      ctx.arg.lto_pass2 = true;\n    } else if (read_arg(\":ignore-ir-file\")) {\n      ctx.arg.ignore_ir_file.insert(arg);\n    } else if (read_flag(\"demangle\")) {\n      ctx.arg.demangle = true;\n    } else if (read_flag(\"no-demangle\")) {\n      ctx.arg.demangle = false;\n    } else if (read_flag(\"detach\")) {\n      ctx.arg.detach = true;\n    } else if (read_flag(\"no-detach\")) {\n      ctx.arg.detach = false;\n    } else if (read_flag(\"default-symver\")) {\n      ctx.arg.default_symver = true;\n    } else if (read_flag(\"noinhibit-exec\")) {\n      ctx.arg.noinhibit_exec = true;\n    } else if (read_flag(\"shuffle-sections\")) {\n      ctx.arg.shuffle_sections = SHUFFLE_SECTIONS_SHUFFLE;\n    } else if (read_eq(\"shuffle-sections\")) {\n      ctx.arg.shuffle_sections = SHUFFLE_SECTIONS_SHUFFLE;\n      shuffle_sections_seed = parse_number(ctx, \"shuffle-sections\", arg);\n    } else if (read_flag(\"reverse-sections\")) {\n      ctx.arg.shuffle_sections = SHUFFLE_SECTIONS_REVERSE;\n    } else if (read_flag(\"rosegment\")) {\n      ctx.arg.rosegment = true;\n    } else if (read_flag(\"no-rosegment\")) {\n      ctx.arg.rosegment = false;\n    } else if (read_arg(\"y\") || read_arg(\"trace-symbol\")) {\n      ctx.arg.trace_symbol.push_back(arg);\n    } else if (read_arg(\"filler\")) {\n      ctx.arg.filler = parse_hex(ctx, \"filler\", arg);\n    } else if (read_arg(\"L\") || read_arg(\"library-path\")) {\n      ctx.arg.library_paths.emplace_back(arg);\n    } else if (read_arg(\"sysroot\")) {\n      ctx.arg.sysroot = arg;\n    } else if (read_arg(\"unique\")) {\n      if (!ctx.arg.unique.add(arg, 1))\n        Fatal(ctx) << \"-unique: invalid glob pattern: \" << arg;\n    } else if (read_arg(\"unresolved-symbols\")) {\n      if (arg == \"report-all\" || arg == \"ignore-in-shared-libs\")\n        report_undefined = true;\n      else if (arg == \"ignore-all\" || arg == \"ignore-in-object-files\")\n        report_undefined = false;\n      else\n        Fatal(ctx) << \"unknown --unresolved-symbols argument: \" << arg;\n    } else if (read_arg(\"undefined\") || read_arg(\"u\")) {\n      ctx.arg.undefined.push_back(get_symbol(ctx, arg));\n    } else if (read_arg(\"undefined-glob\")) {\n      if (!ctx.arg.undefined_glob.add(arg, 0))\n        Fatal(ctx) << \"--undefined-glob: invalid pattern: \" << arg;\n    } else if (read_arg(\"require-defined\")) {\n      ctx.arg.require_defined.push_back(get_symbol(ctx, arg));\n    } else if (read_arg(\"init\")) {\n      ctx.arg.init = get_symbol(ctx, arg);\n    } else if (read_arg(\"fini\")) {\n      ctx.arg.fini = get_symbol(ctx, arg);\n    } else if (read_arg(\"hash-style\")) {\n      if (arg == \"sysv\") {\n        ctx.arg.hash_style_sysv = true;\n        ctx.arg.hash_style_gnu = false;\n      } else if (arg == \"gnu\") {\n        ctx.arg.hash_style_sysv = false;\n        ctx.arg.hash_style_gnu = true;\n      } else if (arg == \"both\") {\n        ctx.arg.hash_style_sysv = true;\n        ctx.arg.hash_style_gnu = true;\n      } else if (arg == \"none\") {\n        ctx.arg.hash_style_sysv = false;\n        ctx.arg.hash_style_gnu = false;\n      } else {\n        Fatal(ctx) << \"invalid --hash-style argument: \" << arg;\n      }\n    } else if (read_arg(\"soname\") || read_arg(\"h\")) {\n      ctx.arg.soname = arg;\n    } else if (read_arg(\"audit\")) {\n      if (!ctx.arg.audit.empty())\n        ctx.arg.audit += ':';\n      ctx.arg.audit += std::string(arg);\n    } else if (read_arg(\"depaudit\") || read_arg(\"P\")) {\n      if (!ctx.arg.depaudit.empty())\n        ctx.arg.depaudit += ':';\n      ctx.arg.depaudit += std::string(arg);\n    } else if (read_flag(\"allow-multiple-definition\")) {\n      ctx.arg.allow_multiple_definition = true;\n    } else if (read_flag(\"apply-dynamic-relocs\")) {\n      ctx.arg.apply_dynamic_relocs = true;\n    } else if (read_flag(\"no-apply-dynamic-relocs\")) {\n      ctx.arg.apply_dynamic_relocs = false;\n    } else if (read_flag(\"trace\")) {\n      ctx.arg.trace = true;\n    } else if (read_flag(\"eh-frame-hdr\")) {\n      ctx.arg.eh_frame_hdr = true;\n    } else if (read_flag(\"no-eh-frame-hdr\")) {\n      ctx.arg.eh_frame_hdr = false;\n    } else if (read_flag(\"pie\") || read_flag(\"pic-executable\")) {\n      ctx.arg.pic = true;\n      ctx.arg.pie = true;\n    } else if (read_flag(\"no-pie\") || read_flag(\"no-pic-executable\") ||\n               read_flag(\"nopie\")) {\n      ctx.arg.pic = false;\n      ctx.arg.pie = false;\n    } else if (read_flag(\"relax\")) {\n      ctx.arg.relax = true;\n    } else if (read_flag(\"no-relax\")) {\n      ctx.arg.relax = false;\n    } else if (read_flag(\"gdb-index\")) {\n      ctx.arg.gdb_index = true;\n    } else if (read_flag(\"no-gdb-index\")) {\n      ctx.arg.gdb_index = false;\n    } else if (read_flag(\"r\") || read_flag(\"relocatable\")) {\n      ctx.arg.relocatable = true;\n      ctx.arg.emit_relocs = true;\n      ctx.arg.discard_locals = false;\n    } else if (read_flag(\"relocatable-merge-sections\")) {\n      ctx.arg.relocatable_merge_sections = true;\n    } else if (read_flag(\"perf\")) {\n      ctx.arg.perf = true;\n    } else if (read_flag(\"pack-dyn-relocs=relr\") ||\n               read_z_flag(\"pack-relative-relocs\")) {\n      ctx.arg.pack_dyn_relocs_relr = true;\n    } else if (read_flag(\"pack-dyn-relocs=none\") ||\n               read_z_flag(\"nopack-relative-relocs\")) {\n      ctx.arg.pack_dyn_relocs_relr = false;\n    } else if (read_arg(\"package-metadata\")) {\n      ctx.arg.package_metadata = parse_package_metadata(ctx, arg);\n    } else if (read_flag(\"stats\")) {\n      ctx.arg.stats = true;\n      Counter::enabled = true;\n    } else if (read_arg(\"C\") || read_arg(\"directory\")) {\n      ctx.arg.directory = arg;\n    } else if (read_arg(\"chroot\")) {\n      ctx.arg.chroot = arg;\n    } else if (read_flag(\"color-diagnostics\") ||\n               read_flag(\"color-diagnostics=auto\")) {\n      ctx.arg.color_diagnostics = isatty(STDERR_FILENO);\n    } else if (read_flag(\"color-diagnostics=always\")) {\n      ctx.arg.color_diagnostics = true;\n    } else if (read_flag(\"color-diagnostics=never\")) {\n      ctx.arg.color_diagnostics = false;\n    } else if (read_flag(\"warn-common\")) {\n      ctx.arg.warn_common = true;\n    } else if (read_flag(\"no-warn-common\")) {\n      ctx.arg.warn_common = false;\n    } else if (read_flag(\"warn-once\")) {\n      ctx.arg.warn_once = true;\n    } else if (read_flag(\"warn-shared-textrel\")) {\n      warn_shared_textrel = true;\n    } else if (read_flag(\"warn-textrel\")) {\n      ctx.arg.warn_textrel = true;\n    } else if (read_flag(\"enable-new-dtags\")) {\n      ctx.arg.enable_new_dtags = true;\n    } else if (read_flag(\"disable-new-dtags\")) {\n      ctx.arg.enable_new_dtags = false;\n    } else if (read_flag(\"execute-only\")) {\n      ctx.arg.execute_only = true;\n    } else if (read_flag(\"zero-to-bss\")) {\n      ctx.arg.zero_to_bss = true;\n    } else if (read_arg(\"compress-debug-sections\")) {\n      if (arg == \"zlib\" || arg == \"zlib-gabi\")\n        ctx.arg.compress_debug_sections = ELFCOMPRESS_ZLIB;\n      else if (arg == \"zstd\")\n        ctx.arg.compress_debug_sections = ELFCOMPRESS_ZSTD;\n      else if (arg == \"none\")\n        ctx.arg.compress_debug_sections = ELFCOMPRESS_NONE;\n      else\n        Fatal(ctx) << \"invalid --compress-debug-sections argument: \" << arg;\n    } else if (read_arg(\"wrap\")) {\n      ctx.arg.wrap.insert(arg);\n    } else if (read_flag(\"omagic\") || read_flag(\"N\")) {\n      ctx.arg.omagic = true;\n    } else if (read_flag(\"no-omagic\")) {\n      ctx.arg.omagic = false;\n    } else if (read_arg(\"oformat\")) {\n      if (arg != \"binary\")\n        Fatal(ctx) << \"-oformat: \" << arg << \" is not supported\";\n      ctx.arg.oformat_binary = true;\n    } else if (read_arg(\"retain-symbols-file\")) {\n      read_retain_symbols_file(ctx, arg);\n    } else if (read_arg(\"section-align\")) {\n      size_t pos = arg.find('=');\n      if (pos == arg.npos || pos == arg.size() - 1)\n        Fatal(ctx) << \"--section-align: syntax error: \" << arg;\n      i64 value = parse_number(ctx, \"section-align\", arg.substr(pos + 1));\n      if (!has_single_bit(value))\n        Fatal(ctx) << \"--section-align=\" << arg << \": value must be a power of 2\";\n      ctx.arg.section_align[arg.substr(0, pos)] = value;\n    } else if (read_arg(\"section-start\")) {\n      size_t pos = arg.find('=');\n      if (pos == arg.npos || pos == arg.size() - 1)\n        Fatal(ctx) << \"--section-start: syntax error: \" << arg;\n      ctx.arg.section_start[arg.substr(0, pos)] =\n        parse_hex(ctx, \"section-start\", arg.substr(pos + 1));\n    } else if (read_arg(\"section-order\")) {\n      ctx.arg.section_order = parse_section_order(ctx, arg);\n    } else if (read_arg(\"Tbss\")) {\n      ctx.arg.section_start[\".bss\"] = parse_hex(ctx, \"Tbss\", arg);\n    } else if (read_arg(\"Tdata\")) {\n      ctx.arg.section_start[\".data\"] = parse_hex(ctx, \"Tdata\", arg);\n    } else if (read_arg(\"Ttext\")) {\n      ctx.arg.section_start[\".text\"] = parse_hex(ctx, \"Ttext\", arg);\n    } else if (read_flag(\"repro\")) {\n      ctx.arg.repro = true;\n    } else if (read_z_flag(\"now\")) {\n      ctx.arg.z_now = true;\n    } else if (read_z_flag(\"lazy\")) {\n      ctx.arg.z_now = false;\n    } else if (read_z_flag(\"cet-report=none\")) {\n      ctx.arg.z_cet_report = CET_REPORT_NONE;\n    } else if (read_z_flag(\"cet-report=warning\")) {\n      ctx.arg.z_cet_report = CET_REPORT_WARNING;\n    } else if (read_z_flag(\"cet-report=error\")) {\n      ctx.arg.z_cet_report = CET_REPORT_ERROR;\n    } else if (read_z_flag(\"execstack\")) {\n      ctx.arg.z_execstack = true;\n    } else if (read_z_flag(\"execstack-if-needed\")) {\n      ctx.arg.z_execstack_if_needed = true;\n    } else if (read_z_arg(\"max-page-size\")) {\n      ctx.page_size = parse_number(ctx, \"-z max-page-size\", arg);\n      if (!has_single_bit(ctx.page_size))\n        Fatal(ctx) << \"-z max-page-size \" << arg << \": value must be a power of 2\";\n    } else if (read_z_flag(\"start-stop-visibility=protected\")) {\n      ctx.arg.z_start_stop_visibility_protected = true;\n    } else if (read_z_flag(\"start-stop-visibility=hidden\")) {\n      ctx.arg.z_start_stop_visibility_protected = false;\n    } else if (read_z_flag(\"noexecstack\")) {\n      ctx.arg.z_execstack = false;\n    } else if (read_z_flag(\"relro\")) {\n      z_relro = true;\n    } else if (read_z_flag(\"norelro\")) {\n      z_relro = false;\n    } else if (read_z_flag(\"defs\") || read_flag(\"no-undefined\")) {\n      report_undefined = true;\n    } else if (read_z_flag(\"undefs\")) {\n      report_undefined = false;\n    } else if (read_z_flag(\"nodlopen\")) {\n      ctx.arg.z_dlopen = false;\n    } else if (read_z_flag(\"nodelete\")) {\n      ctx.arg.z_delete = false;\n    } else if (read_z_flag(\"nocopyreloc\")) {\n      ctx.arg.z_copyreloc = false;\n    } else if (read_z_flag(\"nodump\")) {\n      ctx.arg.z_dump = false;\n    } else if (read_z_flag(\"initfirst\")) {\n      ctx.arg.z_initfirst = true;\n    } else if (read_z_flag(\"interpose\")) {\n      ctx.arg.z_interpose = true;\n    } else if (read_z_flag(\"ibt\")) {\n      ctx.arg.z_ibt = true;\n    } else if (read_z_flag(\"ibtplt\")) {\n    } else if (read_z_flag(\"muldefs\")) {\n      ctx.arg.allow_multiple_definition = true;\n    } else if (read_z_flag(\"keep-text-section-prefix\")) {\n      ctx.arg.z_keep_text_section_prefix = true;\n    } else if (read_z_flag(\"nokeep-text-section-prefix\")) {\n      ctx.arg.z_keep_text_section_prefix = false;\n    } else if (read_z_flag(\"shstk\")) {\n      ctx.arg.z_shstk = true;\n    } else if (read_z_flag(\"text\")) {\n      ctx.arg.z_text = true;\n    } else if (read_z_flag(\"notext\") || read_z_flag(\"textoff\")) {\n      ctx.arg.z_text = false;\n    } else if (read_z_flag(\"origin\")) {\n      ctx.arg.z_origin = true;\n    } else if (read_z_flag(\"nodefaultlib\")) {\n      ctx.arg.z_nodefaultlib = true;\n    } else if (read_eq(\"separate-debug-file\")) {\n      separate_debug_file = arg;\n    } else if (read_flag(\"separate-debug-file\")) {\n      separate_debug_file = \"\";\n    } else if (read_flag(\"no-separate-debug-file\")) {\n      separate_debug_file.reset();\n    } else if (read_z_flag(\"separate-loadable-segments\")) {\n      z_separate_code = SEPARATE_LOADABLE_SEGMENTS;\n    } else if (read_z_flag(\"separate-code\")) {\n      z_separate_code = SEPARATE_CODE;\n    } else if (read_z_flag(\"noseparate-code\")) {\n      z_separate_code = NOSEPARATE_CODE;\n    } else if (read_z_arg(\"stack-size\")) {\n      ctx.arg.z_stack_size = parse_number(ctx, \"-z stack-size\", arg);\n    } else if (read_z_flag(\"dynamic-undefined-weak\")) {\n      z_dynamic_undefined_weak = true;\n    } else if (read_z_flag(\"nodynamic-undefined-weak\")) {\n      z_dynamic_undefined_weak = false;\n    } else if (read_z_flag(\"sectionheader\")) {\n      ctx.arg.z_sectionheader = true;\n    } else if (read_z_flag(\"nosectionheader\")) {\n      ctx.arg.z_sectionheader = false;\n    } else if (read_z_flag(\"rodynamic\")) {\n      ctx.arg.z_rodynamic = true;\n    } else if (read_z_flag(\"x86-64-v2\")) {\n      ctx.arg.z_x86_64_isa_level |= GNU_PROPERTY_X86_ISA_1_V2;\n    } else if (read_z_flag(\"x86-64-v3\")) {\n      ctx.arg.z_x86_64_isa_level |= GNU_PROPERTY_X86_ISA_1_V3;\n    } else if (read_z_flag(\"x86-64-v4\")) {\n      ctx.arg.z_x86_64_isa_level |= GNU_PROPERTY_X86_ISA_1_V4;\n    } else if (read_z_flag(\"rewrite-endbr\")) {\n      if constexpr (!is_x86_64<E>)\n        Fatal(ctx) << \"-z rewrite-endbr is supported only on x86-64\";\n      ctx.arg.z_rewrite_endbr = true;\n    } else if (read_z_flag(\"norewrite-endbr\")) {\n      ctx.arg.z_rewrite_endbr = false;\n    } else if (read_flag(\"nmagic\")) {\n      ctx.arg.nmagic = true;\n    } else if (read_flag(\"no-nmagic\")) {\n      ctx.arg.nmagic = false;\n    } else if (read_flag(\"fatal-warnings\")) {\n      ctx.arg.fatal_warnings = true;\n    } else if (read_flag(\"no-fatal-warnings\")) {\n      ctx.arg.fatal_warnings = false;\n    } else if (read_flag(\"fork\")) {\n      ctx.arg.fork = true;\n    } else if (read_flag(\"no-fork\")) {\n      ctx.arg.fork = false;\n    } else if (read_flag(\"gc-sections\")) {\n      ctx.arg.gc_sections = true;\n    } else if (read_flag(\"no-gc-sections\")) {\n      ctx.arg.gc_sections = false;\n    } else if (read_flag(\"print-gc-sections\")) {\n      ctx.arg.print_gc_sections = \"-\";\n    } else if (read_eq(\"print-gc-sections\")) {\n      ctx.arg.print_gc_sections = arg;\n    } else if (read_flag(\"no-print-gc-sections\")) {\n      ctx.arg.print_gc_sections = \"\";\n    } else if (read_arg(\"discard-section\")) {\n      ctx.arg.discard_section.insert(arg);\n    } else if (read_arg(\"no-discard-section\")) {\n      ctx.arg.discard_section.erase(arg);\n    } else if (read_arg(\"icf\")) {\n      if (arg == \"all\") {\n        ctx.arg.icf = true;\n        ctx.arg.icf_all = true;\n      } else if (arg == \"safe\") {\n        ctx.arg.icf = true;\n      } else if (arg == \"none\") {\n        ctx.arg.icf = false;\n      } else {\n        Fatal(ctx) << \"unknown --icf argument: \" << arg;\n      }\n    } else if (read_flag(\"no-icf\")) {\n      ctx.arg.icf = false;\n    } else if (read_flag(\"ignore-data-address-equality\")) {\n      ctx.arg.ignore_data_address_equality = true;\n    } else if (read_arg(\"image-base\")) {\n      ctx.arg.image_base = parse_number(ctx, \"image-base\", arg);\n    } else if (read_arg(\"physical-image-base\")) {\n      ctx.arg.physical_image_base = parse_number(ctx, \"physical-image-base\", arg);\n    } else if (read_flag(\"print-icf-sections\")) {\n      ctx.arg.print_icf_sections = \"-\";\n    } else if (read_eq(\"print-icf-sections\")) {\n      ctx.arg.print_icf_sections = arg;\n    } else if (read_flag(\"no-print-icf-sections\")) {\n      ctx.arg.print_icf_sections = \"\";\n    } else if (read_flag(\"quick-exit\")) {\n      ctx.arg.quick_exit = true;\n    } else if (read_flag(\"no-quick-exit\")) {\n      ctx.arg.quick_exit = false;\n    } else if (read_arg(\"plugin\")) {\n      ctx.arg.plugin = arg;\n    } else if (read_arg(\"plugin-opt\")) {\n      ctx.arg.plugin_opt.emplace_back(arg);\n    } else if (read_flag(\"lto-cs-profile-generate\")) {\n      ctx.arg.plugin_opt.emplace_back(\"cs-profile-generate\");\n    } else if (read_arg(\"lto-cs-profile-file\")) {\n      ctx.arg.plugin_opt.push_back(\"cs-profile-path=\" + std::string(arg));\n    } else if (read_flag(\"lto-debug-pass-manager\")) {\n      ctx.arg.plugin_opt.emplace_back(\"debug-pass-manager\");\n    } else if (read_flag(\"disable-verify\")) {\n      ctx.arg.plugin_opt.emplace_back(\"disable-verify\");\n    } else if (read_flag(\"lto-emit-asm\")) {\n      ctx.arg.plugin_opt.emplace_back(\"emit-asm\");\n    } else if (read_flag(\"no-legacy-pass-manager\")) {\n      ctx.arg.plugin_opt.emplace_back(\"legacy-pass-manager\");\n    } else if (read_arg(\"lto-partitions\")) {\n      ctx.arg.plugin_opt.push_back(\"lto-partitions=\" + std::string(arg));\n    } else if (read_flag(\"no-lto-legacy-pass-manager\")) {\n      ctx.arg.plugin_opt.emplace_back(\"new-pass-manager\");\n    } else if (read_arg(\"lto-obj-path\")) {\n      ctx.arg.plugin_opt.push_back(\"obj-path=\" + std::string(arg));\n    } else if (read_arg(\"opt-remarks-filename\")) {\n      ctx.arg.plugin_opt.push_back(\"opt-remarks-filename=\" + std::string(arg));\n    } else if (read_arg(\"opt-remarks-format\")) {\n      ctx.arg.plugin_opt.push_back(\"opt-remarks-format=\" + std::string(arg));\n    } else if (read_arg(\"opt-remarks-hotness-threshold\")) {\n      ctx.arg.plugin_opt.push_back(\"opt-remarks-hotness-threshold=\" +\n                                   std::string(arg));\n    } else if (read_arg(\"opt-remarks-passes\")) {\n      ctx.arg.plugin_opt.push_back(\"opt-remarks-passes=\" + std::string(arg));\n    } else if (read_flag(\"opt-remarks-with_hotness\")) {\n      ctx.arg.plugin_opt.emplace_back(\"opt-remarks-with-hotness\");\n    } else if (args[0].starts_with(\"-lto-O\")) {\n      ctx.arg.plugin_opt.push_back(\"O\" + std::string(args[0].substr(6)));\n      args = args.subspan(1);\n    } else if (args[0].starts_with(\"--lto-O\")) {\n      ctx.arg.plugin_opt.push_back(\"O\" + std::string(args[0].substr(7)));\n      args = args.subspan(1);\n    } else if (read_arg(\"lto-pseudo-probe-for-profiling\")) {\n      ctx.arg.plugin_opt.push_back(\"pseudo-probe-for-profiling=\" +\n                                   std::string(arg));\n    } else if (read_arg(\"lto-sample-profile\")) {\n      ctx.arg.plugin_opt.push_back(\"sample-profile=\" + std::string(arg));\n    } else if (read_flag(\"save-temps\")) {\n      ctx.arg.plugin_opt.emplace_back(\"save-temps\");\n    } else if (read_flag(\"thinlto-emit-imports-files\")) {\n      ctx.arg.plugin_opt.emplace_back(\"thinlto-emit-imports-files\");\n    } else if (read_arg(\"thinlto-index-only\")) {\n      ctx.arg.plugin_opt.push_back(\"thinlto-index-only=\" + std::string(arg));\n    } else if (read_flag(\"thinlto-index-only\")) {\n      ctx.arg.plugin_opt.emplace_back(\"thinlto-index-only\");\n    } else if (read_arg(\"thinlto-object-suffix-replace\")) {\n      ctx.arg.plugin_opt.push_back(\"thinlto-object-suffix-replace=\" +\n                                   std::string(arg));\n    } else if (read_arg(\"thinlto-prefix-replace\")) {\n      ctx.arg.plugin_opt.push_back(\"thinlto-prefix-replace=\" + std::string(arg));\n    } else if (read_arg(\"thinlto-cache-dir\")) {\n      ctx.arg.plugin_opt.push_back(\"cache-dir=\" + std::string(arg));\n    } else if (read_arg(\"thinlto-cache-policy\")) {\n      ctx.arg.plugin_opt.push_back(\"cache-policy=\" + std::string(arg));\n    } else if (read_arg(\"thinlto-jobs\")) {\n      ctx.arg.plugin_opt.push_back(\"jobs=\" + std::string(arg));\n    } else if (read_arg(\"thread-count\")) {\n      ctx.arg.thread_count = parse_number(ctx, \"thread-count\", arg);\n    } else if (read_flag(\"threads\")) {\n      ctx.arg.thread_count.reset();\n    } else if (read_flag(\"no-threads\")) {\n      ctx.arg.thread_count = 1;\n    } else if (read_eq(\"threads\")) {\n      ctx.arg.thread_count = parse_number(ctx, \"threads\", arg);\n    } else if (read_flag(\"discard-all\") || read_flag(\"x\")) {\n      ctx.arg.discard_all = true;\n    } else if (read_flag(\"discard-locals\") || read_flag(\"X\")) {\n      ctx.arg.discard_locals = true;\n    } else if (read_flag(\"strip-all\") || read_flag(\"s\")) {\n      ctx.arg.strip_all = true;\n    } else if (read_flag(\"strip-debug\") || read_flag(\"S\")) {\n      ctx.arg.strip_debug = true;\n    } else if (read_flag(\"warn-unresolved-symbols\")) {\n      error_unresolved_symbols = false;\n    } else if (read_flag(\"error-unresolved-symbols\")) {\n      error_unresolved_symbols = true;\n    } else if (read_arg(\"rpath\")) {\n      add_rpath(arg);\n    } else if (read_arg(\"R\")) {\n      if (is_file(arg))\n        Fatal(ctx) << \"-R\" << arg\n                   << \": -R as an alias for --just-symbols is not supported\";\n      add_rpath(arg);\n    } else if (read_flag(\"undefined-version\")) {\n      ctx.arg.undefined_version = true;\n    } else if (read_flag(\"no-undefined-version\")) {\n      ctx.arg.undefined_version = false;\n    } else if (read_flag(\"build-id\")) {\n      ctx.arg.build_id.kind = BuildId::HASH;\n      ctx.arg.build_id.hash_size = 20;\n    } else if (read_arg(\"build-id\")) {\n      if (arg == \"none\") {\n        ctx.arg.build_id.kind = BuildId::NONE;\n      } else if (arg == \"uuid\") {\n        ctx.arg.build_id.kind = BuildId::UUID;\n      } else if (arg == \"md5\") {\n        ctx.arg.build_id.kind = BuildId::HASH;\n        ctx.arg.build_id.hash_size = 16;\n      } else if (arg == \"sha1\") {\n        ctx.arg.build_id.kind = BuildId::HASH;\n        ctx.arg.build_id.hash_size = 20;\n      } else if (arg == \"sha256\" || arg == \"fast\") {\n        ctx.arg.build_id.kind = BuildId::HASH;\n        ctx.arg.build_id.hash_size = 32;\n      } else if (arg.starts_with(\"0x\") || arg.starts_with(\"0X\")) {\n        ctx.arg.build_id.kind = BuildId::HEX;\n        ctx.arg.build_id.value = parse_hex_build_id(ctx, arg);\n      } else {\n        Fatal(ctx) << \"invalid --build-id argument: \" << arg;\n      }\n    } else if (read_flag(\"no-build-id\")) {\n      ctx.arg.build_id.kind = BuildId::NONE;\n    } else if (read_flag(\"be8\")) {\n      ctx.arg.be8 = true;\n    } else if (read_flag(\"be32\")) {\n      ctx.arg.be8 = false;\n    } else if (read_arg(\"format\") || read_arg(\"b\")) {\n      if (arg == \"binary\")\n        Fatal(ctx)\n          << \"mold does not support `-b binary`. If you want to convert a\"\n          << \" binary file into an object file, use `objcopy -I binary -O\"\n          << \" default <input-file> <output-file.o>` instead.\";\n      Fatal(ctx) << \"unknown command line option: -b \" << arg;\n    } else if (read_arg(\"fuse-ld\")) {\n    } else if (read_arg(\"auxiliary\") || read_arg(\"f\")) {\n      ctx.arg.auxiliary.push_back(arg);\n    } else if (read_arg(\"filter\") || read_arg(\"F\")) {\n      ctx.arg.filter.push_back(arg);\n    } else if (read_flag(\"allow-shlib-undefined\")) {\n      allow_shlib_undefined = true;\n    } else if (read_flag(\"no-allow-shlib-undefined\")) {\n      allow_shlib_undefined = false;\n    } else if (read_arg(\"O\")) {\n    } else if (read_flag(\"EB\")) {\n    } else if (read_flag(\"EL\")) {\n    } else if (read_flag(\"O0\")) {\n    } else if (read_flag(\"O1\")) {\n    } else if (read_flag(\"O2\")) {\n    } else if (read_flag(\"verbose\")) {\n    } else if (read_flag(\"color-diagnostics\")) {\n    } else if (read_flag(\"eh-frame-hdr\")) {\n    } else if (read_flag(\"start-group\")) {\n    } else if (read_flag(\"end-group\")) {\n    } else if (read_flag(\"(\")) {\n    } else if (read_flag(\")\")) {\n    } else if (read_flag(\"fatal-warnings\")) {\n    } else if (read_flag(\"enable-new-dtags\")) {\n    } else if (read_flag(\"disable-new-dtags\")) {\n    } else if (read_flag(\"nostdlib\")) {\n    } else if (read_flag(\"no-add-needed\")) {\n    } else if (read_flag(\"no-call-graph-profile-sort\")) {\n    } else if (read_flag(\"no-copy-dt-needed-entries\")) {\n    } else if (read_arg(\"sort-section\")) {\n    } else if (read_flag(\"sort-common\")) {\n    } else if (read_flag(\"dc\")) {\n    } else if (read_flag(\"dp\")) {\n    } else if (read_flag(\"fix-cortex-a53-835769\")) {\n    } else if (read_flag(\"fix-cortex-a53-843419\")) {\n    } else if (read_flag(\"EL\")) {\n    } else if (read_flag(\"warn-once\")) {\n    } else if (read_flag(\"nodefaultlibs\")) {\n    } else if (read_flag(\"warn-constructors\")) {\n    } else if (read_flag(\"warn-execstack\")) {\n    } else if (read_flag(\"no-warn-execstack\")) {\n    } else if (read_flag(\"long-plt\")) {\n    } else if (read_flag(\"secure-plt\")) {\n    } else if (read_arg(\"rpath-link\")) {\n    } else if (read_z_flag(\"combreloc\")) {\n    } else if (read_z_flag(\"nocombreloc\")) {\n    } else if (read_z_arg(\"common-page-size\")) {\n    } else if (read_flag(\"no-keep-memory\")) {\n    } else if (read_arg(\"max-cache-size\")) {\n    } else if (read_flag(\"mmap-output-file\")) {\n    } else if (read_flag(\"no-mmap-output-file\")) {\n    } else if (read_arg(\"version-script\")) {\n      version_scripts.push_back(arg);\n    } else if (read_arg(\"dynamic-list\")) {\n      ctx.arg.Bsymbolic = BSYMBOLIC_ALL;\n      append(ctx.dynamic_list_patterns, parse_dynamic_list(ctx, arg));\n    } else if (read_arg(\"dynamic-list-data\")) {\n      ctx.arg.dynamic_list_data = true;\n    } else if (read_arg(\"export-dynamic-symbol\")) {\n      ctx.dynamic_list_patterns.push_back({arg, \"<command line>\"});\n    } else if (read_arg(\"export-dynamic-symbol-list\")) {\n      append(ctx.dynamic_list_patterns, parse_dynamic_list(ctx, arg));\n    } else if (read_flag(\"as-needed\")) {\n      remaining.emplace_back(\"--as-needed\");\n    } else if (read_flag(\"no-as-needed\")) {\n      remaining.emplace_back(\"--no-as-needed\");\n    } else if (read_flag(\"whole-archive\")) {\n      remaining.emplace_back(\"--whole-archive\");\n    } else if (read_flag(\"no-whole-archive\")) {\n      remaining.emplace_back(\"--no-whole-archive\");\n    } else if (read_arg(\"l\") || read_arg(\"library\")) {\n      remaining.push_back(\"-l\" + std::string(arg));\n    } else if (read_arg(\"script\") || read_arg(\"T\")) {\n      remaining.emplace_back(arg);\n    } else if (read_flag(\"push-state\")) {\n      remaining.emplace_back(\"--push-state\");\n    } else if (read_flag(\"pop-state\")) {\n      remaining.emplace_back(\"--pop-state\");\n    } else if (args[0].starts_with(\"-z\") && args[0].size() > 2) {\n      Warn(ctx) << \"unknown command line option: \" << args[0];\n      args = args.subspan(1);\n    } else if (args[0] == \"-z\" && args.size() >= 2) {\n      Warn(ctx) << \"unknown command line option: -z \" << args[1];\n      args = args.subspan(2);\n    } else if (args[0] == \"-dynamic\") {\n      Fatal(ctx) << \"unknown command line option: -dynamic; -dynamic is a \"\n                 << \"macOS linker's option. mold does not support macOS.\";\n    } else {\n      if (args[0].starts_with('-'))\n        Fatal(ctx) << \"unknown command line option: \" << args[0];\n      remaining.emplace_back(args[0]);\n      args = args.subspan(1);\n    }\n  }\n\n  if (!ctx.arg.chroot.empty()) {\n    if (!ctx.arg.Map.empty())\n      ctx.arg.Map = ctx.arg.chroot + \"/\" + ctx.arg.Map;\n\n    if (!ctx.arg.dependency_file.empty())\n      ctx.arg.dependency_file = ctx.arg.chroot + \"/\" + ctx.arg.dependency_file;\n  }\n\n  if (!ctx.arg.directory.empty())\n    if (chdir(ctx.arg.directory.c_str()) == -1)\n      Fatal(ctx) << \"chdir failed: \" << ctx.arg.directory\n                 << \": \" << errno_string();\n\n  if (!ctx.arg.sysroot.empty()) {\n    for (std::string &path : ctx.arg.library_paths) {\n      if (std::string_view(path).starts_with('='))\n        path = ctx.arg.sysroot + path.substr(1);\n      else if (std::string_view(path).starts_with(\"$SYSROOT\"))\n        path = ctx.arg.sysroot + path.substr(8);\n    }\n  }\n\n  // Clean library paths by removing redundant `/..` and `/.`\n  // so that they are easier to read in log messages.\n  for (std::string &path : ctx.arg.library_paths)\n    path = path_clean(path);\n\n  if (ctx.arg.shared)\n    ctx.arg.pic = true;\n\n  if (ctx.arg.pic)\n    ctx.arg.image_base = 0;\n\n  if (allow_shlib_undefined)\n    ctx.arg.allow_shlib_undefined = *allow_shlib_undefined;\n  else\n    ctx.arg.allow_shlib_undefined = ctx.arg.shared;\n\n  if (!report_undefined)\n    report_undefined = !ctx.arg.shared;\n\n  if (*report_undefined) {\n    if (error_unresolved_symbols)\n      ctx.arg.unresolved_symbols = UNRESOLVED_ERROR;\n    else\n      ctx.arg.unresolved_symbols = UNRESOLVED_WARN;\n  } else {\n    ctx.arg.unresolved_symbols = UNRESOLVED_IGNORE;\n  }\n\n  if (ctx.arg.retain_symbols_file) {\n    ctx.arg.strip_all = false;\n    ctx.arg.discard_all = false;\n  }\n\n  if (ctx.arg.shuffle_sections == SHUFFLE_SECTIONS_SHUFFLE) {\n    if (shuffle_sections_seed)\n      ctx.arg.shuffle_sections_seed = *shuffle_sections_seed;\n    else\n      ctx.arg.shuffle_sections_seed =\n        ((u64)std::random_device()() << 32) | std::random_device()();\n  }\n\n  // --section-order implies `-z separate-loadable-segments`\n  if (z_separate_code)\n    ctx.arg.z_separate_code = *z_separate_code;\n  else if (!ctx.arg.section_order.empty())\n    ctx.arg.z_separate_code = SEPARATE_LOADABLE_SEGMENTS;\n\n  // `-z dynamic-undefined-weak` is enabled by default for DSOs.\n  if (z_dynamic_undefined_weak)\n    ctx.arg.z_dynamic_undefined_weak = *z_dynamic_undefined_weak;\n  else\n    ctx.arg.z_dynamic_undefined_weak = ctx.arg.shared;\n\n  // --section-order implies `-z norelro`\n  if (z_relro)\n    ctx.arg.z_relro = *z_relro;\n  else if (!ctx.arg.section_order.empty())\n    ctx.arg.z_relro = false;\n\n  if (ctx.arg.nmagic)\n    ctx.arg.z_relro = false;\n\n  if (!ctx.arg.shared) {\n    if (!ctx.arg.filter.empty())\n      Fatal(ctx) << \"-filter may not be used without -shared\";\n    if (!ctx.arg.auxiliary.empty())\n      Fatal(ctx) << \"-auxiliary may not be used without -shared\";\n  }\n\n  // Even though SH4 is RELA, addends in its relocation records are always\n  // zero, and actual addends are written to relocated places. So we need\n  // to handle it as an exception.\n  if constexpr (!E::is_rela || is_sh4<E>)\n    if (!ctx.arg.apply_dynamic_relocs)\n      Fatal(ctx) << \"--no-apply-dynamic-relocs may not be used on \" << E::name;\n\n  if constexpr (is_sparc<E>)\n    if (ctx.arg.apply_dynamic_relocs)\n      Fatal(ctx) << \"--apply-dynamic-relocs may not be used on SPARC64\";\n\n  if (!ctx.arg.section_start.empty() && !ctx.arg.section_order.empty())\n    Fatal(ctx) << \"--section-start may not be used with --section-order\";\n\n  if (ctx.arg.image_base % ctx.page_size)\n    Fatal(ctx) << \"-image-base must be a multiple of -max-page-size\";\n\n  if (ctx.arg.emulation == ARM32BE::name && !ctx.arg.be8)\n    Fatal(ctx) << \"--be32 is not supported\";\n\n  if (char *env = getenv(\"MOLD_REPRO\"); env && env[0])\n    ctx.arg.repro = true;\n\n  if (ctx.arg.default_symver) {\n    std::string ver = ctx.arg.soname;\n    if (ver.empty())\n      ver = path_filename(ctx.arg.output);\n    ctx.arg.version_definitions.push_back(ver);\n  }\n\n  for (std::string_view path : version_scripts) {\n    auto open = [&] {\n      if (MappedFile *mf = open_file(ctx, std::string(path)))\n        return mf;\n      for (std::string_view dir : ctx.arg.library_paths)\n        if (MappedFile *mf =\n            open_file(ctx, std::string(dir) + \"/\" + std::string(path)))\n          return mf;\n      Fatal(ctx) << \"--version-script: file not found: \" << path;\n    };\n\n    ReaderContext rctx;\n    Script(ctx, rctx, open()).parse_version_script();\n  }\n\n  if (separate_debug_file) {\n    if (separate_debug_file->empty())\n      ctx.arg.separate_debug_file = ctx.arg.output + \".dbg\";\n    else\n      ctx.arg.separate_debug_file = *separate_debug_file;\n  }\n\n  if (ctx.arg.shared && warn_shared_textrel)\n    ctx.arg.warn_textrel = true;\n\n  // We don't want the background process to write to stdout\n  if (ctx.arg.stats || ctx.arg.perf)\n    ctx.arg.detach = false;\n\n  ctx.arg.undefined.push_back(ctx.arg.entry);\n\n  for (i64 i = 0; i < ctx.arg.defsyms.size(); i++) {\n    std::variant<Symbol<E> *, u64> &val = ctx.arg.defsyms[i].second;\n    if (Symbol<E> **sym = std::get_if<Symbol<E> *>(&val))\n      ctx.arg.undefined.push_back(*sym);\n  }\n\n  // --oformat=binary implies --strip-all because without a section\n  // header, there's no way to identify the locations of a symbol\n  // table in an output file in the first place.\n  if (ctx.arg.oformat_binary)\n    ctx.arg.strip_all = true;\n\n  // By default, mold tries to ovewrite to an output file if exists\n  // because at least on Linux, writing to an existing file is much\n  // faster than creating a fresh file and writing to it.\n  //\n  // However, if an existing file is in use, writing to it will mess\n  // up processes that are executing that file. Linux prevents a write\n  // to a running executable file; it returns ETXTBSY on open(2).\n  // However, that mechanism doesn't protect .so files. Therefore, we\n  // want to disable this optimization if we are creating a shared\n  // object file.\n  ctx.overwrite_output_file = (!ctx.arg.shared && returns_etxtbsy());\n\n  // Mark GC root symbols\n  for (Symbol<E> *sym : ctx.arg.undefined)\n    sym->gc_root = true;\n  for (Symbol<E> *sym : ctx.arg.require_defined)\n    sym->gc_root = true;\n  ctx.arg.entry->gc_root = true;\n\n  if (version_shown && remaining.empty())\n    exit(0);\n  return remaining;\n}\n\nusing E = MOLD_TARGET;\n\ntemplate std::vector<std::string_view> expand_response_files(Context<E> &, char **);\ntemplate std::vector<std::string> parse_nonpositional_args(Context<E> &ctx);\n\n} // namespace mold\n"
  },
  {
    "path": "src/elf.cc",
    "content": "#include \"elf.h\"\n#include <sstream>\n\nnamespace mold {\n\nstatic std::string unknown_type(u32 r_type) {\n  std::stringstream ss;\n  ss << \"unknown (0x\" << std::hex << r_type << \")\";\n  return ss.str();\n}\n\n#define CASE(x) case x: return #x\n\ntemplate <>\nstd::string rel_to_string<X86_64>(u32 r_type) {\n  switch (r_type) {\n  CASE(R_X86_64_NONE);\n  CASE(R_X86_64_64);\n  CASE(R_X86_64_PC32);\n  CASE(R_X86_64_GOT32);\n  CASE(R_X86_64_PLT32);\n  CASE(R_X86_64_COPY);\n  CASE(R_X86_64_GLOB_DAT);\n  CASE(R_X86_64_JUMP_SLOT);\n  CASE(R_X86_64_RELATIVE);\n  CASE(R_X86_64_GOTPCREL);\n  CASE(R_X86_64_32);\n  CASE(R_X86_64_32S);\n  CASE(R_X86_64_16);\n  CASE(R_X86_64_PC16);\n  CASE(R_X86_64_8);\n  CASE(R_X86_64_PC8);\n  CASE(R_X86_64_DTPMOD64);\n  CASE(R_X86_64_DTPOFF64);\n  CASE(R_X86_64_TPOFF64);\n  CASE(R_X86_64_TLSGD);\n  CASE(R_X86_64_TLSLD);\n  CASE(R_X86_64_DTPOFF32);\n  CASE(R_X86_64_GOTTPOFF);\n  CASE(R_X86_64_TPOFF32);\n  CASE(R_X86_64_PC64);\n  CASE(R_X86_64_GOTOFF64);\n  CASE(R_X86_64_GOTPC32);\n  CASE(R_X86_64_GOT64);\n  CASE(R_X86_64_GOTPCREL64);\n  CASE(R_X86_64_GOTPC64);\n  CASE(R_X86_64_GOTPLT64);\n  CASE(R_X86_64_PLTOFF64);\n  CASE(R_X86_64_SIZE32);\n  CASE(R_X86_64_SIZE64);\n  CASE(R_X86_64_GOTPC32_TLSDESC);\n  CASE(R_X86_64_TLSDESC_CALL);\n  CASE(R_X86_64_TLSDESC);\n  CASE(R_X86_64_IRELATIVE);\n  CASE(R_X86_64_GOTPCRELX);\n  CASE(R_X86_64_REX_GOTPCRELX);\n  CASE(R_X86_64_CODE_4_GOTPCRELX);\n  CASE(R_X86_64_CODE_4_GOTTPOFF);\n  CASE(R_X86_64_CODE_4_GOTPC32_TLSDESC);\n  CASE(R_X86_64_CODE_5_GOTPCRELX);\n  CASE(R_X86_64_CODE_5_GOTTPOFF);\n  CASE(R_X86_64_CODE_5_GOTPC32_TLSDESC);\n  CASE(R_X86_64_CODE_6_GOTPCRELX);\n  CASE(R_X86_64_CODE_6_GOTTPOFF);\n  CASE(R_X86_64_CODE_6_GOTPC32_TLSDESC);\n  }\n  return unknown_type(r_type);\n}\n\ntemplate <>\nstd::string rel_to_string<I386>(u32 r_type) {\n  switch (r_type) {\n  CASE(R_386_NONE);\n  CASE(R_386_32);\n  CASE(R_386_PC32);\n  CASE(R_386_GOT32);\n  CASE(R_386_PLT32);\n  CASE(R_386_COPY);\n  CASE(R_386_GLOB_DAT);\n  CASE(R_386_JUMP_SLOT);\n  CASE(R_386_RELATIVE);\n  CASE(R_386_GOTOFF);\n  CASE(R_386_GOTPC);\n  CASE(R_386_32PLT);\n  CASE(R_386_TLS_TPOFF);\n  CASE(R_386_TLS_IE);\n  CASE(R_386_TLS_GOTIE);\n  CASE(R_386_TLS_LE);\n  CASE(R_386_TLS_GD);\n  CASE(R_386_TLS_LDM);\n  CASE(R_386_16);\n  CASE(R_386_PC16);\n  CASE(R_386_8);\n  CASE(R_386_PC8);\n  CASE(R_386_TLS_GD_32);\n  CASE(R_386_TLS_GD_PUSH);\n  CASE(R_386_TLS_GD_CALL);\n  CASE(R_386_TLS_GD_POP);\n  CASE(R_386_TLS_LDM_32);\n  CASE(R_386_TLS_LDM_PUSH);\n  CASE(R_386_TLS_LDM_CALL);\n  CASE(R_386_TLS_LDM_POP);\n  CASE(R_386_TLS_LDO_32);\n  CASE(R_386_TLS_IE_32);\n  CASE(R_386_TLS_LE_32);\n  CASE(R_386_TLS_DTPMOD32);\n  CASE(R_386_TLS_DTPOFF32);\n  CASE(R_386_TLS_TPOFF32);\n  CASE(R_386_SIZE32);\n  CASE(R_386_TLS_GOTDESC);\n  CASE(R_386_TLS_DESC_CALL);\n  CASE(R_386_TLS_DESC);\n  CASE(R_386_IRELATIVE);\n  CASE(R_386_GOT32X);\n  }\n  return unknown_type(r_type);\n}\n\ntemplate <>\nstd::string rel_to_string<ARM64LE>(u32 r_type) {\n  switch (r_type) {\n  CASE(R_AARCH64_NONE);\n  CASE(R_AARCH64_ABS64);\n  CASE(R_AARCH64_ABS32);\n  CASE(R_AARCH64_ABS16);\n  CASE(R_AARCH64_PREL64);\n  CASE(R_AARCH64_PREL32);\n  CASE(R_AARCH64_PREL16);\n  CASE(R_AARCH64_MOVW_UABS_G0);\n  CASE(R_AARCH64_MOVW_UABS_G0_NC);\n  CASE(R_AARCH64_MOVW_UABS_G1);\n  CASE(R_AARCH64_MOVW_UABS_G1_NC);\n  CASE(R_AARCH64_MOVW_UABS_G2);\n  CASE(R_AARCH64_MOVW_UABS_G2_NC);\n  CASE(R_AARCH64_MOVW_UABS_G3);\n  CASE(R_AARCH64_MOVW_SABS_G0);\n  CASE(R_AARCH64_MOVW_SABS_G1);\n  CASE(R_AARCH64_MOVW_SABS_G2);\n  CASE(R_AARCH64_LD_PREL_LO19);\n  CASE(R_AARCH64_ADR_PREL_LO21);\n  CASE(R_AARCH64_ADR_PREL_PG_HI21);\n  CASE(R_AARCH64_ADR_PREL_PG_HI21_NC);\n  CASE(R_AARCH64_ADD_ABS_LO12_NC);\n  CASE(R_AARCH64_LDST8_ABS_LO12_NC);\n  CASE(R_AARCH64_TSTBR14);\n  CASE(R_AARCH64_CONDBR19);\n  CASE(R_AARCH64_JUMP26);\n  CASE(R_AARCH64_CALL26);\n  CASE(R_AARCH64_LDST16_ABS_LO12_NC);\n  CASE(R_AARCH64_LDST32_ABS_LO12_NC);\n  CASE(R_AARCH64_LDST64_ABS_LO12_NC);\n  CASE(R_AARCH64_MOVW_PREL_G0);\n  CASE(R_AARCH64_MOVW_PREL_G0_NC);\n  CASE(R_AARCH64_MOVW_PREL_G1);\n  CASE(R_AARCH64_MOVW_PREL_G1_NC);\n  CASE(R_AARCH64_MOVW_PREL_G2);\n  CASE(R_AARCH64_MOVW_PREL_G2_NC);\n  CASE(R_AARCH64_MOVW_PREL_G3);\n  CASE(R_AARCH64_LDST128_ABS_LO12_NC);\n  CASE(R_AARCH64_ADR_GOT_PAGE);\n  CASE(R_AARCH64_LD64_GOT_LO12_NC);\n  CASE(R_AARCH64_LD64_GOTPAGE_LO15);\n  CASE(R_AARCH64_PLT32);\n  CASE(R_AARCH64_TLSGD_ADR_PREL21);\n  CASE(R_AARCH64_TLSGD_ADR_PAGE21);\n  CASE(R_AARCH64_TLSGD_ADD_LO12_NC);\n  CASE(R_AARCH64_TLSGD_MOVW_G1);\n  CASE(R_AARCH64_TLSGD_MOVW_G0_NC);\n  CASE(R_AARCH64_TLSLD_ADR_PREL21);\n  CASE(R_AARCH64_TLSLD_ADR_PAGE21);\n  CASE(R_AARCH64_TLSLD_ADD_LO12_NC);\n  CASE(R_AARCH64_TLSLD_MOVW_G1);\n  CASE(R_AARCH64_TLSLD_MOVW_G0_NC);\n  CASE(R_AARCH64_TLSLD_LD_PREL19);\n  CASE(R_AARCH64_TLSLD_MOVW_DTPREL_G2);\n  CASE(R_AARCH64_TLSLD_MOVW_DTPREL_G1);\n  CASE(R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC);\n  CASE(R_AARCH64_TLSLD_MOVW_DTPREL_G0);\n  CASE(R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC);\n  CASE(R_AARCH64_TLSLD_ADD_DTPREL_HI12);\n  CASE(R_AARCH64_TLSLD_ADD_DTPREL_LO12);\n  CASE(R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC);\n  CASE(R_AARCH64_TLSLD_LDST8_DTPREL_LO12);\n  CASE(R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC);\n  CASE(R_AARCH64_TLSLD_LDST16_DTPREL_LO12);\n  CASE(R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC);\n  CASE(R_AARCH64_TLSLD_LDST32_DTPREL_LO12);\n  CASE(R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC);\n  CASE(R_AARCH64_TLSLD_LDST64_DTPREL_LO12);\n  CASE(R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC);\n  CASE(R_AARCH64_TLSIE_MOVW_GOTTPREL_G1);\n  CASE(R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC);\n  CASE(R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21);\n  CASE(R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC);\n  CASE(R_AARCH64_TLSIE_LD_GOTTPREL_PREL19);\n  CASE(R_AARCH64_TLSLE_MOVW_TPREL_G2);\n  CASE(R_AARCH64_TLSLE_MOVW_TPREL_G1);\n  CASE(R_AARCH64_TLSLE_MOVW_TPREL_G1_NC);\n  CASE(R_AARCH64_TLSLE_MOVW_TPREL_G0);\n  CASE(R_AARCH64_TLSLE_MOVW_TPREL_G0_NC);\n  CASE(R_AARCH64_TLSLE_ADD_TPREL_HI12);\n  CASE(R_AARCH64_TLSLE_ADD_TPREL_LO12);\n  CASE(R_AARCH64_TLSLE_ADD_TPREL_LO12_NC);\n  CASE(R_AARCH64_TLSLE_LDST8_TPREL_LO12);\n  CASE(R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC);\n  CASE(R_AARCH64_TLSLE_LDST16_TPREL_LO12);\n  CASE(R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC);\n  CASE(R_AARCH64_TLSLE_LDST32_TPREL_LO12);\n  CASE(R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC);\n  CASE(R_AARCH64_TLSLE_LDST64_TPREL_LO12);\n  CASE(R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC);\n  CASE(R_AARCH64_TLSDESC_ADR_PAGE21);\n  CASE(R_AARCH64_TLSDESC_LD64_LO12);\n  CASE(R_AARCH64_TLSDESC_ADD_LO12);\n  CASE(R_AARCH64_TLSDESC_CALL);\n  CASE(R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC);\n  CASE(R_AARCH64_COPY);\n  CASE(R_AARCH64_GLOB_DAT);\n  CASE(R_AARCH64_JUMP_SLOT);\n  CASE(R_AARCH64_RELATIVE);\n  CASE(R_AARCH64_TLS_DTPMOD64);\n  CASE(R_AARCH64_TLS_DTPREL64);\n  CASE(R_AARCH64_TLS_TPREL64);\n  CASE(R_AARCH64_TLSDESC);\n  CASE(R_AARCH64_IRELATIVE);\n  }\n  return unknown_type(r_type);\n}\n\ntemplate <>\nstd::string rel_to_string<ARM64BE>(u32 r_type) {\n  return rel_to_string<ARM64LE>(r_type);\n}\n\ntemplate <>\nstd::string rel_to_string<ARM32LE>(u32 r_type) {\n  switch (r_type) {\n  CASE(R_ARM_NONE);\n  CASE(R_ARM_PC24);\n  CASE(R_ARM_ABS32);\n  CASE(R_ARM_REL32);\n  CASE(R_ARM_LDR_PC_G0);\n  CASE(R_ARM_ABS16);\n  CASE(R_ARM_ABS12);\n  CASE(R_ARM_THM_ABS5);\n  CASE(R_ARM_ABS8);\n  CASE(R_ARM_SBREL32);\n  CASE(R_ARM_THM_CALL);\n  CASE(R_ARM_THM_PC8);\n  CASE(R_ARM_BREL_ADJ);\n  CASE(R_ARM_TLS_DESC);\n  CASE(R_ARM_THM_SWI8);\n  CASE(R_ARM_XPC25);\n  CASE(R_ARM_THM_XPC22);\n  CASE(R_ARM_TLS_DTPMOD32);\n  CASE(R_ARM_TLS_DTPOFF32);\n  CASE(R_ARM_TLS_TPOFF32);\n  CASE(R_ARM_COPY);\n  CASE(R_ARM_GLOB_DAT);\n  CASE(R_ARM_JUMP_SLOT);\n  CASE(R_ARM_RELATIVE);\n  CASE(R_ARM_GOTOFF32);\n  CASE(R_ARM_BASE_PREL);\n  CASE(R_ARM_GOT_BREL);\n  CASE(R_ARM_PLT32);\n  CASE(R_ARM_CALL);\n  CASE(R_ARM_JUMP24);\n  CASE(R_ARM_THM_JUMP24);\n  CASE(R_ARM_BASE_ABS);\n  CASE(R_ARM_ALU_PCREL_7_0);\n  CASE(R_ARM_ALU_PCREL_15_8);\n  CASE(R_ARM_ALU_PCREL_23_15);\n  CASE(R_ARM_LDR_SBREL_11_0_NC);\n  CASE(R_ARM_ALU_SBREL_19_12_NC);\n  CASE(R_ARM_ALU_SBREL_27_20_CK);\n  CASE(R_ARM_TARGET1);\n  CASE(R_ARM_SBREL31);\n  CASE(R_ARM_V4BX);\n  CASE(R_ARM_TARGET2);\n  CASE(R_ARM_PREL31);\n  CASE(R_ARM_MOVW_ABS_NC);\n  CASE(R_ARM_MOVT_ABS);\n  CASE(R_ARM_MOVW_PREL_NC);\n  CASE(R_ARM_MOVT_PREL);\n  CASE(R_ARM_THM_MOVW_ABS_NC);\n  CASE(R_ARM_THM_MOVT_ABS);\n  CASE(R_ARM_THM_MOVW_PREL_NC);\n  CASE(R_ARM_THM_MOVT_PREL);\n  CASE(R_ARM_THM_JUMP19);\n  CASE(R_ARM_THM_JUMP6);\n  CASE(R_ARM_THM_ALU_PREL_11_0);\n  CASE(R_ARM_THM_PC12);\n  CASE(R_ARM_ABS32_NOI);\n  CASE(R_ARM_REL32_NOI);\n  CASE(R_ARM_ALU_PC_G0_NC);\n  CASE(R_ARM_ALU_PC_G0);\n  CASE(R_ARM_ALU_PC_G1_NC);\n  CASE(R_ARM_ALU_PC_G1);\n  CASE(R_ARM_ALU_PC_G2);\n  CASE(R_ARM_LDR_PC_G1);\n  CASE(R_ARM_LDR_PC_G2);\n  CASE(R_ARM_LDRS_PC_G0);\n  CASE(R_ARM_LDRS_PC_G1);\n  CASE(R_ARM_LDRS_PC_G2);\n  CASE(R_ARM_LDC_PC_G0);\n  CASE(R_ARM_LDC_PC_G1);\n  CASE(R_ARM_LDC_PC_G2);\n  CASE(R_ARM_ALU_SB_G0_NC);\n  CASE(R_ARM_ALU_SB_G0);\n  CASE(R_ARM_ALU_SB_G1_NC);\n  CASE(R_ARM_ALU_SB_G1);\n  CASE(R_ARM_ALU_SB_G2);\n  CASE(R_ARM_LDR_SB_G0);\n  CASE(R_ARM_LDR_SB_G1);\n  CASE(R_ARM_LDR_SB_G2);\n  CASE(R_ARM_LDRS_SB_G0);\n  CASE(R_ARM_LDRS_SB_G1);\n  CASE(R_ARM_LDRS_SB_G2);\n  CASE(R_ARM_LDC_SB_G0);\n  CASE(R_ARM_LDC_SB_G1);\n  CASE(R_ARM_LDC_SB_G2);\n  CASE(R_ARM_MOVW_BREL_NC);\n  CASE(R_ARM_MOVT_BREL);\n  CASE(R_ARM_MOVW_BREL);\n  CASE(R_ARM_THM_MOVW_BREL_NC);\n  CASE(R_ARM_THM_MOVT_BREL);\n  CASE(R_ARM_THM_MOVW_BREL);\n  CASE(R_ARM_TLS_GOTDESC);\n  CASE(R_ARM_TLS_CALL);\n  CASE(R_ARM_TLS_DESCSEQ);\n  CASE(R_ARM_THM_TLS_CALL);\n  CASE(R_ARM_PLT32_ABS);\n  CASE(R_ARM_GOT_ABS);\n  CASE(R_ARM_GOT_PREL);\n  CASE(R_ARM_GOT_BREL12);\n  CASE(R_ARM_GOTOFF12);\n  CASE(R_ARM_GOTRELAX);\n  CASE(R_ARM_GNU_VTENTRY);\n  CASE(R_ARM_GNU_VTINHERIT);\n  CASE(R_ARM_THM_JUMP11);\n  CASE(R_ARM_THM_JUMP8);\n  CASE(R_ARM_TLS_GD32);\n  CASE(R_ARM_TLS_LDM32);\n  CASE(R_ARM_TLS_LDO32);\n  CASE(R_ARM_TLS_IE32);\n  CASE(R_ARM_TLS_LE32);\n  CASE(R_ARM_TLS_LDO12);\n  CASE(R_ARM_TLS_LE12);\n  CASE(R_ARM_TLS_IE12GP);\n  CASE(R_ARM_PRIVATE_0);\n  CASE(R_ARM_PRIVATE_1);\n  CASE(R_ARM_PRIVATE_2);\n  CASE(R_ARM_PRIVATE_3);\n  CASE(R_ARM_PRIVATE_4);\n  CASE(R_ARM_PRIVATE_5);\n  CASE(R_ARM_PRIVATE_6);\n  CASE(R_ARM_PRIVATE_7);\n  CASE(R_ARM_PRIVATE_8);\n  CASE(R_ARM_PRIVATE_9);\n  CASE(R_ARM_PRIVATE_10);\n  CASE(R_ARM_PRIVATE_11);\n  CASE(R_ARM_PRIVATE_12);\n  CASE(R_ARM_PRIVATE_13);\n  CASE(R_ARM_PRIVATE_14);\n  CASE(R_ARM_PRIVATE_15);\n  CASE(R_ARM_ME_TOO);\n  CASE(R_ARM_THM_TLS_DESCSEQ16);\n  CASE(R_ARM_THM_TLS_DESCSEQ32);\n  CASE(R_ARM_THM_BF16);\n  CASE(R_ARM_THM_BF12);\n  CASE(R_ARM_THM_BF18);\n  CASE(R_ARM_IRELATIVE);\n  }\n  return unknown_type(r_type);\n}\n\ntemplate <>\nstd::string rel_to_string<ARM32BE>(u32 r_type) {\n  return rel_to_string<ARM32LE>(r_type);\n}\n\ntemplate <>\nstd::string rel_to_string<RV64LE>(u32 r_type) {\n  switch (r_type) {\n  CASE(R_RISCV_NONE);\n  CASE(R_RISCV_32);\n  CASE(R_RISCV_64);\n  CASE(R_RISCV_RELATIVE);\n  CASE(R_RISCV_COPY);\n  CASE(R_RISCV_JUMP_SLOT);\n  CASE(R_RISCV_TLS_DTPMOD32);\n  CASE(R_RISCV_TLS_DTPMOD64);\n  CASE(R_RISCV_TLS_DTPREL32);\n  CASE(R_RISCV_TLS_DTPREL64);\n  CASE(R_RISCV_TLS_TPREL32);\n  CASE(R_RISCV_TLS_TPREL64);\n  CASE(R_RISCV_BRANCH);\n  CASE(R_RISCV_JAL);\n  CASE(R_RISCV_CALL);\n  CASE(R_RISCV_CALL_PLT);\n  CASE(R_RISCV_GOT_HI20);\n  CASE(R_RISCV_TLS_GOT_HI20);\n  CASE(R_RISCV_TLS_GD_HI20);\n  CASE(R_RISCV_PCREL_HI20);\n  CASE(R_RISCV_PCREL_LO12_I);\n  CASE(R_RISCV_PCREL_LO12_S);\n  CASE(R_RISCV_HI20);\n  CASE(R_RISCV_LO12_I);\n  CASE(R_RISCV_LO12_S);\n  CASE(R_RISCV_TPREL_HI20);\n  CASE(R_RISCV_TPREL_LO12_I);\n  CASE(R_RISCV_TPREL_LO12_S);\n  CASE(R_RISCV_TPREL_ADD);\n  CASE(R_RISCV_ADD8);\n  CASE(R_RISCV_ADD16);\n  CASE(R_RISCV_ADD32);\n  CASE(R_RISCV_ADD64);\n  CASE(R_RISCV_SUB8);\n  CASE(R_RISCV_SUB16);\n  CASE(R_RISCV_SUB32);\n  CASE(R_RISCV_SUB64);\n  CASE(R_RISCV_ALIGN);\n  CASE(R_RISCV_RVC_BRANCH);\n  CASE(R_RISCV_RVC_JUMP);\n  CASE(R_RISCV_RELAX);\n  CASE(R_RISCV_SUB6);\n  CASE(R_RISCV_SET6);\n  CASE(R_RISCV_SET8);\n  CASE(R_RISCV_SET16);\n  CASE(R_RISCV_SET32);\n  CASE(R_RISCV_32_PCREL);\n  CASE(R_RISCV_IRELATIVE);\n  CASE(R_RISCV_PLT32);\n  CASE(R_RISCV_SET_ULEB128);\n  CASE(R_RISCV_SUB_ULEB128);\n  CASE(R_RISCV_TLSDESC_HI20);\n  CASE(R_RISCV_TLSDESC_LOAD_LO12);\n  CASE(R_RISCV_TLSDESC_ADD_LO12);\n  CASE(R_RISCV_TLSDESC_CALL);\n  }\n  return unknown_type(r_type);\n}\n\ntemplate <>\nstd::string rel_to_string<RV64BE>(u32 r_type) {\n  return rel_to_string<RV64LE>(r_type);\n}\n\ntemplate <>\nstd::string rel_to_string<RV32LE>(u32 r_type) {\n  return rel_to_string<RV64LE>(r_type);\n}\n\ntemplate <>\nstd::string rel_to_string<RV32BE>(u32 r_type) {\n  return rel_to_string<RV64LE>(r_type);\n}\n\ntemplate <>\nstd::string rel_to_string<PPC32>(u32 r_type) {\n  switch (r_type) {\n  CASE(R_PPC_NONE);\n  CASE(R_PPC_ADDR32);\n  CASE(R_PPC_ADDR24);\n  CASE(R_PPC_ADDR16);\n  CASE(R_PPC_ADDR16_LO);\n  CASE(R_PPC_ADDR16_HI);\n  CASE(R_PPC_ADDR16_HA);\n  CASE(R_PPC_ADDR14);\n  CASE(R_PPC_ADDR14_BRTAKEN);\n  CASE(R_PPC_ADDR14_BRNTAKEN);\n  CASE(R_PPC_REL24);\n  CASE(R_PPC_REL14);\n  CASE(R_PPC_REL14_BRTAKEN);\n  CASE(R_PPC_REL14_BRNTAKEN);\n  CASE(R_PPC_GOT16);\n  CASE(R_PPC_GOT16_LO);\n  CASE(R_PPC_GOT16_HI);\n  CASE(R_PPC_GOT16_HA);\n  CASE(R_PPC_PLTREL24);\n  CASE(R_PPC_COPY);\n  CASE(R_PPC_GLOB_DAT);\n  CASE(R_PPC_JMP_SLOT);\n  CASE(R_PPC_RELATIVE);\n  CASE(R_PPC_LOCAL24PC);\n  CASE(R_PPC_UADDR32);\n  CASE(R_PPC_UADDR16);\n  CASE(R_PPC_REL32);\n  CASE(R_PPC_PLT32);\n  CASE(R_PPC_PLTREL32);\n  CASE(R_PPC_PLT16_LO);\n  CASE(R_PPC_PLT16_HI);\n  CASE(R_PPC_PLT16_HA);\n  CASE(R_PPC_SDAREL16);\n  CASE(R_PPC_SECTOFF);\n  CASE(R_PPC_SECTOFF_LO);\n  CASE(R_PPC_SECTOFF_HI);\n  CASE(R_PPC_SECTOFF_HA);\n  CASE(R_PPC_ADDR30);\n  CASE(R_PPC_TLS);\n  CASE(R_PPC_DTPMOD32);\n  CASE(R_PPC_TPREL16);\n  CASE(R_PPC_TPREL16_LO);\n  CASE(R_PPC_TPREL16_HI);\n  CASE(R_PPC_TPREL16_HA);\n  CASE(R_PPC_TPREL32);\n  CASE(R_PPC_DTPREL16);\n  CASE(R_PPC_DTPREL16_LO);\n  CASE(R_PPC_DTPREL16_HI);\n  CASE(R_PPC_DTPREL16_HA);\n  CASE(R_PPC_DTPREL32);\n  CASE(R_PPC_GOT_TLSGD16);\n  CASE(R_PPC_GOT_TLSGD16_LO);\n  CASE(R_PPC_GOT_TLSGD16_HI);\n  CASE(R_PPC_GOT_TLSGD16_HA);\n  CASE(R_PPC_GOT_TLSLD16);\n  CASE(R_PPC_GOT_TLSLD16_LO);\n  CASE(R_PPC_GOT_TLSLD16_HI);\n  CASE(R_PPC_GOT_TLSLD16_HA);\n  CASE(R_PPC_GOT_TPREL16);\n  CASE(R_PPC_GOT_TPREL16_LO);\n  CASE(R_PPC_GOT_TPREL16_HI);\n  CASE(R_PPC_GOT_TPREL16_HA);\n  CASE(R_PPC_GOT_DTPREL16);\n  CASE(R_PPC_GOT_DTPREL16_LO);\n  CASE(R_PPC_GOT_DTPREL16_HI);\n  CASE(R_PPC_GOT_DTPREL16_HA);\n  CASE(R_PPC_TLSGD);\n  CASE(R_PPC_TLSLD);\n  CASE(R_PPC_PLTSEQ);\n  CASE(R_PPC_PLTCALL);\n  CASE(R_PPC_IRELATIVE);\n  CASE(R_PPC_REL16);\n  CASE(R_PPC_REL16_LO);\n  CASE(R_PPC_REL16_HI);\n  CASE(R_PPC_REL16_HA);\n  }\n  return unknown_type(r_type);\n}\n\ntemplate <>\nstd::string rel_to_string<PPC64V1>(u32 r_type) {\n  switch (r_type) {\n  CASE(R_PPC64_NONE);\n  CASE(R_PPC64_ADDR32);\n  CASE(R_PPC64_ADDR24);\n  CASE(R_PPC64_ADDR16);\n  CASE(R_PPC64_ADDR16_LO);\n  CASE(R_PPC64_ADDR16_HI);\n  CASE(R_PPC64_ADDR16_HA);\n  CASE(R_PPC64_ADDR14);\n  CASE(R_PPC64_ADDR14_BRTAKEN);\n  CASE(R_PPC64_ADDR14_BRNTAKEN);\n  CASE(R_PPC64_REL24);\n  CASE(R_PPC64_REL14);\n  CASE(R_PPC64_REL14_BRTAKEN);\n  CASE(R_PPC64_REL14_BRNTAKEN);\n  CASE(R_PPC64_GOT16);\n  CASE(R_PPC64_GOT16_LO);\n  CASE(R_PPC64_GOT16_HI);\n  CASE(R_PPC64_GOT16_HA);\n  CASE(R_PPC64_COPY);\n  CASE(R_PPC64_GLOB_DAT);\n  CASE(R_PPC64_JMP_SLOT);\n  CASE(R_PPC64_RELATIVE);\n  CASE(R_PPC64_REL32);\n  CASE(R_PPC64_PLT16_LO);\n  CASE(R_PPC64_PLT16_HI);\n  CASE(R_PPC64_PLT16_HA);\n  CASE(R_PPC64_ADDR64);\n  CASE(R_PPC64_ADDR16_HIGHER);\n  CASE(R_PPC64_ADDR16_HIGHERA);\n  CASE(R_PPC64_ADDR16_HIGHEST);\n  CASE(R_PPC64_ADDR16_HIGHESTA);\n  CASE(R_PPC64_REL64);\n  CASE(R_PPC64_TOC16);\n  CASE(R_PPC64_TOC16_LO);\n  CASE(R_PPC64_TOC16_HI);\n  CASE(R_PPC64_TOC16_HA);\n  CASE(R_PPC64_TOC);\n  CASE(R_PPC64_ADDR16_DS);\n  CASE(R_PPC64_ADDR16_LO_DS);\n  CASE(R_PPC64_GOT16_DS);\n  CASE(R_PPC64_GOT16_LO_DS);\n  CASE(R_PPC64_PLT16_LO_DS);\n  CASE(R_PPC64_TOC16_DS);\n  CASE(R_PPC64_TOC16_LO_DS);\n  CASE(R_PPC64_TLS);\n  CASE(R_PPC64_DTPMOD64);\n  CASE(R_PPC64_TPREL16);\n  CASE(R_PPC64_TPREL16_LO);\n  CASE(R_PPC64_TPREL16_HI);\n  CASE(R_PPC64_TPREL16_HA);\n  CASE(R_PPC64_TPREL64);\n  CASE(R_PPC64_DTPREL16);\n  CASE(R_PPC64_DTPREL16_LO);\n  CASE(R_PPC64_DTPREL16_HI);\n  CASE(R_PPC64_DTPREL16_HA);\n  CASE(R_PPC64_DTPREL64);\n  CASE(R_PPC64_GOT_TLSGD16);\n  CASE(R_PPC64_GOT_TLSGD16_LO);\n  CASE(R_PPC64_GOT_TLSGD16_HI);\n  CASE(R_PPC64_GOT_TLSGD16_HA);\n  CASE(R_PPC64_GOT_TLSLD16);\n  CASE(R_PPC64_GOT_TLSLD16_LO);\n  CASE(R_PPC64_GOT_TLSLD16_HI);\n  CASE(R_PPC64_GOT_TLSLD16_HA);\n  CASE(R_PPC64_GOT_TPREL16_DS);\n  CASE(R_PPC64_GOT_TPREL16_LO_DS);\n  CASE(R_PPC64_GOT_TPREL16_HI);\n  CASE(R_PPC64_GOT_TPREL16_HA);\n  CASE(R_PPC64_GOT_DTPREL16_DS);\n  CASE(R_PPC64_GOT_DTPREL16_LO_DS);\n  CASE(R_PPC64_GOT_DTPREL16_HI);\n  CASE(R_PPC64_GOT_DTPREL16_HA);\n  CASE(R_PPC64_TPREL16_DS);\n  CASE(R_PPC64_TPREL16_LO_DS);\n  CASE(R_PPC64_TPREL16_HIGHER);\n  CASE(R_PPC64_TPREL16_HIGHERA);\n  CASE(R_PPC64_TPREL16_HIGHEST);\n  CASE(R_PPC64_TPREL16_HIGHESTA);\n  CASE(R_PPC64_DTPREL16_DS);\n  CASE(R_PPC64_DTPREL16_LO_DS);\n  CASE(R_PPC64_DTPREL16_HIGHER);\n  CASE(R_PPC64_DTPREL16_HIGHERA);\n  CASE(R_PPC64_DTPREL16_HIGHEST);\n  CASE(R_PPC64_DTPREL16_HIGHESTA);\n  CASE(R_PPC64_TLSGD);\n  CASE(R_PPC64_TLSLD);\n  CASE(R_PPC64_ADDR16_HIGH);\n  CASE(R_PPC64_ADDR16_HIGHA);\n  CASE(R_PPC64_TPREL16_HIGH);\n  CASE(R_PPC64_TPREL16_HIGHA);\n  CASE(R_PPC64_DTPREL16_HIGH);\n  CASE(R_PPC64_DTPREL16_HIGHA);\n  CASE(R_PPC64_REL24_NOTOC);\n  CASE(R_PPC64_ENTRY);\n  CASE(R_PPC64_PLTSEQ);\n  CASE(R_PPC64_PLTCALL);\n  CASE(R_PPC64_PLTSEQ_NOTOC);\n  CASE(R_PPC64_PLTCALL_NOTOC);\n  CASE(R_PPC64_PCREL_OPT);\n  CASE(R_PPC64_PCREL34);\n  CASE(R_PPC64_GOT_PCREL34);\n  CASE(R_PPC64_PLT_PCREL34);\n  CASE(R_PPC64_PLT_PCREL34_NOTOC);\n  CASE(R_PPC64_TPREL34);\n  CASE(R_PPC64_DTPREL34);\n  CASE(R_PPC64_GOT_TLSGD_PCREL34);\n  CASE(R_PPC64_GOT_TLSLD_PCREL34);\n  CASE(R_PPC64_GOT_TPREL_PCREL34);\n  CASE(R_PPC64_IRELATIVE);\n  CASE(R_PPC64_REL16);\n  CASE(R_PPC64_REL16_LO);\n  CASE(R_PPC64_REL16_HI);\n  CASE(R_PPC64_REL16_HA);\n  }\n  return unknown_type(r_type);\n}\n\ntemplate <>\nstd::string rel_to_string<PPC64V2>(u32 r_type) {\n  return rel_to_string<PPC64V1>(r_type);\n}\n\ntemplate <>\nstd::string rel_to_string<SPARC64>(u32 r_type) {\n  switch (r_type) {\n  CASE(R_SPARC_NONE);\n  CASE(R_SPARC_8);\n  CASE(R_SPARC_16);\n  CASE(R_SPARC_32);\n  CASE(R_SPARC_DISP8);\n  CASE(R_SPARC_DISP16);\n  CASE(R_SPARC_DISP32);\n  CASE(R_SPARC_WDISP30);\n  CASE(R_SPARC_WDISP22);\n  CASE(R_SPARC_HI22);\n  CASE(R_SPARC_22);\n  CASE(R_SPARC_13);\n  CASE(R_SPARC_LO10);\n  CASE(R_SPARC_GOT10);\n  CASE(R_SPARC_GOT13);\n  CASE(R_SPARC_GOT22);\n  CASE(R_SPARC_PC10);\n  CASE(R_SPARC_PC22);\n  CASE(R_SPARC_WPLT30);\n  CASE(R_SPARC_COPY);\n  CASE(R_SPARC_GLOB_DAT);\n  CASE(R_SPARC_JMP_SLOT);\n  CASE(R_SPARC_RELATIVE);\n  CASE(R_SPARC_UA32);\n  CASE(R_SPARC_PLT32);\n  CASE(R_SPARC_HIPLT22);\n  CASE(R_SPARC_LOPLT10);\n  CASE(R_SPARC_PCPLT32);\n  CASE(R_SPARC_PCPLT22);\n  CASE(R_SPARC_PCPLT10);\n  CASE(R_SPARC_10);\n  CASE(R_SPARC_11);\n  CASE(R_SPARC_64);\n  CASE(R_SPARC_OLO10);\n  CASE(R_SPARC_HH22);\n  CASE(R_SPARC_HM10);\n  CASE(R_SPARC_LM22);\n  CASE(R_SPARC_PC_HH22);\n  CASE(R_SPARC_PC_HM10);\n  CASE(R_SPARC_PC_LM22);\n  CASE(R_SPARC_WDISP16);\n  CASE(R_SPARC_WDISP19);\n  CASE(R_SPARC_7);\n  CASE(R_SPARC_5);\n  CASE(R_SPARC_6);\n  CASE(R_SPARC_DISP64);\n  CASE(R_SPARC_PLT64);\n  CASE(R_SPARC_HIX22);\n  CASE(R_SPARC_LOX10);\n  CASE(R_SPARC_H44);\n  CASE(R_SPARC_M44);\n  CASE(R_SPARC_L44);\n  CASE(R_SPARC_REGISTER);\n  CASE(R_SPARC_UA64);\n  CASE(R_SPARC_UA16);\n  CASE(R_SPARC_TLS_GD_HI22);\n  CASE(R_SPARC_TLS_GD_LO10);\n  CASE(R_SPARC_TLS_GD_ADD);\n  CASE(R_SPARC_TLS_GD_CALL);\n  CASE(R_SPARC_TLS_LDM_HI22);\n  CASE(R_SPARC_TLS_LDM_LO10);\n  CASE(R_SPARC_TLS_LDM_ADD);\n  CASE(R_SPARC_TLS_LDM_CALL);\n  CASE(R_SPARC_TLS_LDO_HIX22);\n  CASE(R_SPARC_TLS_LDO_LOX10);\n  CASE(R_SPARC_TLS_LDO_ADD);\n  CASE(R_SPARC_TLS_IE_HI22);\n  CASE(R_SPARC_TLS_IE_LO10);\n  CASE(R_SPARC_TLS_IE_LD);\n  CASE(R_SPARC_TLS_IE_LDX);\n  CASE(R_SPARC_TLS_IE_ADD);\n  CASE(R_SPARC_TLS_LE_HIX22);\n  CASE(R_SPARC_TLS_LE_LOX10);\n  CASE(R_SPARC_TLS_DTPMOD32);\n  CASE(R_SPARC_TLS_DTPMOD64);\n  CASE(R_SPARC_TLS_DTPOFF32);\n  CASE(R_SPARC_TLS_DTPOFF64);\n  CASE(R_SPARC_TLS_TPOFF32);\n  CASE(R_SPARC_TLS_TPOFF64);\n  CASE(R_SPARC_GOTDATA_HIX22);\n  CASE(R_SPARC_GOTDATA_LOX10);\n  CASE(R_SPARC_GOTDATA_OP_HIX22);\n  CASE(R_SPARC_GOTDATA_OP_LOX10);\n  CASE(R_SPARC_GOTDATA_OP);\n  CASE(R_SPARC_IRELATIVE);\n  }\n  return unknown_type(r_type);\n}\n\ntemplate <>\nstd::string rel_to_string<S390X>(u32 r_type) {\n  switch (r_type) {\n  CASE(R_390_NONE);\n  CASE(R_390_8);\n  CASE(R_390_12);\n  CASE(R_390_16);\n  CASE(R_390_32);\n  CASE(R_390_PC32);\n  CASE(R_390_GOT12);\n  CASE(R_390_GOT32);\n  CASE(R_390_PLT32);\n  CASE(R_390_COPY);\n  CASE(R_390_GLOB_DAT);\n  CASE(R_390_JMP_SLOT);\n  CASE(R_390_RELATIVE);\n  CASE(R_390_GOTOFF32);\n  CASE(R_390_GOTPC);\n  CASE(R_390_GOT16);\n  CASE(R_390_PC16);\n  CASE(R_390_PC16DBL);\n  CASE(R_390_PLT16DBL);\n  CASE(R_390_PC32DBL);\n  CASE(R_390_PLT32DBL);\n  CASE(R_390_GOTPCDBL);\n  CASE(R_390_64);\n  CASE(R_390_PC64);\n  CASE(R_390_GOT64);\n  CASE(R_390_PLT64);\n  CASE(R_390_GOTENT);\n  CASE(R_390_GOTOFF16);\n  CASE(R_390_GOTOFF64);\n  CASE(R_390_GOTPLT12);\n  CASE(R_390_GOTPLT16);\n  CASE(R_390_GOTPLT32);\n  CASE(R_390_GOTPLT64);\n  CASE(R_390_GOTPLTENT);\n  CASE(R_390_PLTOFF16);\n  CASE(R_390_PLTOFF32);\n  CASE(R_390_PLTOFF64);\n  CASE(R_390_TLS_LOAD);\n  CASE(R_390_TLS_GDCALL);\n  CASE(R_390_TLS_LDCALL);\n  CASE(R_390_TLS_GD32);\n  CASE(R_390_TLS_GD64);\n  CASE(R_390_TLS_GOTIE12);\n  CASE(R_390_TLS_GOTIE32);\n  CASE(R_390_TLS_GOTIE64);\n  CASE(R_390_TLS_LDM32);\n  CASE(R_390_TLS_LDM64);\n  CASE(R_390_TLS_IE32);\n  CASE(R_390_TLS_IE64);\n  CASE(R_390_TLS_IEENT);\n  CASE(R_390_TLS_LE32);\n  CASE(R_390_TLS_LE64);\n  CASE(R_390_TLS_LDO32);\n  CASE(R_390_TLS_LDO64);\n  CASE(R_390_TLS_DTPMOD);\n  CASE(R_390_TLS_DTPOFF);\n  CASE(R_390_TLS_TPOFF);\n  CASE(R_390_20);\n  CASE(R_390_GOT20);\n  CASE(R_390_GOTPLT20);\n  CASE(R_390_TLS_GOTIE20);\n  CASE(R_390_IRELATIVE);\n  CASE(R_390_PC12DBL);\n  CASE(R_390_PLT12DBL);\n  CASE(R_390_PC24DBL);\n  CASE(R_390_PLT24DBL);\n  }\n  return unknown_type(r_type);\n}\n\ntemplate <>\nstd::string rel_to_string<M68K>(u32 r_type) {\n  switch (r_type) {\n  CASE(R_68K_NONE);\n  CASE(R_68K_32);\n  CASE(R_68K_16);\n  CASE(R_68K_8);\n  CASE(R_68K_PC32);\n  CASE(R_68K_PC16);\n  CASE(R_68K_PC8);\n  CASE(R_68K_GOTPCREL32);\n  CASE(R_68K_GOTPCREL16);\n  CASE(R_68K_GOTPCREL8);\n  CASE(R_68K_GOTOFF32);\n  CASE(R_68K_GOTOFF16);\n  CASE(R_68K_GOTOFF8);\n  CASE(R_68K_PLT32);\n  CASE(R_68K_PLT16);\n  CASE(R_68K_PLT8);\n  CASE(R_68K_PLTOFF32);\n  CASE(R_68K_PLTOFF16);\n  CASE(R_68K_PLTOFF8);\n  CASE(R_68K_COPY);\n  CASE(R_68K_GLOB_DAT);\n  CASE(R_68K_JMP_SLOT);\n  CASE(R_68K_RELATIVE);\n  CASE(R_68K_TLS_GD32);\n  CASE(R_68K_TLS_GD16);\n  CASE(R_68K_TLS_GD8);\n  CASE(R_68K_TLS_LDM32);\n  CASE(R_68K_TLS_LDM16);\n  CASE(R_68K_TLS_LDM8);\n  CASE(R_68K_TLS_LDO32);\n  CASE(R_68K_TLS_LDO16);\n  CASE(R_68K_TLS_LDO8);\n  CASE(R_68K_TLS_IE32);\n  CASE(R_68K_TLS_IE16);\n  CASE(R_68K_TLS_IE8);\n  CASE(R_68K_TLS_LE32);\n  CASE(R_68K_TLS_LE16);\n  CASE(R_68K_TLS_LE8);\n  CASE(R_68K_TLS_DTPMOD32);\n  CASE(R_68K_TLS_DTPREL32);\n  CASE(R_68K_TLS_TPREL32);\n  }\n  return unknown_type(r_type);\n}\n\ntemplate <>\nstd::string rel_to_string<SH4LE>(u32 r_type) {\n  switch (r_type) {\n  CASE(R_SH_NONE);\n  CASE(R_SH_DIR32);\n  CASE(R_SH_REL32);\n  CASE(R_SH_DIR8WPN);\n  CASE(R_SH_IND12W);\n  CASE(R_SH_DIR8WPL);\n  CASE(R_SH_DIR8WPZ);\n  CASE(R_SH_DIR8BP);\n  CASE(R_SH_DIR8W);\n  CASE(R_SH_DIR8L);\n  CASE(R_SH_TLS_GD_32);\n  CASE(R_SH_TLS_LD_32);\n  CASE(R_SH_TLS_LDO_32);\n  CASE(R_SH_TLS_IE_32);\n  CASE(R_SH_TLS_LE_32);\n  CASE(R_SH_TLS_DTPMOD32);\n  CASE(R_SH_TLS_DTPOFF32);\n  CASE(R_SH_TLS_TPOFF32);\n  CASE(R_SH_GOT32);\n  CASE(R_SH_PLT32);\n  CASE(R_SH_COPY);\n  CASE(R_SH_GLOB_DAT);\n  CASE(R_SH_JMP_SLOT);\n  CASE(R_SH_RELATIVE);\n  CASE(R_SH_GOTOFF);\n  CASE(R_SH_GOTPC);\n  CASE(R_SH_GOTPLT32);\n  }\n  return unknown_type(r_type);\n}\n\ntemplate <>\nstd::string rel_to_string<SH4BE>(u32 r_type) {\n  return rel_to_string<SH4LE>(r_type);\n}\n\ntemplate <>\nstd::string rel_to_string<LOONGARCH64>(u32 r_type) {\n  switch (r_type) {\n  CASE(R_LARCH_NONE);\n  CASE(R_LARCH_32);\n  CASE(R_LARCH_64);\n  CASE(R_LARCH_RELATIVE);\n  CASE(R_LARCH_COPY);\n  CASE(R_LARCH_JUMP_SLOT);\n  CASE(R_LARCH_TLS_DTPMOD32);\n  CASE(R_LARCH_TLS_DTPMOD64);\n  CASE(R_LARCH_TLS_DTPREL32);\n  CASE(R_LARCH_TLS_DTPREL64);\n  CASE(R_LARCH_TLS_TPREL32);\n  CASE(R_LARCH_TLS_TPREL64);\n  CASE(R_LARCH_IRELATIVE);\n  CASE(R_LARCH_TLS_DESC32);\n  CASE(R_LARCH_TLS_DESC64);\n  CASE(R_LARCH_MARK_LA);\n  CASE(R_LARCH_MARK_PCREL);\n  CASE(R_LARCH_SOP_PUSH_PCREL);\n  CASE(R_LARCH_SOP_PUSH_ABSOLUTE);\n  CASE(R_LARCH_SOP_PUSH_DUP);\n  CASE(R_LARCH_SOP_PUSH_GPREL);\n  CASE(R_LARCH_SOP_PUSH_TLS_TPREL);\n  CASE(R_LARCH_SOP_PUSH_TLS_GOT);\n  CASE(R_LARCH_SOP_PUSH_TLS_GD);\n  CASE(R_LARCH_SOP_PUSH_PLT_PCREL);\n  CASE(R_LARCH_SOP_ASSERT);\n  CASE(R_LARCH_SOP_NOT);\n  CASE(R_LARCH_SOP_SUB);\n  CASE(R_LARCH_SOP_SL);\n  CASE(R_LARCH_SOP_SR);\n  CASE(R_LARCH_SOP_ADD);\n  CASE(R_LARCH_SOP_AND);\n  CASE(R_LARCH_SOP_IF_ELSE);\n  CASE(R_LARCH_SOP_POP_32_S_10_5);\n  CASE(R_LARCH_SOP_POP_32_U_10_12);\n  CASE(R_LARCH_SOP_POP_32_S_10_12);\n  CASE(R_LARCH_SOP_POP_32_S_10_16);\n  CASE(R_LARCH_SOP_POP_32_S_10_16_S2);\n  CASE(R_LARCH_SOP_POP_32_S_5_20);\n  CASE(R_LARCH_SOP_POP_32_S_0_5_10_16_S2);\n  CASE(R_LARCH_SOP_POP_32_S_0_10_10_16_S2);\n  CASE(R_LARCH_SOP_POP_32_U);\n  CASE(R_LARCH_ADD8);\n  CASE(R_LARCH_ADD16);\n  CASE(R_LARCH_ADD24);\n  CASE(R_LARCH_ADD32);\n  CASE(R_LARCH_ADD64);\n  CASE(R_LARCH_SUB8);\n  CASE(R_LARCH_SUB16);\n  CASE(R_LARCH_SUB24);\n  CASE(R_LARCH_SUB32);\n  CASE(R_LARCH_SUB64);\n  CASE(R_LARCH_GNU_VTINHERIT);\n  CASE(R_LARCH_GNU_VTENTRY);\n  CASE(R_LARCH_B16);\n  CASE(R_LARCH_B21);\n  CASE(R_LARCH_B26);\n  CASE(R_LARCH_ABS_HI20);\n  CASE(R_LARCH_ABS_LO12);\n  CASE(R_LARCH_ABS64_LO20);\n  CASE(R_LARCH_ABS64_HI12);\n  CASE(R_LARCH_PCALA_HI20);\n  CASE(R_LARCH_PCALA_LO12);\n  CASE(R_LARCH_PCALA64_LO20);\n  CASE(R_LARCH_PCALA64_HI12);\n  CASE(R_LARCH_GOT_PC_HI20);\n  CASE(R_LARCH_GOT_PC_LO12);\n  CASE(R_LARCH_GOT64_PC_LO20);\n  CASE(R_LARCH_GOT64_PC_HI12);\n  CASE(R_LARCH_GOT_HI20);\n  CASE(R_LARCH_GOT_LO12);\n  CASE(R_LARCH_GOT64_LO20);\n  CASE(R_LARCH_GOT64_HI12);\n  CASE(R_LARCH_TLS_LE_HI20);\n  CASE(R_LARCH_TLS_LE_LO12);\n  CASE(R_LARCH_TLS_LE64_LO20);\n  CASE(R_LARCH_TLS_LE64_HI12);\n  CASE(R_LARCH_TLS_IE_PC_HI20);\n  CASE(R_LARCH_TLS_IE_PC_LO12);\n  CASE(R_LARCH_TLS_IE64_PC_LO20);\n  CASE(R_LARCH_TLS_IE64_PC_HI12);\n  CASE(R_LARCH_TLS_IE_HI20);\n  CASE(R_LARCH_TLS_IE_LO12);\n  CASE(R_LARCH_TLS_IE64_LO20);\n  CASE(R_LARCH_TLS_IE64_HI12);\n  CASE(R_LARCH_TLS_LD_PC_HI20);\n  CASE(R_LARCH_TLS_LD_HI20);\n  CASE(R_LARCH_TLS_GD_PC_HI20);\n  CASE(R_LARCH_TLS_GD_HI20);\n  CASE(R_LARCH_32_PCREL);\n  CASE(R_LARCH_RELAX);\n  CASE(R_LARCH_DELETE);\n  CASE(R_LARCH_ALIGN);\n  CASE(R_LARCH_PCREL20_S2);\n  CASE(R_LARCH_CFA);\n  CASE(R_LARCH_ADD6);\n  CASE(R_LARCH_SUB6);\n  CASE(R_LARCH_ADD_ULEB128);\n  CASE(R_LARCH_SUB_ULEB128);\n  CASE(R_LARCH_64_PCREL);\n  CASE(R_LARCH_CALL36);\n  CASE(R_LARCH_TLS_DESC_PC_HI20);\n  CASE(R_LARCH_TLS_DESC_PC_LO12);\n  CASE(R_LARCH_TLS_DESC64_PC_LO20);\n  CASE(R_LARCH_TLS_DESC64_PC_HI12);\n  CASE(R_LARCH_TLS_DESC_HI20);\n  CASE(R_LARCH_TLS_DESC_LO12);\n  CASE(R_LARCH_TLS_DESC64_LO20);\n  CASE(R_LARCH_TLS_DESC64_HI12);\n  CASE(R_LARCH_TLS_DESC_LD);\n  CASE(R_LARCH_TLS_DESC_CALL);\n  CASE(R_LARCH_TLS_LE_HI20_R);\n  CASE(R_LARCH_TLS_LE_ADD_R);\n  CASE(R_LARCH_TLS_LE_LO12_R);\n  CASE(R_LARCH_TLS_LD_PCREL20_S2);\n  CASE(R_LARCH_TLS_GD_PCREL20_S2);\n  CASE(R_LARCH_TLS_DESC_PCREL20_S2);\n  }\n  return unknown_type(r_type);\n}\n\ntemplate <>\nstd::string rel_to_string<LOONGARCH32>(u32 r_type) {\n  return rel_to_string<LOONGARCH64>(r_type);\n}\n\n} // namespace mold\n"
  },
  {
    "path": "src/elf.h",
    "content": "#pragma once\n\n#include \"../lib/integers.h\"\n\n#include <concepts>\n#include <ostream>\n#include <string>\n#include <type_traits>\n\nnamespace mold {\n\nstruct X86_64;\nstruct I386;\nstruct ARM64LE;\nstruct ARM64BE;\nstruct ARM32LE;\nstruct ARM32BE;\nstruct RV64LE;\nstruct RV64BE;\nstruct RV32LE;\nstruct RV32BE;\nstruct PPC32;\nstruct PPC64V1;\nstruct PPC64V2;\nstruct S390X;\nstruct SPARC64;\nstruct M68K;\nstruct SH4LE;\nstruct SH4BE;\nstruct LOONGARCH64;\nstruct LOONGARCH32;\n\ntemplate <typename E> struct ElfSym;\ntemplate <typename E> struct ElfShdr;\ntemplate <typename E> struct ElfEhdr;\ntemplate <typename E> struct ElfPhdr;\ntemplate <typename E> struct ElfRel;\ntemplate <typename E> struct ElfDyn;\ntemplate <typename E> struct ElfVerneed;\ntemplate <typename E> struct ElfVernaux;\ntemplate <typename E> struct ElfVerdef;\ntemplate <typename E> struct ElfVerdaux;\ntemplate <typename E> struct ElfChdr;\ntemplate <typename E> struct ElfNhdr;\n\ntemplate <typename E>\nstd::string rel_to_string(u32 r_type);\n\ntemplate <typename E>\nstd::ostream &operator<<(std::ostream &out, const ElfRel<E> &rel) {\n  out << rel_to_string<E>(rel.r_type);\n  return out;\n}\n\nenum : u32 {\n  SHN_UNDEF = 0,\n  SHN_LORESERVE = 0xff00,\n  SHN_ABS = 0xfff1,\n  SHN_COMMON = 0xfff2,\n  SHN_XINDEX = 0xffff,\n};\n\nenum : u32 {\n  SHT_NULL = 0,\n  SHT_PROGBITS = 1,\n  SHT_SYMTAB = 2,\n  SHT_STRTAB = 3,\n  SHT_RELA = 4,\n  SHT_HASH = 5,\n  SHT_DYNAMIC = 6,\n  SHT_NOTE = 7,\n  SHT_NOBITS = 8,\n  SHT_REL = 9,\n  SHT_SHLIB = 10,\n  SHT_DYNSYM = 11,\n  SHT_INIT_ARRAY = 14,\n  SHT_FINI_ARRAY = 15,\n  SHT_PREINIT_ARRAY = 16,\n  SHT_GROUP = 17,\n  SHT_SYMTAB_SHNDX = 18,\n  SHT_RELR = 19,\n  SHT_CREL = 0x40000014,\n  SHT_LOOS = 0x60000000,\n  SHT_LLVM_ADDRSIG = 0x6fff4c03,\n  SHT_GNU_HASH = 0x6ffffff6,\n  SHT_GNU_VERDEF = 0x6ffffffd,\n  SHT_GNU_VERNEED = 0x6ffffffe,\n  SHT_GNU_VERSYM = 0x6fffffff,\n  SHT_HIOS = 0x6fffffff,\n  SHT_X86_64_UNWIND = 0x70000001,\n  SHT_ARM_EXIDX = 0x70000001,\n  SHT_ARM_ATTRIBUTES = 0x70000003,\n  SHT_RISCV_ATTRIBUTES = 0x70000003,\n  SHT_LOUSER = 0x80000000,\n  SHT_HIUSER = 0xffffffff,\n};\n\nenum : u32 {\n  SHF_WRITE = 0x1,\n  SHF_ALLOC = 0x2,\n  SHF_EXECINSTR = 0x4,\n  SHF_MERGE = 0x10,\n  SHF_STRINGS = 0x20,\n  SHF_INFO_LINK = 0x40,\n  SHF_LINK_ORDER = 0x80,\n  SHF_OS_NONCONFORMING = 0x100,\n  SHF_GROUP = 0x200,\n  SHF_TLS = 0x400,\n  SHF_COMPRESSED = 0x800,\n  SHF_GNU_RETAIN = 0x200000,\n  SHF_EXCLUDE = 0x80000000,\n};\n\nenum : u32 {\n  GRP_COMDAT = 1,\n};\n\nenum : u32 {\n  STT_NOTYPE = 0,\n  STT_OBJECT = 1,\n  STT_FUNC = 2,\n  STT_SECTION = 3,\n  STT_FILE = 4,\n  STT_COMMON = 5,\n  STT_TLS = 6,\n  STT_GNU_IFUNC = 10,\n  STT_SPARC_REGISTER = 13,\n};\n\ntemplate <typename E>\ninline std::string stt_to_string(u32 st_type) {\n  switch (st_type) {\n  case STT_NOTYPE: return \"STT_NOTYPE\";\n  case STT_OBJECT: return \"STT_OBJECT\";\n  case STT_FUNC: return \"STT_FUNC\";\n  case STT_SECTION: return \"STT_SECTION\";\n  case STT_FILE: return \"STT_FILE\";\n  case STT_COMMON: return \"STT_COMMON\";\n  case STT_TLS: return \"STT_TLS\";\n  case STT_GNU_IFUNC: return \"STT_GNU_IFUNC\";\n  }\n\n  if constexpr (std::is_same_v<E, SPARC64>)\n    if (st_type == STT_SPARC_REGISTER)\n      return \"STT_SPARC_REGISTER\";\n\n  return \"unknown st_type (\" + std::to_string(st_type) + \")\";\n}\n\nenum : u32 {\n  STB_LOCAL = 0,\n  STB_GLOBAL = 1,\n  STB_WEAK = 2,\n  STB_GNU_UNIQUE = 10,\n};\n\nenum : u32 {\n  STV_DEFAULT = 0,\n  STV_INTERNAL = 1,\n  STV_HIDDEN = 2,\n  STV_PROTECTED = 3,\n};\n\nenum : u32 {\n  VER_NDX_LOCAL = 0,\n  VER_NDX_GLOBAL = 1,\n  VER_NDX_LAST_RESERVED = 1,\n  VER_NDX_UNSPECIFIED = 0xffff,\n};\n\nenum : u32 {\n  VER_FLG_BASE = 1,\n  VER_FLG_WEAK = 2,\n  VER_FLG_INFO = 4,\n};\n\nenum : u32 {\n  VERSYM_HIDDEN = 0x8000,\n};\n\nenum : u32 {\n  PT_NULL = 0,\n  PT_LOAD = 1,\n  PT_DYNAMIC = 2,\n  PT_INTERP = 3,\n  PT_NOTE = 4,\n  PT_SHLIB = 5,\n  PT_PHDR = 6,\n  PT_TLS = 7,\n  PT_GNU_EH_FRAME = 0x6474e550,\n  PT_GNU_STACK = 0x6474e551,\n  PT_GNU_RELRO = 0x6474e552,\n  PT_GNU_PROPERTY = 0x6474e553,\n  PT_OPENBSD_RANDOMIZE = 0x65a3dbe6,\n  PT_ARM_EXIDX = 0x70000001,\n  PT_RISCV_ATTRIBUTES = 0x70000003,\n};\n\nenum : u32 {\n  PF_NONE = 0,\n  PF_X = 1,\n  PF_W = 2,\n  PF_R = 4,\n};\n\nenum : u32 {\n  ET_NONE = 0,\n  ET_REL = 1,\n  ET_EXEC = 2,\n  ET_DYN = 3,\n};\n\nenum : u32 {\n  ELFDATA2LSB = 1,\n  ELFDATA2MSB = 2,\n};\n\nenum : u32 {\n  ELFCLASS32 = 1,\n  ELFCLASS64 = 2,\n};\n\nenum : u32 {\n  EV_CURRENT = 1,\n};\n\nenum : u32 {\n  EM_NONE = 0,\n  EM_386 = 3,\n  EM_68K = 4,\n  EM_PPC = 20,\n  EM_PPC64 = 21,\n  EM_S390X = 22,\n  EM_ARM = 40,\n  EM_SH = 42,\n  EM_SPARC64 = 43,\n  EM_X86_64 = 62,\n  EM_AARCH64 = 183,\n  EM_RISCV = 243,\n  EM_LOONGARCH = 258,\n};\n\nenum : u32 {\n  EI_CLASS = 4,\n  EI_DATA = 5,\n  EI_VERSION = 6,\n  EI_OSABI = 7,\n  EI_ABIVERSION = 8,\n};\n\nenum : u32 {\n  DT_NULL = 0,\n  DT_NEEDED = 1,\n  DT_PLTRELSZ = 2,\n  DT_PLTGOT = 3,\n  DT_HASH = 4,\n  DT_STRTAB = 5,\n  DT_SYMTAB = 6,\n  DT_RELA = 7,\n  DT_RELASZ = 8,\n  DT_RELAENT = 9,\n  DT_STRSZ = 10,\n  DT_SYMENT = 11,\n  DT_INIT = 12,\n  DT_FINI = 13,\n  DT_SONAME = 14,\n  DT_RPATH = 15,\n  DT_SYMBOLIC = 16,\n  DT_REL = 17,\n  DT_RELSZ = 18,\n  DT_RELENT = 19,\n  DT_PLTREL = 20,\n  DT_DEBUG = 21,\n  DT_TEXTREL = 22,\n  DT_JMPREL = 23,\n  DT_BIND_NOW = 24,\n  DT_INIT_ARRAY = 25,\n  DT_FINI_ARRAY = 26,\n  DT_INIT_ARRAYSZ = 27,\n  DT_FINI_ARRAYSZ = 28,\n  DT_RUNPATH = 29,\n  DT_FLAGS = 30,\n  DT_PREINIT_ARRAY = 32,\n  DT_PREINIT_ARRAYSZ = 33,\n  DT_RELRSZ = 35,\n  DT_RELR = 36,\n  DT_RELRENT = 37,\n  DT_GNU_HASH = 0x6ffffef5,\n  DT_DEPAUDIT = 0x6ffffefb,\n  DT_AUDIT = 0x6ffffefc,\n  DT_VERSYM = 0x6ffffff0,\n  DT_RELACOUNT = 0x6ffffff9,\n  DT_RELCOUNT = 0x6ffffffa,\n  DT_FLAGS_1 = 0x6ffffffb,\n  DT_VERDEF = 0x6ffffffc,\n  DT_VERDEFNUM = 0x6ffffffd,\n  DT_VERNEED = 0x6ffffffe,\n  DT_VERNEEDNUM = 0x6fffffff,\n  DT_PPC_GOT = 0x70000000,\n  DT_PPC64_GLINK = 0x70000000,\n  DT_RISCV_VARIANT_CC = 0x70000001,\n  DT_AARCH64_VARIANT_PCS = 0x70000005,\n  DT_AUXILIARY = 0x7ffffffd,\n  DT_FILTER = 0x7fffffff,\n};\n\nenum : u32 {\n  DF_ORIGIN = 0x01,\n  DF_SYMBOLIC = 0x02,\n  DF_TEXTREL = 0x04,\n  DF_BIND_NOW = 0x08,\n  DF_STATIC_TLS = 0x10,\n};\n\nenum : u32 {\n  DF_1_NOW = 0x00000001,\n  DF_1_NODELETE = 0x00000008,\n  DF_1_INITFIRST = 0x00000020,\n  DF_1_NOOPEN = 0x00000040,\n  DF_1_ORIGIN = 0x00000080,\n  DF_1_INTERPOSE = 0x00000400,\n  DF_1_NODEFLIB = 0x00000800,\n  DF_1_NODUMP = 0x00001000,\n  DF_1_PIE = 0x08000000,\n};\n\nenum : u32 {\n  NT_GNU_ABI_TAG = 1,\n  NT_GNU_HWCAP = 2,\n  NT_GNU_BUILD_ID = 3,\n  NT_GNU_GOLD_VERSION = 4,\n  NT_GNU_PROPERTY_TYPE_0 = 5,\n  NT_FDO_PACKAGING_METADATA = 0xcafe1a7e,\n};\n\nenum : u32 {\n  GNU_PROPERTY_X86_UINT32_AND_LO = 0xc0000002,\n  GNU_PROPERTY_X86_UINT32_AND_HI = 0xc0007fff,\n  GNU_PROPERTY_X86_UINT32_OR_LO = 0xc0008000,\n  GNU_PROPERTY_X86_UINT32_OR_HI = 0xc000ffff,\n  GNU_PROPERTY_X86_UINT32_OR_AND_LO = 0xc0010000,\n  GNU_PROPERTY_X86_UINT32_OR_AND_HI = 0xc0017fff,\n\n  GNU_PROPERTY_X86_FEATURE_1_IBT = 1,\n  GNU_PROPERTY_X86_FEATURE_1_SHSTK = 2,\n  GNU_PROPERTY_X86_FEATURE_1_AND = 0xc0000002,\n\n  GNU_PROPERTY_X86_ISA_1_NEEDED = 0xc0008002,\n  GNU_PROPERTY_X86_ISA_1_BASELINE = 1,\n  GNU_PROPERTY_X86_ISA_1_V2 = 2,\n  GNU_PROPERTY_X86_ISA_1_V3 = 4,\n  GNU_PROPERTY_X86_ISA_1_V4 = 8,\n};\n\nenum : u32 {\n  ELFCOMPRESS_NONE = 0,\n  ELFCOMPRESS_ZLIB = 1,\n  ELFCOMPRESS_ZSTD = 2,\n};\n\nenum : u32 {\n  EF_ARM_ABI_FLOAT_SOFT = 0x200,\n  EF_ARM_ABI_FLOAT_HARD = 0x400,\n  EF_ARM_BE8 = 0x800000,\n  EF_ARM_EABI_VER5 = 0x5000000,\n};\n\nenum : u32 {\n  EF_RISCV_RVC = 1,\n  EF_RISCV_FLOAT_ABI = 6,\n  EF_RISCV_FLOAT_ABI_SOFT = 0,\n  EF_RISCV_FLOAT_ABI_SINGLE = 2,\n  EF_RISCV_FLOAT_ABI_DOUBLE = 4,\n  EF_RISCV_FLOAT_ABI_QUAD = 6,\n  EF_RISCV_RVE = 8,\n  EF_RISCV_TSO = 16,\n};\n\nenum : u32 {\n  EF_SPARC64_MM = 0x3,\n  EF_SPARC64_TSO = 0x0,\n  EF_SPARC64_PSO = 0x1,\n  EF_SPARC64_RMO = 0x2,\n  EF_SPARC_EXT_MASK = 0xffff00,\n  EF_SPARC_SUN_US1 = 0x000200,\n  EF_SPARC_HAL_R1 = 0x000400,\n  EF_SPARC_SUN_US3 = 0x000800,\n};\n\nenum : u32 {\n  STO_RISCV_VARIANT_CC = 0x80,\n};\n\nenum : u32 {\n  ELF_TAG_FILE = 1,\n  ELF_TAG_SECTION = 2,\n  ELF_TAG_SYMBOL = 3,\n  ELF_TAG_RISCV_STACK_ALIGN = 4,\n  ELF_TAG_RISCV_ARCH = 5,\n  ELF_TAG_RISCV_UNALIGNED_ACCESS = 6,\n};\n\nenum : u32 {\n  EF_LOONGARCH_ABI_SOFT_FLOAT = 0x1,\n  EF_LOONGARCH_ABI_SINGLE_FLOAT = 0x2,\n  EF_LOONGARCH_ABI_DOUBLE_FLOAT = 0x3,\n  EF_LOONGARCH_ABI_MODIFIER_MASK = 0x7,\n  EF_LOONGARCH_OBJABI_V1 = 0x40,\n  EF_LOONGARCH_OBJABI_MASK = 0xC0,\n};\n\n//\n// Relocation types\n//\n\nenum : u32 {\n  R_NONE = 0,\n};\n\nenum : u32 {\n  R_X86_64_NONE = 0,\n  R_X86_64_64 = 1,\n  R_X86_64_PC32 = 2,\n  R_X86_64_GOT32 = 3,\n  R_X86_64_PLT32 = 4,\n  R_X86_64_COPY = 5,\n  R_X86_64_GLOB_DAT = 6,\n  R_X86_64_JUMP_SLOT = 7,\n  R_X86_64_RELATIVE = 8,\n  R_X86_64_GOTPCREL = 9,\n  R_X86_64_32 = 10,\n  R_X86_64_32S = 11,\n  R_X86_64_16 = 12,\n  R_X86_64_PC16 = 13,\n  R_X86_64_8 = 14,\n  R_X86_64_PC8 = 15,\n  R_X86_64_DTPMOD64 = 16,\n  R_X86_64_DTPOFF64 = 17,\n  R_X86_64_TPOFF64 = 18,\n  R_X86_64_TLSGD = 19,\n  R_X86_64_TLSLD = 20,\n  R_X86_64_DTPOFF32 = 21,\n  R_X86_64_GOTTPOFF = 22,\n  R_X86_64_TPOFF32 = 23,\n  R_X86_64_PC64 = 24,\n  R_X86_64_GOTOFF64 = 25,\n  R_X86_64_GOTPC32 = 26,\n  R_X86_64_GOT64 = 27,\n  R_X86_64_GOTPCREL64 = 28,\n  R_X86_64_GOTPC64 = 29,\n  R_X86_64_GOTPLT64 = 30,\n  R_X86_64_PLTOFF64 = 31,\n  R_X86_64_SIZE32 = 32,\n  R_X86_64_SIZE64 = 33,\n  R_X86_64_GOTPC32_TLSDESC = 34,\n  R_X86_64_TLSDESC_CALL = 35,\n  R_X86_64_TLSDESC = 36,\n  R_X86_64_IRELATIVE = 37,\n  R_X86_64_GOTPCRELX = 41,\n  R_X86_64_REX_GOTPCRELX = 42,\n  R_X86_64_CODE_4_GOTPCRELX = 43,\n  R_X86_64_CODE_4_GOTTPOFF = 44,\n  R_X86_64_CODE_4_GOTPC32_TLSDESC = 45,\n  R_X86_64_CODE_5_GOTPCRELX = 46,\n  R_X86_64_CODE_5_GOTTPOFF = 47,\n  R_X86_64_CODE_5_GOTPC32_TLSDESC = 48,\n  R_X86_64_CODE_6_GOTPCRELX = 49,\n  R_X86_64_CODE_6_GOTTPOFF = 50,\n  R_X86_64_CODE_6_GOTPC32_TLSDESC = 51,\n};\n\nenum : u32 {\n  R_386_NONE = 0,\n  R_386_32 = 1,\n  R_386_PC32 = 2,\n  R_386_GOT32 = 3,\n  R_386_PLT32 = 4,\n  R_386_COPY = 5,\n  R_386_GLOB_DAT = 6,\n  R_386_JUMP_SLOT = 7,\n  R_386_RELATIVE = 8,\n  R_386_GOTOFF = 9,\n  R_386_GOTPC = 10,\n  R_386_32PLT = 11,\n  R_386_TLS_TPOFF = 14,\n  R_386_TLS_IE = 15,\n  R_386_TLS_GOTIE = 16,\n  R_386_TLS_LE = 17,\n  R_386_TLS_GD = 18,\n  R_386_TLS_LDM = 19,\n  R_386_16 = 20,\n  R_386_PC16 = 21,\n  R_386_8 = 22,\n  R_386_PC8 = 23,\n  R_386_TLS_GD_32 = 24,\n  R_386_TLS_GD_PUSH = 25,\n  R_386_TLS_GD_CALL = 26,\n  R_386_TLS_GD_POP = 27,\n  R_386_TLS_LDM_32 = 28,\n  R_386_TLS_LDM_PUSH = 29,\n  R_386_TLS_LDM_CALL = 30,\n  R_386_TLS_LDM_POP = 31,\n  R_386_TLS_LDO_32 = 32,\n  R_386_TLS_IE_32 = 33,\n  R_386_TLS_LE_32 = 34,\n  R_386_TLS_DTPMOD32 = 35,\n  R_386_TLS_DTPOFF32 = 36,\n  R_386_TLS_TPOFF32 = 37,\n  R_386_SIZE32 = 38,\n  R_386_TLS_GOTDESC = 39,\n  R_386_TLS_DESC_CALL = 40,\n  R_386_TLS_DESC = 41,\n  R_386_IRELATIVE = 42,\n  R_386_GOT32X = 43,\n};\n\nenum : u32 {\n  R_AARCH64_NONE = 0,\n  R_AARCH64_ABS64 = 0x101,\n  R_AARCH64_ABS32 = 0x102,\n  R_AARCH64_ABS16 = 0x103,\n  R_AARCH64_PREL64 = 0x104,\n  R_AARCH64_PREL32 = 0x105,\n  R_AARCH64_PREL16 = 0x106,\n  R_AARCH64_MOVW_UABS_G0 = 0x107,\n  R_AARCH64_MOVW_UABS_G0_NC = 0x108,\n  R_AARCH64_MOVW_UABS_G1 = 0x109,\n  R_AARCH64_MOVW_UABS_G1_NC = 0x10a,\n  R_AARCH64_MOVW_UABS_G2 = 0x10b,\n  R_AARCH64_MOVW_UABS_G2_NC = 0x10c,\n  R_AARCH64_MOVW_UABS_G3 = 0x10d,\n  R_AARCH64_MOVW_SABS_G0 = 0x10e,\n  R_AARCH64_MOVW_SABS_G1 = 0x10f,\n  R_AARCH64_MOVW_SABS_G2 = 0x110,\n  R_AARCH64_LD_PREL_LO19 = 0x111,\n  R_AARCH64_ADR_PREL_LO21 = 0x112,\n  R_AARCH64_ADR_PREL_PG_HI21 = 0x113,\n  R_AARCH64_ADR_PREL_PG_HI21_NC = 0x114,\n  R_AARCH64_ADD_ABS_LO12_NC = 0x115,\n  R_AARCH64_LDST8_ABS_LO12_NC = 0x116,\n  R_AARCH64_TSTBR14 = 0x117,\n  R_AARCH64_CONDBR19 = 0x118,\n  R_AARCH64_JUMP26 = 0x11a,\n  R_AARCH64_CALL26 = 0x11b,\n  R_AARCH64_LDST16_ABS_LO12_NC = 0x11c,\n  R_AARCH64_LDST32_ABS_LO12_NC = 0x11d,\n  R_AARCH64_LDST64_ABS_LO12_NC = 0x11e,\n  R_AARCH64_MOVW_PREL_G0 = 0x11f,\n  R_AARCH64_MOVW_PREL_G0_NC = 0x120,\n  R_AARCH64_MOVW_PREL_G1 = 0x121,\n  R_AARCH64_MOVW_PREL_G1_NC = 0x122,\n  R_AARCH64_MOVW_PREL_G2 = 0x123,\n  R_AARCH64_MOVW_PREL_G2_NC = 0x124,\n  R_AARCH64_MOVW_PREL_G3 = 0x125,\n  R_AARCH64_LDST128_ABS_LO12_NC = 0x12b,\n  R_AARCH64_ADR_GOT_PAGE = 0x137,\n  R_AARCH64_LD64_GOT_LO12_NC = 0x138,\n  R_AARCH64_LD64_GOTPAGE_LO15 = 0x139,\n  R_AARCH64_PLT32 = 0x13a,\n  R_AARCH64_TLSGD_ADR_PREL21 = 0x200,\n  R_AARCH64_TLSGD_ADR_PAGE21 = 0x201,\n  R_AARCH64_TLSGD_ADD_LO12_NC = 0x202,\n  R_AARCH64_TLSGD_MOVW_G1 = 0x203,\n  R_AARCH64_TLSGD_MOVW_G0_NC = 0x204,\n  R_AARCH64_TLSLD_ADR_PREL21 = 0x205,\n  R_AARCH64_TLSLD_ADR_PAGE21 = 0x206,\n  R_AARCH64_TLSLD_ADD_LO12_NC = 0x207,\n  R_AARCH64_TLSLD_MOVW_G1 = 0x208,\n  R_AARCH64_TLSLD_MOVW_G0_NC = 0x209,\n  R_AARCH64_TLSLD_LD_PREL19 = 0x20a,\n  R_AARCH64_TLSLD_MOVW_DTPREL_G2 = 0x20b,\n  R_AARCH64_TLSLD_MOVW_DTPREL_G1 = 0x20c,\n  R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC = 0x20d,\n  R_AARCH64_TLSLD_MOVW_DTPREL_G0 = 0x20e,\n  R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC = 0x20f,\n  R_AARCH64_TLSLD_ADD_DTPREL_HI12 = 0x210,\n  R_AARCH64_TLSLD_ADD_DTPREL_LO12 = 0x211,\n  R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC = 0x212,\n  R_AARCH64_TLSLD_LDST8_DTPREL_LO12 = 0x213,\n  R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC = 0x214,\n  R_AARCH64_TLSLD_LDST16_DTPREL_LO12 = 0x215,\n  R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC = 0x216,\n  R_AARCH64_TLSLD_LDST32_DTPREL_LO12 = 0x217,\n  R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC = 0x218,\n  R_AARCH64_TLSLD_LDST64_DTPREL_LO12 = 0x219,\n  R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC = 0x21a,\n  R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 = 0x21b,\n  R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC = 0x21c,\n  R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 = 0x21d,\n  R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC = 0x21e,\n  R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 = 0x21f,\n  R_AARCH64_TLSLE_MOVW_TPREL_G2 = 0x220,\n  R_AARCH64_TLSLE_MOVW_TPREL_G1 = 0x221,\n  R_AARCH64_TLSLE_MOVW_TPREL_G1_NC = 0x222,\n  R_AARCH64_TLSLE_MOVW_TPREL_G0 = 0x223,\n  R_AARCH64_TLSLE_MOVW_TPREL_G0_NC = 0x224,\n  R_AARCH64_TLSLE_ADD_TPREL_HI12 = 0x225,\n  R_AARCH64_TLSLE_ADD_TPREL_LO12 = 0x226,\n  R_AARCH64_TLSLE_ADD_TPREL_LO12_NC = 0x227,\n  R_AARCH64_TLSLE_LDST8_TPREL_LO12 = 0x228,\n  R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC = 0x229,\n  R_AARCH64_TLSLE_LDST16_TPREL_LO12 = 0x22a,\n  R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC = 0x22b,\n  R_AARCH64_TLSLE_LDST32_TPREL_LO12 = 0x22c,\n  R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC = 0x22d,\n  R_AARCH64_TLSLE_LDST64_TPREL_LO12 = 0x22e,\n  R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC = 0x22f,\n  R_AARCH64_TLSDESC_ADR_PAGE21 = 0x232,\n  R_AARCH64_TLSDESC_LD64_LO12 = 0x233,\n  R_AARCH64_TLSDESC_ADD_LO12 = 0x234,\n  R_AARCH64_TLSDESC_CALL = 0x239,\n  R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC = 0x23b,\n  R_AARCH64_COPY = 0x400,\n  R_AARCH64_GLOB_DAT = 0x401,\n  R_AARCH64_JUMP_SLOT = 0x402,\n  R_AARCH64_RELATIVE = 0x403,\n  R_AARCH64_TLS_DTPMOD64 = 0x404,\n  R_AARCH64_TLS_DTPREL64 = 0x405,\n  R_AARCH64_TLS_TPREL64 = 0x406,\n  R_AARCH64_TLSDESC = 0x407,\n  R_AARCH64_IRELATIVE = 0x408,\n};\n\nenum : u32 {\n  R_ARM_NONE = 0x0,\n  R_ARM_PC24 = 0x1,\n  R_ARM_ABS32 = 0x2,\n  R_ARM_REL32 = 0x3,\n  R_ARM_LDR_PC_G0 = 0x4,\n  R_ARM_ABS16 = 0x5,\n  R_ARM_ABS12 = 0x6,\n  R_ARM_THM_ABS5 = 0x7,\n  R_ARM_ABS8 = 0x8,\n  R_ARM_SBREL32 = 0x9,\n  R_ARM_THM_CALL = 0xa,\n  R_ARM_THM_PC8 = 0xb,\n  R_ARM_BREL_ADJ = 0xc,\n  R_ARM_TLS_DESC = 0xd,\n  R_ARM_THM_SWI8 = 0xe,\n  R_ARM_XPC25 = 0xf,\n  R_ARM_THM_XPC22 = 0x10,\n  R_ARM_TLS_DTPMOD32 = 0x11,\n  R_ARM_TLS_DTPOFF32 = 0x12,\n  R_ARM_TLS_TPOFF32 = 0x13,\n  R_ARM_COPY = 0x14,\n  R_ARM_GLOB_DAT = 0x15,\n  R_ARM_JUMP_SLOT = 0x16,\n  R_ARM_RELATIVE = 0x17,\n  R_ARM_GOTOFF32 = 0x18,\n  R_ARM_BASE_PREL = 0x19,\n  R_ARM_GOT_BREL = 0x1a,\n  R_ARM_PLT32 = 0x1b,\n  R_ARM_CALL = 0x1c,\n  R_ARM_JUMP24 = 0x1d,\n  R_ARM_THM_JUMP24 = 0x1e,\n  R_ARM_BASE_ABS = 0x1f,\n  R_ARM_ALU_PCREL_7_0 = 0x20,\n  R_ARM_ALU_PCREL_15_8 = 0x21,\n  R_ARM_ALU_PCREL_23_15 = 0x22,\n  R_ARM_LDR_SBREL_11_0_NC = 0x23,\n  R_ARM_ALU_SBREL_19_12_NC = 0x24,\n  R_ARM_ALU_SBREL_27_20_CK = 0x25,\n  R_ARM_TARGET1 = 0x26,\n  R_ARM_SBREL31 = 0x27,\n  R_ARM_V4BX = 0x28,\n  R_ARM_TARGET2 = 0x29,\n  R_ARM_PREL31 = 0x2a,\n  R_ARM_MOVW_ABS_NC = 0x2b,\n  R_ARM_MOVT_ABS = 0x2c,\n  R_ARM_MOVW_PREL_NC = 0x2d,\n  R_ARM_MOVT_PREL = 0x2e,\n  R_ARM_THM_MOVW_ABS_NC = 0x2f,\n  R_ARM_THM_MOVT_ABS = 0x30,\n  R_ARM_THM_MOVW_PREL_NC = 0x31,\n  R_ARM_THM_MOVT_PREL = 0x32,\n  R_ARM_THM_JUMP19 = 0x33,\n  R_ARM_THM_JUMP6 = 0x34,\n  R_ARM_THM_ALU_PREL_11_0 = 0x35,\n  R_ARM_THM_PC12 = 0x36,\n  R_ARM_ABS32_NOI = 0x37,\n  R_ARM_REL32_NOI = 0x38,\n  R_ARM_ALU_PC_G0_NC = 0x39,\n  R_ARM_ALU_PC_G0 = 0x3a,\n  R_ARM_ALU_PC_G1_NC = 0x3b,\n  R_ARM_ALU_PC_G1 = 0x3c,\n  R_ARM_ALU_PC_G2 = 0x3d,\n  R_ARM_LDR_PC_G1 = 0x3e,\n  R_ARM_LDR_PC_G2 = 0x3f,\n  R_ARM_LDRS_PC_G0 = 0x40,\n  R_ARM_LDRS_PC_G1 = 0x41,\n  R_ARM_LDRS_PC_G2 = 0x42,\n  R_ARM_LDC_PC_G0 = 0x43,\n  R_ARM_LDC_PC_G1 = 0x44,\n  R_ARM_LDC_PC_G2 = 0x45,\n  R_ARM_ALU_SB_G0_NC = 0x46,\n  R_ARM_ALU_SB_G0 = 0x47,\n  R_ARM_ALU_SB_G1_NC = 0x48,\n  R_ARM_ALU_SB_G1 = 0x49,\n  R_ARM_ALU_SB_G2 = 0x4a,\n  R_ARM_LDR_SB_G0 = 0x4b,\n  R_ARM_LDR_SB_G1 = 0x4c,\n  R_ARM_LDR_SB_G2 = 0x4d,\n  R_ARM_LDRS_SB_G0 = 0x4e,\n  R_ARM_LDRS_SB_G1 = 0x4f,\n  R_ARM_LDRS_SB_G2 = 0x50,\n  R_ARM_LDC_SB_G0 = 0x51,\n  R_ARM_LDC_SB_G1 = 0x52,\n  R_ARM_LDC_SB_G2 = 0x53,\n  R_ARM_MOVW_BREL_NC = 0x54,\n  R_ARM_MOVT_BREL = 0x55,\n  R_ARM_MOVW_BREL = 0x56,\n  R_ARM_THM_MOVW_BREL_NC = 0x57,\n  R_ARM_THM_MOVT_BREL = 0x58,\n  R_ARM_THM_MOVW_BREL = 0x59,\n  R_ARM_TLS_GOTDESC = 0x5a,\n  R_ARM_TLS_CALL = 0x5b,\n  R_ARM_TLS_DESCSEQ = 0x5c,\n  R_ARM_THM_TLS_CALL = 0x5d,\n  R_ARM_PLT32_ABS = 0x5e,\n  R_ARM_GOT_ABS = 0x5f,\n  R_ARM_GOT_PREL = 0x60,\n  R_ARM_GOT_BREL12 = 0x61,\n  R_ARM_GOTOFF12 = 0x62,\n  R_ARM_GOTRELAX = 0x63,\n  R_ARM_GNU_VTENTRY = 0x64,\n  R_ARM_GNU_VTINHERIT = 0x65,\n  R_ARM_THM_JUMP11 = 0x66,\n  R_ARM_THM_JUMP8 = 0x67,\n  R_ARM_TLS_GD32 = 0x68,\n  R_ARM_TLS_LDM32 = 0x69,\n  R_ARM_TLS_LDO32 = 0x6a,\n  R_ARM_TLS_IE32 = 0x6b,\n  R_ARM_TLS_LE32 = 0x6c,\n  R_ARM_TLS_LDO12 = 0x6d,\n  R_ARM_TLS_LE12 = 0x6e,\n  R_ARM_TLS_IE12GP = 0x6f,\n  R_ARM_PRIVATE_0 = 0x70,\n  R_ARM_PRIVATE_1 = 0x71,\n  R_ARM_PRIVATE_2 = 0x72,\n  R_ARM_PRIVATE_3 = 0x73,\n  R_ARM_PRIVATE_4 = 0x74,\n  R_ARM_PRIVATE_5 = 0x75,\n  R_ARM_PRIVATE_6 = 0x76,\n  R_ARM_PRIVATE_7 = 0x77,\n  R_ARM_PRIVATE_8 = 0x78,\n  R_ARM_PRIVATE_9 = 0x79,\n  R_ARM_PRIVATE_10 = 0x7a,\n  R_ARM_PRIVATE_11 = 0x7b,\n  R_ARM_PRIVATE_12 = 0x7c,\n  R_ARM_PRIVATE_13 = 0x7d,\n  R_ARM_PRIVATE_14 = 0x7e,\n  R_ARM_PRIVATE_15 = 0x7f,\n  R_ARM_ME_TOO = 0x80,\n  R_ARM_THM_TLS_DESCSEQ16 = 0x81,\n  R_ARM_THM_TLS_DESCSEQ32 = 0x82,\n  R_ARM_THM_BF16 = 0x88,\n  R_ARM_THM_BF12 = 0x89,\n  R_ARM_THM_BF18 = 0x8a,\n  R_ARM_IRELATIVE = 0xa0,\n};\n\nenum : u32 {\n  R_RISCV_NONE = 0,\n  R_RISCV_32 = 1,\n  R_RISCV_64 = 2,\n  R_RISCV_RELATIVE = 3,\n  R_RISCV_COPY = 4,\n  R_RISCV_JUMP_SLOT = 5,\n  R_RISCV_TLS_DTPMOD32 = 6,\n  R_RISCV_TLS_DTPMOD64 = 7,\n  R_RISCV_TLS_DTPREL32 = 8,\n  R_RISCV_TLS_DTPREL64 = 9,\n  R_RISCV_TLS_TPREL32 = 10,\n  R_RISCV_TLS_TPREL64 = 11,\n  R_RISCV_TLSDESC = 12,\n  R_RISCV_BRANCH = 16,\n  R_RISCV_JAL = 17,\n  R_RISCV_CALL = 18,\n  R_RISCV_CALL_PLT = 19,\n  R_RISCV_GOT_HI20 = 20,\n  R_RISCV_TLS_GOT_HI20 = 21,\n  R_RISCV_TLS_GD_HI20 = 22,\n  R_RISCV_PCREL_HI20 = 23,\n  R_RISCV_PCREL_LO12_I = 24,\n  R_RISCV_PCREL_LO12_S = 25,\n  R_RISCV_HI20 = 26,\n  R_RISCV_LO12_I = 27,\n  R_RISCV_LO12_S = 28,\n  R_RISCV_TPREL_HI20 = 29,\n  R_RISCV_TPREL_LO12_I = 30,\n  R_RISCV_TPREL_LO12_S = 31,\n  R_RISCV_TPREL_ADD = 32,\n  R_RISCV_ADD8 = 33,\n  R_RISCV_ADD16 = 34,\n  R_RISCV_ADD32 = 35,\n  R_RISCV_ADD64 = 36,\n  R_RISCV_SUB8 = 37,\n  R_RISCV_SUB16 = 38,\n  R_RISCV_SUB32 = 39,\n  R_RISCV_SUB64 = 40,\n  R_RISCV_ALIGN = 43,\n  R_RISCV_RVC_BRANCH = 44,\n  R_RISCV_RVC_JUMP = 45,\n  R_RISCV_RELAX = 51,\n  R_RISCV_SUB6 = 52,\n  R_RISCV_SET6 = 53,\n  R_RISCV_SET8 = 54,\n  R_RISCV_SET16 = 55,\n  R_RISCV_SET32 = 56,\n  R_RISCV_32_PCREL = 57,\n  R_RISCV_IRELATIVE = 58,\n  R_RISCV_PLT32 = 59,\n  R_RISCV_SET_ULEB128 = 60,\n  R_RISCV_SUB_ULEB128 = 61,\n  R_RISCV_TLSDESC_HI20 = 62,\n  R_RISCV_TLSDESC_LOAD_LO12 = 63,\n  R_RISCV_TLSDESC_ADD_LO12 = 64,\n  R_RISCV_TLSDESC_CALL = 65,\n};\n\nenum : u32 {\n  R_PPC_NONE = 0,\n  R_PPC_ADDR32 = 1,\n  R_PPC_ADDR24 = 2,\n  R_PPC_ADDR16 = 3,\n  R_PPC_ADDR16_LO = 4,\n  R_PPC_ADDR16_HI = 5,\n  R_PPC_ADDR16_HA = 6,\n  R_PPC_ADDR14 = 7,\n  R_PPC_ADDR14_BRTAKEN = 8,\n  R_PPC_ADDR14_BRNTAKEN = 9,\n  R_PPC_REL24 = 10,\n  R_PPC_REL14 = 11,\n  R_PPC_REL14_BRTAKEN = 12,\n  R_PPC_REL14_BRNTAKEN = 13,\n  R_PPC_GOT16 = 14,\n  R_PPC_GOT16_LO = 15,\n  R_PPC_GOT16_HI = 16,\n  R_PPC_GOT16_HA = 17,\n  R_PPC_PLTREL24 = 18,\n  R_PPC_COPY = 19,\n  R_PPC_GLOB_DAT = 20,\n  R_PPC_JMP_SLOT = 21,\n  R_PPC_RELATIVE = 22,\n  R_PPC_LOCAL24PC = 23,\n  R_PPC_UADDR32 = 24,\n  R_PPC_UADDR16 = 25,\n  R_PPC_REL32 = 26,\n  R_PPC_PLT32 = 27,\n  R_PPC_PLTREL32 = 28,\n  R_PPC_PLT16_LO = 29,\n  R_PPC_PLT16_HI = 30,\n  R_PPC_PLT16_HA = 31,\n  R_PPC_SDAREL16 = 32,\n  R_PPC_SECTOFF = 33,\n  R_PPC_SECTOFF_LO = 34,\n  R_PPC_SECTOFF_HI = 35,\n  R_PPC_SECTOFF_HA = 36,\n  R_PPC_ADDR30 = 37,\n  R_PPC_TLS = 67,\n  R_PPC_DTPMOD32 = 68,\n  R_PPC_TPREL16 = 69,\n  R_PPC_TPREL16_LO = 70,\n  R_PPC_TPREL16_HI = 71,\n  R_PPC_TPREL16_HA = 72,\n  R_PPC_TPREL32 = 73,\n  R_PPC_DTPREL16 = 74,\n  R_PPC_DTPREL16_LO = 75,\n  R_PPC_DTPREL16_HI = 76,\n  R_PPC_DTPREL16_HA = 77,\n  R_PPC_DTPREL32 = 78,\n  R_PPC_GOT_TLSGD16 = 79,\n  R_PPC_GOT_TLSGD16_LO = 80,\n  R_PPC_GOT_TLSGD16_HI = 81,\n  R_PPC_GOT_TLSGD16_HA = 82,\n  R_PPC_GOT_TLSLD16 = 83,\n  R_PPC_GOT_TLSLD16_LO = 84,\n  R_PPC_GOT_TLSLD16_HI = 85,\n  R_PPC_GOT_TLSLD16_HA = 86,\n  R_PPC_GOT_TPREL16 = 87,\n  R_PPC_GOT_TPREL16_LO = 88,\n  R_PPC_GOT_TPREL16_HI = 89,\n  R_PPC_GOT_TPREL16_HA = 90,\n  R_PPC_GOT_DTPREL16 = 91,\n  R_PPC_GOT_DTPREL16_LO = 92,\n  R_PPC_GOT_DTPREL16_HI = 93,\n  R_PPC_GOT_DTPREL16_HA = 94,\n  R_PPC_TLSGD = 95,\n  R_PPC_TLSLD = 96,\n  R_PPC_PLTSEQ = 119,\n  R_PPC_PLTCALL = 120,\n  R_PPC_IRELATIVE = 248,\n  R_PPC_REL16 = 249,\n  R_PPC_REL16_LO = 250,\n  R_PPC_REL16_HI = 251,\n  R_PPC_REL16_HA = 252,\n};\n\nenum : u32 {\n  R_PPC64_NONE = 0,\n  R_PPC64_ADDR32 = 1,\n  R_PPC64_ADDR24 = 2,\n  R_PPC64_ADDR16 = 3,\n  R_PPC64_ADDR16_LO = 4,\n  R_PPC64_ADDR16_HI = 5,\n  R_PPC64_ADDR16_HA = 6,\n  R_PPC64_ADDR14 = 7,\n  R_PPC64_ADDR14_BRTAKEN = 8,\n  R_PPC64_ADDR14_BRNTAKEN = 9,\n  R_PPC64_REL24 = 10,\n  R_PPC64_REL14 = 11,\n  R_PPC64_REL14_BRTAKEN = 12,\n  R_PPC64_REL14_BRNTAKEN = 13,\n  R_PPC64_GOT16 = 14,\n  R_PPC64_GOT16_LO = 15,\n  R_PPC64_GOT16_HI = 16,\n  R_PPC64_GOT16_HA = 17,\n  R_PPC64_COPY = 19,\n  R_PPC64_GLOB_DAT = 20,\n  R_PPC64_JMP_SLOT = 21,\n  R_PPC64_RELATIVE = 22,\n  R_PPC64_REL32 = 26,\n  R_PPC64_PLT16_LO = 29,\n  R_PPC64_PLT16_HI = 30,\n  R_PPC64_PLT16_HA = 31,\n  R_PPC64_ADDR64 = 38,\n  R_PPC64_ADDR16_HIGHER = 39,\n  R_PPC64_ADDR16_HIGHERA = 40,\n  R_PPC64_ADDR16_HIGHEST = 41,\n  R_PPC64_ADDR16_HIGHESTA = 42,\n  R_PPC64_REL64 = 44,\n  R_PPC64_TOC16 = 47,\n  R_PPC64_TOC16_LO = 48,\n  R_PPC64_TOC16_HI = 49,\n  R_PPC64_TOC16_HA = 50,\n  R_PPC64_TOC = 51,\n  R_PPC64_ADDR16_DS = 56,\n  R_PPC64_ADDR16_LO_DS = 57,\n  R_PPC64_GOT16_DS = 58,\n  R_PPC64_GOT16_LO_DS = 59,\n  R_PPC64_PLT16_LO_DS = 60,\n  R_PPC64_TOC16_DS = 63,\n  R_PPC64_TOC16_LO_DS = 64,\n  R_PPC64_TLS = 67,\n  R_PPC64_DTPMOD64 = 68,\n  R_PPC64_TPREL16 = 69,\n  R_PPC64_TPREL16_LO = 70,\n  R_PPC64_TPREL16_HI = 71,\n  R_PPC64_TPREL16_HA = 72,\n  R_PPC64_TPREL64 = 73,\n  R_PPC64_DTPREL16 = 74,\n  R_PPC64_DTPREL16_LO = 75,\n  R_PPC64_DTPREL16_HI = 76,\n  R_PPC64_DTPREL16_HA = 77,\n  R_PPC64_DTPREL64 = 78,\n  R_PPC64_GOT_TLSGD16 = 79,\n  R_PPC64_GOT_TLSGD16_LO = 80,\n  R_PPC64_GOT_TLSGD16_HI = 81,\n  R_PPC64_GOT_TLSGD16_HA = 82,\n  R_PPC64_GOT_TLSLD16 = 83,\n  R_PPC64_GOT_TLSLD16_LO = 84,\n  R_PPC64_GOT_TLSLD16_HI = 85,\n  R_PPC64_GOT_TLSLD16_HA = 86,\n  R_PPC64_GOT_TPREL16_DS = 87,\n  R_PPC64_GOT_TPREL16_LO_DS = 88,\n  R_PPC64_GOT_TPREL16_HI = 89,\n  R_PPC64_GOT_TPREL16_HA = 90,\n  R_PPC64_GOT_DTPREL16_DS = 91,\n  R_PPC64_GOT_DTPREL16_LO_DS = 92,\n  R_PPC64_GOT_DTPREL16_HI = 93,\n  R_PPC64_GOT_DTPREL16_HA = 94,\n  R_PPC64_TPREL16_DS = 95,\n  R_PPC64_TPREL16_LO_DS = 96,\n  R_PPC64_TPREL16_HIGHER = 97,\n  R_PPC64_TPREL16_HIGHERA = 98,\n  R_PPC64_TPREL16_HIGHEST = 99,\n  R_PPC64_TPREL16_HIGHESTA = 100,\n  R_PPC64_DTPREL16_DS = 101,\n  R_PPC64_DTPREL16_LO_DS = 102,\n  R_PPC64_DTPREL16_HIGHER = 103,\n  R_PPC64_DTPREL16_HIGHERA = 104,\n  R_PPC64_DTPREL16_HIGHEST = 105,\n  R_PPC64_DTPREL16_HIGHESTA = 106,\n  R_PPC64_TLSGD = 107,\n  R_PPC64_TLSLD = 108,\n  R_PPC64_ADDR16_HIGH = 110,\n  R_PPC64_ADDR16_HIGHA = 111,\n  R_PPC64_TPREL16_HIGH = 112,\n  R_PPC64_TPREL16_HIGHA = 113,\n  R_PPC64_DTPREL16_HIGH = 114,\n  R_PPC64_DTPREL16_HIGHA = 115,\n  R_PPC64_REL24_NOTOC = 116,\n  R_PPC64_ENTRY = 118,\n  R_PPC64_PLTSEQ = 119,\n  R_PPC64_PLTCALL = 120,\n  R_PPC64_PLTSEQ_NOTOC = 121,\n  R_PPC64_PLTCALL_NOTOC = 122,\n  R_PPC64_PCREL_OPT = 123,\n  R_PPC64_PCREL34 = 132,\n  R_PPC64_GOT_PCREL34 = 133,\n  R_PPC64_PLT_PCREL34 = 134,\n  R_PPC64_PLT_PCREL34_NOTOC = 135,\n  R_PPC64_TPREL34 = 146,\n  R_PPC64_DTPREL34 = 147,\n  R_PPC64_GOT_TLSGD_PCREL34 = 148,\n  R_PPC64_GOT_TLSLD_PCREL34 = 149,\n  R_PPC64_GOT_TPREL_PCREL34 = 150,\n  R_PPC64_IRELATIVE = 248,\n  R_PPC64_REL16 = 249,\n  R_PPC64_REL16_LO = 250,\n  R_PPC64_REL16_HI = 251,\n  R_PPC64_REL16_HA = 252,\n};\n\nenum : u32 {\n  R_SPARC_NONE = 0,\n  R_SPARC_8 = 1,\n  R_SPARC_16 = 2,\n  R_SPARC_32 = 3,\n  R_SPARC_DISP8 = 4,\n  R_SPARC_DISP16 = 5,\n  R_SPARC_DISP32 = 6,\n  R_SPARC_WDISP30 = 7,\n  R_SPARC_WDISP22 = 8,\n  R_SPARC_HI22 = 9,\n  R_SPARC_22 = 10,\n  R_SPARC_13 = 11,\n  R_SPARC_LO10 = 12,\n  R_SPARC_GOT10 = 13,\n  R_SPARC_GOT13 = 14,\n  R_SPARC_GOT22 = 15,\n  R_SPARC_PC10 = 16,\n  R_SPARC_PC22 = 17,\n  R_SPARC_WPLT30 = 18,\n  R_SPARC_COPY = 19,\n  R_SPARC_GLOB_DAT = 20,\n  R_SPARC_JMP_SLOT = 21,\n  R_SPARC_RELATIVE = 22,\n  R_SPARC_UA32 = 23,\n  R_SPARC_PLT32 = 24,\n  R_SPARC_HIPLT22 = 25,\n  R_SPARC_LOPLT10 = 26,\n  R_SPARC_PCPLT32 = 27,\n  R_SPARC_PCPLT22 = 28,\n  R_SPARC_PCPLT10 = 29,\n  R_SPARC_10 = 30,\n  R_SPARC_11 = 31,\n  R_SPARC_64 = 32,\n  R_SPARC_OLO10 = 33,\n  R_SPARC_HH22 = 34,\n  R_SPARC_HM10 = 35,\n  R_SPARC_LM22 = 36,\n  R_SPARC_PC_HH22 = 37,\n  R_SPARC_PC_HM10 = 38,\n  R_SPARC_PC_LM22 = 39,\n  R_SPARC_WDISP16 = 40,\n  R_SPARC_WDISP19 = 41,\n  R_SPARC_7 = 43,\n  R_SPARC_5 = 44,\n  R_SPARC_6 = 45,\n  R_SPARC_DISP64 = 46,\n  R_SPARC_PLT64 = 47,\n  R_SPARC_HIX22 = 48,\n  R_SPARC_LOX10 = 49,\n  R_SPARC_H44 = 50,\n  R_SPARC_M44 = 51,\n  R_SPARC_L44 = 52,\n  R_SPARC_REGISTER = 53,\n  R_SPARC_UA64 = 54,\n  R_SPARC_UA16 = 55,\n  R_SPARC_TLS_GD_HI22 = 56,\n  R_SPARC_TLS_GD_LO10 = 57,\n  R_SPARC_TLS_GD_ADD = 58,\n  R_SPARC_TLS_GD_CALL = 59,\n  R_SPARC_TLS_LDM_HI22 = 60,\n  R_SPARC_TLS_LDM_LO10 = 61,\n  R_SPARC_TLS_LDM_ADD = 62,\n  R_SPARC_TLS_LDM_CALL = 63,\n  R_SPARC_TLS_LDO_HIX22 = 64,\n  R_SPARC_TLS_LDO_LOX10 = 65,\n  R_SPARC_TLS_LDO_ADD = 66,\n  R_SPARC_TLS_IE_HI22 = 67,\n  R_SPARC_TLS_IE_LO10 = 68,\n  R_SPARC_TLS_IE_LD = 69,\n  R_SPARC_TLS_IE_LDX = 70,\n  R_SPARC_TLS_IE_ADD = 71,\n  R_SPARC_TLS_LE_HIX22 = 72,\n  R_SPARC_TLS_LE_LOX10 = 73,\n  R_SPARC_TLS_DTPMOD32 = 74,\n  R_SPARC_TLS_DTPMOD64 = 75,\n  R_SPARC_TLS_DTPOFF32 = 76,\n  R_SPARC_TLS_DTPOFF64 = 77,\n  R_SPARC_TLS_TPOFF32 = 78,\n  R_SPARC_TLS_TPOFF64 = 79,\n  R_SPARC_GOTDATA_HIX22 = 80,\n  R_SPARC_GOTDATA_LOX10 = 81,\n  R_SPARC_GOTDATA_OP_HIX22 = 82,\n  R_SPARC_GOTDATA_OP_LOX10 = 83,\n  R_SPARC_GOTDATA_OP = 84,\n  R_SPARC_SIZE32 = 86,\n  R_SPARC_JMP_IREL = 248,\n  R_SPARC_IRELATIVE = 249,\n};\n\nenum : u32 {\n  R_390_NONE = 0,\n  R_390_8 = 1,\n  R_390_12 = 2,\n  R_390_16 = 3,\n  R_390_32 = 4,\n  R_390_PC32 = 5,\n  R_390_GOT12 = 6,\n  R_390_GOT32 = 7,\n  R_390_PLT32 = 8,\n  R_390_COPY = 9,\n  R_390_GLOB_DAT = 10,\n  R_390_JMP_SLOT = 11,\n  R_390_RELATIVE = 12,\n  R_390_GOTOFF32 = 13,\n  R_390_GOTPC = 14,\n  R_390_GOT16 = 15,\n  R_390_PC16 = 16,\n  R_390_PC16DBL = 17,\n  R_390_PLT16DBL = 18,\n  R_390_PC32DBL = 19,\n  R_390_PLT32DBL = 20,\n  R_390_GOTPCDBL = 21,\n  R_390_64 = 22,\n  R_390_PC64 = 23,\n  R_390_GOT64 = 24,\n  R_390_PLT64 = 25,\n  R_390_GOTENT = 26,\n  R_390_GOTOFF16 = 27,\n  R_390_GOTOFF64 = 28,\n  R_390_GOTPLT12 = 29,\n  R_390_GOTPLT16 = 30,\n  R_390_GOTPLT32 = 31,\n  R_390_GOTPLT64 = 32,\n  R_390_GOTPLTENT = 33,\n  R_390_PLTOFF16 = 34,\n  R_390_PLTOFF32 = 35,\n  R_390_PLTOFF64 = 36,\n  R_390_TLS_LOAD = 37,\n  R_390_TLS_GDCALL = 38,\n  R_390_TLS_LDCALL = 39,\n  R_390_TLS_GD32 = 40,\n  R_390_TLS_GD64 = 41,\n  R_390_TLS_GOTIE12 = 42,\n  R_390_TLS_GOTIE32 = 43,\n  R_390_TLS_GOTIE64 = 44,\n  R_390_TLS_LDM32 = 45,\n  R_390_TLS_LDM64 = 46,\n  R_390_TLS_IE32 = 47,\n  R_390_TLS_IE64 = 48,\n  R_390_TLS_IEENT = 49,\n  R_390_TLS_LE32 = 50,\n  R_390_TLS_LE64 = 51,\n  R_390_TLS_LDO32 = 52,\n  R_390_TLS_LDO64 = 53,\n  R_390_TLS_DTPMOD = 54,\n  R_390_TLS_DTPOFF = 55,\n  R_390_TLS_TPOFF = 56,\n  R_390_20 = 57,\n  R_390_GOT20 = 58,\n  R_390_GOTPLT20 = 59,\n  R_390_TLS_GOTIE20 = 60,\n  R_390_IRELATIVE = 61,\n  R_390_PC12DBL = 62,\n  R_390_PLT12DBL = 63,\n  R_390_PC24DBL = 64,\n  R_390_PLT24DBL = 65,\n};\n\nenum : u32 {\n  R_68K_NONE = 0,\n  R_68K_32 = 1,\n  R_68K_16 = 2,\n  R_68K_8 = 3,\n  R_68K_PC32 = 4,\n  R_68K_PC16 = 5,\n  R_68K_PC8 = 6,\n  R_68K_GOTPCREL32 = 7,\n  R_68K_GOTPCREL16 = 8,\n  R_68K_GOTPCREL8 = 9,\n  R_68K_GOTOFF32 = 10,\n  R_68K_GOTOFF16 = 11,\n  R_68K_GOTOFF8 = 12,\n  R_68K_PLT32 = 13,\n  R_68K_PLT16 = 14,\n  R_68K_PLT8 = 15,\n  R_68K_PLTOFF32 = 16,\n  R_68K_PLTOFF16 = 17,\n  R_68K_PLTOFF8 = 18,\n  R_68K_COPY = 19,\n  R_68K_GLOB_DAT = 20,\n  R_68K_JMP_SLOT = 21,\n  R_68K_RELATIVE = 22,\n  R_68K_TLS_GD32 = 25,\n  R_68K_TLS_GD16 = 26,\n  R_68K_TLS_GD8 = 27,\n  R_68K_TLS_LDM32 = 28,\n  R_68K_TLS_LDM16 = 29,\n  R_68K_TLS_LDM8 = 30,\n  R_68K_TLS_LDO32 = 31,\n  R_68K_TLS_LDO16 = 32,\n  R_68K_TLS_LDO8 = 33,\n  R_68K_TLS_IE32 = 34,\n  R_68K_TLS_IE16 = 35,\n  R_68K_TLS_IE8 = 36,\n  R_68K_TLS_LE32 = 37,\n  R_68K_TLS_LE16 = 38,\n  R_68K_TLS_LE8 = 39,\n  R_68K_TLS_DTPMOD32 = 40,\n  R_68K_TLS_DTPREL32 = 41,\n  R_68K_TLS_TPREL32 = 42,\n};\n\nenum : u32 {\n  R_SH_NONE = 0,\n  R_SH_DIR32 = 1,\n  R_SH_REL32 = 2,\n  R_SH_DIR8WPN = 3,\n  R_SH_IND12W = 4,\n  R_SH_DIR8WPL = 5,\n  R_SH_DIR8WPZ = 6,\n  R_SH_DIR8BP = 7,\n  R_SH_DIR8W = 8,\n  R_SH_DIR8L = 9,\n  R_SH_TLS_GD_32 = 144,\n  R_SH_TLS_LD_32 = 145,\n  R_SH_TLS_LDO_32 = 146,\n  R_SH_TLS_IE_32 = 147,\n  R_SH_TLS_LE_32 = 148,\n  R_SH_TLS_DTPMOD32 = 149,\n  R_SH_TLS_DTPOFF32 = 150,\n  R_SH_TLS_TPOFF32 = 151,\n  R_SH_GOT32 = 160,\n  R_SH_PLT32 = 161,\n  R_SH_COPY = 162,\n  R_SH_GLOB_DAT = 163,\n  R_SH_JMP_SLOT = 164,\n  R_SH_RELATIVE = 165,\n  R_SH_GOTOFF = 166,\n  R_SH_GOTPC = 167,\n  R_SH_GOTPLT32 = 168,\n};\n\nenum : u32 {\n  R_LARCH_NONE = 0,\n  R_LARCH_32 = 1,\n  R_LARCH_64 = 2,\n  R_LARCH_RELATIVE = 3,\n  R_LARCH_COPY = 4,\n  R_LARCH_JUMP_SLOT = 5,\n  R_LARCH_TLS_DTPMOD32 = 6,\n  R_LARCH_TLS_DTPMOD64 = 7,\n  R_LARCH_TLS_DTPREL32 = 8,\n  R_LARCH_TLS_DTPREL64 = 9,\n  R_LARCH_TLS_TPREL32 = 10,\n  R_LARCH_TLS_TPREL64 = 11,\n  R_LARCH_IRELATIVE = 12,\n  R_LARCH_TLS_DESC32 = 13,\n  R_LARCH_TLS_DESC64 = 14,\n  R_LARCH_MARK_LA = 20,\n  R_LARCH_MARK_PCREL = 21,\n  R_LARCH_SOP_PUSH_PCREL = 22,\n  R_LARCH_SOP_PUSH_ABSOLUTE = 23,\n  R_LARCH_SOP_PUSH_DUP = 24,\n  R_LARCH_SOP_PUSH_GPREL = 25,\n  R_LARCH_SOP_PUSH_TLS_TPREL = 26,\n  R_LARCH_SOP_PUSH_TLS_GOT = 27,\n  R_LARCH_SOP_PUSH_TLS_GD = 28,\n  R_LARCH_SOP_PUSH_PLT_PCREL = 29,\n  R_LARCH_SOP_ASSERT = 30,\n  R_LARCH_SOP_NOT = 31,\n  R_LARCH_SOP_SUB = 32,\n  R_LARCH_SOP_SL = 33,\n  R_LARCH_SOP_SR = 34,\n  R_LARCH_SOP_ADD = 35,\n  R_LARCH_SOP_AND = 36,\n  R_LARCH_SOP_IF_ELSE = 37,\n  R_LARCH_SOP_POP_32_S_10_5 = 38,\n  R_LARCH_SOP_POP_32_U_10_12 = 39,\n  R_LARCH_SOP_POP_32_S_10_12 = 40,\n  R_LARCH_SOP_POP_32_S_10_16 = 41,\n  R_LARCH_SOP_POP_32_S_10_16_S2 = 42,\n  R_LARCH_SOP_POP_32_S_5_20 = 43,\n  R_LARCH_SOP_POP_32_S_0_5_10_16_S2 = 44,\n  R_LARCH_SOP_POP_32_S_0_10_10_16_S2 = 45,\n  R_LARCH_SOP_POP_32_U = 46,\n  R_LARCH_ADD8 = 47,\n  R_LARCH_ADD16 = 48,\n  R_LARCH_ADD24 = 49,\n  R_LARCH_ADD32 = 50,\n  R_LARCH_ADD64 = 51,\n  R_LARCH_SUB8 = 52,\n  R_LARCH_SUB16 = 53,\n  R_LARCH_SUB24 = 54,\n  R_LARCH_SUB32 = 55,\n  R_LARCH_SUB64 = 56,\n  R_LARCH_GNU_VTINHERIT = 57,\n  R_LARCH_GNU_VTENTRY = 58,\n  R_LARCH_B16 = 64,\n  R_LARCH_B21 = 65,\n  R_LARCH_B26 = 66,\n  R_LARCH_ABS_HI20 = 67,\n  R_LARCH_ABS_LO12 = 68,\n  R_LARCH_ABS64_LO20 = 69,\n  R_LARCH_ABS64_HI12 = 70,\n  R_LARCH_PCALA_HI20 = 71,\n  R_LARCH_PCALA_LO12 = 72,\n  R_LARCH_PCALA64_LO20 = 73,\n  R_LARCH_PCALA64_HI12 = 74,\n  R_LARCH_GOT_PC_HI20 = 75,\n  R_LARCH_GOT_PC_LO12 = 76,\n  R_LARCH_GOT64_PC_LO20 = 77,\n  R_LARCH_GOT64_PC_HI12 = 78,\n  R_LARCH_GOT_HI20 = 79,\n  R_LARCH_GOT_LO12 = 80,\n  R_LARCH_GOT64_LO20 = 81,\n  R_LARCH_GOT64_HI12 = 82,\n  R_LARCH_TLS_LE_HI20 = 83,\n  R_LARCH_TLS_LE_LO12 = 84,\n  R_LARCH_TLS_LE64_LO20 = 85,\n  R_LARCH_TLS_LE64_HI12 = 86,\n  R_LARCH_TLS_IE_PC_HI20 = 87,\n  R_LARCH_TLS_IE_PC_LO12 = 88,\n  R_LARCH_TLS_IE64_PC_LO20 = 89,\n  R_LARCH_TLS_IE64_PC_HI12 = 90,\n  R_LARCH_TLS_IE_HI20 = 91,\n  R_LARCH_TLS_IE_LO12 = 92,\n  R_LARCH_TLS_IE64_LO20 = 93,\n  R_LARCH_TLS_IE64_HI12 = 94,\n  R_LARCH_TLS_LD_PC_HI20 = 95,\n  R_LARCH_TLS_LD_HI20 = 96,\n  R_LARCH_TLS_GD_PC_HI20 = 97,\n  R_LARCH_TLS_GD_HI20 = 98,\n  R_LARCH_32_PCREL = 99,\n  R_LARCH_RELAX = 100,\n  R_LARCH_DELETE = 101,\n  R_LARCH_ALIGN = 102,\n  R_LARCH_PCREL20_S2 = 103,\n  R_LARCH_CFA = 104,\n  R_LARCH_ADD6 = 105,\n  R_LARCH_SUB6 = 106,\n  R_LARCH_ADD_ULEB128 = 107,\n  R_LARCH_SUB_ULEB128 = 108,\n  R_LARCH_64_PCREL = 109,\n  R_LARCH_CALL36 = 110,\n  R_LARCH_TLS_DESC_PC_HI20 = 111,\n  R_LARCH_TLS_DESC_PC_LO12 = 112,\n  R_LARCH_TLS_DESC64_PC_LO20 = 113,\n  R_LARCH_TLS_DESC64_PC_HI12 = 114,\n  R_LARCH_TLS_DESC_HI20 = 115,\n  R_LARCH_TLS_DESC_LO12 = 116,\n  R_LARCH_TLS_DESC64_LO20 = 117,\n  R_LARCH_TLS_DESC64_HI12 = 118,\n  R_LARCH_TLS_DESC_LD = 119,\n  R_LARCH_TLS_DESC_CALL = 120,\n  R_LARCH_TLS_LE_HI20_R = 121,\n  R_LARCH_TLS_LE_ADD_R = 122,\n  R_LARCH_TLS_LE_LO12_R = 123,\n  R_LARCH_TLS_LD_PCREL20_S2 = 124,\n  R_LARCH_TLS_GD_PCREL20_S2 = 125,\n  R_LARCH_TLS_DESC_PCREL20_S2 = 126,\n};\n\n// Returns true if a given relocation is of type used for direct\n// function call.\ntemplate <typename E>\ninline bool is_func_call_rel(const ElfRel<E> &r) {\n  for (u32 r_type : E::R_FUNCALL)\n    if (r.r_type == r_type)\n      return true;\n  return false;\n}\n\n//\n// DWARF data types\n//\n\nenum : u32 {\n  DW_EH_PE_absptr = 0,\n  DW_EH_PE_omit = 0xff,\n  DW_EH_PE_uleb128 = 0x01,\n  DW_EH_PE_udata2 = 0x02,\n  DW_EH_PE_udata4 = 0x03,\n  DW_EH_PE_udata8 = 0x04,\n  DW_EH_PE_signed = 0x08,\n  DW_EH_PE_sleb128 = 0x09,\n  DW_EH_PE_sdata2 = 0x0a,\n  DW_EH_PE_sdata4 = 0x0b,\n  DW_EH_PE_sdata8 = 0x0c,\n  DW_EH_PE_pcrel = 0x10,\n  DW_EH_PE_textrel = 0x20,\n  DW_EH_PE_datarel = 0x30,\n  DW_EH_PE_funcrel = 0x40,\n  DW_EH_PE_aligned = 0x50,\n};\n\nenum : u32 {\n  DW_AT_low_pc = 0x11,\n  DW_AT_high_pc = 0x12,\n  DW_AT_producer = 0x25,\n  DW_AT_ranges = 0x55,\n  DW_AT_addr_base = 0x73,\n  DW_AT_rnglists_base = 0x74,\n};\n\nenum : u32 {\n  DW_TAG_compile_unit = 0x11,\n  DW_TAG_skeleton_unit = 0x4a,\n};\n\nenum : u32 {\n  DW_UT_compile = 0x01,\n  DW_UT_partial = 0x03,\n  DW_UT_skeleton = 0x04,\n  DW_UT_split_compile = 0x05,\n};\n\nenum : u32 {\n  DW_FORM_addr = 0x01,\n  DW_FORM_block2 = 0x03,\n  DW_FORM_block4 = 0x04,\n  DW_FORM_data2 = 0x05,\n  DW_FORM_data4 = 0x06,\n  DW_FORM_data8 = 0x07,\n  DW_FORM_string = 0x08,\n  DW_FORM_block = 0x09,\n  DW_FORM_block1 = 0x0a,\n  DW_FORM_data1 = 0x0b,\n  DW_FORM_flag = 0x0c,\n  DW_FORM_sdata = 0x0d,\n  DW_FORM_strp = 0x0e,\n  DW_FORM_udata = 0x0f,\n  DW_FORM_ref_addr = 0x10,\n  DW_FORM_ref1 = 0x11,\n  DW_FORM_ref2 = 0x12,\n  DW_FORM_ref4 = 0x13,\n  DW_FORM_ref8 = 0x14,\n  DW_FORM_ref_udata = 0x15,\n  DW_FORM_indirect = 0x16,\n  DW_FORM_sec_offset = 0x17,\n  DW_FORM_exprloc = 0x18,\n  DW_FORM_flag_present = 0x19,\n  DW_FORM_strx = 0x1a,\n  DW_FORM_addrx = 0x1b,\n  DW_FORM_ref_sup4 = 0x1c,\n  DW_FORM_strp_sup = 0x1d,\n  DW_FORM_data16 = 0x1e,\n  DW_FORM_line_strp = 0x1f,\n  DW_FORM_ref_sig8 = 0x20,\n  DW_FORM_implicit_const = 0x21,\n  DW_FORM_loclistx = 0x22,\n  DW_FORM_rnglistx = 0x23,\n  DW_FORM_ref_sup8 = 0x24,\n  DW_FORM_strx1 = 0x25,\n  DW_FORM_strx2 = 0x26,\n  DW_FORM_strx3 = 0x27,\n  DW_FORM_strx4 = 0x28,\n  DW_FORM_addrx1 = 0x29,\n  DW_FORM_addrx2 = 0x2a,\n  DW_FORM_addrx3 = 0x2b,\n  DW_FORM_addrx4 = 0x2c,\n};\n\nenum : u32 {\n  DW_RLE_end_of_list = 0x00,\n  DW_RLE_base_addressx = 0x01,\n  DW_RLE_startx_endx = 0x02,\n  DW_RLE_startx_length = 0x03,\n  DW_RLE_offset_pair = 0x04,\n  DW_RLE_base_address = 0x05,\n  DW_RLE_start_end = 0x06,\n  DW_RLE_start_length = 0x07,\n};\n\n//\n// ELF types\n//\n\ntemplate <typename E> using I16 = std::conditional_t<E::is_le, il16, ib16>;\ntemplate <typename E> using I32 = std::conditional_t<E::is_le, il32, ib32>;\ntemplate <typename E> using I64 = std::conditional_t<E::is_le, il64, ib64>;\ntemplate <typename E> using U16 = std::conditional_t<E::is_le, ul16, ub16>;\ntemplate <typename E> using U24 = std::conditional_t<E::is_le, ul24, ub24>;\ntemplate <typename E> using U32 = std::conditional_t<E::is_le, ul32, ub32>;\ntemplate <typename E> using U64 = std::conditional_t<E::is_le, ul64, ub64>;\n\ntemplate <typename E> using Word = std::conditional_t<E::is_64, U64<E>, U32<E>>;\ntemplate <typename E> using SWord = std::conditional_t<E::is_64, I64<E>, I32<E>>;\n\ntemplate <typename E> requires E::is_64\nstruct ElfSym<E> {\n  bool is_undef() const { return st_shndx == SHN_UNDEF; }\n  bool is_abs() const { return st_shndx == SHN_ABS; }\n  bool is_common() const { return st_shndx == SHN_COMMON; }\n  bool is_weak() const { return st_bind == STB_WEAK; }\n  bool is_undef_weak() const { return is_undef() && is_weak(); }\n\n  bool ppc64_preserves_r2() const { return ppc64_local_entry != 1; }\n  bool ppc64_uses_toc() const { return ppc64_local_entry > 1; }\n\n  U32<E> st_name;\n\n#ifdef __LITTLE_ENDIAN__\n  u8 st_type : 4;\n  u8 st_bind : 4;\n  union {\n    u8 st_visibility : 2;\n    struct {\n      u8 : 7;\n      u8 arm64_variant_pcs : 1;\n    };\n    struct {\n      u8 : 7;\n      u8 riscv_variant_cc : 1;\n    };\n    struct {\n      u8 : 5;\n      u8 ppc64_local_entry : 3;\n    };\n  };\n#else\n  u8 st_bind : 4;\n  u8 st_type : 4;\n  union {\n    struct {\n      u8 : 6;\n      u8 st_visibility : 2;\n    };\n    u8 arm64_variant_pcs : 1;\n    u8 riscv_variant_cc : 1;\n    u8 ppc64_local_entry : 3;\n  };\n#endif\n\n  U16<E> st_shndx;\n  U64<E> st_value;\n  U64<E> st_size;\n};\n\ntemplate <typename E> requires (!E::is_64)\nstruct ElfSym<E> {\n  bool is_undef() const { return st_shndx == SHN_UNDEF; }\n  bool is_abs() const { return st_shndx == SHN_ABS; }\n  bool is_common() const { return st_shndx == SHN_COMMON; }\n  bool is_weak() const { return st_bind == STB_WEAK; }\n  bool is_undef_weak() const { return is_undef() && is_weak(); }\n\n  U32<E> st_name;\n  U32<E> st_value;\n  U32<E> st_size;\n\n#ifdef __LITTLE_ENDIAN__\n  u8 st_type : 4;\n  u8 st_bind : 4;\n  union {\n    u8 st_visibility : 2;\n    struct {\n      u8 : 7;\n      u8 riscv_variant_cc : 1;\n    };\n  };\n#else\n  u8 st_bind : 4;\n  u8 st_type : 4;\n  union {\n    struct {\n      u8 : 6;\n      u8 st_visibility : 2;\n    };\n    u8 riscv_variant_cc : 1;\n  };\n#endif\n\n  U16<E> st_shndx;\n};\n\ntemplate <typename E>\nstruct ElfShdr {\n  U32<E> sh_name;\n  U32<E> sh_type;\n  Word<E> sh_flags;\n  Word<E> sh_addr;\n  Word<E> sh_offset;\n  Word<E> sh_size;\n  U32<E> sh_link;\n  U32<E> sh_info;\n  Word<E> sh_addralign;\n  Word<E> sh_entsize;\n};\n\ntemplate <typename E>\nstruct ElfEhdr {\n  u8 e_ident[16];\n  U16<E> e_type;\n  U16<E> e_machine;\n  U32<E> e_version;\n  Word<E> e_entry;\n  Word<E> e_phoff;\n  Word<E> e_shoff;\n  U32<E> e_flags;\n  U16<E> e_ehsize;\n  U16<E> e_phentsize;\n  U16<E> e_phnum;\n  U16<E> e_shentsize;\n  U16<E> e_shnum;\n  U16<E> e_shstrndx;\n};\n\ntemplate <typename E> requires E::is_64\nstruct ElfPhdr<E> {\n  U32<E> p_type;\n  U32<E> p_flags;\n  U64<E> p_offset;\n  U64<E> p_vaddr;\n  U64<E> p_paddr;\n  U64<E> p_filesz;\n  U64<E> p_memsz;\n  U64<E> p_align;\n};\n\ntemplate <typename E> requires (!E::is_64)\nstruct ElfPhdr<E> {\n  U32<E> p_type;\n  U32<E> p_offset;\n  U32<E> p_vaddr;\n  U32<E> p_paddr;\n  U32<E> p_filesz;\n  U32<E> p_memsz;\n  U32<E> p_flags;\n  U32<E> p_align;\n};\n\n// Depending on the target, ElfRel may or may not contain r_addend member.\n// The relocation record containing r_addend is called RELA, and that\n// without r_addend is called REL.\n//\n// If REL, relocation addends are stored as parts of section contents.\n// That means we add a computed value to an existing value when writing a\n// relocated value if REL. If RELA, we just overwrite an existing value\n// with a newly computed value.\n//\n// We don't want to have too many `if (REL)`s and `if (RELA)`s in our\n// codebase, so ElfRel always takes r_addend as a constructor argument.\n// If it's REL, the argument will simply be ignored.\ntemplate <typename E> requires (E::is_le && E::is_rela)\nstruct ElfRel<E> {\n  ElfRel() = default;\n  ElfRel(u64 offset, u32 type, u32 sym, i64 addend)\n    : r_offset(offset), r_type(type), r_sym(sym), r_addend(addend) {}\n\n  Word<E> r_offset;\n  std::conditional_t<E::is_64, U32<E>, u8> r_type;\n  std::conditional_t<E::is_64, U32<E>, U24<E>> r_sym;\n  SWord<E> r_addend;\n};\n\ntemplate <typename E> requires (!E::is_le && E::is_rela)\nstruct ElfRel<E> {\n  ElfRel() = default;\n  ElfRel(u64 offset, u32 type, u32 sym, i64 addend)\n    : r_offset(offset), r_sym(sym), r_type(type), r_addend(addend) {}\n\n  Word<E> r_offset;\n  std::conditional_t<E::is_64, U32<E>, U24<E>> r_sym;\n  std::conditional_t<E::is_64, U32<E>, u8> r_type;\n  SWord<E> r_addend;\n};\n\ntemplate <typename E> requires (E::is_le && !E::is_rela)\nstruct ElfRel<E> {\n  ElfRel() = default;\n  ElfRel(u64 offset, u32 type, u32 sym, i64 addend = 0)\n    : r_offset(offset), r_type(type), r_sym(sym) {}\n\n  Word<E> r_offset;\n  std::conditional_t<E::is_64, U32<E>, u8> r_type;\n  std::conditional_t<E::is_64, U32<E>, U24<E>> r_sym;\n};\n\ntemplate <typename E> requires (!E::is_le && !E::is_rela)\nstruct ElfRel<E> {\n  ElfRel() = default;\n  ElfRel(u64 offset, u32 type, u32 sym, i64 addend = 0)\n    : r_offset(offset), r_sym(sym), r_type(type) {}\n\n  Word<E> r_offset;\n  std::conditional_t<E::is_64, U32<E>, U24<E>> r_sym;\n  std::conditional_t<E::is_64, U32<E>, u8> r_type;\n};\n\ntemplate <typename E>\nstruct ElfDyn {\n  Word<E> d_tag;\n  Word<E> d_val;\n};\n\ntemplate <typename E>\nstruct ElfVerneed {\n  U16<E> vn_version;\n  U16<E> vn_cnt;\n  U32<E> vn_file;\n  U32<E> vn_aux;\n  U32<E> vn_next;\n};\n\ntemplate <typename E>\nstruct ElfVernaux {\n  U32<E> vna_hash;\n  U16<E> vna_flags;\n  U16<E> vna_other;\n  U32<E> vna_name;\n  U32<E> vna_next;\n};\n\ntemplate <typename E>\nstruct ElfVerdef {\n  U16<E> vd_version;\n  U16<E> vd_flags;\n  U16<E> vd_ndx;\n  U16<E> vd_cnt;\n  U32<E> vd_hash;\n  U32<E> vd_aux;\n  U32<E> vd_next;\n};\n\ntemplate <typename E>\nstruct ElfVerdaux {\n  U32<E> vda_name;\n  U32<E> vda_next;\n};\n\ntemplate <typename E> requires E::is_64\nstruct ElfChdr<E> {\n  U32<E> ch_type;\n  U32<E> ch_reserved;\n  U64<E> ch_size;\n  U64<E> ch_addralign;\n};\n\ntemplate <typename E> requires (!E::is_64)\nstruct ElfChdr<E> {\n  U32<E> ch_type;\n  U32<E> ch_size;\n  U32<E> ch_addralign;\n};\n\ntemplate <typename E>\nstruct ElfNhdr {\n  U32<E> n_namesz;\n  U32<E> n_descsz;\n  U32<E> n_type;\n};\n\n//\n// Target-specific ELF data types\n//\n\ntemplate <>\nstruct ElfRel<SPARC64> {\n  ElfRel() = default;\n  ElfRel(u64 offset, u32 type, u32 sym, i64 addend)\n    : r_offset(offset), r_sym(sym), r_type_data(0), r_type(type),\n      r_addend(addend) {}\n\n  ub64 r_offset;\n  ub32 r_sym;\n  ub24 r_type_data; // SPARC-specific: used for R_SPARC_OLO10\n  u8 r_type;\n  ib64 r_addend;\n};\n\ntemplate <>\nstruct ElfRel<SH4LE> {\n  ElfRel() = default;\n\n  // Addend is ignored except for base relocations because even though\n  // SH4 is RELA, r_addend is ignored in most cases and works as if it\n  // were REL.\n  ElfRel(u64 offset, u32 type, u32 sym, i64 addend)\n    : r_offset(offset), r_type(type), r_sym(sym), r_addend(sym ? 0 : addend) {}\n\n  ul32 r_offset;\n  u8 r_type;\n  ul24 r_sym;\n  il32 r_addend;\n};\n\ntemplate <>\nstruct ElfRel<SH4BE> {\n  ElfRel() = default;\n  ElfRel(u64 offset, u32 type, u32 sym, i64 addend)\n    : r_offset(offset), r_sym(sym), r_type(type), r_addend(sym ? 0 : addend) {}\n\n  ub32 r_offset;\n  ub24 r_sym;\n  u8 r_type;\n  ib32 r_addend;\n};\n\n//\n// Machine descriptions\n//\n\ntemplate <typename E> concept supports_ifunc = requires { E::R_IRELATIVE; };\ntemplate <typename E> concept supports_tlsdesc = requires { E::R_TLSDESC; };\ntemplate <typename E> concept needs_thunk = requires { E::thunk_size; };\n\ntemplate <typename E> concept is_x86_64 = std::same_as<E, X86_64>;\ntemplate <typename E> concept is_i386 = std::same_as<E, I386>;\ntemplate <typename E> concept is_arm64le = std::same_as<E, ARM64LE>;\ntemplate <typename E> concept is_arm64be = std::same_as<E, ARM64BE>;\ntemplate <typename E> concept is_arm32le = std::same_as<E, ARM32LE>;\ntemplate <typename E> concept is_arm32be = std::same_as<E, ARM32BE>;\ntemplate <typename E> concept is_rv64le = std::same_as<E, RV64LE>;\ntemplate <typename E> concept is_rv64be = std::same_as<E, RV64BE>;\ntemplate <typename E> concept is_rv32le = std::same_as<E, RV32LE>;\ntemplate <typename E> concept is_rv32be = std::same_as<E, RV32BE>;\ntemplate <typename E> concept is_ppc32 = std::same_as<E, PPC32>;\ntemplate <typename E> concept is_ppc64v1 = std::same_as<E, PPC64V1>;\ntemplate <typename E> concept is_ppc64v2 = std::same_as<E, PPC64V2>;\ntemplate <typename E> concept is_s390x = std::same_as<E, S390X>;\ntemplate <typename E> concept is_sparc64 = std::same_as<E, SPARC64>;\ntemplate <typename E> concept is_m68k = std::same_as<E, M68K>;\ntemplate <typename E> concept is_sh4le = std::same_as<E, SH4LE>;\ntemplate <typename E> concept is_sh4be = std::same_as<E, SH4BE>;\ntemplate <typename E> concept is_loongarch64 = std::same_as<E, LOONGARCH64>;\ntemplate <typename E> concept is_loongarch32 = std::same_as<E, LOONGARCH32>;\n\ntemplate <typename E> concept is_x86 = is_x86_64<E> || is_i386<E>;\ntemplate <typename E> concept is_arm32 = is_arm32le<E> || is_arm32be<E>;\ntemplate <typename E> concept is_arm64 = is_arm64le<E> || is_arm64be<E>;\ntemplate <typename E> concept is_arm = is_arm64<E> || is_arm32<E>;\ntemplate <typename E> concept is_rv64 = is_rv64le<E> || is_rv64be<E>;\ntemplate <typename E> concept is_rv32 = is_rv32le<E> || is_rv32be<E>;\ntemplate <typename E> concept is_riscv = is_rv64<E> || is_rv32<E>;\ntemplate <typename E> concept is_ppc64 = is_ppc64v1<E> || is_ppc64v2<E>;\ntemplate <typename E> concept is_ppc = is_ppc64<E> || is_ppc32<E>;\ntemplate <typename E> concept is_sparc = is_sparc64<E>;\ntemplate <typename E> concept is_sh4 = is_sh4le<E> || is_sh4be<E>;\ntemplate <typename E> concept is_loongarch = is_loongarch64<E> || is_loongarch32<E>;\n\nstruct X86_64 {\n  static constexpr std::string_view name = \"x86_64\";\n  static constexpr bool is_64 = true;\n  static constexpr bool is_le = true;\n  static constexpr bool is_rela = true;\n  static constexpr u32 page_size = 4096;\n  static constexpr u32 e_machine = EM_X86_64;\n  static constexpr u32 plt_hdr_size = 32;\n  static constexpr u32 plt_size = 16;\n  static constexpr u32 pltgot_size = 8;\n  static constexpr u8 trap[] = { 0xcc }; // int3\n\n  static constexpr u32 R_COPY = R_X86_64_COPY;\n  static constexpr u32 R_GLOB_DAT = R_X86_64_GLOB_DAT;\n  static constexpr u32 R_JUMP_SLOT = R_X86_64_JUMP_SLOT;\n  static constexpr u32 R_ABS = R_X86_64_64;\n  static constexpr u32 R_RELATIVE = R_X86_64_RELATIVE;\n  static constexpr u32 R_IRELATIVE = R_X86_64_IRELATIVE;\n  static constexpr u32 R_DTPOFF = R_X86_64_DTPOFF64;\n  static constexpr u32 R_TPOFF = R_X86_64_TPOFF64;\n  static constexpr u32 R_DTPMOD = R_X86_64_DTPMOD64;\n  static constexpr u32 R_TLSDESC = R_X86_64_TLSDESC;\n  static constexpr u32 R_FUNCALL[] = { R_X86_64_PLT32, R_X86_64_PLTOFF64 };\n};\n\nstruct I386 {\n  static constexpr std::string_view name = \"i386\";\n  static constexpr bool is_64 = false;\n  static constexpr bool is_le = true;\n  static constexpr bool is_rela = false;\n  static constexpr u32 page_size = 4096;\n  static constexpr u32 e_machine = EM_386;\n  static constexpr u32 plt_hdr_size = 16;\n  static constexpr u32 plt_size = 16;\n  static constexpr u32 pltgot_size = 8;\n  static constexpr u8 trap[] = { 0xcc }; // int3\n\n  static constexpr u32 R_COPY = R_386_COPY;\n  static constexpr u32 R_GLOB_DAT = R_386_GLOB_DAT;\n  static constexpr u32 R_JUMP_SLOT = R_386_JUMP_SLOT;\n  static constexpr u32 R_ABS = R_386_32;\n  static constexpr u32 R_RELATIVE = R_386_RELATIVE;\n  static constexpr u32 R_IRELATIVE = R_386_IRELATIVE;\n  static constexpr u32 R_DTPOFF = R_386_TLS_DTPOFF32;\n  static constexpr u32 R_TPOFF = R_386_TLS_TPOFF;\n  static constexpr u32 R_DTPMOD = R_386_TLS_DTPMOD32;\n  static constexpr u32 R_TLSDESC = R_386_TLS_DESC;\n  static constexpr u32 R_FUNCALL[] = { R_386_PLT32 };\n};\n\nstruct ARM64LE {\n  static constexpr std::string_view name = \"arm64\";\n  static constexpr bool is_64 = true;\n  static constexpr bool is_le = true;\n  static constexpr bool is_rela = true;\n  static constexpr u32 page_size = 65536;\n  static constexpr u32 e_machine = EM_AARCH64;\n  static constexpr u32 plt_hdr_size = 32;\n  static constexpr u32 plt_size = 16;\n  static constexpr u32 pltgot_size = 16;\n  static constexpr u32 thunk_hdr_size = 0;\n  static constexpr u32 thunk_size = 32;\n  static constexpr u8 trap[] = { 0x00, 0x7d, 0x20, 0xd4 }; // brk\n\n  static constexpr u32 R_COPY = R_AARCH64_COPY;\n  static constexpr u32 R_GLOB_DAT = R_AARCH64_GLOB_DAT;\n  static constexpr u32 R_JUMP_SLOT = R_AARCH64_JUMP_SLOT;\n  static constexpr u32 R_ABS = R_AARCH64_ABS64;\n  static constexpr u32 R_RELATIVE = R_AARCH64_RELATIVE;\n  static constexpr u32 R_IRELATIVE = R_AARCH64_IRELATIVE;\n  static constexpr u32 R_DTPOFF = R_AARCH64_TLS_DTPREL64;\n  static constexpr u32 R_TPOFF = R_AARCH64_TLS_TPREL64;\n  static constexpr u32 R_DTPMOD = R_AARCH64_TLS_DTPMOD64;\n  static constexpr u32 R_TLSDESC = R_AARCH64_TLSDESC;\n  static constexpr u32 R_FUNCALL[] = { R_AARCH64_JUMP26, R_AARCH64_CALL26 };\n};\n\nstruct ARM64BE : ARM64LE {\n  static constexpr std::string_view name = \"arm64be\";\n  static constexpr bool is_le = false;\n};\n\nstruct ARM32LE {\n  static constexpr std::string_view name = \"arm32\";\n  static constexpr bool is_64 = false;\n  static constexpr bool is_le = true;\n  static constexpr bool is_rela = false;\n  static constexpr u32 page_size = 65536;\n  static constexpr u32 e_machine = EM_ARM;\n  static constexpr u32 plt_hdr_size = 32;\n  static constexpr u32 plt_size = 16;\n  static constexpr u32 pltgot_size = 16;\n  static constexpr u32 thunk_hdr_size = 16;\n  static constexpr u32 thunk_size = 16;\n  static constexpr u8 trap[] = { 0xff, 0xde }; // udf\n\n  static constexpr u32 R_COPY = R_ARM_COPY;\n  static constexpr u32 R_GLOB_DAT = R_ARM_GLOB_DAT;\n  static constexpr u32 R_JUMP_SLOT = R_ARM_JUMP_SLOT;\n  static constexpr u32 R_ABS = R_ARM_ABS32;\n  static constexpr u32 R_RELATIVE = R_ARM_RELATIVE;\n  static constexpr u32 R_IRELATIVE = R_ARM_IRELATIVE;\n  static constexpr u32 R_DTPOFF = R_ARM_TLS_DTPOFF32;\n  static constexpr u32 R_TPOFF = R_ARM_TLS_TPOFF32;\n  static constexpr u32 R_DTPMOD = R_ARM_TLS_DTPMOD32;\n  static constexpr u32 R_TLSDESC = R_ARM_TLS_DESC;\n\n  static constexpr u32 R_FUNCALL[] = {\n    R_ARM_JUMP24, R_ARM_THM_JUMP24, R_ARM_CALL, R_ARM_THM_CALL, R_ARM_PLT32,\n  };\n};\n\nstruct ARM32BE : ARM32LE {\n  static constexpr std::string_view name = \"arm32be\";\n  static constexpr bool is_le = false;\n};\n\nstruct RV64LE {\n  static constexpr std::string_view name = \"riscv64\";\n  static constexpr bool is_64 = true;\n  static constexpr bool is_le = true;\n  static constexpr bool is_rela = true;\n  static constexpr u32 page_size = 4096;\n  static constexpr u32 e_machine = EM_RISCV;\n  static constexpr u32 plt_hdr_size = 32;\n  static constexpr u32 plt_size = 16;\n  static constexpr u32 pltgot_size = 16;\n  static constexpr u8 trap[] = { 0x02, 0x90 }; // c.ebreak\n\n  static constexpr u32 R_COPY = R_RISCV_COPY;\n  static constexpr u32 R_GLOB_DAT = R_RISCV_64;\n  static constexpr u32 R_JUMP_SLOT = R_RISCV_JUMP_SLOT;\n  static constexpr u32 R_ABS = R_RISCV_64;\n  static constexpr u32 R_RELATIVE = R_RISCV_RELATIVE;\n  static constexpr u32 R_IRELATIVE = R_RISCV_IRELATIVE;\n  static constexpr u32 R_DTPOFF = R_RISCV_TLS_DTPREL64;\n  static constexpr u32 R_TPOFF = R_RISCV_TLS_TPREL64;\n  static constexpr u32 R_DTPMOD = R_RISCV_TLS_DTPMOD64;\n  static constexpr u32 R_TLSDESC = R_RISCV_TLSDESC;\n  static constexpr u32 R_FUNCALL[] = { R_RISCV_CALL, R_RISCV_CALL_PLT };\n};\n\nstruct RV64BE : RV64LE {\n  static constexpr std::string_view name = \"riscv64be\";\n  static constexpr bool is_le = false;\n};\n\nstruct RV32LE {\n  static constexpr std::string_view name = \"riscv32\";\n  static constexpr bool is_64 = false;\n  static constexpr bool is_le = true;\n  static constexpr bool is_rela = true;\n  static constexpr u32 page_size = 4096;\n  static constexpr u32 e_machine = EM_RISCV;\n  static constexpr u32 plt_hdr_size = 32;\n  static constexpr u32 plt_size = 16;\n  static constexpr u32 pltgot_size = 16;\n  static constexpr u8 trap[] = { 0x02, 0x90 }; // c.ebreak\n\n  static constexpr u32 R_COPY = R_RISCV_COPY;\n  static constexpr u32 R_GLOB_DAT = R_RISCV_32;\n  static constexpr u32 R_JUMP_SLOT = R_RISCV_JUMP_SLOT;\n  static constexpr u32 R_ABS = R_RISCV_32;\n  static constexpr u32 R_RELATIVE = R_RISCV_RELATIVE;\n  static constexpr u32 R_IRELATIVE = R_RISCV_IRELATIVE;\n  static constexpr u32 R_DTPOFF = R_RISCV_TLS_DTPREL32;\n  static constexpr u32 R_TPOFF = R_RISCV_TLS_TPREL32;\n  static constexpr u32 R_DTPMOD = R_RISCV_TLS_DTPMOD32;\n  static constexpr u32 R_TLSDESC = R_RISCV_TLSDESC;\n  static constexpr u32 R_FUNCALL[] = { R_RISCV_CALL, R_RISCV_CALL_PLT };\n};\n\nstruct RV32BE : RV32LE {\n  static constexpr std::string_view name = \"riscv32be\";\n  static constexpr bool is_le = false;\n};\n\nstruct PPC32 {\n  static constexpr std::string_view name = \"ppc32\";\n  static constexpr bool is_64 = false;\n  static constexpr bool is_le = false;\n  static constexpr bool is_rela = true;\n  static constexpr u32 page_size = 65536;\n  static constexpr u32 e_machine = EM_PPC;\n  static constexpr u32 plt_hdr_size = 64;\n  static constexpr u32 plt_size = 36;\n  static constexpr u32 pltgot_size = 36;\n  static constexpr u32 thunk_hdr_size = 0;\n  static constexpr u32 thunk_size = 36;\n  static constexpr u8 trap[] = { 0x7f, 0xe0, 0x00, 0x08 }; // trap\n\n  static constexpr u32 R_COPY = R_PPC_COPY;\n  static constexpr u32 R_GLOB_DAT = R_PPC_GLOB_DAT;\n  static constexpr u32 R_JUMP_SLOT = R_PPC_JMP_SLOT;\n  static constexpr u32 R_ABS = R_PPC_ADDR32;\n  static constexpr u32 R_RELATIVE = R_PPC_RELATIVE;\n  static constexpr u32 R_IRELATIVE = R_PPC_IRELATIVE;\n  static constexpr u32 R_DTPOFF = R_PPC_DTPREL32;\n  static constexpr u32 R_TPOFF = R_PPC_TPREL32;\n  static constexpr u32 R_DTPMOD = R_PPC_DTPMOD32;\n\n  static constexpr u32 R_FUNCALL[] = {\n    R_PPC_REL24, R_PPC_PLTREL24, R_PPC_LOCAL24PC,\n  };\n};\n\nstruct PPC64 {\n  static constexpr bool is_64 = true;\n  static constexpr bool is_rela = true;\n  static constexpr u32 page_size = 65536;\n  static constexpr u32 e_machine = EM_PPC64;\n\n  static constexpr u32 R_COPY = R_PPC64_COPY;\n  static constexpr u32 R_GLOB_DAT = R_PPC64_GLOB_DAT;\n  static constexpr u32 R_JUMP_SLOT = R_PPC64_JMP_SLOT;\n  static constexpr u32 R_ABS = R_PPC64_ADDR64;\n  static constexpr u32 R_RELATIVE = R_PPC64_RELATIVE;\n  static constexpr u32 R_IRELATIVE = R_PPC64_IRELATIVE;\n  static constexpr u32 R_DTPOFF = R_PPC64_DTPREL64;\n  static constexpr u32 R_TPOFF = R_PPC64_TPREL64;\n  static constexpr u32 R_DTPMOD = R_PPC64_DTPMOD64;\n  static constexpr u32 R_FUNCALL[] = { R_PPC64_REL24, R_PPC64_REL24_NOTOC };\n};\n\nstruct PPC64V1 : PPC64 {\n  static constexpr std::string_view name = \"ppc64v1\";\n  static constexpr bool is_le = false;\n  static constexpr u32 plt_hdr_size = 44;\n  static constexpr u32 pltgot_size = 0;\n  static constexpr u32 thunk_hdr_size = 0;\n  static constexpr u32 thunk_size = 28;\n  static constexpr u8 trap[] = { 0x7f, 0xe0, 0x00, 0x08 }; // trap\n};\n\nstruct PPC64V2 : PPC64 {\n  static constexpr std::string_view name = \"ppc64v2\";\n  static constexpr bool is_le = true;\n  static constexpr u32 plt_hdr_size = 52;\n  static constexpr u32 plt_size = 4;\n  static constexpr u32 pltgot_size = 0;\n  static constexpr u32 thunk_hdr_size = 0;\n  static constexpr u32 thunk_size = 24;\n  static constexpr u8 trap[] = { 0x08, 0x00, 0xe0, 0x7f }; // trap\n};\n\nstruct S390X {\n  static constexpr std::string_view name = \"s390x\";\n  static constexpr bool is_64 = true;\n  static constexpr bool is_le = false;\n  static constexpr bool is_rela = true;\n  static constexpr u32 page_size = 4096;\n  static constexpr u32 e_machine = EM_S390X;\n  static constexpr u32 plt_hdr_size = 48;\n  static constexpr u32 plt_size = 16;\n  static constexpr u32 pltgot_size = 16;\n  static constexpr u8 trap[] = { 0x00, 0x00 }; // invalid\n\n  static constexpr u32 R_COPY = R_390_COPY;\n  static constexpr u32 R_GLOB_DAT = R_390_GLOB_DAT;\n  static constexpr u32 R_JUMP_SLOT = R_390_JMP_SLOT;\n  static constexpr u32 R_ABS = R_390_64;\n  static constexpr u32 R_RELATIVE = R_390_RELATIVE;\n  static constexpr u32 R_IRELATIVE = R_390_IRELATIVE;\n  static constexpr u32 R_DTPOFF = R_390_TLS_DTPOFF;\n  static constexpr u32 R_TPOFF = R_390_TLS_TPOFF;\n  static constexpr u32 R_DTPMOD = R_390_TLS_DTPMOD;\n  static constexpr u32 R_FUNCALL[] = { R_390_PLT32DBL };\n};\n\nstruct SPARC64 {\n  static constexpr std::string_view name = \"sparc64\";\n  static constexpr bool is_64 = true;\n  static constexpr bool is_le = false;\n  static constexpr bool is_rela = true;\n  static constexpr u32 page_size = 8192;\n  static constexpr u32 e_machine = EM_SPARC64;\n  static constexpr u32 plt_hdr_size = 128;\n  static constexpr u32 plt_size = 32;\n  static constexpr u32 pltgot_size = 32;\n  static constexpr u8 trap[] = { 0x91, 0xd0, 0x20, 0x05 }; // ta 5\n\n  static constexpr u32 R_COPY = R_SPARC_COPY;\n  static constexpr u32 R_GLOB_DAT = R_SPARC_GLOB_DAT;\n  static constexpr u32 R_JUMP_SLOT = R_SPARC_JMP_SLOT;\n  static constexpr u32 R_ABS = R_SPARC_64;\n  static constexpr u32 R_RELATIVE = R_SPARC_RELATIVE;\n  static constexpr u32 R_IRELATIVE = R_SPARC_IRELATIVE;\n  static constexpr u32 R_DTPOFF = R_SPARC_TLS_DTPOFF64;\n  static constexpr u32 R_TPOFF = R_SPARC_TLS_TPOFF64;\n  static constexpr u32 R_DTPMOD = R_SPARC_TLS_DTPMOD64;\n  static constexpr u32 R_FUNCALL[] = { R_SPARC_WPLT30, R_SPARC_WDISP30 };\n};\n\nstruct M68K {\n  static constexpr std::string_view name = \"m68k\";\n  static constexpr bool is_64 = false;\n  static constexpr bool is_le = false;\n  static constexpr bool is_rela = true;\n  static constexpr u32 page_size = 8192;\n  static constexpr u32 e_machine = EM_68K;\n  static constexpr u32 plt_hdr_size = 18;\n  static constexpr u32 plt_size = 14;\n  static constexpr u32 pltgot_size = 8;\n  static constexpr u8 trap[] = { 0x4a, 0xfc }; // illegal\n\n  static constexpr u32 R_COPY = R_68K_COPY;\n  static constexpr u32 R_GLOB_DAT = R_68K_GLOB_DAT;\n  static constexpr u32 R_JUMP_SLOT = R_68K_JMP_SLOT;\n  static constexpr u32 R_ABS = R_68K_32;\n  static constexpr u32 R_RELATIVE = R_68K_RELATIVE;\n  static constexpr u32 R_DTPOFF = R_68K_TLS_DTPREL32;\n  static constexpr u32 R_TPOFF = R_68K_TLS_TPREL32;\n  static constexpr u32 R_DTPMOD = R_68K_TLS_DTPMOD32;\n  static constexpr u32 R_FUNCALL[] = { R_68K_PLT32 };\n};\n\nstruct SH4LE {\n  static constexpr std::string_view name = \"sh4\";\n  static constexpr bool is_64 = false;\n  static constexpr bool is_le = true;\n  static constexpr bool is_rela = true;\n  static constexpr u32 page_size = 4096;\n  static constexpr u32 e_machine = EM_SH;\n  static constexpr u32 plt_hdr_size = 16;\n  static constexpr u32 plt_size = 16;\n  static constexpr u32 pltgot_size = 12;\n  static constexpr u8 trap[] = { 0xfd, 0xff }; // illegal\n\n  static constexpr u32 R_COPY = R_SH_COPY;\n  static constexpr u32 R_GLOB_DAT = R_SH_GLOB_DAT;\n  static constexpr u32 R_JUMP_SLOT = R_SH_JMP_SLOT;\n  static constexpr u32 R_ABS = R_SH_DIR32;\n  static constexpr u32 R_RELATIVE = R_SH_RELATIVE;\n  static constexpr u32 R_DTPOFF = R_SH_TLS_DTPOFF32;\n  static constexpr u32 R_TPOFF = R_SH_TLS_TPOFF32;\n  static constexpr u32 R_DTPMOD = R_SH_TLS_DTPMOD32;\n  static constexpr u32 R_FUNCALL[] = { R_SH_PLT32 };\n};\n\nstruct SH4BE : SH4LE {\n  static constexpr std::string_view name = \"sh4be\";\n  static constexpr bool is_le = false;\n  static constexpr u8 trap[] = { 0xff, 0xfd }; // illegal\n};\n\nstruct LOONGARCH64 {\n  static constexpr std::string_view name = \"loongarch64\";\n  static constexpr bool is_64 = true;\n  static constexpr bool is_le = true;\n  static constexpr bool is_rela = true;\n  static constexpr u32 page_size = 65536;\n  static constexpr u32 e_machine = EM_LOONGARCH;\n  static constexpr u32 plt_hdr_size = 32;\n  static constexpr u32 plt_size = 16;\n  static constexpr u32 pltgot_size = 16;\n  static constexpr u8 trap[] = { 0x00, 0x00, 0x2a, 0x00 }; // break 0\n\n  static constexpr u32 R_COPY = R_LARCH_COPY;\n  static constexpr u32 R_GLOB_DAT = R_LARCH_64;\n  static constexpr u32 R_JUMP_SLOT = R_LARCH_JUMP_SLOT;\n  static constexpr u32 R_ABS = R_LARCH_64;\n  static constexpr u32 R_RELATIVE = R_LARCH_RELATIVE;\n  static constexpr u32 R_IRELATIVE = R_LARCH_IRELATIVE;\n  static constexpr u32 R_DTPOFF = R_LARCH_TLS_DTPREL64;\n  static constexpr u32 R_TPOFF = R_LARCH_TLS_TPREL64;\n  static constexpr u32 R_DTPMOD = R_LARCH_TLS_DTPMOD64;\n  static constexpr u32 R_TLSDESC = R_LARCH_TLS_DESC64;\n  static constexpr u32 R_FUNCALL[] = { R_LARCH_B26, R_LARCH_CALL36 };\n};\n\nstruct LOONGARCH32 {\n  static constexpr std::string_view name = \"loongarch32\";\n  static constexpr bool is_64 = false;\n  static constexpr bool is_le = true;\n  static constexpr bool is_rela = true;\n  static constexpr u32 page_size = 65536;\n  static constexpr u32 e_machine = EM_LOONGARCH;\n  static constexpr u32 plt_hdr_size = 32;\n  static constexpr u32 plt_size = 16;\n  static constexpr u32 pltgot_size = 16;\n  static constexpr u8 trap[] = { 0x00, 0x00, 0x2a, 0x00 }; // break 0\n\n  static constexpr u32 R_COPY = R_LARCH_COPY;\n  static constexpr u32 R_GLOB_DAT = R_LARCH_32;\n  static constexpr u32 R_JUMP_SLOT = R_LARCH_JUMP_SLOT;\n  static constexpr u32 R_ABS = R_LARCH_32;\n  static constexpr u32 R_RELATIVE = R_LARCH_RELATIVE;\n  static constexpr u32 R_IRELATIVE = R_LARCH_IRELATIVE;\n  static constexpr u32 R_DTPOFF = R_LARCH_TLS_DTPREL32;\n  static constexpr u32 R_TPOFF = R_LARCH_TLS_TPREL32;\n  static constexpr u32 R_DTPMOD = R_LARCH_TLS_DTPMOD32;\n  static constexpr u32 R_TLSDESC = R_LARCH_TLS_DESC32;\n  static constexpr u32 R_FUNCALL[] = { R_LARCH_B26, R_LARCH_CALL36 };\n};\n\n} // namespace mold\n"
  },
  {
    "path": "src/entry.cc",
    "content": "#include \"config.h\"\n#include \"mold.h\"\n#include \"mold-git-hash.h\"\n\n#if MOLD_USE_MIMALLOC\n# include <mimalloc.h>\n#endif\n\n#if MOLD_USE_SYSTEM_MIMALLOC\n// Including mimalloc-new-delete.h overrides the new/delete operators.\n// We need it only when using mimalloc as a dynamic library.\n// This header should be included in only one source file, so we do\n// it in this file.\n# include <mimalloc-new-delete.h>\n#endif\n\nstd::string mold::mold_version =\n#ifdef MOLD_GIT_HASH\n  \"mold \" MOLD_VERSION \" (\" MOLD_GIT_HASH \"; compatible with GNU ld)\";\n#else\n  \"mold \" MOLD_VERSION \" (compatible with GNU ld)\";\n#endif\n\nint main(int argc, char **argv) {\n#if MOLD_USE_MIMALLOC\n  // Silence mimalloc warnings that users can ignore\n  mi_option_disable(mi_option_verbose);\n  mi_option_disable(mi_option_show_errors);\n#endif\n\n  return mold::mold_main<mold::MOLD_FIRST_TARGET>(argc, argv);\n}\n"
  },
  {
    "path": "src/error.cc",
    "content": "#include \"mold.h\"\n\nnamespace mold {\n\nstatic std::string_view fatal_mono = \"mold: fatal: \";\nstatic std::string_view fatal_color = \"mold: \\033[0;1;31mfatal:\\033[0m \";\nstatic std::string_view error_mono = \"mold: error: \";\nstatic std::string_view error_color = \"mold: \\033[0;1;31merror:\\033[0m \";\nstatic std::string_view warning_mono = \"mold: warning: \";\nstatic std::string_view warning_color = \"mold: \\033[0;1;35mwarning:\\033[0m \";\n\ntemplate <typename E>\nFatal<E>::Fatal(Context<E> &ctx) {\n  out << (ctx.arg.color_diagnostics ? fatal_color : fatal_mono);\n}\n\ntemplate <typename E>\n[[noreturn]] Fatal<E>::~Fatal() {\n  out.emit();\n  cleanup();\n  _exit(1);\n}\n\ntemplate <typename E>\nError<E>::Error(Context<E> &ctx) {\n  if (ctx.arg.noinhibit_exec) {\n    out << (ctx.arg.color_diagnostics ? warning_color : warning_mono);\n  } else {\n    out << (ctx.arg.color_diagnostics ? error_color : error_mono);\n    ctx.has_error = true;\n  }\n}\n\ntemplate <typename E>\nWarn<E>::Warn(Context<E> &ctx) {\n  if (ctx.arg.suppress_warnings)\n    return;\n\n  out.emplace(std::cerr);\n\n  if (ctx.arg.fatal_warnings) {\n    *out << (ctx.arg.color_diagnostics ? error_color : error_mono);\n    ctx.has_error = true;\n  } else {\n    *out << (ctx.arg.color_diagnostics ? warning_color : warning_mono);\n  }\n}\n\nusing E = MOLD_TARGET;\n\ntemplate class Fatal<E>;\ntemplate class Error<E>;\ntemplate class Warn<E>;\n\n} // namespace mold\n"
  },
  {
    "path": "src/filetype.cc",
    "content": "#include \"mold.h\"\n\nnamespace mold {\n\nstatic bool is_text_file(MappedFile *mf) {\n  auto istext = [](char c) {\n    return isprint(c) || c == '\\n' || c == '\\t';\n  };\n\n  u8 *data = mf->data;\n  return mf->size >= 4 && istext(data[0]) && istext(data[1]) &&\n         istext(data[2]) && istext(data[3]);\n}\n\ntemplate <typename E>\nstatic bool is_gcc_lto_obj(MappedFile *mf, bool has_plugin) {\n  const char *data = mf->get_contents().data();\n  ElfEhdr<E> &ehdr = *(ElfEhdr<E> *)data;\n  ElfShdr<E> *sh_begin = (ElfShdr<E> *)(data + ehdr.e_shoff);\n  std::span<ElfShdr<E>> shdrs{(ElfShdr<E> *)(data + ehdr.e_shoff), ehdr.e_shnum};\n\n  // e_shstrndx is a 16-bit field. If .shstrtab's section index is\n  // too large, the actual number is stored to sh_link field.\n  i64 shstrtab_idx = (ehdr.e_shstrndx == SHN_XINDEX)\n    ? sh_begin->sh_link : ehdr.e_shstrndx;\n\n  for (ElfShdr<E> &sec : shdrs) {\n    // GCC FAT LTO objects contain both regular ELF sections and GCC-\n    // specific LTO sections, so that they can be linked as LTO objects if\n    // the LTO linker plugin is available and falls back as regular\n    // objects otherwise. GCC FAT LTO object can be identified by the\n    // presence of `.gcc.lto_.symtab` section.\n    if (has_plugin) {\n      std::string_view name = data + shdrs[shstrtab_idx].sh_offset + sec.sh_name;\n      if (name.starts_with(\".gnu.lto_.symtab.\"))\n        return true;\n    }\n\n    if (sec.sh_type != SHT_SYMTAB)\n      continue;\n\n    // GCC non-FAT LTO object contains only sections symbols followed by\n    // a common symbol whose name is `__gnu_lto_slim` (or `__gnu_lto_v1`\n    // for older GCC releases).\n    std::span<ElfSym<E>> elf_syms{(ElfSym<E> *)(data + sec.sh_offset),\n                                  (size_t)sec.sh_size / sizeof(ElfSym<E>)};\n\n    auto skip = [](u8 type) {\n      return type == STT_NOTYPE || type == STT_FILE || type == STT_SECTION;\n    };\n\n    i64 i = 1;\n    while (i < elf_syms.size() && skip(elf_syms[i].st_type))\n      i++;\n\n    if (i < elf_syms.size() && elf_syms[i].st_shndx == SHN_COMMON) {\n      std::string_view name =\n        data + shdrs[sec.sh_link].sh_offset + elf_syms[i].st_name;\n      if (name.starts_with(\"__gnu_lto_\"))\n        return true;\n    }\n    break;\n  }\n\n  return false;\n}\n\ntemplate <typename E>\nFileType get_file_type(Context<E> &ctx, MappedFile *mf) {\n  std::string_view data = mf->get_contents();\n  bool has_plugin = !ctx.arg.plugin.empty();\n\n  if (data.empty())\n    return FileType::EMPTY;\n\n  if (data.starts_with(\"\\177ELF\")) {\n    u8 byte_order = ((ElfEhdr<I386> *)data.data())->e_ident[EI_DATA];\n\n    if (byte_order == ELFDATA2LSB) {\n      auto &ehdr = *(ElfEhdr<I386> *)data.data();\n\n      if (ehdr.e_type == ET_REL) {\n        if (ehdr.e_ident[EI_CLASS] == ELFCLASS32) {\n          if (is_gcc_lto_obj<I386>(mf, has_plugin))\n            return FileType::GCC_LTO_OBJ;\n        } else {\n          if (is_gcc_lto_obj<X86_64>(mf, has_plugin))\n            return FileType::GCC_LTO_OBJ;\n        }\n        return FileType::ELF_OBJ;\n      }\n\n      if (ehdr.e_type == ET_DYN)\n        return FileType::ELF_DSO;\n    } else {\n      auto &ehdr = *(ElfEhdr<M68K> *)data.data();\n\n      if (ehdr.e_type == ET_REL) {\n        if (ehdr.e_ident[EI_CLASS] == ELFCLASS32) {\n          if (is_gcc_lto_obj<M68K>(mf, has_plugin))\n            return FileType::GCC_LTO_OBJ;\n        } else {\n          if (is_gcc_lto_obj<SPARC64>(mf, has_plugin))\n            return FileType::GCC_LTO_OBJ;\n        }\n        return FileType::ELF_OBJ;\n      }\n\n      if (ehdr.e_type == ET_DYN)\n        return FileType::ELF_DSO;\n    }\n    return FileType::UNKNOWN;\n  }\n\n  if (data.starts_with(\"!<arch>\\n\"))\n    return FileType::AR;\n  if (data.starts_with(\"!<thin>\\n\"))\n    return FileType::THIN_AR;\n  if (is_text_file(mf))\n    return FileType::TEXT;\n  if (data.starts_with(\"\\xde\\xc0\\x17\\x0b\"))\n    return FileType::LLVM_BITCODE;\n  if (data.starts_with(\"BC\\xc0\\xde\"))\n    return FileType::LLVM_BITCODE;\n  return FileType::UNKNOWN;\n}\n\nstatic std::string_view get_elf_type(u8 *buf) {\n  bool is_le = (buf[EI_DATA] == ELFDATA2LSB);\n  bool is_64 = (buf[EI_CLASS] == ELFCLASS64);\n\n  auto *ehdr_le = (ElfEhdr<I386> *)buf;\n  auto *ehdr_be = (ElfEhdr<M68K> *)buf;\n\n  switch (is_le ? ehdr_le->e_machine : ehdr_be->e_machine) {\n  case EM_386:\n    return I386::name;\n  case EM_X86_64:\n    return X86_64::name;\n  case EM_ARM:\n    return is_le ? ARM32LE::name : ARM32BE::name;\n  case EM_AARCH64:\n    return is_le ? ARM64LE::name : ARM64BE::name;\n  case EM_RISCV:\n    if (is_le)\n      return is_64 ? RV64LE::name : RV32LE::name;\n    return is_64 ? RV64BE::name : RV32BE::name;\n  case EM_PPC:\n    return PPC32::name;\n  case EM_PPC64:\n    return is_le ? PPC64V2::name : PPC64V1::name;\n  case EM_S390X:\n    return S390X::name;\n  case EM_SPARC64:\n    return SPARC64::name;\n  case EM_68K:\n    return M68K::name;\n  case EM_SH:\n    return is_le ? SH4LE::name : SH4BE::name;\n  case EM_LOONGARCH:\n    return is_64 ? LOONGARCH64::name : LOONGARCH32::name;\n  default:\n    return \"\";\n  }\n}\n\n// Read the beginning of a given file and returns its machine type\n// (e.g. EM_X86_64 or EM_386).\ntemplate <typename E>\nstd::string_view\nget_machine_type(Context<E> &ctx, ReaderContext &rctx, MappedFile *mf) {\n  switch (get_file_type(ctx, mf)) {\n  case FileType::ELF_OBJ:\n  case FileType::ELF_DSO:\n  case FileType::GCC_LTO_OBJ:\n    return get_elf_type(mf->data);\n  case FileType::AR:\n    for (MappedFile *child : read_fat_archive_members(ctx, mf))\n      if (FileType ty = get_file_type(ctx, child);\n          ty == FileType::ELF_OBJ || ty == FileType::GCC_LTO_OBJ)\n        return get_elf_type(child->data);\n    return \"\";\n  case FileType::THIN_AR:\n    for (MappedFile *child : read_thin_archive_members(ctx, mf))\n      if (FileType ty = get_file_type(ctx, child);\n          ty == FileType::ELF_OBJ || ty == FileType::GCC_LTO_OBJ)\n        return get_elf_type(child->data);\n    return \"\";\n  case FileType::TEXT:\n    return Script(ctx, rctx, mf).get_script_output_type();\n  default:\n    return \"\";\n  }\n}\n\nusing E = MOLD_TARGET;\n\ntemplate FileType get_file_type(Context<E> &, MappedFile *);\n\ntemplate std::string_view\nget_machine_type(Context<E> &, ReaderContext &, MappedFile *);\n\n} // namespace mold\n"
  },
  {
    "path": "src/gc-sections.cc",
    "content": "// This file implements a mark-sweep garbage collector for -gc-sections.\n// In this algorithm, vertices are sections and edges are relocations.\n// Any section that is reachable from a root section is considered alive.\n\n#include \"mold.h\"\n\n#include <fstream>\n#include <tbb/concurrent_vector.h>\n#include <tbb/parallel_for_each.h>\n\nnamespace mold {\n\ntemplate <typename E>\nstatic bool should_keep(const InputSection<E> &isec) {\n  u32 type = isec.shdr().sh_type;\n  u32 flags = isec.shdr().sh_flags;\n  std::string_view name = isec.name();\n\n  if constexpr (is_ppc32<E>)\n    if (name == \".got2\")\n      return true;\n\n  return (flags & SHF_GNU_RETAIN) ||\n         type == SHT_NOTE ||\n         type == SHT_INIT_ARRAY ||\n         type == SHT_FINI_ARRAY ||\n         type == SHT_PREINIT_ARRAY ||\n         name.starts_with(\".ctors\") ||\n         name.starts_with(\".dtors\") ||\n         name.starts_with(\".init\") ||\n         name.starts_with(\".fini\") ||\n         is_c_identifier(name);\n}\n\ntemplate <typename E>\nstatic bool mark_section(InputSection<E> *isec) {\n  return isec && isec->is_alive && !isec->is_visited.test_and_set();\n}\n\ntemplate <typename E>\nstatic tbb::concurrent_vector<InputSection<E> *>\ncollect_root_set(Context<E> &ctx) {\n  Timer t(ctx, \"collect_root_set\");\n  tbb::concurrent_vector<InputSection<E> *> rootset;\n\n  auto enqueue_section = [&](InputSection<E> *isec) {\n    if (mark_section(isec))\n      rootset.push_back(isec);\n  };\n\n  auto enqueue_symbol = [&](Symbol<E> *sym) {\n    if (sym) {\n      if (SectionFragment<E> *frag = sym->get_frag())\n        frag->is_alive = true;\n      else\n        enqueue_section(sym->get_input_section());\n    }\n  };\n\n  // Add sections that are not subject to garbage collection.\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    for (std::unique_ptr<InputSection<E>> &isec : file->sections) {\n      if (!isec || !isec->is_alive)\n        continue;\n\n      // --gc-sections discards only SHF_ALLOC sections. If you want to\n      // reduce the amount of non-memory-mapped segments, you should\n      // use `strip` command, compile without debug info or use\n      // --strip-all linker option.\n      if (!(isec->shdr().sh_flags & SHF_ALLOC)) {\n        isec->is_visited = true;\n        continue;\n      }\n\n      if (should_keep(*isec))\n        enqueue_section(isec.get());\n    }\n  });\n\n  // Add sections containing gc root or exported symbols\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    for (Symbol<E> *sym : file->symbols)\n      if (sym->file == file && (sym->gc_root || sym->is_exported))\n        enqueue_symbol(sym);\n  });\n\n  // .eh_frame consists of variable-length records called CIE and FDE\n  // records, and they are a unit of inclusion or exclusion.\n  // We just keep all CIEs and everything that are referenced by them.\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    for (CieRecord<E> &cie : file->cies)\n      for (const ElfRel<E> &rel : cie.get_rels())\n        enqueue_symbol(file->symbols[rel.r_sym]);\n  });\n\n  return rootset;\n}\n\ntemplate <typename E>\nstatic void visit(Context<E> &ctx, InputSection<E> *isec,\n                  tbb::feeder<InputSection<E> *> &feeder, i64 depth) {\n  assert(isec->is_visited);\n\n  // Mark a section alive. For better performacne, we don't call\n  // `feeder.add` too often.\n  auto mark = [&](InputSection<E> *sec) {\n    if (mark_section(sec)) {\n      if (depth < 3)\n        visit(ctx, sec, feeder, depth + 1);\n      else\n        feeder.add(sec);\n    }\n  };\n\n  // If this is a text section, .eh_frame may contain records\n  // describing how to handle exceptions for that function.\n  // We want to keep associated .eh_frame records.\n  for (FdeRecord<E> &fde : isec->get_fdes())\n    for (const ElfRel<E> &rel : fde.get_rels(isec->file).subspan(1))\n      if (Symbol<E> *sym = isec->file.symbols[rel.r_sym])\n        mark(sym->get_input_section());\n\n  for (const ElfRel<E> &rel : isec->get_rels(ctx)) {\n    // Symbol can refer to either a section fragment or an input section.\n    Symbol<E> &sym = *isec->file.symbols[rel.r_sym];\n    if (SectionFragment<E> *frag = sym.get_frag())\n      frag->is_alive = true;\n    else\n      mark(sym.get_input_section());\n  }\n\n  if constexpr (is_arm32<E>)\n    mark(isec->extra.exidx);\n}\n\n// Mark all reachable sections\ntemplate <typename E>\nstatic void mark(Context<E> &ctx,\n                 tbb::concurrent_vector<InputSection<E> *> &rootset) {\n  Timer t(ctx, \"mark\");\n\n  tbb::parallel_for_each(rootset, [&](InputSection<E> *isec,\n                                      tbb::feeder<InputSection<E> *> &feeder) {\n    visit(ctx, isec, feeder, 0);\n  });\n}\n\n// Remove unreachable sections\ntemplate <typename E>\nstatic void sweep(Context<E> &ctx) {\n  Timer t(ctx, \"sweep\");\n\n  std::vector<std::vector<InputSection<E> *>> sections(ctx.objs.size());\n\n  tbb::parallel_for((i64)0, (i64)ctx.objs.size(), [&](i64 i) {\n    ObjectFile<E> &file = *ctx.objs[i];\n\n    for (std::unique_ptr<InputSection<E>> &isec : file.sections) {\n      if (isec && isec->is_alive && !isec->is_visited) {\n        isec->kill();\n        sections[i].push_back(isec.get());\n      }\n    }\n  });\n\n  std::string &path = ctx.arg.print_gc_sections;\n\n  if (!path.empty()) {\n    std::ostream *out = &std::cout;\n    std::ofstream file;\n\n    if (path != \"-\") {\n      file.open(path);\n      if (file.fail())\n        Fatal(ctx) << \"--print-gc-sections: cannot open \" << path << \": \"\n                   << errno_string();\n      out = &file;\n    }\n\n    i64 saved_bytes = 0;\n    for (std::span<InputSection<E> *> vec : sections)\n      for (InputSection<E> *isec : vec)\n        *out << \"removing unused section \" << *isec << '\\n';\n\n    *out << \"GC saved \" << saved_bytes << \" bytes\\n\";\n  }\n}\n\ntemplate <typename E>\nvoid gc_sections(Context<E> &ctx) {\n  Timer t(ctx, \"gc\");\n  tbb::concurrent_vector<InputSection<E> *> rootset = collect_root_set(ctx);\n  mark(ctx, rootset);\n  sweep(ctx);\n}\n\nusing E = MOLD_TARGET;\n\ntemplate void gc_sections(Context<E> &ctx);\n\n} // namespace mold\n"
  },
  {
    "path": "src/gdb-index.cc",
    "content": "// This file contains code to read DWARF debug info to create .gdb_index.\n//\n// .gdb_index is an optional section to speed up GNU debugger. It contains\n// two maps: 1) a map from function/variable/type names to compunits, and\n// 2) a map from function address ranges to compunits. gdb uses these\n// maps to quickly find a compunit given a name or an instruction pointer.\n//\n// (Terminology: a compilation unit, often abbreviated as compunit or\n// CU, is a unit of debug info. An input .debug_info section usually\n// contains one compunit, and thus an output .debug_info contains as\n// many compunits as the number of input files.)\n//\n// .gdb_index is not mandatory. All the information in .gdb_index is\n// also in other debug info sections. You can actually create an\n// executable without .gdb_index and later add it using the\n// `gdb-add-index` post-processing tool that comes with gdb.\n//\n// Post-relocated debug section contents are needed to create a\n// .gdb_index. Therefore, we create it after relocating all the other\n// sections. The size of the section is also hard to estimate before\n// applying relocations to debug info sections, so a .gdb_index is\n// placed at the very end of the output file, even after the section\n// header.\n//\n// The mapping from names to compunits is 1:n while the mapping from\n// address ranges to compunits is 1:1. That is, two object files may\n// define the same type name, while there should be no two functions\n// that overlap with each other in memory.\n//\n// .gdb_index contains an on-disk hash table for names, so gdb can\n// lookup names without loading all strings into memory and construct an\n// in-memory hash table.\n//\n// Names are in .debug_gnu_pubnames and .debug_gnu_pubtypes input\n// sections. These sections are created if `-ggnu-pubnames` is given.\n// Besides names, these sections contain attributes for each name so\n// that gdb can distinguish type names from function names, for example.\n//\n// A compunit contains one or more function address ranges. If an\n// object file is compiled without -ffunction-sections, it contains\n// only one .text section and therefore contains a single address range.\n// Such range is typically stored directly to the compunit.\n//\n// If an object file is compiled with -ffunction-sections, it contains\n// more than one .text section, and it has as many address ranges as\n// the number of .text sections. Such discontiguous address ranges are\n// stored to .debug_ranges in DWARF 2/3/4 and .debug_rnglists/.debug_addr\n// in DWARF 5.\n//\n// .debug_info section contains DWARF debug info. Although we don't need\n// to parse the whole .debug_info section to read address ranges, we\n// have to do a little bit. DWARF is complicated and often handled using\n// a library such as libdwarf. But we don't use any library because we\n// don't want to add an extra run-time dependency just for --gdb-index.\n//\n// This page explains the format of .gdb_index:\n// https://sourceware.org/gdb/onlinedocs/gdb/Index-Section-Format.html\n\n#include \"mold.h\"\n#include <tbb/parallel_for_each.h>\n\nnamespace mold {\n\nenum DwarfKind { DWARF2_32, DWARF5_32, DWARF2_64, DWARF5_64 };\n\ntemplate <typename E>\nstruct CuHdrDwarf2_32 {\n  U32<E> size;\n  U16<E> version;\n  U32<E> abbrev_offset;\n  u8 address_size;\n};\n\ntemplate <typename E>\nstruct CuHdrDwarf5_32 {\n  U32<E> size;\n  U16<E> version;\n  u8 unit_type;\n  u8 address_size;\n  U32<E> abbrev_offset;\n};\n\ntemplate <typename E>\nstruct CuHdrDwarf2_64 {\n  U32<E> magic;\n  U64<E> size;\n  U16<E> version;\n  U64<E> abbrev_offset;\n  u8 address_size;\n};\n\ntemplate <typename E>\nstruct CuHdrDwarf5_64 {\n  U32<E> magic;\n  U64<E> size;\n  U16<E> version;\n  u8 unit_type;\n  u8 address_size;\n  U64<E> abbrev_offset;\n};\n\ntemplate <typename E>\nstruct PubnamesHdr32 {\n  U32<E> size;\n  U16<E> version;\n  U32<E> debug_info_offset;\n  U32<E> debug_info_size;\n};\n\ntemplate <typename E>\nstruct PubnamesHdr64 {\n  U32<E> magic;\n  U64<E> size;\n  U16<E> version;\n  U64<E> debug_info_offset;\n  U64<E> debug_info_size;\n};\n\nstruct SectionHeader {\n  ul32 version = 7;\n  ul32 cu_list_offset = 0;\n  ul32 cu_types_offset = 0;\n  ul32 ranges_offset = 0;\n  ul32 symtab_offset = 0;\n  ul32 const_pool_offset = 0;\n};\n\nstruct NameType {\n  auto operator<=>(const NameType &) const = default;\n  u64 hash;\n  u8 type;\n  std::string_view name;\n};\n\nstruct MapValue {\n  u32 gdb_hash = 0;\n  Atomic<u32> count;\n  u32 name_offset = 0;\n  u32 type_offset = 0;\n};\n\nstruct Compunit {\n  DwarfKind kind;\n  i64 offset;\n  i64 size;\n  std::vector<std::pair<u64, u64>> ranges;\n  std::vector<NameType> nametypes;\n  std::vector<MapValue *> entries;\n};\n\n// The hash function for .gdb_index.\nstatic u32 gdb_hash(std::string_view name) {\n  u32 h = 0;\n  for (u8 c : name) {\n    if ('A' <= c && c <= 'Z')\n      c = 'a' + c - 'A';\n    h = h * 67 + c - 113;\n  }\n  return h;\n}\n\ntemplate <typename E>\nstatic DwarfKind get_dwarf_kind(Context<E> &ctx, u8 *p) {\n  if (*(U32<E> *)p == 0xffff'ffff) {\n    CuHdrDwarf2_64<E> &hdr = *(CuHdrDwarf2_64<E> *)p;\n    if (hdr.version > 5)\n      Fatal(ctx) << \"--gdb-index: DWARF version \" << hdr.version\n                 << \" is not supported\";\n    return (hdr.version == 5) ? DWARF5_64 : DWARF2_64;\n  }\n\n  CuHdrDwarf2_32<E> &hdr = *(CuHdrDwarf2_32<E> *)p;\n  if (hdr.version > 5)\n    Fatal(ctx) << \"--gdb-index: DWARF version \" << hdr.version\n               << \" is not supported\";\n  return (hdr.version == 5) ? DWARF5_32 : DWARF2_32;\n}\n\ntemplate <typename E, typename CuHdr>\nu8 *find_cu_abbrev(Context<E> &ctx, u8 **p, const CuHdr &hdr) {\n  if (hdr.address_size != sizeof(Word<E>))\n    Fatal(ctx) << \"--gdb-index: unsupported address size \" << hdr.address_size;\n\n  if constexpr (requires { hdr.unit_type; }) {\n    switch (hdr.unit_type) {\n    case DW_UT_compile:\n    case DW_UT_partial:\n      break;\n    case DW_UT_skeleton:\n    case DW_UT_split_compile:\n      *p += 8;\n      break;\n    default:\n      Fatal(ctx) << \"--gdb-index: unknown unit type: 0x\"\n                 << std::hex << hdr.unit_type;\n    }\n  }\n\n  i64 abbrev_code = read_uleb(p);\n\n  // Find a .debug_abbrev record corresponding to the .debug_info record.\n  // We assume the .debug_info record at a given offset is of\n  // DW_TAG_compile_unit which describes a compunit.\n  u8 *abbrev = &ctx.debug_abbrev[0] + hdr.abbrev_offset;\n\n  for (;;) {\n    u32 code = read_uleb(&abbrev);\n    if (code == 0)\n      Fatal(ctx) << \"--gdb-index: .debug_abbrev does not contain\"\n                 << \" a record for the first .debug_info record\";\n\n    if (code == abbrev_code) {\n      // Found a record\n      u64 abbrev_tag = read_uleb(&abbrev);\n      if (abbrev_tag != DW_TAG_compile_unit && abbrev_tag != DW_TAG_skeleton_unit)\n        Fatal(ctx) << \"--gdb-index: the first entry's tag is not\"\n                   << \" DW_TAG_compile_unit/DW_TAG_skeleton_unit but 0x\"\n                   << std::hex << abbrev_tag;\n      break;\n    }\n\n    // Skip an uninteresting record\n    read_uleb(&abbrev); // tag\n    abbrev++; // has_children byte\n    for (;;) {\n      u64 name = read_uleb(&abbrev);\n      u64 form = read_uleb(&abbrev);\n      if (name == 0 && form == 0)\n        break;\n      if (form == DW_FORM_implicit_const)\n        read_uleb(&abbrev);\n    }\n  }\n\n  abbrev++; // skip has_children byte\n  return abbrev;\n}\n\n// .debug_info contains variable-length fields.\n// This function reads one scalar value from a given location.\ntemplate <typename E, typename Offset>\nu64 read_scalar(Context<E> &ctx, u8 **p, u64 form) {\n  switch (form) {\n  case DW_FORM_flag_present:\n    return 0;\n  case DW_FORM_data1:\n  case DW_FORM_flag:\n  case DW_FORM_strx1:\n  case DW_FORM_addrx1:\n  case DW_FORM_ref1:\n    return *(*p)++;\n  case DW_FORM_data2:\n  case DW_FORM_strx2:\n  case DW_FORM_addrx2:\n  case DW_FORM_ref2: {\n    u64 val = *(U16<E> *)*p;\n    *p += 2;\n    return val;\n  }\n  case DW_FORM_strx3:\n  case DW_FORM_addrx3: {\n    u64 val = *(U24<E> *)*p;\n    *p += 3;\n    return val;\n  }\n  case DW_FORM_data4:\n  case DW_FORM_strx4:\n  case DW_FORM_addrx4:\n  case DW_FORM_ref4: {\n    u64 val = *(U32<E> *)*p;\n    *p += 4;\n    return val;\n  }\n  case DW_FORM_data8:\n  case DW_FORM_ref8: {\n    u64 val = *(U64<E> *)*p;\n    *p += 8;\n    return val;\n  }\n  case DW_FORM_strp:\n  case DW_FORM_sec_offset:\n  case DW_FORM_line_strp: {\n    u64 val = *(Offset *)*p;\n    *p += sizeof(Offset);\n    return val;\n  }\n  case DW_FORM_addr:\n  case DW_FORM_ref_addr: {\n    u64 val = *(Word<E> *)*p;\n    *p += sizeof(Word<E>);\n    return val;\n  }\n  case DW_FORM_strx:\n  case DW_FORM_addrx:\n  case DW_FORM_udata:\n  case DW_FORM_ref_udata:\n  case DW_FORM_loclistx:\n  case DW_FORM_rnglistx:\n    return read_uleb(p);\n  case DW_FORM_string:\n    *p += strlen((char *)*p) + 1;\n    return 0;\n  default:\n    Fatal(ctx) << \"--gdb-index: unhandled debug info form: 0x\"\n               << std::hex << form;\n  }\n}\n\n// Read a range list from .debug_ranges starting at the given offset.\ntemplate <typename E>\nstatic std::vector<std::pair<u64, u64>>\nread_debug_range(Word<E> *range, u64 base) {\n  std::vector<std::pair<u64, u64>> vec;\n\n  for (i64 i = 0; range[i] || range[i + 1]; i += 2) {\n    if (range[i] + 1 == 0)\n      base = range[i + 1];\n    else\n      vec.emplace_back(range[i] + base, range[i + 1] + base);\n  }\n  return vec;\n}\n\n// Read a range list from .debug_rnglists starting at the given offset.\ntemplate <typename E>\nstatic void\nread_rnglist_range(std::vector<std::pair<u64, u64>> &vec, u8 *p,\n                   Word<E> *addrx, u64 base) {\n  for (;;) {\n    switch (*p++) {\n    case DW_RLE_end_of_list:\n      return;\n    case DW_RLE_base_addressx:\n      base = addrx[read_uleb(&p)];\n      break;\n    case DW_RLE_startx_endx: {\n      u64 val1 = read_uleb(&p);\n      u64 val2 = read_uleb(&p);\n      vec.emplace_back(addrx[val1], addrx[val2]);\n      break;\n    }\n    case DW_RLE_startx_length: {\n      u64 val1 = read_uleb(&p);\n      u64 val2 = read_uleb(&p);\n      vec.emplace_back(addrx[val1], addrx[val1] + val2);\n      break;\n    }\n    case DW_RLE_offset_pair: {\n      u64 val1 = read_uleb(&p);\n      u64 val2 = read_uleb(&p);\n\n      // If the base is 0, this address range is for an eliminated\n      // section. We only emit it if it's alive.\n      if (base)\n        vec.emplace_back(base + val1, base + val2);\n      break;\n    }\n    case DW_RLE_base_address:\n      base = *(Word<E> *)p;\n      p += sizeof(Word<E>);\n      break;\n    case DW_RLE_start_end: {\n      u64 val1 = ((Word<E> *)p)[0];\n      u64 val2 = ((Word<E> *)p)[1];\n      p += sizeof(Word<E>) * 2;\n      vec.emplace_back(val1, val2);\n      break;\n    }\n    case DW_RLE_start_length: {\n      u64 val1 = *(Word<E> *)p;\n      p += sizeof(Word<E>);\n      u64 val2 = read_uleb(&p);\n      vec.emplace_back(val1, val1 + val2);\n      break;\n    }\n    }\n  }\n}\n\n// Returns a list of address ranges explained by a compunit at the\n// `offset` in an output .debug_info section.\n//\n// .debug_info contains DWARF debug info records, so this function\n// parses DWARF. If a designated compunit contains multiple ranges, the\n// ranges are read from .debug_ranges (or .debug_rnglists for DWARF5).\n// Otherwise, a range is read directly from .debug_info (or possibly\n// from .debug_addr for DWARF5).\ntemplate <typename E, typename CuHdr>\nstatic std::vector<std::pair<u64, u64>>\nread_address_ranges(Context<E> &ctx, const Compunit &cu) {\n  // Read .debug_info to find the record at a given offset.\n  u8 *p = &ctx.debug_info[0] + cu.offset;\n  CuHdr &hdr = *(CuHdr *)p;\n  p += sizeof(hdr);\n\n  u8 *abbrev = find_cu_abbrev(ctx, &p, hdr);\n\n  // Now, read debug info records.\n  struct Record {\n    u64 form = 0;\n    u64 value = 0;\n  };\n\n  using Offset = decltype(hdr.size);\n\n  Record low_pc;\n  Record high_pc;\n  Record ranges;\n  u64 rnglists_base = -1;\n  Word<E> *addrx = nullptr;\n\n  // Read all interesting debug records.\n  for (;;) {\n    u64 name = read_uleb(&abbrev);\n    u64 form = read_uleb(&abbrev);\n    if (name == 0 && form == 0)\n      break;\n\n    u64 val = read_scalar<E, Offset>(ctx, &p, form);\n\n    switch (name) {\n    case DW_AT_low_pc:\n      low_pc = {form, val};\n      break;\n    case DW_AT_high_pc:\n      high_pc = {form, val};\n      break;\n    case DW_AT_rnglists_base:\n      rnglists_base = val;\n      break;\n    case DW_AT_addr_base:\n      addrx = (Word<E> *)(&ctx.debug_addr[0] + val);\n      break;\n    case DW_AT_ranges:\n      ranges = {form, val};\n      break;\n    }\n  }\n\n  // Handle non-contiguous address ranges.\n  if (ranges.form) {\n    if (hdr.version <= 4) {\n      Word<E> *p = (Word<E> *)(&ctx.debug_ranges[0] + ranges.value);\n      return read_debug_range<E>(p, low_pc.value);\n    }\n\n    assert(hdr.version == 5);\n\n    std::vector<std::pair<u64, u64>> vec;\n    u8 *buf = &ctx.debug_rnglists[0];\n\n    if (ranges.form == DW_FORM_sec_offset) {\n      read_rnglist_range<E>(vec, buf + ranges.value, addrx, low_pc.value);\n    } else {\n      if (rnglists_base == -1)\n        Fatal(ctx) << \"--gdb-index: missing DW_AT_rnglists_base\";\n\n      u8 *base = buf + rnglists_base;\n      i64 num_offsets = *(U32<E> *)(base - 4);\n      Offset *offsets = (Offset *)base;\n\n      for (i64 i = 0; i < num_offsets; i++)\n        read_rnglist_range<E>(vec, base + offsets[i], addrx, low_pc.value);\n    }\n    return vec;\n  }\n\n  // Handle a contiguous address range.\n  if (low_pc.form && high_pc.form) {\n    u64 lo;\n\n    switch (low_pc.form) {\n    case DW_FORM_addr:\n      lo = low_pc.value;\n      break;\n    case DW_FORM_addrx:\n    case DW_FORM_addrx1:\n    case DW_FORM_addrx2:\n    case DW_FORM_addrx4:\n      lo = addrx[low_pc.value];\n      break;\n    default:\n      Fatal(ctx) << \"--gdb-index: unhandled form for DW_AT_low_pc: 0x\"\n                 << std::hex << high_pc.form;\n    }\n\n    switch (high_pc.form) {\n    case DW_FORM_addr:\n      return {{lo, high_pc.value}};\n    case DW_FORM_addrx:\n    case DW_FORM_addrx1:\n    case DW_FORM_addrx2:\n    case DW_FORM_addrx4:\n      return {{lo, addrx[high_pc.value]}};\n    case DW_FORM_udata:\n    case DW_FORM_data1:\n    case DW_FORM_data2:\n    case DW_FORM_data4:\n    case DW_FORM_data8:\n      return {{lo, lo + high_pc.value}};\n    default:\n      Fatal(ctx) << \"--gdb-index: unhandled form for DW_AT_high_pc: 0x\"\n                 << std::hex << high_pc.form;\n    }\n  }\n\n  return {};\n}\n\ntemplate <typename E, typename PubnamesHdr>\nstatic i64 read_pubnames_cu(Context<E> &ctx, const PubnamesHdr &hdr,\n                            std::vector<Compunit> &cus, ObjectFile<E> &file) {\n  using Offset = decltype(hdr.size);\n\n  auto get_cu = [&](i64 offset) {\n    for (i64 i = 0; i < cus.size(); i++)\n      if (cus[i].offset == offset)\n        return &cus[i];\n    Fatal(ctx) << file << \": corrupted debug_info_offset\";\n  };\n\n  Compunit *cu = get_cu(file.debug_info->offset + hdr.debug_info_offset);\n  i64 size = hdr.size + offsetof(PubnamesHdr, size) + sizeof(hdr.size);\n  u8 *p = (u8 *)&hdr + sizeof(hdr);\n  u8 *end = (u8 *)&hdr + size;\n\n  while (p < end) {\n    if (*(Offset *)p == 0)\n      break;\n    p += sizeof(Offset);\n\n    u8 type = *p++;\n    std::string_view name = (char *)p;\n    p += name.size() + 1;\n    cu->nametypes.push_back(NameType{hash_string(name), type, name});\n  }\n\n  return size;\n}\n\n// Parses .debug_gnu_pubnames and .debug_gnu_pubtypes. These sections\n// start with a 14 bytes header followed by (4-byte offset, 1-byte type,\n// null-terminated string) tuples.\n//\n// The 4-byte offset is an offset into .debug_info that contains details\n// about the name. The 1-byte type is a type of the corresponding name\n// (e.g. function, variable or datatype). The string is a name of a\n// function, a variable or a type.\ntemplate <typename E>\nstatic void read_pubnames(Context<E> &ctx, std::vector<Compunit> &cus,\n                          ObjectFile<E> &file) {\n  for (InputSection<E> *isec : { file.debug_pubnames, file.debug_pubtypes }) {\n    if (!isec)\n      continue;\n\n    isec->uncompress(ctx);\n    if (isec->contents.empty())\n      continue;\n\n    u8 *p = (u8*)&isec->contents[0];\n    u8 *end = p + isec->contents.size();\n\n    while (p < end) {\n      if (*(U32<E> *)p == 0xffff'ffff)\n        p += read_pubnames_cu(ctx, *(PubnamesHdr64<E> *)p, cus, file);\n      else\n        p += read_pubnames_cu(ctx, *(PubnamesHdr32<E> *)p, cus, file);\n    }\n  };\n}\n\ntemplate <typename E>\nstatic std::vector<Compunit> read_compunits(Context<E> &ctx) {\n  std::vector<Compunit> cus;\n\n  // Read compunits from the output .debug_info section.\n  u8 *begin = &ctx.debug_info[0];\n  u8 *end = begin + ctx.debug_info.size();\n\n  for (u8 *p = begin; p < end;) {\n    DwarfKind kind = get_dwarf_kind(ctx, p);\n    i64 size;\n    if (kind == DWARF2_32 || kind == DWARF5_32)\n      size = ((CuHdrDwarf2_32<E> *)p)->size + 4;\n    else\n      size = ((CuHdrDwarf2_64<E> *)p)->size + 12;\n\n    cus.push_back(Compunit{kind, p - begin, size});\n    p += size;\n  }\n\n  // Read address ranges for each compunit.\n  tbb::parallel_for_each(cus, [&](Compunit &cu) {\n    switch (cu.kind) {\n    case DWARF2_32:\n      cu.ranges = read_address_ranges<E, CuHdrDwarf2_32<E>>(ctx, cu);\n      break;\n    case DWARF5_32:\n      cu.ranges = read_address_ranges<E, CuHdrDwarf5_32<E>>(ctx, cu);\n      break;\n    case DWARF2_64:\n      cu.ranges = read_address_ranges<E, CuHdrDwarf2_64<E>>(ctx, cu);\n      break;\n    case DWARF5_64:\n      cu.ranges = read_address_ranges<E, CuHdrDwarf5_64<E>>(ctx, cu);\n      break;\n    }\n\n    // Remove empty ranges\n    std::erase_if(cu.ranges, [](std::pair<u64, u64> p) {\n      return p.first == 0 || p.first == p.second;\n    });\n  });\n\n  // Read symbols from .debug_gnu_pubnames and .debug_gnu_pubtypes.\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    read_pubnames(ctx, cus, *file);\n  });\n\n  // Uniquify elements because GCC 11 seems to emit one record for each\n  // comdat group which results in having a lot of duplicate records.\n  tbb::parallel_for_each(cus, [](Compunit &cu) {\n    ranges::stable_sort(cu.nametypes);\n    remove_duplicates(cu.nametypes);\n  });\n\n  return cus;\n}\n\ntemplate <typename E>\nstd::span<u8> get_buffer(Context<E> &ctx, Chunk<E> *chunk) {\n  if (chunk->is_compressed) {\n    CompressedSection<E> &sec = *(CompressedSection<E> *)chunk;\n    return {sec.uncompressed_data.get(), (size_t)sec.chdr.ch_size};\n  }\n  return {ctx.buf + chunk->shdr.sh_offset, (size_t)chunk->shdr.sh_size};\n}\n\ntemplate <typename E>\nvoid write_gdb_index(Context<E> &ctx) {\n  Timer t(ctx, \"write_gdb_index\");\n\n  // Find debug info sections\n  for (Chunk<E> *chunk : ctx.chunks) {\n    std::string_view name = chunk->name;\n    if (name == \".debug_info\")\n      ctx.debug_info = get_buffer(ctx, chunk);\n    if (name == \".debug_abbrev\")\n      ctx.debug_abbrev = get_buffer(ctx, chunk);\n    if (name == \".debug_ranges\")\n      ctx.debug_ranges = get_buffer(ctx, chunk);\n    if (name == \".debug_addr\")\n      ctx.debug_addr = get_buffer(ctx, chunk);\n    if (name == \".debug_rnglists\")\n      ctx.debug_rnglists = get_buffer(ctx, chunk);\n  }\n\n  if (ctx.debug_info.empty())\n    return;\n\n  // Read debug info\n  std::vector<Compunit> cus = read_compunits(ctx);\n\n  // Uniquify symbols\n  HyperLogLog estimator;\n\n  tbb::parallel_for_each(cus, [&](Compunit &cu) {\n    HyperLogLog e;\n    for (NameType &nt : cu.nametypes)\n      e.insert(nt.hash);\n    estimator.merge(e);\n  });\n\n  ConcurrentMap<MapValue> map(estimator.get_cardinality() * 3 / 2);\n\n  tbb::parallel_for_each(cus, [&](Compunit &cu) {\n    cu.entries.reserve(cu.nametypes.size());\n    for (NameType &nt : cu.nametypes) {\n      MapValue *ent;\n      bool inserted;\n      std::tie(ent, inserted) = map.insert(nt.name, nt.hash,\n                                           MapValue{gdb_hash(nt.name)});\n      ent->count++;\n      cu.entries.push_back(ent);\n    }\n  });\n\n  // Sort symbols for build reproducibility\n  using Entry = typename decltype(map)::Entry;\n  std::vector<Entry *> entries = map.get_sorted_entries_all();\n\n  // Compute sizes of each components\n  SectionHeader hdr;\n  hdr.cu_list_offset = sizeof(hdr);\n  hdr.cu_types_offset = hdr.cu_list_offset + cus.size() * 16;\n  hdr.ranges_offset = hdr.cu_types_offset;\n\n  hdr.symtab_offset = hdr.ranges_offset;\n  for (Compunit &cu : cus)\n    hdr.symtab_offset += cu.ranges.size() * 20;\n\n  i64 ht_size = bit_ceil(entries.size() * 5 / 4 + 1);\n  hdr.const_pool_offset = hdr.symtab_offset + ht_size * 8;\n\n  i64 offset = 0;\n  for (Entry *ent : entries) {\n    ent->value.type_offset = offset;\n    offset += ent->value.count * 4 + 4;\n  }\n\n  for (Entry *ent : entries) {\n    ent->value.name_offset = offset;\n    offset += ent->keylen + 1;\n  }\n\n  i64 bufsize = hdr.const_pool_offset + offset;\n\n  // Allocate an output buffer. We use malloc instead of vector to\n  // avoid zero-initializing the entire buffer.\n  ctx.output_file->buf2 = (u8 *)malloc(bufsize);\n  ctx.output_file->buf2_size = bufsize;\n  u8 *buf = ctx.output_file->buf2;\n\n  // Write a section header\n  memcpy(buf, &hdr, sizeof(hdr));\n\n  // Write a CU list\n  u8 *p = buf + sizeof(hdr);\n\n  for (Compunit &cu : cus) {\n    *(ul64 *)p = cu.offset;\n    *(ul64 *)(p + 8) = cu.size;\n    p += 16;\n  }\n\n  // Write address areas\n  std::vector<i64> range_offsets(cus.size());\n  for (i64 i = 1; i < cus.size(); i++)\n    range_offsets[i] = range_offsets[i - 1] + cus[i - 1].ranges.size() * 20;\n\n  tbb::parallel_for_each(cus, [&](Compunit &cu) {\n    i64 i = &cu - cus.data();\n    u8 *p = buf + hdr.ranges_offset + range_offsets[i];\n    for (std::pair<u64, u64> range : cu.ranges) {\n      *(ul64 *)p = range.first;\n      *(ul64 *)(p + 8) = range.second;\n      *(ul32 *)(p + 16) = i;\n      p += 20;\n    }\n  });\n\n  // Write a symbol table\n  u32 mask = ht_size - 1;\n  ul32 *ht = (ul32 *)(buf + hdr.symtab_offset);\n  memset(ht, 0, ht_size * 8);\n\n  for (Entry *ent : entries) {\n    u32 hash = ent->value.gdb_hash;\n    u32 step = ((hash * 17) & mask) | 1;\n    u32 j = hash & mask;\n\n    while (ht[j * 2] || ht[j * 2 + 1])\n      j = (j + step) & mask;\n\n    ht[j * 2] = ent->value.name_offset;\n    ht[j * 2 + 1] = ent->value.type_offset;\n  }\n\n  // Write types. Use MapValue::count as an atomic slot counter.\n  u8 *base = buf + hdr.const_pool_offset;\n\n  for (Entry *ent : entries)\n    ent->value.count = 0;\n\n  tbb::parallel_for_each(cus, [&](Compunit &cu) {\n    i64 i = &cu - cus.data();\n    for (i64 j = 0; j < cu.nametypes.size(); j++) {\n      MapValue *ent = cu.entries[j];\n      ul32 *p = (ul32 *)(base + ent->type_offset);\n      i64 idx = ++ent->count;\n      p[idx] = (cu.nametypes[j].type << 24) | i;\n    }\n  });\n\n  // Write the final counts into the buffer.\n  for (Entry *ent : entries)\n    *(ul32 *)(base + ent->value.type_offset) = ent->value.count;\n\n  // Write names\n  tbb::parallel_for_each(entries, [&](Entry *ent) {\n    u8 *dst = buf + hdr.const_pool_offset + ent->value.name_offset;\n    memcpy(dst, ent->key, ent->keylen);\n    dst[ent->keylen] = '\\0';\n  });\n\n  // Update the section size and rewrite the section header\n  if (ctx.shdr) {\n    ctx.gdb_index->shdr.sh_size = bufsize;\n    ctx.shdr->copy_buf(ctx);\n  }\n}\n\nusing E = MOLD_TARGET;\n\ntemplate void write_gdb_index(Context<E> &);\n\n} // namespace mold\n"
  },
  {
    "path": "src/icf.cc",
    "content": "// This file implements the Identical Code Folding feature which can\n// reduce the output file size of a typical program by a few percent.\n// ICF identifies read-only input sections that happen to be identical\n// and thus can be used interchangeably. ICF leaves one of them and discards\n// the others.\n//\n// ICF is usually used in combination with -ffunction-sections and\n// -fdata-sections compiler options, so that object files have one section\n// for each function or variable instead of having one large .text or .data.\n// The unit of ICF merging is section.\n//\n// Two sections are considered identical by ICF if they have the exact\n// same contents, metadata such as section flags, exception handling\n// records, and relocations. The last one is interesting because two\n// relocations are considered identical if they point to the _same_\n// section in terms of ICF.\n//\n// To see what that means, consider two sections, A and B, which are\n// identical except for one pair of relocations. Say, A has a relocation to\n// section C, and B has a relocation to D. In this case, A and B are\n// considered identical if C and D are considered identical. C and D can be\n// either really the same section or two different sections that are\n// considered identical by ICF. Below is an example of such inputs, A, B, C\n// and D:\n//\n//   void A() { C(); }\n//   void B() { D(); }\n//   void C() { A(); }\n//   void D() { B(); }\n//\n// If we assume A and B are mergeable, we can merge C and D, which makes A\n// and B mergeable. There's no contradiction in our assumption, so we can\n// conclude that A and B as well as C and D are mergeable.\n//\n// This problem boils down to one in graph theory. Input to ICF can be\n// considered as a directed graph in which vertices are sections and edges\n// are relocations. Vertices have labels (section contents, etc.), and so\n// are edges (relocation offsets, etc.). Two vertices are considered\n// identical if and only if the (possibly infinite) their unfoldings into\n// regular trees are equal. Given this formulation, we want to find as\n// many identical vertices as possible.\n//\n// Just like a lot of problems with graph, this problem doesn't have a\n// straightforward \"optimal\" solution, and we need to resort to heuristics.\n//\n// mold approaches this problem by hashing program trees with increasing depth\n// on each iteration.\n// For example, when we start, we only hash individual functions with\n// their call into other functions omitted. From the second iteration, we\n// put the function they call into the hash by appending the hash of those\n// functions from the previous iteration. This means that the nth iteration\n// hashes call chain up to (n-1) levels deep.\n// We use a cryptographic hash function, so the unique number of hashes will\n// only monotonically increase as we take into account of deeper trees with\n// iterations (otherwise, that means we have found a hash collision). We stop\n// when the unique number of hashes stop increasing; this is based on the fact\n// that once we observe an iteration with the same amount of unique hashes as\n// the previous iteration, it will remain unchanged for further iterations.\n// This is provable, but here we omit the proof for brevity.\n//\n// When compared to other approaches, mold's approach has a relatively cheaper\n// cost per iteration, and as a bonus, is highly parallelizable.\n// For Chromium, mold's ICF finishes in less than 1 second with 20 threads,\n// whereas lld takes 5 seconds and gold takes 50 seconds under the same\n// conditions.\n\n#include \"mold.h\"\n#include \"../lib/siphash.h\"\n\n#include <array>\n#include <cstdio>\n#include <fstream>\n#include <tbb/concurrent_unordered_map.h>\n#include <tbb/concurrent_vector.h>\n#include <tbb/enumerable_thread_specific.h>\n#include <tbb/parallel_for.h>\n#include <tbb/parallel_for_each.h>\n#include <tbb/parallel_sort.h>\n\nstatic constexpr int64_t HASH_SIZE = 16;\n\nusing Digest = std::array<uint8_t, HASH_SIZE>;\n\nnamespace std {\ntemplate <> struct hash<Digest> {\n  size_t operator()(const Digest &k) const {\n    static_assert(sizeof(size_t) <= HASH_SIZE);\n    size_t val;\n    memcpy(&val, k.data(), sizeof(size_t));\n    return val;\n  }\n};\n}\n\nnamespace mold {\n\nstatic u8 hmac_key[16];\n\ntemplate <typename E>\nstatic void uniquify_cies(Context<E> &ctx) {\n  Timer t(ctx, \"uniquify_cies\");\n  std::vector<CieRecord<E> *> cies;\n\n  auto find = [&](CieRecord<E> &cie) -> i64 {\n    for (i64 i = 0; i < cies.size(); i++)\n      if (cie_equals(cie, *cies[i]))\n        return i;\n    return -1;\n  };\n\n  for (ObjectFile<E> *file : ctx.objs) {\n    for (CieRecord<E> &cie : file->cies) {\n      if (i64 idx = find(cie); idx != -1) {\n        cie.icf_idx = idx;\n      } else {\n        cie.icf_idx = cies.size();\n        cies.push_back(&cie);\n      }\n    }\n  }\n}\n\ntemplate <typename E>\nstatic bool is_eligible(Context<E> &ctx, InputSection<E> &isec) {\n  const ElfShdr<E> &shdr = isec.shdr();\n  std::string_view name = isec.name();\n  \n  if (shdr.sh_size == 0 || !(shdr.sh_flags & SHF_ALLOC) ||\n      shdr.sh_type == SHT_NOBITS || is_c_identifier(name))\n    return false;\n\n  if (shdr.sh_flags & SHF_EXECINSTR)\n    return (ctx.arg.icf_all || !isec.address_taken) &&\n           name != \".init\" && name != \".fini\";\n\n  // .gcc_except_table contains a compiler-generated table. Pointer\n  // equality for the section is not significant because only the C++\n  // exception handling code will use the table at runtime.\n  if (name == \".gcc_except_table\" || name.starts_with(\".gcc_except_table.\"))\n    return true;\n\n  bool is_readonly = !(shdr.sh_flags & SHF_WRITE);\n  bool is_relro = isec.name().starts_with(\".data.rel.ro\");\n  return (ctx.arg.ignore_data_address_equality || !isec.address_taken) &&\n         (is_readonly || is_relro);\n}\n\ntemplate <typename E>\nstatic bool is_leaf(Context<E> &ctx, InputSection<E> &isec) {\n  if (!isec.get_rels(ctx).empty())\n    return false;\n\n  for (FdeRecord<E> &fde : isec.get_fdes())\n    if (fde.get_rels(isec.file).size() > 1)\n      return false;\n\n  return true;\n}\n\ntemplate <typename E>\nstruct LeafHasher {\n  size_t operator()(InputSection<E> *isec) const {\n    u64 h = hash_string(isec->contents);\n    for (FdeRecord<E> &fde : isec->get_fdes()) {\n      u64 h2 = hash_string(fde.get_contents(isec->file).substr(8));\n      h = combine_hash(h, h2);\n    }\n    return h;\n  }\n};\n\ntemplate <typename E>\nstruct LeafEq {\n  bool operator()(InputSection<E> *a, InputSection<E> *b) const {\n    if (a->contents != b->contents)\n      return false;\n\n    std::span<FdeRecord<E>> x = a->get_fdes();\n    std::span<FdeRecord<E>> y = b->get_fdes();\n\n    if (x.size() != y.size())\n      return false;\n\n    for (i64 i = 0; i < x.size(); i++)\n      if (x[i].get_contents(a->file).substr(8) !=\n          y[i].get_contents(b->file).substr(8))\n        return false;\n    return true;\n  }\n};\n\n// Early merge of leaf nodes, which can be processed without constructing the\n// entire graph. This reduces the vertex count and improves memory efficiency.\ntemplate <typename E>\nstatic void merge_leaf_nodes(Context<E> &ctx) {\n  Timer t(ctx, \"merge_leaf_nodes\");\n\n  static Counter eligible(\"icf_eligibles\");\n  static Counter non_eligible(\"icf_non_eligibles\");\n  static Counter leaf(\"icf_leaf_nodes\");\n\n  tbb::concurrent_unordered_map<InputSection<E> *, Atomic<InputSection<E> *>,\n                                LeafHasher<E>, LeafEq<E>> map;\n\n  tbb::parallel_for((i64)0, (i64)ctx.objs.size(), [&](i64 i) {\n    for (std::unique_ptr<InputSection<E>> &isec : ctx.objs[i]->sections) {\n      if (!isec || !isec->is_alive)\n        continue;\n\n      if (!is_eligible(ctx, *isec)) {\n        non_eligible++;\n        continue;\n      }\n\n      if (is_leaf(ctx, *isec)) {\n        leaf++;\n        isec->icf_leaf = true;\n        auto [it, inserted] = map.insert({isec.get(), isec.get()});\n        if (!inserted) {\n          InputSection<E> *isec2 = it->second.load();\n          while (isec->get_priority() < isec2->get_priority() &&\n                 !it->second.compare_exchange_strong(isec2, isec.get()));\n        }\n      } else {\n        eligible++;\n        isec->icf_eligible = true;\n      }\n    }\n  });\n\n  tbb::parallel_for((i64)0, (i64)ctx.objs.size(), [&](i64 i) {\n    for (std::unique_ptr<InputSection<E>> &isec : ctx.objs[i]->sections) {\n      if (isec && isec->is_alive && isec->icf_leaf) {\n        auto it = map.find(isec.get());\n        assert(it != map.end());\n        isec->leader = it->second;\n      }\n    }\n  });\n}\n\ntemplate <typename E>\nstatic Digest compute_digest(Context<E> &ctx, InputSection<E> &isec) {\n  SipHash13_128 hasher(hmac_key);\n\n  auto hash = [&](auto val) {\n    hasher.update((u8 *)&val, sizeof(val));\n  };\n\n  auto hash_string = [&](std::string_view str) {\n    hash(str.size());\n    hasher.update((u8 *)str.data(), str.size());\n  };\n\n  auto hash_symbol = [&](Symbol<E> &sym) {\n    InputSection<E> *isec = sym.get_input_section();\n\n    if (!sym.file) {\n      hash('1');\n      hash((u64)&sym);\n    } else if (SectionFragment<E> *frag = sym.get_frag()) {\n      hash('2');\n      hash((u64)frag);\n    } else if (!isec) {\n      hash('3');\n    } else if (isec->leader) {\n      hash('4');\n      hash((u64)isec->leader);\n    } else if (isec->icf_eligible) {\n      hash('5');\n    } else {\n      hash('6');\n      hash((u64)isec);\n    }\n    hash(sym.value);\n  };\n\n  hash_string(isec.contents);\n  hash(isec.shdr().sh_flags);\n  hash(isec.get_fdes().size());\n  hash(isec.get_rels(ctx).size());\n\n  for (FdeRecord<E> &fde : isec.get_fdes()) {\n    hash(isec.file.cies[fde.cie_idx].icf_idx);\n\n    // Bytes 0 to 4 contain the length of this record, and\n    // bytes 4 to 8 contain an offset to CIE.\n    hash_string(fde.get_contents(isec.file).substr(8));\n\n    hash(fde.get_rels(isec.file).size());\n\n    for (const ElfRel<E> &rel : fde.get_rels(isec.file).subspan(1)) {\n      hash_symbol(*isec.file.symbols[rel.r_sym]);\n      hash(rel.r_type);\n      hash(rel.r_offset - fde.input_offset);\n      hash(get_addend(isec.file.cies[fde.cie_idx].input_section, rel));\n    }\n  }\n\n  for (i64 i = 0; i < isec.get_rels(ctx).size(); i++) {\n    const ElfRel<E> &rel = isec.get_rels(ctx)[i];\n    hash(rel.r_offset);\n    hash(rel.r_type);\n    hash(get_addend(isec, rel));\n    hash_symbol(*isec.file.symbols[rel.r_sym]);\n  }\n\n  Digest digest;\n  hasher.finish(digest.data());\n  return digest;\n}\n\ntemplate <typename E>\nstatic std::vector<InputSection<E> *> gather_sections(Context<E> &ctx) {\n  Timer t(ctx, \"gather_sections\");\n\n  // Count the number of input sections for each input file.\n  std::vector<i64> num_sections(ctx.objs.size());\n\n  tbb::parallel_for((i64)0, (i64)ctx.objs.size(), [&](i64 i) {\n    for (std::unique_ptr<InputSection<E>> &isec : ctx.objs[i]->sections)\n      if (isec && isec->is_alive && isec->icf_eligible)\n        num_sections[i]++;\n  });\n\n  std::vector<i64> section_indices(ctx.objs.size());\n  for (i64 i = 0; i < ctx.objs.size() - 1; i++)\n    section_indices[i + 1] = section_indices[i] + num_sections[i];\n\n  std::vector<InputSection<E> *> sections(\n    section_indices.back() + num_sections.back());\n\n  // Fill `sections` contents.\n  tbb::parallel_for((i64)0, (i64)ctx.objs.size(), [&](i64 i) {\n    i64 idx = section_indices[i];\n    for (std::unique_ptr<InputSection<E>> &isec : ctx.objs[i]->sections)\n      if (isec && isec->is_alive && isec->icf_eligible)\n        sections[idx++] = isec.get();\n  });\n\n  tbb::parallel_for((i64)0, (i64)sections.size(), [&](i64 i) {\n    sections[i]->icf_idx = i;\n  });\n\n  return sections;\n}\n\ntemplate <typename E>\nstatic std::vector<Digest>\ncompute_digests(Context<E> &ctx, std::span<InputSection<E> *> sections) {\n  Timer t(ctx, \"compute_digests\");\n\n  std::vector<Digest> digests(sections.size());\n  tbb::parallel_for((i64)0, (i64)sections.size(), [&](i64 i) {\n    digests[i] = compute_digest(ctx, *sections[i]);\n  });\n  return digests;\n}\n\n// Build a graph, treating every function as a vertex and every function call\n// as an edge. See the description at the top for a more detailed formulation.\n// We use u32 indices here to improve cache locality.\ntemplate <typename E>\nstatic void gather_edges(Context<E> &ctx,\n                         std::span<InputSection<E> *> sections,\n                         std::vector<u32> &edges,\n                         std::vector<u32> &edge_indices) {\n  Timer t(ctx, \"gather_edges\");\n\n  if (sections.empty())\n    return;\n\n  std::vector<i64> num_edges(sections.size());\n  edge_indices.resize(sections.size());\n\n  tbb::parallel_for((i64)0, (i64)sections.size(), [&](i64 i) {\n    InputSection<E> &isec = *sections[i];\n    assert(isec.icf_eligible);\n\n    for (i64 j = 0; j < isec.get_rels(ctx).size(); j++) {\n      const ElfRel<E> &rel = isec.get_rels(ctx)[j];\n      Symbol<E> &sym = *isec.file.symbols[rel.r_sym];\n      if (!sym.get_frag())\n        if (InputSection<E> *isec = sym.get_input_section())\n          if (isec->icf_eligible)\n            num_edges[i]++;\n    }\n  });\n\n  for (i64 i = 0; i < num_edges.size() - 1; i++)\n    edge_indices[i + 1] = edge_indices[i] + num_edges[i];\n\n  edges.resize(edge_indices.back() + num_edges.back());\n\n  tbb::parallel_for((i64)0, (i64)num_edges.size(), [&](i64 i) {\n    InputSection<E> &isec = *sections[i];\n    i64 idx = edge_indices[i];\n\n    for (ElfRel<E> &rel : isec.get_rels(ctx)) {\n      Symbol<E> &sym = *isec.file.symbols[rel.r_sym];\n      if (InputSection<E> *isec = sym.get_input_section())\n        if (isec->icf_eligible)\n          edges[idx++] = isec->icf_idx;\n  }\n  });\n}\n\ntemplate <typename E>\nstatic i64 propagate(std::span<std::vector<Digest>> digests,\n                     std::span<u32> edges, std::span<u32> edge_indices,\n                     bool &slot, std::span<u8> converged,\n                     tbb::affinity_partitioner &ap) {\n  static Counter round(\"icf_round\");\n  round++;\n\n  i64 num_digests = digests[0].size();\n  tbb::enumerable_thread_specific<i64> changed;\n\n  tbb::parallel_for((i64)0, num_digests, [&](i64 i) {\n    if (converged[i])\n      return;\n\n    SipHash13_128 hasher(hmac_key);\n    hasher.update(digests[2][i].data(), HASH_SIZE);\n\n    i64 begin = edge_indices[i];\n    i64 end = (i + 1 == num_digests) ? edges.size() : edge_indices[i + 1];\n\n    for (i64 j : edges.subspan(begin, end - begin))\n      hasher.update(digests[slot][j].data(), HASH_SIZE);\n\n    hasher.finish(digests[!slot][i].data());\n\n    if (digests[slot][i] == digests[!slot][i]) {\n      // This node has converged. Skip further iterations as it will\n      // yield the same hash.\n      converged[i] = true;\n    } else {\n      changed.local()++;\n    }\n  }, ap);\n\n  slot = !slot;\n  return changed.combine(std::plus());\n}\n\ntemplate <typename E>\nstatic i64 count_num_classes(std::span<Digest> digests,\n                             tbb::affinity_partitioner &ap) {\n  std::vector<Digest> vec(digests.begin(), digests.end());\n  tbb::parallel_sort(vec);\n\n  tbb::enumerable_thread_specific<i64> num_classes;\n  tbb::parallel_for((i64)0, (i64)vec.size() - 1, [&](i64 i) {\n    if (vec[i] != vec[i + 1])\n      num_classes.local()++;\n  }, ap);\n  return num_classes.combine(std::plus());\n}\n\ntemplate <typename E>\nstatic void print_icf_sections(Context<E> &ctx) {\n  tbb::concurrent_vector<InputSection<E> *> leaders;\n  tbb::concurrent_unordered_multimap<InputSection<E> *, InputSection<E> *> map;\n\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    for (std::unique_ptr<InputSection<E>> &isec : file->sections) {\n      if (isec && isec->is_alive && isec->leader) {\n        if (isec.get() == isec->leader)\n          leaders.push_back(isec.get());\n        else\n          map.insert({isec->leader, isec.get()});\n      }\n    }\n  });\n\n  tbb::parallel_sort(leaders.begin(), leaders.end(),\n                     [](InputSection<E> *a, InputSection<E> *b) {\n                       return a->get_priority() < b->get_priority();\n                     });\n\n  std::ostream *out = &std::cout;\n  std::ofstream file;\n\n  std::string &path = ctx.arg.print_icf_sections;\n  if (path != \"-\") {\n    file.open(path);\n    if (file.fail())\n      Fatal(ctx) << \"--print-icf-sections: cannot open \" << path << \": \"\n                 << errno_string();\n    out = &file;\n  }\n\n  i64 saved_bytes = 0;\n\n  for (InputSection<E> *leader : leaders) {\n    auto [begin, end] = map.equal_range(leader);\n    if (begin != end) {\n      *out << \"selected section \" << *leader << '\\n';\n      for (auto it = begin; it != end; it++) {\n        *out << \"  removing identical section \" << *it->second << '\\n';\n        saved_bytes += leader->contents.size();\n      }\n    }\n  }\n\n  *out << \"ICF saved \" << saved_bytes << \" bytes\\n\";\n}\n\ntemplate <typename E>\nvoid icf_sections(Context<E> &ctx) {\n  Timer t(ctx, \"icf\");\n  if (ctx.objs.empty())\n    return;\n\n  get_random_bytes(hmac_key, sizeof(hmac_key));\n\n  uniquify_cies(ctx);\n  merge_leaf_nodes(ctx);\n\n  // Prepare for the propagation rounds.\n  std::vector<InputSection<E> *> sections = gather_sections(ctx);\n\n  // We allocate 3 arrays to store hashes for each vertex.\n  //\n  // Index 0 and 1 are used for tree hashes from the previous\n  // iteration and the current iteration. They switch roles every\n  // iteration. See `slot` below.\n  //\n  // Index 2 stores the initial, single-vertex hash. This is combined\n  // with hashes from the connected vertices to form the tree hash\n  // described above.\n  std::vector<std::vector<Digest>> digests(3);\n  digests[0] = compute_digests<E>(ctx, sections);\n  digests[1].resize(digests[0].size());\n  digests[2] = digests[0];\n\n  std::vector<u32> edges;\n  std::vector<u32> edge_indices;\n  gather_edges<E>(ctx, sections, edges, edge_indices);\n\n  std::vector<u8> converged(digests[0].size());\n  bool slot = 0;\n\n  // Execute the propagation rounds until convergence is obtained.\n  {\n    Timer t(ctx, \"propagate\");\n    tbb::affinity_partitioner ap;\n\n    // A cheap test that the graph hasn't converged yet.\n    // The loop after this one uses a strict condition, but it's expensive\n    // as it requires sorting the entire hash collection.\n    //\n    // For nodes that have a cycle in downstream (i.e. recursive\n    // functions and functions that calls recursive functions) will always\n    // change with the iterations. Nodes that doesn't (i.e. non-recursive\n    // functions) will stop changing as soon as the propagation depth reaches\n    // the call tree depth.\n    // Here, we test whether we have reached sufficient depth for the latter,\n    // which is a necessary (but not sufficient) condition for convergence.\n    i64 num_changed = -1;\n    for (;;) {\n      i64 n = propagate<E>(digests, edges, edge_indices, slot, converged, ap);\n      if (n == num_changed)\n        break;\n      num_changed = n;\n    }\n\n    // Run the pass until the unique number of hashes stop increasing, at which\n    // point we have achieved convergence (proof omitted for brevity).\n    i64 num_classes = -1;\n    for (;;) {\n      // count_num_classes requires sorting which is O(n log n), so do a little\n      // more work beforehand to amortize that log factor.\n      for (i64 i = 0; i < 10; i++)\n        propagate<E>(digests, edges, edge_indices, slot, converged, ap);\n\n      i64 n = count_num_classes<E>(digests[slot], ap);\n      if (n == num_classes)\n        break;\n      num_classes = n;\n    }\n  }\n\n  // Group sections by hash values.\n  {\n    Timer t(ctx, \"group\");\n\n    auto *map =\n      new tbb::concurrent_unordered_map<Digest, Atomic<InputSection<E> *>>;\n\n    std::span<Digest> digest = digests[slot];\n\n    tbb::parallel_for((i64)0, (i64)sections.size(), [&](i64 i) {\n      InputSection<E> *isec = sections[i];\n      auto [it, inserted] = map->insert({digest[i], isec});\n      if (!inserted) {\n        InputSection<E> *isec2 = it->second.load();\n        while (isec->get_priority() < isec2->get_priority() &&\n               !it->second.compare_exchange_strong(isec2, isec));\n      }\n    });\n\n    tbb::parallel_for((i64)0, (i64)sections.size(), [&](i64 i) {\n      auto it = map->find(digest[i]);\n      assert(it != map->end());\n      sections[i]->leader = it->second;\n    });\n\n    // Since free'ing the map is slow, postpone it.\n    ctx.on_exit.push_back([=] { delete map; });\n  }\n\n  if (!ctx.arg.print_icf_sections.empty())\n    print_icf_sections(ctx);\n\n  // Eliminate duplicate sections.\n  // Symbols pointing to eliminated sections will be redirected on the fly when\n  // exporting to the symtab.\n  {\n    Timer t(ctx, \"sweep\");\n    static Counter eliminated(\"icf_eliminated\");\n    tbb::parallel_for_each(ctx.objs, [](ObjectFile<E> *file) {\n      for (std::unique_ptr<InputSection<E>> &isec : file->sections) {\n        if (isec && isec->is_alive && isec->icf_removed()) {\n          isec->kill();\n          eliminated++;\n        }\n      }\n    });\n  }\n}\n\nusing E = MOLD_TARGET;\n\ntemplate void icf_sections(Context<E> &ctx);\n\n} // namespace mold\n"
  },
  {
    "path": "src/input-files.cc",
    "content": "#include \"mold.h\"\n\n#include <bit>\n#include <cstring>\n#include <tbb/parallel_sort.h>\n\n#ifndef _WIN32\n# include <unistd.h>\n#endif\n\nnamespace mold {\n\n// If we haven't seen the same `key` before, create a new instance\n// of Symbol and returns it. Otherwise, returns the previously-\n// instantiated object. `key` is usually the same as `name`.\ntemplate <typename E>\nSymbol<E> *get_symbol(Context<E> &ctx, std::string_view key,\n                      std::string_view name) {\n  typename decltype(ctx.symbol_map)::const_accessor acc;\n  ctx.symbol_map.insert(acc, {key, Symbol<E>(name, ctx.arg.demangle)});\n  return const_cast<Symbol<E> *>(&acc->second);\n}\n\ntemplate <typename E>\nSymbol<E> *get_symbol(Context<E> &ctx, std::string_view key) {\n  std::string_view name = key.substr(0, key.find('@'));\n  return get_symbol(ctx, key, name);\n}\n\ntemplate <typename E>\nstatic bool is_rust_symbol(const Symbol<E> &sym) {\n  // The legacy Rust mangling scheme is indistinguishtable from C++.\n  // We don't want to accidentally demangle C++ symbols as Rust ones.\n  // So, the legacy mangling scheme will be demangled only when we\n  // know the object file was created by rustc.\n  if (sym.file && !sym.file->is_dso && ((ObjectFile<E> *)sym.file)->is_rust_obj)\n    return true;\n\n  // \"_R\" is the prefix of the new Rust mangling scheme.\n  return sym.name().starts_with(\"_R\");\n}\n\ntemplate <typename E>\nstd::string_view demangle(const Symbol<E> &sym) {\n  if (is_rust_symbol(sym)) {\n    if (std::optional<std::string_view> s = demangle_rust(sym.name()))\n      return *s;\n  } else {\n    if (std::optional<std::string_view> s = demangle_cpp(sym.name()))\n      return *s;\n  }\n  return sym.name();\n}\n\ntemplate <typename E>\nstd::ostream &operator<<(std::ostream &out, const Symbol<E> &sym) {\n  if (sym.demangle)\n    out << demangle(sym);\n  else\n    out << sym.name();\n  return out;\n}\n\ntemplate <typename E>\nInputFile<E>::InputFile(Context<E> &ctx, MappedFile *mf)\n  : mf(mf), filename(mf->name) {\n  if (mf->size < sizeof(ElfEhdr<E>))\n    Fatal(ctx) << *this << \": file too small\";\n  if (memcmp(mf->data, \"\\177ELF\", 4))\n    Fatal(ctx) << *this << \": not an ELF file\";\n\n  ElfEhdr<E> &ehdr = *(ElfEhdr<E> *)mf->data;\n  is_dso = (ehdr.e_type == ET_DYN);\n\n  ElfShdr<E> *sh_begin = (ElfShdr<E> *)(mf->data + ehdr.e_shoff);\n\n  // e_shnum contains the total number of sections in an object file.\n  // Since it is a 16-bit integer field, it's not large enough to\n  // represent >65535 sections. If an object file contains more than 65535\n  // sections, the actual number is stored to sh_size field.\n  i64 num_sections = (ehdr.e_shnum == 0) ? sh_begin->sh_size : ehdr.e_shnum;\n\n  if (mf->data + mf->size < (u8 *)(sh_begin + num_sections))\n    Fatal(ctx) << mf->name << \": e_shoff or e_shnum corrupted: \"\n               << mf->size << \" \" << num_sections;\n  elf_sections = {sh_begin, sh_begin + num_sections};\n\n  // e_shstrndx is a 16-bit field. If .shstrtab's section index is\n  // too large, the actual number is stored to sh_link field.\n  i64 shstrtab_idx = (ehdr.e_shstrndx == SHN_XINDEX)\n    ? sh_begin->sh_link : ehdr.e_shstrndx;\n\n  shstrtab = this->get_string(ctx, shstrtab_idx);\n}\n\ntemplate <typename E>\nElfShdr<E> *InputFile<E>::find_section(i64 type) {\n  for (ElfShdr<E> &sec : elf_sections)\n    if (sec.sh_type == type)\n      return &sec;\n  return nullptr;\n}\n\n// Find the source filename. It should be listed in symtab as STT_FILE.\ntemplate <typename E>\nstd::string_view InputFile<E>::get_source_name() const {\n  for (i64 i = 0; i < first_global; i++)\n    if (Symbol<E> *sym = symbols[i]; sym->get_type() == STT_FILE)\n      return sym->name();\n  return \"\";\n}\n\ntemplate <typename E>\nstatic bool is_debug_section(const ElfShdr<E> &shdr, std::string_view name) {\n  return !(shdr.sh_flags & SHF_ALLOC) && name.starts_with(\".debug_\");\n}\n\ntemplate <typename E>\nvoid\nObjectFile<E>::parse_note_gnu_property(Context<E> &ctx, const ElfShdr<E> &shdr) {\n  std::string_view data = this->get_string(ctx, shdr);\n\n  while (!data.empty()) {\n    ElfNhdr<E> &hdr = *(ElfNhdr<E> *)data.data();\n    data = data.substr(sizeof(hdr));\n\n    std::string_view name = data.substr(0, hdr.n_namesz - 1);\n    data = data.substr(align_to(hdr.n_namesz, 4));\n\n    std::string_view desc = data.substr(0, hdr.n_descsz);\n    data = data.substr(align_to(hdr.n_descsz, sizeof(Word<E>)));\n\n    if (hdr.n_type != NT_GNU_PROPERTY_TYPE_0 || name != \"GNU\")\n      continue;\n\n    while (!desc.empty()) {\n      u32 type = *(U32<E> *)desc.data();\n      u32 size = *(U32<E> *)(desc.data() + 4);\n      desc = desc.substr(8);\n\n      // The majority of currently defined .note.gnu.property\n      // use 32-bit values.\n      // We don't know how to handle anything else, so if we encounter\n      // one, skip it.\n      //\n      // The following properties have a different size:\n      // - GNU_PROPERTY_STACK_SIZE\n      // - GNU_PROPERTY_NO_COPY_ON_PROTECTED\n      if (size == 4)\n        gnu_properties[type] |= *(U32<E> *)desc.data();\n      desc = desc.substr(align_to(size, sizeof(Word<E>)));\n    }\n  }\n}\n\n// <format-version>\n// [ <section-length> \"vendor-name\" <file-tag> <size> <attribute>*]+ ]*\ntemplate <is_riscv E>\nstatic void read_riscv_attributes(Context<E> &ctx, ObjectFile<E> &file,\n                                  std::string_view data) {\n  if (data.empty())\n    Fatal(ctx) << file << \": corrupted .riscv.attributes section\";\n\n  if (u8 format_version = data[0]; format_version != 'A')\n    return;\n  data = data.substr(1);\n\n  while (!data.empty()) {\n    i64 sz = *(U32<E> *)data.data();\n    if (data.size() < sz)\n      Fatal(ctx) << file << \": corrupted .riscv.attributes section\";\n\n    std::string_view p(data.data() + 4, sz - 4);\n    data = data.substr(sz);\n\n    if (!p.starts_with(\"riscv\\0\"sv))\n      continue;\n    p = p.substr(6);\n\n    if (!p.starts_with(ELF_TAG_FILE))\n      Fatal(ctx) << file << \": corrupted .riscv.attributes section\";\n    p = p.substr(5); // skip the tag and the sub-sub-section size\n\n    while (!p.empty()) {\n      i64 tag = read_uleb(&p);\n\n      switch (tag) {\n      case ELF_TAG_RISCV_STACK_ALIGN:\n        file.extra.stack_align = read_uleb(&p);\n        break;\n      case ELF_TAG_RISCV_ARCH: {\n        i64 pos = p.find_first_of('\\0');\n        file.extra.arch = p.substr(0, pos);\n        p = p.substr(pos + 1);\n        break;\n      }\n      case ELF_TAG_RISCV_UNALIGNED_ACCESS:\n        file.extra.unaligned_access = read_uleb(&p);\n        break;\n      default:\n        break;\n      }\n    }\n  }\n}\n\ntemplate <typename E>\nstatic bool is_known_section_type(const ElfShdr<E> &shdr) {\n  u32 ty = shdr.sh_type;\n  u32 flags = shdr.sh_flags;\n\n  if (ty == SHT_PROGBITS ||\n      ty == SHT_NOTE ||\n      ty == SHT_NOBITS ||\n      ty == SHT_INIT_ARRAY ||\n      ty == SHT_FINI_ARRAY ||\n      ty == SHT_PREINIT_ARRAY)\n    return true;\n\n  if (SHT_LOUSER <= ty && ty <= SHT_HIUSER && !(flags & SHF_ALLOC))\n    return true;\n  if (SHT_LOOS <= ty && ty <= SHT_HIOS && !(flags & SHF_OS_NONCONFORMING))\n    return true;\n  if (is_x86_64<E> && ty == SHT_X86_64_UNWIND)\n    return true;\n  if (is_arm32<E> && (ty == SHT_ARM_EXIDX || ty == SHT_ARM_ATTRIBUTES))\n    return true;\n  if (is_riscv<E> && ty == SHT_RISCV_ATTRIBUTES)\n    return true;\n  return false;\n}\n\n// SHT_CREL is an experimental alternative relocation table format\n// designed to reduce the size of the table. Only LLVM supports it\n// at the moment.\n//\n// This function converts a CREL relocation table to a regular one.\ntemplate <typename E>\nstd::vector<ElfRel<E>> decode_crel(Context<E> &ctx, ObjectFile<E> &file,\n                                   const ElfShdr<E> &shdr) {\n  u8 *p = (u8 *)file.get_string(ctx, shdr).data();\n  u64 hdr = read_uleb(&p);\n  i64 nrels = hdr >> 3;\n  bool is_rela = hdr & 0b100;\n  i64 scale = hdr & 0b11;\n\n  if (is_rela && !E::is_rela)\n    Fatal(ctx) << file << \": CREL with addends is not supported for \" << E::name;\n\n  u64 offset = 0;\n  i64 type = 0;\n  i64 symidx = 0;\n  i64 addend = 0;\n\n  std::vector<ElfRel<E>> vec;\n  vec.reserve(nrels);\n\n  while (vec.size() < nrels) {\n    u8 flags = *p++;\n    i64 nflags = is_rela ? 3 : 2;\n\n    // The first ULEB-128 encoded value is a concatenation of bit flags and\n    // an offset delta. The delta may be very large to decrease the\n    // current offset value by wrapping around. Combined, the encoded value\n    // can be up to 67 bit long. Thus we can't simply use read_uleb() which\n    // returns a u64.\n    u64 delta;\n    if (flags & 0x80)\n      delta = (read_uleb(&p) << (7 - nflags)) | ((flags & 0x7f) >> nflags);\n    else\n      delta = flags >> nflags;\n    offset += delta << scale;\n\n    if (flags & 1)\n      symidx += read_sleb(&p);\n    if (flags & 2)\n      type += read_sleb(&p);\n    if (is_rela && (flags & 4))\n      addend += read_sleb(&p);\n    vec.emplace_back(offset, type, symidx, addend);\n  }\n  return vec;\n}\n\ntemplate <typename E>\nComdatGroup *insert_comdat_group(Context<E> &ctx, std::string_view name) {\n  typename decltype(ctx.comdat_groups)::const_accessor acc;\n  ctx.comdat_groups.insert(acc, {name, ComdatGroup()});\n  return const_cast<ComdatGroup *>(&acc->second);\n}\n\ntemplate <typename E>\nvoid ObjectFile<E>::initialize_sections(Context<E> &ctx) {\n  // Read sections\n  for (i64 i = 0; i < this->elf_sections.size(); i++) {\n    const ElfShdr<E> &shdr = this->elf_sections[i];\n    std::string_view name = this->shstrtab.data() + shdr.sh_name;\n\n    if ((shdr.sh_flags & SHF_EXCLUDE) &&\n        name.starts_with(\".gnu.offload_lto_.symtab.\")) {\n      this->is_gcc_offload_obj = true;\n      continue;\n    }\n\n    if ((shdr.sh_flags & SHF_EXCLUDE) && !(shdr.sh_flags & SHF_ALLOC) &&\n        shdr.sh_type != SHT_LLVM_ADDRSIG && !ctx.arg.relocatable)\n      continue;\n\n    if constexpr (is_arm<E>)\n      if (shdr.sh_type == SHT_ARM_ATTRIBUTES)\n        continue;\n\n    if constexpr (is_riscv<E>) {\n      if (shdr.sh_type == SHT_RISCV_ATTRIBUTES) {\n        read_riscv_attributes(ctx, *this, this->get_string(ctx, shdr));\n        continue;\n      }\n    }\n\n    switch (shdr.sh_type) {\n    case SHT_GROUP: {\n      // Get the signature of this section group.\n      if (shdr.sh_info >= this->elf_syms.size())\n        Fatal(ctx) << *this << \": invalid symbol index\";\n      const ElfSym<E> &esym = this->elf_syms[shdr.sh_info];\n\n      std::string_view signature;\n      if (esym.st_type == STT_SECTION) {\n        signature = this->shstrtab.data() +\n                    this->elf_sections[get_shndx(esym)].sh_name;\n      } else {\n        signature = this->symbol_strtab.data() + esym.st_name;\n      }\n\n      // Ignore a broken comdat group GCC emits for .debug_macros.\n      // https://github.com/rui314/mold/issues/438\n      if (signature.starts_with(\"wm4.\"))\n        continue;\n\n      // Get comdat group members.\n      std::span<U32<E>> entries = this->template get_data<U32<E>>(ctx, shdr);\n\n      if (entries.empty())\n        Fatal(ctx) << *this << \": empty SHT_GROUP\";\n      if (entries[0] == 0)\n        continue;\n      if (entries[0] != GRP_COMDAT)\n        Fatal(ctx) << *this << \": unsupported SHT_GROUP format\";\n\n      ComdatGroup *group = insert_comdat_group(ctx, signature);\n      comdat_groups.push_back({group, (i32)i, entries.subspan(1)});\n      break;\n    }\n    case SHT_CREL:\n      decoded_crel.resize(i + 1);\n      decoded_crel[i] = decode_crel(ctx, *this, shdr);\n      break;\n    case SHT_REL:\n    case SHT_RELA:\n    case SHT_SYMTAB:\n    case SHT_SYMTAB_SHNDX:\n    case SHT_STRTAB:\n    case SHT_NULL:\n      break;\n    default:\n      if (!is_known_section_type(shdr))\n        Fatal(ctx) << *this << \": \" << name << \": unsupported section type: 0x\"\n                   << std::hex << (u32)shdr.sh_type;\n\n      // .note.GNU-stack section controls executable-ness of the stack\n      // area in GNU linkers. We ignore that section because silently\n      // making the stack area executable is too dangerous. Tell our\n      // users about the difference if that matters.\n      if (name == \".note.GNU-stack\" && !ctx.arg.relocatable) {\n        if (shdr.sh_flags & SHF_EXECINSTR) {\n          if (!ctx.arg.z_execstack && !ctx.arg.z_execstack_if_needed)\n            Warn(ctx) << *this << \": this file may cause a segmentation\"\n              \" fault because it requires an executable stack. See\"\n              \" https://github.com/rui314/mold/tree/main/docs/execstack.md\"\n              \" for more info.\";\n          needs_executable_stack = true;\n        }\n        continue;\n      }\n\n      if (name == \".note.gnu.property\") {\n        parse_note_gnu_property(ctx, shdr);\n        continue;\n      }\n\n      // Ignore a build-id section in an input file. This doesn't normally\n      // happen, but you can create such object file with\n      // `ld.bfd -r --build-id`.\n      if (name == \".note.gnu.build-id\")\n        continue;\n\n      // Ignore these sections for compatibility with old glibc i386 CRT files.\n      if (name == \".gnu.linkonce.t.__x86.get_pc_thunk.bx\" ||\n          name == \".gnu.linkonce.t.__i686.get_pc_thunk.bx\")\n        continue;\n\n      // Also ignore this for compatibility with ICC\n      if (name == \".gnu.linkonce.d.DW.ref.__gxx_personality_v0\")\n        continue;\n\n      // Ignore debug sections if --strip-all or --strip-debug is given.\n      if ((ctx.arg.strip_all || ctx.arg.strip_debug) &&\n          is_debug_section(shdr, name))\n        continue;\n\n      // Ignore section is specified by --discard-section.\n      if (!ctx.arg.discard_section.empty() &&\n          ctx.arg.discard_section.contains(name))\n        continue;\n\n      if (name == \".comment\" &&\n          this->get_string(ctx, shdr).starts_with(\"rustc \"))\n        this->is_rust_obj = true;\n\n      // If an output file doesn't have a section header (i.e.\n      // --oformat=binary is given), we discard all non-memory-allocated\n      // sections. This is because without a section header, we can't find\n      // their places in an output file in the first place.\n      if (ctx.arg.oformat_binary && !(shdr.sh_flags & SHF_ALLOC))\n        continue;\n\n      this->sections[i] = std::make_unique<InputSection<E>>(ctx, *this, i);\n      InputSection<E> *isec = this->sections[i].get();\n\n      // Save .llvm_addrsig for --icf=safe.\n      if (shdr.sh_type == SHT_LLVM_ADDRSIG && !ctx.arg.relocatable) {\n        // sh_link should be the index of the symbol table section.\n        // Tools that mutates the symbol table, such as objcopy or `ld -r`\n        // tend to not preserve sh_link, so we ignore such section.\n        if (shdr.sh_link != 0)\n          llvm_addrsig = std::move(this->sections[i]);\n        continue;\n      }\n\n      if (shdr.sh_type == SHT_INIT_ARRAY ||\n          shdr.sh_type == SHT_FINI_ARRAY ||\n          shdr.sh_type == SHT_PREINIT_ARRAY)\n        this->has_init_array = true;\n\n      if (name == \".ctors\" || name.starts_with(\".ctors.\") ||\n          name == \".dtors\" || name.starts_with(\".dtors.\"))\n        this->has_ctors = true;\n\n      if (name == \".eh_frame\")\n        eh_frame_sections.push_back(isec);\n\n      if (name == \".debug_info\" && !(shdr.sh_flags & SHF_ALLOC))\n        debug_info = isec;\n\n      if constexpr (is_ppc32<E>)\n        if (name == \".got2\")\n          extra.got2 = isec;\n\n      // Save debug sections for --gdb-index.\n      if (ctx.arg.gdb_index) {\n        // If --gdb-index is given, contents of .debug_gnu_pubnames and\n        // .debug_gnu_pubtypes are copied to .gdb_index, so keeping them\n        // in an output file is just a waste of space.\n        if (name == \".debug_gnu_pubnames\") {\n          debug_pubnames = isec;\n          isec->is_alive = false;\n        }\n\n        if (name == \".debug_gnu_pubtypes\") {\n          debug_pubtypes = isec;\n          isec->is_alive = false;\n        }\n\n        // .debug_types is similar to .debug_info but contains type info\n        // only. It exists only in DWARF 4, has been removed in DWARF 5 and\n        // neither GCC nor Clang generate it by default\n        // (-fdebug-types-section is needed). As such there is probably\n        // little need to support it.\n        if (name == \".debug_types\")\n          Fatal(ctx) << *this << \": mold's --gdb-index is not compatible\"\n            \" with .debug_types; to fix this error, remove\"\n            \" -fdebug-types-section and recompile\";\n      }\n\n      static Counter counter(\"regular_sections\");\n      counter++;\n      break;\n    }\n  }\n\n  // Attach relocation sections to their target sections.\n  for (i64 i = 0; i < this->elf_sections.size(); i++) {\n    const ElfShdr<E> &shdr = this->elf_sections[i];\n    if (shdr.sh_type == (E::is_rela ? SHT_RELA : SHT_REL) ||\n        shdr.sh_type == SHT_CREL) {\n      if (std::unique_ptr<InputSection<E>> &target = sections[shdr.sh_info]) {\n        assert(target->relsec_idx == -1);\n        target->relsec_idx = i;\n      }\n    }\n  }\n\n  // Attach .arm.exidx sections to their corresponding sections\n  if constexpr (is_arm32<E>)\n    for (std::unique_ptr<InputSection<E>> &isec : this->sections)\n      if (isec && isec->shdr().sh_type == SHT_ARM_EXIDX)\n        if (InputSection<E> *target = sections[isec->shdr().sh_link].get())\n          target->extra.exidx = isec.get();\n}\n\n// .eh_frame contains data records explaining how to handle exceptions.\n// When an exception is thrown, the runtime searches a record from\n// .eh_frame with the current program counter as a key. A record that\n// covers the current PC explains how to find a handler and how to\n// transfer the control ot it.\n//\n// Unlike the most other sections, linker has to parse .eh_frame contents\n// because of the following reasons:\n//\n// - There's usually only one .eh_frame section for each object file,\n//   which explains how to handle exceptions for all functions in the same\n//   object. If we just copy them, the resulting .eh_frame section will\n//   contain lots of records for dead sections (i.e. de-duplicated inline\n//   functions). We want to copy only records for live functions.\n//\n// - .eh_frame contains two types of records: CIE and FDE. There's usually\n//   only one CIE at beginning of .eh_frame section followed by FDEs.\n//   Compiler usually emits the identical CIE record for all object files.\n//   We want to merge identical CIEs in an output .eh_frame section to\n//   reduce the section size.\n//\n// - Scanning a .eh_frame section to find a record is an O(n) operation\n//   where n is the number of records in the section. To reduce it to\n//   O(log n), linker creates a .eh_frame_hdr section. The section\n//   contains a sorted list of [an address in .text, an FDE address whose\n//   coverage starts at the .text address] to make binary search doable.\n//   In order to create .eh_frame_hdr, linker has to read .eh_frame.\n//\n// This function parses an input .eh_frame section.\ntemplate <typename E>\nvoid ObjectFile<E>::parse_ehframe(Context<E> &ctx) {\n  for (InputSection<E> *isec : eh_frame_sections) {\n    std::span<ElfRel<E>> rels = isec->get_rels(ctx);\n    i64 cies_begin = cies.size();\n    i64 fdes_begin = fdes.size();\n\n    // Read CIEs and FDEs until empty.\n    std::string_view contents = this->get_string(ctx, isec->shdr());\n    i64 rel_idx = 0;\n\n    for (std::string_view data = contents; !data.empty();) {\n      i64 size = *(U32<E> *)data.data();\n      if (size == 0)\n        break;\n\n      i64 begin_offset = data.data() - contents.data();\n      i64 end_offset = begin_offset + size + 4;\n      i64 id = *(U32<E> *)(data.data() + 4);\n      data = data.substr(size + 4);\n\n      i64 rel_begin = rel_idx;\n      while (rel_idx < rels.size() && rels[rel_idx].r_offset < end_offset)\n        rel_idx++;\n      assert(rel_idx == rels.size() || begin_offset <= rels[rel_begin].r_offset);\n\n      if (id == 0) {\n        // This is CIE.\n        cies.emplace_back(ctx, *this, *isec, begin_offset, rels, rel_begin);\n      } else {\n        // This is FDE.\n        if (rel_begin == rel_idx || rels[rel_begin].r_sym == 0) {\n          // FDE has no valid relocation, which means FDE is dead from\n          // the beginning. Compilers usually don't create such FDE, but\n          // `ld -r` tend to generate such dead FDEs.\n          continue;\n        }\n\n        if (rels[rel_begin].r_offset - begin_offset != 8)\n          Fatal(ctx) << *isec << \": FDE's first relocation should have offset 8\";\n\n        fdes.emplace_back(begin_offset, rel_begin);\n      }\n    }\n\n    // Associate CIEs to FDEs.\n    auto find_cie = [&](i64 offset) {\n      for (i64 i = cies_begin; i < cies.size(); i++)\n        if (cies[i].input_offset == offset)\n          return i;\n      Fatal(ctx) << *isec << \": bad FDE pointer\";\n    };\n\n    for (i64 i = fdes_begin; i < fdes.size(); i++) {\n      i64 cie_offset = *(I32<E> *)(contents.data() + fdes[i].input_offset + 4);\n      fdes[i].cie_idx = find_cie(fdes[i].input_offset + 4 - cie_offset);\n    }\n\n    isec->is_alive = false;\n  }\n\n  auto get_isec = [&](const FdeRecord<E> &fde) {\n    return get_section(this->elf_syms[fde.get_rels(*this)[0].r_sym]);\n  };\n\n  // We assume that FDEs for the same input sections are contiguous\n  // in `fdes` vector.\n  ranges::stable_sort(fdes, {}, [&](const FdeRecord<E> &x) {\n    return get_isec(x)->get_priority();\n  });\n\n  // Associate FDEs to input sections.\n  for (i64 i = 0; i < fdes.size();) {\n    InputSection<E> *isec = get_isec(fdes[i]);\n    assert(isec->fde_begin == -1);\n\n    if (isec->is_alive) {\n      isec->fde_begin = i++;\n      while (i < fdes.size() && isec == get_isec(fdes[i]))\n        i++;\n      isec->fde_end = i;\n    } else {\n      fdes[i++].is_alive = false;\n    }\n  }\n}\n\ntemplate <typename E>\nvoid ObjectFile<E>::initialize_symbols(Context<E> &ctx) {\n  if (this->elf_syms.empty())\n    return;\n\n  static Counter counter(\"all_syms\");\n  counter += this->elf_syms.size();\n\n  // Initialize local symbols\n  this->local_syms.resize(this->first_global);\n  this->local_syms[0].file = this;\n  this->local_syms[0].sym_idx = 0;\n\n  for (i64 i = 1; i < this->first_global; i++) {\n    const ElfSym<E> &esym = this->elf_syms[i];\n    if (esym.is_common())\n      Fatal(ctx) << *this << \": common local symbol?\";\n\n    std::string_view name;\n    if (esym.st_type == STT_SECTION)\n      name = this->shstrtab.data() + this->elf_sections[get_shndx(esym)].sh_name;\n    else\n      name = this->symbol_strtab.data() + esym.st_name;\n\n    Symbol<E> &sym = this->local_syms[i];\n    sym.set_name(name);\n    sym.file = this;\n    sym.value = esym.st_value;\n    sym.sym_idx = i;\n\n    if (!esym.is_abs())\n      sym.set_input_section(sections[get_shndx(esym)].get());\n  }\n\n  this->symbols.resize(this->elf_syms.size());\n\n  i64 num_globals = this->elf_syms.size() - this->first_global;\n  has_symver.resize(num_globals);\n\n  for (i64 i = 0; i < this->first_global; i++)\n    this->symbols[i] = &this->local_syms[i];\n\n  // Initialize global symbols\n  for (i64 i = this->first_global; i < this->elf_syms.size(); i++) {\n    const ElfSym<E> &esym = this->elf_syms[i];\n\n    if (esym.is_common())\n      has_common_symbol = true;\n\n    // Get a symbol name\n    std::string_view key = this->symbol_strtab.data() + esym.st_name;\n    std::string_view name = key;\n\n    // Parse symbol version after atsign\n    if (i64 pos = name.find('@'); pos != name.npos) {\n      std::string_view ver = name.substr(pos);\n      name = name.substr(0, pos);\n\n      if (ver != \"@\" && ver != \"@@\") {\n        if (ver.starts_with(\"@@\"))\n          key = name;\n        has_symver[i - this->first_global] = true;\n      }\n    }\n\n    // Handle --wrap option\n    Symbol<E> *sym;\n    if (esym.is_undef() && name.starts_with(\"__real_\") &&\n        ctx.arg.wrap.contains(name.substr(7))) {\n      sym = get_symbol(ctx, key.substr(7), name.substr(7));\n    } else {\n      sym = get_symbol(ctx, key, name);\n      if (esym.is_undef() && sym->is_wrapped) {\n        key = save_string(ctx, \"__wrap_\" + std::string(key));\n        name = save_string(ctx, \"__wrap_\" + std::string(name));\n        sym = get_symbol(ctx, key, name);\n      }\n    }\n\n    this->symbols[i] = sym;\n  }\n}\n\n// Relocations are usually sorted by r_offset in relocation tables,\n// but for some reason only RISC-V does not follow that convention.\n// We expect them to be sorted, so sort them if necessary.\ntemplate <typename E>\nvoid ObjectFile<E>::sort_relocations(Context<E> &ctx) {\n  if constexpr (is_riscv<E> || is_loongarch<E>) {\n    for (i64 i = 1; i < sections.size(); i++) {\n      std::unique_ptr<InputSection<E>> &isec = sections[i];\n      if (!isec || !isec->is_alive || !(isec->shdr().sh_flags & SHF_ALLOC))\n        continue;\n\n      std::span<ElfRel<E>> rels = isec->get_rels(ctx);\n      if (!ranges::is_sorted(rels, {}, &ElfRel<E>::r_offset))\n        ranges::stable_sort(rels, {}, &ElfRel<E>::r_offset);\n    }\n  }\n}\n\ntemplate <typename E>\nvoid ObjectFile<E>::convert_mergeable_sections(Context<E> &ctx) {\n  // Convert InputSections to MergeableSections\n  for (i64 i = 0; i < this->sections.size(); i++) {\n    InputSection<E> *isec = this->sections[i].get();\n    if (!isec || isec->sh_size == 0 || isec->relsec_idx != -1)\n      continue;\n\n    const ElfShdr<E> &shdr = isec->shdr();\n    if (!(shdr.sh_flags & SHF_MERGE))\n      continue;\n\n    MergedSection<E> *parent =\n      MergedSection<E>::get_instance(ctx, isec->name(), shdr);\n\n    if (parent) {\n      this->mergeable_sections[i] =\n        std::make_unique<MergeableSection<E>>(ctx, *parent, this->sections[i]);\n      this->sections[i] = nullptr;\n    }\n  }\n}\n\n// Usually a section is an atomic unit of inclusion or exclusion.\n// Linker doesn't care about its contents. However, if a section is a\n// mergeable section (a section with SHF_MERGE bit set), the linker is\n// expected to split it into smaller pieces and merge each piece with\n// other pieces from different object files. In mold, we call the\n// atomic unit of mergeable section \"section pieces\".\n//\n// This feature is typically used for string literals. String literals\n// are usually put into a mergeable section by the compiler. If the same\n// string literal happens to occur in two different translation units,\n// the linker merges them into a single instance of a string, so that\n// the linker's output doesn't contain duplicate string literals.\n//\n// Handling symbols in the mergeable sections is a bit tricky. Assume\n// that we have a mergeable section with the following contents and\n// symbols:\n//\n//   Hello world\\0foo bar\\0\n//   ^            ^\n//   .rodata      .L.str1\n//   .L.str0\n//\n// '\\0' represents a NUL byte. This mergeable section contains two\n// section pieces, \"Hello world\" and \"foo bar\". The first string is\n// referred to by two symbols, .rodata and .L.str0, and the second by\n// .L.str1. .rodata is a section symbol and therefore a local symbol\n// and refers to the beginning of the section.\n//\n// In this example, there are actually two different ways to point to\n// string \"foo bar\", because .rodata+12 and .L.str1+0 refer to the same\n// place in the section. This kind of \"out-of-bound\" reference occurs\n// only when a symbol is a section symbol. In other words, the compiler\n// may use an offset from the beginning of a section to refer to any\n// section piece in a section, but it doesn't do for any other types\n// of symbols.\n//\n// Section garbage collection and Identical Code Folding work on graphs\n// where sections or section pieces are vertices and relocations are\n// edges. To make it easy to handle them, we rewrite symbols and\n// relocations so that each non-absolute symbol always refers to either\n// a non-mergeable section or a section piece.\n//\n// We do that only for SHF_ALLOC sections because GC and ICF work only\n// on memory-allocated sections. Non-memory-allocated mergeable sections\n// are not handled here for performance reasons.\ntemplate <typename E>\nvoid ObjectFile<E>::reattach_section_pieces(Context<E> &ctx) {\n  // Attach section pieces to symbols.\n  for (i64 i = 1; i < this->elf_syms.size(); i++) {\n    Symbol<E> &sym = *this->symbols[i];\n    const ElfSym<E> &esym = this->elf_syms[i];\n\n    if (esym.is_abs() || esym.is_common() || esym.is_undef())\n      continue;\n\n    i64 shndx = get_shndx(esym);\n    std::unique_ptr<MergeableSection<E>> &m = mergeable_sections[shndx];\n    if (!m || !m->parent.resolved)\n      continue;\n\n    SectionFragment<E> *frag;\n    i64 frag_offset;\n    std::tie(frag, frag_offset) = m->get_fragment(esym.st_value);\n\n    if (!frag)\n      Fatal(ctx) << *this << \": bad symbol value: \" << esym.st_value;\n\n    sym.set_frag(frag);\n    sym.value = frag_offset;\n  }\n\n  // Compute the size of frag_syms.\n  i64 nfrag_syms = 0;\n  for (std::unique_ptr<InputSection<E>> &isec : sections)\n    if (isec && (isec->shdr().sh_flags & SHF_ALLOC))\n      for (ElfRel<E> &r : isec->get_rels(ctx))\n        if (const ElfSym<E> &esym = this->elf_syms[r.r_sym];\n            esym.st_type == STT_SECTION)\n          if (mergeable_sections[get_shndx(esym)])\n            nfrag_syms++;\n\n  this->frag_syms.resize(nfrag_syms);\n\n  // For each relocation referring to a mergeable section symbol, we\n  // create a new dummy non-section symbol and redirect the relocation\n  // to the newly created symbol.\n  i64 idx = 0;\n  for (std::unique_ptr<InputSection<E>> &isec : sections) {\n    if (isec && (isec->shdr().sh_flags & SHF_ALLOC)) {\n      for (ElfRel<E> &r : isec->get_rels(ctx)) {\n        const ElfSym<E> &esym = this->elf_syms[r.r_sym];\n        if (esym.st_type != STT_SECTION)\n          continue;\n\n        i64 shndx = get_shndx(esym);\n        std::unique_ptr<MergeableSection<E>> &m = mergeable_sections[shndx];\n        if (!m)\n          continue;\n\n        assert(m->parent.resolved);\n\n        i64 r_addend = get_addend(*isec, r);\n        SectionFragment<E> *frag;\n        i64 in_frag_offset;\n        std::tie(frag, in_frag_offset) = m->get_fragment(esym.st_value + r_addend);\n\n        if (!frag)\n          Fatal(ctx) << *this << \": bad relocation at \" << r.r_sym;\n\n        Symbol<E> &sym = this->frag_syms[idx];\n        sym.file = this;\n        sym.set_name(\"<fragment>\");\n        sym.sym_idx = r.r_sym;\n        sym.visibility = STV_HIDDEN;\n        sym.set_frag(frag);\n        sym.value = in_frag_offset - r_addend;\n        r.r_sym = this->elf_syms.size() + idx;\n        idx++;\n      }\n    }\n  }\n\n  assert(idx == this->frag_syms.size());\n\n  for (Symbol<E> &sym : this->frag_syms)\n    this->symbols.push_back(&sym);\n}\n\ntemplate <typename E>\nvoid ObjectFile<E>::parse(Context<E> &ctx) {\n  sections.resize(this->elf_sections.size());\n  mergeable_sections.resize(sections.size());\n\n  symtab_sec = this->find_section(SHT_SYMTAB);\n\n  if (symtab_sec) {\n    // In ELF, all local symbols precede global symbols in the symbol table.\n    // sh_info has an index of the first global symbol.\n    this->first_global = symtab_sec->sh_info;\n    this->elf_syms = this->template get_data<ElfSym<E>>(ctx, *symtab_sec);\n    this->symbol_strtab = this->get_string(ctx, symtab_sec->sh_link);\n\n    if (ElfShdr<E> *shdr = this->find_section(SHT_SYMTAB_SHNDX))\n      symtab_shndx_sec = this->template get_data<U32<E>>(ctx, *shdr);\n  }\n\n  initialize_sections(ctx);\n  initialize_symbols(ctx);\n  sort_relocations(ctx);\n}\n\n// Symbols with higher priorities overwrites symbols with lower priorities.\n// Here is the list of priorities, from the highest to the lowest.\n//\n//  1. Strong defined symbol\n//  2. Weak defined symbol\n//  3. Strong defined symbol in a DSO/archive\n//  4. Weak Defined symbol in a DSO/archive\n//  5. Common symbol\n//  6. Common symbol in an archive\n//  7. Unclaimed (nonexistent) symbol\n//\n// Ties are broken by file priority.\n//\n// Note that the above priorities are based on heuristics and not on exact\n// science. We tried several different orders and settled on the current\n// one just because it avoids link errors in all programs we've tested.\ntemplate <typename E>\nstatic u64 get_rank(InputFile<E> *file, const ElfSym<E> &esym, bool is_in_archive) {\n  auto get_sym_rank = [&] {\n    if (esym.is_common()) {\n      assert(!file->is_dso);\n      return is_in_archive ? 6 : 5;\n    }\n\n    if (file->is_dso || is_in_archive)\n      return (esym.st_bind == STB_WEAK) ? 4 : 3;\n\n    if (esym.st_bind == STB_WEAK)\n      return 2;\n    return 1;\n  };\n\n  return (get_sym_rank() << 24) + file->priority;\n}\n\ntemplate <typename E>\nstatic u64 get_rank(const Symbol<E> &sym) {\n  if (!sym.file)\n    return 7 << 24;\n  return get_rank(sym.file, sym.esym(), !sym.file->is_reachable);\n}\n\n// Symbol's visibility is set to the most restrictive one. For example,\n// if one input file has a defined symbol `foo` with the default\n// visibility and the other input file has an undefined symbol `foo`\n// with the hidden visibility, the resulting symbol is a hidden defined\n// symbol.\ntemplate <typename E>\nvoid ObjectFile<E>::merge_visibility(Context<E> &ctx, Symbol<E> &sym,\n                                     u8 visibility) {\n  // Canonicalize visibility\n  if (visibility == STV_INTERNAL)\n    visibility = STV_HIDDEN;\n\n  auto priority = [&](u8 visibility) {\n    switch (visibility) {\n    case STV_HIDDEN:\n      return 1;\n    case STV_PROTECTED:\n      return 2;\n    case STV_DEFAULT:\n      return 3;\n    }\n    Fatal(ctx) << *this << \": unknown symbol visibility: \" << sym;\n  };\n\n  update_minimum(sym.visibility, visibility, [&](u8 a, u8 b) {\n    return priority(a) < priority(b);\n  });\n}\n\ntemplate <typename E>\nstatic void print_trace_symbol(Context<E> &ctx, InputFile<E> &file,\n                               const ElfSym<E> &esym, Symbol<E> &sym) {\n  if (!esym.is_undef())\n    Out(ctx) << \"trace-symbol: \" << file << \": definition of \" << sym;\n  else if (esym.is_weak())\n    Out(ctx) << \"trace-symbol: \" << file << \": weak reference to \" << sym;\n  else\n    Out(ctx) << \"trace-symbol: \" << file << \": reference to \" << sym;\n}\n\ntemplate <typename E>\nvoid ObjectFile<E>::resolve_symbols(Context<E> &ctx) {\n  for (i64 i = this->first_global; i < this->elf_syms.size(); i++) {\n    Symbol<E> &sym = *this->symbols[i];\n    const ElfSym<E> &esym = this->elf_syms[i];\n\n    if (esym.is_undef())\n      continue;\n\n    InputSection<E> *isec = nullptr;\n    if (!esym.is_abs() && !esym.is_common()) {\n      isec = get_section(esym);\n      if (!isec || !isec->is_alive)\n        continue;\n    }\n\n    std::scoped_lock lock(sym.mu);\n\n    if (get_rank(this, esym, !this->is_reachable) < get_rank(sym)) {\n      sym.file = this;\n      sym.set_input_section(isec);\n      sym.value = esym.st_value;\n      sym.sym_idx = i;\n      sym.ver_idx = ctx.default_version;\n      sym.is_weak = esym.is_weak();\n      sym.is_versioned_default = false;\n    }\n  }\n}\n\ntemplate <typename E>\nvoid\nObjectFile<E>::mark_live_objects(Context<E> &ctx,\n                                 std::function<void(InputFile<E> *)> feeder) {\n  assert(this->is_reachable);\n\n  for (i64 i = this->first_global; i < this->elf_syms.size(); i++) {\n    const ElfSym<E> &esym = this->elf_syms[i];\n    Symbol<E> &sym = *this->symbols[i];\n\n    if (!esym.is_undef() && exclude_libs)\n      merge_visibility(ctx, sym, STV_HIDDEN);\n    else\n      merge_visibility(ctx, sym, esym.st_visibility);\n\n    if (sym.is_traced)\n      print_trace_symbol(ctx, *this, esym, sym);\n\n    if (sym.file) {\n      bool undef_ref = esym.is_undef() && (!esym.is_weak() || sym.file->is_dso);\n      bool common_ref = esym.is_common() && !sym.esym().is_common();\n\n      if ((undef_ref || common_ref) && !sym.file->is_reachable.test_and_set()) {\n        feeder(sym.file);\n        if (sym.is_traced)\n          Out(ctx) << \"trace-symbol: \" << *this << \" keeps \" << *sym.file\n                   << \" for \" << sym;\n      }\n    }\n  }\n}\n\ntemplate <typename E>\nvoid ObjectFile<E>::scan_relocations(Context<E> &ctx) {\n  // Scan relocations against seciton contents\n  for (std::unique_ptr<InputSection<E>> &isec : sections)\n    if (isec && isec->is_alive && (isec->shdr().sh_flags & SHF_ALLOC))\n      isec->scan_relocations(ctx);\n\n  // Scan relocations against exception frames\n  for (CieRecord<E> &cie : cies) {\n    for (ElfRel<E> &rel : cie.get_rels()) {\n      Symbol<E> &sym = *this->symbols[rel.r_sym];\n\n      if (ctx.arg.pic && rel.r_type == E::R_ABS)\n        Error(ctx) << *this << \": relocation \" << rel << \" in .eh_frame can\"\n                   << \" not be used when making a position-independent output;\"\n                   << \" recompile with -fPIE or -fPIC\";\n\n      if (sym.is_imported) {\n        if (sym.get_type() != STT_FUNC)\n          Fatal(ctx) << *this << \": \" << sym\n                     << \": .eh_frame CIE record with an external data reference\"\n                     << \" is not supported\";\n        sym.flags |= NEEDS_PLT;\n      }\n    }\n  }\n}\n\n// Common symbols are used by C's tantative definitions. Tentative\n// definition is an obscure C feature which allows users to omit `extern`\n// from global variable declarations in a header file. For example, if you\n// have a tentative definition `int foo;` in a header which is included\n// into multiple translation units, `foo` will be included into multiple\n// object files, but it won't cause the duplicate symbol error. Instead,\n// the linker will merge them into a single instance of `foo`.\n//\n// If a header file contains a tentative definition `int foo;` and one of\n// a C file contains a definition with initial value such as `int foo = 5;`,\n// then the \"real\" definition wins. The symbol for the tentative definition\n// will be resolved to the real definition. If there is no \"real\"\n// definition, the tentative definition gets the default initial value 0.\n//\n// Tentative definitions are represented as \"common symbols\" in an object\n// file. In this function, we allocate spaces in .common or .tls_common\n// for remaining common symbols that were not resolved to usual defined\n// symbols in previous passes.\ntemplate <typename E>\nvoid ObjectFile<E>::convert_common_symbols(Context<E> &ctx) {\n  if (!has_common_symbol)\n    return;\n\n  for (i64 i = this->first_global; i < this->elf_syms.size(); i++) {\n    if (!this->elf_syms[i].is_common())\n      continue;\n\n    Symbol<E> &sym = *this->symbols[i];\n    if (sym.file != this) {\n      if (ctx.arg.warn_common)\n        Warn(ctx) << *this << \": multiple common symbols: \" << sym;\n      continue;\n    }\n\n    ElfShdr<E> shdr = {};\n    if (sym.get_type() == STT_TLS)\n      shdr.sh_flags = SHF_ALLOC | SHF_WRITE | SHF_TLS;\n    else\n      shdr.sh_flags = SHF_ALLOC | SHF_WRITE;\n\n    shdr.sh_type = SHT_NOBITS;\n    shdr.sh_size = this->elf_syms[i].st_size;\n    shdr.sh_addralign = this->elf_syms[i].st_value;\n    elf_sections2.push_back(shdr);\n\n    i64 idx = this->elf_sections.size() + elf_sections2.size() - 1;\n    auto isec = std::make_unique<InputSection<E>>(ctx, *this, idx);\n\n    sym.set_input_section(isec.get());\n    sym.value = 0;\n    sym.sym_idx = i;\n    sym.ver_idx = ctx.default_version;\n    sym.is_weak = false;\n    sections.push_back(std::move(isec));\n  }\n}\n\ntemplate <typename E>\nstatic bool should_write_to_local_symtab(Context<E> &ctx, Symbol<E> &sym) {\n  if (sym.get_type() == STT_SECTION)\n    return false;\n\n  // Local symbols are discarded if --discard-local is given or they\n  // are in a mergeable section. I *believe* we exclude symbols in\n  // mergeable sections because (1) there are too many and (2) they are\n  // merged, so their origins shouldn't matter, but I don't really\n  // know the rationale. Anyway, this is the behavior of the\n  // traditional linkers.\n  if (sym.name().starts_with(\".L\") || sym.name() == \"L0\\001\") {\n    if (ctx.arg.discard_locals)\n      return false;\n\n    if (InputSection<E> *isec = sym.get_input_section())\n      if (isec->shdr().sh_flags & SHF_MERGE)\n        return false;\n  }\n\n  return true;\n}\n\ntemplate <typename E>\nvoid ObjectFile<E>::compute_symtab_size(Context<E> &ctx) {\n  this->output_sym_indices.resize(this->elf_syms.size(), -1);\n\n  auto is_alive = [](Symbol<E> &sym) -> bool {\n    if (SectionFragment<E> *frag = sym.get_frag())\n      return frag->is_alive;\n    if (InputSection<E> *isec = sym.get_input_section())\n      return isec->is_alive;\n    return true;\n  };\n\n  // Compute the size of local symbols\n  if (!ctx.arg.discard_all && !ctx.arg.strip_all && !ctx.arg.retain_symbols_file) {\n    for (i64 i = 1; i < this->first_global; i++) {\n      Symbol<E> &sym = *this->symbols[i];\n\n      if (is_alive(sym) && should_write_to_local_symtab(ctx, sym)) {\n        this->strtab_size += sym.name().size() + 1;\n        this->output_sym_indices[i] = this->num_local_symtab++;\n        sym.write_to_symtab = true;\n      }\n    }\n  }\n\n  // Compute the size of global symbols.\n  for (i64 i = this->first_global; i < this->elf_syms.size(); i++) {\n    Symbol<E> &sym = *this->symbols[i];\n\n    if (sym.file == this && is_alive(sym) &&\n        (!ctx.arg.retain_symbols_file || sym.write_to_symtab)) {\n      this->strtab_size += sym.name().size() + 1;\n      // Global symbols can be demoted to local symbols based on visibility,\n      // version scripts etc.\n      if (sym.is_local(ctx))\n        this->output_sym_indices[i] = this->num_local_symtab++;\n      else\n        this->output_sym_indices[i] = this->num_global_symtab++;\n      sym.write_to_symtab = true;\n    }\n  }\n}\n\ntemplate <typename E>\nvoid ObjectFile<E>::populate_symtab(Context<E> &ctx) {\n  ElfSym<E> *symtab_base = (ElfSym<E> *)(ctx.buf + ctx.symtab->shdr.sh_offset);\n\n  u8 *strtab_base = ctx.buf + ctx.strtab->shdr.sh_offset;\n  i64 strtab_off = this->strtab_offset;\n\n  auto write_sym = [&](Symbol<E> &sym, i64 idx) {\n    U32<E> *xindex = nullptr;\n    if (ctx.symtab_shndx)\n      xindex = (U32<E> *)(ctx.buf + ctx.symtab_shndx->shdr.sh_offset) + idx;\n\n    symtab_base[idx] = *to_output_esym(ctx, sym, strtab_off, xindex);\n    strtab_off += write_string(strtab_base + strtab_off, sym.name());\n  };\n\n  i64 local_idx = this->local_symtab_idx;\n  i64 global_idx = this->global_symtab_idx;\n\n  for (i64 i = 1; i < this->first_global; i++)\n    if (Symbol<E> &sym = *this->symbols[i]; sym.write_to_symtab)\n      write_sym(sym, local_idx++);\n\n  for (i64 i = this->first_global; i < this->elf_syms.size(); i++) {\n    Symbol<E> &sym = *this->symbols[i];\n    if (sym.file == this && sym.write_to_symtab)\n      write_sym(sym, sym.is_local(ctx) ? local_idx++ : global_idx++);\n  }\n}\n\ntemplate <typename E>\nstd::ostream &operator<<(std::ostream &out, const InputFile<E> &file) {\n  if (file.is_dso) {\n    out << path_clean(file.filename);\n    return out;\n  }\n\n  ObjectFile<E> *obj = (ObjectFile<E> *)&file;\n  if (obj->archive_name == \"\")\n    out << path_clean(obj->filename);\n  else\n    out << path_clean(obj->archive_name) << \"(\" << obj->filename + \")\";\n  return out;\n}\n\ntemplate <typename E>\nstd::string SharedFile<E>::get_soname(Context<E> &ctx) {\n  if (ElfShdr<E> *sec = this->find_section(SHT_DYNAMIC))\n    for (ElfDyn<E> &dyn : this->template get_data<ElfDyn<E>>(ctx, *sec))\n      if (dyn.d_tag == DT_SONAME)\n        return this->get_string(ctx, sec->sh_link).data() + dyn.d_val;\n\n  if (this->mf->given_fullpath)\n    return this->filename;\n\n  return path_filename(this->filename);\n}\n\ntemplate <typename E>\nvoid SharedFile<E>::parse(Context<E> &ctx) {\n  symtab_sec = this->find_section(SHT_DYNSYM);\n  if (!symtab_sec)\n    return;\n\n  this->symbol_strtab = this->get_string(ctx, symtab_sec->sh_link);\n  soname = get_soname(ctx);\n  version_strings = read_verdef(ctx);\n\n  // Read a symbol table.\n  std::span<ElfSym<E>> esyms = this->template get_data<ElfSym<E>>(ctx, *symtab_sec);\n\n  std::span<U16<E>> vers;\n  if (ElfShdr<E> *sec = this->find_section(SHT_GNU_VERSYM))\n    vers = this->template get_data<U16<E>>(ctx, *sec);\n\n  for (i64 i = symtab_sec->sh_info; i < esyms.size(); i++) {\n    u16 ver;\n    if (vers.empty() || esyms[i].is_undef())\n      ver = VER_NDX_GLOBAL;\n    else\n      ver = vers[i] & ~VERSYM_HIDDEN;\n\n    if (ver == VER_NDX_LOCAL)\n      continue;\n\n    this->elf_syms2.push_back(esyms[i]);\n    this->versyms.push_back(ver);\n\n    std::string_view name = this->symbol_strtab.data() + esyms[i].st_name;\n\n    auto get_versioned_sym = [&] {\n      std::string_view key = save_string(\n        ctx, std::string(name) + \"@\" + std::string(version_strings[ver]));\n      return get_symbol(ctx, key, name);\n    };\n\n    // Symbol resolution involving symbol versioning is tricky because one\n    // symbol can be resolved with two different identifiers. Among\n    // symbols with the same name but different versions, one of them is\n    // always marked as the \"default\" one. This symbol is often denoted\n    // with two atsigns as `foo@@VERSION` and can be referred to either\n    // as `foo` or `foo@VERSION`. No other symbols have two names like that.\n    //\n    // On contrary, a versioned non-default symbol can be referred only\n    // with an explicit version suffix, e.g., `foo@VERSION`.\n    //\n    // Here is how we resolve versioned default symbols. We resolve `foo`\n    // and `foo@VERSION` as usual, but with information to forward\n    // references to `foo@VERSION` to `foo`. After name resolution, we\n    // visit all symbol references to redirect `foo@VERSION` to `foo`.\n    if (vers.empty() || ver == VER_NDX_GLOBAL) {\n      // Unversioned symbol\n      this->symbols.push_back(get_symbol(ctx, name));\n      this->symbols2.push_back(nullptr);\n    } else if (vers[i] & VERSYM_HIDDEN) {\n      // Versioned non-default symbol\n      this->symbols.push_back(get_versioned_sym());\n      this->symbols2.push_back(nullptr);\n    } else {\n      // Versioned default symbol\n      this->symbols.push_back(get_symbol(ctx, name));\n      this->symbols2.push_back(get_versioned_sym());\n    }\n  }\n\n  this->elf_syms = elf_syms2;\n  this->first_global = 0;\n\n  static Counter counter(\"dso_syms\");\n  counter += this->elf_syms.size();\n}\n\ntemplate <typename E>\nstd::vector<std::string_view> SharedFile<E>::get_dt_needed(Context<E> &ctx) {\n  std::vector<std::string_view> vec;\n  if (ElfShdr<E> *sec = this->find_section(SHT_DYNAMIC))\n    for (ElfDyn<E> &dyn : this->template get_data<ElfDyn<E>>(ctx, *sec))\n      if (dyn.d_tag == DT_NEEDED)\n        vec.push_back(this->get_string(ctx, sec->sh_link).data() + dyn.d_val);\n  return vec;\n}\n\ntemplate <typename E>\nstd::string_view SharedFile<E>::get_dt_audit(Context<E> &ctx) {\n  if (ElfShdr<E> *sec = this->find_section(SHT_DYNAMIC))\n    for (ElfDyn<E> &dyn : this->template get_data<ElfDyn<E>>(ctx, *sec))\n      if (dyn.d_tag == DT_AUDIT)\n        return this->get_string(ctx, sec->sh_link).data() + dyn.d_val;\n  return \"\";\n}\n\n// Symbol versioning is a GNU extension to the ELF file format. I don't\n// particularly like the feature as it complicates the semantics of\n// dynamic linking, but we need to support it anyway because it is\n// mandatory on glibc-based systems such as most Linux distros.\n//\n// Let me explain what symbol versioning is. Symbol versioning is a\n// mechanism to allow multiple symbols of the same name but of different\n// versions live together in a shared object file. It's convenient if you\n// want to make an API-breaking change to some function but want to keep\n// old programs working with the newer libraries.\n//\n// With symbol versioning, dynamic symbols are resolved by (name, version)\n// tuple instead of just by name. For example, glibc 2.35 defines two\n// different versions of `posix_spawn`, `posix_spawn` of version\n// \"GLIBC_2.15\" and that of version \"GLIBC_2.2.5\". Any executable that\n// uses `posix_spawn` is linked either to that of \"GLIBC_2.15\" or that of\n// \"GLIBC_2.2.5\"\n//\n// Versions are just strings, and no ordering is defined between them.\n// For example, \"GLIBC_2.15\" is not considered a newer version of\n// \"GLIBC_2.2.5\" or vice versa. They are considered just different.\n//\n// If a shared object file has versioned symbols, it contains a parallel\n// array for the symbol table. Version strings can be found in that\n// parallel table.\n//\n// One version is considered the \"default\" version for each shared object.\n// If an undefiend symbol `foo` is resolved to a symbol defined by the\n// shared object, it's marked so that it'll be resolved to (`foo`, the\n// default version of the library) at load-time.\ntemplate <typename E>\nstd::vector<std::string_view> SharedFile<E>::read_verdef(Context<E> &ctx) {\n  ElfShdr<E> *verdef_sec = this->find_section(SHT_GNU_VERDEF);\n  if (!verdef_sec)\n    return {};\n\n  std::string_view verdef = this->get_string(ctx, *verdef_sec);\n  std::string_view strtab = this->get_string(ctx, verdef_sec->sh_link);\n\n  std::vector<std::string_view> vec;\n  u8 *ptr = (u8 *)verdef.data();\n\n  for (;;) {\n    ElfVerdef<E> *ver = (ElfVerdef<E> *)ptr;\n    if (ver->vd_ndx == VER_NDX_UNSPECIFIED)\n      Fatal(ctx) << *this << \": symbol version too large\";\n\n    if (vec.size() <= ver->vd_ndx)\n      vec.resize(ver->vd_ndx + 1);\n\n    ElfVerdaux<E> *aux = (ElfVerdaux<E> *)(ptr + ver->vd_aux);\n    vec[ver->vd_ndx] = strtab.data() + aux->vda_name;\n    if (!ver->vd_next)\n      break;\n    ptr += ver->vd_next;\n  }\n  return vec;\n}\n\ntemplate <typename E>\nvoid SharedFile<E>::resolve_symbols(Context<E> &ctx) {\n  for (i64 i = 0; i < this->symbols.size(); i++) {\n    Symbol<E> &sym = *this->symbols[i];\n    const ElfSym<E> &esym = this->elf_syms[i];\n\n    if (esym.is_undef() || sym.skip_dso)\n      continue;\n\n    std::scoped_lock lock(sym.mu);\n\n    if (get_rank(this, esym, false) < get_rank(sym)) {\n      sym.file = this;\n      sym.origin = 0;\n      sym.value = esym.st_value;\n      sym.sym_idx = i;\n      sym.ver_idx = versyms[i];\n      sym.is_weak = true;\n      sym.is_versioned_default = false;\n    }\n\n    // A symbol with the default version is a special case because, unlike\n    // other symbols, the symbol can be referred by two names, `foo` and\n    // `foo@VERSION`. Here, we resolve `foo@VERSOIN` as a proxy of `foo`.\n    Symbol<E> *sym2 = this->symbols2[i];\n    if (sym2 && sym2 != &sym) {\n      std::scoped_lock lock2(sym2->mu);\n\n      if (get_rank(this, esym, false) < get_rank(*sym2)) {\n        sym2->file = this;\n        sym2->origin = (uintptr_t)&sym;\n        sym2->sym_idx = i;\n        sym2->is_versioned_default = true;\n      }\n    }\n  }\n}\n\ntemplate <typename E>\nvoid\nSharedFile<E>::mark_live_objects(Context<E> &ctx,\n                                 std::function<void(InputFile<E> *)> feeder) {\n  for (i64 i = 0; i < this->elf_syms.size(); i++) {\n    const ElfSym<E> &esym = this->elf_syms[i];\n    Symbol<E> &sym = *this->symbols[i];\n\n    if (sym.is_traced)\n      print_trace_symbol(ctx, *this, esym, sym);\n\n    // We follow undefined symbols in a DSO only to handle\n    // --no-allow-shlib-undefined.\n    if (esym.is_undef() && !esym.is_weak() && sym.file &&\n        (!sym.file->is_dso || !ctx.arg.allow_shlib_undefined) &&\n        !sym.file->is_reachable.test_and_set()) {\n      feeder(sym.file);\n\n      if (sym.is_traced)\n        Out(ctx) << \"trace-symbol: \" << *this << \" keeps \" << *sym.file\n                 << \" for \" << sym;\n    }\n  }\n}\n\ntemplate <typename E>\nstd::span<Symbol<E> *> SharedFile<E>::get_symbols_at(Symbol<E> *sym) {\n  assert(sym->file == this);\n\n  std::call_once(init_sorted_syms, [&] {\n    for (Symbol<E> *sym : this->symbols)\n      if (sym->file == this)\n        sorted_syms.push_back(sym);\n\n    tbb::parallel_sort(sorted_syms.begin(), sorted_syms.end(),\n                       [](Symbol<E> *a, Symbol<E> *b) {\n      const ElfSym<E> &x = a->esym();\n      const ElfSym<E> &y = b->esym();\n      return std::tuple{x.st_value, &x} < std::tuple{y.st_value, &y};\n    });\n  });\n\n  auto [begin, end] = ranges::equal_range(sorted_syms, sym->esym().st_value, {},\n                                          [](Symbol<E> *x) {\n    return x->esym().st_value;\n  });\n  return {&*begin, (size_t)(end - begin)};\n}\n\n// Infer an alignment of a DSO symbol. An alignment of a symbol in other\n// .so is not something we usually care about, but when we create a copy\n// relocation for a symbol, we need to preserve its alignment requirement.\n//\n// Symbol alignment is not explicitly represented in an ELF file. In this\n// function, we conservatively infer it from a symbol address and a\n// section alignment requirement.\ntemplate <typename E>\ni64 SharedFile<E>::get_alignment(Symbol<E> *sym) {\n  ElfShdr<E> &shdr = this->elf_sections[sym->esym().st_shndx];\n  i64 align = std::max<i64>(1, shdr.sh_addralign);\n  if (sym->value)\n    align = std::min<i64>(align, 1LL << std::countr_zero(sym->value));\n  return align;\n}\n\ntemplate <typename E>\nbool SharedFile<E>::is_readonly(Symbol<E> *sym) {\n  ElfEhdr<E> &ehdr = *(ElfEhdr<E> *)this->mf->data;\n  std::span<ElfPhdr<E>> phdrs((ElfPhdr<E> *)(this->mf->data + ehdr.e_phoff),\n                              ehdr.e_phnum);\n  u64 val = sym->esym().st_value;\n\n  for (ElfPhdr<E> &phdr : phdrs)\n    if ((phdr.p_type == PT_LOAD || phdr.p_type == PT_GNU_RELRO) &&\n        !(phdr.p_flags & PF_W) &&\n        phdr.p_vaddr <= val && val < phdr.p_vaddr + phdr.p_memsz)\n      return true;\n  return false;\n}\n\ntemplate <typename E>\nvoid SharedFile<E>::compute_symtab_size(Context<E> &ctx) {\n  this->output_sym_indices.resize(this->elf_syms.size(), -1);\n\n  // Compute the size of global symbols.\n  for (i64 i = this->first_global; i < this->symbols.size(); i++) {\n    Symbol<E> &sym = *this->symbols[i];\n\n    if (sym.file == this && (sym.is_imported || sym.is_exported) &&\n        (!ctx.arg.retain_symbols_file || sym.write_to_symtab)) {\n      this->strtab_size += sym.name().size() + 1;\n      this->output_sym_indices[i] = this->num_global_symtab++;\n      sym.write_to_symtab = true;\n    }\n  }\n}\n\ntemplate <typename E>\nvoid SharedFile<E>::populate_symtab(Context<E> &ctx) {\n  ElfSym<E> *symtab =\n    (ElfSym<E> *)(ctx.buf + ctx.symtab->shdr.sh_offset) + this->global_symtab_idx;\n\n  u8 *strtab = ctx.buf + ctx.strtab->shdr.sh_offset;\n  i64 strtab_off = this->strtab_offset;\n\n  for (i64 i = 0; Symbol<E> *sym : this->get_global_syms()) {\n    if (sym->file != this || !sym->write_to_symtab)\n      continue;\n\n    U32<E> *xindex = nullptr;\n    if (ctx.symtab_shndx)\n      xindex = (U32<E> *)(ctx.buf + ctx.symtab_shndx->shdr.sh_offset) +\n               this->global_symtab_idx + i;\n\n    *symtab++ = *to_output_esym(ctx, *sym, strtab_off, xindex);\n    strtab_off += write_string(strtab + strtab_off, sym->name());\n    i++;\n  }\n}\n\nusing E = MOLD_TARGET;\n\ntemplate class InputFile<E>;\ntemplate class ObjectFile<E>;\ntemplate class SharedFile<E>;\ntemplate Symbol<E> *get_symbol(Context<E> &, std::string_view, std::string_view);\ntemplate Symbol<E> *get_symbol(Context<E> &, std::string_view);\ntemplate std::string_view demangle(const Symbol<E> &);\ntemplate ComdatGroup *insert_comdat_group(Context<E> &, std::string_view);\ntemplate std::ostream &operator<<(std::ostream &, const Symbol<E> &);\ntemplate std::ostream &operator<<(std::ostream &, const InputFile<E> &);\n\n} // namespace mold\n"
  },
  {
    "path": "src/input-sections.cc",
    "content": "#include \"mold.h\"\n\n#include <zlib.h>\n#include <zstd.h>\n\nnamespace mold {\n\nstatic i64 to_p2align(u64 alignment) {\n  if (alignment == 0)\n    return 0;\n  return std::countr_zero(alignment);\n}\n\ntemplate <typename E>\nbool cie_equals(const CieRecord<E> &a, const CieRecord<E> &b) {\n  if (a.get_contents() != b.get_contents())\n    return false;\n\n  std::span<const ElfRel<E>> x = a.get_rels();\n  std::span<const ElfRel<E>> y = b.get_rels();\n  if (x.size() != y.size())\n    return false;\n\n  for (i64 i = 0; i < x.size(); i++)\n    if (x[i].r_offset - a.input_offset != y[i].r_offset - b.input_offset ||\n        x[i].r_type != y[i].r_type ||\n        a.file.symbols[x[i].r_sym] != b.file.symbols[y[i].r_sym] ||\n        get_addend(a.input_section, x[i]) != get_addend(b.input_section, y[i]))\n      return false;\n  return true;\n}\n\ntemplate <typename E>\nInputSection<E>::InputSection(Context<E> &ctx, ObjectFile<E> &file, i64 shndx)\n  : file(file), shndx(shndx) {\n  if (shndx < file.elf_sections.size())\n    contents = {(char *)file.mf->data + shdr().sh_offset, (size_t)shdr().sh_size};\n\n  if (shdr().sh_flags & SHF_COMPRESSED) {\n    ElfChdr<E> &chdr = *(ElfChdr<E> *)&contents[0];\n    sh_size = chdr.ch_size;\n    p2align = to_p2align(chdr.ch_addralign);\n  } else {\n    sh_size = shdr().sh_size;\n    p2align = to_p2align(shdr().sh_addralign);\n  }\n\n  // Sections may have been compressed. We usually uncompress them\n  // directly into the mmap'ed output file, but we want to uncompress\n  // early for REL-type ELF types to read relocation addends from\n  // section contents. For RELA-type, we don't need to do this because\n  // addends are in relocations.\n  //\n  // SH-4 stores addends to sections despite being RELA, which is a\n  // special (and buggy) case.\n  if constexpr (!E::is_rela || is_sh4<E>)\n    uncompress(ctx);\n}\n\ntemplate <typename E>\nvoid InputSection<E>::uncompress(Context<E> &ctx) {\n  if (!(shdr().sh_flags & SHF_COMPRESSED) || uncompressed)\n    return;\n\n  u8 *buf = new u8[sh_size];\n  copy_contents_to(ctx, buf, sh_size);\n  contents = std::string_view((char *)buf, sh_size);\n  ctx.string_pool.emplace_back(buf);\n  uncompressed = true;\n}\n\ntemplate <typename E>\nvoid InputSection<E>::copy_contents_to(Context<E> &ctx, u8 *buf, i64 sz) {\n  if (!(shdr().sh_flags & SHF_COMPRESSED) || uncompressed) {\n    memcpy(buf, contents.data(), sz);\n    return;\n  }\n\n  if (contents.size() < sizeof(ElfChdr<E>))\n    Fatal(ctx) << *this << \": corrupted compressed section\";\n\n  ElfChdr<E> &hdr = *(ElfChdr<E> *)&contents[0];\n  std::string_view data = contents.substr(sizeof(ElfChdr<E>));\n\n  switch (hdr.ch_type) {\n  case ELFCOMPRESS_ZLIB: {\n    z_stream s = {};\n    inflateInit(&s);\n    s.next_in = (u8 *)data.data();\n    s.avail_in = data.size();\n    s.next_out = buf;\n    s.avail_out = sz;\n\n    int r;\n    while (s.total_out < sz && (r = inflate(&s, Z_NO_FLUSH)) == Z_OK);\n    if (s.total_out < sz && r != Z_STREAM_END)\n      Fatal(ctx) << *this << \": uncompress failed: \" << s.msg;\n    inflateEnd(&s);\n    msan_unpoison(buf, sz);\n    break;\n  }\n  case ELFCOMPRESS_ZSTD: {\n    ZSTD_DCtx *dctx = ZSTD_createDCtx();\n    ZSTD_inBuffer in = { data.data(), data.size() };\n    ZSTD_outBuffer out = { buf, (size_t)sz };\n\n    while (out.pos < out.size) {\n      size_t r = ZSTD_decompressStream(dctx, &out, &in);\n      if (ZSTD_isError(r))\n        Fatal(ctx) << *this << \": uncompress failed: \" << ZSTD_getErrorName(r);\n      if (r == 0 && out.pos < out.size)\n        Fatal(ctx) << *this << \": uncompress failed: premature end of input\";\n    }\n    ZSTD_freeDCtx(dctx);\n    msan_unpoison(buf, sz);\n    break;\n  }\n  default:\n    Fatal(ctx) << *this << \": unsupported compression type: 0x\"\n               << std::hex << hdr.ch_type;\n  }\n}\n\ntypedef enum : u8 { NONE, ERROR, COPYREL, PLT, CPLT } Action;\n\ntemplate <typename E>\nstatic void do_action(Context<E> &ctx, Action action, InputSection<E> &isec,\n                      Symbol<E> &sym, const ElfRel<E> &rel) {\n  switch (action) {\n  case NONE:\n    break;\n  case ERROR:\n    Error(ctx) << isec << \": \" << rel << \" relocation at offset 0x\"\n               << std::hex << rel.r_offset << \" against symbol `\"\n               << sym << \"' can not be used; recompile with -fPIC\";\n    break;\n  case COPYREL:\n    sym.flags |= NEEDS_COPYREL;\n    break;\n  case PLT:\n    // Create a PLT entry\n    sym.flags |= NEEDS_PLT;\n    break;\n  case CPLT:\n    // Create a canonical PLT entry\n    sym.flags |= NEEDS_CPLT;\n    break;\n  }\n}\n\ntemplate <typename E>\nstatic inline i64 get_output_type(Context<E> &ctx) {\n  if (ctx.arg.shared)\n    return 0;\n  if (ctx.arg.pie)\n    return 1;\n  return 2;\n}\n\ntemplate <typename E>\nstatic inline i64 get_sym_type(Symbol<E> &sym) {\n  if (sym.is_absolute())\n    return 0;\n  if (!sym.is_imported)\n    return 1;\n  if (sym.get_type() != STT_FUNC)\n    return 2;\n  return 3;\n}\n\ntemplate <typename E>\nvoid InputSection<E>::scan_pcrel(Context<E> &ctx, Symbol<E> &sym,\n                                 const ElfRel<E> &rel) {\n  // This is for PC-relative relocations (e.g. R_X86_64_PC32).\n  // We cannot promote them to dynamic relocations because the dynamic\n  // linker generally does not support PC-relative relocations.\n  static Action table[][4] = {\n    // Absolute  Local    Imported data  Imported code\n    {  ERROR,    NONE,    ERROR,         PLT    },  // Shared object\n    {  ERROR,    NONE,    COPYREL,       CPLT   },  // Position-independent exec\n    {  NONE,     NONE,    COPYREL,       CPLT   },  // Position-dependent exec\n  };\n\n  Action action = table[get_output_type(ctx)][get_sym_type(sym)];\n  do_action(ctx, action, *this, sym, rel);\n}\n\ntemplate <typename E>\nvoid InputSection<E>::scan_absrel(Context<E> &ctx, Symbol<E> &sym,\n                                  const ElfRel<E> &rel) {\n  // This is a decision table for absolute relocations that is smaller\n  // than the pointer size (e.g. R_X86_64_32). Since the dynamic linker\n  // generally does not support dynamic relocations smaller than the\n  // pointer size, we need to report an error if a relocation cannot be\n  // resolved at link-time.\n  static Action table[][4] = {\n    // Absolute  Local    Imported data  Imported code\n    {  NONE,     ERROR,   ERROR,         ERROR },  // Shared object\n    {  NONE,     ERROR,   ERROR,         ERROR },  // Position-independent exec\n    {  NONE,     NONE,    COPYREL,       CPLT  },  // Position-dependent exec\n  };\n\n  Action action = table[get_output_type(ctx)][get_sym_type(sym)];\n  do_action(ctx, action, *this, sym, rel);\n}\n\ntemplate <typename E>\nvoid InputSection<E>::scan_tlsdesc(Context<E> &ctx, Symbol<E> &sym) {\n  if (ctx.arg.static_ || (ctx.arg.relax && sym.is_tprel_linktime_const(ctx))) {\n    // Relax TLSDESC to Local Exec. In this case, we directly materialize\n    // a TP-relative offset, so no dynamic relocation is needed.\n    //\n    // TLSDESC relocs must always be relaxed for statically-linked\n    // executables even if -no-relax is given. It is because a\n    // statically-linked executable doesn't contain a trampoline\n    // function needed for TLSDESC.\n  } else if (ctx.arg.relax && sym.is_tprel_runtime_const(ctx)) {\n    // In this condition, TP-relative offset of a thread-local variable\n    // is known at process startup time, so we can relax TLSDESC to the\n    // code that reads the TP-relative offset from GOT and add TP to it.\n    sym.flags |= NEEDS_GOTTP;\n  } else {\n    // If no relaxation is doable, we simply create a TLSDESC dynamic\n    // relocation.\n    sym.flags |= NEEDS_TLSDESC;\n  }\n}\n\ntemplate <typename E>\nvoid InputSection<E>::check_tlsle(Context<E> &ctx, Symbol<E> &sym,\n                                  const ElfRel<E> &rel) {\n  if (ctx.arg.shared)\n    Error(ctx) << *this << \": relocation \" << rel << \" against `\" << sym\n               << \"` can not be used when making a shared object;\"\n               << \" recompile with -fPIC\";\n}\n\ntemplate <typename E>\nvoid InputSection<E>::write_to(Context<E> &ctx, u8 *buf) {\n  if (shdr().sh_type == SHT_NOBITS || sh_size == 0)\n    return;\n\n  // Copy data. In RISC-V and LoongArch object files, sections are not\n  // atomic unit of copying because of relaxation. That is, some\n  // relocations are allowed to remove bytes from the middle of a\n  // section and shrink the overall size of it.\n  if constexpr (is_riscv<E> || is_loongarch<E>) {\n    std::span<RelocDelta> deltas = extra.r_deltas;\n\n    if (deltas.empty()) {\n      // If a section is not relaxed, we can copy it as a one big chunk.\n      copy_contents_to(ctx, buf, sh_size);\n    } else {\n      // A relaxed section is copied piece-wise.\n      memcpy(buf, contents.data(), deltas[0].offset);\n\n      for (i64 i = 0; i < deltas.size(); i++) {\n        i64 offset = deltas[i].offset;\n        i64 delta = deltas[i].delta;\n        i64 end = (i + 1 == deltas.size()) ? contents.size() : deltas[i + 1].offset;\n        i64 removed_bytes = get_removed_bytes(deltas, i);\n        memcpy(buf + offset + removed_bytes - delta,\n               contents.data() + offset + removed_bytes,\n               end - offset - removed_bytes);\n      }\n    }\n  } else {\n    copy_contents_to(ctx, buf, sh_size);\n  }\n\n  // Apply relocations\n  if (!ctx.arg.relocatable) {\n    if (shdr().sh_flags & SHF_ALLOC)\n      apply_reloc_alloc(ctx, buf);\n    else\n      apply_reloc_nonalloc(ctx, buf);\n  }\n}\n\n// Get the name of a function containin a given offset.\ntemplate <typename E>\nstd::string_view\nInputSection<E>::get_func_name(Context<E> &ctx, i64 offset) const {\n  for (Symbol<E> *sym : file.symbols)\n    if (sym->file == &file)\n      if (const ElfSym<E> &esym = sym->esym();\n          esym.st_shndx == shndx && esym.st_type == STT_FUNC &&\n          esym.st_value <= offset && offset < esym.st_value + esym.st_size)\n        return ctx.arg.demangle ? demangle(*sym) : sym->name();\n  return \"\";\n}\n\n// Test if the symbol a given relocation refers to has already been resolved.\n// If not, record that error and returns true.\ntemplate <typename E>\nbool InputSection<E>::record_undef_error(Context<E> &ctx, const ElfRel<E> &rel) {\n  // If a relocation refers to a linker-synthesized symbol for a\n  // section fragment, it's always been resolved.\n  if (file.elf_syms.size() <= rel.r_sym)\n    return false;\n\n  Symbol<E> &sym = *file.symbols[rel.r_sym];\n  const ElfSym<E> &esym = file.elf_syms[rel.r_sym];\n\n  // If a symbol is defined in a comdat group, and the comdat group is\n  // discarded, the symbol may not have an owner. It is technically an\n  // violation of the One Definition Rule, so it is a programmer's fault.\n  if (!sym.file) {\n    Error(ctx) << *this << \": \" << sym << \" refers to a discarded COMDAT section\"\n               << \" probably due to an ODR violation\";\n    return true;\n  }\n\n  auto record = [&] {\n    std::stringstream ss;\n    if (std::string_view source = file.get_source_name(); !source.empty())\n      ss << \">>> referenced by \" << source << \"\\n\";\n    else\n      ss << \">>> referenced by \" << *this << \"\\n\";\n\n    ss << \">>>               \" << file;\n    if (std::string_view func = get_func_name(ctx, rel.r_offset); !func.empty())\n      ss << \":(\" << func << \")\";\n    ss << '\\n';\n\n    typename decltype(ctx.undef_errors)::accessor acc;\n    ctx.undef_errors.insert(acc, {&sym, {}});\n    acc->second.push_back(ss.str());\n  };\n\n  // A non-weak undefined symbol must be promoted to an imported symbol\n  // or resolved to an defined symbol. Otherwise, we need to report an\n  // error or warn on it.\n  //\n  // Every ELF file has an absolute local symbol as its first symbol.\n  // Referring to that symbol is always valid.\n  bool is_undef = esym.is_undef() && !esym.is_weak() && sym.sym_idx;\n\n  if (is_undef && sym.esym().is_undef()) {\n    if (ctx.arg.unresolved_symbols == UNRESOLVED_ERROR && !sym.is_imported) {\n      record();\n      return true;\n    }\n    if (ctx.arg.unresolved_symbols == UNRESOLVED_WARN) {\n      record();\n      return false;\n    }\n  }\n\n  return false;\n}\n\ntemplate <typename E>\nMergeableSection<E>::MergeableSection(Context<E> &ctx, MergedSection<E> &parent,\n                                      std::unique_ptr<InputSection<E>> &isec)\n  : parent(parent), p2align(isec->p2align), input_section(std::move(isec)) {\n  input_section->uncompress(ctx);\n\n  std::scoped_lock lock(parent.mu);\n  parent.members.push_back(this);\n}\n\nstatic size_t find_null(std::string_view data, i64 pos, i64 entsize) {\n  if (entsize == 1)\n    return data.find('\\0', pos);\n\n  for (; pos <= data.size() - entsize; pos += entsize)\n    if (data.substr(pos, entsize).find_first_not_of('\\0') == data.npos)\n      return pos;\n\n  return data.npos;\n}\n\n// Mergeable sections (sections with SHF_MERGE bit) typically contain\n// string literals. Linker is expected to split the section contents\n// into null-terminated strings, merge them with mergeable strings\n// from other object files, and emit uniquified strings to an output\n// file.\n//\n// This mechanism reduces the size of an output file. If two source\n// files happen to contain the same string literal, the output will\n// contain only a single copy of it.\n//\n// It is less common than string literals, but mergeable sections can\n// contain fixed-sized read-only records too.\n//\n// This function splits the section contents into small pieces that we\n// call \"section fragments\". Section fragment is a unit of merging.\n//\n// We do not support mergeable sections that have relocations.\ntemplate <typename E>\nvoid MergeableSection<E>::split_contents(Context<E> &ctx) {\n  std::string_view data = input_section->contents;\n  if (data.size() > UINT32_MAX)\n    Fatal(ctx) << *input_section << \": mergeable section too large\";\n\n  i64 entsize = parent.shdr.sh_entsize;\n\n  // Split sections\n  if (parent.shdr.sh_flags & SHF_STRINGS) {\n    for (i64 pos = 0; pos < data.size();) {\n      frag_offsets.push_back(pos);\n      size_t end = find_null(data, pos, entsize);\n      if (end == data.npos)\n        Fatal(ctx) << *input_section << \": string is not null terminated\";\n      pos = end + entsize;\n    }\n  } else {\n    if (data.size() % entsize)\n      Fatal(ctx) << *input_section\n                 << \": section size is not multiple of sh_entsize\";\n    frag_offsets.reserve(data.size() / entsize);\n\n    for (i64 pos = 0; pos < data.size(); pos += entsize)\n      frag_offsets.push_back(pos);\n  }\n\n  // Compute hashes for section pieces\n  HyperLogLog estimator;\n  hashes.reserve(frag_offsets.size());\n\n  for (i64 i = 0; i < frag_offsets.size(); i++) {\n    u64 hash = hash_string(get_contents(i));\n    hashes.push_back(hash);\n    estimator.insert(hash);\n  }\n\n  parent.estimator.merge(estimator);\n\n  static Counter counter(\"string_fragments\");\n  counter += frag_offsets.size();\n}\n\ntemplate <typename E>\nvoid MergeableSection<E>::resolve_contents(Context<E> &ctx) {\n  fragments.reserve(frag_offsets.size());\n  for (i64 i = 0; i < frag_offsets.size(); i++)\n    fragments.push_back(parent.insert(ctx, get_contents(i), hashes[i], p2align));\n\n  // Reclaim memory as we'll never use this vector again\n  hashes.clear();\n  hashes.shrink_to_fit();\n}\n\nusing E = MOLD_TARGET;\n\ntemplate bool cie_equals(const CieRecord<E> &, const CieRecord<E> &);\ntemplate class InputSection<E>;\ntemplate class MergeableSection<E>;\n\n} // namespace mold\n"
  },
  {
    "path": "src/jobs-unix.cc",
    "content": "// Many build systems attempt to invoke as many linker processes as there\n// are cores, based on the assumption that the linker is single-threaded.\n// However, since mold is multi-threaded, such build systems' behavior is\n// not beneficial and just increases the overall peak memory usage.\n// On machines with limited memory, this could lead to an out-of-memory\n// error.\n//\n// This file implements a feature that limits the number of concurrent\n// mold processes to just 1 for each user. It is intended to be used as\n// `MOLD_JOBS=1 ninja` or `MOLD_JOBS=1 make -j$(nproc)`.\n\n#include \"mold.h\"\n\n#include <cstdlib>\n#include <fcntl.h>\n#include <pwd.h>\n#include <sys/stat.h>\n#include <sys/types.h>\n#include <unistd.h>\n\nnamespace mold {\n\nstatic int lock_fd = -1;\n\nvoid acquire_global_lock() {\n  char *jobs = getenv(\"MOLD_JOBS\");\n  if (!jobs || jobs != \"1\"s)\n    return;\n\n  std::string path;\n  if (char *dir = getenv(\"XDG_RUNTIME_DIR\"))\n    path = dir + \"/mold-lock\"s;\n  else\n    path = \"/tmp/mold-lock-\"s + getpwuid(getuid())->pw_name;\n\n  int fd = open(path.c_str(), O_WRONLY | O_CREAT | O_CLOEXEC, 0600);\n  if (fd == -1)\n    return;\n\n  if (lockf(fd, F_LOCK, 0) == -1)\n    return;\n  lock_fd = fd;\n}\n\nvoid release_global_lock() {\n  if (lock_fd != -1)\n    close(lock_fd);\n}\n\n} // namespace mold\n"
  },
  {
    "path": "src/jobs-win32.cc",
    "content": "namespace mold {\n\nvoid acquire_global_lock() {}\nvoid release_global_lock() {}\n\n} // namespace mold\n"
  },
  {
    "path": "src/linker-script.cc",
    "content": "// On Linux, /usr/lib/x86_64-linux-gnu/libc.so is not actually\n// a shared object file but an ASCII text file containing a linker\n// script to include a \"real\" libc.so file. Therefore, we need to\n// support a (very limited) subset of the linker script language.\n\n#include \"mold.h\"\n\n#include <cctype>\n\nnamespace mold {\n\nstatic std::string_view get_line(std::string_view input, const char *pos) {\n  assert(input.data() <= pos);\n  assert(pos < input.data() + input.size());\n\n  i64 start = input.rfind('\\n', pos - input.data());\n  if (start == input.npos)\n    start = 0;\n  else\n    start++;\n\n  i64 end = input.find('\\n', pos - input.data());\n  if (end == input.npos)\n    end = input.size();\n\n  return input.substr(start, end - start);\n}\n\ntemplate <typename E>\nvoid Script<E>::error(std::string_view pos, std::string msg) {\n  std::string_view input = mf->get_contents();\n  std::string_view line = get_line(input, pos.data());\n\n  i64 lineno = 1;\n  for (i64 i = 0; input.data() + i < line.data(); i++)\n    if (input[i] == '\\n')\n      lineno++;\n\n  std::string label = mf->name + \":\" + std::to_string(lineno) + \": \";\n  i64 indent = strlen(\"mold: fatal: \") + label.size();\n  i64 column = pos.data() - line.data();\n\n  Fatal(ctx) << label << line << \"\\n\"\n             << std::string(indent + column, ' ') << \"^ \" << msg;\n}\n\ntemplate <typename E>\nvoid Script<E>::tokenize() {\n  std::string_view input = mf->get_contents();\n\n  while (!input.empty()) {\n    if (isspace(input[0])) {\n      input = input.substr(1);\n      continue;\n    }\n\n    if (input.starts_with(\"/*\")) {\n      i64 pos = input.find(\"*/\", 2);\n      if (pos == std::string_view::npos)\n        error(input, \"unclosed comment\");\n      input = input.substr(pos + 2);\n      continue;\n    }\n\n    if (input[0] == '#') {\n      i64 pos = input.find(\"\\n\", 1);\n      if (pos == std::string_view::npos)\n        break;\n      input = input.substr(pos + 1);\n      continue;\n    }\n\n    if (input[0] == '\"') {\n      i64 pos = input.find('\"', 1);\n      if (pos == std::string_view::npos)\n        error(input, \"unclosed string literal\");\n      tokens.push_back(input.substr(0, pos + 1));\n      input = input.substr(pos + 1);\n      continue;\n    }\n\n    i64 pos = input.find_first_not_of(\n      \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\"\n      \"0123456789_.$/\\\\~=+[]*?-!^:\");\n\n    if (pos == 0)\n      pos = 1;\n    else if (pos == input.npos)\n      pos = input.size();\n\n    tokens.push_back(input.substr(0, pos));\n    input = input.substr(pos);\n  }\n}\n\ntemplate <typename E>\nstd::span<std::string_view>\nScript<E>::skip(std::span<std::string_view> tok, std::string_view str) {\n  if (tok.empty())\n    Fatal(ctx) << mf->name << \": expected '\" << str << \"', but got EOF\";\n  if (tok[0] != str)\n    error(tok[0], \"expected '\" + std::string(str) + \"'\");\n  return tok.subspan(1);\n}\n\nstatic std::string_view unquote(std::string_view s) {\n  if (s.size() > 0 && s[0] == '\"') {\n    assert(s[s.size() - 1] == '\"');\n    return s.substr(1, s.size() - 2);\n  }\n  return s;\n}\n\ntemplate <typename E>\nstd::span<std::string_view>\nScript<E>::read_output_format(std::span<std::string_view> tok) {\n  tok = skip(tok, \"(\");\n  while (!tok.empty() && tok[0] != \")\")\n    tok = tok.subspan(1);\n  if (tok.empty())\n    Fatal(ctx) << mf->name << \": expected ')', but got EOF\";\n  return tok.subspan(1);\n}\n\ntemplate <typename E>\nstatic bool is_in_sysroot(Context<E> &ctx, std::string path) {\n  std::string sysroot = ctx.arg.sysroot;\n  if (sysroot.starts_with('/') && !ctx.arg.chroot.empty())\n    sysroot = ctx.arg.chroot + \"/\" + path_clean(sysroot);\n\n  std::string rel = std::filesystem::relative(path, sysroot).string();\n  return rel != \".\" && !rel.starts_with(\"../\");\n}\n\ntemplate <typename E>\nMappedFile *Script<E>::resolve_path(std::string_view tok, bool check_target) {\n  std::string str(unquote(tok));\n\n  auto open = [&](const std::string &path) -> MappedFile * {\n    MappedFile *mf = open_file(ctx, path);\n    if (!mf)\n      return nullptr;\n\n    if (check_target) {\n      std::string_view target = get_machine_type(ctx, rctx, mf);\n      if (!target.empty() && target != E::name) {\n        Warn(ctx) << path << \": skipping incompatible file: \" << target\n                  << \" (e_machine \" << (int)E::e_machine << \")\";\n        return nullptr;\n      }\n    }\n    return mf;\n  };\n\n  // GNU ld prepends the sysroot if a pathname starts with '/' and the\n  // script being processed is in the sysroot. We do the same.\n  if (str.starts_with('/') && is_in_sysroot(ctx, mf->name))\n    return must_open_file(ctx, ctx.arg.sysroot + str);\n\n  if (str.starts_with('=')) {\n    std::string path;\n    if (ctx.arg.sysroot.empty())\n      path = str.substr(1);\n    else\n      path = ctx.arg.sysroot + str.substr(1);\n    return must_open_file(ctx, path);\n  }\n\n  if (str.starts_with(\"-l\"))\n    return find_library(ctx, rctx, str.substr(2));\n\n  if (!str.starts_with('/'))\n    if (MappedFile *mf2 = open(path_clean(mf->name + \"/../\" + str)))\n      return mf2;\n\n  if (MappedFile *mf = open(str))\n    return mf;\n\n  for (std::string_view dir : ctx.arg.library_paths) {\n    std::string path = std::string(dir) + \"/\" + str;\n    if (MappedFile *mf = open(path))\n      return mf;\n  }\n\n  error(tok, \"library not found: \" + str);\n}\n\ntemplate <typename E>\nstd::span<std::string_view>\nScript<E>::read_group(std::span<std::string_view> tok) {\n  tok = skip(tok, \"(\");\n\n  while (!tok.empty() && tok[0] != \")\") {\n    if (tok[0] == \"AS_NEEDED\") {\n      bool orig = rctx.as_needed;\n      rctx.as_needed = true;\n      tok = read_group(tok.subspan(1));\n      rctx.as_needed = orig;\n      continue;\n    }\n\n    MappedFile *mf = resolve_path(tok[0], true);\n    read_file(ctx, rctx, mf);\n    tok = tok.subspan(1);\n  }\n\n  if (tok.empty())\n    Fatal(ctx) << mf->name << \": expected ')', but got EOF\";\n  return tok.subspan(1);\n}\n\ntemplate <typename E>\nvoid Script<E>::parse_linker_script() {\n  std::call_once(once, [&] { tokenize(); });\n  std::span<std::string_view> tok = tokens;\n\n  while (!tok.empty()) {\n    if (tok[0] == \"OUTPUT_FORMAT\") {\n      tok = read_output_format(tok.subspan(1));\n    } else if (tok[0] == \"INPUT\" || tok[0] == \"GROUP\") {\n      tok = read_group(tok.subspan(1));\n    } else if (tok[0] == \"VERSION\") {\n      tok = tok.subspan(1);\n      tok = skip(tok, \"{\");\n      tok = read_version_script(tok);\n      tok = skip(tok, \"}\");\n    } else if (tok.size() > 3 && tok[1] == \"=\" && tok[3] == \";\") {\n      ctx.arg.defsyms.emplace_back(get_symbol(ctx, unquote(tok[0])),\n                                   get_symbol(ctx, unquote(tok[2])));\n      tok = tok.subspan(4);\n    } else if (tok[0] == \";\") {\n      tok = tok.subspan(1);\n    } else {\n      error(tok[0], \"unknown linker script token\");\n    }\n  }\n}\n\ntemplate <typename E>\nstd::string_view Script<E>::get_script_output_type() {\n  std::call_once(once, [&] { tokenize(); });\n  std::span<std::string_view> tok = tokens;\n\n  if (tok.size() >= 3 && tok[0] == \"OUTPUT_FORMAT\" && tok[1] == \"(\") {\n    if (tok[2] == \"elf64-x86-64\")\n      return X86_64::name;\n    if (tok[2] == \"elf32-i386\")\n      return I386::name;\n  }\n\n  if (tok.size() >= 3 && (tok[0] == \"INPUT\" || tok[0] == \"GROUP\") &&\n      tok[1] == \"(\")\n    if (MappedFile *mf = resolve_path(tok[2], false))\n      return get_machine_type(ctx, rctx, mf);\n  return \"\";\n}\n\nstatic bool read_label(std::span<std::string_view> &tok, std::string label) {\n  if (tok.size() >= 1 && tok[0] == label + \":\") {\n    tok = tok.subspan(1);\n    return true;\n  }\n\n  if (tok.size() >= 2 && tok[0] == label && tok[1] == \":\") {\n    tok = tok.subspan(2);\n    return true;\n  }\n  return false;\n}\n\ntemplate <typename E>\nstd::span<std::string_view>\nScript<E>::read_version_script_commands(std::span<std::string_view> tok,\n                                        std::string_view ver_str, u16 ver_idx,\n                                        bool is_global, bool is_cpp) {\n  while (!tok.empty() && tok[0] != \"}\") {\n    if (read_label(tok, \"global\")) {\n      is_global = true;\n      continue;\n    }\n\n    if (read_label(tok, \"local\")) {\n      is_global = false;\n      continue;\n    }\n\n    if (tok[0] == \"extern\") {\n      tok = tok.subspan(1);\n\n      if (!tok.empty() && tok[0] == \"\\\"C\\\"\") {\n        tok = tok.subspan(1);\n        tok = skip(tok, \"{\");\n        tok = read_version_script_commands(tok, ver_str, ver_idx, is_global, false);\n      } else {\n        tok = skip(tok, \"\\\"C++\\\"\");\n        tok = skip(tok, \"{\");\n        tok = read_version_script_commands(tok, ver_str, ver_idx, is_global, true);\n      }\n\n      tok = skip(tok, \"}\");\n      tok = skip(tok, \";\");\n      continue;\n    }\n\n    if (tok[0] == \"*\") {\n      ctx.default_version = (is_global ? ver_idx : (u32)VER_NDX_LOCAL);\n    } else if (is_global) {\n      ctx.version_patterns.push_back({unquote(tok[0]), mf->name, ver_str,\n                                      ver_idx, is_cpp});\n    } else {\n      ctx.version_patterns.push_back({unquote(tok[0]), mf->name, ver_str,\n                                      VER_NDX_LOCAL, is_cpp});\n    }\n\n    tok = tok.subspan(1);\n\n    if (!tok.empty() && tok[0] == \"}\")\n      break;\n    tok = skip(tok, \";\");\n  }\n  return tok;\n}\n\ntemplate <typename E>\nstd::span<std::string_view>\nScript<E>::read_version_script(std::span<std::string_view> tok) {\n  u16 next_ver = VER_NDX_LAST_RESERVED + ctx.arg.version_definitions.size() + 1;\n\n  while (!tok.empty() && tok[0] != \"}\") {\n    std::string_view ver_str;\n    u16 ver_idx;\n\n    if (tok[0] == \"{\") {\n      ver_str = \"global\";\n      ver_idx = VER_NDX_GLOBAL;\n    } else {\n      ver_str = tok[0];\n      ver_idx = next_ver++;\n      ctx.arg.version_definitions.emplace_back(tok[0]);\n      tok = tok.subspan(1);\n    }\n\n    tok = skip(tok, \"{\");\n    tok = read_version_script_commands(tok, ver_str, ver_idx, true, false);\n    tok = skip(tok, \"}\");\n    if (!tok.empty() && tok[0] != \";\")\n      tok = tok.subspan(1);\n    tok = skip(tok, \";\");\n  }\n  return tok;\n}\n\ntemplate <typename E>\nvoid Script<E>::parse_version_script() {\n  std::call_once(once, [&] { tokenize(); });\n  std::span<std::string_view> tok = tokens;\n  tok = read_version_script(tok);\n  if (!tok.empty())\n    error(tok[0], \"trailing garbage token\");\n}\n\ntemplate <typename E>\nstd::span<std::string_view>\nScript<E>::read_dynamic_list_commands(std::span<std::string_view> tok,\n                                      std::vector<DynamicPattern> &result,\n                                      bool is_cpp) {\n  while (!tok.empty() && tok[0] != \"}\") {\n    if (tok[0] == \"extern\") {\n      tok = tok.subspan(1);\n\n      if (!tok.empty() && tok[0] == \"\\\"C\\\"\") {\n        tok = tok.subspan(1);\n        tok = skip(tok, \"{\");\n        tok = read_dynamic_list_commands(tok, result, false);\n      } else {\n        tok = skip(tok, \"\\\"C++\\\"\");\n        tok = skip(tok, \"{\");\n        tok = read_dynamic_list_commands(tok, result, true);\n      }\n\n      tok = skip(tok, \"}\");\n      tok = skip(tok, \";\");\n      continue;\n    }\n\n    result.push_back({unquote(tok[0]), \"\", is_cpp});\n    tok = skip(tok.subspan(1), \";\");\n  }\n  return tok;\n}\n\ntemplate <typename E>\nstd::vector<DynamicPattern> Script<E>::parse_dynamic_list() {\n  std::call_once(once, [&] { tokenize(); });\n  std::span<std::string_view> tok = tokens;\n  std::vector<DynamicPattern> result;\n\n  tok = skip(tok, \"{\");\n  tok = read_dynamic_list_commands(tok, result, false);\n  tok = skip(tok, \"}\");\n  tok = skip(tok, \";\");\n\n  if (!tok.empty())\n    error(tok[0], \"trailing garbage token\");\n\n  for (DynamicPattern &p : result)\n    p.source = mf->name;\n  return result;\n}\n\ntemplate <typename E>\nstd::vector<DynamicPattern>\nparse_dynamic_list(Context<E> &ctx, std::string_view path) {\n  ReaderContext rctx;\n  MappedFile *mf = must_open_file(ctx, std::string(path));\n  return Script(ctx, rctx, mf).parse_dynamic_list();\n}\n\nusing E = MOLD_TARGET;\n\ntemplate class Script<E>;\n\ntemplate\nstd::vector<DynamicPattern> parse_dynamic_list(Context<E> &, std::string_view);\n\n} // namespace mold\n"
  },
  {
    "path": "src/lto-unix.cc",
    "content": "// This file handles the linker plugin to support LTO (Link-Time\n// Optimization).\n//\n// LTO is a technique to do whole-program optimization to a program. Since\n// a linker sees the whole program as opposed to a single compilation\n// unit, it in theory can do some optimizations that cannot be done in the\n// usual separate compilation model. For example, LTO should be able to\n// inline functions that are defined in other compilation unit.\n//\n// In GCC and Clang, all you have to do to enable LTO is adding the\n// `-flto` flag to the compiler and the linker command lines. If `-flto`\n// is given, the compiler generates a file that contains not machine code\n// but the compiler's IR (intermediate representation). In GCC, the output\n// is an ELF file which wraps GCC's IR. In LLVM, it's not even an ELF file\n// but just a raw LLVM IR file.\n//\n// Here is what we have to do if at least one input file is not a usual\n// ELF file but an IR object file:\n//\n//  1. Read symbols both from usual ELF files and from IR object files and\n//     resolve symbols as usual.\n//\n//  2. Pass all IR objects to the compiler backend. The compiler backend\n//     compiles the IRs and returns a few big ELF object files as a\n//     result.\n//\n//  3. Parse the returned ELF files and overwrite IR object symbols with\n//     the returned ones, discarding IR object files.\n//\n//  4. Continue the rest of the linking process as usual.\n//\n// When gcc or clang inovkes ld, they pass `-plugin /path/to/linker-plugin.so`\n// to the linker. The given .so file provides a way to call the compiler\n// backend.\n//\n// The linker plugin API is documented at\n// https://gcc.gnu.org/wiki/whopr/driver, though the document is a bit\n// outdated.\n//\n// Frankly, the linker plugin API is peculiar and is not very easy to use.\n// For some reason, the API functions don't return the result of a\n// function call as a return value but instead calls other function with\n// the result as its argument to \"return\" the result.\n//\n// For example, the first thing you need to do after dlopen()'ing a linker\n// plugin .so is to call `onload` function with a list of callback\n// functions. `onload` calls callbacks to notify about the pointers to\n// other functions the linker plugin provides. I don't know why `onload`\n// can't just return a list of functions or why the linker plugin can't\n// define not only `onload` but other functions, but that's what it is.\n//\n// Here is the steps to use the linker plugin:\n//\n//  1. dlopen() the linker plugin .so and call `onload` to obtain pointers\n//     to other functions provided by the plugin.\n//\n//  2. Call `claim_file_hook` with an IR object file to read its symbol\n//     table. `claim_file_hook` calls the `add_symbols` callback to\n//     \"return\" a list of symbols.\n//\n//  3. `claim_file_hook` returns LDPT_OK only when the plugin wants to\n//     handle a given file. Since we pass only IR object files to the\n//     plugin in mold, it always returns LDPT_OK in our case.\n//\n//  4. Once we made a decision as to which object file to include into the\n//     output file, we call `all_symbols_read_hook` to compile IR objects\n//     into a few big ELF files. That function calls the `get_symbols`\n//     callback to ask us about the symbol resolution results. (The\n//     compiler backend needs to know whether an undefined symbol in an IR\n//     object was resolved to a regular object file or a shared object to\n//     do whole program optimization, for example.)\n//\n//  5. `all_symbols_read_hook` \"returns\" the result by calling the\n//     `add_input_file` callback. The callback is called with a path to an\n//     LTO'ed ELF file. We parse that ELF file and override symbols\n//     defined by IR objects with the ELF file's ones.\n//\n//  6. Lastly, we call `cleanup_hook` to remove temporary files created by\n//     the compiler backend.\n\n#include \"mold.h\"\n#include \"lto.h\"\n\n#include <cstdarg>\n#include <cstring>\n#include <dlfcn.h>\n#include <fcntl.h>\n#include <sstream>\n#include <tbb/parallel_for_each.h>\n#include <unistd.h>\n\n#if 0\n# define LOG std::cerr\n#else\n# define LOG std::ostringstream()\n#endif\n\nnamespace mold {\n\n// Global variables\n// We store LTO-related information to global variables,\n// as the LTO plugin is not thread-safe by design anyway.\n\ntemplate <typename E> static Context<E> *gctx;\ntemplate <typename E> static std::vector<ObjectFile<E> *> lto_objects;\n\nstatic int phase = 0;\nstatic std::vector<PluginSymbol> plugin_symbols;\nstatic ClaimFileHandler *claim_file_hook;\nstatic AllSymbolsReadHandler *all_symbols_read_hook;\nstatic CleanupHandler *cleanup_hook;\nstatic bool is_gcc_linker_api_v1 = false;\n\n// Event handlers\n\ntemplate <typename E>\nstatic PluginStatus message(PluginLevel level, const char *fmt, ...) {\n  LOG << \"message\\n\";\n  Context<E> &ctx = *gctx<E>;\n\n  char buf[1000];\n  va_list ap;\n  va_start(ap, fmt);\n  vsnprintf(buf, sizeof(buf), fmt, ap);\n  va_end(ap);\n\n  switch (level) {\n  case LDPL_INFO:\n    Out(ctx) << buf;\n    break;\n  case LDPL_WARNING:\n    Warn(ctx) << buf;\n    break;\n  case LDPL_ERROR:\n  case LDPL_FATAL:\n    Fatal(ctx) << buf;\n  }\n\n  return LDPS_OK;\n}\n\ntemplate <typename E>\nstatic PluginStatus register_claim_file_hook(ClaimFileHandler fn) {\n  LOG << \"register_claim_file_hook\\n\";\n  claim_file_hook = fn;\n  return LDPS_OK;\n}\n\ntemplate <typename E>\nstatic PluginStatus\nregister_all_symbols_read_hook(AllSymbolsReadHandler fn) {\n  LOG << \"register_all_symbols_read_hook\\n\";\n  all_symbols_read_hook = fn;\n  return LDPS_OK;\n}\n\ntemplate <typename E>\nstatic PluginStatus register_cleanup_hook(CleanupHandler fn) {\n  LOG << \"register_cleanup_hook\\n\";\n  cleanup_hook = fn;\n  return LDPS_OK;\n}\n\nstatic PluginStatus\nadd_symbols(void *handle, int nsyms, const PluginSymbol *psyms) {\n  LOG << \"add_symbols: \" << nsyms << \"\\n\";\n  assert(phase == 1);\n  plugin_symbols = {psyms, psyms + nsyms};\n  return LDPS_OK;\n}\n\ntemplate <typename E>\nstatic PluginStatus add_input_file(const char *path) {\n  LOG << \"add_input_file: \" << path << \"\\n\";\n\n  Context<E> &ctx = *gctx<E>;\n  static i64 file_priority = 100;\n\n  MappedFile *mf = must_open_file(ctx, path);\n  mf->is_dependency = false;\n\n  ObjectFile<E> *file = new ObjectFile<E>(ctx, mf, \"\");\n  ctx.obj_pool.emplace_back(file);\n  lto_objects<E>.push_back(file);\n\n  file->priority = file_priority++;\n  file->is_reachable = true;\n  file->parse(ctx);\n  file->resolve_symbols(ctx);\n  return LDPS_OK;\n}\n\nstatic PluginStatus\nget_input_file(const void *handle, struct PluginInputFile *file) {\n  LOG << \"get_input_file\\n\";\n  return LDPS_OK;\n}\n\ntemplate <typename E>\nstatic PluginStatus release_input_file(const void *handle) {\n  LOG << \"release_input_file\\n\";\n\n  ObjectFile<E> &file = *(ObjectFile<E> *)handle;\n  file.mf->close_fd();\n  return LDPS_OK;\n}\n\nstatic PluginStatus add_input_library(const char *path) {\n  LOG << \"add_input_library\\n\";\n  return LDPS_OK;\n}\n\nstatic PluginStatus set_extra_library_path(const char *path) {\n  LOG << \"set_extra_library_path\\n\";\n  return LDPS_OK;\n}\n\ntemplate <typename E>\nstatic PluginStatus get_view(const void *handle, const void **view) {\n  LOG << \"get_view\\n\";\n\n  ObjectFile<E> &file = *(ObjectFile<E> *)handle;\n  *view = (void *)file.mf->data;\n  return LDPS_OK;\n}\n\nstatic PluginStatus\nget_input_section_count(const void *handle, int *count) {\n  LOG << \"get_input_section_count\\n\";\n  return LDPS_OK;\n}\n\nstatic PluginStatus\nget_input_section_type(const PluginSection section, int *type) {\n  LOG << \"get_input_section_type\\n\";\n  return LDPS_OK;\n}\n\nstatic PluginStatus\nget_input_section_name(const PluginSection section,\n                       char **section_name) {\n  LOG << \"get_input_section_name\\n\";\n  return LDPS_OK;\n}\n\nstatic PluginStatus\nget_input_section_contents(const PluginSection section,\n                           const char **section_contents,\n                           size_t *len) {\n  LOG << \"get_input_section_contents\\n\";\n  return LDPS_OK;\n}\n\nstatic PluginStatus\nupdate_section_order(const PluginSection *section_list,\n                     int num_sections) {\n  LOG << \"update_section_order\\n\";\n  return LDPS_OK;\n}\n\nstatic PluginStatus allow_section_ordering() {\n  LOG << \"allow_section_ordering\\n\";\n  return LDPS_OK;\n}\n\nstatic PluginStatus\nget_symbols_v1(const void *handle, int nsyms, PluginSymbol *psyms) {\n  unreachable();\n}\n\n// get_symbols teaches the LTO plugin as to how we have resolved symbols.\n// The plugin uses the symbol resolution info to optimize the program.\n//\n// For example, if a definition in an IR file is not referenced by\n// non-IR objects at all, the plugin may choose to completely inline\n// that definition within the IR objects and remove the symbol from the\n// LTO result. On the other hand, if a definition is referenced by a\n// non-IR object, it has to keep the symbol in the LTO result.\ntemplate <typename E>\nstatic PluginStatus\nget_symbols(const void *handle, int nsyms, PluginSymbol *psyms, bool is_v2) {\n  ObjectFile<E> &file = *(ObjectFile<E> *)handle;\n  assert(file.is_lto_obj);\n\n  // If file is an archive member which was not chose to be included in\n  // to the final result, we need to make the plugin to ignore all\n  // symbols.\n  if (!file.is_reachable) {\n    assert(!is_v2);\n    for (int i = 0; i < nsyms; i++)\n      psyms[i].resolution = LDPR_PREEMPTED_REG;\n    return LDPS_NO_SYMS;\n  }\n\n  auto get_resolution = [&](ElfSym<E> &esym, Symbol<E> &sym) {\n    if (!sym.file)\n      return LDPR_UNDEF;\n\n    if (sym.file == &file) {\n      if (sym.referenced_by_regular_obj)\n        return LDPR_PREVAILING_DEF;\n      if (sym.is_exported)\n        return is_v2 ? LDPR_PREVAILING_DEF : LDPR_PREVAILING_DEF_IRONLY_EXP;\n      return LDPR_PREVAILING_DEF_IRONLY;\n    }\n\n    if (sym.file->is_dso)\n      return LDPR_RESOLVED_DYN;\n\n    if (((ObjectFile<E> *)sym.file)->is_lto_obj && !sym.is_wrapped)\n      return esym.is_undef() ? LDPR_RESOLVED_IR : LDPR_PREEMPTED_IR;\n    return esym.is_undef() ? LDPR_RESOLVED_EXEC : LDPR_PREEMPTED_REG;\n  };\n\n  // Set the symbol resolution results to psyms.\n  for (i64 i = 0; i < nsyms; i++) {\n    ElfSym<E> &esym = file.elf_syms[i + 1];\n    Symbol<E> &sym = *file.symbols[i + 1];\n    psyms[i].resolution = get_resolution(esym, sym);\n  }\n  return LDPS_OK;\n}\n\n// This function restarts mold itself with `--:lto-pass2` and\n// `--:ignore-ir-file` flags. We do this as a workaround for the old\n// linker plugins that do not support the get_symbols_v3 API.\n//\n// get_symbols_v1 and get_symbols_v2 don't provide a way to ignore an\n// object file we previously passed to the linker plugin. So we can't\n// \"unload\" object files in archives that we ended up not choosing to\n// include into the final output.\n//\n// As a workaround, we restart the linker with a list of object files\n// the linker has to ignore, so that it won't read the object files\n// from archives next time.\n//\n// This is an ugly hack and should be removed once GCC adopts the v3 API.\ntemplate <typename E>\nstatic void restart_process(Context<E> &ctx) {\n  std::vector<const char *> args;\n\n  for (std::string_view arg : ctx.cmdline_args)\n    args.push_back(strdup(std::string(arg).c_str()));\n\n  for (std::unique_ptr<ObjectFile<E>> &file : ctx.obj_pool)\n    if (file->is_lto_obj && !file->is_reachable)\n      args.push_back(strdup((\"--:ignore-ir-file=\" +\n                             file->mf->get_identifier()).c_str()));\n\n  args.push_back(\"--:lto-pass2\");\n  args.push_back(nullptr);\n\n  std::cout << std::flush;\n  std::cerr << std::flush;\n\n  std::string self = get_self_path();\n  execv(self.c_str(), (char * const *)args.data());\n  std::cerr << \"execv failed: \" << errno_string() << \"\\n\";\n  _exit(1);\n}\n\ntemplate <typename E>\nstatic PluginStatus\nget_symbols_v2(const void *handle, int nsyms, PluginSymbol *psyms) {\n  LOG << \"get_symbols_v2\\n\";\n  return get_symbols<E>(handle, nsyms, psyms, true);\n}\n\ntemplate <typename E>\nstatic PluginStatus\nget_symbols_v3(const void *handle, int nsyms, PluginSymbol *psyms) {\n  LOG << \"get_symbols_v3\\n\";\n  return get_symbols<E>(handle, nsyms, psyms, false);\n}\n\nstatic PluginStatus allow_unique_segment_for_sections() {\n  LOG << \"allow_unique_segment_for_sections\\n\";\n  return LDPS_OK;\n}\n\nstatic PluginStatus\nunique_segment_for_sections(const char *segment_name,\n                            uint64_t flags,\n                            uint64_t align,\n                            const PluginSection *section_list,\n                            int num_sections) {\n  LOG << \"unique_segment_for_sections\\n\";\n  return LDPS_OK;\n}\n\nstatic PluginStatus\nget_input_section_alignment(const PluginSection section,\n                            int *addralign) {\n  LOG << \"get_input_section_alignment\\n\";\n  return LDPS_OK;\n}\n\nstatic PluginStatus\nget_input_section_size(const PluginSection section, uint64_t *size) {\n  LOG << \"get_input_section_size\\n\";\n  return LDPS_OK;\n}\n\ntemplate <typename E>\nstatic PluginStatus\nregister_new_input_hook(NewInputHandler fn) {\n  LOG << \"register_new_input_hook\\n\";\n  return LDPS_OK;\n}\n\nstatic PluginStatus\nget_wrap_symbols(uint64_t *num_symbols, const char ***wrap_symbols) {\n  LOG << \"get_wrap_symbols\\n\";\n  return LDPS_OK;\n}\n\ntemplate <typename E>\nstatic PluginLinkerAPIVersion\nget_api_version(const char *plugin_identifier,\n                unsigned plugin_version,\n                int minimal_api_supported,\n                int maximal_api_supported,\n                const char **linker_identifier,\n                const char **linker_version) {\n  if (LAPI_V1 < minimal_api_supported)\n    Fatal(*gctx<E>) << \"LTO plugin does not support V0 or V1 API\";\n\n  std::string version = mold_version + \"\\0\"s;\n\n  *linker_identifier = \"mold\";\n  *linker_version = version.data();\n\n  if (LAPI_V1 <= maximal_api_supported) {\n    is_gcc_linker_api_v1 = true;\n    return LAPI_V1;\n  }\n  return LAPI_V0;\n}\n\n// dlopen the linker plugin file\ntemplate <typename E>\nstatic void load_lto_plugin(Context<E> &ctx) {\n  static std::once_flag flag;\n\n  std::call_once(flag, [&] {\n    assert(phase == 0);\n    phase = 1;\n    gctx<E> = &ctx;\n\n    void *handle = dlopen(ctx.arg.plugin.c_str(), RTLD_NOW | RTLD_LOCAL);\n    if (!handle)\n      Fatal(ctx) << \"could not open plugin file: \" << dlerror();\n\n    OnloadFn *onload = (OnloadFn *)dlsym(handle, \"onload\");\n    if (!onload)\n      Fatal(ctx) << \"failed to load plugin \" << ctx.arg.plugin << \": \"\n                 << dlerror();\n\n    auto save = [&](std::string_view str) {\n      return save_string(ctx, std::string(str).c_str()).data();\n    };\n\n    std::vector<PluginTagValue> tv;\n    tv.emplace_back(LDPT_MESSAGE, message<E>);\n\n    if (ctx.arg.shared)\n      tv.emplace_back(LDPT_LINKER_OUTPUT, LDPO_DYN);\n    else if (ctx.arg.pie)\n      tv.emplace_back(LDPT_LINKER_OUTPUT, LDPO_PIE);\n    else\n      tv.emplace_back(LDPT_LINKER_OUTPUT, LDPO_EXEC);\n\n    for (std::string_view opt : ctx.arg.plugin_opt)\n      tv.emplace_back(LDPT_OPTION, save(opt));\n\n    tv.emplace_back(LDPT_REGISTER_CLAIM_FILE_HOOK, register_claim_file_hook<E>);\n    tv.emplace_back(LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK,\n                    register_all_symbols_read_hook<E>);\n    tv.emplace_back(LDPT_REGISTER_CLEANUP_HOOK, register_cleanup_hook<E>);\n    tv.emplace_back(LDPT_ADD_SYMBOLS, add_symbols);\n    tv.emplace_back(LDPT_GET_SYMBOLS, get_symbols_v1);\n    tv.emplace_back(LDPT_ADD_INPUT_FILE, add_input_file<E>);\n    tv.emplace_back(LDPT_GET_INPUT_FILE, get_input_file);\n    tv.emplace_back(LDPT_RELEASE_INPUT_FILE, release_input_file<E>);\n    tv.emplace_back(LDPT_ADD_INPUT_LIBRARY, add_input_library);\n    tv.emplace_back(LDPT_OUTPUT_NAME, save(ctx.arg.output));\n    tv.emplace_back(LDPT_SET_EXTRA_LIBRARY_PATH, set_extra_library_path);\n    tv.emplace_back(LDPT_GET_VIEW, get_view<E>);\n    tv.emplace_back(LDPT_GET_INPUT_SECTION_COUNT, get_input_section_count);\n    tv.emplace_back(LDPT_GET_INPUT_SECTION_TYPE, get_input_section_type);\n    tv.emplace_back(LDPT_GET_INPUT_SECTION_NAME, get_input_section_name);\n    tv.emplace_back(LDPT_GET_INPUT_SECTION_CONTENTS, get_input_section_contents);\n    tv.emplace_back(LDPT_UPDATE_SECTION_ORDER, update_section_order);\n    tv.emplace_back(LDPT_ALLOW_SECTION_ORDERING, allow_section_ordering);\n    tv.emplace_back(LDPT_ADD_SYMBOLS_V2, add_symbols);\n    tv.emplace_back(LDPT_GET_SYMBOLS_V2, get_symbols_v2<E>);\n    tv.emplace_back(LDPT_ALLOW_UNIQUE_SEGMENT_FOR_SECTIONS,\n                    allow_unique_segment_for_sections);\n    tv.emplace_back(LDPT_UNIQUE_SEGMENT_FOR_SECTIONS, unique_segment_for_sections);\n    tv.emplace_back(LDPT_GET_SYMBOLS_V3, get_symbols_v3<E>);\n    tv.emplace_back(LDPT_GET_INPUT_SECTION_ALIGNMENT, get_input_section_alignment);\n    tv.emplace_back(LDPT_GET_INPUT_SECTION_SIZE, get_input_section_size);\n    tv.emplace_back(LDPT_REGISTER_NEW_INPUT_HOOK, register_new_input_hook<E>);\n    tv.emplace_back(LDPT_GET_WRAP_SYMBOLS, get_wrap_symbols);\n    tv.emplace_back(LDPT_GET_API_VERSION, get_api_version<E>);\n    tv.emplace_back(LDPT_NULL, 0);\n\n    [[maybe_unused]] PluginStatus status = onload(tv.data());\n    assert(status == LDPS_OK);\n  });\n}\n\ntemplate <typename E>\nstatic ElfSym<E> to_elf_sym(PluginSymbol &psym) {\n  ElfSym<E> esym;\n  memset(&esym, 0, sizeof(esym));\n\n  switch (psym.def) {\n  case LDPK_DEF:\n    esym.st_shndx = SHN_ABS;\n    break;\n  case LDPK_WEAKDEF:\n    esym.st_shndx = SHN_ABS;\n    esym.st_bind = STB_WEAK;\n    break;\n  case LDPK_UNDEF:\n    esym.st_shndx = SHN_UNDEF;\n    break;\n  case LDPK_WEAKUNDEF:\n    esym.st_shndx = SHN_UNDEF;\n    esym.st_bind = STB_WEAK;\n    break;\n  case LDPK_COMMON:\n    esym.st_shndx = SHN_COMMON;\n    break;\n  }\n\n  switch (psym.symbol_type) {\n  case LDST_FUNCTION:\n    esym.st_type = STT_FUNC;\n    break;\n  case LDST_VARIABLE:\n    esym.st_type = STT_OBJECT;\n    break;\n  };\n\n  switch (psym.visibility) {\n  case LDPV_PROTECTED:\n    esym.st_visibility = STV_PROTECTED;\n    break;\n  case LDPV_INTERNAL:\n    esym.st_visibility = STV_INTERNAL;\n    break;\n  case LDPV_HIDDEN:\n    esym.st_visibility = STV_HIDDEN;\n    break;\n  }\n\n  esym.st_size = psym.size;\n  return esym;\n}\n\n// Returns true if a given linker plugin looks like LLVM's one.\n// Returns false if it's GCC.\ntemplate <typename E>\nstatic bool is_llvm(Context<E> &ctx) {\n  return ctx.arg.plugin.find(\"LLVMgold.\") != ctx.arg.plugin.npos;\n}\n\n// Returns true if a given linker plugin supports the get_symbols_v3 API.\n// Any version of LLVM and GCC 12 or newer support it.\ntemplate <typename E>\nstatic bool supports_v3_api(Context<E> &ctx) {\n  return is_gcc_linker_api_v1 || is_llvm(ctx);\n}\n\ntemplate <typename E>\nstatic PluginInputFile\ncreate_plugin_input_file(Context<E> &ctx, MappedFile *mf) {\n  PluginInputFile file;\n  MappedFile *mf2 = mf->parent ? mf->parent : mf;\n\n  file.name = save_string(ctx, mf2->name).data();\n  file.offset = mf->get_offset();\n  file.filesize = mf->size;\n\n  mf2->reopen_fd(file.name);\n\n  file.fd = mf2->fd;\n\n  if (!file.fd)\n    Fatal(ctx) << \"cannot open \" << file.name << \": \" << errno_string();\n  return file;\n}\n\ntemplate <typename E>\nObjectFile<E> *read_lto_object(Context<E> &ctx, MappedFile *mf) {\n  if (ctx.arg.plugin.empty())\n    Fatal(ctx) << mf->name << \": unable to handle this LTO object file because \"\n               << \"the -plugin option was not provided. Please make sure you \"\n               << \"added -flto not only when creating object files but also \"\n               << \"when linking the final executable.\";\n\n  load_lto_plugin(ctx);\n\n  // V0 API's claim_file is not thread-safe.\n  static std::mutex mu;\n  std::unique_lock lock(mu, std::defer_lock);\n  if (!is_gcc_linker_api_v1)\n    lock.lock();\n\n  // Create mold's object instance\n  ObjectFile<E> *obj = new ObjectFile<E>;\n  ctx.obj_pool.emplace_back(obj);\n\n  obj->filename = mf->name;\n  obj->symbols.push_back(new Symbol<E>);\n  obj->first_global = 1;\n  obj->is_lto_obj = true;\n  obj->mf = mf;\n  obj->archive_name = mf->parent ? mf->parent->name : \"\";\n\n  // Create plugin's object instance\n  PluginInputFile file = create_plugin_input_file(ctx, mf);\n  file.handle = (void *)obj;\n\n  LOG << \"read_lto_symbols: \"<< mf->name << \"\\n\";\n\n  // claim_file_hook() calls add_symbols() which initializes `plugin_symbols`\n  int claimed = false;\n  claim_file_hook(&file, &claimed);\n  if (!claimed)\n    Fatal(ctx) << mf->name << \": not claimed by the LTO plugin;\"\n               << \" please make sure you are using the same compiler of the\"\n               << \" same version for all object files\";\n\n  if (mf->parent)\n    mf->parent->close_fd();\n  else\n    mf->close_fd();\n\n  // Create a symbol strtab\n  i64 strtab_size = 1;\n  for (PluginSymbol &psym : plugin_symbols)\n    strtab_size += strlen(psym.name) + 1;\n  std::string strtab(strtab_size, '\\0');\n\n  // Initialize esyms\n  obj->lto_elf_syms.resize(plugin_symbols.size() + 1);\n  obj->lto_comdat_groups.resize(plugin_symbols.size() + 1);\n  i64 strtab_offset = 1;\n\n  for (i64 i = 0; i < plugin_symbols.size(); i++) {\n    PluginSymbol &psym = plugin_symbols[i];\n    obj->lto_elf_syms[i + 1] = to_elf_sym<E>(psym);\n    obj->lto_elf_syms[i + 1].st_name = strtab_offset;\n\n    i64 len = strlen(psym.name);\n    memcpy(strtab.data() + strtab_offset, psym.name, len);\n    strtab_offset += len + 1;\n\n    // comdat_key is non-null if the symbol is defined in a comdat member\n    // section. We handle such symbols differently than comdat symbols in\n    // a regular file because, unlike regular object files, IR files don't\n    // have input sections.\n    if (psym.comdat_key) {\n      std::string_view key = save_string(ctx, psym.comdat_key);\n      obj->lto_comdat_groups[i + 1] = insert_comdat_group(ctx, key);\n    }\n  }\n\n  obj->symbol_strtab = save_string(ctx, strtab);\n  obj->elf_syms = obj->lto_elf_syms;\n  obj->initialize_symbols(ctx);\n  plugin_symbols.clear();\n  return obj;\n}\n\n// Entry point\ntemplate <typename E>\nstd::vector<ObjectFile<E> *> run_lto_plugin(Context<E> &ctx) {\n  Timer t(ctx, \"run_lto_plugin\");\n  load_lto_plugin(ctx);\n\n  if (!ctx.arg.lto_pass2 && !supports_v3_api(ctx))\n    restart_process(ctx);\n\n  assert(phase == 1);\n  phase = 2;\n\n  // Set `referenced_by_regular_obj` bit.\n  tbb::parallel_for_each(ctx.objs, [](ObjectFile<E> *file) {\n    if (!file->is_lto_obj) {\n      for (Symbol<E> *sym : file->get_global_syms()) {\n        if (sym->file && !sym->file->is_dso &&\n            ((ObjectFile<E> *)sym->file)->is_lto_obj) {\n          std::scoped_lock lock(sym->mu);\n          sym->referenced_by_regular_obj = true;\n        }\n      }\n    }\n  });\n\n  // Symbols specified by the --wrap option needs to be visible from\n  // regular object files.\n  for (std::string_view name : ctx.arg.wrap) {\n    get_symbol(ctx, name)->referenced_by_regular_obj = true;\n\n    std::string_view x = save_string(ctx, \"__wrap_\" + std::string(name));\n    std::string_view y = save_string(ctx, \"__real_\" + std::string(name));\n\n    get_symbol(ctx, x)->referenced_by_regular_obj = true;\n    get_symbol(ctx, y)->referenced_by_regular_obj = true;\n  }\n\n  // Keep some symbols\n  for (Symbol<E> *sym : ctx.arg.undefined)\n    sym->referenced_by_regular_obj = true;\n\n  // Object files containing .gnu.offload_lto_.* sections need to be\n  // given to the LTO backend. Such sections contains code and data for\n  // peripherails (typically GPUs).\n  for (ObjectFile<E> *file : ctx.objs) {\n    if (file->is_reachable && !file->is_lto_obj && file->is_gcc_offload_obj) {\n      PluginInputFile pfile = create_plugin_input_file(ctx, file->mf);\n      int claimed = false;\n      claim_file_hook(&pfile, &claimed);\n      assert(!claimed);\n    }\n  }\n\n  // all_symbols_read_hook() calls add_input_file() and add_input_library()\n  LOG << \"all symbols read\\n\";\n  if (PluginStatus st = all_symbols_read_hook(); st != LDPS_OK)\n    Fatal(ctx) << \"LTO: all_symbols_read_hook returns \" << st;\n\n  return lto_objects<E>;\n}\n\ntemplate <typename E>\nvoid lto_cleanup(Context<E> &ctx) {\n  Timer t(ctx, \"lto_cleanup\");\n  if (cleanup_hook)\n    cleanup_hook();\n}\n\nusing E = MOLD_TARGET;\n\ntemplate ObjectFile<E> *read_lto_object(Context<E> &, MappedFile *);\ntemplate std::vector<ObjectFile<E> *> run_lto_plugin(Context<E> &);\ntemplate void lto_cleanup(Context<E> &);\n\n} // namespace mold\n"
  },
  {
    "path": "src/lto-win32.cc",
    "content": "#include \"mold.h\"\n#include \"lto.h\"\n\nnamespace mold {\n\ntemplate <typename E>\nObjectFile<E> *read_lto_object(Context<E> &ctx, MappedFile *mf) {\n  Fatal(ctx) << \"LTO is not supported on Windows\";\n}\n\ntemplate <typename E>\nstd::vector<ObjectFile<E> *> run_lto_plugin(Context<E> &ctx) {\n  return {};\n}\n\ntemplate <typename E>\nvoid lto_cleanup(Context<E> &ctx) {}\n\nusing E = MOLD_TARGET;\n\ntemplate ObjectFile<E> *read_lto_object(Context<E> &, MappedFile *);\ntemplate std::vector<ObjectFile<E> *> run_lto_plugin(Context<E> &);\ntemplate void lto_cleanup(Context<E> &);\n\n} // namespace mold\n"
  },
  {
    "path": "src/lto.h",
    "content": "#pragma once\n\n#include \"../lib/integers.h\"\n\nnamespace mold {\n\nenum PluginStatus {\n  LDPS_OK,\n  LDPS_NO_SYMS,\n  LDPS_BAD_HANDLE,\n  LDPS_ERR,\n};\n\nenum PluginTag {\n  LDPT_NULL,\n  LDPT_API_VERSION,\n  LDPT_GOLD_VERSION,\n  LDPT_LINKER_OUTPUT,\n  LDPT_OPTION,\n  LDPT_REGISTER_CLAIM_FILE_HOOK,\n  LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK,\n  LDPT_REGISTER_CLEANUP_HOOK,\n  LDPT_ADD_SYMBOLS,\n  LDPT_GET_SYMBOLS,\n  LDPT_ADD_INPUT_FILE,\n  LDPT_MESSAGE,\n  LDPT_GET_INPUT_FILE,\n  LDPT_RELEASE_INPUT_FILE,\n  LDPT_ADD_INPUT_LIBRARY,\n  LDPT_OUTPUT_NAME,\n  LDPT_SET_EXTRA_LIBRARY_PATH,\n  LDPT_GNU_LD_VERSION,\n  LDPT_GET_VIEW,\n  LDPT_GET_INPUT_SECTION_COUNT,\n  LDPT_GET_INPUT_SECTION_TYPE,\n  LDPT_GET_INPUT_SECTION_NAME,\n  LDPT_GET_INPUT_SECTION_CONTENTS,\n  LDPT_UPDATE_SECTION_ORDER,\n  LDPT_ALLOW_SECTION_ORDERING,\n  LDPT_GET_SYMBOLS_V2,\n  LDPT_ALLOW_UNIQUE_SEGMENT_FOR_SECTIONS,\n  LDPT_UNIQUE_SEGMENT_FOR_SECTIONS,\n  LDPT_GET_SYMBOLS_V3,\n  LDPT_GET_INPUT_SECTION_ALIGNMENT,\n  LDPT_GET_INPUT_SECTION_SIZE,\n  LDPT_REGISTER_NEW_INPUT_HOOK,\n  LDPT_GET_WRAP_SYMBOLS,\n  LDPT_ADD_SYMBOLS_V2,\n  LDPT_GET_API_VERSION,\n};\n\nenum PluginApiVersion {\n  LD_PLUGIN_API_VERSION = 1,\n};\n\nstruct PluginTagValue {\n  PluginTagValue(PluginTag tag, int val) : tag(tag), val(val) {}\n  PluginTagValue(PluginTag tag, auto *ptr) : tag(tag), ptr((void *)ptr) {}\n\n  PluginTag tag;\n  union {\n    int val;\n    void *ptr;\n  };\n};\n\nenum PluginOutputFileType {\n  LDPO_REL,\n  LDPO_EXEC,\n  LDPO_DYN,\n  LDPO_PIE,\n};\n\nstruct PluginInputFile {\n  const char *name;\n#if __MINGW32__\n  HANDLE fd;\n#else\n  int fd;\n#endif\n  u64 offset;\n  u64 filesize;\n  void *handle;\n};\n\nstruct PluginSection {\n  const void *handle;\n  u32 shndx;\n};\n\nstruct PluginSymbol {\n  char *name;\n  char *version;\n#ifdef __LITTLE_ENDIAN__\n  u8 def;\n  u8 symbol_type;\n  u8 section_kind;\n  u8 padding;\n#else\n  u8 padding;\n  u8 section_kind;\n  u8 symbol_type;\n  u8 def;\n#endif\n  i32 visibility;\n  u64 size;\n  char *comdat_key;\n  i32 resolution;\n};\n\nenum PluginSymbolKind {\n  LDPK_DEF,\n  LDPK_WEAKDEF,\n  LDPK_UNDEF,\n  LDPK_WEAKUNDEF,\n  LDPK_COMMON,\n};\n\nenum PluginSymbolVisibility {\n  LDPV_DEFAULT,\n  LDPV_PROTECTED,\n  LDPV_INTERNAL,\n  LDPV_HIDDEN,\n};\n\nenum PluginSymbolType {\n  LDST_UNKNOWN,\n  LDST_FUNCTION,\n  LDST_VARIABLE,\n};\n\nenum PluginSymbolSectionKind {\n  LDSSK_DEFAULT,\n  LDSSK_BSS,\n};\n\nenum PluginSymbolResolution {\n  LDPR_UNKNOWN,\n  LDPR_UNDEF,\n  LDPR_PREVAILING_DEF,\n  LDPR_PREVAILING_DEF_IRONLY,\n  LDPR_PREEMPTED_REG,\n  LDPR_PREEMPTED_IR,\n  LDPR_RESOLVED_IR,\n  LDPR_RESOLVED_EXEC,\n  LDPR_RESOLVED_DYN,\n  LDPR_PREVAILING_DEF_IRONLY_EXP,\n};\n\nenum PluginLevel {\n  LDPL_INFO,\n  LDPL_WARNING,\n  LDPL_ERROR,\n  LDPL_FATAL,\n};\n\nenum PluginLinkerAPIVersion {\n  LAPI_V0,\n  LAPI_V1,\n};\n\ntypedef PluginStatus OnloadFn(PluginTagValue *tv);\ntypedef PluginStatus ClaimFileHandler(const PluginInputFile *, int *);\ntypedef PluginStatus AllSymbolsReadHandler();\ntypedef PluginStatus CleanupHandler();\ntypedef PluginStatus NewInputHandler(const PluginInputFile *);\n\n} // namespace mold\n"
  },
  {
    "path": "src/main.cc",
    "content": "#include \"mold.h\"\n#include \"config.h\"\n\n#include <cstring>\n#include <functional>\n#include <sys/stat.h>\n#include <sys/types.h>\n#include <unordered_set>\n\nnamespace mold {\n\ntemplate <typename E>\nstatic void\ncheck_file_compatibility(Context<E> &ctx, ReaderContext &rctx, MappedFile *mf) {\n  std::string_view target = get_machine_type(ctx, rctx, mf);\n  if (target != ctx.arg.emulation)\n    Fatal(ctx) << mf->name << \": incompatible file type: \"\n               << ctx.arg.emulation << \" is expected but got \" << target;\n}\n\ntemplate <typename E>\nstatic ObjectFile<E> *new_object_file(Context<E> &ctx, ReaderContext &rctx,\n                                      MappedFile *mf, std::string archive_name) {\n  static Counter count(\"parsed_objs\");\n  count++;\n\n  check_file_compatibility(ctx, rctx, mf);\n\n  ObjectFile<E> *file = new ObjectFile<E>(ctx, mf, archive_name);\n  ctx.obj_pool.emplace_back(file);\n  file->priority = ctx.file_priority++;\n  file->as_needed =\n    rctx.in_lib || (!archive_name.empty() && !rctx.whole_archive);\n\n  rctx.tg->run([file, &ctx] { file->parse(ctx); });\n  if (ctx.arg.trace)\n    Out(ctx) << \"trace: \" << *file;\n  return file;\n}\n\ntemplate <typename E>\nstatic ObjectFile<E> *new_lto_obj(Context<E> &ctx, ReaderContext &rctx,\n                                  MappedFile *mf, std::string archive_name) {\n  static Counter count(\"parsed_lto_objs\");\n  count++;\n\n  if (ctx.arg.ignore_ir_file.count(mf->get_identifier()))\n    return nullptr;\n\n  ObjectFile<E> *file = read_lto_object(ctx, mf);\n  file->priority = ctx.file_priority++;\n  file->archive_name = archive_name;\n  file->as_needed =\n    rctx.in_lib || (!archive_name.empty() && !rctx.whole_archive);\n\n  if (ctx.arg.trace)\n    Out(ctx) << \"trace: \" << *file;\n  return file;\n}\n\ntemplate <typename E>\nstatic SharedFile<E> *\nnew_shared_file(Context<E> &ctx, ReaderContext &rctx, MappedFile *mf) {\n  check_file_compatibility(ctx, rctx, mf);\n\n  SharedFile<E> *file = new SharedFile<E>(ctx, mf);\n  ctx.dso_pool.emplace_back(file);\n  file->priority = ctx.file_priority++;\n  file->as_needed = rctx.as_needed;\n\n  rctx.tg->run([file, &ctx] { file->parse(ctx); });\n  if (ctx.arg.trace)\n    Out(ctx) << \"trace: \" << *file;\n  return file;\n}\n\ntemplate <typename E>\nvoid read_file(Context<E> &ctx, ReaderContext &rctx, MappedFile *mf) {\n  switch (get_file_type(ctx, mf)) {\n  case FileType::ELF_OBJ:\n    ctx.objs.push_back(new_object_file(ctx, rctx, mf, \"\"));\n    return;\n  case FileType::ELF_DSO:\n    ctx.dsos.push_back(new_shared_file(ctx, rctx, mf));\n    return;\n  case FileType::AR:\n  case FileType::THIN_AR:\n    for (MappedFile *child : read_archive_members(ctx, mf)) {\n      switch (get_file_type(ctx, child)) {\n      case FileType::ELF_OBJ:\n        ctx.objs.push_back(new_object_file(ctx, rctx, child, mf->name));\n        break;\n      case FileType::GCC_LTO_OBJ:\n      case FileType::LLVM_BITCODE:\n        if (ObjectFile<E> *file = new_lto_obj(ctx, rctx, child, mf->name))\n          ctx.objs.push_back(file);\n        break;\n      case FileType::ELF_DSO:\n        Warn(ctx) << mf->name << \"(\" << child->name\n                  << \"): shared object file in an archive is ignored\";\n        break;\n      default:\n        break;\n      }\n    }\n    return;\n  case FileType::TEXT:\n    Script(ctx, rctx, mf).parse_linker_script();\n    return;\n  case FileType::GCC_LTO_OBJ:\n  case FileType::LLVM_BITCODE:\n    if (ObjectFile<E> *file = new_lto_obj(ctx, rctx, mf, \"\"))\n      ctx.objs.push_back(file);\n    return;\n  default:\n    Fatal(ctx) << mf->name << \": unknown file type\";\n  }\n}\n\ntemplate <typename E>\nstatic std::string_view\ndetect_machine_type(Context<E> &ctx, std::vector<std::string> args) {\n  for (ReaderContext rctx; const std::string &arg : args) {\n    if (arg == \"--Bstatic\") {\n      rctx.static_ = true;\n    } else if (arg == \"--Bdynamic\") {\n      rctx.static_ = false;\n    } else if (!arg.starts_with('-')) {\n      if (MappedFile *mf = open_file(ctx, arg))\n        if (get_file_type(ctx, mf) != FileType::TEXT)\n          if (std::string_view target = get_machine_type(ctx, rctx, mf);\n              !target.empty())\n            return target;\n    }\n  }\n\n  for (ReaderContext rctx; const std::string &arg : args) {\n    if (arg == \"--Bstatic\") {\n      rctx.static_ = true;\n    } else if (arg == \"--Bdynamic\") {\n      rctx.static_ = false;\n    } else if (!arg.starts_with('-')) {\n      if (MappedFile *mf = open_file(ctx, arg))\n        if (get_file_type(ctx, mf) == FileType::TEXT)\n          if (std::string_view target =\n              Script(ctx, rctx, mf).get_script_output_type();\n              !target.empty())\n            return target;\n    }\n  }\n\n  Fatal(ctx) << \"-m option is missing\";\n}\n\ntemplate <typename E>\nMappedFile *open_library(Context<E> &ctx, ReaderContext &rctx, std::string path) {\n  MappedFile *mf = open_file(ctx, path);\n  if (!mf)\n    return nullptr;\n\n  std::string_view target = get_machine_type(ctx, rctx, mf);\n  if (!target.empty() && target != E::name) {\n    Warn(ctx) << path << \": skipping incompatible file: \" << target\n              << \" (e_machine \" << (int)E::e_machine << \")\";\n    return nullptr;\n  }\n  return mf;\n}\n\ntemplate <typename E>\nMappedFile *find_library(Context<E> &ctx, ReaderContext &rctx, std::string name) {\n  if (name.starts_with(':')) {\n    for (std::string_view dir : ctx.arg.library_paths) {\n      std::string path = std::string(dir) + \"/\" + name.substr(1);\n      if (MappedFile *mf = open_library(ctx, rctx, path))\n        return mf;\n    }\n    Fatal(ctx) << \"library not found: \" << name;\n  }\n\n  for (std::string_view dir : ctx.arg.library_paths) {\n    std::string stem = std::string(dir) + \"/lib\" + name;\n    if (!rctx.static_)\n      if (MappedFile *mf = open_library(ctx, rctx, stem + \".so\"))\n        return mf;\n    if (MappedFile *mf = open_library(ctx, rctx, stem + \".a\"))\n      return mf;\n  }\n  Fatal(ctx) << \"library not found: \" << name;\n}\n\ntemplate <typename E>\nstatic void read_input_files(Context<E> &ctx, std::span<std::string> args) {\n  Timer t(ctx, \"read_input_files\");\n\n  ReaderContext rctx;\n  std::vector<ReaderContext> stack;\n  std::unordered_set<std::string_view> visited;\n\n  tbb::task_group tg;\n  rctx.tg = &tg;\n\n  while (!args.empty()) {\n    std::string_view arg = args[0];\n    args = args.subspan(1);\n\n    if (arg == \"--as-needed\") {\n      rctx.as_needed = true;\n    } else if (arg == \"--no-as-needed\") {\n      rctx.as_needed = false;\n    } else if (arg == \"--whole-archive\") {\n      rctx.whole_archive = true;\n    } else if (arg == \"--no-whole-archive\") {\n      rctx.whole_archive = false;\n    } else if (arg == \"--Bstatic\") {\n      rctx.static_ = true;\n    } else if (arg == \"--Bdynamic\") {\n      rctx.static_ = false;\n    } else if (arg == \"--start-lib\") {\n      rctx.in_lib = true;\n    } else if (arg == \"--end-lib\") {\n      rctx.in_lib = false;\n    } else if (arg == \"--push-state\") {\n      stack.push_back(rctx);\n    } else if (arg == \"--pop-state\") {\n      if (stack.empty())\n        Fatal(ctx) << \"no state pushed before popping\";\n      rctx = stack.back();\n      stack.pop_back();\n    } else if (arg.starts_with(\"-l\")) {\n      arg = arg.substr(2);\n      if (visited.contains(arg))\n        continue;\n      visited.insert(arg);\n\n      MappedFile *mf = find_library(ctx, rctx, std::string(arg));\n      mf->given_fullpath = false;\n      read_file(ctx, rctx, mf);\n    } else {\n      read_file(ctx, rctx, must_open_file(ctx, std::string(arg)));\n    }\n  }\n\n  if (ctx.objs.empty() && ctx.dsos.empty())\n    Fatal(ctx) << \"no input files\";\n\n  if (rctx.static_ || ctx.arg.relocatable) {\n    ctx.arg.static_ = true;\n    ctx.arg.dynamic_linker = \"\";\n  }\n\n  tg.wait();\n}\n\ntemplate <typename E>\nstatic bool has_lto_obj(Context<E> &ctx) {\n  for (ObjectFile<E> *file : ctx.objs)\n    if (file->is_reachable && (file->is_lto_obj || file->is_gcc_offload_obj))\n      return true;\n  return false;\n}\n\ntemplate <typename E>\nstatic i64 get_thread_count(Context<E> &ctx) {\n  if (ctx.arg.thread_count.has_value())\n    return *ctx.arg.thread_count;\n\n  // mold doesn't scale well with too many threads, so limit it to 32.\n  int n = tbb::global_control::active_value(\n    tbb::global_control::max_allowed_parallelism);\n  return std::min(n, 32);\n}\n\ntemplate <typename E>\nint mold_main(int argc, char **argv) {\n  Context<E> ctx;\n\n  // Process -run option first. process_run_subcommand() does not return.\n  if (argc >= 2 && (argv[1] == \"-run\"sv || argv[1] == \"--run\"sv))\n    process_run_subcommand(ctx, argc, argv);\n\n  // Parse non-positional command line options\n  ctx.cmdline_args = expand_response_files(ctx, argv);\n  std::vector<std::string> file_args = parse_nonpositional_args(ctx);\n\n  // If no -m option is given, deduce it from input files.\n  if (ctx.arg.emulation.empty())\n    ctx.arg.emulation = detect_machine_type(ctx, file_args);\n\n  // Redo if -m does not match with our speculation.\n  if (ctx.arg.emulation != E::name)\n    return redo_main<E>(ctx.arg.emulation, argc, argv);\n\n  Timer t_all(ctx, \"all\");\n\n  install_signal_handler();\n\n  // Fork a subprocess unless --no-fork is given.\n  if (ctx.arg.fork)\n    fork_child<E>();\n\n  acquire_global_lock();\n\n  ctx.global_limit.emplace(tbb::global_control::max_allowed_parallelism,\n                           get_thread_count(ctx));\n\n  // Handle --wrap options if any.\n  for (std::string_view name : ctx.arg.wrap)\n    get_symbol(ctx, name)->is_wrapped = true;\n\n  // Handle --retain-symbols-file options if any.\n  if (ctx.arg.retain_symbols_file)\n    for (Symbol<E> *sym : *ctx.arg.retain_symbols_file)\n      sym->write_to_symtab = true;\n\n  for (std::string_view arg : ctx.arg.trace_symbol)\n    get_symbol(ctx, arg)->is_traced = true;\n\n  // Parse input files\n  read_input_files(ctx, file_args);\n\n  // Uniquify shared object files by soname\n  {\n    std::unordered_set<std::string_view> seen;\n    std::erase_if(ctx.dsos, [&](SharedFile<E> *file) {\n      return !seen.insert(file->soname).second;\n    });\n  }\n\n  // Handle -repro\n  if (ctx.arg.repro)\n    write_repro_file(ctx);\n\n  Timer t_before_copy(ctx, \"before_copy\");\n\n  // Apply -exclude-libs\n  apply_exclude_libs(ctx);\n\n  // Create a dummy file containing linker-synthesized symbols.\n  if (!ctx.arg.relocatable)\n    create_internal_file(ctx);\n\n  // Resolve symbols by choosing the most appropriate file for each\n  // symbol. This pass also removes redundant comdat sections (e.g.\n  // duplicate inline functions).\n  resolve_symbols(ctx);\n\n  // If there's an object file compiled with -flto, do link-time\n  // optimization.\n  if (has_lto_obj(ctx))\n    do_lto(ctx);\n\n  // Now that we know which object files are to be included to the\n  // final output, we can remove unnecessary files.\n  std::erase_if(ctx.objs, [](InputFile<E> *file) { return !file->is_reachable; });\n  std::erase_if(ctx.dsos, [](InputFile<E> *file) { return !file->is_reachable; });\n\n  // Parse .eh_frame section contents.\n  parse_eh_frame_sections(ctx);\n\n  // Split mergeable section contents into section pieces.\n  create_merged_sections(ctx);\n\n  // Handle --relocatable. Since the linker's behavior is quite different\n  // from the normal one when the option is given, the logic is implemented\n  // to a separate file.\n  if (ctx.arg.relocatable) {\n    combine_objects(ctx);\n    return 0;\n  }\n\n  // Create .bss sections for common symbols.\n  convert_common_symbols(ctx);\n\n  // Apply version scripts.\n  apply_version_script(ctx);\n\n  // Parse symbol version suffixes (e.g. \"foo@ver1\").\n  parse_symbol_version(ctx);\n\n  // Set is_imported and is_exported bits for each symbol.\n  compute_import_export(ctx);\n\n  // Make sure that there's no duplicate symbol\n  if (!ctx.arg.allow_multiple_definition)\n    check_duplicate_symbols(ctx);\n\n  // Handle --zero-to-bss, which converts data sections containing only\n  // zeros into BSS.\n  if (ctx.arg.zero_to_bss)\n    convert_zero_to_bss(ctx);\n\n  // Set \"address-taken\" bits for input sections.\n  if (ctx.arg.icf)\n    compute_address_significance(ctx);\n\n  // Handle PPC64-specific .opd sections.\n  if constexpr (is_ppc64v1<E>)\n    ppc64v1_rewrite_opd(ctx);\n\n  // Garbage-collect unreachable sections.\n  if (ctx.arg.gc_sections)\n    gc_sections(ctx);\n\n  // Merge identical read-only sections.\n  if (ctx.arg.icf)\n    icf_sections(ctx);\n\n  // Create linker-synthesized sections such as .got or .plt.\n  create_synthetic_sections(ctx);\n\n  // Handle --no-allow-shlib-undefined\n  if (!ctx.arg.allow_shlib_undefined)\n    check_shlib_undefined(ctx);\n\n  // Warn if symbols with different types are defined under the same name.\n  check_symbol_types(ctx);\n\n  // Bin input sections into output sections.\n  create_output_sections(ctx);\n\n  // Convert an .ARM.exidx to a synthetic section.\n  if constexpr (is_arm32<E>)\n    create_arm_exidx_section(ctx);\n\n  // Handle --section-align options.\n  if (!ctx.arg.section_align.empty())\n    apply_section_align(ctx);\n\n  // Add synthetic symbols such as __ehdr_start or __end.\n  add_synthetic_symbols(ctx);\n\n  // Beyond this point, no new files will be added to ctx.objs\n  // or ctx.dsos.\n\n  // Handle `-z cet-report`.\n  if (ctx.arg.z_cet_report != CET_REPORT_NONE)\n    check_cet_errors(ctx);\n\n  // Handle `-z execstack-if-needed`.\n  if (ctx.arg.z_execstack_if_needed)\n    for (ObjectFile<E> *file : ctx.objs)\n      if (file->needs_executable_stack)\n        ctx.arg.z_execstack = true;\n\n  // If we are linking a .so file, remaining undefined symbols does\n  // not cause a linker error. Instead, they are treated as if they\n  // were imported symbols.\n  //\n  // If we are linking an executable, weak undefs are converted to\n  // weakly imported symbols so that they'll have another chance to be\n  // resolved.\n  claim_unresolved_symbols(ctx);\n\n  // Beyond this point, no new symbols will be added to the result.\n\n  // Handle --print-dependencies\n  if (ctx.arg.print_dependencies)\n    print_dependencies(ctx);\n\n  // Handle --require-defined\n  for (Symbol<E> *sym : ctx.arg.require_defined)\n    if (!sym->file)\n      Error(ctx) << \"--require-defined: undefined symbol: \" << *sym;\n\n  // .init_array and .fini_array contents have to be sorted by\n  // a special rule. Sort them.\n  sort_init_fini(ctx);\n\n  // Likewise, .ctors and .dtors have to be sorted. They are rare\n  // because they are superceded by .init_array/.fini_array, though.\n  sort_ctor_dtor(ctx);\n\n  // If .ctors/.dtors are to be placed to .init_array/.fini_array,\n  // we need to reverse their contents.\n  fixup_ctors_in_init_array(ctx);\n\n  // Handle --shuffle-sections\n  if (ctx.arg.shuffle_sections != SHUFFLE_SECTIONS_NONE)\n    shuffle_sections(ctx);\n\n  // Copy string referred by .dynamic to .dynstr.\n  add_dynamic_strings(ctx);\n\n  if constexpr (is_ppc64v1<E>)\n    ppc64v1_scan_symbols(ctx);\n\n  // Scan relocations to find symbols that need entries in .got, .plt,\n  // .got.plt, .dynsym, .dynstr, etc.\n  scan_relocations(ctx);\n\n  // Compute the is_weak bit for each imported symbol.\n  compute_imported_symbol_weakness(ctx);\n\n  // Sort sections by section attributes so that we'll have to\n  // create as few segments as possible.\n  sort_output_sections(ctx);\n\n  // Handle --separate-debug-file.\n  if (ctx.gnu_debuglink)\n    separate_debug_sections(ctx);\n\n  // Compute sizes of output sections while assigning offsets\n  // within an output section to input sections.\n  compute_section_sizes(ctx);\n\n  // If --packed_dyn_relocs=relr was given, base relocations are stored\n  // to a .relr.dyn section in a compressed form. Construct a compressed\n  // relocations now so that we can fix section sizes and file layout.\n  if (ctx.arg.pack_dyn_relocs_relr)\n    construct_relr(ctx);\n\n  // Reserve a space for dynamic symbol strings in .dynstr and sort\n  // .dynsym contents if necessary. Beyond this point, no symbol will\n  // be added to .dynsym.\n  sort_dynsyms(ctx);\n\n  // Sort .debug_info contents so that DWARF32 debug info precedes that of\n  // DWARF64. This is to mitigate the possibility of a relocation overflow.\n  sort_debug_info_sections(ctx);\n\n  // Print reports about undefined symbols, if needed.\n  if (ctx.arg.unresolved_symbols == UNRESOLVED_ERROR)\n    report_undef_errors(ctx);\n\n  // Fill .gnu.version_d section contents.\n  if (ctx.verdef)\n    ctx.verdef->construct(ctx);\n\n  // Fill .gnu.version_r section contents.\n  ctx.verneed->construct(ctx);\n\n  // .eh_frame is a special section from the linker's point of view,\n  // as its contents are parsed and reconstructed by the linker,\n  // unlike other sections that are regarded as opaque bytes.\n  // Here, we construct output .eh_frame contents.\n  ctx.eh_frame->construct(ctx);\n\n  // If --emit-relocs is given, we'll copy relocation sections from input\n  // files to an output file.\n  if (ctx.arg.emit_relocs)\n    create_reloc_sections(ctx);\n\n  // Compute .symtab and .strtab sizes for each file.\n  if (!ctx.arg.strip_all)\n    create_output_symtab(ctx);\n\n  // Compute the section header values for all sections.\n  compute_section_headers(ctx);\n\n  // Assign offsets to output sections\n  i64 filesize = set_osec_offsets(ctx);\n\n  // On RISC-V, branches are encode using multiple instructions so\n  // that they can jump to anywhere in ±2 GiB by default. They may\n  // be replaced with shorter instruction sequences if destinations\n  // are close enough. Do this optimization.\n  if constexpr (is_riscv<E> || is_loongarch<E>) {\n    shrink_sections(ctx);\n    filesize = set_osec_offsets(ctx);\n  }\n\n  // We've created range extension thunks with a pessimistive assumption\n  // that all out-of-section references are out of range. Now that we know\n  // the addresses of all sections,, we can eliminate excessive thunks.\n  if constexpr (needs_thunk<E>) {\n    remove_redundant_thunks(ctx);\n    filesize = set_osec_offsets(ctx);\n  }\n\n  if constexpr (is_arm32<E>) {\n    if (ctx.extra.exidx) {\n      ctx.extra.exidx->remove_duplicate_entries(ctx);\n      filesize = set_osec_offsets(ctx);\n    }\n  }\n\n  // At this point, memory layout is fixed.\n\n  // Set actual addresses to linker-synthesized symbols.\n  fix_synthetic_symbols(ctx);\n\n  // Beyond this, you can assume that symbol addresses including their\n  // GOT or PLT addresses have a correct final value.\n\n  // If --compress-debug-sections is given, compress .debug_* sections\n  // using zlib or zstd.\n  if (ctx.arg.compress_debug_sections != ELFCOMPRESS_NONE) {\n    compress_debug_sections(ctx);\n    filesize = set_osec_offsets(ctx);\n  }\n\n  // At this point, both memory and file layouts are fixed.\n\n  // Gather thunk symbols and attach them to themselves.\n  if constexpr (needs_thunk<E>)\n    gather_thunk_addresses(ctx);\n\n  t_before_copy.stop();\n\n  // Create an output file\n  ctx.output_file = OutputFile<E>::open(ctx, ctx.arg.output, filesize, 0777);\n  ctx.buf = ctx.output_file->buf;\n\n  Timer t_copy(ctx, \"copy\");\n\n  // Copy input sections to the output file and apply relocations.\n  copy_chunks(ctx);\n\n  if constexpr (is_arm32be<E>)\n    arm32be_swap_bytes(ctx);\n\n  if constexpr (is_x86_64<E>)\n    if (ctx.arg.z_rewrite_endbr)\n      rewrite_endbr(ctx);\n\n  // Dynamic linker works better with sorted .rela.dyn section,\n  // so we sort them.\n  sort_reldyn(ctx);\n\n  // .gdb_index's contents cannot be constructed before applying\n  // relocations to other debug sections. We have relocated debug\n  // sections now, so write the .gdb_index section.\n  if (ctx.gdb_index && !ctx.gnu_debuglink)\n    write_gdb_index(ctx);\n\n  // .note.gnu.build-id section contains a cryptographic hash of the\n  // entire output file. Now that we wrote everything except build-id,\n  // we can compute it.\n  if (ctx.buildid)\n    write_build_id(ctx);\n\n  if (ctx.gnu_debuglink)\n    write_gnu_debuglink(ctx);\n\n  t_copy.stop();\n  ctx.checkpoint();\n\n  // Close the output file. This is the end of the linker's main job.\n  ctx.output_file->close(ctx);\n\n  // Handle --dependency-file\n  if (!ctx.arg.dependency_file.empty())\n    write_dependency_file(ctx);\n\n  if (!ctx.arg.plugin.empty())\n    lto_cleanup(ctx);\n\n  t_all.stop();\n\n  if (ctx.arg.print_map)\n    print_map(ctx);\n\n  if (ctx.gnu_debuglink)\n    write_separate_debug_file(ctx);\n\n  // Show stats numbers\n  if (ctx.arg.stats)\n    show_stats(ctx);\n\n  if (ctx.arg.perf)\n    print_timer_records(ctx.timer_records);\n\n  std::cout << std::flush;\n  std::cerr << std::flush;\n\n  notify_parent<E>();\n  release_global_lock();\n\n  if (ctx.arg.quick_exit)\n    _exit(0);\n\n  for (std::function<void()> &fn : ctx.on_exit)\n    fn();\n  ctx.checkpoint();\n  return 0;\n}\n\nusing E = MOLD_TARGET;\n\ntemplate int mold_main<E>(int, char **);\n\n} // namespace mold\n"
  },
  {
    "path": "src/mapfile.cc",
    "content": "#include \"mold.h\"\n\n#include <fstream>\n#include <iomanip>\n#include <ios>\n#include <sstream>\n#include <tbb/concurrent_hash_map.h>\n#include <tbb/parallel_for_each.h>\n\nnamespace mold {\n\ntemplate <typename E>\nusing Map =\n  tbb::concurrent_hash_map<InputSection<E> *, std::vector<Symbol<E> *>>;\n\ntemplate <typename E>\nstatic Map<E> get_map(Context<E> &ctx) {\n  Map<E> map;\n\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    for (Symbol<E> *sym : file->symbols) {\n      if (sym->file == file && sym->get_type() != STT_SECTION) {\n        if (InputSection<E> *isec = sym->get_input_section()) {\n          typename Map<E>::accessor acc;\n          map.insert(acc, {isec, {}});\n          acc->second.push_back(sym);\n        }\n      }\n    }\n  });\n\n  if (map.size() <= 1)\n    return map;\n\n  tbb::parallel_for(map.range(), [](const typename Map<E>::range_type &range) {\n    for (auto &[k, v] : range)\n      ranges::stable_sort(v, {}, &Symbol<E>::value);\n  });\n  return map;\n}\n\ntemplate <typename E>\nvoid print_map(Context<E> &ctx) {\n  Timer t(ctx, \"print_map\");\n\n  std::ostream *out = &std::cout;\n  std::ofstream file;\n\n  if (!ctx.arg.Map.empty() && ctx.arg.Map != \"-\") {\n    file.open(ctx.arg.Map);\n    if (file.fail())\n      Fatal(ctx) << \"--print-map: cannot open \" << ctx.arg.Map << \": \"\n                 << errno_string();\n    out = &file;\n  }\n\n  // Construct a section-to-symbol map.\n  Map<E> map = get_map(ctx);\n\n  // Print a mapfile.\n  *out << \"               VMA       Size Align Out     In      Symbol\\n\";\n\n  for (Chunk<E> *chunk : ctx.chunks) {\n    *out << std::showbase\n         << std::setw(18) << std::hex << (u64)chunk->shdr.sh_addr << std::dec\n         << std::setw(11) << (u64)chunk->shdr.sh_size\n         << std::setw(6) << (u64)chunk->shdr.sh_addralign\n         << \" \" << chunk->name << \"\\n\";\n\n    OutputSection<E> *osec = chunk->to_osec();\n    if (!osec)\n      continue;\n\n    std::span<InputSection<E> *> members = osec->members;\n    std::vector<std::string> bufs(members.size());\n\n    tbb::parallel_for((i64)0, (i64)members.size(), [&](i64 i) {\n      InputSection<E> *mem = members[i];\n      std::ostringstream ss;\n\n      u64 addr = 0;\n      if (osec->shdr.sh_flags & SHF_ALLOC)\n        addr = osec->shdr.sh_addr + mem->offset;\n\n      ss << std::showbase\n         << std::setw(18) << std::hex << addr << std::dec\n         << std::setw(11) << (u64)mem->sh_size\n         << std::setw(6) << (1 << mem->p2align)\n         << \"         \" << *mem << \"\\n\";\n\n      typename Map<E>::const_accessor acc;\n      if (map.find(acc, mem))\n        for (Symbol<E> *sym : acc->second)\n          ss << std::showbase\n             << std::setw(18) << std::hex << sym->get_addr(ctx) << std::dec\n             << \"          0     0                 \"\n             << *sym << \"\\n\";\n\n      bufs[i] = ss.str();\n    });\n\n    for (std::string &str : bufs)\n      *out << str;\n  }\n}\n\nusing E = MOLD_TARGET;\n\ntemplate void print_map(Context<E> &ctx);\n\n} // namespace mold\n"
  },
  {
    "path": "src/mapped-file-unix.cc",
    "content": "#include \"mold.h\"\n\nnamespace mold {\n\nMappedFile *open_file_impl(const std::string &path, std::string &error) {\n  i64 fd = ::open(path.c_str(), O_RDONLY);\n  if (fd == -1) {\n    if (errno != ENOENT)\n      error = \"opening \" + path + \" failed: \" + errno_string();\n    return nullptr;\n  }\n\n  struct stat st;\n  if (fstat(fd, &st) == -1)\n    error = path + \": fstat failed: \" + errno_string();\n\n  MappedFile *mf = new MappedFile;\n  mf->name = path;\n  mf->size = st.st_size;\n\n  if (st.st_size > 0) {\n    mf->data = (u8 *)mmap(nullptr, st.st_size, PROT_READ | PROT_WRITE,\n                          MAP_PRIVATE, fd, 0);\n    if (mf->data == MAP_FAILED)\n      error = path + \": mmap failed: \" + errno_string();\n  }\n\n  close(fd);\n  return mf;\n}\n\nvoid MappedFile::unmap() {\n  if (size == 0 || parent || !data)\n    return;\n  munmap(data, size);\n  data = nullptr;\n}\n\nvoid MappedFile::close_fd() {\n  if (fd == -1)\n    return;\n  close(fd);\n  fd = -1;\n}\n\nvoid MappedFile::reopen_fd(const std::string &path) {\n  if (fd == -1)\n    fd = open(path.c_str(), O_RDONLY);\n}\n\n} // namespace mold\n"
  },
  {
    "path": "src/mapped-file-win32.cc",
    "content": "#include \"mold.h\"\n\nnamespace mold {\n\nMappedFile *open_file_impl(const std::string &path, std::string &error) {\n  HANDLE fd = CreateFileA(path.c_str(), GENERIC_READ,\n                          FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,\n                          nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);\n\n  if (fd == INVALID_HANDLE_VALUE) {\n    auto err = GetLastError();\n    if (err != ERROR_FILE_NOT_FOUND)\n      error = \"opening \" + path + \" failed: \" + errno_string();\n    return nullptr;\n  }\n\n  if (GetFileType(fd) != FILE_TYPE_DISK) {\n    CloseHandle(fd);\n    return nullptr;\n  }\n\n  DWORD size_hi;\n  DWORD size_lo = GetFileSize(fd, &size_hi);\n\n  if (size_lo == INVALID_FILE_SIZE) {\n    error = path + \": GetFileSize failed: \" + errno_string();\n    return nullptr;\n  }\n\n  u64 size = ((u64)size_hi << 32) + size_lo;\n\n  MappedFile *mf = new MappedFile;\n  mf->name = path;\n  mf->size = size;\n  mf->fd = fd;\n\n  if (size > 0) {\n    HANDLE h = CreateFileMapping(fd, nullptr, PAGE_READONLY, 0, size, nullptr);\n    if (!h) {\n      error = path + \": CreateFileMapping failed: \" + errno_string();\n      return nullptr;\n    }\n\n    mf->data = (u8 *)MapViewOfFile(h, FILE_MAP_COPY, 0, 0, size);\n    CloseHandle(h);\n\n    if (!mf->data) {\n      error = path + \": MapViewOfFile failed: \" + errno_string();\n      return nullptr;\n    }\n  }\n\n  return mf;\n}\n\nvoid MappedFile::unmap() {\n  if (size == 0 || parent || !data)\n    return;\n\n  UnmapViewOfFile(data);\n  if (fd != INVALID_HANDLE_VALUE)\n    CloseHandle(fd);\n\n  data = nullptr;\n}\n\nvoid MappedFile::close_fd() {\n  if (fd == INVALID_HANDLE_VALUE)\n    return;\n  CloseHandle(fd);\n  fd = INVALID_HANDLE_VALUE;\n}\n\nvoid MappedFile::reopen_fd(const std::string &path) {\n  if (fd == INVALID_HANDLE_VALUE)\n    fd = CreateFileA(path.c_str(), GENERIC_READ,\n                     FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,\n                     nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);\n}\n\n} // namespace mold\n"
  },
  {
    "path": "src/mold-wrapper.c",
    "content": "#define _GNU_SOURCE 1\n\n#include <dlfcn.h>\n#include <spawn.h>\n#include <stdarg.h>\n#include <stdbool.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <unistd.h>\n\n#if __has_include(<alloca.h>)\n# include <alloca.h>\n#endif\n\nextern char **environ;\n\nstatic char *get_mold_path() {\n  char *path = getenv(\"MOLD_PATH\");\n  if (path)\n    return path;\n  fprintf(stderr, \"MOLD_PATH is not set\\n\");\n  exit(1);\n}\n\nstatic void debug_print(const char *fmt, ...) {\n  if (!getenv(\"MOLD_WRAPPER_DEBUG\"))\n    return;\n\n  va_list ap;\n  va_start(ap, fmt);\n  fprintf(stderr, \"mold-wrapper.so: \");\n  vfprintf(stderr, fmt, ap);\n  fflush(stderr);\n  va_end(ap);\n}\n\nstatic int count_args(va_list *ap) {\n  va_list aq;\n  va_copy(aq, *ap);\n\n  int i = 0;\n  while (va_arg(aq, char *))\n    i++;\n  va_end(aq);\n  return i;\n}\n\nstatic void copy_args(char **argv, const char *arg0, va_list *ap) {\n  int i = 1;\n  char *arg;\n  while ((arg = va_arg(*ap, char *)))\n    argv[i++] = arg;\n\n  ((const char **)argv)[0] = arg0;\n  ((const char **)argv)[i] = NULL;\n}\n\nstatic bool is_ld(const char *path) {\n  const char *ptr = path + strlen(path);\n  while (path < ptr && ptr[-1] != '/')\n    ptr--;\n\n  return !strcmp(ptr, \"ld\") || !strcmp(ptr, \"ld.lld\") ||\n         !strcmp(ptr, \"ld.gold\") || !strcmp(ptr, \"ld.bfd\") ||\n         !strcmp(ptr, \"ld.mold\");\n}\n\nint execvpe(const char *file, char *const *argv, char *const *envp) {\n  debug_print(\"execvpe %s\\n\", file);\n\n  if (!strcmp(file, \"ld\") || is_ld(file))\n    file = get_mold_path();\n\n  for (int i = 0; envp[i]; i++)\n    putenv(envp[i]);\n\n  typeof(execvpe) *real = dlsym(RTLD_NEXT, \"execvp\");\n  return real(file, argv, environ);\n}\n\nint execve(const char *path, char *const *argv, char *const *envp) {\n  debug_print(\"execve %s\\n\", path);\n  if (is_ld(path))\n    path = get_mold_path();\n  typeof(execve) *real = dlsym(RTLD_NEXT, \"execve\");\n  return real(path, argv, envp);\n}\n\nint execl(const char *path, const char *arg0, ...) {\n  va_list ap;\n  va_start(ap, arg0);\n  char **argv = alloca((count_args(&ap) + 2) * sizeof(char *));\n  copy_args(argv, arg0, &ap);\n  va_end(ap);\n  return execve(path, argv, environ);\n}\n\nint execlp(const char *file, const char *arg0, ...) {\n  va_list ap;\n  va_start(ap, arg0);\n  char **argv = alloca((count_args(&ap) + 2) * sizeof(char *));\n  copy_args(argv, arg0, &ap);\n  va_end(ap);\n  return execvpe(file, argv, environ);\n}\n\nint execle(const char *path, const char *arg0, ...) {\n  va_list ap;\n  va_start(ap, arg0);\n  char **argv = alloca((count_args(&ap) + 2) * sizeof(char *));\n  copy_args(argv, arg0, &ap);\n  char **env = va_arg(ap, char **);\n  va_end(ap);\n  return execve(path, argv, env);\n}\n\nint execv(const char *path, char *const *argv) {\n  return execve(path, argv, environ);\n}\n\nint execvp(const char *file, char *const *argv) {\n  return execvpe(file, argv, environ);\n}\n\nint posix_spawn(pid_t *pid, const char *path,\n                const posix_spawn_file_actions_t *file_actions,\n                const posix_spawnattr_t *attrp,\n                char *const *argv, char *const *envp) {\n  debug_print(\"posix_spawn %s\\n\", path);\n  if (is_ld(path))\n    path = get_mold_path();\n  typeof(posix_spawn) *real = dlsym(RTLD_NEXT, \"posix_spawn\");\n  return real(pid, path, file_actions, attrp, argv, envp);\n}\n\nint posix_spawnp(pid_t *pid, const char *file,\n\t\t const posix_spawn_file_actions_t *file_actions,\n\t\t const posix_spawnattr_t *attrp,\n\t\t char *const *argv, char *const *envp) {\n  debug_print(\"posix_spawnp %s\\n\", file);\n  if (is_ld(file))\n    file = get_mold_path();\n  typeof(posix_spawnp) *real = dlsym(RTLD_NEXT, \"posix_spawnp\");\n  return real(pid, file, file_actions, attrp, argv, envp);\n}\n"
  },
  {
    "path": "src/mold.h",
    "content": "#pragma once\n\n#include \"../lib/lib.h\"\n#include \"elf.h\"\n\n#include <cassert>\n#include <cstdint>\n#include <functional>\n#include <iostream>\n#include <map>\n#include <memory>\n#include <mutex>\n#include <optional>\n#include <span>\n#include <string>\n#include <string_view>\n#include <tbb/concurrent_hash_map.h>\n#include <tbb/concurrent_vector.h>\n#include <tbb/global_control.h>\n#include <tbb/spin_mutex.h>\n#include <tbb/task_group.h>\n#include <type_traits>\n#include <unordered_map>\n#include <unordered_set>\n#include <variant>\n#include <vector>\n\n#ifndef _WIN32\n# include <unistd.h>\n#endif\n\n#if ENABLE_MSAN_UNPOISON\nextern \"C\" void __msan_unpoison(void *, size_t);\n# define msan_unpoison(addr, sz) __msan_unpoison(addr, sz)\n#else\n# define msan_unpoison(addr, sz)\n#endif\n\nnamespace mold {\n\ntemplate <typename E> class InputFile;\ntemplate <typename E> class InputSection;\ntemplate <typename E> class MergedSection;\ntemplate <typename E> class ObjectFile;\ntemplate <typename E> class Chunk;\ntemplate <typename E> class OutputSection;\ntemplate <typename E> class SharedFile;\ntemplate <typename E> class Symbol;\ntemplate <typename E> struct CieRecord;\ntemplate <typename E> struct Context;\ntemplate <typename E> struct FdeRecord;\ntemplate <typename E> class MergeableSection;\ntemplate <typename E> class RelocSection;\n\nstruct ReaderContext;\n\ntemplate <typename E>\nstd::ostream &operator<<(std::ostream &out, const Symbol<E> &sym);\n\nextern std::string mold_version;\n\n//\n// error.cc\n//\n\n// Some C++ stdlibs don't support std::osyncstream even though\n// it's is in the C++20 standard. So we implement it ourselves.\nclass SyncStream {\npublic:\n  SyncStream(std::ostream &out) : out(out) {}\n  ~SyncStream() { emit(); }\n\n  void emit() {\n    if (!emitted) {\n      std::scoped_lock lock(mu);\n      out << ss.str() << '\\n';\n      emitted = true;\n    }\n  }\n\n  template <typename T> SyncStream &operator<<(T &&val) {\n    ss << std::forward<T>(val);\n    return *this;\n  }\n\nprivate:\n  std::ostream &out;\n  std::stringstream ss;\n  bool emitted = false;\n  static inline std::mutex mu;\n};\n\ntemplate <typename E>\nclass Out {\npublic:\n  Out(Context<E> &ctx) {}\n\n  template <typename T> Out &operator<<(T &&val) {\n    out << std::forward<T>(val);\n    return *this;\n  }\n\nprivate:\n  SyncStream out{std::cout};\n};\n\ntemplate <typename E>\nclass Fatal {\npublic:\n  Fatal(Context<E> &ctx);\n  [[noreturn]] ~Fatal();\n\n  template <typename T> Fatal &operator<<(T &&val) {\n    out << std::forward<T>(val);\n    return *this;\n  }\n\nprivate:\n  SyncStream out{std::cerr};\n};\n\ntemplate <typename E>\nclass Error {\npublic:\n  Error(Context<E> &ctx);\n\n  template <typename T> Error &operator<<(T &&val) {\n    out << std::forward<T>(val);\n    return *this;\n  }\n\nprivate:\n  SyncStream out{std::cerr};\n};\n\ntemplate <typename E>\nclass Warn {\npublic:\n  Warn(Context<E> &ctx);\n\n  template <typename T> Warn &operator<<(T &&val) {\n    if (out)\n      *out << std::forward<T>(val);\n    return *this;\n  }\n\nprivate:\n  std::optional<SyncStream> out;\n};\n\n//\n// signal-unix.cc\n//\n\ninline char *output_tmpfile = nullptr;\ninline u8 *output_buffer_start = nullptr;\ninline u8 *output_buffer_end = nullptr;\n\nstd::string errno_string();\nvoid cleanup();\nvoid install_signal_handler();\n\n//\n// mapped-file-unix.cc\n//\n\n// MappedFile represents an mmap'ed input file.\n// mold uses mmap-IO only.\nclass MappedFile {\npublic:\n  ~MappedFile() { unmap(); }\n  void unmap();\n  void close_fd();\n  void reopen_fd(const std::string &path);\n\n  template <typename E>\n  MappedFile *slice(Context<E> &ctx, std::string name, u64 start, u64 size) {\n    MappedFile *mf = new MappedFile;\n    mf->name = name;\n    mf->data = data + start;\n    mf->size = size;\n    mf->parent = this;\n\n    ctx.mf_pool.emplace_back(mf);\n    return mf;\n  }\n\n  std::string_view get_contents() {\n    return std::string_view((char *)data, size);\n  }\n\n  i64 get_offset() const {\n    return parent ? (data - parent->data + parent->get_offset()) : 0;\n  }\n\n  // Returns a string that uniquely identify a file that is possibly\n  // in an archive.\n  std::string get_identifier() const {\n    if (parent) {\n      // We use the file offset within an archive as an identifier\n      // because archive members may have the same name.\n      return parent->name + \":\" + std::to_string(get_offset());\n    }\n\n    if (thin_parent) {\n      // If this is a thin archive member, the filename part is\n      // guaranteed to be unique.\n      return thin_parent->name + \":\" + name;\n    }\n    return name;\n  }\n\n  std::string name;\n  u8 *data = nullptr;\n  i64 size = 0;\n  bool given_fullpath = true;\n  MappedFile *parent = nullptr;\n  MappedFile *thin_parent = nullptr;\n\n  // For --dependency-file\n  bool is_dependency = true;\n\n#ifdef _WIN32\n  HANDLE fd = INVALID_HANDLE_VALUE;\n#else\n  int fd = -1;\n#endif\n};\n\nMappedFile *open_file_impl(const std::string &path, std::string &error);\n\ntemplate <typename E>\nMappedFile *open_file(Context<E> &ctx, std::string path) {\n  if (path.starts_with('/') && !ctx.arg.chroot.empty())\n    path = ctx.arg.chroot + \"/\" + path_clean(path);\n\n  std::string error;\n  MappedFile *mf = open_file_impl(path, error);\n  if (!error.empty())\n    Fatal(ctx) << error;\n\n  if (mf)\n    ctx.mf_pool.emplace_back(mf);\n  return mf;\n}\n\ntemplate <typename E>\nMappedFile *must_open_file(Context<E> &ctx, std::string path) {\n  MappedFile *mf = open_file(ctx, path);\n  if (!mf)\n    Fatal(ctx) << \"cannot open \" << path << \": \" << errno_string();\n  return mf;\n}\n\n//\n// jobs-unix.cc\n//\n\nvoid acquire_global_lock();\nvoid release_global_lock();\n\n//\n// Mergeable section fragments\n//\n\ntemplate <typename E>\nstruct __attribute__((aligned(4))) SectionFragment {\n  SectionFragment(MergedSection<E> *sec, bool is_alive)\n    : output_section(*sec), is_alive(is_alive) {}\n\n  u64 get_addr(Context<E> &ctx) const {\n    return output_section.shdr.sh_addr + offset;\n  }\n\n  MergedSection<E> &output_section;\n  i64 offset = -1;\n  Atomic<u8> p2align = 0;\n  Atomic<bool> is_alive = false;\n\n  // True if this fragment must be placed within 2^32 bytes from the\n  // start of the output section.\n  Atomic<bool> is_32bit = false;\n};\n\n// Additional class members for dynamic symbols. Because most symbols\n// don't need them and we allocate tens of millions of symbol objects\n// for large programs, we separate them from `Symbol` class to save\n// memory.\ntemplate <typename E>\nstruct SymbolAux {\n  i32 got_idx = -1;\n  i32 gottp_idx = -1;\n  i32 tlsgd_idx = -1;\n  i32 tlsdesc_idx = -1;\n  i32 plt_idx = -1;\n  i32 pltgot_idx = -1;\n  i32 dynsym_idx = -1;\n  i32 opd_idx = -1;\n  u32 djb_hash = 0;\n\n  // For range extension thunks\n  std::vector<u64> thunk_addrs;\n};\n\n//\n// thunks.cc\n//\n\ntemplate <typename E>\nclass Thunk {};\n\ntemplate <needs_thunk E>\nclass Thunk<E> {\npublic:\n  Thunk(OutputSection<E> &osec, i64 offset)\n    : output_section(osec), offset(offset) {}\n\n  u64 get_addr() const { return output_section.shdr.sh_addr + offset; }\n  i64 size() { return offsets.back(); }\n  void compute_size();\n  void shrink_size(Context<E> &ctx) { compute_size(); }\n  void copy_buf(Context<E> &ctx);\n\n  OutputSection<E> &output_section;\n  i64 offset;\n  std::vector<Symbol<E> *> symbols;\n  std::vector<i64> offsets;\n  std::string name;\n};\n\ntemplate <> void Thunk<ARM64LE>::shrink_size(Context<ARM64LE> &);\ntemplate <> void Thunk<ARM64BE>::shrink_size(Context<ARM64BE> &);\n\ntemplate <needs_thunk E>\nstatic consteval i64 get_branch_distance() {\n  // ARM64's branch has 26 bits immediate. The immediate is padded with\n  // implicit two-bit zeros because all instructions are 4 bytes aligned\n  // and therefore the least two bits are always zero. So the branch\n  // operand is effectively 28 bits long. That means the branch range is\n  // [-2^27, 2^27) or PC ± 128 MiB.\n  if (is_arm64<E>)\n    return 1 << 27;\n\n  // ARM32's Thumb branch has 24 bits immediate, and the instructions are\n  // aligned to 2, so it's effectively 25 bits. It's [-2^24, 2^24) or PC ±\n  // 16 MiB.\n  //\n  // ARM32's non-Thumb branches have twice longer range than its Thumb\n  // counterparts, but we conservatively use the Thumb's limitation.\n  if (is_arm32<E>)\n    return 1 << 24;\n\n  // PPC's branch has 24 bits immediate, and the instructions are aligned\n  // to 4, therefore the reach is [-2^25, 2^25) or PC ± 32 MiB.\n  assert(is_ppc<E>);\n  return 1 << 25;\n}\n\n// The maximum distance of branch instructions used for function calls.\n//\n// The exact origin for computing a destination varies slightly depending\n// on the target architecture. For example, ARM32's B instruction jumps to\n// the branch's address + immediate + 4 (i.e., B with offset 0 jumps to\n// the next instruction), while RISC-V has no such implicit bias. Here, we\n// subtract 32 as a safety margin that is large enough for all targets.\ntemplate <needs_thunk E>\nstatic constexpr i64 branch_distance = get_branch_distance<E>() - 32;\n\ntemplate <needs_thunk E>\nvoid remove_redundant_thunks(Context<E> &ctx);\n\ntemplate <needs_thunk E>\nvoid gather_thunk_addresses(Context<E> &ctx);\n\n//\n// input-sections.cc\n//\n\n// .eh_frame section contains CIE and FDE records to teach the runtime\n// how to handle exceptions. Usually, a .eh_frame contains one CIE\n// followed by as many FDEs as the number of functions defined by the\n// file. CIE contains common information for FDEs (it is actually\n// short for Common Information Entry). FDE contains the start address\n// of a function and its length as well as how to handle exceptions\n// for that function.\n//\n// Unlike other sections, the linker has to parse .eh_frame for optimal\n// output for the following reasons:\n//\n//  - Compilers tend to emit the same CIE as long as the programming\n//    language is the same, so CIEs in input object files are almost\n//    always identical. We want to merge them to make a resulting\n//    .eh_frame smaller.\n//\n//  - If we eliminate a function (e.g. when we see two object files\n//    containing the duplicate definition of an inlined function), we\n//    want to also eliminate a corresponding FDE so that a resulting\n//    .eh_frame doesn't contain a dead FDE entry.\n//\n//  - If we need to compare two function definitions for equality for\n//    ICF, we need to compare not only the function body but also its\n//    exception handlers.\n//\n// Note that we assume that the first relocation entry for an FDE\n// always points to the function that the FDE is associated to.\ntemplate <typename E>\nstruct CieRecord {\n  CieRecord(Context<E> &ctx, ObjectFile<E> &file, InputSection<E> &isec,\n            u32 input_offset, std::span<ElfRel<E>> rels, u32 rel_idx)\n    : file(file), input_section(isec), input_offset(input_offset),\n      rel_idx(rel_idx), rels(rels), contents(file.get_string(ctx, isec.shdr())) {}\n\n  i64 size() const {\n    return *(U32<E> *)(contents.data() + input_offset) + 4;\n  }\n\n  std::string_view get_contents() const {\n    return contents.substr(input_offset, size());\n  }\n\n  std::span<ElfRel<E>> get_rels() const {\n    i64 end = input_offset + size();\n    i64 i = rel_idx;\n    while (i < rels.size() && rels[i].r_offset < end)\n      i++;\n    return rels.subspan(rel_idx, i - rel_idx);\n  }\n\n  ObjectFile<E> &file;\n  InputSection<E> &input_section;\n  u32 input_offset = -1;\n  u32 output_offset = -1;\n  u32 rel_idx = -1;\n  u32 icf_idx = -1;\n  bool is_leader = false;\n  std::span<ElfRel<E>> rels;\n  std::string_view contents;\n};\n\ntemplate <typename E>\nbool cie_equals(const CieRecord<E> &a, const CieRecord<E> &b);\n\ntemplate <typename E>\nstruct FdeRecord {\n  FdeRecord(u32 input_offset, u32 rel_idx)\n    : input_offset(input_offset), rel_idx(rel_idx) {}\n\n  i64 size(ObjectFile<E> &file) const {\n    return *(U32<E> *)(file.cies[cie_idx].contents.data() + input_offset) + 4;\n  }\n\n  std::string_view get_contents(ObjectFile<E> &file) const {\n    return file.cies[cie_idx].contents.substr(input_offset, size(file));\n  }\n\n  std::span<ElfRel<E>> get_rels(ObjectFile<E> &file) const {\n    std::span<ElfRel<E>> rels = file.cies[cie_idx].rels;\n    i64 end = input_offset + size(file);\n    i64 i = rel_idx;\n    while (i < rels.size() && rels[i].r_offset < end)\n      i++;\n    return rels.subspan(rel_idx, i - rel_idx);\n  }\n\n  u32 input_offset = -1;\n  u32 output_offset = -1;\n  u32 rel_idx = -1;\n  u16 cie_idx = -1;\n  Atomic<bool> is_alive = true;\n};\n\n// A struct to hold target-dependent input section members.\ntemplate <typename E>\nstruct InputSectionExtras {};\n\ntemplate <is_arm32 E>\nstruct InputSectionExtras<E> {\n  InputSection<E> *exidx = nullptr;\n};\n\nstruct RelocDelta {\n  u64 offset;\n  i64 delta;\n};\n\n// RISC-V and LoongArch support code-shrinking linker relaxation.\n//\n// r_deltas is used to manage the locations where instructions are removed\n// from a section. r_deltas is sorted by offset. Each RelocDelta indicates\n// that the contents at and after `offset` and up to the next RelocDelta\n// offset need to be shifted towards the beginning of the section by\n// `delta` bytes when copying section contents to the output buffer.\n//\n// Since code-shrinking relaxation never bloats section contents, `delta`\n// increases monotonically within the vector as well.\ntemplate <typename E> requires is_riscv<E> || is_loongarch<E>\nstruct InputSectionExtras<E> {\n  std::vector<RelocDelta> r_deltas;\n};\n\n// InputSection represents a section in an input object file.\ntemplate <typename E>\nclass __attribute__((aligned(4))) InputSection {\npublic:\n  InputSection(Context<E> &ctx, ObjectFile<E> &file, i64 shndx);\n\n  void uncompress(Context<E> &ctx);\n  void copy_contents_to(Context<E> &ctx, u8 *buf, i64 sz);\n  void scan_relocations(Context<E> &ctx);\n  void write_to(Context<E> &ctx, u8 *buf);\n  void apply_reloc_alloc(Context<E> &ctx, u8 *base);\n  void apply_reloc_nonalloc(Context<E> &ctx, u8 *base);\n  void kill();\n\n  std::string_view name() const;\n  i64 get_priority() const;\n  u64 get_addr() const;\n  ElfShdr<E> &shdr() const;\n  std::span<ElfRel<E>> get_rels(Context<E> &ctx) const;\n  std::span<FdeRecord<E>> get_fdes() const;\n  std::string_view get_func_name(Context<E> &ctx, i64 offset) const;\n  bool is_relr_reloc(Context<E> &ctx, const ElfRel<E> &rel) const;\n  bool icf_removed() const;\n  bool record_undef_error(Context<E> &ctx, const ElfRel<E> &rel);\n  void check_range(Context<E> &ctx, i64 i, i64 val, i64 lo, i64 hi);\n\n  std::pair<SectionFragment<E> *, i64>\n  get_fragment(Context<E> &ctx, const ElfRel<E> &rel);\n\n  ObjectFile<E> &file;\n  OutputSection<E> *output_section = nullptr;\n  i64 sh_size = -1;\n\n  std::string_view contents;\n\n  i32 fde_begin = -1;\n  i32 fde_end = -1;\n\n  i64 offset = -1;\n  i32 shndx = -1;\n  i32 relsec_idx = -1;\n  i32 reldyn_offset = 0;\n\n  bool uncompressed = false;\n\n  // For COMDAT de-duplication and garbage collection\n  Atomic<bool> is_alive = true;\n  u8 p2align = 0;\n\n  // For ICF\n  Atomic<bool> address_taken = false;\n\n  // For garbage collection\n  Atomic<bool> is_visited = false;\n\n  // For ICF\n  //\n  // `leader` is the section that this section has been merged with.\n  // Three kind of values are possible:\n  // - `leader == nullptr`: This section was not eligible for ICF.\n  // - `leader == this`: This section was retained.\n  // - `leader != this`: This section was merged with another identical section.\n  InputSection<E> *leader = nullptr;\n  i32 icf_idx = -1;\n  bool icf_eligible = false;\n  bool icf_leaf = false;\n\n  [[no_unique_address]] InputSectionExtras<E> extra;\n\nprivate:\n  void scan_pcrel(Context<E> &ctx, Symbol<E> &sym, const ElfRel<E> &rel);\n  void scan_absrel(Context<E> &ctx, Symbol<E> &sym, const ElfRel<E> &rel);\n  void scan_tlsdesc(Context<E> &ctx, Symbol<E> &sym);\n  void check_tlsle(Context<E> &ctx, Symbol<E> &sym, const ElfRel<E> &rel);\n\n  void apply_dyn_absrel(Context<E> &ctx, Symbol<E> &sym, const ElfRel<E> &rel,\n                        u8 *loc, u64 S, i64 A, u64 P, ElfRel<E> **dynrel);\n\n  void apply_toc_rel(Context<E> &ctx, Symbol<E> &sym, const ElfRel<E> &rel,\n                     u8 *loc, u64 S, i64 A, u64 P, ElfRel<E> **dynrel);\n\n  std::optional<u64> get_tombstone(Symbol<E> &sym, SectionFragment<E> *frag);\n};\n\n//\n// tls.cc\n//\n\ntemplate <typename E> u64 get_tp_addr(const ElfPhdr<E> &);\ntemplate <typename E> u64 get_dtp_addr(const ElfPhdr<E> &);\n\n//\n// filetype.cc\n//\n\nenum class FileType {\n  UNKNOWN,\n  EMPTY,\n  ELF_OBJ,\n  ELF_DSO,\n  AR,\n  THIN_AR,\n  TEXT,\n  GCC_LTO_OBJ,\n  LLVM_BITCODE,\n};\n\ntemplate <typename E>\nFileType get_file_type(Context<E> &ctx, MappedFile *mf);\n\ntemplate <typename E>\nstd::string_view\nget_machine_type(Context<E> &ctx, ReaderContext &rctx, MappedFile *mf);\n\n//\n// output-chunks.cc\n//\n\ntemplate <typename E>\nChunk<E> *find_chunk(Context<E> &ctx, u32 sh_type);\n\ntemplate <typename E>\nChunk<E> *find_chunk(Context<E> &ctx, std::string_view name);\n\ntemplate <typename E>\nu64 get_eflags(Context<E> &ctx) {\n  return 0;\n}\n\ntemplate <typename E>\ni64 to_phdr_flags(Context<E> &ctx, Chunk<E> *chunk);\n\ntemplate <typename E>\nvoid write_plt_header(Context<E> &ctx, u8 *buf);\n\ntemplate <typename E>\nvoid write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym);\n\ntemplate <typename E>\nvoid write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym);\n\n// Chunk represents a contiguous region in an output file.\ntemplate <typename E>\nclass __attribute__((aligned(4))) Chunk {\npublic:\n  virtual ~Chunk() = default;\n  virtual bool is_header() { return false; }\n  virtual OutputSection<E> *to_osec() { return nullptr; }\n  virtual void compute_section_size(Context<E> &ctx) {}\n  virtual i64 get_reldyn_size(Context<E> &ctx) const { return 0; }\n  virtual void construct_relr(Context<E> &ctx) {}\n  virtual void copy_buf(Context<E> &ctx) {}\n  virtual void write_to(Context<E> &ctx, u8 *buf) { unreachable(); }\n  virtual void update_shdr(Context<E> &ctx) {}\n\n  std::string_view name;\n  ElfShdr<E> shdr = { .sh_addralign = 1 };\n  i64 shndx = 0;\n  bool is_relro = false;\n\n  // For --gdb-index\n  bool is_compressed = false;\n\n  // Some synethetic sections add local symbols to the output.\n  // For example, range extension thunks adds function_name@thunk\n  // symbol for each thunk entry. The following members are used\n  // for such synthesizing symbols.\n  virtual void compute_symtab_size(Context<E> &ctx) {}\n  virtual void populate_symtab(Context<E> &ctx) {}\n\n  i64 local_symtab_idx = 0;\n  i64 num_local_symtab = 0;\n  i64 strtab_size = 0;\n  i64 strtab_offset = 0;\n\n  // Offset in .rel.dyn\n  i64 reldyn_offset = 0;\n\n  // For --section-order\n  i64 sect_order = 0;\n\n  // For --pack-dyn-relocs=relr\n  std::vector<u64> relr;\n};\n\n// ELF header which is at the beginning of each ELF file.\ntemplate <typename E>\nclass OutputEhdr : public Chunk<E> {\npublic:\n  OutputEhdr(u32 sh_flags) {\n    this->name = \"EHDR\";\n    this->shdr.sh_flags = sh_flags;\n    this->shdr.sh_size = sizeof(ElfEhdr<E>);\n    this->shdr.sh_addralign = sizeof(Word<E>);\n  }\n\n  bool is_header() override { return true; }\n  void copy_buf(Context<E> &ctx) override;\n};\n\n// OutputShdr represents the section header. The section header is usually\n// located at the end of an ELF file and is optional for executables.\n// Executables work without it because the runtime only reads the program\n// header. Section header is significant only in object files and not\n// needed at runtime\ntemplate <typename E>\nclass OutputShdr : public Chunk<E> {\npublic:\n  OutputShdr() {\n    this->name = \"SHDR\";\n    this->shdr.sh_size = 1;\n    this->shdr.sh_addralign = sizeof(Word<E>);\n  }\n\n  bool is_header() override { return true; }\n  void copy_buf(Context<E> &ctx) override;\n};\n\n// Program header, a.k.a. segment header. Each entry in the program header\n// represents a contiguous region of memory and has attributes such as\n// page protection bits. On program startup, the kernel mmap's the file\n// contents to memory based on the program header.\ntemplate <typename E>\nclass OutputPhdr : public Chunk<E> {\npublic:\n  OutputPhdr(u32 sh_flags) {\n    this->name = \"PHDR\";\n    this->shdr.sh_flags = sh_flags;\n    this->shdr.sh_addralign = sizeof(Word<E>);\n  }\n\n  bool is_header() override { return true; }\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n\n  std::vector<ElfPhdr<E>> phdrs;\n};\n\n// .interp contains the pathname of a dynamic linker. Dynamically-linked\n// executables have the section. If exists, the kernel runs the program at\n// the specified path with the executable pathname as an argument,\n// allowing the dynamic linker to run the program.\ntemplate <typename E>\nclass InterpSection : public Chunk<E> {\npublic:\n  InterpSection() {\n    this->name = \".interp\";\n    this->shdr.sh_type = SHT_PROGBITS;\n    this->shdr.sh_flags = SHF_ALLOC;\n  }\n\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n};\n\nenum AbsRelKind {\n  ABS_REL_NONE,\n  ABS_REL_BASEREL,\n  ABS_REL_RELR,\n  ABS_REL_IFUNC,\n  ABS_REL_DYNREL,\n};\n\n// Represents a word-size absolute relocation (e.g. R_X86_64_64)\ntemplate <typename E>\nstruct AbsRel {\n  InputSection<E> *isec = nullptr;\n  u64 offset = 0;\n  Symbol<E> *sym = nullptr;\n  i64 addend = 0;\n  AbsRelKind kind = ABS_REL_NONE;\n};\n\n// OutputSection represents the usual output section that contains input\n// sections read from object files.\ntemplate <typename E>\nclass OutputSection : public Chunk<E> {\npublic:\n  OutputSection(std::string_view name, u32 type) {\n    this->name = name;\n    this->shdr.sh_type = type;\n  }\n\n  OutputSection<E> *to_osec() override { return this; }\n  void compute_section_size(Context<E> &ctx) override;\n  i64 get_reldyn_size(Context<E> &ctx) const override;\n  void construct_relr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n  void write_to(Context<E> &ctx, u8 *buf) override;\n\n  void compute_symtab_size(Context<E> &ctx) override;\n  void populate_symtab(Context<E> &ctx) override;\n\n  void scan_abs_relocations(Context<E> &ctx);\n  void create_range_extension_thunks(Context<E> &ctx);\n\n  std::vector<InputSection<E> *> members;\n  std::vector<std::unique_ptr<Thunk<E>>> thunks;\n  std::unique_ptr<RelocSection<E>> reloc_sec;\n  std::vector<AbsRel<E>> abs_rels;\n  Atomic<u32> sh_flags;\n\n  // Used only by create_output_sections()\n  std::vector<std::vector<InputSection<E> *>> members_vec;\n};\n\n// .got is a linker-synthesized constant pool whose entry size is the same\n// as the pointer size. It is used to store runtime addresses of global\n// variables and TP-relative offsets of thread-local variables.\ntemplate <typename E>\nclass GotSection : public Chunk<E> {\npublic:\n  GotSection() {\n    this->name = \".got\";\n    this->is_relro = true;\n    this->shdr.sh_type = SHT_PROGBITS;\n    this->shdr.sh_flags = SHF_ALLOC | SHF_WRITE;\n    this->shdr.sh_addralign = sizeof(Word<E>);\n\n    // We always create a .got so that _GLOBAL_OFFSET_TABLE_ has\n    // something to point to. s390x psABI define GOT[1] and GOT[2]\n    // as reserved slots, so we allocate two more for them.\n    this->shdr.sh_size = (is_s390x<E> ? 3 : 1) * sizeof(Word<E>);\n  }\n\n  void add_got_symbol(Context<E> &ctx, Symbol<E> *sym);\n  void add_gottp_symbol(Context<E> &ctx, Symbol<E> *sym);\n  void add_tlsgd_symbol(Context<E> &ctx, Symbol<E> *sym);\n  void add_tlsdesc_symbol(Context<E> &ctx, Symbol<E> *sym);\n  void add_tlsld(Context<E> &ctx);\n\n  u64 get_tlsld_addr(Context<E> &ctx) const;\n  bool has_tlsld(Context<E> &ctx) const { return tlsld_idx != -1; }\n  i64 get_reldyn_size(Context<E> &ctx) const override;\n  void copy_buf(Context<E> &ctx) override;\n\n  void construct_relr(Context<E> &ctx) override;\n  void compute_symtab_size(Context<E> &ctx) override;\n  void populate_symtab(Context<E> &ctx) override;\n\n  std::vector<Symbol<E> *> got_syms;\n  std::vector<Symbol<E> *> tlsgd_syms;\n  std::vector<Symbol<E> *> tlsdesc_syms;\n  std::vector<Symbol<E> *> gottp_syms;\n  i64 tlsld_idx = -1;\n};\n\n// .got.plt is similar to .got in the sense that it is a table containing\n// pointers. The contents in .got.plt are function pointers used by .plt.\ntemplate <typename E>\nclass GotPltSection : public Chunk<E> {\npublic:\n  GotPltSection(Context<E> &ctx) {\n    this->name = \".got.plt\";\n    this->is_relro = ctx.arg.z_now;\n    this->shdr.sh_type = is_ppc64<E> ? SHT_NOBITS : SHT_PROGBITS;\n    this->shdr.sh_flags = SHF_ALLOC | SHF_WRITE;\n    this->shdr.sh_addralign = sizeof(Word<E>);\n    this->shdr.sh_size = HDR_SIZE;\n  }\n\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n\n  static constexpr i64 HDR_SIZE = (is_ppc64v2<E> ? 2 : 3) * sizeof(Word<E>);\n  static constexpr i64 ENTRY_SIZE = (is_ppc64v1<E> ? 3 : 1) * sizeof(Word<E>);\n};\n\n// .plt contains linker-synthesized stub code that acts as if they are\n// functions. They are in fact immediately branches to real function entry\n// points. .plt is used as a stub for runtime lazy symbol resolution.\ntemplate <typename E>\nclass PltSection : public Chunk<E> {\npublic:\n  PltSection() {\n    this->name = \".plt\";\n    this->shdr.sh_type = SHT_PROGBITS;\n\n    if constexpr (is_sparc<E>) {\n      this->shdr.sh_flags = SHF_ALLOC | SHF_EXECINSTR | SHF_WRITE;\n      this->shdr.sh_addralign = 256;\n    } else {\n      this->shdr.sh_flags = SHF_ALLOC | SHF_EXECINSTR;\n      this->shdr.sh_addralign = 16;\n    }\n  }\n\n  void add_symbol(Context<E> &ctx, Symbol<E> *sym);\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n\n  void compute_symtab_size(Context<E> &ctx) override;\n  void populate_symtab(Context<E> &ctx) override;\n\n  std::vector<Symbol<E> *> symbols;\n};\n\n// .plt.got is similar to .plt but doesn't support lazy symbol resolution.\n// If we have the same symbol already in .got, resolving the same symbol\n// lazily for .plt is just waste of time. Therefore, in such case, we use\n// .plt.got for that symbol instead.\ntemplate <typename E>\nclass PltGotSection : public Chunk<E> {\npublic:\n  PltGotSection() {\n    this->name = \".plt.got\";\n    this->shdr.sh_type = SHT_PROGBITS;\n    this->shdr.sh_flags = SHF_ALLOC | SHF_EXECINSTR;\n    this->shdr.sh_addralign = 16;\n  }\n\n  void add_symbol(Context<E> &ctx, Symbol<E> *sym);\n  void copy_buf(Context<E> &ctx) override;\n\n  void compute_symtab_size(Context<E> &ctx) override;\n  void populate_symtab(Context<E> &ctx) override;\n\n  std::vector<Symbol<E> *> symbols;\n};\n\n// .rel.plt contains relocation information for .plt.\ntemplate <typename E>\nclass RelPltSection : public Chunk<E> {\npublic:\n  RelPltSection() {\n    this->name = E::is_rela ? \".rela.plt\" : \".rel.plt\";\n    this->shdr.sh_type = E::is_rela ? SHT_RELA : SHT_REL;\n    this->shdr.sh_flags = SHF_ALLOC;\n    this->shdr.sh_entsize = sizeof(ElfRel<E>);\n    this->shdr.sh_addralign = sizeof(Word<E>);\n  }\n\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n};\n\n// .rel.dyn contains relocation infromation for other sections.\ntemplate <typename E>\nclass RelDynSection : public Chunk<E> {\npublic:\n  RelDynSection() {\n    this->name = E::is_rela ? \".rela.dyn\" : \".rel.dyn\";\n    this->shdr.sh_type = E::is_rela ? SHT_RELA : SHT_REL;\n    this->shdr.sh_flags = SHF_ALLOC;\n    this->shdr.sh_entsize = sizeof(ElfRel<E>);\n    this->shdr.sh_addralign = sizeof(Word<E>);\n  }\n\n  void update_shdr(Context<E> &ctx) override;\n};\n\n// .relr.dyn is a relatively new section to contain base relocation\n// information.\n//\n// A relocatable executable/DSO contains a lot of certain type of\n// relocation entries, called \"base relocations\", to specify the locations\n// of pointers in the FILE that need to be adjusted according to the\n// desired load address and the actual load address. As an example,\n// consider the following C code.\n//\n//   extern int foo;\n//   int *bar = &foo;\n//\n// If an executable containing the above code is built as relocatable\n// executable, meaning that the executable can be loaded not to a specific\n// address in memory but anywhere in the virtual address space, then the\n// pointer `bar`'s address is not known at link-time.\n//\n// The linker temporarily links the executable to a base address, record\n// that information to the ELF header, and emits dynamic relocations to\n// refer to the location of `bar`. At runtime, the loader adds the\n// difference of the expected load address and the actual one to the\n// pointer value to fix the pointer value.\n//\n// Relocatable executables/DSOs usually contain a fairly large number of\n// base relocations. In particular, C++ virtual function table is an array\n// of statically-initialized pointers which need base relocations.\n//\n// Notice that base relocations don't contain symbol information. They\n// need only pointer locations in the ELF file that need fixing at\n// load-time. Therefore, storing that information to the usual ELF\n// relocation table is waste of space.\n//\n// .relr.dyn is designed to store base relocations in a space-efficient way.\ntemplate <typename E>\nclass RelrDynSection : public Chunk<E> {\npublic:\n  RelrDynSection() {\n    this->name = \".relr.dyn\";\n    this->shdr.sh_type = SHT_RELR;\n    this->shdr.sh_flags = SHF_ALLOC;\n    this->shdr.sh_entsize = sizeof(Word<E>);\n    this->shdr.sh_addralign = sizeof(Word<E>);\n  }\n\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n};\n\n// .strtab is referenced by .strtab and contains symbol names. Note that\n// .strtab is not needed at runtime; one can remove the section from an\n// ELF file without breaking it. Strings that runtime accesses are stored\n// in .dynstr.\ntemplate <typename E>\nclass StrtabSection : public Chunk<E> {\npublic:\n  StrtabSection() {\n    this->name = \".strtab\";\n    this->shdr.sh_type = SHT_STRTAB;\n  }\n\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n\n  // Offsets in .strtab for ARM32 mapping symbols\n  static constexpr i64 ARM = 1;\n  static constexpr i64 THUMB = 4;\n  static constexpr i64 DATA = 7;\n};\n\n// .shstrtab contains section names, such as \".text\" or \".data\". Just like\n// .strtab, .shstrtab is not needed at runtime. One can remove .shstrtab\n// and section table from an executable without breaking it.\ntemplate <typename E>\nclass ShstrtabSection : public Chunk<E> {\npublic:\n  ShstrtabSection() {\n    this->name = \".shstrtab\";\n    this->shdr.sh_type = SHT_STRTAB;\n  }\n\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n};\n\n// .dynstr contains strings that the runtime uses.\ntemplate <typename E>\nclass DynstrSection : public Chunk<E> {\npublic:\n  DynstrSection() {\n    this->name = \".dynstr\";\n    this->shdr.sh_type = SHT_STRTAB;\n    this->shdr.sh_flags = SHF_ALLOC;\n  }\n\n  i64 add_string(std::string_view str);\n  i64 find_string(std::string_view str);\n  void copy_buf(Context<E> &ctx) override;\n\nprivate:\n  std::unordered_map<std::string_view, i64> strings;\n};\n\n// .dynamic contains various information for dynamically-linked ELF files.\n// At runtime, the dynamic linker reads the information to work\n// appropriately.\ntemplate <typename E>\nclass DynamicSection : public Chunk<E> {\npublic:\n  DynamicSection(Context<E> &ctx) {\n    this->name = \".dynamic\";\n    this->shdr.sh_type = SHT_DYNAMIC;\n    this->shdr.sh_addralign = sizeof(Word<E>);\n    this->shdr.sh_entsize = sizeof(ElfDyn<E>);\n\n    if (ctx.arg.z_rodynamic) {\n      this->shdr.sh_flags = SHF_ALLOC;\n      this->is_relro = false;\n    } else {\n      this->shdr.sh_flags = SHF_ALLOC | SHF_WRITE;\n      this->is_relro = true;\n    }\n  }\n\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n};\n\ntemplate <typename E>\nstd::optional<ElfSym<E>>\nto_output_esym(Context<E> &ctx, Symbol<E> &sym, u32 st_name, U32<E> *shndx);\n\n// .symtab contains non-dynamic symbols. The section is not needed at\n// runtime and can be stripped from an ELF file without affecting the\n// behavior of the program. Symbols in .symtab are mainly for debugging.\ntemplate <typename E>\nclass SymtabSection : public Chunk<E> {\npublic:\n  SymtabSection() {\n    this->name = \".symtab\";\n    this->shdr.sh_type = SHT_SYMTAB;\n    this->shdr.sh_entsize = sizeof(ElfSym<E>);\n    this->shdr.sh_addralign = sizeof(Word<E>);\n  }\n\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n};\n\n// .symtab_shndx is a parallel table for .symtab to contain section\n// indices for symbols.\n//\n// Symbol table entry contains a field for section index, but that's only\n// 16 bit in size, so it cannot refer to a section whose section index is\n// greater than 65535. We use .symtab_shndx for ELF files containing a lot\n// of sections.\n//\n// Use of this section is exceptional. Most ELF files don't contain one.\ntemplate <typename E>\nclass SymtabShndxSection : public Chunk<E> {\npublic:\n  SymtabShndxSection() {\n    this->name = \".symtab_shndx\";\n    this->shdr.sh_type = SHT_SYMTAB_SHNDX;\n    this->shdr.sh_entsize = 4;\n    this->shdr.sh_addralign = 4;\n  }\n};\n\n// .dynsym contains symbols for dynamic linking. This is similar to\n// .symtab, but .dynsym contains data that the runtime uses.\ntemplate <typename E>\nclass DynsymSection : public Chunk<E> {\npublic:\n  DynsymSection() {\n    this->name = \".dynsym\";\n    this->shdr.sh_type = SHT_DYNSYM;\n    this->shdr.sh_flags = SHF_ALLOC;\n    this->shdr.sh_entsize = sizeof(ElfSym<E>);\n    this->shdr.sh_addralign = sizeof(Word<E>);\n  }\n\n  void add_symbol(Context<E> &ctx, Symbol<E> *sym);\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n\n  std::vector<Symbol<E> *> symbols;\n  i64 dynstr_offset = -1;\n};\n\n// .hash contains an on-disk hash table for .dynsym so that the runtime\n// can look up a symbol name quickly without scannin all entries in\n// .dynsym.\n//\n// Quickly identifying whether or not a .dynsym contains a given symbol is\n// especially important for ELF because of the dynamic symbol lookup rule\n// for ELF. In ELF, each dynamic symbol is not searched from a specific\n// library but from all the ELF files loaded to memory. Therefore,\n// minimizing the cost of each dynamic symbol lookup is important.\ntemplate <typename E>\nclass HashSection : public Chunk<E> {\npublic:\n  HashSection() {\n    this->name = \".hash\";\n    this->shdr.sh_type = SHT_HASH;\n    this->shdr.sh_flags = SHF_ALLOC;\n    this->shdr.sh_entsize = sizeof(Entry);\n    this->shdr.sh_addralign = sizeof(Entry);\n  }\n\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n\nprivate:\n  // Even though u32 should suffice as an etnry size for all targets,\n  // s390x uses u64. It looks like a spec bug, but we need to follow\n  // suit for the sake of binary compatibility.\n  using Entry = std::conditional_t<is_s390x<E>, U64<E>, U32<E>>;\n};\n\n// .gnu.hash is an alternative format for .hash. It contains not only an\n// on-disk hash table but also contains a bloom filter to quickly identify\n// whether or not a given symbol name exists in .dynsym.\ntemplate <typename E>\nclass GnuHashSection : public Chunk<E> {\npublic:\n  GnuHashSection() {\n    this->name = \".gnu.hash\";\n    this->shdr.sh_type = SHT_GNU_HASH;\n    this->shdr.sh_flags = SHF_ALLOC;\n    this->shdr.sh_addralign = sizeof(Word<E>);\n  }\n\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n\n  static constexpr i64 LOAD_FACTOR = 8;\n  static constexpr i64 HEADER_SIZE = 16;\n  static constexpr i64 BLOOM_SHIFT = 26;\n\n  i64 num_buckets = -1;\n  i64 num_bloom = 1;\n  i64 num_exported = -1;\n};\n\n// MergedSection represents a section containing a constant pool such as\n// string literals or floating-point constants. It is created from\n// MergeableSection.\ntemplate <typename E>\nclass MergedSection : public Chunk<E> {\npublic:\n  static MergedSection<E> *\n  get_instance(Context<E> &ctx, std::string_view name, const ElfShdr<E> &shdr);\n\n  SectionFragment<E> *insert(Context<E> &ctx, std::string_view data,\n                             u64 hash, i64 p2align);\n\n  void resolve(Context<E> &ctx);\n  void compute_section_size(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n  void write_to(Context<E> &ctx, u8 *buf) override;\n  void print_stats(Context<E> &ctx);\n\n  std::vector<MergeableSection<E> *> members;\n  std::mutex mu;\n\n  ConcurrentMap<SectionFragment<E>> map;\n  HyperLogLog estimator;\n  bool resolved = false;\n\nprivate:\n  MergedSection(std::string_view name, i64 flags, i64 type, i64 entsize);\n\n  std::vector<i64> shard_offsets;\n};\n\n// .eh_frame contains runtime information as to how to handle exceptions\n// for each function. Each input object file contains one .eh_frame section.\n// We parse input .eh_frame sections, merge their contents and emit the\n// merged information to .eh_frame.\ntemplate <typename E>\nclass EhFrameSection : public Chunk<E> {\npublic:\n  EhFrameSection() {\n    this->name = \".eh_frame\";\n    this->shdr.sh_type = SHT_PROGBITS;\n    this->shdr.sh_flags = SHF_ALLOC;\n    this->shdr.sh_addralign = sizeof(Word<E>);\n  }\n\n  void construct(Context<E> &ctx);\n  void apply_eh_reloc(Context<E> &ctx, const ElfRel<E> &rel, u64 offset, u64 val);\n  void copy_buf(Context<E> &ctx) override;\n};\n\n// .eh_frame_hdr is a lookup table for .eh_frame. Entries in .eh_frame_hdr\n// are sorted by their dcorresponding function addresses, so tha the\n// runtime can quickly find an exception-handling record for the current\n// function by binary search. Without .eh_frame_hdr, the runtime would\n// have had to do linear search in .eh_frame.\ntemplate <typename E>\nclass EhFrameHdrSection : public Chunk<E> {\npublic:\n  EhFrameHdrSection() {\n    this->name = \".eh_frame_hdr\";\n    this->shdr.sh_type = SHT_PROGBITS;\n    this->shdr.sh_flags = SHF_ALLOC;\n    this->shdr.sh_addralign = 4;\n    this->shdr.sh_size = HEADER_SIZE;\n  }\n\n  static constexpr i64 HEADER_SIZE = 12;\n\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n\n  i64 num_fdes = 0;\n};\n\n// EhFrameRelocSection contains relcoation records for .eh_frame. We use\n// this class only for relocatable outputs (i.e. the output is an .o file\n// as opposed to an executable or a .so file.)\ntemplate <typename E>\nclass EhFrameRelocSection : public Chunk<E> {\npublic:\n  EhFrameRelocSection() {\n    this->name = E::is_rela ? \".rela.eh_frame\" : \".rel.eh_frame\";\n    this->shdr.sh_type = E::is_rela ? SHT_RELA : SHT_REL;\n    this->shdr.sh_flags = SHF_INFO_LINK;\n    this->shdr.sh_addralign = sizeof(Word<E>);\n    this->shdr.sh_entsize = sizeof(ElfRel<E>);\n  }\n\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n};\n\n// .copyrel and .copyrel.rel.ro represent memory regions to which the\n// runtime copies symbols from other ELF files for copy relocations.\ntemplate <typename E>\nclass CopyrelSection : public Chunk<E> {\npublic:\n  CopyrelSection(bool is_relro) {\n    this->name = is_relro ? \".copyrel.rel.ro\" : \".copyrel\";\n    this->is_relro = is_relro;\n    this->shdr.sh_type = SHT_NOBITS;\n    this->shdr.sh_flags = SHF_ALLOC | SHF_WRITE;\n  }\n\n  void add_symbol(Context<E> &ctx, Symbol<E> *sym);\n  i64 get_reldyn_size(Context<E> &ctx) const override { return symbols.size(); }\n  void copy_buf(Context<E> &ctx) override;\n\n  std::vector<Symbol<E> *> symbols;\n};\n\n// .gnu.version contains a parallel table for .dynsym to specify symbol\n// versions of undefined symbols. A symbol having an entry in .gnu.version\n// must be resolved to a symbol with the exact same version string at\n// runtime.\ntemplate <typename E>\nclass VersymSection : public Chunk<E> {\npublic:\n  VersymSection() {\n    this->name = \".gnu.version\";\n    this->shdr.sh_type = SHT_GNU_VERSYM;\n    this->shdr.sh_flags = SHF_ALLOC;\n    this->shdr.sh_entsize = 2;\n    this->shdr.sh_addralign = 2;\n  }\n\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n\n  std::vector<U16<E>> contents;\n};\n\n// .gnu.version_r contains information to refer to shared libraries and\n// their symbol versions.\ntemplate <typename E>\nclass VerneedSection : public Chunk<E> {\npublic:\n  VerneedSection() {\n    this->name = \".gnu.version_r\";\n    this->shdr.sh_type = SHT_GNU_VERNEED;\n    this->shdr.sh_flags = SHF_ALLOC;\n    this->shdr.sh_addralign = 4;\n  }\n\n  void construct(Context<E> &ctx);\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n\n  std::vector<u8> contents;\n};\n\n// .gnu.version contains a parallel table for .dynsym to specify symbol\n// versions of defined symbols. This section appears only in .so files,\n// and it specifies the symbol version for each defined dynamic symbol.\ntemplate <typename E>\nclass VerdefSection : public Chunk<E> {\npublic:\n  VerdefSection() {\n    this->name = \".gnu.version_d\";\n    this->shdr.sh_type = SHT_GNU_VERDEF;\n    this->shdr.sh_flags = SHF_ALLOC;\n    this->shdr.sh_addralign = 4;\n  }\n\n  void construct(Context<E> &ctx);\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n\n  std::vector<u8> contents;\n};\n\n// .note.gnu.build-id contains an identifier for an output ELF file. The\n// contents of the section is usually a cryptogrpahic hash of the output\n// file itself to guarantee uniqueness of build-id.\ntemplate <typename E>\nclass BuildIdSection : public Chunk<E> {\npublic:\n  BuildIdSection() {\n    this->name = \".note.gnu.build-id\";\n    this->shdr.sh_type = SHT_NOTE;\n    this->shdr.sh_flags = SHF_ALLOC;\n    this->shdr.sh_addralign = 4;\n    this->shdr.sh_size = 1;\n  }\n\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n\n  std::vector<u8> contents;\n};\n\n// .note.package is an optional hint section that can contain arbitrary\n// string. Package managers, such as dpkg or rpm, uses the section to\n// embed package metadata into each ELF file so that it is easy to find\n// the origin of an ELF file without any additional information.\ntemplate <typename E>\nclass NotePackageSection : public Chunk<E> {\npublic:\n  NotePackageSection() {\n    this->name = \".note.package\";\n    this->shdr.sh_type = SHT_NOTE;\n    this->shdr.sh_flags = SHF_ALLOC;\n    this->shdr.sh_addralign = 4;\n  }\n\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n};\n\n// .note.gnu.property section contains an additional runtime information\n// about ISA variant.\ntemplate <typename E>\nclass NotePropertySection : public Chunk<E> {\npublic:\n  NotePropertySection() {\n    this->name = \".note.gnu.property\";\n    this->shdr.sh_type = SHT_NOTE;\n    this->shdr.sh_flags = SHF_ALLOC;\n    this->shdr.sh_addralign = sizeof(Word<E>);\n  }\n\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n\nprivate:\n  struct Entry64 {\n    U32<E> type;\n    U32<E> size;\n    U32<E> flags;\n    u8 padding[4];\n  };\n\n  struct Entry32 {\n    U32<E> type;\n    U32<E> size;\n    U32<E> flags;\n  };\n\n  using Entry = std::conditional_t<E::is_64, Entry64, Entry32>;\n\n  std::vector<Entry> contents;\n};\n\n// .gnu_debuglink section contains a pathname and its CRC32 checksum for a\n// separate debug info file. gdb can read the section to read debug info\n// from an external file.\ntemplate <typename E>\nclass GnuDebuglinkSection : public Chunk<E> {\npublic:\n  GnuDebuglinkSection() {\n    this->name = \".gnu_debuglink\";\n    this->shdr.sh_type = SHT_PROGBITS;\n    this->shdr.sh_addralign = 4;\n  }\n\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n\n  std::string filename;\n  u32 crc32 = 0;\n};\n\n// .gdb_index contains several tables to speed up gdb start-up.\ntemplate <typename E>\nclass GdbIndexSection : public Chunk<E> {\npublic:\n  GdbIndexSection() {\n    this->name = \".gdb_index\";\n    this->shdr.sh_type = SHT_PROGBITS;\n    this->shdr.sh_addralign = 4;\n  }\n};\n\n// Debug sections can be compressed with zlib or zstd to reduce the\n// overall size of an ELF file. CompressedSection represents a compressed\n// section.\ntemplate <typename E>\nclass CompressedSection : public Chunk<E> {\npublic:\n  CompressedSection(Context<E> &ctx, Chunk<E> &chunk);\n  void copy_buf(Context<E> &ctx) override;\n\n  std::unique_ptr<u8[]> uncompressed_data;\n  ElfChdr<E> chdr = {};\n\nprivate:\n  std::unique_ptr<Compressor> compressor;\n};\n\n// RelocSection represents a relocation table for an output file.\n// This is used only for the reproducible output (i.e. the `-r` output).\ntemplate <typename E>\nclass RelocSection : public Chunk<E> {\npublic:\n  RelocSection(Context<E> &ctx, OutputSection<E> &osec);\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n\nprivate:\n  OutputSection<E> &output_section;\n  std::vector<i64> offsets;\n};\n\n// PT_GNU_RELRO works on page granularity. We want to align its end to\n// a page boundary. We append this section at end of a segment so that\n// the segment always ends at a page boundary.\ntemplate <typename E>\nclass RelroPaddingSection : public Chunk<E> {\npublic:\n  RelroPaddingSection() {\n    this->name = \".relro_padding\";\n    this->is_relro = true;\n    this->shdr.sh_type = SHT_NOBITS;\n    this->shdr.sh_flags = SHF_ALLOC | SHF_WRITE;\n    this->shdr.sh_addralign = 1;\n    this->shdr.sh_size = 1;\n  }\n};\n\n// ComdatGroupSection represents a comdat group for an output file.\n// This is used only for the reproducible output (i.e. the `-r` output).\ntemplate <typename E>\nclass ComdatGroupSection : public Chunk<E> {\npublic:\n  ComdatGroupSection(Symbol<E> &sym, std::vector<Chunk<E> *> members)\n    : sym(sym), members(std::move(members)) {\n    this->name = \".group\";\n    this->shdr.sh_type = SHT_GROUP;\n    this->shdr.sh_entsize = 4;\n    this->shdr.sh_addralign = 4;\n    this->shdr.sh_size = this->members.size() * 4 + 4;\n  }\n\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n\nprivate:\n  Symbol<E> &sym;\n  std::vector<Chunk<E> *> members;\n};\n\n//\n// output-file.cc\n//\n\ntemplate <typename E>\nclass OutputFile {\npublic:\n  static std::unique_ptr<OutputFile<E>>\n  open(Context<E> &ctx, std::string path, i64 filesize, int perm);\n\n  virtual void close(Context<E> &ctx) = 0;\n  virtual ~OutputFile() { free(buf2); }\n\n  u8 *buf = nullptr;\n  u8 *buf2 = nullptr;\n  i64 buf2_size = 0;\n  std::string path;\n  int fd = -1;\n  i64 filesize = 0;\n  bool is_mmapped = false;\n  bool is_unmapped = false;\n\nprotected:\n  OutputFile(std::string path, i64 filesize, bool is_mmapped)\n    : path(path), filesize(filesize), is_mmapped(is_mmapped) {}\n};\n\ntemplate <typename E>\nclass MallocOutputFile : public OutputFile<E> {\npublic:\n  MallocOutputFile(Context<E> &ctx, std::string path, i64 filesize, int perm)\n    : OutputFile<E>(path, filesize, false), ptr(new u8[filesize]),\n      perm(perm) {\n    this->buf = ptr.get();\n  }\n\n  void close(Context<E> &ctx) override {\n    Timer t(ctx, \"close_file\");\n    FILE *fp;\n\n    if (this->path == \"-\") {\n      fp = stdout;\n    } else {\n#ifdef _WIN32\n      int pmode = (perm & 0200) ? (_S_IREAD | _S_IWRITE) : _S_IREAD;\n      i64 fd = _open(this->path.c_str(), _O_RDWR | _O_CREAT | _O_BINARY, pmode);\n#else\n      i64 fd = ::open(this->path.c_str(), O_RDWR | O_CREAT, perm);\n#endif\n      if (fd == -1)\n        Fatal(ctx) << \"cannot open \" << this->path << \": \" << errno_string();\n#ifdef _WIN32\n      fp = _fdopen(fd, \"wb\");\n#else\n      fp = fdopen(fd, \"w\");\n#endif\n    }\n\n    fwrite(this->buf, this->filesize, 1, fp);\n    if (this->buf2)\n      fwrite(this->buf2, this->buf2_size, 1, fp);\n    fclose(fp);\n  }\n\nprivate:\n  std::unique_ptr<u8[]> ptr;\n  int perm;\n};\n\ntemplate <typename E>\nclass LockingOutputFile : public OutputFile<E> {\npublic:\n  LockingOutputFile(Context<E> &ctx, std::string path, int perm);\n  void resize(Context<E> &ctx, i64 filesize);\n  void close(Context<E> &ctx) override;\n};\n\n//\n// gdb-index.cc\n//\n\ntemplate <typename E> void write_gdb_index(Context<E> &ctx);\n\n//\n// input-files.cc\n//\n\n// A comdat section typically represents an inline function,\n// which are de-duplicated by the linker.\n//\n// For each inline function, there's one comdat section, which\n// contains section indices of the function code and its data such as\n// string literals, if any.\n//\n// Comdat sections are identified by its signature. If two comdat\n// sections have the same signature, the linker picks up one and\n// discards the other by eliminating all sections that the other\n// comdat section refers to.\nstruct ComdatGroup {\n  // The file priority of the owner file of this comdat section.\n  Atomic<u32> owner = -1;\n};\n\ntemplate <typename E>\nstruct ComdatGroupRef {\n  ComdatGroup *group;\n  i32 sect_idx;\n  std::span<U32<E>> members;\n};\n\ntemplate <typename E>\nclass MergeableSection {\npublic:\n  MergeableSection(Context<E> &ctx, MergedSection<E> &parent,\n                   std::unique_ptr<InputSection<E>> &isec);\n\n  void split_contents(Context<E> &ctx);\n  void resolve_contents(Context<E> &ctx);\n  std::pair<SectionFragment<E> *, i64> get_fragment(i64 offset);\n  std::string_view get_contents(i64 idx);\n\n  MergedSection<E> &parent;\n  u8 p2align = 0;\n  std::unique_ptr<InputSection<E>> input_section;\n  std::vector<SectionFragment<E> *> fragments;\n\nprivate:\n  std::vector<u32> frag_offsets;\n  std::vector<u32> hashes;\n};\n\n// InputFile is the base class of ObjectFile and SharedFile.\ntemplate <typename E>\nclass InputFile {\npublic:\n  InputFile(Context<E> &ctx, MappedFile *mf);\n  InputFile() : filename(\"<internal>\") {}\n\n  virtual ~InputFile() = default;\n\n  template <typename T>\n  std::span<T> get_data(Context<E> &ctx, const ElfShdr<E> &shdr);\n\n  template <typename T>\n  std::span<T> get_data(Context<E> &ctx, i64 idx);\n\n  std::string_view get_string(Context<E> &ctx, const ElfShdr<E> &shdr);\n  std::string_view get_string(Context<E> &ctx, i64 idx);\n  u32 get_eflags() { return ((ElfEhdr<E> *)mf->data)->e_flags; }\n\n  ElfShdr<E> *find_section(i64 type);\n\n  virtual void resolve_symbols(Context<E> &ctx) = 0;\n\n  virtual void\n  mark_live_objects(Context<E> &ctx,\n                    std::function<void(InputFile<E> *)> feeder) = 0;\n\n  std::span<Symbol<E> *> get_local_syms();\n  std::span<Symbol<E> *> get_global_syms();\n  std::string_view get_source_name() const;\n\n  MappedFile *mf = nullptr;\n  std::span<ElfShdr<E>> elf_sections;\n  std::span<ElfSym<E>> elf_syms;\n  std::vector<Symbol<E> *> symbols;\n  i64 first_global = 0;\n\n  std::string filename;\n  bool is_dso = false;\n  i64 priority;\n  Atomic<bool> is_reachable = false;\n  std::string_view shstrtab;\n  std::string_view symbol_strtab;\n\n  bool as_needed = false;\n  bool has_init_array = false;\n  bool has_ctors = false;\n\n  // To create an output .symtab\n  u64 local_symtab_idx = 0;\n  u64 global_symtab_idx = 0;\n  u64 num_local_symtab = 0;\n  u64 num_global_symtab = 0;\n  u64 strtab_offset = 0;\n  u64 strtab_size = 0;\n\n  // For --emit-relocs\n  std::vector<i32> output_sym_indices;\n\nprotected:\n  std::vector<Symbol<E>> local_syms;\n  std::vector<Symbol<E>> frag_syms;\n};\n\ntemplate <typename E>\nstruct ObjectFileExtras {};\n\ntemplate <is_riscv E>\nstruct ObjectFileExtras<E> {\n  std::optional<i64> stack_align;\n  std::optional<std::string_view> arch;\n  bool unaligned_access = false;\n};\n\ntemplate <>\nstruct ObjectFileExtras<PPC32> {\n  InputSection<PPC32> *got2 = nullptr;\n};\n\n// ObjectFile represents an input .o file.\ntemplate <typename E>\nclass ObjectFile : public InputFile<E> {\npublic:\n  ObjectFile() = default;\n\n  ObjectFile(Context<E> &ctx, MappedFile *mf, std::string archive_name)\n    : InputFile<E>(ctx, mf), archive_name(archive_name) {}\n\n  void parse(Context<E> &ctx);\n  void initialize_symbols(Context<E> &ctx);\n  void parse_ehframe(Context<E> &ctx);\n  void convert_mergeable_sections(Context<E> &ctx);\n  void reattach_section_pieces(Context<E> &ctx);\n  void resolve_symbols(Context<E> &ctx) override;\n  void mark_live_objects(Context<E> &ctx,\n                         std::function<void(InputFile<E> *)> feeder) override;\n  void convert_undefined_weak_symbols(Context<E> &ctx);\n  void scan_relocations(Context<E> &ctx);\n  void convert_common_symbols(Context<E> &ctx);\n  void compute_symtab_size(Context<E> &ctx);\n  void populate_symtab(Context<E> &ctx);\n\n  i64 get_shndx(const ElfSym<E> &esym);\n  InputSection<E> *get_section(const ElfSym<E> &esym);\n\n  std::string archive_name;\n  std::vector<std::unique_ptr<InputSection<E>>> sections;\n  std::vector<std::unique_ptr<MergeableSection<E>>> mergeable_sections;\n  std::vector<ElfShdr<E>> elf_sections2;\n  std::vector<CieRecord<E>> cies;\n  std::vector<FdeRecord<E>> fdes;\n  std::vector<bool> has_symver;\n  std::vector<ComdatGroupRef<E>> comdat_groups;\n  std::vector<InputSection<E> *> eh_frame_sections;\n  std::vector<std::vector<ElfRel<E>>> decoded_crel;\n  bool exclude_libs = false;\n  std::map<u32, u32> gnu_properties;\n  bool needs_executable_stack = false;\n  bool is_lto_obj = false;\n  bool is_gcc_offload_obj = false;\n  bool is_rust_obj = false;\n  bool is_dwarf32 = false;\n\n  i64 fde_idx = 0;\n  i64 fde_offset = 0;\n  i64 fde_size = 0;\n\n  // For ICF\n  std::unique_ptr<InputSection<E>> llvm_addrsig;\n\n  // For .gdb_index\n  InputSection<E> *debug_info = nullptr;\n  InputSection<E> *debug_pubnames = nullptr;\n  InputSection<E> *debug_pubtypes = nullptr;\n\n  // For LTO\n  std::vector<ElfSym<E>> lto_elf_syms;\n  std::vector<ComdatGroup *> lto_comdat_groups;\n\nprivate:\n  void initialize_sections(Context<E> &ctx);\n  void sort_relocations(Context<E> &ctx);\n  void initialize_ehframe_sections(Context<E> &ctx);\n  void parse_note_gnu_property(Context <E> &ctx, const ElfShdr <E> &shdr);\n  void override_symbol(Context<E> &ctx, Symbol<E> &sym,\n                       const ElfSym<E> &esym, i64 symidx);\n  void merge_visibility(Context<E> &ctx, Symbol<E> &sym, u8 visibility);\n\n  bool has_common_symbol = false;\n\n  const ElfShdr<E> *symtab_sec;\n  std::span<U32<E>> symtab_shndx_sec;\n\npublic:\n  // Target-specific member\n  [[no_unique_address]] ObjectFileExtras<E> extra;\n};\n\n// SharedFile represents an input .so file.\ntemplate <typename E>\nclass SharedFile : public InputFile<E> {\npublic:\n  SharedFile(Context<E> &ctx, MappedFile *mf) : InputFile<E>(ctx, mf) {}\n\n  void parse(Context<E> &ctx);\n  void resolve_symbols(Context<E> &ctx) override;\n  std::span<Symbol<E> *> get_symbols_at(Symbol<E> *sym);\n  i64 get_alignment(Symbol<E> *sym);\n  std::vector<std::string_view> get_dt_needed(Context<E> &ctx);\n  std::string_view get_dt_audit(Context<E> &ctx);\n  bool is_readonly(Symbol<E> *sym);\n\n  void mark_live_objects(Context<E> &ctx,\n                         std::function<void(InputFile<E> *)> feeder) override;\n\n  void compute_symtab_size(Context<E> &ctx);\n  void populate_symtab(Context<E> &ctx);\n\n  std::string soname;\n  std::vector<std::string_view> version_strings;\n  std::vector<Symbol<E> *> symbols2;\n  std::vector<ElfSym<E>> elf_syms2;\n\nprivate:\n  std::string get_soname(Context<E> &ctx);\n  void maybe_override_symbol(Symbol<E> &sym, const ElfSym<E> &esym);\n  std::vector<std::string_view> read_dt_needed(Context<E> &ctx);\n  std::vector<std::string_view> read_verdef(Context<E> &ctx);\n\n  std::vector<u16> versyms;\n  const ElfShdr<E> *symtab_sec;\n\n  // Used by get_symbols_at()\n  std::once_flag init_sorted_syms;\n  std::vector<Symbol<E> *> sorted_syms;\n};\n\n//\n// linker-script.cc\n//\n\nstruct ReaderContext {\n  bool as_needed = false;\n  bool in_lib = false;\n  bool static_ = false;\n  bool whole_archive = false;\n  tbb::task_group *tg = nullptr;\n};\n\nstruct DynamicPattern {\n  std::string_view pattern;\n  std::string_view source;\n  bool is_cpp = false;\n};\n\ntemplate <typename E>\nclass Script {\npublic:\n  Script(Context<E> &ctx, ReaderContext &rctx, MappedFile *mf)\n    : ctx(ctx), rctx(rctx), mf(mf) {}\n\n  std::string_view get_script_output_type();\n  void parse_linker_script();\n  void parse_version_script();\n  std::vector<DynamicPattern> parse_dynamic_list();\n\nprivate:\n  [[noreturn]] void error(std::string_view pos, std::string msg);\n\n  void tokenize();\n\n  std::span<std::string_view>\n  skip(std::span<std::string_view> tok, std::string_view str);\n\n  std::span<std::string_view> read_output_format(std::span<std::string_view> tok);\n  std::span<std::string_view> read_group(std::span<std::string_view> tok);\n\n  std::span<std::string_view>\n  read_version_script_commands(std::span<std::string_view> tok,\n                               std::string_view ver_str, u16 ver_idx,\n                               bool is_global, bool is_cpp);\n\n  std::span<std::string_view> read_version_script(std::span<std::string_view> tok);\n\n  MappedFile *resolve_path(std::string_view tok, bool check_target);\n\n  std::span<std::string_view>\n  read_dynamic_list_commands(std::span<std::string_view> tok,\n                             std::vector<DynamicPattern> &result, bool is_cpp);\n\n  Context<E> &ctx;\n  ReaderContext &rctx;\n  MappedFile *mf = mf;\n  std::once_flag once;\n  std::vector<std::string_view> tokens;\n};\n\ntemplate <typename E>\nstd::vector<DynamicPattern>\nparse_dynamic_list(Context<E> &ctx, std::string_view path);\n\n//\n// archive-file.cc\n//\n\ntemplate <typename E>\nstd::vector<MappedFile *>\nread_thin_archive_members(Context<E> &ctx, MappedFile *mf);\n\ntemplate <typename E>\nstd::vector<MappedFile *>\nread_fat_archive_members(Context<E> &ctx, MappedFile *mf);\n\ntemplate <typename E>\nstd::vector<MappedFile *>\nread_archive_members(Context<E> &ctx, MappedFile *mf);\n\n//\n// lto.cc\n//\n\ntemplate <typename E>\nObjectFile<E> *read_lto_object(Context<E> &ctx, MappedFile *mb);\n\ntemplate <typename E>\nstd::vector<ObjectFile<E> *> run_lto_plugin(Context<E> &ctx);\n\ntemplate <typename E>\nvoid lto_cleanup(Context<E> &ctx);\n\n//\n// shrink-sections.cc\n//\n\ninline i64 get_removed_bytes(std::span<RelocDelta> deltas, i64 i) {\n  if (i == 0)\n    return deltas[i].delta;\n  return deltas[i].delta - deltas[i - 1].delta;\n}\n\ntemplate <typename E>\nvoid shrink_sections(Context<E> &ctx);\n\ntemplate <typename E>\nvoid shrink_section(Context<E> &ctx, InputSection<E> &isec);\n\ntemplate <typename E>\ni64 get_r_delta(InputSection<E> &isec, u64 offset);\n\ntemplate <typename E>\ni64 compute_distance(Context<E> &ctx, Symbol<E> &sym,\n                     InputSection<E> &isec, const ElfRel<E> &rel);\n\n//\n// gc-sections.cc\n//\n\ntemplate <typename E>\nvoid gc_sections(Context<E> &ctx);\n\n//\n// icf.cc\n//\n\ntemplate <typename E>\nvoid icf_sections(Context<E> &ctx);\n\n//\n// relocatable.cc\n//\n\ntemplate <typename E>\nvoid combine_objects(Context<E> &ctx);\n\n//\n// mapfile.cc\n//\n\ntemplate <typename E>\nvoid print_map(Context<E> &ctx);\n\n//\n// subprocess.cc\n//\n\ntemplate <typename E>\nvoid fork_child();\n\ntemplate <typename E>\nvoid notify_parent();\n\ntemplate <typename E>\n[[noreturn]]\nvoid process_run_subcommand(Context<E> &ctx, int argc, char **argv);\n\n//\n// cmdline.cc\n//\n\ntemplate <typename E>\nstd::vector<std::string_view> expand_response_files(Context<E> &ctx, char **argv);\n\ntemplate <typename E>\nstd::vector<std::string> parse_nonpositional_args(Context<E> &ctx);\n\n//\n// passes.cc\n//\n\ntemplate <typename E> int redo_main(std::string_view, int argc, char **argv);\ntemplate <typename E> void create_internal_file(Context<E> &);\ntemplate <typename E> void apply_exclude_libs(Context<E> &);\ntemplate <typename E> void create_synthetic_sections(Context<E> &);\ntemplate <typename E> void set_file_priority(Context<E> &);\ntemplate <typename E> void resolve_symbols(Context<E> &);\ntemplate <typename E> void do_lto(Context<E> &);\ntemplate <typename E> void parse_eh_frame_sections(Context<E> &);\ntemplate <typename E> void create_merged_sections(Context<E> &);\ntemplate <typename E> void convert_common_symbols(Context<E> &);\ntemplate <typename E> void create_output_sections(Context<E> &);\ntemplate <typename E> void add_synthetic_symbols(Context<E> &);\ntemplate <typename E> void apply_section_align(Context<E> &);\ntemplate <typename E> void check_cet_errors(Context<E> &);\ntemplate <typename E> void print_dependencies(Context<E> &);\ntemplate <typename E> void write_repro_file(Context<E> &);\ntemplate <typename E> void check_duplicate_symbols(Context<E> &);\ntemplate <typename E> void convert_zero_to_bss(Context<E> &);\ntemplate <typename E> void check_shlib_undefined(Context<E> &);\ntemplate <typename E> void check_symbol_types(Context<E> &);\ntemplate <typename E> void sort_init_fini(Context<E> &);\ntemplate <typename E> void sort_ctor_dtor(Context<E> &);\ntemplate <typename E> void fixup_ctors_in_init_array(Context<E> &);\ntemplate <typename E> void shuffle_sections(Context<E> &);\ntemplate <typename E> void add_dynamic_strings(Context<E> &);\ntemplate <typename E> void compute_section_sizes(Context<E> &);\ntemplate <typename E> void sort_output_sections(Context<E> &);\ntemplate <typename E> void claim_unresolved_symbols(Context<E> &);\ntemplate <typename E> void scan_relocations(Context<E> &);\ntemplate <typename E> void compute_imported_symbol_weakness(Context<E> &);\ntemplate <typename E> void construct_relr(Context<E> &);\ntemplate <typename E> void sort_dynsyms(Context<E> &);\ntemplate <typename E> void sort_debug_info_sections(Context<E> &);\ntemplate <typename E> void create_output_symtab(Context<E> &);\ntemplate <typename E> void report_undef_errors(Context<E> &);\ntemplate <typename E> void create_reloc_sections(Context<E> &);\ntemplate <typename E> void copy_chunks(Context<E> &);\ntemplate <typename E> void apply_version_script(Context<E> &);\ntemplate <typename E> void parse_symbol_version(Context<E> &);\ntemplate <typename E> void compute_import_export(Context<E> &);\ntemplate <typename E> void compute_address_significance(Context<E> &);\ntemplate <typename E> void separate_debug_sections(Context<E> &);\ntemplate <typename E> void compute_section_headers(Context<E> &);\ntemplate <typename E> i64 set_osec_offsets(Context<E> &);\ntemplate <typename E> void fix_synthetic_symbols(Context<E> &);\ntemplate <typename E> void compress_debug_sections(Context<E> &);\ntemplate <typename E> void sort_reldyn(Context<E> &);\ntemplate <typename E> void write_build_id(Context<E> &);\ntemplate <typename E> void write_gnu_debuglink(Context<E> &);\ntemplate <typename E> void write_separate_debug_file(Context<E> &ctx);\ntemplate <typename E> void write_dependency_file(Context<E> &);\ntemplate <typename E> void show_stats(Context<E> &);\n\n//\n// arch-x86-64.cc\n//\n\nvoid rewrite_endbr(Context<X86_64> &ctx);\n\n//\n// arch-arm32.cc\n//\n\ntemplate <is_arm32 E>\nclass Arm32ExidxSection : public Chunk<E> {\npublic:\n  Arm32ExidxSection(OutputSection<E> &osec) : output_section(osec) {\n    this->name = \".ARM.exidx\";\n    this->shdr.sh_type = SHT_ARM_EXIDX;\n    this->shdr.sh_flags = SHF_ALLOC;\n    this->shdr.sh_addralign = 4;\n  }\n\n  void compute_section_size(Context<E> &ctx) override;\n  void update_shdr(Context<E> &ctx) override;\n  void remove_duplicate_entries(Context<E> &ctx);\n  void copy_buf(Context<E> &ctx) override;\n\nprivate:\n  std::vector<u8> get_contents(Context<E> &ctx);\n\n  OutputSection<E> &output_section;\n};\n\ntemplate <is_arm32 E>\nu64 get_eflags(Context<E> &ctx);\n\ntemplate <is_arm32 E>\nvoid create_arm_exidx_section(Context<E> &ctx);\n\nvoid arm32be_swap_bytes(Context<ARM32BE> &ctx);\n\n//\n// arch-riscv.cc\n//\n\ntemplate <is_riscv E>\nclass RiscvAttributesSection : public Chunk<E> {\npublic:\n  RiscvAttributesSection() {\n    this->name = \".riscv.attributes\";\n    this->shdr.sh_type = SHT_RISCV_ATTRIBUTES;\n  }\n\n  void update_shdr(Context<E> &ctx) override;\n  void copy_buf(Context<E> &ctx) override;\n\n  std::vector<u8> contents;\n};\n\ntemplate <is_riscv E>\nu64 get_eflags(Context<E> &ctx);\n\n//\n// arch-ppc64v1.cc\n//\n\nvoid ppc64v1_rewrite_opd(Context<PPC64V1> &ctx);\nvoid ppc64v1_scan_symbols(Context<PPC64V1> &ctx);\n\nclass PPC64OpdSection : public Chunk<PPC64V1> {\npublic:\n  PPC64OpdSection() {\n    this->name = \".opd\";\n    this->shdr.sh_type = SHT_PROGBITS;\n    this->shdr.sh_flags = SHF_ALLOC | SHF_WRITE;\n    this->shdr.sh_addralign = 8;\n  }\n\n  void add_symbol(Context<PPC64V1> &ctx, Symbol<PPC64V1> *sym);\n  i64 get_reldyn_size(Context<PPC64V1> &ctx) const override;\n  void copy_buf(Context<PPC64V1> &ctx) override;\n\n  static constexpr i64 ENTRY_SIZE = sizeof(Word<PPC64V1>) * 3;\n\n  std::vector<Symbol<PPC64V1> *> symbols;\n};\n\n//\n// arch-ppc64v2.cc\n//\n\nextern const std::vector<std::pair<std::string_view, u32>>\nppc64_save_restore_insns;\n\nclass PPC64SaveRestoreSection : public Chunk<PPC64V2> {\npublic:\n  PPC64SaveRestoreSection() {\n    this->name = \".save_restore_gprs\";\n    this->shdr.sh_type = SHT_PROGBITS;\n    this->shdr.sh_flags = SHF_ALLOC | SHF_EXECINSTR;\n    this->shdr.sh_addralign = 16;\n    this->shdr.sh_size = ppc64_save_restore_insns.size() * 4;\n  }\n\n  void copy_buf(Context<PPC64V2> &ctx) override;\n};\n\ntemplate <> u64 get_eflags(Context<PPC64V2> &ctx);\n\n//\n// main.cc\n//\n\nstruct BuildId {\n  i64 size() const {\n    switch (kind) {\n    case HEX:\n      return value.size();\n    case HASH:\n      return hash_size;\n    case UUID:\n      return 16;\n    default:\n      unreachable();\n    }\n  }\n\n  enum { NONE, HEX, HASH, UUID } kind = NONE;\n  std::vector<u8> value;\n  i64 hash_size = 0;\n};\n\ntypedef enum {\n  UNRESOLVED_ERROR,\n  UNRESOLVED_WARN,\n  UNRESOLVED_IGNORE,\n} UnresolvedKind;\n\ntypedef enum {\n  BSYMBOLIC_NONE,\n  BSYMBOLIC_ALL,\n  BSYMBOLIC_FUNCTIONS,\n  BSYMBOLIC_NON_WEAK,\n  BSYMBOLIC_NON_WEAK_FUNCTIONS,\n} BsymbolicKind;\n\ntypedef enum {\n  SEPARATE_LOADABLE_SEGMENTS,\n  SEPARATE_CODE,\n  NOSEPARATE_CODE,\n} SeparateCodeKind;\n\ntypedef enum {\n  CET_REPORT_NONE,\n  CET_REPORT_WARNING,\n  CET_REPORT_ERROR,\n} CetReportKind;\n\ntypedef enum {\n  SHUFFLE_SECTIONS_NONE,\n  SHUFFLE_SECTIONS_SHUFFLE,\n  SHUFFLE_SECTIONS_REVERSE,\n} ShuffleSectionsKind;\n\nstruct VersionPattern {\n  std::string_view pattern;\n  std::string_view source;\n  std::string_view ver_str;\n  i64 ver_idx = -1;\n  bool is_cpp = false;\n};\n\nstruct SectionOrder {\n  enum { NONE, SECTION, GROUP, ADDR, ALIGN, SYMBOL } type = NONE;\n  std::string name;\n  u64 value = 0;\n  std::string_view token; // for error reporting\n};\n\n// Target-specific context members\ntemplate <typename E>\nstruct ContextExtras {};\n\ntemplate <is_x86 E>\nstruct ContextExtras<E> {\n  NotePropertySection<E> *note_property = nullptr;\n};\n\ntemplate <is_arm32 E>\nstruct ContextExtras<E> {\n  Arm32ExidxSection<E> *exidx = nullptr;\n};\n\ntemplate <is_riscv E>\nstruct ContextExtras<E> {\n  RiscvAttributesSection<E> *riscv_attributes = nullptr;\n};\n\ntemplate <>\nstruct ContextExtras<PPC32> {\n  Symbol<PPC32> *_SDA_BASE_ = nullptr;\n};\n\ntemplate <>\nstruct ContextExtras<PPC64V1> {\n  PPC64OpdSection *opd = nullptr;\n  Symbol<PPC64V1> *TOC = nullptr;\n};\n\ntemplate <>\nstruct ContextExtras<PPC64V2> {\n  PPC64SaveRestoreSection *save_restore = nullptr;\n  Symbol<PPC64V2> *TOC = nullptr;\n  Atomic<bool> is_power10 = false;\n};\n\ntemplate <>\nstruct ContextExtras<SPARC64> {\n  Symbol<SPARC64> *tls_get_addr = nullptr;\n};\n\n// Context represents a context object for each invocation of the linker.\n// It contains command line flags, pointers to singleton objects\n// (such as linker-synthesized output sections), unique_ptrs for\n// resource management, and other miscellaneous objects.\ntemplate <typename E>\nstruct Context {\n  Context() {\n    arg.entry = get_symbol(*this, \"_start\");\n    arg.fini = get_symbol(*this, \"_fini\");\n    arg.init = get_symbol(*this, \"_init\");\n\n    if constexpr (is_sparc<E>)\n      extra.tls_get_addr = get_symbol(*this, \"__tls_get_addr\");\n  }\n\n  Context(const Context<E> &) = delete;\n\n  void checkpoint() {\n    if (has_error) {\n      cleanup();\n      _exit(1);\n    }\n  }\n\n  // Command-line arguments\n  struct {\n    BsymbolicKind Bsymbolic = BSYMBOLIC_NONE;\n    BuildId build_id;\n    CetReportKind z_cet_report = CET_REPORT_NONE;\n    Glob undefined_glob;\n    Glob unique;\n    SeparateCodeKind z_separate_code = NOSEPARATE_CODE;\n    ShuffleSectionsKind shuffle_sections = SHUFFLE_SECTIONS_NONE;\n    Symbol<E> *entry = nullptr;\n    Symbol<E> *fini = nullptr;\n    Symbol<E> *init = nullptr;\n    UnresolvedKind unresolved_symbols = UNRESOLVED_IGNORE;\n    bool allow_multiple_definition = false;\n    bool allow_shlib_undefined = true;\n    bool apply_dynamic_relocs = true;\n    bool be8 = false;\n    bool color_diagnostics = false;\n    bool default_symver = false;\n    bool demangle = true;\n    bool detach = true;\n    bool discard_all = false;\n    bool discard_locals = false;\n    bool dynamic_list_data = false;\n    bool eh_frame_hdr = true;\n    bool emit_relocs = false;\n    bool enable_new_dtags = true;\n    bool execute_only = false;\n    bool export_dynamic = false;\n    bool fatal_warnings = false;\n    bool fork = true;\n    bool gc_sections = false;\n    bool gdb_index = false;\n    bool hash_style_gnu = true;\n    bool hash_style_sysv = true;\n    bool icf = false;\n    bool icf_all = false;\n    bool ignore_data_address_equality = false;\n    bool lto_pass2 = false;\n    bool nmagic = false;\n    bool noinhibit_exec = false;\n    bool oformat_binary = false;\n    bool omagic = false;\n    bool pack_dyn_relocs_relr = false;\n    bool perf = false;\n    bool pic = false;\n    bool pie = false;\n    bool print_dependencies = false;\n    bool print_map = false;\n    bool quick_exit = true;\n    bool relax = true;\n    bool relocatable = false;\n    bool relocatable_merge_sections = false;\n    bool repro = false;\n    bool rosegment = true;\n    bool shared = false;\n    bool start_stop = false;\n    bool static_ = false;\n    bool stats = false;\n    bool strip_all = false;\n    bool strip_debug = false;\n    bool suppress_warnings = false;\n    bool trace = false;\n    bool undefined_version = false;\n    bool warn_common = false;\n    bool warn_once = false;\n    bool warn_textrel = false;\n    bool z_copyreloc = true;\n    bool z_delete = true;\n    bool z_dlopen = true;\n    bool z_dump = true;\n    bool z_dynamic_undefined_weak = true;\n    bool z_execstack = false;\n    bool z_execstack_if_needed = false;\n    bool z_ibt = false;\n    bool z_initfirst = false;\n    bool z_interpose = false;\n    bool z_keep_text_section_prefix = false;\n    bool z_nodefaultlib = false;\n    bool z_now = false;\n    bool z_origin = false;\n    bool z_relro = true;\n    bool z_rewrite_endbr = false;\n    bool z_rodynamic = false;\n    bool z_sectionheader = true;\n    bool z_shstk = false;\n    bool z_start_stop_visibility_protected = false;\n    bool z_text = false;\n    bool zero_to_bss = false;\n    i64 compress_debug_sections = ELFCOMPRESS_NONE;\n    i64 filler = -1;\n    i64 spare_dynamic_tags = 5;\n    i64 spare_program_headers = 0;\n    i64 z_stack_size = 0;\n    std::optional<i64> thread_count;\n    std::optional<std::vector<Symbol<E> *>> retain_symbols_file;\n    std::optional<u64> physical_image_base;\n    std::string Map;\n    std::string audit;\n    std::string chroot;\n    std::string depaudit;\n    std::string dependency_file;\n    std::string directory;\n    std::string dynamic_linker;\n    std::string output = \"a.out\";\n    std::string package_metadata;\n    std::string plugin;\n    std::string print_gc_sections;\n    std::string print_gc_sections_file;\n    std::string print_icf_sections;\n    std::string print_icf_sections_file;\n    std::string rpaths;\n    std::string separate_debug_file;\n    std::string soname;\n    std::string sysroot;\n    std::string_view emulation;\n    std::unordered_map<std::string_view, u64> section_align;\n    std::unordered_map<std::string_view, u64> section_start;\n    std::unordered_set<std::string_view> discard_section;\n    std::unordered_set<std::string_view> exclude_libs;\n    std::unordered_set<std::string_view> ignore_ir_file;\n    std::unordered_set<std::string_view> wrap;\n    std::vector<SectionOrder> section_order;\n    std::vector<Symbol<E> *> require_defined;\n    std::vector<Symbol<E> *> undefined;\n    std::vector<std::pair<Symbol<E> *, std::variant<Symbol<E> *, u64>>> defsyms;\n    std::vector<std::string> library_paths;\n    std::vector<std::string> plugin_opt;\n    std::vector<std::string> version_definitions;\n    std::vector<std::string_view> auxiliary;\n    std::vector<std::string_view> filter;\n    std::vector<std::string_view> trace_symbol;\n    u32 z_x86_64_isa_level = 0;\n    u64 image_base = 0x200000;\n    u64 shuffle_sections_seed = 0;\n  } arg;\n\n  std::optional<tbb::global_control> global_limit;\n  std::vector<VersionPattern> version_patterns;\n  std::vector<DynamicPattern> dynamic_list_patterns;\n  i64 default_version = VER_NDX_UNSPECIFIED;\n  i64 page_size = E::page_size;\n  bool has_error = false;\n\n  // Reader context\n  i64 file_priority = 10000;\n\n  // Symbol table\n  tbb::concurrent_hash_map<std::string_view, Symbol<E>, HashCmp> symbol_map;\n  tbb::concurrent_hash_map<std::string_view, ComdatGroup, HashCmp> comdat_groups;\n  tbb::concurrent_vector<std::unique_ptr<MergedSection<E>>> merged_sections;\n\n  tbb::concurrent_vector<std::unique_ptr<TimerRecord>> timer_records;\n  tbb::concurrent_vector<std::function<void()>> on_exit;\n\n  tbb::concurrent_vector<std::unique_ptr<ObjectFile<E>>> obj_pool;\n  tbb::concurrent_vector<std::unique_ptr<SharedFile<E>>> dso_pool;\n  tbb::concurrent_vector<std::unique_ptr<u8[]>> string_pool;\n  tbb::concurrent_vector<std::unique_ptr<MappedFile>> mf_pool;\n  tbb::concurrent_vector<std::unique_ptr<Chunk<E>>> chunk_pool;\n  tbb::concurrent_vector<std::unique_ptr<OutputSection<E>>> osec_pool;\n\n  // Symbol auxiliary data\n  std::vector<SymbolAux<E>> symbol_aux;\n\n  // Fully-expanded command line args\n  std::vector<std::string_view> cmdline_args;\n\n  // Input files\n  std::vector<ObjectFile<E> *> objs;\n  std::vector<SharedFile<E> *> dsos;\n\n  ObjectFile<E> *internal_obj = nullptr;\n  std::vector<ElfSym<E>> internal_esyms;\n\n  // Output buffer\n  std::unique_ptr<OutputFile<E>> output_file;\n  u8 *buf = nullptr;\n  bool overwrite_output_file = false;\n\n  std::vector<Chunk<E> *> chunks;\n  Atomic<bool> needs_tlsld = false;\n  Atomic<bool> has_textrel = false;\n  Atomic<i32> num_ifunc_dynrels = 0;\n\n  tbb::concurrent_hash_map<Symbol<E> *, std::vector<std::string>> undef_errors;\n\n  // For --separate-debug-file\n  std::vector<Chunk<E> *> debug_chunks;\n\n  // Output chunks\n  OutputEhdr<E> *ehdr = nullptr;\n  OutputShdr<E> *shdr = nullptr;\n  OutputPhdr<E> *phdr = nullptr;\n  InterpSection<E> *interp = nullptr;\n  GotSection<E> *got = nullptr;\n  GotPltSection<E> *gotplt = nullptr;\n  RelPltSection<E> *relplt = nullptr;\n  RelDynSection<E> *reldyn = nullptr;\n  RelrDynSection<E> *relrdyn = nullptr;\n  DynamicSection<E> *dynamic = nullptr;\n  StrtabSection<E> *strtab = nullptr;\n  DynstrSection<E> *dynstr = nullptr;\n  HashSection<E> *hash = nullptr;\n  GnuHashSection<E> *gnu_hash = nullptr;\n  GnuDebuglinkSection<E> *gnu_debuglink = nullptr;\n  ShstrtabSection<E> *shstrtab = nullptr;\n  PltSection<E> *plt = nullptr;\n  PltGotSection<E> *pltgot = nullptr;\n  SymtabSection<E> *symtab = nullptr;\n  SymtabShndxSection<E> *symtab_shndx = nullptr;\n  DynsymSection<E> *dynsym = nullptr;\n  EhFrameSection<E> *eh_frame = nullptr;\n  EhFrameHdrSection<E> *eh_frame_hdr = nullptr;\n  EhFrameRelocSection<E> *eh_frame_reloc = nullptr;\n  CopyrelSection<E> *copyrel = nullptr;\n  CopyrelSection<E> *copyrel_relro = nullptr;\n  VersymSection<E> *versym = nullptr;\n  VerneedSection<E> *verneed = nullptr;\n  VerdefSection<E> *verdef = nullptr;\n  BuildIdSection<E> *buildid = nullptr;\n  NotePackageSection<E> *note_package = nullptr;\n  GdbIndexSection<E> *gdb_index = nullptr;\n  RelroPaddingSection<E> *relro_padding = nullptr;\n  MergedSection<E> *comment = nullptr;\n\n  // For --gdb-index\n  std::span<u8> debug_info;\n  std::span<u8> debug_abbrev;\n  std::span<u8> debug_ranges;\n  std::span<u8> debug_addr;\n  std::span<u8> debug_rnglists;\n\n  // For thread-local variables\n  u64 tls_begin = 0;\n  u64 tp_addr = 0;\n  u64 dtp_addr = 0;\n\n  // Linker-synthesized symbols\n  Symbol<E> *_DYNAMIC = nullptr;\n  Symbol<E> *_GLOBAL_OFFSET_TABLE_ = nullptr;\n  Symbol<E> *_PROCEDURE_LINKAGE_TABLE_ = nullptr;\n  Symbol<E> *_TLS_MODULE_BASE_ = nullptr;\n  Symbol<E> *__GNU_EH_FRAME_HDR = nullptr;\n  Symbol<E> *__bss_start = nullptr;\n  Symbol<E> *__dso_handle = nullptr;\n  Symbol<E> *__ehdr_start = nullptr;\n  Symbol<E> *__executable_start = nullptr;\n  Symbol<E> *__exidx_end = nullptr;\n  Symbol<E> *__exidx_start = nullptr;\n  Symbol<E> *__fini_array_end = nullptr;\n  Symbol<E> *__fini_array_start = nullptr;\n  Symbol<E> *__global_pointer = nullptr;\n  Symbol<E> *__init_array_end = nullptr;\n  Symbol<E> *__init_array_start = nullptr;\n  Symbol<E> *__preinit_array_end = nullptr;\n  Symbol<E> *__preinit_array_start = nullptr;\n  Symbol<E> *__rel_iplt_end = nullptr;\n  Symbol<E> *__rel_iplt_start = nullptr;\n  Symbol<E> *_edata = nullptr;\n  Symbol<E> *_end = nullptr;\n  Symbol<E> *_etext = nullptr;\n  Symbol<E> *edata = nullptr;\n  Symbol<E> *end = nullptr;\n  Symbol<E> *etext = nullptr;\n\n  [[no_unique_address]] ContextExtras<E> extra;\n};\n\ntemplate <typename E>\nstd::string_view\nget_machine_type(Context<E> &ctx, ReaderContext &rctx, MappedFile *mf);\n\ntemplate <typename E>\nMappedFile *open_library(Context<E> &ctx, ReaderContext &rctx, std::string path);\n\ntemplate <typename E>\nMappedFile *find_library(Context<E> &ctx, ReaderContext &rctx, std::string path);\n\ntemplate <typename E>\nvoid read_file(Context<E> &ctx, ReaderContext &rctx, MappedFile *mf);\n\ntemplate <typename E>\nint mold_main(int argc, char **argv);\n\ntemplate <typename E>\nstd::ostream &operator<<(std::ostream &out, const InputFile<E> &file);\n\n//\n// Symbol\n//\n\nenum {\n  NEEDS_GOT       = 1 << 0,\n  NEEDS_PLT       = 1 << 1,\n  NEEDS_CPLT      = 1 << 2,\n  NEEDS_GOTTP     = 1 << 3,\n  NEEDS_TLSGD     = 1 << 4,\n  NEEDS_COPYREL   = 1 << 5,\n  NEEDS_TLSDESC   = 1 << 6,\n  NEEDS_PPC_OPD   = 1 << 7, // for PPCv1\n};\n\n// Flags for Symbol<E>::get_addr()\nenum {\n  NO_PLT = 1 << 0, // Request an address other than .plt\n  NO_OPD = 1 << 1, // Request an address other than .opd (PPC64V1 only)\n};\n\n// Symbol class represents a symbol. For each unique symbol name, we\n// create one instance of Symbol.\n//\n// A symbol has not only one but several different addresses if it\n// has PLT or GOT entries. This class provides various functions to\n// compute different addresses.\ntemplate <typename E>\nclass Symbol {\npublic:\n  Symbol() = default;\n\n  Symbol(std::string_view name, bool demangle)\n    : nameptr(name.data()), namelen(name.size()), demangle(demangle) {}\n\n  Symbol(const Symbol<E> &other) : Symbol(other.name(), other.demangle) {}\n\n  u64 get_addr(Context<E> &ctx, i64 flags = 0) const;\n  u64 get_got_addr(Context<E> &ctx) const;\n  u64 get_gotplt_addr(Context<E> &ctx) const;\n  u64 get_gottp_addr(Context<E> &ctx) const;\n  u64 get_tlsgd_addr(Context<E> &ctx) const;\n  u64 get_tlsdesc_addr(Context<E> &ctx) const;\n  u64 get_plt_addr(Context<E> &ctx) const;\n  u64 get_opd_addr(Context<E> &ctx) const;\n  u64 get_got_pltgot_addr(Context<E> &ctx) const;\n\n  void set_got_idx(Context<E> &ctx, i32 idx);\n  void set_gottp_idx(Context<E> &ctx, i32 idx);\n  void set_tlsgd_idx(Context<E> &ctx, i32 idx);\n  void set_tlsdesc_idx(Context<E> &ctx, i32 idx);\n  void set_plt_idx(Context<E> &ctx, i32 idx);\n  void set_pltgot_idx(Context<E> &ctx, i32 idx);\n  void set_opd_idx(Context<E> &ctx, i32 idx);\n  void set_dynsym_idx(Context<E> &ctx, i32 idx);\n\n  i32 get_got_idx(Context<E> &ctx) const;\n  i32 get_gottp_idx(Context<E> &ctx) const;\n  i32 get_tlsgd_idx(Context<E> &ctx) const;\n  i32 get_tlsdesc_idx(Context<E> &ctx) const;\n  i32 get_plt_idx(Context<E> &ctx) const;\n  i32 get_pltgot_idx(Context<E> &ctx) const;\n  i32 get_opd_idx(Context<E> &ctx) const;\n  i32 get_dynsym_idx(Context<E> &ctx) const;\n\n  bool has_plt(Context<E> &ctx) const;\n  bool has_got(Context<E> &ctx) const { return get_got_idx(ctx) != -1; }\n  bool has_gottp(Context<E> &ctx) const { return get_gottp_idx(ctx) != -1; }\n  bool has_tlsgd(Context<E> &ctx) const { return get_tlsgd_idx(ctx) != -1; }\n  bool has_tlsdesc(Context<E> &ctx) const { return get_tlsdesc_idx(ctx) != -1; }\n  bool has_opd(Context<E> &ctx) const { return get_opd_idx(ctx) != -1; }\n\n  u32 get_djb_hash(Context<E> &ctx) const;\n  void set_djb_hash(Context<E> &ctx, u32 hash);\n\n  void add_thunk_addr(Context<E> &ctx, u64 addr) requires needs_thunk<E>;\n  u64 get_thunk_addr(Context<E> &ctx, u64 P) const requires needs_thunk<E>;\n\n  bool is_absolute() const;\n  bool is_relative() const { return !is_absolute(); }\n  bool is_local(Context<E> &ctx) const;\n  bool is_ifunc() const { return get_type() == STT_GNU_IFUNC; }\n  bool is_pde_ifunc(Context<E> &ctx) const;\n  bool is_remaining_undef_weak() const;\n\n  bool is_pcrel_linktime_const(Context<E> &ctx) const;\n  bool is_tprel_linktime_const(Context<E> &ctx) const;\n  bool is_tprel_runtime_const(Context<E> &ctx) const;\n\n  InputSection<E> *get_input_section() const;\n  Chunk<E> *get_output_section() const;\n  SectionFragment<E> *get_frag() const;\n\n  void set_input_section(InputSection<E> *);\n  void set_output_section(Chunk<E> *);\n  void set_frag(SectionFragment<E> *);\n\n  void set_name(std::string_view);\n  std::string_view name() const;\n\n  u32 get_type() const;\n  std::string_view get_version() const;\n  i64 get_output_sym_idx(Context<E> &ctx) const;\n  const ElfSym<E> &esym() const;\n  void add_aux(Context<E> &ctx);\n\n  // A symbol is owned by a file. If two or more files define the\n  // same symbol, the one with the strongest definition owns the symbol.\n  // If `file` is null, the symbol is not defined by any input file.\n  InputFile<E> *file = nullptr;\n\n  // A symbol usually belongs to an input section, but it can belong\n  // to a section fragment, an output section or nothing\n  // (i.e. absolute symbol). `origin` holds one of them. We use the\n  // least significant two bits to distinguish type.\n  enum : uintptr_t {\n    TAG_ABS  = 0b00,\n    TAG_ISEC = 0b01,\n    TAG_OSEC = 0b10,\n    TAG_FRAG = 0b11,\n    TAG_MASK = 0b11,\n  };\n\n  // We want to make sure there are enough number of unused bits in\n  // pointers referring to these structures. In particular, we need\n  // __attribute__((aligned(4))) for m68k on which int, long, float\n  // and double are aligned only to two byte boundaries.\n  static_assert(alignof(InputSection<E>) >= 4);\n  static_assert(alignof(Chunk<E>) >= 4);\n  static_assert(alignof(SectionFragment<E>) >= 4);\n\n  uintptr_t origin = 0;\n\n  // `value` contains symbol value. If it's an absolute symbol, it is\n  // equivalent to its address. If it belongs to an input section or a\n  // section fragment, value is added to the base of the input section\n  // to yield an address.\n  u64 value = 0;\n\n  const char *nameptr = nullptr;\n  i32 namelen = 0;\n\n  // Index into the symbol table of the owner file.\n  i32 sym_idx = -1;\n\n  i32 aux_idx = -1;\n  u16 ver_idx = VER_NDX_UNSPECIFIED;\n\n  // `flags` has NEEDS_ flags.\n  Atomic<u8> flags = 0;\n\n  tbb::spin_mutex mu;\n  Atomic<u8> visibility = STV_DEFAULT;\n\n  bool is_weak : 1 = false;\n  bool write_to_symtab : 1 = false; // for --strip-all and the like\n  bool is_traced : 1 = false;       // for --trace-symbol\n  bool is_wrapped : 1 = false;      // for --wrap\n\n  // For symbols with default symbol version, e.g. foo@@VERSION.\n  bool is_versioned_default : 1 = false;\n\n  // If a symbol can be resolved to a symbol in a different ELF file at\n  // runtime, `is_imported` is true. If a symbol is a dynamic symbol and\n  // can be used by other ELF file at runtime, `is_exported` is true.\n  //\n  // Note that both can be true at the same time. Such symbol represents\n  // a function or data exported from this ELF file which can be\n  // imported by other definition at runtime. That is actually a usual\n  // exported symbol when creating a DSO. In other words, a dynamic\n  // symbol exported by a DSO is usually imported by itself.\n  //\n  // If is_imported is true and is_exported is false, it is a dynamic\n  // symbol just imported from other DSO.\n  //\n  // If is_imported is false and is_exported is true, there are two\n  // possible cases. If we are creating an executable, we know that\n  // exported symbols cannot be intercepted by any DSO (because the\n  // dynamic loader searches a dynamic symbol from an executable before\n  // examining any DSOs), so any exported symbol is export-only in an\n  // executable. If we are creating a DSO, export-only symbols\n  // represent a protected symbol (i.e. a symbol whose visibility is\n  // STV_PROTECTED).\n  bool is_imported : 1 = false;\n  bool is_exported : 1 = false;\n\n  // `is_canonical` is true if this symbol represents a \"canonical\" PLT.\n  // Here is the explanation as to what the canonical PLT is.\n  //\n  // In C/C++, the process-wide function pointer equality is guaranteed.\n  // That is, if you take an address of a function `foo`, it's always\n  // evaluated to the same address wherever you do that.\n  //\n  // For the sake of explanation, assume that `libx.so` exports a\n  // function symbol `foo`, and there's a program that uses `libx.so`.\n  // Both `libx.so` and the main executable take the address of `foo`,\n  // which must be evaluated to the same address because of the above\n  // guarantee.\n  //\n  // If the main executable is position-independent code (PIC), `foo` is\n  // evaluated to the beginning of the function code, as you would have\n  // expected. The address of `foo` is stored to GOTs, and the machine\n  // code that takes the address of `foo` reads the GOT entries at\n  // runtime.\n  //\n  // However, if it's not PIC, the main executable's code was compiled\n  // to not use GOT (note that shared objects are always PIC, only\n  // executables can be non-PIC). It instead assumes that `foo` (and any\n  // other global variables/functions) has an address that is fixed at\n  // link-time. This assumption is correct if `foo` is in the same\n  // position-dependent executable, but it's not if `foo` is imported\n  // from some other DSO at runtime.\n  //\n  // In this case, we use the address of the `foo`'s PLT entry in the\n  // main executable (whose address is fixed at link-time) as its\n  // address. In order to guarantee pointer equality, we also need to\n  // fill foo's GOT entries in DSOs with the addres of the foo's PLT\n  // entry instead of `foo`'s real address. We can do that by setting a\n  // symbol value to `foo`'s dynamic symbol. If a symbol value is set,\n  // the dynamic loader initialize `foo`'s GOT entries with that value\n  // instead of the symbol's real address.\n  //\n  // We call such PLT entry in the main executable as \"canonical\".\n  // If `foo` has a canonical PLT, its address is evaluated to its\n  // canonical PLT's address. Otherwise, it's evaluated to `foo`'s\n  // address.\n  //\n  // Only non-PIC main executables may have canonical PLTs. PIC\n  // executables and shared objects never have a canonical PLT.\n  //\n  // This bit manages if we need to make this symbol's PLT canonical.\n  // This bit is meaningful only when the symbol has a PLT entry.\n  bool is_canonical : 1 = false;\n\n  // If an input object file is not compiled with -fPIC (or with\n  // -fno-PIC), the file not position independent. That means the\n  // machine code included in the object file does not use GOT to access\n  // global variables. Instead, it assumes that addresses of global\n  // variables are known at link-time.\n  //\n  // Let's say `libx.so` exports a global variable `foo`, and a main\n  // executable uses the variable. If the executable is not compiled\n  // with -fPIC, we can't simply apply a relocation that refers `foo`\n  // because `foo`'s address is not known at link-time.\n  //\n  // In this case, we could print out the \"recompile with -fPIC\" error\n  // message, but there's a way to workaround.\n  //\n  // The loader supports a feature so-called \"copy relocations\".\n  // A copy relocation instructs the loader to copy data from a DSO to a\n  // specified location in the main executable. By using this feature,\n  // we can copy `foo`'s data to a BSS region at runtime. With that,\n  // we can apply relocations agianst `foo` as if `foo` existed in the\n  // main executable's BSS area, whose address is known at link-time.\n  //\n  // Copy relocations are used only by position-dependent executables.\n  // Position-independent executables and DSOs don't need them because\n  // they use GOT to access global variables.\n  //\n  // `has_copyrel` is true if we need to emit a copy relocation for this\n  // symbol. If the original symbol in a DSO is in a read-only memory\n  // region, `is_copyrel_readonly` is set to true so that the copied data\n  // will become read-only at run-time.\n  bool has_copyrel : 1 = false;\n  bool is_copyrel_readonly : 1 = false;\n\n  // For symbol resolution. This flag is used rarely. See a comment in\n  // resolve_symbols().\n  bool skip_dso : 1 = false;\n\n  // For --gc-sections\n  bool gc_root : 1 = false;\n\n  // For LTO. True if the symbol is referenced by a regular object (as\n  // opposed to IR object).\n  bool referenced_by_regular_obj : 1 = false;\n\n  // If true, we try to dmenagle the sybmol when printing.\n  bool demangle : 1 = false;\n};\n\ntemplate <typename E>\nSymbol<E> *get_symbol(Context<E> &ctx, std::string_view key,\n                      std::string_view name);\n\ntemplate <typename E>\nSymbol<E> *get_symbol(Context<E> &ctx, std::string_view name);\n\ntemplate <typename E>\nComdatGroup *insert_comdat_group(Context<E> &ctx, std::string_view name);\n\ntemplate <typename E>\nstd::string_view demangle(const Symbol<E> &sym);\n\ntemplate <typename E>\nstd::ostream &operator<<(std::ostream &out, const Symbol<E> &sym);\n\n//\n// Inline objects and functions\n//\n\ntemplate <typename E>\ninline std::ostream &\noperator<<(std::ostream &out, const InputSection<E> &isec) {\n  out << isec.file << \":(\" << isec.name() << \")\";\n  return out;\n}\n\ntemplate <typename E>\ninline void InputSection<E>::kill() {\n  if (is_alive.exchange(false))\n    for (FdeRecord<E> &fde : get_fdes())\n      fde.is_alive = false;\n}\n\ntemplate <typename E>\ninline u64 InputSection<E>::get_addr() const {\n  return output_section->shdr.sh_addr + offset;\n}\n\ntemplate <typename E>\ninline std::string_view InputSection<E>::name() const {\n  if (file.elf_sections.size() <= shndx)\n    return (shdr().sh_flags & SHF_TLS) ? \".tls_common\" : \".common\";\n  return file.shstrtab.data() + file.elf_sections[shndx].sh_name;\n}\n\ntemplate <typename E>\ninline i64 InputSection<E>::get_priority() const {\n  return ((i64)file.priority << 32) | shndx;\n}\n\ntemplate <typename E>\ni64 get_addend(u8 *loc, const ElfRel<E> &rel);\n\ntemplate <typename E> requires (E::is_rela && !is_sh4<E>)\ninline i64 get_addend(u8 *loc, const ElfRel<E> &rel) {\n  return rel.r_addend;\n}\n\ntemplate <typename E>\ni64 get_addend(InputSection<E> &isec, const ElfRel<E> &rel) {\n  return get_addend((u8 *)isec.contents.data() + rel.r_offset, rel);\n}\n\ntemplate <typename E>\nvoid write_addend(u8 *loc, i64 val, const ElfRel<E> &rel);\n\ntemplate <typename E> requires (E::is_rela && !is_sh4<E>)\nvoid write_addend(u8 *loc, i64 val, const ElfRel<E> &rel) {}\n\ntemplate <typename E>\ninline ElfShdr<E> &InputSection<E>::shdr() const {\n  if (shndx < file.elf_sections.size())\n    return file.elf_sections[shndx];\n  return file.elf_sections2[shndx - file.elf_sections.size()];\n}\n\ntemplate <typename E>\ninline std::span<ElfRel<E>> InputSection<E>::get_rels(Context<E> &ctx) const {\n  if (relsec_idx == -1)\n    return {};\n\n  ElfShdr<E> &shdr = file.elf_sections[relsec_idx];\n  if (shdr.sh_type == SHT_CREL)\n    return file.decoded_crel[relsec_idx];\n  return file.template get_data<ElfRel<E>>(ctx, shdr);\n}\n\ntemplate <typename E>\ninline std::span<FdeRecord<E>> InputSection<E>::get_fdes() const {\n  if (fde_begin == -1)\n    return {};\n  std::span<FdeRecord<E>> span(file.fdes);\n  return span.subspan(fde_begin, fde_end - fde_begin);\n}\n\ntemplate <typename E>\nstd::pair<SectionFragment<E> *, i64>\nInputSection<E>::get_fragment(Context<E> &ctx, const ElfRel<E> &rel) {\n  assert(!(shdr().sh_flags & SHF_ALLOC));\n\n  const ElfSym<E> &esym = file.elf_syms[rel.r_sym];\n  if (esym.is_abs() || esym.is_common() || esym.is_undef())\n    return {nullptr, 0};\n\n  i64 shndx = file.get_shndx(esym);\n  std::unique_ptr<MergeableSection<E>> &m = file.mergeable_sections[shndx];\n  if (!m)\n    return {nullptr, 0};\n\n  if (esym.st_type == STT_SECTION)\n    return m->get_fragment(esym.st_value + get_addend(*this, rel));\n\n  std::pair<SectionFragment<E> *, i64> p = m->get_fragment(esym.st_value);\n  return {p.first, p.second + get_addend(*this, rel)};\n}\n\n// Input object files may contain duplicate code for inline functions\n// and such. Linkers de-duplicate them at link-time. However, linkers\n// generaly don't remove debug info for de-duplicated functions because\n// doing that requires parsing the entire debug section.\n//\n// Instead, linkers write \"tombstone\" values to dead debug info records\n// instead of bogus values so that debuggers can skip them.\n//\n// This function returns a tombstone value for the symbol if the symbol\n// refers a dead debug info section.\ntemplate <typename E>\ninline std::optional<u64>\nInputSection<E>::get_tombstone(Symbol<E> &sym, SectionFragment<E> *frag) {\n  if (frag)\n    return {};\n\n  InputSection<E> *isec = sym.get_input_section();\n\n  // Setting a tombstone is a special feature for a dead debug section.\n  if (!isec || isec->is_alive)\n    return {};\n\n  std::string_view str = name();\n  if (!str.starts_with(\".debug_\"))\n    return {};\n\n  // If the section was dead due to ICF, we don't want to emit debug\n  // info for that section but want to set real values to .debug_line so\n  // that users can set a breakpoint inside a merged section.\n  if (isec->icf_removed() && str == \".debug_line\")\n    return {};\n\n  // 0 is an invalid value in most debug info sections, so we use it\n  // as a tombstone value. .debug_loc and .debug_ranges reserve 0 as\n  // the terminator marker, so we use 1 if that'str the case.\n  return (str == \".debug_loc\" || str == \".debug_ranges\") ? 1 : 0;\n}\n\ntemplate <typename E>\ninline bool InputSection<E>::icf_removed() const {\n  return this->leader && this->leader != this;\n}\n\ntemplate <typename E>\ninline void\nInputSection<E>::check_range(Context<E> &ctx, i64 i, i64 val, i64 lo, i64 hi) {\n  if (val < lo || hi <= val) {\n    const ElfRel<E> &rel = get_rels(ctx)[i];\n    Symbol<E> &sym = *file.symbols[rel.r_sym];\n    Error(ctx) << *this << \": relocation \" << rel << \" against \"\n               << sym << \" out of range: \" << val << \" is not in [\"\n               << lo << \", \" << hi << \")\";\n  }\n}\n\ntemplate <typename E>\nstd::pair<SectionFragment<E> *, i64>\nMergeableSection<E>::get_fragment(i64 offset) {\n  auto it = ranges::upper_bound(frag_offsets, offset);\n  i64 idx = it - 1 - frag_offsets.begin();\n  return {fragments[idx], offset - frag_offsets[idx]};\n}\n\ntemplate <typename E>\nstd::string_view MergeableSection<E>::get_contents(i64 i) {\n  i64 cur = frag_offsets[i];\n  if (i == frag_offsets.size() - 1)\n    return input_section->contents.substr(cur);\n  return input_section->contents.substr(cur, frag_offsets[i + 1] - cur);\n}\n\ntemplate <typename E>\ntemplate <typename T>\ninline std::span<T>\nInputFile<E>::get_data(Context<E> &ctx, const ElfShdr<E> &shdr) {\n  std::string_view view = this->get_string(ctx, shdr);\n  if (view.size() % sizeof(T))\n    Fatal(ctx) << *this << \": corrupted section\";\n  return {(T *)view.data(), view.size() / sizeof(T)};\n}\n\ntemplate <typename E>\ntemplate <typename T>\ninline std::span<T> InputFile<E>::get_data(Context<E> &ctx, i64 idx) {\n  if (elf_sections.size() <= idx)\n    Fatal(ctx) << *this << \": invalid section index\";\n  return this->template get_data<T>(elf_sections[idx]);\n}\n\ntemplate <typename E>\ninline std::string_view\nInputFile<E>::get_string(Context<E> &ctx, const ElfShdr<E> &shdr) {\n  u8 *begin = mf->data + shdr.sh_offset;\n  u8 *end = begin + shdr.sh_size;\n  if (mf->data + mf->size < end)\n    Fatal(ctx) << *this << \": section header is out of range: \" << shdr.sh_offset;\n  return {(char *)begin, (size_t)(end - begin)};\n}\n\ntemplate <typename E>\ninline std::string_view InputFile<E>::get_string(Context<E> &ctx, i64 idx) {\n  if (elf_sections.size() <= idx)\n    Fatal(ctx) << *this << \": invalid section index: \" << idx;\n  return this->get_string(ctx, elf_sections[idx]);\n}\n\ntemplate <typename E>\ninline std::span<Symbol<E> *> InputFile<E>::get_local_syms() {\n  return std::span<Symbol<E> *>(this->symbols).subspan(0, this->first_global);\n}\n\ntemplate <typename E>\ninline std::span<Symbol<E> *> InputFile<E>::get_global_syms() {\n  return std::span<Symbol<E> *>(this->symbols).subspan(this->first_global);\n}\n\ntemplate <typename E>\ninline i64 ObjectFile<E>::get_shndx(const ElfSym<E> &esym) {\n  assert(&this->elf_syms[0] <= &esym);\n  assert(&esym <= &this->elf_syms[this->elf_syms.size() - 1]);\n\n  if (esym.st_shndx == SHN_XINDEX)\n    return symtab_shndx_sec[&esym - &this->elf_syms[0]];\n  if (esym.st_shndx >= SHN_LORESERVE)\n    return 0;\n  return esym.st_shndx;\n}\n\ntemplate <typename E>\ninline InputSection<E> *ObjectFile<E>::get_section(const ElfSym<E> &esym) {\n  return sections[get_shndx(esym)].get();\n}\n\ntemplate <typename E>\nu64 Symbol<E>::get_addr(Context<E> &ctx, i64 flags) const {\n  if (SectionFragment<E> *frag = get_frag()) {\n    if (!frag->is_alive) {\n      // This condition is met if a non-alloc section refers an\n      // alloc section and if the referenced piece of data is\n      // garbage-collected. Typically, this condition occurs if a\n      // debug info section refers a string constant in .rodata.\n      return 0;\n    }\n\n    return frag->get_addr(ctx) + value;\n  }\n\n  if (has_copyrel) {\n    return is_copyrel_readonly\n      ? ctx.copyrel_relro->shdr.sh_addr + value\n      : ctx.copyrel->shdr.sh_addr + value;\n  }\n\n  if constexpr (is_ppc64v1<E>)\n    if (!(flags & NO_OPD) && has_opd(ctx))\n      return get_opd_addr(ctx);\n\n  if (!(flags & NO_PLT) && has_plt(ctx)) {\n    assert(is_imported || is_ifunc());\n    return get_plt_addr(ctx);\n  }\n\n  InputSection<E> *isec = get_input_section();\n  if (!isec)\n    return value; // absolute symbol\n\n  if (!isec->is_alive) {\n    if (isec->icf_removed())\n      return isec->leader->get_addr() + value;\n\n    if (isec->name() == \".eh_frame\") {\n      // .eh_frame contents are parsed and reconstructed by the linker,\n      // so pointing to a specific location in a source .eh_frame\n      // section doesn't make much sense. However, CRT files contain\n      // symbols pointing to the very beginning and ending of the section.\n      //\n      // If LTO is enabled, GCC may add `.lto_priv.<whatever>` as a symbol\n      // suffix. That's why we use starts_with() instead of `==` here.\n      if (name().starts_with(\"__EH_FRAME_BEGIN__\") ||\n          name().starts_with(\"__EH_FRAME_LIST__\") ||\n          name().starts_with(\".eh_frame_seg\") ||\n          esym().st_type == STT_SECTION)\n        return ctx.eh_frame->shdr.sh_addr;\n\n      if (name().starts_with(\"__FRAME_END__\") ||\n          name().starts_with(\"__EH_FRAME_LIST_END__\"))\n        return ctx.eh_frame->shdr.sh_addr + ctx.eh_frame->shdr.sh_size;\n\n      // ARM object files contain \"$d\" local symbol at the beginning\n      // of data sections. Their values are not significant for .eh_frame,\n      // so we just treat them as offset 0.\n      if (name() == \"$d\" || name().starts_with(\"$d.\"))\n        return ctx.eh_frame->shdr.sh_addr;\n\n      Fatal(ctx) << \"symbol referring to .eh_frame is not supported: \"\n                 << *this << \" \" << *file;\n    }\n\n    // The control can reach here if there's a relocation that refers\n    // a local symbol belonging to a comdat group section. This is a\n    // violation of the spec, as all relocations should use only global\n    // symbols of comdat members. However, .eh_frame tends to have such\n    // relocations.\n    return 0;\n  }\n\n  return isec->get_addr() + value;\n}\n\ntemplate <typename E>\ninline u64 Symbol<E>::get_got_addr(Context<E> &ctx) const {\n  return ctx.got->shdr.sh_addr + get_got_idx(ctx) * sizeof(Word<E>);\n}\n\ntemplate <typename E>\ninline u64 Symbol<E>::get_gotplt_addr(Context<E> &ctx) const {\n  assert(get_plt_idx(ctx) != -1);\n  return ctx.gotplt->shdr.sh_addr + GotPltSection<E>::HDR_SIZE +\n         get_plt_idx(ctx) * GotPltSection<E>::ENTRY_SIZE;\n}\n\ntemplate <typename E>\ninline u64 Symbol<E>::get_gottp_addr(Context<E> &ctx) const {\n  assert(get_gottp_idx(ctx) != -1);\n  return ctx.got->shdr.sh_addr + get_gottp_idx(ctx) * sizeof(Word<E>);\n}\n\ntemplate <typename E>\ninline u64 Symbol<E>::get_tlsgd_addr(Context<E> &ctx) const {\n  assert(get_tlsgd_idx(ctx) != -1);\n  return ctx.got->shdr.sh_addr + get_tlsgd_idx(ctx) * sizeof(Word<E>);\n}\n\ntemplate <typename E>\ninline u64 Symbol<E>::get_tlsdesc_addr(Context<E> &ctx) const {\n  assert(get_tlsdesc_idx(ctx) != -1);\n  return ctx.got->shdr.sh_addr + get_tlsdesc_idx(ctx) * sizeof(Word<E>);\n}\n\ntemplate <typename E>\ninline u64 to_plt_offset(i32 pltidx) {\n  if constexpr (is_ppc64v1<E>) {\n    // The PPC64 ELFv1 ABI requires PLT entries to vary in size\n    // depending on their indices. For entries whose PLT index is\n    // less than 32768, the entry size is 8 bytes. Other entries are\n    // 12 bytes long.\n    if (pltidx < 0x8000)\n      return E::plt_hdr_size + pltidx * 8;\n    return E::plt_hdr_size + 0x8000 * 8 + (pltidx - 0x8000) * 12;\n  } else {\n    return E::plt_hdr_size + pltidx * E::plt_size;\n  }\n}\n\ntemplate <typename E>\ninline u64 Symbol<E>::get_plt_addr(Context<E> &ctx) const {\n  if (i32 idx = get_plt_idx(ctx); idx != -1)\n    return ctx.plt->shdr.sh_addr + to_plt_offset<E>(idx);\n  return ctx.pltgot->shdr.sh_addr + get_pltgot_idx(ctx) * E::pltgot_size;\n}\n\ntemplate <typename E>\ninline u64 Symbol<E>::get_opd_addr(Context<E> &ctx) const {\n  assert(get_opd_idx(ctx) != -1);\n  return ctx.extra.opd->shdr.sh_addr +\n         get_opd_idx(ctx) * PPC64OpdSection::ENTRY_SIZE;\n}\n\ntemplate <typename E>\ninline u64 Symbol<E>::get_got_pltgot_addr(Context<E> &ctx) const {\n  // An ifunc symbol occupies two consecutive GOT slots in a\n  // position-dependent executable (PDE). The first slot contains the\n  // symbol's PLT address, and the second slot holds the resolved\n  // address. A PDE uses the ifunc symbol's PLT entry as the address\n  // for the symbol, akin to a canonical PLT.\n  //\n  // This function returns the address that the PLT entry should use\n  // to jump to the resolved address.\n  //\n  // Note that we don't use this function for PPC64. In PPC64, symbols\n  // are always accessed through the TOC table regardless of the\n  // -fno-PIE setting. We don't need canonical PLTs on the psABIs too.\n  if (is_pde_ifunc(ctx))\n    return get_got_addr(ctx) + sizeof(Word<E>);\n  return get_got_addr(ctx);\n}\n\ntemplate <typename E>\ninline void Symbol<E>::set_got_idx(Context<E> &ctx, i32 idx) {\n  assert(aux_idx != -1);\n  assert(ctx.symbol_aux[aux_idx].got_idx < 0);\n  ctx.symbol_aux[aux_idx].got_idx = idx;\n}\n\ntemplate <typename E>\ninline void Symbol<E>::set_gottp_idx(Context<E> &ctx, i32 idx) {\n  assert(aux_idx != -1);\n  assert(ctx.symbol_aux[aux_idx].gottp_idx < 0);\n  ctx.symbol_aux[aux_idx].gottp_idx = idx;\n}\n\ntemplate <typename E>\ninline void Symbol<E>::set_tlsgd_idx(Context<E> &ctx, i32 idx) {\n  assert(aux_idx != -1);\n  assert(ctx.symbol_aux[aux_idx].tlsgd_idx < 0);\n  ctx.symbol_aux[aux_idx].tlsgd_idx = idx;\n}\n\ntemplate <typename E>\ninline void Symbol<E>::set_tlsdesc_idx(Context<E> &ctx, i32 idx) {\n  assert(aux_idx != -1);\n  assert(ctx.symbol_aux[aux_idx].tlsdesc_idx < 0);\n  ctx.symbol_aux[aux_idx].tlsdesc_idx = idx;\n}\n\ntemplate <typename E>\ninline void Symbol<E>::set_plt_idx(Context<E> &ctx, i32 idx) {\n  assert(aux_idx != -1);\n  assert(ctx.symbol_aux[aux_idx].plt_idx < 0);\n  ctx.symbol_aux[aux_idx].plt_idx = idx;\n}\n\ntemplate <typename E>\ninline void Symbol<E>::set_pltgot_idx(Context<E> &ctx, i32 idx) {\n  assert(aux_idx != -1);\n  assert(ctx.symbol_aux[aux_idx].pltgot_idx < 0);\n  ctx.symbol_aux[aux_idx].pltgot_idx = idx;\n}\n\ntemplate <typename E>\ninline void Symbol<E>::set_opd_idx(Context<E> &ctx, i32 idx) {\n  assert(aux_idx != -1);\n  assert(ctx.symbol_aux[aux_idx].opd_idx < 0);\n  ctx.symbol_aux[aux_idx].opd_idx = idx;\n}\n\ntemplate <typename E>\ninline void Symbol<E>::set_dynsym_idx(Context<E> &ctx, i32 idx) {\n  assert(aux_idx != -1);\n  ctx.symbol_aux[aux_idx].dynsym_idx = idx;\n}\n\ntemplate <typename E>\ninline i32 Symbol<E>::get_got_idx(Context<E> &ctx) const {\n  return (aux_idx == -1) ? -1 : ctx.symbol_aux[aux_idx].got_idx;\n}\n\ntemplate <typename E>\ninline i32 Symbol<E>::get_gottp_idx(Context<E> &ctx) const {\n  return (aux_idx == -1) ? -1 : ctx.symbol_aux[aux_idx].gottp_idx;\n}\n\ntemplate <typename E>\ninline i32 Symbol<E>::get_tlsgd_idx(Context<E> &ctx) const {\n  return (aux_idx == -1) ? -1 : ctx.symbol_aux[aux_idx].tlsgd_idx;\n}\n\ntemplate <typename E>\ninline i32 Symbol<E>::get_tlsdesc_idx(Context<E> &ctx) const {\n  return (aux_idx == -1) ? -1 : ctx.symbol_aux[aux_idx].tlsdesc_idx;\n}\n\ntemplate <typename E>\ninline i32 Symbol<E>::get_plt_idx(Context<E> &ctx) const {\n  return (aux_idx == -1) ? -1 : ctx.symbol_aux[aux_idx].plt_idx;\n}\n\ntemplate <typename E>\ninline i32 Symbol<E>::get_pltgot_idx(Context<E> &ctx) const {\n  return (aux_idx == -1) ? -1 : ctx.symbol_aux[aux_idx].pltgot_idx;\n}\n\ntemplate <typename E>\ninline i32 Symbol<E>::get_opd_idx(Context<E> &ctx) const {\n  return (aux_idx == -1) ? -1 : ctx.symbol_aux[aux_idx].opd_idx;\n}\n\ntemplate <typename E>\ninline i32 Symbol<E>::get_dynsym_idx(Context<E> &ctx) const {\n  return (aux_idx == -1) ? -1 : ctx.symbol_aux[aux_idx].dynsym_idx;\n}\n\ntemplate <typename E>\ninline u32 Symbol<E>::get_djb_hash(Context<E> &ctx) const {\n  assert(aux_idx != -1);\n  return ctx.symbol_aux[aux_idx].djb_hash;\n}\n\ntemplate <typename E>\ninline void Symbol<E>::set_djb_hash(Context<E> &ctx, u32 hash) {\n  assert(aux_idx != -1);\n  ctx.symbol_aux[aux_idx].djb_hash = hash;\n}\n\ntemplate <typename E>\nvoid Symbol<E>::add_thunk_addr(Context<E> &ctx, u64 addr) requires needs_thunk<E> {\n  add_aux(ctx);\n  std::vector<u64> &vec = ctx.symbol_aux[aux_idx].thunk_addrs;\n  assert(vec.empty() || vec.back() < addr);\n  vec.push_back(addr);\n}\n\ntemplate <typename E>\nu64\nSymbol<E>::get_thunk_addr(Context<E> &ctx, u64 P) const requires needs_thunk<E> {\n  std::span<u64> vec = ctx.symbol_aux[aux_idx].thunk_addrs;\n  u64 lo = (P < branch_distance<E>) ? 0 : P - branch_distance<E>;\n  if (auto it = ranges::lower_bound(vec, lo);\n      it != vec.end())\n    if (i64 disp = *it - P;\n        -branch_distance<E> <= disp && disp < branch_distance<E>)\n      return *it;\n  Fatal(ctx) << \"range extension thunk out of range: \" << *this;\n}\n\ntemplate <typename E>\ninline bool Symbol<E>::has_plt(Context<E> &ctx) const {\n  return get_plt_idx(ctx) != -1 || get_pltgot_idx(ctx) != -1;\n}\n\ntemplate <typename E>\ninline bool Symbol<E>::is_absolute() const {\n  // An unresolved weak symbol acts as if it were an absolute address\n  // at address 0\n  if (is_remaining_undef_weak())\n    return true;\n\n  return !is_imported && !get_frag() && !get_input_section() &&\n         !get_output_section();\n}\n\ntemplate <typename E>\ninline bool Symbol<E>::is_local(Context<E> &ctx) const {\n  if (ctx.arg.relocatable)\n    return esym().st_bind == STB_LOCAL;\n  return !is_imported && !is_exported;\n}\n\ntemplate <typename E>\ninline bool Symbol<E>::is_pde_ifunc(Context<E> &ctx) const {\n  // Returns true if this is an ifunc tha uses two GOT slots\n  return is_ifunc() && !ctx.arg.pic && !is_ppc64<E>;\n}\n\n// A remaining weak undefined symbol is promoted to a dynamic symbol\n// in DSO and resolved to 0 in an executable. This function returns\n// true if it's latter.\ntemplate <typename E>\ninline bool Symbol<E>::is_remaining_undef_weak() const {\n  return !is_imported && esym().is_undef_weak();\n}\n\n// Returns true if the symbol's PC-relative address is known at link-time.\ntemplate <typename E>\ninline bool Symbol<E>::is_pcrel_linktime_const(Context<E> &ctx) const {\n  return !is_imported && !is_ifunc() && (is_relative() || !ctx.arg.pic);\n}\n\n// Returns true if the symbol's Thread Pointer-relative address is\n// known at link-time.\ntemplate <typename E>\ninline bool Symbol<E>::is_tprel_linktime_const(Context<E> &ctx) const {\n  assert(get_type() == STT_TLS);\n  return !ctx.arg.shared && !is_imported;\n}\n\n// Returns true if the symbol's Thread Pointer-relative address is\n// known at load-time.\ntemplate <typename E>\ninline bool Symbol<E>::is_tprel_runtime_const(Context<E> &ctx) const {\n  // Returns true unless we are creating a dlopen'able DSO.\n  assert(get_type() == STT_TLS);\n  return !(ctx.arg.shared && ctx.arg.z_dlopen);\n}\n\ntemplate <typename E>\ninline InputSection<E> *Symbol<E>::get_input_section() const {\n  if ((origin & TAG_MASK) == TAG_ISEC)\n    return (InputSection<E> *)(origin & ~TAG_MASK);\n  return nullptr;\n}\n\ntemplate <typename E>\ninline Chunk<E> *Symbol<E>::get_output_section() const {\n  if ((origin & TAG_MASK) == TAG_OSEC)\n    return (Chunk<E> *)(origin & ~TAG_MASK);\n  return nullptr;\n}\n\ntemplate <typename E>\ninline SectionFragment<E> *Symbol<E>::get_frag() const {\n  if ((origin & TAG_MASK) == TAG_FRAG)\n    return (SectionFragment<E> *)(origin & ~TAG_MASK);\n  return nullptr;\n}\n\ntemplate <typename E>\ninline void Symbol<E>::set_input_section(InputSection<E> *isec) {\n  uintptr_t addr = (uintptr_t)isec;\n  assert((addr & TAG_MASK) == 0);\n  origin = addr | TAG_ISEC;\n}\n\ntemplate <typename E>\ninline void Symbol<E>::set_output_section(Chunk<E> *osec) {\n  uintptr_t addr = (uintptr_t)osec;\n  assert((addr & TAG_MASK) == 0);\n  origin = addr | TAG_OSEC;\n}\n\ntemplate <typename E>\ninline void Symbol<E>::set_frag(SectionFragment<E> *frag) {\n  uintptr_t addr = (uintptr_t)frag;\n  assert((addr & TAG_MASK) == 0);\n  origin = addr | TAG_FRAG;\n}\n\ntemplate <typename E>\ninline u32 Symbol<E>::get_type() const {\n  if (esym().st_type == STT_GNU_IFUNC && file->is_dso)\n    return STT_FUNC;\n  return esym().st_type;\n}\n\ntemplate <typename E>\ninline std::string_view Symbol<E>::get_version() const {\n  if (file->is_dso) {\n    std::span<std::string_view> vers = ((SharedFile<E> *)file)->version_strings;\n    if (!vers.empty())\n      return vers[ver_idx];\n  }\n  return \"\";\n}\n\ntemplate <typename E>\ninline i64 Symbol<E>::get_output_sym_idx(Context<E> &ctx) const {\n  i64 i = file->output_sym_indices[sym_idx];\n  assert(i != -1);\n  if (is_local(ctx))\n    return file->local_symtab_idx + i;\n  return file->global_symtab_idx + i;\n}\n\ntemplate <typename E>\ninline const ElfSym<E> &Symbol<E>::esym() const {\n  return file->elf_syms[sym_idx];\n}\n\ntemplate <typename E>\ninline void Symbol<E>::set_name(std::string_view name) {\n  nameptr = name.data();\n  namelen = name.size();\n}\n\ntemplate <typename E>\ninline std::string_view Symbol<E>::name() const {\n  return {nameptr, (size_t)namelen};\n}\n\ntemplate <typename E>\ninline void Symbol<E>::add_aux(Context<E> &ctx) {\n  if (aux_idx == -1) {\n    aux_idx = ctx.symbol_aux.size();\n    ctx.symbol_aux.resize(aux_idx + 1);\n  }\n}\n\ninline bool is_c_identifier(std::string_view s) {\n  if (s.empty())\n    return false;\n\n  auto is_alpha = [](char c) {\n    return c == '_' || ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z');\n  };\n\n  auto is_alnum = [&](char c) {\n    return is_alpha(c) || ('0' <= c && c <= '9');\n  };\n\n  if (!is_alpha(s[0]))\n    return false;\n  for (i64 i = 1; i < s.size(); i++)\n    if (!is_alnum(s[i]))\n      return false;\n  return true;\n}\n\ntemplate <typename E>\nstd::string_view save_string(Context<E> &ctx, const std::string &str) {\n  u8 *buf = new u8[str.size() + 1];\n  memcpy(buf, str.data(), str.size());\n  buf[str.size()] = '\\0';\n  ctx.string_pool.emplace_back(buf);\n  return {(char *)buf, str.size()};\n}\n\n} // namespace mold\n"
  },
  {
    "path": "src/output-chunks.cc",
    "content": "#include \"mold.h\"\n\n#include <cctype>\n#include <set>\n#include <shared_mutex>\n#include <span>\n#include <tbb/parallel_for_each.h>\n#include <tbb/parallel_scan.h>\n#include <tbb/parallel_sort.h>\n\nnamespace mold {\n\n// The hash function for .hash.\nstatic u32 elf_hash(std::string_view name) {\n  u32 h = 0;\n  for (u8 c : name) {\n    h = (h << 4) + c;\n    u32 g = h & 0xf0000000;\n    if (g != 0)\n      h ^= g >> 24;\n    h &= ~g;\n  }\n  return h;\n}\n\ntemplate <typename E>\nChunk<E> *find_chunk(Context<E> &ctx, u32 sh_type) {\n  for (Chunk<E> *chunk : ctx.chunks)\n    if (chunk->shdr.sh_type == sh_type)\n      return chunk;\n  return nullptr;\n}\n\ntemplate <typename E>\nChunk<E> *find_chunk(Context<E> &ctx, std::string_view name) {\n  for (Chunk<E> *chunk : ctx.chunks)\n    if (chunk->name == name)\n      return chunk;\n  return nullptr;\n}\n\ntemplate <typename E>\nstatic u64 get_entry_addr(Context<E> &ctx) {\n  if (ctx.arg.relocatable)\n    return 0;\n\n  if (InputFile<E> *file = ctx.arg.entry->file)\n    if (!file->is_dso)\n      return ctx.arg.entry->get_addr(ctx);\n\n  if (!ctx.arg.shared)\n    Warn(ctx) << \"entry symbol is not defined: \" << *ctx.arg.entry;\n  return 0;\n}\n\ntemplate <typename E>\nvoid OutputEhdr<E>::copy_buf(Context<E> &ctx) {\n  ElfEhdr<E> &hdr = *(ElfEhdr<E> *)(ctx.buf + this->shdr.sh_offset);\n  memset(&hdr, 0, sizeof(hdr));\n\n  memcpy(&hdr.e_ident, \"\\177ELF\", 4);\n  hdr.e_ident[EI_CLASS] = E::is_64 ? ELFCLASS64 : ELFCLASS32;\n  hdr.e_ident[EI_DATA] = E::is_le ? ELFDATA2LSB : ELFDATA2MSB;\n  hdr.e_ident[EI_VERSION] = EV_CURRENT;\n  hdr.e_machine = E::e_machine;\n  hdr.e_version = EV_CURRENT;\n  hdr.e_entry = get_entry_addr(ctx);\n  hdr.e_flags = get_eflags(ctx);\n  hdr.e_ehsize = sizeof(ElfEhdr<E>);\n\n  // If e_shstrndx is too large, a dummy value is set to e_shstrndx.\n  // The real value is stored to the zero'th section's sh_link field.\n  if (ctx.shstrtab) {\n    if (ctx.shstrtab->shndx < SHN_LORESERVE)\n      hdr.e_shstrndx = ctx.shstrtab->shndx;\n    else\n      hdr.e_shstrndx = SHN_XINDEX;\n  }\n\n  if (ctx.arg.relocatable)\n    hdr.e_type = ET_REL;\n  else if (ctx.arg.pic)\n    hdr.e_type = ET_DYN;\n  else\n    hdr.e_type = ET_EXEC;\n\n  if (ctx.phdr) {\n    hdr.e_phoff = ctx.phdr->shdr.sh_offset;\n    hdr.e_phentsize = sizeof(ElfPhdr<E>);\n    hdr.e_phnum = ctx.phdr->shdr.sh_size / sizeof(ElfPhdr<E>);\n  }\n\n  if (ctx.shdr) {\n    hdr.e_shoff = ctx.shdr->shdr.sh_offset;\n    hdr.e_shentsize = sizeof(ElfShdr<E>);\n\n    // Since e_shnum is a 16-bit integer field, we can't store a very\n    // large value there. If it is >65535, the real value is stored to\n    // the zero'th section's sh_size field.\n    i64 shnum = ctx.shdr->shdr.sh_size / sizeof(ElfShdr<E>);\n    hdr.e_shnum = (shnum <= UINT16_MAX) ? shnum : 0;\n  }\n}\n\ntemplate <typename E>\nvoid OutputShdr<E>::copy_buf(Context<E> &ctx) {\n  ElfShdr<E> *hdr = (ElfShdr<E> *)(ctx.buf + this->shdr.sh_offset);\n  memset(hdr, 0, this->shdr.sh_size);\n\n  if (ctx.shstrtab && SHN_LORESERVE <= ctx.shstrtab->shndx)\n    hdr[0].sh_link = ctx.shstrtab->shndx;\n\n  i64 shnum = ctx.shdr->shdr.sh_size / sizeof(ElfShdr<E>);\n  if (UINT16_MAX < shnum)\n    hdr[0].sh_size = shnum;\n\n  for (Chunk<E> *chunk : ctx.chunks)\n    if (chunk->shndx)\n      hdr[chunk->shndx] = chunk->shdr;\n}\n\ntemplate <typename E>\ni64 to_phdr_flags(Context<E> &ctx, Chunk<E> *chunk) {\n  // All sections are put into a single RWX segment if --omagic\n  if (ctx.arg.omagic)\n    return PF_R | PF_W | PF_X;\n\n  bool write = (chunk->shdr.sh_flags & SHF_WRITE);\n  bool exec = (chunk->shdr.sh_flags & SHF_EXECINSTR);\n\n  // .text is not readable if --execute-only\n  if (exec && ctx.arg.execute_only) {\n    if (write)\n      Error(ctx) << \"--execute-only is not compatible with writable section: \"\n                 << chunk->name;\n    return PF_X;\n  }\n\n  // .rodata is merged with .text if --no-rosegment\n  if (!write && !ctx.arg.rosegment)\n    exec = true;\n\n  return PF_R | (write ? PF_W : PF_NONE) | (exec ? PF_X : PF_NONE);\n}\n\ntemplate <typename E>\nstatic std::vector<ElfPhdr<E>> create_phdr(Context<E> &ctx) {\n  std::vector<ElfPhdr<E>> vec;\n\n  auto define = [&](u64 type, u64 flags, Chunk<E> *chunk) {\n    ElfPhdr<E> phdr = {};\n    phdr.p_type = type;\n    phdr.p_flags = flags;\n    phdr.p_align = chunk->shdr.sh_addralign;\n\n    if (chunk->shdr.sh_type == SHT_NOBITS) {\n      // p_offset indicates the in-file start offset and is not\n      // significant for segments with zero on-file size. We still want to\n      // keep it congruent with the virtual address modulo page size\n      // because some loaders (at least FreeBSD's) are picky about it.\n      phdr.p_offset = chunk->shdr.sh_addr % ctx.page_size;\n    } else {\n      phdr.p_offset = chunk->shdr.sh_offset;\n      phdr.p_filesz = chunk->shdr.sh_size;\n    }\n\n    phdr.p_vaddr = chunk->shdr.sh_addr;\n    phdr.p_paddr = chunk->shdr.sh_addr;\n\n    if (chunk->shdr.sh_flags & SHF_ALLOC)\n      phdr.p_memsz = chunk->shdr.sh_size;\n    vec.push_back(phdr);\n  };\n\n  auto append = [&](Chunk<E> *chunk) {\n    ElfPhdr<E> &phdr = vec.back();\n    phdr.p_align = std::max<u64>(phdr.p_align, chunk->shdr.sh_addralign);\n    phdr.p_memsz = chunk->shdr.sh_addr + chunk->shdr.sh_size - phdr.p_vaddr;\n    if (chunk->shdr.sh_type != SHT_NOBITS)\n      phdr.p_filesz = phdr.p_memsz;\n  };\n\n  auto is_bss = [](Chunk<E> *chunk) {\n    return chunk->shdr.sh_type == SHT_NOBITS;\n  };\n\n  auto is_tbss = [](Chunk<E> *chunk) {\n    return chunk->shdr.sh_type == SHT_NOBITS &&\n           (chunk->shdr.sh_flags & SHF_TLS);\n  };\n\n  auto is_note = [](Chunk<E> *chunk) {\n    return chunk->shdr.sh_type == SHT_NOTE;\n  };\n\n  // When we are creating PT_LOAD segments, we consider only\n  // the following chunks.\n  std::vector<Chunk<E> *> chunks;\n  for (Chunk<E> *chunk : ctx.chunks)\n    if ((chunk->shdr.sh_flags & SHF_ALLOC) && !is_tbss(chunk))\n      chunks.push_back(chunk);\n\n  // The ELF spec says that \"loadable segment entries in the program\n  // header table appear in ascending order, sorted on the p_vaddr\n  // member\".\n  ranges::stable_sort(chunks, {}, [](Chunk<E> *x) { return x->shdr.sh_addr; });\n\n  // Create a PT_PHDR for the program header itself.\n  if (ctx.phdr && (ctx.phdr->shdr.sh_flags & SHF_ALLOC))\n    define(PT_PHDR, PF_R, ctx.phdr);\n\n  // Create a PT_INTERP.\n  if (ctx.interp)\n    define(PT_INTERP, PF_R, ctx.interp);\n\n  // Create a PT_NOTE for SHF_NOTE sections.\n  for (i64 i = 0; i < chunks.size();) {\n    Chunk<E> *first = chunks[i++];\n    if (is_note(first)) {\n      i64 flags = to_phdr_flags(ctx, first);\n      define(PT_NOTE, flags, first);\n\n      while (i < chunks.size() &&\n             is_note(ctx.chunks[i]) &&\n             to_phdr_flags(ctx, ctx.chunks[i]) == flags)\n        append(ctx.chunks[i++]);\n    }\n  }\n\n  // Create PT_LOAD segments.\n  for (i64 i = 0; i < chunks.size();) {\n    Chunk<E> *first = chunks[i++];\n    i64 flags = to_phdr_flags(ctx, first);\n    define(PT_LOAD, flags, first);\n    vec.back().p_align = std::max<u64>(ctx.page_size, vec.back().p_align);\n\n    // Add contiguous ALLOC sections as long as they have the same\n    // section flags and there's no on-disk gap in between.\n    if (!is_bss(first))\n      while (i < chunks.size() &&\n             !is_bss(chunks[i]) &&\n             to_phdr_flags(ctx, chunks[i]) == flags &&\n             chunks[i]->shdr.sh_offset - first->shdr.sh_offset ==\n             chunks[i]->shdr.sh_addr - first->shdr.sh_addr)\n        append(chunks[i++]);\n\n    while (i < chunks.size() &&\n           is_bss(chunks[i]) &&\n           to_phdr_flags(ctx, chunks[i]) == flags)\n      append(chunks[i++]);\n  }\n\n  // Create a PT_TLS.\n  for (i64 i = 0; i < ctx.chunks.size();) {\n    Chunk<E> *first = ctx.chunks[i++];\n    if (first->shdr.sh_flags & SHF_TLS) {\n      define(PT_TLS, PF_R, first);\n      while (i < ctx.chunks.size() &&\n             (ctx.chunks[i]->shdr.sh_flags & SHF_TLS))\n        append(ctx.chunks[i++]);\n    }\n  }\n\n  // Add PT_DYNAMIC\n  if (ctx.dynamic && ctx.dynamic->shdr.sh_size)\n    define(PT_DYNAMIC, to_phdr_flags(ctx, ctx.dynamic), ctx.dynamic);\n\n  // Add PT_GNU_EH_FRAME\n  if (ctx.eh_frame_hdr)\n    define(PT_GNU_EH_FRAME, PF_R, ctx.eh_frame_hdr);\n\n  // Add PT_GNU_PROPERTY\n  if (Chunk<E> *chunk = find_chunk(ctx, \".note.gnu.property\"))\n    define(PT_GNU_PROPERTY, PF_R, chunk);\n\n  // Add PT_GNU_STACK, which is a marker segment that doesn't really\n  // contain any segments. It controls executable bit of stack area.\n  {\n    ElfPhdr<E> phdr = {};\n    phdr.p_type = PT_GNU_STACK;\n    phdr.p_flags = ctx.arg.z_execstack ? (PF_R | PF_W | PF_X) : (PF_R | PF_W);\n    phdr.p_memsz = ctx.arg.z_stack_size;\n    phdr.p_align = 1;\n    vec.push_back(phdr);\n  }\n\n  // Create a PT_GNU_RELRO.\n  if (ctx.arg.z_relro) {\n    for (i64 i = 0; i < chunks.size();) {\n      Chunk<E> *first = chunks[i++];\n      if (first->is_relro) {\n        define(PT_GNU_RELRO, PF_R, first);\n        while (i < chunks.size() && chunks[i]->is_relro)\n          append(chunks[i++]);\n        vec.back().p_align = 1;\n      }\n    }\n  }\n\n  // Create a PT_ARM_EDXIDX\n  if constexpr (is_arm32<E>)\n    if (ctx.extra.exidx)\n      define(PT_ARM_EXIDX, PF_R, ctx.extra.exidx);\n\n  // Create a PT_RISCV_ATTRIBUTES\n  if constexpr (is_riscv<E>)\n    if (ctx.extra.riscv_attributes->shdr.sh_size)\n      define(PT_RISCV_ATTRIBUTES, PF_R, ctx.extra.riscv_attributes);\n\n  // Create a PT_OPENBSD_RANDOMIZE\n  for (Chunk<E> *chunk : ctx.chunks)\n    if (chunk->name == \".openbsd.randomdata\")\n      define(PT_OPENBSD_RANDOMIZE, PF_R | PF_W, chunk);\n\n  // Set p_paddr if --physical-image-base was given. --physical-image-base\n  // is typically used in embedded programming to specify the base address\n  // of a memory-mapped ROM area. In that environment, paddr refers to a\n  // segment's initial location in ROM and vaddr refers the its run-time\n  // address.\n  //\n  // When a device is turned on, it start executing code at a fixed\n  // location in the ROM area. At that location is a startup routine that\n  // copies data or code from ROM to RAM before using them.\n  //\n  // .data must have different paddr and vaddr because ROM is not writable.\n  // paddr of .rodata and .text may or may be equal to vaddr. They can be\n  // directly read or executed from ROM, but oftentimes they are copied\n  // from ROM to RAM because Flash or EEPROM are usually much slower than\n  // DRAM.\n  //\n  // We want to keep vaddr == pvaddr for as many segments as possible so\n  // that they can be directly read/executed from ROM. If a gap between\n  // two segments is two page size or larger, we give up and pack segments\n  // tightly so that we don't waste too much ROM area.\n  if (ctx.arg.physical_image_base) {\n    for (i64 i = 0; i < vec.size(); i++) {\n      if (vec[i].p_type != PT_LOAD)\n        continue;\n\n      u64 addr = *ctx.arg.physical_image_base;\n      bool in_sync = (vec[i].p_vaddr == addr);\n\n      vec[i].p_paddr = addr;\n      addr += vec[i].p_memsz;\n\n      for (i++; i < vec.size() && vec[i].p_type == PT_LOAD; i++) {\n        ElfPhdr<E> &p = vec[i];\n        if (in_sync && addr <= p.p_vaddr && p.p_vaddr < addr + ctx.page_size * 2) {\n          p.p_paddr = p.p_vaddr;\n          addr = p.p_vaddr + p.p_memsz;\n        } else {\n          in_sync = false;\n          p.p_paddr = addr;\n          addr += p.p_memsz;\n        }\n      }\n      break;\n    }\n  }\n\n  vec.resize(vec.size() + ctx.arg.spare_program_headers);\n  return vec;\n}\n\ntemplate <typename E>\nvoid OutputPhdr<E>::update_shdr(Context<E> &ctx) {\n  phdrs = create_phdr(ctx);\n  this->shdr.sh_size = phdrs.size() * sizeof(ElfPhdr<E>);\n\n  for (ElfPhdr<E> &phdr : phdrs) {\n    if (phdr.p_type == PT_TLS) {\n      ctx.tls_begin = phdr.p_vaddr;\n      ctx.tp_addr = get_tp_addr(phdr);\n      ctx.dtp_addr = get_dtp_addr(phdr);\n      break;\n    }\n  }\n}\n\ntemplate <typename E>\nvoid OutputPhdr<E>::copy_buf(Context<E> &ctx) {\n  write_vector(ctx.buf + this->shdr.sh_offset, phdrs);\n}\n\ntemplate <typename E>\nvoid InterpSection<E>::update_shdr(Context<E> &ctx) {\n  this->shdr.sh_size = ctx.arg.dynamic_linker.size() + 1;\n}\n\ntemplate <typename E>\nvoid InterpSection<E>::copy_buf(Context<E> &ctx) {\n  write_string(ctx.buf + this->shdr.sh_offset, ctx.arg.dynamic_linker);\n}\n\ntemplate <typename E>\nvoid RelDynSection<E>::update_shdr(Context<E> &ctx) {\n  i64 offset = 0;\n\n  for (Chunk<E> *chunk : ctx.chunks) {\n    chunk->reldyn_offset = offset;\n    offset += chunk->get_reldyn_size(ctx) * sizeof(ElfRel<E>);\n  }\n\n  this->shdr.sh_size = offset;\n  this->shdr.sh_link = ctx.dynsym->shndx;\n}\n\ntemplate <typename E>\nvoid RelrDynSection<E>::update_shdr(Context<E> &ctx) {\n  i64 n = 0;\n  for (Chunk<E> *chunk : ctx.chunks)\n    n += chunk->relr.size();\n  this->shdr.sh_size = n * sizeof(Word<E>);\n}\n\ntemplate <typename E>\nvoid RelrDynSection<E>::copy_buf(Context<E> &ctx) {\n  Word<E> *buf = (Word<E> *)(ctx.buf + this->shdr.sh_offset);\n\n  for (Chunk<E> *chunk : ctx.chunks)\n    for (u64 val : chunk->relr)\n      *buf++ = (val & 1) ? val : (chunk->shdr.sh_addr + val);\n}\n\ntemplate <typename E>\nvoid StrtabSection<E>::update_shdr(Context<E> &ctx) {\n  i64 offset = 1;\n\n  // ARM32 uses $a, $t and $t mapping symbols to mark the beginning of\n  // ARM, Thumb and data in text, respectively. These symbols don't\n  // affect correctness of the program but helps disassembler to\n  // disassemble machine code appropriately.\n  if constexpr (is_arm32<E>)\n    if (!ctx.arg.strip_all)\n      offset += sizeof(\"$a\\0$t\\0$d\");\n\n  for (Chunk<E> *chunk : ctx.chunks) {\n    chunk->strtab_offset = offset;\n    offset += chunk->strtab_size;\n  }\n\n  for (ObjectFile<E> *file : ctx.objs) {\n    file->strtab_offset = offset;\n    offset += file->strtab_size;\n  }\n\n  for (SharedFile<E> *file : ctx.dsos) {\n    file->strtab_offset = offset;\n    offset += file->strtab_size;\n  }\n\n  this->shdr.sh_size = (offset == 1) ? 0 : offset;\n}\n\ntemplate <typename E>\nvoid StrtabSection<E>::copy_buf(Context<E> &ctx) {\n  u8 *buf = ctx.buf + this->shdr.sh_offset;\n  buf[0] = '\\0';\n\n  if constexpr (is_arm32<E>)\n    if (!ctx.arg.strip_all)\n      memcpy(buf + 1, \"$a\\0$t\\0$d\", 9);\n}\n\ntemplate <typename E>\nvoid ShstrtabSection<E>::update_shdr(Context<E> &ctx) {\n  std::unordered_map<std::string_view, i64> map;\n  i64 offset = 1;\n\n  for (Chunk<E> *chunk : ctx.chunks) {\n    if (!chunk->is_header() && !chunk->name.empty()) {\n      auto [it, inserted] = map.insert({chunk->name, offset});\n      chunk->shdr.sh_name = it->second;\n      if (inserted)\n        offset += chunk->name.size() + 1;\n    }\n  }\n\n  this->shdr.sh_size = offset;\n}\n\ntemplate <typename E>\nvoid ShstrtabSection<E>::copy_buf(Context<E> &ctx) {\n  u8 *base = ctx.buf + this->shdr.sh_offset;\n  base[0] = '\\0';\n\n  for (Chunk<E> *chunk : ctx.chunks)\n    if (chunk->shdr.sh_name)\n      write_string(base + chunk->shdr.sh_name, chunk->name);\n}\n\ntemplate <typename E>\ni64 DynstrSection<E>::add_string(std::string_view str) {\n  if (this->shdr.sh_size == 0) {\n    strings.insert({\"\", 0});\n    this->shdr.sh_size = 1;\n  }\n\n  auto [it, inserted] = strings.insert({str, this->shdr.sh_size});\n  if (inserted)\n    this->shdr.sh_size += str.size() + 1;\n  return it->second;\n}\n\ntemplate <typename E>\ni64 DynstrSection<E>::find_string(std::string_view str) {\n  auto it = strings.find(str);\n  assert(it != strings.end());\n  return it->second;\n}\n\ntemplate <typename E>\nvoid DynstrSection<E>::copy_buf(Context<E> &ctx) {\n  u8 *base = ctx.buf + this->shdr.sh_offset;\n\n  for (std::pair<std::string_view, i64> p : strings)\n    write_string(base + p.second, p.first);\n\n  i64 off = ctx.dynsym->dynstr_offset;\n  for (Symbol<E> *sym : ctx.dynsym->symbols)\n    if (sym)\n      off += write_string(base + off, sym->name());\n}\n\ntemplate <typename E>\nvoid SymtabSection<E>::update_shdr(Context<E> &ctx) {\n  i64 nsyms = 1;\n\n  // Section symbols\n  for (Chunk<E> *chunk : ctx.chunks)\n    if (chunk->shndx)\n      nsyms++;\n\n  // Linker-synthesized symbols\n  for (Chunk<E> *chunk : ctx.chunks) {\n    chunk->local_symtab_idx = nsyms;\n    nsyms += chunk->num_local_symtab;\n  }\n\n  // File local symbols\n  for (ObjectFile<E> *file : ctx.objs) {\n    file->local_symtab_idx = nsyms;\n    nsyms += file->num_local_symtab;\n  }\n\n  // File global symbols\n  for (ObjectFile<E> *file : ctx.objs) {\n    file->global_symtab_idx = nsyms;\n    nsyms += file->num_global_symtab;\n  }\n\n  for (SharedFile<E> *file : ctx.dsos) {\n    file->global_symtab_idx = nsyms;\n    nsyms += file->num_global_symtab;\n  }\n\n  this->shdr.sh_info = ctx.objs[0]->global_symtab_idx;\n  this->shdr.sh_link = ctx.strtab->shndx;\n  this->shdr.sh_size = (nsyms == 1) ? 0 : nsyms * sizeof(ElfSym<E>);\n}\n\ntemplate <typename E>\nvoid SymtabSection<E>::copy_buf(Context<E> &ctx) {\n  ElfSym<E> *buf = (ElfSym<E> *)(ctx.buf + this->shdr.sh_offset);\n  memset(buf, 0, sizeof(ElfSym<E>));\n\n  if (ctx.symtab_shndx) {\n    ElfShdr<E> &shdr = ctx.symtab_shndx->shdr;\n    memset(ctx.buf + shdr.sh_offset, 0, shdr.sh_size);\n  }\n\n  // Create section symbols\n  for (Chunk<E> *chunk : ctx.chunks) {\n    if (chunk->shndx) {\n      ElfSym<E> &sym = buf[chunk->shndx];\n      memset(&sym, 0, sizeof(sym));\n      sym.st_type = STT_SECTION;\n      sym.st_value = chunk->shdr.sh_addr;\n\n      if (ctx.symtab_shndx) {\n        U32<E> *xindex = (U32<E> *)(ctx.buf + ctx.symtab_shndx->shdr.sh_offset);\n        xindex[chunk->shndx] = chunk->shndx;\n        sym.st_shndx = SHN_XINDEX;\n      } else {\n        sym.st_shndx = chunk->shndx;\n      }\n    }\n  }\n\n  // Populate linker-synthesized symbols\n  tbb::parallel_for_each(ctx.chunks, [&](Chunk<E> *chunk) {\n    chunk->populate_symtab(ctx);\n  });\n\n  // Copy symbols from input files\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    file->populate_symtab(ctx);\n  });\n\n  tbb::parallel_for_each(ctx.dsos, [&](SharedFile<E> *file) {\n    file->populate_symtab(ctx);\n  });\n}\n\n// An ARM64 function with a non-standard calling convention is marked with\n// STO_AARCH64_VARIANT_PCS bit in the symbol table.\n//\n// A function with that bit is not safe to be called through a lazy PLT\n// stub because the PLT resolver may clobber registers that should be\n// preserved in a non-standard calling convention.\n//\n// To solve the problem, the dynamic linker scans the dynamic symbol table\n// at process startup time and resolve symbols with STO_AARCH64_VARIANT_PCS\n// bit eagerly, so that the PLT resolver won't be called for that symbol\n// lazily. As an optimization, it does so only when DT_AARCH64_VARIANT_PCS\n// is set in the dynamic section.\n//\n// This function returns true if DT_AARCH64_VARIANT_PCS needs to be set.\ntemplate <is_arm64 E>\nstatic bool contains_variant_pcs(Context<E> &ctx) {\n  for (Symbol<E> *sym : ctx.plt->symbols)\n    if (sym->esym().arm64_variant_pcs)\n      return true;\n  return false;\n}\n\n// RISC-V has the same feature but with a different name.\ntemplate <is_riscv E>\nstatic bool contains_variant_cc(Context<E> &ctx) {\n  for (Symbol<E> *sym : ctx.plt->symbols)\n    if (sym->esym().riscv_variant_cc)\n      return true;\n  return false;\n}\n\ntemplate <typename E>\nstatic std::vector<Word<E>> create_dynamic_section(Context<E> &ctx) {\n  std::vector<Word<E>> vec;\n\n  auto define = [&](u64 tag, u64 val) {\n    vec.push_back(tag);\n    vec.push_back(val);\n  };\n\n  for (SharedFile<E> *file : ctx.dsos)\n    define(DT_NEEDED, ctx.dynstr->find_string(file->soname));\n\n  if (!ctx.arg.rpaths.empty())\n    define(ctx.arg.enable_new_dtags ? DT_RUNPATH : DT_RPATH,\n           ctx.dynstr->find_string(ctx.arg.rpaths));\n\n  if (!ctx.arg.soname.empty())\n    define(DT_SONAME, ctx.dynstr->find_string(ctx.arg.soname));\n\n  for (std::string_view str : ctx.arg.auxiliary)\n    define(DT_AUXILIARY, ctx.dynstr->find_string(str));\n\n  if (!ctx.arg.audit.empty())\n    define(DT_AUDIT, ctx.dynstr->find_string(ctx.arg.audit));\n\n  if (!ctx.arg.depaudit.empty())\n    define(DT_DEPAUDIT, ctx.dynstr->find_string(ctx.arg.depaudit));\n\n  for (std::string_view str : ctx.arg.filter)\n    define(DT_FILTER, ctx.dynstr->find_string(str));\n\n  if (ctx.reldyn->shdr.sh_size) {\n    define(E::is_rela ? DT_RELA : DT_REL, ctx.reldyn->shdr.sh_addr);\n    define(E::is_rela ? DT_RELASZ : DT_RELSZ, ctx.reldyn->shdr.sh_size);\n    define(E::is_rela ? DT_RELAENT : DT_RELENT, sizeof(ElfRel<E>));\n  }\n\n  if (ctx.relrdyn) {\n    define(DT_RELR, ctx.relrdyn->shdr.sh_addr);\n    define(DT_RELRSZ, ctx.relrdyn->shdr.sh_size);\n    define(DT_RELRENT, ctx.relrdyn->shdr.sh_entsize);\n  }\n\n  if (ctx.relplt->shdr.sh_size) {\n    define(DT_JMPREL, ctx.relplt->shdr.sh_addr);\n    define(DT_PLTRELSZ, ctx.relplt->shdr.sh_size);\n    define(DT_PLTREL, E::is_rela ? DT_RELA : DT_REL);\n  }\n\n  if constexpr (is_sparc<E>) {\n    if (ctx.plt->shdr.sh_size)\n      define(DT_PLTGOT, ctx.plt->shdr.sh_addr);\n  } else if constexpr (is_ppc32<E>) {\n    if (ctx.gotplt->shdr.sh_size)\n      define(DT_PLTGOT, ctx.gotplt->shdr.sh_addr + GotPltSection<E>::HDR_SIZE);\n  } else {\n    if (ctx.gotplt->shdr.sh_size)\n      define(DT_PLTGOT, ctx.gotplt->shdr.sh_addr);\n  }\n\n  if (ctx.dynsym->shdr.sh_size) {\n    define(DT_SYMTAB, ctx.dynsym->shdr.sh_addr);\n    define(DT_SYMENT, sizeof(ElfSym<E>));\n  }\n\n  if (ctx.dynstr->shdr.sh_size) {\n    define(DT_STRTAB, ctx.dynstr->shdr.sh_addr);\n    define(DT_STRSZ, ctx.dynstr->shdr.sh_size);\n  }\n\n  if (find_chunk(ctx, SHT_INIT_ARRAY)) {\n    define(DT_INIT_ARRAY, ctx.__init_array_start->value);\n    define(DT_INIT_ARRAYSZ,\n           ctx.__init_array_end->value - ctx.__init_array_start->value);\n  }\n\n  if (find_chunk(ctx, SHT_PREINIT_ARRAY)) {\n    define(DT_PREINIT_ARRAY, ctx.__preinit_array_start->value);\n    define(DT_PREINIT_ARRAYSZ,\n           ctx.__preinit_array_end->value - ctx.__preinit_array_start->value);\n  }\n\n  if (find_chunk(ctx, SHT_FINI_ARRAY)) {\n    define(DT_FINI_ARRAY, ctx.__fini_array_start->value);\n    define(DT_FINI_ARRAYSZ,\n           ctx.__fini_array_end->value - ctx.__fini_array_start->value);\n  }\n\n  if (ctx.versym->shdr.sh_size)\n    define(DT_VERSYM, ctx.versym->shdr.sh_addr);\n\n  if (ctx.verneed->shdr.sh_size) {\n    define(DT_VERNEED, ctx.verneed->shdr.sh_addr);\n    define(DT_VERNEEDNUM, ctx.verneed->shdr.sh_info);\n  }\n\n  if (ctx.verdef) {\n    define(DT_VERDEF, ctx.verdef->shdr.sh_addr);\n    define(DT_VERDEFNUM, ctx.verdef->shdr.sh_info);\n  }\n\n  if (Symbol<E> &sym = *ctx.arg.init;\n      sym.file && !sym.file->is_dso)\n    define(DT_INIT, sym.get_addr(ctx));\n\n  if (Symbol<E> &sym = *ctx.arg.fini;\n      sym.file && !sym.file->is_dso)\n    define(DT_FINI, sym.get_addr(ctx));\n\n  if (ctx.hash)\n    define(DT_HASH, ctx.hash->shdr.sh_addr);\n  if (ctx.gnu_hash)\n    define(DT_GNU_HASH, ctx.gnu_hash->shdr.sh_addr);\n  if (ctx.has_textrel)\n    define(DT_TEXTREL, 0);\n\n  i64 flags = 0;\n  i64 flags1 = 0;\n\n  if (ctx.arg.pie)\n    flags1 |= DF_1_PIE;\n\n  if (ctx.arg.z_now) {\n    flags |= DF_BIND_NOW;\n    flags1 |= DF_1_NOW;\n  }\n\n  if (ctx.arg.z_origin) {\n    flags |= DF_ORIGIN;\n    flags1 |= DF_1_ORIGIN;\n  }\n\n  if (!ctx.arg.z_dlopen)\n    flags1 |= DF_1_NOOPEN;\n  if (ctx.arg.z_nodefaultlib)\n    flags1 |= DF_1_NODEFLIB;\n  if (!ctx.arg.z_delete)\n    flags1 |= DF_1_NODELETE;\n  if (!ctx.arg.z_dump)\n    flags1 |= DF_1_NODUMP;\n  if (ctx.arg.z_initfirst)\n    flags1 |= DF_1_INITFIRST;\n  if (ctx.arg.z_interpose)\n    flags1 |= DF_1_INTERPOSE;\n\n  if (!ctx.got->gottp_syms.empty())\n    flags |= DF_STATIC_TLS;\n  if (ctx.has_textrel)\n    flags |= DF_TEXTREL;\n\n  if (flags)\n    define(DT_FLAGS, flags);\n  if (flags1)\n    define(DT_FLAGS_1, flags1);\n\n  if constexpr (is_arm64<E>)\n    if (contains_variant_pcs(ctx))\n      define(DT_AARCH64_VARIANT_PCS, 0);\n\n  if constexpr (is_riscv<E>)\n    if (contains_variant_cc(ctx))\n      define(DT_RISCV_VARIANT_CC, 0);\n\n  if constexpr (is_ppc32<E>)\n    define(DT_PPC_GOT, ctx.gotplt->shdr.sh_addr);\n\n  if constexpr (is_ppc64<E>) {\n    // PPC64_GLINK is defined by the psABI to refer to 32 bytes before\n    // the first PLT entry. I don't know why it's 32 bytes off, but\n    // it's what it is.\n    define(DT_PPC64_GLINK, ctx.plt->shdr.sh_addr + to_plt_offset<E>(0) - 32);\n  }\n\n  // GDB needs a DT_DEBUG entry in an executable to store a word-size\n  // data for its own purpose. Its content is not important.\n  if (!ctx.arg.shared && !ctx.arg.z_rodynamic)\n    define(DT_DEBUG, 0);\n\n  define(DT_NULL, 0);\n\n  for (i64 i = 0; i < ctx.arg.spare_dynamic_tags; i++)\n    define(DT_NULL, 0);\n  return vec;\n}\n\ntemplate <typename E>\nvoid DynamicSection<E>::update_shdr(Context<E> &ctx) {\n  if (ctx.arg.static_ && !ctx.arg.pie)\n    return;\n\n  this->shdr.sh_size = create_dynamic_section(ctx).size() * sizeof(Word<E>);\n  this->shdr.sh_link = ctx.dynstr->shndx;\n}\n\ntemplate <typename E>\nvoid DynamicSection<E>::copy_buf(Context<E> &ctx) {\n  std::vector<Word<E>> contents = create_dynamic_section(ctx);\n  assert(this->shdr.sh_size == contents.size() * sizeof(Word<E>));\n  write_vector(ctx.buf + this->shdr.sh_offset, contents);\n}\n\n// Assign offsets to OutputSection members\ntemplate <typename E>\nvoid OutputSection<E>::compute_section_size(Context<E> &ctx) {\n  ElfShdr<E> &shdr = this->shdr;\n\n  // Text sections must to be handled by create_range_extension_thunks()\n  // if they may need range extension thunks.\n  assert(!needs_thunk<E> || !(shdr.sh_flags & SHF_EXECINSTR) ||\n         ctx.arg.relocatable);\n\n  // Since one output section may contain millions of input sections,\n  // we first split input sections into groups and assign offsets to\n  // groups.\n  struct Group {\n    std::span<InputSection<E> *> members;\n    i64 size = 0;\n    i64 offset = 0;\n    i64 align = 1;\n  };\n\n  std::vector<Group> groups;\n  constexpr i64 group_size = 10000;\n\n  for (std::span<InputSection<E> *> m = members; !m.empty();) {\n    i64 sz = std::min<i64>(group_size, m.size());\n    groups.push_back({m.subspan(0, sz)});\n    m = m.subspan(sz);\n  }\n\n  tbb::parallel_for_each(groups, [](Group &g) {\n    i64 off = 0;\n    for (InputSection<E> *isec : g.members) {\n      off = align_to(off, 1 << isec->p2align) + isec->sh_size;\n      g.align = std::max<i64>(g.align, 1 << isec->p2align);\n    }\n    g.size = off;\n  });\n\n  i64 off = 0;\n  for (Group &g : groups) {\n    off = align_to(off, g.align);\n    g.offset = off;\n    off += g.size;\n  }\n\n  shdr.sh_size = off;\n\n  // Assign offsets to input sections.\n  tbb::parallel_for_each(groups, [](Group &g) {\n    i64 off = g.offset;\n    for (InputSection<E> *isec : g.members) {\n      off = align_to(off, 1 << isec->p2align);\n      isec->offset = off;\n      off += isec->sh_size;\n    }\n  });\n}\n\ntemplate <typename E>\nvoid OutputSection<E>::copy_buf(Context<E> &ctx) {\n  if (this->shdr.sh_type == SHT_NOBITS)\n    return;\n\n  // Copy section contents\n  u8 *buf = ctx.buf + this->shdr.sh_offset;\n  write_to(ctx, buf);\n\n  // Emit dynamic relocations\n  if (!ctx.reldyn)\n    return;\n\n  ElfRel<E> *rel = (ElfRel<E> *)(ctx.buf + ctx.reldyn->shdr.sh_offset +\n                                 this->reldyn_offset);\n\n  for (AbsRel<E> &r : abs_rels) {\n    Symbol<E> &sym = *r.sym;\n    u8 *loc = buf + r.isec->offset + r.offset;\n    u64 S = sym.get_addr(ctx);\n    u64 A = r.addend;\n    u64 P = this->shdr.sh_addr + r.isec->offset + r.offset;\n\n    if constexpr (is_riscv<E> || is_loongarch<E>) {\n      i64 delta = get_r_delta(*r.isec, r.offset);\n      loc -= delta;\n      P -= delta;\n    }\n\n    auto write = [&](i64 ty, i64 idx, u64 val) {\n      *rel++ = ElfRel<E>(P, ty, idx, val);\n      if (ctx.arg.apply_dynamic_relocs)\n        *(Word<E> *)loc = val;\n    };\n\n    switch (r.kind) {\n    case ABS_REL_NONE:\n    case ABS_REL_RELR:\n      *(Word<E> *)loc = S + A;\n      break;\n    case ABS_REL_BASEREL:\n      write(E::R_RELATIVE, 0, S + A);\n      break;\n    case ABS_REL_IFUNC:\n      if constexpr (supports_ifunc<E>)\n        write(E::R_IRELATIVE, 0, sym.get_addr(ctx, NO_PLT) + A);\n      break;\n    case ABS_REL_DYNREL:\n      write(E::R_ABS, sym.get_dynsym_idx(ctx), A);\n      break;\n    }\n  }\n}\n\ntemplate <typename E>\nvoid OutputSection<E>::write_to(Context<E> &ctx, u8 *buf) {\n  // Copy section contents to an output file.\n  tbb::parallel_for((i64)0, (i64)members.size(), [&](i64 i) {\n    InputSection<E> &isec = *members[i];\n    isec.write_to(ctx, buf + isec.offset);\n\n    // Clear trailing padding. We write trap instructions for an\n    // executable segment so that a disassembler wouldn't try to\n    // disassemble garbage as instructions.\n    u64 this_end = isec.offset + isec.sh_size;\n    u64 next_start;\n    if (i + 1 < members.size())\n      next_start = members[i + 1]->offset;\n    else\n      next_start = this->shdr.sh_size;\n\n    u8 *loc = buf + this_end;\n    i64 size = next_start - this_end;\n\n    auto fill = [&]<size_t N>(const u8 (&filler)[N]) {\n      for (i64 i = 0; i + N <= size; i += N)\n        memcpy(loc + i, filler, N);\n    };\n\n    if (this->shdr.sh_flags & SHF_EXECINSTR) {\n      // s390x's old CRT files use NOP slides in .init and .fini.\n      // https://sourceware.org/bugzilla/show_bug.cgi?id=31042\n      if (is_s390x<E> && (this->name == \".init\" || this->name == \".fini\"))\n        fill({ 0x07, 0x00 }); // nopr\n      else\n        fill(E::trap);\n    } else {\n      memset(loc, 0, size);\n    }\n  });\n\n  // Emit range extension thunks.\n  if constexpr (needs_thunk<E>) {\n    tbb::parallel_for_each(thunks, [&](std::unique_ptr<Thunk<E>> &thunk) {\n      thunk->copy_buf(ctx);\n    });\n  }\n}\n\n// .relr.dyn contains base relocations encoded in a space-efficient form.\n// The contents of the section is essentially just a list of addresses\n// that have to be fixed up at runtime.\n//\n// Here is the encoding scheme (we assume 64-bit ELF in this description\n// for the sake of simplicity): .relr.dyn contains zero or more address\n// groups. Each address group consists of a 64-bit start address followed\n// by zero or more 63-bit bitmaps. Let A be the address of a start\n// address. Then, the loader fixes address A. If Nth bit in the following\n// bitmap is on, the loader also fixes address A + N * 8. In this scheme,\n// one address and one bitmap can represent up to 64 base relocations in a\n// 512 bytes range.\n//\n// A start address and a bitmap is distinguished by the lowest significant\n// bit. An address must be even and thus its LSB is 0 (odd address is not\n// representable in this encoding and such relocation must be stored to\n// the .rel.dyn section). A bitmap has LSB 1.\ntemplate <typename E>\nstatic std::vector<u64> encode_relr(std::span<u64> pos) {\n  assert(ranges::all_of(pos, [](u64 x) { return x % sizeof(Word<E>) == 0; }));\n  assert(ranges::is_sorted(pos));\n\n  std::vector<u64> vec;\n  i64 num_bits = E::is_64 ? 63 : 31;\n  i64 max_delta = sizeof(Word<E>) * num_bits;\n\n  for (i64 i = 0; i < pos.size();) {\n    vec.push_back(pos[i]);\n    u64 base = pos[i] + sizeof(Word<E>);\n    i++;\n\n    for (;;) {\n      u64 bits = 0;\n      for (; i < pos.size() && pos[i] - base < max_delta; i++)\n        bits |= (u64)1 << ((pos[i] - base) / sizeof(Word<E>));\n\n      if (!bits)\n        break;\n\n      vec.push_back((bits << 1) | 1);\n      base += max_delta;\n    }\n  }\n  return vec;\n}\n\ntemplate <typename E>\nstatic AbsRelKind get_abs_rel_kind(Context<E> &ctx, Symbol<E> &sym) {\n  if (sym.is_ifunc())\n    return sym.is_pde_ifunc(ctx) ? ABS_REL_NONE : ABS_REL_IFUNC;\n\n  if (sym.is_absolute())\n    return ABS_REL_NONE;\n\n  // True if the symbol's address is in the output file.\n  if (!sym.is_imported || (sym.flags & NEEDS_CPLT) || (sym.flags & NEEDS_COPYREL))\n    return ctx.arg.pic ? ABS_REL_BASEREL : ABS_REL_NONE;\n\n  return ABS_REL_DYNREL;\n}\n\ntemplate <typename E>\nstatic bool is_absrel(const ElfRel<E> &r) {\n  // On ARM32, R_ARM_TARGET1 is typically used for entries in .init_array\n  // and is interpreted as either ABS32 or REL32 depending on the target.\n  // All targets we support handle it as if it were a ABS32.\n  if constexpr (is_arm32<E>)\n    return r.r_type == R_ARM_ABS32 || r.r_type == R_ARM_TARGET1;\n\n  // SPARC64 defines two separate relocations for aligned and unaligned words.\n  if constexpr (is_sparc<E>)\n    return r.r_type == R_SPARC_64 || r.r_type == R_SPARC_UA64;\n  return r.r_type == E::R_ABS;\n}\n\n// Scan word-size absolute relocations (e.g. R_X86_64_64). This is\n// separated from scan_relocations() because only such relocations can\n// be promoted to dynamic relocations.\ntemplate <typename E>\nvoid OutputSection<E>::scan_abs_relocations(Context<E> &ctx) {\n  std::vector<std::vector<AbsRel<E>>> shards(members.size());\n\n  // Collect all word-size absolute relocations\n  tbb::parallel_for((i64)0, (i64)members.size(), [&](i64 i) {\n    InputSection<E> *isec = members[i];\n    for (const ElfRel<E> &r : isec->get_rels(ctx))\n      if (is_absrel(r))\n        shards[i].push_back(AbsRel<E>{isec, r.r_offset, isec->file.symbols[r.r_sym],\n                                      get_addend(*isec, r)});\n  });\n\n  abs_rels = flatten(shards);\n\n  // We can sometimes avoid creating dynamic relocations in read-only\n  // sections by promoting symbols to canonical PLT or copy relocations.\n  if (!ctx.arg.pic && !(this->shdr.sh_flags & SHF_WRITE))\n    for (AbsRel<E> &r : abs_rels)\n      if (Symbol<E> &sym = *r.sym;\n          sym.is_imported && !sym.is_absolute())\n        sym.flags |= (sym.get_type() == STT_FUNC) ? NEEDS_CPLT : NEEDS_COPYREL;\n\n  // Now we can compute whether they need to be promoted to dynamic\n  // relocations or not.\n  for (AbsRel<E> &r : abs_rels)\n    r.kind = get_abs_rel_kind(ctx, *r.sym);\n\n  // If we have a relocation against a read-only section, we need to\n  // set the DT_TEXTREL flag for the loader.\n  for (AbsRel<E> &r : abs_rels) {\n    if (r.kind != ABS_REL_NONE && !(r.isec->shdr().sh_flags & SHF_WRITE)) {\n      if (ctx.arg.z_text) {\n        Error(ctx) << *r.isec << \": relocation at offset 0x\"\n                   << std::hex << r.offset << \" against symbol `\"\n                   << *r.sym << \"' can not be used; recompile with -fPIC\";\n      } else if (ctx.arg.warn_textrel) {\n        Warn(ctx) << *r.isec << \": relocation against symbol `\" << *r.sym\n                  << \"' in read-only section\";\n      }\n      ctx.has_textrel = true;\n    }\n  }\n\n  // If --pack-dyn-relocs=relr is enabled, base relocations are put into\n  // .relr.dyn.\n  if (ctx.arg.pack_dyn_relocs_relr && !(this->shdr.sh_flags & SHF_EXECINSTR))\n    for (AbsRel<E> &r : abs_rels)\n      if (r.kind == ABS_REL_BASEREL &&\n          r.isec->shdr().sh_addralign % sizeof(Word<E>) == 0 &&\n          r.offset % sizeof(Word<E>) == 0)\n        r.kind = ABS_REL_RELR;\n}\n\ntemplate <typename E>\ni64 OutputSection<E>::get_reldyn_size(Context<E> &ctx) const {\n  i64 n = 0;\n  for (const AbsRel<E> &r : abs_rels)\n    if (r.kind != ABS_REL_NONE && r.kind != ABS_REL_RELR)\n      n++;\n  return n;\n}\n\ntemplate <typename E>\nvoid OutputSection<E>::construct_relr(Context<E> &ctx) {\n  std::vector<u64> pos;\n  for (const AbsRel<E> &r : abs_rels)\n    if (r.kind == ABS_REL_RELR)\n      pos.push_back(r.isec->offset + r.offset);\n  this->relr = encode_relr<E>(pos);\n}\n\n// Compute spaces needed for thunk symbols\ntemplate <typename E>\nvoid OutputSection<E>::compute_symtab_size(Context<E> &ctx) {\n  if constexpr (needs_thunk<E>) {\n    this->strtab_size = 0;\n    this->num_local_symtab = 0;\n\n    for (std::unique_ptr<Thunk<E>> &thunk : thunks) {\n      // For ARM32, we emit additional symbol \"$t\", \"$a\" and \"$d\" for\n      // each thunk to mark the beginning of Thumb code, ARM code and\n      // data, respectively.\n      if constexpr (is_arm32<E>)\n        this->num_local_symtab += thunk->symbols.size() * 4;\n      else\n        this->num_local_symtab += thunk->symbols.size();\n\n      for (Symbol<E> *sym : thunk->symbols)\n        this->strtab_size += sym->name().size() + thunk->name.size() + 2;\n    }\n  }\n}\n\n// If we create range extension thunks, we also synthesize symbols to mark\n// the locations of thunks. Creating such symbols is optional, but it helps\n// disassembling and/or debugging our output.\ntemplate <typename E>\nvoid OutputSection<E>::populate_symtab(Context<E> &ctx) {\n  if constexpr (needs_thunk<E>) {\n    ElfSym<E> *esym =\n      (ElfSym<E> *)(ctx.buf + ctx.symtab->shdr.sh_offset) + this->local_symtab_idx;\n\n    u8 *strtab_base = ctx.buf + ctx.strtab->shdr.sh_offset;\n    u8 *strtab = strtab_base + this->strtab_offset;\n\n    memset(esym, 0, this->num_local_symtab * sizeof(ElfSym<E>));\n    memset(strtab, 0, this->strtab_size);\n\n    auto write_esym = [&](u64 addr, i64 st_name) {\n      memset(esym, 0, sizeof(*esym));\n      esym->st_name = st_name;\n      esym->st_type = STT_FUNC;\n      esym->st_shndx = this->shndx;\n      esym->st_value = addr;\n      esym++;\n    };\n\n    for (std::unique_ptr<Thunk<E>> &thunk : thunks) {\n      for (i64 i = 0; i < thunk->symbols.size(); i++) {\n        Symbol<E> &sym = *thunk->symbols[i];\n        u64 addr = thunk->get_addr() + thunk->offsets[i];\n\n        write_esym(addr, strtab - strtab_base);\n\n        strtab += write_string(strtab, sym.name()) - 1;\n        *strtab++ = '$';\n        strtab += write_string(strtab, thunk->name);\n\n        // Emit \"$t\", \"$a\" and \"$d\" if ARM32.\n        if constexpr (is_arm32<E>) {\n          write_esym(addr, ctx.strtab->THUMB);\n          write_esym(addr + 4, ctx.strtab->ARM);\n          write_esym(addr + 12, ctx.strtab->DATA);\n        }\n      }\n    }\n  }\n}\n\ntemplate <typename E>\nvoid GotSection<E>::add_got_symbol(Context<E> &ctx, Symbol<E> *sym) {\n  sym->set_got_idx(ctx, this->shdr.sh_size / sizeof(Word<E>));\n\n  // An IFUNC symbol uses two GOT slots in a position-dependent\n  // executable.\n  if (sym->is_pde_ifunc(ctx))\n    this->shdr.sh_size += sizeof(Word<E>) * 2;\n  else\n    this->shdr.sh_size += sizeof(Word<E>);\n\n  got_syms.push_back(sym);\n}\n\ntemplate <typename E>\nvoid GotSection<E>::add_gottp_symbol(Context<E> &ctx, Symbol<E> *sym) {\n  sym->set_gottp_idx(ctx, this->shdr.sh_size / sizeof(Word<E>));\n  this->shdr.sh_size += sizeof(Word<E>);\n  gottp_syms.push_back(sym);\n}\n\ntemplate <typename E>\nvoid GotSection<E>::add_tlsgd_symbol(Context<E> &ctx, Symbol<E> *sym) {\n  sym->set_tlsgd_idx(ctx, this->shdr.sh_size / sizeof(Word<E>));\n  this->shdr.sh_size += sizeof(Word<E>) * 2;\n  tlsgd_syms.push_back(sym);\n}\n\ntemplate <typename E>\nvoid GotSection<E>::add_tlsdesc_symbol(Context<E> &ctx, Symbol<E> *sym) {\n  // TLSDESC's GOT slot values may vary depending on libc, so we\n  // always emit a dynamic relocation for each TLSDESC entry.\n  //\n  // If dynamic relocation is not available (i.e. if we are creating a\n  // statically-linked executable), we always relax TLSDESC relocations\n  // so that no TLSDESC relocation exist at runtime.\n  assert(supports_tlsdesc<E>);\n  assert(!ctx.arg.static_);\n\n  sym->set_tlsdesc_idx(ctx, this->shdr.sh_size / sizeof(Word<E>));\n  this->shdr.sh_size += sizeof(Word<E>) * 2;\n  tlsdesc_syms.push_back(sym);\n}\n\ntemplate <typename E>\nvoid GotSection<E>::add_tlsld(Context<E> &ctx) {\n  assert(tlsld_idx == -1);\n  tlsld_idx = this->shdr.sh_size / sizeof(Word<E>);\n  this->shdr.sh_size += sizeof(Word<E>) * 2;\n}\n\ntemplate <typename E>\nu64 GotSection<E>::get_tlsld_addr(Context<E> &ctx) const {\n  assert(tlsld_idx != -1);\n  return this->shdr.sh_addr + tlsld_idx * sizeof(Word<E>);\n}\n\nnamespace {\ntemplate <typename E>\nstruct GotEntry {\n  bool is_relr(Context<E> &ctx) const {\n    return r_type == E::R_RELATIVE && ctx.arg.pack_dyn_relocs_relr;\n  }\n\n  i64 idx = 0;\n  u64 val = 0;\n  i64 r_type = R_NONE;\n  Symbol<E> *sym = nullptr;\n};\n}\n\n// Get .got and .rel.dyn contents.\n//\n// .got is a linker-synthesized constant pool whose entry is of pointer\n// size. If we know a correct value for an entry, we'll just set that value\n// to the entry. Otherwise, we'll create a dynamic relocation and let the\n// dynamic linker to fill the entry at load-time.\n//\n// Most GOT entries contain addresses of global variable. If a global\n// variable is an imported symbol, we don't know its address until runtime.\n// GOT contains the addresses of such variables at runtime so that we can\n// access imported global variables via GOT.\n//\n// Thread-local variables (TLVs) also use GOT entries. We need them because\n// TLVs are accessed in a different way than the ordinary global variables.\n// Their addresses are not unique; each thread has its own copy of TLVs.\ntemplate <typename E>\nstatic std::vector<GotEntry<E>> get_got_entries(Context<E> &ctx) {\n  std::vector<GotEntry<E>> entries;\n  auto add = [&](GotEntry<E> ent) { entries.push_back(ent); };\n\n  // Create GOT entries for ordinary symbols\n  for (Symbol<E> *sym : ctx.got->got_syms) {\n    i64 idx = sym->get_got_idx(ctx);\n\n    // IFUNC always needs to be fixed up by the dynamic linker.\n    if constexpr (supports_ifunc<E>) {\n      if (sym->is_ifunc()) {\n        if (sym->is_pde_ifunc(ctx)) {\n          add({idx, sym->get_plt_addr(ctx)});\n          add({idx + 1, sym->get_addr(ctx, NO_PLT), E::R_IRELATIVE});\n        } else {\n          add({idx, sym->get_addr(ctx, NO_PLT), E::R_IRELATIVE});\n        }\n        continue;\n      }\n    }\n\n    if (sym->is_imported) {\n      // If a symbol is imported, let the dynamic linker to resolve it.\n      add({idx, 0, E::R_GLOB_DAT, sym});\n    } else if (ctx.arg.pic && sym->is_relative()) {\n      // We know the symbol's address, but it needs a base relocation.\n      add({idx, sym->get_addr(ctx, NO_PLT), E::R_RELATIVE});\n    } else {\n      // We know the symbol's exact run-time address at link-time.\n      add({idx, sym->get_addr(ctx, NO_PLT)});\n    }\n  }\n\n  // Create GOT entries for TLVs.\n  for (Symbol<E> *sym : ctx.got->tlsgd_syms) {\n    i64 idx = sym->get_tlsgd_idx(ctx);\n\n    if (sym->is_imported) {\n      // If a symbol is imported, let the dynamic linker to resolve it.\n      add({idx, 0, E::R_DTPMOD, sym});\n      add({idx + 1, 0, E::R_DTPOFF, sym});\n    } else if (ctx.arg.shared) {\n      // If we are creating a shared library, we know the TLV's offset\n      // within the current TLS block. We don't know the module ID though.\n      add({idx, 0, E::R_DTPMOD});\n      add({idx + 1, sym->get_addr(ctx) - ctx.dtp_addr});\n    } else {\n      // If we are creating an executable, we know both the module ID and\n      // the offset. Module ID 1 indicates the main executable.\n      add({idx, 1});\n      add({idx + 1, sym->get_addr(ctx) - ctx.dtp_addr});\n    }\n  }\n\n  if constexpr (supports_tlsdesc<E>) {\n    for (Symbol<E> *sym : ctx.got->tlsdesc_syms) {\n      i64 idx = sym->get_tlsdesc_idx(ctx);\n\n      // TLSDESC uses two consecutive GOT slots, and a single TLSDESC\n      // dynamic relocation fills both. The actual values of the slots\n      // vary depending on libc, so we can't precompute their values.\n      // We always emit a dynamic relocation for each incoming TLSDESC\n      // reloc.\n      if (sym->is_imported)\n        add({idx, 0, E::R_TLSDESC, sym});\n      else\n        add({idx, sym->get_addr(ctx) - ctx.tls_begin, E::R_TLSDESC});\n    }\n  }\n\n  for (Symbol<E> *sym : ctx.got->gottp_syms) {\n    i64 idx = sym->get_gottp_idx(ctx);\n\n    if (sym->is_imported) {\n      // If we know nothing about the symbol, let the dynamic linker\n      // to fill the GOT entry.\n      add({idx, 0, E::R_TPOFF, sym});\n    } else if (ctx.arg.shared) {\n      // If we know the offset within the current thread vector,\n      // let the dynamic linker to adjust it.\n      add({idx, sym->get_addr(ctx) - ctx.tls_begin, E::R_TPOFF});\n    } else {\n      // Otherwise, we know the offset from the thread pointer (TP) at\n      // link-time, so we can fill the GOT entry directly.\n      add({idx, sym->get_addr(ctx) - ctx.tp_addr});\n    }\n  }\n\n  if (ctx.got->tlsld_idx != -1) {\n    if (ctx.arg.shared)\n      add({ctx.got->tlsld_idx, 0, E::R_DTPMOD});\n    else\n      add({ctx.got->tlsld_idx, 1}); // 1 means the main executable\n  }\n\n  return entries;\n}\n\ntemplate <typename E>\ni64 GotSection<E>::get_reldyn_size(Context<E> &ctx) const {\n  i64 n = 0;\n  for (GotEntry<E> &ent : get_got_entries(ctx))\n    if (!ent.is_relr(ctx) && ent.r_type != R_NONE)\n      n++;\n  return n;\n}\n\n// Fill .got and .rel.dyn.\ntemplate <typename E>\nvoid GotSection<E>::copy_buf(Context<E> &ctx) {\n  Word<E> *buf = (Word<E> *)(ctx.buf + this->shdr.sh_offset);\n  memset(buf, 0, this->shdr.sh_size);\n\n  // s390x psABI requires GOT[0] to be set to the link-time value of _DYNAMIC.\n  if constexpr (is_s390x<E>)\n    if (ctx.dynamic)\n      buf[0] = ctx.dynamic->shdr.sh_addr;\n\n  // ARM64 psABI doesn't say anything about GOT[0], but glibc/arm64's code\n  // path for -static-pie wrongly assumed that GOT[0] refers to _DYNAMIC.\n  //\n  // https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=43d06ed218fc8be5\n  if constexpr (is_arm64<E>)\n    if (ctx.dynamic && ctx.arg.static_ && ctx.arg.pie)\n      buf[0] = ctx.dynamic->shdr.sh_addr;\n\n  ElfRel<E> *rel = (ElfRel<E> *)(ctx.buf + ctx.reldyn->shdr.sh_offset +\n                                 this->reldyn_offset);\n\n  for (GotEntry<E> &ent : get_got_entries(ctx)) {\n    if (ent.is_relr(ctx) || ent.r_type == R_NONE) {\n      buf[ent.idx] = ent.val;\n      continue;\n    }\n\n    *rel++ = ElfRel<E>(this->shdr.sh_addr + ent.idx * sizeof(Word<E>),\n                       ent.r_type,\n                       ent.sym ? ent.sym->get_dynsym_idx(ctx) : 0,\n                       ent.val);\n\n    if (ctx.arg.apply_dynamic_relocs) {\n      // A single TLSDESC relocation fixes two consecutive GOT slots\n      // where one slot holds a function pointer and the other an\n      // argument to the function. An addend should be applied not to\n      // the function pointer but to the function argument, which is\n      // usually stored to the second slot.\n      //\n      // ARM32 employs the inverted layout for some reason, so an\n      // addend is applied to the first slot.\n      i64 i = ent.idx;\n      if constexpr (supports_tlsdesc<E> && !is_arm32<E>)\n        if (ent.r_type == E::R_TLSDESC)\n          i = ent.idx + 1;\n      buf[i] = ent.val;\n    }\n  }\n}\n\ntemplate <typename E>\nvoid GotSection<E>::construct_relr(Context<E> &ctx) {\n  std::vector<u64> pos;\n  for (GotEntry<E> &ent : get_got_entries(ctx))\n    if (ent.is_relr(ctx))\n      pos.push_back(ent.idx * sizeof(Word<E>));\n  this->relr = encode_relr<E>(pos);\n}\n\ntemplate <typename E>\nvoid GotSection<E>::compute_symtab_size(Context<E> &ctx) {\n  this->strtab_size = 0;\n  this->num_local_symtab = 0;\n\n  for (Symbol<E> *sym : got_syms) {\n    this->strtab_size += sym->name().size() + sizeof(\"$got\");\n    this->num_local_symtab++;\n  }\n\n  for (Symbol<E> *sym : gottp_syms) {\n    this->strtab_size += sym->name().size() + sizeof(\"$gottp\");\n    this->num_local_symtab++;\n  }\n\n  for (Symbol<E> *sym : tlsgd_syms) {\n    this->strtab_size += sym->name().size() + sizeof(\"$tlsgd\");\n    this->num_local_symtab++;\n  }\n\n  for (Symbol<E> *sym : tlsdesc_syms) {\n    this->strtab_size += sym->name().size() + sizeof(\"$tlsdesc\");\n    this->num_local_symtab++;\n  }\n\n  if (tlsld_idx != -1) {\n    this->strtab_size += sizeof(\"$tlsld\");\n    this->num_local_symtab++;\n  }\n}\n\ntemplate <typename E>\nvoid GotSection<E>::populate_symtab(Context<E> &ctx) {\n  if (this->num_local_symtab == 0)\n    return;\n\n  ElfSym<E> *esym =\n    (ElfSym<E> *)(ctx.buf + ctx.symtab->shdr.sh_offset) + this->local_symtab_idx;\n\n  u8 *strtab_base = ctx.buf + ctx.strtab->shdr.sh_offset;\n  u8 *strtab = strtab_base + this->strtab_offset;\n\n  auto write = [&](std::string_view name, std::string_view suffix, i64 value) {\n    memset(esym, 0, sizeof(*esym));\n    esym->st_name = strtab - strtab_base;\n    esym->st_type = STT_OBJECT;\n    esym->st_shndx = this->shndx;\n    esym->st_value = value;\n    esym++;\n\n    strtab += write_string(strtab, name) - 1;\n    strtab += write_string(strtab, suffix);\n  };\n\n  for (Symbol<E> *sym : got_syms)\n    write(sym->name(), \"$got\", sym->get_got_addr(ctx));\n\n  for (Symbol<E> *sym : gottp_syms)\n    write(sym->name(), \"$gottp\", sym->get_gottp_addr(ctx));\n\n  for (Symbol<E> *sym : tlsgd_syms)\n    write(sym->name(), \"$tlsgd\", sym->get_tlsgd_addr(ctx));\n\n  for (Symbol<E> *sym : tlsdesc_syms)\n    write(sym->name(), \"$tlsdesc\", sym->get_tlsdesc_addr(ctx));\n\n  if (tlsld_idx != -1)\n    write(\"\", \"$tlsld\", get_tlsld_addr(ctx));\n}\n\ntemplate <typename E>\nvoid GotPltSection<E>::update_shdr(Context<E> &ctx) {\n  this->shdr.sh_size = HDR_SIZE + ctx.plt->symbols.size() * ENTRY_SIZE;\n}\n\ntemplate <typename E>\nvoid GotPltSection<E>::copy_buf(Context<E> &ctx) {\n  // On PPC64, it's dynamic loader responsibility to fill the .got.plt\n  // section. Dynamic loader finds the address of the first PLT entry by\n  // DT_PPC64_GLINK and assumes that each PLT entry is 4 bytes long.\n  if constexpr (!is_ppc64<E>) {\n    Word<E> *buf = (Word<E> *)(ctx.buf + this->shdr.sh_offset);\n\n    // The first slot of .got.plt points to _DYNAMIC, as requested by\n    // the psABI. The second and the third slots are reserved by the psABI.\n    static_assert(HDR_SIZE / sizeof(Word<E>) == 3);\n\n    buf[0] = ctx.dynamic ? (u64)ctx.dynamic->shdr.sh_addr : 0;\n    buf[1] = 0;\n    buf[2] = 0;\n\n    for (i64 i = 0; i < ctx.plt->symbols.size(); i++)\n      buf[i + 3] = ctx.plt->shdr.sh_addr;\n  }\n}\n\ntemplate <typename E>\nvoid PltSection<E>::add_symbol(Context<E> &ctx, Symbol<E> *sym) {\n  assert(!sym->has_plt(ctx));\n  sym->set_plt_idx(ctx, symbols.size());\n  symbols.push_back(sym);\n  ctx.dynsym->add_symbol(ctx, sym);\n}\n\ntemplate <typename E>\nvoid PltSection<E>::update_shdr(Context<E> &ctx) {\n  if (symbols.empty())\n    this->shdr.sh_size = 0;\n  else\n    this->shdr.sh_size = to_plt_offset<E>(symbols.size());\n}\n\ntemplate <typename E>\nvoid PltSection<E>::copy_buf(Context<E> &ctx) {\n  u8 *buf = ctx.buf + ctx.plt->shdr.sh_offset;\n  write_plt_header(ctx, buf);\n\n  for (i64 i = 0; i < symbols.size(); i++)\n    write_plt_entry(ctx, buf + to_plt_offset<E>(i), *symbols[i]);\n}\n\ntemplate <typename E>\nvoid PltSection<E>::compute_symtab_size(Context<E> &ctx) {\n  this->num_local_symtab = symbols.size();\n  this->strtab_size = 0;\n\n  for (Symbol<E> *sym : symbols)\n    this->strtab_size += sym->name().size() + sizeof(\"$plt\");\n\n  if constexpr (is_arm32<E>)\n    this->num_local_symtab += symbols.size() * 2 + 2;\n}\n\ntemplate <typename E>\nvoid PltSection<E>::populate_symtab(Context<E> &ctx) {\n  if (this->num_local_symtab == 0)\n    return;\n\n  ElfSym<E> *esym =\n    (ElfSym<E> *)(ctx.buf + ctx.symtab->shdr.sh_offset) + this->local_symtab_idx;\n\n  u8 *strtab_base = ctx.buf + ctx.strtab->shdr.sh_offset;\n  u8 *strtab = strtab_base + this->strtab_offset;\n\n  auto write_esym = [&](u64 addr, i64 st_name) {\n    memset(esym, 0, sizeof(*esym));\n    esym->st_name = st_name;\n    esym->st_type = STT_FUNC;\n    esym->st_bind = STB_LOCAL;\n    esym->st_shndx = this->shndx;\n    esym->st_value = addr;\n    esym++;\n  };\n\n  if constexpr (is_arm32<E>) {\n    write_esym(this->shdr.sh_addr, ctx.strtab->ARM);\n    write_esym(this->shdr.sh_addr + 16, ctx.strtab->DATA);\n  }\n\n  for (Symbol<E> *sym : symbols) {\n    u64 addr = sym->get_plt_addr(ctx);\n    write_esym(addr, strtab - strtab_base);\n    strtab += write_string(strtab, sym->name()) - 1;\n    strtab += write_string(strtab, \"$plt\");\n\n    if constexpr (is_arm32<E>) {\n      write_esym(addr, ctx.strtab->ARM);\n      write_esym(addr + 12, ctx.strtab->DATA);\n    }\n  }\n}\n\ntemplate <typename E>\nvoid PltGotSection<E>::add_symbol(Context<E> &ctx, Symbol<E> *sym) {\n  assert(!sym->has_plt(ctx));\n  assert(sym->has_got(ctx));\n\n  sym->set_pltgot_idx(ctx, symbols.size());\n  symbols.push_back(sym);\n  this->shdr.sh_size = symbols.size() * E::pltgot_size;\n}\n\ntemplate <typename E>\nvoid PltGotSection<E>::copy_buf(Context<E> &ctx) {\n  u8 *buf = ctx.buf + ctx.pltgot->shdr.sh_offset;\n  for (i64 i = 0; i < symbols.size(); i++)\n    write_pltgot_entry(ctx, buf + i * E::pltgot_size, *symbols[i]);\n}\n\ntemplate <typename E>\nvoid PltGotSection<E>::compute_symtab_size(Context<E> &ctx) {\n  this->num_local_symtab = symbols.size();\n  this->strtab_size = 0;\n\n  for (Symbol<E> *sym : symbols)\n    this->strtab_size += sym->name().size() + sizeof(\"$pltgot\");\n\n  if constexpr (is_arm32<E>)\n    this->num_local_symtab += symbols.size() * 2;\n}\n\ntemplate <typename E>\nvoid PltGotSection<E>::populate_symtab(Context<E> &ctx) {\n  if (this->num_local_symtab == 0)\n    return;\n\n  ElfSym<E> *esym =\n    (ElfSym<E> *)(ctx.buf + ctx.symtab->shdr.sh_offset) + this->local_symtab_idx;\n\n  u8 *strtab_base = ctx.buf + ctx.strtab->shdr.sh_offset;\n  u8 *strtab = strtab_base + this->strtab_offset;\n\n  auto write_esym = [&](u64 addr, i64 st_name) {\n    memset(esym, 0, sizeof(*esym));\n    esym->st_name = st_name;\n    esym->st_type = STT_FUNC;\n    esym->st_shndx = this->shndx;\n    esym->st_value = addr;\n    esym++;\n  };\n\n  for (Symbol<E> *sym : symbols) {\n    u64 addr = sym->get_plt_addr(ctx);\n    write_esym(addr, strtab - strtab_base);\n    strtab += write_string(strtab, sym->name()) - 1;\n    strtab += write_string(strtab, \"$pltgot\");\n\n    if constexpr (is_arm32<E>) {\n      write_esym(addr, ctx.strtab->ARM);\n      write_esym(addr + 12, ctx.strtab->DATA);\n    }\n  }\n}\n\ntemplate <typename E>\nvoid RelPltSection<E>::update_shdr(Context<E> &ctx) {\n  this->shdr.sh_size = ctx.plt->symbols.size() * sizeof(ElfRel<E>);\n  this->shdr.sh_link = ctx.dynsym->shndx;\n\n  if (!is_sparc<E>)\n    this->shdr.sh_info = ctx.gotplt->shndx;\n}\n\ntemplate <typename E>\nvoid RelPltSection<E>::copy_buf(Context<E> &ctx) {\n  ElfRel<E> *buf = (ElfRel<E> *)(ctx.buf + this->shdr.sh_offset);\n\n  for (Symbol<E> *sym : ctx.plt->symbols) {\n    // SPARC doesn't have a .got.plt because its role is merged to .plt.\n    // On SPARC, .plt is writable (!) and the dynamic linker directly\n    // modifies .plt's machine instructions as it resolves dynamic symbols.\n    // Therefore, it doesn't need a separate section to store the symbol\n    // resolution results. That is of course horrible from the security\n    // point of view, though.\n    u64 addr = is_sparc<E> ? sym->get_plt_addr(ctx) : sym->get_gotplt_addr(ctx);\n    *buf++ = ElfRel<E>(addr, E::R_JUMP_SLOT, sym->get_dynsym_idx(ctx), 0);\n  }\n}\n\n// RISC-V and LoongArch have code-shrinking linker relaxation. If we\n// have removed instructions from a function, we need to update its\n// size as well.\ntemplate <typename E>\nstatic u64 get_symbol_size(Symbol<E> &sym) {\n  const ElfSym<E> &esym = sym.esym();\n  if constexpr (is_riscv<E> || is_loongarch<E>)\n    if (esym.st_size)\n      if (InputSection<E> *isec = sym.get_input_section())\n        if (isec->shdr().sh_flags & SHF_EXECINSTR)\n          return esym.st_size + esym.st_value - sym.value -\n                 get_r_delta(*isec, esym.st_value + esym.st_size);\n  return esym.st_size;\n}\n\ntemplate <typename E>\nstd::optional<ElfSym<E>>\nto_output_esym(Context<E> &ctx, Symbol<E> &sym, u32 st_name, U32<E> *shn_xindex) {\n  ElfSym<E> esym;\n  memset(&esym, 0, sizeof(esym));\n\n  esym.st_name = st_name;\n  esym.st_type = sym.get_type();\n  esym.st_size = get_symbol_size(sym);\n\n  if (sym.is_local(ctx))\n    esym.st_bind = STB_LOCAL;\n  else if (sym.is_weak)\n    esym.st_bind = STB_WEAK;\n  else if (sym.file->is_dso)\n    esym.st_bind = STB_GLOBAL;\n  else\n    esym.st_bind = sym.esym().st_bind;\n\n  if constexpr (is_arm64<E>)\n    esym.arm64_variant_pcs = sym.esym().arm64_variant_pcs;\n\n  if constexpr (is_riscv<E>)\n    esym.riscv_variant_cc = sym.esym().riscv_variant_cc;\n\n  if constexpr (is_ppc64v2<E>)\n    esym.ppc64_local_entry = sym.esym().ppc64_local_entry;\n\n  auto get_st_shndx = [&](Symbol<E> &sym) -> u32 {\n    if (SectionFragment<E> *frag = sym.get_frag())\n      if (frag->is_alive)\n        return frag->output_section.shndx;\n\n    if constexpr (is_ppc64v1<E>)\n      if (sym.has_opd(ctx))\n        return ctx.extra.opd->shndx;\n\n    if (InputSection<E> *isec = sym.get_input_section()) {\n      if (isec->is_alive)\n        return isec->output_section->shndx;\n      if (isec->icf_removed())\n        return isec->leader->output_section->shndx;\n    }\n\n    return SHN_UNDEF;\n  };\n\n  i64 shndx = -1;\n  InputSection<E> *isec = sym.get_input_section();\n\n  if (sym.has_copyrel) {\n    // Symbol in .copyrel\n    shndx = sym.is_copyrel_readonly ? ctx.copyrel_relro->shndx : ctx.copyrel->shndx;\n    esym.st_value = sym.get_addr(ctx);\n  } else if (sym.file->is_dso || sym.esym().is_undef()) {\n    // Undefined symbol in a DSO\n    esym.st_shndx = SHN_UNDEF;\n    esym.st_size = 0;\n    if (sym.is_canonical)\n      esym.st_value = sym.get_plt_addr(ctx);\n  } else if (Chunk<E> *osec = sym.get_output_section()) {\n    // Linker-synthesized symbols\n    shndx = osec->shndx;\n    esym.st_value = sym.get_addr(ctx);\n  } else if (SectionFragment<E> *frag = sym.get_frag()) {\n    // Section fragment\n    shndx = frag->output_section.shndx;\n    esym.st_value = sym.get_addr(ctx);\n  } else if (!isec) {\n    // Absolute symbol\n    esym.st_shndx = SHN_ABS;\n    esym.st_value = sym.get_addr(ctx);\n  } else if (sym.get_type() == STT_TLS) {\n    // TLS symbol\n    shndx = get_st_shndx(sym);\n    esym.st_value = sym.get_addr(ctx) - ctx.tls_begin;\n  } else if (sym.is_pde_ifunc(ctx) && sym.has_plt(ctx)) {\n    // IFUNC symbol in PDE that uses two GOT slots\n    shndx = get_st_shndx(sym);\n    esym.st_type = STT_FUNC;\n    esym.st_visibility = sym.visibility;\n    esym.st_value = sym.get_plt_addr(ctx);\n  } else if ((isec->shdr().sh_flags & SHF_MERGE) &&\n             !(isec->shdr().sh_flags & SHF_ALLOC)) {\n    // Symbol in a mergeable non-SHF_ALLOC section, such as .debug_str\n    ObjectFile<E> *file = (ObjectFile<E> *)sym.file;\n    MergeableSection<E> &m =\n      *file->mergeable_sections[file->get_shndx(sym.esym())];\n\n    SectionFragment<E> *frag;\n    i64 frag_addend;\n    std::tie(frag, frag_addend) = m.get_fragment(sym.esym().st_value);\n\n    shndx = m.parent.shndx;\n    esym.st_visibility = sym.visibility;\n    esym.st_value = frag->get_addr(ctx) + frag_addend;\n  } else {\n    // Symbol in a regular section\n    shndx = get_st_shndx(sym);\n    esym.st_visibility = sym.visibility;\n    esym.st_value = sym.get_addr(ctx, NO_PLT);\n  }\n\n  // Symbol's st_shndx is only 16 bits wide, so we can't store a large\n  // section index there. If the total number of sections is equal to\n  // or greater than SHN_LORESERVE (= 65280), the real index is stored\n  // to a SHT_SYMTAB_SHNDX section which contains a parallel array of\n  // the symbol table.\n  if (0 <= shndx && shndx < SHN_LORESERVE) {\n    esym.st_shndx = shndx;\n  } else if (SHN_LORESERVE <= shndx) {\n    if (!shn_xindex)\n      return {};\n    esym.st_shndx = SHN_XINDEX;\n    *shn_xindex = shndx;\n  }\n\n  return esym;\n}\n\ntemplate <typename E>\nvoid DynsymSection<E>::add_symbol(Context<E> &ctx, Symbol<E> *sym) {\n  if (symbols.empty())\n    symbols.resize(1);\n\n  if (sym->get_dynsym_idx(ctx) == -1) {\n    sym->set_dynsym_idx(ctx, -2);\n    symbols.push_back(sym);\n  }\n}\n\ntemplate <typename E>\nvoid DynsymSection<E>::update_shdr(Context<E> &ctx) {\n  this->shdr.sh_link = ctx.dynstr->shndx;\n  this->shdr.sh_size = sizeof(ElfSym<E>) * symbols.size();\n}\n\ntemplate <typename E>\nvoid DynsymSection<E>::copy_buf(Context<E> &ctx) {\n  ElfSym<E> *buf = (ElfSym<E> *)(ctx.buf + this->shdr.sh_offset);\n  i64 offset = dynstr_offset;\n\n  memset(buf, 0, sizeof(ElfSym<E>));\n\n  for (i64 i = 1; i < symbols.size(); i++) {\n    Symbol<E> &sym = *symbols[i];\n\n    std::optional<ElfSym<E>> esym = to_output_esym(ctx, sym, offset, nullptr);\n    if (!esym) {\n      Error(ctx) << ctx.arg.output\n                 << \": .dynsym: too many output sections: \"\n                 << (ctx.shdr->shdr.sh_size / sizeof(ElfShdr<E>))\n                 << \" requested, but ELF allows at most 65279\";\n      return;\n    }\n\n    buf[sym.get_dynsym_idx(ctx)] = *esym;\n    offset += sym.name().size() + 1;\n  }\n}\n\ntemplate <typename E>\nvoid HashSection<E>::update_shdr(Context<E> &ctx) {\n  if (ctx.dynsym->symbols.empty())\n    return;\n\n  i64 header_size = sizeof(Entry) * 2;\n  i64 num_slots = ctx.dynsym->symbols.size();\n  this->shdr.sh_size = header_size + num_slots * sizeof(Entry) * 2;\n  this->shdr.sh_link = ctx.dynsym->shndx;\n}\n\ntemplate <typename E>\nvoid HashSection<E>::copy_buf(Context<E> &ctx) {\n  u8 *base = ctx.buf + this->shdr.sh_offset;\n  memset(base, 0, this->shdr.sh_size);\n\n  std::span<Symbol<E> *> syms = ctx.dynsym->symbols;\n  Entry *hdr = (Entry *)base;\n  Entry *buckets = hdr + 2;\n  Entry *chains = buckets + syms.size();\n\n  hdr[0] = syms.size();\n  hdr[1] = syms.size();\n\n  for (Symbol<E> *sym : syms.subspan(1)) {\n    i64 i = sym->get_dynsym_idx(ctx);\n    i64 h = elf_hash(sym->name()) % syms.size();\n    chains[i] = buckets[h];\n    buckets[h] = i;\n  }\n}\n\ntemplate <typename E>\nvoid GnuHashSection<E>::update_shdr(Context<E> &ctx) {\n  if (ctx.dynsym->symbols.empty())\n    return;\n\n  // We allocate 12 bits for each symbol in the bloom filter.\n  num_bloom = bit_ceil((num_exported * 12) / (sizeof(Word<E>) * 8));\n\n  this->shdr.sh_size = HEADER_SIZE;                  // Header\n  this->shdr.sh_size += num_bloom * sizeof(Word<E>); // Bloom filter\n  this->shdr.sh_size += num_buckets * 4;             // Hash buckets\n  this->shdr.sh_size += num_exported * 4;            // Hash values\n\n  this->shdr.sh_link = ctx.dynsym->shndx;\n}\n\ntemplate <typename E>\nvoid GnuHashSection<E>::copy_buf(Context<E> &ctx) {\n  u8 *base = ctx.buf + this->shdr.sh_offset;\n  memset(base, 0, this->shdr.sh_size);\n\n  i64 first_exported = ctx.dynsym->symbols.size() - num_exported;\n\n  *(U32<E> *)base = num_buckets;\n  *(U32<E> *)(base + 4) = first_exported;\n  *(U32<E> *)(base + 8) = num_bloom;\n  *(U32<E> *)(base + 12) = BLOOM_SHIFT;\n\n  std::span<Symbol<E> *> syms = ctx.dynsym->symbols;\n  syms = syms.subspan(first_exported);\n\n  if (syms.empty())\n    return;\n\n  // Write a bloom filter\n  Word<E> *bloom = (Word<E> *)(base + HEADER_SIZE);\n  std::vector<u32> indices(num_exported);\n\n  for (i64 i = 0; i < syms.size(); i++) {\n    constexpr i64 word_bits = sizeof(Word<E>) * 8;\n\n    u32 h = syms[i]->get_djb_hash(ctx);\n    indices[i] = h % num_buckets;\n\n    i64 idx = (h / word_bits) % num_bloom;\n    bloom[idx] |= 1LL << (h % word_bits);\n    bloom[idx] |= 1LL << ((h >> BLOOM_SHIFT) % word_bits);\n  }\n\n  // Write hash bucket indices\n  U32<E> *buckets = (U32<E> *)(bloom + num_bloom);\n\n  for (i64 i = syms.size() - 1; i >= 0; i--)\n    buckets[indices[i]] = first_exported + i;\n\n  // Write a hash table\n  U32<E> *table = buckets + num_buckets;\n\n  for (i64 i = 0; i < syms.size(); i++) {\n    // The last entry in a chain must be terminated with an entry with\n    // least-significant bit 1.\n    u32 h = syms[i]->get_djb_hash(ctx);\n    if (i == syms.size() - 1 || indices[i] != indices[i + 1])\n      table[i] = h | 1;\n    else\n      table[i] = h & ~1;\n  }\n}\n\ntemplate <typename E>\nstd::string_view\nget_merged_output_name(Context<E> &ctx, std::string_view name, u64 flags,\n                       i64 entsize, i64 addralign) {\n  if (ctx.arg.relocatable && !ctx.arg.relocatable_merge_sections)\n    return name;\n  if (!ctx.arg.unique.empty() && ctx.arg.unique.find(name) != -1)\n    return name;\n\n  // GCC seems to create sections named \".rodata.strN.<mangled-symbol-name>.M\"\n  // or \".rodata.cst.<mangled-symbol-name.cstN\". We want to eliminate the\n  // symbol name part from the section name.\n  if (name.starts_with(\".rodata.\")) {\n    if (flags & SHF_STRINGS) {\n      std::string name2 = \".rodata.str\"s + std::to_string(entsize) +\n                          \".\" + std::to_string(addralign);\n      if (name == name2)\n        return name;\n      return save_string(ctx, name2);\n    } else {\n      std::string name2 = \".rodata.cst\"s + std::to_string(entsize);\n      if (name == name2)\n        return name;\n      return save_string(ctx, name2);\n    }\n  }\n\n  return name;\n}\n\ntemplate <typename E>\nMergedSection<E>::MergedSection(std::string_view name, i64 flags, i64 type,\n                                i64 entsize) {\n  this->name = name;\n  this->shdr.sh_flags = flags;\n  this->shdr.sh_type = type;\n  this->shdr.sh_entsize = entsize;\n}\n\ntemplate <typename E>\nMergedSection<E> *\nMergedSection<E>::get_instance(Context<E> &ctx, std::string_view name,\n                               const ElfShdr<E> &shdr) {\n  if (!(shdr.sh_flags & SHF_MERGE))\n    return nullptr;\n\n  i64 addralign = std::max<i64>(1, shdr.sh_addralign);\n  i64 flags = shdr.sh_flags & ~(u64)SHF_GROUP & ~(u64)SHF_COMPRESSED;\n\n  i64 entsize = shdr.sh_entsize;\n  if (entsize == 0)\n    entsize = (shdr.sh_flags & SHF_STRINGS) ? 1 : (i64)shdr.sh_addralign;\n  if (entsize == 0)\n    return nullptr;\n\n  name = get_merged_output_name(ctx, name, flags, entsize, addralign);\n\n  auto find = [&]() -> MergedSection * {\n    for (std::unique_ptr<MergedSection<E>> &osec : ctx.merged_sections)\n      if (name == osec->name && flags == osec->shdr.sh_flags &&\n          shdr.sh_type == osec->shdr.sh_type &&\n          entsize == osec->shdr.sh_entsize)\n        return osec.get();\n    return nullptr;\n  };\n\n  // Search for an exiting output section.\n  static std::shared_mutex mu;\n  {\n    std::shared_lock lock(mu);\n    if (MergedSection *osec = find())\n      return osec;\n  }\n\n  // Create a new output section.\n  std::unique_lock lock(mu);\n  if (MergedSection *osec = find())\n    return osec;\n\n  MergedSection *osec = new MergedSection(name, flags, shdr.sh_type, entsize);\n  ctx.merged_sections.emplace_back(osec);\n  return osec;\n}\n\ntemplate <typename E>\nSectionFragment<E> *\nMergedSection<E>::insert(Context<E> &ctx, std::string_view data, u64 hash,\n                         i64 p2align) {\n  // Even if GC is enabled, we garbage-collect only memory-mapped strings.\n  // Non-memory-allocated strings are typically identifiers used by debug info.\n  // To remove such strings, use the `strip` command.\n  bool is_alive = !ctx.arg.gc_sections || !(this->shdr.sh_flags & SHF_ALLOC);\n\n  SectionFragment<E> *frag =\n    map.insert(data, hash, SectionFragment(this, is_alive)).first;\n  update_maximum(frag->p2align, p2align);\n  return frag;\n}\n\ntemplate <typename E>\nstatic std::string get_cmdline_args(Context<E> &ctx) {\n  std::stringstream ss;\n  ss << ctx.cmdline_args[1];\n  for (i64 i = 2; i < ctx.cmdline_args.size(); i++)\n    ss << \" \" << ctx.cmdline_args[i];\n  return ss.str();\n}\n\n// Add strings to .comment\ntemplate <typename E>\nstatic void add_comment_strings(Context<E> &ctx) {\n  auto add = [&](std::string str) {\n    std::string_view buf = save_string(ctx, str);\n    std::string_view data(buf.data(), buf.size() + 1);\n    ctx.comment->insert(ctx, data, hash_string(data), 0);\n  };\n\n  // Add an identification string to .comment.\n  add(mold_version);\n\n  // Embed command line arguments for debugging.\n  char *env = getenv(\"MOLD_DEBUG\");\n  if (env && env[0])\n    add(\"mold command line: \" + get_cmdline_args(ctx));\n}\n\ntemplate <typename E>\nvoid MergedSection<E>::resolve(Context<E> &ctx) {\n  tbb::parallel_for_each(members, [&](MergeableSection<E> *sec) {\n    sec->split_contents(ctx);\n  });\n\n  // We aim 2/3 occupation ratio\n  map.resize(estimator.get_cardinality() * 3 / 2);\n\n  tbb::parallel_for_each(members, [&](MergeableSection<E> *sec) {\n    sec->resolve_contents(ctx);\n  });\n\n  if (this == ctx.comment)\n    add_comment_strings(ctx);\n\n  // Compute section alignment\n  u32 p2align = 0;\n  for (MergeableSection<E> *sec : members)\n    p2align = std::max<u32>(p2align, sec->p2align);\n  this->shdr.sh_addralign = 1 << p2align;\n\n  resolved = true;\n}\n\ntemplate <typename E>\nvoid MergedSection<E>::compute_section_size(Context<E> &ctx) {\n  if (!resolved)\n    resolve(ctx);\n\n  std::vector<i64> sizes(map.NUM_SHARDS * 2);\n\n  tbb::parallel_for((i64)0, map.NUM_SHARDS, [&](i64 i) {\n    using Entry = typename decltype(map)::Entry;\n    std::vector<Entry *> entries = map.get_sorted_entries(i);\n\n    i64 off1 = 0;\n    i64 off2 = 0;\n\n    for (Entry *ent : entries) {\n      SectionFragment<E> &frag = ent->value;\n      if (frag.is_alive) {\n        if (frag.is_32bit) {\n          off1 = align_to(off1, 1 << frag.p2align);\n          frag.offset = off1;\n          off1 += ent->keylen;\n        } else {\n          off2 = align_to(off2, 1 << frag.p2align);\n          frag.offset = off2;\n          off2 += ent->keylen;\n        }\n      }\n    }\n\n    sizes[i] = off1;\n    sizes[i + map.NUM_SHARDS] = off2;\n  });\n\n  i64 shard_size = map.nbuckets / map.NUM_SHARDS;\n  shard_offsets.resize(sizes.size() + 1);\n\n  for (i64 i = 1; i < sizes.size() + 1; i++)\n    shard_offsets[i] =\n      align_to(shard_offsets[i - 1] + sizes[i - 1], this->shdr.sh_addralign);\n\n  this->shdr.sh_size = shard_offsets.back();\n\n  tbb::parallel_for((i64)1, map.NUM_SHARDS, [&](i64 i) {\n    for (i64 j = shard_size * i; j < shard_size * (i + 1); j++) {\n      SectionFragment<E> &frag = map.entries[j].value;\n      if (frag.is_alive) {\n        if (frag.is_32bit)\n          frag.offset += shard_offsets[i];\n        else\n          frag.offset += shard_offsets[i + map.NUM_SHARDS];\n      }\n    }\n  });\n}\n\ntemplate <typename E>\nvoid MergedSection<E>::copy_buf(Context<E> &ctx) {\n  write_to(ctx, ctx.buf + this->shdr.sh_offset);\n}\n\ntemplate <typename E>\nvoid MergedSection<E>::write_to(Context<E> &ctx, u8 *buf) {\n  i64 shard_size = map.nbuckets / map.NUM_SHARDS;\n\n  tbb::parallel_for((i64)0, map.NUM_SHARDS, [&](i64 i) {\n    // There might be gaps between strings to satisfy alignment requirements.\n    // If that's the case, we need to zero-clear them.\n    if (this->shdr.sh_addralign > 1 &&\n        this->shdr.sh_addralign != this->shdr.sh_entsize) {\n      memset(buf + shard_offsets[i], 0, shard_offsets[i + 1] - shard_offsets[i]);\n      i64 j = map.NUM_SHARDS + i;\n      memset(buf + shard_offsets[j], 0, shard_offsets[j + 1] - shard_offsets[j]);\n    }\n\n    // Copy strings\n    for (i64 j = shard_size * i; j < shard_size * (i + 1); j++)\n      if (const char *key = map.entries[j].key)\n        if (SectionFragment<E> &frag = map.entries[j].value; frag.is_alive)\n          memcpy(buf + frag.offset, key, map.entries[j].keylen);\n  });\n}\n\ntemplate <typename E>\nvoid MergedSection<E>::print_stats(Context<E> &ctx) {\n  i64 used = 0;\n  for (i64 i = 0; i < map.nbuckets; i++)\n    if (map.entries[i].key)\n      used++;\n\n  Out(ctx) << this->name\n           << \" estimation=\" << estimator.get_cardinality()\n           << \" actual=\" << used;\n}\n\ntemplate <typename E>\nvoid EhFrameSection<E>::construct(Context<E> &ctx) {\n  Timer t(ctx, \"eh_frame\");\n\n  // Remove dead FDEs and assign them offsets within their corresponding\n  // CIE group.\n  tbb::parallel_for_each(ctx.objs, [](ObjectFile<E> *file) {\n    std::erase_if(file->fdes, [](FdeRecord<E> &fde) { return !fde.is_alive; });\n\n    i64 offset = 0;\n    for (FdeRecord<E> &fde : file->fdes) {\n      fde.output_offset = offset;\n      offset += fde.size(*file);\n    }\n    file->fde_size = offset;\n  });\n\n  // Uniquify CIEs and assign offsets to them.\n  std::vector<CieRecord<E> *> leaders;\n  auto find_leader = [&](CieRecord<E> &cie) -> CieRecord<E> * {\n    for (CieRecord<E> *leader : leaders)\n      if (cie_equals(*leader, cie))\n        return leader;\n    return nullptr;\n  };\n\n  i64 offset = 0;\n  for (ObjectFile<E> *file : ctx.objs) {\n    for (CieRecord<E> &cie : file->cies) {\n      if (CieRecord<E> *leader = find_leader(cie)) {\n        cie.output_offset = leader->output_offset;\n      } else {\n        cie.output_offset = offset;\n        cie.is_leader = true;\n        offset += cie.size();\n        leaders.push_back(&cie);\n      }\n    }\n  }\n\n  // Assign FDE offsets to files.\n  i64 idx = 0;\n  for (ObjectFile<E> *file : ctx.objs) {\n    file->fde_idx = idx;\n    idx += file->fdes.size();\n\n    file->fde_offset = offset;\n    offset += file->fde_size;\n  }\n\n  // .eh_frame must end with a null word.\n  this->shdr.sh_size = offset + 4;\n}\n\n// Write to .eh_frame and .eh_frame_hdr.\ntemplate <typename E>\nvoid EhFrameSection<E>::copy_buf(Context<E> &ctx) {\n  u8 *base = ctx.buf + this->shdr.sh_offset;\n\n  struct HdrEntry {\n    I32<E> init_addr;\n    I32<E> fde_addr;\n  };\n\n  HdrEntry *eh_hdr = nullptr;\n  if (ctx.eh_frame_hdr)\n    eh_hdr = (HdrEntry *)(ctx.buf + ctx.eh_frame_hdr->shdr.sh_offset +\n                          EhFrameHdrSection<E>::HEADER_SIZE);\n\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    // Copy CIEs.\n    for (CieRecord<E> &cie : file->cies) {\n      if (!cie.is_leader)\n        continue;\n\n      std::string_view contents = cie.get_contents();\n      memcpy(base + cie.output_offset, contents.data(), contents.size());\n\n      if (ctx.arg.relocatable)\n        continue;\n\n      for (const ElfRel<E> &rel : cie.get_rels()) {\n        assert(rel.r_offset - cie.input_offset < contents.size());\n\n        Symbol<E> &sym = *file->symbols[rel.r_sym];\n        u64 loc = cie.output_offset + rel.r_offset - cie.input_offset;\n        u64 val = sym.get_addr(ctx) + get_addend(cie.input_section, rel);\n        apply_eh_reloc(ctx, rel, loc, val);\n      }\n    }\n\n    // Copy FDEs.\n    for (i64 i = 0; i < file->fdes.size(); i++) {\n      FdeRecord<E> &fde = file->fdes[i];\n      std::span<ElfRel<E>> rels = fde.get_rels(*file);\n      i64 offset = file->fde_offset + fde.output_offset;\n\n      std::string_view contents = fde.get_contents(*file);\n      memcpy(base + offset, contents.data(), contents.size());\n\n      CieRecord<E> &cie = file->cies[fde.cie_idx];\n      *(U32<E> *)(base + offset + 4) = offset + 4 - cie.output_offset;\n\n      if (ctx.arg.relocatable)\n        continue;\n\n      for (i64 j = 0; j < rels.size(); j++) {\n        const ElfRel<E> &rel = rels[j];\n        assert(rel.r_offset - fde.input_offset < contents.size());\n\n        Symbol<E> &sym = *file->symbols[rel.r_sym];\n        u64 loc = offset + rel.r_offset - fde.input_offset;\n        u64 val = sym.get_addr(ctx) + get_addend(cie.input_section, rel);\n        apply_eh_reloc(ctx, rel, loc, val);\n\n        if (j == 0 && eh_hdr) {\n          // Write to .eh_frame_hdr\n          HdrEntry &ent = eh_hdr[file->fde_idx + i];\n          u64 origin = ctx.eh_frame_hdr->shdr.sh_addr;\n          ent.init_addr = val - origin;\n          ent.fde_addr = this->shdr.sh_addr + offset - origin;\n        }\n      }\n    }\n  });\n\n  // Write a terminator.\n  *(U32<E> *)(base + this->shdr.sh_size - 4) = 0;\n\n  // Sort .eh_frame_hdr contents.\n  if (eh_hdr) {\n    tbb::parallel_sort(eh_hdr, eh_hdr + ctx.eh_frame_hdr->num_fdes,\n                      [](const HdrEntry &a, const HdrEntry &b) {\n      return a.init_addr < b.init_addr;\n    });\n  }\n}\n\ntemplate <typename E>\nvoid EhFrameHdrSection<E>::update_shdr(Context<E> &ctx) {\n  num_fdes = 0;\n  for (ObjectFile<E> *file : ctx.objs)\n    num_fdes += file->fdes.size();\n  this->shdr.sh_size = HEADER_SIZE + num_fdes * 8;\n}\n\ntemplate <typename E>\nvoid EhFrameHdrSection<E>::copy_buf(Context<E> &ctx) {\n  u8 *base = ctx.buf + this->shdr.sh_offset;\n\n  // Write a header. The actual table is written by EhFrameSection::copy_buf.\n  base[0] = 1;\n  base[1] = DW_EH_PE_pcrel | DW_EH_PE_sdata4;\n  base[2] = DW_EH_PE_udata4;\n  base[3] = DW_EH_PE_datarel | DW_EH_PE_sdata4;\n\n  *(U32<E> *)(base + 4) = ctx.eh_frame->shdr.sh_addr - this->shdr.sh_addr - 4;\n  *(U32<E> *)(base + 8) = num_fdes;\n}\n\ntemplate <typename E>\nvoid EhFrameRelocSection<E>::update_shdr(Context<E> &ctx) {\n  tbb::enumerable_thread_specific<i64> count;\n\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    for (CieRecord<E> &cie : file->cies)\n      if (cie.is_leader)\n        count.local() += cie.get_rels().size();\n\n    for (FdeRecord<E> &fde : file->fdes)\n      count.local() += fde.get_rels(*file).size();\n  });\n\n  this->shdr.sh_size = count.combine(std::plus()) * sizeof(ElfRel<E>);\n  this->shdr.sh_link = ctx.symtab->shndx;\n  this->shdr.sh_info = ctx.eh_frame->shndx;\n}\n\ntemplate <typename E>\nvoid EhFrameRelocSection<E>::copy_buf(Context<E> &ctx) {\n  ElfRel<E> *buf = (ElfRel<E> *)(ctx.buf + this->shdr.sh_offset);\n\n  auto copy = [&](ObjectFile<E> &file, InputSection<E> &isec,\n                  const ElfRel<E> &r, u64 offset) {\n    Symbol<E> &sym = *file.symbols[r.r_sym];\n    memset(buf, 0, sizeof(*buf));\n\n    if (sym.esym().st_type == STT_SECTION) {\n      // We discard section symbols in input files and re-create new\n      // ones for each output section. So we need to adjust relocations'\n      // addends if they refer a section symbol.\n      InputSection<E> *target = sym.get_input_section();\n      buf->r_sym = target->output_section->shndx;\n\n      if constexpr (E::is_rela)\n        buf->r_addend = get_addend(isec, r) + target->offset;\n      else if (ctx.arg.relocatable)\n        write_addend(ctx.buf + ctx.eh_frame->shdr.sh_offset + offset,\n                     get_addend(isec, r) + target->offset, r);\n    } else {\n      buf->r_sym = sym.get_output_sym_idx(ctx);\n      if constexpr (E::is_rela)\n        buf->r_addend = get_addend(isec, r);\n    }\n\n    buf->r_offset = ctx.eh_frame->shdr.sh_addr + offset;\n    buf->r_type = r.r_type;\n    buf++;\n  };\n\n  for (ObjectFile<E> *file : ctx.objs) {\n    for (CieRecord<E> &cie : file->cies)\n      if (cie.is_leader)\n        for (const ElfRel<E> &rel : cie.get_rels())\n          copy(*file, cie.input_section, rel,\n               cie.output_offset + rel.r_offset - cie.input_offset);\n\n    for (FdeRecord<E> &fde : file->fdes) {\n      i64 offset = file->fde_offset + fde.output_offset;\n      for (const ElfRel<E> &rel : fde.get_rels(*file))\n        copy(*file, file->cies[fde.cie_idx].input_section, rel,\n             offset + rel.r_offset - fde.input_offset);\n    }\n  }\n}\n\ntemplate <typename E>\nvoid CopyrelSection<E>::add_symbol(Context<E> &ctx, Symbol<E> *sym) {\n  assert(!ctx.arg.shared);\n  if (sym->has_copyrel)\n    return;\n\n  if (!sym->file->is_dso) {\n    assert(sym->esym().is_undef_weak());\n    Error(ctx) << *sym->file << \": cannot create a copy relocation for \"\n               << *sym <<\"; recompile with -fPIE or -fPIC\";\n    return;\n  }\n\n  if (sym->esym().st_visibility == STV_PROTECTED) {\n    Error(ctx) << *sym->file\n               << \": cannot create a copy relocation for protected symbol '\"\n               << *sym << \"'; recompile with -fPIC\";\n    return;\n  }\n\n  if (!ctx.arg.z_copyreloc) {\n    Error(ctx) << \"-z nocopyreloc: \" << *sym->file\n               << \": cannot create a copy relocation for symbol '\" << *sym\n               << \"'; recompile with -fPIC\";\n    return;\n  }\n\n  symbols.push_back(sym);\n\n  SharedFile<E> &file = *(SharedFile<E> *)sym->file;\n  i64 alignment = file.get_alignment(sym);\n  u64 offset = align_to(this->shdr.sh_size, alignment);\n\n  this->shdr.sh_size = offset + sym->esym().st_size;\n  this->shdr.sh_addralign = std::max<i64>(alignment, this->shdr.sh_addralign);\n\n  // We need to create dynamic symbols not only for this particular symbol\n  // but also for its aliases (i.e. other symbols at the same address)\n  // becasue otherwise the aliases are broken apart at runtime.\n  // For example, `environ`, `_environ` and `__environ` in libc.so are\n  // aliases. If one of the symbols is copied by a copy relocation, other\n  // symbols have to refer to the copied place as well.\n  for (Symbol<E> *sym2 : file.get_symbols_at(sym)) {\n    sym2->add_aux(ctx);\n    sym2->is_imported = true;\n    sym2->is_exported = true;\n    sym2->has_copyrel = true;\n    sym2->is_copyrel_readonly = this->is_relro;\n    sym2->value = offset;\n    ctx.dynsym->add_symbol(ctx, sym2);\n  }\n}\n\ntemplate <typename E>\nvoid CopyrelSection<E>::copy_buf(Context<E> &ctx) {\n  ElfRel<E> *rel = (ElfRel<E> *)(ctx.buf + ctx.reldyn->shdr.sh_offset +\n                                 this->reldyn_offset);\n\n  for (Symbol<E> *sym : symbols)\n    *rel++ = ElfRel<E>(sym->get_addr(ctx), E::R_COPY,\n                       sym->get_dynsym_idx(ctx), 0);\n}\n\n// .gnu.version section contains version indices as a parallel array for\n// .dynsym. If a dynamic symbol is a defined one, its version information\n// is in .gnu.version_d. Otherwise, it's in .gnu.version_r.\ntemplate <typename E>\nvoid VersymSection<E>::update_shdr(Context<E> &ctx) {\n  this->shdr.sh_size = contents.size() * sizeof(contents[0]);\n  this->shdr.sh_link = ctx.dynsym->shndx;\n}\n\ntemplate <typename E>\nvoid VersymSection<E>::copy_buf(Context<E> &ctx) {\n  write_vector(ctx.buf + this->shdr.sh_offset, contents);\n}\n\n// If `-z pack-relative-relocs` is specified, we'll create a .relr.dyn\n// section and store base relocation records to that section instead of\n// to the usual .rela.dyn section.\n//\n// .relr.dyn is relatively new feature and not supported by glibc until\n// 2.38 which was released in 2022. If we don't do anything, executables\n// built with `-z pack-relative-relocs` would just crash immediately on\n// startup with an older version of glibc.\n//\n// As a workaround, we'll add a dependency to a dummy version name\n// \"GLIBC_ABI_DT_RELR\" if `-z pack-relative-relocs` is given so that\n// executables built with the option failed with a more friendly \"version\n// `GLIBC_ABI_DT_RELR' not found\" error message. glibc 2.38 or later knows\n// about this dummy version name and simply ignores it.\ntemplate <typename E>\nstatic bool is_glibc2(SharedFile<E> &file) {\n  if (file.soname.starts_with(\"libc.so.\"))\n    for (std::string_view str : file.version_strings)\n      if (str.starts_with(\"GLIBC_2.\"))\n        return true;\n  return false;\n}\n\ntemplate <typename E>\nvoid VerneedSection<E>::construct(Context<E> &ctx) {\n  Timer t(ctx, \"fill_verneed\");\n\n  // Create a list of versioned symbols and sort by file and version.\n  std::vector<Symbol<E> *> syms;\n\n  for (i64 i = 1; i < ctx.dynsym->symbols.size(); i++) {\n    Symbol<E> &sym = *ctx.dynsym->symbols[i];\n    if (sym.file->is_dso && VER_NDX_LAST_RESERVED < sym.ver_idx)\n      syms.push_back(&sym);\n  }\n\n  if (syms.empty())\n    return;\n\n  ranges::stable_sort(syms, {}, [](Symbol<E> *x) {\n    return std::tuple{((SharedFile<E> *)x->file)->soname, x->ver_idx};\n  });\n\n  // Resize .gnu.version\n  ctx.versym->contents.resize(ctx.dynsym->symbols.size(), VER_NDX_GLOBAL);\n  ctx.versym->contents[0] = VER_NDX_LOCAL;\n\n  // Allocate a large enough buffer for .gnu.version_r.\n  contents.resize((sizeof(ElfVerneed<E>) + sizeof(ElfVernaux<E>)) *\n                  (syms.size() + 1));\n\n  // Fill .gnu.version_r.\n  u8 *buf = (u8 *)&contents[0];\n  u8 *ptr = buf;\n  ElfVerneed<E> *verneed = nullptr;\n  ElfVernaux<E> *aux = nullptr;\n\n  i64 veridx = VER_NDX_LAST_RESERVED + ctx.arg.version_definitions.size();\n\n  auto add_entry = [&](std::string_view verstr) {\n    verneed->vn_cnt++;\n\n    if (aux)\n      aux->vna_next = sizeof(ElfVernaux<E>);\n    aux = (ElfVernaux<E> *)ptr;\n    ptr += sizeof(ElfVernaux<E>);\n\n    aux->vna_hash = elf_hash(verstr);\n    aux->vna_other = ++veridx;\n    aux->vna_name = ctx.dynstr->add_string(verstr);\n  };\n\n  auto start_group = [&](SharedFile<E> &file) {\n    this->shdr.sh_info++;\n    if (verneed)\n      verneed->vn_next = ptr - (u8 *)verneed;\n\n    verneed = (ElfVerneed<E> *)ptr;\n    ptr += sizeof(ElfVerneed<E>);\n    verneed->vn_version = 1;\n    verneed->vn_file = ctx.dynstr->find_string(file.soname);\n    verneed->vn_aux = sizeof(ElfVerneed<E>);\n    aux = nullptr;\n\n    if (ctx.arg.pack_dyn_relocs_relr && is_glibc2(file))\n      add_entry(\"GLIBC_ABI_DT_RELR\");\n  };\n\n  // Create version entries.\n  for (i64 i = 0; i < syms.size(); i++) {\n    if (i == 0 || syms[i - 1]->file != syms[i]->file) {\n      start_group(*(SharedFile<E> *)syms[i]->file);\n      add_entry(syms[i]->get_version());\n    } else if (syms[i - 1]->ver_idx != syms[i]->ver_idx) {\n      add_entry(syms[i]->get_version());\n    }\n    ctx.versym->contents[syms[i]->get_dynsym_idx(ctx)] = veridx;\n  }\n\n  // Resize .gnu.version_r to fit to its contents.\n  contents.resize(ptr - buf);\n}\n\ntemplate <typename E>\nvoid VerneedSection<E>::update_shdr(Context<E> &ctx) {\n  this->shdr.sh_size = contents.size();\n  this->shdr.sh_link = ctx.dynstr->shndx;\n}\n\ntemplate <typename E>\nvoid VerneedSection<E>::copy_buf(Context<E> &ctx) {\n  write_vector(ctx.buf + this->shdr.sh_offset, contents);\n}\n\ntemplate <typename E>\nvoid VerdefSection<E>::construct(Context<E> &ctx) {\n  Timer t(ctx, \"fill_verdef\");\n\n  if (ctx.arg.version_definitions.empty())\n    return;\n\n  // Handle --default-symver\n  if (ctx.arg.default_symver)\n    for (Symbol<E> *sym : ctx.dynsym->symbols)\n      if (sym && !sym->file->is_dso)\n        if (u16 ver = sym->ver_idx;\n            ver == VER_NDX_GLOBAL || ver == VER_NDX_UNSPECIFIED)\n          sym->ver_idx = VER_NDX_LAST_RESERVED + 1;\n\n  // Resize .gnu.version and write to it\n  ctx.versym->contents.resize(ctx.dynsym->symbols.size(), VER_NDX_GLOBAL);\n  ctx.versym->contents[0] = VER_NDX_LOCAL;\n\n  for (Symbol<E> *sym : ctx.dynsym->symbols)\n    if (sym && !sym->file->is_dso && sym->ver_idx != VER_NDX_UNSPECIFIED)\n      ctx.versym->contents[sym->get_dynsym_idx(ctx)] = sym->ver_idx;\n\n  // Allocate a buffer for .gnu.version_d and write to it\n  contents.resize((sizeof(ElfVerdef<E>) + sizeof(ElfVerdaux<E>)) *\n                  (ctx.arg.version_definitions.size() + 1));\n\n  u8 *ptr = (u8 *)contents.data();\n  ElfVerdef<E> *verdef = nullptr;\n\n  auto write = [&](std::string_view verstr, i64 idx, i64 flags) {\n    this->shdr.sh_info++;\n    if (verdef)\n      verdef->vd_next = ptr - (u8 *)verdef;\n\n    verdef = (ElfVerdef<E> *)ptr;\n    ptr += sizeof(ElfVerdef<E>);\n\n    verdef->vd_version = 1;\n    verdef->vd_flags = flags;\n    verdef->vd_ndx = idx;\n    verdef->vd_cnt = 1;\n    verdef->vd_hash = elf_hash(verstr);\n    verdef->vd_aux = sizeof(ElfVerdef<E>);\n\n    ElfVerdaux<E> *aux = (ElfVerdaux<E> *)ptr;\n    ptr += sizeof(ElfVerdaux<E>);\n    aux->vda_name = ctx.dynstr->add_string(verstr);\n  };\n\n  std::string_view soname = ctx.arg.soname;\n  if (soname.empty())\n    soname = save_string(ctx, path_filename(ctx.arg.output));\n  write(soname, 1, VER_FLG_BASE);\n\n  i64 idx = VER_NDX_LAST_RESERVED + 1;\n  for (std::string_view verstr : ctx.arg.version_definitions)\n    write(verstr, idx++, 0);\n}\n\ntemplate <typename E>\nvoid VerdefSection<E>::update_shdr(Context<E> &ctx) {\n  this->shdr.sh_size = contents.size();\n  this->shdr.sh_link = ctx.dynstr->shndx;\n}\n\ntemplate <typename E>\nvoid VerdefSection<E>::copy_buf(Context<E> &ctx) {\n  write_vector(ctx.buf + this->shdr.sh_offset, contents);\n}\n\ntemplate <typename E>\nvoid BuildIdSection<E>::update_shdr(Context<E> &ctx) {\n  this->shdr.sh_size = ctx.arg.build_id.size() + 16; // +16 for the header\n}\n\ntemplate <typename E>\nvoid BuildIdSection<E>::copy_buf(Context<E> &ctx) {\n  U32<E> *base = (U32<E> *)(ctx.buf + this->shdr.sh_offset);\n  memset(base, 0, this->shdr.sh_size);\n\n  base[0] = 4;                       // Name size\n  base[1] = ctx.arg.build_id.size(); // Hash size\n  base[2] = NT_GNU_BUILD_ID;         // Type\n  memcpy(base + 3, \"GNU\", 4);        // Name string\n  write_vector(base + 4, contents);  // Build ID\n}\n\ntemplate <typename E>\nvoid NotePackageSection<E>::update_shdr(Context<E> &ctx) {\n  if (!ctx.arg.package_metadata.empty()) {\n    // +17 is for the header and the NUL terminator\n    this->shdr.sh_size = align_to(ctx.arg.package_metadata.size() + 17, 4);\n  }\n}\n\ntemplate <typename E>\nvoid NotePackageSection<E>::copy_buf(Context<E> &ctx) {\n  U32<E> *buf = (U32<E> *)(ctx.buf + this->shdr.sh_offset);\n  memset(buf, 0, this->shdr.sh_size);\n\n  buf[0] = 4;                                      // Name size\n  buf[1] = this->shdr.sh_size - 16;                // Content size\n  buf[2] = NT_FDO_PACKAGING_METADATA;              // Type\n  memcpy(buf + 3, \"FDO\", 4);                       // Name\n  write_string(buf + 4, ctx.arg.package_metadata); // Content\n}\n\n// Merges input files' .note.gnu.property values.\ntemplate <typename E>\nvoid NotePropertySection<E>::update_shdr(Context<E> &ctx) {\n  // Obtain the list of keys\n  std::vector<ObjectFile<E> *> files = ctx.objs;\n  std::erase(files, ctx.internal_obj);\n  std::set<u32> keys;\n\n  for (ObjectFile<E> *file : files)\n    for (std::pair<u32, u32> kv : file->gnu_properties)\n      keys.insert(kv.first);\n\n  auto get_value = [](ObjectFile<E> *file, u32 key) -> u32 {\n    auto it = file->gnu_properties.find(key);\n    if (it != file->gnu_properties.end())\n      return it->second;\n    return 0;\n  };\n\n  // Merge values for each key\n  std::map<u32, u32> map;\n\n  for (u32 key : keys) {\n    if (GNU_PROPERTY_X86_UINT32_AND_LO <= key &&\n        key <= GNU_PROPERTY_X86_UINT32_AND_HI) {\n      // An AND feature is set if all input objects have the property and\n      // the feature.\n      map[key] = 0xffff'ffff;\n      for (ObjectFile<E> *file : files)\n        map[key] &= get_value(file, key);\n    } else if (GNU_PROPERTY_X86_UINT32_OR_LO <= key &&\n               key <= GNU_PROPERTY_X86_UINT32_OR_HI) {\n      // An OR feature is set if some input object has the feature.\n      for (ObjectFile<E> *file : files)\n        map[key] |= get_value(file, key);\n    } else if (GNU_PROPERTY_X86_UINT32_OR_AND_LO <= key &&\n               key <= GNU_PROPERTY_X86_UINT32_OR_AND_HI) {\n      // An OR-AND feature is set if all input object files have the property\n      // and some of them has the feature.\n      auto has_key = [&](ObjectFile<E> *file) {\n        return file->gnu_properties.contains(key);\n      };\n\n      if (ranges::all_of(files, has_key))\n        for (ObjectFile<E> *file : files)\n          map[key] |= get_value(file, key);\n    }\n  }\n\n  if (ctx.arg.z_ibt)\n    map[GNU_PROPERTY_X86_FEATURE_1_AND] |= GNU_PROPERTY_X86_FEATURE_1_IBT;\n  if (ctx.arg.z_shstk)\n    map[GNU_PROPERTY_X86_FEATURE_1_AND] |= GNU_PROPERTY_X86_FEATURE_1_SHSTK;\n  map[GNU_PROPERTY_X86_ISA_1_NEEDED] |= ctx.arg.z_x86_64_isa_level;\n\n  // Serialize the map\n  contents.clear();\n\n  for (std::pair<u32, u32> kv : map)\n    if (kv.second)\n      contents.push_back({kv.first, 4, kv.second});\n\n  if (contents.empty())\n    this->shdr.sh_size = 0;\n  else\n    this->shdr.sh_size = 16 + contents.size() * sizeof(contents[0]);\n}\n\ntemplate <typename E>\nvoid NotePropertySection<E>::copy_buf(Context<E> &ctx) {\n  U32<E> *buf = (U32<E> *)(ctx.buf + this->shdr.sh_offset);\n  memset(buf, 0, this->shdr.sh_size);\n\n  buf[0] = 4;                       // Name size\n  buf[1] = this->shdr.sh_size - 16; // Content size\n  buf[2] = NT_GNU_PROPERTY_TYPE_0;  // Type\n  memcpy(buf + 3, \"GNU\", 4);        // Name\n  write_vector(buf + 4, contents);  // Content\n}\n\ntemplate <typename E>\nCompressedSection<E>::CompressedSection(Context<E> &ctx, Chunk<E> &chunk) {\n  // Allocate a temporary buffer to write uncompressed contents. Note\n  // that we use u8[] instead of std::vector<u8> to avoid the cost of\n  // zero-initialization, as sh_size can be very large.\n  std::unique_ptr<u8[]> buf(new u8[chunk.shdr.sh_size]);\n\n  // Write uncompressed contents and then compress them\n  chunk.write_to(ctx, buf.get());\n\n  if (ctx.arg.compress_debug_sections == ELFCOMPRESS_ZLIB)\n    compressor.reset(new ZlibCompressor(buf.get(), chunk.shdr.sh_size));\n  else\n    compressor.reset(new ZstdCompressor(buf.get(), chunk.shdr.sh_size));\n\n  // Compute header field values\n  chdr.ch_type = ctx.arg.compress_debug_sections;\n  chdr.ch_size = chunk.shdr.sh_size;\n  chdr.ch_addralign = chunk.shdr.sh_addralign;\n\n  this->name = chunk.name;\n  this->shndx = chunk.shndx;\n  this->is_compressed = true;\n\n  this->shdr = chunk.shdr;\n  this->shdr.sh_flags |= SHF_COMPRESSED;\n  this->shdr.sh_addralign = 1;\n  this->shdr.sh_size = sizeof(chdr) + compressor->compressed_size;\n\n  // We can discard the uncompressed contents unless --gdb-index is given\n  if (ctx.arg.gdb_index)\n    this->uncompressed_data = std::move(buf);\n}\n\ntemplate <typename E>\nvoid CompressedSection<E>::copy_buf(Context<E> &ctx) {\n  u8 *base = ctx.buf + this->shdr.sh_offset;\n  memcpy(base, &chdr, sizeof(chdr));\n  compressor->write_to(base + sizeof(chdr));\n}\n\ntemplate <typename E>\nRelocSection<E>::RelocSection(Context<E> &ctx, OutputSection<E> &osec)\n  : output_section(osec) {\n  if constexpr (E::is_rela) {\n    this->name = save_string(ctx, \".rela\" + std::string(osec.name));\n    this->shdr.sh_type = SHT_RELA;\n  } else {\n    this->name = save_string(ctx, \".rel\" + std::string(osec.name));\n    this->shdr.sh_type = SHT_REL;\n  }\n\n  this->shdr.sh_flags = SHF_INFO_LINK;\n  this->shdr.sh_addralign = sizeof(Word<E>);\n  this->shdr.sh_entsize = sizeof(ElfRel<E>);\n\n  // Compute an offset for each input section\n  offsets.resize(osec.members.size());\n\n  auto scan = [&](const tbb::blocked_range<i64> &r, i64 sum, bool is_final) {\n    for (i64 i = r.begin(); i < r.end(); i++) {\n      InputSection<E> &isec = *osec.members[i];\n      if (is_final)\n        offsets[i] = sum;\n      sum += isec.get_rels(ctx).size();\n    }\n    return sum;\n  };\n\n  i64 num_entries = tbb::parallel_scan(\n    tbb::blocked_range<i64>(0, osec.members.size()), 0, scan, std::plus());\n\n  this->shdr.sh_size = num_entries * sizeof(ElfRel<E>);\n}\n\ntemplate <typename E>\nvoid RelocSection<E>::update_shdr(Context<E> &ctx) {\n  this->shdr.sh_link = ctx.symtab->shndx;\n  this->shdr.sh_info = output_section.shndx;\n}\n\ntemplate <typename E>\nvoid RelocSection<E>::copy_buf(Context<E> &ctx) {\n  auto get_symidx_addend = [&](InputSection<E> &isec, const ElfRel<E> &rel)\n      -> std::pair<i64, i64> {\n    Symbol<E> &sym = *isec.file.symbols[rel.r_sym];\n\n    if (!(isec.shdr().sh_flags & SHF_ALLOC)) {\n      SectionFragment<E> *frag;\n      i64 frag_addend;\n      std::tie(frag, frag_addend) = isec.get_fragment(ctx, rel);\n      if (frag)\n        return {frag->output_section.shndx, frag->offset + frag_addend};\n    }\n\n    if (sym.esym().st_type == STT_SECTION) {\n      if (SectionFragment<E> *frag = sym.get_frag())\n        return {frag->output_section.shndx,\n                frag->offset + sym.value + get_addend(isec, rel)};\n\n      InputSection<E> *isec2 = sym.get_input_section();\n      if (OutputSection<E> *osec = isec2->output_section)\n        return {osec->shndx, get_addend(isec, rel) + isec2->offset};\n\n      // This is usually a dead debug section referring to a\n      // COMDAT-eliminated section.\n      return {0, 0};\n    }\n\n    if (sym.write_to_symtab)\n      return {sym.get_output_sym_idx(ctx), get_addend(isec, rel)};\n    return {0, 0};\n  };\n\n  auto write = [&](ElfRel<E> &out, InputSection<E> &isec, const ElfRel<E> &rel) {\n    i64 symidx;\n    i64 addend;\n    std::tie(symidx, addend) = get_symidx_addend(isec, rel);\n\n    i64 r_offset = isec.output_section->shdr.sh_addr + isec.offset + rel.r_offset;\n    out = ElfRel<E>(r_offset, rel.r_type, symidx, addend);\n\n    if (ctx.arg.relocatable) {\n      u8 *base = ctx.buf + isec.output_section->shdr.sh_offset + isec.offset;\n      write_addend(base + rel.r_offset, addend, rel);\n    }\n  };\n\n  tbb::parallel_for((i64)0, (i64)output_section.members.size(), [&](i64 i) {\n    ElfRel<E> *buf = (ElfRel<E> *)(ctx.buf + this->shdr.sh_offset) + offsets[i];\n    InputSection<E> &isec = *output_section.members[i];\n    std::span<const ElfRel<E>> rels = isec.get_rels(ctx);\n\n    for (i64 j = 0; j < rels.size(); j++)\n      write(buf[j], isec, rels[j]);\n  });\n}\n\ntemplate <typename E>\nvoid ComdatGroupSection<E>::update_shdr(Context<E> &ctx) {\n  assert(ctx.arg.relocatable);\n  this->shdr.sh_link = ctx.symtab->shndx;\n\n  if (sym.esym().st_type == STT_SECTION)\n    this->shdr.sh_info = sym.get_input_section()->output_section->shndx;\n  else\n    this->shdr.sh_info = sym.get_output_sym_idx(ctx);\n}\n\ntemplate <typename E>\nvoid ComdatGroupSection<E>::copy_buf(Context<E> &ctx) {\n  U32<E> *buf = (U32<E> *)(ctx.buf + this->shdr.sh_offset);\n  *buf++ = GRP_COMDAT;\n  for (Chunk<E> *chunk : members)\n    *buf++ = chunk->shndx;\n}\n\ntemplate <typename E>\nvoid GnuDebuglinkSection<E>::update_shdr(Context<E> &ctx) {\n  filename = path_filename(ctx.arg.separate_debug_file);\n  this->shdr.sh_size = align_to(filename.size() + 1, 4) + 4;\n}\n\ntemplate <typename E>\nvoid GnuDebuglinkSection<E>::copy_buf(Context<E> &ctx) {\n  u8 *buf = ctx.buf + this->shdr.sh_offset;\n  memset(buf, 0, this->shdr.sh_size);\n  write_string(buf, filename);\n  *(U32<E> *)(buf + this->shdr.sh_size - 4) = crc32;\n}\n\nusing E = MOLD_TARGET;\n\ntemplate class Chunk<E>;\ntemplate class OutputEhdr<E>;\ntemplate class OutputShdr<E>;\ntemplate class OutputPhdr<E>;\ntemplate class InterpSection<E>;\ntemplate class OutputSection<E>;\ntemplate class GotSection<E>;\ntemplate class GotPltSection<E>;\ntemplate class PltSection<E>;\ntemplate class PltGotSection<E>;\ntemplate class RelPltSection<E>;\ntemplate class RelDynSection<E>;\ntemplate class RelrDynSection<E>;\ntemplate class StrtabSection<E>;\ntemplate class ShstrtabSection<E>;\ntemplate class DynstrSection<E>;\ntemplate class DynamicSection<E>;\ntemplate class SymtabSection<E>;\ntemplate class DynsymSection<E>;\ntemplate class HashSection<E>;\ntemplate class GnuHashSection<E>;\ntemplate class MergedSection<E>;\ntemplate class EhFrameSection<E>;\ntemplate class EhFrameHdrSection<E>;\ntemplate class EhFrameRelocSection<E>;\ntemplate class CopyrelSection<E>;\ntemplate class VersymSection<E>;\ntemplate class VerneedSection<E>;\ntemplate class VerdefSection<E>;\ntemplate class BuildIdSection<E>;\ntemplate class NotePackageSection<E>;\ntemplate class NotePropertySection<E>;\ntemplate class GdbIndexSection<E>;\ntemplate class CompressedSection<E>;\ntemplate class RelocSection<E>;\ntemplate class ComdatGroupSection<E>;\ntemplate class GnuDebuglinkSection<E>;\n\ntemplate Chunk<E> *find_chunk(Context<E> &, u32);\ntemplate Chunk<E> *find_chunk(Context<E> &, std::string_view);\ntemplate i64 to_phdr_flags(Context<E> &ctx, Chunk<E> *chunk);\n\ntemplate std::optional<ElfSym<E>>\nto_output_esym(Context<E> &, Symbol<E> &, u32, U32<E> *);\n\n} // namespace mold\n"
  },
  {
    "path": "src/output-file-unix.cc",
    "content": "#include \"mold.h\"\n\n#include <fcntl.h>\n#include <filesystem>\n#include <sys/file.h>\n#include <sys/mman.h>\n#include <system_error>\n\n#ifdef __linux__\n# include <sys/vfs.h>\n# include <linux/magic.h>\n#endif\n\nnamespace mold {\n\nstatic u32 get_umask() {\n  u32 orig_umask = umask(0);\n  umask(orig_umask);\n  return orig_umask;\n}\n\ntemplate <typename E>\nstatic int\nopen_or_create_file(Context<E> &ctx, std::string path, std::string tmpfile,\n                    int perm) {\n  // Reuse an existing file if exists and writable because on Linux,\n  // writing to an existing file is much faster than creating a fresh\n  // file and writing to it.\n  if (ctx.overwrite_output_file && rename(path.c_str(), tmpfile.c_str()) == 0) {\n    i64 fd = ::open(tmpfile.c_str(), O_RDWR | O_CREAT, perm);\n    if (fd != -1)\n      return fd;\n    unlink(tmpfile.c_str());\n  }\n\n  i64 fd = ::open(tmpfile.c_str(), O_RDWR | O_CREAT, perm);\n  if (fd == -1)\n    Fatal(ctx) << \"cannot open \" << tmpfile << \": \" << errno_string();\n  return fd;\n}\n\ntemplate <typename E>\nclass MemoryMappedOutputFile : public OutputFile<E> {\npublic:\n  MemoryMappedOutputFile(Context<E> &ctx, std::string path, i64 filesize, int perm)\n    : OutputFile<E>(path, filesize, true) {\n    std::string pid = std::to_string(getpid());\n    std::string tmpfile =\n      path_dirname(path) / (\".\" + path_filename(path) + \".\" + pid);\n\n    this->fd = open_or_create_file(ctx, path, tmpfile, perm);\n\n    if (fchmod(this->fd, perm & ~get_umask()) == -1)\n      Fatal(ctx) << \"fchmod failed: \" << errno_string();\n\n    if (ftruncate(this->fd, filesize) == -1)\n      Fatal(ctx) << \"ftruncate failed: \" << errno_string();\n\n    output_tmpfile = (char *)save_string(ctx, tmpfile).data();\n\n#ifdef __linux__\n    // Calling falllocate speeds up later linking passes on ext4,\n    // while it just takes time with not benefits on tmpfs.\n    if (struct statfs fs;\n        fstatfs(this->fd, &fs) || fs.f_type != TMPFS_MAGIC)\n      fallocate(this->fd, 0, 0, filesize);\n#endif\n\n    this->buf = (u8 *)mmap(nullptr, filesize, PROT_READ | PROT_WRITE,\n                           MAP_SHARED, this->fd, 0);\n    if (this->buf == MAP_FAILED)\n      Fatal(ctx) << path << \": mmap failed: \" << errno_string();\n\n    mold::output_buffer_start = this->buf;\n    mold::output_buffer_end = this->buf + filesize;\n  }\n\n  ~MemoryMappedOutputFile() {\n    if (fd2 != -1)\n      ::close(fd2);\n  }\n\n  void close(Context<E> &ctx) override {\n    Timer t(ctx, \"close_file\");\n\n    if (!this->is_unmapped)\n      munmap(this->buf, this->filesize);\n\n    if (!this->buf2) {\n      ::close(this->fd);\n    } else {\n      FILE *out = fdopen(this->fd, \"w\");\n      fseek(out, 0, SEEK_END);\n      fwrite(this->buf2, this->buf2_size, 1, out);\n      fclose(out);\n    }\n\n    // If an output file already exists, open a file and then remove it.\n    // This is the fastest way to unlink a file, as it does not make the\n    // system to immediately release disk blocks occupied by the file.\n    fd2 = ::open(this->path.c_str(), O_RDONLY);\n    if (fd2 != -1)\n      unlink(this->path.c_str());\n\n    if (rename(output_tmpfile, this->path.c_str()) == -1)\n      Fatal(ctx) << this->path << \": rename failed: \" << errno_string();\n    output_tmpfile = nullptr;\n  }\n\nprivate:\n  int fd2 = -1;\n};\n\ntemplate <typename E>\nstd::unique_ptr<OutputFile<E>>\nOutputFile<E>::open(Context<E> &ctx, std::string path, i64 filesize, int perm) {\n  Timer t(ctx, \"open_file\");\n\n  if (path.starts_with('/') && !ctx.arg.chroot.empty())\n    path = ctx.arg.chroot + \"/\" + path_clean(path);\n\n  std::error_code error;\n  bool is_special = path == \"-\" ||\n                    (!std::filesystem::is_regular_file(path, error) && !error);\n\n  OutputFile<E> *file;\n  if (is_special)\n    file = new MallocOutputFile(ctx, path, filesize, perm);\n  else\n    file = new MemoryMappedOutputFile(ctx, path, filesize, perm);\n\n#ifdef MADV_HUGEPAGE\n  // Enable transparent huge page for an output memory-mapped file.\n  // On Linux, it has an effect only on tmpfs mounted with `huge=advise`,\n  // but it can make the linker ~10% faster. You can try it by creating\n  // a tmpfs with the following commands\n  //\n  //  $ mkdir tmp\n  //  $ sudo mount -t tmpfs -o size=2G,huge=advise none tmp\n  //\n  // and then specifying a path under the directory as an output file.\n  madvise(file->buf, filesize, MADV_HUGEPAGE);\n#endif\n\n  if (ctx.arg.filler != -1)\n    memset(file->buf, ctx.arg.filler, filesize);\n  return std::unique_ptr<OutputFile>(file);\n}\n\n// LockingOutputFile is similar to MemoryMappedOutputFile, but it doesn't\n// rename output files and instead acquires file lock using flock().\ntemplate <typename E>\nLockingOutputFile<E>::LockingOutputFile(Context<E> &ctx, std::string path,\n                                        int perm)\n  : OutputFile<E>(path, 0, true) {\n  this->fd = ::open(path.c_str(), O_RDWR | O_CREAT, perm);\n  if (this->fd == -1)\n    Fatal(ctx) << \"cannot open \" << path << \": \" << errno_string();\n  flock(this->fd, LOCK_EX);\n\n  // We may be overwriting to an existing debug info file. We want to\n  // make the file unusable so that gdb won't use it by accident until\n  // it's ready.\n  u8 buf[256] = {};\n  (void)!!write(this->fd, buf, sizeof(buf));\n}\n\ntemplate <typename E>\nvoid LockingOutputFile<E>::resize(Context<E> &ctx, i64 filesize) {\n  if (ftruncate(this->fd, filesize) == -1)\n    Fatal(ctx) << \"ftruncate failed: \" << errno_string();\n\n  this->buf = (u8 *)mmap(nullptr, filesize, PROT_READ | PROT_WRITE,\n                         MAP_SHARED, this->fd, 0);\n  if (this->buf == MAP_FAILED)\n    Fatal(ctx) << this->path << \": mmap failed: \" << errno_string();\n\n  this->filesize = filesize;\n  mold::output_buffer_start = this->buf;\n  mold::output_buffer_end = this->buf + filesize;\n}\n\ntemplate <typename E>\nvoid LockingOutputFile<E>::close(Context<E> &ctx) {\n  if (!this->is_unmapped)\n    munmap(this->buf, this->filesize);\n\n  if (this->buf2) {\n    FILE *out = fdopen(this->fd, \"w\");\n    fseek(out, 0, SEEK_END);\n    fwrite(this->buf2, this->buf2_size, 1, out);\n    fclose(out);\n  }\n\n  ::close(this->fd);\n}\n\nusing E = MOLD_TARGET;\n\ntemplate class OutputFile<E>;\ntemplate class LockingOutputFile<E>;\n\n} // namespace mold\n"
  },
  {
    "path": "src/output-file-win32.cc",
    "content": "#include \"mold.h\"\n\n#include <fcntl.h>\n#include <windows.h>\n\nnamespace mold {\n\ntemplate <typename E>\nclass MemoryMappedOutputFile : public OutputFile<E> {\npublic:\n  MemoryMappedOutputFile(Context<E> &ctx, std::string path, i64 filesize, int perm)\n      : OutputFile<E>(path, filesize, true) {\n    // TODO: use intermediate temporary file for output.\n    DWORD attrs = (perm & 0200) ? FILE_ATTRIBUTE_NORMAL : FILE_ATTRIBUTE_READONLY;\n\n    handle = CreateFileA(path.c_str(), GENERIC_READ | GENERIC_WRITE,\n                         FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,\n                         nullptr, CREATE_ALWAYS, attrs, nullptr);\n    if (handle == INVALID_HANDLE_VALUE)\n      Fatal(ctx) << \"cannot open \" << path << \": \" << GetLastError();\n\n    HANDLE map = CreateFileMapping(handle, nullptr, PAGE_READWRITE, 0,\n                                   filesize, nullptr);\n    if (!map)\n      Fatal(ctx) << path << \": CreateFileMapping failed: \" << GetLastError();\n\n    this->buf = (u8 *)MapViewOfFile(map, FILE_MAP_WRITE, 0, 0, filesize);\n    if (!this->buf)\n      Fatal(ctx) << path << \": MapViewOfFile failed: \" << GetLastError();\n\n    CloseHandle(map);\n\n    mold::output_buffer_start = this->buf;\n    mold::output_buffer_end = this->buf + filesize;\n  }\n\n  ~MemoryMappedOutputFile() {\n    if (handle != INVALID_HANDLE_VALUE)\n      CloseHandle(handle);\n  }\n\n  void close(Context<E> &ctx) override {\n    Timer t(ctx, \"close_file\");\n\n    UnmapViewOfFile(this->buf);\n\n    if (this->buf2) {\n      if (SetFilePointer(handle, 0, nullptr, FILE_END) == INVALID_SET_FILE_POINTER)\n        Fatal(ctx) << this->path << \": SetFilePointer failed: \"\n                   << GetLastError();\n\n      DWORD written;\n      if (!WriteFile(handle, this->buf2, this->buf2_size, &written,\n                     nullptr))\n        Fatal(ctx) << this->path << \": WriteFile failed: \" << GetLastError();\n    }\n\n    CloseHandle(handle);\n    handle = INVALID_HANDLE_VALUE;\n  }\n\nprivate:\n  HANDLE handle;\n};\n\ntemplate <typename E>\nstd::unique_ptr<OutputFile<E>>\nOutputFile<E>::open(Context<E> &ctx, std::string path, i64 filesize, int perm) {\n  Timer t(ctx, \"open_file\");\n\n  if (path.starts_with('/') && !ctx.arg.chroot.empty())\n    path = ctx.arg.chroot + \"/\" + path_clean(path);\n\n  bool is_special = false;\n  if (path == \"-\") {\n    is_special = true;\n  } else {\n    HANDLE h = CreateFileA(path.c_str(), GENERIC_READ,\n                           FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,\n                           nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);\n    if (h != INVALID_HANDLE_VALUE) {\n      if (GetFileType(h) != FILE_TYPE_DISK)\n        is_special = true;\n      CloseHandle(h);\n    }\n  }\n\n  OutputFile<E> *file;\n  if (is_special)\n    file = new MallocOutputFile(ctx, path, filesize, perm);\n  else\n    file = new MemoryMappedOutputFile(ctx, path, filesize, perm);\n\n  if (ctx.arg.filler != -1)\n    memset(file->buf, ctx.arg.filler, filesize);\n  return std::unique_ptr<OutputFile<E>>(file);\n}\n\ntemplate <typename E>\nLockingOutputFile<E>::LockingOutputFile(Context<E> &ctx, std::string path,\n                                        int perm)\n  : OutputFile<E>(path, 0, true) {\n  Fatal(ctx) << \"LockingOutputFile is not supported on Windows\";\n}\n\ntemplate <typename E>\nvoid LockingOutputFile<E>::resize(Context<E> &ctx, i64 filesize) {}\n\ntemplate <typename E>\nvoid LockingOutputFile<E>::close(Context<E> &ctx) {}\n\nusing E = MOLD_TARGET;\n\ntemplate class OutputFile<E>;\ntemplate class LockingOutputFile<E>;\n\n} // namespace mold\n"
  },
  {
    "path": "src/passes.cc",
    "content": "#include \"config.h\"\n#include \"mold.h\"\n\n#include <blake3.h>\n#include <fstream>\n#include <functional>\n#include <optional>\n#include <regex>\n#include <shared_mutex>\n#include <tbb/enumerable_thread_specific.h>\n#include <tbb/parallel_for_each.h>\n#include <tbb/parallel_sort.h>\n#include <unordered_set>\n\nnamespace mold {\n\n// Since mold_main is a template, we can't run it without a type parameter.\n// We speculatively run mold_main with X86_64, and if the speculation was\n// wrong, re-run it with an actual machine type.\ntemplate <typename E>\nint redo_main(std::string_view target, int argc, char **argv) {\n  if constexpr (HAVE_TARGET_X86_64)\n    if (target == X86_64::name)\n      return mold_main<X86_64>(argc, argv);\n  if constexpr (HAVE_TARGET_I386)\n    if (target == I386::name)\n      return mold_main<I386>(argc, argv);\n  if constexpr (HAVE_TARGET_ARM64LE)\n    if (target == ARM64LE::name)\n      return mold_main<ARM64LE>(argc, argv);\n  if constexpr (HAVE_TARGET_ARM64BE)\n    if (target == ARM64BE::name)\n      return mold_main<ARM64BE>(argc, argv);\n  if constexpr (HAVE_TARGET_ARM32LE)\n    if (target == ARM32LE::name)\n      return mold_main<ARM32LE>(argc, argv);\n  if constexpr (HAVE_TARGET_ARM32BE)\n    if (target == ARM32BE::name)\n      return mold_main<ARM32BE>(argc, argv);\n  if constexpr (HAVE_TARGET_RV64LE)\n    if (target == RV64LE::name)\n      return mold_main<RV64LE>(argc, argv);\n  if constexpr (HAVE_TARGET_RV64BE)\n    if (target == RV64BE::name)\n      return mold_main<RV64BE>(argc, argv);\n  if constexpr (HAVE_TARGET_RV32LE)\n    if (target == RV32LE::name)\n      return mold_main<RV32LE>(argc, argv);\n  if constexpr (HAVE_TARGET_RV32BE)\n    if (target == RV32BE::name)\n      return mold_main<RV32BE>(argc, argv);\n  if constexpr (HAVE_TARGET_PPC32)\n    if (target == PPC32::name)\n      return mold_main<PPC32>(argc, argv);\n  if constexpr (HAVE_TARGET_PPC64V1)\n    if (target == PPC64V1::name)\n      return mold_main<PPC64V1>(argc, argv);\n  if constexpr (HAVE_TARGET_PPC64V2)\n    if (target == PPC64V2::name)\n      return mold_main<PPC64V2>(argc, argv);\n  if constexpr (HAVE_TARGET_S390X)\n    if (target == S390X::name)\n      return mold_main<S390X>(argc, argv);\n  if constexpr (HAVE_TARGET_SPARC64)\n    if (target == SPARC64::name)\n      return mold_main<SPARC64>(argc, argv);\n  if constexpr (HAVE_TARGET_M68K)\n    if (target == M68K::name)\n      return mold_main<M68K>(argc, argv);\n  if constexpr (HAVE_TARGET_SH4LE)\n    if (target == SH4LE::name)\n      return mold_main<SH4LE>(argc, argv);\n  if constexpr (HAVE_TARGET_SH4BE)\n    if (target == SH4BE::name)\n      return mold_main<SH4BE>(argc, argv);\n  if constexpr (HAVE_TARGET_LOONGARCH32)\n    if (target == LOONGARCH32::name)\n      return mold_main<LOONGARCH32>(argc, argv);\n  if constexpr (HAVE_TARGET_LOONGARCH64)\n    if (target == LOONGARCH64::name)\n      return mold_main<LOONGARCH64>(argc, argv);\n  abort();\n}\n\ntemplate <typename E>\nvoid apply_exclude_libs(Context<E> &ctx) {\n  Timer t(ctx, \"apply_exclude_libs\");\n\n  std::unordered_set<std::string_view> &set = ctx.arg.exclude_libs;\n  if (!set.empty())\n    for (ObjectFile<E> *file : ctx.objs)\n      if (!file->archive_name.empty())\n        if (set.contains(path_filename(file->archive_name)) || set.contains(\"ALL\"))\n          file->exclude_libs = true;\n}\n\ntemplate <typename E>\nstatic bool has_debug_info_section(Context<E> &ctx) {\n  for (ObjectFile<E> *file : ctx.objs)\n    if (file->debug_info)\n      return true;\n  return false;\n}\n\ntemplate <typename E>\nvoid create_synthetic_sections(Context<E> &ctx) {\n  auto push = [&](auto *x) {\n    ctx.chunks.push_back(x);\n    ctx.chunk_pool.emplace_back(x);\n    return x;\n  };\n\n  if (!ctx.arg.oformat_binary) {\n    auto find = [&](std::string_view name) {\n      for (SectionOrder &ord : ctx.arg.section_order)\n        if (ord.type == SectionOrder::SECTION && ord.name == name)\n          return true;\n      return false;\n    };\n\n    if (ctx.arg.section_order.empty() || find(\"EHDR\"))\n      ctx.ehdr = push(new OutputEhdr<E>(SHF_ALLOC));\n    else\n      ctx.ehdr = push(new OutputEhdr<E>(0));\n\n    if (ctx.arg.section_order.empty() || find(\"PHDR\"))\n      ctx.phdr = push(new OutputPhdr<E>(SHF_ALLOC));\n    else\n      ctx.phdr = push(new OutputPhdr<E>(0));\n\n    if (ctx.arg.z_sectionheader)\n      ctx.shdr = push(new OutputShdr<E>);\n  }\n\n  ctx.got = push(new GotSection<E>);\n\n  if constexpr (!is_sparc<E>)\n    ctx.gotplt = push(new GotPltSection<E>(ctx));\n\n  ctx.reldyn = push(new RelDynSection<E>);\n  ctx.relplt = push(new RelPltSection<E>);\n\n  if (ctx.arg.pack_dyn_relocs_relr)\n    ctx.relrdyn = push(new RelrDynSection<E>);\n\n  ctx.strtab = push(new StrtabSection<E>);\n  ctx.plt = push(new PltSection<E>);\n  ctx.pltgot = push(new PltGotSection<E>);\n  ctx.symtab = push(new SymtabSection<E>);\n  ctx.dynsym = push(new DynsymSection<E>);\n  ctx.dynstr = push(new DynstrSection<E>);\n  ctx.eh_frame = push(new EhFrameSection<E>);\n  ctx.copyrel = push(new CopyrelSection<E>(false));\n  ctx.copyrel_relro = push(new CopyrelSection<E>(true));\n\n  if (ctx.shdr)\n    ctx.shstrtab = push(new ShstrtabSection<E>);\n\n  if (!ctx.arg.dynamic_linker.empty())\n    ctx.interp = push(new InterpSection<E>);\n  if (ctx.arg.build_id.kind != BuildId::NONE)\n    ctx.buildid = push(new BuildIdSection<E>);\n  if (ctx.arg.eh_frame_hdr)\n    ctx.eh_frame_hdr = push(new EhFrameHdrSection<E>);\n  if (ctx.arg.gdb_index && has_debug_info_section(ctx))\n    ctx.gdb_index = push(new GdbIndexSection<E>);\n  if (ctx.arg.z_relro && ctx.arg.section_order.empty())\n    ctx.relro_padding = push(new RelroPaddingSection<E>);\n  if (ctx.arg.hash_style_sysv)\n    ctx.hash = push(new HashSection<E>);\n  if (ctx.arg.hash_style_gnu)\n    ctx.gnu_hash = push(new GnuHashSection<E>);\n  if (!ctx.arg.version_definitions.empty())\n    ctx.verdef = push(new VerdefSection<E>);\n  if (ctx.arg.emit_relocs)\n    ctx.eh_frame_reloc = push(new EhFrameRelocSection<E>);\n  if (!ctx.arg.separate_debug_file.empty())\n    ctx.gnu_debuglink = push(new GnuDebuglinkSection<E>);\n\n  if (ctx.arg.shared || !ctx.dsos.empty() || ctx.arg.pie) {\n    ctx.dynamic = push(new DynamicSection<E>(ctx));\n\n    // If .dynamic exists, .dynsym and .dynstr must exist as well\n    // since .dynamic refers to them.\n    ctx.dynstr->add_string(\"\");\n    ctx.dynsym->symbols.resize(1);\n  }\n\n  ctx.versym = push(new VersymSection<E>);\n  ctx.verneed = push(new VerneedSection<E>);\n  ctx.note_package = push(new NotePackageSection<E>);\n\n  if (!ctx.arg.oformat_binary) {\n    ElfShdr<E> shdr = {};\n    shdr.sh_type = SHT_PROGBITS;\n    shdr.sh_flags = SHF_MERGE | SHF_STRINGS;\n    ctx.comment = MergedSection<E>::get_instance(ctx, \".comment\", shdr);\n  }\n\n  if constexpr (is_x86<E>)\n    ctx.extra.note_property = push(new NotePropertySection<E>);\n\n  if constexpr (is_riscv<E>)\n    ctx.extra.riscv_attributes = push(new RiscvAttributesSection<E>);\n\n  if constexpr (is_ppc64v1<E>)\n    ctx.extra.opd = push(new PPC64OpdSection);\n\n  if constexpr (is_ppc64v2<E>)\n    ctx.extra.save_restore = push(new PPC64SaveRestoreSection);\n}\n\ntemplate <typename E>\nstatic void mark_live_objects(Context<E> &ctx) {\n  for (Symbol<E> *sym : ctx.arg.undefined)\n    if (sym->file)\n      sym->file->is_reachable = true;\n\n  for (Symbol<E> *sym : ctx.arg.require_defined)\n    if (sym->file)\n      sym->file->is_reachable = true;\n\n  if (!ctx.arg.undefined_glob.empty()) {\n    tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n      if (!file->is_reachable) {\n        for (Symbol<E> *sym : file->get_global_syms()) {\n          if (sym->file == file &&\n              ctx.arg.undefined_glob.find(sym->name()) != -1) {\n            file->is_reachable = true;\n            sym->gc_root = true;\n            break;\n          }\n        }\n      }\n    });\n  }\n\n  std::vector<InputFile<E> *> roots;\n  append(roots, ctx.objs);\n  append(roots, ctx.dsos);\n\n  for (InputFile<E> *file : roots)\n    if (!file->as_needed)\n      file->is_reachable = true;\n\n  std::erase_if(roots, [](InputFile<E> *file) { return !file->is_reachable; });\n\n  tbb::parallel_for_each(roots, [&](InputFile<E> *file,\n                                    tbb::feeder<InputFile<E> *> &feeder) {\n    file->mark_live_objects(ctx, [&](InputFile<E> *obj) { feeder.add(obj); });\n  });\n}\n\n// Symbol resolution involving a default symbol version is tricky because\n// a symbol that provides the default version has two names by which it\n// can be referred. Specifically, a symbol `foo` with the default version\n// `VER1` can be referred to either as `foo` or `foo@VER1`. No other\n// symbols have two names like that.\n//\n// By default, we insert symbols with a default version without an at-sign\n// (i.e. `foo` instead of `foo@VER1`) into our internal symbol table.\n// Therefore, if the symbol is referenced with an at-sign (i.e.\n// `foo@VER1`), the reference fails to resolve. This function corrects\n// that error.\n//\n// In this function, we check all unresolved versioned symbols of the form\n// `foo@VER1` by removing the version part and see if `foo` has version\n// `VER1`. If it does, that's the symbol we are looking for.\ntemplate <typename E>\nstatic void resolve_default_symver(Context<E> &ctx) {\n  std::vector<InputFile<E> *> files;\n  append(files, ctx.objs);\n  append(files, ctx.dsos);\n\n  tbb::parallel_for_each(files, [](InputFile<E> *file) {\n    std::span<Symbol<E> *> syms = file->get_global_syms();\n    for (i64 i = 0; i < syms.size(); i++)\n      if (syms[i]->is_versioned_default)\n        syms[i] = (Symbol<E> *)syms[i]->origin;\n  });\n}\n\ntemplate <typename E>\nstatic void clear_symbols(Context<E> &ctx) {\n  std::vector<InputFile<E> *> files;\n  append(files, ctx.objs);\n  append(files, ctx.dsos);\n\n  tbb::parallel_for_each(files, [](InputFile<E> *file) {\n    for (Symbol<E> *sym : file->get_global_syms()) {\n      if (__atomic_load_n(&sym->file, __ATOMIC_ACQUIRE) == file) {\n        sym->origin = 0;\n        sym->value = -1;\n        sym->sym_idx = -1;\n        sym->ver_idx = VER_NDX_UNSPECIFIED;\n        sym->is_weak = false;\n        sym->is_imported = false;\n        sym->is_exported = false;\n        __atomic_store_n(&sym->file, nullptr, __ATOMIC_RELEASE);\n      }\n    }\n  });\n}\n\ntemplate <typename E>\nvoid resolve_symbols(Context<E> &ctx) {\n  Timer t(ctx, \"resolve_symbols\");\n\n  std::vector<InputFile<E> *> files;\n  append(files, ctx.objs);\n  append(files, ctx.dsos);\n\n  for (;;) {\n    // Call resolve_symbols() to find the most appropriate file for each\n    // symbol. And then mark reachable objects to decide which files to\n    // include into an output.\n    tbb::parallel_for_each(files, [&](InputFile<E> *file) {\n      file->resolve_symbols(ctx);\n    });\n\n    resolve_default_symver(ctx);\n    mark_live_objects(ctx);\n\n    // Symbols with hidden visibility need to be resolved within the\n    // output file. If a hidden symbol was resolved to a DSO, we'll redo\n    // symbol resolution from scratch with the flag to skip that symbol\n    // next time. This should be rare.\n    std::atomic_bool redo = false;\n    tbb::parallel_for_each(ctx.dsos, [&](SharedFile<E> *file) {\n      if (file->is_reachable) {\n        for (Symbol<E> *sym : file->symbols) {\n          if (sym->file == file && sym->visibility == STV_HIDDEN) {\n            sym->skip_dso = true;\n            redo = true;\n          }\n        }\n      }\n    });\n\n    if (!redo)\n      break;\n    clear_symbols(ctx);\n  }\n\n  // Now that we know the exact set of input files that are to be\n  // included in the output file, we want to redo symbol resolution.\n  // This is because symbols defined by object files in archive files\n  // may have risen as a result of mark_live_objects().\n  //\n  // To redo symbol resolution, we want to clear the state first.\n  clear_symbols(ctx);\n\n  // COMDAT elimination needs to happen exactly here.\n  //\n  // It needs to be after archive extraction, otherwise we might\n  // assign COMDAT leader to an archive member that is not supposed to\n  // be extracted.\n  //\n  // It needs to happen before the final symbol resolution, otherwise\n  // we could eliminate a symbol that is already resolved to and cause\n  // dangling references.\n  tbb::parallel_for_each(ctx.objs, [](ObjectFile<E> *file) {\n    if (file->is_reachable) {\n      for (ComdatGroupRef<E> &ref : file->comdat_groups)\n        update_minimum(ref.group->owner, file->priority);\n      for (ComdatGroup *g : file->lto_comdat_groups)\n        if (g)\n          update_minimum(g->owner, file->priority);\n    }\n  });\n\n  tbb::parallel_for_each(ctx.objs, [](ObjectFile<E> *file) {\n    if (file->is_reachable)\n      for (ComdatGroupRef<E> &ref : file->comdat_groups)\n        if (ref.group->owner != file->priority)\n          for (u32 i : ref.members)\n            if (InputSection<E> *isec = file->sections[i].get())\n              isec->is_alive = false;\n  });\n\n  // Redo symbol resolution\n  tbb::parallel_for_each(files, [&](InputFile<E> *file) {\n    if (file->is_reachable)\n      file->resolve_symbols(ctx);\n  });\n}\n\n// Do link-time optimization. We pass all IR object files to the compiler\n// backend to compile them into a few ELF object files.\ntemplate <typename E>\nvoid do_lto(Context<E> &ctx) {\n  Timer t(ctx, \"do_lto\");\n\n  // The compiler backend needs to know how symbols are resolved, so\n  // compute symbol visibility, import/export bits, etc early.\n  apply_version_script(ctx);\n  parse_symbol_version(ctx);\n  compute_import_export(ctx);\n\n  // If multiple IR object files define the same symbol, the LTO backend\n  // would choose one of them randomly instead of reporting an error.\n  // So we need to check for symbol duplication error before doing an LTO.\n  if (!ctx.arg.allow_multiple_definition)\n    check_duplicate_symbols(ctx);\n\n  // Invoke the LTO plugin. This step compiles IR object files into a few\n  // big ELF files.\n  std::vector<ObjectFile<E> *> lto_objs = run_lto_plugin(ctx);\n  append(ctx.objs, lto_objs);\n\n  // Redo name resolution.\n  clear_symbols(ctx);\n\n  // Remove IR object files.\n  for (ObjectFile<E> *file : ctx.objs)\n    if (file->is_lto_obj)\n      file->is_reachable = false;\n\n  std::erase_if(ctx.objs, [](ObjectFile<E> *file) { return file->is_lto_obj; });\n\n  resolve_symbols(ctx);\n}\n\ntemplate <typename E>\nvoid parse_eh_frame_sections(Context<E> &ctx) {\n  Timer t(ctx, \"parse_eh_frame_sections\");\n\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    file->parse_ehframe(ctx);\n  });\n}\n\ntemplate <typename E>\nvoid create_merged_sections(Context<E> &ctx) {\n  Timer t(ctx, \"create_merged_sections\");\n\n  // Convert InputSections to MergeableSections.\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    file->convert_mergeable_sections(ctx);\n  });\n\n  tbb::parallel_for_each(ctx.merged_sections,\n                         [&](std::unique_ptr<MergedSection<E>> &sec) {\n    if (sec->shdr.sh_flags & SHF_ALLOC)\n      sec->resolve(ctx);\n  });\n\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    file->reattach_section_pieces(ctx);\n  });\n}\n\ntemplate <typename E>\nvoid convert_common_symbols(Context<E> &ctx) {\n  Timer t(ctx, \"convert_common_symbols\");\n\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    file->convert_common_symbols(ctx);\n  });\n}\n\ntemplate <typename E>\nstatic bool has_ctors_and_init_array(Context<E> &ctx) {\n  return\n    ranges::any_of(ctx.objs, [](ObjectFile<E> *x) { return x->has_ctors; }) &&\n    ranges::any_of(ctx.objs, [](ObjectFile<E> *x) { return x->has_init_array; });\n}\n\ntemplate <typename E>\nstatic u64 canonicalize_type(std::string_view name, u64 type) {\n  // Some old assemblers don't recognize these section names and\n  // create them as SHT_PROGBITS.\n  if (type == SHT_PROGBITS) {\n    if (name == \".init_array\" || name.starts_with(\".init_array.\"))\n      return SHT_INIT_ARRAY;\n    if (name == \".fini_array\" || name.starts_with(\".fini_array.\"))\n      return SHT_FINI_ARRAY;\n  }\n\n  // The x86-64 psABI defines SHT_X86_64_UNWIND for .eh_frame, allowing\n  // the linker to recognize the section not by name but by section type.\n  // However, that spec change was generally considered a mistake; it has\n  // just complicated the situation. As a result, .eh_frame on x86-64 may\n  // be either SHT_PROGBITS or SHT_X86_64_UNWIND. We use SHT_PROGBITS\n  // consistently.\n  if constexpr (is_x86_64<E>)\n    if (type == SHT_X86_64_UNWIND)\n      return SHT_PROGBITS;\n  return type;\n}\n\nstruct OutputSectionKey {\n  bool operator==(const OutputSectionKey &) const = default;\n  std::string_view name;\n  u64 type;\n\n  struct Hash {\n    size_t operator()(const OutputSectionKey &k) const {\n      return combine_hash(hash_string(k.name), std::hash<u64>{}(k.type));\n    }\n  };\n};\n\ntemplate <typename E>\nstatic std::string_view\nget_output_name(Context<E> &ctx, std::string_view name, u64 flags) {\n  if (ctx.arg.relocatable && !ctx.arg.relocatable_merge_sections)\n    return name;\n  if (!ctx.arg.unique.empty() && ctx.arg.unique.find(name) != -1)\n    return name;\n  if (flags & SHF_MERGE)\n    return name;\n\n  if constexpr (is_arm32<E>) {\n    if (name.starts_with(\".ARM.exidx\"))\n      return \".ARM.exidx\";\n    if (name.starts_with(\".ARM.extab\"))\n      return \".ARM.extab\";\n  }\n\n  if (ctx.arg.z_keep_text_section_prefix) {\n    static std::string_view prefixes[] = {\n      \".text.hot.\", \".text.unknown.\", \".text.unlikely.\", \".text.startup.\",\n      \".text.exit.\"\n    };\n\n    for (std::string_view prefix : prefixes) {\n      std::string_view stem = prefix.substr(0, prefix.size() - 1);\n      if (name == stem || name.starts_with(prefix))\n        return stem;\n    }\n  }\n\n  static std::string_view prefixes[] = {\n    \".text.\", \".data.rel.ro.\", \".data.\", \".rodata.\", \".bss.rel.ro.\", \".bss.\",\n    \".init_array.\", \".fini_array.\", \".tbss.\", \".tdata.\", \".gcc_except_table.\",\n    \".ctors.\", \".dtors.\", \".gnu.warning.\", \".openbsd.randomdata.\",\n    \".sdata.\", \".sbss.\", \".srodata\", \".gnu.build.attributes.\",\n  };\n\n  for (std::string_view prefix : prefixes) {\n    std::string_view stem = prefix.substr(0, prefix.size() - 1);\n    if (name == stem || name.starts_with(prefix))\n      return stem;\n  }\n\n  return name;\n}\n\ntemplate <typename E>\nstatic OutputSectionKey\nget_output_section_key(Context<E> &ctx, InputSection<E> &isec,\n                       bool ctors_in_init_array) {\n  // If .init_array/.fini_array exist, .ctors/.dtors must be merged\n  // with them.\n  //\n  // CRT object files contain .ctors/.dtors sections without any\n  // relocations. They contain sentinel values, 0 and -1, to mark the\n  // beginning and the end of the initializer/finalizer pointer arrays.\n  // We do not place them into .init_array/.fini_array because such\n  // invalid pointer values would simply make the program to crash.\n  if (ctors_in_init_array && !isec.get_rels(ctx).empty()) {\n    std::string_view name = isec.name();\n    if (name == \".ctors\" || name.starts_with(\".ctors.\"))\n      return {\".init_array\", SHT_INIT_ARRAY};\n    if (name == \".dtors\" || name.starts_with(\".dtors.\"))\n      return {\".fini_array\", SHT_FINI_ARRAY};\n  }\n\n  const ElfShdr<E> &shdr = isec.shdr();\n  std::string_view name = get_output_name(ctx, isec.name(), shdr.sh_flags);\n  u64 type = canonicalize_type<E>(name, shdr.sh_type);\n  return {name, type};\n}\n\ntemplate <typename E>\nstatic bool is_relro(OutputSection<E> &osec) {\n  // PT_GNU_RELRO segment is a security mechanism to make more pages\n  // read-only than we could have done without it.\n  //\n  // Traditionally, sections are either read-only or read-write. If a\n  // section contains dynamic relocations, it must have been put into a\n  // read-write segment so that the program loader can mutate its\n  // contents in memory, even if no one will write to it at runtime.\n  //\n  // RELRO segment allows us to make such pages writable only when a\n  // program is being loaded. After that, the page becomes read-only.\n  //\n  // Some sections, such as .init, .fini, .got, .dynamic, contain\n  // dynamic relocations but doesn't have to be writable at runtime,\n  // so they are put into a RELRO segment.\n  std::string_view name = osec.name;\n  u32 type = osec.shdr.sh_type;\n  u32 flags = osec.shdr.sh_flags;\n\n  return name == \".toc\" || name.ends_with(\".rel.ro\") ||\n         name.ends_with(\".rel.ro.hot\") || name.ends_with(\".rel.ro.unlikely\") ||\n         type == SHT_INIT_ARRAY || type == SHT_FINI_ARRAY ||\n         type == SHT_PREINIT_ARRAY || (flags & SHF_TLS);\n}\n\n// Create output sections for input sections.\n//\n// Since one output section could contain millions of input sections,\n// we need to do it efficiently.\ntemplate <typename E>\nvoid create_output_sections(Context<E> &ctx) {\n  Timer t(ctx, \"create_output_sections\");\n\n  using MapType = std::unordered_map<OutputSectionKey, OutputSection<E> *,\n                                     OutputSectionKey::Hash>;\n  MapType map;\n  std::shared_mutex mu;\n  bool ctors_in_init_array = has_ctors_and_init_array(ctx);\n  tbb::enumerable_thread_specific<MapType> caches;\n\n  // Instantiate output sections\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    // Make a per-thread cache of the main map to avoid lock contention.\n    // It makes a noticeable difference if we have millions of input sections.\n    MapType &cache = caches.local();\n\n    for (std::unique_ptr<InputSection<E>> &isec : file->sections) {\n      if (!isec || !isec->is_alive)\n        continue;\n\n      const ElfShdr<E> &shdr = isec->shdr();\n      u32 sh_flags = shdr.sh_flags & ~SHF_MERGE & ~SHF_STRINGS &\n                     ~SHF_COMPRESSED & ~SHF_GNU_RETAIN;\n\n      if (ctx.arg.relocatable && (sh_flags & SHF_GROUP)) {\n        OutputSection<E> *osec = new OutputSection<E>(isec->name(), shdr.sh_type);\n        osec->sh_flags = sh_flags;\n        isec->output_section = osec;\n        ctx.osec_pool.emplace_back(osec);\n        continue;\n      }\n\n      auto get_or_insert = [&] {\n        OutputSectionKey key =\n          get_output_section_key(ctx, *isec, ctors_in_init_array);\n\n        if (auto it = cache.find(key); it != cache.end())\n          return it->second;\n\n        {\n          std::shared_lock lock(mu);\n          if (auto it = map.find(key); it != map.end()) {\n            cache.insert({key, it->second});\n            return it->second;\n          }\n        }\n\n        std::unique_ptr<OutputSection<E>> osec =\n          std::make_unique<OutputSection<E>>(key.name, key.type);\n\n        std::unique_lock lock(mu);\n        auto [it, inserted] = map.insert({key, osec.get()});\n\n        if (inserted)\n          ctx.osec_pool.emplace_back(std::move(osec));\n        cache.insert({key, it->second});\n        return it->second;\n      };\n\n      OutputSection<E> *osec = get_or_insert();\n      sh_flags &= ~SHF_GROUP;\n      if ((osec->sh_flags & sh_flags) != sh_flags)\n        osec->sh_flags |= sh_flags;\n      isec->output_section = osec;\n    }\n  });\n\n  // Add input sections to output sections\n  for (std::unique_ptr<OutputSection<E>> &osec : ctx.osec_pool)\n    osec->members_vec.resize(ctx.objs.size());\n\n  tbb::parallel_for((i64)0, (i64)ctx.objs.size(), [&](i64 i) {\n    for (std::unique_ptr<InputSection<E>> &isec : ctx.objs[i]->sections)\n      if (isec && isec->output_section)\n        isec->output_section->members_vec[i].push_back(isec.get());\n  });\n\n  // Compute section alignment\n  for (std::unique_ptr<OutputSection<E>> &osec : ctx.osec_pool) {\n    Atomic<u32> p2align;\n    tbb::parallel_for((i64)0, (i64)ctx.objs.size(), [&](i64 i) {\n      u32 x = 0;\n      for (InputSection<E> *isec : osec->members_vec[i])\n        x = std::max<u32>(x, isec->p2align);\n      update_maximum(p2align, x);\n    });\n    osec->shdr.sh_addralign = 1 << p2align;\n  }\n\n  for (std::unique_ptr<OutputSection<E>> &osec : ctx.osec_pool) {\n    osec->shdr.sh_flags = osec->sh_flags;\n    osec->is_relro = is_relro(*osec);\n    osec->members = flatten(osec->members_vec);\n    osec->members_vec.clear();\n    osec->members_vec.shrink_to_fit();\n  }\n\n  // Add output sections and mergeable sections to ctx.chunks\n  std::vector<Chunk<E> *> chunks;\n  for (std::unique_ptr<OutputSection<E>> &osec : ctx.osec_pool)\n    chunks.push_back(osec.get());\n  for (std::unique_ptr<MergedSection<E>> &osec : ctx.merged_sections)\n    chunks.push_back(osec.get());\n\n  // Sections are added to the section lists in an arbitrary order\n  // because they are created in parallel. Sort them to to make the\n  // output deterministic.\n  tbb::parallel_sort(chunks.begin(), chunks.end(), [](Chunk<E> *x, Chunk<E> *y) {\n    return std::tuple(x->name, x->shdr.sh_type, x->shdr.sh_flags) <\n           std::tuple(y->name, y->shdr.sh_type, y->shdr.sh_flags);\n  });\n\n  append(ctx.chunks, chunks);\n}\n\n// Create a dummy object file containing linker-synthesized\n// symbols.\ntemplate <typename E>\nvoid create_internal_file(Context<E> &ctx) {\n  ObjectFile<E> *obj = new ObjectFile<E>;\n  ctx.obj_pool.emplace_back(obj);\n  ctx.internal_obj = obj;\n  ctx.objs.push_back(obj);\n\n  // Create linker-synthesized symbols.\n  ctx.internal_esyms.resize(1);\n\n  obj->symbols.push_back(new Symbol<E>);\n  obj->first_global = 1;\n  obj->is_reachable = true;\n  obj->priority = 1;\n\n  auto add = [&](Symbol<E> *sym) {\n    obj->symbols.push_back(sym);\n\n    // An actual value will be set to a linker-synthesized symbol by\n    // fix_synthetic_symbols(). Until then, `value` doesn't have a valid\n    // value. 0xdeadbeef is a unique dummy value to make debugging easier\n    // if the field is accidentally used before it gets a valid one.\n    sym->value = 0xdeadbeef;\n\n    ElfSym<E> esym;\n    memset(&esym, 0, sizeof(esym));\n    esym.st_type = STT_NOTYPE;\n    esym.st_shndx = SHN_ABS;\n    esym.st_bind = STB_GLOBAL;\n    esym.st_visibility = STV_DEFAULT;\n    ctx.internal_esyms.push_back(esym);\n  };\n\n  // Add --defsym'd symbols\n  for (i64 i = 0; i < ctx.arg.defsyms.size(); i++)\n    add(ctx.arg.defsyms[i].first);\n\n  // Add --section-order symbols\n  for (SectionOrder &ord : ctx.arg.section_order)\n    if (ord.type == SectionOrder::SYMBOL)\n      add(get_symbol(ctx, ord.name));\n\n  obj->elf_syms = ctx.internal_esyms;\n}\n\ntemplate <typename E>\nstatic std::optional<std::string>\nget_start_stop_name(Context<E> &ctx, Chunk<E> &chunk) {\n  if ((chunk.shdr.sh_flags & SHF_ALLOC) && !chunk.name.empty()) {\n    if (is_c_identifier(chunk.name))\n      return std::string(chunk.name);\n\n    if (ctx.arg.start_stop) {\n      auto isalnum = [](char c) {\n        return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') ||\n               ('0' <= c && c <= '9');\n      };\n\n      std::string s{chunk.name};\n      if (s.starts_with('.'))\n        s = s.substr(1);\n\n      for (i64 i = 0; i < s.size(); i++)\n        if (!isalnum(s[i]))\n          s[i] = '_';\n      return s;\n    }\n  }\n\n  return {};\n}\n\ntemplate <typename E>\nvoid add_synthetic_symbols(Context<E> &ctx) {\n  ObjectFile<E> &obj = *ctx.internal_obj;\n\n  auto add = [&](std::string_view name, u32 type = STT_NOTYPE) {\n    ElfSym<E> esym;\n    memset(&esym, 0, sizeof(esym));\n    esym.st_type = type;\n    esym.st_shndx = SHN_ABS;\n    esym.st_bind = STB_GLOBAL;\n    esym.st_visibility = STV_HIDDEN;\n    ctx.internal_esyms.push_back(esym);\n\n    Symbol<E> *sym = get_symbol(ctx, name);\n    sym->value = 0xdeadbeef; // unique dummy value\n    obj.symbols.push_back(sym);\n    return sym;\n  };\n\n  ctx.__ehdr_start = add(\"__ehdr_start\");\n  ctx.__init_array_start = add(\"__init_array_start\");\n  ctx.__init_array_end = add(\"__init_array_end\");\n  ctx.__fini_array_start = add(\"__fini_array_start\");\n  ctx.__fini_array_end = add(\"__fini_array_end\");\n  ctx.__preinit_array_start = add(\"__preinit_array_start\");\n  ctx.__preinit_array_end = add(\"__preinit_array_end\");\n  ctx._DYNAMIC = add(\"_DYNAMIC\");\n  ctx._GLOBAL_OFFSET_TABLE_ = add(\"_GLOBAL_OFFSET_TABLE_\");\n  ctx._PROCEDURE_LINKAGE_TABLE_ = add(\"_PROCEDURE_LINKAGE_TABLE_\");\n  ctx.__bss_start = add(\"__bss_start\");\n  ctx._end = add(\"_end\");\n  ctx._etext = add(\"_etext\");\n  ctx._edata = add(\"_edata\");\n  ctx.__executable_start = add(\"__executable_start\");\n\n  ctx.__rel_iplt_start =\n    add(E::is_rela ? \"__rela_iplt_start\" : \"__rel_iplt_start\");\n  ctx.__rel_iplt_end =\n    add(E::is_rela ? \"__rela_iplt_end\" : \"__rel_iplt_end\");\n\n  if (ctx.arg.eh_frame_hdr)\n    ctx.__GNU_EH_FRAME_HDR = add(\"__GNU_EH_FRAME_HDR\");\n\n  if (!get_symbol(ctx, \"end\")->file)\n    ctx.end = add(\"end\");\n  if (!get_symbol(ctx, \"etext\")->file)\n    ctx.etext = add(\"etext\");\n  if (!get_symbol(ctx, \"edata\")->file)\n    ctx.edata = add(\"edata\");\n  if (!get_symbol(ctx, \"__dso_handle\")->file)\n    ctx.__dso_handle = add(\"__dso_handle\");\n\n  if constexpr (supports_tlsdesc<E>)\n    ctx._TLS_MODULE_BASE_ = add(\"_TLS_MODULE_BASE_\", STT_TLS);\n\n  if constexpr (is_riscv<E>) {\n    ctx.__global_pointer = add(\"__global_pointer$\");\n    if (ctx.dynamic && !ctx.arg.shared)\n      ctx.__global_pointer->is_exported = true;\n  }\n\n  if constexpr (is_arm32<E>) {\n    ctx.__exidx_start = add(\"__exidx_start\");\n    ctx.__exidx_end = add(\"__exidx_end\");\n  }\n\n  if constexpr (is_ppc64<E>)\n    ctx.extra.TOC = add(\".TOC.\");\n\n  if constexpr (is_ppc32<E>)\n    ctx.extra._SDA_BASE_ = add(\"_SDA_BASE_\");\n\n  auto add_start_stop = [&](std::string s) {\n    add(save_string(ctx, s));\n    if (ctx.arg.z_start_stop_visibility_protected)\n      get_symbol(ctx, save_string(ctx, s))->is_exported = true;\n  };\n\n  for (Chunk<E> *chunk : ctx.chunks) {\n    if (std::optional<std::string> name = get_start_stop_name(ctx, *chunk)) {\n      add_start_stop(\"__start_\" + *name);\n      add_start_stop(\"__stop_\" + *name);\n\n      if (ctx.arg.physical_image_base) {\n        add_start_stop(\"__phys_start_\" + *name);\n        add_start_stop(\"__phys_stop_\" + *name);\n      }\n    }\n  }\n\n  if constexpr (is_ppc64v2<E>)\n    for (std::pair<std::string_view, u32> p : ppc64_save_restore_insns)\n      if (std::string_view label = p.first; !label.empty())\n        add(label);\n\n  obj.elf_syms = ctx.internal_esyms;\n  obj.resolve_symbols(ctx);\n\n  // Make all synthetic symbols relative ones by associating them to\n  // a dummy output section.\n  for (Symbol<E> *sym : obj.symbols) {\n    if (sym->file == &obj) {\n      sym->set_output_section(ctx.symtab);\n      sym->is_imported = false;\n    }\n  }\n\n  // Handle --defsym symbols.\n  for (i64 i = 0; i < ctx.arg.defsyms.size(); i++) {\n    Symbol<E> *sym1 = ctx.arg.defsyms[i].first;\n    std::variant<Symbol<E> *, u64> val = ctx.arg.defsyms[i].second;\n\n    if (Symbol<E> **ref = std::get_if<Symbol<E> *>(&val)) {\n      Symbol<E> *sym2 = *ref;\n      if (!sym2->file) {\n        Error(ctx) << \"--defsym: undefined symbol: \" << *sym2;\n        continue;\n      }\n\n      ElfSym<E> &esym = obj.elf_syms[i + 1];\n      esym.st_type = sym2->esym().st_type;\n      if constexpr (is_ppc64v2<E>)\n        esym.ppc64_local_entry = sym2->esym().ppc64_local_entry;\n\n      if (sym2->is_absolute())\n        sym1->origin = 0;\n    } else {\n      sym1->origin = 0;\n    }\n  }\n}\n\ntemplate <typename E>\nvoid apply_section_align(Context<E> &ctx) {\n  std::unordered_map<std::string_view, u64> &map = ctx.arg.section_align;\n  if (!map.empty())\n    for (Chunk<E> *chunk : ctx.chunks)\n      if (OutputSection<E> *osec = chunk->to_osec())\n        if (auto it = map.find(osec->name); it != map.end())\n          osec->shdr.sh_addralign = it->second;\n}\n\ntemplate <typename E>\nvoid check_cet_errors(Context<E> &ctx) {\n  bool warning = (ctx.arg.z_cet_report == CET_REPORT_WARNING);\n  assert(warning || ctx.arg.z_cet_report == CET_REPORT_ERROR);\n\n  auto has_feature = [](ObjectFile<E> *file, u32 feature) {\n    return ranges::any_of(file->gnu_properties, [&](std::pair<u32, u32> kv) {\n      return kv.first == GNU_PROPERTY_X86_FEATURE_1_AND &&\n             (kv.second & feature);\n    });\n  };\n\n  for (ObjectFile<E> *file : ctx.objs) {\n    if (file == ctx.internal_obj)\n      continue;\n\n    if (!has_feature(file, GNU_PROPERTY_X86_FEATURE_1_IBT)) {\n      if (warning)\n        Warn(ctx) << *file << \": -cet-report=warning: \"\n                  << \"missing GNU_PROPERTY_X86_FEATURE_1_IBT\";\n      else\n        Error(ctx) << *file << \": -cet-report=error: \"\n                   << \"missing GNU_PROPERTY_X86_FEATURE_1_IBT\";\n    }\n\n    if (!has_feature(file, GNU_PROPERTY_X86_FEATURE_1_SHSTK)) {\n      if (warning)\n        Warn(ctx) << *file << \": -cet-report=warning: \"\n                  << \"missing GNU_PROPERTY_X86_FEATURE_1_SHSTK\";\n      else\n        Error(ctx) << *file << \": -cet-report=error: \"\n                   << \"missing GNU_PROPERTY_X86_FEATURE_1_SHSTK\";\n    }\n  }\n}\n\ntemplate <typename E>\nvoid print_dependencies(Context<E> &ctx) {\n  Out(ctx) <<\nR\"(# This is an output of the mold linker's --print-dependencies option.\n#\n# Each line consists of 4 fields, <section1>, <section2>, <symbol-type> and\n# <symbol>, separated by tab characters. It indicates that <section1> depends\n# on <section2> to use <symbol>. <symbol-type> is either \"u\" or \"w\" for\n# regular undefined or weak undefined, respectively.\n#\n# If you want to obtain dependency information per function granularity,\n# compile source files with the -ffunction-sections compiler flag.\n)\";\n\n  auto println = [&](auto &src, Symbol<E> &sym, ElfSym<E> &esym) {\n    if (InputSection<E> *isec = sym.get_input_section())\n      Out(ctx) << src << \"\\t\" << *isec\n               << \"\\t\" << (esym.is_weak() ? 'w' : 'u')\n               << \"\\t\" << sym;\n    else\n      Out(ctx) << src << \"\\t\" << *sym.file\n               << \"\\t\" << (esym.is_weak() ? 'w' : 'u')\n               << \"\\t\" << sym;\n  };\n\n  for (ObjectFile<E> *file : ctx.objs) {\n    for (std::unique_ptr<InputSection<E>> &isec : file->sections) {\n      if (!isec)\n        continue;\n\n      std::unordered_set<void *> visited;\n\n      for (const ElfRel<E> &r : isec->get_rels(ctx)) {\n        if (r.r_type == R_NONE || file->elf_syms.size() <= r.r_sym)\n          continue;\n\n        ElfSym<E> &esym = file->elf_syms[r.r_sym];\n        Symbol<E> &sym = *file->symbols[r.r_sym];\n\n        if (esym.is_undef() && sym.file && sym.file != file &&\n            visited.insert((void *)&sym).second)\n          println(*isec, sym, esym);\n      }\n    }\n  }\n\n  for (SharedFile<E> *file : ctx.dsos) {\n    for (i64 i = file->first_global; i < file->symbols.size(); i++) {\n      ElfSym<E> &esym = file->elf_syms[i];\n      Symbol<E> &sym = *file->symbols[i];\n      if (esym.is_undef() && sym.file && sym.file != file)\n        println(*file, sym, esym);\n    }\n  }\n}\n\ntemplate <typename E>\nstatic std::string create_response_file(Context<E> &ctx) {\n  std::string buf;\n  std::stringstream out;\n\n  std::string cwd = std::filesystem::current_path().string();\n  out << \"-C \" << cwd.substr(1) << \"\\n\";\n\n  if (cwd != \"/\") {\n    out << \"--chroot ..\";\n    i64 depth = ranges::count(cwd, '/');\n    for (i64 i = 1; i < depth; i++)\n      out << \"/..\";\n    out << \"\\n\";\n  }\n\n  for (i64 i = 1; i < ctx.cmdline_args.size(); i++) {\n    std::string_view arg = ctx.cmdline_args[i];\n    if (arg != \"-repro\" && arg != \"--repro\")\n      out << arg << \"\\n\";\n  }\n  return out.str();\n}\n\ntemplate <typename E>\nvoid write_repro_file(Context<E> &ctx) {\n  Timer t(ctx, \"write_repro_file\");\n\n  std::string path = ctx.arg.output + \".repro.tar\";\n  std::unique_ptr<TarWriter> tar =\n    TarWriter::open(path, path_filename(ctx.arg.output) + \".repro\");\n  if (!tar)\n    Fatal(ctx) << \"cannot open \" << path << \": \" << errno_string();\n\n  tar->append(\"response.txt\", create_response_file(ctx));\n  tar->append(\"version.txt\", mold_version + \"\\n\");\n\n  std::unordered_set<std::string_view> seen;\n\n  for (std::unique_ptr<MappedFile> &mf : ctx.mf_pool) {\n    if (!mf->parent && seen.insert(mf->name).second) {\n      // We reopen a file because we may have modified the contents of mf\n      // in memory, which is mapped with PROT_WRITE and MAP_PRIVATE.\n      MappedFile *mf2 = must_open_file(ctx, mf->name);\n      tar->append(std::filesystem::absolute(mf->name).string(),\n                  mf2->get_contents());\n      mf2->unmap();\n    }\n  }\n}\n\ntemplate <typename E>\nvoid check_duplicate_symbols(Context<E> &ctx) {\n  Timer t(ctx, \"check_duplicate_symbols\");\n\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    if (!file->is_reachable)\n      return;\n\n    for (i64 i = file->first_global; i < file->elf_syms.size(); i++) {\n      const ElfSym<E> &esym = file->elf_syms[i];\n      Symbol<E> &sym = *file->symbols[i];\n\n      // Skip if our symbol is undef or weak\n      if (!sym.file || sym.file == file || sym.file == ctx.internal_obj ||\n          esym.is_undef() || esym.is_common() || (esym.st_bind == STB_WEAK))\n        continue;\n\n      // Skip if our symbol is in a dead section. In most cases, the\n      // section has been eliminated due to comdat deduplication.\n      if (!esym.is_abs()) {\n        InputSection<E> *isec = file->get_section(esym);\n        if (!isec || !isec->is_alive)\n          continue;\n      }\n\n      // Skip if the symbol is a deduplicated comdat symbol that is in\n      // an IR file.\n      if (file->is_lto_obj)\n        if (ComdatGroup *g = file->lto_comdat_groups[i])\n          if (g->owner != file->priority)\n            continue;\n\n      Error(ctx) << \"duplicate symbol: \" << *file << \": \" << *sym.file\n                 << \": \" << sym;\n    }\n  });\n\n  ctx.checkpoint();\n}\n\n// GCC and Clang set the SHT_NOBITS flag for an output section only if the\n// section name is .bss or similar. Sections with nonstandard names, such\n// as those defined with __attribute__((section(\".sectname\"))), are always\n// emitted as non-BSS sections even if they contain only uninitialized\n// variables.\n//\n// This function finds such allocated but all-zero sections and converts\n// them into BSS, reducing the output file size.\ntemplate <typename E>\nvoid convert_zero_to_bss(Context<E> &ctx) {\n  Timer t(ctx, \"convert_zero_to_bss\");\n\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    if (!file->is_reachable)\n      return;\n\n    for (std::unique_ptr<InputSection<E>> &isec : file->sections) {\n      if (isec && isec->is_alive &&\n          isec->shdr().sh_type == SHT_PROGBITS &&\n          (isec->shdr().sh_flags & SHF_ALLOC) &&\n          (isec->shdr().sh_flags & SHF_WRITE) &&\n          !(isec->shdr().sh_flags & SHF_EXECINSTR) &&\n          isec->get_rels(ctx).empty() &&\n          !isec->contents.empty() &&\n          isec->contents.find_first_not_of('\\0') == isec->contents.npos) {\n        isec->shdr().sh_type = SHT_NOBITS;\n        isec->contents = {};\n      }\n    }\n  });\n}\n\n// If --no-allow-shlib-undefined is specified, we report errors on\n// unresolved symbols in shared libraries. This is useful when you are\n// creating a final executable and want to make sure that all symbols\n// including ones in shared libraries have been resolved.\n//\n// If you do not pass --no-allow-shlib-undefined, undefined symbols in\n// shared libraries will be reported as run-time error by the dynamic\n// linker.\ntemplate <typename E>\nvoid check_shlib_undefined(Context<E> &ctx) {\n  Timer t(ctx, \"check_shlib_undefined\");\n\n  auto is_sparc_register = [](const ElfSym<E> &esym) {\n    // Dynamic symbol table for SPARC contains bogus entries which\n    // we need to ignore\n    if constexpr (is_sparc<E>)\n      return esym.st_type == STT_SPARC_REGISTER;\n    return false;\n  };\n\n  // Skip test if we don't have a complete set of shared object files\n  // for the program, because if there's a missing .so, an undefined\n  // symbol might be defined by that library.\n  auto do_test = [&] {\n    std::unordered_set<std::string_view> sonames;\n    for (std::unique_ptr<SharedFile<E>> &file : ctx.dso_pool)\n      sonames.insert(file->soname);\n\n    for (SharedFile<E> *file : ctx.dsos)\n      for (std::string_view soname : file->get_dt_needed(ctx))\n        if (!sonames.contains(soname))\n          return false;\n    return true;\n  };\n\n  if (do_test()) {\n    tbb::parallel_for_each(ctx.dsos, [&](SharedFile<E> *file) {\n      // Check if all undefined symbols have been resolved.\n      for (i64 i = 0; i < file->elf_syms.size(); i++) {\n        const ElfSym<E> &esym = file->elf_syms[i];\n        Symbol<E> &sym = *file->symbols[i];\n        if (esym.is_undef() && !esym.is_weak() && !sym.file &&\n            !is_sparc_register(esym))\n          Error(ctx) << *file << \": --no-allow-shlib-undefined: undefined symbol: \"\n                     << sym;\n      }\n    });\n  }\n\n  // Beyond this point, DSOs that are not referenced directly by any\n  // object file are not needed. They were kept by\n  // SharedFile<E>::mark_live_objects just for this pass. Therefore,\n  // remove unneeded DSOs from the list now.\n  for (SharedFile<E> *file : ctx.dsos)\n    file->is_reachable = !file->as_needed;\n\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    for (Symbol<E> *sym : file->get_global_syms())\n      if (InputFile<E> *file = sym->file)\n        if (file->is_dso)\n          file->is_reachable.test_and_set();\n  });\n\n  std::erase_if(ctx.dsos, [](SharedFile<E> *file) { return !file->is_reachable; });\n}\n\ntemplate <typename E>\nvoid check_symbol_types(Context<E> &ctx) {\n  Timer t(ctx, \"check_symbol_types\");\n\n  auto canonicalize = [](u32 ty) -> u32 {\n    if (ty == STT_GNU_IFUNC)\n      return STT_FUNC;\n    if (ty == STT_COMMON)\n      return STT_OBJECT;\n    return ty;\n  };\n\n  auto check = [&](InputFile<E> &file, Symbol<E> &sym,\n                   const ElfSym<E> &esym1, const ElfSym<E> &esym2) {\n    if (sym.file && sym.file != &file &&\n        esym1.st_type != STT_NOTYPE && esym2.st_type != STT_NOTYPE &&\n        canonicalize(esym1.st_type) != canonicalize(esym2.st_type)) {\n      Warn(ctx) << \"symbol type mismatch: \" << sym << '\\n'\n                << \">>> defined in \" << *sym.file << \" as \"\n                << stt_to_string<E>(esym1.st_type) << '\\n'\n                << \">>> defined in \" << file << \" as \"\n                << stt_to_string<E>(esym2.st_type);\n    }\n  };\n\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    for (i64 i = file->first_global; i < file->elf_syms.size(); i++)\n      if (Symbol<E> *sym = file->symbols[i];\n          sym->file && sym->file != file)\n        check(*file, *sym, sym->esym(), file->elf_syms[i]);\n  });\n\n  tbb::parallel_for_each(ctx.dsos, [&](SharedFile<E> *file) {\n    for (i64 i = file->first_global; i < file->elf_syms.size(); i++) {\n      if (Symbol<E> *sym = file->symbols[i];\n          sym->file && sym->file != file)\n        check(*file, *sym, sym->esym(), file->elf_syms[i]);\n\n      if (Symbol<E> *sym = file->symbols2[i])\n        if (sym->file && sym->file != file)\n          check(*file, *sym, sym->esym(), file->elf_syms[i]);\n    }\n  });\n}\n\ntemplate <typename E>\nstatic i64 get_init_fini_priority(InputSection<E> *isec) {\n  static std::regex re(R\"(\\.(\\d+)$)\", std::regex_constants::optimize);\n  std::string_view name = isec->name();\n  std::cmatch m;\n  if (std::regex_search(name.data(), name.data() + name.size(), m, re))\n    return std::stoi(m[1]);\n  return 65536;\n}\n\ntemplate <typename E>\nstatic i64 get_ctor_dtor_priority(InputSection<E> *isec) {\n  auto opts = std::regex_constants::optimize | std::regex_constants::ECMAScript;\n  static std::regex re1(R\"((?:clang_rt\\.)?crtbegin)\", opts);\n  static std::regex re2(R\"((?:clang_rt\\.)?crtend)\", opts);\n  static std::regex re3(R\"(\\.(\\d+)$)\", opts);\n\n  // crtbegin.o and crtend.o contain marker symbols such as\n  // __CTOR_LIST__ or __DTOR_LIST__. So they have to be at the\n  // beginning or end of the section.\n  std::smatch m;\n  if (std::regex_search(isec->file.filename, m, re1))\n    return -2;\n  if (std::regex_search(isec->file.filename, m, re2))\n    return 65536;\n\n  std::string name(isec->name());\n  if (std::regex_search(name, m, re3))\n    return std::stoi(m[1]);\n  return -1;\n}\n\ntemplate <typename E>\nvoid sort_init_fini(Context<E> &ctx) {\n  Timer t(ctx, \"sort_init_fini\");\n\n  struct Entry {\n    InputSection<E> *sect;\n    i64 prio;\n  };\n\n  for (Chunk<E> *chunk : ctx.chunks) {\n    if (OutputSection<E> *osec = chunk->to_osec()) {\n      if (osec->name == \".init_array\" || osec->name == \".preinit_array\" ||\n          osec->name == \".fini_array\") {\n        if (ctx.arg.shuffle_sections == SHUFFLE_SECTIONS_REVERSE)\n          ranges::reverse(osec->members);\n\n        std::vector<Entry> vec;\n\n        for (InputSection<E> *isec : osec->members) {\n          std::string_view name = isec->name();\n          if (name.starts_with(\".ctors\") || name.starts_with(\".dtors\"))\n            vec.push_back({isec, 65535 - get_ctor_dtor_priority(isec)});\n          else\n            vec.push_back({isec, get_init_fini_priority(isec)});\n        }\n        ranges::stable_sort(vec, {}, &Entry::prio);\n\n        for (i64 i = 0; i < vec.size(); i++)\n          osec->members[i] = vec[i].sect;\n      }\n    }\n  }\n}\n\ntemplate <typename E>\nvoid sort_ctor_dtor(Context<E> &ctx) {\n  Timer t(ctx, \"sort_ctor_dtor\");\n\n  struct Entry {\n    InputSection<E> *sect;\n    i64 prio;\n  };\n\n  for (Chunk<E> *chunk : ctx.chunks) {\n    if (OutputSection<E> *osec = chunk->to_osec()) {\n      if (osec->name == \".ctors\" || osec->name == \".dtors\") {\n        if (ctx.arg.shuffle_sections != SHUFFLE_SECTIONS_REVERSE)\n          ranges::reverse(osec->members);\n\n        std::vector<Entry> vec;\n        for (InputSection<E> *isec : osec->members)\n          vec.push_back({isec, get_ctor_dtor_priority(isec)});\n        ranges::stable_sort(vec, {}, &Entry::prio);\n\n        for (i64 i = 0; i < vec.size(); i++)\n          osec->members[i] = vec[i].sect;\n      }\n    }\n  }\n}\n\n// Returns true if a given section contains a DWARF32 debug record.\n// `isec` must be a .debug_info section.\ntemplate <typename E>\nstatic bool is_dwarf32(Context<E> &ctx, InputSection<E> *isec) {\n  if (!isec)\n    return true;\n\n  if (isec->sh_size < 12) {\n    // The section is too short. This is a user error, but instead of\n    // being nitpicky about it, we simply handle it on a garbage-in,\n    // garbage-out basis.\n    return true;\n  }\n\n  // A .debug_info section contains compilation units (CUs). A 32-bit CU\n  // starts with a 32-bit size field, while a 64-bit CU starts with a\n  // magic number 0xffff'ffff followed by a 64-bit size field.\n  //\n  // Note that size doesn't take the size field itself into account, so\n  // the actual size of a 64-bit CU including the size field is 12 bytes\n  // larger than the value in the size field.\n  u8 buf[12];\n  isec->copy_contents_to(ctx, buf, 12);\n  if (*(U32<E> *)buf != 0xffff'ffff)\n    return true;\n  if (*(U64<E> *)(buf + 4) + 12 == isec->sh_size)\n    return false;\n\n  // An input .debug_info section usually contains a single CU. However,\n  // if the linker combines multiple object files using `-r`, the\n  // resulting object file may have a .debug_info section with as many CUs\n  // as there are in the input files. Therefore, if the first CU doesn't\n  // cover the entire .debug_info section, we need to keep reading until\n  // the end of the section.\n  //\n  // An input .debug_info section may be compressed using zlib or zstd, so\n  // we need to uncompress it before accessing `isec->contents`.\n  isec->uncompress(ctx);\n\n  u8 *p = (u8 *)isec->contents.data() + *(U64<E> *)(buf + 4) + 12;\n  u8 *end = (u8 *)isec->contents.data() + isec->sh_size;\n\n  while (end - p >= 12) {\n    if (*(U32<E> *)p != 0xffff'ffff)\n      return true;\n    p += *(U64<E> *)(p + 4) + 12;\n  }\n  return false;\n}\n\n// Debug sections in an input object file refer to other debug sections in\n// the same file using section offsets. The offsets are 64 bits in DWARF64\n// and 32 bits in DWARF32.\n//\n// GCC and Clang emit DWARF32 debug info by default even for 64-bit code.\n// That is, 64-bit values are used for addresses, and 32-bit values for\n// references between debug sections. This makes sense for ordinary programs\n// because it reduces the size of the debug info sections.\n//\n// You can change the format to DWARF64 by passing `-gdwarf64`. Therefore,\n// the \"right\" approach to build an extremely large program in debug mode is\n// to recompile everything with `-gdwarf64`. However, that’s often not\n// feasiable for various reasons.\n//\n// If we don't do anything about it, a relocation overflow could occur if\n// any output debug section exceeds 4 GiB in size, making it almost\n// impossible for users to link an object file compiled without `-gdwarf64`\n// to an extremely large program.\n//\n// This function works around the issue by sorting output debug section\n// contents so that DWARF32 input sections are at the start of the output\n// section followed by DWARF64 input sections. By doing this, we can avoid\n// relocation overflow until the total size of DWARF32 input sections alone\n// exceeds 4 GiB.\ntemplate <typename E>\nvoid sort_debug_info_sections(Context<E> &ctx) {\n  Timer t(ctx, \"sort_debug_info_sections\");\n\n  // True if mold is running under ctest\n  bool is_in_test = false;\n  if (char *env = getenv(\"MOLD_DEBUG\"); env && env[0])\n    is_in_test = true;\n\n  // Get lists of output debug sections that need sorting\n  std::vector<OutputSection<E> *> vec1;\n  std::vector<MergedSection<E> *> vec2;\n\n  for (Chunk<E> *chunk : ctx.chunks)\n    if (OutputSection<E> *osec = chunk->to_osec())\n      if (!(osec->shdr.sh_flags & SHF_ALLOC) && osec->name.starts_with(\".debug_\"))\n        if (osec->shdr.sh_size >= UINT32_MAX || is_in_test)\n          vec1.push_back(osec);\n\n  for (std::unique_ptr<MergedSection<E>> &osec : ctx.merged_sections)\n    if (!(osec->shdr.sh_flags & SHF_ALLOC) && osec->name.starts_with(\".debug_\"))\n      if (osec->shdr.sh_size >= UINT32_MAX || is_in_test)\n        vec2.push_back(osec.get());\n\n  if (vec1.empty() && vec2.empty())\n    return;\n\n  // Read each input file's .debug_info to record whether the file contains\n  // DWARF32 or DWARF64\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    file->is_dwarf32 = is_dwarf32(ctx, file->debug_info);\n  });\n\n  // Unless we have a mix of DWARF32 and DWARF64, it doesn't make sense to\n  // sort sections.\n  if (ranges::all_of(ctx.objs, &ObjectFile<E>::is_dwarf32) ||\n      ranges::none_of(ctx.objs, &ObjectFile<E>::is_dwarf32))\n    return;\n\n  // Reorder input sections in the output section so that DWARF32\n  // precededs DWARF64\n  tbb::parallel_for_each(vec1, [&](OutputSection<E> *osec) {\n    ranges::stable_partition(osec->members, [](InputSection<E> *isec) {\n      return isec->file.is_dwarf32;\n    });\n    osec->compute_section_size(ctx);\n  });\n\n  // Reorder strings in .debug_str and the like\n  tbb::parallel_for_each(vec2, [&](MergedSection<E> *osec) {\n    tbb::parallel_for_each(osec->members, [&](MergeableSection<E> *m) {\n      if (m->input_section->file.is_dwarf32)\n        for (SectionFragment<E> *frag : m->fragments)\n          frag->is_32bit = true;\n    });\n  });\n\n  tbb::parallel_for_each(vec2, [&](MergedSection<E> *osec) {\n    osec->compute_section_size(ctx);\n  });\n}\n\n// .ctors/.dtors serves the same purpose as .init_array/.fini_array,\n// albeit with very subtly differences. Both contain pointers to\n// initializer/finalizer functions. The runtime executes them one by one\n// but in the exact opposite order to one another. Therefore, if we are to\n// place the contents of .ctors/.dtors into .init_array/.fini_array, we\n// need to reverse them.\n//\n// It's unfortunate that we have both .ctors/.dtors and\n// .init_array/.fini_array in ELF for historical reasons, but that's\n// the reality we need to deal with.\ntemplate <typename E>\nvoid fixup_ctors_in_init_array(Context<E> &ctx) {\n  Timer t(ctx, \"fixup_ctors_in_init_array\");\n\n  auto reverse_contents = [&](InputSection<E> &isec) {\n    if (isec.sh_size % sizeof(Word<E>))\n      Fatal(ctx) << isec << \": section corrupted\";\n\n    u8 *buf = (u8 *)isec.contents.data();\n    std::reverse((Word<E> *)buf, (Word<E> *)(buf + isec.sh_size));\n\n    std::span<ElfRel<E>> rels = isec.get_rels(ctx);\n    for (ElfRel<E> &r : rels)\n      r.r_offset = isec.sh_size - r.r_offset - sizeof(Word<E>);\n\n    ranges::stable_sort(rels, {}, &ElfRel<E>::r_offset);\n  };\n\n  if (Chunk<E> *chunk = find_chunk(ctx, \".init_array\"))\n    if (OutputSection<E> *osec = chunk->to_osec())\n      for (InputSection<E> *isec : osec->members)\n        if (isec->name().starts_with(\".ctors\"))\n          reverse_contents(*isec);\n\n  if (Chunk<E> *chunk = find_chunk(ctx, \".fini_array\"))\n    if (OutputSection<E> *osec = chunk->to_osec())\n      for (InputSection<E> *isec : osec->members)\n        if (isec->name().starts_with(\".dtors\"))\n          reverse_contents(*isec);\n}\n\ntemplate <typename E>\nstatic void shuffle(std::vector<InputSection<E> *> &vec, u64 seed) {\n  if (vec.empty())\n    return;\n\n  // Xorshift random number generator. We use this RNG because it is\n  // measurably faster than MT19937.\n  auto rand = [&] {\n    seed ^= seed << 13;\n    seed ^= seed >> 7;\n    seed ^= seed << 17;\n    return seed;\n  };\n\n  // The Fisher-Yates shuffling algorithm.\n  //\n  // We don't want to use std::shuffle for build reproducibility. That is,\n  // std::shuffle's implementation is not guaranteed to be the same across\n  // platform, so even though the result is guaranteed to be randomly\n  // shuffled, the exact order may be different across implementations.\n  //\n  // We are not using std::uniform_int_distribution for the same reason.\n  for (i64 i = 0; i < vec.size() - 1; i++)\n    std::swap(vec[i], vec[i + rand() % (vec.size() - i)]);\n}\n\ntemplate <typename E>\nvoid shuffle_sections(Context<E> &ctx) {\n  Timer t(ctx, \"shuffle_sections\");\n\n  auto is_eligible = [](OutputSection<E> *osec) {\n    if (osec) {\n      std::string_view name = osec->name;\n      return (osec->shdr.sh_flags & SHF_ALLOC) &&\n             name != \".init\" && name != \".fini\" &&\n             name != \".ctors\" && name != \".dtors\" &&\n             name != \".init_array\" && name != \".preinit_array\" &&\n             name != \".fini_array\";\n    }\n    return false;\n  };\n\n  switch (ctx.arg.shuffle_sections) {\n  case SHUFFLE_SECTIONS_SHUFFLE: {\n    tbb::parallel_for_each(ctx.chunks, [&](Chunk<E> *chunk) {\n      if (OutputSection<E> *osec = chunk->to_osec(); is_eligible(osec)) {\n        u64 seed = ctx.arg.shuffle_sections_seed + hash_string(osec->name);\n        shuffle(osec->members, seed);\n      }\n    });\n    break;\n  }\n  case SHUFFLE_SECTIONS_REVERSE:\n    tbb::parallel_for_each(ctx.chunks, [&](Chunk<E> *chunk) {\n      if (OutputSection<E> *osec = chunk->to_osec(); is_eligible(osec))\n        ranges::reverse(osec->members);\n    });\n    break;\n  default:\n    unreachable();\n  }\n}\n\ntemplate <typename E>\nvoid add_dynamic_strings(Context<E> &ctx) {\n  for (SharedFile<E> *file : ctx.dsos) {\n    std::string_view s = file->get_dt_audit(ctx);\n    if (!s.empty()) {\n      if (!ctx.arg.depaudit.empty())\n        ctx.arg.depaudit += ':';\n      ctx.arg.depaudit += std::string(s);\n    }\n  }\n\n  auto add = [&](std::string_view s) {\n    if (!s.empty())\n      ctx.dynstr->add_string(s);\n  };\n\n  for (SharedFile<E> *file : ctx.dsos)\n    add(file->soname);\n  for (std::string_view str : ctx.arg.auxiliary)\n    add(str);\n  for (std::string_view str : ctx.arg.filter)\n    add(str);\n\n  add(ctx.arg.audit);\n  add(ctx.arg.depaudit);\n  add(ctx.arg.rpaths);\n  add(ctx.arg.soname);\n}\n\ntemplate <typename E>\nvoid compute_section_sizes(Context<E> &ctx) {\n  Timer t(ctx, \"compute_section_sizes\");\n\n  if constexpr (needs_thunk<E>) {\n    std::vector<Chunk<E> *> vec = ctx.chunks;\n\n    auto tail = ranges::partition(vec, [&](Chunk<E> *chunk) {\n      return chunk->to_osec() && (chunk->shdr.sh_flags & SHF_EXECINSTR) &&\n             !ctx.arg.relocatable;\n    });\n\n    // create_range_extension_thunks is not thread-safe\n    for (Chunk<E> *chunk : std::span(vec.begin(), tail.begin()))\n      chunk->to_osec()->create_range_extension_thunks(ctx);\n\n    tbb::parallel_for_each(tail, [&](Chunk<E> *chunk) {\n      chunk->compute_section_size(ctx);\n    });\n  } else {\n    tbb::parallel_for_each(ctx.chunks, [&](Chunk<E> *chunk) {\n      chunk->compute_section_size(ctx);\n    });\n  }\n}\n\n// Find all unresolved symbols and attach them to the most appropriate files.\n//\n// Note that even a symbol that will be reported as an undefined symbol\n// will get an owner file in this function. Such symbol will be reported\n// by ObjectFile<E>::scan_relocations(). This is because we want to report\n// errors only on symbols that are actually referenced.\ntemplate <typename E>\nvoid claim_unresolved_symbols(Context<E> &ctx) {\n  Timer t(ctx, \"claim_unresolved_symbols\");\n\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    if (file == ctx.internal_obj)\n      return;\n\n    for (i64 i = file->first_global; i < file->elf_syms.size(); i++) {\n      const ElfSym<E> &esym = file->elf_syms[i];\n      Symbol<E> &sym = *file->symbols[i];\n      if (!esym.is_undef())\n        continue;\n\n      std::scoped_lock lock(sym.mu);\n\n      if (sym.file)\n        if (!sym.esym().is_undef() || sym.file->priority <= file->priority)\n          continue;\n\n      auto claim = [&](bool is_imported) {\n        if (sym.is_traced)\n          Out(ctx) << \"trace-symbol: \" << *file << \": unresolved\"\n                   << (esym.is_weak() ? \" weak\" : \"\")\n                   << \" symbol \" << sym;\n\n        sym.file = file;\n        sym.origin = 0;\n        sym.value = 0;\n        sym.sym_idx = i;\n        sym.is_weak = false;\n        sym.is_imported = is_imported;\n        sym.is_exported = false;\n        sym.ver_idx = is_imported ? 0 : ctx.default_version;\n      };\n\n      if (esym.is_undef_weak()) {\n        if (ctx.arg.z_dynamic_undefined_weak && sym.visibility != STV_HIDDEN) {\n          // Global weak undefined symbols are promoted to dynamic symbols\n          // by default only when linking a DSO. We generally cannot do that\n          // for executables because we may need to create a copy relocation\n          // for a data symbol, but the symbol size is not available for an\n          // unclaimed weak symbol.\n          //\n          // In contrast, GNU ld promotes weak symbols to dynamic ones even\n          // for an executable as long as they don't need copy relocations\n          // (i.e. they need only PLT entries.) That may result in an\n          // inconsistent behavior of a linked program depending on whether\n          // whether its object files were compiled with -fPIC or not. I think\n          // that's bad semantics, so we don't do that.\n          claim(true);\n        } else {\n          // Otherwise, weak undefs are converted to absolute symbols with value 0.\n          claim(false);\n        }\n        continue;\n      }\n\n      // Traditionally, remaining undefined symbols cause a link failure\n      // only when we are creating an executable. Undefined symbols in\n      // shared objects are promoted to dynamic symbols, so that they'll\n      // get another chance to be resolved at run-time. You can change the\n      // behavior by passing `-z defs` to the linker.\n      //\n      // Even if `-z defs` is given, weak undefined symbols are still\n      // promoted to dynamic symbols for compatibility with other linkers.\n      // Some major programs, notably Firefox, depend on the behavior\n      // (they use this loophole to export symbols from libxul.so).\n      if (ctx.arg.shared && sym.visibility != STV_HIDDEN &&\n          ctx.arg.unresolved_symbols != UNRESOLVED_ERROR) {\n        claim(true);\n        continue;\n      }\n\n      // Convert remaining undefined symbols to absolute symbols with value 0.\n      claim(false);\n    }\n  });\n}\n\ntemplate <typename E>\nvoid scan_relocations(Context<E> &ctx) {\n  Timer t(ctx, \"scan_relocations\");\n\n  // Scan relocations to find dynamic symbols.\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    file->scan_relocations(ctx);\n  });\n\n  // Word-size absolute relocations (e.g. R_X86_64_64) are handled\n  // separately because they can be promoted to dynamic relocations.\n  tbb::parallel_for_each(ctx.chunks, [&](Chunk<E> *chunk) {\n    if (OutputSection<E> *osec = chunk->to_osec())\n      if (osec->shdr.sh_flags & SHF_ALLOC)\n        osec->scan_abs_relocations(ctx);\n  });\n\n  // Exit if there was a relocation that refers an undefined symbol.\n  ctx.checkpoint();\n\n  // Aggregate dynamic symbols to a single vector.\n  std::vector<InputFile<E> *> files;\n  append(files, ctx.objs);\n  append(files, ctx.dsos);\n\n  std::vector<std::vector<Symbol<E> *>> vec(files.size());\n\n  tbb::parallel_for((i64)0, (i64)files.size(), [&](i64 i) {\n    for (Symbol<E> *sym : files[i]->symbols)\n      if (sym->file == files[i])\n        if (sym->flags || sym->is_imported || sym->is_exported)\n          vec[i].push_back(sym);\n  });\n\n  std::vector<Symbol<E> *> syms = flatten(vec);\n  ctx.symbol_aux.reserve(syms.size());\n\n  if (ctx.needs_tlsld)\n    ctx.got->add_tlsld(ctx);\n\n  // Assign offsets in additional tables for each dynamic symbol.\n  for (Symbol<E> *sym : syms) {\n    sym->add_aux(ctx);\n\n    if (sym->is_imported || sym->is_exported)\n      ctx.dynsym->add_symbol(ctx, sym);\n\n    if (sym->flags & NEEDS_GOT)\n      ctx.got->add_got_symbol(ctx, sym);\n\n    if (sym->flags & NEEDS_CPLT) {\n      sym->is_canonical = true;\n\n      // A canonical PLT needs to be visible from DSOs.\n      sym->is_exported = true;\n\n      // We can't use .plt.got for a canonical PLT because otherwise\n      // .plt.got and .got would refer to each other, resulting in an\n      // infinite loop at runtime.\n      ctx.plt->add_symbol(ctx, sym);\n    } else if (sym->flags & NEEDS_PLT) {\n      if (sym->flags & NEEDS_GOT)\n        ctx.pltgot->add_symbol(ctx, sym);\n      else\n        ctx.plt->add_symbol(ctx, sym);\n    }\n\n    if (sym->flags & NEEDS_GOTTP)\n      ctx.got->add_gottp_symbol(ctx, sym);\n\n    if (sym->flags & NEEDS_TLSGD)\n      ctx.got->add_tlsgd_symbol(ctx, sym);\n\n    if (sym->flags & NEEDS_TLSDESC)\n      ctx.got->add_tlsdesc_symbol(ctx, sym);\n\n    if (sym->flags & NEEDS_COPYREL) {\n      if (ctx.arg.z_relro && sym->file->is_dso &&\n          ((SharedFile<E> *)sym->file)->is_readonly(sym))\n        ctx.copyrel_relro->add_symbol(ctx, sym);\n      else\n        ctx.copyrel->add_symbol(ctx, sym);\n    }\n\n    if constexpr (is_ppc64v1<E>)\n      if (sym->flags & NEEDS_PPC_OPD)\n        ctx.extra.opd->add_symbol(ctx, sym);\n\n    sym->flags = 0;\n  }\n\n  if (ctx.has_textrel && ctx.arg.warn_textrel)\n    Warn(ctx) << \"creating a DT_TEXTREL in an output file\";\n}\n\n// Compute the is_weak bit for each imported symbol.\n//\n// If all references to a shared symbol is weak, the symbol is marked\n// as weak in .dynsym.\ntemplate <typename E>\nvoid compute_imported_symbol_weakness(Context<E> &ctx) {\n  Timer t(ctx, \"compute_imported_symbol_weakness\");\n\n  tbb::parallel_for_each(ctx.objs, [](ObjectFile<E> *file) {\n    for (i64 i = file->first_global; i < file->elf_syms.size(); i++) {\n      const ElfSym<E> &esym = file->elf_syms[i];\n      Symbol<E> &sym = *file->symbols[i];\n\n      if (esym.is_undef() && !esym.is_weak() && sym.file && sym.file->is_dso) {\n        std::scoped_lock lock(sym.mu);\n        sym.is_weak = false;\n      }\n    }\n  });\n}\n\n// Report all undefined symbols, grouped by symbol.\ntemplate <typename E>\nvoid report_undef_errors(Context<E> &ctx) {\n  constexpr i64 MAX_ERRORS = 3;\n\n  if (ctx.arg.unresolved_symbols == UNRESOLVED_IGNORE)\n    return;\n\n  for (auto &pair : ctx.undef_errors) {\n    Symbol<E> *sym = pair.first;\n    std::span<std::string> errors = pair.second;\n\n    std::stringstream ss;\n    ss << \"undefined symbol: \"\n       << (ctx.arg.demangle ? demangle(*sym) : sym->name())\n       << \"\\n\";\n\n    for (i64 i = 0; i < errors.size() && i < MAX_ERRORS; i++)\n      ss << errors[i];\n\n    if (MAX_ERRORS < errors.size())\n      ss << \">>> referenced \" << (errors.size() - MAX_ERRORS) << \" more times\\n\";\n\n    // Remove the trailing '\\n' because Error/Warn adds it automatically\n    std::string msg = ss.str();\n    msg.pop_back();\n\n    if (ctx.arg.unresolved_symbols == UNRESOLVED_ERROR)\n      Error(ctx) << msg;\n    else\n      Warn(ctx) << msg;\n  }\n\n  ctx.checkpoint();\n}\n\ntemplate <typename E>\nvoid create_reloc_sections(Context<E> &ctx) {\n  Timer t(ctx, \"create_reloc_sections\");\n\n  // Create .rela.* sections\n  tbb::parallel_for((i64)0, (i64)ctx.chunks.size(), [&](i64 i) {\n    if (OutputSection<E> *osec = ctx.chunks[i]->to_osec())\n      osec->reloc_sec.reset(new RelocSection<E>(ctx, *osec));\n  });\n\n  for (i64 i = 0, end = ctx.chunks.size(); i < end; i++)\n    if (OutputSection<E> *osec = ctx.chunks[i]->to_osec())\n      if (RelocSection<E> *x = osec->reloc_sec.get())\n        ctx.chunks.push_back(x);\n}\n\n// Copy chunks to an output file\ntemplate <typename E>\nvoid copy_chunks(Context<E> &ctx) {\n  Timer t(ctx, \"copy_chunks\");\n\n  auto copy = [&](Chunk<E> &chunk) {\n    std::string name = chunk.name.empty() ? \"(header)\" : std::string(chunk.name);\n    Timer t2(ctx, name, &t);\n    chunk.copy_buf(ctx);\n  };\n\n  // For --relocatable and --emit-relocs, we want to copy non-relocation\n  // sections first. This is because REL-type relocation sections (as\n  // opposed to RELA-type) stores relocation addends to target sections.\n  //\n  // We also does that for SH4 because despite being RELA, we always need\n  // to write addends to relocated places for SH4.\n  auto is_rel = [](Chunk<E> &chunk) {\n    return chunk.shdr.sh_type == SHT_REL ||\n           (is_sh4<E> && chunk.shdr.sh_type == SHT_RELA);\n  };\n\n  tbb::parallel_for_each(ctx.chunks, [&](Chunk<E> *chunk) {\n    if (!is_rel(*chunk))\n      copy(*chunk);\n  });\n\n  tbb::parallel_for_each(ctx.chunks, [&](Chunk<E> *chunk) {\n    if (is_rel(*chunk))\n      copy(*chunk);\n  });\n\n  // Undefined symbols in SHF_ALLOC sections are found by scan_relocations(),\n  // but those in non-SHF_ALLOC sections cannot be found until we copy section\n  // contents. So we need to call this function again to report possible\n  // undefined errors.\n  report_undef_errors(ctx);\n\n  // Zero-clear paddings between chunks\n  auto zero = [&](Chunk<E> *chunk, i64 next_start) {\n    i64 pos = chunk->shdr.sh_offset + chunk->shdr.sh_size;\n    memset(ctx.buf + pos, 0, next_start - pos);\n  };\n\n  std::vector<Chunk<E> *> chunks = ctx.chunks;\n\n  std::erase_if(chunks, [](Chunk<E> *chunk) {\n    return chunk->shdr.sh_type == SHT_NOBITS;\n  });\n\n  for (i64 i = 1; i < chunks.size(); i++)\n    zero(chunks[i - 1], chunks[i]->shdr.sh_offset);\n  zero(chunks.back(), ctx.output_file->filesize);\n}\n\ntemplate <typename E>\nvoid construct_relr(Context<E> &ctx) {\n  Timer t(ctx, \"construct_relr\");\n\n  tbb::parallel_for_each(ctx.chunks, [&](Chunk<E> *chunk) {\n    chunk->construct_relr(ctx);\n  });\n}\n\n// The hash function for .gnu.hash.\nstatic u32 djb_hash(std::string_view name) {\n  u32 h = 5381;\n  for (u8 c : name)\n    h = (h << 5) + h + c;\n  return h;\n}\n\ntemplate <typename E>\nvoid sort_dynsyms(Context<E> &ctx) {\n  Timer t(ctx, \"sort_dynsyms\");\n\n  std::span<Symbol<E> *> syms = ctx.dynsym->symbols;\n  if (syms.empty())\n    return;\n\n  // In any symtab, local symbols must precede global symbols.\n  auto globals = ranges::stable_partition(syms.subspan(1), [&](Symbol<E> *sym) {\n    return sym->is_local(ctx);\n  });\n\n  // .gnu.hash imposes more restrictions on the order of the symbols in\n  // .dynsym.\n  if (ctx.gnu_hash) {\n    auto exported_syms = ranges::stable_partition(globals, [](Symbol<E> *sym) {\n      return !sym->is_exported;\n    });\n\n    // Count the number of exported symbols to compute the size of .gnu.hash.\n    i64 num_exported = exported_syms.size();\n    u32 num_buckets = num_exported / ctx.gnu_hash->LOAD_FACTOR + 1;\n\n    tbb::parallel_for_each(exported_syms, [&](Symbol<E> *sym) {\n      sym->set_djb_hash(ctx, djb_hash(sym->name()));\n    });\n\n    tbb::parallel_sort(exported_syms, [&](Symbol<E> *a, Symbol<E> *b) {\n      return std::tuple(a->get_djb_hash(ctx) % num_buckets, a->name()) <\n             std::tuple(b->get_djb_hash(ctx) % num_buckets, b->name());\n    });\n\n    ctx.gnu_hash->num_buckets = num_buckets;\n    ctx.gnu_hash->num_exported = num_exported;\n  }\n\n  // Compute .dynstr size\n  ctx.dynsym->dynstr_offset = ctx.dynstr->shdr.sh_size;\n\n  tbb::enumerable_thread_specific<i64> size;\n  tbb::parallel_for((i64)1, (i64)syms.size(), [&](i64 i) {\n    syms[i]->set_dynsym_idx(ctx, i);\n    size.local() += syms[i]->name().size() + 1;\n  });\n\n  ctx.dynstr->shdr.sh_size += size.combine(std::plus());\n\n  // ELF's symbol table sh_info holds the offset of the first global symbol.\n  ctx.dynsym->shdr.sh_info = globals.begin() - syms.begin();\n}\n\ntemplate <typename E>\nvoid create_output_symtab(Context<E> &ctx) {\n  Timer t(ctx, \"compute_symtab_size\");\n\n  if constexpr (needs_thunk<E>) {\n    i64 n = 0;\n    for (Chunk<E> *chunk : ctx.chunks)\n      if (OutputSection<E> *osec = chunk->to_osec())\n        for (std::unique_ptr<Thunk<E>> &thunk : osec->thunks)\n          thunk->name = \"thunk\" + std::to_string(n++);\n  }\n\n  tbb::parallel_for_each(ctx.chunks, [&](Chunk<E> *chunk) {\n    chunk->compute_symtab_size(ctx);\n  });\n\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    file->compute_symtab_size(ctx);\n  });\n\n  tbb::parallel_for_each(ctx.dsos, [&](SharedFile<E> *file) {\n    file->compute_symtab_size(ctx);\n  });\n}\n\ntemplate <typename E>\nvoid apply_version_script(Context<E> &ctx) {\n  Timer t(ctx, \"apply_version_script\");\n\n  // Assign versions to symbols specified with `extern \"C++\"` or\n  // wildcard patterns first.\n  Glob matcher;\n  Glob cpp_matcher;\n\n  // The \"local:\" label has a special meaning in the version script.\n  // It can appear in any VERSION clause, and it hides matched symbols\n  // unless other non-local patterns match to them. In other words,\n  // \"local:\" has lower precedence than other version definitions.\n  //\n  // If two or more non-local patterns match to the same symbol, the\n  // last one takes precedence.\n  std::vector<VersionPattern> patterns = ctx.version_patterns;\n\n  ranges::stable_partition(patterns, [](const VersionPattern &pat) {\n    return pat.ver_idx == VER_NDX_LOCAL;\n  });\n\n  auto has_wildcard = [](std::string_view str) {\n    return str.find_first_of(\"*?[\") != str.npos;\n  };\n\n  for (i64 i = 0; i < patterns.size(); i++) {\n    VersionPattern &v = patterns[i];\n    if (v.is_cpp) {\n      if (!cpp_matcher.add(v.pattern, i))\n        Fatal(ctx) << \"invalid version pattern: \" << v.pattern;\n    } else if (has_wildcard(v.pattern)) {\n      if (!matcher.add(v.pattern, i))\n        Fatal(ctx) << \"invalid version pattern: \" << v.pattern;\n    }\n  }\n\n  if (!matcher.empty() || !cpp_matcher.empty()) {\n    tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n      for (Symbol<E> *sym : file->get_global_syms()) {\n        if (sym->file != file)\n          continue;\n\n        std::string_view name = sym->name();\n        i64 match = matcher.find(name);\n\n        // Match non-mangled symbols against the C++ pattern as well.\n        // Weird, but required to match other linkers' behavior.\n        if (!cpp_matcher.empty()) {\n          if (std::optional<std::string_view> s = demangle_cpp(name))\n            name = *s;\n          match = std::max(match, cpp_matcher.find(name));\n        }\n\n        if (match != -1)\n          sym->ver_idx = patterns[match].ver_idx;\n      }\n    });\n  }\n\n  // Next, assign versions to symbols specified by exact name.\n  // In other words, exact matches have higher precedence over\n  // wildcard or `extern \"C++\"` patterns.\n  for (VersionPattern &v : patterns) {\n    if (!v.is_cpp && !has_wildcard(v.pattern)) {\n      Symbol<E> *sym = get_symbol(ctx, v.pattern);\n\n      if (!sym->file && !ctx.arg.undefined_version)\n        Warn(ctx) << v.source << \": cannot assign version `\" << v.ver_str\n                  << \"` to symbol `\" << *sym << \"`: symbol not found\";\n\n      if (sym->file && !sym->file->is_dso)\n        sym->ver_idx = v.ver_idx;\n    }\n  }\n}\n\ntemplate <typename E>\nvoid parse_symbol_version(Context<E> &ctx) {\n  if (!ctx.arg.shared)\n    return;\n\n  Timer t(ctx, \"parse_symbol_version\");\n\n  std::unordered_map<std::string_view, u16> verdefs;\n  for (i64 i = 0; i < ctx.arg.version_definitions.size(); i++)\n    verdefs[ctx.arg.version_definitions[i]] = i + VER_NDX_LAST_RESERVED + 1;\n\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    if (file == ctx.internal_obj)\n      return;\n\n    for (i64 i = file->first_global; i < file->elf_syms.size(); i++) {\n      // Match VERSION part of symbol foo@VERSION with version definitions.\n      if (!file->has_symver[i - file->first_global])\n        continue;\n\n      Symbol<E> *sym = file->symbols[i];\n      if (sym->file != file)\n        continue;\n\n      const char *name = file->symbol_strtab.data() + file->elf_syms[i].st_name;\n      std::string_view ver = strchr(name, '@') + 1;\n\n      bool is_default = false;\n      if (ver.starts_with('@')) {\n        is_default = true;\n        ver = ver.substr(1);\n      }\n\n      auto it = verdefs.find(ver);\n      if (it == verdefs.end()) {\n        Error(ctx) << *file << \": symbol \" << *sym <<  \" has undefined version \"\n                   << ver;\n        continue;\n      }\n\n      sym->ver_idx = it->second;\n      if (!is_default)\n        sym->ver_idx |= VERSYM_HIDDEN;\n\n      // If both symbol `foo` and `foo@VERSION` are defined, `foo@VERSION`\n      // hides `foo` so that all references to `foo` are resolved to a\n      // versioned symbol. Likewise, if `foo@VERSION` and `foo@@VERSION` are\n      // defined, the default one takes precedence.\n      Symbol<E> *sym2 = get_symbol(ctx, sym->name());\n      if (sym2 != sym && sym2->file == file &&\n          !file->has_symver[sym2->sym_idx - file->first_global])\n        if (sym2->ver_idx == ctx.default_version ||\n            (sym2->ver_idx & ~VERSYM_HIDDEN) == (sym->ver_idx & ~VERSYM_HIDDEN))\n          sym2->ver_idx = VER_NDX_LOCAL;\n    }\n  });\n}\n\ntemplate <typename E>\nstatic bool should_export(Context<E> &ctx, Symbol<E> &sym) {\n  if (sym.visibility == STV_HIDDEN)\n    return false;\n\n  switch (sym.ver_idx) {\n  case VER_NDX_UNSPECIFIED:\n    if (ctx.arg.dynamic_list_data)\n      if (u32 ty = sym.get_type(); ty != STT_FUNC && ty != STT_GNU_IFUNC)\n        return true;\n    if (ctx.arg.shared)\n      return !((ObjectFile<E> *)sym.file)->exclude_libs;\n    return ctx.arg.export_dynamic;\n  case VER_NDX_LOCAL:\n    return false;\n  default:\n    return true;\n  }\n};\n\ntemplate <typename E>\nstatic bool is_protected(Context<E> &ctx, Symbol<E> &sym) {\n  if (sym.visibility == STV_PROTECTED)\n    return true;\n\n  switch (ctx.arg.Bsymbolic) {\n  case BSYMBOLIC_ALL:\n    return true;\n  case BSYMBOLIC_NONE:\n    return false;\n  case BSYMBOLIC_FUNCTIONS:\n    return sym.get_type() == STT_FUNC;\n  case BSYMBOLIC_NON_WEAK:\n    return !sym.is_weak;\n  case BSYMBOLIC_NON_WEAK_FUNCTIONS:\n    return !sym.is_weak && sym.get_type() == STT_FUNC;\n  default:\n    unreachable();\n  }\n}\n\ntemplate <typename E>\nvoid compute_import_export(Context<E> &ctx) {\n  Timer t(ctx, \"compute_import_export\");\n\n  // If we are creating an executable, we want to export symbols referenced\n  // by DSOs unless they are explicitly marked as local by a version script.\n  if (!ctx.arg.shared) {\n    tbb::parallel_for_each(ctx.dsos, [](SharedFile<E> *file) {\n      for (Symbol<E> *sym : file->symbols) {\n        if (sym->file && !sym->file->is_dso && sym->visibility != STV_HIDDEN &&\n            sym->ver_idx != VER_NDX_LOCAL) {\n          std::scoped_lock lock(sym->mu);\n          sym->is_exported = true;\n        }\n      }\n    });\n  }\n\n  // Export symbols that are not hidden or marked as local.\n  // We also want to mark imported symbols as such.\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    for (Symbol<E> *sym : file->get_global_syms()) {\n      // If we are using a symbol in a DSO, we need to import it.\n      if (sym->file && sym->file->is_dso) {\n        std::scoped_lock lock(sym->mu);\n        sym->is_imported = true;\n        continue;\n      }\n\n      // If we have a definition of a symbol, we may want to export it.\n      if (sym->file == file && should_export(ctx, *sym)) {\n        sym->is_exported = true;\n\n        // Exported symbols are marked as imported as well by default\n        // for DSOs.\n        if (ctx.arg.shared && !is_protected(ctx, *sym))\n          sym->is_imported = true;\n      }\n    }\n  });\n\n  // Apply --dynamic-list, --export-dynamic-symbol and\n  // --export-dynamic-symbol-list options.\n  //\n  // The semantics of these options vary depending on whether we are\n  // creating an executalbe or a shared object.\n  //\n  // For executable, matched symbols are exported.\n  //\n  // For shared objects, matched symbols are imported if it is already\n  // exported so that they are interposable. In other words, symbols\n  // that did not match will be bound locally within the output file,\n  // effectively turning them into protected symbols.\n  Glob matcher;\n  Glob cpp_matcher;\n\n  auto handle_match = [&](Symbol<E> *sym) {\n    if (ctx.arg.shared) {\n      if (sym->is_exported)\n        sym->is_imported = true;\n    } else {\n      if (sym->file && !sym->file->is_dso && sym->visibility != STV_HIDDEN)\n        sym->is_exported = true;\n    }\n  };\n\n  for (DynamicPattern &p : ctx.dynamic_list_patterns) {\n    if (p.is_cpp) {\n      if (!cpp_matcher.add(p.pattern, 1))\n        Fatal(ctx) << p.source << \": invalid dynamic list entry: \"\n                   << p.pattern;\n      continue;\n    }\n\n    if (p.pattern.find_first_of(\"*?[\") != p.pattern.npos) {\n      if (!matcher.add(p.pattern, 1))\n        Fatal(ctx) << p.source << \": invalid dynamic list entry: \"\n                   << p.pattern;\n      continue;\n    }\n\n    handle_match(get_symbol(ctx, p.pattern));\n  }\n\n  if (!matcher.empty() || !cpp_matcher.empty()) {\n    tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n      for (Symbol<E> *sym : file->get_global_syms()) {\n        if (sym->file != file)\n          continue;\n        if (ctx.arg.shared && !sym->is_exported)\n          continue;\n\n        std::string_view name = sym->name();\n\n        if (matcher.find(name) != -1) {\n          handle_match(sym);\n        } else if (!cpp_matcher.empty()) {\n          if (std::optional<std::string_view> s = demangle_cpp(name))\n            name = *s;\n          if (cpp_matcher.find(name) != -1)\n            handle_match(sym);\n        }\n      }\n    });\n  }\n}\n\n// Compute the \"address-taken\" bit for each input section.\n//\n// As a space-saving optimization, we want to merge two read-only objects\n// into a single object if their contents are equivalent. That\n// optimization is called the Identical Code Folding or ICF.\n//\n// A catch is that comparing object contents is not enough to determine if\n// two objects can be merged safely; we need to take care of pointer\n// equivalence.\n//\n// In C/C++, two pointers are equivalent if and only if they are taken for\n// the same object. Merging two objects into a single object can break\n// this assumption because two distinctive pointers would become\n// equivalent as a result of merging. We can still merge one object with\n// another if no pointer to the object was taken in code, because without\n// a pointer, comparing its address becomes moot.\n//\n// In mold, each input section has an \"address-taken\" bit. If there is a\n// pointer-taking reference to the object, it's set to true. At the ICF\n// stage, we merge only objects whose addresses were not taken.\n//\n// For functions, address-taking relocations are separated from\n// non-address-taking ones. For example, x86-64 uses R_X86_64_PLT32 for\n// direct function calls (e.g., \"call foo\" to call the function foo) while\n// R_X86_64_PC32 or R_X86_64_GOT32 are used for pointer-taking operations.\n//\n// Unfortunately, for data, we can't distinguish between address-taking\n// relocations and non-address-taking ones. LLVM generates an \"address\n// significance\" table in the \".llvm_addrsig\" section to mark symbols\n// whose addresses are taken in code. If that table is available, we use\n// that information in this function. Otherwise, we conservatively assume\n// that all data items are address-taken.\ntemplate <typename E>\nvoid compute_address_significance(Context<E> &ctx) {\n  Timer t(ctx, \"compute_address_significance\");\n\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    // If .llvm_addrsig is available, use it.\n    if (InputSection<E> *sec = file->llvm_addrsig.get()) {\n      u8 *p = (u8 *)sec->contents.data();\n      u8 *end = p + sec->contents.size();\n      while (p != end) {\n        Symbol<E> *sym = file->symbols[read_uleb(&p)];\n        if (InputSection<E> *isec = sym->get_input_section())\n          isec->address_taken = true;\n      }\n      return;\n    }\n\n    // Otherwise, infer address significance.\n    for (std::unique_ptr<InputSection<E>> &isec : file->sections) {\n      if (!isec || !isec->is_alive || !(isec->shdr().sh_flags & SHF_ALLOC))\n        continue;\n\n      if (!(isec->shdr().sh_flags & SHF_EXECINSTR))\n        isec->address_taken = true;\n\n      for (const ElfRel<E> &r : isec->get_rels(ctx))\n        if (!is_func_call_rel(r))\n          if (Symbol<E> *sym = file->symbols[r.r_sym];\n              InputSection<E> *dst = sym->get_input_section())\n            if (dst->shdr().sh_flags & SHF_EXECINSTR)\n              dst->address_taken = true;\n    }\n  });\n\n  auto mark = [](Symbol<E> *sym) {\n    if (sym)\n      if (InputSection<E> *isec = sym->get_input_section())\n        isec->address_taken = true;\n  };\n\n  // Some symbols' pointer values are leaked to the dynamic section.\n  mark(ctx.arg.entry);\n  mark(ctx.arg.init);\n  mark(ctx.arg.fini);\n\n  // Exported symbols are conservatively considered address-taken.\n  if (ctx.dynsym)\n    for (Symbol<E> *sym : ctx.dynsym->symbols)\n      if (sym && sym->is_exported)\n        mark(sym);\n}\n\n// We want to sort output chunks in the following order.\n//\n//   <ELF header>\n//   <program header>\n//   .interp\n//   .note\n//   .hash\n//   .gnu.hash\n//   .dynsym\n//   .dynstr\n//   .gnu.version\n//   .gnu.version_r\n//   .rela.dyn\n//   .rela.plt\n//   <readonly data>\n//   <code>\n//   <tdata>\n//   <tbss>\n//   <writable relro data>\n//   .got\n//   .toc\n//   <writable relro bss>\n//   .relro_padding\n//   <writable non-relro data>\n//   <writable non-relro bss>\n//   <non-memory-allocated sections>\n//   <section header>\n//   .gdb_index\n//\n// .interp and some other linker-synthesized sections are placed at the\n// beginning of a file because they are needed by loader. Especially on\n// a hard drive with spinning disks, it is important to read these\n// sections in a single seek.\n//\n// .note sections are also placed at the beginning so that they are\n// included in a core crash dump even if it's truncated by ulimit. In\n// particular, if .note.gnu.build-id is in a truncated core file, you\n// can at least identify which executable has crashed.\n//\n// .gdb_index cannot be constructed before applying relocations to\n// other debug sections, so we create it after completing other part\n// of the output file and append it to the very end of the file.\n//\n// A PT_NOTE segment will contain multiple .note sections if exist,\n// but there's no way to represent a gap between .note sections.\n// Therefore, we sort .note sections by decreasing alignment\n// requirement. I believe each .note section size is a multiple of its\n// alignment, so by sorting them by alignment, we should be able to\n// avoid a gap between .note sections.\n//\n// .toc is placed right after .got for PPC64. PPC-specific .toc section\n// contains data that may be accessed with a 16-bit offset relative to\n// %r2. %r2 is set to .got + 32 KiB. Therefore, .toc needs to be within\n// [.got, .got + 64 KiB).\n//\n// Other file layouts are possible, but this layout is chosen to keep\n// the number of segments as few as possible.\ntemplate <typename E>\nvoid sort_output_sections_regular(Context<E> &ctx) {\n  auto get_rank1 = [&](Chunk<E> *chunk) {\n    u64 type = chunk->shdr.sh_type;\n    u64 flags = chunk->shdr.sh_flags;\n\n    if (chunk == ctx.ehdr)\n      return 0;\n    if (chunk == ctx.phdr)\n      return 1;\n    if (chunk == ctx.interp)\n      return 2;\n    if (type == SHT_NOTE && (flags & SHF_ALLOC))\n      return 3;\n    if (chunk == ctx.hash)\n      return 4;\n    if (chunk == ctx.gnu_hash)\n      return 5;\n    if (chunk == ctx.dynsym)\n      return 6;\n    if (chunk == ctx.dynstr)\n      return 7;\n    if (chunk == ctx.versym)\n      return 8;\n    if (chunk == ctx.verneed)\n      return 9;\n    if (chunk == ctx.reldyn)\n      return 10;\n    if (chunk == ctx.relplt)\n      return 11;\n    if (chunk == ctx.shdr)\n      return INT32_MAX - 1;\n    if (chunk == ctx.gdb_index)\n      return INT32_MAX;\n\n    bool alloc = (flags & SHF_ALLOC);\n    bool writable = (flags & SHF_WRITE);\n    bool exec = (flags & SHF_EXECINSTR);\n    bool tls = (flags & SHF_TLS);\n    bool relro = chunk->is_relro;\n    bool is_bss = (type == SHT_NOBITS);\n\n    return (1 << 10) | (!alloc << 9) | (writable << 8) | (exec << 7) |\n           (!tls << 6) | (!relro << 5) | (is_bss << 4);\n  };\n\n  // Ties are broken by additional rules\n  auto get_rank2 = [&](Chunk<E> *chunk) -> i64 {\n    ElfShdr<E> &shdr = chunk->shdr;\n    if (shdr.sh_type == SHT_NOTE)\n      return -shdr.sh_addralign;\n\n    if (chunk == ctx.got)\n      return 2;\n    if (chunk->name == \".toc\")\n      return 3;\n    if (chunk == ctx.relro_padding)\n      return INT64_MAX;\n    return 0;\n  };\n\n  ranges::stable_sort(ctx.chunks, {}, [&](Chunk<E> *x) {\n    return std::tuple{get_rank1(x), get_rank2(x), x->name};\n  });\n}\n\ntemplate <typename E>\nstatic std::string_view get_section_order_group(Chunk<E> &chunk) {\n  if (chunk.shdr.sh_type == SHT_NOBITS)\n    return \"BSS\";\n  if (chunk.shdr.sh_flags & SHF_EXECINSTR)\n    return \"TEXT\";\n  if (chunk.shdr.sh_flags & SHF_WRITE)\n    return \"DATA\";\n  return \"RODATA\";\n};\n\n// Sort sections according to a --section-order argument.\ntemplate <typename E>\nvoid sort_output_sections_by_order(Context<E> &ctx) {\n  auto get_rank = [&](Chunk<E> *chunk) -> i64 {\n    u64 flags = chunk->shdr.sh_flags;\n\n    if (chunk == ctx.ehdr && !(chunk->shdr.sh_flags & SHF_ALLOC))\n      return -2;\n    if (chunk == ctx.phdr && !(chunk->shdr.sh_flags & SHF_ALLOC))\n      return -1;\n\n    if (chunk == ctx.shdr)\n      return INT32_MAX;\n    if (!(flags & SHF_ALLOC))\n      return INT32_MAX - 1;\n\n    for (i64 i = 0; i < ctx.arg.section_order.size(); i++)\n      if (SectionOrder &arg = ctx.arg.section_order[i];\n          arg.type == SectionOrder::SECTION && arg.name == chunk->name)\n        return i;\n\n    std::string_view group = get_section_order_group(*chunk);\n\n    for (i64 i = 0; i < ctx.arg.section_order.size(); i++)\n      if (SectionOrder &arg = ctx.arg.section_order[i];\n          arg.type == SectionOrder::GROUP && arg.name == group)\n        return i;\n\n    Error(ctx) << \"--section-order: missing section specification for \"\n               << chunk->name;\n    return 0;\n  };\n\n  // It is an error if a section order cannot be determined by a given\n  // section order list.\n  for (Chunk<E> *chunk : ctx.chunks)\n    chunk->sect_order = get_rank(chunk);\n\n  // Sort output sections by --section-order\n  ranges::stable_sort(ctx.chunks, {}, &Chunk<E>::sect_order);\n}\n\ntemplate <typename E>\nvoid sort_output_sections(Context<E> &ctx) {\n  if (ctx.arg.section_order.empty())\n    sort_output_sections_regular(ctx);\n  else\n    sort_output_sections_by_order(ctx);\n}\n\ntemplate <typename E>\nstatic i64 get_tls_segment_alignment(Context<E> &ctx) {\n  i64 val = 1;\n  for (Chunk<E> *chunk : ctx.chunks)\n    if (chunk->shdr.sh_flags & SHF_TLS)\n      val = std::max<i64>(val, chunk->shdr.sh_addralign);\n  return val;\n}\n\n// This function assigns virtual addresses to output sections. Assigning\n// addresses is a bit tricky because we want to pack sections as tightly\n// as possible while not violating the constraints imposed by the hardware\n// and the OS kernel. Specifically, we need to satisfy the following\n// constraints:\n//\n// - Memory protection (readable, writable and executable) works at page\n//   granularity. Therefore, if we want to set different memory attributes\n//   to two sections, we need to place them into separate pages.\n//\n// - The ELF spec requires that a section's file offset is congruent to\n//   its virtual address modulo the page size. For example, a section at\n//   virtual address 0x401234 on x86-64 (4 KiB, or 0x1000 byte page\n//   system) can be at file offset 0x3234 or 0x50234 but not at 0x1000.\n//\n// We need to insert paddings between sections if we can't satisfy the\n// above constraints without them.\n//\n// We don't want to waste too much memory and disk space for paddings.\n// There are a few tricks we can use to minimize paddings as below:\n//\n// - We want to place sections with the same memory attributes\n//   contiguous as possible.\n//\n// - We can map the same file region to memory more than once. For\n//   example, we can write code (with R and X bits) and read-only data\n//   (with R bit) adjacent on file and map it twice as the last page of\n//   the executable segment and the first page of the read-only data\n//   segment. This doesn't save memory but saves disk space.\ntemplate <typename E>\nstatic void set_virtual_addresses_regular(Context<E> &ctx) {\n  constexpr i64 RELRO = 1LL << 32;\n\n  auto get_flags = [&](Chunk<E> *chunk) {\n    i64 flags = to_phdr_flags(ctx, chunk);\n    if (chunk->is_relro)\n      return flags | RELRO;\n    return flags;\n  };\n\n  // Assign virtual addresses\n  std::vector<Chunk<E> *> &chunks = ctx.chunks;\n  u64 addr = ctx.arg.image_base;\n\n  auto is_tls = [](Chunk<E> *chunk) {\n    return chunk->shdr.sh_flags & SHF_TLS;\n  };\n\n  auto is_tbss = [](Chunk<E> *chunk) {\n    return (chunk->shdr.sh_flags & SHF_TLS) && (chunk->shdr.sh_type == SHT_NOBITS);\n  };\n\n  for (i64 i = 0; i < chunks.size(); i++) {\n    if (!(chunks[i]->shdr.sh_flags & SHF_ALLOC))\n      continue;\n\n    // .relro_padding is a padding section to extend a PT_GNU_RELRO\n    // segment to cover an entire page. Technically, we don't need a\n    // .relro_padding section because we can leave a trailing part of a\n    // segment an unused space. However, the `strip` command would delete\n    // such an unused trailing part and make an executable invalid.\n    // So we add a dummy section.\n    if (chunks[i] == ctx.relro_padding) {\n      chunks[i]->shdr.sh_addr = addr;\n      chunks[i]->shdr.sh_size = align_to(addr, ctx.page_size) - addr;\n      addr += ctx.page_size;\n      continue;\n    }\n\n    // Handle --section-start first\n    if (auto it = ctx.arg.section_start.find(chunks[i]->name);\n        it != ctx.arg.section_start.end()) {\n      addr = it->second;\n      chunks[i]->shdr.sh_addr = addr;\n      addr += chunks[i]->shdr.sh_size;\n      continue;\n    }\n\n    // Memory protection works at page size granularity. We need to\n    // put sections with different memory attributes into different\n    // pages. We do it by inserting paddings here.\n    if (i > 0 && chunks[i - 1] != ctx.relro_padding) {\n      i64 flags1 = get_flags(chunks[i - 1]);\n      i64 flags2 = get_flags(chunks[i]);\n\n      if (!ctx.arg.nmagic && flags1 != flags2) {\n        switch (ctx.arg.z_separate_code) {\n        case SEPARATE_LOADABLE_SEGMENTS:\n          addr = align_to(addr, ctx.page_size);\n          break;\n        case SEPARATE_CODE:\n          if ((flags1 & PF_X) != (flags2 & PF_X)) {\n            addr = align_to(addr, ctx.page_size);\n            break;\n          }\n          [[fallthrough]];\n        case NOSEPARATE_CODE:\n          if (addr % ctx.page_size != 0)\n            addr += ctx.page_size;\n          break;\n        default:\n          unreachable();\n        }\n      }\n    }\n\n    // TLS sections are included only in PT_LOAD but also in PT_TLS.\n    // We align the first TLS section so that the PT_TLS segment starts\n    // at an address that meets the segment's alignment requirement.\n    if (is_tls(chunks[i]) && (i == 0 || !is_tls(chunks[i - 1])))\n      addr = align_to(addr, get_tls_segment_alignment(ctx));\n\n    // TLS BSS sections are laid out so that they overlap with the\n    // subsequent non-tbss sections. Overlapping is fine because a STT_TLS\n    // segment contains an initialization image for newly-created threads,\n    // and no one except the runtime reads its contents. Even the runtime\n    // doesn't need a BSS part of a TLS initialization image; it just\n    // leaves zero-initialized bytes as-is instead of copying zeros.\n    // So no one really read tbss at runtime.\n    //\n    // We can instead allocate a dedicated virtual address space to tbss,\n    // but that would be just a waste of the address and disk space.\n    if (is_tbss(chunks[i])) {\n      u64 addr2 = addr;\n      for (;;) {\n        addr2 = align_to(addr2, chunks[i]->shdr.sh_addralign);\n        chunks[i]->shdr.sh_addr = addr2;\n        addr2 += chunks[i]->shdr.sh_size;\n        if (i + 2 == chunks.size() || !is_tbss(chunks[i + 1]))\n          break;\n        i++;\n      }\n      continue;\n    }\n\n    addr = align_to(addr, chunks[i]->shdr.sh_addralign);\n    chunks[i]->shdr.sh_addr = addr;\n    addr += chunks[i]->shdr.sh_size;\n  }\n}\n\ntemplate <typename E>\nstatic void set_virtual_addresses_by_order(Context<E> &ctx) {\n  std::vector<Chunk<E> *> vec;\n  for (Chunk<E> *c : ctx.chunks)\n    if (c->shdr.sh_flags & SHF_ALLOC)\n      vec.push_back(c);\n\n  u64 addr = ctx.arg.image_base;\n  i64 i = 0;\n\n  for (i64 j = 0; j < ctx.arg.section_order.size(); j++) {\n    SectionOrder &ord = ctx.arg.section_order[j];\n\n    switch (ord.type) {\n    case SectionOrder::SECTION:\n    case SectionOrder::GROUP:\n      for (; i < vec.size() && vec[i]->sect_order == j; i++) {\n        // Memory protection works on page size granularity. We need to\n        // put sections with different memory attributes into different\n        // pages. We do it by inserting a padding.\n        if (i != 0) {\n          i64 flags1 = to_phdr_flags(ctx, vec[i - 1]);\n          i64 flags2 = to_phdr_flags(ctx, vec[i]);\n          if (flags1 != flags2) {\n            switch (ctx.arg.z_separate_code) {\n            case SEPARATE_LOADABLE_SEGMENTS:\n              addr = align_to(addr, ctx.page_size);\n              break;\n            case SEPARATE_CODE:\n              if ((flags1 & PF_X) != (flags2 & PF_X))\n                addr = align_to(addr, ctx.page_size);\n              break;\n            default:\n              break;\n            }\n          }\n        }\n\n        addr = align_to(addr, vec[i]->shdr.sh_addralign);\n        vec[i]->shdr.sh_addr = addr;\n        addr += vec[i]->shdr.sh_size;\n      }\n      break;\n    case SectionOrder::ADDR:\n      if (addr != ctx.arg.image_base && ord.value < addr)\n        Error(ctx) << \"--section-order: address goes backward: requested \"\n                   << std::hex << std::showbase\n                   << ord.value << \" < current \" << addr\n                   << \" (at token '\" << ord.token << \"')\";\n      addr = ord.value;\n      break;\n    case SectionOrder::ALIGN:\n      addr = align_to(addr, ord.value);\n      break;\n    case SectionOrder::SYMBOL:\n      get_symbol(ctx, ord.name)->value = addr;\n      break;\n    default:\n      unreachable();\n    }\n  }\n}\n\n// Returns the smallest integer N that satisfies N >= val and\n// N % align == skew % align.\n//\n// Section's file offset must be congruent to its virtual address modulo\n// the page size. We use this function to satisfy that requirement.\nstatic u64 align_with_skew(u64 val, u64 align, u64 skew) {\n  return val + ((skew - val) & (align - 1));\n}\n\n// Assign file offsets to output sections.\ntemplate <typename E>\nstatic i64 set_file_offsets(Context<E> &ctx) {\n  std::vector<Chunk<E> *> &chunks = ctx.chunks;\n  u64 fileoff = 0;\n  i64 i = 0;\n\n  while (i < chunks.size()) {\n    Chunk<E> &first = *chunks[i];\n\n    if (!(first.shdr.sh_flags & SHF_ALLOC)) {\n      fileoff = align_to(fileoff, first.shdr.sh_addralign);\n      first.shdr.sh_offset = fileoff;\n      fileoff += first.shdr.sh_size;\n      i++;\n      continue;\n    }\n\n    if (first.shdr.sh_type == SHT_NOBITS) {\n      first.shdr.sh_offset = fileoff;\n      i++;\n      continue;\n    }\n\n    if (first.shdr.sh_addralign > ctx.page_size)\n      fileoff = align_to(fileoff, first.shdr.sh_addralign);\n    else\n      fileoff = align_with_skew(fileoff, ctx.page_size, first.shdr.sh_addr);\n\n    // Assign ALLOC sections contiguous file offsets as long as they\n    // are contiguous in memory.\n    for (;;) {\n      chunks[i]->shdr.sh_offset =\n        fileoff + chunks[i]->shdr.sh_addr - first.shdr.sh_addr;\n      i++;\n\n      if (i >= chunks.size() ||\n          !(chunks[i]->shdr.sh_flags & SHF_ALLOC) ||\n          chunks[i]->shdr.sh_type == SHT_NOBITS)\n        break;\n\n      // If --start-section is given, addresses may not increase\n      // monotonically.\n      if (chunks[i]->shdr.sh_addr < first.shdr.sh_addr)\n        break;\n\n      i64 gap_size = chunks[i]->shdr.sh_addr - chunks[i - 1]->shdr.sh_addr -\n                     chunks[i - 1]->shdr.sh_size;\n\n      // If --start-section is given, there may be a large gap between\n      // sections. We don't want to allocate a disk space for a gap if\n      // exists.\n      if (gap_size >= ctx.page_size)\n        break;\n    }\n\n    fileoff = chunks[i - 1]->shdr.sh_offset + chunks[i - 1]->shdr.sh_size;\n\n    while (i < chunks.size() &&\n           (chunks[i]->shdr.sh_flags & SHF_ALLOC) &&\n           chunks[i]->shdr.sh_type == SHT_NOBITS) {\n      chunks[i]->shdr.sh_offset = fileoff;\n      i++;\n    }\n  }\n\n  return fileoff;\n}\n\n// Remove debug sections from ctx.chunks and save them to ctx.debug_chunks.\n// This is for --separate-debug-file.\ntemplate <typename E>\nvoid separate_debug_sections(Context<E> &ctx) {\n  auto is_debug_section = [&](Chunk<E> *chunk) {\n    if (chunk->shdr.sh_flags & SHF_ALLOC)\n      return false;\n    return chunk == ctx.gdb_index || chunk == ctx.symtab || chunk == ctx.strtab ||\n           chunk->name.starts_with(\".debug_\");\n  };\n\n  auto tail = ranges::stable_partition(ctx.chunks, std::not_fn(is_debug_section));\n\n  ctx.debug_chunks = {tail.begin(), tail.end()};\n  ctx.chunks.erase(tail.begin(), tail.end());\n}\n\ntemplate <typename E>\nvoid compute_section_headers(Context<E> &ctx) {\n  // Update sh_size for each chunk.\n  for (Chunk<E> *chunk : ctx.chunks)\n    chunk->update_shdr(ctx);\n\n  // Remove empty chunks.\n  std::erase_if(ctx.chunks, [&](Chunk<E> *chunk) {\n    return !chunk->to_osec() && chunk != ctx.gdb_index &&\n           chunk->shdr.sh_size == 0;\n  });\n\n  // Set section indices.\n  i64 shndx = 1;\n  for (Chunk<E> *chunk : ctx.chunks)\n    if (!chunk->is_header())\n      chunk->shndx = shndx++;\n\n  if (ctx.symtab && SHN_LORESERVE <= shndx) {\n    SymtabShndxSection<E> *sec = new SymtabShndxSection<E>;\n    sec->shndx = shndx++;\n    sec->shdr.sh_link = ctx.symtab->shndx;\n    ctx.symtab_shndx = sec;\n    ctx.chunks.push_back(sec);\n    ctx.chunk_pool.emplace_back(sec);\n  }\n\n  if (ctx.shdr)\n    ctx.shdr->shdr.sh_size = shndx * sizeof(ElfShdr<E>);\n\n  // Some types of section header refer to other section by index.\n  // Recompute all section headers to fill such fields with correct values.\n  for (Chunk<E> *chunk : ctx.chunks)\n    chunk->update_shdr(ctx);\n\n  if (ctx.symtab_shndx) {\n    i64 symtab_size = ctx.symtab->shdr.sh_size / sizeof(ElfSym<E>);\n    ctx.symtab_shndx->shdr.sh_size = symtab_size * 4;\n  }\n}\n\n// Assign virtual addresses and file offsets to output sections.\ntemplate <typename E>\ni64 set_osec_offsets(Context<E> &ctx) {\n  Timer t(ctx, \"set_osec_offsets\");\n\n  for (;;) {\n    if (ctx.arg.section_order.empty())\n      set_virtual_addresses_regular(ctx);\n    else\n      set_virtual_addresses_by_order(ctx);\n    ctx.checkpoint();\n\n    // Assigning new offsets may change the contents and the length\n    // of the program header, so repeat it until converge.\n    i64 fileoff = set_file_offsets(ctx);\n\n    if (ctx.phdr) {\n      i64 sz = ctx.phdr->shdr.sh_size;\n      ctx.phdr->update_shdr(ctx);\n      if (sz < ctx.phdr->shdr.sh_size)\n        continue;\n    }\n\n    return fileoff;\n  }\n}\n\ntemplate <typename E>\nstatic i64 get_num_irelative_relocs(Context<E> &ctx) {\n  i64 n = ctx.num_ifunc_dynrels;\n  for (Symbol<E> *sym : ctx.got->got_syms)\n    if (sym->is_ifunc())\n      n++;\n  return n;\n}\n\ntemplate <typename E>\nstatic u64 to_paddr(Context<E> &ctx, u64 vaddr) {\n  for (ElfPhdr<E> &phdr : ctx.phdr->phdrs)\n    if (phdr.p_type == PT_LOAD)\n      if (phdr.p_vaddr <= vaddr && vaddr < phdr.p_vaddr + phdr.p_memsz)\n        return phdr.p_paddr + (vaddr - phdr.p_vaddr);\n  return 0;\n}\n\ntemplate <typename E>\nvoid fix_synthetic_symbols(Context<E> &ctx) {\n  auto start = [](Symbol<E> *sym, auto &chunk, i64 bias = 0) {\n    if (sym && chunk) {\n      sym->set_output_section(chunk);\n      sym->value = chunk->shdr.sh_addr + bias;\n    }\n  };\n\n  auto stop = [](Symbol<E> *sym, auto &chunk, i64 bias = 0) {\n    if (sym && chunk) {\n      sym->set_output_section(chunk);\n      sym->value = chunk->shdr.sh_addr + chunk->shdr.sh_size + bias;\n    }\n  };\n\n  std::vector<Chunk<E> *> sections;\n  for (Chunk<E> *chunk : ctx.chunks)\n    if (!chunk->is_header() && (chunk->shdr.sh_flags & SHF_ALLOC))\n      sections.push_back(chunk);\n\n  auto find = [&](std::string name) -> Chunk<E> * {\n    for (Chunk<E> *chunk : sections)\n      if (chunk->name == name)\n        return chunk;\n    return nullptr;\n  };\n\n  // __bss_start\n  if (Chunk<E> *chunk = find(\".bss\"))\n    start(ctx.__bss_start, chunk);\n\n  if (ctx.ehdr && (ctx.ehdr->shdr.sh_flags & SHF_ALLOC)) {\n    ctx.__ehdr_start->set_output_section(sections[0]);\n    ctx.__ehdr_start->value = ctx.ehdr->shdr.sh_addr;\n    ctx.__executable_start->set_output_section(sections[0]);\n    ctx.__executable_start->value = ctx.ehdr->shdr.sh_addr;\n  }\n\n  if (ctx.__dso_handle) {\n    ctx.__dso_handle->set_output_section(sections[0]);\n    ctx.__dso_handle->value = sections[0]->shdr.sh_addr;\n  }\n\n  // __rel_iplt_start and __rel_iplt_end. These symbols need to be\n  // defined in a statically-linked non-relocatable executable because\n  // such executable lacks the .dynamic section and thus there's no way\n  // to find ifunc relocations other than these symbols.\n  if (ctx.reldyn && ctx.arg.static_ && !ctx.arg.pie) {\n    stop(ctx.__rel_iplt_start, ctx.reldyn,\n         -get_num_irelative_relocs(ctx) * sizeof(ElfRel<E>));\n    stop(ctx.__rel_iplt_end, ctx.reldyn);\n  } else {\n    // If the symbols are not ncessary, we turn them to absolute\n    // symbols at address 0.\n    ctx.__rel_iplt_start->origin = 0;\n    ctx.__rel_iplt_end->origin = 0;\n  }\n\n  // __{init,fini}_array_{start,end}\n  for (Chunk<E> *chunk : sections) {\n    switch (chunk->shdr.sh_type) {\n    case SHT_INIT_ARRAY:\n      start(ctx.__init_array_start, chunk);\n      stop(ctx.__init_array_end, chunk);\n      break;\n    case SHT_PREINIT_ARRAY:\n      start(ctx.__preinit_array_start, chunk);\n      stop(ctx.__preinit_array_end, chunk);\n      break;\n    case SHT_FINI_ARRAY:\n      start(ctx.__fini_array_start, chunk);\n      stop(ctx.__fini_array_end, chunk);\n      break;\n    }\n  }\n\n  // _end, _etext, _edata and the like\n  for (Chunk<E> *chunk : sections) {\n    if (chunk->shdr.sh_flags & SHF_ALLOC) {\n      stop(ctx._end, chunk);\n      stop(ctx.end, chunk);\n    }\n\n    if (chunk->shdr.sh_flags & SHF_EXECINSTR) {\n      stop(ctx._etext, chunk);\n      stop(ctx.etext, chunk);\n    }\n\n    if (chunk->shdr.sh_type != SHT_NOBITS &&\n        (chunk->shdr.sh_flags & SHF_ALLOC)) {\n      stop(ctx._edata, chunk);\n      stop(ctx.edata, chunk);\n    }\n  }\n\n  // _DYNAMIC\n  start(ctx._DYNAMIC, ctx.dynamic);\n\n  // _GLOBAL_OFFSET_TABLE_. I don't know why, but for the sake of\n  // compatibility with existing code, it must be set to the beginning of\n  // .got.plt instead of .got only on i386 and x86-64.\n  if constexpr (is_x86<E>)\n    start(ctx._GLOBAL_OFFSET_TABLE_, ctx.gotplt);\n  else\n    start(ctx._GLOBAL_OFFSET_TABLE_, ctx.got);\n\n  // _PROCEDURE_LINKAGE_TABLE_. We need this on SPARC.\n  start(ctx._PROCEDURE_LINKAGE_TABLE_, ctx.plt);\n\n  // _TLS_MODULE_BASE_. This symbol is used to obtain the address of\n  // the TLS block in the TLSDESC model. I believe GCC and Clang don't\n  // create a reference to it, but Intel compiler seems to be using\n  // this symbol.\n  if (ctx._TLS_MODULE_BASE_) {\n    ctx._TLS_MODULE_BASE_->set_output_section(sections[0]);\n    ctx._TLS_MODULE_BASE_->value = ctx.dtp_addr;\n  }\n\n  // __GNU_EH_FRAME_HDR\n  start(ctx.__GNU_EH_FRAME_HDR, ctx.eh_frame_hdr);\n\n  // RISC-V's __global_pointer$\n  if (ctx.__global_pointer) {\n    if (Chunk<E> *chunk = find(\".sdata\")) {\n      start(ctx.__global_pointer, chunk, 0x800);\n    } else {\n      ctx.__global_pointer->set_output_section(sections[0]);\n      ctx.__global_pointer->value = 0;\n    }\n  }\n\n  // ARM32's __exidx_{start,end}\n  if (ctx.__exidx_start) {\n    if (Chunk<E> *chunk = find(\".ARM.exidx\")) {\n      start(ctx.__exidx_start, chunk);\n      stop(ctx.__exidx_end, chunk);\n    }\n  }\n\n  // PPC64's \".TOC.\" symbol.\n  if constexpr (is_ppc64<E>) {\n    if (Chunk<E> *chunk = find(\".got\")) {\n      start(ctx.extra.TOC, chunk, 0x8000);\n    } else if (Chunk<E> *chunk = find(\".toc\")) {\n      start(ctx.extra.TOC, chunk, 0x8000);\n    } else {\n      ctx.extra.TOC->set_output_section(sections[0]);\n      ctx.extra.TOC->value = 0;\n    }\n  }\n\n  // PPC64's _{save,rest}gpr{0,1}_{14,15,16,...,31} symbols\n  if constexpr (is_ppc64v2<E>)\n    for (i64 i = 0; i < ppc64_save_restore_insns.size(); i++)\n      if (std::string_view label = ppc64_save_restore_insns[i].first;\n          !label.empty())\n        if (Symbol<E> *sym = get_symbol(ctx, label);\n            sym->file == ctx.internal_obj)\n          start(sym, ctx.extra.save_restore, i * 4);\n\n  // __start_ and __stop_ symbols\n  for (Chunk<E> *chunk : sections) {\n    if (std::optional<std::string> name = get_start_stop_name(ctx, *chunk)) {\n      start(get_symbol(ctx, save_string(ctx, \"__start_\" + *name)), chunk);\n      stop(get_symbol(ctx, save_string(ctx, \"__stop_\" + *name)), chunk);\n\n      if (ctx.arg.physical_image_base) {\n        u64 paddr = to_paddr(ctx, chunk->shdr.sh_addr);\n\n        Symbol<E> *x = get_symbol(ctx, save_string(ctx, \"__phys_start_\" + *name));\n        x->set_output_section(chunk);\n        x->value = paddr;\n\n        Symbol<E> *y = get_symbol(ctx, save_string(ctx, \"__phys_stop_\" + *name));\n        y->set_output_section(chunk);\n        y->value = paddr + chunk->shdr.sh_size;\n      }\n    }\n  }\n\n  // --defsym=sym=value symbols\n  for (i64 i = 0; i < ctx.arg.defsyms.size(); i++) {\n    Symbol<E> *sym = ctx.arg.defsyms[i].first;\n    std::variant<Symbol<E> *, u64> val = ctx.arg.defsyms[i].second;\n\n    if (u64 *addr = std::get_if<u64>(&val)) {\n      sym->origin = 0;\n      sym->value = *addr;\n    } else {\n      Symbol<E> *sym2 = std::get<Symbol<E> *>(val);\n      sym->value = sym2->value;\n      sym->origin = sym2->origin;\n      sym->visibility = sym2->visibility.load();\n    }\n  }\n\n  // --section-order symbols\n  for (SectionOrder &ord : ctx.arg.section_order)\n    if (ord.type == SectionOrder::SYMBOL)\n      get_symbol(ctx, ord.name)->set_output_section(sections[0]);\n}\n\ntemplate <typename E>\nvoid compress_debug_sections(Context<E> &ctx) {\n  Timer t(ctx, \"compress_debug_sections\");\n\n  // Since this pass is embarassingly parallel, we want to use all\n  // available cores by default.\n  i64 thread_count = 0;\n  if (!ctx.arg.thread_count.has_value()) {\n    thread_count =\n      ctx.global_limit->active_value(tbb::global_control::max_allowed_parallelism);\n    ctx.global_limit.reset();\n  }\n\n  tbb::parallel_for((i64)0, (i64)ctx.chunks.size(), [&](i64 i) {\n    Chunk<E> &chunk = *ctx.chunks[i];\n    if (!(chunk.shdr.sh_flags & SHF_ALLOC) && chunk.shdr.sh_size &&\n        chunk.name.starts_with(\".debug_\")) {\n      Chunk<E> *comp = new CompressedSection<E>(ctx, chunk);\n      ctx.chunk_pool.emplace_back(comp);\n      ctx.chunks[i] = comp;\n    }\n  });\n\n  if (thread_count > 0)\n    ctx.global_limit.emplace(tbb::global_control::max_allowed_parallelism,\n                             thread_count);\n}\n\n// BLAKE3 is a cryptographic hash function just like SHA256.\n// We use it instead of SHA256 because it's faster.\nstatic void blake3_hash(u8 *buf, i64 size, u8 *out) {\n  blake3_hasher hasher;\n  blake3_hasher_init(&hasher);\n  blake3_hasher_update(&hasher, buf, size);\n  blake3_hasher_finalize(&hasher, out, BLAKE3_OUT_LEN);\n}\n\ntemplate <typename E>\nstd::vector<std::span<u8>> get_shards(Context<E> &ctx) {\n  constexpr i64 shard_size = 4 * 1024 * 1024; // 4 MiB\n  std::span<u8> buf = {ctx.buf, (size_t)ctx.output_file->filesize};\n  std::vector<std::span<u8>> vec;\n\n  while (!buf.empty()) {\n    i64 sz = std::min<i64>(shard_size, buf.size());\n    vec.push_back(buf.subspan(0, sz));\n    buf = buf.subspan(sz);\n  }\n  return vec;\n}\n\n// Sort dynamic relocations. This is the reason why we do it.\n// Quote from https://www.airs.com/blog/archives/186\n//\n//   The dynamic linker in glibc uses a one element cache when processing\n//   relocs: if a relocation refers to the same symbol as the previous\n//   relocation, then the dynamic linker reuses the value rather than\n//   looking up the symbol again. Thus the dynamic linker gets the best\n//   results if the dynamic relocations are sorted so that all dynamic\n//   relocations for a given dynamic symbol are adjacent.\n//\n//   Other than that, the linker sorts together all relative relocations,\n//   which don't have symbols. Two relative relocations, or two relocations\n//   against the same symbol, are sorted by the address in the output\n//   file. This tends to optimize paging and caching when there are two\n//   references from the same page.\ntemplate <typename E>\nvoid sort_reldyn(Context<E> &ctx) {\n  Timer t(ctx, \"sort_reldyn\");\n\n  ElfRel<E> *begin = (ElfRel<E> *)(ctx.buf + ctx.reldyn->shdr.sh_offset);\n  ElfRel<E> *end = begin + ctx.reldyn->shdr.sh_size / sizeof(ElfRel<E>);\n\n  // We group IFUNC relocations at the end of .rel.dyn because we want to\n  // apply all the other relocations before running user-supplied IFUNC\n  // resolvers.\n  auto get_rank = [](u32 r_type) {\n    if (r_type == E::R_RELATIVE)\n      return 0;\n    if constexpr (supports_ifunc<E>)\n      if (r_type == E::R_IRELATIVE)\n        return 2;\n    return 1;\n  };\n\n  tbb::parallel_sort(begin, end, [&](const ElfRel<E> &a, const ElfRel<E> &b) {\n    return std::tuple(get_rank(a.r_type), a.r_sym, a.r_offset) <\n           std::tuple(get_rank(b.r_type), b.r_sym, b.r_offset);\n  });\n}\n\ntemplate <typename E>\nvoid write_build_id(Context<E> &ctx) {\n  Timer t(ctx, \"write_build_id\");\n\n  switch (ctx.arg.build_id.kind) {\n  case BuildId::HEX:\n    ctx.buildid->contents = ctx.arg.build_id.value;\n    break;\n  case BuildId::HASH: {\n    std::vector<std::span<u8>> shards = get_shards(ctx);\n    std::vector<u8> hashes(shards.size() * BLAKE3_OUT_LEN);\n\n    tbb::parallel_for((i64)0, (i64)shards.size(), [&](i64 i) {\n      blake3_hash(shards[i].data(), shards[i].size(),\n                  hashes.data() + i * BLAKE3_OUT_LEN);\n\n#if HAVE_MADVISE\n      // Make the kernel page out the file contents we've just written\n      // so that subsequent close(2) call will become quicker.\n      if (i > 0 && ctx.output_file->is_mmapped)\n        madvise(shards[i].data(), shards[i].size(), MADV_DONTNEED);\n#endif\n    });\n\n    u8 buf[BLAKE3_OUT_LEN];\n    blake3_hash(hashes.data(), hashes.size(), buf);\n    msan_unpoison(buf, BLAKE3_OUT_LEN);\n\n    assert(ctx.arg.build_id.size() <= BLAKE3_OUT_LEN);\n    ctx.buildid->contents = {buf, buf + ctx.arg.build_id.size()};\n    break;\n  }\n  case BuildId::UUID: {\n    u8 buf[16];\n    get_random_bytes(buf, 16);\n\n    // Indicate that this is UUIDv4 as defined by RFC4122\n    buf[6] = (buf[6] & 0b0000'1111) | 0b0100'0000;\n    buf[8] = (buf[8] & 0b0011'1111) | 0b1000'0000;\n    ctx.buildid->contents = {buf, buf + 16};\n    break;\n  }\n  default:\n    unreachable();\n  }\n\n  ctx.buildid->copy_buf(ctx);\n}\n\n// A .gnu_debuglink section contains a filename and a CRC32 checksum of a\n// debug info file. When we are writing a .gnu_debuglink, we don't know\n// its CRC32 checksum because we haven't created a debug info file. So we\n// write a dummy value instead.\n//\n// We can't choose a random value as a dummy value for build\n// reproducibility. We also don't want to write a fixed value for all\n// files because the CRC checksum is in this section to prevent using\n// wrong file on debugging. gdb rejects a debug info file if its CRC\n// doesn't match with the one in .gdb_debuglink.\n//\n// Therefore, we'll try to make our CRC checksum as unique as possible.\n// We'll remember that checksum, and after creating a debug info file, add\n// a few bytes of garbage at the end of it so that the debug info file's\n// CRC checksum becomes the one that we have precomputed.\ntemplate <typename E>\nvoid write_gnu_debuglink(Context<E> &ctx) {\n  Timer t(ctx, \"write_gnu_debuglink\");\n  u32 crc32;\n\n  if (ctx.buildid) {\n    crc32 = compute_crc32(0, ctx.buildid->contents.data(),\n                          ctx.buildid->contents.size());\n  } else {\n    std::vector<std::span<u8>> shards = get_shards(ctx);\n    std::vector<U64<E>> hashes(shards.size());\n\n    tbb::parallel_for((i64)0, (i64)shards.size(), [&](i64 i) {\n      hashes[i] = hash_string({(char *)shards[i].data(), shards[i].size()});\n    });\n    crc32 = compute_crc32(0, (u8 *)hashes.data(), hashes.size() * 8);\n  }\n\n  ctx.gnu_debuglink->crc32 = crc32;\n  ctx.gnu_debuglink->copy_buf(ctx);\n}\n\n// Write a separate debug file. This function is called after we finish\n// writing to the usual output file.\ntemplate <typename E>\nvoid write_separate_debug_file(Context<E> &ctx) {\n  Timer t(ctx, \"write_separate_debug_file\");\n\n  // Open an output file early\n  LockingOutputFile<E> *file =\n    new LockingOutputFile<E>(ctx, ctx.arg.separate_debug_file, 0666);\n\n  // We want to write to the debug info file in background so that the\n  // user doesn't have to wait for it to complete.\n  if (ctx.arg.detach)\n    notify_parent<E>();\n\n  // Restore debug info sections that had been set aside while we were\n  // creating the main file.\n  i64 num_chunks = ctx.chunks.size();\n  append(ctx.chunks, ctx.debug_chunks);\n\n  tbb::parallel_for(num_chunks, (i64)ctx.chunks.size(), [&](i64 i) {\n    ctx.chunks[i]->compute_section_size(ctx);\n  });\n\n  sort_debug_info_sections(ctx);\n\n  // Handle --compress-debug-info\n  if (ctx.arg.compress_debug_sections != ELFCOMPRESS_NONE)\n    compress_debug_sections(ctx);\n\n  // Recompute section header contents since we have added debug sections\n  compute_section_headers(ctx);\n\n  // A debug info file contains all sections as the original file, though\n  // most of them can be empty as if they were bss sections. We convert\n  // real sections into dummy sections here.\n  for (i64 i = 0; i < num_chunks; i++) {\n    Chunk<E> *chunk = ctx.chunks[i];\n    if (!chunk->is_header() && chunk != ctx.shstrtab &&\n        chunk->shdr.sh_type != SHT_NOTE) {\n      Chunk<E> *sec = new OutputSection<E>(chunk->name, SHT_NULL);\n      sec->shdr = chunk->shdr;\n      sec->shdr.sh_type = SHT_NOBITS;\n      sec->shndx = chunk->shndx;\n\n      ctx.chunks[i] = sec;\n      ctx.chunk_pool.emplace_back(sec);\n    }\n  }\n\n  // Assign file offsets to sections\n  i64 fileoff = 0;\n  for (Chunk<E> *chunk : ctx.chunks) {\n    ElfShdr<E> &shdr = chunk->shdr;\n\n    if (shdr.sh_type == SHT_NOBITS) {\n      shdr.sh_offset = fileoff;\n    } else if (shdr.sh_flags & SHF_ALLOC) {\n      fileoff = align_with_skew(fileoff, ctx.page_size, shdr.sh_addr);\n      shdr.sh_offset = fileoff;\n      fileoff += shdr.sh_size;\n    } else {\n      fileoff = align_to(fileoff, shdr.sh_addralign);\n      shdr.sh_offset = fileoff;\n      fileoff += shdr.sh_size;\n    }\n  }\n\n  if (ctx.phdr) {\n    i64 sz = ctx.phdr->phdrs.size();\n    ctx.phdr->update_shdr(ctx);\n    assert(ctx.phdr->phdrs.size() <= sz);\n    ctx.phdr->phdrs.resize(sz);\n  }\n\n  // Write to a separate debug file\n  file->resize(ctx, fileoff);\n  ctx.output_file.reset(file);\n  ctx.buf = ctx.output_file->buf;\n\n  copy_chunks(ctx);\n\n  if (ctx.gdb_index)\n    write_gdb_index(ctx);\n\n  // Reverse-compute a CRC32 value so that the CRC32 checksum embedded to\n  // the .gnu_debuglink section in the main executable matches with the\n  // debug info file's CRC32 checksum.\n  u32 crc = compute_crc32(0, ctx.buf, ctx.output_file->filesize);\n\n  u8 *&buf2 = ctx.output_file->buf2;\n  i64 &buf2_size = ctx.output_file->buf2_size;\n  if (buf2)\n    crc = compute_crc32(crc, buf2, buf2_size);\n\n  std::vector<u8> trailer = crc32_solve(crc, ctx.gnu_debuglink->crc32);\n  buf2 = (u8 *)realloc(buf2, buf2_size + trailer.size());\n  memcpy(buf2 + buf2_size, trailer.data(), trailer.size());\n  buf2_size += trailer.size();\n  ctx.output_file->close(ctx);\n}\n\n// Write Makefile-style dependency rules to a file specified by\n// --dependency-file. This is analogous to the compiler's -M flag.\ntemplate <typename E>\nvoid write_dependency_file(Context<E> &ctx) {\n  std::vector<std::string> deps;\n  std::unordered_set<std::string> seen;\n\n  for (std::unique_ptr<MappedFile> &mf : ctx.mf_pool)\n    if (mf->is_dependency && !mf->parent)\n      if (std::string path = path_clean(mf->name); seen.insert(path).second)\n        deps.push_back(path);\n\n  std::ostream *out = &std::cout;\n  std::ofstream file;\n\n  std::string &path = ctx.arg.dependency_file;\n  if (path != \"-\") {\n    file.open(path);\n    if (file.fail())\n      Fatal(ctx) << \"--dependency-file: cannot open \" << path << \": \"\n                 << errno_string();\n    out = &file;\n  }\n\n  *out << ctx.arg.output << \":\";\n  for (std::string &s : deps)\n    *out << \" \" << s;\n  *out << \"\\n\";\n\n  for (std::string &s : deps)\n    *out << \"\\n\" << s << \":\\n\";\n}\n\ntemplate <typename E>\nvoid show_stats(Context<E> &ctx) {\n  for (ObjectFile<E> *obj : ctx.objs) {\n    static Counter defined(\"defined_syms\");\n    defined += obj->first_global - 1;\n\n    static Counter undefined(\"undefined_syms\");\n    undefined += obj->symbols.size() - obj->first_global;\n\n    for (std::unique_ptr<InputSection<E>> &sec : obj->sections) {\n      if (!sec || !sec->is_alive)\n        continue;\n\n      static Counter alloc(\"reloc_alloc\");\n      static Counter nonalloc(\"reloc_nonalloc\");\n\n      if (sec->shdr().sh_flags & SHF_ALLOC)\n        alloc += sec->get_rels(ctx).size();\n      else\n        nonalloc += sec->get_rels(ctx).size();\n    }\n\n    static Counter comdats(\"comdats\");\n    comdats += obj->comdat_groups.size();\n\n    static Counter removed_comdats(\"removed_comdat_mem\");\n    for (ComdatGroupRef<E> &ref : obj->comdat_groups)\n      if (ref.group->owner != obj->priority)\n        removed_comdats += ref.members.size();\n\n    static Counter num_cies(\"num_cies\");\n    num_cies += obj->cies.size();\n\n    static Counter num_unique_cies(\"num_unique_cies\");\n    for (CieRecord<E> &cie : obj->cies)\n      if (cie.is_leader)\n        num_unique_cies++;\n\n    static Counter num_fdes(\"num_fdes\");\n    num_fdes +=  obj->fdes.size();\n  }\n\n  static Counter num_bytes(\"total_input_bytes\");\n  for (std::unique_ptr<MappedFile> &mf : ctx.mf_pool)\n    num_bytes += mf->size;\n\n  static Counter num_input_sections(\"input_sections\");\n  for (ObjectFile<E> *file : ctx.objs)\n    num_input_sections += file->sections.size();\n\n  static Counter num_output_chunks(\"output_chunks\", ctx.chunks.size());\n  static Counter num_objs(\"num_objs\", ctx.objs.size());\n  static Counter num_dsos(\"num_dsos\", ctx.dsos.size());\n\n  using Entry = typename ConcurrentMap<SectionFragment<E>>::Entry;\n\n  static Counter merged_strings(\"merged_strings\");\n  for (std::unique_ptr<MergedSection<E>> &sec : ctx.merged_sections)\n    for (Entry &ent : std::span(sec->map.entries, sec->map.nbuckets))\n      if (ent.key)\n        merged_strings++;\n\n  if constexpr (needs_thunk<E>) {\n    static Counter thunk_bytes(\"thunk_bytes\");\n    for (Chunk<E> *chunk : ctx.chunks)\n      if (OutputSection<E> *osec = chunk->to_osec())\n        for (std::unique_ptr<Thunk<E>> &thunk : osec->thunks)\n          thunk_bytes += thunk->size();\n  }\n\n  if constexpr (is_riscv<E> || is_loongarch<E>) {\n    static Counter num_rels(\"shrunk_relocs\");\n    for (Chunk<E> *chunk : ctx.chunks)\n      if (OutputSection<E> *osec = chunk->to_osec())\n        if (osec->shdr.sh_flags & SHF_EXECINSTR)\n          for (InputSection<E> *isec : osec->members)\n            num_rels += isec->extra.r_deltas.size();\n  }\n\n  Counter::print();\n\n  for (std::unique_ptr<MergedSection<E>> &sec : ctx.merged_sections)\n    sec->print_stats(ctx);\n}\n\nusing E = MOLD_TARGET;\n\ntemplate int redo_main<E>(std::string_view, int, char **);\ntemplate void create_internal_file(Context<E> &);\ntemplate void apply_exclude_libs(Context<E> &);\ntemplate void create_synthetic_sections(Context<E> &);\ntemplate void resolve_symbols(Context<E> &);\ntemplate void do_lto(Context<E> &);\ntemplate void parse_eh_frame_sections(Context<E> &);\ntemplate void create_merged_sections(Context<E> &);\ntemplate void convert_common_symbols(Context<E> &);\ntemplate void create_output_sections(Context<E> &);\ntemplate void add_synthetic_symbols(Context<E> &);\ntemplate void check_cet_errors(Context<E> &);\ntemplate void apply_section_align(Context<E> &);\ntemplate void print_dependencies(Context<E> &);\ntemplate void write_repro_file(Context<E> &);\ntemplate void check_duplicate_symbols(Context<E> &);\ntemplate void convert_zero_to_bss(Context<E> &);\ntemplate void check_shlib_undefined(Context<E> &);\ntemplate void check_symbol_types(Context<E> &);\ntemplate void sort_init_fini(Context<E> &);\ntemplate void sort_ctor_dtor(Context<E> &);\ntemplate void fixup_ctors_in_init_array(Context<E> &);\ntemplate void shuffle_sections(Context<E> &);\ntemplate void add_dynamic_strings(Context<E> &);\ntemplate void compute_section_sizes(Context<E> &);\ntemplate void sort_output_sections(Context<E> &);\ntemplate void claim_unresolved_symbols(Context<E> &);\ntemplate void compute_imported_symbol_weakness(Context<E> &);\ntemplate void scan_relocations(Context<E> &);\ntemplate void report_undef_errors(Context<E> &);\ntemplate void create_reloc_sections(Context<E> &);\ntemplate void copy_chunks(Context<E> &);\ntemplate void construct_relr(Context<E> &);\ntemplate void sort_dynsyms(Context<E> &);\ntemplate void sort_debug_info_sections(Context<E> &);\ntemplate void create_output_symtab(Context<E> &);\ntemplate void apply_version_script(Context<E> &);\ntemplate void parse_symbol_version(Context<E> &);\ntemplate void compute_import_export(Context<E> &);\ntemplate void compute_address_significance(Context<E> &);\ntemplate void separate_debug_sections(Context<E> &);\ntemplate void compute_section_headers(Context<E> &);\ntemplate i64 set_osec_offsets(Context<E> &);\ntemplate void fix_synthetic_symbols(Context<E> &);\ntemplate void compress_debug_sections(Context<E> &);\ntemplate void sort_reldyn(Context<E> &);\ntemplate void write_build_id(Context<E> &);\ntemplate void write_gnu_debuglink(Context<E> &);\ntemplate void write_separate_debug_file(Context<E> &);\ntemplate void write_dependency_file(Context<E> &);\ntemplate void show_stats(Context<E> &);\n\n} // namespace mold\n"
  },
  {
    "path": "src/relocatable.cc",
    "content": "// This file implements -r or --relocatable. That option forces the linker\n// to combine input object files into another single large object file.\n// Since the behavior of the linker when the option is given is quite\n// different from that of the normal execution mode, we separate code for\n// the feature into this separate file.\n//\n// The --relocatable option isn't used very often. After all, if you want\n// to combine object files into a single file, you could use `ar`.\n// However, some programs use it in a creative manner which is hard to be\n// substituted with static archives, so we need to support this option in\n// the same way as GNU ld does. A notable example is GHC (Glasgow Haskell\n// Compiler). GHC has its own dynamic linker which can load a .o file (as\n// opposed to a .so) into memory. GHC's module is not a shared object file\n// but a combined object file.\n//\n// There are many different ways to combine object files into a single file.\n// The simplest approach would be to just copy all sections from input files\n// to an output file as-is with a few exceptions for singleton sections such\n// as the symbol table or the string table. That works, but that's not\n// compatible with GNU ld.\n//\n// To be compatible with GNU ld, we need to do the followings:\n//\n//  - Regular sections containing opaque data (e.g. \".text\" or \".data\")\n//    are just copied as-is. Two sections with the same name are merged.\n//\n//  - .symtab, .strtab and .shstrtab are merged.\n//\n//  - COMDAT groups are uniquified.\n//\n//  - Relocations are copied, but we need to fix symbol indices.\n\n#include \"mold.h\"\n\n#include <tbb/parallel_for.h>\n#include <tbb/parallel_for_each.h>\n\nnamespace mold {\n\n// Create linker-synthesized sections\ntemplate <typename E>\nstatic void r_create_synthetic_sections(Context<E> &ctx) {\n  auto push = [&](auto *x) {\n    ctx.chunks.push_back(x);\n    ctx.chunk_pool.emplace_back(x);\n    return x;\n  };\n\n  ctx.ehdr = push(new OutputEhdr<E>(0));\n  ctx.shdr = push(new OutputShdr<E>);\n  ctx.eh_frame = push(new EhFrameSection<E>);\n  ctx.eh_frame_reloc = push(new EhFrameRelocSection<E>);\n  ctx.strtab = push(new StrtabSection<E>);\n  ctx.symtab = push(new SymtabSection<E>);\n  ctx.shstrtab = push(new ShstrtabSection<E>);\n\n  if constexpr (is_x86<E>)\n    ctx.extra.note_property = push(new NotePropertySection<E>);\n\n  if constexpr (is_riscv<E>)\n    ctx.extra.riscv_attributes = push(new RiscvAttributesSection<E>);\n}\n\n// Create SHT_GROUP (i.e. comdat group) sections. We uniquify comdat\n// sections by signature. We want to propagate input comdat groups as\n// output comdat groups if they are still alive after uniquification.\ntemplate <typename E>\nstatic void create_comdat_group_sections(Context<E> &ctx) {\n  Timer t(ctx, \"create_comdat_group_sections\");\n\n  std::vector<std::vector<Chunk<E> *>> vec{ctx.objs.size()};\n\n  tbb::parallel_for((i64)0, (i64)ctx.objs.size(), [&](i64 i) {\n    ObjectFile<E> &file = *ctx.objs[i];\n\n    for (ComdatGroupRef<E> &ref : file.comdat_groups) {\n      if (ref.group->owner != file.priority)\n        continue;\n\n      Symbol<E> *sym = file.symbols[file.elf_sections[ref.sect_idx].sh_info];\n      assert(sym);\n\n      std::vector<Chunk<E> *> members;\n      for (u32 j : ref.members) {\n        const ElfShdr<E> &shdr = file.elf_sections[j];\n        if (shdr.sh_type == (E::is_rela ? SHT_RELA : SHT_REL)) {\n          InputSection<E> &isec = *file.sections[shdr.sh_info];\n          members.push_back(isec.output_section->reloc_sec.get());\n        } else {\n          InputSection<E> &isec = *file.sections[j];\n          members.push_back(isec.output_section);\n        }\n      }\n\n      vec[i].push_back(new ComdatGroupSection<E>(*sym, std::move(members)));\n    }\n  });\n\n  for (std::vector<Chunk<E> *> &vec2 : vec) {\n    for (Chunk<E> *chunk : vec2) {\n      ctx.chunks.push_back(chunk);\n      ctx.chunk_pool.emplace_back(chunk);\n    }\n  }\n}\n\n// Unresolved undefined symbols in the -r mode are simply propagated to an\n// output file as undefined symbols. This function guarantees that\n// unresolved undefined symbols belongs to some input file.\ntemplate <typename E>\nstatic void r_claim_unresolved_symbols(Context<E> &ctx) {\n  Timer t(ctx, \"r_claim_unresolved_symbols\");\n\n  tbb::parallel_for_each(ctx.objs, [](ObjectFile<E> *file) {\n    for (i64 i = file->first_global; i < file->elf_syms.size(); i++) {\n      const ElfSym<E> &esym = file->elf_syms[i];\n      Symbol<E> &sym = *file->symbols[i];\n      if (!esym.is_undef())\n        continue;\n\n      std::scoped_lock lock(sym.mu);\n\n      if (sym.file &&\n          (!sym.esym().is_undef() || sym.file->priority <= file->priority))\n        continue;\n\n      sym.file = file;\n      sym.origin = 0;\n      sym.value = 0;\n      sym.sym_idx = i;\n    }\n  });\n}\n\n// Set output section in-file offsets. Output section memory addresses\n// are left as zero.\ntemplate <typename E>\nstatic u64 r_set_osec_offsets(Context<E> &ctx) {\n  u64 offset = 0;\n  for (Chunk<E> *chunk : ctx.chunks) {\n    offset = align_to(offset, chunk->shdr.sh_addralign);\n    chunk->shdr.sh_offset = offset;\n    offset += chunk->shdr.sh_size;\n  }\n  return offset;\n}\n\ntemplate <typename E>\nvoid combine_objects(Context<E> &ctx) {\n  create_output_sections(ctx);\n\n  r_create_synthetic_sections(ctx);\n\n  r_claim_unresolved_symbols(ctx);\n\n  compute_section_sizes(ctx);\n\n  sort_output_sections(ctx);\n\n  create_output_symtab(ctx);\n\n  ctx.eh_frame->construct(ctx);\n\n  create_reloc_sections(ctx);\n\n  create_comdat_group_sections(ctx);\n\n  compute_section_headers(ctx);\n\n  i64 filesize = r_set_osec_offsets(ctx);\n  ctx.output_file = OutputFile<E>::open(ctx, ctx.arg.output, filesize, 0666);\n  ctx.buf = ctx.output_file->buf;\n\n  copy_chunks(ctx);\n  ctx.output_file->close(ctx);\n  ctx.checkpoint();\n\n  if (ctx.arg.print_map)\n    print_map(ctx);\n\n  if (ctx.arg.stats)\n    show_stats(ctx);\n\n  if (ctx.arg.perf)\n    print_timer_records(ctx.timer_records);\n\n  if (ctx.arg.quick_exit)\n    _exit(0);\n}\n\nusing E = MOLD_TARGET;\n\ntemplate void combine_objects(Context<E> &);\n\n} // namespace mold\n"
  },
  {
    "path": "src/shrink-sections.cc",
    "content": "// Since RISC instructions are generally up to 32 bits long, there's no\n// way to embed very large immediates into their branch instructions. For\n// example, RISC-V's JAL (jump and link) instruction can jump to only\n// within PC ± 1 MiB because its immediate is 21 bits long. If the\n// destination is further than that, we need to use two instructions\n// instead; the first instruction being AUIPC, which sets the upper 20\n// bits of a displacement to a register, and the second being JALR, which\n// specifies the lower 12 bits and the register. Combined, they specify a\n// 32-bit displacement, which is sufficient to support the medium code\n// model.\n//\n// However, always using two or more instructions for function calls is a\n// waste of time and space if the branch target is within a single\n// instruction's reach. There are two approaches to address this problem\n// as follows:\n//\n//  1. The compiler optimistically emits a single branch instruction for\n//     all function calls. The linker then checks if the branch target is\n//     reachable, and if not, redirects the branch to a linker-synthesized\n//     code sequence that uses two or more instructions to branch further.\n//     That linker-synthesized code is called a \"thunk\". All RISC psABIs\n//     except RISC-V and LoongArch take this approach.\n//\n//  2. The compiler pessimistically emits two instructions to branch\n//     anywhere in PC ± 2 GiB, and the linker rewrites them with a single\n//     instruction if the branch target is close enough. RISC-V and\n//     LoongArch take this approach.\n//\n// This file contains functions to support (2). For (1), see thunks.cc.\n//\n// With the presence of this code-shrinking relaxation, sections can no\n// longer be considered as atomic units. If we delete an instruction from\n// the middle of a section, the section contents after that point need to\n// be shifted by the size of the instruction. Symbol values and relocation\n// offsets have to be shifted too if they refer to bytes past the deleted\n// ones.\n//\n// In mold, we use `r_deltas` to memorize how many bytes have been shifted\n// for relocations. For symbols, we directly mutate their `value` member.\n//\n// RISC-V and LoongArch object files tend to have way more relocations\n// than those for other targets. This is because all branches, including\n// those that jump within the same section, are explicitly expressed with\n// relocations. Here is why we need them: all control-flow statements,\n// such as `if` or `for`, are implemented using branch instructions. For\n// other targets, the compiler doesn't emit relocations for such branches\n// because it knows at compile-time exactly how many bytes have to be\n// skipped. That's not true in RISC-V and LoongArch because the linker may\n// delete bytes between a branch and its target. Therefore, all branches,\n// including in-section ones, have to be explicitly expressed with\n// relocations.\n//\n// Note that this mechanism only shrinks sections and never enlarges them,\n// as the compiler always emits the longest instruction sequence. This\n// makes the linker implementation a bit simpler because we don't need to\n// worry about oscillation.\n\n#if MOLD_RV64LE || MOLD_RV64BE || MOLD_RV32LE || MOLD_RV32BE || \\\n    MOLD_LOONGARCH64 || MOLD_LOONGARCH32\n\n#include \"mold.h\"\n\n#include <tbb/parallel_for_each.h>\n\nnamespace mold {\n\nusing E = MOLD_TARGET;\n\ntemplate <>\ni64 get_r_delta(InputSection<E> &isec, u64 offset) {\n  std::span<RelocDelta> deltas = isec.extra.r_deltas;\n  auto it = ranges::upper_bound(deltas, offset, std::less_equal<>{},\n                                &RelocDelta::offset);\n  return (it == deltas.begin()) ? 0 : (it - 1)->delta;\n}\n\ntemplate <>\nvoid shrink_sections(Context<E> &ctx) {\n  Timer t(ctx, \"shrink_sections\");\n\n  // Find all relaxable relocations and record how many bytes we can save\n  // into r_deltas.\n  //\n  // Technically speaking, relaxing relocations may allow more relocations\n  // to be relaxed because the distance between a branch instruction and\n  // its target may decrease as a result of relaxation. That said, the\n  // number of such relocations is negligible (I tried to self-host mold\n  // on RISC-V as an experiment and found that the mold-built .text is\n  // only ~0.04% larger than that of GNU ld), so we don't bother to handle\n  // them. We scan relocations only once here.\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    for (std::unique_ptr<InputSection<E>> &isec : file->sections)\n      if (isec && isec->is_alive && (isec->shdr().sh_flags & SHF_EXECINSTR))\n        shrink_section(ctx, *isec);\n  });\n\n  // Fix symbol values.\n  tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {\n    for (Symbol<E> *sym : file->symbols)\n      if (sym->file == file)\n        if (InputSection<E> *isec = sym->get_input_section())\n          if (isec->shdr().sh_flags & SHF_EXECINSTR)\n            if (i64 delta = get_r_delta(*isec, sym->value))\n              sym->value -= delta;\n  });\n\n  // Recompute sizes of executable sections\n  tbb::parallel_for_each(ctx.chunks, [&](Chunk<E> *chunk) {\n    if (chunk->to_osec() && (chunk->shdr.sh_flags & SHF_EXECINSTR))\n      chunk->compute_section_size(ctx);\n  });\n}\n\n// Returns the distance between a relocated place and a symbol.\ntemplate <>\ni64 compute_distance(Context<E> &ctx, Symbol<E> &sym,\n                     InputSection<E> &isec, const ElfRel<E> &rel) {\n  // We handle absolute symbols as if they were infinitely far away\n  // because `shrink_section` may increase a distance between a branch\n  // instruction and an absolute symbol. Branching to an absolute\n  // location is extremely rare in real code, though.\n  if (sym.is_absolute())\n    return INT64_MAX;\n\n  // Compute a distance between the relocated place and the symbol.\n  i64 S = sym.get_addr(ctx);\n  i64 A = rel.r_addend;\n  i64 P = isec.get_addr() + rel.r_offset;\n  return S + A - P;\n}\n\n} // namespace mold\n\n#endif\n"
  },
  {
    "path": "src/signal-unix.cc",
    "content": "#include \"mold.h\"\n\n#include <csignal>\n#include <tbb/version.h>\n\n#ifdef __FreeBSD__\n# include <sys/sysctl.h>\n# include <unistd.h>\n#endif\n\nnamespace mold {\n\nstd::string errno_string() {\n  // strerror is not thread-safe, so guard it with a lock.\n  static std::mutex mu;\n  std::scoped_lock lock(mu);\n  return strerror(errno);\n}\n\nvoid cleanup() {\n  if (output_tmpfile)\n    unlink(output_tmpfile);\n}\n\n// mold mmap's an output file, and the mmap succeeds even if there's\n// no enough space left on the filesystem. The actual disk blocks are\n// not allocated on the mmap call but when the program writes to it\n// for the first time.\n//\n// If a disk becomes full as a result of a write to an mmap'ed memory\n// region, the failure of the write is reported as a SIGBUS. This\n// signal handler catches that signal and prints out a user-friendly\n// error message. Without this, it is very hard to realize that the\n// disk might be full.\nstatic std::string sigabrt_msg;\n\nstatic void sighandler(int signo, siginfo_t *info, void *ucontext) {\n  static std::mutex mu;\n  std::scoped_lock lock{mu};\n\n  // Handle disk full error\n  switch (signo) {\n  case SIGSEGV:\n  case SIGBUS:\n    if (output_buffer_start <= info->si_addr &&\n        info->si_addr < output_buffer_end) {\n      const char msg[] = \"mold: failed to write to an output file. Disk full?\\n\";\n      (void)!write(STDERR_FILENO, msg, sizeof(msg) - 1);\n    }\n    break;\n  case SIGABRT: {\n    (void)!write(STDERR_FILENO, &sigabrt_msg[0], sigabrt_msg.size());\n    break;\n  }\n  }\n\n  // Re-throw the signal\n  signal(SIGSEGV, SIG_DFL);\n  signal(SIGBUS, SIG_DFL);\n  signal(SIGABRT, SIG_DFL);\n\n  cleanup();\n  raise(signo);\n}\n\nvoid install_signal_handler() {\n  struct sigaction action;\n  action.sa_sigaction = sighandler;\n  sigemptyset(&action.sa_mask);\n  action.sa_flags = SA_SIGINFO;\n\n  sigaction(SIGSEGV, &action, NULL);\n  sigaction(SIGBUS, &action, NULL);\n\n  // OneTBB 2021.9.0 has the interface version 12090.\n  if (TBB_runtime_interface_version() <= 12090) {\n    sigabrt_msg = \"mold: aborted\\n\"\n      \"mold: mold with libtbb version 2021.9.0 or older is known to be unstable \"\n      \"under heavy load. Your libtbb version is \" +\n      std::string(TBB_runtime_version()) +\n      \". Please upgrade your libtbb library and try again.\\n\";\n\n    sigaction(SIGABRT, &action, NULL);\n  }\n}\n\n} // namespace mold\n"
  },
  {
    "path": "src/signal-win32.cc",
    "content": "#include \"mold.h\"\n\n#include <windows.h>\n\nnamespace mold {\n\nvoid cleanup() {\n  if (output_tmpfile)\n    _unlink(output_tmpfile);\n}\n\nstd::string errno_string() {\n  LPVOID buf;\n  DWORD dw = GetLastError();\n\n  FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |\n                FORMAT_MESSAGE_FROM_SYSTEM |\n                FORMAT_MESSAGE_IGNORE_INSERTS,\n                nullptr, dw,\n                MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),\n                (LPTSTR)&buf, 0, nullptr);\n\n  std::string ret = (char *)buf;\n  LocalFree(buf);\n  return ret;\n}\n\nstatic LONG WINAPI vectored_handler(_EXCEPTION_POINTERS *exception_info) {\n  static std::mutex mu;\n  std::scoped_lock lock{mu};\n\n  PEXCEPTION_RECORD rec = exception_info->ExceptionRecord;\n  ULONG_PTR *p = rec->ExceptionInformation;\n\n  if (rec->ExceptionCode == EXCEPTION_IN_PAGE_ERROR &&\n      (ULONG_PTR)output_buffer_start <= p[1] &&\n      p[1] < (ULONG_PTR)output_buffer_end) {\n    static const char msg[] =\n      \"mold: failed to write to an output file. Disk full?\\n\";\n    (void)!_write(_fileno(stderr), msg, sizeof(msg) - 1);\n  } else if (rec->ExceptionCode == EXCEPTION_STACK_OVERFLOW) {\n    static const char msg[] =\n      \"mold: stack overflow\\n\";\n    (void)!_write(_fileno(stderr), msg, sizeof(msg) - 1);\n  }\n\n  cleanup();\n  _exit(1);\n}\n\nvoid install_signal_handler() {\n  AddVectoredExceptionHandler(0, vectored_handler);\n}\n\n} // namespace mold\n"
  },
  {
    "path": "src/subprocess-unix.cc",
    "content": "#include \"config.h\"\n#include \"mold.h\"\n\n#include <csignal>\n#include <filesystem>\n#include <sys/stat.h>\n#include <sys/time.h>\n#include <sys/types.h>\n#include <sys/wait.h>\n#include <unistd.h>\n\nnamespace mold {\n\nstatic int pipe_write_fd = -1;\n\n// Exiting from a program with large memory usage is slow --\n// it may take a few hundred milliseconds. To hide the latency,\n// we fork a child and let it do the actual linking work.\ntemplate <typename E>\nvoid fork_child() {\n  int pipefd[2];\n  if (pipe(pipefd) == -1) {\n    perror(\"pipe\");\n    exit(1);\n  }\n\n  pid_t pid = fork();\n  if (pid == -1) {\n    perror(\"fork\");\n    exit(1);\n  }\n\n  if (pid > 0) {\n    // Parent\n    close(pipefd[1]);\n\n    char buf[1];\n    if (read(pipefd[0], buf, 1) == 1)\n      _exit(0);\n\n    int status;\n    waitpid(pid, &status, 0);\n\n    if (WIFEXITED(status))\n      _exit(WEXITSTATUS(status));\n    if (WIFSIGNALED(status))\n      raise(WTERMSIG(status));\n    _exit(1);\n  }\n\n  // Child\n  close(pipefd[0]);\n  pipe_write_fd = pipefd[1];\n}\n\ntemplate <typename E>\nvoid notify_parent() {\n  if (pipe_write_fd == -1)\n    return;\n\n  char buf[] = {1};\n  [[maybe_unused]] int n = write(pipe_write_fd, buf, 1);\n  assert(n == 1);\n  pipe_write_fd = -1;\n}\n\ntemplate <typename E>\nstatic std::string find_dso(Context<E> &ctx, std::filesystem::path self) {\n  // Look for mold-wrapper.so from the same directory as the executable is.\n  std::filesystem::path path = self.parent_path() / \"mold-wrapper.so\";\n  std::error_code ec;\n  if (std::filesystem::is_regular_file(path, ec) && !ec)\n    return path;\n\n  // If not found, search $(MOLD_LIBDIR)/mold, which is /usr/local/lib/mold\n  // by default.\n  path = MOLD_LIBDIR \"/mold/mold-wrapper.so\";\n  if (std::filesystem::is_regular_file(path, ec) && !ec)\n    return path;\n\n  // Look for ../lib/mold/mold-wrapper.so\n  path = self.parent_path() / \"../lib/mold/mold-wrapper.so\";\n  if (std::filesystem::is_regular_file(path, ec) && !ec)\n    return path;\n\n  Fatal(ctx) << \"mold-wrapper.so is missing\";\n}\n\ntemplate <typename E>\n[[noreturn]]\nvoid process_run_subcommand(Context<E> &ctx, int argc, char **argv) {\n#ifdef __APPLE__\n  Fatal(ctx) << \"-run is not supported on macOS\";\n#else\n  assert(argv[1] == \"-run\"s || argv[1] == \"--run\"s);\n\n  if (!argv[2])\n    Fatal(ctx) << \"-run: argument missing\";\n\n  // Get the mold-wrapper.so path\n  std::string self = get_self_path();\n  std::string dso_path = find_dso(ctx, self);\n\n  // Set environment variables\n  setenv(\"LD_PRELOAD\", dso_path.c_str(), 1);\n  setenv(\"MOLD_PATH\", self.c_str(), 1);\n\n  // If ld, ld.lld or ld.gold is specified, run mold instead\n  if (std::string cmd = path_filename(argv[2]);\n      cmd == \"ld\" || cmd == \"ld.lld\" || cmd == \"ld.gold\") {\n    std::vector<char *> args;\n    args.push_back(argv[0]);\n    args.insert(args.end(), argv + 3, argv + argc);\n    args.push_back(nullptr);\n    execv(self.c_str(), args.data());\n    Fatal(ctx) << \"mold -run failed: \" << self << \": \" << errno_string();\n  }\n\n  // Execute a given command\n  execvp(argv[2], argv + 2);\n  Fatal(ctx) << \"mold -run failed: \" << argv[2] << \": \" << errno_string();\n#endif\n}\n\nusing E = MOLD_TARGET;\n\ntemplate void fork_child<E>();\ntemplate void notify_parent<E>();\ntemplate void process_run_subcommand(Context<E> &, int, char **);\n\n} // namespace mold\n"
  },
  {
    "path": "src/subprocess-win32.cc",
    "content": "#include \"mold.h\"\n\nnamespace mold {\n\ntemplate <typename E>\nvoid fork_child() {}\n\ntemplate <typename E>\nvoid notify_parent() {}\n\ntemplate <typename E>\n[[noreturn]]\nvoid process_run_subcommand(Context<E> &ctx, int argc, char **argv) {\n  Fatal(ctx) << \"-run is supported only on Unix\";\n}\n\nusing E = MOLD_TARGET;\n\ntemplate void fork_child<E>();\ntemplate void notify_parent<E>();\ntemplate void process_run_subcommand(Context<E> &, int, char **);\n\n} // namespace mold\n"
  },
  {
    "path": "src/thunks.cc",
    "content": "// RISC instructions are usually up to 4 bytes long, so the immediates of\n// their branch instructions are naturally smaller than 32 bits.  This is\n// contrary to x86-64 on which branch instructions take 4 bytes immediates\n// and can jump to anywhere within PC ± 2 GiB.\n//\n// In fact, ARM32's branch instructions can jump only within ±16 MiB and\n// ARM64's ±128 MiB, for example. If a branch target is further than that,\n// we need to let it branch to a linker-synthesized code sequence that\n// construct a full 32 bit address in a register and jump there. That\n// linker-synthesized code is called \"thunk\".\n//\n// The function in this file creates thunks.\n//\n// Note that although thunks play an important role in an executable, they\n// don't take up too much space in it. For example, among the clang-16's\n// text segment whose size is ~300 MiB on ARM64, thunks in total occupy\n// only ~30 KiB or 0.01%. Of course the number depends on an ISA; we would\n// need more thunks on ARM32 whose branch range is shorter than ARM64.\n// That said, the total size of thunks still isn't that much. Therefore,\n// we don't need to try too hard to reduce thunk size to the absolute\n// minimum.\n\n#if MOLD_ARM32LE || MOLD_ARM32BE || MOLD_ARM64LE || MOLD_ARM64BE || \\\n    MOLD_PPC32 || MOLD_PPC64V1 || MOLD_PPC64V2\n\n#include \"mold.h\"\n\n#include <tbb/parallel_for.h>\n#include <tbb/parallel_for_each.h>\n\nnamespace mold {\n\nusing E = MOLD_TARGET;\n\n// We create thunks for each 25.6/3.2/6.4 MiB code block for\n// ARM64/ARM32/PPC, respectively.\nstatic constexpr i64 batch_size = branch_distance<E> / 5;\n\n// We assume that a single thunk group is smaller than 1 MiB.\nstatic constexpr i64 max_thunk_size = 1024 * 1024;\n\n// We align thunks to 16 byte boundaries because many processor vendors\n// recommend we align branch targets to 16 byte boundaries for performance\n// reasons.\nstatic constexpr i64 thunk_align = 16;\n\ntemplate <typename E>\nstatic bool\nrequires_thunk(Context<E> &ctx, InputSection<E> &isec, const ElfRel<E> &rel,\n               bool first_pass) {\n  if (!is_func_call_rel(rel))\n    return false;\n  Symbol<E> &sym = *isec.file.symbols[rel.r_sym];\n\n  if (first_pass) {\n    // On the first pass, we pessimistically assume that all out-of-section\n    // relocations are out of range.\n    InputSection<E> *isec2 = sym.get_input_section();\n    if (!isec2 || isec.output_section != isec2->output_section)\n      return true;\n\n    // If the target section is in the same output section but\n    // hasn't got any address yet, that's unreacahble.\n    if (isec2->offset == -1)\n      return true;\n\n    // Even if the target is the same section, we branch to its PLT\n    // if it has one. So a symbol with a PLT is also considered an\n    // out-of-section reference.\n    if (sym.has_plt(ctx))\n      return true;\n  }\n\n  // Thumb and ARM B instructions cannot be converted to BX, so we\n  // always have to make them jump to a thunk to switch processor mode\n  // even if their destinations are reachable.\n  if constexpr (is_arm32<E>)\n    if (bool is_thumb = sym.get_addr(ctx) & 1;\n        (rel.r_type == R_ARM_JUMP24 && is_thumb) ||\n        (rel.r_type == R_ARM_PLT32 && is_thumb) ||\n        (rel.r_type == R_ARM_THM_JUMP24 && !is_thumb))\n      return true;\n\n  // On PowerPC, all PLT calls go through range extension thunks.\n  if constexpr (is_ppc<E>)\n    if (sym.has_plt(ctx))\n      return true;\n\n  // PowerPC before Power9 lacks PC-relative load/store instructions.\n  // Functions compiled for Power9 or earlier assume that r2 points to\n  // GOT+0x8000, while those for Power10 uses r2 as a scratch register.\n  // We need a thunk to recompute r2 for interworking.\n  if constexpr (is_ppc64v2<E>)\n    if ((rel.r_type == R_PPC64_REL24 && !sym.esym().ppc64_preserves_r2()) ||\n        (rel.r_type == R_PPC64_REL24_NOTOC && sym.esym().ppc64_uses_toc()))\n      return true;\n\n  // Compute a distance between the relocated place and the symbol\n  // and check if they are within reach.\n  i64 S = sym.get_addr(ctx, NO_OPD);\n  i64 A = get_addend(isec, rel);\n  i64 P = isec.get_addr() + rel.r_offset;\n  i64 val = S + A - P;\n  return val < -branch_distance<E> || branch_distance<E> <= val;\n}\n\ntemplate <>\nvoid Thunk<E>::compute_size() {\n  offsets.clear();\n  for (i64 i = 0; i <= symbols.size(); i++)\n    offsets.push_back(E::thunk_hdr_size + i * E::thunk_size);\n}\n\ntemplate <>\nvoid OutputSection<E>::create_range_extension_thunks(Context<E> &ctx) {\n  std::span<InputSection<E> *> m = members;\n  if (m.empty())\n    return;\n\n  // Initialize input sections with a dummy offset so that we can\n  // distinguish sections that have got an address with the one who\n  // haven't.\n  for (InputSection<E> *isec : m)\n    isec->offset = -1;\n  thunks.clear();\n\n  // We create thunks from the beginning of the section to the end.\n  // We manage progress using four offsets which increase monotonically.\n  // The locations they point to are always A <= B <= C <= D.\n  //\n  // Input sections between B and C are the current batch.\n  //\n  // A is the input section with the smallest address than can reach\n  // from the current batch.\n  //\n  // D is the input section with the largest address such that the thunk\n  // is reachable from the current batch if it's inserted at D.\n  //\n  //  ................................ <input sections> ............\n  //     A    B    C    D\n  //                    ^ We insert a thunk for the current batch just before D\n  //          <--->       The current batch, which is smaller than BATCH_SIZE\n  //     <-------->       Smaller than BRANCH_DISTANCE\n  //          <-------->  Smaller than BRANCH_DISTANCE\n  //     <------------->  Reachable from the current batch\n  i64 a = 0;\n  i64 b = 0;\n  i64 c = 0;\n  i64 d = 0;\n  i64 offset = 0;\n\n  // The smallest thunk index that is reachable from the current batch.\n  i64 t = 0;\n\n  while (b < m.size()) {\n    // Move D foward as far as we can jump from B to a thunk at D.\n    auto d_thunk_end = [&] {\n      u64 d_end = align_to(offset, 1 << m[d]->p2align) + m[d]->sh_size;\n      return align_to(d_end, thunk_align) + max_thunk_size;\n    };\n\n    while (d < m.size() &&\n           (b == d || d_thunk_end() <= m[b]->offset + branch_distance<E>)) {\n      offset = align_to(offset, 1 << m[d]->p2align);\n      m[d]->offset = offset;\n      offset += m[d]->sh_size;\n      d++;\n    }\n\n    // Move C forward so that C is apart from B by BATCH_SIZE. We want\n    // to make sure that there's at least one section between B and C\n    // to ensure progress.\n    c = b + 1;\n    while (c < d && m[c]->offset + m[c]->sh_size < m[b]->offset + batch_size)\n      c++;\n\n    // Move A forward so that A is reachable from C.\n    i64 c_offset = (c == d) ? offset : m[c]->offset;\n    while (a < b && m[a]->offset + branch_distance<E> < c_offset)\n      a++;\n\n    // Erase references to out-of-range thunks.\n    for (; t < thunks.size() && thunks[t]->offset < m[a]->offset; t++)\n      for (Symbol<E> *sym : thunks[t]->symbols)\n        sym->flags = 0;\n\n    // Create a new thunk and place it at D.\n    offset = align_to(offset, thunk_align);\n    thunks.emplace_back(std::make_unique<Thunk<E>>(*this, offset));\n\n    Thunk<E> &thunk = *thunks.back();\n    std::mutex mu;\n\n    // Scan relocations between B and C to collect symbols that need\n    // entries in the new thunk.\n    tbb::parallel_for(b, c, [&](i64 i) {\n      InputSection<E> &isec = *m[i];\n      for (const ElfRel<E> &rel : isec.get_rels(ctx)) {\n        if (requires_thunk(ctx, isec, rel, true)) {\n          if (Symbol<E> &sym = *isec.file.symbols[rel.r_sym];\n              !sym.flags.test_and_set()) {\n            std::scoped_lock lock(mu);\n            thunk.symbols.push_back(&sym);\n          }\n        }\n      }\n    });\n\n    // Sort symbols added to the thunk to make the output deterministic.\n    ranges::sort(thunk.symbols, {}, [](Symbol<E> *x) {\n      return std::tuple{x->file->priority, x->sym_idx};\n    });\n\n    // Now that we know the number of symbols in the thunk, we can compute\n    // the thunk's size.\n    thunk.compute_size();\n    assert(thunk.size() < max_thunk_size);\n    offset += thunk.size();\n\n    // Move B forward to point to the begining of the next batch.\n    b = c;\n  }\n\n  // Reset flags for future use\n  for (; t < thunks.size(); t++)\n    for (Symbol<E> *sym : thunks[t]->symbols)\n      sym->flags = 0;\n\n  this->shdr.sh_size = offset;\n}\n\n// create_range_extension_thunks() creates thunks with a pessimistic\n// assumption that all out-of-section references are out of range.\n// After computing output section addresses, we revisit all thunks to\n// remove unneeded entries from them.\n//\n// We create more thunks than necessary and then eliminate some of\n// them later, instead of just creating thunks at this stage. This is\n// because we can safely shrink sections after assigning addresses to\n// them without worrying about making existing references to thunks go\n// out of range. On the other hand, if we insert thunks after\n// assigning addresses to sections, references to thunks could become\n// out of range due to the new extra gaps for thunks. Thus, the\n// creation of thunks is a two-pass process.\ntemplate <>\nvoid remove_redundant_thunks(Context<E> &ctx) {\n  Timer t(ctx, \"remove_redundant_thunks\");\n\n  // Gather output executable sections\n  std::vector<OutputSection<E> *> sections;\n  for (Chunk<E> *chunk : ctx.chunks)\n    if (OutputSection<E> *osec = chunk->to_osec())\n      if (osec->shdr.sh_flags & SHF_EXECINSTR)\n        sections.push_back(osec);\n\n  // Mark all symbols that actually need range extension thunks\n  for (OutputSection<E> *osec : sections) {\n    tbb::parallel_for_each(osec->members, [&](InputSection<E> *isec) {\n      for (const ElfRel<E> &rel : isec->get_rels(ctx))\n        if (requires_thunk(ctx, *isec, rel, false))\n          isec->file.symbols[rel.r_sym]->flags.test_and_set();\n    });\n  }\n\n  // Remove symbols from thunks if they don't actually need range\n  // extension thunks\n  for (OutputSection<E> *osec : sections) {\n    for (std::unique_ptr<Thunk<E>> &thunk : osec->thunks) {\n      std::erase_if(thunk->symbols, [&](Symbol<E> *sym) { return !sym->flags; });\n      thunk->shrink_size(ctx);\n    }\n  }\n\n  // Recompute section sizes\n  tbb::parallel_for_each(sections, [&](OutputSection<E> *osec) {\n    std::span<InputSection<E> *> m = osec->members;\n    std::span<std::unique_ptr<Thunk<E>>> t = osec->thunks;\n    i64 offset = 0;\n\n    while (!m.empty() || !t.empty()) {\n      if (!m.empty() && (t.empty() || m[0]->offset < t[0]->offset)) {\n        offset = align_to(offset, 1 << m[0]->p2align);\n        m[0]->offset = offset;\n        offset += m[0]->sh_size;\n        m = m.subspan(1);\n      } else {\n        offset = align_to(offset, thunk_align);\n        t[0]->offset = offset;\n        offset += t[0]->size();\n        t = t.subspan(1);\n      }\n    }\n    osec->shdr.sh_size = offset;\n  });\n\n  // Reset flags for future use\n  for (OutputSection<E> *osec : sections)\n    for (std::unique_ptr<Thunk<E>> &thunk : osec->thunks)\n      for (Symbol<E> *sym : thunk->symbols)\n        sym->flags = 0;\n}\n\n// When applying relocations, we want to know the address in a reachable\n// range extension thunk for a given symbol. Doing it by scanning all\n// reachable range extension thunks is too expensive.\n//\n// In this function, we create a list of all addresses in range extension\n// thunks for each symbol, so that it is easy to find one.\n//\n// Note that thunk_addrs must be sorted for binary search.\ntemplate <>\nvoid gather_thunk_addresses(Context<E> &ctx) {\n  Timer t(ctx, \"gather_thunk_addresses\");\n\n  std::vector<OutputSection<E> *> sections;\n  for (Chunk<E> *chunk : ctx.chunks)\n    if (OutputSection<E> *osec = chunk->to_osec())\n      if (osec->shdr.sh_flags & SHF_EXECINSTR)\n        sections.push_back(osec);\n\n  ranges::stable_sort(sections, {}, [](OutputSection<E> *x) {\n    return x->shdr.sh_addr;\n  });\n\n  for (OutputSection<E> *osec : sections) {\n    for (std::unique_ptr<Thunk<E>> &thunk : osec->thunks) {\n      for (i64 i = 0; i < thunk->symbols.size(); i++) {\n        Symbol<E> &sym = *thunk->symbols[i];\n        u64 addr = thunk->get_addr() + thunk->offsets[i];\n        sym.add_thunk_addr(ctx, addr);\n      }\n    }\n  }\n}\n\n} // namespace mold\n\n#endif\n"
  },
  {
    "path": "src/tls.cc",
    "content": "// This file contains helper functions for thread-local storage (TLS).\n// TLS is probably the most obscure feature the linker has to support,\n// so I'll explain it in detail in this comment.\n//\n// TLS is a per-thread storage. Thread-local variables (TLVs) are in a TLS\n// so that each thread has its own set of thread-local variables. Taking\n// an address of a TLV returns a unique value for each thread. For example,\n// `&foo` for the following code returns different pointer values for\n// different threads.\n//\n//   thread_local int foo;\n//\n// TLV is a relatively new feature. C for example didn't provide the\n// official support for it through the keyword `thread_local` until C11.\n// TLV needs a coordination between the compiler, the linker and the\n// runtime to work correctly.\n//\n// An ELF exectuable or a shared library using TLV contains a \"TLS template\n// image\" in the PT_TLS segment. For each newly created thread including the\n// initial one, the runtime allocates a contiguous memory for an executable\n// and its depending shared libraries and copies template images there. That\n// per-thread memory is called the \"initial TLS block\". After allocating and\n// initializing the initial TLS block, the runtime sets a register to refer\n// to the initial TLS block, so that the thread-local variables are\n// accessible relative to the register.\n//\n// The register referring to the per-thread storage is called the Thread\n// Pointer (TP). TP is part of the thread's context. When the kernel\n// scheduler switches threads, TP is saved and restored automatically just\n// like other registers are.\n//\n// The TLS template image is read-only. It contains TLVs' initial values\n// for new threads, and no one writes to it at runtime.\n//\n// Now, let's think about how to access a TLV. We need to know the TLV's\n// address to access it which can be done in several different ways as\n// follows:\n//\n//  1. If we are creating an executable, we know the exact size of the TLS\n//     template image we are creating, and we know where the TP will be set\n//     to after the template is copied to the initial TLS block. Therefore,\n//     the TP-relative address of a TLV in the main executable is known at\n//     link-time. That means, computing a TLV's address can be as easy as\n//     `add %dst, %tp, <link-time constant>`.\n//\n//  2. If we are creating a shared library, we don't exactly know where\n//     its TLS template image will be copied to in terms of the\n//     TP-relative address, because we don't know how large the main\n//     executable's and other libraries' TLS template images are. Only the\n//     runtime knows the exact TP-relative address.\n//\n//     We can solve the problem with an indirection. Specifically, for\n//     each TLV whose TP-relative address is known only at process startup\n//     time, we create a GOT entry to store its TP-relative address. We\n//     then emit a dynamic relocation to let the runtime to fill the GOT\n//     entry with a TP-relative address.\n//\n//     Computing a TLV address in this scheme needs at least two machine\n//     instructions in most ISAs; the first instruction loads a value from\n//     the GOT entry, and the second one adds the loaded value to TP.\n//\n//  3. Now, think about libraries that are dynamically loaded with dlopen.\n//     The TLS block for such library may not be allocated next to the\n//     initial TLS block, so we can have two or more discontiguous TLS\n//     blocks. There's no easy formula to compute an address of a TLV in a\n//     separate TLS block.\n//\n//     The address of a TLV in a separate TLS block can be obtained by\n//     calling the libc-provided function, __tls_get_addr(). The function\n//     takes two arguments; a module ID to identify the ELF file and the\n//     TLV's offset within the ELF file's TLS template image. Accessing a\n//     TLV is sometimes compiled to a function call! The module ID and the\n//     offset are usually stored to GOT as two consecutive words.\n//\n// 1) is called the Local Exec access model. 2) is Initial Exec, and 3) is\n// General Dynamic.\n//\n// There's another little trick that the compiler can use if it knows two\n// TLVs are in the same ELF file (usually in the same file as the code is).\n// In this case, we can call __tls_get_addr() only once with the module ID\n// and the offset 0 to obtain the base address of the ELF file's TLS block.\n// The base address obtained this way is sometimes called Dynamic Thread\n// Pointer or DTP. We can then compute TLVs' addresses by adding their\n// DTP-relative addresses to DTP. This access model is called the Local\n// Dynamic.\n//\n// The compiler tries to emit the most efficient code for a TLV access based\n// on compiler command line options and TLV properties as follows:\n//\n//  1. If -fno-PIC or -fPIE is given, and a TLV is defined as a file-local\n//     variable, the compiler knows that it is compiling code for an\n//     executable (i.e. not for a shared library) and the TLV is defined\n//     within the executable. In this case, Local Exec is used to access the\n//     variable.\n//\n//  2. If -fno-PIC or -fPIE is given (i.e. the compiler is compiling code for\n//     a main executable), but a TLV is defined in another translation unit,\n//     then the variable may be defined not in the main executable but in a\n//     shared library. In this case, Initial Exec is used to access the\n//     variable.\n//\n//  3. If -fPIC is given, it may be compiling code for dlopen'able shared\n//     library. In this case, Local Dynamic or General Dynamic is used to\n//     access TLVs.\n//\n// You can also manually control how the compiler emits TLV access code\n// globally with `-ftls-model=<model-name>` or per-variable basis with\n// `__attribute__((tls_model(<model-name>)))`. For example, if you are\n// building a shared library that you have no plan to use with dlopen(), you\n// may want to compile the source files with `-ftls-model=initial-exec` to\n// avoid the cost associated with the General Dynamic access model.\n//\n// The linker may rewrite instructions with a code sequence for a cheaper\n// access model at link-time.\n//\n// === TLS Descriptor access model ===\n//\n// As described above, there are arguably too many different TLS access\n// models from the most generic one you can use in any ELF file to the most\n// efficient one you can use only when building a main executable. Compiling\n// source code with an appropriate TLS access model is bothersome. To solve\n// the problem, a new TLS access model was proposed. That is called the TLS\n// Descriptor (TLSDESC) model.\n//\n// For a TLV compiled with TLSDESC, we allocate two consecutive GOT slots\n// and create a TLSDESC dynamic relocation for them. The dynamic linker\n// sets a function pointer to the first GOT slot and its argument to the\n// second slot.\n//\n// To access the TLV, we call the function pointer with the argument we\n// read from the second GOT slot. The function returns the TLV's\n// TP-relative address.\n//\n// The runtime chooses the best access method depending on the situation\n// and sets a pointer to the most efficient code to the first GOT slot.\n// For example, if a TLV's TP-relative address is known at process startup\n// time, the runtime sets that address to the second GOT slot and set a\n// function that just returns its argument to the first GOT slot.\n//\n// With TLSDECS, the compiler can always emit the same code for TLVs\n// without sacrificing runtime performance.\n//\n// TLSDESC is better than the traditional, non-TLSDESC TLS access models.\n// It's the default on ARM64, but on other targets, TLSDESC is\n// unfortunately either optional or even not supported at all. So we still\n// need to support both the traditional TLS models and the TLSDESC model.\n\n#include \"mold.h\"\n\nnamespace mold {\n\n// Returns the TP address which can be used for efficient TLV accesses in\n// the main executable. TP at runtime refers to a per-process TLS block\n// whose address is not known at link-time. So the address returned from\n// this function is the TP if the TLS template image were a TLS block.\ntemplate <typename E>\nu64 get_tp_addr(const ElfPhdr<E> &phdr) {\n  assert(phdr.p_type == PT_TLS);\n\n  if constexpr (is_x86<E> || is_sparc<E> || is_s390x<E>) {\n    // On x86, SPARC and s390x, TP (%gs on i386, %fs on x86-64, %g7 on SPARC\n    // and %a0/%a1 on s390x) refers to past the end of the TLS block for\n    // historical reasons. TLVs are accessed with negative offsets from TP.\n    return align_to(phdr.p_vaddr + phdr.p_memsz, phdr.p_align);\n  } else if constexpr (is_arm<E> || is_sh4<E>) {\n    // On ARM and SH4, the runtime appends two words at the beginning\n    // of TLV template image when copying TLVs to the TLS block, so we need\n    // to offset it.\n    return align_down(phdr.p_vaddr - sizeof(Word<E>) * 2, phdr.p_align);\n  } else if constexpr (is_ppc<E> || is_m68k<E>) {\n    // On PowerPC and m68k, TP is 0x7000 (28 KiB) past the beginning\n    // of the TLV block to maximize the addressable range of load/store\n    // instructions with 16-bits signed immediates. It's not exactly 0x8000\n    // (32 KiB) off because there's a small implementation-defined piece of\n    // data before the initial TLV block, and the runtime wants to access\n    // them efficiently too.\n    return phdr.p_vaddr + 0x7000;\n  } else {\n    // RISC-V and LoongArch just uses the beginning of the main executable's\n    // TLV block as TP. Their load/store instructions usually take 12-bits\n    // signed immediates, so the beginning of the TLS block ± 2 KiB is\n    // accessible with a single load/store instruction.\n    static_assert(is_riscv<E> || is_loongarch<E>);\n    return phdr.p_vaddr;\n  }\n}\n\n// Returns the address __tls_get_addr() would return if it's called\n// with offset 0.\ntemplate <typename E>\nu64 get_dtp_addr(const ElfPhdr<E> &phdr) {\n  assert(phdr.p_type == PT_TLS);\n\n  if constexpr (is_ppc<E> || is_m68k<E>) {\n    // On PowerPC and m68k, R_DTPOFF is resolved to the address 0x8000\n    // (32 KiB) past the start of the TLS block. The bias maximizes the\n    // accessible range of load/store instructions with 16-bits signed\n    // immediates. That is, if the offset were right at the beginning of the\n    // start of the TLS block, the half of addressible space (negative\n    // immediates) would have been wasted.\n    return phdr.p_vaddr + 0x8000;\n  } else if constexpr (is_riscv<E>) {\n    // On RISC-V, the bias is 0x800 as the load/store instructions in the\n    // ISA usually have a 12-bit immediate.\n    return phdr.p_vaddr + 0x800;\n  } else {\n    // On other targets, DTP simply refers to the beginning of the TLS block.\n    return phdr.p_vaddr;\n  }\n}\n\nusing E = MOLD_TARGET;\n\ntemplate u64 get_tp_addr(const ElfPhdr<E> &);\ntemplate u64 get_dtp_addr(const ElfPhdr<E> &);\n\n} // namespace mold\n"
  },
  {
    "path": "test/CMakeLists.txt",
    "content": "option(MOLD_ENABLE_QEMU_TESTS \"Enable tests on non-native targets\" ON)\nset(MACHINE ${CMAKE_HOST_SYSTEM_PROCESSOR})\n\nif(EXISTS \"/proc/cpuinfo\")\n  file(READ \"/proc/cpuinfo\" CPUINFO)\nendif()\n\n# CMAKE_HOST_SYSTEM_PROCESSOR returns \"aarch64\" on ARM32 userland\n# with ARM64 kernel. Here, we run `cc -dumpmachine` to determine the\n# compiler's default target.\nexecute_process(COMMAND ${CMAKE_C_COMPILER} -dumpmachine\n  RESULT_VARIABLE EXIT_CODE\n  OUTPUT_VARIABLE ARCH\n  ERROR_QUIET)\nif(NOT EXIT_CODE AND ARCH MATCHES \"([^-]+).*\")\n  set(MACHINE ${CMAKE_MATCH_1})\nendif()\n\nif(${MACHINE} MATCHES \"amd64\")\n  set(MACHINE x86_64)\nelseif(${MACHINE} MATCHES \"i.86\")\n  set(MACHINE i686)\nelseif(${MACHINE} MATCHES \"arm.*\")\n  set(MACHINE arm)\nelseif(${MACHINE} STREQUAL \"powerpc64\")\n  set(MACHINE ppc64)\nelseif(${MACHINE} STREQUAL \"powerpc64le\")\n  set(MACHINE ppc64le)\nendif()\n\nif(MOLD_ENABLE_QEMU_TESTS)\n  list(APPEND QEMU_ARCHS\n    x86_64 i386 arm armeb aarch64 aarch64_be ppc ppc64 ppc64le sparc64\n    sh4 sh4eb s390x riscv64 riscv32 m68k loongarch64)\n\n  LIST(APPEND TRIPLES\n    x86_64-linux-gnu\n    i686-linux-gnu\n    aarch64-linux-gnu\n    aarch64_be-linux-gnu\n    arm-linux-gnueabihf\n    armeb-linux-gnueabihf\n    riscv64-linux-gnu\n    powerpc-linux-gnu\n    powerpc64-linux-gnu\n    powerpc64le-linux-gnu\n    sparc64-linux-gnu\n    s390x-linux-gnu\n    sh4-linux-gnu\n    sh4aeb-linux-gnu\n    riscv32-linux-gnu\n    m68k-linux-gnu\n    loongarch64-linux-gnu)\n\n  foreach(ARCH IN LISTS QEMU_ARCHS)\n    find_program(HAS_qemu-${ARCH} qemu-${ARCH})\n  endforeach()\n\n  foreach(TRIPLE IN LISTS TRIPLES)\n    find_program(HAS_${TRIPLE}-gcc ${TRIPLE}-gcc)\n  endforeach()\nendif()\n\nfunction(add_target ARCH TRIPLE)\n  set(CPU ${ARGV2})\n\n  if(${ARCH} STREQUAL ${MACHINE})\n    set(IS_NATIVE 1)\n  endif()\n\n  file(GLOB ALL_TESTS RELATIVE ${CMAKE_CURRENT_LIST_DIR} CONFIGURE_DEPENDS\n    \"*.sh\")\n\n  list(FILTER ALL_TESTS EXCLUDE REGEX \"^arch-\")\n\n  file(GLOB TESTS RELATIVE ${CMAKE_CURRENT_LIST_DIR} CONFIGURE_DEPENDS\n    \"arch-${ARCH}-*.sh\")\n\n  list(APPEND TESTS ${ALL_TESTS})\n\n  foreach(TEST IN LISTS TESTS)\n    if(CPU)\n      string(REGEX REPLACE \"\\\\.sh$\" \"\" TESTNAME \"${ARCH}_${CPU}-${TEST}\")\n    else()\n      string(REGEX REPLACE \"\\\\.sh$\" \"\" TESTNAME \"${ARCH}-${TEST}\")\n    endif()\n\n    add_test(NAME ${TESTNAME}\n      COMMAND bash -x ${CMAKE_CURRENT_LIST_DIR}/${TEST}\n      WORKING_DIRECTORY ${mold_BINARY_DIR})\n\n    set_property(TEST ${TESTNAME} APPEND PROPERTY ENVIRONMENT\n      \"MACHINE=${MACHINE};CPU=${CPU}\")\n\n    if(IS_NATIVE)\n      set_property(TEST ${TESTNAME} APPEND PROPERTY SKIP_REGULAR_EXPRESSION\n        \"skipped\")\n    else()\n      set_property(TEST ${TESTNAME} APPEND PROPERTY ENVIRONMENT\n        \"TRIPLE=${TRIPLE}\")\n    endif()\n  endforeach()\nendfunction()\n\nif(${MACHINE} STREQUAL \"x86_64\" OR (HAS_qemu-x86_64 AND HAS_x86_64-linux-gnu-gcc))\n  add_target(x86_64 x86_64-linux-gnu)\nendif()\n\nif(${MACHINE} STREQUAL \"i686\" OR (HAS_qemu-i386 AND HAS_i686-linux-gnu-gcc))\n  add_target(i686 i686-linux-gnu)\nendif()\n\nif(${MACHINE} STREQUAL \"aarch64\" OR (HAS_qemu-aarch64 AND HAS_aarch64-linux-gnu-gcc))\n  add_target(aarch64 aarch64-linux-gnu)\nendif()\n\nif(${MACHINE} STREQUAL \"aarch64_be\" OR (HAS_qemu-aarch64_be AND HAS_aarch64_be-linux-gnu-gcc))\n  add_target(aarch64_be aarch64_be-linux-gnu)\nendif()\n\nif(${MACHINE} STREQUAL \"arm\" OR (HAS_qemu-arm AND HAS_arm-linux-gnueabihf-gcc))\n  add_target(arm arm-linux-gnueabihf)\nendif()\n\nif(${MACHINE} STREQUAL \"armeb\" OR (HAS_qemu-armeb AND HAS_armeb-linux-gnueabihf-gcc))\n  add_target(armeb armeb-linux-gnueabihf)\nendif()\n\nif(${MACHINE} STREQUAL \"riscv64\" OR (HAS_qemu-riscv64 AND HAS_riscv64-linux-gnu-gcc))\n  add_target(riscv64 riscv64-linux-gnu)\nendif()\n\nif(${MACHINE} STREQUAL \"riscv32\" OR (HAS_qemu-riscv32 AND HAS_riscv32-linux-gnu-gcc))\n  add_target(riscv32 riscv32-linux-gnu)\nendif()\n\nif(${MACHINE} STREQUAL \"ppc\" OR (HAS_qemu-ppc AND HAS_powerpc-linux-gnu-gcc))\n  add_target(ppc powerpc-linux-gnu)\nendif()\n\nif(${MACHINE} STREQUAL \"ppc64\" OR (HAS_qemu-ppc64 AND HAS_powerpc64-linux-gnu-gcc))\n  add_target(ppc64 powerpc64-linux-gnu)\nendif()\n\nif(${MACHINE} STREQUAL \"ppc64le\" OR (HAS_qemu-ppc64le AND HAS_powerpc64le-linux-gnu-gcc))\n  add_target(ppc64le powerpc64le-linux-gnu)\nendif()\n\nif(${MACHINE} STREQUAL \"ppc64le\" AND \"${CPUINFO}\" MATCHES \"POWER10\")\n  add_target(ppc64le powerpc64le-linux-gnu power10)\nelseif(HAS_qemu-ppc64le AND HAS_powerpc64le-linux-gnu-gcc)\n  file(WRITE \"${CMAKE_BINARY_DIR}/empty.c\" \"\")\n\n  execute_process(\n    COMMAND powerpc64le-linux-gnu-gcc -mcpu=power10 -E\n      \"${CMAKE_BINARY_DIR}/empty.c\"\n    RESULT_VARIABLE GCC_EXIT_CODE\n    OUTPUT_QUIET ERROR_QUIET)\n\n  execute_process(\n    COMMAND qemu-ppc64le -cpu help\n    OUTPUT_VARIABLE QEMU_CPUS)\n\n  if(\"${GCC_EXIT_CODE}\" EQUAL \"0\" AND \"${QEMU_CPUS}\" MATCHES power10_v2.0)\n    add_target(ppc64le powerpc64le-linux-gnu power10)\n  endif()\nendif()\n\nif(${MACHINE} STREQUAL \"sparc64\" OR (HAS_qemu-sparc64 AND HAS_sparc64-linux-gnu-gcc))\n  add_target(sparc64 sparc64-linux-gnu)\nendif()\n\nif(${MACHINE} STREQUAL \"s390x\" OR (HAS_qemu-s390x AND HAS_s390x-linux-gnu-gcc))\n  add_target(s390x s390x-linux-gnu)\nendif()\n\nif(${MACHINE} STREQUAL \"sh4\" OR (HAS_qemu-sh4 AND HAS_sh4-linux-gnu-gcc))\n  add_target(sh4 sh4-linux-gnu)\nendif()\n\nif(${MACHINE} STREQUAL \"sh4aeb\" OR (HAS_qemu-sh4eb AND HAS_sh4aeb-linux-gnu-gcc))\n  add_target(sh4aeb sh4aeb-linux-gnu)\nendif()\n\nif(${MACHINE} STREQUAL \"m68k\" OR (HAS_qemu-m68k AND HAS_m68k-linux-gnu-gcc))\n  add_target(m68k m68k-linux-gnu)\nendif()\n\nif(${MACHINE} STREQUAL \"loongarch64\" OR (HAS_qemu-loongarch64 AND HAS_loongarch64-linux-gnu-gcc))\n  add_target(loongarch64 loongarch64-linux-gnu)\nendif()\n"
  },
  {
    "path": "test/abs-error.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = aarch64 ] && skip\n[ $MACHINE = ppc64 ] && skip\n[ $MACHINE = ppc64le ] && skip\n[ $MACHINE = s390x ] && skip\n[[ $MACHINE = loongarch* ]] && skip\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xassembler -\n.globl foo\nfoo = 3;\nEOF\n\ncat <<EOF | $CC -fno-PIC -c -o $t/b.o -xc -\n#include <stdio.h>\nextern char foo;\nint main() { printf(\"foo=%p\\n\", &foo); }\nEOF\n\nnot $CC -B. -o $t/exe -pie $t/a.o $t/b.o -Wl,-z,text |&\n  grep 'recompile with -fPIC'\n"
  },
  {
    "path": "test/absolute-symbols.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# This test crashes only on qemu-sparc64 running on GitHub Actions,\n# even though it works on a local x86-64 machine and on an actual\n# SPARC machine.\n[ $MACHINE = sparc64 ] && skip\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n.globl foo\nfoo = 0xa00008\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -fno-PIC -xc -\n#define _GNU_SOURCE 1\n#include <signal.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <ucontext.h>\n\nvoid handler(int signum, siginfo_t *info, void *ptr) {\n  printf(\"ip=%p\\n\", info->si_addr);\n  exit(0);\n}\n\nextern volatile int foo;\n\nint main() {\n  struct sigaction act;\n  act.sa_flags = SA_SIGINFO | SA_RESETHAND;\n  act.sa_sigaction = handler;\n  sigemptyset(&act.sa_mask);\n  sigaction(SIGSEGV, &act, 0);\n  foo = 5;\n}\nEOF\n\n$CC -B. -o $t/exe -no-pie $t/a.o $t/b.o\n$QEMU $t/exe | grep '^ip=0xa0000.$'\n"
  },
  {
    "path": "test/allow-multiple-definition.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\necho 'int main() { return 0; }' | $CC -c -o $t/a.o -xc -\necho 'int main() { return 1; }' | $CC -c -o $t/b.o -xc -\n\nnot $CC -B. -o $t/exe $t/a.o $t/b.o 2> /dev/null\n$CC -B. -o $t/exe $t/a.o $t/b.o -Wl,-allow-multiple-definition\n$CC -B. -o $t/exe $t/a.o $t/b.o -Wl,-z,muldefs\n"
  },
  {
    "path": "test/ar-alignment.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint two() { return 2; }\nEOF\n\nhead -c 1 /dev/zero >> $t/a.o\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\nint three() { return 3; }\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\n#include <stdio.h>\n\nint two();\nint three();\n\nint main() {\n  printf(\"%d\\n\", two() + three());\n}\nEOF\n\nrm -f $t/d.a\nar rcs $t/d.a $t/a.o $t/b.o\n\n$CC -B. -o $t/exe $t/c.o $t/d.a\n"
  },
  {
    "path": "test/arch-aarch64-long-thunk.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF > $t/a.c\n#include <stdio.h>\n\nvoid fn3();\nvoid fn4();\n\n__attribute__((section(\".low\"))) void fn1() { printf(\" fn1\"); fn3(); }\n__attribute__((section(\".low\"))) void fn2() { printf(\" fn2\"); fn4(); }\n\nint main() {\n  printf(\" main\");\n  fn1();\n  printf(\"\\n\");\n}\nEOF\n\ncat <<EOF > $t/b.c\n#include <stdio.h>\n\nvoid fn1();\nvoid fn2();\n\n__attribute__((section(\".high\"))) void fn3() { printf(\" fn3\"); fn2(); }\n__attribute__((section(\".high\"))) void fn4() { printf(\" fn4\"); }\nEOF\n\n$CC -c -o $t/c.o $t/a.c\n$CC -c -o $t/d.o $t/b.c\n\n$CC -B. -o $t/exe1 $t/c.o $t/d.o \\\n  -Wl,--section-start=.low=0x10000000,--section-start=.high=0x100000000\n$QEMU $t/exe1 | grep 'main fn1 fn3 fn2 fn4'\n\n$CC -B. -o $t/exe2 $t/c.o $t/d.o \\\n  -Wl,--section-start=.high=0x10000000,--section-start=.low=0x100000000\n$QEMU $t/exe2 | grep 'main fn1 fn3 fn2 fn4'\n\n\n$CC -c -o $t/e.o $t/a.c -fno-PIC -mcmodel=large\n$CC -c -o $t/f.o $t/b.c -fno-PIC -mcmodel=large\n\n$CC -B. -o $t/exe3 $t/e.o $t/f.o -pie \\\n  -Wl,--section-start=.low=0x10000000,--section-start=.high=0x400000000\n$QEMU $t/exe3 | grep 'main fn1 fn3 fn2 fn4'\n\n$CC -B. -o $t/exe4 $t/e.o $t/f.o -pie \\\n  -Wl,--section-start=.high=0x10000000,--section-start=.low=0x400000000\n$QEMU $t/exe4 | grep 'main fn1 fn3 fn2 fn4'\n"
  },
  {
    "path": "test/arch-aarch64-range-extension-thunk-disassembly.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -xc -\n#include <stdio.h>\n\nvoid fn1();\nvoid fn2();\n\n__attribute__((section(\".low\")))  void fn1() { fn2(); }\n__attribute__((section(\".high\"))) void fn2() { fn1(); }\n\nint main() {\n  fn1();\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o \\\n  -Wl,--section-start=.low=0x10000000,--section-start=.high=0x20000000\n\n$OBJDUMP -dr $t/exe | grep -E '<fn1\\$thunk[0-9]+>:'\n"
  },
  {
    "path": "test/arch-aarch64-variant-pcs.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -xassembler - 2> /dev/null || skip\n.global foo\n.type foo, %function\n.variant_pcs foo\nfoo:\n  ret\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\nreadelf -W --dyn-syms $t/b.so | grep foo | grep -F '[VARIANT_PCS]'\n\ncat <<EOF | $CC -c -o $t/c.o -xc -\nvoid foo();\nint main() { foo(); }\nEOF\n\n$CC -B. -o $t/exe $t/c.o $t/b.so\nreadelf -W --dynamic $t/exe | grep AARCH64_VARIANT_PCS\n"
  },
  {
    "path": "test/arch-arm-abs-error.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xassembler - -mthumb\n.globl foo\nfoo = 3;\nEOF\n\ncat <<EOF | $CC -fno-PIC -c -o $t/b.o -xc - -mthumb 2> /dev/null || skip\n#include <stdio.h>\nextern char foo;\nint main() { printf(\"foo=%p\\n\", &foo); }\nEOF\n\n$CC -o $t/exe -pie $t/a.o $t/b.o >& /dev/null && skip\n\nnot $CC -B. -o $t/exe -pie $t/a.o $t/b.o |&\n  grep 'recompile with -fPIC'\n"
  },
  {
    "path": "test/arch-arm-exidx-sentinel.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CXX -o $t/a.o -c -xc++ - -fno-PIC\n#include <stdio.h>\nextern char _etext[];\nint main() {\n  printf(\"%p\\n\", _etext);\n}\nEOF\n\n$CXX -B. -o $t/exe $t/a.o -no-pie\nreadelf --unwind $t/exe | grep \"$($QEMU $t/exe) .*cantunwind\"\n"
  },
  {
    "path": "test/arch-arm-range-extension-thunk-disassembly.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -xc -\n#include <stdio.h>\n\nvoid fn1();\nvoid fn2();\n\n__attribute__((section(\".low\")))  void fn1() { fn2(); }\n__attribute__((section(\".high\"))) void fn2() { fn1(); }\n\nint main() {\n  fn1();\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o \\\n  -Wl,--section-start=.low=0x10000000,--section-start=.high=0x20000000\n\n$OBJDUMP -dr $t/exe | grep -E -A7 '<fn1\\$thunk[0-9]+>:' > $t/log\n\ngrep -E 'bx\\s+pc' $t/log\ngrep -E 'add\\s+pc, ip, pc' $t/log\n"
  },
  {
    "path": "test/arch-arm-range-extension-thunk.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -mthumb || skip\n\ncat <<EOF > $t/a.c\n#include <stdio.h>\n\nvoid fn3();\nvoid fn4();\n\n__attribute__((section(\".low\"))) void fn1() { printf(\" fn1\"); fn3(); }\n__attribute__((section(\".low\"))) void fn2() { printf(\" fn2\"); fn4(); }\n\nint main() {\n  printf(\" main\");\n  fn1();\n  printf(\"\\n\");\n}\nEOF\n\ncat <<EOF > $t/b.c\n#include <stdio.h>\n\nvoid fn1();\nvoid fn2();\n\n__attribute__((section(\".high\"))) void fn3() { printf(\" fn3\"); fn2(); }\n__attribute__((section(\".high\"))) void fn4() { printf(\" fn4\"); }\nEOF\n\n$CC -c -o $t/c.o $t/a.c -O0 -mthumb\n$CC -c -o $t/d.o $t/b.c -O0 -marm\n\n$CC -B. -o $t/exe $t/c.o $t/d.o \\\n  -Wl,--section-start=.low=0x10000000,--section-start=.high=0x20000000\n$QEMU $t/exe | grep 'main fn1 fn3 fn2 fn4'\n\n$CC -c -o $t/e.o $t/a.c -O2 -mthumb\n$CC -c -o $t/f.o $t/b.c -O2 -marm\n\n$CC -B. -o $t/exe $t/e.o $t/f.o \\\n  -Wl,--section-start=.low=0x10000000,--section-start=.high=0x20000000\n$QEMU $t/exe | grep 'main fn1 fn3 fn2 fn4'\n"
  },
  {
    "path": "test/arch-arm-target1.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xassembler -\n.globl foo\n.data\nfoo:\n.word bar(TARGET1)\nEOF\n\ncat <<EOF | $CC -fPIC -c -o $t/b.o -xc -\n#include <stdio.h>\nextern char *foo;\nchar bar[] = \"Hello world\";\nint main() { printf(\"%s\\n\", foo); }\nEOF\n\n$CC -B. -o $t/exe -pie $t/a.o $t/b.o\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/arch-arm-thm-jump19.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.syntax unified\n.globl bar\n.thumb\nbar:\n beq foo-2\nEOF\n\n$OBJDUMP -d $t/a.o | grep -E 'beq\\.w' || skip\n\ncat <<EOF | $CC -o $t/b.o -c -xassembler -\n.globl foo, baz\n.thumb\nbaz:\n nop\nfoo:\n nop\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\nvoid bar();\nint main() { bar(); }\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o $t/c.o\n$OBJDUMP -d $t/exe | grep -E 'beq\\.w.*<baz>'\n"
  },
  {
    "path": "test/arch-arm-thm-jump8.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.syntax unified\n.globl bar\n.thumb\nbar:\n beq foo-2\nEOF\n\n$OBJDUMP -d $t/a.o | grep -E 'beq\\.n' || skip\n\ncat <<EOF | $CC -o $t/b.o -c -xassembler -\n.globl foo, baz\n.thumb\nbaz:\n nop\nfoo:\n nop\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\nvoid bar();\nint main() { bar(); }\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o $t/c.o\n$OBJDUMP -d $t/exe | grep -E 'beq\\.n.*<baz>'\n"
  },
  {
    "path": "test/arch-arm-thumb-interwork.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -mthumb || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -mthumb\n#include <stdio.h>\nint bar();\nint foo() {\n  printf(\" foo\");\n  bar();\n}\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -marm\n#include <stdio.h>\nint bar() {\n  printf(\" bar\\n\");\n}\n\nint foo();\n\nint main() {\n  printf(\"main\");\n  foo();\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o\n$QEMU $t/exe | grep 'main foo bar'\n"
  },
  {
    "path": "test/arch-arm-tlsdesc.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nis_musl && skip\ntest_cflags -mthumb || skip\n\ncat <<EOF > $t/a.c\nextern _Thread_local int foo;\n\n__attribute__((section(\".low\")))\nint get_foo() {\n  int y = foo;\n  return y;\n}\n\nstatic _Thread_local int bar = 5;\n\n__attribute__((section(\".high\")))\nint get_bar() {\n  return bar;\n}\nEOF\n\ncat <<EOF > $t/b.c\n#include <stdio.h>\n\n_Thread_local int foo;\n\nint get_foo();\nint get_bar();\n\nint main() {\n  foo = 42;\n  printf(\"%d %d\\n\", get_foo(), get_bar());\n  return 0;\n}\nEOF\n\n$GCC -fPIC -mtls-dialect=gnu2 -c -o $t/c.o $t/a.c -marm\n$GCC -fPIC -mtls-dialect=gnu2 -c -o $t/d.o $t/b.c -marm\n\n$CC -B. -o $t/exe1 $t/c.o $t/d.o\n$QEMU $t/exe1 | grep '42 5'\n\n$CC -B. -o $t/exe2 $t/c.o $t/d.o -Wl,-no-relax\n$QEMU $t/exe2 | grep '42 5'\n\n$CC -B. -o $t/exe3 $t/c.o $t/d.o -Wl,-no-relax \\\n  -Wl,--section-start=.low=0x10000000,--section-start=.high=0x20000000\n$QEMU $t/exe3 | grep '42 5'\n\n$GCC -B. -shared -o $t/c.so $t/c.o -Wl,-z,nodlopen\n$CC -B. -o $t/exe4 $t/c.so $t/d.o\n$QEMU $t/exe4 | grep '42 5'\n\n\n$GCC -fPIC -mtls-dialect=gnu2 -c -o $t/e.o $t/a.c -mthumb\n$GCC -fPIC -mtls-dialect=gnu2 -c -o $t/f.o $t/b.c -mthumb\n\n$CC -B. -o $t/exe5 $t/e.o $t/f.o\n$QEMU $t/exe5 | grep '42 5'\n\n$CC -B. -o $t/exe6 $t/e.o $t/f.o -Wl,-no-relax\n$QEMU $t/exe6 | grep '42 5'\n\n$CC -B. -o $t/exe7 $t/e.o $t/f.o -Wl,-no-relax \\\n  -Wl,--section-start=.low=0x10000000,--section-start=.high=0x20000000\n$QEMU $t/exe7 | grep '42 5'\n\n$GCC -B. -shared -o $t/e.so $t/e.o -Wl,-z,nodlopen\n$CC -B. -o $t/exe8 $t/e.so $t/f.o\n$QEMU $t/exe8 | grep '42 5'\n"
  },
  {
    "path": "test/arch-armeb-be32.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint main() {}\nEOF\n\nnot $CC -B. -o $t/exe $t/a.o -mbe32 |& grep 'be32 is not supported'\n"
  },
  {
    "path": "test/arch-i686-tls-module-base.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -fPIC -o $t/a.o -c -xassembler -\n.globl get_foo\n.type get_foo, @function\nget_foo:\n  push %ebx\n  call __x86.get_pc_thunk.bx\n1:\n  addl $_GLOBAL_OFFSET_TABLE_ - 1b, %ebx\n  lea _TLS_MODULE_BASE_@TLSDESC(%ebx), %eax\n  call *_TLS_MODULE_BASE_@TLSCALL(%eax)\n  lea foo@dtpoff(%eax), %eax\n  mov %gs:(%eax), %eax\n  pop %ebx\n  ret\n.section .tdata, \"awT\", @progbits\nfoo:\n.long 20\n.section .note.GNU-stack, \"\", @progbits\nEOF\n\ncat <<EOF | $CC -fPIC -o $t/b.o -c -xc -\n_Thread_local int bar = 3;\nEOF\n\ncat <<EOF | $CC -fPIC -o $t/c.o -c -xc -\n#include <stdio.h>\n\nint get_foo();\nextern _Thread_local int bar;\n\nint main() {\n  printf(\"%d %d\\n\", get_foo(), bar);\n}\nEOF\n\n$CC -o $t/exe1 $t/a.o $t/b.o $t/c.o -pie\n$QEMU $t/exe1 | grep '^20 3$'\n\n$CC -o $t/exe2 $t/a.o $t/b.o $t/c.o -Wl,-no-relax -pie\n$QEMU $t/exe2 | grep '^20 3$'\n\n$CC -o $t/d.so $t/a.o -shared\n$CC -o $t/exe3 $t/b.o $t/c.o $t/d.so -pie\n$QEMU $t/exe3 | grep '^20 3$'\n"
  },
  {
    "path": "test/arch-i686-tlsdesc.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_tlsdesc || skip\n\ncat <<'EOF' | $GCC -c -o $t/a.o -xassembler -\n.globl  get_foo\n.type   get_foo, @function\nget_foo:\n  pushl   %ebx\n  call    __x86.get_pc_thunk.bx\n  addl    $_GLOBAL_OFFSET_TABLE_, %ebx\n  subl    $8, %esp\n  leal    foo@TLSDESC(%ebx), %ebx\n  movl    %ebx, %eax\n  call    *foo@TLSCALL(%eax)\n  movl    %gs:(%eax), %eax\n  addl    $8, %esp\n  popl    %ebx\n  ret\nEOF\n\ncat <<EOF | $GCC -fPIC -c -o $t/b.o -xc - $tlsdesc_opt\n#include <stdio.h>\n\n_Thread_local int foo;\n\nint get_foo();\n\nint main() {\n  foo = 42;\n  printf(\"%d\\n\", get_foo());\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o\n$QEMU $t/exe1 | grep 42\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o -Wl,-no-relax\n$QEMU $t/exe2 | grep 42\n\n$CC -B. -shared -o $t/c.so $t/a.o\n$CC -B. -o $t/exe3 $t/b.o $t/c.so\n$QEMU $t/exe3 | grep 42\n\n$CC -B. -shared -o $t/c.so $t/a.o -Wl,-no-relax\n$CC -B. -o $t/exe4 $t/b.o $t/c.so -Wl,-no-relax\n$QEMU $t/exe4 | grep 42\n"
  },
  {
    "path": "test/arch-loongarch64-mcmodel-extreme.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -mcmodel=extreme\n#include <stdio.h>\nchar msg[] = \"Hello world\\n\";\nint main() { printf(msg); }\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o\n$QEMU $t/exe1 | grep 'Hello world'\n"
  },
  {
    "path": "test/arch-loongarch64-relax-call36.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -o $t/a.o -c -xassembler -\n.globl foo, bar\n.space 0x100000\nfoo:\n  move      $s0,   $ra\n  .reloc ., R_LARCH_CALL36, print\n  .reloc ., R_LARCH_RELAX\n  pcaddu18i $t0,   0\n  jirl      $ra,   $t0, 0\n  move      $ra,   $s0\n  ret\nbar:\n  .reloc ., R_LARCH_CALL36, print\n  .reloc ., R_LARCH_RELAX\n  pcaddu18i $t0,   0\n  jirl      $zero, $t0, 0\n.space 0x100000\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\n#include <stdio.h>\n\nvoid foo();\nvoid bar();\n\nvoid print() {\n  printf(\"foo\");\n}\n\nint main() {\n  foo();\n  bar();\n  printf(\"\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o -Wl,--no-relax\n$QEMU $t/exe1 | grep foofoo\n\n$OBJDUMP -d $t/exe1 > $t/exe1.objdump\ngrep -A2 '<foo>:' $t/exe1.objdump | grep -w pcaddu18i\ngrep -A2 '<bar>:' $t/exe1.objdump | grep -w pcaddu18i\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o -Wl,--relax\n$QEMU $t/exe2 | grep foofoo\n\n$OBJDUMP -d $t/exe2 > $t/exe2.objdump\ngrep -A2 '<foo>:' $t/exe2.objdump | grep -w bl\ngrep -A2 '<bar>:' $t/exe2.objdump | grep -w b\n"
  },
  {
    "path": "test/arch-loongarch64-relax-got-load.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\nint foo = 3;\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -fPIC -O\nextern int foo;\nint get_foo() { return foo; }\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc - -fPIC\n#include <stdio.h>\nint get_foo();\nint main() { printf(\"%d\\n\", get_foo()); }\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o $t/c.o -pie -Wl,--no-relax\n$QEMU $t/exe1 | grep '^3$'\n$OBJDUMP -d $t/exe1 | grep -A2 '<get_foo>:' | grep -Fw pcalau12i\n$OBJDUMP -d $t/exe1 | grep -A2 '<get_foo>:' | grep -Fw ld.d\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o $t/c.o -pie -Wl,--relax\n$QEMU $t/exe2 | grep '^3$'\n$OBJDUMP -d $t/exe2 | grep -A1 '<get_foo>:' | grep -Fw pcaddi\n\n$CC -B. -o $t/exe3 $t/a.o $t/b.o $t/c.o -pie -Wl,--relax \\\n  -Wl,-Ttext=0x1000000,-Tdata=0x2000000\n\n$QEMU $t/exe3 | grep '^3$'\n$OBJDUMP -d $t/exe3 | grep -A2 '<get_foo>:' | grep -Fw pcalau12i\n$OBJDUMP -d $t/exe3 | grep -A2 '<get_foo>:' | grep -Fw addi.d\n"
  },
  {
    "path": "test/arch-loongarch64-relax-pcala-addi.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -o $t/a.o -c -xassembler -\n.globl get_sym1, get_sym2, get_sym3\nget_sym1:\n  la.pcrel $a0, sym1\n  ret\nget_sym2:\n  la.pcrel $a0, sym2\n  ret\nget_sym3:\n  la.pcrel $a0, sym3\n  ret\nEOF\n\ncat <<'EOF' | $CC -o $t/b.o -c -xassembler -\n.globl sym1, sym2, sym3\nsym1:\n  li.d $a0, 1\n  ret\n.space 1024 * 1024\nsym2:\n  li.d $a0, 2\n  ret\n.space 1024 * 1024\nsym3:\n  li.d $a0, 3\n  ret\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\n#include <stdio.h>\n\nint (*get_sym1())();\nint (*get_sym2())();\nint (*get_sym3())();\n\nint main() {\n  printf(\"%d %d %d\\n\", get_sym1()(), get_sym2()(), get_sym3()());\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o $t/c.o -Wl,--no-relax\n$QEMU $t/exe1 | grep '^1 2 3$'\n\n$OBJDUMP -d $t/exe1 > $t/exe1.objdump\ngrep -A1 '<get_sym1>:' $t/exe1.objdump | grep pcalau12i\ngrep -A1 '<get_sym2>:' $t/exe1.objdump | grep pcalau12i\ngrep -A1 '<get_sym3>:' $t/exe1.objdump | grep pcalau12i\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o $t/c.o -Wl,--relax\n$QEMU $t/exe2 | grep '^1 2 3$'\n\n$OBJDUMP -d $t/exe2 > $t/exe2.objdump\ngrep -A1 '<get_sym1>:' $t/exe2.objdump | grep pcaddi\ngrep -A1 '<get_sym2>:' $t/exe2.objdump | grep pcaddi\ngrep -A1 '<get_sym3>:' $t/exe2.objdump | grep pcalau12i\n"
  },
  {
    "path": "test/arch-loongarch64-relax-tlsdesc.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -o $t/a.o -c -xc - -fPIC\n_Thread_local char foo[4] = \"foo\";\n_Thread_local char padding[100000] = \"padding\";\nEOF\n\ncat <<'EOF' | $CC -o $t/b.o -c -xc - -fPIC\n_Thread_local char bar[4] = \"bar\";\nEOF\n\ncat <<'EOF' | $CC -o $t/c.o -c -xc - -fPIC -mtls-dialect=desc -O2\nextern _Thread_local char foo[4];\nextern _Thread_local char bar[4];\n\nchar *get_foo() { return foo; }\nchar *get_bar() { return bar; }\nEOF\n\ncat <<EOF | $CC -o $t/d.o -c -xc - -mtls-dialect=desc\n#include <stdio.h>\nchar *get_foo();\nchar *get_bar();\n\nint main() {\n  printf(\"%s %s\\n\", get_foo(), get_bar());\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o $t/c.o $t/d.o -Wl,--no-relax\n{ $QEMU $t/exe1; true; } |& grep 'unexpected reloc type' && skip\n$QEMU $t/exe1 | grep 'foo bar'\n\n$OBJDUMP -d $t/exe1 > $t/exe1.objdump\ngrep -A6 '<get_foo>:' $t/exe1.objdump | grep -F pcalau12i\ngrep -A6 '<get_bar>:' $t/exe1.objdump | grep -F pcalau12i\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o $t/c.o $t/d.o -Wl,--relax\n$QEMU $t/exe2 | grep 'foo bar'\n\n$OBJDUMP -d $t/exe2 > $t/exe2.objdump\ngrep -A6 '<get_foo>:' $t/exe2.objdump | grep -F li.w\ngrep -A6 '<get_bar>:' $t/exe2.objdump | grep -F lu12i.w\n"
  },
  {
    "path": "test/arch-ppc64le-save-restore-gprs.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o\n$OBJDUMP -d $t/exe | grep '<_savegpr0_14>'\n"
  },
  {
    "path": "test/arch-riscv64-attributes.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -march=rv64imafd_xtheadba1p5 -o $t/a.o -c -xc -\nvoid foo() {}\nEOF\n\n# The compiler might not create .riscv.attributes\nreadelf --sections $t/a.o | grep -F .riscv.attributes || skip\n\ncat <<EOF | $CC -march=rv64imafd_xtheadba2p0 -o $t/b.o -c -xc -\nvoid bar() {}\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\nvoid _start() {}\nEOF\n\n$CC -B. -nostdlib -o $t/exe $t/a.o $t/c.o\nreadelf -A $t/exe | grep '_xtheadba1p5\"'\n\n$CC -B. -nostdlib -o $t/exe $t/a.o $t/b.o $t/c.o\nreadelf -A $t/exe | grep '_xtheadba2p0\"'\n"
  },
  {
    "path": "test/arch-riscv64-attributes2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid _start() {}\nEOF\n\n$STRIP --remove-section=.riscv.attributes $t/a.o\n\n$CC -B. -nostdlib -o $t/exe $t/a.o\n\nreadelf -W --segments --sections $t/exe > $t/log\nnot grep -F .riscv.attributes $t/log\nnot grep -F RISCV_ATTR $t/log\n"
  },
  {
    "path": "test/arch-riscv64-global-pointer-dso.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.globl __global_pointer$\n__global_pointer$ = 0x1000\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\n\ncat <<EOF | $CC -o $t/c.o -c -xassembler - -O2\n.globl get_global_pointer\nget_global_pointer:\n  la a0, __global_pointer$\n  ret\nEOF\n\ncat <<EOF | $CC -o $t/d.o -c -xc -\n#include <stdio.h>\n\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/b.so $t/c.o $t/d.o\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/arch-riscv64-global-pointer.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -fno-PIE\nreadelf -W --dyn-syms $t/exe1 | grep -F '__global_pointer$'\n\n$CC -B. -o $t/exe2 $t/a.o -fPIE\nreadelf -W --dyn-syms $t/exe2 | grep -F '__global_pointer$'\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -fPIC\n#include <stdio.h>\nint hello() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/c.so $t/b.o -shared\nreadelf -W --dyn-syms $t/c.so | not grep -F '__global_pointer$'\n"
  },
  {
    "path": "test/arch-riscv64-obj-compatible.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nset -x\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid foo() {}\nEOF\n\n# Set `e_flags` to zero to simulate ABI incompatibility\ndd if=/dev/zero of=$t/a.o bs=4 oflag=seek_bytes seek=48 count=1 conv=notrunc\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\nvoid foo();\nint main() {\n  foo();\n  return 0;\n}\nEOF\n\nnot $CC -B. -o $t/exe $t/a.o $t/b.o |&\n  grep 'cannot link object files with different floating-point ABI'\n"
  },
  {
    "path": "test/arch-riscv64-relax-align.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.globl x1\n.text\n.p2align 5\nx1:\n  ret\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xassembler -\n.globl x2\n.text\n.p2align 5\nx2:\n  ret\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\n#include <stdio.h>\n#include <stdint.h>\nextern char x1, x2;\nint main() {\n  printf(\"%lu %lu %lu\\n\",\n         (uintptr_t)&x1 % 32,\n         (uintptr_t)&x2 % 32,\n         &x2 - &x1);\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o $t/c.o\n$QEMU $t/exe | grep '0 0 32'\n"
  },
  {
    "path": "test/arch-riscv64-relax-got.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.globl get_sym1, get_sym2, get_sym3, get_sym4, get_sym5\n.option norvc\nget_sym1:\n  .reloc ., R_RISCV_GOT_HI20, sym1\n  .reloc ., R_RISCV_RELAX\n  auipc a0, 0\n  .reloc ., R_RISCV_PCREL_LO12_I, get_sym1\n  .reloc ., R_RISCV_RELAX\n  ld a0, 0(a0)\n  ret\nget_sym2:\n  .reloc ., R_RISCV_GOT_HI20, sym2\n  .reloc ., R_RISCV_RELAX\n  auipc a0, 0\n  .reloc ., R_RISCV_PCREL_LO12_I, get_sym2\n  .reloc ., R_RISCV_RELAX\n  ld a0, 0(a0)\n  ret\nget_sym3:\n  .reloc ., R_RISCV_GOT_HI20, sym3\n  .reloc ., R_RISCV_RELAX\n  auipc a0, 0\n  .reloc ., R_RISCV_PCREL_LO12_I, get_sym3\n  .reloc ., R_RISCV_RELAX\n  ld a0, 0(a0)\n  ret\nget_sym4:\n  .reloc ., R_RISCV_GOT_HI20, sym4\n  .reloc ., R_RISCV_RELAX\n  auipc a0, 0\n  .reloc ., R_RISCV_PCREL_LO12_I, get_sym4\n  .reloc ., R_RISCV_RELAX\n  ld a0, 0(a0)\n  ret\nget_sym5:\n  .reloc ., R_RISCV_GOT_HI20, sym5\n  .reloc ., R_RISCV_RELAX\n  auipc a0, 0\n  .reloc ., R_RISCV_PCREL_LO12_I, get_sym5\n  .reloc ., R_RISCV_RELAX\n  ld a0, 0(a0)\n  ret\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xassembler -\n.globl sym1, sym2, sym3, sym4, sym5\nsym1 = 0x0\nsym2 = 0xba\nsym3 = 0xbeef\nsym4 = 0x11beef\nsym5 = 0xdeadbeef\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\n#include <stdio.h>\n\nint get_sym1();\nint get_sym2();\nint get_sym3();\nint get_sym4();\nint get_sym5();\n\nint main() {\n  printf(\"%x %x %x %x %x\\n\",\n         get_sym1(), get_sym2(), get_sym3(), get_sym4(), get_sym5());\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o $t/c.o -Wl,--no-relax\n$QEMU $t/exe1 | grep -E '^0 ba beef 11beef deadbeef$'\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o $t/c.o\n$QEMU $t/exe2 | grep -E '^0 ba beef 11beef deadbeef$'\n\n$OBJDUMP -d $t/exe2 | grep -A2 '<get_sym2>:' | grep -E $'li[ \\t]+a0,186$'\n"
  },
  {
    "path": "test/arch-riscv64-relax-hi20.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.globl get_foo, get_foo2, get_bar, get_bar2, get_baz\nget_foo:\n  lui a0, %hi(foo)\n  add a0, a0, %lo(foo)\n  ret\n.size get_foo, .-get_foo\nget_foo2:\n  lui a0, %hi(foo+0x10000000)\n  add a0, a0, %lo(foo)\n  ret\n.size get_foo2, .-get_foo2\nget_bar:\n  lui a0, %hi(bar)\n  add a0, a0, %lo(bar)\n  ret\n.size get_bar, .-get_bar\nget_bar2:\n  lui a0, %hi(bar+0x1ffff)\n  add a0, a0, %lo(bar+0x1ffff)\n  ret\n.size get_bar2, .-get_bar2\nget_baz:\n  lui a0, %hi(baz)\n  add a0, a0, %lo(baz)\n  ret\n.size get_baz, .-get_baz\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xassembler -\n.globl foo, bar, baz\nfoo = 0xf00\nbar = 0\nbaz = 0x11beef\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\n#include <stdio.h>\n\nint get_foo();\nint get_foo2();\nint get_bar();\nint get_bar2();\nint get_baz();\n\nint main() {\n  printf(\"%x %x %x %x %x\\n\",\n         get_foo(), get_foo2(), get_bar(), get_bar2(), get_baz());\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o $t/c.o -Wl,--no-relax\n$QEMU $t/exe1 | grep 'f00 10000f00 0 1ffff 11beef'\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o $t/c.o\n$QEMU $t/exe2 | grep 'f00 10000f00 0 1ffff 11beef'\n\nreadelf --syms $t/exe1 > $t/log1\ngrep -E ' 10 NOTYPE .* get_foo$' $t/log1\ngrep -E ' 10 NOTYPE .* get_foo2$' $t/log1\ngrep -E ' 10 NOTYPE .* get_bar$' $t/log1\ngrep -E ' 10 NOTYPE .* get_bar2$' $t/log1\ngrep -E ' 10 NOTYPE .* get_baz$' $t/log1\n\nreadelf --syms $t/exe2 > $t/log2\ngrep -E ' 8 NOTYPE .* get_foo$' $t/log2\ngrep -E ' 10 NOTYPE .* get_foo2$' $t/log2\ngrep -E ' 6 NOTYPE .* get_bar$' $t/log2\ngrep -E ' 10 NOTYPE .* get_bar2$' $t/log2\ngrep -E ' 10 NOTYPE .* get_baz$' $t/log2\n"
  },
  {
    "path": "test/arch-riscv64-relax-j.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -O2 -march=rv64g\nvoid g() {}\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -O2 -march=rv64g\nvoid g();\nvoid f() { g(); }\nint main() { f(); }\nEOF\n\n$CC -B. -march=rv64g -o $t/exe1 $t/a.o $t/b.o\n$QEMU $t/exe1\n$OBJDUMP -d $t/exe1 | grep -E '\\bj\\b.*<g>'\n\n\ncat <<EOF | $CC -o $t/c.o -c -xc - -O2 -march=rv64gc\nvoid g() {}\nEOF\n\ncat <<EOF | $CC -o $t/d.o -c -xc - -O2 -march=rv64gc\nvoid g();\nvoid f() { g(); }\nint main() { f(); }\nEOF\n\n$CC -B. -march=rv64g -o $t/exe2 $t/c.o $t/d.o\n$QEMU $t/exe2\n$OBJDUMP -d $t/exe2 | grep -E '\\bj\\b.*<g>'\n"
  },
  {
    "path": "test/arch-riscv64-reloc-overflow.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n.section .foo, \"ax\"\nfoo:\n  call bar\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -x assembler -\n.globl bar\n.section .bar, \"ax\"\nbar:\n  ret\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o $t/c.o -Wl,--section-start=.foo=0x10000 \\\n  -Wl,--section-start=.bar=0x8000f000\n\nnot $CC -B. -o $t/exe2 $t/a.o $t/b.o $t/c.o -Wl,--section-start=.foo=0x10000 \\\n  -Wl,--section-start=.bar=0x8000f800 |&\n  grep -F 'relocation R_RISCV_CALL_PLT against bar out of range'\n"
  },
  {
    "path": "test/arch-riscv64-symbol-size.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.globl get_foo, get_bar\n.type get_foo @function\nget_foo:\n  lui a0, %hi(foo)\n  add a0, a0, %lo(foo)\n  ret\n.size get_foo, .-get_foo\n\n.type get_bar @function\nget_bar:\n  lui a0, %hi(bar)\n  add a0, a0, %lo(bar)\n  ret\n.size get_bar, .-get_bar\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xassembler -\n.globl foo, bar\nfoo = 0xf00\nbar = 0xf00\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\n#include <stdio.h>\nint get_foo();\nint get_bar();\nint main() { printf(\"%x %x\\n\", get_foo(), get_bar()); }\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o $t/c.o\n\nreadelf --syms $t/a.o | grep -E ' 10 FUNC .* get_foo$'\nreadelf --syms $t/a.o | grep -E ' 10 FUNC .* get_bar$'\n\nreadelf --syms $t/exe | grep -E ' 8 FUNC .* get_foo$'\nreadelf --syms $t/exe | grep -E ' 8 FUNC .* get_bar$'\n"
  },
  {
    "path": "test/arch-riscv64-variant-cc.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -xassembler - 2> /dev/null || skip\n.global foo\n.type foo, %function\n.variant_cc foo\nfoo:\n  ret\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\nreadelf -W --dyn-syms $t/b.so | grep foo | grep -F '[VARIANT_CC]'\n\ncat <<EOF | $CC -c -o $t/c.o -xc -\nvoid foo();\nint main() { foo(); }\nEOF\n\n$CC -B. -o $t/exe $t/c.o $t/b.so\nreadelf -W --dynamic $t/exe | grep RISCV_VARIANT_CC\n"
  },
  {
    "path": "test/arch-riscv64-weak-undef.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -static || skip\n\ncat <<EOF | $CC -c -o $t/a.o -xassembler -\n.globl foo\n.weak bar\nfoo:\n  la a0, bar\n  ret\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -xc -\n#include <stdio.h>\nlong foo();\nint main() { printf(\"%ld\\n\", foo()); }\nEOF\n\n$CC -B. -static -o $t/exe $t/a.o $t/b.o\n$QEMU $t/exe | grep '^0$'\n"
  },
  {
    "path": "test/arch-s390x-got.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# GOT[0] must be set to the link-time address of .dynamic on s390x.\n\ncat <<EOF | $CC -c -fPIC -o $t/a.o -xc -\n#include <stdio.h>\n\nextern char _DYNAMIC;\nextern void *got[];\n\nint main() {\n  printf(\"%d %p %p\\n\", &_DYNAMIC == got[0], &_DYNAMIC, got[0]);\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,-defsym=got=_GLOBAL_OFFSET_TABLE_ -no-pie\n$QEMU $t/exe | grep -E '^1'\n"
  },
  {
    "path": "test/arch-x86_64-address-equality.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.globl foo\nfoo:\n  lea bar(%rip), %rax\n  ret\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -fPIC\n#include <stdio.h>\nvoid *foo();\nvoid bar();\nint main() { printf(\"%d %p %p\\n\", foo() == bar, foo(), bar); }\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc - -fPIC\nvoid bar() {}\nEOF\n\n$CC -B. -shared -o $t/d.so $t/c.o\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o $t/d.so -pie\n$QEMU $t/exe1 | grep '^1 '\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o $t/d.so -pie -Wl,-no-relax\n$QEMU $t/exe2 | grep '^1 '\n"
  },
  {
    "path": "test/arch-x86_64-apx-gotpcrelx.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# We use Intel SDE to run programs compiled for APX\ncommand -v sde64 >& /dev/null || skip\n{ sde64 -help; true; } | grep 'Diamond Rapids' || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler - || skip\n.globl get_foo_addr\nget_foo_addr:\n  mov foo@GOTPCREL(%rip), %r16\n  mov %r16, %rax\n  ret\nEOF\n\n$OBJDUMP -r $t/a.o | grep -w R_X86_64_CODE_4_GOTPCRELX\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -fPIC\nvoid foo() {}\nEOF\n\n$CC -B. -o $t/c.so -shared $t/b.o\n\ncat <<EOF | $CC -o $t/d.o -c -xc -\n#include <stdio.h>\n\nvoid foo();\nvoid *get_foo_addr();\n\nint main() {\n  printf(\"%d %p %p\\n\", foo == get_foo_addr(), foo, get_foo_addr());\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o $t/d.o\nsde64 -dmr -- $t/exe1 | grep -E '^1 '\n$OBJDUMP -d $t/exe1 | grep -A1 '<get_foo_addr>:' | grep -w lea\n\n$CC -B. -o $t/exe2 $t/a.o $t/c.so $t/d.o\nsde64 -dmr -- $t/exe2 | grep -E '^1 '\n$OBJDUMP -d $t/exe2 | grep -A1 '<get_foo_addr>:' | grep -w mov\n"
  },
  {
    "path": "test/arch-x86_64-apx-gottpoff.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# We use Intel SDE to run programs compiled for APX\ncommand -v sde64 >& /dev/null || skip\n{ sde64 -help; true; } | grep 'Diamond Rapids' || skip\n\ncat <<'EOF' | $CC -o $t/a.o -c -xassembler - || skip\n.globl get_foo\nget_foo:\n  mov foo@gottpoff(%rip), %r16\n  mov %fs:(%r16), %eax\n  ret\nEOF\n\n$OBJDUMP -r $t/a.o | grep -w R_X86_64_CODE_4_GOTTPOFF\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\n#include <stdio.h>\n\n_Thread_local int foo = 3;\nint get_foo();\n\nint main() {\n  printf(\"%d %d\\n\", foo, get_foo());\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o\nsde64 -dmr -- $t/exe1 | grep -E '^3 3$'\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o -Wl,-no-relax\nsde64 -dmr -- $t/exe2 | grep -E '^3 3$'\n"
  },
  {
    "path": "test/arch-x86_64-apx-gottpoff2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# We use Intel SDE to run programs compiled for APX\ncommand -v sde64 >& /dev/null || skip\n{ sde64 -help; true; } | grep 'Diamond Rapids' || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler - || skip\n.globl get_foo\nget_foo:\n  mov %fs:0, %rax\n  addq foo@gottpoff(%rip), %rax, %rax\n  mov (%rax), %eax\n  ret\nEOF\n\n$OBJDUMP -r $t/a.o | grep -w R_X86_64_CODE_6_GOTTPOFF\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\n#include <stdio.h>\n\n_Thread_local int foo = 3;\nint get_foo();\n\nint main() {\n  printf(\"%d %d\\n\", foo, get_foo());\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o\nsde64 -dmr -- $t/exe1 | grep -E '^3 3$'\n"
  },
  {
    "path": "test/arch-x86_64-apx-tlsdesc.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_tlsdesc || skip\n\n# We use Intel SDE to run programs compiled for APX\ncommand -v sde64 >& /dev/null || skip\n{ sde64 -help; true; } | grep 'Diamond Rapids' || skip\n\ncat <<EOF | $GCC -c -o $t/a.o -xassembler - || skip\n.globl  get_foo\n.type   get_foo, @function\nget_foo:\n  pushq   %rbp\n  movq    %rsp, %rbp\n  leaq    foo@TLSDESC(%rip), %r16\n  movq    %r16, %rax\n  call    *foo@TLSCALL(%rax)\n  movq    %fs:0, %rdx\n  addq    %rdx, %rax\n  movl    (%rax), %eax\n  popq    %rbp\n  ret\nEOF\n\n$OBJDUMP -r $t/a.o | grep -w R_X86_64_CODE_4_GOTPC32_TLSDESC\n\ncat <<EOF | $GCC -fPIC -c -o $t/b.o -xc - $tlsdesc_opt\n#include <stdio.h>\n\n_Thread_local int foo;\n\nint get_foo();\n\nint main() {\n  foo = 42;\n  printf(\"%d\\n\", get_foo());\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o\nsde64 -dmr -- $t/exe1 | grep 42\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o -Wl,-no-relax\nsde64 -dmr -- $t/exe2 | grep 42\n\n$CC -shared -o $t/c.so $t/a.o\n$CC -B. -o $t/exe3 $t/b.o $t/c.so\nsde64 -dmr -- $t/exe3 | grep 42\n\n$CC -shared -o $t/c.so $t/a.o -Wl,-no-relax\n$CC -B. -o $t/exe4 $t/b.o $t/c.so -Wl,-no-relax\nsde64 -dmr -- $t/exe4 | grep 42\n"
  },
  {
    "path": "test/arch-x86_64-empty-arg.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nnm -D mold | grep __msan_init && skip\n\nnot ./mold -m elf_x86_64 '' |& grep 'cannot open :'\n"
  },
  {
    "path": "test/arch-x86_64-empty-mergeable-section.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.section .rodata.str1.1, \"aMS\", @progbits, 1\n.section .rodata.foo, \"aMS\", @progbits, 1\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xassembler -\n.section .rodata.str1.1, \"aMS\", @progbits, 1\n.string \"foo\"\n.string \"bar\"\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o $t/c.o\n$t/exe\n\nreadelf -SW $t/exe > $t/log\ngrep '.rodata.str1.1 .* AMS ' $t/log\nnot grep '.rodata.str1.1 .* AM ' $t/log\n"
  },
  {
    "path": "test/arch-x86_64-emulation-deduction.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid _start() {}\nEOF\n\n./mold -o $t/exe $t/a.o\nreadelf --file-header $t/exe | grep -i x86-64\n"
  },
  {
    "path": "test/arch-x86_64-exception-mcmodel-large.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CXX -c -o $t/a.o -xc++ -fPIC -\nint main() {\n  try {\n    throw 0;\n  } catch (int x) {\n    return x;\n  }\n  return 1;\n}\nEOF\n\n$CXX -B. -o $t/exe $t/a.o -mcmodel=large\n$QEMU $t/exe\n\nif test_cxxflags -static; then\n  $CXX -B. -o $t/exe $t/a.o -static -mcmodel=large\n  $QEMU $t/exe\nfi\n"
  },
  {
    "path": "test/arch-x86_64-execstack-if-needed.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -xassembler -o $t/a.o -\n.globl main\nmain:\n  ret\n.section .note.GNU-stack, \"x\", @progbits\nEOF\n\n$CC -B. -o $t/exe $t/a.o >& /dev/null\nreadelf --segments -W $t/exe | grep 'GNU_STACK.* RW '\n\n$CC -B. -o $t/exe $t/a.o -Wl,-z,execstack-if-needed\nreadelf --segments -W $t/exe | grep 'GNU_STACK.* RWE '\n"
  },
  {
    "path": "test/arch-x86_64-function-multiversion.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_ifunc || skip\n[ \"$(uname)\" = FreeBSD ] && skip\n\ncat <<EOF | $GXX -o $t/a.o -c -xc++ - -fPIC\n#include <iostream>\n\nclass Hello {\npublic:\n  __attribute__((target(\"default\"))) void say() { std::cout << \"Hello\\n\"; }\n  __attribute__((target(\"popcnt\")))  void say() { std::cout << \"Howdy\\n\"; }\n};\n\nvoid hello() {\n  Hello().say();\n}\nEOF\n\n$CXX -B. -shared -o $t/b.so $t/a.o\n\ncat <<EOF | $CXX -o $t/c.o -c -xc++ - -fPIC\nvoid hello();\nint main() { hello(); }\nEOF\n\n$CXX -B. -o $t/exe $t/b.so $t/c.o\n$QEMU $t/exe | grep '^H'\n"
  },
  {
    "path": "test/arch-x86_64-gnu-linkonce.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n.globl __x86.get_pc_thunk.bx\n.section .gnu.linkonce.t.__x86.get_pc_thunk.bx,\"ax\"\n__x86.get_pc_thunk.bx:\n  call printf@PLT\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -x assembler -\n.globl __x86.get_pc_thunk.bx\n.section .text.__x86.get_pc_thunk.bx,\"axG\",@progbits,foobar,comdat\n__x86.get_pc_thunk.bx:\n  call puts@PLT\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o $t/c.o\n$OBJDUMP -d $t/exe >& /dev/null || skip\n$OBJDUMP -d $t/exe | grep -A1 '<__x86.get_pc_thunk.bx>:' |\n  grep -F 'puts$plt'\n"
  },
  {
    "path": "test/arch-x86_64-gnu-retain.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\necho '.section foo,\"R\"' | $CC -o /dev/null -c -xassembler - 2> /dev/null || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint main() {}\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xassembler -\n.section .text.foo, \"aR\", @progbits\n.globl foo\nfoo:\n  ret\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xassembler -\n.section .text.foo, \"a\", @progbits\n.globl foo\nfoo:\n  ret\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o -Wl,-gc-sections\nnm $t/exe1 | grep foo\n\n$CC -B. -o $t/exe1 $t/a.o $t/c.o -Wl,-gc-sections\nnm $t/exe1 | not grep foo\n"
  },
  {
    "path": "test/arch-x86_64-gotpcrelx.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\nchar foo[4000L * 1000 * 1000];\nchar bar[1000 * 1000];\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -fPIC\n#include <stdio.h>\n\nextern char foo[5000L * 1000 * 1000];\nextern char bar[1000 * 1000];\n\nint main() {\n  printf(\"%d %d\\n\", foo[0], bar[0]);\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o\n\n$QEMU $t/exe\n"
  },
  {
    "path": "test/arch-x86_64-ifunc-alias.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_ifunc || skip\ntest_cflags -static || skip\n\ncat <<EOF | $CXX -march=x86-64 -o $t/a.o -c -xc++ - -fno-PIE\n#include <assert.h>\n#include <stdio.h>\n\n__attribute__((target(\"default\")))\nint foo() {\n  return 0;\n}\n\n__attribute__((target(\"ssse3,avx2\")))\nint foo() {\n  return 1;\n}\n\nint (*p)() = foo;\n\nint main() {\n  int val = foo();\n  assert(val == p());\n}\nEOF\n\n$CXX -B. -o $t/exe $t/a.o -static\n$QEMU $t/exe\n"
  },
  {
    "path": "test/arch-x86_64-ifunc-export.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_ifunc || skip\n\ncat <<EOF | $CXX -c -fPIC -o $t/a.o -xc++ -\n__attribute__((target(\"default\"))) void myfunc(int) {}\n__attribute__((target(\"avx512f\"))) void myfunc(int) {}\n\ntemplate <typename T>\nstruct MyClass {\n  MyClass(T data) { myfunc(data); }\n};\n\ntemplate struct MyClass<int>;\nEOF\n\n$CXX -shared -o $t/b.so $t/a.o\n\ncat <<EOF | $CXX -c -fPIC -o $t/c.o -xc++ -\n__attribute__((target(\"default\"))) void myfunc(int);\n__attribute__((target(\"avx512f\"))) void myfunc(int);\n\ntemplate <typename T>\nstruct MyClass {\n  MyClass(T data) { myfunc(data); }\n};\n\nextern template struct MyClass<int>;\n\nint main() {\n  MyClass<int> obj(3);\n}\nEOF\n\n$CXX -B. -o $t/exe $t/c.o $t/b.so -fno-PIE\n$QEMU $t/exe |& grep 'circular dependency' || skip\n$QEMU $t/exe\n"
  },
  {
    "path": "test/arch-x86_64-incompatible-libs-linker-script.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -m32 || skip\n\nmkdir -p $t/foo\n\necho 'char hello[] = \"Hello world\";' | $CC -shared -o $t/libbar.so -m32 -xc -\necho 'char hello[] = \"Hello world\";' | $CC -shared -o $t/foo/libbar.so -xc -\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\nextern char hello[];\nint main() {\n  printf(\"%s\\n\", hello);\n}\nEOF\n\ncat <<EOF > $t/b.script\nINPUT(libbar.so)\nEOF\n\ncd $t\n\n$CC -B$OLDPWD -o exe1 -Lfoo a.o b.script\nLD_LIBRARY_PATH=. $QEMU ./exe1 | grep 'Hello world'\n\n$CC -B$OLDPWD -o exe2 -Lfoo b.script a.o\nLD_LIBRARY_PATH=. $QEMU ./exe2 | grep 'Hello world'\n"
  },
  {
    "path": "test/arch-x86_64-incompatible-libs-linker-script2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nnm mold | grep '__tsan_init' && skip\ntest_cflags -m32 || skip\n\nmkdir -p $t/foo\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -m32\nchar hello[] = \"Hello world\";\nEOF\n\ncat <<EOF | $CC -o $t/foo/a.o -c -xc -\nchar hello[] = \"Hello world\";\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\n#include <stdio.h>\nextern char hello[];\nint main() {\n  printf(\"%s\\n\", hello);\n}\nEOF\n\ncat <<EOF > $t/d.script\nINPUT(a.o)\nEOF\n\ncd $t\n\n$OLDPWD/ld -o e.o -r -Lfoo d.script c.o\n$OLDPWD/ld -o f.o -r -Lfoo c.o d.script\n"
  },
  {
    "path": "test/arch-x86_64-incompatible-libs.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -m32 || skip\n\ncat <<EOF | $CC -m32 -c -o $t/a.o -xc -\nchar hello[] = \"Hello world\";\nEOF\n\nmkdir -p $t/lib32\nar crs $t/lib32/libfoo.a $t/a.o\n$CC -m32 -shared -o $t/lib32/libfoo.so $t/a.o\n\ncat <<EOF | $CC -c -o $t/d.o -xc -\nchar hello[] = \"Hello world\";\nEOF\n\nmkdir -p $t/lib64\nar crs $t/lib64/libfoo.a $t/d.o\n$CC -shared -o $t/lib64/libfoo.so $t/d.o\n\ncat <<EOF | $CC -c -o $t/e.o -xc -\n#include <stdio.h>\n\nextern char hello[];\n\nint main() {\n  printf(\"%s\\n\", hello);\n}\nEOF\n\nmkdir -p $t/script\necho 'OUTPUT_FORMAT(elf32-i386)' > $t/script/libfoo.so\n\n$CC -B. -o $t/exe -L$t/script -L$t/lib32 -L$t/lib64 \\\n  $t/e.o -lfoo -Wl,-rpath $t/lib64 >& $t/log\n\ngrep 'script/libfoo.so: skipping incompatible file' $t/log\ngrep 'lib32/libfoo.so: skipping incompatible file' $t/log\ngrep 'lib32/libfoo.a: skipping incompatible file' $t/log\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/arch-x86_64-incompatible-libs2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -m32 || skip\nnm mold | grep '__tsan_init' && skip\n\ncat <<EOF | $CC -m32 -c -o $t/a.o -xc -\nchar hello[] = \"Hello world\";\nEOF\n\nmkdir -p $t/lib32\n$CC -m32 -shared -o $t/lib32/libfoo.so $t/a.o\n\ncat <<EOF | $CC -c -o $t/d.o -xc -\nchar hello[] = \"Hello world\";\nEOF\n\nmkdir -p $t/lib64\n$CC -shared -o $t/lib64/libfoo.so $t/d.o\n\ncat <<EOF | $CC -c -o $t/e.o -xc -\n#include <stdio.h>\n\nextern char hello[];\n\nint main() {\n  printf(\"%s\\n\", hello);\n}\nEOF\n\nmkdir -p $t/script\necho 'GROUP(libfoo.so)' > $t/script/libfoo.so\n\n$CC -B. -o $t/exe -L$t/lib32 -L$t/lib64 -lfoo $t/e.o -Wl,-rpath $t/lib64 |&\n  grep 'lib32/libfoo.so: skipping incompatible file'\n\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/arch-x86_64-incompatible-obj.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -m32 || skip\n\ncat <<EOF | $CC -c -o $t/a.o -m64 -xc -\nint main() {}\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -m32 -xc -\nEOF\n\nnot $CC -B. -o /dev/null $t/a.o $t/b.o >& $t/log\ngrep \"$t/b.o: incompatible file type: x86_64 is expected but got i386\" $t/log\n"
  },
  {
    "path": "test/arch-x86_64-init-array-readonly.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -x assembler -\n.section .init_array,\"aw\",@init_array\n.p2align 3\n.globl init1\n.quad init1\nEOF\n\n# GNU assembler automatically turns on W bit if the section name\n# is `.init_array`, so avoid using that name in assembly.\ncat <<EOF | $CC -c -o $t/b.o -x assembler -\n.section .init_xxxxx,\"a\",@progbits\n.p2align 3\n.globl init2\n.quad init2\nEOF\n\nsed -i'' -e 's/init_xxxxx/init_array/g' $t/b.o\n\ncat <<EOF | $CC -c -o $t/c.o -xc -\n#include <stdio.h>\n\nvoid init1() { printf(\"init1 \"); }\nvoid init2() { printf(\"init2 \"); }\n\nint main() {\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o $t/c.o\n$QEMU $t/exe | grep 'init1 init2'\n"
  },
  {
    "path": "test/arch-x86_64-init-array.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -x assembler -\n.globl init1, init2, fini1, fini2\n\n.section .init_array,\"aw\",@init_array\n.p2align 3\n.quad init1\n\n.section .init_array,\"aw\",@init_array\n.p2align 3\n.quad init2\n\n.section .fini_array,\"aw\",@fini_array\n.p2align 3\n.quad fini1\n\n.section .fini_array,\"aw\",@fini_array\n.p2align 3\n.quad fini2\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -xc -\n#include <stdio.h>\n\nvoid init1() { printf(\"init1 \"); }\nvoid init2() { printf(\"init2 \"); }\nvoid fini1() { printf(\"fini1\\n\"); }\nvoid fini2() { printf(\"fini2 \"); }\n\nint main() {\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o\n$QEMU $t/exe | grep 'init1 init2 fini2 fini1'\n"
  },
  {
    "path": "test/arch-x86_64-isa-level.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe2 $t/a.o -Wl,-z,x86-64-v2\nreadelf -n $t/exe2 | grep -F 'Unknown note type: (0x00000005)' && skip\nreadelf -n $t/exe2 | grep -F 'procesor-specific type 0xc0008002' && skip\nreadelf -n $t/exe2 | grep 'x86 ISA needed: .*x86-64-v2'\n\n$CC -B. -o $t/exe3 $t/a.o -Wl,-z,x86-64-v3\nreadelf -n $t/exe3 | grep 'x86 ISA needed: .*x86-64-v3'\n\n$CC -B. -o $t/exe4 $t/a.o -Wl,-z,x86-64-v4\nreadelf -n $t/exe4 | grep 'x86 ISA needed: .*x86-64-v4'\n"
  },
  {
    "path": "test/arch-x86_64-large-bss.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -mcmodel=large\n#include <stdio.h>\nchar arr1[0xc0000000];\nextern char arr2[0xc0000000];\nint main() {\n  printf(\"%d %lx\\n\", (void *)arr1 < (void *)arr2, arr2 - arr1);\n}\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -mcmodel=large\nchar arr2[0xc0000000];\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o\n$QEMU $t/exe | grep -E '^1 c0000000$'\n"
  },
  {
    "path": "test/arch-x86_64-mergeable-records.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -static || skip\n\ncat <<'EOF' | $CC -o $t/a.o -c -x assembler -\n  .text\n  .globl main\nmain:\n  sub $8, %rsp\n\n  mov $.L.str1, %rdi\n  xor %rax, %rax\n  call printf\n\n  mov $.L.str1+1, %rdi\n  xor %rax, %rax\n  call printf\n\n  mov $str2+2, %rdi\n  xor %rax, %rax\n  call printf\n\n  mov $.L.str3+3, %rdi\n  xor %rax, %rax\n  call printf\n\n  mov $.rodata.cst8+16, %rdi\n  xor %rax, %rax\n  call printf\n\n  xor %rax, %rax\n  add $8, %rsp\n  ret\n\n  .section .rodata.cst8, \"aM\", @progbits, 8\n  .align 8\n.L.str1:\n  .ascii \"abcdef\\n\\0\"\n.globl str2\nstr2:\n  .ascii \"ghijkl\\n\\0\"\n.L.str3:\n  .ascii \"mnopqr\\n\\0\"\nEOF\n\n$CC -B. -static -no-pie -o $t/exe $t/a.o\n\n$QEMU $t/exe | grep '^abcdef$'\n$QEMU $t/exe | grep '^bcdef$'\n$QEMU $t/exe | grep '^ijkl$'\n$QEMU $t/exe | grep '^pqr$'\n$QEMU $t/exe | grep '^mnopqr$'\n"
  },
  {
    "path": "test/arch-x86_64-mergeable-strings-nonalloc.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -o $t/a.o -c -xc -\nint main() {}\nEOF\n\ncat <<'EOF' | $CC -o $t/b.o -c -x assembler -\n.section .foo, \"\", @progbits\n.quad .L1 - 1\n.quad .L2 - 1\n\n.section .bar, \"MS\", @progbits, 1\n.L1:\n  .string \"abc\"\n.L2:\n  .string \"xyz\"\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o\n\nreadelf -x .foo $t/exe | grep -F '03000000 00000000 ffffffff ffffffff'\nreadelf -x .bar $t/exe | grep -F 'xyz.abc.'\n"
  },
  {
    "path": "test/arch-x86_64-mergeable-strings.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -static || skip\n\ncat <<'EOF' | $CC -o $t/a.o -c -x assembler -\n  .text\n  .globl main\nmain:\n  sub $8, %rsp\n  mov $.L.str+3, %rdi\n  xor %rax, %rax\n  call printf\n  mov $.rodata.str1.1+16, %rdi\n  xor %rax, %rax\n  call printf\n  xor %rax, %rax\n  add $8, %rsp\n  ret\n\n  .section .rodata.str1.1, \"aMS\", @progbits, 1\n  .string \"bar\"\n.L.str:\nfoo:\n  .string \"xyzHello\"\n  .string \"foo world\\n\"\nEOF\n\n$CC -B. -static -no-pie -o $t/exe $t/a.o\n$QEMU $t/exe | grep 'Hello world'\n\nreadelf -sW $t/exe | grep -E '[0-9] foo$'\n"
  },
  {
    "path": "test/arch-x86_64-note-property.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\necho endbr64 | $CC -o /dev/null -c -xassembler - 2> /dev/null || skip\ntest_cflags -fcf-protection=branch || skip\n\ncat <<EOF | $CC -fcf-protection=branch -c -o $t/a.o -xc -\nvoid _start() {}\nEOF\n\ncat <<EOF | $CC -fcf-protection=none -c -o $t/b.o -xc -\nvoid _start() {}\nEOF\n\n./mold -o $t/exe $t/a.o\nreadelf -n $t/exe | grep 'x86 feature: IBT'\n\n./mold -o $t/exe $t/b.o\nreadelf -n $t/exe | not grep 'x86 feature: IBT'\n"
  },
  {
    "path": "test/arch-x86_64-note-property2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# OneTBB isn't tsan-clean\nnm mold | grep '__tsan_init' && skip\n\n# Binutils 2.32 injects their own .note.gnu.property section interfering with the tests\ntest_cflags -Xassembler -mx86-used-note=no && CFLAGS=\"-Xassembler -mx86-used-note=no\" || CFLAGS=\"\"\n\n# This test requires the new ISA constants defined in Binutils 2.36\nreadelf -v | grep -E \"GNU readelf .+ (2\\.3[6-9]|2\\.[4-9]|[3-9])\" || skip\n\ncat <<EOF | $CC $CFLAGS -c -o $t/a.o -xassembler-with-cpp  -\n#define NT_GNU_PROPERTY_TYPE_0 5\n#define GNU_PROPERTY_X86_ISA_1_USED 0xc0010002\n#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0008002\n#define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002\n\n\t.section \".note.gnu.property\", \"a\"\n\t.p2align 3\n\t.long 4\n\t.long 1f - 0f\n\t.long NT_GNU_PROPERTY_TYPE_0\n\t.asciz \"GNU\"\n0:\t.long GNU_PROPERTY_X86_ISA_1_NEEDED\n\t.long 4\n\t.long 0x7\n\t.p2align 3\n\t.long GNU_PROPERTY_X86_ISA_1_USED\n\t.long 4\n\t.long 0x7\n\t.p2align 3\n\t.long GNU_PROPERTY_X86_FEATURE_1_AND\n\t.long 4\n\t.long 0x3\n\t.p2align 3\n1:\nEOF\n\ncat <<EOF | $CC $CFLAGS -c -o $t/b.o -xassembler-with-cpp -\n#define NT_GNU_PROPERTY_TYPE_0 5\n#define GNU_PROPERTY_X86_ISA_1_USED 0xc0010002\n#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0008002\n#define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002\n\n\t.section \".note.gnu.property\", \"a\"\n\t.p2align 3\n\t.long 4\n\t.long 1f - 0f\n\t.long NT_GNU_PROPERTY_TYPE_0\n\t.asciz \"GNU\"\n0:\t.long GNU_PROPERTY_X86_ISA_1_NEEDED\n\t.long 4\n\t.long 0x8\n\t.p2align 3\n\t.long GNU_PROPERTY_X86_ISA_1_USED\n\t.long 4\n\t.long 0x8\n\t.p2align 3\n\t.long GNU_PROPERTY_X86_FEATURE_1_AND\n  .long 4\n  .long 0x2\n  .p2align 3\n1:\nEOF\n\ncat <<EOF | $CC $CFLAGS -c -o $t/c.o -xassembler-with-cpp -\nEOF\n\n./mold -nostdlib -o $t/exe1 $t/a.o $t/b.o\nreadelf -n $t/exe1 | grep 'x86 feature: SHSTK'\nreadelf -n $t/exe1 | grep 'x86 ISA needed: x86-64-baseline, x86-64-v2, x86-64-v3, x86-64-v4'\nreadelf -n $t/exe1 | grep 'x86 ISA used: x86-64-baseline, x86-64-v2, x86-64-v3, x86-64-v4'\n\n./mold -nostdlib -o $t/exe2 $t/a.o $t/b.o $t/c.o\nreadelf -n $t/exe2 | not grep 'x86 feature: SHSTK'\nreadelf -n $t/exe2 | grep 'x86 ISA needed: x86-64-baseline, x86-64-v2, x86-64-v3, x86-64-v4'\nreadelf -n $t/exe2 | not grep 'x86 ISA used: x86-64-baseline, x86-64-v2, x86-64-v3, x86-64-v4'\n\n./mold --relocatable -o $t/d.o $t/a.o $t/b.o\nreadelf -n $t/d.o | grep 'x86 feature: SHSTK'\nreadelf -n $t/d.o | grep 'x86 ISA needed: x86-64-baseline, x86-64-v2, x86-64-v3, x86-64-v4'\nreadelf -n $t/d.o | grep 'x86 ISA used: x86-64-baseline, x86-64-v2, x86-64-v3, x86-64-v4'\n"
  },
  {
    "path": "test/arch-x86_64-note.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -static || skip\n\n# Binutils 2.32 injects their own .note.gnu.property section interfering with the tests\ntest_cflags -Xassembler -mx86-used-note=no && CFLAGS=\"-Xassembler -mx86-used-note=no\" || CFLAGS=\"\"\n\ncat <<EOF | $CC $CFLAGS -o $t/a.o -c -x assembler -\n.text\n.globl _start\n_start:\n  nop\n\n.section .note.foo, \"a\", @note\n.p2align 3\n.quad 42\n\n.section .note.bar, \"a\", @note\n.p2align 2\n.quad 42\n\n.section .note.baz, \"a\", @note\n.p2align 3\n.quad 42\n\n.section .note.nonalloc, \"\", @note\n.p2align 0\n.quad 42\nEOF\n\n./mold -static -o $t/exe $t/a.o\nreadelf -W --sections $t/exe > $t/log1\n\ngrep -E '.note.bar\\s+NOTE.+000008 00   A  0   0  4' $t/log1\ngrep -E '.note.baz\\s+NOTE.+000008 00   A  0   0  8' $t/log1\ngrep -E '.note.nonalloc\\s+NOTE.+000008 00      0   0  1' $t/log1\n\nreadelf --segments $t/exe > $t/log2\ngrep -F '01     .note.baz .note.foo .note.bar' $t/log2\nnot grep 'NOTE.*0x0000000000000000 0x0000000000000000' $t/log2\n"
  },
  {
    "path": "test/arch-x86_64-note2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# Binutils 2.32 injects their own .note.gnu.property section interfering with the tests\ntest_cflags -Xassembler -mx86-used-note=no && CFLAGS=\"-Xassembler -mx86-used-note=no\" || CFLAGS=\"\"\n\ncat <<EOF | $CC $CFLAGS -o $t/a.o -c -x assembler -\n.section .note.a, \"a\", @note\n.p2align 3\n.quad 42\nEOF\n\ncat <<EOF | $CC $CFLAGS -o $t/b.o -c -x assembler -\n.section .note.b, \"a\", @note\n.p2align 2\n.quad 42\nEOF\n\ncat <<EOF | $CC $CFLAGS -o $t/c.o -c -x assembler -\n.section .note.c, \"a\", @note\n.p2align 3\n.quad 42\nEOF\n\ncat <<EOF | $CC $CFLAGS -o $t/d.o -c -xc -\nint main() {}\nEOF\n\n./mold -o $t/exe $t/a.o $t/b.o $t/c.o $t/d.o\n\nreadelf --segments $t/exe | grep -F '01     .note.a .note.c .note.b'\n"
  },
  {
    "path": "test/arch-x86_64-plt.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -o $t/a.o -c -x assembler -\n  .text\n  .globl main\nmain:\n  sub $8, %rsp\n  lea msg(%rip), %rdi\n  xor %rax, %rax\n  call printf@PLT\n  xor %rax, %rax\n  add $8, %rsp\n  ret\n\n  .data\nmsg:\n  .string \"Hello world\\n\"\nEOF\n\n$CC -B. -o $t/exe $t/a.o\n\nreadelf --sections $t/exe | grep -F '.got'\nreadelf --sections $t/exe | grep -F '.got.plt'\n\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/arch-x86_64-preinit-array.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nis_musl && skip\n\ncat <<EOF | $CC -c -o $t/a.o -x assembler -\n.globl preinit, init, fini\n\n.section .preinit_array,\"aw\",@preinit_array\n.p2align 3\n.quad preinit\n\n.section .init_array,\"aw\",@init_array\n.p2align 3\n.quad init\n\n.section .fini_array,\"aw\",@fini_array\n.p2align 3\n.quad fini\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -xc -\n#include <stdio.h>\n#include <unistd.h>\n\nvoid preinit() { write(STDOUT_FILENO, \"preinit \", 8); }\nvoid init() { write(STDOUT_FILENO, \"init \", 5); }\nvoid fini() { write(STDOUT_FILENO, \"fini\\n\", 5); }\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o\n$QEMU $t/exe | grep 'preinit init fini'\n"
  },
  {
    "path": "test/arch-x86_64-relax.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# Skip if target is not x86-64\necho ret | cc -c -o /dev/null -xassembler -Wa,-mrelax-relocations=yes - 2> /dev/null || skip\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -Wa,-mrelax-relocations=yes - || skip\n.globl bar\nbar:\n  mov foo@gotpcrel(%rip), %rax\n  mov foo@gotpcrel(%rip), %rcx\n  mov foo@gotpcrel(%rip), %rdx\n  mov foo@gotpcrel(%rip), %rbx\n  mov foo@gotpcrel(%rip), %rbp\n  mov foo@gotpcrel(%rip), %rsi\n  mov foo@gotpcrel(%rip), %rdi\n  mov foo@gotpcrel(%rip), %r8\n  mov foo@gotpcrel(%rip), %r9\n  mov foo@gotpcrel(%rip), %r10\n  mov foo@gotpcrel(%rip), %r11\n  mov foo@gotpcrel(%rip), %r12\n  mov foo@gotpcrel(%rip), %r13\n  mov foo@gotpcrel(%rip), %r14\n  mov foo@gotpcrel(%rip), %r15\n  mov foo@gotpcrel(%rip), %r16\n  mov foo@gotpcrel(%rip), %r17\n  mov foo@gotpcrel(%rip), %r18\n  mov foo@gotpcrel(%rip), %r19\n  mov foo@gotpcrel(%rip), %r20\n  mov foo@gotpcrel(%rip), %r21\n  mov foo@gotpcrel(%rip), %r22\n  mov foo@gotpcrel(%rip), %r23\n  mov foo@gotpcrel(%rip), %r24\n  mov foo@gotpcrel(%rip), %r25\n  mov foo@gotpcrel(%rip), %r26\n  mov foo@gotpcrel(%rip), %r27\n  mov foo@gotpcrel(%rip), %r28\n  mov foo@gotpcrel(%rip), %r29\n  mov foo@gotpcrel(%rip), %r30\n  mov foo@gotpcrel(%rip), %r31\n\n  call *foo@gotpcrel(%rip)\n  jmp  *foo@gotpcrel(%rip)\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\nvoid foo() {}\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o\n$OBJDUMP -d $t/exe | sed -n '/<bar>:/,/<.*>:/p' > $t/log\n\ngrep -E 'lea \\s*0x.+\\(%rip\\),%rax .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%rcx .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%rdx .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%rbx .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%rbp .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%rsi .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%rdi .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r8  .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r9  .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r10 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r11 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r12 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r13 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r14 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r15 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r16 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r17 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r18 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r19 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r20 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r21 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r22 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r23 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r24 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r25 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r26 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r27 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r28 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r29 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r30 .*<foo>' $t/log\ngrep -E 'lea \\s*0x.+\\(%rip\\),%r31 .*<foo>' $t/log\n\ngrep -E 'call.*<foo>' $t/log\ngrep -E 'jmp.*<foo>' $t/log\n"
  },
  {
    "path": "test/arch-x86_64-reloc-overflow.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n  .globl foo\n  .data\nfoo:\n  .short foo\nEOF\n\nnot ./mold -e foo -o $t/exe $t/a.o |&\n  grep -F 'relocation R_X86_64_16 against foo out of range'\n"
  },
  {
    "path": "test/arch-x86_64-reloc-zero.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\nfoo: jmp 0\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -no-pie -o $t/exe $t/a.o $t/b.o\n"
  },
  {
    "path": "test/arch-x86_64-reloc.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -fPIC -c -o $t/a.o -x assembler -\n.data\n.globl ext_var\n.type ext_var, @object\n.size ext_var, 56\next_var:\n  .long 56\nEOF\n\ncat <<'EOF' | $CC -fPIC -c -o $t/b.o -xc -\n#include <stdio.h>\n\nint print(int x) {\n  printf(\"%d\\n\", x);\n  return 0;\n}\n\nint print64(long x) {\n  printf(\"%ld\\n\", x);\n  return 0;\n}\nEOF\n\n$CC -shared -o $t/c.so $t/a.o $t/b.o -Wl,-z,noexecstack\n\n# Absolute symbol\ncat <<'EOF' > $t/d.s\n.globl abs_sym\n.set abs_sym, 42\n\n.globl main\nmain:\n  sub $8, %rsp\n  lea abs_sym, %edi\n  call print\n  add $8, %rsp\n  ret\nEOF\n\n$CC -B. -o $t/exe $t/c.so $t/d.s -no-pie\n$QEMU $t/exe | grep '^42$'\n$CC -B. -o $t/exe $t/c.so $t/d.s -pie\n$QEMU $t/exe | grep '^42$'\n\n# GOT\ncat <<'EOF' > $t/d.s\n.globl main\nmain:\n  sub $8, %rsp\n  mov ext_var@GOTPCREL(%rip), %rdi\n  mov (%rdi), %edi\n  call print\n  add $8, %rsp\n  ret\nEOF\n\n$CC -B. -o $t/exe $t/c.so $t/d.s -no-pie\n$QEMU $t/exe | grep '^56$'\n$CC -B. -o $t/exe $t/c.so $t/d.s -pie\n$QEMU $t/exe | grep '^56$'\n\n# Copyrel\ncat <<'EOF' > $t/d.s\n.globl main\nmain:\n  sub $8, %rsp\n  mov ext_var(%rip), %edi\n  call print\n  add $8, %rsp\n  ret\nEOF\n\n$CC -c -o $t/d.o $t/d.s\n$CC -B. -o $t/exe $t/c.so $t/d.o -no-pie\n$QEMU $t/exe | grep '^56$'\n$CC -B. -o $t/exe $t/c.so $t/d.s -pie\n$QEMU $t/exe | grep '^56$'\n\n# Copyrel\ncat <<'EOF' > $t/d.s\n.globl main\nmain:\n  sub $8, %rsp\n  mov foo(%rip), %rdi\n  mov (%rdi), %edi\n  call print\n  add $8, %rsp\n  ret\n\n.data\nfoo:\n  .quad ext_var\nEOF\n\n$CC -B. -o $t/exe $t/c.so $t/d.s -no-pie\n$QEMU $t/exe | grep '^56$'\n$CC -B. -o $t/exe $t/c.so $t/d.s -pie\n$QEMU $t/exe | grep '^56$'\n\n# PLT\ncat <<'EOF' > $t/d.s\n.globl main\nmain:\n  sub $8, %rsp\n  mov $76, %edi\n  call print@PLT\n  add $8, %rsp\n  ret\nEOF\n\n$CC -B. -o $t/exe $t/c.so $t/d.s -no-pie\n$QEMU $t/exe | grep '^76$'\n$CC -B. -o $t/exe $t/c.so $t/d.s -pie\n$QEMU $t/exe | grep '^76$'\n\n# PLT\ncat <<'EOF' > $t/d.s\n.globl main\nmain:\n  sub $8, %rsp\n  mov $76, %edi\n  lea print(%rip), %rax\n  call *%rax\n  add $8, %rsp\n  ret\nEOF\n\n$CC -B. -o $t/exe $t/c.so $t/d.s -no-pie\n$QEMU $t/exe | grep '^76$'\n$CC -B. -o $t/exe $t/c.so $t/d.s -pie\n$QEMU $t/exe | grep '^76$'\n\n# SIZE32\ncat <<'EOF' > $t/d.s\n.globl main\nmain:\n  sub $8, %rsp\n  mov $foo+2@SIZE, %edi\n  call print@PLT\n  add $8, %rsp\n  ret\n\n.data\n.globl foo\n.type foo, %object\n.size foo, 24\nfoo:\nEOF\n\n$CC -B. -o $t/exe $t/c.so $t/d.s\n$QEMU $t/exe | grep '^26$'\n\n# SIZE64\ncat <<'EOF' > $t/d.s\n.globl main\nmain:\n  sub $8, %rsp\n  movabs $foo+5@SIZE, %rdi\n  call print64@PLT\n  add $8, %rsp\n  ret\n\n.data\n.globl foo\n.type foo, %object\n.size foo, 56\nfoo:\nEOF\n\n$CC -B. -o $t/exe $t/c.so $t/d.s\n$QEMU $t/exe | grep '^61$'\n\n# GOTPCREL64\ncat <<'EOF' > $t/e.c\nextern long ext_var;\nstatic long arr[50000] = {1, 2, 3};\nvoid print64(long);\n\nint main() {\n  print64(ext_var * 1000000 + arr[2]);\n}\nEOF\n\n$CC -c -o $t/e.o $t/e.c -mcmodel=large -fPIC\n$CC -B. -o $t/exe $t/c.so $t/e.o\n$QEMU $t/exe | grep '^56000003$'\n\n# R_X86_64_32 against non-alloc section\ncat <<'EOF' > $t/f.s\n.globl main\nmain:\n  sub $8, %rsp\n  add $8, %rsp\n  ret\n\n.section .foo, \"\", @progbits\n.zero 16\nfoo:\n.quad bar\n\n.section .bar, \"\", @progbits\n.zero 24\nbar:\n.quad foo\nEOF\n\n$CC -c -o $t/f.o $t/f.s\n$CC -B. -o $t/exe $t/f.o\nreadelf -x .foo -x .bar $t/exe > $t/log\n\ngrep -F '0x00000010 00000000 00000000 10000000 00000000' $t/log\ngrep -F '0x00000010 18000000 00000000' $t/log\n"
  },
  {
    "path": "test/arch-x86_64-section-alignment.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -c -o $t/a.o -xc -\n#include <stdint.h>\n#include <stdio.h>\n\n__attribute__((aligned(8192))) int foo = 1;\n\ntypedef struct {\n  uint8_t e_ident[16];\n  uint16_t e_type;\n  uint16_t e_machine;\n  uint32_t e_version;\n  uint64_t e_entry;\n  uint64_t e_phoff;\n  uint64_t e_shoff;\n  uint32_t e_flags;\n  uint16_t e_ehsize;\n  uint16_t e_phentsize;\n  uint16_t e_phnum;\n  uint16_t e_shentsize;\n  uint16_t e_shnum;\n  uint16_t e_shstrndx;\n} Ehdr;\n\nchar __ehdr_start;\n\nint main() {\n  Ehdr *e = (Ehdr *)&__ehdr_start;\n  printf(\"%lu %lu %lu\\n\", e->e_phoff % 8, e->e_shoff % 8, (uint64_t)&foo % 8192);\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o\n$QEMU $t/exe | grep '^0 0 0$'\n"
  },
  {
    "path": "test/arch-x86_64-section-name.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -o $t/a.o -c -x assembler -\n.globl _start\n.text\n_start:\n  ret\n\n.section .text.hot\n.ascii \".text.hot \"\n.section .text.hot.foo\n.ascii \".text.hot.foo \"\n\n.section .text.unknown\n.ascii \".text.unknown \"\n.section .text.unknown.foo\n.ascii \".text.unknown.foo \"\n\n.section .text.unlikely\n.ascii \".text.unlikely \"\n.section .text.unlikely.foo\n.ascii \".text.unlikely.foo \"\n\n.section .text.startup\n.ascii \".text.startup \"\n.section .text.startup.foo\n.ascii \".text.startup.foo \"\n\n.section .text.exit\n.ascii \".text.exit \"\n.section .text.exit.foo\n.ascii \".text.exit.foo \"\n\n.section .text\n.ascii \".text \"\n.section .text.foo\n.ascii \".text.foo \"\n\n.section .data.rel.ro\n.ascii \".data.rel.ro \"\n.section .data.rel.ro.foo\n.ascii \".data.rel.ro.foo \"\n\n.section .data\n.ascii \".data \"\n.section .data.foo\n.ascii \".data.foo \"\n\n.section .rodata\n.ascii \".rodata \"\n.section .rodata.foo\n.ascii \".rodata.foo \"\nEOF\n\n./mold -o $t/exe $t/a.o -z keep-text-section-prefix\n\nreadelf -p .text.hot $t/exe | grep -F '.text.hot .text.hot.foo'\nreadelf -p .text.unknown $t/exe | grep -F '.text.unknown .text.unknown.foo'\nreadelf -p .text.unlikely $t/exe | grep -F '.text.unlikely .text.unlikely.foo'\nreadelf -p .text.startup $t/exe | grep -F '.text.startup .text.startup.foo'\nreadelf -p .text.exit $t/exe | grep -F '.text.exit .text.exit.foo'\nreadelf -p .text $t/exe | grep -F '.text .text.foo'\nreadelf -p .data.rel.ro $t/exe | grep -F '.data.rel.ro .data.rel.ro.foo'\nreadelf -p .data $t/exe | grep -F '.data .data.foo'\nreadelf -p .rodata $t/exe | grep -F '.rodata .rodata.foo'\n\n./mold -o $t/exe $t/a.o\nreadelf --sections $t/exe | not grep -F .text.hot\n\n./mold -o $t/exe $t/a.o -z nokeep-text-section-prefix\nreadelf --sections $t/exe | not grep -F .text.hot\n"
  },
  {
    "path": "test/arch-x86_64-tbss-only.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# Test if grep supports backreferences\necho abab | grep -E '(ab)\\1' || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n__thread char foo;\n\n__attribute__((section(\".data.rel.ro.bar\"), aligned(16*1024)))\nchar bar;\n\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.o\n$QEMU $t/exe\n\nreadelf -W --segments $t/exe | grep -E 'TLS +0x000([^ ][^ ][^ ]) 0x[^ ]+\\1 '\n"
  },
  {
    "path": "test/arch-x86_64-tls-gd-mcmodel-large.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $GCC -mtls-dialect=gnu -fPIC -c -o $t/a.o -xc - -mcmodel=large\n#include <stdio.h>\n\nstatic _Thread_local int x1 = 1;\nstatic _Thread_local int x2;\nextern _Thread_local int x3;\nextern _Thread_local int x4;\nint get_x5();\nint get_x6();\n\nint main() {\n  x2 = 2;\n\n  printf(\"%d %d %d %d %d %d\\n\", x1, x2, x3, x4, get_x5(), get_x6());\n  return 0;\n}\nEOF\n\ncat <<EOF | $GCC -mtls-dialect=gnu -fPIC -c -o $t/b.o -xc - -mcmodel=large\n_Thread_local int x3 = 3;\nstatic _Thread_local int x5 = 5;\nint get_x5() { return x5; }\nEOF\n\ncat <<EOF | $GCC -mtls-dialect=gnu -fPIC -c -o $t/c.o -xc - -mcmodel=large\n_Thread_local int x4 = 4;\nstatic _Thread_local int x6 = 6;\nint get_x6() { return x6; }\nEOF\n\n$CC -B. -shared -o $t/d.so $t/b.o -mcmodel=large\n$CC -B. -shared -o $t/e.so $t/c.o -Wl,--no-relax -mcmodel=large\n\n$CC -B. -o $t/exe $t/a.o $t/d.so $t/e.so -mcmodel=large\n$QEMU $t/exe | grep '1 2 3 4 5 6'\n\n$CC -B. -o $t/exe $t/a.o $t/d.so $t/e.so -Wl,-no-relax -mcmodel=large\n$QEMU $t/exe | grep '1 2 3 4 5 6'\n"
  },
  {
    "path": "test/arch-x86_64-tls-gd-to-ie.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $GCC -fPIC -c -o $t/a.o -xc - -mcmodel=large\n#include <stdio.h>\n\n__attribute__((tls_model(\"global-dynamic\"))) static _Thread_local int x1 = 1;\n__attribute__((tls_model(\"global-dynamic\"))) _Thread_local int x2 = 2;\n__attribute__((tls_model(\"global-dynamic\"))) _Thread_local int x3;\n\nint foo() {\n  x3 = 3;\n\n  printf(\"%d %d %d\\n\", x1, x2, x3);\n  return 0;\n}\nEOF\n\ncat <<EOF | $CC -fPIC -c -o $t/b.o -xc -\nint foo();\nint main() { foo(); }\nEOF\n\n$CC -B. -shared -o $t/c.so $t/a.o\n$CC -B. -o $t/exe1 $t/b.o $t/c.so\n$QEMU $t/exe1 | grep '1 2 3'\n\n$CC -B. -shared -o $t/d.so $t/a.o -Wl,-no-relax\n$CC -B. -o $t/exe2 $t/b.o $t/d.so\n$QEMU $t/exe2 | grep '1 2 3'\n\n$CC -B. -shared -o $t/e.so $t/a.o -Wl,-z,nodlopen\n$CC -B. -o $t/exe3 $t/b.o $t/e.so\n$QEMU $t/exe3 | grep '1 2 3'\n\n$CC -B. -shared -o $t/f.so $t/a.o -Wl,-z,nodlopen -Wl,-no-relax\n$CC -B. -o $t/exe4 $t/b.o $t/f.so\n$QEMU $t/exe4 | grep '1 2 3'\n"
  },
  {
    "path": "test/arch-x86_64-tls-large-tbss.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -x assembler -\n.globl x, y\n.section .tbss,\"awT\",@nobits\nx:\n.zero 1024\n.section .tcommon,\"awT\",@nobits\ny:\n.zero 1024\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -xc -\n#include <stdio.h>\n\nextern _Thread_local char x[1024000];\nextern _Thread_local char y[1024000];\n\nint main() {\n  x[0] = 3;\n  x[1023] = 5;\n  printf(\"%d %d %d %d %d %d\\n\", x[0], x[1], x[1023], y[0], y[1], y[1023]);\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o\n$QEMU $t/exe | grep '^3 0 5 0 0 0$'\n"
  },
  {
    "path": "test/arch-x86_64-tls-ld-mcmodel-large.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $GCC -ftls-model=local-dynamic -fPIC -c -o $t/a.o -xc - -mcmodel=large\n#include <stdio.h>\n\nextern _Thread_local int foo;\nstatic _Thread_local int bar;\n\nint *get_foo_addr() { return &foo; }\nint *get_bar_addr() { return &bar; }\n\nint main() {\n  bar = 5;\n\n  printf(\"%d %d %d %d\\n\", *get_foo_addr(), *get_bar_addr(), foo, bar);\n  return 0;\n}\nEOF\n\ncat <<EOF | $GCC -ftls-model=local-dynamic  -fPIC -c -o $t/b.o -xc - -mcmodel=large\n_Thread_local int foo = 3;\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o -mcmodel=large\n$QEMU $t/exe | grep '3 5 3 5'\n\n$CC -B. -o $t/exe $t/a.o $t/b.o -Wl,-no-relax -mcmodel=large\n$QEMU $t/exe | grep '3 5 3 5'\n"
  },
  {
    "path": "test/arch-x86_64-tls-module-base.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_tlsdesc || skip\n\ncat <<EOF | $CC -fPIC -o $t/a.o -c -xassembler -\n.globl get_foo\n.type get_foo, @function\nget_foo:\n  lea _TLS_MODULE_BASE_@TLSDESC(%rip), %rax\n  call *_TLS_MODULE_BASE_@TLSCALL(%rax)\n  lea foo@dtpoff(%rax), %rax\n  mov %fs:(%rax), %eax\n  ret\n.section .tdata, \"awT\", @progbits\nfoo:\n.long 20\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\n_Thread_local int bar = 3;\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\n#include <stdio.h>\n\nint get_foo();\nextern _Thread_local int bar;\n\nint main() {\n  printf(\"%d %d\\n\", get_foo(), bar);\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o $t/c.o\n$QEMU $t/exe1 | grep '^20 3$'\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o $t/c.o -Wl,-no-relax\n$QEMU $t/exe2 | grep '^20 3$'\n\n$CC -B. -o $t/d.so $t/a.o -shared\n$CC -B. -o $t/exe3 $t/b.o $t/c.o $t/d.so\n$QEMU $t/exe3 | grep '^20 3$'\n"
  },
  {
    "path": "test/arch-x86_64-tlsdesc.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_tlsdesc || skip\n\ncat <<EOF | $GCC -c -o $t/a.o -xassembler -\n.globl  get_foo\n.type   get_foo, @function\nget_foo:\n  pushq   %rbp\n  movq    %rsp, %rbp\n  leaq    foo@TLSDESC(%rip), %rbx\n  movq    %rbx, %rax\n  call    *foo@TLSCALL(%rax)\n  movq    %fs:0, %rdx\n  addq    %rdx, %rax\n  movl    (%rax), %eax\n  popq    %rbp\n  ret\nEOF\n\ncat <<EOF | $GCC -fPIC -c -o $t/b.o -xc - $tlsdesc_opt\n#include <stdio.h>\n\n_Thread_local int foo;\n\nint get_foo();\n\nint main() {\n  foo = 42;\n  printf(\"%d\\n\", get_foo());\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o\n$QEMU $t/exe1 | grep 42\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o -Wl,-no-relax\n$QEMU $t/exe2 | grep 42\n\n$CC -B. -shared -o $t/c.so $t/a.o\n$CC -B. -o $t/exe3 $t/b.o $t/c.so\n$QEMU $t/exe3 | grep 42\n\n$CC -B. -shared -o $t/c.so $t/a.o -Wl,-no-relax\n$CC -B. -o $t/exe4 $t/b.o $t/c.so -Wl,-no-relax\n$QEMU $t/exe4 | grep 42\n"
  },
  {
    "path": "test/arch-x86_64-unique.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -x assembler -\n.section .data.foo.1,\"aw\",@progbits\n.ascii \"a\"\n.section .data.foo.1,\"aw\",@progbits\n.ascii \"b\"\n.section .data.foo.2,\"aw\",@progbits\n.ascii \"c\"\n.section .data.bar.1,\"aw\",@progbits\n.ascii \"d\"\n.section .data.bar.2,\"aw\",@progbits\n.ascii \"e\"\n.text\n.globl _start\n_start:\n  nop\nEOF\n\n$CC -B. -o $t/exe $t/a.o -nostdlib -Wl,-unique='*foo*'\n\nreadelf -x .data.foo.1 $t/exe | grep ab\nreadelf -x .data.foo.2 $t/exe | grep c\nreadelf -x .data $t/exe | grep de\n"
  },
  {
    "path": "test/arch-x86_64-warn-execstack.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.section .note.GNU-stack, \"x\"\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\nint main() {}\nEOF\n\n$GCC -B. -o $t/exe $t/a.o $t/b.o |& grep -E 'may cause a segmentation fault|requires executable stack'\n"
  },
  {
    "path": "test/arch-x86_64-warn-shared-textrel.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# Skip if libc is musl\nis_musl && skip\n\ncat <<'EOF' | $CC -c -o $t/a.o -x assembler -\n.globl fn\nfn:\n  movabs main, %rax\n  ret\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -fPIC -xc -\nvoid fn();\nint main() { fn(); }\nEOF\n\n$CC -B. -shared -o $t/c.so $t/a.o $t/b.o -Wl,-warn-shared-textrel >& $t/log\ngrep 'relocation against symbol `main'\\'' in read-only section' $t/log\ngrep 'creating a DT_TEXTREL in an output file' $t/log\n"
  },
  {
    "path": "test/arch-x86_64-warn-textrel.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# Skip if libc is musl\nis_musl && skip\n\ncat <<'EOF' | $CC -c -o $t/a.o -x assembler -\n.globl fn\nfn:\n  movabs main, %rax\n  ret\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -fPIC -xc -\nvoid fn();\nint main() { fn(); }\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o -pie -Wl,-warn-textrel >& $t/log\ngrep 'relocation against symbol `main'\\'' in read-only section' $t/log\ngrep 'creating a DT_TEXTREL in an output file' $t/log\n"
  },
  {
    "path": "test/arch-x86_64-z-dynamic-undefined-weak.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ \"$(uname)\" = FreeBSD ] && skip\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -fno-PIE\n#include <stdio.h>\n__attribute__((weak)) extern int foo;\nint main() { printf(\"%p\\n\", &foo); }\nEOF\n\nnot $CC -B. -o $t/exe3 $t/b.o -no-pie -Wl,-z,dynamic-undefined-weak |&\n  grep 'cannot create a copy relocation for foo'\n"
  },
  {
    "path": "test/arch-x86_64-z-ibt.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\necho endbr64 | $CC -o /dev/null -c -xassembler - 2> /dev/null || skip\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n.globl main\nmain:\n  call _exit@PLT\nEOF\n\n$CC -B. -o $t/exe $t/a.o\nreadelf --notes $t/exe | not grep -w SHSTK\n\n$CC -B. -o $t/exe $t/a.o -Wl,-z,ibt\nreadelf --notes $t/exe | grep -w IBT\n"
  },
  {
    "path": "test/arch-x86_64-z-ibtplt.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -o $t/a.o -c -xc -\n#include <stdio.h>\nvoid hello() { printf(\"Hello\"); }\nvoid world() { printf(\"world\"); }\nEOF\n\n$CC -B. -o $t/b.so -shared $t/a.o -Wl,-z,ibtplt\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\n#include <stdio.h>\n\nvoid hello();\nvoid world();\n\nint main() {\n  hello();\n  printf(\" \");\n  world();\n  printf(\"\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/c.o $t/b.so -Wl,-z,ibtplt\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/arch-x86_64-z-rewrite-endbr.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -fcf-protection || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -ffunction-sections -O -fcf-protection\nint foo() { return 3; }\nint bar() { return foo(); }\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -ffunction-sections -O -fcf-protection\nint main() {}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o\n$OBJDUMP -dr $t/exe1 > $t/log1\n\ngrep -A1 '<foo>:' $t/log1 | grep endbr64\ngrep -A1 '<bar>:' $t/log1 | grep endbr64\ngrep -A1 '<main>:' $t/log1 | grep endbr64\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o -Wl,-z,rewrite-endbr\n$OBJDUMP -dr $t/exe2 > $t/log2\n\ngrep -A1 '<foo>:' $t/log2 | grep nop\ngrep -A1 '<bar>:' $t/log2 | grep nop\ngrep -A1 '<main>:' $t/log2 | grep endbr64\n"
  },
  {
    "path": "test/arch-x86_64-z-rewrite-endbr2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -fcf-protection || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fno-function-sections -O -fcf-protection\nint foo() { return 3; }\nint bar() { return foo(); }\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -fno-function-sections -O -fcf-protection\nint main() {}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o\n$OBJDUMP -dr $t/exe1 > $t/log1\n\ngrep -A1 '<foo>:' $t/log1 | grep endbr64\ngrep -A1 '<bar>:' $t/log1 | grep endbr64\ngrep -A1 '<main>:' $t/log1 | grep endbr64\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o -Wl,-z,rewrite-endbr\n$OBJDUMP -dr $t/exe2 > $t/log2\n\ngrep -A1 '<foo>:' $t/log2 | grep nop\ngrep -A1 '<bar>:' $t/log2 | grep nop\ngrep -A1 '<main>:' $t/log2 | grep endbr64\n"
  },
  {
    "path": "test/arch-x86_64-z-rewrite-endbr3.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -fcf-protection || skip\n[ \"$QEMU\" == '' ] || skip\n\n# Check if Intel SDE CPU emulator is available\ncommand -v sde64 >& /dev/null || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -O -fcf-protection\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,-z,rewrite-endbr\nsde64 -cet 1 -- $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/arch-x86_64-z-shstk.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\necho endbr64 | $CC -o /dev/null -c -xassembler - 2> /dev/null || skip\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n.globl main\nmain:\nEOF\n\n$CC -B. -o $t/exe $t/a.o\nreadelf --notes $t/exe | not grep -w SHSTK\n\n$CC -B. -o $t/exe $t/a.o -Wl,-z,shstk\nreadelf --notes $t/exe | grep -w SHSTK\n"
  },
  {
    "path": "test/arch-x86_64-z-text.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# Skip if libc is musl\nis_musl && skip\n\ncat <<'EOF' | $CC -c -o $t/a.o -x assembler -\n.globl fn1\nfn1:\n  sub $8, %rsp\n  movabs ptr, %rax\n  call *%rax\n  add $8, %rsp\n  ret\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -fPIC -xc -\n#include <stdio.h>\n\nint fn1();\n\nint fn2() {\n  return 3;\n}\n\nvoid *ptr = fn2;\n\nint main() {\n  printf(\"%d\\n\", fn1());\n}\nEOF\n\n$CC -B. -pie -o $t/exe $t/a.o $t/b.o\n$QEMU $t/exe | grep 3\n\nreadelf --dynamic $t/exe | grep -F '(TEXTREL)'\nreadelf --dynamic $t/exe | grep '\\(FLAGS\\).*TEXTREL'\n"
  },
  {
    "path": "test/as-needed-dso.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/libfoo.so -shared -fPIC -Wl,-soname,libfoo.so -xc -\nint fn1() { return 42; }\nEOF\n\ncat <<EOF | $CC -o $t/libbar.so -shared -fPIC -Wl,-soname,libbar.so -xc -\nint fn1();\nint fn2() { return fn1(); }\nEOF\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint fn2();\nint main() { fn2(); }\nEOF\n\n$CC -B. -o $t/exe $t/a.o -L$t -Wl,--as-needed -lbar -lfoo\nreadelf -W --dynamic $t/exe > $t/log2\ngrep libbar $t/log2\nnot grep libfoo $t/log2\n"
  },
  {
    "path": "test/as-needed-dso2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/libfoo.so -shared -fPIC -Wl,-soname,libfoo.so -xc -\nint fn1() { return 42; }\nEOF\n\ncat <<EOF | $CC -o $t/libbar.so -shared -fPIC -Wl,-soname,libbar.so -xc - -L$t -lfoo\nint fn1();\nint fn2() { return fn1(); }\nEOF\n\ncat <<EOF | $CC -o $t/libbaz.so -shared -fPIC -Wl,-soname,libbaz.so -xc - -L$t -lbar\nint fn2();\nint fn3() { return fn2(); }\nEOF\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint fn3();\nint main() { fn3(); }\nEOF\n\n$CC -B. -o $t/exe $t/a.o -L$t -Wl,--as-needed -lbaz -lbar\nreadelf -W --dynamic $t/exe > $t/log2\n\nnot grep libfoo $t/log2\nnot grep libbar $t/log2\ngrep libbaz $t/log2\n"
  },
  {
    "path": "test/as-needed-weak.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -o $t/a.o -c -xc -\n__attribute__((weak)) int fn1();\n\nint main() {\n  if (fn1)\n    fn1();\n}\nEOF\n\ncat <<EOF | $CC -o $t/libfoo.so -shared -fPIC -Wl,-soname,libfoo.so -xc -\nint fn1() { return 42; }\nEOF\n\ncat <<EOF | $CC -o $t/libbar.so -shared -fPIC -Wl,-soname,libbar.so -xc -\nint fn2() { return 42; }\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -Wl,-no-as-needed -L$t -lbar -lfoo\n\nreadelf --dynamic $t/exe1 > $t/log1\ngrep -F 'Shared library: [libfoo.so]' $t/log1\ngrep -F 'Shared library: [libbar.so]' $t/log1\n\n$CC -B. -o $t/exe2 $t/a.o -Wl,-as-needed -L$t -lbar -lfoo\n\nreadelf --dynamic $t/exe2 > $t/log2\ngrep -F 'Shared library: [libfoo.so]' $t/log2\nnot grep -F 'Shared library: [libbar.so]' $t/log2\n"
  },
  {
    "path": "test/as-needed.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid fn1();\nint main() {\n  fn1();\n}\nEOF\n\ncat <<EOF | $CC -o $t/b.so -shared -fPIC -Wl,-soname,libfoo.so -xc -\nint fn1() { return 42; }\nEOF\n\ncat <<EOF | $CC -o $t/c.so -shared -fPIC -Wl,-soname,libbar.so -xc -\nint fn2() { return 42; }\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,--no-as-needed $t/b.so $t/c.so\n\nreadelf --dynamic $t/exe > $t/log\ngrep -F 'Shared library: [libfoo.so]' $t/log\ngrep -F 'Shared library: [libbar.so]' $t/log\n\n$CC -B. -o $t/exe $t/a.o -Wl,--as-needed $t/b.so $t/c.so\n\nreadelf --dynamic $t/exe > $t/log\ngrep -F 'Shared library: [libfoo.so]' $t/log\nnot grep -F 'Shared library: [libbar.so]' $t/log\n"
  },
  {
    "path": "test/audit.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o\nreadelf --dynamic $t/exe1 | not grep 'Audit library'\n\n$CC -B. -o $t/exe2 $t/a.o -Wl,--audit=foo\nreadelf --dynamic $t/exe2 | grep -F 'Audit library: [foo]'\n\n$CC -B. -o $t/exe3 $t/a.o -Wl,--audit=foo -Wl,--audit=bar\nreadelf --dynamic $t/exe3 | grep -F 'Audit library: [foo:bar]'\n"
  },
  {
    "path": "test/auxiliary.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n  .text\n  .globl _start\n_start:\n  nop\nEOF\n\n./mold -o $t/b.so $t/a.o -auxiliary foo -f bar -shared\n\nreadelf --dynamic $t/b.so > $t/log\ngrep -F 'Auxiliary library: [foo]' $t/log\ngrep -F 'Auxiliary library: [bar]' $t/log\n\nnot ./mold -o exe $t/a.o -f bar |& grep 'auxiliary may not be used without -shared'\n\n# -fuse-ld is ignored\n./mold -o exe $t/a.o -fuse-ld=mold\n"
  },
  {
    "path": "test/bno-symbolic.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# GCC produces buggy code for this test case on s390x.\n# https://sourceware.org/bugzilla/show_bug.cgi?id=29655\n[ $MACHINE = s390x ] && $CC -v |& grep -E '^gcc version 1[0-5]\\.' && skip\n\ncat <<EOF | $CC -c -fPIC -o$t/a.o -xc -\nint foo = 4;\n\nint get_foo() {\n  return foo;\n}\n\nvoid *bar() {\n  return bar;\n}\nEOF\n\n$CC -B. -shared -fPIC -o $t/b.so $t/a.o -Wl,-Bsymbolic -Wl,-Bno-symbolic\n\ncat <<EOF | $CC -c -o $t/c.o -xc - -fno-PIE\n#include <stdio.h>\n\nextern int foo;\nint get_foo();\nvoid *bar();\n\nint main() {\n  foo = 3;\n  printf(\"%d %d %d\\n\", foo, get_foo(), bar == bar());\n}\nEOF\n\n$CC -B. -no-pie -o $t/exe $t/c.o $t/b.so\n$QEMU $t/exe | grep '3 3 1'\n"
  },
  {
    "path": "test/bsymbolic-functions.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -xc -\nint foo = 4;\n\nint get_foo() { return foo; }\nvoid *bar() { return bar; }\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o -Wl,-Bsymbolic-functions\n\ncat <<EOF | $CC -c -o $t/c.o -xc - -fno-PIE\n#include <stdio.h>\n\nint foo = 3;\nint x = 5;\nint get_foo();\nvoid *bar() { return &x; }\n\nint main() {\n  printf(\"%d %d %d\\n\", foo, get_foo(), bar == bar());\n}\nEOF\n\n$CC -B. -no-pie -o $t/exe $t/c.o $t/b.so\n$QEMU $t/exe | grep '3 3 0'\n"
  },
  {
    "path": "test/bsymbolic-non-weak-functions.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -xc -\n__attribute__((weak)) int foo = 4;\nint bar = 4;\n__attribute__((weak)) int baz = 4;\n\nint get_foo1() { return foo; }\nint get_bar1() { return bar; }\n__attribute__((weak)) int get_baz1() { return baz; }\n\nint get_foo2() { return get_foo1(); }\nint get_bar2() { return get_bar1(); }\nint get_baz2() { return get_baz1(); }\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o -Wl,-Bsymbolic-non-weak-functions\n\ncat <<EOF | $CC -c -o $t/c.o -xc -\n#include <stdio.h>\n\nint foo = 3;\nint bar = 3;\nint baz = 3;\n\nint get_foo1() { return 7; }\nint get_bar1() { return 7; }\nint get_baz1() { return 7; }\n\nint get_foo2();\nint get_bar2();\nint get_baz2();\n\nint main() {\n  printf(\"%d %d %d %d %d %d\\n\", foo, bar, baz,\n         get_foo2(), get_bar2(), get_baz2());\n}\nEOF\n\n$CC -B. -o $t/exe $t/c.o $t/b.so\n$QEMU $t/exe | grep '^3 3 3 3 3 7$'\n"
  },
  {
    "path": "test/bsymbolic-non-weak.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -xc -\n__attribute__((weak)) int foo = 4;\nint bar = 4;\n__attribute__((weak)) int baz = 4;\n\nint get_foo1() { return foo; }\nint get_bar1() { return bar; }\n__attribute__((weak)) int get_baz1() { return baz; }\n\nint get_foo2() { return get_foo1(); }\nint get_bar2() { return get_bar1(); }\nint get_baz2() { return get_baz1(); }\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o -Wl,-Bsymbolic-non-weak\n\ncat <<EOF | $CC -c -o $t/c.o -xc -\n#include <stdio.h>\n\nint foo = 3;\nint bar = 3;\nint baz = 3;\n\nint get_foo1() { return 7; }\nint get_bar1() { return 7; }\nint get_baz1() { return 7; }\n\nint get_foo2();\nint get_bar2();\nint get_baz2();\n\nint main() {\n  printf(\"%d %d %d %d %d %d\\n\", foo, bar, baz,\n         get_foo2(), get_bar2(), get_baz2());\n}\nEOF\n\n$CC -B. -o $t/exe $t/c.o $t/b.so\n$QEMU $t/exe | grep '^3 3 3 3 4 7$'\n"
  },
  {
    "path": "test/bsymbolic.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -fPIC -o$t/a.o -xc -\nint foo = 4;\nint get_foo() { return foo; }\nEOF\n\n$CC -B. -shared -fPIC -o $t/b.so $t/a.o -Wl,-Bsymbolic\n\ncat <<EOF | $CC -c -o $t/c.o -xc - -fno-PIE\n#include <stdio.h>\n\nint foo = 3;\nint get_foo();\n\nint main() {\n  printf(\"%d %d\\n\", foo, get_foo());\n}\nEOF\n\n$CC -B. -no-pie -o $t/exe $t/c.o $t/b.so\n$QEMU $t/exe | grep '3 4'\n"
  },
  {
    "path": "test/build-id.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\necho 'int main() { return 0; }' | $CC -c -o $t/a.o -xc -\n\n$CC -B. -o $t/exe1 $t/a.o -Wl,-build-id\nreadelf -n $t/exe1 | grep 'GNU.*0x00000014.*NT_GNU_BUILD_ID'\n\n$CC -B. -o $t/exe2 $t/a.o -Wl,-build-id=uuid\nreadelf -nW $t/exe2 | grep -E 'Build ID: ............4...[89abcdef]'\n\n$CC -B. -o $t/exe3 $t/a.o -Wl,-build-id=md5\nreadelf -n $t/exe3 | grep 'GNU.*0x00000010.*NT_GNU_BUILD_ID'\n\n$CC -B. -o $t/exe4 $t/a.o -Wl,-build-id=sha1\nreadelf -n $t/exe4 | grep 'GNU.*0x00000014.*NT_GNU_BUILD_ID'\n\n$CC -B. -o $t/exe5 $t/a.o -Wl,-build-id=sha256\nreadelf -n $t/exe5 | grep 'GNU.*0x00000020.*NT_GNU_BUILD_ID'\n\n$CC -B. -o $t/exe6 $t/a.o -Wl,-build-id=fast\nreadelf -n $t/exe6 | grep 'GNU.*0x00000020.*NT_GNU_BUILD_ID'\n\n$CC -B. -o $t/exe7 $t/a.o -Wl,-build-id=0xdeadbeefdeadbeef\nreadelf -n $t/exe7 | grep 'Build ID: deadbeefdeadbeef'\n"
  },
  {
    "path": "test/canonical-plt.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# GCC produces buggy code for this test case on s390x.\n# https://sourceware.org/bugzilla/show_bug.cgi?id=29655\n[ $MACHINE = s390x ] && $CC -v |& grep -E '^gcc version 1[0-5]\\.' && skip\n\ncat <<EOF | $CC -o $t/a.so -fPIC -shared -xc -\nvoid *foo() {\n  return foo;\n}\n\nvoid *bar() {\n  return bar;\n}\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -fPIC\nvoid *bar();\n\nvoid *baz() {\n  return bar;\n}\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc - -fno-PIC\n#include <stdio.h>\n\nvoid *foo();\nvoid *bar();\nvoid *baz();\n\nint main() {\n  printf(\"%d %d %d\\n\", foo == foo(), bar == bar(), bar == baz());\n}\nEOF\n\n$CC -B. -no-pie -o $t/exe $t/a.so $t/b.o $t/c.o\n$QEMU $t/exe | grep '^1 1 1$'\n"
  },
  {
    "path": "test/cmdline.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nnot ./mold -zfoo |& grep 'unknown command line option: -zfoo'\nnot ./mold -z foo |& grep 'unknown command line option: -z foo'\nnot ./mold -abcdefg |& grep 'unknown command line option: -abcdefg'\nnot ./mold --abcdefg |& grep 'unknown command line option: --abcdefg'\n"
  },
  {
    "path": "test/color-diagnostics.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint foo();\nint main() { foo(); }\nEOF\n\nnot ./mold -o $t/exe $t/a.o --color-diagnostics |& not grep $'\\033'\nnot ./mold -o $t/exe $t/a.o --color-diagnostics=always |& grep $'\\033'\nnot ./mold -o $t/exe $t/a.o --color-diagnostics=never |& not grep $'\\033'\nnot ./mold -o $t/exe $t/a.o --color-diagnostics=auto |& not grep $'\\033'\n"
  },
  {
    "path": "test/comment.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.o\nreadelf -p .comment $t/exe | grep mold\nreadelf -SW $t/exe | grep -E '\\.comment.*\\bMS\\b'\n"
  },
  {
    "path": "test/common-archive.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fcommon -xc -c -o $t/a.o -\n#include <stdio.h>\n\nint foo;\nint bar;\nextern int baz;\n__attribute__((weak)) int two();\n\nint main() {\n  printf(\"%d %d %d %d\\n\", foo, bar, baz, two ? two() : -1);\n}\nEOF\n\ncat <<EOF | $CC -fcommon -xc -c -o $t/b.o -\nint foo = 5;\nEOF\n\ncat <<EOF | $CC -fcommon -xc -c -o $t/c.o -\nint bar;\nint two() { return 2; }\nEOF\n\ncat <<EOF | $CC -fcommon -xc -c -o $t/d.o -\nint baz;\nEOF\n\nrm -f $t/e.a\nar rcs $t/e.a $t/b.o $t/c.o $t/d.o\n\n$CC -B. -o $t/exe $t/a.o $t/e.a\n$QEMU $t/exe | grep '5 0 0 -1'\n\ncat <<EOF | $CC -fcommon -xc -c -o $t/f.o -\nint bar = 0;\nint baz = 7;\nint two() { return 2; }\nEOF\n\nrm -f $t/f.a\nar rcs $t/f.a $t/b.o $t/f.o\n\n$CC -B. -o $t/exe $t/a.o $t/f.a\n$QEMU $t/exe | grep '5 0 7 2'\n"
  },
  {
    "path": "test/common-ref.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fcommon -xc -c -o $t/a.o -\n#include <stdio.h>\n\nint bar;\n\nint main() {\n  printf(\"%d\\n\", bar);\n}\nEOF\n\ncat <<EOF | $CC -fcommon -xc -c -o $t/b.o -\nint foo;\nEOF\n\nrm -f $t/c.a\nar rcs $t/c.a $t/b.o\n\ncat <<EOF | $CC -fcommon -xc -c -o $t/d.o -\nint foo;\nint bar = 5;\nint get_foo() { return foo; }\nEOF\n\nrm -f $t/e.a\nar rcs $t/e.a $t/d.o\n\n$CC -B. -o $t/exe $t/a.o $t/c.a $t/e.a\n$QEMU $t/exe | grep 5\n"
  },
  {
    "path": "test/common-symbols.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fcommon -xc -c -o $t/a.o -\nint foo;\nint bar;\nint baz = 42;\nEOF\n\ncat <<EOF | $CC -fcommon -xc -c -o $t/b.o -\n#include <stdio.h>\n\nint foo;\nint bar = 5;\nint baz;\n\nint main() {\n  printf(\"%d %d %d\\n\", foo, bar, baz);\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o\n$QEMU $t/exe | grep '0 5 42'\n\nreadelf --sections $t/exe > $t/log\ngrep '.common .*NOBITS' $t/log\n"
  },
  {
    "path": "test/common.inc",
    "content": "# -*- mode: sh -*-\n\n# Make sure all commands print out messages in English\nexport LC_ALL=C\n\ncanonical_name() {\n  case $1 in\n  i?86) echo i686 ;;\n  amd64) echo x86_64 ;;\n  armeb*) echo armeb ;;\n  arm*) echo arm ;;\n  powerpc) echo ppc ;;\n  powerpc64) echo ppc64 ;;\n  powerpc64le) echo ppc64le ;;\n  *) echo $1\n  esac\n}\n\nif [ -z \"$MACHINE\" ]; then\n  MACHINE=$(canonical_name $(uname -m))\nfi\n\n# Set tool names\nif [ -z \"$TRIPLE\" ]; then\n  TESTDIR=out/test/$MACHINE\n  CC=\"${TEST_CC:-cc}\"\n  CXX=\"${TEST_CXX:-c++}\"\n  GCC=\"${TEST_GCC:-gcc}\"\n  GXX=\"${TEST_GXX:-g++}\"\n  OBJDUMP=objdump\n  OBJCOPY=objcopy\n  STRIP=strip\n  QEMU=\nelif [ \"$TRIPLE\" = powerpc64le-linux-gnu -a \"$CPU\" = power10 ]; then\n  MACHINE=ppc64le\n  TESTDIR=out/test/ppc64le-power10\n  CC=\"${TEST_CC:-$TRIPLE-gcc} -mcpu=power10\"\n  CXX=\"${TEST_CXX:-$TRIPLE-g++} -mcpu=power10\"\n  GCC=\"${TEST_GCC:-$TRIPLE-gcc} -mcpu=power10\"\n  GXX=\"${TEST_GXX:-$TRIPLE-g++} -mcpu=power10\"\n  OBJDUMP=\"$TRIPLE-objdump\"\n  OBJCOPY=\"$TRIPLE-objcopy\"\n  STRIP=\"$TRIPLE-strip\"\n  QEMU=\"qemu-ppc64le -L /usr/$TRIPLE -cpu power10\"\nelse\n  MACHINE=$(canonical_name $(echo $TRIPLE | sed 's/-.*//'))\n  TESTDIR=out/test/$MACHINE\n  CC=\"${TEST_CC:-$TRIPLE-gcc}\"\n  CXX=\"${TEST_CXX:-$TRIPLE-g++}\"\n  GCC=\"${TEST_GCC:-$TRIPLE-gcc}\"\n  GXX=\"${TEST_GXX:-$TRIPLE-g++}\"\n  OBJDUMP=\"$TRIPLE-objdump\"\n  OBJCOPY=\"$TRIPLE-objcopy\"\n  STRIP=\"$TRIPLE-strip\"\n\n  case $MACHINE in\n  i686)   QEMU=\"qemu-i386 -L /usr/$TRIPLE\" ;;\n  sh4aeb) QEMU=\"qemu-sh4eb -L /usr/$TRIPLE\" ;;\n  *)      QEMU=\"qemu-$MACHINE -L /usr/$TRIPLE\" ;;\n  esac\nfi\n\ntestname=$(basename \"$0\" .sh)\nt=$TESTDIR/$testname\nmkdir -p $t\n\ncase $MACHINE in\nx86_64 | i686 | arm | armeb)\n  tlsdesc_opt=-mtls-dialect=gnu2 ;;\naarch64 | riscv* | loongarch*)\n  tlsdesc_opt=-mtls-dialect=desc ;;\nesac\n\n# We want to use GNU's binutils even on BSDs. `pkg install binutils`\n# installs GNU binutils under /usr/local/bin.\nif [ \"$(uname)\" = FreeBSD ]; then\n  export PATH=\"/usr/local/bin:$PATH\"\nfi\n\n# Common functions\nnot() {\n  if \"$@\"; then return 1; else return 0; fi\n}\n\ntest_cflags() {\n  echo 'int main() {}' | $CC -B. \"$@\" -o /dev/null -xc - >& /dev/null\n}\n\ntest_cxxflags() {\n  echo 'int main() {}' | $CXX -B. \"$@\" -o /dev/null -xc++ - >& /dev/null\n}\n\nis_musl() {\n  { ldd --version; true; } |& grep musl > /dev/null\n}\n\nsupports_ifunc() {\n  ! is_musl &&\n    echo 'void x() __attribute__((ifunc(\"y\"))); void *y() { return 0; }' |\n    $CC -c -o /dev/null -xc - >& /dev/null\n}\n\nsupports_tlsdesc() {\n  # musl's tlsdesc on arm32 seems to be broken\n  [[ $MACHINE = arm* ]] && is_musl && return 1\n\n  # FreeBSD's loader doesn't seem to support TLSDESC relocs in an executable\n  [ \"$(uname)\" = FreeBSD ] && return 1\n\n  [ \"$tlsdesc_opt\" = '' ] && return 1\n\n  # TLSDESC may not be supported on old systems. Compile a DSO with\n  # it to see if it is actually supported.\n  echo '_Thread_local int x; int y() { return x; }' |\n    $CC -shared -fPIC -xc -o $t/tlsdesc.so $tlsdesc_opt - 2> /dev/null ||\n    return 1\n  echo 'int y(); int main() { y(); }' | $CC -xc -c -o $t/tlsdesc.o -\n  $CC -o $t/tlsdesc $t/tlsdesc.o $t/tlsdesc.so\n  $QEMU $t/tlsdesc 2> /dev/null\n}\n\non_qemu() {\n  [ \"$QEMU\" != '' ] || grep -w qemu /proc/cpuinfo >& /dev/null\n}\n\nskip() {\n  echo skipped\n  trap - EXIT\n  exit 0\n}\n\non_error() {\n  code=$?\n  echo \"command failed: $1: $BASH_COMMAND\"\n  trap - EXIT\n  exit $code\n}\n\non_exit() {\n  echo OK\n  exit 0\n}\n\ntrap 'on_error $LINENO' ERR\ntrap on_exit EXIT\n\n# Print out the startup message\necho -n \"Testing $testname ... \"\nset -o pipefail\nset -x\n"
  },
  {
    "path": "test/compress-debug-sections-zstd.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# arm-linux-gnueabihf-objcopy crashes on x86-64\n[[ $MACHINE = arm* ]] && skip\n[ $MACHINE = riscv32 ] && skip\n\ncommand -v zstdcat >& /dev/null || skip\n\ncat <<EOF | $CC -c -g -o $t/a.o -xc -\n#include <stdio.h>\n\nint main() {\n  printf(\"Hello world\\n\");\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,--compress-debug-sections=zstd\n$OBJCOPY --dump-section .debug_info=$t/debug_info $t/exe\ndd if=$t/debug_info of=$t/debug_info.zstd bs=24 skip=1 status=none\nzstdcat $t/debug_info.zstd > /dev/null\n"
  },
  {
    "path": "test/compress-debug-sections.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -g -o $t/a.o -xc -\n#include <stdio.h>\nint main() { printf(\"Hello world\\n\"); }\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,--compress-debug-sections=zlib\n\nreadelf -WS $t/exe > $t/log\ngrep '\\.debug_info .* [Cx] ' $t/log\ngrep '\\.debug_str .* MS[Cx] ' $t/log\n"
  },
  {
    "path": "test/compressed-debug-info.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncommand -v dwarfdump >& /dev/null || skip\n\ncat <<EOF | $CXX -c -o $t/a.o -g -gz=zlib -xc++ -\nint main() {\n  return 0;\n}\nEOF\n\ncat <<EOF | $CXX -c -o $t/b.o -g -gz=zlib -xc++ -\nint foo() {\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o\ndwarfdump $t/exe > /dev/null\nreadelf --sections $t/exe | grep -F .debug_info\n"
  },
  {
    "path": "test/copyrel-alignment.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = ppc64 ] && skip\n[ $MACHINE = ppc64le ] && skip\n[[ $MACHINE = loongarch* ]] && skip\n\ncat <<EOF | $CC -fPIC -shared -o $t/a.so -xc -\n__attribute__((aligned(32))) int foo = 5;\nEOF\n\ncat <<EOF | $CC -fPIC -shared -o $t/b.so -xc -\n__attribute__((aligned(8))) int foo = 5;\nEOF\n\ncat <<EOF | $CC -fPIC -shared -o $t/c.so -xc -\n__attribute__((aligned(256))) int foo = 5;\nEOF\n\ncat <<EOF | $CC -fno-PIE -o $t/d.o -c -xc -\n#include <stdio.h>\nextern int foo;\nint main() { printf(\"%d %p\\n\", foo, &foo); }\nEOF\n\n$CC -B. -o $t/exe1 $t/d.o $t/a.so -no-pie\n$QEMU $t/exe1 > /dev/null\nreadelf -W --sections $t/exe1 | grep '\\.copyrel.* 32$'\n\n$CC -B. -o $t/exe2 $t/d.o $t/b.so -no-pie\n$QEMU $t/exe2 > /dev/null\nreadelf -W --sections $t/exe2 | grep '\\.copyrel.* 8$'\n\n$CC -B. -o $t/exe3 $t/d.o $t/c.so -no-pie\n$QEMU $t/exe3 > /dev/null\nreadelf -W --sections $t/exe3 | grep '\\.copyrel.* 256$'\n"
  },
  {
    "path": "test/copyrel-norelro.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[[ $MACHINE = ppc64* ]] && skip\n[[ $MACHINE = loongarch* ]] && skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc -fno-PIE -\n#include <stdio.h>\n\nextern char msg[100];\n\nint main() {\n  printf(\"%s\\n\", msg);\n}\nEOF\n\ncat <<EOF | $CC -B. -fPIC -shared -o $t/b.so -xc -\n__attribute__((section (\".data.rel.ro\"))) char msg[100] = \"Hello world\";\nEOF\n\n$CC -B. $t/a.o $t/b.so -o $t/exe1 -no-pie -Wl,-z,relro\nreadelf -W --sections $t/exe1 | grep -F .copyrel.rel.ro\n\n$CC -B. $t/a.o $t/b.so -o $t/exe2 -no-pie -Wl,-z,norelro\nreadelf -W --sections $t/exe2 | not grep -F .copyrel.rel.ro\n"
  },
  {
    "path": "test/copyrel-protected.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = ppc64 ] && skip\n[ $MACHINE = ppc64le ] && skip\n[[ $MACHINE = loongarch* ]] && skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc -fno-PIE -\nextern int foo;\n\nint main() {\n  return foo;\n}\nEOF\n\ncat <<EOF | $CC -shared -o $t/b.so -xc -\n__attribute__((visibility(\"protected\"))) int foo;\nEOF\n\nnot $CC -B. $t/a.o $t/b.so -o $t/exe -no-pie |&\n  grep -F 'cannot create a copy relocation for protected symbol'\n"
  },
  {
    "path": "test/copyrel-relro.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -fno-PIE -\n#include <setjmp.h>\n#include <signal.h>\n#include <stdio.h>\n\nextern const char readonly[100];\nextern char readwrite[100];\n\nstatic int segv = 0;\nstatic jmp_buf buf;\n\nvoid handler(int sig) {\n  segv = 1;\n  longjmp(buf, 1);\n}\n\nint main() {\n  signal(SIGSEGV, handler);\n\n  readwrite[0] = 5;\n  int x = segv;\n\n  if (setjmp(buf) == 0)\n    *(char *)readonly = 5;\n  int y = segv;\n\n  printf(\"sigsegv %d %d\\n\", x, y);\n}\nEOF\n\ncat <<EOF | $CC -fPIC -shared -o $t/b.so -xc -\nconst char readonly[100] = \"abc\";\nchar readwrite[100] = \"abc\";\nEOF\n\n$CC -B. $t/a.o $t/b.so -o $t/exe -no-pie\n$QEMU $t/exe | grep '^sigsegv 0 1$'\n"
  },
  {
    "path": "test/copyrel-relro2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -fno-PIE -\n#include <setjmp.h>\n#include <signal.h>\n#include <stdio.h>\n\nextern char readonly[100];\nextern char readwrite[100];\n\nstatic int segv = 0;\nstatic jmp_buf buf;\n\nvoid handler(int sig) {\n  segv = 1;\n  longjmp(buf, 1);\n}\n\nint main() {\n  signal(SIGSEGV, handler);\n\n  readwrite[0] = 5;\n  int x = segv;\n\n  if (setjmp(buf) == 0)\n    *(char *)readonly = 5;\n  int y = segv;\n\n  printf(\"sigsegv %d %d\\n\", x, y);\n}\nEOF\n\ncat <<EOF | $CC -B. -fPIC -shared -o $t/b.so -xc -\n__attribute__((section (\".data.rel.ro\"))) char readonly[100] = \"abc\";\nchar readwrite[100] = \"abc\";\nEOF\n\n$CC -B. $t/a.o $t/b.so -o $t/exe -no-pie\n$QEMU $t/exe | grep '^sigsegv 0 1$'\n"
  },
  {
    "path": "test/copyrel.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fno-PIC -o $t/a.o -c -xc -\n#include <stdio.h>\n\nextern int foo;\nextern int *get_bar();\n\nint main() {\n  printf(\"%d %d %d\\n\", foo, *get_bar(), &foo == get_bar());\n  return 0;\n}\nEOF\n\ncat <<EOF | $CC -fno-PIC -o $t/b.o -c -xc -\nextern int bar;\nint *get_bar() { return &bar; }\nEOF\n\ncat <<EOF | $CC -fPIC -o $t/c.o -c -xc -\nint foo = 42;\nextern int bar __attribute__((alias(\"foo\")));\nextern int baz __attribute__((alias(\"foo\")));\nEOF\n\n$CC -B. -shared -o $t/c.so $t/c.o\n$CC -B. -no-pie -o $t/exe $t/a.o $t/b.o $t/c.so\n$QEMU $t/exe | grep '42 42 1'\n"
  },
  {
    "path": "test/crel.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# Currently, CREL is not supported on REL-type targets\n[[ $MACHINE = arm* ]] && skip\n[ $MACHINE = i686 ] && skip\n\n[ \"$CC\" = cc ] || skip\nclang -c -xc -o /dev/null /dev/null -Wa,--crel,--allow-experimental-crel || skip\n\ncat <<EOF | clang -o $t/a.o -c -xc - -Wa,--crel,--allow-experimental-crel\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\nclang -B. -o $t/exe $t/a.o\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/ctors-in-init-array.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\n\nstatic void ctor1() { printf(\"ctor1 \"); }\nstatic void ctor2() { printf(\"ctor2 \"); }\nstatic void ctor3() { printf(\"ctor3 \"); }\nstatic void ctor4() { printf(\"ctor4 \"); }\n\nstatic void dtor1() { printf(\"dtor1 \"); }\nstatic void dtor2() { printf(\"dtor2 \"); }\nstatic void dtor3() { printf(\"dtor3 \"); }\nstatic void dtor4() { printf(\"dtor4 \"); }\n\n__attribute__((aligned(sizeof(void *)), section(\".ctors.65435\")))\nvoid (*ctors65435[])()  = { ctor1 };\n\n__attribute__((aligned(sizeof(void *)), section(\".ctors.65433\")))\nvoid (*ctors65433[])()  = { ctor2 };\n\n__attribute__((aligned(sizeof(void *)), section(\".ctors\")))\nvoid (*ctors[])()  = { ctor4, ctor3 };\n\n__attribute__((aligned(sizeof(void *)), section(\".dtors\")))\nvoid (*dtors[])()  = { dtor1, dtor2 };\n\n__attribute__((aligned(sizeof(void *)), section(\".dtors.65433\")))\nvoid (*dtors65433[])()  = { dtor3 };\n\n__attribute__((aligned(sizeof(void *)), section(\".dtors.65435\")))\nvoid (*dtors65435[])()  = { dtor4 };\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\n#include <stdio.h>\n\n__attribute__((constructor(101)))\nstatic void init1() { printf(\"init1 \"); }\n\n__attribute__((constructor))\nstatic void init2() { printf(\"init2 \"); }\n\n__attribute__((destructor(101)))\nstatic void fini1() { printf(\"fini1 \"); }\n\n__attribute__((destructor))\nstatic void fini2() { printf(\"fini2 \"); }\n\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o\n$QEMU $t/exe | grep 'ctor1 init1 ctor2 ctor3 ctor4 init2 fini2 dtor1 dtor2 dtor3 fini1 dtor4'\n"
  },
  {
    "path": "test/dead-debug-sections.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncommand -v dwarfdump >& /dev/null || skip\n\ncat <<EOF | $CXX -c -o $t/a.o -g -xc++ -\nextern const char *msg;\nstruct Foo {\n  Foo() { msg = \"Hello world\"; }\n};\nFoo x;\nEOF\n\ncat <<EOF | $CXX -c -o $t/b.o -g -xc++ -\nextern const char *msg;\nstruct Foo {\n  Foo() { msg = \"Hello world\"; }\n};\nFoo y;\nEOF\n\ncat <<EOF | $CXX -o $t/c.o -c -xc++ -g -\n#include <cstdio>\nconst char *msg;\nint main() { printf(\"%s\\n\", msg); }\nEOF\n\n$CXX -o $t/exe $t/a.o $t/b.o $t/c.o -g\n$QEMU $t/exe | grep 'Hello world'\n\ndwarfdump $t/exe > /dev/null\n"
  },
  {
    "path": "test/debug-macro-section.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF > $t/a.h\n#define A 23\n#define B 99\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -I$t -g3\n#include \"a.h\"\nextern int z();\nint main () { return z() - 122; }\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc - -I$t -g3\n#include \"a.h\"\nint z()  { return A + B; }\nEOF\n\n$CC -B. -o $t/exe $t/b.o $t/c.o\n$OBJDUMP --dwarf=macro $t/exe | not grep 'DW_MACRO_import -.* 0x0$'\n"
  },
  {
    "path": "test/default-symver-version-script.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid foo() {}\nEOF\n\necho '{ global: foo; local: *; };' > $t/b.ver\n\n$CC -B. -o $t/c.so -shared $t/a.o -Wl,--default-symver -Wl,--version-script=$t/b.ver\nreadelf --dyn-syms $t/c.so | grep -F ' foo@@c.so'\n"
  },
  {
    "path": "test/default-symver.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid foo() {}\nEOF\n\n$CC -B. -o $t/b.so -shared $t/a.o -Wl,-default-symver\nreadelf --dyn-syms $t/b.so | grep ' foo@@b\\.so'\n\n$CC -B. -o $t/b.so -shared $t/a.o \\\n  -Wl,--soname=bar -Wl,-default-symver\nreadelf --dyn-syms $t/b.so | grep ' foo@@bar'\n"
  },
  {
    "path": "test/defsym-lto.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -flto || skip\n\ncat <<EOF | $CC -flto -fPIC -o $t/a.o -c -xc -\n#include <stdio.h>\n\nextern void live_func();\nvoid dead_func() {\n  printf(\"OK\\n\");\n}\n\nint main() {\n  live_func();\n}\nEOF\n\n$CC -B. -flto -o $t/exe $t/a.o -Wl,-defsym,live_func=dead_func\n\n$QEMU $t/exe | grep \"^OK$\"\n"
  },
  {
    "path": "test/defsym-missing-symbol.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint main() {}\nEOF\n\nnot $CC -B. -o $t/exe $t/a.o -Wl,-defsym=foo=bar |&\n  grep 'undefined symbol: bar'\n"
  },
  {
    "path": "test/defsym.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -o $t/a.o -c -xc -\n#include <stdio.h>\nextern char foo;\nextern char bar;\nvoid baz();\n\nvoid print() {\n  printf(\"Hello %p %p\\n\", &foo, &bar);\n}\n\nint main() {\n  baz();\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -pie -Wl,-defsym=foo=16 \\\n  -Wl,-defsym=bar=0x2000 -Wl,-defsym=baz=print\n\n$QEMU $t/exe | grep '^Hello 0x10 0x2000$'\n"
  },
  {
    "path": "test/defsym2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -o $t/a.o -c -xc -\nvoid foo() {}\nEOF\n\n$CC -B. -o $t/b.so -shared -Wl,-defsym=bar=foo $t/a.o\nnm -D $t/b.so | grep 'bar'\n"
  },
  {
    "path": "test/demangle-cpp.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -c -o $t/a.o -xc -\nvoid _ZN2ns7versionEv();\nint main() { _ZN2ns7versionEv(); }\nEOF\n\nnot $CC -B. -o $t/exe1 $t/a.o |& grep -F 'ns::version()'\n\ncat <<'EOF' | $CC -c -o $t/b.o -xc -\nvoid _ZN2ns7versionEv();\nint main() { _ZN2ns7versionEv(); }\n__attribute__((section(\".comment\"))) char str[] = \"rustc version x.y.z\\n\";\nEOF\n\nnot $CC -B. -o $t/exe2 $t/b.o |& grep -F 'ns::versionv'\n"
  },
  {
    "path": "test/demangle-rust.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -c -o $t/a.o -xc -\nvoid _RNCINkXs25_NgCsbmNqQUJIY6D_4core5sliceINyB9_4IterhENuNgNoBb_4iter8iterator8Iterator9rpositionNCNgNpB9_6memchr7memrchrs_0E0Bb_();\n\nint main() {\n  _RNCINkXs25_NgCsbmNqQUJIY6D_4core5sliceINyB9_4IterhENuNgNoBb_4iter8iterator8Iterator9rpositionNCNgNpB9_6memchr7memrchrs_0E0Bb_();\n}\nEOF\n\nnot $CC -B. -o $t/exe $t/a.o |&\n  grep -F '<core::slice::Iter<u8> as core::iter::iterator::Iterator>::rposition::<core::slice::memchr::memrchr::{closure#1}>::{closure#0}'\n"
  },
  {
    "path": "test/demangle.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc++ -\nint foo(int, int);\nint main() {\n  foo(3, 4);\n}\nEOF\n\nnot $CC -B. -o $t/exe $t/a.o -Wl,-no-demangle |&\n  grep 'undefined symbol: _Z3fooii$'\n\nnot $CC -B. -o $t/exe $t/a.o -Wl,-demangle |&\n  grep -E 'undefined symbol: foo\\(int, int\\)$'\n\nnot $CC -B. -o $t/exe $t/a.o |&\n  grep -E 'undefined symbol: foo\\(int, int\\)$'\n\ncat <<EOF | $CC -c -o $t/b.o -xc -\nextern int Pi;\nint main() {\n  return Pi;\n}\nEOF\n\nnot $CC -B. -o $t/exe $t/b.o -Wl,-demangle |&\n  grep 'undefined symbol: Pi$'\n"
  },
  {
    "path": "test/depaudit.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o\nreadelf --dynamic $t/exe1 | not grep 'Dependency audit library'\n\n$CC -B. -o $t/exe2 $t/a.o -Wl,--depaudit=libdepaudit.so\nreadelf --dynamic $t/exe2 | grep -F 'Dependency audit library: [libdepaudit.so]'\n\n$CC -B. -o $t/exe3 $t/a.o -Wl,--depaudit=foo -Wl,-P,bar\nreadelf --dynamic $t/exe3 | grep -F 'Dependency audit library: [foo:bar]'\n"
  },
  {
    "path": "test/depaudit2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -B. -shared -o $t/a.so -xc - -fPIC\n#include <stdio.h>\n\nunsigned la_version(unsigned v) {\n  fprintf(stderr, \"version=%d\\n\", v);\n  return 0;\n}\n\nvoid foo() {}\nEOF\n\ncat <<'EOF' | $CC -B. -shared -o $t/b.so -xc - -fPIC -Wl,--audit=$t/a.so\nvoid foo();\nvoid bar() { foo(); }\nEOF\n\ncat <<'EOF' | $CC -c -o $t/c.o -xc -\nvoid bar();\nint main() { bar(); }\nEOF\n\n$CC -B. -o $t/exe1 $t/c.o $t/b.so -Wl,--allow-shlib-undefined\nreadelf --dynamic $t/exe1 | grep 'Dependency audit library:..*/a.so'\n\n$CC -B. -o $t/exe2 $t/c.o $t/b.so -Wl,--depaudit=foo -Wl,--allow-shlib-undefined\nreadelf --dynamic $t/exe2 | grep 'Dependency audit library:..*foo:.*/a.so'\n"
  },
  {
    "path": "test/dependency-file-lto.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -flto -fno-fat-lto-objects || skip\n\ncat <<EOF | $CC -flto -o $t/a.o -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -flto -o $t/exe $t/a.o -Wl,-dependency-file=$t/dep\n\ngrep '/exe:.*/a.o ' $t/dep\ngrep '/a.o:$' $t/dep\nnot grep '^/tmp' $t/dep\n"
  },
  {
    "path": "test/dependency-file-response-file.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\necho \"$t/a.o -Wl,-dependency-file=$t/dep\" > $t/rsp\n\n$CC -B. -o $t/exe @$t/rsp\n\ngrep '/exe:.*/a.o ' $t/dep\ngrep '/a.o:$' $t/dep\nnot grep '^/tmp' $t/dep\n"
  },
  {
    "path": "test/dependency-file.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,-dependency-file=$t/dep\n\ngrep  \"dependency-file/exe:.*/a.o \" $t/dep\ngrep  \".*/a.o:$\" $t/dep\n"
  },
  {
    "path": "test/disable-new-dtags.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -fPIC -\nvoid foo() {}\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o -Wl,-rpath=/foo\nreadelf --dynamic $t/b.so | grep 'RUNPATH.*/foo'\n\n$CC -B. -shared -o $t/b.so $t/a.o -Wl,-rpath=/foo -Wl,-enable-new-dtags\nreadelf --dynamic $t/b.so | grep 'RUNPATH.*/foo'\n\n$CC -B. -shared -o $t/b.so $t/a.o -Wl,-rpath=/foo -Wl,-disable-new-dtags\nreadelf --dynamic $t/b.so | grep 'RPATH.*/foo'\n"
  },
  {
    "path": "test/discard-section.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n__attribute__((section(\".foo\"))) int foo;\n__attribute__((section(\".bar\"))) int bar;\nint main() {}\nEOF\n\n$CC -B. -o $t/exe0 $t/a.o\nreadelf -SW $t/exe0 | grep -F .foo\nreadelf -SW $t/exe0 | grep -F .bar\n\n$CC -B. -o $t/exe1 $t/a.o -Wl,--discard-section=.foo\nreadelf -SW $t/exe1 | not grep -F .foo\nreadelf -SW $t/exe1 | grep -F .bar\n\n$CC -B. -o $t/exe2 $t/a.o -Wl,--discard-section=.foo,--discard-section=.bar,--no-discard-section=.foo\nreadelf -SW $t/exe2 | grep -F .foo\nreadelf -SW $t/exe2 | not grep -F .bar\n"
  },
  {
    "path": "test/discard.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[[ $MACHINE = riscv* ]] && skip\n[[ $MACHINE = loongarch* ]] && skip\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -Wa,-L -\n  .text\n  .globl _start\n_start:\n  nop\nfoo:\n  nop\n.Lbar:\n  nop\nEOF\n\n./mold -o $t/exe $t/a.o\nreadelf --symbols $t/exe > $t/log\ngrep -F _start $t/log\ngrep -F foo $t/log\ngrep -F .Lbar $t/log\n\n./mold -o $t/exe $t/a.o --discard-locals\nreadelf --symbols $t/exe > $t/log\ngrep -F _start $t/log\ngrep -F foo $t/log\nnot grep -F .Lbar $t/log\n\n./mold -o $t/exe $t/a.o --discard-all\nreadelf --symbols $t/exe > $t/log\ngrep -F _start $t/log\nnot grep -F foo $t/log\nnot grep -F .Lbar $t/log\n\n./mold -o $t/exe $t/a.o --strip-all\nreadelf --symbols $t/exe > $t/log\nnot grep -F _start $t/log\nnot grep -F foo $t/log\nnot grep -F .Lbar $t/log\n"
  },
  {
    "path": "test/dso-undef.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -o $t/a.o -c -xc -\nextern int foo;\nint bar = 5;\nint baz() { return foo; }\nEOF\n\n$CC -B. -o $t/b.so -shared $t/a.o\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\nint foo = 3;\nEOF\n\nrm -f $t/d.a\nar rcs $t/d.a $t/c.o\n\ncat <<EOF | $CC -o $t/e.o -c -xc -\nextern int bar;\nint main() {\n  return bar - 5;\n}\nEOF\n\n$CC -B. -o $t/exe $t/b.so $t/d.a $t/e.o\nreadelf --dyn-syms $t/exe | grep -E ' foo(@@)?$'\n"
  },
  {
    "path": "test/dt-init.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = riscv64 -o $MACHINE = riscv32 ] && skip\n[[ $MACHINE = loongarch* ]] && skip\n\n# musl libc does not support init/fini on ARM\n# https://github.com/rui314/mold/issues/951\n[[ $MACHINE = arm* -o $MACHINE = aarch64 ]] && is_musl && skip\n\ncat <<EOF | $CC -c -fPIC -o $t/a.o -xc -\nvoid keep();\n\nint main() {\n  keep();\n}\nEOF\n\ncat <<EOF | $CC -c -fPIC -o $t/b.o -xc -\n#include <stdio.h>\n\nvoid init() {\n  printf(\"init\\n\");\n}\n\nvoid fini() {\n  printf(\"fini\\n\");\n}\n\nvoid keep() {}\nEOF\n\n$CC -B. -o $t/c.so -shared $t/b.o\n$CC -B. -o $t/d.so -shared $t/b.o -Wl,-init,init -Wl,-fini,fini\n\n$CC -B. -o $t/exe1 $t/a.o $t/c.so\n$CC -B. -o $t/exe2 $t/a.o $t/d.so\n\n$QEMU $t/exe1 > $t/log1\n$QEMU $t/exe2 > $t/log2\n\nnot grep init $t/log1\nnot grep fini $t/log1\n\ngrep init $t/log2\ngrep fini $t/log2\n"
  },
  {
    "path": "test/dt-needed.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\nvoid foo() {}\nEOF\n\n$CC -B. -shared -o $t/libfoo.so $t/a.o -Wl,--soname,libfoo\n$CC -B. -shared -o $t/libbar.so $t/a.o\n\ncat <<EOF | $CC -c -o $t/b.o -xc -\nvoid foo();\nint main() { foo(); }\nEOF\n\n$CC -B. -o $t/exe $t/b.o $t/libfoo.so\nreadelf --dynamic $t/exe | grep -F 'Shared library: [libfoo]'\n\n$CC -B. -o $t/exe $t/b.o -L $t -lfoo\nreadelf --dynamic $t/exe | grep -F 'Shared library: [libfoo]'\n\n$CC -B. -o $t/exe $t/b.o $t/libbar.so\nreadelf --dynamic $t/exe | grep -E 'Shared library: \\[.*dt-needed/libbar\\.so\\]'\n\n$CC -B. -o $t/exe $t/b.o -L$t -lbar\nreadelf --dynamic $t/exe | grep -F 'Shared library: [libbar.so]'\n"
  },
  {
    "path": "test/duplicate-error-archive.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid foo() {}\nEOF\n\nrm -f $t/b.a\nar rcs $t/b.a $t/a.o\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\nvoid foo();\nint main() { foo(); }\nEOF\n\n$CC -B. -o $t/exe $t/c.o $t/b.a $t/b.a\n\nnot $CC -B. -o $t/exe $t/c.o -Wl,--push-state,--whole-archive \\\n  $t/b.a $t/b.a -Wl,--pop-state 2> $t/log\n\ngrep 'duplicate symbol:.* foo' $t/log\n"
  },
  {
    "path": "test/duplicate-error-gc-sections.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nnm mold | grep '__tsan_init' && skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid foo() {}\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\nint main() {}\nEOF\n\nnot $CC -B. -o $t/exe1 $t/a.o $t/a.o $t/b.o |&\n  grep 'duplicate symbol.*: foo$'\n\nnot $CC -B. -o $t/exe2 $t/a.o $t/a.o $t/b.o -Wl,-gc-sections |&\n  grep 'duplicate symbol.*: foo$'\n"
  },
  {
    "path": "test/duplicate-error-lto.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nnm mold | grep '__tsan_init' && skip\ntest_cflags -flto || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -flto\nvoid foo() {}\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -flto\nint main() {}\nEOF\n\nnot $CC -B. -o $t/exe1 $t/a.o $t/a.o $t/b.o -flto |&\n  grep 'duplicate symbol.*: foo$'\n"
  },
  {
    "path": "test/duplicate-error.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n  .text\n  .globl main\nmain:\n  nop\nEOF\n\nnot ./mold -o $t/exe $t/a.o $t/a.o |&\n  grep 'duplicate symbol: .*\\.o: .*\\.o: main'\n"
  },
  {
    "path": "test/dynamic-dt-debug.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.o\nreadelf --dynamic $t/exe > $t/log\ngrep -F '(DEBUG)' $t/log\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\nvoid foo() {}\nEOF\n\n$CC -B. -o $t/c.so $t/b.o -shared\nreadelf --dynamic $t/c.so | not grep -F '(DEBUG)'\n"
  },
  {
    "path": "test/dynamic-linker.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -x assembler -\n.globl _start\n_start:\nEOF\n\n./mold -o $t/exe1 $t/a.o\nreadelf -WS $t/exe1 | not grep -F .interp\n\n./mold -o $t/exe2 $t/a.o --dynamic-linker=/foo/bar\nreadelf -WS $t/exe2 | grep -F .interp\n\n./mold -o $t/exe3 $t/a.o --dynamic-linker=/foo/bar -static\nreadelf -WS $t/exe3 | not grep -F .interp\n"
  },
  {
    "path": "test/dynamic-list-data.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint foo = 5;\nvoid bar() {}\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,-dynamic-list-data\nreadelf -W --dyn-syms $t/exe > $t/log\ngrep -w foo $t/log\nnot grep -w bar $t/log\n"
  },
  {
    "path": "test/dynamic-list.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid foo() {}\nvoid bar() {}\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.o\n\nreadelf --dyn-syms $t/exe > $t/log\nnot grep ' foo' $t/log\nnot grep ' bar' $t/log\n\ncat <<EOF > $t/dyn\n{ foo; bar; };\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -Wl,-dynamic-list=$t/dyn\n\nreadelf --dyn-syms $t/exe1 > $t/log1\ngrep ' foo' $t/log1\ngrep ' bar' $t/log1\n\n$CC -B. -o $t/exe2 $t/a.o -Wl,--export-dynamic-symbol-list=$t/dyn\n\nreadelf --dyn-syms $t/exe2 > $t/log2\ngrep ' foo' $t/log2\ngrep ' bar' $t/log2\n\n$CC -B. -o $t/exe3 $t/a.o -Wl,--export-dynamic-symbol=foo,--export-dynamic-symbol=bar\n\nreadelf --dyn-syms $t/exe3 > $t/log3\ngrep ' foo' $t/log3\ngrep ' bar' $t/log3\n"
  },
  {
    "path": "test/dynamic-list2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid foo(int x) {}\nvoid bar(int x) {}\nEOF\n\ncat <<EOF | $CXX -o $t/b.o -c -xc++ -\nvoid baz(int x) {}\nint main() {}\nEOF\n\n$CXX -B. -o $t/exe $t/a.o $t/b.o\n\nreadelf --dyn-syms $t/exe > $t/log\nnot grep ' foo' $t/log\nnot grep ' bar' $t/log\n\ncat <<EOF > $t/dyn\n{ foo; extern \"C++\" { \"baz(int)\"; }; };\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o -Wl,-dynamic-list=$t/dyn\n\nreadelf --dyn-syms $t/exe1 > $t/log1\ngrep ' foo' $t/log1\nnot grep ' bar' $t/log1\ngrep ' _Z3bazi' $t/log1\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o -Wl,--export-dynamic-symbol-list=$t/dyn\n\nreadelf --dyn-syms $t/exe2 > $t/log2\ngrep ' foo' $t/log2\nnot grep ' bar' $t/log2\ngrep ' _Z3bazi' $t/log2\n"
  },
  {
    "path": "test/dynamic-list3.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' > $t/dyn\n{\n  xyz;\n  foo*bar*[abc]x;\n};\nEOF\n\ncat <<EOF | $CXX -fPIC -c -o $t/b.o -xc -\nvoid xyz() {}\nvoid foobarzx() {}\nvoid foobarcx() {}\nvoid foo123bar456bx() {}\nvoid foo123bar456c() {}\nvoid foo123bar456x() {}\nint main() {}\nEOF\n\n$CC -B. -Wl,--dynamic-list=$t/dyn -o $t/exe1 $t/b.o\n\nreadelf --dyn-syms $t/exe1 > $t/log1\ngrep ' xyz' $t/log1\nnot grep ' foobarzx' $t/log1\ngrep ' foobarcx' $t/log1\ngrep ' foo123bar456bx' $t/log1\nnot grep ' foo123bar456c' $t/log1\nnot grep ' foo123bar456x' $t/log1\n\n$CC -B. -Wl,--export-dynamic-symbol-list=$t/dyn -o $t/exe2 $t/b.o\n\nreadelf --dyn-syms $t/exe2 > $t/log2\ngrep ' xyz' $t/log2\nnot grep ' foobarzx' $t/log2\ngrep ' foobarcx' $t/log2\ngrep ' foo123bar456bx' $t/log2\nnot grep ' foo123bar456c' $t/log2\nnot grep ' foo123bar456x' $t/log2\n"
  },
  {
    "path": "test/dynamic-list4.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\n#include <stdio.h>\n\nvoid foo() { printf(\"foo1 \"); }\nvoid bar() { printf(\"bar1 \"); }\nvoid baz() { printf(\"baz1 \"); }\n\nvoid print() {\n  foo();\n  bar();\n  baz();\n  printf(\"\\n\");\n}\nEOF\n\ncat <<EOF > $t/dyn\n{ foo; bar; };\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o -Wl,--dynamic-list=$t/dyn\n\ncat <<EOF | $CC -o $t/c.o -c -xc - -fPIC\n#include <stdio.h>\nvoid foo() { printf(\"foo2 \"); }\nvoid bar() { printf(\"bar2 \"); }\nvoid baz() { printf(\"baz2 \"); }\nEOF\n\n$CC -B. -shared -o $t/d.so $t/c.o\n\ncat <<EOF | $CC -o $t/e.o -c -xc -\n#include <stdio.h>\nvoid print();\nint main() { print(); }\nEOF\n\n$CC -B. -o $t/exe1 $t/e.o -Wl,-push-state,-no-as-needed $t/b.so -Wl,-pop-state\n$QEMU $t/exe1 | grep 'foo1 bar1 baz1'\n\n$CC -B. -o $t/exe2 $t/e.o -Wl,-push-state,-no-as-needed $t/d.so $t/b.so -Wl,-pop-state\n$QEMU $t/exe2 | grep 'foo2 bar2 baz1'\n"
  },
  {
    "path": "test/dynamic.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\necho '.globl main; main:' | $CC -o $t/a.o -c -x assembler -\n\n$CC -B. -o $t/exe $t/a.o\n\nreadelf --dynamic $t/exe | grep -E 'Shared library:.*\\blibc\\b'\n\nreadelf -W --dyn-syms --use-dynamic $t/exe |\n  grep -E 'FUNC\\s+GLOBAL\\s+DEFAULT.*UND\\s+__libc_start'\n"
  },
  {
    "path": "test/emit-relocs-cpp.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[[ $MACHINE = arm* ]] && skip\n\ncat <<EOF | $CXX -o $t/a.o -c -fPIC -xc++ -\n#include <cstdio>\nint main() { printf(\"Hello world\\n\"); }\nEOF\n\n$CXX -B. -o $t/exe $t/a.o -Wl,-emit-relocs\n$QEMU $t/exe | grep 'Hello world'\n\nreadelf -SW $t/exe | grep -E 'rela?\\.text'\nreadelf -SW $t/exe | grep -E 'rela?\\.eh_frame'\n"
  },
  {
    "path": "test/emit-relocs-dead-sections.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = m68k ] && skip\n[ $MACHINE = sh4 ] && skip\n\ncat <<EOF | $CXX -o $t/a.o -c -fPIC -xc++ -g -ffunction-sections -\n#include <iostream>\nstruct Foo {\n  Foo() { std::cout << \"Hello world\\n\"; }\n};\n\nFoo x;\nEOF\n\ncat <<EOF | $CXX -o $t/b.o -c -fPIC -xc++ -g -ffunction-sections -\n#include <iostream>\nstruct Foo {\n  Foo() { std::cout << \"Hello world\\n\"; }\n};\n\nFoo y;\nint main() {}\nEOF\n\n$CXX -B. -o $t/exe $t/a.o $t/b.o -Wl,-emit-relocs\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/emit-relocs.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -fPIC -xc -\n#include <stdio.h>\nint main() {\n  puts(\"Hello world\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,-emit-relocs\n$QEMU $t/exe | grep 'Hello world'\n\nreadelf -S $t/exe | grep -E 'rela?\\.text'\n"
  },
  {
    "path": "test/empty-dso.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\nvoid foo() {}\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\n./mold -shared -o $t/c.so $t/b.so\nreadelf -W --dynamic $t/c.so | grep -F /b.so\n"
  },
  {
    "path": "test/empty-file.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\nrm -f $t/b.script\ntouch $t/b.script\n\n$CC -B. -o $t/exe $t/a.o -Wl,--version-script,$t/b.script\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/empty-input.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nrm -f $t/a.o\ntouch $t/a.o\nnot $CC -B. -o $t/exe $t/a.o &> $t/log\ngrep 'unknown file type' $t/log\n"
  },
  {
    "path": "test/empty-version.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\nvoid foo1() {}\nvoid foo2() {}\n\n__asm__(\".symver foo1, bar1@\");\n__asm__(\".symver foo2, bar2@@\");\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\n\nreadelf --dyn-syms $t/b.so | grep ' bar1'\nreadelf --dyn-syms $t/b.so | grep ' bar2'\n"
  },
  {
    "path": "test/entry.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# On PPC64, a given entry point address is set to .opd, and the\n# address in .opd address is set to the ELF header.\n[ $MACHINE = ppc64 ] && skip\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n.globl foo, bar\nfoo = 0x1000\nbar = 0x2000\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe1 -Wl,-e,foo $t/a.o $t/b.o\nreadelf -e $t/exe1 > $t/log\ngrep \"Entry point address:.*0x1000$\" $t/log\n\n$CC -B. -o $t/exe2 -Wl,-e,bar $t/a.o $t/b.o\nreadelf -e $t/exe2 > $t/log\ngrep \"Entry point address:.*0x2000$\" $t/log\n"
  },
  {
    "path": "test/exception-multiple-ehframe.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = sh4aeb ] && skip\nnm mold | grep '__tsan_init' && skip\ncommand -v perl > /dev/null || skip\n\n[ $MACHINE = sh4 ] && skip\n\ncat <<EOF | $CXX -o $t/a.o -c -xc++ -\nint foo() {\n  try {\n    throw 1;\n  } catch (int x) {\n    return x;\n  }\n  return 2;\n}\nEOF\n\ncat <<EOF | $CXX -o $t/b.o -c -xc++ -\nint bar() {\n  try {\n    throw 3;\n  } catch (int x) {\n    return x;\n  }\n  return 4;\n}\nEOF\n\nperl -i -0777 -pe 's/\\.eh_frame/.EH_FRAME/g' $t/a.o\n./mold -r -o $t/c.o $t/a.o $t/b.o\nperl -i -0777 -pe 's/\\.EH_FRAME/.eh_frame/g' $t/c.o\n\ncat <<EOF | $CXX -o $t/d.o -c -xc++ -\n#include <stdio.h>\n\nint foo();\nint bar();\n\nint main() {\n  printf(\"%d %d\\n\", foo(), bar());\n}\nEOF\n\n$CXX -B. -o $t/exe1 $t/d.o $t/c.o\n$QEMU $t/exe1 | grep '^1 3$'\n"
  },
  {
    "path": "test/exception.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nstatic=\ntest_cxxflags -static && static=-static\n\n# I don't know why, but we need -pthread on m68k\nstatic=\"$static -pthread\"\n\ncat <<EOF > $t/a.cc\nint main() {\n  try {\n    throw 0;\n  } catch (int x) {\n    return x;\n  }\n  return 1;\n}\nEOF\n\n$CXX -c -o $t/b.o $t/a.cc -fPIC\n$CXX -c -o $t/c.o $t/a.cc -fno-PIC\n\n$CXX -B. -o $t/exe1 $t/b.o $static\n$QEMU $t/exe1\n\n$CXX -B. -o $t/exe2 $t/c.o -no-pie $static\n$QEMU $t/exe2\n\n$CXX -B. -o $t/exe3 $t/b.o -pie\n$QEMU $t/exe3\n\n$CXX -B. -o $t/exe4 $t/c.o -no-pie\n$QEMU $t/exe4\n\n$CXX -B. -o $t/exe5 $t/b.o -pie -Wl,--gc-sections\n$QEMU $t/exe5\n\n$CXX -B. -o $t/exe6 $t/c.o -no-pie $static -Wl,--gc-sections\n$QEMU $t/exe6\n\nif [ $MACHINE = x86_64 ]; then\n  $CXX -c -o $t/d.o $t/a.cc -mcmodel=large -fPIC\n\n  $CXX -B. -o $t/exe7 $t/d.o $static\n  $QEMU $t/exe7\n\n  $CXX -B. -o $t/exe8 $t/d.o -pie\n  $QEMU $t/exe8\nfi\n\nif [ $MACHINE = x86_64 -o $MACHINE = aarch64 ]; then\n  $CXX -c -o $t/e.o $t/a.cc -mcmodel=large -fno-PIC\n\n  $CXX -B. -o $t/exe9 $t/e.o -no-pie $static\n  $QEMU $t/exe9\n\n  $CXX -B. -o $t/exe10 $t/e.o -no-pie\n  $QEMU $t/exe10\nfi\n\n# riscv64-linux-gnu-strip crashes for some reason\nif [ $MACHINE != riscv32 ]; then\n  $CXX -B. -o $t/exe11 $t/b.o -pie\n  $STRIP $t/exe11\n  $QEMU $t/exe11\n\n  $CXX -B. -o $t/exe12 $t/c.o -no-pie\n  $STRIP $t/exe12\n  $QEMU $t/exe12\nfi\n"
  },
  {
    "path": "test/exclude-libs.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -xc -c -o $t/a.o -\nint foo() {\n  return 3;\n}\nEOF\n\ncat <<EOF | $CC -fPIC -xc -c -o $t/b.o -\nint bar() {\n  return 5;\n}\nEOF\n\nrm -f $t/c.a\nar crs $t/c.a $t/a.o\n\nrm -f $t/d.a\nar crs $t/d.a $t/b.o\n\ncat <<EOF | $CC -fPIC -xc -c -o $t/e.o -\nint foo();\nint bar();\n\nint baz() {\n  foo();\n  bar();\n  return 0;\n}\nEOF\n\n$CC -B. -shared -o $t/f.so $t/e.o $t/c.a $t/d.a\nreadelf --dyn-syms $t/f.so > $t/log\ngrep -F foo $t/log\ngrep -F bar $t/log\ngrep -F baz $t/log\n\n$CC -B. -shared -o $t/f.so $t/e.o $t/c.a $t/d.a -Wl,-exclude-libs=c.a\nreadelf --dyn-syms $t/f.so > $t/log\nnot grep -F foo $t/log\ngrep -F bar $t/log\ngrep -F baz $t/log\n\n$CC -B. -shared -o $t/f.so $t/e.o $t/c.a $t/d.a -Wl,-exclude-libs=c.a -Wl,-exclude-libs=d.a\nreadelf --dyn-syms $t/f.so > $t/log\nnot grep -F foo $t/log\nnot grep -F bar $t/log\ngrep -F baz $t/log\n\n$CC -B. -shared -o $t/f.so $t/e.o $t/c.a $t/d.a -Wl,-exclude-libs=c.a:d.a\nreadelf --dyn-syms $t/f.so > $t/log\nnot grep -F foo $t/log\nnot grep -F bar $t/log\ngrep -F baz $t/log\n\n$CC -B. -shared -o $t/f.so $t/e.o $t/c.a $t/d.a -Wl,-exclude-libs=ALL\nreadelf --dyn-syms $t/f.so > $t/log\nnot grep -F foo $t/log\nnot grep -F bar $t/log\ngrep -F baz $t/log\n"
  },
  {
    "path": "test/exclude-libs2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -x assembler -c -o $t/a.o -\n.globl foo\nfoo:\nEOF\n\nrm -f $t/b.a\nar crs $t/b.a $t/a.o\n\ncat <<EOF | $CC -xc -c -o $t/c.o -\nint foo() {\n  return 3;\n}\nEOF\n\n$CC -B. -shared -o $t/d.so $t/c.o $t/b.a -Wl,-exclude-libs=b.a\nreadelf --dyn-syms $t/d.so | grep -F foo\n"
  },
  {
    "path": "test/exclude-libs3.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -xc -c -o $t/a.o -\nvoid foo();\nvoid bar() { foo(); }\nEOF\n\nrm -f $t/b.a\nar crs $t/b.a $t/a.o\n\ncat <<EOF | $CC -fPIC -xc -c -o $t/c.o -\nvoid bar();\nvoid foo() { bar(); }\nEOF\n\n$CC -B. -shared -o $t/d.so $t/c.o $t/b.a -Wl,-exclude-libs=ALL\nreadelf --dyn-syms $t/d.so | grep -F foo\n"
  },
  {
    "path": "test/execstack.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -xc -o $t/a.o -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,-z,execstack\nreadelf --segments -W $t/exe | grep 'GNU_STACK.* RWE '\n\n$CC -B. -o $t/exe $t/a.o -Wl,-z,execstack -Wl,-z,noexecstack\nreadelf --segments -W $t/exe | grep 'GNU_STACK.* RW '\n\n$CC -B. -o $t/exe $t/a.o\nreadelf --segments -W $t/exe | grep 'GNU_STACK.* RW '\n"
  },
  {
    "path": "test/execute-only.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# .text is writable on sparc, which is not compatible with --execute-only\n[ $MACHINE = sparc64 ] && skip\n\n# GCC emits data to .text for PPC64, so PPC64 is not compatible with -execute-only\n[ $MACHINE = ppc64 ] && skip\n[ $MACHINE = ppc64le ] && skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,--execute-only\n$QEMU $t/exe | grep 'Hello world'\nreadelf -W --segments $t/exe | grep -E 'LOAD\\s.*[0-9a-f]   E 0x'\n"
  },
  {
    "path": "test/export-dynamic.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n  .text\n  .globl foo\n  .hidden foo\nfoo:\n  nop\n  .globl bar\nbar:\n  nop\n  .globl _start\n_start:\n  nop\nEOF\n\n$CC -shared -fPIC -o $t/b.so -xc /dev/null\n./mold -o $t/exe $t/a.o $t/b.so --export-dynamic\n\nreadelf --dyn-syms $t/exe > $t/log\ngrep -E 'NOTYPE\\s+GLOBAL DEFAULT\\s+[0-9]+ bar' $t/log\ngrep -E 'NOTYPE\\s+GLOBAL DEFAULT\\s+[0-9]+ _start' $t/log\n"
  },
  {
    "path": "test/export-from-exe.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid expfn1() {}\nvoid expfn2() {}\nvoid foo();\n\nint main() {\n  expfn1();\n  expfn2();\n  foo();\n}\nEOF\n\ncat <<EOF | $CC -shared -fPIC -o $t/b.so -xc -\nvoid expfn1();\nvoid expfn2() {}\n\nvoid foo() {\n  expfn1();\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.so\nreadelf --dyn-syms $t/exe | grep expfn2\nreadelf --dyn-syms $t/exe | grep expfn1\n"
  },
  {
    "path": "test/fatal-warnings.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fcommon -xc -c -o $t/a.o -\nint foo;\nEOF\n\ncat <<EOF | $CC -fcommon -xc -c -o $t/b.o -\nint foo;\n\nint main() {\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o -Wl,-warn-common 2> /dev/null\n\nnot $CC -B. -o $t/exe $t/a.o $t/b.o -Wl,-warn-common -Wl,-fatal-warnings 2> /dev/null\n"
  },
  {
    "path": "test/filler.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -static || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\n\n__attribute__((aligned(512)))\nchar hello[] = \"Hello\";\n\n__attribute__((aligned(512)))\nchar world[] = \"world\";\n\nint main() {\n  printf(\"%s %s\\n\", hello, world);\n}\nEOF\n\n$CC -B. -static -Wl,--filler,0xfe -o $t/exe1 $t/a.o\nsed -i -e 's/--filler 0xfe/--filler 0x00/' $t/exe1\nod -x $t/exe1 > $t/txt1\n\n$CC -B. -static -Wl,--filler,0x00 -o $t/exe2 $t/a.o\nod -x $t/exe2 > $t/txt2\n\ndiff -q $t/txt1 $t/txt2\n"
  },
  {
    "path": "test/filter.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n  .text\n  .globl _start\n_start:\n  nop\nEOF\n\n./mold -o $t/b.so $t/a.o --filter foo -F bar -shared\n\nreadelf --dynamic $t/b.so > $t/log\ngrep -F 'Filter library: [foo]' $t/log\ngrep -F 'Filter library: [bar]' $t/log\n"
  },
  {
    "path": "test/func-addr.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -shared -o $t/a.so -xc -\nvoid fn() {}\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc -fno-PIC -\n#include <stdio.h>\n\ntypedef void Func();\n\nvoid fn();\nFunc *const ptr = fn;\n\nint main() {\n  printf(\"%d\\n\", fn == ptr);\n}\nEOF\n\n$CC -B. -o $t/exe -no-pie $t/b.o $t/a.so\n$QEMU $t/exe | grep 1\n"
  },
  {
    "path": "test/gc-sections.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CXX -c -o $t/a.o -xc++ - -ffunction-sections -fdata-sections\n#include <stdio.h>\n\nint two() { return 2; }\n\nint live_var1 = 1;\nint live_var2 = two();\nint dead_var1 = 3;\nint dead_var2 = 4;\n\nvoid live_fn1() {}\nvoid live_fn2() { live_fn1(); }\nvoid dead_fn1() {}\nvoid dead_fn2() { dead_fn1(); }\n\nint main() {\n  printf(\"%d %d\\n\", live_var1, live_var2);\n  live_fn2();\n}\nEOF\n\n$CXX -B. -o $t/exe1 $t/a.o\nreadelf --symbols $t/exe1 > $t/log1\n$QEMU $t/exe1 | grep '1 2'\n\ngrep live_fn1 $t/log1\ngrep live_fn2 $t/log1\ngrep dead_fn1 $t/log1\ngrep dead_fn2 $t/log1\ngrep live_var1 $t/log1\ngrep live_var2 $t/log1\ngrep dead_var1 $t/log1\ngrep dead_var2 $t/log1\n\n$CXX -B. -o $t/exe2 $t/a.o -Wl,-gc-sections\nreadelf --symbols $t/exe2 > $t/log2\n$QEMU $t/exe2 | grep '1 2'\n\ngrep live_fn1 $t/log2\ngrep live_fn2 $t/log2\nnot grep dead_fn1 $t/log2\nnot grep dead_fn2 $t/log2\ngrep live_var1 $t/log2\ngrep live_var2 $t/log2\nnot grep dead_var1 $t/log2\nnot grep dead_var2 $t/log2\n"
  },
  {
    "path": "test/gdb-index-compress-output.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\non_qemu && skip\n[ $MACHINE = riscv64 -o $MACHINE = riscv32 -o $MACHINE = sparc64 ] && skip\ncommand -v gdb >& /dev/null || skip\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -g -ggnu-pubnames -gdwarf-4 -xc - -ffunction-sections\n#include <stdio.h>\n\nvoid trap() {}\n\nstatic void hello() {\n  printf(\"Hello world\\n\");\n  trap();\n}\n\nvoid greet() {\n  hello();\n}\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o -Wl,--gdb-index -Wl,--compress-debug-sections=zlib-gabi\nreadelf -WS $t/b.so 2> /dev/null | grep -F .gdb_index\n\ncat <<EOF | $CC -c -o $t/c.o -fPIC -g -ggnu-pubnames -gdwarf-4 -xc - -gz\nvoid greet();\n\nint main() {\n  greet();\n}\nEOF\n\n$CC -B. -o $t/exe $t/b.so $t/c.o -Wl,--gdb-index -Wl,--compress-debug-sections=zlib\nreadelf -WS $t/exe 2> /dev/null | grep -F .gdb_index\n\n$QEMU $t/exe | grep 'Hello world'\n\nDEBUGINFOD_URLS= gdb $t/exe -nx -batch -ex 'b main' -ex r -ex 'b trap' \\\n  -ex c -ex bt -ex quit >& $t/log\n\ngrep 'hello () at .*<stdin>:7' $t/log\ngrep 'greet () at .*<stdin>:11' $t/log\ngrep 'main () at .*<stdin>:4' $t/log\n"
  },
  {
    "path": "test/gdb-index-dwarf2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\non_qemu && skip\n[ $MACHINE = riscv64 -o $MACHINE = riscv32 -o $MACHINE = sparc64 ] && skip\ncommand -v gdb >& /dev/null || skip\ntest_cflags -gdwarf-2 -g || skip\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -g -ggnu-pubnames -gdwarf-2 -xc - -ffunction-sections\nvoid hello2();\n\nstatic void hello() {\n  hello2();\n}\n\nvoid greet() {\n  hello();\n}\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -fPIC -g -ggnu-pubnames -gdwarf-2 -xc - -ffunction-sections\n#include <stdio.h>\n\nvoid trap() {}\n\nvoid hello2() {\n  printf(\"Hello world\\n\");\n  trap();\n}\nEOF\n\n$CC -B. -shared -o $t/c.so $t/a.o $t/b.o -Wl,--gdb-index\nreadelf -WS $t/c.so 2> /dev/null | grep -F .gdb_index\n\ncat <<EOF | $CC -c -o $t/d.o -fPIC -g -ggnu-pubnames -gdwarf-2 -xc - -gz\nvoid greet();\n\nint main() {\n  greet();\n}\nEOF\n\n$CC -B. -o $t/exe $t/c.so $t/d.o -Wl,--gdb-index\nreadelf -WS $t/exe 2> /dev/null | grep -F .gdb_index\n\n$QEMU $t/exe | grep 'Hello world'\n\nDEBUGINFOD_URLS= gdb $t/exe -nx -batch -ex 'b main' -ex r -ex 'b trap' \\\n  -ex c -ex bt -ex quit >& $t/log\n\ngrep 'hello2 () at .*<stdin>:7' $t/log\ngrep 'hello () at .*<stdin>:4' $t/log\ngrep 'greet () at .*<stdin>:8' $t/log\ngrep 'main () at .*<stdin>:4' $t/log\n"
  },
  {
    "path": "test/gdb-index-dwarf3.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\non_qemu && skip\n[ $MACHINE = riscv64 -o $MACHINE = riscv32 -o $MACHINE = sparc64 ] && skip\ncommand -v gdb >& /dev/null || skip\ntest_cflags -gdwarf-3 || skip\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -g -ggnu-pubnames -gdwarf-3 -xc - -ffunction-sections\nvoid hello2();\n\nstatic void hello() {\n  hello2();\n}\n\nvoid greet() {\n  hello();\n}\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -fPIC -g -ggnu-pubnames -gdwarf-3 -xc - -ffunction-sections\n#include <stdio.h>\n\nvoid trap() {}\n\nvoid hello2() {\n  printf(\"Hello world\\n\");\n  trap();\n}\nEOF\n\n$CC -B. -shared -o $t/c.so $t/a.o $t/b.o -Wl,--gdb-index\nreadelf -WS $t/c.so 2> /dev/null | grep -F .gdb_index\n\ncat <<EOF | $CC -c -o $t/d.o -fPIC -g -ggnu-pubnames -gdwarf-3 -xc - -gz\nvoid greet();\n\nint main() {\n  greet();\n}\nEOF\n\n$CC -B. -o $t/exe $t/c.so $t/d.o -Wl,--gdb-index\nreadelf -WS $t/exe 2> /dev/null | grep -F .gdb_index\n\n$QEMU $t/exe | grep 'Hello world'\n\nDEBUGINFOD_URLS= gdb $t/exe -nx -batch -ex 'b main' -ex r -ex 'b trap' \\\n  -ex c -ex bt -ex quit >& $t/log\n\ngrep 'hello2 () at .*<stdin>:7' $t/log\ngrep 'hello () at .*<stdin>:4' $t/log\ngrep 'greet () at .*<stdin>:8' $t/log\ngrep 'main () at .*<stdin>:4' $t/log\n"
  },
  {
    "path": "test/gdb-index-dwarf4.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\non_qemu && skip\n[ $MACHINE = riscv64 -o $MACHINE = riscv32 -o $MACHINE = sparc64 ] && skip\ncommand -v gdb >& /dev/null || skip\ntest_cflags -gdwarf-4 -g  || skip\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -g -ggnu-pubnames -gdwarf-4 -xc - -ffunction-sections\nvoid hello2();\n\nstatic void hello() {\n  hello2();\n}\n\nvoid greet() {\n  hello();\n}\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -fPIC -g -ggnu-pubnames -gdwarf-4 -xc - -ffunction-sections\n#include <stdio.h>\n\nvoid trap() {}\n\nvoid hello2() {\n  printf(\"Hello world\\n\");\n  trap();\n}\nEOF\n\n$CC -B. -shared -o $t/c.so $t/a.o $t/b.o -Wl,--gdb-index\nreadelf -WS $t/c.so 2> /dev/null | grep -F .gdb_index\n\ncat <<EOF | $CC -c -o $t/d.o -fPIC -g -ggnu-pubnames -gdwarf-4 -xc - -gz\nvoid greet();\n\nint main() {\n  greet();\n}\nEOF\n\n$CC -B. -o $t/exe $t/c.so $t/d.o -Wl,--gdb-index\nreadelf -WS $t/exe 2> /dev/null | grep -F .gdb_index\n\n$QEMU $t/exe | grep 'Hello world'\n\nDEBUGINFOD_URLS= gdb $t/exe -nx -batch -ex 'b main' -ex r -ex 'b trap' \\\n  -ex c -ex bt -ex quit >& $t/log\n\ngrep 'hello2 () at .*<stdin>:7' $t/log\ngrep 'hello () at .*<stdin>:4' $t/log\ngrep 'greet () at .*<stdin>:8' $t/log\ngrep 'main () at .*<stdin>:4' $t/log\n"
  },
  {
    "path": "test/gdb-index-dwarf5.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\non_qemu && skip\n[ $MACHINE = riscv64 -o $MACHINE = riscv32 -o $MACHINE = sparc64 ] && skip\ncommand -v gdb >& /dev/null || skip\ntest_cflags -gdwarf-5 -g || skip\n\ncat <<EOF > $t/a.c\nvoid fn3();\n\nstatic void fn2() {\n  fn3();\n}\n\nvoid fn1() {\n  fn2();\n}\nEOF\n\ncat <<EOF > $t/b.c\nvoid fn5();\n\nstatic void fn4() {\n  fn5();\n}\n\nvoid fn3() {\n  fn4();\n}\nEOF\n\ncat <<EOF > $t/c.c\nvoid fn7();\n\nstatic void fn6() {\n  fn7();\n}\n\nvoid fn5() {\n  fn6();\n}\nEOF\n\ncat <<EOF > $t/d.c\n#include <stdio.h>\nvoid trap() {}\n\nstatic void fn8() {\n  printf(\"Hello world\\n\");\n  trap();\n}\n\nvoid fn7() {\n  fn8();\n}\nEOF\n\n$CC -c -o $t/a.o $t/a.c -fPIC -g -ggnu-pubnames -gdwarf-5 -ffunction-sections\n$CC -c -o $t/b.o $t/b.c -fPIC -g -ggnu-pubnames -gdwarf-4 -ffunction-sections\n$CC -c -o $t/c.o $t/c.c -fPIC -g -ggnu-pubnames -gdwarf-5\n$CC -c -o $t/d.o $t/d.c -fPIC -g -ggnu-pubnames -gdwarf-5 -ffunction-sections\n\n$CC -B. -shared -o $t/e.so $t/a.o $t/b.o $t/c.o $t/d.o -Wl,--gdb-index\nreadelf -WS $t/e.so 2> /dev/null | grep -F .gdb_index\nreadelf --debug=gdb_index $t/e.so 2> /dev/null | grep 'fn1: .* \\[global, function\\]'\nreadelf --debug=gdb_index $t/e.so 2> /dev/null | grep 'char: .* \\[static, type\\]'\n\ncat <<EOF | $CC -c -o $t/f.o -fPIC -g -ggnu-pubnames -gdwarf-5 -xc - -gz\nvoid fn1();\n\nint main() {\n  fn1();\n}\nEOF\n\n$CC -B. -o $t/exe $t/e.so $t/f.o -Wl,--gdb-index\nreadelf -WS $t/exe 2> /dev/null | grep -F .gdb_index\nreadelf --debug=gdb_index $t/exe 2> /dev/null | grep 'main: .* \\[global, function\\]'\n\n$QEMU $t/exe | grep 'Hello world'\n\nDEBUGINFOD_URLS= gdb $t/exe -nx -batch -ex 'b main' -ex r -ex 'b trap' \\\n  -ex c -ex bt -ex quit >& $t/log\n\ngrep 'fn8 () at .*/d.c:6' $t/log\ngrep 'fn7 () at .*/d.c:10' $t/log\ngrep 'fn6 () at .*/c.c:4' $t/log\ngrep 'fn5 () at .*/c.c:8' $t/log\ngrep 'fn4 () at .*/b.c:4' $t/log\ngrep 'fn3 () at .*/b.c:8' $t/log\ngrep 'fn2 () at .*/a.c:4' $t/log\ngrep 'fn1 () at .*/a.c:8' $t/log\n"
  },
  {
    "path": "test/gdb-index-dwarf64.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\non_qemu && skip\n[ $MACHINE = riscv64 -o $MACHINE = riscv32 -o $MACHINE = sparc64 ] && skip\ncommand -v gdb >& /dev/null || skip\n\ntest_cflags -gdwarf-5 -g -gdwarf64 || skip\n\ncat <<EOF > $t/a.c\nvoid fn3();\n\nstatic void fn2() {\n  fn3();\n}\n\nvoid fn1() {\n  fn2();\n}\nEOF\n\ncat <<EOF > $t/b.c\nvoid fn5();\n\nstatic void fn4() {\n  fn5();\n}\n\nvoid fn3() {\n  fn4();\n}\nEOF\n\ncat <<EOF > $t/c.c\nvoid fn7();\n\nstatic void fn6() {\n  fn7();\n}\n\nvoid fn5() {\n  fn6();\n}\nEOF\n\ncat <<EOF > $t/d.c\n#include <stdio.h>\nvoid trap() {}\n\nstatic void fn8() {\n  printf(\"Hello world\\n\");\n  trap();\n}\n\nvoid fn7() {\n  fn8();\n}\nEOF\n\n$CC -c -o $t/a.o $t/a.c -fPIC -g -ggnu-pubnames -gdwarf-5 -gdwarf64 -ffunction-sections\n$CC -c -o $t/b.o $t/b.c -fPIC -g -ggnu-pubnames -gdwarf-4 -gdwarf64 -ffunction-sections\n$CC -c -o $t/c.o $t/c.c -fPIC -g -ggnu-pubnames -gdwarf-5 -gdwarf64\n$CC -c -o $t/d.o $t/d.c -fPIC -g -ggnu-pubnames -gdwarf-5 -gdwarf64 -ffunction-sections\n\n$CC -B. -shared -o $t/e.so $t/a.o $t/b.o $t/c.o $t/d.o\n\n$CC -B. -shared -o $t/f.so $t/a.o $t/b.o $t/c.o $t/d.o -Wl,--gdb-index\nreadelf -WS $t/f.so 2> /dev/null | grep -F .gdb_index\n\ncat <<EOF | $CC -c -o $t/g.o -fPIC -g -ggnu-pubnames -gdwarf-5 -xc - -gz\nvoid fn1();\n\nint main() {\n  fn1();\n}\nEOF\n\n# Older versions of gdb are buggy that they complain DWARF64 debug sections\n# even without .gdb_index. Skip if such version.\n$CC -B. -o $t/exe1 $t/e.so $t/g.o\n\nDEBUGINFOD_URLS= gdb $t/exe1 -nx -batch -ex 'b main' -ex r -ex quit |&\n  grep 'DW_FORM_line_strp pointing outside of .debug_line_str' && skip\n\n# We are using a recent version of gdb.\n$CC -B. -o $t/exe2 $t/f.so $t/g.o -Wl,--gdb-index\nreadelf -WS $t/exe2 2> /dev/null | grep -F .gdb_index\n\n$QEMU $t/exe2 | grep 'Hello world'\n\nDEBUGINFOD_URLS= gdb $t/exe2 -nx -batch -ex 'b main' -ex r -ex 'b trap' \\\n  -ex c -ex bt -ex quit >& $t/log2\n\ngrep 'fn8 () at .*/d.c:6' $t/log2\ngrep 'fn7 () at .*/d.c:10' $t/log2\ngrep 'fn6 () at .*/c.c:4' $t/log2\ngrep 'fn5 () at .*/c.c:8' $t/log2\ngrep 'fn4 () at .*/b.c:4' $t/log2\ngrep 'fn3 () at .*/b.c:8' $t/log2\ngrep 'fn2 () at .*/a.c:4' $t/log2\ngrep 'fn1 () at .*/a.c:8' $t/log2\n"
  },
  {
    "path": "test/gdb-index-empty.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\necho 'void _start() {}' | $CC -c -o $t/a.o -xc -\n./mold -o $t/exe $t/a.o -gdb-index\nreadelf -WS $t/exe | not grep -F .gdb_index\n"
  },
  {
    "path": "test/gdb-index-split-dwarf.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\non_qemu && skip\n[ $MACHINE = riscv64 -o $MACHINE = riscv32 -o $MACHINE = sparc64 ] && skip\ncommand -v gdb >& /dev/null || skip\ntest_cflags -gdwarf-5 -g || skip\n\ncat <<EOF > $t/a.c\nvoid fn3();\n\nstatic void fn2() {\n  fn3();\n}\n\nvoid fn1() {\n  fn2();\n}\nEOF\n\ncat <<EOF > $t/b.c\nvoid fn5();\n\nstatic void fn4() {\n  fn5();\n}\n\nvoid fn3() {\n  fn4();\n}\nEOF\n\ncat <<EOF > $t/c.c\nvoid fn7();\n\nstatic void fn6() {\n  fn7();\n}\n\nvoid fn5() {\n  fn6();\n}\nEOF\n\ncat <<EOF > $t/d.c\n#include <stdio.h>\nvoid trap() {}\n\nstatic void fn8() {\n  printf(\"Hello world\\n\");\n  trap();\n}\n\nvoid fn7() {\n  fn8();\n}\nEOF\n\n$CC -c -o $t/a.o $t/a.c -fPIC -g -ggnu-pubnames -gdwarf-5 -gsplit-dwarf\n$CC -c -o $t/b.o $t/b.c -fPIC -g -ggnu-pubnames -gdwarf-4 -gsplit-dwarf\n$CC -c -o $t/c.o $t/c.c -fPIC -g -ggnu-pubnames -gdwarf-5\n$CC -c -o $t/d.o $t/d.c -fPIC -g -ggnu-pubnames -gdwarf-5 -gsplit-dwarf\n\n$CC -B. -shared -o $t/e.so $t/a.o $t/b.o $t/c.o $t/d.o -Wl,--gdb-index\nreadelf -WS $t/e.so 2> /dev/null | grep -F .gdb_index\n\ncat <<EOF | $CC -c -o $t/f.o -fPIC -g -ggnu-pubnames -gdwarf-5 -gsplit-dwarf -xc - -gz\nvoid fn1();\n\nint main() {\n  fn1();\n}\nEOF\n\n$CC -B. -o $t/exe $t/e.so $t/f.o -Wl,--gdb-index\nreadelf -WS $t/exe 2> /dev/null | grep -F .gdb_index\n\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/glibc-2.22-bug.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n\n# glibc 2.22 or prior have a bug that ld-linux.so.2 crashes on dlopen()\n# if .rela.dyn and .rela.plt are not contiguous in a given DSO.\n# This test verifies that these sections are contiguous in mold's output.\n\ncat <<EOF | $CC -o $t/a.o -fPIC -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/b.so -shared $t/a.o\nreadelf -W --sections $t/b.so | grep -E -A1 '\\.rela?\\.dyn' |\n  grep -E '\\.rela?\\.plt'\n"
  },
  {
    "path": "test/global-offset-table.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = ppc64le ] && skip\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\n#include <stdio.h>\n\nextern char foo;\n\nint main() {\n  printf(\"%lx\\n\", (unsigned long)&foo);\n}\nEOF\n\n$CC -B. -no-pie -o $t/exe $t/a.o -Wl,-defsym=foo=_GLOBAL_OFFSET_TABLE_\n\n$QEMU $t/exe > /dev/null\nGOT_ADDR=$($QEMU $t/exe)\n\n# _GLOBAL_OFFSET_TABLE_ refers the end of .got only on x86.\n# We assume .got is followed by .gotplt.\nif [ $MACHINE = x86_64 -o $MACHINE = i686 ]; then\n  readelf -WS $t/exe | grep \"\\.got\\.plt .*$GOT_ADDR \"\nelse\n  readelf -WS $t/exe | grep \"\\.got .*$GOT_ADDR \"\nfi\n"
  },
  {
    "path": "test/gnu-hash.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\nvoid foo() {}\nvoid bar() {}\nstatic void baz() {}\nEOF\n\n$CC -B. -o $t/b.so $t/a.o -Wl,-hash-style=gnu -shared\n"
  },
  {
    "path": "test/gnu-property.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -no-pie\nreadelf -W --sections $t/exe | grep -Fw .note.gnu.property || skip\nreadelf -W --segments $t/exe | grep -w GNU_PROPERTY\n"
  },
  {
    "path": "test/gnu-retain.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = ppc64 ] && skip\n\ncat <<EOF | $CC -c -o $t/a.o -xc - -ffunction-sections 2> /dev/null\n __attribute__((retain)) int foo() {}\nint bar() {}\nint main() {}\nEOF\n\n# Older versions of GCC does not support __attribute__((retain))\nreadelf -WS $t/a.o | grep '\\.text\\.foo.*AXR' || skip\n\n$CC -B. -o $t/exe $t/a.o -Wl,-gc-sections\nnm $t/exe > $t/log\ngrep foo $t/log\nnot grep bar $t/log\n"
  },
  {
    "path": "test/gnu-unique.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncommand -v $GXX >& /dev/null || skip\n\ncat <<EOF | $GXX -o $t/a.o -c -std=c++17 -fno-gnu-unique -xc++ -\ninline int foo = 5;\nint bar() { return foo; }\nEOF\n\ncat <<EOF | $GXX -o $t/b.o -c -std=c++17 -fgnu-unique -xc++ -\n#include <stdio.h>\n\ninline int foo = 5;\n\nint main() {\n  printf(\"foo=%d\\n\", foo);\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o -no-pie\n$QEMU $t/exe | grep 'foo=5'\n"
  },
  {
    "path": "test/gnu-warning.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\n#include <stdio.h>\n\n__attribute__((section(\".gnu.warning.foo\")))\nstatic const char foo[] = \"foo is deprecated\";\n\n__attribute__((section(\".gnu.warning.bar\")))\nconst char bar[] = \"bar is deprecated\";\n\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n# Make sure that we do not copy .gnu.warning.* sections.\n$CC -B. -o $t/exe $t/a.o -no-pie\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/hash-style-sysv.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\n#include <stdio.h>\nvoid hello() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o -Wl,--hash-style=sysv\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\nvoid hello();\nint main() {\n  hello();\n}\nEOF\n\n$CC -B. -o $t/exe $t/c.o $t/b.so -Wl,--hash-style=sysv\n$QEMU $t/exe | grep Hello\n"
  },
  {
    "path": "test/hash-style.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# MIPS ABIs are not compatible with .gnu.hash\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid foo() {}\nEOF\n\n./mold -shared -o $t/b.so $t/a.o\n\nreadelf -WS $t/b.so | grep -F ' .hash'\nreadelf -WS $t/b.so | grep -F ' .gnu.hash'\n\n./mold -shared -o $t/c.so $t/a.o --hash-style=both --hash-style=none\n\nreadelf -WS $t/c.so > $t/log\nnot grep -F ' .hash' $t/log\nnot grep -F ' .gnu.hash' $t/log\n"
  },
  {
    "path": "test/hello-dynamic.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fno-PIE\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -no-pie\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/hello-static.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -static || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -static\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/help.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n./mold --help | grep Usage\n"
  },
  {
    "path": "test/hidden-archive.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -xc -\nvoid foo() {}\nEOF\n\nrm -f $t/b.a\nar rcs $t/b.a $t/a.o\n\ncat <<EOF | $CC -shared -o $t/c.so -fPIC -xc -\nvoid foo() {}\nEOF\n\ncat <<EOF | $CC -o $t/d.o -fPIC -c -xc -\n__attribute__((visibility(\"hidden\"))) void foo();\nint main() { foo(); }\nEOF\n\n$CC -B. -o $t/exe $t/d.o $t/c.so $t/b.a\n$QEMU $t/exe\n"
  },
  {
    "path": "test/hidden-undef.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.so -shared -fPIC -xc -\nvoid foo() {}\nEOF\n\ncat <<EOF | $CC -o $t/b.o -fPIC -c -xc -\n__attribute__((visibility(\"hidden\"))) void foo();\nint main() { foo(); }\nEOF\n\nnot $CC -B. -o $t/exe $t/a.so $t/b.o |& grep 'undefined symbol: foo'\n"
  },
  {
    "path": "test/hidden-weak-undef.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -fPIC -c -xc -\n__attribute__((weak, visibility(\"hidden\"))) void foo();\nvoid bar() { foo(); }\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\n\nreadelf -W --dyn-syms $t/b.so > $t/log\nnot grep -w foo $t/log\ngrep -w bar $t/log\n"
  },
  {
    "path": "test/icf-gcc-except-table.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = arm ] && skip\n[ $MACHINE = armeb ] && skip\n[[ $MACHINE = riscv* ]] && skip\n[[ $MACHINE = loongarch* ]] && skip\n\ncat <<EOF | $CXX -c -o $t/a.o -ffunction-sections -fdata-sections -xc++ -\n#include <stdexcept>\n\ntemplate <typename T>\nstruct X {\n  static void raise() { throw std::logic_error(\"foo\"); }\n};\n\nint main() {\n  X<int>().raise();\n  X<float>().raise();\n}\nEOF\n\n$CXX -B. -o $t/exe $t/a.o -Wl,-icf=safe,--print-icf-sections |&\n  grep -E 'removing .*/a.o:\\(.gcc_except_table'\n"
  },
  {
    "path": "test/icf-safe.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# GCC 11 or older uses R_390_PLT32DBL to take an address of a function\n# instead of R_390_PC32DBL\nif [ $MACHINE = s390x ]; then\n  echo 'void *foo() { return foo; }' | $CC -c -o $t/a.o -xc -\n  readelf -r $t/a.o | grep R_390_PLT32DBL && skip\nfi\n\ncat <<EOF | $CC -c -o $t/a.o -ffunction-sections -fdata-sections -xc -\nint bar() {\n  return 5;\n}\n\nint foo1(int x) {\n  return bar() + x;\n}\n\nint foo2(int x) {\n  return bar() + x;\n}\n\nint foo3(int x) {\n  return bar() + x;\n}\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -ffunction-sections -fdata-sections -xc -\n#include <stdio.h>\n\nint foo1();\nint foo2();\nint foo3();\n\nint main() {\n  printf(\"%d %d\\n\", foo1 == foo2, foo2 == foo3);\n}\nEOF\n\n$CC -B. -o $t/exe1 -Wl,-icf=safe $t/a.o $t/b.o\n$QEMU $t/exe1 | grep '^0 0$'\n\ncat <<EOF | $CC -c -o $t/c.o -ffunction-sections -fdata-sections -xc -\nint foo1();\nint foo2();\nint foo3();\n\nint main() {\n  foo1();\n  foo2();\n  foo3();\n}\nEOF\n\n$CC -B. -o $t/exe2 -Wl,-icf=safe $t/a.o $t/c.o\n$QEMU $t/exe2 | not grep foo2\n"
  },
  {
    "path": "test/icf-small.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -ffunction-sections -xc -\nvoid _start() {}\nEOF\n\n./mold -o $t/exe -icf=all $t/a.o\n"
  },
  {
    "path": "test/icf.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# On PPC64V1, function pointers refer function descriptors in .opd\n# instead of directly referring .text section. We create a .opd entry\n# for each symbol. So function pointer comparison on two different\n# symbols are always the same, even if their function body are at the\n# same location.\n[ $MACHINE = ppc64 ] && skip\n\ncat <<EOF | $CC -c -o $t/a.o -ffunction-sections -fdata-sections -xc -\n#include <stdio.h>\n\nint bar() {\n  return 5;\n}\n\nint foo1(int x) {\n  return bar() + x;\n}\n\nint foo2(int x) {\n  return bar() + x;\n}\n\nint foo3() {\n  bar();\n  return 5;\n}\n\nint main() {\n  printf(\"%d %d\\n\", (long)foo1 == (long)foo2, (long)foo1 == (long)foo3);\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,-icf=all\n$QEMU $t/exe | grep '1 0'\n"
  },
  {
    "path": "test/ifunc-address-equality-exported.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# Clang miscompiles the test code, so skip it if Clang.\n# https://github.com/llvm/llvm-project/issues/111338\n$CC --version | grep clang && skip\n\nsupports_ifunc || skip\n\ncat <<EOF | $CC -c -fPIC -o $t/a.o -xc -\ntypedef void Func();\nvoid foo();\nFunc *get_foo() { return foo; }\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\n\ncat <<EOF | $CC -c -fno-PIE -o $t/c.o -xc -\n#include <stdio.h>\n\ntypedef void Func();\n\n__attribute__((ifunc(\"resolve_foo\"))) void foo(void);\nvoid real_foo(void) { printf(\"foo \"); }\nFunc *resolve_foo() { return real_foo; }\n\nFunc *get_foo();\n\nint main() {\n  printf(\"%p %p\\n\", foo, get_foo());\n  foo();\n  printf(\"\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/c.o $t/b.so -no-pie\n$QEMU $t/exe | grep -E '^(\\S+) \\1'\n"
  },
  {
    "path": "test/ifunc-address-equality.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_ifunc || skip\n\ncat <<EOF | $CC -c -fno-PIE -o $t/a.o -xc -\n#include <stdio.h>\n\ntypedef void Func();\n\n__attribute__((ifunc(\"resolve_foo\"))) void foo(void);\nvoid real_foo(void) { printf(\"foo \"); }\nFunc *resolve_foo() { return real_foo; }\n\n__attribute__((ifunc(\"resolve_bar\"))) void bar(void);\nvoid real_bar(void) { printf(\"bar \"); }\nFunc *resolve_bar() { return real_bar; }\nEOF\n\ncat <<EOF | $CC -c -fPIC -o $t/b.o -xc -\ntypedef void Func();\n\nvoid foo();\nvoid bar();\n\nFunc *get_foo() { return foo; }\nFunc *get_bar() { return bar; }\nEOF\n\ncat <<EOF | $CC -c -fno-PIE -o $t/c.o -xc -\n#include <stdio.h>\n\ntypedef void Func();\n\nvoid foo();\nvoid bar();\nFunc *get_foo();\nFunc *get_bar();\n\nint main() {\n  printf(\"%p %p %p %p\\n\", foo, get_foo(), bar, get_bar());\n  foo();\n  bar();\n  printf(\"\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o $t/c.o -no-pie\n$QEMU $t/exe1 | grep -E '^(\\S+) \\1 (\\S+) \\2'\n\nreadelf --dynamic $t/exe1 | not grep TEXTREL\n"
  },
  {
    "path": "test/ifunc-alias.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_ifunc || skip\n\ncat <<EOF | $CC -fPIC -o $t/a.o -c -xc -\n#include <stdio.h>\n\nvoid foo() {}\nint bar() __attribute__((ifunc(\"resolve_bar\")));\nvoid *resolve_bar() { return foo; }\nvoid *bar2 = bar;\n\nint main() {\n  printf(\"%p %p\\n\", bar, bar2);\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -pie\n$QEMU $t/exe1 | grep -E '^(\\S+) \\1$'\n\n$CC -B. -o $t/exe2 $t/a.o -no-pie\n$QEMU $t/exe2 | grep -E '^(\\S+) \\1$'\n"
  },
  {
    "path": "test/ifunc-dlopen.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_ifunc || skip\n\ncat <<EOF | $CC -fno-PIE -o $t/a.o -c -xc -\n#include <dlfcn.h>\n#include <stdio.h>\n\ntypedef void Func();\nvoid foo(void);\n\nint main() {\n  void *handle = dlopen(NULL, RTLD_NOW);\n  Func *p = dlsym(handle, \"foo\");\n\n  foo();\n  p();\n  printf(\"%p %p\\n\", foo, p);\n}\nEOF\n\ncat <<EOF | $CC -fPIC -o $t/b.o -c -xc -\n#include <stdio.h>\n\n__attribute__((ifunc(\"resolve_foo\")))\nvoid foo(void);\n\nstatic void real_foo(void) {\n  printf(\"foo \");\n}\n\ntypedef void Func();\n\nstatic Func *resolve_foo(void) {\n  return real_foo;\n}\nEOF\n\n$CC -B. -o $t/c.so $t/b.o -shared\n$CC -B. -o $t/exe $t/a.o $t/c.so -no-pie -ldl\n$QEMU $t/exe | grep 'foo foo'\n"
  },
  {
    "path": "test/ifunc-dso.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_ifunc || skip\n\ncat <<EOF | $CC -fPIC -o $t/a.o -c -xc -\nvoid foobar(void);\n\nint main() {\n  foobar();\n}\nEOF\n\ncat <<EOF | $CC -fPIC -o $t/b.o -c -xc -\n#include <stdio.h>\n\n__attribute__((ifunc(\"resolve_foobar\")))\nvoid foobar(void);\n\nstatic void real_foobar(void) {\n  printf(\"Hello world\\n\");\n}\n\ntypedef void Func();\n\nstatic Func *resolve_foobar(void) {\n  return real_foobar;\n}\nEOF\n\n$CC -B. -o $t/c.so $t/b.o -shared\nreadelf -W --dyn-syms $t/c.so | grep -E '(IFUNC|<OS specific>: 10).*foobar'\n\n$CC -B. -o $t/exe $t/a.o $t/c.so\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/ifunc-dynamic.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_ifunc || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\n\n__attribute__((ifunc(\"resolve_foobar\")))\nstatic void foobar(void);\n\nstatic void real_foobar(void) {\n  printf(\"Hello world\\n\");\n}\n\ntypedef void Func();\n\nstatic Func *resolve_foobar(void) {\n  return real_foobar;\n}\n\nint main() {\n  foobar();\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -Wl,-z,lazy\n$QEMU $t/exe1 | grep 'Hello world'\n\n$CC -B. -o $t/exe2 $t/a.o -Wl,-z,now\n$QEMU $t/exe2 | grep 'Hello world'\n"
  },
  {
    "path": "test/ifunc-export.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_ifunc || skip\n\ncat <<EOF | $CC -c -fPIC -o $t/a.o -xc -\n#include <stdio.h>\n\n__attribute__((ifunc(\"resolve_foobar\")))\nvoid foobar(void);\n\nvoid real_foobar(void) {\n  printf(\"Hello world\\n\");\n}\n\ntypedef void Func();\n\nFunc *resolve_foobar(void) {\n  return real_foobar;\n}\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\nreadelf --dyn-syms $t/b.so | grep -E '(IFUNC|<OS specific>: 10)\\s+GLOBAL DEFAULT.* foobar'\n"
  },
  {
    "path": "test/ifunc-funcptr.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_ifunc || skip\n\ncat <<EOF | $CC -c -fPIC -o $t/a.o -c -xc -\ntypedef int Fn();\n\nint foo() __attribute__((ifunc(\"resolve_foo\")));\n\nint real_foo() { return 3; }\n\nFn *resolve_foo(void) {\n  return real_foo;\n}\nEOF\n\ncat <<EOF | $CC -c -fPIC -o $t/b.o -xc -\ntypedef int Fn();\nint foo();\nFn *get_foo() { return foo; }\nEOF\n\ncat <<EOF | $CC -c -fPIC -o $t/c.o -xc -\n#include <stdio.h>\n\ntypedef int Fn();\nFn *get_foo();\n\nint main() {\n  Fn *f = get_foo();\n  printf(\"%d\\n\", f());\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o $t/c.o -pie\n$QEMU $t/exe1 | grep '^3$'\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o $t/c.o -no-pie\n$QEMU $t/exe2 | grep '^3$'\n"
  },
  {
    "path": "test/ifunc-noplt.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_ifunc || skip\n\ncat <<EOF | $CC -fPIC -o $t/a.o -c -xc - -fno-plt\n#include <stdio.h>\n\n__attribute__((ifunc(\"resolve_foo\")))\nvoid foo(void);\n\nvoid hello(void) {\n  printf(\"Hello world\\n\");\n}\n\ntypedef void Fn();\n\nFn *resolve_foo(void) {\n  return hello;\n}\n\nint main() {\n  foo();\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -pie\n$QEMU $t/exe1 | grep 'Hello world'\n\n$CC -B. -o $t/exe2 $t/a.o -no-pie\n$QEMU $t/exe2 | grep 'Hello world'\n"
  },
  {
    "path": "test/ifunc-static-pie.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -static-pie || skip\nsupports_ifunc || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\n#include <stdio.h>\n\nvoid foo() __attribute__((ifunc(\"resolve_foo\")));\n\nvoid hello() {\n  printf(\"Hello world\\n\");\n}\n\nvoid *resolve_foo() {\n  return hello;\n}\n\nint main() {\n  foo();\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe2 $t/a.o -static-pie\n$QEMU $t/exe2 | grep 'Hello world'\n"
  },
  {
    "path": "test/ifunc-static.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -static || skip\nsupports_ifunc || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\n\nvoid foo() __attribute__((ifunc(\"resolve_foo\")));\n\nvoid hello() {\n  printf(\"Hello world\\n\");\n}\n\nvoid *resolve_foo() {\n  return hello;\n}\n\nint main() {\n  foo();\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -static\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/image-base.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\n\nint main() {\n  printf(\"Hello world\\n\");\n  return 0;\n}\nEOF\n\n$CC -B. -no-pie -o $t/exe1 $t/a.o -Wl,--image-base=0x8000000\n$QEMU $t/exe1 | grep 'Hello world'\nreadelf -W --sections $t/exe1 | grep -E '.interp\\s+PROGBITS\\s+0*8000...\\b'\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\nvoid _start() {}\nEOF\n\nif [ $MACHINE = x86-64 -o $MACHINE = aarch64 ]; then\n  $CC -B. -no-pie -o $t/exe2 $t/b.o -nostdlib -Wl,--image-base=0xffffffff80000000\n  readelf -W --sections $t/exe2 | grep -E '.interp\\s+PROGBITS\\s+ffffffff80000...\\b'\nfi\n"
  },
  {
    "path": "test/init-array-priorities.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# musl does not support GNU-style init/fini priorities\nis_musl && skip\n\ncat <<'EOF' | $CC -c -o $t/a.o -xc -\n#include <stdio.h>\n__attribute__((constructor(10000))) void init4() { printf(\"1\"); }\nEOF\n\ncat <<'EOF' | $CC -c -o $t/b.o -xc -\n#include <stdio.h>\n__attribute__((constructor(1000))) void init3() { printf(\"2\"); }\nEOF\n\ncat <<'EOF' | $CC -c -o $t/c.o -xc -\n#include <stdio.h>\n__attribute__((constructor)) void init1() { printf(\"3\"); }\nEOF\n\ncat <<'EOF' | $CC -c -o $t/d.o -xc -\n#include <stdio.h>\n__attribute__((constructor)) void init2() { printf(\"4\"); }\nEOF\n\ncat <<'EOF' | $CC -c -o $t/e.o -xc -\n#include <stdio.h>\n__attribute__((destructor(10000))) void fini4() { printf(\"5\"); }\nEOF\n\ncat <<'EOF' | $CC -c -o $t/f.o -xc -\n#include <stdio.h>\n__attribute__((destructor(1000))) void fini3() { printf(\"6\"); }\nEOF\n\ncat <<'EOF' | $CC -c -o $t/g.o -xc -\n#include <stdio.h>\n__attribute__((destructor)) void fini1() { printf(\"7\"); }\nEOF\n\ncat <<'EOF' | $CC -c -o $t/h.o -xc -\n#include <stdio.h>\n__attribute__((destructor)) void fini2() { printf(\"8\"); }\nEOF\n\ncat <<EOF | $CC -c -o $t/i.o -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o $t/c.o $t/d.o $t/e.o $t/f.o $t/g.o $t/h.o $t/i.o\n$QEMU $t/exe | grep '21348756'\n"
  },
  {
    "path": "test/init-in-dso.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -shared -o $t/a.so -xc -\nvoid foo() {}\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\nvoid foo();\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.so $t/b.o -Wl,-init,foo\nreadelf --dynamic $t/exe | not grep -F '(INIT)'\n"
  },
  {
    "path": "test/init.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid foo() {}\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,-init,foo\nreadelf --dynamic $t/exe | grep -F '(INIT)'\n\n$CC -B. -o $t/exe $t/a.o -Wl,-init,no-such-symbol\nreadelf --dynamic $t/exe | not grep -F '(INIT)'\n"
  },
  {
    "path": "test/initfirst.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -fPIC -o $t/a.o -xc -\n#include <stdio.h>\n\nvoid foo() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o -Wl,-z,initfirst\nreadelf --dynamic $t/b.so | grep 'Flags:.*INITFIRST'\n"
  },
  {
    "path": "test/interpose.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -fPIC -o $t/a.o -xc -\n#include <stdio.h>\n\nvoid foo() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o -Wl,-z,interpose\nreadelf --dynamic $t/b.so | grep 'Flags:.*INTERPOSE'\n"
  },
  {
    "path": "test/invalid-version-script.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\necho 'int main() {}' | $CC -c -o $t/a.o -xc -\n\necho 'VER1 { foo[12; };' > $t/b.ver\n\nnot $CC -B. -shared -o $t/c.so -Wl,-version-script,$t/b.ver $t/a.o |&\n  grep 'invalid version pattern'\n"
  },
  {
    "path": "test/issue646.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = sh4aeb ] && skip\n\ncat <<EOF | $CXX -o $t/a.o -c -xc++ -\n#include <iostream>\n#include <stdexcept>\n\nclass Foo : public std::runtime_error {\npublic:\n  using std::runtime_error::runtime_error;\n};\n\nstatic void do_throw() {\n  throw Foo(\"exception\");\n}\n\nint main() {\n  try {\n    do_throw();\n  } catch (const Foo &e) {\n    std::cout << \"error: \" << e.what() << std::endl;\n  }\n}\nEOF\n\n$CXX -B. -o $t/exe $t/a.o\n$QEMU $t/exe | grep 'error: exception'\n"
  },
  {
    "path": "test/large-alignment-dso.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = i686 ] && skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -ffunction-sections -fPIC\n#include <stdio.h>\n#include <stdint.h>\n\nvoid hello() __attribute__((aligned(32768), section(\".hello\")));\nvoid world() __attribute__((aligned(32768), section(\".world\")));\n\nvoid hello() {\n  printf(\"Hello\");\n}\n\nvoid world() {\n  printf(\" world\");\n}\n\nvoid greet() {\n  hello();\n  world();\n}\nEOF\n\n$CC -B. -o $t/b.so $t/a.o -shared\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\nvoid greet();\nint main() { greet(); }\nEOF\n\n$CC -B. -o $t/exe $t/c.o $t/b.so\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/large-alignment.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = i686 ] && skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -ffunction-sections\n#include <stdio.h>\n#include <stdint.h>\n\nvoid hello() __attribute__((aligned(32768), section(\".hello\")));\nvoid world() __attribute__((aligned(32768), section(\".world\")));\n\nvoid hello() {\n  printf(\"Hello\");\n}\n\nvoid world() {\n  printf(\" world\");\n}\n\nint main() {\n  hello();\n  world();\n\n  // Linux kernel may ignore a riduculously large alignment requirement,\n  // but we still want to verify that an executable with a large\n  // alignment requirement can still run.\n  //\n  // printf(\" %lu %lu\\n\",\n  //       (unsigned long)((uintptr_t)hello % 32768),\n  //       (unsigned long)((uintptr_t)world % 32768));\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/large-max-page-size-strip.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# ARM32's strip command crashes on the output of this test for some reason.\n[[ $MACHINE = arm* ]] && skip\n\nstrip=$STRIP\ncommand -v $strip >& /dev/null || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -pie -Wl,-zmax-page-size=0x200000\n$strip $t/exe\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/large-max-page-size.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -pie -Wl,-zmax-page-size=0x200000\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/large-text.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.globl foo\nfoo:\n.space 20*1024*1024\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\n#include <stdio.h>\nint main() { printf(\"Hello world\\n\"); }\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/library.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\n#include <stdio.h>\nvoid hello() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -shared -o $t/libfoobar.so $t/a.o\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\nvoid hello();\nint main() { hello(); }\nEOF\n\n$CC -B. -o $t/exe1 $t/c.o -L$t -Wl,--library,foobar -Wl,-rpath,$t\n$QEMU $t/exe1 | grep 'Hello world'\n\n$CC -B. -o $t/exe2 $t/c.o -L$t -Wl,--library=foobar -Wl,-rpath,$t\n$QEMU $t/exe2 | grep 'Hello world'\n"
  },
  {
    "path": "test/link-order.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\nvoid foo() {}\nEOF\n\n$CC -B. -shared -o $t/libfoo.so $t/a.o\nar crs $t/libfoo.a $t/a.o\n\ncat <<EOF | $CC -c -o $t/b.o -xc -\nvoid foo();\nint main() {\n  foo();\n}\nEOF\n\n$CC -B. -o $t/exe $t/b.o -Wl,--as-needed $t/libfoo.so $t/libfoo.a\nreadelf --dynamic $t/exe | grep libfoo\n\n$CC -B. -o $t/exe $t/b.o -Wl,--as-needed $t/libfoo.a $t/libfoo.so\nreadelf --dynamic $t/exe | not grep libfoo\n"
  },
  {
    "path": "test/linker-script-defsym.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint foo() { return 42; }\nEOF\n\ncat <<EOF > $t/script\nbar = foo;\nEOF\n\n$CC -B. -o $t/b.so -shared $t/script $t/a.o\nreadelf -sW $t/b.so | grep 'FUNC .* bar'\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\n#include <stdio.h>\nint bar();\nint main() {\n  printf(\"%d\\n\", bar());\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe $t/c.o $t/b.so\n$QEMU $t/exe | grep 42\n"
  },
  {
    "path": "test/linker-script-error.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint main() {}\nEOF\n\necho 'VERSION { ver_x /*' > $t/b.script\n\nnot $CC -B. -o $t/exe $t/a.o $t/b.script |& grep 'unclosed comment'\n"
  },
  {
    "path": "test/linker-script-relocatable.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# OneTBB isn't tsan-clean\nnm mold | grep '__tsan_init' && skip\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\n#include <stdio.h>\nvoid hello() { printf(\"Hello world\\n\"); }\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -xc -\nvoid hello();\nint main() { hello(); }\nEOF\n\necho \"INPUT($t/a.o $t/b.o)\" > $t/c.script\n\n./mold --relocatable -o $t/d.o $t/c.script\n\n$CC -B. -o $t/exe $t/d.o\n$QEMU $t/exe | grep Hello\n"
  },
  {
    "path": "test/linker-script.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\ncat <<EOF > $t/script\nGROUP(\"$t/a.o\")\nEOF\n\n$CC -B. -o $t/exe $t/script\n$QEMU $t/exe | grep 'Hello world'\n\n$CC -B. -o $t/exe -Wl,-T,$t/script\n$QEMU $t/exe | grep 'Hello world'\n\n$CC -B. -o $t/exe -Wl,--script,$t/script\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/linker-script2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint main() {}\nEOF\n\nmkdir -p $t/foo/bar\nrm -f $t/foo/bar/libfoo.a\nar rcs $t/foo/bar/libfoo.a $t/a.o\n\ncat <<EOF > $t/b.script\nINPUT(-lfoo)\nEOF\n\n$CC -B. -o $t/exe -L$t/foo/bar $t/b.script\n"
  },
  {
    "path": "test/linker-script3.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nmkdir -p $t/foo\n\ncat <<EOF | $CC -o $t/foo/a.o -c -xc -\nint main() {}\nEOF\n\ncat <<EOF > $t/b.script\nINPUT(a.o)\nEOF\n\n$CC -B. -o $t/exe -L$t/foo $t/b.script\n"
  },
  {
    "path": "test/linker-script4.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\necho 'VERSION { ver_x { global: *; }; };' > $t/a.script\n\ncat <<EOF > $t/b.s\n.globl foo, bar, baz\nfoo:\n  nop\nbar:\n  nop\nbaz:\n  nop\nEOF\n\n$CC -B. -shared -o $t/c.so $t/a.script $t/b.s\nreadelf --version-info $t/c.so > $t/log\n\ngrep -F 'Rev: 1  Flags: none  Index: 2  Cnt: 1  Name: ver_x' $t/log\n"
  },
  {
    "path": "test/linker-script5.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nmkdir -p $t/foo\n\ncat <<EOF | $CC -o $t/foo/a.o -c -xc -\nint main() {}\nEOF\n\ncat <<EOF > $t/foo/b.script\nINPUT(a.o)\nEOF\n\n$CC -B. -o $t/exe $t/foo/b.script\n"
  },
  {
    "path": "test/linker-script6.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nmkdir -p $t/foo\n\ncat <<EOF | $CC -o $t/foo/a.o -c -xc -\nint main() {}\nEOF\n\ncat <<EOF > $t/foo/b.script\n\nINPUT(a.o)\nEOF\n\n$CC -B. -o $t/exe $t/foo/b.script\n"
  },
  {
    "path": "test/lto-archive.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ \"$CC\" = cc ] || skip\ntest_cflags -flto || skip\n\ncat <<EOF | $CC -o $t/a.o -c -flto -xc -\n#include <stdio.h>\nvoid hello() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -flto -xc -\n#include <stdio.h>\nvoid howdy() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\nrm -f $t/c.a\nar rc $t/c.a $t/a.o $t/b.o\n\ncat <<EOF | $CC -o $t/d.o -c -flto -xc -\nvoid hello();\nint main() {\n  hello();\n}\nEOF\n\n$CC -B. -o $t/exe -flto $t/d.o $t/c.a\n$QEMU $t/exe | grep 'Hello world'\n\nnm $t/exe > $t/log\ngrep hello $t/log\nnot grep howdy $t/log\n"
  },
  {
    "path": "test/lto-archive2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -flto=auto || skip\n\necho | $CC -o $t/a.o -c -flto=auto -xc -\n\nrm -f $t/b.a\nar rc $t/b.a $t/a.o\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe -flto=auto $t/c.o $t/b.a\n"
  },
  {
    "path": "test/lto-archive3.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -flto=auto || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -flto\nvoid foo() {}\nEOF\n\nrm -f $t/b.a\nar rc $t/b.a $t/a.o\nar rc $t/c.a $t/a.o\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\nvoid foo();\nint main() { foo(); }\nEOF\n\n$CC -B. -o $t/exe -flto $t/c.o $t/b.a $t/c.a\n"
  },
  {
    "path": "test/lto-comdat.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = $(uname -m) ] || skip\necho 'int main() {}' | clang -B. -flto -o /dev/null -xc - || skip\n\necho '' | clang -S -emit-llvm -flto -o $t/a.ll -xc - || skip\n\ncat <<'EOF' >> $t/a.ll\n$foo = comdat any\n@foo = global i32 42, comdat($foo)\nEOF\n\ncp $t/a.ll $t/b.ll\n\nclang -S -emit-llvm -flto -o $t/a.bc $t/a.ll\nclang -S -emit-llvm -flto -o $t/b.bc $t/b.ll\n\ncat <<'EOF' | clang -o $t/c.o -c -flto -xc -\n#include <stdio.h>\nextern int foo;\nint main() { printf(\"%d\\n\", foo); }\nEOF\n\nclang -B. -o $t/exe -flto $t/a.bc $t/b.bc $t/c.o\n$QEMU $t/exe | grep 42\n"
  },
  {
    "path": "test/lto-dso.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -flto || skip\n\ncat <<EOF | $CC -flto -c -fPIC -o $t/a.o -xc -\nvoid foo() {}\nEOF\n\n$CC -B. -shared -o $t/b.so -flto $t/a.o\n\nif [ $MACHINE = ppc64 ]; then\n  # On PPC64V1, function symbol refers a function descriptor in .opd\n  nm -D $t/b.so | grep 'D foo'\nelse\n  nm -D $t/b.so | grep 'T foo'\nfi\n"
  },
  {
    "path": "test/lto-gcc.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\necho 'int main() {}' | $GCC -B. -flto -o /dev/null -xc - >& /dev/null || skip\n\ncat <<EOF | $GCC -flto -c -o $t/a.o -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$GCC -B. -o $t/exe1 -flto $t/a.o\n$QEMU $t/exe1 | grep 'Hello world'\n\n# Test that LTO is used for FAT LTO objects\ncat <<EOF | $GCC -flto -ffat-lto-objects -c -o $t/b.o -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$GCC -B. -o $t/exe2 $t/b.o --verbose |& grep -- -fwpa\n\n# Test FAT objects if -fno-use-linker-plugin is used\n\ncat <<EOF | $GCC -flto -fno-use-linker-plugin -c -o $t/c.o -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$GCC -B. -o $t/exe3 -flto -fno-use-linker-plugin $t/c.o\n$QEMU $t/exe3 | grep 'Hello world'\n"
  },
  {
    "path": "test/lto-llvm.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = $(uname -m) ] || skip\n\necho 'int main() {}' | clang -B. -flto -o /dev/null -xc - >& /dev/null || skip\n\ncat <<EOF | clang -flto -c -o $t/a.o -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\nclang -B. -o $t/exe -flto $t/a.o\n$t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/lto-llvm2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = $(uname -m) ] || skip\n\necho 'int main() {}' | clang -B. -flto -o /dev/null -xc - >& /dev/null || skip\n\ncat <<EOF | clang -flto -c -o $t/a.o -xc -\nint main() {}\nEOF\n\nclang -B. -o $t/exe1 -flto $t/a.o -Wl,-mllvm,-pass-remarks=.\nclang -B. -o $t/exe2 -flto $t/a.o -Wl,-plugin-opt,-pass-remarks=.\n\nnot clang -B. -o $t/exe3 -flto $t/a.o -Wl,-mllvm,--no-such-option |&\n  grep -i 'Unknown command line argument'\n\nnot clang -B. -o $t/exe4 -flto $t/a.o -Wl,-plugin-opt,--no-such-option |&\n  grep -i 'Unknown command line argument'\n"
  },
  {
    "path": "test/lto-no-plugin.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = $(uname -m) ] || skip\n\necho 'int main() {}' | clang -B. -flto -o /dev/null -xc - >& /dev/null || skip\n\necho 'int main() {}' | clang -c -o $t/a.o -xc -\necho 'void foo() {}' | clang -c -o $t/b.o -xc - -flto\n\nnot ./mold -o /dev/null $t/a.o $t/b.o |&\n  grep \"b.o: unable to handle this LTO object file\"\n"
  },
  {
    "path": "test/lto-nostdlib.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -flto || skip\n\ncat <<EOF | $CC -flto -c -o $t/a.o -xc -\nvoid _start() {}\nEOF\n\n$CC -B. -o $t/exe -flto $t/a.o -nostdlib\nreadelf -Ws $t/exe | grep -E ' _start'\n"
  },
  {
    "path": "test/lto-version-script.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -flto || skip\n\ncat <<EOF | $CC -flto -c -fPIC -o $t/a.o -xc -\nvoid foo() {}\nvoid bar() {}\nEOF\n\ncat <<EOF > $t/b.script\n{\n  global: foo;\n  local: *;\n};\nEOF\n\n$CC -B. -shared -o $t/c.so -flto $t/a.o -Wl,-version-script=$t/b.script\n\nif [ $MACHINE = ppc64 ]; then\n  # On PPC64V1, function symbol refers a function descriptor in .opd\n  nm -D $t/c.so | grep 'D foo'\n  nm -D $t/c.so | not grep 'D bar'\nelse\n  nm -D $t/c.so | grep 'T foo'\n  nm -D $t/c.so | not grep 'T bar'\nfi\n"
  },
  {
    "path": "test/main-in-dso.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = ppc64 ] && skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\n\n$CC -o $t/c.o -c -xc /dev/null -fPIC\n$CC -B. -o $t/exe1 $t/c.o $t/b.so -pie\n$QEMU $t/exe1 | grep 'Hello world'\n\n$CC -o $t/c.o -c -xc /dev/null -fno-PIC\n$CC -B. -o $t/exe2 $t/c.o $t/b.so -no-pie\n$QEMU $t/exe2 | grep 'Hello world'\n"
  },
  {
    "path": "test/many-input-sections.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nseq 1 100000 | sed 's/.*/.section .data.&,\"aw\"\\n.word 0\\n/g' |\n  $CC -c -xassembler -o $t/a.o -\n\ncat <<'EOF' | $CC -c -xc -o $t/b.o -\n#include <stdio.h>\n\nint main() {\n  printf(\"Hello\\n\");\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o\n$QEMU $t/exe | grep Hello\n"
  },
  {
    "path": "test/many-input-sections2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# OneTBB isn't tsan-clean\nnm mold | grep '__tsan_init' && skip\n\necho 'foo = 0x1000' > $t/a.s\nseq 1 100000 | sed 's/.*/.section .data.&,\"aw\"\\n.globl x&\\nx&: .word 0\\n/g' >> $t/a.s\n$CC -c -xassembler -o $t/a.o $t/a.s\n\n./mold --relocatable -o $t/b.o $t/a.o\n\nreadelf -WS $t/b.o > $t/log1\ngrep -F .data.100000 $t/log1\n\nreadelf -Ws $t/b.o > $t/log2\ngrep -F 'GLOBAL DEFAULT 100000' $t/log2\ngrep -F 'ABS foo' $t/log2\nnot grep -F 'ABS x68966' $t/log2\n"
  },
  {
    "path": "test/many-output-sections.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nseq 1 100000 | sed 's/.*/.globl foo&\\n.section .foo&,\"aw\"\\nfoo&:.word 0\\n/g' |\n  $CC -c -xassembler -o $t/a.o -\n\ncat <<'EOF' | $CC -c -xc -o $t/b.o - -fPIC\nextern int foo100000;\nint bar() { return foo100000; }\nEOF\n\nnot $CC -B. -shared -o $t/c.so $t/a.o $t/b.o |& grep -F 'too many output sections'\n"
  },
  {
    "path": "test/mcmodel-large.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -static -mcmodel=large || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fno-PIC -mcmodel=large\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -static -no-pie\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/mergeable-strings.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -O2\n#include <uchar.h>\n#include <wchar.h>\n\nchar *cstr1 = \"foo\";\nwchar_t *wide1 = L\"foo\";\nchar16_t *utf16_1 = u\"foo\";\nchar32_t *utf32_1 = U\"foo\";\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -O2\n#include <stdio.h>\n#include <uchar.h>\n#include <wchar.h>\n\nextern char *cstr1;\nextern wchar_t *wide1;\nextern char16_t *utf16_1;\nextern char32_t *utf32_1;\n\nchar *cstr2 = \"foo\";\nwchar_t *wide2 = L\"foo\";\nchar16_t *utf16_2 = u\"foo\";\nchar32_t *utf32_2 = U\"foo\";\n\nint main() {\n  printf(\"%p %p %p %p %p %p %p %p\\n\",\n         cstr1, cstr2, wide1, wide2, utf16_1, utf16_2, utf32_1, utf32_2);\n}\nEOF\n\n# String merging is an optional feature, so test it with the default\n# linker first to verify that it does work on this system.\n$CC -o $t/exe1 $t/a.o $t/b.o -no-pie\n\nif $QEMU $t/exe1 | grep -E '^(\\S+) \\1 (\\S+) \\2 (\\S+) \\3 (\\S+) \\4$'; then\n  $CC -B. -o $t/exe2 $t/a.o $t/b.o -no-pie\n  $QEMU $t/exe2 | grep -E '^(\\S+) \\1 (\\S+) \\2 (\\S+) \\3 (\\S+) \\4$'\nfi\n"
  },
  {
    "path": "test/missing-but-ok.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n  .text\n  .globl _start, foo\n_start:\n  nop\nEOF\n\n./mold -o $t/exe $t/a.o\n"
  },
  {
    "path": "test/missing-error.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint foo();\n\nint main() {\n  foo();\n}\nEOF\n\nnot ./mold -o $t/exe $t/a.o 2> $t/log\n\ngrep 'undefined symbol: foo' $t/log\ngrep '>>> .*a\\.o' $t/log\n"
  },
  {
    "path": "test/mold-wrapper.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ \"$CC\" = cc ] || skip\n\nldd mold-wrapper.so | grep libasan && skip\n\nnm mold | grep '__[at]san_init' && skip\n\ncat <<'EOF' > $t/a.sh\n#!/usr/bin/env bash\necho \"$0\" \"$@\" $FOO\nEOF\n\nchmod 755 $t/a.sh\n\ncat <<'EOF' | $CC -xc -o $t/exe -\n#define _GNU_SOURCE 1\n\n#include <assert.h>\n#include <stdio.h>\n#include <string.h>\n#include <unistd.h>\n\nextern char **environ;\n\nint main(int argc, char **argv) {\n  if (!strcmp(argv[1], \"execl\")) {\n    execl(\"/usr/bin/ld\", \"/usr/bin/ld\", \"execl\", (char *)0);\n    perror(\"execl\");\n    return 1;\n  }\n\n  if (!strcmp(argv[1], \"execlp\")) {\n    execlp(\"/usr/bin/ld\", \"/usr/bin/ld\", \"execlp\", (char *)0);\n    perror(\"execl\");\n    return 1;\n  }\n\n  if (!strcmp(argv[1], \"execle\")) {\n    execle(\"/usr/bin/ld\", \"/usr/bin/ld\", \"execle\", (char *)0, environ);\n    perror(\"execl\");\n    return 1;\n  }\n\n  if (!strcmp(argv[1], \"execv\")) {\n    execv(\"/usr/bin/ld\", (char *[]){\"/usr/bin/ld\", \"execv\", (char *)0});\n    perror(\"execl\");\n    return 1;\n  }\n\n  if (!strcmp(argv[1], \"execvp\")) {\n    execvp(\"/usr/bin/ld\", (char *[]){\"/usr/bin/ld\", \"execvp\", (char *)0});\n    perror(\"execl\");\n    return 1;\n  }\n\n  if (!strcmp(argv[1], \"execvpe\")) {\n    char *env[] = {\"FOO=bar\", NULL};\n    execvpe(\"/usr/bin/ld\", (char *[]){\"/usr/bin/ld\", \"execvpe\", (char *)0}, env);\n    perror(\"execl\");\n    return 1;\n  }\n\n  fprintf(stderr, \"unreachable: %s\\n\", argv[1]);\n  return 1;\n}\nEOF\n\nLD_PRELOAD=`pwd`/mold-wrapper.so MOLD_PATH=$t/a.sh $t/exe execl | grep 'a.sh execl'\nLD_PRELOAD=`pwd`/mold-wrapper.so MOLD_PATH=$t/a.sh $t/exe execlp | grep 'a.sh execlp'\nLD_PRELOAD=`pwd`/mold-wrapper.so MOLD_PATH=$t/a.sh $t/exe execle | grep 'a.sh execle'\nLD_PRELOAD=`pwd`/mold-wrapper.so MOLD_PATH=$t/a.sh $t/exe execv | grep 'a.sh execv'\nLD_PRELOAD=`pwd`/mold-wrapper.so MOLD_PATH=$t/a.sh $t/exe execvp | grep 'a.sh execvp'\nLD_PRELOAD=`pwd`/mold-wrapper.so MOLD_PATH=$t/a.sh $t/exe execvpe | grep 'a.sh execvpe bar'\n"
  },
  {
    "path": "test/mold-wrapper2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nldd mold-wrapper.so | grep libasan && skip\nnm mold | grep '__[at]san_init' && skip\n\n./mold -run bash -c 'echo $LD_PRELOAD' | grep -F mold-wrapper.so\n"
  },
  {
    "path": "test/nmagic.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid _start() {}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -nostdlib -Wl,-nmagic\n$CC -B. -o $t/exe2 $t/a.o -nostdlib\n\nend1=$(nm $t/exe1 | grep ' end$' | cut -d' ' -f1)\nend2=$(nm $t/exe2 | grep ' end$' | cut -d' ' -f1)\n\n[ $((0x$end1)) -lt $((0x$end2)) ]\n"
  },
  {
    "path": "test/no-allow-shlib-undefined-circular.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ \"$(uname)\" = FreeBSD ] && skip\n\ncat <<EOF | $CC -B. -shared -fPIC -o $t/libfoo.so -xc -\nvoid foo() {}\nEOF\n\ncat <<EOF | $CC -B. -shared -fPIC -o $t/libbar.so -xc - -L$t -lfoo\nvoid foo();\nvoid bar() { foo(); }\nEOF\n\ncat <<EOF | $CC -B. -shared -fPIC -o $t/libfoo.so -xc - -L$t -lbar\nvoid baz();\nvoid foo() { baz(); }\nEOF\n\ncat <<EOF | $CC -c -o $t/a.o -c -xc -\nint bar();\nint main() { bar(); }\nEOF\n\nnot $CC -B. -o $t/exe1 $t/a.o -Wl,--no-allow-shlib-undefined -L$t -lfoo -lbar |&\n  grep 'libfoo.so: --no-allow-shlib-undefined: undefined symbol: baz'\n"
  },
  {
    "path": "test/no-allow-shlib-undefined.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ \"$(uname)\" = FreeBSD ] && skip\n\ncat <<EOF | $CC -B. -shared -fPIC -o $t/libfoo.so -xc -\nvoid foo() {}\nEOF\n\ncat <<EOF | $CC -B. -shared -fPIC -o $t/libbar.so -xc -\nvoid foo();\nvoid bar() { foo(); }\nEOF\n\ncat <<EOF | $CC -c -o $t/a.o -c -xc -\nint bar();\nint main() { bar(); }\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -Wl,--no-allow-shlib-undefined -L$t -lfoo -lbar\n\nnot $CC -B. -o $t/exe2 $t/a.o -Wl,--no-allow-shlib-undefined -L$t -lbar >& $t/log\ngrep -F 'undefined symbol: foo' $t/log\n"
  },
  {
    "path": "test/no-allow-shlib-undefined2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ \"$(uname)\" = FreeBSD ] && skip\n\ncat <<EOF | $CC -B. -shared -fPIC -o $t/libfoo.so -xc -\nvoid foo() {}\nEOF\n\ncat <<EOF | $CC -B. -shared -fPIC -o $t/libbar.so -xc - -L$t -lfoo\nvoid foo();\nvoid bar() { foo(); }\nEOF\n\ncat <<EOF | $CC -c -o $t/a.o -c -xc -\nint bar();\nint main() { bar(); }\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -Wl,--no-allow-shlib-undefined -L$t -lfoo -lbar\n$CC -B. -o $t/exe2 $t/a.o -Wl,--no-allow-shlib-undefined -L$t -lbar\n\nmv $t/libfoo.so $t/libfoo.so.bak\necho | $CC -B. -shared -fPIC -o $t/libfoo.so -xc -\n\nnot $CC -B. -o $t/exe3 $t/a.o -Wl,--no-allow-shlib-undefined -L$t -lfoo -lbar\n"
  },
  {
    "path": "test/no-allow-shlib-undefined3.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ \"$(uname)\" = FreeBSD ] && skip\n\ncat <<EOF | $CC -B. -shared -fPIC -o $t/libfoo.so -xc -\nvoid foo() {}\nEOF\n\ncat <<EOF | $CC -B. -shared -fPIC -o $t/libbar.so -xc - -L$t -lfoo\nvoid foo();\nvoid bar() { foo(); }\nEOF\n\ncat <<EOF | $CC -B. -shared -fPIC -o $t/libbaz.so -xc - -L$t -lbar\nvoid bar();\nvoid baz() { bar(); }\nEOF\n\ncat <<EOF | $CC -c -o $t/a.o -c -xc -\nint baz();\nint main() { baz(); }\nEOF\n\nmv $t/libfoo.so $t/libfoo.so.bak\necho | $CC -B. -shared -fPIC -o $t/libfoo.so -xc -\n\n$CC -B. -o $t/exe1 $t/a.o -Wl,--no-allow-shlib-undefined -L$t -lbar -lbaz\n\nnot $CC -B. -o $t/exe2 $t/a.o -Wl,--no-allow-shlib-undefined \\\n  -L$t -lfoo -lbar -lbaz |& grep 'no-allow-shlib-undefined: undefined symbol: foo'\n"
  },
  {
    "path": "test/no-allow-shlib-undefined4.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ \"$(uname)\" = FreeBSD ] && skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\nvoid f1() {}\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -fPIC\nvoid f1();\nvoid f2() { f1(); }\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc - -fPIC\nvoid f1();\nvoid f3() { f1(); }\nEOF\n\n$CC -B. -o $t/libfoo.so -shared $t/a.o\n$CC -B. -o $t/libbar.so -shared $t/b.o -L$t -lfoo\n$CC -B. -o $t/libbaz.so -shared $t/c.o\n\n\ncat <<EOF | $CC -o $t/d.o -c -xc - -fPIC\nvoid f2();\nvoid f3();\nint main() { f2(); f3(); }\nEOF\n\n$CC -B. -o $t/exe $t/d.o -L$t -lbar -lbaz\n"
  },
  {
    "path": "test/no-eh-frame-header.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint main() {\n  return 0;\n}\nEOF\n\n$CC -B. -Wl,--no-eh-frame-hdr -Wl,--thread-count=1 -O0 -o $t/exe $t/a.o\nreadelf -WS $t/exe | not grep -F .eh_frame_hdr\n$QEMU $t/exe\n"
  },
  {
    "path": "test/no-object-file.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# Verify that mold does not crash if no object file is included\n# in the output. The resulting executable doesn't contain any\n# meaningful code or data, so this is an edge case, though.\n\ncat <<EOF | $CC -x assembler -c -o $t/a.o -\n.globl foo\nfoo:\nEOF\n\nrm -f $t/a.a\nar rcs $t/a.a $t/a.o\n\n./mold -o $t/exe $t/a.a\n"
  },
  {
    "path": "test/no-quick-exit.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\n\nint main() {\n  printf(\"Hello world\\n\");\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,-no-quick-exit\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/no-undefined-version.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\necho 'ver_x { global: foo; };' > $t/a.ver\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe -Wl,--version-script,$t/a.ver $t/b.o |&\n  grep -F 'a.ver: cannot assign version `ver_x` to symbol `foo`: symbol not found'\n"
  },
  {
    "path": "test/nocopyreloc.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = i686 ] && skip\n[ $MACHINE = m68k ] && skip\n[ $MACHINE = ppc64 ] && skip\n[ $MACHINE = ppc64le ] && skip\n[ $MACHINE = sh4 ] && skip\n[[ $MACHINE = arm* ]] && skip\n[[ $MACHINE = loongarch* ]] && skip\n\ncat <<EOF | $CC -shared -o $t/a.so -xc -\nint foo = 3;\nint bar = 5;\nEOF\n\ncat <<EOF | $CC -fno-PIC -c -o $t/b.o -xc -\n#include <stdio.h>\n\nextern int foo;\nextern int bar;\n\nint main() {\n  printf(\"%d %d\\n\", foo, bar);\n  return 0;\n}\nEOF\n\n$CC -B. -no-pie -o $t/exe $t/a.so $t/b.o\n$QEMU $t/exe | grep '3 5'\n\nnot $CC -B. -o $t/exe $t/a.so $t/b.o -no-pie -Wl,-z,nocopyreloc |&\n  grep 'recompile with -fPIC'\n"
  },
  {
    "path": "test/noinhibit-exec.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fno-PIC\nint main() {}\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\n\nnot $CC -B. -o $t/b.so $t/a.o -Wl,-require-defined=no-such-sym |&\n  grep 'undefined symbol: no-such-sym'\n\n$CC -B. -shared -o $t/b.o $t/a.o -Wl,-require-defined=no-such-sym,-noinhibit-exec |&\n  grep 'undefined symbol: no-such-sym'\n"
  },
  {
    "path": "test/non-canonical-plt.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.so -fPIC -shared -xc -\nvoid *foo() {\n  return foo;\n}\n\nvoid *bar() {\n  return bar;\n}\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -fPIC\nvoid *bar();\n\nvoid *baz() {\n  return bar;\n}\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc - -fPIC\n#include <stdio.h>\n\nvoid *foo();\nvoid *bar();\nvoid *baz();\n\nint main() {\n  printf(\"%d %d %d\\n\", foo == foo(), bar == bar(), bar == baz());\n}\nEOF\n\n$CC -B. -no-pie -o $t/exe $t/a.so $t/b.o $t/c.o\n$QEMU $t/exe | grep '^1 1 1$'\n\nreadelf --dyn-syms $t/exe | grep '00000000 .* foo'\nreadelf --dyn-syms $t/exe | grep '00000000 .* bar'\n"
  },
  {
    "path": "test/nostdlib.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fno-PIE\nvoid _start() {}\nEOF\n\n./mold -o $t/exe $t/a.o\n\nreadelf -W --sections $t/exe > $t/log\nnot grep -F ' .dynsym ' $t/log\nnot grep -F ' .dynstr ' $t/log\n"
  },
  {
    "path": "test/oformat-binary.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fno-PIE\nvoid _start() {}\nEOF\n\n./mold -o $t/exe $t/a.o --oformat=binary -Ttext=0x4000 -Map=$t/map\ngrep -E '^\\s+0x4000\\s+[0-9]+\\s+[0-9]+\\s+\\.text$' $t/map\n\nnot grep -F .strtab $t/map\nnot grep -F .shstrtab $t/map\nnot grep -F .symtab $t/map\nnot grep -F .comment $t/map\n"
  },
  {
    "path": "test/omagic.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -static || skip\n\ncat <<EOF | $CC -c -o $t/a.o -xc - -fno-PIC\n#include <stdio.h>\n\nint main() {\n  printf(\"Hello world\\n\");\n  return 0;\n}\nEOF\n\n$CC -B. $t/a.o -o $t/exe -static -no-pie -Wl,--omagic\nreadelf -W --segments $t/exe | grep -w RWE\n"
  },
  {
    "path": "test/package-metadata.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -Wl,-package-metadata='{\"foo\":\"bar\"}'\nreadelf -x .note.package $t/exe1 | grep -F '{\"foo\":\"bar\"}'\n\n$CC -B. -o $t/exe2 $t/a.o -Wl,--package-metadata='%7B%22foo%22%3A%22bar%22%7D'\nreadelf -x .note.package $t/exe2 | grep -F '{\"foo\":\"bar\"}'\n\nnot $CC -B. -o $t/exe3 $t/a.o -Wl,--package-metadata='foo%x' |&\n  grep 'invalid string: foo%x'\n"
  },
  {
    "path": "test/physical-image-base.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = ppc64 ] && skip\n\n# Test if grep supports backreferences\necho abab | grep -E '(ab)\\1' || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\n\n__attribute__((section(\"foo\"))) int bar;\n\nint main() {\n  printf(\"Hello world\\n\");\n  return 0;\n}\nEOF\n\n$CC -B. -no-pie -o $t/exe1 $t/a.o -Wl,--image-base=0x200000 \\\n   -Wl,--physical-image-base=0x800000\n\n$QEMU $t/exe1 | grep 'Hello world'\n\nreadelf -W --segments $t/exe1 | grep -E 'LOAD\\s+0x000000 0x0*200000 0x0*800000'\nreadelf -Ws $t/exe1 | grep __phys_start_foo\n\n\n$CC -B. -no-pie -o $t/exe2 $t/a.o -Wl,--physical-image-base=0x800000 \\\n  -Wl,--section-order='=0x800000 TEXT RODATA =0x900000 DATA BSS'\n\nreadelf -W --segments $t/exe2 | grep -E 'LOAD\\s+\\S+\\s+(\\S+)\\s\\1.*R E 0'\nreadelf -W --segments $t/exe2 | grep -E 'LOAD\\s+\\S+\\s+(\\S+)\\s\\1.*R   0'\n"
  },
  {
    "path": "test/pie.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -fPIE -\n#include <stdio.h>\n\nint main() {\n  printf(\"Hello world\\n\");\n  return 0;\n}\nEOF\n\n$CC -B. -pie -o $t/exe $t/a.o\nreadelf --file-header $t/exe | grep -E '(Shared object file|Position-Independent Executable file)'\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/plt-dso.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\n#include <stdio.h>\n\nvoid world() {\n  printf(\"world\\n\");\n}\n\nvoid real_hello() {\n  printf(\"Hello \");\n  world();\n}\n\nvoid hello() {\n  real_hello();\n}\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\n\ncat <<EOF | $CC -c -o $t/c.o -xc -\n#include <stdio.h>\n\nvoid world() {\n  printf(\"WORLD\\n\");\n}\n\nvoid hello();\n\nint main() {\n  hello();\n}\nEOF\n\n$CC -B. -o $t/exe -Wl,-rpath=$t $t/c.o $t/b.so\n$QEMU $t/exe | grep 'Hello WORLD'\n"
  },
  {
    "path": "test/plt-symbols.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc - -fPIC\nvoid bar();\nvoid foo() { bar(); }\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\nreadelf -Ws $t/b.so | grep 'LOCAL.*bar\\$plt$'\n"
  },
  {
    "path": "test/pltgot.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\n#include <stdio.h>\n\nvoid ignore(void *foo) {}\n\nvoid hello() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\n\ncat <<EOF | $CC -o $t/c.o -c -xc - -fPIC\nvoid ignore(void *);\nint hello();\n\nvoid foo() { ignore(hello); }\n\nint main() { hello(); }\nEOF\n\n$CC -B. -o $t/exe $t/c.o $t/b.so\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/preinit-array.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# We should not create a PREINIT_ARRAY .dynamic entry by default\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid _start() {}\nEOF\n\n./mold -o $t/exe1 $t/a.o\nreadelf -W --dynamic $t/exe1 | not grep PREINIT_ARRAY\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\nvoid preinit_fn() {}\nint main() {}\n\n__attribute__((section(\".preinit_array\")))\nvoid *preinit[] = { preinit_fn };\nEOF\n\n# We create a PREINIT_ARRAY .dynamic entry if necessary\n$CC -B. -o $t/exe2 $t/b.o\nreadelf -W --dynamic $t/exe2 | grep PREINIT_ARRAY\n"
  },
  {
    "path": "test/print-dependencies.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid foo() {}\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\nvoid foo();\nint main() { foo(); }\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o -Wl,--print-dependencies | grep 'b\\.o.*a\\.o.*foo$'\n"
  },
  {
    "path": "test/protected-dynsym.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\nextern int foo;\nEOF\n\ncat <<EOF | $CC -fPIC -c -o $t/b.o -fcommon -xc -\n__attribute__((visibility(\"protected\"))) int foo;\nEOF\n\n$CC -B. -shared -o $t/c.so $t/a.o $t/b.o -Wl,-strip-all\nreadelf --symbols $t/c.so | grep -E 'PROTECTED\\b.*\\bfoo\\b'\n\ncat <<EOF | $CC -fPIC -c -o $t/d.o -fno-common -xc -\n__attribute__((visibility(\"protected\"))) int foo;\nEOF\n\n$CC -B. -shared -o $t/e.so $t/a.o $t/d.o -Wl,-strip-all\nreadelf --symbols $t/e.so | grep -E 'PROTECTED\\b.*\\bfoo\\b'\n"
  },
  {
    "path": "test/protected.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\nint foo() __attribute__((visibility(\"protected\")));\nint bar() __attribute__((visibility(\"protected\")));\nvoid *baz() __attribute__((visibility(\"protected\")));\n\nint foo() {\n  return 4;\n}\n\nint bar() {\n  return foo();\n}\n\nvoid *baz() {\n  return baz;\n}\nEOF\n\n$CC -B. -o $t/b.so -shared $t/a.o\n\ncat <<EOF | $CC -c -o $t/c.o -xc - -fno-PIE\n#include <stdio.h>\n\nint foo() {\n  return 3;\n}\n\nint x = 5;\nint bar();\nvoid *baz() { return &x; }\n\nint main() {\n  printf(\"%d %d %d\\n\", foo(), bar(), baz == baz());\n}\nEOF\n\n$CC -B. -no-pie -o $t/exe $t/c.o $t/b.so\n$QEMU $t/exe 2> /dev/null | grep '3 4 0'\n"
  },
  {
    "path": "test/push-pop-state.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -shared -o $t/a.so -xc - -fPIC\nint foo = 1;\nEOF\n\ncat <<EOF | $CC -shared -o $t/b.so -xc - -fPIC\nint bar = 1;\nEOF\n\ncat <<EOF | $CC -c -o $t/c.o -xc - -fPIC\nint main() {}\nEOF\n\n$CC -B. -o $t/exe1 $t/c.o -Wl,-as-needed \\\n  -Wl,-push-state -Wl,-no-as-needed $t/a.so -Wl,-pop-state $t/b.so\n\nreadelf --dynamic $t/exe1 > $t/log1\ngrep -F a.so $t/log1\nnot grep -F b.so $t/log1\n\nif test_cflags -static; then\n  $CC -B. -o $t/exe2 $t/c.o -no-pie -static\n  readelf --dynamic $t/exe2 | grep -F 'no dynamic section'\n\n  $CC -B. -o $t/exe3 $t/c.o -no-pie -Wl,-push-state,-static,-pop-state\n  readelf --dynamic $t/exe3 | grep -F libc\nfi\n"
  },
  {
    "path": "test/range-extension-thunk.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# Skip if 32 bits as we use very large addresses in this test.\n[ $MACHINE = i686 ] && skip\n[ $MACHINE = riscv32 ] && skip\n[ $MACHINE = m68k ] && skip\n\n# It looks like SPARC's runtime can't handle PLT if it's too far from GOT.\n[ $MACHINE = sparc64 ] && skip\n\n# Current LoongArch compilers emit BL for function calls, but I believe\n# they'll emit PCADDU18I + JIRL (which can address PC ± 128 GiB) in the\n# future.\n[[ $MACHINE = loongarch* ]] && skip\n\n# qemu aborts with the \"Unknown exception 0x5\" error, although this\n# test passes on a real POWER10 machine.\non_qemu && [ \"$CPU\" = power10 ] && skip\n\ncat <<EOF > $t/a.c\n#include <stdio.h>\n\nvoid fn3();\nvoid fn4();\n\n__attribute__((section(\".low\"))) void fn1() { printf(\" fn1\"); fn3(); }\n__attribute__((section(\".low\"))) void fn2() { printf(\" fn2\"); fn4(); }\n\nint main() {\n  printf(\" main\");\n  fn1();\n  printf(\"\\n\");\n}\nEOF\n\ncat <<EOF > $t/b.c\n#include <stdio.h>\n\nvoid fn1();\nvoid fn2();\n\n__attribute__((section(\".high\"))) void fn3() { printf(\" fn3\"); fn2(); }\n__attribute__((section(\".high\"))) void fn4() { printf(\" fn4\"); }\nEOF\n\n$CC -c -o $t/c.o $t/a.c -O0\n$CC -c -o $t/d.o $t/b.c -O0\n\n$CC -B. -o $t/exe1 $t/c.o $t/d.o \\\n  -Wl,--section-start=.low=0x10000000,--section-start=.high=0x20000000\n$QEMU $t/exe1 | grep 'main fn1 fn3 fn2 fn4'\n\n$CC -c -o $t/e.o $t/a.c -O2\n$CC -c -o $t/f.o $t/b.c -O2\n\n$CC -B. -o $t/exe2 $t/e.o $t/f.o \\\n  -Wl,--section-start=.low=0x10000000,--section-start=.high=0x20000000\n$QEMU $t/exe2 | grep 'main fn1 fn3 fn2 fn4'\n"
  },
  {
    "path": "test/range-extension-thunk2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -ffunction-sections\n#include <stdio.h>\n\nvoid f0(int);\nvoid f1(int);\nvoid f2(int);\nvoid f3(int);\nvoid f4(int);\nvoid f5(int);\nvoid f6(int);\nvoid f7(int);\nvoid f8(int);\nvoid f9(int);\nvoid f10(int);\nvoid f11(int);\nvoid f12(int);\nvoid f13(int);\nvoid f14(int);\nvoid f15(int);\nvoid f16(int);\nvoid f17(int);\nvoid f18(int);\nvoid f19(int);\n\nvoid f0(int x) { printf(\"0 \"); if (!x) f9(x); }\nvoid space0() { __asm__(\".space 1024*1024\"); }\n\nvoid f1(int x) { printf(\"1 \"); f8(x); }\nvoid space1() { __asm__(\".space 1024*1024\"); }\n\nvoid f2(int x) { printf(\"2 \"); f7(x); }\nvoid space2() { __asm__(\".space 1024*1024\"); }\n\nvoid f3(int x) { printf(\"3 \"); f6(x); }\nvoid space3() { __asm__(\".space 1024*1024\"); }\n\nvoid f4(int x) { printf(\"4 \"); f5(x); }\nvoid space4() { __asm__(\".space 1024*1024\"); }\n\nvoid f5(int x) { printf(\"5 \"); f10(x); }\nvoid space5() { __asm__(\".space 1024*1024\"); }\n\nvoid f6(int x) { printf(\"6 \"); f4(x); }\nvoid space6() { __asm__(\".space 1024*1024\"); }\n\nvoid f7(int x) { printf(\"7 \"); f3(x); }\nvoid space7() { __asm__(\".space 1024*1024\"); }\n\nvoid f8(int x) { printf(\"8 \"); f2(x); }\nvoid space8() { __asm__(\".space 1024*1024\"); }\n\nvoid f9(int x) { printf(\"9 \"); f1(x); }\nvoid space9() { __asm__(\".space 1024*1024\"); }\n\nvoid f10(int x) { printf(\"10 \"); f19(x); }\nvoid space10() { __asm__(\".space 8*1024*1024\"); }\n\nvoid f11(int x) { printf(\"11 \"); f18(x); }\nvoid space11() { __asm__(\".space 8*1024*1024\"); }\n\nvoid f12(int x) { printf(\"12 \"); f17(x); }\nvoid space12() { __asm__(\".space 8*1024*1024\"); }\n\nvoid f13(int x) { printf(\"13 \"); f16(x); }\nvoid space13() { __asm__(\".space 8*1024*1024\"); }\n\nvoid f14(int x) { printf(\"14 \"); f15(x); }\nvoid space14() { __asm__(\".space 8*1024*1024\"); }\n\nvoid f15(int x) { printf(\"15 \"); f0(x + 1); }\nvoid space15() { __asm__(\".space 8*1024*1024\"); }\n\nvoid f16(int x) { printf(\"16 \"); f14(x); }\nvoid space16() { __asm__(\".space 8*1024*1024\"); }\n\nvoid f17(int x) { printf(\"17 \"); f13(x); }\nvoid space17() { __asm__(\".space 8*1024*1024\"); }\n\nvoid f18(int x) { printf(\"18 \"); f12(x); }\nvoid space18() { __asm__(\".space 8*1024*1024\"); }\n\nvoid f19(int x) { printf(\"19 \"); f11(x); }\nvoid space19() { __asm__(\".space 8*1024*1024\"); }\n\nint main() {\n  f0(0);\n  printf(\"\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o\n$QEMU $t/exe | grep -E '^0 9 1 8 2 7 3 6 4 5 10 19 11 18 12 17 13 16 14 15 0 $'\n"
  },
  {
    "path": "test/range-extension-thunk3.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = sh4 ] && skip\n\nseq 1 10000 | sed 's/.*/void func&() {}/' > $t/a.c\n$CC -B. -o $t/b.so -shared $t/a.c\n\nseq 1 10000 | sed 's/.*/void func&();/' > $t/c.c\necho 'int main() {' >> $t/c.c\nseq 1 10000 | sed 's/.*/func&();/' >> $t/c.c\necho '}' >> $t/c.c\n\n$CC -c -o $t/d.o $t/c.c\n$CC -B. -o $t/exe $t/d.o $t/b.so\n$QEMU $t/exe\n"
  },
  {
    "path": "test/range-extension-thunk4.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[[ $MACHINE = ppc* ]] && skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\n#include <stdio.h>\nvoid hello() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\n#include <stdio.h>\nvoid hello();\nint main() { hello(); }\nEOF\n\n$CC -B. -o $t/exe $t/c.o $t/b.so\nreadelf -W --syms $t/exe | not grep -F 'hello$thunk'\n"
  },
  {
    "path": "test/relax-got-load.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\n#include <stdio.h>\nextern char *msg;\nvoid hello() { printf(\"%s\\n\", msg); }\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -fPIC\nchar *msg = \"Hello world\";\nvoid hello();\nint main() { hello(); }\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o\n$QEMU $t/exe1 | grep 'Hello world'\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o -Wl,--no-relax\n$QEMU $t/exe2 | grep 'Hello world'\n\n# On x86, GOTPCRELX is relaxed even with --no-relax\ncase $MACHINE in\naarch64 | riscv64 | s390x | loongarch64)\n  $OBJDUMP -d $t/exe1 | grep -v exe1 > $t/log1\n  $OBJDUMP -d $t/exe2 | grep -v exe2 > $t/log2\n  not diff $t/log1 $t/log2 > /dev/null\n  ;;\nesac\n"
  },
  {
    "path": "test/reloc-rodata.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\nexit\n\n[ $MACHINE = aarch64 ] && skip\n\ncat <<EOF | $CC -fno-PIC -c -o $t/a.o -xc -\n#include <stdio.h>\n\nint foo;\nint * const bar = &foo;\n\nint main() {\n  printf(\"%d\\n\", *bar);\n}\nEOF\n\nnot $CC -B. -o $t/exe $t/a.o -pie |&\n  grep -E 'relocation against symbol .+ can not be used; recompile with -fPIC'\n"
  },
  {
    "path": "test/relocatable-archive.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# OneTBB isn't tsan-clean\nnm mold | grep '__tsan_init' && skip\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\nvoid bar();\nvoid foo() {\n  bar();\n}\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -xc -\nvoid bar() {}\nEOF\n\ncat <<EOF | $CC -c -o $t/c.o -xc -\nvoid baz() {}\nEOF\n\ncat <<EOF | $CC -c -o $t/d.o -xc -\nvoid foo();\nint main() {\n  foo();\n}\nEOF\n\nar crs $t/e.a $t/a.o $t/b.o $t/c.o\n./mold -r -o $t/f.o $t/d.o $t/e.a\n\nreadelf --symbols $t/f.o > $t/log\ngrep 'foo\\b' $t/log\ngrep 'bar\\b' $t/log\nnot grep 'baz\\b' $t/log\n"
  },
  {
    "path": "test/relocatable-c++.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# OneTBB isn't tsan-clean\nnm mold | grep '__tsan_init' && skip\n\ncat <<EOF | $CXX -c -o $t/a.o -xc++ -\nvoid hello();\nvoid world();\n\ntemplate <typename T>\nstruct Foo {\n  Foo() { hello(); }\n};\n\ntemplate <typename T>\nstruct Bar {\n  Bar() { world(); }\n};\n\nvoid baz() {\n  Foo<int> foo;\n  Bar<int> bar;\n}\nEOF\n\ncat <<EOF | $CXX -c -o $t/b.o -xc++ -\n#include <iostream>\n\nvoid hello() { std::cout << \"Hello \"; }\nvoid world() { std::cout << \"world\\n\"; }\nvoid baz();\n\nint main() {\n  baz();\n}\nEOF\n\n./mold --relocatable -o $t/c.o $t/a.o\n./mold --relocatable -o $t/d.o $t/b.o\n\n$CXX -B. -o $t/exe $t/c.o $t/d.o\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/relocatable-compressed-debug-info.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# OneTBB isn't tsan-clean\nnm mold | grep '__tsan_init' && skip\n\ntest_cflags -g3 -gz || skip\n\ncat <<EOF | $CC -c -o $t/a.o -xc - -g3 -gz\n#include <stdio.h>\nvoid hello() { printf(\"Hello world\\n\"); }\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -xc - -g3 -gz\nvoid hello();\nint main() { hello(); }\nEOF\n\n./mold --relocatable -o $t/c.o $t/a.o $t/b.o\n$CC -B. -o $t/exe $t/c.o\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/relocatable-debug-info.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# OneTBB isn't tsan-clean\nnm mold | grep '__tsan_init' && skip\n\ncat <<EOF | $CC -c -o $t/a.o -xc - -g\n#include <stdio.h>\nvoid hello() { printf(\"Hello world\\n\"); }\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -xc - -g\nvoid hello();\nint main() { hello(); }\nEOF\n\n# It looks like objdump prints out a warning message for\n# object files compiled with Clang.\n$OBJDUMP --dwarf=info $t/a.o $t/b.o |& grep 'Warning: DIE at offset' && skip\n\n./mold --relocatable -o $t/c.o $t/a.o $t/b.o\n\n$CC -B. -o $t/exe $t/c.o\n$QEMU $t/exe | grep 'Hello world'\n\n$OBJDUMP --dwarf=info $t/c.o > /dev/null |& not grep Warning\n"
  },
  {
    "path": "test/relocatable-exception.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = m68k ] && skip\n[ $MACHINE = sh4 ] && skip\n[ $MACHINE = sh4aeb ] && skip\n\n# OneTBB isn't tsan-clean\nnm mold | grep '__tsan_init' && skip\n\ncat <<EOF | $CXX -c -o $t/a.o -xc++ -\nint foo() {\n  try {\n    throw 0;\n  } catch (int x) {\n    return x;\n  }\n  return 1;\n}\nEOF\n\ncat <<EOF | $CXX -c -o $t/b.o -xc++ -\n#include <iostream>\nint foo();\nint main() { std::cout << foo() << \"\\n\"; }\nEOF\n\n./mold --relocatable -o $t/c.o $t/a.o $t/b.o\n\n$CXX -B. -o $t/exe $t/c.o\n$QEMU $t/exe\n"
  },
  {
    "path": "test/relocatable-many-sections.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# OneTBB isn't tsan-clean\nnm mold | grep '__tsan_init' && skip\n\nseq 1 80000 | sed 's/.*/.section .data.&,\"aw\"\\n.word 0\\n/g' |\n  $CC -c -xassembler -o $t/a.o -\n\ncat <<'EOF' | $CC -c -xc -o $t/b.o -\n#include <stdio.h>\n\nint main() {\n  printf(\"Hello\\n\");\n  return 0;\n}\nEOF\n\n./mold -r -o $t/c.o $t/a.o $t/b.o\n$CC -B. -o $t/exe $t/c.o\n$QEMU $t/exe | grep Hello\n"
  },
  {
    "path": "test/relocatable-merge-sections.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# OneTBB isn't tsan-clean\nnm mold | grep '__tsan_init' && skip\n\ncat <<EOF | $CC -c -o $t/a.o -xc -ffunction-sections -\nvoid foo() {}\nvoid bar() {}\nEOF\n\n./mold --relocatable -o $t/b.o $t/a.o\nreadelf -WS $t/b.o > $t/log1\ngrep -F .text.foo $t/log1\ngrep -F .text.bar $t/log1\n\n./mold --relocatable -o $t/c.o $t/a.o --relocatable-merge-sections\nreadelf -WS $t/c.o > $t/log2\nnot grep -F .text.foo $t/log2\nnot grep -F .text.bar $t/log2\n"
  },
  {
    "path": "test/relocatable-mergeable-sections.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# OneTBB isn't tsan-clean\nnm mold | grep '__tsan_init' && skip\n\ncat <<EOF | $CC -c -o $t/a.o -xassembler -\n.section .rodata.str1.1,\"aMS\",@progbits,1\nval1:\n.ascii \"Hello \\0\"\n\n.section .rodata.str1.1,\"aMS\",@progbits,1\nval5:\n.ascii \"World \\0\"\nEOF\n\n./mold --relocatable -o $t/b.o $t/a.o\n\nreadelf -W -p .rodata.str1.1 $t/b.o | grep -E '\\b0\\b.*Hello'\nreadelf -W -p .rodata.str1.1 $t/b.o | grep -E '\\b7\\b.*World'\n"
  },
  {
    "path": "test/relocatable.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# OneTBB isn't tsan-clean\nnm mold | grep '__tsan_init' && skip\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\n#include <stdio.h>\nvoid hello() { printf(\"Hello world\\n\"); }\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -xc -\nvoid hello();\nint main() { hello(); }\nEOF\n\n./mold --relocatable -o $t/c.o $t/a.o $t/b.o\n\n$CC -B. -o $t/exe $t/c.o\n$QEMU $t/exe\n"
  },
  {
    "path": "test/relro-alignment.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = i686 ] && skip\n[ $MACHINE = arm ] && skip\n[ $MACHINE = armeb ] && skip\n[ $MACHINE = ppc ] && skip\n[ $MACHINE = sh4 ] && skip\n[ $MACHINE = sh4aeb ] && skip\n[ $MACHINE = m68k ] && skip\n[ $MACHINE = riscv32 ] && skip\n\ncat <<EOF | $CC -c -xc -o $t/a.o -\n#include <stdio.h>\n#include <unistd.h>\n#include <stdint.h>\n\n#define PT_GNU_RELRO 0x6474e552\n\ntypedef struct {\n  char e_ident[16];\n  uint16_t e_type;\n  uint16_t e_machine;\n  uint32_t e_version;\n  uint64_t e_entry;\n  uint64_t e_phoff;\n  uint64_t e_shoff;\n  uint32_t e_flags;\n  uint16_t e_ehsize;\n  uint16_t e_phentsize;\n  uint16_t e_phnum;\n  uint16_t e_shentsize;\n  uint16_t e_shnum;\n  uint16_t e_shstrndx;\n} Ehdr;\n\ntypedef struct {\n  uint32_t p_type;\n  uint32_t p_flags;\n  uint64_t p_offset;\n  uint64_t p_vaddr;\n  uint64_t p_paddr;\n  uint64_t p_filesz;\n  uint64_t p_memsz;\n  uint64_t p_align;\n} Phdr;\n\nextern char __ehdr_start[];\n\nint main() {\n  Ehdr *ehdr = (Ehdr *)__ehdr_start;\n  Phdr *phdr = (Phdr *)(__ehdr_start + ehdr->e_phoff);\n  int pagesz = sysconf(_SC_PAGESIZE);\n\n  for (int i = 0; i < ehdr->e_phnum; i++) {\n    if (phdr[i].p_type == PT_GNU_RELRO) {\n      if ((phdr[i].p_vaddr + phdr[i].p_memsz) % pagesz == 0) {\n        printf(\"Aligned: vaddr=%lx memsz=%lx pagesize=%x\\n\",\n               phdr[i].p_vaddr, phdr[i].p_memsz, pagesz);\n      } else {\n        printf(\"Unaligned: vaddr=%lx memsz=%lx pagesize=%x\\n\",\n               phdr[i].p_vaddr, phdr[i].p_memsz, pagesz);\n      }\n      return 0;\n    }\n  }\n  printf(\"PT_GNU_RELRO missing\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -Wl,-z,relro\n$QEMU $t/exe1 | grep Aligned\n\n$CC -B. -o $t/exe2 $t/a.o -Wl,-z,relro,-z,separate-loadable-segments\n$QEMU $t/exe2 | grep Aligned\n"
  },
  {
    "path": "test/relro.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -xc -o $t/a.o -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -Wl,-z,relro,-z,lazy\n$QEMU $t/exe1 | grep 'Hello world'\nreadelf --segments -W $t/exe1 | grep -w GNU_RELRO\n\n$CC -B. -o $t/exe2 $t/a.o -Wl,-z,relro,-z,now\n$QEMU $t/exe2 | grep 'Hello world'\nreadelf --segments -W $t/exe2 | grep -w GNU_RELRO\n\n$CC -B. -o $t/exe3 $t/a.o -Wl,-z,norelro\n$QEMU $t/exe3 | grep 'Hello world'\nreadelf --segments -W $t/exe3 | not grep -w GNU_RELRO\n"
  },
  {
    "path": "test/repro.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\n#include <stdio.h>\n\nint main() {\n  printf(\"Hello world\\n\");\n  return 0;\n}\nEOF\n\nrm -rf $t/exe.repro $t/exe.repro.tar\n\n$CC -B. -o $t/exe $t/a.o\nnot [ -f $t/exe.repro.tar ]\n\n$CC -B. -o $t/exe $t/a.o -Wl,-repro\n\ntar -C $t -xf $t/exe.repro.tar\ntar -C $t -tvf $t/exe.repro.tar | grep ' exe.repro/.*/a.o'\ngrep /a.o  $t/exe.repro/response.txt\ngrep mold $t/exe.repro/version.txt\n\nrm -rf $t/exe.repro $t/exe.repro.tar\n\nMOLD_REPRO=1 $CC -B. -o $t/exe $t/a.o\ntar -C $t -tvf $t/exe.repro.tar | grep ' exe.repro/.*/a.o'\ntar -C $t -xf $t/exe.repro.tar\ngrep /a.o  $t/exe.repro/response.txt\ngrep mold $t/exe.repro/version.txt\n"
  },
  {
    "path": "test/require-defined.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid foobar() {}\nEOF\n\nrm -f $t/b.a\nar rcs $t/b.a $t/a.o\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/c.o $t/b.a\nreadelf --symbols $t/exe | not grep foobar\n\n$CC -B. -o $t/exe $t/c.o $t/b.a -Wl,-require-defined,foobar\nreadelf --symbols $t/exe | grep foobar\n\nnot $CC -B. -o $t/exe $t/c.o $t/b.a -Wl,-require-defined,xyz |&\n  grep 'undefined symbol: xyz'\n"
  },
  {
    "path": "test/response-file-quoting.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\nvoid foo();\nint main() { foo(); }\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -xc -\nvoid foo() {}\nEOF\n\necho $t/a.o > $t/rsp1\necho $t'\"\\/b.\"\\o' >> $t/rsp1\n./mold -o $t/c.so -shared @$t/rsp1\n\necho $t/a.o > $t/rsp2\necho '\\foo\\bar' >> $t/rsp2\nnot ./mold -o $t/d.so -shared @$t/rsp2 |& grep 'cannot open foobar:'\n"
  },
  {
    "path": "test/response-file.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\nvoid foo();\nvoid bar();\nint main() { foo(); bar(); }\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -xc -\nvoid foo() {}\nEOF\n\ncat <<EOF | $CC -c -o $t/c.o -xc -\nvoid bar() {}\nEOF\n\necho \"'$t/b.o' '$t/c.o'\" > $t/rsp\n./mold -o $t/d.so -shared $t/a.o @$t/rsp\n"
  },
  {
    "path": "test/response-file2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\nvoid foo();\nint main() { foo(); }\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -xc -\nvoid foo() {}\nEOF\n\necho \"'$t/b.o'\" > $t/rsp1\necho \"@$t/rsp1\" > $t/rsp2\n./mold -o $t/c.so -shared $t/a.o @$t/rsp2\n"
  },
  {
    "path": "test/retain-symbols-file.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\nstatic void foo() {}\nvoid bar() {}\nvoid baz() {}\nint main() { foo(); }\nEOF\n\ncat <<EOF > $t/symbols\nfoo\nbaz\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,--retain-symbols-file=$t/symbols\nreadelf -W --symbols $t/exe > $t/log\n\nnot grep ' foo$' $t/log\nnot grep ' bar$' $t/log\nnot grep ' main$' $t/log\n\ngrep ' baz$' $t/log\n"
  },
  {
    "path": "test/reverse-sections.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc++ -\n#include <cstdio>\nstatic struct Foo1 {\n  Foo1() { printf(\"foo1 \"); }\n} x;\n\nstatic struct Foo2 {\n  Foo2() { printf(\"foo2 \"); }\n} y;\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc++ -\n#include <cstdio>\nstatic struct Foo3 {\n  Foo3() { printf(\"foo3 \"); }\n} x;\n\nstatic struct Foo4 {\n  Foo4() { printf(\"foo4 \"); }\n} y;\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc++ -\n#include <cstdio>\nstatic struct Foo5 {\n  Foo5() { printf(\"foo5 \"); }\n} x;\n\nstatic struct Foo6 {\n  Foo6() { printf(\"foo6 \"); }\n} y;\n\nint main() { printf(\"\\n\"); }\nEOF\n\n$CXX -B. -o $t/exe1 $t/a.o $t/b.o $t/c.o\n$QEMU $t/exe1 | grep 'foo1 foo2 foo3 foo4 foo5 foo6'\n\n$CXX -B. -o $t/exe2 $t/a.o $t/b.o $t/c.o -Wl,--reverse-sections\n$QEMU $t/exe2 | grep 'foo5 foo6 foo3 foo4 foo1 foo2'\n"
  },
  {
    "path": "test/rodata-name.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# ARM assembler has a differnet grammar than the others.\n# Concretely speaking, ARM as uses \"@\" as a start of a comment.\n[[ $MACHINE = arm* ]] && skip\n\n# All data symbols need to be aligned to 2 byte boundaries on s390x,\n# so rodata.str1.1 in this file is invalid on s390x.\n[ $MACHINE = s390x ] && skip\n\ncat <<'EOF' | $CC -c -o $t/a.o -x assembler -\n.globl val1, val2, val3, val4, val5\n\n.section .rodata.str1.1,\"aMS\",@progbits,1\nval1:\n.ascii \"Hello \\0\"\n\n.section .rodata.foo,\"aMS\",@progbits,4\n.p2align 2\nval2:\n.ascii \"world   \\0\\0\\0\\0\"\n\n.section .rodata.x,\"aMS\",@progbits,1\nval3:\n.ascii \"foobar\\0\"\n\n.section .rodata.cst8,\"aM\",@progbits,8\n.p2align 3\nval4:\n.ascii \"abcdefgh\"\n\n.section .rodatabaz,\"aMS\",@progbits,1\nval5:\n.ascii \"baz\\0\"\nEOF\n\ncat <<'EOF' | $CC -c -o $t/b.o -xc -\n#include <stdio.h>\n\nextern char val1, val2, val3, val4, val5;\n\nint main() {\n  printf(\"%p %p %p %p %p\\n\", &val1, &val2, &val3, &val4, &val5);\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o\n\nreadelf -p .rodata.str1.1 $t/exe | grep Hello\nreadelf -p .rodata.str4.4 $t/exe | grep world\nreadelf -p .rodata.str1.1 $t/exe | grep foobar\nreadelf -p .rodata.cst8 $t/exe | grep abcdefgh\nreadelf -p .rodatabaz $t/exe | grep baz\n"
  },
  {
    "path": "test/rosegment.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\nint main() { printf(\"Hello world\\n\"); }\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o\nreadelf -W --segments $t/exe1 | not grep '\\.interp .* \\.text'\n\n$CC -B. -o $t/exe2 $t/a.o -Wl,--rosegment\nreadelf -W --segments $t/exe2 | not grep '\\.interp .* \\.text'\n\n$CC -B. -o $t/exe3 $t/a.o -Wl,--no-rosegment\nreadelf -W --segments $t/exe3 | grep '\\.interp .* \\.text'\n"
  },
  {
    "path": "test/rpath.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n  .text\n  .globl main\nmain:\n  nop\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -Wl,-rpath,/foo,-rpath,/bar,-R/no/such/directory,-R/\nreadelf --dynamic $t/exe1 | grep -F 'Library runpath: [/foo:/bar:/no/such/directory:/]'\n\n$CC -B. -o $t/exe2 $t/a.o -Wl,-rpath,/foo,-rpath,/bar,-rpath,/foo,-rpath,/baz\nreadelf --dynamic $t/exe2 | grep -F 'Library runpath: [/foo:/bar:/baz]'\n"
  },
  {
    "path": "test/run-clang.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ \"$CC\" = cc ] || skip\n\n# ASAN doesn't work with LD_PRELOAD\nnm mold-wrapper.so | grep '__[at]san_init' && skip\n\nclang --version >& /dev/null || skip\n\ncat <<'EOF' | $CC -xc -c -o $t/a.o -\n#include <stdio.h>\n\nint main() {\n  printf(\"Hello\\n\");\n  return 0;\n}\nEOF\n\nLD_PRELOAD=`pwd`/mold-wrapper.so MOLD_PATH=`pwd`/mold \\\n  clang -no-pie -o $t/exe $t/a.o -fuse-ld=/usr/bin/ld\n\nreadelf -p .comment $t/exe | grep mold\n"
  },
  {
    "path": "test/run.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ \"$CC\" = cc ] || skip\n\n# ASAN doesn't work with LD_PRELOAD\nnm mold | grep '__[at]san_init' && skip\n\ncat <<'EOF' | $CC -xc -c -o $t/a.o -\n#include <stdio.h>\n\nint main() {\n  printf(\"Hello\\n\");\n  return 0;\n}\nEOF\n\nLD_PRELOAD=`pwd`/mold-wrapper.so MOLD_PATH=`pwd`/mold \\\n  $CC -o $t/exe $t/a.o -B/usr/bin\n\nreadelf -p .comment $t/exe | grep mold\n\n./mold -run env | grep '^MOLD_PATH=.*/mold$'\n\n./mold -run /usr/bin/ld --version | grep mold\n./mold -run /usr/bin/ld.lld --version | grep mold\n./mold -run /usr/bin/ld.gold --version | grep mold\n\nrm -f $t/ld $t/ld.lld $t/ld.gold $t/foo.ld\ntouch $t/ld $t/ld.lld $t/ld.gold\necho \"#!/bin/sh\" >$t/foo.ld\nchmod 755 $t/ld $t/ld.lld $t/ld.gold $t/foo.ld\n\n./mold -run $t/ld --version | grep mold\n./mold -run $t/ld.lld --version | grep mold\n./mold -run $t/ld.gold --version | grep mold\n./mold -run $t/foo.ld --version | not grep mold\n\ncat <<'EOF' > $t/sh\n#!/bin/sh\n$1 --version\nEOF\n\nchmod 755 $t/sh\n\n./mold -run $t/sh ld --version | grep mold\n./mold -run $t/sh $t/foo.ld --version |& not grep mold\n\n./mold -run $t/sh $t/ld --version | grep mold\n./mold -run $t/sh $t/ld.lld --version | grep mold\n./mold -run $t/sh $t/ld.gold --version | grep mold\n./mold -run $t/sh $t/foo.ld --version | not grep mold\n"
  },
  {
    "path": "test/section-align.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -fno-PIC -\n__attribute__((section(\".foo\"))) int foo;\nint main() {}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -Wl,--section-align=.foo=0x2000\nreadelf -WS $t/exe1 | grep '\\.foo.* 8192$'\n\n$CC -B. -o $t/exe2 $t/a.o -Wl,--section-align=.foo=256\nreadelf -WS $t/exe2 | grep '\\.foo.* 256$'\n\nnot $CC -B. -o $t/exe3 $t/a.o -Wl,--section-align=.foo=3 |&\n  grep 'must be a power of 2'\n"
  },
  {
    "path": "test/section-attributes.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.section .foobar,\"aw\"\n.ascii \"foo\\0\"\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xassembler -\n.section .foobar,\"a\"\n.ascii \"bar\\0\"\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xassembler -\n.section .foobar,\"ax\"\n.ascii \"bar\\0\"\nEOF\n\ncat <<EOF | $CC -o $t/d.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o $t/c.o $t/d.o\nreadelf -W --sections $t/exe | grep 'foobar.*WAX'\n"
  },
  {
    "path": "test/section-order.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -fno-PIC $flags -\n#include <stdio.h>\n\n__attribute__((section(\".fn1\"))) void fn1() { printf(\" fn1\"); }\n__attribute__((section(\".fn2\"))) void fn2() { printf(\" fn2\"); }\n\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -no-pie \\\n  -Wl,--section-order='=0x100000 EHDR PHDR =0x200000 .fn2 TEXT =0x300000 .fn1 DATA BSS RODATA'\n$QEMU $t/exe1 | grep Hello\n\nreadelf -SW $t/exe1 | grep '\\.fn2 .*00200000'\nreadelf -SW $t/exe1 | grep '\\.fn1 .*00300000'\n\n\n$CC -B. -o $t/exe2 $t/a.o -no-pie \\\n  -Wl,--section-order='=0x200000 EHDR RODATA =0x300000 PHDR =0x400000 .fn2 TEXT DATA BSS'\n\nreadelf -SW $t/exe2 | grep '\\.fn2 .*00400000'\nreadelf -sW $t/exe2 | grep -E ': 0+200000\\s.*\\s__ehdr_start$'\nreadelf -W --segments $t/exe2 | grep -E 'PHDR\\s.*0x0+300000\\s'\n\n\n$CC -B. -o $t/exe3 $t/a.o -no-pie \\\n  -Wl,--section-order='=0x200000 !ehdr_start EHDR %0x20 !rodata_start RODATA =0x300000 !phdr_start PHDR %4096 !phdr_end =0x400000 !text_start TEXT DATA BSS'\n\nreadelf -sW $t/exe3 > $t/log3\ngrep -E '\\b0+200000 .* ehdr_start$' $t/log3\ngrep -E '\\b0+200040 .* rodata_start$' $t/log3\ngrep -E '\\b0+300000 .* phdr_start$' $t/log3\ngrep -E '\\b0+301000 .* phdr_end$' $t/log3\ngrep -E '\\b0+400000 .* text_start$' $t/log3\n\nnot $CC -B. -o $t/exe4 $t/a.o -no-pie \\\n  -Wl,--section-order='=0x800000 EHDR PHDR =0x200000 .fn2 TEXT =0x300000 .fn1 DATA BSS RODATA' |&\n  grep 'address goes backward'\n"
  },
  {
    "path": "test/section-start.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# On PPC64V1, function pointers do not refer function entry addresses\n# but instead refers \"function descriptors\" in .opd.\n[ $MACHINE = ppc64 ] && skip\n\n# The crt*.o compiled with B26 caused far form GOT.\n[[ $MACHINE = loongarch* ]] && skip\n\n[ $MACHINE = arm ] && flags=-marm\n\ncat <<EOF | $CC -o $t/a.o -c -xc -fno-PIC $flags -\n#include <stdio.h>\n\n__attribute__((section(\".fn1\"))) void fn1() { printf(\" fn1\"); }\n__attribute__((section(\".fn2\"))) void fn2() { printf(\" fn2\"); }\n\nint main() {\n  printf(\"main\");\n  fn1();\n  fn2();\n  printf(\" %p %p\\n\", fn1, fn2);\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -no-pie \\\n  -Wl,--section-start=.fn1=0x10000000,--section-start=.fn2=0x20000000\n$QEMU $t/exe1 | grep 'main fn1 fn2 0x10000000 0x20000000'\n\n# PT_LOAD must be sorted on p_vaddr\nreadelf -W --segments $t/exe1 | grep ' LOAD ' | sed 's/0x[0-9a-f]*//' > $t/log1\ndiff $t/log1 <(sort $t/log1)\n\n$CC -B. -o $t/exe2 $t/a.o -no-pie \\\n  -Wl,--section-start=.fn1=0x20000000,--section-start=.fn2=0x10000000\n$QEMU $t/exe2 | grep 'main fn1 fn2 0x20000000 0x10000000'\n\nreadelf -W --segments $t/exe2 | grep ' LOAD ' | sed 's/0x[0-9a-f]*//' > $t/log2\ndiff $t/log2 <(sort $t/log2)\n"
  },
  {
    "path": "test/separate-debug-file-sort.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nnm mold | grep '__tsan_init' && skip\ncommand -v flock >& /dev/null || skip\n\ncat <<EOF > $t/a.c\nint x = 1;\nvoid foo() {}\nEOF\n\n$CC -o $t/a.o -c -g -gdwarf32 $t/a.c || skip\n\ncat <<EOF > $t/b.c\nint y = 1;\nint main() {}\nEOF\n\n$CC -o $t/b.o -c -g -gdwarf64 $t/b.c\n\nMOLD_DEBUG=1 $CC -B. -o $t/exe $t/a.o $t/b.o -g -Wl,--separate-debug-file\nflock $t/exe.dbg true\nreadelf -p .debug_line_str $t/exe.dbg > $t/str\n\nif grep -Fw a.c $t/str; then\n  grep -A10 -Fw a.c $t/str | grep -Fw b.c\nfi\n"
  },
  {
    "path": "test/separate-debug-file.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nnm mold | grep '__tsan_init' && skip\non_qemu && skip\ncommand -v gdb >& /dev/null || skip\ncommand -v flock >& /dev/null || skip\n\ncat <<EOF > $t/a.c\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -c -o $t/a.o $t/a.c -g\n$CC -B. -o $t/exe1 $t/a.o -Wl,--separate-debug-file\nreadelf -SW $t/exe1 | grep -F .gnu_debuglink\n\nflock $t/exe1.dbg true\ngdb $t/exe1 -ex 'list main' -ex 'quit' | grep -F printf\n\nreadelf -W --sections $t/exe1.dbg | not grep -E '[EPS]HDR'\n\n\n$CC -c -o $t/a.o $t/a.c -g\n$CC -B. -o $t/exe2 $t/a.o -Wl,--separate-debug-file,--no-build-id\nreadelf -SW $t/exe2 | grep -F .gnu_debuglink\n\nflock $t/exe2.dbg true\ngdb $t/exe2 -ex 'list main' -ex 'quit' | grep -F printf\n\n\n$CC -c -o $t/a.o $t/a.c -g\n$CC -B. -o $t/exe3 $t/a.o -Wl,--separate-debug-file,--compress-debug-sections=zlib\nreadelf -SW $t/exe3 | grep -F .gnu_debuglink\n\nflock $t/exe3.dbg true\nreadelf -W --sections $t/exe3.dbg | grep '\\.debug_info .*C'\ngdb $t/exe3 -ex 'list main' -ex 'quit' | grep -F printf\n"
  },
  {
    "path": "test/shared-abs-sym.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# This test is flaky on FreeBSD\n[ \"$(uname)\" = FreeBSD ] && skip\n\ncat <<EOF | $CC -B. -fPIC -shared -o $t/a.so -xassembler -\n.globl foo\nfoo = 3;\nEOF\n\ncat <<EOF | $CC -B. -fPIC -shared -o $t/b.so -xassembler -\n.globl foo\nfoo = 5;\nEOF\n\ncat <<EOF | $CC -fPIC -c -o $t/d.o -xc -\n#include <stdio.h>\nextern char foo;\nint main() { printf(\"foo=%p\\n\", &foo); }\nEOF\n\ncp $t/a.so $t/c.so\n$CC -B. -o $t/exe1 $t/d.o $t/c.so -pie || skip\n$QEMU $t/exe1 | grep 'foo=0x3' || skip\ncp $t/b.so $t/c.so\n$QEMU $t/exe1 | grep 'foo=0x5'\n\ncp $t/a.so $t/c.so\n$CC -B. -o $t/exe2 $t/d.o $t/c.so -no-pie\n$QEMU $t/exe2 | grep 'foo=0x3'\ncp $t/b.so $t/c.so\n$QEMU $t/exe1 | grep 'foo=0x5'\n"
  },
  {
    "path": "test/shared.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -fPIC -c -o $t/a.o -xc -\nvoid fn2();\nvoid fn1() { fn2(); }\nvoid fn3() {}\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\n\nreadelf --dyn-syms $t/b.so > $t/log\n\ngrep '00000000     0 NOTYPE  GLOBAL DEFAULT  UND fn2' $t/log\ngrep -E 'FUNC    GLOBAL DEFAULT .* fn1' $t/log\n\ncat <<EOF | $CC -fPIC -c -o $t/c.o -xc -\n#include <stdio.h>\n\nint fn1();\n\nvoid fn2() {\n  printf(\"hello\\n\");\n}\n\nint main() {\n  fn1();\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe $t/c.o $t/b.so\n$QEMU $t/exe | grep hello\nreadelf --symbols $t/exe | not grep fn3\n"
  },
  {
    "path": "test/shuffle-sections-seed.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -ffunction-sections -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n# Create a lot of sections to lower the probability that\n# we get the identical output as a result of shuffling.\nfor i in `seq 1 1000`; do echo \"void fn$i() {}\"; done |\n  $CC -o $t/b.o -ffunction-sections -c -xc -\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o\n$QEMU $t/exe1 | grep 'Hello world'\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o -Wl,-shuffle-sections=42\n$QEMU $t/exe2 | grep 'Hello world'\n\n$CC -B. -o $t/exe3 $t/a.o $t/b.o -Wl,-shuffle-sections=42\n$QEMU $t/exe3 | grep 'Hello world'\n\n$CC -B. -o $t/exe4 $t/a.o $t/b.o -Wl,-shuffle-sections=5\n$QEMU $t/exe4 | grep 'Hello world'\n\nnot diff $t/exe1 $t/exe2 >& /dev/null\ndiff $t/exe2 $t/exe3\nnot diff $t/exe3 $t/exe4 >& /dev/null\n"
  },
  {
    "path": "test/shuffle-sections.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -ffunction-sections -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n# Create a lot of sections to lower the probability that\n# we get the identical output as a result of shuffling.\nfor i in `seq 1 1000`; do echo \"void fn$i() {}\"; done |\n  $CC -o $t/b.o -ffunction-sections -c -xc -\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o\n$QEMU $t/exe1 | grep 'Hello world'\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o -Wl,-shuffle-sections\n$QEMU $t/exe2 | grep 'Hello world'\n\nnot diff $t/exe1 $t/exe2 >& /dev/null\n"
  },
  {
    "path": "test/soname.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\nvoid foo() {}\nEOF\n\n$CC -o $t/b.so -shared $t/a.o\nreadelf --dynamic $t/b.so | not grep -F 'Library soname'\n\n$CC -B. -o $t/b.so -shared $t/a.o -Wl,-soname,foo\nreadelf --dynamic $t/b.so | grep -F 'Library soname: [foo]'\n"
  },
  {
    "path": "test/sort-debug-info-compressed.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -g -gdwarf32 -Wl,--compress-debug-sections=zlib || skip\nvoid foo() {}\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -g -gdwarf64 -Wl,--compress-debug-sections=zstd || skip\nint main() {}\nEOF\n\n# Test if DWARF32 precedes DWARF64 in the output .debug_info\nMOLD_DEBUG=1 $CC -B. -o $t/exe1 $t/a.o $t/b.o -g -Wl,-Map=$t/map1\ngrep -A10 -F '/a.o:(.debug_info)' $t/map1 | grep -F '/b.o:(.debug_info)'\n\nMOLD_DEBUG=1 $CC -B. -o $t/exe2 $t/b.o $t/a.o -g -Wl,-Map=$t/map2\ngrep -A10 -F '/a.o:(.debug_info)' $t/map2 | grep -F '/b.o:(.debug_info)'\n"
  },
  {
    "path": "test/sort-debug-info-merged.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nnm mold | grep '__tsan_init' && skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -g -gdwarf64 || skip\nvoid foo() {}\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -g -gdwarf32\nvoid bar() {}\nEOF\n\n./mold -r -o $t/c.o $t/a.o $t/b.o\n\ncat <<EOF | $CC -o $t/d.o -c -xc - -g -gdwarf64\nint main() {}\nEOF\n\nMOLD_DEBUG=1 $CC -B. -o $t/exe1 $t/c.o $t/d.o -g -Wl,-Map=$t/map1\ngrep -A10 -F '/c.o:(.debug_info)' $t/map1 | grep -F '/d.o:(.debug_info)'\n\nMOLD_DEBUG=1 $CC -B. -o $t/exe2 $t/d.o $t/c.o -g -Wl,-Map=$t/map2\ngrep -A10 -F '/c.o:(.debug_info)' $t/map2 | grep -F '/d.o:(.debug_info)'\n"
  },
  {
    "path": "test/sort-debug-info.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF > $t/a.c\nint x = 1;\nvoid foo() {}\nEOF\n\n$CC -o $t/a.o -c -g -gdwarf32 $t/a.c || skip\n\ncat <<EOF > $t/b.c\nint y = 1;\nint main() {}\nEOF\n\n$CC -o $t/b.o -c -g -gdwarf64 $t/b.c\n\n# Test if DWARF32 precedes DWARF64 in the output .debug_info\n\nMOLD_DEBUG=1 $CC -B. -o $t/exe1 $t/a.o $t/b.o -g -Wl,-Map=$t/map1\ngrep -A10 -F '/a.o:(.debug_info)' $t/map1 | grep -F '/b.o:(.debug_info)'\nreadelf -p .debug_line_str $t/exe1 > $t/str1\n\nif grep -Fw a.c $t/str1; then\n  grep -A10 -Fw a.c $t/str1 | grep -Fw b.c\nfi\n\n\nMOLD_DEBUG=1 $CC -B. -o $t/exe2 $t/b.o $t/a.o -g -Wl,-Map=$t/map2\ngrep -A10 -F '/a.o:(.debug_info)' $t/map2 | grep -F '/b.o:(.debug_info)'\nreadelf -p .debug_line_str $t/exe2 > $t/str2\n\nif grep -Fw a.c $t/str2; then\n  grep -A10 -Fw a.c $t/str2 | grep -Fw b.c\nfi\n\n\nif [ -z \"$QEMU\" ] && command -v gdb; then\n  gdb $t/exe1 -ex 'list main' -ex 'quit' | grep 'int y = 1'\n  gdb $t/exe2 -ex 'list main' -ex 'quit' | grep 'int y = 1'\nfi\n"
  },
  {
    "path": "test/spare-program-headers.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o\n$QEMU $t/exe1 | grep 'Hello world'\n[ \"$(readelf -Wl $t/exe1 | grep NULL | wc -l)\" -eq 0 ]\n\n$CC -B. -o $t/exe2 $t/a.o -Wl,--spare-program-headers=0\n$QEMU $t/exe2 | grep 'Hello world'\n[ \"$(readelf -Wl $t/exe2 | grep NULL | wc -l)\" -eq 0 ]\n\n$CC -B. -o $t/exe3 $t/a.o -Wl,--spare-program-headers=1\n$QEMU $t/exe3 | grep 'Hello world'\n[ \"$(readelf -Wl $t/exe3 | grep NULL | wc -l)\" -eq 1 ]\n\n$CC -B. -o $t/exe4 $t/a.o -Wl,--spare-program-headers=5\n$QEMU $t/exe4 | grep 'Hello world'\n[ \"$(readelf -Wl $t/exe4 | grep NULL | wc -l)\" -eq 5 ]\n"
  },
  {
    "path": "test/start-lib.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint foo() { return 3; }\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\nint bar() { return 3; }\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe -Wl,-start-lib $t/a.o -Wl,-end-lib $t/b.o $t/c.o\nnm $t/exe > $t/log\nnot grep ' foo$' $t/log\ngrep ' bar$' $t/log\n"
  },
  {
    "path": "test/start-stop-symbol.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -c -o $t/a.o -xc -\n__attribute__((section(\"foo\")))\nchar data[] = \"section foo\";\nEOF\n\nar rcs $t/b.a $t/a.o\n\ncat <<EOF | $CC -c -o $t/c.o -xc -\n#include <stdio.h>\n\nextern char data[];\nextern char __start_foo[];\nextern char __stop_foo[];\n\nint main() {\n  printf(\"%.*s %s\\n\", (int)(__stop_foo - __start_foo), __start_foo, data);\n}\nEOF\n\n$CC -B. -o $t/exe $t/c.o $t/b.a\n$QEMU $t/exe | grep 'section foo section foo'\n\n$CC -B. -o $t/exe $t/c.o $t/b.a -Wl,-gc-sections\n$QEMU $t/exe | grep 'section foo section foo'\n"
  },
  {
    "path": "test/start-stop.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -Wl,--start-stop\nreadelf -sW $t/exe1 | grep __start_text\nreadelf -sW $t/exe1 | grep __stop_text\n"
  },
  {
    "path": "test/static-archive.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/long-long-long-filename.o -c -xc -\nint three() { return 3; }\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\nint five() { return 5; }\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\n#include <stdio.h>\n\nint three();\nint five();\n\nint main() {\n  printf(\"%d\\n\", three() + five());\n}\nEOF\n\nrm -f $t/d.a\n(cd $t; ar rcs d.a long-long-long-filename.o b.o)\n\n$CC -B. -Wl,--trace -o $t/exe $t/c.o $t/d.a > $t/log\n\ngrep -F 'static-archive/d.a(long-long-long-filename.o)' $t/log\ngrep -F 'static-archive/d.a(b.o)' $t/log\ngrep -F static-archive/c.o $t/log\n\n$QEMU $t/exe | grep '8'\n"
  },
  {
    "path": "test/static-pie.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -static-pie || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIE\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -static-pie\n$QEMU $t/exe1 | grep 'Hello world'\n\n$CC -B. -o $t/exe2 $t/a.o -static-pie -Wl,--no-relax\n$QEMU $t/exe2 | grep 'Hello world'\n"
  },
  {
    "path": "test/stdout.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\n\nint main() {\n  printf(\"Hello world\\n\");\n  return 0;\n}\nEOF\n\n$CC -B. -Wl,-build-id=sha1 $t/a.o -o - > $t/exe\nchmod 755 $t/exe\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/strip-debug.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -g\nstatic void foo() {}\nvoid bar() {}\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,--strip-debug\n\nreadelf -W --sections $t/exe | not grep -F .debug_info\nreadelf -W --symbols $t/exe | grep ' bar'\n"
  },
  {
    "path": "test/strip.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -x assembler -c -o $t/a.o -Wa,-L -\n.globl _start, foo\n_start:\nfoo:\nbar:\n.L.baz:\nEOF\n\n./mold -o $t/exe $t/a.o\nreadelf --symbols $t/exe > $t/log\ngrep -F _start $t/log\ngrep -F foo $t/log\ngrep -F bar $t/log\n\nif [[ $MACHINE != riscv* ]] && [[ $MACHINE != loongarch* ]]; then\n  grep -F .L.baz $t/log\nfi\n\n./mold -o $t/exe $t/a.o -strip-all\nreadelf --symbols $t/exe > $t/log\nnot grep -F _start $t/log\nnot grep -F foo $t/log\nnot grep -F bar $t/log\n\nif [[ $MACHINE != riscv* ]] && [[ $MACHINE != loongarch* ]]; then\n  not grep -F .L.baz $t/log\nfi\n"
  },
  {
    "path": "test/stt-common.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fcommon -xc -c -o $t/a.o - -Wa,--elf-stt-common=yes 2> /dev/null || skip\nint foo;\nint bar;\nint baz = 42;\nEOF\n\ncat <<EOF | $CC -fcommon -xc -c -o $t/b.o - -Wa,--elf-stt-common=yes\n#include <stdio.h>\n\nint foo;\nint bar = 5;\nint baz;\n\nint main() {\n  printf(\"%d %d %d\\n\", foo, bar, baz);\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o -Wl,--fatal-warnings\n$QEMU $t/exe | grep '0 5 42'\n\nreadelf --sections $t/exe > $t/log\ngrep '.common .*NOBITS' $t/log\n"
  },
  {
    "path": "test/symbol-rank.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint a = 0;\n__attribute__((weak)) int weak_undef;\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -fcommon\nint b = 0;\nint common;\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\nint c = 0;\n__attribute__((weak)) int weak_def = 3;\nEOF\n\ncat <<EOF | $CC -o $t/d.o -c -xc - -fcommon\n#include <stdio.h>\n\n__attribute__((weak)) extern int a;\n__attribute__((weak)) extern int b;\nextern int c;\n\n__attribute__((weak)) extern int weak_undef;\n__attribute__((weak)) int weak_def = 5;\n\nint common;\n\nint main() {\n  (void)common;\n  (void)c;\n  printf(\"%d %d %d %d\\n\", !!&a, !!&b, !!&weak_undef, weak_def);\n}\nEOF\n\nrm -f $t/x.a\nar rcs $t/x.a $t/a.o $t/b.o $t/c.o\n\n$CC -B. -o $t/exe $t/d.o $t/x.a\n$QEMU $t/exe | grep '^0 0 0 5$'\n"
  },
  {
    "path": "test/symbol-version-as-needed.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\n#include <stdio.h>\nvoid foo1() { printf(\"foo1\\n\"); }\nvoid foo2() { printf(\"foo2\\n\"); }\n__asm__(\".symver foo1, foo@ver1\");\n__asm__(\".symver foo2, foo@@ver2\");\nEOF\n\necho 'ver1 { local: *; }; ver2 { local: *; };' > $t/b.ver\n$CC -B. -shared -o $t/libfoo.so $t/a.o -Wl,--version-script=$t/b.ver\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\nvoid foo();\nint main() { foo(); }\n__asm__(\".symver foo, foo@ver2\");\nEOF\n\n$CC -B. -o $t/exe $t/b.o -L$t -Wl,--as-needed -lfoo -Wl,-rpath=$t\n$QEMU $t/exe | grep foo2\n"
  },
  {
    "path": "test/symbol-version-lto.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -flto || skip\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc - -flto\nvoid foo_1() {}\n__asm__(\".symver foo_1, foo@@VER1\");\nEOF\n\necho 'VER1 { foo; };' > $t/b.ver\n$CC -B. -shared -o $t/c.so $t/a.o -Wl,--version-script=$t/b.ver -flto\nreadelf --symbols $t/c.so > $t/log\n\ngrep -F 'foo@@VER1' $t/log\n"
  },
  {
    "path": "test/symbol-version-multi.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\nvoid foo() {}\n__asm__(\".symver foo, foo@TEST1\");\n__asm__(\".symver foo, foo@@TEST2\");\nEOF\n\ncat <<EOF > $t/b.version\nTEST1 { local: *; };\nTEST2 {};\nTEST3 {};\nEOF\n\n$CC -B. -o $t/c.so -shared $t/a.o -Wl,--version-script=$t/b.version\n\nreadelf -W --dyn-syms $t/c.so | grep -F 'foo@TEST1'\nreadelf -W --dyn-syms $t/c.so | grep -F 'foo@@TEST2'\n"
  },
  {
    "path": "test/symbol-version.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\nvoid foo1() {}\nvoid foo2() {}\nvoid foo3() {}\n\n__asm__(\".symver foo1, foo@VER1\");\n__asm__(\".symver foo2, foo@VER2\");\n__asm__(\".symver foo3, foo@@VER3\");\n\nvoid foo();\n\nvoid bar() {\n  foo();\n}\nEOF\n\necho 'VER1 { local: *; }; VER2 { local: *; }; VER3 { local: *; };' > $t/b.ver\n$CC -B. -shared -o $t/c.so $t/a.o -Wl,--version-script=$t/b.ver\nreadelf --symbols $t/c.so > $t/log\n\ngrep -F 'foo@VER1' $t/log\ngrep -F 'foo@VER2' $t/log\ngrep -F 'foo@@VER3' $t/log\n"
  },
  {
    "path": "test/symbol-version2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid foo() {}\nvoid bar1() {}\n\n__asm__(\".symver foo, foo@TEST\");\n__asm__(\".symver bar1, bar@TEST\");\nEOF\n\ncat <<EOF > $t/b.version\nTEST { global: foo; };\nEOF\n\n$CC -B. -o $t/c.so -shared $t/a.o -Wl,--version-script=$t/b.version\nreadelf -W --dyn-syms $t/c.so > $t/log\n\ngrep ' foo@TEST' $t/log\ngrep ' bar@TEST' $t/log\ngrep ' bar1' $t/log\nnot grep ' foo@@TEST' $t/log\n"
  },
  {
    "path": "test/symbol-version3.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid foo() {}\nvoid foo2() {}\nvoid foo3() {}\n\n__asm__(\".symver foo2, foo@TEST2\");\n__asm__(\".symver foo3, foo@TEST3\");\nEOF\n\ncat <<EOF > $t/b.version\nTEST1 { global: foo; };\nTEST2 {};\nTEST3 {};\nEOF\n\n$CC -B. -o $t/c.so -shared $t/a.o -Wl,--version-script=$t/b.version\nreadelf -W --dyn-syms $t/c.so > $t/log\n\ngrep ' foo@@TEST1' $t/log\ngrep ' foo@TEST2' $t/log\ngrep ' foo@TEST3' $t/log\nnot grep ' foo$' $t/log\n"
  },
  {
    "path": "test/symbol-version4.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\n#include <stdio.h>\n\nvoid foo() { printf(\"foo \"); }\nvoid foo2() {}\nvoid foo3() {}\n\n__asm__(\".symver foo2, foo@TEST2\");\n__asm__(\".symver foo3, foo@TEST3\");\nEOF\n\ncat <<EOF > $t/b.version\nTEST1 { global: foo; };\nTEST2 {};\nTEST3 {};\nEOF\n\n$CC -B. -o $t/c.so -shared $t/a.o -Wl,--version-script=$t/b.version\n\ncat <<EOF | $CC -o $t/d.o -c -xc - -fPIC\n#include <stdio.h>\n\nvoid foo();\n\nvoid bar() { printf(\"bar \"); }\nvoid bar2() { foo(); }\nvoid bar3() {}\n\n__asm__(\".symver bar2, bar@TEST2\");\n__asm__(\".symver bar3, bar@TEST3\");\nEOF\n\ncat <<EOF > $t/e.version\nTEST1 { global: bar; };\nTEST2 {};\nTEST3 {};\nEOF\n\n$CC -B. -o $t/f.so -shared $t/d.o $t/c.so -Wl,--version-script=$t/e.version\n\ncat <<EOF | $CC -o $t/g.o -c -xc -\n#include <stdio.h>\n\nvoid foo();\nvoid bar();\n\nint main() {\n  foo();\n  bar();\n  printf(\"\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/g.o $t/f.so $t/c.so\n$QEMU $t/exe | grep 'foo bar'\n"
  },
  {
    "path": "test/symbol-version5.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\nvoid foo() {}\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -fPIC\n__asm__(\".symver foo_,foo@@VERSION\");\nvoid foo_() {}\nEOF\n\ncat <<EOF > $t/c.version\nVERSION { global: foo; local: *; };\nEOF\n\n$CC -B. -shared -o $t/libfoo.so $t/a.o\n$CC -B. -shared -o $t/libbar.so $t/b.o -Wl,--version-script=$t/c.version\n\ncat <<EOF | $CC -o $t/d.o -c -xc -\nvoid foo();\nint main() { foo(); }\n__asm__(\".symver foo,foo@VERSION\");\nEOF\n\n$CC -B. -o $t/exe $t/d.o -L$t -lfoo -lbar\n"
  },
  {
    "path": "test/symtab-dso.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\nint main() {\n  puts(\"Hello world\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o\nnm $t/exe | grep 'U puts$'\n"
  },
  {
    "path": "test/symtab-section-symbols.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o\nreadelf -s $t/exe | grep 'SECTION LOCAL  DEFAULT'\n"
  },
  {
    "path": "test/symtab.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n  .globl foo, bar, this_is_global\nlocal1:\nfoo:\nbar:\n  .byte 0\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -x assembler -\n  .globl this_is_global\nlocal2:\nthis_is_global:\n\n  .globl module_local\nmodule_local:\nEOF\n\necho '{ local: module_local; global: *; };' > $t/c.map\n\n./mold -o $t/exe $t/a.o $t/b.o --version-script=$t/c.map\n\nreadelf --symbols $t/exe > $t/log\n\ngrep -E '0 NOTYPE  LOCAL  DEFAULT .* local1' $t/log\ngrep -E '0 NOTYPE  LOCAL  DEFAULT .* local2' $t/log\ngrep -E '0 NOTYPE  LOCAL  DEFAULT .* module_local' $t/log\ngrep -E '0 NOTYPE  GLOBAL DEFAULT .* foo' $t/log\ngrep -E '0 NOTYPE  GLOBAL DEFAULT .* bar' $t/log\ngrep -E '0 NOTYPE  GLOBAL DEFAULT .* this_is_global' $t/log\n"
  },
  {
    "path": "test/synthetic-symbols.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\n__attribute__((section(\"foo\"))) char bar[] = \"section foo\";\nEOF\n\n# Test synthetic symbols\n\ncat <<EOF | $CC -c -o $t/b.o -xc -\n#include <assert.h>\n#include <stdio.h>\n#include <string.h>\n\nextern char __ehdr_start[];\nextern char __executable_start[];\nextern char __dso_handle[];\nextern char _end[];\nextern char end[];\nextern char _etext[];\nextern char etext[];\nextern char _edata[];\nextern char edata[];\nextern char __start_foo[];\nextern char __stop_foo[];\n\nint main() {\n  assert(_end);\n  assert(_end == end);\n  assert(_etext);\n  assert(_etext == etext);\n  assert(_edata);\n  assert(_edata == edata);\n\n  printf(\"__ehdr_start=%p\\n\", &__ehdr_start);\n  printf(\"__executable_start=%p\\n\", &__executable_start);\n  printf(\"__dso_handle=%p\\n\", &__dso_handle);\n  printf(\"%.*s\\n\", (int)(__stop_foo - __start_foo), __start_foo);\n}\nEOF\n\n$CC -B. -no-pie -Wl,--image-base=0x40000 -o $t/exe $t/a.o $t/b.o\n$QEMU $t/exe > $t/log\n\ngrep '^__ehdr_start=0x40000$' $t/log\ngrep '^__executable_start=0x40000$' $t/log\ngrep '^__dso_handle=' $t/log\ngrep '^section foo$' $t/log\n\n# Make sure that synthetic symbols overwrite existing ones\n\ncat <<EOF | $CC -c -o $t/c.o -xc -\n#include <assert.h>\n#include <stdio.h>\n#include <string.h>\n\nchar __ehdr_start[] = \"foo\";\nchar __executable_start[] = \"foo\";\nchar _end[] = \"foo\";\nchar end[] = \"foo\";\nchar _etext[] = \"foo\";\nchar etext[] = \"foo\";\nchar _edata[] = \"foo\";\nchar edata[] = \"foo\";\nchar __start_foo[] = \"foo\";\nchar __stop_foo[] = \"foo\";\n\nint main() {\n  assert(_end);\n  assert(_end != end);\n  assert(_etext);\n  assert(_etext != etext);\n  assert(_edata);\n  assert(_edata != edata);\n\n  printf(\"end=%s\\n\", end);\n  printf(\"etext=%s\\n\", etext);\n  printf(\"edata=%s\\n\", edata);\n\n  printf(\"__ehdr_start=%p\\n\", &__ehdr_start);\n  printf(\"__executable_start=%p\\n\", &__executable_start);\n  printf(\"%.*s\\n\", (int)(__stop_foo - __start_foo), __start_foo);\n}\nEOF\n\n$CC -B. -no-pie -Wl,--image-base=0x40000 -o $t/exe $t/a.o $t/c.o\n$QEMU $t/exe > $t/log\n\ngrep '^end=foo$' $t/log\ngrep '^etext=foo$' $t/log\ngrep '^edata=foo$' $t/log\ngrep '^__ehdr_start=0x40000$' $t/log\ngrep '^__executable_start=0x40000$' $t/log\ngrep '^section foo$' $t/log\n"
  },
  {
    "path": "test/sysroot-linker-script.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = armeb ] && skip\n[[ $MACHINE = loongarch* ]] && skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid foo() {}\nEOF\n\nmkdir -p $t/foo/bar\nrm -f $t/foo/bar/libfoo.a\nar rcs $t/foo/bar/libfoo.a $t/a.o\n\ncat <<EOF > $t/foo/bar/b.script\nINPUT(/foo/bar/libfoo.a)\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\nvoid foo();\nint main() { foo(); }\nEOF\n\n$CC -B. -o $t/exe $t/c.o -Wl,--sysroot=$t/ $t/foo/bar/b.script\n"
  },
  {
    "path": "test/sysroot.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = armeb ] && skip\n[[ $MACHINE = loongarch* ]] && skip\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\nvoid foo() {}\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -xc -\nvoid bar() {}\nEOF\n\nmkdir -p $t/foo/bar\nrm -f $t/foo/bar/libfoo.a\nar rcs $t/foo/bar/libfoo.a $t/a.o $t/b.o\n\ncat <<EOF | $CC -c -o $t/c.o -xc -\nvoid foo();\nint main() {\n  foo();\n}\nEOF\n\n$CC -B. -o $t/exe $t/c.o -Wl,--sysroot=$t/ -Wl,-L=foo/bar -lfoo\n\n$CC -B. -o $t/exe $t/c.o -Wl,--sysroot=$t/ -Wl,-L=/foo/bar -lfoo\n\n$CC -B. -o $t/exe $t/c.o -Wl,--sysroot=$t/ '-Wl,-L$SYSROOTfoo/bar' -lfoo\n\n$CC -B. -o $t/exe $t/c.o -Wl,--sysroot=$t/ '-Wl,-L$SYSROOT/foo/bar' -lfoo\n\nnot $CC -B. -o $t/exe $t/c.o -lfoo >& /dev/null\n\nnot $CC -B. -o $t/exe $t/c.o -Wl,--sysroot=$t -Wl,-Lfoo/bar -lfoo >& /dev/null\n"
  },
  {
    "path": "test/sysroot2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = armeb ] && skip\n[[ $MACHINE = loongarch* ]] && skip\n\nmkdir -p $t/bin $t/sysroot/foo\n\ncat <<EOF > $t/a.script\nINPUT(=/foo/x.o)\nEOF\n\ncat <<EOF > $t/sysroot/b.script\nINPUT(/foo/y.o)\nEOF\n\ncat <<EOF | $CC -c -o $t/sysroot/foo/x.o -xc -\n#include <stdio.h>\nvoid hello() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\ncat <<EOF | $CC -c -o $t/sysroot/foo/y.o -xc -\n#include <stdio.h>\nvoid hello2() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\ncat <<EOF | $CC -c -o $t/c.o -xc -\nvoid hello();\nvoid hello2();\n\nint main() {\n  hello();\n  hello2();\n}\nEOF\n\n$CC -B. -o $t/exe -Wl,--sysroot=$t/sysroot \\\n  $t/a.script $t/sysroot/b.script $t/c.o\n\n$CC -B. -o $t/exe -Wl,--sysroot=$(realpath $t)/bin/../sysroot \\\n  $t/a.script $t/sysroot/b.script $t/c.o\n"
  },
  {
    "path": "test/tail-call.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -O2 -o $t/a.o -c -xc -\nint add1(int n) { return n + 1; }\nEOF\n\ncat <<EOF | $CC -O2 -o $t/b.o -c -xc -\nint add1(int n);\nint add2(int n) { n += 1; return add1(n); }\nEOF\n\ncat <<EOF | $CC -O2 -o $t/c.o -c -xc -\n#include <stdio.h>\nint add2(int n);\n\nint main() {\n  printf(\"%d\\n\", add2(40));\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o $t/c.o\n$QEMU $t/exe | grep '42'\n\nif [ $MACHINE = riscv32 -o $MACHINE = riscv64 ]; then\n  $OBJDUMP -d $t/exe | grep bfed # c.j pc - 6\nfi\n"
  },
  {
    "path": "test/tbss-only.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n__thread char foo;\n\n__attribute__((section(\".data.rel.ro.bar\"), aligned(16*1024)))\nchar bar;\n\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.o\n$QEMU $t/exe\n"
  },
  {
    "path": "test/textrel.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fno-PIE\nvoid hello();\nint main() { hello(); }\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -fno-PIE\n#include <stdio.h>\n\n__attribute__((section(\".text\")))\nint (*fn)(const char *s) = puts;\n\nvoid hello() {\n  puts(\"Hello world\");\n}\nEOF\n\n$CC -o $t/exe $t/a.o $t/b.o -no-pie\n$QEMU $t/exe || skip\n\n$CC -B. -o $t/exe $t/a.o $t/b.o -no-pie\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/textrel2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIE\n#include <stdio.h>\n\nvoid hello() {\n  puts(\"Hello world\");\n}\n\n__attribute__((section(\".text\")))\nvoid (*p)() = hello;\n\nint main() {\n  p();\n}\nEOF\n\n$CC -o $t/exe1 $t/a.o -pie\n$QEMU $t/exe1 || skip\n\n$CC -B. -o $t/exe2 $t/a.o -pie\n$QEMU $t/exe2 | grep 'Hello world'\n\n$CC -o $t/exe3 $t/a.o -pie -Wl,-z,pack-relative-relocs 2> /dev/null || skip\nreadelf -WS $t/exe3 | grep -F .relr.dyn || skip\n$QEMU $t/exe3 2> /dev/null | grep 'Hello world' || skip\n\n$CC -B. -o $t/exe4 $t/a.o -pie -Wl,-z,pack-relative-relocs\n$QEMU $t/exe4 | grep 'Hello world'\n"
  },
  {
    "path": "test/thin-archive.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/long-long-long-filename.o -c -xc -\nint three() { return 3; }\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\nint five() { return 5; }\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\nint seven() { return 7; }\nEOF\n\ncat <<EOF | $CC -o $t/d.o -c -xc -\n#include <stdio.h>\n\nint three();\nint five();\nint seven();\n\nint main() {\n  printf(\"%d\\n\", three() + five() + seven());\n}\nEOF\n\nrm -f $t/d.a\n(cd $t; ar rcsT d.a long-long-long-filename.o b.o \"`pwd`\"/c.o)\n\n$CC -B. -Wl,--trace -o $t/exe $t/d.o $t/d.a > $t/log\n\ngrep -E 'thin-archive/d.a\\(.*long-long-long-filename.o\\)' $t/log\ngrep -E 'thin-archive/d.a\\((.*/)?b.o\\)' $t/log\ngrep -F thin-archive/d.o $t/log\n\n$QEMU $t/exe | grep 15\n"
  },
  {
    "path": "test/thread-count.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,-no-threads\n$CC -B. -o $t/exe $t/a.o -Wl,-thread-count=1\n$CC -B. -o $t/exe $t/a.o -Wl,-threads\n$CC -B. -o $t/exe $t/a.o -Wl,-threads=1\n$CC -B. -o $t/exe $t/a.o -Wl,--threads=1\n"
  },
  {
    "path": "test/tls-alignment-multi.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# Test a tricky case of TLS alignment requirement where not only the virtual\n# address of a symbol but also its offset against the TLS base address has to\n# be aligned.\n#\n# On glibc, this issue requires a TLS model equivalent to global-dynamic in\n# order to be triggered.\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\n#include <stdio.h>\n\n// .tdata\n_Thread_local int x = 42;\n\n// .tbss\n__attribute__((aligned(64))) _Thread_local int y;\n\nvoid *test(void *unused) {\n  printf(\"%p %lu\", &y, (unsigned long)&y % 64);\n  return NULL;\n}\nEOF\n\ncat <<EOF | $CC -fPIC -c -o $t/b.o -xc -\n#include <stdio.h>\n#include <pthread.h>\n#include <dlfcn.h>\n\nint main() {\n  void *handle = dlopen(\"c.so\", RTLD_NOW);\n  void *(*test)(void *) = dlsym(handle, \"test\");\n  pthread_t th;\n\n  test(NULL);\n  printf(\" \");\n\n  pthread_create(&th, NULL, test, NULL);\n  pthread_join(th, NULL);\n  printf(\"\\n\");\n}\nEOF\n\n$CC -B. -shared -o $t/c.so $t/a.o\n$CC -B. -ldl -pthread -o $t/exe $t/b.o -Wl,-rpath,$t\n$QEMU $t/exe | grep -E '^0x[0-9a-f]+ 0 0x[0-9a-f]+ 0$'\n"
  },
  {
    "path": "test/tls-common.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler - || skip\n.globl foo\n.tls_common foo,4,4\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc -std=c11 -\n#include <stdio.h>\n\nextern _Thread_local int foo;\n\nint main() {\n  printf(\"foo=%d\\n\", foo);\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o\nreadelf -WS $t/exe | grep -F .tls_common\n$QEMU $t/exe | grep '^foo=0$'\n"
  },
  {
    "path": "test/tls-df-static-tls.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -ftls-model=initial-exec -c -o $t/a.o -xc -\n#include <stdio.h>\nstatic _Thread_local int foo = 5;\nint bar() { return foo; }\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o -Wl,--relax\nreadelf --dynamic $t/b.so | grep STATIC_TLS\n\n$CC -B. -shared -o $t/c.so $t/a.o -Wl,--no-relax\nreadelf --dynamic $t/c.so | grep STATIC_TLS\n"
  },
  {
    "path": "test/tls-dso.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -shared -o $t/a.so -xc -\nextern _Thread_local int foo;\n_Thread_local int bar;\n\nint get_foo1() { return foo; }\nint get_bar1() { return bar; }\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -xc -\n#include <stdio.h>\n\n_Thread_local int foo;\nextern _Thread_local int bar;\n\nint get_foo1();\nint get_bar1();\n\nint get_foo2() { return foo; }\nint get_bar2() { return bar; }\n\nint main() {\n  foo = 5;\n  bar = 3;\n  printf(\"%d %d %d %d %d %d\\n\",\n         foo, bar,\n         get_foo1(), get_bar1(),\n         get_foo2(), get_bar2());\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.so $t/b.o\n$QEMU $t/exe | grep '5 3 5 3 5 3'\n"
  },
  {
    "path": "test/tls-gd-dlopen.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\nstatic _Thread_local int foo[10000] = { 3, [9999] = 5 };\n\nint get_foo(int idx) { return foo[idx]; }\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\n\ncat <<EOF | $CC -fPIC -c -o $t/c.o -xc -\n#include <assert.h>\n#include <dlfcn.h>\n#include <stdio.h>\n#include <stdlib.h>\n\nint main(int argc, char **argv) {\n  void *handle = dlopen(argv[1], RTLD_LAZY);\n  if (!handle) {\n    fprintf(stderr, \"dlopen failed: %s: %s: \\n\", argv[1], dlerror());\n    exit(1);\n  }\n\n  int (*get)(int) = dlsym(handle, \"get_foo\");\n  assert(get);\n\n  printf(\"%d %d %d\\n\", get(0), get(1), get(9999));\n}\nEOF\n\n$CC -B. -o $t/exe $t/c.o -ldl\n$QEMU $t/exe $t/b.so | grep '3 0 5'\n"
  },
  {
    "path": "test/tls-gd-noplt.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -fno-plt -c -o $t/a.o -xc -\n#include <stdio.h>\n\n__attribute__((tls_model(\"global-dynamic\"))) static _Thread_local int x1 = 1;\n__attribute__((tls_model(\"global-dynamic\"))) static _Thread_local int x2;\n__attribute__((tls_model(\"global-dynamic\"))) extern _Thread_local int x3;\n__attribute__((tls_model(\"global-dynamic\"))) extern _Thread_local int x4;\nint get_x5();\nint get_x6();\n\nint main() {\n  x2 = 2;\n\n  printf(\"%d %d %d %d %d %d\\n\", x1, x2, x3, x4, get_x5(), get_x6());\n  return 0;\n}\nEOF\n\ncat <<EOF | $CC -fPIC -fno-plt -c -o $t/b.o -xc -\n__attribute__((tls_model(\"global-dynamic\"))) _Thread_local int x3 = 3;\n__attribute__((tls_model(\"global-dynamic\"))) static _Thread_local int x5 = 5;\nint get_x5() { return x5; }\nEOF\n\ncat <<EOF | $CC -fPIC -fno-plt -c -o $t/c.o -xc -\n__attribute__((tls_model(\"global-dynamic\"))) _Thread_local int x4 = 4;\n__attribute__((tls_model(\"global-dynamic\"))) static _Thread_local int x6 = 6;\nint get_x6() { return x6; }\nEOF\n\n$CC -B. -shared -o $t/d.so $t/b.o\n$CC -B. -shared -o $t/e.so $t/c.o -Wl,--no-relax\n\n$CC -B. -o $t/exe $t/a.o $t/d.so $t/e.so\n$QEMU $t/exe | grep '1 2 3 4 5 6'\n\n$CC -B. -o $t/exe $t/a.o $t/d.so $t/e.so -Wl,-no-relax\n$QEMU $t/exe | grep '1 2 3 4 5 6'\n"
  },
  {
    "path": "test/tls-gd-to-ie.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\n#include <stdio.h>\n\n__attribute__((tls_model(\"global-dynamic\"))) static _Thread_local int x1 = 1;\n__attribute__((tls_model(\"global-dynamic\"))) _Thread_local int x2 = 2;\n__attribute__((tls_model(\"global-dynamic\"))) _Thread_local int x3;\n\nint foo() {\n  x3 = 3;\n\n  printf(\"%d %d %d\\n\", x1, x2, x3);\n  return 0;\n}\nEOF\n\ncat <<EOF | $CC -fPIC -c -o $t/b.o -xc -\nint foo();\nint main() { foo(); }\nEOF\n\n$CC -B. -shared -o $t/c.so $t/a.o\n$CC -B. -o $t/exe1 $t/b.o $t/c.so\n$QEMU $t/exe1 | grep '1 2 3'\n\n$CC -B. -shared -o $t/d.so $t/a.o -Wl,-no-relax\n$CC -B. -o $t/exe2 $t/b.o $t/d.so\n$QEMU $t/exe2 | grep '1 2 3'\n\n$CC -B. -shared -o $t/e.so $t/a.o -Wl,-z,nodlopen\n$CC -B. -o $t/exe3 $t/b.o $t/e.so\n$QEMU $t/exe3 | grep '1 2 3'\n\n$CC -B. -shared -o $t/f.so $t/a.o -Wl,-z,nodlopen -Wl,-no-relax\n$CC -B. -o $t/exe4 $t/b.o $t/f.so\n$QEMU $t/exe4 | grep '1 2 3'\n"
  },
  {
    "path": "test/tls-gd.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF > $t/a.c\n#include <stdio.h>\n\n__attribute__((tls_model(\"global-dynamic\"))) static _Thread_local int x1 = 1;\n__attribute__((tls_model(\"global-dynamic\"))) static _Thread_local int x2;\n__attribute__((tls_model(\"global-dynamic\"))) extern _Thread_local int x3;\n__attribute__((tls_model(\"global-dynamic\"))) extern _Thread_local int x4;\n\nint get_x5();\nint get_x6();\n\nint main() {\n  x2 = 2;\n\n  printf(\"%d %d %d %d %d %d\\n\", x1, x2, x3, x4, get_x5(), get_x6());\n  return 0;\n}\nEOF\n\n$CC -fPIC -c -o $t/b.o $t/a.c\n$CC -fPIC -c -o $t/c.o $t/a.c -O2\n\ncat <<EOF | $CC -fPIC -c -o $t/d.o -xc -\n__attribute__((tls_model(\"global-dynamic\"))) _Thread_local int x3 = 3;\n__attribute__((tls_model(\"global-dynamic\"))) static _Thread_local int x5 = 5;\nint get_x5() { return x5; }\nEOF\n\ncat <<EOF | $CC -fPIC -c -o $t/e.o -xc -\n__attribute__((tls_model(\"global-dynamic\"))) _Thread_local int x4 = 4;\n__attribute__((tls_model(\"global-dynamic\"))) static _Thread_local int x6 = 6;\nint get_x6() { return x6; }\nEOF\n\n$CC -B. -shared -o $t/f.so $t/d.o\n$CC -B. -shared -o $t/g.so $t/e.o -Wl,--no-relax\n\n$CC -B. -o $t/exe1 $t/b.o $t/f.so $t/g.so\n$QEMU $t/exe1 | grep '1 2 3 4 5 6'\n\n$CC -B. -o $t/exe2 $t/c.o $t/f.so $t/g.so\n$QEMU $t/exe2 | grep '1 2 3 4 5 6'\n\n$CC -B. -o $t/exe3 $t/b.o $t/f.so $t/g.so -Wl,-no-relax\n$QEMU $t/exe3 | grep '1 2 3 4 5 6'\n\n$CC -B. -o $t/exe4 $t/c.o $t/f.so $t/g.so -Wl,-no-relax\n$QEMU $t/exe4 | grep '1 2 3 4 5 6'\n\nif test_cflags -static; then\n  $CC -B. -o $t/exe5 $t/b.o $t/d.o $t/e.o -static\n  $QEMU $t/exe5 | grep '1 2 3 4 5 6'\n\n  $CC -B. -o $t/exe6 $t/c.o $t/d.o $t/e.o -static\n  $QEMU $t/exe6 | grep '1 2 3 4 5 6'\n\n  $CC -B. -o $t/exe7 $t/b.o $t/d.o $t/e.o -static -Wl,-no-relax\n  $QEMU $t/exe7 | grep '1 2 3 4 5 6'\n\n  $CC -B. -o $t/exe8 $t/c.o $t/d.o $t/e.o -static -Wl,-no-relax\n  $QEMU $t/exe8 | grep '1 2 3 4 5 6'\nfi\n"
  },
  {
    "path": "test/tls-ie.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\n#include <stdio.h>\n\n__attribute__((tls_model(\"initial-exec\"))) static _Thread_local int foo;\n__attribute__((tls_model(\"initial-exec\"))) static _Thread_local int bar;\n\nvoid set() {\n  foo = 3;\n  bar = 5;\n}\n\nvoid print() {\n  printf(\"%d %d \", foo, bar);\n}\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\n\ncat <<EOF | $CC -c -o $t/c.o -xc - -fPIC\n#include <stdio.h>\n\n_Thread_local int baz;\n\nvoid set();\nvoid print();\n\nint main() {\n  baz = 7;\n  print();\n  set();\n  print();\n  printf(\"%d\\n\", baz);\n}\nEOF\n\n$CC -B. -o $t/exe $t/b.so $t/c.o\n$QEMU $t/exe | grep '^0 0 3 5 7$'\n\n$CC -B. -o $t/exe $t/b.so $t/c.o -Wl,-no-relax\n$QEMU $t/exe | grep '^0 0 3 5 7$'\n"
  },
  {
    "path": "test/tls-irregular-start-addr.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\n#include <stdio.h>\n\n_Thread_local char x1 = 42;\n\nint main() {\n  printf(\"%d\\n\", x1);\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -pie -Wl,-section-start=.tdata=0x100001 -Wl,-relax\n$QEMU $t/exe1 | grep '^42$'\n\n$CC -B. -o $t/exe2 $t/a.o -pie -Wl,-section-start=.tdata=0x100001 -Wl,-no-relax\n$QEMU $t/exe2 | grep '^42$'\n\n$CC -B. -o $t/exe3 $t/a.o -pie -Wl,-section-start=.tdata=0x10000f -Wl,-relax\n$QEMU $t/exe3 | grep '^42$'\n\n$CC -B. -o $t/exe4 $t/a.o -pie -Wl,-section-start=.tdata=0x10000f -Wl,-no-relax\n$QEMU $t/exe4 | grep '^42$'\n"
  },
  {
    "path": "test/tls-large-alignment.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -std=c11 -c -o $t/a.o -xc -\n__attribute__((section(\".tdata1\")))\n_Thread_local int x = 42;\nEOF\n\ncat <<EOF | $CC -fPIC -std=c11 -c -o $t/b.o -xc -\n__attribute__((section(\".tdata2\")))\n_Alignas(256) _Thread_local int y[] = { 1, 2, 3 };\nEOF\n\ncat <<EOF | $CC -fPIC -c -o $t/c.o -xc -\n#include <stdio.h>\n\nextern _Thread_local int x;\nextern _Thread_local int y[];\n\nint main() {\n  printf(\"%lu %d %d %d %d\\n\", (unsigned long)&x % 256, x, y[0], y[1], y[2]);\n}\nEOF\n\n$CC -B. -shared -o $t/d.so $t/a.o $t/b.o\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o $t/c.o\n$QEMU $t/exe1 | grep '^0 42 1 2 3$'\n\n$CC -B. -o $t/exe2 $t/c.o $t/d.so\n$QEMU $t/exe2 | grep '^0 42 1 2 3$'\n"
  },
  {
    "path": "test/tls-large-static-image.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\n_Thread_local int x[] = { 1, 2, 3, [10000] = 5 };\nEOF\n\ncat <<EOF | $CC -fPIC -c -o $t/b.o -xc -\n#include <stdio.h>\nextern _Thread_local int x[];\n\nint main() {\n  printf(\"%d %d %d %d %d\\n\", x[0], x[1], x[2], x[3], x[10000]);\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o\n$QEMU $t/exe | grep '^1 2 3 0 5$'\n"
  },
  {
    "path": "test/tls-ld-noplt.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -ftls-model=local-dynamic -fno-plt -c -o $t/a.o -xc -\n#include <stdio.h>\n\nextern _Thread_local int foo;\nstatic _Thread_local int bar;\n\nint *get_foo_addr() { return &foo; }\nint *get_bar_addr() { return &bar; }\n\nint main() {\n  bar = 5;\n\n  printf(\"%d %d %d %d\\n\", *get_foo_addr(), *get_bar_addr(), foo, bar);\n  return 0;\n}\nEOF\n\ncat <<EOF | $CC -fPIC -ftls-model=local-dynamic -fno-plt -c -o $t/b.o -xc -\n_Thread_local int foo = 3;\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o\n$QEMU $t/exe | grep '3 5 3 5'\n\n$CC -B. -o $t/exe $t/a.o $t/b.o -Wl,-no-relax\n$QEMU $t/exe | grep '3 5 3 5'\n"
  },
  {
    "path": "test/tls-ld.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF > $t/a.c\n#include <stdio.h>\n\nextern _Thread_local int foo;\nstatic _Thread_local int bar;\n\nint *get_foo_addr() { return &foo; }\nint *get_bar_addr() { return &bar; }\n\nint main() {\n  bar = 5;\n\n  printf(\"%d %d %d %d\\n\", *get_foo_addr(), *get_bar_addr(), foo, bar);\n  return 0;\n}\nEOF\n\n$CC -fPIC -ftls-model=local-dynamic -c -o $t/b.o $t/a.c\n$CC -fPIC -ftls-model=local-dynamic -c -o $t/c.o $t/a.c -O2\n\ncat <<EOF | $CC -fPIC -ftls-model=local-dynamic -c -o $t/d.o -xc -\n_Thread_local int foo = 3;\nEOF\n\n$CC -B. -o $t/exe1 $t/b.o $t/d.o -Wl,-relax\n$QEMU $t/exe1 | grep '3 5 3 5'\n\n$CC -B. -o $t/exe2 $t/c.o $t/d.o -Wl,-relax\n$QEMU $t/exe2 | grep '3 5 3 5'\n\n$CC -B. -o $t/exe3 $t/b.o $t/d.o -Wl,-no-relax\n$QEMU $t/exe3 | grep '3 5 3 5'\n\n$CC -B. -o $t/exe4 $t/c.o $t/d.o -Wl,-no-relax\n$QEMU $t/exe4 | grep '3 5 3 5'\n"
  },
  {
    "path": "test/tls-le-error.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\n__attribute__((tls_model(\"local-exec\"))) static _Thread_local int foo = 5;\nint bar() { return foo; }\nEOF\n\nnot $CC -B. -shared -o $t/b.so $t/a.o |&\n  grep 'relocation .* against `foo` can not be used when making a shared object; recompile with -fPIC'\n"
  },
  {
    "path": "test/tls-le.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\n#include <stdio.h>\n\n__attribute__((tls_model(\"local-exec\"))) extern _Thread_local int foo;\n__attribute__((tls_model(\"local-exec\"))) static _Thread_local int bar;\n\nint *get_foo_addr() { return &foo; }\nint *get_bar_addr() { return &bar; }\n\nint main() {\n  bar = 5;\n\n  printf(\"%d %d %d %d\\n\", *get_foo_addr(), *get_bar_addr(), foo, bar);\n  return 0;\n}\nEOF\n\ncat <<EOF | $CC -fPIC -c -o $t/b.o -xc -\n__attribute__((tls_model(\"local-exec\"))) _Thread_local int foo = 3;\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o\n$QEMU $t/exe1 | grep '3 5 3 5'\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o -Wl,-no-relax\n$QEMU $t/exe2 | grep '3 5 3 5'\n"
  },
  {
    "path": "test/tls-nopic.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\n#include <stdio.h>\n\n__attribute__((tls_model(\"global-dynamic\"))) extern _Thread_local int foo;\n__attribute__((tls_model(\"global-dynamic\"))) static _Thread_local int bar;\n\nint *get_foo_addr() { return &foo; }\nint *get_bar_addr() { return &bar; }\n\nint main() {\n  foo = 3;\n  bar = 5;\n\n  printf(\"%d %d %d %d\\n\", *get_foo_addr(), *get_bar_addr(), foo, bar);\n  return 0;\n}\nEOF\n\ncat <<EOF | $CC -xc -c -o $t/b.o -\n__attribute__((tls_model(\"global-dynamic\"))) _Thread_local int foo;\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o -no-pie\n$QEMU $t/exe | grep '3 5 3 5'\n"
  },
  {
    "path": "test/tls-pic.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\n#include <stdio.h>\n\n__attribute__((tls_model(\"global-dynamic\"))) extern _Thread_local int foo;\n__attribute__((tls_model(\"global-dynamic\"))) static _Thread_local int bar;\n\nint *get_foo_addr() { return &foo; }\nint *get_bar_addr() { return &bar; }\n\nint main() {\n  bar = 5;\n\n  printf(\"%d %d %d %d\\n\", *get_foo_addr(), *get_bar_addr(), foo, bar);\n  return 0;\n}\nEOF\n\ncat <<EOF | $CC -xc -c -o $t/b.o -\n__attribute__((tls_model(\"global-dynamic\"))) _Thread_local int foo = 3;\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o\n$QEMU $t/exe | grep '3 5 3 5'\n"
  },
  {
    "path": "test/tls-small-alignment.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xassembler -\n.text\n.byte 0\nEOF\n\ncat <<EOF | $CC -fPIC -std=c11 -c -o $t/b.o -xc -\n_Thread_local char x = 42;\nEOF\n\ncat <<EOF | $CC -fPIC -c -o $t/c.o -xc -\n#include <stdio.h>\n\nextern _Thread_local char x;\n\nint main() {\n  printf(\"%d\\n\", x);\n}\nEOF\n\n$CC -B. -shared -o $t/d.so $t/a.o $t/b.o\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o $t/c.o\n$QEMU $t/exe1 | grep '^42$'\n\n$CC -B. -o $t/exe2 $t/c.o $t/d.so\n$QEMU $t/exe2 | grep '^42$'\n"
  },
  {
    "path": "test/tlsdesc-dlopen.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_tlsdesc || skip\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc - $tlsdesc_opt\nstatic _Thread_local int foo[10000] = { 3, [9999] = 5 };\n\nint get_foo(int idx) { return foo[idx]; }\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\n\ncat <<EOF | $CC -fPIC -c -o $t/c.o -xc - $tlsdesc_opt\n#include <assert.h>\n#include <dlfcn.h>\n#include <stdio.h>\n#include <stdlib.h>\n\nint main(int argc, char **argv) {\n  void *handle = dlopen(argv[1], RTLD_LAZY);\n  if (!handle) {\n    fprintf(stderr, \"dlopen failed: %s: %s: \\n\", argv[1], dlerror());\n    exit(1);\n  }\n\n  int (*get)(int) = dlsym(handle, \"get_foo\");\n  assert(get);\n\n  printf(\"%d %d %d\\n\", get(0), get(1), get(9999));\n}\nEOF\n\n$CC -B. -o $t/exe $t/c.o -ldl\n$QEMU $t/exe $t/b.so | grep '3 0 5'\n"
  },
  {
    "path": "test/tlsdesc-import.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_tlsdesc || skip\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc - $tlsdesc_opt\n#include <stdio.h>\n\nextern _Thread_local int foo;\nextern _Thread_local int bar;\n\nint main() {\n  bar = 7;\n  printf(\"%d %d\\n\", foo, bar);\n}\nEOF\n\ncat <<EOF | $CC -fPIC -shared -o $t/b.so -xc - $tlsdesc_opt\n_Thread_local int foo = 5;\n_Thread_local int bar;\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.so\n$QEMU $t/exe | grep '5 7'\n"
  },
  {
    "path": "test/tlsdesc-initial-exec.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_tlsdesc || skip\n\ncat <<EOF | $CC -fPIC -fPIC -c -o $t/a.o -xc - $tlsdesc_opt\n_Thread_local int foo = 5;\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\n\ncat <<EOF | $CC -fPIC -fPIC -c -o $t/c.o -xc - $tlsdesc_opt\nextern _Thread_local int foo;\nint get_foo1() { return foo; }\nEOF\n\ncat <<EOF | $CC -fPIC -fPIE -c -o $t/d.o -xc - $tlsdesc_opt\n#include <stdio.h>\n\nextern _Thread_local int foo;\nint get_foo1();\nint get_foo2() { return foo; }\n\nint main() {\n  printf(\"%d %d %d\\n\", foo, get_foo1(), get_foo2());\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/c.o $t/d.o $t/b.so\n$QEMU $t/exe1 | grep '^5 5 5$'\n$OBJDUMP --dynamic-reloc $t/exe1 | not grep -E 'TLS_?DESC'\n\n$CC -B. -o $t/exe2 $t/c.o $t/d.o $t/b.so -Wl,--no-relax\n$QEMU $t/exe2 | grep '^5 5 5$'\n$OBJDUMP --dynamic-reloc $t/exe2 | grep -E 'TLS_?DESC'\n"
  },
  {
    "path": "test/tlsdesc-local-dynamic.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_tlsdesc || skip\n\ncat <<EOF | $CC -fPIC -ftls-model=local-dynamic -c -o $t/a.o -xc - $tlsdesc_opt\nextern _Thread_local int foo;\n\nint get_foo() {\n  return foo;\n}\n\nstatic _Thread_local int bar = 5;\n\nint get_bar() {\n  return bar;\n}\nEOF\n\ncat <<EOF | $CC -fPIC -ftls-model=local-dynamic -c -o $t/b.o -xc - $tlsdesc_opt\n#include <stdio.h>\n\n_Thread_local int foo;\n\nint get_foo();\nint get_bar();\n\nint main() {\n  foo = 42;\n  printf(\"%d %d\\n\", get_foo(), get_bar());\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o\n$QEMU $t/exe1 | grep '42 5'\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o -Wl,--no-relax\n$QEMU $t/exe2 | grep '42 5'\n"
  },
  {
    "path": "test/tlsdesc-static.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_tlsdesc || skip\ntest_cflags -static || skip\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc - $tlsdesc_opt\n#include <stdio.h>\n\nextern _Thread_local int foo;\n\nint main() {\n  foo = 42;\n  printf(\"%d\\n\", foo);\n}\nEOF\n\ncat <<EOF | $CC -fPIC -c -o $t/b.o -xc - $tlsdesc_opt\n_Thread_local int foo;\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o -static\n$QEMU $t/exe1 | grep 42\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o -static -Wl,-no-relax\n$QEMU $t/exe2 | grep 42\n"
  },
  {
    "path": "test/tlsdesc.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_tlsdesc || skip\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc - $tlsdesc_opt\nextern _Thread_local int foo;\n_Thread_local int bar = 3;\n\nint get_foo() {\n  return foo;\n}\n\nstatic _Thread_local int baz = 5;\n\nint get_baz() {\n  return baz;\n}\nEOF\n\ncat <<EOF | $CC -fPIC -c -o $t/b.o -xc - $tlsdesc_opt\n#include <stdio.h>\n\n_Thread_local int foo;\nextern _Thread_local int bar;\n\nint get_foo();\nint get_baz();\n\nint main() {\n  foo = 42;\n  printf(\"%d %d %d\\n\", get_foo(), bar, get_baz());\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.o\n$QEMU $t/exe1 | grep '42 3 5'\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.o -Wl,-no-relax\n$QEMU $t/exe2 | grep '42 3 5'\n\n$CC -B. -shared -o $t/c.so $t/a.o\n$CC -B. -o $t/exe3 $t/b.o $t/c.so\n$QEMU $t/exe3 | grep '42 3 5'\n\n$CC -B. -shared -o $t/c.so $t/a.o -Wl,-no-relax\n$CC -B. -o $t/exe4 $t/b.o $t/c.so -Wl,-no-relax\n$QEMU $t/exe4 | grep '42 3 5'\n"
  },
  {
    "path": "test/trace-symbol-symver.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\nvoid foo1() {}\nvoid foo2() {}\nvoid foo3() {}\n\n__asm__(\".symver foo1, foo@VER1\");\n__asm__(\".symver foo2, foo@VER2\");\n__asm__(\".symver foo3, foo@@VER3\");\nEOF\n\ncat <<EOF > $t/b.version\nVER1 { local: *; };\nVER2 { local: *; };\nVER3 { local: *; };\nEOF\n\n$CC -B. -o $t/c.so -shared $t/a.o -Wl,--version-script=$t/b.version \\\n   -Wl,--trace-symbol='foo@VER1' > /dev/null\n\ncat <<EOF | $CC -c -o $t/d.o -xc -\nvoid foo();\n__asm__(\".symver foo, foo@VER1\");\nint main() { foo(); }\nEOF\n\n$CC -B. -o $t/exe $t/d.o $t/c.so -Wl,--trace-symbol='foo@VER1' > /dev/null\n$QEMU $t/exe\n"
  },
  {
    "path": "test/trace-symbol.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\n#include <stdio.h>\n\nvoid foo();\n\nvoid bar() {\n  foo();\n  printf(\"Hello world\\n\");\n}\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -xc -\nvoid foo() {}\nvoid bar();\nvoid baz();\n\nint main() {\n  bar();\n  baz();\n  return 0;\n}\nEOF\n\ncat <<EOF | $CC -shared -o $t/c.so -xc -\nvoid baz() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o $t/c.so \\\n  -Wl,-y,foo -Wl,--trace-symbol=baz > $t/log\n\ngrep 'trace-symbol: .*/a.o: reference to foo' $t/log\ngrep 'trace-symbol: .*/b.o: definition of foo' $t/log\ngrep 'trace-symbol: .*/c.so: definition of baz' $t/log\n"
  },
  {
    "path": "test/trace.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\n#include <stdio.h>\n\nint main() {\n  printf(\"Hello world\\n\");\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,-trace > $t/log\ngrep '/a\\.o$' $t/log\n"
  },
  {
    "path": "test/undefined-glob-gc-sections.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -static || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint foo = 1;\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\nint foobar = 1;\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\nint baz = 1;\nEOF\n\nrm -f $t/d.a\nar cr $t/d.a $t/a.o $t/b.o $t/c.o\n\ncat <<EOF | $CC -o $t/e.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe2 $t/d.a $t/e.o -Wl,--undefined-glob='foo*' -Wl,--gc-sections\nreadelf -W --symbols $t/exe2 > $t/log2\ngrep foo $t/log2\ngrep foobar $t/log2\nnot grep baz $t/log2\n"
  },
  {
    "path": "test/undefined-glob.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -static || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint foo = 1;\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -xc -\nint foobar = 1;\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -xc -\nint baz = 1;\nEOF\n\nrm -f $t/d.a\nar cr $t/d.a $t/a.o $t/b.o $t/c.o\n\ncat <<EOF | $CC -o $t/e.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe1 $t/d.a $t/e.o\nreadelf -W --symbols $t/exe1 > $t/log1\nnot grep foo $t/log1\nnot grep foobar $t/log1\nnot grep baz $t/log1\n\n$CC -B. -o $t/exe2 $t/d.a $t/e.o -Wl,--undefined-glob='foo*'\nreadelf -W --symbols $t/exe2 > $t/log2\ngrep foo $t/log2\ngrep foobar $t/log2\nnot grep baz $t/log2\n"
  },
  {
    "path": "test/undefined.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -static || skip\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n.globl _start\n_start:\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -x assembler -\n.globl foo\nfoo:\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -x assembler -\n.globl bar\nbar:\nEOF\n\nrm -f $t/d.a\nar cr $t/d.a $t/b.o $t/c.o\n\n./mold -static -o $t/exe $t/a.o $t/d.a\nreadelf --symbols $t/exe > $t/log\nnot grep foo $t/log\nnot grep bar $t/log\n\n./mold -static -o $t/exe $t/a.o $t/d.a -u foo\nreadelf --symbols $t/exe > $t/log\ngrep foo $t/log\nnot grep bar $t/log\n\n./mold -static -o $t/exe $t/a.o $t/d.a -u foo --undefined=bar\nreadelf --symbols $t/exe > $t/log\ngrep foo $t/log\ngrep bar $t/log\n"
  },
  {
    "path": "test/undefined2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -static || skip\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n.globl _start\n_start:\nEOF\n\ncat <<EOF | $CC -o $t/b.o -c -x assembler -\n.globl ndefined\nndefined:\nEOF\n\ncat <<EOF | $CC -o $t/c.o -c -x assembler -\n.globl foo\nfoo:\nEOF\n\nrm -f $t/d.a\nar cr $t/d.a $t/b.o $t/c.o\n\n./mold -static -o $t/exe $t/a.o $t/d.a -undefined foo\nreadelf --symbols $t/exe > $t/log\ngrep foo $t/log\nnot grep ndefined $t/log\n"
  },
  {
    "path": "test/unknown-section-type.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler - 2> /dev/null || skip\n.section .my_section,\"a\",@0x80000000\nEOF\n\nnot $CC -B. -o $t/exe $t/a.o |&\n  grep 'unsupported section type: 0x80000000'\n"
  },
  {
    "path": "test/unresolved-symbols.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\nint foo();\nint main() { foo(); }\nEOF\n\nnot $CC -B. -o $t/exe $t/a.o |& grep 'undefined.*foo'\n\nnot $CC -B. -o $t/exe $t/a.o -Wl,-unresolved-symbols=report-all |&\n  grep 'undefined.*foo'\n\n$CC -B. -o $t/exe $t/a.o -Wl,-unresolved-symbols=ignore-all\n\nreadelf --dyn-syms $t/exe | not grep -w foo\n\n$CC -B. -o $t/exe $t/a.o -Wl,-unresolved-symbols=report-all \\\n  -Wl,--warn-unresolved-symbols |& grep 'undefined.*foo'\n\n$CC -B. -o $t/exe $t/a.o -Wl,-unresolved-symbols=ignore-in-object-files |&\n  not grep 'undefined.*foo'\n\nnot $CC -B. -o $t/exe $t/a.o -Wl,-unresolved-symbols=ignore-in-shared-libs |&\n  grep 'undefined.*foo'\n"
  },
  {
    "path": "test/unresolved-symbols2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -fPIC -\nint foo();\nint bar() { foo(); }\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o -Wl,-z,defs -Wl,--unresolved-symbols,ignore-in-object-files\nreadelf -W --dyn-syms $t/b.so | grep -E ' UND foo(@@)?$'\n"
  },
  {
    "path": "test/verbose.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -xc -o $t/a.o -\n#include <stdio.h>\n\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -Wl,--verbose -o $t/exe $t/a.o > /dev/null\n"
  },
  {
    "path": "test/version-script-search-paths.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nmkdir -p $t/foo/bar\necho 'ver_x { global: *; };' > $t/foo/bar/a.ver\n\ncat <<EOF > $t/b.s\n.globl foo, bar, baz\nfoo:\n  nop\nbar:\n  nop\nbaz:\n  nop\nEOF\n\n$CC -B. -shared -o $t/c.so -Wl,-L$t/foo/bar -Wl,-version-script,a.ver $t/b.s\nreadelf --version-info $t/c.so > $t/log\n\ngrep -F 'Rev: 1  Flags: none  Index: 2  Cnt: 1  Name: ver_x' $t/log\n"
  },
  {
    "path": "test/version-script.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\necho 'ver_x { global: *; };' > $t/a.ver\n\ncat <<EOF > $t/b.s\n.globl foo, bar, baz\nfoo:\n  nop\nbar:\n  nop\nbaz:\n  nop\nEOF\n\n$CC -B. -shared -o $t/c.so -Wl,-version-script,$t/a.ver $t/b.s\nreadelf --version-info $t/c.so > $t/log\n\ngrep -F 'Rev: 1  Flags: BASE  Index: 1  Cnt: 1  Name: c.so' $t/log\ngrep -F 'Rev: 1  Flags: none  Index: 2  Cnt: 1  Name: ver_x' $t/log\n"
  },
  {
    "path": "test/version-script10.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\necho 'VER1 { foo[12]; }; VER2 {};' > $t/a.ver\n\ncat <<EOF > $t/b.s\n.globl foo1, foo2, foo3\nfoo1:\n  nop\nfoo2:\n  nop\nfoo3:\n  nop\nEOF\n\n$CC -B. -shared -o $t/c.so -Wl,-version-script,$t/a.ver $t/b.s\nreadelf --dyn-syms $t/c.so > $t/log\ngrep ' foo1@@VER1$' $t/log\ngrep ' foo2@@VER1$' $t/log\nnot grep ' foo3@@VER1$' $t/log\n"
  },
  {
    "path": "test/version-script11.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' > $t/a.ver\nVER_X1 { global: *; local: b*; };\nEOF\n\ncat <<EOF | $CXX -fPIC -c -o $t/b.o -xc -\nvoid foo() {}\nvoid bar() {}\nvoid baz() {}\nEOF\n\n$CC -B. -shared -Wl,--version-script=$t/a.ver -o $t/c.so $t/b.o\n\nreadelf --dyn-syms $t/c.so > $t/log\ngrep 'foo@@VER_X1' $t/log\nnot grep ' bar' $t/log\nnot grep ' baz' $t/log\n"
  },
  {
    "path": "test/version-script12.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' > $t/a.ver\n{\nglobal:\n  *;\n  *foo_*;\nlocal:\n  *foo*;\n};\nEOF\n\ncat <<EOF | $CXX -fPIC -c -o $t/b.o -xc -\nvoid xyz() {}\nvoid foo_bar() {}\nvoid foo123() {}\nEOF\n\n$CC -B. -shared -Wl,--version-script=$t/a.ver -o $t/c.so $t/b.o\n\nreadelf --dyn-syms $t/c.so > $t/log\ngrep ' xyz' $t/log\ngrep ' foo_bar' $t/log\nnot grep ' foo$' $t/log\n"
  },
  {
    "path": "test/version-script13.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' > $t/a.ver\n{\n  global: *;\n  local: foo;\n};\nEOF\n\ncat <<EOF | $CXX -fPIC -c -o $t/b.o -xc -\nvoid foobar() {}\nvoid foo() {}\nEOF\n\n$CC -B. -shared -Wl,--version-script=$t/a.ver -o $t/c.so $t/b.o\n\nreadelf --dyn-syms $t/c.so > $t/log\ngrep ' foobar' $t/log\nnot grep ' foo$' $t/log\n"
  },
  {
    "path": "test/version-script14.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' > $t/a.ver\n{\nlocal:\n  *;\nglobal:\n  xyz;\n  foo*bar*[abc]x;\n};\nEOF\n\ncat <<EOF | $CXX -fPIC -c -o $t/b.o -xc -\nvoid xyz() {}\nvoid foobarzx() {}\nvoid foobarcx() {}\nvoid foo123bar456bx() {}\nvoid foo123bar456c() {}\nvoid foo123bar456x() {}\nEOF\n\n$CC -B. -shared -Wl,--version-script=$t/a.ver -o $t/c.so $t/b.o\n\nreadelf --dyn-syms $t/c.so > $t/log\ngrep ' xyz' $t/log\nnot grep ' foobarzx' $t/log\ngrep ' foobarcx' $t/log\ngrep ' foo123bar456bx' $t/log\nnot grep ' foo123bar456c' $t/log\nnot grep ' foo123bar456x' $t/log\n"
  },
  {
    "path": "test/version-script15.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' > $t/a.ver\n{\nlocal:\n  *;\nglobal:\n  [abc][^abc][^\\]a-zABC];\n};\nEOF\n\ncat <<EOF | $CXX -fPIC -c -o $t/b.o -xc -\nvoid azZ() {}\nvoid czZ() {}\nvoid azC() {}\nvoid aaZ() {}\nEOF\n\n$CC -B. -shared -Wl,--version-script=$t/a.ver -o $t/c.so $t/b.o\n\nreadelf --dyn-syms $t/c.so > $t/log\ngrep ' azZ' $t/log\ngrep ' czZ' $t/log\nnot grep ' azC' $t/log\nnot grep ' aaZ' $t/log\n"
  },
  {
    "path": "test/version-script16.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' > $t/a.ver\n{ local: *; global: extern \"C++\" { *foo*; }; };\nEOF\n\ncat <<EOF | $CC -fPIC -c -o $t/b.o -xc -\nvoid foobar() {}\nEOF\n\n$CC -B. -shared -Wl,--version-script=$t/a.ver -o $t/c.so $t/b.o\nreadelf --dyn-syms $t/c.so | grep foobar\n"
  },
  {
    "path": "test/version-script17.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\nvoid foo() {}\nvoid bar();\nint main() { bar(); }\nEOF\n\ncat <<EOF | $CC -B. -shared -fPIC -o $t/b.so -xc -\nvoid foo() {}\nvoid bar() {}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o $t/b.so\nnm -g $t/exe1 | grep foo\n\ncat <<'EOF' > $t/c.ver\n{ local: *; global: xyz; };\nEOF\n\n$CC -B. -o $t/exe2 $t/a.o $t/b.so -Wl,--version-script=$t/c.ver -Wl,--undefined-version\nnm -g $t/exe2 | not grep foo\n\ncat <<'EOF' > $t/d.ver\n{ local: *; };\nEOF\n\n$CC -B. -o $t/exe3 $t/a.o $t/b.so -Wl,--version-script=$t/d.ver\nnm -g $t/exe3 | not grep foo\n"
  },
  {
    "path": "test/version-script18.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# Test version script precedence.\n\ncat <<'EOF' > $t/a.ver\n{ global: extern \"C++\" { *libalpha::*; }; local: *libbeta*; };\nEOF\n\ncat <<EOF | $CC -fPIC -c -o $t/b.o -xc++ -\nnamespace libbeta {\n  struct Bar;\n}\nnamespace libalpha {\n  template <typename T>\n  void foo() {}\n  template void foo<libbeta::Bar>();\n}\nEOF\n\n$CC -B. -shared -Wl,--version-script=$t/a.ver -o $t/c.so $t/b.o\nreadelf --wide --dyn-syms $t/c.so | grep libalpha | grep Bar\n\n"
  },
  {
    "path": "test/version-script19.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' > $t/a.ver\n{ local: extern \"C++\" { foo*; }; };\nEOF\n\ncat <<EOF | $CC -fPIC -c -o $t/b.o -xc++ -\nvoid foobar() {}\nvoid baz() {}\nEOF\n\n$CC -B. -shared -Wl,--version-script=$t/a.ver -o $t/c.so $t/b.o\nreadelf -W --dyn-syms $t/c.so > $t/log\nnot grep -E foobar $t/log\ngrep -E 'GLOBAL.*baz' $t/log\n"
  },
  {
    "path": "test/version-script2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF > $t/a.ver\nver1 {\n  global: foo;\n  local: *;\n};\n\nver2 {\n  global: bar;\n};\n\nver3 {\n  global: baz;\n};\nEOF\n\ncat <<EOF | $CC -B. -xc -shared -o $t/b.so -Wl,-version-script,$t/a.ver -\nvoid foo() {}\nvoid bar() {}\nvoid baz() {}\nEOF\n\ncat <<EOF | $CC -xc -c -o $t/c.o -\nvoid foo();\nvoid bar();\nvoid baz();\n\nint main() {\n  foo();\n  bar();\n  baz();\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe $t/c.o $t/b.so\n$QEMU $t/exe\n\nreadelf --dyn-syms $t/exe > $t/log\ngrep -F 'foo@ver1' $t/log\ngrep -F 'bar@ver2' $t/log\ngrep -F 'baz@ver3' $t/log\n"
  },
  {
    "path": "test/version-script20.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' > $t/a.ver\nVER1 { foo*; };\nVER2 { foo_x; };\nEOF\n\ncat <<EOF | $CC -fPIC -c -o $t/b.o -xc -\nvoid foo_x() {}\nvoid foo_y() {}\nvoid foo_z() {}\nEOF\n\n$CC -B. -shared -Wl,--version-script=$t/a.ver -o $t/c.so $t/b.o\nreadelf -W --dyn-syms $t/c.so > $t/log\ngrep -F 'foo_x@@VER2' $t/log\ngrep -F 'foo_y@@VER1' $t/log\ngrep -F 'foo_z@@VER1' $t/log\n"
  },
  {
    "path": "test/version-script21.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' > $t/a.ver\nVER1 { foo_x; };\nVER2 { foo*; };\nEOF\n\ncat <<EOF | $CC -fPIC -c -o $t/b.o -xc -\nvoid foo_x() {}\nvoid foo_y() {}\nvoid foo_z() {}\nEOF\n\n$CC -B. -shared -Wl,--version-script=$t/a.ver -o $t/c.so $t/b.o\nreadelf -W --dyn-syms $t/c.so > $t/log\ngrep -F 'foo_x@@VER1' $t/log\ngrep -F 'foo_y@@VER2' $t/log\ngrep -F 'foo_z@@VER2' $t/log\n"
  },
  {
    "path": "test/version-script22.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' > $t/a.ver\nVER1 { foo*; };\nVER2 { foo*bar*; };\nEOF\n\ncat <<EOF | $CC -fPIC -c -o $t/b.o -xc -\nvoid foo_bar() {}\nEOF\n\n$CC -B. -shared -Wl,--version-script=$t/a.ver -o $t/c.so $t/b.o\nreadelf -W --dyn-syms $t/c.so > $t/log\ngrep -F 'foo_bar@@VER2' $t/log\n"
  },
  {
    "path": "test/version-script23.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' > $t/a.ver\nVER1 { foo\\?; };\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -xassembler - >& /dev/null || skip\n.globl \"foo?\"\n\"foo?\":\nEOF\n\n$CC -B. -shared -Wl,--version-script=$t/a.ver -o $t/c.so $t/b.o\nreadelf -W --dyn-syms $t/c.so > $t/log\ngrep -F 'foo?@@VER1' $t/log\n"
  },
  {
    "path": "test/version-script3.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF > $t/a.ver\nver1 {\n  global: f*o;\n  local: *;\n};\n\nver2 {\n  global: b*;\n};\nEOF\n\ncat <<EOF | $CC -B. -xc -shared -o $t/b.so -Wl,-version-script,$t/a.ver -\nvoid foo() {}\nvoid bar() {}\nvoid baz() {}\nEOF\n\ncat <<EOF | $CC -xc -c -o $t/c.o -\nvoid foo();\nvoid bar();\nvoid baz();\n\nint main() {\n  foo();\n  bar();\n  baz();\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe $t/c.o $t/b.so\n$QEMU $t/exe\n\nreadelf --dyn-syms $t/exe > $t/log\ngrep -F 'foo@ver1' $t/log\ngrep -F 'bar@ver2' $t/log\ngrep -F 'baz@ver2' $t/log\n"
  },
  {
    "path": "test/version-script4.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF > $t/a.ver\n{\n  global:\n  extern \"C++\" {\n    foo::bar;\n  };\n\n  local: *;\n};\nEOF\n\ncat <<EOF | $CXX -fPIC -c -o $t/b.o -xc++ -\nint bar = 5;\nnamespace foo {\nint bar = 7;\n}\n\nint main() {\n  return 0;\n}\nEOF\n\n$CC -B. -shared -o $t/c.so -Wl,-version-script,$t/a.ver $t/b.o\n\nreadelf --dyn-syms $t/c.so > $t/log\ngrep -F _ZN3foo3barE $t/log\nnot grep -F ' bar' $t/log\n"
  },
  {
    "path": "test/version-script5.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF > $t/a.ver\n{\n  extern \"C\" { foo };\n  local: *;\n};\nEOF\n\ncat <<EOF | $CXX -fPIC -c -o $t/b.o -xc -\nint foo = 5;\nint main() { return 0; }\nEOF\n\n$CC -B. -shared -o $t/c.so -Wl,-version-script,$t/a.ver $t/b.o\n\nreadelf --dyn-syms $t/c.so > $t/log\ngrep -F foo $t/log\nnot grep -F ' main' $t/log\n"
  },
  {
    "path": "test/version-script6.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' > $t/a.ver\nVER_X1 { foo; };\nVER_X2 { bar; };\nEOF\n\ncat <<EOF | $CXX -fPIC -c -o $t/b.o -xc -\nint foo = 5;\nint bar = 6;\nint quux = 100;\nEOF\n\n$CC -B. -shared -Wl,--version-script=$t/a.ver -o $t/c.so $t/b.o\n\ncat <<'EOF' > $t/d.ver\nVER_Y1 { local; *; };\nVER_Y2 { baz; };\nVER_Y3 { foo; };\nEOF\n\ncat <<EOF | $CXX -fPIC -c -o $t/e.o -xc -\nextern int foo;\nextern int bar;\nint baz() { return foo + bar; }\nEOF\n\n$CC -B. -shared -Wl,-version-script,$t/d.ver -o $t/f.so $t/e.o $t/c.so -Wl,--undefined-version\n\nreadelf --dyn-syms $t/f.so > $t/log\ngrep 'foo@VER_X1' $t/log\ngrep 'bar@VER_X2' $t/log\ngrep 'baz@@VER_Y2' $t/log\n"
  },
  {
    "path": "test/version-script7.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' > $t/a.ver\nVER_X1 { *; };\nEOF\n\ncat <<EOF | $CXX -fPIC -c -o $t/b.o -xc -\nextern int foo;\nint bar() { return foo; }\nEOF\n\n$CC -B. -shared -Wl,--version-script=$t/a.ver -o $t/c.so $t/b.o\n\nreadelf --dyn-syms $t/c.so > $t/log\ngrep 'foo$' $t/log\ngrep 'bar@@VER_X1' $t/log\n"
  },
  {
    "path": "test/version-script8.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF > $t/a.ver\nver1 {\n  global: ?oo;\n  local: *;\n};\n\nver2 {\n  global: b?r;\n};\nEOF\n\ncat <<EOF | $CC -B. -xc -shared -o $t/b.so -Wl,-version-script,$t/a.ver -\nvoid foo() {}\nvoid bar() {}\nvoid baz() {}\nEOF\n\ncat <<EOF | $CC -xc -c -o $t/c.o -\nvoid foo();\nvoid bar();\n\nint main() {\n  foo();\n  bar();\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe $t/c.o $t/b.so\n$QEMU $t/exe\n\nreadelf --dyn-syms $t/b.so > $t/log\ngrep -F 'foo@@ver1' $t/log\ngrep -F 'bar@@ver2' $t/log\nnot grep -F 'baz' $t/log\n"
  },
  {
    "path": "test/version-script9.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\necho 'VER1 { extern \"C++\" {}; foo; }; VER2 {};' > $t/a.ver\n\ncat <<EOF > $t/b.s\n.globl foo, bar, baz\nfoo:\n  nop\nbar:\n  nop\nbaz:\n  nop\nEOF\n\n$CC -B. -shared -o $t/c.so -Wl,-version-script,$t/a.ver $t/b.s\nreadelf --dyn-syms $t/c.so > $t/log\ngrep ' foo@@VER1$' $t/log\n"
  },
  {
    "path": "test/version.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# OneTBB isn't tsan-clean\nnm mold | grep '__tsan_init' && skip\n\n./mold -v | grep 'mold .*compatible with GNU ld'\n./mold --version | grep 'mold .*compatible with GNU ld'\n\n./mold -V | grep 'mold .*compatible with GNU ld'\n./mold -V | grep elf_x86_64\n./mold -V | grep elf_i386\n\ncat <<EOF | $CC -c -xc -o $t/a.o -\n#include <stdio.h>\n\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\nrm -f $t/exe\n$CC -B. -Wl,--version -o $t/exe1 $t/a.o |& grep mold\nnot [ -f $t/exe1 ]\n\n$CC -B. -Wl,-v -o $t/exe2 $t/a.o |& grep mold\n$QEMU $t/exe2 | grep 'Hello world'\n\nnot ./mold --v |& grep 'unknown command line option:'\n"
  },
  {
    "path": "test/versioned-undef.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# Skip if libc is musl because musl does not fully support GNU-style\n# symbol versioning.\nis_musl && skip\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\nint foo1() { return 1; }\nint foo2() { return 2; }\nint foo3() { return 3; }\nint bar3() { return 4; }\n\n__asm__(\".symver foo1, foo@VER1\");\n__asm__(\".symver foo2, foo@VER2\");\n__asm__(\".symver foo3, foo@@VER3\");\n__asm__(\".symver bar3, bar@@VER3\");\nEOF\n\necho 'VER1 { local: *; }; VER2 { local: *; }; VER3 { local: *; };' > $t/b.ver\n$CC -B. -shared -o $t/c.so $t/a.o -Wl,--version-script=$t/b.ver\n\ncat <<EOF | $CC -c -o $t/d.o -xc -\n#include <stdio.h>\n\nint foo1();\nint foo2();\nint foo3();\nint foo();\nint bar();\n\n__asm__(\".symver foo1, foo@VER1\");\n__asm__(\".symver foo2, foo@VER2\");\n__asm__(\".symver foo3, foo@VER3\");\n__asm__(\".symver bar, bar@VER3\");\n\nint main() {\n  printf(\"%d %d %d %d %d\\n\", foo1(), foo2(), foo3(), foo(), bar());\n}\nEOF\n\n$CC -B. -o $t/exe $t/d.o $t/c.so\n$QEMU $t/exe | grep '^1 2 3 3 4$'\n"
  },
  {
    "path": "test/visibility.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -xc -c -o $t/a.o -\n__attribute__((visibility(\"hidden\"))) int foo = 3;\nEOF\n\ncat <<EOF | $CC -xc -c -o $t/b.o -\n__attribute__((visibility(\"hidden\"))) int foo = 3;\nint bar = 5;\nEOF\n\nrm -f $t/c.a\nar crs $t/c.a $t/a.o $t/b.o\n\ncat <<EOF | $CC -xc -fPIC -c -o $t/d.o -\nextern int bar;\nint main() { return bar; }\nEOF\n\n$CC -B. -shared -o $t/e.so $t/c.a $t/d.o\nreadelf --dyn-syms $t/e.so | not grep -F foo\n"
  },
  {
    "path": "test/warn-common.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fcommon -c -xc -o $t/a.o -\nint foo;\nEOF\n\ncat <<EOF | $CC -fcommon -c -xc -o $t/b.o -\nint foo;\n\nint main() {\n  return 0;\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o | not grep -F 'multiple common symbols'\n$CC -B. -o $t/exe $t/a.o $t/b.o -Wl,-warn-common |& grep -F 'multiple common symbols'\n"
  },
  {
    "path": "test/warn-once.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -fPIC -xc -o $t/a.o -\nextern int foo;\nint x() { return foo; }\nEOF\n\ncat <<EOF | $CC -c -fPIC -xc -o $t/b.o -\nextern int foo;\nint y() { return foo; }\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.o $t/b.o -Wl,--warn-unresolved-symbols,--warn-once >& $t/log\n\n[ $(grep 'undefined symbol:.* foo$' $t/log | wc -l) = 1 ]\n"
  },
  {
    "path": "test/warn-symbol-type.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -fPIC -xc -o $t/a.o -\n#include <stdio.h>\nint times = -1; // times collides with clock_t times(struct tms *buffer)\nint main() {\n  printf (\"times: %d\\n\", times);\n}\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o |& grep 'warning: symbol type mismatch: times'\n"
  },
  {
    "path": "test/warn-unresolved-symbols.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\nint foo();\nint main() {\n  foo();\n}\nEOF\n\nnot $CC -B. -o $t/exe $t/a.o |& grep 'undefined symbol:.*foo'\n\n$CC -B. -o $t/exe $t/a.o -Wl,-warn-unresolved-symbols |&\n  grep 'undefined symbol:.*foo'\n\nnot $CC -B. -o $t/exe $t/a.o -Wl,-warn-unresolved-symbols \\\n  -Wl,--error-unresolved-symbols |& grep 'undefined symbol:.*foo'\n"
  },
  {
    "path": "test/weak-export-dso.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\n#include <stdio.h>\n\n__attribute__((weak)) int foo();\n\nint main() {\n  printf(\"%d\\n\", foo ? foo() : 3);\n}\nEOF\n\n$CC -B. -o $t/b.so $t/a.o -shared\n$CC -B. -o $t/c.so $t/a.o -shared -Wl,-z,defs\n\nreadelf --dyn-syms $t/b.so | grep 'WEAK   DEFAULT  UND foo'\nreadelf --dyn-syms $t/c.so | grep 'WEAK   DEFAULT  UND foo'\n"
  },
  {
    "path": "test/weak-export-dso2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\nint foo() { return 0; }\nEOF\n\n$CC -B. -o $t/b.so $t/a.o -shared\n\ncat <<EOF | $CC -fPIC -c -o $t/c.o -xc -\n#include <stdio.h>\n\n__attribute__((weak)) int foo();\n\nint main() {\n  printf(\"%d\\n\", foo ? foo() : 3);\n}\nEOF\n\n$CC -B. -o $t/d.so $t/c.o $t/b.so -shared\nreadelf -W --dyn-syms $t/d.so | grep 'WEAK   DEFAULT .* UND foo'\n"
  },
  {
    "path": "test/weak-export-exe.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\n#include <stdio.h>\n\n__attribute__((weak)) int foo();\n\nint main() {\n  printf(\"%d\\n\", foo ? foo() : 3);\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o\nreadelf --dyn-syms $t/exe | not grep 'WEAK   DEFAULT  UND foo'\n$QEMU $t/exe | grep '^3$'\n"
  },
  {
    "path": "test/weak-undef-dso.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -xc -\n__attribute__((weak)) int foo();\nint bar() { return foo ? foo() : -1; }\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\n\ncat <<EOF | $CC -xc -c -o $t/c.o -\n#include <stdio.h>\nint bar();\nint main() { printf(\"bar=%d\\n\", bar()); }\nEOF\n\n$CC -B. -o $t/exe1 $t/c.o $t/b.so\n$QEMU $t/exe1 | grep 'bar=-1'\n\ncat <<EOF | $CC -xc -c -o $t/d.o -\n#include <stdio.h>\nint foo() { return 5; }\nint bar();\nint main() { printf(\"bar=%d\\n\", bar()); }\nEOF\n\n$CC -B. -o $t/exe2 $t/d.o $t/b.so\n$QEMU $t/exe2 | grep 'bar=5'\n"
  },
  {
    "path": "test/weak-undef.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -xc -\n#include <stdio.h>\n__attribute__((weak)) int foo();\nint main() {\n  printf(\"%d\\n\", foo ? foo() : -1);\n}\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -fno-PIC -xc -\n#include <stdio.h>\n__attribute__((weak)) int foo();\nint main() {\n  printf(\"%d\\n\", foo ? foo() : -1);\n}\nEOF\n\ncat <<EOF | $CC -fcommon -xc -c -o $t/c.o -\nint foo() { return 2; }\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -pie\n$CC -B. -o $t/exe2 $t/b.o -no-pie\n$CC -B. -o $t/exe3 $t/a.o $t/c.o -pie\n$CC -B. -o $t/exe4 $t/b.o $t/c.o -no-pie\n\n$QEMU $t/exe1 | grep '^-1$'\n$QEMU $t/exe2 | grep '^-1$'\n$QEMU $t/exe3 | grep '^2$'\n$QEMU $t/exe4 | grep '^2$'\n"
  },
  {
    "path": "test/weak-undef2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\n#include <stdio.h>\n\n__attribute__((weak)) int foo();\n\nint main() {\n  printf(\"%d\\n\", foo ? foo() : -1);\n}\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -xc -\nint foo();\nint bar() { return foo(); }\nEOF\n\nnot $CC -B. -o $t/exe $t/a.o $t/b.o |& grep 'undefined symbol: foo'\n"
  },
  {
    "path": "test/weak-undef4.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\n#include <stdio.h>\n\n__attribute__((weak)) int foo();\nint bar();\n\nint main() {\n  bar();\n  printf(\"%d\\n\", foo ? foo() : -1);\n}\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -xc -\n#include <stdio.h>\n\n__attribute__((weak)) int foo();\n\nint main() {\n  printf(\"%d\\n\", foo ? foo() : -1);\n}\nEOF\n\ncat <<EOF | $CC -fcommon -xc -c -o $t/c.o -\nint foo() { return 2; }\nvoid bar() {}\nEOF\n\nar rcs $t/d.a $t/c.o\n\n$CC -B. -o $t/exe1 $t/a.o $t/d.a\n$CC -B. -o $t/exe2 $t/b.o $t/d.a\n\n$QEMU $t/exe1 | grep '^2$'\n$QEMU $t/exe2 | grep '^-1$'\n"
  },
  {
    "path": "test/weak-undef5.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -xc -\n#include <stdio.h>\n__attribute__((weak)) int foo();\nint main() {\n  printf(\"%d\\n\", foo ? foo() : -1);\n}\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -fPIC -xc -\n#include <stdio.h>\nint foo() { return 2; }\nEOF\n\n$CC -B. -o $t/libfoobar.so $t/b.o -shared\n$CC -B. -o $t/exe $t/a.o -Wl,--as-needed -L$t -lfoobar -Wl,-rpath,$t\n\nreadelf --dynamic $t/exe | grep 'NEEDED.*libfoobar'\n$QEMU $t/exe | grep '^2$'\n"
  },
  {
    "path": "test/whole-archive.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n.globl _start\n_start:\nEOF\n\necho 'int fn1() { return 42; }' | $CC -o $t/b.o -c -xc -\necho 'int fn2() { return 42; }' | $CC -o $t/c.o -c -xc -\n\nrm -f $t/d.a\nar cr $t/d.a $t/b.o $t/c.o\n\n$CC -B. -nostdlib -o $t/exe $t/a.o $t/d.a\n\nreadelf --symbols $t/exe > $t/log\nnot grep fn1 $t/log\nnot grep fn2 $t/log\n\n$CC -B. -nostdlib -o $t/exe $t/a.o -Wl,--whole-archive $t/d.a\n\nreadelf --symbols $t/exe > $t/log\ngrep fn1 $t/log\ngrep fn2 $t/log\n\n$CC -B. -nostdlib -o $t/exe $t/a.o -Wl,--whole-archive \\\n  -Wl,--no-whole-archive $t/d.a\n\nreadelf --symbols $t/exe > $t/log\nnot grep fn1 $t/log\nnot grep fn2 $t/log\n"
  },
  {
    "path": "test/wrap-lto.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -flto || skip\n\ncat <<EOF | $CC -fPIC -shared -o $t/a.so -xc -\n#include <stdio.h>\n\nvoid foo() {\n  printf(\"foo\\n\");\n}\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -xc - -flto\n#include <stdio.h>\n\nvoid foo();\n\nvoid __wrap_foo() {\n  printf(\"wrap_foo\\n\");\n}\n\nint main() {\n  foo();\n}\nEOF\n\ncat <<EOF | $CC -c -o $t/c.o -xc - -flto\n#include <stdio.h>\n\nvoid __real_foo();\n\nint main() {\n  __real_foo();\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.so $t/b.o -flto\n$QEMU $t/exe | grep '^foo$'\n\n$CC -B. -o $t/exe $t/a.so $t/b.o -Wl,-wrap,foo -flto\n$QEMU $t/exe | grep '^wrap_foo$'\n\n$CC -B. -o $t/exe $t/a.so $t/c.o -Wl,-wrap,foo -flto\n$QEMU $t/exe | grep '^foo$'\n"
  },
  {
    "path": "test/wrap.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -shared -o $t/a.so -xc -\n#include <stdio.h>\n\nvoid foo() {\n  printf(\"foo\\n\");\n}\nEOF\n\ncat <<EOF | $CC -c -o $t/b.o -xc -\n#include <stdio.h>\n\nvoid foo();\n\nvoid __wrap_foo() {\n  printf(\"wrap_foo\\n\");\n}\n\nint main() {\n  foo();\n}\nEOF\n\ncat <<EOF | $CC -c -o $t/c.o -xc -\n#include <stdio.h>\n\nvoid __real_foo();\n\nint main() {\n  __real_foo();\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.so $t/b.o\n$QEMU $t/exe | grep '^foo$'\n\n$CC -B. -o $t/exe $t/a.so $t/b.o -Wl,-wrap,foo\n$QEMU $t/exe | grep '^wrap_foo$'\n\n$CC -B. -o $t/exe $t/a.so $t/c.o -Wl,-wrap,foo\n$QEMU $t/exe | grep '^foo$'\n"
  },
  {
    "path": "test/z-cet-report.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n.globl main\nmain:\nEOF\n\n$CC -B. -o $t/exe $t/a.o\n\n$CC -B. -o $t/exe $t/a.o -Wl,-z,cet-report=warning >& $t/log\ngrep 'a.o: -cet-report=warning: missing GNU_PROPERTY_X86_FEATURE_1_IBT' $t/log\ngrep 'a.o: -cet-report=warning: missing GNU_PROPERTY_X86_FEATURE_1_SHSTK' $t/log\n\nnot $CC -B. -o $t/exe $t/a.o -Wl,-z,cet-report=error >& $t/log\ngrep 'a.o: -cet-report=error: missing GNU_PROPERTY_X86_FEATURE_1_IBT' $t/log\ngrep 'a.o: -cet-report=error: missing GNU_PROPERTY_X86_FEATURE_1_SHSTK' $t/log\n"
  },
  {
    "path": "test/z-defs.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xc -\nvoid foo();\nvoid bar() { foo(); }\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\n$CC -B. -shared -o $t/b.so $t/a.o -Wl,-z,undefs\n\nnot $CC -B. -shared -o $t/b.so $t/a.o -Wl,-z,defs |&\n  grep 'undefined symbol:.* foo'\n\nnot $CC -B. -shared -o $t/b.so $t/a.o -Wl,-no-undefined |&\n  grep 'undefined symbol:.* foo'\n\n$CC -B. -shared -o $t/c.so $t/a.o -Wl,-z,defs -Wl,--warn-unresolved-symbols |&\n  grep 'undefined symbol:.* foo$'\n"
  },
  {
    "path": "test/z-dynamic-undefined-weak-exe.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\n__attribute__((weak)) void fn();\nint main() { fn(); }\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -pie\nreadelf -W --dyn-syms $t/exe1 | not grep -E ' fn(@@)?$'\n\n$CC -B. -o $t/exe2 $t/a.o -pie -Wl,-z,dynamic-undefined-weak\nreadelf -W --dyn-syms $t/exe2 | grep -E ' fn(@@)?$'\n"
  },
  {
    "path": "test/z-dynamic-undefined-weak.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\n__attribute__((weak)) int foo();\nint bar() { return foo ? foo() : 0; }\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\n$CC -B. -shared -o $t/c.so $t/a.o -Wl,-z,dynamic-undefined-weak\n$CC -B. -shared -o $t/d.so $t/a.o -Wl,-z,nodynamic-undefined-weak\n\ncat <<EOF | $CC -o $t/e.o -c -xc -\n#include <stdio.h>\nint foo() { return 1; }\nint bar();\nint main() { printf(\"%d\\n\", bar()); }\nEOF\n\n$CC -B. -o $t/exe1 $t/e.o $t/b.so\n$QEMU $t/exe1 | grep 1\n\n$CC -B. -o $t/exe2 $t/e.o $t/c.so\n$QEMU $t/exe2 | grep 1\n\n$CC -B. -o $t/exe3 $t/e.o $t/d.so\n$QEMU $t/exe3 | grep 0\n"
  },
  {
    "path": "test/z-dynamic-undefined-weak2.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fno-PIE\n#include <stdio.h>\n__attribute__((weak)) extern int foo;\nint main() { printf(\"%p\\n\", &foo); }\nEOF\n\nif $CC -B. -o $t/exe $t/a.o -no-pie -Wl,-z,dynamic-undefined-weak >& $t/log; then\n  $QEMU $t/exe | grep -F '(nil)'\nelse\n  grep 'recompile with -fPIE or -fPIC' $t/log\nfi\n"
  },
  {
    "path": "test/z-max-page-size.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -Wl,-z,max-page-size=65536 \\\n  -Wl,-z,separate-loadable-segments\n\n$QEMU $t/exe1 | grep 'Hello world'\nreadelf -W --segments $t/exe1 | grep 'LOAD.*R   0x10000$'\n\n$CC -B. -o $t/exe2 $t/a.o -Wl,-zmax-page-size=$((1024*1024)) \\\n  -Wl,-z,separate-loadable-segments\n\n$QEMU $t/exe2 | grep 'Hello world'\nreadelf -W --segments $t/exe2 | grep 'LOAD.*R   0x100000$'\n\n$CC -B. -o $t/exe3 $t/a.o -Wl,-zmax-page-size=$((1024*1024))\n\n$QEMU $t/exe3 | grep 'Hello world'\nreadelf -W --segments $t/exe3 | grep 'LOAD.*R   0x100000$'\n"
  },
  {
    "path": "test/z-nodefaultlib.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,-z,nodefaultlib\nreadelf --dynamic $t/exe | grep 'Flags:.*NODEFLIB'\n"
  },
  {
    "path": "test/z-nodump.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\nvoid foo() {}\nEOF\n\n$CC -B. -shared -o $t/b.so $t/a.o\nreadelf --dynamic $t/b.so | not grep -E 'Flags:.*NODUMP'\n\n$CC -B. -shared -o $t/b.so $t/a.o -Wl,-z,nodump\nreadelf --dynamic $t/b.so | grep -E 'Flags:.*NODUMP'\n"
  },
  {
    "path": "test/z-now.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello \");\n  puts(\"world\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,-z,now\n$QEMU $t/exe | grep 'Hello world'\n"
  },
  {
    "path": "test/z-origin.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xc -\n#include <stdio.h>\n\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,-z,origin\n\nreadelf --dynamic $t/exe | grep -E '\\(FLAGS\\)\\s+ORIGIN'\nreadelf --dynamic $t/exe | grep -E 'Flags:.*ORIGIN'\n"
  },
  {
    "path": "test/z-pack-relative-relocs.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -fPIC -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -o $t/exe1 $t/a.o -pie -Wl,-z,pack-relative-relocs 2> /dev/null || skip\nreadelf -WS $t/exe1 | grep -F .relr.dyn || skip\n$QEMU $t/exe1 2> /dev/null | grep Hello || skip\n\n$CC -B. -o $t/exe2 $t/a.o -pie -Wl,-z,pack-relative-relocs\n$QEMU $t/exe2 | grep Hello\n\nreadelf --dynamic $t/exe2 > $t/log2\ngrep -Ew 'RELR|<unknown>: 24' $t/log2\ngrep -Ew 'RELRSZ|<unknown>: 23' $t/log2\ngrep -Ew 'RELRENT|<unknown>: 25' $t/log2\n"
  },
  {
    "path": "test/z-rodynamic.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o\nreadelf -WS $t/exe1 | grep '\\.dynamic.* WA '\n\n$CC -B. -o $t/exe2 $t/a.o -Wl,-z,rodynamic\nreadelf -WS $t/exe2 | grep '\\.dynamic.* A '\n"
  },
  {
    "path": "test/z-sectionheader.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello \");\n  puts(\"world\");\n}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,-z,nosectionheader\n$QEMU $t/exe | grep 'Hello world'\n\nreadelf -h $t/exe |& grep -E 'Size of section headers:\\s+0 '\n"
  },
  {
    "path": "test/z-separate-code.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# musl doesn't work with `-z noseparate-code`\nis_musl && skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o -Wl,-z,separate-loadable-segments\n$QEMU $t/exe1 | grep 'Hello world'\n\n$CC -B. -o $t/exe2 $t/a.o -Wl,-z,separate-code -Wl,-z,norelro\n$QEMU $t/exe2 | grep 'Hello world'\n\n$CC -B. -o $t/exe3 $t/a.o -Wl,-z,noseparate-code -Wl,-z,norelro\n$QEMU $t/exe3 | grep 'Hello world'\n"
  },
  {
    "path": "test/z-stack-size.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe $t/a.o -Wl,-z,stack-size=0x900000\nreadelf -W --segments $t/exe | grep 'GNU_STACK .* 0x900000 RW'\n"
  },
  {
    "path": "test/z-start-stop-visibility.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\n\n__attribute__((section(\"hello\")))\nstatic char msg[] = \"Hello world\";\n\nint main() {\n  printf(\"%s\\n\", msg);\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o\nreadelf -W --dyn-syms $t/exe1 > $t/log1\nnot grep __start_hello $t/log1\nnot grep __stop_hello $t/log1\n\n$CC -B. -o $t/exe2 $t/a.o -Wl,-z,start-stop-visibility=hidden\nreadelf -W --dyn-syms $t/exe2 > $t/log2\nnot grep __start_hello $t/log2\nnot grep __stop_hello $t/log2\n\n$CC -B. -o $t/exe3 $t/a.o -Wl,-z,start-stop-visibility=protected\nreadelf -W --dyn-syms $t/exe3 > $t/log3\ngrep __start_hello $t/log3\ngrep __stop_hello $t/log3\n"
  },
  {
    "path": "test/zero-to-bss.sh",
    "content": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ \"$(uname)\" = FreeBSD ] && skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\n\n__attribute__((section(\".zero\"))) char zero[256];\n__attribute__((section(\".const\"))) const char konst[256];\n\nint main() {\n  printf(\"Hello world\\n\");\n}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o\nreadelf -WS $t/exe1 | grep -E '.zero\\s+PROGBITS'\nreadelf -WS $t/exe1 | grep -E '.const\\s+PROGBITS'\n$QEMU $t/exe1 | grep Hello\n\n$CC -B. -o $t/exe2 $t/a.o -Wl,--zero-to-bss\nreadelf -WS $t/exe2 | grep -E '.zero\\s+NOBITS'\nreadelf -WS $t/exe2 | grep -E '.const\\s+PROGBITS'\n$QEMU $t/exe2 | grep Hello\n"
  },
  {
    "path": "third-party/blake3/.cargo/config.toml",
    "content": "[target.wasm32-wasip1]\nrunner = \"wasmtime\"\n"
  },
  {
    "path": "third-party/blake3/.git-blame-ignore-revs",
    "content": "# CMakeLists.txt whitespace fixups\n3e14f865d30271c74fc68d417af488ea91b66d48\n"
  },
  {
    "path": "third-party/blake3/.github/workflows/build_b3sum.py",
    "content": "#! /usr/bin/env python3\n\nfrom pathlib import Path\nimport platform\nimport shutil\nimport subprocess\nimport sys\n\nROOT = Path(__file__).parent.parent.parent\nRUST_TARGET = sys.argv[1]\n\nsubprocess.run(\n    [\"cargo\", \"build\", \"--target\", sys.argv[1], \"--release\"], cwd=ROOT / \"b3sum\"\n)\n\nif platform.system() == \"Windows\":\n    original_exe_name = \"b3sum.exe\"\nelse:\n    original_exe_name = \"b3sum\"\n\nif platform.system() == \"Windows\":\n    new_exe_name = \"b3sum_windows_x64_bin.exe\"\nelif platform.system() == \"Darwin\":\n    new_exe_name = \"b3sum_macos_x64_bin\"\nelif platform.system() == \"Linux\":\n    new_exe_name = \"b3sum_linux_x64_bin\"\nelse:\n    raise RuntimeError(\"Unexpected platform: \" + platform.system())\n\n# Copy the built binary so that it has the upload name we want.\nout_dir = ROOT / \"b3sum/target\" / RUST_TARGET / \"release\"\noriginal_exe_path = str(out_dir / original_exe_name)\nnew_exe_path = str(out_dir / new_exe_name)\nprint(\"copying\", repr(original_exe_path), \"to\", repr(new_exe_path))\nshutil.copyfile(original_exe_path, new_exe_path)\n\n# This lets the subsequent upload step get the filepath.\nprint(\"::set-output name=bin_path::\" + new_exe_path)\n"
  },
  {
    "path": "third-party/blake3/.github/workflows/ci.yml",
    "content": "name: tests\n\non:\n  push:\n    branches:\n      - \"*\"\n    # not on tags\n  pull_request:\n\nenv:\n  BLAKE3_CI: \"1\"\n  RUSTFLAGS: \"-D warnings\"\n  RUST_BACKTRACE: \"1\"\n\njobs:\n  library_tests:\n    name: ${{ matrix.target.name }} ${{ matrix.channel }}\n    runs-on: ${{ matrix.target.os }}\n    strategy:\n      fail-fast: false\n      matrix:\n        target: [\n          { \"os\": \"ubuntu-latest\",  \"toolchain\": \"x86_64-unknown-linux-gnu\", \"name\": \"Linux GNU\" },\n          { \"os\": \"macOS-latest\",   \"toolchain\": \"aarch64-apple-darwin\",     \"name\": \"macOS\" },\n          { \"os\": \"windows-latest\", \"toolchain\": \"x86_64-pc-windows-msvc\",   \"name\": \"Windows MSVC\" },\n          { \"os\": \"windows-latest\", \"toolchain\": \"x86_64-pc-windows-gnu\",    \"name\": \"Windows GNU\" }\n        ]\n        channel: [\"stable\", \"beta\", \"nightly\"]\n\n    steps:\n    - uses: actions/checkout@v4\n    - uses: dtolnay/rust-toolchain@master\n      with:\n        toolchain: ${{ format('{0}-{1}', matrix.channel, matrix.target.toolchain) }}\n    # Print the compiler version, for debugging.\n    - name: print compiler version\n      run: cargo run --quiet\n      working-directory: ./tools/compiler_version\n    # Print out instruction set support, for debugging.\n    - name: print instruction set support\n      run: cargo run --quiet\n      working-directory: ./tools/instruction_set_support\n    # Default tests plus Rayon and trait implementations.\n    - run: cargo test --features=rayon,traits-preview,serde,zeroize\n    # Same but with only one thread in the Rayon pool. This can find deadlocks.\n    - name: \"again with RAYON_NUM_THREADS=1\"\n      run: cargo test --features=rayon,traits-preview,serde,zeroize\n      env:\n        RAYON_NUM_THREADS: 1\n    # The mmap feature by itself (update_mmap_rayon is omitted).\n    - run: cargo test --features=mmap\n    # All public features put together.\n    - run: cargo test --features=mmap,rayon,traits-preview,serde,zeroize\n    # no_std tests.\n    - run: cargo test --no-default-features\n\n    # A matrix of different test settings:\n    # - debug vs release\n    # - assembly vs Rust+C intrinsics vs pure Rust intrinsics\n    # - different levels of SIMD support\n    #\n    # Full SIMD support.\n    - run: cargo test --features=\n    - run: cargo test --features=prefer_intrinsics\n    - run: cargo test --features=pure\n    - run: cargo test --features= --release\n    - run: cargo test --features=prefer_intrinsics --release\n    - run: cargo test --features=pure --release\n    # No AVX-512.\n    - run: cargo test --features=no_avx512\n    - run: cargo test --features=no_avx512,prefer_intrinsics\n    - run: cargo test --features=no_avx512,pure\n    - run: cargo test --features=no_avx512 --release\n    - run: cargo test --features=no_avx512,prefer_intrinsics --release\n    - run: cargo test --features=no_avx512,pure --release\n    # No AVX2.\n    - run: cargo test --features=no_avx512,no_avx2\n    - run: cargo test --features=no_avx512,no_avx2,prefer_intrinsics\n    - run: cargo test --features=no_avx512,no_avx2,pure\n    - run: cargo test --features=no_avx512,no_avx2 --release\n    - run: cargo test --features=no_avx512,no_avx2,prefer_intrinsics --release\n    - run: cargo test --features=no_avx512,no_avx2,pure --release\n    # No SSE4.1\n    - run: cargo test --features=no_avx512,no_avx2,no_sse41\n    - run: cargo test --features=no_avx512,no_avx2,no_sse41,prefer_intrinsics\n    - run: cargo test --features=no_avx512,no_avx2,no_sse41,pure\n    - run: cargo test --features=no_avx512,no_avx2,no_sse41 --release\n    - run: cargo test --features=no_avx512,no_avx2,no_sse41,prefer_intrinsics --release\n    - run: cargo test --features=no_avx512,no_avx2,no_sse41,pure --release\n    # No SSE2\n    - run: cargo test --features=no_avx512,no_avx2,no_sse41,no_sse2\n    - run: cargo test --features=no_avx512,no_avx2,no_sse41,no_sse2,prefer_intrinsics\n    - run: cargo test --features=no_avx512,no_avx2,no_sse41,no_sse2,pure\n    - run: cargo test --features=no_avx512,no_avx2,no_sse41,no_sse2 --release\n    - run: cargo test --features=no_avx512,no_avx2,no_sse41,no_sse2,prefer_intrinsics --release\n    - run: cargo test --features=no_avx512,no_avx2,no_sse41,no_sse2,pure --release\n\n    # Test benchmarks. RUSTC_BOOTSTRAP=1 lets this run on non-nightly toolchains.\n    - run: cargo test --benches --features=rayon\n      env:\n        RUSTC_BOOTSTRAP: 1\n    # Test vectors.\n    - name: test vectors\n      run: cargo test\n      working-directory: ./test_vectors\n    - name: test vectors intrinsics\n      run: cargo test --features=prefer_intrinsics\n      working-directory: ./test_vectors\n    - name: test vectors pure\n      run: cargo test --features=pure\n      working-directory: ./test_vectors\n    # Test C code.\n    - name: cargo test C bindings assembly\n      run: cargo test\n      working-directory: ./c/blake3_c_rust_bindings\n    - name: cargo test C bindings intrinsics\n      run: cargo test --features=prefer_intrinsics\n      working-directory: ./c/blake3_c_rust_bindings\n    - name: cargo test C bindings no AVX-512\n      run: cargo test\n      working-directory: ./c/blake3_c_rust_bindings\n      env:\n        CFLAGS: -DBLAKE3_NO_AVX512\n    - name: cargo test C bindings no AVX2\n      run: cargo test\n      working-directory: ./c/blake3_c_rust_bindings\n      env:\n        CFLAGS: -DBLAKE3_NO_AVX512 -DBLAKE3_NO_AVX2\n    - name: cargo test C bindings no SSE41\n      run: cargo test\n      working-directory: ./c/blake3_c_rust_bindings\n      env:\n        CFLAGS: -DBLAKE3_NO_AVX512 -DBLAKE3_NO_AVX2 -DBLAKE3_NO_SSE41\n    - name: cargo test C bindings no SSE2\n      run: cargo test\n      working-directory: ./c/blake3_c_rust_bindings\n      env:\n        CFLAGS: -DBLAKE3_NO_AVX512 -DBLAKE3_NO_AVX2 -DBLAKE3_NO_SSE41 -DBLAKE3_NO_SSE2\n    # Reference impl doc test.\n    - name: reference impl doc test\n      run: cargo test\n      working-directory: ./reference_impl\n\n  msrv_build:\n    name: MSRV build ${{ matrix.os }}\n    runs-on: ${{ matrix.os }}\n    strategy:\n      fail-fast: false\n      matrix:\n        os: [\"ubuntu-latest\", \"macOS-latest\", \"windows-latest\"]\n    steps:\n    - uses: actions/checkout@v4\n    # The current MSRV. This crate doesn't have an official MSRV policy,\n    # but in practice we'll probably do what libc does:\n    # https://github.com/rust-lang/libs-team/issues/72.\n    # This test target is here so that we notice if we accidentally bump\n    # the MSRV, but it's not a promise that we won't bump it.\n    - uses: dtolnay/rust-toolchain@1.66.1\n    - run: cargo build --features=mmap,rayon,traits-preview,serde,zeroize\n\n  b3sum_tests:\n    name: b3sum ${{ matrix.target.name }} ${{ matrix.channel }}\n    runs-on: ${{ matrix.target.os }}\n    strategy:\n      fail-fast: false\n      matrix:\n        target: [\n          { \"os\": \"ubuntu-latest\",  \"toolchain\": \"x86_64-unknown-linux-gnu\", \"name\": \"Linux GNU\" },\n          { \"os\": \"macOS-latest\",   \"toolchain\": \"aarch64-apple-darwin\",      \"name\": \"macOS\" },\n          { \"os\": \"windows-latest\", \"toolchain\": \"x86_64-pc-windows-msvc\",   \"name\": \"Windows MSVC\" },\n          { \"os\": \"windows-latest\", \"toolchain\": \"x86_64-pc-windows-gnu\",    \"name\": \"Windows GNU\" }\n        ]\n        channel: [\"stable\", \"beta\", \"nightly\"]\n\n    steps:\n    - uses: actions/checkout@v4\n    - uses: dtolnay/rust-toolchain@master\n      with:\n        toolchain: ${{ format('{0}-{1}', matrix.channel, matrix.target.toolchain) }}\n    # Test b3sum.\n    - name: test b3sum\n      run: cargo test\n      working-directory: ./b3sum\n    - name: test b3sum --no-default-features\n      run: cargo test --no-default-features\n      working-directory: ./b3sum\n\n  cross_tests:\n    name: cross ${{ matrix.arch }}\n    runs-on: ubuntu-latest\n    strategy:\n      fail-fast: false\n      matrix:\n        arch:\n          - i586-unknown-linux-musl\n          - i686-unknown-linux-musl\n          - armv7-unknown-linux-gnueabihf\n          - aarch64-unknown-linux-gnu\n          # Big-endian targets. See https://twitter.com/burntsushi5/status/1695483429997945092.\n          - powerpc64-unknown-linux-gnu\n          - s390x-unknown-linux-gnu\n\n    steps:\n    - uses: actions/checkout@v4\n    - uses: dtolnay/rust-toolchain@stable\n    - run: cargo install cross\n    # Test the portable implementation on everything.\n    - run: cross test --target ${{ matrix.arch }}\n    # Test building for ancient i386 processors without guaranteed SSE2 support.\n    - run: cross rustc --target ${{ matrix.arch }} -- -C target-cpu=i386\n      if: startsWith(matrix.arch, 'i586-') || startsWith(matrix.arch, 'i686-')\n    # Test the NEON implementation on ARM targets.\n    - run: cross test --target ${{ matrix.arch }} --features=neon\n      if: startsWith(matrix.arch, 'armv7-') || startsWith(matrix.arch, 'aarch64-')\n    # NEON is enabled by default on aarch64, disabling it through the no_neon feature.\n    - run: cross test --target ${{ matrix.arch }} --features=no_neon\n      if: startsWith(matrix.arch, 'aarch64-')\n    # Test vectors. Note that this uses a hacky script due to path dependency limitations.\n    - run: ./test_vectors/cross_test.sh --target ${{ matrix.arch }}\n    # C code. Same issue with the hacky script.\n    - run: ./c/blake3_c_rust_bindings/cross_test.sh --target ${{ matrix.arch }}\n    - run: ./c/blake3_c_rust_bindings/cross_test.sh --target ${{ matrix.arch }} --features=neon\n      if: startsWith(matrix.arch, 'armv7-') || startsWith(matrix.arch, 'aarch64-')\n\n  wasm_tests:\n    name: WASM tests\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v4\n    - uses: dtolnay/rust-toolchain@stable\n      with:\n        targets: wasm32-wasip1\n    - name: install Wasmtime\n      run: |\n        curl https://wasmtime.dev/install.sh -sSf | bash\n        echo PATH: $PATH\n        mkdir -p ~/.local/bin\n        ln -s ~/.wasmtime/bin/wasmtime ~/.local/bin/wasmtime\n    - run: cargo test --target wasm32-wasip1\n    - run: cargo test --target wasm32-wasip1 --no-default-features\n    - run: cargo test --target wasm32-wasip1 --features wasm32_simd\n    - run: cargo test --target wasm32-wasip1 --no-default-features --features wasm32_simd\n    - run: cargo test --target wasm32-wasip1 --benches --features=wasm32_simd\n      env:\n        RUSTC_BOOTSTRAP: 1\n    - name: test vectors w/o SIMD\n      run: cargo test --target wasm32-wasip1\n      working-directory: ./test_vectors\n    - name: test vectors w/ SIMD\n      run: cargo test --target wasm32-wasip1 --features wasm32_simd\n      working-directory: ./test_vectors\n\n  cargo_xwin_test:\n    name: cargo xwin test\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v4\n    - run: docker run -v $(pwd):/io -w /io messense/cargo-xwin cargo xwin test --target x86_64-pc-windows-msvc --features=mmap,rayon,traits-preview,serde,zeroize\n\n  # Currently only on x86.\n  cmake_c_tests:\n    name: CMake C tests SIMD=${{ matrix.simd }} TBB=${{ matrix.use_tbb }}\n    runs-on: ubuntu-latest\n    strategy:\n      fail-fast: false\n      matrix:\n        use_tbb: [\"OFF\", \"ON\"]\n        simd: [\"x86-intrinsics\", \"amd64-asm\"]\n    steps:\n    - uses: actions/checkout@v4\n    - run: |\n        sudo apt-get update\n        sudo apt-get install ninja-build libtbb-dev libtbb12\n    # Test the intrinsics-based and assembly-based implementations.\n    - run: |\n        cmake --fresh -S c -B c/build -G Ninja -DBLAKE3_TESTING=ON -DBLAKE3_TESTING_CI=ON \"-DBLAKE3_SIMD_TYPE=${{ matrix.simd }}\"\n        cmake --build c/build --target test\n        cat c/build/Testing/Temporary/LastTest.log\n    - run: |\n        cmake --fresh -S c -B c/build -G Ninja -DBLAKE3_TESTING=ON -DBLAKE3_TESTING_CI=ON \"-DBLAKE3_SIMD_TYPE=${{ matrix.simd }}\" -DBLAKE3_NO_SSE2=1\n        cmake --build c/build --target test\n        cat c/build/Testing/Temporary/LastTest.log\n    - run: |\n        cmake --fresh -S c -B c/build -G Ninja -DBLAKE3_TESTING=ON -DBLAKE3_TESTING_CI=ON \"-DBLAKE3_SIMD_TYPE=${{ matrix.simd }}\" -DBLAKE3_NO_SSE2=1 -DBLAKE3_NO_SSE41=1\n        cmake --build c/build --target test\n        cat c/build/Testing/Temporary/LastTest.log\n    - run: |\n        cmake --fresh -S c -B c/build -G Ninja -DBLAKE3_TESTING=ON -DBLAKE3_TESTING_CI=ON \"-DBLAKE3_SIMD_TYPE=${{ matrix.simd }}\" \"-DBLAKE3_NO_SSE2=1\" \"-DBLAKE3_NO_SSE41=1\" \"-DBLAKE3_NO_AVX2=1\"\n        cmake --build c/build --target test\n        cat c/build/Testing/Temporary/LastTest.log\n    - run: |\n        cmake --fresh -S c -B c/build -G Ninja -DBLAKE3_TESTING=ON -DBLAKE3_TESTING_CI=ON \"-DBLAKE3_SIMD_TYPE=${{ matrix.simd }}\" \"-DBLAKE3_NO_SSE2=1\" \"-DBLAKE3_NO_SSE41=1\" \"-DBLAKE3_NO_AVX2=1\" \"-DBLAKE3_NO_AVX512=1\"\n        cmake --build c/build --target test\n        cat c/build/Testing/Temporary/LastTest.log\n    # Test with TBB disabled/enabled.\n    - run: |\n        cmake --fresh -S c -B c/build -G Ninja -DBLAKE3_TESTING=ON -DBLAKE3_TESTING_CI=ON \"-DBLAKE3_USE_TBB=${{ matrix.use_tbb }}\"\n        cmake --build c/build --target test\n        cat c/build/Testing/Temporary/LastTest.log\n    # Build the example with TBB disabled/enabled.\n    - run: |\n        cmake --fresh -S c -B c/build -G Ninja -DBLAKE3_TESTING=ON -DBLAKE3_TESTING_CI=ON -DBLAKE3_EXAMPLES=ON \"-DBLAKE3_USE_TBB=${{ matrix.use_tbb }}\"\n        cmake --build c/build --target blake3-example\n\n  # Currently only on x86.\n  pkg_config_c_tests:\n    name: pkg-config C tests TBB=${{ matrix.use_tbb }} BUILD_SHARED_LIBS=${{ matrix.shared_libs }} STDLIB=${{ matrix.stdlib }}\n    runs-on: ubuntu-latest\n    strategy:\n      fail-fast: false\n      matrix:\n        use_tbb: [\"OFF\", \"ON\"]\n        shared_libs: [\"OFF\", \"ON\"]\n        stdlib: [\"libc++\", \"libstdc++\"]\n    steps:\n    - uses: actions/checkout@v4\n    - name: update packages\n      run: |\n        sudo apt-get update\n        sudo apt-get install ninja-build libtbb-dev libtbb12\n        ${{ matrix.stdlib != 'libc++' || 'sudo apt-get install libc++-dev libc++abi-dev' }}\n    - name: configure cmake\n      run: |\n        export CXXFLAGS=${{ matrix.stdlib == 'libc++' && '-stdlib=libc++' || '' }}\n        export CC=${{ matrix.stdlib == 'libc++' && 'clang' || 'gcc' }}\n        export CXX=${{ matrix.stdlib == 'libc++' && 'clang++' || 'g++' }}\n        cmake --fresh -S c -B c/build -G Ninja -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/target \"-DBLAKE3_USE_TBB=${{ matrix.use_tbb }}\" \"-DBUILD_SHARED_LIBS=${{ matrix.shared_libs }}\" -DCMAKE_VERBOSE_MAKEFILE=1\n    - run: cmake --build c/build --target install\n    - run: mkdir -p ${{ github.workspace }}/target/bin\n    - run: echo \"PKG_CONFIG_PATH=${{ github.workspace }}/target/lib/pkgconfig\" >> $GITHUB_ENV\n    - run: gcc -O3 -o ${{ github.workspace }}/target/bin/blake3-example c/example.c $(pkg-config --cflags --libs libblake3)\n    - if: matrix.use_tbb == 'ON'\n      run: gcc -O3 -o ${{ github.workspace }}/target/bin/blake3-example-tbb c/example_tbb.c $(pkg-config --cflags --libs libblake3)\n\n  # Note that this jobs builds AArch64 binaries from an x86_64 host.\n  build_apple_silicon:\n    name: build for Apple Silicon\n    runs-on: macOS-latest\n    strategy:\n      fail-fast: false\n    steps:\n    - uses: actions/checkout@v4\n    - uses: dtolnay/rust-toolchain@stable\n      with:\n        targets: aarch64-apple-darwin\n    - name: build blake3\n      run: cargo build --target aarch64-apple-darwin\n    - name: build b3sum\n      run: cargo build --target aarch64-apple-darwin\n      working-directory: ./b3sum\n\n  build_tinycc:\n    name: build with the Tiny C Compiler\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v4\n    - name: install TCC\n      run: sudo apt-get install -y tcc\n    - name: compile\n      run: >\n        tcc -shared -O3 -o libblake3.so \\\n          -DBLAKE3_NO_SSE2 -DBLAKE3_NO_SSE41 -DBLAKE3_NO_AVX2 -DBLAKE3_NO_AVX512 \\\n          blake3.c blake3_dispatch.c blake3_portable.c\n      working-directory: ./c\n\n  # See https://github.com/BLAKE3-team/BLAKE3/issues/271 for why we test this.\n  # Note that this isn't guaranteed to execute on an AVX-512-supporting server,\n  # but hopefully at least some of the time it will.\n  gcc54:\n    name: \"compile and test with GCC 5.4\"\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v4\n    - uses: addnab/docker-run-action@v3\n      with:\n        image: gcc:5.4\n        options: -v ${{ github.workspace }}:/work\n        run: |\n          cat /proc/cpuinfo\n          curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal\n          cd /work\n          ~/.cargo/bin/cargo test --features prefer_intrinsics\n\n  # CMake build test (Library only).\n  cmake_current_build:\n    name: CMake ${{ matrix.os }} CC=${{ matrix.toolchain.cc }} CXX=${{ matrix.toolchain.cxx }} TBB=${{ matrix.use_tbb }}\n    runs-on: ${{ matrix.os }}\n    strategy:\n      fail-fast: false\n      matrix:\n        cmakeVersion: [latest]\n        ninjaVersion: [latest]\n        os: [ubuntu-latest, macOS-latest, windows-latest]\n        toolchain: [\n          { cc: cl, cxx: cl },\n          { cc: clang, cxx: clang++ },\n          { cc: clang-cl, cxx: clang-cl },\n          { cc: gcc, cxx: g++ },\n        ]\n        use_tbb: [OFF, ON]\n        exclude:\n          - os: macOS-latest\n            toolchain: { cc: cl, cxx: cl }\n          - os: macOS-latest\n            toolchain: { cc: clang-cl, cxx: clang-cl }\n          - os: ubuntu-latest\n            toolchain: { cc: cl, cxx: cl }\n          - os: ubuntu-latest\n            toolchain: { cc: clang-cl, cxx: clang-cl }\n          - os: windows-latest\n            toolchain: { cc: clang, cxx: clang++ }\n            use_tbb: ON\n          - os: windows-latest\n            toolchain: { cc: gcc, cxx: g++ }\n            use_tbb: ON\n    steps:\n      - uses: actions/checkout@v4\n      - uses: lukka/get-cmake@5f6e04f5267c8133f1273bf2103583fc72c46b17\n        with:\n          cmakeVersion: ${{ matrix.cmakeVersion }}\n          ninjaVersion: ${{ matrix.ninjaVersion }}\n      - if: matrix.os == 'macOS-latest'\n        name: Install dependencies on macOS\n        run: |\n          brew update\n          brew install tbb\n      - if: matrix.os == 'ubuntu-latest'\n        name: Install dependencies on Linux\n        run: |\n          sudo apt-get update\n          sudo apt-get install libtbb-dev libtbb12\n      - name: CMake generation, build, install\n        run: |\n          ${{ matrix.os != 'windows-latest' || '& \"C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/Tools/Launch-VsDevShell.ps1\" -Arch amd64 -SkipAutomaticLocation' }}\n          cmake -S c -B c/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/target -DCMAKE_C_COMPILER=${{ matrix.toolchain.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.toolchain.cxx }} -DBLAKE3_USE_TBB=${{ matrix.use_tbb }} -DBLAKE3_FETCH_TBB=${{ matrix.os == 'windows-latest' && 'YES' || 'NO' }} -DBLAKE3_EXAMPLES=ON\n          cmake --build c/build --target install\n\n  cmake_3-9_build:\n    name: CMake 3.9.6 ubuntu-latest\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: lukka/get-cmake@5f6e04f5267c8133f1273bf2103583fc72c46b17\n        with:\n          cmakeVersion: 3.9.6\n      - name: Create build directory\n        run: mkdir c/build\n      - name: CMake generation\n        run: cmake .. -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/target\n        working-directory: c/build\n      - name: CMake build / install\n        run: make install\n        working-directory: c/build\n\n  miri_smoketest:\n    name: Miri smoketest\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v4\n    - uses: dtolnay/rust-toolchain@nightly\n      with:\n        components: miri\n    # Currently the test search \"miri\" only matches \"test_miri_smoketest\", but\n    # we might add more. If this accidentally picks up anything incompatible or\n    # slow, we can narrow it.\n    - run: cargo miri test miri\n\n  tbb_rust_bindings_tests:\n    name: TBB test bindings ${{ matrix.os }}\n    runs-on: ${{ matrix.os }}\n    strategy:\n      fail-fast: false\n      matrix:\n        os: [\"ubuntu-latest\", \"macOS-latest\"]\n    steps:\n    - uses: actions/checkout@v4\n    - uses: dtolnay/rust-toolchain@stable\n    - name: install TBB\n      if: matrix.os == 'ubuntu-latest'\n      run: |\n        sudo apt-get update\n        sudo apt-get install libtbb-dev libtbb12\n    - name: install TBB\n      if: matrix.os == 'macOS-latest'\n      run: |\n        brew install tbb\n        echo \"CXXFLAGS=-I$(brew --prefix)/include $CPPFLAGS\" >> $GITHUB_ENV\n        echo \"RUSTFLAGS=-L$(brew --prefix)/lib $RUSTFLAGS\" >> $GITHUB_ENV\n    - name: cargo test C bindings with TBB\n      run: cargo test --features=tbb\n      working-directory: ./c/blake3_c_rust_bindings\n"
  },
  {
    "path": "third-party/blake3/.github/workflows/tag.yml",
    "content": "name: publish_b3sum_binaries\n\non:\n  push:\n    tags:\n      - \"*\"\n\nenv:\n  BLAKE3_CI: \"1\"\n  RUSTFLAGS: \"-D warnings\"\n\njobs:\n  cargo_tests:\n    name: ${{ matrix.target.name }}\n    runs-on: ${{ matrix.target.os }}\n    strategy:\n      fail-fast: false\n      matrix:\n        target: [\n          { \"os\": \"ubuntu-latest\",  \"rust-target\": \"x86_64-unknown-linux-musl\", \"name\": \"Linux\" },\n          { \"os\": \"macOS-latest\",   \"rust-target\": \"x86_64-apple-darwin\",       \"name\": \"macOS\" },\n          { \"os\": \"windows-latest\", \"rust-target\": \"x86_64-pc-windows-msvc\",    \"name\": \"Windows\" },\n        ]\n\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-python@v4\n        with:\n          python-version: \"3.x\"\n      - run: pip install PyGithub\n      - run: sudo apt-get install musl-tools\n        if: matrix.target.os == 'ubuntu-latest'\n      - uses: dtolnay/rust-toolchain@stable\n        with:\n          targets: ${{ matrix.target.rust-target }}\n      - name: build b3sum\n        id: build_b3sum\n        run: python -u .github/workflows/build_b3sum.py ${{ matrix.target.rust-target }}\n      - name: upload release asset\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          GITHUB_TAG: ${{ github.ref }}\n        run: python -u .github/workflows/upload_github_release_asset.py ${{ steps.build_b3sum.outputs.bin_path }}\n"
  },
  {
    "path": "third-party/blake3/.github/workflows/upload_github_release_asset.py",
    "content": "#! /usr/bin/env python3\n\nimport github\nimport os\nimport sys\nimport time\n\nRETRIES = 10\n\ng = github.Github(os.environ[\"GITHUB_TOKEN\"])\ntag_name = os.environ[\"GITHUB_TAG\"]\ntag_prefix = \"refs/tags/\"\nif tag_name.startswith(tag_prefix):\n    tag_name = tag_name[len(tag_prefix) :]\nassert len(sys.argv) == 2\nasset_path = sys.argv[1]\nasset_name = os.path.basename(asset_path)\n\nrepo = g.get_repo(os.environ[\"GITHUB_REPOSITORY\"])\n\ntags = list(repo.get_tags())\n\nfor tag in tags:\n    if tag.name == tag_name:\n        break\nelse:\n    raise RuntimeError(\"no tag named \" + repr(tag_name))\n\ntry:\n    print(\"Creating GitHub release for tag \" + repr(tag_name) + \"...\")\n    repo.create_git_release(tag_name, tag_name, tag.commit.commit.message)\nexcept github.GithubException as github_error:\n    if github_error.data[\"errors\"][0][\"code\"] == \"already_exists\":\n        print(\"Release for tag \" + repr(tag_name) + \" already exists.\")\n    else:\n        raise\n\n\ndef get_release():\n    for i in range(RETRIES):\n        releases = list(repo.get_releases())\n        for release in releases:\n            if release.tag_name == tag_name:\n                return release\n        print(f\"Release for tag {repr(tag_name)} not found. Retrying...\")\n        time.sleep(1)\n    raise RuntimeError(\"no release for tag \" + repr(tag_name))\n\n\nrelease = get_release()\n\nprint(\"Uploading \" + repr(asset_path) + \"...\")\nfor i in range(RETRIES):\n    try:\n        print(\"Upload attempt #{} of {}...\".format(i + 1, RETRIES))\n        release.upload_asset(asset_path)\n        break\n    except github.GithubException as github_error:\n        # Unfortunately the asset upload API is flaky. Even worse, it often\n        # partially succeeds, returning an error to the caller but leaving the\n        # release in a state where subsequent uploads of the same asset will\n        # fail with an \"already_exists\" error. (Though the asset is not visible\n        # on github.com, so we can't just declare victory and move on.) If we\n        # detect this case, explicitly delete the asset and continue retrying.\n        print(github_error)\n        for asset in release.get_assets():\n            if asset.name == asset_name:\n                print(\"Found uploaded asset after failure. Deleting...\")\n                asset.delete_asset()\nelse:\n    raise RuntimeError(\"All upload attempts failed.\")\n\nprint(\"Success!\")\n"
  },
  {
    "path": "third-party/blake3/.gitignore",
    "content": "Cargo.lock\ntarget\n"
  },
  {
    "path": "third-party/blake3/CONTRIBUTING.md",
    "content": "# Contributing\n\nWe welcome and encourage third-party contributions to BLAKE3, be it reports of issues encountered while using the software or proposals of patches.\n\n## Bug reports\n\nBugs and other problems should be reported on [GitHub Issues](https://github.com/BLAKE3/BLAKE3/issues).\n\nIf you report a bug, please:\n\n* Check that it's not already reported in the [GitHub Issues](https://github.com/BLAKE3/BLAKE3/issues).\n* Provide information to help us diagnose and ideally reproduce the bug.\n\n## Patches\n\nWe encourage you to fix a bug via a [GitHub Pull request](https://github.com/BLAKE3/BLAKE3/pulls), preferably after creating a related issue and referring it in the PR.\n\nIf you contribute code and submit a patch, please note the following:\n\n* We use Rust's stable branch for developing BLAKE3.\n* Pull requests should target the `master` branch.\n* Try to follow the established Rust [style guidelines](https://doc.rust-lang.org/1.0.0/style/).\n\nAlso please make sure to create new unit tests covering your code additions. You can execute the tests by running:\n\n```bash\ncargo test\n```\n\nAll third-party contributions will be recognized in the list of contributors.\n\n"
  },
  {
    "path": "third-party/blake3/Cargo.toml",
    "content": "[package]\nname = \"blake3\"\nversion = \"1.8.2\"\nauthors = [\"Jack O'Connor <oconnor663@gmail.com>\", \"Samuel Neves\"]\ndescription = \"the BLAKE3 hash function\"\nrepository = \"https://github.com/BLAKE3-team/BLAKE3\"\nlicense = \"CC0-1.0 OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception\"\ndocumentation = \"https://docs.rs/blake3\"\nreadme = \"README.md\"\nedition = \"2021\"\n\n[features]\ndefault = [\"std\"]\n\n# The NEON implementation does not participate in dynamic feature detection,\n# which is currently x86-only. If \"neon\" is on, NEON support is assumed. Note\n# that AArch64 always supports NEON, but support on ARMv7 varies. The NEON\n# implementation uses C intrinsics and requires a C compiler.\nneon = []\n\n# The Wasm SIMD implementation does not participate in dynamic feature detection,\n# which is currently x86-only. If \"wasm_simd\" is on, Wasm SIMD support is assumed.\n# Note that not all Wasm implementations support the Wasm SIMD specification.\n# This may become the default in the future.\nwasm32_simd = []\n\n# This crate uses libstd for std::io trait implementations, and also for\n# runtime CPU feature detection. This feature is enabled by default. If you use\n# --no-default-features, the only way to use the SIMD implementations in this\n# crate is to enable the corresponding instruction sets statically for the\n# entire build, with e.g. RUSTFLAGS=\"-C target-cpu=native\".\nstd = []\n\n# The `rayon` feature (disabled by default, but enabled for docs.rs) adds the\n# `update_rayon` and (in combination with `mmap` below) `update_mmap_rayon`\n# methods, for multithreaded hashing. However, even if this feature is enabled,\n# all other APIs remain single-threaded.\n#\n# Implementation detail: We take a dependency on rayon-core instead of rayon,\n# because it builds faster and still includes all the APIs we need.\nrayon = [\"dep:rayon-core\"]\n\n# The `mmap` feature (disabled by default, but enabled for docs.rs) adds the\n# `update_mmap` and (in combination with `rayon` above) `update_mmap_rayon`\n# helper methods for memory-mapped IO.\nmmap = [\"std\", \"dep:memmap2\"]\n\n# Implement the zeroize::Zeroize trait for types in this crate.\nzeroize = [\"dep:zeroize\", \"arrayvec/zeroize\"]\n\n# This crate implements traits from the RustCrypto project, exposed here as the\n# \"traits-preview\" feature. However, these traits aren't stable, and they're\n# expected to change in incompatible ways before they reach 1.0. For that\n# reason, this crate makes no SemVer guarantees for this feature, and callers\n# who use it should expect breaking changes between patch versions of this\n# crate. (The \"*-preview\" feature name follows the conventions of the RustCrypto\n# \"signature\" crate.)\ntraits-preview = [\"dep:digest\"]\n\n# ---------- Features below this line are undocumented and unstable. ----------\n# The following features are mainly intended for testing and benchmarking, and\n# they might change or disappear at any time without a major version bump.\n\n# It wasn't originally intended to expose \"digest\" as its own feature, but the\n# traits-preview feature above predated the \"dep:\" syntax in Cargo. Version\n# 1.5.2 of this crate started using \"dep:\" syntax, but that broke some callers\n# in the wild (https://solana.stackexchange.com/q/17787/29050). This feature\n# unbreaks those callers. When Cargo gains the ability to deprecate features,\n# this feature will be deprecated. Note that the relevant trait implementations\n# are still gated by \"traits-preview\".\ndigest = [\"dep:digest\"]\n\n# By default on x86_64, this crate uses Samuel Neves' hand-written assembly\n# implementations for SSE4.1, AVX2, and AVX512. (These provide both the best\n# runtime performance, and the fastest build times.) And by default on 32-bit\n# x86, this crate uses Rust intrinsics implementations for SSE4.1 and AVX2, and\n# a C intrinsics implementation for AVX-512. In both cases, if a C compiler is\n# not detected, or if AVX-512 support is missing from the detected compiler,\n# build.rs automatically falls back to a pure Rust build. This feature forces\n# that fallback, for testing purposes. (Note that in CI testing, we set the\n# BLAKE3_CI environment variable, which instructs build.rs to error out rather\n# than doing an automatic fallback.)\npure = []\n\n# As described above, on x86_64 this crate use assembly implementations by\n# default. Enabling the \"prefer_intrinsics\" feature makes this crate use\n# intrinsics implementations on both 32-bit and 64-bit x86, again for testing\n# purposes.\nprefer_intrinsics = []\n\n# Disable individual instruction sets. CI testing uses these flags to simulate\n# different levels of hardware SIMD support. Note that code for the\n# corresponding instruction set is still compiled; only detection is disabled.\n#\n# As noted above, these flags are *for testing only* and are not stable. It's\n# possible that some users might find that their particular use case performs\n# better if e.g. AVX-512 is disabled, because of issues like CPU downclocking.\n# If that comes up, and if disabling the instruction set here at the feature\n# level turns out to be the right approach, then we can design a stable\n# feature. Until then, we reserve the right to break these features in a patch\n# release.\nno_sse2 = []\nno_sse41 = []\nno_avx2 = []\nno_avx512 = []\nno_neon = []\n\n[package.metadata.docs.rs]\n# Document the rayon/mmap methods and the Serialize/Deserialize/Zeroize impls on docs.rs.\nfeatures = [\"mmap\", \"rayon\", \"serde\", \"zeroize\"]\n\n[dependencies]\narrayref = \"0.3.5\"\narrayvec = { version = \"0.7.4\", default-features = false }\nconstant_time_eq = { version = \"0.3.1\", default-features = false }\ncfg-if = \"1.0.0\"\ndigest = { version = \"0.10.1\", features = [\"mac\"], optional = true }\nmemmap2 = { version = \"0.9\", optional = true }\nrayon-core = { version = \"1.12.1\", optional = true }\nserde = { version = \"1.0\", default-features = false, features = [\"derive\"], optional = true }\nzeroize = { version = \"1\", default-features = false, optional = true }\n\n[dev-dependencies]\nhmac = \"0.12.0\"\nhex = \"0.4.2\"\npage_size = \"0.6.0\"\nrand = \"0.9.0\"\nrand_chacha = \"0.9.0\"\nreference_impl = { path = \"./reference_impl\" }\ntempfile = \"3.8.0\"\nserde_json = \"1.0.107\"\nciborium = \"0.2.2\"\n\n[build-dependencies]\ncc = \"1.1.12\"\n"
  },
  {
    "path": "third-party/blake3/LICENSE_A2",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2019 Jack O'Connor and Samuel Neves\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "third-party/blake3/LICENSE_A2LLVM",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n    TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n    1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n    2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n    3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n    4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n    5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n    6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n    7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n    8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n    9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n    END OF TERMS AND CONDITIONS\n\n    APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n    Copyright 2019 Jack O'Connor and Samuel Neves\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\n---- LLVM Exceptions to the Apache 2.0 License ----\n\nAs an exception, if, as a result of your compiling your source code, portions\nof this Software are embedded into an Object form of such source code, you\nmay redistribute such embedded portions in such Object form without complying\nwith the conditions of Sections 4(a), 4(b) and 4(d) of the License.\n\nIn addition, if you combine or link compiled forms of this Software with\nsoftware that is licensed under the GPLv2 (\"Combined Software\") and if a\ncourt of competent jurisdiction determines that the patent provision (Section\n3), the indemnity provision (Section 9) or other Section of the License\nconflicts with the conditions of the GPLv2, you may retroactively and\nprospectively choose to deem waived or otherwise exclude such Section(s) of\nthe License, but only in their entirety and only with respect to the Combined\nSoftware.\n\n"
  },
  {
    "path": "third-party/blake3/LICENSE_CC0",
    "content": "Creative Commons Legal Code\n\nCC0 1.0 Universal\n\n    CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE\n    LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN\n    ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS\n    INFORMATION ON AN \"AS-IS\" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES\n    REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS\n    PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM\n    THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED\n    HEREUNDER.\n\nStatement of Purpose\n\nThe laws of most jurisdictions throughout the world automatically confer\nexclusive Copyright and Related Rights (defined below) upon the creator\nand subsequent owner(s) (each and all, an \"owner\") of an original work of\nauthorship and/or a database (each, a \"Work\").\n\nCertain owners wish to permanently relinquish those rights to a Work for\nthe purpose of contributing to a commons of creative, cultural and\nscientific works (\"Commons\") that the public can reliably and without fear\nof later claims of infringement build upon, modify, incorporate in other\nworks, reuse and redistribute as freely as possible in any form whatsoever\nand for any purposes, including without limitation commercial purposes.\nThese owners may contribute to the Commons to promote the ideal of a free\nculture and the further production of creative, cultural and scientific\nworks, or to gain reputation or greater distribution for their Work in\npart through the use and efforts of others.\n\nFor these and/or other purposes and motivations, and without any\nexpectation of additional consideration or compensation, the person\nassociating CC0 with a Work (the \"Affirmer\"), to the extent that he or she\nis an owner of Copyright and Related Rights in the Work, voluntarily\nelects to apply CC0 to the Work and publicly distribute the Work under its\nterms, with knowledge of his or her Copyright and Related Rights in the\nWork and the meaning and intended legal effect of CC0 on those rights.\n\n1. Copyright and Related Rights. A Work made available under CC0 may be\nprotected by copyright and related or neighboring rights (\"Copyright and\nRelated Rights\"). Copyright and Related Rights include, but are not\nlimited to, the following:\n\n  i. the right to reproduce, adapt, distribute, perform, display,\n     communicate, and translate a Work;\n ii. moral rights retained by the original author(s) and/or performer(s);\niii. publicity and privacy rights pertaining to a person's image or\n     likeness depicted in a Work;\n iv. rights protecting against unfair competition in regards to a Work,\n     subject to the limitations in paragraph 4(a), below;\n  v. rights protecting the extraction, dissemination, use and reuse of data\n     in a Work;\n vi. database rights (such as those arising under Directive 96/9/EC of the\n     European Parliament and of the Council of 11 March 1996 on the legal\n     protection of databases, and under any national implementation\n     thereof, including any amended or successor version of such\n     directive); and\nvii. other similar, equivalent or corresponding rights throughout the\n     world based on applicable law or treaty, and any national\n     implementations thereof.\n\n2. Waiver. To the greatest extent permitted by, but not in contravention\nof, applicable law, Affirmer hereby overtly, fully, permanently,\nirrevocably and unconditionally waives, abandons, and surrenders all of\nAffirmer's Copyright and Related Rights and associated claims and causes\nof action, whether now known or unknown (including existing as well as\nfuture claims and causes of action), in the Work (i) in all territories\nworldwide, (ii) for the maximum duration provided by applicable law or\ntreaty (including future time extensions), (iii) in any current or future\nmedium and for any number of copies, and (iv) for any purpose whatsoever,\nincluding without limitation commercial, advertising or promotional\npurposes (the \"Waiver\"). Affirmer makes the Waiver for the benefit of each\nmember of the public at large and to the detriment of Affirmer's heirs and\nsuccessors, fully intending that such Waiver shall not be subject to\nrevocation, rescission, cancellation, termination, or any other legal or\nequitable action to disrupt the quiet enjoyment of the Work by the public\nas contemplated by Affirmer's express Statement of Purpose.\n\n3. Public License Fallback. Should any part of the Waiver for any reason\nbe judged legally invalid or ineffective under applicable law, then the\nWaiver shall be preserved to the maximum extent permitted taking into\naccount Affirmer's express Statement of Purpose. In addition, to the\nextent the Waiver is so judged Affirmer hereby grants to each affected\nperson a royalty-free, non transferable, non sublicensable, non exclusive,\nirrevocable and unconditional license to exercise Affirmer's Copyright and\nRelated Rights in the Work (i) in all territories worldwide, (ii) for the\nmaximum duration provided by applicable law or treaty (including future\ntime extensions), (iii) in any current or future medium and for any number\nof copies, and (iv) for any purpose whatsoever, including without\nlimitation commercial, advertising or promotional purposes (the\n\"License\"). The License shall be deemed effective as of the date CC0 was\napplied by Affirmer to the Work. Should any part of the License for any\nreason be judged legally invalid or ineffective under applicable law, such\npartial invalidity or ineffectiveness shall not invalidate the remainder\nof the License, and in such case Affirmer hereby affirms that he or she\nwill not (i) exercise any of his or her remaining Copyright and Related\nRights in the Work or (ii) assert any associated claims and causes of\naction with respect to the Work, in either case contrary to Affirmer's\nexpress Statement of Purpose.\n\n4. Limitations and Disclaimers.\n\n a. No trademark or patent rights held by Affirmer are waived, abandoned,\n    surrendered, licensed or otherwise affected by this document.\n b. Affirmer offers the Work as-is and makes no representations or\n    warranties of any kind concerning the Work, express, implied,\n    statutory or otherwise, including without limitation warranties of\n    title, merchantability, fitness for a particular purpose, non\n    infringement, or the absence of latent or other defects, accuracy, or\n    the present or absence of errors, whether or not discoverable, all to\n    the greatest extent permissible under applicable law.\n c. Affirmer disclaims responsibility for clearing rights of other persons\n    that may apply to the Work or any use thereof, including without\n    limitation any person's Copyright and Related Rights in the Work.\n    Further, Affirmer disclaims responsibility for obtaining any necessary\n    consents, permissions or other rights required for any use of the\n    Work.\n d. Affirmer understands and acknowledges that Creative Commons is not a\n    party to this document and has no duty or obligation with respect to\n    this CC0 or use of the Work.\n"
  },
  {
    "path": "third-party/blake3/README.md",
    "content": "# BLAKE3\n\nBLAKE3 is a cryptographic hash function that is:\n\n- **Much faster** than MD5, SHA-1, SHA-2, SHA-3, and BLAKE2.\n- **Secure**, unlike MD5 and SHA-1. And secure against length extension,\n  unlike SHA-2.\n- **Highly parallelizable** across any number of threads and SIMD lanes,\n  because it's a Merkle tree on the inside.\n- Capable of **verified streaming** and **incremental updates**, again\n  because it's a Merkle tree.\n- A **PRF**, **MAC**, **KDF**, and **XOF**, as well as a regular hash.\n- **One algorithm with no variants**, which is fast on x86-64 and also\n  on smaller architectures.\n\nThe [chart below](https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/benchmarks/bar_chart.py)\nis an example benchmark of 16 KiB inputs on a Cascade Lake-SP 8275CL server CPU\nfrom 2019. For more detailed benchmarks, see the\n[BLAKE3 paper](https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf).\n\n<p align=\"center\">\n<img src=\"media/speed.svg\" alt=\"performance graph\">\n</p>\n\nBLAKE3 is based on an optimized instance of the established hash\nfunction [BLAKE2](https://blake2.net) and on the [original Bao tree\nmode](https://github.com/oconnor663/bao/blob/master/docs/spec_0.9.1.md).\nThe specifications and design rationale are available in the [BLAKE3\npaper](https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf).\nThe default output size is 256 bits. The current version of\n[Bao](https://github.com/oconnor663/bao) implements verified streaming\nwith BLAKE3.\n\nThis repository is the official implementation of BLAKE3. It includes:\n\n* The [`blake3`](https://crates.io/crates/blake3) Rust crate, which\n  includes optimized implementations for SSE2, SSE4.1, AVX2, AVX-512,\n  NEON, and WASM, with automatic runtime CPU feature detection on x86.\n  The `rayon` feature provides multithreading.\n\n* The [`b3sum`](https://crates.io/crates/b3sum) Rust crate, which\n  provides a command line interface. It uses multithreading by default,\n  making it an order of magnitude faster than e.g. `sha256sum` on\n  typical desktop hardware.\n\n* The [C implementation](c), which like the Rust implementation includes SIMD\n  optimizations (all except WASM), CPU feature detection on x86, and optional\n  multithreading. See [`c/README.md`](c/README.md).\n\n* The [Rust reference implementation](reference_impl/reference_impl.rs),\n  which is discussed in Section 5.1 of the [BLAKE3\n  paper](https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf).\n  This implementation is much smaller and simpler than the optimized\n  ones above. If you want to see how BLAKE3 works, or you're writing a\n  port that doesn't need multithreading or SIMD optimizations, start\n  here. Ports of the reference implementation to other languages are\n  hosted in separate repositories\n  ([C](https://github.com/oconnor663/blake3_reference_impl_c),\n  [Python](https://github.com/oconnor663/pure_python_blake3)).\n\n* A [set of test\n  vectors](https://github.com/BLAKE3-team/BLAKE3/blob/master/test_vectors/test_vectors.json)\n  that covers extended outputs, all three modes, and a variety of input\n  lengths.\n\n* [![Actions Status](https://github.com/BLAKE3-team/BLAKE3/workflows/tests/badge.svg)](https://github.com/BLAKE3-team/BLAKE3/actions)\n\nBLAKE3 was designed by:\n\n* [@oconnor663] (Jack O'Connor)\n* [@sneves] (Samuel Neves)\n* [@veorq] (Jean-Philippe Aumasson)\n* [@zookozcash] (Zooko)\n\nThe development of BLAKE3 was sponsored by [Electric Coin Company](https://electriccoin.co).\n\nBLAKE3 is also [specified](https://c2sp.org/BLAKE3) in the [Community\nCryptography Specification Project (C2SP)](https://c2sp.org).\n\n*NOTE: BLAKE3 is not a password hashing algorithm, because it's\ndesigned to be fast, whereas password hashing should not be fast. If you\nhash passwords to store the hashes or if you derive keys from passwords,\nwe recommend [Argon2](https://github.com/P-H-C/phc-winner-argon2).*\n\n## Usage\n\n### The `b3sum` utility\n\nThe `b3sum` command line utility prints the BLAKE3 hashes of files or of\nstandard input. Prebuilt binaries are available for Linux, Windows, and\nmacOS (requiring the [unidentified developer\nworkaround](https://support.apple.com/guide/mac-help/open-a-mac-app-from-an-unidentified-developer-mh40616/mac))\non the [releases page](https://github.com/BLAKE3-team/BLAKE3/releases).\nIf you've [installed Rust and\nCargo](https://doc.rust-lang.org/cargo/getting-started/installation.html),\nyou can also build `b3sum` yourself with:\n\n```bash\ncargo install b3sum\n```\n\nIf `rustup` didn't configure your `PATH` for you, you might need to go\nlooking for the installed binary in e.g. `~/.cargo/bin`. You can test\nout how fast BLAKE3 is on your machine by creating a big file and\nhashing it, for example:\n\n```bash\n# Create a 1 GB file.\nhead -c 1000000000 /dev/zero > /tmp/bigfile\n# Hash it with SHA-256.\ntime openssl sha256 /tmp/bigfile\n# Hash it with BLAKE3.\ntime b3sum /tmp/bigfile\n```\n\n### The `blake3` crate [![docs.rs](https://docs.rs/blake3/badge.svg)](https://docs.rs/blake3)\n\nTo use BLAKE3 from Rust code, add a dependency on the `blake3` crate to\nyour `Cargo.toml`. Here's an example of hashing some input bytes:\n\n```rust\n// Hash an input all at once.\nlet hash1 = blake3::hash(b\"foobarbaz\");\n\n// Hash an input incrementally.\nlet mut hasher = blake3::Hasher::new();\nhasher.update(b\"foo\");\nhasher.update(b\"bar\");\nhasher.update(b\"baz\");\nlet hash2 = hasher.finalize();\nassert_eq!(hash1, hash2);\n\n// Extended output. OutputReader also implements Read and Seek.\nlet mut output = [0; 1000];\nlet mut output_reader = hasher.finalize_xof();\noutput_reader.fill(&mut output);\nassert_eq!(hash1, output[..32]);\n\n// Print a hash as hex.\nprintln!(\"{}\", hash1);\n```\n\nBesides `hash`, BLAKE3 provides two other modes, `keyed_hash` and\n`derive_key`. The `keyed_hash` mode takes a 256-bit key:\n\n```rust\n// MAC an input all at once.\nlet example_key = [42u8; 32];\nlet mac1 = blake3::keyed_hash(&example_key, b\"example input\");\n\n// MAC incrementally.\nlet mut hasher = blake3::Hasher::new_keyed(&example_key);\nhasher.update(b\"example input\");\nlet mac2 = hasher.finalize();\nassert_eq!(mac1, mac2);\n```\n\nThe `derive_key` mode takes a context string and some key material (not a\npassword). The context string should be hardcoded, globally unique, and\napplication-specific. A good default format for the context string is\n`\"[application] [commit timestamp] [purpose]\"`:\n\n```rust\n// Derive a couple of subkeys for different purposes.\nconst EMAIL_CONTEXT: &str = \"BLAKE3 example 2020-01-07 17:10:44 email key\";\nconst API_CONTEXT: &str = \"BLAKE3 example 2020-01-07 17:11:21 API key\";\nlet input_key_material = b\"usually at least 32 random bytes, not a password\";\nlet email_key = blake3::derive_key(EMAIL_CONTEXT, input_key_material);\nlet api_key = blake3::derive_key(API_CONTEXT, input_key_material);\nassert_ne!(email_key, api_key);\n```\n\n### The C implementation\n\nSee [`c/README.md`](c/README.md).\n\n### Other implementations\n\nWe post links to third-party bindings and implementations on the\n[@BLAKE3team Twitter account](https://twitter.com/BLAKE3team) whenever\nwe hear about them. Some highlights include [an optimized Go\nimplementation](https://github.com/zeebo/blake3), [Wasm bindings for\nNode.js and browsers](https://github.com/connor4312/blake3), [binary\nwheels for Python](https://github.com/oconnor663/blake3-py), [.NET\nbindings](https://github.com/xoofx/Blake3.NET), and [JNI\nbindings](https://github.com/sken77/BLAKE3jni).\n\n## Contributing\n\nPlease see [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Licenses\n\nThis work is released into the public domain with [CC0 1.0](./LICENSE_CC0).\nAlternatively, it is licensed under any of the following:\n\n* [Apache 2.0](./LICENSE_A2)\n* [Apache 2.0 with LLVM exceptions](./LICENSE_A2LLVM)\n\n\n## Adoption & deployment\n\n* [Bazel](https://github.com/bazelbuild/bazel/releases/tag/6.4.0)\n* [Cargo](https://github.com/rust-lang/cargo/pull/14137)\n* [Ccache](https://github.com/ccache/ccache/pull/519)\n* [Chia](https://github.com/Chia-Network/chia-blockchain/blob/main/CHANGELOG.md#10beta8-aka-beta-18---2020-07-16)\n* [Clickhouse](https://github.com/ClickHouse/ClickHouse/blob/master/rust/chcache/Cargo.toml#L7)\n* [Farcaster](https://www.farcaster.xyz/)\n* [IPFS](https://github.com/ipfs/go-verifcid/issues/13)\n* [Iroh](https://www.iroh.computer/blog/blake3-hazmat-api)\n* [LLVM](https://reviews.llvm.org/D121510)\n* [Nix](https://github.com/NixOS/nix/pull/12379)\n* [Nym](https://github.com/nymtech/nym/blob/59056a22c5e6b01a38da2124662bd1fa3c8abef2/common/nymsphinx/params/src/lib.rs#L5)\n* [OpenZFS](https://github.com/openzfs/zfs/)\n* [Redox](https://www.redox-os.org/news/pkgar-introduction/)\n* [Solana](https://docs.rs/solana-program/1.9.5/solana_program/blake3/index.html)\n* [Tekken 8](https://x.com/rodarmor/status/1751567502050771189)\n* [Wasmer](https://github.com/wasmerio/wasmer/blob/4f935a8c162bf604df223003e434e4f7ca253688/lib/cache/src/hash.rs#L21)\n\n\n## Miscellany\n\n- [@veorq] and [@oconnor663] did [an interview with Cryptography FM](https://www.cryptography.fm/3).\n- [@oconnor663] did [an interview with Saito](https://www.youtube.com/watch?v=cJkmIt7yN_E).\n\n[@oconnor663]: https://github.com/oconnor663\n[@sneves]: https://github.com/sneves\n[@veorq]: https://github.com/veorq\n[@zookozcash]: https://github.com/zookozcash\n"
  },
  {
    "path": "third-party/blake3/b3sum/.gitignore",
    "content": "!Cargo.lock\n"
  },
  {
    "path": "third-party/blake3/b3sum/Cargo.lock",
    "content": "# This file is automatically @generated by Cargo.\n# It is not intended for manual editing.\nversion = 4\n\n[[package]]\nname = \"anstream\"\nversion = \"0.6.18\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b\"\ndependencies = [\n \"anstyle\",\n \"anstyle-parse\",\n \"anstyle-query\",\n \"anstyle-wincon\",\n \"colorchoice\",\n \"is_terminal_polyfill\",\n \"utf8parse\",\n]\n\n[[package]]\nname = \"anstyle\"\nversion = \"1.0.10\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9\"\n\n[[package]]\nname = \"anstyle-parse\"\nversion = \"0.2.6\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9\"\ndependencies = [\n \"utf8parse\",\n]\n\n[[package]]\nname = \"anstyle-query\"\nversion = \"1.1.2\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c\"\ndependencies = [\n \"windows-sys\",\n]\n\n[[package]]\nname = \"anstyle-wincon\"\nversion = \"3.0.7\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e\"\ndependencies = [\n \"anstyle\",\n \"once_cell\",\n \"windows-sys\",\n]\n\n[[package]]\nname = \"anyhow\"\nversion = \"1.0.98\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487\"\n\n[[package]]\nname = \"arrayref\"\nversion = \"0.3.9\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb\"\n\n[[package]]\nname = \"arrayvec\"\nversion = \"0.7.6\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50\"\n\n[[package]]\nname = \"b3sum\"\nversion = \"1.8.2\"\ndependencies = [\n \"anyhow\",\n \"blake3\",\n \"clap\",\n \"duct\",\n \"hex\",\n \"rayon-core\",\n \"tempfile\",\n \"wild\",\n]\n\n[[package]]\nname = \"bitflags\"\nversion = \"2.9.0\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd\"\n\n[[package]]\nname = \"blake3\"\nversion = \"1.8.2\"\ndependencies = [\n \"arrayref\",\n \"arrayvec\",\n \"cc\",\n \"cfg-if\",\n \"constant_time_eq\",\n \"memmap2\",\n \"rayon-core\",\n]\n\n[[package]]\nname = \"cc\"\nversion = \"1.2.19\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"8e3a13707ac958681c13b39b458c073d0d9bc8a22cb1b2f4c8e55eb72c13f362\"\ndependencies = [\n \"shlex\",\n]\n\n[[package]]\nname = \"cfg-if\"\nversion = \"1.0.0\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd\"\n\n[[package]]\nname = \"clap\"\nversion = \"4.5.37\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071\"\ndependencies = [\n \"clap_builder\",\n \"clap_derive\",\n]\n\n[[package]]\nname = \"clap_builder\"\nversion = \"4.5.37\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2\"\ndependencies = [\n \"anstream\",\n \"anstyle\",\n \"clap_lex\",\n \"strsim\",\n \"terminal_size\",\n]\n\n[[package]]\nname = \"clap_derive\"\nversion = \"4.5.32\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7\"\ndependencies = [\n \"heck\",\n \"proc-macro2\",\n \"quote\",\n \"syn\",\n]\n\n[[package]]\nname = \"clap_lex\"\nversion = \"0.7.4\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6\"\n\n[[package]]\nname = \"colorchoice\"\nversion = \"1.0.3\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990\"\n\n[[package]]\nname = \"constant_time_eq\"\nversion = \"0.3.1\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6\"\n\n[[package]]\nname = \"crossbeam-deque\"\nversion = \"0.8.6\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51\"\ndependencies = [\n \"crossbeam-epoch\",\n \"crossbeam-utils\",\n]\n\n[[package]]\nname = \"crossbeam-epoch\"\nversion = \"0.9.18\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e\"\ndependencies = [\n \"crossbeam-utils\",\n]\n\n[[package]]\nname = \"crossbeam-utils\"\nversion = \"0.8.21\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28\"\n\n[[package]]\nname = \"duct\"\nversion = \"0.13.7\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"e4ab5718d1224b63252cd0c6f74f6480f9ffeb117438a2e0f5cf6d9a4798929c\"\ndependencies = [\n \"libc\",\n \"once_cell\",\n \"os_pipe\",\n \"shared_child\",\n]\n\n[[package]]\nname = \"errno\"\nversion = \"0.3.11\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e\"\ndependencies = [\n \"libc\",\n \"windows-sys\",\n]\n\n[[package]]\nname = \"fastrand\"\nversion = \"2.3.0\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be\"\n\n[[package]]\nname = \"getrandom\"\nversion = \"0.3.2\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0\"\ndependencies = [\n \"cfg-if\",\n \"libc\",\n \"r-efi\",\n \"wasi\",\n]\n\n[[package]]\nname = \"glob\"\nversion = \"0.3.2\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2\"\n\n[[package]]\nname = \"heck\"\nversion = \"0.5.0\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea\"\n\n[[package]]\nname = \"hex\"\nversion = \"0.4.3\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70\"\n\n[[package]]\nname = \"is_terminal_polyfill\"\nversion = \"1.70.1\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf\"\n\n[[package]]\nname = \"libc\"\nversion = \"0.2.172\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa\"\n\n[[package]]\nname = \"linux-raw-sys\"\nversion = \"0.9.4\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12\"\n\n[[package]]\nname = \"memmap2\"\nversion = \"0.9.5\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f\"\ndependencies = [\n \"libc\",\n]\n\n[[package]]\nname = \"once_cell\"\nversion = \"1.21.3\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d\"\n\n[[package]]\nname = \"os_pipe\"\nversion = \"1.2.1\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"5ffd2b0a5634335b135d5728d84c5e0fd726954b87111f7506a61c502280d982\"\ndependencies = [\n \"libc\",\n \"windows-sys\",\n]\n\n[[package]]\nname = \"proc-macro2\"\nversion = \"1.0.95\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778\"\ndependencies = [\n \"unicode-ident\",\n]\n\n[[package]]\nname = \"quote\"\nversion = \"1.0.40\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d\"\ndependencies = [\n \"proc-macro2\",\n]\n\n[[package]]\nname = \"r-efi\"\nversion = \"5.2.0\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5\"\n\n[[package]]\nname = \"rayon-core\"\nversion = \"1.12.1\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2\"\ndependencies = [\n \"crossbeam-deque\",\n \"crossbeam-utils\",\n]\n\n[[package]]\nname = \"rustix\"\nversion = \"1.0.5\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf\"\ndependencies = [\n \"bitflags\",\n \"errno\",\n \"libc\",\n \"linux-raw-sys\",\n \"windows-sys\",\n]\n\n[[package]]\nname = \"shared_child\"\nversion = \"1.0.1\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"09fa9338aed9a1df411814a5b2252f7cd206c55ae9bf2fa763f8de84603aa60c\"\ndependencies = [\n \"libc\",\n \"windows-sys\",\n]\n\n[[package]]\nname = \"shlex\"\nversion = \"1.3.0\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64\"\n\n[[package]]\nname = \"strsim\"\nversion = \"0.11.1\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f\"\n\n[[package]]\nname = \"syn\"\nversion = \"2.0.100\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0\"\ndependencies = [\n \"proc-macro2\",\n \"quote\",\n \"unicode-ident\",\n]\n\n[[package]]\nname = \"tempfile\"\nversion = \"3.19.1\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf\"\ndependencies = [\n \"fastrand\",\n \"getrandom\",\n \"once_cell\",\n \"rustix\",\n \"windows-sys\",\n]\n\n[[package]]\nname = \"terminal_size\"\nversion = \"0.4.2\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"45c6481c4829e4cc63825e62c49186a34538b7b2750b73b266581ffb612fb5ed\"\ndependencies = [\n \"rustix\",\n \"windows-sys\",\n]\n\n[[package]]\nname = \"unicode-ident\"\nversion = \"1.0.18\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512\"\n\n[[package]]\nname = \"utf8parse\"\nversion = \"0.2.2\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821\"\n\n[[package]]\nname = \"wasi\"\nversion = \"0.14.2+wasi-0.2.4\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3\"\ndependencies = [\n \"wit-bindgen-rt\",\n]\n\n[[package]]\nname = \"wild\"\nversion = \"2.2.1\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"a3131afc8c575281e1e80f36ed6a092aa502c08b18ed7524e86fbbb12bb410e1\"\ndependencies = [\n \"glob\",\n]\n\n[[package]]\nname = \"windows-sys\"\nversion = \"0.59.0\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b\"\ndependencies = [\n \"windows-targets\",\n]\n\n[[package]]\nname = \"windows-targets\"\nversion = \"0.52.6\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973\"\ndependencies = [\n \"windows_aarch64_gnullvm\",\n \"windows_aarch64_msvc\",\n \"windows_i686_gnu\",\n \"windows_i686_gnullvm\",\n \"windows_i686_msvc\",\n \"windows_x86_64_gnu\",\n \"windows_x86_64_gnullvm\",\n \"windows_x86_64_msvc\",\n]\n\n[[package]]\nname = \"windows_aarch64_gnullvm\"\nversion = \"0.52.6\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3\"\n\n[[package]]\nname = \"windows_aarch64_msvc\"\nversion = \"0.52.6\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469\"\n\n[[package]]\nname = \"windows_i686_gnu\"\nversion = \"0.52.6\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b\"\n\n[[package]]\nname = \"windows_i686_gnullvm\"\nversion = \"0.52.6\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66\"\n\n[[package]]\nname = \"windows_i686_msvc\"\nversion = \"0.52.6\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66\"\n\n[[package]]\nname = \"windows_x86_64_gnu\"\nversion = \"0.52.6\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78\"\n\n[[package]]\nname = \"windows_x86_64_gnullvm\"\nversion = \"0.52.6\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d\"\n\n[[package]]\nname = \"windows_x86_64_msvc\"\nversion = \"0.52.6\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec\"\n\n[[package]]\nname = \"wit-bindgen-rt\"\nversion = \"0.39.0\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1\"\ndependencies = [\n \"bitflags\",\n]\n"
  },
  {
    "path": "third-party/blake3/b3sum/Cargo.toml",
    "content": "[package]\nname = \"b3sum\"\nversion = \"1.8.2\"\nauthors = [\"Jack O'Connor <oconnor663@gmail.com>\"]\ndescription = \"a command line implementation of the BLAKE3 hash function\"\nrepository = \"https://github.com/BLAKE3-team/BLAKE3\"\nlicense = \"CC0-1.0 OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception\"\nreadme = \"README.md\"\nedition = \"2021\"\n\n[features]\nneon = [\"blake3/neon\"]\nprefer_intrinsics = [\"blake3/prefer_intrinsics\"]\npure = [\"blake3/pure\"]\n\n[dependencies]\nanyhow = \"1.0.25\"\nblake3 = { version = \"1.8\", path = \"..\", features = [\"mmap\", \"rayon\"] }\nclap = { version = \"4.0.8\", features = [\"derive\", \"wrap_help\"] }\nhex = \"0.4.0\"\nrayon-core = \"1.12.1\"\nwild = \"2.0.3\"\n\n[dev-dependencies]\nduct = \"0.13.3\"\ntempfile = \"3.1.0\"\n"
  },
  {
    "path": "third-party/blake3/b3sum/README.md",
    "content": "# b3sum\n\nA command line utility for calculating\n[BLAKE3](https://github.com/BLAKE3-team/BLAKE3) hashes, similar to\nCoreutils tools like `b2sum` or `md5sum`.\n\n```\nUsage: b3sum [OPTIONS] [FILE]...\n\nArguments:\n  [FILE]...  Files to hash, or checkfiles to check\n\nOptions:\n      --keyed                 Use the keyed mode, reading the 32-byte key from stdin\n      --derive-key <CONTEXT>  Use the key derivation mode, with the given context string\n  -l, --length <LEN>          The number of output bytes, before hex encoding [default: 32]\n      --seek <SEEK>           The starting output byte offset, before hex encoding [default: 0]\n      --num-threads <NUM>     The maximum number of threads to use\n      --no-mmap               Disable memory mapping\n      --no-names              Omit filenames in the output\n      --raw                   Write raw output bytes to stdout, rather than hex\n      --tag                   Output BSD-style checksums: BLAKE3 ([FILE]) = [HASH]\n  -c, --check                 Read BLAKE3 sums from the [FILE]s and check them\n      --quiet                 Skip printing OK for each checked file\n  -h, --help                  Print help (see more with '--help')\n  -V, --version               Print version\n```\n\nSee also [this document about how the `--check` flag\nworks](https://github.com/BLAKE3-team/BLAKE3/blob/master/b3sum/what_does_check_do.md).\n\n# Example\n\nHash the file `foo.txt`:\n\n```bash\nb3sum foo.txt\n```\n\nTime hashing a gigabyte of data, to see how fast it is:\n\n```bash\n# Create a 1 GB file.\nhead -c 1000000000 /dev/zero > /tmp/bigfile\n# Hash it with SHA-256.\ntime openssl sha256 /tmp/bigfile\n# Hash it with BLAKE3.\ntime b3sum /tmp/bigfile\n```\n\n\n# Installation\n\nPrebuilt binaries are available for Linux, Windows, and macOS (requiring\nthe [unidentified developer\nworkaround](https://support.apple.com/guide/mac-help/open-a-mac-app-from-an-unidentified-developer-mh40616/mac))\non the [releases page](https://github.com/BLAKE3-team/BLAKE3/releases).\nIf you've [installed Rust and\nCargo](https://doc.rust-lang.org/cargo/getting-started/installation.html),\nyou can also build `b3sum` yourself with:\n\n```\ncargo install b3sum\n```\n\nOn Linux for example, Cargo will put the compiled binary in\n`~/.cargo/bin`. You might want to add that directory to your `$PATH`, or\n`rustup` might have done it for you when you installed Cargo.\n\nIf you want to install directly from this directory, you can run `cargo\ninstall --path .`. Or you can just build with `cargo build --release`,\nwhich puts the binary at `./target/release/b3sum`.\n"
  },
  {
    "path": "third-party/blake3/b3sum/src/main.rs",
    "content": "use anyhow::{bail, ensure};\nuse clap::Parser;\nuse std::cmp;\nuse std::fs::File;\nuse std::io;\nuse std::io::prelude::*;\nuse std::path::{Path, PathBuf};\n\n#[cfg(test)]\nmod unit_tests;\n\nconst NAME: &str = \"b3sum\";\n\nconst DERIVE_KEY_ARG: &str = \"derive_key\";\nconst KEYED_ARG: &str = \"keyed\";\nconst LENGTH_ARG: &str = \"length\";\nconst NO_NAMES_ARG: &str = \"no_names\";\nconst RAW_ARG: &str = \"raw\";\nconst TAG_ARG: &str = \"tag\";\nconst CHECK_ARG: &str = \"check\";\n\n#[derive(Parser)]\n#[command(version, max_term_width(100))]\nstruct Inner {\n    /// Files to hash, or checkfiles to check\n    ///\n    /// When no file is given, or when - is given, read standard input.\n    file: Vec<PathBuf>,\n\n    /// Use the keyed mode, reading the 32-byte key from stdin\n    #[arg(long, requires(\"file\"))]\n    keyed: bool,\n\n    /// Use the key derivation mode, with the given context string\n    ///\n    /// Cannot be used with --keyed.\n    #[arg(long, value_name(\"CONTEXT\"), conflicts_with(KEYED_ARG))]\n    derive_key: Option<String>,\n\n    /// The number of output bytes, before hex encoding\n    #[arg(\n        short,\n        long,\n        default_value_t = blake3::OUT_LEN as u64,\n        value_name(\"LEN\")\n    )]\n    length: u64,\n\n    /// The starting output byte offset, before hex encoding\n    #[arg(long, default_value_t = 0, value_name(\"SEEK\"))]\n    seek: u64,\n\n    /// The maximum number of threads to use\n    ///\n    /// By default, this is the number of logical cores. If this flag is\n    /// omitted, or if its value is 0, RAYON_NUM_THREADS is also respected.\n    #[arg(long, value_name(\"NUM\"))]\n    num_threads: Option<usize>,\n\n    /// Disable memory mapping\n    ///\n    /// Currently this also disables multithreading.\n    #[arg(long)]\n    no_mmap: bool,\n\n    /// Omit filenames in the output\n    #[arg(long)]\n    no_names: bool,\n\n    /// Write raw output bytes to stdout, rather than hex\n    ///\n    /// --no-names is implied. In this case, only a single input is allowed.\n    #[arg(long)]\n    raw: bool,\n\n    /// Output BSD-style checksums: BLAKE3 ([FILE]) = [HASH]\n    #[arg(long)]\n    tag: bool,\n\n    /// Read BLAKE3 sums from the [FILE]s and check them\n    #[arg(\n        short,\n        long,\n        conflicts_with(DERIVE_KEY_ARG),\n        conflicts_with(KEYED_ARG),\n        conflicts_with(LENGTH_ARG),\n        conflicts_with(RAW_ARG),\n        conflicts_with(TAG_ARG),\n        conflicts_with(NO_NAMES_ARG)\n    )]\n    check: bool,\n\n    /// Skip printing OK for each checked file\n    ///\n    /// Must be used with --check.\n    #[arg(long, requires(CHECK_ARG))]\n    quiet: bool,\n}\n\nstruct Args {\n    inner: Inner,\n    file_args: Vec<PathBuf>,\n    base_hasher: blake3::Hasher,\n}\n\nimpl Args {\n    fn parse() -> anyhow::Result<Self> {\n        // wild::args_os() is equivalent to std::env::args_os() on Unix,\n        // but on Windows it adds support for globbing.\n        let inner = Inner::parse_from(wild::args_os());\n        let file_args = if !inner.file.is_empty() {\n            inner.file.clone()\n        } else {\n            vec![\"-\".into()]\n        };\n        if inner.raw && file_args.len() > 1 {\n            bail!(\"Only one filename can be provided when using --raw\");\n        }\n        let base_hasher = if inner.keyed {\n            // In keyed mode, since stdin is used for the key, we can't handle\n            // `-` arguments. Input::open handles that case below.\n            blake3::Hasher::new_keyed(&read_key_from_stdin()?)\n        } else if let Some(ref context) = inner.derive_key {\n            blake3::Hasher::new_derive_key(context)\n        } else {\n            blake3::Hasher::new()\n        };\n        Ok(Self {\n            inner,\n            file_args,\n            base_hasher,\n        })\n    }\n\n    fn num_threads(&self) -> Option<usize> {\n        self.inner.num_threads\n    }\n\n    fn check(&self) -> bool {\n        self.inner.check\n    }\n\n    fn raw(&self) -> bool {\n        self.inner.raw\n    }\n\n    fn tag(&self) -> bool {\n        self.inner.tag\n    }\n\n    fn no_mmap(&self) -> bool {\n        self.inner.no_mmap\n    }\n\n    fn no_names(&self) -> bool {\n        self.inner.no_names\n    }\n\n    fn len(&self) -> u64 {\n        self.inner.length\n    }\n\n    fn seek(&self) -> u64 {\n        self.inner.seek\n    }\n\n    fn keyed(&self) -> bool {\n        self.inner.keyed\n    }\n\n    fn quiet(&self) -> bool {\n        self.inner.quiet\n    }\n}\n\nfn hash_path(args: &Args, path: &Path) -> anyhow::Result<blake3::OutputReader> {\n    let mut hasher = args.base_hasher.clone();\n    if path == Path::new(\"-\") {\n        if args.keyed() {\n            bail!(\"Cannot open `-` in keyed mode\");\n        }\n        hasher.update_reader(io::stdin().lock())?;\n    } else if args.no_mmap() {\n        hasher.update_reader(File::open(path)?)?;\n    } else {\n        // The fast path: Try to mmap the file and hash it with multiple threads.\n        hasher.update_mmap_rayon(path)?;\n    }\n    let mut output_reader = hasher.finalize_xof();\n    output_reader.set_position(args.seek());\n    Ok(output_reader)\n}\n\nfn write_hex_output(mut output: blake3::OutputReader, args: &Args) -> anyhow::Result<()> {\n    // Encoding multiples of the 64 bytes is most efficient.\n    // TODO: This computes each output block twice when the --seek argument isn't a multiple of 64.\n    // We'll refactor all of this soon anyway, once SIMD optimizations are available for the XOF.\n    let mut len = args.len();\n    let mut block = [0; blake3::BLOCK_LEN];\n    while len > 0 {\n        output.fill(&mut block);\n        let hex_str = hex::encode(&block[..]);\n        let take_bytes = cmp::min(len, block.len() as u64);\n        print!(\"{}\", &hex_str[..2 * take_bytes as usize]);\n        len -= take_bytes;\n    }\n    Ok(())\n}\n\nfn write_raw_output(output: blake3::OutputReader, args: &Args) -> anyhow::Result<()> {\n    let mut output = output.take(args.len());\n    let stdout = std::io::stdout();\n    let mut handler = stdout.lock();\n    std::io::copy(&mut output, &mut handler)?;\n\n    Ok(())\n}\n\nfn read_key_from_stdin() -> anyhow::Result<[u8; blake3::KEY_LEN]> {\n    let mut bytes = Vec::with_capacity(blake3::KEY_LEN + 1);\n    let n = std::io::stdin()\n        .lock()\n        .take(blake3::KEY_LEN as u64 + 1)\n        .read_to_end(&mut bytes)?;\n    if n < blake3::KEY_LEN {\n        bail!(\n            \"expected {} key bytes from stdin, found {}\",\n            blake3::KEY_LEN,\n            n,\n        )\n    } else if n > blake3::KEY_LEN {\n        bail!(\"read more than {} key bytes from stdin\", blake3::KEY_LEN)\n    } else {\n        Ok(bytes[..blake3::KEY_LEN].try_into().unwrap())\n    }\n}\n\nstruct FilepathString {\n    filepath_string: String,\n    is_escaped: bool,\n}\n\n// returns (string, did_escape)\nfn filepath_to_string(filepath: &Path) -> FilepathString {\n    let unicode_cow = filepath.to_string_lossy();\n    let mut filepath_string = unicode_cow.to_string();\n    // If we're on Windows, normalize backslashes to forward slashes. This\n    // avoids a lot of ugly escaping in the common case, and it makes\n    // checkfiles created on Windows more likely to be portable to Unix. It\n    // also allows us to set a blanket \"no backslashes allowed in checkfiles on\n    // Windows\" rule, rather than allowing a Unix backslash to potentially get\n    // interpreted as a directory separator on Windows.\n    if cfg!(windows) {\n        filepath_string = filepath_string.replace('\\\\', \"/\");\n    }\n    let mut is_escaped = false;\n    if filepath_string.contains(['\\\\', '\\n', '\\r']) {\n        filepath_string = filepath_string\n            .replace('\\\\', \"\\\\\\\\\")\n            .replace('\\n', \"\\\\n\")\n            .replace('\\r', \"\\\\r\");\n        is_escaped = true;\n    }\n    FilepathString {\n        filepath_string,\n        is_escaped,\n    }\n}\n\nfn hex_half_byte(c: char) -> anyhow::Result<u8> {\n    // The hex characters in the hash must be lowercase for now, though we\n    // could support uppercase too if we wanted to.\n    if '0' <= c && c <= '9' {\n        return Ok(c as u8 - '0' as u8);\n    }\n    if 'a' <= c && c <= 'f' {\n        return Ok(c as u8 - 'a' as u8 + 10);\n    }\n    bail!(\"Invalid hex\");\n}\n\n// The `check` command is a security tool. That means it's much better for a\n// check to fail more often than it should (a false negative), than for a check\n// to ever succeed when it shouldn't (a false positive). By forbidding certain\n// characters in checked filepaths, we avoid a class of false positives where\n// two different filepaths can get confused with each other.\nfn check_for_invalid_characters(utf8_path: &str) -> anyhow::Result<()> {\n    // Null characters in paths should never happen, but they can result in a\n    // path getting silently truncated on Unix.\n    if utf8_path.contains('\\0') {\n        bail!(\"Null character in path\");\n    }\n    // Because we convert invalid UTF-8 sequences in paths to the Unicode\n    // replacement character, multiple different invalid paths can map to the\n    // same UTF-8 string.\n    if utf8_path.contains('�') {\n        bail!(\"Unicode replacement character in path\");\n    }\n    // We normalize all Windows backslashes to forward slashes in our output,\n    // so the only natural way to get a backslash in a checkfile on Windows is\n    // to construct it on Unix and copy it over. (Or of course you could just\n    // doctor it by hand.) To avoid confusing this with a directory separator,\n    // we forbid backslashes entirely on Windows. Note that this check comes\n    // after unescaping has been done.\n    if cfg!(windows) && utf8_path.contains('\\\\') {\n        bail!(\"Backslash in path\");\n    }\n    Ok(())\n}\n\nfn unescape(mut path: &str) -> anyhow::Result<String> {\n    let mut unescaped = String::with_capacity(2 * path.len());\n    while let Some(i) = path.find('\\\\') {\n        ensure!(i < path.len() - 1, \"Invalid backslash escape\");\n        unescaped.push_str(&path[..i]);\n        match path[i + 1..].chars().next().unwrap() {\n            // Anything other than a recognized escape sequence is an error.\n            'n' => unescaped.push_str(\"\\n\"),\n            'r' => unescaped.push_str(\"\\r\"),\n            '\\\\' => unescaped.push_str(\"\\\\\"),\n            _ => bail!(\"Invalid backslash escape\"),\n        }\n        path = &path[i + 2..];\n    }\n    unescaped.push_str(path);\n    Ok(unescaped)\n}\n\n#[derive(Debug)]\nstruct ParsedCheckLine {\n    file_string: String,\n    is_escaped: bool,\n    file_path: PathBuf,\n    expected_hash: blake3::Hash,\n}\n\nfn split_untagged_check_line(line_after_slash: &str) -> Option<(&str, &str)> {\n    // Of the form \"<hash>  <file>\". The file might contain \"  \", so we need to split from the\n    // left.\n    line_after_slash.split_once(\"  \")\n}\n\nfn split_tagged_check_line(line_after_slash: &str) -> Option<(&str, &str)> {\n    // Of the form \"BLAKE3 (<file>) = <hash>\". The file might contain \") = \", so we need to split\n    // from the *right*.\n    let prefix = \"BLAKE3 (\";\n    if !line_after_slash.starts_with(prefix) {\n        return None;\n    }\n    line_after_slash[prefix.len()..].rsplit_once(\") = \")\n}\n\nfn parse_check_line(mut line: &str) -> anyhow::Result<ParsedCheckLine> {\n    // Trim off the trailing newlines, if any.\n    line = line.trim_end_matches(['\\r', '\\n']);\n    // If there's a backslash at the front of the line, that means we need to\n    // unescape the path below. This matches the behavior of e.g. md5sum.\n    let Some(first) = line.chars().next() else {\n        bail!(\"Empty line\");\n    };\n    let line_after_slash;\n    let is_escaped;\n    if first == '\\\\' {\n        is_escaped = true;\n        line_after_slash = &line[1..];\n    } else {\n        is_escaped = false;\n        line_after_slash = line;\n    }\n\n    // Split the line. It might be \"<hash>  <file>\" or \"BLAKE3 (<file>) = <hash>\". The latter comes\n    // from the --tag flag.\n    let hash_hex;\n    let file_str;\n    if let Some((left, right)) = split_untagged_check_line(line_after_slash) {\n        hash_hex = left;\n        file_str = right;\n    } else if let Some((left, right)) = split_tagged_check_line(line_after_slash) {\n        file_str = left;\n        hash_hex = right;\n    } else {\n        bail!(\"Invalid check line format\");\n    }\n\n    // Decode the hex hash.\n    ensure!(hash_hex.len() == 2 * blake3::OUT_LEN, \"Invalid hash length\");\n    let mut hex_chars = hash_hex.chars();\n    let mut hash_bytes = [0; blake3::OUT_LEN];\n    for byte in &mut hash_bytes {\n        let high_char = hex_chars.next().unwrap();\n        let low_char = hex_chars.next().unwrap();\n        *byte = 16 * hex_half_byte(high_char)? + hex_half_byte(low_char)?;\n    }\n    let expected_hash: blake3::Hash = hash_bytes.into();\n\n    // Unescape and validate the filepath.\n    let file_path_string = if is_escaped {\n        unescape(file_str)?\n    } else {\n        file_str.to_string()\n    };\n    ensure!(!file_path_string.is_empty(), \"empty file path\");\n    check_for_invalid_characters(&file_path_string)?;\n\n    Ok(ParsedCheckLine {\n        file_string: file_str.to_string(),\n        is_escaped,\n        file_path: file_path_string.into(),\n        expected_hash,\n    })\n}\n\nfn hash_one_input(path: &Path, args: &Args) -> anyhow::Result<()> {\n    let output = hash_path(args, path)?;\n    if args.raw() {\n        write_raw_output(output, args)?;\n        return Ok(());\n    }\n    if args.no_names() {\n        write_hex_output(output, args)?;\n        println!();\n        return Ok(());\n    }\n    let FilepathString {\n        filepath_string,\n        is_escaped,\n    } = filepath_to_string(path);\n    if is_escaped {\n        print!(\"\\\\\");\n    }\n    if args.tag() {\n        print!(\"BLAKE3 ({}) = \", filepath_string);\n        write_hex_output(output, args)?;\n        println!();\n        return Ok(());\n    }\n    write_hex_output(output, args)?;\n    println!(\"  {}\", filepath_string);\n    Ok(())\n}\n\n// Returns true for success. Having a boolean return value here, instead of\n// passing down the files_failed reference, makes it less likely that we might\n// forget to set it in some error condition.\nfn check_one_line(line: &str, args: &Args) -> bool {\n    let parse_result = parse_check_line(&line);\n    let ParsedCheckLine {\n        file_string,\n        is_escaped,\n        file_path,\n        expected_hash,\n    } = match parse_result {\n        Ok(parsed) => parsed,\n        Err(e) => {\n            eprintln!(\"{}: {}\", NAME, e);\n            return false;\n        }\n    };\n    let file_string = if is_escaped {\n        \"\\\\\".to_string() + &file_string\n    } else {\n        file_string\n    };\n    let found_hash: blake3::Hash;\n    match hash_path(args, &file_path) {\n        Ok(mut output) => {\n            let mut found_hash_bytes = [0; blake3::OUT_LEN];\n            output.fill(&mut found_hash_bytes);\n            found_hash = found_hash_bytes.into();\n        }\n        Err(e) => {\n            println!(\"{}: FAILED ({})\", file_string, e);\n            return false;\n        }\n    };\n    // This is a constant-time comparison.\n    if expected_hash == found_hash {\n        if !args.quiet() {\n            println!(\"{}: OK\", file_string);\n        }\n        true\n    } else {\n        println!(\"{}: FAILED\", file_string);\n        false\n    }\n}\n\nfn check_one_checkfile(path: &Path, args: &Args, files_failed: &mut u64) -> anyhow::Result<()> {\n    let mut file;\n    let stdin;\n    let mut stdin_lock;\n    let mut bufreader: io::BufReader<&mut dyn Read>;\n    if path == Path::new(\"-\") {\n        stdin = io::stdin();\n        stdin_lock = stdin.lock();\n        bufreader = io::BufReader::new(&mut stdin_lock);\n    } else {\n        file = File::open(path)?;\n        bufreader = io::BufReader::new(&mut file);\n    }\n    let mut line = String::new();\n    loop {\n        line.clear();\n        let n = bufreader.read_line(&mut line)?;\n        if n == 0 {\n            return Ok(());\n        }\n        // check_one_line() prints errors and turns them into a success=false\n        // return, so it doesn't return a Result.\n        let success = check_one_line(&line, args);\n        if !success {\n            // We use `files_failed > 0` to indicate a mismatch, so it's important for correctness\n            // that it's impossible for this counter to overflow.\n            *files_failed = files_failed.saturating_add(1);\n        }\n    }\n}\n\nfn main() -> anyhow::Result<()> {\n    let args = Args::parse()?;\n    let mut thread_pool_builder = rayon_core::ThreadPoolBuilder::new();\n    if let Some(num_threads) = args.num_threads() {\n        thread_pool_builder = thread_pool_builder.num_threads(num_threads);\n    }\n    let thread_pool = thread_pool_builder.build()?;\n    thread_pool.install(|| {\n        let mut files_failed = 0u64;\n        // Note that file_args automatically includes `-` if nothing is given.\n        for path in &args.file_args {\n            if args.check() {\n                check_one_checkfile(path, &args, &mut files_failed)?;\n            } else {\n                // Errors encountered in hashing are tolerated and printed to\n                // stderr. This allows e.g. `b3sum *` to print errors for\n                // non-files and keep going. However, if we encounter any\n                // errors we'll still return non-zero at the end.\n                let result = hash_one_input(path, &args);\n                if let Err(e) = result {\n                    files_failed = files_failed.saturating_add(1);\n                    eprintln!(\"{}: {}: {}\", NAME, path.to_string_lossy(), e);\n                }\n            }\n        }\n        if args.check() && files_failed > 0 {\n            eprintln!(\n                \"{}: WARNING: {} computed checksum{} did NOT match\",\n                NAME,\n                files_failed,\n                if files_failed == 1 { \"\" } else { \"s\" },\n            );\n        }\n        std::process::exit(if files_failed > 0 { 1 } else { 0 });\n    })\n}\n\n#[cfg(test)]\nmod test {\n    use clap::CommandFactory;\n\n    #[test]\n    fn test_args() {\n        crate::Inner::command().debug_assert();\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/b3sum/src/unit_tests.rs",
    "content": "use std::path::Path;\n\n#[test]\nfn test_parse_check_line() {\n    // =========================\n    // ===== Success Cases =====\n    // =========================\n\n    // the basic case\n    let crate::ParsedCheckLine {\n        file_string,\n        is_escaped,\n        file_path,\n        expected_hash,\n    } = crate::parse_check_line(\n        \"0909090909090909090909090909090909090909090909090909090909090909  foo\",\n    )\n    .unwrap();\n    assert_eq!(expected_hash, blake3::Hash::from([0x09; 32]));\n    assert!(!is_escaped);\n    assert_eq!(file_string, \"foo\");\n    assert_eq!(file_path, Path::new(\"foo\"));\n\n    // regular whitespace\n    let crate::ParsedCheckLine {\n        file_string,\n        is_escaped,\n        file_path,\n        expected_hash,\n    } = crate::parse_check_line(\n        \"fafafafafafafafafafafafafafafafafafafafafafafafafafafafafafafafa   \\t\\r\\n\\n\\r \\t\\r\\n\\n\\r\",\n    )\n    .unwrap();\n    assert_eq!(expected_hash, blake3::Hash::from([0xfa; 32]));\n    assert!(!is_escaped);\n    assert_eq!(file_string, \" \\t\\r\\n\\n\\r \\t\");\n    assert_eq!(file_path, Path::new(\" \\t\\r\\n\\n\\r \\t\"));\n\n    // path is one space\n    let crate::ParsedCheckLine {\n        file_string,\n        is_escaped,\n        file_path,\n        expected_hash,\n    } = crate::parse_check_line(\n        \"4242424242424242424242424242424242424242424242424242424242424242   \",\n    )\n    .unwrap();\n    assert_eq!(expected_hash, blake3::Hash::from([0x42; 32]));\n    assert!(!is_escaped);\n    assert_eq!(file_string, \" \");\n    assert_eq!(file_path, Path::new(\" \"));\n\n    // *Unescaped* backslashes. Note that this line does *not* start with a\n    // backslash, so something like \"\\\" + \"n\" is interpreted as *two*\n    // characters. We forbid all backslashes on Windows, so this test is\n    // Unix-only.\n    if cfg!(not(windows)) {\n        let crate::ParsedCheckLine {\n            file_string,\n            is_escaped,\n            file_path,\n            expected_hash,\n        } = crate::parse_check_line(\n            \"4343434343434343434343434343434343434343434343434343434343434343  fo\\\\a\\\\no\",\n        )\n        .unwrap();\n        assert_eq!(expected_hash, blake3::Hash::from([0x43; 32]));\n        assert!(!is_escaped);\n        assert_eq!(file_string, \"fo\\\\a\\\\no\");\n        assert_eq!(file_path, Path::new(\"fo\\\\a\\\\no\"));\n    }\n\n    // escaped newlines\n    let crate::ParsedCheckLine {\n        file_string,\n        is_escaped,\n        file_path,\n        expected_hash,\n    } = crate::parse_check_line(\n        \"\\\\4444444444444444444444444444444444444444444444444444444444444444  fo\\\\r\\\\n\\\\n\\\\ro\",\n    )\n    .unwrap();\n    assert_eq!(expected_hash, blake3::Hash::from([0x44; 32]));\n    assert!(is_escaped);\n    assert_eq!(file_string, \"fo\\\\r\\\\n\\\\n\\\\ro\");\n    assert_eq!(file_path, Path::new(\"fo\\r\\n\\n\\ro\"));\n\n    // Escaped newline and backslash. Again because backslash is not allowed on\n    // Windows, this test is Unix-only.\n    if cfg!(not(windows)) {\n        let crate::ParsedCheckLine {\n            file_string,\n            is_escaped,\n            file_path,\n            expected_hash,\n        } = crate::parse_check_line(\n            \"\\\\4545454545454545454545454545454545454545454545454545454545454545  fo\\\\n\\\\\\\\o\",\n        )\n        .unwrap();\n        assert_eq!(expected_hash, blake3::Hash::from([0x45; 32]));\n        assert!(is_escaped);\n        assert_eq!(file_string, \"fo\\\\n\\\\\\\\o\");\n        assert_eq!(file_path, Path::new(\"fo\\n\\\\o\"));\n    }\n\n    // non-ASCII path\n    let crate::ParsedCheckLine {\n        file_string,\n        is_escaped,\n        file_path,\n        expected_hash,\n    } = crate::parse_check_line(\n        \"4646464646464646464646464646464646464646464646464646464646464646  否认\",\n    )\n    .unwrap();\n    assert_eq!(expected_hash, blake3::Hash::from([0x46; 32]));\n    assert!(!is_escaped);\n    assert_eq!(file_string, \"否认\");\n    assert_eq!(file_path, Path::new(\"否认\"));\n\n    // untagged separator \"  \" in the file name\n    let crate::ParsedCheckLine {\n        file_string,\n        is_escaped,\n        file_path,\n        expected_hash,\n    } = crate::parse_check_line(\n        \"4747474747474747474747474747474747474747474747474747474747474747  foo  bar\",\n    )\n    .unwrap();\n    assert_eq!(expected_hash, blake3::Hash::from([0x47; 32]));\n    assert!(!is_escaped);\n    assert_eq!(file_string, \"foo  bar\");\n    assert_eq!(file_path, Path::new(\"foo  bar\"));\n\n    // tagged separator \") = \" in the file name\n    let crate::ParsedCheckLine {\n        file_string,\n        is_escaped,\n        file_path,\n        expected_hash,\n    } = crate::parse_check_line(\n        \"BLAKE3 (foo) = bar) = 4848484848484848484848484848484848484848484848484848484848484848\",\n    )\n    .unwrap();\n    assert_eq!(expected_hash, blake3::Hash::from([0x48; 32]));\n    assert!(!is_escaped);\n    assert_eq!(file_string, \"foo) = bar\");\n    assert_eq!(file_path, Path::new(\"foo) = bar\"));\n\n    // =========================\n    // ===== Failure Cases =====\n    // =========================\n\n    // too short\n    crate::parse_check_line(\"\").unwrap_err();\n    crate::parse_check_line(\"0\").unwrap_err();\n    crate::parse_check_line(\"00\").unwrap_err();\n    crate::parse_check_line(\"0000000000000000000000000000000000000000000000000000000000000000\")\n        .unwrap_err();\n    crate::parse_check_line(\"0000000000000000000000000000000000000000000000000000000000000000  \")\n        .unwrap_err();\n\n    // not enough spaces\n    crate::parse_check_line(\"0000000000000000000000000000000000000000000000000000000000000000 foo\")\n        .unwrap_err();\n\n    // capital letter hex\n    crate::parse_check_line(\n        \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA  foo\",\n    )\n    .unwrap_err();\n\n    // non-hex hex\n    crate::parse_check_line(\n        \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  foo\",\n    )\n    .unwrap_err();\n\n    // non-ASCII hex\n    crate::parse_check_line(\"你好, 我叫杰克. 认识你很高兴. 要不要吃个香蕉?  foo\").unwrap_err();\n\n    // invalid escape sequence\n    crate::parse_check_line(\n        \"\\\\0000000000000000000000000000000000000000000000000000000000000000  fo\\\\o\",\n    )\n    .unwrap_err();\n\n    // truncated escape sequence\n    crate::parse_check_line(\n        \"\\\\0000000000000000000000000000000000000000000000000000000000000000  foo\\\\\",\n    )\n    .unwrap_err();\n\n    // null char\n    crate::parse_check_line(\n        \"0000000000000000000000000000000000000000000000000000000000000000  fo\\0o\",\n    )\n    .unwrap_err();\n\n    // Unicode replacement char\n    crate::parse_check_line(\n        \"0000000000000000000000000000000000000000000000000000000000000000  fo�o\",\n    )\n    .unwrap_err();\n\n    // On Windows only, backslashes are not allowed, escaped or otherwise.\n    if cfg!(windows) {\n        crate::parse_check_line(\n            \"0000000000000000000000000000000000000000000000000000000000000000  fo\\\\o\",\n        )\n        .unwrap_err();\n        crate::parse_check_line(\n            \"\\\\0000000000000000000000000000000000000000000000000000000000000000  fo\\\\\\\\o\",\n        )\n        .unwrap_err();\n    }\n}\n\n#[test]\nfn test_filepath_to_string() {\n    let output = crate::filepath_to_string(Path::new(\"foo\"));\n    assert_eq!(output.filepath_string, \"foo\");\n    assert!(!output.is_escaped);\n\n    let output = crate::filepath_to_string(Path::new(\"f\\\\ \\t\\r\\noo\"));\n    if cfg!(windows) {\n        // We normalize backslashes to forward slashes on Windows.\n        assert_eq!(output.filepath_string, \"f/ \\t\\\\r\\\\noo\");\n    } else {\n        assert_eq!(output.filepath_string, \"f\\\\\\\\ \\t\\\\r\\\\noo\");\n    }\n    assert!(output.is_escaped);\n}\n"
  },
  {
    "path": "third-party/blake3/b3sum/tests/cli_tests.rs",
    "content": "use duct::cmd;\nuse std::ffi::OsString;\nuse std::fs;\nuse std::io::prelude::*;\nuse std::path::PathBuf;\n\npub fn b3sum_exe() -> PathBuf {\n    env!(\"CARGO_BIN_EXE_b3sum\").into()\n}\n\n#[test]\nfn test_hash_one() {\n    let expected = format!(\"{}  -\", blake3::hash(b\"foo\").to_hex());\n    let output = cmd!(b3sum_exe()).stdin_bytes(\"foo\").read().unwrap();\n    assert_eq!(&*expected, output);\n}\n\n#[test]\nfn test_hash_one_tag() {\n    let expected = format!(\"BLAKE3 (-) = {}\", blake3::hash(b\"foo\").to_hex());\n    let output = cmd!(b3sum_exe(), \"--tag\")\n        .stdin_bytes(\"foo\")\n        .read()\n        .unwrap();\n    assert_eq!(&*expected, output);\n}\n\n#[test]\nfn test_hash_one_raw() {\n    let expected = blake3::hash(b\"foo\").as_bytes().to_owned();\n    let output = cmd!(b3sum_exe(), \"--raw\")\n        .stdin_bytes(\"foo\")\n        .stdout_capture()\n        .run()\n        .unwrap()\n        .stdout;\n    assert_eq!(expected, output.as_slice());\n}\n\n#[test]\nfn test_hash_many() {\n    let dir = tempfile::tempdir().unwrap();\n    let file1 = dir.path().join(\"file1\");\n    fs::write(&file1, b\"foo\").unwrap();\n    let file2 = dir.path().join(\"file2\");\n    fs::write(&file2, b\"bar\").unwrap();\n\n    let output = cmd!(b3sum_exe(), &file1, &file2).read().unwrap();\n    let foo_hash = blake3::hash(b\"foo\");\n    let bar_hash = blake3::hash(b\"bar\");\n    let expected = format!(\n        \"{}  {}\\n{}  {}\",\n        foo_hash.to_hex(),\n        // account for slash normalization on Windows\n        file1.to_string_lossy().replace(\"\\\\\", \"/\"),\n        bar_hash.to_hex(),\n        file2.to_string_lossy().replace(\"\\\\\", \"/\"),\n    );\n    assert_eq!(expected, output);\n\n    let output_no_names = cmd!(b3sum_exe(), \"--no-names\", &file1, &file2)\n        .read()\n        .unwrap();\n    let expected_no_names = format!(\"{}\\n{}\", foo_hash.to_hex(), bar_hash.to_hex(),);\n    assert_eq!(expected_no_names, output_no_names);\n}\n\n#[test]\nfn test_hash_many_tag() {\n    let dir = tempfile::tempdir().unwrap();\n    let file1 = dir.path().join(\"file1\");\n    fs::write(&file1, b\"foo\").unwrap();\n    let file2 = dir.path().join(\"file2\");\n    fs::write(&file2, b\"bar\").unwrap();\n\n    let output = cmd!(b3sum_exe(), \"--tag\", &file1, &file2).read().unwrap();\n    let foo_hash = blake3::hash(b\"foo\");\n    let bar_hash = blake3::hash(b\"bar\");\n    let expected = format!(\n        \"BLAKE3 ({}) = {}\\nBLAKE3 ({}) = {}\",\n        // account for slash normalization on Windows\n        file1.to_string_lossy().replace(\"\\\\\", \"/\"),\n        foo_hash.to_hex(),\n        file2.to_string_lossy().replace(\"\\\\\", \"/\"),\n        bar_hash.to_hex(),\n    );\n    assert_eq!(expected, output);\n}\n\n#[test]\nfn test_missing_files() {\n    let dir = tempfile::tempdir().unwrap();\n    let file1 = dir.path().join(\"file1\");\n    fs::write(&file1, b\"foo\").unwrap();\n    let file2 = dir.path().join(\"file2\");\n    fs::write(&file2, b\"bar\").unwrap();\n\n    let output = cmd!(b3sum_exe(), \"file1\", \"missing_file\", \"file2\")\n        .dir(dir.path())\n        .stdout_capture()\n        .stderr_capture()\n        .unchecked()\n        .run()\n        .unwrap();\n    assert!(!output.status.success());\n\n    let foo_hash = blake3::hash(b\"foo\");\n    let bar_hash = blake3::hash(b\"bar\");\n    let expected_stdout = format!(\n        \"{}  file1\\n{}  file2\\n\",\n        foo_hash.to_hex(),\n        bar_hash.to_hex(),\n    );\n    assert_eq!(expected_stdout.as_bytes(), &output.stdout[..]);\n\n    let bing_error = fs::File::open(dir.path().join(\"missing_file\")).unwrap_err();\n    let expected_stderr = format!(\"b3sum: missing_file: {}\\n\", bing_error.to_string());\n    assert_eq!(expected_stderr.as_bytes(), &output.stderr[..]);\n}\n\n#[test]\nfn test_hash_length_and_seek() {\n    let mut expected = [0; 100];\n    blake3::Hasher::new()\n        .update(b\"foo\")\n        .finalize_xof()\n        .fill(&mut expected);\n    let output = cmd!(b3sum_exe(), \"--raw\", \"--length=100\")\n        .stdin_bytes(\"foo\")\n        .stdout_capture()\n        .run()\n        .unwrap()\n        .stdout;\n    assert_eq!(expected[..], output);\n\n    let short_output = cmd!(b3sum_exe(), \"--raw\", \"--length=99\")\n        .stdin_bytes(\"foo\")\n        .stdout_capture()\n        .run()\n        .unwrap()\n        .stdout;\n    assert_eq!(expected[..99], short_output);\n\n    let seek1_output = cmd!(b3sum_exe(), \"--raw\", \"--length=99\", \"--seek=1\")\n        .stdin_bytes(\"foo\")\n        .stdout_capture()\n        .run()\n        .unwrap()\n        .stdout;\n    assert_eq!(expected[1..], seek1_output);\n\n    let seek99_output = cmd!(b3sum_exe(), \"--raw\", \"--length=1\", \"--seek=99\")\n        .stdin_bytes(\"foo\")\n        .stdout_capture()\n        .run()\n        .unwrap()\n        .stdout;\n    assert_eq!(expected[99..], seek99_output);\n}\n\n#[test]\nfn test_keyed() {\n    let key = [42; blake3::KEY_LEN];\n    let f = tempfile::NamedTempFile::new().unwrap();\n    f.as_file().write_all(b\"foo\").unwrap();\n    f.as_file().flush().unwrap();\n    let expected = blake3::keyed_hash(&key, b\"foo\").to_hex();\n    let output = cmd!(b3sum_exe(), \"--keyed\", \"--no-names\", f.path())\n        .stdin_bytes(&key[..])\n        .read()\n        .unwrap();\n    assert_eq!(&*expected, &*output);\n\n    // Make sure that keys of the wrong length lead to errors.\n    for bad_length in [0, 1, blake3::KEY_LEN - 1, blake3::KEY_LEN + 1] {\n        dbg!(bad_length);\n        let output = cmd!(b3sum_exe(), \"--keyed\", f.path())\n            .stdin_bytes(vec![0; bad_length])\n            .stdout_capture()\n            .stderr_capture()\n            .unchecked()\n            .run()\n            .unwrap();\n        assert!(!output.status.success());\n        assert!(output.stdout.is_empty());\n        // Make sure the error message is relevant.\n        let stderr = std::str::from_utf8(&output.stderr).unwrap();\n        assert!(stderr.contains(\"key bytes\"));\n    }\n}\n\n#[test]\nfn test_derive_key() {\n    let context = \"BLAKE3 2019-12-28 10:28:41 example context\";\n    let f = tempfile::NamedTempFile::new().unwrap();\n    f.as_file().write_all(b\"key material\").unwrap();\n    f.as_file().flush().unwrap();\n    let expected = hex::encode(blake3::derive_key(context, b\"key material\"));\n    let output = cmd!(b3sum_exe(), \"--derive-key\", context, \"--no-names\", f.path())\n        .read()\n        .unwrap();\n    assert_eq!(&*expected, &*output);\n}\n\n#[test]\nfn test_no_mmap() {\n    let f = tempfile::NamedTempFile::new().unwrap();\n    f.as_file().write_all(b\"foo\").unwrap();\n    f.as_file().flush().unwrap();\n\n    let expected = blake3::hash(b\"foo\").to_hex();\n    let output = cmd!(b3sum_exe(), \"--no-mmap\", \"--no-names\", f.path())\n        .read()\n        .unwrap();\n    assert_eq!(&*expected, &*output);\n}\n\n#[test]\nfn test_length_without_value_is_an_error() {\n    let result = cmd!(b3sum_exe(), \"--length\")\n        .stdin_bytes(\"foo\")\n        .stderr_capture()\n        .run();\n    assert!(result.is_err());\n}\n\n#[test]\nfn test_raw_with_multi_files_is_an_error() {\n    let f1 = tempfile::NamedTempFile::new().unwrap();\n    let f2 = tempfile::NamedTempFile::new().unwrap();\n\n    // Make sure it doesn't error with just one file\n    let result = cmd!(b3sum_exe(), \"--raw\", f1.path()).stdout_capture().run();\n    assert!(result.is_ok());\n\n    // Make sure it errors when both file are passed\n    let result = cmd!(b3sum_exe(), \"--raw\", f1.path(), f2.path())\n        .stderr_capture()\n        .run();\n    assert!(result.is_err());\n}\n\n#[test]\n#[cfg(unix)]\nfn test_newline_and_backslash_escaping_on_unix() {\n    let empty_hash = blake3::hash(b\"\").to_hex();\n    let dir = tempfile::tempdir().unwrap();\n    fs::create_dir(dir.path().join(\"subdir\")).unwrap();\n    let names = [\n        \"abcdef\",\n        \"abc\\ndef\",\n        \"abc\\\\def\",\n        \"abc\\rdef\",\n        \"abc\\r\\ndef\",\n        \"subdir/foo\",\n    ];\n    let mut paths = Vec::new();\n    for name in &names {\n        let path = dir.path().join(name);\n        println!(\"creating file at {:?}\", path);\n        fs::write(&path, b\"\").unwrap();\n        paths.push(path);\n    }\n    let output = cmd(b3sum_exe(), &names).dir(dir.path()).read().unwrap();\n    let expected = format!(\n        \"\\\n{0}  abcdef\n\\\\{0}  abc\\\\ndef\n\\\\{0}  abc\\\\\\\\def\n\\\\{0}  abc\\\\rdef\n\\\\{0}  abc\\\\r\\\\ndef\n{0}  subdir/foo\",\n        empty_hash,\n    );\n    println!(\"output\");\n    println!(\"======\");\n    println!(\"{}\", output);\n    println!();\n    println!(\"expected\");\n    println!(\"========\");\n    println!(\"{}\", expected);\n    println!();\n    assert_eq!(expected, output);\n}\n\n#[test]\n#[cfg(windows)]\nfn test_slash_normalization_on_windows() {\n    let empty_hash = blake3::hash(b\"\").to_hex();\n    let dir = tempfile::tempdir().unwrap();\n    fs::create_dir(dir.path().join(\"subdir\")).unwrap();\n    // Note that filenames can't contain newlines or backslashes on Windows, so\n    // we don't test escaping here. We only test forward slash and backslash as\n    // directory separators.\n    let names = [\"abcdef\", \"subdir/foo\", \"subdir\\\\bar\"];\n    let mut paths = Vec::new();\n    for name in &names {\n        let path = dir.path().join(name);\n        println!(\"creating file at {:?}\", path);\n        fs::write(&path, b\"\").unwrap();\n        paths.push(path);\n    }\n    let output = cmd(b3sum_exe(), &names).dir(dir.path()).read().unwrap();\n    let expected = format!(\n        \"\\\n{0}  abcdef\n{0}  subdir/foo\n{0}  subdir/bar\",\n        empty_hash,\n    );\n    println!(\"output\");\n    println!(\"======\");\n    println!(\"{}\", output);\n    println!();\n    println!(\"expected\");\n    println!(\"========\");\n    println!(\"{}\", expected);\n    println!();\n    assert_eq!(expected, output);\n}\n\n#[test]\n#[cfg(unix)]\nfn test_invalid_unicode_on_unix() {\n    use std::os::unix::ffi::OsStringExt;\n\n    let empty_hash = blake3::hash(b\"\").to_hex();\n    let dir = tempfile::tempdir().unwrap();\n    let names = [\"abcdef\".into(), OsString::from_vec(b\"abc\\xffdef\".to_vec())];\n    let mut paths = Vec::new();\n    for name in &names {\n        let path = dir.path().join(name);\n        println!(\"creating file at {:?}\", path);\n        // Note: Some operating systems, macOS in particular, simply don't\n        // allow invalid Unicode in filenames. On those systems, this write\n        // will fail. That's fine, we'll just short-circuit this test in that\n        // case. But assert that at least Linux allows this.\n        let write_result = fs::write(&path, b\"\");\n        if cfg!(target_os = \"linux\") {\n            write_result.expect(\"Linux should allow invalid Unicode\");\n        } else if write_result.is_err() {\n            return;\n        }\n        paths.push(path);\n    }\n    let output = cmd(b3sum_exe(), &names).dir(dir.path()).read().unwrap();\n    let expected = format!(\n        \"\\\n{0}  abcdef\n{0}  abc�def\",\n        empty_hash,\n    );\n    println!(\"output\");\n    println!(\"======\");\n    println!(\"{}\", output);\n    println!();\n    println!(\"expected\");\n    println!(\"========\");\n    println!(\"{}\", expected);\n    println!();\n    assert_eq!(expected, output);\n}\n\n#[test]\n#[cfg(windows)]\nfn test_invalid_unicode_on_windows() {\n    use std::os::windows::ffi::OsStringExt;\n\n    let empty_hash = blake3::hash(b\"\").to_hex();\n    let dir = tempfile::tempdir().unwrap();\n    let surrogate_char = 0xDC00;\n    let bad_unicode_wchars = [\n        'a' as u16,\n        'b' as u16,\n        'c' as u16,\n        surrogate_char,\n        'd' as u16,\n        'e' as u16,\n        'f' as u16,\n    ];\n    let bad_osstring = OsString::from_wide(&bad_unicode_wchars);\n    let names = [\"abcdef\".into(), bad_osstring];\n    let mut paths = Vec::new();\n    for name in &names {\n        let path = dir.path().join(name);\n        println!(\"creating file at {:?}\", path);\n        fs::write(&path, b\"\").unwrap();\n        paths.push(path);\n    }\n    let output = cmd(b3sum_exe(), &names).dir(dir.path()).read().unwrap();\n    let expected = format!(\n        \"\\\n{0}  abcdef\n{0}  abc�def\",\n        empty_hash,\n    );\n    println!(\"output\");\n    println!(\"======\");\n    println!(\"{}\", output);\n    println!();\n    println!(\"expected\");\n    println!(\"========\");\n    println!(\"{}\", expected);\n    println!();\n    assert_eq!(expected, output);\n}\n\n#[test]\nfn test_check() {\n    // Make a directory full of files, and make sure the b3sum output in that\n    // directory is what we expect.\n    let a_hash = blake3::hash(b\"a\").to_hex();\n    let b_hash = blake3::hash(b\"b\").to_hex();\n    let cd_hash = blake3::hash(b\"cd\").to_hex();\n    for tagged in [false, true] {\n        let dir = tempfile::tempdir().unwrap();\n        fs::write(dir.path().join(\"a\"), b\"a\").unwrap();\n        fs::write(dir.path().join(\"b\"), b\"b\").unwrap();\n        fs::create_dir(dir.path().join(\"c\")).unwrap();\n        fs::write(dir.path().join(\"c/d\"), b\"cd\").unwrap();\n        dbg!(tagged);\n        let mut args = vec![\"a\", \"b\", \"c/d\"];\n        if tagged {\n            args.push(\"--tag\");\n        }\n        let output = cmd(b3sum_exe(), args)\n            .dir(dir.path())\n            .stdout_capture()\n            .stderr_capture()\n            .run()\n            .unwrap();\n        let stdout = std::str::from_utf8(&output.stdout).unwrap();\n        let stderr = std::str::from_utf8(&output.stderr).unwrap();\n        let expected_checkfile = if tagged {\n            format!(\n                \"BLAKE3 (a) = {}\\n\\\n                 BLAKE3 (b) = {}\\n\\\n                 BLAKE3 (c/d) = {}\\n\",\n                a_hash, b_hash, cd_hash,\n            )\n        } else {\n            format!(\n                \"{}  a\\n\\\n                 {}  b\\n\\\n                 {}  c/d\\n\",\n                a_hash, b_hash, cd_hash,\n            )\n        };\n        dbg!(&expected_checkfile);\n        assert_eq!(expected_checkfile, stdout);\n        assert_eq!(\"\", stderr);\n\n        // Now use the output we just validated as a checkfile, passed to stdin.\n        let output = cmd!(b3sum_exe(), \"--check\")\n            .stdin_bytes(expected_checkfile.as_bytes())\n            .dir(dir.path())\n            .stdout_capture()\n            .stderr_capture()\n            .run()\n            .unwrap();\n        let stdout = std::str::from_utf8(&output.stdout).unwrap();\n        let stderr = std::str::from_utf8(&output.stderr).unwrap();\n        let expected_check_output = \"\\\n         a: OK\\n\\\n         b: OK\\n\\\n         c/d: OK\\n\";\n        assert_eq!(expected_check_output, stdout);\n        assert_eq!(\"\", stderr);\n\n        // Check the same file, but with Windows-style newlines.\n        let windows_style = expected_checkfile.replace(\"\\n\", \"\\r\\n\");\n        let output = cmd!(b3sum_exe(), \"--check\")\n            .stdin_bytes(windows_style.as_bytes())\n            .dir(dir.path())\n            .stdout_capture()\n            .stderr_capture()\n            .run()\n            .unwrap();\n        let stdout = std::str::from_utf8(&output.stdout).unwrap();\n        let stderr = std::str::from_utf8(&output.stderr).unwrap();\n        let expected_check_output = \"\\\n         a: OK\\n\\\n         b: OK\\n\\\n         c/d: OK\\n\";\n        assert_eq!(expected_check_output, stdout);\n        assert_eq!(\"\", stderr);\n\n        // Now pass the same checkfile twice on the command line just for fun.\n        let checkfile_path = dir.path().join(\"checkfile\");\n        fs::write(&checkfile_path, &expected_checkfile).unwrap();\n        let output = cmd!(b3sum_exe(), \"--check\", &checkfile_path, &checkfile_path)\n            .dir(dir.path())\n            .stdout_capture()\n            .stderr_capture()\n            .run()\n            .unwrap();\n        let stdout = std::str::from_utf8(&output.stdout).unwrap();\n        let stderr = std::str::from_utf8(&output.stderr).unwrap();\n        let mut double_check_output = String::new();\n        double_check_output.push_str(&expected_check_output);\n        double_check_output.push_str(&expected_check_output);\n        assert_eq!(double_check_output, stdout);\n        assert_eq!(\"\", stderr);\n\n        // Corrupt one of the files and check again.\n        fs::write(dir.path().join(\"b\"), b\"CORRUPTION\").unwrap();\n        let output = cmd!(b3sum_exe(), \"--check\", &checkfile_path)\n            .dir(dir.path())\n            .stdout_capture()\n            .stderr_capture()\n            .unchecked()\n            .run()\n            .unwrap();\n        let stdout = std::str::from_utf8(&output.stdout).unwrap();\n        let stderr = std::str::from_utf8(&output.stderr).unwrap();\n        let expected_check_failure = \"\\\n        a: OK\\n\\\n        b: FAILED\\n\\\n        c/d: OK\\n\";\n        assert!(!output.status.success());\n        assert_eq!(expected_check_failure, stdout);\n        assert_eq!(\n            \"b3sum: WARNING: 1 computed checksum did NOT match\\n\",\n            stderr,\n        );\n\n        // Delete one of the files and check again.\n        fs::remove_file(dir.path().join(\"b\")).unwrap();\n        let open_file_error = fs::File::open(dir.path().join(\"b\")).unwrap_err();\n        let output = cmd!(b3sum_exe(), \"--check\", &checkfile_path)\n            .dir(dir.path())\n            .stdout_capture()\n            .stderr_capture()\n            .unchecked()\n            .run()\n            .unwrap();\n        let stdout = std::str::from_utf8(&output.stdout).unwrap();\n        let stderr = std::str::from_utf8(&output.stderr).unwrap();\n        let expected_check_failure = format!(\n            \"a: OK\\n\\\n         b: FAILED ({})\\n\\\n         c/d: OK\\n\",\n            open_file_error,\n        );\n        assert!(!output.status.success());\n        assert_eq!(expected_check_failure, stdout);\n        assert_eq!(\n            \"b3sum: WARNING: 1 computed checksum did NOT match\\n\",\n            stderr,\n        );\n\n        // Confirm that --quiet suppresses the OKs but not the FAILEDs.\n        let output = cmd!(b3sum_exe(), \"--check\", \"--quiet\", &checkfile_path)\n            .dir(dir.path())\n            .stdout_capture()\n            .stderr_capture()\n            .unchecked()\n            .run()\n            .unwrap();\n        let stdout = std::str::from_utf8(&output.stdout).unwrap();\n        let stderr = std::str::from_utf8(&output.stderr).unwrap();\n        let expected_check_failure = format!(\"b: FAILED ({})\\n\", open_file_error);\n        assert!(!output.status.success());\n        assert_eq!(expected_check_failure, stdout);\n        assert_eq!(\n            \"b3sum: WARNING: 1 computed checksum did NOT match\\n\",\n            stderr,\n        );\n    }\n}\n\n#[test]\nfn test_check_invalid_characters() {\n    // Check that a null character in the path fails.\n    let output = cmd!(b3sum_exe(), \"--check\")\n        .stdin_bytes(\"0000000000000000000000000000000000000000000000000000000000000000  \\0\")\n        .stdout_capture()\n        .stderr_capture()\n        .unchecked()\n        .run()\n        .unwrap();\n    let stdout = std::str::from_utf8(&output.stdout).unwrap();\n    let stderr = std::str::from_utf8(&output.stderr).unwrap();\n    let expected_stderr = \"\\\n        b3sum: Null character in path\\n\\\n        b3sum: WARNING: 1 computed checksum did NOT match\\n\";\n    assert!(!output.status.success());\n    assert_eq!(\"\", stdout);\n    assert_eq!(expected_stderr, stderr);\n\n    // Check that a Unicode replacement character in the path fails.\n    let output = cmd!(b3sum_exe(), \"--check\")\n        .stdin_bytes(\"0000000000000000000000000000000000000000000000000000000000000000  �\")\n        .stdout_capture()\n        .stderr_capture()\n        .unchecked()\n        .run()\n        .unwrap();\n    let stdout = std::str::from_utf8(&output.stdout).unwrap();\n    let stderr = std::str::from_utf8(&output.stderr).unwrap();\n    let expected_stderr = \"\\\n        b3sum: Unicode replacement character in path\\n\\\n        b3sum: WARNING: 1 computed checksum did NOT match\\n\";\n    assert!(!output.status.success());\n    assert_eq!(\"\", stdout);\n    assert_eq!(expected_stderr, stderr);\n\n    // Check that an invalid escape sequence in the path fails.\n    let output = cmd!(b3sum_exe(), \"--check\")\n        .stdin_bytes(\"\\\\0000000000000000000000000000000000000000000000000000000000000000  \\\\a\")\n        .stdout_capture()\n        .stderr_capture()\n        .unchecked()\n        .run()\n        .unwrap();\n    let stdout = std::str::from_utf8(&output.stdout).unwrap();\n    let stderr = std::str::from_utf8(&output.stderr).unwrap();\n    let expected_stderr = \"\\\n        b3sum: Invalid backslash escape\\n\\\n        b3sum: WARNING: 1 computed checksum did NOT match\\n\";\n    assert!(!output.status.success());\n    assert_eq!(\"\", stdout);\n    assert_eq!(expected_stderr, stderr);\n\n    // Windows also forbids literal backslashes. Check for that if and only if\n    // we're on Windows.\n    if cfg!(windows) {\n        let output = cmd!(b3sum_exe(), \"--check\")\n            .stdin_bytes(\"0000000000000000000000000000000000000000000000000000000000000000  \\\\\")\n            .stdout_capture()\n            .stderr_capture()\n            .unchecked()\n            .run()\n            .unwrap();\n        let stdout = std::str::from_utf8(&output.stdout).unwrap();\n        let stderr = std::str::from_utf8(&output.stderr).unwrap();\n        let expected_stderr = \"\\\n            b3sum: Backslash in path\\n\\\n            b3sum: WARNING: 1 computed checksum did NOT match\\n\";\n        assert!(!output.status.success());\n        assert_eq!(\"\", stdout);\n        assert_eq!(expected_stderr, stderr);\n    }\n}\n\n#[test]\nfn test_globbing() {\n    // On Unix, globbing is provided by the shell. On Windows, globbing is\n    // provided by us, using the `wild` crate.\n    let dir = tempfile::tempdir().unwrap();\n    let file1 = dir.path().join(\"file1\");\n    fs::write(&file1, b\"foo\").unwrap();\n    let file2 = dir.path().join(\"file2\");\n    fs::write(&file2, b\"bar\").unwrap();\n\n    let foo_hash = blake3::hash(b\"foo\");\n    let bar_hash = blake3::hash(b\"bar\");\n    // NOTE: This assumes that the glob will be expanded in alphabetical order,\n    //       to \"file1 file2\" rather than \"file2 file1\". So far, this seems to\n    //       be true (guaranteed?) of Unix shell behavior, and true in practice\n    //       with the `wild` crate on Windows. It's possible that this could\n    //       start failing in the future, though, or on some unknown platform.\n    //       If that ever happens, we'll need to relax this test somehow,\n    //       probably by just testing for both possible outputs. I'm not\n    //       handling that case in advance, though, because I'd prefer to hear\n    //       about it if it comes up.\n    let expected = format!(\"{}  file1\\n{}  file2\", foo_hash.to_hex(), bar_hash.to_hex());\n\n    let star_command = format!(\"{} *\", b3sum_exe().to_str().unwrap());\n    let (exe, c_flag) = if cfg!(windows) {\n        (\"cmd.exe\", \"/C\")\n    } else {\n        (\"/bin/sh\", \"-c\")\n    };\n    let output = cmd!(exe, c_flag, star_command)\n        .dir(dir.path())\n        .read()\n        .unwrap();\n    assert_eq!(expected, output);\n}\n"
  },
  {
    "path": "third-party/blake3/b3sum/what_does_check_do.md",
    "content": "# How does `b3sum --check` behave exactly?<br>or: Are filepaths...text?\n\nMost of the time, `b3sum --check` is a drop-in replacement for `md5sum --check`\nand other Coreutils hashing tools. It consumes a checkfile (the output of a\nregular `b3sum` command), re-hashes all the files listed there, and returns\nsuccess if all of those hashes are still correct. What makes this more\ncomplicated than it might seem, is that representing filepaths as text means we\nneed to consider many possible edge cases of unrepresentable filepaths. This\ndocument describes all of these edge cases in detail.\n\n## The simple case\n\nHere's the result of running `b3sum a b c/d` in a directory that contains\nthose three files:\n\n```bash\n$ echo hi > a\n$ echo lo > b\n$ mkdir c\n$ echo stuff > c/d\n$ b3sum a b c/d\n0b8b60248fad7ac6dfac221b7e01a8b91c772421a15b387dd1fb2d6a94aee438  a\n6ae4a57bbba24f79c461d30bcb4db973b9427d9207877e34d2d74528daa84115  b\n2d477356c962e54784f1c5dc5297718d92087006f6ee96b08aeaf7f3cd252377  c/d\n```\n\nIf we pipe that output into `b3sum --check`, it will exit with status zero\n(success) and print:\n\n```bash\n$ b3sum a b c/d | b3sum --check\na: OK\nb: OK\nc/d: OK\n```\n\nIf we delete `b` and change the contents of `c/d`, and then use the same\ncheckfile as above, `b3sum --check` will exit with a non-zero status (failure)\nand print:\n\n```bash\n$ b3sum a b c/d > checkfile\n$ rm b\n$ echo more stuff >> c/d\n$ b3sum --check checkfile\na: OK\nb: FAILED (No such file or directory (os error 2))\nc/d: FAILED\n```\n\nIn these typical cases, `b3sum` and `md5sum` have identical output for success\nand very similar output for failure.\n\n## Escaping newlines and backslashes\n\nSince the checkfile format (the regular output format of `b3sum`) is\nnewline-separated text, we need to worry about what happens when a filepath\ncontains a newline, or worse. Suppose we create a file named `x[newline]x`\n(3 characters). One way to create such a file is with a Python one-liner like\nthis:\n\n```python\n>>> open(\"x\\nx\", \"w\")\n```\n\nHere's what happens when we hash that file with `b3sum`:\n\n```bash\n$ b3sum x*\n\\af1349b9f5f9a1a6a0404dea36dcc9499bcb25c9adc112b7cc9a93cae41f3262  x\\nx\n```\n\nNotice two things. First, `b3sum` puts a single `\\` character at the front of\nthe line. This indicates that the filepath contains escape sequences that\n`b3sum --check` will need to unescape. Then, `b3sum` replaces the newline\ncharacter in the filepath with the two-character escape sequence `\\n`.\nSimilarly, if the filepath contained carriage returns or backslashes, `b3sum`\nwould escape those as `\\r` and `\\\\` in the output. So far, all of this behavior\nis still identical to `md5sum`. (Note: Coreutils [introduced `\\r`\nescaping](https://github.com/coreutils/coreutils/commit/ed1c58427d574fb4ff0cb8f915eb0d554000ceeb)\nin v9.0, September 2021.)\n\n## Invalid Unicode\n\nThis is where `b3sum` and `md5sum` diverge. Apart from the newline and\nbackslash escapes described above, `md5sum` copies all other filepath bytes\nverbatim to its output. That means its output encoding is \"ASCII plus whatever\nbytes we got from the command line\". This creates two problems:\n\n1. Printing something that isn't UTF-8 is kind of gross.\n2. Windows support.\n\nWhat's the deal with Windows? To start with, there's a fundamental difference\nin how Unix and Windows represent filepaths. Unix filepaths are \"usually UTF-8\"\nand Windows filepaths are \"usually UTF-16\". That means that a file named `abc`\nis typically represented as the bytes `[97, 98, 99]` on Unix and as the bytes\n`[97, 0, 98, 0, 99, 0]` on Windows. The `md5sum` approach won't work if we plan\non creating a checkfile on Unix and checking it on Windows, or vice versa.\n\nA more portable approach is to convert platform-specific bytes into some\nconsistent Unicode encoding. (In practice this is going to be UTF-8, but in\ntheory it could be anything.) Then when `--check` needs to open a file, we\nconvert the Unicode representation back into platform-specific bytes. This\nmakes important common cases like `abc`, and in fact even `abc[newline]def`,\nwork as expected. Great!\n\nBut...what did we mean above when we said *usually* UTF-8 and *usually* UTF-16?\nIt turns out that not every possible sequence of bytes is valid UTF-8, and not\nevery possible sequence of 16-bit wide chars is valid UTF-16. For example, the\nbyte 0xFF (255) can never appear in any UTF-8 string. If we ask Python to\ndecode it, it yells at us:\n\n```python\n>>> b\"\\xFF\".decode(\"UTF-8\")\nUnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte\n```\n\nHowever, tragically, we *can* create a file with that byte in its name (on\nLinux at least, though not usually on macOS):\n\n```python\n>>> open(b\"y\\xFFy\", \"w\")\n```\n\nSo some filepaths aren't representable in Unicode at all. Our plan to \"convert\nplatform-specific bytes into some consistent Unicode encoding\" isn't going to\nwork for everything. What does `b3sum` do with the file above?\n\n```bash\n$ b3sum y*\naf1349b9f5f9a1a6a0404dea36dcc9499bcb25c9adc112b7cc9a93cae41f3262  y�y\n```\n\nThat � in there is a \"Unicode replacement character\". When we run into\nfilepaths that we can't represent in Unicode, we replace the unrepresentable\nparts with these characters. On the checking side, to avoid any possible\nconfusion between two different invalid filepaths, we automatically fail if we\nsee a replacement character. Together with a few more details covered in the\nnext section, this gives us an important set of properties:\n\n1. Any file can be hashed locally.\n2. Any file with a valid Unicode name not containing the � character can be\n   checked.\n3. Checking ambiguous or unrepresentable filepaths always fails.\n4. Checkfiles are always valid UTF-8.\n5. Checkfiles are portable between Unix and Windows.\n\n## Formal Rules\n\n1. When hashing, filepaths are represented in a platform-specific encoding,\n   which can accommodate any filepath on the current platform. In Rust, this is\n   `OsStr`/`OsString`.\n2. In output, filepaths are first converted to UTF-8. Any non-Unicode segments\n   are replaced with Unicode replacement characters (U+FFFD). In Rust, this is\n   `OsStr::to_string_lossy`.\n3. Then, if a filepath contains any backslashes (U+005C) or newlines (U+000A),\n   these characters are escaped as `\\\\` and `\\n` respectively.\n4. Finally, any output line containing an escape sequence is prefixed with a\n   single backslash.\n5. When checking, each line is parsed as UTF-8, separated by a newline\n   (U+000A). Invalid UTF-8 is an error.\n6. Then, if a line begins with a backslash, the filepath component is\n   unescaped. Any escape sequence other than `\\\\` or `\\n` is an error. If a\n   line does not begin with a backslash, unescaping is not performed, and any\n   backslashes in the filepath component are interpreted literally. (`b3sum`\n   output never contains unescaped backslashes, but they can occur in\n   checkfiles assembled by hand.)\n7. Finally, if a filepath contains a Unicode replacement character (U+FFFD) or\n   a null character (U+0000), it is an error.\n\n   **Additionally, on Windows only:**\n\n8. In output, all backslashes (U+005C) are replaced with forward slashes\n   (U+002F).\n9. When checking, after unescaping, if a filepath contains a backslash, it is\n   an error.\n"
  },
  {
    "path": "third-party/blake3/benches/bench.rs",
    "content": "#![feature(test)]\n\nextern crate test;\n\nuse arrayref::array_ref;\nuse arrayvec::ArrayVec;\nuse blake3::platform::{Platform, MAX_SIMD_DEGREE};\nuse blake3::OUT_LEN;\nuse blake3::{BLOCK_LEN, CHUNK_LEN};\nuse rand::prelude::*;\nuse test::Bencher;\n\nconst KIB: usize = 1024;\n\n// This struct randomizes two things:\n// 1. The actual bytes of input.\n// 2. The page offset the input starts at.\npub struct RandomInput {\n    buf: Vec<u8>,\n    len: usize,\n    offsets: Vec<usize>,\n    offset_index: usize,\n}\n\nimpl RandomInput {\n    pub fn new(b: &mut Bencher, len: usize) -> Self {\n        b.bytes += len as u64;\n        let page_size: usize = page_size::get();\n        let mut buf = vec![0u8; len + page_size];\n        let mut rng = rand::rng();\n        rng.fill_bytes(&mut buf);\n        let mut offsets: Vec<usize> = (0..page_size).collect();\n        offsets.shuffle(&mut rng);\n        Self {\n            buf,\n            len,\n            offsets,\n            offset_index: 0,\n        }\n    }\n\n    pub fn get(&mut self) -> &[u8] {\n        let offset = self.offsets[self.offset_index];\n        self.offset_index += 1;\n        if self.offset_index >= self.offsets.len() {\n            self.offset_index = 0;\n        }\n        &self.buf[offset..][..self.len]\n    }\n}\n\nfn bench_single_compression_fn(b: &mut Bencher, platform: Platform) {\n    let mut state = [1u32; 8];\n    let mut r = RandomInput::new(b, 64);\n    let input = array_ref!(r.get(), 0, 64);\n    b.iter(|| platform.compress_in_place(&mut state, input, 64 as u8, 0, 0));\n}\n\n#[bench]\nfn bench_single_compression_portable(b: &mut Bencher) {\n    bench_single_compression_fn(b, Platform::portable());\n}\n\n#[bench]\n#[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\nfn bench_single_compression_sse2(b: &mut Bencher) {\n    if let Some(platform) = Platform::sse2() {\n        bench_single_compression_fn(b, platform);\n    }\n}\n\n#[bench]\n#[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\nfn bench_single_compression_sse41(b: &mut Bencher) {\n    if let Some(platform) = Platform::sse41() {\n        bench_single_compression_fn(b, platform);\n    }\n}\n\n#[bench]\n#[cfg(blake3_avx512_ffi)]\nfn bench_single_compression_avx512(b: &mut Bencher) {\n    if let Some(platform) = Platform::avx512() {\n        bench_single_compression_fn(b, platform);\n    }\n}\n\nfn bench_many_chunks_fn(b: &mut Bencher, platform: Platform) {\n    let degree = platform.simd_degree();\n    let mut inputs = Vec::new();\n    for _ in 0..degree {\n        inputs.push(RandomInput::new(b, CHUNK_LEN));\n    }\n    b.iter(|| {\n        let input_arrays: ArrayVec<&[u8; CHUNK_LEN], MAX_SIMD_DEGREE> = inputs\n            .iter_mut()\n            .take(degree)\n            .map(|i| array_ref!(i.get(), 0, CHUNK_LEN))\n            .collect();\n        let mut out = [0; MAX_SIMD_DEGREE * OUT_LEN];\n        platform.hash_many(\n            &input_arrays[..],\n            &[0; 8],\n            0,\n            blake3::IncrementCounter::Yes,\n            0,\n            0,\n            0,\n            &mut out,\n        );\n    });\n}\n\n#[bench]\n#[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\nfn bench_many_chunks_sse2(b: &mut Bencher) {\n    if let Some(platform) = Platform::sse2() {\n        bench_many_chunks_fn(b, platform);\n    }\n}\n\n#[bench]\n#[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\nfn bench_many_chunks_sse41(b: &mut Bencher) {\n    if let Some(platform) = Platform::sse41() {\n        bench_many_chunks_fn(b, platform);\n    }\n}\n\n#[bench]\n#[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\nfn bench_many_chunks_avx2(b: &mut Bencher) {\n    if let Some(platform) = Platform::avx2() {\n        bench_many_chunks_fn(b, platform);\n    }\n}\n\n#[bench]\n#[cfg(blake3_avx512_ffi)]\nfn bench_many_chunks_avx512(b: &mut Bencher) {\n    if let Some(platform) = Platform::avx512() {\n        bench_many_chunks_fn(b, platform);\n    }\n}\n\n#[bench]\n#[cfg(blake3_neon)]\nfn bench_many_chunks_neon(b: &mut Bencher) {\n    bench_many_chunks_fn(b, Platform::neon().unwrap());\n}\n\n#[bench]\n#[cfg(blake3_wasm32_simd)]\nfn bench_many_chunks_wasm(b: &mut Bencher) {\n    bench_many_chunks_fn(b, Platform::wasm32_simd().unwrap());\n}\n\n// TODO: When we get const generics we can unify this with the chunks code.\nfn bench_many_parents_fn(b: &mut Bencher, platform: Platform) {\n    let degree = platform.simd_degree();\n    let mut inputs = Vec::new();\n    for _ in 0..degree {\n        inputs.push(RandomInput::new(b, BLOCK_LEN));\n    }\n    b.iter(|| {\n        let input_arrays: ArrayVec<&[u8; BLOCK_LEN], MAX_SIMD_DEGREE> = inputs\n            .iter_mut()\n            .take(degree)\n            .map(|i| array_ref!(i.get(), 0, BLOCK_LEN))\n            .collect();\n        let mut out = [0; MAX_SIMD_DEGREE * OUT_LEN];\n        platform.hash_many(\n            &input_arrays[..],\n            &[0; 8],\n            0,\n            blake3::IncrementCounter::No,\n            0,\n            0,\n            0,\n            &mut out,\n        );\n    });\n}\n\n#[bench]\n#[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\nfn bench_many_parents_sse2(b: &mut Bencher) {\n    if let Some(platform) = Platform::sse2() {\n        bench_many_parents_fn(b, platform);\n    }\n}\n\n#[bench]\n#[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\nfn bench_many_parents_sse41(b: &mut Bencher) {\n    if let Some(platform) = Platform::sse41() {\n        bench_many_parents_fn(b, platform);\n    }\n}\n\n#[bench]\n#[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\nfn bench_many_parents_avx2(b: &mut Bencher) {\n    if let Some(platform) = Platform::avx2() {\n        bench_many_parents_fn(b, platform);\n    }\n}\n\n#[bench]\n#[cfg(blake3_avx512_ffi)]\nfn bench_many_parents_avx512(b: &mut Bencher) {\n    if let Some(platform) = Platform::avx512() {\n        bench_many_parents_fn(b, platform);\n    }\n}\n\n#[bench]\n#[cfg(blake3_neon)]\nfn bench_many_parents_neon(b: &mut Bencher) {\n    bench_many_parents_fn(b, Platform::neon().unwrap());\n}\n\n#[bench]\n#[cfg(blake3_wasm32_simd)]\nfn bench_many_parents_wasm(b: &mut Bencher) {\n    bench_many_parents_fn(b, Platform::wasm32_simd().unwrap());\n}\n\nfn bench_atonce(b: &mut Bencher, len: usize) {\n    let mut input = RandomInput::new(b, len);\n    b.iter(|| blake3::hash(input.get()));\n}\n\n#[bench]\nfn bench_atonce_0001_block(b: &mut Bencher) {\n    bench_atonce(b, BLOCK_LEN);\n}\n\n#[bench]\nfn bench_atonce_0001_kib(b: &mut Bencher) {\n    bench_atonce(b, 1 * KIB);\n}\n\n#[bench]\nfn bench_atonce_0002_kib(b: &mut Bencher) {\n    bench_atonce(b, 2 * KIB);\n}\n\n#[bench]\nfn bench_atonce_0004_kib(b: &mut Bencher) {\n    bench_atonce(b, 4 * KIB);\n}\n\n#[bench]\nfn bench_atonce_0008_kib(b: &mut Bencher) {\n    bench_atonce(b, 8 * KIB);\n}\n\n#[bench]\nfn bench_atonce_0016_kib(b: &mut Bencher) {\n    bench_atonce(b, 16 * KIB);\n}\n\n#[bench]\nfn bench_atonce_0032_kib(b: &mut Bencher) {\n    bench_atonce(b, 32 * KIB);\n}\n\n#[bench]\nfn bench_atonce_0064_kib(b: &mut Bencher) {\n    bench_atonce(b, 64 * KIB);\n}\n\n#[bench]\nfn bench_atonce_0128_kib(b: &mut Bencher) {\n    bench_atonce(b, 128 * KIB);\n}\n\n#[bench]\nfn bench_atonce_0256_kib(b: &mut Bencher) {\n    bench_atonce(b, 256 * KIB);\n}\n\n#[bench]\nfn bench_atonce_0512_kib(b: &mut Bencher) {\n    bench_atonce(b, 512 * KIB);\n}\n\n#[bench]\nfn bench_atonce_1024_kib(b: &mut Bencher) {\n    bench_atonce(b, 1024 * KIB);\n}\n\nfn bench_incremental(b: &mut Bencher, len: usize) {\n    let mut input = RandomInput::new(b, len);\n    b.iter(|| blake3::Hasher::new().update(input.get()).finalize());\n}\n\n#[bench]\nfn bench_incremental_0001_block(b: &mut Bencher) {\n    bench_incremental(b, BLOCK_LEN);\n}\n\n#[bench]\nfn bench_incremental_0001_kib(b: &mut Bencher) {\n    bench_incremental(b, 1 * KIB);\n}\n\n#[bench]\nfn bench_incremental_0002_kib(b: &mut Bencher) {\n    bench_incremental(b, 2 * KIB);\n}\n\n#[bench]\nfn bench_incremental_0004_kib(b: &mut Bencher) {\n    bench_incremental(b, 4 * KIB);\n}\n\n#[bench]\nfn bench_incremental_0008_kib(b: &mut Bencher) {\n    bench_incremental(b, 8 * KIB);\n}\n\n#[bench]\nfn bench_incremental_0016_kib(b: &mut Bencher) {\n    bench_incremental(b, 16 * KIB);\n}\n\n#[bench]\nfn bench_incremental_0032_kib(b: &mut Bencher) {\n    bench_incremental(b, 32 * KIB);\n}\n\n#[bench]\nfn bench_incremental_0064_kib(b: &mut Bencher) {\n    bench_incremental(b, 64 * KIB);\n}\n\n#[bench]\nfn bench_incremental_0128_kib(b: &mut Bencher) {\n    bench_incremental(b, 128 * KIB);\n}\n\n#[bench]\nfn bench_incremental_0256_kib(b: &mut Bencher) {\n    bench_incremental(b, 256 * KIB);\n}\n\n#[bench]\nfn bench_incremental_0512_kib(b: &mut Bencher) {\n    bench_incremental(b, 512 * KIB);\n}\n\n#[bench]\nfn bench_incremental_1024_kib(b: &mut Bencher) {\n    bench_incremental(b, 1024 * KIB);\n}\n\nfn bench_reference(b: &mut Bencher, len: usize) {\n    let mut input = RandomInput::new(b, len);\n    b.iter(|| {\n        let mut hasher = reference_impl::Hasher::new();\n        hasher.update(input.get());\n        let mut out = [0; 32];\n        hasher.finalize(&mut out);\n        out\n    });\n}\n\n#[bench]\nfn bench_reference_0001_block(b: &mut Bencher) {\n    bench_reference(b, BLOCK_LEN);\n}\n\n#[bench]\nfn bench_reference_0001_kib(b: &mut Bencher) {\n    bench_reference(b, 1 * KIB);\n}\n\n#[bench]\nfn bench_reference_0002_kib(b: &mut Bencher) {\n    bench_reference(b, 2 * KIB);\n}\n\n#[bench]\nfn bench_reference_0004_kib(b: &mut Bencher) {\n    bench_reference(b, 4 * KIB);\n}\n\n#[bench]\nfn bench_reference_0008_kib(b: &mut Bencher) {\n    bench_reference(b, 8 * KIB);\n}\n\n#[bench]\nfn bench_reference_0016_kib(b: &mut Bencher) {\n    bench_reference(b, 16 * KIB);\n}\n\n#[bench]\nfn bench_reference_0032_kib(b: &mut Bencher) {\n    bench_reference(b, 32 * KIB);\n}\n\n#[bench]\nfn bench_reference_0064_kib(b: &mut Bencher) {\n    bench_reference(b, 64 * KIB);\n}\n\n#[bench]\nfn bench_reference_0128_kib(b: &mut Bencher) {\n    bench_reference(b, 128 * KIB);\n}\n\n#[bench]\nfn bench_reference_0256_kib(b: &mut Bencher) {\n    bench_reference(b, 256 * KIB);\n}\n\n#[bench]\nfn bench_reference_0512_kib(b: &mut Bencher) {\n    bench_reference(b, 512 * KIB);\n}\n\n#[bench]\nfn bench_reference_1024_kib(b: &mut Bencher) {\n    bench_reference(b, 1024 * KIB);\n}\n\n#[cfg(feature = \"rayon\")]\nfn bench_rayon(b: &mut Bencher, len: usize) {\n    let mut input = RandomInput::new(b, len);\n    b.iter(|| blake3::Hasher::new().update_rayon(input.get()).finalize());\n}\n\n#[bench]\n#[cfg(feature = \"rayon\")]\nfn bench_rayon_0001_block(b: &mut Bencher) {\n    bench_rayon(b, BLOCK_LEN);\n}\n\n#[bench]\n#[cfg(feature = \"rayon\")]\nfn bench_rayon_0001_kib(b: &mut Bencher) {\n    bench_rayon(b, 1 * KIB);\n}\n\n#[bench]\n#[cfg(feature = \"rayon\")]\nfn bench_rayon_0002_kib(b: &mut Bencher) {\n    bench_rayon(b, 2 * KIB);\n}\n\n#[bench]\n#[cfg(feature = \"rayon\")]\nfn bench_rayon_0004_kib(b: &mut Bencher) {\n    bench_rayon(b, 4 * KIB);\n}\n\n#[bench]\n#[cfg(feature = \"rayon\")]\nfn bench_rayon_0008_kib(b: &mut Bencher) {\n    bench_rayon(b, 8 * KIB);\n}\n\n#[bench]\n#[cfg(feature = \"rayon\")]\nfn bench_rayon_0016_kib(b: &mut Bencher) {\n    bench_rayon(b, 16 * KIB);\n}\n\n#[bench]\n#[cfg(feature = \"rayon\")]\nfn bench_rayon_0032_kib(b: &mut Bencher) {\n    bench_rayon(b, 32 * KIB);\n}\n\n#[bench]\n#[cfg(feature = \"rayon\")]\nfn bench_rayon_0064_kib(b: &mut Bencher) {\n    bench_rayon(b, 64 * KIB);\n}\n\n#[bench]\n#[cfg(feature = \"rayon\")]\nfn bench_rayon_0128_kib(b: &mut Bencher) {\n    bench_rayon(b, 128 * KIB);\n}\n\n#[bench]\n#[cfg(feature = \"rayon\")]\nfn bench_rayon_0256_kib(b: &mut Bencher) {\n    bench_rayon(b, 256 * KIB);\n}\n\n#[bench]\n#[cfg(feature = \"rayon\")]\nfn bench_rayon_0512_kib(b: &mut Bencher) {\n    bench_rayon(b, 512 * KIB);\n}\n\n#[bench]\n#[cfg(feature = \"rayon\")]\nfn bench_rayon_1024_kib(b: &mut Bencher) {\n    bench_rayon(b, 1024 * KIB);\n}\n\n// This checks that update() splits up its input in increasing powers of 2, so\n// that it can recover a high degree of parallelism when the number of bytes\n// hashed so far is uneven. The performance of this benchmark should be\n// reasonably close to bench_incremental_0064_kib, within 80% or so. When we\n// had a bug in this logic (https://github.com/BLAKE3-team/BLAKE3/issues/69),\n// performance was less than half.\n#[bench]\nfn bench_two_updates(b: &mut Bencher) {\n    let len = 65536;\n    let mut input = RandomInput::new(b, len);\n    b.iter(|| {\n        let mut hasher = blake3::Hasher::new();\n        let input = input.get();\n        hasher.update(&input[..1]);\n        hasher.update(&input[1..]);\n        hasher.finalize()\n    });\n}\n\nfn bench_xof(b: &mut Bencher, len: usize) {\n    b.bytes = len as u64;\n    let mut output = [0u8; 64 * BLOCK_LEN];\n    let output_slice = &mut output[..len];\n    let mut xof = blake3::Hasher::new().finalize_xof();\n    b.iter(|| xof.fill(output_slice));\n}\n\n#[bench]\nfn bench_xof_01_block(b: &mut Bencher) {\n    bench_xof(b, 1 * BLOCK_LEN);\n}\n\n#[bench]\nfn bench_xof_02_blocks(b: &mut Bencher) {\n    bench_xof(b, 2 * BLOCK_LEN);\n}\n\n#[bench]\nfn bench_xof_03_blocks(b: &mut Bencher) {\n    bench_xof(b, 3 * BLOCK_LEN);\n}\n\n#[bench]\nfn bench_xof_04_blocks(b: &mut Bencher) {\n    bench_xof(b, 4 * BLOCK_LEN);\n}\n\n#[bench]\nfn bench_xof_05_blocks(b: &mut Bencher) {\n    bench_xof(b, 5 * BLOCK_LEN);\n}\n\n#[bench]\nfn bench_xof_06_blocks(b: &mut Bencher) {\n    bench_xof(b, 6 * BLOCK_LEN);\n}\n\n#[bench]\nfn bench_xof_07_blocks(b: &mut Bencher) {\n    bench_xof(b, 7 * BLOCK_LEN);\n}\n\n#[bench]\nfn bench_xof_08_blocks(b: &mut Bencher) {\n    bench_xof(b, 8 * BLOCK_LEN);\n}\n\n#[bench]\nfn bench_xof_09_blocks(b: &mut Bencher) {\n    bench_xof(b, 9 * BLOCK_LEN);\n}\n\n#[bench]\nfn bench_xof_10_blocks(b: &mut Bencher) {\n    bench_xof(b, 10 * BLOCK_LEN);\n}\n\n#[bench]\nfn bench_xof_11_blocks(b: &mut Bencher) {\n    bench_xof(b, 11 * BLOCK_LEN);\n}\n\n#[bench]\nfn bench_xof_12_blocks(b: &mut Bencher) {\n    bench_xof(b, 12 * BLOCK_LEN);\n}\n\n#[bench]\nfn bench_xof_13_blocks(b: &mut Bencher) {\n    bench_xof(b, 13 * BLOCK_LEN);\n}\n\n#[bench]\nfn bench_xof_14_blocks(b: &mut Bencher) {\n    bench_xof(b, 14 * BLOCK_LEN);\n}\n\n#[bench]\nfn bench_xof_15_blocks(b: &mut Bencher) {\n    bench_xof(b, 15 * BLOCK_LEN);\n}\n\n#[bench]\nfn bench_xof_16_blocks(b: &mut Bencher) {\n    bench_xof(b, 16 * BLOCK_LEN);\n}\n\n#[bench]\nfn bench_xof_32_blocks(b: &mut Bencher) {\n    bench_xof(b, 32 * BLOCK_LEN);\n}\n\n#[bench]\nfn bench_xof_64_blocks(b: &mut Bencher) {\n    bench_xof(b, 64 * BLOCK_LEN);\n}\n"
  },
  {
    "path": "third-party/blake3/build.rs",
    "content": "use std::env;\n\nfn defined(var: &str) -> bool {\n    println!(\"cargo:rerun-if-env-changed={}\", var);\n    env::var_os(var).is_some()\n}\n\nfn is_pure() -> bool {\n    defined(\"CARGO_FEATURE_PURE\")\n}\n\nfn should_prefer_intrinsics() -> bool {\n    defined(\"CARGO_FEATURE_PREFER_INTRINSICS\")\n}\n\nfn is_neon() -> bool {\n    defined(\"CARGO_FEATURE_NEON\")\n}\n\nfn is_no_neon() -> bool {\n    defined(\"CARGO_FEATURE_NO_NEON\")\n}\n\nfn is_wasm32_simd() -> bool {\n    defined(\"CARGO_FEATURE_WASM32_SIMD\")\n}\n\nfn is_ci() -> bool {\n    defined(\"BLAKE3_CI\")\n}\n\nfn warn(warning: &str) {\n    assert!(!warning.contains(\"\\n\"));\n    println!(\"cargo:warning={}\", warning);\n    if is_ci() {\n        println!(\"cargo:warning=Warnings in CI are treated as errors. Build failed.\");\n        std::process::exit(1);\n    }\n}\n\nfn target_components() -> Vec<String> {\n    let target = env::var(\"TARGET\").unwrap();\n    target.split(\"-\").map(|s| s.to_string()).collect()\n}\n\nfn is_x86_64() -> bool {\n    target_components()[0] == \"x86_64\"\n}\n\nfn is_windows_target() -> bool {\n    env::var(\"CARGO_CFG_TARGET_OS\").unwrap() == \"windows\"\n}\n\nfn use_msvc_asm() -> bool {\n    const MSVC_NAMES: &[&str] = &[\"\", \"cl\", \"cl.exe\"];\n    let target_os = env::var(\"CARGO_CFG_TARGET_OS\").unwrap_or_default();\n    let target_env = env::var(\"CARGO_CFG_TARGET_ENV\").unwrap_or_default();\n    let target_windows_msvc = target_os == \"windows\" && target_env == \"msvc\";\n    let host_triple = env::var(\"HOST\").unwrap_or_default();\n    let target_triple = env::var(\"TARGET\").unwrap_or_default();\n    let cross_compiling = host_triple != target_triple;\n    let cc = env::var(\"CC\").unwrap_or_default().to_ascii_lowercase();\n    if !target_windows_msvc {\n        // We are not building for Windows with the MSVC toolchain.\n        false\n    } else if !cross_compiling && MSVC_NAMES.contains(&&*cc) {\n        // We are building on Windows with the MSVC toolchain (and not cross-compiling for another architecture or target).\n        true\n    } else {\n        // We are cross-compiling to Windows with the MSVC toolchain.\n        let target_arch = env::var(\"CARGO_CFG_TARGET_ARCH\").unwrap_or_default();\n        let target_vendor = env::var(\"CARGO_CFG_TARGET_VENDOR\").unwrap_or_default();\n        let cc = env::var(format!(\"CC_{target_arch}_{target_vendor}_windows_msvc\"))\n            .unwrap_or_default()\n            .to_ascii_lowercase();\n        // Check if we are using the MSVC compiler.\n        MSVC_NAMES.contains(&&*cc)\n    }\n}\n\nfn is_x86_32() -> bool {\n    let arch = &target_components()[0];\n    arch == \"i386\" || arch == \"i586\" || arch == \"i686\"\n}\n\nfn is_arm() -> bool {\n    is_armv7() || is_aarch64() || target_components()[0] == \"arm\"\n}\n\nfn is_aarch64() -> bool {\n    target_components()[0] == \"aarch64\"\n}\n\nfn is_armv7() -> bool {\n    target_components()[0] == \"armv7\"\n}\n\nfn is_wasm32() -> bool {\n    target_components()[0] == \"wasm32\"\n}\n\nfn endianness() -> String {\n    let endianness = env::var(\"CARGO_CFG_TARGET_ENDIAN\").unwrap();\n    assert!(endianness == \"little\" || endianness == \"big\");\n    endianness\n}\n\nfn is_little_endian() -> bool {\n    endianness() == \"little\"\n}\n\nfn is_big_endian() -> bool {\n    endianness() == \"big\"\n}\n\n// Windows targets may be using the MSVC toolchain or the MinGW toolchain. The\n// right compiler flags to use depend on the toolchain. (And we don't want to\n// use flag_if_supported, because we don't want features to be silently\n// disabled by old compilers.)\nfn is_windows_msvc() -> bool {\n    // Some targets are only two components long, so check in steps.\n    let second_component = &target_components()[1];\n    (second_component == \"pc\" || second_component == \"win7\")\n        && target_components()[2] == \"windows\"\n        && target_components()[3] == \"msvc\"\n}\n\n// MinGW toolchain uses 2 different targets depending on the main compiler.\n// Target for a general MinGW toolchain ends with `-gnu` (GCC is used as C\n// compiler). Target for a LLVM-MinGW toolchain (Clang is used as C compiler)\n// ends with `-gnullvm`.\nfn is_windows_gnu() -> bool {\n    // Some targets are only two components long, so check in steps.\n    let second_component = &target_components()[1];\n    (second_component == \"pc\" || second_component == \"win7\")\n        && target_components()[2] == \"windows\"\n        && target_components()[3] != \"msvc\"\n}\n\nfn new_build() -> cc::Build {\n    let mut build = cc::Build::new();\n    if !is_windows_msvc() {\n        build.flag(\"-std=c11\");\n    }\n    // Do NOT trigger a rebuild any time the env changes (e.g. $PATH).\n    // This prevents all downstream crates from being rebuilt when `cargo check`\n    // or `cargo build` are run in different environments, like Rust Analyzer\n    // vs. in the terminal vs. in a Git pre-commit hook.\n    build.emit_rerun_if_env_changed(false);\n    build\n}\n\n#[derive(PartialEq)]\nenum CCompilerSupport {\n    NoCompiler,\n    NoAVX512,\n    YesAVX512,\n}\nuse CCompilerSupport::*;\n\nfn c_compiler_support() -> CCompilerSupport {\n    let build = new_build();\n    let flags_checked;\n    let support_result: Result<bool, _> = if is_windows_msvc() {\n        flags_checked = \"/arch:AVX512\";\n        build.is_flag_supported(\"/arch:AVX512\")\n    } else {\n        // Check for both of the flags we use. If -mavx512f works, then -mavx512vl\n        // will probably always work too, but we might as well be thorough.\n        flags_checked = \"-mavx512f and -mavx512vl\";\n        match build.is_flag_supported(\"-mavx512f\") {\n            Ok(true) => build.is_flag_supported(\"-mavx512vl\"),\n            false_or_error => false_or_error,\n        }\n    };\n    match support_result {\n        Ok(true) => YesAVX512,\n        Ok(false) => {\n            warn(&format!(\n                \"The C compiler {:?} does not support {}.\",\n                build.get_compiler().path(),\n                flags_checked,\n            ));\n            NoAVX512\n        }\n        Err(e) => {\n            println!(\"{:?}\", e);\n            warn(&format!(\n                \"No C compiler {:?} detected.\",\n                build.get_compiler().path()\n            ));\n            NoCompiler\n        }\n    }\n}\n\nfn build_sse2_sse41_avx2_rust_intrinsics() {\n    // No C code to compile here. Set the cfg flags that enable the Rust SSE2,\n    // SSE4.1, and AVX2 intrinsics modules. The regular Cargo build will compile\n    // them.\n    println!(\"cargo:rustc-cfg=blake3_sse2_rust\");\n    println!(\"cargo:rustc-cfg=blake3_sse41_rust\");\n    println!(\"cargo:rustc-cfg=blake3_avx2_rust\");\n}\n\nfn build_sse2_sse41_avx2_assembly() {\n    // Build the assembly implementations for SSE4.1 and AVX2. This is\n    // preferred, but it only supports x86_64.\n    assert!(is_x86_64());\n    println!(\"cargo:rustc-cfg=blake3_sse2_ffi\");\n    println!(\"cargo:rustc-cfg=blake3_sse41_ffi\");\n    println!(\"cargo:rustc-cfg=blake3_avx2_ffi\");\n    let mut build = new_build();\n    if is_windows_target() {\n        if use_msvc_asm() {\n            build.file(\"c/blake3_sse2_x86-64_windows_msvc.asm\");\n            build.file(\"c/blake3_sse41_x86-64_windows_msvc.asm\");\n            build.file(\"c/blake3_avx2_x86-64_windows_msvc.asm\");\n        } else {\n            build.file(\"c/blake3_sse2_x86-64_windows_gnu.S\");\n            build.file(\"c/blake3_sse41_x86-64_windows_gnu.S\");\n            build.file(\"c/blake3_avx2_x86-64_windows_gnu.S\");\n        }\n    } else {\n        // All non-Windows implementations are assumed to support\n        // Linux-style assembly. These files do contain a small\n        // explicit workaround for macOS also.\n        build.file(\"c/blake3_sse2_x86-64_unix.S\");\n        build.file(\"c/blake3_sse41_x86-64_unix.S\");\n        build.file(\"c/blake3_avx2_x86-64_unix.S\");\n    }\n    build.compile(\"blake3_sse2_sse41_avx2_assembly\");\n}\n\nfn build_avx512_c_intrinsics() {\n    // This is required on 32-bit x86 targets, since the assembly\n    // implementation doesn't support those.\n    println!(\"cargo:rustc-cfg=blake3_avx512_ffi\");\n    let mut build = new_build();\n    build.file(\"c/blake3_avx512.c\");\n    if is_windows_msvc() {\n        build.flag(\"/arch:AVX512\");\n    } else {\n        build.flag(\"-mavx512f\");\n        build.flag(\"-mavx512vl\");\n    }\n    if is_windows_gnu() {\n        // Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65782.\n        build.flag(\"-fno-asynchronous-unwind-tables\");\n    }\n    build.compile(\"blake3_avx512_intrinsics\");\n}\n\nfn build_avx512_assembly() {\n    // Build the assembly implementation for AVX-512. This is preferred, but it\n    // only supports x86_64.\n    assert!(is_x86_64());\n    println!(\"cargo:rustc-cfg=blake3_avx512_ffi\");\n    let mut build = new_build();\n    let mut is_msvc = false;\n    if is_windows_target() {\n        if use_msvc_asm() {\n            build.file(\"c/blake3_avx512_x86-64_windows_msvc.asm\");\n            is_msvc = true;\n        } else {\n            build.file(\"c/blake3_avx512_x86-64_windows_gnu.S\");\n        }\n    } else {\n        build.file(\"c/blake3_avx512_x86-64_unix.S\");\n    }\n\n    // Older versions of Clang require these flags, even for assembly. See\n    // https://github.com/BLAKE3-team/BLAKE3/issues/79.\n    if !is_msvc {\n        build.flag(\"-mavx512f\");\n        build.flag(\"-mavx512vl\");\n    }\n    build.compile(\"blake3_avx512_assembly\");\n}\n\nfn build_neon_c_intrinsics() {\n    let mut build = new_build();\n    // Note that blake3_neon.c normally depends on the blake3_portable.c\n    // for the single-instance compression function, but we expose\n    // portable.rs over FFI instead. See ffi_neon.rs.\n    build.file(\"c/blake3_neon.c\");\n    // ARMv7 platforms that support NEON generally need the following\n    // flags. AArch64 supports NEON by default and does not support -mpfu.\n    if is_armv7() {\n        build.flag(\"-mfpu=neon-vfpv4\");\n        build.flag(\"-mfloat-abi=hard\");\n    }\n    build.compile(\"blake3_neon\");\n}\n\nfn build_wasm32_simd() {\n    assert!(is_wasm32());\n    // No C code to compile here. Set the cfg flags that enable the Wasm SIMD.\n    // The regular Cargo build will compile it.\n    println!(\"cargo:rustc-cfg=blake3_wasm32_simd\");\n}\n\nfn main() -> Result<(), Box<dyn std::error::Error>> {\n    // As of Rust 1.80, unrecognized config names are warnings. Give Cargo all of our config names.\n    let all_cfgs = [\n        \"blake3_sse2_ffi\",\n        \"blake3_sse2_rust\",\n        \"blake3_sse41_ffi\",\n        \"blake3_sse41_rust\",\n        \"blake3_avx2_ffi\",\n        \"blake3_avx2_rust\",\n        \"blake3_avx512_ffi\",\n        \"blake3_neon\",\n        \"blake3_wasm32_simd\",\n    ];\n    for cfg_name in all_cfgs {\n        // TODO: Switch this whole file to the new :: syntax when our MSRV reaches 1.77.\n        // https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script\n        println!(\"cargo:rustc-check-cfg=cfg({cfg_name}, values(none()))\");\n    }\n\n    if is_pure() && is_neon() {\n        panic!(\"It doesn't make sense to enable both \\\"pure\\\" and \\\"neon\\\".\");\n    }\n\n    if is_no_neon() && is_neon() {\n        panic!(\"It doesn't make sense to enable both \\\"no_neon\\\" and \\\"neon\\\".\");\n    }\n\n    if is_x86_64() || is_x86_32() {\n        let support = c_compiler_support();\n        if is_x86_32() || should_prefer_intrinsics() || is_pure() || support == NoCompiler {\n            build_sse2_sse41_avx2_rust_intrinsics();\n        } else {\n            // We assume that all C compilers can assemble SSE4.1 and AVX2. We\n            // don't explicitly check for support.\n            build_sse2_sse41_avx2_assembly();\n        }\n\n        if is_pure() || support == NoCompiler || support == NoAVX512 {\n            // The binary will not include any AVX-512 code.\n        } else if is_x86_32() || should_prefer_intrinsics() {\n            build_avx512_c_intrinsics();\n        } else {\n            build_avx512_assembly();\n        }\n    }\n\n    if is_neon() && is_big_endian() {\n        panic!(\"The NEON implementation doesn't support big-endian ARM.\")\n    }\n\n    if (is_arm() && is_neon())\n        || (!is_no_neon() && !is_pure() && is_aarch64() && is_little_endian())\n    {\n        println!(\"cargo:rustc-cfg=blake3_neon\");\n        build_neon_c_intrinsics();\n    }\n\n    if is_wasm32() && is_wasm32_simd() {\n        build_wasm32_simd();\n    }\n\n    // The `cc` crate doesn't automatically emit rerun-if directives for the\n    // environment variables it supports, in particular for $CC. We expect to\n    // do a lot of benchmarking across different compilers, so we explicitly\n    // add the variables that we're likely to need.\n    println!(\"cargo:rerun-if-env-changed=CC\");\n    println!(\"cargo:rerun-if-env-changed=CFLAGS\");\n\n    // Ditto for source files, though these shouldn't change as often.\n    for file in std::fs::read_dir(\"c\")? {\n        println!(\n            \"cargo:rerun-if-changed={}\",\n            file?.path().to_str().expect(\"utf-8\")\n        );\n    }\n\n    // When compiling with clang-cl for windows, it adds .asm files to the root\n    // which we need to delete so cargo doesn't get angry\n    if is_windows_target() && !use_msvc_asm() {\n        let _ = std::fs::remove_file(\"blake3_avx2_x86-64_windows_gnu.asm\");\n        let _ = std::fs::remove_file(\"blake3_avx512_x86-64_windows_gnu.asm\");\n        let _ = std::fs::remove_file(\"blake3_sse2_x86-64_windows_gnu.asm\");\n        let _ = std::fs::remove_file(\"blake3_sse41_x86-64_windows_gnu.asm\");\n    }\n\n    Ok(())\n}\n"
  },
  {
    "path": "third-party/blake3/reference_impl/Cargo.toml",
    "content": "[package]\nname = \"reference_impl\"\nversion = \"0.0.0\"\nedition = \"2021\"\n\n[lib]\nname = \"reference_impl\"\npath = \"reference_impl.rs\"\n"
  },
  {
    "path": "third-party/blake3/reference_impl/README.md",
    "content": "This is the reference implementation of BLAKE3. It is used for testing and\nas a readable example of the algorithms involved. Section 5.1 of [the BLAKE3\nspec](https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf)\ndiscusses this implementation. You can render docs for this implementation\nby running `cargo doc --open` in this directory.\n\nThis implementation is a single file\n([`reference_impl.rs`](reference_impl.rs)) with no dependencies. It is\nnot optimized for performance.\n\nThere are ports of this reference implementation to other languages:\n\n- [C](https://github.com/oconnor663/blake3_reference_impl_c)\n- [Python](https://github.com/oconnor663/pure_python_blake3)\n"
  },
  {
    "path": "third-party/blake3/reference_impl/reference_impl.rs",
    "content": "//! This is the reference implementation of BLAKE3. It is used for testing and\n//! as a readable example of the algorithms involved. Section 5.1 of [the BLAKE3\n//! spec](https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf)\n//! discusses this implementation. You can render docs for this implementation\n//! by running `cargo doc --open` in this directory.\n//!\n//! # Example\n//!\n//! ```\n//! let mut hasher = reference_impl::Hasher::new();\n//! hasher.update(b\"abc\");\n//! hasher.update(b\"def\");\n//! let mut hash = [0; 32];\n//! hasher.finalize(&mut hash);\n//! let mut extended_hash = [0; 500];\n//! hasher.finalize(&mut extended_hash);\n//! assert_eq!(hash, extended_hash[..32]);\n//! ```\n\nuse core::cmp::min;\n\nconst OUT_LEN: usize = 32;\nconst KEY_LEN: usize = 32;\nconst BLOCK_LEN: usize = 64;\nconst CHUNK_LEN: usize = 1024;\n\nconst CHUNK_START: u32 = 1 << 0;\nconst CHUNK_END: u32 = 1 << 1;\nconst PARENT: u32 = 1 << 2;\nconst ROOT: u32 = 1 << 3;\nconst KEYED_HASH: u32 = 1 << 4;\nconst DERIVE_KEY_CONTEXT: u32 = 1 << 5;\nconst DERIVE_KEY_MATERIAL: u32 = 1 << 6;\n\nconst IV: [u32; 8] = [\n    0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19,\n];\n\nconst MSG_PERMUTATION: [usize; 16] = [2, 6, 3, 10, 7, 0, 4, 13, 1, 11, 12, 5, 9, 14, 15, 8];\n\n// The mixing function, G, which mixes either a column or a diagonal.\nfn g(state: &mut [u32; 16], a: usize, b: usize, c: usize, d: usize, mx: u32, my: u32) {\n    state[a] = state[a].wrapping_add(state[b]).wrapping_add(mx);\n    state[d] = (state[d] ^ state[a]).rotate_right(16);\n    state[c] = state[c].wrapping_add(state[d]);\n    state[b] = (state[b] ^ state[c]).rotate_right(12);\n    state[a] = state[a].wrapping_add(state[b]).wrapping_add(my);\n    state[d] = (state[d] ^ state[a]).rotate_right(8);\n    state[c] = state[c].wrapping_add(state[d]);\n    state[b] = (state[b] ^ state[c]).rotate_right(7);\n}\n\nfn round(state: &mut [u32; 16], m: &[u32; 16]) {\n    // Mix the columns.\n    g(state, 0, 4, 8, 12, m[0], m[1]);\n    g(state, 1, 5, 9, 13, m[2], m[3]);\n    g(state, 2, 6, 10, 14, m[4], m[5]);\n    g(state, 3, 7, 11, 15, m[6], m[7]);\n    // Mix the diagonals.\n    g(state, 0, 5, 10, 15, m[8], m[9]);\n    g(state, 1, 6, 11, 12, m[10], m[11]);\n    g(state, 2, 7, 8, 13, m[12], m[13]);\n    g(state, 3, 4, 9, 14, m[14], m[15]);\n}\n\nfn permute(m: &mut [u32; 16]) {\n    let mut permuted = [0; 16];\n    for i in 0..16 {\n        permuted[i] = m[MSG_PERMUTATION[i]];\n    }\n    *m = permuted;\n}\n\nfn compress(\n    chaining_value: &[u32; 8],\n    block_words: &[u32; 16],\n    counter: u64,\n    block_len: u32,\n    flags: u32,\n) -> [u32; 16] {\n    let counter_low = counter as u32;\n    let counter_high = (counter >> 32) as u32;\n    #[rustfmt::skip]\n    let mut state = [\n        chaining_value[0], chaining_value[1], chaining_value[2], chaining_value[3],\n        chaining_value[4], chaining_value[5], chaining_value[6], chaining_value[7],\n        IV[0],             IV[1],             IV[2],             IV[3],\n        counter_low,       counter_high,      block_len,         flags,\n    ];\n    let mut block = *block_words;\n\n    round(&mut state, &block); // round 1\n    permute(&mut block);\n    round(&mut state, &block); // round 2\n    permute(&mut block);\n    round(&mut state, &block); // round 3\n    permute(&mut block);\n    round(&mut state, &block); // round 4\n    permute(&mut block);\n    round(&mut state, &block); // round 5\n    permute(&mut block);\n    round(&mut state, &block); // round 6\n    permute(&mut block);\n    round(&mut state, &block); // round 7\n\n    for i in 0..8 {\n        state[i] ^= state[i + 8];\n        state[i + 8] ^= chaining_value[i];\n    }\n    state\n}\n\nfn first_8_words(compression_output: [u32; 16]) -> [u32; 8] {\n    compression_output[0..8].try_into().unwrap()\n}\n\nfn words_from_little_endian_bytes(bytes: &[u8], words: &mut [u32]) {\n    debug_assert_eq!(bytes.len(), 4 * words.len());\n    for (four_bytes, word) in bytes.chunks_exact(4).zip(words) {\n        *word = u32::from_le_bytes(four_bytes.try_into().unwrap());\n    }\n}\n\n// Each chunk or parent node can produce either an 8-word chaining value or, by\n// setting the ROOT flag, any number of final output bytes. The Output struct\n// captures the state just prior to choosing between those two possibilities.\nstruct Output {\n    input_chaining_value: [u32; 8],\n    block_words: [u32; 16],\n    counter: u64,\n    block_len: u32,\n    flags: u32,\n}\n\nimpl Output {\n    fn chaining_value(&self) -> [u32; 8] {\n        first_8_words(compress(\n            &self.input_chaining_value,\n            &self.block_words,\n            self.counter,\n            self.block_len,\n            self.flags,\n        ))\n    }\n\n    fn root_output_bytes(&self, out_slice: &mut [u8]) {\n        let mut output_block_counter = 0;\n        for out_block in out_slice.chunks_mut(2 * OUT_LEN) {\n            let words = compress(\n                &self.input_chaining_value,\n                &self.block_words,\n                output_block_counter,\n                self.block_len,\n                self.flags | ROOT,\n            );\n            // The output length might not be a multiple of 4.\n            for (word, out_word) in words.iter().zip(out_block.chunks_mut(4)) {\n                out_word.copy_from_slice(&word.to_le_bytes()[..out_word.len()]);\n            }\n            output_block_counter += 1;\n        }\n    }\n}\n\nstruct ChunkState {\n    chaining_value: [u32; 8],\n    chunk_counter: u64,\n    block: [u8; BLOCK_LEN],\n    block_len: u8,\n    blocks_compressed: u8,\n    flags: u32,\n}\n\nimpl ChunkState {\n    fn new(key_words: [u32; 8], chunk_counter: u64, flags: u32) -> Self {\n        Self {\n            chaining_value: key_words,\n            chunk_counter,\n            block: [0; BLOCK_LEN],\n            block_len: 0,\n            blocks_compressed: 0,\n            flags,\n        }\n    }\n\n    fn len(&self) -> usize {\n        BLOCK_LEN * self.blocks_compressed as usize + self.block_len as usize\n    }\n\n    fn start_flag(&self) -> u32 {\n        if self.blocks_compressed == 0 {\n            CHUNK_START\n        } else {\n            0\n        }\n    }\n\n    fn update(&mut self, mut input: &[u8]) {\n        while !input.is_empty() {\n            // If the block buffer is full, compress it and clear it. More\n            // input is coming, so this compression is not CHUNK_END.\n            if self.block_len as usize == BLOCK_LEN {\n                let mut block_words = [0; 16];\n                words_from_little_endian_bytes(&self.block, &mut block_words);\n                self.chaining_value = first_8_words(compress(\n                    &self.chaining_value,\n                    &block_words,\n                    self.chunk_counter,\n                    BLOCK_LEN as u32,\n                    self.flags | self.start_flag(),\n                ));\n                self.blocks_compressed += 1;\n                self.block = [0; BLOCK_LEN];\n                self.block_len = 0;\n            }\n\n            // Copy input bytes into the block buffer.\n            let want = BLOCK_LEN - self.block_len as usize;\n            let take = min(want, input.len());\n            self.block[self.block_len as usize..][..take].copy_from_slice(&input[..take]);\n            self.block_len += take as u8;\n            input = &input[take..];\n        }\n    }\n\n    fn output(&self) -> Output {\n        let mut block_words = [0; 16];\n        words_from_little_endian_bytes(&self.block, &mut block_words);\n        Output {\n            input_chaining_value: self.chaining_value,\n            block_words,\n            counter: self.chunk_counter,\n            block_len: self.block_len as u32,\n            flags: self.flags | self.start_flag() | CHUNK_END,\n        }\n    }\n}\n\nfn parent_output(\n    left_child_cv: [u32; 8],\n    right_child_cv: [u32; 8],\n    key_words: [u32; 8],\n    flags: u32,\n) -> Output {\n    let mut block_words = [0; 16];\n    block_words[..8].copy_from_slice(&left_child_cv);\n    block_words[8..].copy_from_slice(&right_child_cv);\n    Output {\n        input_chaining_value: key_words,\n        block_words,\n        counter: 0,                  // Always 0 for parent nodes.\n        block_len: BLOCK_LEN as u32, // Always BLOCK_LEN (64) for parent nodes.\n        flags: PARENT | flags,\n    }\n}\n\nfn parent_cv(\n    left_child_cv: [u32; 8],\n    right_child_cv: [u32; 8],\n    key_words: [u32; 8],\n    flags: u32,\n) -> [u32; 8] {\n    parent_output(left_child_cv, right_child_cv, key_words, flags).chaining_value()\n}\n\n/// An incremental hasher that can accept any number of writes.\npub struct Hasher {\n    chunk_state: ChunkState,\n    key_words: [u32; 8],\n    cv_stack: [[u32; 8]; 54], // Space for 54 subtree chaining values:\n    cv_stack_len: u8,         // 2^54 * CHUNK_LEN = 2^64\n    flags: u32,\n}\n\nimpl Hasher {\n    fn new_internal(key_words: [u32; 8], flags: u32) -> Self {\n        Self {\n            chunk_state: ChunkState::new(key_words, 0, flags),\n            key_words,\n            cv_stack: [[0; 8]; 54],\n            cv_stack_len: 0,\n            flags,\n        }\n    }\n\n    /// Construct a new `Hasher` for the regular hash function.\n    pub fn new() -> Self {\n        Self::new_internal(IV, 0)\n    }\n\n    /// Construct a new `Hasher` for the keyed hash function.\n    pub fn new_keyed(key: &[u8; KEY_LEN]) -> Self {\n        let mut key_words = [0; 8];\n        words_from_little_endian_bytes(key, &mut key_words);\n        Self::new_internal(key_words, KEYED_HASH)\n    }\n\n    /// Construct a new `Hasher` for the key derivation function. The context\n    /// string should be hardcoded, globally unique, and application-specific.\n    pub fn new_derive_key(context: &str) -> Self {\n        let mut context_hasher = Self::new_internal(IV, DERIVE_KEY_CONTEXT);\n        context_hasher.update(context.as_bytes());\n        let mut context_key = [0; KEY_LEN];\n        context_hasher.finalize(&mut context_key);\n        let mut context_key_words = [0; 8];\n        words_from_little_endian_bytes(&context_key, &mut context_key_words);\n        Self::new_internal(context_key_words, DERIVE_KEY_MATERIAL)\n    }\n\n    fn push_stack(&mut self, cv: [u32; 8]) {\n        self.cv_stack[self.cv_stack_len as usize] = cv;\n        self.cv_stack_len += 1;\n    }\n\n    fn pop_stack(&mut self) -> [u32; 8] {\n        self.cv_stack_len -= 1;\n        self.cv_stack[self.cv_stack_len as usize]\n    }\n\n    // Section 5.1.2 of the BLAKE3 spec explains this algorithm in more detail.\n    fn add_chunk_chaining_value(&mut self, mut new_cv: [u32; 8], mut total_chunks: u64) {\n        // This chunk might complete some subtrees. For each completed subtree,\n        // its left child will be the current top entry in the CV stack, and\n        // its right child will be the current value of `new_cv`. Pop each left\n        // child off the stack, merge it with `new_cv`, and overwrite `new_cv`\n        // with the result. After all these merges, push the final value of\n        // `new_cv` onto the stack. The number of completed subtrees is given\n        // by the number of trailing 0-bits in the new total number of chunks.\n        while total_chunks & 1 == 0 {\n            new_cv = parent_cv(self.pop_stack(), new_cv, self.key_words, self.flags);\n            total_chunks >>= 1;\n        }\n        self.push_stack(new_cv);\n    }\n\n    /// Add input to the hash state. This can be called any number of times.\n    pub fn update(&mut self, mut input: &[u8]) {\n        while !input.is_empty() {\n            // If the current chunk is complete, finalize it and reset the\n            // chunk state. More input is coming, so this chunk is not ROOT.\n            if self.chunk_state.len() == CHUNK_LEN {\n                let chunk_cv = self.chunk_state.output().chaining_value();\n                let total_chunks = self.chunk_state.chunk_counter + 1;\n                self.add_chunk_chaining_value(chunk_cv, total_chunks);\n                self.chunk_state = ChunkState::new(self.key_words, total_chunks, self.flags);\n            }\n\n            // Compress input bytes into the current chunk state.\n            let want = CHUNK_LEN - self.chunk_state.len();\n            let take = min(want, input.len());\n            self.chunk_state.update(&input[..take]);\n            input = &input[take..];\n        }\n    }\n\n    /// Finalize the hash and write any number of output bytes.\n    pub fn finalize(&self, out_slice: &mut [u8]) {\n        // Starting with the Output from the current chunk, compute all the\n        // parent chaining values along the right edge of the tree, until we\n        // have the root Output.\n        let mut output = self.chunk_state.output();\n        let mut parent_nodes_remaining = self.cv_stack_len as usize;\n        while parent_nodes_remaining > 0 {\n            parent_nodes_remaining -= 1;\n            output = parent_output(\n                self.cv_stack[parent_nodes_remaining],\n                output.chaining_value(),\n                self.key_words,\n                self.flags,\n            );\n        }\n        output.root_output_bytes(out_slice);\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/src/ffi_avx2.rs",
    "content": "use crate::{CVWords, IncrementCounter, BLOCK_LEN, OUT_LEN};\n\n// Note that there is no AVX2 implementation of compress_in_place or\n// compress_xof.\n\n// Unsafe because this may only be called on platforms supporting AVX2.\npub unsafe fn hash_many<const N: usize>(\n    inputs: &[&[u8; N]],\n    key: &CVWords,\n    counter: u64,\n    increment_counter: IncrementCounter,\n    flags: u8,\n    flags_start: u8,\n    flags_end: u8,\n    out: &mut [u8],\n) {\n    unsafe {\n        // The Rust hash_many implementations do bounds checking on the `out`\n        // array, but the C implementations don't. Even though this is an unsafe\n        // function, assert the bounds here.\n        assert!(out.len() >= inputs.len() * OUT_LEN);\n        ffi::blake3_hash_many_avx2(\n            inputs.as_ptr() as *const *const u8,\n            inputs.len(),\n            N / BLOCK_LEN,\n            key.as_ptr(),\n            counter,\n            increment_counter.yes(),\n            flags,\n            flags_start,\n            flags_end,\n            out.as_mut_ptr(),\n        )\n    }\n}\n\npub mod ffi {\n    extern \"C\" {\n        pub fn blake3_hash_many_avx2(\n            inputs: *const *const u8,\n            num_inputs: usize,\n            blocks: usize,\n            key: *const u32,\n            counter: u64,\n            increment_counter: bool,\n            flags: u8,\n            flags_start: u8,\n            flags_end: u8,\n            out: *mut u8,\n        );\n    }\n}\n\n#[cfg(test)]\nmod test {\n    use super::*;\n\n    #[test]\n    fn test_hash_many() {\n        if !crate::platform::avx2_detected() {\n            return;\n        }\n        crate::test::test_hash_many_fn(hash_many, hash_many);\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/src/ffi_avx512.rs",
    "content": "use crate::{CVWords, IncrementCounter, BLOCK_LEN, OUT_LEN};\n\n// Unsafe because this may only be called on platforms supporting AVX-512.\npub unsafe fn compress_in_place(\n    cv: &mut CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n) {\n    unsafe {\n        ffi::blake3_compress_in_place_avx512(\n            cv.as_mut_ptr(),\n            block.as_ptr(),\n            block_len,\n            counter,\n            flags,\n        )\n    }\n}\n\n// Unsafe because this may only be called on platforms supporting AVX-512.\npub unsafe fn compress_xof(\n    cv: &CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n) -> [u8; 64] {\n    unsafe {\n        let mut out = [0u8; 64];\n        ffi::blake3_compress_xof_avx512(\n            cv.as_ptr(),\n            block.as_ptr(),\n            block_len,\n            counter,\n            flags,\n            out.as_mut_ptr(),\n        );\n        out\n    }\n}\n\n// Unsafe because this may only be called on platforms supporting AVX-512.\npub unsafe fn hash_many<const N: usize>(\n    inputs: &[&[u8; N]],\n    key: &CVWords,\n    counter: u64,\n    increment_counter: IncrementCounter,\n    flags: u8,\n    flags_start: u8,\n    flags_end: u8,\n    out: &mut [u8],\n) {\n    unsafe {\n        // The Rust hash_many implementations do bounds checking on the `out`\n        // array, but the C implementations don't. Even though this is an unsafe\n        // function, assert the bounds here.\n        assert!(out.len() >= inputs.len() * OUT_LEN);\n        ffi::blake3_hash_many_avx512(\n            inputs.as_ptr() as *const *const u8,\n            inputs.len(),\n            N / BLOCK_LEN,\n            key.as_ptr(),\n            counter,\n            increment_counter.yes(),\n            flags,\n            flags_start,\n            flags_end,\n            out.as_mut_ptr(),\n        )\n    }\n}\n\n// Unsafe because this may only be called on platforms supporting AVX-512.\n#[cfg(unix)]\npub unsafe fn xof_many(\n    cv: &CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n    out: &mut [u8],\n) {\n    unsafe {\n        debug_assert_eq!(0, out.len() % BLOCK_LEN, \"whole blocks only\");\n        ffi::blake3_xof_many_avx512(\n            cv.as_ptr(),\n            block.as_ptr(),\n            block_len,\n            counter,\n            flags,\n            out.as_mut_ptr(),\n            out.len() / BLOCK_LEN,\n        );\n    }\n}\n\npub mod ffi {\n    extern \"C\" {\n        pub fn blake3_compress_in_place_avx512(\n            cv: *mut u32,\n            block: *const u8,\n            block_len: u8,\n            counter: u64,\n            flags: u8,\n        );\n        pub fn blake3_compress_xof_avx512(\n            cv: *const u32,\n            block: *const u8,\n            block_len: u8,\n            counter: u64,\n            flags: u8,\n            out: *mut u8,\n        );\n        pub fn blake3_hash_many_avx512(\n            inputs: *const *const u8,\n            num_inputs: usize,\n            blocks: usize,\n            key: *const u32,\n            counter: u64,\n            increment_counter: bool,\n            flags: u8,\n            flags_start: u8,\n            flags_end: u8,\n            out: *mut u8,\n        );\n        #[cfg(unix)]\n        pub fn blake3_xof_many_avx512(\n            cv: *const u32,\n            block: *const u8,\n            block_len: u8,\n            counter: u64,\n            flags: u8,\n            out: *mut u8,\n            outblocks: usize,\n        );\n    }\n}\n\n#[cfg(test)]\nmod test {\n    use super::*;\n\n    #[test]\n    fn test_compress() {\n        if !crate::platform::avx512_detected() {\n            return;\n        }\n        crate::test::test_compress_fn(compress_in_place, compress_xof);\n    }\n\n    #[test]\n    fn test_hash_many() {\n        if !crate::platform::avx512_detected() {\n            return;\n        }\n        crate::test::test_hash_many_fn(hash_many, hash_many);\n    }\n\n    #[cfg(unix)]\n    #[test]\n    fn test_xof_many() {\n        if !crate::platform::avx512_detected() {\n            return;\n        }\n        crate::test::test_xof_many_fn(xof_many);\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/src/ffi_neon.rs",
    "content": "use crate::{CVWords, IncrementCounter, BLOCK_LEN, OUT_LEN};\n\n// Unsafe because this may only be called on platforms supporting NEON.\npub unsafe fn hash_many<const N: usize>(\n    inputs: &[&[u8; N]],\n    key: &CVWords,\n    counter: u64,\n    increment_counter: IncrementCounter,\n    flags: u8,\n    flags_start: u8,\n    flags_end: u8,\n    out: &mut [u8],\n) {\n    // The Rust hash_many implementations do bounds checking on the `out`\n    // array, but the C implementations don't. Even though this is an unsafe\n    // function, assert the bounds here.\n    assert!(out.len() >= inputs.len() * OUT_LEN);\n    ffi::blake3_hash_many_neon(\n        inputs.as_ptr() as *const *const u8,\n        inputs.len(),\n        N / BLOCK_LEN,\n        key.as_ptr(),\n        counter,\n        increment_counter.yes(),\n        flags,\n        flags_start,\n        flags_end,\n        out.as_mut_ptr(),\n    )\n}\n\n// blake3_neon.c normally depends on blake3_portable.c, because the NEON\n// implementation only provides 4x compression, and it relies on the portable\n// implementation for 1x compression. However, we expose the portable Rust\n// implementation here instead, to avoid linking in unnecessary code.\n#[no_mangle]\npub extern \"C\" fn blake3_compress_in_place_portable(\n    cv: *mut u32,\n    block: *const u8,\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n) {\n    unsafe {\n        crate::portable::compress_in_place(\n            &mut *(cv as *mut [u32; 8]),\n            &*(block as *const [u8; 64]),\n            block_len,\n            counter,\n            flags,\n        )\n    }\n}\n\npub mod ffi {\n    extern \"C\" {\n        pub fn blake3_hash_many_neon(\n            inputs: *const *const u8,\n            num_inputs: usize,\n            blocks: usize,\n            key: *const u32,\n            counter: u64,\n            increment_counter: bool,\n            flags: u8,\n            flags_start: u8,\n            flags_end: u8,\n            out: *mut u8,\n        );\n    }\n}\n\n#[cfg(test)]\nmod test {\n    use super::*;\n\n    #[test]\n    fn test_hash_many() {\n        // This entire file is gated on feature=\"neon\", so NEON support is\n        // assumed here.\n        crate::test::test_hash_many_fn(hash_many, hash_many);\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/src/ffi_sse2.rs",
    "content": "use crate::{CVWords, IncrementCounter, BLOCK_LEN, OUT_LEN};\n\n// Unsafe because this may only be called on platforms supporting SSE2.\npub unsafe fn compress_in_place(\n    cv: &mut CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n) {\n    unsafe {\n        ffi::blake3_compress_in_place_sse2(\n            cv.as_mut_ptr(),\n            block.as_ptr(),\n            block_len,\n            counter,\n            flags,\n        )\n    }\n}\n\n// Unsafe because this may only be called on platforms supporting SSE2.\npub unsafe fn compress_xof(\n    cv: &CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n) -> [u8; 64] {\n    unsafe {\n        let mut out = [0u8; 64];\n        ffi::blake3_compress_xof_sse2(\n            cv.as_ptr(),\n            block.as_ptr(),\n            block_len,\n            counter,\n            flags,\n            out.as_mut_ptr(),\n        );\n        out\n    }\n}\n\n// Unsafe because this may only be called on platforms supporting SSE2.\npub unsafe fn hash_many<const N: usize>(\n    inputs: &[&[u8; N]],\n    key: &CVWords,\n    counter: u64,\n    increment_counter: IncrementCounter,\n    flags: u8,\n    flags_start: u8,\n    flags_end: u8,\n    out: &mut [u8],\n) {\n    unsafe {\n        // The Rust hash_many implementations do bounds checking on the `out`\n        // array, but the C implementations don't. Even though this is an unsafe\n        // function, assert the bounds here.\n        assert!(out.len() >= inputs.len() * OUT_LEN);\n        ffi::blake3_hash_many_sse2(\n            inputs.as_ptr() as *const *const u8,\n            inputs.len(),\n            N / BLOCK_LEN,\n            key.as_ptr(),\n            counter,\n            increment_counter.yes(),\n            flags,\n            flags_start,\n            flags_end,\n            out.as_mut_ptr(),\n        )\n    }\n}\n\npub mod ffi {\n    extern \"C\" {\n        pub fn blake3_compress_in_place_sse2(\n            cv: *mut u32,\n            block: *const u8,\n            block_len: u8,\n            counter: u64,\n            flags: u8,\n        );\n        pub fn blake3_compress_xof_sse2(\n            cv: *const u32,\n            block: *const u8,\n            block_len: u8,\n            counter: u64,\n            flags: u8,\n            out: *mut u8,\n        );\n        pub fn blake3_hash_many_sse2(\n            inputs: *const *const u8,\n            num_inputs: usize,\n            blocks: usize,\n            key: *const u32,\n            counter: u64,\n            increment_counter: bool,\n            flags: u8,\n            flags_start: u8,\n            flags_end: u8,\n            out: *mut u8,\n        );\n    }\n}\n\n#[cfg(test)]\nmod test {\n    use super::*;\n\n    #[test]\n    fn test_compress() {\n        if !crate::platform::sse2_detected() {\n            return;\n        }\n        crate::test::test_compress_fn(compress_in_place, compress_xof);\n    }\n\n    #[test]\n    fn test_hash_many() {\n        if !crate::platform::sse2_detected() {\n            return;\n        }\n        crate::test::test_hash_many_fn(hash_many, hash_many);\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/src/ffi_sse41.rs",
    "content": "use crate::{CVWords, IncrementCounter, BLOCK_LEN, OUT_LEN};\n\n// Unsafe because this may only be called on platforms supporting SSE4.1.\npub unsafe fn compress_in_place(\n    cv: &mut CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n) {\n    unsafe {\n        ffi::blake3_compress_in_place_sse41(\n            cv.as_mut_ptr(),\n            block.as_ptr(),\n            block_len,\n            counter,\n            flags,\n        )\n    }\n}\n\n// Unsafe because this may only be called on platforms supporting SSE4.1.\npub unsafe fn compress_xof(\n    cv: &CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n) -> [u8; 64] {\n    unsafe {\n        let mut out = [0u8; 64];\n        ffi::blake3_compress_xof_sse41(\n            cv.as_ptr(),\n            block.as_ptr(),\n            block_len,\n            counter,\n            flags,\n            out.as_mut_ptr(),\n        );\n        out\n    }\n}\n\n// Unsafe because this may only be called on platforms supporting SSE4.1.\npub unsafe fn hash_many<const N: usize>(\n    inputs: &[&[u8; N]],\n    key: &CVWords,\n    counter: u64,\n    increment_counter: IncrementCounter,\n    flags: u8,\n    flags_start: u8,\n    flags_end: u8,\n    out: &mut [u8],\n) {\n    unsafe {\n        // The Rust hash_many implementations do bounds checking on the `out`\n        // array, but the C implementations don't. Even though this is an unsafe\n        // function, assert the bounds here.\n        assert!(out.len() >= inputs.len() * OUT_LEN);\n        ffi::blake3_hash_many_sse41(\n            inputs.as_ptr() as *const *const u8,\n            inputs.len(),\n            N / BLOCK_LEN,\n            key.as_ptr(),\n            counter,\n            increment_counter.yes(),\n            flags,\n            flags_start,\n            flags_end,\n            out.as_mut_ptr(),\n        )\n    }\n}\n\npub mod ffi {\n    extern \"C\" {\n        pub fn blake3_compress_in_place_sse41(\n            cv: *mut u32,\n            block: *const u8,\n            block_len: u8,\n            counter: u64,\n            flags: u8,\n        );\n        pub fn blake3_compress_xof_sse41(\n            cv: *const u32,\n            block: *const u8,\n            block_len: u8,\n            counter: u64,\n            flags: u8,\n            out: *mut u8,\n        );\n        pub fn blake3_hash_many_sse41(\n            inputs: *const *const u8,\n            num_inputs: usize,\n            blocks: usize,\n            key: *const u32,\n            counter: u64,\n            increment_counter: bool,\n            flags: u8,\n            flags_start: u8,\n            flags_end: u8,\n            out: *mut u8,\n        );\n    }\n}\n\n#[cfg(test)]\nmod test {\n    use super::*;\n\n    #[test]\n    fn test_compress() {\n        if !crate::platform::sse41_detected() {\n            return;\n        }\n        crate::test::test_compress_fn(compress_in_place, compress_xof);\n    }\n\n    #[test]\n    fn test_hash_many() {\n        if !crate::platform::sse41_detected() {\n            return;\n        }\n        crate::test::test_hash_many_fn(hash_many, hash_many);\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/src/guts.rs",
    "content": "//! Deprecated in favor of [`hazmat`](crate::hazmat)\n\npub use crate::{BLOCK_LEN, CHUNK_LEN};\n\n#[derive(Clone, Debug)]\npub struct ChunkState(crate::ChunkState);\n\nimpl ChunkState {\n    // Currently this type only supports the regular hash mode. If an\n    // incremental user needs keyed_hash or derive_key, we can add that.\n    pub fn new(chunk_counter: u64) -> Self {\n        Self(crate::ChunkState::new(\n            crate::IV,\n            chunk_counter,\n            0,\n            crate::platform::Platform::detect(),\n        ))\n    }\n\n    #[inline]\n    pub fn len(&self) -> usize {\n        self.0.count()\n    }\n\n    #[inline]\n    pub fn update(&mut self, input: &[u8]) -> &mut Self {\n        self.0.update(input);\n        self\n    }\n\n    pub fn finalize(&self, is_root: bool) -> crate::Hash {\n        let output = self.0.output();\n        if is_root {\n            output.root_hash()\n        } else {\n            output.chaining_value().into()\n        }\n    }\n}\n\n// As above, this currently assumes the regular hash mode. If an incremental\n// user needs keyed_hash or derive_key, we can add that.\npub fn parent_cv(\n    left_child: &crate::Hash,\n    right_child: &crate::Hash,\n    is_root: bool,\n) -> crate::Hash {\n    let output = crate::parent_node_output(\n        left_child.as_bytes(),\n        right_child.as_bytes(),\n        crate::IV,\n        0,\n        crate::platform::Platform::detect(),\n    );\n    if is_root {\n        output.root_hash()\n    } else {\n        output.chaining_value().into()\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/src/hazmat.rs",
    "content": "//! Low-level tree manipulations and other sharp tools\n//!\n//! The target audience for this module is projects like [Bao](https://github.com/oconnor663/bao),\n//! which work directly with the interior hashes (\"chaining values\") of BLAKE3 chunks and subtrees.\n//! For example, you could use these functions to implement a BitTorrent-like protocol using the\n//! BLAKE3 tree structure, or to hash an input that's distributed across different machines. These\n//! use cases are advanced, and most applications don't need this module. Also:\n//!\n//! <div class=\"warning\">\n//!\n//! **Warning:** This module is *hazardous material*. If you've heard folks say *don't roll your\n//! own crypto,* this is the sort of thing they're talking about. These functions have complicated\n//! requirements, and any mistakes will give you garbage output and/or break the security\n//! properties that BLAKE3 is supposed to have. Read section 2.1 of [the BLAKE3\n//! paper](https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf) to understand the\n//! tree structure you need to maintain. Test your code against [`blake3::hash`](../fn.hash.html)\n//! and make sure you can get the same outputs for [lots of different\n//! inputs](https://github.com/BLAKE3-team/BLAKE3/blob/master/test_vectors/test_vectors.json).\n//!\n//! </div>\n//!\n//! On the other hand:\n//!\n//! <div class=\"warning\">\n//!\n//! **Encouragement:** Playing with these functions is a great way to learn how BLAKE3 works on the\n//! inside. Have fun!\n//!\n//! </div>\n//!\n//! The main entrypoint for this module is the [`HasherExt`] trait, particularly the\n//! [`set_input_offset`](HasherExt::set_input_offset) and\n//! [`finalize_non_root`](HasherExt::finalize_non_root) methods. These let you compute the chaining\n//! values of individual chunks or subtrees. You then combine these chaining values into larger\n//! subtrees using [`merge_subtrees_non_root`] and finally (once at the very top)\n//! [`merge_subtrees_root`] or [`merge_subtrees_root_xof`].\n//!\n//! # Examples\n//!\n//! Here's an example of computing all the interior hashes in a 3-chunk tree:\n//!\n//! ```text\n//!            root\n//!          /      \\\n//!      parent      \\\n//!    /       \\      \\\n//! chunk0  chunk1  chunk2\n//! ```\n//!\n//! ```\n//! # fn main() {\n//! use blake3::{Hasher, CHUNK_LEN};\n//! use blake3::hazmat::{merge_subtrees_non_root, merge_subtrees_root, Mode};\n//! use blake3::hazmat::HasherExt; // an extension trait for Hasher\n//!\n//! let chunk0 = [b'a'; CHUNK_LEN];\n//! let chunk1 = [b'b'; CHUNK_LEN];\n//! let chunk2 = [b'c'; 42]; // The final chunk can be short.\n//!\n//! // Compute the non-root hashes (\"chaining values\") of all three chunks. Chunks or subtrees\n//! // that don't begin at the start of the input use `set_input_offset` to say where they begin.\n//! let chunk0_cv = Hasher::new()\n//!     // .set_input_offset(0) is the default.\n//!     .update(&chunk0)\n//!     .finalize_non_root();\n//! let chunk1_cv = Hasher::new()\n//!     .set_input_offset(CHUNK_LEN as u64)\n//!     .update(&chunk1)\n//!     .finalize_non_root();\n//! let chunk2_cv = Hasher::new()\n//!     .set_input_offset(2 * CHUNK_LEN as u64)\n//!     .update(&chunk2)\n//!     .finalize_non_root();\n//!\n//! // Join the first two chunks with a non-root parent node and compute its chaining value.\n//! let parent_cv = merge_subtrees_non_root(&chunk0_cv, &chunk1_cv, Mode::Hash);\n//!\n//! // Join that parent node and the third chunk with a root parent node and compute the hash.\n//! let root_hash = merge_subtrees_root(&parent_cv, &chunk2_cv, Mode::Hash);\n//!\n//! // Double check that we got the right answer.\n//! let mut combined_input = Vec::new();\n//! combined_input.extend_from_slice(&chunk0);\n//! combined_input.extend_from_slice(&chunk1);\n//! combined_input.extend_from_slice(&chunk2);\n//! assert_eq!(root_hash, blake3::hash(&combined_input));\n//! # }\n//! ```\n//!\n//! Hashing many chunks together is important for performance, because it allows the implementation\n//! to use SIMD parallelism internally. ([AVX-512](https://en.wikipedia.org/wiki/AVX-512) for\n//! example needs 16 chunks to really get going.) We can reproduce `parent_cv` by hashing `chunk0`\n//! and `chunk1` at the same time:\n//!\n//! ```\n//! # fn main() {\n//! # use blake3::{Hasher, CHUNK_LEN};\n//! # use blake3::hazmat::{Mode, HasherExt, merge_subtrees_non_root, merge_subtrees_root};\n//! # let chunk0 = [b'a'; CHUNK_LEN];\n//! # let chunk1 = [b'b'; CHUNK_LEN];\n//! # let chunk0_cv = Hasher::new().update(&chunk0).finalize_non_root();\n//! # let chunk1_cv = Hasher::new().set_input_offset(CHUNK_LEN as u64).update(&chunk1).finalize_non_root();\n//! # let parent_cv = merge_subtrees_non_root(&chunk0_cv, &chunk1_cv, Mode::Hash);\n//! # let mut combined_input = Vec::new();\n//! # combined_input.extend_from_slice(&chunk0);\n//! # combined_input.extend_from_slice(&chunk1);\n//! let left_subtree_cv = Hasher::new()\n//!     // .set_input_offset(0) is the default.\n//!     .update(&combined_input[..2 * CHUNK_LEN])\n//!     .finalize_non_root();\n//! assert_eq!(left_subtree_cv, parent_cv);\n//!\n//! // Using multiple updates gives the same answer, though it's not as efficient.\n//! let mut subtree_hasher = Hasher::new();\n//! // Again, .set_input_offset(0) is the default.\n//! subtree_hasher.update(&chunk0);\n//! subtree_hasher.update(&chunk1);\n//! assert_eq!(left_subtree_cv, subtree_hasher.finalize_non_root());\n//! # }\n//! ```\n//!\n//! However, hashing multiple chunks together **must** respect the overall tree structure. Hashing\n//! `chunk0` and `chunk1` together is valid, but hashing `chunk1` and `chunk2` together is\n//! incorrect and gives a garbage result that will never match a standard BLAKE3 hash. The\n//! implementation includes a few best-effort asserts to catch some of these mistakes, but these\n//! checks aren't guaranteed. For example, this second call to `update` currently panics:\n//!\n//! ```should_panic\n//! # fn main() {\n//! # use blake3::{Hasher, CHUNK_LEN};\n//! # use blake3::hazmat::HasherExt;\n//! # let chunk0 = [b'a'; CHUNK_LEN];\n//! # let chunk1 = [b'b'; CHUNK_LEN];\n//! # let chunk2 = [b'c'; 42];\n//! let oops = Hasher::new()\n//!     .set_input_offset(CHUNK_LEN as u64)\n//!     .update(&chunk1)\n//!     // PANIC: \"the subtree starting at 1024 contains at most 1024 bytes\"\n//!     .update(&chunk2)\n//!     .finalize_non_root();\n//! # }\n//! ```\n//!\n//! For more on valid tree structures, see the docs for and [`left_subtree_len`] and\n//! [`max_subtree_len`], and see section 2.1 of [the BLAKE3\n//! paper](https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf). Note that the\n//! merging functions ([`merge_subtrees_root`] and friends) don't know the shape of the left and\n//! right subtrees you're giving them, and they can't help you catch mistakes. The best way to\n//! catch mistakes with these is to compare your root output to the [`blake3::hash`](crate::hash)\n//! of the same input.\n\nuse crate::platform::Platform;\nuse crate::{CVWords, Hasher, CHUNK_LEN, IV, KEY_LEN, OUT_LEN};\n\n/// Extension methods for [`Hasher`]. This is the main entrypoint to the `hazmat` module.\npub trait HasherExt {\n    /// Similar to [`Hasher::new_derive_key`] but using a pre-hashed [`ContextKey`] from\n    /// [`hash_derive_key_context`].\n    ///\n    /// The [`hash_derive_key_context`] function is _only_ valid source of the [`ContextKey`]\n    ///\n    /// # Example\n    ///\n    /// ```\n    /// use blake3::Hasher;\n    /// use blake3::hazmat::HasherExt;\n    ///\n    /// let context_key = blake3::hazmat::hash_derive_key_context(\"foo\");\n    /// let mut hasher = Hasher::new_from_context_key(&context_key);\n    /// hasher.update(b\"bar\");\n    /// let derived_key = *hasher.finalize().as_bytes();\n    ///\n    /// assert_eq!(derived_key, blake3::derive_key(\"foo\", b\"bar\"));\n    /// ```\n    fn new_from_context_key(context_key: &ContextKey) -> Self;\n\n    /// Configure the `Hasher` to process a chunk or subtree starting at `offset` bytes into the\n    /// whole input.\n    ///\n    /// You must call this function before processing any input with [`update`](Hasher::update) or\n    /// similar. This step isn't required for the first chunk, or for a subtree that includes the\n    /// first chunk (i.e. when the `offset` is zero), but it's required for all other chunks and\n    /// subtrees.\n    ///\n    /// The starting input offset of a subtree implies a maximum possible length for that subtree.\n    /// See [`max_subtree_len`] and section 2.1 of [the BLAKE3\n    /// paper](https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf). Note that only\n    /// subtrees along the right edge of the whole tree can have a length less than their maximum\n    /// possible length.\n    ///\n    /// See the [module level examples](index.html#examples).\n    ///\n    /// # Panics\n    ///\n    /// This function panics if the `Hasher` has already accepted any input with\n    /// [`update`](Hasher::update) or similar.\n    ///\n    /// This should always be paired with [`finalize_non_root`](HasherExt::finalize_non_root). It's\n    /// never correct to use a non-zero input offset with [`finalize`](Hasher::finalize) or\n    /// [`finalize_xof`](Hasher::finalize_xof). The `offset` must also be a multiple of\n    /// `CHUNK_LEN`. Violating either of these rules will currently fail an assertion and panic,\n    /// but this is not guaranteed.\n    fn set_input_offset(&mut self, offset: u64) -> &mut Self;\n\n    /// Finalize the non-root hash (\"chaining value\") of the current chunk or subtree.\n    ///\n    /// Afterwards you can merge subtree chaining values into parent nodes using\n    /// [`merge_subtrees_non_root`] and ultimately into the root node with either\n    /// [`merge_subtrees_root`] (similar to [`Hasher::finalize`]) or [`merge_subtrees_root_xof`]\n    /// (similar to [`Hasher::finalize_xof`]).\n    ///\n    /// See the [module level examples](index.html#examples), particularly the discussion of valid\n    /// tree structures.\n    fn finalize_non_root(&self) -> ChainingValue;\n}\n\nimpl HasherExt for Hasher {\n    fn new_from_context_key(context_key: &[u8; KEY_LEN]) -> Hasher {\n        let context_key_words = crate::platform::words_from_le_bytes_32(context_key);\n        Hasher::new_internal(&context_key_words, crate::DERIVE_KEY_MATERIAL)\n    }\n\n    fn set_input_offset(&mut self, offset: u64) -> &mut Hasher {\n        assert_eq!(self.count(), 0, \"hasher has already accepted input\");\n        assert_eq!(\n            offset % CHUNK_LEN as u64,\n            0,\n            \"offset ({offset}) must be a chunk boundary (divisible by {CHUNK_LEN})\",\n        );\n        let counter = offset / CHUNK_LEN as u64;\n        self.chunk_state.chunk_counter = counter;\n        self.initial_chunk_counter = counter;\n        self\n    }\n\n    fn finalize_non_root(&self) -> ChainingValue {\n        assert_ne!(self.count(), 0, \"empty subtrees are never valid\");\n        self.final_output().chaining_value()\n    }\n}\n\n/// The maximum length of a subtree in bytes, given its starting offset in bytes\n///\n/// If you try to hash more than this many bytes as one subtree, you'll end up merging parent nodes\n/// that shouldn't be merged, and your output will be garbage. [`Hasher::update`] will currently\n/// panic in this case, but this is not guaranteed.\n///\n/// For input offset zero (the default), there is no maximum length, and this function returns\n/// `None`. For all other offsets it returns `Some`. Note that valid offsets must be a multiple of\n/// [`CHUNK_LEN`] (1024); it's not possible to start hashing a chunk in the middle.\n///\n/// In the example tree below, chunks are numbered by their _0-based index_. The subtree that\n/// _starts_ with chunk 3, i.e. `input_offset = 3 * CHUNK_LEN`, includes only that one chunk, so\n/// its max length is `Some(CHUNK_LEN)`. The subtree that starts with chunk 6 includes chunk 7 but\n/// not chunk 8, so its max length is `Some(2 * CHUNK_LEN)`. The subtree that starts with chunk 12\n/// includes chunks 13, 14, and 15, but if the tree were bigger it would not include chunk 16, so\n/// its max length is `Some(4 * CHUNK_LEN)`. One way to think about the rule here is that, if you\n/// go beyond the max subtree length from a given starting offset, you start dealing with subtrees\n/// that include chunks _to the left_ of where you started.\n///\n/// ```text\n///                           root\n///                 /                       \\\n///              .                             .\n///        /           \\                 /           \\\n///       .             .               .             .\n///    /    \\         /    \\         /    \\         /    \\\n///   .      .       .      .       .      .       .      .\n///  / \\    / \\     / \\    / \\     / \\    / \\     / \\    / \\\n/// 0  1   2  3    4  5   6  7    8  9   10 11   12 13  14 15\n/// ```\n///\n/// The general rule turns out to be that for a subtree starting at a 0-based chunk index N greater\n/// than zero, the maximum number of chunks in that subtree is the largest power-of-two that\n/// divides N, which is given by `1 << N.trailing_zeros()`.\n///\n/// This function can be useful for writing tests or debug assertions, but it's actually rare to\n/// use this for real control flow. Callers who split their input recursively using\n/// [`left_subtree_len`] will automatically satisfy the `max_subtree_len` bound and don't\n/// necessarily need to check. It's also common to choose some fixed power-of-two subtree size, say\n/// 64 chunks, and divide your input up into slices of that fixed length (with the final slice\n/// possibly short). This approach also automatically satisfies the `max_subtree_len` bound and\n/// doesn't need to check. Proving that this is true can be an interesting exercise. Note that\n/// chunks 0, 4, 8, and 12 all begin subtrees of at least 4 chunks in the example tree above.\n///\n/// # Panics\n///\n/// This function currently panics if `input_offset` is not a multiple of `CHUNK_LEN`. This is not\n/// guaranteed.\n#[inline(always)]\npub fn max_subtree_len(input_offset: u64) -> Option<u64> {\n    if input_offset == 0 {\n        return None;\n    }\n    assert_eq!(input_offset % CHUNK_LEN as u64, 0);\n    let counter = input_offset / CHUNK_LEN as u64;\n    let max_chunks = 1 << counter.trailing_zeros();\n    Some(max_chunks * CHUNK_LEN as u64)\n}\n\n#[test]\nfn test_max_subtree_len() {\n    assert_eq!(max_subtree_len(0), None);\n    // (chunk index, max chunks)\n    let cases = [\n        (1, 1),\n        (2, 2),\n        (3, 1),\n        (4, 4),\n        (5, 1),\n        (6, 2),\n        (7, 1),\n        (8, 8),\n    ];\n    for (chunk_index, max_chunks) in cases {\n        let input_offset = chunk_index * CHUNK_LEN as u64;\n        assert_eq!(\n            max_subtree_len(input_offset),\n            Some(max_chunks * CHUNK_LEN as u64),\n        );\n    }\n}\n\n/// Given the length in bytes of either a complete input or a subtree input, return the number of\n/// bytes that belong to its left child subtree. The rest belong to its right child subtree.\n///\n/// Concretely, this function returns the largest power-of-two number of bytes that's strictly less\n/// than `input_len`. This leads to a tree where all left subtrees are \"complete\" and at least as\n/// large as their sibling right subtrees, as specified in section 2.1 of [the BLAKE3\n/// paper](https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf). For example, if an\n/// input is exactly two chunks, its left and right subtrees both get one chunk. But if an input is\n/// two chunks plus one more byte, then its left subtree gets two chunks, and its right subtree\n/// only gets one byte.\n///\n/// This function isn't meaningful for one chunk of input, because chunks don't have children. It\n/// currently panics in debug mode if `input_len <= CHUNK_LEN`.\n///\n/// # Example\n///\n/// Hash a input of random length as two subtrees:\n///\n/// ```\n/// # #[cfg(feature = \"std\")] {\n/// use blake3::hazmat::{left_subtree_len, merge_subtrees_root, HasherExt, Mode};\n/// use blake3::{Hasher, CHUNK_LEN};\n///\n/// // Generate a random-length input. Note that to be split into two subtrees, the input length\n/// // must be greater than CHUNK_LEN.\n/// let input_len = rand::random_range(CHUNK_LEN + 1..1_000_000);\n/// let mut input = vec![0; input_len];\n/// rand::fill(&mut input[..]);\n///\n/// // Compute the left and right subtree hashes and then the root hash. left_subtree_len() tells\n/// // us exactly where to split the input. Any other split would either panic (if we're lucky) or\n/// // lead to an incorrect root hash.\n/// let left_len = left_subtree_len(input_len as u64) as usize;\n/// let left_subtree_cv = Hasher::new()\n///     .update(&input[..left_len])\n///     .finalize_non_root();\n/// let right_subtree_cv = Hasher::new()\n///     .set_input_offset(left_len as u64)\n///     .update(&input[left_len..])\n///     .finalize_non_root();\n/// let root_hash = merge_subtrees_root(&left_subtree_cv, &right_subtree_cv, Mode::Hash);\n///\n/// // Double check the answer.\n/// assert_eq!(root_hash, blake3::hash(&input));\n/// # }\n/// ```\n#[inline(always)]\npub fn left_subtree_len(input_len: u64) -> u64 {\n    debug_assert!(input_len > CHUNK_LEN as u64);\n    // Note that .next_power_of_two() is greater than *or equal*.\n    ((input_len + 1) / 2).next_power_of_two()\n}\n\n#[test]\nfn test_left_subtree_len() {\n    assert_eq!(left_subtree_len(1025), 1024);\n    for boundary_case in [2, 4, 8, 16, 32, 64] {\n        let input_len = boundary_case * CHUNK_LEN as u64;\n        assert_eq!(left_subtree_len(input_len - 1), input_len / 2);\n        assert_eq!(left_subtree_len(input_len), input_len / 2);\n        assert_eq!(left_subtree_len(input_len + 1), input_len);\n    }\n}\n\n/// The `mode` argument to [`merge_subtrees_root`] and friends\n///\n/// See the [module level examples](index.html#examples).\n#[derive(Copy, Clone, Debug)]\npub enum Mode<'a> {\n    /// Corresponding to [`hash`](crate::hash)\n    Hash,\n\n    /// Corresponding to [`keyed_hash`](crate::hash)\n    KeyedHash(&'a [u8; KEY_LEN]),\n\n    /// Corresponding to [`derive_key`](crate::hash)\n    ///\n    /// The [`ContextKey`] comes from [`hash_derive_key_context`].\n    DeriveKeyMaterial(&'a ContextKey),\n}\n\nimpl<'a> Mode<'a> {\n    fn key_words(&self) -> CVWords {\n        match self {\n            Mode::Hash => *IV,\n            Mode::KeyedHash(key) => crate::platform::words_from_le_bytes_32(key),\n            Mode::DeriveKeyMaterial(cx_key) => crate::platform::words_from_le_bytes_32(cx_key),\n        }\n    }\n\n    fn flags_byte(&self) -> u8 {\n        match self {\n            Mode::Hash => 0,\n            Mode::KeyedHash(_) => crate::KEYED_HASH,\n            Mode::DeriveKeyMaterial(_) => crate::DERIVE_KEY_MATERIAL,\n        }\n    }\n}\n\n/// \"Chaining value\" is the academic term for a non-root or non-final hash.\n///\n/// Besides just sounding fancy, it turns out there are [security\n/// reasons](https://jacko.io/tree_hashing.html) to be careful about the difference between\n/// (root/final) hashes and (non-root/non-final) chaining values.\npub type ChainingValue = [u8; OUT_LEN];\n\nfn merge_subtrees_inner(\n    left_child: &ChainingValue,\n    right_child: &ChainingValue,\n    mode: Mode,\n) -> crate::Output {\n    crate::parent_node_output(\n        &left_child,\n        &right_child,\n        &mode.key_words(),\n        mode.flags_byte(),\n        Platform::detect(),\n    )\n}\n\n/// Compute a non-root parent node chaining value from two child chaining values.\n///\n/// See the [module level examples](index.html#examples), particularly the discussion of valid tree\n/// structures. The left and right child chaining values can come from either\n/// [`Hasher::finalize_non_root`](HasherExt::finalize_non_root) or other calls to\n/// `merge_subtrees_non_root`. \"Chaining value\" is the academic term for a non-root or non-final\n/// hash.\npub fn merge_subtrees_non_root(\n    left_child: &ChainingValue,\n    right_child: &ChainingValue,\n    mode: Mode,\n) -> ChainingValue {\n    merge_subtrees_inner(left_child, right_child, mode).chaining_value()\n}\n\n/// Compute a root hash from two child chaining values.\n///\n/// See the [module level examples](index.html#examples), particularly the discussion of valid tree\n/// structures. The left and right child chaining values can come from either\n/// [`Hasher::finalize_non_root`](HasherExt::finalize_non_root) or [`merge_subtrees_non_root`].\n/// \"Chaining value\" is the academic term for a non-root or non-final hash.\n///\n/// Note that inputs of [`CHUNK_LEN`] or less don't produce any parent nodes and can't be hashed\n/// using this function. In that case you must get the root hash from [`Hasher::finalize`] (or just\n/// [`blake3::hash`](crate::hash)).\npub fn merge_subtrees_root(\n    left_child: &ChainingValue,\n    right_child: &ChainingValue,\n    mode: Mode,\n) -> crate::Hash {\n    merge_subtrees_inner(left_child, right_child, mode).root_hash()\n}\n\n/// Build a root [`OutputReader`](crate::OutputReader) from two child chaining values.\n///\n/// See also the [module level examples](index.html#examples), particularly the discussion of valid\n/// tree structures. The left and right child chaining values can come from either\n/// [`Hasher::finalize_non_root`](HasherExt::finalize_non_root) or [`merge_subtrees_non_root`].\n/// \"Chaining value\" is the academic term for a non-root or non-final hash.\n///\n/// Note that inputs of [`CHUNK_LEN`] or less don't produce any parent nodes and can't be hashed\n/// using this function. In that case you must get the `OutputReader` from\n/// [`Hasher::finalize_xof`].\n///\n/// # Example\n///\n/// ```\n/// use blake3::hazmat::{merge_subtrees_root_xof, HasherExt, Mode};\n/// use blake3::{Hasher, CHUNK_LEN};\n///\n/// // Hash a 2-chunk subtree in steps. Note that only\n/// // the final chunk can be shorter than CHUNK_LEN.\n/// let chunk0 = &[42; CHUNK_LEN];\n/// let chunk1 = b\"hello world\";\n/// let chunk0_cv = Hasher::new()\n///     .update(chunk0)\n///     .finalize_non_root();\n/// let chunk1_cv = Hasher::new()\n///     .set_input_offset(CHUNK_LEN as u64)\n///     .update(chunk1)\n///     .finalize_non_root();\n///\n/// // Obtain a blake3::OutputReader at the root and extract 1000 bytes.\n/// let mut output_reader = merge_subtrees_root_xof(&chunk0_cv, &chunk1_cv, Mode::Hash);\n/// let mut output_bytes = [0; 1_000];\n/// output_reader.fill(&mut output_bytes);\n///\n/// // Double check the answer.\n/// let mut hasher = Hasher::new();\n/// hasher.update(chunk0);\n/// hasher.update(chunk1);\n/// let mut expected = [0; 1_000];\n/// hasher.finalize_xof().fill(&mut expected);\n/// assert_eq!(output_bytes, expected);\n/// ```\npub fn merge_subtrees_root_xof(\n    left_child: &ChainingValue,\n    right_child: &ChainingValue,\n    mode: Mode,\n) -> crate::OutputReader {\n    crate::OutputReader::new(merge_subtrees_inner(left_child, right_child, mode))\n}\n\n/// An alias to distinguish [`hash_derive_key_context`] outputs from other keys.\npub type ContextKey = [u8; KEY_LEN];\n\n/// Hash a [`derive_key`](crate::derive_key) context string and return a [`ContextKey`].\n///\n/// The _only_ valid uses for the returned [`ContextKey`] are [`Hasher::new_from_context_key`] and\n/// [`Mode::DeriveKeyMaterial`] (together with the merge subtree functions).\n///\n/// # Example\n///\n/// ```\n/// use blake3::Hasher;\n/// use blake3::hazmat::HasherExt;\n///\n/// let context_key = blake3::hazmat::hash_derive_key_context(\"foo\");\n/// let mut hasher = Hasher::new_from_context_key(&context_key);\n/// hasher.update(b\"bar\");\n/// let derived_key = *hasher.finalize().as_bytes();\n///\n/// assert_eq!(derived_key, blake3::derive_key(\"foo\", b\"bar\"));\n/// ```\npub fn hash_derive_key_context(context: &str) -> ContextKey {\n    crate::hash_all_at_once::<crate::join::SerialJoin>(\n        context.as_bytes(),\n        IV,\n        crate::DERIVE_KEY_CONTEXT,\n    )\n    .root_hash()\n    .0\n}\n\n#[cfg(test)]\nmod test {\n    use super::*;\n\n    #[test]\n    #[should_panic]\n    fn test_empty_subtree_should_panic() {\n        Hasher::new().finalize_non_root();\n    }\n\n    #[test]\n    #[should_panic]\n    fn test_unaligned_offset_should_panic() {\n        Hasher::new().set_input_offset(1);\n    }\n\n    #[test]\n    #[should_panic]\n    fn test_hasher_already_accepted_input_should_panic() {\n        Hasher::new().update(b\"x\").set_input_offset(0);\n    }\n\n    #[test]\n    #[should_panic]\n    fn test_too_much_input_should_panic() {\n        Hasher::new()\n            .set_input_offset(CHUNK_LEN as u64)\n            .update(&[0; CHUNK_LEN + 1]);\n    }\n\n    #[test]\n    #[should_panic]\n    fn test_set_input_offset_cant_finalize() {\n        Hasher::new().set_input_offset(CHUNK_LEN as u64).finalize();\n    }\n\n    #[test]\n    #[should_panic]\n    fn test_set_input_offset_cant_finalize_xof() {\n        Hasher::new()\n            .set_input_offset(CHUNK_LEN as u64)\n            .finalize_xof();\n    }\n\n    #[test]\n    fn test_grouped_hash() {\n        const MAX_CHUNKS: usize = (crate::test::TEST_CASES_MAX + 1) / CHUNK_LEN;\n        let mut input_buf = [0; crate::test::TEST_CASES_MAX];\n        crate::test::paint_test_input(&mut input_buf);\n        for subtree_chunks in [1, 2, 4, 8, 16, 32] {\n            #[cfg(feature = \"std\")]\n            dbg!(subtree_chunks);\n            let subtree_len = subtree_chunks * CHUNK_LEN;\n            for &case in crate::test::TEST_CASES {\n                if case <= subtree_len {\n                    continue;\n                }\n                #[cfg(feature = \"std\")]\n                dbg!(case);\n                let input = &input_buf[..case];\n                let expected_hash = crate::hash(input);\n\n                // Collect all the group chaining values.\n                let mut chaining_values = arrayvec::ArrayVec::<ChainingValue, MAX_CHUNKS>::new();\n                let mut subtree_offset = 0;\n                while subtree_offset < input.len() {\n                    let take = core::cmp::min(subtree_len, input.len() - subtree_offset);\n                    let subtree_input = &input[subtree_offset..][..take];\n                    let subtree_cv = Hasher::new()\n                        .set_input_offset(subtree_offset as u64)\n                        .update(subtree_input)\n                        .finalize_non_root();\n                    chaining_values.push(subtree_cv);\n                    subtree_offset += take;\n                }\n\n                // Compress all the chaining_values together, layer by layer.\n                assert!(chaining_values.len() >= 2);\n                while chaining_values.len() > 2 {\n                    let n = chaining_values.len();\n                    // Merge each side-by-side pair in place, overwriting the front half of the\n                    // array with the merged results. This moves us \"up one level\" in the tree.\n                    for i in 0..(n / 2) {\n                        chaining_values[i] = merge_subtrees_non_root(\n                            &chaining_values[2 * i],\n                            &chaining_values[2 * i + 1],\n                            Mode::Hash,\n                        );\n                    }\n                    // If there's an odd CV out, it moves up.\n                    if n % 2 == 1 {\n                        chaining_values[n / 2] = chaining_values[n - 1];\n                    }\n                    chaining_values.truncate(n / 2 + n % 2);\n                }\n                assert_eq!(chaining_values.len(), 2);\n                let root_hash =\n                    merge_subtrees_root(&chaining_values[0], &chaining_values[1], Mode::Hash);\n                assert_eq!(expected_hash, root_hash);\n            }\n        }\n    }\n\n    #[test]\n    fn test_keyed_hash_xof() {\n        let group0 = &[42; 4096];\n        let group1 = &[43; 4095];\n        let mut input = [0; 8191];\n        input[..4096].copy_from_slice(group0);\n        input[4096..].copy_from_slice(group1);\n        let key = &[44; 32];\n\n        let mut expected_output = [0; 100];\n        Hasher::new_keyed(&key)\n            .update(&input)\n            .finalize_xof()\n            .fill(&mut expected_output);\n\n        let mut hazmat_output = [0; 100];\n        let left = Hasher::new_keyed(key).update(group0).finalize_non_root();\n        let right = Hasher::new_keyed(key)\n            .set_input_offset(group0.len() as u64)\n            .update(group1)\n            .finalize_non_root();\n        merge_subtrees_root_xof(&left, &right, Mode::KeyedHash(&key)).fill(&mut hazmat_output);\n        assert_eq!(expected_output, hazmat_output);\n    }\n\n    #[test]\n    fn test_derive_key() {\n        let context = \"foo\";\n        let mut input = [0; 1025];\n        crate::test::paint_test_input(&mut input);\n        let expected = crate::derive_key(context, &input);\n\n        let cx_key = hash_derive_key_context(context);\n        let left = Hasher::new_from_context_key(&cx_key)\n            .update(&input[..1024])\n            .finalize_non_root();\n        let right = Hasher::new_from_context_key(&cx_key)\n            .set_input_offset(1024)\n            .update(&input[1024..])\n            .finalize_non_root();\n        let derived_key = merge_subtrees_root(&left, &right, Mode::DeriveKeyMaterial(&cx_key)).0;\n        assert_eq!(expected, derived_key);\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/src/io.rs",
    "content": "//! Helper functions for efficient IO.\n\n#[cfg(feature = \"std\")]\npub(crate) fn copy_wide(\n    mut reader: impl std::io::Read,\n    hasher: &mut crate::Hasher,\n) -> std::io::Result<u64> {\n    let mut buffer = [0; 65536];\n    let mut total = 0;\n    loop {\n        match reader.read(&mut buffer) {\n            Ok(0) => return Ok(total),\n            Ok(n) => {\n                hasher.update(&buffer[..n]);\n                total += n as u64;\n            }\n            // see test_update_reader_interrupted\n            Err(e) if e.kind() == std::io::ErrorKind::Interrupted => continue,\n            Err(e) => return Err(e),\n        }\n    }\n}\n\n// Mmap a file, if it looks like a good idea. Return None in cases where we know mmap will fail, or\n// if the file is short enough that mmapping isn't worth it. However, if we do try to mmap and it\n// fails, return the error.\n//\n// SAFETY: Mmaps are fundamentally unsafe, because you can call invariant-checking functions like\n// str::from_utf8 on them and then have them change out from under you. Letting a safe caller get\n// their hands on an mmap, or even a &[u8] that's backed by an mmap, is unsound. However, because\n// this function is crate-private, we can guarantee that all can ever happen in the event of a race\n// condition is that we either hash nonsense bytes or crash with SIGBUS or similar, neither of\n// which should risk memory corruption in a safe caller.\n//\n// PARANOIA: But a data race...is a data race...is a data race...right? Even if we know that no\n// platform in the \"real world\" is ever going to do anything other than compute the \"wrong answer\"\n// if we race on this mmap while we hash it, aren't we still supposed to feel bad about doing this?\n// Well, maybe. This is IO, and IO gets special carve-outs in the memory model. Consider a\n// memory-mapped register that returns random 32-bit words. (This is actually realistic if you have\n// a hardware RNG.) It's probably sound to construct a *const i32 pointing to that register and do\n// some raw pointer reads from it. Those reads should be volatile if you don't want the compiler to\n// coalesce them, but either way the compiler isn't allowed to just _go nuts_ and insert\n// should-never-happen branches to wipe your hard drive if two adjacent reads happen to give\n// different values. As far as I'm aware, there's no such thing as a read that's allowed if it's\n// volatile but prohibited if it's not (unlike atomics). As mentioned above, it's not ok to\n// construct a safe &i32 to the register if you're going to leak that reference to unknown callers.\n// But if you \"know what you're doing,\" I don't think *const i32 and &i32 are fundamentally\n// different here. Feedback needed.\n#[cfg(feature = \"mmap\")]\npub(crate) fn maybe_mmap_file(file: &std::fs::File) -> std::io::Result<Option<memmap2::Mmap>> {\n    let metadata = file.metadata()?;\n    let file_size = metadata.len();\n    if !metadata.is_file() {\n        // Not a real file.\n        Ok(None)\n    } else if file_size < 16 * 1024 {\n        // Mapping small files is not worth it, and some special files that can't be mapped report\n        // a size of zero.\n        Ok(None)\n    } else {\n        let map = unsafe { memmap2::Mmap::map(file)? };\n        Ok(Some(map))\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/src/join.rs",
    "content": "//! The multi-threading abstractions used by `Hasher::update_with_join`.\n//!\n//! Different implementations of the `Join` trait determine whether\n//! `Hasher::update_with_join` performs multi-threading on sufficiently large\n//! inputs. The `SerialJoin` implementation is single-threaded, and the\n//! `RayonJoin` implementation (gated by the `rayon` feature) is multi-threaded.\n//! Interfaces other than `Hasher::update_with_join`, like [`hash`](crate::hash)\n//! and [`Hasher::update`](crate::Hasher::update), always use `SerialJoin`\n//! internally.\n//!\n//! The `Join` trait is an almost exact copy of the [`rayon::join`] API, and\n//! `RayonJoin` is the only non-trivial implementation. Previously this trait\n//! was public, but currently it's been re-privatized, as it's both 1) of no\n//! value to most callers and 2) a pretty big implementation detail to commit\n//! to.\n//!\n//! [`rayon::join`]: https://docs.rs/rayon/1.3.0/rayon/fn.join.html\n\n/// The trait that abstracts over single-threaded and multi-threaded recursion.\n///\n/// See the [`join` module docs](index.html) for more details.\npub trait Join {\n    fn join<A, B, RA, RB>(oper_a: A, oper_b: B) -> (RA, RB)\n    where\n        A: FnOnce() -> RA + Send,\n        B: FnOnce() -> RB + Send,\n        RA: Send,\n        RB: Send;\n}\n\n/// The trivial, serial implementation of `Join`. The left and right sides are\n/// executed one after the other, on the calling thread. The standalone hashing\n/// functions and the `Hasher::update` method use this implementation\n/// internally.\n///\n/// See the [`join` module docs](index.html) for more details.\npub enum SerialJoin {}\n\nimpl Join for SerialJoin {\n    #[inline]\n    fn join<A, B, RA, RB>(oper_a: A, oper_b: B) -> (RA, RB)\n    where\n        A: FnOnce() -> RA + Send,\n        B: FnOnce() -> RB + Send,\n        RA: Send,\n        RB: Send,\n    {\n        (oper_a(), oper_b())\n    }\n}\n\n/// The Rayon-based implementation of `Join`. The left and right sides are\n/// executed on the Rayon thread pool, potentially in parallel. This\n/// implementation is gated by the `rayon` feature, which is off by default.\n///\n/// See the [`join` module docs](index.html) for more details.\n#[cfg(feature = \"rayon\")]\npub enum RayonJoin {}\n\n#[cfg(feature = \"rayon\")]\nimpl Join for RayonJoin {\n    #[inline]\n    fn join<A, B, RA, RB>(oper_a: A, oper_b: B) -> (RA, RB)\n    where\n        A: FnOnce() -> RA + Send,\n        B: FnOnce() -> RB + Send,\n        RA: Send,\n        RB: Send,\n    {\n        rayon_core::join(oper_a, oper_b)\n    }\n}\n\n#[cfg(test)]\nmod test {\n    use super::*;\n\n    #[test]\n    fn test_serial_join() {\n        let oper_a = || 1 + 1;\n        let oper_b = || 2 + 2;\n        assert_eq!((2, 4), SerialJoin::join(oper_a, oper_b));\n    }\n\n    #[test]\n    #[cfg(feature = \"rayon\")]\n    fn test_rayon_join() {\n        let oper_a = || 1 + 1;\n        let oper_b = || 2 + 2;\n        assert_eq!((2, 4), RayonJoin::join(oper_a, oper_b));\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/src/lib.rs",
    "content": "//! The official Rust implementation of the [BLAKE3] cryptographic hash\n//! function.\n//!\n//! # Examples\n//!\n//! ```\n//! # fn main() -> Result<(), Box<dyn std::error::Error>> {\n//! // Hash an input all at once.\n//! let hash1 = blake3::hash(b\"foobarbaz\");\n//!\n//! // Hash an input incrementally.\n//! let mut hasher = blake3::Hasher::new();\n//! hasher.update(b\"foo\");\n//! hasher.update(b\"bar\");\n//! hasher.update(b\"baz\");\n//! let hash2 = hasher.finalize();\n//! assert_eq!(hash1, hash2);\n//!\n//! // Extended output. OutputReader also implements Read and Seek.\n//! # #[cfg(feature = \"std\")] {\n//! let mut output = [0; 1000];\n//! let mut output_reader = hasher.finalize_xof();\n//! output_reader.fill(&mut output);\n//! assert_eq!(hash1, output[..32]);\n//! # }\n//!\n//! // Print a hash as hex.\n//! println!(\"{}\", hash1);\n//! # Ok(())\n//! # }\n//! ```\n//!\n//! # Cargo Features\n//!\n//! The `std` feature (the only feature enabled by default) is required for\n//! implementations of the [`Write`] and [`Seek`] traits, the\n//! [`update_reader`](Hasher::update_reader) helper method, and runtime CPU\n//! feature detection on x86. If this feature is disabled, the only way to use\n//! the x86 SIMD implementations is to enable the corresponding instruction sets\n//! globally, with e.g. `RUSTFLAGS=\"-C target-cpu=native\"`. The resulting binary\n//! will not be portable to other machines.\n//!\n//! The `rayon` feature (disabled by default, but enabled for [docs.rs]) adds\n//! the [`update_rayon`](Hasher::update_rayon) and (in combination with `mmap`\n//! below) [`update_mmap_rayon`](Hasher::update_mmap_rayon) methods, for\n//! multithreaded hashing. However, even if this feature is enabled, all other\n//! APIs remain single-threaded.\n//!\n//! The `mmap` feature (disabled by default, but enabled for [docs.rs]) adds the\n//! [`update_mmap`](Hasher::update_mmap) and (in combination with `rayon` above)\n//! [`update_mmap_rayon`](Hasher::update_mmap_rayon) helper methods for\n//! memory-mapped IO.\n//!\n//! The `zeroize` feature (disabled by default, but enabled for [docs.rs])\n//! implements\n//! [`Zeroize`](https://docs.rs/zeroize/latest/zeroize/trait.Zeroize.html) for\n//! this crate's types.\n//!\n//! The `serde` feature (disabled by default, but enabled for [docs.rs]) implements\n//! [`serde::Serialize`](https://docs.rs/serde/latest/serde/trait.Serialize.html) and\n//! [`serde::Deserialize`](https://docs.rs/serde/latest/serde/trait.Deserialize.html)\n//! for [`Hash`](struct@Hash).\n//!\n//! The NEON implementation is enabled by default for AArch64 but requires the\n//! `neon` feature for other ARM targets. Not all ARMv7 CPUs support NEON, and\n//! enabling this feature will produce a binary that's not portable to CPUs\n//! without NEON support.\n//!\n//! The `wasm32_simd` feature enables the WASM SIMD implementation for all `wasm32-`\n//! targets. Similar to the `neon` feature, if `wasm32_simd` is enabled, WASM SIMD\n//! support is assumed. This may become the default in the future.\n//!\n//! The `traits-preview` feature enables implementations of traits from the\n//! RustCrypto [`digest`] crate, and re-exports that crate as `traits::digest`.\n//! However, the traits aren't stable, and they're expected to change in\n//! incompatible ways before that crate reaches 1.0. For that reason, this crate\n//! makes no SemVer guarantees for this feature, and callers who use it should\n//! expect breaking changes between patch versions. (The \"-preview\" feature name\n//! follows the conventions of the RustCrypto [`signature`] crate.)\n//!\n//! [`Hasher::update_rayon`]: struct.Hasher.html#method.update_rayon\n//! [BLAKE3]: https://blake3.io\n//! [Rayon]: https://github.com/rayon-rs/rayon\n//! [docs.rs]: https://docs.rs/\n//! [`Write`]: https://doc.rust-lang.org/std/io/trait.Write.html\n//! [`Seek`]: https://doc.rust-lang.org/std/io/trait.Seek.html\n//! [`digest`]: https://crates.io/crates/digest\n//! [`signature`]: https://crates.io/crates/signature\n\n#![cfg_attr(not(feature = \"std\"), no_std)]\n\n#[cfg(test)]\nmod test;\n\n#[doc(hidden)]\n#[deprecated(since = \"1.8.0\", note = \"use the hazmat module instead\")]\npub mod guts;\n\npub mod hazmat;\n\n/// Undocumented and unstable, for benchmarks only.\n#[doc(hidden)]\npub mod platform;\n\n// Platform-specific implementations of the compression function. These\n// BLAKE3-specific cfg flags are set in build.rs.\n#[cfg(blake3_avx2_rust)]\n#[path = \"rust_avx2.rs\"]\nmod avx2;\n#[cfg(blake3_avx2_ffi)]\n#[path = \"ffi_avx2.rs\"]\nmod avx2;\n#[cfg(blake3_avx512_ffi)]\n#[path = \"ffi_avx512.rs\"]\nmod avx512;\n#[cfg(blake3_neon)]\n#[path = \"ffi_neon.rs\"]\nmod neon;\nmod portable;\n#[cfg(blake3_sse2_rust)]\n#[path = \"rust_sse2.rs\"]\nmod sse2;\n#[cfg(blake3_sse2_ffi)]\n#[path = \"ffi_sse2.rs\"]\nmod sse2;\n#[cfg(blake3_sse41_rust)]\n#[path = \"rust_sse41.rs\"]\nmod sse41;\n#[cfg(blake3_sse41_ffi)]\n#[path = \"ffi_sse41.rs\"]\nmod sse41;\n\n#[cfg(blake3_wasm32_simd)]\n#[path = \"wasm32_simd.rs\"]\nmod wasm32_simd;\n\n#[cfg(feature = \"traits-preview\")]\npub mod traits;\n\nmod io;\nmod join;\n\nuse arrayref::{array_mut_ref, array_ref};\nuse arrayvec::{ArrayString, ArrayVec};\nuse core::cmp;\nuse core::fmt;\nuse platform::{Platform, MAX_SIMD_DEGREE, MAX_SIMD_DEGREE_OR_2};\n#[cfg(feature = \"zeroize\")]\nuse zeroize::Zeroize;\n\n/// The number of bytes in a [`Hash`](struct.Hash.html), 32.\npub const OUT_LEN: usize = 32;\n\n/// The number of bytes in a key, 32.\npub const KEY_LEN: usize = 32;\n\n/// The number of bytes in a block, 64.\n///\n/// You don't usually need to think about this number. One case where it matters is calling\n/// [`OutputReader::fill`] in a loop, where using a `buf` argument that's a multiple of `BLOCK_LEN`\n/// avoids repeating work.\npub const BLOCK_LEN: usize = 64;\n\n/// The number of bytes in a chunk, 1024.\n///\n/// You don't usually need to think about this number, but it often comes up in benchmarks, because\n/// the maximum degree of parallelism used by the implementation equals the number of chunks.\npub const CHUNK_LEN: usize = 1024;\n\nconst MAX_DEPTH: usize = 54; // 2^54 * CHUNK_LEN = 2^64\n\n// While iterating the compression function within a chunk, the CV is\n// represented as words, to avoid doing two extra endianness conversions for\n// each compression in the portable implementation. But the hash_many interface\n// needs to hash both input bytes and parent nodes, so its better for its\n// output CVs to be represented as bytes.\ntype CVWords = [u32; 8];\ntype CVBytes = [u8; 32]; // little-endian\n\nconst IV: &CVWords = &[\n    0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19,\n];\n\nconst MSG_SCHEDULE: [[usize; 16]; 7] = [\n    [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],\n    [2, 6, 3, 10, 7, 0, 4, 13, 1, 11, 12, 5, 9, 14, 15, 8],\n    [3, 4, 10, 12, 13, 2, 7, 14, 6, 5, 9, 0, 11, 15, 8, 1],\n    [10, 7, 12, 9, 14, 3, 13, 15, 4, 0, 11, 2, 5, 8, 1, 6],\n    [12, 13, 9, 11, 15, 10, 14, 8, 7, 2, 5, 3, 0, 1, 6, 4],\n    [9, 14, 11, 5, 8, 12, 15, 1, 13, 3, 0, 10, 2, 6, 4, 7],\n    [11, 15, 5, 0, 1, 9, 8, 6, 14, 10, 2, 12, 3, 4, 7, 13],\n];\n\n// These are the internal flags that we use to domain separate root/non-root,\n// chunk/parent, and chunk beginning/middle/end. These get set at the high end\n// of the block flags word in the compression function, so their values start\n// high and go down.\nconst CHUNK_START: u8 = 1 << 0;\nconst CHUNK_END: u8 = 1 << 1;\nconst PARENT: u8 = 1 << 2;\nconst ROOT: u8 = 1 << 3;\nconst KEYED_HASH: u8 = 1 << 4;\nconst DERIVE_KEY_CONTEXT: u8 = 1 << 5;\nconst DERIVE_KEY_MATERIAL: u8 = 1 << 6;\n\n#[inline]\nfn counter_low(counter: u64) -> u32 {\n    counter as u32\n}\n\n#[inline]\nfn counter_high(counter: u64) -> u32 {\n    (counter >> 32) as u32\n}\n\n/// An output of the default size, 32 bytes, which provides constant-time\n/// equality checking.\n///\n/// `Hash` implements [`From`] and [`Into`] for `[u8; 32]`, and it provides\n/// [`from_bytes`] and [`as_bytes`] for explicit conversions between itself and\n/// `[u8; 32]`. However, byte arrays and slices don't provide constant-time\n/// equality checking, which is often a security requirement in software that\n/// handles private data. `Hash` doesn't implement [`Deref`] or [`AsRef`], to\n/// avoid situations where a type conversion happens implicitly and the\n/// constant-time property is accidentally lost.\n///\n/// `Hash` provides the [`to_hex`] and [`from_hex`] methods for converting to\n/// and from hexadecimal. It also implements [`Display`] and [`FromStr`].\n///\n/// [`From`]: https://doc.rust-lang.org/std/convert/trait.From.html\n/// [`Into`]: https://doc.rust-lang.org/std/convert/trait.Into.html\n/// [`as_bytes`]: #method.as_bytes\n/// [`from_bytes`]: #method.from_bytes\n/// [`Deref`]: https://doc.rust-lang.org/stable/std/ops/trait.Deref.html\n/// [`AsRef`]: https://doc.rust-lang.org/std/convert/trait.AsRef.html\n/// [`to_hex`]: #method.to_hex\n/// [`from_hex`]: #method.from_hex\n/// [`Display`]: https://doc.rust-lang.org/std/fmt/trait.Display.html\n/// [`FromStr`]: https://doc.rust-lang.org/std/str/trait.FromStr.html\n#[cfg_attr(feature = \"serde\", derive(serde::Deserialize, serde::Serialize))]\n#[derive(Clone, Copy, Hash, Eq)]\npub struct Hash([u8; OUT_LEN]);\n\nimpl Hash {\n    /// The raw bytes of the `Hash`. Note that byte arrays don't provide\n    /// constant-time equality checking, so if  you need to compare hashes,\n    /// prefer the `Hash` type.\n    #[inline]\n    pub const fn as_bytes(&self) -> &[u8; OUT_LEN] {\n        &self.0\n    }\n\n    /// Create a `Hash` from its raw bytes representation.\n    pub const fn from_bytes(bytes: [u8; OUT_LEN]) -> Self {\n        Self(bytes)\n    }\n\n    /// Create a `Hash` from its raw bytes representation as a slice.\n    ///\n    /// Returns an error if the slice is not exactly 32 bytes long.\n    pub fn from_slice(bytes: &[u8]) -> Result<Self, core::array::TryFromSliceError> {\n        Ok(Self::from_bytes(bytes.try_into()?))\n    }\n\n    /// Encode a `Hash` in lowercase hexadecimal.\n    ///\n    /// The returned [`ArrayString`] is a fixed size and doesn't allocate memory\n    /// on the heap. Note that [`ArrayString`] doesn't provide constant-time\n    /// equality checking, so if you need to compare hashes, prefer the `Hash`\n    /// type.\n    ///\n    /// [`ArrayString`]: https://docs.rs/arrayvec/0.5.1/arrayvec/struct.ArrayString.html\n    pub fn to_hex(&self) -> ArrayString<{ 2 * OUT_LEN }> {\n        let mut s = ArrayString::new();\n        let table = b\"0123456789abcdef\";\n        for &b in self.0.iter() {\n            s.push(table[(b >> 4) as usize] as char);\n            s.push(table[(b & 0xf) as usize] as char);\n        }\n        s\n    }\n\n    /// Decode a `Hash` from hexadecimal. Both uppercase and lowercase ASCII\n    /// bytes are supported.\n    ///\n    /// Any byte outside the ranges `'0'...'9'`, `'a'...'f'`, and `'A'...'F'`\n    /// results in an error. An input length other than 64 also results in an\n    /// error.\n    ///\n    /// Note that `Hash` also implements `FromStr`, so `Hash::from_hex(\"...\")`\n    /// is equivalent to `\"...\".parse()`.\n    pub fn from_hex(hex: impl AsRef<[u8]>) -> Result<Self, HexError> {\n        fn hex_val(byte: u8) -> Result<u8, HexError> {\n            match byte {\n                b'A'..=b'F' => Ok(byte - b'A' + 10),\n                b'a'..=b'f' => Ok(byte - b'a' + 10),\n                b'0'..=b'9' => Ok(byte - b'0'),\n                _ => Err(HexError(HexErrorInner::InvalidByte(byte))),\n            }\n        }\n        let hex_bytes: &[u8] = hex.as_ref();\n        if hex_bytes.len() != OUT_LEN * 2 {\n            return Err(HexError(HexErrorInner::InvalidLen(hex_bytes.len())));\n        }\n        let mut hash_bytes: [u8; OUT_LEN] = [0; OUT_LEN];\n        for i in 0..OUT_LEN {\n            hash_bytes[i] = 16 * hex_val(hex_bytes[2 * i])? + hex_val(hex_bytes[2 * i + 1])?;\n        }\n        Ok(Hash::from(hash_bytes))\n    }\n}\n\nimpl From<[u8; OUT_LEN]> for Hash {\n    #[inline]\n    fn from(bytes: [u8; OUT_LEN]) -> Self {\n        Self::from_bytes(bytes)\n    }\n}\n\nimpl From<Hash> for [u8; OUT_LEN] {\n    #[inline]\n    fn from(hash: Hash) -> Self {\n        hash.0\n    }\n}\n\nimpl core::str::FromStr for Hash {\n    type Err = HexError;\n\n    fn from_str(s: &str) -> Result<Self, Self::Err> {\n        Hash::from_hex(s)\n    }\n}\n\n#[cfg(feature = \"zeroize\")]\nimpl Zeroize for Hash {\n    fn zeroize(&mut self) {\n        // Destructuring to trigger compile error as a reminder to update this impl.\n        let Self(bytes) = self;\n        bytes.zeroize();\n    }\n}\n\n/// This implementation is constant-time.\nimpl PartialEq for Hash {\n    #[inline]\n    fn eq(&self, other: &Hash) -> bool {\n        constant_time_eq::constant_time_eq_32(&self.0, &other.0)\n    }\n}\n\n/// This implementation is constant-time.\nimpl PartialEq<[u8; OUT_LEN]> for Hash {\n    #[inline]\n    fn eq(&self, other: &[u8; OUT_LEN]) -> bool {\n        constant_time_eq::constant_time_eq_32(&self.0, other)\n    }\n}\n\n/// This implementation is constant-time if the target is 32 bytes long.\nimpl PartialEq<[u8]> for Hash {\n    #[inline]\n    fn eq(&self, other: &[u8]) -> bool {\n        constant_time_eq::constant_time_eq(&self.0, other)\n    }\n}\n\nimpl fmt::Display for Hash {\n    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n        // Formatting field as `&str` to reduce code size since the `Debug`\n        // dynamic dispatch table for `&str` is likely needed elsewhere already,\n        // but that for `ArrayString<[u8; 64]>` is not.\n        let hex = self.to_hex();\n        let hex: &str = hex.as_str();\n\n        f.write_str(hex)\n    }\n}\n\nimpl fmt::Debug for Hash {\n    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n        // Formatting field as `&str` to reduce code size since the `Debug`\n        // dynamic dispatch table for `&str` is likely needed elsewhere already,\n        // but that for `ArrayString<[u8; 64]>` is not.\n        let hex = self.to_hex();\n        let hex: &str = hex.as_str();\n\n        f.debug_tuple(\"Hash\").field(&hex).finish()\n    }\n}\n\n/// The error type for [`Hash::from_hex`].\n///\n/// The `.to_string()` representation of this error currently distinguishes between bad length\n/// errors and bad character errors. This is to help with logging and debugging, but it isn't a\n/// stable API detail, and it may change at any time.\n#[derive(Clone, Debug)]\npub struct HexError(HexErrorInner);\n\n#[derive(Clone, Debug)]\nenum HexErrorInner {\n    InvalidByte(u8),\n    InvalidLen(usize),\n}\n\nimpl fmt::Display for HexError {\n    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n        match self.0 {\n            HexErrorInner::InvalidByte(byte) => {\n                if byte < 128 {\n                    write!(f, \"invalid hex character: {:?}\", byte as char)\n                } else {\n                    write!(f, \"invalid hex character: 0x{:x}\", byte)\n                }\n            }\n            HexErrorInner::InvalidLen(len) => {\n                write!(f, \"expected 64 hex bytes, received {}\", len)\n            }\n        }\n    }\n}\n\n#[cfg(feature = \"std\")]\nimpl std::error::Error for HexError {}\n\n// Each chunk or parent node can produce either a 32-byte chaining value or, by\n// setting the ROOT flag, any number of final output bytes. The Output struct\n// captures the state just prior to choosing between those two possibilities.\n#[derive(Clone)]\nstruct Output {\n    input_chaining_value: CVWords,\n    block: [u8; 64],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n    platform: Platform,\n}\n\nimpl Output {\n    fn chaining_value(&self) -> CVBytes {\n        let mut cv = self.input_chaining_value;\n        self.platform.compress_in_place(\n            &mut cv,\n            &self.block,\n            self.block_len,\n            self.counter,\n            self.flags,\n        );\n        platform::le_bytes_from_words_32(&cv)\n    }\n\n    fn root_hash(&self) -> Hash {\n        debug_assert_eq!(self.counter, 0);\n        let mut cv = self.input_chaining_value;\n        self.platform\n            .compress_in_place(&mut cv, &self.block, self.block_len, 0, self.flags | ROOT);\n        Hash(platform::le_bytes_from_words_32(&cv))\n    }\n\n    fn root_output_block(&self) -> [u8; 2 * OUT_LEN] {\n        self.platform.compress_xof(\n            &self.input_chaining_value,\n            &self.block,\n            self.block_len,\n            self.counter,\n            self.flags | ROOT,\n        )\n    }\n}\n\n#[cfg(feature = \"zeroize\")]\nimpl Zeroize for Output {\n    fn zeroize(&mut self) {\n        // Destructuring to trigger compile error as a reminder to update this impl.\n        let Self {\n            input_chaining_value,\n            block,\n            block_len,\n            counter,\n            flags,\n            platform: _,\n        } = self;\n\n        input_chaining_value.zeroize();\n        block.zeroize();\n        block_len.zeroize();\n        counter.zeroize();\n        flags.zeroize();\n    }\n}\n\n#[derive(Clone)]\nstruct ChunkState {\n    cv: CVWords,\n    chunk_counter: u64,\n    buf: [u8; BLOCK_LEN],\n    buf_len: u8,\n    blocks_compressed: u8,\n    flags: u8,\n    platform: Platform,\n}\n\nimpl ChunkState {\n    fn new(key: &CVWords, chunk_counter: u64, flags: u8, platform: Platform) -> Self {\n        Self {\n            cv: *key,\n            chunk_counter,\n            buf: [0; BLOCK_LEN],\n            buf_len: 0,\n            blocks_compressed: 0,\n            flags,\n            platform,\n        }\n    }\n\n    fn count(&self) -> usize {\n        BLOCK_LEN * self.blocks_compressed as usize + self.buf_len as usize\n    }\n\n    fn fill_buf(&mut self, input: &mut &[u8]) {\n        let want = BLOCK_LEN - self.buf_len as usize;\n        let take = cmp::min(want, input.len());\n        self.buf[self.buf_len as usize..][..take].copy_from_slice(&input[..take]);\n        self.buf_len += take as u8;\n        *input = &input[take..];\n    }\n\n    fn start_flag(&self) -> u8 {\n        if self.blocks_compressed == 0 {\n            CHUNK_START\n        } else {\n            0\n        }\n    }\n\n    // Try to avoid buffering as much as possible, by compressing directly from\n    // the input slice when full blocks are available.\n    fn update(&mut self, mut input: &[u8]) -> &mut Self {\n        if self.buf_len > 0 {\n            self.fill_buf(&mut input);\n            if !input.is_empty() {\n                debug_assert_eq!(self.buf_len as usize, BLOCK_LEN);\n                let block_flags = self.flags | self.start_flag(); // borrowck\n                self.platform.compress_in_place(\n                    &mut self.cv,\n                    &self.buf,\n                    BLOCK_LEN as u8,\n                    self.chunk_counter,\n                    block_flags,\n                );\n                self.buf_len = 0;\n                self.buf = [0; BLOCK_LEN];\n                self.blocks_compressed += 1;\n            }\n        }\n\n        while input.len() > BLOCK_LEN {\n            debug_assert_eq!(self.buf_len, 0);\n            let block_flags = self.flags | self.start_flag(); // borrowck\n            self.platform.compress_in_place(\n                &mut self.cv,\n                array_ref!(input, 0, BLOCK_LEN),\n                BLOCK_LEN as u8,\n                self.chunk_counter,\n                block_flags,\n            );\n            self.blocks_compressed += 1;\n            input = &input[BLOCK_LEN..];\n        }\n\n        self.fill_buf(&mut input);\n        debug_assert!(input.is_empty());\n        debug_assert!(self.count() <= CHUNK_LEN);\n        self\n    }\n\n    fn output(&self) -> Output {\n        let block_flags = self.flags | self.start_flag() | CHUNK_END;\n        Output {\n            input_chaining_value: self.cv,\n            block: self.buf,\n            block_len: self.buf_len,\n            counter: self.chunk_counter,\n            flags: block_flags,\n            platform: self.platform,\n        }\n    }\n}\n\n// Don't derive(Debug), because the state may be secret.\nimpl fmt::Debug for ChunkState {\n    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n        f.debug_struct(\"ChunkState\")\n            .field(\"count\", &self.count())\n            .field(\"chunk_counter\", &self.chunk_counter)\n            .field(\"flags\", &self.flags)\n            .field(\"platform\", &self.platform)\n            .finish()\n    }\n}\n\n#[cfg(feature = \"zeroize\")]\nimpl Zeroize for ChunkState {\n    fn zeroize(&mut self) {\n        // Destructuring to trigger compile error as a reminder to update this impl.\n        let Self {\n            cv,\n            chunk_counter,\n            buf,\n            buf_len,\n            blocks_compressed,\n            flags,\n            platform: _,\n        } = self;\n\n        cv.zeroize();\n        chunk_counter.zeroize();\n        buf.zeroize();\n        buf_len.zeroize();\n        blocks_compressed.zeroize();\n        flags.zeroize();\n    }\n}\n\n// IMPLEMENTATION NOTE\n// ===================\n// The recursive function compress_subtree_wide(), implemented below, is the\n// basis of high-performance BLAKE3. We use it both for all-at-once hashing,\n// and for the incremental input with Hasher (though we have to be careful with\n// subtree boundaries in the incremental case). compress_subtree_wide() applies\n// several optimizations at the same time:\n// - Multithreading with Rayon.\n// - Parallel chunk hashing with SIMD.\n// - Parallel parent hashing with SIMD. Note that while SIMD chunk hashing\n//   maxes out at MAX_SIMD_DEGREE*CHUNK_LEN, parallel parent hashing continues\n//   to benefit from larger inputs, because more levels of the tree benefit can\n//   use full-width SIMD vectors for parent hashing. Without parallel parent\n//   hashing, we lose about 10% of overall throughput on AVX2 and AVX-512.\n\n/// Undocumented and unstable, for benchmarks only.\n#[doc(hidden)]\n#[derive(Clone, Copy)]\npub enum IncrementCounter {\n    Yes,\n    No,\n}\n\nimpl IncrementCounter {\n    #[inline]\n    fn yes(&self) -> bool {\n        match self {\n            IncrementCounter::Yes => true,\n            IncrementCounter::No => false,\n        }\n    }\n}\n\n// The largest power of two less than or equal to `n`, used in Hasher::update(). This is similar to\n// left_subtree_len(n), but note that left_subtree_len(n) is strictly less than `n`.\nfn largest_power_of_two_leq(n: usize) -> usize {\n    ((n / 2) + 1).next_power_of_two()\n}\n\n// Use SIMD parallelism to hash up to MAX_SIMD_DEGREE chunks at the same time\n// on a single thread. Write out the chunk chaining values and return the\n// number of chunks hashed. These chunks are never the root and never empty;\n// those cases use a different codepath.\nfn compress_chunks_parallel(\n    input: &[u8],\n    key: &CVWords,\n    chunk_counter: u64,\n    flags: u8,\n    platform: Platform,\n    out: &mut [u8],\n) -> usize {\n    debug_assert!(!input.is_empty(), \"empty chunks below the root\");\n    debug_assert!(input.len() <= MAX_SIMD_DEGREE * CHUNK_LEN);\n\n    let mut chunks_exact = input.chunks_exact(CHUNK_LEN);\n    let mut chunks_array = ArrayVec::<&[u8; CHUNK_LEN], MAX_SIMD_DEGREE>::new();\n    for chunk in &mut chunks_exact {\n        chunks_array.push(array_ref!(chunk, 0, CHUNK_LEN));\n    }\n    platform.hash_many(\n        &chunks_array,\n        key,\n        chunk_counter,\n        IncrementCounter::Yes,\n        flags,\n        CHUNK_START,\n        CHUNK_END,\n        out,\n    );\n\n    // Hash the remaining partial chunk, if there is one. Note that the empty\n    // chunk (meaning the empty message) is a different codepath.\n    let chunks_so_far = chunks_array.len();\n    if !chunks_exact.remainder().is_empty() {\n        let counter = chunk_counter + chunks_so_far as u64;\n        let mut chunk_state = ChunkState::new(key, counter, flags, platform);\n        chunk_state.update(chunks_exact.remainder());\n        *array_mut_ref!(out, chunks_so_far * OUT_LEN, OUT_LEN) =\n            chunk_state.output().chaining_value();\n        chunks_so_far + 1\n    } else {\n        chunks_so_far\n    }\n}\n\n// Use SIMD parallelism to hash up to MAX_SIMD_DEGREE parents at the same time\n// on a single thread. Write out the parent chaining values and return the\n// number of parents hashed. (If there's an odd input chaining value left over,\n// return it as an additional output.) These parents are never the root and\n// never empty; those cases use a different codepath.\nfn compress_parents_parallel(\n    child_chaining_values: &[u8],\n    key: &CVWords,\n    flags: u8,\n    platform: Platform,\n    out: &mut [u8],\n) -> usize {\n    debug_assert_eq!(child_chaining_values.len() % OUT_LEN, 0, \"wacky hash bytes\");\n    let num_children = child_chaining_values.len() / OUT_LEN;\n    debug_assert!(num_children >= 2, \"not enough children\");\n    debug_assert!(num_children <= 2 * MAX_SIMD_DEGREE_OR_2, \"too many\");\n\n    let mut parents_exact = child_chaining_values.chunks_exact(BLOCK_LEN);\n    // Use MAX_SIMD_DEGREE_OR_2 rather than MAX_SIMD_DEGREE here, because of\n    // the requirements of compress_subtree_wide().\n    let mut parents_array = ArrayVec::<&[u8; BLOCK_LEN], MAX_SIMD_DEGREE_OR_2>::new();\n    for parent in &mut parents_exact {\n        parents_array.push(array_ref!(parent, 0, BLOCK_LEN));\n    }\n    platform.hash_many(\n        &parents_array,\n        key,\n        0, // Parents always use counter 0.\n        IncrementCounter::No,\n        flags | PARENT,\n        0, // Parents have no start flags.\n        0, // Parents have no end flags.\n        out,\n    );\n\n    // If there's an odd child left over, it becomes an output.\n    let parents_so_far = parents_array.len();\n    if !parents_exact.remainder().is_empty() {\n        out[parents_so_far * OUT_LEN..][..OUT_LEN].copy_from_slice(parents_exact.remainder());\n        parents_so_far + 1\n    } else {\n        parents_so_far\n    }\n}\n\n// The wide helper function returns (writes out) an array of chaining values\n// and returns the length of that array. The number of chaining values returned\n// is the dynamically detected SIMD degree, at most MAX_SIMD_DEGREE. Or fewer,\n// if the input is shorter than that many chunks. The reason for maintaining a\n// wide array of chaining values going back up the tree, is to allow the\n// implementation to hash as many parents in parallel as possible.\n//\n// As a special case when the SIMD degree is 1, this function will still return\n// at least 2 outputs. This guarantees that this function doesn't perform the\n// root compression. (If it did, it would use the wrong flags, and also we\n// wouldn't be able to implement extendable output.) Note that this function is\n// not used when the whole input is only 1 chunk long; that's a different\n// codepath.\n//\n// Why not just have the caller split the input on the first update(), instead\n// of implementing this special rule? Because we don't want to limit SIMD or\n// multithreading parallelism for that update().\nfn compress_subtree_wide<J: join::Join>(\n    input: &[u8],\n    key: &CVWords,\n    chunk_counter: u64,\n    flags: u8,\n    platform: Platform,\n    out: &mut [u8],\n) -> usize {\n    // Note that the single chunk case does *not* bump the SIMD degree up to 2\n    // when it is 1. This allows Rayon the option of multithreading even the\n    // 2-chunk case, which can help performance on smaller platforms.\n    if input.len() <= platform.simd_degree() * CHUNK_LEN {\n        return compress_chunks_parallel(input, key, chunk_counter, flags, platform, out);\n    }\n\n    // With more than simd_degree chunks, we need to recurse. Start by dividing\n    // the input into left and right subtrees. (Note that this is only optimal\n    // as long as the SIMD degree is a power of 2. If we ever get a SIMD degree\n    // of 3 or something, we'll need a more complicated strategy.)\n    debug_assert_eq!(platform.simd_degree().count_ones(), 1, \"power of 2\");\n    let (left, right) = input.split_at(hazmat::left_subtree_len(input.len() as u64) as usize);\n    let right_chunk_counter = chunk_counter + (left.len() / CHUNK_LEN) as u64;\n\n    // Make space for the child outputs. Here we use MAX_SIMD_DEGREE_OR_2 to\n    // account for the special case of returning 2 outputs when the SIMD degree\n    // is 1.\n    let mut cv_array = [0; 2 * MAX_SIMD_DEGREE_OR_2 * OUT_LEN];\n    let degree = if left.len() == CHUNK_LEN {\n        // The \"simd_degree=1 and we're at the leaf nodes\" case.\n        debug_assert_eq!(platform.simd_degree(), 1);\n        1\n    } else {\n        cmp::max(platform.simd_degree(), 2)\n    };\n    let (left_out, right_out) = cv_array.split_at_mut(degree * OUT_LEN);\n\n    // Recurse! For update_rayon(), this is where we take advantage of RayonJoin and use multiple\n    // threads.\n    let (left_n, right_n) = J::join(\n        || compress_subtree_wide::<J>(left, key, chunk_counter, flags, platform, left_out),\n        || compress_subtree_wide::<J>(right, key, right_chunk_counter, flags, platform, right_out),\n    );\n\n    // The special case again. If simd_degree=1, then we'll have left_n=1 and\n    // right_n=1. Rather than compressing them into a single output, return\n    // them directly, to make sure we always have at least two outputs.\n    debug_assert_eq!(left_n, degree);\n    debug_assert!(right_n >= 1 && right_n <= left_n);\n    if left_n == 1 {\n        out[..2 * OUT_LEN].copy_from_slice(&cv_array[..2 * OUT_LEN]);\n        return 2;\n    }\n\n    // Otherwise, do one layer of parent node compression.\n    let num_children = left_n + right_n;\n    compress_parents_parallel(\n        &cv_array[..num_children * OUT_LEN],\n        key,\n        flags,\n        platform,\n        out,\n    )\n}\n\n// Hash a subtree with compress_subtree_wide(), and then condense the resulting\n// list of chaining values down to a single parent node. Don't compress that\n// last parent node, however. Instead, return its message bytes (the\n// concatenated chaining values of its children). This is necessary when the\n// first call to update() supplies a complete subtree, because the topmost\n// parent node of that subtree could end up being the root. It's also necessary\n// for extended output in the general case.\n//\n// As with compress_subtree_wide(), this function is not used on inputs of 1\n// chunk or less. That's a different codepath.\nfn compress_subtree_to_parent_node<J: join::Join>(\n    input: &[u8],\n    key: &CVWords,\n    chunk_counter: u64,\n    flags: u8,\n    platform: Platform,\n) -> [u8; BLOCK_LEN] {\n    debug_assert!(input.len() > CHUNK_LEN);\n    let mut cv_array = [0; MAX_SIMD_DEGREE_OR_2 * OUT_LEN];\n    let mut num_cvs =\n        compress_subtree_wide::<J>(input, &key, chunk_counter, flags, platform, &mut cv_array);\n    debug_assert!(num_cvs >= 2);\n\n    // If MAX_SIMD_DEGREE is greater than 2 and there's enough input,\n    // compress_subtree_wide() returns more than 2 chaining values. Condense\n    // them into 2 by forming parent nodes repeatedly.\n    let mut out_array = [0; MAX_SIMD_DEGREE_OR_2 * OUT_LEN / 2];\n    while num_cvs > 2 {\n        let cv_slice = &cv_array[..num_cvs * OUT_LEN];\n        num_cvs = compress_parents_parallel(cv_slice, key, flags, platform, &mut out_array);\n        cv_array[..num_cvs * OUT_LEN].copy_from_slice(&out_array[..num_cvs * OUT_LEN]);\n    }\n    *array_ref!(cv_array, 0, 2 * OUT_LEN)\n}\n\n// Hash a complete input all at once. Unlike compress_subtree_wide() and\n// compress_subtree_to_parent_node(), this function handles the 1 chunk case.\nfn hash_all_at_once<J: join::Join>(input: &[u8], key: &CVWords, flags: u8) -> Output {\n    let platform = Platform::detect();\n\n    // If the whole subtree is one chunk, hash it directly with a ChunkState.\n    if input.len() <= CHUNK_LEN {\n        return ChunkState::new(key, 0, flags, platform)\n            .update(input)\n            .output();\n    }\n\n    // Otherwise construct an Output object from the parent node returned by\n    // compress_subtree_to_parent_node().\n    Output {\n        input_chaining_value: *key,\n        block: compress_subtree_to_parent_node::<J>(input, key, 0, flags, platform),\n        block_len: BLOCK_LEN as u8,\n        counter: 0,\n        flags: flags | PARENT,\n        platform,\n    }\n}\n\n/// The default hash function.\n///\n/// For an incremental version that accepts multiple writes, see [`Hasher::new`],\n/// [`Hasher::update`], and [`Hasher::finalize`]. These two lines are equivalent:\n///\n/// ```\n/// let hash = blake3::hash(b\"foo\");\n/// # let hash1 = hash;\n///\n/// let hash = blake3::Hasher::new().update(b\"foo\").finalize();\n/// # let hash2 = hash;\n/// # assert_eq!(hash1, hash2);\n/// ```\n///\n/// For output sizes other than 32 bytes, see [`Hasher::finalize_xof`] and\n/// [`OutputReader`].\n///\n/// This function is always single-threaded. For multithreading support, see\n/// [`Hasher::update_rayon`](struct.Hasher.html#method.update_rayon).\npub fn hash(input: &[u8]) -> Hash {\n    hash_all_at_once::<join::SerialJoin>(input, IV, 0).root_hash()\n}\n\n/// The keyed hash function.\n///\n/// This is suitable for use as a message authentication code, for example to\n/// replace an HMAC instance. In that use case, the constant-time equality\n/// checking provided by [`Hash`](struct.Hash.html) is almost always a security\n/// requirement, and callers need to be careful not to compare MACs as raw\n/// bytes.\n///\n/// For an incremental version that accepts multiple writes, see [`Hasher::new_keyed`],\n/// [`Hasher::update`], and [`Hasher::finalize`]. These two lines are equivalent:\n///\n/// ```\n/// # const KEY: &[u8; 32] = &[0; 32];\n/// let mac = blake3::keyed_hash(KEY, b\"foo\");\n/// # let mac1 = mac;\n///\n/// let mac = blake3::Hasher::new_keyed(KEY).update(b\"foo\").finalize();\n/// # let mac2 = mac;\n/// # assert_eq!(mac1, mac2);\n/// ```\n///\n/// For output sizes other than 32 bytes, see [`Hasher::finalize_xof`], and [`OutputReader`].\n///\n/// This function is always single-threaded. For multithreading support, see\n/// [`Hasher::update_rayon`](struct.Hasher.html#method.update_rayon).\npub fn keyed_hash(key: &[u8; KEY_LEN], input: &[u8]) -> Hash {\n    let key_words = platform::words_from_le_bytes_32(key);\n    hash_all_at_once::<join::SerialJoin>(input, &key_words, KEYED_HASH).root_hash()\n}\n\n/// The key derivation function.\n///\n/// Given cryptographic key material of any length and a context string of any\n/// length, this function outputs a 32-byte derived subkey. **The context string\n/// should be hardcoded, globally unique, and application-specific.** A good\n/// default format for such strings is `\"[application] [commit timestamp]\n/// [purpose]\"`, e.g., `\"example.com 2019-12-25 16:18:03 session tokens v1\"`.\n///\n/// Key derivation is important when you want to use the same key in multiple\n/// algorithms or use cases. Using the same key with different cryptographic\n/// algorithms is generally forbidden, and deriving a separate subkey for each\n/// use case protects you from bad interactions. Derived keys also mitigate the\n/// damage from one part of your application accidentally leaking its key.\n///\n/// As a rare exception to that general rule, however, it is possible to use\n/// `derive_key` itself with key material that you are already using with\n/// another algorithm. You might need to do this if you're adding features to\n/// an existing application, which does not yet use key derivation internally.\n/// However, you still must not share key material with algorithms that forbid\n/// key reuse entirely, like a one-time pad. For more on this, see sections 6.2\n/// and 7.8 of the [BLAKE3 paper](https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf).\n///\n/// Note that BLAKE3 is not a password hash, and **`derive_key` should never be\n/// used with passwords.** Instead, use a dedicated password hash like\n/// [Argon2]. Password hashes are entirely different from generic hash\n/// functions, with opposite design requirements.\n///\n/// For an incremental version that accepts multiple writes, see [`Hasher::new_derive_key`],\n/// [`Hasher::update`], and [`Hasher::finalize`]. These two statements are equivalent:\n///\n/// ```\n/// # const CONTEXT: &str = \"example.com 2019-12-25 16:18:03 session tokens v1\";\n/// let key = blake3::derive_key(CONTEXT, b\"key material, not a password\");\n/// # let key1 = key;\n///\n/// let key: [u8; 32] = blake3::Hasher::new_derive_key(CONTEXT)\n///     .update(b\"key material, not a password\")\n///     .finalize()\n///     .into();\n/// # let key2 = key;\n/// # assert_eq!(key1, key2);\n/// ```\n///\n/// For output sizes other than 32 bytes, see [`Hasher::finalize_xof`], and [`OutputReader`].\n///\n/// This function is always single-threaded. For multithreading support, see\n/// [`Hasher::update_rayon`](struct.Hasher.html#method.update_rayon).\n///\n/// [Argon2]: https://en.wikipedia.org/wiki/Argon2\npub fn derive_key(context: &str, key_material: &[u8]) -> [u8; OUT_LEN] {\n    let context_key = hazmat::hash_derive_key_context(context);\n    let context_key_words = platform::words_from_le_bytes_32(&context_key);\n    hash_all_at_once::<join::SerialJoin>(key_material, &context_key_words, DERIVE_KEY_MATERIAL)\n        .root_hash()\n        .0\n}\n\nfn parent_node_output(\n    left_child: &CVBytes,\n    right_child: &CVBytes,\n    key: &CVWords,\n    flags: u8,\n    platform: Platform,\n) -> Output {\n    let mut block = [0; BLOCK_LEN];\n    block[..32].copy_from_slice(left_child);\n    block[32..].copy_from_slice(right_child);\n    Output {\n        input_chaining_value: *key,\n        block,\n        block_len: BLOCK_LEN as u8,\n        counter: 0,\n        flags: flags | PARENT,\n        platform,\n    }\n}\n\n/// An incremental hash state that can accept any number of writes.\n///\n/// The `rayon` and `mmap` Cargo features enable additional methods on this\n/// type related to multithreading and memory-mapped IO.\n///\n/// When the `traits-preview` Cargo feature is enabled, this type implements\n/// several commonly used traits from the\n/// [`digest`](https://crates.io/crates/digest) crate. However, those\n/// traits aren't stable, and they're expected to change in incompatible ways\n/// before that crate reaches 1.0. For that reason, this crate makes no SemVer\n/// guarantees for this feature, and callers who use it should expect breaking\n/// changes between patch versions.\n///\n/// # Examples\n///\n/// ```\n/// # fn main() -> Result<(), Box<dyn std::error::Error>> {\n/// // Hash an input incrementally.\n/// let mut hasher = blake3::Hasher::new();\n/// hasher.update(b\"foo\");\n/// hasher.update(b\"bar\");\n/// hasher.update(b\"baz\");\n/// assert_eq!(hasher.finalize(), blake3::hash(b\"foobarbaz\"));\n///\n/// // Extended output. OutputReader also implements Read and Seek.\n/// # #[cfg(feature = \"std\")] {\n/// let mut output = [0; 1000];\n/// let mut output_reader = hasher.finalize_xof();\n/// output_reader.fill(&mut output);\n/// assert_eq!(&output[..32], blake3::hash(b\"foobarbaz\").as_bytes());\n/// # }\n/// # Ok(())\n/// # }\n/// ```\n#[derive(Clone)]\npub struct Hasher {\n    key: CVWords,\n    chunk_state: ChunkState,\n    initial_chunk_counter: u64,\n    // The stack size is MAX_DEPTH + 1 because we do lazy merging. For example,\n    // with 7 chunks, we have 3 entries in the stack. Adding an 8th chunk\n    // requires a 4th entry, rather than merging everything down to 1, because\n    // we don't know whether more input is coming. This is different from how\n    // the reference implementation does things.\n    cv_stack: ArrayVec<CVBytes, { MAX_DEPTH + 1 }>,\n}\n\nimpl Hasher {\n    fn new_internal(key: &CVWords, flags: u8) -> Self {\n        Self {\n            key: *key,\n            chunk_state: ChunkState::new(key, 0, flags, Platform::detect()),\n            initial_chunk_counter: 0,\n            cv_stack: ArrayVec::new(),\n        }\n    }\n\n    /// Construct a new `Hasher` for the regular hash function.\n    pub fn new() -> Self {\n        Self::new_internal(IV, 0)\n    }\n\n    /// Construct a new `Hasher` for the keyed hash function. See\n    /// [`keyed_hash`].\n    ///\n    /// [`keyed_hash`]: fn.keyed_hash.html\n    pub fn new_keyed(key: &[u8; KEY_LEN]) -> Self {\n        let key_words = platform::words_from_le_bytes_32(key);\n        Self::new_internal(&key_words, KEYED_HASH)\n    }\n\n    /// Construct a new `Hasher` for the key derivation function. See\n    /// [`derive_key`]. The context string should be hardcoded, globally\n    /// unique, and application-specific.\n    ///\n    /// [`derive_key`]: fn.derive_key.html\n    pub fn new_derive_key(context: &str) -> Self {\n        let context_key = hazmat::hash_derive_key_context(context);\n        let context_key_words = platform::words_from_le_bytes_32(&context_key);\n        Self::new_internal(&context_key_words, DERIVE_KEY_MATERIAL)\n    }\n\n    /// Reset the `Hasher` to its initial state.\n    ///\n    /// This is functionally the same as overwriting the `Hasher` with a new\n    /// one, using the same key or context string if any.\n    pub fn reset(&mut self) -> &mut Self {\n        self.chunk_state = ChunkState::new(\n            &self.key,\n            0,\n            self.chunk_state.flags,\n            self.chunk_state.platform,\n        );\n        self.cv_stack.clear();\n        self\n    }\n\n    // As described in push_cv() below, we do \"lazy merging\", delaying merges\n    // until right before the next CV is about to be added. This is different\n    // from the reference implementation. Another difference is that we aren't\n    // always merging 1 chunk at a time. Instead, each CV might represent any\n    // power-of-two number of chunks, as long as the smaller-above-larger stack\n    // order is maintained. Instead of the \"count the trailing 0-bits\"\n    // algorithm described in the spec (which assumes you're adding one chunk\n    // at a time), we use a \"count the total number of 1-bits\" variant (which\n    // doesn't assume that). The principle is the same: each CV that should\n    // remain in the stack is represented by a 1-bit in the total number of\n    // chunks (or bytes) so far.\n    fn merge_cv_stack(&mut self, chunk_counter: u64) {\n        // Account for non-zero cases of Hasher::set_input_offset, where there are no prior\n        // subtrees in the stack. Note that initial_chunk_counter is always 0 for callers who don't\n        // use the hazmat module.\n        let post_merge_stack_len =\n            (chunk_counter - self.initial_chunk_counter).count_ones() as usize;\n        while self.cv_stack.len() > post_merge_stack_len {\n            let right_child = self.cv_stack.pop().unwrap();\n            let left_child = self.cv_stack.pop().unwrap();\n            let parent_output = parent_node_output(\n                &left_child,\n                &right_child,\n                &self.key,\n                self.chunk_state.flags,\n                self.chunk_state.platform,\n            );\n            self.cv_stack.push(parent_output.chaining_value());\n        }\n    }\n\n    // In reference_impl.rs, we merge the new CV with existing CVs from the\n    // stack before pushing it. We can do that because we know more input is\n    // coming, so we know none of the merges are root.\n    //\n    // This setting is different. We want to feed as much input as possible to\n    // compress_subtree_wide(), without setting aside anything for the\n    // chunk_state. If the user gives us 64 KiB, we want to parallelize over\n    // all 64 KiB at once as a single subtree, if at all possible.\n    //\n    // This leads to two problems:\n    // 1) This 64 KiB input might be the only call that ever gets made to\n    //    update. In this case, the root node of the 64 KiB subtree would be\n    //    the root node of the whole tree, and it would need to be ROOT\n    //    finalized. We can't compress it until we know.\n    // 2) This 64 KiB input might complete a larger tree, whose root node is\n    //    similarly going to be the root of the whole tree. For example,\n    //    maybe we have 196 KiB (that is, 128 + 64) hashed so far. We can't\n    //    compress the node at the root of the 256 KiB subtree until we know\n    //    how to finalize it.\n    //\n    // The second problem is solved with \"lazy merging\". That is, when we're\n    // about to add a CV to the stack, we don't merge it with anything first,\n    // as the reference impl does. Instead we do merges using the *previous* CV\n    // that was added, which is sitting on top of the stack, and we put the new\n    // CV (unmerged) on top of the stack afterwards. This guarantees that we\n    // never merge the root node until finalize().\n    //\n    // Solving the first problem requires an additional tool,\n    // compress_subtree_to_parent_node(). That function always returns the top\n    // *two* chaining values of the subtree it's compressing. We then do lazy\n    // merging with each of them separately, so that the second CV will always\n    // remain unmerged. (That also helps us support extendable output when\n    // we're hashing an input all-at-once.)\n    fn push_cv(&mut self, new_cv: &CVBytes, chunk_counter: u64) {\n        self.merge_cv_stack(chunk_counter);\n        self.cv_stack.push(*new_cv);\n    }\n\n    /// Add input bytes to the hash state. You can call this any number of times.\n    ///\n    /// This method is always single-threaded. For multithreading support, see\n    /// [`update_rayon`](#method.update_rayon) (enabled with the `rayon` Cargo feature).\n    ///\n    /// Note that the degree of SIMD parallelism that `update` can use is limited by the size of\n    /// this input buffer. See [`update_reader`](#method.update_reader).\n    pub fn update(&mut self, input: &[u8]) -> &mut Self {\n        self.update_with_join::<join::SerialJoin>(input)\n    }\n\n    fn update_with_join<J: join::Join>(&mut self, mut input: &[u8]) -> &mut Self {\n        let input_offset = self.initial_chunk_counter * CHUNK_LEN as u64;\n        if let Some(max) = hazmat::max_subtree_len(input_offset) {\n            let remaining = max - self.count();\n            assert!(\n                input.len() as u64 <= remaining,\n                \"the subtree starting at {} contains at most {} bytes (found {})\",\n                CHUNK_LEN as u64 * self.initial_chunk_counter,\n                max,\n                input.len(),\n            );\n        }\n        // If we have some partial chunk bytes in the internal chunk_state, we\n        // need to finish that chunk first.\n        if self.chunk_state.count() > 0 {\n            let want = CHUNK_LEN - self.chunk_state.count();\n            let take = cmp::min(want, input.len());\n            self.chunk_state.update(&input[..take]);\n            input = &input[take..];\n            if !input.is_empty() {\n                // We've filled the current chunk, and there's more input\n                // coming, so we know it's not the root and we can finalize it.\n                // Then we'll proceed to hashing whole chunks below.\n                debug_assert_eq!(self.chunk_state.count(), CHUNK_LEN);\n                let chunk_cv = self.chunk_state.output().chaining_value();\n                self.push_cv(&chunk_cv, self.chunk_state.chunk_counter);\n                self.chunk_state = ChunkState::new(\n                    &self.key,\n                    self.chunk_state.chunk_counter + 1,\n                    self.chunk_state.flags,\n                    self.chunk_state.platform,\n                );\n            } else {\n                return self;\n            }\n        }\n\n        // Now the chunk_state is clear, and we have more input. If there's\n        // more than a single chunk (so, definitely not the root chunk), hash\n        // the largest whole subtree we can, with the full benefits of SIMD and\n        // multithreading parallelism. Two restrictions:\n        // - The subtree has to be a power-of-2 number of chunks. Only subtrees\n        //   along the right edge can be incomplete, and we don't know where\n        //   the right edge is going to be until we get to finalize().\n        // - The subtree must evenly divide the total number of chunks up until\n        //   this point (if total is not 0). If the current incomplete subtree\n        //   is only waiting for 1 more chunk, we can't hash a subtree of 4\n        //   chunks. We have to complete the current subtree first.\n        // Because we might need to break up the input to form powers of 2, or\n        // to evenly divide what we already have, this part runs in a loop.\n        while input.len() > CHUNK_LEN {\n            debug_assert_eq!(self.chunk_state.count(), 0, \"no partial chunk data\");\n            debug_assert_eq!(CHUNK_LEN.count_ones(), 1, \"power of 2 chunk len\");\n            let mut subtree_len = largest_power_of_two_leq(input.len());\n            let count_so_far = self.chunk_state.chunk_counter * CHUNK_LEN as u64;\n            // Shrink the subtree_len until it evenly divides the count so far.\n            // We know that subtree_len itself is a power of 2, so we can use a\n            // bitmasking trick instead of an actual remainder operation. (Note\n            // that if the caller consistently passes power-of-2 inputs of the\n            // same size, as is hopefully typical, this loop condition will\n            // always fail, and subtree_len will always be the full length of\n            // the input.)\n            //\n            // An aside: We don't have to shrink subtree_len quite this much.\n            // For example, if count_so_far is 1, we could pass 2 chunks to\n            // compress_subtree_to_parent_node. Since we'll get 2 CVs back,\n            // we'll still get the right answer in the end, and we might get to\n            // use 2-way SIMD parallelism. The problem with this optimization,\n            // is that it gets us stuck always hashing 2 chunks. The total\n            // number of chunks will remain odd, and we'll never graduate to\n            // higher degrees of parallelism. See\n            // https://github.com/BLAKE3-team/BLAKE3/issues/69.\n            while (subtree_len - 1) as u64 & count_so_far != 0 {\n                subtree_len /= 2;\n            }\n            // The shrunken subtree_len might now be 1 chunk long. If so, hash\n            // that one chunk by itself. Otherwise, compress the subtree into a\n            // pair of CVs.\n            let subtree_chunks = (subtree_len / CHUNK_LEN) as u64;\n            if subtree_len <= CHUNK_LEN {\n                debug_assert_eq!(subtree_len, CHUNK_LEN);\n                self.push_cv(\n                    &ChunkState::new(\n                        &self.key,\n                        self.chunk_state.chunk_counter,\n                        self.chunk_state.flags,\n                        self.chunk_state.platform,\n                    )\n                    .update(&input[..subtree_len])\n                    .output()\n                    .chaining_value(),\n                    self.chunk_state.chunk_counter,\n                );\n            } else {\n                // This is the high-performance happy path, though getting here\n                // depends on the caller giving us a long enough input.\n                let cv_pair = compress_subtree_to_parent_node::<J>(\n                    &input[..subtree_len],\n                    &self.key,\n                    self.chunk_state.chunk_counter,\n                    self.chunk_state.flags,\n                    self.chunk_state.platform,\n                );\n                let left_cv = array_ref!(cv_pair, 0, 32);\n                let right_cv = array_ref!(cv_pair, 32, 32);\n                // Push the two CVs we received into the CV stack in order. Because\n                // the stack merges lazily, this guarantees we aren't merging the\n                // root.\n                self.push_cv(left_cv, self.chunk_state.chunk_counter);\n                self.push_cv(\n                    right_cv,\n                    self.chunk_state.chunk_counter + (subtree_chunks / 2),\n                );\n            }\n            self.chunk_state.chunk_counter += subtree_chunks;\n            input = &input[subtree_len..];\n        }\n\n        // What remains is 1 chunk or less. Add it to the chunk state.\n        debug_assert!(input.len() <= CHUNK_LEN);\n        if !input.is_empty() {\n            self.chunk_state.update(input);\n            // Having added some input to the chunk_state, we know what's in\n            // the CV stack won't become the root node, and we can do an extra\n            // merge. This simplifies finalize().\n            self.merge_cv_stack(self.chunk_state.chunk_counter);\n        }\n\n        self\n    }\n\n    fn final_output(&self) -> Output {\n        // If the current chunk is the only chunk, that makes it the root node\n        // also. Convert it directly into an Output. Otherwise, we need to\n        // merge subtrees below.\n        if self.cv_stack.is_empty() {\n            debug_assert_eq!(self.chunk_state.chunk_counter, self.initial_chunk_counter);\n            return self.chunk_state.output();\n        }\n\n        // If there are any bytes in the ChunkState, finalize that chunk and\n        // merge its CV with everything in the CV stack. In that case, the work\n        // we did at the end of update() above guarantees that the stack\n        // doesn't contain any unmerged subtrees that need to be merged first.\n        // (This is important, because if there were two chunk hashes sitting\n        // on top of the stack, they would need to merge with each other, and\n        // merging a new chunk hash into them would be incorrect.)\n        //\n        // If there are no bytes in the ChunkState, we'll merge what's already\n        // in the stack. In this case it's fine if there are unmerged chunks on\n        // top, because we'll merge them with each other. Note that the case of\n        // the empty chunk is taken care of above.\n        let mut output: Output;\n        let mut num_cvs_remaining = self.cv_stack.len();\n        if self.chunk_state.count() > 0 {\n            debug_assert_eq!(\n                self.cv_stack.len(),\n                (self.chunk_state.chunk_counter - self.initial_chunk_counter).count_ones() as usize,\n                \"cv stack does not need a merge\",\n            );\n            output = self.chunk_state.output();\n        } else {\n            debug_assert!(self.cv_stack.len() >= 2);\n            output = parent_node_output(\n                &self.cv_stack[num_cvs_remaining - 2],\n                &self.cv_stack[num_cvs_remaining - 1],\n                &self.key,\n                self.chunk_state.flags,\n                self.chunk_state.platform,\n            );\n            num_cvs_remaining -= 2;\n        }\n        while num_cvs_remaining > 0 {\n            output = parent_node_output(\n                &self.cv_stack[num_cvs_remaining - 1],\n                &output.chaining_value(),\n                &self.key,\n                self.chunk_state.flags,\n                self.chunk_state.platform,\n            );\n            num_cvs_remaining -= 1;\n        }\n        output\n    }\n\n    /// Finalize the hash state and return the [`Hash`](struct.Hash.html) of\n    /// the input.\n    ///\n    /// This method is idempotent. Calling it twice will give the same result.\n    /// You can also add more input and finalize again.\n    pub fn finalize(&self) -> Hash {\n        assert_eq!(\n            self.initial_chunk_counter, 0,\n            \"set_input_offset must be used with finalize_non_root\",\n        );\n        self.final_output().root_hash()\n    }\n\n    /// Finalize the hash state and return an [`OutputReader`], which can\n    /// supply any number of output bytes.\n    ///\n    /// This method is idempotent. Calling it twice will give the same result.\n    /// You can also add more input and finalize again.\n    ///\n    /// [`OutputReader`]: struct.OutputReader.html\n    pub fn finalize_xof(&self) -> OutputReader {\n        assert_eq!(\n            self.initial_chunk_counter, 0,\n            \"set_input_offset must be used with finalize_non_root\",\n        );\n        OutputReader::new(self.final_output())\n    }\n\n    /// Return the total number of bytes hashed so far.\n    ///\n    /// [`hazmat::HasherExt::set_input_offset`] does not affect this value. This only counts bytes\n    /// passed to [`update`](Hasher::update).\n    pub fn count(&self) -> u64 {\n        // Account for non-zero cases of Hasher::set_input_offset. Note that initial_chunk_counter\n        // is always 0 for callers who don't use the hazmat module.\n        (self.chunk_state.chunk_counter - self.initial_chunk_counter) * CHUNK_LEN as u64\n            + self.chunk_state.count() as u64\n    }\n\n    /// As [`update`](Hasher::update), but reading from a\n    /// [`std::io::Read`](https://doc.rust-lang.org/std/io/trait.Read.html) implementation.\n    ///\n    /// [`Hasher`] implements\n    /// [`std::io::Write`](https://doc.rust-lang.org/std/io/trait.Write.html), so it's possible to\n    /// use [`std::io::copy`](https://doc.rust-lang.org/std/io/fn.copy.html) to update a [`Hasher`]\n    /// from any reader. Unfortunately, this standard approach can limit performance, because\n    /// `copy` currently uses an internal 8 KiB buffer that isn't big enough to take advantage of\n    /// all SIMD instruction sets. (In particular, [AVX-512](https://en.wikipedia.org/wiki/AVX-512)\n    /// needs a 16 KiB buffer.) `update_reader` avoids this performance problem and is slightly\n    /// more convenient.\n    ///\n    /// The internal buffer size this method uses may change at any time, and it may be different\n    /// for different targets. The only guarantee is that it will be large enough for all of this\n    /// crate's SIMD implementations on the current platform.\n    ///\n    /// The most common implementer of\n    /// [`std::io::Read`](https://doc.rust-lang.org/std/io/trait.Read.html) might be\n    /// [`std::fs::File`](https://doc.rust-lang.org/std/fs/struct.File.html), but note that memory\n    /// mapping can be faster than this method for hashing large files. See\n    /// [`update_mmap`](Hasher::update_mmap) and [`update_mmap_rayon`](Hasher::update_mmap_rayon),\n    /// which require the `mmap` and (for the latter) `rayon` Cargo features.\n    ///\n    /// This method requires the `std` Cargo feature, which is enabled by default.\n    ///\n    /// # Example\n    ///\n    /// ```no_run\n    /// # use std::fs::File;\n    /// # use std::io;\n    /// # fn main() -> io::Result<()> {\n    /// // Hash standard input.\n    /// let mut hasher = blake3::Hasher::new();\n    /// hasher.update_reader(std::io::stdin().lock())?;\n    /// println!(\"{}\", hasher.finalize());\n    /// # Ok(())\n    /// # }\n    /// ```\n    #[cfg(feature = \"std\")]\n    pub fn update_reader(&mut self, reader: impl std::io::Read) -> std::io::Result<&mut Self> {\n        io::copy_wide(reader, self)?;\n        Ok(self)\n    }\n\n    /// As [`update`](Hasher::update), but using Rayon-based multithreading\n    /// internally.\n    ///\n    /// This method is gated by the `rayon` Cargo feature, which is disabled by\n    /// default but enabled on [docs.rs](https://docs.rs).\n    ///\n    /// To get any performance benefit from multithreading, the input buffer\n    /// needs to be large. As a rule of thumb on x86_64, `update_rayon` is\n    /// _slower_ than `update` for inputs under 128 KiB. That threshold varies\n    /// quite a lot across different processors, and it's important to benchmark\n    /// your specific use case. See also the performance warning associated with\n    /// [`update_mmap_rayon`](Hasher::update_mmap_rayon).\n    ///\n    /// If you already have a large buffer in memory, and you want to hash it\n    /// with multiple threads, this method is a good option. However, reading a\n    /// file into memory just to call this method can be a performance mistake,\n    /// both because it requires lots of memory and because single-threaded\n    /// reads can be slow. For hashing whole files, see\n    /// [`update_mmap_rayon`](Hasher::update_mmap_rayon), which is gated by both\n    /// the `rayon` and `mmap` Cargo features.\n    #[cfg(feature = \"rayon\")]\n    pub fn update_rayon(&mut self, input: &[u8]) -> &mut Self {\n        self.update_with_join::<join::RayonJoin>(input)\n    }\n\n    /// As [`update`](Hasher::update), but reading the contents of a file using memory mapping.\n    ///\n    /// Not all files can be memory mapped, and memory mapping small files can be slower than\n    /// reading them the usual way. In those cases, this method will fall back to standard file IO.\n    /// The heuristic for whether to use memory mapping is currently very simple (file size >=\n    /// 16 KiB), and it might change at any time.\n    ///\n    /// Like [`update`](Hasher::update), this method is single-threaded. In this author's\n    /// experience, memory mapping improves single-threaded performance by ~10% for large files\n    /// that are already in cache. This probably varies between platforms, and as always it's a\n    /// good idea to benchmark your own use case. In comparison, the multithreaded\n    /// [`update_mmap_rayon`](Hasher::update_mmap_rayon) method can have a much larger impact on\n    /// performance.\n    ///\n    /// There's a correctness reason that this method takes\n    /// [`Path`](https://doc.rust-lang.org/stable/std/path/struct.Path.html) instead of\n    /// [`File`](https://doc.rust-lang.org/std/fs/struct.File.html): reading from a memory-mapped\n    /// file ignores the seek position of the original file handle (it neither respects the current\n    /// position nor updates the position). This difference in behavior would've caused\n    /// `update_mmap` and [`update_reader`](Hasher::update_reader) to give different answers and\n    /// have different side effects in some cases. Taking a\n    /// [`Path`](https://doc.rust-lang.org/stable/std/path/struct.Path.html) avoids this problem by\n    /// making it clear that a new [`File`](https://doc.rust-lang.org/std/fs/struct.File.html) is\n    /// opened internally.\n    ///\n    /// This method requires the `mmap` Cargo feature, which is disabled by default but enabled on\n    /// [docs.rs](https://docs.rs).\n    ///\n    /// # Example\n    ///\n    /// ```no_run\n    /// # use std::io;\n    /// # use std::path::Path;\n    /// # fn main() -> io::Result<()> {\n    /// let path = Path::new(\"file.dat\");\n    /// let mut hasher = blake3::Hasher::new();\n    /// hasher.update_mmap(path)?;\n    /// println!(\"{}\", hasher.finalize());\n    /// # Ok(())\n    /// # }\n    /// ```\n    #[cfg(feature = \"mmap\")]\n    pub fn update_mmap(&mut self, path: impl AsRef<std::path::Path>) -> std::io::Result<&mut Self> {\n        let file = std::fs::File::open(path.as_ref())?;\n        if let Some(mmap) = io::maybe_mmap_file(&file)? {\n            self.update(&mmap);\n        } else {\n            io::copy_wide(&file, self)?;\n        }\n        Ok(self)\n    }\n\n    /// As [`update_rayon`](Hasher::update_rayon), but reading the contents of a file using\n    /// memory mapping. This is the default behavior of `b3sum`.\n    ///\n    /// For large files that are likely to be in cache, this can be much faster than\n    /// single-threaded hashing. When benchmarks report that BLAKE3 is 10x or 20x faster than other\n    /// cryptographic hashes, this is usually what they're measuring. However...\n    ///\n    /// **Performance Warning:** There are cases where multithreading hurts performance. The worst\n    /// case is [a large file on a spinning disk](https://github.com/BLAKE3-team/BLAKE3/issues/31),\n    /// where simultaneous reads from multiple threads can cause \"thrashing\" (i.e. the disk spends\n    /// more time seeking around than reading data). Windows tends to be somewhat worse about this,\n    /// in part because it's less likely than Linux to keep very large files in cache. More\n    /// generally, if your CPU cores are already busy, then multithreading will add overhead\n    /// without improving performance. If your code runs in different environments that you don't\n    /// control and can't measure, then unfortunately there's no one-size-fits-all answer for\n    /// whether multithreading is a good idea.\n    ///\n    /// The memory mapping behavior of this function is the same as\n    /// [`update_mmap`](Hasher::update_mmap), and the heuristic for when to fall back to standard\n    /// file IO might change at any time.\n    ///\n    /// This method requires both the `mmap` and `rayon` Cargo features, which are disabled by\n    /// default but enabled on [docs.rs](https://docs.rs).\n    ///\n    /// # Example\n    ///\n    /// ```no_run\n    /// # use std::io;\n    /// # use std::path::Path;\n    /// # fn main() -> io::Result<()> {\n    /// # #[cfg(feature = \"rayon\")]\n    /// # {\n    /// let path = Path::new(\"big_file.dat\");\n    /// let mut hasher = blake3::Hasher::new();\n    /// hasher.update_mmap_rayon(path)?;\n    /// println!(\"{}\", hasher.finalize());\n    /// # }\n    /// # Ok(())\n    /// # }\n    /// ```\n    #[cfg(feature = \"mmap\")]\n    #[cfg(feature = \"rayon\")]\n    pub fn update_mmap_rayon(\n        &mut self,\n        path: impl AsRef<std::path::Path>,\n    ) -> std::io::Result<&mut Self> {\n        let file = std::fs::File::open(path.as_ref())?;\n        if let Some(mmap) = io::maybe_mmap_file(&file)? {\n            self.update_rayon(&mmap);\n        } else {\n            io::copy_wide(&file, self)?;\n        }\n        Ok(self)\n    }\n}\n\n// Don't derive(Debug), because the state may be secret.\nimpl fmt::Debug for Hasher {\n    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n        f.debug_struct(\"Hasher\")\n            .field(\"flags\", &self.chunk_state.flags)\n            .field(\"platform\", &self.chunk_state.platform)\n            .finish()\n    }\n}\n\nimpl Default for Hasher {\n    #[inline]\n    fn default() -> Self {\n        Self::new()\n    }\n}\n\n#[cfg(feature = \"std\")]\nimpl std::io::Write for Hasher {\n    /// This is equivalent to [`update`](#method.update).\n    #[inline]\n    fn write(&mut self, input: &[u8]) -> std::io::Result<usize> {\n        self.update(input);\n        Ok(input.len())\n    }\n\n    #[inline]\n    fn flush(&mut self) -> std::io::Result<()> {\n        Ok(())\n    }\n}\n\n#[cfg(feature = \"zeroize\")]\nimpl Zeroize for Hasher {\n    fn zeroize(&mut self) {\n        // Destructuring to trigger compile error as a reminder to update this impl.\n        let Self {\n            key,\n            chunk_state,\n            initial_chunk_counter,\n            cv_stack,\n        } = self;\n\n        key.zeroize();\n        chunk_state.zeroize();\n        initial_chunk_counter.zeroize();\n        cv_stack.zeroize();\n    }\n}\n\n/// An incremental reader for extended output, returned by\n/// [`Hasher::finalize_xof`](struct.Hasher.html#method.finalize_xof).\n///\n/// Shorter BLAKE3 outputs are prefixes of longer ones, and explicitly requesting a short output is\n/// equivalent to truncating the default-length output. Note that this is a difference between\n/// BLAKE2 and BLAKE3.\n///\n/// # Security notes\n///\n/// Outputs shorter than the default length of 32 bytes (256 bits) provide less security. An N-bit\n/// BLAKE3 output is intended to provide N bits of first and second preimage resistance and N/2\n/// bits of collision resistance, for any N up to 256. Longer outputs don't provide any additional\n/// security.\n///\n/// Avoid relying on the secrecy of the output offset, that is, the number of output bytes read or\n/// the arguments to [`seek`](struct.OutputReader.html#method.seek) or\n/// [`set_position`](struct.OutputReader.html#method.set_position). [_Block-Cipher-Based Tree\n/// Hashing_ by Aldo Gunsing](https://eprint.iacr.org/2022/283) shows that an attacker who knows\n/// both the message and the key (if any) can easily determine the offset of an extended output.\n/// For comparison, AES-CTR has a similar property: if you know the key, you can decrypt a block\n/// from an unknown position in the output stream to recover its block index. Callers with strong\n/// secret keys aren't affected in practice, but secret offsets are a [design\n/// smell](https://en.wikipedia.org/wiki/Design_smell) in any case.\n#[derive(Clone)]\npub struct OutputReader {\n    inner: Output,\n    position_within_block: u8,\n}\n\nimpl OutputReader {\n    fn new(inner: Output) -> Self {\n        Self {\n            inner,\n            position_within_block: 0,\n        }\n    }\n\n    // This helper function handles both the case where the output buffer is\n    // shorter than one block, and the case where our position_within_block is\n    // non-zero.\n    fn fill_one_block(&mut self, buf: &mut &mut [u8]) {\n        let output_block: [u8; BLOCK_LEN] = self.inner.root_output_block();\n        let output_bytes = &output_block[self.position_within_block as usize..];\n        let take = cmp::min(buf.len(), output_bytes.len());\n        buf[..take].copy_from_slice(&output_bytes[..take]);\n        self.position_within_block += take as u8;\n        if self.position_within_block == BLOCK_LEN as u8 {\n            self.inner.counter += 1;\n            self.position_within_block = 0;\n        }\n        // Advance the dest buffer. mem::take() is a borrowck workaround.\n        *buf = &mut core::mem::take(buf)[take..];\n    }\n\n    /// Fill a buffer with output bytes and advance the position of the\n    /// `OutputReader`. This is equivalent to [`Read::read`], except that it\n    /// doesn't return a `Result`. Both methods always fill the entire buffer.\n    ///\n    /// Note that `OutputReader` doesn't buffer output bytes internally, so\n    /// calling `fill` repeatedly with a short-length or odd-length slice will\n    /// end up performing the same compression multiple times. If you're\n    /// reading output in a loop, prefer a slice length that's a multiple of\n    /// [`BLOCK_LEN`] (64 bytes).\n    ///\n    /// The maximum output size of BLAKE3 is 2<sup>64</sup>-1 bytes. If you try\n    /// to extract more than that, for example by seeking near the end and\n    /// reading further, the behavior is unspecified.\n    ///\n    /// [`Read::read`]: #method.read\n    pub fn fill(&mut self, mut buf: &mut [u8]) {\n        if buf.is_empty() {\n            return;\n        }\n\n        // If we're partway through a block, try to get to a block boundary.\n        if self.position_within_block != 0 {\n            self.fill_one_block(&mut buf);\n        }\n\n        let full_blocks = buf.len() / BLOCK_LEN;\n        let full_blocks_len = full_blocks * BLOCK_LEN;\n        if full_blocks > 0 {\n            debug_assert_eq!(0, self.position_within_block);\n            self.inner.platform.xof_many(\n                &self.inner.input_chaining_value,\n                &self.inner.block,\n                self.inner.block_len,\n                self.inner.counter,\n                self.inner.flags | ROOT,\n                &mut buf[..full_blocks_len],\n            );\n            self.inner.counter += full_blocks as u64;\n            buf = &mut buf[full_blocks * BLOCK_LEN..];\n        }\n\n        if !buf.is_empty() {\n            debug_assert!(buf.len() < BLOCK_LEN);\n            self.fill_one_block(&mut buf);\n            debug_assert!(buf.is_empty());\n        }\n    }\n\n    /// Return the current read position in the output stream. This is\n    /// equivalent to [`Seek::stream_position`], except that it doesn't return\n    /// a `Result`. The position of a new `OutputReader` starts at 0, and each\n    /// call to [`fill`] or [`Read::read`] moves the position forward by the\n    /// number of bytes read.\n    ///\n    /// [`Seek::stream_position`]: #method.stream_position\n    /// [`fill`]: #method.fill\n    /// [`Read::read`]: #method.read\n    pub fn position(&self) -> u64 {\n        self.inner.counter * BLOCK_LEN as u64 + self.position_within_block as u64\n    }\n\n    /// Seek to a new read position in the output stream. This is equivalent to\n    /// calling [`Seek::seek`] with [`SeekFrom::Start`], except that it doesn't\n    /// return a `Result`.\n    ///\n    /// [`Seek::seek`]: #method.seek\n    /// [`SeekFrom::Start`]: https://doc.rust-lang.org/std/io/enum.SeekFrom.html\n    pub fn set_position(&mut self, position: u64) {\n        self.position_within_block = (position % BLOCK_LEN as u64) as u8;\n        self.inner.counter = position / BLOCK_LEN as u64;\n    }\n}\n\n// Don't derive(Debug), because the state may be secret.\nimpl fmt::Debug for OutputReader {\n    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n        f.debug_struct(\"OutputReader\")\n            .field(\"position\", &self.position())\n            .finish()\n    }\n}\n\n#[cfg(feature = \"std\")]\nimpl std::io::Read for OutputReader {\n    #[inline]\n    fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {\n        self.fill(buf);\n        Ok(buf.len())\n    }\n}\n\n#[cfg(feature = \"std\")]\nimpl std::io::Seek for OutputReader {\n    fn seek(&mut self, pos: std::io::SeekFrom) -> std::io::Result<u64> {\n        let max_position = u64::max_value() as i128;\n        let target_position: i128 = match pos {\n            std::io::SeekFrom::Start(x) => x as i128,\n            std::io::SeekFrom::Current(x) => self.position() as i128 + x as i128,\n            std::io::SeekFrom::End(_) => {\n                return Err(std::io::Error::new(\n                    std::io::ErrorKind::InvalidInput,\n                    \"seek from end not supported\",\n                ));\n            }\n        };\n        if target_position < 0 {\n            return Err(std::io::Error::new(\n                std::io::ErrorKind::InvalidInput,\n                \"seek before start\",\n            ));\n        }\n        self.set_position(cmp::min(target_position, max_position) as u64);\n        Ok(self.position())\n    }\n}\n\n#[cfg(feature = \"zeroize\")]\nimpl Zeroize for OutputReader {\n    fn zeroize(&mut self) {\n        // Destructuring to trigger compile error as a reminder to update this impl.\n        let Self {\n            inner,\n            position_within_block,\n        } = self;\n\n        inner.zeroize();\n        position_within_block.zeroize();\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/src/platform.rs",
    "content": "use crate::{portable, CVWords, IncrementCounter, BLOCK_LEN};\nuse arrayref::{array_mut_ref, array_ref};\n\ncfg_if::cfg_if! {\n    if #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))] {\n        cfg_if::cfg_if! {\n            if #[cfg(blake3_avx512_ffi)] {\n                pub const MAX_SIMD_DEGREE: usize = 16;\n            } else {\n                pub const MAX_SIMD_DEGREE: usize = 8;\n            }\n        }\n    } else if #[cfg(blake3_neon)] {\n        pub const MAX_SIMD_DEGREE: usize = 4;\n    } else if #[cfg(blake3_wasm32_simd)] {\n        pub const MAX_SIMD_DEGREE: usize = 4;\n    } else {\n        pub const MAX_SIMD_DEGREE: usize = 1;\n    }\n}\n\n// There are some places where we want a static size that's equal to the\n// MAX_SIMD_DEGREE, but also at least 2. Constant contexts aren't currently\n// allowed to use cmp::max, so we have to hardcode this additional constant\n// value. Get rid of this once cmp::max is a const fn.\ncfg_if::cfg_if! {\n    if #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))] {\n        cfg_if::cfg_if! {\n            if #[cfg(blake3_avx512_ffi)] {\n                pub const MAX_SIMD_DEGREE_OR_2: usize = 16;\n            } else {\n                pub const MAX_SIMD_DEGREE_OR_2: usize = 8;\n            }\n        }\n    } else if #[cfg(blake3_neon)] {\n        pub const MAX_SIMD_DEGREE_OR_2: usize = 4;\n    } else if #[cfg(blake3_wasm32_simd)] {\n        pub const MAX_SIMD_DEGREE_OR_2: usize = 4;\n    } else {\n        pub const MAX_SIMD_DEGREE_OR_2: usize = 2;\n    }\n}\n\n#[derive(Clone, Copy, Debug)]\npub enum Platform {\n    Portable,\n    #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n    SSE2,\n    #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n    SSE41,\n    #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n    AVX2,\n    #[cfg(blake3_avx512_ffi)]\n    #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n    AVX512,\n    #[cfg(blake3_neon)]\n    NEON,\n    #[cfg(blake3_wasm32_simd)]\n    #[allow(non_camel_case_types)]\n    WASM32_SIMD,\n}\n\nimpl Platform {\n    #[allow(unreachable_code)]\n    pub fn detect() -> Self {\n        #[cfg(miri)]\n        {\n            return Platform::Portable;\n        }\n\n        #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n        {\n            #[cfg(blake3_avx512_ffi)]\n            {\n                if avx512_detected() {\n                    return Platform::AVX512;\n                }\n            }\n            if avx2_detected() {\n                return Platform::AVX2;\n            }\n            if sse41_detected() {\n                return Platform::SSE41;\n            }\n            if sse2_detected() {\n                return Platform::SSE2;\n            }\n        }\n        // We don't use dynamic feature detection for NEON. If the \"neon\"\n        // feature is on, NEON is assumed to be supported.\n        #[cfg(blake3_neon)]\n        {\n            return Platform::NEON;\n        }\n        #[cfg(blake3_wasm32_simd)]\n        {\n            return Platform::WASM32_SIMD;\n        }\n        Platform::Portable\n    }\n\n    pub fn simd_degree(&self) -> usize {\n        let degree = match self {\n            Platform::Portable => 1,\n            #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n            Platform::SSE2 => 4,\n            #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n            Platform::SSE41 => 4,\n            #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n            Platform::AVX2 => 8,\n            #[cfg(blake3_avx512_ffi)]\n            #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n            Platform::AVX512 => 16,\n            #[cfg(blake3_neon)]\n            Platform::NEON => 4,\n            #[cfg(blake3_wasm32_simd)]\n            Platform::WASM32_SIMD => 4,\n        };\n        debug_assert!(degree <= MAX_SIMD_DEGREE);\n        degree\n    }\n\n    pub fn compress_in_place(\n        &self,\n        cv: &mut CVWords,\n        block: &[u8; BLOCK_LEN],\n        block_len: u8,\n        counter: u64,\n        flags: u8,\n    ) {\n        match self {\n            Platform::Portable => portable::compress_in_place(cv, block, block_len, counter, flags),\n            // Safe because detect() checked for platform support.\n            #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n            Platform::SSE2 => unsafe {\n                crate::sse2::compress_in_place(cv, block, block_len, counter, flags)\n            },\n            // Safe because detect() checked for platform support.\n            #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n            Platform::SSE41 | Platform::AVX2 => unsafe {\n                crate::sse41::compress_in_place(cv, block, block_len, counter, flags)\n            },\n            // Safe because detect() checked for platform support.\n            #[cfg(blake3_avx512_ffi)]\n            #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n            Platform::AVX512 => unsafe {\n                crate::avx512::compress_in_place(cv, block, block_len, counter, flags)\n            },\n            // No NEON compress_in_place() implementation yet.\n            #[cfg(blake3_neon)]\n            Platform::NEON => portable::compress_in_place(cv, block, block_len, counter, flags),\n            #[cfg(blake3_wasm32_simd)]\n            Platform::WASM32_SIMD => {\n                crate::wasm32_simd::compress_in_place(cv, block, block_len, counter, flags)\n            }\n        }\n    }\n\n    pub fn compress_xof(\n        &self,\n        cv: &CVWords,\n        block: &[u8; BLOCK_LEN],\n        block_len: u8,\n        counter: u64,\n        flags: u8,\n    ) -> [u8; 64] {\n        match self {\n            Platform::Portable => portable::compress_xof(cv, block, block_len, counter, flags),\n            // Safe because detect() checked for platform support.\n            #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n            Platform::SSE2 => unsafe {\n                crate::sse2::compress_xof(cv, block, block_len, counter, flags)\n            },\n            // Safe because detect() checked for platform support.\n            #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n            Platform::SSE41 | Platform::AVX2 => unsafe {\n                crate::sse41::compress_xof(cv, block, block_len, counter, flags)\n            },\n            // Safe because detect() checked for platform support.\n            #[cfg(blake3_avx512_ffi)]\n            #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n            Platform::AVX512 => unsafe {\n                crate::avx512::compress_xof(cv, block, block_len, counter, flags)\n            },\n            // No NEON compress_xof() implementation yet.\n            #[cfg(blake3_neon)]\n            Platform::NEON => portable::compress_xof(cv, block, block_len, counter, flags),\n            #[cfg(blake3_wasm32_simd)]\n            Platform::WASM32_SIMD => {\n                crate::wasm32_simd::compress_xof(cv, block, block_len, counter, flags)\n            }\n        }\n    }\n\n    // IMPLEMENTATION NOTE\n    // ===================\n    // hash_many() applies two optimizations. The critically important\n    // optimization is the high-performance parallel SIMD hashing mode,\n    // described in detail in the spec. This more than doubles throughput per\n    // thread. Another optimization is keeping the state vectors transposed\n    // from block to block within a chunk. When state vectors are transposed\n    // after every block, there's a small but measurable performance loss.\n    // Compressing chunks with a dedicated loop avoids this.\n\n    pub fn hash_many<const N: usize>(\n        &self,\n        inputs: &[&[u8; N]],\n        key: &CVWords,\n        counter: u64,\n        increment_counter: IncrementCounter,\n        flags: u8,\n        flags_start: u8,\n        flags_end: u8,\n        out: &mut [u8],\n    ) {\n        match self {\n            Platform::Portable => portable::hash_many(\n                inputs,\n                key,\n                counter,\n                increment_counter,\n                flags,\n                flags_start,\n                flags_end,\n                out,\n            ),\n            // Safe because detect() checked for platform support.\n            #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n            Platform::SSE2 => unsafe {\n                crate::sse2::hash_many(\n                    inputs,\n                    key,\n                    counter,\n                    increment_counter,\n                    flags,\n                    flags_start,\n                    flags_end,\n                    out,\n                )\n            },\n            // Safe because detect() checked for platform support.\n            #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n            Platform::SSE41 => unsafe {\n                crate::sse41::hash_many(\n                    inputs,\n                    key,\n                    counter,\n                    increment_counter,\n                    flags,\n                    flags_start,\n                    flags_end,\n                    out,\n                )\n            },\n            // Safe because detect() checked for platform support.\n            #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n            Platform::AVX2 => unsafe {\n                crate::avx2::hash_many(\n                    inputs,\n                    key,\n                    counter,\n                    increment_counter,\n                    flags,\n                    flags_start,\n                    flags_end,\n                    out,\n                )\n            },\n            // Safe because detect() checked for platform support.\n            #[cfg(blake3_avx512_ffi)]\n            #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n            Platform::AVX512 => unsafe {\n                crate::avx512::hash_many(\n                    inputs,\n                    key,\n                    counter,\n                    increment_counter,\n                    flags,\n                    flags_start,\n                    flags_end,\n                    out,\n                )\n            },\n            // Assumed to be safe if the \"neon\" feature is on.\n            #[cfg(blake3_neon)]\n            Platform::NEON => unsafe {\n                crate::neon::hash_many(\n                    inputs,\n                    key,\n                    counter,\n                    increment_counter,\n                    flags,\n                    flags_start,\n                    flags_end,\n                    out,\n                )\n            },\n            // Assumed to be safe if the \"wasm32_simd\" feature is on.\n            #[cfg(blake3_wasm32_simd)]\n            Platform::WASM32_SIMD => unsafe {\n                crate::wasm32_simd::hash_many(\n                    inputs,\n                    key,\n                    counter,\n                    increment_counter,\n                    flags,\n                    flags_start,\n                    flags_end,\n                    out,\n                )\n            },\n        }\n    }\n\n    pub fn xof_many(\n        &self,\n        cv: &CVWords,\n        block: &[u8; BLOCK_LEN],\n        block_len: u8,\n        mut counter: u64,\n        flags: u8,\n        out: &mut [u8],\n    ) {\n        debug_assert_eq!(0, out.len() % BLOCK_LEN, \"whole blocks only\");\n        if out.is_empty() {\n            // The current assembly implementation always outputs at least 1 block.\n            return;\n        }\n        match self {\n            // Safe because detect() checked for platform support.\n            #[cfg(blake3_avx512_ffi)]\n            #[cfg(unix)]\n            #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n            Platform::AVX512 => unsafe {\n                crate::avx512::xof_many(cv, block, block_len, counter, flags, out)\n            },\n            _ => {\n                // For platforms without an optimized xof_many, fall back to a loop over\n                // compress_xof. This is still faster than portable code.\n                for out_block in out.chunks_exact_mut(BLOCK_LEN) {\n                    // TODO: Use array_chunks_mut here once that's stable.\n                    let out_array: &mut [u8; BLOCK_LEN] = out_block.try_into().unwrap();\n                    *out_array = self.compress_xof(cv, block, block_len, counter, flags);\n                    counter += 1;\n                }\n            }\n        }\n    }\n\n    // Explicit platform constructors, for benchmarks.\n\n    pub fn portable() -> Self {\n        Self::Portable\n    }\n\n    #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n    pub fn sse2() -> Option<Self> {\n        if sse2_detected() {\n            Some(Self::SSE2)\n        } else {\n            None\n        }\n    }\n\n    #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n    pub fn sse41() -> Option<Self> {\n        if sse41_detected() {\n            Some(Self::SSE41)\n        } else {\n            None\n        }\n    }\n\n    #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n    pub fn avx2() -> Option<Self> {\n        if avx2_detected() {\n            Some(Self::AVX2)\n        } else {\n            None\n        }\n    }\n\n    #[cfg(blake3_avx512_ffi)]\n    #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n    pub fn avx512() -> Option<Self> {\n        if avx512_detected() {\n            Some(Self::AVX512)\n        } else {\n            None\n        }\n    }\n\n    #[cfg(blake3_neon)]\n    pub fn neon() -> Option<Self> {\n        // Assumed to be safe if the \"neon\" feature is on.\n        Some(Self::NEON)\n    }\n\n    #[cfg(blake3_wasm32_simd)]\n    pub fn wasm32_simd() -> Option<Self> {\n        // Assumed to be safe if the \"wasm32_simd\" feature is on.\n        Some(Self::WASM32_SIMD)\n    }\n}\n\n// Note that AVX-512 is divided into multiple featuresets, and we use two of\n// them, F and VL.\n#[cfg(blake3_avx512_ffi)]\n#[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n#[inline(always)]\n#[allow(unreachable_code)]\npub fn avx512_detected() -> bool {\n    if cfg!(miri) {\n        return false;\n    }\n\n    // A testing-only short-circuit.\n    if cfg!(feature = \"no_avx512\") {\n        return false;\n    }\n    // Static check, e.g. for building with target-cpu=native.\n    #[cfg(all(target_feature = \"avx512f\", target_feature = \"avx512vl\"))]\n    {\n        return true;\n    }\n    // Dynamic check, if std is enabled.\n    #[cfg(feature = \"std\")]\n    {\n        if is_x86_feature_detected!(\"avx512f\") && is_x86_feature_detected!(\"avx512vl\") {\n            return true;\n        }\n    }\n    false\n}\n\n#[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n#[inline(always)]\n#[allow(unreachable_code)]\npub fn avx2_detected() -> bool {\n    if cfg!(miri) {\n        return false;\n    }\n\n    // A testing-only short-circuit.\n    if cfg!(feature = \"no_avx2\") {\n        return false;\n    }\n    // Static check, e.g. for building with target-cpu=native.\n    #[cfg(target_feature = \"avx2\")]\n    {\n        return true;\n    }\n    // Dynamic check, if std is enabled.\n    #[cfg(feature = \"std\")]\n    {\n        if is_x86_feature_detected!(\"avx2\") {\n            return true;\n        }\n    }\n    false\n}\n\n#[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n#[inline(always)]\n#[allow(unreachable_code)]\npub fn sse41_detected() -> bool {\n    if cfg!(miri) {\n        return false;\n    }\n\n    // A testing-only short-circuit.\n    if cfg!(feature = \"no_sse41\") {\n        return false;\n    }\n    // Static check, e.g. for building with target-cpu=native.\n    #[cfg(target_feature = \"sse4.1\")]\n    {\n        return true;\n    }\n    // Dynamic check, if std is enabled.\n    #[cfg(feature = \"std\")]\n    {\n        if is_x86_feature_detected!(\"sse4.1\") {\n            return true;\n        }\n    }\n    false\n}\n\n#[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n#[inline(always)]\n#[allow(unreachable_code)]\npub fn sse2_detected() -> bool {\n    if cfg!(miri) {\n        return false;\n    }\n\n    // A testing-only short-circuit.\n    if cfg!(feature = \"no_sse2\") {\n        return false;\n    }\n    // Static check, e.g. for building with target-cpu=native.\n    #[cfg(target_feature = \"sse2\")]\n    {\n        return true;\n    }\n    // Dynamic check, if std is enabled.\n    #[cfg(feature = \"std\")]\n    {\n        if is_x86_feature_detected!(\"sse2\") {\n            return true;\n        }\n    }\n    false\n}\n\n#[inline(always)]\npub fn words_from_le_bytes_32(bytes: &[u8; 32]) -> [u32; 8] {\n    let mut out = [0; 8];\n    out[0] = u32::from_le_bytes(*array_ref!(bytes, 0 * 4, 4));\n    out[1] = u32::from_le_bytes(*array_ref!(bytes, 1 * 4, 4));\n    out[2] = u32::from_le_bytes(*array_ref!(bytes, 2 * 4, 4));\n    out[3] = u32::from_le_bytes(*array_ref!(bytes, 3 * 4, 4));\n    out[4] = u32::from_le_bytes(*array_ref!(bytes, 4 * 4, 4));\n    out[5] = u32::from_le_bytes(*array_ref!(bytes, 5 * 4, 4));\n    out[6] = u32::from_le_bytes(*array_ref!(bytes, 6 * 4, 4));\n    out[7] = u32::from_le_bytes(*array_ref!(bytes, 7 * 4, 4));\n    out\n}\n\n#[inline(always)]\npub fn words_from_le_bytes_64(bytes: &[u8; 64]) -> [u32; 16] {\n    let mut out = [0; 16];\n    out[0] = u32::from_le_bytes(*array_ref!(bytes, 0 * 4, 4));\n    out[1] = u32::from_le_bytes(*array_ref!(bytes, 1 * 4, 4));\n    out[2] = u32::from_le_bytes(*array_ref!(bytes, 2 * 4, 4));\n    out[3] = u32::from_le_bytes(*array_ref!(bytes, 3 * 4, 4));\n    out[4] = u32::from_le_bytes(*array_ref!(bytes, 4 * 4, 4));\n    out[5] = u32::from_le_bytes(*array_ref!(bytes, 5 * 4, 4));\n    out[6] = u32::from_le_bytes(*array_ref!(bytes, 6 * 4, 4));\n    out[7] = u32::from_le_bytes(*array_ref!(bytes, 7 * 4, 4));\n    out[8] = u32::from_le_bytes(*array_ref!(bytes, 8 * 4, 4));\n    out[9] = u32::from_le_bytes(*array_ref!(bytes, 9 * 4, 4));\n    out[10] = u32::from_le_bytes(*array_ref!(bytes, 10 * 4, 4));\n    out[11] = u32::from_le_bytes(*array_ref!(bytes, 11 * 4, 4));\n    out[12] = u32::from_le_bytes(*array_ref!(bytes, 12 * 4, 4));\n    out[13] = u32::from_le_bytes(*array_ref!(bytes, 13 * 4, 4));\n    out[14] = u32::from_le_bytes(*array_ref!(bytes, 14 * 4, 4));\n    out[15] = u32::from_le_bytes(*array_ref!(bytes, 15 * 4, 4));\n    out\n}\n\n#[inline(always)]\npub fn le_bytes_from_words_32(words: &[u32; 8]) -> [u8; 32] {\n    let mut out = [0; 32];\n    *array_mut_ref!(out, 0 * 4, 4) = words[0].to_le_bytes();\n    *array_mut_ref!(out, 1 * 4, 4) = words[1].to_le_bytes();\n    *array_mut_ref!(out, 2 * 4, 4) = words[2].to_le_bytes();\n    *array_mut_ref!(out, 3 * 4, 4) = words[3].to_le_bytes();\n    *array_mut_ref!(out, 4 * 4, 4) = words[4].to_le_bytes();\n    *array_mut_ref!(out, 5 * 4, 4) = words[5].to_le_bytes();\n    *array_mut_ref!(out, 6 * 4, 4) = words[6].to_le_bytes();\n    *array_mut_ref!(out, 7 * 4, 4) = words[7].to_le_bytes();\n    out\n}\n\n#[inline(always)]\npub fn le_bytes_from_words_64(words: &[u32; 16]) -> [u8; 64] {\n    let mut out = [0; 64];\n    *array_mut_ref!(out, 0 * 4, 4) = words[0].to_le_bytes();\n    *array_mut_ref!(out, 1 * 4, 4) = words[1].to_le_bytes();\n    *array_mut_ref!(out, 2 * 4, 4) = words[2].to_le_bytes();\n    *array_mut_ref!(out, 3 * 4, 4) = words[3].to_le_bytes();\n    *array_mut_ref!(out, 4 * 4, 4) = words[4].to_le_bytes();\n    *array_mut_ref!(out, 5 * 4, 4) = words[5].to_le_bytes();\n    *array_mut_ref!(out, 6 * 4, 4) = words[6].to_le_bytes();\n    *array_mut_ref!(out, 7 * 4, 4) = words[7].to_le_bytes();\n    *array_mut_ref!(out, 8 * 4, 4) = words[8].to_le_bytes();\n    *array_mut_ref!(out, 9 * 4, 4) = words[9].to_le_bytes();\n    *array_mut_ref!(out, 10 * 4, 4) = words[10].to_le_bytes();\n    *array_mut_ref!(out, 11 * 4, 4) = words[11].to_le_bytes();\n    *array_mut_ref!(out, 12 * 4, 4) = words[12].to_le_bytes();\n    *array_mut_ref!(out, 13 * 4, 4) = words[13].to_le_bytes();\n    *array_mut_ref!(out, 14 * 4, 4) = words[14].to_le_bytes();\n    *array_mut_ref!(out, 15 * 4, 4) = words[15].to_le_bytes();\n    out\n}\n"
  },
  {
    "path": "third-party/blake3/src/portable.rs",
    "content": "use crate::{\n    counter_high, counter_low, CVBytes, CVWords, IncrementCounter, BLOCK_LEN, IV, MSG_SCHEDULE,\n    OUT_LEN,\n};\nuse arrayref::{array_mut_ref, array_ref};\n\n#[inline(always)]\nfn g(state: &mut [u32; 16], a: usize, b: usize, c: usize, d: usize, x: u32, y: u32) {\n    state[a] = state[a].wrapping_add(state[b]).wrapping_add(x);\n    state[d] = (state[d] ^ state[a]).rotate_right(16);\n    state[c] = state[c].wrapping_add(state[d]);\n    state[b] = (state[b] ^ state[c]).rotate_right(12);\n    state[a] = state[a].wrapping_add(state[b]).wrapping_add(y);\n    state[d] = (state[d] ^ state[a]).rotate_right(8);\n    state[c] = state[c].wrapping_add(state[d]);\n    state[b] = (state[b] ^ state[c]).rotate_right(7);\n}\n\n#[inline(always)]\nfn round(state: &mut [u32; 16], msg: &[u32; 16], round: usize) {\n    // Select the message schedule based on the round.\n    let schedule = MSG_SCHEDULE[round];\n\n    // Mix the columns.\n    g(state, 0, 4, 8, 12, msg[schedule[0]], msg[schedule[1]]);\n    g(state, 1, 5, 9, 13, msg[schedule[2]], msg[schedule[3]]);\n    g(state, 2, 6, 10, 14, msg[schedule[4]], msg[schedule[5]]);\n    g(state, 3, 7, 11, 15, msg[schedule[6]], msg[schedule[7]]);\n\n    // Mix the diagonals.\n    g(state, 0, 5, 10, 15, msg[schedule[8]], msg[schedule[9]]);\n    g(state, 1, 6, 11, 12, msg[schedule[10]], msg[schedule[11]]);\n    g(state, 2, 7, 8, 13, msg[schedule[12]], msg[schedule[13]]);\n    g(state, 3, 4, 9, 14, msg[schedule[14]], msg[schedule[15]]);\n}\n\n#[inline(always)]\nfn compress_pre(\n    cv: &CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n) -> [u32; 16] {\n    let block_words = crate::platform::words_from_le_bytes_64(block);\n\n    let mut state = [\n        cv[0],\n        cv[1],\n        cv[2],\n        cv[3],\n        cv[4],\n        cv[5],\n        cv[6],\n        cv[7],\n        IV[0],\n        IV[1],\n        IV[2],\n        IV[3],\n        counter_low(counter),\n        counter_high(counter),\n        block_len as u32,\n        flags as u32,\n    ];\n\n    round(&mut state, &block_words, 0);\n    round(&mut state, &block_words, 1);\n    round(&mut state, &block_words, 2);\n    round(&mut state, &block_words, 3);\n    round(&mut state, &block_words, 4);\n    round(&mut state, &block_words, 5);\n    round(&mut state, &block_words, 6);\n\n    state\n}\n\npub fn compress_in_place(\n    cv: &mut CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n) {\n    let state = compress_pre(cv, block, block_len, counter, flags);\n\n    cv[0] = state[0] ^ state[8];\n    cv[1] = state[1] ^ state[9];\n    cv[2] = state[2] ^ state[10];\n    cv[3] = state[3] ^ state[11];\n    cv[4] = state[4] ^ state[12];\n    cv[5] = state[5] ^ state[13];\n    cv[6] = state[6] ^ state[14];\n    cv[7] = state[7] ^ state[15];\n}\n\npub fn compress_xof(\n    cv: &CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n) -> [u8; 64] {\n    let mut state = compress_pre(cv, block, block_len, counter, flags);\n    state[0] ^= state[8];\n    state[1] ^= state[9];\n    state[2] ^= state[10];\n    state[3] ^= state[11];\n    state[4] ^= state[12];\n    state[5] ^= state[13];\n    state[6] ^= state[14];\n    state[7] ^= state[15];\n    state[8] ^= cv[0];\n    state[9] ^= cv[1];\n    state[10] ^= cv[2];\n    state[11] ^= cv[3];\n    state[12] ^= cv[4];\n    state[13] ^= cv[5];\n    state[14] ^= cv[6];\n    state[15] ^= cv[7];\n    crate::platform::le_bytes_from_words_64(&state)\n}\n\npub fn hash1<const N: usize>(\n    input: &[u8; N],\n    key: &CVWords,\n    counter: u64,\n    flags: u8,\n    flags_start: u8,\n    flags_end: u8,\n    out: &mut CVBytes,\n) {\n    debug_assert_eq!(N % BLOCK_LEN, 0, \"uneven blocks\");\n    let mut cv = *key;\n    let mut block_flags = flags | flags_start;\n    let mut slice = &input[..];\n    while slice.len() >= BLOCK_LEN {\n        if slice.len() == BLOCK_LEN {\n            block_flags |= flags_end;\n        }\n        compress_in_place(\n            &mut cv,\n            array_ref!(slice, 0, BLOCK_LEN),\n            BLOCK_LEN as u8,\n            counter,\n            block_flags,\n        );\n        block_flags = flags;\n        slice = &slice[BLOCK_LEN..];\n    }\n    *out = crate::platform::le_bytes_from_words_32(&cv);\n}\n\npub fn hash_many<const N: usize>(\n    inputs: &[&[u8; N]],\n    key: &CVWords,\n    mut counter: u64,\n    increment_counter: IncrementCounter,\n    flags: u8,\n    flags_start: u8,\n    flags_end: u8,\n    out: &mut [u8],\n) {\n    debug_assert!(out.len() >= inputs.len() * OUT_LEN, \"out too short\");\n    for (&input, output) in inputs.iter().zip(out.chunks_exact_mut(OUT_LEN)) {\n        hash1(\n            input,\n            key,\n            counter,\n            flags,\n            flags_start,\n            flags_end,\n            array_mut_ref!(output, 0, OUT_LEN),\n        );\n        if increment_counter.yes() {\n            counter += 1;\n        }\n    }\n}\n\n#[cfg(test)]\npub mod test {\n    use super::*;\n\n    // This is basically testing the portable implementation against itself,\n    // but it also checks that compress_in_place and compress_xof are\n    // consistent. And there are tests against the reference implementation and\n    // against hardcoded test vectors elsewhere.\n    #[test]\n    fn test_compress() {\n        crate::test::test_compress_fn(compress_in_place, compress_xof);\n    }\n\n    // Ditto.\n    #[test]\n    fn test_hash_many() {\n        crate::test::test_hash_many_fn(hash_many, hash_many);\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/src/rust_avx2.rs",
    "content": "#[cfg(target_arch = \"x86\")]\nuse core::arch::x86::*;\n#[cfg(target_arch = \"x86_64\")]\nuse core::arch::x86_64::*;\n\nuse crate::{\n    counter_high, counter_low, CVWords, IncrementCounter, BLOCK_LEN, IV, MSG_SCHEDULE, OUT_LEN,\n};\nuse arrayref::{array_mut_ref, mut_array_refs};\n\npub const DEGREE: usize = 8;\n\n#[inline(always)]\nunsafe fn loadu(src: *const u8) -> __m256i {\n    // This is an unaligned load, so the pointer cast is allowed.\n    _mm256_loadu_si256(src as *const __m256i)\n}\n\n#[inline(always)]\nunsafe fn storeu(src: __m256i, dest: *mut u8) {\n    // This is an unaligned store, so the pointer cast is allowed.\n    _mm256_storeu_si256(dest as *mut __m256i, src)\n}\n\n#[inline(always)]\nunsafe fn add(a: __m256i, b: __m256i) -> __m256i {\n    _mm256_add_epi32(a, b)\n}\n\n#[inline(always)]\nunsafe fn xor(a: __m256i, b: __m256i) -> __m256i {\n    _mm256_xor_si256(a, b)\n}\n\n#[inline(always)]\nunsafe fn set1(x: u32) -> __m256i {\n    _mm256_set1_epi32(x as i32)\n}\n\n#[inline(always)]\nunsafe fn set8(a: u32, b: u32, c: u32, d: u32, e: u32, f: u32, g: u32, h: u32) -> __m256i {\n    _mm256_setr_epi32(\n        a as i32, b as i32, c as i32, d as i32, e as i32, f as i32, g as i32, h as i32,\n    )\n}\n\n// These rotations are the \"simple/shifts version\". For the\n// \"complicated/shuffles version\", see\n// https://github.com/sneves/blake2-avx2/blob/b3723921f668df09ece52dcd225a36d4a4eea1d9/blake2s-common.h#L63-L66.\n// For a discussion of the tradeoffs, see\n// https://github.com/sneves/blake2-avx2/pull/5. Due to an LLVM bug\n// (https://bugs.llvm.org/show_bug.cgi?id=44379), this version performs better\n// on recent x86 chips.\n\n#[inline(always)]\nunsafe fn rot16(x: __m256i) -> __m256i {\n    _mm256_or_si256(_mm256_srli_epi32(x, 16), _mm256_slli_epi32(x, 32 - 16))\n}\n\n#[inline(always)]\nunsafe fn rot12(x: __m256i) -> __m256i {\n    _mm256_or_si256(_mm256_srli_epi32(x, 12), _mm256_slli_epi32(x, 32 - 12))\n}\n\n#[inline(always)]\nunsafe fn rot8(x: __m256i) -> __m256i {\n    _mm256_or_si256(_mm256_srli_epi32(x, 8), _mm256_slli_epi32(x, 32 - 8))\n}\n\n#[inline(always)]\nunsafe fn rot7(x: __m256i) -> __m256i {\n    _mm256_or_si256(_mm256_srli_epi32(x, 7), _mm256_slli_epi32(x, 32 - 7))\n}\n\n#[inline(always)]\nunsafe fn round(v: &mut [__m256i; 16], m: &[__m256i; 16], r: usize) {\n    v[0] = add(v[0], m[MSG_SCHEDULE[r][0] as usize]);\n    v[1] = add(v[1], m[MSG_SCHEDULE[r][2] as usize]);\n    v[2] = add(v[2], m[MSG_SCHEDULE[r][4] as usize]);\n    v[3] = add(v[3], m[MSG_SCHEDULE[r][6] as usize]);\n    v[0] = add(v[0], v[4]);\n    v[1] = add(v[1], v[5]);\n    v[2] = add(v[2], v[6]);\n    v[3] = add(v[3], v[7]);\n    v[12] = xor(v[12], v[0]);\n    v[13] = xor(v[13], v[1]);\n    v[14] = xor(v[14], v[2]);\n    v[15] = xor(v[15], v[3]);\n    v[12] = rot16(v[12]);\n    v[13] = rot16(v[13]);\n    v[14] = rot16(v[14]);\n    v[15] = rot16(v[15]);\n    v[8] = add(v[8], v[12]);\n    v[9] = add(v[9], v[13]);\n    v[10] = add(v[10], v[14]);\n    v[11] = add(v[11], v[15]);\n    v[4] = xor(v[4], v[8]);\n    v[5] = xor(v[5], v[9]);\n    v[6] = xor(v[6], v[10]);\n    v[7] = xor(v[7], v[11]);\n    v[4] = rot12(v[4]);\n    v[5] = rot12(v[5]);\n    v[6] = rot12(v[6]);\n    v[7] = rot12(v[7]);\n    v[0] = add(v[0], m[MSG_SCHEDULE[r][1] as usize]);\n    v[1] = add(v[1], m[MSG_SCHEDULE[r][3] as usize]);\n    v[2] = add(v[2], m[MSG_SCHEDULE[r][5] as usize]);\n    v[3] = add(v[3], m[MSG_SCHEDULE[r][7] as usize]);\n    v[0] = add(v[0], v[4]);\n    v[1] = add(v[1], v[5]);\n    v[2] = add(v[2], v[6]);\n    v[3] = add(v[3], v[7]);\n    v[12] = xor(v[12], v[0]);\n    v[13] = xor(v[13], v[1]);\n    v[14] = xor(v[14], v[2]);\n    v[15] = xor(v[15], v[3]);\n    v[12] = rot8(v[12]);\n    v[13] = rot8(v[13]);\n    v[14] = rot8(v[14]);\n    v[15] = rot8(v[15]);\n    v[8] = add(v[8], v[12]);\n    v[9] = add(v[9], v[13]);\n    v[10] = add(v[10], v[14]);\n    v[11] = add(v[11], v[15]);\n    v[4] = xor(v[4], v[8]);\n    v[5] = xor(v[5], v[9]);\n    v[6] = xor(v[6], v[10]);\n    v[7] = xor(v[7], v[11]);\n    v[4] = rot7(v[4]);\n    v[5] = rot7(v[5]);\n    v[6] = rot7(v[6]);\n    v[7] = rot7(v[7]);\n\n    v[0] = add(v[0], m[MSG_SCHEDULE[r][8] as usize]);\n    v[1] = add(v[1], m[MSG_SCHEDULE[r][10] as usize]);\n    v[2] = add(v[2], m[MSG_SCHEDULE[r][12] as usize]);\n    v[3] = add(v[3], m[MSG_SCHEDULE[r][14] as usize]);\n    v[0] = add(v[0], v[5]);\n    v[1] = add(v[1], v[6]);\n    v[2] = add(v[2], v[7]);\n    v[3] = add(v[3], v[4]);\n    v[15] = xor(v[15], v[0]);\n    v[12] = xor(v[12], v[1]);\n    v[13] = xor(v[13], v[2]);\n    v[14] = xor(v[14], v[3]);\n    v[15] = rot16(v[15]);\n    v[12] = rot16(v[12]);\n    v[13] = rot16(v[13]);\n    v[14] = rot16(v[14]);\n    v[10] = add(v[10], v[15]);\n    v[11] = add(v[11], v[12]);\n    v[8] = add(v[8], v[13]);\n    v[9] = add(v[9], v[14]);\n    v[5] = xor(v[5], v[10]);\n    v[6] = xor(v[6], v[11]);\n    v[7] = xor(v[7], v[8]);\n    v[4] = xor(v[4], v[9]);\n    v[5] = rot12(v[5]);\n    v[6] = rot12(v[6]);\n    v[7] = rot12(v[7]);\n    v[4] = rot12(v[4]);\n    v[0] = add(v[0], m[MSG_SCHEDULE[r][9] as usize]);\n    v[1] = add(v[1], m[MSG_SCHEDULE[r][11] as usize]);\n    v[2] = add(v[2], m[MSG_SCHEDULE[r][13] as usize]);\n    v[3] = add(v[3], m[MSG_SCHEDULE[r][15] as usize]);\n    v[0] = add(v[0], v[5]);\n    v[1] = add(v[1], v[6]);\n    v[2] = add(v[2], v[7]);\n    v[3] = add(v[3], v[4]);\n    v[15] = xor(v[15], v[0]);\n    v[12] = xor(v[12], v[1]);\n    v[13] = xor(v[13], v[2]);\n    v[14] = xor(v[14], v[3]);\n    v[15] = rot8(v[15]);\n    v[12] = rot8(v[12]);\n    v[13] = rot8(v[13]);\n    v[14] = rot8(v[14]);\n    v[10] = add(v[10], v[15]);\n    v[11] = add(v[11], v[12]);\n    v[8] = add(v[8], v[13]);\n    v[9] = add(v[9], v[14]);\n    v[5] = xor(v[5], v[10]);\n    v[6] = xor(v[6], v[11]);\n    v[7] = xor(v[7], v[8]);\n    v[4] = xor(v[4], v[9]);\n    v[5] = rot7(v[5]);\n    v[6] = rot7(v[6]);\n    v[7] = rot7(v[7]);\n    v[4] = rot7(v[4]);\n}\n\n#[inline(always)]\nunsafe fn interleave128(a: __m256i, b: __m256i) -> (__m256i, __m256i) {\n    (\n        _mm256_permute2x128_si256(a, b, 0x20),\n        _mm256_permute2x128_si256(a, b, 0x31),\n    )\n}\n\n// There are several ways to do a transposition. We could do it naively, with 8 separate\n// _mm256_set_epi32 instructions, referencing each of the 32 words explicitly. Or we could copy\n// the vecs into contiguous storage and then use gather instructions. This third approach is to use\n// a series of unpack instructions to interleave the vectors. In my benchmarks, interleaving is the\n// fastest approach. To test this, run `cargo +nightly bench --bench libtest load_8` in the\n// https://github.com/oconnor663/bao_experiments repo.\n#[inline(always)]\nunsafe fn transpose_vecs(vecs: &mut [__m256i; DEGREE]) {\n    // Interleave 32-bit lanes. The low unpack is lanes 00/11/44/55, and the high is 22/33/66/77.\n    let ab_0145 = _mm256_unpacklo_epi32(vecs[0], vecs[1]);\n    let ab_2367 = _mm256_unpackhi_epi32(vecs[0], vecs[1]);\n    let cd_0145 = _mm256_unpacklo_epi32(vecs[2], vecs[3]);\n    let cd_2367 = _mm256_unpackhi_epi32(vecs[2], vecs[3]);\n    let ef_0145 = _mm256_unpacklo_epi32(vecs[4], vecs[5]);\n    let ef_2367 = _mm256_unpackhi_epi32(vecs[4], vecs[5]);\n    let gh_0145 = _mm256_unpacklo_epi32(vecs[6], vecs[7]);\n    let gh_2367 = _mm256_unpackhi_epi32(vecs[6], vecs[7]);\n\n    // Interleave 64-bit lanes. The low unpack is lanes 00/22 and the high is 11/33.\n    let abcd_04 = _mm256_unpacklo_epi64(ab_0145, cd_0145);\n    let abcd_15 = _mm256_unpackhi_epi64(ab_0145, cd_0145);\n    let abcd_26 = _mm256_unpacklo_epi64(ab_2367, cd_2367);\n    let abcd_37 = _mm256_unpackhi_epi64(ab_2367, cd_2367);\n    let efgh_04 = _mm256_unpacklo_epi64(ef_0145, gh_0145);\n    let efgh_15 = _mm256_unpackhi_epi64(ef_0145, gh_0145);\n    let efgh_26 = _mm256_unpacklo_epi64(ef_2367, gh_2367);\n    let efgh_37 = _mm256_unpackhi_epi64(ef_2367, gh_2367);\n\n    // Interleave 128-bit lanes.\n    let (abcdefgh_0, abcdefgh_4) = interleave128(abcd_04, efgh_04);\n    let (abcdefgh_1, abcdefgh_5) = interleave128(abcd_15, efgh_15);\n    let (abcdefgh_2, abcdefgh_6) = interleave128(abcd_26, efgh_26);\n    let (abcdefgh_3, abcdefgh_7) = interleave128(abcd_37, efgh_37);\n\n    vecs[0] = abcdefgh_0;\n    vecs[1] = abcdefgh_1;\n    vecs[2] = abcdefgh_2;\n    vecs[3] = abcdefgh_3;\n    vecs[4] = abcdefgh_4;\n    vecs[5] = abcdefgh_5;\n    vecs[6] = abcdefgh_6;\n    vecs[7] = abcdefgh_7;\n}\n\n#[inline(always)]\nunsafe fn transpose_msg_vecs(inputs: &[*const u8; DEGREE], block_offset: usize) -> [__m256i; 16] {\n    let mut vecs = [\n        loadu(inputs[0].add(block_offset + 0 * 4 * DEGREE)),\n        loadu(inputs[1].add(block_offset + 0 * 4 * DEGREE)),\n        loadu(inputs[2].add(block_offset + 0 * 4 * DEGREE)),\n        loadu(inputs[3].add(block_offset + 0 * 4 * DEGREE)),\n        loadu(inputs[4].add(block_offset + 0 * 4 * DEGREE)),\n        loadu(inputs[5].add(block_offset + 0 * 4 * DEGREE)),\n        loadu(inputs[6].add(block_offset + 0 * 4 * DEGREE)),\n        loadu(inputs[7].add(block_offset + 0 * 4 * DEGREE)),\n        loadu(inputs[0].add(block_offset + 1 * 4 * DEGREE)),\n        loadu(inputs[1].add(block_offset + 1 * 4 * DEGREE)),\n        loadu(inputs[2].add(block_offset + 1 * 4 * DEGREE)),\n        loadu(inputs[3].add(block_offset + 1 * 4 * DEGREE)),\n        loadu(inputs[4].add(block_offset + 1 * 4 * DEGREE)),\n        loadu(inputs[5].add(block_offset + 1 * 4 * DEGREE)),\n        loadu(inputs[6].add(block_offset + 1 * 4 * DEGREE)),\n        loadu(inputs[7].add(block_offset + 1 * 4 * DEGREE)),\n    ];\n    for i in 0..DEGREE {\n        _mm_prefetch(inputs[i].add(block_offset + 256) as *const i8, _MM_HINT_T0);\n    }\n    let squares = mut_array_refs!(&mut vecs, DEGREE, DEGREE);\n    transpose_vecs(squares.0);\n    transpose_vecs(squares.1);\n    vecs\n}\n\n#[inline(always)]\nunsafe fn load_counters(counter: u64, increment_counter: IncrementCounter) -> (__m256i, __m256i) {\n    let mask = if increment_counter.yes() { !0 } else { 0 };\n    (\n        set8(\n            counter_low(counter + (mask & 0)),\n            counter_low(counter + (mask & 1)),\n            counter_low(counter + (mask & 2)),\n            counter_low(counter + (mask & 3)),\n            counter_low(counter + (mask & 4)),\n            counter_low(counter + (mask & 5)),\n            counter_low(counter + (mask & 6)),\n            counter_low(counter + (mask & 7)),\n        ),\n        set8(\n            counter_high(counter + (mask & 0)),\n            counter_high(counter + (mask & 1)),\n            counter_high(counter + (mask & 2)),\n            counter_high(counter + (mask & 3)),\n            counter_high(counter + (mask & 4)),\n            counter_high(counter + (mask & 5)),\n            counter_high(counter + (mask & 6)),\n            counter_high(counter + (mask & 7)),\n        ),\n    )\n}\n\n#[target_feature(enable = \"avx2\")]\npub unsafe fn hash8(\n    inputs: &[*const u8; DEGREE],\n    blocks: usize,\n    key: &CVWords,\n    counter: u64,\n    increment_counter: IncrementCounter,\n    flags: u8,\n    flags_start: u8,\n    flags_end: u8,\n    out: &mut [u8; DEGREE * OUT_LEN],\n) {\n    let mut h_vecs = [\n        set1(key[0]),\n        set1(key[1]),\n        set1(key[2]),\n        set1(key[3]),\n        set1(key[4]),\n        set1(key[5]),\n        set1(key[6]),\n        set1(key[7]),\n    ];\n    let (counter_low_vec, counter_high_vec) = load_counters(counter, increment_counter);\n    let mut block_flags = flags | flags_start;\n\n    for block in 0..blocks {\n        if block + 1 == blocks {\n            block_flags |= flags_end;\n        }\n        let block_len_vec = set1(BLOCK_LEN as u32); // full blocks only\n        let block_flags_vec = set1(block_flags as u32);\n        let msg_vecs = transpose_msg_vecs(inputs, block * BLOCK_LEN);\n\n        // The transposed compression function. Note that inlining this\n        // manually here improves compile times by a lot, compared to factoring\n        // it out into its own function and making it #[inline(always)]. Just\n        // guessing, it might have something to do with loop unrolling.\n        let mut v = [\n            h_vecs[0],\n            h_vecs[1],\n            h_vecs[2],\n            h_vecs[3],\n            h_vecs[4],\n            h_vecs[5],\n            h_vecs[6],\n            h_vecs[7],\n            set1(IV[0]),\n            set1(IV[1]),\n            set1(IV[2]),\n            set1(IV[3]),\n            counter_low_vec,\n            counter_high_vec,\n            block_len_vec,\n            block_flags_vec,\n        ];\n        round(&mut v, &msg_vecs, 0);\n        round(&mut v, &msg_vecs, 1);\n        round(&mut v, &msg_vecs, 2);\n        round(&mut v, &msg_vecs, 3);\n        round(&mut v, &msg_vecs, 4);\n        round(&mut v, &msg_vecs, 5);\n        round(&mut v, &msg_vecs, 6);\n        h_vecs[0] = xor(v[0], v[8]);\n        h_vecs[1] = xor(v[1], v[9]);\n        h_vecs[2] = xor(v[2], v[10]);\n        h_vecs[3] = xor(v[3], v[11]);\n        h_vecs[4] = xor(v[4], v[12]);\n        h_vecs[5] = xor(v[5], v[13]);\n        h_vecs[6] = xor(v[6], v[14]);\n        h_vecs[7] = xor(v[7], v[15]);\n\n        block_flags = flags;\n    }\n\n    transpose_vecs(&mut h_vecs);\n    storeu(h_vecs[0], out.as_mut_ptr().add(0 * 4 * DEGREE));\n    storeu(h_vecs[1], out.as_mut_ptr().add(1 * 4 * DEGREE));\n    storeu(h_vecs[2], out.as_mut_ptr().add(2 * 4 * DEGREE));\n    storeu(h_vecs[3], out.as_mut_ptr().add(3 * 4 * DEGREE));\n    storeu(h_vecs[4], out.as_mut_ptr().add(4 * 4 * DEGREE));\n    storeu(h_vecs[5], out.as_mut_ptr().add(5 * 4 * DEGREE));\n    storeu(h_vecs[6], out.as_mut_ptr().add(6 * 4 * DEGREE));\n    storeu(h_vecs[7], out.as_mut_ptr().add(7 * 4 * DEGREE));\n}\n\n#[target_feature(enable = \"avx2\")]\npub unsafe fn hash_many<const N: usize>(\n    mut inputs: &[&[u8; N]],\n    key: &CVWords,\n    mut counter: u64,\n    increment_counter: IncrementCounter,\n    flags: u8,\n    flags_start: u8,\n    flags_end: u8,\n    mut out: &mut [u8],\n) {\n    debug_assert!(out.len() >= inputs.len() * OUT_LEN, \"out too short\");\n    while inputs.len() >= DEGREE && out.len() >= DEGREE * OUT_LEN {\n        // Safe because the layout of arrays is guaranteed, and because the\n        // `blocks` count is determined statically from the argument type.\n        let input_ptrs: &[*const u8; DEGREE] = &*(inputs.as_ptr() as *const [*const u8; DEGREE]);\n        let blocks = N / BLOCK_LEN;\n        hash8(\n            input_ptrs,\n            blocks,\n            key,\n            counter,\n            increment_counter,\n            flags,\n            flags_start,\n            flags_end,\n            array_mut_ref!(out, 0, DEGREE * OUT_LEN),\n        );\n        if increment_counter.yes() {\n            counter += DEGREE as u64;\n        }\n        inputs = &inputs[DEGREE..];\n        out = &mut out[DEGREE * OUT_LEN..];\n    }\n    crate::sse41::hash_many(\n        inputs,\n        key,\n        counter,\n        increment_counter,\n        flags,\n        flags_start,\n        flags_end,\n        out,\n    );\n}\n\n#[cfg(test)]\nmod test {\n    use super::*;\n\n    #[test]\n    fn test_transpose() {\n        if !crate::platform::avx2_detected() {\n            return;\n        }\n\n        #[target_feature(enable = \"avx2\")]\n        unsafe fn transpose_wrapper(vecs: &mut [__m256i; DEGREE]) {\n            transpose_vecs(vecs);\n        }\n\n        let mut matrix = [[0 as u32; DEGREE]; DEGREE];\n        for i in 0..DEGREE {\n            for j in 0..DEGREE {\n                matrix[i][j] = (i * DEGREE + j) as u32;\n            }\n        }\n\n        unsafe {\n            let mut vecs: [__m256i; DEGREE] = core::mem::transmute(matrix);\n            transpose_wrapper(&mut vecs);\n            matrix = core::mem::transmute(vecs);\n        }\n\n        for i in 0..DEGREE {\n            for j in 0..DEGREE {\n                // Reversed indexes from above.\n                assert_eq!(matrix[j][i], (i * DEGREE + j) as u32);\n            }\n        }\n    }\n\n    #[test]\n    fn test_hash_many() {\n        if !crate::platform::avx2_detected() {\n            return;\n        }\n        crate::test::test_hash_many_fn(hash_many, hash_many);\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/src/rust_sse2.rs",
    "content": "#[cfg(target_arch = \"x86\")]\nuse core::arch::x86::*;\n#[cfg(target_arch = \"x86_64\")]\nuse core::arch::x86_64::*;\n\nuse crate::{\n    counter_high, counter_low, CVBytes, CVWords, IncrementCounter, BLOCK_LEN, IV, MSG_SCHEDULE,\n    OUT_LEN,\n};\nuse arrayref::{array_mut_ref, array_ref, mut_array_refs};\n\npub const DEGREE: usize = 4;\n\n#[inline(always)]\nunsafe fn loadu(src: *const u8) -> __m128i {\n    // This is an unaligned load, so the pointer cast is allowed.\n    _mm_loadu_si128(src as *const __m128i)\n}\n\n#[inline(always)]\nunsafe fn storeu(src: __m128i, dest: *mut u8) {\n    // This is an unaligned store, so the pointer cast is allowed.\n    _mm_storeu_si128(dest as *mut __m128i, src)\n}\n\n#[inline(always)]\nunsafe fn add(a: __m128i, b: __m128i) -> __m128i {\n    _mm_add_epi32(a, b)\n}\n\n#[inline(always)]\nunsafe fn xor(a: __m128i, b: __m128i) -> __m128i {\n    _mm_xor_si128(a, b)\n}\n\n#[inline(always)]\nunsafe fn set1(x: u32) -> __m128i {\n    _mm_set1_epi32(x as i32)\n}\n\n#[inline(always)]\nunsafe fn set4(a: u32, b: u32, c: u32, d: u32) -> __m128i {\n    _mm_setr_epi32(a as i32, b as i32, c as i32, d as i32)\n}\n\n// These rotations are the \"simple/shifts version\". For the\n// \"complicated/shuffles version\", see\n// https://github.com/sneves/blake2-avx2/blob/b3723921f668df09ece52dcd225a36d4a4eea1d9/blake2s-common.h#L63-L66.\n// For a discussion of the tradeoffs, see\n// https://github.com/sneves/blake2-avx2/pull/5. Due to an LLVM bug\n// (https://bugs.llvm.org/show_bug.cgi?id=44379), this version performs better\n// on recent x86 chips.\n\n#[inline(always)]\nunsafe fn rot16(a: __m128i) -> __m128i {\n    _mm_or_si128(_mm_srli_epi32(a, 16), _mm_slli_epi32(a, 32 - 16))\n}\n\n#[inline(always)]\nunsafe fn rot12(a: __m128i) -> __m128i {\n    _mm_or_si128(_mm_srli_epi32(a, 12), _mm_slli_epi32(a, 32 - 12))\n}\n\n#[inline(always)]\nunsafe fn rot8(a: __m128i) -> __m128i {\n    _mm_or_si128(_mm_srli_epi32(a, 8), _mm_slli_epi32(a, 32 - 8))\n}\n\n#[inline(always)]\nunsafe fn rot7(a: __m128i) -> __m128i {\n    _mm_or_si128(_mm_srli_epi32(a, 7), _mm_slli_epi32(a, 32 - 7))\n}\n\n#[inline(always)]\nunsafe fn g1(\n    row0: &mut __m128i,\n    row1: &mut __m128i,\n    row2: &mut __m128i,\n    row3: &mut __m128i,\n    m: __m128i,\n) {\n    *row0 = add(add(*row0, m), *row1);\n    *row3 = xor(*row3, *row0);\n    *row3 = rot16(*row3);\n    *row2 = add(*row2, *row3);\n    *row1 = xor(*row1, *row2);\n    *row1 = rot12(*row1);\n}\n\n#[inline(always)]\nunsafe fn g2(\n    row0: &mut __m128i,\n    row1: &mut __m128i,\n    row2: &mut __m128i,\n    row3: &mut __m128i,\n    m: __m128i,\n) {\n    *row0 = add(add(*row0, m), *row1);\n    *row3 = xor(*row3, *row0);\n    *row3 = rot8(*row3);\n    *row2 = add(*row2, *row3);\n    *row1 = xor(*row1, *row2);\n    *row1 = rot7(*row1);\n}\n\n// Adapted from https://github.com/rust-lang-nursery/stdsimd/pull/479.\nmacro_rules! _MM_SHUFFLE {\n    ($z:expr, $y:expr, $x:expr, $w:expr) => {\n        ($z << 6) | ($y << 4) | ($x << 2) | $w\n    };\n}\n\nmacro_rules! shuffle2 {\n    ($a:expr, $b:expr, $c:expr) => {\n        _mm_castps_si128(_mm_shuffle_ps(\n            _mm_castsi128_ps($a),\n            _mm_castsi128_ps($b),\n            $c,\n        ))\n    };\n}\n\n// Note the optimization here of leaving row1 as the unrotated row, rather than\n// row0. All the message loads below are adjusted to compensate for this. See\n// discussion at https://github.com/sneves/blake2-avx2/pull/4\n#[inline(always)]\nunsafe fn diagonalize(row0: &mut __m128i, row2: &mut __m128i, row3: &mut __m128i) {\n    *row0 = _mm_shuffle_epi32(*row0, _MM_SHUFFLE!(2, 1, 0, 3));\n    *row3 = _mm_shuffle_epi32(*row3, _MM_SHUFFLE!(1, 0, 3, 2));\n    *row2 = _mm_shuffle_epi32(*row2, _MM_SHUFFLE!(0, 3, 2, 1));\n}\n\n#[inline(always)]\nunsafe fn undiagonalize(row0: &mut __m128i, row2: &mut __m128i, row3: &mut __m128i) {\n    *row0 = _mm_shuffle_epi32(*row0, _MM_SHUFFLE!(0, 3, 2, 1));\n    *row3 = _mm_shuffle_epi32(*row3, _MM_SHUFFLE!(1, 0, 3, 2));\n    *row2 = _mm_shuffle_epi32(*row2, _MM_SHUFFLE!(2, 1, 0, 3));\n}\n\n#[inline(always)]\nunsafe fn blend_epi16(a: __m128i, b: __m128i, imm8: i32) -> __m128i {\n    let bits = _mm_set_epi16(0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01);\n    let mut mask = _mm_set1_epi16(imm8 as i16);\n    mask = _mm_and_si128(mask, bits);\n    mask = _mm_cmpeq_epi16(mask, bits);\n    _mm_or_si128(_mm_and_si128(mask, b), _mm_andnot_si128(mask, a))\n}\n\n#[inline(always)]\nunsafe fn compress_pre(\n    cv: &CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n) -> [__m128i; 4] {\n    let row0 = &mut loadu(cv.as_ptr().add(0) as *const u8);\n    let row1 = &mut loadu(cv.as_ptr().add(4) as *const u8);\n    let row2 = &mut set4(IV[0], IV[1], IV[2], IV[3]);\n    let row3 = &mut set4(\n        counter_low(counter),\n        counter_high(counter),\n        block_len as u32,\n        flags as u32,\n    );\n\n    let mut m0 = loadu(block.as_ptr().add(0 * 4 * DEGREE));\n    let mut m1 = loadu(block.as_ptr().add(1 * 4 * DEGREE));\n    let mut m2 = loadu(block.as_ptr().add(2 * 4 * DEGREE));\n    let mut m3 = loadu(block.as_ptr().add(3 * 4 * DEGREE));\n\n    let mut t0;\n    let mut t1;\n    let mut t2;\n    let mut t3;\n    let mut tt;\n\n    // Round 1. The first round permutes the message words from the original\n    // input order, into the groups that get mixed in parallel.\n    t0 = shuffle2!(m0, m1, _MM_SHUFFLE!(2, 0, 2, 0)); //  6  4  2  0\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle2!(m0, m1, _MM_SHUFFLE!(3, 1, 3, 1)); //  7  5  3  1\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = shuffle2!(m2, m3, _MM_SHUFFLE!(2, 0, 2, 0)); // 14 12 10  8\n    t2 = _mm_shuffle_epi32(t2, _MM_SHUFFLE!(2, 1, 0, 3)); // 12 10  8 14\n    g1(row0, row1, row2, row3, t2);\n    t3 = shuffle2!(m2, m3, _MM_SHUFFLE!(3, 1, 3, 1)); // 15 13 11  9\n    t3 = _mm_shuffle_epi32(t3, _MM_SHUFFLE!(2, 1, 0, 3)); // 13 11  9 15\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n    m0 = t0;\n    m1 = t1;\n    m2 = t2;\n    m3 = t3;\n\n    // Round 2. This round and all following rounds apply a fixed permutation\n    // to the message words from the round before.\n    t0 = shuffle2!(m0, m1, _MM_SHUFFLE!(3, 1, 1, 2));\n    t0 = _mm_shuffle_epi32(t0, _MM_SHUFFLE!(0, 3, 2, 1));\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle2!(m2, m3, _MM_SHUFFLE!(3, 3, 2, 2));\n    tt = _mm_shuffle_epi32(m0, _MM_SHUFFLE!(0, 0, 3, 3));\n    t1 = blend_epi16(tt, t1, 0xCC);\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = _mm_unpacklo_epi64(m3, m1);\n    tt = blend_epi16(t2, m2, 0xC0);\n    t2 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(1, 3, 2, 0));\n    g1(row0, row1, row2, row3, t2);\n    t3 = _mm_unpackhi_epi32(m1, m3);\n    tt = _mm_unpacklo_epi32(m2, t3);\n    t3 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(0, 1, 3, 2));\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n    m0 = t0;\n    m1 = t1;\n    m2 = t2;\n    m3 = t3;\n\n    // Round 3\n    t0 = shuffle2!(m0, m1, _MM_SHUFFLE!(3, 1, 1, 2));\n    t0 = _mm_shuffle_epi32(t0, _MM_SHUFFLE!(0, 3, 2, 1));\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle2!(m2, m3, _MM_SHUFFLE!(3, 3, 2, 2));\n    tt = _mm_shuffle_epi32(m0, _MM_SHUFFLE!(0, 0, 3, 3));\n    t1 = blend_epi16(tt, t1, 0xCC);\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = _mm_unpacklo_epi64(m3, m1);\n    tt = blend_epi16(t2, m2, 0xC0);\n    t2 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(1, 3, 2, 0));\n    g1(row0, row1, row2, row3, t2);\n    t3 = _mm_unpackhi_epi32(m1, m3);\n    tt = _mm_unpacklo_epi32(m2, t3);\n    t3 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(0, 1, 3, 2));\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n    m0 = t0;\n    m1 = t1;\n    m2 = t2;\n    m3 = t3;\n\n    // Round 4\n    t0 = shuffle2!(m0, m1, _MM_SHUFFLE!(3, 1, 1, 2));\n    t0 = _mm_shuffle_epi32(t0, _MM_SHUFFLE!(0, 3, 2, 1));\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle2!(m2, m3, _MM_SHUFFLE!(3, 3, 2, 2));\n    tt = _mm_shuffle_epi32(m0, _MM_SHUFFLE!(0, 0, 3, 3));\n    t1 = blend_epi16(tt, t1, 0xCC);\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = _mm_unpacklo_epi64(m3, m1);\n    tt = blend_epi16(t2, m2, 0xC0);\n    t2 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(1, 3, 2, 0));\n    g1(row0, row1, row2, row3, t2);\n    t3 = _mm_unpackhi_epi32(m1, m3);\n    tt = _mm_unpacklo_epi32(m2, t3);\n    t3 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(0, 1, 3, 2));\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n    m0 = t0;\n    m1 = t1;\n    m2 = t2;\n    m3 = t3;\n\n    // Round 5\n    t0 = shuffle2!(m0, m1, _MM_SHUFFLE!(3, 1, 1, 2));\n    t0 = _mm_shuffle_epi32(t0, _MM_SHUFFLE!(0, 3, 2, 1));\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle2!(m2, m3, _MM_SHUFFLE!(3, 3, 2, 2));\n    tt = _mm_shuffle_epi32(m0, _MM_SHUFFLE!(0, 0, 3, 3));\n    t1 = blend_epi16(tt, t1, 0xCC);\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = _mm_unpacklo_epi64(m3, m1);\n    tt = blend_epi16(t2, m2, 0xC0);\n    t2 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(1, 3, 2, 0));\n    g1(row0, row1, row2, row3, t2);\n    t3 = _mm_unpackhi_epi32(m1, m3);\n    tt = _mm_unpacklo_epi32(m2, t3);\n    t3 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(0, 1, 3, 2));\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n    m0 = t0;\n    m1 = t1;\n    m2 = t2;\n    m3 = t3;\n\n    // Round 6\n    t0 = shuffle2!(m0, m1, _MM_SHUFFLE!(3, 1, 1, 2));\n    t0 = _mm_shuffle_epi32(t0, _MM_SHUFFLE!(0, 3, 2, 1));\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle2!(m2, m3, _MM_SHUFFLE!(3, 3, 2, 2));\n    tt = _mm_shuffle_epi32(m0, _MM_SHUFFLE!(0, 0, 3, 3));\n    t1 = blend_epi16(tt, t1, 0xCC);\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = _mm_unpacklo_epi64(m3, m1);\n    tt = blend_epi16(t2, m2, 0xC0);\n    t2 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(1, 3, 2, 0));\n    g1(row0, row1, row2, row3, t2);\n    t3 = _mm_unpackhi_epi32(m1, m3);\n    tt = _mm_unpacklo_epi32(m2, t3);\n    t3 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(0, 1, 3, 2));\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n    m0 = t0;\n    m1 = t1;\n    m2 = t2;\n    m3 = t3;\n\n    // Round 7\n    t0 = shuffle2!(m0, m1, _MM_SHUFFLE!(3, 1, 1, 2));\n    t0 = _mm_shuffle_epi32(t0, _MM_SHUFFLE!(0, 3, 2, 1));\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle2!(m2, m3, _MM_SHUFFLE!(3, 3, 2, 2));\n    tt = _mm_shuffle_epi32(m0, _MM_SHUFFLE!(0, 0, 3, 3));\n    t1 = blend_epi16(tt, t1, 0xCC);\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = _mm_unpacklo_epi64(m3, m1);\n    tt = blend_epi16(t2, m2, 0xC0);\n    t2 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(1, 3, 2, 0));\n    g1(row0, row1, row2, row3, t2);\n    t3 = _mm_unpackhi_epi32(m1, m3);\n    tt = _mm_unpacklo_epi32(m2, t3);\n    t3 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(0, 1, 3, 2));\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n\n    [*row0, *row1, *row2, *row3]\n}\n\n#[target_feature(enable = \"sse2\")]\npub unsafe fn compress_in_place(\n    cv: &mut CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n) {\n    let [row0, row1, row2, row3] = compress_pre(cv, block, block_len, counter, flags);\n    storeu(xor(row0, row2), cv.as_mut_ptr().add(0) as *mut u8);\n    storeu(xor(row1, row3), cv.as_mut_ptr().add(4) as *mut u8);\n}\n\n#[target_feature(enable = \"sse2\")]\npub unsafe fn compress_xof(\n    cv: &CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n) -> [u8; 64] {\n    let [mut row0, mut row1, mut row2, mut row3] =\n        compress_pre(cv, block, block_len, counter, flags);\n    row0 = xor(row0, row2);\n    row1 = xor(row1, row3);\n    row2 = xor(row2, loadu(cv.as_ptr().add(0) as *const u8));\n    row3 = xor(row3, loadu(cv.as_ptr().add(4) as *const u8));\n    core::mem::transmute([row0, row1, row2, row3])\n}\n\n#[inline(always)]\nunsafe fn round(v: &mut [__m128i; 16], m: &[__m128i; 16], r: usize) {\n    v[0] = add(v[0], m[MSG_SCHEDULE[r][0] as usize]);\n    v[1] = add(v[1], m[MSG_SCHEDULE[r][2] as usize]);\n    v[2] = add(v[2], m[MSG_SCHEDULE[r][4] as usize]);\n    v[3] = add(v[3], m[MSG_SCHEDULE[r][6] as usize]);\n    v[0] = add(v[0], v[4]);\n    v[1] = add(v[1], v[5]);\n    v[2] = add(v[2], v[6]);\n    v[3] = add(v[3], v[7]);\n    v[12] = xor(v[12], v[0]);\n    v[13] = xor(v[13], v[1]);\n    v[14] = xor(v[14], v[2]);\n    v[15] = xor(v[15], v[3]);\n    v[12] = rot16(v[12]);\n    v[13] = rot16(v[13]);\n    v[14] = rot16(v[14]);\n    v[15] = rot16(v[15]);\n    v[8] = add(v[8], v[12]);\n    v[9] = add(v[9], v[13]);\n    v[10] = add(v[10], v[14]);\n    v[11] = add(v[11], v[15]);\n    v[4] = xor(v[4], v[8]);\n    v[5] = xor(v[5], v[9]);\n    v[6] = xor(v[6], v[10]);\n    v[7] = xor(v[7], v[11]);\n    v[4] = rot12(v[4]);\n    v[5] = rot12(v[5]);\n    v[6] = rot12(v[6]);\n    v[7] = rot12(v[7]);\n    v[0] = add(v[0], m[MSG_SCHEDULE[r][1] as usize]);\n    v[1] = add(v[1], m[MSG_SCHEDULE[r][3] as usize]);\n    v[2] = add(v[2], m[MSG_SCHEDULE[r][5] as usize]);\n    v[3] = add(v[3], m[MSG_SCHEDULE[r][7] as usize]);\n    v[0] = add(v[0], v[4]);\n    v[1] = add(v[1], v[5]);\n    v[2] = add(v[2], v[6]);\n    v[3] = add(v[3], v[7]);\n    v[12] = xor(v[12], v[0]);\n    v[13] = xor(v[13], v[1]);\n    v[14] = xor(v[14], v[2]);\n    v[15] = xor(v[15], v[3]);\n    v[12] = rot8(v[12]);\n    v[13] = rot8(v[13]);\n    v[14] = rot8(v[14]);\n    v[15] = rot8(v[15]);\n    v[8] = add(v[8], v[12]);\n    v[9] = add(v[9], v[13]);\n    v[10] = add(v[10], v[14]);\n    v[11] = add(v[11], v[15]);\n    v[4] = xor(v[4], v[8]);\n    v[5] = xor(v[5], v[9]);\n    v[6] = xor(v[6], v[10]);\n    v[7] = xor(v[7], v[11]);\n    v[4] = rot7(v[4]);\n    v[5] = rot7(v[5]);\n    v[6] = rot7(v[6]);\n    v[7] = rot7(v[7]);\n\n    v[0] = add(v[0], m[MSG_SCHEDULE[r][8] as usize]);\n    v[1] = add(v[1], m[MSG_SCHEDULE[r][10] as usize]);\n    v[2] = add(v[2], m[MSG_SCHEDULE[r][12] as usize]);\n    v[3] = add(v[3], m[MSG_SCHEDULE[r][14] as usize]);\n    v[0] = add(v[0], v[5]);\n    v[1] = add(v[1], v[6]);\n    v[2] = add(v[2], v[7]);\n    v[3] = add(v[3], v[4]);\n    v[15] = xor(v[15], v[0]);\n    v[12] = xor(v[12], v[1]);\n    v[13] = xor(v[13], v[2]);\n    v[14] = xor(v[14], v[3]);\n    v[15] = rot16(v[15]);\n    v[12] = rot16(v[12]);\n    v[13] = rot16(v[13]);\n    v[14] = rot16(v[14]);\n    v[10] = add(v[10], v[15]);\n    v[11] = add(v[11], v[12]);\n    v[8] = add(v[8], v[13]);\n    v[9] = add(v[9], v[14]);\n    v[5] = xor(v[5], v[10]);\n    v[6] = xor(v[6], v[11]);\n    v[7] = xor(v[7], v[8]);\n    v[4] = xor(v[4], v[9]);\n    v[5] = rot12(v[5]);\n    v[6] = rot12(v[6]);\n    v[7] = rot12(v[7]);\n    v[4] = rot12(v[4]);\n    v[0] = add(v[0], m[MSG_SCHEDULE[r][9] as usize]);\n    v[1] = add(v[1], m[MSG_SCHEDULE[r][11] as usize]);\n    v[2] = add(v[2], m[MSG_SCHEDULE[r][13] as usize]);\n    v[3] = add(v[3], m[MSG_SCHEDULE[r][15] as usize]);\n    v[0] = add(v[0], v[5]);\n    v[1] = add(v[1], v[6]);\n    v[2] = add(v[2], v[7]);\n    v[3] = add(v[3], v[4]);\n    v[15] = xor(v[15], v[0]);\n    v[12] = xor(v[12], v[1]);\n    v[13] = xor(v[13], v[2]);\n    v[14] = xor(v[14], v[3]);\n    v[15] = rot8(v[15]);\n    v[12] = rot8(v[12]);\n    v[13] = rot8(v[13]);\n    v[14] = rot8(v[14]);\n    v[10] = add(v[10], v[15]);\n    v[11] = add(v[11], v[12]);\n    v[8] = add(v[8], v[13]);\n    v[9] = add(v[9], v[14]);\n    v[5] = xor(v[5], v[10]);\n    v[6] = xor(v[6], v[11]);\n    v[7] = xor(v[7], v[8]);\n    v[4] = xor(v[4], v[9]);\n    v[5] = rot7(v[5]);\n    v[6] = rot7(v[6]);\n    v[7] = rot7(v[7]);\n    v[4] = rot7(v[4]);\n}\n\n#[inline(always)]\nunsafe fn transpose_vecs(vecs: &mut [__m128i; DEGREE]) {\n    // Interleave 32-bit lanes. The low unpack is lanes 00/11 and the high is\n    // 22/33. Note that this doesn't split the vector into two lanes, as the\n    // AVX2 counterparts do.\n    let ab_01 = _mm_unpacklo_epi32(vecs[0], vecs[1]);\n    let ab_23 = _mm_unpackhi_epi32(vecs[0], vecs[1]);\n    let cd_01 = _mm_unpacklo_epi32(vecs[2], vecs[3]);\n    let cd_23 = _mm_unpackhi_epi32(vecs[2], vecs[3]);\n\n    // Interleave 64-bit lanes.\n    let abcd_0 = _mm_unpacklo_epi64(ab_01, cd_01);\n    let abcd_1 = _mm_unpackhi_epi64(ab_01, cd_01);\n    let abcd_2 = _mm_unpacklo_epi64(ab_23, cd_23);\n    let abcd_3 = _mm_unpackhi_epi64(ab_23, cd_23);\n\n    vecs[0] = abcd_0;\n    vecs[1] = abcd_1;\n    vecs[2] = abcd_2;\n    vecs[3] = abcd_3;\n}\n\n#[inline(always)]\nunsafe fn transpose_msg_vecs(inputs: &[*const u8; DEGREE], block_offset: usize) -> [__m128i; 16] {\n    let mut vecs = [\n        loadu(inputs[0].add(block_offset + 0 * 4 * DEGREE)),\n        loadu(inputs[1].add(block_offset + 0 * 4 * DEGREE)),\n        loadu(inputs[2].add(block_offset + 0 * 4 * DEGREE)),\n        loadu(inputs[3].add(block_offset + 0 * 4 * DEGREE)),\n        loadu(inputs[0].add(block_offset + 1 * 4 * DEGREE)),\n        loadu(inputs[1].add(block_offset + 1 * 4 * DEGREE)),\n        loadu(inputs[2].add(block_offset + 1 * 4 * DEGREE)),\n        loadu(inputs[3].add(block_offset + 1 * 4 * DEGREE)),\n        loadu(inputs[0].add(block_offset + 2 * 4 * DEGREE)),\n        loadu(inputs[1].add(block_offset + 2 * 4 * DEGREE)),\n        loadu(inputs[2].add(block_offset + 2 * 4 * DEGREE)),\n        loadu(inputs[3].add(block_offset + 2 * 4 * DEGREE)),\n        loadu(inputs[0].add(block_offset + 3 * 4 * DEGREE)),\n        loadu(inputs[1].add(block_offset + 3 * 4 * DEGREE)),\n        loadu(inputs[2].add(block_offset + 3 * 4 * DEGREE)),\n        loadu(inputs[3].add(block_offset + 3 * 4 * DEGREE)),\n    ];\n    for i in 0..DEGREE {\n        _mm_prefetch(inputs[i].add(block_offset + 256) as *const i8, _MM_HINT_T0);\n    }\n    let squares = mut_array_refs!(&mut vecs, DEGREE, DEGREE, DEGREE, DEGREE);\n    transpose_vecs(squares.0);\n    transpose_vecs(squares.1);\n    transpose_vecs(squares.2);\n    transpose_vecs(squares.3);\n    vecs\n}\n\n#[inline(always)]\nunsafe fn load_counters(counter: u64, increment_counter: IncrementCounter) -> (__m128i, __m128i) {\n    let mask = if increment_counter.yes() { !0 } else { 0 };\n    (\n        set4(\n            counter_low(counter + (mask & 0)),\n            counter_low(counter + (mask & 1)),\n            counter_low(counter + (mask & 2)),\n            counter_low(counter + (mask & 3)),\n        ),\n        set4(\n            counter_high(counter + (mask & 0)),\n            counter_high(counter + (mask & 1)),\n            counter_high(counter + (mask & 2)),\n            counter_high(counter + (mask & 3)),\n        ),\n    )\n}\n\n#[target_feature(enable = \"sse2\")]\npub unsafe fn hash4(\n    inputs: &[*const u8; DEGREE],\n    blocks: usize,\n    key: &CVWords,\n    counter: u64,\n    increment_counter: IncrementCounter,\n    flags: u8,\n    flags_start: u8,\n    flags_end: u8,\n    out: &mut [u8; DEGREE * OUT_LEN],\n) {\n    let mut h_vecs = [\n        set1(key[0]),\n        set1(key[1]),\n        set1(key[2]),\n        set1(key[3]),\n        set1(key[4]),\n        set1(key[5]),\n        set1(key[6]),\n        set1(key[7]),\n    ];\n    let (counter_low_vec, counter_high_vec) = load_counters(counter, increment_counter);\n    let mut block_flags = flags | flags_start;\n\n    for block in 0..blocks {\n        if block + 1 == blocks {\n            block_flags |= flags_end;\n        }\n        let block_len_vec = set1(BLOCK_LEN as u32); // full blocks only\n        let block_flags_vec = set1(block_flags as u32);\n        let msg_vecs = transpose_msg_vecs(inputs, block * BLOCK_LEN);\n\n        // The transposed compression function. Note that inlining this\n        // manually here improves compile times by a lot, compared to factoring\n        // it out into its own function and making it #[inline(always)]. Just\n        // guessing, it might have something to do with loop unrolling.\n        let mut v = [\n            h_vecs[0],\n            h_vecs[1],\n            h_vecs[2],\n            h_vecs[3],\n            h_vecs[4],\n            h_vecs[5],\n            h_vecs[6],\n            h_vecs[7],\n            set1(IV[0]),\n            set1(IV[1]),\n            set1(IV[2]),\n            set1(IV[3]),\n            counter_low_vec,\n            counter_high_vec,\n            block_len_vec,\n            block_flags_vec,\n        ];\n        round(&mut v, &msg_vecs, 0);\n        round(&mut v, &msg_vecs, 1);\n        round(&mut v, &msg_vecs, 2);\n        round(&mut v, &msg_vecs, 3);\n        round(&mut v, &msg_vecs, 4);\n        round(&mut v, &msg_vecs, 5);\n        round(&mut v, &msg_vecs, 6);\n        h_vecs[0] = xor(v[0], v[8]);\n        h_vecs[1] = xor(v[1], v[9]);\n        h_vecs[2] = xor(v[2], v[10]);\n        h_vecs[3] = xor(v[3], v[11]);\n        h_vecs[4] = xor(v[4], v[12]);\n        h_vecs[5] = xor(v[5], v[13]);\n        h_vecs[6] = xor(v[6], v[14]);\n        h_vecs[7] = xor(v[7], v[15]);\n\n        block_flags = flags;\n    }\n\n    let squares = mut_array_refs!(&mut h_vecs, DEGREE, DEGREE);\n    transpose_vecs(squares.0);\n    transpose_vecs(squares.1);\n    // The first four vecs now contain the first half of each output, and the\n    // second four vecs contain the second half of each output.\n    storeu(h_vecs[0], out.as_mut_ptr().add(0 * 4 * DEGREE));\n    storeu(h_vecs[4], out.as_mut_ptr().add(1 * 4 * DEGREE));\n    storeu(h_vecs[1], out.as_mut_ptr().add(2 * 4 * DEGREE));\n    storeu(h_vecs[5], out.as_mut_ptr().add(3 * 4 * DEGREE));\n    storeu(h_vecs[2], out.as_mut_ptr().add(4 * 4 * DEGREE));\n    storeu(h_vecs[6], out.as_mut_ptr().add(5 * 4 * DEGREE));\n    storeu(h_vecs[3], out.as_mut_ptr().add(6 * 4 * DEGREE));\n    storeu(h_vecs[7], out.as_mut_ptr().add(7 * 4 * DEGREE));\n}\n\n#[target_feature(enable = \"sse2\")]\nunsafe fn hash1<const N: usize>(\n    input: &[u8; N],\n    key: &CVWords,\n    counter: u64,\n    flags: u8,\n    flags_start: u8,\n    flags_end: u8,\n    out: &mut CVBytes,\n) {\n    debug_assert_eq!(N % BLOCK_LEN, 0, \"uneven blocks\");\n    let mut cv = *key;\n    let mut block_flags = flags | flags_start;\n    let mut slice = &input[..];\n    while slice.len() >= BLOCK_LEN {\n        if slice.len() == BLOCK_LEN {\n            block_flags |= flags_end;\n        }\n        compress_in_place(\n            &mut cv,\n            array_ref!(slice, 0, BLOCK_LEN),\n            BLOCK_LEN as u8,\n            counter,\n            block_flags,\n        );\n        block_flags = flags;\n        slice = &slice[BLOCK_LEN..];\n    }\n    *out = core::mem::transmute(cv); // x86 is little-endian\n}\n\n#[target_feature(enable = \"sse2\")]\npub unsafe fn hash_many<const N: usize>(\n    mut inputs: &[&[u8; N]],\n    key: &CVWords,\n    mut counter: u64,\n    increment_counter: IncrementCounter,\n    flags: u8,\n    flags_start: u8,\n    flags_end: u8,\n    mut out: &mut [u8],\n) {\n    debug_assert!(out.len() >= inputs.len() * OUT_LEN, \"out too short\");\n    while inputs.len() >= DEGREE && out.len() >= DEGREE * OUT_LEN {\n        // Safe because the layout of arrays is guaranteed, and because the\n        // `blocks` count is determined statically from the argument type.\n        let input_ptrs: &[*const u8; DEGREE] = &*(inputs.as_ptr() as *const [*const u8; DEGREE]);\n        let blocks = N / BLOCK_LEN;\n        hash4(\n            input_ptrs,\n            blocks,\n            key,\n            counter,\n            increment_counter,\n            flags,\n            flags_start,\n            flags_end,\n            array_mut_ref!(out, 0, DEGREE * OUT_LEN),\n        );\n        if increment_counter.yes() {\n            counter += DEGREE as u64;\n        }\n        inputs = &inputs[DEGREE..];\n        out = &mut out[DEGREE * OUT_LEN..];\n    }\n    for (&input, output) in inputs.iter().zip(out.chunks_exact_mut(OUT_LEN)) {\n        hash1(\n            input,\n            key,\n            counter,\n            flags,\n            flags_start,\n            flags_end,\n            array_mut_ref!(output, 0, OUT_LEN),\n        );\n        if increment_counter.yes() {\n            counter += 1;\n        }\n    }\n}\n\n#[cfg(test)]\nmod test {\n    use super::*;\n\n    #[test]\n    fn test_transpose() {\n        if !crate::platform::sse2_detected() {\n            return;\n        }\n\n        #[target_feature(enable = \"sse2\")]\n        unsafe fn transpose_wrapper(vecs: &mut [__m128i; DEGREE]) {\n            transpose_vecs(vecs);\n        }\n\n        let mut matrix = [[0 as u32; DEGREE]; DEGREE];\n        for i in 0..DEGREE {\n            for j in 0..DEGREE {\n                matrix[i][j] = (i * DEGREE + j) as u32;\n            }\n        }\n\n        unsafe {\n            let mut vecs: [__m128i; DEGREE] = core::mem::transmute(matrix);\n            transpose_wrapper(&mut vecs);\n            matrix = core::mem::transmute(vecs);\n        }\n\n        for i in 0..DEGREE {\n            for j in 0..DEGREE {\n                // Reversed indexes from above.\n                assert_eq!(matrix[j][i], (i * DEGREE + j) as u32);\n            }\n        }\n    }\n\n    #[test]\n    fn test_compress() {\n        if !crate::platform::sse2_detected() {\n            return;\n        }\n        crate::test::test_compress_fn(compress_in_place, compress_xof);\n    }\n\n    #[test]\n    fn test_hash_many() {\n        if !crate::platform::sse2_detected() {\n            return;\n        }\n        crate::test::test_hash_many_fn(hash_many, hash_many);\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/src/rust_sse41.rs",
    "content": "#[cfg(target_arch = \"x86\")]\nuse core::arch::x86::*;\n#[cfg(target_arch = \"x86_64\")]\nuse core::arch::x86_64::*;\n\nuse crate::{\n    counter_high, counter_low, CVBytes, CVWords, IncrementCounter, BLOCK_LEN, IV, MSG_SCHEDULE,\n    OUT_LEN,\n};\nuse arrayref::{array_mut_ref, array_ref, mut_array_refs};\n\npub const DEGREE: usize = 4;\n\n#[inline(always)]\nunsafe fn loadu(src: *const u8) -> __m128i {\n    // This is an unaligned load, so the pointer cast is allowed.\n    _mm_loadu_si128(src as *const __m128i)\n}\n\n#[inline(always)]\nunsafe fn storeu(src: __m128i, dest: *mut u8) {\n    // This is an unaligned store, so the pointer cast is allowed.\n    _mm_storeu_si128(dest as *mut __m128i, src)\n}\n\n#[inline(always)]\nunsafe fn add(a: __m128i, b: __m128i) -> __m128i {\n    _mm_add_epi32(a, b)\n}\n\n#[inline(always)]\nunsafe fn xor(a: __m128i, b: __m128i) -> __m128i {\n    _mm_xor_si128(a, b)\n}\n\n#[inline(always)]\nunsafe fn set1(x: u32) -> __m128i {\n    _mm_set1_epi32(x as i32)\n}\n\n#[inline(always)]\nunsafe fn set4(a: u32, b: u32, c: u32, d: u32) -> __m128i {\n    _mm_setr_epi32(a as i32, b as i32, c as i32, d as i32)\n}\n\n// These rotations are the \"simple/shifts version\". For the\n// \"complicated/shuffles version\", see\n// https://github.com/sneves/blake2-avx2/blob/b3723921f668df09ece52dcd225a36d4a4eea1d9/blake2s-common.h#L63-L66.\n// For a discussion of the tradeoffs, see\n// https://github.com/sneves/blake2-avx2/pull/5. Due to an LLVM bug\n// (https://bugs.llvm.org/show_bug.cgi?id=44379), this version performs better\n// on recent x86 chips.\n\n#[inline(always)]\nunsafe fn rot16(a: __m128i) -> __m128i {\n    _mm_or_si128(_mm_srli_epi32(a, 16), _mm_slli_epi32(a, 32 - 16))\n}\n\n#[inline(always)]\nunsafe fn rot12(a: __m128i) -> __m128i {\n    _mm_or_si128(_mm_srli_epi32(a, 12), _mm_slli_epi32(a, 32 - 12))\n}\n\n#[inline(always)]\nunsafe fn rot8(a: __m128i) -> __m128i {\n    _mm_or_si128(_mm_srli_epi32(a, 8), _mm_slli_epi32(a, 32 - 8))\n}\n\n#[inline(always)]\nunsafe fn rot7(a: __m128i) -> __m128i {\n    _mm_or_si128(_mm_srli_epi32(a, 7), _mm_slli_epi32(a, 32 - 7))\n}\n\n#[inline(always)]\nunsafe fn g1(\n    row0: &mut __m128i,\n    row1: &mut __m128i,\n    row2: &mut __m128i,\n    row3: &mut __m128i,\n    m: __m128i,\n) {\n    *row0 = add(add(*row0, m), *row1);\n    *row3 = xor(*row3, *row0);\n    *row3 = rot16(*row3);\n    *row2 = add(*row2, *row3);\n    *row1 = xor(*row1, *row2);\n    *row1 = rot12(*row1);\n}\n\n#[inline(always)]\nunsafe fn g2(\n    row0: &mut __m128i,\n    row1: &mut __m128i,\n    row2: &mut __m128i,\n    row3: &mut __m128i,\n    m: __m128i,\n) {\n    *row0 = add(add(*row0, m), *row1);\n    *row3 = xor(*row3, *row0);\n    *row3 = rot8(*row3);\n    *row2 = add(*row2, *row3);\n    *row1 = xor(*row1, *row2);\n    *row1 = rot7(*row1);\n}\n\n// Adapted from https://github.com/rust-lang-nursery/stdsimd/pull/479.\nmacro_rules! _MM_SHUFFLE {\n    ($z:expr, $y:expr, $x:expr, $w:expr) => {\n        ($z << 6) | ($y << 4) | ($x << 2) | $w\n    };\n}\n\nmacro_rules! shuffle2 {\n    ($a:expr, $b:expr, $c:expr) => {\n        _mm_castps_si128(_mm_shuffle_ps(\n            _mm_castsi128_ps($a),\n            _mm_castsi128_ps($b),\n            $c,\n        ))\n    };\n}\n\n// Note the optimization here of leaving row1 as the unrotated row, rather than\n// row0. All the message loads below are adjusted to compensate for this. See\n// discussion at https://github.com/sneves/blake2-avx2/pull/4\n#[inline(always)]\nunsafe fn diagonalize(row0: &mut __m128i, row2: &mut __m128i, row3: &mut __m128i) {\n    *row0 = _mm_shuffle_epi32(*row0, _MM_SHUFFLE!(2, 1, 0, 3));\n    *row3 = _mm_shuffle_epi32(*row3, _MM_SHUFFLE!(1, 0, 3, 2));\n    *row2 = _mm_shuffle_epi32(*row2, _MM_SHUFFLE!(0, 3, 2, 1));\n}\n\n#[inline(always)]\nunsafe fn undiagonalize(row0: &mut __m128i, row2: &mut __m128i, row3: &mut __m128i) {\n    *row0 = _mm_shuffle_epi32(*row0, _MM_SHUFFLE!(0, 3, 2, 1));\n    *row3 = _mm_shuffle_epi32(*row3, _MM_SHUFFLE!(1, 0, 3, 2));\n    *row2 = _mm_shuffle_epi32(*row2, _MM_SHUFFLE!(2, 1, 0, 3));\n}\n\n#[inline(always)]\nunsafe fn compress_pre(\n    cv: &CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n) -> [__m128i; 4] {\n    let row0 = &mut loadu(cv.as_ptr().add(0) as *const u8);\n    let row1 = &mut loadu(cv.as_ptr().add(4) as *const u8);\n    let row2 = &mut set4(IV[0], IV[1], IV[2], IV[3]);\n    let row3 = &mut set4(\n        counter_low(counter),\n        counter_high(counter),\n        block_len as u32,\n        flags as u32,\n    );\n\n    let mut m0 = loadu(block.as_ptr().add(0 * 4 * DEGREE));\n    let mut m1 = loadu(block.as_ptr().add(1 * 4 * DEGREE));\n    let mut m2 = loadu(block.as_ptr().add(2 * 4 * DEGREE));\n    let mut m3 = loadu(block.as_ptr().add(3 * 4 * DEGREE));\n\n    let mut t0;\n    let mut t1;\n    let mut t2;\n    let mut t3;\n    let mut tt;\n\n    // Round 1. The first round permutes the message words from the original\n    // input order, into the groups that get mixed in parallel.\n    t0 = shuffle2!(m0, m1, _MM_SHUFFLE!(2, 0, 2, 0)); //  6  4  2  0\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle2!(m0, m1, _MM_SHUFFLE!(3, 1, 3, 1)); //  7  5  3  1\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = shuffle2!(m2, m3, _MM_SHUFFLE!(2, 0, 2, 0)); // 14 12 10  8\n    t2 = _mm_shuffle_epi32(t2, _MM_SHUFFLE!(2, 1, 0, 3)); // 12 10  8 14\n    g1(row0, row1, row2, row3, t2);\n    t3 = shuffle2!(m2, m3, _MM_SHUFFLE!(3, 1, 3, 1)); // 15 13 11  9\n    t3 = _mm_shuffle_epi32(t3, _MM_SHUFFLE!(2, 1, 0, 3)); // 13 11  9 15\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n    m0 = t0;\n    m1 = t1;\n    m2 = t2;\n    m3 = t3;\n\n    // Round 2. This round and all following rounds apply a fixed permutation\n    // to the message words from the round before.\n    t0 = shuffle2!(m0, m1, _MM_SHUFFLE!(3, 1, 1, 2));\n    t0 = _mm_shuffle_epi32(t0, _MM_SHUFFLE!(0, 3, 2, 1));\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle2!(m2, m3, _MM_SHUFFLE!(3, 3, 2, 2));\n    tt = _mm_shuffle_epi32(m0, _MM_SHUFFLE!(0, 0, 3, 3));\n    t1 = _mm_blend_epi16(tt, t1, 0xCC);\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = _mm_unpacklo_epi64(m3, m1);\n    tt = _mm_blend_epi16(t2, m2, 0xC0);\n    t2 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(1, 3, 2, 0));\n    g1(row0, row1, row2, row3, t2);\n    t3 = _mm_unpackhi_epi32(m1, m3);\n    tt = _mm_unpacklo_epi32(m2, t3);\n    t3 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(0, 1, 3, 2));\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n    m0 = t0;\n    m1 = t1;\n    m2 = t2;\n    m3 = t3;\n\n    // Round 3\n    t0 = shuffle2!(m0, m1, _MM_SHUFFLE!(3, 1, 1, 2));\n    t0 = _mm_shuffle_epi32(t0, _MM_SHUFFLE!(0, 3, 2, 1));\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle2!(m2, m3, _MM_SHUFFLE!(3, 3, 2, 2));\n    tt = _mm_shuffle_epi32(m0, _MM_SHUFFLE!(0, 0, 3, 3));\n    t1 = _mm_blend_epi16(tt, t1, 0xCC);\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = _mm_unpacklo_epi64(m3, m1);\n    tt = _mm_blend_epi16(t2, m2, 0xC0);\n    t2 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(1, 3, 2, 0));\n    g1(row0, row1, row2, row3, t2);\n    t3 = _mm_unpackhi_epi32(m1, m3);\n    tt = _mm_unpacklo_epi32(m2, t3);\n    t3 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(0, 1, 3, 2));\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n    m0 = t0;\n    m1 = t1;\n    m2 = t2;\n    m3 = t3;\n\n    // Round 4\n    t0 = shuffle2!(m0, m1, _MM_SHUFFLE!(3, 1, 1, 2));\n    t0 = _mm_shuffle_epi32(t0, _MM_SHUFFLE!(0, 3, 2, 1));\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle2!(m2, m3, _MM_SHUFFLE!(3, 3, 2, 2));\n    tt = _mm_shuffle_epi32(m0, _MM_SHUFFLE!(0, 0, 3, 3));\n    t1 = _mm_blend_epi16(tt, t1, 0xCC);\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = _mm_unpacklo_epi64(m3, m1);\n    tt = _mm_blend_epi16(t2, m2, 0xC0);\n    t2 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(1, 3, 2, 0));\n    g1(row0, row1, row2, row3, t2);\n    t3 = _mm_unpackhi_epi32(m1, m3);\n    tt = _mm_unpacklo_epi32(m2, t3);\n    t3 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(0, 1, 3, 2));\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n    m0 = t0;\n    m1 = t1;\n    m2 = t2;\n    m3 = t3;\n\n    // Round 5\n    t0 = shuffle2!(m0, m1, _MM_SHUFFLE!(3, 1, 1, 2));\n    t0 = _mm_shuffle_epi32(t0, _MM_SHUFFLE!(0, 3, 2, 1));\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle2!(m2, m3, _MM_SHUFFLE!(3, 3, 2, 2));\n    tt = _mm_shuffle_epi32(m0, _MM_SHUFFLE!(0, 0, 3, 3));\n    t1 = _mm_blend_epi16(tt, t1, 0xCC);\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = _mm_unpacklo_epi64(m3, m1);\n    tt = _mm_blend_epi16(t2, m2, 0xC0);\n    t2 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(1, 3, 2, 0));\n    g1(row0, row1, row2, row3, t2);\n    t3 = _mm_unpackhi_epi32(m1, m3);\n    tt = _mm_unpacklo_epi32(m2, t3);\n    t3 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(0, 1, 3, 2));\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n    m0 = t0;\n    m1 = t1;\n    m2 = t2;\n    m3 = t3;\n\n    // Round 6\n    t0 = shuffle2!(m0, m1, _MM_SHUFFLE!(3, 1, 1, 2));\n    t0 = _mm_shuffle_epi32(t0, _MM_SHUFFLE!(0, 3, 2, 1));\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle2!(m2, m3, _MM_SHUFFLE!(3, 3, 2, 2));\n    tt = _mm_shuffle_epi32(m0, _MM_SHUFFLE!(0, 0, 3, 3));\n    t1 = _mm_blend_epi16(tt, t1, 0xCC);\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = _mm_unpacklo_epi64(m3, m1);\n    tt = _mm_blend_epi16(t2, m2, 0xC0);\n    t2 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(1, 3, 2, 0));\n    g1(row0, row1, row2, row3, t2);\n    t3 = _mm_unpackhi_epi32(m1, m3);\n    tt = _mm_unpacklo_epi32(m2, t3);\n    t3 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(0, 1, 3, 2));\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n    m0 = t0;\n    m1 = t1;\n    m2 = t2;\n    m3 = t3;\n\n    // Round 7\n    t0 = shuffle2!(m0, m1, _MM_SHUFFLE!(3, 1, 1, 2));\n    t0 = _mm_shuffle_epi32(t0, _MM_SHUFFLE!(0, 3, 2, 1));\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle2!(m2, m3, _MM_SHUFFLE!(3, 3, 2, 2));\n    tt = _mm_shuffle_epi32(m0, _MM_SHUFFLE!(0, 0, 3, 3));\n    t1 = _mm_blend_epi16(tt, t1, 0xCC);\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = _mm_unpacklo_epi64(m3, m1);\n    tt = _mm_blend_epi16(t2, m2, 0xC0);\n    t2 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(1, 3, 2, 0));\n    g1(row0, row1, row2, row3, t2);\n    t3 = _mm_unpackhi_epi32(m1, m3);\n    tt = _mm_unpacklo_epi32(m2, t3);\n    t3 = _mm_shuffle_epi32(tt, _MM_SHUFFLE!(0, 1, 3, 2));\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n\n    [*row0, *row1, *row2, *row3]\n}\n\n#[target_feature(enable = \"sse4.1\")]\npub unsafe fn compress_in_place(\n    cv: &mut CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n) {\n    let [row0, row1, row2, row3] = compress_pre(cv, block, block_len, counter, flags);\n    storeu(xor(row0, row2), cv.as_mut_ptr().add(0) as *mut u8);\n    storeu(xor(row1, row3), cv.as_mut_ptr().add(4) as *mut u8);\n}\n\n#[target_feature(enable = \"sse4.1\")]\npub unsafe fn compress_xof(\n    cv: &CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n) -> [u8; 64] {\n    let [mut row0, mut row1, mut row2, mut row3] =\n        compress_pre(cv, block, block_len, counter, flags);\n    row0 = xor(row0, row2);\n    row1 = xor(row1, row3);\n    row2 = xor(row2, loadu(cv.as_ptr().add(0) as *const u8));\n    row3 = xor(row3, loadu(cv.as_ptr().add(4) as *const u8));\n    core::mem::transmute([row0, row1, row2, row3])\n}\n\n#[inline(always)]\nunsafe fn round(v: &mut [__m128i; 16], m: &[__m128i; 16], r: usize) {\n    v[0] = add(v[0], m[MSG_SCHEDULE[r][0] as usize]);\n    v[1] = add(v[1], m[MSG_SCHEDULE[r][2] as usize]);\n    v[2] = add(v[2], m[MSG_SCHEDULE[r][4] as usize]);\n    v[3] = add(v[3], m[MSG_SCHEDULE[r][6] as usize]);\n    v[0] = add(v[0], v[4]);\n    v[1] = add(v[1], v[5]);\n    v[2] = add(v[2], v[6]);\n    v[3] = add(v[3], v[7]);\n    v[12] = xor(v[12], v[0]);\n    v[13] = xor(v[13], v[1]);\n    v[14] = xor(v[14], v[2]);\n    v[15] = xor(v[15], v[3]);\n    v[12] = rot16(v[12]);\n    v[13] = rot16(v[13]);\n    v[14] = rot16(v[14]);\n    v[15] = rot16(v[15]);\n    v[8] = add(v[8], v[12]);\n    v[9] = add(v[9], v[13]);\n    v[10] = add(v[10], v[14]);\n    v[11] = add(v[11], v[15]);\n    v[4] = xor(v[4], v[8]);\n    v[5] = xor(v[5], v[9]);\n    v[6] = xor(v[6], v[10]);\n    v[7] = xor(v[7], v[11]);\n    v[4] = rot12(v[4]);\n    v[5] = rot12(v[5]);\n    v[6] = rot12(v[6]);\n    v[7] = rot12(v[7]);\n    v[0] = add(v[0], m[MSG_SCHEDULE[r][1] as usize]);\n    v[1] = add(v[1], m[MSG_SCHEDULE[r][3] as usize]);\n    v[2] = add(v[2], m[MSG_SCHEDULE[r][5] as usize]);\n    v[3] = add(v[3], m[MSG_SCHEDULE[r][7] as usize]);\n    v[0] = add(v[0], v[4]);\n    v[1] = add(v[1], v[5]);\n    v[2] = add(v[2], v[6]);\n    v[3] = add(v[3], v[7]);\n    v[12] = xor(v[12], v[0]);\n    v[13] = xor(v[13], v[1]);\n    v[14] = xor(v[14], v[2]);\n    v[15] = xor(v[15], v[3]);\n    v[12] = rot8(v[12]);\n    v[13] = rot8(v[13]);\n    v[14] = rot8(v[14]);\n    v[15] = rot8(v[15]);\n    v[8] = add(v[8], v[12]);\n    v[9] = add(v[9], v[13]);\n    v[10] = add(v[10], v[14]);\n    v[11] = add(v[11], v[15]);\n    v[4] = xor(v[4], v[8]);\n    v[5] = xor(v[5], v[9]);\n    v[6] = xor(v[6], v[10]);\n    v[7] = xor(v[7], v[11]);\n    v[4] = rot7(v[4]);\n    v[5] = rot7(v[5]);\n    v[6] = rot7(v[6]);\n    v[7] = rot7(v[7]);\n\n    v[0] = add(v[0], m[MSG_SCHEDULE[r][8] as usize]);\n    v[1] = add(v[1], m[MSG_SCHEDULE[r][10] as usize]);\n    v[2] = add(v[2], m[MSG_SCHEDULE[r][12] as usize]);\n    v[3] = add(v[3], m[MSG_SCHEDULE[r][14] as usize]);\n    v[0] = add(v[0], v[5]);\n    v[1] = add(v[1], v[6]);\n    v[2] = add(v[2], v[7]);\n    v[3] = add(v[3], v[4]);\n    v[15] = xor(v[15], v[0]);\n    v[12] = xor(v[12], v[1]);\n    v[13] = xor(v[13], v[2]);\n    v[14] = xor(v[14], v[3]);\n    v[15] = rot16(v[15]);\n    v[12] = rot16(v[12]);\n    v[13] = rot16(v[13]);\n    v[14] = rot16(v[14]);\n    v[10] = add(v[10], v[15]);\n    v[11] = add(v[11], v[12]);\n    v[8] = add(v[8], v[13]);\n    v[9] = add(v[9], v[14]);\n    v[5] = xor(v[5], v[10]);\n    v[6] = xor(v[6], v[11]);\n    v[7] = xor(v[7], v[8]);\n    v[4] = xor(v[4], v[9]);\n    v[5] = rot12(v[5]);\n    v[6] = rot12(v[6]);\n    v[7] = rot12(v[7]);\n    v[4] = rot12(v[4]);\n    v[0] = add(v[0], m[MSG_SCHEDULE[r][9] as usize]);\n    v[1] = add(v[1], m[MSG_SCHEDULE[r][11] as usize]);\n    v[2] = add(v[2], m[MSG_SCHEDULE[r][13] as usize]);\n    v[3] = add(v[3], m[MSG_SCHEDULE[r][15] as usize]);\n    v[0] = add(v[0], v[5]);\n    v[1] = add(v[1], v[6]);\n    v[2] = add(v[2], v[7]);\n    v[3] = add(v[3], v[4]);\n    v[15] = xor(v[15], v[0]);\n    v[12] = xor(v[12], v[1]);\n    v[13] = xor(v[13], v[2]);\n    v[14] = xor(v[14], v[3]);\n    v[15] = rot8(v[15]);\n    v[12] = rot8(v[12]);\n    v[13] = rot8(v[13]);\n    v[14] = rot8(v[14]);\n    v[10] = add(v[10], v[15]);\n    v[11] = add(v[11], v[12]);\n    v[8] = add(v[8], v[13]);\n    v[9] = add(v[9], v[14]);\n    v[5] = xor(v[5], v[10]);\n    v[6] = xor(v[6], v[11]);\n    v[7] = xor(v[7], v[8]);\n    v[4] = xor(v[4], v[9]);\n    v[5] = rot7(v[5]);\n    v[6] = rot7(v[6]);\n    v[7] = rot7(v[7]);\n    v[4] = rot7(v[4]);\n}\n\n#[inline(always)]\nunsafe fn transpose_vecs(vecs: &mut [__m128i; DEGREE]) {\n    // Interleave 32-bit lanes. The low unpack is lanes 00/11 and the high is\n    // 22/33. Note that this doesn't split the vector into two lanes, as the\n    // AVX2 counterparts do.\n    let ab_01 = _mm_unpacklo_epi32(vecs[0], vecs[1]);\n    let ab_23 = _mm_unpackhi_epi32(vecs[0], vecs[1]);\n    let cd_01 = _mm_unpacklo_epi32(vecs[2], vecs[3]);\n    let cd_23 = _mm_unpackhi_epi32(vecs[2], vecs[3]);\n\n    // Interleave 64-bit lanes.\n    let abcd_0 = _mm_unpacklo_epi64(ab_01, cd_01);\n    let abcd_1 = _mm_unpackhi_epi64(ab_01, cd_01);\n    let abcd_2 = _mm_unpacklo_epi64(ab_23, cd_23);\n    let abcd_3 = _mm_unpackhi_epi64(ab_23, cd_23);\n\n    vecs[0] = abcd_0;\n    vecs[1] = abcd_1;\n    vecs[2] = abcd_2;\n    vecs[3] = abcd_3;\n}\n\n#[inline(always)]\nunsafe fn transpose_msg_vecs(inputs: &[*const u8; DEGREE], block_offset: usize) -> [__m128i; 16] {\n    let mut vecs = [\n        loadu(inputs[0].add(block_offset + 0 * 4 * DEGREE)),\n        loadu(inputs[1].add(block_offset + 0 * 4 * DEGREE)),\n        loadu(inputs[2].add(block_offset + 0 * 4 * DEGREE)),\n        loadu(inputs[3].add(block_offset + 0 * 4 * DEGREE)),\n        loadu(inputs[0].add(block_offset + 1 * 4 * DEGREE)),\n        loadu(inputs[1].add(block_offset + 1 * 4 * DEGREE)),\n        loadu(inputs[2].add(block_offset + 1 * 4 * DEGREE)),\n        loadu(inputs[3].add(block_offset + 1 * 4 * DEGREE)),\n        loadu(inputs[0].add(block_offset + 2 * 4 * DEGREE)),\n        loadu(inputs[1].add(block_offset + 2 * 4 * DEGREE)),\n        loadu(inputs[2].add(block_offset + 2 * 4 * DEGREE)),\n        loadu(inputs[3].add(block_offset + 2 * 4 * DEGREE)),\n        loadu(inputs[0].add(block_offset + 3 * 4 * DEGREE)),\n        loadu(inputs[1].add(block_offset + 3 * 4 * DEGREE)),\n        loadu(inputs[2].add(block_offset + 3 * 4 * DEGREE)),\n        loadu(inputs[3].add(block_offset + 3 * 4 * DEGREE)),\n    ];\n    for i in 0..DEGREE {\n        _mm_prefetch(inputs[i].add(block_offset + 256) as *const i8, _MM_HINT_T0);\n    }\n    let squares = mut_array_refs!(&mut vecs, DEGREE, DEGREE, DEGREE, DEGREE);\n    transpose_vecs(squares.0);\n    transpose_vecs(squares.1);\n    transpose_vecs(squares.2);\n    transpose_vecs(squares.3);\n    vecs\n}\n\n#[inline(always)]\nunsafe fn load_counters(counter: u64, increment_counter: IncrementCounter) -> (__m128i, __m128i) {\n    let mask = if increment_counter.yes() { !0 } else { 0 };\n    (\n        set4(\n            counter_low(counter + (mask & 0)),\n            counter_low(counter + (mask & 1)),\n            counter_low(counter + (mask & 2)),\n            counter_low(counter + (mask & 3)),\n        ),\n        set4(\n            counter_high(counter + (mask & 0)),\n            counter_high(counter + (mask & 1)),\n            counter_high(counter + (mask & 2)),\n            counter_high(counter + (mask & 3)),\n        ),\n    )\n}\n\n#[target_feature(enable = \"sse4.1\")]\npub unsafe fn hash4(\n    inputs: &[*const u8; DEGREE],\n    blocks: usize,\n    key: &CVWords,\n    counter: u64,\n    increment_counter: IncrementCounter,\n    flags: u8,\n    flags_start: u8,\n    flags_end: u8,\n    out: &mut [u8; DEGREE * OUT_LEN],\n) {\n    let mut h_vecs = [\n        set1(key[0]),\n        set1(key[1]),\n        set1(key[2]),\n        set1(key[3]),\n        set1(key[4]),\n        set1(key[5]),\n        set1(key[6]),\n        set1(key[7]),\n    ];\n    let (counter_low_vec, counter_high_vec) = load_counters(counter, increment_counter);\n    let mut block_flags = flags | flags_start;\n\n    for block in 0..blocks {\n        if block + 1 == blocks {\n            block_flags |= flags_end;\n        }\n        let block_len_vec = set1(BLOCK_LEN as u32); // full blocks only\n        let block_flags_vec = set1(block_flags as u32);\n        let msg_vecs = transpose_msg_vecs(inputs, block * BLOCK_LEN);\n\n        // The transposed compression function. Note that inlining this\n        // manually here improves compile times by a lot, compared to factoring\n        // it out into its own function and making it #[inline(always)]. Just\n        // guessing, it might have something to do with loop unrolling.\n        let mut v = [\n            h_vecs[0],\n            h_vecs[1],\n            h_vecs[2],\n            h_vecs[3],\n            h_vecs[4],\n            h_vecs[5],\n            h_vecs[6],\n            h_vecs[7],\n            set1(IV[0]),\n            set1(IV[1]),\n            set1(IV[2]),\n            set1(IV[3]),\n            counter_low_vec,\n            counter_high_vec,\n            block_len_vec,\n            block_flags_vec,\n        ];\n        round(&mut v, &msg_vecs, 0);\n        round(&mut v, &msg_vecs, 1);\n        round(&mut v, &msg_vecs, 2);\n        round(&mut v, &msg_vecs, 3);\n        round(&mut v, &msg_vecs, 4);\n        round(&mut v, &msg_vecs, 5);\n        round(&mut v, &msg_vecs, 6);\n        h_vecs[0] = xor(v[0], v[8]);\n        h_vecs[1] = xor(v[1], v[9]);\n        h_vecs[2] = xor(v[2], v[10]);\n        h_vecs[3] = xor(v[3], v[11]);\n        h_vecs[4] = xor(v[4], v[12]);\n        h_vecs[5] = xor(v[5], v[13]);\n        h_vecs[6] = xor(v[6], v[14]);\n        h_vecs[7] = xor(v[7], v[15]);\n\n        block_flags = flags;\n    }\n\n    let squares = mut_array_refs!(&mut h_vecs, DEGREE, DEGREE);\n    transpose_vecs(squares.0);\n    transpose_vecs(squares.1);\n    // The first four vecs now contain the first half of each output, and the\n    // second four vecs contain the second half of each output.\n    storeu(h_vecs[0], out.as_mut_ptr().add(0 * 4 * DEGREE));\n    storeu(h_vecs[4], out.as_mut_ptr().add(1 * 4 * DEGREE));\n    storeu(h_vecs[1], out.as_mut_ptr().add(2 * 4 * DEGREE));\n    storeu(h_vecs[5], out.as_mut_ptr().add(3 * 4 * DEGREE));\n    storeu(h_vecs[2], out.as_mut_ptr().add(4 * 4 * DEGREE));\n    storeu(h_vecs[6], out.as_mut_ptr().add(5 * 4 * DEGREE));\n    storeu(h_vecs[3], out.as_mut_ptr().add(6 * 4 * DEGREE));\n    storeu(h_vecs[7], out.as_mut_ptr().add(7 * 4 * DEGREE));\n}\n\n#[target_feature(enable = \"sse4.1\")]\nunsafe fn hash1<const N: usize>(\n    input: &[u8; N],\n    key: &CVWords,\n    counter: u64,\n    flags: u8,\n    flags_start: u8,\n    flags_end: u8,\n    out: &mut CVBytes,\n) {\n    debug_assert_eq!(N % BLOCK_LEN, 0, \"uneven blocks\");\n    let mut cv = *key;\n    let mut block_flags = flags | flags_start;\n    let mut slice = &input[..];\n    while slice.len() >= BLOCK_LEN {\n        if slice.len() == BLOCK_LEN {\n            block_flags |= flags_end;\n        }\n        compress_in_place(\n            &mut cv,\n            array_ref!(slice, 0, BLOCK_LEN),\n            BLOCK_LEN as u8,\n            counter,\n            block_flags,\n        );\n        block_flags = flags;\n        slice = &slice[BLOCK_LEN..];\n    }\n    *out = core::mem::transmute(cv); // x86 is little-endian\n}\n\n#[target_feature(enable = \"sse4.1\")]\npub unsafe fn hash_many<const N: usize>(\n    mut inputs: &[&[u8; N]],\n    key: &CVWords,\n    mut counter: u64,\n    increment_counter: IncrementCounter,\n    flags: u8,\n    flags_start: u8,\n    flags_end: u8,\n    mut out: &mut [u8],\n) {\n    debug_assert!(out.len() >= inputs.len() * OUT_LEN, \"out too short\");\n    while inputs.len() >= DEGREE && out.len() >= DEGREE * OUT_LEN {\n        // Safe because the layout of arrays is guaranteed, and because the\n        // `blocks` count is determined statically from the argument type.\n        let input_ptrs: &[*const u8; DEGREE] = &*(inputs.as_ptr() as *const [*const u8; DEGREE]);\n        let blocks = N / BLOCK_LEN;\n        hash4(\n            input_ptrs,\n            blocks,\n            key,\n            counter,\n            increment_counter,\n            flags,\n            flags_start,\n            flags_end,\n            array_mut_ref!(out, 0, DEGREE * OUT_LEN),\n        );\n        if increment_counter.yes() {\n            counter += DEGREE as u64;\n        }\n        inputs = &inputs[DEGREE..];\n        out = &mut out[DEGREE * OUT_LEN..];\n    }\n    for (&input, output) in inputs.iter().zip(out.chunks_exact_mut(OUT_LEN)) {\n        hash1(\n            input,\n            key,\n            counter,\n            flags,\n            flags_start,\n            flags_end,\n            array_mut_ref!(output, 0, OUT_LEN),\n        );\n        if increment_counter.yes() {\n            counter += 1;\n        }\n    }\n}\n\n#[cfg(test)]\nmod test {\n    use super::*;\n\n    #[test]\n    fn test_transpose() {\n        if !crate::platform::sse41_detected() {\n            return;\n        }\n\n        #[target_feature(enable = \"sse4.1\")]\n        unsafe fn transpose_wrapper(vecs: &mut [__m128i; DEGREE]) {\n            transpose_vecs(vecs);\n        }\n\n        let mut matrix = [[0 as u32; DEGREE]; DEGREE];\n        for i in 0..DEGREE {\n            for j in 0..DEGREE {\n                matrix[i][j] = (i * DEGREE + j) as u32;\n            }\n        }\n\n        unsafe {\n            let mut vecs: [__m128i; DEGREE] = core::mem::transmute(matrix);\n            transpose_wrapper(&mut vecs);\n            matrix = core::mem::transmute(vecs);\n        }\n\n        for i in 0..DEGREE {\n            for j in 0..DEGREE {\n                // Reversed indexes from above.\n                assert_eq!(matrix[j][i], (i * DEGREE + j) as u32);\n            }\n        }\n    }\n\n    #[test]\n    fn test_compress() {\n        if !crate::platform::sse41_detected() {\n            return;\n        }\n        crate::test::test_compress_fn(compress_in_place, compress_xof);\n    }\n\n    #[test]\n    fn test_hash_many() {\n        if !crate::platform::sse41_detected() {\n            return;\n        }\n        crate::test::test_hash_many_fn(hash_many, hash_many);\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/src/test.rs",
    "content": "use crate::{CVBytes, CVWords, IncrementCounter, BLOCK_LEN, CHUNK_LEN, OUT_LEN};\nuse arrayref::array_ref;\nuse arrayvec::ArrayVec;\nuse core::usize;\nuse rand::prelude::*;\n\n// Interesting input lengths to run tests on.\npub const TEST_CASES: &[usize] = &[\n    0,\n    1,\n    2,\n    3,\n    4,\n    5,\n    6,\n    7,\n    8,\n    BLOCK_LEN - 1,\n    BLOCK_LEN,\n    BLOCK_LEN + 1,\n    2 * BLOCK_LEN - 1,\n    2 * BLOCK_LEN,\n    2 * BLOCK_LEN + 1,\n    CHUNK_LEN - 1,\n    CHUNK_LEN,\n    CHUNK_LEN + 1,\n    2 * CHUNK_LEN,\n    2 * CHUNK_LEN + 1,\n    3 * CHUNK_LEN,\n    3 * CHUNK_LEN + 1,\n    4 * CHUNK_LEN,\n    4 * CHUNK_LEN + 1,\n    5 * CHUNK_LEN,\n    5 * CHUNK_LEN + 1,\n    6 * CHUNK_LEN,\n    6 * CHUNK_LEN + 1,\n    7 * CHUNK_LEN,\n    7 * CHUNK_LEN + 1,\n    8 * CHUNK_LEN,\n    8 * CHUNK_LEN + 1,\n    16 * CHUNK_LEN - 1,\n    16 * CHUNK_LEN, // AVX512's bandwidth\n    16 * CHUNK_LEN + 1,\n    31 * CHUNK_LEN - 1,\n    31 * CHUNK_LEN, // 16 + 8 + 4 + 2 + 1\n    31 * CHUNK_LEN + 1,\n    100 * CHUNK_LEN, // subtrees larger than MAX_SIMD_DEGREE chunks\n];\n\npub const TEST_CASES_MAX: usize = 100 * CHUNK_LEN;\n\n// There's a test to make sure these two are equal below.\npub const TEST_KEY: CVBytes = *b\"whats the Elvish word for friend\";\npub const TEST_KEY_WORDS: CVWords = [\n    1952540791, 1752440947, 1816469605, 1752394102, 1919907616, 1868963940, 1919295602, 1684956521,\n];\n\n// Paint the input with a repeating byte pattern. We use a cycle length of 251,\n// because that's the largest prime number less than 256. This makes it\n// unlikely to swapping any two adjacent input blocks or chunks will give the\n// same answer.\npub fn paint_test_input(buf: &mut [u8]) {\n    for (i, b) in buf.iter_mut().enumerate() {\n        *b = (i % 251) as u8;\n    }\n}\n\ntype CompressInPlaceFn =\n    unsafe fn(cv: &mut CVWords, block: &[u8; BLOCK_LEN], block_len: u8, counter: u64, flags: u8);\n\ntype CompressXofFn = unsafe fn(\n    cv: &CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n) -> [u8; 64];\n\n// A shared helper function for platform-specific tests.\npub fn test_compress_fn(compress_in_place_fn: CompressInPlaceFn, compress_xof_fn: CompressXofFn) {\n    let initial_state = TEST_KEY_WORDS;\n    let block_len: u8 = 61;\n    let mut block = [0; BLOCK_LEN];\n    paint_test_input(&mut block[..block_len as usize]);\n    // Use a counter with set bits in both 32-bit words.\n    let counter = (5u64 << 32) + 6;\n    let flags = crate::CHUNK_END | crate::ROOT | crate::KEYED_HASH;\n\n    let portable_out =\n        crate::portable::compress_xof(&initial_state, &block, block_len, counter as u64, flags);\n\n    let mut test_state = initial_state;\n    unsafe { compress_in_place_fn(&mut test_state, &block, block_len, counter as u64, flags) };\n    let test_state_bytes = crate::platform::le_bytes_from_words_32(&test_state);\n    let test_xof =\n        unsafe { compress_xof_fn(&initial_state, &block, block_len, counter as u64, flags) };\n\n    assert_eq!(&portable_out[..32], &test_state_bytes[..]);\n    assert_eq!(&portable_out[..], &test_xof[..]);\n}\n\ntype HashManyFn<A> = unsafe fn(\n    inputs: &[&A],\n    key: &CVWords,\n    counter: u64,\n    increment_counter: IncrementCounter,\n    flags: u8,\n    flags_start: u8,\n    flags_end: u8,\n    out: &mut [u8],\n);\n\n// A shared helper function for platform-specific tests.\npub fn test_hash_many_fn(\n    hash_many_chunks_fn: HashManyFn<[u8; CHUNK_LEN]>,\n    hash_many_parents_fn: HashManyFn<[u8; 2 * OUT_LEN]>,\n) {\n    // Test a few different initial counter values.\n    // - 0: The base case.\n    // - u32::MAX: The low word of the counter overflows for all inputs except the first.\n    // - i32::MAX: *No* overflow. But carry bugs in tricky SIMD code can screw this up, if you XOR\n    //   when you're supposed to ANDNOT...\n    let initial_counters = [0, u32::MAX as u64, i32::MAX as u64];\n    for counter in initial_counters {\n        #[cfg(feature = \"std\")]\n        dbg!(counter);\n\n        // 31 (16 + 8 + 4 + 2 + 1) inputs\n        const NUM_INPUTS: usize = 31;\n        let mut input_buf = [0; CHUNK_LEN * NUM_INPUTS];\n        crate::test::paint_test_input(&mut input_buf);\n\n        // First hash chunks.\n        let mut chunks = ArrayVec::<&[u8; CHUNK_LEN], NUM_INPUTS>::new();\n        for i in 0..NUM_INPUTS {\n            chunks.push(array_ref!(input_buf, i * CHUNK_LEN, CHUNK_LEN));\n        }\n        let mut portable_chunks_out = [0; NUM_INPUTS * OUT_LEN];\n        crate::portable::hash_many(\n            &chunks,\n            &TEST_KEY_WORDS,\n            counter,\n            IncrementCounter::Yes,\n            crate::KEYED_HASH,\n            crate::CHUNK_START,\n            crate::CHUNK_END,\n            &mut portable_chunks_out,\n        );\n\n        let mut test_chunks_out = [0; NUM_INPUTS * OUT_LEN];\n        unsafe {\n            hash_many_chunks_fn(\n                &chunks[..],\n                &TEST_KEY_WORDS,\n                counter,\n                IncrementCounter::Yes,\n                crate::KEYED_HASH,\n                crate::CHUNK_START,\n                crate::CHUNK_END,\n                &mut test_chunks_out,\n            );\n        }\n        for n in 0..NUM_INPUTS {\n            #[cfg(feature = \"std\")]\n            dbg!(n);\n            assert_eq!(\n                &portable_chunks_out[n * OUT_LEN..][..OUT_LEN],\n                &test_chunks_out[n * OUT_LEN..][..OUT_LEN]\n            );\n        }\n\n        // Then hash parents.\n        let mut parents = ArrayVec::<&[u8; 2 * OUT_LEN], NUM_INPUTS>::new();\n        for i in 0..NUM_INPUTS {\n            parents.push(array_ref!(input_buf, i * 2 * OUT_LEN, 2 * OUT_LEN));\n        }\n        let mut portable_parents_out = [0; NUM_INPUTS * OUT_LEN];\n        crate::portable::hash_many(\n            &parents,\n            &TEST_KEY_WORDS,\n            counter,\n            IncrementCounter::No,\n            crate::KEYED_HASH | crate::PARENT,\n            0,\n            0,\n            &mut portable_parents_out,\n        );\n\n        let mut test_parents_out = [0; NUM_INPUTS * OUT_LEN];\n        unsafe {\n            hash_many_parents_fn(\n                &parents[..],\n                &TEST_KEY_WORDS,\n                counter,\n                IncrementCounter::No,\n                crate::KEYED_HASH | crate::PARENT,\n                0,\n                0,\n                &mut test_parents_out,\n            );\n        }\n        for n in 0..NUM_INPUTS {\n            #[cfg(feature = \"std\")]\n            dbg!(n);\n            assert_eq!(\n                &portable_parents_out[n * OUT_LEN..][..OUT_LEN],\n                &test_parents_out[n * OUT_LEN..][..OUT_LEN]\n            );\n        }\n    }\n}\n\n#[allow(unused)]\ntype XofManyFunction = unsafe fn(\n    cv: &CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n    out: &mut [u8],\n);\n\n// A shared helper function for platform-specific tests.\n#[allow(unused)]\npub fn test_xof_many_fn(xof_many_function: XofManyFunction) {\n    let mut block = [0; BLOCK_LEN];\n    let block_len = 42;\n    crate::test::paint_test_input(&mut block[..block_len]);\n    let cv = [40, 41, 42, 43, 44, 45, 46, 47];\n    let flags = crate::KEYED_HASH;\n\n    // Test a few different initial counter values.\n    // - 0: The base case.\n    // - u32::MAX: The low word of the counter overflows for all inputs except the first.\n    // - i32::MAX: *No* overflow. But carry bugs in tricky SIMD code can screw this up, if you XOR\n    //   when you're supposed to ANDNOT...\n    let initial_counters = [0, u32::MAX as u64, i32::MAX as u64];\n    for counter in initial_counters {\n        #[cfg(feature = \"std\")]\n        dbg!(counter);\n\n        // 31 (16 + 8 + 4 + 2 + 1) outputs\n        const OUTPUT_SIZE: usize = 31 * BLOCK_LEN;\n\n        let mut portable_out = [0u8; OUTPUT_SIZE];\n        for (i, out_block) in portable_out.chunks_exact_mut(64).enumerate() {\n            out_block.copy_from_slice(&crate::portable::compress_xof(\n                &cv,\n                &block,\n                block_len as u8,\n                counter + i as u64,\n                flags,\n            ));\n        }\n\n        let mut test_out = [0u8; OUTPUT_SIZE];\n        unsafe {\n            xof_many_function(&cv, &block, block_len as u8, counter, flags, &mut test_out);\n        }\n\n        assert_eq!(portable_out, test_out);\n    }\n\n    // Test that xof_many doesn't write more blocks than requested. Note that the current assembly\n    // implementation always outputs at least one block, so we don't test the zero case.\n    for block_count in 1..=32 {\n        let mut array = [0; BLOCK_LEN * 33];\n        let output_start = 17;\n        let output_len = block_count * BLOCK_LEN;\n        let output_end = output_start + output_len;\n        let output = &mut array[output_start..output_end];\n        unsafe {\n            xof_many_function(&cv, &block, block_len as u8, 0, flags, output);\n        }\n        for i in 0..array.len() {\n            if i < output_start || output_end <= i {\n                assert_eq!(0, array[i], \"index {i}\");\n            }\n        }\n    }\n}\n\n#[test]\nfn test_key_bytes_equal_key_words() {\n    assert_eq!(\n        TEST_KEY_WORDS,\n        crate::platform::words_from_le_bytes_32(&TEST_KEY),\n    );\n}\n\n#[test]\nfn test_reference_impl_size() {\n    // Because the Rust compiler optimizes struct layout, it's possible that\n    // some future version of the compiler will produce a different size. If\n    // that happens, we can either disable this test, or test for multiple\n    // expected values. For now, the purpose of this test is to make sure we\n    // notice if that happens.\n    assert_eq!(1880, core::mem::size_of::<reference_impl::Hasher>());\n}\n\n#[test]\nfn test_counter_words() {\n    let counter: u64 = (1 << 32) + 2;\n    assert_eq!(crate::counter_low(counter), 2);\n    assert_eq!(crate::counter_high(counter), 1);\n}\n\n#[test]\nfn test_largest_power_of_two_leq() {\n    let input_output = &[\n        // The zero case is nonsensical, but it does work.\n        (0, 1),\n        (1, 1),\n        (2, 2),\n        (3, 2),\n        (4, 4),\n        (5, 4),\n        (6, 4),\n        (7, 4),\n        (8, 8),\n        // the largest possible usize\n        (usize::MAX, (usize::MAX >> 1) + 1),\n    ];\n    for &(input, output) in input_output {\n        assert_eq!(\n            output,\n            crate::largest_power_of_two_leq(input),\n            \"wrong output for n={}\",\n            input\n        );\n    }\n}\n\n#[test]\nfn test_compare_reference_impl() {\n    const OUT: usize = 303; // more than 64, not a multiple of 4\n    let mut input_buf = [0; TEST_CASES_MAX];\n    paint_test_input(&mut input_buf);\n    for &case in TEST_CASES {\n        let input = &input_buf[..case];\n        #[cfg(feature = \"std\")]\n        dbg!(case);\n\n        // regular\n        {\n            let mut reference_hasher = reference_impl::Hasher::new();\n            reference_hasher.update(input);\n            let mut expected_out = [0; OUT];\n            reference_hasher.finalize(&mut expected_out);\n\n            // all at once\n            let test_out = crate::hash(input);\n            assert_eq!(test_out, *array_ref!(expected_out, 0, 32));\n            // incremental\n            let mut hasher = crate::Hasher::new();\n            hasher.update(input);\n            assert_eq!(hasher.finalize(), *array_ref!(expected_out, 0, 32));\n            assert_eq!(hasher.finalize(), test_out);\n            // incremental (rayon)\n            #[cfg(feature = \"rayon\")]\n            {\n                let mut hasher = crate::Hasher::new();\n                hasher.update_rayon(input);\n                assert_eq!(hasher.finalize(), *array_ref!(expected_out, 0, 32));\n                assert_eq!(hasher.finalize(), test_out);\n            }\n            // xof\n            let mut extended = [0; OUT];\n            hasher.finalize_xof().fill(&mut extended);\n            assert_eq!(extended, expected_out);\n        }\n\n        // keyed\n        {\n            let mut reference_hasher = reference_impl::Hasher::new_keyed(&TEST_KEY);\n            reference_hasher.update(input);\n            let mut expected_out = [0; OUT];\n            reference_hasher.finalize(&mut expected_out);\n\n            // all at once\n            let test_out = crate::keyed_hash(&TEST_KEY, input);\n            assert_eq!(test_out, *array_ref!(expected_out, 0, 32));\n            // incremental\n            let mut hasher = crate::Hasher::new_keyed(&TEST_KEY);\n            hasher.update(input);\n            assert_eq!(hasher.finalize(), *array_ref!(expected_out, 0, 32));\n            assert_eq!(hasher.finalize(), test_out);\n            // incremental (rayon)\n            #[cfg(feature = \"rayon\")]\n            {\n                let mut hasher = crate::Hasher::new_keyed(&TEST_KEY);\n                hasher.update_rayon(input);\n                assert_eq!(hasher.finalize(), *array_ref!(expected_out, 0, 32));\n                assert_eq!(hasher.finalize(), test_out);\n            }\n            // xof\n            let mut extended = [0; OUT];\n            hasher.finalize_xof().fill(&mut extended);\n            assert_eq!(extended, expected_out);\n        }\n\n        // derive_key\n        {\n            let context = \"BLAKE3 2019-12-27 16:13:59 example context (not the test vector one)\";\n            let mut reference_hasher = reference_impl::Hasher::new_derive_key(context);\n            reference_hasher.update(input);\n            let mut expected_out = [0; OUT];\n            reference_hasher.finalize(&mut expected_out);\n\n            // all at once\n            let test_out = crate::derive_key(context, input);\n            assert_eq!(test_out, expected_out[..32]);\n            // incremental\n            let mut hasher = crate::Hasher::new_derive_key(context);\n            hasher.update(input);\n            assert_eq!(hasher.finalize(), *array_ref!(expected_out, 0, 32));\n            assert_eq!(hasher.finalize(), *array_ref!(test_out, 0, 32));\n            // incremental (rayon)\n            #[cfg(feature = \"rayon\")]\n            {\n                let mut hasher = crate::Hasher::new_derive_key(context);\n                hasher.update_rayon(input);\n                assert_eq!(hasher.finalize(), *array_ref!(expected_out, 0, 32));\n                assert_eq!(hasher.finalize(), *array_ref!(test_out, 0, 32));\n            }\n            // xof\n            let mut extended = [0; OUT];\n            hasher.finalize_xof().fill(&mut extended);\n            assert_eq!(extended, expected_out);\n        }\n    }\n}\n\n#[test]\nfn test_compare_reference_impl_long_xof() {\n    let mut reference_output = [0u8; 32 * BLOCK_LEN - 1];\n    let mut reference_hasher = reference_impl::Hasher::new_keyed(&TEST_KEY);\n    reference_hasher.update(b\"hello world\");\n    reference_hasher.finalize(&mut reference_output);\n\n    let mut test_output = [0u8; 32 * BLOCK_LEN - 1];\n    let mut test_hasher = crate::Hasher::new_keyed(&TEST_KEY);\n    test_hasher.update(b\"hello world\");\n    test_hasher.finalize_xof().fill(&mut test_output);\n\n    assert_eq!(reference_output, test_output);\n}\n\n#[test]\nfn test_xof_partial_blocks() {\n    const OUT_LEN: usize = 6 * BLOCK_LEN;\n    let mut reference_out = [0u8; OUT_LEN];\n    reference_impl::Hasher::new().finalize(&mut reference_out);\n\n    let mut all_at_once_out = [0u8; OUT_LEN];\n    crate::Hasher::new()\n        .finalize_xof()\n        .fill(&mut all_at_once_out);\n    assert_eq!(reference_out, all_at_once_out);\n\n    let mut partial_out = [0u8; OUT_LEN];\n    let partial_start = 32;\n    let partial_end = OUT_LEN - 32;\n    let mut xof = crate::Hasher::new().finalize_xof();\n    xof.fill(&mut partial_out[..partial_start]);\n    xof.fill(&mut partial_out[partial_start..partial_end]);\n    xof.fill(&mut partial_out[partial_end..]);\n    assert_eq!(reference_out, partial_out);\n}\n\nfn reference_hash(input: &[u8]) -> crate::Hash {\n    let mut hasher = reference_impl::Hasher::new();\n    hasher.update(input);\n    let mut bytes = [0; 32];\n    hasher.finalize(&mut bytes);\n    bytes.into()\n}\n\n#[test]\nfn test_compare_update_multiple() {\n    // Don't use all the long test cases here, since that's unnecessarily slow\n    // in debug mode.\n    let mut short_test_cases = TEST_CASES;\n    while *short_test_cases.last().unwrap() > 4 * CHUNK_LEN {\n        short_test_cases = &short_test_cases[..short_test_cases.len() - 1];\n    }\n    assert_eq!(*short_test_cases.last().unwrap(), 4 * CHUNK_LEN);\n\n    let mut input_buf = [0; 2 * TEST_CASES_MAX];\n    paint_test_input(&mut input_buf);\n\n    for &first_update in short_test_cases {\n        #[cfg(feature = \"std\")]\n        dbg!(first_update);\n        let first_input = &input_buf[..first_update];\n        let mut test_hasher = crate::Hasher::new();\n        test_hasher.update(first_input);\n\n        for &second_update in short_test_cases {\n            #[cfg(feature = \"std\")]\n            dbg!(second_update);\n            let second_input = &input_buf[first_update..][..second_update];\n            let total_input = &input_buf[..first_update + second_update];\n\n            // Clone the hasher with first_update bytes already written, so\n            // that the next iteration can reuse it.\n            let mut test_hasher = test_hasher.clone();\n            test_hasher.update(second_input);\n            let expected = reference_hash(total_input);\n            assert_eq!(expected, test_hasher.finalize());\n        }\n    }\n}\n\n#[test]\nfn test_fuzz_hasher() {\n    const INPUT_MAX: usize = 4 * CHUNK_LEN;\n    let mut input_buf = [0; 3 * INPUT_MAX];\n    paint_test_input(&mut input_buf);\n\n    // Don't do too many iterations in debug mode, to keep the tests under a\n    // second or so. CI should run tests in release mode also. Provide an\n    // environment variable for specifying a larger number of fuzz iterations.\n    let num_tests = if cfg!(debug_assertions) { 100 } else { 10_000 };\n\n    // Use a fixed RNG seed for reproducibility.\n    let mut rng = rand_chacha::ChaCha8Rng::from_seed([1; 32]);\n    for _num_test in 0..num_tests {\n        #[cfg(feature = \"std\")]\n        dbg!(_num_test);\n        let mut hasher = crate::Hasher::new();\n        let mut total_input = 0;\n        // For each test, write 3 inputs of random length.\n        for _ in 0..3 {\n            let input_len = rng.random_range(0..(INPUT_MAX + 1));\n            #[cfg(feature = \"std\")]\n            dbg!(input_len);\n            let input = &input_buf[total_input..][..input_len];\n            hasher.update(input);\n            total_input += input_len;\n        }\n        let expected = reference_hash(&input_buf[..total_input]);\n        assert_eq!(expected, hasher.finalize());\n    }\n}\n\n#[test]\nfn test_fuzz_xof() {\n    let mut input_buf = [0u8; 3 * BLOCK_LEN];\n    paint_test_input(&mut input_buf);\n\n    // Don't do too many iterations in debug mode, to keep the tests under a\n    // second or so. CI should run tests in release mode also. Provide an\n    // environment variable for specifying a larger number of fuzz iterations.\n    let num_tests = if cfg!(debug_assertions) { 100 } else { 2500 };\n\n    // Use a fixed RNG seed for reproducibility.\n    let mut rng = rand_chacha::ChaCha8Rng::from_seed([1; 32]);\n    for _num_test in 0..num_tests {\n        #[cfg(feature = \"std\")]\n        dbg!(_num_test);\n        // 31 (16 + 8 + 4 + 2 + 1) outputs\n        let mut output_buf = [0; 31 * CHUNK_LEN];\n        let input_len = rng.random_range(0..input_buf.len());\n        let mut xof = crate::Hasher::new()\n            .update(&input_buf[..input_len])\n            .finalize_xof();\n        let partial_start = rng.random_range(0..output_buf.len());\n        let partial_end = rng.random_range(partial_start..output_buf.len());\n        xof.fill(&mut output_buf[..partial_start]);\n        xof.fill(&mut output_buf[partial_start..partial_end]);\n        xof.fill(&mut output_buf[partial_end..]);\n\n        let mut reference_buf = [0; 31 * CHUNK_LEN];\n        let mut reference_hasher = reference_impl::Hasher::new();\n        reference_hasher.update(&input_buf[..input_len]);\n        reference_hasher.finalize(&mut reference_buf);\n\n        assert_eq!(reference_buf, output_buf);\n    }\n}\n\n#[test]\nfn test_xof_seek() {\n    let mut out = [0; 533];\n    let mut hasher = crate::Hasher::new();\n    hasher.update(b\"foo\");\n    hasher.finalize_xof().fill(&mut out);\n    assert_eq!(hasher.finalize().as_bytes(), &out[0..32]);\n\n    let mut reader = hasher.finalize_xof();\n    reader.set_position(303);\n    let mut out2 = [0; 102];\n    reader.fill(&mut out2);\n    assert_eq!(&out[303..][..102], &out2[..]);\n\n    #[cfg(feature = \"std\")]\n    {\n        use std::io::prelude::*;\n        let mut reader = hasher.finalize_xof();\n        reader.seek(std::io::SeekFrom::Start(303)).unwrap();\n        let mut out3 = Vec::new();\n        reader.by_ref().take(102).read_to_end(&mut out3).unwrap();\n        assert_eq!(&out[303..][..102], &out3[..]);\n\n        assert_eq!(\n            reader.seek(std::io::SeekFrom::Current(0)).unwrap(),\n            303 + 102\n        );\n        reader.seek(std::io::SeekFrom::Current(-5)).unwrap();\n        assert_eq!(\n            reader.seek(std::io::SeekFrom::Current(0)).unwrap(),\n            303 + 102 - 5\n        );\n        let mut out4 = [0; 17];\n        assert_eq!(reader.read(&mut out4).unwrap(), 17);\n        assert_eq!(&out[303 + 102 - 5..][..17], &out4[..]);\n        assert_eq!(\n            reader.seek(std::io::SeekFrom::Current(0)).unwrap(),\n            303 + 102 - 5 + 17\n        );\n        assert!(reader.seek(std::io::SeekFrom::End(0)).is_err());\n        assert!(reader.seek(std::io::SeekFrom::Current(-1000)).is_err());\n    }\n}\n\n#[test]\nfn test_msg_schedule_permutation() {\n    let permutation = [2, 6, 3, 10, 7, 0, 4, 13, 1, 11, 12, 5, 9, 14, 15, 8];\n\n    let mut generated = [[0; 16]; 7];\n    generated[0] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];\n\n    for round in 1..7 {\n        for i in 0..16 {\n            generated[round][i] = generated[round - 1][permutation[i]];\n        }\n    }\n\n    assert_eq!(generated, crate::MSG_SCHEDULE);\n}\n\n#[test]\nfn test_reset() {\n    let mut hasher = crate::Hasher::new();\n    hasher.update(&[42; 3 * CHUNK_LEN + 7]);\n    hasher.reset();\n    hasher.update(&[42; CHUNK_LEN + 3]);\n    assert_eq!(hasher.finalize(), crate::hash(&[42; CHUNK_LEN + 3]));\n\n    let key = &[99; crate::KEY_LEN];\n    let mut keyed_hasher = crate::Hasher::new_keyed(key);\n    keyed_hasher.update(&[42; 3 * CHUNK_LEN + 7]);\n    keyed_hasher.reset();\n    keyed_hasher.update(&[42; CHUNK_LEN + 3]);\n    assert_eq!(\n        keyed_hasher.finalize(),\n        crate::keyed_hash(key, &[42; CHUNK_LEN + 3]),\n    );\n\n    let context = \"BLAKE3 2020-02-12 10:20:58 reset test\";\n    let mut kdf = crate::Hasher::new_derive_key(context);\n    kdf.update(&[42; 3 * CHUNK_LEN + 7]);\n    kdf.reset();\n    kdf.update(&[42; CHUNK_LEN + 3]);\n    let expected = crate::derive_key(context, &[42; CHUNK_LEN + 3]);\n    assert_eq!(kdf.finalize(), expected);\n}\n\n#[test]\nfn test_hex_encoding_decoding() {\n    let digest_str = \"04e0bb39f30b1a3feb89f536c93be15055482df748674b00d26e5a75777702e9\";\n    let mut hasher = crate::Hasher::new();\n    hasher.update(b\"foo\");\n    let digest = hasher.finalize();\n    assert_eq!(digest.to_hex().as_str(), digest_str);\n    #[cfg(feature = \"std\")]\n    assert_eq!(digest.to_string(), digest_str);\n\n    // Test round trip\n    let digest = crate::Hash::from_hex(digest_str).unwrap();\n    assert_eq!(digest.to_hex().as_str(), digest_str);\n\n    // Test uppercase\n    let digest = crate::Hash::from_hex(digest_str.to_uppercase()).unwrap();\n    assert_eq!(digest.to_hex().as_str(), digest_str);\n\n    // Test string parsing via FromStr\n    let digest: crate::Hash = digest_str.parse().unwrap();\n    assert_eq!(digest.to_hex().as_str(), digest_str);\n\n    // Test errors\n    let bad_len = \"04e0bb39f30b1\";\n    let _result = crate::Hash::from_hex(bad_len).unwrap_err();\n    #[cfg(feature = \"std\")]\n    assert_eq!(_result.to_string(), \"expected 64 hex bytes, received 13\");\n\n    let bad_char = \"Z4e0bb39f30b1a3feb89f536c93be15055482df748674b00d26e5a75777702e9\";\n    let _result = crate::Hash::from_hex(bad_char).unwrap_err();\n    #[cfg(feature = \"std\")]\n    assert_eq!(_result.to_string(), \"invalid hex character: 'Z'\");\n\n    let _result = crate::Hash::from_hex([128; 64]).unwrap_err();\n    #[cfg(feature = \"std\")]\n    assert_eq!(_result.to_string(), \"invalid hex character: 0x80\");\n}\n\n// This test is a mimized failure case for the Windows SSE2 bug described in\n// https://github.com/BLAKE3-team/BLAKE3/issues/206.\n//\n// Before that issue was fixed, this test would fail on Windows in the following configuration:\n//\n//     cargo test --features=no_avx512,no_avx2,no_sse41 --release\n//\n// Bugs like this one (stomping on a caller's register) are very sensitive to the details of\n// surrounding code, so it's not especially likely that this test will catch another bug (or even\n// the same bug) in the future. Still, there's no harm in keeping it.\n#[test]\nfn test_issue_206_windows_sse2() {\n    // This stupid loop has to be here to trigger the bug. I don't know why.\n    for _ in &[0] {\n        // The length 65 (two blocks) is significant. It doesn't repro with 64 (one block). It also\n        // doesn't repro with an all-zero input.\n        let input = &[0xff; 65];\n        let expected_hash = [\n            183, 235, 50, 217, 156, 24, 190, 219, 2, 216, 176, 255, 224, 53, 28, 95, 57, 148, 179,\n            245, 162, 90, 37, 121, 0, 142, 219, 62, 234, 204, 225, 161,\n        ];\n\n        // This throwaway call has to be here to trigger the bug.\n        crate::Hasher::new().update(input);\n\n        // This assert fails when the bug is triggered.\n        assert_eq!(crate::Hasher::new().update(input).finalize(), expected_hash);\n    }\n}\n\n#[test]\nfn test_hash_conversions() {\n    let bytes1 = [42; 32];\n    let hash1: crate::Hash = bytes1.into();\n    let bytes2: [u8; 32] = hash1.into();\n    assert_eq!(bytes1, bytes2);\n\n    let bytes3 = *hash1.as_bytes();\n    assert_eq!(bytes1, bytes3);\n\n    let hash2 = crate::Hash::from_bytes(bytes1);\n    assert_eq!(hash1, hash2);\n\n    let hex = hash1.to_hex();\n    let hash3 = crate::Hash::from_hex(hex.as_bytes()).unwrap();\n    assert_eq!(hash1, hash3);\n\n    let slice1: &[u8] = bytes1.as_slice();\n    let hash4 = crate::Hash::from_slice(slice1).expect(\"correct length\");\n    assert_eq!(hash1, hash4);\n\n    assert!(crate::Hash::from_slice(&[]).is_err());\n    assert!(crate::Hash::from_slice(&[42]).is_err());\n    assert!(crate::Hash::from_slice([42; 31].as_slice()).is_err());\n    assert!(crate::Hash::from_slice([42; 33].as_slice()).is_err());\n    assert!(crate::Hash::from_slice([42; 100].as_slice()).is_err());\n}\n\n#[test]\nconst fn test_hash_const_conversions() {\n    let bytes = [42; 32];\n    let hash = crate::Hash::from_bytes(bytes);\n    _ = hash.as_bytes();\n}\n\n#[cfg(feature = \"zeroize\")]\n#[test]\nfn test_zeroize() {\n    use zeroize::Zeroize;\n\n    let mut hash = crate::Hash([42; 32]);\n    hash.zeroize();\n    assert_eq!(hash.0, [0u8; 32]);\n\n    let mut hasher = crate::Hasher {\n        chunk_state: crate::ChunkState {\n            cv: [42; 8],\n            chunk_counter: 42,\n            buf: [42; 64],\n            buf_len: 42,\n            blocks_compressed: 42,\n            flags: 42,\n            platform: crate::Platform::Portable,\n        },\n        initial_chunk_counter: 42,\n        key: [42; 8],\n        cv_stack: [[42; 32]; { crate::MAX_DEPTH + 1 }].into(),\n    };\n    hasher.zeroize();\n    assert_eq!(hasher.chunk_state.cv, [0; 8]);\n    assert_eq!(hasher.chunk_state.chunk_counter, 0);\n    assert_eq!(hasher.chunk_state.buf, [0; 64]);\n    assert_eq!(hasher.chunk_state.buf_len, 0);\n    assert_eq!(hasher.chunk_state.blocks_compressed, 0);\n    assert_eq!(hasher.chunk_state.flags, 0);\n    assert!(matches!(\n        hasher.chunk_state.platform,\n        crate::Platform::Portable\n    ));\n    assert_eq!(hasher.initial_chunk_counter, 0);\n    assert_eq!(hasher.key, [0; 8]);\n    assert_eq!(&*hasher.cv_stack, &[[0u8; 32]; 0]);\n\n    let mut output_reader = crate::OutputReader {\n        inner: crate::Output {\n            input_chaining_value: [42; 8],\n            block: [42; 64],\n            counter: 42,\n            block_len: 42,\n            flags: 42,\n            platform: crate::Platform::Portable,\n        },\n        position_within_block: 42,\n    };\n\n    output_reader.zeroize();\n    assert_eq!(output_reader.inner.input_chaining_value, [0; 8]);\n    assert_eq!(output_reader.inner.block, [0; 64]);\n    assert_eq!(output_reader.inner.counter, 0);\n    assert_eq!(output_reader.inner.block_len, 0);\n    assert_eq!(output_reader.inner.flags, 0);\n    assert!(matches!(\n        output_reader.inner.platform,\n        crate::Platform::Portable\n    ));\n    assert_eq!(output_reader.position_within_block, 0);\n}\n\n#[test]\n#[cfg(feature = \"std\")]\nfn test_update_reader() -> Result<(), std::io::Error> {\n    // This is a brief test, since update_reader() is mostly a wrapper around update(), which already\n    // has substantial testing.\n    let mut input = vec![0; 1_000_000];\n    paint_test_input(&mut input);\n    assert_eq!(\n        crate::Hasher::new().update_reader(&input[..])?.finalize(),\n        crate::hash(&input),\n    );\n    Ok(())\n}\n\n#[test]\n#[cfg(feature = \"std\")]\nfn test_update_reader_interrupted() -> std::io::Result<()> {\n    use std::io;\n    struct InterruptingReader<'a> {\n        already_interrupted: bool,\n        slice: &'a [u8],\n    }\n    impl<'a> InterruptingReader<'a> {\n        fn new(slice: &'a [u8]) -> Self {\n            Self {\n                already_interrupted: false,\n                slice,\n            }\n        }\n    }\n    impl<'a> io::Read for InterruptingReader<'a> {\n        fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {\n            if !self.already_interrupted {\n                self.already_interrupted = true;\n                return Err(io::Error::from(io::ErrorKind::Interrupted));\n            }\n            let take = std::cmp::min(self.slice.len(), buf.len());\n            buf[..take].copy_from_slice(&self.slice[..take]);\n            self.slice = &self.slice[take..];\n            Ok(take)\n        }\n    }\n\n    let input = b\"hello world\";\n    let mut reader = InterruptingReader::new(input);\n    let mut hasher = crate::Hasher::new();\n    hasher.update_reader(&mut reader)?;\n    assert_eq!(hasher.finalize(), crate::hash(input));\n    Ok(())\n}\n\n#[test]\n#[cfg(feature = \"mmap\")]\n// NamedTempFile isn't Miri-compatible\n#[cfg(not(miri))]\nfn test_mmap() -> Result<(), std::io::Error> {\n    // This is a brief test, since update_mmap() is mostly a wrapper around update(), which already\n    // has substantial testing.\n    use std::io::prelude::*;\n    let mut input = vec![0; 1_000_000];\n    paint_test_input(&mut input);\n    let mut tempfile = tempfile::NamedTempFile::new()?;\n    tempfile.write_all(&input)?;\n    tempfile.flush()?;\n    assert_eq!(\n        crate::Hasher::new()\n            .update_mmap(tempfile.path())?\n            .finalize(),\n        crate::hash(&input),\n    );\n    Ok(())\n}\n\n#[test]\n#[cfg(feature = \"mmap\")]\n#[cfg(target_os = \"linux\")]\nfn test_mmap_virtual_file() -> Result<(), std::io::Error> {\n    // Virtual files like /proc/version can't be mmapped, because their contents don't actually\n    // exist anywhere in memory. Make sure we fall back to regular file IO in these cases.\n    // Currently this is handled with a length check, where the assumption is that virtual files\n    // will always report length 0. If that assumption ever breaks, hopefully this test will catch\n    // it.\n    let virtual_filepath = \"/proc/version\";\n    let mut mmap_hasher = crate::Hasher::new();\n    // We'll fail right here if the fallback doesn't work.\n    mmap_hasher.update_mmap(virtual_filepath)?;\n    let mut read_hasher = crate::Hasher::new();\n    read_hasher.update_reader(std::fs::File::open(virtual_filepath)?)?;\n    assert_eq!(mmap_hasher.finalize(), read_hasher.finalize());\n    Ok(())\n}\n\n#[test]\n#[cfg(feature = \"mmap\")]\n#[cfg(feature = \"rayon\")]\n// NamedTempFile isn't Miri-compatible\n#[cfg(not(miri))]\nfn test_mmap_rayon() -> Result<(), std::io::Error> {\n    // This is a brief test, since update_mmap_rayon() is mostly a wrapper around update_rayon(),\n    // which already has substantial testing.\n    use std::io::prelude::*;\n    let mut input = vec![0; 1_000_000];\n    paint_test_input(&mut input);\n    let mut tempfile = tempfile::NamedTempFile::new()?;\n    tempfile.write_all(&input)?;\n    tempfile.flush()?;\n    assert_eq!(\n        crate::Hasher::new()\n            .update_mmap_rayon(tempfile.path())?\n            .finalize(),\n        crate::hash(&input),\n    );\n    Ok(())\n}\n\n#[test]\n#[cfg(feature = \"std\")]\n#[cfg(feature = \"serde\")]\nfn test_serde() {\n    // Henrik suggested that we use 0xfe / 254 for byte test data instead of 0xff / 255, due to the\n    // fact that 0xfe is not a well formed CBOR item.\n    let hash: crate::Hash = [0xfe; 32].into();\n\n    let json = serde_json::to_string(&hash).unwrap();\n    assert_eq!(\n        json,\n        \"[254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254]\",\n    );\n    let hash2: crate::Hash = serde_json::from_str(&json).unwrap();\n    assert_eq!(hash, hash2);\n\n    let mut cbor = Vec::<u8>::new();\n    ciborium::into_writer(&hash, &mut cbor).unwrap();\n    assert_eq!(\n        cbor,\n        [\n            0x98, 0x20, 0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe,\n            0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe,\n            0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe,\n            0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe,\n            0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe, 0x18, 0xfe,\n        ]\n    );\n    let hash_from_cbor: crate::Hash = ciborium::from_reader(&cbor[..]).unwrap();\n    assert_eq!(hash_from_cbor, hash);\n\n    // Version 1.5.2 of this crate changed the default serialization format to a bytestring\n    // (instead of an array/list) to save bytes on the wire. That was a backwards compatibility\n    // mistake for non-self-describing formats, and it's been reverted. Since some small number of\n    // serialized bytestrings will probably exist forever in the wild, we shold test that we can\n    // still deserialize these from self-describing formats.\n    let bytestring_cbor: &[u8] = &[\n        0x58, 0x20, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,\n        0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,\n        0xfe, 0xfe, 0xfe, 0xfe,\n    ];\n    let hash_from_bytestring_cbor: crate::Hash = ciborium::from_reader(bytestring_cbor).unwrap();\n    assert_eq!(hash_from_bytestring_cbor, hash);\n}\n\n// `cargo +nightly miri test` currently works, but it takes forever, because some of our test\n// inputs are quite large. Most of our unsafe code is platform specific and incompatible with Miri\n// anyway, but we'd like it to be possible for callers to run their own tests under Miri, assuming\n// they don't use incompatible features like Rayon or mmap. This test should get reasonable\n// coverage of our public API without using any large inputs, so we can run it in CI and catch\n// obvious breaks. (For example, constant_time_eq is not compatible with Miri.)\n#[test]\nfn test_miri_smoketest() {\n    let mut hasher = crate::Hasher::new_derive_key(\"Miri smoketest\");\n    hasher.update(b\"foo\");\n    #[cfg(feature = \"std\")]\n    hasher.update_reader(&b\"bar\"[..]).unwrap();\n    assert_eq!(hasher.finalize(), hasher.finalize());\n    let mut reader = hasher.finalize_xof();\n    reader.set_position(999999);\n    reader.fill(&mut [0]);\n}\n\n// I had to move these tests out of the deprecated guts module, because leaving them there causes\n// an un-silenceable warning: https://github.com/rust-lang/rust/issues/47238\n#[cfg(test)]\n#[allow(deprecated)]\nmod guts_tests {\n    use crate::guts::*;\n\n    #[test]\n    fn test_chunk() {\n        assert_eq!(\n            crate::hash(b\"foo\"),\n            ChunkState::new(0).update(b\"foo\").finalize(true)\n        );\n    }\n\n    #[test]\n    fn test_parents() {\n        let mut hasher = crate::Hasher::new();\n        let mut buf = [0; crate::CHUNK_LEN];\n\n        buf[0] = 'a' as u8;\n        hasher.update(&buf);\n        let chunk0_cv = ChunkState::new(0).update(&buf).finalize(false);\n\n        buf[0] = 'b' as u8;\n        hasher.update(&buf);\n        let chunk1_cv = ChunkState::new(1).update(&buf).finalize(false);\n\n        hasher.update(b\"c\");\n        let chunk2_cv = ChunkState::new(2).update(b\"c\").finalize(false);\n\n        let parent = parent_cv(&chunk0_cv, &chunk1_cv, false);\n        let root = parent_cv(&parent, &chunk2_cv, true);\n        assert_eq!(hasher.finalize(), root);\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/src/traits.rs",
    "content": "//! Implementations of commonly used traits like `Digest` and `Mac` from the\n//! [`digest`](https://crates.io/crates/digest) crate.\n\npub use digest;\n\nuse crate::{Hasher, OutputReader};\nuse digest::crypto_common;\nuse digest::generic_array::{typenum::U32, typenum::U64, GenericArray};\n\nimpl digest::HashMarker for Hasher {}\n\nimpl digest::Update for Hasher {\n    #[inline]\n    fn update(&mut self, data: &[u8]) {\n        self.update(data);\n    }\n}\n\nimpl digest::Reset for Hasher {\n    #[inline]\n    fn reset(&mut self) {\n        self.reset(); // the inherent method\n    }\n}\n\nimpl digest::OutputSizeUser for Hasher {\n    type OutputSize = U32;\n}\n\nimpl digest::FixedOutput for Hasher {\n    #[inline]\n    fn finalize_into(self, out: &mut GenericArray<u8, Self::OutputSize>) {\n        out.copy_from_slice(self.finalize().as_bytes());\n    }\n}\n\nimpl digest::FixedOutputReset for Hasher {\n    #[inline]\n    fn finalize_into_reset(&mut self, out: &mut GenericArray<u8, Self::OutputSize>) {\n        out.copy_from_slice(self.finalize().as_bytes());\n        self.reset();\n    }\n}\n\nimpl digest::ExtendableOutput for Hasher {\n    type Reader = OutputReader;\n\n    #[inline]\n    fn finalize_xof(self) -> Self::Reader {\n        Hasher::finalize_xof(&self)\n    }\n}\n\nimpl digest::ExtendableOutputReset for Hasher {\n    #[inline]\n    fn finalize_xof_reset(&mut self) -> Self::Reader {\n        let reader = Hasher::finalize_xof(self);\n        self.reset();\n        reader\n    }\n}\n\nimpl digest::XofReader for OutputReader {\n    #[inline]\n    fn read(&mut self, buffer: &mut [u8]) {\n        self.fill(buffer);\n    }\n}\n\nimpl crypto_common::KeySizeUser for Hasher {\n    type KeySize = U32;\n}\n\nimpl crypto_common::BlockSizeUser for Hasher {\n    type BlockSize = U64;\n}\n\nimpl digest::MacMarker for Hasher {}\n\nimpl digest::KeyInit for Hasher {\n    #[inline]\n    fn new(key: &digest::Key<Self>) -> Self {\n        let key_bytes: [u8; 32] = (*key).into();\n        Hasher::new_keyed(&key_bytes)\n    }\n}\n\n#[cfg(test)]\nmod test {\n    use super::*;\n\n    #[test]\n    fn test_digest_traits() {\n        // Inherent methods.\n        let mut hasher1 = crate::Hasher::new();\n        hasher1.update(b\"foo\");\n        hasher1.update(b\"bar\");\n        hasher1.update(b\"baz\");\n        let out1 = hasher1.finalize();\n        let mut xof1 = [0; 301];\n        hasher1.finalize_xof().fill(&mut xof1);\n        assert_eq!(out1.as_bytes(), &xof1[..32]);\n\n        // Trait implementations.\n        let mut hasher2: crate::Hasher = digest::Digest::new();\n        digest::Digest::update(&mut hasher2, b\"xxx\");\n        digest::Digest::reset(&mut hasher2);\n        digest::Digest::update(&mut hasher2, b\"foo\");\n        digest::Digest::update(&mut hasher2, b\"bar\");\n        digest::Digest::update(&mut hasher2, b\"baz\");\n        let out2 = digest::Digest::finalize(hasher2.clone());\n        let mut xof2 = [0; 301];\n        digest::XofReader::read(\n            &mut digest::ExtendableOutput::finalize_xof(hasher2.clone()),\n            &mut xof2,\n        );\n        assert_eq!(out1.as_bytes(), &out2[..]);\n        assert_eq!(xof1[..], xof2[..]);\n\n        // Again with the resetting variants.\n        let mut hasher3: crate::Hasher = digest::Digest::new();\n        digest::Digest::update(&mut hasher3, b\"foobarbaz\");\n        let mut out3 = [0; 32];\n        digest::FixedOutputReset::finalize_into_reset(\n            &mut hasher3,\n            GenericArray::from_mut_slice(&mut out3),\n        );\n        digest::Digest::update(&mut hasher3, b\"foobarbaz\");\n        let mut out4 = [0; 32];\n        digest::FixedOutputReset::finalize_into_reset(\n            &mut hasher3,\n            GenericArray::from_mut_slice(&mut out4),\n        );\n        digest::Digest::update(&mut hasher3, b\"foobarbaz\");\n        let mut xof3 = [0; 301];\n        digest::XofReader::read(\n            &mut digest::ExtendableOutputReset::finalize_xof_reset(&mut hasher3),\n            &mut xof3,\n        );\n        digest::Digest::update(&mut hasher3, b\"foobarbaz\");\n        let mut xof4 = [0; 301];\n        digest::XofReader::read(\n            &mut digest::ExtendableOutputReset::finalize_xof_reset(&mut hasher3),\n            &mut xof4,\n        );\n        assert_eq!(out1.as_bytes(), &out3[..]);\n        assert_eq!(out1.as_bytes(), &out4[..]);\n        assert_eq!(xof1[..], xof3[..]);\n        assert_eq!(xof1[..], xof4[..]);\n    }\n\n    #[test]\n    fn test_mac_trait() {\n        // Inherent methods.\n        let key = b\"some super secret key bytes fooo\";\n        let mut hasher1 = crate::Hasher::new_keyed(key);\n        hasher1.update(b\"foo\");\n        hasher1.update(b\"bar\");\n        hasher1.update(b\"baz\");\n        let out1 = hasher1.finalize();\n\n        // Trait implementation.\n        let generic_key = (*key).into();\n        let mut hasher2: crate::Hasher = digest::Mac::new(&generic_key);\n        digest::Mac::update(&mut hasher2, b\"xxx\");\n        digest::Mac::reset(&mut hasher2);\n        digest::Mac::update(&mut hasher2, b\"foo\");\n        digest::Mac::update(&mut hasher2, b\"bar\");\n        digest::Mac::update(&mut hasher2, b\"baz\");\n        let out2 = digest::Mac::finalize(hasher2);\n        assert_eq!(out1.as_bytes(), out2.into_bytes().as_slice());\n    }\n\n    fn expected_hmac_blake3(key: &[u8], input: &[u8]) -> [u8; 32] {\n        // See https://en.wikipedia.org/wiki/HMAC.\n        let key_hash;\n        let key_prime = if key.len() <= 64 {\n            key\n        } else {\n            key_hash = *crate::hash(key).as_bytes();\n            &key_hash\n        };\n        let mut ipad = [0x36; 64];\n        let mut opad = [0x5c; 64];\n        for i in 0..key_prime.len() {\n            ipad[i] ^= key_prime[i];\n            opad[i] ^= key_prime[i];\n        }\n        let mut inner_state = crate::Hasher::new();\n        inner_state.update(&ipad);\n        inner_state.update(input);\n        let mut outer_state = crate::Hasher::new();\n        outer_state.update(&opad);\n        outer_state.update(inner_state.finalize().as_bytes());\n        outer_state.finalize().into()\n    }\n\n    #[test]\n    fn test_hmac_compatibility() {\n        use hmac::{Mac, SimpleHmac};\n\n        // Test a short key.\n        let mut x = SimpleHmac::<Hasher>::new_from_slice(b\"key\").unwrap();\n        hmac::digest::Update::update(&mut x, b\"data\");\n        let output = x.finalize().into_bytes();\n        assert_ne!(output.len(), 0);\n        let expected = expected_hmac_blake3(b\"key\", b\"data\");\n        assert_eq!(expected, output.as_ref());\n\n        // Test a range of key and data lengths, particularly to exercise the long-key logic.\n        let mut input_bytes = [0; crate::test::TEST_CASES_MAX];\n        crate::test::paint_test_input(&mut input_bytes);\n        for &input_len in crate::test::TEST_CASES {\n            #[cfg(feature = \"std\")]\n            dbg!(input_len);\n            let input = &input_bytes[..input_len];\n\n            let mut x = SimpleHmac::<Hasher>::new_from_slice(input).unwrap();\n            hmac::digest::Update::update(&mut x, input);\n            let output = x.finalize().into_bytes();\n            assert_ne!(output.len(), 0);\n\n            let expected = expected_hmac_blake3(input, input);\n            assert_eq!(expected, output.as_ref());\n        }\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/src/wasm32_simd.rs",
    "content": "/*\n * This code is based on rust_sse2.rs of the same distribution, and is subject to further improvements.\n * Some comments are left intact even if their applicability is questioned.\n *\n * Performance measurements with a primitive benchmark with ~16Kb of data:\n *\n * | M1 native     | 11,610 ns |\n * | M1 Wasm SIMD  | 13,355 ns |\n * | M1 Wasm       | 22,037 ns |\n * | x64 native    |  6,713 ns |\n * | x64 Wasm SIMD | 11,985 ns |\n * | x64 Wasm      | 25,978 ns |\n *\n * wasmtime v12.0.1 was used on both platforms.\n */\n\nuse core::arch::wasm32::*;\n\nuse crate::{\n    counter_high, counter_low, CVBytes, CVWords, IncrementCounter, BLOCK_LEN, IV, MSG_SCHEDULE,\n    OUT_LEN,\n};\nuse arrayref::{array_mut_ref, array_ref, mut_array_refs};\n\npub const DEGREE: usize = 4;\n\n#[inline(always)]\nunsafe fn loadu(src: *const u8) -> v128 {\n    // This is an unaligned load, so the pointer cast is allowed.\n    v128_load(src as *const v128)\n}\n\n#[inline(always)]\nunsafe fn storeu(src: v128, dest: *mut u8) {\n    // This is an unaligned store, so the pointer cast is allowed.\n    v128_store(dest as *mut v128, src)\n}\n\n#[inline(always)]\nfn add(a: v128, b: v128) -> v128 {\n    i32x4_add(a, b)\n}\n\n#[inline(always)]\nfn xor(a: v128, b: v128) -> v128 {\n    v128_xor(a, b)\n}\n\n#[inline(always)]\nfn set1(x: u32) -> v128 {\n    i32x4_splat(x as i32)\n}\n\n#[inline(always)]\nfn set4(a: u32, b: u32, c: u32, d: u32) -> v128 {\n    i32x4(a as i32, b as i32, c as i32, d as i32)\n}\n\n// These rotations are the \"simple/shifts version\". For the\n// \"complicated/shuffles version\", see\n// https://github.com/sneves/blake2-avx2/blob/b3723921f668df09ece52dcd225a36d4a4eea1d9/blake2s-common.h#L63-L66.\n// For a discussion of the tradeoffs, see\n// https://github.com/sneves/blake2-avx2/pull/5. Due to an LLVM bug\n// (https://bugs.llvm.org/show_bug.cgi?id=44379), this version performs better\n// on recent x86 chips.\n#[inline(always)]\nfn rot16(a: v128) -> v128 {\n    v128_or(u32x4_shr(a, 16), u32x4_shl(a, 32 - 16))\n}\n\n#[inline(always)]\nfn rot12(a: v128) -> v128 {\n    v128_or(u32x4_shr(a, 12), u32x4_shl(a, 32 - 12))\n}\n\n#[inline(always)]\nfn rot8(a: v128) -> v128 {\n    v128_or(u32x4_shr(a, 8), u32x4_shl(a, 32 - 8))\n}\n\n#[inline(always)]\nfn rot7(a: v128) -> v128 {\n    v128_or(u32x4_shr(a, 7), u32x4_shl(a, 32 - 7))\n}\n\n#[inline(always)]\nfn g1(row0: &mut v128, row1: &mut v128, row2: &mut v128, row3: &mut v128, m: v128) {\n    *row0 = add(add(*row0, m), *row1);\n    *row3 = xor(*row3, *row0);\n    *row3 = rot16(*row3);\n    *row2 = add(*row2, *row3);\n    *row1 = xor(*row1, *row2);\n    *row1 = rot12(*row1);\n}\n\n#[inline(always)]\nfn g2(row0: &mut v128, row1: &mut v128, row2: &mut v128, row3: &mut v128, m: v128) {\n    *row0 = add(add(*row0, m), *row1);\n    *row3 = xor(*row3, *row0);\n    *row3 = rot8(*row3);\n    *row2 = add(*row2, *row3);\n    *row1 = xor(*row1, *row2);\n    *row1 = rot7(*row1);\n}\n\n// It could be a function, but artimetics in const generics is too limited yet.\nmacro_rules! shuffle {\n    ($a: expr, $b: expr, $z:expr, $y:expr, $x:expr, $w:expr) => {\n        i32x4_shuffle::<{ $w }, { $x }, { $y + 4 }, { $z + 4 }>($a, $b)\n    };\n}\n\n#[inline(always)]\nfn unpacklo_epi64(a: v128, b: v128) -> v128 {\n    i64x2_shuffle::<0, 2>(a, b)\n}\n\n#[inline(always)]\nfn unpackhi_epi64(a: v128, b: v128) -> v128 {\n    i64x2_shuffle::<1, 3>(a, b)\n}\n\n#[inline(always)]\nfn unpacklo_epi32(a: v128, b: v128) -> v128 {\n    i32x4_shuffle::<0, 4, 1, 5>(a, b)\n}\n\n#[inline(always)]\nfn unpackhi_epi32(a: v128, b: v128) -> v128 {\n    i32x4_shuffle::<2, 6, 3, 7>(a, b)\n}\n\n#[inline(always)]\nfn shuffle_epi32<const I3: usize, const I2: usize, const I1: usize, const I0: usize>(\n    a: v128,\n) -> v128 {\n    // Please note that generic arguments in delcaration and imlementation are in\n    // different order.\n    // second arg is actually ignored.\n    i32x4_shuffle::<I0, I1, I2, I3>(a, a)\n}\n\n#[inline(always)]\nfn blend_epi16(a: v128, b: v128, imm8: i32) -> v128 {\n    // imm8 is always constant; it allows to implement this function with\n    // i16x8_shuffle.  However, it is marginally slower on x64.\n    let bits = i16x8(0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80);\n    let mut mask = i16x8_splat(imm8 as i16);\n    mask = v128_and(mask, bits);\n    mask = i16x8_eq(mask, bits);\n    // The swapped argument order is equivalent to mask negation.\n    v128_bitselect(b, a, mask)\n}\n\n// Note the optimization here of leaving row1 as the unrotated row, rather than\n// row0. All the message loads below are adjusted to compensate for this. See\n// discussion at https://github.com/sneves/blake2-avx2/pull/4\n#[inline(always)]\nfn diagonalize(row0: &mut v128, row2: &mut v128, row3: &mut v128) {\n    *row0 = shuffle_epi32::<2, 1, 0, 3>(*row0);\n    *row3 = shuffle_epi32::<1, 0, 3, 2>(*row3);\n    *row2 = shuffle_epi32::<0, 3, 2, 1>(*row2);\n}\n\n#[inline(always)]\nfn undiagonalize(row0: &mut v128, row2: &mut v128, row3: &mut v128) {\n    *row0 = shuffle_epi32::<0, 3, 2, 1>(*row0);\n    *row3 = shuffle_epi32::<1, 0, 3, 2>(*row3);\n    *row2 = shuffle_epi32::<2, 1, 0, 3>(*row2);\n}\n\n#[inline(always)]\nfn compress_pre(\n    cv: &CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n) -> [v128; 4] {\n    // safe because CVWords is [u32; 8]\n    let row0 = &mut unsafe { loadu(cv.as_ptr().add(0) as *const u8) };\n    let row1 = &mut unsafe { loadu(cv.as_ptr().add(4) as *const u8) };\n    let row2 = &mut set4(IV[0], IV[1], IV[2], IV[3]);\n    let row3 = &mut set4(\n        counter_low(counter),\n        counter_high(counter),\n        block_len as u32,\n        flags as u32,\n    );\n\n    // safe because block is &[u8; 64]\n    let mut m0 = unsafe { loadu(block.as_ptr().add(0 * 4 * DEGREE)) };\n    let mut m1 = unsafe { loadu(block.as_ptr().add(1 * 4 * DEGREE)) };\n    let mut m2 = unsafe { loadu(block.as_ptr().add(2 * 4 * DEGREE)) };\n    let mut m3 = unsafe { loadu(block.as_ptr().add(3 * 4 * DEGREE)) };\n\n    let mut t0;\n    let mut t1;\n    let mut t2;\n    let mut t3;\n    let mut tt;\n\n    // Round 1. The first round permutes the message words from the original\n    // input order, into the groups that get mixed in parallel.\n    t0 = shuffle!(m0, m1, 2, 0, 2, 0); //  6  4  2  0\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle!(m0, m1, 3, 1, 3, 1); //  7  5  3  1\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = shuffle!(m2, m3, 2, 0, 2, 0); // 14 12 10  8\n    t2 = shuffle_epi32::<2, 1, 0, 3>(t2); // 12 10  8 14\n    g1(row0, row1, row2, row3, t2);\n    t3 = shuffle!(m2, m3, 3, 1, 3, 1); // 15 13 11  9\n    t3 = shuffle_epi32::<2, 1, 0, 3>(t3); // 13 11  9 15\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n    m0 = t0;\n    m1 = t1;\n    m2 = t2;\n    m3 = t3;\n\n    // Round 2. This round and all following rounds apply a fixed permutation\n    // to the message words from the round before.\n    t0 = shuffle!(m0, m1, 3, 1, 1, 2);\n    t0 = shuffle_epi32::<0, 3, 2, 1>(t0);\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle!(m2, m3, 3, 3, 2, 2);\n    tt = shuffle_epi32::<0, 0, 3, 3>(m0);\n    t1 = blend_epi16(tt, t1, 0xCC);\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = unpacklo_epi64(m3, m1);\n    tt = blend_epi16(t2, m2, 0xC0);\n    t2 = shuffle_epi32::<1, 3, 2, 0>(tt);\n    g1(row0, row1, row2, row3, t2);\n    t3 = unpackhi_epi32(m1, m3);\n    tt = unpacklo_epi32(m2, t3);\n    t3 = shuffle_epi32::<0, 1, 3, 2>(tt);\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n    m0 = t0;\n    m1 = t1;\n    m2 = t2;\n    m3 = t3;\n\n    // Round 3\n    t0 = shuffle!(m0, m1, 3, 1, 1, 2);\n    t0 = shuffle_epi32::<0, 3, 2, 1>(t0);\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle!(m2, m3, 3, 3, 2, 2);\n    tt = shuffle_epi32::<0, 0, 3, 3>(m0);\n    t1 = blend_epi16(tt, t1, 0xCC);\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = unpacklo_epi64(m3, m1);\n    tt = blend_epi16(t2, m2, 0xC0);\n    t2 = shuffle_epi32::<1, 3, 2, 0>(tt);\n    g1(row0, row1, row2, row3, t2);\n    t3 = unpackhi_epi32(m1, m3);\n    tt = unpacklo_epi32(m2, t3);\n    t3 = shuffle_epi32::<0, 1, 3, 2>(tt);\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n    m0 = t0;\n    m1 = t1;\n    m2 = t2;\n    m3 = t3;\n\n    // Round 4\n    t0 = shuffle!(m0, m1, 3, 1, 1, 2);\n    t0 = shuffle_epi32::<0, 3, 2, 1>(t0);\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle!(m2, m3, 3, 3, 2, 2);\n    tt = shuffle_epi32::<0, 0, 3, 3>(m0);\n    t1 = blend_epi16(tt, t1, 0xCC);\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = unpacklo_epi64(m3, m1);\n    tt = blend_epi16(t2, m2, 0xC0);\n    t2 = shuffle_epi32::<1, 3, 2, 0>(tt);\n    g1(row0, row1, row2, row3, t2);\n    t3 = unpackhi_epi32(m1, m3);\n    tt = unpacklo_epi32(m2, t3);\n    t3 = shuffle_epi32::<0, 1, 3, 2>(tt);\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n    m0 = t0;\n    m1 = t1;\n    m2 = t2;\n    m3 = t3;\n\n    // Round 5\n    t0 = shuffle!(m0, m1, 3, 1, 1, 2);\n    t0 = shuffle_epi32::<0, 3, 2, 1>(t0);\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle!(m2, m3, 3, 3, 2, 2);\n    tt = shuffle_epi32::<0, 0, 3, 3>(m0);\n    t1 = blend_epi16(tt, t1, 0xCC);\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = unpacklo_epi64(m3, m1);\n    tt = blend_epi16(t2, m2, 0xC0);\n    t2 = shuffle_epi32::<1, 3, 2, 0>(tt);\n    g1(row0, row1, row2, row3, t2);\n    t3 = unpackhi_epi32(m1, m3);\n    tt = unpacklo_epi32(m2, t3);\n    t3 = shuffle_epi32::<0, 1, 3, 2>(tt);\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n    m0 = t0;\n    m1 = t1;\n    m2 = t2;\n    m3 = t3;\n\n    // Round 6\n    t0 = shuffle!(m0, m1, 3, 1, 1, 2);\n    t0 = shuffle_epi32::<0, 3, 2, 1>(t0);\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle!(m2, m3, 3, 3, 2, 2);\n    tt = shuffle_epi32::<0, 0, 3, 3>(m0);\n    t1 = blend_epi16(tt, t1, 0xCC);\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = unpacklo_epi64(m3, m1);\n    tt = blend_epi16(t2, m2, 0xC0);\n    t2 = shuffle_epi32::<1, 3, 2, 0>(tt);\n    g1(row0, row1, row2, row3, t2);\n    t3 = unpackhi_epi32(m1, m3);\n    tt = unpacklo_epi32(m2, t3);\n    t3 = shuffle_epi32::<0, 1, 3, 2>(tt);\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n    m0 = t0;\n    m1 = t1;\n    m2 = t2;\n    m3 = t3;\n\n    // Round 7\n    t0 = shuffle!(m0, m1, 3, 1, 1, 2);\n    t0 = shuffle_epi32::<0, 3, 2, 1>(t0);\n    g1(row0, row1, row2, row3, t0);\n    t1 = shuffle!(m2, m3, 3, 3, 2, 2);\n    tt = shuffle_epi32::<0, 0, 3, 3>(m0);\n    t1 = blend_epi16(tt, t1, 0xCC);\n    g2(row0, row1, row2, row3, t1);\n    diagonalize(row0, row2, row3);\n    t2 = unpacklo_epi64(m3, m1);\n    tt = blend_epi16(t2, m2, 0xC0);\n    t2 = shuffle_epi32::<1, 3, 2, 0>(tt);\n    g1(row0, row1, row2, row3, t2);\n    t3 = unpackhi_epi32(m1, m3);\n    tt = unpacklo_epi32(m2, t3);\n    t3 = shuffle_epi32::<0, 1, 3, 2>(tt);\n    g2(row0, row1, row2, row3, t3);\n    undiagonalize(row0, row2, row3);\n\n    [*row0, *row1, *row2, *row3]\n}\n\n#[target_feature(enable = \"simd128\")]\npub fn compress_in_place(\n    cv: &mut CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n) {\n    let [row0, row1, row2, row3] = compress_pre(cv, block, block_len, counter, flags);\n    // it stores in reversed order...\n    // safe because CVWords is [u32; 8]\n    unsafe {\n        storeu(xor(row0, row2), cv.as_mut_ptr().add(0) as *mut u8);\n        storeu(xor(row1, row3), cv.as_mut_ptr().add(4) as *mut u8);\n    }\n}\n\n#[target_feature(enable = \"simd128\")]\npub fn compress_xof(\n    cv: &CVWords,\n    block: &[u8; BLOCK_LEN],\n    block_len: u8,\n    counter: u64,\n    flags: u8,\n) -> [u8; 64] {\n    let [mut row0, mut row1, mut row2, mut row3] =\n        compress_pre(cv, block, block_len, counter, flags);\n    row0 = xor(row0, row2);\n    row1 = xor(row1, row3);\n    // safe because CVWords is [u32; 8]\n    row2 = xor(row2, unsafe { loadu(cv.as_ptr().add(0) as *const u8) });\n    row3 = xor(row3, unsafe { loadu(cv.as_ptr().add(4) as *const u8) });\n    // It seems to be architecture dependent, but works.\n    // safe because sizes match, and every state of u8 is valid.\n    unsafe { core::mem::transmute([row0, row1, row2, row3]) }\n}\n\n#[inline(always)]\nfn round(v: &mut [v128; 16], m: &[v128; 16], r: usize) {\n    v[0] = add(v[0], m[MSG_SCHEDULE[r][0] as usize]);\n    v[1] = add(v[1], m[MSG_SCHEDULE[r][2] as usize]);\n    v[2] = add(v[2], m[MSG_SCHEDULE[r][4] as usize]);\n    v[3] = add(v[3], m[MSG_SCHEDULE[r][6] as usize]);\n    v[0] = add(v[0], v[4]);\n    v[1] = add(v[1], v[5]);\n    v[2] = add(v[2], v[6]);\n    v[3] = add(v[3], v[7]);\n    v[12] = xor(v[12], v[0]);\n    v[13] = xor(v[13], v[1]);\n    v[14] = xor(v[14], v[2]);\n    v[15] = xor(v[15], v[3]);\n    v[12] = rot16(v[12]);\n    v[13] = rot16(v[13]);\n    v[14] = rot16(v[14]);\n    v[15] = rot16(v[15]);\n    v[8] = add(v[8], v[12]);\n    v[9] = add(v[9], v[13]);\n    v[10] = add(v[10], v[14]);\n    v[11] = add(v[11], v[15]);\n    v[4] = xor(v[4], v[8]);\n    v[5] = xor(v[5], v[9]);\n    v[6] = xor(v[6], v[10]);\n    v[7] = xor(v[7], v[11]);\n    v[4] = rot12(v[4]);\n    v[5] = rot12(v[5]);\n    v[6] = rot12(v[6]);\n    v[7] = rot12(v[7]);\n    v[0] = add(v[0], m[MSG_SCHEDULE[r][1] as usize]);\n    v[1] = add(v[1], m[MSG_SCHEDULE[r][3] as usize]);\n    v[2] = add(v[2], m[MSG_SCHEDULE[r][5] as usize]);\n    v[3] = add(v[3], m[MSG_SCHEDULE[r][7] as usize]);\n    v[0] = add(v[0], v[4]);\n    v[1] = add(v[1], v[5]);\n    v[2] = add(v[2], v[6]);\n    v[3] = add(v[3], v[7]);\n    v[12] = xor(v[12], v[0]);\n    v[13] = xor(v[13], v[1]);\n    v[14] = xor(v[14], v[2]);\n    v[15] = xor(v[15], v[3]);\n    v[12] = rot8(v[12]);\n    v[13] = rot8(v[13]);\n    v[14] = rot8(v[14]);\n    v[15] = rot8(v[15]);\n    v[8] = add(v[8], v[12]);\n    v[9] = add(v[9], v[13]);\n    v[10] = add(v[10], v[14]);\n    v[11] = add(v[11], v[15]);\n    v[4] = xor(v[4], v[8]);\n    v[5] = xor(v[5], v[9]);\n    v[6] = xor(v[6], v[10]);\n    v[7] = xor(v[7], v[11]);\n    v[4] = rot7(v[4]);\n    v[5] = rot7(v[5]);\n    v[6] = rot7(v[6]);\n    v[7] = rot7(v[7]);\n\n    v[0] = add(v[0], m[MSG_SCHEDULE[r][8] as usize]);\n    v[1] = add(v[1], m[MSG_SCHEDULE[r][10] as usize]);\n    v[2] = add(v[2], m[MSG_SCHEDULE[r][12] as usize]);\n    v[3] = add(v[3], m[MSG_SCHEDULE[r][14] as usize]);\n    v[0] = add(v[0], v[5]);\n    v[1] = add(v[1], v[6]);\n    v[2] = add(v[2], v[7]);\n    v[3] = add(v[3], v[4]);\n    v[15] = xor(v[15], v[0]);\n    v[12] = xor(v[12], v[1]);\n    v[13] = xor(v[13], v[2]);\n    v[14] = xor(v[14], v[3]);\n    v[15] = rot16(v[15]);\n    v[12] = rot16(v[12]);\n    v[13] = rot16(v[13]);\n    v[14] = rot16(v[14]);\n    v[10] = add(v[10], v[15]);\n    v[11] = add(v[11], v[12]);\n    v[8] = add(v[8], v[13]);\n    v[9] = add(v[9], v[14]);\n    v[5] = xor(v[5], v[10]);\n    v[6] = xor(v[6], v[11]);\n    v[7] = xor(v[7], v[8]);\n    v[4] = xor(v[4], v[9]);\n    v[5] = rot12(v[5]);\n    v[6] = rot12(v[6]);\n    v[7] = rot12(v[7]);\n    v[4] = rot12(v[4]);\n    v[0] = add(v[0], m[MSG_SCHEDULE[r][9] as usize]);\n    v[1] = add(v[1], m[MSG_SCHEDULE[r][11] as usize]);\n    v[2] = add(v[2], m[MSG_SCHEDULE[r][13] as usize]);\n    v[3] = add(v[3], m[MSG_SCHEDULE[r][15] as usize]);\n    v[0] = add(v[0], v[5]);\n    v[1] = add(v[1], v[6]);\n    v[2] = add(v[2], v[7]);\n    v[3] = add(v[3], v[4]);\n    v[15] = xor(v[15], v[0]);\n    v[12] = xor(v[12], v[1]);\n    v[13] = xor(v[13], v[2]);\n    v[14] = xor(v[14], v[3]);\n    v[15] = rot8(v[15]);\n    v[12] = rot8(v[12]);\n    v[13] = rot8(v[13]);\n    v[14] = rot8(v[14]);\n    v[10] = add(v[10], v[15]);\n    v[11] = add(v[11], v[12]);\n    v[8] = add(v[8], v[13]);\n    v[9] = add(v[9], v[14]);\n    v[5] = xor(v[5], v[10]);\n    v[6] = xor(v[6], v[11]);\n    v[7] = xor(v[7], v[8]);\n    v[4] = xor(v[4], v[9]);\n    v[5] = rot7(v[5]);\n    v[6] = rot7(v[6]);\n    v[7] = rot7(v[7]);\n    v[4] = rot7(v[4]);\n}\n\n#[inline(always)]\nfn transpose_vecs(vecs: &mut [v128; DEGREE]) {\n    // Interleave 32-bit lanes. The low unpack is lanes 00/11 and the high is\n    // 22/33. Note that this doesn't split the vector into two lanes, as the\n    // AVX2 counterparts do.\n    let ab_01 = unpacklo_epi32(vecs[0], vecs[1]);\n    let ab_23 = unpackhi_epi32(vecs[0], vecs[1]);\n    let cd_01 = unpacklo_epi32(vecs[2], vecs[3]);\n    let cd_23 = unpackhi_epi32(vecs[2], vecs[3]);\n\n    // Interleave 64-bit lanes.\n    let abcd_0 = unpacklo_epi64(ab_01, cd_01);\n    let abcd_1 = unpackhi_epi64(ab_01, cd_01);\n    let abcd_2 = unpacklo_epi64(ab_23, cd_23);\n    let abcd_3 = unpackhi_epi64(ab_23, cd_23);\n\n    vecs[0] = abcd_0;\n    vecs[1] = abcd_1;\n    vecs[2] = abcd_2;\n    vecs[3] = abcd_3;\n}\n\n#[inline(always)]\nunsafe fn transpose_msg_vecs(inputs: &[*const u8; DEGREE], block_offset: usize) -> [v128; 16] {\n    let mut vecs = [\n        loadu(inputs[0].add(block_offset + 0 * 4 * DEGREE)),\n        loadu(inputs[1].add(block_offset + 0 * 4 * DEGREE)),\n        loadu(inputs[2].add(block_offset + 0 * 4 * DEGREE)),\n        loadu(inputs[3].add(block_offset + 0 * 4 * DEGREE)),\n        loadu(inputs[0].add(block_offset + 1 * 4 * DEGREE)),\n        loadu(inputs[1].add(block_offset + 1 * 4 * DEGREE)),\n        loadu(inputs[2].add(block_offset + 1 * 4 * DEGREE)),\n        loadu(inputs[3].add(block_offset + 1 * 4 * DEGREE)),\n        loadu(inputs[0].add(block_offset + 2 * 4 * DEGREE)),\n        loadu(inputs[1].add(block_offset + 2 * 4 * DEGREE)),\n        loadu(inputs[2].add(block_offset + 2 * 4 * DEGREE)),\n        loadu(inputs[3].add(block_offset + 2 * 4 * DEGREE)),\n        loadu(inputs[0].add(block_offset + 3 * 4 * DEGREE)),\n        loadu(inputs[1].add(block_offset + 3 * 4 * DEGREE)),\n        loadu(inputs[2].add(block_offset + 3 * 4 * DEGREE)),\n        loadu(inputs[3].add(block_offset + 3 * 4 * DEGREE)),\n    ];\n    let squares = mut_array_refs!(&mut vecs, DEGREE, DEGREE, DEGREE, DEGREE);\n    transpose_vecs(squares.0);\n    transpose_vecs(squares.1);\n    transpose_vecs(squares.2);\n    transpose_vecs(squares.3);\n    vecs\n}\n\n#[inline(always)]\nfn load_counters(counter: u64, increment_counter: IncrementCounter) -> (v128, v128) {\n    let mask = if increment_counter.yes() { !0 } else { 0 };\n    (\n        set4(\n            counter_low(counter + (mask & 0)),\n            counter_low(counter + (mask & 1)),\n            counter_low(counter + (mask & 2)),\n            counter_low(counter + (mask & 3)),\n        ),\n        set4(\n            counter_high(counter + (mask & 0)),\n            counter_high(counter + (mask & 1)),\n            counter_high(counter + (mask & 2)),\n            counter_high(counter + (mask & 3)),\n        ),\n    )\n}\n\n#[target_feature(enable = \"simd128\")]\npub unsafe fn hash4(\n    inputs: &[*const u8; DEGREE],\n    blocks: usize,\n    key: &CVWords,\n    counter: u64,\n    increment_counter: IncrementCounter,\n    flags: u8,\n    flags_start: u8,\n    flags_end: u8,\n    out: &mut [u8; DEGREE * OUT_LEN],\n) {\n    let mut h_vecs = [\n        set1(key[0]),\n        set1(key[1]),\n        set1(key[2]),\n        set1(key[3]),\n        set1(key[4]),\n        set1(key[5]),\n        set1(key[6]),\n        set1(key[7]),\n    ];\n    let (counter_low_vec, counter_high_vec) = load_counters(counter, increment_counter);\n    let mut block_flags = flags | flags_start;\n\n    for block in 0..blocks {\n        if block + 1 == blocks {\n            block_flags |= flags_end;\n        }\n        let block_len_vec = set1(BLOCK_LEN as u32); // full blocks only\n        let block_flags_vec = set1(block_flags as u32);\n        let msg_vecs = transpose_msg_vecs(inputs, block * BLOCK_LEN);\n\n        // The transposed compression function. Note that inlining this\n        // manually here improves compile times by a lot, compared to factoring\n        // it out into its own function and making it #[inline(always)]. Just\n        // guessing, it might have something to do with loop unrolling.\n        let mut v = [\n            h_vecs[0],\n            h_vecs[1],\n            h_vecs[2],\n            h_vecs[3],\n            h_vecs[4],\n            h_vecs[5],\n            h_vecs[6],\n            h_vecs[7],\n            set1(IV[0]),\n            set1(IV[1]),\n            set1(IV[2]),\n            set1(IV[3]),\n            counter_low_vec,\n            counter_high_vec,\n            block_len_vec,\n            block_flags_vec,\n        ];\n        round(&mut v, &msg_vecs, 0);\n        round(&mut v, &msg_vecs, 1);\n        round(&mut v, &msg_vecs, 2);\n        round(&mut v, &msg_vecs, 3);\n        round(&mut v, &msg_vecs, 4);\n        round(&mut v, &msg_vecs, 5);\n        round(&mut v, &msg_vecs, 6);\n        h_vecs[0] = xor(v[0], v[8]);\n        h_vecs[1] = xor(v[1], v[9]);\n        h_vecs[2] = xor(v[2], v[10]);\n        h_vecs[3] = xor(v[3], v[11]);\n        h_vecs[4] = xor(v[4], v[12]);\n        h_vecs[5] = xor(v[5], v[13]);\n        h_vecs[6] = xor(v[6], v[14]);\n        h_vecs[7] = xor(v[7], v[15]);\n\n        block_flags = flags;\n    }\n\n    let squares = mut_array_refs!(&mut h_vecs, DEGREE, DEGREE);\n    transpose_vecs(squares.0);\n    transpose_vecs(squares.1);\n    // The first four vecs now contain the first half of each output, and the\n    // second four vecs contain the second half of each output.\n    storeu(h_vecs[0], out.as_mut_ptr().add(0 * 4 * DEGREE));\n    storeu(h_vecs[4], out.as_mut_ptr().add(1 * 4 * DEGREE));\n    storeu(h_vecs[1], out.as_mut_ptr().add(2 * 4 * DEGREE));\n    storeu(h_vecs[5], out.as_mut_ptr().add(3 * 4 * DEGREE));\n    storeu(h_vecs[2], out.as_mut_ptr().add(4 * 4 * DEGREE));\n    storeu(h_vecs[6], out.as_mut_ptr().add(5 * 4 * DEGREE));\n    storeu(h_vecs[3], out.as_mut_ptr().add(6 * 4 * DEGREE));\n    storeu(h_vecs[7], out.as_mut_ptr().add(7 * 4 * DEGREE));\n}\n\n#[target_feature(enable = \"simd128\")]\nunsafe fn hash1<const N: usize>(\n    input: &[u8; N],\n    key: &CVWords,\n    counter: u64,\n    flags: u8,\n    flags_start: u8,\n    flags_end: u8,\n    out: &mut CVBytes,\n) {\n    debug_assert_eq!(N % BLOCK_LEN, 0, \"uneven blocks\");\n    let mut cv = *key;\n    let mut block_flags = flags | flags_start;\n    let mut slice = &input[..];\n    while slice.len() >= BLOCK_LEN {\n        if slice.len() == BLOCK_LEN {\n            block_flags |= flags_end;\n        }\n        compress_in_place(\n            &mut cv,\n            array_ref!(slice, 0, BLOCK_LEN),\n            BLOCK_LEN as u8,\n            counter,\n            block_flags,\n        );\n        block_flags = flags;\n        slice = &slice[BLOCK_LEN..];\n    }\n    *out = core::mem::transmute(cv);\n}\n\n#[target_feature(enable = \"simd128\")]\npub unsafe fn hash_many<const N: usize>(\n    mut inputs: &[&[u8; N]],\n    key: &CVWords,\n    mut counter: u64,\n    increment_counter: IncrementCounter,\n    flags: u8,\n    flags_start: u8,\n    flags_end: u8,\n    mut out: &mut [u8],\n) {\n    debug_assert!(out.len() >= inputs.len() * OUT_LEN, \"out too short\");\n    while inputs.len() >= DEGREE && out.len() >= DEGREE * OUT_LEN {\n        // Safe because the layout of arrays is guaranteed, and because the\n        // `blocks` count is determined statically from the argument type.\n        let input_ptrs: &[*const u8; DEGREE] = &*(inputs.as_ptr() as *const [*const u8; DEGREE]);\n        let blocks = N / BLOCK_LEN;\n        hash4(\n            input_ptrs,\n            blocks,\n            key,\n            counter,\n            increment_counter,\n            flags,\n            flags_start,\n            flags_end,\n            array_mut_ref!(out, 0, DEGREE * OUT_LEN),\n        );\n        if increment_counter.yes() {\n            counter += DEGREE as u64;\n        }\n        inputs = &inputs[DEGREE..];\n        out = &mut out[DEGREE * OUT_LEN..];\n    }\n    for (&input, output) in inputs.iter().zip(out.chunks_exact_mut(OUT_LEN)) {\n        hash1(\n            input,\n            key,\n            counter,\n            flags,\n            flags_start,\n            flags_end,\n            array_mut_ref!(output, 0, OUT_LEN),\n        );\n        if increment_counter.yes() {\n            counter += 1;\n        }\n    }\n}\n\n#[cfg(test)]\nmod test {\n    use super::*;\n\n    #[test]\n    fn test_transpose() {\n        #[target_feature(enable = \"simd128\")]\n        fn transpose_wrapper(vecs: &mut [v128; DEGREE]) {\n            transpose_vecs(vecs);\n        }\n\n        let mut matrix = [[0 as u32; DEGREE]; DEGREE];\n        for i in 0..DEGREE {\n            for j in 0..DEGREE {\n                matrix[i][j] = (i * DEGREE + j) as u32;\n            }\n        }\n\n        unsafe {\n            let mut vecs: [v128; DEGREE] = core::mem::transmute(matrix);\n            transpose_wrapper(&mut vecs);\n            matrix = core::mem::transmute(vecs);\n        }\n\n        for i in 0..DEGREE {\n            for j in 0..DEGREE {\n                // Reversed indexes from above.\n                assert_eq!(matrix[j][i], (i * DEGREE + j) as u32);\n            }\n        }\n    }\n\n    #[test]\n    fn test_compress() {\n        crate::test::test_compress_fn(compress_in_place, compress_xof);\n    }\n\n    #[test]\n    fn test_hash_many() {\n        crate::test::test_hash_many_fn(hash_many, hash_many);\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/test_vectors/Cargo.toml",
    "content": "[package]\nname = \"test_vectors\"\nversion = \"0.0.0\"\nedition = \"2021\"\n\n[features]\nneon = [\"blake3/neon\"]\nprefer_intrinsics = [\"blake3/prefer_intrinsics\"]\npure = [\"blake3/pure\"]\nwasm32_simd = [\"blake3/wasm32_simd\"]\n\n[dependencies]\n# If you ever change these path dependencies, you'll probably need to update\n# cross_test.sh, or CI will break. I'm sorry >.<\nblake3 = { path = \"../\" }\nhex = \"0.4.0\"\nreference_impl = { path = \"../reference_impl\" }\nserde = { version = \"1.0\", features = [\"derive\"] }\nserde_json = \"1.0\"\n"
  },
  {
    "path": "third-party/blake3/test_vectors/cross_test.sh",
    "content": "#! /usr/bin/env bash\n\n# This hacky script works around the fact that `cross test` does not support\n# path dependencies. (It uses a docker shared folder to let the guest access\n# project files, so parent directories aren't available.) Solve this problem by\n# copying the entire project to a temp dir and rearranging paths to put\n# \"blake3\" and \"reference_impl\" underneath \"test_vectors\", so that everything\n# is accessible. Hopefully this will just run on CI forever and no one will\n# ever read this and discover my deep shame.\n\nset -e -u -o pipefail\n\nproject_root=\"$(realpath \"$(dirname \"$BASH_SOURCE\")/..\")\"\ntmpdir=\"$(mktemp -d)\"\necho \"Running cross tests in $tmpdir\"\ncd \"$tmpdir\"\ngit clone \"$project_root\" blake3\nmv blake3/test_vectors .\nmv blake3/reference_impl test_vectors\nmv blake3 test_vectors\ncd test_vectors\nsed -i 's|blake3 = { path = \"../\" }|blake3 = { path = \"./blake3\" }|' Cargo.toml\nsed -i 's|reference_impl = { path = \"../reference_impl\" }|reference_impl = { path = \"reference_impl\" }|' Cargo.toml\n\ncross test \"$@\"\n"
  },
  {
    "path": "third-party/blake3/test_vectors/src/bin/generate.rs",
    "content": "fn main() {\n    // The trailing newline is included.\n    print!(\"{}\", test_vectors::generate_json());\n}\n"
  },
  {
    "path": "third-party/blake3/test_vectors/src/lib.rs",
    "content": "use blake3::{BLOCK_LEN, CHUNK_LEN};\nuse serde::{Deserialize, Serialize};\n\n// Reading files at runtime requires special configuration under WASM/WASI, so including this at\n// compile time is simpler.\nconst TEST_VECTORS_JSON: &str = include_str!(\"../test_vectors.json\");\n\n// A non-multiple of 4 is important, since one possible bug is to fail to emit\n// partial words.\npub const OUTPUT_LEN: usize = 2 * BLOCK_LEN + 3;\n\npub const TEST_CASES: &[usize] = &[\n    0,\n    1,\n    2,\n    3,\n    4,\n    5,\n    6,\n    7,\n    8,\n    BLOCK_LEN - 1,\n    BLOCK_LEN,\n    BLOCK_LEN + 1,\n    2 * BLOCK_LEN - 1,\n    2 * BLOCK_LEN,\n    2 * BLOCK_LEN + 1,\n    CHUNK_LEN - 1,\n    CHUNK_LEN,\n    CHUNK_LEN + 1,\n    2 * CHUNK_LEN,\n    2 * CHUNK_LEN + 1,\n    3 * CHUNK_LEN,\n    3 * CHUNK_LEN + 1,\n    4 * CHUNK_LEN,\n    4 * CHUNK_LEN + 1,\n    5 * CHUNK_LEN,\n    5 * CHUNK_LEN + 1,\n    6 * CHUNK_LEN,\n    6 * CHUNK_LEN + 1,\n    7 * CHUNK_LEN,\n    7 * CHUNK_LEN + 1,\n    8 * CHUNK_LEN,\n    8 * CHUNK_LEN + 1,\n    16 * CHUNK_LEN,  // AVX512's bandwidth\n    31 * CHUNK_LEN,  // 16 + 8 + 4 + 2 + 1\n    100 * CHUNK_LEN, // subtrees larger than MAX_SIMD_DEGREE chunks\n];\n\npub const TEST_KEY: &[u8; blake3::KEY_LEN] = b\"whats the Elvish word for friend\";\npub const TEST_CONTEXT: &str = \"BLAKE3 2019-12-27 16:29:52 test vectors context\";\n\nconst COMMENT: &str = r#\"\nEach test is an input length and three outputs, one for each of the hash,\nkeyed_hash, and derive_key modes. The input in each case is filled with a\nrepeating sequence of 251 bytes: 0, 1, 2, ..., 249, 250, 0, 1, ..., and so on.\nThe key used with keyed_hash is the 32-byte ASCII string \"whats the Elvish word\nfor friend\", also given in the `key` field below. The context string used with\nderive_key is the ASCII string \"BLAKE3 2019-12-27 16:29:52 test vectors\ncontext\", also given in the `context_string` field below. Outputs are encoded\nas hexadecimal. Each case is an extended output, and implementations should\nalso check that the first 32 bytes match their default-length output.\n\"#;\n\n// Paint the input with a repeating byte pattern. We use a cycle length of 251,\n// because that's the largest prime number less than 256. This makes it\n// unlikely to swapping any two adjacent input blocks or chunks will give the\n// same answer.\npub fn paint_test_input(buf: &mut [u8]) {\n    for (i, b) in buf.iter_mut().enumerate() {\n        *b = (i % 251) as u8;\n    }\n}\n\n#[derive(Debug, Serialize, Deserialize)]\npub struct Cases {\n    pub _comment: String,\n    pub key: String,\n    pub context_string: String,\n    pub cases: Vec<Case>,\n}\n\n#[derive(Debug, Serialize, Deserialize)]\npub struct Case {\n    pub input_len: usize,\n    pub hash: String,\n    pub keyed_hash: String,\n    pub derive_key: String,\n}\n\npub fn generate_json() -> String {\n    let mut cases = Vec::new();\n    for &input_len in TEST_CASES {\n        let mut input = vec![0; input_len];\n        paint_test_input(&mut input);\n\n        let mut hash_out = [0; OUTPUT_LEN];\n        blake3::Hasher::new()\n            .update(&input)\n            .finalize_xof()\n            .fill(&mut hash_out);\n\n        let mut keyed_hash_out = [0; OUTPUT_LEN];\n        blake3::Hasher::new_keyed(TEST_KEY)\n            .update(&input)\n            .finalize_xof()\n            .fill(&mut keyed_hash_out);\n\n        let mut derive_key_out = [0; OUTPUT_LEN];\n        blake3::Hasher::new_derive_key(TEST_CONTEXT)\n            .update(&input)\n            .finalize_xof()\n            .fill(&mut derive_key_out);\n\n        cases.push(Case {\n            input_len,\n            hash: hex::encode(&hash_out[..]),\n            keyed_hash: hex::encode(&keyed_hash_out[..]),\n            derive_key: hex::encode(&derive_key_out[..]),\n        });\n    }\n\n    let mut json = serde_json::to_string_pretty(&Cases {\n        _comment: COMMENT.trim().replace(\"\\n\", \" \"),\n        key: std::str::from_utf8(TEST_KEY).unwrap().to_string(),\n        context_string: TEST_CONTEXT.to_string(),\n        cases,\n    })\n    .unwrap();\n\n    // Add a trailing newline.\n    json.push('\\n');\n    json\n}\n\npub fn parse_test_cases() -> Cases {\n    serde_json::from_str(TEST_VECTORS_JSON).expect(\"failed to parse test_vectors.json\")\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n\n    fn test_reference_impl_all_at_once(\n        key: &[u8; blake3::KEY_LEN],\n        input: &[u8],\n        expected_hash: &[u8],\n        expected_keyed_hash: &[u8],\n        expected_derive_key: &[u8],\n    ) {\n        let mut out = vec![0; expected_hash.len()];\n        let mut hasher = reference_impl::Hasher::new();\n        hasher.update(input);\n        hasher.finalize(&mut out);\n        assert_eq!(expected_hash, &out[..]);\n\n        let mut out = vec![0; expected_keyed_hash.len()];\n        let mut hasher = reference_impl::Hasher::new_keyed(key);\n        hasher.update(input);\n        hasher.finalize(&mut out);\n        assert_eq!(expected_keyed_hash, &out[..]);\n\n        let mut out = vec![0; expected_derive_key.len()];\n        let mut hasher = reference_impl::Hasher::new_derive_key(TEST_CONTEXT);\n        hasher.update(input);\n        hasher.finalize(&mut out);\n        assert_eq!(expected_derive_key, &out[..]);\n    }\n\n    fn test_reference_impl_one_at_a_time(\n        key: &[u8; blake3::KEY_LEN],\n        input: &[u8],\n        expected_hash: &[u8],\n        expected_keyed_hash: &[u8],\n        expected_derive_key: &[u8],\n    ) {\n        let mut out = vec![0; expected_hash.len()];\n        let mut hasher = reference_impl::Hasher::new();\n        for &b in input {\n            hasher.update(&[b]);\n        }\n        hasher.finalize(&mut out);\n        assert_eq!(expected_hash, &out[..]);\n\n        let mut out = vec![0; expected_keyed_hash.len()];\n        let mut hasher = reference_impl::Hasher::new_keyed(key);\n        for &b in input {\n            hasher.update(&[b]);\n        }\n        hasher.finalize(&mut out);\n        assert_eq!(expected_keyed_hash, &out[..]);\n\n        let mut out = vec![0; expected_derive_key.len()];\n        let mut hasher = reference_impl::Hasher::new_derive_key(TEST_CONTEXT);\n        for &b in input {\n            hasher.update(&[b]);\n        }\n        hasher.finalize(&mut out);\n        assert_eq!(expected_derive_key, &out[..]);\n    }\n\n    fn test_incremental_all_at_once(\n        key: &[u8; blake3::KEY_LEN],\n        input: &[u8],\n        expected_hash: &[u8],\n        expected_keyed_hash: &[u8],\n        expected_derive_key: &[u8],\n    ) {\n        let mut out = vec![0; expected_hash.len()];\n        let mut hasher = blake3::Hasher::new();\n        hasher.update(input);\n        hasher.finalize_xof().fill(&mut out);\n        assert_eq!(expected_hash, &out[..]);\n        assert_eq!(&expected_hash[..32], hasher.finalize().as_bytes());\n\n        let mut out = vec![0; expected_keyed_hash.len()];\n        let mut hasher = blake3::Hasher::new_keyed(key);\n        hasher.update(input);\n        hasher.finalize_xof().fill(&mut out);\n        assert_eq!(expected_keyed_hash, &out[..]);\n        assert_eq!(&expected_keyed_hash[..32], hasher.finalize().as_bytes());\n\n        let mut out = vec![0; expected_derive_key.len()];\n        let mut hasher = blake3::Hasher::new_derive_key(TEST_CONTEXT);\n        hasher.update(input);\n        hasher.finalize_xof().fill(&mut out);\n        assert_eq!(expected_derive_key, &out[..]);\n        assert_eq!(&expected_derive_key[..32], hasher.finalize().as_bytes());\n    }\n\n    fn test_incremental_one_at_a_time(\n        key: &[u8; blake3::KEY_LEN],\n        input: &[u8],\n        expected_hash: &[u8],\n        expected_keyed_hash: &[u8],\n        expected_derive_key: &[u8],\n    ) {\n        let mut out = vec![0; expected_hash.len()];\n        let mut hasher = blake3::Hasher::new();\n        for i in 0..input.len() {\n            hasher.update(&[input[i]]);\n            assert_eq!(i as u64 + 1, hasher.count());\n        }\n        hasher.finalize_xof().fill(&mut out);\n        assert_eq!(expected_hash, &out[..]);\n        assert_eq!(&expected_hash[..32], hasher.finalize().as_bytes());\n\n        let mut out = vec![0; expected_keyed_hash.len()];\n        let mut hasher = blake3::Hasher::new_keyed(key);\n        for i in 0..input.len() {\n            hasher.update(&[input[i]]);\n            assert_eq!(i as u64 + 1, hasher.count());\n        }\n        hasher.finalize_xof().fill(&mut out);\n        assert_eq!(expected_keyed_hash, &out[..]);\n        assert_eq!(&expected_keyed_hash[..32], hasher.finalize().as_bytes());\n\n        let mut out = vec![0; expected_derive_key.len()];\n        let mut hasher = blake3::Hasher::new_derive_key(TEST_CONTEXT);\n        for i in 0..input.len() {\n            hasher.update(&[input[i]]);\n            assert_eq!(i as u64 + 1, hasher.count());\n        }\n        hasher.finalize_xof().fill(&mut out);\n        assert_eq!(expected_derive_key, &out[..]);\n        assert_eq!(&expected_derive_key[..32], hasher.finalize().as_bytes());\n    }\n\n    fn test_recursive(\n        key: &[u8; blake3::KEY_LEN],\n        input: &[u8],\n        expected_hash: &[u8],\n        expected_keyed_hash: &[u8],\n        expected_derive_key: &[u8],\n    ) {\n        assert_eq!(&expected_hash[..32], blake3::hash(input).as_bytes());\n        assert_eq!(\n            &expected_keyed_hash[..32],\n            blake3::keyed_hash(key, input).as_bytes(),\n        );\n        assert_eq!(\n            expected_derive_key[..32],\n            blake3::derive_key(TEST_CONTEXT, input)\n        );\n    }\n\n    #[test]\n    fn run_test_vectors() {\n        let cases = parse_test_cases();\n        let key: &[u8; blake3::KEY_LEN] = cases.key.as_bytes().try_into().unwrap();\n        for case in &cases.cases {\n            dbg!(case.input_len);\n            let mut input = vec![0; case.input_len];\n            paint_test_input(&mut input);\n            let expected_hash = hex::decode(&case.hash).unwrap();\n            let expected_keyed_hash = hex::decode(&case.keyed_hash).unwrap();\n            let expected_derive_key = hex::decode(&case.derive_key).unwrap();\n\n            test_reference_impl_all_at_once(\n                key,\n                &input,\n                &expected_hash,\n                &expected_keyed_hash,\n                &expected_derive_key,\n            );\n\n            test_reference_impl_one_at_a_time(\n                key,\n                &input,\n                &expected_hash,\n                &expected_keyed_hash,\n                &expected_derive_key,\n            );\n\n            test_incremental_all_at_once(\n                key,\n                &input,\n                &expected_hash,\n                &expected_keyed_hash,\n                &expected_derive_key,\n            );\n\n            test_incremental_one_at_a_time(\n                key,\n                &input,\n                &expected_hash,\n                &expected_keyed_hash,\n                &expected_derive_key,\n            );\n\n            test_recursive(\n                key,\n                &input,\n                &expected_hash,\n                &expected_keyed_hash,\n                &expected_derive_key,\n            );\n        }\n    }\n\n    #[test]\n    fn test_checked_in_vectors_up_to_date() {\n        // Replace Windows newlines, in case Git is configured to alter\n        // newlines when files are checked out.\n        let json = TEST_VECTORS_JSON.replace(\"\\r\\n\", \"\\n\");\n        if generate_json() != json {\n            panic!(\"Checked-in test_vectors.json is not up to date. Regenerate with `cargo run --bin generate > ./test_vectors.json`.\");\n        }\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/test_vectors/test_vectors.json",
    "content": "{\n  \"_comment\": \"Each test is an input length and three outputs, one for each of the hash, keyed_hash, and derive_key modes. The input in each case is filled with a repeating sequence of 251 bytes: 0, 1, 2, ..., 249, 250, 0, 1, ..., and so on. The key used with keyed_hash is the 32-byte ASCII string \\\"whats the Elvish word for friend\\\", also given in the `key` field below. The context string used with derive_key is the ASCII string \\\"BLAKE3 2019-12-27 16:29:52 test vectors context\\\", also given in the `context_string` field below. Outputs are encoded as hexadecimal. Each case is an extended output, and implementations should also check that the first 32 bytes match their default-length output.\",\n  \"key\": \"whats the Elvish word for friend\",\n  \"context_string\": \"BLAKE3 2019-12-27 16:29:52 test vectors context\",\n  \"cases\": [\n    {\n      \"input_len\": 0,\n      \"hash\": \"af1349b9f5f9a1a6a0404dea36dcc9499bcb25c9adc112b7cc9a93cae41f3262e00f03e7b69af26b7faaf09fcd333050338ddfe085b8cc869ca98b206c08243a26f5487789e8f660afe6c99ef9e0c52b92e7393024a80459cf91f476f9ffdbda7001c22e159b402631f277ca96f2defdf1078282314e763699a31c5363165421cce14d\",\n      \"keyed_hash\": \"92b2b75604ed3c761f9d6f62392c8a9227ad0ea3f09573e783f1498a4ed60d26b18171a2f22a4b94822c701f107153dba24918c4bae4d2945c20ece13387627d3b73cbf97b797d5e59948c7ef788f54372df45e45e4293c7dc18c1d41144a9758be58960856be1eabbe22c2653190de560ca3b2ac4aa692a9210694254c371e851bc8f\",\n      \"derive_key\": \"2cc39783c223154fea8dfb7c1b1660f2ac2dcbd1c1de8277b0b0dd39b7e50d7d905630c8be290dfcf3e6842f13bddd573c098c3f17361f1f206b8cad9d088aa4a3f746752c6b0ce6a83b0da81d59649257cdf8eb3e9f7d4998e41021fac119deefb896224ac99f860011f73609e6e0e4540f93b273e56547dfd3aa1a035ba6689d89a0\"\n    },\n    {\n      \"input_len\": 1,\n      \"hash\": \"2d3adedff11b61f14c886e35afa036736dcd87a74d27b5c1510225d0f592e213c3a6cb8bf623e20cdb535f8d1a5ffb86342d9c0b64aca3bce1d31f60adfa137b358ad4d79f97b47c3d5e79f179df87a3b9776ef8325f8329886ba42f07fb138bb502f4081cbcec3195c5871e6c23e2cc97d3c69a613eba131e5f1351f3f1da786545e5\",\n      \"keyed_hash\": \"6d7878dfff2f485635d39013278ae14f1454b8c0a3a2d34bc1ab38228a80c95b6568c0490609413006fbd428eb3fd14e7756d90f73a4725fad147f7bf70fd61c4e0cf7074885e92b0e3f125978b4154986d4fb202a3f331a3fb6cf349a3a70e49990f98fe4289761c8602c4e6ab1138d31d3b62218078b2f3ba9a88e1d08d0dd4cea11\",\n      \"derive_key\": \"b3e2e340a117a499c6cf2398a19ee0d29cca2bb7404c73063382693bf66cb06c5827b91bf889b6b97c5477f535361caefca0b5d8c4746441c57617111933158950670f9aa8a05d791daae10ac683cbef8faf897c84e6114a59d2173c3f417023a35d6983f2c7dfa57e7fc559ad751dbfb9ffab39c2ef8c4aafebc9ae973a64f0c76551\"\n    },\n    {\n      \"input_len\": 2,\n      \"hash\": \"7b7015bb92cf0b318037702a6cdd81dee41224f734684c2c122cd6359cb1ee63d8386b22e2ddc05836b7c1bb693d92af006deb5ffbc4c70fb44d0195d0c6f252faac61659ef86523aa16517f87cb5f1340e723756ab65efb2f91964e14391de2a432263a6faf1d146937b35a33621c12d00be8223a7f1919cec0acd12097ff3ab00ab1\",\n      \"keyed_hash\": \"5392ddae0e0a69d5f40160462cbd9bd889375082ff224ac9c758802b7a6fd20a9ffbf7efd13e989a6c246f96d3a96b9d279f2c4e63fb0bdff633957acf50ee1a5f658be144bab0f6f16500dee4aa5967fc2c586d85a04caddec90fffb7633f46a60786024353b9e5cebe277fcd9514217fee2267dcda8f7b31697b7c54fab6a939bf8f\",\n      \"derive_key\": \"1f166565a7df0098ee65922d7fea425fb18b9943f19d6161e2d17939356168e6daa59cae19892b2d54f6fc9f475d26031fd1c22ae0a3e8ef7bdb23f452a15e0027629d2e867b1bb1e6ab21c71297377750826c404dfccc2406bd57a83775f89e0b075e59a7732326715ef912078e213944f490ad68037557518b79c0086de6d6f6cdd2\"\n    },\n    {\n      \"input_len\": 3,\n      \"hash\": \"e1be4d7a8ab5560aa4199eea339849ba8e293d55ca0a81006726d184519e647f5b49b82f805a538c68915c1ae8035c900fd1d4b13902920fd05e1450822f36de9454b7e9996de4900c8e723512883f93f4345f8a58bfe64ee38d3ad71ab027765d25cdd0e448328a8e7a683b9a6af8b0af94fa09010d9186890b096a08471e4230a134\",\n      \"keyed_hash\": \"39e67b76b5a007d4921969779fe666da67b5213b096084ab674742f0d5ec62b9b9142d0fab08e1b161efdbb28d18afc64d8f72160c958e53a950cdecf91c1a1bbab1a9c0f01def762a77e2e8545d4dec241e98a89b6db2e9a5b070fc110caae2622690bd7b76c02ab60750a3ea75426a6bb8803c370ffe465f07fb57def95df772c39f\",\n      \"derive_key\": \"440aba35cb006b61fc17c0529255de438efc06a8c9ebf3f2ddac3b5a86705797f27e2e914574f4d87ec04c379e12789eccbfbc15892626042707802dbe4e97c3ff59dca80c1e54246b6d055154f7348a39b7d098b2b4824ebe90e104e763b2a447512132cede16243484a55a4e40a85790038bb0dcf762e8c053cabae41bbe22a5bff7\"\n    },\n    {\n      \"input_len\": 4,\n      \"hash\": \"f30f5ab28fe047904037f77b6da4fea1e27241c5d132638d8bedce9d40494f328f603ba4564453e06cdcee6cbe728a4519bbe6f0d41e8a14b5b225174a566dbfa61b56afb1e452dc08c804f8c3143c9e2cc4a31bb738bf8c1917b55830c6e65797211701dc0b98daa1faeaa6ee9e56ab606ce03a1a881e8f14e87a4acf4646272cfd12\",\n      \"keyed_hash\": \"7671dde590c95d5ac9616651ff5aa0a27bee5913a348e053b8aa9108917fe070116c0acff3f0d1fa97ab38d813fd46506089118147d83393019b068a55d646251ecf81105f798d76a10ae413f3d925787d6216a7eb444e510fd56916f1d753a5544ecf0072134a146b2615b42f50c179f56b8fae0788008e3e27c67482349e249cb86a\",\n      \"derive_key\": \"f46085c8190d69022369ce1a18880e9b369c135eb93f3c63550d3e7630e91060fbd7d8f4258bec9da4e05044f88b91944f7cab317a2f0c18279629a3867fad0662c9ad4d42c6f27e5b124da17c8c4f3a94a025ba5d1b623686c6099d202a7317a82e3d95dae46a87de0555d727a5df55de44dab799a20dffe239594d6e99ed17950910\"\n    },\n    {\n      \"input_len\": 5,\n      \"hash\": \"b40b44dfd97e7a84a996a91af8b85188c66c126940ba7aad2e7ae6b385402aa2ebcfdac6c5d32c31209e1f81a454751280db64942ce395104e1e4eaca62607de1c2ca748251754ea5bbe8c20150e7f47efd57012c63b3c6a6632dc1c7cd15f3e1c999904037d60fac2eb9397f2adbe458d7f264e64f1e73aa927b30988e2aed2f03620\",\n      \"keyed_hash\": \"73ac69eecf286894d8102018a6fc729f4b1f4247d3703f69bdc6a5fe3e0c84616ab199d1f2f3e53bffb17f0a2209fe8b4f7d4c7bae59c2bc7d01f1ff94c67588cc6b38fa6024886f2c078bfe09b5d9e6584cd6c521c3bb52f4de7687b37117a2dbbec0d59e92fa9a8cc3240d4432f91757aabcae03e87431dac003e7d73574bfdd8218\",\n      \"derive_key\": \"1f24eda69dbcb752847ec3ebb5dd42836d86e58500c7c98d906ecd82ed9ae47f6f48a3f67e4e43329c9a89b1ca526b9b35cbf7d25c1e353baffb590fd79be58ddb6c711f1a6b60e98620b851c688670412fcb0435657ba6b638d21f0f2a04f2f6b0bd8834837b10e438d5f4c7c2c71299cf7586ea9144ed09253d51f8f54dd6bff719d\"\n    },\n    {\n      \"input_len\": 6,\n      \"hash\": \"06c4e8ffb6872fad96f9aaca5eee1553eb62aed0ad7198cef42e87f6a616c844611a30c4e4f37fe2fe23c0883cde5cf7059d88b657c7ed2087e3d210925ede716435d6d5d82597a1e52b9553919e804f5656278bd739880692c94bff2824d8e0b48cac1d24682699e4883389dc4f2faa2eb3b4db6e39debd5061ff3609916f3e07529a\",\n      \"keyed_hash\": \"82d3199d0013035682cc7f2a399d4c212544376a839aa863a0f4c91220ca7a6dc2ffb3aa05f2631f0fa9ac19b6e97eb7e6669e5ec254799350c8b8d189e8807800842a5383c4d907c932f34490aaf00064de8cdb157357bde37c1504d2960034930887603abc5ccb9f5247f79224baff6120a3c622a46d7b1bcaee02c5025460941256\",\n      \"derive_key\": \"be96b30b37919fe4379dfbe752ae77b4f7e2ab92f7ff27435f76f2f065f6a5f435ae01a1d14bd5a6b3b69d8cbd35f0b01ef2173ff6f9b640ca0bd4748efa398bf9a9c0acd6a66d9332fdc9b47ffe28ba7ab6090c26747b85f4fab22f936b71eb3f64613d8bd9dfabe9bb68da19de78321b481e5297df9e40ec8a3d662f3e1479c65de0\"\n    },\n    {\n      \"input_len\": 7,\n      \"hash\": \"3f8770f387faad08faa9d8414e9f449ac68e6ff0417f673f602a646a891419fe66036ef6e6d1a8f54baa9fed1fc11c77cfb9cff65bae915045027046ebe0c01bf5a941f3bb0f73791d3fc0b84370f9f30af0cd5b0fc334dd61f70feb60dad785f070fef1f343ed933b49a5ca0d16a503f599a365a4296739248b28d1a20b0e2cc8975c\",\n      \"keyed_hash\": \"af0a7ec382aedc0cfd626e49e7628bc7a353a4cb108855541a5651bf64fbb28a7c5035ba0f48a9c73dabb2be0533d02e8fd5d0d5639a18b2803ba6bf527e1d145d5fd6406c437b79bcaad6c7bdf1cf4bd56a893c3eb9510335a7a798548c6753f74617bede88bef924ba4b334f8852476d90b26c5dc4c3668a2519266a562c6c8034a6\",\n      \"derive_key\": \"dc3b6485f9d94935329442916b0d059685ba815a1fa2a14107217453a7fc9f0e66266db2ea7c96843f9d8208e600a73f7f45b2f55b9e6d6a7ccf05daae63a3fdd10b25ac0bd2e224ce8291f88c05976d575df998477db86fb2cfbbf91725d62cb57acfeb3c2d973b89b503c2b60dde85a7802b69dc1ac2007d5623cbea8cbfb6b181f5\"\n    },\n    {\n      \"input_len\": 8,\n      \"hash\": \"2351207d04fc16ade43ccab08600939c7c1fa70a5c0aaca76063d04c3228eaeb725d6d46ceed8f785ab9f2f9b06acfe398c6699c6129da084cb531177445a682894f9685eaf836999221d17c9a64a3a057000524cd2823986db378b074290a1a9b93a22e135ed2c14c7e20c6d045cd00b903400374126676ea78874d79f2dd7883cf5c\",\n      \"keyed_hash\": \"be2f5495c61cba1bb348a34948c004045e3bd4dae8f0fe82bf44d0da245a060048eb5e68ce6dea1eb0229e144f578b3aa7e9f4f85febd135df8525e6fe40c6f0340d13dd09b255ccd5112a94238f2be3c0b5b7ecde06580426a93e0708555a265305abf86d874e34b4995b788e37a823491f25127a502fe0704baa6bfdf04e76c13276\",\n      \"derive_key\": \"2b166978cef14d9d438046c720519d8b1cad707e199746f1562d0c87fbd32940f0e2545a96693a66654225ebbaac76d093bfa9cd8f525a53acb92a861a98c42e7d1c4ae82e68ab691d510012edd2a728f98cd4794ef757e94d6546961b4f280a51aac339cc95b64a92b83cc3f26d8af8dfb4c091c240acdb4d47728d23e7148720ef04\"\n    },\n    {\n      \"input_len\": 63,\n      \"hash\": \"e9bc37a594daad83be9470df7f7b3798297c3d834ce80ba85d6e207627b7db7b1197012b1e7d9af4d7cb7bdd1f3bb49a90a9b5dec3ea2bbc6eaebce77f4e470cbf4687093b5352f04e4a4570fba233164e6acc36900e35d185886a827f7ea9bdc1e5c3ce88b095a200e62c10c043b3e9bc6cb9b6ac4dfa51794b02ace9f98779040755\",\n      \"keyed_hash\": \"bb1eb5d4afa793c1ebdd9fb08def6c36d10096986ae0cfe148cd101170ce37aea05a63d74a840aecd514f654f080e51ac50fd617d22610d91780fe6b07a26b0847abb38291058c97474ef6ddd190d30fc318185c09ca1589d2024f0a6f16d45f11678377483fa5c005b2a107cb9943e5da634e7046855eaa888663de55d6471371d55d\",\n      \"derive_key\": \"b6451e30b953c206e34644c6803724e9d2725e0893039cfc49584f991f451af3b89e8ff572d3da4f4022199b9563b9d70ebb616efff0763e9abec71b550f1371e233319c4c4e74da936ba8e5bbb29a598e007a0bbfa929c99738ca2cc098d59134d11ff300c39f82e2fce9f7f0fa266459503f64ab9913befc65fddc474f6dc1c67669\"\n    },\n    {\n      \"input_len\": 64,\n      \"hash\": \"4eed7141ea4a5cd4b788606bd23f46e212af9cacebacdc7d1f4c6dc7f2511b98fc9cc56cb831ffe33ea8e7e1d1df09b26efd2767670066aa82d023b1dfe8ab1b2b7fbb5b97592d46ffe3e05a6a9b592e2949c74160e4674301bc3f97e04903f8c6cf95b863174c33228924cdef7ae47559b10b294acd660666c4538833582b43f82d74\",\n      \"keyed_hash\": \"ba8ced36f327700d213f120b1a207a3b8c04330528586f414d09f2f7d9ccb7e68244c26010afc3f762615bbac552a1ca909e67c83e2fd5478cf46b9e811efccc93f77a21b17a152ebaca1695733fdb086e23cd0eb48c41c034d52523fc21236e5d8c9255306e48d52ba40b4dac24256460d56573d1312319afcf3ed39d72d0bfc69acb\",\n      \"derive_key\": \"a5c4a7053fa86b64746d4bb688d06ad1f02a18fce9afd3e818fefaa7126bf73e9b9493a9befebe0bf0c9509fb3105cfa0e262cde141aa8e3f2c2f77890bb64a4cca96922a21ead111f6338ad5244f2c15c44cb595443ac2ac294231e31be4a4307d0a91e874d36fc9852aeb1265c09b6e0cda7c37ef686fbbcab97e8ff66718be048bb\"\n    },\n    {\n      \"input_len\": 65,\n      \"hash\": \"de1e5fa0be70df6d2be8fffd0e99ceaa8eb6e8c93a63f2d8d1c30ecb6b263dee0e16e0a4749d6811dd1d6d1265c29729b1b75a9ac346cf93f0e1d7296dfcfd4313b3a227faaaaf7757cc95b4e87a49be3b8a270a12020233509b1c3632b3485eef309d0abc4a4a696c9decc6e90454b53b000f456a3f10079072baaf7a981653221f2c\",\n      \"keyed_hash\": \"c0a4edefa2d2accb9277c371ac12fcdbb52988a86edc54f0716e1591b4326e72d5e795f46a596b02d3d4bfb43abad1e5d19211152722ec1f20fef2cd413e3c22f2fc5da3d73041275be6ede3517b3b9f0fc67ade5956a672b8b75d96cb43294b9041497de92637ed3f2439225e683910cb3ae923374449ca788fb0f9bea92731bc26ad\",\n      \"derive_key\": \"51fd05c3c1cfbc8ed67d139ad76f5cf8236cd2acd26627a30c104dfd9d3ff8a82b02e8bd36d8498a75ad8c8e9b15eb386970283d6dd42c8ae7911cc592887fdbe26a0a5f0bf821cd92986c60b2502c9be3f98a9c133a7e8045ea867e0828c7252e739321f7c2d65daee4468eb4429efae469a42763f1f94977435d10dccae3e3dce88d\"\n    },\n    {\n      \"input_len\": 127,\n      \"hash\": \"d81293fda863f008c09e92fc382a81f5a0b4a1251cba1634016a0f86a6bd640de3137d477156d1fde56b0cf36f8ef18b44b2d79897bece12227539ac9ae0a5119da47644d934d26e74dc316145dcb8bb69ac3f2e05c242dd6ee06484fcb0e956dc44355b452c5e2bbb5e2b66e99f5dd443d0cbcaaafd4beebaed24ae2f8bb672bcef78\",\n      \"keyed_hash\": \"c64200ae7dfaf35577ac5a9521c47863fb71514a3bcad18819218b818de85818ee7a317aaccc1458f78d6f65f3427ec97d9c0adb0d6dacd4471374b621b7b5f35cd54663c64dbe0b9e2d95632f84c611313ea5bd90b71ce97b3cf645776f3adc11e27d135cbadb9875c2bf8d3ae6b02f8a0206aba0c35bfe42574011931c9a255ce6dc\",\n      \"derive_key\": \"c91c090ceee3a3ac81902da31838012625bbcd73fcb92e7d7e56f78deba4f0c3feeb3974306966ccb3e3c69c337ef8a45660ad02526306fd685c88542ad00f759af6dd1adc2e50c2b8aac9f0c5221ff481565cf6455b772515a69463223202e5c371743e35210bbbbabd89651684107fd9fe493c937be16e39cfa7084a36207c99bea3\"\n    },\n    {\n      \"input_len\": 128,\n      \"hash\": \"f17e570564b26578c33bb7f44643f539624b05df1a76c81f30acd548c44b45efa69faba091427f9c5c4caa873aa07828651f19c55bad85c47d1368b11c6fd99e47ecba5820a0325984d74fe3e4058494ca12e3f1d3293d0010a9722f7dee64f71246f75e9361f44cc8e214a100650db1313ff76a9f93ec6e84edb7add1cb4a95019b0c\",\n      \"keyed_hash\": \"b04fe15577457267ff3b6f3c947d93be581e7e3a4b018679125eaf86f6a628ecd86bbe0001f10bda47e6077b735016fca8119da11348d93ca302bbd125bde0db2b50edbe728a620bb9d3e6f706286aedea973425c0b9eedf8a38873544cf91badf49ad92a635a93f71ddfcee1eae536c25d1b270956be16588ef1cfef2f1d15f650bd5\",\n      \"derive_key\": \"81720f34452f58a0120a58b6b4608384b5c51d11f39ce97161a0c0e442ca022550e7cd651e312f0b4c6afb3c348ae5dd17d2b29fab3b894d9a0034c7b04fd9190cbd90043ff65d1657bbc05bfdecf2897dd894c7a1b54656d59a50b51190a9da44db426266ad6ce7c173a8c0bbe091b75e734b4dadb59b2861cd2518b4e7591e4b83c9\"\n    },\n    {\n      \"input_len\": 129,\n      \"hash\": \"683aaae9f3c5ba37eaaf072aed0f9e30bac0865137bae68b1fde4ca2aebdcb12f96ffa7b36dd78ba321be7e842d364a62a42e3746681c8bace18a4a8a79649285c7127bf8febf125be9de39586d251f0d41da20980b70d35e3dac0eee59e468a894fa7e6a07129aaad09855f6ad4801512a116ba2b7841e6cfc99ad77594a8f2d181a7\",\n      \"keyed_hash\": \"d4a64dae6cdccbac1e5287f54f17c5f985105457c1a2ec1878ebd4b57e20d38f1c9db018541eec241b748f87725665b7b1ace3e0065b29c3bcb232c90e37897fa5aaee7e1e8a2ecfcd9b51463e42238cfdd7fee1aecb3267fa7f2128079176132a412cd8aaf0791276f6b98ff67359bd8652ef3a203976d5ff1cd41885573487bcd683\",\n      \"derive_key\": \"938d2d4435be30eafdbb2b7031f7857c98b04881227391dc40db3c7b21f41fc18d72d0f9c1de5760e1941aebf3100b51d64644cb459eb5d20258e233892805eb98b07570ef2a1787cd48e117c8d6a63a68fd8fc8e59e79dbe63129e88352865721c8d5f0cf183f85e0609860472b0d6087cefdd186d984b21542c1c780684ed6832d8d\"\n    },\n    {\n      \"input_len\": 1023,\n      \"hash\": \"10108970eeda3eb932baac1428c7a2163b0e924c9a9e25b35bba72b28f70bd11a182d27a591b05592b15607500e1e8dd56bc6c7fc063715b7a1d737df5bad3339c56778957d870eb9717b57ea3d9fb68d1b55127bba6a906a4a24bbd5acb2d123a37b28f9e9a81bbaae360d58f85e5fc9d75f7c370a0cc09b6522d9c8d822f2f28f485\",\n      \"keyed_hash\": \"c951ecdf03288d0fcc96ee3413563d8a6d3589547f2c2fb36d9786470f1b9d6e890316d2e6d8b8c25b0a5b2180f94fb1a158ef508c3cde45e2966bd796a696d3e13efd86259d756387d9becf5c8bf1ce2192b87025152907b6d8cc33d17826d8b7b9bc97e38c3c85108ef09f013e01c229c20a83d9e8efac5b37470da28575fd755a10\",\n      \"derive_key\": \"74a16c1c3d44368a86e1ca6df64be6a2f64cce8f09220787450722d85725dea59c413264404661e9e4d955409dfe4ad3aa487871bcd454ed12abfe2c2b1eb7757588cf6cb18d2eccad49e018c0d0fec323bec82bf1644c6325717d13ea712e6840d3e6e730d35553f59eff5377a9c350bcc1556694b924b858f329c44ee64b884ef00d\"\n    },\n    {\n      \"input_len\": 1024,\n      \"hash\": \"42214739f095a406f3fc83deb889744ac00df831c10daa55189b5d121c855af71cf8107265ecdaf8505b95d8fcec83a98a6a96ea5109d2c179c47a387ffbb404756f6eeae7883b446b70ebb144527c2075ab8ab204c0086bb22b7c93d465efc57f8d917f0b385c6df265e77003b85102967486ed57db5c5ca170ba441427ed9afa684e\",\n      \"keyed_hash\": \"75c46f6f3d9eb4f55ecaaee480db732e6c2105546f1e675003687c31719c7ba4a78bc838c72852d4f49c864acb7adafe2478e824afe51c8919d06168414c265f298a8094b1ad813a9b8614acabac321f24ce61c5a5346eb519520d38ecc43e89b5000236df0597243e4d2493fd626730e2ba17ac4d8824d09d1a4a8f57b8227778e2de\",\n      \"derive_key\": \"7356cd7720d5b66b6d0697eb3177d9f8d73a4a5c5e968896eb6a6896843027066c23b601d3ddfb391e90d5c8eccdef4ae2a264bce9e612ba15e2bc9d654af1481b2e75dbabe615974f1070bba84d56853265a34330b4766f8e75edd1f4a1650476c10802f22b64bd3919d246ba20a17558bc51c199efdec67e80a227251808d8ce5bad\"\n    },\n    {\n      \"input_len\": 1025,\n      \"hash\": \"d00278ae47eb27b34faecf67b4fe263f82d5412916c1ffd97c8cb7fb814b8444f4c4a22b4b399155358a994e52bf255de60035742ec71bd08ac275a1b51cc6bfe332b0ef84b409108cda080e6269ed4b3e2c3f7d722aa4cdc98d16deb554e5627be8f955c98e1d5f9565a9194cad0c4285f93700062d9595adb992ae68ff12800ab67a\",\n      \"keyed_hash\": \"357dc55de0c7e382c900fd6e320acc04146be01db6a8ce7210b7189bd664ea69362396b77fdc0d2634a552970843722066c3c15902ae5097e00ff53f1e116f1cd5352720113a837ab2452cafbde4d54085d9cf5d21ca613071551b25d52e69d6c81123872b6f19cd3bc1333edf0c52b94de23ba772cf82636cff4542540a7738d5b930\",\n      \"derive_key\": \"effaa245f065fbf82ac186839a249707c3bddf6d3fdda22d1b95a3c970379bcb5d31013a167509e9066273ab6e2123bc835b408b067d88f96addb550d96b6852dad38e320b9d940f86db74d398c770f462118b35d2724efa13da97194491d96dd37c3c09cbef665953f2ee85ec83d88b88d11547a6f911c8217cca46defa2751e7f3ad\"\n    },\n    {\n      \"input_len\": 2048,\n      \"hash\": \"e776b6028c7cd22a4d0ba182a8bf62205d2ef576467e838ed6f2529b85fba24a9a60bf80001410ec9eea6698cd537939fad4749edd484cb541aced55cd9bf54764d063f23f6f1e32e12958ba5cfeb1bf618ad094266d4fc3c968c2088f677454c288c67ba0dba337b9d91c7e1ba586dc9a5bc2d5e90c14f53a8863ac75655461cea8f9\",\n      \"keyed_hash\": \"879cf1fa2ea0e79126cb1063617a05b6ad9d0b696d0d757cf053439f60a99dd10173b961cd574288194b23ece278c330fbb8585485e74967f31352a8183aa782b2b22f26cdcadb61eed1a5bc144b8198fbb0c13abbf8e3192c145d0a5c21633b0ef86054f42809df823389ee40811a5910dcbd1018af31c3b43aa55201ed4edaac74fe\",\n      \"derive_key\": \"7b2945cb4fef70885cc5d78a87bf6f6207dd901ff239201351ffac04e1088a23e2c11a1ebffcea4d80447867b61badb1383d842d4e79645d48dd82ccba290769caa7af8eaa1bd78a2a5e6e94fbdab78d9c7b74e894879f6a515257ccf6f95056f4e25390f24f6b35ffbb74b766202569b1d797f2d4bd9d17524c720107f985f4ddc583\"\n    },\n    {\n      \"input_len\": 2049,\n      \"hash\": \"5f4d72f40d7a5f82b15ca2b2e44b1de3c2ef86c426c95c1af0b687952256303096de31d71d74103403822a2e0bc1eb193e7aecc9643a76b7bbc0c9f9c52e8783aae98764ca468962b5c2ec92f0c74eb5448d519713e09413719431c802f948dd5d90425a4ecdadece9eb178d80f26efccae630734dff63340285adec2aed3b51073ad3\",\n      \"keyed_hash\": \"9f29700902f7c86e514ddc4df1e3049f258b2472b6dd5267f61bf13983b78dd5f9a88abfefdfa1e00b418971f2b39c64ca621e8eb37fceac57fd0c8fc8e117d43b81447be22d5d8186f8f5919ba6bcc6846bd7d50726c06d245672c2ad4f61702c646499ee1173daa061ffe15bf45a631e2946d616a4c345822f1151284712f76b2b0e\",\n      \"derive_key\": \"2ea477c5515cc3dd606512ee72bb3e0e758cfae7232826f35fb98ca1bcbdf27316d8e9e79081a80b046b60f6a263616f33ca464bd78d79fa18200d06c7fc9bffd808cc4755277a7d5e09da0f29ed150f6537ea9bed946227ff184cc66a72a5f8c1e4bd8b04e81cf40fe6dc4427ad5678311a61f4ffc39d195589bdbc670f63ae70f4b6\"\n    },\n    {\n      \"input_len\": 3072,\n      \"hash\": \"b98cb0ff3623be03326b373de6b9095218513e64f1ee2edd2525c7ad1e5cffd29a3f6b0b978d6608335c09dc94ccf682f9951cdfc501bfe47b9c9189a6fc7b404d120258506341a6d802857322fbd20d3e5dae05b95c88793fa83db1cb08e7d8008d1599b6209d78336e24839724c191b2a52a80448306e0daa84a3fdb566661a37e11\",\n      \"keyed_hash\": \"044a0e7b172a312dc02a4c9a818c036ffa2776368d7f528268d2e6b5df19177022f302d0529e4174cc507c463671217975e81dab02b8fdeb0d7ccc7568dd22574c783a76be215441b32e91b9a904be8ea81f7a0afd14bad8ee7c8efc305ace5d3dd61b996febe8da4f56ca0919359a7533216e2999fc87ff7d8f176fbecb3d6f34278b\",\n      \"derive_key\": \"050df97f8c2ead654d9bb3ab8c9178edcd902a32f8495949feadcc1e0480c46b3604131bbd6e3ba573b6dd682fa0a63e5b165d39fc43a625d00207607a2bfeb65ff1d29292152e26b298868e3b87be95d6458f6f2ce6118437b632415abe6ad522874bcd79e4030a5e7bad2efa90a7a7c67e93f0a18fb28369d0a9329ab5c24134ccb0\"\n    },\n    {\n      \"input_len\": 3073,\n      \"hash\": \"7124b49501012f81cc7f11ca069ec9226cecb8a2c850cfe644e327d22d3e1cd39a27ae3b79d68d89da9bf25bc27139ae65a324918a5f9b7828181e52cf373c84f35b639b7fccbb985b6f2fa56aea0c18f531203497b8bbd3a07ceb5926f1cab74d14bd66486d9a91eba99059a98bd1cd25876b2af5a76c3e9eed554ed72ea952b603bf\",\n      \"keyed_hash\": \"68dede9bef00ba89e43f31a6825f4cf433389fedae75c04ee9f0cf16a427c95a96d6da3fe985054d3478865be9a092250839a697bbda74e279e8a9e69f0025e4cfddd6cfb434b1cd9543aaf97c635d1b451a4386041e4bb100f5e45407cbbc24fa53ea2de3536ccb329e4eb9466ec37093a42cf62b82903c696a93a50b702c80f3c3c5\",\n      \"derive_key\": \"72613c9ec9ff7e40f8f5c173784c532ad852e827dba2bf85b2ab4b76f7079081576288e552647a9d86481c2cae75c2dd4e7c5195fb9ada1ef50e9c5098c249d743929191441301c69e1f48505a4305ec1778450ee48b8e69dc23a25960fe33070ea549119599760a8a2d28aeca06b8c5e9ba58bc19e11fe57b6ee98aa44b2a8e6b14a5\"\n    },\n    {\n      \"input_len\": 4096,\n      \"hash\": \"015094013f57a5277b59d8475c0501042c0b642e531b0a1c8f58d2163229e9690289e9409ddb1b99768eafe1623da896faf7e1114bebeadc1be30829b6f8af707d85c298f4f0ff4d9438aef948335612ae921e76d411c3a9111df62d27eaf871959ae0062b5492a0feb98ef3ed4af277f5395172dbe5c311918ea0074ce0036454f620\",\n      \"keyed_hash\": \"befc660aea2f1718884cd8deb9902811d332f4fc4a38cf7c7300d597a081bfc0bbb64a36edb564e01e4b4aaf3b060092a6b838bea44afebd2deb8298fa562b7b597c757b9df4c911c3ca462e2ac89e9a787357aaf74c3b56d5c07bc93ce899568a3eb17d9250c20f6c5f6c1e792ec9a2dcb715398d5a6ec6d5c54f586a00403a1af1de\",\n      \"derive_key\": \"1e0d7f3db8c414c97c6307cbda6cd27ac3b030949da8e23be1a1a924ad2f25b9d78038f7b198596c6cc4a9ccf93223c08722d684f240ff6569075ed81591fd93f9fff1110b3a75bc67e426012e5588959cc5a4c192173a03c00731cf84544f65a2fb9378989f72e9694a6a394a8a30997c2e67f95a504e631cd2c5f55246024761b245\"\n    },\n    {\n      \"input_len\": 4097,\n      \"hash\": \"9b4052b38f1c5fc8b1f9ff7ac7b27cd242487b3d890d15c96a1c25b8aa0fb99505f91b0b5600a11251652eacfa9497b31cd3c409ce2e45cfe6c0a016967316c426bd26f619eab5d70af9a418b845c608840390f361630bd497b1ab44019316357c61dbe091ce72fc16dc340ac3d6e009e050b3adac4b5b2c92e722cffdc46501531956\",\n      \"keyed_hash\": \"00df940cd36bb9fa7cbbc3556744e0dbc8191401afe70520ba292ee3ca80abbc606db4976cfdd266ae0abf667d9481831ff12e0caa268e7d3e57260c0824115a54ce595ccc897786d9dcbf495599cfd90157186a46ec800a6763f1c59e36197e9939e900809f7077c102f888caaf864b253bc41eea812656d46742e4ea42769f89b83f\",\n      \"derive_key\": \"aca51029626b55fda7117b42a7c211f8c6e9ba4fe5b7a8ca922f34299500ead8a897f66a400fed9198fd61dd2d58d382458e64e100128075fc54b860934e8de2e84170734b06e1d212a117100820dbc48292d148afa50567b8b84b1ec336ae10d40c8c975a624996e12de31abbe135d9d159375739c333798a80c64ae895e51e22f3ad\"\n    },\n    {\n      \"input_len\": 5120,\n      \"hash\": \"9cadc15fed8b5d854562b26a9536d9707cadeda9b143978f319ab34230535833acc61c8fdc114a2010ce8038c853e121e1544985133fccdd0a2d507e8e615e611e9a0ba4f47915f49e53d721816a9198e8b30f12d20ec3689989175f1bf7a300eee0d9321fad8da232ece6efb8e9fd81b42ad161f6b9550a069e66b11b40487a5f5059\",\n      \"keyed_hash\": \"2c493e48e9b9bf31e0553a22b23503c0a3388f035cece68eb438d22fa1943e209b4dc9209cd80ce7c1f7c9a744658e7e288465717ae6e56d5463d4f80cdb2ef56495f6a4f5487f69749af0c34c2cdfa857f3056bf8d807336a14d7b89bf62bef2fb54f9af6a546f818dc1e98b9e07f8a5834da50fa28fb5874af91bf06020d1bf0120e\",\n      \"derive_key\": \"7a7acac8a02adcf3038d74cdd1d34527de8a0fcc0ee3399d1262397ce5817f6055d0cefd84d9d57fe792d65a278fd20384ac6c30fdb340092f1a74a92ace99c482b28f0fc0ef3b923e56ade20c6dba47e49227166251337d80a037e987ad3a7f728b5ab6dfafd6e2ab1bd583a95d9c895ba9c2422c24ea0f62961f0dca45cad47bfa0d\"\n    },\n    {\n      \"input_len\": 5121,\n      \"hash\": \"628bd2cb2004694adaab7bbd778a25df25c47b9d4155a55f8fbd79f2fe154cff96adaab0613a6146cdaabe498c3a94e529d3fc1da2bd08edf54ed64d40dcd6777647eac51d8277d70219a9694334a68bc8f0f23e20b0ff70ada6f844542dfa32cd4204ca1846ef76d811cdb296f65e260227f477aa7aa008bac878f72257484f2b6c95\",\n      \"keyed_hash\": \"6ccf1c34753e7a044db80798ecd0782a8f76f33563accaddbfbb2e0ea4b2d0240d07e63f13667a8d1490e5e04f13eb617aea16a8c8a5aaed1ef6fbde1b0515e3c81050b361af6ead126032998290b563e3caddeaebfab592e155f2e161fb7cba939092133f23f9e65245e58ec23457b78a2e8a125588aad6e07d7f11a85b88d375b72d\",\n      \"derive_key\": \"b07f01e518e702f7ccb44a267e9e112d403a7b3f4883a47ffbed4b48339b3c341a0add0ac032ab5aaea1e4e5b004707ec5681ae0fcbe3796974c0b1cf31a194740c14519273eedaabec832e8a784b6e7cfc2c5952677e6c3f2c3914454082d7eb1ce1766ac7d75a4d3001fc89544dd46b5147382240d689bbbaefc359fb6ae30263165\"\n    },\n    {\n      \"input_len\": 6144,\n      \"hash\": \"3e2e5b74e048f3add6d21faab3f83aa44d3b2278afb83b80b3c35164ebeca2054d742022da6fdda444ebc384b04a54c3ac5839b49da7d39f6d8a9db03deab32aade156c1c0311e9b3435cde0ddba0dce7b26a376cad121294b689193508dd63151603c6ddb866ad16c2ee41585d1633a2cea093bea714f4c5d6b903522045b20395c83\",\n      \"keyed_hash\": \"3d6b6d21281d0ade5b2b016ae4034c5dec10ca7e475f90f76eac7138e9bc8f1dc35754060091dc5caf3efabe0603c60f45e415bb3407db67e6beb3d11cf8e4f7907561f05dace0c15807f4b5f389c841eb114d81a82c02a00b57206b1d11fa6e803486b048a5ce87105a686dee041207e095323dfe172df73deb8c9532066d88f9da7e\",\n      \"derive_key\": \"2a95beae63ddce523762355cf4b9c1d8f131465780a391286a5d01abb5683a1597099e3c6488aab6c48f3c15dbe1942d21dbcdc12115d19a8b8465fb54e9053323a9178e4275647f1a9927f6439e52b7031a0b465c861a3fc531527f7758b2b888cf2f20582e9e2c593709c0a44f9c6e0f8b963994882ea4168827823eef1f64169fef\"\n    },\n    {\n      \"input_len\": 6145,\n      \"hash\": \"f1323a8631446cc50536a9f705ee5cb619424d46887f3c376c695b70e0f0507f18a2cfdd73c6e39dd75ce7c1c6e3ef238fd54465f053b25d21044ccb2093beb015015532b108313b5829c3621ce324b8e14229091b7c93f32db2e4e63126a377d2a63a3597997d4f1cba59309cb4af240ba70cebff9a23d5e3ff0cdae2cfd54e070022\",\n      \"keyed_hash\": \"9ac301e9e39e45e3250a7e3b3df701aa0fb6889fbd80eeecf28dbc6300fbc539f3c184ca2f59780e27a576c1d1fb9772e99fd17881d02ac7dfd39675aca918453283ed8c3169085ef4a466b91c1649cc341dfdee60e32231fc34c9c4e0b9a2ba87ca8f372589c744c15fd6f985eec15e98136f25beeb4b13c4e43dc84abcc79cd4646c\",\n      \"derive_key\": \"379bcc61d0051dd489f686c13de00d5b14c505245103dc040d9e4dd1facab8e5114493d029bdbd295aaa744a59e31f35c7f52dba9c3642f773dd0b4262a9980a2aef811697e1305d37ba9d8b6d850ef07fe41108993180cf779aeece363704c76483458603bbeeb693cffbbe5588d1f3535dcad888893e53d977424bb707201569a8d2\"\n    },\n    {\n      \"input_len\": 7168,\n      \"hash\": \"61da957ec2499a95d6b8023e2b0e604ec7f6b50e80a9678b89d2628e99ada77a5707c321c83361793b9af62a40f43b523df1c8633cecb4cd14d00bdc79c78fca5165b863893f6d38b02ff7236c5a9a8ad2dba87d24c547cab046c29fc5bc1ed142e1de4763613bb162a5a538e6ef05ed05199d751f9eb58d332791b8d73fb74e4fce95\",\n      \"keyed_hash\": \"b42835e40e9d4a7f42ad8cc04f85a963a76e18198377ed84adddeaecacc6f3fca2f01d5277d69bb681c70fa8d36094f73ec06e452c80d2ff2257ed82e7ba348400989a65ee8daa7094ae0933e3d2210ac6395c4af24f91c2b590ef87d7788d7066ea3eaebca4c08a4f14b9a27644f99084c3543711b64a070b94f2c9d1d8a90d035d52\",\n      \"derive_key\": \"11c37a112765370c94a51415d0d651190c288566e295d505defdad895dae223730d5a5175a38841693020669c7638f40b9bc1f9f39cf98bda7a5b54ae24218a800a2116b34665aa95d846d97ea988bfcb53dd9c055d588fa21ba78996776ea6c40bc428b53c62b5f3ccf200f647a5aae8067f0ea1976391fcc72af1945100e2a6dcb88\"\n    },\n    {\n      \"input_len\": 7169,\n      \"hash\": \"a003fc7a51754a9b3c7fae0367ab3d782dccf28855a03d435f8cfe74605e781798a8b20534be1ca9eb2ae2df3fae2ea60e48c6fb0b850b1385b5de0fe460dbe9d9f9b0d8db4435da75c601156df9d047f4ede008732eb17adc05d96180f8a73548522840779e6062d643b79478a6e8dbce68927f36ebf676ffa7d72d5f68f050b119c8\",\n      \"keyed_hash\": \"ed9b1a922c046fdb3d423ae34e143b05ca1bf28b710432857bf738bcedbfa5113c9e28d72fcbfc020814ce3f5d4fc867f01c8f5b6caf305b3ea8a8ba2da3ab69fabcb438f19ff11f5378ad4484d75c478de425fb8e6ee809b54eec9bdb184315dc856617c09f5340451bf42fd3270a7b0b6566169f242e533777604c118a6358250f54\",\n      \"derive_key\": \"554b0a5efea9ef183f2f9b931b7497995d9eb26f5c5c6dad2b97d62fc5ac31d99b20652c016d88ba2a611bbd761668d5eda3e568e940faae24b0d9991c3bd25a65f770b89fdcadabcb3d1a9c1cb63e69721cacf1ae69fefdcef1e3ef41bc5312ccc17222199e47a26552c6adc460cf47a72319cb5039369d0060eaea59d6c65130f1dd\"\n    },\n    {\n      \"input_len\": 8192,\n      \"hash\": \"aae792484c8efe4f19e2ca7d371d8c467ffb10748d8a5a1ae579948f718a2a635fe51a27db045a567c1ad51be5aa34c01c6651c4d9b5b5ac5d0fd58cf18dd61a47778566b797a8c67df7b1d60b97b19288d2d877bb2df417ace009dcb0241ca1257d62712b6a4043b4ff33f690d849da91ea3bf711ed583cb7b7a7da2839ba71309bbf\",\n      \"keyed_hash\": \"dc9637c8845a770b4cbf76b8daec0eebf7dc2eac11498517f08d44c8fc00d58a4834464159dcbc12a0ba0c6d6eb41bac0ed6585cabfe0aca36a375e6c5480c22afdc40785c170f5a6b8a1107dbee282318d00d915ac9ed1143ad40765ec120042ee121cd2baa36250c618adaf9e27260fda2f94dea8fb6f08c04f8f10c78292aa46102\",\n      \"derive_key\": \"ad01d7ae4ad059b0d33baa3c01319dcf8088094d0359e5fd45d6aeaa8b2d0c3d4c9e58958553513b67f84f8eac653aeeb02ae1d5672dcecf91cd9985a0e67f4501910ecba25555395427ccc7241d70dc21c190e2aadee875e5aae6bf1912837e53411dabf7a56cbf8e4fb780432b0d7fe6cec45024a0788cf5874616407757e9e6bef7\"\n    },\n    {\n      \"input_len\": 8193,\n      \"hash\": \"bab6c09cb8ce8cf459261398d2e7aef35700bf488116ceb94a36d0f5f1b7bc3bb2282aa69be089359ea1154b9a9286c4a56af4de975a9aa4a5c497654914d279bea60bb6d2cf7225a2fa0ff5ef56bbe4b149f3ed15860f78b4e2ad04e158e375c1e0c0b551cd7dfc82f1b155c11b6b3ed51ec9edb30d133653bb5709d1dbd55f4e1ff6\",\n      \"keyed_hash\": \"954a2a75420c8d6547e3ba5b98d963e6fa6491addc8c023189cc519821b4a1f5f03228648fd983aef045c2fa8290934b0866b615f585149587dda2299039965328835a2b18f1d63b7e300fc76ff260b571839fe44876a4eae66cbac8c67694411ed7e09df51068a22c6e67d6d3dd2cca8ff12e3275384006c80f4db68023f24eebba57\",\n      \"derive_key\": \"af1e0346e389b17c23200270a64aa4e1ead98c61695d917de7d5b00491c9b0f12f20a01d6d622edf3de026a4db4e4526225debb93c1237934d71c7340bb5916158cbdafe9ac3225476b6ab57a12357db3abbad7a26c6e66290e44034fb08a20a8d0ec264f309994d2810c49cfba6989d7abb095897459f5425adb48aba07c5fb3c83c0\"\n    },\n    {\n      \"input_len\": 16384,\n      \"hash\": \"f875d6646de28985646f34ee13be9a576fd515f76b5b0a26bb324735041ddde49d764c270176e53e97bdffa58d549073f2c660be0e81293767ed4e4929f9ad34bbb39a529334c57c4a381ffd2a6d4bfdbf1482651b172aa883cc13408fa67758a3e47503f93f87720a3177325f7823251b85275f64636a8f1d599c2e49722f42e93893\",\n      \"keyed_hash\": \"9e9fc4eb7cf081ea7c47d1807790ed211bfec56aa25bb7037784c13c4b707b0df9e601b101e4cf63a404dfe50f2e1865bb12edc8fca166579ce0c70dba5a5c0fc960ad6f3772183416a00bd29d4c6e651ea7620bb100c9449858bf14e1ddc9ecd35725581ca5b9160de04060045993d972571c3e8f71e9d0496bfa744656861b169d65\",\n      \"derive_key\": \"160e18b5878cd0df1c3af85eb25a0db5344d43a6fbd7a8ef4ed98d0714c3f7e160dc0b1f09caa35f2f417b9ef309dfe5ebd67f4c9507995a531374d099cf8ae317542e885ec6f589378864d3ea98716b3bbb65ef4ab5e0ab5bb298a501f19a41ec19af84a5e6b428ecd813b1a47ed91c9657c3fba11c406bc316768b58f6802c9e9b57\"\n    },\n    {\n      \"input_len\": 31744,\n      \"hash\": \"62b6960e1a44bcc1eb1a611a8d6235b6b4b78f32e7abc4fb4c6cdcce94895c47860cc51f2b0c28a7b77304bd55fe73af663c02d3f52ea053ba43431ca5bab7bfea2f5e9d7121770d88f70ae9649ea713087d1914f7f312147e247f87eb2d4ffef0ac978bf7b6579d57d533355aa20b8b77b13fd09748728a5cc327a8ec470f4013226f\",\n      \"keyed_hash\": \"efa53b389ab67c593dba624d898d0f7353ab99e4ac9d42302ee64cbf9939a4193a7258db2d9cd32a7a3ecfce46144114b15c2fcb68a618a976bd74515d47be08b628be420b5e830fade7c080e351a076fbc38641ad80c736c8a18fe3c66ce12f95c61c2462a9770d60d0f77115bbcd3782b593016a4e728d4c06cee4505cb0c08a42ec\",\n      \"derive_key\": \"39772aef80e0ebe60596361e45b061e8f417429d529171b6764468c22928e28e9759adeb797a3fbf771b1bcea30150a020e317982bf0d6e7d14dd9f064bc11025c25f31e81bd78a921db0174f03dd481d30e93fd8e90f8b2fee209f849f2d2a52f31719a490fb0ba7aea1e09814ee912eba111a9fde9d5c274185f7bae8ba85d300a2b\"\n    },\n    {\n      \"input_len\": 102400,\n      \"hash\": \"bc3e3d41a1146b069abffad3c0d44860cf664390afce4d9661f7902e7943e085e01c59dab908c04c3342b816941a26d69c2605ebee5ec5291cc55e15b76146e6745f0601156c3596cb75065a9c57f35585a52e1ac70f69131c23d611ce11ee4ab1ec2c009012d236648e77be9295dd0426f29b764d65de58eb7d01dd42248204f45f8e\",\n      \"keyed_hash\": \"1c35d1a5811083fd7119f5d5d1ba027b4d01c0c6c49fb6ff2cf75393ea5db4a7f9dbdd3e1d81dcbca3ba241bb18760f207710b751846faaeb9dff8262710999a59b2aa1aca298a032d94eacfadf1aa192418eb54808db23b56e34213266aa08499a16b354f018fc4967d05f8b9d2ad87a7278337be9693fc638a3bfdbe314574ee6fc4\",\n      \"derive_key\": \"4652cff7a3f385a6103b5c260fc1593e13c778dbe608efb092fe7ee69df6e9c6d83a3e041bc3a48df2879f4a0a3ed40e7c961c73eff740f3117a0504c2dff4786d44fb17f1549eb0ba585e40ec29bf7732f0b7e286ff8acddc4cb1e23b87ff5d824a986458dcc6a04ac83969b80637562953df51ed1a7e90a7926924d2763778be8560\"\n    }\n  ]\n}\n"
  },
  {
    "path": "third-party/blake3/tools/compiler_version/Cargo.toml",
    "content": "[package]\nname = \"compiler_version\"\nversion = \"0.0.0\"\nedition = \"2021\"\n\n[build-dependencies]\ncc = \"1.0.50\"\n"
  },
  {
    "path": "third-party/blake3/tools/compiler_version/build.rs",
    "content": "fn main() {\n    let build = cc::Build::new();\n    let compiler = build.get_compiler();\n    let compiler_path = compiler.path().to_string_lossy();\n    println!(\"cargo:rustc-env=COMPILER_PATH={}\", compiler_path);\n}\n"
  },
  {
    "path": "third-party/blake3/tools/compiler_version/src/main.rs",
    "content": "use std::process::Command;\n\nfn main() {\n    // Print the rustc version.\n    Command::new(env!(\"CARGO\"))\n        .args(&[\"rustc\", \"--quiet\", \"--\", \"--version\"])\n        .status()\n        .unwrap();\n    println!();\n\n    // Print the Cargo version.\n    Command::new(env!(\"CARGO\"))\n        .args(&[\"--version\"])\n        .status()\n        .unwrap();\n    println!();\n\n    // Print the C compiler version. This relies on C compiler detection done\n    // in build.rs, which sets the COMPILER_PATH variable.\n    let compiler_path = env!(\"COMPILER_PATH\");\n    let mut compiler_command = Command::new(compiler_path);\n    // Use the --version flag on everything other than MSVC.\n    if !cfg!(target_env = \"msvc\") {\n        compiler_command.arg(\"--version\");\n    }\n    let _ = compiler_command.status().unwrap();\n}\n"
  },
  {
    "path": "third-party/blake3/tools/instruction_set_support/Cargo.toml",
    "content": "[package]\nname = \"instruction_set_support\"\nversion = \"0.0.0\"\nedition = \"2021\"\n\n[dependencies]\n"
  },
  {
    "path": "third-party/blake3/tools/instruction_set_support/src/main.rs",
    "content": "fn main() {\n    #[cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))]\n    {\n        dbg!(is_x86_feature_detected!(\"sse2\"));\n        dbg!(is_x86_feature_detected!(\"sse4.1\"));\n        dbg!(is_x86_feature_detected!(\"avx2\"));\n        dbg!(is_x86_feature_detected!(\"avx512f\"));\n        dbg!(is_x86_feature_detected!(\"avx512vl\"));\n    }\n}\n"
  },
  {
    "path": "third-party/blake3/tools/release.md",
    "content": "# Release checklist\n\n- Make sure `cargo outdated -R` is clean in the root and in b3sum/.\n- Bump the version in the root Cargo.toml.\n- Bump the version in b3sum/Cargo.toml.\n    - Bump the dependency version too, if new features are used.\n- Delete b3sum/Cargo.lock and recreate it with `cargo build` or similar.\n- Update the `-h` output in b3sum/README.md if it's changed.\n- Bump `BLAKE3_VERSION_STRING` in c/blake3.h.\n- Bump `VERSION` in c/CMakeLists.txt.\n- Make a version bump commit with change notes.\n- `git push` and make sure CI is green.\n- `git tag` the version bump commit with the new version number.\n- `git push --tags`\n- `cargo publish` in the root.\n- `cargo publish` in b3sum/.\n"
  },
  {
    "path": "third-party/mimalloc/.gitattributes",
    "content": "# default behavior is to always use unix style line endings\n* text eol=lf\n*.png binary\n*.pdn binary\n*.jpg binary\n*.sln binary\n*.suo binary\n*.vcproj binary\n*.patch binary\n*.dll binary\n*.lib binary\n*.exe binary\n"
  },
  {
    "path": "third-party/mimalloc/.gitignore",
    "content": "build\nide/vs20??/*.db\nide/vs20??/*.opendb\nide/vs20??/*.user\nide/vs20??/.vs\nide/vs20??/VTune*\nout/\ndocs/\n*.zip\n*.tar\n*.gz\n.vscode\n.DS_STore\n"
  },
  {
    "path": "third-party/mimalloc/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.18)\nproject(libmimalloc C CXX)\n\nset(CMAKE_C_STANDARD 11)\nset(CMAKE_CXX_STANDARD 17)\n\noption(MI_SECURE            \"Use full security mitigations (like guard pages, allocation randomization, double-free mitigation, and free-list corruption detection)\" OFF)\noption(MI_DEBUG_FULL        \"Use full internal heap invariant checking in DEBUG mode (expensive)\" OFF)\noption(MI_PADDING           \"Enable padding to detect heap block overflow (always on in DEBUG or SECURE mode, or with Valgrind/ASAN)\" OFF)\noption(MI_OVERRIDE          \"Override the standard malloc interface (i.e. define entry points for 'malloc', 'free', etc)\" ON)\noption(MI_XMALLOC           \"Enable abort() call on memory allocation failure by default\" OFF)\noption(MI_SHOW_ERRORS       \"Show error and warning messages by default (only enabled by default in DEBUG mode)\" OFF)\noption(MI_TRACK_VALGRIND    \"Compile with Valgrind support (adds a small overhead)\" OFF)\noption(MI_TRACK_ASAN        \"Compile with address sanitizer support (adds a small overhead)\" OFF)\noption(MI_TRACK_ETW         \"Compile with Windows event tracing (ETW) support (adds a small overhead)\" OFF)\noption(MI_USE_CXX           \"Use the C++ compiler to compile the library (instead of the C compiler)\" OFF)\noption(MI_OPT_ARCH          \"Only for optimized builds: turn on architecture specific optimizations (for arm64: '-march=armv8.1-a' (2016))\" OFF)\noption(MI_SEE_ASM           \"Generate assembly files\" OFF)\noption(MI_OSX_INTERPOSE     \"Use interpose to override standard malloc on macOS\" ON)\noption(MI_OSX_ZONE          \"Use malloc zone to override standard malloc on macOS\" ON)\noption(MI_WIN_REDIRECT      \"Use redirection module ('mimalloc-redirect') on Windows if compiling mimalloc as a DLL\" ON)\noption(MI_WIN_USE_FIXED_TLS \"Use a fixed TLS slot on Windows to avoid extra tests in the malloc fast path\" OFF)\noption(MI_LOCAL_DYNAMIC_TLS \"Use local-dynamic-tls, a slightly slower but dlopen-compatible thread local storage mechanism (Unix)\" OFF)\noption(MI_LIBC_MUSL         \"Set this when linking with musl libc\" OFF)\noption(MI_BUILD_SHARED      \"Build shared library\" ON)\noption(MI_BUILD_STATIC      \"Build static library\" ON)\noption(MI_BUILD_OBJECT      \"Build object library\" ON)\noption(MI_BUILD_TESTS       \"Build test executables\" ON)\noption(MI_DEBUG_TSAN        \"Build with thread sanitizer (needs clang)\" OFF)\noption(MI_DEBUG_UBSAN       \"Build with undefined-behavior sanitizer (needs clang++)\" OFF)\noption(MI_GUARDED           \"Build with guard pages behind certain object allocations (implies MI_NO_PADDING=ON)\" OFF)\noption(MI_SKIP_COLLECT_ON_EXIT \"Skip collecting memory on program exit\" OFF)\noption(MI_NO_PADDING        \"Force no use of padding even in DEBUG mode etc.\" OFF)\noption(MI_INSTALL_TOPLEVEL  \"Install directly into $CMAKE_INSTALL_PREFIX instead of PREFIX/lib/mimalloc-version\" OFF)\noption(MI_NO_THP            \"Disable transparent huge pages support on Linux/Android for the mimalloc process only\" OFF)\noption(MI_EXTRA_CPPDEFS     \"Extra pre-processor definitions (use as `-DMI_EXTRA_CPPDEFS=\\\"opt1=val1;opt2=val2\\\"`)\" \"\")\n\n# negated options for vcpkg features\noption(MI_NO_USE_CXX        \"Use plain C compilation (has priority over MI_USE_CXX)\" OFF)\noption(MI_NO_OPT_ARCH       \"Do not use architecture specific optimizations (like '-march=armv8.1-a' for example) (has priority over MI_OPT_ARCH)\" OFF)\n\n# deprecated options\noption(MI_WIN_USE_FLS       \"Use Fiber local storage on Windows to detect thread termination (deprecated)\" OFF)\noption(MI_CHECK_FULL        \"Use full internal invariant checking in DEBUG mode (deprecated, use MI_DEBUG_FULL instead)\" OFF)\noption(MI_USE_LIBATOMIC     \"Explicitly link with -latomic (on older systems) (deprecated and detected automatically)\" OFF)\n\ninclude(CheckLinkerFlag)    # requires cmake 3.18\ninclude(CheckIncludeFiles)\ninclude(GNUInstallDirs)\ninclude(\"cmake/mimalloc-config-version.cmake\")\n\nset(mi_sources\n    src/alloc.c\n    src/alloc-aligned.c\n    src/alloc-posix.c\n    src/arena.c\n    src/bitmap.c\n    src/heap.c\n    src/init.c\n    src/libc.c\n    src/options.c\n    src/os.c\n    src/page.c\n    src/random.c\n    src/segment.c\n    src/segment-map.c\n    src/stats.c\n    src/prim/prim.c)\n\nset(mi_cflags \"\")\nset(mi_cflags_static \"\")            # extra flags for a static library build\nset(mi_cflags_dynamic \"\")           # extra flags for a shared-object library build\nset(mi_libraries \"\")\n\nif(MI_EXTRA_CPPDEFS)\n set(mi_defines ${MI_EXTRA_CPPDEFS})\nelse()\n set(mi_defines \"\")\nendif()\n\n# pass git revision as a define\nif(EXISTS \"${CMAKE_SOURCE_DIR}/.git/index\")\n  find_package(Git)\n  if(GIT_FOUND)\n    execute_process(COMMAND ${GIT_EXECUTABLE} \"describe\" OUTPUT_VARIABLE mi_git_describe RESULT_VARIABLE mi_git_res ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)\n    if(mi_git_res EQUAL \"0\")\n      list(APPEND mi_defines \"MI_GIT_DESCRIBE=${mi_git_describe}\")\n      # add to dependencies so we rebuild if the git head commit changes\n      set_property(GLOBAL APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS \"${CMAKE_SOURCE_DIR}/.git/index\")\n    endif()\n  endif()\nendif()\n\n# -----------------------------------------------------------------------------\n# Convenience: set default build type and compiler depending on the build directory\n# -----------------------------------------------------------------------------\n\nmessage(STATUS \"\")\nif (NOT CMAKE_BUILD_TYPE)\n  if (\"${CMAKE_BINARY_DIR}\" MATCHES \".*((D|d)ebug|asan|tsan|ubsan|valgrind)$\" OR MI_DEBUG_FULL)\n    message(STATUS \"No build type selected, default to 'Debug'\")\n    set(CMAKE_BUILD_TYPE \"Debug\")\n  else()\n    message(STATUS \"No build type selected, default to 'Release'\")\n    set(CMAKE_BUILD_TYPE \"Release\")\n  endif()\nendif()\n\nif (CMAKE_GENERATOR MATCHES \"^Visual Studio.*$\")\n  message(STATUS \"Note: when building with Visual Studio the build type is specified when building.\")\n  message(STATUS \"For example: 'cmake --build . --config=Release\")\nendif()\n\nif(\"${CMAKE_BINARY_DIR}\" MATCHES \".*(S|s)ecure$\")\n  message(STATUS \"Default to secure build\")\n  set(MI_SECURE \"ON\")\nendif()\n\n\n# Determine architecture\nset(MI_OPT_ARCH_FLAGS \"\")\nset(MI_ARCH \"unknown\")\nif(CMAKE_SYSTEM_PROCESSOR MATCHES \"^(x86|i[3456]86)$\" OR CMAKE_GENERATOR_PLATFORM MATCHES \"^(x86|Win32)$\")\n  set(MI_ARCH \"x86\")\nelseif(CMAKE_SYSTEM_PROCESSOR MATCHES \"^(x86_64|x64|amd64|AMD64)$\" OR CMAKE_GENERATOR_PLATFORM STREQUAL \"x64\" OR \"x86_64\" IN_LIST CMAKE_OSX_ARCHITECTURES) # must be before arm64\n  set(MI_ARCH \"x64\")\nelseif(CMAKE_SYSTEM_PROCESSOR MATCHES \"^(aarch64|arm64|armv[89].?|ARM64)$\" OR CMAKE_GENERATOR_PLATFORM STREQUAL \"ARM64\" OR \"arm64\" IN_LIST CMAKE_OSX_ARCHITECTURES)\n  set(MI_ARCH \"arm64\")\nelseif(CMAKE_SYSTEM_PROCESSOR MATCHES \"^(arm|armv[34567]|ARM)$\")\n  set(MI_ARCH \"arm32\")\nelseif(CMAKE_SYSTEM_PROCESSOR MATCHES \"^(riscv|riscv32|riscv64)$\")\n  if(CMAKE_SIZEOF_VOID_P==4)\n    set(MI_ARCH \"riscv32\")\n  else()\n    set(MI_ARCH \"riscv64\")\n  endif()\nelse()\n  set(MI_ARCH ${CMAKE_SYSTEM_PROCESSOR})\nendif()\nmessage(STATUS \"Architecture: ${MI_ARCH}\") # (${CMAKE_SYSTEM_PROCESSOR}, ${CMAKE_GENERATOR_PLATFORM}, ${CMAKE_GENERATOR})\")\n\n# negative overrides (mainly to support vcpkg features)\nif(MI_NO_USE_CXX)\n  set(MI_USE_CXX \"OFF\")\nendif()\nif(MI_NO_OPT_ARCH)\n  set(MI_OPT_ARCH \"OFF\")\nelseif(MI_ARCH STREQUAL \"arm64\")\n  set(MI_OPT_ARCH \"ON\")  # enable armv8.1-a by default on arm64 unless MI_NO_OPT_ARCH is set\nendif()\n\n\n# -----------------------------------------------------------------------------\n# Process options\n# -----------------------------------------------------------------------------\n\nif(CMAKE_C_COMPILER_ID STREQUAL \"Clang\" AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL \"MSVC\")\n  set(MI_CLANG_CL \"ON\")\nendif()\n\n# put -Wall early so other warnings can be disabled selectively\nif(CMAKE_C_COMPILER_ID MATCHES \"AppleClang|Clang\")\n  if (MI_CLANG_CL)\n    list(APPEND mi_cflags -W)\n  else()\n    list(APPEND mi_cflags -Wall -Wextra -Wpedantic)\n  endif()\nendif()\nif(CMAKE_C_COMPILER_ID MATCHES \"GNU\")\n    list(APPEND mi_cflags -Wall -Wextra)\nendif()\nif(CMAKE_C_COMPILER_ID MATCHES \"Intel\")\n    list(APPEND mi_cflags -Wall)\nendif()\n\nif(CMAKE_C_COMPILER_ID MATCHES \"MSVC|Intel\")\n  set(MI_USE_CXX \"ON\")\nendif()\n\nif(MI_OVERRIDE)\n  message(STATUS \"Override standard malloc (MI_OVERRIDE=ON)\")\n  if(APPLE)\n    if(MI_OSX_ZONE)\n      # use zone's on macOS\n      message(STATUS \"  Use malloc zone to override malloc (MI_OSX_ZONE=ON)\")\n      list(APPEND mi_sources src/prim/osx/alloc-override-zone.c)\n      list(APPEND mi_defines MI_OSX_ZONE=1)\n      if (NOT MI_OSX_INTERPOSE)\n        message(STATUS \"  WARNING: zone overriding usually also needs interpose (use -DMI_OSX_INTERPOSE=ON)\")\n      endif()\n    endif()\n    if(MI_OSX_INTERPOSE)\n      # use interpose on macOS\n      message(STATUS \"  Use interpose to override malloc (MI_OSX_INTERPOSE=ON)\")\n      list(APPEND mi_defines MI_OSX_INTERPOSE=1)\n      if (NOT MI_OSX_ZONE)\n        message(STATUS \"  WARNING: interpose usually also needs zone overriding (use -DMI_OSX_INTERPOSE=ON)\")\n      endif()\n    endif()\n    if(MI_USE_CXX AND MI_OSX_INTERPOSE)\n      message(STATUS \"  WARNING: if dynamically overriding malloc/free, it is more reliable to build mimalloc as C code (use -DMI_USE_CXX=OFF)\")\n    endif()\n  endif()\nendif()\n\nif(WIN32)\n  if (NOT MI_WIN_REDIRECT)\n    # use a negative define for backward compatibility\n    list(APPEND mi_defines MI_WIN_NOREDIRECT=1)\n  endif()\nendif()\n\nif(MI_SECURE)\n  message(STATUS \"Set full secure build (MI_SECURE=ON)\")\n  list(APPEND mi_defines MI_SECURE=4)\nendif()\n\nif(MI_TRACK_VALGRIND)\n  CHECK_INCLUDE_FILES(\"valgrind/valgrind.h;valgrind/memcheck.h\" MI_HAS_VALGRINDH)\n  if (NOT MI_HAS_VALGRINDH)\n    set(MI_TRACK_VALGRIND OFF)\n    message(WARNING \"Cannot find the 'valgrind/valgrind.h' and 'valgrind/memcheck.h' -- install valgrind first?\")\n    message(STATUS  \"Disabling Valgrind support (MI_TRACK_VALGRIND=OFF)\")\n  else()\n    message(STATUS \"Compile with Valgrind support (MI_TRACK_VALGRIND=ON)\")\n    list(APPEND mi_defines MI_TRACK_VALGRIND=1)\n  endif()\nendif()\n\nif(MI_TRACK_ASAN)\n  if (APPLE AND MI_OVERRIDE)\n    set(MI_TRACK_ASAN OFF)\n    message(WARNING \"Cannot enable address sanitizer support on macOS if MI_OVERRIDE is ON (MI_TRACK_ASAN=OFF)\")\n  endif()\n  if (MI_TRACK_VALGRIND)\n    set(MI_TRACK_ASAN OFF)\n    message(WARNING \"Cannot enable address sanitizer support with also Valgrind support enabled (MI_TRACK_ASAN=OFF)\")\n  endif()\n  if(MI_TRACK_ASAN)\n    CHECK_INCLUDE_FILES(\"sanitizer/asan_interface.h\" MI_HAS_ASANH)\n    if (NOT MI_HAS_ASANH)\n      set(MI_TRACK_ASAN OFF)\n      message(WARNING \"Cannot find the 'sanitizer/asan_interface.h' -- install address sanitizer support first\")\n      message(STATUS  \"Compile **without** address sanitizer support (MI_TRACK_ASAN=OFF)\")\n    else()\n      message(STATUS \"Compile with address sanitizer support (MI_TRACK_ASAN=ON)\")\n      list(APPEND mi_defines MI_TRACK_ASAN=1)\n      list(APPEND mi_cflags -fsanitize=address)\n      list(APPEND mi_libraries -fsanitize=address)\n    endif()\n  endif()\nendif()\n\nif(MI_TRACK_ETW)\n  if(NOT WIN32)\n    set(MI_TRACK_ETW OFF)\n    message(WARNING \"Can only enable ETW support on Windows (MI_TRACK_ETW=OFF)\")\n  endif()\n  if (MI_TRACK_VALGRIND OR MI_TRACK_ASAN)\n    set(MI_TRACK_ETW OFF)\n    message(WARNING \"Cannot enable ETW support with also Valgrind or ASAN support enabled (MI_TRACK_ETW=OFF)\")\n  endif()\n  if(MI_TRACK_ETW)\n    message(STATUS \"Compile with Windows event tracing support (MI_TRACK_ETW=ON)\")\n    list(APPEND mi_defines MI_TRACK_ETW=1)\n  endif()\nendif()\n\nif(MI_GUARDED)\n  message(STATUS \"Compile guard pages behind certain object allocations (MI_GUARDED=ON)\")\n  list(APPEND mi_defines MI_GUARDED=1)\n  if(NOT MI_NO_PADDING)\n    message(STATUS \"  Disabling padding due to guard pages (MI_NO_PADDING=ON)\")\n    set(MI_NO_PADDING ON)\n  endif()\nendif()\n\nif(MI_SEE_ASM)\n  message(STATUS \"Generate assembly listings (MI_SEE_ASM=ON)\")\n  list(APPEND mi_cflags -save-temps)\n  if(CMAKE_C_COMPILER_ID MATCHES \"AppleClang|Clang\")\n    message(STATUS \"No GNU Line marker\")\n    list(APPEND mi_cflags -Wno-gnu-line-marker)\n  endif()\nendif()\n\nif(MI_CHECK_FULL)\n  message(STATUS \"The MI_CHECK_FULL option is deprecated, use MI_DEBUG_FULL instead\")\n  set(MI_DEBUG_FULL \"ON\")\nendif()\n\nif (MI_SKIP_COLLECT_ON_EXIT)\n  message(STATUS \"Skip collecting memory on program exit (MI_SKIP_COLLECT_ON_EXIT=ON)\")\n  list(APPEND mi_defines MI_SKIP_COLLECT_ON_EXIT=1)\nendif()\n\nif(MI_DEBUG_FULL)\n  message(STATUS \"Set debug level to full internal invariant checking (MI_DEBUG_FULL=ON)\")\n  list(APPEND mi_defines MI_DEBUG=3)   # full invariant checking\nendif()\n\nif(MI_NO_PADDING)\n  message(STATUS \"Suppress any padding of heap blocks (MI_NO_PADDING=ON)\")\n  list(APPEND mi_defines MI_PADDING=0)\nelse()\n  if(MI_PADDING)\n    message(STATUS \"Enable explicit padding of heap blocks (MI_PADDING=ON)\")\n    list(APPEND mi_defines MI_PADDING=1)\n  endif()\nendif()\n\nif(MI_XMALLOC)\n  message(STATUS \"Enable abort() calls on memory allocation failure (MI_XMALLOC=ON)\")\n  list(APPEND mi_defines MI_XMALLOC=1)\nendif()\n\nif(MI_SHOW_ERRORS)\n  message(STATUS \"Enable printing of error and warning messages by default (MI_SHOW_ERRORS=ON)\")\n  list(APPEND mi_defines MI_SHOW_ERRORS=1)\nendif()\n\nif(MI_DEBUG_TSAN)\n  if(CMAKE_C_COMPILER_ID MATCHES \"Clang\")\n    message(STATUS \"Build with thread sanitizer (MI_DEBUG_TSAN=ON)\")\n    list(APPEND mi_defines MI_TSAN=1)\n    list(APPEND mi_cflags -fsanitize=thread -g -O1)\n    list(APPEND mi_libraries -fsanitize=thread)\n  else()\n    message(WARNING \"Can only use thread sanitizer with clang (MI_DEBUG_TSAN=ON but ignored)\")\n  endif()\nendif()\n\nif(MI_DEBUG_UBSAN)\n  if(CMAKE_BUILD_TYPE MATCHES \"Debug\")\n    if(CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n      message(STATUS \"Build with undefined-behavior sanitizer (MI_DEBUG_UBSAN=ON)\")\n      list(APPEND mi_defines MI_UBSAN=1)\n      list(APPEND mi_cflags -fsanitize=undefined -g -fno-sanitize-recover=undefined)\n      list(APPEND mi_libraries -fsanitize=undefined)\n      if (NOT MI_USE_CXX)\n        message(STATUS \"(switch to use C++ due to MI_DEBUG_UBSAN)\")\n        set(MI_USE_CXX \"ON\")\n      endif()\n    else()\n      message(WARNING \"Can only use undefined-behavior sanitizer with clang++ (MI_DEBUG_UBSAN=ON but ignored)\")\n    endif()\n  else()\n    message(WARNING \"Can only use undefined-behavior sanitizer with a debug build (CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})\")\n  endif()\nendif()\n\nif(MI_USE_CXX)\n  message(STATUS \"Use the C++ compiler to compile (MI_USE_CXX=ON)\")\n  set_source_files_properties(${mi_sources} PROPERTIES LANGUAGE CXX )\n  set_source_files_properties(src/static.c test/test-api.c test/test-api-fill test/test-stress PROPERTIES LANGUAGE CXX )\n  if(CMAKE_CXX_COMPILER_ID MATCHES \"AppleClang|Clang\")\n    list(APPEND mi_cflags -Wno-deprecated)\n  endif()\n  if(CMAKE_CXX_COMPILER_ID MATCHES \"Intel\" AND NOT CMAKE_CXX_COMPILER_ID MATCHES \"IntelLLVM\")\n    list(APPEND mi_cflags -Kc++)\n  endif()\nendif()\n\nif(CMAKE_SYSTEM_NAME MATCHES \"Linux|Android\")\n  if(MI_NO_THP)\n    message(STATUS \"Disable transparent huge pages support (MI_NO_THP=ON)\")\n    list(APPEND mi_defines MI_NO_THP=1)\n  endif()\nendif()\n\nif(MI_LIBC_MUSL)\n  message(STATUS \"Assume using musl libc (MI_LIBC_MUSL=ON)\")\n  list(APPEND mi_defines MI_LIBC_MUSL=1)\nendif()\n\nif(MI_WIN_USE_FLS)\n  message(STATUS \"Use the Fiber API to detect thread termination (deprecated) (MI_WIN_USE_FLS=ON)\")\n  list(APPEND mi_defines MI_WIN_USE_FLS=1)\nendif()\n\nif(MI_WIN_USE_FIXED_TLS)\n  message(STATUS \"Use fixed TLS slot on Windows to avoid extra tests in the malloc fast path (MI_WIN_USE_FIXED_TLS=ON)\")\n  list(APPEND mi_defines MI_WIN_USE_FIXED_TLS=1)\nendif()\n\n# Check /proc/cpuinfo for an SV39 MMU and limit the virtual address bits.\n# (this will skip the aligned hinting in that case. Issue #939, #949)\nif (EXISTS /proc/cpuinfo)\n  file(STRINGS /proc/cpuinfo mi_sv39_mmu REGEX \"^mmu[ \\t]+:[ \\t]+sv39$\")\n  if (mi_sv39_mmu)\n    MESSAGE( STATUS \"Set virtual address bits to 39 (SV39 MMU detected)\" )\n    list(APPEND mi_defines MI_DEFAULT_VIRTUAL_ADDRESS_BITS=39)\n  endif()\nendif()\n\n# On Haiku use `-DCMAKE_INSTALL_PREFIX` instead, issue #788\n# if(CMAKE_SYSTEM_NAME MATCHES \"Haiku\")\n#   SET(CMAKE_INSTALL_LIBDIR ~/config/non-packaged/lib)\n#   SET(CMAKE_INSTALL_INCLUDEDIR ~/config/non-packaged/headers)\n# endif()\n\n# Compiler flags\nif(CMAKE_C_COMPILER_ID MATCHES \"AppleClang|Clang|GNU\" AND NOT MI_CLANG_CL)\n  list(APPEND mi_cflags -Wno-unknown-pragmas -fvisibility=hidden)\n  if(NOT MI_USE_CXX)\n    list(APPEND mi_cflags -Wstrict-prototypes)\n  endif()\n  if(CMAKE_C_COMPILER_ID MATCHES \"AppleClang|Clang\")\n    list(APPEND mi_cflags -Wno-static-in-inline)\n  endif()\nendif()\n\nif(CMAKE_C_COMPILER_ID MATCHES \"Intel\")\n  list(APPEND mi_cflags -fvisibility=hidden)\nendif()\n\nif(CMAKE_C_COMPILER_ID MATCHES \"AppleClang|Clang|GNU|Intel\" AND NOT CMAKE_SYSTEM_NAME MATCHES \"Haiku\" AND NOT MI_CLANG_CL)\n  if(MI_LOCAL_DYNAMIC_TLS)\n    list(APPEND mi_cflags -ftls-model=local-dynamic)\n  else()\n    if(MI_LIBC_MUSL)\n      # with musl we use local-dynamic for the static build, see issue #644\n      list(APPEND mi_cflags_static  -ftls-model=local-dynamic)\n      list(APPEND mi_cflags_dynamic -ftls-model=initial-exec)\n      message(STATUS \"Use local dynamic TLS for the static build (since MI_LIBC_MUSL=ON)\")\n    else()\n      list(APPEND mi_cflags -ftls-model=initial-exec)\n    endif()\n  endif()\n  if(MI_OVERRIDE)\n    list(APPEND mi_cflags -fno-builtin-malloc)\n  endif()\nendif()\n\nif(CMAKE_C_COMPILER_ID MATCHES \"AppleClang|Clang|GNU|Intel\" AND NOT CMAKE_SYSTEM_NAME MATCHES \"Haiku\")\n  if(MI_OPT_ARCH)\n    if(APPLE AND CMAKE_C_COMPILER_ID STREQUAL \"AppleClang\" AND CMAKE_OSX_ARCHITECTURES)   # to support multi-arch binaries (#999)\n      if(\"arm64\" IN_LIST CMAKE_OSX_ARCHITECTURES)\n        list(APPEND MI_OPT_ARCH_FLAGS \"-Xarch_arm64;-march=armv8.1-a\")\n      endif()\n    elseif(MI_ARCH STREQUAL \"arm64\")\n      set(MI_OPT_ARCH_FLAGS \"-march=armv8.1-a\")  # fast atomics\n    endif()\n  endif()\nendif()\n\nif (MSVC AND MSVC_VERSION GREATER_EQUAL 1914)\n  list(APPEND mi_cflags /Zc:__cplusplus)\n  if(MI_OPT_ARCH AND NOT MI_CLANG_CL)\n    if(MI_ARCH STREQUAL \"arm64\")\n      set(MI_OPT_ARCH_FLAGS \"/arch:armv8.1\")           # fast atomics\n    endif()\n  endif()\nendif()\n\nif(MINGW)\n  add_definitions(-D_WIN32_WINNT=0x600)                # issue #976\nendif()\n\nif(MI_OPT_ARCH_FLAGS)\n  list(APPEND mi_cflags ${MI_OPT_ARCH_FLAGS})\n  message(STATUS \"Architecture specific optimization is enabled (with ${MI_OPT_ARCH_FLAGS}) (MI_OPT_ARCH=ON)\")\nendif()\n\n# extra needed libraries\n\n# we prefer -l<lib> test over `find_library` as sometimes core libraries\n# like `libatomic` are not on the system path (see issue #898)\nfunction(find_link_library libname outlibname)\n  check_linker_flag(C \"-l${libname}\" mi_has_lib${libname})\n  if (mi_has_lib${libname})\n    message(VERBOSE \"link library: -l${libname}\")\n    set(${outlibname} ${libname} PARENT_SCOPE)\n  else()\n    find_library(MI_LIBPATH libname)\n    if (MI_LIBPATH)\n      message(VERBOSE \"link library ${libname} at ${MI_LIBPATH}\")\n      set(${outlibname} ${MI_LIBPATH} PARENT_SCOPE)\n    else()\n      message(VERBOSE \"link library not found: ${libname}\")\n      set(${outlibname} \"\" PARENT_SCOPE)\n    endif()\n  endif()\nendfunction()\n\nif(WIN32)\n  list(APPEND mi_libraries psapi shell32 user32 advapi32 bcrypt)\nelse()\n  find_link_library(\"pthread\" MI_LIB_PTHREAD)\n  if(MI_LIB_PTHREAD)\n    list(APPEND mi_libraries \"${MI_LIB_PTHREAD}\")\n  endif()\n  find_link_library(\"rt\" MI_LIB_RT)\n  if(MI_LIB_RT)\n    list(APPEND mi_libraries \"${MI_LIB_RT}\")\n  endif()\n  find_link_library(\"atomic\" MI_LIB_ATOMIC)\n  if(MI_LIB_ATOMIC)\n    list(APPEND mi_libraries \"${MI_LIB_ATOMIC}\")\n  endif()\nendif()\n\n\n# -----------------------------------------------------------------------------\n# Install and output names\n# -----------------------------------------------------------------------------\n\n# dynamic/shared library and symlinks always go to /usr/local/lib equivalent\n# we use ${CMAKE_INSTALL_BINDIR} and ${CMAKE_INSTALL_LIBDIR}.\n\n# static libraries and object files, includes, and cmake config files\n# are either installed at top level, or use versioned directories for side-by-side installation (default)\nif (MI_INSTALL_TOPLEVEL)\n  set(mi_install_objdir     \"${CMAKE_INSTALL_LIBDIR}\")\n  set(mi_install_incdir     \"${CMAKE_INSTALL_INCLUDEDIR}\")\n  set(mi_install_cmakedir   \"${CMAKE_INSTALL_LIBDIR}/cmake/mimalloc\")\nelse()\n  set(mi_install_objdir     \"${CMAKE_INSTALL_LIBDIR}/mimalloc-${mi_version}\")       # for static library and object files\n  set(mi_install_incdir     \"${CMAKE_INSTALL_INCLUDEDIR}/mimalloc-${mi_version}\")   # for includes\n  set(mi_install_cmakedir   \"${CMAKE_INSTALL_LIBDIR}/cmake/mimalloc-${mi_version}\") # for cmake package info\nendif()\n\nset(mi_libname \"mimalloc\")\nif(MI_SECURE)\n  set(mi_libname \"${mi_libname}-secure\")\nendif()\nif(MI_TRACK_VALGRIND)\n  set(mi_libname \"${mi_libname}-valgrind\")\nendif()\nif(MI_TRACK_ASAN)\n  set(mi_libname \"${mi_libname}-asan\")\nendif()\nstring(TOLOWER \"${CMAKE_BUILD_TYPE}\" CMAKE_BUILD_TYPE_LC)\nlist(APPEND mi_defines \"MI_CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE_LC}\")  #todo: multi-config project needs $<CONFIG> ?\nif(NOT(CMAKE_BUILD_TYPE_LC MATCHES \"^(release|relwithdebinfo|minsizerel|none)$\"))\n  set(mi_libname \"${mi_libname}-${CMAKE_BUILD_TYPE_LC}\") #append build type (e.g. -debug) if not a release version\nendif()\n\nif(MI_BUILD_SHARED)\n  list(APPEND mi_build_targets \"shared\")\nendif()\nif(MI_BUILD_STATIC)\n  list(APPEND mi_build_targets \"static\")\nendif()\nif(MI_BUILD_OBJECT)\n  list(APPEND mi_build_targets \"object\")\nendif()\nif(MI_BUILD_TESTS)\n  list(APPEND mi_build_targets \"tests\")\nendif()\n\nmessage(STATUS \"\")\nmessage(STATUS \"Library name     : ${mi_libname}\")\nmessage(STATUS \"Version          : ${mi_version}.${mi_version_patch}\")\nmessage(STATUS \"Build type       : ${CMAKE_BUILD_TYPE_LC}\")\nif(MI_USE_CXX)\n  message(STATUS \"C++ Compiler     : ${CMAKE_CXX_COMPILER}\")\nelse()\n  message(STATUS \"C Compiler       : ${CMAKE_C_COMPILER}\")\nendif()\nmessage(STATUS \"Compiler flags   : ${mi_cflags}\")\nmessage(STATUS \"Compiler defines : ${mi_defines}\")\nmessage(STATUS \"Link libraries   : ${mi_libraries}\")\nmessage(STATUS \"Build targets    : ${mi_build_targets}\")\nmessage(STATUS \"\")\n\n# -----------------------------------------------------------------------------\n# Main targets\n# -----------------------------------------------------------------------------\n\n# shared library\nif(MI_BUILD_SHARED)\n  add_library(mimalloc SHARED ${mi_sources})\n  set_target_properties(mimalloc PROPERTIES VERSION ${mi_version} SOVERSION ${mi_version_major} OUTPUT_NAME ${mi_libname} )\n  target_compile_definitions(mimalloc PRIVATE ${mi_defines} MI_SHARED_LIB MI_SHARED_LIB_EXPORT)\n  target_compile_options(mimalloc PRIVATE ${mi_cflags} ${mi_cflags_dynamic})\n  target_link_libraries(mimalloc PRIVATE ${mi_libraries})\n  target_include_directories(mimalloc PUBLIC\n      $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>\n      $<INSTALL_INTERFACE:${mi_install_incdir}>\n  )\n  install(TARGETS mimalloc EXPORT mimalloc ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})\n  install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir})\n\n  if(WIN32)\n    # On windows, the import library name for the dll would clash with the static mimalloc.lib library\n    # so we postfix the dll import library with `.dll.lib` (and also the .pdb debug file)\n    set_property(TARGET mimalloc PROPERTY ARCHIVE_OUTPUT_NAME \"${mi_libname}.dll\" )\n    install(FILES \"$<TARGET_FILE_DIR:mimalloc>/${mi_libname}.dll.lib\" DESTINATION ${CMAKE_INSTALL_LIBDIR})\n    set_property(TARGET mimalloc PROPERTY PDB_NAME \"${mi_libname}.dll\")\n    # don't try to install the pdb since it may not be generated depending on the configuration\n    # install(FILES \"$<TARGET_FILE_DIR:mimalloc>/${mi_libname}.dll.pdb\" DESTINATION ${CMAKE_INSTALL_LIBDIR})\n  endif()\n  if(WIN32 AND MI_WIN_REDIRECT)\n    # On windows, link and copy the mimalloc redirection dll too.\n    if(CMAKE_GENERATOR_PLATFORM STREQUAL \"arm64ec\")\n      set(MIMALLOC_REDIRECT_SUFFIX \"-arm64ec\")\n    elseif(MI_ARCH STREQUAL \"x64\")\n      set(MIMALLOC_REDIRECT_SUFFIX \"\")\n      if(CMAKE_SYSTEM_PROCESSOR STREQUAL \"ARM64\")\n        message(STATUS \"Note: x64 code emulated on Windows for arm64 should use an arm64ec build of 'mimalloc.dll'\")\n        message(STATUS \"      together with 'mimalloc-redirect-arm64ec.dll'. See the 'bin\\\\readme.md' for more information.\")\n      endif()\n    elseif(MI_ARCH STREQUAL \"x86\")\n      set(MIMALLOC_REDIRECT_SUFFIX \"32\")\n    else()\n      set(MIMALLOC_REDIRECT_SUFFIX \"-${MI_ARCH}\")  # -arm64 etc.\n    endif()\n\n    target_link_libraries(mimalloc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/bin/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.lib)  # the DLL import library\n    add_custom_command(TARGET mimalloc POST_BUILD\n      COMMAND \"${CMAKE_COMMAND}\" -E copy \"${CMAKE_CURRENT_SOURCE_DIR}/bin/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll\" $<TARGET_FILE_DIR:mimalloc>\n      COMMENT \"Copy mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll to output directory\")\n    install(FILES \"$<TARGET_FILE_DIR:mimalloc>/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll\" DESTINATION ${CMAKE_INSTALL_BINDIR})\n  endif()\nendif()\n\n\n# static library\nif (MI_BUILD_STATIC)\n  add_library(mimalloc-static STATIC ${mi_sources})\n  set_property(TARGET mimalloc-static PROPERTY OUTPUT_NAME ${mi_libname})\n  set_property(TARGET mimalloc-static PROPERTY POSITION_INDEPENDENT_CODE ON)\n  target_compile_definitions(mimalloc-static PRIVATE ${mi_defines} MI_STATIC_LIB)\n  target_compile_options(mimalloc-static PRIVATE ${mi_cflags} ${mi_cflags_static})\n  target_link_libraries(mimalloc-static PRIVATE ${mi_libraries})\n  target_include_directories(mimalloc-static PUBLIC\n      $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>\n      $<INSTALL_INTERFACE:${mi_install_incdir}>\n  )\n  install(TARGETS mimalloc-static EXPORT mimalloc DESTINATION ${mi_install_objdir} LIBRARY)\n  install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir})\nendif()\n\n# install include files\ninstall(FILES include/mimalloc.h DESTINATION ${mi_install_incdir})\ninstall(FILES include/mimalloc-override.h DESTINATION ${mi_install_incdir})\ninstall(FILES include/mimalloc-new-delete.h DESTINATION ${mi_install_incdir})\ninstall(FILES include/mimalloc-stats.h DESTINATION ${mi_install_incdir})\ninstall(FILES cmake/mimalloc-config.cmake DESTINATION ${mi_install_cmakedir})\ninstall(FILES cmake/mimalloc-config-version.cmake DESTINATION ${mi_install_cmakedir})\n\n\n# single object file for more predictable static overriding\nif (MI_BUILD_OBJECT)\n  add_library(mimalloc-obj OBJECT src/static.c)\n  set_property(TARGET mimalloc-obj PROPERTY POSITION_INDEPENDENT_CODE ON)\n  target_compile_definitions(mimalloc-obj PRIVATE ${mi_defines})\n  target_compile_options(mimalloc-obj PRIVATE ${mi_cflags} ${mi_cflags_static})\n  target_include_directories(mimalloc-obj PUBLIC\n      $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>\n      $<INSTALL_INTERFACE:${mi_install_incdir}>\n  )\n\n  # Copy the generated object file (`static.o`) to the output directory (as `mimalloc.o`)\n  if(CMAKE_GENERATOR MATCHES \"^Visual Studio.*$\")\n    set(mimalloc-obj-static \"${CMAKE_CURRENT_BINARY_DIR}/mimalloc-obj.dir/$<CONFIG>/static${CMAKE_C_OUTPUT_EXTENSION}\")\n  else()\n    set(mimalloc-obj-static \"${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/mimalloc-obj.dir/src/static.c${CMAKE_C_OUTPUT_EXTENSION}\")\n  endif()\n  set(mimalloc-obj-out \"${CMAKE_CURRENT_BINARY_DIR}/${mi_libname}${CMAKE_C_OUTPUT_EXTENSION}\")\n  add_custom_command(OUTPUT ${mimalloc-obj-out} DEPENDS mimalloc-obj COMMAND \"${CMAKE_COMMAND}\" -E copy \"${mimalloc-obj-static}\" \"${mimalloc-obj-out}\")\n  add_custom_target(mimalloc-obj-target ALL DEPENDS ${mimalloc-obj-out})\n\n\n  # the following seems to lead to cmake warnings/errors on some systems, disable for now :-(\n  # install(TARGETS mimalloc-obj EXPORT mimalloc DESTINATION ${mi_install_objdir})\n\n  # the FILES expression can also be: $<TARGET_OBJECTS:mimalloc-obj>\n  # but that fails cmake versions less than 3.10 so we leave it as is for now\n  install(FILES ${mimalloc-obj-static}\n          DESTINATION ${mi_install_objdir}\n          RENAME ${mi_libname}${CMAKE_C_OUTPUT_EXTENSION} )\nendif()\n\n\n# pkg-config file support\nset(mi_pc_libraries \"\")\nforeach(item IN LISTS mi_libraries)\n  if(item MATCHES \" *[-].*\")\n    set(mi_pc_libraries \"${mi_pc_libraries} ${item}\")\n  else()\n    set(mi_pc_libraries \"${mi_pc_libraries} -l${item}\")\n  endif()\nendforeach()\n\ninclude(\"cmake/JoinPaths.cmake\")\njoin_paths(mi_pc_includedir \"\\${prefix}\" \"${CMAKE_INSTALL_INCLUDEDIR}\")\njoin_paths(mi_pc_libdir \"\\${prefix}\" \"${CMAKE_INSTALL_LIBDIR}\")\n\nconfigure_file(mimalloc.pc.in mimalloc.pc @ONLY)\ninstall(FILES \"${CMAKE_CURRENT_BINARY_DIR}/mimalloc.pc\"\n        DESTINATION \"${CMAKE_INSTALL_LIBDIR}/pkgconfig/\")\n\n\n\n# -----------------------------------------------------------------------------\n# API surface testing\n# -----------------------------------------------------------------------------\n\nif (MI_BUILD_TESTS)\n  enable_testing()\n\n  # static link tests\n  foreach(TEST_NAME api api-fill stress)\n    add_executable(mimalloc-test-${TEST_NAME} test/test-${TEST_NAME}.c)\n    target_compile_definitions(mimalloc-test-${TEST_NAME} PRIVATE ${mi_defines})\n    target_compile_options(mimalloc-test-${TEST_NAME} PRIVATE ${mi_cflags})\n    target_include_directories(mimalloc-test-${TEST_NAME} PRIVATE include)\n    if(MI_BUILD_SHARED AND (MI_TRACK_ASAN OR MI_DEBUG_TSAN OR MI_DEBUG_UBSAN))\n      target_link_libraries(mimalloc-test-${TEST_NAME} PRIVATE mimalloc ${mi_libraries})\n    else()\n      target_link_libraries(mimalloc-test-${TEST_NAME} PRIVATE mimalloc-static ${mi_libraries})\n    endif()\n    add_test(NAME test-${TEST_NAME} COMMAND mimalloc-test-${TEST_NAME})\n  endforeach()\n\n  # dynamic override test\n  if(MI_BUILD_SHARED AND NOT (MI_TRACK_ASAN OR MI_DEBUG_TSAN OR MI_DEBUG_UBSAN))\n    add_executable(mimalloc-test-stress-dynamic test/test-stress.c)\n    target_compile_definitions(mimalloc-test-stress-dynamic PRIVATE ${mi_defines} \"USE_STD_MALLOC=1\")\n    if(WIN32)\n      target_compile_definitions(mimalloc-test-stress-dynamic PRIVATE \"MI_LINK_VERSION=1\")\n    endif()\n    target_compile_options(mimalloc-test-stress-dynamic PRIVATE ${mi_cflags})\n    target_include_directories(mimalloc-test-stress-dynamic PRIVATE include)\n    target_link_libraries(mimalloc-test-stress-dynamic PRIVATE mimalloc ${mi_libraries})  # mi_version\n    if(WIN32)\n      add_test(NAME test-stress-dynamic COMMAND ${CMAKE_COMMAND} -E env MIMALLOC_SHOW_STATS=1 $<TARGET_FILE:mimalloc-test-stress-dynamic>)\n    else()\n      if(APPLE)\n        set(LD_PRELOAD \"DYLD_INSERT_LIBRARIES\")\n      else()\n        set(LD_PRELOAD \"LD_PRELOAD\")\n      endif()\n      add_test(NAME test-stress-dynamic COMMAND ${CMAKE_COMMAND} -E env MIMALLOC_SHOW_STATS=1 ${LD_PRELOAD}=$<TARGET_FILE:mimalloc> $<TARGET_FILE:mimalloc-test-stress-dynamic>)\n    endif()\n  endif()\nendif()\n\n# -----------------------------------------------------------------------------\n# Set override properties\n# -----------------------------------------------------------------------------\nif (MI_OVERRIDE)\n  if (MI_BUILD_SHARED)\n    target_compile_definitions(mimalloc PRIVATE MI_MALLOC_OVERRIDE)\n  endif()\n  if(NOT WIN32)\n    # It is only possible to override malloc on Windows when building as a DLL.\n    if (MI_BUILD_STATIC)\n      target_compile_definitions(mimalloc-static PRIVATE MI_MALLOC_OVERRIDE)\n    endif()\n    if (MI_BUILD_OBJECT)\n      target_compile_definitions(mimalloc-obj PRIVATE MI_MALLOC_OVERRIDE)\n    endif()\n  endif()\nendif()\n"
  },
  {
    "path": "third-party/mimalloc/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018-2025 Microsoft Corporation, Daan Leijen\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "third-party/mimalloc/SECURITY.md",
    "content": "<!-- BEGIN MICROSOFT SECURITY.MD V0.0.9 BLOCK -->\n\n## Security\n\nMicrosoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet) and [Xamarin](https://github.com/xamarin).\n\nIf you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/security.md/definition), please report it to us as described below.\n\n## Reporting Security Issues\n\n**Please do not report security vulnerabilities through public GitHub issues.**\n\nInstead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/security.md/msrc/create-report).\n\nIf you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com).  If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/security.md/msrc/pgp).\n\nYou should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). \n\nPlease include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:\n\n  * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)\n  * Full paths of source file(s) related to the manifestation of the issue\n  * The location of the affected source code (tag/branch/commit or direct URL)\n  * Any special configuration required to reproduce the issue\n  * Step-by-step instructions to reproduce the issue\n  * Proof-of-concept or exploit code (if possible)\n  * Impact of the issue, including how an attacker might exploit the issue\n\nThis information will help us triage your report more quickly.\n\nIf you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/security.md/msrc/bounty) page for more details about our active programs.\n\n## Preferred Languages\n\nWe prefer all communications to be in English.\n\n## Policy\n\nMicrosoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/security.md/cvd).\n\n<!-- END MICROSOFT SECURITY.MD BLOCK -->\n"
  },
  {
    "path": "third-party/mimalloc/azure-pipelines.yml",
    "content": "# Starter pipeline\n# Start with a minimal pipeline that you can customize to build and deploy your code.\n# Add steps that build, run tests, deploy, and more:\n# https://aka.ms/yaml\n\ntrigger:\n  branches:\n    include:\n    - master\n    - dev\n    - dev2\n    - dev3\n  tags:\n    include:\n    - v*\n\njobs:\n- job:\n  displayName: Windows 2022\n  pool:\n    vmImage:\n      windows-2022\n  strategy:\n    matrix:\n      Debug:\n        BuildType: debug\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON\n        MSBuildConfiguration: Debug\n      Release:\n        BuildType: release\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release\n        MSBuildConfiguration: Release\n      Secure:\n        BuildType: secure\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON\n        MSBuildConfiguration: Release\n  steps:\n  - task: CMake@1\n    inputs:\n      workingDirectory: $(BuildType)\n      cmakeArgs: .. $(cmakeExtraArgs)\n  - task: MSBuild@1\n    inputs:\n      solution: $(BuildType)/libmimalloc.sln\n      configuration: '$(MSBuildConfiguration)'\n      msbuildArguments: -m\n  - script: ctest --verbose --timeout 240 -C $(MSBuildConfiguration)\n    workingDirectory: $(BuildType)\n    displayName: CTest\n  #- script: $(BuildType)\\$(BuildType)\\mimalloc-test-stress\n  #  displayName: TestStress\n  #- upload: $(Build.SourcesDirectory)/$(BuildType)\n  #  artifact: mimalloc-windows-$(BuildType)\n\n- job:\n  displayName: Ubuntu 22.04\n  pool:\n    vmImage:\n     ubuntu-22.04\n  strategy:\n    matrix:\n      Debug:\n        CC: gcc\n        CXX: g++\n        BuildType: debug\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON\n      Release:\n        CC: gcc\n        CXX: g++\n        BuildType: release\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release\n      Secure:\n        CC: gcc\n        CXX: g++\n        BuildType: secure\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON\n      Debug++:\n        CC: gcc\n        CXX: g++\n        BuildType: debug-cxx\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_USE_CXX=ON\n      Debug Clang:\n        CC: clang\n        CXX: clang++\n        BuildType: debug-clang\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON\n      Release Clang:\n        CC: clang\n        CXX: clang++\n        BuildType: release-clang\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release\n      Secure Clang:\n        CC: clang\n        CXX: clang++\n        BuildType: secure-clang\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON\n      Debug++ Clang:\n        CC: clang\n        CXX: clang++\n        BuildType: debug-clang-cxx\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_USE_CXX=ON\n      Debug ASAN Clang:\n        CC: clang\n        CXX: clang++\n        BuildType: debug-asan-clang\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_TRACK_ASAN=ON\n      Debug UBSAN Clang:\n        CC: clang\n        CXX: clang++\n        BuildType: debug-ubsan-clang\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_DEBUG_UBSAN=ON\n      Debug TSAN Clang++:\n        CC: clang\n        CXX: clang++\n        BuildType: debug-tsan-clang-cxx\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=RelWithDebInfo -DMI_USE_CXX=ON -DMI_DEBUG_TSAN=ON\n      Debug Guarded Clang:\n        CC: clang\n        CXX: clang\n        BuildType: debug-guarded-clang\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=RelWithDebInfo -DMI_DEBUG_FULL=ON -DMI_GUARDED=ON\n\n  steps:\n  - task: CMake@1\n    inputs:\n      workingDirectory: $(BuildType)\n      cmakeArgs: .. $(cmakeExtraArgs)\n  - script: make -j$(nproc) -C $(BuildType)\n    displayName: Make\n  - script: ctest --verbose --timeout 240\n    workingDirectory: $(BuildType)\n    displayName: CTest\n    env:\n      MIMALLOC_GUARDED_SAMPLE_RATE: 1000\n#  - upload: $(Build.SourcesDirectory)/$(BuildType)\n#    artifact: mimalloc-ubuntu-$(BuildType)\n\n- job:\n  displayName: macOS 14 (Sonoma)\n  pool:\n    vmImage:\n      macOS-14\n  strategy:\n    matrix:\n      Debug:\n        BuildType: debug\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON\n      Release:\n        BuildType: release\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release\n      Secure:\n        BuildType: secure\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON\n  steps:\n  - task: CMake@1\n    inputs:\n      workingDirectory: $(BuildType)\n      cmakeArgs: .. $(cmakeExtraArgs)\n  - script: make -j$(sysctl -n hw.ncpu) -C $(BuildType)\n    displayName: Make\n  - script: ctest --verbose --timeout 240\n    workingDirectory: $(BuildType)\n    displayName: CTest\n    \n#  - upload: $(Build.SourcesDirectory)/$(BuildType)\n#    artifact: mimalloc-macos-$(BuildType)\n\n# ----------------------------------------------------------\n# Other OS versions (just debug mode)\n# ----------------------------------------------------------\n\n- job:\n  displayName: Windows 2019\n  pool:\n    vmImage:\n      windows-2019\n  strategy:\n    matrix:\n      Debug:\n        BuildType: debug\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON\n        MSBuildConfiguration: Debug\n      Release:\n        BuildType: release\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release\n        MSBuildConfiguration: Release\n  steps:\n  - task: CMake@1\n    inputs:\n      workingDirectory: $(BuildType)\n      cmakeArgs: .. $(cmakeExtraArgs)\n  - task: MSBuild@1\n    inputs:\n      solution: $(BuildType)/libmimalloc.sln\n      configuration: '$(MSBuildConfiguration)'\n      msbuildArguments: -m\n  - script: ctest --verbose --timeout 240 -C $(MSBuildConfiguration)\n    workingDirectory: $(BuildType)\n    displayName: CTest\n\n- job:\n  displayName: Ubuntu 24.04\n  pool:\n    vmImage:\n      ubuntu-24.04\n  strategy:\n    matrix:\n      Debug:\n        CC: gcc\n        CXX: g++\n        BuildType: debug\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON\n      Debug++:\n        CC: gcc\n        CXX: g++\n        BuildType: debug-cxx\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_USE_CXX=ON\n      Debug Clang:\n        CC: clang\n        CXX: clang++\n        BuildType: debug-clang\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON\n      Debug++ Clang:\n        CC: clang\n        CXX: clang++\n        BuildType: debug-clang-cxx\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_USE_CXX=ON\n      Release Clang:\n        CC: clang\n        CXX: clang++\n        BuildType: release-clang\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release\n  steps:\n  - task: CMake@1\n    inputs:\n      workingDirectory: $(BuildType)\n      cmakeArgs: .. $(cmakeExtraArgs)\n  - script: make -j$(nproc) -C $(BuildType)\n    displayName: Make\n  - script: ctest --verbose --timeout 240\n    workingDirectory: $(BuildType)\n    displayName: CTest\n\n- job:\n  displayName: macOS 15 (Sequoia)\n  pool:\n    vmImage:\n      macOS-15\n  strategy:\n    matrix:\n      Debug:\n        BuildType: debug\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON\n      Release:\n        BuildType: release\n        cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release\n  steps:\n  - task: CMake@1\n    inputs:\n      workingDirectory: $(BuildType)\n      cmakeArgs: .. $(cmakeExtraArgs)\n  - script: make -j$(sysctl -n hw.ncpu) -C $(BuildType)\n    displayName: Make\n  - script: ctest --verbose --timeout 240\n    workingDirectory: $(BuildType)\n    displayName: CTest\n"
  },
  {
    "path": "third-party/mimalloc/bin/readme.md",
    "content": "# Windows Override\n\n<span id=\"override_on_windows\">We use a separate redirection DLL to override mimalloc on Windows</span> \nsuch that we redirect all malloc/free calls that go through the (dynamic) C runtime allocator, \nincluding those from other DLL's or libraries. As it intercepts all allocation calls on a low level, \nit can be used on large programs that include other 3rd party components.\nThere are four requirements to make the overriding work well:\n\n1. Use the C-runtime library as a DLL (using the `/MD` or `/MDd` switch).\n\n2. Link your program explicitly with the `mimalloc.dll.lib` export library for\n   the `mimalloc.dll` -- which contains all mimalloc functionality.\n   To ensure the `mimalloc.dll` is actually loaded at run-time it is easiest \n   to insert some call to the mimalloc API in the `main` function, like `mi_version()`\n   (or use the `/include:mi_version` switch on the linker, or\n   similarly, `#pragma comment(linker, \"/include:mi_version\")` in some source file). \n   See the `mimalloc-test-override` project for an example on how to use this. \n\n3. The `mimalloc-redirect.dll` must be put in the same folder as the main \n   `mimalloc.dll` at runtime (as it is a dependency of that DLL).\n   The redirection DLL ensures that all calls to the C runtime malloc API get \n   redirected to mimalloc functions (which reside in `mimalloc.dll`).\n\n4. Ensure the `mimalloc.dll` comes as early as possible in the import\n   list of the final executable (so it can intercept all potential allocations).\n   You can use `minject -l <exe>` to check this if needed.\n\n```csharp\n┌──────────────┐                                                    \n│ Your Program │                                                    \n└────┬─────────┘                                                    \n     │                                                              \n     │ mi_version()  ┌───────────────┐     ┌───────────────────────┐\n     ├──────────────►│ mimalloc.dll  ├────►│ mimalloc-redirect.dll │\n     │               └──────┬────────┘     └───────────────────────┘\n     │                      ▼                                       \n     │ malloc() etc. ┌──────────────┐                               \n     ├──────────────►│ ucrtbase.dll │                               \n     │               └──────────────┘                               \n     │                                                              \n     │                                                              \n     └──────────────► ...                                           \n```\n\nFor best performance on Windows with C++, it\nis also recommended to also override the `new`/`delete` operations (by including\n[`mimalloc-new-delete.h`](../include/mimalloc-new-delete.h) \na single(!) source file in your project).\n\nThe environment variable `MIMALLOC_DISABLE_REDIRECT=1` can be used to disable dynamic\noverriding at run-time. Use `MIMALLOC_VERBOSE=1` to check if mimalloc was successfully \nredirected.\n\n### Other Platforms\n\nYou always link with `mimalloc.dll` but for different platforms you may \nneed a specific redirection DLL:\n\n- __x64__: `mimalloc-redirect.dll`.\n- __x86__: `mimalloc-redirect32.dll`. Use for older 32-bit Windows programs.\n- __arm64__: `mimalloc-redirect-arm64.dll`. Use for native Windows arm64 programs.\n- __arm64ec__: `mimalloc-redirect-arm64ec.dll`. The [arm64ec] ABI is \"emulation compatible\" \n  mode on Windows arm64. Unfortunately we cannot run x64 code emulated on Windows arm64 with\n  the x64 mimalloc override directly (since the C runtime always uses `arm64ec`). Instead:\n  1. Build the program as normal for x64 and link as normal with the x64 \n     `mimalloc.lib` export library.\n  2. Now separately build `mimalloc.dll` in `arm64ec` mode and _overwrite_ your\n     previous (x64) `mimalloc.dll` -- the loader can handle the mix of arm64ec\n     and x64 code. Now use `mimalloc-redirect-arm64ec.dll` to match your new\n     arm64ec `mimalloc.dll`. The main program stays as is and can be fully x64 \n     or contain more arm64ec modules. At runtime, the arm64ec `mimalloc.dll` will\n     run with native arm64 instructions while the rest of the program runs emulated x64.\n\n[arm64ec]: https://learn.microsoft.com/en-us/windows/arm/arm64ec\n\n\n### Minject\n\nWe cannot always re-link an executable with `mimalloc.dll`, and similarly, we \ncannot always ensure that the DLL comes first in the import table of the final executable.\nIn many cases though we can patch existing executables without any recompilation\nif they are linked with the dynamic C runtime (`ucrtbase.dll`) -- just put the \n`mimalloc.dll` into the import table (and put `mimalloc-redirect.dll` in the same \ndirectory) Such patching can be done for example with [CFF Explorer](https://ntcore.com/?page_id=388).\n\nThe `minject` program can also do this from the command line\nUse `minject --help` for options:\n\n```\n> minject --help\n\nminject:\n  Injects the mimalloc dll into the import table of a 64-bit executable,\n  and/or ensures that it comes first in het import table.\n\nusage:\n  > minject [options] <exe>\n\noptions:\n  -h   --help        show this help\n  -v   --verbose     be verbose\n  -l   --list        only list imported modules\n  -i   --inplace     update the exe in-place (make sure there is a backup!)\n  -f   --force       always overwrite without prompting\n       --postfix=<p> use <p> as a postfix to the mimalloc dll.\n                     e.g. use --postfix=debug to link with mimalloc-debug.dll\n\nnotes:\n  Without '--inplace' an injected <exe> is generated with the same name ending in '-mi'.\n  Ensure 'mimalloc-redirect.dll' is in the same folder as the mimalloc dll.\n\nexamples:\n  > minject --list myprogram.exe\n  > minject --force --inplace myprogram.exe\n```  \n\nFor x86 32-bit binaries, use `minject32`, and for arm64 binaries use `minject-arm64`.\n\n"
  },
  {
    "path": "third-party/mimalloc/cmake/JoinPaths.cmake",
    "content": "# This module provides function for joining paths\n# known from most languages\n#\n# SPDX-License-Identifier: (MIT OR CC0-1.0)\n# Copyright 2020 Jan Tojnar\n# https://github.com/jtojnar/cmake-snips\n#\n# Modelled after Python’s os.path.join\n# https://docs.python.org/3.7/library/os.path.html#os.path.join\n# Windows not supported\nfunction(join_paths joined_path first_path_segment)\n    set(temp_path \"${first_path_segment}\")\n    foreach(current_segment IN LISTS ARGN)\n        if(NOT (\"${current_segment}\" STREQUAL \"\"))\n            if(IS_ABSOLUTE \"${current_segment}\")\n                set(temp_path \"${current_segment}\")\n            else()\n                set(temp_path \"${temp_path}/${current_segment}\")\n            endif()\n        endif()\n    endforeach()\n    set(${joined_path} \"${temp_path}\" PARENT_SCOPE)\nendfunction()\n"
  },
  {
    "path": "third-party/mimalloc/cmake/mimalloc-config-version.cmake",
    "content": "set(mi_version_major 2)\nset(mi_version_minor 2)\nset(mi_version_patch 2)\nset(mi_version ${mi_version_major}.${mi_version_minor})\n\nset(PACKAGE_VERSION ${mi_version})\nif(PACKAGE_FIND_VERSION_MAJOR)\n    if(\"${PACKAGE_FIND_VERSION_MAJOR}\" EQUAL \"${mi_version_major}\")\n        if (\"${PACKAGE_FIND_VERSION_MINOR}\" EQUAL \"${mi_version_minor}\")\n            set(PACKAGE_VERSION_EXACT TRUE)\n        elseif(\"${PACKAGE_FIND_VERSION_MINOR}\" LESS \"${mi_version_minor}\")\n            set(PACKAGE_VERSION_COMPATIBLE TRUE)\n        else()\n            set(PACKAGE_VERSION_UNSUITABLE TRUE)\n        endif()\n    else()\n        set(PACKAGE_VERSION_UNSUITABLE TRUE)\n    endif()\nendif()\n"
  },
  {
    "path": "third-party/mimalloc/cmake/mimalloc-config.cmake",
    "content": "include(${CMAKE_CURRENT_LIST_DIR}/mimalloc.cmake)\nget_filename_component(MIMALLOC_CMAKE_DIR \"${CMAKE_CURRENT_LIST_DIR}\" PATH)  # one up from the cmake dir, e.g. /usr/local/lib/cmake/mimalloc-2.0\nget_filename_component(MIMALLOC_VERSION_DIR \"${CMAKE_CURRENT_LIST_DIR}\" NAME)\nstring(REPLACE \"/lib/cmake\" \"/lib\" MIMALLOC_LIBRARY_DIR \"${MIMALLOC_CMAKE_DIR}\")\nif(\"${MIMALLOC_VERSION_DIR}\" EQUAL \"mimalloc\")\n  # top level install\n  string(REPLACE \"/lib/cmake\" \"/include\" MIMALLOC_INCLUDE_DIR \"${MIMALLOC_CMAKE_DIR}\")\n  set(MIMALLOC_OBJECT_DIR \"${MIMALLOC_LIBRARY_DIR}\")\nelse()\n  # versioned\n  string(REPLACE \"/lib/cmake/\" \"/include/\" MIMALLOC_INCLUDE_DIR \"${CMAKE_CURRENT_LIST_DIR}\")\n  string(REPLACE \"/lib/cmake/\" \"/lib/\" MIMALLOC_OBJECT_DIR \"${CMAKE_CURRENT_LIST_DIR}\")\nendif()\nset(MIMALLOC_TARGET_DIR \"${MIMALLOC_LIBRARY_DIR}\") # legacy\n"
  },
  {
    "path": "third-party/mimalloc/contrib/docker/alpine/Dockerfile",
    "content": "# alpine image  \nFROM alpine\n\n# Install tools\nRUN apk add build-base make cmake\nRUN apk add git\nRUN apk add vim\n\nRUN mkdir -p  /home/dev\nWORKDIR /home/dev\n\n# Get mimalloc\nRUN git clone https://github.com/microsoft/mimalloc -b dev2\nRUN mkdir -p mimalloc/out/release\nRUN mkdir -p mimalloc/out/debug\n\n# Build mimalloc debug\nWORKDIR /home/dev/mimalloc/out/debug\nRUN cmake ../.. -DMI_DEBUG_FULL=ON\nRUN make -j\nRUN make test\n\nCMD [\"/bin/sh\"]"
  },
  {
    "path": "third-party/mimalloc/contrib/docker/alpine-arm32v7/Dockerfile",
    "content": "# install from an image\n# download first an appropriate tar.gz image into the current directory\n# from: <https://github.com/alpinelinux/docker-alpine/tree/edge/armv7>\nFROM scratch\n\n# Substitute the image name that was downloaded\nADD alpine-minirootfs-20240329-armv7.tar.gz /\n\n# Install tools\nRUN apk add build-base make cmake\nRUN apk add git\nRUN apk add vim\n\nRUN mkdir -p  /home/dev\nWORKDIR /home/dev\n\n# Get mimalloc\nRUN git clone https://github.com/microsoft/mimalloc -b dev2\nRUN mkdir -p mimalloc/out/release\nRUN mkdir -p mimalloc/out/debug\n\n# Build mimalloc debug\nWORKDIR /home/dev/mimalloc/out/debug\nRUN cmake ../.. -DMI_DEBUG_FULL=ON\nRUN make -j\nRUN make test\n\nCMD [\"/bin/sh\"]\n"
  },
  {
    "path": "third-party/mimalloc/contrib/docker/manylinux-x64/Dockerfile",
    "content": "FROM quay.io/pypa/manylinux2014_x86_64\n\n# Install tools\nRUN yum install -y openssl-devel\nRUN yum install -y gcc gcc-c++ kernel-devel make\nRUN yum install -y git cmake\nRUN yum install -y vim\n\nRUN mkdir -p  /home/dev\nWORKDIR /home/dev\n\n# Get mimalloc\nRUN git clone https://github.com/microsoft/mimalloc -b dev2\nRUN mkdir -p mimalloc/out/release\nRUN mkdir -p mimalloc/out/debug\n\n# Build mimalloc debug\nWORKDIR /home/dev/mimalloc/out/debug\nRUN cmake ../.. -DMI_DEBUG_FULL=ON\nRUN make -j\nRUN make test\n\nCMD [\"/bin/sh\"]"
  },
  {
    "path": "third-party/mimalloc/contrib/docker/readme.md",
    "content": "Various example docker files used for testing.\n\nUsage:\n\n```\n> cd <host>\n> docker build -t <host>-mimalloc .\n> docker run -it <host>-mimalloc\n>> make test\n```\n"
  },
  {
    "path": "third-party/mimalloc/contrib/vcpkg/portfile.cmake",
    "content": "vcpkg_from_github(\n  OUT_SOURCE_PATH SOURCE_PATH\n  REPO microsoft/mimalloc\n  HEAD_REF master\n\n  # The \"REF\" can be a commit hash, branch name (dev2), or a version (v2.2.1).\n  # REF \"v${VERSION}\"\n  REF e2db21e9ba9fb9172b7b0aa0fe9b8742525e8774\n\n  # The sha512 is the hash of the tar.gz bundle.\n  # (To get the sha512, run `vcpkg install mimalloc[override] --overlay-ports=<dir of this file>` and copy the sha from the error message.)\n  SHA512 8cbb601fdf8b46dd6a9c0d314d6da9d4960699853829e96d2470753867f90689fb4caeaf30d628943fd388670dc11902dbecc9cc7c329b99a510524a09bdb612\n)\n\nvcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS\n  FEATURES\n    c           MI_NO_USE_CXX\n    guarded     MI_GUARDED\n    secure      MI_SECURE\n    override    MI_OVERRIDE\n    optarch     MI_OPT_ARCH\n    optsimd     MI_OPT_SIMD\n    xmalloc     MI_XMALLOC\n    asm         MI_SEE_ASM\n)\nstring(COMPARE EQUAL \"${VCPKG_LIBRARY_LINKAGE}\" \"static\" MI_BUILD_STATIC)\nstring(COMPARE EQUAL \"${VCPKG_LIBRARY_LINKAGE}\" \"dynamic\" MI_BUILD_SHARED)\n\nvcpkg_cmake_configure(\n  SOURCE_PATH \"${SOURCE_PATH}\"\n  OPTIONS\n    -DMI_USE_CXX=ON\n    -DMI_BUILD_TESTS=OFF\n    -DMI_BUILD_OBJECT=ON\n    -DMI_BUILD_STATIC=${MI_BUILD_STATIC}\n    -DMI_BUILD_SHARED=${MI_BUILD_SHARED}\n    -DMI_INSTALL_TOPLEVEL=ON\n    ${FEATURE_OPTIONS}\n)\n\nvcpkg_cmake_install()\nvcpkg_copy_pdbs()\n\nfile(COPY\n  \"${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake\"\n  \"${CMAKE_CURRENT_LIST_DIR}/usage\"\n  DESTINATION \"${CURRENT_PACKAGES_DIR}/share/${PORT}\"\n)\nvcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/mimalloc)\n\nif(VCPKG_LIBRARY_LINKAGE STREQUAL \"dynamic\")\n  # todo: why is this needed?\n  vcpkg_replace_string(\n    \"${CURRENT_PACKAGES_DIR}/include/mimalloc.h\"\n    \"!defined(MI_SHARED_LIB)\"\n    \"0 // !defined(MI_SHARED_LIB)\"\n  )\nendif()\nfile(REMOVE_RECURSE \"${CURRENT_PACKAGES_DIR}/debug/include\")\nfile(REMOVE_RECURSE \"${CURRENT_PACKAGES_DIR}/debug/share\")\n\nvcpkg_fixup_pkgconfig()\nvcpkg_install_copyright(FILE_LIST \"${SOURCE_PATH}/LICENSE\")\n"
  },
  {
    "path": "third-party/mimalloc/contrib/vcpkg/readme.md",
    "content": "# Vcpkg support\n\nThis directory is meant to provide the sources for the official [vcpkg port] \nof mimalloc, but can also be used to override the official port with\nyour own variant.\n\nFor example, you can edit the [`portfile.cmake`](portfile.cmake) \nto check out a specific commit, version, or branch of mimalloc, or set further options. \nYou can install such custom port as:\n\n```sh\n$ vcpkg install \"mimalloc[override]\" --recurse --overlay-ports=./contrib/vcpkg\n```\n\nThis will also show the correct sha512 hash if you use a custom version.\nAnother way is to refer to the overlay from the [vcpkg-configuration.json](https://learn.microsoft.com/en-us/vcpkg/reference/vcpkg-configuration-json) file.\nSee also the vcpkg [documentation](https://learn.microsoft.com/en-us/vcpkg/produce/update-package-version) for more information.\n\n\n# Using mimalloc from vcpkg\n\nWhen using [cmake with vcpkg](https://learn.microsoft.com/en-us/vcpkg/get_started/get-started?pivots=shell-powershell), \nyou can use mimalloc from the `CMakeLists.txt` as:\n\n```cmake\nfind_package(mimalloc CONFIG REQUIRED)\ntarget_link_libraries(main PRIVATE mimalloc)\n```\n\nSee [`test/CMakeLists.txt](../../test/CMakeLists.txt) for more examples.\n\n\n# Acknowledgements\n\nThe original port for vckpg was contributed by many people, including: @vicroms, @myd7349, @PhoubeHui, @LilyWangL,\n@JonLiu1993, @RT2Code, Remy Tassoux, @wangao, @BillyONeal, @jiayuehua, @dg0yt, @gerar-ryan-immersaview, @nickdademo, \nand @jimwang118 -- Thank you so much!\n\n\n[vcpkg port]: https://github.com/microsoft/vcpkg/tree/master/ports/mimalloc\n"
  },
  {
    "path": "third-party/mimalloc/contrib/vcpkg/usage",
    "content": "Use the following CMake targets to import mimalloc:\n\n  find_package(mimalloc CONFIG REQUIRED)\n  target_link_libraries(main PRIVATE mimalloc)\n\nAnd use mimalloc in your sources as:\n\n  #include <mimalloc.h>\n  #include <stdio.h>\n  int main(int argc, char** argv) {\n    int* p = mi_malloc_tp(int);\n    *p = mi_version();\n    printf(\"mimalloc version: %d\\n\", *p);\n    mi_free(p);\n    return 0;\n  }\n\nWhen dynamically overriding on Windows, ensure `mimalloc.dll` is linked through some call to\nmimalloc (e.g. `mi_version()`), and that the `mimalloc-redirect.dll` is in the same directory.\nSee https://github.com/microsoft/mimalloc/blob/dev/bin/readme.md for detailed information.\n"
  },
  {
    "path": "third-party/mimalloc/contrib/vcpkg/vcpkg-cmake-wrapper.cmake",
    "content": "_find_package(${ARGS})\n\nif(CMAKE_CURRENT_LIST_DIR STREQUAL \"${MIMALLOC_CMAKE_DIR}/${MIMALLOC_VERSION_DIR}\")\n    set(MIMALLOC_INCLUDE_DIR \"${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include\")\n    # As in vcpkg.cmake\n    if(NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE MATCHES \"^[Dd][Ee][Bb][Uu][Gg]$\")\n        set(MIMALLOC_LIBRARY_DIR \"${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib\")\n    else()\n        set(MIMALLOC_LIBRARY_DIR \"${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib\")\n    endif()\n    set(MIMALLOC_OBJECT_DIR \"${MIMALLOC_LIBRARY_DIR}\")\n    set(MIMALLOC_TARGET_DIR \"${MIMALLOC_LIBRARY_DIR}\")\nendif()\n\n# vcpkg always configures either a static or dynamic library.\n# ensure to always expose the mimalloc target as either the static or dynamic build.\nif(TARGET mimalloc-static AND NOT TARGET mimalloc)\n  add_library(mimalloc INTERFACE IMPORTED)\n  set_target_properties(mimalloc PROPERTIES INTERFACE_LINK_LIBRARIES mimalloc-static)\nendif()\n"
  },
  {
    "path": "third-party/mimalloc/contrib/vcpkg/vcpkg.json",
    "content": "{\n  \"name\": \"mimalloc\",\n  \"version\": \"2.2.2\",\n  \"port-version\": 1,\n  \"description\": \"Compact general purpose allocator with excellent performance\",\n  \"homepage\": \"https://github.com/microsoft/mimalloc\",\n  \"license\": \"MIT\",\n  \"supports\": \"!uwp\",\n  \"dependencies\": [\n    {\n      \"name\": \"vcpkg-cmake\",\n      \"host\": true\n    },\n    {\n      \"name\": \"vcpkg-cmake-config\",\n      \"host\": true\n    }\n  ],\n  \"features\": {\n    \"c\": {\n      \"description\": \"Use C11 compilation (this can still override new/delete)\"\n    },\n    \"override\": {\n      \"description\": \"Override the standard malloc/free interface\"\n    },\n    \"secure\": {\n      \"description\": \"Use full security mitigations (like guard pages and randomization)\"\n    },\n    \"guarded\": {\n      \"description\": \"Use build that support guard pages after objects controlled with MIMALLOC_GUARDED_SAMPLE_RATE\"\n    },\n    \"xmalloc\": {\n      \"description\": \"If out-of-memory, call abort() instead of returning NULL\"\n    },\n    \"optarch\": {\n      \"description\": \"Use architecture specific optimizations (on x64: '-march=haswell;-mavx2', on arm64: '-march=armv8.1-a')\"\n    },\n    \"optsimd\": {\n      \"description\": \"Allow use of SIMD instructions (avx2 or neon) (requires 'optarch' to be enabled)\"\n    },\n    \"asm\": {\n      \"description\": \"Generate assembly files\"\n    }\n  }\n}"
  },
  {
    "path": "third-party/mimalloc/doc/doxyfile",
    "content": "# Doxyfile 1.11.0\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org) for a project.\n#\n# All text after a double hash (##) is considered a comment and is placed in\n# front of the TAG it is preceding.\n#\n# All text after a single hash (#) is considered a comment and will be ignored.\n# The format is:\n# TAG = value [value, ...]\n# For lists, items can also be appended using:\n# TAG += value [value, ...]\n# Values that contain spaces should be placed between quotes (\\\" \\\").\n#\n# Note:\n#\n# Use doxygen to compare the used configuration file with the template\n# configuration file:\n# doxygen -x [configFile]\n# Use doxygen to compare the used configuration file with the template\n# configuration file without replacing the environment variables or CMake type\n# replacement variables:\n# doxygen -x_noenv [configFile]\n\n#---------------------------------------------------------------------------\n# Project related configuration options\n#---------------------------------------------------------------------------\n\n# This tag specifies the encoding used for all characters in the configuration\n# file that follow. The default is UTF-8 which is also the encoding used for all\n# text before the first occurrence of this tag. Doxygen uses libiconv (or the\n# iconv built into libc) for the transcoding. See\n# https://www.gnu.org/software/libiconv/ for the list of possible encodings.\n# The default value is: UTF-8.\n\nDOXYFILE_ENCODING      = UTF-8\n\n# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by\n# double-quotes, unless you are using Doxywizard) that should identify the\n# project for which the documentation is generated. This name is used in the\n# title of most generated pages and in a few other places.\n# The default value is: My Project.\n\nPROJECT_NAME           = mi-malloc\n\n# The PROJECT_NUMBER tag can be used to enter a project or revision number. This\n# could be handy for archiving the generated documentation or if some version\n# control system is used.\n\nPROJECT_NUMBER         = 1.8/2.1\n\n# Using the PROJECT_BRIEF tag one can provide an optional one line description\n# for a project that appears at the top of each page and should give viewer a\n# quick idea about the purpose of the project. Keep the description short.\n\nPROJECT_BRIEF          =\n\n# With the PROJECT_LOGO tag one can specify a logo or an icon that is included\n# in the documentation. The maximum height of the logo should not exceed 55\n# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy\n# the logo to the output directory.\n\nPROJECT_LOGO           = mimalloc-logo.svg\n\n# With the PROJECT_ICON tag one can specify an icon that is included in the tabs\n# when the HTML document is shown. Doxygen will copy the logo to the output\n# directory.\n\nPROJECT_ICON           =\n\n# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path\n# into which the generated documentation will be written. If a relative path is\n# entered, it will be relative to the location where doxygen was started. If\n# left blank the current directory will be used.\n\nOUTPUT_DIRECTORY       = ..\n\n# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096\n# sub-directories (in 2 levels) under the output directory of each output format\n# and will distribute the generated files over these directories. Enabling this\n# option can be useful when feeding doxygen a huge amount of source files, where\n# putting all generated files in the same directory would otherwise causes\n# performance problems for the file system. Adapt CREATE_SUBDIRS_LEVEL to\n# control the number of sub-directories.\n# The default value is: NO.\n\nCREATE_SUBDIRS         = NO\n\n# Controls the number of sub-directories that will be created when\n# CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every\n# level increment doubles the number of directories, resulting in 4096\n# directories at level 8 which is the default and also the maximum value. The\n# sub-directories are organized in 2 levels, the first level always has a fixed\n# number of 16 directories.\n# Minimum value: 0, maximum value: 8, default value: 8.\n# This tag requires that the tag CREATE_SUBDIRS is set to YES.\n\nCREATE_SUBDIRS_LEVEL   = 8\n\n# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII\n# characters to appear in the names of generated files. If set to NO, non-ASCII\n# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode\n# U+3044.\n# The default value is: NO.\n\nALLOW_UNICODE_NAMES    = NO\n\n# The OUTPUT_LANGUAGE tag is used to specify the language in which all\n# documentation generated by doxygen is written. Doxygen will use this\n# information to generate all constant output in the proper language.\n# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian,\n# Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English\n# (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek,\n# Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with\n# English messages), Korean, Korean-en (Korean with English messages), Latvian,\n# Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese,\n# Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish,\n# Swedish, Turkish, Ukrainian and Vietnamese.\n# The default value is: English.\n\nOUTPUT_LANGUAGE        = English\n\n# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member\n# descriptions after the members that are listed in the file and class\n# documentation (similar to Javadoc). Set to NO to disable this.\n# The default value is: YES.\n\nBRIEF_MEMBER_DESC      = YES\n\n# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief\n# description of a member or function before the detailed description\n#\n# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the\n# brief descriptions will be completely suppressed.\n# The default value is: YES.\n\nREPEAT_BRIEF           = YES\n\n# This tag implements a quasi-intelligent brief description abbreviator that is\n# used to form the text in various listings. Each string in this list, if found\n# as the leading text of the brief description, will be stripped from the text\n# and the result, after processing the whole list, is used as the annotated\n# text. Otherwise, the brief description is used as-is. If left blank, the\n# following values are used ($name is automatically replaced with the name of\n# the entity):The $name class, The $name widget, The $name file, is, provides,\n# specifies, contains, represents, a, an and the.\n\nABBREVIATE_BRIEF       = \"The $name class\" \\\n                         \"The $name widget\" \\\n                         \"The $name file\" \\\n                         is \\\n                         provides \\\n                         specifies \\\n                         contains \\\n                         represents \\\n                         a \\\n                         an \\\n                         the\n\n# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then\n# doxygen will generate a detailed section even if there is only a brief\n# description.\n# The default value is: NO.\n\nALWAYS_DETAILED_SEC    = NO\n\n# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all\n# inherited members of a class in the documentation of that class as if those\n# members were ordinary class members. Constructors, destructors and assignment\n# operators of the base classes will not be shown.\n# The default value is: NO.\n\nINLINE_INHERITED_MEMB  = NO\n\n# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path\n# before files name in the file list and in the header files. If set to NO the\n# shortest path that makes the file name unique will be used\n# The default value is: YES.\n\nFULL_PATH_NAMES        = YES\n\n# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.\n# Stripping is only done if one of the specified strings matches the left-hand\n# part of the path. The tag can be used to show relative paths in the file list.\n# If left blank the directory from which doxygen is run is used as the path to\n# strip.\n#\n# Note that you can specify absolute paths here, but also relative paths, which\n# will be relative from the directory where doxygen is started.\n# This tag requires that the tag FULL_PATH_NAMES is set to YES.\n\nSTRIP_FROM_PATH        =\n\n# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the\n# path mentioned in the documentation of a class, which tells the reader which\n# header file to include in order to use a class. If left blank only the name of\n# the header file containing the class definition is used. Otherwise one should\n# specify the list of include paths that are normally passed to the compiler\n# using the -I flag.\n\nSTRIP_FROM_INC_PATH    =\n\n# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but\n# less readable) file names. This can be useful is your file systems doesn't\n# support long names like on DOS, Mac, or CD-ROM.\n# The default value is: NO.\n\nSHORT_NAMES            = NO\n\n# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the\n# first line (until the first dot) of a Javadoc-style comment as the brief\n# description. If set to NO, the Javadoc-style will behave just like regular Qt-\n# style comments (thus requiring an explicit @brief command for a brief\n# description.)\n# The default value is: NO.\n\nJAVADOC_AUTOBRIEF      = YES\n\n# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line\n# such as\n# /***************\n# as being the beginning of a Javadoc-style comment \"banner\". If set to NO, the\n# Javadoc-style will behave just like regular comments and it will not be\n# interpreted by doxygen.\n# The default value is: NO.\n\nJAVADOC_BANNER         = NO\n\n# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first\n# line (until the first dot) of a Qt-style comment as the brief description. If\n# set to NO, the Qt-style will behave just like regular Qt-style comments (thus\n# requiring an explicit \\brief command for a brief description.)\n# The default value is: NO.\n\nQT_AUTOBRIEF           = NO\n\n# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a\n# multi-line C++ special comment block (i.e. a block of //! or /// comments) as\n# a brief description. This used to be the default behavior. The new default is\n# to treat a multi-line C++ comment block as a detailed description. Set this\n# tag to YES if you prefer the old behavior instead.\n#\n# Note that setting this tag to YES also means that rational rose comments are\n# not recognized any more.\n# The default value is: NO.\n\nMULTILINE_CPP_IS_BRIEF = NO\n\n# By default Python docstrings are displayed as preformatted text and doxygen's\n# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the\n# doxygen's special commands can be used and the contents of the docstring\n# documentation blocks is shown as doxygen documentation.\n# The default value is: YES.\n\nPYTHON_DOCSTRING       = YES\n\n# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the\n# documentation from any documented member that it re-implements.\n# The default value is: YES.\n\nINHERIT_DOCS           = YES\n\n# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new\n# page for each member. If set to NO, the documentation of a member will be part\n# of the file/class/namespace that contains it.\n# The default value is: NO.\n\nSEPARATE_MEMBER_PAGES  = NO\n\n# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen\n# uses this value to replace tabs by spaces in code fragments.\n# Minimum value: 1, maximum value: 16, default value: 4.\n\nTAB_SIZE               = 2\n\n# This tag can be used to specify a number of aliases that act as commands in\n# the documentation. An alias has the form:\n# name=value\n# For example adding\n# \"sideeffect=@par Side Effects:^^\"\n# will allow you to put the command \\sideeffect (or @sideeffect) in the\n# documentation, which will result in a user-defined paragraph with heading\n# \"Side Effects:\". Note that you cannot put \\n's in the value part of an alias\n# to insert newlines (in the resulting output). You can put ^^ in the value part\n# of an alias to insert a newline as if a physical newline was in the original\n# file. When you need a literal { or } or , in the value part of an alias you\n# have to escape them by means of a backslash (\\), this can lead to conflicts\n# with the commands \\{ and \\} for these it is advised to use the version @{ and\n# @} or use a double escape (\\\\{ and \\\\})\n\nALIASES                =\n\n# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources\n# only. Doxygen will then generate output that is more tailored for C. For\n# instance, some of the names that are used will be different. The list of all\n# members will be omitted, etc.\n# The default value is: NO.\n\nOPTIMIZE_OUTPUT_FOR_C  = YES\n\n# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or\n# Python sources only. Doxygen will then generate output that is more tailored\n# for that language. For instance, namespaces will be presented as packages,\n# qualified scopes will look different, etc.\n# The default value is: NO.\n\nOPTIMIZE_OUTPUT_JAVA   = NO\n\n# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran\n# sources. Doxygen will then generate output that is tailored for Fortran.\n# The default value is: NO.\n\nOPTIMIZE_FOR_FORTRAN   = NO\n\n# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL\n# sources. Doxygen will then generate output that is tailored for VHDL.\n# The default value is: NO.\n\nOPTIMIZE_OUTPUT_VHDL   = NO\n\n# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice\n# sources only. Doxygen will then generate output that is more tailored for that\n# language. For instance, namespaces will be presented as modules, types will be\n# separated into more groups, etc.\n# The default value is: NO.\n\nOPTIMIZE_OUTPUT_SLICE  = NO\n\n# Doxygen selects the parser to use depending on the extension of the files it\n# parses. With this tag you can assign which parser to use for a given\n# extension. Doxygen has a built-in mapping, but you can override or extend it\n# using this tag. The format is ext=language, where ext is a file extension, and\n# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,\n# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice,\n# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:\n# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser\n# tries to guess whether the code is fixed or free formatted code, this is the\n# default for Fortran type files). For instance to make doxygen treat .inc files\n# as Fortran files (default is PHP), and .f files as C (default is Fortran),\n# use: inc=Fortran f=C.\n#\n# Note: For files without extension you can use no_extension as a placeholder.\n#\n# Note that for custom extensions you also need to set FILE_PATTERNS otherwise\n# the files are not read by doxygen. When specifying no_extension you should add\n# * to the FILE_PATTERNS.\n#\n# Note see also the list of default file extension mappings.\n\nEXTENSION_MAPPING      =\n\n# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments\n# according to the Markdown format, which allows for more readable\n# documentation. See https://daringfireball.net/projects/markdown/ for details.\n# The output of markdown processing is further processed by doxygen, so you can\n# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in\n# case of backward compatibilities issues.\n# The default value is: YES.\n\nMARKDOWN_SUPPORT       = YES\n\n# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up\n# to that level are automatically included in the table of contents, even if\n# they do not have an id attribute.\n# Note: This feature currently applies only to Markdown headings.\n# Minimum value: 0, maximum value: 99, default value: 6.\n# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.\n\nTOC_INCLUDE_HEADINGS   = 0\n\n# The MARKDOWN_ID_STYLE tag can be used to specify the algorithm used to\n# generate identifiers for the Markdown headings. Note: Every identifier is\n# unique.\n# Possible values are: DOXYGEN use a fixed 'autotoc_md' string followed by a\n# sequence number starting at 0 and GITHUB use the lower case version of title\n# with any whitespace replaced by '-' and punctuation characters removed.\n# The default value is: DOXYGEN.\n# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.\n\nMARKDOWN_ID_STYLE      = DOXYGEN\n\n# When enabled doxygen tries to link words that correspond to documented\n# classes, or namespaces to their corresponding documentation. Such a link can\n# be prevented in individual cases by putting a % sign in front of the word or\n# globally by setting AUTOLINK_SUPPORT to NO.\n# The default value is: YES.\n\nAUTOLINK_SUPPORT       = YES\n\n# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want\n# to include (a tag file for) the STL sources as input, then you should set this\n# tag to YES in order to let doxygen match functions declarations and\n# definitions whose arguments contain STL classes (e.g. func(std::string);\n# versus func(std::string) {}). This also makes the inheritance and\n# collaboration diagrams that involve STL classes more complete and accurate.\n# The default value is: NO.\n\nBUILTIN_STL_SUPPORT    = NO\n\n# If you use Microsoft's C++/CLI language, you should set this option to YES to\n# enable parsing support.\n# The default value is: NO.\n\nCPP_CLI_SUPPORT        = NO\n\n# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:\n# https://www.riverbankcomputing.com/software) sources only. Doxygen will parse\n# them like normal C++ but will assume all classes use public instead of private\n# inheritance when no explicit protection keyword is present.\n# The default value is: NO.\n\nSIP_SUPPORT            = NO\n\n# For Microsoft's IDL there are propget and propput attributes to indicate\n# getter and setter methods for a property. Setting this option to YES will make\n# doxygen to replace the get and set methods by a property in the documentation.\n# This will only work if the methods are indeed getting or setting a simple\n# type. If this is not the case, or you want to show the methods anyway, you\n# should set this option to NO.\n# The default value is: YES.\n\nIDL_PROPERTY_SUPPORT   = YES\n\n# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC\n# tag is set to YES then doxygen will reuse the documentation of the first\n# member in the group (if any) for the other members of the group. By default\n# all members of a group must be documented explicitly.\n# The default value is: NO.\n\nDISTRIBUTE_GROUP_DOC   = NO\n\n# If one adds a struct or class to a group and this option is enabled, then also\n# any nested class or struct is added to the same group. By default this option\n# is disabled and one has to add nested compounds explicitly via \\ingroup.\n# The default value is: NO.\n\nGROUP_NESTED_COMPOUNDS = NO\n\n# Set the SUBGROUPING tag to YES to allow class member groups of the same type\n# (for instance a group of public functions) to be put as a subgroup of that\n# type (e.g. under the Public Functions section). Set it to NO to prevent\n# subgrouping. Alternatively, this can be done per class using the\n# \\nosubgrouping command.\n# The default value is: YES.\n\nSUBGROUPING            = YES\n\n# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions\n# are shown inside the group in which they are included (e.g. using \\ingroup)\n# instead of on a separate page (for HTML and Man pages) or section (for LaTeX\n# and RTF).\n#\n# Note that this feature does not work in combination with\n# SEPARATE_MEMBER_PAGES.\n# The default value is: NO.\n\nINLINE_GROUPED_CLASSES = NO\n\n# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions\n# with only public data fields or simple typedef fields will be shown inline in\n# the documentation of the scope in which they are defined (i.e. file,\n# namespace, or group documentation), provided this scope is documented. If set\n# to NO, structs, classes, and unions are shown on a separate page (for HTML and\n# Man pages) or section (for LaTeX and RTF).\n# The default value is: NO.\n\nINLINE_SIMPLE_STRUCTS  = YES\n\n# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or\n# enum is documented as struct, union, or enum with the name of the typedef. So\n# typedef struct TypeS {} TypeT, will appear in the documentation as a struct\n# with name TypeT. When disabled the typedef will appear as a member of a file,\n# namespace, or class. And the struct will be named TypeS. This can typically be\n# useful for C code in case the coding convention dictates that all compound\n# types are typedef'ed and only the typedef is referenced, never the tag name.\n# The default value is: NO.\n\nTYPEDEF_HIDES_STRUCT   = YES\n\n# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This\n# cache is used to resolve symbols given their name and scope. Since this can be\n# an expensive process and often the same symbol appears multiple times in the\n# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small\n# doxygen will become slower. If the cache is too large, memory is wasted. The\n# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range\n# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536\n# symbols. At the end of a run doxygen will report the cache usage and suggest\n# the optimal cache size from a speed point of view.\n# Minimum value: 0, maximum value: 9, default value: 0.\n\nLOOKUP_CACHE_SIZE      = 0\n\n# The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use\n# during processing. When set to 0 doxygen will based this on the number of\n# cores available in the system. You can set it explicitly to a value larger\n# than 0 to get more control over the balance between CPU load and processing\n# speed. At this moment only the input processing can be done using multiple\n# threads. Since this is still an experimental feature the default is set to 1,\n# which effectively disables parallel processing. Please report any issues you\n# encounter. Generating dot graphs in parallel is controlled by the\n# DOT_NUM_THREADS setting.\n# Minimum value: 0, maximum value: 32, default value: 1.\n\nNUM_PROC_THREADS       = 1\n\n# If the TIMESTAMP tag is set different from NO then each generated page will\n# contain the date or date and time when the page was generated. Setting this to\n# NO can help when comparing the output of multiple runs.\n# Possible values are: YES, NO, DATETIME and DATE.\n# The default value is: NO.\n\nTIMESTAMP              = NO\n\n#---------------------------------------------------------------------------\n# Build related configuration options\n#---------------------------------------------------------------------------\n\n# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in\n# documentation are documented, even if no documentation was available. Private\n# class members and static file members will be hidden unless the\n# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.\n# Note: This will also disable the warnings about undocumented members that are\n# normally produced when WARNINGS is set to YES.\n# The default value is: NO.\n\nEXTRACT_ALL            = YES\n\n# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will\n# be included in the documentation.\n# The default value is: NO.\n\nEXTRACT_PRIVATE        = NO\n\n# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual\n# methods of a class will be included in the documentation.\n# The default value is: NO.\n\nEXTRACT_PRIV_VIRTUAL   = NO\n\n# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal\n# scope will be included in the documentation.\n# The default value is: NO.\n\nEXTRACT_PACKAGE        = NO\n\n# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be\n# included in the documentation.\n# The default value is: NO.\n\nEXTRACT_STATIC         = NO\n\n# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined\n# locally in source files will be included in the documentation. If set to NO,\n# only classes defined in header files are included. Does not have any effect\n# for Java sources.\n# The default value is: YES.\n\nEXTRACT_LOCAL_CLASSES  = YES\n\n# This flag is only useful for Objective-C code. If set to YES, local methods,\n# which are defined in the implementation section but not in the interface are\n# included in the documentation. If set to NO, only methods in the interface are\n# included.\n# The default value is: NO.\n\nEXTRACT_LOCAL_METHODS  = NO\n\n# If this flag is set to YES, the members of anonymous namespaces will be\n# extracted and appear in the documentation as a namespace called\n# 'anonymous_namespace{file}', where file will be replaced with the base name of\n# the file that contains the anonymous namespace. By default anonymous namespace\n# are hidden.\n# The default value is: NO.\n\nEXTRACT_ANON_NSPACES   = NO\n\n# If this flag is set to YES, the name of an unnamed parameter in a declaration\n# will be determined by the corresponding definition. By default unnamed\n# parameters remain unnamed in the output.\n# The default value is: YES.\n\nRESOLVE_UNNAMED_PARAMS = YES\n\n# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all\n# undocumented members inside documented classes or files. If set to NO these\n# members will be included in the various overviews, but no documentation\n# section is generated. This option has no effect if EXTRACT_ALL is enabled.\n# The default value is: NO.\n\nHIDE_UNDOC_MEMBERS     = NO\n\n# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all\n# undocumented classes that are normally visible in the class hierarchy. If set\n# to NO, these classes will be included in the various overviews. This option\n# will also hide undocumented C++ concepts if enabled. This option has no effect\n# if EXTRACT_ALL is enabled.\n# The default value is: NO.\n\nHIDE_UNDOC_CLASSES     = NO\n\n# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend\n# declarations. If set to NO, these declarations will be included in the\n# documentation.\n# The default value is: NO.\n\nHIDE_FRIEND_COMPOUNDS  = NO\n\n# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any\n# documentation blocks found inside the body of a function. If set to NO, these\n# blocks will be appended to the function's detailed documentation block.\n# The default value is: NO.\n\nHIDE_IN_BODY_DOCS      = NO\n\n# The INTERNAL_DOCS tag determines if documentation that is typed after a\n# \\internal command is included. If the tag is set to NO then the documentation\n# will be excluded. Set it to YES to include the internal documentation.\n# The default value is: NO.\n\nINTERNAL_DOCS          = NO\n\n# With the correct setting of option CASE_SENSE_NAMES doxygen will better be\n# able to match the capabilities of the underlying filesystem. In case the\n# filesystem is case sensitive (i.e. it supports files in the same directory\n# whose names only differ in casing), the option must be set to YES to properly\n# deal with such files in case they appear in the input. For filesystems that\n# are not case sensitive the option should be set to NO to properly deal with\n# output files written for symbols that only differ in casing, such as for two\n# classes, one named CLASS and the other named Class, and to also support\n# references to files without having to specify the exact matching casing. On\n# Windows (including Cygwin) and MacOS, users should typically set this option\n# to NO, whereas on Linux or other Unix flavors it should typically be set to\n# YES.\n# Possible values are: SYSTEM, NO and YES.\n# The default value is: SYSTEM.\n\nCASE_SENSE_NAMES       = NO\n\n# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with\n# their full class and namespace scopes in the documentation. If set to YES, the\n# scope will be hidden.\n# The default value is: NO.\n\nHIDE_SCOPE_NAMES       = NO\n\n# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will\n# append additional text to a page's title, such as Class Reference. If set to\n# YES the compound reference will be hidden.\n# The default value is: NO.\n\nHIDE_COMPOUND_REFERENCE= NO\n\n# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class\n# will show which file needs to be included to use the class.\n# The default value is: YES.\n\nSHOW_HEADERFILE        = YES\n\n# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of\n# the files that are included by a file in the documentation of that file.\n# The default value is: YES.\n\nSHOW_INCLUDE_FILES     = YES\n\n# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each\n# grouped member an include statement to the documentation, telling the reader\n# which file to include in order to use the member.\n# The default value is: NO.\n\nSHOW_GROUPED_MEMB_INC  = NO\n\n# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include\n# files with double quotes in the documentation rather than with sharp brackets.\n# The default value is: NO.\n\nFORCE_LOCAL_INCLUDES   = NO\n\n# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the\n# documentation for inline members.\n# The default value is: YES.\n\nINLINE_INFO            = YES\n\n# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the\n# (detailed) documentation of file and class members alphabetically by member\n# name. If set to NO, the members will appear in declaration order.\n# The default value is: YES.\n\nSORT_MEMBER_DOCS       = YES\n\n# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief\n# descriptions of file, namespace and class members alphabetically by member\n# name. If set to NO, the members will appear in declaration order. Note that\n# this will also influence the order of the classes in the class list.\n# The default value is: NO.\n\nSORT_BRIEF_DOCS        = NO\n\n# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the\n# (brief and detailed) documentation of class members so that constructors and\n# destructors are listed first. If set to NO the constructors will appear in the\n# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.\n# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief\n# member documentation.\n# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting\n# detailed member documentation.\n# The default value is: NO.\n\nSORT_MEMBERS_CTORS_1ST = NO\n\n# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy\n# of group names into alphabetical order. If set to NO the group names will\n# appear in their defined order.\n# The default value is: NO.\n\nSORT_GROUP_NAMES       = NO\n\n# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by\n# fully-qualified names, including namespaces. If set to NO, the class list will\n# be sorted only by class name, not including the namespace part.\n# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.\n# Note: This option applies only to the class list, not to the alphabetical\n# list.\n# The default value is: NO.\n\nSORT_BY_SCOPE_NAME     = NO\n\n# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper\n# type resolution of all parameters of a function it will reject a match between\n# the prototype and the implementation of a member function even if there is\n# only one candidate or it is obvious which candidate to choose by doing a\n# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still\n# accept a match between prototype and implementation in such cases.\n# The default value is: NO.\n\nSTRICT_PROTO_MATCHING  = NO\n\n# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo\n# list. This list is created by putting \\todo commands in the documentation.\n# The default value is: YES.\n\nGENERATE_TODOLIST      = YES\n\n# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test\n# list. This list is created by putting \\test commands in the documentation.\n# The default value is: YES.\n\nGENERATE_TESTLIST      = YES\n\n# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug\n# list. This list is created by putting \\bug commands in the documentation.\n# The default value is: YES.\n\nGENERATE_BUGLIST       = YES\n\n# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)\n# the deprecated list. This list is created by putting \\deprecated commands in\n# the documentation.\n# The default value is: YES.\n\nGENERATE_DEPRECATEDLIST= YES\n\n# The ENABLED_SECTIONS tag can be used to enable conditional documentation\n# sections, marked by \\if <section_label> ... \\endif and \\cond <section_label>\n# ... \\endcond blocks.\n\nENABLED_SECTIONS       =\n\n# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the\n# initial value of a variable or macro / define can have for it to appear in the\n# documentation. If the initializer consists of more lines than specified here\n# it will be hidden. Use a value of 0 to hide initializers completely. The\n# appearance of the value of individual variables and macros / defines can be\n# controlled using \\showinitializer or \\hideinitializer command in the\n# documentation regardless of this setting.\n# Minimum value: 0, maximum value: 10000, default value: 30.\n\nMAX_INITIALIZER_LINES  = 0\n\n# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at\n# the bottom of the documentation of classes and structs. If set to YES, the\n# list will mention the files that were used to generate the documentation.\n# The default value is: YES.\n\nSHOW_USED_FILES        = NO\n\n# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This\n# will remove the Files entry from the Quick Index and from the Folder Tree View\n# (if specified).\n# The default value is: YES.\n\nSHOW_FILES             = NO\n\n# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces\n# page. This will remove the Namespaces entry from the Quick Index and from the\n# Folder Tree View (if specified).\n# The default value is: YES.\n\nSHOW_NAMESPACES        = YES\n\n# The FILE_VERSION_FILTER tag can be used to specify a program or script that\n# doxygen should invoke to get the current version for each file (typically from\n# the version control system). Doxygen will invoke the program by executing (via\n# popen()) the command command input-file, where command is the value of the\n# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided\n# by doxygen. Whatever the program writes to standard output is used as the file\n# version. For an example see the documentation.\n\nFILE_VERSION_FILTER    =\n\n# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed\n# by doxygen. The layout file controls the global structure of the generated\n# output files in an output format independent way. To create the layout file\n# that represents doxygen's defaults, run doxygen with the -l option. You can\n# optionally specify a file name after the option, if omitted DoxygenLayout.xml\n# will be used as the name of the layout file. See also section \"Changing the\n# layout of pages\" for information.\n#\n# Note that if you run doxygen from a directory containing a file called\n# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE\n# tag is left empty.\n\nLAYOUT_FILE            =\n\n# The CITE_BIB_FILES tag can be used to specify one or more bib files containing\n# the reference definitions. This must be a list of .bib files. The .bib\n# extension is automatically appended if omitted. This requires the bibtex tool\n# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.\n# For LaTeX the style of the bibliography can be controlled using\n# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the\n# search path. See also \\cite for info how to create references.\n\nCITE_BIB_FILES         =\n\n#---------------------------------------------------------------------------\n# Configuration options related to warning and progress messages\n#---------------------------------------------------------------------------\n\n# The QUIET tag can be used to turn on/off the messages that are generated to\n# standard output by doxygen. If QUIET is set to YES this implies that the\n# messages are off.\n# The default value is: NO.\n\nQUIET                  = NO\n\n# The WARNINGS tag can be used to turn on/off the warning messages that are\n# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES\n# this implies that the warnings are on.\n#\n# Tip: Turn warnings on while writing the documentation.\n# The default value is: YES.\n\nWARNINGS               = YES\n\n# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate\n# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag\n# will automatically be disabled.\n# The default value is: YES.\n\nWARN_IF_UNDOCUMENTED   = YES\n\n# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for\n# potential errors in the documentation, such as documenting some parameters in\n# a documented function twice, or documenting parameters that don't exist or\n# using markup commands wrongly.\n# The default value is: YES.\n\nWARN_IF_DOC_ERROR      = YES\n\n# If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete\n# function parameter documentation. If set to NO, doxygen will accept that some\n# parameters have no documentation without warning.\n# The default value is: YES.\n\nWARN_IF_INCOMPLETE_DOC = YES\n\n# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that\n# are documented, but have no documentation for their parameters or return\n# value. If set to NO, doxygen will only warn about wrong parameter\n# documentation, but not about the absence of documentation. If EXTRACT_ALL is\n# set to YES then this flag will automatically be disabled. See also\n# WARN_IF_INCOMPLETE_DOC\n# The default value is: NO.\n\nWARN_NO_PARAMDOC       = NO\n\n# If WARN_IF_UNDOC_ENUM_VAL option is set to YES, doxygen will warn about\n# undocumented enumeration values. If set to NO, doxygen will accept\n# undocumented enumeration values. If EXTRACT_ALL is set to YES then this flag\n# will automatically be disabled.\n# The default value is: NO.\n\nWARN_IF_UNDOC_ENUM_VAL = NO\n\n# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when\n# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS\n# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but\n# at the end of the doxygen process doxygen will return with a non-zero status.\n# If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS_PRINT then doxygen behaves\n# like FAIL_ON_WARNINGS but in case no WARN_LOGFILE is defined doxygen will not\n# write the warning messages in between other messages but write them at the end\n# of a run, in case a WARN_LOGFILE is defined the warning messages will be\n# besides being in the defined file also be shown at the end of a run, unless\n# the WARN_LOGFILE is defined as - i.e. standard output (stdout) in that case\n# the behavior will remain as with the setting FAIL_ON_WARNINGS.\n# Possible values are: NO, YES, FAIL_ON_WARNINGS and FAIL_ON_WARNINGS_PRINT.\n# The default value is: NO.\n\nWARN_AS_ERROR          = NO\n\n# The WARN_FORMAT tag determines the format of the warning messages that doxygen\n# can produce. The string should contain the $file, $line, and $text tags, which\n# will be replaced by the file and line number from which the warning originated\n# and the warning text. Optionally the format may contain $version, which will\n# be replaced by the version of the file (if it could be obtained via\n# FILE_VERSION_FILTER)\n# See also: WARN_LINE_FORMAT\n# The default value is: $file:$line: $text.\n\nWARN_FORMAT            = \"$file:$line: $text\"\n\n# In the $text part of the WARN_FORMAT command it is possible that a reference\n# to a more specific place is given. To make it easier to jump to this place\n# (outside of doxygen) the user can define a custom \"cut\" / \"paste\" string.\n# Example:\n# WARN_LINE_FORMAT = \"'vi $file +$line'\"\n# See also: WARN_FORMAT\n# The default value is: at line $line of file $file.\n\nWARN_LINE_FORMAT       = \"at line $line of file $file\"\n\n# The WARN_LOGFILE tag can be used to specify a file to which warning and error\n# messages should be written. If left blank the output is written to standard\n# error (stderr). In case the file specified cannot be opened for writing the\n# warning and error messages are written to standard error. When as file - is\n# specified the warning and error messages are written to standard output\n# (stdout).\n\nWARN_LOGFILE           =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the input files\n#---------------------------------------------------------------------------\n\n# The INPUT tag is used to specify the files and/or directories that contain\n# documented source files. You may enter file names like myfile.cpp or\n# directories like /usr/src/myproject. Separate the files or directories with\n# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING\n# Note: If this tag is empty the current directory is searched.\n\nINPUT                  = mimalloc-doc.h\n\n# This tag can be used to specify the character encoding of the source files\n# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses\n# libiconv (or the iconv built into libc) for the transcoding. See the libiconv\n# documentation (see:\n# https://www.gnu.org/software/libiconv/) for the list of possible encodings.\n# See also: INPUT_FILE_ENCODING\n# The default value is: UTF-8.\n\nINPUT_ENCODING         = UTF-8\n\n# This tag can be used to specify the character encoding of the source files\n# that doxygen parses The INPUT_FILE_ENCODING tag can be used to specify\n# character encoding on a per file pattern basis. Doxygen will compare the file\n# name with each pattern and apply the encoding instead of the default\n# INPUT_ENCODING) if there is a match. The character encodings are a list of the\n# form: pattern=encoding (like *.php=ISO-8859-1).\n# See also: INPUT_ENCODING for further information on supported encodings.\n\nINPUT_FILE_ENCODING    =\n\n# If the value of the INPUT tag contains directories, you can use the\n# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and\n# *.h) to filter out the source-files in the directories.\n#\n# Note that for custom extensions or not directly supported extensions you also\n# need to set EXTENSION_MAPPING for the extension otherwise the files are not\n# read by doxygen.\n#\n# Note the list of default checked file patterns might differ from the list of\n# default file extension mappings.\n#\n# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cxxm,\n# *.cpp, *.cppm, *.ccm, *.c++, *.c++m, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl,\n# *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, *.h++, *.ixx, *.l, *.cs, *.d,\n# *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to\n# be provided as doxygen C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,\n# *.f18, *.f, *.for, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice.\n\nFILE_PATTERNS          = *.c \\\n                         *.cc \\\n                         *.cxx \\\n                         *.cpp \\\n                         *.c++ \\\n                         *.java \\\n                         *.ii \\\n                         *.ixx \\\n                         *.ipp \\\n                         *.i++ \\\n                         *.inl \\\n                         *.idl \\\n                         *.ddl \\\n                         *.odl \\\n                         *.h \\\n                         *.hh \\\n                         *.hxx \\\n                         *.hpp \\\n                         *.h++ \\\n                         *.cs \\\n                         *.d \\\n                         *.php \\\n                         *.php4 \\\n                         *.php5 \\\n                         *.phtml \\\n                         *.inc \\\n                         *.m \\\n                         *.markdown \\\n                         *.md \\\n                         *.mm \\\n                         *.dox \\\n                         *.py \\\n                         *.pyw \\\n                         *.f90 \\\n                         *.f95 \\\n                         *.f03 \\\n                         *.f08 \\\n                         *.f \\\n                         *.for \\\n                         *.tcl \\\n                         *.vhd \\\n                         *.vhdl \\\n                         *.ucf \\\n                         *.qsf\n\n# The RECURSIVE tag can be used to specify whether or not subdirectories should\n# be searched for input files as well.\n# The default value is: NO.\n\nRECURSIVE              = NO\n\n# The EXCLUDE tag can be used to specify files and/or directories that should be\n# excluded from the INPUT source files. This way you can easily exclude a\n# subdirectory from a directory tree whose root is specified with the INPUT tag.\n#\n# Note that relative paths are relative to the directory from which doxygen is\n# run.\n\nEXCLUDE                =\n\n# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or\n# directories that are symbolic links (a Unix file system feature) are excluded\n# from the input.\n# The default value is: NO.\n\nEXCLUDE_SYMLINKS       = NO\n\n# If the value of the INPUT tag contains directories, you can use the\n# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude\n# certain files from those directories.\n#\n# Note that the wildcards are matched against the file with absolute path, so to\n# exclude all test directories for example use the pattern */test/*\n\nEXCLUDE_PATTERNS       =\n\n# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names\n# (namespaces, classes, functions, etc.) that should be excluded from the\n# output. The symbol name can be a fully qualified name, a word, or if the\n# wildcard * is used, a substring. Examples: ANamespace, AClass,\n# ANamespace::AClass, ANamespace::*Test\n\nEXCLUDE_SYMBOLS        =\n\n# The EXAMPLE_PATH tag can be used to specify one or more files or directories\n# that contain example code fragments that are included (see the \\include\n# command).\n\nEXAMPLE_PATH           =\n\n# If the value of the EXAMPLE_PATH tag contains directories, you can use the\n# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and\n# *.h) to filter out the source-files in the directories. If left blank all\n# files are included.\n\nEXAMPLE_PATTERNS       = *\n\n# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be\n# searched for input files to be used with the \\include or \\dontinclude commands\n# irrespective of the value of the RECURSIVE tag.\n# The default value is: NO.\n\nEXAMPLE_RECURSIVE      = NO\n\n# The IMAGE_PATH tag can be used to specify one or more files or directories\n# that contain images that are to be included in the documentation (see the\n# \\image command).\n\nIMAGE_PATH             =\n\n# The INPUT_FILTER tag can be used to specify a program that doxygen should\n# invoke to filter for each input file. Doxygen will invoke the filter program\n# by executing (via popen()) the command:\n#\n# <filter> <input-file>\n#\n# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the\n# name of an input file. Doxygen will then use the output that the filter\n# program writes to standard output. If FILTER_PATTERNS is specified, this tag\n# will be ignored.\n#\n# Note that the filter must not add or remove lines; it is applied before the\n# code is scanned, but not when the output code is generated. If lines are added\n# or removed, the anchors will not be placed correctly.\n#\n# Note that doxygen will use the data processed and written to standard output\n# for further processing, therefore nothing else, like debug statements or used\n# commands (so in case of a Windows batch file always use @echo OFF), should be\n# written to standard output.\n#\n# Note that for custom extensions or not directly supported extensions you also\n# need to set EXTENSION_MAPPING for the extension otherwise the files are not\n# properly processed by doxygen.\n\nINPUT_FILTER           =\n\n# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern\n# basis. Doxygen will compare the file name with each pattern and apply the\n# filter if there is a match. The filters are a list of the form: pattern=filter\n# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how\n# filters are used. If the FILTER_PATTERNS tag is empty or if none of the\n# patterns match the file name, INPUT_FILTER is applied.\n#\n# Note that for custom extensions or not directly supported extensions you also\n# need to set EXTENSION_MAPPING for the extension otherwise the files are not\n# properly processed by doxygen.\n\nFILTER_PATTERNS        =\n\n# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using\n# INPUT_FILTER) will also be used to filter the input files that are used for\n# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).\n# The default value is: NO.\n\nFILTER_SOURCE_FILES    = NO\n\n# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file\n# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and\n# it is also possible to disable source filtering for a specific pattern using\n# *.ext= (so without naming a filter).\n# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.\n\nFILTER_SOURCE_PATTERNS =\n\n# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that\n# is part of the input, its contents will be placed on the main page\n# (index.html). This can be useful if you have a project on for instance GitHub\n# and want to reuse the introduction page also for the doxygen output.\n\nUSE_MDFILE_AS_MAINPAGE =\n\n# The Fortran standard specifies that for fixed formatted Fortran code all\n# characters from position 72 are to be considered as comment. A common\n# extension is to allow longer lines before the automatic comment starts. The\n# setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can\n# be processed before the automatic comment starts.\n# Minimum value: 7, maximum value: 10000, default value: 72.\n\nFORTRAN_COMMENT_AFTER  = 72\n\n#---------------------------------------------------------------------------\n# Configuration options related to source browsing\n#---------------------------------------------------------------------------\n\n# If the SOURCE_BROWSER tag is set to YES then a list of source files will be\n# generated. Documented entities will be cross-referenced with these sources.\n#\n# Note: To get rid of all source code in the generated output, make sure that\n# also VERBATIM_HEADERS is set to NO.\n# The default value is: NO.\n\nSOURCE_BROWSER         = NO\n\n# Setting the INLINE_SOURCES tag to YES will include the body of functions,\n# multi-line macros, enums or list initialized variables directly into the\n# documentation.\n# The default value is: NO.\n\nINLINE_SOURCES         = NO\n\n# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any\n# special comment blocks from generated source code fragments. Normal C, C++ and\n# Fortran comments will always remain visible.\n# The default value is: YES.\n\nSTRIP_CODE_COMMENTS    = YES\n\n# If the REFERENCED_BY_RELATION tag is set to YES then for each documented\n# entity all documented functions referencing it will be listed.\n# The default value is: NO.\n\nREFERENCED_BY_RELATION = NO\n\n# If the REFERENCES_RELATION tag is set to YES then for each documented function\n# all documented entities called/used by that function will be listed.\n# The default value is: NO.\n\nREFERENCES_RELATION    = NO\n\n# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set\n# to YES then the hyperlinks from functions in REFERENCES_RELATION and\n# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will\n# link to the documentation.\n# The default value is: YES.\n\nREFERENCES_LINK_SOURCE = YES\n\n# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the\n# source code will show a tooltip with additional information such as prototype,\n# brief description and links to the definition and documentation. Since this\n# will make the HTML file larger and loading of large files a bit slower, you\n# can opt to disable this feature.\n# The default value is: YES.\n# This tag requires that the tag SOURCE_BROWSER is set to YES.\n\nSOURCE_TOOLTIPS        = YES\n\n# If the USE_HTAGS tag is set to YES then the references to source code will\n# point to the HTML generated by the htags(1) tool instead of doxygen built-in\n# source browser. The htags tool is part of GNU's global source tagging system\n# (see https://www.gnu.org/software/global/global.html). You will need version\n# 4.8.6 or higher.\n#\n# To use it do the following:\n# - Install the latest version of global\n# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file\n# - Make sure the INPUT points to the root of the source tree\n# - Run doxygen as normal\n#\n# Doxygen will invoke htags (and that will in turn invoke gtags), so these\n# tools must be available from the command line (i.e. in the search path).\n#\n# The result: instead of the source browser generated by doxygen, the links to\n# source code will now point to the output of htags.\n# The default value is: NO.\n# This tag requires that the tag SOURCE_BROWSER is set to YES.\n\nUSE_HTAGS              = NO\n\n# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a\n# verbatim copy of the header file for each class for which an include is\n# specified. Set to NO to disable this.\n# See also: Section \\class.\n# The default value is: YES.\n\nVERBATIM_HEADERS       = YES\n\n# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the\n# clang parser (see:\n# http://clang.llvm.org/) for more accurate parsing at the cost of reduced\n# performance. This can be particularly helpful with template rich C++ code for\n# which doxygen's built-in parser lacks the necessary type information.\n# Note: The availability of this option depends on whether or not doxygen was\n# generated with the -Duse_libclang=ON option for CMake.\n# The default value is: NO.\n\nCLANG_ASSISTED_PARSING = NO\n\n# If the CLANG_ASSISTED_PARSING tag is set to YES and the CLANG_ADD_INC_PATHS\n# tag is set to YES then doxygen will add the directory of each input to the\n# include path.\n# The default value is: YES.\n# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.\n\nCLANG_ADD_INC_PATHS    = YES\n\n# If clang assisted parsing is enabled you can provide the compiler with command\n# line options that you would normally use when invoking the compiler. Note that\n# the include paths will already be set by doxygen for the files and directories\n# specified with INPUT and INCLUDE_PATH.\n# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.\n\nCLANG_OPTIONS          =\n\n# If clang assisted parsing is enabled you can provide the clang parser with the\n# path to the directory containing a file called compile_commands.json. This\n# file is the compilation database (see:\n# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the\n# options used when the source files were built. This is equivalent to\n# specifying the -p option to a clang tool, such as clang-check. These options\n# will then be passed to the parser. Any options specified with CLANG_OPTIONS\n# will be added as well.\n# Note: The availability of this option depends on whether or not doxygen was\n# generated with the -Duse_libclang=ON option for CMake.\n\nCLANG_DATABASE_PATH    =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the alphabetical class index\n#---------------------------------------------------------------------------\n\n# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all\n# compounds will be generated. Enable this if the project contains a lot of\n# classes, structs, unions or interfaces.\n# The default value is: YES.\n\nALPHABETICAL_INDEX     = YES\n\n# The IGNORE_PREFIX tag can be used to specify a prefix (or a list of prefixes)\n# that should be ignored while generating the index headers. The IGNORE_PREFIX\n# tag works for classes, function and member names. The entity will be placed in\n# the alphabetical list under the first letter of the entity name that remains\n# after removing the prefix.\n# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.\n\nIGNORE_PREFIX          =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the HTML output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output\n# The default value is: YES.\n\nGENERATE_HTML          = YES\n\n# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it.\n# The default directory is: html.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_OUTPUT            = docs\n\n# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each\n# generated HTML page (for example: .htm, .php, .asp).\n# The default value is: .html.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_FILE_EXTENSION    = .html\n\n# The HTML_HEADER tag can be used to specify a user-defined HTML header file for\n# each generated HTML page. If the tag is left blank doxygen will generate a\n# standard header.\n#\n# To get valid HTML the header file that includes any scripts and style sheets\n# that doxygen needs, which is dependent on the configuration options used (e.g.\n# the setting GENERATE_TREEVIEW). It is highly recommended to start with a\n# default header using\n# doxygen -w html new_header.html new_footer.html new_stylesheet.css\n# YourConfigFile\n# and then modify the file new_header.html. See also section \"Doxygen usage\"\n# for information on how to generate the default header that doxygen normally\n# uses.\n# Note: The header is subject to change so you typically have to regenerate the\n# default header when upgrading to a newer version of doxygen. For a description\n# of the possible markers and block names see the documentation.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_HEADER            =\n\n# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each\n# generated HTML page. If the tag is left blank doxygen will generate a standard\n# footer. See HTML_HEADER for more information on how to generate a default\n# footer and what special commands can be used inside the footer. See also\n# section \"Doxygen usage\" for information on how to generate the default footer\n# that doxygen normally uses.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_FOOTER            =\n\n# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style\n# sheet that is used by each HTML page. It can be used to fine-tune the look of\n# the HTML output. If left blank doxygen will generate a default style sheet.\n# See also section \"Doxygen usage\" for information on how to generate the style\n# sheet that doxygen normally uses.\n# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as\n# it is more robust and this tag (HTML_STYLESHEET) will in the future become\n# obsolete.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_STYLESHEET        =\n\n# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined\n# cascading style sheets that are included after the standard style sheets\n# created by doxygen. Using this option one can overrule certain style aspects.\n# This is preferred over using HTML_STYLESHEET since it does not replace the\n# standard style sheet and is therefore more robust against future updates.\n# Doxygen will copy the style sheet files to the output directory.\n# Note: The order of the extra style sheet files is of importance (e.g. the last\n# style sheet in the list overrules the setting of the previous ones in the\n# list).\n# Note: Since the styling of scrollbars can currently not be overruled in\n# Webkit/Chromium, the styling will be left out of the default doxygen.css if\n# one or more extra stylesheets have been specified. So if scrollbar\n# customization is desired it has to be added explicitly. For an example see the\n# documentation.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_EXTRA_STYLESHEET  = mimalloc-doxygen.css\n\n# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or\n# other source files which should be copied to the HTML output directory. Note\n# that these files will be copied to the base HTML output directory. Use the\n# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these\n# files. In the HTML_STYLESHEET file, use the file name only. Also note that the\n# files will be copied as-is; there are no commands or markers available.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_EXTRA_FILES       =\n\n# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output\n# should be rendered with a dark or light theme.\n# Possible values are: LIGHT always generates light mode output, DARK always\n# generates dark mode output, AUTO_LIGHT automatically sets the mode according\n# to the user preference, uses light mode if no preference is set (the default),\n# AUTO_DARK automatically sets the mode according to the user preference, uses\n# dark mode if no preference is set and TOGGLE allows a user to switch between\n# light and dark mode via a button.\n# The default value is: AUTO_LIGHT.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_COLORSTYLE        = LIGHT\n\n# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen\n# will adjust the colors in the style sheet and background images according to\n# this color. Hue is specified as an angle on a color-wheel, see\n# https://en.wikipedia.org/wiki/Hue for more information. For instance the value\n# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300\n# purple, and 360 is red again.\n# Minimum value: 0, maximum value: 359, default value: 220.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_COLORSTYLE_HUE    = 189\n\n# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors\n# in the HTML output. For a value of 0 the output will use gray-scales only. A\n# value of 255 will produce the most vivid colors.\n# Minimum value: 0, maximum value: 255, default value: 100.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_COLORSTYLE_SAT    = 12\n\n# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the\n# luminance component of the colors in the HTML output. Values below 100\n# gradually make the output lighter, whereas values above 100 make the output\n# darker. The value divided by 100 is the actual gamma applied, so 80 represents\n# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not\n# change the gamma.\n# Minimum value: 40, maximum value: 240, default value: 80.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_COLORSTYLE_GAMMA  = 240\n\n# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML\n# documentation will contain a main index with vertical navigation menus that\n# are dynamically created via JavaScript. If disabled, the navigation index will\n# consists of multiple levels of tabs that are statically embedded in every HTML\n# page. Disable this option to support browsers that do not have JavaScript,\n# like the Qt help browser.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_DYNAMIC_MENUS     = NO\n\n# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML\n# documentation will contain sections that can be hidden and shown after the\n# page has loaded.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_DYNAMIC_SECTIONS  = NO\n\n# If the HTML_CODE_FOLDING tag is set to YES then classes and functions can be\n# dynamically folded and expanded in the generated HTML source code.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_CODE_FOLDING      = YES\n\n# If the HTML_COPY_CLIPBOARD tag is set to YES then doxygen will show an icon in\n# the top right corner of code and text fragments that allows the user to copy\n# its content to the clipboard. Note this only works if supported by the browser\n# and the web page is served via a secure context (see:\n# https://www.w3.org/TR/secure-contexts/), i.e. using the https: or file:\n# protocol.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_COPY_CLIPBOARD    = YES\n\n# Doxygen stores a couple of settings persistently in the browser (via e.g.\n# cookies). By default these settings apply to all HTML pages generated by\n# doxygen across all projects. The HTML_PROJECT_COOKIE tag can be used to store\n# the settings under a project specific key, such that the user preferences will\n# be stored separately.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_PROJECT_COOKIE    =\n\n# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries\n# shown in the various tree structured indices initially; the user can expand\n# and collapse entries dynamically later on. Doxygen will expand the tree to\n# such a level that at most the specified number of entries are visible (unless\n# a fully collapsed tree already exceeds this amount). So setting the number of\n# entries 1 will produce a full collapsed tree by default. 0 is a special value\n# representing an infinite number of entries and will result in a full expanded\n# tree by default.\n# Minimum value: 0, maximum value: 9999, default value: 100.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_INDEX_NUM_ENTRIES = 100\n\n# If the GENERATE_DOCSET tag is set to YES, additional index files will be\n# generated that can be used as input for Apple's Xcode 3 integrated development\n# environment (see:\n# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To\n# create a documentation set, doxygen will generate a Makefile in the HTML\n# output directory. Running make will produce the docset in that directory and\n# running make install will install the docset in\n# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at\n# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy\n# genXcode/_index.html for more information.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_DOCSET        = NO\n\n# This tag determines the name of the docset feed. A documentation feed provides\n# an umbrella under which multiple documentation sets from a single provider\n# (such as a company or product suite) can be grouped.\n# The default value is: Doxygen generated docs.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_FEEDNAME        = \"Doxygen generated docs\"\n\n# This tag determines the URL of the docset feed. A documentation feed provides\n# an umbrella under which multiple documentation sets from a single provider\n# (such as a company or product suite) can be grouped.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_FEEDURL         =\n\n# This tag specifies a string that should uniquely identify the documentation\n# set bundle. This should be a reverse domain-name style string, e.g.\n# com.mycompany.MyDocSet. Doxygen will append .docset to the name.\n# The default value is: org.doxygen.Project.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_BUNDLE_ID       = org.doxygen.Project\n\n# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify\n# the documentation publisher. This should be a reverse domain-name style\n# string, e.g. com.mycompany.MyDocSet.documentation.\n# The default value is: org.doxygen.Publisher.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_PUBLISHER_ID    = org.doxygen.Publisher\n\n# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.\n# The default value is: Publisher.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_PUBLISHER_NAME  = Publisher\n\n# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three\n# additional HTML index files: index.hhp, index.hhc, and index.hhk. The\n# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop\n# on Windows. In the beginning of 2021 Microsoft took the original page, with\n# a.o. the download links, offline the HTML help workshop was already many years\n# in maintenance mode). You can download the HTML help workshop from the web\n# archives at Installation executable (see:\n# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo\n# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe).\n#\n# The HTML Help Workshop contains a compiler that can convert all HTML output\n# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML\n# files are now used as the Windows 98 help format, and will replace the old\n# Windows help format (.hlp) on all Windows platforms in the future. Compressed\n# HTML files also contain an index, a table of contents, and you can search for\n# words in the documentation. The HTML workshop also contains a viewer for\n# compressed HTML files.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_HTMLHELP      = NO\n\n# The CHM_FILE tag can be used to specify the file name of the resulting .chm\n# file. You can add a path in front of the file if the result should not be\n# written to the html output directory.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nCHM_FILE               =\n\n# The HHC_LOCATION tag can be used to specify the location (absolute path\n# including file name) of the HTML help compiler (hhc.exe). If non-empty,\n# doxygen will try to run the HTML help compiler on the generated index.hhp.\n# The file has to be specified with full path.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nHHC_LOCATION           =\n\n# The GENERATE_CHI flag controls if a separate .chi index file is generated\n# (YES) or that it should be included in the main .chm file (NO).\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nGENERATE_CHI           = NO\n\n# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)\n# and project file content.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nCHM_INDEX_ENCODING     =\n\n# The BINARY_TOC flag controls whether a binary table of contents is generated\n# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it\n# enables the Previous and Next buttons.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nBINARY_TOC             = NO\n\n# The TOC_EXPAND flag can be set to YES to add extra items for group members to\n# the table of contents of the HTML help documentation and to the tree view.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nTOC_EXPAND             = NO\n\n# The SITEMAP_URL tag is used to specify the full URL of the place where the\n# generated documentation will be placed on the server by the user during the\n# deployment of the documentation. The generated sitemap is called sitemap.xml\n# and placed on the directory specified by HTML_OUTPUT. In case no SITEMAP_URL\n# is specified no sitemap is generated. For information about the sitemap\n# protocol see https://www.sitemaps.org\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nSITEMAP_URL            =\n\n# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and\n# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that\n# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help\n# (.qch) of the generated HTML documentation.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_QHP           = NO\n\n# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify\n# the file name of the resulting .qch file. The path specified is relative to\n# the HTML output folder.\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQCH_FILE               =\n\n# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help\n# Project output. For more information please see Qt Help Project / Namespace\n# (see:\n# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).\n# The default value is: org.doxygen.Project.\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_NAMESPACE          = org.doxygen.Project\n\n# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt\n# Help Project output. For more information please see Qt Help Project / Virtual\n# Folders (see:\n# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders).\n# The default value is: doc.\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_VIRTUAL_FOLDER     = doc\n\n# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom\n# filter to add. For more information please see Qt Help Project / Custom\n# Filters (see:\n# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_CUST_FILTER_NAME   =\n\n# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the\n# custom filter to add. For more information please see Qt Help Project / Custom\n# Filters (see:\n# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_CUST_FILTER_ATTRS  =\n\n# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this\n# project's filter section matches. Qt Help Project / Filter Attributes (see:\n# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_SECT_FILTER_ATTRS  =\n\n# The QHG_LOCATION tag can be used to specify the location (absolute path\n# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to\n# run qhelpgenerator on the generated .qhp file.\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHG_LOCATION           =\n\n# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be\n# generated, together with the HTML files, they form an Eclipse help plugin. To\n# install this plugin and make it available under the help contents menu in\n# Eclipse, the contents of the directory containing the HTML and XML files needs\n# to be copied into the plugins directory of eclipse. The name of the directory\n# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.\n# After copying Eclipse needs to be restarted before the help appears.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_ECLIPSEHELP   = NO\n\n# A unique identifier for the Eclipse help plugin. When installing the plugin\n# the directory name containing the HTML and XML files should also have this\n# name. Each documentation set should have its own identifier.\n# The default value is: org.doxygen.Project.\n# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.\n\nECLIPSE_DOC_ID         = org.doxygen.Project\n\n# If you want full control over the layout of the generated HTML pages it might\n# be necessary to disable the index and replace it with your own. The\n# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top\n# of each HTML page. A value of NO enables the index and the value YES disables\n# it. Since the tabs in the index contain the same information as the navigation\n# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nDISABLE_INDEX          = YES\n\n# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index\n# structure should be generated to display hierarchical information. If the tag\n# value is set to YES, a side panel will be generated containing a tree-like\n# index structure (just like the one that is generated for HTML Help). For this\n# to work a browser that supports JavaScript, DHTML, CSS and frames is required\n# (i.e. any modern browser). Windows users are probably better off using the\n# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can\n# further fine tune the look of the index (see \"Fine-tuning the output\"). As an\n# example, the default style sheet generated by doxygen has an example that\n# shows how to put an image at the root of the tree instead of the PROJECT_NAME.\n# Since the tree basically has the same information as the tab index, you could\n# consider setting DISABLE_INDEX to YES when enabling this option.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_TREEVIEW      = YES\n\n# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the\n# FULL_SIDEBAR option determines if the side bar is limited to only the treeview\n# area (value NO) or if it should extend to the full height of the window (value\n# YES). Setting this to YES gives a layout similar to\n# https://docs.readthedocs.io with more room for contents, but less room for the\n# project logo, title, and description. If either GENERATE_TREEVIEW or\n# DISABLE_INDEX is set to NO, this option has no effect.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nFULL_SIDEBAR           = NO\n\n# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that\n# doxygen will group on one line in the generated HTML documentation.\n#\n# Note that a value of 0 will completely suppress the enum values from appearing\n# in the overview section.\n# Minimum value: 0, maximum value: 20, default value: 4.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nENUM_VALUES_PER_LINE   = 4\n\n# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used\n# to set the initial width (in pixels) of the frame in which the tree is shown.\n# Minimum value: 0, maximum value: 1500, default value: 250.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nTREEVIEW_WIDTH         = 180\n\n# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to\n# external symbols imported via tag files in a separate window.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nEXT_LINKS_IN_WINDOW    = NO\n\n# If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email\n# addresses.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nOBFUSCATE_EMAILS       = YES\n\n# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg\n# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see\n# https://inkscape.org) to generate formulas as SVG images instead of PNGs for\n# the HTML output. These images will generally look nicer at scaled resolutions.\n# Possible values are: png (the default) and svg (looks nicer but requires the\n# pdf2svg or inkscape tool).\n# The default value is: png.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_FORMULA_FORMAT    = png\n\n# Use this tag to change the font size of LaTeX formulas included as images in\n# the HTML documentation. When you change the font size after a successful\n# doxygen run you need to manually remove any form_*.png images from the HTML\n# output directory to force them to be regenerated.\n# Minimum value: 8, maximum value: 50, default value: 10.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nFORMULA_FONTSIZE       = 10\n\n# The FORMULA_MACROFILE can contain LaTeX \\newcommand and \\renewcommand commands\n# to create new LaTeX commands to be used in formulas as building blocks. See\n# the section \"Including formulas\" for details.\n\nFORMULA_MACROFILE      =\n\n# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see\n# https://www.mathjax.org) which uses client side JavaScript for the rendering\n# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX\n# installed or if you want to formulas look prettier in the HTML output. When\n# enabled you may also need to install MathJax separately and configure the path\n# to it using the MATHJAX_RELPATH option.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nUSE_MATHJAX            = NO\n\n# With MATHJAX_VERSION it is possible to specify the MathJax version to be used.\n# Note that the different versions of MathJax have different requirements with\n# regards to the different settings, so it is possible that also other MathJax\n# settings have to be changed when switching between the different MathJax\n# versions.\n# Possible values are: MathJax_2 and MathJax_3.\n# The default value is: MathJax_2.\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_VERSION        = MathJax_2\n\n# When MathJax is enabled you can set the default output format to be used for\n# the MathJax output. For more details about the output format see MathJax\n# version 2 (see:\n# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3\n# (see:\n# http://docs.mathjax.org/en/latest/web/components/output.html).\n# Possible values are: HTML-CSS (which is slower, but has the best\n# compatibility. This is the name for Mathjax version 2, for MathJax version 3\n# this will be translated into chtml), NativeMML (i.e. MathML. Only supported\n# for MathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This\n# is the name for Mathjax version 3, for MathJax version 2 this will be\n# translated into HTML-CSS) and SVG.\n# The default value is: HTML-CSS.\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_FORMAT         = HTML-CSS\n\n# When MathJax is enabled you need to specify the location relative to the HTML\n# output directory using the MATHJAX_RELPATH option. The destination directory\n# should contain the MathJax.js script. For instance, if the mathjax directory\n# is located at the same level as the HTML output directory, then\n# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax\n# Content Delivery Network so you can quickly see the result without installing\n# MathJax. However, it is strongly recommended to install a local copy of\n# MathJax from https://www.mathjax.org before deployment. The default value is:\n# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2\n# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest\n\n# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax\n# extension names that should be enabled during MathJax rendering. For example\n# for MathJax version 2 (see\n# https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions):\n# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols\n# For example for MathJax version 3 (see\n# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html):\n# MATHJAX_EXTENSIONS = ams\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_EXTENSIONS     =\n\n# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces\n# of code that will be used on startup of the MathJax code. See the MathJax site\n# (see:\n# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an\n# example see the documentation.\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_CODEFILE       =\n\n# When the SEARCHENGINE tag is enabled doxygen will generate a search box for\n# the HTML output. The underlying search engine uses javascript and DHTML and\n# should work on any modern browser. Note that when using HTML help\n# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)\n# there is already a search function so this one should typically be disabled.\n# For large projects the javascript based search engine can be slow, then\n# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to\n# search using the keyboard; to jump to the search box use <access key> + S\n# (what the <access key> is depends on the OS and browser, but it is typically\n# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down\n# key> to jump into the search results window, the results can be navigated\n# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel\n# the search. The filter options can be selected when the cursor is inside the\n# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>\n# to select a filter and <Enter> or <escape> to activate or cancel the filter\n# option.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nSEARCHENGINE           = YES\n\n# When the SERVER_BASED_SEARCH tag is enabled the search engine will be\n# implemented using a web server instead of a web client using JavaScript. There\n# are two flavors of web server based searching depending on the EXTERNAL_SEARCH\n# setting. When disabled, doxygen will generate a PHP script for searching and\n# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing\n# and searching needs to be provided by external tools. See the section\n# \"External Indexing and Searching\" for details.\n# The default value is: NO.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nSERVER_BASED_SEARCH    = NO\n\n# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP\n# script for searching. Instead the search results are written to an XML file\n# which needs to be processed by an external indexer. Doxygen will invoke an\n# external search engine pointed to by the SEARCHENGINE_URL option to obtain the\n# search results.\n#\n# Doxygen ships with an example indexer (doxyindexer) and search engine\n# (doxysearch.cgi) which are based on the open source search engine library\n# Xapian (see:\n# https://xapian.org/).\n#\n# See the section \"External Indexing and Searching\" for details.\n# The default value is: NO.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nEXTERNAL_SEARCH        = NO\n\n# The SEARCHENGINE_URL should point to a search engine hosted by a web server\n# which will return the search results when EXTERNAL_SEARCH is enabled.\n#\n# Doxygen ships with an example indexer (doxyindexer) and search engine\n# (doxysearch.cgi) which are based on the open source search engine library\n# Xapian (see:\n# https://xapian.org/). See the section \"External Indexing and Searching\" for\n# details.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nSEARCHENGINE_URL       =\n\n# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed\n# search data is written to a file for indexing by an external tool. With the\n# SEARCHDATA_FILE tag the name of this file can be specified.\n# The default file is: searchdata.xml.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nSEARCHDATA_FILE        = searchdata.xml\n\n# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the\n# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is\n# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple\n# projects and redirect the results back to the right project.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nEXTERNAL_SEARCH_ID     =\n\n# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen\n# projects other than the one defined by this configuration file, but that are\n# all added to the same external search index. Each project needs to have a\n# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of\n# to a relative location where the documentation can be found. The format is:\n# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nEXTRA_SEARCH_MAPPINGS  =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the LaTeX output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.\n# The default value is: YES.\n\nGENERATE_LATEX         = NO\n\n# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it.\n# The default directory is: latex.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_OUTPUT           = latex\n\n# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be\n# invoked.\n#\n# Note that when not enabling USE_PDFLATEX the default is latex when enabling\n# USE_PDFLATEX the default is pdflatex and when in the later case latex is\n# chosen this is overwritten by pdflatex. For specific output languages the\n# default can have been set differently, this depends on the implementation of\n# the output language.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_CMD_NAME         = latex\n\n# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate\n# index for LaTeX.\n# Note: This tag is used in the Makefile / make.bat.\n# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file\n# (.tex).\n# The default file is: makeindex.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nMAKEINDEX_CMD_NAME     = makeindex\n\n# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to\n# generate index for LaTeX. In case there is no backslash (\\) as first character\n# it will be automatically added in the LaTeX code.\n# Note: This tag is used in the generated output file (.tex).\n# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat.\n# The default value is: makeindex.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_MAKEINDEX_CMD    = \\makeindex\n\n# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX\n# documents. This may be useful for small projects and may help to save some\n# trees in general.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nCOMPACT_LATEX          = NO\n\n# The PAPER_TYPE tag can be used to set the paper type that is used by the\n# printer.\n# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x\n# 14 inches) and executive (7.25 x 10.5 inches).\n# The default value is: a4.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nPAPER_TYPE             = a4\n\n# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names\n# that should be included in the LaTeX output. The package can be specified just\n# by its name or with the correct syntax as to be used with the LaTeX\n# \\usepackage command. To get the times font for instance you can specify :\n# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}\n# To use the option intlimits with the amsmath package you can specify:\n# EXTRA_PACKAGES=[intlimits]{amsmath}\n# If left blank no extra packages will be included.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nEXTRA_PACKAGES         =\n\n# The LATEX_HEADER tag can be used to specify a user-defined LaTeX header for\n# the generated LaTeX document. The header should contain everything until the\n# first chapter. If it is left blank doxygen will generate a standard header. It\n# is highly recommended to start with a default header using\n# doxygen -w latex new_header.tex new_footer.tex new_stylesheet.sty\n# and then modify the file new_header.tex. See also section \"Doxygen usage\" for\n# information on how to generate the default header that doxygen normally uses.\n#\n# Note: Only use a user-defined header if you know what you are doing!\n# Note: The header is subject to change so you typically have to regenerate the\n# default header when upgrading to a newer version of doxygen. The following\n# commands have a special meaning inside the header (and footer): For a\n# description of the possible markers and block names see the documentation.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_HEADER           =\n\n# The LATEX_FOOTER tag can be used to specify a user-defined LaTeX footer for\n# the generated LaTeX document. The footer should contain everything after the\n# last chapter. If it is left blank doxygen will generate a standard footer. See\n# LATEX_HEADER for more information on how to generate a default footer and what\n# special commands can be used inside the footer. See also section \"Doxygen\n# usage\" for information on how to generate the default footer that doxygen\n# normally uses. Note: Only use a user-defined footer if you know what you are\n# doing!\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_FOOTER           =\n\n# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined\n# LaTeX style sheets that are included after the standard style sheets created\n# by doxygen. Using this option one can overrule certain style aspects. Doxygen\n# will copy the style sheet files to the output directory.\n# Note: The order of the extra style sheet files is of importance (e.g. the last\n# style sheet in the list overrules the setting of the previous ones in the\n# list).\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_EXTRA_STYLESHEET =\n\n# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or\n# other source files which should be copied to the LATEX_OUTPUT output\n# directory. Note that the files will be copied as-is; there are no commands or\n# markers available.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_EXTRA_FILES      =\n\n# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is\n# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will\n# contain links (just like the HTML output) instead of page references. This\n# makes the output suitable for online browsing using a PDF viewer.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nPDF_HYPERLINKS         = YES\n\n# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as\n# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX\n# files. Set this option to YES, to get a higher quality PDF documentation.\n#\n# See also section LATEX_CMD_NAME for selecting the engine.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nUSE_PDFLATEX           = YES\n\n# The LATEX_BATCHMODE tag signals the behavior of LaTeX in case of an error.\n# Possible values are: NO same as ERROR_STOP, YES same as BATCH, BATCH In batch\n# mode nothing is printed on the terminal, errors are scrolled as if <return> is\n# hit at every error; missing files that TeX tries to input or request from\n# keyboard input (\\read on a not open input stream) cause the job to abort,\n# NON_STOP In nonstop mode the diagnostic message will appear on the terminal,\n# but there is no possibility of user interaction just like in batch mode,\n# SCROLL In scroll mode, TeX will stop only for missing files to input or if\n# keyboard input is necessary and ERROR_STOP In errorstop mode, TeX will stop at\n# each error, asking for user intervention.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_BATCHMODE        = NO\n\n# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the\n# index chapters (such as File Index, Compound Index, etc.) in the output.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_HIDE_INDICES     = NO\n\n# The LATEX_BIB_STYLE tag can be used to specify the style to use for the\n# bibliography, e.g. plainnat, or ieeetr. See\n# https://en.wikipedia.org/wiki/BibTeX and \\cite for more info.\n# The default value is: plain.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_BIB_STYLE        = plain\n\n# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)\n# path from which the emoji images will be read. If a relative path is entered,\n# it will be relative to the LATEX_OUTPUT directory. If left blank the\n# LATEX_OUTPUT directory will be used.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_EMOJI_DIRECTORY  =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the RTF output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The\n# RTF output is optimized for Word 97 and may not look too pretty with other RTF\n# readers/editors.\n# The default value is: NO.\n\nGENERATE_RTF           = NO\n\n# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it.\n# The default directory is: rtf.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_OUTPUT             = rtf\n\n# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF\n# documents. This may be useful for small projects and may help to save some\n# trees in general.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nCOMPACT_RTF            = NO\n\n# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will\n# contain hyperlink fields. The RTF file will contain links (just like the HTML\n# output) instead of page references. This makes the output suitable for online\n# browsing using Word or some other Word compatible readers that support those\n# fields.\n#\n# Note: WordPad (write) and others do not support links.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_HYPERLINKS         = NO\n\n# Load stylesheet definitions from file. Syntax is similar to doxygen's\n# configuration file, i.e. a series of assignments. You only have to provide\n# replacements, missing definitions are set to their default value.\n#\n# See also section \"Doxygen usage\" for information on how to generate the\n# default style sheet that doxygen normally uses.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_STYLESHEET_FILE    =\n\n# Set optional variables used in the generation of an RTF document. Syntax is\n# similar to doxygen's configuration file. A template extensions file can be\n# generated using doxygen -e rtf extensionFile.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_EXTENSIONS_FILE    =\n\n# The RTF_EXTRA_FILES tag can be used to specify one or more extra images or\n# other source files which should be copied to the RTF_OUTPUT output directory.\n# Note that the files will be copied as-is; there are no commands or markers\n# available.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_EXTRA_FILES        =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the man page output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for\n# classes and files.\n# The default value is: NO.\n\nGENERATE_MAN           = NO\n\n# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it. A directory man3 will be created inside the directory specified by\n# MAN_OUTPUT.\n# The default directory is: man.\n# This tag requires that the tag GENERATE_MAN is set to YES.\n\nMAN_OUTPUT             = man\n\n# The MAN_EXTENSION tag determines the extension that is added to the generated\n# man pages. In case the manual section does not start with a number, the number\n# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is\n# optional.\n# The default value is: .3.\n# This tag requires that the tag GENERATE_MAN is set to YES.\n\nMAN_EXTENSION          = .3\n\n# The MAN_SUBDIR tag determines the name of the directory created within\n# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by\n# MAN_EXTENSION with the initial . removed.\n# This tag requires that the tag GENERATE_MAN is set to YES.\n\nMAN_SUBDIR             =\n\n# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it\n# will generate one additional man file for each entity documented in the real\n# man page(s). These additional files only source the real man page, but without\n# them the man command would be unable to find the correct page.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_MAN is set to YES.\n\nMAN_LINKS              = NO\n\n#---------------------------------------------------------------------------\n# Configuration options related to the XML output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that\n# captures the structure of the code including all documentation.\n# The default value is: NO.\n\nGENERATE_XML           = NO\n\n# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it.\n# The default directory is: xml.\n# This tag requires that the tag GENERATE_XML is set to YES.\n\nXML_OUTPUT             = xml\n\n# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program\n# listings (including syntax highlighting and cross-referencing information) to\n# the XML output. Note that enabling this will significantly increase the size\n# of the XML output.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_XML is set to YES.\n\nXML_PROGRAMLISTING     = YES\n\n# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include\n# namespace members in file scope as well, matching the HTML output.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_XML is set to YES.\n\nXML_NS_MEMB_FILE_SCOPE = NO\n\n#---------------------------------------------------------------------------\n# Configuration options related to the DOCBOOK output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files\n# that can be used to generate PDF.\n# The default value is: NO.\n\nGENERATE_DOCBOOK       = NO\n\n# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.\n# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in\n# front of it.\n# The default directory is: docbook.\n# This tag requires that the tag GENERATE_DOCBOOK is set to YES.\n\nDOCBOOK_OUTPUT         = docbook\n\n#---------------------------------------------------------------------------\n# Configuration options for the AutoGen Definitions output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an\n# AutoGen Definitions (see https://autogen.sourceforge.net/) file that captures\n# the structure of the code including all documentation. Note that this feature\n# is still experimental and incomplete at the moment.\n# The default value is: NO.\n\nGENERATE_AUTOGEN_DEF   = NO\n\n#---------------------------------------------------------------------------\n# Configuration options related to Sqlite3 output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_SQLITE3 tag is set to YES doxygen will generate a Sqlite3\n# database with symbols found by doxygen stored in tables.\n# The default value is: NO.\n\nGENERATE_SQLITE3       = NO\n\n# The SQLITE3_OUTPUT tag is used to specify where the Sqlite3 database will be\n# put. If a relative path is entered the value of OUTPUT_DIRECTORY will be put\n# in front of it.\n# The default directory is: sqlite3.\n# This tag requires that the tag GENERATE_SQLITE3 is set to YES.\n\nSQLITE3_OUTPUT         = sqlite3\n\n# The SQLITE3_RECREATE_DB tag is set to YES, the existing doxygen_sqlite3.db\n# database file will be recreated with each doxygen run. If set to NO, doxygen\n# will warn if a database file is already found and not modify it.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_SQLITE3 is set to YES.\n\nSQLITE3_RECREATE_DB    = YES\n\n#---------------------------------------------------------------------------\n# Configuration options related to the Perl module output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module\n# file that captures the structure of the code including all documentation.\n#\n# Note that this feature is still experimental and incomplete at the moment.\n# The default value is: NO.\n\nGENERATE_PERLMOD       = NO\n\n# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary\n# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI\n# output from the Perl module output.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_PERLMOD is set to YES.\n\nPERLMOD_LATEX          = NO\n\n# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely\n# formatted so it can be parsed by a human reader. This is useful if you want to\n# understand what is going on. On the other hand, if this tag is set to NO, the\n# size of the Perl module output will be much smaller and Perl will parse it\n# just the same.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_PERLMOD is set to YES.\n\nPERLMOD_PRETTY         = YES\n\n# The names of the make variables in the generated doxyrules.make file are\n# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful\n# so different doxyrules.make files included by the same Makefile don't\n# overwrite each other's variables.\n# This tag requires that the tag GENERATE_PERLMOD is set to YES.\n\nPERLMOD_MAKEVAR_PREFIX =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the preprocessor\n#---------------------------------------------------------------------------\n\n# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all\n# C-preprocessor directives found in the sources and include files.\n# The default value is: YES.\n\nENABLE_PREPROCESSING   = YES\n\n# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names\n# in the source code. If set to NO, only conditional compilation will be\n# performed. Macro expansion can be done in a controlled way by setting\n# EXPAND_ONLY_PREDEF to YES.\n# The default value is: NO.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nMACRO_EXPANSION        = NO\n\n# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then\n# the macro expansion is limited to the macros specified with the PREDEFINED and\n# EXPAND_AS_DEFINED tags.\n# The default value is: NO.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nEXPAND_ONLY_PREDEF     = NO\n\n# If the SEARCH_INCLUDES tag is set to YES, the include files in the\n# INCLUDE_PATH will be searched if a #include is found.\n# The default value is: YES.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nSEARCH_INCLUDES        = YES\n\n# The INCLUDE_PATH tag can be used to specify one or more directories that\n# contain include files that are not input files but should be processed by the\n# preprocessor. Note that the INCLUDE_PATH is not recursive, so the setting of\n# RECURSIVE has no effect here.\n# This tag requires that the tag SEARCH_INCLUDES is set to YES.\n\nINCLUDE_PATH           =\n\n# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard\n# patterns (like *.h and *.hpp) to filter out the header-files in the\n# directories. If left blank, the patterns specified with FILE_PATTERNS will be\n# used.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nINCLUDE_FILE_PATTERNS  =\n\n# The PREDEFINED tag can be used to specify one or more macro names that are\n# defined before the preprocessor is started (similar to the -D option of e.g.\n# gcc). The argument of the tag is a list of macros of the form: name or\n# name=definition (no spaces). If the definition and the \"=\" are omitted, \"=1\"\n# is assumed. To prevent a macro definition from being undefined via #undef or\n# recursively expanded use the := operator instead of the = operator.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nPREDEFINED             =\n\n# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this\n# tag can be used to specify a list of macro names that should be expanded. The\n# macro definition that is found in the sources will be used. Use the PREDEFINED\n# tag if you want to use a different macro definition that overrules the\n# definition found in the source code.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nEXPAND_AS_DEFINED      =\n\n# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will\n# remove all references to function-like macros that are alone on a line, have\n# an all uppercase name, and do not end with a semicolon. Such function macros\n# are typically used for boiler-plate code, and will confuse the parser if not\n# removed.\n# The default value is: YES.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nSKIP_FUNCTION_MACROS   = YES\n\n#---------------------------------------------------------------------------\n# Configuration options related to external references\n#---------------------------------------------------------------------------\n\n# The TAGFILES tag can be used to specify one or more tag files. For each tag\n# file the location of the external documentation should be added. The format of\n# a tag file without this location is as follows:\n# TAGFILES = file1 file2 ...\n# Adding location for the tag files is done as follows:\n# TAGFILES = file1=loc1 \"file2 = loc2\" ...\n# where loc1 and loc2 can be relative or absolute paths or URLs. See the\n# section \"Linking to external documentation\" for more information about the use\n# of tag files.\n# Note: Each tag file must have a unique name (where the name does NOT include\n# the path). If a tag file is not located in the directory in which doxygen is\n# run, you must also specify the path to the tagfile here.\n\nTAGFILES               =\n\n# When a file name is specified after GENERATE_TAGFILE, doxygen will create a\n# tag file that is based on the input files it reads. See section \"Linking to\n# external documentation\" for more information about the usage of tag files.\n\nGENERATE_TAGFILE       =\n\n# If the ALLEXTERNALS tag is set to YES, all external classes and namespaces\n# will be listed in the class and namespace index. If set to NO, only the\n# inherited external classes will be listed.\n# The default value is: NO.\n\nALLEXTERNALS           = NO\n\n# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed\n# in the topic index. If set to NO, only the current project's groups will be\n# listed.\n# The default value is: YES.\n\nEXTERNAL_GROUPS        = YES\n\n# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in\n# the related pages index. If set to NO, only the current project's pages will\n# be listed.\n# The default value is: YES.\n\nEXTERNAL_PAGES         = YES\n\n#---------------------------------------------------------------------------\n# Configuration options related to diagram generator tools\n#---------------------------------------------------------------------------\n\n# If set to YES the inheritance and collaboration graphs will hide inheritance\n# and usage relations if the target is undocumented or is not a class.\n# The default value is: YES.\n\nHIDE_UNDOC_RELATIONS   = YES\n\n# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is\n# available from the path. This tool is part of Graphviz (see:\n# https://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent\n# Bell Labs. The other options in this section have no effect if this option is\n# set to NO\n# The default value is: NO.\n\nHAVE_DOT               = NO\n\n# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed\n# to run in parallel. When set to 0 doxygen will base this on the number of\n# processors available in the system. You can set it explicitly to a value\n# larger than 0 to get control over the balance between CPU load and processing\n# speed.\n# Minimum value: 0, maximum value: 32, default value: 0.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_NUM_THREADS        = 0\n\n# DOT_COMMON_ATTR is common attributes for nodes, edges and labels of\n# subgraphs. When you want a differently looking font in the dot files that\n# doxygen generates you can specify fontname, fontcolor and fontsize attributes.\n# For details please see <a href=https://graphviz.org/doc/info/attrs.html>Node,\n# Edge and Graph Attributes specification</a> You need to make sure dot is able\n# to find the font, which can be done by putting it in a standard location or by\n# setting the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the\n# directory containing the font. Default graphviz fontsize is 14.\n# The default value is: fontname=Helvetica,fontsize=10.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_COMMON_ATTR        = \"fontname=Helvetica,fontsize=10\"\n\n# DOT_EDGE_ATTR is concatenated with DOT_COMMON_ATTR. For elegant style you can\n# add 'arrowhead=open, arrowtail=open, arrowsize=0.5'. <a\n# href=https://graphviz.org/doc/info/arrows.html>Complete documentation about\n# arrows shapes.</a>\n# The default value is: labelfontname=Helvetica,labelfontsize=10.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_EDGE_ATTR          = \"labelfontname=Helvetica,labelfontsize=10\"\n\n# DOT_NODE_ATTR is concatenated with DOT_COMMON_ATTR. For view without boxes\n# around nodes set 'shape=plain' or 'shape=plaintext' <a\n# href=https://www.graphviz.org/doc/info/shapes.html>Shapes specification</a>\n# The default value is: shape=box,height=0.2,width=0.4.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_NODE_ATTR          = \"shape=box,height=0.2,width=0.4\"\n\n# You can set the path where dot can find font specified with fontname in\n# DOT_COMMON_ATTR and others dot attributes.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_FONTPATH           =\n\n# If the CLASS_GRAPH tag is set to YES or GRAPH or BUILTIN then doxygen will\n# generate a graph for each documented class showing the direct and indirect\n# inheritance relations. In case the CLASS_GRAPH tag is set to YES or GRAPH and\n# HAVE_DOT is enabled as well, then dot will be used to draw the graph. In case\n# the CLASS_GRAPH tag is set to YES and HAVE_DOT is disabled or if the\n# CLASS_GRAPH tag is set to BUILTIN, then the built-in generator will be used.\n# If the CLASS_GRAPH tag is set to TEXT the direct and indirect inheritance\n# relations will be shown as texts / links. Explicit enabling an inheritance\n# graph or choosing a different representation for an inheritance graph of a\n# specific class, can be accomplished by means of the command \\inheritancegraph.\n# Disabling an inheritance graph can be accomplished by means of the command\n# \\hideinheritancegraph.\n# Possible values are: NO, YES, TEXT, GRAPH and BUILTIN.\n# The default value is: YES.\n\nCLASS_GRAPH            = YES\n\n# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a\n# graph for each documented class showing the direct and indirect implementation\n# dependencies (inheritance, containment, and class references variables) of the\n# class with other documented classes. Explicit enabling a collaboration graph,\n# when COLLABORATION_GRAPH is set to NO, can be accomplished by means of the\n# command \\collaborationgraph. Disabling a collaboration graph can be\n# accomplished by means of the command \\hidecollaborationgraph.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nCOLLABORATION_GRAPH    = YES\n\n# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for\n# groups, showing the direct groups dependencies. Explicit enabling a group\n# dependency graph, when GROUP_GRAPHS is set to NO, can be accomplished by means\n# of the command \\groupgraph. Disabling a directory graph can be accomplished by\n# means of the command \\hidegroupgraph. See also the chapter Grouping in the\n# manual.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nGROUP_GRAPHS           = YES\n\n# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and\n# collaboration diagrams in a style similar to the OMG's Unified Modeling\n# Language.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nUML_LOOK               = NO\n\n# If the UML_LOOK tag is enabled, the fields and methods are shown inside the\n# class node. If there are many fields or methods and many nodes the graph may\n# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the\n# number of items for each type to make the size more manageable. Set this to 0\n# for no limit. Note that the threshold may be exceeded by 50% before the limit\n# is enforced. So when you set the threshold to 10, up to 15 fields may appear,\n# but if the number exceeds 15, the total amount of fields shown is limited to\n# 10.\n# Minimum value: 0, maximum value: 100, default value: 10.\n# This tag requires that the tag UML_LOOK is set to YES.\n\nUML_LIMIT_NUM_FIELDS   = 10\n\n# If the DOT_UML_DETAILS tag is set to NO, doxygen will show attributes and\n# methods without types and arguments in the UML graphs. If the DOT_UML_DETAILS\n# tag is set to YES, doxygen will add type and arguments for attributes and\n# methods in the UML graphs. If the DOT_UML_DETAILS tag is set to NONE, doxygen\n# will not generate fields with class member information in the UML graphs. The\n# class diagrams will look similar to the default class diagrams but using UML\n# notation for the relationships.\n# Possible values are: NO, YES and NONE.\n# The default value is: NO.\n# This tag requires that the tag UML_LOOK is set to YES.\n\nDOT_UML_DETAILS        = NO\n\n# The DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters\n# to display on a single line. If the actual line length exceeds this threshold\n# significantly it will be wrapped across multiple lines. Some heuristics are\n# applied to avoid ugly line breaks.\n# Minimum value: 0, maximum value: 1000, default value: 17.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_WRAP_THRESHOLD     = 17\n\n# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and\n# collaboration graphs will show the relations between templates and their\n# instances.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nTEMPLATE_RELATIONS     = NO\n\n# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to\n# YES then doxygen will generate a graph for each documented file showing the\n# direct and indirect include dependencies of the file with other documented\n# files. Explicit enabling an include graph, when INCLUDE_GRAPH is is set to NO,\n# can be accomplished by means of the command \\includegraph. Disabling an\n# include graph can be accomplished by means of the command \\hideincludegraph.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nINCLUDE_GRAPH          = YES\n\n# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are\n# set to YES then doxygen will generate a graph for each documented file showing\n# the direct and indirect include dependencies of the file with other documented\n# files. Explicit enabling an included by graph, when INCLUDED_BY_GRAPH is set\n# to NO, can be accomplished by means of the command \\includedbygraph. Disabling\n# an included by graph can be accomplished by means of the command\n# \\hideincludedbygraph.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nINCLUDED_BY_GRAPH      = YES\n\n# If the CALL_GRAPH tag is set to YES then doxygen will generate a call\n# dependency graph for every global function or class method.\n#\n# Note that enabling this option will significantly increase the time of a run.\n# So in most cases it will be better to enable call graphs for selected\n# functions only using the \\callgraph command. Disabling a call graph can be\n# accomplished by means of the command \\hidecallgraph.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nCALL_GRAPH             = NO\n\n# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller\n# dependency graph for every global function or class method.\n#\n# Note that enabling this option will significantly increase the time of a run.\n# So in most cases it will be better to enable caller graphs for selected\n# functions only using the \\callergraph command. Disabling a caller graph can be\n# accomplished by means of the command \\hidecallergraph.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nCALLER_GRAPH           = NO\n\n# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical\n# hierarchy of all classes instead of a textual one.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nGRAPHICAL_HIERARCHY    = YES\n\n# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the\n# dependencies a directory has on other directories in a graphical way. The\n# dependency relations are determined by the #include relations between the\n# files in the directories. Explicit enabling a directory graph, when\n# DIRECTORY_GRAPH is set to NO, can be accomplished by means of the command\n# \\directorygraph. Disabling a directory graph can be accomplished by means of\n# the command \\hidedirectorygraph.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDIRECTORY_GRAPH        = YES\n\n# The DIR_GRAPH_MAX_DEPTH tag can be used to limit the maximum number of levels\n# of child directories generated in directory dependency graphs by dot.\n# Minimum value: 1, maximum value: 25, default value: 1.\n# This tag requires that the tag DIRECTORY_GRAPH is set to YES.\n\nDIR_GRAPH_MAX_DEPTH    = 1\n\n# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images\n# generated by dot. For an explanation of the image formats see the section\n# output formats in the documentation of the dot tool (Graphviz (see:\n# https://www.graphviz.org/)).\n# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order\n# to make the SVG files visible in IE 9+ (other browsers do not have this\n# requirement).\n# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,\n# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and\n# png:gdiplus:gdiplus.\n# The default value is: png.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_IMAGE_FORMAT       = png\n\n# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to\n# enable generation of interactive SVG images that allow zooming and panning.\n#\n# Note that this requires a modern browser other than Internet Explorer. Tested\n# and working are Firefox, Chrome, Safari, and Opera.\n# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make\n# the SVG files visible. Older versions of IE do not have SVG support.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nINTERACTIVE_SVG        = NO\n\n# The DOT_PATH tag can be used to specify the path where the dot tool can be\n# found. If left blank, it is assumed the dot tool can be found in the path.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_PATH               =\n\n# The DOTFILE_DIRS tag can be used to specify one or more directories that\n# contain dot files that are included in the documentation (see the \\dotfile\n# command).\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOTFILE_DIRS           =\n\n# You can include diagrams made with dia in doxygen documentation. Doxygen will\n# then run dia to produce the diagram and insert it in the documentation. The\n# DIA_PATH tag allows you to specify the directory where the dia binary resides.\n# If left empty dia is assumed to be found in the default search path.\n\nDIA_PATH               =\n\n# The DIAFILE_DIRS tag can be used to specify one or more directories that\n# contain dia files that are included in the documentation (see the \\diafile\n# command).\n\nDIAFILE_DIRS           =\n\n# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the\n# path where java can find the plantuml.jar file or to the filename of jar file\n# to be used. If left blank, it is assumed PlantUML is not used or called during\n# a preprocessing step. Doxygen will generate a warning when it encounters a\n# \\startuml command in this case and will not generate output for the diagram.\n\nPLANTUML_JAR_PATH      =\n\n# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a\n# configuration file for plantuml.\n\nPLANTUML_CFG_FILE      =\n\n# When using plantuml, the specified paths are searched for files specified by\n# the !include statement in a plantuml block.\n\nPLANTUML_INCLUDE_PATH  =\n\n# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes\n# that will be shown in the graph. If the number of nodes in a graph becomes\n# larger than this value, doxygen will truncate the graph, which is visualized\n# by representing a node as a red box. Note that if the number of direct\n# children of the root node in a graph is already larger than\n# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that\n# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.\n# Minimum value: 0, maximum value: 10000, default value: 50.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_GRAPH_MAX_NODES    = 50\n\n# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs\n# generated by dot. A depth value of 3 means that only nodes reachable from the\n# root by following a path via at most 3 edges will be shown. Nodes that lay\n# further from the root node will be omitted. Note that setting this option to 1\n# or 2 may greatly reduce the computation time needed for large code bases. Also\n# note that the size of a graph can be further restricted by\n# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.\n# Minimum value: 0, maximum value: 1000, default value: 0.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nMAX_DOT_GRAPH_DEPTH    = 0\n\n# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output\n# files in one run (i.e. multiple -o and -T options on the command line). This\n# makes dot run faster, but since only newer versions of dot (>1.8.10) support\n# this, this feature is disabled by default.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_MULTI_TARGETS      = NO\n\n# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page\n# explaining the meaning of the various boxes and arrows in the dot generated\n# graphs.\n# Note: This tag requires that UML_LOOK isn't set, i.e. the doxygen internal\n# graphical representation for inheritance and collaboration diagrams is used.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nGENERATE_LEGEND        = YES\n\n# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate\n# files that are used to generate the various graphs.\n#\n# Note: This setting is not only used for dot files but also for msc temporary\n# files.\n# The default value is: YES.\n\nDOT_CLEANUP            = YES\n\n# You can define message sequence charts within doxygen comments using the \\msc\n# command. If the MSCGEN_TOOL tag is left empty (the default), then doxygen will\n# use a built-in version of mscgen tool to produce the charts. Alternatively,\n# the MSCGEN_TOOL tag can also specify the name an external tool. For instance,\n# specifying prog as the value, doxygen will call the tool as prog -T\n# <outfile_format> -o <outputfile> <inputfile>. The external tool should support\n# output file formats \"png\", \"eps\", \"svg\", and \"ismap\".\n\nMSCGEN_TOOL            =\n\n# The MSCFILE_DIRS tag can be used to specify one or more directories that\n# contain msc files that are included in the documentation (see the \\mscfile\n# command).\n\nMSCFILE_DIRS           =\n"
  },
  {
    "path": "third-party/mimalloc/doc/mimalloc-doc.h",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2025, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n#error \"documentation file only!\"\n\n\n/*! \\mainpage\n\nThis is the API documentation of the\n[mimalloc](https://github.com/microsoft/mimalloc) allocator\n(pronounced \"me-malloc\") -- a\ngeneral purpose allocator with excellent [performance](bench.html)\ncharacteristics. Initially\ndeveloped by Daan Leijen for the run-time systems of the\n[Koka](https://github.com/koka-lang/koka) and [Lean](https://github.com/leanprover/lean) languages.\n\nIt is a drop-in replacement for `malloc` and can be used in other programs\nwithout code changes, for example, on Unix you can use it as:\n```\n> LD_PRELOAD=/usr/bin/libmimalloc.so  myprogram\n```\n\nNotable aspects of the design include:\n- __small and consistent__: the library is about 8k LOC using simple and\n  consistent data structures. This makes it very suitable\n  to integrate and adapt in other projects. For runtime systems it\n  provides hooks for a monotonic _heartbeat_ and deferred freeing (for\n  bounded worst-case times with reference counting).\n  Partly due to its simplicity, mimalloc has been ported to many systems (Windows, macOS,\n  Linux, WASM, various BSD's, Haiku, MUSL, etc) and has excellent support for dynamic overriding.\n  At the same time, it is an industrial strength allocator that runs (very) large scale\n  distributed services on thousands of machines with excellent worst case latencies.\n- __free list sharding__: instead of one big free list (per size class) we have\n  many smaller lists per \"mimalloc page\" which reduces fragmentation and\n  increases locality --\n  things that are allocated close in time get allocated close in memory.\n  (A mimalloc page contains blocks of one size class and is usually 64KiB on a 64-bit system).\n- __free list multi-sharding__: the big idea! Not only do we shard the free list\n  per mimalloc page, but for each page we have multiple free lists. In particular, there\n  is one list for thread-local `free` operations, and another one for concurrent `free`\n  operations. Free-ing from another thread can now be a single CAS without needing\n  sophisticated coordination between threads. Since there will be\n  thousands of separate free lists, contention is naturally distributed over the heap,\n  and the chance of contending on a single location will be low -- this is quite\n  similar to randomized algorithms like skip lists where adding\n  a random oracle removes the need for a more complex algorithm.\n- __eager page purging__: when a \"page\" becomes empty (with increased chance\n  due to free list sharding) the memory is marked to the OS as unused (reset or decommitted)\n  reducing (real) memory pressure and fragmentation, especially in long running\n  programs.\n- __secure__: _mimalloc_ can be built in secure mode, adding guard pages,\n  randomized allocation, encrypted free lists, etc. to protect against various\n  heap vulnerabilities. The performance penalty is usually around 10% on average\n  over our benchmarks.\n- __first-class heaps__: efficiently create and use multiple heaps to allocate across different regions.\n  A heap can be destroyed at once instead of deallocating each object separately.\n- __bounded__: it does not suffer from _blowup_ \\[1\\], has bounded worst-case allocation\n  times (_wcat_) (upto OS primitives), bounded space overhead (~0.2% meta-data, with low\n  internal fragmentation), and has no internal points of contention using only atomic operations.\n- __fast__: In our benchmarks (see [below](#bench)),\n  _mimalloc_ outperforms other leading allocators (_jemalloc_, _tcmalloc_, _Hoard_, etc),\n  and often uses less memory. A nice property is that it does consistently well over a wide range\n  of benchmarks. There is also good huge OS page support for larger server programs.\n\nYou can read more on the design of _mimalloc_ in the\n[technical report](https://www.microsoft.com/en-us/research/publication/mimalloc-free-list-sharding-in-action)\nwhich also has detailed benchmark results.\n\n\nFurther information:\n\n- \\ref build\n- \\ref using\n- \\ref environment\n- \\ref overrides\n- \\ref bench\n- \\ref malloc\n- \\ref extended\n- \\ref aligned\n- \\ref heap\n- \\ref typed\n- \\ref analysis\n- \\ref options\n- \\ref posix\n- \\ref cpp\n\n*/\n\n\n/// \\defgroup malloc Basic Allocation\n/// The basic allocation interface.\n/// \\{\n\n\n/// Free previously allocated memory.\n/// The pointer `p` must have been allocated before (or be \\a NULL).\n/// @param p  pointer to free, or \\a NULL.\nvoid  mi_free(void* p);\n\n/// Allocate \\a size bytes.\n/// @param size  number of bytes to allocate.\n/// @returns pointer to the allocated memory or \\a NULL if out of memory.\n/// Returns a unique pointer if called with \\a size 0.\nvoid* mi_malloc(size_t size);\n\n/// Allocate zero-initialized `size` bytes.\n/// @param size The size in bytes.\n/// @returns Pointer to newly allocated zero initialized memory,\n/// or \\a NULL if out of memory.\nvoid* mi_zalloc(size_t size);\n\n/// Allocate zero-initialized \\a count elements of \\a size bytes.\n/// @param count number of elements.\n/// @param size  size of each element.\n/// @returns pointer to the allocated memory\n/// of \\a size*\\a count bytes, or \\a NULL if either out of memory\n/// or when `count*size` overflows.\n///\n/// Returns a unique pointer if called with either \\a size or \\a count of 0.\n/// @see mi_zalloc()\nvoid* mi_calloc(size_t count, size_t size);\n\n/// Re-allocate memory to \\a newsize bytes.\n/// @param p  pointer to previously allocated memory (or \\a NULL).\n/// @param newsize  the new required size in bytes.\n/// @returns pointer to the re-allocated memory\n/// of \\a newsize bytes, or \\a NULL if out of memory.\n/// If \\a NULL is returned, the pointer \\a p is not freed.\n/// Otherwise the original pointer is either freed or returned\n/// as the reallocated result (in case it fits in-place with the\n/// new size). If the pointer \\a p is \\a NULL, it behaves as\n/// \\a mi_malloc(\\a newsize). If \\a newsize is larger than the\n/// original \\a size allocated for \\a p, the bytes after \\a size\n/// are uninitialized.\nvoid* mi_realloc(void* p, size_t newsize);\n\n/// Re-allocate memory to \\a count elements of \\a size bytes, with extra memory initialized to zero.\n/// @param p Pointer to a previously allocated block (or \\a NULL).\n/// @param count The number of elements.\n/// @param size The size of each element.\n/// @returns A pointer to a re-allocated block of \\a count * \\a size bytes, or \\a NULL\n/// if out of memory or if \\a count * \\a size overflows.\n///\n/// If there is no overflow, it behaves exactly like `mi_rezalloc(p,count*size)`.\n/// @see mi_reallocn()\n/// @see [recallocarray()](http://man.openbsd.org/reallocarray) (on BSD).\nvoid* mi_recalloc(void* p, size_t count, size_t size);\n\n/// Try to re-allocate memory to \\a newsize bytes _in place_.\n/// @param p  pointer to previously allocated memory (or \\a NULL).\n/// @param newsize  the new required size in bytes.\n/// @returns pointer to the re-allocated memory\n/// of \\a newsize bytes (always equal to \\a p),\n/// or \\a NULL if either out of memory or if\n/// the memory could not be expanded in place.\n/// If \\a NULL is returned, the pointer \\a p is not freed.\n/// Otherwise the original pointer is returned\n/// as the reallocated result since it fits in-place with the\n/// new size. If \\a newsize is larger than the\n/// original \\a size allocated for \\a p, the bytes after \\a size\n/// are uninitialized.\nvoid* mi_expand(void* p, size_t newsize);\n\n/// Allocate \\a count elements of \\a size bytes.\n/// @param count The number of elements.\n/// @param size The size of each element.\n/// @returns A pointer to a block of \\a count * \\a size bytes, or \\a NULL\n/// if out of memory or if \\a count * \\a size overflows.\n///\n/// If there is no overflow, it behaves exactly like `mi_malloc(count*size)`.\n/// @see mi_calloc()\n/// @see mi_zallocn()\nvoid* mi_mallocn(size_t count, size_t size);\n\n/// Re-allocate memory to \\a count elements of \\a size bytes.\n/// @param p Pointer to a previously allocated block (or \\a NULL).\n/// @param count The number of elements.\n/// @param size The size of each element.\n/// @returns A pointer to a re-allocated block of \\a count * \\a size bytes, or \\a NULL\n/// if out of memory or if \\a count * \\a size overflows.\n///\n/// If there is no overflow, it behaves exactly like `mi_realloc(p,count*size)`.\n/// @see [reallocarray()](<http://man.openbsd.org/reallocarray>) (on BSD)\nvoid* mi_reallocn(void* p, size_t count, size_t size);\n\n/// Re-allocate memory to \\a newsize bytes,\n/// @param p  pointer to previously allocated memory (or \\a NULL).\n/// @param newsize  the new required size in bytes.\n/// @returns pointer to the re-allocated memory\n/// of \\a newsize bytes, or \\a NULL if out of memory.\n///\n/// In contrast to mi_realloc(), if \\a NULL is returned, the original pointer\n/// \\a p is freed (if it was not \\a NULL itself).\n/// Otherwise the original pointer is either freed or returned\n/// as the reallocated result (in case it fits in-place with the\n/// new size). If the pointer \\a p is \\a NULL, it behaves as\n/// \\a mi_malloc(\\a newsize). If \\a newsize is larger than the\n/// original \\a size allocated for \\a p, the bytes after \\a size\n/// are uninitialized.\n///\n/// @see [reallocf](https://www.freebsd.org/cgi/man.cgi?query=reallocf) (on BSD)\nvoid* mi_reallocf(void* p, size_t newsize);\n\n\n/// Allocate and duplicate a string.\n/// @param s string to duplicate (or \\a NULL).\n/// @returns a pointer to newly allocated memory initialized\n/// to string \\a s, or \\a NULL if either out of memory or if\n/// \\a s is \\a NULL.\n///\n/// Replacement for the standard [strdup()](http://pubs.opengroup.org/onlinepubs/9699919799/functions/strdup.html)\n/// such that mi_free() can be used on the returned result.\nchar* mi_strdup(const char* s);\n\n/// Allocate and duplicate a string up to \\a n bytes.\n/// @param s string to duplicate (or \\a NULL).\n/// @param n maximum number of bytes to copy (excluding the terminating zero).\n/// @returns a pointer to newly allocated memory initialized\n/// to string \\a s up to the first \\a n bytes (and always zero terminated),\n/// or \\a NULL if either out of memory or if \\a s is \\a NULL.\n///\n/// Replacement for the standard [strndup()](http://pubs.opengroup.org/onlinepubs/9699919799/functions/strndup.html)\n/// such that mi_free() can be used on the returned result.\nchar* mi_strndup(const char* s, size_t n);\n\n/// Resolve a file path name.\n/// @param fname File name.\n/// @param resolved_name Should be \\a NULL (but can also point to a buffer\n///                      of at least \\a PATH_MAX bytes).\n/// @returns If successful a pointer to the resolved absolute file name, or\n/// \\a NULL on failure (with \\a errno set to the error code).\n///\n/// If \\a resolved_name was \\a NULL, the returned result should be freed with\n/// mi_free().\n///\n/// Replacement for the standard [realpath()](http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html)\n/// such that mi_free() can be used on the returned result (if \\a resolved_name was \\a NULL).\nchar* mi_realpath(const char* fname, char* resolved_name);\n\n/// \\}\n\n// ------------------------------------------------------\n// Extended functionality\n// ------------------------------------------------------\n\n/// \\defgroup extended Extended Functions\n/// Extended functionality.\n/// \\{\n\n/// Maximum size allowed for small allocations in\n/// #mi_malloc_small and #mi_zalloc_small (usually `128*sizeof(void*)` (= 1KB on 64-bit systems))\n#define MI_SMALL_SIZE_MAX   (128*sizeof(void*))\n\n/// Allocate a small object.\n/// @param size The size in bytes, can be at most #MI_SMALL_SIZE_MAX.\n/// @returns a pointer to newly allocated memory of at least \\a size\n/// bytes, or \\a NULL if out of memory.\n/// This function is meant for use in run-time systems for best\n/// performance and does not check if \\a size was indeed small -- use\n/// with care!\nvoid* mi_malloc_small(size_t size);\n\n/// Allocate a zero initialized small object.\n/// @param size The size in bytes, can be at most #MI_SMALL_SIZE_MAX.\n/// @returns a pointer to newly allocated zero-initialized memory of at\n/// least \\a size bytes, or \\a NULL if out of memory.\n/// This function is meant for use in run-time systems for best\n/// performance and does not check if \\a size was indeed small -- use\n/// with care!\nvoid* mi_zalloc_small(size_t size);\n\n/// Return the available bytes in a memory block.\n/// @param p Pointer to previously allocated memory (or \\a NULL)\n/// @returns Returns the available bytes in the memory block, or\n/// 0 if \\a p was \\a NULL.\n///\n/// The returned size can be\n/// used to call \\a mi_expand successfully.\n/// The returned size is always at least equal to the\n/// allocated size of \\a p.\n///\n/// @see [_msize](https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/msize?view=vs-2017) (Windows)\n/// @see [malloc_usable_size](http://man7.org/linux/man-pages/man3/malloc_usable_size.3.html) (Linux)\n/// @see mi_good_size()\nsize_t mi_usable_size(void* p);\n\n/// Return the used allocation size.\n/// @param size The minimal required size in bytes.\n/// @returns the size `n` that will be allocated, where `n >= size`.\n///\n/// Generally, `mi_usable_size(mi_malloc(size)) == mi_good_size(size)`.\n/// This can be used to reduce internal wasted space when\n/// allocating buffers for example.\n///\n/// @see mi_usable_size()\nsize_t mi_good_size(size_t size);\n\n/// Eagerly free memory.\n/// @param force If \\a true, aggressively return memory to the OS (can be expensive!)\n///\n/// Regular code should not have to call this function. It can be beneficial\n/// in very narrow circumstances; in particular, when a long running thread\n/// allocates a lot of blocks that are freed by other threads it may improve\n/// resource usage by calling this every once in a while.\nvoid mi_collect(bool force);\n\n/// Deprecated\n/// @param out Ignored, outputs to the registered output function or stderr by default.\n///\n/// Most detailed when using a debug build.\nvoid mi_stats_print(void* out);\n\n/// Print the main statistics.\n/// @param out An output function or \\a NULL for the default.\n/// @param arg Optional argument passed to \\a out (if not \\a NULL)\n///\n/// Most detailed when using a debug build.\nvoid mi_stats_print_out(mi_output_fun* out, void* arg);\n\n/// Reset statistics.\nvoid mi_stats_reset(void);\n\n/// Merge thread local statistics with the main statistics and reset.\nvoid mi_stats_merge(void);\n\n/// Initialize mimalloc on a thread.\n/// Should not be used as on most systems (pthreads, windows) this is done\n/// automatically.\nvoid mi_thread_init(void);\n\n/// Uninitialize mimalloc on a thread.\n/// Should not be used as on most systems (pthreads, windows) this is done\n/// automatically. Ensures that any memory that is not freed yet (but will\n/// be freed by other threads in the future) is properly handled.\nvoid mi_thread_done(void);\n\n/// Print out heap statistics for this thread.\n/// @param out An output function or \\a NULL for the default.\n/// @param arg Optional argument passed to \\a out (if not \\a NULL)\n///\n/// Most detailed when using a debug build.\nvoid mi_thread_stats_print_out(mi_output_fun* out, void* arg);\n\n/// Type of deferred free functions.\n/// @param force If \\a true all outstanding items should be freed.\n/// @param heartbeat A monotonically increasing count.\n/// @param arg Argument that was passed at registration to hold extra state.\n///\n/// @see mi_register_deferred_free\ntypedef void (mi_deferred_free_fun)(bool force, unsigned long long heartbeat, void* arg);\n\n/// Register a deferred free function.\n/// @param deferred_free Address of a deferred free-ing function or \\a NULL to unregister.\n/// @param arg Argument that will be passed on to the deferred free function.\n///\n/// Some runtime systems use deferred free-ing, for example when using\n/// reference counting to limit the worst case free time.\n/// Such systems can register (re-entrant) deferred free function\n/// to free more memory on demand. When the \\a force parameter is\n/// \\a true all possible memory should be freed.\n/// The per-thread \\a heartbeat parameter is monotonically increasing\n/// and guaranteed to be deterministic if the program allocates\n/// deterministically. The \\a deferred_free function is guaranteed\n/// to be called deterministically after some number of allocations\n/// (regardless of freeing or available free memory).\n/// At most one \\a deferred_free function can be active.\nvoid   mi_register_deferred_free(mi_deferred_free_fun* deferred_free, void* arg);\n\n/// Type of output functions.\n/// @param msg Message to output.\n/// @param arg Argument that was passed at registration to hold extra state.\n///\n/// @see mi_register_output()\ntypedef void (mi_output_fun)(const char* msg, void* arg);\n\n/// Register an output function.\n/// @param out The output function, use `NULL` to output to stderr.\n/// @param arg Argument that will be passed on to the output function.\n///\n/// The `out` function is called to output any information from mimalloc,\n/// like verbose or warning messages.\nvoid mi_register_output(mi_output_fun* out, void* arg);\n\n/// Type of error callback functions.\n/// @param err Error code (see mi_register_error() for a complete list).\n/// @param arg Argument that was passed at registration to hold extra state.\n///\n/// @see mi_register_error()\ntypedef void (mi_error_fun)(int err, void* arg);\n\n/// Register an error callback function.\n/// @param errfun The error function that is called on an error (use \\a NULL for default)\n/// @param arg Extra argument that will be passed on to the error function.\n///\n/// The \\a errfun function is called on an error in mimalloc after emitting\n/// an error message (through the output function). It as always legal to just\n/// return from the \\a errfun function in which case allocation functions generally\n/// return \\a NULL or ignore the condition. The default function only calls abort()\n/// when compiled in secure mode with an \\a EFAULT error. The possible error\n/// codes are:\n/// * \\a EAGAIN: Double free was detected (only in debug and secure mode).\n/// * \\a EFAULT: Corrupted free list or meta-data was detected (only in debug and secure mode).\n/// * \\a ENOMEM: Not enough memory available to satisfy the request.\n/// * \\a EOVERFLOW: Too large a request, for example in mi_calloc(), the \\a count and \\a size parameters are too large.\n/// * \\a EINVAL: Trying to free or re-allocate an invalid pointer.\nvoid mi_register_error(mi_error_fun* errfun, void* arg);\n\n/// Is a pointer part of our heap?\n/// @param p The pointer to check.\n/// @returns \\a true if this is a pointer into our heap.\n/// This function is relatively fast.\nbool mi_is_in_heap_region(const void* p);\n\n/// Reserve OS memory for use by mimalloc. Reserved areas are used\n/// before allocating from the OS again. By reserving a large area upfront,\n/// allocation can be more efficient, and can be better managed on systems\n/// without `mmap`/`VirtualAlloc` (like WASM for example).\n/// @param size        The size to reserve.\n/// @param commit      Commit the memory upfront.\n/// @param allow_large Allow large OS pages (2MiB) to be used?\n/// @return \\a 0 if successful, and an error code otherwise (e.g. `ENOMEM`).\nint  mi_reserve_os_memory(size_t size, bool commit, bool allow_large);\n\n/// Manage a particular memory area for use by mimalloc.\n/// This is just like `mi_reserve_os_memory` except that the area should already be\n/// allocated in some manner and available for use my mimalloc.\n/// @param start       Start of the memory area\n/// @param size        The size of the memory area.\n/// @param is_committed Is the area already committed?\n/// @param is_large    Does it consist of large OS pages? Set this to \\a true as well for memory\n///                    that should not be decommitted or protected (like rdma etc.)\n/// @param is_zero     Does the area consists of zero's?\n/// @param numa_node   Possible associated numa node or `-1`.\n/// @return \\a true if successful, and \\a false on error.\nbool mi_manage_os_memory(void* start, size_t size, bool is_committed, bool is_large, bool is_zero, int numa_node);\n\n/// Reserve \\a pages of huge OS pages (1GiB) evenly divided over \\a numa_nodes nodes,\n/// but stops after at most `timeout_msecs` seconds.\n/// @param pages The number of 1GiB pages to reserve.\n/// @param numa_nodes The number of nodes do evenly divide the pages over, or 0 for using the actual number of NUMA nodes.\n/// @param timeout_msecs Maximum number of milli-seconds to try reserving, or 0 for no timeout.\n/// @returns 0 if successful, \\a ENOMEM if running out of memory, or \\a ETIMEDOUT if timed out.\n///\n/// The reserved memory is used by mimalloc to satisfy allocations.\n/// May quit before \\a timeout_msecs are expired if it estimates it will take more than\n/// 1.5 times \\a timeout_msecs. The time limit is needed because on some operating systems\n/// it can take a long time to reserve contiguous memory if the physical memory is\n/// fragmented.\nint mi_reserve_huge_os_pages_interleave(size_t pages, size_t numa_nodes, size_t timeout_msecs);\n\n/// Reserve \\a pages of huge OS pages (1GiB) at a specific \\a numa_node,\n/// but stops after at most `timeout_msecs` seconds.\n/// @param pages The number of 1GiB pages to reserve.\n/// @param numa_node The NUMA node where the memory is reserved (start at 0). Use -1 for no affinity.\n/// @param timeout_msecs Maximum number of milli-seconds to try reserving, or 0 for no timeout.\n/// @returns 0 if successful, \\a ENOMEM if running out of memory, or \\a ETIMEDOUT if timed out.\n///\n/// The reserved memory is used by mimalloc to satisfy allocations.\n/// May quit before \\a timeout_msecs are expired if it estimates it will take more than\n/// 1.5 times \\a timeout_msecs. The time limit is needed because on some operating systems\n/// it can take a long time to reserve contiguous memory if the physical memory is\n/// fragmented.\nint mi_reserve_huge_os_pages_at(size_t pages, int numa_node, size_t timeout_msecs);\n\n\n/// Is the C runtime \\a malloc API redirected?\n/// @returns \\a true if all malloc API calls are redirected to mimalloc.\n///\n/// Currently only used on Windows.\nbool mi_is_redirected();\n\n/// Return process information (time and memory usage).\n/// @param elapsed_msecs   Optional. Elapsed wall-clock time of the process in milli-seconds.\n/// @param user_msecs      Optional. User time in milli-seconds (as the sum over all threads).\n/// @param system_msecs    Optional. System time in milli-seconds.\n/// @param current_rss     Optional. Current working set size (touched pages).\n/// @param peak_rss        Optional. Peak working set size (touched pages).\n/// @param current_commit  Optional. Current committed memory (backed by the page file).\n/// @param peak_commit     Optional. Peak committed memory (backed by the page file).\n/// @param page_faults     Optional. Count of hard page faults.\n///\n/// The \\a current_rss is precise on Windows and MacOSX; other systems estimate\n/// this using \\a current_commit. The \\a commit is precise on Windows but estimated\n/// on other systems as the amount of read/write accessible memory reserved by mimalloc.\nvoid mi_process_info(size_t* elapsed_msecs, size_t* user_msecs, size_t* system_msecs, size_t* current_rss, size_t* peak_rss, size_t* current_commit, size_t* peak_commit, size_t* page_faults);\n\n/// @brief Show all current arena's.\n/// @param show_inuse       Show the arena blocks that are in use.\n/// @param show_abandoned   Show the abandoned arena blocks.\n/// @param show_purge       Show arena blocks scheduled for purging.\nvoid mi_debug_show_arenas(bool show_inuse, bool show_abandoned, bool show_purge);\n\n/// Mimalloc uses large (virtual) memory areas, called \"arena\"s, from the OS to manage its memory.\n/// Each arena has an associated identifier.\ntypedef int mi_arena_id_t;\n\n/// @brief  Return the size of an arena.\n/// @param arena_id  The arena identifier.\n/// @param size      Returned size in bytes of the (virtual) arena area.\n/// @return base address of the arena.\nvoid* mi_arena_area(mi_arena_id_t arena_id, size_t* size);\n\n/// @brief Reserve huge OS pages (1GiB) into a single arena.\n/// @param pages             Number of 1GiB pages to reserve.\n/// @param numa_node         The associated NUMA node, or -1 for no NUMA preference.\n/// @param timeout_msecs     Max amount of milli-seconds this operation is allowed to take. (0 is infinite)\n/// @param exclusive         If exclusive, only a heap associated with this arena can allocate in it.\n/// @param arena_id          The arena identifier.\n/// @return 0 if successful, \\a ENOMEM if running out of memory, or \\a ETIMEDOUT if timed out.\nint   mi_reserve_huge_os_pages_at_ex(size_t pages, int numa_node, size_t timeout_msecs, bool exclusive, mi_arena_id_t* arena_id);\n\n/// @brief Reserve OS memory to be managed in an arena.\n/// @param size Size the reserve.\n/// @param commit Should the memory be initially committed?\n/// @param allow_large Allow the use of large OS pages?\n/// @param exclusive  Is the returned arena exclusive?\n/// @param arena_id The new arena identifier.\n/// @return Zero on success, an error code otherwise.\nint   mi_reserve_os_memory_ex(size_t size, bool commit, bool allow_large, bool exclusive, mi_arena_id_t* arena_id);\n\n/// @brief Manage externally allocated memory as a mimalloc arena. This memory will not be freed by mimalloc.\n/// @param start Start address of the area.\n/// @param size  Size in bytes of the area.\n/// @param is_committed  Is the memory already committed?\n/// @param is_large      Does it consist of (pinned) large OS pages?\n/// @param is_zero       Is the memory zero-initialized?\n/// @param numa_node     Associated NUMA node, or -1 to have no NUMA preference.\n/// @param exclusive     Is the arena exclusive (where only heaps associated with the arena can allocate in it)\n/// @param arena_id      The new arena identifier.\n/// @return `true` if successful.\nbool  mi_manage_os_memory_ex(void* start, size_t size, bool is_committed, bool is_large, bool is_zero, int numa_node, bool exclusive, mi_arena_id_t* arena_id);\n\n/// @brief Create a new heap that only allocates in the specified arena.\n/// @param arena_id The arena identifier.\n/// @return The new heap or `NULL`.\nmi_heap_t* mi_heap_new_in_arena(mi_arena_id_t arena_id);\n\n/// @brief Create a new heap\n/// @param heap_tag       The heap tag associated with this heap; heaps only reclaim memory between heaps with the same tag.\n/// @param allow_destroy  Is \\a mi_heap_destroy allowed?  Not allowing this allows the heap to reclaim memory from terminated threads.\n/// @param arena_id       If not 0, the heap will only allocate from the specified arena.\n/// @return A new heap or `NULL` on failure.\n///\n/// The \\a arena_id can be used by runtimes to allocate only in a specified pre-reserved arena.\n/// This is used for example for a compressed pointer heap in Koka.\n/// The \\a heap_tag enables heaps to keep objects of a certain type isolated to heaps with that tag.\n/// This is used for example in the CPython integration.\nmi_heap_t* mi_heap_new_ex(int heap_tag, bool allow_destroy, mi_arena_id_t arena_id);\n\n/// A process can associate threads with sub-processes.\n/// A sub-process will not reclaim memory from (abandoned heaps/threads)\n/// other subprocesses.\ntypedef void* mi_subproc_id_t;\n\n/// @brief  Get the main sub-process identifier.\nmi_subproc_id_t mi_subproc_main(void);\n\n/// @brief Create a fresh sub-process (with no associated threads yet).\n/// @return The new sub-process identifier.\nmi_subproc_id_t mi_subproc_new(void);\n\n/// @brief Delete a previously created sub-process.\n/// @param subproc The sub-process identifier.\n/// Only delete sub-processes if all associated threads have terminated.\nvoid mi_subproc_delete(mi_subproc_id_t subproc);\n\n/// Add the current thread to the given sub-process.\n/// This should be called right after a thread is created (and no allocation has taken place yet)\nvoid mi_subproc_add_current_thread(mi_subproc_id_t subproc);\n\n\n/// \\}\n\n// ------------------------------------------------------\n// Aligned allocation\n// ------------------------------------------------------\n\n/// \\defgroup aligned Aligned Allocation\n///\n/// Allocating aligned memory blocks.\n/// Note that `alignment` always follows `size` for consistency with the unaligned\n/// allocation API, but unfortunately this differs from `posix_memalign` and `aligned_alloc` in the C library.\n///\n/// \\{\n\n/// Allocate \\a size bytes aligned by \\a alignment.\n/// @param size  number of bytes to allocate.\n/// @param alignment  the minimal alignment of the allocated memory.\n/// @returns pointer to the allocated memory or \\a NULL if out of memory,\n/// or if the alignment is not a power of 2 (including 0). The \\a size is unrestricted\n/// (and does not have to be an integral multiple of the \\a alignment).\n/// The returned pointer is aligned by \\a alignment, i.e. `(uintptr_t)p % alignment == 0`.\n/// Returns a unique pointer if called with \\a size 0.\n///\n/// Note that `alignment` always follows `size` for consistency with the unaligned\n/// allocation API, but unfortunately this differs from `posix_memalign` and `aligned_alloc` in the C library.\n///\n/// @see [aligned_alloc](https://en.cppreference.com/w/c/memory/aligned_alloc) (in the standard C11 library, with switched arguments!)\n/// @see [_aligned_malloc](https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/aligned-malloc?view=vs-2017) (on Windows)\n/// @see [aligned_alloc](http://man.openbsd.org/reallocarray) (on BSD, with switched arguments!)\n/// @see [posix_memalign](https://linux.die.net/man/3/posix_memalign) (on Posix, with switched arguments!)\n/// @see [memalign](https://linux.die.net/man/3/posix_memalign) (on Linux, with switched arguments!)\nvoid* mi_malloc_aligned(size_t size, size_t alignment);\nvoid* mi_zalloc_aligned(size_t size, size_t alignment);\nvoid* mi_calloc_aligned(size_t count, size_t size, size_t alignment);\nvoid* mi_realloc_aligned(void* p, size_t newsize, size_t alignment);\n\n/// Allocate \\a size bytes aligned by \\a alignment at a specified \\a offset.\n/// @param size  number of bytes to allocate.\n/// @param alignment  the minimal alignment of the allocated memory at \\a offset.\n/// @param offset     the offset that should be aligned.\n/// @returns pointer to the allocated memory or \\a NULL if out of memory,\n/// or if the alignment is not a power of 2 (including 0). The \\a size is unrestricted\n/// (and does not have to be an integral multiple of the \\a alignment).\n/// The returned pointer is aligned by \\a alignment, i.e. `(uintptr_t)p % alignment == 0`.\n/// Returns a unique pointer if called with \\a size 0.\n///\n/// @see [_aligned_offset_malloc](https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/aligned-offset-malloc?view=vs-2017) (on Windows)\nvoid* mi_malloc_aligned_at(size_t size, size_t alignment, size_t offset);\nvoid* mi_zalloc_aligned_at(size_t size, size_t alignment, size_t offset);\nvoid* mi_calloc_aligned_at(size_t count, size_t size, size_t alignment, size_t offset);\nvoid* mi_realloc_aligned_at(void* p, size_t newsize, size_t alignment, size_t offset);\n\n/// \\}\n\n/// \\defgroup heap Heap Allocation\n///\n/// First-class heaps that can be destroyed in one go.\n///\n/// \\{\n\n/// Type of first-class heaps.\n/// A heap can only be used for allocation in\n/// the thread that created this heap! Any allocated\n/// blocks can be freed or reallocated by any other thread though.\nstruct mi_heap_s;\n\n/// Type of first-class heaps.\n/// A heap can only be used for (re)allocation in\n/// the thread that created this heap! Any allocated\n/// blocks can be freed by any other thread though.\ntypedef struct mi_heap_s mi_heap_t;\n\n/// Create a new heap that can be used for allocation.\nmi_heap_t* mi_heap_new();\n\n/// Delete a previously allocated heap.\n/// This will release resources and migrate any\n/// still allocated blocks in this heap (efficiently)\n/// to the default heap.\n///\n/// If \\a heap is the default heap, the default\n/// heap is set to the backing heap.\nvoid mi_heap_delete(mi_heap_t* heap);\n\n/// Destroy a heap, freeing all its still allocated blocks.\n/// Use with care as this will free all blocks still\n/// allocated in the heap. However, this can be a very\n/// efficient way to free all heap memory in one go.\n///\n/// If \\a heap is the default heap, the default\n/// heap is set to the backing heap.\nvoid mi_heap_destroy(mi_heap_t* heap);\n\n/// Set the default heap to use in the current thread for mi_malloc() et al.\n/// @param heap  The new default heap.\n/// @returns The previous default heap.\nmi_heap_t* mi_heap_set_default(mi_heap_t* heap);\n\n/// Get the default heap that is used for mi_malloc() et al. (for the current thread).\n/// @returns The current default heap.\nmi_heap_t* mi_heap_get_default();\n\n/// Get the backing heap.\n/// The _backing_ heap is the initial default heap for\n/// a thread and always available for allocations.\n/// It cannot be destroyed or deleted\n/// except by exiting the thread.\nmi_heap_t* mi_heap_get_backing();\n\n/// Release outstanding resources in a specific heap.\nvoid mi_heap_collect(mi_heap_t* heap, bool force);\n\n/// Allocate in a specific heap.\n/// @see mi_malloc()\nvoid* mi_heap_malloc(mi_heap_t* heap, size_t size);\n\n/// Allocate a small object in a specific heap.\n/// \\a size must be smaller or equal to MI_SMALL_SIZE_MAX().\n/// @see mi_malloc()\nvoid* mi_heap_malloc_small(mi_heap_t* heap, size_t size);\n\n/// Allocate zero-initialized in a specific heap.\n/// @see mi_zalloc()\nvoid* mi_heap_zalloc(mi_heap_t* heap, size_t size);\n\n/// Allocate \\a count zero-initialized elements in a specific heap.\n/// @see mi_calloc()\nvoid* mi_heap_calloc(mi_heap_t* heap, size_t count, size_t size);\n\n/// Allocate \\a count elements in a specific heap.\n/// @see mi_mallocn()\nvoid* mi_heap_mallocn(mi_heap_t* heap, size_t count, size_t size);\n\n/// Duplicate a string in a specific heap.\n/// @see mi_strdup()\nchar* mi_heap_strdup(mi_heap_t* heap, const char* s);\n\n/// Duplicate a string of at most length \\a n in a specific heap.\n/// @see mi_strndup()\nchar* mi_heap_strndup(mi_heap_t* heap, const char* s, size_t n);\n\n/// Resolve a file path name using a specific \\a heap to allocate the result.\n/// @see mi_realpath()\nchar* mi_heap_realpath(mi_heap_t* heap, const char* fname, char* resolved_name);\n\nvoid* mi_heap_realloc(mi_heap_t* heap, void* p, size_t newsize);\nvoid* mi_heap_reallocn(mi_heap_t* heap, void* p, size_t count, size_t size);\nvoid* mi_heap_reallocf(mi_heap_t* heap, void* p, size_t newsize);\n\nvoid* mi_heap_malloc_aligned(mi_heap_t* heap, size_t size, size_t alignment);\nvoid* mi_heap_malloc_aligned_at(mi_heap_t* heap, size_t size, size_t alignment, size_t offset);\nvoid* mi_heap_zalloc_aligned(mi_heap_t* heap, size_t size, size_t alignment);\nvoid* mi_heap_zalloc_aligned_at(mi_heap_t* heap, size_t size, size_t alignment, size_t offset);\nvoid* mi_heap_calloc_aligned(mi_heap_t* heap, size_t count, size_t size, size_t alignment);\nvoid* mi_heap_calloc_aligned_at(mi_heap_t* heap, size_t count, size_t size, size_t alignment, size_t offset);\nvoid* mi_heap_realloc_aligned(mi_heap_t* heap, void* p, size_t newsize, size_t alignment);\nvoid* mi_heap_realloc_aligned_at(mi_heap_t* heap, void* p, size_t newsize, size_t alignment, size_t offset);\n\n/// \\}\n\n\n/// \\defgroup zeroinit Zero initialized re-allocation\n///\n/// The zero-initialized re-allocations are only valid on memory that was\n/// originally allocated with zero initialization too.\n/// e.g. `mi_calloc`, `mi_zalloc`, `mi_zalloc_aligned` etc.\n/// see <https://github.com/microsoft/mimalloc/issues/63#issuecomment-508272992>\n///\n/// \\{\n\nvoid* mi_rezalloc(void* p, size_t newsize);\nvoid* mi_recalloc(void* p, size_t newcount, size_t size) ;\n\nvoid* mi_rezalloc_aligned(void* p, size_t newsize, size_t alignment);\nvoid* mi_rezalloc_aligned_at(void* p, size_t newsize, size_t alignment, size_t offset);\nvoid* mi_recalloc_aligned(void* p, size_t newcount, size_t size, size_t alignment);\nvoid* mi_recalloc_aligned_at(void* p, size_t newcount, size_t size, size_t alignment, size_t offset);\n\nvoid* mi_heap_rezalloc(mi_heap_t* heap, void* p, size_t newsize);\nvoid* mi_heap_recalloc(mi_heap_t* heap, void* p, size_t newcount, size_t size);\n\nvoid* mi_heap_rezalloc_aligned(mi_heap_t* heap, void* p, size_t newsize, size_t alignment);\nvoid* mi_heap_rezalloc_aligned_at(mi_heap_t* heap, void* p, size_t newsize, size_t alignment, size_t offset);\nvoid* mi_heap_recalloc_aligned(mi_heap_t* heap, void* p, size_t newcount, size_t size, size_t alignment);\nvoid* mi_heap_recalloc_aligned_at(mi_heap_t* heap, void* p, size_t newcount, size_t size, size_t alignment, size_t offset);\n\n/// \\}\n\n/// \\defgroup typed Typed Macros\n///\n/// Typed allocation macros. For example:\n/// ```\n/// int* p = mi_malloc_tp(int)\n/// ```\n///\n/// \\{\n\n/// Allocate a block of type \\a tp.\n/// @param tp The type of the block to allocate.\n/// @returns A pointer to an object of type \\a tp, or\n/// \\a NULL if out of memory.\n///\n/// **Example:**\n/// ```\n/// int* p = mi_malloc_tp(int)\n/// ```\n///\n/// @see mi_malloc()\n#define mi_malloc_tp(tp)        ((tp*)mi_malloc(sizeof(tp)))\n\n/// Allocate a zero-initialized block of type \\a tp.\n#define mi_zalloc_tp(tp)        ((tp*)mi_zalloc(sizeof(tp)))\n\n/// Allocate \\a count zero-initialized blocks of type \\a tp.\n#define mi_calloc_tp(tp,count)      ((tp*)mi_calloc(count,sizeof(tp)))\n\n/// Allocate \\a count blocks of type \\a tp.\n#define mi_mallocn_tp(tp,count)     ((tp*)mi_mallocn(count,sizeof(tp)))\n\n/// Re-allocate to \\a count blocks of type \\a tp.\n#define mi_reallocn_tp(p,tp,count)  ((tp*)mi_reallocn(p,count,sizeof(tp)))\n\n/// Allocate a block of type \\a tp in a heap \\a hp.\n#define mi_heap_malloc_tp(hp,tp)        ((tp*)mi_heap_malloc(hp,sizeof(tp)))\n\n/// Allocate a zero-initialized block of type \\a tp in a heap \\a hp.\n#define mi_heap_zalloc_tp(hp,tp)        ((tp*)mi_heap_zalloc(hp,sizeof(tp)))\n\n/// Allocate \\a count zero-initialized blocks of type \\a tp in a heap \\a hp.\n#define mi_heap_calloc_tp(hp,tp,count)      ((tp*)mi_heap_calloc(hp,count,sizeof(tp)))\n\n/// Allocate \\a count blocks of type \\a tp in a heap \\a hp.\n#define mi_heap_mallocn_tp(hp,tp,count)     ((tp*)mi_heap_mallocn(hp,count,sizeof(tp)))\n\n/// Re-allocate to \\a count blocks of type \\a tp in a heap \\a hp.\n#define mi_heap_reallocn_tp(hp,p,tp,count)  ((tp*)mi_heap_reallocn(p,count,sizeof(tp)))\n\n/// Re-allocate to \\a count zero initialized blocks of type \\a tp in a heap \\a hp.\n#define mi_heap_recalloc_tp(hp,p,tp,count)  ((tp*)mi_heap_recalloc(p,count,sizeof(tp)))\n\n/// \\}\n\n/// \\defgroup analysis Heap Introspection\n///\n/// Inspect the heap at runtime.\n///\n/// \\{\n\n/// Does a heap contain a pointer to a previously allocated block?\n/// @param heap The heap.\n/// @param p Pointer to a previously allocated block (in any heap)-- cannot be some\n///          random pointer!\n/// @returns \\a true if the block pointed to by \\a p is in the \\a heap.\n/// @see mi_heap_check_owned()\nbool mi_heap_contains_block(mi_heap_t* heap, const void* p);\n\n/// Check safely if any pointer is part of a heap.\n/// @param heap The heap.\n/// @param p   Any pointer -- not required to be previously allocated by us.\n/// @returns \\a true if \\a p points to a block in \\a heap.\n///\n/// Note: expensive function, linear in the pages in the heap.\n/// @see mi_heap_contains_block()\n/// @see mi_heap_get_default()\nbool mi_heap_check_owned(mi_heap_t* heap, const void* p);\n\n/// Check safely if any pointer is part of the default heap of this thread.\n/// @param p   Any pointer -- not required to be previously allocated by us.\n/// @returns \\a true if \\a p points to a block in default heap of this thread.\n///\n/// Note: expensive function, linear in the pages in the heap.\n/// @see mi_heap_contains_block()\n/// @see mi_heap_get_default()\nbool mi_check_owned(const void* p);\n\n/// An area of heap space contains blocks of a single size.\n/// The bytes in freed blocks are `committed - used`.\ntypedef struct mi_heap_area_s {\n  void*  blocks;      ///< start of the area containing heap blocks\n  size_t reserved;    ///< bytes reserved for this area\n  size_t committed;   ///< current committed bytes of this area\n  size_t used;        ///< bytes in use by allocated blocks\n  size_t block_size;  ///< size in bytes of one block\n  size_t full_block_size; ///< size in bytes of a full block including padding and metadata.\n  int    heap_tag;    ///< heap tag associated with this area (see \\a mi_heap_new_ex)\n} mi_heap_area_t;\n\n/// Visitor function passed to mi_heap_visit_blocks()\n/// @returns \\a true if ok, \\a false to stop visiting (i.e. break)\n///\n/// This function is always first called for every \\a area\n/// with \\a block as a \\a NULL pointer. If \\a visit_all_blocks\n/// was \\a true, the function is then called for every allocated\n/// block in that area.\ntypedef bool (mi_block_visit_fun)(const mi_heap_t* heap, const mi_heap_area_t* area, void* block, size_t block_size, void* arg);\n\n/// Visit all areas and blocks in a heap.\n/// @param heap The heap to visit.\n/// @param visit_all_blocks If \\a true visits all allocated blocks, otherwise\n///                         \\a visitor is only called for every heap area.\n/// @param visitor This function is called for every area in the heap\n///                 (with \\a block as \\a NULL). If \\a visit_all_blocks is\n///                 \\a true, \\a visitor is also called for every allocated\n///                 block in every area (with `block!=NULL`).\n///                 return \\a false from this function to stop visiting early.\n/// @param arg Extra argument passed to \\a visitor.\n/// @returns \\a true if all areas and blocks were visited.\nbool mi_heap_visit_blocks(const mi_heap_t* heap, bool visit_all_blocks, mi_block_visit_fun* visitor, void* arg);\n\n/// @brief Visit all areas and blocks in abandoned heaps.\n/// @param subproc_id The sub-process id associated with the abandoned heaps.\n/// @param heap_tag Visit only abandoned memory with the specified heap tag, use -1 to visit all abandoned memory.\n/// @param visit_blocks If \\a true visits all allocated blocks, otherwise\n///                         \\a visitor is only called for every heap area.\n/// @param visitor This function is called for every area in the heap\n///                 (with \\a block as \\a NULL). If \\a visit_all_blocks is\n///                 \\a true, \\a visitor is also called for every allocated\n///                 block in every area (with `block!=NULL`).\n///                 return \\a false from this function to stop visiting early.\n/// @param arg extra argument passed to the \\a visitor.\n/// @return \\a true if all areas and blocks were visited.\n///\n/// Note: requires the option `mi_option_visit_abandoned` to be set\n/// at the start of the program.\nbool mi_abandoned_visit_blocks(mi_subproc_id_t subproc_id, int heap_tag, bool visit_blocks, mi_block_visit_fun* visitor, void* arg);\n\n/// \\}\n\n/// \\defgroup options Runtime Options\n///\n/// Set runtime behavior.\n///\n/// \\{\n\n/// Runtime options.\ntypedef enum mi_option_e {\n  // stable options\n  mi_option_show_errors,  ///< Print error messages.\n  mi_option_show_stats,   ///< Print statistics on termination.\n  mi_option_verbose,      ///< Print verbose messages.\n  mi_option_max_errors,                 ///< issue at most N error messages\n  mi_option_max_warnings,               ///< issue at most N warning messages\n\n  // advanced options\n  mi_option_reserve_huge_os_pages,    ///< reserve N huge OS pages (1GiB pages) at startup\n  mi_option_reserve_huge_os_pages_at, ///< Reserve N huge OS pages at a specific NUMA node N.\n  mi_option_reserve_os_memory,        ///< reserve specified amount of OS memory in an arena at startup (internally, this value is in KiB; use `mi_option_get_size`)\n  mi_option_allow_large_os_pages,     ///< allow large (2 or 4 MiB) OS pages, implies eager commit. If false, also disables THP for the process.\n  mi_option_purge_decommits,          ///< should a memory purge decommit? (=1). Set to 0 to use memory reset on a purge (instead of decommit)\n  mi_option_arena_reserve,            ///< initial memory size for arena reservation (= 1 GiB on 64-bit) (internally, this value is in KiB; use `mi_option_get_size`)\n  mi_option_os_tag,                   ///< tag used for OS logging (macOS only for now) (=100)\n  mi_option_retry_on_oom,             ///< retry on out-of-memory for N milli seconds (=400), set to 0 to disable retries. (only on windows)\n\n  // experimental options\n  mi_option_eager_commit,             ///< eager commit segments? (after `eager_commit_delay` segments) (enabled by default).\n  mi_option_eager_commit_delay,       ///< the first N segments per thread are not eagerly committed (but per page in the segment on demand)\n  mi_option_arena_eager_commit,       ///< eager commit arenas? Use 2 to enable just on overcommit systems (=2)\n  mi_option_abandoned_page_purge,     ///< immediately purge delayed purges on thread termination\n  mi_option_purge_delay,              ///< memory purging is delayed by N milli seconds; use 0 for immediate purging or -1 for no purging at all. (=10)\n  mi_option_use_numa_nodes,           ///< 0 = use all available numa nodes, otherwise use at most N nodes.\n  mi_option_disallow_os_alloc,        ///< 1 = do not use OS memory for allocation (but only programmatically reserved arenas)\n  mi_option_limit_os_alloc,           ///< If set to 1, do not use OS memory for allocation (but only pre-reserved arenas)\n  mi_option_max_segment_reclaim,        ///< max. percentage of the abandoned segments can be reclaimed per try (=10%)\n  mi_option_destroy_on_exit,            ///< if set, release all memory on exit; sometimes used for dynamic unloading but can be unsafe\n  mi_option_arena_purge_mult,           ///< multiplier for `purge_delay` for the purging delay for arenas (=10)\n  mi_option_abandoned_reclaim_on_free,  ///< allow to reclaim an abandoned segment on a free (=1)\n  mi_option_purge_extend_delay,         ///< extend purge delay on each subsequent delay (=1)\n  mi_option_disallow_arena_alloc,       ///< 1 = do not use arena's for allocation (except if using specific arena id's)\n  mi_option_visit_abandoned,            ///< allow visiting heap blocks from abandoned threads (=0)\n\n  _mi_option_last\n} mi_option_t;\n\n\nbool  mi_option_is_enabled(mi_option_t option);\nvoid  mi_option_enable(mi_option_t option);\nvoid  mi_option_disable(mi_option_t option);\nvoid  mi_option_set_enabled(mi_option_t option, bool enable);\nvoid  mi_option_set_enabled_default(mi_option_t option, bool enable);\n\nlong   mi_option_get(mi_option_t option);\nlong   mi_option_get_clamp(mi_option_t option, long min, long max);\nsize_t mi_option_get_size(mi_option_t option);\n\nvoid  mi_option_set(mi_option_t option, long value);\nvoid  mi_option_set_default(mi_option_t option, long value);\n\n\n/// \\}\n\n/// \\defgroup posix Posix\n///\n///  `mi_` prefixed implementations of various Posix, Unix, and C++ allocation functions.\n///  Defined for convenience as all redirect to the regular mimalloc API.\n///\n/// \\{\n\n/// Just as `free` but also checks if the pointer `p` belongs to our heap.\nvoid   mi_cfree(void* p);\nvoid* mi__expand(void* p, size_t newsize);\n\nvoid*  mi_recalloc(void* p, size_t count, size_t size);\nsize_t mi_malloc_size(const void* p);\nsize_t mi_malloc_good_size(size_t size);\nsize_t mi_malloc_usable_size(const void *p);\n\nint mi_posix_memalign(void** p, size_t alignment, size_t size);\nint mi__posix_memalign(void** p, size_t alignment, size_t size);\nvoid* mi_memalign(size_t alignment, size_t size);\nvoid* mi_valloc(size_t size);\nvoid* mi_pvalloc(size_t size);\nvoid* mi_aligned_alloc(size_t alignment, size_t size);\n\nunsigned short* mi_wcsdup(const unsigned short* s);\nunsigned char*  mi_mbsdup(const unsigned char* s);\nint mi_dupenv_s(char** buf, size_t* size, const char* name);\nint mi_wdupenv_s(unsigned short** buf, size_t* size, const unsigned short* name);\n\n/// Correspond s to [reallocarray](https://www.freebsd.org/cgi/man.cgi?query=reallocarray&sektion=3&manpath=freebsd-release-ports)\n/// in FreeBSD.\nvoid* mi_reallocarray(void* p, size_t count, size_t size);\n\n/// Corresponds to [reallocarr](https://man.netbsd.org/reallocarr.3) in NetBSD.\nint   mi_reallocarr(void* p, size_t count, size_t size);\n\nvoid* mi_aligned_recalloc(void* p, size_t newcount, size_t size, size_t alignment);\nvoid* mi_aligned_offset_recalloc(void* p, size_t newcount, size_t size, size_t alignment, size_t offset);\n\nvoid mi_free_size(void* p, size_t size);\nvoid mi_free_size_aligned(void* p, size_t size, size_t alignment);\nvoid mi_free_aligned(void* p, size_t alignment);\n\n/// \\}\n\n/// \\defgroup cpp C++ wrappers\n///\n///  `mi_` prefixed implementations of various allocation functions\n///  that use C++ semantics on out-of-memory, generally calling\n///  `std::get_new_handler` and raising a `std::bad_alloc` exception on failure.\n///\n///  Note: use the `mimalloc-new-delete.h` header to override the \\a new\n///        and \\a delete operators globally. The wrappers here are mostly\n///        for convenience for library writers that need to interface with\n///        mimalloc from C++.\n///\n/// \\{\n\n/// like mi_malloc(), but when out of memory, use `std::get_new_handler` and raise `std::bad_alloc` exception on failure.\nvoid* mi_new(std::size_t n) noexcept(false);\n\n/// like mi_mallocn(), but when out of memory, use `std::get_new_handler` and raise `std::bad_alloc` exception on failure.\nvoid* mi_new_n(size_t count, size_t size) noexcept(false);\n\n/// like mi_malloc_aligned(), but when out of memory, use `std::get_new_handler` and raise `std::bad_alloc` exception on failure.\nvoid* mi_new_aligned(std::size_t n, std::align_val_t alignment) noexcept(false);\n\n/// like `mi_malloc`, but when out of memory, use `std::get_new_handler` but return \\a NULL on failure.\nvoid* mi_new_nothrow(size_t n);\n\n/// like `mi_malloc_aligned`, but when out of memory, use `std::get_new_handler` but return \\a NULL on failure.\nvoid* mi_new_aligned_nothrow(size_t n, size_t alignment);\n\n/// like mi_realloc(), but when out of memory, use `std::get_new_handler` and raise `std::bad_alloc` exception on failure.\nvoid* mi_new_realloc(void* p, size_t newsize);\n\n/// like mi_reallocn(), but when out of memory, use `std::get_new_handler` and raise `std::bad_alloc` exception on failure.\nvoid* mi_new_reallocn(void* p, size_t newcount, size_t size);\n\n/// \\a std::allocator implementation for mimalloc for use in STL containers.\n/// For example:\n/// ```\n/// std::vector<int, mi_stl_allocator<int> > vec;\n/// vec.push_back(1);\n/// vec.pop_back();\n/// ```\ntemplate<class T> struct mi_stl_allocator { }\n\n/// \\}\n\n/*! \\page build Building\n\nCheckout the sources from GitHub:\n```\ngit clone https://github.com/microsoft/mimalloc\n```\n\n## Windows\n\nOpen `ide/vs2019/mimalloc.sln` in Visual Studio 2019 and build (or `ide/vs2017/mimalloc.sln`).\nThe `mimalloc` project builds a static library (in `out/msvc-x64`), while the\n`mimalloc-override` project builds a DLL for overriding malloc\nin the entire program.\n\n## macOS, Linux, BSD, etc.\n\nWe use [`cmake`](https://cmake.org)<sup>1</sup> as the build system:\n\n```\n> mkdir -p out/release\n> cd out/release\n> cmake ../..\n> make\n```\nThis builds the library as a shared (dynamic)\nlibrary (`.so` or `.dylib`), a static library (`.a`), and\nas a single object file (`.o`).\n\n`> sudo make install` (install the library and header files in `/usr/local/lib`  and `/usr/local/include`)\n\nYou can build the debug version which does many internal checks and\nmaintains detailed statistics as:\n\n```\n> mkdir -p out/debug\n> cd out/debug\n> cmake -DCMAKE_BUILD_TYPE=Debug ../..\n> make\n```\nThis will name the shared library as `libmimalloc-debug.so`.\n\nFinally, you can build a _secure_ version that uses guard pages, encrypted\nfree lists, etc, as:\n```\n> mkdir -p out/secure\n> cd out/secure\n> cmake -DMI_SECURE=ON ../..\n> make\n```\nThis will name the shared library as `libmimalloc-secure.so`.\nUse `ccmake`<sup>2</sup> instead of `cmake`\nto see and customize all the available build options.\n\nNotes:\n1. Install CMake: `sudo apt-get install cmake`\n2. Install CCMake: `sudo apt-get install cmake-curses-gui`\n\n*/\n\n/*! \\page using Using the library\n\n### Build\n\nThe preferred usage is including `<mimalloc.h>`, linking with\nthe shared- or static library, and using the `mi_malloc` API exclusively for allocation. For example,\n```\ngcc -o myprogram -lmimalloc myfile.c\n```\n\nmimalloc uses only safe OS calls (`mmap` and `VirtualAlloc`) and can co-exist\nwith other allocators linked to the same program.\nIf you use `cmake`, you can simply use:\n```\nfind_package(mimalloc 2.1 REQUIRED)\n```\nin your `CMakeLists.txt` to find a locally installed mimalloc. Then use either:\n```\ntarget_link_libraries(myapp PUBLIC mimalloc)\n```\nto link with the shared (dynamic) library, or:\n```\ntarget_link_libraries(myapp PUBLIC mimalloc-static)\n```\nto link with the static library. See `test\\CMakeLists.txt` for an example.\n\n### C++\nFor best performance in C++ programs, it is also recommended to override the\nglobal `new` and `delete` operators. For convenience, mimalloc provides\n[`mimalloc-new-delete.h`](https://github.com/microsoft/mimalloc/blob/master/include/mimalloc-new-delete.h) which does this for you -- just include it in a single(!) source file in your project.\n\nIn C++, mimalloc also provides the `mi_stl_allocator` struct which implements the `std::allocator`\ninterface. For example:\n```\nstd::vector<some_struct, mi_stl_allocator<some_struct>> vec;\nvec.push_back(some_struct());\n```\n\n### Statistics\n\nYou can pass environment variables to print verbose messages (`MIMALLOC_VERBOSE=1`)\nand statistics (`MIMALLOC_SHOW_STATS=1`) (in the debug version):\n```\n> env MIMALLOC_SHOW_STATS=1 ./cfrac 175451865205073170563711388363\n\n175451865205073170563711388363 = 374456281610909315237213 * 468551\n\nheap stats:     peak      total      freed       unit\nnormal   2:    16.4 kb    17.5 mb    17.5 mb      16 b   ok\nnormal   3:    16.3 kb    15.2 mb    15.2 mb      24 b   ok\nnormal   4:      64 b      4.6 kb     4.6 kb      32 b   ok\nnormal   5:      80 b    118.4 kb   118.4 kb      40 b   ok\nnormal   6:      48 b       48 b       48 b       48 b   ok\nnormal  17:     960 b      960 b      960 b      320 b   ok\n\nheap stats:     peak      total      freed       unit\n    normal:    33.9 kb    32.8 mb    32.8 mb       1 b   ok\n      huge:       0 b        0 b        0 b        1 b   ok\n     total:    33.9 kb    32.8 mb    32.8 mb       1 b   ok\nmalloc requested:         32.8 mb\n\n committed:    58.2 kb    58.2 kb    58.2 kb       1 b   ok\n  reserved:     2.0 mb     2.0 mb     2.0 mb       1 b   ok\n     reset:       0 b        0 b        0 b        1 b   ok\n  segments:       1          1          1\n-abandoned:       0\n     pages:       6          6          6\n-abandoned:       0\n     mmaps:       3\n mmap fast:       0\n mmap slow:       1\n   threads:       0\n   elapsed:     2.022s\n   process: user: 1.781s, system: 0.016s, faults: 756, reclaims: 0, rss: 2.7 mb\n```\n\nThe above model of using the `mi_` prefixed API is not always possible\nthough in existing programs that already use the standard malloc interface,\nand another option is to override the standard malloc interface\ncompletely and redirect all calls to the _mimalloc_ library instead.\n\nSee \\ref overrides for more info.\n\n*/\n\n/*! \\page environment Environment Options\n\nYou can set further options either programmatically (using [`mi_option_set`](https://microsoft.github.io/mimalloc/group__options.html)), or via environment variables:\n\n- `MIMALLOC_SHOW_STATS=1`: show statistics when the program terminates.\n- `MIMALLOC_VERBOSE=1`: show verbose messages.\n- `MIMALLOC_SHOW_ERRORS=1`: show error and warning messages.\n\nAdvanced options:\n\n- `MIMALLOC_ARENA_EAGER_COMMIT=2`: turns on eager commit for the large arenas (usually 1GiB) from which mimalloc\n   allocates segments and pages. Set this to 2 (default) to\n   only enable this on overcommit systems (e.g. Linux). Set this to 1 to enable explicitly on other systems\n   as well (like Windows or macOS) which may improve performance (as the whole arena is committed at once).\n   Note that eager commit only increases the commit but not the actual the peak resident set\n   (rss) so it is generally ok to enable this.\n- `MIMALLOC_PURGE_DELAY=N`: the delay in `N` milli-seconds (by default `10`) after which mimalloc will purge\n   OS pages that are not in use. This signals to the OS that the underlying physical memory can be reused which\n   can reduce memory fragmentation especially in long running (server) programs. Setting `N` to `0` purges immediately when\n   a page becomes unused which can improve memory usage but also decreases performance. Setting `N` to a higher\n   value like `100` can improve performance (sometimes by a lot) at the cost of potentially using more memory at times.\n   Setting it to `-1` disables purging completely.\n- `MIMALLOC_PURGE_DECOMMITS=1`: By default \"purging\" memory means unused memory is decommitted (`MEM_DECOMMIT` on Windows,\n   `MADV_DONTNEED` (which decresease rss immediately) on `mmap` systems). Set this to 0 to instead \"reset\" unused\n   memory on a purge (`MEM_RESET` on Windows, generally `MADV_FREE` (which does not decrease rss immediately) on `mmap` systems).\n   Mimalloc generally does not \"free\" OS memory but only \"purges\" OS memory, in other words, it tries to keep virtual\n   address ranges and decommits within those ranges (to make the underlying physical memory available to other processes).\n\nFurther options for large workloads and services:\n\n- `MIMALLOC_USE_NUMA_NODES=N`: pretend there are at most `N` NUMA nodes. If not set, the actual NUMA nodes are detected\n   at runtime. Setting `N` to 1 may avoid problems in some virtual environments. Also, setting it to a lower number than\n   the actual NUMA nodes is fine and will only cause threads to potentially allocate more memory across actual NUMA\n   nodes (but this can happen in any case as NUMA local allocation is always a best effort but not guaranteed).\n- `MIMALLOC_ALLOW_LARGE_OS_PAGES=1`: use large OS pages (2 or 4MiB) when available; for some workloads this can significantly\n   improve performance. When this option is disabled (default), it also disables transparent huge pages (THP) for the process\n   (on Linux and Android). On Linux the default setting is 2 -- this enables the use of large pages through THP only.\n   Use `MIMALLOC_VERBOSE` to check if the large OS pages are enabled -- usually one needs\n   to explicitly give permissions for large OS pages (as on [Windows][windows-huge] and [Linux][linux-huge]). However, sometimes\n   the OS is very slow to reserve contiguous physical memory for large OS pages so use with care on systems that\n   can have fragmented memory (for that reason, we generally recommend to use `MIMALLOC_RESERVE_HUGE_OS_PAGES` instead whenever possible).\n- `MIMALLOC_RESERVE_HUGE_OS_PAGES=N`: where `N` is the number of 1GiB _huge_ OS pages. This reserves the huge pages at\n   startup and sometimes this can give a large (latency) performance improvement on big workloads.\n   Usually it is better to not use `MIMALLOC_ALLOW_LARGE_OS_PAGES=1` in combination with this setting. Just like large\n   OS pages, use with care as reserving\n   contiguous physical memory can take a long time when memory is fragmented (but reserving the huge pages is done at\n   startup only once).\n   Note that we usually need to explicitly give permission for huge OS pages (as on [Windows][windows-huge] and [Linux][linux-huge])).\n   With huge OS pages, it may be beneficial to set the setting\n   `MIMALLOC_EAGER_COMMIT_DELAY=N` (`N` is 1 by default) to delay the initial `N` segments (of 4MiB)\n   of a thread to not allocate in the huge OS pages; this prevents threads that are short lived\n   and allocate just a little to take up space in the huge OS page area (which cannot be purged as huge OS pages are pinned\n   to physical memory).\n   The huge pages are usually allocated evenly among NUMA nodes.\n   We can use `MIMALLOC_RESERVE_HUGE_OS_PAGES_AT=N` where `N` is the numa node (starting at 0) to allocate all\n   the huge pages at a specific numa node instead.\n\nUse caution when using `fork` in combination with either large or huge OS pages: on a fork, the OS uses copy-on-write\nfor all pages in the original process including the huge OS pages. When any memory is now written in that area, the\nOS will copy the entire 1GiB huge page (or 2MiB large page) which can cause the memory usage to grow in large increments.\n\n[linux-huge]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/tuning_and_optimizing_red_hat_enterprise_linux_for_oracle_9i_and_10g_databases/sect-oracle_9i_and_10g_tuning_guide-large_memory_optimization_big_pages_and_huge_pages-configuring_huge_pages_in_red_hat_enterprise_linux_4_or_5\n[windows-huge]: https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/enable-the-lock-pages-in-memory-option-windows?view=sql-server-2017\n\n*/\n\n/*! \\page overrides Overriding Malloc\n\nOverriding the standard `malloc` (and `new`) can be done either _dynamically_ or _statically_.\n\n## Dynamic override\n\nThis is the recommended way to override the standard malloc interface.\n\n### Dynamic Override on Linux, BSD\n\nOn these ELF-based systems we preload the mimalloc shared\nlibrary so all calls to the standard `malloc` interface are\nresolved to the _mimalloc_ library.\n```\n> env LD_PRELOAD=/usr/lib/libmimalloc.so myprogram\n```\n\nYou can set extra environment variables to check that mimalloc is running,\nlike:\n```\n> env MIMALLOC_VERBOSE=1 LD_PRELOAD=/usr/lib/libmimalloc.so myprogram\n```\nor run with the debug version to get detailed statistics:\n```\n> env MIMALLOC_SHOW_STATS=1 LD_PRELOAD=/usr/lib/libmimalloc-debug.so myprogram\n```\n\n### Dynamic Override on MacOS\n\nOn macOS we can also preload the mimalloc shared\nlibrary so all calls to the standard `malloc` interface are\nresolved to the _mimalloc_ library.\n```\n> env DYLD_INSERT_LIBRARIES=/usr/lib/libmimalloc.dylib myprogram\n```\n\nNote that certain security restrictions may apply when doing this from\nthe [shell](https://stackoverflow.com/questions/43941322/dyld-insert-libraries-ignored-when-calling-application-through-bash).\n\n\n### Dynamic Override on Windows\n\n<span id=\"override_on_windows\">Dynamically overriding on mimalloc on Windows</span> \nis robust and has the particular advantage to be able to redirect all malloc/free calls \nthat go through the (dynamic) C runtime allocator, including those from other DLL's or \nlibraries. As it intercepts all allocation calls on a low level, it can be used reliably \non large programs that include other 3rd party components.\nThere are four requirements to make the overriding work well:\n\n1. Use the C-runtime library as a DLL (using the `/MD` or `/MDd` switch).\n\n2. Link your program explicitly with the `mimalloc.lib` export library for the `mimalloc.dll`.\n   (which must be compiled with `-DMI_OVERRIDE=ON`, which is the default though).\n   To ensure the `mimalloc.dll` is actually loaded at run-time it is easiest \n   to insert some call to the mimalloc API in the `main` function, like `mi_version()`\n   (or use the `/include:mi_version` switch on the linker command, or\n   similarly, `#pragma comment(linker, \"/include:mi_version\")` in some source file). \n   See the `mimalloc-test-override` project for an example on how to use this. \n\n3. The `mimalloc-redirect.dll` must be put in the same directory as the main \n   `mimalloc.dll` at runtime (as it is a dependency of that DLL).\n   The redirection DLL ensures that all calls to the C runtime malloc API get \n   redirected to mimalloc functions (which reside in `mimalloc.dll`).\n\n4. Ensure the `mimalloc.dll` comes as early as possible in the import\n   list of the final executable (so it can intercept all potential allocations).\n   You can use `minject -l <exe>` to check this if needed.\n\nFor best performance on Windows with C++, it\nis also recommended to also override the `new`/`delete` operations (by including\n[`mimalloc-new-delete.h`](include/mimalloc-new-delete.h)\na single(!) source file in your project).\n\nThe environment variable `MIMALLOC_DISABLE_REDIRECT=1` can be used to disable dynamic\noverriding at run-time. Use `MIMALLOC_VERBOSE=1` to check if mimalloc was successfully \nredirected.\n\nFor different platforms than x64, you may need a specific [redirection dll](bin).\nFurthermore, we cannot always re-link an executable or ensure `mimalloc.dll` comes\nfirst in the import table. In such cases the [`minject`](bin) tool can be used\nto patch the executable's import tables.\n\n\n## Static override\n\nOn Unix-like systems, you can also statically link with _mimalloc_ to override the standard\nmalloc interface. The recommended way is to link the final program with the\n_mimalloc_ single object file (`mimalloc.o`). We use\nan object file instead of a library file as linkers give preference to\nthat over archives to resolve symbols. To ensure that the standard\nmalloc interface resolves to the _mimalloc_ library, link it as the first\nobject file. For example:\n```\n> gcc -o myprogram mimalloc.o  myfile1.c ...\n```\n\nAnother way to override statically that works on all platforms, is to\nlink statically to mimalloc (as shown in the introduction) and include a\nheader file in each source file that re-defines `malloc` etc. to `mi_malloc`.\nThis is provided by [`mimalloc-override.h`](https://github.com/microsoft/mimalloc/blob/master/include/mimalloc-override.h). This only works reliably though if all sources are\nunder your control or otherwise mixing of pointers from different heaps may occur!\n\n## List of Overrides:\n\nThe specific functions that get redirected to the _mimalloc_ library are:\n\n```\n// C\nvoid*  malloc(size_t size);\nvoid*  calloc(size_t size, size_t n);\nvoid*  realloc(void* p, size_t newsize);\nvoid   free(void* p);\n\nvoid*  aligned_alloc(size_t alignment, size_t size);\nchar*  strdup(const char* s);\nchar*  strndup(const char* s, size_t n);\nchar*  realpath(const char* fname, char* resolved_name);\n\n\n// C++\nvoid   operator delete(void* p);\nvoid   operator delete[](void* p);\n\nvoid*  operator new(std::size_t n) noexcept(false);\nvoid*  operator new[](std::size_t n) noexcept(false);\nvoid*  operator new( std::size_t n, std::align_val_t align) noexcept(false);\nvoid*  operator new[]( std::size_t n, std::align_val_t align) noexcept(false);\n\nvoid*  operator new  ( std::size_t count, const std::nothrow_t& tag);\nvoid*  operator new[]( std::size_t count, const std::nothrow_t& tag);\nvoid*  operator new  ( std::size_t count, std::align_val_t al, const std::nothrow_t&);\nvoid*  operator new[]( std::size_t count, std::align_val_t al, const std::nothrow_t&);\n\n// Posix\nint    posix_memalign(void** p, size_t alignment, size_t size);\n\n// Linux\nvoid*  memalign(size_t alignment, size_t size);\nvoid*  valloc(size_t size);\nvoid*  pvalloc(size_t size);\nsize_t malloc_usable_size(void *p);\nvoid*  reallocf(void* p, size_t newsize);\n\n// macOS\nvoid   vfree(void* p);\nsize_t malloc_size(const void* p);\nsize_t malloc_good_size(size_t size);\n\n// BSD\nvoid*  reallocarray( void* p, size_t count, size_t size );\nvoid*  reallocf(void* p, size_t newsize);\nvoid   cfree(void* p);\n\n// NetBSD\nint    reallocarr(void* p, size_t count, size_t size);\n\n// Windows\nvoid*  _expand(void* p, size_t newsize);\nsize_t _msize(void* p);\n\nvoid*  _malloc_dbg(size_t size, int block_type, const char* fname, int line);\nvoid*  _realloc_dbg(void* p, size_t newsize, int block_type, const char* fname, int line);\nvoid*  _calloc_dbg(size_t count, size_t size, int block_type, const char* fname, int line);\nvoid*  _expand_dbg(void* p, size_t size, int block_type, const char* fname, int line);\nsize_t _msize_dbg(void* p, int block_type);\nvoid   _free_dbg(void* p, int block_type);\n```\n\n*/\n\n/*! \\page bench Performance\n\nWe tested _mimalloc_ against many other top allocators over a wide\nrange of benchmarks, ranging from various real world programs to\nsynthetic benchmarks that see how the allocator behaves under more\nextreme circumstances.\n\nIn our benchmarks, _mimalloc_ always outperforms all other leading\nallocators (_jemalloc_, _tcmalloc_, _Hoard_, etc) (Jan 2021),\nand usually uses less memory (up to 25% more in the worst case).\nA nice property is that it does *consistently* well over the wide\nrange of benchmarks.\n\nSee the [Performance](https://github.com/microsoft/mimalloc#Performance)\nsection in the _mimalloc_ repository for benchmark results,\nor the the technical report for detailed benchmark results.\n\n*/\n"
  },
  {
    "path": "third-party/mimalloc/doc/mimalloc-doxygen.css",
    "content": "#projectlogo img {\n\tpadding: 1ex;\n}\ntt, code, kbd, samp, div.memproto, div.fragment, div.line, table.memname {\n\tfont-family: Consolas, Monaco, Inconsolata, \"Courier New\", monospace;\n}\n.image img, .textblock img {\n\tmax-width: 99%;\n\tmax-height: 350px;\n}\ntable.memname, .memname{\n\tfont-weight: bold;\n}\ncode {\n\tbackground-color: #EEE;\n\tpadding: 0ex 0.25ex;\n}\nbody {\n\tmargin: 1ex 1ex 0ex 1ex;\n\tborder: 1px solid black;\n}\n.contents table, .contents div, .contents p, .contents dl {\n\tfont-size: 16px;\n\tline-height: 1.44;\n}\nbody #nav-tree .label {\n\tfont-size: 14px;\n}\na{\n\ttext-decoration: underline;\n}\n#side-nav {\n\tmargin-left: 1ex;\n\tborder-left: 1px solid black;\n}\n#nav-tree {\n\tpadding-left: 1ex;\n}\n#nav-path {\n\tdisplay: none;\n}\ndiv.fragment {\n\tbackground-color: #EEE;\n\tpadding: 0.25ex 0.5ex;\n\tborder-color: black;\n}\n#nav-sync img {\n\tdisplay: none;\n}\nh1,h2,h3,h4,h5,h6 {\n\ttransition:none;\n}\n.memtitle {\n\tbackground-image: none;\n\tbackground-color: #EEE;\n}\ntable.memproto, .memproto {\n\ttext-shadow: none;\n\tfont-size: 110%;\n}\n"
  },
  {
    "path": "third-party/mimalloc/ide/vs2022/mimalloc-lib.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|ARM64\">\n      <Configuration>Debug</Configuration>\n      <Platform>ARM64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|ARM64EC\">\n      <Configuration>Debug</Configuration>\n      <Platform>ARM64EC</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|ARM64\">\n      <Configuration>Release</Configuration>\n      <Platform>ARM64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|ARM64EC\">\n      <Configuration>Release</Configuration>\n      <Platform>ARM64EC</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <VCProjectVersion>15.0</VCProjectVersion>\n    <ProjectGuid>{ABB5EAE7-B3E6-432E-B636-333449892EA6}</ProjectGuid>\n    <RootNamespace>mimalloc-lib</RootNamespace>\n    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>\n    <ProjectName>mimalloc-lib</ProjectName>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\">\n  </ImportGroup>\n  <ImportGroup Label=\"Shared\">\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <OutDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n    <TargetExt>.lib</TargetExt>\n    <TargetName>mimalloc</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <OutDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n    <TargetExt>.lib</TargetExt>\n    <TargetName>mimalloc</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <OutDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n    <TargetExt>.lib</TargetExt>\n    <TargetName>mimalloc</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">\n    <OutDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n    <TargetExt>.lib</TargetExt>\n    <TargetName>mimalloc</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">\n    <OutDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n    <TargetExt>.lib</TargetExt>\n    <TargetName>mimalloc</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <OutDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n    <TargetExt>.lib</TargetExt>\n    <TargetName>mimalloc</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">\n    <OutDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n    <TargetExt>.lib</TargetExt>\n    <TargetName>mimalloc</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">\n    <OutDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n    <TargetExt>.lib</TargetExt>\n    <TargetName>mimalloc</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Label=\"Vcpkg\">\n    <VcpkgEnabled>false</VcpkgEnabled>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>Default</ConformanceMode>\n      <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>MI_DEBUG=3;%(PreprocessorDefinitions);</PreprocessorDefinitions>\n      <CompileAs>CompileAsCpp</CompileAs>\n      <SupportJustMyCode>false</SupportJustMyCode>\n      <LanguageStandard>stdcpp20</LanguageStandard>\n    </ClCompile>\n    <Lib>\n      <AdditionalLibraryDirectories>\n      </AdditionalLibraryDirectories>\n      <AdditionalDependencies>\n      </AdditionalDependencies>\n    </Lib>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>Default</ConformanceMode>\n      <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>MI_DEBUG=3;MI_GUARDED=0;%(PreprocessorDefinitions);</PreprocessorDefinitions>\n      <CompileAs>CompileAsCpp</CompileAs>\n      <SupportJustMyCode>false</SupportJustMyCode>\n      <LanguageStandard>stdcpp20</LanguageStandard>\n    </ClCompile>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n    <Link>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n    </Link>\n    <Lib>\n      <AdditionalLibraryDirectories>\n      </AdditionalLibraryDirectories>\n      <AdditionalDependencies>\n      </AdditionalDependencies>\n    </Lib>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>Default</ConformanceMode>\n      <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>MI_DEBUG=3;MI_GUARDED=0;%(PreprocessorDefinitions);</PreprocessorDefinitions>\n      <CompileAs>CompileAsCpp</CompileAs>\n      <SupportJustMyCode>false</SupportJustMyCode>\n      <LanguageStandard>stdcpp20</LanguageStandard>\n    </ClCompile>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n    <Link>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n    </Link>\n    <Lib>\n      <AdditionalLibraryDirectories>\n      </AdditionalLibraryDirectories>\n      <AdditionalDependencies>\n      </AdditionalDependencies>\n    </Lib>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>Default</ConformanceMode>\n      <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>MI_DEBUG=3;MI_GUARDED=0;%(PreprocessorDefinitions);</PreprocessorDefinitions>\n      <CompileAs>CompileAsCpp</CompileAs>\n      <SupportJustMyCode>false</SupportJustMyCode>\n      <LanguageStandard>stdcpp20</LanguageStandard>\n    </ClCompile>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n    <Link>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n    </Link>\n    <Lib>\n      <AdditionalLibraryDirectories>\n      </AdditionalLibraryDirectories>\n      <AdditionalDependencies>\n      </AdditionalDependencies>\n    </Lib>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <ConformanceMode>Default</ConformanceMode>\n      <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>\n      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>\n      <WholeProgramOptimization>false</WholeProgramOptimization>\n      <BufferSecurityCheck>false</BufferSecurityCheck>\n      <InlineFunctionExpansion>Default</InlineFunctionExpansion>\n      <CompileAs>CompileAsCpp</CompileAs>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <LanguageStandard>stdcpp20</LanguageStandard>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n    </Link>\n    <Lib>\n      <AdditionalLibraryDirectories>\n      </AdditionalLibraryDirectories>\n      <AdditionalDependencies>\n      </AdditionalDependencies>\n    </Lib>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <ConformanceMode>Default</ConformanceMode>\n      <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>\n      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>\n      <WholeProgramOptimization>false</WholeProgramOptimization>\n      <BufferSecurityCheck>false</BufferSecurityCheck>\n      <InlineFunctionExpansion>Default</InlineFunctionExpansion>\n      <CompileAs>CompileAsC</CompileAs>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <LanguageStandard>stdcpp20</LanguageStandard>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n    </Link>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n    <Lib>\n      <AdditionalLibraryDirectories>\n      </AdditionalLibraryDirectories>\n      <AdditionalDependencies>\n      </AdditionalDependencies>\n    </Lib>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <ConformanceMode>Default</ConformanceMode>\n      <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>\n      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>\n      <WholeProgramOptimization>false</WholeProgramOptimization>\n      <BufferSecurityCheck>false</BufferSecurityCheck>\n      <InlineFunctionExpansion>Default</InlineFunctionExpansion>\n      <CompileAs>CompileAsCpp</CompileAs>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <LanguageStandard>stdcpp20</LanguageStandard>\n      <EnableEnhancedInstructionSet>CPUExtensionRequirementsARMv81</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n    </Link>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n    <Lib>\n      <AdditionalLibraryDirectories>\n      </AdditionalLibraryDirectories>\n      <AdditionalDependencies>\n      </AdditionalDependencies>\n    </Lib>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <ConformanceMode>Default</ConformanceMode>\n      <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>\n      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>\n      <WholeProgramOptimization>false</WholeProgramOptimization>\n      <BufferSecurityCheck>false</BufferSecurityCheck>\n      <InlineFunctionExpansion>Default</InlineFunctionExpansion>\n      <CompileAs>CompileAsCpp</CompileAs>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <LanguageStandard>stdcpp20</LanguageStandard>\n      <EnableEnhancedInstructionSet>CPUExtensionRequirementsARMv81</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n    </Link>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n    <Lib>\n      <AdditionalLibraryDirectories>\n      </AdditionalLibraryDirectories>\n      <AdditionalDependencies>\n      </AdditionalDependencies>\n    </Lib>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"..\\..\\src\\alloc-aligned.c\">\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">false</ExcludedFromBuild>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\alloc-override.c\">\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">true</ExcludedFromBuild>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\alloc-posix.c\" />\n    <ClCompile Include=\"..\\..\\src\\alloc.c\" />\n    <ClCompile Include=\"..\\..\\src\\arena-abandon.c\">\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">true</ExcludedFromBuild>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\arena.c\" />\n    <ClCompile Include=\"..\\..\\src\\bitmap.c\">\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">false</ExcludedFromBuild>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\free.c\">\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">true</ExcludedFromBuild>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\heap.c\" />\n    <ClCompile Include=\"..\\..\\src\\init.c\" />\n    <ClCompile Include=\"..\\..\\src\\libc.c\" />\n    <ClCompile Include=\"..\\..\\src\\prim\\prim.c\" />\n    <ClCompile Include=\"..\\..\\src\\prim\\windows\\prim.c\">\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">true</ExcludedFromBuild>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\options.c\" />\n    <ClCompile Include=\"..\\..\\src\\page-queue.c\">\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">true</ExcludedFromBuild>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\page.c\" />\n    <ClCompile Include=\"..\\..\\src\\random.c\" />\n    <ClCompile Include=\"..\\..\\src\\segment-map.c\" />\n    <ClCompile Include=\"..\\..\\src\\segment.c\" />\n    <ClCompile Include=\"..\\..\\src\\os.c\" />\n    <ClCompile Include=\"..\\..\\src\\stats.c\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"$(ProjectDir)..\\..\\include\\mimalloc.h\" />\n    <ClInclude Include=\"$(ProjectDir)..\\..\\include\\mimalloc-override.h\" />\n    <ClInclude Include=\"..\\..\\include\\mimalloc-new-delete.h\" />\n    <ClInclude Include=\"..\\..\\include\\mimalloc-stats.h\" />\n    <ClInclude Include=\"..\\..\\include\\mimalloc\\atomic.h\" />\n    <ClInclude Include=\"..\\..\\include\\mimalloc\\internal.h\" />\n    <ClInclude Include=\"..\\..\\include\\mimalloc\\prim.h\" />\n    <ClInclude Include=\"..\\..\\include\\mimalloc\\track.h\" />\n    <ClInclude Include=\"..\\..\\include\\mimalloc\\types.h\" />\n    <ClInclude Include=\"..\\..\\src\\bitmap.h\" />\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\">\n  </ImportGroup>\n</Project>\n"
  },
  {
    "path": "third-party/mimalloc/ide/vs2022/mimalloc-lib.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <ClCompile Include=\"..\\..\\src\\alloc.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\alloc-aligned.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\alloc-override.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\alloc-posix.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\arena.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\bitmap.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\free.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\heap.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\init.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\libc.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\options.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\os.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\page.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\page-queue.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\prim\\windows\\prim.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\prim\\prim.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\random.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\segment.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\segment-map.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\stats.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\arena-abandon.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"..\\..\\include\\mimalloc\\atomic.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n    <ClInclude Include=\"..\\..\\src\\bitmap.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n    <ClInclude Include=\"..\\..\\include\\mimalloc\\internal.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n    <ClInclude Include=\"$(ProjectDir)..\\..\\include\\mimalloc.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n    <ClInclude Include=\"..\\..\\include\\mimalloc-new-delete.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n    <ClInclude Include=\"$(ProjectDir)..\\..\\include\\mimalloc-override.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n    <ClInclude Include=\"..\\..\\include\\mimalloc\\track.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n    <ClInclude Include=\"..\\..\\include\\mimalloc\\types.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n    <ClInclude Include=\"..\\..\\include\\mimalloc\\prim.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n    <ClInclude Include=\"..\\..\\include\\mimalloc-stats.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n  </ItemGroup>\n  <ItemGroup>\n    <Filter Include=\"Headers\">\n      <UniqueIdentifier>{1430490c-e711-4ace-a1b8-36f4d5105873}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"Sources\">\n      <UniqueIdentifier>{461c78ef-04b0-44d1-a0ca-7d488abaa592}</UniqueIdentifier>\n    </Filter>\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "third-party/mimalloc/ide/vs2022/mimalloc-override-dll.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|ARM64\">\n      <Configuration>Debug</Configuration>\n      <Platform>ARM64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|ARM64EC\">\n      <Configuration>Debug</Configuration>\n      <Platform>ARM64EC</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|ARM64\">\n      <Configuration>Release</Configuration>\n      <Platform>ARM64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|ARM64EC\">\n      <Configuration>Release</Configuration>\n      <Platform>ARM64EC</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <VCProjectVersion>15.0</VCProjectVersion>\n    <ProjectGuid>{ABB5EAE7-B3E6-432E-B636-333449892EA7}</ProjectGuid>\n    <RootNamespace>mimalloc-override-dll</RootNamespace>\n    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>\n    <ProjectName>mimalloc-override-dll</ProjectName>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\">\n  </ImportGroup>\n  <ImportGroup Label=\"Shared\">\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <OutDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n    <TargetExt>.dll</TargetExt>\n    <TargetName>mimalloc</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <OutDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n    <TargetExt>.dll</TargetExt>\n    <TargetName>mimalloc</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <OutDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n    <TargetExt>.dll</TargetExt>\n    <TargetName>mimalloc</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">\n    <OutDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n    <TargetExt>.dll</TargetExt>\n    <TargetName>mimalloc</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">\n    <OutDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n    <TargetExt>.dll</TargetExt>\n    <TargetName>mimalloc</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <OutDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n    <TargetExt>.dll</TargetExt>\n    <TargetName>mimalloc</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">\n    <OutDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n    <TargetExt>.dll</TargetExt>\n    <TargetName>mimalloc</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">\n    <OutDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(SolutionDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n    <TargetExt>.dll</TargetExt>\n    <TargetName>mimalloc</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Label=\"Vcpkg\">\n    <VcpkgEnabled>false</VcpkgEnabled>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>MI_SHARED_LIB;MI_SHARED_LIB_EXPORT;MI_MALLOC_OVERRIDE;%(PreprocessorDefinitions);</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <SupportJustMyCode>false</SupportJustMyCode>\n      <CompileAs>CompileAsCpp</CompileAs>\n    </ClCompile>\n    <Link>\n      <AdditionalDependencies>$(ProjectDir)\\..\\..\\bin\\mimalloc-redirect32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <IgnoreSpecificDefaultLibraries>\n      </IgnoreSpecificDefaultLibraries>\n      <ModuleDefinitionFile>\n      </ModuleDefinitionFile>\n      <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <ImportLibrary>$(OutDir)$(TargetName).dll.lib</ImportLibrary>\n      <ProgramDatabaseFile>$(OutDir)$(TargetName).dll.pdb</ProgramDatabaseFile>\n    </Link>\n    <PostBuildEvent>\n      <Command>COPY /Y \"$(ProjectDir)..\\..\\bin\\mimalloc-redirect32.dll\" \"$(OutputPath)\"</Command>\n    </PostBuildEvent>\n    <PostBuildEvent>\n      <Message>Copy mimalloc-redirect32.dll to the output directory</Message>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>MI_DEBUG=4;MI_SHARED_LIB;MI_SHARED_LIB_EXPORT;MI_MALLOC_OVERRIDE;%(PreprocessorDefinitions);</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <SupportJustMyCode>false</SupportJustMyCode>\n      <CompileAs>CompileAsCpp</CompileAs>\n    </ClCompile>\n    <Link>\n      <AdditionalDependencies>$(ProjectDir)\\..\\..\\bin\\mimalloc-redirect.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <IgnoreSpecificDefaultLibraries>\n      </IgnoreSpecificDefaultLibraries>\n      <ModuleDefinitionFile>\n      </ModuleDefinitionFile>\n      <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <ImportLibrary>$(OutDir)$(TargetName).dll.lib</ImportLibrary>\n      <ProgramDatabaseFile>$(OutDir)$(TargetName).dll.pdb</ProgramDatabaseFile>\n    </Link>\n    <PostBuildEvent>\n      <Command>COPY /Y \"$(ProjectDir)..\\..\\bin\\mimalloc-redirect.dll\" \"$(OutputPath)\"</Command>\n    </PostBuildEvent>\n    <PostBuildEvent>\n      <Message>copy mimalloc-redirect.dll to the output directory</Message>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>MI_DEBUG=4;MI_SHARED_LIB;MI_SHARED_LIB_EXPORT;MI_MALLOC_OVERRIDE;%(PreprocessorDefinitions);</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <SupportJustMyCode>false</SupportJustMyCode>\n      <CompileAs>CompileAsCpp</CompileAs>\n    </ClCompile>\n    <Link>\n      <AdditionalDependencies>$(ProjectDir)\\..\\..\\bin\\mimalloc-redirect-arm64.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <IgnoreSpecificDefaultLibraries>\n      </IgnoreSpecificDefaultLibraries>\n      <ModuleDefinitionFile>\n      </ModuleDefinitionFile>\n      <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <ImportLibrary>$(OutDir)$(TargetName).dll.lib</ImportLibrary>\n      <ProgramDatabaseFile>$(OutDir)$(TargetName).dll.pdb</ProgramDatabaseFile>\n    </Link>\n    <PostBuildEvent>\n      <Command>COPY /Y \"$(ProjectDir)..\\..\\bin\\mimalloc-redirect-arm64.dll\" \"$(OutputPath)\"</Command>\n    </PostBuildEvent>\n    <PostBuildEvent>\n      <Message>copy mimalloc-redirect-arm64.dll to the output directory</Message>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>MI_DEBUG=4;MI_SHARED_LIB;MI_SHARED_LIB_EXPORT;MI_MALLOC_OVERRIDE;%(PreprocessorDefinitions);</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <SupportJustMyCode>false</SupportJustMyCode>\n      <CompileAs>CompileAsCpp</CompileAs>\n    </ClCompile>\n    <Link>\n      <AdditionalDependencies>$(ProjectDir)\\..\\..\\bin\\mimalloc-redirect-arm64ec.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <IgnoreSpecificDefaultLibraries>\n      </IgnoreSpecificDefaultLibraries>\n      <ModuleDefinitionFile>\n      </ModuleDefinitionFile>\n      <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <ImportLibrary>$(OutDir)$(TargetName).dll.lib</ImportLibrary>\n      <ProgramDatabaseFile>$(OutDir)$(TargetName).dll.pdb</ProgramDatabaseFile>\n    </Link>\n    <PostBuildEvent>\n      <Command>COPY /Y \"$(ProjectDir)..\\..\\bin\\mimalloc-redirect-arm64ec.dll\" \"$(OutputPath)\"</Command>\n    </PostBuildEvent>\n    <PostBuildEvent>\n      <Message>copy mimalloc-redirect-arm64ec.dll to the output directory</Message>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>MI_SHARED_LIB;MI_SHARED_LIB_EXPORT;MI_MALLOC_OVERRIDE;%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>\n      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>\n      <WholeProgramOptimization>false</WholeProgramOptimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <CompileAs>CompileAsCpp</CompileAs>\n      <BufferSecurityCheck>false</BufferSecurityCheck>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <AdditionalDependencies>$(ProjectDir)\\..\\..\\bin\\mimalloc-redirect32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <ModuleDefinitionFile>\n      </ModuleDefinitionFile>\n      <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <ImportLibrary>$(OutDir)$(TargetName).dll.lib</ImportLibrary>\n      <ProgramDatabaseFile>$(OutDir)$(TargetName).dll.pdb</ProgramDatabaseFile>\n    </Link>\n    <PostBuildEvent>\n      <Command>COPY /Y \"$(ProjectDir)..\\..\\bin\\mimalloc-redirect32.dll\" \"$(OutputPath)\"</Command>\n    </PostBuildEvent>\n    <PostBuildEvent>\n      <Message>Copy mimalloc-redirect32.dll to the output directory</Message>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>MI_SHARED_LIB;MI_SHARED_LIB_EXPORT;MI_MALLOC_OVERRIDE;%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>\n      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>\n      <WholeProgramOptimization>false</WholeProgramOptimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <CompileAs>CompileAsCpp</CompileAs>\n      <BufferSecurityCheck>false</BufferSecurityCheck>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <AdditionalDependencies>$(ProjectDir)\\..\\..\\bin\\mimalloc-redirect.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <ModuleDefinitionFile>\n      </ModuleDefinitionFile>\n      <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <ImportLibrary>$(OutDir)$(TargetName).dll.lib</ImportLibrary>\n      <ProgramDatabaseFile>$(OutDir)$(TargetName).dll.pdb</ProgramDatabaseFile>\n    </Link>\n    <PostBuildEvent>\n      <Command>COPY /Y \"$(ProjectDir)..\\..\\bin\\mimalloc-redirect.dll\" \"$(OutputPath)\"</Command>\n    </PostBuildEvent>\n    <PostBuildEvent>\n      <Message>copy mimalloc-redirect.dll to the output directory</Message>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>MI_SHARED_LIB;MI_SHARED_LIB_EXPORT;MI_MALLOC_OVERRIDE;%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>\n      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>\n      <WholeProgramOptimization>false</WholeProgramOptimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <CompileAs>CompileAsCpp</CompileAs>\n      <BufferSecurityCheck>false</BufferSecurityCheck>\n      <EnableEnhancedInstructionSet>CPUExtensionRequirementsARMv81</EnableEnhancedInstructionSet>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <AdditionalDependencies>$(ProjectDir)\\..\\..\\bin\\mimalloc-redirect-arm64.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <ModuleDefinitionFile>\n      </ModuleDefinitionFile>\n      <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <ImportLibrary>$(OutDir)$(TargetName).dll.lib</ImportLibrary>\n      <ProgramDatabaseFile>$(OutDir)$(TargetName).dll.pdb</ProgramDatabaseFile>\n    </Link>\n    <PostBuildEvent>\n      <Command>COPY /Y \"$(ProjectDir)..\\..\\bin\\mimalloc-redirect-arm64.dll\" \"$(OutputPath)\"</Command>\n    </PostBuildEvent>\n    <PostBuildEvent>\n      <Message>copy mimalloc-redirect-arm64.dll to the output directory</Message>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>MI_SHARED_LIB;MI_SHARED_LIB_EXPORT;MI_MALLOC_OVERRIDE;%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>\n      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>\n      <WholeProgramOptimization>false</WholeProgramOptimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <CompileAs>CompileAsCpp</CompileAs>\n      <BufferSecurityCheck>false</BufferSecurityCheck>\n      <EnableEnhancedInstructionSet>CPUExtensionRequirementsARMv81</EnableEnhancedInstructionSet>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <AdditionalDependencies>$(ProjectDir)\\..\\..\\bin\\mimalloc-redirect-arm64ec.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <ModuleDefinitionFile>\n      </ModuleDefinitionFile>\n      <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <ImportLibrary>$(OutDir)$(TargetName).dll.lib</ImportLibrary>\n      <ProgramDatabaseFile>$(OutDir)$(TargetName).dll.pdb</ProgramDatabaseFile>\n    </Link>\n    <PostBuildEvent>\n      <Command>COPY /Y \"$(ProjectDir)..\\..\\bin\\mimalloc-redirect-arm64ec.dll\" \"$(OutputPath)\"</Command>\n    </PostBuildEvent>\n    <PostBuildEvent>\n      <Message>copy mimalloc-redirect-arm64ec.dll to the output directory</Message>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClInclude Include=\"$(ProjectDir)..\\..\\include\\mimalloc.h\" />\n    <ClInclude Include=\"..\\..\\include\\mimalloc-etw-gen.h\" />\n    <ClInclude Include=\"..\\..\\include\\mimalloc-etw.h\" />\n    <ClInclude Include=\"..\\..\\include\\mimalloc-new-delete.h\" />\n    <ClInclude Include=\"..\\..\\include\\mimalloc-override.h\" />\n    <ClInclude Include=\"..\\..\\include\\mimalloc-stats.h\" />\n    <ClInclude Include=\"..\\..\\include\\mimalloc\\atomic.h\" />\n    <ClInclude Include=\"..\\..\\include\\mimalloc\\internal.h\" />\n    <ClInclude Include=\"..\\..\\include\\mimalloc\\prim.h\" />\n    <ClInclude Include=\"..\\..\\include\\mimalloc\\track.h\" />\n    <ClInclude Include=\"..\\..\\include\\mimalloc\\types.h\" />\n    <ClInclude Include=\"..\\..\\src\\bitmap.h\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"..\\..\\src\\alloc-aligned.c\">\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">false</ExcludedFromBuild>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\alloc-override.c\">\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">true</ExcludedFromBuild>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\alloc-posix.c\" />\n    <ClCompile Include=\"..\\..\\src\\alloc.c\" />\n    <ClCompile Include=\"..\\..\\src\\arena-abandon.c\">\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">true</ExcludedFromBuild>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\arena.c\" />\n    <ClCompile Include=\"..\\..\\src\\bitmap.c\" />\n    <ClCompile Include=\"..\\..\\src\\heap.c\" />\n    <ClCompile Include=\"..\\..\\src\\init.c\" />\n    <ClCompile Include=\"..\\..\\src\\libc.c\" />\n    <ClCompile Include=\"..\\..\\src\\prim\\prim.c\" />\n    <ClCompile Include=\"..\\..\\src\\prim\\windows\\prim.c\">\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">true</ExcludedFromBuild>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\options.c\" />\n    <ClCompile Include=\"..\\..\\src\\os.c\" />\n    <ClCompile Include=\"..\\..\\src\\page-queue.c\">\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">true</ExcludedFromBuild>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\page.c\" />\n    <ClCompile Include=\"..\\..\\src\\random.c\" />\n    <ClCompile Include=\"..\\..\\src\\segment-map.c\" />\n    <ClCompile Include=\"..\\..\\src\\segment.c\" />\n    <ClCompile Include=\"..\\..\\src\\stats.c\" />\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\">\n  </ImportGroup>\n</Project>"
  },
  {
    "path": "third-party/mimalloc/ide/vs2022/mimalloc-override-dll.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <ClCompile Include=\"..\\..\\src\\alloc.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\alloc-aligned.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\alloc-override.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\alloc-posix.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\arena.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\bitmap.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\heap.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\init.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\libc.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\options.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\os.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\page.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\page-queue.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\prim\\windows\\prim.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\prim\\prim.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\random.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\segment.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\segment-map.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\stats.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\src\\arena-abandon.c\">\n      <Filter>Sources</Filter>\n    </ClCompile>\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"..\\..\\include\\mimalloc\\atomic.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n    <ClInclude Include=\"..\\..\\src\\bitmap.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n    <ClInclude Include=\"..\\..\\include\\mimalloc\\internal.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n    <ClInclude Include=\"$(ProjectDir)..\\..\\include\\mimalloc.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n    <ClInclude Include=\"..\\..\\include\\mimalloc-etw.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n    <ClInclude Include=\"..\\..\\include\\mimalloc-etw-gen.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n    <ClInclude Include=\"..\\..\\include\\mimalloc-new-delete.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n    <ClInclude Include=\"..\\..\\include\\mimalloc-override.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n    <ClInclude Include=\"..\\..\\include\\mimalloc\\track.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n    <ClInclude Include=\"..\\..\\include\\mimalloc\\types.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n    <ClInclude Include=\"..\\..\\include\\mimalloc\\prim.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n    <ClInclude Include=\"..\\..\\include\\mimalloc-stats.h\">\n      <Filter>Headers</Filter>\n    </ClInclude>\n  </ItemGroup>\n  <ItemGroup>\n    <Filter Include=\"Headers\">\n      <UniqueIdentifier>{262c6c21-e270-4ba6-bd63-4ac999307e4e}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"Sources\">\n      <UniqueIdentifier>{94b40bdc-a741-45dd-81aa-c05fabcd2970}</UniqueIdentifier>\n    </Filter>\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "third-party/mimalloc/ide/vs2022/mimalloc-override-test-dep.vcxproj",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|ARM64\">\n      <Configuration>Debug</Configuration>\n      <Platform>ARM64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|ARM64EC\">\n      <Configuration>Debug</Configuration>\n      <Platform>ARM64EC</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|ARM64\">\n      <Configuration>Release</Configuration>\n      <Platform>ARM64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|ARM64EC\">\n      <Configuration>Release</Configuration>\n      <Platform>ARM64EC</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <VCProjectVersion>15.0</VCProjectVersion>\n    <ProjectGuid>{FEF7869F-750E-4C21-A04D-22707CC66879}</ProjectGuid>\n    <RootNamespace>mimalloc-test-override-dep</RootNamespace>\n    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>\n    <ProjectName>mimalloc-test-override-dep</ProjectName>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\">\n  </ImportGroup>\n  <ImportGroup Label=\"Shared\">\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Label=\"Vcpkg\">\n    <VcpkgEnabled>false</VcpkgEnabled>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <CompileAs>Default</CompileAs>\n      <SupportJustMyCode>false</SupportJustMyCode>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n      <AdditionalDependencies>kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n    <PostBuildEvent />\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <CompileAs>Default</CompileAs>\n      <SupportJustMyCode>false</SupportJustMyCode>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n      <AdditionalDependencies>kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n    <PostBuildEvent />\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <CompileAs>Default</CompileAs>\n      <SupportJustMyCode>false</SupportJustMyCode>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n      <AdditionalDependencies>kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n    <PostBuildEvent />\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <CompileAs>Default</CompileAs>\n      <SupportJustMyCode>false</SupportJustMyCode>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n      <AdditionalDependencies>kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n    <PostBuildEvent />\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <SubSystem>Console</SubSystem>\n      <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <SubSystem>Console</SubSystem>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n      <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <SubSystem>Console</SubSystem>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n      <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <SubSystem>Console</SubSystem>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n      <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"..\\..\\test\\main-override-dep.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"..\\..\\test\\main-override-dep.h\" />\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\">\n  </ImportGroup>\n</Project>"
  },
  {
    "path": "third-party/mimalloc/ide/vs2022/mimalloc-override-test.vcxproj",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|ARM64\">\n      <Configuration>Debug</Configuration>\n      <Platform>ARM64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|ARM64EC\">\n      <Configuration>Debug</Configuration>\n      <Platform>ARM64EC</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|ARM64\">\n      <Configuration>Release</Configuration>\n      <Platform>ARM64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|ARM64EC\">\n      <Configuration>Release</Configuration>\n      <Platform>ARM64EC</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <VCProjectVersion>15.0</VCProjectVersion>\n    <ProjectGuid>{FEF7868F-750E-4C21-A04D-22707CC66879}</ProjectGuid>\n    <RootNamespace>mimalloc-override-test</RootNamespace>\n    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>\n    <ProjectName>mimalloc-test-override</ProjectName>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\">\n  </ImportGroup>\n  <ImportGroup Label=\"Shared\">\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Label=\"Vcpkg\">\n    <VcpkgEnabled>false</VcpkgEnabled>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <CompileAs>Default</CompileAs>\n      <SupportJustMyCode>false</SupportJustMyCode>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n      <AdditionalDependencies>kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n    <PostBuildEvent />\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <CompileAs>Default</CompileAs>\n      <SupportJustMyCode>false</SupportJustMyCode>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n      <AdditionalDependencies>kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n    <PostBuildEvent />\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <CompileAs>Default</CompileAs>\n      <SupportJustMyCode>false</SupportJustMyCode>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n      <AdditionalDependencies>kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n    <PostBuildEvent />\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <CompileAs>Default</CompileAs>\n      <SupportJustMyCode>false</SupportJustMyCode>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n      <AdditionalDependencies>kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n    <PostBuildEvent />\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <SubSystem>Console</SubSystem>\n      <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <SubSystem>Console</SubSystem>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n      <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <SubSystem>Console</SubSystem>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n      <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <SubSystem>Console</SubSystem>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n      <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"..\\..\\test\\main-override.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"mimalloc-override-dll.vcxproj\">\n      <Project>{abb5eae7-b3e6-432e-b636-333449892ea7}</Project>\n    </ProjectReference>\n    <ProjectReference Include=\"mimalloc-override-test-dep.vcxproj\">\n      <Project>{fef7869f-750e-4c21-a04d-22707cc66879}</Project>\n    </ProjectReference>\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\">\n  </ImportGroup>\n</Project>"
  },
  {
    "path": "third-party/mimalloc/ide/vs2022/mimalloc-test-api.vcxproj",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|ARM64\">\n      <Configuration>Debug</Configuration>\n      <Platform>ARM64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|ARM64EC\">\n      <Configuration>Debug</Configuration>\n      <Platform>ARM64EC</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|ARM64\">\n      <Configuration>Release</Configuration>\n      <Platform>ARM64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|ARM64EC\">\n      <Configuration>Release</Configuration>\n      <Platform>ARM64EC</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <VCProjectVersion>15.0</VCProjectVersion>\n    <ProjectGuid>{FFF7958F-750E-4C21-A04D-22707CC66878}</ProjectGuid>\n    <RootNamespace>mimalloc-test-api</RootNamespace>\n    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>\n    <ProjectName>mimalloc-test-api</ProjectName>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\">\n  </ImportGroup>\n  <ImportGroup Label=\"Shared\">\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Label=\"Vcpkg\">\n    <VcpkgEnabled>false</VcpkgEnabled>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"..\\..\\test\\test-api-fill.c\">\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">true</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">true</ExcludedFromBuild>\n    </ClCompile>\n    <ClCompile Include=\"..\\..\\test\\test-api.c\">\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">false</ExcludedFromBuild>\n    </ClCompile>\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"mimalloc-lib.vcxproj\">\n      <Project>{abb5eae7-b3e6-432e-b636-333449892ea6}</Project>\n    </ProjectReference>\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\">\n  </ImportGroup>\n</Project>"
  },
  {
    "path": "third-party/mimalloc/ide/vs2022/mimalloc-test-stress.vcxproj",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|ARM64\">\n      <Configuration>Debug</Configuration>\n      <Platform>ARM64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|ARM64EC\">\n      <Configuration>Debug</Configuration>\n      <Platform>ARM64EC</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|ARM64\">\n      <Configuration>Release</Configuration>\n      <Platform>ARM64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|ARM64EC\">\n      <Configuration>Release</Configuration>\n      <Platform>ARM64EC</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <VCProjectVersion>15.0</VCProjectVersion>\n    <ProjectGuid>{FEF7958F-750E-4C21-A04D-22707CC66878}</ProjectGuid>\n    <RootNamespace>mimalloc-test-stress</RootNamespace>\n    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>\n    <ProjectName>mimalloc-test-stress</ProjectName>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\">\n  </ImportGroup>\n  <ImportGroup Label=\"Shared\">\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Label=\"Vcpkg\">\n    <VcpkgEnabled>false</VcpkgEnabled>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <EnableEnhancedInstructionSet>CPUExtensionRequirementsARMv81</EnableEnhancedInstructionSet>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <EnableEnhancedInstructionSet>CPUExtensionRequirementsARMv81</EnableEnhancedInstructionSet>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"..\\..\\test\\test-stress.c\">\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">false</ExcludedFromBuild>\n    </ClCompile>\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"mimalloc-lib.vcxproj\">\n      <Project>{abb5eae7-b3e6-432e-b636-333449892ea6}</Project>\n    </ProjectReference>\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\">\n  </ImportGroup>\n</Project>"
  },
  {
    "path": "third-party/mimalloc/ide/vs2022/mimalloc-test.vcxproj",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|ARM64\">\n      <Configuration>Debug</Configuration>\n      <Platform>ARM64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|ARM64EC\">\n      <Configuration>Debug</Configuration>\n      <Platform>ARM64EC</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|ARM64\">\n      <Configuration>Release</Configuration>\n      <Platform>ARM64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|ARM64EC\">\n      <Configuration>Release</Configuration>\n      <Platform>ARM64EC</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <VCProjectVersion>15.0</VCProjectVersion>\n    <ProjectGuid>{FEF7858F-750E-4C21-A04D-22707CC66878}</ProjectGuid>\n    <RootNamespace>mimalloctest</RootNamespace>\n    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>\n    <ProjectName>mimalloc-test-static</ProjectName>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\">\n  </ImportGroup>\n  <ImportGroup Label=\"Shared\">\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">\n    <OutDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>$(ProjectDir)..\\..\\out\\msvc-$(Platform)\\$(ProjectName)\\$(Configuration)\\</IntDir>\n  </PropertyGroup>\n  <PropertyGroup Label=\"Vcpkg\">\n    <VcpkgEnabled>false</VcpkgEnabled>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <LanguageStandard>stdcpp17</LanguageStandard>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <LanguageStandard>stdcpp17</LanguageStandard>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <LanguageStandard>stdcpp17</LanguageStandard>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64EC'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <LanguageStandard>stdcpp17</LanguageStandard>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <LanguageStandard>stdcpp17</LanguageStandard>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <LanguageStandard>stdcpp17</LanguageStandard>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <LanguageStandard>stdcpp17</LanguageStandard>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64EC'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n      <AdditionalIncludeDirectories>..\\..\\include</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>\n      <LanguageStandard>stdcpp17</LanguageStandard>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <SubSystem>Console</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"..\\..\\test\\main-override-static.c\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"mimalloc-lib.vcxproj\">\n      <Project>{abb5eae7-b3e6-432e-b636-333449892ea6}</Project>\n    </ProjectReference>\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\">\n  </ImportGroup>\n</Project>"
  },
  {
    "path": "third-party/mimalloc/ide/vs2022/mimalloc.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio Version 17\r\nVisualStudioVersion = 17.12.35527.113\r\nMinimumVisualStudioVersion = 10.0.40219.1\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"mimalloc-lib\", \"mimalloc-lib.vcxproj\", \"{ABB5EAE7-B3E6-432E-B636-333449892EA6}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"mimalloc-test-static\", \"mimalloc-test.vcxproj\", \"{FEF7858F-750E-4C21-A04D-22707CC66878}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"mimalloc-override-dll\", \"mimalloc-override-dll.vcxproj\", \"{ABB5EAE7-B3E6-432E-B636-333449892EA7}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"mimalloc-test-override-dep\", \"mimalloc-override-test-dep.vcxproj\", \"{FEF7869F-750E-4C21-A04D-22707CC66879}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"mimalloc-test-override\", \"mimalloc-override-test.vcxproj\", \"{FEF7868F-750E-4C21-A04D-22707CC66879}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"mimalloc-test-stress\", \"mimalloc-test-stress.vcxproj\", \"{FEF7958F-750E-4C21-A04D-22707CC66878}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"mimalloc-test-api\", \"mimalloc-test-api.vcxproj\", \"{FFF7958F-750E-4C21-A04D-22707CC66878}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|ARM64 = Debug|ARM64\r\n\t\tDebug|ARM64EC = Debug|ARM64EC\r\n\t\tDebug|x64 = Debug|x64\r\n\t\tDebug|x86 = Debug|x86\r\n\t\tRelease|ARM64 = Release|ARM64\r\n\t\tRelease|ARM64EC = Release|ARM64EC\r\n\t\tRelease|x64 = Release|x64\r\n\t\tRelease|x86 = Release|x86\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA6}.Debug|ARM64.ActiveCfg = Debug|ARM64\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA6}.Debug|ARM64.Build.0 = Debug|ARM64\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA6}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA6}.Debug|ARM64EC.Build.0 = Debug|ARM64EC\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA6}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA6}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA6}.Debug|x86.ActiveCfg = Debug|Win32\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA6}.Debug|x86.Build.0 = Debug|Win32\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA6}.Release|ARM64.ActiveCfg = Release|ARM64\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA6}.Release|ARM64.Build.0 = Release|ARM64\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA6}.Release|ARM64EC.ActiveCfg = Release|ARM64EC\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA6}.Release|ARM64EC.Build.0 = Release|ARM64EC\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA6}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA6}.Release|x64.Build.0 = Release|x64\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA6}.Release|x86.ActiveCfg = Release|Win32\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA6}.Release|x86.Build.0 = Release|Win32\r\n\t\t{FEF7858F-750E-4C21-A04D-22707CC66878}.Debug|ARM64.ActiveCfg = Debug|ARM64\r\n\t\t{FEF7858F-750E-4C21-A04D-22707CC66878}.Debug|ARM64.Build.0 = Debug|ARM64\r\n\t\t{FEF7858F-750E-4C21-A04D-22707CC66878}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC\r\n\t\t{FEF7858F-750E-4C21-A04D-22707CC66878}.Debug|ARM64EC.Build.0 = Debug|ARM64EC\r\n\t\t{FEF7858F-750E-4C21-A04D-22707CC66878}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{FEF7858F-750E-4C21-A04D-22707CC66878}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{FEF7858F-750E-4C21-A04D-22707CC66878}.Debug|x86.ActiveCfg = Debug|Win32\r\n\t\t{FEF7858F-750E-4C21-A04D-22707CC66878}.Debug|x86.Build.0 = Debug|Win32\r\n\t\t{FEF7858F-750E-4C21-A04D-22707CC66878}.Release|ARM64.ActiveCfg = Release|ARM64\r\n\t\t{FEF7858F-750E-4C21-A04D-22707CC66878}.Release|ARM64.Build.0 = Release|ARM64\r\n\t\t{FEF7858F-750E-4C21-A04D-22707CC66878}.Release|ARM64EC.ActiveCfg = Release|ARM64EC\r\n\t\t{FEF7858F-750E-4C21-A04D-22707CC66878}.Release|ARM64EC.Build.0 = Release|ARM64EC\r\n\t\t{FEF7858F-750E-4C21-A04D-22707CC66878}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{FEF7858F-750E-4C21-A04D-22707CC66878}.Release|x64.Build.0 = Release|x64\r\n\t\t{FEF7858F-750E-4C21-A04D-22707CC66878}.Release|x86.ActiveCfg = Release|Win32\r\n\t\t{FEF7858F-750E-4C21-A04D-22707CC66878}.Release|x86.Build.0 = Release|Win32\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA7}.Debug|ARM64.ActiveCfg = Debug|ARM64\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA7}.Debug|ARM64.Build.0 = Debug|ARM64\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA7}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA7}.Debug|ARM64EC.Build.0 = Debug|ARM64EC\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA7}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA7}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA7}.Debug|x86.ActiveCfg = Debug|Win32\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA7}.Debug|x86.Build.0 = Debug|Win32\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA7}.Release|ARM64.ActiveCfg = Release|ARM64\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA7}.Release|ARM64.Build.0 = Release|ARM64\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA7}.Release|ARM64EC.ActiveCfg = Release|ARM64EC\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA7}.Release|ARM64EC.Build.0 = Release|ARM64EC\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA7}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA7}.Release|x64.Build.0 = Release|x64\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA7}.Release|x86.ActiveCfg = Release|Win32\r\n\t\t{ABB5EAE7-B3E6-432E-B636-333449892EA7}.Release|x86.Build.0 = Release|Win32\r\n\t\t{FEF7869F-750E-4C21-A04D-22707CC66879}.Debug|ARM64.ActiveCfg = Debug|ARM64\r\n\t\t{FEF7869F-750E-4C21-A04D-22707CC66879}.Debug|ARM64.Build.0 = Debug|ARM64\r\n\t\t{FEF7869F-750E-4C21-A04D-22707CC66879}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC\r\n\t\t{FEF7869F-750E-4C21-A04D-22707CC66879}.Debug|ARM64EC.Build.0 = Debug|ARM64EC\r\n\t\t{FEF7869F-750E-4C21-A04D-22707CC66879}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{FEF7869F-750E-4C21-A04D-22707CC66879}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{FEF7869F-750E-4C21-A04D-22707CC66879}.Debug|x86.ActiveCfg = Debug|Win32\r\n\t\t{FEF7869F-750E-4C21-A04D-22707CC66879}.Debug|x86.Build.0 = Debug|Win32\r\n\t\t{FEF7869F-750E-4C21-A04D-22707CC66879}.Release|ARM64.ActiveCfg = Release|ARM64\r\n\t\t{FEF7869F-750E-4C21-A04D-22707CC66879}.Release|ARM64.Build.0 = Release|ARM64\r\n\t\t{FEF7869F-750E-4C21-A04D-22707CC66879}.Release|ARM64EC.ActiveCfg = Release|ARM64EC\r\n\t\t{FEF7869F-750E-4C21-A04D-22707CC66879}.Release|ARM64EC.Build.0 = Release|ARM64EC\r\n\t\t{FEF7869F-750E-4C21-A04D-22707CC66879}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{FEF7869F-750E-4C21-A04D-22707CC66879}.Release|x64.Build.0 = Release|x64\r\n\t\t{FEF7869F-750E-4C21-A04D-22707CC66879}.Release|x86.ActiveCfg = Release|Win32\r\n\t\t{FEF7869F-750E-4C21-A04D-22707CC66879}.Release|x86.Build.0 = Release|Win32\r\n\t\t{FEF7868F-750E-4C21-A04D-22707CC66879}.Debug|ARM64.ActiveCfg = Debug|ARM64\r\n\t\t{FEF7868F-750E-4C21-A04D-22707CC66879}.Debug|ARM64.Build.0 = Debug|ARM64\r\n\t\t{FEF7868F-750E-4C21-A04D-22707CC66879}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC\r\n\t\t{FEF7868F-750E-4C21-A04D-22707CC66879}.Debug|ARM64EC.Build.0 = Debug|ARM64EC\r\n\t\t{FEF7868F-750E-4C21-A04D-22707CC66879}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{FEF7868F-750E-4C21-A04D-22707CC66879}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{FEF7868F-750E-4C21-A04D-22707CC66879}.Debug|x86.ActiveCfg = Debug|Win32\r\n\t\t{FEF7868F-750E-4C21-A04D-22707CC66879}.Debug|x86.Build.0 = Debug|Win32\r\n\t\t{FEF7868F-750E-4C21-A04D-22707CC66879}.Release|ARM64.ActiveCfg = Release|ARM64\r\n\t\t{FEF7868F-750E-4C21-A04D-22707CC66879}.Release|ARM64.Build.0 = Release|ARM64\r\n\t\t{FEF7868F-750E-4C21-A04D-22707CC66879}.Release|ARM64EC.ActiveCfg = Release|ARM64EC\r\n\t\t{FEF7868F-750E-4C21-A04D-22707CC66879}.Release|ARM64EC.Build.0 = Release|ARM64EC\r\n\t\t{FEF7868F-750E-4C21-A04D-22707CC66879}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{FEF7868F-750E-4C21-A04D-22707CC66879}.Release|x64.Build.0 = Release|x64\r\n\t\t{FEF7868F-750E-4C21-A04D-22707CC66879}.Release|x86.ActiveCfg = Release|Win32\r\n\t\t{FEF7868F-750E-4C21-A04D-22707CC66879}.Release|x86.Build.0 = Release|Win32\r\n\t\t{FEF7958F-750E-4C21-A04D-22707CC66878}.Debug|ARM64.ActiveCfg = Debug|ARM64\r\n\t\t{FEF7958F-750E-4C21-A04D-22707CC66878}.Debug|ARM64.Build.0 = Debug|ARM64\r\n\t\t{FEF7958F-750E-4C21-A04D-22707CC66878}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC\r\n\t\t{FEF7958F-750E-4C21-A04D-22707CC66878}.Debug|ARM64EC.Build.0 = Debug|ARM64EC\r\n\t\t{FEF7958F-750E-4C21-A04D-22707CC66878}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{FEF7958F-750E-4C21-A04D-22707CC66878}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{FEF7958F-750E-4C21-A04D-22707CC66878}.Debug|x86.ActiveCfg = Debug|Win32\r\n\t\t{FEF7958F-750E-4C21-A04D-22707CC66878}.Debug|x86.Build.0 = Debug|Win32\r\n\t\t{FEF7958F-750E-4C21-A04D-22707CC66878}.Release|ARM64.ActiveCfg = Release|ARM64\r\n\t\t{FEF7958F-750E-4C21-A04D-22707CC66878}.Release|ARM64.Build.0 = Release|ARM64\r\n\t\t{FEF7958F-750E-4C21-A04D-22707CC66878}.Release|ARM64EC.ActiveCfg = Release|ARM64EC\r\n\t\t{FEF7958F-750E-4C21-A04D-22707CC66878}.Release|ARM64EC.Build.0 = Release|ARM64EC\r\n\t\t{FEF7958F-750E-4C21-A04D-22707CC66878}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{FEF7958F-750E-4C21-A04D-22707CC66878}.Release|x64.Build.0 = Release|x64\r\n\t\t{FEF7958F-750E-4C21-A04D-22707CC66878}.Release|x86.ActiveCfg = Release|Win32\r\n\t\t{FEF7958F-750E-4C21-A04D-22707CC66878}.Release|x86.Build.0 = Release|Win32\r\n\t\t{FFF7958F-750E-4C21-A04D-22707CC66878}.Debug|ARM64.ActiveCfg = Debug|ARM64\r\n\t\t{FFF7958F-750E-4C21-A04D-22707CC66878}.Debug|ARM64.Build.0 = Debug|ARM64\r\n\t\t{FFF7958F-750E-4C21-A04D-22707CC66878}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC\r\n\t\t{FFF7958F-750E-4C21-A04D-22707CC66878}.Debug|ARM64EC.Build.0 = Debug|ARM64EC\r\n\t\t{FFF7958F-750E-4C21-A04D-22707CC66878}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{FFF7958F-750E-4C21-A04D-22707CC66878}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{FFF7958F-750E-4C21-A04D-22707CC66878}.Debug|x86.ActiveCfg = Debug|Win32\r\n\t\t{FFF7958F-750E-4C21-A04D-22707CC66878}.Debug|x86.Build.0 = Debug|Win32\r\n\t\t{FFF7958F-750E-4C21-A04D-22707CC66878}.Release|ARM64.ActiveCfg = Release|ARM64\r\n\t\t{FFF7958F-750E-4C21-A04D-22707CC66878}.Release|ARM64.Build.0 = Release|ARM64\r\n\t\t{FFF7958F-750E-4C21-A04D-22707CC66878}.Release|ARM64EC.ActiveCfg = Release|ARM64EC\r\n\t\t{FFF7958F-750E-4C21-A04D-22707CC66878}.Release|ARM64EC.Build.0 = Release|ARM64EC\r\n\t\t{FFF7958F-750E-4C21-A04D-22707CC66878}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{FFF7958F-750E-4C21-A04D-22707CC66878}.Release|x64.Build.0 = Release|x64\r\n\t\t{FFF7958F-750E-4C21-A04D-22707CC66878}.Release|x86.ActiveCfg = Release|Win32\r\n\t\t{FFF7958F-750E-4C21-A04D-22707CC66878}.Release|x86.Build.0 = Release|Win32\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\n\tGlobalSection(ExtensibilityGlobals) = postSolution\r\n\t\tSolutionGuid = {4297F93D-486A-4243-995F-7D32F59AE82A}\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "third-party/mimalloc/include/mimalloc/atomic.h",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2024 Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#pragma once\n#ifndef MIMALLOC_ATOMIC_H\n#define MIMALLOC_ATOMIC_H\n\n// include windows.h or pthreads.h\n#if defined(_WIN32)\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#include <windows.h>\n#elif !defined(__wasi__) && (!defined(__EMSCRIPTEN__) || defined(__EMSCRIPTEN_PTHREADS__))\n#define  MI_USE_PTHREADS\n#include <pthread.h>\n#endif\n\n// --------------------------------------------------------------------------------------------\n// Atomics\n// We need to be portable between C, C++, and MSVC.\n// We base the primitives on the C/C++ atomics and create a minimal wrapper for MSVC in C compilation mode.\n// This is why we try to use only `uintptr_t` and `<type>*` as atomic types.\n// To gain better insight in the range of used atomics, we use explicitly named memory order operations\n// instead of passing the memory order as a parameter.\n// -----------------------------------------------------------------------------------------------\n\n#if defined(__cplusplus)\n// Use C++ atomics\n#include <atomic>\n#define  _Atomic(tp)              std::atomic<tp>\n#define  mi_atomic(name)          std::atomic_##name\n#define  mi_memory_order(name)    std::memory_order_##name\n#if (__cplusplus >= 202002L)      // c++20, see issue #571\n #define MI_ATOMIC_VAR_INIT(x)    x\n#elif !defined(ATOMIC_VAR_INIT)\n #define MI_ATOMIC_VAR_INIT(x)    x\n#else\n #define MI_ATOMIC_VAR_INIT(x)    ATOMIC_VAR_INIT(x)\n#endif\n#elif defined(_MSC_VER)\n// Use MSVC C wrapper for C11 atomics\n#define  _Atomic(tp)              tp\n#define  MI_ATOMIC_VAR_INIT(x)    x\n#define  mi_atomic(name)          mi_atomic_##name\n#define  mi_memory_order(name)    mi_memory_order_##name\n#else\n// Use C11 atomics\n#include <stdatomic.h>\n#define  mi_atomic(name)          atomic_##name\n#define  mi_memory_order(name)    memory_order_##name\n#if (__STDC_VERSION__ >= 201710L) // c17, see issue #735\n #define MI_ATOMIC_VAR_INIT(x)    x\n#elif !defined(ATOMIC_VAR_INIT)\n #define MI_ATOMIC_VAR_INIT(x)    x\n#else\n #define MI_ATOMIC_VAR_INIT(x)    ATOMIC_VAR_INIT(x)\n#endif\n#endif\n\n// Various defines for all used memory orders in mimalloc\n#define mi_atomic_cas_weak(p,expected,desired,mem_success,mem_fail)  \\\n  mi_atomic(compare_exchange_weak_explicit)(p,expected,desired,mem_success,mem_fail)\n\n#define mi_atomic_cas_strong(p,expected,desired,mem_success,mem_fail)  \\\n  mi_atomic(compare_exchange_strong_explicit)(p,expected,desired,mem_success,mem_fail)\n\n#define mi_atomic_load_acquire(p)                mi_atomic(load_explicit)(p,mi_memory_order(acquire))\n#define mi_atomic_load_relaxed(p)                mi_atomic(load_explicit)(p,mi_memory_order(relaxed))\n#define mi_atomic_store_release(p,x)             mi_atomic(store_explicit)(p,x,mi_memory_order(release))\n#define mi_atomic_store_relaxed(p,x)             mi_atomic(store_explicit)(p,x,mi_memory_order(relaxed))\n#define mi_atomic_exchange_relaxed(p,x)          mi_atomic(exchange_explicit)(p,x,mi_memory_order(relaxed))\n#define mi_atomic_exchange_release(p,x)          mi_atomic(exchange_explicit)(p,x,mi_memory_order(release))\n#define mi_atomic_exchange_acq_rel(p,x)          mi_atomic(exchange_explicit)(p,x,mi_memory_order(acq_rel))\n#define mi_atomic_cas_weak_release(p,exp,des)    mi_atomic_cas_weak(p,exp,des,mi_memory_order(release),mi_memory_order(relaxed))\n#define mi_atomic_cas_weak_acq_rel(p,exp,des)    mi_atomic_cas_weak(p,exp,des,mi_memory_order(acq_rel),mi_memory_order(acquire))\n#define mi_atomic_cas_strong_release(p,exp,des)  mi_atomic_cas_strong(p,exp,des,mi_memory_order(release),mi_memory_order(relaxed))\n#define mi_atomic_cas_strong_acq_rel(p,exp,des)  mi_atomic_cas_strong(p,exp,des,mi_memory_order(acq_rel),mi_memory_order(acquire))\n\n#define mi_atomic_add_relaxed(p,x)               mi_atomic(fetch_add_explicit)(p,x,mi_memory_order(relaxed))\n#define mi_atomic_sub_relaxed(p,x)               mi_atomic(fetch_sub_explicit)(p,x,mi_memory_order(relaxed))\n#define mi_atomic_add_acq_rel(p,x)               mi_atomic(fetch_add_explicit)(p,x,mi_memory_order(acq_rel))\n#define mi_atomic_sub_acq_rel(p,x)               mi_atomic(fetch_sub_explicit)(p,x,mi_memory_order(acq_rel))\n#define mi_atomic_and_acq_rel(p,x)               mi_atomic(fetch_and_explicit)(p,x,mi_memory_order(acq_rel))\n#define mi_atomic_or_acq_rel(p,x)                mi_atomic(fetch_or_explicit)(p,x,mi_memory_order(acq_rel))\n\n#define mi_atomic_increment_relaxed(p)           mi_atomic_add_relaxed(p,(uintptr_t)1)\n#define mi_atomic_decrement_relaxed(p)           mi_atomic_sub_relaxed(p,(uintptr_t)1)\n#define mi_atomic_increment_acq_rel(p)           mi_atomic_add_acq_rel(p,(uintptr_t)1)\n#define mi_atomic_decrement_acq_rel(p)           mi_atomic_sub_acq_rel(p,(uintptr_t)1)\n\nstatic inline void mi_atomic_yield(void);\nstatic inline intptr_t mi_atomic_addi(_Atomic(intptr_t)*p, intptr_t add);\nstatic inline intptr_t mi_atomic_subi(_Atomic(intptr_t)*p, intptr_t sub);\n\n\n#if defined(__cplusplus) || !defined(_MSC_VER)\n\n// In C++/C11 atomics we have polymorphic atomics so can use the typed `ptr` variants (where `tp` is the type of atomic value)\n// We use these macros so we can provide a typed wrapper in MSVC in C compilation mode as well\n#define mi_atomic_load_ptr_acquire(tp,p)                mi_atomic_load_acquire(p)\n#define mi_atomic_load_ptr_relaxed(tp,p)                mi_atomic_load_relaxed(p)\n\n// In C++ we need to add casts to help resolve templates if NULL is passed\n#if defined(__cplusplus)\n#define mi_atomic_store_ptr_release(tp,p,x)             mi_atomic_store_release(p,(tp*)x)\n#define mi_atomic_store_ptr_relaxed(tp,p,x)             mi_atomic_store_relaxed(p,(tp*)x)\n#define mi_atomic_cas_ptr_weak_release(tp,p,exp,des)    mi_atomic_cas_weak_release(p,exp,(tp*)des)\n#define mi_atomic_cas_ptr_weak_acq_rel(tp,p,exp,des)    mi_atomic_cas_weak_acq_rel(p,exp,(tp*)des)\n#define mi_atomic_cas_ptr_strong_release(tp,p,exp,des)  mi_atomic_cas_strong_release(p,exp,(tp*)des)\n#define mi_atomic_exchange_ptr_relaxed(tp,p,x)          mi_atomic_exchange_relaxed(p,(tp*)x)\n#define mi_atomic_exchange_ptr_release(tp,p,x)          mi_atomic_exchange_release(p,(tp*)x)\n#define mi_atomic_exchange_ptr_acq_rel(tp,p,x)          mi_atomic_exchange_acq_rel(p,(tp*)x)\n#else\n#define mi_atomic_store_ptr_release(tp,p,x)             mi_atomic_store_release(p,x)\n#define mi_atomic_store_ptr_relaxed(tp,p,x)             mi_atomic_store_relaxed(p,x)\n#define mi_atomic_cas_ptr_weak_release(tp,p,exp,des)    mi_atomic_cas_weak_release(p,exp,des)\n#define mi_atomic_cas_ptr_weak_acq_rel(tp,p,exp,des)    mi_atomic_cas_weak_acq_rel(p,exp,des)\n#define mi_atomic_cas_ptr_strong_release(tp,p,exp,des)  mi_atomic_cas_strong_release(p,exp,des)\n#define mi_atomic_exchange_ptr_relaxed(tp,p,x)          mi_atomic_exchange_relaxed(p,x)\n#define mi_atomic_exchange_ptr_release(tp,p,x)          mi_atomic_exchange_release(p,x)\n#define mi_atomic_exchange_ptr_acq_rel(tp,p,x)          mi_atomic_exchange_acq_rel(p,x)\n#endif\n\n// These are used by the statistics\nstatic inline int64_t mi_atomic_addi64_relaxed(volatile int64_t* p, int64_t add) {\n  return mi_atomic(fetch_add_explicit)((_Atomic(int64_t)*)p, add, mi_memory_order(relaxed));\n}\nstatic inline void mi_atomic_void_addi64_relaxed(volatile int64_t* p, const volatile int64_t* padd) {\n  const int64_t add = mi_atomic_load_relaxed((_Atomic(int64_t)*)padd);\n  if (add != 0) {\n    mi_atomic(fetch_add_explicit)((_Atomic(int64_t)*)p, add, mi_memory_order(relaxed));\n  }\n}\nstatic inline void mi_atomic_maxi64_relaxed(volatile int64_t* p, int64_t x) {\n  int64_t current = mi_atomic_load_relaxed((_Atomic(int64_t)*)p);\n  while (current < x && !mi_atomic_cas_weak_release((_Atomic(int64_t)*)p, &current, x)) { /* nothing */ };\n}\n\n// Used by timers\n#define mi_atomic_loadi64_acquire(p)            mi_atomic(load_explicit)(p,mi_memory_order(acquire))\n#define mi_atomic_loadi64_relaxed(p)            mi_atomic(load_explicit)(p,mi_memory_order(relaxed))\n#define mi_atomic_storei64_release(p,x)         mi_atomic(store_explicit)(p,x,mi_memory_order(release))\n#define mi_atomic_storei64_relaxed(p,x)         mi_atomic(store_explicit)(p,x,mi_memory_order(relaxed))\n\n#define mi_atomic_casi64_strong_acq_rel(p,e,d)  mi_atomic_cas_strong_acq_rel(p,e,d)\n#define mi_atomic_addi64_acq_rel(p,i)           mi_atomic_add_acq_rel(p,i)\n\n\n#elif defined(_MSC_VER)\n\n// Legacy MSVC plain C compilation wrapper that uses Interlocked operations to model C11 atomics.\n#include <intrin.h>\n#ifdef _WIN64\ntypedef LONG64   msc_intptr_t;\n#define MI_64(f) f##64\n#else\ntypedef LONG     msc_intptr_t;\n#define MI_64(f) f\n#endif\n\ntypedef enum mi_memory_order_e {\n  mi_memory_order_relaxed,\n  mi_memory_order_consume,\n  mi_memory_order_acquire,\n  mi_memory_order_release,\n  mi_memory_order_acq_rel,\n  mi_memory_order_seq_cst\n} mi_memory_order;\n\nstatic inline uintptr_t mi_atomic_fetch_add_explicit(_Atomic(uintptr_t)*p, uintptr_t add, mi_memory_order mo) {\n  (void)(mo);\n  return (uintptr_t)MI_64(_InterlockedExchangeAdd)((volatile msc_intptr_t*)p, (msc_intptr_t)add);\n}\nstatic inline uintptr_t mi_atomic_fetch_sub_explicit(_Atomic(uintptr_t)*p, uintptr_t sub, mi_memory_order mo) {\n  (void)(mo);\n  return (uintptr_t)MI_64(_InterlockedExchangeAdd)((volatile msc_intptr_t*)p, -((msc_intptr_t)sub));\n}\nstatic inline uintptr_t mi_atomic_fetch_and_explicit(_Atomic(uintptr_t)*p, uintptr_t x, mi_memory_order mo) {\n  (void)(mo);\n  return (uintptr_t)MI_64(_InterlockedAnd)((volatile msc_intptr_t*)p, (msc_intptr_t)x);\n}\nstatic inline uintptr_t mi_atomic_fetch_or_explicit(_Atomic(uintptr_t)*p, uintptr_t x, mi_memory_order mo) {\n  (void)(mo);\n  return (uintptr_t)MI_64(_InterlockedOr)((volatile msc_intptr_t*)p, (msc_intptr_t)x);\n}\nstatic inline bool mi_atomic_compare_exchange_strong_explicit(_Atomic(uintptr_t)*p, uintptr_t* expected, uintptr_t desired, mi_memory_order mo1, mi_memory_order mo2) {\n  (void)(mo1); (void)(mo2);\n  uintptr_t read = (uintptr_t)MI_64(_InterlockedCompareExchange)((volatile msc_intptr_t*)p, (msc_intptr_t)desired, (msc_intptr_t)(*expected));\n  if (read == *expected) {\n    return true;\n  }\n  else {\n    *expected = read;\n    return false;\n  }\n}\nstatic inline bool mi_atomic_compare_exchange_weak_explicit(_Atomic(uintptr_t)*p, uintptr_t* expected, uintptr_t desired, mi_memory_order mo1, mi_memory_order mo2) {\n  return mi_atomic_compare_exchange_strong_explicit(p, expected, desired, mo1, mo2);\n}\nstatic inline uintptr_t mi_atomic_exchange_explicit(_Atomic(uintptr_t)*p, uintptr_t exchange, mi_memory_order mo) {\n  (void)(mo);\n  return (uintptr_t)MI_64(_InterlockedExchange)((volatile msc_intptr_t*)p, (msc_intptr_t)exchange);\n}\nstatic inline void mi_atomic_thread_fence(mi_memory_order mo) {\n  (void)(mo);\n  _Atomic(uintptr_t) x = 0;\n  mi_atomic_exchange_explicit(&x, 1, mo);\n}\nstatic inline uintptr_t mi_atomic_load_explicit(_Atomic(uintptr_t) const* p, mi_memory_order mo) {\n  (void)(mo);\n#if defined(_M_IX86) || defined(_M_X64)\n  return *p;\n#else\n  uintptr_t x = *p;\n  if (mo > mi_memory_order_relaxed) {\n    while (!mi_atomic_compare_exchange_weak_explicit((_Atomic(uintptr_t)*)p, &x, x, mo, mi_memory_order_relaxed)) { /* nothing */ };\n  }\n  return x;\n#endif\n}\nstatic inline void mi_atomic_store_explicit(_Atomic(uintptr_t)*p, uintptr_t x, mi_memory_order mo) {\n  (void)(mo);\n#if defined(_M_IX86) || defined(_M_X64)\n  *p = x;\n#else\n  mi_atomic_exchange_explicit(p, x, mo);\n#endif\n}\nstatic inline int64_t mi_atomic_loadi64_explicit(_Atomic(int64_t)*p, mi_memory_order mo) {\n  (void)(mo);\n#if defined(_M_X64)\n  return *p;\n#else\n  int64_t old = *p;\n  int64_t x = old;\n  while ((old = InterlockedCompareExchange64(p, x, old)) != x) {\n    x = old;\n  }\n  return x;\n#endif\n}\nstatic inline void mi_atomic_storei64_explicit(_Atomic(int64_t)*p, int64_t x, mi_memory_order mo) {\n  (void)(mo);\n#if defined(x_M_IX86) || defined(_M_X64)\n  *p = x;\n#else\n  InterlockedExchange64(p, x);\n#endif\n}\n\n// These are used by the statistics\nstatic inline int64_t mi_atomic_addi64_relaxed(volatile _Atomic(int64_t)*p, int64_t add) {\n#ifdef _WIN64\n  return (int64_t)mi_atomic_addi((int64_t*)p, add);\n#else\n  int64_t current;\n  int64_t sum;\n  do {\n    current = *p;\n    sum = current + add;\n  } while (_InterlockedCompareExchange64(p, sum, current) != current);\n  return current;\n#endif\n}\n\nstatic inline void mi_atomic_void_addi64_relaxed(volatile int64_t* p, const volatile int64_t* padd) {\n  const int64_t add = *padd;\n  if (add != 0) {\n    mi_atomic_addi64_relaxed((volatile _Atomic(int64_t)*)p, add);\n  }\n}\n\nstatic inline void mi_atomic_maxi64_relaxed(volatile _Atomic(int64_t)*p, int64_t x) {\n  int64_t current;\n  do {\n    current = *p;\n  } while (current < x && _InterlockedCompareExchange64(p, x, current) != current);\n}\n\nstatic inline void mi_atomic_addi64_acq_rel(volatile _Atomic(int64_t*)p, int64_t i) {\n  mi_atomic_addi64_relaxed(p, i);\n}\n\nstatic inline bool mi_atomic_casi64_strong_acq_rel(volatile _Atomic(int64_t*)p, int64_t* exp, int64_t des) {\n  int64_t read = _InterlockedCompareExchange64(p, des, *exp);\n  if (read == *exp) {\n    return true;\n  }\n  else {\n    *exp = read;\n    return false;\n  }\n}\n\n// The pointer macros cast to `uintptr_t`.\n#define mi_atomic_load_ptr_acquire(tp,p)                (tp*)mi_atomic_load_acquire((_Atomic(uintptr_t)*)(p))\n#define mi_atomic_load_ptr_relaxed(tp,p)                (tp*)mi_atomic_load_relaxed((_Atomic(uintptr_t)*)(p))\n#define mi_atomic_store_ptr_release(tp,p,x)             mi_atomic_store_release((_Atomic(uintptr_t)*)(p),(uintptr_t)(x))\n#define mi_atomic_store_ptr_relaxed(tp,p,x)             mi_atomic_store_relaxed((_Atomic(uintptr_t)*)(p),(uintptr_t)(x))\n#define mi_atomic_cas_ptr_weak_release(tp,p,exp,des)    mi_atomic_cas_weak_release((_Atomic(uintptr_t)*)(p),(uintptr_t*)exp,(uintptr_t)des)\n#define mi_atomic_cas_ptr_weak_acq_rel(tp,p,exp,des)    mi_atomic_cas_weak_acq_rel((_Atomic(uintptr_t)*)(p),(uintptr_t*)exp,(uintptr_t)des)\n#define mi_atomic_cas_ptr_strong_release(tp,p,exp,des)  mi_atomic_cas_strong_release((_Atomic(uintptr_t)*)(p),(uintptr_t*)exp,(uintptr_t)des)\n#define mi_atomic_exchange_ptr_relaxed(tp,p,x)          (tp*)mi_atomic_exchange_relaxed((_Atomic(uintptr_t)*)(p),(uintptr_t)x)\n#define mi_atomic_exchange_ptr_release(tp,p,x)          (tp*)mi_atomic_exchange_release((_Atomic(uintptr_t)*)(p),(uintptr_t)x)\n#define mi_atomic_exchange_ptr_acq_rel(tp,p,x)          (tp*)mi_atomic_exchange_acq_rel((_Atomic(uintptr_t)*)(p),(uintptr_t)x)\n\n#define mi_atomic_loadi64_acquire(p)    mi_atomic(loadi64_explicit)(p,mi_memory_order(acquire))\n#define mi_atomic_loadi64_relaxed(p)    mi_atomic(loadi64_explicit)(p,mi_memory_order(relaxed))\n#define mi_atomic_storei64_release(p,x) mi_atomic(storei64_explicit)(p,x,mi_memory_order(release))\n#define mi_atomic_storei64_relaxed(p,x) mi_atomic(storei64_explicit)(p,x,mi_memory_order(relaxed))\n\n\n#endif\n\n\n// Atomically add a signed value; returns the previous value.\nstatic inline intptr_t mi_atomic_addi(_Atomic(intptr_t)*p, intptr_t add) {\n  return (intptr_t)mi_atomic_add_acq_rel((_Atomic(uintptr_t)*)p, (uintptr_t)add);\n}\n\n// Atomically subtract a signed value; returns the previous value.\nstatic inline intptr_t mi_atomic_subi(_Atomic(intptr_t)*p, intptr_t sub) {\n  return (intptr_t)mi_atomic_addi(p, -sub);\n}\n\n\n// ----------------------------------------------------------------------\n// Once and Guard\n// ----------------------------------------------------------------------\n\ntypedef _Atomic(uintptr_t) mi_atomic_once_t;\n\n// Returns true only on the first invocation\nstatic inline bool mi_atomic_once( mi_atomic_once_t* once ) {\n  if (mi_atomic_load_relaxed(once) != 0) return false;     // quick test\n  uintptr_t expected = 0;\n  return mi_atomic_cas_strong_acq_rel(once, &expected, (uintptr_t)1); // try to set to 1\n}\n\ntypedef _Atomic(uintptr_t) mi_atomic_guard_t;\n\n// Allows only one thread to execute at a time\n#define mi_atomic_guard(guard) \\\n  uintptr_t _mi_guard_expected = 0; \\\n  for(bool _mi_guard_once = true; \\\n      _mi_guard_once && mi_atomic_cas_strong_acq_rel(guard,&_mi_guard_expected,(uintptr_t)1); \\\n      (mi_atomic_store_release(guard,(uintptr_t)0), _mi_guard_once = false) )\n\n\n\n// ----------------------------------------------------------------------\n// Yield\n// ----------------------------------------------------------------------\n\n#if defined(__cplusplus)\n#include <thread>\nstatic inline void mi_atomic_yield(void) {\n  std::this_thread::yield();\n}\n#elif defined(_WIN32)\nstatic inline void mi_atomic_yield(void) {\n  YieldProcessor();\n}\n#elif defined(__SSE2__)\n#include <emmintrin.h>\nstatic inline void mi_atomic_yield(void) {\n  _mm_pause();\n}\n#elif (defined(__GNUC__) || defined(__clang__)) && \\\n      (defined(__x86_64__) || defined(__i386__) || defined(__arm__) || defined(__armel__) || defined(__ARMEL__) || \\\n       defined(__aarch64__) || defined(__powerpc__) || defined(__ppc__) || defined(__PPC__)) || defined(__POWERPC__)\n#if defined(__x86_64__) || defined(__i386__)\nstatic inline void mi_atomic_yield(void) {\n  __asm__ volatile (\"pause\" ::: \"memory\");\n}\n#elif defined(__aarch64__)\nstatic inline void mi_atomic_yield(void) {\n  __asm__ volatile(\"wfe\");\n}\n#elif (defined(__arm__) && __ARM_ARCH__ >= 7)\nstatic inline void mi_atomic_yield(void) {\n  __asm__ volatile(\"yield\" ::: \"memory\");\n}\n#elif defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) || defined(__POWERPC__)\n#ifdef __APPLE__\nstatic inline void mi_atomic_yield(void) {\n  __asm__ volatile (\"or r27,r27,r27\" ::: \"memory\");\n}\n#else\nstatic inline void mi_atomic_yield(void) {\n  __asm__ __volatile__ (\"or 27,27,27\" ::: \"memory\");\n}\n#endif\n#elif defined(__armel__) || defined(__ARMEL__)\nstatic inline void mi_atomic_yield(void) {\n  __asm__ volatile (\"nop\" ::: \"memory\");\n}\n#endif\n#elif defined(__sun)\n// Fallback for other archs\n#include <synch.h>\nstatic inline void mi_atomic_yield(void) {\n  smt_pause();\n}\n#elif defined(__wasi__)\n#include <sched.h>\nstatic inline void mi_atomic_yield(void) {\n  sched_yield();\n}\n#else\n#include <unistd.h>\nstatic inline void mi_atomic_yield(void) {\n  sleep(0);\n}\n#endif\n\n\n// ----------------------------------------------------------------------\n// Locks \n// These do not have to be recursive and should be light-weight \n// in-process only locks. Only used for reserving arena's and to \n// maintain the abandoned list.\n// ----------------------------------------------------------------------\n#if _MSC_VER\n#pragma warning(disable:26110)  // unlock with holding lock\n#endif\n\n#define mi_lock(lock)    for(bool _go = (mi_lock_acquire(lock),true); _go; (mi_lock_release(lock), _go=false) )\n\n#if defined(_WIN32)\n\n#if 1\n#define mi_lock_t  SRWLOCK   // slim reader-writer lock\n\nstatic inline bool mi_lock_try_acquire(mi_lock_t* lock) {\n  return TryAcquireSRWLockExclusive(lock);\n}\nstatic inline void mi_lock_acquire(mi_lock_t* lock) {\n  AcquireSRWLockExclusive(lock);\n}\nstatic inline void mi_lock_release(mi_lock_t* lock) {\n  ReleaseSRWLockExclusive(lock);\n}\nstatic inline void mi_lock_init(mi_lock_t* lock) {\n  InitializeSRWLock(lock);\n}\nstatic inline void mi_lock_done(mi_lock_t* lock) {\n  (void)(lock);\n}\n\n#else\n#define mi_lock_t  CRITICAL_SECTION\n\nstatic inline bool mi_lock_try_acquire(mi_lock_t* lock) {\n  return TryEnterCriticalSection(lock);\n}\nstatic inline void mi_lock_acquire(mi_lock_t* lock) {\n  EnterCriticalSection(lock);\n}\nstatic inline void mi_lock_release(mi_lock_t* lock) {\n  LeaveCriticalSection(lock);\n}\nstatic inline void mi_lock_init(mi_lock_t* lock) {\n  InitializeCriticalSection(lock);\n}\nstatic inline void mi_lock_done(mi_lock_t* lock) {\n  DeleteCriticalSection(lock);\n}\n\n#endif\n\n#elif defined(MI_USE_PTHREADS)\n\nvoid _mi_error_message(int err, const char* fmt, ...);\n\n#define mi_lock_t  pthread_mutex_t\n\nstatic inline bool mi_lock_try_acquire(mi_lock_t* lock) {\n  return (pthread_mutex_trylock(lock) == 0);\n}\nstatic inline void mi_lock_acquire(mi_lock_t* lock) {\n  const int err = pthread_mutex_lock(lock);\n  if (err != 0) {\n    _mi_error_message(err, \"internal error: lock cannot be acquired\\n\");\n  }\n}\nstatic inline void mi_lock_release(mi_lock_t* lock) {\n  pthread_mutex_unlock(lock);\n}\nstatic inline void mi_lock_init(mi_lock_t* lock) {\n  pthread_mutex_init(lock, NULL);\n}\nstatic inline void mi_lock_done(mi_lock_t* lock) {\n  pthread_mutex_destroy(lock);\n}\n\n#elif defined(__cplusplus)\n\n#include <mutex>\n#define mi_lock_t  std::mutex\n\nstatic inline bool mi_lock_try_acquire(mi_lock_t* lock) {\n  return lock->try_lock();\n}\nstatic inline void mi_lock_acquire(mi_lock_t* lock) {\n  lock->lock();\n}\nstatic inline void mi_lock_release(mi_lock_t* lock) {\n  lock->unlock();\n}\nstatic inline void mi_lock_init(mi_lock_t* lock) {\n  (void)(lock);\n}\nstatic inline void mi_lock_done(mi_lock_t* lock) {\n  (void)(lock);\n}\n\n#else\n\n// fall back to poor man's locks.\n// this should only be the case in a single-threaded environment (like __wasi__)\n\n#define mi_lock_t  _Atomic(uintptr_t)\n\nstatic inline bool mi_lock_try_acquire(mi_lock_t* lock) {\n  uintptr_t expected = 0;\n  return mi_atomic_cas_strong_acq_rel(lock, &expected, (uintptr_t)1);\n}\nstatic inline void mi_lock_acquire(mi_lock_t* lock) {\n  for (int i = 0; i < 1000; i++) {  // for at most 1000 tries?\n    if (mi_lock_try_acquire(lock)) return;\n    mi_atomic_yield();\n  }\n}\nstatic inline void mi_lock_release(mi_lock_t* lock) {\n  mi_atomic_store_release(lock, (uintptr_t)0);\n}\nstatic inline void mi_lock_init(mi_lock_t* lock) {\n  mi_lock_release(lock);\n}\nstatic inline void mi_lock_done(mi_lock_t* lock) {\n  (void)(lock);\n}\n\n#endif\n\n\n#endif // __MIMALLOC_ATOMIC_H\n"
  },
  {
    "path": "third-party/mimalloc/include/mimalloc/internal.h",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2023, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#pragma once\n#ifndef MIMALLOC_INTERNAL_H\n#define MIMALLOC_INTERNAL_H\n\n\n// --------------------------------------------------------------------------\n// This file contains the internal API's of mimalloc and various utility\n// functions and macros.\n// --------------------------------------------------------------------------\n\n#include \"types.h\"\n#include \"track.h\"\n\n#if (MI_DEBUG>0)\n#define mi_trace_message(...)  _mi_trace_message(__VA_ARGS__)\n#else\n#define mi_trace_message(...)\n#endif\n\n#define MI_CACHE_LINE          64\n#if defined(_MSC_VER)\n#pragma warning(disable:4127)   // suppress constant conditional warning (due to MI_SECURE paths)\n#pragma warning(disable:26812)  // unscoped enum warning\n#define mi_decl_noinline        __declspec(noinline)\n#define mi_decl_thread          __declspec(thread)\n#define mi_decl_cache_align     __declspec(align(MI_CACHE_LINE))\n#define mi_decl_weak\n#define mi_decl_hidden\n#elif (defined(__GNUC__) && (__GNUC__ >= 3)) || defined(__clang__) // includes clang and icc\n#define mi_decl_noinline        __attribute__((noinline))\n#define mi_decl_thread          __thread\n#define mi_decl_cache_align     __attribute__((aligned(MI_CACHE_LINE)))\n#define mi_decl_weak            __attribute__((weak))\n#define mi_decl_hidden          __attribute__((visibility(\"hidden\")))\n#elif __cplusplus >= 201103L    // c++11\n#define mi_decl_noinline\n#define mi_decl_thread          thread_local\n#define mi_decl_cache_align     alignas(MI_CACHE_LINE)\n#define mi_decl_weak\n#define mi_decl_hidden\n#else\n#define mi_decl_noinline\n#define mi_decl_thread          __thread        // hope for the best :-)\n#define mi_decl_cache_align\n#define mi_decl_weak\n#define mi_decl_hidden\n#endif\n\n#if defined(__EMSCRIPTEN__) && !defined(__wasi__)\n#define __wasi__\n#endif\n\n#if defined(__cplusplus)\n#define mi_decl_externc       extern \"C\"\n#else\n#define mi_decl_externc\n#endif\n\n// \"libc.c\"\n#include    <stdarg.h>\nint         _mi_vsnprintf(char* buf, size_t bufsize, const char* fmt, va_list args);\nint         _mi_snprintf(char* buf, size_t buflen, const char* fmt, ...);\nchar        _mi_toupper(char c);\nint         _mi_strnicmp(const char* s, const char* t, size_t n);\nvoid        _mi_strlcpy(char* dest, const char* src, size_t dest_size);\nvoid        _mi_strlcat(char* dest, const char* src, size_t dest_size);\nsize_t      _mi_strlen(const char* s);\nsize_t      _mi_strnlen(const char* s, size_t max_len);\nbool        _mi_getenv(const char* name, char* result, size_t result_size);\n\n// \"options.c\"\nvoid        _mi_fputs(mi_output_fun* out, void* arg, const char* prefix, const char* message);\nvoid        _mi_fprintf(mi_output_fun* out, void* arg, const char* fmt, ...);\nvoid        _mi_message(const char* fmt, ...);\nvoid        _mi_warning_message(const char* fmt, ...);\nvoid        _mi_verbose_message(const char* fmt, ...);\nvoid        _mi_trace_message(const char* fmt, ...);\nvoid        _mi_options_init(void);\nlong        _mi_option_get_fast(mi_option_t option);\nvoid        _mi_error_message(int err, const char* fmt, ...);\n\n// random.c\nvoid        _mi_random_init(mi_random_ctx_t* ctx);\nvoid        _mi_random_init_weak(mi_random_ctx_t* ctx);\nvoid        _mi_random_reinit_if_weak(mi_random_ctx_t * ctx);\nvoid        _mi_random_split(mi_random_ctx_t* ctx, mi_random_ctx_t* new_ctx);\nuintptr_t   _mi_random_next(mi_random_ctx_t* ctx);\nuintptr_t   _mi_heap_random_next(mi_heap_t* heap);\nuintptr_t   _mi_os_random_weak(uintptr_t extra_seed);\nstatic inline uintptr_t _mi_random_shuffle(uintptr_t x);\n\n// init.c\nextern mi_decl_cache_align mi_stats_t       _mi_stats_main;\nextern mi_decl_hidden mi_decl_cache_align const mi_page_t  _mi_page_empty;\nvoid        _mi_process_load(void);\nvoid mi_cdecl _mi_process_done(void);\nbool        _mi_is_redirected(void);\nbool        _mi_allocator_init(const char** message);\nvoid        _mi_allocator_done(void);\nbool        _mi_is_main_thread(void);\nsize_t      _mi_current_thread_count(void);\nbool        _mi_preloading(void);           // true while the C runtime is not initialized yet\nvoid        _mi_thread_done(mi_heap_t* heap);\nvoid        _mi_thread_data_collect(void);\nvoid        _mi_tld_init(mi_tld_t* tld, mi_heap_t* bheap);\nmi_threadid_t _mi_thread_id(void) mi_attr_noexcept;\nmi_heap_t*    _mi_heap_main_get(void);     // statically allocated main backing heap\nmi_subproc_t* _mi_subproc_from_id(mi_subproc_id_t subproc_id);\nvoid        _mi_heap_guarded_init(mi_heap_t* heap);\n\n// os.c\nvoid        _mi_os_init(void);                                            // called from process init\nvoid*       _mi_os_alloc(size_t size, mi_memid_t* memid);\nvoid        _mi_os_free(void* p, size_t size, mi_memid_t memid);\nvoid        _mi_os_free_ex(void* p, size_t size, bool still_committed, mi_memid_t memid);\n\nsize_t      _mi_os_page_size(void);\nsize_t      _mi_os_good_alloc_size(size_t size);\nbool        _mi_os_has_overcommit(void);\nbool        _mi_os_has_virtual_reserve(void);\n\nbool        _mi_os_reset(void* addr, size_t size);\nbool        _mi_os_commit(void* p, size_t size, bool* is_zero);\nbool        _mi_os_decommit(void* addr, size_t size);\nbool        _mi_os_protect(void* addr, size_t size);\nbool        _mi_os_unprotect(void* addr, size_t size);\nbool        _mi_os_purge(void* p, size_t size);\nbool        _mi_os_purge_ex(void* p, size_t size, bool allow_reset, size_t stat_size);\n\nvoid*       _mi_os_alloc_aligned(size_t size, size_t alignment, bool commit, bool allow_large, mi_memid_t* memid);\nvoid*       _mi_os_alloc_aligned_at_offset(size_t size, size_t alignment, size_t align_offset, bool commit, bool allow_large, mi_memid_t* memid);\n\nvoid*       _mi_os_get_aligned_hint(size_t try_alignment, size_t size);\nbool        _mi_os_use_large_page(size_t size, size_t alignment);\nsize_t      _mi_os_large_page_size(void);\n\nvoid*       _mi_os_alloc_huge_os_pages(size_t pages, int numa_node, mi_msecs_t max_secs, size_t* pages_reserved, size_t* psize, mi_memid_t* memid);\n\n// arena.c\nmi_arena_id_t _mi_arena_id_none(void);\nvoid        _mi_arena_free(void* p, size_t size, size_t still_committed_size, mi_memid_t memid);\nvoid*       _mi_arena_alloc(size_t size, bool commit, bool allow_large, mi_arena_id_t req_arena_id, mi_memid_t* memid);\nvoid*       _mi_arena_alloc_aligned(size_t size, size_t alignment, size_t align_offset, bool commit, bool allow_large, mi_arena_id_t req_arena_id, mi_memid_t* memid);\nbool        _mi_arena_memid_is_suitable(mi_memid_t memid, mi_arena_id_t request_arena_id);\nbool        _mi_arena_contains(const void* p);\nvoid        _mi_arenas_collect(bool force_purge);\nvoid        _mi_arena_unsafe_destroy_all(void);\n\nbool        _mi_arena_segment_clear_abandoned(mi_segment_t* segment);\nvoid        _mi_arena_segment_mark_abandoned(mi_segment_t* segment);\n\nvoid*       _mi_arena_meta_zalloc(size_t size, mi_memid_t* memid);\nvoid        _mi_arena_meta_free(void* p, mi_memid_t memid, size_t size);\n\ntypedef struct mi_arena_field_cursor_s { // abstract struct\n  size_t         os_list_count;           // max entries to visit in the OS abandoned list\n  size_t         start;                   // start arena idx (may need to be wrapped)\n  size_t         end;                     // end arena idx (exclusive, may need to be wrapped)\n  size_t         bitmap_idx;              // current bit idx for an arena\n  mi_subproc_t*  subproc;                 // only visit blocks in this sub-process\n  bool           visit_all;               // ensure all abandoned blocks are seen (blocking)\n  bool           hold_visit_lock;         // if the subproc->abandoned_os_visit_lock is held\n} mi_arena_field_cursor_t;\nvoid          _mi_arena_field_cursor_init(mi_heap_t* heap, mi_subproc_t* subproc, bool visit_all, mi_arena_field_cursor_t* current);\nmi_segment_t* _mi_arena_segment_clear_abandoned_next(mi_arena_field_cursor_t* previous);\nvoid          _mi_arena_field_cursor_done(mi_arena_field_cursor_t* current);\n\n// \"segment-map.c\"\nvoid        _mi_segment_map_allocated_at(const mi_segment_t* segment);\nvoid        _mi_segment_map_freed_at(const mi_segment_t* segment);\nvoid        _mi_segment_map_unsafe_destroy(void);\n\n// \"segment.c\"\nmi_page_t* _mi_segment_page_alloc(mi_heap_t* heap, size_t block_size, size_t page_alignment, mi_segments_tld_t* tld);\nvoid       _mi_segment_page_free(mi_page_t* page, bool force, mi_segments_tld_t* tld);\nvoid       _mi_segment_page_abandon(mi_page_t* page, mi_segments_tld_t* tld);\nbool       _mi_segment_try_reclaim_abandoned( mi_heap_t* heap, bool try_all, mi_segments_tld_t* tld);\nvoid       _mi_segment_collect(mi_segment_t* segment, bool force);\n\n#if MI_HUGE_PAGE_ABANDON\nvoid        _mi_segment_huge_page_free(mi_segment_t* segment, mi_page_t* page, mi_block_t* block);\n#else\nvoid        _mi_segment_huge_page_reset(mi_segment_t* segment, mi_page_t* page, mi_block_t* block);\n#endif\n\nuint8_t*   _mi_segment_page_start(const mi_segment_t* segment, const mi_page_t* page, size_t* page_size); // page start for any page\nvoid       _mi_abandoned_reclaim_all(mi_heap_t* heap, mi_segments_tld_t* tld);\nvoid       _mi_abandoned_collect(mi_heap_t* heap, bool force, mi_segments_tld_t* tld);\nbool       _mi_segment_attempt_reclaim(mi_heap_t* heap, mi_segment_t* segment);\nbool       _mi_segment_visit_blocks(mi_segment_t* segment, int heap_tag, bool visit_blocks, mi_block_visit_fun* visitor, void* arg);\n\n// \"page.c\"\nvoid*       _mi_malloc_generic(mi_heap_t* heap, size_t size, bool zero, size_t huge_alignment)  mi_attr_noexcept mi_attr_malloc;\n\nvoid        _mi_page_retire(mi_page_t* page) mi_attr_noexcept;                  // free the page if there are no other pages with many free blocks\nvoid        _mi_page_unfull(mi_page_t* page);\nvoid        _mi_page_free(mi_page_t* page, mi_page_queue_t* pq, bool force);   // free the page\nvoid        _mi_page_abandon(mi_page_t* page, mi_page_queue_t* pq);            // abandon the page, to be picked up by another thread...\nvoid        _mi_page_force_abandon(mi_page_t* page);\n\nvoid        _mi_heap_delayed_free_all(mi_heap_t* heap);\nbool        _mi_heap_delayed_free_partial(mi_heap_t* heap);\nvoid        _mi_heap_collect_retired(mi_heap_t* heap, bool force);\n\nvoid        _mi_page_use_delayed_free(mi_page_t* page, mi_delayed_t delay, bool override_never);\nbool        _mi_page_try_use_delayed_free(mi_page_t* page, mi_delayed_t delay, bool override_never);\nsize_t      _mi_page_queue_append(mi_heap_t* heap, mi_page_queue_t* pq, mi_page_queue_t* append);\nvoid        _mi_deferred_free(mi_heap_t* heap, bool force);\n\nvoid        _mi_page_free_collect(mi_page_t* page,bool force);\nvoid        _mi_page_reclaim(mi_heap_t* heap, mi_page_t* page);   // callback from segments\n\nsize_t      _mi_bin_size(size_t bin);            // for stats\nsize_t      _mi_bin(size_t size);                // for stats\n\n// \"heap.c\"\nvoid        _mi_heap_init(mi_heap_t* heap, mi_tld_t* tld, mi_arena_id_t arena_id, bool noreclaim, uint8_t tag);\nvoid        _mi_heap_destroy_pages(mi_heap_t* heap);\nvoid        _mi_heap_collect_abandon(mi_heap_t* heap);\nvoid        _mi_heap_set_default_direct(mi_heap_t* heap);\nbool        _mi_heap_memid_is_suitable(mi_heap_t* heap, mi_memid_t memid);\nvoid        _mi_heap_unsafe_destroy_all(mi_heap_t* heap);\nmi_heap_t*  _mi_heap_by_tag(mi_heap_t* heap, uint8_t tag);\nvoid        _mi_heap_area_init(mi_heap_area_t* area, mi_page_t* page);\nbool        _mi_heap_area_visit_blocks(const mi_heap_area_t* area, mi_page_t* page, mi_block_visit_fun* visitor, void* arg);\n\n// \"stats.c\"\nvoid        _mi_stats_done(mi_stats_t* stats);\nmi_msecs_t  _mi_clock_now(void);\nmi_msecs_t  _mi_clock_end(mi_msecs_t start);\nmi_msecs_t  _mi_clock_start(void);\n\n// \"alloc.c\"\nvoid*       _mi_page_malloc_zero(mi_heap_t* heap, mi_page_t* page, size_t size, bool zero) mi_attr_noexcept;  // called from `_mi_malloc_generic`\nvoid*       _mi_page_malloc(mi_heap_t* heap, mi_page_t* page, size_t size) mi_attr_noexcept;                  // called from `_mi_heap_malloc_aligned`\nvoid*       _mi_page_malloc_zeroed(mi_heap_t* heap, mi_page_t* page, size_t size) mi_attr_noexcept;           // called from `_mi_heap_malloc_aligned`\nvoid*       _mi_heap_malloc_zero(mi_heap_t* heap, size_t size, bool zero) mi_attr_noexcept;\nvoid*       _mi_heap_malloc_zero_ex(mi_heap_t* heap, size_t size, bool zero, size_t huge_alignment) mi_attr_noexcept;     // called from `_mi_heap_malloc_aligned`\nvoid*       _mi_heap_realloc_zero(mi_heap_t* heap, void* p, size_t newsize, bool zero) mi_attr_noexcept;\nmi_block_t* _mi_page_ptr_unalign(const mi_page_t* page, const void* p);\nbool        _mi_free_delayed_block(mi_block_t* block);\nvoid        _mi_free_generic(mi_segment_t* segment, mi_page_t* page, bool is_local, void* p) mi_attr_noexcept;  // for runtime integration\nvoid        _mi_padding_shrink(const mi_page_t* page, const mi_block_t* block, const size_t min_size);\n\n#if MI_DEBUG>1\nbool        _mi_page_is_valid(mi_page_t* page);\n#endif\n\n\n// ------------------------------------------------------\n// Branches\n// ------------------------------------------------------\n\n#if defined(__GNUC__) || defined(__clang__)\n#define mi_unlikely(x)     (__builtin_expect(!!(x),false))\n#define mi_likely(x)       (__builtin_expect(!!(x),true))\n#elif (defined(__cplusplus) && (__cplusplus >= 202002L)) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)\n#define mi_unlikely(x)     (x) [[unlikely]]\n#define mi_likely(x)       (x) [[likely]]\n#else\n#define mi_unlikely(x)     (x)\n#define mi_likely(x)       (x)\n#endif\n\n#ifndef __has_builtin\n#define __has_builtin(x)  0\n#endif\n\n\n/* -----------------------------------------------------------\n  Error codes passed to `_mi_fatal_error`\n  All are recoverable but EFAULT is a serious error and aborts by default in secure mode.\n  For portability define undefined error codes using common Unix codes:\n  <https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html>\n----------------------------------------------------------- */\n#include <errno.h>\n#ifndef EAGAIN         // double free\n#define EAGAIN (11)\n#endif\n#ifndef ENOMEM         // out of memory\n#define ENOMEM (12)\n#endif\n#ifndef EFAULT         // corrupted free-list or meta-data\n#define EFAULT (14)\n#endif\n#ifndef EINVAL         // trying to free an invalid pointer\n#define EINVAL (22)\n#endif\n#ifndef EOVERFLOW      // count*size overflow\n#define EOVERFLOW (75)\n#endif\n\n\n/* -----------------------------------------------------------\n  Inlined definitions\n----------------------------------------------------------- */\n#define MI_UNUSED(x)     (void)(x)\n#if (MI_DEBUG>0)\n#define MI_UNUSED_RELEASE(x)\n#else\n#define MI_UNUSED_RELEASE(x)  MI_UNUSED(x)\n#endif\n\n#define MI_INIT4(x)   x(),x(),x(),x()\n#define MI_INIT8(x)   MI_INIT4(x),MI_INIT4(x)\n#define MI_INIT16(x)  MI_INIT8(x),MI_INIT8(x)\n#define MI_INIT32(x)  MI_INIT16(x),MI_INIT16(x)\n#define MI_INIT64(x)  MI_INIT32(x),MI_INIT32(x)\n#define MI_INIT128(x) MI_INIT64(x),MI_INIT64(x)\n#define MI_INIT256(x) MI_INIT128(x),MI_INIT128(x)\n#define MI_INIT74(x)  MI_INIT64(x),MI_INIT8(x),x(),x()\n\n#include <string.h>\n// initialize a local variable to zero; use memset as compilers optimize constant sized memset's\n#define _mi_memzero_var(x)  memset(&x,0,sizeof(x))\n\n// Is `x` a power of two? (0 is considered a power of two)\nstatic inline bool _mi_is_power_of_two(uintptr_t x) {\n  return ((x & (x - 1)) == 0);\n}\n\n// Is a pointer aligned?\nstatic inline bool _mi_is_aligned(void* p, size_t alignment) {\n  mi_assert_internal(alignment != 0);\n  return (((uintptr_t)p % alignment) == 0);\n}\n\n// Align upwards\nstatic inline uintptr_t _mi_align_up(uintptr_t sz, size_t alignment) {\n  mi_assert_internal(alignment != 0);\n  uintptr_t mask = alignment - 1;\n  if ((alignment & mask) == 0) {  // power of two?\n    return ((sz + mask) & ~mask);\n  }\n  else {\n    return (((sz + mask)/alignment)*alignment);\n  }\n}\n\n// Align downwards\nstatic inline uintptr_t _mi_align_down(uintptr_t sz, size_t alignment) {\n  mi_assert_internal(alignment != 0);\n  uintptr_t mask = alignment - 1;\n  if ((alignment & mask) == 0) { // power of two?\n    return (sz & ~mask);\n  }\n  else {\n    return ((sz / alignment) * alignment);\n  }\n}\n\n// Align a pointer upwards\nstatic inline void* mi_align_up_ptr(void* p, size_t alignment) {\n  return (void*)_mi_align_up((uintptr_t)p, alignment);\n}\n\n// Align a pointer downwards\nstatic inline void* mi_align_down_ptr(void* p, size_t alignment) {\n  return (void*)_mi_align_down((uintptr_t)p, alignment);\n}\n\n\n// Divide upwards: `s <= _mi_divide_up(s,d)*d < s+d`.\nstatic inline uintptr_t _mi_divide_up(uintptr_t size, size_t divider) {\n  mi_assert_internal(divider != 0);\n  return (divider == 0 ? size : ((size + divider - 1) / divider));\n}\n\n\n// clamp an integer\nstatic inline size_t _mi_clamp(size_t sz, size_t min, size_t max) {\n  if (sz < min) return min;\n  else if (sz > max) return max;\n  else return sz;\n}\n\n// Is memory zero initialized?\nstatic inline bool mi_mem_is_zero(const void* p, size_t size) {\n  for (size_t i = 0; i < size; i++) {\n    if (((uint8_t*)p)[i] != 0) return false;\n  }\n  return true;\n}\n\n\n// Align a byte size to a size in _machine words_,\n// i.e. byte size == `wsize*sizeof(void*)`.\nstatic inline size_t _mi_wsize_from_size(size_t size) {\n  mi_assert_internal(size <= SIZE_MAX - sizeof(uintptr_t));\n  return (size + sizeof(uintptr_t) - 1) / sizeof(uintptr_t);\n}\n\n// Overflow detecting multiply\n#if __has_builtin(__builtin_umul_overflow) || (defined(__GNUC__) && (__GNUC__ >= 5))\n#include <limits.h>      // UINT_MAX, ULONG_MAX\n#if defined(_CLOCK_T)    // for Illumos\n#undef _CLOCK_T\n#endif\nstatic inline bool mi_mul_overflow(size_t count, size_t size, size_t* total) {\n  #if (SIZE_MAX == ULONG_MAX)\n    return __builtin_umull_overflow(count, size, (unsigned long *)total);\n  #elif (SIZE_MAX == UINT_MAX)\n    return __builtin_umul_overflow(count, size, (unsigned int *)total);\n  #else\n    return __builtin_umulll_overflow(count, size, (unsigned long long *)total);\n  #endif\n}\n#else /* __builtin_umul_overflow is unavailable */\nstatic inline bool mi_mul_overflow(size_t count, size_t size, size_t* total) {\n  #define MI_MUL_COULD_OVERFLOW ((size_t)1 << (4*sizeof(size_t)))  // sqrt(SIZE_MAX)\n  *total = count * size;\n  // note: gcc/clang optimize this to directly check the overflow flag\n  return ((size >= MI_MUL_COULD_OVERFLOW || count >= MI_MUL_COULD_OVERFLOW) && size > 0 && (SIZE_MAX / size) < count);\n}\n#endif\n\n// Safe multiply `count*size` into `total`; return `true` on overflow.\nstatic inline bool mi_count_size_overflow(size_t count, size_t size, size_t* total) {\n  if (count==1) {  // quick check for the case where count is one (common for C++ allocators)\n    *total = size;\n    return false;\n  }\n  else if mi_unlikely(mi_mul_overflow(count, size, total)) {\n    #if MI_DEBUG > 0\n    _mi_error_message(EOVERFLOW, \"allocation request is too large (%zu * %zu bytes)\\n\", count, size);\n    #endif\n    *total = SIZE_MAX;\n    return true;\n  }\n  else return false;\n}\n\n\n/*----------------------------------------------------------------------------------------\n  Heap functions\n------------------------------------------------------------------------------------------- */\n\nextern mi_decl_hidden const mi_heap_t _mi_heap_empty;  // read-only empty heap, initial value of the thread local default heap\n\nstatic inline bool mi_heap_is_backing(const mi_heap_t* heap) {\n  return (heap->tld->heap_backing == heap);\n}\n\nstatic inline bool mi_heap_is_initialized(mi_heap_t* heap) {\n  mi_assert_internal(heap != NULL);\n  return (heap != NULL && heap != &_mi_heap_empty);\n}\n\nstatic inline uintptr_t _mi_ptr_cookie(const void* p) {\n  extern mi_decl_hidden mi_heap_t _mi_heap_main;\n  mi_assert_internal(_mi_heap_main.cookie != 0);\n  return ((uintptr_t)p ^ _mi_heap_main.cookie);\n}\n\n/* -----------------------------------------------------------\n  Pages\n----------------------------------------------------------- */\n\nstatic inline mi_page_t* _mi_heap_get_free_small_page(mi_heap_t* heap, size_t size) {\n  mi_assert_internal(size <= (MI_SMALL_SIZE_MAX + MI_PADDING_SIZE));\n  const size_t idx = _mi_wsize_from_size(size);\n  mi_assert_internal(idx < MI_PAGES_DIRECT);\n  return heap->pages_free_direct[idx];\n}\n\n// Segment that contains the pointer\n// Large aligned blocks may be aligned at N*MI_SEGMENT_SIZE (inside a huge segment > MI_SEGMENT_SIZE),\n// and we need align \"down\" to the segment info which is `MI_SEGMENT_SIZE` bytes before it;\n// therefore we align one byte before `p`.\n// We check for NULL afterwards on 64-bit systems to improve codegen for `mi_free`.\nstatic inline mi_segment_t* _mi_ptr_segment(const void* p) {\n  mi_segment_t* const segment = (mi_segment_t*)(((uintptr_t)p - 1) & ~MI_SEGMENT_MASK);\n  #if MI_INTPTR_SIZE <= 4\n  return (p==NULL ? NULL : segment);\n  #else\n  return ((intptr_t)segment <= 0 ? NULL : segment);\n  #endif\n}\n\nstatic inline mi_page_t* mi_slice_to_page(mi_slice_t* s) {\n  mi_assert_internal(s->slice_offset== 0 && s->slice_count > 0);\n  return (mi_page_t*)(s);\n}\n\nstatic inline mi_slice_t* mi_page_to_slice(mi_page_t* p) {\n  mi_assert_internal(p->slice_offset== 0 && p->slice_count > 0);\n  return (mi_slice_t*)(p);\n}\n\n// Segment belonging to a page\nstatic inline mi_segment_t* _mi_page_segment(const mi_page_t* page) {\n  mi_assert_internal(page!=NULL);\n  mi_segment_t* segment = _mi_ptr_segment(page);\n  mi_assert_internal(segment == NULL || ((mi_slice_t*)page >= segment->slices && (mi_slice_t*)page < segment->slices + segment->slice_entries));\n  return segment;\n}\n\nstatic inline mi_slice_t* mi_slice_first(const mi_slice_t* slice) {\n  mi_slice_t* start = (mi_slice_t*)((uint8_t*)slice - slice->slice_offset);\n  mi_assert_internal(start >= _mi_ptr_segment(slice)->slices);\n  mi_assert_internal(start->slice_offset == 0);\n  mi_assert_internal(start + start->slice_count > slice);\n  return start;\n}\n\n// Get the page containing the pointer (performance critical as it is called in mi_free)\nstatic inline mi_page_t* _mi_segment_page_of(const mi_segment_t* segment, const void* p) {\n  mi_assert_internal(p > (void*)segment);\n  ptrdiff_t diff = (uint8_t*)p - (uint8_t*)segment;\n  mi_assert_internal(diff > 0 && diff <= (ptrdiff_t)MI_SEGMENT_SIZE);\n  size_t idx = (size_t)diff >> MI_SEGMENT_SLICE_SHIFT;\n  mi_assert_internal(idx <= segment->slice_entries);\n  mi_slice_t* slice0 = (mi_slice_t*)&segment->slices[idx];\n  mi_slice_t* slice = mi_slice_first(slice0);  // adjust to the block that holds the page data\n  mi_assert_internal(slice->slice_offset == 0);\n  mi_assert_internal(slice >= segment->slices && slice < segment->slices + segment->slice_entries);\n  return mi_slice_to_page(slice);\n}\n\n// Quick page start for initialized pages\nstatic inline uint8_t* mi_page_start(const mi_page_t* page) {\n  mi_assert_internal(page->page_start != NULL);\n  mi_assert_expensive(_mi_segment_page_start(_mi_page_segment(page),page,NULL) == page->page_start);\n  return page->page_start;\n}\n\n// Get the page containing the pointer\nstatic inline mi_page_t* _mi_ptr_page(void* p) {\n  mi_assert_internal(p!=NULL);\n  return _mi_segment_page_of(_mi_ptr_segment(p), p);\n}\n\n// Get the block size of a page (special case for huge objects)\nstatic inline size_t mi_page_block_size(const mi_page_t* page) {\n  mi_assert_internal(page->block_size > 0);\n  return page->block_size;\n}\n\nstatic inline bool mi_page_is_huge(const mi_page_t* page) {\n  mi_assert_internal((page->is_huge && _mi_page_segment(page)->kind == MI_SEGMENT_HUGE) ||\n                     (!page->is_huge && _mi_page_segment(page)->kind != MI_SEGMENT_HUGE));\n  return page->is_huge;\n}\n\n// Get the usable block size of a page without fixed padding.\n// This may still include internal padding due to alignment and rounding up size classes.\nstatic inline size_t mi_page_usable_block_size(const mi_page_t* page) {\n  return mi_page_block_size(page) - MI_PADDING_SIZE;\n}\n\n// size of a segment\nstatic inline size_t mi_segment_size(mi_segment_t* segment) {\n  return segment->segment_slices * MI_SEGMENT_SLICE_SIZE;\n}\n\nstatic inline uint8_t* mi_segment_end(mi_segment_t* segment) {\n  return (uint8_t*)segment + mi_segment_size(segment);\n}\n\n// Thread free access\nstatic inline mi_block_t* mi_page_thread_free(const mi_page_t* page) {\n  return (mi_block_t*)(mi_atomic_load_relaxed(&((mi_page_t*)page)->xthread_free) & ~3);\n}\n\nstatic inline mi_delayed_t mi_page_thread_free_flag(const mi_page_t* page) {\n  return (mi_delayed_t)(mi_atomic_load_relaxed(&((mi_page_t*)page)->xthread_free) & 3);\n}\n\n// Heap access\nstatic inline mi_heap_t* mi_page_heap(const mi_page_t* page) {\n  return (mi_heap_t*)(mi_atomic_load_relaxed(&((mi_page_t*)page)->xheap));\n}\n\nstatic inline void mi_page_set_heap(mi_page_t* page, mi_heap_t* heap) {\n  mi_assert_internal(mi_page_thread_free_flag(page) != MI_DELAYED_FREEING);\n  mi_atomic_store_release(&page->xheap,(uintptr_t)heap);\n  if (heap != NULL) { page->heap_tag = heap->tag; }\n}\n\n// Thread free flag helpers\nstatic inline mi_block_t* mi_tf_block(mi_thread_free_t tf) {\n  return (mi_block_t*)(tf & ~0x03);\n}\nstatic inline mi_delayed_t mi_tf_delayed(mi_thread_free_t tf) {\n  return (mi_delayed_t)(tf & 0x03);\n}\nstatic inline mi_thread_free_t mi_tf_make(mi_block_t* block, mi_delayed_t delayed) {\n  return (mi_thread_free_t)((uintptr_t)block | (uintptr_t)delayed);\n}\nstatic inline mi_thread_free_t mi_tf_set_delayed(mi_thread_free_t tf, mi_delayed_t delayed) {\n  return mi_tf_make(mi_tf_block(tf),delayed);\n}\nstatic inline mi_thread_free_t mi_tf_set_block(mi_thread_free_t tf, mi_block_t* block) {\n  return mi_tf_make(block, mi_tf_delayed(tf));\n}\n\n// are all blocks in a page freed?\n// note: needs up-to-date used count, (as the `xthread_free` list may not be empty). see `_mi_page_collect_free`.\nstatic inline bool mi_page_all_free(const mi_page_t* page) {\n  mi_assert_internal(page != NULL);\n  return (page->used == 0);\n}\n\n// are there any available blocks?\nstatic inline bool mi_page_has_any_available(const mi_page_t* page) {\n  mi_assert_internal(page != NULL && page->reserved > 0);\n  return (page->used < page->reserved || (mi_page_thread_free(page) != NULL));\n}\n\n// are there immediately available blocks, i.e. blocks available on the free list.\nstatic inline bool mi_page_immediate_available(const mi_page_t* page) {\n  mi_assert_internal(page != NULL);\n  return (page->free != NULL);\n}\n\n// is more than 7/8th of a page in use?\nstatic inline bool mi_page_is_mostly_used(const mi_page_t* page) {\n  if (page==NULL) return true;\n  uint16_t frac = page->reserved / 8U;\n  return (page->reserved - page->used <= frac);\n}\n\nstatic inline mi_page_queue_t* mi_page_queue(const mi_heap_t* heap, size_t size) {\n  return &((mi_heap_t*)heap)->pages[_mi_bin(size)];\n}\n\n\n\n//-----------------------------------------------------------\n// Page flags\n//-----------------------------------------------------------\nstatic inline bool mi_page_is_in_full(const mi_page_t* page) {\n  return page->flags.x.in_full;\n}\n\nstatic inline void mi_page_set_in_full(mi_page_t* page, bool in_full) {\n  page->flags.x.in_full = in_full;\n}\n\nstatic inline bool mi_page_has_aligned(const mi_page_t* page) {\n  return page->flags.x.has_aligned;\n}\n\nstatic inline void mi_page_set_has_aligned(mi_page_t* page, bool has_aligned) {\n  page->flags.x.has_aligned = has_aligned;\n}\n\n/* -------------------------------------------------------------------\n  Guarded objects\n------------------------------------------------------------------- */\n#if MI_GUARDED\nstatic inline bool mi_block_ptr_is_guarded(const mi_block_t* block, const void* p) {\n  const ptrdiff_t offset = (uint8_t*)p - (uint8_t*)block;\n  return (offset >= (ptrdiff_t)(sizeof(mi_block_t)) && block->next == MI_BLOCK_TAG_GUARDED);\n}\n\nstatic inline bool mi_heap_malloc_use_guarded(mi_heap_t* heap, size_t size) {\n  // this code is written to result in fast assembly as it is on the hot path for allocation\n  const size_t count = heap->guarded_sample_count - 1;  // if the rate was 0, this will underflow and count for a long time..\n  if mi_likely(count != 0) {\n    // no sample\n    heap->guarded_sample_count = count;\n    return false;\n  }\n  else if (size >= heap->guarded_size_min && size <= heap->guarded_size_max) {\n    // use guarded allocation\n    heap->guarded_sample_count = heap->guarded_sample_rate;  // reset\n    return (heap->guarded_sample_rate != 0);\n  }\n  else {\n    // failed size criteria, rewind count (but don't write to an empty heap)\n    if (heap->guarded_sample_rate != 0) { heap->guarded_sample_count = 1; }\n    return false;\n  }\n}\n\nmi_decl_restrict void* _mi_heap_malloc_guarded(mi_heap_t* heap, size_t size, bool zero) mi_attr_noexcept;\n\n#endif\n\n\n/* -------------------------------------------------------------------\nEncoding/Decoding the free list next pointers\n\nThis is to protect against buffer overflow exploits where the\nfree list is mutated. Many hardened allocators xor the next pointer `p`\nwith a secret key `k1`, as `p^k1`. This prevents overwriting with known\nvalues but might be still too weak: if the attacker can guess\nthe pointer `p` this  can reveal `k1` (since `p^k1^p == k1`).\nMoreover, if multiple blocks can be read as well, the attacker can\nxor both as `(p1^k1) ^ (p2^k1) == p1^p2` which may reveal a lot\nabout the pointers (and subsequently `k1`).\n\nInstead mimalloc uses an extra key `k2` and encodes as `((p^k2)<<<k1)+k1`.\nSince these operations are not associative, the above approaches do not\nwork so well any more even if the `p` can be guesstimated. For example,\nfor the read case we can subtract two entries to discard the `+k1` term,\nbut that leads to `((p1^k2)<<<k1) - ((p2^k2)<<<k1)` at best.\nWe include the left-rotation since xor and addition are otherwise linear\nin the lowest bit. Finally, both keys are unique per page which reduces\nthe re-use of keys by a large factor.\n\nWe also pass a separate `null` value to be used as `NULL` or otherwise\n`(k2<<<k1)+k1` would appear (too) often as a sentinel value.\n------------------------------------------------------------------- */\n\nstatic inline bool mi_is_in_same_segment(const void* p, const void* q) {\n  return (_mi_ptr_segment(p) == _mi_ptr_segment(q));\n}\n\nstatic inline bool mi_is_in_same_page(const void* p, const void* q) {\n  mi_segment_t* segment = _mi_ptr_segment(p);\n  if (_mi_ptr_segment(q) != segment) return false;\n  // assume q may be invalid // return (_mi_segment_page_of(segment, p) == _mi_segment_page_of(segment, q));\n  mi_page_t* page = _mi_segment_page_of(segment, p);\n  size_t psize;\n  uint8_t* start = _mi_segment_page_start(segment, page, &psize);\n  return (start <= (uint8_t*)q && (uint8_t*)q < start + psize);\n}\n\nstatic inline uintptr_t mi_rotl(uintptr_t x, uintptr_t shift) {\n  shift %= MI_INTPTR_BITS;\n  return (shift==0 ? x : ((x << shift) | (x >> (MI_INTPTR_BITS - shift))));\n}\nstatic inline uintptr_t mi_rotr(uintptr_t x, uintptr_t shift) {\n  shift %= MI_INTPTR_BITS;\n  return (shift==0 ? x : ((x >> shift) | (x << (MI_INTPTR_BITS - shift))));\n}\n\nstatic inline void* mi_ptr_decode(const void* null, const mi_encoded_t x, const uintptr_t* keys) {\n  void* p = (void*)(mi_rotr(x - keys[0], keys[0]) ^ keys[1]);\n  return (p==null ? NULL : p);\n}\n\nstatic inline mi_encoded_t mi_ptr_encode(const void* null, const void* p, const uintptr_t* keys) {\n  uintptr_t x = (uintptr_t)(p==NULL ? null : p);\n  return mi_rotl(x ^ keys[1], keys[0]) + keys[0];\n}\n\nstatic inline uint32_t mi_ptr_encode_canary(const void* null, const void* p, const uintptr_t* keys) {\n  const uint32_t x = (uint32_t)(mi_ptr_encode(null,p,keys));\n  // make the lowest byte 0 to prevent spurious read overflows which could be a security issue (issue #951)\n  #ifdef MI_BIG_ENDIAN\n  return (x & 0x00FFFFFF);\n  #else\n  return (x & 0xFFFFFF00);\n  #endif\n}\n\nstatic inline mi_block_t* mi_block_nextx( const void* null, const mi_block_t* block, const uintptr_t* keys ) {\n  mi_track_mem_defined(block,sizeof(mi_block_t));\n  mi_block_t* next;\n  #ifdef MI_ENCODE_FREELIST\n  next = (mi_block_t*)mi_ptr_decode(null, block->next, keys);\n  #else\n  MI_UNUSED(keys); MI_UNUSED(null);\n  next = (mi_block_t*)block->next;\n  #endif\n  mi_track_mem_noaccess(block,sizeof(mi_block_t));\n  return next;\n}\n\nstatic inline void mi_block_set_nextx(const void* null, mi_block_t* block, const mi_block_t* next, const uintptr_t* keys) {\n  mi_track_mem_undefined(block,sizeof(mi_block_t));\n  #ifdef MI_ENCODE_FREELIST\n  block->next = mi_ptr_encode(null, next, keys);\n  #else\n  MI_UNUSED(keys); MI_UNUSED(null);\n  block->next = (mi_encoded_t)next;\n  #endif\n  mi_track_mem_noaccess(block,sizeof(mi_block_t));\n}\n\nstatic inline mi_block_t* mi_block_next(const mi_page_t* page, const mi_block_t* block) {\n  #ifdef MI_ENCODE_FREELIST\n  mi_block_t* next = mi_block_nextx(page,block,page->keys);\n  // check for free list corruption: is `next` at least in the same page?\n  // TODO: check if `next` is `page->block_size` aligned?\n  if mi_unlikely(next!=NULL && !mi_is_in_same_page(block, next)) {\n    _mi_error_message(EFAULT, \"corrupted free list entry of size %zub at %p: value 0x%zx\\n\", mi_page_block_size(page), block, (uintptr_t)next);\n    next = NULL;\n  }\n  return next;\n  #else\n  MI_UNUSED(page);\n  return mi_block_nextx(page,block,NULL);\n  #endif\n}\n\nstatic inline void mi_block_set_next(const mi_page_t* page, mi_block_t* block, const mi_block_t* next) {\n  #ifdef MI_ENCODE_FREELIST\n  mi_block_set_nextx(page,block,next, page->keys);\n  #else\n  MI_UNUSED(page);\n  mi_block_set_nextx(page,block,next,NULL);\n  #endif\n}\n\n\n// -------------------------------------------------------------------\n// commit mask\n// -------------------------------------------------------------------\n\nstatic inline void mi_commit_mask_create_empty(mi_commit_mask_t* cm) {\n  for (size_t i = 0; i < MI_COMMIT_MASK_FIELD_COUNT; i++) {\n    cm->mask[i] = 0;\n  }\n}\n\nstatic inline void mi_commit_mask_create_full(mi_commit_mask_t* cm) {\n  for (size_t i = 0; i < MI_COMMIT_MASK_FIELD_COUNT; i++) {\n    cm->mask[i] = ~((size_t)0);\n  }\n}\n\nstatic inline bool mi_commit_mask_is_empty(const mi_commit_mask_t* cm) {\n  for (size_t i = 0; i < MI_COMMIT_MASK_FIELD_COUNT; i++) {\n    if (cm->mask[i] != 0) return false;\n  }\n  return true;\n}\n\nstatic inline bool mi_commit_mask_is_full(const mi_commit_mask_t* cm) {\n  for (size_t i = 0; i < MI_COMMIT_MASK_FIELD_COUNT; i++) {\n    if (cm->mask[i] != ~((size_t)0)) return false;\n  }\n  return true;\n}\n\n// defined in `segment.c`:\nsize_t _mi_commit_mask_committed_size(const mi_commit_mask_t* cm, size_t total);\nsize_t _mi_commit_mask_next_run(const mi_commit_mask_t* cm, size_t* idx);\n\n#define mi_commit_mask_foreach(cm,idx,count) \\\n  idx = 0; \\\n  while ((count = _mi_commit_mask_next_run(cm,&idx)) > 0) {\n\n#define mi_commit_mask_foreach_end() \\\n    idx += count; \\\n  }\n\n\n\n/* -----------------------------------------------------------\n  memory id's\n----------------------------------------------------------- */\n\nstatic inline mi_memid_t _mi_memid_create(mi_memkind_t memkind) {\n  mi_memid_t memid;\n  _mi_memzero_var(memid);\n  memid.memkind = memkind;\n  return memid;\n}\n\nstatic inline mi_memid_t _mi_memid_none(void) {\n  return _mi_memid_create(MI_MEM_NONE);\n}\n\nstatic inline mi_memid_t _mi_memid_create_os(bool committed, bool is_zero, bool is_large) {\n  mi_memid_t memid = _mi_memid_create(MI_MEM_OS);\n  memid.initially_committed = committed;\n  memid.initially_zero = is_zero;\n  memid.is_pinned = is_large;\n  return memid;\n}\n\n\n// -------------------------------------------------------------------\n// Fast \"random\" shuffle\n// -------------------------------------------------------------------\n\nstatic inline uintptr_t _mi_random_shuffle(uintptr_t x) {\n  if (x==0) { x = 17; }   // ensure we don't get stuck in generating zeros\n#if (MI_INTPTR_SIZE>=8)\n  // by Sebastiano Vigna, see: <http://xoshiro.di.unimi.it/splitmix64.c>\n  x ^= x >> 30;\n  x *= 0xbf58476d1ce4e5b9UL;\n  x ^= x >> 27;\n  x *= 0x94d049bb133111ebUL;\n  x ^= x >> 31;\n#elif (MI_INTPTR_SIZE==4)\n  // by Chris Wellons, see: <https://nullprogram.com/blog/2018/07/31/>\n  x ^= x >> 16;\n  x *= 0x7feb352dUL;\n  x ^= x >> 15;\n  x *= 0x846ca68bUL;\n  x ^= x >> 16;\n#endif\n  return x;\n}\n\n// -------------------------------------------------------------------\n// Optimize numa node access for the common case (= one node)\n// -------------------------------------------------------------------\n\nint    _mi_os_numa_node_get(void);\nsize_t _mi_os_numa_node_count_get(void);\n\nextern mi_decl_hidden _Atomic(size_t) _mi_numa_node_count;\nstatic inline int _mi_os_numa_node(void) {\n  if mi_likely(mi_atomic_load_relaxed(&_mi_numa_node_count) == 1) { return 0; }\n  else return _mi_os_numa_node_get();\n}\nstatic inline size_t _mi_os_numa_node_count(void) {\n  const size_t count = mi_atomic_load_relaxed(&_mi_numa_node_count);\n  if mi_likely(count > 0) { return count; }\n  else return _mi_os_numa_node_count_get();\n}\n\n\n\n// -----------------------------------------------------------------------\n// Count bits: trailing or leading zeros (with MI_INTPTR_BITS on all zero)\n// -----------------------------------------------------------------------\n\n#if defined(__GNUC__)\n\n#include <limits.h>       // LONG_MAX\n#define MI_HAVE_FAST_BITSCAN\nstatic inline size_t mi_clz(size_t x) {\n  if (x==0) return MI_SIZE_BITS;\n  #if (SIZE_MAX == ULONG_MAX)\n    return __builtin_clzl(x);\n  #else\n    return __builtin_clzll(x);\n  #endif\n}\nstatic inline size_t mi_ctz(size_t x) {\n  if (x==0) return MI_SIZE_BITS;\n  #if (SIZE_MAX == ULONG_MAX)\n    return __builtin_ctzl(x);\n  #else\n    return __builtin_ctzll(x);\n  #endif\n}\n\n#elif defined(_MSC_VER)\n\n#include <limits.h>       // LONG_MAX\n#include <intrin.h>       // BitScanReverse64\n#define MI_HAVE_FAST_BITSCAN\nstatic inline size_t mi_clz(size_t x) {\n  if (x==0) return MI_SIZE_BITS;\n  unsigned long idx;\n  #if (SIZE_MAX == ULONG_MAX)\n    _BitScanReverse(&idx, x);\n  #else\n    _BitScanReverse64(&idx, x);\n  #endif\n  return ((MI_SIZE_BITS - 1) - idx);\n}\nstatic inline size_t mi_ctz(size_t x) {\n  if (x==0) return MI_SIZE_BITS;\n  unsigned long idx;\n  #if (SIZE_MAX == ULONG_MAX)\n    _BitScanForward(&idx, x);\n  #else\n    _BitScanForward64(&idx, x);\n  #endif\n  return idx;\n}\n\n#else\n\nstatic inline size_t mi_ctz_generic32(uint32_t x) {\n  // de Bruijn multiplication, see <http://supertech.csail.mit.edu/papers/debruijn.pdf>\n  static const uint8_t debruijn[32] = {\n    0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8,\n    31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9\n  };\n  if (x==0) return 32;\n  return debruijn[(uint32_t)((x & -(int32_t)x) * (uint32_t)(0x077CB531U)) >> 27];\n}\n\nstatic inline size_t mi_clz_generic32(uint32_t x) {\n  // de Bruijn multiplication, see <http://supertech.csail.mit.edu/papers/debruijn.pdf>\n  static const uint8_t debruijn[32] = {\n    31, 22, 30, 21, 18, 10, 29, 2, 20, 17, 15, 13, 9, 6, 28, 1,\n    23, 19, 11, 3, 16, 14, 7, 24, 12, 4, 8, 25, 5, 26, 27, 0\n  };\n  if (x==0) return 32;\n  x |= x >> 1;\n  x |= x >> 2;\n  x |= x >> 4;\n  x |= x >> 8;\n  x |= x >> 16;\n  return debruijn[(uint32_t)(x * (uint32_t)(0x07C4ACDDU)) >> 27];\n}\n\nstatic inline size_t mi_ctz(size_t x) {\n  if (x==0) return MI_SIZE_BITS;\n  #if (MI_SIZE_BITS <= 32)\n    return mi_ctz_generic32((uint32_t)x);\n  #else\n    const uint32_t lo = (uint32_t)x;\n    if (lo != 0) {\n      return mi_ctz_generic32(lo);\n    }\n    else {\n      return (32 + mi_ctz_generic32((uint32_t)(x>>32)));\n    }\n  #endif\n}\n\nstatic inline size_t mi_clz(size_t x) {\n  if (x==0) return MI_SIZE_BITS;\n  #if (MI_SIZE_BITS <= 32)\n    return mi_clz_generic32((uint32_t)x);\n  #else\n    const uint32_t hi = (uint32_t)(x>>32);\n    if (hi != 0) {\n      return mi_clz_generic32(hi);\n    }\n    else {\n      return 32 + mi_clz_generic32((uint32_t)x);\n    }\n  #endif\n}\n\n#endif\n\n// \"bit scan reverse\": Return index of the highest bit (or MI_SIZE_BITS if `x` is zero)\nstatic inline size_t mi_bsr(size_t x) {\n  return (x==0 ? MI_SIZE_BITS : MI_SIZE_BITS - 1 - mi_clz(x));\n}\n\n\n// ---------------------------------------------------------------------------------\n// Provide our own `_mi_memcpy` for potential performance optimizations.\n//\n// For now, only on Windows with msvc/clang-cl we optimize to `rep movsb` if\n// we happen to run on x86/x64 cpu's that have \"fast short rep movsb\" (FSRM) support\n// (AMD Zen3+ (~2020) or Intel Ice Lake+ (~2017). See also issue #201 and pr #253.\n// ---------------------------------------------------------------------------------\n\n#if !MI_TRACK_ENABLED && defined(_WIN32) && (defined(_M_IX86) || defined(_M_X64))\n#include <intrin.h>\nextern bool _mi_cpu_has_fsrm;\nextern bool _mi_cpu_has_erms;\nstatic inline void _mi_memcpy(void* dst, const void* src, size_t n) {\n  if ((_mi_cpu_has_fsrm && n <= 128) || (_mi_cpu_has_erms && n > 128)) {\n    __movsb((unsigned char*)dst, (const unsigned char*)src, n);\n  }\n  else {\n    memcpy(dst, src, n);\n  }\n}\nstatic inline void _mi_memzero(void* dst, size_t n) {\n  if ((_mi_cpu_has_fsrm && n <= 128) || (_mi_cpu_has_erms && n > 128)) {\n    __stosb((unsigned char*)dst, 0, n);\n  }\n  else {\n    memset(dst, 0, n);\n  }\n}\n#else\nstatic inline void _mi_memcpy(void* dst, const void* src, size_t n) {\n  memcpy(dst, src, n);\n}\nstatic inline void _mi_memzero(void* dst, size_t n) {\n  memset(dst, 0, n);\n}\n#endif\n\n// -------------------------------------------------------------------------------\n// The `_mi_memcpy_aligned` can be used if the pointers are machine-word aligned\n// This is used for example in `mi_realloc`.\n// -------------------------------------------------------------------------------\n\n#if (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__)\n// On GCC/CLang we provide a hint that the pointers are word aligned.\nstatic inline void _mi_memcpy_aligned(void* dst, const void* src, size_t n) {\n  mi_assert_internal(((uintptr_t)dst % MI_INTPTR_SIZE == 0) && ((uintptr_t)src % MI_INTPTR_SIZE == 0));\n  void* adst = __builtin_assume_aligned(dst, MI_INTPTR_SIZE);\n  const void* asrc = __builtin_assume_aligned(src, MI_INTPTR_SIZE);\n  _mi_memcpy(adst, asrc, n);\n}\n\nstatic inline void _mi_memzero_aligned(void* dst, size_t n) {\n  mi_assert_internal((uintptr_t)dst % MI_INTPTR_SIZE == 0);\n  void* adst = __builtin_assume_aligned(dst, MI_INTPTR_SIZE);\n  _mi_memzero(adst, n);\n}\n#else\n// Default fallback on `_mi_memcpy`\nstatic inline void _mi_memcpy_aligned(void* dst, const void* src, size_t n) {\n  mi_assert_internal(((uintptr_t)dst % MI_INTPTR_SIZE == 0) && ((uintptr_t)src % MI_INTPTR_SIZE == 0));\n  _mi_memcpy(dst, src, n);\n}\n\nstatic inline void _mi_memzero_aligned(void* dst, size_t n) {\n  mi_assert_internal((uintptr_t)dst % MI_INTPTR_SIZE == 0);\n  _mi_memzero(dst, n);\n}\n#endif\n\n\n#endif\n"
  },
  {
    "path": "third-party/mimalloc/include/mimalloc/prim.h",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2024, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#pragma once\n#ifndef MIMALLOC_PRIM_H\n#define MIMALLOC_PRIM_H\n\n\n// --------------------------------------------------------------------------\n// This file specifies the primitive portability API.\n// Each OS/host needs to implement these primitives, see `src/prim`\n// for implementations on Window, macOS, WASI, and Linux/Unix.\n//\n// note: on all primitive functions, we always have result parameters != NULL, and:\n//  addr != NULL and page aligned\n//  size > 0     and page aligned\n//  the return value is an error code as an `int` where 0 is success\n// --------------------------------------------------------------------------\n\n// OS memory configuration\ntypedef struct mi_os_mem_config_s {\n  size_t  page_size;              // default to 4KiB\n  size_t  large_page_size;        // 0 if not supported, usually 2MiB (4MiB on Windows)\n  size_t  alloc_granularity;      // smallest allocation size (usually 4KiB, on Windows 64KiB)\n  size_t  physical_memory_in_kib; // physical memory size in KiB\n  size_t  virtual_address_bits;   // usually 48 or 56 bits on 64-bit systems. (used to determine secure randomization)\n  bool    has_overcommit;         // can we reserve more memory than can be actually committed?\n  bool    has_partial_free;       // can allocated blocks be freed partially? (true for mmap, false for VirtualAlloc)\n  bool    has_virtual_reserve;    // supports virtual address space reservation? (if true we can reserve virtual address space without using commit or physical memory)\n} mi_os_mem_config_t;\n\n// Initialize\nvoid _mi_prim_mem_init( mi_os_mem_config_t* config );\n\n// Free OS memory\nint _mi_prim_free(void* addr, size_t size );\n\n// Allocate OS memory. Return NULL on error.\n// The `try_alignment` is just a hint and the returned pointer does not have to be aligned.\n// If `commit` is false, the virtual memory range only needs to be reserved (with no access)\n// which will later be committed explicitly using `_mi_prim_commit`.\n// `is_zero` is set to true if the memory was zero initialized (as on most OS's)\n// The `hint_addr` address is either `NULL` or a preferred allocation address but can be ignored.\n// pre: !commit => !allow_large\n//      try_alignment >= _mi_os_page_size() and a power of 2\nint _mi_prim_alloc(void* hint_addr, size_t size, size_t try_alignment, bool commit, bool allow_large, bool* is_large, bool* is_zero, void** addr);\n\n// Commit memory. Returns error code or 0 on success.\n// For example, on Linux this would make the memory PROT_READ|PROT_WRITE.\n// `is_zero` is set to true if the memory was zero initialized (e.g. on Windows)\nint _mi_prim_commit(void* addr, size_t size, bool* is_zero);\n\n// Decommit memory. Returns error code or 0 on success. The `needs_recommit` result is true\n// if the memory would need to be re-committed. For example, on Windows this is always true,\n// but on Linux we could use MADV_DONTNEED to decommit which does not need a recommit.\n// pre: needs_recommit != NULL\nint _mi_prim_decommit(void* addr, size_t size, bool* needs_recommit);\n\n// Reset memory. The range keeps being accessible but the content might be reset.\n// Returns error code or 0 on success.\nint _mi_prim_reset(void* addr, size_t size);\n\n// Protect memory. Returns error code or 0 on success.\nint _mi_prim_protect(void* addr, size_t size, bool protect);\n\n// Allocate huge (1GiB) pages possibly associated with a NUMA node.\n// `is_zero` is set to true if the memory was zero initialized (as on most OS's)\n// pre: size > 0  and a multiple of 1GiB.\n//      numa_node is either negative (don't care), or a numa node number.\nint _mi_prim_alloc_huge_os_pages(void* hint_addr, size_t size, int numa_node, bool* is_zero, void** addr);\n\n// Return the current NUMA node\nsize_t _mi_prim_numa_node(void);\n\n// Return the number of logical NUMA nodes\nsize_t _mi_prim_numa_node_count(void);\n\n// Clock ticks\nmi_msecs_t _mi_prim_clock_now(void);\n\n// Return process information (only for statistics)\ntypedef struct mi_process_info_s {\n  mi_msecs_t  elapsed;\n  mi_msecs_t  utime;\n  mi_msecs_t  stime;\n  size_t      current_rss;\n  size_t      peak_rss;\n  size_t      current_commit;\n  size_t      peak_commit;\n  size_t      page_faults;\n} mi_process_info_t;\n\nvoid _mi_prim_process_info(mi_process_info_t* pinfo);\n\n// Default stderr output. (only for warnings etc. with verbose enabled)\n// msg != NULL && _mi_strlen(msg) > 0\nvoid _mi_prim_out_stderr( const char* msg );\n\n// Get an environment variable. (only for options)\n// name != NULL, result != NULL, result_size >= 64\nbool _mi_prim_getenv(const char* name, char* result, size_t result_size);\n\n\n// Fill a buffer with strong randomness; return `false` on error or if\n// there is no strong randomization available.\nbool _mi_prim_random_buf(void* buf, size_t buf_len);\n\n// Called on the first thread start, and should ensure `_mi_thread_done` is called on thread termination.\nvoid _mi_prim_thread_init_auto_done(void);\n\n// Called on process exit and may take action to clean up resources associated with the thread auto done.\nvoid _mi_prim_thread_done_auto_done(void);\n\n// Called when the default heap for a thread changes\nvoid _mi_prim_thread_associate_default_heap(mi_heap_t* heap);\n\n\n\n\n\n//-------------------------------------------------------------------\n// Access to TLS (thread local storage) slots.\n// We need fast access to both a unique thread id (in `free.c:mi_free`) and\n// to a thread-local heap pointer (in `alloc.c:mi_malloc`).\n// To achieve this we use specialized code for various platforms.\n//-------------------------------------------------------------------\n\n// On some libc + platform combinations we can directly access a thread-local storage (TLS) slot.\n// The TLS layout depends on both the OS and libc implementation so we use specific tests for each main platform.\n// If you test on another platform and it works please send a PR :-)\n// see also https://akkadia.org/drepper/tls.pdf for more info on the TLS register.\n//\n// Note: we would like to prefer `__builtin_thread_pointer()` nowadays instead of using assembly,\n// but unfortunately we can not detect support reliably (see issue #883)\n// We also use it on Apple OS as we use a TLS slot for the default heap there.\n#if defined(__GNUC__) && ( \\\n           (defined(__GLIBC__)   && (defined(__x86_64__) || defined(__i386__) || (defined(__arm__) && __ARM_ARCH >= 7) || defined(__aarch64__))) \\\n        || (defined(__APPLE__)   && (defined(__x86_64__) || defined(__aarch64__) || defined(__POWERPC__))) \\\n        || (defined(__BIONIC__)  && (defined(__x86_64__) || defined(__i386__) || (defined(__arm__) && __ARM_ARCH >= 7) || defined(__aarch64__))) \\\n        || (defined(__FreeBSD__) && (defined(__x86_64__) || defined(__i386__) || defined(__aarch64__))) \\\n        || (defined(__OpenBSD__) && (defined(__x86_64__) || defined(__i386__) || defined(__aarch64__))) \\\n      )\n\n#define MI_HAS_TLS_SLOT    1\n\nstatic inline void* mi_prim_tls_slot(size_t slot) mi_attr_noexcept {\n  void* res;\n  const size_t ofs = (slot*sizeof(void*));\n  #if defined(__i386__)\n    __asm__(\"movl %%gs:%1, %0\" : \"=r\" (res) : \"m\" (*((void**)ofs)) : );  // x86 32-bit always uses GS\n  #elif defined(__APPLE__) && defined(__x86_64__)\n    __asm__(\"movq %%gs:%1, %0\" : \"=r\" (res) : \"m\" (*((void**)ofs)) : );  // x86_64 macOSX uses GS\n  #elif defined(__x86_64__) && (MI_INTPTR_SIZE==4)\n    __asm__(\"movl %%fs:%1, %0\" : \"=r\" (res) : \"m\" (*((void**)ofs)) : );  // x32 ABI\n  #elif defined(__x86_64__)\n    __asm__(\"movq %%fs:%1, %0\" : \"=r\" (res) : \"m\" (*((void**)ofs)) : );  // x86_64 Linux, BSD uses FS\n  #elif defined(__arm__)\n    void** tcb; MI_UNUSED(ofs);\n    __asm__ volatile (\"mrc p15, 0, %0, c13, c0, 3\\nbic %0, %0, #3\" : \"=r\" (tcb));\n    res = tcb[slot];\n  #elif defined(__aarch64__)\n    void** tcb; MI_UNUSED(ofs);\n    #if defined(__APPLE__) // M1, issue #343\n    __asm__ volatile (\"mrs %0, tpidrro_el0\\nbic %0, %0, #7\" : \"=r\" (tcb));\n    #else\n    __asm__ volatile (\"mrs %0, tpidr_el0\" : \"=r\" (tcb));\n    #endif\n    res = tcb[slot];\n  #elif defined(__APPLE__) && defined(__POWERPC__) // ppc, issue #781\n    MI_UNUSED(ofs);\n    res = pthread_getspecific(slot);\n  #endif\n  return res;\n}\n\n// setting a tls slot is only used on macOS for now\nstatic inline void mi_prim_tls_slot_set(size_t slot, void* value) mi_attr_noexcept {\n  const size_t ofs = (slot*sizeof(void*));\n  #if defined(__i386__)\n    __asm__(\"movl %1,%%gs:%0\" : \"=m\" (*((void**)ofs)) : \"rn\" (value) : );  // 32-bit always uses GS\n  #elif defined(__APPLE__) && defined(__x86_64__)\n    __asm__(\"movq %1,%%gs:%0\" : \"=m\" (*((void**)ofs)) : \"rn\" (value) : );  // x86_64 macOS uses GS\n  #elif defined(__x86_64__) && (MI_INTPTR_SIZE==4)\n    __asm__(\"movl %1,%%fs:%0\" : \"=m\" (*((void**)ofs)) : \"rn\" (value) : );  // x32 ABI\n  #elif defined(__x86_64__)\n    __asm__(\"movq %1,%%fs:%0\" : \"=m\" (*((void**)ofs)) : \"rn\" (value) : );  // x86_64 Linux, BSD uses FS\n  #elif defined(__arm__)\n    void** tcb; MI_UNUSED(ofs);\n    __asm__ volatile (\"mrc p15, 0, %0, c13, c0, 3\\nbic %0, %0, #3\" : \"=r\" (tcb));\n    tcb[slot] = value;\n  #elif defined(__aarch64__)\n    void** tcb; MI_UNUSED(ofs);\n    #if defined(__APPLE__) // M1, issue #343\n    __asm__ volatile (\"mrs %0, tpidrro_el0\\nbic %0, %0, #7\" : \"=r\" (tcb));\n    #else\n    __asm__ volatile (\"mrs %0, tpidr_el0\" : \"=r\" (tcb));\n    #endif\n    tcb[slot] = value;\n  #elif defined(__APPLE__) && defined(__POWERPC__) // ppc, issue #781\n    MI_UNUSED(ofs);\n    pthread_setspecific(slot, value);\n  #endif\n}\n\n#elif _WIN32 && MI_WIN_USE_FIXED_TLS && !defined(MI_WIN_USE_FLS)\n\n// On windows we can store the thread-local heap at a fixed TLS slot to avoid\n// thread-local initialization checks in the fast path. This uses a fixed location\n// in the TCB though (last user-reserved slot by default) which may clash with other applications.\n\n#define MI_HAS_TLS_SLOT      2              // 2 = we can reliably initialize the slot (saving a test on each malloc)\n\n#if MI_WIN_USE_FIXED_TLS > 1\n#define MI_TLS_SLOT     (MI_WIN_USE_FIXED_TLS)\n#elif MI_SIZE_SIZE == 4\n#define MI_TLS_SLOT     (0x710)             // Last user-reserved slot <https://en.wikipedia.org/wiki/Win32_Thread_Information_Block>\n// #define MI_TLS_SLOT  (0xF0C)             // Last TlsSlot (might clash with other app reserved slot)\n#else\n#define MI_TLS_SLOT     (0x888)             // Last user-reserved slot <https://en.wikipedia.org/wiki/Win32_Thread_Information_Block>\n// #define MI_TLS_SLOT  (0x1678)            // Last TlsSlot (might clash with other app reserved slot)\n#endif\n\nstatic inline void* mi_prim_tls_slot(size_t slot) mi_attr_noexcept {\n  #if (_M_X64 || _M_AMD64) && !defined(_M_ARM64EC)\n  return (void*)__readgsqword((unsigned long)slot);   // direct load at offset from gs\n  #elif _M_IX86 && !defined(_M_ARM64EC)\n  return (void*)__readfsdword((unsigned long)slot);   // direct load at offset from fs\n  #else\n  return ((void**)NtCurrentTeb())[slot / sizeof(void*)];\n  #endif\n}\nstatic inline void mi_prim_tls_slot_set(size_t slot, void* value) mi_attr_noexcept {\n  ((void**)NtCurrentTeb())[slot / sizeof(void*)] = value;\n}\n\n#endif\n\n\n\n//-------------------------------------------------------------------\n// Get a fast unique thread id.\n//\n// Getting the thread id should be performant as it is called in the\n// fast path of `_mi_free` and we specialize for various platforms as\n// inlined definitions. Regular code should call `init.c:_mi_thread_id()`.\n// We only require _mi_prim_thread_id() to return a unique id\n// for each thread (unequal to zero).\n//-------------------------------------------------------------------\n\n\n// Do we have __builtin_thread_pointer? This would be the preferred way to get a unique thread id\n// but unfortunately, it seems we cannot test for this reliably at this time (see issue #883)\n// Nevertheless, it seems needed on older graviton platforms (see issue #851).\n// For now, we only enable this for specific platforms.\n#if !defined(__APPLE__)  /* on apple (M1) the wrong register is read (tpidr_el0 instead of tpidrro_el0) so fall back to TLS slot assembly (<https://github.com/microsoft/mimalloc/issues/343#issuecomment-763272369>)*/ \\\n    && !defined(__CYGWIN__) \\\n    && !defined(MI_LIBC_MUSL) \\\n    && (!defined(__clang_major__) || __clang_major__ >= 14)  /* older clang versions emit bad code; fall back to using the TLS slot (<https://lore.kernel.org/linux-arm-kernel/202110280952.352F66D8@keescook/T/>) */\n  #if    (defined(__GNUC__) && (__GNUC__ >= 7)  && defined(__aarch64__)) /* aarch64 for older gcc versions (issue #851) */ \\\n      || (defined(__GNUC__) && (__GNUC__ >= 11) && defined(__x86_64__)) \\\n      || (defined(__clang_major__) && (__clang_major__ >= 14) && (defined(__aarch64__) || defined(__x86_64__)))\n    #define MI_USE_BUILTIN_THREAD_POINTER  1\n  #endif\n#endif\n\n\n\n// defined in `init.c`; do not use these directly\nextern mi_decl_thread mi_heap_t* _mi_heap_default;  // default heap to allocate from\nextern bool _mi_process_is_initialized;             // has mi_process_init been called?\n\nstatic inline mi_threadid_t _mi_prim_thread_id(void) mi_attr_noexcept;\n\n// Get a unique id for the current thread.\n#if defined(MI_PRIM_THREAD_ID)\n\nstatic inline mi_threadid_t _mi_prim_thread_id(void) mi_attr_noexcept {\n  return MI_PRIM_THREAD_ID();  // used for example by CPython for a free threaded build (see python/cpython#115488)\n}\n\n#elif defined(_WIN32)\n\nstatic inline mi_threadid_t _mi_prim_thread_id(void) mi_attr_noexcept {\n  // Windows: works on Intel and ARM in both 32- and 64-bit\n  return (uintptr_t)NtCurrentTeb();\n}\n\n#elif MI_USE_BUILTIN_THREAD_POINTER\n\nstatic inline mi_threadid_t _mi_prim_thread_id(void) mi_attr_noexcept {\n  // Works on most Unix based platforms with recent compilers\n  return (uintptr_t)__builtin_thread_pointer();\n}\n\n#elif MI_HAS_TLS_SLOT\n\nstatic inline mi_threadid_t _mi_prim_thread_id(void) mi_attr_noexcept {\n  #if defined(__BIONIC__)\n    // issue #384, #495: on the Bionic libc (Android), slot 1 is the thread id\n    // see: https://github.com/aosp-mirror/platform_bionic/blob/c44b1d0676ded732df4b3b21c5f798eacae93228/libc/platform/bionic/tls_defines.h#L86\n    return (uintptr_t)mi_prim_tls_slot(1);\n  #else\n    // in all our other targets, slot 0 is the thread id\n    // glibc: https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=sysdeps/x86_64/nptl/tls.h\n    // apple: https://github.com/apple/darwin-xnu/blob/main/libsyscall/os/tsd.h#L36\n    return (uintptr_t)mi_prim_tls_slot(0);\n  #endif\n}\n\n#else\n\n// otherwise use portable C, taking the address of a thread local variable (this is still very fast on most platforms).\nstatic inline mi_threadid_t _mi_prim_thread_id(void) mi_attr_noexcept {\n  return (uintptr_t)&_mi_heap_default;\n}\n\n#endif\n\n\n\n/* ----------------------------------------------------------------------------------------\nGet the thread local default heap: `_mi_prim_get_default_heap()`\n\nThis is inlined here as it is on the fast path for allocation functions.\n\nOn most platforms (Windows, Linux, FreeBSD, NetBSD, etc), this just returns a\n__thread local variable (`_mi_heap_default`). With the initial-exec TLS model this ensures\nthat the storage will always be available (allocated on the thread stacks).\n\nOn some platforms though we cannot use that when overriding `malloc` since the underlying\nTLS implementation (or the loader) will call itself `malloc` on a first access and recurse.\nWe try to circumvent this in an efficient way:\n- macOSX : we use an unused TLS slot from the OS allocated slots (MI_TLS_SLOT). On OSX, the\n           loader itself calls `malloc` even before the modules are initialized.\n- OpenBSD: we use an unused slot from the pthread block (MI_TLS_PTHREAD_SLOT_OFS).\n- DragonFly: defaults are working but seem slow compared to freeBSD (see PR #323)\n------------------------------------------------------------------------------------------- */\n\nstatic inline mi_heap_t* mi_prim_get_default_heap(void);\n\n#if defined(MI_MALLOC_OVERRIDE)\n#if defined(__APPLE__) // macOS\n  #define MI_TLS_SLOT               89  // seems unused?\n  // other possible unused ones are 9, 29, __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY4 (94), __PTK_FRAMEWORK_GC_KEY9 (112) and __PTK_FRAMEWORK_OLDGC_KEY9 (89)\n  // see <https://github.com/rweichler/substrate/blob/master/include/pthread_machdep.h>\n#elif defined(__OpenBSD__)\n  // use end bytes of a name; goes wrong if anyone uses names > 23 characters (ptrhread specifies 16)\n  // see <https://github.com/openbsd/src/blob/master/lib/libc/include/thread_private.h#L371>\n  #define MI_TLS_PTHREAD_SLOT_OFS   (6*sizeof(int) + 4*sizeof(void*) + 24)\n  // #elif defined(__DragonFly__)\n  // #warning \"mimalloc is not working correctly on DragonFly yet.\"\n  // #define MI_TLS_PTHREAD_SLOT_OFS   (4 + 1*sizeof(void*))  // offset `uniqueid` (also used by gdb?) <https://github.com/DragonFlyBSD/DragonFlyBSD/blob/master/lib/libthread_xu/thread/thr_private.h#L458>\n#elif defined(__ANDROID__)\n  // See issue #381\n  #define MI_TLS_PTHREAD\n#endif\n#endif\n\n\n#if MI_TLS_SLOT\n# if !defined(MI_HAS_TLS_SLOT)\n#  error \"trying to use a TLS slot for the default heap, but the mi_prim_tls_slot primitives are not defined\"\n# endif\n\nstatic inline mi_heap_t* mi_prim_get_default_heap(void) {\n  mi_heap_t* heap = (mi_heap_t*)mi_prim_tls_slot(MI_TLS_SLOT);\n  #if MI_HAS_TLS_SLOT == 1   // check if the TLS slot is initialized\n  if mi_unlikely(heap == NULL) {\n    #ifdef __GNUC__\n    __asm(\"\"); // prevent conditional load of the address of _mi_heap_empty\n    #endif\n    heap = (mi_heap_t*)&_mi_heap_empty;\n  }\n  #endif\n  return heap;\n}\n\n#elif defined(MI_TLS_PTHREAD_SLOT_OFS)\n\nstatic inline mi_heap_t** mi_prim_tls_pthread_heap_slot(void) {\n  pthread_t self = pthread_self();\n  #if defined(__DragonFly__)\n  if (self==NULL) return NULL;\n  #endif\n  return (mi_heap_t**)((uint8_t*)self + MI_TLS_PTHREAD_SLOT_OFS);\n}\n\nstatic inline mi_heap_t* mi_prim_get_default_heap(void) {\n  mi_heap_t** pheap = mi_prim_tls_pthread_heap_slot();\n  if mi_unlikely(pheap == NULL) return _mi_heap_main_get();\n  mi_heap_t* heap = *pheap;\n  if mi_unlikely(heap == NULL) return (mi_heap_t*)&_mi_heap_empty;\n  return heap;\n}\n\n#elif defined(MI_TLS_PTHREAD)\n\nextern pthread_key_t _mi_heap_default_key;\nstatic inline mi_heap_t* mi_prim_get_default_heap(void) {\n  mi_heap_t* heap = (mi_unlikely(_mi_heap_default_key == (pthread_key_t)(-1)) ? _mi_heap_main_get() : (mi_heap_t*)pthread_getspecific(_mi_heap_default_key));\n  return (mi_unlikely(heap == NULL) ? (mi_heap_t*)&_mi_heap_empty : heap);\n}\n\n#else // default using a thread local variable; used on most platforms.\n\nstatic inline mi_heap_t* mi_prim_get_default_heap(void) {\n  #if defined(MI_TLS_RECURSE_GUARD)\n  if (mi_unlikely(!_mi_process_is_initialized)) return _mi_heap_main_get();\n  #endif\n  return _mi_heap_default;\n}\n\n#endif  // mi_prim_get_default_heap()\n\n\n#endif  // MIMALLOC_PRIM_H\n"
  },
  {
    "path": "third-party/mimalloc/include/mimalloc/track.h",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2023, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#pragma once\n#ifndef MIMALLOC_TRACK_H\n#define MIMALLOC_TRACK_H\n\n/* ------------------------------------------------------------------------------------------------------\nTrack memory ranges with macros for tools like Valgrind address sanitizer, or other memory checkers.\nThese can be defined for tracking allocation:\n\n  #define mi_track_malloc_size(p,reqsize,size,zero)\n  #define mi_track_free_size(p,_size)\n\nThe macros are set up such that the size passed to `mi_track_free_size`\nalways matches the size of `mi_track_malloc_size`. (currently, `size == mi_usable_size(p)`).\nThe `reqsize` is what the user requested, and `size >= reqsize`.\nThe `size` is either byte precise (and `size==reqsize`) if `MI_PADDING` is enabled,\nor otherwise it is the usable block size which may be larger than the original request.\nUse `_mi_block_size_of(void* p)` to get the full block size that was allocated (including padding etc).\nThe `zero` parameter is `true` if the allocated block is zero initialized.\n\nOptional:\n\n  #define mi_track_align(p,alignedp,offset,size)\n  #define mi_track_resize(p,oldsize,newsize)\n  #define mi_track_init()\n\nThe `mi_track_align` is called right after a `mi_track_malloc` for aligned pointers in a block.\nThe corresponding `mi_track_free` still uses the block start pointer and original size (corresponding to the `mi_track_malloc`).\nThe `mi_track_resize` is currently unused but could be called on reallocations within a block.\n`mi_track_init` is called at program start.\n\nThe following macros are for tools like asan and valgrind to track whether memory is\ndefined, undefined, or not accessible at all:\n\n  #define mi_track_mem_defined(p,size)\n  #define mi_track_mem_undefined(p,size)\n  #define mi_track_mem_noaccess(p,size)\n\n-------------------------------------------------------------------------------------------------------*/\n\n#if MI_TRACK_VALGRIND\n// valgrind tool\n\n#define MI_TRACK_ENABLED      1\n#define MI_TRACK_HEAP_DESTROY 1           // track free of individual blocks on heap_destroy\n#define MI_TRACK_TOOL         \"valgrind\"\n\n#include <valgrind/valgrind.h>\n#include <valgrind/memcheck.h>\n\n#define mi_track_malloc_size(p,reqsize,size,zero) VALGRIND_MALLOCLIKE_BLOCK(p,size,MI_PADDING_SIZE /*red zone*/,zero)\n#define mi_track_free_size(p,_size)               VALGRIND_FREELIKE_BLOCK(p,MI_PADDING_SIZE /*red zone*/)\n#define mi_track_resize(p,oldsize,newsize)        VALGRIND_RESIZEINPLACE_BLOCK(p,oldsize,newsize,MI_PADDING_SIZE /*red zone*/)\n#define mi_track_mem_defined(p,size)              VALGRIND_MAKE_MEM_DEFINED(p,size)\n#define mi_track_mem_undefined(p,size)            VALGRIND_MAKE_MEM_UNDEFINED(p,size)\n#define mi_track_mem_noaccess(p,size)             VALGRIND_MAKE_MEM_NOACCESS(p,size)\n\n#elif MI_TRACK_ASAN\n// address sanitizer\n\n#define MI_TRACK_ENABLED      1\n#define MI_TRACK_HEAP_DESTROY 0\n#define MI_TRACK_TOOL         \"asan\"\n\n#include <sanitizer/asan_interface.h>\n\n#define mi_track_malloc_size(p,reqsize,size,zero) ASAN_UNPOISON_MEMORY_REGION(p,size)\n#define mi_track_free_size(p,size)                ASAN_POISON_MEMORY_REGION(p,size)\n#define mi_track_mem_defined(p,size)              ASAN_UNPOISON_MEMORY_REGION(p,size)\n#define mi_track_mem_undefined(p,size)            ASAN_UNPOISON_MEMORY_REGION(p,size)\n#define mi_track_mem_noaccess(p,size)             ASAN_POISON_MEMORY_REGION(p,size)\n\n#elif MI_TRACK_ETW\n// windows event tracing\n\n#define MI_TRACK_ENABLED      1\n#define MI_TRACK_HEAP_DESTROY 1\n#define MI_TRACK_TOOL         \"ETW\"\n\n#include \"../src/prim/windows/etw.h\"\n\n#define mi_track_init()                           EventRegistermicrosoft_windows_mimalloc();\n#define mi_track_malloc_size(p,reqsize,size,zero) EventWriteETW_MI_ALLOC((UINT64)(p), size)\n#define mi_track_free_size(p,size)                EventWriteETW_MI_FREE((UINT64)(p), size)\n\n#else\n// no tracking\n\n#define MI_TRACK_ENABLED      0\n#define MI_TRACK_HEAP_DESTROY 0\n#define MI_TRACK_TOOL         \"none\"\n\n#define mi_track_malloc_size(p,reqsize,size,zero)\n#define mi_track_free_size(p,_size)\n\n#endif\n\n// -------------------\n// Utility definitions\n\n#ifndef mi_track_resize\n#define mi_track_resize(p,oldsize,newsize)      mi_track_free_size(p,oldsize); mi_track_malloc(p,newsize,false)\n#endif\n\n#ifndef mi_track_align\n#define mi_track_align(p,alignedp,offset,size)  mi_track_mem_noaccess(p,offset)\n#endif\n\n#ifndef mi_track_init\n#define mi_track_init()\n#endif\n\n#ifndef mi_track_mem_defined\n#define mi_track_mem_defined(p,size)\n#endif\n\n#ifndef mi_track_mem_undefined\n#define mi_track_mem_undefined(p,size)\n#endif\n\n#ifndef mi_track_mem_noaccess\n#define mi_track_mem_noaccess(p,size)\n#endif\n\n\n#if MI_PADDING\n#define mi_track_malloc(p,reqsize,zero) \\\n  if ((p)!=NULL) { \\\n    mi_assert_internal(mi_usable_size(p)==(reqsize)); \\\n    mi_track_malloc_size(p,reqsize,reqsize,zero); \\\n  }\n#else\n#define mi_track_malloc(p,reqsize,zero) \\\n  if ((p)!=NULL) { \\\n    mi_assert_internal(mi_usable_size(p)>=(reqsize)); \\\n    mi_track_malloc_size(p,reqsize,mi_usable_size(p),zero); \\\n  }\n#endif\n\n#endif\n"
  },
  {
    "path": "third-party/mimalloc/include/mimalloc/types.h",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2024, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#pragma once\n#ifndef MIMALLOC_TYPES_H\n#define MIMALLOC_TYPES_H\n\n// --------------------------------------------------------------------------\n// This file contains the main type definitions for mimalloc:\n// mi_heap_t      : all data for a thread-local heap, contains\n//                  lists of all managed heap pages.\n// mi_segment_t   : a larger chunk of memory (32GiB) from where pages\n//                  are allocated. A segment is divided in slices (64KiB) from\n//                  which pages are allocated.\n// mi_page_t      : a \"mimalloc\" page (usually 64KiB or 512KiB) from\n//                  where objects are allocated.\n//                  Note: we write \"OS page\" for OS memory pages while\n//                  using plain \"page\" for mimalloc pages (`mi_page_t`).\n// --------------------------------------------------------------------------\n\n\n#include <mimalloc-stats.h>\n#include <stddef.h>   // ptrdiff_t\n#include <stdint.h>   // uintptr_t, uint16_t, etc\n#include \"atomic.h\"   // _Atomic\n\n#ifdef _MSC_VER\n#pragma warning(disable:4214) // bitfield is not int\n#endif\n\n// Minimal alignment necessary. On most platforms 16 bytes are needed\n// due to SSE registers for example. This must be at least `sizeof(void*)`\n#ifndef MI_MAX_ALIGN_SIZE\n#define MI_MAX_ALIGN_SIZE  16   // sizeof(max_align_t)\n#endif\n\n// ------------------------------------------------------\n// Variants\n// ------------------------------------------------------\n\n// Define NDEBUG in the release version to disable assertions.\n// #define NDEBUG\n\n// Define MI_TRACK_<tool> to enable tracking support\n// #define MI_TRACK_VALGRIND 1\n// #define MI_TRACK_ASAN     1\n// #define MI_TRACK_ETW      1\n\n// Define MI_STAT as 1 to maintain statistics; set it to 2 to have detailed statistics (but costs some performance).\n// #define MI_STAT 1\n\n// Define MI_SECURE to enable security mitigations\n// #define MI_SECURE 1  // guard page around metadata\n// #define MI_SECURE 2  // guard page around each mimalloc page\n// #define MI_SECURE 3  // encode free lists (detect corrupted free list (buffer overflow), and invalid pointer free)\n// #define MI_SECURE 4  // checks for double free. (may be more expensive)\n\n#if !defined(MI_SECURE)\n#define MI_SECURE 0\n#endif\n\n// Define MI_DEBUG for debug mode\n// #define MI_DEBUG 1  // basic assertion checks and statistics, check double free, corrupted free list, and invalid pointer free.\n// #define MI_DEBUG 2  // + internal assertion checks\n// #define MI_DEBUG 3  // + extensive internal invariant checking (cmake -DMI_DEBUG_FULL=ON)\n#if !defined(MI_DEBUG)\n#if !defined(NDEBUG) || defined(_DEBUG)\n#define MI_DEBUG 2\n#else\n#define MI_DEBUG 0\n#endif\n#endif\n\n// Use guard pages behind objects of a certain size (set by the MIMALLOC_DEBUG_GUARDED_MIN/MAX options)\n// Padding should be disabled when using guard pages\n// #define MI_GUARDED 1\n#if defined(MI_GUARDED)\n#define MI_PADDING  0\n#endif\n\n// Reserve extra padding at the end of each block to be more resilient against heap block overflows.\n// The padding can detect buffer overflow on free.\n#if !defined(MI_PADDING) && (MI_SECURE>=3 || MI_DEBUG>=1 || (MI_TRACK_VALGRIND || MI_TRACK_ASAN || MI_TRACK_ETW))\n#define MI_PADDING  1\n#endif\n\n// Check padding bytes; allows byte-precise buffer overflow detection\n#if !defined(MI_PADDING_CHECK) && MI_PADDING && (MI_SECURE>=3 || MI_DEBUG>=1)\n#define MI_PADDING_CHECK 1\n#endif\n\n\n// Encoded free lists allow detection of corrupted free lists\n// and can detect buffer overflows, modify after free, and double `free`s.\n#if (MI_SECURE>=3 || MI_DEBUG>=1)\n#define MI_ENCODE_FREELIST  1\n#endif\n\n\n// We used to abandon huge pages in order to eagerly deallocate it if freed from another thread.\n// Unfortunately, that makes it not possible to visit them during a heap walk or include them in a\n// `mi_heap_destroy`. We therefore instead reset/decommit the huge blocks nowadays if freed from\n// another thread so the memory becomes \"virtually\" available (and eventually gets properly freed by\n// the owning thread).\n// #define MI_HUGE_PAGE_ABANDON 1\n\n\n// ------------------------------------------------------\n// Platform specific values\n// ------------------------------------------------------\n\n// ------------------------------------------------------\n// Size of a pointer.\n// We assume that `sizeof(void*)==sizeof(intptr_t)`\n// and it holds for all platforms we know of.\n//\n// However, the C standard only requires that:\n//  p == (void*)((intptr_t)p))\n// but we also need:\n//  i == (intptr_t)((void*)i)\n// or otherwise one might define an intptr_t type that is larger than a pointer...\n// ------------------------------------------------------\n\n#if INTPTR_MAX > INT64_MAX\n# define MI_INTPTR_SHIFT (4)  // assume 128-bit  (as on arm CHERI for example)\n#elif INTPTR_MAX == INT64_MAX\n# define MI_INTPTR_SHIFT (3)\n#elif INTPTR_MAX == INT32_MAX\n# define MI_INTPTR_SHIFT (2)\n#else\n#error platform pointers must be 32, 64, or 128 bits\n#endif\n\n#if SIZE_MAX == UINT64_MAX\n# define MI_SIZE_SHIFT (3)\ntypedef int64_t  mi_ssize_t;\n#elif SIZE_MAX == UINT32_MAX\n# define MI_SIZE_SHIFT (2)\ntypedef int32_t  mi_ssize_t;\n#else\n#error platform objects must be 32 or 64 bits\n#endif\n\n#if (SIZE_MAX/2) > LONG_MAX\n# define MI_ZU(x)  x##ULL\n# define MI_ZI(x)  x##LL\n#else\n# define MI_ZU(x)  x##UL\n# define MI_ZI(x)  x##L\n#endif\n\n#define MI_INTPTR_SIZE  (1<<MI_INTPTR_SHIFT)\n#define MI_INTPTR_BITS  (MI_INTPTR_SIZE*8)\n\n#define MI_SIZE_SIZE  (1<<MI_SIZE_SHIFT)\n#define MI_SIZE_BITS  (MI_SIZE_SIZE*8)\n\n#define MI_KiB     (MI_ZU(1024))\n#define MI_MiB     (MI_KiB*MI_KiB)\n#define MI_GiB     (MI_MiB*MI_KiB)\n\n\n// ------------------------------------------------------\n// Main internal data-structures\n// ------------------------------------------------------\n\n// Main tuning parameters for segment and page sizes\n// Sizes for 64-bit (usually divide by two for 32-bit)\n#ifndef MI_SEGMENT_SLICE_SHIFT\n#define MI_SEGMENT_SLICE_SHIFT            (13 + MI_INTPTR_SHIFT)         // 64KiB  (32KiB on 32-bit)\n#endif\n\n#ifndef MI_SEGMENT_SHIFT\n#if MI_INTPTR_SIZE > 4\n#define MI_SEGMENT_SHIFT                  ( 9 + MI_SEGMENT_SLICE_SHIFT)  // 32MiB\n#else\n#define MI_SEGMENT_SHIFT                  ( 7 + MI_SEGMENT_SLICE_SHIFT)  // 4MiB on 32-bit\n#endif\n#endif\n\n#ifndef MI_SMALL_PAGE_SHIFT\n#define MI_SMALL_PAGE_SHIFT               (MI_SEGMENT_SLICE_SHIFT)       // 64KiB\n#endif\n#ifndef MI_MEDIUM_PAGE_SHIFT\n#define MI_MEDIUM_PAGE_SHIFT              ( 3 + MI_SMALL_PAGE_SHIFT)     // 512KiB\n#endif\n\n// Derived constants\n#define MI_SEGMENT_SIZE                   (MI_ZU(1)<<MI_SEGMENT_SHIFT)\n#define MI_SEGMENT_ALIGN                  MI_SEGMENT_SIZE\n#define MI_SEGMENT_MASK                   ((uintptr_t)(MI_SEGMENT_ALIGN - 1))\n#define MI_SEGMENT_SLICE_SIZE             (MI_ZU(1)<< MI_SEGMENT_SLICE_SHIFT)\n#define MI_SLICES_PER_SEGMENT             (MI_SEGMENT_SIZE / MI_SEGMENT_SLICE_SIZE) // 1024\n\n#define MI_SMALL_PAGE_SIZE                (MI_ZU(1)<<MI_SMALL_PAGE_SHIFT)\n#define MI_MEDIUM_PAGE_SIZE               (MI_ZU(1)<<MI_MEDIUM_PAGE_SHIFT)\n\n#define MI_SMALL_OBJ_SIZE_MAX             (MI_SMALL_PAGE_SIZE/8)   // 8 KiB on 64-bit\n#define MI_MEDIUM_OBJ_SIZE_MAX            (MI_MEDIUM_PAGE_SIZE/8)  // 64 KiB on 64-bit\n#define MI_MEDIUM_OBJ_WSIZE_MAX           (MI_MEDIUM_OBJ_SIZE_MAX/MI_INTPTR_SIZE)\n#define MI_LARGE_OBJ_SIZE_MAX             (MI_SEGMENT_SIZE/2)      // 16 MiB on 64-bit\n#define MI_LARGE_OBJ_WSIZE_MAX            (MI_LARGE_OBJ_SIZE_MAX/MI_INTPTR_SIZE)\n\n// Maximum number of size classes. (spaced exponentially in 12.5% increments)\n#if MI_BIN_HUGE != 73U\n#error \"mimalloc internal: expecting 73 bins\"\n#endif\n\n#if (MI_MEDIUM_OBJ_WSIZE_MAX >= 655360)\n#error \"mimalloc internal: define more bins\"\n#endif\n\n// Maximum block size for which blocks are guaranteed to be block size aligned. (see `segment.c:_mi_segment_page_start`)\n#define MI_MAX_ALIGN_GUARANTEE            (MI_MEDIUM_OBJ_SIZE_MAX)\n\n// Alignments over MI_BLOCK_ALIGNMENT_MAX are allocated in dedicated huge page segments\n#define MI_BLOCK_ALIGNMENT_MAX            (MI_SEGMENT_SIZE >> 1)\n\n// Maximum slice count (255) for which we can find the page for interior pointers\n#define MI_MAX_SLICE_OFFSET_COUNT         ((MI_BLOCK_ALIGNMENT_MAX / MI_SEGMENT_SLICE_SIZE) - 1)\n\n// we never allocate more than PTRDIFF_MAX (see also <https://sourceware.org/ml/libc-announce/2019/msg00001.html>)\n// on 64-bit+ systems we also limit the maximum allocation size such that the slice count fits in 32-bits. (issue #877)\n#if (PTRDIFF_MAX > INT32_MAX) && (PTRDIFF_MAX >= (MI_SEGMENT_SLIZE_SIZE * UINT32_MAX))\n#define MI_MAX_ALLOC_SIZE   (MI_SEGMENT_SLICE_SIZE * (UINT32_MAX-1))\n#else\n#define MI_MAX_ALLOC_SIZE   PTRDIFF_MAX\n#endif\n\n\n// ------------------------------------------------------\n// Mimalloc pages contain allocated blocks\n// ------------------------------------------------------\n\n// The free lists use encoded next fields\n// (Only actually encodes when MI_ENCODED_FREELIST is defined.)\ntypedef uintptr_t  mi_encoded_t;\n\n// thread id's\ntypedef size_t     mi_threadid_t;\n\n// free lists contain blocks\ntypedef struct mi_block_s {\n  mi_encoded_t next;\n} mi_block_t;\n\n#if MI_GUARDED\n// we always align guarded pointers in a block at an offset\n// the block `next` field is then used as a tag to distinguish regular offset aligned blocks from guarded ones\n#define MI_BLOCK_TAG_ALIGNED   ((mi_encoded_t)(0))\n#define MI_BLOCK_TAG_GUARDED   (~MI_BLOCK_TAG_ALIGNED)\n#endif\n\n\n// The delayed flags are used for efficient multi-threaded free-ing\ntypedef enum mi_delayed_e {\n  MI_USE_DELAYED_FREE   = 0, // push on the owning heap thread delayed list\n  MI_DELAYED_FREEING    = 1, // temporary: another thread is accessing the owning heap\n  MI_NO_DELAYED_FREE    = 2, // optimize: push on page local thread free queue if another block is already in the heap thread delayed free list\n  MI_NEVER_DELAYED_FREE = 3  // sticky: used for abandoned pages without a owning heap; this only resets on page reclaim\n} mi_delayed_t;\n\n\n// The `in_full` and `has_aligned` page flags are put in a union to efficiently\n// test if both are false (`full_aligned == 0`) in the `mi_free` routine.\n#if !MI_TSAN\ntypedef union mi_page_flags_s {\n  uint8_t full_aligned;\n  struct {\n    uint8_t in_full : 1;\n    uint8_t has_aligned : 1;\n  } x;\n} mi_page_flags_t;\n#else\n// under thread sanitizer, use a byte for each flag to suppress warning, issue #130\ntypedef union mi_page_flags_s {\n  uint32_t full_aligned;\n  struct {\n    uint8_t in_full;\n    uint8_t has_aligned;\n  } x;\n} mi_page_flags_t;\n#endif\n\n// Thread free list.\n// We use the bottom 2 bits of the pointer for mi_delayed_t flags\ntypedef uintptr_t mi_thread_free_t;\n\n// A page contains blocks of one specific size (`block_size`).\n// Each page has three list of free blocks:\n// `free` for blocks that can be allocated,\n// `local_free` for freed blocks that are not yet available to `mi_malloc`\n// `thread_free` for freed blocks by other threads\n// The `local_free` and `thread_free` lists are migrated to the `free` list\n// when it is exhausted. The separate `local_free` list is necessary to\n// implement a monotonic heartbeat. The `thread_free` list is needed for\n// avoiding atomic operations in the common case.\n//\n// `used - |thread_free|` == actual blocks that are in use (alive)\n// `used - |thread_free| + |free| + |local_free| == capacity`\n//\n// We don't count `freed` (as |free|) but use `used` to reduce\n// the number of memory accesses in the `mi_page_all_free` function(s).\n//\n// Notes:\n// - Access is optimized for `free.c:mi_free` and `alloc.c:mi_page_alloc`\n// - Using `uint16_t` does not seem to slow things down\n// - The size is 12 words on 64-bit which helps the page index calculations\n//   (and 14 words on 32-bit, and encoded free lists add 2 words)\n// - `xthread_free` uses the bottom bits as a delayed-free flags to optimize\n//   concurrent frees where only the first concurrent free adds to the owning\n//   heap `thread_delayed_free` list (see `free.c:mi_free_block_mt`).\n//   The invariant is that no-delayed-free is only set if there is\n//   at least one block that will be added, or as already been added, to\n//   the owning heap `thread_delayed_free` list. This guarantees that pages\n//   will be freed correctly even if only other threads free blocks.\ntypedef struct mi_page_s {\n  // \"owned\" by the segment\n  uint32_t              slice_count;       // slices in this page (0 if not a page)\n  uint32_t              slice_offset;      // distance from the actual page data slice (0 if a page)\n  uint8_t               is_committed:1;    // `true` if the page virtual memory is committed\n  uint8_t               is_zero_init:1;    // `true` if the page was initially zero initialized\n  uint8_t               is_huge:1;         // `true` if the page is in a huge segment (`segment->kind == MI_SEGMENT_HUGE`)\n                                           // padding\n  // layout like this to optimize access in `mi_malloc` and `mi_free`\n  uint16_t              capacity;          // number of blocks committed, must be the first field, see `segment.c:page_clear`\n  uint16_t              reserved;          // number of blocks reserved in memory\n  mi_page_flags_t       flags;             // `in_full` and `has_aligned` flags (8 bits)\n  uint8_t               free_is_zero:1;    // `true` if the blocks in the free list are zero initialized\n  uint8_t               retire_expire:7;   // expiration count for retired blocks\n\n  mi_block_t*           free;              // list of available free blocks (`malloc` allocates from this list)\n  mi_block_t*           local_free;        // list of deferred free blocks by this thread (migrates to `free`)\n  uint16_t              used;              // number of blocks in use (including blocks in `thread_free`)\n  uint8_t               block_size_shift;  // if not zero, then `(1 << block_size_shift) == block_size` (only used for fast path in `free.c:_mi_page_ptr_unalign`)\n  uint8_t               heap_tag;          // tag of the owning heap, used to separate heaps by object type\n                                           // padding\n  size_t                block_size;        // size available in each block (always `>0`)\n  uint8_t*              page_start;        // start of the page area containing the blocks\n\n  #if (MI_ENCODE_FREELIST || MI_PADDING)\n  uintptr_t             keys[2];           // two random keys to encode the free lists (see `_mi_block_next`) or padding canary\n  #endif\n\n  _Atomic(mi_thread_free_t) xthread_free;  // list of deferred free blocks freed by other threads\n  _Atomic(uintptr_t)        xheap;\n\n  struct mi_page_s*     next;              // next page owned by this thread with the same `block_size`\n  struct mi_page_s*     prev;              // previous page owned by this thread with the same `block_size`\n\n  // 64-bit 11 words, 32-bit 13 words, (+2 for secure)\n  void* padding[1];\n} mi_page_t;\n\n\n\n// ------------------------------------------------------\n// Mimalloc segments contain mimalloc pages\n// ------------------------------------------------------\n\ntypedef enum mi_page_kind_e {\n  MI_PAGE_SMALL,    // small blocks go into 64KiB pages inside a segment\n  MI_PAGE_MEDIUM,   // medium blocks go into 512KiB pages inside a segment\n  MI_PAGE_LARGE,    // larger blocks go into a single page spanning a whole segment\n  MI_PAGE_HUGE      // a huge page is a single page in a segment of variable size\n                    // used for blocks `> MI_LARGE_OBJ_SIZE_MAX` or an aligment `> MI_BLOCK_ALIGNMENT_MAX`.\n} mi_page_kind_t;\n\ntypedef enum mi_segment_kind_e {\n  MI_SEGMENT_NORMAL, // MI_SEGMENT_SIZE size with pages inside.\n  MI_SEGMENT_HUGE,   // segment with just one huge page inside.\n} mi_segment_kind_t;\n\n// ------------------------------------------------------\n// A segment holds a commit mask where a bit is set if\n// the corresponding MI_COMMIT_SIZE area is committed.\n// The MI_COMMIT_SIZE must be a multiple of the slice\n// size. If it is equal we have the most fine grained\n// decommit (but setting it higher can be more efficient).\n// The MI_MINIMAL_COMMIT_SIZE is the minimal amount that will\n// be committed in one go which can be set higher than\n// MI_COMMIT_SIZE for efficiency (while the decommit mask\n// is still tracked in fine-grained MI_COMMIT_SIZE chunks)\n// ------------------------------------------------------\n\n#define MI_MINIMAL_COMMIT_SIZE      (1*MI_SEGMENT_SLICE_SIZE)\n#define MI_COMMIT_SIZE              (MI_SEGMENT_SLICE_SIZE)              // 64KiB\n#define MI_COMMIT_MASK_BITS         (MI_SEGMENT_SIZE / MI_COMMIT_SIZE)\n#define MI_COMMIT_MASK_FIELD_BITS    MI_SIZE_BITS\n#define MI_COMMIT_MASK_FIELD_COUNT  (MI_COMMIT_MASK_BITS / MI_COMMIT_MASK_FIELD_BITS)\n\n#if (MI_COMMIT_MASK_BITS != (MI_COMMIT_MASK_FIELD_COUNT * MI_COMMIT_MASK_FIELD_BITS))\n#error \"the segment size must be exactly divisible by the (commit size * size_t bits)\"\n#endif\n\ntypedef struct mi_commit_mask_s {\n  size_t mask[MI_COMMIT_MASK_FIELD_COUNT];\n} mi_commit_mask_t;\n\ntypedef mi_page_t  mi_slice_t;\ntypedef int64_t    mi_msecs_t;\n\n\n// ---------------------------------------------------------------\n// a memory id tracks the provenance of arena/OS allocated memory\n// ---------------------------------------------------------------\n\n// Memory can reside in arena's, direct OS allocated, or statically allocated. The memid keeps track of this.\ntypedef enum mi_memkind_e {\n  MI_MEM_NONE,      // not allocated\n  MI_MEM_EXTERNAL,  // not owned by mimalloc but provided externally (via `mi_manage_os_memory` for example)\n  MI_MEM_STATIC,    // allocated in a static area and should not be freed (for arena meta data for example)\n  MI_MEM_OS,        // allocated from the OS\n  MI_MEM_OS_HUGE,   // allocated as huge OS pages (usually 1GiB, pinned to physical memory)\n  MI_MEM_OS_REMAP,  // allocated in a remapable area (i.e. using `mremap`)\n  MI_MEM_ARENA      // allocated from an arena (the usual case)\n} mi_memkind_t;\n\nstatic inline bool mi_memkind_is_os(mi_memkind_t memkind) {\n  return (memkind >= MI_MEM_OS && memkind <= MI_MEM_OS_REMAP);\n}\n\ntypedef struct mi_memid_os_info {\n  void*         base;               // actual base address of the block (used for offset aligned allocations)\n  size_t        size;               // full allocation size\n} mi_memid_os_info_t;\n\ntypedef struct mi_memid_arena_info {\n  size_t        block_index;        // index in the arena\n  mi_arena_id_t id;                 // arena id (>= 1)\n  bool          is_exclusive;       // this arena can only be used for specific arena allocations\n} mi_memid_arena_info_t;\n\ntypedef struct mi_memid_s {\n  union {\n    mi_memid_os_info_t    os;       // only used for MI_MEM_OS\n    mi_memid_arena_info_t arena;    // only used for MI_MEM_ARENA\n  } mem;\n  bool          is_pinned;          // `true` if we cannot decommit/reset/protect in this memory (e.g. when allocated using large (2Mib) or huge (1GiB) OS pages)\n  bool          initially_committed;// `true` if the memory was originally allocated as committed\n  bool          initially_zero;     // `true` if the memory was originally zero initialized\n  mi_memkind_t  memkind;\n} mi_memid_t;\n\n\n// -----------------------------------------------------------------------------------------\n// Segments are large allocated memory blocks (32mb on 64 bit) from arenas or the OS.\n//\n// Inside segments we allocated fixed size mimalloc pages (`mi_page_t`) that contain blocks.\n// The start of a segment is this structure with a fixed number of slice entries (`slices`)\n// usually followed by a guard OS page and the actual allocation area with pages.\n// While a page is not allocated, we view it's data as a `mi_slice_t` (instead of a `mi_page_t`).\n// Of any free area, the first slice has the info and `slice_offset == 0`; for any subsequent\n// slices part of the area, the `slice_offset` is the byte offset back to the first slice\n// (so we can quickly find the page info on a free, `internal.h:_mi_segment_page_of`).\n// For slices, the `block_size` field is repurposed to signify if a slice is used (`1`) or not (`0`).\n// Small and medium pages use a fixed amount of slices to reduce slice fragmentation, while\n// large and huge pages span a variable amount of slices.\n\ntypedef struct mi_subproc_s mi_subproc_t;\n\ntypedef struct mi_segment_s {\n  // constant fields\n  mi_memid_t        memid;              // memory id for arena/OS allocation\n  bool              allow_decommit;     // can we decommmit the memory\n  bool              allow_purge;        // can we purge the memory (reset or decommit)\n  size_t            segment_size;\n  mi_subproc_t*     subproc;            // segment belongs to sub process\n\n  // segment fields\n  mi_msecs_t        purge_expire;       // purge slices in the `purge_mask` after this time\n  mi_commit_mask_t  purge_mask;         // slices that can be purged\n  mi_commit_mask_t  commit_mask;        // slices that are currently committed\n\n  // from here is zero initialized\n  struct mi_segment_s* next;            // the list of freed segments in the cache (must be first field, see `segment.c:mi_segment_init`)\n  bool              was_reclaimed;      // true if it was reclaimed (used to limit on-free reclamation)\n  bool              dont_free;          // can be temporarily true to ensure the segment is not freed\n\n  size_t            abandoned;          // abandoned pages (i.e. the original owning thread stopped) (`abandoned <= used`)\n  size_t            abandoned_visits;   // count how often this segment is visited during abondoned reclamation (to force reclaim if it takes too long)\n  size_t            used;               // count of pages in use\n  uintptr_t         cookie;             // verify addresses in debug mode: `mi_ptr_cookie(segment) == segment->cookie`\n\n  struct mi_segment_s* abandoned_os_next; // only used for abandoned segments outside arena's, and only if `mi_option_visit_abandoned` is enabled\n  struct mi_segment_s* abandoned_os_prev;\n\n  size_t            segment_slices;      // for huge segments this may be different from `MI_SLICES_PER_SEGMENT`\n  size_t            segment_info_slices; // initial count of slices that we are using for segment info and possible guard pages.\n\n  // layout like this to optimize access in `mi_free`\n  mi_segment_kind_t kind;\n  size_t            slice_entries;       // entries in the `slices` array, at most `MI_SLICES_PER_SEGMENT`\n  _Atomic(mi_threadid_t) thread_id;      // unique id of the thread owning this segment\n\n  mi_slice_t        slices[MI_SLICES_PER_SEGMENT+1];  // one extra final entry for huge blocks with large alignment\n} mi_segment_t;\n\n\n// ------------------------------------------------------\n// Heaps\n// Provide first-class heaps to allocate from.\n// A heap just owns a set of pages for allocation and\n// can only be allocate/reallocate from the thread that created it.\n// Freeing blocks can be done from any thread though.\n// Per thread, the segments are shared among its heaps.\n// Per thread, there is always a default heap that is\n// used for allocation; it is initialized to statically\n// point to an empty heap to avoid initialization checks\n// in the fast path.\n// ------------------------------------------------------\n\n// Thread local data\ntypedef struct mi_tld_s mi_tld_t;\n\n// Pages of a certain block size are held in a queue.\ntypedef struct mi_page_queue_s {\n  mi_page_t* first;\n  mi_page_t* last;\n  size_t     block_size;\n} mi_page_queue_t;\n\n#define MI_BIN_FULL  (MI_BIN_HUGE+1)\n\n// Random context\ntypedef struct mi_random_cxt_s {\n  uint32_t input[16];\n  uint32_t output[16];\n  int      output_available;\n  bool     weak;\n} mi_random_ctx_t;\n\n\n// In debug mode there is a padding structure at the end of the blocks to check for buffer overflows\n#if (MI_PADDING)\ntypedef struct mi_padding_s {\n  uint32_t canary; // encoded block value to check validity of the padding (in case of overflow)\n  uint32_t delta;  // padding bytes before the block. (mi_usable_size(p) - delta == exact allocated bytes)\n} mi_padding_t;\n#define MI_PADDING_SIZE   (sizeof(mi_padding_t))\n#define MI_PADDING_WSIZE  ((MI_PADDING_SIZE + MI_INTPTR_SIZE - 1) / MI_INTPTR_SIZE)\n#else\n#define MI_PADDING_SIZE   0\n#define MI_PADDING_WSIZE  0\n#endif\n\n#define MI_PAGES_DIRECT   (MI_SMALL_WSIZE_MAX + MI_PADDING_WSIZE + 1)\n\n\n// A heap owns a set of pages.\nstruct mi_heap_s {\n  mi_tld_t*             tld;\n  _Atomic(mi_block_t*)  thread_delayed_free;\n  mi_threadid_t         thread_id;                           // thread this heap belongs too\n  mi_arena_id_t         arena_id;                            // arena id if the heap belongs to a specific arena (or 0)\n  uintptr_t             cookie;                              // random cookie to verify pointers (see `_mi_ptr_cookie`)\n  uintptr_t             keys[2];                             // two random keys used to encode the `thread_delayed_free` list\n  mi_random_ctx_t       random;                              // random number context used for secure allocation\n  size_t                page_count;                          // total number of pages in the `pages` queues.\n  size_t                page_retired_min;                    // smallest retired index (retired pages are fully free, but still in the page queues)\n  size_t                page_retired_max;                    // largest retired index into the `pages` array.\n  long                  generic_count;                       // how often is `_mi_malloc_generic` called?\n  long                  generic_collect_count;               // how often is `_mi_malloc_generic` called without collecting?\n  mi_heap_t*            next;                                // list of heaps per thread\n  bool                  no_reclaim;                          // `true` if this heap should not reclaim abandoned pages\n  uint8_t               tag;                                 // custom tag, can be used for separating heaps based on the object types\n  #if MI_GUARDED\n  size_t                guarded_size_min;                    // minimal size for guarded objects\n  size_t                guarded_size_max;                    // maximal size for guarded objects\n  size_t                guarded_sample_rate;                 // sample rate (set to 0 to disable guarded pages)\n  size_t                guarded_sample_seed;                 // starting sample count\n  size_t                guarded_sample_count;                // current sample count (counting down to 0)\n  #endif\n  mi_page_t*            pages_free_direct[MI_PAGES_DIRECT];  // optimize: array where every entry points a page with possibly free blocks in the corresponding queue for that size.\n  mi_page_queue_t       pages[MI_BIN_FULL + 1];              // queue of pages for each size class (or \"bin\")\n};\n\n\n// ------------------------------------------------------\n// Sub processes do not reclaim or visit segments\n// from other sub processes. These are essentially the\n// static variables of a process.\n// ------------------------------------------------------\n\nstruct mi_subproc_s {\n  _Atomic(size_t)    abandoned_count;         // count of abandoned segments for this sub-process\n  _Atomic(size_t)    abandoned_os_list_count; // count of abandoned segments in the os-list\n  mi_lock_t          abandoned_os_lock;       // lock for the abandoned os segment list (outside of arena's) (this lock protect list operations)\n  mi_lock_t          abandoned_os_visit_lock; // ensure only one thread per subproc visits the abandoned os list\n  mi_segment_t*      abandoned_os_list;       // doubly-linked list of abandoned segments outside of arena's (in OS allocated memory)\n  mi_segment_t*      abandoned_os_list_tail;  // the tail-end of the list\n  mi_memid_t         memid;                   // provenance of this memory block\n};\n\n\n// ------------------------------------------------------\n// Thread Local data\n// ------------------------------------------------------\n\n// A \"span\" is is an available range of slices. The span queues keep\n// track of slice spans of at most the given `slice_count` (but more than the previous size class).\ntypedef struct mi_span_queue_s {\n  mi_slice_t* first;\n  mi_slice_t* last;\n  size_t      slice_count;\n} mi_span_queue_t;\n\n#define MI_SEGMENT_BIN_MAX (35)     // 35 == mi_segment_bin(MI_SLICES_PER_SEGMENT)\n\n// Segments thread local data\ntypedef struct mi_segments_tld_s {\n  mi_span_queue_t     spans[MI_SEGMENT_BIN_MAX+1];  // free slice spans inside segments\n  size_t              count;        // current number of segments;\n  size_t              peak_count;   // peak number of segments\n  size_t              current_size; // current size of all segments\n  size_t              peak_size;    // peak size of all segments\n  size_t              reclaim_count;// number of reclaimed (abandoned) segments\n  mi_subproc_t*       subproc;      // sub-process this thread belongs to.\n  mi_stats_t*         stats;        // points to tld stats\n} mi_segments_tld_t;\n\n// Thread local data\nstruct mi_tld_s {\n  unsigned long long  heartbeat;     // monotonic heartbeat count\n  bool                recurse;       // true if deferred was called; used to prevent infinite recursion.\n  mi_heap_t*          heap_backing;  // backing heap of this thread (cannot be deleted)\n  mi_heap_t*          heaps;         // list of heaps in this thread (so we can abandon all when the thread terminates)\n  mi_segments_tld_t   segments;      // segment tld\n  mi_stats_t          stats;         // statistics\n};\n\n\n\n// ------------------------------------------------------\n// Debug\n// ------------------------------------------------------\n\n#if !defined(MI_DEBUG_UNINIT)\n#define MI_DEBUG_UNINIT     (0xD0)\n#endif\n#if !defined(MI_DEBUG_FREED)\n#define MI_DEBUG_FREED      (0xDF)\n#endif\n#if !defined(MI_DEBUG_PADDING)\n#define MI_DEBUG_PADDING    (0xDE)\n#endif\n\n#if (MI_DEBUG)\n// use our own assertion to print without memory allocation\nvoid _mi_assert_fail(const char* assertion, const char* fname, unsigned int line, const char* func );\n#define mi_assert(expr)     ((expr) ? (void)0 : _mi_assert_fail(#expr,__FILE__,__LINE__,__func__))\n#else\n#define mi_assert(x)\n#endif\n\n#if (MI_DEBUG>1)\n#define mi_assert_internal    mi_assert\n#else\n#define mi_assert_internal(x)\n#endif\n\n#if (MI_DEBUG>2)\n#define mi_assert_expensive   mi_assert\n#else\n#define mi_assert_expensive(x)\n#endif\n\n\n// ------------------------------------------------------\n// Statistics\n// ------------------------------------------------------\n#ifndef MI_STAT\n#if (MI_DEBUG>0)\n#define MI_STAT 2\n#else\n#define MI_STAT 0\n#endif\n#endif\n\n// add to stat keeping track of the peak\nvoid _mi_stat_increase(mi_stat_count_t* stat, size_t amount);\nvoid _mi_stat_decrease(mi_stat_count_t* stat, size_t amount);\n// counters can just be increased\nvoid _mi_stat_counter_increase(mi_stat_counter_t* stat, size_t amount);\n\n#if (MI_STAT)\n#define mi_stat_increase(stat,amount)         _mi_stat_increase( &(stat), amount)\n#define mi_stat_decrease(stat,amount)         _mi_stat_decrease( &(stat), amount)\n#define mi_stat_counter_increase(stat,amount) _mi_stat_counter_increase( &(stat), amount)\n#else\n#define mi_stat_increase(stat,amount)         ((void)0)\n#define mi_stat_decrease(stat,amount)         ((void)0)\n#define mi_stat_counter_increase(stat,amount) ((void)0)\n#endif\n\n#define mi_heap_stat_counter_increase(heap,stat,amount)  mi_stat_counter_increase( (heap)->tld->stats.stat, amount)\n#define mi_heap_stat_increase(heap,stat,amount)  mi_stat_increase( (heap)->tld->stats.stat, amount)\n#define mi_heap_stat_decrease(heap,stat,amount)  mi_stat_decrease( (heap)->tld->stats.stat, amount)\n\n\n#endif\n"
  },
  {
    "path": "third-party/mimalloc/include/mimalloc-new-delete.h",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2020 Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#pragma once\n#ifndef MIMALLOC_NEW_DELETE_H\n#define MIMALLOC_NEW_DELETE_H\n\n// ----------------------------------------------------------------------------\n// This header provides convenient overrides for the new and\n// delete operations in C++.\n//\n// This header should be included in only one source file!\n//\n// On Windows, or when linking dynamically with mimalloc, these\n// can be more performant than the standard new-delete operations.\n// See <https://en.cppreference.com/w/cpp/memory/new/operator_new>\n// ---------------------------------------------------------------------------\n#if defined(__cplusplus)\n  #include <new>\n  #include <mimalloc.h>\n\n  #if defined(_MSC_VER) && defined(_Ret_notnull_) && defined(_Post_writable_byte_size_)\n  // stay consistent with VCRT definitions\n  #define mi_decl_new(n)          mi_decl_nodiscard mi_decl_restrict _Ret_notnull_ _Post_writable_byte_size_(n)\n  #define mi_decl_new_nothrow(n)  mi_decl_nodiscard mi_decl_restrict _Ret_maybenull_ _Success_(return != NULL) _Post_writable_byte_size_(n)\n  #else\n  #define mi_decl_new(n)          mi_decl_nodiscard mi_decl_restrict\n  #define mi_decl_new_nothrow(n)  mi_decl_nodiscard mi_decl_restrict\n  #endif\n\n  void operator delete(void* p) noexcept              { mi_free(p); };\n  void operator delete[](void* p) noexcept            { mi_free(p); };\n\n  void operator delete  (void* p, const std::nothrow_t&) noexcept { mi_free(p); }\n  void operator delete[](void* p, const std::nothrow_t&) noexcept { mi_free(p); }\n\n  mi_decl_new(n) void* operator new(std::size_t n) noexcept(false) { return mi_new(n); }\n  mi_decl_new(n) void* operator new[](std::size_t n) noexcept(false) { return mi_new(n); }\n\n  mi_decl_new_nothrow(n) void* operator new  (std::size_t n, const std::nothrow_t& tag) noexcept { (void)(tag); return mi_new_nothrow(n); }\n  mi_decl_new_nothrow(n) void* operator new[](std::size_t n, const std::nothrow_t& tag) noexcept { (void)(tag); return mi_new_nothrow(n); }\n\n  #if (__cplusplus >= 201402L || _MSC_VER >= 1916)\n  void operator delete  (void* p, std::size_t n) noexcept { mi_free_size(p,n); };\n  void operator delete[](void* p, std::size_t n) noexcept { mi_free_size(p,n); };\n  #endif\n\n  #if (__cplusplus > 201402L || defined(__cpp_aligned_new))\n  void operator delete  (void* p, std::align_val_t al) noexcept { mi_free_aligned(p, static_cast<size_t>(al)); }\n  void operator delete[](void* p, std::align_val_t al) noexcept { mi_free_aligned(p, static_cast<size_t>(al)); }\n  void operator delete  (void* p, std::size_t n, std::align_val_t al) noexcept { mi_free_size_aligned(p, n, static_cast<size_t>(al)); };\n  void operator delete[](void* p, std::size_t n, std::align_val_t al) noexcept { mi_free_size_aligned(p, n, static_cast<size_t>(al)); };\n  void operator delete  (void* p, std::align_val_t al, const std::nothrow_t&) noexcept { mi_free_aligned(p, static_cast<size_t>(al)); }\n  void operator delete[](void* p, std::align_val_t al, const std::nothrow_t&) noexcept { mi_free_aligned(p, static_cast<size_t>(al)); }\n\n  void* operator new  (std::size_t n, std::align_val_t al) noexcept(false) { return mi_new_aligned(n, static_cast<size_t>(al)); }\n  void* operator new[](std::size_t n, std::align_val_t al) noexcept(false) { return mi_new_aligned(n, static_cast<size_t>(al)); }\n  void* operator new  (std::size_t n, std::align_val_t al, const std::nothrow_t&) noexcept { return mi_new_aligned_nothrow(n, static_cast<size_t>(al)); }\n  void* operator new[](std::size_t n, std::align_val_t al, const std::nothrow_t&) noexcept { return mi_new_aligned_nothrow(n, static_cast<size_t>(al)); }\n  #endif\n#endif\n\n#endif // MIMALLOC_NEW_DELETE_H\n"
  },
  {
    "path": "third-party/mimalloc/include/mimalloc-override.h",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2020 Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#pragma once\n#ifndef MIMALLOC_OVERRIDE_H\n#define MIMALLOC_OVERRIDE_H\n\n/* ----------------------------------------------------------------------------\nThis header can be used to statically redirect malloc/free and new/delete\nto the mimalloc variants. This can be useful if one can include this file on\neach source file in a project (but be careful when using external code to\nnot accidentally mix pointers from different allocators).\n-----------------------------------------------------------------------------*/\n\n#include <mimalloc.h>\n\n// Standard C allocation\n#define malloc(n)               mi_malloc(n)\n#define calloc(n,c)             mi_calloc(n,c)\n#define realloc(p,n)            mi_realloc(p,n)\n#define free(p)                 mi_free(p)\n\n#define strdup(s)               mi_strdup(s)\n#define strndup(s,n)            mi_strndup(s,n)\n#define realpath(f,n)           mi_realpath(f,n)\n\n// Microsoft extensions\n#define _expand(p,n)            mi_expand(p,n)\n#define _msize(p)               mi_usable_size(p)\n#define _recalloc(p,n,c)        mi_recalloc(p,n,c)\n\n#define _strdup(s)              mi_strdup(s)\n#define _strndup(s,n)           mi_strndup(s,n)\n#define _wcsdup(s)              (wchar_t*)mi_wcsdup((const unsigned short*)(s))\n#define _mbsdup(s)              mi_mbsdup(s)\n#define _dupenv_s(b,n,v)        mi_dupenv_s(b,n,v)\n#define _wdupenv_s(b,n,v)       mi_wdupenv_s((unsigned short*)(b),n,(const unsigned short*)(v))\n\n// Various Posix and Unix variants\n#define reallocf(p,n)           mi_reallocf(p,n)\n#define malloc_size(p)          mi_usable_size(p)\n#define malloc_usable_size(p)   mi_usable_size(p)\n#define malloc_good_size(sz)    mi_malloc_good_size(sz)\n#define cfree(p)                mi_free(p)\n\n#define valloc(n)               mi_valloc(n)\n#define pvalloc(n)              mi_pvalloc(n)\n#define reallocarray(p,s,n)     mi_reallocarray(p,s,n)\n#define reallocarr(p,s,n)       mi_reallocarr(p,s,n)\n#define memalign(a,n)           mi_memalign(a,n)\n#define aligned_alloc(a,n)      mi_aligned_alloc(a,n)\n#define posix_memalign(p,a,n)   mi_posix_memalign(p,a,n)\n#define _posix_memalign(p,a,n)  mi_posix_memalign(p,a,n)\n\n// Microsoft aligned variants\n#define _aligned_malloc(n,a)                  mi_malloc_aligned(n,a)\n#define _aligned_realloc(p,n,a)               mi_realloc_aligned(p,n,a)\n#define _aligned_recalloc(p,s,n,a)            mi_aligned_recalloc(p,s,n,a)\n#define _aligned_msize(p,a,o)                 mi_usable_size(p)\n#define _aligned_free(p)                      mi_free(p)\n#define _aligned_offset_malloc(n,a,o)         mi_malloc_aligned_at(n,a,o)\n#define _aligned_offset_realloc(p,n,a,o)      mi_realloc_aligned_at(p,n,a,o)\n#define _aligned_offset_recalloc(p,s,n,a,o)   mi_recalloc_aligned_at(p,s,n,a,o)\n\n#endif // MIMALLOC_OVERRIDE_H\n"
  },
  {
    "path": "third-party/mimalloc/include/mimalloc-stats.h",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2025, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#pragma once\n#ifndef MIMALLOC_STATS_H\n#define MIMALLOC_STATS_H\n\n#include <mimalloc.h>\n#include <stdint.h>\n\n#define MI_STAT_VERSION   1   // increased on every backward incompatible change\n\n// count allocation over time\ntypedef struct mi_stat_count_s {\n  int64_t total;                              // total allocated\n  int64_t peak;                               // peak allocation\n  int64_t current;                            // current allocation\n} mi_stat_count_t;\n\n// counters only increase\ntypedef struct mi_stat_counter_s {\n  int64_t total;                              // total count\n} mi_stat_counter_t;\n\n#define MI_STAT_FIELDS() \\\n  MI_STAT_COUNT(pages)                      /* count of mimalloc pages */ \\\n  MI_STAT_COUNT(reserved)                   /* reserved memory bytes */ \\\n  MI_STAT_COUNT(committed)                  /* committed bytes */ \\\n  MI_STAT_COUNT(reset)                      /* reset bytes */ \\\n  MI_STAT_COUNT(purged)                     /* purged bytes */ \\\n  MI_STAT_COUNT(page_committed)             /* committed memory inside pages */ \\\n  MI_STAT_COUNT(pages_abandoned)            /* abandonded pages count */ \\\n  MI_STAT_COUNT(threads)                    /* number of threads */ \\\n  MI_STAT_COUNT(malloc_normal)              /* allocated bytes <= MI_LARGE_OBJ_SIZE_MAX */ \\\n  MI_STAT_COUNT(malloc_huge)                /* allocated bytes in huge pages */ \\\n  MI_STAT_COUNT(malloc_requested)           /* malloc requested bytes */ \\\n  \\\n  MI_STAT_COUNTER(mmap_calls) \\\n  MI_STAT_COUNTER(commit_calls) \\\n  MI_STAT_COUNTER(reset_calls) \\\n  MI_STAT_COUNTER(purge_calls) \\\n  MI_STAT_COUNTER(arena_count)              /* number of memory arena's */ \\\n  MI_STAT_COUNTER(malloc_normal_count)      /* number of blocks <= MI_LARGE_OBJ_SIZE_MAX */ \\\n  MI_STAT_COUNTER(malloc_huge_count)        /* number of huge bloks */ \\\n  MI_STAT_COUNTER(malloc_guarded_count)     /* number of allocations with guard pages */ \\\n  \\\n  /* internal statistics */ \\\n  MI_STAT_COUNTER(arena_rollback_count) \\\n  MI_STAT_COUNTER(arena_purges) \\\n  MI_STAT_COUNTER(pages_extended)           /* number of page extensions */ \\\n  MI_STAT_COUNTER(pages_retire)             /* number of pages that are retired */ \\\n  MI_STAT_COUNTER(page_searches)            /* searches for a fresh page */ \\\n  /* only on v1 and v2 */ \\\n  MI_STAT_COUNT(segments) \\\n  MI_STAT_COUNT(segments_abandoned) \\\n  MI_STAT_COUNT(segments_cache) \\\n  MI_STAT_COUNT(_segments_reserved) \\\n  /* only on v3 */ \\\n  MI_STAT_COUNTER(pages_reclaim_on_alloc) \\\n  MI_STAT_COUNTER(pages_reclaim_on_free) \\\n  MI_STAT_COUNTER(pages_reabandon_full) \\\n  MI_STAT_COUNTER(pages_unabandon_busy_wait) \\\n\n\n// Define the statistics structure\n#define MI_BIN_HUGE             (73U)   // see types.h\n#define MI_STAT_COUNT(stat)     mi_stat_count_t stat;\n#define MI_STAT_COUNTER(stat)   mi_stat_counter_t stat;\n\ntypedef struct mi_stats_s\n{\n  int version;\n\n  MI_STAT_FIELDS()\n\n  // future extension\n  mi_stat_count_t   _stat_reserved[4];\n  mi_stat_counter_t _stat_counter_reserved[4];\n\n  // size segregated statistics\n  mi_stat_count_t   malloc_bins[MI_BIN_HUGE+1];   // allocation per size bin\n  mi_stat_count_t   page_bins[MI_BIN_HUGE+1];     // pages allocated per size bin\n} mi_stats_t;\n\n#undef MI_STAT_COUNT\n#undef MI_STAT_COUNTER\n\n// Exported definitions\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nmi_decl_export void  mi_stats_get( size_t stats_size, mi_stats_t* stats ) mi_attr_noexcept;\nmi_decl_export char* mi_stats_get_json( size_t buf_size, char* buf ) mi_attr_noexcept;    // use mi_free to free the result if the input buf == NULL\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif // MIMALLOC_STATS_H\n"
  },
  {
    "path": "third-party/mimalloc/include/mimalloc.h",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2025, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#pragma once\n#ifndef MIMALLOC_H\n#define MIMALLOC_H\n\n#define MI_MALLOC_VERSION 222   // major + 2 digits minor\n\n// ------------------------------------------------------\n// Compiler specific attributes\n// ------------------------------------------------------\n\n#ifdef __cplusplus\n  #if (__cplusplus >= 201103L) || (_MSC_VER > 1900)  // C++11\n    #define mi_attr_noexcept   noexcept\n  #else\n    #define mi_attr_noexcept   throw()\n  #endif\n#else\n  #define mi_attr_noexcept\n#endif\n\n#if defined(__cplusplus) && (__cplusplus >= 201703)\n  #define mi_decl_nodiscard    [[nodiscard]]\n#elif (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__)  // includes clang, icc, and clang-cl\n  #define mi_decl_nodiscard    __attribute__((warn_unused_result))\n#elif defined(_HAS_NODISCARD)\n  #define mi_decl_nodiscard    _NODISCARD\n#elif (_MSC_VER >= 1700)\n  #define mi_decl_nodiscard    _Check_return_\n#else\n  #define mi_decl_nodiscard\n#endif\n\n#if defined(_MSC_VER) || defined(__MINGW32__)\n  #if !defined(MI_SHARED_LIB)\n    #define mi_decl_export\n  #elif defined(MI_SHARED_LIB_EXPORT)\n    #define mi_decl_export              __declspec(dllexport)\n  #else\n    #define mi_decl_export              __declspec(dllimport)\n  #endif\n  #if defined(__MINGW32__)\n    #define mi_decl_restrict\n    #define mi_attr_malloc              __attribute__((malloc))\n  #else\n    #if (_MSC_VER >= 1900) && !defined(__EDG__)\n      #define mi_decl_restrict          __declspec(allocator) __declspec(restrict)\n    #else\n      #define mi_decl_restrict          __declspec(restrict)\n    #endif\n    #define mi_attr_malloc\n  #endif\n  #define mi_cdecl                      __cdecl\n  #define mi_attr_alloc_size(s)\n  #define mi_attr_alloc_size2(s1,s2)\n  #define mi_attr_alloc_align(p)\n#elif defined(__GNUC__)                 // includes clang and icc\n  #if defined(MI_SHARED_LIB) && defined(MI_SHARED_LIB_EXPORT)\n    #define mi_decl_export              __attribute__((visibility(\"default\")))\n  #else\n    #define mi_decl_export\n  #endif\n  #define mi_cdecl                      // leads to warnings... __attribute__((cdecl))\n  #define mi_decl_restrict\n  #define mi_attr_malloc                __attribute__((malloc))\n  #if (defined(__clang_major__) && (__clang_major__ < 4)) || (__GNUC__ < 5)\n    #define mi_attr_alloc_size(s)\n    #define mi_attr_alloc_size2(s1,s2)\n    #define mi_attr_alloc_align(p)\n  #elif defined(__INTEL_COMPILER)\n    #define mi_attr_alloc_size(s)       __attribute__((alloc_size(s)))\n    #define mi_attr_alloc_size2(s1,s2)  __attribute__((alloc_size(s1,s2)))\n    #define mi_attr_alloc_align(p)\n  #else\n    #define mi_attr_alloc_size(s)       __attribute__((alloc_size(s)))\n    #define mi_attr_alloc_size2(s1,s2)  __attribute__((alloc_size(s1,s2)))\n    #define mi_attr_alloc_align(p)      __attribute__((alloc_align(p)))\n  #endif\n#else\n  #define mi_cdecl\n  #define mi_decl_export\n  #define mi_decl_restrict\n  #define mi_attr_malloc\n  #define mi_attr_alloc_size(s)\n  #define mi_attr_alloc_size2(s1,s2)\n  #define mi_attr_alloc_align(p)\n#endif\n\n// ------------------------------------------------------\n// Includes\n// ------------------------------------------------------\n\n#include <stddef.h>     // size_t\n#include <stdbool.h>    // bool\n#include <stdint.h>     // INTPTR_MAX\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// ------------------------------------------------------\n// Standard malloc interface\n// ------------------------------------------------------\n\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_malloc(size_t size)  mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(1);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_calloc(size_t count, size_t size)  mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size2(1,2);\nmi_decl_nodiscard mi_decl_export void* mi_realloc(void* p, size_t newsize)      mi_attr_noexcept mi_attr_alloc_size(2);\nmi_decl_export void* mi_expand(void* p, size_t newsize)                         mi_attr_noexcept mi_attr_alloc_size(2);\n\nmi_decl_export void mi_free(void* p) mi_attr_noexcept;\nmi_decl_nodiscard mi_decl_export mi_decl_restrict char* mi_strdup(const char* s) mi_attr_noexcept mi_attr_malloc;\nmi_decl_nodiscard mi_decl_export mi_decl_restrict char* mi_strndup(const char* s, size_t n) mi_attr_noexcept mi_attr_malloc;\nmi_decl_nodiscard mi_decl_export mi_decl_restrict char* mi_realpath(const char* fname, char* resolved_name) mi_attr_noexcept mi_attr_malloc;\n\n// ------------------------------------------------------\n// Extended functionality\n// ------------------------------------------------------\n#define MI_SMALL_WSIZE_MAX  (128)\n#define MI_SMALL_SIZE_MAX   (MI_SMALL_WSIZE_MAX*sizeof(void*))\n\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_malloc_small(size_t size) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(1);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_zalloc_small(size_t size) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(1);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_zalloc(size_t size)       mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(1);\n\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_mallocn(size_t count, size_t size) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size2(1,2);\nmi_decl_nodiscard mi_decl_export void* mi_reallocn(void* p, size_t count, size_t size)        mi_attr_noexcept mi_attr_alloc_size2(2,3);\nmi_decl_nodiscard mi_decl_export void* mi_reallocf(void* p, size_t newsize)                   mi_attr_noexcept mi_attr_alloc_size(2);\n\nmi_decl_nodiscard mi_decl_export size_t mi_usable_size(const void* p) mi_attr_noexcept;\nmi_decl_nodiscard mi_decl_export size_t mi_good_size(size_t size)     mi_attr_noexcept;\n\n\n// ------------------------------------------------------\n// Internals\n// ------------------------------------------------------\n\ntypedef void (mi_cdecl mi_deferred_free_fun)(bool force, unsigned long long heartbeat, void* arg);\nmi_decl_export void mi_register_deferred_free(mi_deferred_free_fun* deferred_free, void* arg) mi_attr_noexcept;\n\ntypedef void (mi_cdecl mi_output_fun)(const char* msg, void* arg);\nmi_decl_export void mi_register_output(mi_output_fun* out, void* arg) mi_attr_noexcept;\n\ntypedef void (mi_cdecl mi_error_fun)(int err, void* arg);\nmi_decl_export void mi_register_error(mi_error_fun* fun, void* arg);\n\nmi_decl_export void mi_collect(bool force)    mi_attr_noexcept;\nmi_decl_export int  mi_version(void)          mi_attr_noexcept;\nmi_decl_export void mi_stats_reset(void)      mi_attr_noexcept;\nmi_decl_export void mi_stats_merge(void)      mi_attr_noexcept;\nmi_decl_export void mi_stats_print(void* out) mi_attr_noexcept;  // backward compatibility: `out` is ignored and should be NULL\nmi_decl_export void mi_stats_print_out(mi_output_fun* out, void* arg) mi_attr_noexcept;\nmi_decl_export void mi_options_print(void)    mi_attr_noexcept;\n\nmi_decl_export void mi_process_init(void)     mi_attr_noexcept;\nmi_decl_export void mi_thread_init(void)      mi_attr_noexcept;\nmi_decl_export void mi_thread_done(void)      mi_attr_noexcept;\nmi_decl_export void mi_thread_stats_print_out(mi_output_fun* out, void* arg) mi_attr_noexcept;\n\nmi_decl_export void mi_process_info(size_t* elapsed_msecs, size_t* user_msecs, size_t* system_msecs,\n                                    size_t* current_rss, size_t* peak_rss,\n                                    size_t* current_commit, size_t* peak_commit, size_t* page_faults) mi_attr_noexcept;\n\n// -------------------------------------------------------------------------------------\n// Aligned allocation\n// Note that `alignment` always follows `size` for consistency with unaligned\n// allocation, but unfortunately this differs from `posix_memalign` and `aligned_alloc`.\n// -------------------------------------------------------------------------------------\n\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_malloc_aligned(size_t size, size_t alignment) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(1) mi_attr_alloc_align(2);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_malloc_aligned_at(size_t size, size_t alignment, size_t offset) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(1);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_zalloc_aligned(size_t size, size_t alignment) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(1) mi_attr_alloc_align(2);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_zalloc_aligned_at(size_t size, size_t alignment, size_t offset) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(1);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_calloc_aligned(size_t count, size_t size, size_t alignment) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size2(1,2) mi_attr_alloc_align(3);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_calloc_aligned_at(size_t count, size_t size, size_t alignment, size_t offset) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size2(1,2);\nmi_decl_nodiscard mi_decl_export void* mi_realloc_aligned(void* p, size_t newsize, size_t alignment) mi_attr_noexcept mi_attr_alloc_size(2) mi_attr_alloc_align(3);\nmi_decl_nodiscard mi_decl_export void* mi_realloc_aligned_at(void* p, size_t newsize, size_t alignment, size_t offset) mi_attr_noexcept mi_attr_alloc_size(2);\n\n\n// -------------------------------------------------------------------------------------\n// Heaps: first-class, but can only allocate from the same thread that created it.\n// -------------------------------------------------------------------------------------\n\nstruct mi_heap_s;\ntypedef struct mi_heap_s mi_heap_t;\n\nmi_decl_nodiscard mi_decl_export mi_heap_t* mi_heap_new(void);\nmi_decl_export void       mi_heap_delete(mi_heap_t* heap);\nmi_decl_export void       mi_heap_destroy(mi_heap_t* heap);\nmi_decl_export mi_heap_t* mi_heap_set_default(mi_heap_t* heap);\nmi_decl_export mi_heap_t* mi_heap_get_default(void);\nmi_decl_export mi_heap_t* mi_heap_get_backing(void);\nmi_decl_export void       mi_heap_collect(mi_heap_t* heap, bool force) mi_attr_noexcept;\n\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_heap_malloc(mi_heap_t* heap, size_t size) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(2);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_heap_zalloc(mi_heap_t* heap, size_t size) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(2);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_heap_calloc(mi_heap_t* heap, size_t count, size_t size) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size2(2, 3);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_heap_mallocn(mi_heap_t* heap, size_t count, size_t size) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size2(2, 3);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_heap_malloc_small(mi_heap_t* heap, size_t size) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(2);\n\nmi_decl_nodiscard mi_decl_export void* mi_heap_realloc(mi_heap_t* heap, void* p, size_t newsize)              mi_attr_noexcept mi_attr_alloc_size(3);\nmi_decl_nodiscard mi_decl_export void* mi_heap_reallocn(mi_heap_t* heap, void* p, size_t count, size_t size)  mi_attr_noexcept mi_attr_alloc_size2(3,4);\nmi_decl_nodiscard mi_decl_export void* mi_heap_reallocf(mi_heap_t* heap, void* p, size_t newsize)             mi_attr_noexcept mi_attr_alloc_size(3);\n\nmi_decl_nodiscard mi_decl_export mi_decl_restrict char* mi_heap_strdup(mi_heap_t* heap, const char* s)            mi_attr_noexcept mi_attr_malloc;\nmi_decl_nodiscard mi_decl_export mi_decl_restrict char* mi_heap_strndup(mi_heap_t* heap, const char* s, size_t n) mi_attr_noexcept mi_attr_malloc;\nmi_decl_nodiscard mi_decl_export mi_decl_restrict char* mi_heap_realpath(mi_heap_t* heap, const char* fname, char* resolved_name) mi_attr_noexcept mi_attr_malloc;\n\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_heap_malloc_aligned(mi_heap_t* heap, size_t size, size_t alignment) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(2) mi_attr_alloc_align(3);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_heap_malloc_aligned_at(mi_heap_t* heap, size_t size, size_t alignment, size_t offset) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(2);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_heap_zalloc_aligned(mi_heap_t* heap, size_t size, size_t alignment) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(2) mi_attr_alloc_align(3);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_heap_zalloc_aligned_at(mi_heap_t* heap, size_t size, size_t alignment, size_t offset) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(2);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_heap_calloc_aligned(mi_heap_t* heap, size_t count, size_t size, size_t alignment) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size2(2, 3) mi_attr_alloc_align(4);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_heap_calloc_aligned_at(mi_heap_t* heap, size_t count, size_t size, size_t alignment, size_t offset) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size2(2, 3);\nmi_decl_nodiscard mi_decl_export void* mi_heap_realloc_aligned(mi_heap_t* heap, void* p, size_t newsize, size_t alignment) mi_attr_noexcept mi_attr_alloc_size(3) mi_attr_alloc_align(4);\nmi_decl_nodiscard mi_decl_export void* mi_heap_realloc_aligned_at(mi_heap_t* heap, void* p, size_t newsize, size_t alignment, size_t offset) mi_attr_noexcept mi_attr_alloc_size(3);\n\n\n// --------------------------------------------------------------------------------\n// Zero initialized re-allocation.\n// Only valid on memory that was originally allocated with zero initialization too.\n// e.g. `mi_calloc`, `mi_zalloc`, `mi_zalloc_aligned` etc.\n// see <https://github.com/microsoft/mimalloc/issues/63#issuecomment-508272992>\n// --------------------------------------------------------------------------------\n\nmi_decl_nodiscard mi_decl_export void* mi_rezalloc(void* p, size_t newsize)                mi_attr_noexcept mi_attr_alloc_size(2);\nmi_decl_nodiscard mi_decl_export void* mi_recalloc(void* p, size_t newcount, size_t size)  mi_attr_noexcept mi_attr_alloc_size2(2,3);\n\nmi_decl_nodiscard mi_decl_export void* mi_rezalloc_aligned(void* p, size_t newsize, size_t alignment) mi_attr_noexcept mi_attr_alloc_size(2) mi_attr_alloc_align(3);\nmi_decl_nodiscard mi_decl_export void* mi_rezalloc_aligned_at(void* p, size_t newsize, size_t alignment, size_t offset) mi_attr_noexcept mi_attr_alloc_size(2);\nmi_decl_nodiscard mi_decl_export void* mi_recalloc_aligned(void* p, size_t newcount, size_t size, size_t alignment) mi_attr_noexcept mi_attr_alloc_size2(2,3) mi_attr_alloc_align(4);\nmi_decl_nodiscard mi_decl_export void* mi_recalloc_aligned_at(void* p, size_t newcount, size_t size, size_t alignment, size_t offset) mi_attr_noexcept mi_attr_alloc_size2(2,3);\n\nmi_decl_nodiscard mi_decl_export void* mi_heap_rezalloc(mi_heap_t* heap, void* p, size_t newsize)                mi_attr_noexcept mi_attr_alloc_size(3);\nmi_decl_nodiscard mi_decl_export void* mi_heap_recalloc(mi_heap_t* heap, void* p, size_t newcount, size_t size)  mi_attr_noexcept mi_attr_alloc_size2(3,4);\n\nmi_decl_nodiscard mi_decl_export void* mi_heap_rezalloc_aligned(mi_heap_t* heap, void* p, size_t newsize, size_t alignment) mi_attr_noexcept mi_attr_alloc_size(3) mi_attr_alloc_align(4);\nmi_decl_nodiscard mi_decl_export void* mi_heap_rezalloc_aligned_at(mi_heap_t* heap, void* p, size_t newsize, size_t alignment, size_t offset) mi_attr_noexcept mi_attr_alloc_size(3);\nmi_decl_nodiscard mi_decl_export void* mi_heap_recalloc_aligned(mi_heap_t* heap, void* p, size_t newcount, size_t size, size_t alignment) mi_attr_noexcept mi_attr_alloc_size2(3,4) mi_attr_alloc_align(5);\nmi_decl_nodiscard mi_decl_export void* mi_heap_recalloc_aligned_at(mi_heap_t* heap, void* p, size_t newcount, size_t size, size_t alignment, size_t offset) mi_attr_noexcept mi_attr_alloc_size2(3,4);\n\n\n// ------------------------------------------------------\n// Analysis\n// ------------------------------------------------------\n\nmi_decl_export bool mi_heap_contains_block(mi_heap_t* heap, const void* p);\nmi_decl_export bool mi_heap_check_owned(mi_heap_t* heap, const void* p);\nmi_decl_export bool mi_check_owned(const void* p);\n\n// An area of heap space contains blocks of a single size.\ntypedef struct mi_heap_area_s {\n  void*  blocks;      // start of the area containing heap blocks\n  size_t reserved;    // bytes reserved for this area (virtual)\n  size_t committed;   // current available bytes for this area\n  size_t used;        // number of allocated blocks\n  size_t block_size;  // size in bytes of each block\n  size_t full_block_size; // size in bytes of a full block including padding and metadata.\n  int    heap_tag;    // heap tag associated with this area\n} mi_heap_area_t;\n\ntypedef bool (mi_cdecl mi_block_visit_fun)(const mi_heap_t* heap, const mi_heap_area_t* area, void* block, size_t block_size, void* arg);\n\nmi_decl_export bool mi_heap_visit_blocks(const mi_heap_t* heap, bool visit_blocks, mi_block_visit_fun* visitor, void* arg);\n\n// Experimental\nmi_decl_nodiscard mi_decl_export bool mi_is_in_heap_region(const void* p) mi_attr_noexcept;\nmi_decl_nodiscard mi_decl_export bool mi_is_redirected(void) mi_attr_noexcept;\n\nmi_decl_export int   mi_reserve_huge_os_pages_interleave(size_t pages, size_t numa_nodes, size_t timeout_msecs) mi_attr_noexcept;\nmi_decl_export int   mi_reserve_huge_os_pages_at(size_t pages, int numa_node, size_t timeout_msecs) mi_attr_noexcept;\n\nmi_decl_export int   mi_reserve_os_memory(size_t size, bool commit, bool allow_large) mi_attr_noexcept;\nmi_decl_export bool  mi_manage_os_memory(void* start, size_t size, bool is_committed, bool is_large, bool is_zero, int numa_node) mi_attr_noexcept;\n\nmi_decl_export void  mi_debug_show_arenas(void) mi_attr_noexcept;\nmi_decl_export void  mi_arenas_print(void) mi_attr_noexcept;\n\n// Experimental: heaps associated with specific memory arena's\ntypedef int mi_arena_id_t;\nmi_decl_export void* mi_arena_area(mi_arena_id_t arena_id, size_t* size);\nmi_decl_export int   mi_reserve_huge_os_pages_at_ex(size_t pages, int numa_node, size_t timeout_msecs, bool exclusive, mi_arena_id_t* arena_id) mi_attr_noexcept;\nmi_decl_export int   mi_reserve_os_memory_ex(size_t size, bool commit, bool allow_large, bool exclusive, mi_arena_id_t* arena_id) mi_attr_noexcept;\nmi_decl_export bool  mi_manage_os_memory_ex(void* start, size_t size, bool is_committed, bool is_large, bool is_zero, int numa_node, bool exclusive, mi_arena_id_t* arena_id) mi_attr_noexcept;\n\n#if MI_MALLOC_VERSION >= 182\n// Create a heap that only allocates in the specified arena\nmi_decl_nodiscard mi_decl_export mi_heap_t* mi_heap_new_in_arena(mi_arena_id_t arena_id);\n#endif\n\n\n// Experimental: allow sub-processes whose memory areas stay separated (and no reclamation between them)\n// Used for example for separate interpreters in one process.\ntypedef void* mi_subproc_id_t;\nmi_decl_export mi_subproc_id_t mi_subproc_main(void);\nmi_decl_export mi_subproc_id_t mi_subproc_new(void);\nmi_decl_export void mi_subproc_delete(mi_subproc_id_t subproc);\nmi_decl_export void mi_subproc_add_current_thread(mi_subproc_id_t subproc); // this should be called right after a thread is created (and no allocation has taken place yet)\n\n// Experimental: visit abandoned heap areas (that are not owned by a specific heap)\nmi_decl_export bool mi_abandoned_visit_blocks(mi_subproc_id_t subproc_id, int heap_tag, bool visit_blocks, mi_block_visit_fun* visitor, void* arg);\n\n// Experimental: objects followed by a guard page.\n// A sample rate of 0 disables guarded objects, while 1 uses a guard page for every object.\n// A seed of 0 uses a random start point. Only objects within the size bound are eligable for guard pages.\nmi_decl_export void mi_heap_guarded_set_sample_rate(mi_heap_t* heap, size_t sample_rate, size_t seed);\nmi_decl_export void mi_heap_guarded_set_size_bound(mi_heap_t* heap, size_t min, size_t max);\n\n// Experimental: communicate that the thread is part of a threadpool\nmi_decl_export void mi_thread_set_in_threadpool(void) mi_attr_noexcept;\n\n// Experimental: create a new heap with a specified heap tag. Set `allow_destroy` to false to allow the thread\n// to reclaim abandoned memory (with a compatible heap_tag and arena_id) but in that case `mi_heap_destroy` will\n// fall back to `mi_heap_delete`.\nmi_decl_nodiscard mi_decl_export mi_heap_t* mi_heap_new_ex(int heap_tag, bool allow_destroy, mi_arena_id_t arena_id);\n\n// deprecated\nmi_decl_export int mi_reserve_huge_os_pages(size_t pages, double max_secs, size_t* pages_reserved) mi_attr_noexcept;\nmi_decl_export void mi_collect_reduce(size_t target_thread_owned) mi_attr_noexcept;\n\n\n\n// ------------------------------------------------------\n// Convenience\n// ------------------------------------------------------\n\n#define mi_malloc_tp(tp)                ((tp*)mi_malloc(sizeof(tp)))\n#define mi_zalloc_tp(tp)                ((tp*)mi_zalloc(sizeof(tp)))\n#define mi_calloc_tp(tp,n)              ((tp*)mi_calloc(n,sizeof(tp)))\n#define mi_mallocn_tp(tp,n)             ((tp*)mi_mallocn(n,sizeof(tp)))\n#define mi_reallocn_tp(p,tp,n)          ((tp*)mi_reallocn(p,n,sizeof(tp)))\n#define mi_recalloc_tp(p,tp,n)          ((tp*)mi_recalloc(p,n,sizeof(tp)))\n\n#define mi_heap_malloc_tp(hp,tp)        ((tp*)mi_heap_malloc(hp,sizeof(tp)))\n#define mi_heap_zalloc_tp(hp,tp)        ((tp*)mi_heap_zalloc(hp,sizeof(tp)))\n#define mi_heap_calloc_tp(hp,tp,n)      ((tp*)mi_heap_calloc(hp,n,sizeof(tp)))\n#define mi_heap_mallocn_tp(hp,tp,n)     ((tp*)mi_heap_mallocn(hp,n,sizeof(tp)))\n#define mi_heap_reallocn_tp(hp,p,tp,n)  ((tp*)mi_heap_reallocn(hp,p,n,sizeof(tp)))\n#define mi_heap_recalloc_tp(hp,p,tp,n)  ((tp*)mi_heap_recalloc(hp,p,n,sizeof(tp)))\n\n\n// ------------------------------------------------------\n// Options\n// ------------------------------------------------------\n\ntypedef enum mi_option_e {\n  // stable options\n  mi_option_show_errors,                // print error messages\n  mi_option_show_stats,                 // print statistics on termination\n  mi_option_verbose,                    // print verbose messages\n  // advanced options\n  mi_option_eager_commit,               // eager commit segments? (after `eager_commit_delay` segments) (=1)\n  mi_option_arena_eager_commit,         // eager commit arenas? Use 2 to enable just on overcommit systems (=2)\n  mi_option_purge_decommits,            // should a memory purge decommit? (=1). Set to 0 to use memory reset on a purge (instead of decommit)\n  mi_option_allow_large_os_pages,       // allow large (2 or 4 MiB) OS pages, implies eager commit. If false, also disables THP for the process.\n  mi_option_reserve_huge_os_pages,      // reserve N huge OS pages (1GiB pages) at startup\n  mi_option_reserve_huge_os_pages_at,   // reserve huge OS pages at a specific NUMA node\n  mi_option_reserve_os_memory,          // reserve specified amount of OS memory in an arena at startup (internally, this value is in KiB; use `mi_option_get_size`)\n  mi_option_deprecated_segment_cache,\n  mi_option_deprecated_page_reset,\n  mi_option_abandoned_page_purge,       // immediately purge delayed purges on thread termination\n  mi_option_deprecated_segment_reset,\n  mi_option_eager_commit_delay,         // the first N segments per thread are not eagerly committed (but per page in the segment on demand)\n  mi_option_purge_delay,                // memory purging is delayed by N milli seconds; use 0 for immediate purging or -1 for no purging at all. (=10)\n  mi_option_use_numa_nodes,             // 0 = use all available numa nodes, otherwise use at most N nodes.\n  mi_option_disallow_os_alloc,          // 1 = do not use OS memory for allocation (but only programmatically reserved arenas)\n  mi_option_os_tag,                     // tag used for OS logging (macOS only for now) (=100)\n  mi_option_max_errors,                 // issue at most N error messages\n  mi_option_max_warnings,               // issue at most N warning messages\n  mi_option_max_segment_reclaim,        // max. percentage of the abandoned segments can be reclaimed per try (=10%)\n  mi_option_destroy_on_exit,            // if set, release all memory on exit; sometimes used for dynamic unloading but can be unsafe\n  mi_option_arena_reserve,              // initial memory size for arena reservation (= 1 GiB on 64-bit) (internally, this value is in KiB; use `mi_option_get_size`)\n  mi_option_arena_purge_mult,           // multiplier for `purge_delay` for the purging delay for arenas (=10)\n  mi_option_purge_extend_delay,\n  mi_option_abandoned_reclaim_on_free,  // allow to reclaim an abandoned segment on a free (=1)\n  mi_option_disallow_arena_alloc,       // 1 = do not use arena's for allocation (except if using specific arena id's)\n  mi_option_retry_on_oom,               // retry on out-of-memory for N milli seconds (=400), set to 0 to disable retries. (only on windows)\n  mi_option_visit_abandoned,            // allow visiting heap blocks from abandoned threads (=0)\n  mi_option_guarded_min,                // only used when building with MI_GUARDED: minimal rounded object size for guarded objects (=0)\n  mi_option_guarded_max,                // only used when building with MI_GUARDED: maximal rounded object size for guarded objects (=0)\n  mi_option_guarded_precise,            // disregard minimal alignment requirement to always place guarded blocks exactly in front of a guard page (=0)\n  mi_option_guarded_sample_rate,        // 1 out of N allocations in the min/max range will be guarded (=1000)\n  mi_option_guarded_sample_seed,        // can be set to allow for a (more) deterministic re-execution when a guard page is triggered (=0)\n  mi_option_target_segments_per_thread, // experimental (=0)\n  mi_option_generic_collect,            // collect heaps every N (=10000) generic allocation calls\n  _mi_option_last,\n  // legacy option names\n  mi_option_large_os_pages = mi_option_allow_large_os_pages,\n  mi_option_eager_region_commit = mi_option_arena_eager_commit,\n  mi_option_reset_decommits = mi_option_purge_decommits,\n  mi_option_reset_delay = mi_option_purge_delay,\n  mi_option_abandoned_page_reset = mi_option_abandoned_page_purge,\n  mi_option_limit_os_alloc = mi_option_disallow_os_alloc\n} mi_option_t;\n\n\nmi_decl_nodiscard mi_decl_export bool mi_option_is_enabled(mi_option_t option);\nmi_decl_export void mi_option_enable(mi_option_t option);\nmi_decl_export void mi_option_disable(mi_option_t option);\nmi_decl_export void mi_option_set_enabled(mi_option_t option, bool enable);\nmi_decl_export void mi_option_set_enabled_default(mi_option_t option, bool enable);\n\nmi_decl_nodiscard mi_decl_export long   mi_option_get(mi_option_t option);\nmi_decl_nodiscard mi_decl_export long   mi_option_get_clamp(mi_option_t option, long min, long max);\nmi_decl_nodiscard mi_decl_export size_t mi_option_get_size(mi_option_t option);\nmi_decl_export void mi_option_set(mi_option_t option, long value);\nmi_decl_export void mi_option_set_default(mi_option_t option, long value);\n\n\n// -------------------------------------------------------------------------------------------------------\n// \"mi\" prefixed implementations of various posix, Unix, Windows, and C++ allocation functions.\n// (This can be convenient when providing overrides of these functions as done in `mimalloc-override.h`.)\n// note: we use `mi_cfree` as \"checked free\" and it checks if the pointer is in our heap before free-ing.\n// -------------------------------------------------------------------------------------------------------\n\nmi_decl_export void  mi_cfree(void* p) mi_attr_noexcept;\nmi_decl_export void* mi__expand(void* p, size_t newsize) mi_attr_noexcept;\nmi_decl_nodiscard mi_decl_export size_t mi_malloc_size(const void* p)        mi_attr_noexcept;\nmi_decl_nodiscard mi_decl_export size_t mi_malloc_good_size(size_t size)     mi_attr_noexcept;\nmi_decl_nodiscard mi_decl_export size_t mi_malloc_usable_size(const void *p) mi_attr_noexcept;\n\nmi_decl_export int mi_posix_memalign(void** p, size_t alignment, size_t size)   mi_attr_noexcept;\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_memalign(size_t alignment, size_t size) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(2) mi_attr_alloc_align(1);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_valloc(size_t size)  mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(1);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_pvalloc(size_t size) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(1);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_aligned_alloc(size_t alignment, size_t size) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(2) mi_attr_alloc_align(1);\n\nmi_decl_nodiscard mi_decl_export void* mi_reallocarray(void* p, size_t count, size_t size) mi_attr_noexcept mi_attr_alloc_size2(2,3);\nmi_decl_nodiscard mi_decl_export int   mi_reallocarr(void* p, size_t count, size_t size) mi_attr_noexcept;\nmi_decl_nodiscard mi_decl_export void* mi_aligned_recalloc(void* p, size_t newcount, size_t size, size_t alignment) mi_attr_noexcept;\nmi_decl_nodiscard mi_decl_export void* mi_aligned_offset_recalloc(void* p, size_t newcount, size_t size, size_t alignment, size_t offset) mi_attr_noexcept;\n\nmi_decl_nodiscard mi_decl_export mi_decl_restrict unsigned short* mi_wcsdup(const unsigned short* s) mi_attr_noexcept mi_attr_malloc;\nmi_decl_nodiscard mi_decl_export mi_decl_restrict unsigned char*  mi_mbsdup(const unsigned char* s)  mi_attr_noexcept mi_attr_malloc;\nmi_decl_export int mi_dupenv_s(char** buf, size_t* size, const char* name)                      mi_attr_noexcept;\nmi_decl_export int mi_wdupenv_s(unsigned short** buf, size_t* size, const unsigned short* name) mi_attr_noexcept;\n\nmi_decl_export void mi_free_size(void* p, size_t size)                           mi_attr_noexcept;\nmi_decl_export void mi_free_size_aligned(void* p, size_t size, size_t alignment) mi_attr_noexcept;\nmi_decl_export void mi_free_aligned(void* p, size_t alignment)                   mi_attr_noexcept;\n\n// The `mi_new` wrappers implement C++ semantics on out-of-memory instead of directly returning `NULL`.\n// (and call `std::get_new_handler` and potentially raise a `std::bad_alloc` exception).\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_new(size_t size)                   mi_attr_malloc mi_attr_alloc_size(1);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_new_aligned(size_t size, size_t alignment) mi_attr_malloc mi_attr_alloc_size(1) mi_attr_alloc_align(2);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_new_nothrow(size_t size)           mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(1);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_new_aligned_nothrow(size_t size, size_t alignment) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(1) mi_attr_alloc_align(2);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_new_n(size_t count, size_t size)   mi_attr_malloc mi_attr_alloc_size2(1, 2);\nmi_decl_nodiscard mi_decl_export void* mi_new_realloc(void* p, size_t newsize)                mi_attr_alloc_size(2);\nmi_decl_nodiscard mi_decl_export void* mi_new_reallocn(void* p, size_t newcount, size_t size) mi_attr_alloc_size2(2, 3);\n\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_heap_alloc_new(mi_heap_t* heap, size_t size)                mi_attr_malloc mi_attr_alloc_size(2);\nmi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_heap_alloc_new_n(mi_heap_t* heap, size_t count, size_t size) mi_attr_malloc mi_attr_alloc_size2(2, 3);\n\n#ifdef __cplusplus\n}\n#endif\n\n// ---------------------------------------------------------------------------------------------\n// Implement the C++ std::allocator interface for use in STL containers.\n// (note: see `mimalloc-new-delete.h` for overriding the new/delete operators globally)\n// ---------------------------------------------------------------------------------------------\n#ifdef __cplusplus\n\n#include <cstddef>     // std::size_t\n#include <cstdint>     // PTRDIFF_MAX\n#if (__cplusplus >= 201103L) || (_MSC_VER > 1900)  // C++11\n#include <type_traits> // std::true_type\n#include <utility>     // std::forward\n#endif\n\ntemplate<class T> struct _mi_stl_allocator_common {\n  typedef T                 value_type;\n  typedef std::size_t       size_type;\n  typedef std::ptrdiff_t    difference_type;\n  typedef value_type&       reference;\n  typedef value_type const& const_reference;\n  typedef value_type*       pointer;\n  typedef value_type const* const_pointer;\n\n  #if ((__cplusplus >= 201103L) || (_MSC_VER > 1900))  // C++11\n  using propagate_on_container_copy_assignment = std::true_type;\n  using propagate_on_container_move_assignment = std::true_type;\n  using propagate_on_container_swap            = std::true_type;\n  template <class U, class ...Args> void construct(U* p, Args&& ...args) { ::new(p) U(std::forward<Args>(args)...); }\n  template <class U> void destroy(U* p) mi_attr_noexcept { p->~U(); }\n  #else\n  void construct(pointer p, value_type const& val) { ::new(p) value_type(val); }\n  void destroy(pointer p) { p->~value_type(); }\n  #endif\n\n  size_type     max_size() const mi_attr_noexcept { return (PTRDIFF_MAX/sizeof(value_type)); }\n  pointer       address(reference x) const        { return &x; }\n  const_pointer address(const_reference x) const  { return &x; }\n};\n\ntemplate<class T> struct mi_stl_allocator : public _mi_stl_allocator_common<T> {\n  using typename _mi_stl_allocator_common<T>::size_type;\n  using typename _mi_stl_allocator_common<T>::value_type;\n  using typename _mi_stl_allocator_common<T>::pointer;\n  template <class U> struct rebind { typedef mi_stl_allocator<U> other; };\n\n  mi_stl_allocator()                                             mi_attr_noexcept = default;\n  mi_stl_allocator(const mi_stl_allocator&)                      mi_attr_noexcept = default;\n  template<class U> mi_stl_allocator(const mi_stl_allocator<U>&) mi_attr_noexcept { }\n  mi_stl_allocator  select_on_container_copy_construction() const { return *this; }\n  void              deallocate(T* p, size_type) { mi_free(p); }\n\n  #if (__cplusplus >= 201703L)  // C++17\n  mi_decl_nodiscard T* allocate(size_type count) { return static_cast<T*>(mi_new_n(count, sizeof(T))); }\n  mi_decl_nodiscard T* allocate(size_type count, const void*) { return allocate(count); }\n  #else\n  mi_decl_nodiscard pointer allocate(size_type count, const void* = 0) { return static_cast<pointer>(mi_new_n(count, sizeof(value_type))); }\n  #endif\n\n  #if ((__cplusplus >= 201103L) || (_MSC_VER > 1900))  // C++11\n  using is_always_equal = std::true_type;\n  #endif\n};\n\ntemplate<class T1,class T2> bool operator==(const mi_stl_allocator<T1>& , const mi_stl_allocator<T2>& ) mi_attr_noexcept { return true; }\ntemplate<class T1,class T2> bool operator!=(const mi_stl_allocator<T1>& , const mi_stl_allocator<T2>& ) mi_attr_noexcept { return false; }\n\n\n#if (__cplusplus >= 201103L) || (_MSC_VER >= 1900)  // C++11\n#define MI_HAS_HEAP_STL_ALLOCATOR 1\n\n#include <memory>      // std::shared_ptr\n\n// Common base class for STL allocators in a specific heap\ntemplate<class T, bool _mi_destroy> struct _mi_heap_stl_allocator_common : public _mi_stl_allocator_common<T> {\n  using typename _mi_stl_allocator_common<T>::size_type;\n  using typename _mi_stl_allocator_common<T>::value_type;\n  using typename _mi_stl_allocator_common<T>::pointer;\n\n  _mi_heap_stl_allocator_common(mi_heap_t* hp) : heap(hp, [](mi_heap_t*) {}) {}    /* will not delete nor destroy the passed in heap */\n\n  #if (__cplusplus >= 201703L)  // C++17\n  mi_decl_nodiscard T* allocate(size_type count) { return static_cast<T*>(mi_heap_alloc_new_n(this->heap.get(), count, sizeof(T))); }\n  mi_decl_nodiscard T* allocate(size_type count, const void*) { return allocate(count); }\n  #else\n  mi_decl_nodiscard pointer allocate(size_type count, const void* = 0) { return static_cast<pointer>(mi_heap_alloc_new_n(this->heap.get(), count, sizeof(value_type))); }\n  #endif\n\n  #if ((__cplusplus >= 201103L) || (_MSC_VER > 1900))  // C++11\n  using is_always_equal = std::false_type;\n  #endif\n\n  void collect(bool force) { mi_heap_collect(this->heap.get(), force); }\n  template<class U> bool is_equal(const _mi_heap_stl_allocator_common<U, _mi_destroy>& x) const { return (this->heap == x.heap); }\n\nprotected:\n  std::shared_ptr<mi_heap_t> heap;\n  template<class U, bool D> friend struct _mi_heap_stl_allocator_common;\n\n  _mi_heap_stl_allocator_common() {\n    mi_heap_t* hp = mi_heap_new();\n    this->heap.reset(hp, (_mi_destroy ? &heap_destroy : &heap_delete));  /* calls heap_delete/destroy when the refcount drops to zero */\n  }\n  _mi_heap_stl_allocator_common(const _mi_heap_stl_allocator_common& x) mi_attr_noexcept : heap(x.heap) { }\n  template<class U> _mi_heap_stl_allocator_common(const _mi_heap_stl_allocator_common<U, _mi_destroy>& x) mi_attr_noexcept : heap(x.heap) { }\n\nprivate:\n  static void heap_delete(mi_heap_t* hp)  { if (hp != NULL) { mi_heap_delete(hp); } }\n  static void heap_destroy(mi_heap_t* hp) { if (hp != NULL) { mi_heap_destroy(hp); } }\n};\n\n// STL allocator allocation in a specific heap\ntemplate<class T> struct mi_heap_stl_allocator : public _mi_heap_stl_allocator_common<T, false> {\n  using typename _mi_heap_stl_allocator_common<T, false>::size_type;\n  mi_heap_stl_allocator() : _mi_heap_stl_allocator_common<T, false>() { } // creates fresh heap that is deleted when the destructor is called\n  mi_heap_stl_allocator(mi_heap_t* hp) : _mi_heap_stl_allocator_common<T, false>(hp) { }  // no delete nor destroy on the passed in heap\n  template<class U> mi_heap_stl_allocator(const mi_heap_stl_allocator<U>& x) mi_attr_noexcept : _mi_heap_stl_allocator_common<T, false>(x) { }\n\n  mi_heap_stl_allocator select_on_container_copy_construction() const { return *this; }\n  void deallocate(T* p, size_type) { mi_free(p); }\n  template<class U> struct rebind { typedef mi_heap_stl_allocator<U> other; };\n};\n\ntemplate<class T1, class T2> bool operator==(const mi_heap_stl_allocator<T1>& x, const mi_heap_stl_allocator<T2>& y) mi_attr_noexcept { return (x.is_equal(y)); }\ntemplate<class T1, class T2> bool operator!=(const mi_heap_stl_allocator<T1>& x, const mi_heap_stl_allocator<T2>& y) mi_attr_noexcept { return (!x.is_equal(y)); }\n\n\n// STL allocator allocation in a specific heap, where `free` does nothing and\n// the heap is destroyed in one go on destruction -- use with care!\ntemplate<class T> struct mi_heap_destroy_stl_allocator : public _mi_heap_stl_allocator_common<T, true> {\n  using typename _mi_heap_stl_allocator_common<T, true>::size_type;\n  mi_heap_destroy_stl_allocator() : _mi_heap_stl_allocator_common<T, true>() { } // creates fresh heap that is destroyed when the destructor is called\n  mi_heap_destroy_stl_allocator(mi_heap_t* hp) : _mi_heap_stl_allocator_common<T, true>(hp) { }  // no delete nor destroy on the passed in heap\n  template<class U> mi_heap_destroy_stl_allocator(const mi_heap_destroy_stl_allocator<U>& x) mi_attr_noexcept : _mi_heap_stl_allocator_common<T, true>(x) { }\n\n  mi_heap_destroy_stl_allocator select_on_container_copy_construction() const { return *this; }\n  void deallocate(T*, size_type) { /* do nothing as we destroy the heap on destruct. */ }\n  template<class U> struct rebind { typedef mi_heap_destroy_stl_allocator<U> other; };\n};\n\ntemplate<class T1, class T2> bool operator==(const mi_heap_destroy_stl_allocator<T1>& x, const mi_heap_destroy_stl_allocator<T2>& y) mi_attr_noexcept { return (x.is_equal(y)); }\ntemplate<class T1, class T2> bool operator!=(const mi_heap_destroy_stl_allocator<T1>& x, const mi_heap_destroy_stl_allocator<T2>& y) mi_attr_noexcept { return (!x.is_equal(y)); }\n\n#endif // C++11\n\n#endif // __cplusplus\n\n#endif\n"
  },
  {
    "path": "third-party/mimalloc/mimalloc.pc.in",
    "content": "prefix=@CMAKE_INSTALL_PREFIX@\nlibdir=@mi_pc_libdir@\nincludedir=@mi_pc_includedir@\n\nName: @PROJECT_NAME@\nDescription: A compact general purpose allocator with excellent performance\nVersion: @PACKAGE_VERSION@\nURL: https://github.com/microsoft/mimalloc/\nLibs: -L${libdir} -l@mi_libname@\nLibs.private: @mi_pc_libraries@\nCflags: -I${includedir}\n"
  },
  {
    "path": "third-party/mimalloc/readme.md",
    "content": "\n<img align=\"left\" width=\"100\" height=\"100\" src=\"doc/mimalloc-logo.png\"/>\n\n[<img align=\"right\" src=\"https://dev.azure.com/Daan0324/mimalloc/_apis/build/status/microsoft.mimalloc?branchName=dev\"/>](https://dev.azure.com/Daan0324/mimalloc/_build?definitionId=1&_a=summary)\n\n# mimalloc\n\n&nbsp;\n\nmimalloc (pronounced \"me-malloc\")\nis a general purpose allocator with excellent [performance](#performance) characteristics.\nInitially developed by Daan Leijen for the runtime systems of the\n[Koka](https://koka-lang.github.io) and [Lean](https://github.com/leanprover/lean) languages.\n\nLatest release   : `v3.0.2` (beta) (2025-03-06).  \nLatest v2 release: `v2.2.2` (2025-03-06).  \nLatest v1 release: `v1.9.2` (2024-03-06).\n\nmimalloc is a drop-in replacement for `malloc` and can be used in other programs\nwithout code changes, for example, on dynamically linked ELF-based systems (Linux, BSD, etc.) you can use it as:\n```\n> LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram\n```\nIt also includes a way to dynamically override the default allocator in [Windows](#override_on_windows). \nNotable aspects of the design include:\n\n- __small and consistent__: the library is about 10k LOC using simple and\n  consistent data structures. This makes it very suitable\n  to integrate and adapt in other projects. For runtime systems it\n  provides hooks for a monotonic _heartbeat_ and deferred freeing (for\n  bounded worst-case times with reference counting).\n  Partly due to its simplicity, mimalloc has been ported to many systems (Windows, macOS,\n  Linux, WASM, various BSD's, Haiku, MUSL, etc) and has excellent support for dynamic overriding.\n  At the same time, it is an industrial strength allocator that runs (very) large scale\n  distributed services on thousands of machines with excellent worst case latencies.\n- __free list sharding__: instead of one big free list (per size class) we have\n  many smaller lists per \"mimalloc page\" which reduces fragmentation and\n  increases locality --\n  things that are allocated close in time get allocated close in memory.\n  (A mimalloc page contains blocks of one size class and is usually 64KiB on a 64-bit system).\n- __free list multi-sharding__: the big idea! Not only do we shard the free list\n  per mimalloc page, but for each page we have multiple free lists. In particular, there\n  is one list for thread-local `free` operations, and another one for concurrent `free`\n  operations. Free-ing from another thread can now be a single CAS without needing\n  sophisticated coordination between threads. Since there will be\n  thousands of separate free lists, contention is naturally distributed over the heap,\n  and the chance of contending on a single location will be low -- this is quite\n  similar to randomized algorithms like skip lists where adding\n  a random oracle removes the need for a more complex algorithm.\n- __eager page purging__: when a \"page\" becomes empty (with increased chance\n  due to free list sharding) the memory is marked to the OS as unused (reset or decommitted)\n  reducing (real) memory pressure and fragmentation, especially in long running\n  programs.\n- __secure__: _mimalloc_ can be built in secure mode, adding guard pages,\n  randomized allocation, encrypted free lists, etc. to protect against various\n  heap vulnerabilities. The performance penalty is usually around 10% on average\n  over our benchmarks.\n- __first-class heaps__: efficiently create and use multiple heaps to allocate across different regions.\n  A heap can be destroyed at once instead of deallocating each object separately.\n- __bounded__: it does not suffer from _blowup_ \\[1\\], has bounded worst-case allocation\n  times (_wcat_) (upto OS primitives), bounded space overhead (~0.2% meta-data, with low\n  internal fragmentation), and has no internal points of contention using only atomic operations.\n- __fast__: In our benchmarks (see [below](#performance)),\n  _mimalloc_ outperforms other leading allocators (_jemalloc_, _tcmalloc_, _Hoard_, etc),\n  and often uses less memory. A nice property is that it does consistently well over a wide range\n  of benchmarks. There is also good huge OS page support for larger server programs.\n\nThe [documentation](https://microsoft.github.io/mimalloc) gives a full overview of the API.\nYou can read more on the design of _mimalloc_ in the [technical report](https://www.microsoft.com/en-us/research/publication/mimalloc-free-list-sharding-in-action) which also has detailed benchmark results.\n\nEnjoy!\n\n### Branches\n\n* `master`: latest stable release (still based on `dev2`).\n* `dev`:  development branch for mimalloc v1. Use this branch for submitting PR's.\n* `dev2`: development branch for mimalloc v2. This branch is downstream of `dev` \n          (and is essentially equal to `dev` except for `src/segment.c`). Uses larger sliced segments to manage\n          mimalloc pages that can reduce fragmentation.\n* `dev3`: development branch for mimalloc v3-beta. This branch is downstream of `dev`. This version \n          simplifies the lock-free ownership of previous versions, has no thread-local segments any more. \n          This improves sharing of memory between threads, and on certain large workloads may use less memory \n          with less fragmentation.\n\n### Releases\n\n* 2025-03-06, `v1.9.2`, `v2.2.2`, `v3.0.2-beta`: Various small bug and build fixes. \n  Add `mi_options_print`, `mi_arenas_print`, and the experimental `mi_stat_get` and `mi_stat_get_json`. \n  Add `mi_thread_set_in_threadpool` and `mi_heap_set_numa_affinity` (v3 only). Add vcpkg portfile. \n  Upgrade mimalloc-redirect to v1.3.2. `MI_OPT_ARCH` is off by default now but still assumes armv8.1-a on arm64\n  for fast atomic operations. Add QNX support.\n* 2025-01-03, `v1.8.9`, `v2.1.9`, `v3.0.1-alpha`: Interim release. Support Windows arm64. New [guarded](#guarded) build that can place OS \n  guard pages behind objects to catch buffer overflows as they occur. \n  Many small fixes: build on Windows arm64, cygwin, riscV, and dragonfly; fix Windows static library initialization to account for\n  thread local destructors (in Rust/C++); macOS tag change; macOS TLS slot fix; improve stats; \n  consistent `mimalloc.dll` on Windows (instead of `mimalloc-override.dll`); fix mimalloc-redirect on Win11 H2; \n  add 0-byte to canary; upstream CPython fixes; reduce .bss size; allow fixed TLS slot on Windows for improved performance.\n* 2024-05-21, `v1.8.7`, `v2.1.7`: Fix build issues on less common platforms. Started upstreaming patches\n  from the CPython [integration](https://github.com/python/cpython/issues/113141#issuecomment-2119255217). Upstream `vcpkg` patches.\n* 2024-05-13, `v1.8.6`, `v2.1.6`: Fix build errors on various (older) platforms. Refactored aligned allocation.\n* 2024-04-22, `v1.8.4`, `v2.1.4`: Fixes various bugs and build issues. Add `MI_LIBC_MUSL` cmake flag for musl builds.\n  Free-ing code is refactored into a separate module (`free.c`). Mimalloc page info is simplified with the block size\n  directly available (and new `block_size_shift` to improve aligned block free-ing).\n  New approach to collection of abandoned segments: When\n  a thread terminates the segments it owns are abandoned (containing still live objects) and these can be\n  reclaimed by other threads. We no longer use a list of abandoned segments but this is now done using bitmaps in arena's\n  which is more concurrent (and more aggressive). Abandoned memory can now also be reclaimed if a thread frees an object in\n  an abandoned page (which can be disabled using `mi_option_abandoned_reclaim_on_free`). The option `mi_option_max_segment_reclaim`\n  gives a maximum percentage of abandoned segments that can be reclaimed per try (=10%).\n\n* 2023-04-24, `v1.8.2`, `v2.1.2`: Fixes build issues on freeBSD, musl, and C17 (UE 5.1.1). Reduce code size/complexity\n  by removing regions and segment-cache's and only use arenas with improved memory purging -- this may improve memory\n  usage as well for larger services. Renamed options for consistency. Improved Valgrind and ASAN checking.\n\n* 2023-04-03, `v1.8.1`, `v2.1.1`: Fixes build issues on some platforms.\n\n* 2023-03-29, `v1.8.0`, `v2.1.0`: Improved support dynamic overriding on Windows 11. Improved tracing precision\n  with [asan](#asan) and [Valgrind](#valgrind), and added Windows event tracing [ETW](#ETW) (contributed by Xinglong He). Created an OS\n  abstraction layer to make it easier to port and separate platform dependent code (in `src/prim`). Fixed C++ STL compilation on older Microsoft C++ compilers, and various small bug fixes.\n\n* 2022-12-23, `v1.7.9`, `v2.0.9`: Supports building with [asan](#asan) and improved [Valgrind](#valgrind) support.\n  Support arbitrary large alignments (in particular for `std::pmr` pools).\n  Added C++ STL allocators attached to a specific heap (thanks @vmarkovtsev).\n  Heap walks now visit all object (including huge objects). Support Windows nano server containers (by Johannes Schindelin,@dscho).\n  Various small bug fixes.\n\n* 2022-11-03, `v1.7.7`, `v2.0.7`: Initial support for [Valgrind](#valgrind) for leak testing and heap block overflow\n  detection. Initial\n  support for attaching heaps to a specific memory area (only in v2). Fix `realloc` behavior for zero size blocks, remove restriction to integral multiple of the alignment in `alloc_align`, improved aligned allocation performance, reduced contention with many threads on few processors (thank you @dposluns!), vs2022 support, support `pkg-config`, .\n\n* 2022-04-14, `v1.7.6`, `v2.0.6`: fix fallback path for aligned OS allocation on Windows, improve Windows aligned allocation\n  even when compiling with older SDK's, fix dynamic overriding on macOS Monterey, fix MSVC C++ dynamic overriding, fix\n  warnings under Clang 14, improve performance if many OS threads are created and destroyed, fix statistics for large object\n  allocations, using MIMALLOC_VERBOSE=1 has no maximum on the number of error messages, various small fixes.\n\n* 2022-02-14, `v1.7.5`, `v2.0.5` (alpha): fix malloc override on\n  Windows 11, fix compilation with musl, potentially reduced\n  committed memory, add `bin/minject` for Windows,\n  improved wasm support, faster aligned allocation,\n  various small fixes.\n\n* [Older release notes](#older-release-notes)\n\nSpecial thanks to:\n\n* [David Carlier](https://devnexen.blogspot.com/) (@devnexen) for his many contributions, and making\n  mimalloc work better on many less common operating systems, like Haiku, Dragonfly, etc.\n* Mary Feofanova (@mary3000), Evgeniy Moiseenko, and Manuel Pöter (@mpoeter) for making mimalloc TSAN checkable, and finding\n  memory model bugs using the [genMC] model checker.\n* Weipeng Liu (@pongba), Zhuowei Li, Junhua Wang, and Jakub Szymanski, for their early support of mimalloc and deployment\n  at large scale services, leading to many improvements in the mimalloc algorithms for large workloads.\n* Jason Gibson (@jasongibson) for exhaustive testing on large scale workloads and server environments, and finding complex bugs\n  in (early versions of) `mimalloc`.\n* Manuel Pöter (@mpoeter) and Sam Gross(@colesbury) for finding an ABA concurrency issue in abandoned segment reclamation. Sam also created the [no GIL](https://github.com/colesbury/nogil) Python fork which\n  uses mimalloc internally.\n\n\n[genMC]: https://plv.mpi-sws.org/genmc/\n\n### Usage\n\nmimalloc is used in various large scale low-latency services and programs, for example:\n\n<a href=\"https://www.bing.com\"><img height=\"50\" align=\"left\" src=\"https://upload.wikimedia.org/wikipedia/commons/e/e9/Bing_logo.svg\"></a>\n<a href=\"https://azure.microsoft.com/\"><img height=\"50\" align=\"left\" src=\"https://upload.wikimedia.org/wikipedia/commons/a/a8/Microsoft_Azure_Logo.svg\"></a>\n<a href=\"https://deathstrandingpc.505games.com\"><img height=\"100\" src=\"doc/ds-logo.png\"></a>\n<a href=\"https://docs.unrealengine.com/4.26/en-US/WhatsNew/Builds/ReleaseNotes/4_25/\"><img height=\"100\" src=\"doc/unreal-logo.svg\"></a>\n<a href=\"https://cab.spbu.ru/software/spades/\"><img height=\"100\" src=\"doc/spades-logo.png\"></a>\n\n\n# Building\n\n## Windows\n\nOpen `ide/vs2022/mimalloc.sln` in Visual Studio 2022 and build.\nThe `mimalloc-lib` project builds a static library (in `out/msvc-x64`), while the\n`mimalloc-override-dll` project builds DLL for overriding malloc\nin the entire program.\n\n## Linux, macOS, BSD, etc.\n\nWe use [`cmake`](https://cmake.org) as the build system:\n\n```\n> mkdir -p out/release\n> cd out/release\n> cmake ../..\n> make\n```\nThis builds the library as a shared (dynamic)\nlibrary (`.so` or `.dylib`), a static library (`.a`), and\nas a single object file (`.o`).\n\n`> sudo make install` (install the library and header files in `/usr/local/lib`  and `/usr/local/include`)\n\nYou can build the debug version which does many internal checks and\nmaintains detailed statistics as:\n\n```\n> mkdir -p out/debug\n> cd out/debug\n> cmake -DCMAKE_BUILD_TYPE=Debug ../..\n> make\n```\n\nThis will name the shared library as `libmimalloc-debug.so`.\n\nFinally, you can build a _secure_ version that uses guard pages, encrypted free lists, etc., as:\n\n```\n> mkdir -p out/secure\n> cd out/secure\n> cmake -DMI_SECURE=ON ../..\n> make\n```\n\nThis will name the shared library as `libmimalloc-secure.so`.\nUse `cmake ../.. -LH` to see all the available build options.\n\nThe examples use the default compiler. If you like to use another, use:\n\n```\n> CC=clang CXX=clang++ cmake ../..\n```\n\n## Cmake with Visual Studio\n\nYou can also use cmake on Windows. Open a Visual Studio 2022 development prompt \nand invoke `cmake` with the right [generator](https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2017%202022.html) \nand architecture, like:\n\n```\n> cmake ..\\.. -G \"Visual Studio 17 2022\" -A x64 -DMI_OVERRIDE=ON\n```\n\nThe cmake build type is specified when actually building, for example:\n\n```\n> cmake --build . --config=Release\n```\n\nYou can also install the [LLVM toolset](https://learn.microsoft.com/en-us/cpp/build/clang-support-msbuild?view=msvc-170#install-1) \non Windows to build with the `clang-cl` compiler directly:\n\n```\n> cmake ../.. -G \"Visual Studio 17 2022\" -T ClangCl\n```\n\n\n## Single Source\n\nYou can also directly build the single `src/static.c` file as part of your project without\nneeding `cmake` at all. Make sure to also add the mimalloc `include` directory to the include path.\n\n\n# Using the Library\n\nThe preferred usage is including `<mimalloc.h>`, linking with\nthe shared- or static library, and using the `mi_malloc` API exclusively for allocation. For example,\n```\n> gcc -o myprogram -lmimalloc myfile.c\n```\n\nmimalloc uses only safe OS calls (`mmap` and `VirtualAlloc`) and can co-exist\nwith other allocators linked to the same program.\nIf you use `cmake`, you can simply use:\n```\nfind_package(mimalloc 1.8 REQUIRED)\n```\nin your `CMakeLists.txt` to find a locally installed mimalloc. Then use either:\n```\ntarget_link_libraries(myapp PUBLIC mimalloc)\n```\nto link with the shared (dynamic) library, or:\n```\ntarget_link_libraries(myapp PUBLIC mimalloc-static)\n```\nto link with the static library. See `test\\CMakeLists.txt` for an example.\n\nFor best performance in C++ programs, it is also recommended to override the\nglobal `new` and `delete` operators. For convenience, mimalloc provides\n[`mimalloc-new-delete.h`](include/mimalloc-new-delete.h) which does this for you -- just include it in a single(!) source file in your project.\nIn C++, mimalloc also provides the `mi_stl_allocator` struct which implements the `std::allocator`\ninterface.\n\nYou can pass environment variables to print verbose messages (`MIMALLOC_VERBOSE=1`)\nand statistics (`MIMALLOC_SHOW_STATS=1`) (in the debug version):\n```\n> env MIMALLOC_SHOW_STATS=1 ./cfrac 175451865205073170563711388363\n\n175451865205073170563711388363 = 374456281610909315237213 * 468551\n\nheap stats:     peak      total      freed       unit\nnormal   2:    16.4 kb    17.5 mb    17.5 mb      16 b   ok\nnormal   3:    16.3 kb    15.2 mb    15.2 mb      24 b   ok\nnormal   4:      64 b      4.6 kb     4.6 kb      32 b   ok\nnormal   5:      80 b    118.4 kb   118.4 kb      40 b   ok\nnormal   6:      48 b       48 b       48 b       48 b   ok\nnormal  17:     960 b      960 b      960 b      320 b   ok\n\nheap stats:     peak      total      freed       unit\n    normal:    33.9 kb    32.8 mb    32.8 mb       1 b   ok\n      huge:       0 b        0 b        0 b        1 b   ok\n     total:    33.9 kb    32.8 mb    32.8 mb       1 b   ok\nmalloc requested:         32.8 mb\n\n committed:    58.2 kb    58.2 kb    58.2 kb       1 b   ok\n  reserved:     2.0 mb     2.0 mb     2.0 mb       1 b   ok\n     reset:       0 b        0 b        0 b        1 b   ok\n  segments:       1          1          1\n-abandoned:       0\n     pages:       6          6          6\n-abandoned:       0\n     mmaps:       3\n mmap fast:       0\n mmap slow:       1\n   threads:       0\n   elapsed:     2.022s\n   process: user: 1.781s, system: 0.016s, faults: 756, reclaims: 0, rss: 2.7 mb\n```\n\nThe above model of using the `mi_` prefixed API is not always possible\nthough in existing programs that already use the standard malloc interface,\nand another option is to override the standard malloc interface\ncompletely and redirect all calls to the _mimalloc_ library instead .\n\n## Environment Options\n\nYou can set further options either programmatically (using [`mi_option_set`](https://microsoft.github.io/mimalloc/group__options.html)), or via environment variables:\n\n- `MIMALLOC_SHOW_STATS=1`: show statistics when the program terminates.\n- `MIMALLOC_VERBOSE=1`: show verbose messages.\n- `MIMALLOC_SHOW_ERRORS=1`: show error and warning messages.\n\nAdvanced options:\n\n- `MIMALLOC_ARENA_EAGER_COMMIT=2`: turns on eager commit for the large arenas (usually 1GiB) from which mimalloc\n   allocates segments and pages. Set this to 2 (default) to\n   only enable this on overcommit systems (e.g. Linux). Set this to 1 to enable explicitly on other systems\n   as well (like Windows or macOS) which may improve performance (as the whole arena is committed at once).\n   Note that eager commit only increases the commit but not the actual the peak resident set\n   (rss) so it is generally ok to enable this.\n- `MIMALLOC_PURGE_DELAY=N`: the delay in `N` milli-seconds (by default `10`) after which mimalloc will purge\n   OS pages that are not in use. This signals to the OS that the underlying physical memory can be reused which\n   can reduce memory fragmentation especially in long running (server) programs. Setting `N` to `0` purges immediately when\n   a page becomes unused which can improve memory usage but also decreases performance. Setting `N` to a higher\n   value like `100` can improve performance (sometimes by a lot) at the cost of potentially using more memory at times.\n   Setting it to `-1` disables purging completely.\n- `MIMALLOC_PURGE_DECOMMITS=1`: By default \"purging\" memory means unused memory is decommitted (`MEM_DECOMMIT` on Windows,\n   `MADV_DONTNEED` (which decresease rss immediately) on `mmap` systems). Set this to 0 to instead \"reset\" unused\n   memory on a purge (`MEM_RESET` on Windows, generally `MADV_FREE` (which does not decrease rss immediately) on `mmap` systems).\n   Mimalloc generally does not \"free\" OS memory but only \"purges\" OS memory, in other words, it tries to keep virtual\n   address ranges and decommits within those ranges (to make the underlying physical memory available to other processes).\n\nFurther options for large workloads and services:\n\n- `MIMALLOC_USE_NUMA_NODES=N`: pretend there are at most `N` NUMA nodes. If not set, the actual NUMA nodes are detected\n   at runtime. Setting `N` to 1 may avoid problems in some virtual environments. Also, setting it to a lower number than\n   the actual NUMA nodes is fine and will only cause threads to potentially allocate more memory across actual NUMA\n   nodes (but this can happen in any case as NUMA local allocation is always a best effort but not guaranteed).\n- `MIMALLOC_ALLOW_LARGE_OS_PAGES=0`: Set to 1 to use large OS pages (2 or 4MiB) when available; for some workloads this can significantly\n   improve performance. When this option is disabled (default), it also disables transparent huge pages (THP) for the process\n   (on Linux and Android). On Linux the default setting is 2 -- this enables the use of large pages through THP only.\n   Use `MIMALLOC_VERBOSE` to check if the large OS pages are enabled -- usually one needs\n   to explicitly give permissions for large OS pages (as on [Windows][windows-huge] and [Linux][linux-huge]). However, sometimes\n   the OS is very slow to reserve contiguous physical memory for large OS pages so use with care on systems that\n   can have fragmented memory (for that reason, we generally recommend to use `MIMALLOC_RESERVE_HUGE_OS_PAGES` instead whenever possible).\n- `MIMALLOC_RESERVE_HUGE_OS_PAGES=N`: where `N` is the number of 1GiB _huge_ OS pages. This reserves the huge pages at\n   startup and sometimes this can give a large (latency) performance improvement on big workloads.\n   Usually it is better to not use `MIMALLOC_ALLOW_LARGE_OS_PAGES=1` in combination with this setting. Just like large\n   OS pages, use with care as reserving\n   contiguous physical memory can take a long time when memory is fragmented (but reserving the huge pages is done at\n   startup only once).\n   Note that we usually need to explicitly give permission for huge OS pages (as on [Windows][windows-huge] and [Linux][linux-huge])).\n   With huge OS pages, it may be beneficial to set the setting\n   `MIMALLOC_EAGER_COMMIT_DELAY=N` (`N` is 1 by default) to delay the initial `N` segments (of 4MiB)\n   of a thread to not allocate in the huge OS pages; this prevents threads that are short lived\n   and allocate just a little to take up space in the huge OS page area (which cannot be purged as huge OS pages are pinned\n   to physical memory).\n   The huge pages are usually allocated evenly among NUMA nodes.\n   We can use `MIMALLOC_RESERVE_HUGE_OS_PAGES_AT=N` where `N` is the numa node (starting at 0) to allocate all\n   the huge pages at a specific numa node instead.\n\nUse caution when using `fork` in combination with either large or huge OS pages: on a fork, the OS uses copy-on-write\nfor all pages in the original process including the huge OS pages. When any memory is now written in that area, the\nOS will copy the entire 1GiB huge page (or 2MiB large page) which can cause the memory usage to grow in large increments.\n\n[linux-huge]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/tuning_and_optimizing_red_hat_enterprise_linux_for_oracle_9i_and_10g_databases/sect-oracle_9i_and_10g_tuning_guide-large_memory_optimization_big_pages_and_huge_pages-configuring_huge_pages_in_red_hat_enterprise_linux_4_or_5\n[windows-huge]: https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/enable-the-lock-pages-in-memory-option-windows?view=sql-server-2017\n\n## Secure Mode\n\n_mimalloc_ can be build in secure mode by using the `-DMI_SECURE=ON` flags in `cmake`. This build enables various mitigations\nto make mimalloc more robust against exploits. In particular:\n\n- All internal mimalloc pages are surrounded by guard pages and the heap metadata is behind a guard page as well (so a buffer overflow\n  exploit cannot reach into the metadata).\n- All free list pointers are\n  [encoded](https://github.com/microsoft/mimalloc/blob/783e3377f79ee82af43a0793910a9f2d01ac7863/include/mimalloc-internal.h#L396)\n  with per-page keys which is used both to prevent overwrites with a known pointer, as well as to detect heap corruption.\n- Double free's are detected (and ignored).\n- The free lists are initialized in a random order and allocation randomly chooses between extension and reuse within a page to\n  mitigate against attacks that rely on a predicable allocation order. Similarly, the larger heap blocks allocated by mimalloc\n  from the OS are also address randomized.\n\nAs always, evaluate with care as part of an overall security strategy as all of the above are mitigations but not guarantees.\n\n## Debug Mode\n\nWhen _mimalloc_ is built using debug mode, (`-DCMAKE_BUILD_TYPE=Debug`), \nvarious checks are done at runtime to catch development errors.\n\n- Statistics are maintained in detail for each object size. They can be shown using `MIMALLOC_SHOW_STATS=1` at runtime.\n- All objects have padding at the end to detect (byte precise) heap block overflows.\n- Double free's, and freeing invalid heap pointers are detected.\n- Corrupted free-lists and some forms of use-after-free are detected.\n\n## Guarded Mode\n\n<span id=\"guarded\">_mimalloc_ can be build in guarded mode using the `-DMI_GUARDED=ON` flags in `cmake`.</span>\nThis enables placing OS guard pages behind certain object allocations to catch buffer overflows as they occur.\nThis can be invaluable to catch buffer-overflow bugs in large programs. However, it also means that any object\nallocated with a guard page takes at least 8 KiB memory for the guard page and its alignment. As such, allocating\na guard page for every allocation may be too expensive both in terms of memory, and in terms of performance with\nmany system calls. Therefore, there are various environment variables (and options) to tune this:\n\n- `MIMALLOC_GUARDED_SAMPLE_RATE=N`: Set the sample rate to `N` (by default 4000). This mode places a guard page\n  behind every `N` suitable object allocations (per thread). Since the performance in guarded mode without placing\n  guard pages is close to release mode, this can be used to enable guard pages even in production to catch latent \n  buffer overflow bugs. Set the sample rate to `1` to guard every object, and to `0` to place no guard pages at all.\n\n- `MIMALLOC_GUARDED_SAMPLE_SEED=N`: Start sampling at `N` (by default random). Can be used to reproduce a buffer\n  overflow if needed.\n\n- `MIMALLOC_GUARDED_MIN=N`, `MIMALLOC_GUARDED_MAX=N`: Minimal and maximal _rounded_ object sizes for which a guard \n  page is considered (`0` and `1GiB` respectively). If you suspect a buffer overflow occurs with an object of size\n  141, set the minimum and maximum to `148` and the sample rate to `1` to have all of those guarded.\n\n- `MIMALLOC_GUARDED_PRECISE=1`: If we have an object of size 13, we would usually place it an aligned 16 bytes in\n  front of the guard page. Using `MIMALLOC_GUARDED_PRECISE` places it exactly 13 bytes before a page so that even\n  a 1 byte overflow is detected. This violates the C/C++ minimal alignment guarantees though so use with care.\n\n\n# Overriding Standard Malloc\n\nOverriding the standard `malloc` (and `new`) can be done either _dynamically_ or _statically_.\n\n## Dynamic override\n\nThis is the recommended way to override the standard malloc interface.\n\n### Dynamic Override on Linux, BSD\n\nOn these ELF-based systems we preload the mimalloc shared\nlibrary so all calls to the standard `malloc` interface are\nresolved to the _mimalloc_ library.\n```\n> env LD_PRELOAD=/usr/lib/libmimalloc.so myprogram\n```\n\nYou can set extra environment variables to check that mimalloc is running,\nlike:\n```\n> env MIMALLOC_VERBOSE=1 LD_PRELOAD=/usr/lib/libmimalloc.so myprogram\n```\nor run with the debug version to get detailed statistics:\n```\n> env MIMALLOC_SHOW_STATS=1 LD_PRELOAD=/usr/lib/libmimalloc-debug.so myprogram\n```\n\n### Dynamic Override on MacOS\n\nOn macOS we can also preload the mimalloc shared\nlibrary so all calls to the standard `malloc` interface are\nresolved to the _mimalloc_ library.\n```\n> env DYLD_INSERT_LIBRARIES=/usr/lib/libmimalloc.dylib myprogram\n```\n\nNote that certain security restrictions may apply when doing this from\nthe [shell](https://stackoverflow.com/questions/43941322/dyld-insert-libraries-ignored-when-calling-application-through-bash).\n\n\n### Dynamic Override on Windows\n\n<span id=\"override_on_windows\">We use a separate redirection DLL to override mimalloc on Windows</span> \nsuch that we redirect all malloc/free calls that go through the (dynamic) C runtime allocator, \nincluding those from other DLL's or libraries. As it intercepts all allocation calls on a low level, \nit can be used on large programs that include other 3rd party components.\nThere are four requirements to make the overriding work well:\n\n1. Use the C-runtime library as a DLL (using the `/MD` or `/MDd` switch).\n\n2. Link your program explicitly with the `mimalloc.dll.lib` export library for the `mimalloc.dll`.\n   (which must be compiled with `-DMI_OVERRIDE=ON`, which is the default though).\n   To ensure the `mimalloc.dll` is actually loaded at run-time it is easiest \n   to insert some call to the mimalloc API in the `main` function, like `mi_version()`\n   (or use the `/include:mi_version` switch on the linker command, or\n   similarly, `#pragma comment(linker, \"/include:mi_version\")` in some source file). \n   See the `mimalloc-test-override` project for an example on how to use this. \n\n3. The `mimalloc-redirect.dll` must be put in the same directory as the main \n   `mimalloc.dll` at runtime (as it is a dependency of that DLL).\n   The redirection DLL ensures that all calls to the C runtime malloc API get \n   redirected to mimalloc functions (which reside in `mimalloc.dll`).\n\n4. Ensure the `mimalloc.dll` comes as early as possible in the import\n   list of the final executable (so it can intercept all potential allocations).\n   You can use `minject -l <exe>` to check this if needed.\n\nFor best performance on Windows with C++, it is also recommended to also override \nthe `new`/`delete` operations (by including [`mimalloc-new-delete.h`](include/mimalloc-new-delete.h)\na single(!) source file in your project).\n\nThe environment variable `MIMALLOC_DISABLE_REDIRECT=1` can be used to disable dynamic\noverriding at run-time. Use `MIMALLOC_VERBOSE=1` to check if mimalloc was successfully \nredirected.\n\nFor different platforms than x64, you may need a specific [redirection dll](bin).\nFurthermore, we cannot always re-link an executable or ensure `mimalloc.dll` comes\nfirst in the import table. In such cases the [`minject`](bin) tool can be used\nto patch the executable's import tables.\n\n\n## Static override\n\nOn Unix-like systems, you can also statically link with _mimalloc_ to override the standard\nmalloc interface. The recommended way is to link the final program with the\n_mimalloc_ single object file (`mimalloc.o`). We use\nan object file instead of a library file as linkers give preference to\nthat over archives to resolve symbols. To ensure that the standard\nmalloc interface resolves to the _mimalloc_ library, link it as the first\nobject file. For example:\n\n```\n> gcc -o myprogram mimalloc.o  myfile1.c ...\n```\n\nAnother way to override statically that works on all platforms, is to\nlink statically to mimalloc (as shown in the introduction) and include a\nheader file in each source file that re-defines `malloc` etc. to `mi_malloc`.\nThis is provided by [`mimalloc-override.h`](include/mimalloc-override.h). This only works \nreliably though if all sources are\nunder your control or otherwise mixing of pointers from different heaps may occur!\n\n\n# Tools\n\nGenerally, we recommend using the standard allocator with memory tracking tools, but mimalloc\ncan also be build to support the [address sanitizer][asan] or the excellent [Valgrind] tool.\nMoreover, it can be build to support Windows event tracing ([ETW]).\nThis has a small performance overhead but does allow detecting memory leaks and byte-precise\nbuffer overflows directly on final executables. See also the `test/test-wrong.c` file to test with various tools.\n\n## Valgrind\n\nTo build with [valgrind] support, use the `MI_TRACK_VALGRIND=ON` cmake option:\n\n```\n> cmake ../.. -DMI_TRACK_VALGRIND=ON\n```\n\nThis can also be combined with secure mode or debug mode.\nYou can then run your programs directly under valgrind:\n\n```\n> valgrind <myprogram>\n```\n\nIf you rely on overriding `malloc`/`free` by mimalloc (instead of using the `mi_malloc`/`mi_free` API directly),\nyou also need to tell `valgrind` to not intercept those calls itself, and use:\n\n```\n> MIMALLOC_SHOW_STATS=1 valgrind  --soname-synonyms=somalloc=*mimalloc* -- <myprogram>\n```\n\nBy setting the `MIMALLOC_SHOW_STATS` environment variable you can check that mimalloc is indeed\nused and not the standard allocator. Even though the [Valgrind option][valgrind-soname]\nis called `--soname-synonyms`, this also works when overriding with a static library or object file.\nTo dynamically override mimalloc using `LD_PRELOAD` together with `valgrind`, use:\n\n```\n> valgrind --trace-children=yes --soname-synonyms=somalloc=*mimalloc* /usr/bin/env LD_PRELOAD=/usr/lib/libmimalloc.so -- <myprogram>\n```\n\nSee also the `test/test-wrong.c` file to test with `valgrind`.\n\nValgrind support is in its initial development -- please report any issues.\n\n[Valgrind]: https://valgrind.org/\n[valgrind-soname]: https://valgrind.org/docs/manual/manual-core.html#opt.soname-synonyms\n\n## ASAN\n\nTo build with the address sanitizer, use the `-DMI_TRACK_ASAN=ON` cmake option:\n\n```\n> cmake ../.. -DMI_TRACK_ASAN=ON\n```\n\nThis can also be combined with secure mode or debug mode.\nYou can then run your programs as:'\n\n```\n> ASAN_OPTIONS=verbosity=1 <myprogram>\n```\n\nWhen you link a program with an address sanitizer build of mimalloc, you should\ngenerally compile that program too with the address sanitizer enabled.\nFor example, assuming you build mimalloc in `out/debug`:\n\n```\nclang -g -o test-wrong -Iinclude test/test-wrong.c out/debug/libmimalloc-asan-debug.a -lpthread -fsanitize=address -fsanitize-recover=address\n```\n\nSince the address sanitizer redirects the standard allocation functions, on some platforms (macOSX for example)\nit is required to compile mimalloc with `-DMI_OVERRIDE=OFF`.\nAddress sanitizer support is in its initial development -- please report any issues.\n\n[asan]: https://github.com/google/sanitizers/wiki/AddressSanitizer\n\n## ETW\n\nEvent tracing for Windows ([ETW]) provides a high performance way to capture all allocations though\nmimalloc and analyze them later. To build with ETW support, use the `-DMI_TRACK_ETW=ON` cmake option.\n\nYou can then capture an allocation trace using the Windows performance recorder (WPR), using the\n`src/prim/windows/etw-mimalloc.wprp` profile. In an admin prompt, you can use:\n```\n> wpr -start src\\prim\\windows\\etw-mimalloc.wprp -filemode\n> <my_mimalloc_program>\n> wpr -stop <my_mimalloc_program>.etl\n```\nand then open `<my_mimalloc_program>.etl` in the Windows Performance Analyzer (WPA), or\nuse a tool like [TraceControl] that is specialized for analyzing mimalloc traces.\n\n[ETW]: https://learn.microsoft.com/en-us/windows-hardware/test/wpt/event-tracing-for-windows\n[TraceControl]: https://github.com/xinglonghe/TraceControl\n\n\n# Performance\n\nLast update: 2021-01-30\n\nWe tested _mimalloc_ against many other top allocators over a wide\nrange of benchmarks, ranging from various real world programs to\nsynthetic benchmarks that see how the allocator behaves under more\nextreme circumstances. In our benchmark suite, _mimalloc_ outperforms other leading\nallocators (_jemalloc_, _tcmalloc_, _Hoard_, etc), and has a similar memory footprint. A nice property is that it\ndoes consistently well over the wide range of benchmarks.\n\nGeneral memory allocators are interesting as there exists no algorithm that is\noptimal -- for a given allocator one can usually construct a workload\nwhere it does not do so well. The goal is thus to find an allocation\nstrategy that performs well over a wide range of benchmarks without\nsuffering from (too much) underperformance in less common situations.\n\nAs always, interpret these results with care since some benchmarks test synthetic\nor uncommon situations that may never apply to your workloads. For example, most\nallocators do not do well on `xmalloc-testN` but that includes even the best\nindustrial allocators like _jemalloc_ and _tcmalloc_ that are used in some of\nthe world's largest systems (like Chrome or FreeBSD).\n\nAlso, the benchmarks here do not measure the behaviour on very large and long-running server workloads,\nor worst-case latencies of allocation. Much work has gone into `mimalloc` to work well on such\nworkloads (for example, to reduce virtual memory fragmentation on long-running services)\nbut such optimizations are not always reflected in the current benchmark suite.\n\nWe show here only an overview -- for\nmore specific details and further benchmarks we refer to the\n[technical report](https://www.microsoft.com/en-us/research/publication/mimalloc-free-list-sharding-in-action).\nThe benchmark suite is automated and available separately\nas [mimalloc-bench](https://github.com/daanx/mimalloc-bench).\n\n\n## Benchmark Results on a 16-core AMD 5950x (Zen3)\n\nTesting on the 16-core AMD 5950x processor at 3.4Ghz (4.9Ghz boost), with\nwith 32GiB memory at 3600Mhz, running\tUbuntu 20.04 with glibc 2.31 and GCC 9.3.0.\n\nWe measure three versions of _mimalloc_: the main version `mi` (tag:v1.7.0),\nthe new v2.0 beta version as `xmi` (tag:v2.0.0), and the main version in secure mode as `smi` (tag:v1.7.0).\n\nThe other allocators are\nGoogle's [_tcmalloc_](https://github.com/gperftools/gperftools) (`tc`, tag:gperftools-2.8.1) used in Chrome,\nFacebook's [_jemalloc_](https://github.com/jemalloc/jemalloc) (`je`, tag:5.2.1) by Jason Evans used in Firefox and FreeBSD,\nthe Intel thread building blocks [allocator](https://github.com/intel/tbb) (`tbb`, tag:v2020.3),\n[rpmalloc](https://github.com/mjansson/rpmalloc) (`rp`,tag:1.4.1) by Mattias Jansson,\nthe original scalable [_Hoard_](https://github.com/emeryberger/Hoard) (git:d880f72) allocator by Emery Berger \\[1],\nthe memory compacting [_Mesh_](https://github.com/plasma-umass/Mesh) (git:67ff31a) allocator by\nBobby Powers _et al_ \\[8],\nand finally the default system allocator (`glibc`, 2.31) (based on _PtMalloc2_).\n\n<img width=\"90%\" src=\"doc/bench-2021/bench-amd5950x-2021-01-30-a.svg\"/>\n<img width=\"90%\" src=\"doc/bench-2021/bench-amd5950x-2021-01-30-b.svg\"/>\n\nAny benchmarks ending in `N` run on all 32 logical cores in parallel.\nResults are averaged over 10 runs and reported relative\nto mimalloc (where 1.2 means it took 1.2&times; longer to run).\nThe legend also contains the _overall relative score_ between the\nallocators where 100 points is the maximum if an allocator is fastest on\nall benchmarks.\n\nThe single threaded _cfrac_ benchmark by Dave Barrett is an implementation of\ncontinued fraction factorization which uses many small short-lived allocations.\nAll allocators do well on such common usage, where _mimalloc_ is just a tad\nfaster than _tcmalloc_ and\n_jemalloc_.\n\nThe _leanN_ program is interesting as a large realistic and\nconcurrent workload of the [Lean](https://github.com/leanprover/lean)\ntheorem prover compiling its own standard library, and there is a 13%\nspeedup over _tcmalloc_. This is\nquite significant: if Lean spends 20% of its time in the\nallocator that means that _mimalloc_ is 1.6&times; faster than _tcmalloc_\nhere. (This is surprising as that is not measured in a pure\nallocation benchmark like _alloc-test_. We conjecture that we see this\noutsized improvement here because _mimalloc_ has better locality in\nthe allocation which improves performance for the *other* computations\nin a program as well).\n\nThe single threaded _redis_ benchmark again show that most allocators do well on such workloads.\n\nThe _larsonN_ server benchmark by Larson and Krishnan \\[2] allocates and frees between threads. They observed this\nbehavior (which they call _bleeding_) in actual server applications, and the benchmark simulates this.\nHere, _mimalloc_ is quite a bit faster than _tcmalloc_ and _jemalloc_ probably due to the object migration between different threads.\n\nThe _mstressN_ workload performs many allocations and re-allocations,\nand migrates objects between threads (as in _larsonN_). However, it also\ncreates  and destroys the _N_ worker threads a few times keeping some objects\nalive beyond the life time of the allocating thread. We observed this\nbehavior in many larger server applications.\n\nThe [_rptestN_](https://github.com/mjansson/rpmalloc-benchmark) benchmark\nby Mattias Jansson is a allocator test originally designed\nfor _rpmalloc_, and tries to simulate realistic allocation patterns over\nmultiple threads. Here the differences between allocators become more apparent.\n\nThe second benchmark set tests specific aspects of the allocators and\nshows even more extreme differences between them.\n\nThe _alloc-test_, by\n[OLogN Technologies AG](http://ithare.com/testing-memory-allocators-ptmalloc2-tcmalloc-hoard-jemalloc-while-trying-to-simulate-real-world-loads/), is a very allocation intensive benchmark doing millions of\nallocations in various size classes. The test is scaled such that when an\nallocator performs almost identically on _alloc-test1_ as _alloc-testN_ it\nmeans that it scales linearly.\n\nThe _sh6bench_ and _sh8bench_ benchmarks are\ndeveloped by [MicroQuill](http://www.microquill.com/) as part of SmartHeap.\nIn _sh6bench_ _mimalloc_ does much\nbetter than the others (more than 2.5&times; faster than _jemalloc_).\nWe cannot explain this well but believe it is\ncaused in part by the \"reverse\" free-ing pattern in _sh6bench_.\nThe _sh8bench_ is a variation with object migration\nbetween threads; whereas _tcmalloc_ did well on _sh6bench_, the addition of object migration causes it to be 10&times; slower than before.\n\nThe _xmalloc-testN_ benchmark by Lever and Boreham \\[5] and Christian Eder, simulates an asymmetric workload where\nsome threads only allocate, and others only free -- they observed this pattern in\nlarger server applications. Here we see that\nthe _mimalloc_ technique of having non-contended sharded thread free\nlists pays off as it outperforms others by a very large margin. Only _rpmalloc_, _tbb_, and _glibc_ also scale well on this benchmark.\n\nThe _cache-scratch_ benchmark by Emery Berger \\[1], and introduced with\nthe Hoard allocator to test for _passive-false_ sharing of cache lines.\nWith a single thread they all\nperform the same, but when running with multiple threads the potential allocator\ninduced false sharing of the cache lines can cause large run-time differences.\nCrundal \\[6] describes in detail why the false cache line sharing occurs in the _tcmalloc_ design, and also discusses how this\ncan be avoided with some small implementation changes.\nOnly the _tbb_, _rpmalloc_ and _mesh_ allocators also avoid the\ncache line sharing completely, while _Hoard_ and _glibc_ seem to mitigate\nthe effects. Kukanov and Voss \\[7] describe in detail\nhow the design of _tbb_ avoids the false cache line sharing.\n\n\n## On a 36-core Intel Xeon\n\nFor completeness, here are the results on a big Amazon\n[c5.18xlarge](https://aws.amazon.com/ec2/instance-types/#Compute_Optimized) instance\nconsisting of a 2&times;18-core Intel Xeon (Cascade Lake) at 3.4GHz (boost 3.5GHz)\nwith 144GiB ECC memory, running\tUbuntu 20.04 with glibc 2.31, GCC 9.3.0, and\nClang 10.0.0. This time, the mimalloc allocators (mi, xmi, and smi) were\ncompiled with the Clang compiler instead of GCC.\nThe results are similar to the AMD results but it is interesting to\nsee the differences in the _larsonN_, _mstressN_, and _xmalloc-testN_ benchmarks.\n\n<img width=\"90%\" src=\"doc/bench-2021/bench-c5-18xlarge-2021-01-30-a.svg\"/>\n<img width=\"90%\" src=\"doc/bench-2021/bench-c5-18xlarge-2021-01-30-b.svg\"/>\n\n\n## Peak Working Set\n\nThe following figure shows the peak working set (rss) of the allocators\non the benchmarks (on the c5.18xlarge instance).\n\n<img width=\"90%\" src=\"doc/bench-2021/bench-c5-18xlarge-2021-01-30-rss-a.svg\"/>\n<img width=\"90%\" src=\"doc/bench-2021/bench-c5-18xlarge-2021-01-30-rss-b.svg\"/>\n\nNote that the _xmalloc-testN_ memory usage should be disregarded as it\nallocates more the faster the program runs. Similarly, memory usage of\n_larsonN_, _mstressN_, _rptestN_ and _sh8bench_ can vary depending on scheduling and\nspeed. Nevertheless, we hope to improve the memory usage on _mstressN_\nand _rptestN_ (just as _cfrac_, _larsonN_ and _sh8bench_ have a small working set which skews the results).\n\n<!--\n# Previous Benchmarks\n\nTodo: should we create a separate page for this?\n\n## Benchmark Results on 36-core Intel: 2020-01-20\n\nTesting on a big Amazon EC2 compute instance\n([c5.18xlarge](https://aws.amazon.com/ec2/instance-types/#Compute_Optimized))\nconsisting of a 72 processor Intel Xeon at 3GHz\nwith 144GiB ECC memory, running\tUbuntu 18.04.1 with glibc 2.27 and GCC 7.4.0.\nThe measured allocators are _mimalloc_ (xmi, tag:v1.4.0, page reset enabled)\nand its secure build as _smi_,\nGoogle's [_tcmalloc_](https://github.com/gperftools/gperftools) (tc, tag:gperftools-2.7) used in Chrome,\nFacebook's [_jemalloc_](https://github.com/jemalloc/jemalloc) (je, tag:5.2.1) by Jason Evans used in Firefox and FreeBSD,\nthe Intel thread building blocks [allocator](https://github.com/intel/tbb) (tbb, tag:2020),\n[rpmalloc](https://github.com/mjansson/rpmalloc) (rp,tag:1.4.0) by Mattias Jansson,\nthe original scalable [_Hoard_](https://github.com/emeryberger/Hoard) (tag:3.13) allocator by Emery Berger \\[1],\nthe memory compacting [_Mesh_](https://github.com/plasma-umass/Mesh) (git:51222e7) allocator by\nBobby Powers _et al_ \\[8],\nand finally the default system allocator (glibc, 2.27) (based on _PtMalloc2_).\n\n<img width=\"90%\" src=\"doc/bench-2020/bench-c5-18xlarge-2020-01-20-a.svg\"/>\n<img width=\"90%\" src=\"doc/bench-2020/bench-c5-18xlarge-2020-01-20-b.svg\"/>\n\nThe following figure shows the peak working set (rss) of the allocators\non the benchmarks (on the c5.18xlarge instance).\n\n<img width=\"90%\" src=\"doc/bench-2020/bench-c5-18xlarge-2020-01-20-rss-a.svg\"/>\n<img width=\"90%\" src=\"doc/bench-2020/bench-c5-18xlarge-2020-01-20-rss-b.svg\"/>\n\n\n## On 24-core AMD Epyc, 2020-01-16\n\nFor completeness, here are the results on a\n[r5a.12xlarge](https://aws.amazon.com/ec2/instance-types/#Memory_Optimized) instance\nhaving a 48 processor AMD Epyc 7000 at 2.5GHz with 384GiB of memory.\nThe results are similar to the Intel results but it is interesting to\nsee the differences in the _larsonN_, _mstressN_, and _xmalloc-testN_ benchmarks.\n\n<img width=\"90%\" src=\"doc/bench-2020/bench-r5a-12xlarge-2020-01-16-a.svg\"/>\n<img width=\"90%\" src=\"doc/bench-2020/bench-r5a-12xlarge-2020-01-16-b.svg\"/>\n\n-->\n\n\n# References\n\n- \\[1] Emery D. Berger, Kathryn S. McKinley, Robert D. Blumofe, and Paul R. Wilson.\n   _Hoard: A Scalable Memory Allocator for Multithreaded Applications_\n   the Ninth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS-IX). Cambridge, MA, November 2000.\n   [pdf](http://www.cs.utexas.edu/users/mckinley/papers/asplos-2000.pdf)\n\n- \\[2] P. Larson and M. Krishnan. _Memory allocation for long-running server applications_.\n  In ISMM, Vancouver, B.C., Canada, 1998. [pdf](http://citeseer.ist.psu.edu/viewdoc/download?doi=10.1.1.45.1947&rep=rep1&type=pdf)\n\n- \\[3] D. Grunwald, B. Zorn, and R. Henderson.\n  _Improving the cache locality of memory allocation_. In R. Cartwright, editor,\n  Proceedings of the Conference on Programming Language Design and Implementation, pages 177–186, New York, NY, USA, June 1993. [pdf](http://citeseer.ist.psu.edu/viewdoc/download?doi=10.1.1.43.6621&rep=rep1&type=pdf)\n\n- \\[4] J. Barnes and P. Hut. _A hierarchical O(n*log(n)) force-calculation algorithm_. Nature, 324:446-449, 1986.\n\n- \\[5] C. Lever, and D. Boreham. _Malloc() Performance in a Multithreaded Linux Environment._\n  In USENIX Annual Technical Conference, Freenix Session. San Diego, CA. Jun. 2000.\n  Available at <https://github.com/kuszmaul/SuperMalloc/tree/master/tests>\n\n- \\[6] Timothy Crundal. _Reducing Active-False Sharing in TCMalloc_. 2016. CS16S1 project at the Australian National University. [pdf](http://courses.cecs.anu.edu.au/courses/CSPROJECTS/16S1/Reports/Timothy_Crundal_Report.pdf)\n\n- \\[7] Alexey Kukanov, and Michael J Voss.\n   _The Foundations for Scalable Multi-Core Software in Intel Threading Building Blocks._\n   Intel Technology Journal 11 (4). 2007\n\n- \\[8] Bobby Powers, David Tench, Emery D. Berger, and Andrew McGregor.\n _Mesh: Compacting Memory Management for C/C++_\n In Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'19), June 2019, pages 333-–346.\n\n<!--\n- \\[9] Paul Liétar, Theodore Butler, Sylvan Clebsch, Sophia Drossopoulou, Juliana Franco, Matthew J Parkinson,\n  Alex Shamis, Christoph M Wintersteiger, and David Chisnall.\n  _Snmalloc: A Message Passing Allocator._\n  In Proceedings of the 2019 ACM SIGPLAN International Symposium on Memory Management, 122–135. ACM. 2019.\n-->\n\n# Contributing\n\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\n\n# Older Release Notes\n\n* 2021-11-14, `v1.7.3`, `v2.0.3` (beta): improved WASM support, improved macOS support and performance (including\n  M1), improved performance for v2 for large objects, Python integration improvements, more standard\n  installation directories, various small fixes.\n* 2021-06-17, `v1.7.2`, `v2.0.2` (beta): support M1, better installation layout on Linux, fix\n  thread_id on Android, prefer 2-6TiB area for aligned allocation to work better on pre-windows 8, various small fixes.\n* 2021-04-06, `v1.7.1`, `v2.0.1` (beta): fix bug in arena allocation for huge pages, improved aslr on large allocations, initial M1 support (still experimental).\n* 2021-01-31, `v2.0.0`: beta release 2.0: new slice algorithm for managing internal mimalloc pages.\n* 2021-01-31, `v1.7.0`: stable release 1.7: support explicit user provided memory regions, more precise statistics,\n  improve macOS overriding, initial support for Apple M1, improved DragonFly support, faster memcpy on Windows, various small fixes.\n\n* 2020-09-24, `v1.6.7`: stable release 1.6: using standard C atomics, passing tsan testing, improved\n  handling of failing to commit on Windows, add [`mi_process_info`](https://github.com/microsoft/mimalloc/blob/master/include/mimalloc.h#L156) api call.\n* 2020-08-06, `v1.6.4`: stable release 1.6: improved error recovery in low-memory situations,\n  support for IllumOS and Haiku, NUMA support for Vista/XP, improved NUMA detection for AMD Ryzen, ubsan support.\n* 2020-05-05, `v1.6.3`: stable release 1.6: improved behavior in out-of-memory situations, improved malloc zones on macOS,\n  build PIC static libraries by default, add option to abort on out-of-memory, line buffered statistics.\n* 2020-04-20, `v1.6.2`: stable release 1.6: fix compilation on Android, MingW, Raspberry, and Conda,\n  stability fix for Windows 7, fix multiple mimalloc instances in one executable, fix `strnlen` overload,\n  fix aligned debug padding.\n* 2020-02-17, `v1.6.1`: stable release 1.6: minor updates (build with clang-cl, fix alignment issue for small objects).\n* 2020-02-09, `v1.6.0`: stable release 1.6: fixed potential memory leak, improved overriding\n  and thread local support on FreeBSD, NetBSD, DragonFly, and macOSX. New byte-precise\n  heap block overflow detection in debug mode (besides the double-free detection and free-list\n  corruption detection). Add `nodiscard` attribute to most allocation functions.\n  Enable `MIMALLOC_PAGE_RESET` by default. New reclamation strategy for abandoned heap pages\n  for better memory footprint.\n* 2020-02-09, `v1.5.0`: stable release 1.5: improved free performance, small bug fixes.\n* 2020-01-22, `v1.4.0`: stable release 1.4: improved performance for delayed OS page reset,\nmore eager concurrent free, addition of STL allocator, fixed potential memory leak.\n* 2020-01-15, `v1.3.0`: stable release 1.3: bug fixes, improved randomness and [stronger\nfree list encoding](https://github.com/microsoft/mimalloc/blob/783e3377f79ee82af43a0793910a9f2d01ac7863/include/mimalloc-internal.h#L396) in secure mode.\n\n* 2019-12-22, `v1.2.2`: stable release 1.2: minor updates.\n* 2019-11-22, `v1.2.0`: stable release 1.2: bug fixes, improved secure mode (free list corruption checks, double free mitigation). Improved dynamic overriding on Windows.\n* 2019-10-07, `v1.1.0`: stable release 1.1.\n* 2019-09-01, `v1.0.8`: pre-release 8: more robust windows dynamic overriding, initial huge page support.\n* 2019-08-10, `v1.0.6`: pre-release 6: various performance improvements.\n"
  },
  {
    "path": "third-party/mimalloc/src/alloc-aligned.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2021, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"mimalloc/prim.h\"  // mi_prim_get_default_heap\n\n#include <string.h>     // memset\n\n// ------------------------------------------------------\n// Aligned Allocation\n// ------------------------------------------------------\n\nstatic bool mi_malloc_is_naturally_aligned( size_t size, size_t alignment ) {\n  // objects up to `MI_MAX_ALIGN_GUARANTEE` are allocated aligned to their size (see `segment.c:_mi_segment_page_start`).\n  mi_assert_internal(_mi_is_power_of_two(alignment) && (alignment > 0));\n  if (alignment > size) return false;\n  if (alignment <= MI_MAX_ALIGN_SIZE) return true;\n  const size_t bsize = mi_good_size(size);\n  return (bsize <= MI_MAX_ALIGN_GUARANTEE && (bsize & (alignment-1)) == 0);\n}\n\n#if MI_GUARDED\nstatic mi_decl_restrict void* mi_heap_malloc_guarded_aligned(mi_heap_t* heap, size_t size, size_t alignment, bool zero) mi_attr_noexcept {\n  // use over allocation for guarded blocksl\n  mi_assert_internal(alignment > 0 && alignment < MI_BLOCK_ALIGNMENT_MAX);\n  const size_t oversize = size + alignment - 1;\n  void* base = _mi_heap_malloc_guarded(heap, oversize, zero);\n  void* p = mi_align_up_ptr(base, alignment);\n  mi_track_align(base, p, (uint8_t*)p - (uint8_t*)base, size);\n  mi_assert_internal(mi_usable_size(p) >= size);\n  mi_assert_internal(_mi_is_aligned(p, alignment));\n  return p;\n}\n\nstatic void* mi_heap_malloc_zero_no_guarded(mi_heap_t* heap, size_t size, bool zero) {\n  const size_t rate = heap->guarded_sample_rate;\n  // only write if `rate!=0` so we don't write to the constant `_mi_heap_empty`\n  if (rate != 0) { heap->guarded_sample_rate = 0; }\n  void* p = _mi_heap_malloc_zero(heap, size, zero);\n  if (rate != 0) { heap->guarded_sample_rate = rate; }\n  return p;\n}\n#else\nstatic void* mi_heap_malloc_zero_no_guarded(mi_heap_t* heap, size_t size, bool zero) {\n  return _mi_heap_malloc_zero(heap, size, zero);\n}\n#endif\n\n// Fallback aligned allocation that over-allocates -- split out for better codegen\nstatic mi_decl_noinline void* mi_heap_malloc_zero_aligned_at_overalloc(mi_heap_t* const heap, const size_t size, const size_t alignment, const size_t offset, const bool zero) mi_attr_noexcept\n{\n  mi_assert_internal(size <= (MI_MAX_ALLOC_SIZE - MI_PADDING_SIZE));\n  mi_assert_internal(alignment != 0 && _mi_is_power_of_two(alignment));\n\n  void* p;\n  size_t oversize;\n  if mi_unlikely(alignment > MI_BLOCK_ALIGNMENT_MAX) {\n    // use OS allocation for very large alignment and allocate inside a huge page (dedicated segment with 1 page)\n    // This can support alignments >= MI_SEGMENT_SIZE by ensuring the object can be aligned at a point in the\n    // first (and single) page such that the segment info is `MI_SEGMENT_SIZE` bytes before it (so it can be found by aligning the pointer down)\n    if mi_unlikely(offset != 0) {\n      // todo: cannot support offset alignment for very large alignments yet\n#if MI_DEBUG > 0\n      _mi_error_message(EOVERFLOW, \"aligned allocation with a very large alignment cannot be used with an alignment offset (size %zu, alignment %zu, offset %zu)\\n\", size, alignment, offset);\n#endif\n      return NULL;\n    }\n    oversize = (size <= MI_SMALL_SIZE_MAX ? MI_SMALL_SIZE_MAX + 1 /* ensure we use generic malloc path */ : size);\n    // note: no guarded as alignment > 0\n    p = _mi_heap_malloc_zero_ex(heap, oversize, false, alignment); // the page block size should be large enough to align in the single huge page block\n    // zero afterwards as only the area from the aligned_p may be committed!\n    if (p == NULL) return NULL;\n  }\n  else {\n    // otherwise over-allocate\n    oversize = (size < MI_MAX_ALIGN_SIZE ? MI_MAX_ALIGN_SIZE : size) + alignment - 1;  // adjust for size <= 16; with size 0 and aligment 64k, we would allocate a 64k block and pointing just beyond that.\n    p = mi_heap_malloc_zero_no_guarded(heap, oversize, zero);\n    if (p == NULL) return NULL;\n  }\n  mi_page_t* page = _mi_ptr_page(p);\n\n  // .. and align within the allocation\n  const uintptr_t align_mask = alignment - 1;  // for any x, `(x & align_mask) == (x % alignment)`\n  const uintptr_t poffset = ((uintptr_t)p + offset) & align_mask;\n  const uintptr_t adjust  = (poffset == 0 ? 0 : alignment - poffset);\n  mi_assert_internal(adjust < alignment);\n  void* aligned_p = (void*)((uintptr_t)p + adjust);\n  if (aligned_p != p) {\n    mi_page_set_has_aligned(page, true);\n    #if MI_GUARDED\n    // set tag to aligned so mi_usable_size works with guard pages\n    if (adjust >= sizeof(mi_block_t)) {\n      mi_block_t* const block = (mi_block_t*)p;\n      block->next = MI_BLOCK_TAG_ALIGNED;\n    }\n    #endif\n    _mi_padding_shrink(page, (mi_block_t*)p, adjust + size);\n  }\n  // todo: expand padding if overallocated ?\n\n  mi_assert_internal(mi_page_usable_block_size(page) >= adjust + size);\n  mi_assert_internal(((uintptr_t)aligned_p + offset) % alignment == 0);\n  mi_assert_internal(mi_usable_size(aligned_p)>=size);\n  mi_assert_internal(mi_usable_size(p) == mi_usable_size(aligned_p)+adjust);\n  #if MI_DEBUG > 1\n  mi_page_t* const apage = _mi_ptr_page(aligned_p);\n  void* unalign_p = _mi_page_ptr_unalign(apage, aligned_p);\n  mi_assert_internal(p == unalign_p);\n  #endif\n\n  // now zero the block if needed\n  if (alignment > MI_BLOCK_ALIGNMENT_MAX) {\n    // for the tracker, on huge aligned allocations only the memory from the start of the large block is defined\n    mi_track_mem_undefined(aligned_p, size);\n    if (zero) {\n      _mi_memzero_aligned(aligned_p, mi_usable_size(aligned_p));\n    }\n  }\n\n  if (p != aligned_p) {\n    mi_track_align(p,aligned_p,adjust,mi_usable_size(aligned_p));\n    #if MI_GUARDED\n    mi_track_mem_defined(p, sizeof(mi_block_t));\n    #endif\n  }\n  return aligned_p;\n}\n\n// Generic primitive aligned allocation -- split out for better codegen\nstatic mi_decl_noinline void* mi_heap_malloc_zero_aligned_at_generic(mi_heap_t* const heap, const size_t size, const size_t alignment, const size_t offset, const bool zero) mi_attr_noexcept\n{\n  mi_assert_internal(alignment != 0 && _mi_is_power_of_two(alignment));\n  // we don't allocate more than MI_MAX_ALLOC_SIZE (see <https://sourceware.org/ml/libc-announce/2019/msg00001.html>)\n  if mi_unlikely(size > (MI_MAX_ALLOC_SIZE - MI_PADDING_SIZE)) {\n    #if MI_DEBUG > 0\n    _mi_error_message(EOVERFLOW, \"aligned allocation request is too large (size %zu, alignment %zu)\\n\", size, alignment);\n    #endif\n    return NULL;\n  }\n\n  // use regular allocation if it is guaranteed to fit the alignment constraints.\n  // this is important to try as the fast path in `mi_heap_malloc_zero_aligned` only works when there exist\n  // a page with the right block size, and if we always use the over-alloc fallback that would never happen.\n  if (offset == 0 && mi_malloc_is_naturally_aligned(size,alignment)) {\n    void* p = mi_heap_malloc_zero_no_guarded(heap, size, zero);\n    mi_assert_internal(p == NULL || ((uintptr_t)p % alignment) == 0);\n    const bool is_aligned_or_null = (((uintptr_t)p) & (alignment-1))==0;\n    if mi_likely(is_aligned_or_null) {\n      return p;\n    }\n    else {\n      // this should never happen if the `mi_malloc_is_naturally_aligned` check is correct..\n      mi_assert(false);\n      mi_free(p);\n    }\n  }\n\n  // fall back to over-allocation\n  return mi_heap_malloc_zero_aligned_at_overalloc(heap,size,alignment,offset,zero);\n}\n\n\n// Primitive aligned allocation\nstatic void* mi_heap_malloc_zero_aligned_at(mi_heap_t* const heap, const size_t size, const size_t alignment, const size_t offset, const bool zero) mi_attr_noexcept\n{\n  // note: we don't require `size > offset`, we just guarantee that the address at offset is aligned regardless of the allocated size.\n  if mi_unlikely(alignment == 0 || !_mi_is_power_of_two(alignment)) { // require power-of-two (see <https://en.cppreference.com/w/c/memory/aligned_alloc>)\n    #if MI_DEBUG > 0\n    _mi_error_message(EOVERFLOW, \"aligned allocation requires the alignment to be a power-of-two (size %zu, alignment %zu)\\n\", size, alignment);\n    #endif\n    return NULL;\n  }\n\n  #if MI_GUARDED\n  if (offset==0 && alignment < MI_BLOCK_ALIGNMENT_MAX && mi_heap_malloc_use_guarded(heap,size)) {\n    return mi_heap_malloc_guarded_aligned(heap, size, alignment, zero);\n  }\n  #endif\n\n  // try first if there happens to be a small block available with just the right alignment\n  if mi_likely(size <= MI_SMALL_SIZE_MAX && alignment <= size) {\n    const uintptr_t align_mask = alignment-1;       // for any x, `(x & align_mask) == (x % alignment)`\n    const size_t padsize = size + MI_PADDING_SIZE;\n    mi_page_t* page = _mi_heap_get_free_small_page(heap, padsize);\n    if mi_likely(page->free != NULL) {\n      const bool is_aligned = (((uintptr_t)page->free + offset) & align_mask)==0;\n      if mi_likely(is_aligned)\n      {\n        #if MI_STAT>1\n        mi_heap_stat_increase(heap, malloc_requested, size);\n        #endif\n        void* p = (zero ? _mi_page_malloc_zeroed(heap,page,padsize) : _mi_page_malloc(heap,page,padsize)); // call specific page malloc for better codegen\n        mi_assert_internal(p != NULL);\n        mi_assert_internal(((uintptr_t)p + offset) % alignment == 0);\n        mi_track_malloc(p,size,zero);\n        return p;\n      }\n    }\n  }\n\n  // fallback to generic aligned allocation\n  return mi_heap_malloc_zero_aligned_at_generic(heap, size, alignment, offset, zero);\n}\n\n\n// ------------------------------------------------------\n// Optimized mi_heap_malloc_aligned / mi_malloc_aligned\n// ------------------------------------------------------\n\nmi_decl_nodiscard mi_decl_restrict void* mi_heap_malloc_aligned_at(mi_heap_t* heap, size_t size, size_t alignment, size_t offset) mi_attr_noexcept {\n  return mi_heap_malloc_zero_aligned_at(heap, size, alignment, offset, false);\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_heap_malloc_aligned(mi_heap_t* heap, size_t size, size_t alignment) mi_attr_noexcept {\n  return mi_heap_malloc_aligned_at(heap, size, alignment, 0);\n}\n\n// ensure a definition is emitted\n#if defined(__cplusplus)\nvoid* _mi_extern_heap_malloc_aligned = (void*)&mi_heap_malloc_aligned;\n#endif\n\n// ------------------------------------------------------\n// Aligned Allocation\n// ------------------------------------------------------\n\nmi_decl_nodiscard mi_decl_restrict void* mi_heap_zalloc_aligned_at(mi_heap_t* heap, size_t size, size_t alignment, size_t offset) mi_attr_noexcept {\n  return mi_heap_malloc_zero_aligned_at(heap, size, alignment, offset, true);\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_heap_zalloc_aligned(mi_heap_t* heap, size_t size, size_t alignment) mi_attr_noexcept {\n  return mi_heap_zalloc_aligned_at(heap, size, alignment, 0);\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_heap_calloc_aligned_at(mi_heap_t* heap, size_t count, size_t size, size_t alignment, size_t offset) mi_attr_noexcept {\n  size_t total;\n  if (mi_count_size_overflow(count, size, &total)) return NULL;\n  return mi_heap_zalloc_aligned_at(heap, total, alignment, offset);\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_heap_calloc_aligned(mi_heap_t* heap, size_t count, size_t size, size_t alignment) mi_attr_noexcept {\n  return mi_heap_calloc_aligned_at(heap,count,size,alignment,0);\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_malloc_aligned_at(size_t size, size_t alignment, size_t offset) mi_attr_noexcept {\n  return mi_heap_malloc_aligned_at(mi_prim_get_default_heap(), size, alignment, offset);\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_malloc_aligned(size_t size, size_t alignment) mi_attr_noexcept {\n  return mi_heap_malloc_aligned(mi_prim_get_default_heap(), size, alignment);\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_zalloc_aligned_at(size_t size, size_t alignment, size_t offset) mi_attr_noexcept {\n  return mi_heap_zalloc_aligned_at(mi_prim_get_default_heap(), size, alignment, offset);\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_zalloc_aligned(size_t size, size_t alignment) mi_attr_noexcept {\n  return mi_heap_zalloc_aligned(mi_prim_get_default_heap(), size, alignment);\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_calloc_aligned_at(size_t count, size_t size, size_t alignment, size_t offset) mi_attr_noexcept {\n  return mi_heap_calloc_aligned_at(mi_prim_get_default_heap(), count, size, alignment, offset);\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_calloc_aligned(size_t count, size_t size, size_t alignment) mi_attr_noexcept {\n  return mi_heap_calloc_aligned(mi_prim_get_default_heap(), count, size, alignment);\n}\n\n\n// ------------------------------------------------------\n// Aligned re-allocation\n// ------------------------------------------------------\n\nstatic void* mi_heap_realloc_zero_aligned_at(mi_heap_t* heap, void* p, size_t newsize, size_t alignment, size_t offset, bool zero) mi_attr_noexcept {\n  mi_assert(alignment > 0);\n  if (alignment <= sizeof(uintptr_t)) return _mi_heap_realloc_zero(heap,p,newsize,zero);\n  if (p == NULL) return mi_heap_malloc_zero_aligned_at(heap,newsize,alignment,offset,zero);\n  size_t size = mi_usable_size(p);\n  if (newsize <= size && newsize >= (size - (size / 2))\n      && (((uintptr_t)p + offset) % alignment) == 0) {\n    return p;  // reallocation still fits, is aligned and not more than 50% waste\n  }\n  else {\n    // note: we don't zero allocate upfront so we only zero initialize the expanded part\n    void* newp = mi_heap_malloc_aligned_at(heap,newsize,alignment,offset);\n    if (newp != NULL) {\n      if (zero && newsize > size) {\n        // also set last word in the previous allocation to zero to ensure any padding is zero-initialized\n        size_t start = (size >= sizeof(intptr_t) ? size - sizeof(intptr_t) : 0);\n        _mi_memzero((uint8_t*)newp + start, newsize - start);\n      }\n      _mi_memcpy_aligned(newp, p, (newsize > size ? size : newsize));\n      mi_free(p); // only free if successful\n    }\n    return newp;\n  }\n}\n\nstatic void* mi_heap_realloc_zero_aligned(mi_heap_t* heap, void* p, size_t newsize, size_t alignment, bool zero) mi_attr_noexcept {\n  mi_assert(alignment > 0);\n  if (alignment <= sizeof(uintptr_t)) return _mi_heap_realloc_zero(heap,p,newsize,zero);\n  size_t offset = ((uintptr_t)p % alignment); // use offset of previous allocation (p can be NULL)\n  return mi_heap_realloc_zero_aligned_at(heap,p,newsize,alignment,offset,zero);\n}\n\nmi_decl_nodiscard void* mi_heap_realloc_aligned_at(mi_heap_t* heap, void* p, size_t newsize, size_t alignment, size_t offset) mi_attr_noexcept {\n  return mi_heap_realloc_zero_aligned_at(heap,p,newsize,alignment,offset,false);\n}\n\nmi_decl_nodiscard void* mi_heap_realloc_aligned(mi_heap_t* heap, void* p, size_t newsize, size_t alignment) mi_attr_noexcept {\n  return mi_heap_realloc_zero_aligned(heap,p,newsize,alignment,false);\n}\n\nmi_decl_nodiscard void* mi_heap_rezalloc_aligned_at(mi_heap_t* heap, void* p, size_t newsize, size_t alignment, size_t offset) mi_attr_noexcept {\n  return mi_heap_realloc_zero_aligned_at(heap, p, newsize, alignment, offset, true);\n}\n\nmi_decl_nodiscard void* mi_heap_rezalloc_aligned(mi_heap_t* heap, void* p, size_t newsize, size_t alignment) mi_attr_noexcept {\n  return mi_heap_realloc_zero_aligned(heap, p, newsize, alignment, true);\n}\n\nmi_decl_nodiscard void* mi_heap_recalloc_aligned_at(mi_heap_t* heap, void* p, size_t newcount, size_t size, size_t alignment, size_t offset) mi_attr_noexcept {\n  size_t total;\n  if (mi_count_size_overflow(newcount, size, &total)) return NULL;\n  return mi_heap_rezalloc_aligned_at(heap, p, total, alignment, offset);\n}\n\nmi_decl_nodiscard void* mi_heap_recalloc_aligned(mi_heap_t* heap, void* p, size_t newcount, size_t size, size_t alignment) mi_attr_noexcept {\n  size_t total;\n  if (mi_count_size_overflow(newcount, size, &total)) return NULL;\n  return mi_heap_rezalloc_aligned(heap, p, total, alignment);\n}\n\nmi_decl_nodiscard void* mi_realloc_aligned_at(void* p, size_t newsize, size_t alignment, size_t offset) mi_attr_noexcept {\n  return mi_heap_realloc_aligned_at(mi_prim_get_default_heap(), p, newsize, alignment, offset);\n}\n\nmi_decl_nodiscard void* mi_realloc_aligned(void* p, size_t newsize, size_t alignment) mi_attr_noexcept {\n  return mi_heap_realloc_aligned(mi_prim_get_default_heap(), p, newsize, alignment);\n}\n\nmi_decl_nodiscard void* mi_rezalloc_aligned_at(void* p, size_t newsize, size_t alignment, size_t offset) mi_attr_noexcept {\n  return mi_heap_rezalloc_aligned_at(mi_prim_get_default_heap(), p, newsize, alignment, offset);\n}\n\nmi_decl_nodiscard void* mi_rezalloc_aligned(void* p, size_t newsize, size_t alignment) mi_attr_noexcept {\n  return mi_heap_rezalloc_aligned(mi_prim_get_default_heap(), p, newsize, alignment);\n}\n\nmi_decl_nodiscard void* mi_recalloc_aligned_at(void* p, size_t newcount, size_t size, size_t alignment, size_t offset) mi_attr_noexcept {\n  return mi_heap_recalloc_aligned_at(mi_prim_get_default_heap(), p, newcount, size, alignment, offset);\n}\n\nmi_decl_nodiscard void* mi_recalloc_aligned(void* p, size_t newcount, size_t size, size_t alignment) mi_attr_noexcept {\n  return mi_heap_recalloc_aligned(mi_prim_get_default_heap(), p, newcount, size, alignment);\n}\n\n\n"
  },
  {
    "path": "third-party/mimalloc/src/alloc-override.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2021, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n#if !defined(MI_IN_ALLOC_C)\n#error \"this file should be included from 'alloc.c' (so aliases can work)\"\n#endif\n\n#if defined(MI_MALLOC_OVERRIDE) && defined(_WIN32) && !(defined(MI_SHARED_LIB) && defined(_DLL))\n#error \"It is only possible to override \"malloc\" on Windows when building as a DLL (and linking the C runtime as a DLL)\"\n#endif\n\n#if defined(MI_MALLOC_OVERRIDE) && !(defined(_WIN32))\n\n#if defined(__APPLE__)\n#include <AvailabilityMacros.h>\nmi_decl_externc void   vfree(void* p);\nmi_decl_externc size_t malloc_size(const void* p);\nmi_decl_externc size_t malloc_good_size(size_t size);\n#endif\n\n// helper definition for C override of C++ new\ntypedef void* mi_nothrow_t;\n\n// ------------------------------------------------------\n// Override system malloc\n// ------------------------------------------------------\n\n#if (defined(__GNUC__) || defined(__clang__)) && !defined(__APPLE__) && !MI_TRACK_ENABLED\n  // gcc, clang: use aliasing to alias the exported function to one of our `mi_` functions\n  #if (defined(__GNUC__) && __GNUC__ >= 9)\n    #pragma GCC diagnostic ignored \"-Wattributes\"  // or we get warnings that nodiscard is ignored on a forward\n    #define MI_FORWARD(fun)      __attribute__((alias(#fun), used, visibility(\"default\"), copy(fun)));\n  #else\n    #define MI_FORWARD(fun)      __attribute__((alias(#fun), used, visibility(\"default\")));\n  #endif\n  #define MI_FORWARD1(fun,x)      MI_FORWARD(fun)\n  #define MI_FORWARD2(fun,x,y)    MI_FORWARD(fun)\n  #define MI_FORWARD3(fun,x,y,z)  MI_FORWARD(fun)\n  #define MI_FORWARD0(fun,x)      MI_FORWARD(fun)\n  #define MI_FORWARD02(fun,x,y)   MI_FORWARD(fun)\n#else\n  // otherwise use forwarding by calling our `mi_` function\n  #define MI_FORWARD1(fun,x)      { return fun(x); }\n  #define MI_FORWARD2(fun,x,y)    { return fun(x,y); }\n  #define MI_FORWARD3(fun,x,y,z)  { return fun(x,y,z); }\n  #define MI_FORWARD0(fun,x)      { fun(x); }\n  #define MI_FORWARD02(fun,x,y)   { fun(x,y); }\n#endif\n\n\n#if defined(__APPLE__) && defined(MI_SHARED_LIB_EXPORT) && defined(MI_OSX_INTERPOSE)\n  // define MI_OSX_IS_INTERPOSED as we should not provide forwarding definitions for\n  // functions that are interposed (or the interposing does not work)\n  #define MI_OSX_IS_INTERPOSED\n\n  mi_decl_externc size_t mi_malloc_size_checked(void *p) {\n    if (!mi_is_in_heap_region(p)) return 0;\n    return mi_usable_size(p);\n  }\n\n  // use interposing so `DYLD_INSERT_LIBRARIES` works without `DYLD_FORCE_FLAT_NAMESPACE=1`\n  // See: <https://books.google.com/books?id=K8vUkpOXhN4C&pg=PA73>\n  struct mi_interpose_s {\n    const void* replacement;\n    const void* target;\n  };\n  #define MI_INTERPOSE_FUN(oldfun,newfun) { (const void*)&newfun, (const void*)&oldfun }\n  #define MI_INTERPOSE_MI(fun)            MI_INTERPOSE_FUN(fun,mi_##fun)\n\n  __attribute__((used)) static struct mi_interpose_s _mi_interposes[]  __attribute__((section(\"__DATA, __interpose\"))) =\n  {\n    MI_INTERPOSE_MI(malloc),\n    MI_INTERPOSE_MI(calloc),\n    MI_INTERPOSE_MI(realloc),\n    MI_INTERPOSE_MI(strdup),\n    #if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7\n    MI_INTERPOSE_MI(strndup),\n    #endif\n    MI_INTERPOSE_MI(realpath),\n    MI_INTERPOSE_MI(posix_memalign),\n    MI_INTERPOSE_MI(reallocf),\n    MI_INTERPOSE_MI(valloc),\n    MI_INTERPOSE_FUN(malloc_size,mi_malloc_size_checked),\n    MI_INTERPOSE_MI(malloc_good_size),\n    #if defined(MAC_OS_X_VERSION_10_15) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_15\n    MI_INTERPOSE_MI(aligned_alloc),\n    #endif\n    #ifdef MI_OSX_ZONE\n    // we interpose malloc_default_zone in alloc-override-osx.c so we can use mi_free safely\n    MI_INTERPOSE_MI(free),\n    MI_INTERPOSE_FUN(vfree,mi_free),\n    #else\n    // sometimes code allocates from default zone but deallocates using plain free :-( (like NxHashResizeToCapacity <https://github.com/nneonneo/osx-10.9-opensource/blob/master/objc4-551.1/runtime/hashtable2.mm>)\n    MI_INTERPOSE_FUN(free,mi_cfree), // use safe free that checks if pointers are from us\n    MI_INTERPOSE_FUN(vfree,mi_cfree),\n    #endif\n  };\n\n  #ifdef __cplusplus\n  extern \"C\" {\n  #endif\n  void  _ZdlPv(void* p);   // delete\n  void  _ZdaPv(void* p);   // delete[]\n  void  _ZdlPvm(void* p, size_t n);  // delete\n  void  _ZdaPvm(void* p, size_t n);  // delete[]\n  void* _Znwm(size_t n);  // new\n  void* _Znam(size_t n);  // new[]\n  void* _ZnwmRKSt9nothrow_t(size_t n, mi_nothrow_t tag); // new nothrow\n  void* _ZnamRKSt9nothrow_t(size_t n, mi_nothrow_t tag); // new[] nothrow\n  #ifdef __cplusplus\n  }\n  #endif\n  __attribute__((used)) static struct mi_interpose_s _mi_cxx_interposes[]  __attribute__((section(\"__DATA, __interpose\"))) =\n  {\n    MI_INTERPOSE_FUN(_ZdlPv,mi_free),\n    MI_INTERPOSE_FUN(_ZdaPv,mi_free),\n    MI_INTERPOSE_FUN(_ZdlPvm,mi_free_size),\n    MI_INTERPOSE_FUN(_ZdaPvm,mi_free_size),\n    MI_INTERPOSE_FUN(_Znwm,mi_new),\n    MI_INTERPOSE_FUN(_Znam,mi_new),\n    MI_INTERPOSE_FUN(_ZnwmRKSt9nothrow_t,mi_new_nothrow),\n    MI_INTERPOSE_FUN(_ZnamRKSt9nothrow_t,mi_new_nothrow),\n  };\n\n#elif defined(_MSC_VER)\n  // cannot override malloc unless using a dll.\n  // we just override new/delete which does work in a static library.\n#else\n  // On all other systems forward allocation primitives to our API\n  mi_decl_export void* malloc(size_t size)              MI_FORWARD1(mi_malloc, size)\n  mi_decl_export void* calloc(size_t size, size_t n)    MI_FORWARD2(mi_calloc, size, n)\n  mi_decl_export void* realloc(void* p, size_t newsize) MI_FORWARD2(mi_realloc, p, newsize)\n  mi_decl_export void  free(void* p)                    MI_FORWARD0(mi_free, p)  \n  // In principle we do not need to forward `strdup`/`strndup` but on some systems these do not use `malloc` internally (but a more primitive call)\n  // We only override if `strdup` is not a macro (as on some older libc's, see issue #885)\n  #if !defined(strdup)\n  mi_decl_export char* strdup(const char* str)             MI_FORWARD1(mi_strdup, str)\n  #endif\n  #if !defined(strndup) && (!defined(__APPLE__) || (defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7))\n  mi_decl_export char* strndup(const char* str, size_t n)  MI_FORWARD2(mi_strndup, str, n)   \n  #endif\n#endif\n\n#if (defined(__GNUC__) || defined(__clang__)) && !defined(__APPLE__)\n#pragma GCC visibility push(default)\n#endif\n\n// ------------------------------------------------------\n// Override new/delete\n// This is not really necessary as they usually call\n// malloc/free anyway, but it improves performance.\n// ------------------------------------------------------\n#ifdef __cplusplus\n  // ------------------------------------------------------\n  // With a C++ compiler we override the new/delete operators.\n  // see <https://en.cppreference.com/w/cpp/memory/new/operator_new>\n  // ------------------------------------------------------\n  #include <new>\n\n  #ifndef MI_OSX_IS_INTERPOSED\n    void operator delete(void* p) noexcept              MI_FORWARD0(mi_free,p)\n    void operator delete[](void* p) noexcept            MI_FORWARD0(mi_free,p)\n\n    void* operator new(std::size_t n) noexcept(false)   MI_FORWARD1(mi_new,n)\n    void* operator new[](std::size_t n) noexcept(false) MI_FORWARD1(mi_new,n)\n\n    void* operator new  (std::size_t n, const std::nothrow_t& tag) noexcept { MI_UNUSED(tag); return mi_new_nothrow(n); }\n    void* operator new[](std::size_t n, const std::nothrow_t& tag) noexcept { MI_UNUSED(tag); return mi_new_nothrow(n); }\n\n    #if (__cplusplus >= 201402L || _MSC_VER >= 1916)\n    void operator delete  (void* p, std::size_t n) noexcept MI_FORWARD02(mi_free_size,p,n)\n    void operator delete[](void* p, std::size_t n) noexcept MI_FORWARD02(mi_free_size,p,n)\n    #endif\n  #endif\n\n  #if (__cplusplus > 201402L && defined(__cpp_aligned_new)) && (!defined(__GNUC__) || (__GNUC__ > 5))\n  void operator delete  (void* p, std::align_val_t al) noexcept { mi_free_aligned(p, static_cast<size_t>(al)); }\n  void operator delete[](void* p, std::align_val_t al) noexcept { mi_free_aligned(p, static_cast<size_t>(al)); }\n  void operator delete  (void* p, std::size_t n, std::align_val_t al) noexcept { mi_free_size_aligned(p, n, static_cast<size_t>(al)); };\n  void operator delete[](void* p, std::size_t n, std::align_val_t al) noexcept { mi_free_size_aligned(p, n, static_cast<size_t>(al)); };\n  void operator delete  (void* p, std::align_val_t al, const std::nothrow_t&) noexcept { mi_free_aligned(p, static_cast<size_t>(al)); }\n  void operator delete[](void* p, std::align_val_t al, const std::nothrow_t&) noexcept { mi_free_aligned(p, static_cast<size_t>(al)); }\n\n  void* operator new( std::size_t n, std::align_val_t al)   noexcept(false) { return mi_new_aligned(n, static_cast<size_t>(al)); }\n  void* operator new[]( std::size_t n, std::align_val_t al) noexcept(false) { return mi_new_aligned(n, static_cast<size_t>(al)); }\n  void* operator new  (std::size_t n, std::align_val_t al, const std::nothrow_t&) noexcept { return mi_new_aligned_nothrow(n, static_cast<size_t>(al)); }\n  void* operator new[](std::size_t n, std::align_val_t al, const std::nothrow_t&) noexcept { return mi_new_aligned_nothrow(n, static_cast<size_t>(al)); }\n  #endif\n\n#elif (defined(__GNUC__) || defined(__clang__))\n  // ------------------------------------------------------\n  // Override by defining the mangled C++ names of the operators (as\n  // used by GCC and CLang).\n  // See <https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling>\n  // ------------------------------------------------------\n\n  void _ZdlPv(void* p)            MI_FORWARD0(mi_free,p) // delete\n  void _ZdaPv(void* p)            MI_FORWARD0(mi_free,p) // delete[]\n  void _ZdlPvm(void* p, size_t n) MI_FORWARD02(mi_free_size,p,n)\n  void _ZdaPvm(void* p, size_t n) MI_FORWARD02(mi_free_size,p,n)\n  \n  void _ZdlPvSt11align_val_t(void* p, size_t al)            { mi_free_aligned(p,al); }\n  void _ZdaPvSt11align_val_t(void* p, size_t al)            { mi_free_aligned(p,al); }\n  void _ZdlPvmSt11align_val_t(void* p, size_t n, size_t al) { mi_free_size_aligned(p,n,al); }\n  void _ZdaPvmSt11align_val_t(void* p, size_t n, size_t al) { mi_free_size_aligned(p,n,al); }\n\n  void _ZdlPvRKSt9nothrow_t(void* p, mi_nothrow_t tag)      { MI_UNUSED(tag); mi_free(p); }  // operator delete(void*, std::nothrow_t const&) \n  void _ZdaPvRKSt9nothrow_t(void* p, mi_nothrow_t tag)      { MI_UNUSED(tag); mi_free(p); }  // operator delete[](void*, std::nothrow_t const&)\n  void _ZdlPvSt11align_val_tRKSt9nothrow_t(void* p, size_t al, mi_nothrow_t tag) { MI_UNUSED(tag); mi_free_aligned(p,al); } // operator delete(void*, std::align_val_t, std::nothrow_t const&) \n  void _ZdaPvSt11align_val_tRKSt9nothrow_t(void* p, size_t al, mi_nothrow_t tag) { MI_UNUSED(tag); mi_free_aligned(p,al); } // operator delete[](void*, std::align_val_t, std::nothrow_t const&) \n  \n  #if (MI_INTPTR_SIZE==8)\n    void* _Znwm(size_t n)                             MI_FORWARD1(mi_new,n)  // new 64-bit\n    void* _Znam(size_t n)                             MI_FORWARD1(mi_new,n)  // new[] 64-bit\n    void* _ZnwmRKSt9nothrow_t(size_t n, mi_nothrow_t tag) { MI_UNUSED(tag); return mi_new_nothrow(n); }\n    void* _ZnamRKSt9nothrow_t(size_t n, mi_nothrow_t tag) { MI_UNUSED(tag); return mi_new_nothrow(n); }\n    void* _ZnwmSt11align_val_t(size_t n, size_t al)   MI_FORWARD2(mi_new_aligned, n, al)\n    void* _ZnamSt11align_val_t(size_t n, size_t al)   MI_FORWARD2(mi_new_aligned, n, al)\n    void* _ZnwmSt11align_val_tRKSt9nothrow_t(size_t n, size_t al, mi_nothrow_t tag) { MI_UNUSED(tag); return mi_new_aligned_nothrow(n,al); }\n    void* _ZnamSt11align_val_tRKSt9nothrow_t(size_t n, size_t al, mi_nothrow_t tag) { MI_UNUSED(tag); return mi_new_aligned_nothrow(n,al); }\n  #elif (MI_INTPTR_SIZE==4)\n    void* _Znwj(size_t n)                             MI_FORWARD1(mi_new,n)  // new 64-bit\n    void* _Znaj(size_t n)                             MI_FORWARD1(mi_new,n)  // new[] 64-bit\n    void* _ZnwjRKSt9nothrow_t(size_t n, mi_nothrow_t tag) { MI_UNUSED(tag); return mi_new_nothrow(n); }\n    void* _ZnajRKSt9nothrow_t(size_t n, mi_nothrow_t tag) { MI_UNUSED(tag); return mi_new_nothrow(n); }\n    void* _ZnwjSt11align_val_t(size_t n, size_t al)   MI_FORWARD2(mi_new_aligned, n, al)\n    void* _ZnajSt11align_val_t(size_t n, size_t al)   MI_FORWARD2(mi_new_aligned, n, al)\n    void* _ZnwjSt11align_val_tRKSt9nothrow_t(size_t n, size_t al, mi_nothrow_t tag) { MI_UNUSED(tag); return mi_new_aligned_nothrow(n,al); }\n    void* _ZnajSt11align_val_tRKSt9nothrow_t(size_t n, size_t al, mi_nothrow_t tag) { MI_UNUSED(tag); return mi_new_aligned_nothrow(n,al); }\n  #else\n    #error \"define overloads for new/delete for this platform (just for performance, can be skipped)\"\n  #endif\n#endif // __cplusplus\n\n// ------------------------------------------------------\n// Further Posix & Unix functions definitions\n// ------------------------------------------------------\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#ifndef MI_OSX_IS_INTERPOSED\n  // Forward Posix/Unix calls as well\n  void*  reallocf(void* p, size_t newsize) MI_FORWARD2(mi_reallocf,p,newsize)\n  size_t malloc_size(const void* p)        MI_FORWARD1(mi_usable_size,p)\n  #if !defined(__ANDROID__) && !defined(__FreeBSD__) && !defined(__DragonFly__)\n  size_t malloc_usable_size(void *p)       MI_FORWARD1(mi_usable_size,p)\n  #else\n  size_t malloc_usable_size(const void *p) MI_FORWARD1(mi_usable_size,p)\n  #endif\n\n  // No forwarding here due to aliasing/name mangling issues\n  void*  valloc(size_t size)               { return mi_valloc(size); }\n  void   vfree(void* p)                    { mi_free(p); }\n  size_t malloc_good_size(size_t size)     { return mi_malloc_good_size(size); }\n  int    posix_memalign(void** p, size_t alignment, size_t size) { return mi_posix_memalign(p, alignment, size); }\n\n  // `aligned_alloc` is only available when __USE_ISOC11 is defined.\n  // Note: it seems __USE_ISOC11 is not defined in musl (and perhaps other libc's) so we only check\n  // for it if using glibc.\n  // Note: Conda has a custom glibc where `aligned_alloc` is declared `static inline` and we cannot\n  // override it, but both _ISOC11_SOURCE and __USE_ISOC11 are undefined in Conda GCC7 or GCC9.\n  // Fortunately, in the case where `aligned_alloc` is declared as `static inline` it\n  // uses internally `memalign`, `posix_memalign`, or `_aligned_malloc` so we  can avoid overriding it ourselves.\n  #if !defined(__GLIBC__) || __USE_ISOC11\n  void* aligned_alloc(size_t alignment, size_t size) { return mi_aligned_alloc(alignment, size); }\n  #endif\n#endif\n\n// no forwarding here due to aliasing/name mangling issues\nvoid  cfree(void* p)                                    { mi_free(p); }\nvoid* pvalloc(size_t size)                              { return mi_pvalloc(size); }\nvoid* memalign(size_t alignment, size_t size)           { return mi_memalign(alignment, size); }\nvoid* _aligned_malloc(size_t alignment, size_t size)    { return mi_aligned_alloc(alignment, size); }\nvoid* reallocarray(void* p, size_t count, size_t size)  { return mi_reallocarray(p, count, size); }\n// some systems define reallocarr so mark it as a weak symbol (#751)\nmi_decl_weak int reallocarr(void* p, size_t count, size_t size)    { return mi_reallocarr(p, count, size); }\n\n#if defined(__wasi__)\n  // forward __libc interface (see PR #667)\n  void* __libc_malloc(size_t size)                      MI_FORWARD1(mi_malloc, size)\n  void* __libc_calloc(size_t count, size_t size)        MI_FORWARD2(mi_calloc, count, size)\n  void* __libc_realloc(void* p, size_t size)            MI_FORWARD2(mi_realloc, p, size)\n  void  __libc_free(void* p)                            MI_FORWARD0(mi_free, p)\n  void* __libc_memalign(size_t alignment, size_t size)  { return mi_memalign(alignment, size); }\n\n#elif defined(__linux__)\n  // forward __libc interface (needed for glibc-based and musl-based Linux distributions)\n  void* __libc_malloc(size_t size)                      MI_FORWARD1(mi_malloc,size)\n  void* __libc_calloc(size_t count, size_t size)        MI_FORWARD2(mi_calloc,count,size)\n  void* __libc_realloc(void* p, size_t size)            MI_FORWARD2(mi_realloc,p,size)\n  void  __libc_free(void* p)                            MI_FORWARD0(mi_free,p)\n  void  __libc_cfree(void* p)                           MI_FORWARD0(mi_free,p)\n\n  void* __libc_valloc(size_t size)                      { return mi_valloc(size); }\n  void* __libc_pvalloc(size_t size)                     { return mi_pvalloc(size); }\n  void* __libc_memalign(size_t alignment, size_t size)  { return mi_memalign(alignment,size); }\n  int   __posix_memalign(void** p, size_t alignment, size_t size) { return mi_posix_memalign(p,alignment,size); }\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#if (defined(__GNUC__) || defined(__clang__)) && !defined(__APPLE__)\n#pragma GCC visibility pop\n#endif\n\n#endif // MI_MALLOC_OVERRIDE && !_WIN32\n"
  },
  {
    "path": "third-party/mimalloc/src/alloc-posix.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2021, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n// ------------------------------------------------------------------------\n// mi prefixed publi definitions of various Posix, Unix, and C++ functions\n// for convenience and used when overriding these functions.\n// ------------------------------------------------------------------------\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n\n// ------------------------------------------------------\n// Posix & Unix functions definitions\n// ------------------------------------------------------\n\n#include <errno.h>\n#include <string.h>  // memset\n#include <stdlib.h>  // getenv\n\n#ifdef _MSC_VER\n#pragma warning(disable:4996)  // getenv _wgetenv\n#endif\n\n#ifndef EINVAL\n#define EINVAL 22\n#endif\n#ifndef ENOMEM\n#define ENOMEM 12\n#endif\n\n\nmi_decl_nodiscard size_t mi_malloc_size(const void* p) mi_attr_noexcept {\n  // if (!mi_is_in_heap_region(p)) return 0;\n  return mi_usable_size(p);\n}\n\nmi_decl_nodiscard size_t mi_malloc_usable_size(const void *p) mi_attr_noexcept {\n  // if (!mi_is_in_heap_region(p)) return 0;\n  return mi_usable_size(p);\n}\n\nmi_decl_nodiscard size_t mi_malloc_good_size(size_t size) mi_attr_noexcept {\n  return mi_good_size(size);\n}\n\nvoid mi_cfree(void* p) mi_attr_noexcept {\n  if (mi_is_in_heap_region(p)) {\n    mi_free(p);\n  }\n}\n\nint mi_posix_memalign(void** p, size_t alignment, size_t size) mi_attr_noexcept {\n  // Note: The spec dictates we should not modify `*p` on an error. (issue#27)\n  // <http://man7.org/linux/man-pages/man3/posix_memalign.3.html>\n  if (p == NULL) return EINVAL;\n  if ((alignment % sizeof(void*)) != 0) return EINVAL;                 // natural alignment\n  // it is also required that alignment is a power of 2 and > 0; this is checked in `mi_malloc_aligned`\n  if (alignment==0 || !_mi_is_power_of_two(alignment)) return EINVAL;  // not a power of 2\n  void* q = mi_malloc_aligned(size, alignment);\n  if (q==NULL && size != 0) return ENOMEM;\n  mi_assert_internal(((uintptr_t)q % alignment) == 0);\n  *p = q;\n  return 0;\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_memalign(size_t alignment, size_t size) mi_attr_noexcept {\n  void* p = mi_malloc_aligned(size, alignment);\n  mi_assert_internal(((uintptr_t)p % alignment) == 0);\n  return p;\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_valloc(size_t size) mi_attr_noexcept {\n  return mi_memalign( _mi_os_page_size(), size );\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_pvalloc(size_t size) mi_attr_noexcept {\n  size_t psize = _mi_os_page_size();\n  if (size >= SIZE_MAX - psize) return NULL; // overflow\n  size_t asize = _mi_align_up(size, psize);\n  return mi_malloc_aligned(asize, psize);\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_aligned_alloc(size_t alignment, size_t size) mi_attr_noexcept {\n  // C11 requires the size to be an integral multiple of the alignment, see <https://en.cppreference.com/w/c/memory/aligned_alloc>.\n  // unfortunately, it turns out quite some programs pass a size that is not an integral multiple so skip this check..\n  /* if mi_unlikely((size & (alignment - 1)) != 0) { // C11 requires alignment>0 && integral multiple, see <https://en.cppreference.com/w/c/memory/aligned_alloc>\n      #if MI_DEBUG > 0\n      _mi_error_message(EOVERFLOW, \"(mi_)aligned_alloc requires the size to be an integral multiple of the alignment (size %zu, alignment %zu)\\n\", size, alignment);\n      #endif\n      return NULL;\n    }\n  */\n  // C11 also requires alignment to be a power-of-two (and > 0) which is checked in mi_malloc_aligned\n  void* p = mi_malloc_aligned(size, alignment);\n  mi_assert_internal(((uintptr_t)p % alignment) == 0);\n  return p;\n}\n\nmi_decl_nodiscard void* mi_reallocarray( void* p, size_t count, size_t size ) mi_attr_noexcept {  // BSD\n  void* newp = mi_reallocn(p,count,size);\n  if (newp==NULL) { errno = ENOMEM; }\n  return newp;\n}\n\nmi_decl_nodiscard int mi_reallocarr( void* p, size_t count, size_t size ) mi_attr_noexcept { // NetBSD\n  mi_assert(p != NULL);\n  if (p == NULL) {\n    errno = EINVAL;\n    return EINVAL;\n  }\n  void** op = (void**)p;\n  void* newp = mi_reallocarray(*op, count, size);\n  if mi_unlikely(newp == NULL) { return errno; }\n  *op = newp;\n  return 0;\n}\n\nvoid* mi__expand(void* p, size_t newsize) mi_attr_noexcept {  // Microsoft\n  void* res = mi_expand(p, newsize);\n  if (res == NULL) { errno = ENOMEM; }\n  return res;\n}\n\nmi_decl_nodiscard mi_decl_restrict unsigned short* mi_wcsdup(const unsigned short* s) mi_attr_noexcept {\n  if (s==NULL) return NULL;\n  size_t len;\n  for(len = 0; s[len] != 0; len++) { }\n  size_t size = (len+1)*sizeof(unsigned short);\n  unsigned short* p = (unsigned short*)mi_malloc(size);\n  if (p != NULL) {\n    _mi_memcpy(p,s,size);\n  }\n  return p;\n}\n\nmi_decl_nodiscard mi_decl_restrict unsigned char* mi_mbsdup(const unsigned char* s)  mi_attr_noexcept {\n  return (unsigned char*)mi_strdup((const char*)s);\n}\n\nint mi_dupenv_s(char** buf, size_t* size, const char* name) mi_attr_noexcept {\n  if (buf==NULL || name==NULL) return EINVAL;\n  if (size != NULL) *size = 0;\n  char* p = getenv(name);        // mscver warning 4996\n  if (p==NULL) {\n    *buf = NULL;\n  }\n  else {\n    *buf = mi_strdup(p);\n    if (*buf==NULL) return ENOMEM;\n    if (size != NULL) *size = _mi_strlen(p);\n  }\n  return 0;\n}\n\nint mi_wdupenv_s(unsigned short** buf, size_t* size, const unsigned short* name) mi_attr_noexcept {\n  if (buf==NULL || name==NULL) return EINVAL;\n  if (size != NULL) *size = 0;\n#if !defined(_WIN32) || (defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP))\n  // not supported\n  *buf = NULL;\n  return EINVAL;\n#else\n  unsigned short* p = (unsigned short*)_wgetenv((const wchar_t*)name);  // msvc warning 4996\n  if (p==NULL) {\n    *buf = NULL;\n  }\n  else {\n    *buf = mi_wcsdup(p);\n    if (*buf==NULL) return ENOMEM;\n    if (size != NULL) *size = wcslen((const wchar_t*)p);\n  }\n  return 0;\n#endif\n}\n\nmi_decl_nodiscard void* mi_aligned_offset_recalloc(void* p, size_t newcount, size_t size, size_t alignment, size_t offset) mi_attr_noexcept { // Microsoft\n  return mi_recalloc_aligned_at(p, newcount, size, alignment, offset);\n}\n\nmi_decl_nodiscard void* mi_aligned_recalloc(void* p, size_t newcount, size_t size, size_t alignment) mi_attr_noexcept { // Microsoft\n  return mi_recalloc_aligned(p, newcount, size, alignment);\n}\n"
  },
  {
    "path": "third-party/mimalloc/src/alloc.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2024, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#ifndef _DEFAULT_SOURCE\n#define _DEFAULT_SOURCE   // for realpath() on Linux\n#endif\n\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"mimalloc/atomic.h\"\n#include \"mimalloc/prim.h\"   // _mi_prim_thread_id()\n\n#include <string.h>      // memset, strlen (for mi_strdup)\n#include <stdlib.h>      // malloc, abort\n\n#define MI_IN_ALLOC_C\n#include \"alloc-override.c\"\n#include \"free.c\"\n#undef MI_IN_ALLOC_C\n\n// ------------------------------------------------------\n// Allocation\n// ------------------------------------------------------\n\n// Fast allocation in a page: just pop from the free list.\n// Fall back to generic allocation only if the list is empty.\n// Note: in release mode the (inlined) routine is about 7 instructions with a single test.\nextern inline void* _mi_page_malloc_zero(mi_heap_t* heap, mi_page_t* page, size_t size, bool zero) mi_attr_noexcept\n{\n  mi_assert_internal(page->block_size == 0 /* empty heap */ || mi_page_block_size(page) >= size);\n\n  // check the free list\n  mi_block_t* const block = page->free;\n  if mi_unlikely(block == NULL) {\n    return _mi_malloc_generic(heap, size, zero, 0);\n  }\n  mi_assert_internal(block != NULL && _mi_ptr_page(block) == page);\n\n  // pop from the free list\n  page->free = mi_block_next(page, block);\n  page->used++;\n  mi_assert_internal(page->free == NULL || _mi_ptr_page(page->free) == page);\n  mi_assert_internal(page->block_size < MI_MAX_ALIGN_SIZE || _mi_is_aligned(block, MI_MAX_ALIGN_SIZE));\n\n  #if MI_DEBUG>3\n  if (page->free_is_zero && size > sizeof(*block)) {\n    mi_assert_expensive(mi_mem_is_zero(block+1,size - sizeof(*block)));\n  }\n  #endif\n\n  // allow use of the block internally\n  // note: when tracking we need to avoid ever touching the MI_PADDING since\n  // that is tracked by valgrind etc. as non-accessible (through the red-zone, see `mimalloc/track.h`)\n  mi_track_mem_undefined(block, mi_page_usable_block_size(page));\n\n  // zero the block? note: we need to zero the full block size (issue #63)\n  if mi_unlikely(zero) {\n    mi_assert_internal(page->block_size != 0); // do not call with zero'ing for huge blocks (see _mi_malloc_generic)\n    mi_assert_internal(!mi_page_is_huge(page));\n    #if MI_PADDING\n    mi_assert_internal(page->block_size >= MI_PADDING_SIZE);\n    #endif\n    if (page->free_is_zero) {\n      block->next = 0;\n      mi_track_mem_defined(block, page->block_size - MI_PADDING_SIZE);\n    }\n    else {\n      _mi_memzero_aligned(block, page->block_size - MI_PADDING_SIZE);\n    }\n  }\n\n  #if (MI_DEBUG>0) && !MI_TRACK_ENABLED && !MI_TSAN\n  if (!zero && !mi_page_is_huge(page)) {\n    memset(block, MI_DEBUG_UNINIT, mi_page_usable_block_size(page));\n  }\n  #elif (MI_SECURE!=0)\n  if (!zero) { block->next = 0; } // don't leak internal data\n  #endif\n\n  #if (MI_STAT>0)\n  const size_t bsize = mi_page_usable_block_size(page);\n  if (bsize <= MI_MEDIUM_OBJ_SIZE_MAX) {\n    mi_heap_stat_increase(heap, malloc_normal, bsize);\n    mi_heap_stat_counter_increase(heap, malloc_normal_count, 1);\n    #if (MI_STAT>1)\n    const size_t bin = _mi_bin(bsize);\n    mi_heap_stat_increase(heap, malloc_bins[bin], 1);\n    #endif\n  }\n  #endif\n\n  #if MI_PADDING // && !MI_TRACK_ENABLED\n    mi_padding_t* const padding = (mi_padding_t*)((uint8_t*)block + mi_page_usable_block_size(page));\n    ptrdiff_t delta = ((uint8_t*)padding - (uint8_t*)block - (size - MI_PADDING_SIZE));\n    #if (MI_DEBUG>=2)\n    mi_assert_internal(delta >= 0 && mi_page_usable_block_size(page) >= (size - MI_PADDING_SIZE + delta));\n    #endif\n    mi_track_mem_defined(padding,sizeof(mi_padding_t));  // note: re-enable since mi_page_usable_block_size may set noaccess\n    padding->canary = mi_ptr_encode_canary(page,block,page->keys);\n    padding->delta  = (uint32_t)(delta);\n    #if MI_PADDING_CHECK\n    if (!mi_page_is_huge(page)) {\n      uint8_t* fill = (uint8_t*)padding - delta;\n      const size_t maxpad = (delta > MI_MAX_ALIGN_SIZE ? MI_MAX_ALIGN_SIZE : delta); // set at most N initial padding bytes\n      for (size_t i = 0; i < maxpad; i++) { fill[i] = MI_DEBUG_PADDING; }\n    }\n    #endif\n  #endif\n\n  return block;\n}\n\n// extra entries for improved efficiency in `alloc-aligned.c`.\nextern void* _mi_page_malloc(mi_heap_t* heap, mi_page_t* page, size_t size) mi_attr_noexcept {\n  return _mi_page_malloc_zero(heap,page,size,false);\n}\nextern void* _mi_page_malloc_zeroed(mi_heap_t* heap, mi_page_t* page, size_t size) mi_attr_noexcept {\n  return _mi_page_malloc_zero(heap,page,size,true);\n}\n\n#if MI_GUARDED\nmi_decl_restrict void* _mi_heap_malloc_guarded(mi_heap_t* heap, size_t size, bool zero) mi_attr_noexcept;\n#endif\n\nstatic inline mi_decl_restrict void* mi_heap_malloc_small_zero(mi_heap_t* heap, size_t size, bool zero) mi_attr_noexcept {\n  mi_assert(heap != NULL);\n  mi_assert(size <= MI_SMALL_SIZE_MAX);\n  #if MI_DEBUG\n  const uintptr_t tid = _mi_thread_id();\n  mi_assert(heap->thread_id == 0 || heap->thread_id == tid); // heaps are thread local\n  #endif\n  #if (MI_PADDING || MI_GUARDED)\n  if (size == 0) { size = sizeof(void*); }\n  #endif\n  #if MI_GUARDED\n  if (mi_heap_malloc_use_guarded(heap,size)) {\n    return _mi_heap_malloc_guarded(heap, size, zero);\n  }\n  #endif\n\n  // get page in constant time, and allocate from it\n  mi_page_t* page = _mi_heap_get_free_small_page(heap, size + MI_PADDING_SIZE);\n  void* const p = _mi_page_malloc_zero(heap, page, size + MI_PADDING_SIZE, zero);\n  mi_track_malloc(p,size,zero);\n\n  #if MI_STAT>1\n  if (p != NULL) {\n    if (!mi_heap_is_initialized(heap)) { heap = mi_prim_get_default_heap(); }\n    mi_heap_stat_increase(heap, malloc_requested, mi_usable_size(p));\n  }\n  #endif\n  #if MI_DEBUG>3\n  if (p != NULL && zero) {\n    mi_assert_expensive(mi_mem_is_zero(p, size));\n  }\n  #endif\n  return p;\n}\n\n// allocate a small block\nmi_decl_nodiscard extern inline mi_decl_restrict void* mi_heap_malloc_small(mi_heap_t* heap, size_t size) mi_attr_noexcept {\n  return mi_heap_malloc_small_zero(heap, size, false);\n}\n\nmi_decl_nodiscard extern inline mi_decl_restrict void* mi_malloc_small(size_t size) mi_attr_noexcept {\n  return mi_heap_malloc_small(mi_prim_get_default_heap(), size);\n}\n\n// The main allocation function\nextern inline void* _mi_heap_malloc_zero_ex(mi_heap_t* heap, size_t size, bool zero, size_t huge_alignment) mi_attr_noexcept {\n  // fast path for small objects\n  if mi_likely(size <= MI_SMALL_SIZE_MAX) {\n    mi_assert_internal(huge_alignment == 0);\n    return mi_heap_malloc_small_zero(heap, size, zero);\n  }\n  #if MI_GUARDED\n  else if (huge_alignment==0 && mi_heap_malloc_use_guarded(heap,size)) {\n    return _mi_heap_malloc_guarded(heap, size, zero);\n  }\n  #endif\n  else {\n    // regular allocation\n    mi_assert(heap!=NULL);\n    mi_assert(heap->thread_id == 0 || heap->thread_id == _mi_thread_id());   // heaps are thread local\n    void* const p = _mi_malloc_generic(heap, size + MI_PADDING_SIZE, zero, huge_alignment);  // note: size can overflow but it is detected in malloc_generic\n    mi_track_malloc(p,size,zero);\n\n    #if MI_STAT>1\n    if (p != NULL) {\n      if (!mi_heap_is_initialized(heap)) { heap = mi_prim_get_default_heap(); }\n      mi_heap_stat_increase(heap, malloc_requested, mi_usable_size(p));\n    }\n    #endif\n    #if MI_DEBUG>3\n    if (p != NULL && zero) {\n      mi_assert_expensive(mi_mem_is_zero(p, size));\n    }\n    #endif\n    return p;\n  }\n}\n\nextern inline void* _mi_heap_malloc_zero(mi_heap_t* heap, size_t size, bool zero) mi_attr_noexcept {\n  return _mi_heap_malloc_zero_ex(heap, size, zero, 0);\n}\n\nmi_decl_nodiscard extern inline mi_decl_restrict void* mi_heap_malloc(mi_heap_t* heap, size_t size) mi_attr_noexcept {\n  return _mi_heap_malloc_zero(heap, size, false);\n}\n\nmi_decl_nodiscard extern inline mi_decl_restrict void* mi_malloc(size_t size) mi_attr_noexcept {\n  return mi_heap_malloc(mi_prim_get_default_heap(), size);\n}\n\n// zero initialized small block\nmi_decl_nodiscard mi_decl_restrict void* mi_zalloc_small(size_t size) mi_attr_noexcept {\n  return mi_heap_malloc_small_zero(mi_prim_get_default_heap(), size, true);\n}\n\nmi_decl_nodiscard extern inline mi_decl_restrict void* mi_heap_zalloc(mi_heap_t* heap, size_t size) mi_attr_noexcept {\n  return _mi_heap_malloc_zero(heap, size, true);\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_zalloc(size_t size) mi_attr_noexcept {\n  return mi_heap_zalloc(mi_prim_get_default_heap(),size);\n}\n\n\nmi_decl_nodiscard extern inline mi_decl_restrict void* mi_heap_calloc(mi_heap_t* heap, size_t count, size_t size) mi_attr_noexcept {\n  size_t total;\n  if (mi_count_size_overflow(count,size,&total)) return NULL;\n  return mi_heap_zalloc(heap,total);\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_calloc(size_t count, size_t size) mi_attr_noexcept {\n  return mi_heap_calloc(mi_prim_get_default_heap(),count,size);\n}\n\n// Uninitialized `calloc`\nmi_decl_nodiscard extern mi_decl_restrict void* mi_heap_mallocn(mi_heap_t* heap, size_t count, size_t size) mi_attr_noexcept {\n  size_t total;\n  if (mi_count_size_overflow(count, size, &total)) return NULL;\n  return mi_heap_malloc(heap, total);\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_mallocn(size_t count, size_t size) mi_attr_noexcept {\n  return mi_heap_mallocn(mi_prim_get_default_heap(),count,size);\n}\n\n// Expand (or shrink) in place (or fail)\nvoid* mi_expand(void* p, size_t newsize) mi_attr_noexcept {\n  #if MI_PADDING\n  // we do not shrink/expand with padding enabled\n  MI_UNUSED(p); MI_UNUSED(newsize);\n  return NULL;\n  #else\n  if (p == NULL) return NULL;\n  const size_t size = _mi_usable_size(p,\"mi_expand\");\n  if (newsize > size) return NULL;\n  return p; // it fits\n  #endif\n}\n\nvoid* _mi_heap_realloc_zero(mi_heap_t* heap, void* p, size_t newsize, bool zero) mi_attr_noexcept {\n  // if p == NULL then behave as malloc.\n  // else if size == 0 then reallocate to a zero-sized block (and don't return NULL, just as mi_malloc(0)).\n  // (this means that returning NULL always indicates an error, and `p` will not have been freed in that case.)\n  const size_t size = _mi_usable_size(p,\"mi_realloc\"); // also works if p == NULL (with size 0)\n  if mi_unlikely(newsize <= size && newsize >= (size / 2) && newsize > 0) {  // note: newsize must be > 0 or otherwise we return NULL for realloc(NULL,0)\n    mi_assert_internal(p!=NULL);\n    // todo: do not track as the usable size is still the same in the free; adjust potential padding?\n    // mi_track_resize(p,size,newsize)\n    // if (newsize < size) { mi_track_mem_noaccess((uint8_t*)p + newsize, size - newsize); }\n    return p;  // reallocation still fits and not more than 50% waste\n  }\n  void* newp = mi_heap_malloc(heap,newsize);\n  if mi_likely(newp != NULL) {\n    if (zero && newsize > size) {\n      // also set last word in the previous allocation to zero to ensure any padding is zero-initialized\n      const size_t start = (size >= sizeof(intptr_t) ? size - sizeof(intptr_t) : 0);\n      _mi_memzero((uint8_t*)newp + start, newsize - start);\n    }\n    else if (newsize == 0) {\n      ((uint8_t*)newp)[0] = 0; // work around for applications that expect zero-reallocation to be zero initialized (issue #725)\n    }\n    if mi_likely(p != NULL) {\n      const size_t copysize = (newsize > size ? size : newsize);\n      mi_track_mem_defined(p,copysize);  // _mi_useable_size may be too large for byte precise memory tracking..\n      _mi_memcpy(newp, p, copysize);\n      mi_free(p); // only free the original pointer if successful\n    }\n  }\n  return newp;\n}\n\nmi_decl_nodiscard void* mi_heap_realloc(mi_heap_t* heap, void* p, size_t newsize) mi_attr_noexcept {\n  return _mi_heap_realloc_zero(heap, p, newsize, false);\n}\n\nmi_decl_nodiscard void* mi_heap_reallocn(mi_heap_t* heap, void* p, size_t count, size_t size) mi_attr_noexcept {\n  size_t total;\n  if (mi_count_size_overflow(count, size, &total)) return NULL;\n  return mi_heap_realloc(heap, p, total);\n}\n\n\n// Reallocate but free `p` on errors\nmi_decl_nodiscard void* mi_heap_reallocf(mi_heap_t* heap, void* p, size_t newsize) mi_attr_noexcept {\n  void* newp = mi_heap_realloc(heap, p, newsize);\n  if (newp==NULL && p!=NULL) mi_free(p);\n  return newp;\n}\n\nmi_decl_nodiscard void* mi_heap_rezalloc(mi_heap_t* heap, void* p, size_t newsize) mi_attr_noexcept {\n  return _mi_heap_realloc_zero(heap, p, newsize, true);\n}\n\nmi_decl_nodiscard void* mi_heap_recalloc(mi_heap_t* heap, void* p, size_t count, size_t size) mi_attr_noexcept {\n  size_t total;\n  if (mi_count_size_overflow(count, size, &total)) return NULL;\n  return mi_heap_rezalloc(heap, p, total);\n}\n\n\nmi_decl_nodiscard void* mi_realloc(void* p, size_t newsize) mi_attr_noexcept {\n  return mi_heap_realloc(mi_prim_get_default_heap(),p,newsize);\n}\n\nmi_decl_nodiscard void* mi_reallocn(void* p, size_t count, size_t size) mi_attr_noexcept {\n  return mi_heap_reallocn(mi_prim_get_default_heap(),p,count,size);\n}\n\n// Reallocate but free `p` on errors\nmi_decl_nodiscard void* mi_reallocf(void* p, size_t newsize) mi_attr_noexcept {\n  return mi_heap_reallocf(mi_prim_get_default_heap(),p,newsize);\n}\n\nmi_decl_nodiscard void* mi_rezalloc(void* p, size_t newsize) mi_attr_noexcept {\n  return mi_heap_rezalloc(mi_prim_get_default_heap(), p, newsize);\n}\n\nmi_decl_nodiscard void* mi_recalloc(void* p, size_t count, size_t size) mi_attr_noexcept {\n  return mi_heap_recalloc(mi_prim_get_default_heap(), p, count, size);\n}\n\n\n\n// ------------------------------------------------------\n// strdup, strndup, and realpath\n// ------------------------------------------------------\n\n// `strdup` using mi_malloc\nmi_decl_nodiscard mi_decl_restrict char* mi_heap_strdup(mi_heap_t* heap, const char* s) mi_attr_noexcept {\n  if (s == NULL) return NULL;\n  size_t len = _mi_strlen(s);\n  char* t = (char*)mi_heap_malloc(heap,len+1);\n  if (t == NULL) return NULL;\n  _mi_memcpy(t, s, len);\n  t[len] = 0;\n  return t;\n}\n\nmi_decl_nodiscard mi_decl_restrict char* mi_strdup(const char* s) mi_attr_noexcept {\n  return mi_heap_strdup(mi_prim_get_default_heap(), s);\n}\n\n// `strndup` using mi_malloc\nmi_decl_nodiscard mi_decl_restrict char* mi_heap_strndup(mi_heap_t* heap, const char* s, size_t n) mi_attr_noexcept {\n  if (s == NULL) return NULL;\n  const size_t len = _mi_strnlen(s,n);  // len <= n\n  char* t = (char*)mi_heap_malloc(heap, len+1);\n  if (t == NULL) return NULL;\n  _mi_memcpy(t, s, len);\n  t[len] = 0;\n  return t;\n}\n\nmi_decl_nodiscard mi_decl_restrict char* mi_strndup(const char* s, size_t n) mi_attr_noexcept {\n  return mi_heap_strndup(mi_prim_get_default_heap(),s,n);\n}\n\n#ifndef __wasi__\n// `realpath` using mi_malloc\n#ifdef _WIN32\n#ifndef PATH_MAX\n#define PATH_MAX MAX_PATH\n#endif\n\nmi_decl_nodiscard mi_decl_restrict char* mi_heap_realpath(mi_heap_t* heap, const char* fname, char* resolved_name) mi_attr_noexcept {\n  // todo: use GetFullPathNameW to allow longer file names\n  char buf[PATH_MAX];\n  DWORD res = GetFullPathNameA(fname, PATH_MAX, (resolved_name == NULL ? buf : resolved_name), NULL);\n  if (res == 0) {\n    errno = GetLastError(); return NULL;\n  }\n  else if (res > PATH_MAX) {\n    errno = EINVAL; return NULL;\n  }\n  else if (resolved_name != NULL) {\n    return resolved_name;\n  }\n  else {\n    return mi_heap_strndup(heap, buf, PATH_MAX);\n  }\n}\n#else\n/*\n#include <unistd.h>  // pathconf\nstatic size_t mi_path_max(void) {\n  static size_t path_max = 0;\n  if (path_max <= 0) {\n    long m = pathconf(\"/\",_PC_PATH_MAX);\n    if (m <= 0) path_max = 4096;      // guess\n    else if (m < 256) path_max = 256; // at least 256\n    else path_max = m;\n  }\n  return path_max;\n}\n*/\nchar* mi_heap_realpath(mi_heap_t* heap, const char* fname, char* resolved_name) mi_attr_noexcept {\n  if (resolved_name != NULL) {\n    return realpath(fname,resolved_name);\n  }\n  else {\n    char* rname = realpath(fname, NULL);\n    if (rname == NULL) return NULL;\n    char* result = mi_heap_strdup(heap, rname);\n    mi_cfree(rname);  // use checked free (which may be redirected to our free but that's ok)\n    // note: with ASAN realpath is intercepted and mi_cfree may leak the returned pointer :-(\n    return result;\n  }\n  /*\n    const size_t n  = mi_path_max();\n    char* buf = (char*)mi_malloc(n+1);\n    if (buf == NULL) {\n      errno = ENOMEM;\n      return NULL;\n    }\n    char* rname  = realpath(fname,buf);\n    char* result = mi_heap_strndup(heap,rname,n); // ok if `rname==NULL`\n    mi_free(buf);\n    return result;\n  }\n  */\n}\n#endif\n\nmi_decl_nodiscard mi_decl_restrict char* mi_realpath(const char* fname, char* resolved_name) mi_attr_noexcept {\n  return mi_heap_realpath(mi_prim_get_default_heap(),fname,resolved_name);\n}\n#endif\n\n/*-------------------------------------------------------\nC++ new and new_aligned\nThe standard requires calling into `get_new_handler` and\nthrowing the bad_alloc exception on failure. If we compile\nwith a C++ compiler we can implement this precisely. If we\nuse a C compiler we cannot throw a `bad_alloc` exception\nbut we call `exit` instead (i.e. not returning).\n-------------------------------------------------------*/\n\n#ifdef __cplusplus\n#include <new>\nstatic bool mi_try_new_handler(bool nothrow) {\n  #if defined(_MSC_VER) || (__cplusplus >= 201103L)\n    std::new_handler h = std::get_new_handler();\n  #else\n    std::new_handler h = std::set_new_handler();\n    std::set_new_handler(h);\n  #endif\n  if (h==NULL) {\n    _mi_error_message(ENOMEM, \"out of memory in 'new'\");\n    #if defined(_CPPUNWIND) || defined(__cpp_exceptions)  // exceptions are not always enabled\n    if (!nothrow) {\n      throw std::bad_alloc();\n    }\n    #else\n    MI_UNUSED(nothrow);\n    #endif\n    return false;\n  }\n  else {\n    h();\n    return true;\n  }\n}\n#else\ntypedef void (*std_new_handler_t)(void);\n\n#if (defined(__GNUC__) || (defined(__clang__) && !defined(_MSC_VER)))  // exclude clang-cl, see issue #631\nstd_new_handler_t __attribute__((weak)) _ZSt15get_new_handlerv(void) {\n  return NULL;\n}\nstatic std_new_handler_t mi_get_new_handler(void) {\n  return _ZSt15get_new_handlerv();\n}\n#else\n// note: on windows we could dynamically link to `?get_new_handler@std@@YAP6AXXZXZ`.\nstatic std_new_handler_t mi_get_new_handler() {\n  return NULL;\n}\n#endif\n\nstatic bool mi_try_new_handler(bool nothrow) {\n  std_new_handler_t h = mi_get_new_handler();\n  if (h==NULL) {\n    _mi_error_message(ENOMEM, \"out of memory in 'new'\");\n    if (!nothrow) {\n      abort();  // cannot throw in plain C, use abort\n    }\n    return false;\n  }\n  else {\n    h();\n    return true;\n  }\n}\n#endif\n\nmi_decl_export mi_decl_noinline void* mi_heap_try_new(mi_heap_t* heap, size_t size, bool nothrow ) {\n  void* p = NULL;\n  while(p == NULL && mi_try_new_handler(nothrow)) {\n    p = mi_heap_malloc(heap,size);\n  }\n  return p;\n}\n\nstatic mi_decl_noinline void* mi_try_new(size_t size, bool nothrow) {\n  return mi_heap_try_new(mi_prim_get_default_heap(), size, nothrow);\n}\n\n\nmi_decl_nodiscard mi_decl_restrict void* mi_heap_alloc_new(mi_heap_t* heap, size_t size) {\n  void* p = mi_heap_malloc(heap,size);\n  if mi_unlikely(p == NULL) return mi_heap_try_new(heap, size, false);\n  return p;\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_new(size_t size) {\n  return mi_heap_alloc_new(mi_prim_get_default_heap(), size);\n}\n\n\nmi_decl_nodiscard mi_decl_restrict void* mi_heap_alloc_new_n(mi_heap_t* heap, size_t count, size_t size) {\n  size_t total;\n  if mi_unlikely(mi_count_size_overflow(count, size, &total)) {\n    mi_try_new_handler(false);  // on overflow we invoke the try_new_handler once to potentially throw std::bad_alloc\n    return NULL;\n  }\n  else {\n    return mi_heap_alloc_new(heap,total);\n  }\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_new_n(size_t count, size_t size) {\n  return mi_heap_alloc_new_n(mi_prim_get_default_heap(), count, size);\n}\n\n\nmi_decl_nodiscard mi_decl_restrict void* mi_new_nothrow(size_t size) mi_attr_noexcept {\n  void* p = mi_malloc(size);\n  if mi_unlikely(p == NULL) return mi_try_new(size, true);\n  return p;\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_new_aligned(size_t size, size_t alignment) {\n  void* p;\n  do {\n    p = mi_malloc_aligned(size, alignment);\n  }\n  while(p == NULL && mi_try_new_handler(false));\n  return p;\n}\n\nmi_decl_nodiscard mi_decl_restrict void* mi_new_aligned_nothrow(size_t size, size_t alignment) mi_attr_noexcept {\n  void* p;\n  do {\n    p = mi_malloc_aligned(size, alignment);\n  }\n  while(p == NULL && mi_try_new_handler(true));\n  return p;\n}\n\nmi_decl_nodiscard void* mi_new_realloc(void* p, size_t newsize) {\n  void* q;\n  do {\n    q = mi_realloc(p, newsize);\n  } while (q == NULL && mi_try_new_handler(false));\n  return q;\n}\n\nmi_decl_nodiscard void* mi_new_reallocn(void* p, size_t newcount, size_t size) {\n  size_t total;\n  if mi_unlikely(mi_count_size_overflow(newcount, size, &total)) {\n    mi_try_new_handler(false);  // on overflow we invoke the try_new_handler once to potentially throw std::bad_alloc\n    return NULL;\n  }\n  else {\n    return mi_new_realloc(p, total);\n  }\n}\n\n#if MI_GUARDED\n// We always allocate a guarded allocation at an offset (`mi_page_has_aligned` will be true).\n// We then set the first word of the block to `0` for regular offset aligned allocations (in `alloc-aligned.c`)\n// and the first word to `~0` for guarded allocations to have a correct `mi_usable_size`\n\nstatic void* mi_block_ptr_set_guarded(mi_block_t* block, size_t obj_size) {\n  // TODO: we can still make padding work by moving it out of the guard page area\n  mi_page_t* const page = _mi_ptr_page(block);\n  mi_page_set_has_aligned(page, true);\n  block->next = MI_BLOCK_TAG_GUARDED;\n\n  // set guard page at the end of the block\n  mi_segment_t* const segment = _mi_page_segment(page);\n  const size_t block_size = mi_page_block_size(page);  // must use `block_size` to match `mi_free_local`\n  const size_t os_page_size = _mi_os_page_size();\n  mi_assert_internal(block_size >= obj_size + os_page_size + sizeof(mi_block_t));\n  if (block_size < obj_size + os_page_size + sizeof(mi_block_t)) {\n    // should never happen\n    mi_free(block);\n    return NULL;\n  }\n  uint8_t* guard_page = (uint8_t*)block + block_size - os_page_size;\n  mi_assert_internal(_mi_is_aligned(guard_page, os_page_size));\n  if (segment->allow_decommit && _mi_is_aligned(guard_page, os_page_size)) {\n    _mi_os_protect(guard_page, os_page_size);\n  }\n  else {\n    _mi_warning_message(\"unable to set a guard page behind an object due to pinned memory (large OS pages?) (object %p of size %zu)\\n\", block, block_size);\n  }\n\n  // align pointer just in front of the guard page\n  size_t offset = block_size - os_page_size - obj_size;\n  mi_assert_internal(offset > sizeof(mi_block_t));\n  if (offset > MI_BLOCK_ALIGNMENT_MAX) {\n    // give up to place it right in front of the guard page if the offset is too large for unalignment\n    offset = MI_BLOCK_ALIGNMENT_MAX;\n  }\n  void* p = (uint8_t*)block + offset;\n  mi_track_align(block, p, offset, obj_size);\n  mi_track_mem_defined(block, sizeof(mi_block_t));\n  return p;\n}\n\nmi_decl_restrict void* _mi_heap_malloc_guarded(mi_heap_t* heap, size_t size, bool zero) mi_attr_noexcept\n{\n  #if defined(MI_PADDING_SIZE)\n  mi_assert(MI_PADDING_SIZE==0);\n  #endif\n  // allocate multiple of page size ending in a guard page\n  // ensure minimal alignment requirement?\n  const size_t os_page_size = _mi_os_page_size();\n  const size_t obj_size = (mi_option_is_enabled(mi_option_guarded_precise) ? size : _mi_align_up(size, MI_MAX_ALIGN_SIZE));\n  const size_t bsize    = _mi_align_up(_mi_align_up(obj_size, MI_MAX_ALIGN_SIZE) + sizeof(mi_block_t), MI_MAX_ALIGN_SIZE);\n  const size_t req_size = _mi_align_up(bsize + os_page_size, os_page_size);\n  mi_block_t* const block = (mi_block_t*)_mi_malloc_generic(heap, req_size, zero, 0 /* huge_alignment */);\n  if (block==NULL) return NULL;\n  void* const p   = mi_block_ptr_set_guarded(block, obj_size);\n\n  // stats\n  mi_track_malloc(p, size, zero);\n  if (p != NULL) {\n    if (!mi_heap_is_initialized(heap)) { heap = mi_prim_get_default_heap(); }\n    #if MI_STAT>1\n    mi_heap_stat_increase(heap, malloc_requested, mi_usable_size(p));\n    #endif\n    _mi_stat_counter_increase(&heap->tld->stats.malloc_guarded_count, 1);\n  }\n  #if MI_DEBUG>3\n  if (p != NULL && zero) {\n    mi_assert_expensive(mi_mem_is_zero(p, size));\n  }\n  #endif\n  return p;\n}\n#endif\n\n// ------------------------------------------------------\n// ensure explicit external inline definitions are emitted!\n// ------------------------------------------------------\n\n#ifdef __cplusplus\nvoid* _mi_externs[] = {\n  (void*)&_mi_page_malloc,\n  (void*)&_mi_page_malloc_zero,\n  (void*)&_mi_heap_malloc_zero,\n  (void*)&_mi_heap_malloc_zero_ex,\n  (void*)&mi_malloc,\n  (void*)&mi_malloc_small,\n  (void*)&mi_zalloc_small,\n  (void*)&mi_heap_malloc,\n  (void*)&mi_heap_zalloc,\n  (void*)&mi_heap_malloc_small,\n  // (void*)&mi_heap_alloc_new,\n  // (void*)&mi_heap_alloc_new_n\n};\n#endif\n"
  },
  {
    "path": "third-party/mimalloc/src/arena-abandon.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2019-2024, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n#if !defined(MI_IN_ARENA_C)\n#error \"this file should be included from 'arena.c' (so mi_arena_t is visible)\"\n// add includes help an IDE\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"bitmap.h\"\n#endif\n\n// Minimal exports for arena-abandoned.\nsize_t      mi_arena_id_index(mi_arena_id_t id);\nmi_arena_t* mi_arena_from_index(size_t idx);\nsize_t      mi_arena_get_count(void);\nvoid*       mi_arena_block_start(mi_arena_t* arena, mi_bitmap_index_t bindex);\nbool        mi_arena_memid_indices(mi_memid_t memid, size_t* arena_index, mi_bitmap_index_t* bitmap_index);\n\n/* -----------------------------------------------------------\n  Abandoned blocks/segments:\n\n  _mi_arena_segment_clear_abandoned\n  _mi_arena_segment_mark_abandoned\n\n  This is used to atomically abandon/reclaim segments\n  (and crosses the arena API but it is convenient to have here).\n\n  Abandoned segments still have live blocks; they get reclaimed\n  when a thread frees a block in it, or when a thread needs a fresh\n  segment.\n\n  Abandoned segments are atomically marked in the `block_abandoned`\n  bitmap of arenas. Any segments allocated outside arenas are put\n  in the sub-process `abandoned_os_list`. This list is accessed\n  using locks but this should be uncommon and generally uncontended.\n  Reclaim and visiting either scan through the `block_abandoned`\n  bitmaps of the arena's, or visit the `abandoned_os_list`\n\n  A potentially nicer design is to use arena's for everything\n  and perhaps have virtual arena's to map OS allocated memory\n  but this would lack the \"density\" of our current arena's. TBC.\n----------------------------------------------------------- */\n\n\n// reclaim a specific OS abandoned segment; `true` on success.\n// sets the thread_id.\nstatic bool mi_arena_segment_os_clear_abandoned(mi_segment_t* segment, bool take_lock) {\n  mi_assert(segment->memid.memkind != MI_MEM_ARENA);\n  // not in an arena, remove from list of abandoned os segments\n  mi_subproc_t* const subproc = segment->subproc;\n  if (take_lock && !mi_lock_try_acquire(&subproc->abandoned_os_lock)) {\n    return false;  // failed to acquire the lock, we just give up\n  }\n  // remove atomically from the abandoned os list (if possible!)\n  bool reclaimed = false;\n  mi_segment_t* const next = segment->abandoned_os_next;\n  mi_segment_t* const prev = segment->abandoned_os_prev;\n  if (next != NULL || prev != NULL || subproc->abandoned_os_list == segment) {\n    #if MI_DEBUG>3\n    // find ourselves in the abandoned list (and check the count)\n    bool found = false;\n    size_t count = 0;\n    for (mi_segment_t* current = subproc->abandoned_os_list; current != NULL; current = current->abandoned_os_next) {\n      if (current == segment) { found = true; }\n      count++;\n    }\n    mi_assert_internal(found);\n    mi_assert_internal(count == mi_atomic_load_relaxed(&subproc->abandoned_os_list_count));\n    #endif\n    // remove (atomically) from the list and reclaim\n    if (prev != NULL) { prev->abandoned_os_next = next; }\n    else { subproc->abandoned_os_list = next; }\n    if (next != NULL) { next->abandoned_os_prev = prev; }\n    else { subproc->abandoned_os_list_tail = prev; }\n    segment->abandoned_os_next = NULL;\n    segment->abandoned_os_prev = NULL;\n    mi_atomic_decrement_relaxed(&subproc->abandoned_count);\n    mi_atomic_decrement_relaxed(&subproc->abandoned_os_list_count);\n    if (take_lock) { // don't reset the thread_id when iterating\n      mi_atomic_store_release(&segment->thread_id, _mi_thread_id());\n    }\n    reclaimed = true;\n  }\n  if (take_lock) { mi_lock_release(&segment->subproc->abandoned_os_lock); }\n  return reclaimed;\n}\n\n// reclaim a specific abandoned segment; `true` on success.\n// sets the thread_id.\nbool _mi_arena_segment_clear_abandoned(mi_segment_t* segment) {\n  if mi_unlikely(segment->memid.memkind != MI_MEM_ARENA) {\n    return mi_arena_segment_os_clear_abandoned(segment, true /* take lock */);\n  }\n  // arena segment: use the blocks_abandoned bitmap.\n  size_t arena_idx;\n  size_t bitmap_idx;\n  mi_arena_memid_indices(segment->memid, &arena_idx, &bitmap_idx);\n  mi_arena_t* arena = mi_arena_from_index(arena_idx);\n  mi_assert_internal(arena != NULL);\n  // reclaim atomically\n  bool was_marked = _mi_bitmap_unclaim(arena->blocks_abandoned, arena->field_count, 1, bitmap_idx);\n  if (was_marked) {\n    mi_assert_internal(mi_atomic_load_acquire(&segment->thread_id) == 0);\n    mi_atomic_decrement_relaxed(&segment->subproc->abandoned_count);\n    mi_atomic_store_release(&segment->thread_id, _mi_thread_id());\n  }\n  // mi_assert_internal(was_marked);\n  mi_assert_internal(!was_marked || _mi_bitmap_is_claimed(arena->blocks_inuse, arena->field_count, 1, bitmap_idx));\n  //mi_assert_internal(arena->blocks_committed == NULL || _mi_bitmap_is_claimed(arena->blocks_committed, arena->field_count, 1, bitmap_idx));\n  return was_marked;\n}\n\n\n// mark a specific OS segment as abandoned\nstatic void mi_arena_segment_os_mark_abandoned(mi_segment_t* segment) {\n  mi_assert(segment->memid.memkind != MI_MEM_ARENA);\n  // not in an arena; we use a list of abandoned segments\n  mi_subproc_t* const subproc = segment->subproc;\n  mi_lock(&subproc->abandoned_os_lock) {\n    // push on the tail of the list (important for the visitor)\n    mi_segment_t* prev = subproc->abandoned_os_list_tail;\n    mi_assert_internal(prev == NULL || prev->abandoned_os_next == NULL);\n    mi_assert_internal(segment->abandoned_os_prev == NULL);\n    mi_assert_internal(segment->abandoned_os_next == NULL);\n    if (prev != NULL) { prev->abandoned_os_next = segment; }\n    else { subproc->abandoned_os_list = segment; }\n    subproc->abandoned_os_list_tail = segment;\n    segment->abandoned_os_prev = prev;\n    segment->abandoned_os_next = NULL;\n    mi_atomic_increment_relaxed(&subproc->abandoned_os_list_count);\n    mi_atomic_increment_relaxed(&subproc->abandoned_count);\n    // and release the lock\n  }\n  return;\n}\n\n// mark a specific segment as abandoned\n// clears the thread_id.\nvoid _mi_arena_segment_mark_abandoned(mi_segment_t* segment)\n{\n  mi_assert_internal(segment->used == segment->abandoned);\n  mi_atomic_store_release(&segment->thread_id, (uintptr_t)0);  // mark as abandoned for multi-thread free's\n  if mi_unlikely(segment->memid.memkind != MI_MEM_ARENA) {\n    mi_arena_segment_os_mark_abandoned(segment);\n    return;\n  }\n  // segment is in an arena, mark it in the arena `blocks_abandoned` bitmap\n  size_t arena_idx;\n  size_t bitmap_idx;\n  mi_arena_memid_indices(segment->memid, &arena_idx, &bitmap_idx);\n  mi_arena_t* arena = mi_arena_from_index(arena_idx);\n  mi_assert_internal(arena != NULL);\n  // set abandonment atomically\n  mi_subproc_t* const subproc = segment->subproc; // don't access the segment after setting it abandoned\n  const bool was_unmarked = _mi_bitmap_claim(arena->blocks_abandoned, arena->field_count, 1, bitmap_idx, NULL);\n  if (was_unmarked) { mi_atomic_increment_relaxed(&subproc->abandoned_count); }\n  mi_assert_internal(was_unmarked);\n  mi_assert_internal(_mi_bitmap_is_claimed(arena->blocks_inuse, arena->field_count, 1, bitmap_idx));\n}\n\n\n/* -----------------------------------------------------------\n  Iterate through the abandoned blocks/segments using a cursor.\n  This is used for reclaiming and abandoned block visiting.\n----------------------------------------------------------- */\n\n// start a cursor at a randomized arena\nvoid _mi_arena_field_cursor_init(mi_heap_t* heap, mi_subproc_t* subproc, bool visit_all, mi_arena_field_cursor_t* current) {\n  mi_assert_internal(heap == NULL || heap->tld->segments.subproc == subproc);\n  current->bitmap_idx = 0;\n  current->subproc = subproc;\n  current->visit_all = visit_all;\n  current->hold_visit_lock = false;\n  const size_t abandoned_count = mi_atomic_load_relaxed(&subproc->abandoned_count);\n  const size_t abandoned_list_count = mi_atomic_load_relaxed(&subproc->abandoned_os_list_count);\n  const size_t max_arena = mi_arena_get_count();\n  if (heap != NULL && heap->arena_id != _mi_arena_id_none()) {\n    // for a heap that is bound to one arena, only visit that arena\n    current->start = mi_arena_id_index(heap->arena_id);\n    current->end = current->start + 1;\n    current->os_list_count = 0;\n  }\n  else {\n    // otherwise visit all starting at a random location\n    if (abandoned_count > abandoned_list_count && max_arena > 0) {\n      current->start = (heap == NULL || max_arena == 0 ? 0 : (mi_arena_id_t)(_mi_heap_random_next(heap) % max_arena));\n      current->end = current->start + max_arena;\n    }\n    else {\n      current->start = 0;\n      current->end = 0;\n    }\n    current->os_list_count = abandoned_list_count; // max entries to visit in the os abandoned list\n  }\n  mi_assert_internal(current->start <= max_arena);\n}\n\nvoid _mi_arena_field_cursor_done(mi_arena_field_cursor_t* current) {\n  if (current->hold_visit_lock) {\n    mi_lock_release(&current->subproc->abandoned_os_visit_lock);\n    current->hold_visit_lock = false;\n  }\n}\n\nstatic mi_segment_t* mi_arena_segment_clear_abandoned_at(mi_arena_t* arena, mi_subproc_t* subproc, mi_bitmap_index_t bitmap_idx) {\n  // try to reclaim an abandoned segment in the arena atomically\n  if (!_mi_bitmap_unclaim(arena->blocks_abandoned, arena->field_count, 1, bitmap_idx)) return NULL;\n  mi_assert_internal(_mi_bitmap_is_claimed(arena->blocks_inuse, arena->field_count, 1, bitmap_idx));\n  mi_segment_t* segment = (mi_segment_t*)mi_arena_block_start(arena, bitmap_idx);\n  mi_assert_internal(mi_atomic_load_relaxed(&segment->thread_id) == 0);\n  // check that the segment belongs to our sub-process\n  // note: this is the reason we need the `abandoned_visit` lock in the case abandoned visiting is enabled.\n  //  without the lock an abandoned visit may otherwise fail to visit all abandoned segments in the sub-process.\n  //  for regular reclaim it is fine to miss one sometimes so without abandoned visiting we don't need the `abandoned_visit` lock.\n  if (segment->subproc != subproc) {\n    // it is from another sub-process, re-mark it and continue searching\n    const bool was_zero = _mi_bitmap_claim(arena->blocks_abandoned, arena->field_count, 1, bitmap_idx, NULL);\n    mi_assert_internal(was_zero); MI_UNUSED(was_zero);\n    return NULL;\n  }\n  else {\n    // success, we unabandoned a segment in our sub-process\n    mi_atomic_decrement_relaxed(&subproc->abandoned_count);\n    return segment;\n  }\n}\n\nstatic mi_segment_t* mi_arena_segment_clear_abandoned_next_field(mi_arena_field_cursor_t* previous) {\n  const size_t max_arena = mi_arena_get_count();\n  size_t field_idx = mi_bitmap_index_field(previous->bitmap_idx);\n  size_t bit_idx = mi_bitmap_index_bit_in_field(previous->bitmap_idx);\n  // visit arena's (from the previous cursor)\n  for (; previous->start < previous->end; previous->start++, field_idx = 0, bit_idx = 0) {\n    // index wraps around\n    size_t arena_idx = (previous->start >= max_arena ? previous->start % max_arena : previous->start);\n    mi_arena_t* arena = mi_arena_from_index(arena_idx);\n    if (arena != NULL) {\n      bool has_lock = false;\n      // visit the abandoned fields (starting at previous_idx)\n      for (; field_idx < arena->field_count; field_idx++, bit_idx = 0) {\n        size_t field = mi_atomic_load_relaxed(&arena->blocks_abandoned[field_idx]);\n        if mi_unlikely(field != 0) { // skip zero fields quickly\n          // we only take the arena lock if there are actually abandoned segments present\n          if (!has_lock && mi_option_is_enabled(mi_option_visit_abandoned)) {\n            has_lock = (previous->visit_all ? (mi_lock_acquire(&arena->abandoned_visit_lock),true) : mi_lock_try_acquire(&arena->abandoned_visit_lock));\n            if (!has_lock) {\n              if (previous->visit_all) {\n                _mi_error_message(EFAULT, \"internal error: failed to visit all abandoned segments due to failure to acquire the visitor lock\");\n              }\n              // skip to next arena\n              break;\n            }\n          }\n          mi_assert_internal(has_lock || !mi_option_is_enabled(mi_option_visit_abandoned));\n          // visit each set bit in the field  (todo: maybe use `ctz` here?)\n          for (; bit_idx < MI_BITMAP_FIELD_BITS; bit_idx++) {\n            // pre-check if the bit is set\n            size_t mask = ((size_t)1 << bit_idx);\n            if mi_unlikely((field & mask) == mask) {\n              mi_bitmap_index_t bitmap_idx = mi_bitmap_index_create(field_idx, bit_idx);\n              mi_segment_t* const segment = mi_arena_segment_clear_abandoned_at(arena, previous->subproc, bitmap_idx);\n              if (segment != NULL) {\n                //mi_assert_internal(arena->blocks_committed == NULL || _mi_bitmap_is_claimed(arena->blocks_committed, arena->field_count, 1, bitmap_idx));\n                if (has_lock) { mi_lock_release(&arena->abandoned_visit_lock); }\n                previous->bitmap_idx = mi_bitmap_index_create_ex(field_idx, bit_idx + 1); // start at next one for the next iteration\n                return segment;\n              }\n            }\n          }\n        }\n      }\n      if (has_lock) { mi_lock_release(&arena->abandoned_visit_lock); }\n    }\n  }\n  return NULL;\n}\n\nstatic mi_segment_t* mi_arena_segment_clear_abandoned_next_list(mi_arena_field_cursor_t* previous) {\n  // go through the abandoned_os_list\n  // we only allow one thread per sub-process to do to visit guarded by the `abandoned_os_visit_lock`.\n  // The lock is released when the cursor is released.\n  if (!previous->hold_visit_lock) {\n    previous->hold_visit_lock = (previous->visit_all ? (mi_lock_acquire(&previous->subproc->abandoned_os_visit_lock),true)\n                                                     : mi_lock_try_acquire(&previous->subproc->abandoned_os_visit_lock));\n    if (!previous->hold_visit_lock) {\n      if (previous->visit_all) {\n        _mi_error_message(EFAULT, \"internal error: failed to visit all abandoned segments due to failure to acquire the OS visitor lock\");\n      }\n      return NULL; // we cannot get the lock, give up\n    }\n  }\n  // One list entry at a time\n  while (previous->os_list_count > 0) {\n    previous->os_list_count--;\n    mi_lock_acquire(&previous->subproc->abandoned_os_lock); // this could contend with concurrent OS block abandonment and reclaim from `free`\n    mi_segment_t* segment = previous->subproc->abandoned_os_list;\n    // pop from head of the list, a subsequent mark will push at the end (and thus we iterate through os_list_count entries)\n    if (segment == NULL || mi_arena_segment_os_clear_abandoned(segment, false /* we already have the lock */)) {\n      mi_lock_release(&previous->subproc->abandoned_os_lock);\n      return segment;\n    }\n    // already abandoned, try again\n    mi_lock_release(&previous->subproc->abandoned_os_lock);\n  }\n  // done\n  mi_assert_internal(previous->os_list_count == 0);\n  return NULL;\n}\n\n\n// reclaim abandoned segments\n// this does not set the thread id (so it appears as still abandoned)\nmi_segment_t* _mi_arena_segment_clear_abandoned_next(mi_arena_field_cursor_t* previous) {\n  if (previous->start < previous->end) {\n    // walk the arena\n    mi_segment_t* segment = mi_arena_segment_clear_abandoned_next_field(previous);\n    if (segment != NULL) { return segment; }\n  }\n  // no entries in the arena's anymore, walk the abandoned OS list\n  mi_assert_internal(previous->start == previous->end);\n  return mi_arena_segment_clear_abandoned_next_list(previous);\n}\n\n\nbool mi_abandoned_visit_blocks(mi_subproc_id_t subproc_id, int heap_tag, bool visit_blocks, mi_block_visit_fun* visitor, void* arg) {\n  // (unfortunately) the visit_abandoned option must be enabled from the start.\n  // This is to avoid taking locks if abandoned list visiting is not required (as for most programs)\n  if (!mi_option_is_enabled(mi_option_visit_abandoned)) {\n    _mi_error_message(EFAULT, \"internal error: can only visit abandoned blocks when MIMALLOC_VISIT_ABANDONED=ON\");\n    return false;\n  }\n  mi_arena_field_cursor_t current;\n  _mi_arena_field_cursor_init(NULL, _mi_subproc_from_id(subproc_id), true /* visit all (blocking) */, &current);\n  mi_segment_t* segment;\n  bool ok = true;\n  while (ok && (segment = _mi_arena_segment_clear_abandoned_next(&current)) != NULL) {\n    ok = _mi_segment_visit_blocks(segment, heap_tag, visit_blocks, visitor, arg);\n    _mi_arena_segment_mark_abandoned(segment);\n  }\n  _mi_arena_field_cursor_done(&current);\n  return ok;\n}\n"
  },
  {
    "path": "third-party/mimalloc/src/arena.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2019-2024, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n/* ----------------------------------------------------------------------------\n\"Arenas\" are fixed area's of OS memory from which we can allocate\nlarge blocks (>= MI_ARENA_MIN_BLOCK_SIZE, 4MiB).\nIn contrast to the rest of mimalloc, the arenas are shared between\nthreads and need to be accessed using atomic operations.\n\nArenas are also used to for huge OS page (1GiB) reservations or for reserving\nOS memory upfront which can be improve performance or is sometimes needed\non embedded devices. We can also employ this with WASI or `sbrk` systems\nto reserve large arenas upfront and be able to reuse the memory more effectively.\n\nThe arena allocation needs to be thread safe and we use an atomic bitmap to allocate.\n-----------------------------------------------------------------------------*/\n\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"mimalloc/atomic.h\"\n#include \"bitmap.h\"\n\n\n/* -----------------------------------------------------------\n  Arena allocation\n----------------------------------------------------------- */\n\n// A memory arena descriptor\ntypedef struct mi_arena_s {\n  mi_arena_id_t       id;                   // arena id; 0 for non-specific\n  mi_memid_t          memid;                // memid of the memory area\n  _Atomic(uint8_t*)   start;                // the start of the memory area\n  size_t              block_count;          // size of the area in arena blocks (of `MI_ARENA_BLOCK_SIZE`)\n  size_t              field_count;          // number of bitmap fields (where `field_count * MI_BITMAP_FIELD_BITS >= block_count`)\n  size_t              meta_size;            // size of the arena structure itself (including its bitmaps)\n  mi_memid_t          meta_memid;           // memid of the arena structure itself (OS or static allocation)\n  int                 numa_node;            // associated NUMA node\n  bool                exclusive;            // only allow allocations if specifically for this arena\n  bool                is_large;             // memory area consists of large- or huge OS pages (always committed)\n  mi_lock_t           abandoned_visit_lock; // lock is only used when abandoned segments are being visited\n  _Atomic(size_t)     search_idx;           // optimization to start the search for free blocks\n  _Atomic(mi_msecs_t) purge_expire;         // expiration time when blocks should be purged from `blocks_purge`.\n  \n  mi_bitmap_field_t*  blocks_dirty;         // are the blocks potentially non-zero?\n  mi_bitmap_field_t*  blocks_committed;     // are the blocks committed? (can be NULL for memory that cannot be decommitted)\n  mi_bitmap_field_t*  blocks_purge;         // blocks that can be (reset) decommitted. (can be NULL for memory that cannot be (reset) decommitted)\n  mi_bitmap_field_t*  blocks_abandoned;     // blocks that start with an abandoned segment. (This crosses API's but it is convenient to have here)\n  mi_bitmap_field_t   blocks_inuse[1];      // in-place bitmap of in-use blocks (of size `field_count`)\n  // do not add further fields here as the dirty, committed, purged, and abandoned bitmaps follow the inuse bitmap fields.\n} mi_arena_t;\n\n\n#define MI_ARENA_BLOCK_SIZE   (MI_SEGMENT_SIZE)        // 64MiB  (must be at least MI_SEGMENT_ALIGN)\n#define MI_ARENA_MIN_OBJ_SIZE (MI_ARENA_BLOCK_SIZE/2)  // 32MiB\n#define MI_MAX_ARENAS         (132)                    // Limited as the reservation exponentially increases (and takes up .bss)\n\n// The available arenas\nstatic mi_decl_cache_align _Atomic(mi_arena_t*) mi_arenas[MI_MAX_ARENAS];\nstatic mi_decl_cache_align _Atomic(size_t)      mi_arena_count; // = 0\nstatic mi_decl_cache_align _Atomic(int64_t)     mi_arenas_purge_expire; // set if there exist purgeable arenas\n\n#define MI_IN_ARENA_C\n#include \"arena-abandon.c\"\n#undef MI_IN_ARENA_C\n\n/* -----------------------------------------------------------\n  Arena id's\n  id = arena_index + 1\n----------------------------------------------------------- */\n\nsize_t mi_arena_id_index(mi_arena_id_t id) {\n  return (size_t)(id <= 0 ? MI_MAX_ARENAS : id - 1);\n}\n\nstatic mi_arena_id_t mi_arena_id_create(size_t arena_index) {\n  mi_assert_internal(arena_index < MI_MAX_ARENAS);\n  return (int)arena_index + 1;\n}\n\nmi_arena_id_t _mi_arena_id_none(void) {\n  return 0;\n}\n\nstatic bool mi_arena_id_is_suitable(mi_arena_id_t arena_id, bool arena_is_exclusive, mi_arena_id_t req_arena_id) {\n  return ((!arena_is_exclusive && req_arena_id == _mi_arena_id_none()) ||\n          (arena_id == req_arena_id));\n}\n\nbool _mi_arena_memid_is_suitable(mi_memid_t memid, mi_arena_id_t request_arena_id) {\n  if (memid.memkind == MI_MEM_ARENA) {\n    return mi_arena_id_is_suitable(memid.mem.arena.id, memid.mem.arena.is_exclusive, request_arena_id);\n  }\n  else {\n    return mi_arena_id_is_suitable(_mi_arena_id_none(), false, request_arena_id);\n  }\n}\n\nbool _mi_arena_memid_is_os_allocated(mi_memid_t memid) {\n  return (memid.memkind == MI_MEM_OS);\n}\n\nsize_t mi_arena_get_count(void) {\n  return mi_atomic_load_relaxed(&mi_arena_count);\n}\n\nmi_arena_t* mi_arena_from_index(size_t idx) {\n  mi_assert_internal(idx < mi_arena_get_count());\n  return mi_atomic_load_ptr_acquire(mi_arena_t, &mi_arenas[idx]);\n}\n\n\n/* -----------------------------------------------------------\n  Arena allocations get a (currently) 16-bit memory id where the\n  lower 8 bits are the arena id, and the upper bits the block index.\n----------------------------------------------------------- */\n\nstatic size_t mi_block_count_of_size(size_t size) {\n  return _mi_divide_up(size, MI_ARENA_BLOCK_SIZE);\n}\n\nstatic size_t mi_arena_block_size(size_t bcount) {\n  return (bcount * MI_ARENA_BLOCK_SIZE);\n}\n\nstatic size_t mi_arena_size(mi_arena_t* arena) {\n  return mi_arena_block_size(arena->block_count);\n}\n\nstatic mi_memid_t mi_memid_create_arena(mi_arena_id_t id, bool is_exclusive, mi_bitmap_index_t bitmap_index) {\n  mi_memid_t memid = _mi_memid_create(MI_MEM_ARENA);\n  memid.mem.arena.id = id;\n  memid.mem.arena.block_index = bitmap_index;\n  memid.mem.arena.is_exclusive = is_exclusive;\n  return memid;\n}\n\nbool mi_arena_memid_indices(mi_memid_t memid, size_t* arena_index, mi_bitmap_index_t* bitmap_index) {\n  mi_assert_internal(memid.memkind == MI_MEM_ARENA);\n  *arena_index = mi_arena_id_index(memid.mem.arena.id);\n  *bitmap_index = memid.mem.arena.block_index;\n  return memid.mem.arena.is_exclusive;\n}\n\n\n\n/* -----------------------------------------------------------\n  Special static area for mimalloc internal structures\n  to avoid OS calls (for example, for the arena metadata (~= 256b))\n----------------------------------------------------------- */\n\n#define MI_ARENA_STATIC_MAX  ((MI_INTPTR_SIZE/2)*MI_KiB)  // 4 KiB on 64-bit\n\nstatic mi_decl_cache_align uint8_t mi_arena_static[MI_ARENA_STATIC_MAX];  // must be cache aligned, see issue #895\nstatic mi_decl_cache_align _Atomic(size_t) mi_arena_static_top;\n\nstatic void* mi_arena_static_zalloc(size_t size, size_t alignment, mi_memid_t* memid) {\n  *memid = _mi_memid_none();\n  if (size == 0 || size > MI_ARENA_STATIC_MAX) return NULL;\n  const size_t toplow = mi_atomic_load_relaxed(&mi_arena_static_top);\n  if ((toplow + size) > MI_ARENA_STATIC_MAX) return NULL;\n\n  // try to claim space\n  if (alignment < MI_MAX_ALIGN_SIZE) { alignment = MI_MAX_ALIGN_SIZE; }\n  const size_t oversize = size + alignment - 1;\n  if (toplow + oversize > MI_ARENA_STATIC_MAX) return NULL;\n  const size_t oldtop = mi_atomic_add_acq_rel(&mi_arena_static_top, oversize);\n  size_t top = oldtop + oversize;\n  if (top > MI_ARENA_STATIC_MAX) {\n    // try to roll back, ok if this fails\n    mi_atomic_cas_strong_acq_rel(&mi_arena_static_top, &top, oldtop);\n    return NULL;\n  }\n\n  // success\n  *memid = _mi_memid_create(MI_MEM_STATIC);\n  memid->initially_zero = true;\n  const size_t start = _mi_align_up(oldtop, alignment);\n  uint8_t* const p = &mi_arena_static[start];\n  _mi_memzero_aligned(p, size);\n  return p;\n}\n\nvoid* _mi_arena_meta_zalloc(size_t size, mi_memid_t* memid) {\n  *memid = _mi_memid_none();\n\n  // try static\n  void* p = mi_arena_static_zalloc(size, MI_MAX_ALIGN_SIZE, memid);\n  if (p != NULL) return p;\n\n  // or fall back to the OS\n  p = _mi_os_alloc(size, memid);\n  if (p == NULL) return NULL;\n\n  // zero the OS memory if needed\n  if (!memid->initially_zero) {\n    _mi_memzero_aligned(p, size);\n    memid->initially_zero = true;\n  }\n  return p;\n}\n\nvoid _mi_arena_meta_free(void* p, mi_memid_t memid, size_t size) {\n  if (mi_memkind_is_os(memid.memkind)) {\n    _mi_os_free(p, size, memid);\n  }\n  else {\n    mi_assert(memid.memkind == MI_MEM_STATIC);\n  }\n}\n\nvoid* mi_arena_block_start(mi_arena_t* arena, mi_bitmap_index_t bindex) {\n  return (arena->start + mi_arena_block_size(mi_bitmap_index_bit(bindex)));\n}\n\n\n/* -----------------------------------------------------------\n  Thread safe allocation in an arena\n----------------------------------------------------------- */\n\n// claim the `blocks_inuse` bits\nstatic bool mi_arena_try_claim(mi_arena_t* arena, size_t blocks, mi_bitmap_index_t* bitmap_idx)\n{\n  size_t idx = 0; // mi_atomic_load_relaxed(&arena->search_idx);  // start from last search; ok to be relaxed as the exact start does not matter\n  if (_mi_bitmap_try_find_from_claim_across(arena->blocks_inuse, arena->field_count, idx, blocks, bitmap_idx)) {\n    mi_atomic_store_relaxed(&arena->search_idx, mi_bitmap_index_field(*bitmap_idx));  // start search from found location next time around\n    return true;\n  };\n  return false;\n}\n\n\n/* -----------------------------------------------------------\n  Arena Allocation\n----------------------------------------------------------- */\n\nstatic mi_decl_noinline void* mi_arena_try_alloc_at(mi_arena_t* arena, size_t arena_index, size_t needed_bcount,\n                                                    bool commit, mi_memid_t* memid)\n{\n  MI_UNUSED(arena_index);\n  mi_assert_internal(mi_arena_id_index(arena->id) == arena_index);\n\n  mi_bitmap_index_t bitmap_index;\n  if (!mi_arena_try_claim(arena, needed_bcount, &bitmap_index)) return NULL;\n\n  // claimed it!\n  void* p = mi_arena_block_start(arena, bitmap_index);\n  *memid = mi_memid_create_arena(arena->id, arena->exclusive, bitmap_index);\n  memid->is_pinned = arena->memid.is_pinned;\n\n  // none of the claimed blocks should be scheduled for a decommit\n  if (arena->blocks_purge != NULL) {\n    // this is thread safe as a potential purge only decommits parts that are not yet claimed as used (in `blocks_inuse`).\n    _mi_bitmap_unclaim_across(arena->blocks_purge, arena->field_count, needed_bcount, bitmap_index);\n  }\n\n  // set the dirty bits (todo: no need for an atomic op here?)\n  if (arena->memid.initially_zero && arena->blocks_dirty != NULL) {\n    memid->initially_zero = _mi_bitmap_claim_across(arena->blocks_dirty, arena->field_count, needed_bcount, bitmap_index, NULL);\n  }\n\n  // set commit state\n  if (arena->blocks_committed == NULL) {\n    // always committed\n    memid->initially_committed = true;\n  }\n  else if (commit) {\n    // commit requested, but the range may not be committed as a whole: ensure it is committed now\n    memid->initially_committed = true;\n    bool any_uncommitted;\n    _mi_bitmap_claim_across(arena->blocks_committed, arena->field_count, needed_bcount, bitmap_index, &any_uncommitted);\n    if (any_uncommitted) {\n      bool commit_zero = false;\n      if (!_mi_os_commit(p, mi_arena_block_size(needed_bcount), &commit_zero)) {\n        memid->initially_committed = false;\n      }\n      else {\n        if (commit_zero) { memid->initially_zero = true; }\n      }\n    }\n  }\n  else {\n    // no need to commit, but check if already fully committed\n    memid->initially_committed = _mi_bitmap_is_claimed_across(arena->blocks_committed, arena->field_count, needed_bcount, bitmap_index);\n  }\n\n  return p;\n}\n\n// allocate in a specific arena\nstatic void* mi_arena_try_alloc_at_id(mi_arena_id_t arena_id, bool match_numa_node, int numa_node, size_t size, size_t alignment,\n                                       bool commit, bool allow_large, mi_arena_id_t req_arena_id, mi_memid_t* memid )\n{\n  MI_UNUSED_RELEASE(alignment);\n  mi_assert(alignment <= MI_SEGMENT_ALIGN);\n  const size_t bcount = mi_block_count_of_size(size);\n  const size_t arena_index = mi_arena_id_index(arena_id);\n  mi_assert_internal(arena_index < mi_atomic_load_relaxed(&mi_arena_count));\n  mi_assert_internal(size <= mi_arena_block_size(bcount));\n\n  // Check arena suitability\n  mi_arena_t* arena = mi_arena_from_index(arena_index);\n  if (arena == NULL) return NULL;\n  if (!allow_large && arena->is_large) return NULL;\n  if (!mi_arena_id_is_suitable(arena->id, arena->exclusive, req_arena_id)) return NULL;\n  if (req_arena_id == _mi_arena_id_none()) { // in not specific, check numa affinity\n    const bool numa_suitable = (numa_node < 0 || arena->numa_node < 0 || arena->numa_node == numa_node);\n    if (match_numa_node) { if (!numa_suitable) return NULL; }\n                    else { if (numa_suitable) return NULL; }\n  }\n\n  // try to allocate\n  void* p = mi_arena_try_alloc_at(arena, arena_index, bcount, commit, memid);\n  mi_assert_internal(p == NULL || _mi_is_aligned(p, alignment));\n  return p;\n}\n\n\n// allocate from an arena with fallback to the OS\nstatic mi_decl_noinline void* mi_arena_try_alloc(int numa_node, size_t size, size_t alignment,\n                                                  bool commit, bool allow_large,\n                                                  mi_arena_id_t req_arena_id, mi_memid_t* memid )\n{\n  MI_UNUSED(alignment);\n  mi_assert_internal(alignment <= MI_SEGMENT_ALIGN);\n  const size_t max_arena = mi_atomic_load_relaxed(&mi_arena_count);\n  if mi_likely(max_arena == 0) return NULL;\n\n  if (req_arena_id != _mi_arena_id_none()) {\n    // try a specific arena if requested\n    if (mi_arena_id_index(req_arena_id) < max_arena) {\n      void* p = mi_arena_try_alloc_at_id(req_arena_id, true, numa_node, size, alignment, commit, allow_large, req_arena_id, memid);\n      if (p != NULL) return p;\n    }\n  }\n  else {\n    // try numa affine allocation\n    for (size_t i = 0; i < max_arena; i++) {\n      void* p = mi_arena_try_alloc_at_id(mi_arena_id_create(i), true, numa_node, size, alignment, commit, allow_large, req_arena_id, memid);\n      if (p != NULL) return p;\n    }\n\n    // try from another numa node instead..\n    if (numa_node >= 0) {  // if numa_node was < 0 (no specific affinity requested), all arena's have been tried already\n      for (size_t i = 0; i < max_arena; i++) {\n        void* p = mi_arena_try_alloc_at_id(mi_arena_id_create(i), false /* only proceed if not numa local */, numa_node, size, alignment, commit, allow_large, req_arena_id, memid);\n        if (p != NULL) return p;\n      }\n    }\n  }\n  return NULL;\n}\n\n// try to reserve a fresh arena space\nstatic bool mi_arena_reserve(size_t req_size, bool allow_large, mi_arena_id_t *arena_id)\n{\n  if (_mi_preloading()) return false;  // use OS only while pre loading\n  \n  const size_t arena_count = mi_atomic_load_acquire(&mi_arena_count);\n  if (arena_count > (MI_MAX_ARENAS - 4)) return false;\n\n  size_t arena_reserve = mi_option_get_size(mi_option_arena_reserve);\n  if (arena_reserve == 0) return false;\n\n  if (!_mi_os_has_virtual_reserve()) {\n    arena_reserve = arena_reserve/4;  // be conservative if virtual reserve is not supported (for WASM for example)\n  }\n  arena_reserve = _mi_align_up(arena_reserve, MI_ARENA_BLOCK_SIZE);\n  arena_reserve = _mi_align_up(arena_reserve, MI_SEGMENT_SIZE);\n  if (arena_count >= 8 && arena_count <= 128) {\n    // scale up the arena sizes exponentially every 8 entries (128 entries get to 589TiB)\n    const size_t multiplier = (size_t)1 << _mi_clamp(arena_count/8, 0, 16 );\n    size_t reserve = 0;\n    if (!mi_mul_overflow(multiplier, arena_reserve, &reserve)) {\n      arena_reserve = reserve;\n    }\n  }\n  if (arena_reserve < req_size) return false;  // should be able to at least handle the current allocation size\n\n  // commit eagerly?\n  bool arena_commit = false;\n  if (mi_option_get(mi_option_arena_eager_commit) == 2)      { arena_commit = _mi_os_has_overcommit(); }\n  else if (mi_option_get(mi_option_arena_eager_commit) == 1) { arena_commit = true; }\n\n  return (mi_reserve_os_memory_ex(arena_reserve, arena_commit, allow_large, false /* exclusive? */, arena_id) == 0);\n}\n\n\nvoid* _mi_arena_alloc_aligned(size_t size, size_t alignment, size_t align_offset, bool commit, bool allow_large,\n                              mi_arena_id_t req_arena_id, mi_memid_t* memid)\n{\n  mi_assert_internal(memid != NULL);\n  mi_assert_internal(size > 0);\n  *memid = _mi_memid_none();\n\n  const int numa_node = _mi_os_numa_node(); // current numa node\n\n  // try to allocate in an arena if the alignment is small enough and the object is not too small (as for heap meta data)\n  if (!mi_option_is_enabled(mi_option_disallow_arena_alloc)) {  // is arena allocation allowed?\n    if (size >= MI_ARENA_MIN_OBJ_SIZE && alignment <= MI_SEGMENT_ALIGN && align_offset == 0) \n    {\n      void* p = mi_arena_try_alloc(numa_node, size, alignment, commit, allow_large, req_arena_id, memid);\n      if (p != NULL) return p;\n\n      // otherwise, try to first eagerly reserve a new arena\n      if (req_arena_id == _mi_arena_id_none()) {\n        mi_arena_id_t arena_id = 0;\n        if (mi_arena_reserve(size, allow_large, &arena_id)) {\n          // and try allocate in there\n          mi_assert_internal(req_arena_id == _mi_arena_id_none());\n          p = mi_arena_try_alloc_at_id(arena_id, true, numa_node, size, alignment, commit, allow_large, req_arena_id, memid);\n          if (p != NULL) return p;\n        }\n      }\n    }\n  }\n\n  // if we cannot use OS allocation, return NULL\n  if (mi_option_is_enabled(mi_option_disallow_os_alloc) || req_arena_id != _mi_arena_id_none()) {\n    errno = ENOMEM;\n    return NULL;\n  }\n\n  // finally, fall back to the OS\n  if (align_offset > 0) {\n    return _mi_os_alloc_aligned_at_offset(size, alignment, align_offset, commit, allow_large, memid);\n  }\n  else {\n    return _mi_os_alloc_aligned(size, alignment, commit, allow_large, memid);\n  }\n}\n\nvoid* _mi_arena_alloc(size_t size, bool commit, bool allow_large, mi_arena_id_t req_arena_id, mi_memid_t* memid)\n{\n  return _mi_arena_alloc_aligned(size, MI_ARENA_BLOCK_SIZE, 0, commit, allow_large, req_arena_id, memid);\n}\n\n\nvoid* mi_arena_area(mi_arena_id_t arena_id, size_t* size) {\n  if (size != NULL) *size = 0;\n  size_t arena_index = mi_arena_id_index(arena_id);\n  if (arena_index >= MI_MAX_ARENAS) return NULL;\n  mi_arena_t* arena = mi_atomic_load_ptr_acquire(mi_arena_t, &mi_arenas[arena_index]);\n  if (arena == NULL) return NULL;\n  if (size != NULL) { *size = mi_arena_block_size(arena->block_count); }\n  return arena->start;\n}\n\n\n/* -----------------------------------------------------------\n  Arena purge\n----------------------------------------------------------- */\n\nstatic long mi_arena_purge_delay(void) {\n  // <0 = no purging allowed, 0=immediate purging, >0=milli-second delay\n  return (mi_option_get(mi_option_purge_delay) * mi_option_get(mi_option_arena_purge_mult));\n}\n\n// reset or decommit in an arena and update the committed/decommit bitmaps\n// assumes we own the area (i.e. blocks_in_use is claimed by us)\nstatic void mi_arena_purge(mi_arena_t* arena, size_t bitmap_idx, size_t blocks) {\n  mi_assert_internal(arena->blocks_committed != NULL);\n  mi_assert_internal(arena->blocks_purge != NULL);\n  mi_assert_internal(!arena->memid.is_pinned);\n  const size_t size = mi_arena_block_size(blocks);\n  void* const p = mi_arena_block_start(arena, bitmap_idx);\n  bool needs_recommit;\n  if (_mi_bitmap_is_claimed_across(arena->blocks_committed, arena->field_count, blocks, bitmap_idx)) {\n    // all blocks are committed, we can purge freely\n    needs_recommit = _mi_os_purge(p, size);\n  }\n  else {\n    // some blocks are not committed -- this can happen when a partially committed block is freed\n    // in `_mi_arena_free` and it is conservatively marked as uncommitted but still scheduled for a purge\n    // we need to ensure we do not try to reset (as that may be invalid for uncommitted memory),\n    // and also undo the decommit stats (as it was already adjusted)\n    mi_assert_internal(mi_option_is_enabled(mi_option_purge_decommits));\n    needs_recommit = _mi_os_purge_ex(p, size, false /* allow reset? */, 0);    \n  }\n\n  // clear the purged blocks\n  _mi_bitmap_unclaim_across(arena->blocks_purge, arena->field_count, blocks, bitmap_idx);\n  // update committed bitmap\n  if (needs_recommit) {\n    _mi_bitmap_unclaim_across(arena->blocks_committed, arena->field_count, blocks, bitmap_idx);\n  }\n}\n\n// Schedule a purge. This is usually delayed to avoid repeated decommit/commit calls.\n// Note: assumes we (still) own the area as we may purge immediately\nstatic void mi_arena_schedule_purge(mi_arena_t* arena, size_t bitmap_idx, size_t blocks) {\n  mi_assert_internal(arena->blocks_purge != NULL);\n  const long delay = mi_arena_purge_delay();\n  if (delay < 0) return;  // is purging allowed at all?\n\n  if (_mi_preloading() || delay == 0) {\n    // decommit directly\n    mi_arena_purge(arena, bitmap_idx, blocks);\n  }\n  else {\n    // schedule purge\n    const mi_msecs_t expire = _mi_clock_now() + delay;\n    mi_msecs_t expire0 = 0;\n    if (mi_atomic_casi64_strong_acq_rel(&arena->purge_expire, &expire0, expire)) {\n      // expiration was not yet set\n      // maybe set the global arenas expire as well (if it wasn't set already)\n      mi_atomic_casi64_strong_acq_rel(&mi_arenas_purge_expire, &expire0, expire);\n    }\n    else {\n      // already an expiration was set\n    }\n    _mi_bitmap_claim_across(arena->blocks_purge, arena->field_count, blocks, bitmap_idx, NULL);\n  }\n}\n\n// purge a range of blocks\n// return true if the full range was purged.\n// assumes we own the area (i.e. blocks_in_use is claimed by us)\nstatic bool mi_arena_purge_range(mi_arena_t* arena, size_t idx, size_t startidx, size_t bitlen, size_t purge) {\n  const size_t endidx = startidx + bitlen;\n  size_t bitidx = startidx;\n  bool all_purged = false;\n  while (bitidx < endidx) {\n    // count consecutive ones in the purge mask\n    size_t count = 0;\n    while (bitidx + count < endidx && (purge & ((size_t)1 << (bitidx + count))) != 0) {\n      count++;\n    }\n    if (count > 0) {\n      // found range to be purged\n      const mi_bitmap_index_t range_idx = mi_bitmap_index_create(idx, bitidx);\n      mi_arena_purge(arena, range_idx, count);\n      if (count == bitlen) {\n        all_purged = true;\n      }\n    }\n    bitidx += (count+1); // +1 to skip the zero bit (or end)\n  }\n  return all_purged;\n}\n\n// returns true if anything was purged\nstatic bool mi_arena_try_purge(mi_arena_t* arena, mi_msecs_t now, bool force)\n{\n  // check pre-conditions\n  if (arena->memid.is_pinned) return false;\n   \n  // expired yet?\n  mi_msecs_t expire = mi_atomic_loadi64_relaxed(&arena->purge_expire);\n  if (!force && (expire == 0 || expire > now)) return false;\n\n  // reset expire (if not already set concurrently)\n  mi_atomic_casi64_strong_acq_rel(&arena->purge_expire, &expire, (mi_msecs_t)0);\n  _mi_stat_counter_increase(&_mi_stats_main.arena_purges, 1);\n\n  // potential purges scheduled, walk through the bitmap\n  bool any_purged = false;\n  bool full_purge = true;\n  for (size_t i = 0; i < arena->field_count; i++) {\n    size_t purge = mi_atomic_load_relaxed(&arena->blocks_purge[i]);\n    if (purge != 0) {\n      size_t bitidx = 0;\n      while (bitidx < MI_BITMAP_FIELD_BITS) {\n        // find consecutive range of ones in the purge mask\n        size_t bitlen = 0;\n        while (bitidx + bitlen < MI_BITMAP_FIELD_BITS && (purge & ((size_t)1 << (bitidx + bitlen))) != 0) {\n          bitlen++;\n        }\n        // temporarily claim the purge range as \"in-use\" to be thread-safe with allocation\n        // try to claim the longest range of corresponding in_use bits\n        const mi_bitmap_index_t bitmap_index = mi_bitmap_index_create(i, bitidx);\n        while( bitlen > 0 ) {\n          if (_mi_bitmap_try_claim(arena->blocks_inuse, arena->field_count, bitlen, bitmap_index)) {\n            break;\n          }\n          bitlen--;\n        }\n        // actual claimed bits at `in_use`\n        if (bitlen > 0) {\n          // read purge again now that we have the in_use bits\n          purge = mi_atomic_load_acquire(&arena->blocks_purge[i]);\n          if (!mi_arena_purge_range(arena, i, bitidx, bitlen, purge)) {\n            full_purge = false;\n          }\n          any_purged = true;\n          // release the claimed `in_use` bits again\n          _mi_bitmap_unclaim(arena->blocks_inuse, arena->field_count, bitlen, bitmap_index);\n        }\n        bitidx += (bitlen+1);  // +1 to skip the zero (or end)\n      } // while bitidx\n    } // purge != 0\n  }\n  // if not fully purged, make sure to purge again in the future\n  if (!full_purge) {\n    const long delay = mi_arena_purge_delay();\n    mi_msecs_t expected = 0;\n    mi_atomic_casi64_strong_acq_rel(&arena->purge_expire,&expected,_mi_clock_now() + delay);\n  }\n  return any_purged;\n}\n\nstatic void mi_arenas_try_purge( bool force, bool visit_all ) \n{\n  if (_mi_preloading() || mi_arena_purge_delay() <= 0) return;  // nothing will be scheduled\n\n  // check if any arena needs purging?\n  const mi_msecs_t now = _mi_clock_now();\n  mi_msecs_t arenas_expire = mi_atomic_loadi64_acquire(&mi_arenas_purge_expire);\n  if (!force && (arenas_expire == 0 || arenas_expire < now)) return;\n\n  const size_t max_arena = mi_atomic_load_acquire(&mi_arena_count);\n  if (max_arena == 0) return;\n\n  // allow only one thread to purge at a time\n  static mi_atomic_guard_t purge_guard;\n  mi_atomic_guard(&purge_guard)\n  {\n    // increase global expire: at most one purge per delay cycle\n    mi_atomic_storei64_release(&mi_arenas_purge_expire, now + mi_arena_purge_delay());  \n    size_t max_purge_count = (visit_all ? max_arena : 2);\n    bool all_visited = true;\n    for (size_t i = 0; i < max_arena; i++) {\n      mi_arena_t* arena = mi_atomic_load_ptr_acquire(mi_arena_t, &mi_arenas[i]);\n      if (arena != NULL) {\n        if (mi_arena_try_purge(arena, now, force)) {\n          if (max_purge_count <= 1) {\n            all_visited = false;\n            break;\n          }\n          max_purge_count--;\n        }\n      }\n    }\n    if (all_visited) {\n      // all arena's were visited and purged: reset global expire\n      mi_atomic_storei64_release(&mi_arenas_purge_expire, 0);\n    }\n  }\n}\n\n\n/* -----------------------------------------------------------\n  Arena free\n----------------------------------------------------------- */\n\nvoid _mi_arena_free(void* p, size_t size, size_t committed_size, mi_memid_t memid) {\n  mi_assert_internal(size > 0);\n  mi_assert_internal(committed_size <= size);\n  if (p==NULL) return;\n  if (size==0) return;\n  const bool all_committed = (committed_size == size);\n\n  // need to set all memory to undefined as some parts may still be marked as no_access (like padding etc.)\n  mi_track_mem_undefined(p,size);\n\n  if (mi_memkind_is_os(memid.memkind)) {\n    // was a direct OS allocation, pass through\n    if (!all_committed && committed_size > 0) {\n      // if partially committed, adjust the committed stats (as `_mi_os_free` will increase decommit by the full size)\n      _mi_stat_decrease(&_mi_stats_main.committed, committed_size);\n    }\n    _mi_os_free(p, size, memid);\n  }\n  else if (memid.memkind == MI_MEM_ARENA) {\n    // allocated in an arena\n    size_t arena_idx;\n    size_t bitmap_idx;\n    mi_arena_memid_indices(memid, &arena_idx, &bitmap_idx);\n    mi_assert_internal(arena_idx < MI_MAX_ARENAS);\n    mi_arena_t* arena = mi_atomic_load_ptr_acquire(mi_arena_t,&mi_arenas[arena_idx]);\n    mi_assert_internal(arena != NULL);\n    const size_t blocks = mi_block_count_of_size(size);\n\n    // checks\n    if (arena == NULL) {\n      _mi_error_message(EINVAL, \"trying to free from an invalid arena: %p, size %zu, memid: 0x%zx\\n\", p, size, memid);\n      return;\n    }\n    mi_assert_internal(arena->field_count > mi_bitmap_index_field(bitmap_idx));\n    if (arena->field_count <= mi_bitmap_index_field(bitmap_idx)) {\n      _mi_error_message(EINVAL, \"trying to free from an invalid arena block: %p, size %zu, memid: 0x%zx\\n\", p, size, memid);\n      return;\n    }\n\n    // potentially decommit\n    if (arena->memid.is_pinned || arena->blocks_committed == NULL) {\n      mi_assert_internal(all_committed);\n    }\n    else {\n      mi_assert_internal(arena->blocks_committed != NULL);\n      mi_assert_internal(arena->blocks_purge != NULL);\n\n      if (!all_committed) {\n        // mark the entire range as no longer committed (so we recommit the full range when re-using)\n        _mi_bitmap_unclaim_across(arena->blocks_committed, arena->field_count, blocks, bitmap_idx);\n        mi_track_mem_noaccess(p,size);\n        if (committed_size > 0) {\n          // if partially committed, adjust the committed stats (is it will be recommitted when re-using)\n          // in the delayed purge, we now need to not count a decommit if the range is not marked as committed.\n          _mi_stat_decrease(&_mi_stats_main.committed, committed_size);\n        }\n        // note: if not all committed, it may be that the purge will reset/decommit the entire range\n        // that contains already decommitted parts. Since purge consistently uses reset or decommit that\n        // works (as we should never reset decommitted parts).\n      }\n      // (delay) purge the entire range\n      mi_arena_schedule_purge(arena, bitmap_idx, blocks);\n    }\n\n    // and make it available to others again\n    bool all_inuse = _mi_bitmap_unclaim_across(arena->blocks_inuse, arena->field_count, blocks, bitmap_idx);\n    if (!all_inuse) {\n      _mi_error_message(EAGAIN, \"trying to free an already freed arena block: %p, size %zu\\n\", p, size);\n      return;\n    };\n  }\n  else {\n    // arena was none, external, or static; nothing to do\n    mi_assert_internal(memid.memkind < MI_MEM_OS);\n  }\n\n  // purge expired decommits\n  mi_arenas_try_purge(false, false);\n}\n\n// destroy owned arenas; this is unsafe and should only be done using `mi_option_destroy_on_exit`\n// for dynamic libraries that are unloaded and need to release all their allocated memory.\nstatic void mi_arenas_unsafe_destroy(void) {\n  const size_t max_arena = mi_atomic_load_relaxed(&mi_arena_count);\n  size_t new_max_arena = 0;\n  for (size_t i = 0; i < max_arena; i++) {\n    mi_arena_t* arena = mi_atomic_load_ptr_acquire(mi_arena_t, &mi_arenas[i]);\n    if (arena != NULL) {\n      mi_lock_done(&arena->abandoned_visit_lock);\n      if (arena->start != NULL && mi_memkind_is_os(arena->memid.memkind)) {\n        mi_atomic_store_ptr_release(mi_arena_t, &mi_arenas[i], NULL);\n        _mi_os_free(arena->start, mi_arena_size(arena), arena->memid);\n      }\n      else {\n        new_max_arena = i;\n      }\n      _mi_arena_meta_free(arena, arena->meta_memid, arena->meta_size);\n    }\n  }\n\n  // try to lower the max arena.\n  size_t expected = max_arena;\n  mi_atomic_cas_strong_acq_rel(&mi_arena_count, &expected, new_max_arena);\n}\n\n// Purge the arenas; if `force_purge` is true, amenable parts are purged even if not yet expired\nvoid _mi_arenas_collect(bool force_purge) {\n  mi_arenas_try_purge(force_purge, force_purge /* visit all? */);\n}\n\n// destroy owned arenas; this is unsafe and should only be done using `mi_option_destroy_on_exit`\n// for dynamic libraries that are unloaded and need to release all their allocated memory.\nvoid _mi_arena_unsafe_destroy_all(void) {\n  mi_arenas_unsafe_destroy();\n  _mi_arenas_collect(true /* force purge */);  // purge non-owned arenas\n}\n\n// Is a pointer inside any of our arenas?\nbool _mi_arena_contains(const void* p) {\n  const size_t max_arena = mi_atomic_load_relaxed(&mi_arena_count);\n  for (size_t i = 0; i < max_arena; i++) {\n    mi_arena_t* arena = mi_atomic_load_ptr_relaxed(mi_arena_t, &mi_arenas[i]);\n    if (arena != NULL && arena->start <= (const uint8_t*)p && arena->start + mi_arena_block_size(arena->block_count) > (const uint8_t*)p) {\n      return true;\n    }\n  }\n  return false;\n}\n\n/* -----------------------------------------------------------\n  Add an arena.\n----------------------------------------------------------- */\n\nstatic bool mi_arena_add(mi_arena_t* arena, mi_arena_id_t* arena_id, mi_stats_t* stats) {\n  mi_assert_internal(arena != NULL);\n  mi_assert_internal((uintptr_t)mi_atomic_load_ptr_relaxed(uint8_t,&arena->start) % MI_SEGMENT_ALIGN == 0);\n  mi_assert_internal(arena->block_count > 0);\n  if (arena_id != NULL) { *arena_id = -1; }\n\n  size_t i = mi_atomic_increment_acq_rel(&mi_arena_count);\n  if (i >= MI_MAX_ARENAS) {\n    mi_atomic_decrement_acq_rel(&mi_arena_count);\n    return false;\n  }\n  _mi_stat_counter_increase(&stats->arena_count,1);\n  arena->id = mi_arena_id_create(i);\n  mi_atomic_store_ptr_release(mi_arena_t,&mi_arenas[i], arena);\n  if (arena_id != NULL) { *arena_id = arena->id; }\n  return true;\n}\n\nstatic bool mi_manage_os_memory_ex2(void* start, size_t size, bool is_large, int numa_node, bool exclusive, mi_memid_t memid, mi_arena_id_t* arena_id) mi_attr_noexcept\n{\n  if (arena_id != NULL) *arena_id = _mi_arena_id_none();\n  if (size < MI_ARENA_BLOCK_SIZE) {\n    _mi_warning_message(\"the arena size is too small (memory at %p with size %zu)\\n\", start, size);\n    return false;\n  }\n  if (is_large) {\n    mi_assert_internal(memid.initially_committed && memid.is_pinned);\n  }\n  if (!_mi_is_aligned(start, MI_SEGMENT_ALIGN)) {\n    void* const aligned_start = mi_align_up_ptr(start, MI_SEGMENT_ALIGN);\n    const size_t diff = (uint8_t*)aligned_start - (uint8_t*)start;\n    if (diff >= size || (size - diff) < MI_ARENA_BLOCK_SIZE) {\n      _mi_warning_message(\"after alignment, the size of the arena becomes too small (memory at %p with size %zu)\\n\", start, size);\n      return false;\n    }\n    start = aligned_start;\n    size = size - diff;\n  }\n\n  const size_t bcount = size / MI_ARENA_BLOCK_SIZE;\n  const size_t fields = _mi_divide_up(bcount, MI_BITMAP_FIELD_BITS);\n  const size_t bitmaps = (memid.is_pinned ? 3 : 5);\n  const size_t asize  = sizeof(mi_arena_t) + (bitmaps*fields*sizeof(mi_bitmap_field_t));\n  mi_memid_t meta_memid;\n  mi_arena_t* arena   = (mi_arena_t*)_mi_arena_meta_zalloc(asize, &meta_memid);\n  if (arena == NULL) return false;\n\n  // already zero'd due to zalloc\n  // _mi_memzero(arena, asize);\n  arena->id = _mi_arena_id_none();\n  arena->memid = memid;\n  arena->exclusive = exclusive;\n  arena->meta_size = asize;\n  arena->meta_memid = meta_memid;\n  arena->block_count = bcount;\n  arena->field_count = fields;\n  arena->start = (uint8_t*)start;\n  arena->numa_node    = numa_node; // TODO: or get the current numa node if -1? (now it allows anyone to allocate on -1)\n  arena->is_large     = is_large;\n  arena->purge_expire = 0;\n  arena->search_idx   = 0;\n  mi_lock_init(&arena->abandoned_visit_lock);\n  // consecutive bitmaps\n  arena->blocks_dirty     = &arena->blocks_inuse[fields];     // just after inuse bitmap\n  arena->blocks_abandoned = &arena->blocks_inuse[2 * fields]; // just after dirty bitmap\n  arena->blocks_committed = (arena->memid.is_pinned ? NULL : &arena->blocks_inuse[3*fields]); // just after abandoned bitmap\n  arena->blocks_purge     = (arena->memid.is_pinned ? NULL : &arena->blocks_inuse[4*fields]); // just after committed bitmap\n  // initialize committed bitmap?\n  if (arena->blocks_committed != NULL && arena->memid.initially_committed) {\n    memset((void*)arena->blocks_committed, 0xFF, fields*sizeof(mi_bitmap_field_t)); // cast to void* to avoid atomic warning\n  }\n\n  // and claim leftover blocks if needed (so we never allocate there)\n  ptrdiff_t post = (fields * MI_BITMAP_FIELD_BITS) - bcount;\n  mi_assert_internal(post >= 0);\n  if (post > 0) {\n    // don't use leftover bits at the end\n    mi_bitmap_index_t postidx = mi_bitmap_index_create(fields - 1, MI_BITMAP_FIELD_BITS - post);\n    _mi_bitmap_claim(arena->blocks_inuse, fields, post, postidx, NULL);\n  }\n  return mi_arena_add(arena, arena_id, &_mi_stats_main);\n\n}\n\nbool mi_manage_os_memory_ex(void* start, size_t size, bool is_committed, bool is_large, bool is_zero, int numa_node, bool exclusive, mi_arena_id_t* arena_id) mi_attr_noexcept {\n  mi_memid_t memid = _mi_memid_create(MI_MEM_EXTERNAL);\n  memid.initially_committed = is_committed;\n  memid.initially_zero = is_zero;\n  memid.is_pinned = is_large;\n  return mi_manage_os_memory_ex2(start,size,is_large,numa_node,exclusive,memid, arena_id);\n}\n\n// Reserve a range of regular OS memory\nint mi_reserve_os_memory_ex(size_t size, bool commit, bool allow_large, bool exclusive, mi_arena_id_t* arena_id) mi_attr_noexcept {\n  if (arena_id != NULL) *arena_id = _mi_arena_id_none();\n  size = _mi_align_up(size, MI_ARENA_BLOCK_SIZE); // at least one block\n  mi_memid_t memid;\n  void* start = _mi_os_alloc_aligned(size, MI_SEGMENT_ALIGN, commit, allow_large, &memid);\n  if (start == NULL) return ENOMEM;\n  const bool is_large = memid.is_pinned; // todo: use separate is_large field?\n  if (!mi_manage_os_memory_ex2(start, size, is_large, -1 /* numa node */, exclusive, memid, arena_id)) {\n    _mi_os_free_ex(start, size, commit, memid);\n    _mi_verbose_message(\"failed to reserve %zu KiB memory\\n\", _mi_divide_up(size, 1024));\n    return ENOMEM;\n  }\n  _mi_verbose_message(\"reserved %zu KiB memory%s\\n\", _mi_divide_up(size, 1024), is_large ? \" (in large os pages)\" : \"\");\n  return 0;\n}\n\n\n// Manage a range of regular OS memory\nbool mi_manage_os_memory(void* start, size_t size, bool is_committed, bool is_large, bool is_zero, int numa_node) mi_attr_noexcept {\n  return mi_manage_os_memory_ex(start, size, is_committed, is_large, is_zero, numa_node, false /* exclusive? */, NULL);\n}\n\n// Reserve a range of regular OS memory\nint mi_reserve_os_memory(size_t size, bool commit, bool allow_large) mi_attr_noexcept {\n  return mi_reserve_os_memory_ex(size, commit, allow_large, false, NULL);\n}\n\n\n/* -----------------------------------------------------------\n  Debugging\n----------------------------------------------------------- */\n\nstatic size_t mi_debug_show_bitmap(const char* prefix, const char* header, size_t block_count, mi_bitmap_field_t* fields, size_t field_count ) {\n  _mi_message(\"%s%s:\\n\", prefix, header);\n  size_t bcount = 0;\n  size_t inuse_count = 0;\n  for (size_t i = 0; i < field_count; i++) {\n    char buf[MI_BITMAP_FIELD_BITS + 1];\n    uintptr_t field = mi_atomic_load_relaxed(&fields[i]);\n    for (size_t bit = 0; bit < MI_BITMAP_FIELD_BITS; bit++, bcount++) {\n      if (bcount < block_count) {\n        bool inuse = ((((uintptr_t)1 << bit) & field) != 0);\n        if (inuse) inuse_count++;\n        buf[bit] = (inuse ? 'x' : '.');\n      }\n      else {\n        buf[bit] = ' ';\n      }\n    }\n    buf[MI_BITMAP_FIELD_BITS] = 0;\n    _mi_message(\"%s  %s\\n\", prefix, buf);\n  }\n  _mi_message(\"%s  total ('x'): %zu\\n\", prefix, inuse_count);\n  return inuse_count;\n}\n\nvoid mi_debug_show_arenas(void) mi_attr_noexcept {\n  const bool show_inuse = true;\n  size_t max_arenas = mi_atomic_load_relaxed(&mi_arena_count);\n  size_t inuse_total = 0;\n  //size_t abandoned_total = 0;\n  //size_t purge_total = 0;\n  for (size_t i = 0; i < max_arenas; i++) {\n    mi_arena_t* arena = mi_atomic_load_ptr_relaxed(mi_arena_t, &mi_arenas[i]);\n    if (arena == NULL) break;\n    _mi_message(\"arena %zu: %zu blocks of size %zuMiB (in %zu fields) %s\\n\", i, arena->block_count, MI_ARENA_BLOCK_SIZE / MI_MiB, arena->field_count, (arena->memid.is_pinned ? \", pinned\" : \"\"));\n    if (show_inuse) {\n      inuse_total += mi_debug_show_bitmap(\"  \", \"inuse blocks\", arena->block_count, arena->blocks_inuse, arena->field_count);\n    }\n    if (arena->blocks_committed != NULL) {\n      mi_debug_show_bitmap(\"  \", \"committed blocks\", arena->block_count, arena->blocks_committed, arena->field_count);\n    }\n    //if (show_abandoned) {\n    //  abandoned_total += mi_debug_show_bitmap(\"  \", \"abandoned blocks\", arena->block_count, arena->blocks_abandoned, arena->field_count);\n    //}\n    //if (show_purge && arena->blocks_purge != NULL) {\n    //  purge_total += mi_debug_show_bitmap(\"  \", \"purgeable blocks\", arena->block_count, arena->blocks_purge, arena->field_count);\n    //}\n  }\n  if (show_inuse)     _mi_message(\"total inuse blocks    : %zu\\n\", inuse_total);\n  //if (show_abandoned) _mi_message(\"total abandoned blocks: %zu\\n\", abandoned_total);\n  //if (show_purge)     _mi_message(\"total purgeable blocks: %zu\\n\", purge_total);\n}\n\n\nvoid mi_arenas_print(void) mi_attr_noexcept {\n  mi_debug_show_arenas();\n}\n\n\n/* -----------------------------------------------------------\n  Reserve a huge page arena.\n----------------------------------------------------------- */\n// reserve at a specific numa node\nint mi_reserve_huge_os_pages_at_ex(size_t pages, int numa_node, size_t timeout_msecs, bool exclusive, mi_arena_id_t* arena_id) mi_attr_noexcept {\n  if (arena_id != NULL) *arena_id = -1;\n  if (pages==0) return 0;\n  if (numa_node < -1) numa_node = -1;\n  if (numa_node >= 0) numa_node = numa_node % _mi_os_numa_node_count();\n  size_t hsize = 0;\n  size_t pages_reserved = 0;\n  mi_memid_t memid;\n  void* p = _mi_os_alloc_huge_os_pages(pages, numa_node, timeout_msecs, &pages_reserved, &hsize, &memid);\n  if (p==NULL || pages_reserved==0) {\n    _mi_warning_message(\"failed to reserve %zu GiB huge pages\\n\", pages);\n    return ENOMEM;\n  }\n  _mi_verbose_message(\"numa node %i: reserved %zu GiB huge pages (of the %zu GiB requested)\\n\", numa_node, pages_reserved, pages);\n\n  if (!mi_manage_os_memory_ex2(p, hsize, true, numa_node, exclusive, memid, arena_id)) {\n    _mi_os_free(p, hsize, memid);\n    return ENOMEM;\n  }\n  return 0;\n}\n\nint mi_reserve_huge_os_pages_at(size_t pages, int numa_node, size_t timeout_msecs) mi_attr_noexcept {\n  return mi_reserve_huge_os_pages_at_ex(pages, numa_node, timeout_msecs, false, NULL);\n}\n\n// reserve huge pages evenly among the given number of numa nodes (or use the available ones as detected)\nint mi_reserve_huge_os_pages_interleave(size_t pages, size_t numa_nodes, size_t timeout_msecs) mi_attr_noexcept {\n  if (pages == 0) return 0;\n\n  // pages per numa node\n  size_t numa_count = (numa_nodes > 0 ? numa_nodes : _mi_os_numa_node_count());\n  if (numa_count <= 0) numa_count = 1;\n  const size_t pages_per = pages / numa_count;\n  const size_t pages_mod = pages % numa_count;\n  const size_t timeout_per = (timeout_msecs==0 ? 0 : (timeout_msecs / numa_count) + 50);\n\n  // reserve evenly among numa nodes\n  for (size_t numa_node = 0; numa_node < numa_count && pages > 0; numa_node++) {\n    size_t node_pages = pages_per;  // can be 0\n    if (numa_node < pages_mod) node_pages++;\n    int err = mi_reserve_huge_os_pages_at(node_pages, (int)numa_node, timeout_per);\n    if (err) return err;\n    if (pages < node_pages) {\n      pages = 0;\n    }\n    else {\n      pages -= node_pages;\n    }\n  }\n\n  return 0;\n}\n\nint mi_reserve_huge_os_pages(size_t pages, double max_secs, size_t* pages_reserved) mi_attr_noexcept {\n  MI_UNUSED(max_secs);\n  _mi_warning_message(\"mi_reserve_huge_os_pages is deprecated: use mi_reserve_huge_os_pages_interleave/at instead\\n\");\n  if (pages_reserved != NULL) *pages_reserved = 0;\n  int err = mi_reserve_huge_os_pages_interleave(pages, 0, (size_t)(max_secs * 1000.0));\n  if (err==0 && pages_reserved!=NULL) *pages_reserved = pages;\n  return err;\n}\n"
  },
  {
    "path": "third-party/mimalloc/src/bitmap.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2019-2023 Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n/* ----------------------------------------------------------------------------\nConcurrent bitmap that can set/reset sequences of bits atomically,\nrepresented as an array of fields where each field is a machine word (`size_t`)\n\nThere are two api's; the standard one cannot have sequences that cross\nbetween the bitmap fields (and a sequence must be <= MI_BITMAP_FIELD_BITS).\n\nThe `_across` postfixed functions do allow sequences that can cross over\nbetween the fields. (This is used in arena allocation)\n---------------------------------------------------------------------------- */\n\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"bitmap.h\"\n\n/* -----------------------------------------------------------\n  Bitmap definition\n----------------------------------------------------------- */\n\n// The bit mask for a given number of blocks at a specified bit index.\nstatic inline size_t mi_bitmap_mask_(size_t count, size_t bitidx) {\n  mi_assert_internal(count + bitidx <= MI_BITMAP_FIELD_BITS);\n  mi_assert_internal(count > 0);\n  if (count >= MI_BITMAP_FIELD_BITS) return MI_BITMAP_FIELD_FULL;\n  if (count == 0) return 0;\n  return ((((size_t)1 << count) - 1) << bitidx);\n}\n\n\n/* -----------------------------------------------------------\n  Claim a bit sequence atomically\n----------------------------------------------------------- */\n\n// Try to atomically claim a sequence of `count` bits in a single\n// field at `idx` in `bitmap`. Returns `true` on success.\ninline bool _mi_bitmap_try_find_claim_field(mi_bitmap_t bitmap, size_t idx, const size_t count, mi_bitmap_index_t* bitmap_idx)\n{\n  mi_assert_internal(bitmap_idx != NULL);\n  mi_assert_internal(count <= MI_BITMAP_FIELD_BITS);\n  mi_assert_internal(count > 0);\n  mi_bitmap_field_t* field = &bitmap[idx];\n  size_t map  = mi_atomic_load_relaxed(field);\n  if (map==MI_BITMAP_FIELD_FULL) return false; // short cut\n\n  // search for 0-bit sequence of length count\n  const size_t mask = mi_bitmap_mask_(count, 0);\n  const size_t bitidx_max = MI_BITMAP_FIELD_BITS - count;\n\n#ifdef MI_HAVE_FAST_BITSCAN\n  size_t bitidx = mi_ctz(~map);    // quickly find the first zero bit if possible\n#else\n  size_t bitidx = 0;               // otherwise start at 0\n#endif\n  size_t m = (mask << bitidx);     // invariant: m == mask shifted by bitidx\n\n  // scan linearly for a free range of zero bits\n  while (bitidx <= bitidx_max) {\n    const size_t mapm = (map & m);\n    if (mapm == 0) {  // are the mask bits free at bitidx?\n      mi_assert_internal((m >> bitidx) == mask); // no overflow?\n      const size_t newmap = (map | m);\n      mi_assert_internal((newmap^map) >> bitidx == mask);\n      if (!mi_atomic_cas_strong_acq_rel(field, &map, newmap)) {  // TODO: use weak cas here?\n        // no success, another thread claimed concurrently.. keep going (with updated `map`)\n        continue;\n      }\n      else {\n        // success, we claimed the bits!\n        *bitmap_idx = mi_bitmap_index_create(idx, bitidx);\n        return true;\n      }\n    }\n    else {\n      // on to the next bit range\n#ifdef MI_HAVE_FAST_BITSCAN\n      mi_assert_internal(mapm != 0);\n      const size_t shift = (count == 1 ? 1 : (MI_SIZE_BITS - mi_clz(mapm) - bitidx));\n      mi_assert_internal(shift > 0 && shift <= count);\n#else\n      const size_t shift = 1;\n#endif\n      bitidx += shift;\n      m <<= shift;\n    }\n  }\n  // no bits found\n  return false;\n}\n\n// Find `count` bits of 0 and set them to 1 atomically; returns `true` on success.\n// Starts at idx, and wraps around to search in all `bitmap_fields` fields.\n// `count` can be at most MI_BITMAP_FIELD_BITS and will never cross fields.\nbool _mi_bitmap_try_find_from_claim(mi_bitmap_t bitmap, const size_t bitmap_fields, const size_t start_field_idx, const size_t count, mi_bitmap_index_t* bitmap_idx) {\n  size_t idx = start_field_idx;\n  for (size_t visited = 0; visited < bitmap_fields; visited++, idx++) {\n    if (idx >= bitmap_fields) { idx = 0; } // wrap\n    if (_mi_bitmap_try_find_claim_field(bitmap, idx, count, bitmap_idx)) {\n      return true;\n    }\n  }\n  return false;\n}\n\n// Like _mi_bitmap_try_find_from_claim but with an extra predicate that must be fullfilled\nbool _mi_bitmap_try_find_from_claim_pred(mi_bitmap_t bitmap, const size_t bitmap_fields, \n            const size_t start_field_idx, const size_t count, \n            mi_bitmap_pred_fun_t pred_fun, void* pred_arg,            \n            mi_bitmap_index_t* bitmap_idx) {\n  size_t idx = start_field_idx;\n  for (size_t visited = 0; visited < bitmap_fields; visited++, idx++) {\n    if (idx >= bitmap_fields) idx = 0; // wrap\n    if (_mi_bitmap_try_find_claim_field(bitmap, idx, count, bitmap_idx)) {\n      if (pred_fun == NULL || pred_fun(*bitmap_idx, pred_arg)) { \n        return true;\n      }\n      // predicate returned false, unclaim and look further\n      _mi_bitmap_unclaim(bitmap, bitmap_fields, count, *bitmap_idx);\n    }\n  }\n  return false;\n}\n\n// Set `count` bits at `bitmap_idx` to 0 atomically\n// Returns `true` if all `count` bits were 1 previously.\nbool _mi_bitmap_unclaim(mi_bitmap_t bitmap, size_t bitmap_fields, size_t count, mi_bitmap_index_t bitmap_idx) {\n  const size_t idx = mi_bitmap_index_field(bitmap_idx);\n  const size_t bitidx = mi_bitmap_index_bit_in_field(bitmap_idx);\n  const size_t mask = mi_bitmap_mask_(count, bitidx);\n  mi_assert_internal(bitmap_fields > idx); MI_UNUSED(bitmap_fields);\n  // mi_assert_internal((bitmap[idx] & mask) == mask);\n  const size_t prev = mi_atomic_and_acq_rel(&bitmap[idx], ~mask);\n  return ((prev & mask) == mask);\n}\n\n\n// Set `count` bits at `bitmap_idx` to 1 atomically\n// Returns `true` if all `count` bits were 0 previously. `any_zero` is `true` if there was at least one zero bit.\nbool _mi_bitmap_claim(mi_bitmap_t bitmap, size_t bitmap_fields, size_t count, mi_bitmap_index_t bitmap_idx, bool* any_zero) {\n  const size_t idx = mi_bitmap_index_field(bitmap_idx);\n  const size_t bitidx = mi_bitmap_index_bit_in_field(bitmap_idx);\n  const size_t mask = mi_bitmap_mask_(count, bitidx);\n  mi_assert_internal(bitmap_fields > idx); MI_UNUSED(bitmap_fields);\n  //mi_assert_internal(any_zero != NULL || (bitmap[idx] & mask) == 0);\n  size_t prev = mi_atomic_or_acq_rel(&bitmap[idx], mask);\n  if (any_zero != NULL) { *any_zero = ((prev & mask) != mask); }\n  return ((prev & mask) == 0);\n}\n\n// Returns `true` if all `count` bits were 1. `any_ones` is `true` if there was at least one bit set to one.\nstatic bool mi_bitmap_is_claimedx(mi_bitmap_t bitmap, size_t bitmap_fields, size_t count, mi_bitmap_index_t bitmap_idx, bool* any_ones) {\n  const size_t idx = mi_bitmap_index_field(bitmap_idx);\n  const size_t bitidx = mi_bitmap_index_bit_in_field(bitmap_idx);\n  const size_t mask = mi_bitmap_mask_(count, bitidx);\n  mi_assert_internal(bitmap_fields > idx); MI_UNUSED(bitmap_fields);\n  const size_t field = mi_atomic_load_relaxed(&bitmap[idx]);\n  if (any_ones != NULL) { *any_ones = ((field & mask) != 0); }\n  return ((field & mask) == mask);\n}\n\n// Try to set `count` bits at `bitmap_idx` from 0 to 1 atomically.\n// Returns `true` if successful when all previous `count` bits were 0.\nbool _mi_bitmap_try_claim(mi_bitmap_t bitmap, size_t bitmap_fields, size_t count, mi_bitmap_index_t bitmap_idx) {\n  const size_t idx = mi_bitmap_index_field(bitmap_idx);\n  const size_t bitidx = mi_bitmap_index_bit_in_field(bitmap_idx);\n  const size_t mask = mi_bitmap_mask_(count, bitidx);\n  mi_assert_internal(bitmap_fields > idx); MI_UNUSED(bitmap_fields);\n  size_t expected = mi_atomic_load_relaxed(&bitmap[idx]);\n  do  {\n    if ((expected & mask) != 0) return false;\n  }\n  while (!mi_atomic_cas_strong_acq_rel(&bitmap[idx], &expected, expected | mask));\n  mi_assert_internal((expected & mask) == 0);\n  return true;\n}\n\n\nbool _mi_bitmap_is_claimed(mi_bitmap_t bitmap, size_t bitmap_fields, size_t count, mi_bitmap_index_t bitmap_idx) {\n  return mi_bitmap_is_claimedx(bitmap, bitmap_fields, count, bitmap_idx, NULL);\n}\n\nbool _mi_bitmap_is_any_claimed(mi_bitmap_t bitmap, size_t bitmap_fields, size_t count, mi_bitmap_index_t bitmap_idx) {\n  bool any_ones;\n  mi_bitmap_is_claimedx(bitmap, bitmap_fields, count, bitmap_idx, &any_ones);\n  return any_ones;\n}\n\n\n//--------------------------------------------------------------------------\n// the `_across` functions work on bitmaps where sequences can cross over\n// between the fields. This is used in arena allocation\n//--------------------------------------------------------------------------\n\n// Try to atomically claim a sequence of `count` bits starting from the field\n// at `idx` in `bitmap` and crossing into subsequent fields. Returns `true` on success.\n// Only needs to consider crossing into the next fields (see `mi_bitmap_try_find_from_claim_across`)\nstatic bool mi_bitmap_try_find_claim_field_across(mi_bitmap_t bitmap, size_t bitmap_fields, size_t idx, const size_t count, const size_t retries, mi_bitmap_index_t* bitmap_idx)\n{\n  mi_assert_internal(bitmap_idx != NULL);\n\n  // check initial trailing zeros\n  mi_bitmap_field_t* field = &bitmap[idx];\n  size_t map = mi_atomic_load_relaxed(field);\n  const size_t initial = mi_clz(map);  // count of initial zeros starting at idx\n  mi_assert_internal(initial <= MI_BITMAP_FIELD_BITS);\n  if (initial == 0)     return false;\n  if (initial >= count) return _mi_bitmap_try_find_claim_field(bitmap, idx, count, bitmap_idx);    // no need to cross fields (this case won't happen for us)\n  if (_mi_divide_up(count - initial, MI_BITMAP_FIELD_BITS) >= (bitmap_fields - idx)) return false; // not enough entries\n\n  // scan ahead\n  size_t found = initial;\n  size_t mask = 0;     // mask bits for the final field\n  while(found < count) {\n    field++;\n    map = mi_atomic_load_relaxed(field);\n    const size_t mask_bits = (found + MI_BITMAP_FIELD_BITS <= count ? MI_BITMAP_FIELD_BITS : (count - found));\n    mi_assert_internal(mask_bits > 0 && mask_bits <= MI_BITMAP_FIELD_BITS);\n    mask = mi_bitmap_mask_(mask_bits, 0);\n    if ((map & mask) != 0) return false;  // some part is already claimed\n    found += mask_bits;\n  }\n  mi_assert_internal(field < &bitmap[bitmap_fields]);\n\n  // we found a range of contiguous zeros up to the final field; mask contains mask in the final field\n  // now try to claim the range atomically\n  mi_bitmap_field_t* const final_field = field;\n  const size_t final_mask = mask;\n  mi_bitmap_field_t* const initial_field = &bitmap[idx];\n  const size_t initial_idx = MI_BITMAP_FIELD_BITS - initial;\n  const size_t initial_mask = mi_bitmap_mask_(initial, initial_idx);\n\n  // initial field\n  size_t newmap;\n  field = initial_field;\n  map = mi_atomic_load_relaxed(field);\n  do {\n    newmap = (map | initial_mask);\n    if ((map & initial_mask) != 0) { goto rollback; };\n  } while (!mi_atomic_cas_strong_acq_rel(field, &map, newmap));\n\n  // intermediate fields\n  while (++field < final_field) {\n    newmap = MI_BITMAP_FIELD_FULL;\n    map = 0;\n    if (!mi_atomic_cas_strong_acq_rel(field, &map, newmap)) { goto rollback; }\n  }\n\n  // final field\n  mi_assert_internal(field == final_field);\n  map = mi_atomic_load_relaxed(field);\n  do {\n    newmap = (map | final_mask);\n    if ((map & final_mask) != 0) { goto rollback; }\n  } while (!mi_atomic_cas_strong_acq_rel(field, &map, newmap));\n\n  // claimed!\n  *bitmap_idx = mi_bitmap_index_create(idx, initial_idx);\n  return true;\n\nrollback:\n  // roll back intermediate fields\n  // (we just failed to claim `field` so decrement first)\n  while (--field > initial_field) {\n    newmap = 0;\n    map = MI_BITMAP_FIELD_FULL;\n    mi_assert_internal(mi_atomic_load_relaxed(field) == map);\n    mi_atomic_store_release(field, newmap);\n  }\n  if (field == initial_field) {               // (if we failed on the initial field, `field + 1 == initial_field`)\n    map = mi_atomic_load_relaxed(field);\n    do {\n      mi_assert_internal((map & initial_mask) == initial_mask);\n      newmap = (map & ~initial_mask);\n    } while (!mi_atomic_cas_strong_acq_rel(field, &map, newmap));\n  }\n  mi_stat_counter_increase(_mi_stats_main.arena_rollback_count,1);\n  // retry? (we make a recursive call instead of goto to be able to use const declarations)\n  if (retries <= 2) {\n    return mi_bitmap_try_find_claim_field_across(bitmap, bitmap_fields, idx, count, retries+1, bitmap_idx);\n  }\n  else {\n    return false;\n  }\n}\n\n\n// Find `count` bits of zeros and set them to 1 atomically; returns `true` on success.\n// Starts at idx, and wraps around to search in all `bitmap_fields` fields.\nbool _mi_bitmap_try_find_from_claim_across(mi_bitmap_t bitmap, const size_t bitmap_fields, const size_t start_field_idx, const size_t count, mi_bitmap_index_t* bitmap_idx) {\n  mi_assert_internal(count > 0);\n  if (count <= 2) {\n    // we don't bother with crossover fields for small counts\n    return _mi_bitmap_try_find_from_claim(bitmap, bitmap_fields, start_field_idx, count, bitmap_idx);\n  }\n\n  // visit the fields\n  size_t idx = start_field_idx;\n  for (size_t visited = 0; visited < bitmap_fields; visited++, idx++) {\n    if (idx >= bitmap_fields) { idx = 0; } // wrap\n    // first try to claim inside a field\n    /*\n    if (count <= MI_BITMAP_FIELD_BITS) {\n      if (_mi_bitmap_try_find_claim_field(bitmap, idx, count, bitmap_idx)) {\n        return true;\n      }\n    }\n    */\n    // if that fails, then try to claim across fields\n    if (mi_bitmap_try_find_claim_field_across(bitmap, bitmap_fields, idx, count, 0, bitmap_idx)) {\n      return true;\n    }\n  }\n  return false;\n}\n\n// Helper for masks across fields; returns the mid count, post_mask may be 0\nstatic size_t mi_bitmap_mask_across(mi_bitmap_index_t bitmap_idx, size_t bitmap_fields, size_t count, size_t* pre_mask, size_t* mid_mask, size_t* post_mask) {\n  MI_UNUSED(bitmap_fields);\n  const size_t bitidx = mi_bitmap_index_bit_in_field(bitmap_idx);\n  if mi_likely(bitidx + count <= MI_BITMAP_FIELD_BITS) {\n    *pre_mask = mi_bitmap_mask_(count, bitidx);\n    *mid_mask = 0;\n    *post_mask = 0;\n    mi_assert_internal(mi_bitmap_index_field(bitmap_idx) < bitmap_fields);\n    return 0;\n  }\n  else {\n    const size_t pre_bits = MI_BITMAP_FIELD_BITS - bitidx;\n    mi_assert_internal(pre_bits < count);\n    *pre_mask = mi_bitmap_mask_(pre_bits, bitidx);\n    count -= pre_bits;\n    const size_t mid_count = (count / MI_BITMAP_FIELD_BITS);\n    *mid_mask = MI_BITMAP_FIELD_FULL;\n    count %= MI_BITMAP_FIELD_BITS;\n    *post_mask = (count==0 ? 0 : mi_bitmap_mask_(count, 0));\n    mi_assert_internal(mi_bitmap_index_field(bitmap_idx) + mid_count + (count==0 ? 0 : 1) < bitmap_fields);\n    return mid_count;\n  }\n}\n\n// Set `count` bits at `bitmap_idx` to 0 atomically\n// Returns `true` if all `count` bits were 1 previously.\nbool _mi_bitmap_unclaim_across(mi_bitmap_t bitmap, size_t bitmap_fields, size_t count, mi_bitmap_index_t bitmap_idx) {\n  size_t idx = mi_bitmap_index_field(bitmap_idx);\n  size_t pre_mask;\n  size_t mid_mask;\n  size_t post_mask;\n  size_t mid_count = mi_bitmap_mask_across(bitmap_idx, bitmap_fields, count, &pre_mask, &mid_mask, &post_mask);\n  bool all_one = true;\n  mi_bitmap_field_t* field = &bitmap[idx];\n  size_t prev = mi_atomic_and_acq_rel(field++, ~pre_mask);   // clear first part\n  if ((prev & pre_mask) != pre_mask) all_one = false;\n  while(mid_count-- > 0) {\n    prev = mi_atomic_and_acq_rel(field++, ~mid_mask);        // clear mid part\n    if ((prev & mid_mask) != mid_mask) all_one = false;\n  }\n  if (post_mask!=0) {\n    prev = mi_atomic_and_acq_rel(field, ~post_mask);         // clear end part\n    if ((prev & post_mask) != post_mask) all_one = false;\n  }\n  return all_one;\n}\n\n// Set `count` bits at `bitmap_idx` to 1 atomically\n// Returns `true` if all `count` bits were 0 previously. `any_zero` is `true` if there was at least one zero bit.\nbool _mi_bitmap_claim_across(mi_bitmap_t bitmap, size_t bitmap_fields, size_t count, mi_bitmap_index_t bitmap_idx, bool* pany_zero) {\n  size_t idx = mi_bitmap_index_field(bitmap_idx);\n  size_t pre_mask;\n  size_t mid_mask;\n  size_t post_mask;\n  size_t mid_count = mi_bitmap_mask_across(bitmap_idx, bitmap_fields, count, &pre_mask, &mid_mask, &post_mask);\n  bool all_zero = true;\n  bool any_zero = false;\n  _Atomic(size_t)*field = &bitmap[idx];\n  size_t prev = mi_atomic_or_acq_rel(field++, pre_mask);\n  if ((prev & pre_mask) != 0) all_zero = false;\n  if ((prev & pre_mask) != pre_mask) any_zero = true;\n  while (mid_count-- > 0) {\n    prev = mi_atomic_or_acq_rel(field++, mid_mask);\n    if ((prev & mid_mask) != 0) all_zero = false;\n    if ((prev & mid_mask) != mid_mask) any_zero = true;\n  }\n  if (post_mask!=0) {\n    prev = mi_atomic_or_acq_rel(field, post_mask);\n    if ((prev & post_mask) != 0) all_zero = false;\n    if ((prev & post_mask) != post_mask) any_zero = true;\n  }\n  if (pany_zero != NULL) { *pany_zero = any_zero; }\n  return all_zero;\n}\n\n\n// Returns `true` if all `count` bits were 1.\n// `any_ones` is `true` if there was at least one bit set to one.\nstatic bool mi_bitmap_is_claimedx_across(mi_bitmap_t bitmap, size_t bitmap_fields, size_t count, mi_bitmap_index_t bitmap_idx, bool* pany_ones) {\n  size_t idx = mi_bitmap_index_field(bitmap_idx);\n  size_t pre_mask;\n  size_t mid_mask;\n  size_t post_mask;\n  size_t mid_count = mi_bitmap_mask_across(bitmap_idx, bitmap_fields, count, &pre_mask, &mid_mask, &post_mask);\n  bool all_ones = true;\n  bool any_ones = false;\n  mi_bitmap_field_t* field = &bitmap[idx];\n  size_t prev = mi_atomic_load_relaxed(field++);\n  if ((prev & pre_mask) != pre_mask) all_ones = false;\n  if ((prev & pre_mask) != 0) any_ones = true;\n  while (mid_count-- > 0) {\n    prev = mi_atomic_load_relaxed(field++);\n    if ((prev & mid_mask) != mid_mask) all_ones = false;\n    if ((prev & mid_mask) != 0) any_ones = true;\n  }\n  if (post_mask!=0) {\n    prev = mi_atomic_load_relaxed(field);\n    if ((prev & post_mask) != post_mask) all_ones = false;\n    if ((prev & post_mask) != 0) any_ones = true;\n  }\n  if (pany_ones != NULL) { *pany_ones = any_ones; }\n  return all_ones;\n}\n\nbool _mi_bitmap_is_claimed_across(mi_bitmap_t bitmap, size_t bitmap_fields, size_t count, mi_bitmap_index_t bitmap_idx) {\n  return mi_bitmap_is_claimedx_across(bitmap, bitmap_fields, count, bitmap_idx, NULL);\n}\n\nbool _mi_bitmap_is_any_claimed_across(mi_bitmap_t bitmap, size_t bitmap_fields, size_t count, mi_bitmap_index_t bitmap_idx) {\n  bool any_ones;\n  mi_bitmap_is_claimedx_across(bitmap, bitmap_fields, count, bitmap_idx, &any_ones);\n  return any_ones;\n}\n"
  },
  {
    "path": "third-party/mimalloc/src/bitmap.h",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2019-2023 Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n/* ----------------------------------------------------------------------------\nConcurrent bitmap that can set/reset sequences of bits atomically,\nrepresented as an array of fields where each field is a machine word (`size_t`)\n\nThere are two api's; the standard one cannot have sequences that cross\nbetween the bitmap fields (and a sequence must be <= MI_BITMAP_FIELD_BITS).\n(this is used in region allocation)\n\nThe `_across` postfixed functions do allow sequences that can cross over\nbetween the fields. (This is used in arena allocation)\n---------------------------------------------------------------------------- */\n#pragma once\n#ifndef MI_BITMAP_H\n#define MI_BITMAP_H\n\n/* -----------------------------------------------------------\n  Bitmap definition\n----------------------------------------------------------- */\n\n#define MI_BITMAP_FIELD_BITS   (8*MI_SIZE_SIZE)\n#define MI_BITMAP_FIELD_FULL   (~((size_t)0))   // all bits set\n\n// An atomic bitmap of `size_t` fields\ntypedef _Atomic(size_t)  mi_bitmap_field_t;\ntypedef mi_bitmap_field_t*  mi_bitmap_t;\n\n// A bitmap index is the index of the bit in a bitmap.\ntypedef size_t mi_bitmap_index_t;\n\n// Create a bit index.\nstatic inline mi_bitmap_index_t mi_bitmap_index_create_ex(size_t idx, size_t bitidx) {\n  mi_assert_internal(bitidx <= MI_BITMAP_FIELD_BITS);\n  return (idx*MI_BITMAP_FIELD_BITS) + bitidx;\n}\nstatic inline mi_bitmap_index_t mi_bitmap_index_create(size_t idx, size_t bitidx) {\n  mi_assert_internal(bitidx < MI_BITMAP_FIELD_BITS);\n  return mi_bitmap_index_create_ex(idx,bitidx);\n}\n\n// Create a bit index.\nstatic inline mi_bitmap_index_t mi_bitmap_index_create_from_bit(size_t full_bitidx) {  \n  return mi_bitmap_index_create(full_bitidx / MI_BITMAP_FIELD_BITS, full_bitidx % MI_BITMAP_FIELD_BITS);\n}\n\n// Get the field index from a bit index.\nstatic inline size_t mi_bitmap_index_field(mi_bitmap_index_t bitmap_idx) {\n  return (bitmap_idx / MI_BITMAP_FIELD_BITS);\n}\n\n// Get the bit index in a bitmap field\nstatic inline size_t mi_bitmap_index_bit_in_field(mi_bitmap_index_t bitmap_idx) {\n  return (bitmap_idx % MI_BITMAP_FIELD_BITS);\n}\n\n// Get the full bit index\nstatic inline size_t mi_bitmap_index_bit(mi_bitmap_index_t bitmap_idx) {\n  return bitmap_idx;\n}\n\n/* -----------------------------------------------------------\n  Claim a bit sequence atomically\n----------------------------------------------------------- */\n\n// Try to atomically claim a sequence of `count` bits in a single\n// field at `idx` in `bitmap`. Returns `true` on success.\nbool _mi_bitmap_try_find_claim_field(mi_bitmap_t bitmap, size_t idx, const size_t count, mi_bitmap_index_t* bitmap_idx);\n\n// Starts at idx, and wraps around to search in all `bitmap_fields` fields.\n// For now, `count` can be at most MI_BITMAP_FIELD_BITS and will never cross fields.\nbool _mi_bitmap_try_find_from_claim(mi_bitmap_t bitmap, const size_t bitmap_fields, const size_t start_field_idx, const size_t count, mi_bitmap_index_t* bitmap_idx);\n\n// Like _mi_bitmap_try_find_from_claim but with an extra predicate that must be fullfilled\ntypedef bool (mi_cdecl *mi_bitmap_pred_fun_t)(mi_bitmap_index_t bitmap_idx, void* pred_arg);\nbool _mi_bitmap_try_find_from_claim_pred(mi_bitmap_t bitmap, const size_t bitmap_fields, const size_t start_field_idx, const size_t count, mi_bitmap_pred_fun_t pred_fun, void* pred_arg, mi_bitmap_index_t* bitmap_idx);\n\n// Set `count` bits at `bitmap_idx` to 0 atomically\n// Returns `true` if all `count` bits were 1 previously.\nbool _mi_bitmap_unclaim(mi_bitmap_t bitmap, size_t bitmap_fields, size_t count, mi_bitmap_index_t bitmap_idx);\n\n// Try to set `count` bits at `bitmap_idx` from 0 to 1 atomically. \n// Returns `true` if successful when all previous `count` bits were 0.\nbool _mi_bitmap_try_claim(mi_bitmap_t bitmap, size_t bitmap_fields, size_t count, mi_bitmap_index_t bitmap_idx);\n\n// Set `count` bits at `bitmap_idx` to 1 atomically\n// Returns `true` if all `count` bits were 0 previously. `any_zero` is `true` if there was at least one zero bit.\nbool _mi_bitmap_claim(mi_bitmap_t bitmap, size_t bitmap_fields, size_t count, mi_bitmap_index_t bitmap_idx, bool* any_zero);\n\nbool _mi_bitmap_is_claimed(mi_bitmap_t bitmap, size_t bitmap_fields, size_t count, mi_bitmap_index_t bitmap_idx);\nbool _mi_bitmap_is_any_claimed(mi_bitmap_t bitmap, size_t bitmap_fields, size_t count, mi_bitmap_index_t bitmap_idx);\n\n\n//--------------------------------------------------------------------------\n// the `_across` functions work on bitmaps where sequences can cross over\n// between the fields. This is used in arena allocation\n//--------------------------------------------------------------------------\n\n// Find `count` bits of zeros and set them to 1 atomically; returns `true` on success.\n// Starts at idx, and wraps around to search in all `bitmap_fields` fields.\nbool _mi_bitmap_try_find_from_claim_across(mi_bitmap_t bitmap, const size_t bitmap_fields, const size_t start_field_idx, const size_t count, mi_bitmap_index_t* bitmap_idx);\n\n// Set `count` bits at `bitmap_idx` to 0 atomically\n// Returns `true` if all `count` bits were 1 previously.\nbool _mi_bitmap_unclaim_across(mi_bitmap_t bitmap, size_t bitmap_fields, size_t count, mi_bitmap_index_t bitmap_idx);\n\n// Set `count` bits at `bitmap_idx` to 1 atomically\n// Returns `true` if all `count` bits were 0 previously. `any_zero` is `true` if there was at least one zero bit.\nbool _mi_bitmap_claim_across(mi_bitmap_t bitmap, size_t bitmap_fields, size_t count, mi_bitmap_index_t bitmap_idx, bool* pany_zero);\n\nbool _mi_bitmap_is_claimed_across(mi_bitmap_t bitmap, size_t bitmap_fields, size_t count, mi_bitmap_index_t bitmap_idx);\nbool _mi_bitmap_is_any_claimed_across(mi_bitmap_t bitmap, size_t bitmap_fields, size_t count, mi_bitmap_index_t bitmap_idx);\n\n#endif\n"
  },
  {
    "path": "third-party/mimalloc/src/free.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2024, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#if !defined(MI_IN_ALLOC_C)\n#error \"this file should be included from 'alloc.c' (so aliases can work from alloc-override)\"\n// add includes help an IDE\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"mimalloc/prim.h\"   // _mi_prim_thread_id()\n#endif\n\n// forward declarations\nstatic void   mi_check_padding(const mi_page_t* page, const mi_block_t* block);\nstatic bool   mi_check_is_double_free(const mi_page_t* page, const mi_block_t* block);\nstatic size_t mi_page_usable_size_of(const mi_page_t* page, const mi_block_t* block);\nstatic void   mi_stat_free(const mi_page_t* page, const mi_block_t* block);\n\n\n// ------------------------------------------------------\n// Free\n// ------------------------------------------------------\n\n// forward declaration of multi-threaded free (`_mt`) (or free in huge block if compiled with MI_HUGE_PAGE_ABANDON)\nstatic mi_decl_noinline void mi_free_block_mt(mi_page_t* page, mi_segment_t* segment, mi_block_t* block);\n\n// regular free of a (thread local) block pointer\n// fast path written carefully to prevent spilling on the stack\nstatic inline void mi_free_block_local(mi_page_t* page, mi_block_t* block, bool track_stats, bool check_full)\n{\n  // checks\n  if mi_unlikely(mi_check_is_double_free(page, block)) return;\n  mi_check_padding(page, block);\n  if (track_stats) { mi_stat_free(page, block); }\n  #if (MI_DEBUG>0) && !MI_TRACK_ENABLED  && !MI_TSAN && !MI_GUARDED\n  if (!mi_page_is_huge(page)) {   // huge page content may be already decommitted\n    memset(block, MI_DEBUG_FREED, mi_page_block_size(page));\n  }\n  #endif\n  if (track_stats) { mi_track_free_size(block, mi_page_usable_size_of(page, block)); } // faster then mi_usable_size as we already know the page and that p is unaligned\n\n  // actual free: push on the local free list\n  mi_block_set_next(page, block, page->local_free);\n  page->local_free = block;\n  if mi_unlikely(--page->used == 0) {\n    _mi_page_retire(page);\n  }\n  else if mi_unlikely(check_full && mi_page_is_in_full(page)) {\n    _mi_page_unfull(page);\n  }\n}\n\n// Adjust a block that was allocated aligned, to the actual start of the block in the page.\n// note: this can be called from `mi_free_generic_mt` where a non-owning thread accesses the\n// `page_start` and `block_size` fields; however these are constant and the page won't be\n// deallocated (as the block we are freeing keeps it alive) and thus safe to read concurrently.\nmi_block_t* _mi_page_ptr_unalign(const mi_page_t* page, const void* p) {\n  mi_assert_internal(page!=NULL && p!=NULL);\n\n  size_t diff = (uint8_t*)p - page->page_start;\n  size_t adjust;\n  if mi_likely(page->block_size_shift != 0) {\n    adjust = diff & (((size_t)1 << page->block_size_shift) - 1);\n  }\n  else {\n    adjust = diff % mi_page_block_size(page);\n  }\n\n  return (mi_block_t*)((uintptr_t)p - adjust);\n}\n\n// forward declaration for a MI_GUARDED build\n#if MI_GUARDED\nstatic void mi_block_unguard(mi_page_t* page, mi_block_t* block, void* p); // forward declaration\nstatic inline void mi_block_check_unguard(mi_page_t* page, mi_block_t* block, void* p) {\n  if (mi_block_ptr_is_guarded(block, p)) { mi_block_unguard(page, block, p); }\n}\n#else\nstatic inline void mi_block_check_unguard(mi_page_t* page, mi_block_t* block, void* p) {\n  MI_UNUSED(page); MI_UNUSED(block); MI_UNUSED(p);\n}\n#endif\n\n// free a local pointer  (page parameter comes first for better codegen)\nstatic void mi_decl_noinline mi_free_generic_local(mi_page_t* page, mi_segment_t* segment, void* p) mi_attr_noexcept {\n  MI_UNUSED(segment);\n  mi_block_t* const block = (mi_page_has_aligned(page) ? _mi_page_ptr_unalign(page, p) : (mi_block_t*)p);\n  mi_block_check_unguard(page, block, p);\n  mi_free_block_local(page, block, true /* track stats */, true /* check for a full page */);\n}\n\n// free a pointer owned by another thread (page parameter comes first for better codegen)\nstatic void mi_decl_noinline mi_free_generic_mt(mi_page_t* page, mi_segment_t* segment, void* p) mi_attr_noexcept {\n  mi_block_t* const block = _mi_page_ptr_unalign(page, p); // don't check `has_aligned` flag to avoid a race (issue #865)\n  mi_block_check_unguard(page, block, p);\n  mi_free_block_mt(page, segment, block);\n}\n\n// generic free (for runtime integration)\nvoid mi_decl_noinline _mi_free_generic(mi_segment_t* segment, mi_page_t* page, bool is_local, void* p) mi_attr_noexcept {\n  if (is_local) mi_free_generic_local(page,segment,p);\n           else mi_free_generic_mt(page,segment,p);\n}\n\n// Get the segment data belonging to a pointer\n// This is just a single `and` in release mode but does further checks in debug mode\n// (and secure mode) to see if this was a valid pointer.\nstatic inline mi_segment_t* mi_checked_ptr_segment(const void* p, const char* msg)\n{\n  MI_UNUSED(msg);\n\n  #if (MI_DEBUG>0)\n  if mi_unlikely(((uintptr_t)p & (MI_INTPTR_SIZE - 1)) != 0 && !mi_option_is_enabled(mi_option_guarded_precise)) {\n    _mi_error_message(EINVAL, \"%s: invalid (unaligned) pointer: %p\\n\", msg, p);\n    return NULL;\n  }\n  #endif\n\n  mi_segment_t* const segment = _mi_ptr_segment(p);\n  if mi_unlikely(segment==NULL) return segment;\n\n  #if (MI_DEBUG>0)\n  if mi_unlikely(!mi_is_in_heap_region(p)) {\n  #if (MI_INTPTR_SIZE == 8 && defined(__linux__))\n    if (((uintptr_t)p >> 40) != 0x7F) { // linux tends to align large blocks above 0x7F000000000 (issue #640)\n  #else\n    {\n  #endif\n      _mi_warning_message(\"%s: pointer might not point to a valid heap region: %p\\n\"\n        \"(this may still be a valid very large allocation (over 64MiB))\\n\", msg, p);\n      if mi_likely(_mi_ptr_cookie(segment) == segment->cookie) {\n        _mi_warning_message(\"(yes, the previous pointer %p was valid after all)\\n\", p);\n      }\n    }\n  }\n  #endif\n  #if (MI_DEBUG>0 || MI_SECURE>=4)\n  if mi_unlikely(_mi_ptr_cookie(segment) != segment->cookie) {\n    _mi_error_message(EINVAL, \"%s: pointer does not point to a valid heap space: %p\\n\", msg, p);\n    return NULL;\n  }\n  #endif\n\n  return segment;\n}\n\n// Free a block\n// Fast path written carefully to prevent register spilling on the stack\nvoid mi_free(void* p) mi_attr_noexcept\n{\n  mi_segment_t* const segment = mi_checked_ptr_segment(p,\"mi_free\");\n  if mi_unlikely(segment==NULL) return;\n\n  const bool is_local = (_mi_prim_thread_id() == mi_atomic_load_relaxed(&segment->thread_id));\n  mi_page_t* const page = _mi_segment_page_of(segment, p);\n\n  if mi_likely(is_local) {                        // thread-local free?\n    if mi_likely(page->flags.full_aligned == 0) { // and it is not a full page (full pages need to move from the full bin), nor has aligned blocks (aligned blocks need to be unaligned)\n      // thread-local, aligned, and not a full page\n      mi_block_t* const block = (mi_block_t*)p;\n      mi_free_block_local(page, block, true /* track stats */, false /* no need to check if the page is full */);\n    }\n    else {\n      // page is full or contains (inner) aligned blocks; use generic path\n      mi_free_generic_local(page, segment, p);\n    }\n  }\n  else {\n    // not thread-local; use generic path\n    mi_free_generic_mt(page, segment, p);\n  }\n}\n\n// return true if successful\nbool _mi_free_delayed_block(mi_block_t* block) {\n  // get segment and page\n  mi_assert_internal(block!=NULL);\n  const mi_segment_t* const segment = _mi_ptr_segment(block);\n  mi_assert_internal(_mi_ptr_cookie(segment) == segment->cookie);\n  mi_assert_internal(_mi_thread_id() == segment->thread_id);\n  mi_page_t* const page = _mi_segment_page_of(segment, block);\n\n  // Clear the no-delayed flag so delayed freeing is used again for this page.\n  // This must be done before collecting the free lists on this page -- otherwise\n  // some blocks may end up in the page `thread_free` list with no blocks in the\n  // heap `thread_delayed_free` list which may cause the page to be never freed!\n  // (it would only be freed if we happen to scan it in `mi_page_queue_find_free_ex`)\n  if (!_mi_page_try_use_delayed_free(page, MI_USE_DELAYED_FREE, false /* dont overwrite never delayed */)) {\n    return false;\n  }\n\n  // collect all other non-local frees (move from `thread_free` to `free`) to ensure up-to-date `used` count\n  _mi_page_free_collect(page, false);\n\n  // and free the block (possibly freeing the page as well since `used` is updated)\n  mi_free_block_local(page, block, false /* stats have already been adjusted */, true /* check for a full page */);\n  return true;\n}\n\n// ------------------------------------------------------\n// Multi-threaded Free (`_mt`)\n// ------------------------------------------------------\n\n// Push a block that is owned by another thread on its page-local thread free\n// list or it's heap delayed free list. Such blocks are later collected by\n// the owning thread in `_mi_free_delayed_block`.\nstatic void mi_decl_noinline mi_free_block_delayed_mt( mi_page_t* page, mi_block_t* block )\n{\n  // Try to put the block on either the page-local thread free list,\n  // or the heap delayed free list (if this is the first non-local free in that page)\n  mi_thread_free_t tfreex;\n  bool use_delayed;\n  mi_thread_free_t tfree = mi_atomic_load_relaxed(&page->xthread_free);\n  do {\n    use_delayed = (mi_tf_delayed(tfree) == MI_USE_DELAYED_FREE);\n    if mi_unlikely(use_delayed) {\n      // unlikely: this only happens on the first concurrent free in a page that is in the full list\n      tfreex = mi_tf_set_delayed(tfree,MI_DELAYED_FREEING);\n    }\n    else {\n      // usual: directly add to page thread_free list\n      mi_block_set_next(page, block, mi_tf_block(tfree));\n      tfreex = mi_tf_set_block(tfree,block);\n    }\n  } while (!mi_atomic_cas_weak_release(&page->xthread_free, &tfree, tfreex));\n\n  // If this was the first non-local free, we need to push it on the heap delayed free list instead\n  if mi_unlikely(use_delayed) {\n    // racy read on `heap`, but ok because MI_DELAYED_FREEING is set (see `mi_heap_delete` and `mi_heap_collect_abandon`)\n    mi_heap_t* const heap = (mi_heap_t*)(mi_atomic_load_acquire(&page->xheap)); //mi_page_heap(page);\n    mi_assert_internal(heap != NULL);\n    if (heap != NULL) {\n      // add to the delayed free list of this heap. (do this atomically as the lock only protects heap memory validity)\n      mi_block_t* dfree = mi_atomic_load_ptr_relaxed(mi_block_t, &heap->thread_delayed_free);\n      do {\n        mi_block_set_nextx(heap,block,dfree, heap->keys);\n      } while (!mi_atomic_cas_ptr_weak_release(mi_block_t,&heap->thread_delayed_free, &dfree, block));\n    }\n\n    // and reset the MI_DELAYED_FREEING flag\n    tfree = mi_atomic_load_relaxed(&page->xthread_free);\n    do {\n      tfreex = tfree;\n      mi_assert_internal(mi_tf_delayed(tfree) == MI_DELAYED_FREEING);\n      tfreex = mi_tf_set_delayed(tfree,MI_NO_DELAYED_FREE);\n    } while (!mi_atomic_cas_weak_release(&page->xthread_free, &tfree, tfreex));\n  }\n}\n\n// Multi-threaded free (`_mt`) (or free in huge block if compiled with MI_HUGE_PAGE_ABANDON)\nstatic void mi_decl_noinline mi_free_block_mt(mi_page_t* page, mi_segment_t* segment, mi_block_t* block)\n{\n  // first see if the segment was abandoned and if we can reclaim it into our thread\n  if (_mi_option_get_fast(mi_option_abandoned_reclaim_on_free) != 0 &&\n      #if MI_HUGE_PAGE_ABANDON\n      segment->page_kind != MI_PAGE_HUGE &&\n      #endif\n      mi_atomic_load_relaxed(&segment->thread_id) == 0 &&  // segment is abandoned?\n      mi_prim_get_default_heap() != (mi_heap_t*)&_mi_heap_empty) // and we did not already exit this thread (without this check, a fresh heap will be initalized (issue #944))\n  {\n    // the segment is abandoned, try to reclaim it into our heap\n    if (_mi_segment_attempt_reclaim(mi_heap_get_default(), segment)) {\n      mi_assert_internal(_mi_thread_id() == mi_atomic_load_relaxed(&segment->thread_id));\n      mi_assert_internal(mi_heap_get_default()->tld->segments.subproc == segment->subproc);\n      mi_free(block);  // recursively free as now it will be a local free in our heap\n      return;\n    }\n  }\n\n  // The padding check may access the non-thread-owned page for the key values.\n  // that is safe as these are constant and the page won't be freed (as the block is not freed yet).\n  mi_check_padding(page, block);\n\n  // adjust stats (after padding check and potentially recursive `mi_free` above)\n  mi_stat_free(page, block);    // stat_free may access the padding\n  mi_track_free_size(block, mi_page_usable_size_of(page,block));\n\n  // for small size, ensure we can fit the delayed thread pointers without triggering overflow detection\n  _mi_padding_shrink(page, block, sizeof(mi_block_t));\n\n  if (segment->kind == MI_SEGMENT_HUGE) {\n    #if MI_HUGE_PAGE_ABANDON\n    // huge page segments are always abandoned and can be freed immediately\n    _mi_segment_huge_page_free(segment, page, block);\n    return;\n    #else\n    // huge pages are special as they occupy the entire segment\n    // as these are large we reset the memory occupied by the page so it is available to other threads\n    // (as the owning thread needs to actually free the memory later).\n    _mi_segment_huge_page_reset(segment, page, block);\n    #endif\n  }\n  else {\n    #if (MI_DEBUG>0) && !MI_TRACK_ENABLED  && !MI_TSAN       // note: when tracking, cannot use mi_usable_size with multi-threading\n    memset(block, MI_DEBUG_FREED, mi_usable_size(block));\n    #endif\n  }\n\n  // and finally free the actual block by pushing it on the owning heap\n  // thread_delayed free list (or heap delayed free list)\n  mi_free_block_delayed_mt(page,block);\n}\n\n\n// ------------------------------------------------------\n// Usable size\n// ------------------------------------------------------\n\n// Bytes available in a block\nstatic size_t mi_decl_noinline mi_page_usable_aligned_size_of(const mi_page_t* page, const void* p) mi_attr_noexcept {\n  const mi_block_t* block = _mi_page_ptr_unalign(page, p);\n  const size_t size = mi_page_usable_size_of(page, block);\n  const ptrdiff_t adjust = (uint8_t*)p - (uint8_t*)block;\n  mi_assert_internal(adjust >= 0 && (size_t)adjust <= size);\n  const size_t aligned_size = (size - adjust);\n  #if MI_GUARDED\n  if (mi_block_ptr_is_guarded(block, p)) {\n    return aligned_size - _mi_os_page_size();\n  }\n  #endif\n  return aligned_size;\n}\n\nstatic inline size_t _mi_usable_size(const void* p, const char* msg) mi_attr_noexcept {\n  const mi_segment_t* const segment = mi_checked_ptr_segment(p, msg);\n  if mi_unlikely(segment==NULL) return 0;\n  const mi_page_t* const page = _mi_segment_page_of(segment, p);\n  if mi_likely(!mi_page_has_aligned(page)) {\n    const mi_block_t* block = (const mi_block_t*)p;\n    return mi_page_usable_size_of(page, block);\n  }\n  else {\n    // split out to separate routine for improved code generation\n    return mi_page_usable_aligned_size_of(page, p);\n  }\n}\n\nmi_decl_nodiscard size_t mi_usable_size(const void* p) mi_attr_noexcept {\n  return _mi_usable_size(p, \"mi_usable_size\");\n}\n\n\n// ------------------------------------------------------\n// Free variants\n// ------------------------------------------------------\n\nvoid mi_free_size(void* p, size_t size) mi_attr_noexcept {\n  MI_UNUSED_RELEASE(size);\n  mi_assert(p == NULL || size <= _mi_usable_size(p,\"mi_free_size\"));\n  mi_free(p);\n}\n\nvoid mi_free_size_aligned(void* p, size_t size, size_t alignment) mi_attr_noexcept {\n  MI_UNUSED_RELEASE(alignment);\n  mi_assert(((uintptr_t)p % alignment) == 0);\n  mi_free_size(p,size);\n}\n\nvoid mi_free_aligned(void* p, size_t alignment) mi_attr_noexcept {\n  MI_UNUSED_RELEASE(alignment);\n  mi_assert(((uintptr_t)p % alignment) == 0);\n  mi_free(p);\n}\n\n\n// ------------------------------------------------------\n// Check for double free in secure and debug mode\n// This is somewhat expensive so only enabled for secure mode 4\n// ------------------------------------------------------\n\n#if (MI_ENCODE_FREELIST && (MI_SECURE>=4 || MI_DEBUG!=0))\n// linear check if the free list contains a specific element\nstatic bool mi_list_contains(const mi_page_t* page, const mi_block_t* list, const mi_block_t* elem) {\n  while (list != NULL) {\n    if (elem==list) return true;\n    list = mi_block_next(page, list);\n  }\n  return false;\n}\n\nstatic mi_decl_noinline bool mi_check_is_double_freex(const mi_page_t* page, const mi_block_t* block) {\n  // The decoded value is in the same page (or NULL).\n  // Walk the free lists to verify positively if it is already freed\n  if (mi_list_contains(page, page->free, block) ||\n      mi_list_contains(page, page->local_free, block) ||\n      mi_list_contains(page, mi_page_thread_free(page), block))\n  {\n    _mi_error_message(EAGAIN, \"double free detected of block %p with size %zu\\n\", block, mi_page_block_size(page));\n    return true;\n  }\n  return false;\n}\n\n#define mi_track_page(page,access)  { size_t psize; void* pstart = _mi_page_start(_mi_page_segment(page),page,&psize); mi_track_mem_##access( pstart, psize); }\n\nstatic inline bool mi_check_is_double_free(const mi_page_t* page, const mi_block_t* block) {\n  bool is_double_free = false;\n  mi_block_t* n = mi_block_nextx(page, block, page->keys); // pretend it is freed, and get the decoded first field\n  if (((uintptr_t)n & (MI_INTPTR_SIZE-1))==0 &&  // quick check: aligned pointer?\n      (n==NULL || mi_is_in_same_page(block, n))) // quick check: in same page or NULL?\n  {\n    // Suspicious: decoded value a in block is in the same page (or NULL) -- maybe a double free?\n    // (continue in separate function to improve code generation)\n    is_double_free = mi_check_is_double_freex(page, block);\n  }\n  return is_double_free;\n}\n#else\nstatic inline bool mi_check_is_double_free(const mi_page_t* page, const mi_block_t* block) {\n  MI_UNUSED(page);\n  MI_UNUSED(block);\n  return false;\n}\n#endif\n\n\n// ---------------------------------------------------------------------------\n// Check for heap block overflow by setting up padding at the end of the block\n// ---------------------------------------------------------------------------\n\n#if MI_PADDING // && !MI_TRACK_ENABLED\nstatic bool mi_page_decode_padding(const mi_page_t* page, const mi_block_t* block, size_t* delta, size_t* bsize) {\n  *bsize = mi_page_usable_block_size(page);\n  const mi_padding_t* const padding = (mi_padding_t*)((uint8_t*)block + *bsize);\n  mi_track_mem_defined(padding,sizeof(mi_padding_t));\n  *delta = padding->delta;\n  uint32_t canary = padding->canary;\n  uintptr_t keys[2];\n  keys[0] = page->keys[0];\n  keys[1] = page->keys[1];\n  bool ok = (mi_ptr_encode_canary(page,block,keys) == canary && *delta <= *bsize);\n  mi_track_mem_noaccess(padding,sizeof(mi_padding_t));\n  return ok;\n}\n\n// Return the exact usable size of a block.\nstatic size_t mi_page_usable_size_of(const mi_page_t* page, const mi_block_t* block) {\n  size_t bsize;\n  size_t delta;\n  bool ok = mi_page_decode_padding(page, block, &delta, &bsize);\n  mi_assert_internal(ok); mi_assert_internal(delta <= bsize);\n  return (ok ? bsize - delta : 0);\n}\n\n// When a non-thread-local block is freed, it becomes part of the thread delayed free\n// list that is freed later by the owning heap. If the exact usable size is too small to\n// contain the pointer for the delayed list, then shrink the padding (by decreasing delta)\n// so it will later not trigger an overflow error in `mi_free_block`.\nvoid _mi_padding_shrink(const mi_page_t* page, const mi_block_t* block, const size_t min_size) {\n  size_t bsize;\n  size_t delta;\n  bool ok = mi_page_decode_padding(page, block, &delta, &bsize);\n  mi_assert_internal(ok);\n  if (!ok || (bsize - delta) >= min_size) return;  // usually already enough space\n  mi_assert_internal(bsize >= min_size);\n  if (bsize < min_size) return;  // should never happen\n  size_t new_delta = (bsize - min_size);\n  mi_assert_internal(new_delta < bsize);\n  mi_padding_t* padding = (mi_padding_t*)((uint8_t*)block + bsize);\n  mi_track_mem_defined(padding,sizeof(mi_padding_t));\n  padding->delta = (uint32_t)new_delta;\n  mi_track_mem_noaccess(padding,sizeof(mi_padding_t));\n}\n#else\nstatic size_t mi_page_usable_size_of(const mi_page_t* page, const mi_block_t* block) {\n  MI_UNUSED(block);\n  return mi_page_usable_block_size(page);\n}\n\nvoid _mi_padding_shrink(const mi_page_t* page, const mi_block_t* block, const size_t min_size) {\n  MI_UNUSED(page);\n  MI_UNUSED(block);\n  MI_UNUSED(min_size);\n}\n#endif\n\n#if MI_PADDING && MI_PADDING_CHECK\n\nstatic bool mi_verify_padding(const mi_page_t* page, const mi_block_t* block, size_t* size, size_t* wrong) {\n  size_t bsize;\n  size_t delta;\n  bool ok = mi_page_decode_padding(page, block, &delta, &bsize);\n  *size = *wrong = bsize;\n  if (!ok) return false;\n  mi_assert_internal(bsize >= delta);\n  *size = bsize - delta;\n  if (!mi_page_is_huge(page)) {\n    uint8_t* fill = (uint8_t*)block + bsize - delta;\n    const size_t maxpad = (delta > MI_MAX_ALIGN_SIZE ? MI_MAX_ALIGN_SIZE : delta); // check at most the first N padding bytes\n    mi_track_mem_defined(fill, maxpad);\n    for (size_t i = 0; i < maxpad; i++) {\n      if (fill[i] != MI_DEBUG_PADDING) {\n        *wrong = bsize - delta + i;\n        ok = false;\n        break;\n      }\n    }\n    mi_track_mem_noaccess(fill, maxpad);\n  }\n  return ok;\n}\n\nstatic void mi_check_padding(const mi_page_t* page, const mi_block_t* block) {\n  size_t size;\n  size_t wrong;\n  if (!mi_verify_padding(page,block,&size,&wrong)) {\n    _mi_error_message(EFAULT, \"buffer overflow in heap block %p of size %zu: write after %zu bytes\\n\", block, size, wrong );\n  }\n}\n\n#else\n\nstatic void mi_check_padding(const mi_page_t* page, const mi_block_t* block) {\n  MI_UNUSED(page);\n  MI_UNUSED(block);\n}\n\n#endif\n\n// only maintain stats for smaller objects if requested\n#if (MI_STAT>0)\nstatic void mi_stat_free(const mi_page_t* page, const mi_block_t* block) {\n  #if (MI_STAT < 2)\n  MI_UNUSED(block);\n  #endif\n  mi_heap_t* const heap = mi_heap_get_default();\n  const size_t bsize = mi_page_usable_block_size(page);\n  #if (MI_STAT>1)\n  const size_t usize = mi_page_usable_size_of(page, block);\n  mi_heap_stat_decrease(heap, malloc_requested, usize);\n  #endif\n  if (bsize <= MI_MEDIUM_OBJ_SIZE_MAX) {\n    mi_heap_stat_decrease(heap, malloc_normal, bsize);\n    #if (MI_STAT > 1)\n    mi_heap_stat_decrease(heap, malloc_bins[_mi_bin(bsize)], 1);\n    #endif\n  }\n  //else if (bsize <= MI_LARGE_OBJ_SIZE_MAX) {\n  //  mi_heap_stat_decrease(heap, malloc_large, bsize);\n  //}\n  else {\n    mi_heap_stat_decrease(heap, malloc_huge, bsize);\n  }\n}\n#else\nstatic void mi_stat_free(const mi_page_t* page, const mi_block_t* block) {\n  MI_UNUSED(page); MI_UNUSED(block);\n}\n#endif\n\n\n// Remove guard page when building with MI_GUARDED\n#if MI_GUARDED\nstatic void mi_block_unguard(mi_page_t* page, mi_block_t* block, void* p) {\n  MI_UNUSED(p);\n  mi_assert_internal(mi_block_ptr_is_guarded(block, p));\n  mi_assert_internal(mi_page_has_aligned(page));\n  mi_assert_internal((uint8_t*)p - (uint8_t*)block >= (ptrdiff_t)sizeof(mi_block_t));\n  mi_assert_internal(block->next == MI_BLOCK_TAG_GUARDED);\n\n  const size_t bsize = mi_page_block_size(page);\n  const size_t psize = _mi_os_page_size();\n  mi_assert_internal(bsize > psize);\n  mi_assert_internal(_mi_page_segment(page)->allow_decommit);\n  void* gpage = (uint8_t*)block + bsize - psize;\n  mi_assert_internal(_mi_is_aligned(gpage, psize));\n  _mi_os_unprotect(gpage, psize);\n}\n#endif\n"
  },
  {
    "path": "third-party/mimalloc/src/heap.c",
    "content": "/*----------------------------------------------------------------------------\nCopyright (c) 2018-2021, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"mimalloc/atomic.h\"\n#include \"mimalloc/prim.h\"  // mi_prim_get_default_heap\n\n#include <string.h>  // memset, memcpy\n\n#if defined(_MSC_VER) && (_MSC_VER < 1920)\n#pragma warning(disable:4204)  // non-constant aggregate initializer\n#endif\n\n/* -----------------------------------------------------------\n  Helpers\n----------------------------------------------------------- */\n\n// return `true` if ok, `false` to break\ntypedef bool (heap_page_visitor_fun)(mi_heap_t* heap, mi_page_queue_t* pq, mi_page_t* page, void* arg1, void* arg2);\n\n// Visit all pages in a heap; returns `false` if break was called.\nstatic bool mi_heap_visit_pages(mi_heap_t* heap, heap_page_visitor_fun* fn, void* arg1, void* arg2)\n{\n  if (heap==NULL || heap->page_count==0) return 0;\n\n  // visit all pages\n  #if MI_DEBUG>1\n  size_t total = heap->page_count;\n  size_t count = 0;\n  #endif\n\n  for (size_t i = 0; i <= MI_BIN_FULL; i++) {\n    mi_page_queue_t* pq = &heap->pages[i];\n    mi_page_t* page = pq->first;\n    while(page != NULL) {\n      mi_page_t* next = page->next; // save next in case the page gets removed from the queue\n      mi_assert_internal(mi_page_heap(page) == heap);\n      #if MI_DEBUG>1\n      count++;\n      #endif\n      if (!fn(heap, pq, page, arg1, arg2)) return false;\n      page = next; // and continue\n    }\n  }\n  mi_assert_internal(count == total);\n  return true;\n}\n\n\n#if MI_DEBUG>=2\nstatic bool mi_heap_page_is_valid(mi_heap_t* heap, mi_page_queue_t* pq, mi_page_t* page, void* arg1, void* arg2) {\n  MI_UNUSED(arg1);\n  MI_UNUSED(arg2);\n  MI_UNUSED(pq);\n  mi_assert_internal(mi_page_heap(page) == heap);\n  mi_segment_t* segment = _mi_page_segment(page);\n  mi_assert_internal(mi_atomic_load_relaxed(&segment->thread_id) == heap->thread_id);\n  mi_assert_expensive(_mi_page_is_valid(page));\n  return true;\n}\n#endif\n#if MI_DEBUG>=3\nstatic bool mi_heap_is_valid(mi_heap_t* heap) {\n  mi_assert_internal(heap!=NULL);\n  mi_heap_visit_pages(heap, &mi_heap_page_is_valid, NULL, NULL);\n  return true;\n}\n#endif\n\n\n\n\n/* -----------------------------------------------------------\n  \"Collect\" pages by migrating `local_free` and `thread_free`\n  lists and freeing empty pages. This is done when a thread\n  stops (and in that case abandons pages if there are still\n  blocks alive)\n----------------------------------------------------------- */\n\ntypedef enum mi_collect_e {\n  MI_NORMAL,\n  MI_FORCE,\n  MI_ABANDON\n} mi_collect_t;\n\n\nstatic bool mi_heap_page_collect(mi_heap_t* heap, mi_page_queue_t* pq, mi_page_t* page, void* arg_collect, void* arg2 ) {\n  MI_UNUSED(arg2);\n  MI_UNUSED(heap);\n  mi_assert_internal(mi_heap_page_is_valid(heap, pq, page, NULL, NULL));\n  mi_collect_t collect = *((mi_collect_t*)arg_collect);\n  _mi_page_free_collect(page, collect >= MI_FORCE);\n  if (collect == MI_FORCE) {\n    // note: call before a potential `_mi_page_free` as the segment may be freed if this was the last used page in that segment.\n    mi_segment_t* segment = _mi_page_segment(page);\n    _mi_segment_collect(segment, true /* force? */);\n  }\n  if (mi_page_all_free(page)) {\n    // no more used blocks, free the page.\n    // note: this will free retired pages as well.\n    _mi_page_free(page, pq, collect >= MI_FORCE);\n  }\n  else if (collect == MI_ABANDON) {\n    // still used blocks but the thread is done; abandon the page\n    _mi_page_abandon(page, pq);\n  }\n  return true; // don't break\n}\n\nstatic bool mi_heap_page_never_delayed_free(mi_heap_t* heap, mi_page_queue_t* pq, mi_page_t* page, void* arg1, void* arg2) {\n  MI_UNUSED(arg1);\n  MI_UNUSED(arg2);\n  MI_UNUSED(heap);\n  MI_UNUSED(pq);\n  _mi_page_use_delayed_free(page, MI_NEVER_DELAYED_FREE, false);\n  return true; // don't break\n}\n\nstatic void mi_heap_collect_ex(mi_heap_t* heap, mi_collect_t collect)\n{\n  if (heap==NULL || !mi_heap_is_initialized(heap)) return;\n\n  const bool force = (collect >= MI_FORCE);\n  _mi_deferred_free(heap, force);\n\n  // python/cpython#112532: we may be called from a thread that is not the owner of the heap\n  const bool is_main_thread = (_mi_is_main_thread() && heap->thread_id == _mi_thread_id());\n\n  // note: never reclaim on collect but leave it to threads that need storage to reclaim\n  const bool force_main =\n    #ifdef NDEBUG\n      collect == MI_FORCE\n    #else\n      collect >= MI_FORCE\n    #endif\n      && is_main_thread && mi_heap_is_backing(heap) && !heap->no_reclaim;\n\n  if (force_main) {\n    // the main thread is abandoned (end-of-program), try to reclaim all abandoned segments.\n    // if all memory is freed by now, all segments should be freed.\n    // note: this only collects in the current subprocess\n    _mi_abandoned_reclaim_all(heap, &heap->tld->segments);\n  }\n\n  // if abandoning, mark all pages to no longer add to delayed_free\n  if (collect == MI_ABANDON) {\n    mi_heap_visit_pages(heap, &mi_heap_page_never_delayed_free, NULL, NULL);\n  }\n\n  // free all current thread delayed blocks.\n  // (if abandoning, after this there are no more thread-delayed references into the pages.)\n  _mi_heap_delayed_free_all(heap);\n\n  // collect retired pages\n  _mi_heap_collect_retired(heap, force);\n\n  // collect all pages owned by this thread\n  mi_heap_visit_pages(heap, &mi_heap_page_collect, &collect, NULL);\n  mi_assert_internal( collect != MI_ABANDON || mi_atomic_load_ptr_acquire(mi_block_t,&heap->thread_delayed_free) == NULL );\n\n  // collect abandoned segments (in particular, purge expired parts of segments in the abandoned segment list)\n  // note: forced purge can be quite expensive if many threads are created/destroyed so we do not force on abandonment\n  _mi_abandoned_collect(heap, collect == MI_FORCE /* force? */, &heap->tld->segments);\n\n  // if forced, collect thread data cache on program-exit (or shared library unload)\n  if (force && is_main_thread && mi_heap_is_backing(heap)) {\n    _mi_thread_data_collect();  // collect thread data cache\n  }\n\n  // collect arenas (this is program wide so don't force purges on abandonment of threads)\n  _mi_arenas_collect(collect == MI_FORCE /* force purge? */);\n\n  // merge statistics\n  if (collect <= MI_FORCE) {\n    mi_stats_merge();\n  }\n}\n\nvoid _mi_heap_collect_abandon(mi_heap_t* heap) {\n  mi_heap_collect_ex(heap, MI_ABANDON);\n}\n\nvoid mi_heap_collect(mi_heap_t* heap, bool force) mi_attr_noexcept {\n  mi_heap_collect_ex(heap, (force ? MI_FORCE : MI_NORMAL));\n}\n\nvoid mi_collect(bool force) mi_attr_noexcept {\n  mi_heap_collect(mi_prim_get_default_heap(), force);\n}\n\n\n/* -----------------------------------------------------------\n  Heap new\n----------------------------------------------------------- */\n\nmi_heap_t* mi_heap_get_default(void) {\n  mi_thread_init();\n  return mi_prim_get_default_heap();\n}\n\nstatic bool mi_heap_is_default(const mi_heap_t* heap) {\n  return (heap == mi_prim_get_default_heap());\n}\n\n\nmi_heap_t* mi_heap_get_backing(void) {\n  mi_heap_t* heap = mi_heap_get_default();\n  mi_assert_internal(heap!=NULL);\n  mi_heap_t* bheap = heap->tld->heap_backing;\n  mi_assert_internal(bheap!=NULL);\n  mi_assert_internal(bheap->thread_id == _mi_thread_id());\n  return bheap;\n}\n\nvoid _mi_heap_init(mi_heap_t* heap, mi_tld_t* tld, mi_arena_id_t arena_id, bool noreclaim, uint8_t tag) {\n  _mi_memcpy_aligned(heap, &_mi_heap_empty, sizeof(mi_heap_t));\n  heap->tld = tld;\n  heap->thread_id  = _mi_thread_id();\n  heap->arena_id   = arena_id;\n  heap->no_reclaim = noreclaim;\n  heap->tag        = tag;\n  if (heap == tld->heap_backing) {\n    _mi_random_init(&heap->random);\n  }\n  else {\n    _mi_random_split(&tld->heap_backing->random, &heap->random);\n  }\n  heap->cookie  = _mi_heap_random_next(heap) | 1;\n  heap->keys[0] = _mi_heap_random_next(heap);\n  heap->keys[1] = _mi_heap_random_next(heap);\n  _mi_heap_guarded_init(heap);\n  // push on the thread local heaps list\n  heap->next = heap->tld->heaps;\n  heap->tld->heaps = heap;\n}\n\nmi_decl_nodiscard mi_heap_t* mi_heap_new_ex(int heap_tag, bool allow_destroy, mi_arena_id_t arena_id) {\n  mi_heap_t* bheap = mi_heap_get_backing();\n  mi_heap_t* heap = mi_heap_malloc_tp(bheap, mi_heap_t);  // todo: OS allocate in secure mode?\n  if (heap == NULL) return NULL;\n  mi_assert(heap_tag >= 0 && heap_tag < 256);\n  _mi_heap_init(heap, bheap->tld, arena_id, allow_destroy /* no reclaim? */, (uint8_t)heap_tag /* heap tag */);\n  return heap;\n}\n\nmi_decl_nodiscard mi_heap_t* mi_heap_new_in_arena(mi_arena_id_t arena_id) {\n  return mi_heap_new_ex(0 /* default heap tag */, false /* don't allow `mi_heap_destroy` */, arena_id);\n}\n\nmi_decl_nodiscard mi_heap_t* mi_heap_new(void) {\n  // don't reclaim abandoned memory or otherwise destroy is unsafe\n  return mi_heap_new_ex(0 /* default heap tag */, true /* no reclaim */, _mi_arena_id_none());\n}\n\nbool _mi_heap_memid_is_suitable(mi_heap_t* heap, mi_memid_t memid) {\n  return _mi_arena_memid_is_suitable(memid, heap->arena_id);\n}\n\nuintptr_t _mi_heap_random_next(mi_heap_t* heap) {\n  return _mi_random_next(&heap->random);\n}\n\n// zero out the page queues\nstatic void mi_heap_reset_pages(mi_heap_t* heap) {\n  mi_assert_internal(heap != NULL);\n  mi_assert_internal(mi_heap_is_initialized(heap));\n  // TODO: copy full empty heap instead?\n  memset(&heap->pages_free_direct, 0, sizeof(heap->pages_free_direct));\n  _mi_memcpy_aligned(&heap->pages, &_mi_heap_empty.pages, sizeof(heap->pages));\n  heap->thread_delayed_free = NULL;\n  heap->page_count = 0;\n}\n\n// called from `mi_heap_destroy` and `mi_heap_delete` to free the internal heap resources.\nstatic void mi_heap_free(mi_heap_t* heap) {\n  mi_assert(heap != NULL);\n  mi_assert_internal(mi_heap_is_initialized(heap));\n  if (heap==NULL || !mi_heap_is_initialized(heap)) return;\n  if (mi_heap_is_backing(heap)) return; // dont free the backing heap\n\n  // reset default\n  if (mi_heap_is_default(heap)) {\n    _mi_heap_set_default_direct(heap->tld->heap_backing);\n  }\n\n  // remove ourselves from the thread local heaps list\n  // linear search but we expect the number of heaps to be relatively small\n  mi_heap_t* prev = NULL;\n  mi_heap_t* curr = heap->tld->heaps;\n  while (curr != heap && curr != NULL) {\n    prev = curr;\n    curr = curr->next;\n  }\n  mi_assert_internal(curr == heap);\n  if (curr == heap) {\n    if (prev != NULL) { prev->next = heap->next; }\n                 else { heap->tld->heaps = heap->next; }\n  }\n  mi_assert_internal(heap->tld->heaps != NULL);\n\n  // and free the used memory\n  mi_free(heap);\n}\n\n// return a heap on the same thread as `heap` specialized for the specified tag (if it exists)\nmi_heap_t* _mi_heap_by_tag(mi_heap_t* heap, uint8_t tag) {\n  if (heap->tag == tag) {\n    return heap;\n  }\n  for (mi_heap_t *curr = heap->tld->heaps; curr != NULL; curr = curr->next) {\n    if (curr->tag == tag) {\n      return curr;\n    }\n  }\n  return NULL;\n}\n\n/* -----------------------------------------------------------\n  Heap destroy\n----------------------------------------------------------- */\n\nstatic bool _mi_heap_page_destroy(mi_heap_t* heap, mi_page_queue_t* pq, mi_page_t* page, void* arg1, void* arg2) {\n  MI_UNUSED(arg1);\n  MI_UNUSED(arg2);\n  MI_UNUSED(heap);\n  MI_UNUSED(pq);\n\n  // ensure no more thread_delayed_free will be added\n  _mi_page_use_delayed_free(page, MI_NEVER_DELAYED_FREE, false);\n\n  // stats\n  const size_t bsize = mi_page_block_size(page);\n  if (bsize > MI_MEDIUM_OBJ_SIZE_MAX) {\n    //if (bsize <= MI_LARGE_OBJ_SIZE_MAX) {\n    //  mi_heap_stat_decrease(heap, malloc_large, bsize);\n    //}\n    //else \n    {\n      mi_heap_stat_decrease(heap, malloc_huge, bsize);\n    }\n  }\n#if (MI_STAT)\n  _mi_page_free_collect(page, false);  // update used count\n  const size_t inuse = page->used;\n  if (bsize <= MI_LARGE_OBJ_SIZE_MAX) {\n    mi_heap_stat_decrease(heap, malloc_normal, bsize * inuse);\n#if (MI_STAT>1)\n    mi_heap_stat_decrease(heap, malloc_bins[_mi_bin(bsize)], inuse);\n#endif\n  }\n  mi_heap_stat_decrease(heap, malloc_requested, bsize * inuse);  // todo: off for aligned blocks...\n#endif\n\n  /// pretend it is all free now\n  mi_assert_internal(mi_page_thread_free(page) == NULL);\n  page->used = 0;\n\n  // and free the page\n  // mi_page_free(page,false);\n  page->next = NULL;\n  page->prev = NULL;\n  _mi_segment_page_free(page,false /* no force? */, &heap->tld->segments);\n\n  return true; // keep going\n}\n\nvoid _mi_heap_destroy_pages(mi_heap_t* heap) {\n  mi_heap_visit_pages(heap, &_mi_heap_page_destroy, NULL, NULL);\n  mi_heap_reset_pages(heap);\n}\n\n#if MI_TRACK_HEAP_DESTROY\nstatic bool mi_cdecl mi_heap_track_block_free(const mi_heap_t* heap, const mi_heap_area_t* area, void* block, size_t block_size, void* arg) {\n  MI_UNUSED(heap); MI_UNUSED(area);  MI_UNUSED(arg); MI_UNUSED(block_size);\n  mi_track_free_size(block,mi_usable_size(block));\n  return true;\n}\n#endif\n\nvoid mi_heap_destroy(mi_heap_t* heap) {\n  mi_assert(heap != NULL);\n  mi_assert(mi_heap_is_initialized(heap));\n  mi_assert(heap->no_reclaim);\n  mi_assert_expensive(mi_heap_is_valid(heap));\n  if (heap==NULL || !mi_heap_is_initialized(heap)) return;\n  #if MI_GUARDED\n  // _mi_warning_message(\"'mi_heap_destroy' called but MI_GUARDED is enabled -- using `mi_heap_delete` instead (heap at %p)\\n\", heap);\n  mi_heap_delete(heap);\n  return;\n  #else\n  if (!heap->no_reclaim) {\n    _mi_warning_message(\"'mi_heap_destroy' called but ignored as the heap was not created with 'allow_destroy' (heap at %p)\\n\", heap);\n    // don't free in case it may contain reclaimed pages\n    mi_heap_delete(heap);\n  }\n  else {\n    // track all blocks as freed\n    #if MI_TRACK_HEAP_DESTROY\n    mi_heap_visit_blocks(heap, true, mi_heap_track_block_free, NULL);\n    #endif\n    // free all pages\n    _mi_heap_destroy_pages(heap);\n    mi_heap_free(heap);\n  }\n  #endif\n}\n\n// forcefully destroy all heaps in the current thread\nvoid _mi_heap_unsafe_destroy_all(mi_heap_t* heap) {\n  mi_assert_internal(heap != NULL);\n  if (heap == NULL) return;\n  mi_heap_t* curr = heap->tld->heaps;\n  while (curr != NULL) {\n    mi_heap_t* next = curr->next;\n    if (curr->no_reclaim) {\n      mi_heap_destroy(curr);\n    }\n    else {\n      _mi_heap_destroy_pages(curr);\n    }\n    curr = next;\n  }\n}\n\n/* -----------------------------------------------------------\n  Safe Heap delete\n----------------------------------------------------------- */\n\n// Transfer the pages from one heap to the other\nstatic void mi_heap_absorb(mi_heap_t* heap, mi_heap_t* from) {\n  mi_assert_internal(heap!=NULL);\n  if (from==NULL || from->page_count == 0) return;\n\n  // reduce the size of the delayed frees\n  _mi_heap_delayed_free_partial(from);\n\n  // transfer all pages by appending the queues; this will set a new heap field\n  // so threads may do delayed frees in either heap for a while.\n  // note: appending waits for each page to not be in the `MI_DELAYED_FREEING` state\n  // so after this only the new heap will get delayed frees\n  for (size_t i = 0; i <= MI_BIN_FULL; i++) {\n    mi_page_queue_t* pq = &heap->pages[i];\n    mi_page_queue_t* append = &from->pages[i];\n    size_t pcount = _mi_page_queue_append(heap, pq, append);\n    heap->page_count += pcount;\n    from->page_count -= pcount;\n  }\n  mi_assert_internal(from->page_count == 0);\n\n  // and do outstanding delayed frees in the `from` heap\n  // note: be careful here as the `heap` field in all those pages no longer point to `from`,\n  // turns out to be ok as `_mi_heap_delayed_free` only visits the list and calls a\n  // the regular `_mi_free_delayed_block` which is safe.\n  _mi_heap_delayed_free_all(from);\n  #if !defined(_MSC_VER) || (_MSC_VER > 1900) // somehow the following line gives an error in VS2015, issue #353\n  mi_assert_internal(mi_atomic_load_ptr_relaxed(mi_block_t,&from->thread_delayed_free) == NULL);\n  #endif\n\n  // and reset the `from` heap\n  mi_heap_reset_pages(from);\n}\n\n// are two heaps compatible with respect to heap-tag, exclusive arena etc.\nstatic bool mi_heaps_are_compatible(mi_heap_t* heap1, mi_heap_t* heap2) {\n  return (heap1->tag == heap2->tag &&                   // store same kind of objects\n          heap1->arena_id == heap2->arena_id);          // same arena preference\n}\n\n// Safe delete a heap without freeing any still allocated blocks in that heap.\nvoid mi_heap_delete(mi_heap_t* heap)\n{\n  mi_assert(heap != NULL);\n  mi_assert(mi_heap_is_initialized(heap));\n  mi_assert_expensive(mi_heap_is_valid(heap));\n  if (heap==NULL || !mi_heap_is_initialized(heap)) return;\n\n  mi_heap_t* bheap = heap->tld->heap_backing;\n  if (bheap != heap && mi_heaps_are_compatible(bheap,heap)) {\n    // transfer still used pages to the backing heap\n    mi_heap_absorb(bheap, heap);\n  }\n  else {\n    // the backing heap abandons its pages\n    _mi_heap_collect_abandon(heap);\n  }\n  mi_assert_internal(heap->page_count==0);\n  mi_heap_free(heap);\n}\n\nmi_heap_t* mi_heap_set_default(mi_heap_t* heap) {\n  mi_assert(heap != NULL);\n  mi_assert(mi_heap_is_initialized(heap));\n  if (heap==NULL || !mi_heap_is_initialized(heap)) return NULL;\n  mi_assert_expensive(mi_heap_is_valid(heap));\n  mi_heap_t* old = mi_prim_get_default_heap();\n  _mi_heap_set_default_direct(heap);\n  return old;\n}\n\n\n\n\n/* -----------------------------------------------------------\n  Analysis\n----------------------------------------------------------- */\n\n// static since it is not thread safe to access heaps from other threads.\nstatic mi_heap_t* mi_heap_of_block(const void* p) {\n  if (p == NULL) return NULL;\n  mi_segment_t* segment = _mi_ptr_segment(p);\n  bool valid = (_mi_ptr_cookie(segment) == segment->cookie);\n  mi_assert_internal(valid);\n  if mi_unlikely(!valid) return NULL;\n  return mi_page_heap(_mi_segment_page_of(segment,p));\n}\n\nbool mi_heap_contains_block(mi_heap_t* heap, const void* p) {\n  mi_assert(heap != NULL);\n  if (heap==NULL || !mi_heap_is_initialized(heap)) return false;\n  return (heap == mi_heap_of_block(p));\n}\n\n\nstatic bool mi_heap_page_check_owned(mi_heap_t* heap, mi_page_queue_t* pq, mi_page_t* page, void* p, void* vfound) {\n  MI_UNUSED(heap);\n  MI_UNUSED(pq);\n  bool* found = (bool*)vfound;\n  void* start = mi_page_start(page);\n  void* end   = (uint8_t*)start + (page->capacity * mi_page_block_size(page));\n  *found = (p >= start && p < end);\n  return (!*found); // continue if not found\n}\n\nbool mi_heap_check_owned(mi_heap_t* heap, const void* p) {\n  mi_assert(heap != NULL);\n  if (heap==NULL || !mi_heap_is_initialized(heap)) return false;\n  if (((uintptr_t)p & (MI_INTPTR_SIZE - 1)) != 0) return false;  // only aligned pointers\n  bool found = false;\n  mi_heap_visit_pages(heap, &mi_heap_page_check_owned, (void*)p, &found);\n  return found;\n}\n\nbool mi_check_owned(const void* p) {\n  return mi_heap_check_owned(mi_prim_get_default_heap(), p);\n}\n\n/* -----------------------------------------------------------\n  Visit all heap blocks and areas\n  Todo: enable visiting abandoned pages, and\n        enable visiting all blocks of all heaps across threads\n----------------------------------------------------------- */\n\nvoid _mi_heap_area_init(mi_heap_area_t* area, mi_page_t* page) {\n  const size_t bsize = mi_page_block_size(page);\n  const size_t ubsize = mi_page_usable_block_size(page);\n  area->reserved = page->reserved * bsize;\n  area->committed = page->capacity * bsize;\n  area->blocks = mi_page_start(page);\n  area->used = page->used;   // number of blocks in use (#553)\n  area->block_size = ubsize;\n  area->full_block_size = bsize;\n  area->heap_tag = page->heap_tag;\n}\n\n\nstatic void mi_get_fast_divisor(size_t divisor, uint64_t* magic, size_t* shift) {\n  mi_assert_internal(divisor > 0 && divisor <= UINT32_MAX);\n  *shift = MI_SIZE_BITS - mi_clz(divisor - 1);\n  *magic = ((((uint64_t)1 << 32) * (((uint64_t)1 << *shift) - divisor)) / divisor + 1);\n}\n\nstatic size_t mi_fast_divide(size_t n, uint64_t magic, size_t shift) {\n  mi_assert_internal(n <= UINT32_MAX);\n  const uint64_t hi = ((uint64_t)n * magic) >> 32;\n  return (size_t)((hi + n) >> shift);\n}\n\nbool _mi_heap_area_visit_blocks(const mi_heap_area_t* area, mi_page_t* page, mi_block_visit_fun* visitor, void* arg) {\n  mi_assert(area != NULL);\n  if (area==NULL) return true;\n  mi_assert(page != NULL);\n  if (page == NULL) return true;\n\n  _mi_page_free_collect(page,true);              // collect both thread_delayed and local_free\n  mi_assert_internal(page->local_free == NULL);\n  if (page->used == 0) return true;\n\n  size_t psize;\n  uint8_t* const pstart = _mi_segment_page_start(_mi_page_segment(page), page, &psize);\n  mi_heap_t* const heap = mi_page_heap(page);\n  const size_t bsize    = mi_page_block_size(page);\n  const size_t ubsize   = mi_page_usable_block_size(page); // without padding\n\n  // optimize page with one block\n  if (page->capacity == 1) {\n    mi_assert_internal(page->used == 1 && page->free == NULL);\n    return visitor(mi_page_heap(page), area, pstart, ubsize, arg);\n  }\n  mi_assert(bsize <= UINT32_MAX);\n\n  // optimize full pages\n  if (page->used == page->capacity) {\n    uint8_t* block = pstart;\n    for (size_t i = 0; i < page->capacity; i++) {\n      if (!visitor(heap, area, block, ubsize, arg)) return false;\n      block += bsize;\n    }\n    return true;\n  }\n\n  // create a bitmap of free blocks.\n  #define MI_MAX_BLOCKS   (MI_SMALL_PAGE_SIZE / sizeof(void*))\n  uintptr_t free_map[MI_MAX_BLOCKS / MI_INTPTR_BITS];\n  const uintptr_t bmapsize = _mi_divide_up(page->capacity, MI_INTPTR_BITS);\n  memset(free_map, 0, bmapsize * sizeof(intptr_t));\n  if (page->capacity % MI_INTPTR_BITS != 0) {\n    // mark left-over bits at the end as free\n    size_t shift   = (page->capacity % MI_INTPTR_BITS);\n    uintptr_t mask = (UINTPTR_MAX << shift);\n    free_map[bmapsize - 1] = mask;\n  }\n\n  // fast repeated division by the block size\n  uint64_t magic;\n  size_t   shift;\n  mi_get_fast_divisor(bsize, &magic, &shift);\n\n  #if MI_DEBUG>1\n  size_t free_count = 0;\n  #endif\n  for (mi_block_t* block = page->free; block != NULL; block = mi_block_next(page, block)) {\n    #if MI_DEBUG>1\n    free_count++;\n    #endif\n    mi_assert_internal((uint8_t*)block >= pstart && (uint8_t*)block < (pstart + psize));\n    size_t offset = (uint8_t*)block - pstart;\n    mi_assert_internal(offset % bsize == 0);\n    mi_assert_internal(offset <= UINT32_MAX);\n    size_t blockidx = mi_fast_divide(offset, magic, shift);\n    mi_assert_internal(blockidx == offset / bsize);\n    mi_assert_internal(blockidx < MI_MAX_BLOCKS);\n    size_t bitidx = (blockidx / MI_INTPTR_BITS);\n    size_t bit = blockidx - (bitidx * MI_INTPTR_BITS);\n    free_map[bitidx] |= ((uintptr_t)1 << bit);\n  }\n  mi_assert_internal(page->capacity == (free_count + page->used));\n\n  // walk through all blocks skipping the free ones\n  #if MI_DEBUG>1\n  size_t used_count = 0;\n  #endif\n  uint8_t* block = pstart;\n  for (size_t i = 0; i < bmapsize; i++) {\n    if (free_map[i] == 0) {\n      // every block is in use\n      for (size_t j = 0; j < MI_INTPTR_BITS; j++) {\n        #if MI_DEBUG>1\n        used_count++;\n        #endif\n        if (!visitor(heap, area, block, ubsize, arg)) return false;\n        block += bsize;\n      }\n    }\n    else {\n      // visit the used blocks in the mask\n      uintptr_t m = ~free_map[i];\n      while (m != 0) {\n        #if MI_DEBUG>1\n        used_count++;\n        #endif\n        size_t bitidx = mi_ctz(m);\n        if (!visitor(heap, area, block + (bitidx * bsize), ubsize, arg)) return false;\n        m &= m - 1;  // clear least significant bit\n      }\n      block += bsize * MI_INTPTR_BITS;\n    }\n  }\n  mi_assert_internal(page->used == used_count);\n  return true;\n}\n\n\n\n// Separate struct to keep `mi_page_t` out of the public interface\ntypedef struct mi_heap_area_ex_s {\n  mi_heap_area_t area;\n  mi_page_t* page;\n} mi_heap_area_ex_t;\n\ntypedef bool (mi_heap_area_visit_fun)(const mi_heap_t* heap, const mi_heap_area_ex_t* area, void* arg);\n\nstatic bool mi_heap_visit_areas_page(mi_heap_t* heap, mi_page_queue_t* pq, mi_page_t* page, void* vfun, void* arg) {\n  MI_UNUSED(heap);\n  MI_UNUSED(pq);\n  mi_heap_area_visit_fun* fun = (mi_heap_area_visit_fun*)vfun;\n  mi_heap_area_ex_t xarea;\n  xarea.page = page;\n  _mi_heap_area_init(&xarea.area, page);\n  return fun(heap, &xarea, arg);\n}\n\n// Visit all heap pages as areas\nstatic bool mi_heap_visit_areas(const mi_heap_t* heap, mi_heap_area_visit_fun* visitor, void* arg) {\n  if (visitor == NULL) return false;\n  return mi_heap_visit_pages((mi_heap_t*)heap, &mi_heap_visit_areas_page, (void*)(visitor), arg); // note: function pointer to void* :-{\n}\n\n// Just to pass arguments\ntypedef struct mi_visit_blocks_args_s {\n  bool  visit_blocks;\n  mi_block_visit_fun* visitor;\n  void* arg;\n} mi_visit_blocks_args_t;\n\nstatic bool mi_heap_area_visitor(const mi_heap_t* heap, const mi_heap_area_ex_t* xarea, void* arg) {\n  mi_visit_blocks_args_t* args = (mi_visit_blocks_args_t*)arg;\n  if (!args->visitor(heap, &xarea->area, NULL, xarea->area.block_size, args->arg)) return false;\n  if (args->visit_blocks) {\n    return _mi_heap_area_visit_blocks(&xarea->area, xarea->page, args->visitor, args->arg);\n  }\n  else {\n    return true;\n  }\n}\n\n// Visit all blocks in a heap\nbool mi_heap_visit_blocks(const mi_heap_t* heap, bool visit_blocks, mi_block_visit_fun* visitor, void* arg) {\n  mi_visit_blocks_args_t args = { visit_blocks, visitor, arg };\n  return mi_heap_visit_areas(heap, &mi_heap_area_visitor, &args);\n}\n"
  },
  {
    "path": "third-party/mimalloc/src/init.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2022, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"mimalloc/prim.h\"\n\n#include <string.h>  // memcpy, memset\n#include <stdlib.h>  // atexit\n\n\n// Empty page used to initialize the small free pages array\nconst mi_page_t _mi_page_empty = {\n  0,\n  false, false, false, false,\n  0,       // capacity\n  0,       // reserved capacity\n  { 0 },   // flags\n  false,   // is_zero\n  0,       // retire_expire\n  NULL,    // free\n  NULL,    // local_free\n  0,       // used\n  0,       // block size shift\n  0,       // heap tag\n  0,       // block_size\n  NULL,    // page_start\n  #if (MI_PADDING || MI_ENCODE_FREELIST)\n  { 0, 0 },\n  #endif\n  MI_ATOMIC_VAR_INIT(0), // xthread_free\n  MI_ATOMIC_VAR_INIT(0), // xheap\n  NULL, NULL\n  , { 0 }  // padding\n};\n\n#define MI_PAGE_EMPTY() ((mi_page_t*)&_mi_page_empty)\n\n#if (MI_SMALL_WSIZE_MAX==128)\n#if (MI_PADDING>0) && (MI_INTPTR_SIZE >= 8)\n#define MI_SMALL_PAGES_EMPTY  { MI_INIT128(MI_PAGE_EMPTY), MI_PAGE_EMPTY(), MI_PAGE_EMPTY() }\n#elif (MI_PADDING>0)\n#define MI_SMALL_PAGES_EMPTY  { MI_INIT128(MI_PAGE_EMPTY), MI_PAGE_EMPTY(), MI_PAGE_EMPTY(), MI_PAGE_EMPTY() }\n#else\n#define MI_SMALL_PAGES_EMPTY  { MI_INIT128(MI_PAGE_EMPTY), MI_PAGE_EMPTY() }\n#endif\n#else\n#error \"define right initialization sizes corresponding to MI_SMALL_WSIZE_MAX\"\n#endif\n\n// Empty page queues for every bin\n#define QNULL(sz)  { NULL, NULL, (sz)*sizeof(uintptr_t) }\n#define MI_PAGE_QUEUES_EMPTY \\\n  { QNULL(1), \\\n    QNULL(     1), QNULL(     2), QNULL(     3), QNULL(     4), QNULL(     5), QNULL(     6), QNULL(     7), QNULL(     8), /* 8 */ \\\n    QNULL(    10), QNULL(    12), QNULL(    14), QNULL(    16), QNULL(    20), QNULL(    24), QNULL(    28), QNULL(    32), /* 16 */ \\\n    QNULL(    40), QNULL(    48), QNULL(    56), QNULL(    64), QNULL(    80), QNULL(    96), QNULL(   112), QNULL(   128), /* 24 */ \\\n    QNULL(   160), QNULL(   192), QNULL(   224), QNULL(   256), QNULL(   320), QNULL(   384), QNULL(   448), QNULL(   512), /* 32 */ \\\n    QNULL(   640), QNULL(   768), QNULL(   896), QNULL(  1024), QNULL(  1280), QNULL(  1536), QNULL(  1792), QNULL(  2048), /* 40 */ \\\n    QNULL(  2560), QNULL(  3072), QNULL(  3584), QNULL(  4096), QNULL(  5120), QNULL(  6144), QNULL(  7168), QNULL(  8192), /* 48 */ \\\n    QNULL( 10240), QNULL( 12288), QNULL( 14336), QNULL( 16384), QNULL( 20480), QNULL( 24576), QNULL( 28672), QNULL( 32768), /* 56 */ \\\n    QNULL( 40960), QNULL( 49152), QNULL( 57344), QNULL( 65536), QNULL( 81920), QNULL( 98304), QNULL(114688), QNULL(131072), /* 64 */ \\\n    QNULL(163840), QNULL(196608), QNULL(229376), QNULL(262144), QNULL(327680), QNULL(393216), QNULL(458752), QNULL(524288), /* 72 */ \\\n    QNULL(MI_MEDIUM_OBJ_WSIZE_MAX + 1  /* 655360, Huge queue */), \\\n    QNULL(MI_MEDIUM_OBJ_WSIZE_MAX + 2) /* Full queue */ }\n\n#define MI_STAT_COUNT_NULL()  {0,0,0}\n\n// Empty statistics\n#define MI_STATS_NULL  \\\n  MI_STAT_COUNT_NULL(), MI_STAT_COUNT_NULL(), MI_STAT_COUNT_NULL(), MI_STAT_COUNT_NULL(), \\\n  MI_STAT_COUNT_NULL(), MI_STAT_COUNT_NULL(), MI_STAT_COUNT_NULL(), MI_STAT_COUNT_NULL(), \\\n  MI_STAT_COUNT_NULL(), MI_STAT_COUNT_NULL(), MI_STAT_COUNT_NULL(), \\\n  { 0 }, { 0 }, { 0 }, { 0 }, \\\n  { 0 }, { 0 }, { 0 }, { 0 }, \\\n  \\\n  { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, \\\n  MI_INIT4(MI_STAT_COUNT_NULL), \\\n  { 0 }, { 0 }, { 0 }, { 0 },  \\\n  \\\n  { MI_INIT4(MI_STAT_COUNT_NULL) }, \\\n  { { 0 }, { 0 }, { 0 }, { 0 } }, \\\n  \\\n  { MI_INIT74(MI_STAT_COUNT_NULL) }, \\\n  { MI_INIT74(MI_STAT_COUNT_NULL) }\n\n\n// Empty slice span queues for every bin\n#define SQNULL(sz)  { NULL, NULL, sz }\n#define MI_SEGMENT_SPAN_QUEUES_EMPTY \\\n  { SQNULL(1), \\\n    SQNULL(     1), SQNULL(     2), SQNULL(     3), SQNULL(     4), SQNULL(     5), SQNULL(     6), SQNULL(     7), SQNULL(    10), /*  8 */ \\\n    SQNULL(    12), SQNULL(    14), SQNULL(    16), SQNULL(    20), SQNULL(    24), SQNULL(    28), SQNULL(    32), SQNULL(    40), /* 16 */ \\\n    SQNULL(    48), SQNULL(    56), SQNULL(    64), SQNULL(    80), SQNULL(    96), SQNULL(   112), SQNULL(   128), SQNULL(   160), /* 24 */ \\\n    SQNULL(   192), SQNULL(   224), SQNULL(   256), SQNULL(   320), SQNULL(   384), SQNULL(   448), SQNULL(   512), SQNULL(   640), /* 32 */ \\\n    SQNULL(   768), SQNULL(   896), SQNULL(  1024) /* 35 */ }\n\n\n// --------------------------------------------------------\n// Statically allocate an empty heap as the initial\n// thread local value for the default heap,\n// and statically allocate the backing heap for the main\n// thread so it can function without doing any allocation\n// itself (as accessing a thread local for the first time\n// may lead to allocation itself on some platforms)\n// --------------------------------------------------------\n\nmi_decl_hidden mi_decl_cache_align const mi_heap_t _mi_heap_empty = {\n  NULL,\n  MI_ATOMIC_VAR_INIT(NULL),\n  0,                // tid\n  0,                // cookie\n  0,                // arena id\n  { 0, 0 },         // keys\n  { {0}, {0}, 0, true }, // random\n  0,                // page count\n  MI_BIN_FULL, 0,   // page retired min/max\n  0, 0,             // generic count\n  NULL,             // next\n  false,            // can reclaim\n  0,                // tag\n  #if MI_GUARDED\n  0, 0, 0, 0, 1,    // count is 1 so we never write to it (see `internal.h:mi_heap_malloc_use_guarded`)\n  #endif\n  MI_SMALL_PAGES_EMPTY,\n  MI_PAGE_QUEUES_EMPTY\n};\n\nstatic mi_decl_cache_align mi_subproc_t mi_subproc_default;\n\n#define tld_empty_stats  ((mi_stats_t*)((uint8_t*)&tld_empty + offsetof(mi_tld_t,stats)))\n\nmi_decl_cache_align static const mi_tld_t tld_empty = {\n  0,\n  false,\n  NULL, NULL,\n  { MI_SEGMENT_SPAN_QUEUES_EMPTY, 0, 0, 0, 0, 0, &mi_subproc_default, tld_empty_stats }, // segments\n  { MI_STAT_VERSION, MI_STATS_NULL }       // stats\n};\n\nmi_threadid_t _mi_thread_id(void) mi_attr_noexcept {\n  return _mi_prim_thread_id();\n}\n\n// the thread-local default heap for allocation\nmi_decl_thread mi_heap_t* _mi_heap_default = (mi_heap_t*)&_mi_heap_empty;\n\nextern mi_decl_hidden mi_heap_t _mi_heap_main;\n\nstatic mi_decl_cache_align mi_tld_t tld_main = {\n  0, false,\n  &_mi_heap_main, & _mi_heap_main,\n  { MI_SEGMENT_SPAN_QUEUES_EMPTY, 0, 0, 0, 0, 0, &mi_subproc_default, &tld_main.stats }, // segments\n  { MI_STAT_VERSION, MI_STATS_NULL }       // stats\n};\n\nmi_decl_cache_align mi_heap_t _mi_heap_main = {\n  &tld_main,\n  MI_ATOMIC_VAR_INIT(NULL),\n  0,                // thread id\n  0,                // initial cookie\n  0,                // arena id\n  { 0, 0 },         // the key of the main heap can be fixed (unlike page keys that need to be secure!)\n  { {0x846ca68b}, {0}, 0, true },  // random\n  0,                // page count\n  MI_BIN_FULL, 0,   // page retired min/max\n  0, 0,             // generic count\n  NULL,             // next heap\n  false,            // can reclaim\n  0,                // tag\n  #if MI_GUARDED\n  0, 0, 0, 0, 0,\n  #endif\n  MI_SMALL_PAGES_EMPTY,\n  MI_PAGE_QUEUES_EMPTY\n};\n\nbool _mi_process_is_initialized = false;  // set to `true` in `mi_process_init`.\n\nmi_stats_t _mi_stats_main = { MI_STAT_VERSION, MI_STATS_NULL };\n\n#if MI_GUARDED\nmi_decl_export void mi_heap_guarded_set_sample_rate(mi_heap_t* heap, size_t sample_rate, size_t seed) {\n  heap->guarded_sample_seed = seed;\n  if (heap->guarded_sample_seed == 0) {\n    heap->guarded_sample_seed = _mi_heap_random_next(heap);\n  }\n  heap->guarded_sample_rate  = sample_rate;\n  if (heap->guarded_sample_rate >= 1) {\n    heap->guarded_sample_seed = heap->guarded_sample_seed % heap->guarded_sample_rate;\n  }\n  heap->guarded_sample_count = heap->guarded_sample_seed;  // count down samples\n}\n\nmi_decl_export void mi_heap_guarded_set_size_bound(mi_heap_t* heap, size_t min, size_t max) {\n  heap->guarded_size_min = min;\n  heap->guarded_size_max = (min > max ? min : max);\n}\n\nvoid _mi_heap_guarded_init(mi_heap_t* heap) {\n  mi_heap_guarded_set_sample_rate(heap,\n    (size_t)mi_option_get_clamp(mi_option_guarded_sample_rate, 0, LONG_MAX),\n    (size_t)mi_option_get(mi_option_guarded_sample_seed));\n  mi_heap_guarded_set_size_bound(heap,\n    (size_t)mi_option_get_clamp(mi_option_guarded_min, 0, LONG_MAX),\n    (size_t)mi_option_get_clamp(mi_option_guarded_max, 0, LONG_MAX) );\n}\n#else\nmi_decl_export void mi_heap_guarded_set_sample_rate(mi_heap_t* heap, size_t sample_rate, size_t seed) {\n  MI_UNUSED(heap); MI_UNUSED(sample_rate); MI_UNUSED(seed);\n}\n\nmi_decl_export void mi_heap_guarded_set_size_bound(mi_heap_t* heap, size_t min, size_t max) {\n  MI_UNUSED(heap); MI_UNUSED(min); MI_UNUSED(max);\n}\nvoid _mi_heap_guarded_init(mi_heap_t* heap) {\n  MI_UNUSED(heap);\n}\n#endif\n\n\nstatic void mi_heap_main_init(void) {\n  if (_mi_heap_main.cookie == 0) {\n    _mi_heap_main.thread_id = _mi_thread_id();\n    _mi_heap_main.cookie = 1;\n    #if defined(_WIN32) && !defined(MI_SHARED_LIB)\n      _mi_random_init_weak(&_mi_heap_main.random);    // prevent allocation failure during bcrypt dll initialization with static linking\n    #else\n      _mi_random_init(&_mi_heap_main.random);\n    #endif\n    _mi_heap_main.cookie  = _mi_heap_random_next(&_mi_heap_main);\n    _mi_heap_main.keys[0] = _mi_heap_random_next(&_mi_heap_main);\n    _mi_heap_main.keys[1] = _mi_heap_random_next(&_mi_heap_main);\n    mi_lock_init(&mi_subproc_default.abandoned_os_lock);\n    mi_lock_init(&mi_subproc_default.abandoned_os_visit_lock);\n    _mi_heap_guarded_init(&_mi_heap_main);\n  }\n}\n\nmi_heap_t* _mi_heap_main_get(void) {\n  mi_heap_main_init();\n  return &_mi_heap_main;\n}\n\n\n/* -----------------------------------------------------------\n  Sub process\n----------------------------------------------------------- */\n\nmi_subproc_id_t mi_subproc_main(void) {\n  return NULL;\n}\n\nmi_subproc_id_t mi_subproc_new(void) {\n  mi_memid_t memid = _mi_memid_none();\n  mi_subproc_t* subproc = (mi_subproc_t*)_mi_arena_meta_zalloc(sizeof(mi_subproc_t), &memid);\n  if (subproc == NULL) return NULL;\n  subproc->memid = memid;\n  subproc->abandoned_os_list = NULL;\n  mi_lock_init(&subproc->abandoned_os_lock);\n  mi_lock_init(&subproc->abandoned_os_visit_lock);\n  return subproc;\n}\n\nmi_subproc_t* _mi_subproc_from_id(mi_subproc_id_t subproc_id) {\n  return (subproc_id == NULL ? &mi_subproc_default : (mi_subproc_t*)subproc_id);\n}\n\nvoid mi_subproc_delete(mi_subproc_id_t subproc_id) {\n  if (subproc_id == NULL) return;\n  mi_subproc_t* subproc = _mi_subproc_from_id(subproc_id);\n  // check if there are no abandoned segments still..\n  bool safe_to_delete = false;\n  mi_lock(&subproc->abandoned_os_lock) {\n    if (subproc->abandoned_os_list == NULL) {\n      safe_to_delete = true;\n    }\n  }\n  if (!safe_to_delete) return;\n  // safe to release\n  // todo: should we refcount subprocesses?\n  mi_lock_done(&subproc->abandoned_os_lock);\n  mi_lock_done(&subproc->abandoned_os_visit_lock);\n  _mi_arena_meta_free(subproc, subproc->memid, sizeof(mi_subproc_t));\n}\n\nvoid mi_subproc_add_current_thread(mi_subproc_id_t subproc_id) {\n  mi_heap_t* heap = mi_heap_get_default();\n  if (heap == NULL) return;\n  mi_assert(heap->tld->segments.subproc == &mi_subproc_default);\n  if (heap->tld->segments.subproc != &mi_subproc_default) return;\n  heap->tld->segments.subproc = _mi_subproc_from_id(subproc_id);\n}\n\n\n\n/* -----------------------------------------------------------\n  Initialization and freeing of the thread local heaps\n----------------------------------------------------------- */\n\n// note: in x64 in release build `sizeof(mi_thread_data_t)` is under 4KiB (= OS page size).\ntypedef struct mi_thread_data_s {\n  mi_heap_t  heap;   // must come first due to cast in `_mi_heap_done`\n  mi_tld_t   tld;\n  mi_memid_t memid;  // must come last due to zero'ing\n} mi_thread_data_t;\n\n\n// Thread meta-data is allocated directly from the OS. For\n// some programs that do not use thread pools and allocate and\n// destroy many OS threads, this may causes too much overhead\n// per thread so we maintain a small cache of recently freed metadata.\n\n#define TD_CACHE_SIZE (32)\nstatic _Atomic(mi_thread_data_t*) td_cache[TD_CACHE_SIZE];\n\nstatic mi_thread_data_t* mi_thread_data_zalloc(void) {\n  // try to find thread metadata in the cache\n  bool is_zero = false;\n  mi_thread_data_t* td = NULL;\n  for (int i = 0; i < TD_CACHE_SIZE; i++) {\n    td = mi_atomic_load_ptr_relaxed(mi_thread_data_t, &td_cache[i]);\n    if (td != NULL) {\n      // found cached allocation, try use it\n      td = mi_atomic_exchange_ptr_acq_rel(mi_thread_data_t, &td_cache[i], NULL);\n      if (td != NULL) {\n        break;\n      }\n    }\n  }\n\n  // if that fails, allocate as meta data\n  if (td == NULL) {\n    mi_memid_t memid;\n    td = (mi_thread_data_t*)_mi_os_alloc(sizeof(mi_thread_data_t), &memid);\n    if (td == NULL) {\n      // if this fails, try once more. (issue #257)\n      td = (mi_thread_data_t*)_mi_os_alloc(sizeof(mi_thread_data_t), &memid);\n      if (td == NULL) {\n        // really out of memory\n        _mi_error_message(ENOMEM, \"unable to allocate thread local heap metadata (%zu bytes)\\n\", sizeof(mi_thread_data_t));\n      }\n    }\n    if (td != NULL) {\n      td->memid = memid;\n      is_zero = memid.initially_zero;\n    }\n  }\n\n  if (td != NULL && !is_zero) {\n    _mi_memzero_aligned(td, offsetof(mi_thread_data_t,memid));\n  }\n  return td;\n}\n\nstatic void mi_thread_data_free( mi_thread_data_t* tdfree ) {\n  // try to add the thread metadata to the cache\n  for (int i = 0; i < TD_CACHE_SIZE; i++) {\n    mi_thread_data_t* td = mi_atomic_load_ptr_relaxed(mi_thread_data_t, &td_cache[i]);\n    if (td == NULL) {\n      mi_thread_data_t* expected = NULL;\n      if (mi_atomic_cas_ptr_weak_acq_rel(mi_thread_data_t, &td_cache[i], &expected, tdfree)) {\n        return;\n      }\n    }\n  }\n  // if that fails, just free it directly\n  _mi_os_free(tdfree, sizeof(mi_thread_data_t), tdfree->memid);\n}\n\nvoid _mi_thread_data_collect(void) {\n  // free all thread metadata from the cache\n  for (int i = 0; i < TD_CACHE_SIZE; i++) {\n    mi_thread_data_t* td = mi_atomic_load_ptr_relaxed(mi_thread_data_t, &td_cache[i]);\n    if (td != NULL) {\n      td = mi_atomic_exchange_ptr_acq_rel(mi_thread_data_t, &td_cache[i], NULL);\n      if (td != NULL) {\n        _mi_os_free(td, sizeof(mi_thread_data_t), td->memid);\n      }\n    }\n  }\n}\n\n// Initialize the thread local default heap, called from `mi_thread_init`\nstatic bool _mi_thread_heap_init(void) {\n  if (mi_heap_is_initialized(mi_prim_get_default_heap())) return true;\n  if (_mi_is_main_thread()) {\n    // mi_assert_internal(_mi_heap_main.thread_id != 0);  // can happen on freeBSD where alloc is called before any initialization\n    // the main heap is statically allocated\n    mi_heap_main_init();\n    _mi_heap_set_default_direct(&_mi_heap_main);\n    //mi_assert_internal(_mi_heap_default->tld->heap_backing == mi_prim_get_default_heap());\n  }\n  else {\n    // use `_mi_os_alloc` to allocate directly from the OS\n    mi_thread_data_t* td = mi_thread_data_zalloc();\n    if (td == NULL) return false;\n\n    mi_tld_t*  tld = &td->tld;\n    mi_heap_t* heap = &td->heap;\n    _mi_tld_init(tld, heap);  // must be before `_mi_heap_init`\n    _mi_heap_init(heap, tld, _mi_arena_id_none(), false /* can reclaim */, 0 /* default tag */);\n    _mi_heap_set_default_direct(heap);\n  }\n  return false;\n}\n\n// initialize thread local data\nvoid _mi_tld_init(mi_tld_t* tld, mi_heap_t* bheap) {\n  _mi_memcpy_aligned(tld, &tld_empty, sizeof(mi_tld_t));\n  tld->heap_backing = bheap;\n  tld->heaps = NULL;\n  tld->segments.subproc = &mi_subproc_default;\n  tld->segments.stats = &tld->stats;\n}\n\n// Free the thread local default heap (called from `mi_thread_done`)\nstatic bool _mi_thread_heap_done(mi_heap_t* heap) {\n  if (!mi_heap_is_initialized(heap)) return true;\n\n  // reset default heap\n  _mi_heap_set_default_direct(_mi_is_main_thread() ? &_mi_heap_main : (mi_heap_t*)&_mi_heap_empty);\n\n  // switch to backing heap\n  heap = heap->tld->heap_backing;\n  if (!mi_heap_is_initialized(heap)) return false;\n\n  // delete all non-backing heaps in this thread\n  mi_heap_t* curr = heap->tld->heaps;\n  while (curr != NULL) {\n    mi_heap_t* next = curr->next; // save `next` as `curr` will be freed\n    if (curr != heap) {\n      mi_assert_internal(!mi_heap_is_backing(curr));\n      mi_heap_delete(curr);\n    }\n    curr = next;\n  }\n  mi_assert_internal(heap->tld->heaps == heap && heap->next == NULL);\n  mi_assert_internal(mi_heap_is_backing(heap));\n\n  // collect if not the main thread\n  if (heap != &_mi_heap_main) {\n    _mi_heap_collect_abandon(heap);\n  }\n\n  // merge stats\n  _mi_stats_done(&heap->tld->stats);\n\n  // free if not the main thread\n  if (heap != &_mi_heap_main) {\n    // the following assertion does not always hold for huge segments as those are always treated\n    // as abondened: one may allocate it in one thread, but deallocate in another in which case\n    // the count can be too large or negative. todo: perhaps not count huge segments? see issue #363\n    // mi_assert_internal(heap->tld->segments.count == 0 || heap->thread_id != _mi_thread_id());\n    mi_thread_data_free((mi_thread_data_t*)heap);\n  }\n  else {\n    #if 0\n    // never free the main thread even in debug mode; if a dll is linked statically with mimalloc,\n    // there may still be delete/free calls after the mi_fls_done is called. Issue #207\n    _mi_heap_destroy_pages(heap);\n    mi_assert_internal(heap->tld->heap_backing == &_mi_heap_main);\n    #endif\n  }\n  return false;\n}\n\n\n\n// --------------------------------------------------------\n// Try to run `mi_thread_done()` automatically so any memory\n// owned by the thread but not yet released can be abandoned\n// and re-owned by another thread.\n//\n// 1. windows dynamic library:\n//     call from DllMain on DLL_THREAD_DETACH\n// 2. windows static library:\n//     use `FlsAlloc` to call a destructor when the thread is done\n// 3. unix, pthreads:\n//     use a pthread key to call a destructor when a pthread is done\n//\n// In the last two cases we also need to call `mi_process_init`\n// to set up the thread local keys.\n// --------------------------------------------------------\n\n// Set up handlers so `mi_thread_done` is called automatically\nstatic void mi_process_setup_auto_thread_done(void) {\n  static bool tls_initialized = false; // fine if it races\n  if (tls_initialized) return;\n  tls_initialized = true;\n  _mi_prim_thread_init_auto_done();\n  _mi_heap_set_default_direct(&_mi_heap_main);\n}\n\n\nbool _mi_is_main_thread(void) {\n  return (_mi_heap_main.thread_id==0 || _mi_heap_main.thread_id == _mi_thread_id());\n}\n\nstatic _Atomic(size_t) thread_count = MI_ATOMIC_VAR_INIT(1);\n\nsize_t  _mi_current_thread_count(void) {\n  return mi_atomic_load_relaxed(&thread_count);\n}\n\n// This is called from the `mi_malloc_generic`\nvoid mi_thread_init(void) mi_attr_noexcept\n{\n  // ensure our process has started already\n  mi_process_init();\n\n  // initialize the thread local default heap\n  // (this will call `_mi_heap_set_default_direct` and thus set the\n  //  fiber/pthread key to a non-zero value, ensuring `_mi_thread_done` is called)\n  if (_mi_thread_heap_init()) return;  // returns true if already initialized\n\n  _mi_stat_increase(&_mi_stats_main.threads, 1);\n  mi_atomic_increment_relaxed(&thread_count);\n  //_mi_verbose_message(\"thread init: 0x%zx\\n\", _mi_thread_id());\n}\n\nvoid mi_thread_done(void) mi_attr_noexcept {\n  _mi_thread_done(NULL);\n}\n\nvoid _mi_thread_done(mi_heap_t* heap)\n{\n  // calling with NULL implies using the default heap\n  if (heap == NULL) {\n    heap = mi_prim_get_default_heap();\n    if (heap == NULL) return;\n  }\n\n  // prevent re-entrancy through heap_done/heap_set_default_direct (issue #699)\n  if (!mi_heap_is_initialized(heap)) {\n    return;\n  }\n\n  // adjust stats\n  mi_atomic_decrement_relaxed(&thread_count);\n  _mi_stat_decrease(&_mi_stats_main.threads, 1);\n\n  // check thread-id as on Windows shutdown with FLS the main (exit) thread may call this on thread-local heaps...\n  if (heap->thread_id != _mi_thread_id()) return;\n\n  // abandon the thread local heap\n  if (_mi_thread_heap_done(heap)) return;  // returns true if already ran\n}\n\nvoid _mi_heap_set_default_direct(mi_heap_t* heap)  {\n  mi_assert_internal(heap != NULL);\n  #if defined(MI_TLS_SLOT)\n  mi_prim_tls_slot_set(MI_TLS_SLOT,heap);\n  #elif defined(MI_TLS_PTHREAD_SLOT_OFS)\n  *mi_prim_tls_pthread_heap_slot() = heap;\n  #elif defined(MI_TLS_PTHREAD)\n  // we use _mi_heap_default_key\n  #else\n  _mi_heap_default = heap;\n  #endif\n\n  // ensure the default heap is passed to `_mi_thread_done`\n  // setting to a non-NULL value also ensures `mi_thread_done` is called.\n  _mi_prim_thread_associate_default_heap(heap);\n}\n\nvoid mi_thread_set_in_threadpool(void) mi_attr_noexcept {\n  // nothing\n}\n\n// --------------------------------------------------------\n// Run functions on process init/done, and thread init/done\n// --------------------------------------------------------\nstatic bool os_preloading = true;    // true until this module is initialized\n\n// Returns true if this module has not been initialized; Don't use C runtime routines until it returns false.\nbool mi_decl_noinline _mi_preloading(void) {\n  return os_preloading;\n}\n\n// Returns true if mimalloc was redirected\nmi_decl_nodiscard bool mi_is_redirected(void) mi_attr_noexcept {\n  return _mi_is_redirected();\n}\n\n// Called once by the process loader from `src/prim/prim.c`\nvoid _mi_process_load(void) {\n  mi_heap_main_init();\n  #if defined(__APPLE__) || defined(MI_TLS_RECURSE_GUARD)\n  volatile mi_heap_t* dummy = _mi_heap_default; // access TLS to allocate it before setting tls_initialized to true;\n  if (dummy == NULL) return;                    // use dummy or otherwise the access may get optimized away (issue #697)\n  #endif\n  os_preloading = false;\n  mi_assert_internal(_mi_is_main_thread());\n  _mi_options_init();\n  mi_process_setup_auto_thread_done();\n  mi_process_init();\n  if (_mi_is_redirected()) _mi_verbose_message(\"malloc is redirected.\\n\");\n\n  // show message from the redirector (if present)\n  const char* msg = NULL;\n  _mi_allocator_init(&msg);\n  if (msg != NULL && (mi_option_is_enabled(mi_option_verbose) || mi_option_is_enabled(mi_option_show_errors))) {\n    _mi_fputs(NULL,NULL,NULL,msg);\n  }\n\n  // reseed random\n  _mi_random_reinit_if_weak(&_mi_heap_main.random);\n}\n\n#if defined(_WIN32) && (defined(_M_IX86) || defined(_M_X64))\n#include <intrin.h>\nmi_decl_cache_align bool _mi_cpu_has_fsrm = false;\nmi_decl_cache_align bool _mi_cpu_has_erms = false;\n\nstatic void mi_detect_cpu_features(void) {\n  // FSRM for fast short rep movsb/stosb support (AMD Zen3+ (~2020) or Intel Ice Lake+ (~2017))\n  // EMRS for fast enhanced rep movsb/stosb support\n  int32_t cpu_info[4];\n  __cpuid(cpu_info, 7);\n  _mi_cpu_has_fsrm = ((cpu_info[3] & (1 << 4)) != 0); // bit 4 of EDX : see <https://en.wikipedia.org/wiki/CPUID#EAX=7,_ECX=0:_Extended_Features>\n  _mi_cpu_has_erms = ((cpu_info[1] & (1 << 9)) != 0); // bit 9 of EBX : see <https://en.wikipedia.org/wiki/CPUID#EAX=7,_ECX=0:_Extended_Features>\n}\n#else\nstatic void mi_detect_cpu_features(void) {\n  // nothing\n}\n#endif\n\n// Initialize the process; called by thread_init or the process loader\nvoid mi_process_init(void) mi_attr_noexcept {\n  // ensure we are called once\n  static mi_atomic_once_t process_init;\n\t#if _MSC_VER < 1920\n\tmi_heap_main_init(); // vs2017 can dynamically re-initialize _mi_heap_main\n\t#endif\n  if (!mi_atomic_once(&process_init)) return;\n  _mi_process_is_initialized = true;\n  _mi_verbose_message(\"process init: 0x%zx\\n\", _mi_thread_id());\n  mi_process_setup_auto_thread_done();\n\n  mi_detect_cpu_features();\n  _mi_os_init();\n  mi_heap_main_init();\n  mi_thread_init();\n\n  #if defined(_WIN32)\n  // On windows, when building as a static lib the FLS cleanup happens to early for the main thread.\n  // To avoid this, set the FLS value for the main thread to NULL so the fls cleanup\n  // will not call _mi_thread_done on the (still executing) main thread. See issue #508.\n  _mi_prim_thread_associate_default_heap(NULL);\n  #endif\n\n  mi_stats_reset();  // only call stat reset *after* thread init (or the heap tld == NULL)\n  mi_track_init();\n\n  if (mi_option_is_enabled(mi_option_reserve_huge_os_pages)) {\n    size_t pages = mi_option_get_clamp(mi_option_reserve_huge_os_pages, 0, 128*1024);\n    long reserve_at = mi_option_get(mi_option_reserve_huge_os_pages_at);\n    if (reserve_at != -1) {\n      mi_reserve_huge_os_pages_at(pages, reserve_at, pages*500);\n    } else {\n      mi_reserve_huge_os_pages_interleave(pages, 0, pages*500);\n    }\n  }\n  if (mi_option_is_enabled(mi_option_reserve_os_memory)) {\n    long ksize = mi_option_get(mi_option_reserve_os_memory);\n    if (ksize > 0) {\n      mi_reserve_os_memory((size_t)ksize*MI_KiB, true /* commit? */, true /* allow large pages? */);\n    }\n  }\n}\n\n// Called when the process is done (through `at_exit`)\nvoid mi_cdecl _mi_process_done(void) {\n  // only shutdown if we were initialized\n  if (!_mi_process_is_initialized) return;\n  // ensure we are called once\n  static bool process_done = false;\n  if (process_done) return;\n  process_done = true;\n\n  // get the default heap so we don't need to acces thread locals anymore\n  mi_heap_t* heap = mi_prim_get_default_heap();  // use prim to not initialize any heap\n  mi_assert_internal(heap != NULL);\n\n  // release any thread specific resources and ensure _mi_thread_done is called on all but the main thread\n  _mi_prim_thread_done_auto_done();\n\n\n  #ifndef MI_SKIP_COLLECT_ON_EXIT\n    #if (MI_DEBUG || !defined(MI_SHARED_LIB))\n    // free all memory if possible on process exit. This is not needed for a stand-alone process\n    // but should be done if mimalloc is statically linked into another shared library which\n    // is repeatedly loaded/unloaded, see issue #281.\n    mi_heap_collect(heap, true /* force */ );\n    #endif\n  #endif\n\n  // Forcefully release all retained memory; this can be dangerous in general if overriding regular malloc/free\n  // since after process_done there might still be other code running that calls `free` (like at_exit routines,\n  // or C-runtime termination code.\n  if (mi_option_is_enabled(mi_option_destroy_on_exit)) {\n    mi_heap_collect(heap, true /* force */);\n    _mi_heap_unsafe_destroy_all(heap);     // forcefully release all memory held by all heaps (of this thread only!)\n    _mi_arena_unsafe_destroy_all();\n    _mi_segment_map_unsafe_destroy();\n  }\n\n  if (mi_option_is_enabled(mi_option_show_stats) || mi_option_is_enabled(mi_option_verbose)) {\n    mi_stats_print(NULL);\n  }\n  _mi_allocator_done();\n  _mi_verbose_message(\"process done: 0x%zx\\n\", _mi_heap_main.thread_id);\n  os_preloading = true; // don't call the C runtime anymore\n}\n\n"
  },
  {
    "path": "third-party/mimalloc/src/libc.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2023, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n// --------------------------------------------------------\n// This module defines various std libc functions to reduce\n// the dependency on libc, and also prevent errors caused\n// by some libc implementations when called before `main`\n// executes (due to malloc redirection)\n// --------------------------------------------------------\n\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"mimalloc/prim.h\"      // mi_prim_getenv\n\nchar _mi_toupper(char c) {\n  if (c >= 'a' && c <= 'z') return (c - 'a' + 'A');\n                       else return c;\n}\n\nint _mi_strnicmp(const char* s, const char* t, size_t n) {\n  if (n == 0) return 0;\n  for (; *s != 0 && *t != 0 && n > 0; s++, t++, n--) {\n    if (_mi_toupper(*s) != _mi_toupper(*t)) break;\n  }\n  return (n == 0 ? 0 : *s - *t);\n}\n\nvoid _mi_strlcpy(char* dest, const char* src, size_t dest_size) {\n  if (dest==NULL || src==NULL || dest_size == 0) return;\n  // copy until end of src, or when dest is (almost) full\n  while (*src != 0 && dest_size > 1) {\n    *dest++ = *src++;\n    dest_size--;\n  }\n  // always zero terminate\n  *dest = 0;\n}\n\nvoid _mi_strlcat(char* dest, const char* src, size_t dest_size) {\n  if (dest==NULL || src==NULL || dest_size == 0) return;\n  // find end of string in the dest buffer\n  while (*dest != 0 && dest_size > 1) {\n    dest++;\n    dest_size--;\n  }\n  // and catenate\n  _mi_strlcpy(dest, src, dest_size);\n}\n\nsize_t _mi_strlen(const char* s) {\n  if (s==NULL) return 0;\n  size_t len = 0;\n  while(s[len] != 0) { len++; }\n  return len;\n}\n\nsize_t _mi_strnlen(const char* s, size_t max_len) {\n  if (s==NULL) return 0;\n  size_t len = 0;\n  while(s[len] != 0 && len < max_len) { len++; }\n  return len;\n}\n\n#ifdef MI_NO_GETENV\nbool _mi_getenv(const char* name, char* result, size_t result_size) {\n  MI_UNUSED(name);\n  MI_UNUSED(result);\n  MI_UNUSED(result_size);\n  return false;\n}\n#else\nbool _mi_getenv(const char* name, char* result, size_t result_size) {\n  if (name==NULL || result == NULL || result_size < 64) return false;\n  return _mi_prim_getenv(name,result,result_size);\n}\n#endif\n\n// --------------------------------------------------------\n// Define our own limited `_mi_vsnprintf` and `_mi_snprintf`\n// This is mostly to avoid calling these when libc is not yet\n// initialized (and to reduce dependencies)\n//\n// format:      d i, p x u, s\n// prec:        z l ll L\n// width:       10\n// align-left:  -\n// fill:        0\n// plus:        +\n// --------------------------------------------------------\n\nstatic void mi_outc(char c, char** out, char* end) {\n  char* p = *out;\n  if (p >= end) return;\n  *p = c;\n  *out = p + 1;\n}\n\nstatic void mi_outs(const char* s, char** out, char* end) {\n  if (s == NULL) return;\n  char* p = *out;\n  while (*s != 0 && p < end) {\n    *p++ = *s++;\n  }\n  *out = p;\n}\n\nstatic void mi_out_fill(char fill, size_t len, char** out, char* end) {\n  char* p = *out;\n  for (size_t i = 0; i < len && p < end; i++) {\n    *p++ = fill;\n  }\n  *out = p;\n}\n\nstatic void mi_out_alignright(char fill, char* start, size_t len, size_t extra, char* end) {\n  if (len == 0 || extra == 0) return;\n  if (start + len + extra >= end) return;\n  // move `len` characters to the right (in reverse since it can overlap)\n  for (size_t i = 1; i <= len; i++) {\n    start[len + extra - i] = start[len - i];\n  }\n  // and fill the start\n  for (size_t i = 0; i < extra; i++) {\n    start[i] = fill;\n  }\n}\n\n\nstatic void mi_out_num(uintmax_t x, size_t base, char prefix, char** out, char* end)\n{\n  if (x == 0 || base == 0 || base > 16) {\n    if (prefix != 0) { mi_outc(prefix, out, end); }\n    mi_outc('0',out,end);\n  }\n  else {\n    // output digits in reverse\n    char* start = *out;\n    while (x > 0) {\n      char digit = (char)(x % base);\n      mi_outc((digit <= 9 ? '0' + digit : 'A' + digit - 10),out,end);\n      x = x / base;\n    }\n    if (prefix != 0) {\n      mi_outc(prefix, out, end);\n    }\n    size_t len = *out - start;\n    // and reverse in-place\n    for (size_t i = 0; i < (len / 2); i++) {\n      char c = start[len - i - 1];\n      start[len - i - 1] = start[i];\n      start[i] = c;\n    }\n  }\n}\n\n\n#define MI_NEXTC()  c = *in; if (c==0) break; in++;\n\nint _mi_vsnprintf(char* buf, size_t bufsize, const char* fmt, va_list args) {\n  if (buf == NULL || bufsize == 0 || fmt == NULL) return 0;\n  buf[bufsize - 1] = 0;\n  char* const end = buf + (bufsize - 1);\n  const char* in = fmt;\n  char* out = buf;\n  while (true) {\n    if (out >= end) break;\n    char c;\n    MI_NEXTC();\n    if (c != '%') {\n      if ((c >= ' ' && c <= '~') || c=='\\n' || c=='\\r' || c=='\\t') { // output visible ascii or standard control only\n        mi_outc(c, &out, end);\n      }\n    }\n    else {\n      MI_NEXTC();\n      char   fill = ' ';\n      size_t width = 0;\n      char   numtype = 'd';\n      char   numplus = 0;\n      bool   alignright = true;\n      if (c == '+' || c == ' ') { numplus = c; MI_NEXTC(); }\n      if (c == '-') { alignright = false; MI_NEXTC(); }\n      if (c == '0') { fill = '0'; MI_NEXTC(); }\n      if (c >= '1' && c <= '9') {\n        width = (c - '0'); MI_NEXTC();\n        while (c >= '0' && c <= '9') {\n          width = (10 * width) + (c - '0'); MI_NEXTC();\n        }\n        if (c == 0) break;  // extra check due to while\n      }\n      if (c == 'z' || c == 't' || c == 'L') { numtype = c; MI_NEXTC(); }\n      else if (c == 'l') {\n        numtype = c; MI_NEXTC();\n        if (c == 'l') { numtype = 'L'; MI_NEXTC(); }\n      }\n\n      char* start = out;\n      if (c == 's') {\n        // string\n        const char* s = va_arg(args, const char*);\n        mi_outs(s, &out, end);\n      }\n      else if (c == 'p' || c == 'x' || c == 'u') {\n        // unsigned\n        uintmax_t x = 0;\n        if (c == 'x' || c == 'u') {\n          if (numtype == 'z')       x = va_arg(args, size_t);\n          else if (numtype == 't')  x = va_arg(args, uintptr_t); // unsigned ptrdiff_t\n          else if (numtype == 'L')  x = va_arg(args, unsigned long long);\n          else if (numtype == 'l')  x = va_arg(args, unsigned long);\n                               else x = va_arg(args, unsigned int);\n        }\n        else if (c == 'p') {\n          x = va_arg(args, uintptr_t);\n          mi_outs(\"0x\", &out, end);\n          start = out;\n          width = (width >= 2 ? width - 2 : 0);\n        }\n        if (width == 0 && (c == 'x' || c == 'p')) {\n          if (c == 'p')   { width = 2 * (x <= UINT32_MAX ? 4 : ((x >> 16) <= UINT32_MAX ? 6 : sizeof(void*))); }\n          if (width == 0) { width = 2; }\n          fill = '0';\n        }\n        mi_out_num(x, (c == 'x' || c == 'p' ? 16 : 10), numplus, &out, end);\n      }\n      else if (c == 'i' || c == 'd') {\n        // signed\n        intmax_t x = 0;\n        if (numtype == 'z')       x = va_arg(args, intptr_t );\n        else if (numtype == 't')  x = va_arg(args, ptrdiff_t);\n        else if (numtype == 'L')  x = va_arg(args, long long);\n        else if (numtype == 'l')  x = va_arg(args, long);\n                             else x = va_arg(args, int);\n        char pre = 0;\n        if (x < 0) {\n          pre = '-';\n          if (x > INTMAX_MIN) { x = -x; }\n        }\n        else if (numplus != 0) {\n          pre = numplus;\n        }\n        mi_out_num((uintmax_t)x, 10, pre, &out, end);\n      }\n      else if (c >= ' ' && c <= '~') {\n        // unknown format\n        mi_outc('%', &out, end);\n        mi_outc(c, &out, end);\n      }\n\n      // fill & align\n      mi_assert_internal(out <= end);\n      mi_assert_internal(out >= start);\n      const size_t len = out - start;\n      if (len < width) {\n        mi_out_fill(fill, width - len, &out, end);\n        if (alignright && out <= end) {\n          mi_out_alignright(fill, start, len, width - len, end);\n        }\n      }\n    }\n  }\n  mi_assert_internal(out <= end);\n  *out = 0;\n  return (int)(out - buf);\n}\n\nint _mi_snprintf(char* buf, size_t buflen, const char* fmt, ...) {\n  va_list args;\n  va_start(args, fmt);\n  const int written = _mi_vsnprintf(buf, buflen, fmt, args);\n  va_end(args);\n  return written;\n}\n"
  },
  {
    "path": "third-party/mimalloc/src/options.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2021, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"mimalloc/atomic.h\"\n#include \"mimalloc/prim.h\"  // mi_prim_out_stderr\n\n#include <stdio.h>      // stdin/stdout\n#include <stdlib.h>     // abort\n\n\n\nstatic long mi_max_error_count   = 16; // stop outputting errors after this (use < 0 for no limit)\nstatic long mi_max_warning_count = 16; // stop outputting warnings after this (use < 0 for no limit)\n\nstatic void mi_add_stderr_output(void);\n\nint mi_version(void) mi_attr_noexcept {\n  return MI_MALLOC_VERSION;\n}\n\n\n// --------------------------------------------------------\n// Options\n// These can be accessed by multiple threads and may be\n// concurrently initialized, but an initializing data race\n// is ok since they resolve to the same value.\n// --------------------------------------------------------\ntypedef enum mi_init_e {\n  UNINIT,       // not yet initialized\n  DEFAULTED,    // not found in the environment, use default value\n  INITIALIZED   // found in environment or set explicitly\n} mi_init_t;\n\ntypedef struct mi_option_desc_s {\n  long        value;  // the value\n  mi_init_t   init;   // is it initialized yet? (from the environment)\n  mi_option_t option; // for debugging: the option index should match the option\n  const char* name;   // option name without `mimalloc_` prefix\n  const char* legacy_name; // potential legacy option name\n} mi_option_desc_t;\n\n#define MI_OPTION(opt)                  mi_option_##opt, #opt, NULL\n#define MI_OPTION_LEGACY(opt,legacy)    mi_option_##opt, #opt, #legacy\n\n// Some options can be set at build time for statically linked libraries\n// (use `-DMI_EXTRA_CPPDEFS=\"opt1=val1;opt2=val2\"`)\n//\n// This is useful if we cannot pass them as environment variables\n// (and setting them programmatically would be too late)\n\n#ifndef MI_DEFAULT_VERBOSE\n#define MI_DEFAULT_VERBOSE 0\n#endif\n\n#ifndef MI_DEFAULT_EAGER_COMMIT\n#define MI_DEFAULT_EAGER_COMMIT 1\n#endif\n\n#ifndef MI_DEFAULT_ARENA_EAGER_COMMIT\n#define MI_DEFAULT_ARENA_EAGER_COMMIT 2\n#endif\n\n// in KiB\n#ifndef MI_DEFAULT_ARENA_RESERVE\n #if (MI_INTPTR_SIZE>4)\n  #define MI_DEFAULT_ARENA_RESERVE 1024L*1024L\n #else\n  #define MI_DEFAULT_ARENA_RESERVE 128L*1024L\n #endif\n#endif\n\n#ifndef MI_DEFAULT_DISALLOW_ARENA_ALLOC\n#define MI_DEFAULT_DISALLOW_ARENA_ALLOC 0\n#endif\n\n#ifndef MI_DEFAULT_ALLOW_LARGE_OS_PAGES\n#if defined(__linux__) && !defined(__ANDROID__)\n#define MI_DEFAULT_ALLOW_LARGE_OS_PAGES 2    // enabled, but only use transparent huge pages through madvise\n#else\n#define MI_DEFAULT_ALLOW_LARGE_OS_PAGES 0\n#endif\n#endif\n\n#ifndef MI_DEFAULT_RESERVE_HUGE_OS_PAGES\n#define MI_DEFAULT_RESERVE_HUGE_OS_PAGES 0\n#endif\n\n#ifndef MI_DEFAULT_RESERVE_OS_MEMORY\n#define MI_DEFAULT_RESERVE_OS_MEMORY 0\n#endif\n\n#ifndef MI_DEFAULT_GUARDED_SAMPLE_RATE\n#if MI_GUARDED\n#define MI_DEFAULT_GUARDED_SAMPLE_RATE 4000\n#else\n#define MI_DEFAULT_GUARDED_SAMPLE_RATE 0\n#endif\n#endif\n\n\nstatic mi_option_desc_t options[_mi_option_last] =\n{\n  // stable options\n  #if MI_DEBUG || defined(MI_SHOW_ERRORS)\n  { 1, UNINIT, MI_OPTION(show_errors) },\n  #else\n  { 0, UNINIT, MI_OPTION(show_errors) },\n  #endif\n  { 0, UNINIT, MI_OPTION(show_stats) },\n  { MI_DEFAULT_VERBOSE, UNINIT, MI_OPTION(verbose) },\n\n  // some of the following options are experimental and not all combinations are allowed.\n  { MI_DEFAULT_EAGER_COMMIT,\n       UNINIT, MI_OPTION(eager_commit) },               // commit per segment directly (4MiB)  (but see also `eager_commit_delay`)\n  { MI_DEFAULT_ARENA_EAGER_COMMIT,\n       UNINIT, MI_OPTION_LEGACY(arena_eager_commit,eager_region_commit) }, // eager commit arena's? 2 is used to enable this only on an OS that has overcommit (i.e. linux)\n  { 1, UNINIT, MI_OPTION_LEGACY(purge_decommits,reset_decommits) },        // purge decommits memory (instead of reset) (note: on linux this uses MADV_DONTNEED for decommit)\n  { MI_DEFAULT_ALLOW_LARGE_OS_PAGES,\n       UNINIT, MI_OPTION_LEGACY(allow_large_os_pages,large_os_pages) },    // use large OS pages, use only with eager commit to prevent fragmentation of VMA's\n  { MI_DEFAULT_RESERVE_HUGE_OS_PAGES,\n       UNINIT, MI_OPTION(reserve_huge_os_pages) },      // per 1GiB huge pages\n  {-1, UNINIT, MI_OPTION(reserve_huge_os_pages_at) },   // reserve huge pages at node N\n  { MI_DEFAULT_RESERVE_OS_MEMORY,\n       UNINIT, MI_OPTION(reserve_os_memory)     },      // reserve N KiB OS memory in advance (use `option_get_size`)\n  { 0, UNINIT, MI_OPTION(deprecated_segment_cache) },   // cache N segments per thread\n  { 0, UNINIT, MI_OPTION(deprecated_page_reset) },      // reset page memory on free\n  { 0, UNINIT, MI_OPTION_LEGACY(abandoned_page_purge,abandoned_page_reset) },       // reset free page memory when a thread terminates\n  { 0, UNINIT, MI_OPTION(deprecated_segment_reset) },   // reset segment memory on free (needs eager commit)\n#if defined(__NetBSD__)\n  { 0, UNINIT, MI_OPTION(eager_commit_delay) },         // the first N segments per thread are not eagerly committed\n#else\n  { 1, UNINIT, MI_OPTION(eager_commit_delay) },         // the first N segments per thread are not eagerly committed (but per page in the segment on demand)\n#endif\n  { 10,  UNINIT, MI_OPTION_LEGACY(purge_delay,reset_delay) },  // purge delay in milli-seconds\n  { 0,   UNINIT, MI_OPTION(use_numa_nodes) },           // 0 = use available numa nodes, otherwise use at most N nodes.\n  { 0,   UNINIT, MI_OPTION_LEGACY(disallow_os_alloc,limit_os_alloc) },           // 1 = do not use OS memory for allocation (but only reserved arenas)\n  { 100, UNINIT, MI_OPTION(os_tag) },                   // only apple specific for now but might serve more or less related purpose\n  { 32,  UNINIT, MI_OPTION(max_errors) },               // maximum errors that are output\n  { 32,  UNINIT, MI_OPTION(max_warnings) },             // maximum warnings that are output\n  { 10,  UNINIT, MI_OPTION(max_segment_reclaim)},       // max. percentage of the abandoned segments to be reclaimed per try.\n  { 0,   UNINIT, MI_OPTION(destroy_on_exit)},           // release all OS memory on process exit; careful with dangling pointer or after-exit frees!\n  { MI_DEFAULT_ARENA_RESERVE, UNINIT, MI_OPTION(arena_reserve) }, // reserve memory N KiB at a time (=1GiB) (use `option_get_size`)\n  { 10,  UNINIT, MI_OPTION(arena_purge_mult) },         // purge delay multiplier for arena's\n  { 1,   UNINIT, MI_OPTION_LEGACY(purge_extend_delay, decommit_extend_delay) },\n  { 0,   UNINIT, MI_OPTION(abandoned_reclaim_on_free) },// reclaim an abandoned segment on a free\n  { MI_DEFAULT_DISALLOW_ARENA_ALLOC,   UNINIT, MI_OPTION(disallow_arena_alloc) }, // 1 = do not use arena's for allocation (except if using specific arena id's)\n  { 400, UNINIT, MI_OPTION(retry_on_oom) },             // windows only: retry on out-of-memory for N milli seconds (=400), set to 0 to disable retries.\n#if defined(MI_VISIT_ABANDONED)\n  { 1,   INITIALIZED, MI_OPTION(visit_abandoned) },     // allow visiting heap blocks in abandoned segments; requires taking locks during reclaim.\n#else\n  { 0,   UNINIT, MI_OPTION(visit_abandoned) },\n#endif\n  { 0,   UNINIT, MI_OPTION(guarded_min) },              // only used when building with MI_GUARDED: minimal rounded object size for guarded objects\n  { MI_GiB, UNINIT, MI_OPTION(guarded_max) },           // only used when building with MI_GUARDED: maximal rounded object size for guarded objects\n  { 0,   UNINIT, MI_OPTION(guarded_precise) },          // disregard minimal alignment requirement to always place guarded blocks exactly in front of a guard page (=0)\n  { MI_DEFAULT_GUARDED_SAMPLE_RATE,\n         UNINIT, MI_OPTION(guarded_sample_rate)},       // 1 out of N allocations in the min/max range will be guarded (=4000)\n  { 0,   UNINIT, MI_OPTION(guarded_sample_seed)},\n  { 0,   UNINIT, MI_OPTION(target_segments_per_thread) }, // abandon segments beyond this point, or 0 to disable.\n  { 10000, UNINIT, MI_OPTION(generic_collect) },          // collect heaps every N (=10000) generic allocation calls\n};\n\nstatic void mi_option_init(mi_option_desc_t* desc);\n\nstatic bool mi_option_has_size_in_kib(mi_option_t option) {\n  return (option == mi_option_reserve_os_memory || option == mi_option_arena_reserve);\n}\n\nvoid _mi_options_init(void) {\n  // called on process load\n  mi_add_stderr_output(); // now it safe to use stderr for output\n  for(int i = 0; i < _mi_option_last; i++ ) {\n    mi_option_t option = (mi_option_t)i;\n    long l = mi_option_get(option); MI_UNUSED(l); // initialize\n  }\n  mi_max_error_count = mi_option_get(mi_option_max_errors);\n  mi_max_warning_count = mi_option_get(mi_option_max_warnings);\n  #if MI_GUARDED\n  if (mi_option_get(mi_option_guarded_sample_rate) > 0) {\n    if (mi_option_is_enabled(mi_option_allow_large_os_pages)) {\n      mi_option_disable(mi_option_allow_large_os_pages);\n      _mi_warning_message(\"option 'allow_large_os_pages' is disabled to allow for guarded objects\\n\");\n    }\n  }\n  #endif\n  if (mi_option_is_enabled(mi_option_verbose)) { mi_options_print(); }\n}\n\n#define mi_stringifyx(str)  #str                // and stringify\n#define mi_stringify(str)   mi_stringifyx(str)  // expand\n\nvoid mi_options_print(void) mi_attr_noexcept\n{\n  // show version\n  const int vermajor = MI_MALLOC_VERSION/100;\n  const int verminor = (MI_MALLOC_VERSION%100)/10;\n  const int verpatch = (MI_MALLOC_VERSION%10);\n  _mi_message(\"v%i.%i.%i%s%s (built on %s, %s)\\n\", vermajor, verminor, verpatch,\n      #if defined(MI_CMAKE_BUILD_TYPE)\n      \", \" mi_stringify(MI_CMAKE_BUILD_TYPE)\n      #else\n      \"\"\n      #endif\n      ,\n      #if defined(MI_GIT_DESCRIBE)\n      \", git \" mi_stringify(MI_GIT_DESCRIBE)\n      #else\n      \"\"\n      #endif\n      , __DATE__, __TIME__);\n\n  // show options\n  for (int i = 0; i < _mi_option_last; i++) {\n    mi_option_t option = (mi_option_t)i;\n    long l = mi_option_get(option); MI_UNUSED(l); // possibly initialize\n    mi_option_desc_t* desc = &options[option];\n    _mi_message(\"option '%s': %ld %s\\n\", desc->name, desc->value, (mi_option_has_size_in_kib(option) ? \"KiB\" : \"\"));\n  }\n\n  // show build configuration\n  _mi_message(\"debug level : %d\\n\", MI_DEBUG );\n  _mi_message(\"secure level: %d\\n\", MI_SECURE );\n  _mi_message(\"mem tracking: %s\\n\", MI_TRACK_TOOL);\n  #if MI_GUARDED\n  _mi_message(\"guarded build: %s\\n\", mi_option_get(mi_option_guarded_sample_rate) != 0 ? \"enabled\" : \"disabled\");\n  #endif\n  #if MI_TSAN\n  _mi_message(\"thread santizer enabled\\n\");\n  #endif\n}\n\nlong _mi_option_get_fast(mi_option_t option) {\n  mi_assert(option >= 0 && option < _mi_option_last);\n  mi_option_desc_t* desc = &options[option];\n  mi_assert(desc->option == option);  // index should match the option\n  //mi_assert(desc->init != UNINIT);\n  return desc->value;\n}\n\n\nmi_decl_nodiscard long mi_option_get(mi_option_t option) {\n  mi_assert(option >= 0 && option < _mi_option_last);\n  if (option < 0 || option >= _mi_option_last) return 0;\n  mi_option_desc_t* desc = &options[option];\n  mi_assert(desc->option == option);  // index should match the option\n  if mi_unlikely(desc->init == UNINIT) {\n    mi_option_init(desc);\n  }\n  return desc->value;\n}\n\nmi_decl_nodiscard long mi_option_get_clamp(mi_option_t option, long min, long max) {\n  long x = mi_option_get(option);\n  return (x < min ? min : (x > max ? max : x));\n}\n\nmi_decl_nodiscard size_t mi_option_get_size(mi_option_t option) {\n  const long x = mi_option_get(option);\n  size_t size = (x < 0 ? 0 : (size_t)x);\n  if (mi_option_has_size_in_kib(option)) {\n    size *= MI_KiB;\n  }\n  return size;\n}\n\nvoid mi_option_set(mi_option_t option, long value) {\n  mi_assert(option >= 0 && option < _mi_option_last);\n  if (option < 0 || option >= _mi_option_last) return;\n  mi_option_desc_t* desc = &options[option];\n  mi_assert(desc->option == option);  // index should match the option\n  desc->value = value;\n  desc->init = INITIALIZED;\n  // ensure min/max range; be careful to not recurse.\n  if (desc->option == mi_option_guarded_min && _mi_option_get_fast(mi_option_guarded_max) < value) {\n    mi_option_set(mi_option_guarded_max, value);\n  }\n  else if (desc->option == mi_option_guarded_max && _mi_option_get_fast(mi_option_guarded_min) > value) {\n    mi_option_set(mi_option_guarded_min, value);\n  }\n}\n\nvoid mi_option_set_default(mi_option_t option, long value) {\n  mi_assert(option >= 0 && option < _mi_option_last);\n  if (option < 0 || option >= _mi_option_last) return;\n  mi_option_desc_t* desc = &options[option];\n  if (desc->init != INITIALIZED) {\n    desc->value = value;\n  }\n}\n\nmi_decl_nodiscard bool mi_option_is_enabled(mi_option_t option) {\n  return (mi_option_get(option) != 0);\n}\n\nvoid mi_option_set_enabled(mi_option_t option, bool enable) {\n  mi_option_set(option, (enable ? 1 : 0));\n}\n\nvoid mi_option_set_enabled_default(mi_option_t option, bool enable) {\n  mi_option_set_default(option, (enable ? 1 : 0));\n}\n\nvoid mi_option_enable(mi_option_t option) {\n  mi_option_set_enabled(option,true);\n}\n\nvoid mi_option_disable(mi_option_t option) {\n  mi_option_set_enabled(option,false);\n}\n\nstatic void mi_cdecl mi_out_stderr(const char* msg, void* arg) {\n  MI_UNUSED(arg);\n  if (msg != NULL && msg[0] != 0) {\n    _mi_prim_out_stderr(msg);\n  }\n}\n\n// Since an output function can be registered earliest in the `main`\n// function we also buffer output that happens earlier. When\n// an output function is registered it is called immediately with\n// the output up to that point.\n#ifndef MI_MAX_DELAY_OUTPUT\n#define MI_MAX_DELAY_OUTPUT ((size_t)(16*1024))\n#endif\nstatic char out_buf[MI_MAX_DELAY_OUTPUT+1];\nstatic _Atomic(size_t) out_len;\n\nstatic void mi_cdecl mi_out_buf(const char* msg, void* arg) {\n  MI_UNUSED(arg);\n  if (msg==NULL) return;\n  if (mi_atomic_load_relaxed(&out_len)>=MI_MAX_DELAY_OUTPUT) return;\n  size_t n = _mi_strlen(msg);\n  if (n==0) return;\n  // claim space\n  size_t start = mi_atomic_add_acq_rel(&out_len, n);\n  if (start >= MI_MAX_DELAY_OUTPUT) return;\n  // check bound\n  if (start+n >= MI_MAX_DELAY_OUTPUT) {\n    n = MI_MAX_DELAY_OUTPUT-start-1;\n  }\n  _mi_memcpy(&out_buf[start], msg, n);\n}\n\nstatic void mi_out_buf_flush(mi_output_fun* out, bool no_more_buf, void* arg) {\n  if (out==NULL) return;\n  // claim (if `no_more_buf == true`, no more output will be added after this point)\n  size_t count = mi_atomic_add_acq_rel(&out_len, (no_more_buf ? MI_MAX_DELAY_OUTPUT : 1));\n  // and output the current contents\n  if (count>MI_MAX_DELAY_OUTPUT) count = MI_MAX_DELAY_OUTPUT;\n  out_buf[count] = 0;\n  out(out_buf,arg);\n  if (!no_more_buf) {\n    out_buf[count] = '\\n'; // if continue with the buffer, insert a newline\n  }\n}\n\n\n// Once this module is loaded, switch to this routine\n// which outputs to stderr and the delayed output buffer.\nstatic void mi_cdecl mi_out_buf_stderr(const char* msg, void* arg) {\n  mi_out_stderr(msg,arg);\n  mi_out_buf(msg,arg);\n}\n\n\n\n// --------------------------------------------------------\n// Default output handler\n// --------------------------------------------------------\n\n// Should be atomic but gives errors on many platforms as generally we cannot cast a function pointer to a uintptr_t.\n// For now, don't register output from multiple threads.\nstatic mi_output_fun* volatile mi_out_default; // = NULL\nstatic _Atomic(void*) mi_out_arg; // = NULL\n\nstatic mi_output_fun* mi_out_get_default(void** parg) {\n  if (parg != NULL) { *parg = mi_atomic_load_ptr_acquire(void,&mi_out_arg); }\n  mi_output_fun* out = mi_out_default;\n  return (out == NULL ? &mi_out_buf : out);\n}\n\nvoid mi_register_output(mi_output_fun* out, void* arg) mi_attr_noexcept {\n  mi_out_default = (out == NULL ? &mi_out_stderr : out); // stop using the delayed output buffer\n  mi_atomic_store_ptr_release(void,&mi_out_arg, arg);\n  if (out!=NULL) mi_out_buf_flush(out,true,arg);         // output all the delayed output now\n}\n\n// add stderr to the delayed output after the module is loaded\nstatic void mi_add_stderr_output(void) {\n  mi_assert_internal(mi_out_default == NULL);\n  mi_out_buf_flush(&mi_out_stderr, false, NULL); // flush current contents to stderr\n  mi_out_default = &mi_out_buf_stderr;           // and add stderr to the delayed output\n}\n\n// --------------------------------------------------------\n// Messages, all end up calling `_mi_fputs`.\n// --------------------------------------------------------\nstatic _Atomic(size_t) error_count;   // = 0;  // when >= max_error_count stop emitting errors\nstatic _Atomic(size_t) warning_count; // = 0;  // when >= max_warning_count stop emitting warnings\n\n// When overriding malloc, we may recurse into mi_vfprintf if an allocation\n// inside the C runtime causes another message.\n// In some cases (like on macOS) the loader already allocates which\n// calls into mimalloc; if we then access thread locals (like `recurse`)\n// this may crash as the access may call _tlv_bootstrap that tries to\n// (recursively) invoke malloc again to allocate space for the thread local\n// variables on demand. This is why we use a _mi_preloading test on such\n// platforms. However, C code generator may move the initial thread local address\n// load before the `if` and we therefore split it out in a separate function.\nstatic mi_decl_thread bool recurse = false;\n\nstatic mi_decl_noinline bool mi_recurse_enter_prim(void) {\n  if (recurse) return false;\n  recurse = true;\n  return true;\n}\n\nstatic mi_decl_noinline void mi_recurse_exit_prim(void) {\n  recurse = false;\n}\n\nstatic bool mi_recurse_enter(void) {\n  #if defined(__APPLE__) || defined(MI_TLS_RECURSE_GUARD)\n  if (_mi_preloading()) return false;\n  #endif\n  return mi_recurse_enter_prim();\n}\n\nstatic void mi_recurse_exit(void) {\n  #if defined(__APPLE__) || defined(MI_TLS_RECURSE_GUARD)\n  if (_mi_preloading()) return;\n  #endif\n  mi_recurse_exit_prim();\n}\n\nvoid _mi_fputs(mi_output_fun* out, void* arg, const char* prefix, const char* message) {\n  if (out==NULL || (void*)out==(void*)stdout || (void*)out==(void*)stderr) { // TODO: use mi_out_stderr for stderr?\n    if (!mi_recurse_enter()) return;\n    out = mi_out_get_default(&arg);\n    if (prefix != NULL) out(prefix, arg);\n    out(message, arg);\n    mi_recurse_exit();\n  }\n  else {\n    if (prefix != NULL) out(prefix, arg);\n    out(message, arg);\n  }\n}\n\n// Define our own limited `fprintf` that avoids memory allocation.\n// We do this using `_mi_vsnprintf` with a limited buffer.\nstatic void mi_vfprintf( mi_output_fun* out, void* arg, const char* prefix, const char* fmt, va_list args ) {\n  char buf[512];\n  if (fmt==NULL) return;\n  if (!mi_recurse_enter()) return;\n  _mi_vsnprintf(buf, sizeof(buf)-1, fmt, args);\n  mi_recurse_exit();\n  _mi_fputs(out,arg,prefix,buf);\n}\n\nvoid _mi_fprintf( mi_output_fun* out, void* arg, const char* fmt, ... ) {\n  va_list args;\n  va_start(args,fmt);\n  mi_vfprintf(out,arg,NULL,fmt,args);\n  va_end(args);\n}\n\nstatic void mi_vfprintf_thread(mi_output_fun* out, void* arg, const char* prefix, const char* fmt, va_list args) {\n  if (prefix != NULL && _mi_strnlen(prefix,33) <= 32 && !_mi_is_main_thread()) {\n    char tprefix[64];\n    _mi_snprintf(tprefix, sizeof(tprefix), \"%sthread 0x%tx: \", prefix, (uintptr_t)_mi_thread_id());\n    mi_vfprintf(out, arg, tprefix, fmt, args);\n  }\n  else {\n    mi_vfprintf(out, arg, prefix, fmt, args);\n  }\n}\n\nvoid _mi_message(const char* fmt, ...) {\n  va_list args;\n  va_start(args, fmt);\n  mi_vfprintf_thread(NULL, NULL, \"mimalloc: \", fmt, args);\n  va_end(args);\n}\n\nvoid _mi_trace_message(const char* fmt, ...) {\n  if (mi_option_get(mi_option_verbose) <= 1) return;  // only with verbose level 2 or higher\n  va_list args;\n  va_start(args, fmt);\n  mi_vfprintf_thread(NULL, NULL, \"mimalloc: \", fmt, args);\n  va_end(args);\n}\n\nvoid _mi_verbose_message(const char* fmt, ...) {\n  if (!mi_option_is_enabled(mi_option_verbose)) return;\n  va_list args;\n  va_start(args,fmt);\n  mi_vfprintf(NULL, NULL, \"mimalloc: \", fmt, args);\n  va_end(args);\n}\n\nstatic void mi_show_error_message(const char* fmt, va_list args) {\n  if (!mi_option_is_enabled(mi_option_verbose)) {\n    if (!mi_option_is_enabled(mi_option_show_errors)) return;\n    if (mi_max_error_count >= 0 && (long)mi_atomic_increment_acq_rel(&error_count) > mi_max_error_count) return;\n  }\n  mi_vfprintf_thread(NULL, NULL, \"mimalloc: error: \", fmt, args);\n}\n\nvoid _mi_warning_message(const char* fmt, ...) {\n  if (!mi_option_is_enabled(mi_option_verbose)) {\n    if (!mi_option_is_enabled(mi_option_show_errors)) return;\n    if (mi_max_warning_count >= 0 && (long)mi_atomic_increment_acq_rel(&warning_count) > mi_max_warning_count) return;\n  }\n  va_list args;\n  va_start(args,fmt);\n  mi_vfprintf_thread(NULL, NULL, \"mimalloc: warning: \", fmt, args);\n  va_end(args);\n}\n\n\n#if MI_DEBUG\nvoid _mi_assert_fail(const char* assertion, const char* fname, unsigned line, const char* func ) {\n  _mi_fprintf(NULL, NULL, \"mimalloc: assertion failed: at \\\"%s\\\":%u, %s\\n  assertion: \\\"%s\\\"\\n\", fname, line, (func==NULL?\"\":func), assertion);\n  abort();\n}\n#endif\n\n// --------------------------------------------------------\n// Errors\n// --------------------------------------------------------\n\nstatic mi_error_fun* volatile  mi_error_handler; // = NULL\nstatic _Atomic(void*) mi_error_arg;     // = NULL\n\nstatic void mi_error_default(int err) {\n  MI_UNUSED(err);\n#if (MI_DEBUG>0)\n  if (err==EFAULT) {\n    #ifdef _MSC_VER\n    __debugbreak();\n    #endif\n    abort();\n  }\n#endif\n#if (MI_SECURE>0)\n  if (err==EFAULT) {  // abort on serious errors in secure mode (corrupted meta-data)\n    abort();\n  }\n#endif\n#if defined(MI_XMALLOC)\n  if (err==ENOMEM || err==EOVERFLOW) { // abort on memory allocation fails in xmalloc mode\n    abort();\n  }\n#endif\n}\n\nvoid mi_register_error(mi_error_fun* fun, void* arg) {\n  mi_error_handler = fun;  // can be NULL\n  mi_atomic_store_ptr_release(void,&mi_error_arg, arg);\n}\n\nvoid _mi_error_message(int err, const char* fmt, ...) {\n  // show detailed error message\n  va_list args;\n  va_start(args, fmt);\n  mi_show_error_message(fmt, args);\n  va_end(args);\n  // and call the error handler which may abort (or return normally)\n  if (mi_error_handler != NULL) {\n    mi_error_handler(err, mi_atomic_load_ptr_acquire(void,&mi_error_arg));\n  }\n  else {\n    mi_error_default(err);\n  }\n}\n\n// --------------------------------------------------------\n// Initialize options by checking the environment\n// --------------------------------------------------------\n\n// TODO: implement ourselves to reduce dependencies on the C runtime\n#include <stdlib.h> // strtol\n#include <string.h> // strstr\n\n\nstatic void mi_option_init(mi_option_desc_t* desc) {\n  // Read option value from the environment\n  char s[64 + 1];\n  char buf[64+1];\n  _mi_strlcpy(buf, \"mimalloc_\", sizeof(buf));\n  _mi_strlcat(buf, desc->name, sizeof(buf));\n  bool found = _mi_getenv(buf, s, sizeof(s));\n  if (!found && desc->legacy_name != NULL) {\n    _mi_strlcpy(buf, \"mimalloc_\", sizeof(buf));\n    _mi_strlcat(buf, desc->legacy_name, sizeof(buf));\n    found = _mi_getenv(buf, s, sizeof(s));\n    if (found) {\n      _mi_warning_message(\"environment option \\\"mimalloc_%s\\\" is deprecated -- use \\\"mimalloc_%s\\\" instead.\\n\", desc->legacy_name, desc->name);\n    }\n  }\n\n  if (found) {\n    size_t len = _mi_strnlen(s, sizeof(buf) - 1);\n    for (size_t i = 0; i < len; i++) {\n      buf[i] = _mi_toupper(s[i]);\n    }\n    buf[len] = 0;\n    if (buf[0] == 0 || strstr(\"1;TRUE;YES;ON\", buf) != NULL) {\n      desc->value = 1;\n      desc->init = INITIALIZED;\n    }\n    else if (strstr(\"0;FALSE;NO;OFF\", buf) != NULL) {\n      desc->value = 0;\n      desc->init = INITIALIZED;\n    }\n    else {\n      char* end = buf;\n      long value = strtol(buf, &end, 10);\n      if (mi_option_has_size_in_kib(desc->option)) {\n        // this option is interpreted in KiB to prevent overflow of `long` for large allocations\n        // (long is 32-bit on 64-bit windows, which allows for 4TiB max.)\n        size_t size = (value < 0 ? 0 : (size_t)value);\n        bool overflow = false;\n        if (*end == 'K') { end++; }\n        else if (*end == 'M') { overflow = mi_mul_overflow(size,MI_KiB,&size); end++; }\n        else if (*end == 'G') { overflow = mi_mul_overflow(size,MI_MiB,&size); end++; }\n        else if (*end == 'T') { overflow = mi_mul_overflow(size,MI_GiB,&size); end++; }\n        else { size = (size + MI_KiB - 1) / MI_KiB; }\n        if (end[0] == 'I' && end[1] == 'B') { end += 2; } // KiB, MiB, GiB, TiB\n        else if (*end == 'B') { end++; }                  // Kb, Mb, Gb, Tb\n        if (overflow || size > MI_MAX_ALLOC_SIZE) { size = (MI_MAX_ALLOC_SIZE / MI_KiB); }\n        value = (size > LONG_MAX ? LONG_MAX : (long)size);\n      }\n      if (*end == 0) {\n        mi_option_set(desc->option, value);\n      }\n      else {\n        // set `init` first to avoid recursion through _mi_warning_message on mimalloc_verbose.\n        desc->init = DEFAULTED;\n        if (desc->option == mi_option_verbose && desc->value == 0) {\n          // if the 'mimalloc_verbose' env var has a bogus value we'd never know\n          // (since the value defaults to 'off') so in that case briefly enable verbose\n          desc->value = 1;\n          _mi_warning_message(\"environment option mimalloc_%s has an invalid value.\\n\", desc->name);\n          desc->value = 0;\n        }\n        else {\n          _mi_warning_message(\"environment option mimalloc_%s has an invalid value.\\n\", desc->name);\n        }\n      }\n    }\n    mi_assert_internal(desc->init != UNINIT);\n  }\n  else if (!_mi_preloading()) {\n    desc->init = DEFAULTED;\n  }\n}\n"
  },
  {
    "path": "third-party/mimalloc/src/os.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2023, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"mimalloc/atomic.h\"\n#include \"mimalloc/prim.h\"\n\n#define mi_os_stat_increase(stat,amount)      _mi_stat_increase(&_mi_stats_main.stat, amount)\n#define mi_os_stat_decrease(stat,amount)      _mi_stat_decrease(&_mi_stats_main.stat, amount)\n#define mi_os_stat_counter_increase(stat,inc) _mi_stat_counter_increase(&_mi_stats_main.stat, inc)\n\n/* -----------------------------------------------------------\n  Initialization.\n----------------------------------------------------------- */\n#ifndef MI_DEFAULT_VIRTUAL_ADDRESS_BITS\n#if MI_INTPTR_SIZE < 8\n#define MI_DEFAULT_VIRTUAL_ADDRESS_BITS     32\n#else\n#define MI_DEFAULT_VIRTUAL_ADDRESS_BITS     48\n#endif\n#endif\n\n#ifndef MI_DEFAULT_PHYSICAL_MEMORY_IN_KIB\n#if MI_INTPTR_SIZE < 8\n#define MI_DEFAULT_PHYSICAL_MEMORY_IN_KIB   4*MI_MiB    // 4 GiB\n#else\n#define MI_DEFAULT_PHYSICAL_MEMORY_IN_KIB   32*MI_MiB   // 32 GiB\n#endif\n#endif\n\nstatic mi_os_mem_config_t mi_os_mem_config = {\n  4096,     // page size\n  0,        // large page size (usually 2MiB)\n  4096,     // allocation granularity\n  MI_DEFAULT_PHYSICAL_MEMORY_IN_KIB,\n  MI_DEFAULT_VIRTUAL_ADDRESS_BITS,\n  true,     // has overcommit?  (if true we use MAP_NORESERVE on mmap systems)\n  false,    // can we partially free allocated blocks? (on mmap systems we can free anywhere in a mapped range, but on Windows we must free the entire span)\n  true      // has virtual reserve? (if true we can reserve virtual address space without using commit or physical memory)\n};\n\nbool _mi_os_has_overcommit(void) {\n  return mi_os_mem_config.has_overcommit;\n}\n\nbool _mi_os_has_virtual_reserve(void) {\n  return mi_os_mem_config.has_virtual_reserve;\n}\n\n\n// OS (small) page size\nsize_t _mi_os_page_size(void) {\n  return mi_os_mem_config.page_size;\n}\n\n// if large OS pages are supported (2 or 4MiB), then return the size, otherwise return the small page size (4KiB)\nsize_t _mi_os_large_page_size(void) {\n  return (mi_os_mem_config.large_page_size != 0 ? mi_os_mem_config.large_page_size : _mi_os_page_size());\n}\n\nbool _mi_os_use_large_page(size_t size, size_t alignment) {\n  // if we have access, check the size and alignment requirements\n  if (mi_os_mem_config.large_page_size == 0 || !mi_option_is_enabled(mi_option_allow_large_os_pages)) return false;\n  return ((size % mi_os_mem_config.large_page_size) == 0 && (alignment % mi_os_mem_config.large_page_size) == 0);\n}\n\n// round to a good OS allocation size (bounded by max 12.5% waste)\nsize_t _mi_os_good_alloc_size(size_t size) {\n  size_t align_size;\n  if (size < 512*MI_KiB) align_size = _mi_os_page_size();\n  else if (size < 2*MI_MiB) align_size = 64*MI_KiB;\n  else if (size < 8*MI_MiB) align_size = 256*MI_KiB;\n  else if (size < 32*MI_MiB) align_size = 1*MI_MiB;\n  else align_size = 4*MI_MiB;\n  if mi_unlikely(size >= (SIZE_MAX - align_size)) return size; // possible overflow?\n  return _mi_align_up(size, align_size);\n}\n\nvoid _mi_os_init(void) {\n  _mi_prim_mem_init(&mi_os_mem_config);\n}\n\n\n/* -----------------------------------------------------------\n  Util\n-------------------------------------------------------------- */\nbool _mi_os_decommit(void* addr, size_t size);\nbool _mi_os_commit(void* addr, size_t size, bool* is_zero);\n\n\n/* -----------------------------------------------------------\n  aligned hinting\n-------------------------------------------------------------- */\n\n// On systems with enough virtual address bits, we can do efficient aligned allocation by using\n// the 2TiB to 30TiB area to allocate those. If we have at least 46 bits of virtual address\n// space (64TiB) we use this technique. (but see issue #939)\n#if (MI_INTPTR_SIZE >= 8) && !defined(MI_NO_ALIGNED_HINT)\nstatic mi_decl_cache_align _Atomic(uintptr_t)aligned_base;\n\n// Return a MI_SEGMENT_SIZE aligned address that is probably available.\n// If this returns NULL, the OS will determine the address but on some OS's that may not be\n// properly aligned which can be more costly as it needs to be adjusted afterwards.\n// For a size > 1GiB this always returns NULL in order to guarantee good ASLR randomization;\n// (otherwise an initial large allocation of say 2TiB has a 50% chance to include (known) addresses\n//  in the middle of the 2TiB - 6TiB address range (see issue #372))\n\n#define MI_HINT_BASE ((uintptr_t)2 << 40)  // 2TiB start\n#define MI_HINT_AREA ((uintptr_t)4 << 40)  // upto 6TiB   (since before win8 there is \"only\" 8TiB available to processes)\n#define MI_HINT_MAX  ((uintptr_t)30 << 40) // wrap after 30TiB (area after 32TiB is used for huge OS pages)\n\nvoid* _mi_os_get_aligned_hint(size_t try_alignment, size_t size)\n{\n  if (try_alignment <= 1 || try_alignment > MI_SEGMENT_SIZE) return NULL;\n  if (mi_os_mem_config.virtual_address_bits < 46) return NULL;  // < 64TiB virtual address space\n  size = _mi_align_up(size, MI_SEGMENT_SIZE);\n  if (size > 1*MI_GiB) return NULL;  // guarantee the chance of fixed valid address is at most 1/(MI_HINT_AREA / 1<<30) = 1/4096.\n  #if (MI_SECURE>0)\n  size += MI_SEGMENT_SIZE;        // put in `MI_SEGMENT_SIZE` virtual gaps between hinted blocks; this splits VLA's but increases guarded areas.\n  #endif\n\n  uintptr_t hint = mi_atomic_add_acq_rel(&aligned_base, size);\n  if (hint == 0 || hint > MI_HINT_MAX) {   // wrap or initialize\n    uintptr_t init = MI_HINT_BASE;\n    #if (MI_SECURE>0 || MI_DEBUG==0)       // security: randomize start of aligned allocations unless in debug mode\n    uintptr_t r = _mi_heap_random_next(mi_prim_get_default_heap());\n    init = init + ((MI_SEGMENT_SIZE * ((r>>17) & 0xFFFFF)) % MI_HINT_AREA);  // (randomly 20 bits)*4MiB == 0 to 4TiB\n    #endif\n    uintptr_t expected = hint + size;\n    mi_atomic_cas_strong_acq_rel(&aligned_base, &expected, init);\n    hint = mi_atomic_add_acq_rel(&aligned_base, size); // this may still give 0 or > MI_HINT_MAX but that is ok, it is a hint after all\n  }\n  if (hint%try_alignment != 0) return NULL;\n  return (void*)hint;\n}\n#else\nvoid* _mi_os_get_aligned_hint(size_t try_alignment, size_t size) {\n  MI_UNUSED(try_alignment); MI_UNUSED(size);\n  return NULL;\n}\n#endif\n\n/* -----------------------------------------------------------\n  Free memory\n-------------------------------------------------------------- */\n\nstatic void mi_os_free_huge_os_pages(void* p, size_t size);\n\nstatic void mi_os_prim_free(void* addr, size_t size, size_t commit_size) {\n  mi_assert_internal((size % _mi_os_page_size()) == 0);\n  if (addr == NULL || size == 0) return; // || _mi_os_is_huge_reserved(addr)\n  int err = _mi_prim_free(addr, size);\n  if (err != 0) {\n    _mi_warning_message(\"unable to free OS memory (error: %d (0x%x), size: 0x%zx bytes, address: %p)\\n\", err, err, size, addr);\n  }\n  if (commit_size > 0) {\n    mi_os_stat_decrease(committed, commit_size);\n  }\n  mi_os_stat_decrease(reserved, size);\n}\n\nvoid _mi_os_free_ex(void* addr, size_t size, bool still_committed, mi_memid_t memid) {\n  if (mi_memkind_is_os(memid.memkind)) {\n    size_t csize = memid.mem.os.size;\n    if (csize==0) { _mi_os_good_alloc_size(size); }\n    size_t commit_size = (still_committed ? csize : 0);\n    void* base = addr;\n    // different base? (due to alignment)\n    if (memid.mem.os.base != base) {\n      mi_assert(memid.mem.os.base <= addr);      \n      base = memid.mem.os.base;\n      const size_t diff = (uint8_t*)addr - (uint8_t*)memid.mem.os.base;\n      if (memid.mem.os.size==0) { \n        csize += diff;\n      }\n      if (still_committed) {\n        commit_size -= diff;  // the (addr-base) part was already un-committed\n      }\n    }\n    // free it\n    if (memid.memkind == MI_MEM_OS_HUGE) {\n      mi_assert(memid.is_pinned);\n      mi_os_free_huge_os_pages(base, csize);\n    }\n    else {\n      mi_os_prim_free(base, csize, (still_committed ? commit_size : 0));\n    }\n  }\n  else {\n    // nothing to do\n    mi_assert(memid.memkind < MI_MEM_OS);\n  }\n}\n\nvoid  _mi_os_free(void* p, size_t size, mi_memid_t memid) {\n  _mi_os_free_ex(p, size, true, memid);\n}\n\n\n/* -----------------------------------------------------------\n   Primitive allocation from the OS.\n-------------------------------------------------------------- */\n\n// Note: the `try_alignment` is just a hint and the returned pointer is not guaranteed to be aligned.\n// Also `hint_addr` is a hint and may be ignored.\nstatic void* mi_os_prim_alloc_at(void* hint_addr, size_t size, size_t try_alignment, bool commit, bool allow_large, bool* is_large, bool* is_zero) {\n  mi_assert_internal(size > 0 && (size % _mi_os_page_size()) == 0);\n  mi_assert_internal(is_zero != NULL);\n  mi_assert_internal(is_large != NULL);\n  if (size == 0) return NULL;\n  if (!commit) { allow_large = false; }\n  if (try_alignment == 0) { try_alignment = 1; } // avoid 0 to ensure there will be no divide by zero when aligning\n  *is_zero = false;\n  void* p = NULL;\n  int err = _mi_prim_alloc(hint_addr, size, try_alignment, commit, allow_large, is_large, is_zero, &p);\n  if (err != 0) {\n    _mi_warning_message(\"unable to allocate OS memory (error: %d (0x%x), addr: %p, size: 0x%zx bytes, align: 0x%zx, commit: %d, allow large: %d)\\n\", err, err, hint_addr, size, try_alignment, commit, allow_large);\n  }\n\n\n\n  mi_os_stat_counter_increase(mmap_calls, 1);\n  if (p != NULL) {\n    mi_os_stat_increase(reserved, size);\n    if (commit) {\n      mi_os_stat_increase(committed, size);\n      // seems needed for asan (or `mimalloc-test-api` fails)\n      #ifdef MI_TRACK_ASAN\n      if (*is_zero) { mi_track_mem_defined(p,size); }\n               else { mi_track_mem_undefined(p,size); }\n      #endif\n    }\n  }\n  return p;\n}\n\nstatic void* mi_os_prim_alloc(size_t size, size_t try_alignment, bool commit, bool allow_large, bool* is_large, bool* is_zero) {\n  return mi_os_prim_alloc_at(NULL, size, try_alignment, commit, allow_large, is_large, is_zero);\n}\n\n\n// Primitive aligned allocation from the OS.\n// This function guarantees the allocated memory is aligned.\nstatic void* mi_os_prim_alloc_aligned(size_t size, size_t alignment, bool commit, bool allow_large, bool* is_large, bool* is_zero, void** base) {\n  mi_assert_internal(alignment >= _mi_os_page_size() && ((alignment & (alignment - 1)) == 0));\n  mi_assert_internal(size > 0 && (size % _mi_os_page_size()) == 0);\n  mi_assert_internal(is_large != NULL);\n  mi_assert_internal(is_zero != NULL);\n  mi_assert_internal(base != NULL);\n  if (!commit) allow_large = false;\n  if (!(alignment >= _mi_os_page_size() && ((alignment & (alignment - 1)) == 0))) return NULL;\n  size = _mi_align_up(size, _mi_os_page_size());\n\n  // try first with a requested alignment hint (this will usually be aligned directly on Win 10+ or BSD)\n  void* p = mi_os_prim_alloc(size, alignment, commit, allow_large, is_large, is_zero);\n  if (p == NULL) return NULL;\n\n  // aligned already?\n  if (((uintptr_t)p % alignment) == 0) {\n    *base = p;\n  }\n  else {\n    // if not aligned, free it, overallocate, and unmap around it\n    #if !MI_TRACK_ASAN\n    _mi_warning_message(\"unable to allocate aligned OS memory directly, fall back to over-allocation (size: 0x%zx bytes, address: %p, alignment: 0x%zx, commit: %d)\\n\", size, p, alignment, commit);\n    #endif\n    if (p != NULL) { mi_os_prim_free(p, size, (commit ? size : 0)); }\n    if (size >= (SIZE_MAX - alignment)) return NULL; // overflow\n    const size_t over_size = size + alignment;\n\n    if (!mi_os_mem_config.has_partial_free) {  // win32 virtualAlloc cannot free parts of an allocated block\n      // over-allocate uncommitted (virtual) memory\n      p = mi_os_prim_alloc(over_size, 1 /*alignment*/, false /* commit? */, false /* allow_large */, is_large, is_zero);\n      if (p == NULL) return NULL;\n\n      // set p to the aligned part in the full region\n      // note: this is dangerous on Windows as VirtualFree needs the actual base pointer\n      // this is handled though by having the `base` field in the memid's\n      *base = p; // remember the base\n      p = mi_align_up_ptr(p, alignment);\n\n      // explicitly commit only the aligned part\n      if (commit) {\n        _mi_os_commit(p, size, NULL);\n      }\n    }\n    else  { // mmap can free inside an allocation\n      // overallocate...\n      p = mi_os_prim_alloc(over_size, 1, commit, false, is_large, is_zero);\n      if (p == NULL) return NULL;\n\n      // and selectively unmap parts around the over-allocated area.\n      void* aligned_p = mi_align_up_ptr(p, alignment);\n      size_t pre_size = (uint8_t*)aligned_p - (uint8_t*)p;\n      size_t mid_size = _mi_align_up(size, _mi_os_page_size());\n      size_t post_size = over_size - pre_size - mid_size;\n      mi_assert_internal(pre_size < over_size&& post_size < over_size&& mid_size >= size);\n      if (pre_size > 0)  { mi_os_prim_free(p, pre_size, (commit ? pre_size : 0)); }\n      if (post_size > 0) { mi_os_prim_free((uint8_t*)aligned_p + mid_size, post_size, (commit ? post_size : 0)); }\n      // we can return the aligned pointer on `mmap` systems\n      p = aligned_p;\n      *base = aligned_p; // since we freed the pre part, `*base == p`.\n    }\n  }\n\n  mi_assert_internal(p == NULL || (p != NULL && *base != NULL && ((uintptr_t)p % alignment) == 0));\n  return p;\n}\n\n\n/* -----------------------------------------------------------\n  OS API: alloc and alloc_aligned\n----------------------------------------------------------- */\n\nvoid* _mi_os_alloc(size_t size, mi_memid_t* memid) {\n  *memid = _mi_memid_none();\n  if (size == 0) return NULL;\n  size = _mi_os_good_alloc_size(size);\n  bool os_is_large = false;\n  bool os_is_zero  = false;\n  void* p = mi_os_prim_alloc(size, 0, true, false, &os_is_large, &os_is_zero);\n  if (p != NULL) {\n    *memid = _mi_memid_create_os(true, os_is_zero, os_is_large);\n  }\n  return p;\n}\n\nvoid* _mi_os_alloc_aligned(size_t size, size_t alignment, bool commit, bool allow_large, mi_memid_t* memid)\n{\n  MI_UNUSED(&_mi_os_get_aligned_hint); // suppress unused warnings\n  *memid = _mi_memid_none();\n  if (size == 0) return NULL;\n  size = _mi_os_good_alloc_size(size);\n  alignment = _mi_align_up(alignment, _mi_os_page_size());\n\n  bool os_is_large = false;\n  bool os_is_zero  = false;\n  void* os_base = NULL;\n  void* p = mi_os_prim_alloc_aligned(size, alignment, commit, allow_large, &os_is_large, &os_is_zero, &os_base );\n  if (p != NULL) {\n    *memid = _mi_memid_create_os(commit, os_is_zero, os_is_large);\n    memid->mem.os.base = os_base;\n    // memid->mem.os.alignment = alignment;\n    memid->mem.os.size += ((uint8_t*)p - (uint8_t*)os_base);  // todo: return from prim_alloc_aligned\n  }\n  return p;\n}\n\n/* -----------------------------------------------------------\n  OS aligned allocation with an offset. This is used\n  for large alignments > MI_BLOCK_ALIGNMENT_MAX. We use a large mimalloc\n  page where the object can be aligned at an offset from the start of the segment.\n  As we may need to overallocate, we need to free such pointers using `mi_free_aligned`\n  to use the actual start of the memory region.\n----------------------------------------------------------- */\n\nvoid* _mi_os_alloc_aligned_at_offset(size_t size, size_t alignment, size_t offset, bool commit, bool allow_large, mi_memid_t* memid) {\n  mi_assert(offset <= MI_SEGMENT_SIZE);\n  mi_assert(offset <= size);\n  mi_assert((alignment % _mi_os_page_size()) == 0);\n  *memid = _mi_memid_none();\n  if (offset > MI_SEGMENT_SIZE) return NULL;\n  if (offset == 0) {\n    // regular aligned allocation\n    return _mi_os_alloc_aligned(size, alignment, commit, allow_large, memid);\n  }\n  else {\n    // overallocate to align at an offset\n    const size_t extra = _mi_align_up(offset, alignment) - offset;\n    const size_t oversize = size + extra;\n    void* const start = _mi_os_alloc_aligned(oversize, alignment, commit, allow_large, memid);\n    if (start == NULL) return NULL;\n\n    void* const p = (uint8_t*)start + extra;\n    mi_assert(_mi_is_aligned((uint8_t*)p + offset, alignment));\n    // decommit the overallocation at the start\n    if (commit && extra > _mi_os_page_size()) {\n      _mi_os_decommit(start, extra);\n    }\n    return p;\n  }\n}\n\n/* -----------------------------------------------------------\n  OS memory API: reset, commit, decommit, protect, unprotect.\n----------------------------------------------------------- */\n\n// OS page align within a given area, either conservative (pages inside the area only),\n// or not (straddling pages outside the area is possible)\nstatic void* mi_os_page_align_areax(bool conservative, void* addr, size_t size, size_t* newsize) {\n  mi_assert(addr != NULL && size > 0);\n  if (newsize != NULL) *newsize = 0;\n  if (size == 0 || addr == NULL) return NULL;\n\n  // page align conservatively within the range\n  void* start = (conservative ? mi_align_up_ptr(addr, _mi_os_page_size())\n    : mi_align_down_ptr(addr, _mi_os_page_size()));\n  void* end = (conservative ? mi_align_down_ptr((uint8_t*)addr + size, _mi_os_page_size())\n    : mi_align_up_ptr((uint8_t*)addr + size, _mi_os_page_size()));\n  ptrdiff_t diff = (uint8_t*)end - (uint8_t*)start;\n  if (diff <= 0) return NULL;\n\n  mi_assert_internal((conservative && (size_t)diff <= size) || (!conservative && (size_t)diff >= size));\n  if (newsize != NULL) *newsize = (size_t)diff;\n  return start;\n}\n\nstatic void* mi_os_page_align_area_conservative(void* addr, size_t size, size_t* newsize) {\n  return mi_os_page_align_areax(true, addr, size, newsize);\n}\n\nbool _mi_os_commit_ex(void* addr, size_t size, bool* is_zero, size_t stat_size) {\n  if (is_zero != NULL) { *is_zero = false; }\n  mi_os_stat_increase(committed, stat_size);  // use size for precise commit vs. decommit\n  mi_os_stat_counter_increase(commit_calls, 1);\n\n  // page align range\n  size_t csize;\n  void* start = mi_os_page_align_areax(false /* conservative? */, addr, size, &csize);\n  if (csize == 0) return true;\n\n  // commit\n  bool os_is_zero = false;\n  int err = _mi_prim_commit(start, csize, &os_is_zero);\n  if (err != 0) {\n    _mi_warning_message(\"cannot commit OS memory (error: %d (0x%x), address: %p, size: 0x%zx bytes)\\n\", err, err, start, csize);\n    return false;\n  }\n  if (os_is_zero && is_zero != NULL) {\n    *is_zero = true;\n    mi_assert_expensive(mi_mem_is_zero(start, csize));\n  }\n  // note: the following seems required for asan (otherwise `mimalloc-test-stress` fails)\n  #ifdef MI_TRACK_ASAN\n  if (os_is_zero) { mi_track_mem_defined(start,csize); }\n             else { mi_track_mem_undefined(start,csize); }\n  #endif\n  return true;\n}\n\nbool _mi_os_commit(void* addr, size_t size, bool* is_zero) {\n  return _mi_os_commit_ex(addr, size, is_zero, size);\n}\n\nstatic bool mi_os_decommit_ex(void* addr, size_t size, bool* needs_recommit, size_t stat_size) {\n  mi_assert_internal(needs_recommit!=NULL);\n  mi_os_stat_decrease(committed, stat_size);\n\n  // page align\n  size_t csize;\n  void* start = mi_os_page_align_area_conservative(addr, size, &csize);\n  if (csize == 0) return true;\n\n  // decommit\n  *needs_recommit = true;\n  int err = _mi_prim_decommit(start,csize,needs_recommit);\n  if (err != 0) {\n    _mi_warning_message(\"cannot decommit OS memory (error: %d (0x%x), address: %p, size: 0x%zx bytes)\\n\", err, err, start, csize);\n  }\n  mi_assert_internal(err == 0);\n  return (err == 0);\n}\n\nbool _mi_os_decommit(void* addr, size_t size) {\n  bool needs_recommit;\n  return mi_os_decommit_ex(addr, size, &needs_recommit, size);\n}\n\n\n// Signal to the OS that the address range is no longer in use\n// but may be used later again. This will release physical memory\n// pages and reduce swapping while keeping the memory committed.\n// We page align to a conservative area inside the range to reset.\nbool _mi_os_reset(void* addr, size_t size) {\n  // page align conservatively within the range\n  size_t csize;\n  void* start = mi_os_page_align_area_conservative(addr, size, &csize);\n  if (csize == 0) return true;  // || _mi_os_is_huge_reserved(addr)\n  mi_os_stat_increase(reset, csize);\n  mi_os_stat_counter_increase(reset_calls, 1);\n\n  #if (MI_DEBUG>1) && !MI_SECURE && !MI_TRACK_ENABLED // && !MI_TSAN\n  memset(start, 0, csize); // pretend it is eagerly reset\n  #endif\n\n  int err = _mi_prim_reset(start, csize);\n  if (err != 0) {\n    _mi_warning_message(\"cannot reset OS memory (error: %d (0x%x), address: %p, size: 0x%zx bytes)\\n\", err, err, start, csize);\n  }\n  return (err == 0);\n}\n\n\n// either resets or decommits memory, returns true if the memory needs\n// to be recommitted if it is to be re-used later on.\nbool _mi_os_purge_ex(void* p, size_t size, bool allow_reset, size_t stat_size)\n{\n  if (mi_option_get(mi_option_purge_delay) < 0) return false;  // is purging allowed?\n  mi_os_stat_counter_increase(purge_calls, 1);\n  mi_os_stat_increase(purged, size);\n\n  if (mi_option_is_enabled(mi_option_purge_decommits) &&   // should decommit?\n      !_mi_preloading())                                   // don't decommit during preloading (unsafe)\n  {\n    bool needs_recommit = true;\n    mi_os_decommit_ex(p, size, &needs_recommit, stat_size);\n    return needs_recommit;\n  }\n  else {\n    if (allow_reset) {  // this can sometimes be not allowed if the range is not fully committed\n      _mi_os_reset(p, size);\n    }\n    return false;  // needs no recommit\n  }\n}\n\n// either resets or decommits memory, returns true if the memory needs\n// to be recommitted if it is to be re-used later on.\nbool _mi_os_purge(void* p, size_t size) {\n  return _mi_os_purge_ex(p, size, true, size);\n}\n\n// Protect a region in memory to be not accessible.\nstatic  bool mi_os_protectx(void* addr, size_t size, bool protect) {\n  // page align conservatively within the range\n  size_t csize = 0;\n  void* start = mi_os_page_align_area_conservative(addr, size, &csize);\n  if (csize == 0) return false;\n  /*\n  if (_mi_os_is_huge_reserved(addr)) {\n\t  _mi_warning_message(\"cannot mprotect memory allocated in huge OS pages\\n\");\n  }\n  */\n  int err = _mi_prim_protect(start,csize,protect);\n  if (err != 0) {\n    _mi_warning_message(\"cannot %s OS memory (error: %d (0x%x), address: %p, size: 0x%zx bytes)\\n\", (protect ? \"protect\" : \"unprotect\"), err, err, start, csize);\n  }\n  return (err == 0);\n}\n\nbool _mi_os_protect(void* addr, size_t size) {\n  return mi_os_protectx(addr, size, true);\n}\n\nbool _mi_os_unprotect(void* addr, size_t size) {\n  return mi_os_protectx(addr, size, false);\n}\n\n\n\n/* ----------------------------------------------------------------------------\nSupport for allocating huge OS pages (1Gib) that are reserved up-front\nand possibly associated with a specific NUMA node. (use `numa_node>=0`)\n-----------------------------------------------------------------------------*/\n#define MI_HUGE_OS_PAGE_SIZE  (MI_GiB)\n\n\n#if (MI_INTPTR_SIZE >= 8)\n// To ensure proper alignment, use our own area for huge OS pages\nstatic mi_decl_cache_align _Atomic(uintptr_t)  mi_huge_start; // = 0\n\n// Claim an aligned address range for huge pages\nstatic uint8_t* mi_os_claim_huge_pages(size_t pages, size_t* total_size) {\n  if (total_size != NULL) *total_size = 0;\n  const size_t size = pages * MI_HUGE_OS_PAGE_SIZE;\n\n  uintptr_t start = 0;\n  uintptr_t end = 0;\n  uintptr_t huge_start = mi_atomic_load_relaxed(&mi_huge_start);\n  do {\n    start = huge_start;\n    if (start == 0) {\n      // Initialize the start address after the 32TiB area\n      start = ((uintptr_t)32 << 40);  // 32TiB virtual start address\n    #if (MI_SECURE>0 || MI_DEBUG==0)      // security: randomize start of huge pages unless in debug mode\n      uintptr_t r = _mi_heap_random_next(mi_prim_get_default_heap());\n      start = start + ((uintptr_t)MI_HUGE_OS_PAGE_SIZE * ((r>>17) & 0x0FFF));  // (randomly 12bits)*1GiB == between 0 to 4TiB\n    #endif\n    }\n    end = start + size;\n    mi_assert_internal(end % MI_SEGMENT_SIZE == 0);\n  } while (!mi_atomic_cas_strong_acq_rel(&mi_huge_start, &huge_start, end));\n\n  if (total_size != NULL) *total_size = size;\n  return (uint8_t*)start;\n}\n#else\nstatic uint8_t* mi_os_claim_huge_pages(size_t pages, size_t* total_size) {\n  MI_UNUSED(pages);\n  if (total_size != NULL) *total_size = 0;\n  return NULL;\n}\n#endif\n\n// Allocate MI_SEGMENT_SIZE aligned huge pages\nvoid* _mi_os_alloc_huge_os_pages(size_t pages, int numa_node, mi_msecs_t max_msecs, size_t* pages_reserved, size_t* psize, mi_memid_t* memid) {\n  *memid = _mi_memid_none();\n  if (psize != NULL) *psize = 0;\n  if (pages_reserved != NULL) *pages_reserved = 0;\n  size_t size = 0;\n  uint8_t* start = mi_os_claim_huge_pages(pages, &size);\n  if (start == NULL) return NULL; // or 32-bit systems\n\n  // Allocate one page at the time but try to place them contiguously\n  // We allocate one page at the time to be able to abort if it takes too long\n  // or to at least allocate as many as available on the system.\n  mi_msecs_t start_t = _mi_clock_start();\n  size_t page = 0;\n  bool all_zero = true;\n  while (page < pages) {\n    // allocate a page\n    bool is_zero = false;\n    void* addr = start + (page * MI_HUGE_OS_PAGE_SIZE);\n    void* p = NULL;\n    int err = _mi_prim_alloc_huge_os_pages(addr, MI_HUGE_OS_PAGE_SIZE, numa_node, &is_zero, &p);\n    if (!is_zero) { all_zero = false;  }\n    if (err != 0) {\n      _mi_warning_message(\"unable to allocate huge OS page (error: %d (0x%x), address: %p, size: %zx bytes)\\n\", err, err, addr, MI_HUGE_OS_PAGE_SIZE);\n      break;\n    }\n\n    // Did we succeed at a contiguous address?\n    if (p != addr) {\n      // no success, issue a warning and break\n      if (p != NULL) {\n        _mi_warning_message(\"could not allocate contiguous huge OS page %zu at %p\\n\", page, addr);\n        mi_os_prim_free(p, MI_HUGE_OS_PAGE_SIZE, MI_HUGE_OS_PAGE_SIZE);\n      }\n      break;\n    }\n\n    // success, record it\n    page++;  // increase before timeout check (see issue #711)\n    mi_os_stat_increase(committed, MI_HUGE_OS_PAGE_SIZE);\n    mi_os_stat_increase(reserved, MI_HUGE_OS_PAGE_SIZE);\n\n    // check for timeout\n    if (max_msecs > 0) {\n      mi_msecs_t elapsed = _mi_clock_end(start_t);\n      if (page >= 1) {\n        mi_msecs_t estimate = ((elapsed / (page+1)) * pages);\n        if (estimate > 2*max_msecs) { // seems like we are going to timeout, break\n          elapsed = max_msecs + 1;\n        }\n      }\n      if (elapsed > max_msecs) {\n        _mi_warning_message(\"huge OS page allocation timed out (after allocating %zu page(s))\\n\", page);\n        break;\n      }\n    }\n  }\n  mi_assert_internal(page*MI_HUGE_OS_PAGE_SIZE <= size);\n  if (pages_reserved != NULL) { *pages_reserved = page; }\n  if (psize != NULL) { *psize = page * MI_HUGE_OS_PAGE_SIZE; }\n  if (page != 0) {\n    mi_assert(start != NULL);\n    *memid = _mi_memid_create_os(true /* is committed */, all_zero, true /* is_large */);\n    memid->memkind = MI_MEM_OS_HUGE;\n    mi_assert(memid->is_pinned);\n    #ifdef MI_TRACK_ASAN\n    if (all_zero) { mi_track_mem_defined(start,size); }\n    #endif\n  }\n  return (page == 0 ? NULL : start);\n}\n\n// free every huge page in a range individually (as we allocated per page)\n// note: needed with VirtualAlloc but could potentially be done in one go on mmap'd systems.\nstatic void mi_os_free_huge_os_pages(void* p, size_t size) {\n  if (p==NULL || size==0) return;\n  uint8_t* base = (uint8_t*)p;\n  while (size >= MI_HUGE_OS_PAGE_SIZE) {\n    mi_os_prim_free(base, MI_HUGE_OS_PAGE_SIZE, MI_HUGE_OS_PAGE_SIZE);\n    size -= MI_HUGE_OS_PAGE_SIZE;\n    base += MI_HUGE_OS_PAGE_SIZE;\n  }\n}\n\n/* ----------------------------------------------------------------------------\nSupport NUMA aware allocation\n-----------------------------------------------------------------------------*/\n\n_Atomic(size_t)  _mi_numa_node_count; // = 0   // cache the node count\n\nsize_t _mi_os_numa_node_count_get(void) {\n  size_t count = mi_atomic_load_acquire(&_mi_numa_node_count);\n  if (count <= 0) {\n    long ncount = mi_option_get(mi_option_use_numa_nodes); // given explicitly?\n    if (ncount > 0) {\n      count = (size_t)ncount;\n    }\n    else {\n      count = _mi_prim_numa_node_count(); // or detect dynamically\n      if (count == 0) count = 1;\n    }\n    mi_atomic_store_release(&_mi_numa_node_count, count); // save it\n    _mi_verbose_message(\"using %zd numa regions\\n\", count);\n  }\n  return count;\n}\n\nint _mi_os_numa_node_get(void) {\n  size_t numa_count = _mi_os_numa_node_count();\n  if (numa_count<=1) return 0; // optimize on single numa node systems: always node 0\n  // never more than the node count and >= 0\n  size_t numa_node = _mi_prim_numa_node();\n  if (numa_node >= numa_count) { numa_node = numa_node % numa_count; }\n  return (int)numa_node;\n}\n"
  },
  {
    "path": "third-party/mimalloc/src/page-queue.c",
    "content": "/*----------------------------------------------------------------------------\nCopyright (c) 2018-2024, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n/* -----------------------------------------------------------\n  Definition of page queues for each block size\n----------------------------------------------------------- */\n\n#ifndef MI_IN_PAGE_C\n#error \"this file should be included from 'page.c'\"\n// include to help an IDE\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"mimalloc/atomic.h\"\n#endif\n\n/* -----------------------------------------------------------\n  Minimal alignment in machine words (i.e. `sizeof(void*)`)\n----------------------------------------------------------- */\n\n#if (MI_MAX_ALIGN_SIZE > 4*MI_INTPTR_SIZE)\n  #error \"define alignment for more than 4x word size for this platform\"\n#elif (MI_MAX_ALIGN_SIZE > 2*MI_INTPTR_SIZE)\n  #define MI_ALIGN4W   // 4 machine words minimal alignment\n#elif (MI_MAX_ALIGN_SIZE > MI_INTPTR_SIZE)\n  #define MI_ALIGN2W   // 2 machine words minimal alignment\n#else\n  // ok, default alignment is 1 word\n#endif\n\n\n/* -----------------------------------------------------------\n  Queue query\n----------------------------------------------------------- */\n\n\nstatic inline bool mi_page_queue_is_huge(const mi_page_queue_t* pq) {\n  return (pq->block_size == (MI_MEDIUM_OBJ_SIZE_MAX+sizeof(uintptr_t)));\n}\n\nstatic inline bool mi_page_queue_is_full(const mi_page_queue_t* pq) {\n  return (pq->block_size == (MI_MEDIUM_OBJ_SIZE_MAX+(2*sizeof(uintptr_t))));\n}\n\nstatic inline bool mi_page_queue_is_special(const mi_page_queue_t* pq) {\n  return (pq->block_size > MI_MEDIUM_OBJ_SIZE_MAX);\n}\n\n/* -----------------------------------------------------------\n  Bins\n----------------------------------------------------------- */\n\n// Return the bin for a given field size.\n// Returns MI_BIN_HUGE if the size is too large.\n// We use `wsize` for the size in \"machine word sizes\",\n// i.e. byte size == `wsize*sizeof(void*)`.\nstatic inline size_t mi_bin(size_t size) {\n  size_t wsize = _mi_wsize_from_size(size);\n#if defined(MI_ALIGN4W)\n  if mi_likely(wsize <= 4) {\n    return (wsize <= 1 ? 1 : (wsize+1)&~1); // round to double word sizes\n  }\n#elif defined(MI_ALIGN2W)\n  if mi_likely(wsize <= 8) {\n    return (wsize <= 1 ? 1 : (wsize+1)&~1); // round to double word sizes\n  }\n#else\n  if mi_likely(wsize <= 8) {\n    return (wsize == 0 ? 1 : wsize);\n  }\n#endif\n  else if mi_unlikely(wsize > MI_MEDIUM_OBJ_WSIZE_MAX) {\n    return MI_BIN_HUGE;\n  }\n  else {\n    #if defined(MI_ALIGN4W)\n    if (wsize <= 16) { wsize = (wsize+3)&~3; } // round to 4x word sizes\n    #endif\n    wsize--;\n    // find the highest bit\n    const size_t b = (MI_SIZE_BITS - 1 - mi_clz(wsize));  // note: wsize != 0\n    // and use the top 3 bits to determine the bin (~12.5% worst internal fragmentation).\n    // - adjust with 3 because we use do not round the first 8 sizes\n    //   which each get an exact bin\n    const size_t bin = ((b << 2) + ((wsize >> (b - 2)) & 0x03)) - 3;\n    mi_assert_internal(bin > 0 && bin < MI_BIN_HUGE);\n    return bin;\n  }\n}\n\n\n\n/* -----------------------------------------------------------\n  Queue of pages with free blocks\n----------------------------------------------------------- */\n\nsize_t _mi_bin(size_t size) {\n  return mi_bin(size);\n}\n\nsize_t _mi_bin_size(size_t bin) {\n  return _mi_heap_empty.pages[bin].block_size;\n}\n\n// Good size for allocation\nsize_t mi_good_size(size_t size) mi_attr_noexcept {\n  if (size <= MI_MEDIUM_OBJ_SIZE_MAX) {\n    return _mi_bin_size(mi_bin(size + MI_PADDING_SIZE));\n  }\n  else {\n    return _mi_align_up(size + MI_PADDING_SIZE,_mi_os_page_size());\n  }\n}\n\n#if (MI_DEBUG>1)\nstatic bool mi_page_queue_contains(mi_page_queue_t* queue, const mi_page_t* page) {\n  mi_assert_internal(page != NULL);\n  mi_page_t* list = queue->first;\n  while (list != NULL) {\n    mi_assert_internal(list->next == NULL || list->next->prev == list);\n    mi_assert_internal(list->prev == NULL || list->prev->next == list);\n    if (list == page) break;\n    list = list->next;\n  }\n  return (list == page);\n}\n\n#endif\n\n#if (MI_DEBUG>1)\nstatic bool mi_heap_contains_queue(const mi_heap_t* heap, const mi_page_queue_t* pq) {\n  return (pq >= &heap->pages[0] && pq <= &heap->pages[MI_BIN_FULL]);\n}\n#endif\n\nstatic inline bool mi_page_is_large_or_huge(const mi_page_t* page) {\n  return (mi_page_block_size(page) > MI_MEDIUM_OBJ_SIZE_MAX || mi_page_is_huge(page));\n}\n\nstatic size_t mi_page_bin(const mi_page_t* page) {\n  const size_t bin = (mi_page_is_in_full(page) ? MI_BIN_FULL : (mi_page_is_huge(page) ? MI_BIN_HUGE : mi_bin(mi_page_block_size(page))));\n  mi_assert_internal(bin <= MI_BIN_FULL);\n  return bin;\n}\n\nstatic mi_page_queue_t* mi_heap_page_queue_of(mi_heap_t* heap, const mi_page_t* page) {\n  mi_assert_internal(heap!=NULL);\n  const size_t bin = mi_page_bin(page);\n  mi_page_queue_t* pq = &heap->pages[bin];\n  mi_assert_internal((mi_page_block_size(page) == pq->block_size) ||\n                       (mi_page_is_large_or_huge(page) && mi_page_queue_is_huge(pq)) ||\n                         (mi_page_is_in_full(page) && mi_page_queue_is_full(pq)));\n  return pq;\n}\n\nstatic mi_page_queue_t* mi_page_queue_of(const mi_page_t* page) {\n  mi_heap_t* heap = mi_page_heap(page);\n  mi_page_queue_t* pq = mi_heap_page_queue_of(heap, page);\n  mi_assert_expensive(mi_page_queue_contains(pq, page));\n  return pq;\n}\n\n// The current small page array is for efficiency and for each\n// small size (up to 256) it points directly to the page for that\n// size without having to compute the bin. This means when the\n// current free page queue is updated for a small bin, we need to update a\n// range of entries in `_mi_page_small_free`.\nstatic inline void mi_heap_queue_first_update(mi_heap_t* heap, const mi_page_queue_t* pq) {\n  mi_assert_internal(mi_heap_contains_queue(heap,pq));\n  size_t size = pq->block_size;\n  if (size > MI_SMALL_SIZE_MAX) return;\n\n  mi_page_t* page = pq->first;\n  if (pq->first == NULL) page = (mi_page_t*)&_mi_page_empty;\n\n  // find index in the right direct page array\n  size_t start;\n  size_t idx = _mi_wsize_from_size(size);\n  mi_page_t** pages_free = heap->pages_free_direct;\n\n  if (pages_free[idx] == page) return;  // already set\n\n  // find start slot\n  if (idx<=1) {\n    start = 0;\n  }\n  else {\n    // find previous size; due to minimal alignment upto 3 previous bins may need to be skipped\n    size_t bin = mi_bin(size);\n    const mi_page_queue_t* prev = pq - 1;\n    while( bin == mi_bin(prev->block_size) && prev > &heap->pages[0]) {\n      prev--;\n    }\n    start = 1 + _mi_wsize_from_size(prev->block_size);\n    if (start > idx) start = idx;\n  }\n\n  // set size range to the right page\n  mi_assert(start <= idx);\n  for (size_t sz = start; sz <= idx; sz++) {\n    pages_free[sz] = page;\n  }\n}\n\n/*\nstatic bool mi_page_queue_is_empty(mi_page_queue_t* queue) {\n  return (queue->first == NULL);\n}\n*/\n\nstatic void mi_page_queue_remove(mi_page_queue_t* queue, mi_page_t* page) {\n  mi_assert_internal(page != NULL);\n  mi_assert_expensive(mi_page_queue_contains(queue, page));\n  mi_assert_internal(mi_page_block_size(page) == queue->block_size ||\n                      (mi_page_is_large_or_huge(page) && mi_page_queue_is_huge(queue)) ||\n                        (mi_page_is_in_full(page) && mi_page_queue_is_full(queue)));\n  mi_heap_t* heap = mi_page_heap(page);\n\n  if (page->prev != NULL) page->prev->next = page->next;\n  if (page->next != NULL) page->next->prev = page->prev;\n  if (page == queue->last)  queue->last = page->prev;\n  if (page == queue->first) {\n    queue->first = page->next;\n    // update first\n    mi_assert_internal(mi_heap_contains_queue(heap, queue));\n    mi_heap_queue_first_update(heap,queue);\n  }\n  heap->page_count--;\n  page->next = NULL;\n  page->prev = NULL;\n  // mi_atomic_store_ptr_release(mi_atomic_cast(void*, &page->heap), NULL);\n  mi_page_set_in_full(page,false);\n}\n\n\nstatic void mi_page_queue_push(mi_heap_t* heap, mi_page_queue_t* queue, mi_page_t* page) {\n  mi_assert_internal(mi_page_heap(page) == heap);\n  mi_assert_internal(!mi_page_queue_contains(queue, page));\n  #if MI_HUGE_PAGE_ABANDON\n  mi_assert_internal(_mi_page_segment(page)->kind != MI_SEGMENT_HUGE);\n  #endif\n  mi_assert_internal(mi_page_block_size(page) == queue->block_size ||\n                      (mi_page_is_large_or_huge(page) && mi_page_queue_is_huge(queue)) ||\n                        (mi_page_is_in_full(page) && mi_page_queue_is_full(queue)));\n\n  mi_page_set_in_full(page, mi_page_queue_is_full(queue));\n  // mi_atomic_store_ptr_release(mi_atomic_cast(void*, &page->heap), heap);\n  page->next = queue->first;\n  page->prev = NULL;\n  if (queue->first != NULL) {\n    mi_assert_internal(queue->first->prev == NULL);\n    queue->first->prev = page;\n    queue->first = page;\n  }\n  else {\n    queue->first = queue->last = page;\n  }\n\n  // update direct\n  mi_heap_queue_first_update(heap, queue);\n  heap->page_count++;\n}\n\nstatic void mi_page_queue_move_to_front(mi_heap_t* heap, mi_page_queue_t* queue, mi_page_t* page) {\n  mi_assert_internal(mi_page_heap(page) == heap);\n  mi_assert_internal(mi_page_queue_contains(queue, page));\n  if (queue->first == page) return;\n  mi_page_queue_remove(queue, page);\n  mi_page_queue_push(heap, queue, page);\n  mi_assert_internal(queue->first == page);\n}\n\nstatic void mi_page_queue_enqueue_from_ex(mi_page_queue_t* to, mi_page_queue_t* from, bool enqueue_at_end, mi_page_t* page) {\n  mi_assert_internal(page != NULL);\n  mi_assert_expensive(mi_page_queue_contains(from, page));\n  mi_assert_expensive(!mi_page_queue_contains(to, page));\n  const size_t bsize = mi_page_block_size(page);\n  MI_UNUSED(bsize);\n  mi_assert_internal((bsize == to->block_size && bsize == from->block_size) ||\n                     (bsize == to->block_size && mi_page_queue_is_full(from)) ||\n                     (bsize == from->block_size && mi_page_queue_is_full(to)) ||\n                     (mi_page_is_large_or_huge(page) && mi_page_queue_is_huge(to)) ||\n                     (mi_page_is_large_or_huge(page) && mi_page_queue_is_full(to)));\n\n  mi_heap_t* heap = mi_page_heap(page);\n\n  // delete from `from`\n  if (page->prev != NULL) page->prev->next = page->next;\n  if (page->next != NULL) page->next->prev = page->prev;\n  if (page == from->last)  from->last = page->prev;\n  if (page == from->first) {\n    from->first = page->next;\n    // update first\n    mi_assert_internal(mi_heap_contains_queue(heap, from));\n    mi_heap_queue_first_update(heap, from);\n  }\n\n  // insert into `to`\n  if (enqueue_at_end) {\n    // enqueue at the end\n    page->prev = to->last;\n    page->next = NULL;\n    if (to->last != NULL) {\n      mi_assert_internal(heap == mi_page_heap(to->last));\n      to->last->next = page;\n      to->last = page;\n    }\n    else {\n      to->first = page;\n      to->last = page;\n      mi_heap_queue_first_update(heap, to);\n    }\n  }\n  else {\n    if (to->first != NULL) {\n      // enqueue at 2nd place\n      mi_assert_internal(heap == mi_page_heap(to->first));\n      mi_page_t* next = to->first->next;\n      page->prev = to->first;\n      page->next = next;\n      to->first->next = page;\n      if (next != NULL) {\n        next->prev = page;\n      }\n      else {\n        to->last = page;\n      }\n    }\n    else {\n      // enqueue at the head (singleton list)\n      page->prev = NULL;\n      page->next = NULL;\n      to->first = page;\n      to->last = page;\n      mi_heap_queue_first_update(heap, to);\n    }\n  }\n\n  mi_page_set_in_full(page, mi_page_queue_is_full(to));\n}\n\nstatic void mi_page_queue_enqueue_from(mi_page_queue_t* to, mi_page_queue_t* from, mi_page_t* page) {\n  mi_page_queue_enqueue_from_ex(to, from, true /* enqueue at the end */, page);\n}\n\nstatic void mi_page_queue_enqueue_from_full(mi_page_queue_t* to, mi_page_queue_t* from, mi_page_t* page) {\n  // note: we could insert at the front to increase reuse, but it slows down certain benchmarks (like `alloc-test`)\n  mi_page_queue_enqueue_from_ex(to, from, true /* enqueue at the end of the `to` queue? */, page);\n}\n\n// Only called from `mi_heap_absorb`.\nsize_t _mi_page_queue_append(mi_heap_t* heap, mi_page_queue_t* pq, mi_page_queue_t* append) {\n  mi_assert_internal(mi_heap_contains_queue(heap,pq));\n  mi_assert_internal(pq->block_size == append->block_size);\n\n  if (append->first==NULL) return 0;\n\n  // set append pages to new heap and count\n  size_t count = 0;\n  for (mi_page_t* page = append->first; page != NULL; page = page->next) {\n    // inline `mi_page_set_heap` to avoid wrong assertion during absorption;\n    // in this case it is ok to be delayed freeing since both \"to\" and \"from\" heap are still alive.\n    mi_atomic_store_release(&page->xheap, (uintptr_t)heap);\n    // set the flag to delayed free (not overriding NEVER_DELAYED_FREE) which has as a\n    // side effect that it spins until any DELAYED_FREEING is finished. This ensures\n    // that after appending only the new heap will be used for delayed free operations.\n    _mi_page_use_delayed_free(page, MI_USE_DELAYED_FREE, false);\n    count++;\n  }\n\n  if (pq->last==NULL) {\n    // take over afresh\n    mi_assert_internal(pq->first==NULL);\n    pq->first = append->first;\n    pq->last = append->last;\n    mi_heap_queue_first_update(heap, pq);\n  }\n  else {\n    // append to end\n    mi_assert_internal(pq->last!=NULL);\n    mi_assert_internal(append->first!=NULL);\n    pq->last->next = append->first;\n    append->first->prev = pq->last;\n    pq->last = append->last;\n  }\n  return count;\n}\n"
  },
  {
    "path": "third-party/mimalloc/src/page.c",
    "content": "/*----------------------------------------------------------------------------\nCopyright (c) 2018-2024, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n/* -----------------------------------------------------------\n  The core of the allocator. Every segment contains\n  pages of a certain block size. The main function\n  exported is `mi_malloc_generic`.\n----------------------------------------------------------- */\n\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"mimalloc/atomic.h\"\n\n/* -----------------------------------------------------------\n  Definition of page queues for each block size\n----------------------------------------------------------- */\n\n#define MI_IN_PAGE_C\n#include \"page-queue.c\"\n#undef MI_IN_PAGE_C\n\n\n/* -----------------------------------------------------------\n  Page helpers\n----------------------------------------------------------- */\n\n// Index a block in a page\nstatic inline mi_block_t* mi_page_block_at(const mi_page_t* page, void* page_start, size_t block_size, size_t i) {\n  MI_UNUSED(page);\n  mi_assert_internal(page != NULL);\n  mi_assert_internal(i <= page->reserved);\n  return (mi_block_t*)((uint8_t*)page_start + (i * block_size));\n}\n\nstatic void mi_page_init(mi_heap_t* heap, mi_page_t* page, size_t size, mi_tld_t* tld);\nstatic void mi_page_extend_free(mi_heap_t* heap, mi_page_t* page, mi_tld_t* tld);\n\n#if (MI_DEBUG>=3)\nstatic size_t mi_page_list_count(mi_page_t* page, mi_block_t* head) {\n  size_t count = 0;\n  while (head != NULL) {\n    mi_assert_internal(page == _mi_ptr_page(head));\n    count++;\n    head = mi_block_next(page, head);\n  }\n  return count;\n}\n\n/*\n// Start of the page available memory\nstatic inline uint8_t* mi_page_area(const mi_page_t* page) {\n  return _mi_page_start(_mi_page_segment(page), page, NULL);\n}\n*/\n\nstatic bool mi_page_list_is_valid(mi_page_t* page, mi_block_t* p) {\n  size_t psize;\n  uint8_t* page_area = _mi_segment_page_start(_mi_page_segment(page), page, &psize);\n  mi_block_t* start = (mi_block_t*)page_area;\n  mi_block_t* end   = (mi_block_t*)(page_area + psize);\n  while(p != NULL) {\n    if (p < start || p >= end) return false;\n    p = mi_block_next(page, p);\n  }\n#if MI_DEBUG>3 // generally too expensive to check this\n  if (page->free_is_zero) {\n    const size_t ubsize = mi_page_usable_block_size(page);\n    for (mi_block_t* block = page->free; block != NULL; block = mi_block_next(page, block)) {\n      mi_assert_expensive(mi_mem_is_zero(block + 1, ubsize - sizeof(mi_block_t)));\n    }\n  }\n#endif\n  return true;\n}\n\nstatic bool mi_page_is_valid_init(mi_page_t* page) {\n  mi_assert_internal(mi_page_block_size(page) > 0);\n  mi_assert_internal(page->used <= page->capacity);\n  mi_assert_internal(page->capacity <= page->reserved);\n\n  uint8_t* start = mi_page_start(page);\n  mi_assert_internal(start == _mi_segment_page_start(_mi_page_segment(page), page, NULL));\n  mi_assert_internal(page->is_huge == (_mi_page_segment(page)->kind == MI_SEGMENT_HUGE));\n  //mi_assert_internal(start + page->capacity*page->block_size == page->top);\n\n  mi_assert_internal(mi_page_list_is_valid(page,page->free));\n  mi_assert_internal(mi_page_list_is_valid(page,page->local_free));\n\n  #if MI_DEBUG>3 // generally too expensive to check this\n  if (page->free_is_zero) {\n    const size_t ubsize = mi_page_usable_block_size(page);\n    for(mi_block_t* block = page->free; block != NULL; block = mi_block_next(page,block)) {\n      mi_assert_expensive(mi_mem_is_zero(block + 1, ubsize - sizeof(mi_block_t)));\n    }\n  }\n  #endif\n\n  #if !MI_TRACK_ENABLED && !MI_TSAN\n  mi_block_t* tfree = mi_page_thread_free(page);\n  mi_assert_internal(mi_page_list_is_valid(page, tfree));\n  //size_t tfree_count = mi_page_list_count(page, tfree);\n  //mi_assert_internal(tfree_count <= page->thread_freed + 1);\n  #endif\n\n  size_t free_count = mi_page_list_count(page, page->free) + mi_page_list_count(page, page->local_free);\n  mi_assert_internal(page->used + free_count == page->capacity);\n\n  return true;\n}\n\nextern bool _mi_process_is_initialized;             // has mi_process_init been called?\n\nbool _mi_page_is_valid(mi_page_t* page) {\n  mi_assert_internal(mi_page_is_valid_init(page));\n  #if MI_SECURE\n  mi_assert_internal(page->keys[0] != 0);\n  #endif\n  if (mi_page_heap(page)!=NULL) {\n    mi_segment_t* segment = _mi_page_segment(page);\n\n    mi_assert_internal(!_mi_process_is_initialized || segment->thread_id==0 || segment->thread_id == mi_page_heap(page)->thread_id);\n    #if MI_HUGE_PAGE_ABANDON\n    if (segment->kind != MI_SEGMENT_HUGE)\n    #endif\n    {\n      mi_page_queue_t* pq = mi_page_queue_of(page);\n      mi_assert_internal(mi_page_queue_contains(pq, page));\n      mi_assert_internal(pq->block_size==mi_page_block_size(page) || mi_page_block_size(page) > MI_MEDIUM_OBJ_SIZE_MAX || mi_page_is_in_full(page));\n      mi_assert_internal(mi_heap_contains_queue(mi_page_heap(page),pq));\n    }\n  }\n  return true;\n}\n#endif\n\nvoid _mi_page_use_delayed_free(mi_page_t* page, mi_delayed_t delay, bool override_never) {\n  while (!_mi_page_try_use_delayed_free(page, delay, override_never)) {\n    mi_atomic_yield();\n  }\n}\n\nbool _mi_page_try_use_delayed_free(mi_page_t* page, mi_delayed_t delay, bool override_never) {\n  mi_thread_free_t tfreex;\n  mi_delayed_t     old_delay;\n  mi_thread_free_t tfree;\n  size_t yield_count = 0;\n  do {\n    tfree = mi_atomic_load_acquire(&page->xthread_free); // note: must acquire as we can break/repeat this loop and not do a CAS;\n    tfreex = mi_tf_set_delayed(tfree, delay);\n    old_delay = mi_tf_delayed(tfree);\n    if mi_unlikely(old_delay == MI_DELAYED_FREEING) {\n      if (yield_count >= 4) return false;  // give up after 4 tries\n      yield_count++;\n      mi_atomic_yield(); // delay until outstanding MI_DELAYED_FREEING are done.\n      // tfree = mi_tf_set_delayed(tfree, MI_NO_DELAYED_FREE); // will cause CAS to busy fail\n    }\n    else if (delay == old_delay) {\n      break; // avoid atomic operation if already equal\n    }\n    else if (!override_never && old_delay == MI_NEVER_DELAYED_FREE) {\n      break; // leave never-delayed flag set\n    }\n  } while ((old_delay == MI_DELAYED_FREEING) ||\n           !mi_atomic_cas_weak_release(&page->xthread_free, &tfree, tfreex));\n\n  return true; // success\n}\n\n/* -----------------------------------------------------------\n  Page collect the `local_free` and `thread_free` lists\n----------------------------------------------------------- */\n\n// Collect the local `thread_free` list using an atomic exchange.\n// Note: The exchange must be done atomically as this is used right after\n// moving to the full list in `mi_page_collect_ex` and we need to\n// ensure that there was no race where the page became unfull just before the move.\nstatic void _mi_page_thread_free_collect(mi_page_t* page)\n{\n  mi_block_t* head;\n  mi_thread_free_t tfreex;\n  mi_thread_free_t tfree = mi_atomic_load_relaxed(&page->xthread_free);\n  do {\n    head = mi_tf_block(tfree);\n    tfreex = mi_tf_set_block(tfree,NULL);\n  } while (!mi_atomic_cas_weak_acq_rel(&page->xthread_free, &tfree, tfreex));\n\n  // return if the list is empty\n  if (head == NULL) return;\n\n  // find the tail -- also to get a proper count (without data races)\n  size_t max_count = page->capacity; // cannot collect more than capacity\n  size_t count = 1;\n  mi_block_t* tail = head;\n  mi_block_t* next;\n  while ((next = mi_block_next(page,tail)) != NULL && count <= max_count) {\n    count++;\n    tail = next;\n  }\n  // if `count > max_count` there was a memory corruption (possibly infinite list due to double multi-threaded free)\n  if (count > max_count) {\n    _mi_error_message(EFAULT, \"corrupted thread-free list\\n\");\n    return; // the thread-free items cannot be freed\n  }\n\n  // and append the current local free list\n  mi_block_set_next(page,tail, page->local_free);\n  page->local_free = head;\n\n  // update counts now\n  page->used -= (uint16_t)count;\n}\n\nvoid _mi_page_free_collect(mi_page_t* page, bool force) {\n  mi_assert_internal(page!=NULL);\n\n  // collect the thread free list\n  if (force || mi_page_thread_free(page) != NULL) {  // quick test to avoid an atomic operation\n    _mi_page_thread_free_collect(page);\n  }\n\n  // and the local free list\n  if (page->local_free != NULL) {\n    if mi_likely(page->free == NULL) {\n      // usual case\n      page->free = page->local_free;\n      page->local_free = NULL;\n      page->free_is_zero = false;\n    }\n    else if (force) {\n      // append -- only on shutdown (force) as this is a linear operation\n      mi_block_t* tail = page->local_free;\n      mi_block_t* next;\n      while ((next = mi_block_next(page, tail)) != NULL) {\n        tail = next;\n      }\n      mi_block_set_next(page, tail, page->free);\n      page->free = page->local_free;\n      page->local_free = NULL;\n      page->free_is_zero = false;\n    }\n  }\n\n  mi_assert_internal(!force || page->local_free == NULL);\n}\n\n\n\n/* -----------------------------------------------------------\n  Page fresh and retire\n----------------------------------------------------------- */\n\n// called from segments when reclaiming abandoned pages\nvoid _mi_page_reclaim(mi_heap_t* heap, mi_page_t* page) {\n  mi_assert_expensive(mi_page_is_valid_init(page));\n\n  mi_assert_internal(mi_page_heap(page) == heap);\n  mi_assert_internal(mi_page_thread_free_flag(page) != MI_NEVER_DELAYED_FREE);\n  #if MI_HUGE_PAGE_ABANDON\n  mi_assert_internal(_mi_page_segment(page)->kind != MI_SEGMENT_HUGE);\n  #endif\n\n  // TODO: push on full queue immediately if it is full?\n  mi_page_queue_t* pq = mi_page_queue(heap, mi_page_block_size(page));\n  mi_page_queue_push(heap, pq, page);\n  mi_assert_expensive(_mi_page_is_valid(page));\n}\n\n// allocate a fresh page from a segment\nstatic mi_page_t* mi_page_fresh_alloc(mi_heap_t* heap, mi_page_queue_t* pq, size_t block_size, size_t page_alignment) {\n  #if !MI_HUGE_PAGE_ABANDON\n  mi_assert_internal(pq != NULL);\n  mi_assert_internal(mi_heap_contains_queue(heap, pq));\n  mi_assert_internal(page_alignment > 0 || block_size > MI_MEDIUM_OBJ_SIZE_MAX || block_size == pq->block_size);\n  #endif\n  mi_page_t* page = _mi_segment_page_alloc(heap, block_size, page_alignment, &heap->tld->segments);\n  if (page == NULL) {\n    // this may be out-of-memory, or an abandoned page was reclaimed (and in our queue)\n    return NULL;\n  }\n  #if MI_HUGE_PAGE_ABANDON\n  mi_assert_internal(pq==NULL || _mi_page_segment(page)->page_kind != MI_PAGE_HUGE);\n  #endif\n  mi_assert_internal(page_alignment >0 || block_size > MI_MEDIUM_OBJ_SIZE_MAX || _mi_page_segment(page)->kind != MI_SEGMENT_HUGE);\n  mi_assert_internal(pq!=NULL || mi_page_block_size(page) >= block_size);\n  // a fresh page was found, initialize it\n  const size_t full_block_size = (pq == NULL || mi_page_is_huge(page) ? mi_page_block_size(page) : block_size); // see also: mi_segment_huge_page_alloc\n  mi_assert_internal(full_block_size >= block_size);\n  mi_page_init(heap, page, full_block_size, heap->tld);\n  mi_heap_stat_increase(heap, pages, 1);\n  mi_heap_stat_increase(heap, page_bins[mi_page_bin(page)], 1);\n  if (pq != NULL) { mi_page_queue_push(heap, pq, page); }\n  mi_assert_expensive(_mi_page_is_valid(page));\n  return page;\n}\n\n// Get a fresh page to use\nstatic mi_page_t* mi_page_fresh(mi_heap_t* heap, mi_page_queue_t* pq) {\n  mi_assert_internal(mi_heap_contains_queue(heap, pq));\n  mi_page_t* page = mi_page_fresh_alloc(heap, pq, pq->block_size, 0);\n  if (page==NULL) return NULL;\n  mi_assert_internal(pq->block_size==mi_page_block_size(page));\n  mi_assert_internal(pq==mi_page_queue(heap, mi_page_block_size(page)));\n  return page;\n}\n\n/* -----------------------------------------------------------\n   Do any delayed frees\n   (put there by other threads if they deallocated in a full page)\n----------------------------------------------------------- */\nvoid _mi_heap_delayed_free_all(mi_heap_t* heap) {\n  while (!_mi_heap_delayed_free_partial(heap)) {\n    mi_atomic_yield();\n  }\n}\n\n// returns true if all delayed frees were processed\nbool _mi_heap_delayed_free_partial(mi_heap_t* heap) {\n  // take over the list (note: no atomic exchange since it is often NULL)\n  mi_block_t* block = mi_atomic_load_ptr_relaxed(mi_block_t, &heap->thread_delayed_free);\n  while (block != NULL && !mi_atomic_cas_ptr_weak_acq_rel(mi_block_t, &heap->thread_delayed_free, &block, NULL)) { /* nothing */ };\n  bool all_freed = true;\n\n  // and free them all\n  while(block != NULL) {\n    mi_block_t* next = mi_block_nextx(heap,block, heap->keys);\n    // use internal free instead of regular one to keep stats etc correct\n    if (!_mi_free_delayed_block(block)) {\n      // we might already start delayed freeing while another thread has not yet\n      // reset the delayed_freeing flag; in that case delay it further by reinserting the current block\n      // into the delayed free list\n      all_freed = false;\n      mi_block_t* dfree = mi_atomic_load_ptr_relaxed(mi_block_t, &heap->thread_delayed_free);\n      do {\n        mi_block_set_nextx(heap, block, dfree, heap->keys);\n      } while (!mi_atomic_cas_ptr_weak_release(mi_block_t,&heap->thread_delayed_free, &dfree, block));\n    }\n    block = next;\n  }\n  return all_freed;\n}\n\n/* -----------------------------------------------------------\n  Unfull, abandon, free and retire\n----------------------------------------------------------- */\n\n// Move a page from the full list back to a regular list\nvoid _mi_page_unfull(mi_page_t* page) {\n  mi_assert_internal(page != NULL);\n  mi_assert_expensive(_mi_page_is_valid(page));\n  mi_assert_internal(mi_page_is_in_full(page));\n  if (!mi_page_is_in_full(page)) return;\n\n  mi_heap_t* heap = mi_page_heap(page);\n  mi_page_queue_t* pqfull = &heap->pages[MI_BIN_FULL];\n  mi_page_set_in_full(page, false); // to get the right queue\n  mi_page_queue_t* pq = mi_heap_page_queue_of(heap, page);\n  mi_page_set_in_full(page, true);\n  mi_page_queue_enqueue_from_full(pq, pqfull, page);\n}\n\nstatic void mi_page_to_full(mi_page_t* page, mi_page_queue_t* pq) {\n  mi_assert_internal(pq == mi_page_queue_of(page));\n  mi_assert_internal(!mi_page_immediate_available(page));\n  mi_assert_internal(!mi_page_is_in_full(page));\n\n  if (mi_page_is_in_full(page)) return;\n  mi_page_queue_enqueue_from(&mi_page_heap(page)->pages[MI_BIN_FULL], pq, page);\n  _mi_page_free_collect(page,false);  // try to collect right away in case another thread freed just before MI_USE_DELAYED_FREE was set\n}\n\n\n// Abandon a page with used blocks at the end of a thread.\n// Note: only call if it is ensured that no references exist from\n// the `page->heap->thread_delayed_free` into this page.\n// Currently only called through `mi_heap_collect_ex` which ensures this.\nvoid _mi_page_abandon(mi_page_t* page, mi_page_queue_t* pq) {\n  mi_assert_internal(page != NULL);\n  mi_assert_expensive(_mi_page_is_valid(page));\n  mi_assert_internal(pq == mi_page_queue_of(page));\n  mi_assert_internal(mi_page_heap(page) != NULL);\n\n  mi_heap_t* pheap = mi_page_heap(page);\n\n  // remove from our page list\n  mi_segments_tld_t* segments_tld = &pheap->tld->segments;\n  mi_page_queue_remove(pq, page);\n\n  // page is no longer associated with our heap\n  mi_assert_internal(mi_page_thread_free_flag(page)==MI_NEVER_DELAYED_FREE);\n  mi_page_set_heap(page, NULL);\n\n#if (MI_DEBUG>1) && !MI_TRACK_ENABLED\n  // check there are no references left..\n  for (mi_block_t* block = (mi_block_t*)pheap->thread_delayed_free; block != NULL; block = mi_block_nextx(pheap, block, pheap->keys)) {\n    mi_assert_internal(_mi_ptr_page(block) != page);\n  }\n#endif\n\n  // and abandon it\n  mi_assert_internal(mi_page_heap(page) == NULL);\n  _mi_segment_page_abandon(page,segments_tld);\n}\n\n// force abandon a page\nvoid _mi_page_force_abandon(mi_page_t* page) {\n  mi_heap_t* heap = mi_page_heap(page);\n  // mark page as not using delayed free\n  _mi_page_use_delayed_free(page, MI_NEVER_DELAYED_FREE, false);\n\n  // ensure this page is no longer in the heap delayed free list\n  _mi_heap_delayed_free_all(heap);\n  // We can still access the page meta-info even if it is freed as we ensure\n  // in `mi_segment_force_abandon` that the segment is not freed (yet)\n  if (page->capacity == 0) return; // it may have been freed now\n\n  // and now unlink it from the page queue and abandon (or free)\n  mi_page_queue_t* pq = mi_heap_page_queue_of(heap, page);\n  if (mi_page_all_free(page)) {\n    _mi_page_free(page, pq, false);\n  }\n  else {\n    _mi_page_abandon(page, pq);\n  }\n}\n\n\n// Free a page with no more free blocks\nvoid _mi_page_free(mi_page_t* page, mi_page_queue_t* pq, bool force) {\n  mi_assert_internal(page != NULL);\n  mi_assert_expensive(_mi_page_is_valid(page));\n  mi_assert_internal(pq == mi_page_queue_of(page));\n  mi_assert_internal(mi_page_all_free(page));\n  mi_assert_internal(mi_page_thread_free_flag(page)!=MI_DELAYED_FREEING);\n\n  // no more aligned blocks in here\n  mi_page_set_has_aligned(page, false);\n\n  // remove from the page list\n  // (no need to do _mi_heap_delayed_free first as all blocks are already free)\n  mi_heap_t* heap = mi_page_heap(page);\n  mi_segments_tld_t* segments_tld = &heap->tld->segments;\n  mi_page_queue_remove(pq, page);\n\n  // and free it\n  mi_heap_stat_decrease(heap, page_bins[mi_page_bin(page)], 1);\n  mi_page_set_heap(page,NULL);\n  _mi_segment_page_free(page, force, segments_tld);\n}\n\n#define MI_MAX_RETIRE_SIZE    MI_MEDIUM_OBJ_SIZE_MAX   // should be less than size for MI_BIN_HUGE\n#define MI_RETIRE_CYCLES      (16)\n\n// Retire a page with no more used blocks\n// Important to not retire too quickly though as new\n// allocations might coming.\n// Note: called from `mi_free` and benchmarks often\n// trigger this due to freeing everything and then\n// allocating again so careful when changing this.\nvoid _mi_page_retire(mi_page_t* page) mi_attr_noexcept {\n  mi_assert_internal(page != NULL);\n  mi_assert_expensive(_mi_page_is_valid(page));\n  mi_assert_internal(mi_page_all_free(page));\n\n  mi_page_set_has_aligned(page, false);\n\n  // don't retire too often..\n  // (or we end up retiring and re-allocating most of the time)\n  // NOTE: refine this more: we should not retire if this\n  // is the only page left with free blocks. It is not clear\n  // how to check this efficiently though...\n  // for now, we don't retire if it is the only page left of this size class.\n  mi_page_queue_t* pq = mi_page_queue_of(page);\n  #if MI_RETIRE_CYCLES > 0\n  const size_t bsize = mi_page_block_size(page);\n  if mi_likely( /* bsize < MI_MAX_RETIRE_SIZE && */ !mi_page_queue_is_special(pq)) {  // not full or huge queue?\n    if (pq->last==page && pq->first==page) { // the only page in the queue?\n      mi_stat_counter_increase(_mi_stats_main.pages_retire,1);\n      page->retire_expire = (bsize <= MI_SMALL_OBJ_SIZE_MAX ? MI_RETIRE_CYCLES : MI_RETIRE_CYCLES/4);\n      mi_heap_t* heap = mi_page_heap(page);\n      mi_assert_internal(pq >= heap->pages);\n      const size_t index = pq - heap->pages;\n      mi_assert_internal(index < MI_BIN_FULL && index < MI_BIN_HUGE);\n      if (index < heap->page_retired_min) heap->page_retired_min = index;\n      if (index > heap->page_retired_max) heap->page_retired_max = index;\n      mi_assert_internal(mi_page_all_free(page));\n      return; // don't free after all\n    }\n  }\n  #endif\n  _mi_page_free(page, pq, false);\n}\n\n// free retired pages: we don't need to look at the entire queues\n// since we only retire pages that are at the head position in a queue.\nvoid _mi_heap_collect_retired(mi_heap_t* heap, bool force) {\n  size_t min = MI_BIN_FULL;\n  size_t max = 0;\n  for(size_t bin = heap->page_retired_min; bin <= heap->page_retired_max; bin++) {\n    mi_page_queue_t* pq   = &heap->pages[bin];\n    mi_page_t*       page = pq->first;\n    if (page != NULL && page->retire_expire != 0) {\n      if (mi_page_all_free(page)) {\n        page->retire_expire--;\n        if (force || page->retire_expire == 0) {\n          _mi_page_free(pq->first, pq, force);\n        }\n        else {\n          // keep retired, update min/max\n          if (bin < min) min = bin;\n          if (bin > max) max = bin;\n        }\n      }\n      else {\n        page->retire_expire = 0;\n      }\n    }\n  }\n  heap->page_retired_min = min;\n  heap->page_retired_max = max;\n}\n\n\n/* -----------------------------------------------------------\n  Initialize the initial free list in a page.\n  In secure mode we initialize a randomized list by\n  alternating between slices.\n----------------------------------------------------------- */\n\n#define MI_MAX_SLICE_SHIFT  (6)   // at most 64 slices\n#define MI_MAX_SLICES       (1UL << MI_MAX_SLICE_SHIFT)\n#define MI_MIN_SLICES       (2)\n\nstatic void mi_page_free_list_extend_secure(mi_heap_t* const heap, mi_page_t* const page, const size_t bsize, const size_t extend, mi_stats_t* const stats) {\n  MI_UNUSED(stats);\n  #if (MI_SECURE<=2)\n  mi_assert_internal(page->free == NULL);\n  mi_assert_internal(page->local_free == NULL);\n  #endif\n  mi_assert_internal(page->capacity + extend <= page->reserved);\n  mi_assert_internal(bsize == mi_page_block_size(page));\n  void* const page_area = mi_page_start(page);\n\n  // initialize a randomized free list\n  // set up `slice_count` slices to alternate between\n  size_t shift = MI_MAX_SLICE_SHIFT;\n  while ((extend >> shift) == 0) {\n    shift--;\n  }\n  const size_t slice_count = (size_t)1U << shift;\n  const size_t slice_extend = extend / slice_count;\n  mi_assert_internal(slice_extend >= 1);\n  mi_block_t* blocks[MI_MAX_SLICES];   // current start of the slice\n  size_t      counts[MI_MAX_SLICES];   // available objects in the slice\n  for (size_t i = 0; i < slice_count; i++) {\n    blocks[i] = mi_page_block_at(page, page_area, bsize, page->capacity + i*slice_extend);\n    counts[i] = slice_extend;\n  }\n  counts[slice_count-1] += (extend % slice_count);  // final slice holds the modulus too (todo: distribute evenly?)\n\n  // and initialize the free list by randomly threading through them\n  // set up first element\n  const uintptr_t r = _mi_heap_random_next(heap);\n  size_t current = r % slice_count;\n  counts[current]--;\n  mi_block_t* const free_start = blocks[current];\n  // and iterate through the rest; use `random_shuffle` for performance\n  uintptr_t rnd = _mi_random_shuffle(r|1); // ensure not 0\n  for (size_t i = 1; i < extend; i++) {\n    // call random_shuffle only every INTPTR_SIZE rounds\n    const size_t round = i%MI_INTPTR_SIZE;\n    if (round == 0) rnd = _mi_random_shuffle(rnd);\n    // select a random next slice index\n    size_t next = ((rnd >> 8*round) & (slice_count-1));\n    while (counts[next]==0) {                            // ensure it still has space\n      next++;\n      if (next==slice_count) next = 0;\n    }\n    // and link the current block to it\n    counts[next]--;\n    mi_block_t* const block = blocks[current];\n    blocks[current] = (mi_block_t*)((uint8_t*)block + bsize);  // bump to the following block\n    mi_block_set_next(page, block, blocks[next]);   // and set next; note: we may have `current == next`\n    current = next;\n  }\n  // prepend to the free list (usually NULL)\n  mi_block_set_next(page, blocks[current], page->free);  // end of the list\n  page->free = free_start;\n}\n\nstatic mi_decl_noinline void mi_page_free_list_extend( mi_page_t* const page, const size_t bsize, const size_t extend, mi_stats_t* const stats)\n{\n  MI_UNUSED(stats);\n  #if (MI_SECURE <= 2)\n  mi_assert_internal(page->free == NULL);\n  mi_assert_internal(page->local_free == NULL);\n  #endif\n  mi_assert_internal(page->capacity + extend <= page->reserved);\n  mi_assert_internal(bsize == mi_page_block_size(page));\n  void* const page_area = mi_page_start(page);\n\n  mi_block_t* const start = mi_page_block_at(page, page_area, bsize, page->capacity);\n\n  // initialize a sequential free list\n  mi_block_t* const last = mi_page_block_at(page, page_area, bsize, page->capacity + extend - 1);\n  mi_block_t* block = start;\n  while(block <= last) {\n    mi_block_t* next = (mi_block_t*)((uint8_t*)block + bsize);\n    mi_block_set_next(page,block,next);\n    block = next;\n  }\n  // prepend to free list (usually `NULL`)\n  mi_block_set_next(page, last, page->free);\n  page->free = start;\n}\n\n/* -----------------------------------------------------------\n  Page initialize and extend the capacity\n----------------------------------------------------------- */\n\n#define MI_MAX_EXTEND_SIZE    (4*1024)      // heuristic, one OS page seems to work well.\n#if (MI_SECURE>0)\n#define MI_MIN_EXTEND         (8*MI_SECURE) // extend at least by this many\n#else\n#define MI_MIN_EXTEND         (4)\n#endif\n\n// Extend the capacity (up to reserved) by initializing a free list\n// We do at most `MI_MAX_EXTEND` to avoid touching too much memory\n// Note: we also experimented with \"bump\" allocation on the first\n// allocations but this did not speed up any benchmark (due to an\n// extra test in malloc? or cache effects?)\nstatic void mi_page_extend_free(mi_heap_t* heap, mi_page_t* page, mi_tld_t* tld) {\n  MI_UNUSED(tld);\n  mi_assert_expensive(mi_page_is_valid_init(page));\n  #if (MI_SECURE<=2)\n  mi_assert(page->free == NULL);\n  mi_assert(page->local_free == NULL);\n  if (page->free != NULL) return;\n  #endif\n  if (page->capacity >= page->reserved) return;\n\n  mi_stat_counter_increase(tld->stats.pages_extended, 1);\n\n  // calculate the extend count\n  const size_t bsize = mi_page_block_size(page);\n  size_t extend = page->reserved - page->capacity;\n  mi_assert_internal(extend > 0);\n\n  size_t max_extend = (bsize >= MI_MAX_EXTEND_SIZE ? MI_MIN_EXTEND : MI_MAX_EXTEND_SIZE/bsize);\n  if (max_extend < MI_MIN_EXTEND) { max_extend = MI_MIN_EXTEND; }\n  mi_assert_internal(max_extend > 0);\n\n  if (extend > max_extend) {\n    // ensure we don't touch memory beyond the page to reduce page commit.\n    // the `lean` benchmark tests this. Going from 1 to 8 increases rss by 50%.\n    extend = max_extend;\n  }\n\n  mi_assert_internal(extend > 0 && extend + page->capacity <= page->reserved);\n  mi_assert_internal(extend < (1UL<<16));\n\n  // and append the extend the free list\n  if (extend < MI_MIN_SLICES || MI_SECURE==0) { //!mi_option_is_enabled(mi_option_secure)) {\n    mi_page_free_list_extend(page, bsize, extend, &tld->stats );\n  }\n  else {\n    mi_page_free_list_extend_secure(heap, page, bsize, extend, &tld->stats);\n  }\n  // enable the new free list\n  page->capacity += (uint16_t)extend;\n  mi_stat_increase(tld->stats.page_committed, extend * bsize);\n  mi_assert_expensive(mi_page_is_valid_init(page));\n}\n\n// Initialize a fresh page\nstatic void mi_page_init(mi_heap_t* heap, mi_page_t* page, size_t block_size, mi_tld_t* tld) {\n  mi_assert(page != NULL);\n  mi_segment_t* segment = _mi_page_segment(page);\n  mi_assert(segment != NULL);\n  mi_assert_internal(block_size > 0);\n  // set fields\n  mi_page_set_heap(page, heap);\n  page->block_size = block_size;\n  size_t page_size;\n  page->page_start = _mi_segment_page_start(segment, page, &page_size);\n  mi_track_mem_noaccess(page->page_start,page_size);\n  mi_assert_internal(mi_page_block_size(page) <= page_size);\n  mi_assert_internal(page_size <= page->slice_count*MI_SEGMENT_SLICE_SIZE);\n  mi_assert_internal(page_size / block_size < (1L<<16));\n  page->reserved = (uint16_t)(page_size / block_size);\n  mi_assert_internal(page->reserved > 0);\n  #if (MI_PADDING || MI_ENCODE_FREELIST)\n  page->keys[0] = _mi_heap_random_next(heap);\n  page->keys[1] = _mi_heap_random_next(heap);\n  #endif\n  page->free_is_zero = page->is_zero_init;\n  #if MI_DEBUG>2\n  if (page->is_zero_init) {\n    mi_track_mem_defined(page->page_start, page_size);\n    mi_assert_expensive(mi_mem_is_zero(page->page_start, page_size));\n  }\n  #endif\n  mi_assert_internal(page->is_committed);\n  if (block_size > 0 && _mi_is_power_of_two(block_size)) {\n    page->block_size_shift = (uint8_t)(mi_ctz((uintptr_t)block_size));\n  }\n  else {\n    page->block_size_shift = 0;\n  }\n\n  mi_assert_internal(page->capacity == 0);\n  mi_assert_internal(page->free == NULL);\n  mi_assert_internal(page->used == 0);\n  mi_assert_internal(page->xthread_free == 0);\n  mi_assert_internal(page->next == NULL);\n  mi_assert_internal(page->prev == NULL);\n  mi_assert_internal(page->retire_expire == 0);\n  mi_assert_internal(!mi_page_has_aligned(page));\n  #if (MI_PADDING || MI_ENCODE_FREELIST)\n  mi_assert_internal(page->keys[0] != 0);\n  mi_assert_internal(page->keys[1] != 0);\n  #endif\n  mi_assert_internal(page->block_size_shift == 0 || (block_size == ((size_t)1 << page->block_size_shift)));\n  mi_assert_expensive(mi_page_is_valid_init(page));\n\n  // initialize an initial free list\n  mi_page_extend_free(heap,page,tld);\n  mi_assert(mi_page_immediate_available(page));\n}\n\n\n/* -----------------------------------------------------------\n  Find pages with free blocks\n-------------------------------------------------------------*/\n\n// search for a best next page to use for at most N pages (often cut short if immediate blocks are available)\n#define MI_MAX_CANDIDATE_SEARCH  (4)\n\n// is the page not yet used up to its reserved space?\nstatic bool mi_page_is_expandable(const mi_page_t* page) {\n  mi_assert_internal(page != NULL);\n  mi_assert_internal(page->capacity <= page->reserved);\n  return (page->capacity < page->reserved);\n}\n\n\n// Find a page with free blocks of `page->block_size`.\nstatic mi_page_t* mi_page_queue_find_free_ex(mi_heap_t* heap, mi_page_queue_t* pq, bool first_try)\n{\n  // search through the pages in \"next fit\" order\n  #if MI_STAT\n  size_t count = 0;\n  #endif\n  size_t candidate_count = 0;        // we reset this on the first candidate to limit the search\n  mi_page_t* page_candidate = NULL;  // a page with free space\n  mi_page_t* page = pq->first;\n\n  while (page != NULL)\n  {\n    mi_page_t* next = page->next; // remember next\n    #if MI_STAT\n    count++;\n    #endif\n    candidate_count++;\n\n    // collect freed blocks by us and other threads\n    _mi_page_free_collect(page, false);\n\n  #if MI_MAX_CANDIDATE_SEARCH > 1\n    // search up to N pages for a best candidate\n\n    // is the local free list non-empty?\n    const bool immediate_available = mi_page_immediate_available(page);\n\n    // if the page is completely full, move it to the `mi_pages_full`\n    // queue so we don't visit long-lived pages too often.\n    if (!immediate_available && !mi_page_is_expandable(page)) {\n      mi_assert_internal(!mi_page_is_in_full(page) && !mi_page_immediate_available(page));\n      mi_page_to_full(page, pq);\n    }\n    else {\n      // the page has free space, make it a candidate\n      // we prefer non-expandable pages with high usage as candidates (to reduce commit, and increase chances of free-ing up pages)\n      if (page_candidate == NULL) {\n        page_candidate = page;\n        candidate_count = 0;\n      }\n      // prefer to reuse fuller pages (in the hope the less used page gets freed)\n      else if (page->used >= page_candidate->used && !mi_page_is_mostly_used(page) && !mi_page_is_expandable(page)) {\n        page_candidate = page;\n      }\n      // if we find a non-expandable candidate, or searched for N pages, return with the best candidate\n      if (immediate_available || candidate_count > MI_MAX_CANDIDATE_SEARCH) {\n        mi_assert_internal(page_candidate!=NULL);\n        break;\n      }\n    }\n  #else\n    // first-fit algorithm\n    // If the page contains free blocks, we are done\n    if (mi_page_immediate_available(page) || mi_page_is_expandable(page)) {\n      break;  // pick this one\n    }\n\n    // If the page is completely full, move it to the `mi_pages_full`\n    // queue so we don't visit long-lived pages too often.\n    mi_assert_internal(!mi_page_is_in_full(page) && !mi_page_immediate_available(page));\n    mi_page_to_full(page, pq);\n  #endif\n\n    page = next;\n  } // for each page\n\n  mi_heap_stat_counter_increase(heap, page_searches, count);\n\n  // set the page to the best candidate\n  if (page_candidate != NULL) {\n    page = page_candidate;\n  }\n  if (page != NULL && !mi_page_immediate_available(page)) {\n    mi_assert_internal(mi_page_is_expandable(page));\n    mi_page_extend_free(heap, page, heap->tld);\n  }\n\n  if (page == NULL) {\n    _mi_heap_collect_retired(heap, false); // perhaps make a page available?\n    page = mi_page_fresh(heap, pq);\n    if (page == NULL && first_try) {\n      // out-of-memory _or_ an abandoned page with free blocks was reclaimed, try once again\n      page = mi_page_queue_find_free_ex(heap, pq, false);\n    }\n  }\n  else {\n    // move the page to the front of the queue\n    mi_page_queue_move_to_front(heap, pq, page);\n    page->retire_expire = 0;\n    // _mi_heap_collect_retired(heap, false); // update retire counts; note: increases rss on MemoryLoad bench so don't do this\n  }\n  mi_assert_internal(page == NULL || mi_page_immediate_available(page));\n\n\n  return page;\n}\n\n\n\n// Find a page with free blocks of `size`.\nstatic inline mi_page_t* mi_find_free_page(mi_heap_t* heap, size_t size) {\n  mi_page_queue_t* pq = mi_page_queue(heap, size);\n\n  // check the first page: we even do this with candidate search or otherwise we re-search every time\n  mi_page_t* page = pq->first;\n  if (page != NULL) {\n   #if (MI_SECURE>=3) // in secure mode, we extend half the time to increase randomness\n    if (page->capacity < page->reserved && ((_mi_heap_random_next(heap) & 1) == 1)) {\n      mi_page_extend_free(heap, page, heap->tld);\n      mi_assert_internal(mi_page_immediate_available(page));\n    }\n    else\n   #endif\n    {\n      _mi_page_free_collect(page,false);\n    }\n\n    if (mi_page_immediate_available(page)) {\n      page->retire_expire = 0;\n      return page; // fast path\n    }\n  }\n\n  return mi_page_queue_find_free_ex(heap, pq, true);\n}\n\n\n/* -----------------------------------------------------------\n  Users can register a deferred free function called\n  when the `free` list is empty. Since the `local_free`\n  is separate this is deterministically called after\n  a certain number of allocations.\n----------------------------------------------------------- */\n\nstatic mi_deferred_free_fun* volatile deferred_free = NULL;\nstatic _Atomic(void*) deferred_arg; // = NULL\n\nvoid _mi_deferred_free(mi_heap_t* heap, bool force) {\n  heap->tld->heartbeat++;\n  if (deferred_free != NULL && !heap->tld->recurse) {\n    heap->tld->recurse = true;\n    deferred_free(force, heap->tld->heartbeat, mi_atomic_load_ptr_relaxed(void,&deferred_arg));\n    heap->tld->recurse = false;\n  }\n}\n\nvoid mi_register_deferred_free(mi_deferred_free_fun* fn, void* arg) mi_attr_noexcept {\n  deferred_free = fn;\n  mi_atomic_store_ptr_release(void,&deferred_arg, arg);\n}\n\n\n/* -----------------------------------------------------------\n  General allocation\n----------------------------------------------------------- */\n\n// Large and huge page allocation.\n// Huge pages contain just one block, and the segment contains just that page (as `MI_SEGMENT_HUGE`).\n// Huge pages are also use if the requested alignment is very large (> MI_BLOCK_ALIGNMENT_MAX)\n// so their size is not always `> MI_LARGE_OBJ_SIZE_MAX`.\nstatic mi_page_t* mi_large_huge_page_alloc(mi_heap_t* heap, size_t size, size_t page_alignment) {\n  size_t block_size = _mi_os_good_alloc_size(size);\n  mi_assert_internal(mi_bin(block_size) == MI_BIN_HUGE || page_alignment > 0);\n  bool is_huge = (block_size > MI_LARGE_OBJ_SIZE_MAX || page_alignment > 0);\n  #if MI_HUGE_PAGE_ABANDON\n  mi_page_queue_t* pq = (is_huge ? NULL : mi_page_queue(heap, block_size));\n  #else\n  mi_page_queue_t* pq = mi_page_queue(heap, is_huge ? MI_LARGE_OBJ_SIZE_MAX+1 : block_size);\n  mi_assert_internal(!is_huge || mi_page_queue_is_huge(pq));\n  #endif\n  mi_page_t* page = mi_page_fresh_alloc(heap, pq, block_size, page_alignment);\n  if (page != NULL) {\n    mi_assert_internal(mi_page_immediate_available(page));\n\n    if (is_huge) {\n      mi_assert_internal(mi_page_is_huge(page));\n      mi_assert_internal(_mi_page_segment(page)->kind == MI_SEGMENT_HUGE);\n      mi_assert_internal(_mi_page_segment(page)->used==1);\n      #if MI_HUGE_PAGE_ABANDON\n      mi_assert_internal(_mi_page_segment(page)->thread_id==0); // abandoned, not in the huge queue\n      mi_page_set_heap(page, NULL);\n      #endif\n    }\n    else {\n      mi_assert_internal(!mi_page_is_huge(page));\n    }\n\n    const size_t bsize = mi_page_usable_block_size(page);  // note: not `mi_page_block_size` to account for padding\n    /*if (bsize <= MI_LARGE_OBJ_SIZE_MAX) {\n      mi_heap_stat_increase(heap, malloc_large, bsize);\n      mi_heap_stat_counter_increase(heap, malloc_large_count, 1);\n    }\n    else */\n    {\n      _mi_stat_increase(&heap->tld->stats.malloc_huge, bsize);\n      _mi_stat_counter_increase(&heap->tld->stats.malloc_huge_count, 1);\n    }\n  }\n  return page;\n}\n\n\n// Allocate a page\n// Note: in debug mode the size includes MI_PADDING_SIZE and might have overflowed.\nstatic mi_page_t* mi_find_page(mi_heap_t* heap, size_t size, size_t huge_alignment) mi_attr_noexcept {\n  // huge allocation?\n  const size_t req_size = size - MI_PADDING_SIZE;  // correct for padding_size in case of an overflow on `size`\n  if mi_unlikely(req_size > (MI_MEDIUM_OBJ_SIZE_MAX - MI_PADDING_SIZE) || huge_alignment > 0) {\n    if mi_unlikely(req_size > MI_MAX_ALLOC_SIZE) {\n      _mi_error_message(EOVERFLOW, \"allocation request is too large (%zu bytes)\\n\", req_size);\n      return NULL;\n    }\n    else {\n      return mi_large_huge_page_alloc(heap,size,huge_alignment);\n    }\n  }\n  else {\n    // otherwise find a page with free blocks in our size segregated queues\n    #if MI_PADDING\n    mi_assert_internal(size >= MI_PADDING_SIZE);\n    #endif\n    return mi_find_free_page(heap, size);\n  }\n}\n\n// Generic allocation routine if the fast path (`alloc.c:mi_page_malloc`) does not succeed.\n// Note: in debug mode the size includes MI_PADDING_SIZE and might have overflowed.\n// The `huge_alignment` is normally 0 but is set to a multiple of MI_SEGMENT_SIZE for\n// very large requested alignments in which case we use a huge segment.\nvoid* _mi_malloc_generic(mi_heap_t* heap, size_t size, bool zero, size_t huge_alignment) mi_attr_noexcept\n{\n  mi_assert_internal(heap != NULL);\n\n  // initialize if necessary\n  if mi_unlikely(!mi_heap_is_initialized(heap)) {\n    heap = mi_heap_get_default(); // calls mi_thread_init\n    if mi_unlikely(!mi_heap_is_initialized(heap)) { return NULL; }\n  }\n  mi_assert_internal(mi_heap_is_initialized(heap));\n\n  // do administrative tasks every N generic mallocs\n  if mi_unlikely(++heap->generic_count >= 100) {\n    heap->generic_collect_count += heap->generic_count;\n    heap->generic_count = 0;\n    // call potential deferred free routines\n    _mi_deferred_free(heap, false);\n\n    // free delayed frees from other threads (but skip contended ones)\n    _mi_heap_delayed_free_partial(heap);\n    \n    // collect every once in a while (10000 by default)\n    const long generic_collect = mi_option_get_clamp(mi_option_generic_collect, 1, 1000000L);    \n    if (heap->generic_collect_count >= generic_collect) {\n      heap->generic_collect_count = 0;\n      mi_heap_collect(heap, false /* force? */);\n    }\n  }\n\n  // find (or allocate) a page of the right size\n  mi_page_t* page = mi_find_page(heap, size, huge_alignment);\n  if mi_unlikely(page == NULL) { // first time out of memory, try to collect and retry the allocation once more\n    mi_heap_collect(heap, true /* force */);\n    page = mi_find_page(heap, size, huge_alignment);\n  }\n\n  if mi_unlikely(page == NULL) { // out of memory\n    const size_t req_size = size - MI_PADDING_SIZE;  // correct for padding_size in case of an overflow on `size`\n    _mi_error_message(ENOMEM, \"unable to allocate memory (%zu bytes)\\n\", req_size);\n    return NULL;\n  }\n\n  mi_assert_internal(mi_page_immediate_available(page));\n  mi_assert_internal(mi_page_block_size(page) >= size);\n\n  // and try again, this time succeeding! (i.e. this should never recurse through _mi_page_malloc)\n  void* p;\n  if mi_unlikely(zero && mi_page_is_huge(page)) {\n    // note: we cannot call _mi_page_malloc with zeroing for huge blocks; we zero it afterwards in that case.\n    p = _mi_page_malloc(heap, page, size);\n    mi_assert_internal(p != NULL);\n    _mi_memzero_aligned(p, mi_page_usable_block_size(page));\n  }\n  else {\n    p = _mi_page_malloc_zero(heap, page, size, zero);\n    mi_assert_internal(p != NULL);\n  }\n  // move singleton pages to the full queue\n  if (page->reserved == page->used) {\n    mi_page_to_full(page, mi_page_queue_of(page));\n  }\n  return p;\n}\n"
  },
  {
    "path": "third-party/mimalloc/src/prim/emscripten/prim.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2023, Microsoft Research, Daan Leijen, Alon Zakai\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n// This file is included in `src/prim/prim.c`\n\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"mimalloc/atomic.h\"\n#include \"mimalloc/prim.h\"\n\n// Design\n// ======\n//\n// mimalloc is built on top of emmalloc. emmalloc is a minimal allocator on top\n// of sbrk. The reason for having three layers here is that we want mimalloc to\n// be able to allocate and release system memory properly, the same way it would\n// when using VirtualAlloc on Windows or mmap on POSIX, and sbrk is too limited.\n// Specifically, sbrk can only go up and down, and not \"skip\" over regions, and\n// so we end up either never freeing memory to the system, or we can get stuck\n// with holes.\n//\n// Atm wasm generally does *not* free memory back the system: once grown, we do\n// not shrink back down (https://github.com/WebAssembly/design/issues/1397).\n// However, that is expected to improve\n// (https://github.com/WebAssembly/memory-control/blob/main/proposals/memory-control/Overview.md)\n// and so we do not want to bake those limitations in here.\n//\n// Even without that issue, we want our system allocator to handle holes, that\n// is, it should merge freed regions and allow allocating new content there of\n// the full size, etc., so that we do not waste space. That means that the\n// system allocator really does need to handle the general problem of allocating\n// and freeing variable-sized chunks of memory in a random order, like malloc/\n// free do. And so it makes sense to layer mimalloc on top of such an\n// implementation.\n//\n// emmalloc makes sense for the lower level because it is small and simple while\n// still fully handling merging of holes etc. It is not the most efficient\n// allocator, but our assumption is that mimalloc needs to be fast while the\n// system allocator underneath it is called much less frequently.\n//\n\n//---------------------------------------------\n// init\n//---------------------------------------------\n\nvoid _mi_prim_mem_init( mi_os_mem_config_t* config) {\n  config->page_size = 64*MI_KiB; // WebAssembly has a fixed page size: 64KiB\n  config->alloc_granularity = 16;\n  config->has_overcommit = false;\n  config->has_partial_free = false;\n  config->has_virtual_reserve = false;\n}\n\nextern void emmalloc_free(void*);\n\nint _mi_prim_free(void* addr, size_t size) {\n  MI_UNUSED(size);\n  emmalloc_free(addr);\n  return 0;\n}\n\n\n//---------------------------------------------\n// Allocation\n//---------------------------------------------\n\nextern void* emmalloc_memalign(size_t alignment, size_t size);\n\n// Note: the `try_alignment` is just a hint and the returned pointer is not guaranteed to be aligned.\nint _mi_prim_alloc(void* hint_addr, size_t size, size_t try_alignment, bool commit, bool allow_large, bool* is_large, bool* is_zero, void** addr) {\n  MI_UNUSED(try_alignment); MI_UNUSED(allow_large); MI_UNUSED(commit); MI_UNUSED(hint_addr);\n  *is_large = false;\n  // TODO: Track the highest address ever seen; first uses of it are zeroes.\n  //       That assumes no one else uses sbrk but us (they could go up,\n  //       scribble, and then down), but we could assert on that perhaps.\n  *is_zero = false;\n  // emmalloc has a minimum alignment size.\n  #define MIN_EMMALLOC_ALIGN           8\n  if (try_alignment < MIN_EMMALLOC_ALIGN) {\n    try_alignment = MIN_EMMALLOC_ALIGN;\n  }\n  void* p = emmalloc_memalign(try_alignment, size);\n  *addr = p;\n  if (p == 0) {\n    return ENOMEM;\n  }\n  return 0;\n}\n\n\n//---------------------------------------------\n// Commit/Reset\n//---------------------------------------------\n\nint _mi_prim_commit(void* addr, size_t size, bool* is_zero) {\n  MI_UNUSED(addr); MI_UNUSED(size);\n  // See TODO above.\n  *is_zero = false;\n  return 0;\n}\n\nint _mi_prim_decommit(void* addr, size_t size, bool* needs_recommit) {\n  MI_UNUSED(addr); MI_UNUSED(size);\n  *needs_recommit = false;\n  return 0;\n}\n\nint _mi_prim_reset(void* addr, size_t size) {\n  MI_UNUSED(addr); MI_UNUSED(size);\n  return 0;\n}\n\nint _mi_prim_protect(void* addr, size_t size, bool protect) {\n  MI_UNUSED(addr); MI_UNUSED(size); MI_UNUSED(protect);\n  return 0;\n}\n\n\n//---------------------------------------------\n// Huge pages and NUMA nodes\n//---------------------------------------------\n\nint _mi_prim_alloc_huge_os_pages(void* hint_addr, size_t size, int numa_node, bool* is_zero, void** addr) {\n  MI_UNUSED(hint_addr); MI_UNUSED(size); MI_UNUSED(numa_node);\n  *is_zero = true;\n  *addr = NULL;\n  return ENOSYS;\n}\n\nsize_t _mi_prim_numa_node(void) {\n  return 0;\n}\n\nsize_t _mi_prim_numa_node_count(void) {\n  return 1;\n}\n\n\n//----------------------------------------------------------------\n// Clock\n//----------------------------------------------------------------\n\n#include <emscripten/html5.h>\n\nmi_msecs_t _mi_prim_clock_now(void) {\n  return emscripten_date_now();\n}\n\n\n//----------------------------------------------------------------\n// Process info\n//----------------------------------------------------------------\n\nvoid _mi_prim_process_info(mi_process_info_t* pinfo)\n{\n  // use defaults\n  MI_UNUSED(pinfo);\n}\n\n\n//----------------------------------------------------------------\n// Output\n//----------------------------------------------------------------\n\n#include <emscripten/console.h>\n\nvoid _mi_prim_out_stderr( const char* msg) {\n  emscripten_console_error(msg);\n}\n\n\n//----------------------------------------------------------------\n// Environment\n//----------------------------------------------------------------\n\nbool _mi_prim_getenv(const char* name, char* result, size_t result_size) {\n  // For code size reasons, do not support environ customization for now.\n  MI_UNUSED(name);\n  MI_UNUSED(result);\n  MI_UNUSED(result_size);\n  return false;\n}\n\n\n//----------------------------------------------------------------\n// Random\n//----------------------------------------------------------------\n\nbool _mi_prim_random_buf(void* buf, size_t buf_len) {\n  int err = getentropy(buf, buf_len);\n  return !err;\n}\n\n\n//----------------------------------------------------------------\n// Thread init/done\n//----------------------------------------------------------------\n\n#if defined(MI_USE_PTHREADS)\n\n// use pthread local storage keys to detect thread ending\n// (and used with MI_TLS_PTHREADS for the default heap)\npthread_key_t _mi_heap_default_key = (pthread_key_t)(-1);\n\nstatic void mi_pthread_done(void* value) {\n  if (value!=NULL) {\n    _mi_thread_done((mi_heap_t*)value);\n  }\n}\n\nvoid _mi_prim_thread_init_auto_done(void) {\n  mi_assert_internal(_mi_heap_default_key == (pthread_key_t)(-1));\n  pthread_key_create(&_mi_heap_default_key, &mi_pthread_done);\n}\n\nvoid _mi_prim_thread_done_auto_done(void) {\n  // nothing to do\n}\n\nvoid _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {\n  if (_mi_heap_default_key != (pthread_key_t)(-1)) {  // can happen during recursive invocation on freeBSD\n    pthread_setspecific(_mi_heap_default_key, heap);\n  }\n}\n\n#else\n\nvoid _mi_prim_thread_init_auto_done(void) {\n  // nothing\n}\n\nvoid _mi_prim_thread_done_auto_done(void) {\n  // nothing\n}\n\nvoid _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {\n  MI_UNUSED(heap);\n\n}\n#endif\n"
  },
  {
    "path": "third-party/mimalloc/src/prim/osx/alloc-override-zone.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2022, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n\n#if defined(MI_MALLOC_OVERRIDE)\n\n#if !defined(__APPLE__)\n#error \"this file should only be included on macOS\"\n#endif\n\n/* ------------------------------------------------------\n   Override system malloc on macOS\n   This is done through the malloc zone interface.\n   It seems to be most robust in combination with interposing\n   though or otherwise we may get zone errors as there are could\n   be allocations done by the time we take over the\n   zone.\n------------------------------------------------------ */\n\n#include <AvailabilityMacros.h>\n#include <malloc/malloc.h>\n#include <string.h>  // memset\n#include <stdlib.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)\n// only available from OSX 10.6\nextern malloc_zone_t* malloc_default_purgeable_zone(void) __attribute__((weak_import));\n#endif\n\n/* ------------------------------------------------------\n   malloc zone members\n------------------------------------------------------ */\n\nstatic size_t zone_size(malloc_zone_t* zone, const void* p) {\n  MI_UNUSED(zone);\n  if (!mi_is_in_heap_region(p)){ return 0; } // not our pointer, bail out\n  return mi_usable_size(p);\n}\n\nstatic void* zone_malloc(malloc_zone_t* zone, size_t size) {\n  MI_UNUSED(zone);\n  return mi_malloc(size);\n}\n\nstatic void* zone_calloc(malloc_zone_t* zone, size_t count, size_t size) {\n  MI_UNUSED(zone);\n  return mi_calloc(count, size);\n}\n\nstatic void* zone_valloc(malloc_zone_t* zone, size_t size) {\n  MI_UNUSED(zone);\n  return mi_malloc_aligned(size, _mi_os_page_size());\n}\n\nstatic void zone_free(malloc_zone_t* zone, void* p) {\n  MI_UNUSED(zone);\n  mi_cfree(p);\n}\n\nstatic void* zone_realloc(malloc_zone_t* zone, void* p, size_t newsize) {\n  MI_UNUSED(zone);\n  return mi_realloc(p, newsize);\n}\n\nstatic void* zone_memalign(malloc_zone_t* zone, size_t alignment, size_t size) {\n  MI_UNUSED(zone);\n  return mi_malloc_aligned(size,alignment);\n}\n\nstatic void zone_destroy(malloc_zone_t* zone) {\n  MI_UNUSED(zone);\n  // todo: ignore for now?\n}\n\nstatic unsigned zone_batch_malloc(malloc_zone_t* zone, size_t size, void** ps, unsigned count) {\n  size_t i;\n  for (i = 0; i < count; i++) {\n    ps[i] = zone_malloc(zone, size);\n    if (ps[i] == NULL) break;\n  }\n  return i;\n}\n\nstatic void zone_batch_free(malloc_zone_t* zone, void** ps, unsigned count) {\n  for(size_t i = 0; i < count; i++) {\n    zone_free(zone, ps[i]);\n    ps[i] = NULL;\n  }\n}\n\nstatic size_t zone_pressure_relief(malloc_zone_t* zone, size_t size) {\n  MI_UNUSED(zone); MI_UNUSED(size);\n  mi_collect(false);\n  return 0;\n}\n\nstatic void zone_free_definite_size(malloc_zone_t* zone, void* p, size_t size) {\n  MI_UNUSED(size);\n  zone_free(zone,p);\n}\n\nstatic boolean_t zone_claimed_address(malloc_zone_t* zone, void* p) {\n  MI_UNUSED(zone);\n  return mi_is_in_heap_region(p);\n}\n\n\n/* ------------------------------------------------------\n   Introspection members\n------------------------------------------------------ */\n\nstatic kern_return_t intro_enumerator(task_t task, void* p,\n                            unsigned type_mask, vm_address_t zone_address,\n                            memory_reader_t reader,\n                            vm_range_recorder_t recorder)\n{\n  // todo: enumerate all memory\n  MI_UNUSED(task); MI_UNUSED(p); MI_UNUSED(type_mask); MI_UNUSED(zone_address);\n  MI_UNUSED(reader); MI_UNUSED(recorder);\n  return KERN_SUCCESS;\n}\n\nstatic size_t intro_good_size(malloc_zone_t* zone, size_t size) {\n  MI_UNUSED(zone);\n  return mi_good_size(size);\n}\n\nstatic boolean_t intro_check(malloc_zone_t* zone) {\n  MI_UNUSED(zone);\n  return true;\n}\n\nstatic void intro_print(malloc_zone_t* zone, boolean_t verbose) {\n  MI_UNUSED(zone); MI_UNUSED(verbose);\n  mi_stats_print(NULL);\n}\n\nstatic void intro_log(malloc_zone_t* zone, void* p) {\n  MI_UNUSED(zone); MI_UNUSED(p);\n  // todo?\n}\n\nstatic void intro_force_lock(malloc_zone_t* zone) {\n  MI_UNUSED(zone);\n  // todo?\n}\n\nstatic void intro_force_unlock(malloc_zone_t* zone) {\n  MI_UNUSED(zone);\n  // todo?\n}\n\nstatic void intro_statistics(malloc_zone_t* zone, malloc_statistics_t* stats) {\n  MI_UNUSED(zone);\n  // todo...\n  stats->blocks_in_use = 0;\n  stats->size_in_use = 0;\n  stats->max_size_in_use = 0;\n  stats->size_allocated = 0;\n}\n\nstatic boolean_t intro_zone_locked(malloc_zone_t* zone) {\n  MI_UNUSED(zone);\n  return false;\n}\n\n\n/* ------------------------------------------------------\n  At process start, override the default allocator\n------------------------------------------------------ */\n\n#if defined(__GNUC__) && !defined(__clang__)\n#pragma GCC diagnostic ignored \"-Wmissing-field-initializers\"\n#endif\n\n#if defined(__clang__)\n#pragma clang diagnostic ignored \"-Wc99-extensions\"\n#endif\n\nstatic malloc_introspection_t mi_introspect = {\n  .enumerator = &intro_enumerator,\n  .good_size = &intro_good_size,\n  .check = &intro_check,\n  .print = &intro_print,\n  .log = &intro_log,\n  .force_lock = &intro_force_lock,\n  .force_unlock = &intro_force_unlock,\n#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) && !defined(__ppc__)\n  .statistics = &intro_statistics,\n  .zone_locked = &intro_zone_locked,\n#endif\n};\n\nstatic malloc_zone_t mi_malloc_zone = {\n  // note: even with designators, the order is important for C++ compilation\n  //.reserved1 = NULL,\n  //.reserved2 = NULL,\n  .size = &zone_size,\n  .malloc = &zone_malloc,\n  .calloc = &zone_calloc,\n  .valloc = &zone_valloc,\n  .free = &zone_free,\n  .realloc = &zone_realloc,\n  .destroy = &zone_destroy,\n  .zone_name = \"mimalloc\",\n  .batch_malloc = &zone_batch_malloc,\n  .batch_free = &zone_batch_free,\n  .introspect = &mi_introspect,\n#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) && !defined(__ppc__)\n  #if defined(MAC_OS_X_VERSION_10_14) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14)\n  .version = 10,\n  #else\n  .version = 9,\n  #endif\n  // switch to version 9+ on OSX 10.6 to support memalign.\n  .memalign = &zone_memalign,\n  .free_definite_size = &zone_free_definite_size,\n  #if defined(MAC_OS_X_VERSION_10_7) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7)\n  .pressure_relief = &zone_pressure_relief,\n  #endif\n  #if defined(MAC_OS_X_VERSION_10_14) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14)\n  .claimed_address = &zone_claimed_address,\n  #endif\n#else\n  .version = 4,\n#endif\n};\n\n#ifdef __cplusplus\n}\n#endif\n\n\n#if defined(MI_OSX_INTERPOSE) && defined(MI_SHARED_LIB_EXPORT)\n\n// ------------------------------------------------------\n// Override malloc_xxx and malloc_zone_xxx api's to use only\n// our mimalloc zone. Since even the loader uses malloc\n// on macOS, this ensures that all allocations go through\n// mimalloc (as all calls are interposed).\n// The main `malloc`, `free`, etc calls are interposed in `alloc-override.c`,\n// Here, we also override macOS specific API's like\n// `malloc_zone_calloc` etc. see <https://github.com/aosm/libmalloc/blob/master/man/malloc_zone_malloc.3>\n// ------------------------------------------------------\n\nstatic inline malloc_zone_t* mi_get_default_zone(void)\n{\n  static bool init;\n  if mi_unlikely(!init) {\n    init = true;\n    malloc_zone_register(&mi_malloc_zone);  // by calling register we avoid a zone error on free (see <http://eatmyrandom.blogspot.com/2010/03/mallocfree-interception-on-mac-os-x.html>)\n  }\n  return &mi_malloc_zone;\n}\n\nmi_decl_externc int  malloc_jumpstart(uintptr_t cookie);\nmi_decl_externc void _malloc_fork_prepare(void);\nmi_decl_externc void _malloc_fork_parent(void);\nmi_decl_externc void _malloc_fork_child(void);\n\n\nstatic malloc_zone_t* mi_malloc_create_zone(vm_size_t size, unsigned flags) {\n  MI_UNUSED(size); MI_UNUSED(flags);\n  return mi_get_default_zone();\n}\n\nstatic malloc_zone_t* mi_malloc_default_zone (void) {\n  return mi_get_default_zone();\n}\n\nstatic malloc_zone_t* mi_malloc_default_purgeable_zone(void) {\n  return mi_get_default_zone();\n}\n\nstatic void mi_malloc_destroy_zone(malloc_zone_t* zone) {\n  MI_UNUSED(zone);\n  // nothing.\n}\n\nstatic kern_return_t mi_malloc_get_all_zones (task_t task, memory_reader_t mr, vm_address_t** addresses, unsigned* count) {\n  MI_UNUSED(task); MI_UNUSED(mr);\n  if (addresses != NULL) *addresses = NULL;\n  if (count != NULL) *count = 0;\n  return KERN_SUCCESS;\n}\n\nstatic const char* mi_malloc_get_zone_name(malloc_zone_t* zone) {\n  return (zone == NULL ? mi_malloc_zone.zone_name : zone->zone_name);\n}\n\nstatic void mi_malloc_set_zone_name(malloc_zone_t* zone, const char* name) {\n  MI_UNUSED(zone); MI_UNUSED(name);\n}\n\nstatic int mi_malloc_jumpstart(uintptr_t cookie) {\n  MI_UNUSED(cookie);\n  return 1; // or 0 for no error?\n}\n\nstatic void mi__malloc_fork_prepare(void) {\n  // nothing\n}\nstatic void mi__malloc_fork_parent(void) {\n  // nothing\n}\nstatic void mi__malloc_fork_child(void) {\n  // nothing\n}\n\nstatic void mi_malloc_printf(const char* fmt, ...) {\n  MI_UNUSED(fmt);\n}\n\nstatic bool zone_check(malloc_zone_t* zone) {\n  MI_UNUSED(zone);\n  return true;\n}\n\nstatic malloc_zone_t* zone_from_ptr(const void* p) {\n  MI_UNUSED(p);\n  return mi_get_default_zone();\n}\n\nstatic void zone_log(malloc_zone_t* zone, void* p) {\n  MI_UNUSED(zone); MI_UNUSED(p);\n}\n\nstatic void zone_print(malloc_zone_t* zone, bool b) {\n  MI_UNUSED(zone); MI_UNUSED(b);\n}\n\nstatic void zone_print_ptr_info(void* p) {\n  MI_UNUSED(p);\n}\n\nstatic void zone_register(malloc_zone_t* zone) {\n  MI_UNUSED(zone);\n}\n\nstatic void zone_unregister(malloc_zone_t* zone) {\n  MI_UNUSED(zone);\n}\n\n// use interposing so `DYLD_INSERT_LIBRARIES` works without `DYLD_FORCE_FLAT_NAMESPACE=1`\n// See: <https://books.google.com/books?id=K8vUkpOXhN4C&pg=PA73>\nstruct mi_interpose_s {\n  const void* replacement;\n  const void* target;\n};\n#define MI_INTERPOSE_FUN(oldfun,newfun) { (const void*)&newfun, (const void*)&oldfun }\n#define MI_INTERPOSE_MI(fun)            MI_INTERPOSE_FUN(fun,mi_##fun)\n#define MI_INTERPOSE_ZONE(fun)          MI_INTERPOSE_FUN(malloc_##fun,fun)\n__attribute__((used)) static const struct mi_interpose_s _mi_zone_interposes[]  __attribute__((section(\"__DATA, __interpose\"))) =\n{\n\n  MI_INTERPOSE_MI(malloc_create_zone),\n  MI_INTERPOSE_MI(malloc_default_purgeable_zone),\n  MI_INTERPOSE_MI(malloc_default_zone),\n  MI_INTERPOSE_MI(malloc_destroy_zone),\n  MI_INTERPOSE_MI(malloc_get_all_zones),\n  MI_INTERPOSE_MI(malloc_get_zone_name),\n  MI_INTERPOSE_MI(malloc_jumpstart),\n  MI_INTERPOSE_MI(malloc_printf),\n  MI_INTERPOSE_MI(malloc_set_zone_name),\n  MI_INTERPOSE_MI(_malloc_fork_child),\n  MI_INTERPOSE_MI(_malloc_fork_parent),\n  MI_INTERPOSE_MI(_malloc_fork_prepare),\n\n  MI_INTERPOSE_ZONE(zone_batch_free),\n  MI_INTERPOSE_ZONE(zone_batch_malloc),\n  MI_INTERPOSE_ZONE(zone_calloc),\n  MI_INTERPOSE_ZONE(zone_check),\n  MI_INTERPOSE_ZONE(zone_free),\n  MI_INTERPOSE_ZONE(zone_from_ptr),\n  MI_INTERPOSE_ZONE(zone_log),\n  MI_INTERPOSE_ZONE(zone_malloc),\n  MI_INTERPOSE_ZONE(zone_memalign),\n  MI_INTERPOSE_ZONE(zone_print),\n  MI_INTERPOSE_ZONE(zone_print_ptr_info),\n  MI_INTERPOSE_ZONE(zone_realloc),\n  MI_INTERPOSE_ZONE(zone_register),\n  MI_INTERPOSE_ZONE(zone_unregister),\n  MI_INTERPOSE_ZONE(zone_valloc)\n};\n\n\n#else\n\n// ------------------------------------------------------\n// hook into the zone api's without interposing\n// This is the official way of adding an allocator but\n// it seems less robust than using interpose.\n// ------------------------------------------------------\n\nstatic inline malloc_zone_t* mi_get_default_zone(void)\n{\n  // The first returned zone is the real default\n  malloc_zone_t** zones = NULL;\n  unsigned count = 0;\n  kern_return_t ret = malloc_get_all_zones(0, NULL, (vm_address_t**)&zones, &count);\n  if (ret == KERN_SUCCESS && count > 0) {\n    return zones[0];\n  }\n  else {\n    // fallback\n    return malloc_default_zone();\n  }\n}\n\n#if defined(__clang__)\n__attribute__((constructor(101))) // highest priority\n#else\n__attribute__((constructor))      // priority level is not supported by gcc\n#endif\n__attribute__((used))\nstatic void _mi_macos_override_malloc(void) {\n  malloc_zone_t* purgeable_zone = NULL;\n\n  #if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)\n  // force the purgeable zone to exist to avoid strange bugs\n  if (malloc_default_purgeable_zone) {\n    purgeable_zone = malloc_default_purgeable_zone();\n  }\n  #endif\n\n  // Register our zone.\n  // thomcc: I think this is still needed to put us in the zone list.\n  malloc_zone_register(&mi_malloc_zone);\n  // Unregister the default zone, this makes our zone the new default\n  // as that was the last registered.\n  malloc_zone_t *default_zone = mi_get_default_zone();\n  // thomcc: Unsure if the next test is *always* false or just false in the\n  // cases I've tried. I'm also unsure if the code inside is needed. at all\n  if (default_zone != &mi_malloc_zone) {\n    malloc_zone_unregister(default_zone);\n\n    // Reregister the default zone so free and realloc in that zone keep working.\n    malloc_zone_register(default_zone);\n  }\n\n  // Unregister, and re-register the purgeable_zone to avoid bugs if it occurs\n  // earlier than the default zone.\n  if (purgeable_zone != NULL) {\n    malloc_zone_unregister(purgeable_zone);\n    malloc_zone_register(purgeable_zone);\n  }\n\n}\n#endif  // MI_OSX_INTERPOSE\n\n#endif // MI_MALLOC_OVERRIDE\n"
  },
  {
    "path": "third-party/mimalloc/src/prim/osx/prim.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2023, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n// We use the unix/prim.c with the mmap API on macOSX\n#include \"../unix/prim.c\"\n"
  },
  {
    "path": "third-party/mimalloc/src/prim/prim.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2023, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n// Select the implementation of the primitives\n// depending on the OS.\n\n#if defined(_WIN32)\n#include \"windows/prim.c\"  // VirtualAlloc (Windows)\n\n#elif defined(__APPLE__)\n#include \"osx/prim.c\"      // macOSX (actually defers to mmap in unix/prim.c)\n\n#elif defined(__wasi__)\n#define MI_USE_SBRK\n#include \"wasi/prim.c\"     // memory-grow or sbrk (Wasm)\n\n#elif defined(__EMSCRIPTEN__)\n#include \"emscripten/prim.c\" // emmalloc_*, + pthread support\n\n#else\n#include \"unix/prim.c\"     // mmap() (Linux, macOSX, BSD, Illumnos, Haiku, DragonFly, etc.)\n\n#endif\n\n// Generic process initialization\n#ifndef MI_PRIM_HAS_PROCESS_ATTACH\n#if defined(__GNUC__) || defined(__clang__)\n  // gcc,clang: use the constructor/destructor attribute\n  // which for both seem to run before regular constructors/destructors\n  #if defined(__clang__)\n    #define mi_attr_constructor __attribute__((constructor(101)))\n    #define mi_attr_destructor  __attribute__((destructor(101)))\n  #else\n    #define mi_attr_constructor __attribute__((constructor))\n    #define mi_attr_destructor  __attribute__((destructor))\n  #endif\n  static void mi_attr_constructor mi_process_attach(void) {\n    _mi_process_load();\n  }\n  static void mi_attr_destructor mi_process_detach(void) {\n    _mi_process_done();\n  }\n#elif defined(__cplusplus)\n  // C++: use static initialization to detect process start/end\n  // This is not guaranteed to be first/last but the best we can generally do?\n  struct mi_init_done_t {\n    mi_init_done_t() {\n      _mi_process_load();\n    }\n    ~mi_init_done_t() {\n      _mi_process_done();\n    }\n  };\n  static mi_init_done_t mi_init_done;\n #else\n  #pragma message(\"define a way to call _mi_process_load/done on your platform\")\n#endif\n#endif\n\n// Generic allocator init/done callback \n#ifndef MI_PRIM_HAS_ALLOCATOR_INIT\nbool _mi_is_redirected(void) {\n  return false;\n}\nbool _mi_allocator_init(const char** message) {\n  if (message != NULL) { *message = NULL; }\n  return true;\n}\nvoid _mi_allocator_done(void) {\n  // nothing to do\n}\n#endif\n"
  },
  {
    "path": "third-party/mimalloc/src/prim/readme.md",
    "content": "## Portability Primitives\n\nThis is the portability layer where all primitives needed from the OS are defined.\n\n- `include/mimalloc/prim.h`: primitive portability API definition.\n- `prim.c`: Selects one of `unix/prim.c`, `wasi/prim.c`, or `windows/prim.c` depending on the host platform\n            (and on macOS, `osx/prim.c` defers to `unix/prim.c`).\n\nNote: still work in progress, there may still be places in the sources that still depend on OS ifdef's."
  },
  {
    "path": "third-party/mimalloc/src/prim/unix/prim.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2023, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n// This file is included in `src/prim/prim.c`\n\n#ifndef _DEFAULT_SOURCE\n#define _DEFAULT_SOURCE   // ensure mmap flags and syscall are defined\n#endif\n\n#if defined(__sun)\n// illumos provides new mman.h api when any of these are defined\n// otherwise the old api based on caddr_t which predates the void pointers one.\n// stock solaris provides only the former, chose to atomically to discard those\n// flags only here rather than project wide tough.\n#undef _XOPEN_SOURCE\n#undef _POSIX_C_SOURCE\n#endif\n\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"mimalloc/prim.h\"\n\n#include <sys/mman.h>  // mmap\n#include <unistd.h>    // sysconf\n#include <fcntl.h>     // open, close, read, access\n#include <stdlib.h>    // getenv, arc4random_buf\n\n#if defined(__linux__)\n  #include <features.h>\n  //#if defined(MI_NO_THP)\n  #include <sys/prctl.h>  // THP disable\n  //#endif\n  #if defined(__GLIBC__)\n  #include <linux/mman.h> // linux mmap flags\n  #else\n  #include <sys/mman.h>\n  #endif\n#elif defined(__APPLE__)\n  #include <AvailabilityMacros.h>\n  #include <TargetConditionals.h>\n  #if !defined(TARGET_OS_OSX) || TARGET_OS_OSX   // see issue #879, used to be (!TARGET_IOS_IPHONE && !TARGET_IOS_SIMULATOR)\n  #include <mach/vm_statistics.h>    // VM_MAKE_TAG, VM_FLAGS_SUPERPAGE_SIZE_2MB, etc.\n  #endif\n  #if !defined(MAC_OS_X_VERSION_10_7)\n  #define MAC_OS_X_VERSION_10_7   1070\n  #endif\n#elif defined(__FreeBSD__) || defined(__DragonFly__)\n  #include <sys/param.h>\n  #if __FreeBSD_version >= 1200000\n  #include <sys/cpuset.h>\n  #include <sys/domainset.h>\n  #endif\n  #include <sys/sysctl.h>\n#endif\n\n#if (defined(__linux__) && !defined(__ANDROID__)) || defined(__FreeBSD__)\n  #define MI_HAS_SYSCALL_H\n  #include <sys/syscall.h>\n#endif\n\n#if !defined(MADV_DONTNEED) && defined(POSIX_MADV_DONTNEED)  // QNX\n#define MADV_DONTNEED  POSIX_MADV_DONTNEED\n#endif\n#if !defined(MADV_FREE) && defined(POSIX_MADV_FREE)  // QNX\n#define MADV_FREE  POSIX_MADV_FREE\n#endif\n\n  \n//------------------------------------------------------------------------------------\n// Use syscalls for some primitives to allow for libraries that override open/read/close etc.\n// and do allocation themselves; using syscalls prevents recursion when mimalloc is\n// still initializing (issue #713)\n// Declare inline to avoid unused function warnings.\n//------------------------------------------------------------------------------------\n\n#if defined(MI_HAS_SYSCALL_H) && defined(SYS_open) && defined(SYS_close) && defined(SYS_read) && defined(SYS_access)\n\nstatic inline int mi_prim_open(const char* fpath, int open_flags) {\n  return syscall(SYS_open,fpath,open_flags,0);\n}\nstatic inline ssize_t mi_prim_read(int fd, void* buf, size_t bufsize) {\n  return syscall(SYS_read,fd,buf,bufsize);\n}\nstatic inline int mi_prim_close(int fd) {\n  return syscall(SYS_close,fd);\n}\nstatic inline int mi_prim_access(const char *fpath, int mode) {\n  return syscall(SYS_access,fpath,mode);\n}\n\n#else\n\nstatic inline int mi_prim_open(const char* fpath, int open_flags) {\n  return open(fpath,open_flags);\n}\nstatic inline ssize_t mi_prim_read(int fd, void* buf, size_t bufsize) {\n  return read(fd,buf,bufsize);\n}\nstatic inline int mi_prim_close(int fd) {\n  return close(fd);\n}\nstatic inline int mi_prim_access(const char *fpath, int mode) {\n  return access(fpath,mode);\n}\n\n#endif\n\n\n\n//---------------------------------------------\n// init\n//---------------------------------------------\n\nstatic bool unix_detect_overcommit(void) {\n  bool os_overcommit = true;\n#if defined(__linux__)\n  int fd = mi_prim_open(\"/proc/sys/vm/overcommit_memory\", O_RDONLY);\n\tif (fd >= 0) {\n    char buf[32];\n    ssize_t nread = mi_prim_read(fd, &buf, sizeof(buf));\n    mi_prim_close(fd);\n    // <https://www.kernel.org/doc/Documentation/vm/overcommit-accounting>\n    // 0: heuristic overcommit, 1: always overcommit, 2: never overcommit (ignore NORESERVE)\n    if (nread >= 1) {\n      os_overcommit = (buf[0] == '0' || buf[0] == '1');\n    }\n  }\n#elif defined(__FreeBSD__)\n  int val = 0;\n  size_t olen = sizeof(val);\n  if (sysctlbyname(\"vm.overcommit\", &val, &olen, NULL, 0) == 0) {\n    os_overcommit = (val != 0);\n  }\n#else\n  // default: overcommit is true\n#endif\n  return os_overcommit;\n}\n\nvoid _mi_prim_mem_init( mi_os_mem_config_t* config )\n{\n  long psize = sysconf(_SC_PAGESIZE);\n  if (psize > 0) {\n    config->page_size = (size_t)psize;\n    config->alloc_granularity = (size_t)psize;\n    #if defined(_SC_PHYS_PAGES)\n    long pphys = sysconf(_SC_PHYS_PAGES);\n    const size_t psize_in_kib = (size_t)psize / MI_KiB;\n    if (psize_in_kib > 0 && pphys > 0 && (size_t)pphys <= (SIZE_MAX/psize_in_kib)) {\n      config->physical_memory_in_kib = (size_t)pphys * psize_in_kib;\n    }\n    #endif\n  }\n  config->large_page_size = 2*MI_MiB; // TODO: can we query the OS for this?\n  config->has_overcommit = unix_detect_overcommit();\n  config->has_partial_free = true;    // mmap can free in parts\n  config->has_virtual_reserve = true; // todo: check if this true for NetBSD?  (for anonymous mmap with PROT_NONE)\n\n  // disable transparent huge pages for this process?\n  #if (defined(__linux__) || defined(__ANDROID__)) && defined(PR_GET_THP_DISABLE)\n  #if defined(MI_NO_THP)\n  if (true)\n  #else\n  if (!mi_option_is_enabled(mi_option_allow_large_os_pages)) // disable THP also if large OS pages are not allowed in the options\n  #endif\n  {\n    int val = 0;\n    if (prctl(PR_GET_THP_DISABLE, &val, 0, 0, 0) != 0) {\n      // Most likely since distros often come with always/madvise settings.\n      val = 1;\n      // Disabling only for mimalloc process rather than touching system wide settings\n      (void)prctl(PR_SET_THP_DISABLE, &val, 0, 0, 0);\n    }\n  }\n  #endif\n}\n\n\n//---------------------------------------------\n// free\n//---------------------------------------------\n\nint _mi_prim_free(void* addr, size_t size ) {\n  bool err = (munmap(addr, size) == -1);\n  return (err ? errno : 0);\n}\n\n\n//---------------------------------------------\n// mmap\n//---------------------------------------------\n\nstatic int unix_madvise(void* addr, size_t size, int advice) {\n  #if defined(__sun)\n  int res = madvise((caddr_t)addr, size, advice);  // Solaris needs cast (issue #520)\n  #elif defined(__QNX__)\n  int res = posix_madvise(addr, size, advice);\n  #else\n  int res = madvise(addr, size, advice);\n  #endif\n  return (res==0 ? 0 : errno);\n}\n\nstatic void* unix_mmap_prim(void* addr, size_t size, size_t try_alignment, int protect_flags, int flags, int fd) {\n  MI_UNUSED(try_alignment);\n  void* p = NULL;\n  #if defined(MAP_ALIGNED)  // BSD\n  if (addr == NULL && try_alignment > 1 && (try_alignment % _mi_os_page_size()) == 0) {\n    size_t n = mi_bsr(try_alignment);\n    if (((size_t)1 << n) == try_alignment && n >= 12 && n <= 30) {  // alignment is a power of 2 and 4096 <= alignment <= 1GiB\n      p = mmap(addr, size, protect_flags, flags | MAP_ALIGNED(n), fd, 0);\n      if (p==MAP_FAILED || !_mi_is_aligned(p,try_alignment)) {\n        int err = errno;\n        _mi_trace_message(\"unable to directly request aligned OS memory (error: %d (0x%x), size: 0x%zx bytes, alignment: 0x%zx, hint address: %p)\\n\", err, err, size, try_alignment, addr);\n      }\n      if (p!=MAP_FAILED) return p;\n      // fall back to regular mmap\n    }\n  }\n  #elif defined(MAP_ALIGN)  // Solaris\n  if (addr == NULL && try_alignment > 1 && (try_alignment % _mi_os_page_size()) == 0) {\n    p = mmap((void*)try_alignment, size, protect_flags, flags | MAP_ALIGN, fd, 0);  // addr parameter is the required alignment\n    if (p!=MAP_FAILED) return p;\n    // fall back to regular mmap\n  }\n  #endif\n  #if (MI_INTPTR_SIZE >= 8) && !defined(MAP_ALIGNED)\n  // on 64-bit systems, use the virtual address area after 2TiB for 4MiB aligned allocations\n  if (addr == NULL) {\n    void* hint = _mi_os_get_aligned_hint(try_alignment, size);\n    if (hint != NULL) {\n      p = mmap(hint, size, protect_flags, flags, fd, 0);\n      if (p==MAP_FAILED || !_mi_is_aligned(p,try_alignment)) {\n        #if MI_TRACK_ENABLED  // asan sometimes does not instrument errno correctly?\n        int err = 0;\n        #else\n        int err = errno;\n        #endif\n        _mi_trace_message(\"unable to directly request hinted aligned OS memory (error: %d (0x%x), size: 0x%zx bytes, alignment: 0x%zx, hint address: %p)\\n\", err, err, size, try_alignment, hint);\n      }\n      if (p!=MAP_FAILED) return p;\n      // fall back to regular mmap\n    }\n  }\n  #endif\n  // regular mmap\n  p = mmap(addr, size, protect_flags, flags, fd, 0);\n  if (p!=MAP_FAILED) return p;\n  // failed to allocate\n  return NULL;\n}\n\nstatic int unix_mmap_fd(void) {\n  #if defined(VM_MAKE_TAG)\n  // macOS: tracking anonymous page with a specific ID. (All up to 98 are taken officially but LLVM sanitizers had taken 99)\n  int os_tag = (int)mi_option_get(mi_option_os_tag);\n  if (os_tag < 100 || os_tag > 255) { os_tag = 254; }\n  return VM_MAKE_TAG(os_tag);\n  #else\n  return -1;\n  #endif\n}\n\nstatic void* unix_mmap(void* addr, size_t size, size_t try_alignment, int protect_flags, bool large_only, bool allow_large, bool* is_large) {\n  #if !defined(MAP_ANONYMOUS)\n  #define MAP_ANONYMOUS  MAP_ANON\n  #endif\n  #if !defined(MAP_NORESERVE)\n  #define MAP_NORESERVE  0\n  #endif\n  void* p = NULL;\n  const int fd = unix_mmap_fd();\n  int flags = MAP_PRIVATE | MAP_ANONYMOUS;\n  if (_mi_os_has_overcommit()) {\n    flags |= MAP_NORESERVE;\n  }\n  #if defined(PROT_MAX)\n  protect_flags |= PROT_MAX(PROT_READ | PROT_WRITE); // BSD\n  #endif\n  // huge page allocation\n  if (allow_large && (large_only || (_mi_os_use_large_page(size, try_alignment) && mi_option_get(mi_option_allow_large_os_pages) == 1))) {\n    static _Atomic(size_t) large_page_try_ok; // = 0;\n    size_t try_ok = mi_atomic_load_acquire(&large_page_try_ok);\n    if (!large_only && try_ok > 0) {\n      // If the OS is not configured for large OS pages, or the user does not have\n      // enough permission, the `mmap` will always fail (but it might also fail for other reasons).\n      // Therefore, once a large page allocation failed, we don't try again for `large_page_try_ok` times\n      // to avoid too many failing calls to mmap.\n      mi_atomic_cas_strong_acq_rel(&large_page_try_ok, &try_ok, try_ok - 1);\n    }\n    else {\n      int lflags = flags & ~MAP_NORESERVE;  // using NORESERVE on huge pages seems to fail on Linux\n      int lfd = fd;\n      #ifdef MAP_ALIGNED_SUPER\n      lflags |= MAP_ALIGNED_SUPER;\n      #endif\n      #ifdef MAP_HUGETLB\n      lflags |= MAP_HUGETLB;\n      #endif\n      #ifdef MAP_HUGE_1GB\n      static bool mi_huge_pages_available = true;\n      if (large_only && (size % MI_GiB) == 0 && mi_huge_pages_available) {\n        lflags |= MAP_HUGE_1GB;\n      }\n      else\n      #endif\n      {\n        #ifdef MAP_HUGE_2MB\n        lflags |= MAP_HUGE_2MB;\n        #endif\n      }\n      #ifdef VM_FLAGS_SUPERPAGE_SIZE_2MB\n      lfd |= VM_FLAGS_SUPERPAGE_SIZE_2MB;\n      #endif\n      if (large_only || lflags != flags) {\n        // try large OS page allocation\n        *is_large = true;\n        p = unix_mmap_prim(addr, size, try_alignment, protect_flags, lflags, lfd);\n        #ifdef MAP_HUGE_1GB\n        if (p == NULL && (lflags & MAP_HUGE_1GB) == MAP_HUGE_1GB) {\n          mi_huge_pages_available = false; // don't try huge 1GiB pages again\n          if (large_only) {\n            _mi_warning_message(\"unable to allocate huge (1GiB) page, trying large (2MiB) pages instead (errno: %i)\\n\", errno);\n          }\n          lflags = ((lflags & ~MAP_HUGE_1GB) | MAP_HUGE_2MB);\n          p = unix_mmap_prim(addr, size, try_alignment, protect_flags, lflags, lfd);\n        }\n        #endif\n        if (large_only) return p;\n        if (p == NULL) {\n          mi_atomic_store_release(&large_page_try_ok, (size_t)8);  // on error, don't try again for the next N allocations\n        }\n      }\n    }\n  }\n  // regular allocation\n  if (p == NULL) {\n    *is_large = false;\n    p = unix_mmap_prim(addr, size, try_alignment, protect_flags, flags, fd);\n    if (p != NULL) {\n      #if defined(MADV_HUGEPAGE)\n      // Many Linux systems don't allow MAP_HUGETLB but they support instead\n      // transparent huge pages (THP). Generally, it is not required to call `madvise` with MADV_HUGE\n      // though since properly aligned allocations will already use large pages if available\n      // in that case -- in particular for our large regions (in `memory.c`).\n      // However, some systems only allow THP if called with explicit `madvise`, so\n      // when large OS pages are enabled for mimalloc, we call `madvise` anyways.\n      if (allow_large && _mi_os_use_large_page(size, try_alignment)) {\n        if (unix_madvise(p, size, MADV_HUGEPAGE) == 0) {\n          // *is_large = true; // possibly\n        };\n      }\n      #elif defined(__sun)\n      if (allow_large && _mi_os_use_large_page(size, try_alignment)) {\n        struct memcntl_mha cmd = {0};\n        cmd.mha_pagesize = _mi_os_large_page_size();\n        cmd.mha_cmd = MHA_MAPSIZE_VA;\n        if (memcntl((caddr_t)p, size, MC_HAT_ADVISE, (caddr_t)&cmd, 0, 0) == 0) {\n          // *is_large = true; // possibly\n        }\n      }\n      #endif\n    }\n  }\n  return p;\n}\n\n// Note: the `try_alignment` is just a hint and the returned pointer is not guaranteed to be aligned.\nint _mi_prim_alloc(void* hint_addr, size_t size, size_t try_alignment, bool commit, bool allow_large, bool* is_large, bool* is_zero, void** addr) {\n  mi_assert_internal(size > 0 && (size % _mi_os_page_size()) == 0);\n  mi_assert_internal(commit || !allow_large);\n  mi_assert_internal(try_alignment > 0);\n\n  *is_zero = true;\n  int protect_flags = (commit ? (PROT_WRITE | PROT_READ) : PROT_NONE);\n  *addr = unix_mmap(hint_addr, size, try_alignment, protect_flags, false, allow_large, is_large);\n  return (*addr != NULL ? 0 : errno);\n}\n\n\n//---------------------------------------------\n// Commit/Reset\n//---------------------------------------------\n\nstatic void unix_mprotect_hint(int err) {\n  #if defined(__linux__) && (MI_SECURE>=2) // guard page around every mimalloc page\n  if (err == ENOMEM) {\n    _mi_warning_message(\"The next warning may be caused by a low memory map limit.\\n\"\n                        \"  On Linux this is controlled by the vm.max_map_count -- maybe increase it?\\n\"\n                        \"  For example: sudo sysctl -w vm.max_map_count=262144\\n\");\n  }\n  #else\n  MI_UNUSED(err);\n  #endif\n}\n\nint _mi_prim_commit(void* start, size_t size, bool* is_zero) {\n  // commit: ensure we can access the area\n  // note: we may think that *is_zero can be true since the memory\n  // was either from mmap PROT_NONE, or from decommit MADV_DONTNEED, but\n  // we sometimes call commit on a range with still partially committed\n  // memory and `mprotect` does not zero the range.\n  *is_zero = false;\n  int err = mprotect(start, size, (PROT_READ | PROT_WRITE));\n  if (err != 0) {\n    err = errno;\n    unix_mprotect_hint(err);\n  }\n  return err;\n}\n\nint _mi_prim_decommit(void* start, size_t size, bool* needs_recommit) {\n  int err = 0;\n  // decommit: use MADV_DONTNEED as it decreases rss immediately (unlike MADV_FREE)\n  err = unix_madvise(start, size, MADV_DONTNEED);\n  #if !MI_DEBUG && !MI_SECURE\n    *needs_recommit = false;\n  #else\n    *needs_recommit = true;\n    mprotect(start, size, PROT_NONE);\n  #endif\n  /*\n  // decommit: use mmap with MAP_FIXED and PROT_NONE to discard the existing memory (and reduce rss)\n  *needs_recommit = true;\n  const int fd = unix_mmap_fd();\n  void* p = mmap(start, size, PROT_NONE, (MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE), fd, 0);\n  if (p != start) { err = errno; }\n  */\n  return err;\n}\n\nint _mi_prim_reset(void* start, size_t size) {\n  // We try to use `MADV_FREE` as that is the fastest. A drawback though is that it\n  // will not reduce the `rss` stats in tools like `top` even though the memory is available\n  // to other processes. With the default `MIMALLOC_PURGE_DECOMMITS=1` we ensure that by\n  // default `MADV_DONTNEED` is used though.\n  #if defined(MADV_FREE)\n  static _Atomic(size_t) advice = MI_ATOMIC_VAR_INIT(MADV_FREE);\n  int oadvice = (int)mi_atomic_load_relaxed(&advice);\n  int err;\n  while ((err = unix_madvise(start, size, oadvice)) != 0 && errno == EAGAIN) { errno = 0;  };\n  if (err != 0 && errno == EINVAL && oadvice == MADV_FREE) {\n    // if MADV_FREE is not supported, fall back to MADV_DONTNEED from now on\n    mi_atomic_store_release(&advice, (size_t)MADV_DONTNEED);\n    err = unix_madvise(start, size, MADV_DONTNEED);\n  }\n  #else\n  int err = unix_madvise(start, size, MADV_DONTNEED);\n  #endif\n  return err;\n}\n\nint _mi_prim_protect(void* start, size_t size, bool protect) {\n  int err = mprotect(start, size, protect ? PROT_NONE : (PROT_READ | PROT_WRITE));\n  if (err != 0) { err = errno; }\n  unix_mprotect_hint(err);\n  return err;\n}\n\n\n\n//---------------------------------------------\n// Huge page allocation\n//---------------------------------------------\n\n#if (MI_INTPTR_SIZE >= 8) && !defined(__HAIKU__) && !defined(__CYGWIN__)\n\n#ifndef MPOL_PREFERRED\n#define MPOL_PREFERRED 1\n#endif\n\n#if defined(MI_HAS_SYSCALL_H) && defined(SYS_mbind)\nstatic long mi_prim_mbind(void* start, unsigned long len, unsigned long mode, const unsigned long* nmask, unsigned long maxnode, unsigned flags) {\n  return syscall(SYS_mbind, start, len, mode, nmask, maxnode, flags);\n}\n#else\nstatic long mi_prim_mbind(void* start, unsigned long len, unsigned long mode, const unsigned long* nmask, unsigned long maxnode, unsigned flags) {\n  MI_UNUSED(start); MI_UNUSED(len); MI_UNUSED(mode); MI_UNUSED(nmask); MI_UNUSED(maxnode); MI_UNUSED(flags);\n  return 0;\n}\n#endif\n\nint _mi_prim_alloc_huge_os_pages(void* hint_addr, size_t size, int numa_node, bool* is_zero, void** addr) {\n  bool is_large = true;\n  *is_zero = true;\n  *addr = unix_mmap(hint_addr, size, MI_SEGMENT_SIZE, PROT_READ | PROT_WRITE, true, true, &is_large);\n  if (*addr != NULL && numa_node >= 0 && numa_node < 8*MI_INTPTR_SIZE) { // at most 64 nodes\n    unsigned long numa_mask = (1UL << numa_node);\n    // TODO: does `mbind` work correctly for huge OS pages? should we\n    // use `set_mempolicy` before calling mmap instead?\n    // see: <https://lkml.org/lkml/2017/2/9/875>\n    long err = mi_prim_mbind(*addr, size, MPOL_PREFERRED, &numa_mask, 8*MI_INTPTR_SIZE, 0);\n    if (err != 0) {\n      err = errno;\n      _mi_warning_message(\"failed to bind huge (1GiB) pages to numa node %d (error: %d (0x%x))\\n\", numa_node, err, err);\n    }\n  }\n  return (*addr != NULL ? 0 : errno);\n}\n\n#else\n\nint _mi_prim_alloc_huge_os_pages(void* hint_addr, size_t size, int numa_node, bool* is_zero, void** addr) {\n  MI_UNUSED(hint_addr); MI_UNUSED(size); MI_UNUSED(numa_node);\n  *is_zero = false;\n  *addr = NULL;\n  return ENOMEM;\n}\n\n#endif\n\n//---------------------------------------------\n// NUMA nodes\n//---------------------------------------------\n\n#if defined(__linux__)\n\nsize_t _mi_prim_numa_node(void) {\n  #if defined(MI_HAS_SYSCALL_H) && defined(SYS_getcpu)\n    unsigned long node = 0;\n    unsigned long ncpu = 0;\n    long err = syscall(SYS_getcpu, &ncpu, &node, NULL);\n    if (err != 0) return 0;\n    return node;\n  #else\n    return 0;\n  #endif\n}\n\nsize_t _mi_prim_numa_node_count(void) {\n  char buf[128];\n  unsigned node = 0;\n  for(node = 0; node < 256; node++) {\n    // enumerate node entries -- todo: it there a more efficient way to do this? (but ensure there is no allocation)\n    _mi_snprintf(buf, 127, \"/sys/devices/system/node/node%u\", node + 1);\n    if (mi_prim_access(buf,R_OK) != 0) break;\n  }\n  return (node+1);\n}\n\n#elif defined(__FreeBSD__) && __FreeBSD_version >= 1200000\n\nsize_t _mi_prim_numa_node(void) {\n  domainset_t dom;\n  size_t node;\n  int policy;\n  if (cpuset_getdomain(CPU_LEVEL_CPUSET, CPU_WHICH_PID, -1, sizeof(dom), &dom, &policy) == -1) return 0ul;\n  for (node = 0; node < MAXMEMDOM; node++) {\n    if (DOMAINSET_ISSET(node, &dom)) return node;\n  }\n  return 0ul;\n}\n\nsize_t _mi_prim_numa_node_count(void) {\n  size_t ndomains = 0;\n  size_t len = sizeof(ndomains);\n  if (sysctlbyname(\"vm.ndomains\", &ndomains, &len, NULL, 0) == -1) return 0ul;\n  return ndomains;\n}\n\n#elif defined(__DragonFly__)\n\nsize_t _mi_prim_numa_node(void) {\n  // TODO: DragonFly does not seem to provide any userland means to get this information.\n  return 0ul;\n}\n\nsize_t _mi_prim_numa_node_count(void) {\n  size_t ncpus = 0, nvirtcoresperphys = 0;\n  size_t len = sizeof(size_t);\n  if (sysctlbyname(\"hw.ncpu\", &ncpus, &len, NULL, 0) == -1) return 0ul;\n  if (sysctlbyname(\"hw.cpu_topology_ht_ids\", &nvirtcoresperphys, &len, NULL, 0) == -1) return 0ul;\n  return nvirtcoresperphys * ncpus;\n}\n\n#else\n\nsize_t _mi_prim_numa_node(void) {\n  return 0;\n}\n\nsize_t _mi_prim_numa_node_count(void) {\n  return 1;\n}\n\n#endif\n\n// ----------------------------------------------------------------\n// Clock\n// ----------------------------------------------------------------\n\n#include <time.h>\n\n#if defined(CLOCK_REALTIME) || defined(CLOCK_MONOTONIC)\n\nmi_msecs_t _mi_prim_clock_now(void) {\n  struct timespec t;\n  #ifdef CLOCK_MONOTONIC\n  clock_gettime(CLOCK_MONOTONIC, &t);\n  #else\n  clock_gettime(CLOCK_REALTIME, &t);\n  #endif\n  return ((mi_msecs_t)t.tv_sec * 1000) + ((mi_msecs_t)t.tv_nsec / 1000000);\n}\n\n#else\n\n// low resolution timer\nmi_msecs_t _mi_prim_clock_now(void) {\n  #if !defined(CLOCKS_PER_SEC) || (CLOCKS_PER_SEC == 1000) || (CLOCKS_PER_SEC == 0)\n  return (mi_msecs_t)clock();\n  #elif (CLOCKS_PER_SEC < 1000)\n  return (mi_msecs_t)clock() * (1000 / (mi_msecs_t)CLOCKS_PER_SEC);\n  #else\n  return (mi_msecs_t)clock() / ((mi_msecs_t)CLOCKS_PER_SEC / 1000);\n  #endif\n}\n\n#endif\n\n\n\n\n//----------------------------------------------------------------\n// Process info\n//----------------------------------------------------------------\n\n#if defined(__unix__) || defined(__unix) || defined(unix) || defined(__APPLE__) || defined(__HAIKU__)\n#include <stdio.h>\n#include <unistd.h>\n#include <sys/resource.h>\n\n#if defined(__APPLE__)\n#include <mach/mach.h>\n#endif\n\n#if defined(__HAIKU__)\n#include <kernel/OS.h>\n#endif\n\nstatic mi_msecs_t timeval_secs(const struct timeval* tv) {\n  return ((mi_msecs_t)tv->tv_sec * 1000L) + ((mi_msecs_t)tv->tv_usec / 1000L);\n}\n\nvoid _mi_prim_process_info(mi_process_info_t* pinfo)\n{\n  struct rusage rusage;\n  getrusage(RUSAGE_SELF, &rusage);\n  pinfo->utime = timeval_secs(&rusage.ru_utime);\n  pinfo->stime = timeval_secs(&rusage.ru_stime);\n#if !defined(__HAIKU__)\n  pinfo->page_faults = rusage.ru_majflt;\n#endif\n#if defined(__HAIKU__)\n  // Haiku does not have (yet?) a way to\n  // get these stats per process\n  thread_info tid;\n  area_info mem;\n  ssize_t c;\n  get_thread_info(find_thread(0), &tid);\n  while (get_next_area_info(tid.team, &c, &mem) == B_OK) {\n    pinfo->peak_rss += mem.ram_size;\n  }\n  pinfo->page_faults = 0;\n#elif defined(__APPLE__)\n  pinfo->peak_rss = rusage.ru_maxrss;         // macos reports in bytes\n  #ifdef MACH_TASK_BASIC_INFO\n  struct mach_task_basic_info info;\n  mach_msg_type_number_t infoCount = MACH_TASK_BASIC_INFO_COUNT;\n  if (task_info(mach_task_self(), MACH_TASK_BASIC_INFO, (task_info_t)&info, &infoCount) == KERN_SUCCESS) {\n    pinfo->current_rss = (size_t)info.resident_size;\n  }\n  #else\n  struct task_basic_info info;\n  mach_msg_type_number_t infoCount = TASK_BASIC_INFO_COUNT;\n  if (task_info(mach_task_self(), TASK_BASIC_INFO, (task_info_t)&info, &infoCount) == KERN_SUCCESS) {\n    pinfo->current_rss = (size_t)info.resident_size;\n  }\n  #endif\n#else\n  pinfo->peak_rss = rusage.ru_maxrss * 1024;  // Linux/BSD report in KiB\n#endif\n  // use defaults for commit\n}\n\n#else\n\n#ifndef __wasi__\n// WebAssembly instances are not processes\n#pragma message(\"define a way to get process info\")\n#endif\n\nvoid _mi_prim_process_info(mi_process_info_t* pinfo)\n{\n  // use defaults\n  MI_UNUSED(pinfo);\n}\n\n#endif\n\n\n//----------------------------------------------------------------\n// Output\n//----------------------------------------------------------------\n\nvoid _mi_prim_out_stderr( const char* msg ) {\n  fputs(msg,stderr);\n}\n\n\n//----------------------------------------------------------------\n// Environment\n//----------------------------------------------------------------\n\n#if !defined(MI_USE_ENVIRON) || (MI_USE_ENVIRON!=0)\n// On Posix systemsr use `environ` to access environment variables\n// even before the C runtime is initialized.\n#if defined(__APPLE__) && defined(__has_include) && __has_include(<crt_externs.h>)\n#include <crt_externs.h>\nstatic char** mi_get_environ(void) {\n  return (*_NSGetEnviron());\n}\n#else\nextern char** environ;\nstatic char** mi_get_environ(void) {\n  return environ;\n}\n#endif\nbool _mi_prim_getenv(const char* name, char* result, size_t result_size) {\n  if (name==NULL) return false;\n  const size_t len = _mi_strlen(name);\n  if (len == 0) return false;\n  char** env = mi_get_environ();\n  if (env == NULL) return false;\n  // compare up to 10000 entries\n  for (int i = 0; i < 10000 && env[i] != NULL; i++) {\n    const char* s = env[i];\n    if (_mi_strnicmp(name, s, len) == 0 && s[len] == '=') { // case insensitive\n      // found it\n      _mi_strlcpy(result, s + len + 1, result_size);\n      return true;\n    }\n  }\n  return false;\n}\n#else\n// fallback: use standard C `getenv` but this cannot be used while initializing the C runtime\nbool _mi_prim_getenv(const char* name, char* result, size_t result_size) {\n  // cannot call getenv() when still initializing the C runtime.\n  if (_mi_preloading()) return false;\n  const char* s = getenv(name);\n  if (s == NULL) {\n    // we check the upper case name too.\n    char buf[64+1];\n    size_t len = _mi_strnlen(name,sizeof(buf)-1);\n    for (size_t i = 0; i < len; i++) {\n      buf[i] = _mi_toupper(name[i]);\n    }\n    buf[len] = 0;\n    s = getenv(buf);\n  }\n  if (s == NULL || _mi_strnlen(s,result_size) >= result_size)  return false;\n  _mi_strlcpy(result, s, result_size);\n  return true;\n}\n#endif  // !MI_USE_ENVIRON\n\n\n//----------------------------------------------------------------\n// Random\n//----------------------------------------------------------------\n\n#if defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_15) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_15)\n#include <CommonCrypto/CommonCryptoError.h>\n#include <CommonCrypto/CommonRandom.h>\n\nbool _mi_prim_random_buf(void* buf, size_t buf_len) {\n  // We prefer CCRandomGenerateBytes as it returns an error code while arc4random_buf\n  // may fail silently on macOS. See PR #390, and <https://opensource.apple.com/source/Libc/Libc-1439.40.11/gen/FreeBSD/arc4random.c.auto.html>\n  return (CCRandomGenerateBytes(buf, buf_len) == kCCSuccess);\n}\n\n#elif defined(__ANDROID__) || defined(__DragonFly__) || \\\n      defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \\\n      defined(__sun) || \\\n      (defined(__APPLE__) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7))\n\nbool _mi_prim_random_buf(void* buf, size_t buf_len) {\n  arc4random_buf(buf, buf_len);\n  return true;\n}\n\n#elif defined(__APPLE__) || defined(__linux__) || defined(__HAIKU__)   // also for old apple versions < 10.7 (issue #829)\n\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <errno.h>\n\nbool _mi_prim_random_buf(void* buf, size_t buf_len) {\n  // Modern Linux provides `getrandom` but different distributions either use `sys/random.h` or `linux/random.h`\n  // and for the latter the actual `getrandom` call is not always defined.\n  // (see <https://stackoverflow.com/questions/45237324/why-doesnt-getrandom-compile>)\n  // We therefore use a syscall directly and fall back dynamically to /dev/urandom when needed.\n  #if defined(MI_HAS_SYSCALL_H) && defined(SYS_getrandom)\n    #ifndef GRND_NONBLOCK\n    #define GRND_NONBLOCK (1)\n    #endif\n    static _Atomic(uintptr_t) no_getrandom; // = 0\n    if (mi_atomic_load_acquire(&no_getrandom)==0) {\n      ssize_t ret = syscall(SYS_getrandom, buf, buf_len, GRND_NONBLOCK);\n      if (ret >= 0) return (buf_len == (size_t)ret);\n      if (errno != ENOSYS) return false;\n      mi_atomic_store_release(&no_getrandom, (uintptr_t)1); // don't call again, and fall back to /dev/urandom\n    }\n  #endif\n  int flags = O_RDONLY;\n  #if defined(O_CLOEXEC)\n  flags |= O_CLOEXEC;\n  #endif\n  int fd = mi_prim_open(\"/dev/urandom\", flags);\n  if (fd < 0) return false;\n  size_t count = 0;\n  while(count < buf_len) {\n    ssize_t ret = mi_prim_read(fd, (char*)buf + count, buf_len - count);\n    if (ret<=0) {\n      if (errno!=EAGAIN && errno!=EINTR) break;\n    }\n    else {\n      count += ret;\n    }\n  }\n  mi_prim_close(fd);\n  return (count==buf_len);\n}\n\n#else\n\nbool _mi_prim_random_buf(void* buf, size_t buf_len) {\n  return false;\n}\n\n#endif\n\n\n//----------------------------------------------------------------\n// Thread init/done\n//----------------------------------------------------------------\n\n#if defined(MI_USE_PTHREADS)\n\n// use pthread local storage keys to detect thread ending\n// (and used with MI_TLS_PTHREADS for the default heap)\npthread_key_t _mi_heap_default_key = (pthread_key_t)(-1);\n\nstatic void mi_pthread_done(void* value) {\n  if (value!=NULL) {\n    _mi_thread_done((mi_heap_t*)value);\n  }\n}\n\nvoid _mi_prim_thread_init_auto_done(void) {\n  mi_assert_internal(_mi_heap_default_key == (pthread_key_t)(-1));\n  pthread_key_create(&_mi_heap_default_key, &mi_pthread_done);\n}\n\nvoid _mi_prim_thread_done_auto_done(void) {\n  if (_mi_heap_default_key != (pthread_key_t)(-1)) {  // do not leak the key, see issue #809\n    pthread_key_delete(_mi_heap_default_key);\n  }\n}\n\nvoid _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {\n  if (_mi_heap_default_key != (pthread_key_t)(-1)) {  // can happen during recursive invocation on freeBSD\n    pthread_setspecific(_mi_heap_default_key, heap);\n  }\n}\n\n#else\n\nvoid _mi_prim_thread_init_auto_done(void) {\n  // nothing\n}\n\nvoid _mi_prim_thread_done_auto_done(void) {\n  // nothing\n}\n\nvoid _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {\n  MI_UNUSED(heap);\n}\n\n#endif\n"
  },
  {
    "path": "third-party/mimalloc/src/prim/wasi/prim.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2023, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n// This file is included in `src/prim/prim.c`\n\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"mimalloc/prim.h\"\n\n#include <stdio.h>   // fputs\n#include <stdlib.h>  // getenv\n\n//---------------------------------------------\n// Initialize\n//---------------------------------------------\n\nvoid _mi_prim_mem_init( mi_os_mem_config_t* config ) {\n  config->page_size = 64*MI_KiB; // WebAssembly has a fixed page size: 64KiB\n  config->alloc_granularity = 16;\n  config->has_overcommit = false;\n  config->has_partial_free = false;\n  config->has_virtual_reserve = false;\n}\n\n//---------------------------------------------\n// Free\n//---------------------------------------------\n\nint _mi_prim_free(void* addr, size_t size ) {\n  MI_UNUSED(addr); MI_UNUSED(size);\n  // wasi heap cannot be shrunk\n  return 0;\n}\n\n\n//---------------------------------------------\n// Allocation: sbrk or memory_grow\n//---------------------------------------------\n\n#if defined(MI_USE_SBRK)\n  #include <unistd.h>  // for sbrk\n\n  static void* mi_memory_grow( size_t size ) {\n    void* p = sbrk(size);\n    if (p == (void*)(-1)) return NULL;\n    #if !defined(__wasi__) // on wasi this is always zero initialized already (?)\n    memset(p,0,size);\n    #endif\n    return p;\n  }\n#elif defined(__wasi__)\n  static void* mi_memory_grow( size_t size ) {\n    size_t base = (size > 0 ? __builtin_wasm_memory_grow(0,_mi_divide_up(size, _mi_os_page_size()))\n                            : __builtin_wasm_memory_size(0));\n    if (base == SIZE_MAX) return NULL;\n    return (void*)(base * _mi_os_page_size());\n  }\n#endif\n\n#if defined(MI_USE_PTHREADS)\nstatic pthread_mutex_t mi_heap_grow_mutex = PTHREAD_MUTEX_INITIALIZER;\n#endif\n\nstatic void* mi_prim_mem_grow(size_t size, size_t try_alignment) {\n  void* p = NULL;\n  if (try_alignment <= 1) {\n    // `sbrk` is not thread safe in general so try to protect it (we could skip this on WASM but leave it in for now)\n    #if defined(MI_USE_PTHREADS)\n    pthread_mutex_lock(&mi_heap_grow_mutex);\n    #endif\n    p = mi_memory_grow(size);\n    #if defined(MI_USE_PTHREADS)\n    pthread_mutex_unlock(&mi_heap_grow_mutex);\n    #endif\n  }\n  else {\n    void* base = NULL;\n    size_t alloc_size = 0;\n    // to allocate aligned use a lock to try to avoid thread interaction\n    // between getting the current size and actual allocation\n    // (also, `sbrk` is not thread safe in general)\n    #if defined(MI_USE_PTHREADS)\n    pthread_mutex_lock(&mi_heap_grow_mutex);\n    #endif\n    {\n      void* current = mi_memory_grow(0);  // get current size\n      if (current != NULL) {\n        void* aligned_current = mi_align_up_ptr(current, try_alignment);  // and align from there to minimize wasted space\n        alloc_size = _mi_align_up( ((uint8_t*)aligned_current - (uint8_t*)current) + size, _mi_os_page_size());\n        base = mi_memory_grow(alloc_size);\n      }\n    }\n    #if defined(MI_USE_PTHREADS)\n    pthread_mutex_unlock(&mi_heap_grow_mutex);\n    #endif\n    if (base != NULL) {\n      p = mi_align_up_ptr(base, try_alignment);\n      if ((uint8_t*)p + size > (uint8_t*)base + alloc_size) {\n        // another thread used wasm_memory_grow/sbrk in-between and we do not have enough\n        // space after alignment. Give up (and waste the space as we cannot shrink :-( )\n        // (in `mi_os_mem_alloc_aligned` this will fall back to overallocation to align)\n        p = NULL;\n      }\n    }\n  }\n  /*\n  if (p == NULL) {\n    _mi_warning_message(\"unable to allocate sbrk/wasm_memory_grow OS memory (%zu bytes, %zu alignment)\\n\", size, try_alignment);\n    errno = ENOMEM;\n    return NULL;\n  }\n  */\n  mi_assert_internal( p == NULL || try_alignment == 0 || (uintptr_t)p % try_alignment == 0 );\n  return p;\n}\n\n// Note: the `try_alignment` is just a hint and the returned pointer is not guaranteed to be aligned.\nint _mi_prim_alloc(void* hint_addr, size_t size, size_t try_alignment, bool commit, bool allow_large, bool* is_large, bool* is_zero, void** addr) {\n  MI_UNUSED(allow_large); MI_UNUSED(commit); MI_UNUSED(hint_addr);\n  *is_large = false;\n  *is_zero = false;\n  *addr = mi_prim_mem_grow(size, try_alignment);\n  return (*addr != NULL ? 0 : ENOMEM);\n}\n\n\n//---------------------------------------------\n// Commit/Reset/Protect\n//---------------------------------------------\n\nint _mi_prim_commit(void* addr, size_t size, bool* is_zero) {\n  MI_UNUSED(addr); MI_UNUSED(size);\n  *is_zero = false;\n  return 0;\n}\n\nint _mi_prim_decommit(void* addr, size_t size, bool* needs_recommit) {\n  MI_UNUSED(addr); MI_UNUSED(size);\n  *needs_recommit = false;\n  return 0;\n}\n\nint _mi_prim_reset(void* addr, size_t size) {\n  MI_UNUSED(addr); MI_UNUSED(size);\n  return 0;\n}\n\nint _mi_prim_protect(void* addr, size_t size, bool protect) {\n  MI_UNUSED(addr); MI_UNUSED(size); MI_UNUSED(protect);\n  return 0;\n}\n\n\n//---------------------------------------------\n// Huge pages and NUMA nodes\n//---------------------------------------------\n\nint _mi_prim_alloc_huge_os_pages(void* hint_addr, size_t size, int numa_node, bool* is_zero, void** addr) {\n  MI_UNUSED(hint_addr); MI_UNUSED(size); MI_UNUSED(numa_node);\n  *is_zero = true;\n  *addr = NULL;\n  return ENOSYS;\n}\n\nsize_t _mi_prim_numa_node(void) {\n  return 0;\n}\n\nsize_t _mi_prim_numa_node_count(void) {\n  return 1;\n}\n\n\n//----------------------------------------------------------------\n// Clock\n//----------------------------------------------------------------\n\n#include <time.h>\n\n#if defined(CLOCK_REALTIME) || defined(CLOCK_MONOTONIC)\n\nmi_msecs_t _mi_prim_clock_now(void) {\n  struct timespec t;\n  #ifdef CLOCK_MONOTONIC\n  clock_gettime(CLOCK_MONOTONIC, &t);\n  #else\n  clock_gettime(CLOCK_REALTIME, &t);\n  #endif\n  return ((mi_msecs_t)t.tv_sec * 1000) + ((mi_msecs_t)t.tv_nsec / 1000000);\n}\n\n#else\n\n// low resolution timer\nmi_msecs_t _mi_prim_clock_now(void) {\n  #if !defined(CLOCKS_PER_SEC) || (CLOCKS_PER_SEC == 1000) || (CLOCKS_PER_SEC == 0)\n  return (mi_msecs_t)clock();\n  #elif (CLOCKS_PER_SEC < 1000)\n  return (mi_msecs_t)clock() * (1000 / (mi_msecs_t)CLOCKS_PER_SEC);\n  #else\n  return (mi_msecs_t)clock() / ((mi_msecs_t)CLOCKS_PER_SEC / 1000);\n  #endif\n}\n\n#endif\n\n\n//----------------------------------------------------------------\n// Process info\n//----------------------------------------------------------------\n\nvoid _mi_prim_process_info(mi_process_info_t* pinfo)\n{\n  // use defaults\n  MI_UNUSED(pinfo);\n}\n\n\n//----------------------------------------------------------------\n// Output\n//----------------------------------------------------------------\n\nvoid _mi_prim_out_stderr( const char* msg ) {\n  fputs(msg,stderr);\n}\n\n\n//----------------------------------------------------------------\n// Environment\n//----------------------------------------------------------------\n\nbool _mi_prim_getenv(const char* name, char* result, size_t result_size) {\n  // cannot call getenv() when still initializing the C runtime.\n  if (_mi_preloading()) return false;\n  const char* s = getenv(name);\n  if (s == NULL) {\n    // we check the upper case name too.\n    char buf[64+1];\n    size_t len = _mi_strnlen(name,sizeof(buf)-1);\n    for (size_t i = 0; i < len; i++) {\n      buf[i] = _mi_toupper(name[i]);\n    }\n    buf[len] = 0;\n    s = getenv(buf);\n  }\n  if (s == NULL || _mi_strnlen(s,result_size) >= result_size)  return false;\n  _mi_strlcpy(result, s, result_size);\n  return true;\n}\n\n\n//----------------------------------------------------------------\n// Random\n//----------------------------------------------------------------\n\nbool _mi_prim_random_buf(void* buf, size_t buf_len) {\n  return false;\n}\n\n\n//----------------------------------------------------------------\n// Thread init/done\n//----------------------------------------------------------------\n\nvoid _mi_prim_thread_init_auto_done(void) {\n  // nothing\n}\n\nvoid _mi_prim_thread_done_auto_done(void) {\n  // nothing\n}\n\nvoid _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {\n  MI_UNUSED(heap);\n}\n"
  },
  {
    "path": "third-party/mimalloc/src/prim/windows/etw-mimalloc.wprp",
    "content": "<WindowsPerformanceRecorder Version=\"1.0\">\n  <Profiles>\n    <SystemCollector Id=\"WPR_initiated_WprApp_WPR_System_Collector\" Name=\"WPR_initiated_WprApp_WPR System Collector\">\n      <BufferSize Value=\"1024\" />\n      <Buffers Value=\"100\" />\n    </SystemCollector>\n    <EventCollector Id=\"Mimalloc_Collector\" Name=\"Mimalloc Collector\">\n      <BufferSize Value=\"1024\" />\n      <Buffers Value=\"100\" />\n    </EventCollector>\n    <SystemProvider Id=\"WPR_initiated_WprApp_WPR_System_Collector_Provider\">\n      <Keywords>\n        <Keyword Value=\"Loader\" />\n      </Keywords>\n    </SystemProvider>\n    <EventProvider Id=\"MimallocEventProvider\" Name=\"138f4dbb-ee04-4899-aa0a-572ad4475779\" NonPagedMemory=\"true\" Stack=\"true\">\n      <EventFilters FilterIn=\"true\">\n        <EventId Value=\"100\" />\n        <EventId Value=\"101\" />\n      </EventFilters>\n    </EventProvider>\n    <Profile Id=\"CustomHeap.Verbose.File\" Name=\"CustomHeap\" Description=\"RunningProfile:CustomHeap.Verbose.File\" LoggingMode=\"File\" DetailLevel=\"Verbose\">\n      <ProblemCategories>\n        <ProblemCategory Value=\"Resource Analysis\" />\n      </ProblemCategories>\n      <Collectors>\n        <SystemCollectorId Value=\"WPR_initiated_WprApp_WPR_System_Collector\">\n          <SystemProviderId Value=\"WPR_initiated_WprApp_WPR_System_Collector_Provider\" />\n        </SystemCollectorId>\n        <EventCollectorId Value=\"Mimalloc_Collector\">\n          <EventProviders>\n            <EventProviderId Value=\"MimallocEventProvider\" >\n              <Keywords>\n                <Keyword Value=\"100\"/>\n                <Keyword Value=\"101\"/>\n              </Keywords>\n            </EventProviderId>\n          </EventProviders>\n        </EventCollectorId>\n      </Collectors>\n      <TraceMergeProperties>\n        <TraceMergeProperty Id=\"BaseVerboseTraceMergeProperties\" Name=\"BaseTraceMergeProperties\">\n          <DeletePreMergedTraceFiles Value=\"true\" />\n          <FileCompression Value=\"false\" />\n          <InjectOnly Value=\"false\" />\n          <SkipMerge Value=\"false\" />\n          <CustomEvents>\n            <CustomEvent Value=\"ImageId\" />\n            <CustomEvent Value=\"BuildInfo\" />\n            <CustomEvent Value=\"VolumeMapping\" />\n            <CustomEvent Value=\"EventMetadata\" />\n            <CustomEvent Value=\"PerfTrackMetadata\" />\n            <CustomEvent Value=\"WinSAT\" />\n            <CustomEvent Value=\"NetworkInterface\" />\n          </CustomEvents>\n        </TraceMergeProperty>\n      </TraceMergeProperties>\n    </Profile>\n  </Profiles>\n</WindowsPerformanceRecorder>\n\n"
  },
  {
    "path": "third-party/mimalloc/src/prim/windows/etw.h",
    "content": "//**********************************************************************`\n//* This is an include file generated by Message Compiler.             *`\n//*                                                                    *`\n//* Copyright (c) Microsoft Corporation. All Rights Reserved.          *`\n//**********************************************************************`\n#pragma once\n\n//*****************************************************************************\n//\n// Notes on the ETW event code generated by MC:\n//\n// - Structures and arrays of structures are treated as an opaque binary blob.\n//   The caller is responsible for packing the data for the structure into a\n//   single region of memory, with no padding between values. The macro will\n//   have an extra parameter for the length of the blob.\n// - Arrays of nul-terminated strings must be packed by the caller into a\n//   single binary blob containing the correct number of strings, with a nul\n//   after each string. The size of the blob is specified in characters, and\n//   includes the final nul.\n// - Arrays of SID are treated as a single binary blob. The caller is\n//   responsible for packing the SID values into a single region of memory with\n//   no padding.\n// - The length attribute on the data element in the manifest is significant\n//   for values with intype win:UnicodeString, win:AnsiString, or win:Binary.\n//   The length attribute must be specified for win:Binary, and is optional for\n//   win:UnicodeString and win:AnsiString (if no length is given, the strings\n//   are assumed to be nul-terminated). For win:UnicodeString, the length is\n//   measured in characters, not bytes.\n// - For an array of win:UnicodeString, win:AnsiString, or win:Binary, the\n//   length attribute applies to every value in the array, so every value in\n//   the array must have the same length. The values in the array are provided\n//   to the macro via a single pointer -- the caller is responsible for packing\n//   all of the values into a single region of memory with no padding between\n//   values.\n// - Values of type win:CountedUnicodeString, win:CountedAnsiString, and\n//   win:CountedBinary can be generated and collected on Vista or later.\n//   However, they may not decode properly without the Windows 10 2018 Fall\n//   Update.\n// - Arrays of type win:CountedUnicodeString, win:CountedAnsiString, and\n//   win:CountedBinary must be packed by the caller into a single region of\n//   memory. The format for each item is a UINT16 byte-count followed by that\n//   many bytes of data. When providing the array to the generated macro, you\n//   must provide the total size of the packed array data, including the UINT16\n//   sizes for each item. In the case of win:CountedUnicodeString, the data\n//   size is specified in WCHAR (16-bit) units. In the case of\n//   win:CountedAnsiString and win:CountedBinary, the data size is specified in\n//   bytes.\n//\n//*****************************************************************************\n\n#include <wmistr.h>\n#include <evntrace.h>\n#include <evntprov.h>\n\n#ifndef ETW_INLINE\n  #ifdef _ETW_KM_\n    // In kernel mode, save stack space by never inlining templates.\n    #define ETW_INLINE DECLSPEC_NOINLINE __inline\n  #else\n    // In user mode, save code size by inlining templates as appropriate.\n    #define ETW_INLINE __inline\n  #endif\n#endif // ETW_INLINE\n\n#if defined(__cplusplus)\nextern \"C\" {\n#endif\n\n//\n// MCGEN_DISABLE_PROVIDER_CODE_GENERATION macro:\n// Define this macro to have the compiler skip the generated functions in this\n// header.\n//\n#ifndef MCGEN_DISABLE_PROVIDER_CODE_GENERATION\n\n//\n// MCGEN_USE_KERNEL_MODE_APIS macro:\n// Controls whether the generated code uses kernel-mode or user-mode APIs.\n// - Set to 0 to use Windows user-mode APIs such as EventRegister.\n// - Set to 1 to use Windows kernel-mode APIs such as EtwRegister.\n// Default is based on whether the _ETW_KM_ macro is defined (i.e. by wdm.h).\n// Note that the APIs can also be overridden directly, e.g. by setting the\n// MCGEN_EVENTWRITETRANSFER or MCGEN_EVENTREGISTER macros.\n//\n#ifndef MCGEN_USE_KERNEL_MODE_APIS\n  #ifdef _ETW_KM_\n    #define MCGEN_USE_KERNEL_MODE_APIS 1\n  #else\n    #define MCGEN_USE_KERNEL_MODE_APIS 0\n  #endif\n#endif // MCGEN_USE_KERNEL_MODE_APIS\n\n//\n// MCGEN_HAVE_EVENTSETINFORMATION macro:\n// Controls how McGenEventSetInformation uses the EventSetInformation API.\n// - Set to 0 to disable the use of EventSetInformation\n//   (McGenEventSetInformation will always return an error).\n// - Set to 1 to directly invoke MCGEN_EVENTSETINFORMATION.\n// - Set to 2 to to locate EventSetInformation at runtime via GetProcAddress\n//   (user-mode) or MmGetSystemRoutineAddress (kernel-mode).\n// Default is determined as follows:\n// - If MCGEN_EVENTSETINFORMATION has been customized, set to 1\n//   (i.e. use MCGEN_EVENTSETINFORMATION).\n// - Else if the target OS version has EventSetInformation, set to 1\n//   (i.e. use MCGEN_EVENTSETINFORMATION).\n// - Else set to 2 (i.e. try to dynamically locate EventSetInformation).\n// Note that an McGenEventSetInformation function will only be generated if one\n// or more provider in a manifest has provider traits.\n//\n#ifndef MCGEN_HAVE_EVENTSETINFORMATION\n  #ifdef MCGEN_EVENTSETINFORMATION             // if MCGEN_EVENTSETINFORMATION has been customized,\n    #define MCGEN_HAVE_EVENTSETINFORMATION   1 //   directly invoke MCGEN_EVENTSETINFORMATION(...).\n  #elif MCGEN_USE_KERNEL_MODE_APIS             // else if using kernel-mode APIs,\n    #if NTDDI_VERSION >= 0x06040000            //   if target OS is Windows 10 or later,\n      #define MCGEN_HAVE_EVENTSETINFORMATION 1 //     directly invoke MCGEN_EVENTSETINFORMATION(...).\n    #else                                      //   else\n      #define MCGEN_HAVE_EVENTSETINFORMATION 2 //     find \"EtwSetInformation\" via MmGetSystemRoutineAddress.\n    #endif                                     // else (using user-mode APIs)\n  #else                                        //   if target OS and SDK is Windows 8 or later,\n    #if WINVER >= 0x0602 && defined(EVENT_FILTER_TYPE_SCHEMATIZED)\n      #define MCGEN_HAVE_EVENTSETINFORMATION 1 //     directly invoke MCGEN_EVENTSETINFORMATION(...).\n    #else                                      //   else\n      #define MCGEN_HAVE_EVENTSETINFORMATION 2 //     find \"EventSetInformation\" via GetModuleHandleExW/GetProcAddress.\n    #endif\n  #endif\n#endif // MCGEN_HAVE_EVENTSETINFORMATION\n\n//\n// MCGEN Override Macros\n//\n// The following override macros may be defined before including this header\n// to control the APIs used by this header:\n//\n// - MCGEN_EVENTREGISTER\n// - MCGEN_EVENTUNREGISTER\n// - MCGEN_EVENTSETINFORMATION\n// - MCGEN_EVENTWRITETRANSFER\n//\n// If the the macro is undefined, the MC implementation will default to the\n// corresponding ETW APIs. For example, if the MCGEN_EVENTREGISTER macro is\n// undefined, the EventRegister[MyProviderName] macro will use EventRegister\n// in user mode and will use EtwRegister in kernel mode.\n//\n// To prevent issues from conflicting definitions of these macros, the value\n// of the override macro will be used as a suffix in certain internal function\n// names. Because of this, the override macros must follow certain rules:\n//\n// - The macro must be defined before any MC-generated header is included and\n//   must not be undefined or redefined after any MC-generated header is\n//   included. Different translation units (i.e. different .c or .cpp files)\n//   may set the macros to different values, but within a translation unit\n//   (within a single .c or .cpp file), the macro must be set once and not\n//   changed.\n// - The override must be an object-like macro, not a function-like macro\n//   (i.e. the override macro must not have a parameter list).\n// - The override macro's value must be a simple identifier, i.e. must be\n//   something that starts with a letter or '_' and contains only letters,\n//   numbers, and '_' characters.\n// - If the override macro's value is the name of a second object-like macro,\n//   the second object-like macro must follow the same rules. (The override\n//   macro's value can also be the name of a function-like macro, in which\n//   case the function-like macro does not need to follow the same rules.)\n//\n// For example, the following will cause compile errors:\n//\n//   #define MCGEN_EVENTWRITETRANSFER MyNamespace::MyClass::MyFunction // Value has non-identifier characters (colon).\n//   #define MCGEN_EVENTWRITETRANSFER GetEventWriteFunctionPointer(7)  // Value has non-identifier characters (parentheses).\n//   #define MCGEN_EVENTWRITETRANSFER(h,e,a,r,c,d) EventWrite(h,e,c,d) // Override is defined as a function-like macro.\n//   #define MY_OBJECT_LIKE_MACRO     MyNamespace::MyClass::MyEventWriteFunction\n//   #define MCGEN_EVENTWRITETRANSFER MY_OBJECT_LIKE_MACRO // Evaluates to something with non-identifier characters (colon).\n//\n// The following would be ok:\n//\n//   #define MCGEN_EVENTWRITETRANSFER  MyEventWriteFunction1  // OK, suffix will be \"MyEventWriteFunction1\".\n//   #define MY_OBJECT_LIKE_MACRO      MyEventWriteFunction2\n//   #define MCGEN_EVENTWRITETRANSFER  MY_OBJECT_LIKE_MACRO   // OK, suffix will be \"MyEventWriteFunction2\".\n//   #define MY_FUNCTION_LIKE_MACRO(h,e,a,r,c,d) MyNamespace::MyClass::MyEventWriteFunction3(h,e,c,d)\n//   #define MCGEN_EVENTWRITETRANSFER  MY_FUNCTION_LIKE_MACRO // OK, suffix will be \"MY_FUNCTION_LIKE_MACRO\".\n//\n#ifndef MCGEN_EVENTREGISTER\n  #if MCGEN_USE_KERNEL_MODE_APIS\n    #define MCGEN_EVENTREGISTER        EtwRegister\n  #else\n    #define MCGEN_EVENTREGISTER        EventRegister\n  #endif\n#endif // MCGEN_EVENTREGISTER\n#ifndef MCGEN_EVENTUNREGISTER\n  #if MCGEN_USE_KERNEL_MODE_APIS\n    #define MCGEN_EVENTUNREGISTER      EtwUnregister\n  #else\n    #define MCGEN_EVENTUNREGISTER      EventUnregister\n  #endif\n#endif // MCGEN_EVENTUNREGISTER\n#ifndef MCGEN_EVENTSETINFORMATION\n  #if MCGEN_USE_KERNEL_MODE_APIS\n    #define MCGEN_EVENTSETINFORMATION  EtwSetInformation\n  #else\n    #define MCGEN_EVENTSETINFORMATION  EventSetInformation\n  #endif\n#endif // MCGEN_EVENTSETINFORMATION\n#ifndef MCGEN_EVENTWRITETRANSFER\n  #if MCGEN_USE_KERNEL_MODE_APIS\n    #define MCGEN_EVENTWRITETRANSFER   EtwWriteTransfer\n  #else\n    #define MCGEN_EVENTWRITETRANSFER   EventWriteTransfer\n  #endif\n#endif // MCGEN_EVENTWRITETRANSFER\n\n//\n// MCGEN_EVENT_ENABLED macro:\n// Override to control how the EventWrite[EventName] macros determine whether\n// an event is enabled. The default behavior is for EventWrite[EventName] to\n// use the EventEnabled[EventName] macros.\n//\n#ifndef MCGEN_EVENT_ENABLED\n#define MCGEN_EVENT_ENABLED(EventName) EventEnabled##EventName()\n#endif\n\n//\n// MCGEN_EVENT_ENABLED_FORCONTEXT macro:\n// Override to control how the EventWrite[EventName]_ForContext macros\n// determine whether an event is enabled. The default behavior is for\n// EventWrite[EventName]_ForContext to use the\n// EventEnabled[EventName]_ForContext macros.\n//\n#ifndef MCGEN_EVENT_ENABLED_FORCONTEXT\n#define MCGEN_EVENT_ENABLED_FORCONTEXT(pContext, EventName) EventEnabled##EventName##_ForContext(pContext)\n#endif\n\n//\n// MCGEN_ENABLE_CHECK macro:\n// Determines whether the specified event would be considered as enabled\n// based on the state of the specified context. Slightly faster than calling\n// McGenEventEnabled directly.\n//\n#ifndef MCGEN_ENABLE_CHECK\n#define MCGEN_ENABLE_CHECK(Context, Descriptor) (Context.IsEnabled && McGenEventEnabled(&Context, &Descriptor))\n#endif\n\n#if !defined(MCGEN_TRACE_CONTEXT_DEF)\n#define MCGEN_TRACE_CONTEXT_DEF\n// This structure is for use by MC-generated code and should not be used directly.\ntypedef struct _MCGEN_TRACE_CONTEXT\n{\n    TRACEHANDLE            RegistrationHandle;\n    TRACEHANDLE            Logger;      // Used as pointer to provider traits.\n    ULONGLONG              MatchAnyKeyword;\n    ULONGLONG              MatchAllKeyword;\n    ULONG                  Flags;\n    ULONG                  IsEnabled;\n    UCHAR                  Level;\n    UCHAR                  Reserve;\n    USHORT                 EnableBitsCount;\n    PULONG                 EnableBitMask;\n    const ULONGLONG*       EnableKeyWords;\n    const UCHAR*           EnableLevel;\n} MCGEN_TRACE_CONTEXT, *PMCGEN_TRACE_CONTEXT;\n#endif // MCGEN_TRACE_CONTEXT_DEF\n\n#if !defined(MCGEN_LEVEL_KEYWORD_ENABLED_DEF)\n#define MCGEN_LEVEL_KEYWORD_ENABLED_DEF\n//\n// Determines whether an event with a given Level and Keyword would be\n// considered as enabled based on the state of the specified context.\n// Note that you may want to use MCGEN_ENABLE_CHECK instead of calling this\n// function directly.\n//\nFORCEINLINE\nBOOLEAN\nMcGenLevelKeywordEnabled(\n    _In_ PMCGEN_TRACE_CONTEXT EnableInfo,\n    _In_ UCHAR Level,\n    _In_ ULONGLONG Keyword\n    )\n{\n    //\n    // Check if the event Level is lower than the level at which\n    // the channel is enabled.\n    // If the event Level is 0 or the channel is enabled at level 0,\n    // all levels are enabled.\n    //\n\n    if ((Level <= EnableInfo->Level) || // This also covers the case of Level == 0.\n        (EnableInfo->Level == 0)) {\n\n        //\n        // Check if Keyword is enabled\n        //\n\n        if ((Keyword == (ULONGLONG)0) ||\n            ((Keyword & EnableInfo->MatchAnyKeyword) &&\n             ((Keyword & EnableInfo->MatchAllKeyword) == EnableInfo->MatchAllKeyword))) {\n            return TRUE;\n        }\n    }\n\n    return FALSE;\n}\n#endif // MCGEN_LEVEL_KEYWORD_ENABLED_DEF\n\n#if !defined(MCGEN_EVENT_ENABLED_DEF)\n#define MCGEN_EVENT_ENABLED_DEF\n//\n// Determines whether the specified event would be considered as enabled based\n// on the state of the specified context. Note that you may want to use\n// MCGEN_ENABLE_CHECK instead of calling this function directly.\n//\nFORCEINLINE\nBOOLEAN\nMcGenEventEnabled(\n    _In_ PMCGEN_TRACE_CONTEXT EnableInfo,\n    _In_ PCEVENT_DESCRIPTOR EventDescriptor\n    )\n{\n    return McGenLevelKeywordEnabled(EnableInfo, EventDescriptor->Level, EventDescriptor->Keyword);\n}\n#endif // MCGEN_EVENT_ENABLED_DEF\n\n#if !defined(MCGEN_CONTROL_CALLBACK)\n#define MCGEN_CONTROL_CALLBACK\n\n// This function is for use by MC-generated code and should not be used directly.\nDECLSPEC_NOINLINE __inline\nVOID\n__stdcall\nMcGenControlCallbackV2(\n    _In_ LPCGUID SourceId,\n    _In_ ULONG ControlCode,\n    _In_ UCHAR Level,\n    _In_ ULONGLONG MatchAnyKeyword,\n    _In_ ULONGLONG MatchAllKeyword,\n    _In_opt_ PEVENT_FILTER_DESCRIPTOR FilterData,\n    _Inout_opt_ PVOID CallbackContext\n    )\n/*++\n\nRoutine Description:\n\n    This is the notification callback for Windows Vista and later.\n\nArguments:\n\n    SourceId - The GUID that identifies the session that enabled the provider.\n\n    ControlCode - The parameter indicates whether the provider\n                  is being enabled or disabled.\n\n    Level - The level at which the event is enabled.\n\n    MatchAnyKeyword - The bitmask of keywords that the provider uses to\n                      determine the category of events that it writes.\n\n    MatchAllKeyword - This bitmask additionally restricts the category\n                      of events that the provider writes.\n\n    FilterData - The provider-defined data.\n\n    CallbackContext - The context of the callback that is defined when the provider\n                      called EtwRegister to register itself.\n\nRemarks:\n\n    ETW calls this function to notify provider of enable/disable\n\n--*/\n{\n    PMCGEN_TRACE_CONTEXT Ctx = (PMCGEN_TRACE_CONTEXT)CallbackContext;\n    ULONG Ix;\n#ifndef MCGEN_PRIVATE_ENABLE_CALLBACK_V2\n    UNREFERENCED_PARAMETER(SourceId);\n    UNREFERENCED_PARAMETER(FilterData);\n#endif\n\n    if (Ctx == NULL) {\n        return;\n    }\n\n    switch (ControlCode) {\n\n        case EVENT_CONTROL_CODE_ENABLE_PROVIDER:\n            Ctx->Level = Level;\n            Ctx->MatchAnyKeyword = MatchAnyKeyword;\n            Ctx->MatchAllKeyword = MatchAllKeyword;\n            Ctx->IsEnabled = EVENT_CONTROL_CODE_ENABLE_PROVIDER;\n\n            for (Ix = 0; Ix < Ctx->EnableBitsCount; Ix += 1) {\n                if (McGenLevelKeywordEnabled(Ctx, Ctx->EnableLevel[Ix], Ctx->EnableKeyWords[Ix]) != FALSE) {\n                    Ctx->EnableBitMask[Ix >> 5] |= (1 << (Ix % 32));\n                } else {\n                    Ctx->EnableBitMask[Ix >> 5] &= ~(1 << (Ix % 32));\n                }\n            }\n            break;\n\n        case EVENT_CONTROL_CODE_DISABLE_PROVIDER:\n            Ctx->IsEnabled = EVENT_CONTROL_CODE_DISABLE_PROVIDER;\n            Ctx->Level = 0;\n            Ctx->MatchAnyKeyword = 0;\n            Ctx->MatchAllKeyword = 0;\n            if (Ctx->EnableBitsCount > 0) {\n#pragma warning(suppress: 26451) // Arithmetic overflow cannot occur, no matter the value of EnableBitCount\n                RtlZeroMemory(Ctx->EnableBitMask, (((Ctx->EnableBitsCount - 1) / 32) + 1) * sizeof(ULONG));\n            }\n            break;\n\n        default:\n            break;\n    }\n\n#ifdef MCGEN_PRIVATE_ENABLE_CALLBACK_V2\n    //\n    // Call user defined callback\n    //\n    MCGEN_PRIVATE_ENABLE_CALLBACK_V2(\n        SourceId,\n        ControlCode,\n        Level,\n        MatchAnyKeyword,\n        MatchAllKeyword,\n        FilterData,\n        CallbackContext\n        );\n#endif // MCGEN_PRIVATE_ENABLE_CALLBACK_V2\n\n    return;\n}\n\n#endif // MCGEN_CONTROL_CALLBACK\n\n#ifndef _mcgen_PENABLECALLBACK\n  #if MCGEN_USE_KERNEL_MODE_APIS\n    #define _mcgen_PENABLECALLBACK      PETWENABLECALLBACK\n  #else\n    #define _mcgen_PENABLECALLBACK      PENABLECALLBACK\n  #endif\n#endif // _mcgen_PENABLECALLBACK\n\n#if !defined(_mcgen_PASTE2)\n// This macro is for use by MC-generated code and should not be used directly.\n#define _mcgen_PASTE2(a, b) _mcgen_PASTE2_imp(a, b)\n#define _mcgen_PASTE2_imp(a, b) a##b\n#endif // _mcgen_PASTE2\n\n#if !defined(_mcgen_PASTE3)\n// This macro is for use by MC-generated code and should not be used directly.\n#define _mcgen_PASTE3(a, b, c) _mcgen_PASTE3_imp(a, b, c)\n#define _mcgen_PASTE3_imp(a, b, c) a##b##_##c\n#endif // _mcgen_PASTE3\n\n//\n// Macro validation\n//\n\n// Validate MCGEN_EVENTREGISTER:\n\n// Trigger an error if MCGEN_EVENTREGISTER is not an unqualified (simple) identifier:\nstruct _mcgen_PASTE2(MCGEN_EVENTREGISTER_definition_must_be_an_unqualified_identifier_, MCGEN_EVENTREGISTER);\n\n// Trigger an error if MCGEN_EVENTREGISTER is redefined:\ntypedef struct _mcgen_PASTE2(MCGEN_EVENTREGISTER_definition_must_be_an_unqualified_identifier_, MCGEN_EVENTREGISTER)\n    MCGEN_EVENTREGISTER_must_not_be_redefined_between_headers;\n\n// Trigger an error if MCGEN_EVENTREGISTER is defined as a function-like macro:\ntypedef void MCGEN_EVENTREGISTER_must_not_be_a_functionLike_macro_MCGEN_EVENTREGISTER;\ntypedef int _mcgen_PASTE2(MCGEN_EVENTREGISTER_must_not_be_a_functionLike_macro_, MCGEN_EVENTREGISTER);\n\n// Validate MCGEN_EVENTUNREGISTER:\n\n// Trigger an error if MCGEN_EVENTUNREGISTER is not an unqualified (simple) identifier:\nstruct _mcgen_PASTE2(MCGEN_EVENTUNREGISTER_definition_must_be_an_unqualified_identifier_, MCGEN_EVENTUNREGISTER);\n\n// Trigger an error if MCGEN_EVENTUNREGISTER is redefined:\ntypedef struct _mcgen_PASTE2(MCGEN_EVENTUNREGISTER_definition_must_be_an_unqualified_identifier_, MCGEN_EVENTUNREGISTER)\n    MCGEN_EVENTUNREGISTER_must_not_be_redefined_between_headers;\n\n// Trigger an error if MCGEN_EVENTUNREGISTER is defined as a function-like macro:\ntypedef void MCGEN_EVENTUNREGISTER_must_not_be_a_functionLike_macro_MCGEN_EVENTUNREGISTER;\ntypedef int _mcgen_PASTE2(MCGEN_EVENTUNREGISTER_must_not_be_a_functionLike_macro_, MCGEN_EVENTUNREGISTER);\n\n// Validate MCGEN_EVENTSETINFORMATION:\n\n// Trigger an error if MCGEN_EVENTSETINFORMATION is not an unqualified (simple) identifier:\nstruct _mcgen_PASTE2(MCGEN_EVENTSETINFORMATION_definition_must_be_an_unqualified_identifier_, MCGEN_EVENTSETINFORMATION);\n\n// Trigger an error if MCGEN_EVENTSETINFORMATION is redefined:\ntypedef struct _mcgen_PASTE2(MCGEN_EVENTSETINFORMATION_definition_must_be_an_unqualified_identifier_, MCGEN_EVENTSETINFORMATION)\n    MCGEN_EVENTSETINFORMATION_must_not_be_redefined_between_headers;\n\n// Trigger an error if MCGEN_EVENTSETINFORMATION is defined as a function-like macro:\ntypedef void MCGEN_EVENTSETINFORMATION_must_not_be_a_functionLike_macro_MCGEN_EVENTSETINFORMATION;\ntypedef int _mcgen_PASTE2(MCGEN_EVENTSETINFORMATION_must_not_be_a_functionLike_macro_, MCGEN_EVENTSETINFORMATION);\n\n// Validate MCGEN_EVENTWRITETRANSFER:\n\n// Trigger an error if MCGEN_EVENTWRITETRANSFER is not an unqualified (simple) identifier:\nstruct _mcgen_PASTE2(MCGEN_EVENTWRITETRANSFER_definition_must_be_an_unqualified_identifier_, MCGEN_EVENTWRITETRANSFER);\n\n// Trigger an error if MCGEN_EVENTWRITETRANSFER is redefined:\ntypedef struct _mcgen_PASTE2(MCGEN_EVENTWRITETRANSFER_definition_must_be_an_unqualified_identifier_, MCGEN_EVENTWRITETRANSFER)\n    MCGEN_EVENTWRITETRANSFER_must_not_be_redefined_between_headers;;\n\n// Trigger an error if MCGEN_EVENTWRITETRANSFER is defined as a function-like macro:\ntypedef void MCGEN_EVENTWRITETRANSFER_must_not_be_a_functionLike_macro_MCGEN_EVENTWRITETRANSFER;\ntypedef int _mcgen_PASTE2(MCGEN_EVENTWRITETRANSFER_must_not_be_a_functionLike_macro_, MCGEN_EVENTWRITETRANSFER);\n\n#ifndef McGenEventWrite_def\n#define McGenEventWrite_def\n\n// This macro is for use by MC-generated code and should not be used directly.\n#define McGenEventWrite _mcgen_PASTE2(McGenEventWrite_, MCGEN_EVENTWRITETRANSFER)\n\n// This function is for use by MC-generated code and should not be used directly.\nDECLSPEC_NOINLINE __inline\nULONG __stdcall\nMcGenEventWrite(\n    _In_ PMCGEN_TRACE_CONTEXT Context,\n    _In_ PCEVENT_DESCRIPTOR Descriptor,\n    _In_opt_ LPCGUID ActivityId,\n    _In_range_(1, 128) ULONG EventDataCount,\n    _Pre_cap_(EventDataCount) EVENT_DATA_DESCRIPTOR* EventData\n    )\n{\n    const USHORT UNALIGNED* Traits;\n\n    // Some customized MCGEN_EVENTWRITETRANSFER macros might ignore ActivityId.\n    UNREFERENCED_PARAMETER(ActivityId);\n\n    Traits = (const USHORT UNALIGNED*)(UINT_PTR)Context->Logger;\n\n    if (Traits == NULL) {\n        EventData[0].Ptr = 0;\n        EventData[0].Size = 0;\n        EventData[0].Reserved = 0;\n    } else {\n        EventData[0].Ptr = (ULONG_PTR)Traits;\n        EventData[0].Size = *Traits;\n        EventData[0].Reserved = 2; // EVENT_DATA_DESCRIPTOR_TYPE_PROVIDER_METADATA\n    }\n\n    return MCGEN_EVENTWRITETRANSFER(\n        Context->RegistrationHandle,\n        Descriptor,\n        ActivityId,\n        NULL,\n        EventDataCount,\n        EventData);\n}\n#endif // McGenEventWrite_def\n\n#if !defined(McGenEventRegisterUnregister)\n#define McGenEventRegisterUnregister\n\n// This macro is for use by MC-generated code and should not be used directly.\n#define McGenEventRegister _mcgen_PASTE2(McGenEventRegister_, MCGEN_EVENTREGISTER)\n\n#pragma warning(push)\n#pragma warning(disable:6103)\n// This function is for use by MC-generated code and should not be used directly.\nDECLSPEC_NOINLINE __inline\nULONG __stdcall\nMcGenEventRegister(\n    _In_ LPCGUID ProviderId,\n    _In_opt_ _mcgen_PENABLECALLBACK EnableCallback,\n    _In_opt_ PVOID CallbackContext,\n    _Inout_ PREGHANDLE RegHandle\n    )\n/*++\n\nRoutine Description:\n\n    This function registers the provider with ETW.\n\nArguments:\n\n    ProviderId - Provider ID to register with ETW.\n\n    EnableCallback - Callback to be used.\n\n    CallbackContext - Context for the callback.\n\n    RegHandle - Pointer to registration handle.\n\nRemarks:\n\n    Should not be called if the provider is already registered (i.e. should not\n    be called if *RegHandle != 0). Repeatedly registering a provider is a bug\n    and may indicate a race condition. However, for compatibility with previous\n    behavior, this function will return SUCCESS in this case.\n\n--*/\n{\n    ULONG Error;\n\n    if (*RegHandle != 0)\n    {\n        Error = 0; // ERROR_SUCCESS\n    }\n    else\n    {\n        Error = MCGEN_EVENTREGISTER(ProviderId, EnableCallback, CallbackContext, RegHandle);\n    }\n\n    return Error;\n}\n#pragma warning(pop)\n\n// This macro is for use by MC-generated code and should not be used directly.\n#define McGenEventUnregister _mcgen_PASTE2(McGenEventUnregister_, MCGEN_EVENTUNREGISTER)\n\n// This function is for use by MC-generated code and should not be used directly.\nDECLSPEC_NOINLINE __inline\nULONG __stdcall\nMcGenEventUnregister(_Inout_ PREGHANDLE RegHandle)\n/*++\n\nRoutine Description:\n\n    Unregister from ETW and set *RegHandle = 0.\n\nArguments:\n\n    RegHandle - the pointer to the provider registration handle\n\nRemarks:\n\n    If provider has not been registered (i.e. if *RegHandle == 0),\n    return SUCCESS. It is safe to call McGenEventUnregister even if the\n    call to McGenEventRegister returned an error.\n\n--*/\n{\n    ULONG Error;\n\n    if(*RegHandle == 0)\n    {\n        Error = 0; // ERROR_SUCCESS\n    }\n    else\n    {\n        Error = MCGEN_EVENTUNREGISTER(*RegHandle);\n        *RegHandle = (REGHANDLE)0;\n    }\n\n    return Error;\n}\n\n#endif // McGenEventRegisterUnregister\n\n#ifndef _mcgen_EVENT_BIT_SET\n  #if defined(_M_IX86) || defined(_M_X64)\n    // This macro is for use by MC-generated code and should not be used directly.\n    #define _mcgen_EVENT_BIT_SET(EnableBits, BitPosition) ((((const unsigned char*)EnableBits)[BitPosition >> 3] & (1u << (BitPosition & 7))) != 0)\n  #else // CPU type\n    // This macro is for use by MC-generated code and should not be used directly.\n    #define _mcgen_EVENT_BIT_SET(EnableBits, BitPosition) ((EnableBits[BitPosition >> 5] & (1u << (BitPosition & 31))) != 0)\n  #endif // CPU type\n#endif // _mcgen_EVENT_BIT_SET\n\n#endif // MCGEN_DISABLE_PROVIDER_CODE_GENERATION\n\n//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n// Provider \"microsoft-windows-mimalloc\" event count 2\n//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n// Provider GUID = 138f4dbb-ee04-4899-aa0a-572ad4475779\nEXTERN_C __declspec(selectany) const GUID ETW_MI_Provider = {0x138f4dbb, 0xee04, 0x4899, {0xaa, 0x0a, 0x57, 0x2a, 0xd4, 0x47, 0x57, 0x79}};\n\n#ifndef ETW_MI_Provider_Traits\n#define ETW_MI_Provider_Traits NULL\n#endif // ETW_MI_Provider_Traits\n\n//\n// Event Descriptors\n//\nEXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR ETW_MI_ALLOC = {0x64, 0x1, 0x0, 0x4, 0x0, 0x0, 0x0};\n#define ETW_MI_ALLOC_value 0x64\nEXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR ETW_MI_FREE = {0x65, 0x1, 0x0, 0x4, 0x0, 0x0, 0x0};\n#define ETW_MI_FREE_value 0x65\n\n//\n// MCGEN_DISABLE_PROVIDER_CODE_GENERATION macro:\n// Define this macro to have the compiler skip the generated functions in this\n// header.\n//\n#ifndef MCGEN_DISABLE_PROVIDER_CODE_GENERATION\n\n//\n// Event Enablement Bits\n// These variables are for use by MC-generated code and should not be used directly.\n//\nEXTERN_C __declspec(selectany) DECLSPEC_CACHEALIGN ULONG microsoft_windows_mimallocEnableBits[1];\nEXTERN_C __declspec(selectany) const ULONGLONG microsoft_windows_mimallocKeywords[1] = {0x0};\nEXTERN_C __declspec(selectany) const unsigned char microsoft_windows_mimallocLevels[1] = {4};\n\n//\n// Provider context\n//\nEXTERN_C __declspec(selectany) MCGEN_TRACE_CONTEXT ETW_MI_Provider_Context = {0, (ULONG_PTR)ETW_MI_Provider_Traits, 0, 0, 0, 0, 0, 0, 1, microsoft_windows_mimallocEnableBits, microsoft_windows_mimallocKeywords, microsoft_windows_mimallocLevels};\n\n//\n// Provider REGHANDLE\n//\n#define microsoft_windows_mimallocHandle (ETW_MI_Provider_Context.RegistrationHandle)\n\n//\n// This macro is set to 0, indicating that the EventWrite[Name] macros do not\n// have an Activity parameter. This is controlled by the -km and -um options.\n//\n#define ETW_MI_Provider_EventWriteActivity 0\n\n//\n// Register with ETW using the control GUID specified in the manifest.\n// Invoke this macro during module initialization (i.e. program startup,\n// DLL process attach, or driver load) to initialize the provider.\n// Note that if this function returns an error, the error means that\n// will not work, but no action needs to be taken -- even if EventRegister\n// returns an error, it is generally safe to use EventWrite and\n// EventUnregister macros (they will be no-ops if EventRegister failed).\n//\n#ifndef EventRegistermicrosoft_windows_mimalloc\n#define EventRegistermicrosoft_windows_mimalloc() McGenEventRegister(&ETW_MI_Provider, McGenControlCallbackV2, &ETW_MI_Provider_Context, &microsoft_windows_mimallocHandle)\n#endif\n\n//\n// Register with ETW using a specific control GUID (i.e. a GUID other than what\n// is specified in the manifest). Advanced scenarios only.\n//\n#ifndef EventRegisterByGuidmicrosoft_windows_mimalloc\n#define EventRegisterByGuidmicrosoft_windows_mimalloc(Guid) McGenEventRegister(&(Guid), McGenControlCallbackV2, &ETW_MI_Provider_Context, &microsoft_windows_mimallocHandle)\n#endif\n\n//\n// Unregister with ETW and close the provider.\n// Invoke this macro during module shutdown (i.e. program exit, DLL process\n// detach, or driver unload) to unregister the provider.\n// Note that you MUST call EventUnregister before DLL or driver unload\n// (not optional): failure to unregister a provider before DLL or driver unload\n// will result in crashes.\n//\n#ifndef EventUnregistermicrosoft_windows_mimalloc\n#define EventUnregistermicrosoft_windows_mimalloc() McGenEventUnregister(&microsoft_windows_mimallocHandle)\n#endif\n\n//\n// MCGEN_ENABLE_FORCONTEXT_CODE_GENERATION macro:\n// Define this macro to enable support for caller-allocated provider context.\n//\n#ifdef MCGEN_ENABLE_FORCONTEXT_CODE_GENERATION\n\n//\n// Advanced scenarios: Caller-allocated provider context.\n// Use when multiple differently-configured provider handles are needed,\n// e.g. for container-aware drivers, one context per container.\n//\n// Usage:\n//\n// - Caller enables the feature before including this header, e.g.\n//   #define MCGEN_ENABLE_FORCONTEXT_CODE_GENERATION 1\n// - Caller allocates memory, e.g. pContext = malloc(sizeof(McGenContext_microsoft_windows_mimalloc));\n// - Caller registers the provider, e.g. EventRegistermicrosoft_windows_mimalloc_ForContext(pContext);\n// - Caller writes events, e.g. EventWriteMyEvent_ForContext(pContext, ...);\n// - Caller unregisters, e.g. EventUnregistermicrosoft_windows_mimalloc_ForContext(pContext);\n// - Caller frees memory, e.g. free(pContext);\n//\n\ntypedef struct tagMcGenContext_microsoft_windows_mimalloc {\n    // The fields of this structure are subject to change and should\n    // not be accessed directly. To access the provider's REGHANDLE,\n    // use microsoft_windows_mimallocHandle_ForContext(pContext).\n    MCGEN_TRACE_CONTEXT Context;\n    ULONG EnableBits[1];\n} McGenContext_microsoft_windows_mimalloc;\n\n#define EventRegistermicrosoft_windows_mimalloc_ForContext(pContext)             _mcgen_PASTE2(_mcgen_RegisterForContext_microsoft_windows_mimalloc_, MCGEN_EVENTREGISTER)(&ETW_MI_Provider, pContext)\n#define EventRegisterByGuidmicrosoft_windows_mimalloc_ForContext(Guid, pContext) _mcgen_PASTE2(_mcgen_RegisterForContext_microsoft_windows_mimalloc_, MCGEN_EVENTREGISTER)(&(Guid), pContext)\n#define EventUnregistermicrosoft_windows_mimalloc_ForContext(pContext)           McGenEventUnregister(&(pContext)->Context.RegistrationHandle)\n\n//\n// Provider REGHANDLE for caller-allocated context.\n//\n#define microsoft_windows_mimallocHandle_ForContext(pContext) ((pContext)->Context.RegistrationHandle)\n\n// This function is for use by MC-generated code and should not be used directly.\n// Initialize and register the caller-allocated context.\n__inline\nULONG __stdcall\n_mcgen_PASTE2(_mcgen_RegisterForContext_microsoft_windows_mimalloc_, MCGEN_EVENTREGISTER)(\n    _In_ LPCGUID pProviderId,\n    _Out_ McGenContext_microsoft_windows_mimalloc* pContext)\n{\n    RtlZeroMemory(pContext, sizeof(*pContext));\n    pContext->Context.Logger = (ULONG_PTR)ETW_MI_Provider_Traits;\n    pContext->Context.EnableBitsCount = 1;\n    pContext->Context.EnableBitMask = pContext->EnableBits;\n    pContext->Context.EnableKeyWords = microsoft_windows_mimallocKeywords;\n    pContext->Context.EnableLevel = microsoft_windows_mimallocLevels;\n    return McGenEventRegister(\n        pProviderId,\n        McGenControlCallbackV2,\n        &pContext->Context,\n        &pContext->Context.RegistrationHandle);\n}\n\n// This function is for use by MC-generated code and should not be used directly.\n// Trigger a compile error if called with the wrong parameter type.\nFORCEINLINE\n_Ret_ McGenContext_microsoft_windows_mimalloc*\n_mcgen_CheckContextType_microsoft_windows_mimalloc(_In_ McGenContext_microsoft_windows_mimalloc* pContext)\n{\n    return pContext;\n}\n\n#endif // MCGEN_ENABLE_FORCONTEXT_CODE_GENERATION\n\n//\n// Enablement check macro for event \"ETW_MI_ALLOC\"\n//\n#define EventEnabledETW_MI_ALLOC() _mcgen_EVENT_BIT_SET(microsoft_windows_mimallocEnableBits, 0)\n#define EventEnabledETW_MI_ALLOC_ForContext(pContext) _mcgen_EVENT_BIT_SET(_mcgen_CheckContextType_microsoft_windows_mimalloc(pContext)->EnableBits, 0)\n\n//\n// Event write macros for event \"ETW_MI_ALLOC\"\n//\n#define EventWriteETW_MI_ALLOC(Address, Size) \\\n        MCGEN_EVENT_ENABLED(ETW_MI_ALLOC) \\\n        ? _mcgen_TEMPLATE_FOR_ETW_MI_ALLOC(&ETW_MI_Provider_Context, &ETW_MI_ALLOC, Address, Size) : 0\n#define EventWriteETW_MI_ALLOC_AssumeEnabled(Address, Size) \\\n        _mcgen_TEMPLATE_FOR_ETW_MI_ALLOC(&ETW_MI_Provider_Context, &ETW_MI_ALLOC, Address, Size)\n#define EventWriteETW_MI_ALLOC_ForContext(pContext, Address, Size) \\\n        MCGEN_EVENT_ENABLED_FORCONTEXT(pContext, ETW_MI_ALLOC) \\\n        ? _mcgen_TEMPLATE_FOR_ETW_MI_ALLOC(&(pContext)->Context, &ETW_MI_ALLOC, Address, Size) : 0\n#define EventWriteETW_MI_ALLOC_ForContextAssumeEnabled(pContext, Address, Size) \\\n        _mcgen_TEMPLATE_FOR_ETW_MI_ALLOC(&_mcgen_CheckContextType_microsoft_windows_mimalloc(pContext)->Context, &ETW_MI_ALLOC, Address, Size)\n\n// This macro is for use by MC-generated code and should not be used directly.\n#define _mcgen_TEMPLATE_FOR_ETW_MI_ALLOC _mcgen_PASTE2(McTemplateU0xx_, MCGEN_EVENTWRITETRANSFER)\n\n//\n// Enablement check macro for event \"ETW_MI_FREE\"\n//\n#define EventEnabledETW_MI_FREE() _mcgen_EVENT_BIT_SET(microsoft_windows_mimallocEnableBits, 0)\n#define EventEnabledETW_MI_FREE_ForContext(pContext) _mcgen_EVENT_BIT_SET(_mcgen_CheckContextType_microsoft_windows_mimalloc(pContext)->EnableBits, 0)\n\n//\n// Event write macros for event \"ETW_MI_FREE\"\n//\n#define EventWriteETW_MI_FREE(Address, Size) \\\n        MCGEN_EVENT_ENABLED(ETW_MI_FREE) \\\n        ? _mcgen_TEMPLATE_FOR_ETW_MI_FREE(&ETW_MI_Provider_Context, &ETW_MI_FREE, Address, Size) : 0\n#define EventWriteETW_MI_FREE_AssumeEnabled(Address, Size) \\\n        _mcgen_TEMPLATE_FOR_ETW_MI_FREE(&ETW_MI_Provider_Context, &ETW_MI_FREE, Address, Size)\n#define EventWriteETW_MI_FREE_ForContext(pContext, Address, Size) \\\n        MCGEN_EVENT_ENABLED_FORCONTEXT(pContext, ETW_MI_FREE) \\\n        ? _mcgen_TEMPLATE_FOR_ETW_MI_FREE(&(pContext)->Context, &ETW_MI_FREE, Address, Size) : 0\n#define EventWriteETW_MI_FREE_ForContextAssumeEnabled(pContext, Address, Size) \\\n        _mcgen_TEMPLATE_FOR_ETW_MI_FREE(&_mcgen_CheckContextType_microsoft_windows_mimalloc(pContext)->Context, &ETW_MI_FREE, Address, Size)\n\n// This macro is for use by MC-generated code and should not be used directly.\n#define _mcgen_TEMPLATE_FOR_ETW_MI_FREE _mcgen_PASTE2(McTemplateU0xx_, MCGEN_EVENTWRITETRANSFER)\n\n#endif // MCGEN_DISABLE_PROVIDER_CODE_GENERATION\n\n//\n// MCGEN_DISABLE_PROVIDER_CODE_GENERATION macro:\n// Define this macro to have the compiler skip the generated functions in this\n// header.\n//\n#ifndef MCGEN_DISABLE_PROVIDER_CODE_GENERATION\n\n//\n// Template Functions\n//\n\n//\n// Function for template \"ETW_CUSTOM_HEAP_ALLOC_DATA\" (and possibly others).\n// This function is for use by MC-generated code and should not be used directly.\n//\n#ifndef McTemplateU0xx_def\n#define McTemplateU0xx_def\nETW_INLINE\nULONG\n_mcgen_PASTE2(McTemplateU0xx_, MCGEN_EVENTWRITETRANSFER)(\n    _In_ PMCGEN_TRACE_CONTEXT Context,\n    _In_ PCEVENT_DESCRIPTOR Descriptor,\n    _In_ const unsigned __int64  _Arg0,\n    _In_ const unsigned __int64  _Arg1\n    )\n{\n#define McTemplateU0xx_ARGCOUNT 2\n\n    EVENT_DATA_DESCRIPTOR EventData[McTemplateU0xx_ARGCOUNT + 1];\n\n    EventDataDescCreate(&EventData[1],&_Arg0, sizeof(const unsigned __int64)  );\n\n    EventDataDescCreate(&EventData[2],&_Arg1, sizeof(const unsigned __int64)  );\n\n    return McGenEventWrite(Context, Descriptor, NULL, McTemplateU0xx_ARGCOUNT + 1, EventData);\n}\n#endif // McTemplateU0xx_def\n\n#endif // MCGEN_DISABLE_PROVIDER_CODE_GENERATION\n\n#if defined(__cplusplus)\n}\n#endif\n"
  },
  {
    "path": "third-party/mimalloc/src/prim/windows/prim.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2023, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n// This file is included in `src/prim/prim.c`\n\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"mimalloc/prim.h\"\n#include <stdio.h>   // fputs, stderr\n\n\n//---------------------------------------------\n// Dynamically bind Windows API points for portability\n//---------------------------------------------\n\n// We use VirtualAlloc2 for aligned allocation, but it is only supported on Windows 10 and Windows Server 2016.\n// So, we need to look it up dynamically to run on older systems. (use __stdcall for 32-bit compatibility)\n// NtAllocateVirtualAllocEx is used for huge OS page allocation (1GiB)\n// We define a minimal MEM_EXTENDED_PARAMETER ourselves in order to be able to compile with older SDK's.\ntypedef enum MI_MEM_EXTENDED_PARAMETER_TYPE_E {\n  MiMemExtendedParameterInvalidType = 0,\n  MiMemExtendedParameterAddressRequirements,\n  MiMemExtendedParameterNumaNode,\n  MiMemExtendedParameterPartitionHandle,\n  MiMemExtendedParameterUserPhysicalHandle,\n  MiMemExtendedParameterAttributeFlags,\n  MiMemExtendedParameterMax\n} MI_MEM_EXTENDED_PARAMETER_TYPE;\n\ntypedef struct DECLSPEC_ALIGN(8) MI_MEM_EXTENDED_PARAMETER_S {\n  struct { DWORD64 Type : 8; DWORD64 Reserved : 56; } Type;\n  union  { DWORD64 ULong64; PVOID Pointer; SIZE_T Size; HANDLE Handle; DWORD ULong; } Arg;\n} MI_MEM_EXTENDED_PARAMETER;\n\ntypedef struct MI_MEM_ADDRESS_REQUIREMENTS_S {\n  PVOID  LowestStartingAddress;\n  PVOID  HighestEndingAddress;\n  SIZE_T Alignment;\n} MI_MEM_ADDRESS_REQUIREMENTS;\n\n#define MI_MEM_EXTENDED_PARAMETER_NONPAGED_HUGE   0x00000010\n\n#include <winternl.h>\ntypedef PVOID    (__stdcall *PVirtualAlloc2)(HANDLE, PVOID, SIZE_T, ULONG, ULONG, MI_MEM_EXTENDED_PARAMETER*, ULONG);\ntypedef NTSTATUS (__stdcall *PNtAllocateVirtualMemoryEx)(HANDLE, PVOID*, SIZE_T*, ULONG, ULONG, MI_MEM_EXTENDED_PARAMETER*, ULONG);\nstatic PVirtualAlloc2 pVirtualAlloc2 = NULL;\nstatic PNtAllocateVirtualMemoryEx pNtAllocateVirtualMemoryEx = NULL;\n\n// Similarly, GetNumaProcessorNodeEx is only supported since Windows 7\ntypedef struct MI_PROCESSOR_NUMBER_S { WORD Group; BYTE Number; BYTE Reserved; } MI_PROCESSOR_NUMBER;\n\ntypedef VOID (__stdcall *PGetCurrentProcessorNumberEx)(MI_PROCESSOR_NUMBER* ProcNumber);\ntypedef BOOL (__stdcall *PGetNumaProcessorNodeEx)(MI_PROCESSOR_NUMBER* Processor, PUSHORT NodeNumber);\ntypedef BOOL (__stdcall* PGetNumaNodeProcessorMaskEx)(USHORT Node, PGROUP_AFFINITY ProcessorMask);\ntypedef BOOL (__stdcall *PGetNumaProcessorNode)(UCHAR Processor, PUCHAR NodeNumber);\nstatic PGetCurrentProcessorNumberEx pGetCurrentProcessorNumberEx = NULL;\nstatic PGetNumaProcessorNodeEx      pGetNumaProcessorNodeEx = NULL;\nstatic PGetNumaNodeProcessorMaskEx  pGetNumaNodeProcessorMaskEx = NULL;\nstatic PGetNumaProcessorNode        pGetNumaProcessorNode = NULL;\n\n// Available after Windows XP\ntypedef BOOL (__stdcall *PGetPhysicallyInstalledSystemMemory)( PULONGLONG TotalMemoryInKilobytes );\n\n//---------------------------------------------\n// Enable large page support dynamically (if possible)\n//---------------------------------------------\n\nstatic bool win_enable_large_os_pages(size_t* large_page_size)\n{\n  static bool large_initialized = false;\n  if (large_initialized) return (_mi_os_large_page_size() > 0);\n  large_initialized = true;\n\n  // Try to see if large OS pages are supported\n  // To use large pages on Windows, we first need access permission\n  // Set \"Lock pages in memory\" permission in the group policy editor\n  // <https://devblogs.microsoft.com/oldnewthing/20110128-00/?p=11643>\n  unsigned long err = 0;\n  HANDLE token = NULL;\n  BOOL ok = OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &token);\n  if (ok) {\n    TOKEN_PRIVILEGES tp;\n    ok = LookupPrivilegeValue(NULL, TEXT(\"SeLockMemoryPrivilege\"), &tp.Privileges[0].Luid);\n    if (ok) {\n      tp.PrivilegeCount = 1;\n      tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;\n      ok = AdjustTokenPrivileges(token, FALSE, &tp, 0, (PTOKEN_PRIVILEGES)NULL, 0);\n      if (ok) {\n        err = GetLastError();\n        ok = (err == ERROR_SUCCESS);\n        if (ok && large_page_size != NULL) {\n          *large_page_size = GetLargePageMinimum();\n        }\n      }\n    }\n    CloseHandle(token);\n  }\n  if (!ok) {\n    if (err == 0) err = GetLastError();\n    _mi_warning_message(\"cannot enable large OS page support, error %lu\\n\", err);\n  }\n  return (ok!=0);\n}\n\n\n//---------------------------------------------\n// Initialize\n//---------------------------------------------\n\nvoid _mi_prim_mem_init( mi_os_mem_config_t* config )\n{\n  config->has_overcommit = false;\n  config->has_partial_free = false;\n  config->has_virtual_reserve = true;\n  // get the page size\n  SYSTEM_INFO si;\n  GetSystemInfo(&si);\n  if (si.dwPageSize > 0) { config->page_size = si.dwPageSize; }\n  if (si.dwAllocationGranularity > 0) { config->alloc_granularity = si.dwAllocationGranularity; }\n  // get virtual address bits\n  if ((uintptr_t)si.lpMaximumApplicationAddress > 0) {\n    const size_t vbits = MI_SIZE_BITS - mi_clz((uintptr_t)si.lpMaximumApplicationAddress);\n    config->virtual_address_bits = vbits;\n  }\n\n  // get the VirtualAlloc2 function\n  HINSTANCE  hDll;\n  hDll = LoadLibrary(TEXT(\"kernelbase.dll\"));\n  if (hDll != NULL) {\n    // use VirtualAlloc2FromApp if possible as it is available to Windows store apps\n    pVirtualAlloc2 = (PVirtualAlloc2)(void (*)(void))GetProcAddress(hDll, \"VirtualAlloc2FromApp\");\n    if (pVirtualAlloc2==NULL) pVirtualAlloc2 = (PVirtualAlloc2)(void (*)(void))GetProcAddress(hDll, \"VirtualAlloc2\");\n    FreeLibrary(hDll);\n  }\n  // NtAllocateVirtualMemoryEx is used for huge page allocation\n  hDll = LoadLibrary(TEXT(\"ntdll.dll\"));\n  if (hDll != NULL) {\n    pNtAllocateVirtualMemoryEx = (PNtAllocateVirtualMemoryEx)(void (*)(void))GetProcAddress(hDll, \"NtAllocateVirtualMemoryEx\");\n    FreeLibrary(hDll);\n  }\n  // Try to use Win7+ numa API\n  hDll = LoadLibrary(TEXT(\"kernel32.dll\"));\n  if (hDll != NULL) {\n    pGetCurrentProcessorNumberEx = (PGetCurrentProcessorNumberEx)(void (*)(void))GetProcAddress(hDll, \"GetCurrentProcessorNumberEx\");\n    pGetNumaProcessorNodeEx = (PGetNumaProcessorNodeEx)(void (*)(void))GetProcAddress(hDll, \"GetNumaProcessorNodeEx\");\n    pGetNumaNodeProcessorMaskEx = (PGetNumaNodeProcessorMaskEx)(void (*)(void))GetProcAddress(hDll, \"GetNumaNodeProcessorMaskEx\");\n    pGetNumaProcessorNode = (PGetNumaProcessorNode)(void (*)(void))GetProcAddress(hDll, \"GetNumaProcessorNode\");\n    // Get physical memory (not available on XP, so check dynamically)\n    PGetPhysicallyInstalledSystemMemory pGetPhysicallyInstalledSystemMemory = (PGetPhysicallyInstalledSystemMemory)(void (*)(void))GetProcAddress(hDll,\"GetPhysicallyInstalledSystemMemory\");\n    if (pGetPhysicallyInstalledSystemMemory != NULL) {\n      ULONGLONG memInKiB = 0;\n      if ((*pGetPhysicallyInstalledSystemMemory)(&memInKiB)) {\n        if (memInKiB > 0 && memInKiB <= SIZE_MAX) {\n          config->physical_memory_in_kib = (size_t)memInKiB;\n        }\n      }\n    }\n    FreeLibrary(hDll);\n  }\n  // Enable large/huge OS page support?\n  if (mi_option_is_enabled(mi_option_allow_large_os_pages) || mi_option_is_enabled(mi_option_reserve_huge_os_pages)) {\n    win_enable_large_os_pages(&config->large_page_size);\n  }\n}\n\n\n//---------------------------------------------\n// Free\n//---------------------------------------------\n\nint _mi_prim_free(void* addr, size_t size ) {\n  MI_UNUSED(size);\n  DWORD errcode = 0;\n  bool err = (VirtualFree(addr, 0, MEM_RELEASE) == 0);\n  if (err) { errcode = GetLastError(); }\n  if (errcode == ERROR_INVALID_ADDRESS) {\n    // In mi_os_mem_alloc_aligned the fallback path may have returned a pointer inside\n    // the memory region returned by VirtualAlloc; in that case we need to free using\n    // the start of the region.\n    MEMORY_BASIC_INFORMATION info; _mi_memzero_var(info);\n    VirtualQuery(addr, &info, sizeof(info));\n    if (info.AllocationBase < addr && ((uint8_t*)addr - (uint8_t*)info.AllocationBase) < (ptrdiff_t)MI_SEGMENT_SIZE) {\n      errcode = 0;\n      err = (VirtualFree(info.AllocationBase, 0, MEM_RELEASE) == 0);\n      if (err) { errcode = GetLastError(); }\n    }\n  }\n  return (int)errcode;\n}\n\n\n//---------------------------------------------\n// VirtualAlloc\n//---------------------------------------------\n\nstatic void* win_virtual_alloc_prim_once(void* addr, size_t size, size_t try_alignment, DWORD flags) {\n  #if (MI_INTPTR_SIZE >= 8)\n  // on 64-bit systems, try to use the virtual address area after 2TiB for 4MiB aligned allocations\n  if (addr == NULL) {\n    void* hint = _mi_os_get_aligned_hint(try_alignment,size);\n    if (hint != NULL) {\n      void* p = VirtualAlloc(hint, size, flags, PAGE_READWRITE);\n      if (p != NULL) return p;\n      _mi_verbose_message(\"warning: unable to allocate hinted aligned OS memory (%zu bytes, error code: 0x%x, address: %p, alignment: %zu, flags: 0x%x)\\n\", size, GetLastError(), hint, try_alignment, flags);\n      // fall through on error\n    }\n  }\n  #endif\n  // on modern Windows try use VirtualAlloc2 for aligned allocation\n  if (addr == NULL && try_alignment > 1 && (try_alignment % _mi_os_page_size()) == 0 && pVirtualAlloc2 != NULL) {\n    MI_MEM_ADDRESS_REQUIREMENTS reqs = { 0, 0, 0 };\n    reqs.Alignment = try_alignment;\n    MI_MEM_EXTENDED_PARAMETER param = { {0, 0}, {0} };\n    param.Type.Type = MiMemExtendedParameterAddressRequirements;\n    param.Arg.Pointer = &reqs;\n    void* p = (*pVirtualAlloc2)(GetCurrentProcess(), addr, size, flags, PAGE_READWRITE, &param, 1);\n    if (p != NULL) return p;\n    _mi_warning_message(\"unable to allocate aligned OS memory (0x%zx bytes, error code: 0x%x, address: %p, alignment: 0x%zx, flags: 0x%x)\\n\", size, GetLastError(), addr, try_alignment, flags);\n    // fall through on error\n  }\n  // last resort\n  return VirtualAlloc(addr, size, flags, PAGE_READWRITE);\n}\n\nstatic bool win_is_out_of_memory_error(DWORD err) {\n  switch (err) {\n    case ERROR_COMMITMENT_MINIMUM:\n    case ERROR_COMMITMENT_LIMIT:\n    case ERROR_PAGEFILE_QUOTA:\n    case ERROR_NOT_ENOUGH_MEMORY:\n      return true;\n    default:\n      return false;\n  }\n}\n\nstatic void* win_virtual_alloc_prim(void* addr, size_t size, size_t try_alignment, DWORD flags) {\n  long max_retry_msecs = mi_option_get_clamp(mi_option_retry_on_oom, 0, 2000);  // at most 2 seconds\n  if (max_retry_msecs == 1) { max_retry_msecs = 100; }  // if one sets the option to \"true\"\n  for (long tries = 1; tries <= 10; tries++) {          // try at most 10 times (=2200ms)\n    void* p = win_virtual_alloc_prim_once(addr, size, try_alignment, flags);\n    if (p != NULL) {\n      // success, return the address\n      return p;\n    }\n    else if (max_retry_msecs > 0 && (try_alignment <= 2*MI_SEGMENT_ALIGN) &&\n              (flags&MEM_COMMIT) != 0 && (flags&MEM_LARGE_PAGES) == 0 &&\n              win_is_out_of_memory_error(GetLastError())) {\n      // if committing regular memory and being out-of-memory,\n      // keep trying for a bit in case memory frees up after all. See issue #894\n      _mi_warning_message(\"out-of-memory on OS allocation, try again... (attempt %lu, 0x%zx bytes, error code: 0x%x, address: %p, alignment: 0x%zx, flags: 0x%x)\\n\", tries, size, GetLastError(), addr, try_alignment, flags);\n      long sleep_msecs = tries*40;  // increasing waits\n      if (sleep_msecs > max_retry_msecs) { sleep_msecs = max_retry_msecs; }\n      max_retry_msecs -= sleep_msecs;\n      Sleep(sleep_msecs);\n    }\n    else {\n      // otherwise return with an error\n      break;\n    }\n  }\n  return NULL;\n}\n\nstatic void* win_virtual_alloc(void* addr, size_t size, size_t try_alignment, DWORD flags, bool large_only, bool allow_large, bool* is_large) {\n  mi_assert_internal(!(large_only && !allow_large));\n  static _Atomic(size_t) large_page_try_ok; // = 0;\n  void* p = NULL;\n  // Try to allocate large OS pages (2MiB) if allowed or required.\n  if ((large_only || _mi_os_use_large_page(size, try_alignment))\n      && allow_large && (flags&MEM_COMMIT)!=0 && (flags&MEM_RESERVE)!=0) {\n    size_t try_ok = mi_atomic_load_acquire(&large_page_try_ok);\n    if (!large_only && try_ok > 0) {\n      // if a large page allocation fails, it seems the calls to VirtualAlloc get very expensive.\n      // therefore, once a large page allocation failed, we don't try again for `large_page_try_ok` times.\n      mi_atomic_cas_strong_acq_rel(&large_page_try_ok, &try_ok, try_ok - 1);\n    }\n    else {\n      // large OS pages must always reserve and commit.\n      *is_large = true;\n      p = win_virtual_alloc_prim(addr, size, try_alignment, flags | MEM_LARGE_PAGES);\n      if (large_only) return p;\n      // fall back to non-large page allocation on error (`p == NULL`).\n      if (p == NULL) {\n        mi_atomic_store_release(&large_page_try_ok,10UL);  // on error, don't try again for the next N allocations\n      }\n    }\n  }\n  // Fall back to regular page allocation\n  if (p == NULL) {\n    *is_large = ((flags&MEM_LARGE_PAGES) != 0);\n    p = win_virtual_alloc_prim(addr, size, try_alignment, flags);\n  }\n  //if (p == NULL) { _mi_warning_message(\"unable to allocate OS memory (%zu bytes, error code: 0x%x, address: %p, alignment: %zu, flags: 0x%x, large only: %d, allow large: %d)\\n\", size, GetLastError(), addr, try_alignment, flags, large_only, allow_large); }\n  return p;\n}\n\nint _mi_prim_alloc(void* hint_addr, size_t size, size_t try_alignment, bool commit, bool allow_large, bool* is_large, bool* is_zero, void** addr) {\n  mi_assert_internal(size > 0 && (size % _mi_os_page_size()) == 0);\n  mi_assert_internal(commit || !allow_large);\n  mi_assert_internal(try_alignment > 0);\n  *is_zero = true;\n  int flags = MEM_RESERVE;\n  if (commit) { flags |= MEM_COMMIT; }\n  *addr = win_virtual_alloc(hint_addr, size, try_alignment, flags, false, allow_large, is_large);\n  return (*addr != NULL ? 0 : (int)GetLastError());\n}\n\n\n//---------------------------------------------\n// Commit/Reset/Protect\n//---------------------------------------------\n#ifdef _MSC_VER\n#pragma warning(disable:6250)   // suppress warning calling VirtualFree without MEM_RELEASE (for decommit)\n#endif\n\nint _mi_prim_commit(void* addr, size_t size, bool* is_zero) {\n  *is_zero = false;\n  /*\n  // zero'ing only happens on an initial commit... but checking upfront seems expensive..\n  _MEMORY_BASIC_INFORMATION meminfo; _mi_memzero_var(meminfo);\n  if (VirtualQuery(addr, &meminfo, size) > 0) {\n    if ((meminfo.State & MEM_COMMIT) == 0) {\n      *is_zero = true;\n    }\n  }\n  */\n  // commit\n  void* p = VirtualAlloc(addr, size, MEM_COMMIT, PAGE_READWRITE);\n  if (p == NULL) return (int)GetLastError();\n  return 0;\n}\n\nint _mi_prim_decommit(void* addr, size_t size, bool* needs_recommit) {\n  BOOL ok = VirtualFree(addr, size, MEM_DECOMMIT);\n  *needs_recommit = true;  // for safety, assume always decommitted even in the case of an error.\n  return (ok ? 0 : (int)GetLastError());\n}\n\nint _mi_prim_reset(void* addr, size_t size) {\n  void* p = VirtualAlloc(addr, size, MEM_RESET, PAGE_READWRITE);\n  mi_assert_internal(p == addr);\n  #if 0\n  if (p != NULL) {\n    VirtualUnlock(addr,size); // VirtualUnlock after MEM_RESET removes the memory directly from the working set\n  }\n  #endif\n  return (p != NULL ? 0 : (int)GetLastError());\n}\n\nint _mi_prim_protect(void* addr, size_t size, bool protect) {\n  DWORD oldprotect = 0;\n  BOOL ok = VirtualProtect(addr, size, protect ? PAGE_NOACCESS : PAGE_READWRITE, &oldprotect);\n  return (ok ? 0 : (int)GetLastError());\n}\n\n\n//---------------------------------------------\n// Huge page allocation\n//---------------------------------------------\n\nstatic void* _mi_prim_alloc_huge_os_pagesx(void* hint_addr, size_t size, int numa_node)\n{\n  const DWORD flags = MEM_LARGE_PAGES | MEM_COMMIT | MEM_RESERVE;\n\n  win_enable_large_os_pages(NULL);\n\n  MI_MEM_EXTENDED_PARAMETER params[3] = { {{0,0},{0}},{{0,0},{0}},{{0,0},{0}} };\n  // on modern Windows try use NtAllocateVirtualMemoryEx for 1GiB huge pages\n  static bool mi_huge_pages_available = true;\n  if (pNtAllocateVirtualMemoryEx != NULL && mi_huge_pages_available) {\n    params[0].Type.Type = MiMemExtendedParameterAttributeFlags;\n    params[0].Arg.ULong64 = MI_MEM_EXTENDED_PARAMETER_NONPAGED_HUGE;\n    ULONG param_count = 1;\n    if (numa_node >= 0) {\n      param_count++;\n      params[1].Type.Type = MiMemExtendedParameterNumaNode;\n      params[1].Arg.ULong = (unsigned)numa_node;\n    }\n    SIZE_T psize = size;\n    void* base = hint_addr;\n    NTSTATUS err = (*pNtAllocateVirtualMemoryEx)(GetCurrentProcess(), &base, &psize, flags, PAGE_READWRITE, params, param_count);\n    if (err == 0 && base != NULL) {\n      return base;\n    }\n    else {\n      // fall back to regular large pages\n      mi_huge_pages_available = false; // don't try further huge pages\n      _mi_warning_message(\"unable to allocate using huge (1GiB) pages, trying large (2MiB) pages instead (status 0x%lx)\\n\", err);\n    }\n  }\n  // on modern Windows try use VirtualAlloc2 for numa aware large OS page allocation\n  if (pVirtualAlloc2 != NULL && numa_node >= 0) {\n    params[0].Type.Type = MiMemExtendedParameterNumaNode;\n    params[0].Arg.ULong = (unsigned)numa_node;\n    return (*pVirtualAlloc2)(GetCurrentProcess(), hint_addr, size, flags, PAGE_READWRITE, params, 1);\n  }\n\n  // otherwise use regular virtual alloc on older windows\n  return VirtualAlloc(hint_addr, size, flags, PAGE_READWRITE);\n}\n\nint _mi_prim_alloc_huge_os_pages(void* hint_addr, size_t size, int numa_node, bool* is_zero, void** addr) {\n  *is_zero = true;\n  *addr = _mi_prim_alloc_huge_os_pagesx(hint_addr,size,numa_node);\n  return (*addr != NULL ? 0 : (int)GetLastError());\n}\n\n\n//---------------------------------------------\n// Numa nodes\n//---------------------------------------------\n\nsize_t _mi_prim_numa_node(void) {\n  USHORT numa_node = 0;\n  if (pGetCurrentProcessorNumberEx != NULL && pGetNumaProcessorNodeEx != NULL) {\n    // Extended API is supported\n    MI_PROCESSOR_NUMBER pnum;\n    (*pGetCurrentProcessorNumberEx)(&pnum);\n    USHORT nnode = 0;\n    BOOL ok = (*pGetNumaProcessorNodeEx)(&pnum, &nnode);\n    if (ok) { numa_node = nnode; }\n  }\n  else if (pGetNumaProcessorNode != NULL) {\n    // Vista or earlier, use older API that is limited to 64 processors. Issue #277\n    DWORD pnum = GetCurrentProcessorNumber();\n    UCHAR nnode = 0;\n    BOOL ok = pGetNumaProcessorNode((UCHAR)pnum, &nnode);\n    if (ok) { numa_node = nnode; }\n  }\n  return numa_node;\n}\n\nsize_t _mi_prim_numa_node_count(void) {\n  ULONG numa_max = 0;\n  GetNumaHighestNodeNumber(&numa_max);\n  // find the highest node number that has actual processors assigned to it. Issue #282\n  while(numa_max > 0) {\n    if (pGetNumaNodeProcessorMaskEx != NULL) {\n      // Extended API is supported\n      GROUP_AFFINITY affinity;\n      if ((*pGetNumaNodeProcessorMaskEx)((USHORT)numa_max, &affinity)) {\n        if (affinity.Mask != 0) break;  // found the maximum non-empty node\n      }\n    }\n    else {\n      // Vista or earlier, use older API that is limited to 64 processors.\n      ULONGLONG mask;\n      if (GetNumaNodeProcessorMask((UCHAR)numa_max, &mask)) {\n        if (mask != 0) break; // found the maximum non-empty node\n      };\n    }\n    // max node was invalid or had no processor assigned, try again\n    numa_max--;\n  }\n  return ((size_t)numa_max + 1);\n}\n\n\n//----------------------------------------------------------------\n// Clock\n//----------------------------------------------------------------\n\nstatic mi_msecs_t mi_to_msecs(LARGE_INTEGER t) {\n  static LARGE_INTEGER mfreq; // = 0\n  if (mfreq.QuadPart == 0LL) {\n    LARGE_INTEGER f;\n    QueryPerformanceFrequency(&f);\n    mfreq.QuadPart = f.QuadPart/1000LL;\n    if (mfreq.QuadPart == 0) mfreq.QuadPart = 1;\n  }\n  return (mi_msecs_t)(t.QuadPart / mfreq.QuadPart);\n}\n\nmi_msecs_t _mi_prim_clock_now(void) {\n  LARGE_INTEGER t;\n  QueryPerformanceCounter(&t);\n  return mi_to_msecs(t);\n}\n\n\n//----------------------------------------------------------------\n// Process Info\n//----------------------------------------------------------------\n\n#include <psapi.h>\n\nstatic mi_msecs_t filetime_msecs(const FILETIME* ftime) {\n  ULARGE_INTEGER i;\n  i.LowPart = ftime->dwLowDateTime;\n  i.HighPart = ftime->dwHighDateTime;\n  mi_msecs_t msecs = (i.QuadPart / 10000); // FILETIME is in 100 nano seconds\n  return msecs;\n}\n\ntypedef BOOL (WINAPI *PGetProcessMemoryInfo)(HANDLE, PPROCESS_MEMORY_COUNTERS, DWORD);\nstatic PGetProcessMemoryInfo pGetProcessMemoryInfo = NULL;\n\nvoid _mi_prim_process_info(mi_process_info_t* pinfo)\n{\n  FILETIME ct;\n  FILETIME ut;\n  FILETIME st;\n  FILETIME et;\n  GetProcessTimes(GetCurrentProcess(), &ct, &et, &st, &ut);\n  pinfo->utime = filetime_msecs(&ut);\n  pinfo->stime = filetime_msecs(&st);\n\n  // load psapi on demand\n  if (pGetProcessMemoryInfo == NULL) {\n    HINSTANCE hDll = LoadLibrary(TEXT(\"psapi.dll\"));\n    if (hDll != NULL) {\n      pGetProcessMemoryInfo = (PGetProcessMemoryInfo)(void (*)(void))GetProcAddress(hDll, \"GetProcessMemoryInfo\");\n    }\n  }\n\n  // get process info\n  PROCESS_MEMORY_COUNTERS info; _mi_memzero_var(info);\n  if (pGetProcessMemoryInfo != NULL) {\n    pGetProcessMemoryInfo(GetCurrentProcess(), &info, sizeof(info));\n  }\n  pinfo->current_rss    = (size_t)info.WorkingSetSize;\n  pinfo->peak_rss       = (size_t)info.PeakWorkingSetSize;\n  pinfo->current_commit = (size_t)info.PagefileUsage;\n  pinfo->peak_commit    = (size_t)info.PeakPagefileUsage;\n  pinfo->page_faults    = (size_t)info.PageFaultCount;\n}\n\n//----------------------------------------------------------------\n// Output\n//----------------------------------------------------------------\n\nvoid _mi_prim_out_stderr( const char* msg )\n{\n  // on windows with redirection, the C runtime cannot handle locale dependent output\n  // after the main thread closes so we use direct console output.\n  if (!_mi_preloading()) {\n    // _cputs(msg);  // _cputs cannot be used as it aborts when failing to lock the console\n    static HANDLE hcon = INVALID_HANDLE_VALUE;\n    static bool hconIsConsole;\n    if (hcon == INVALID_HANDLE_VALUE) {\n      CONSOLE_SCREEN_BUFFER_INFO sbi;\n      hcon = GetStdHandle(STD_ERROR_HANDLE);\n      hconIsConsole = ((hcon != INVALID_HANDLE_VALUE) && GetConsoleScreenBufferInfo(hcon, &sbi));\n    }\n    const size_t len = _mi_strlen(msg);\n    if (len > 0 && len < UINT32_MAX) {\n      DWORD written = 0;\n      if (hconIsConsole) {\n        WriteConsoleA(hcon, msg, (DWORD)len, &written, NULL);\n      }\n      else if (hcon != INVALID_HANDLE_VALUE) {\n        // use direct write if stderr was redirected\n        WriteFile(hcon, msg, (DWORD)len, &written, NULL);\n      }\n      else {\n        // finally fall back to fputs after all\n        fputs(msg, stderr);\n      }\n    }\n  }\n}\n\n\n//----------------------------------------------------------------\n// Environment\n//----------------------------------------------------------------\n\n// On Windows use GetEnvironmentVariable instead of getenv to work\n// reliably even when this is invoked before the C runtime is initialized.\n// i.e. when `_mi_preloading() == true`.\n// Note: on windows, environment names are not case sensitive.\nbool _mi_prim_getenv(const char* name, char* result, size_t result_size) {\n  result[0] = 0;\n  size_t len = GetEnvironmentVariableA(name, result, (DWORD)result_size);\n  return (len > 0 && len < result_size);\n}\n\n\n//----------------------------------------------------------------\n// Random\n//----------------------------------------------------------------\n\n#if defined(MI_USE_RTLGENRANDOM) // || defined(__cplusplus)\n// We prefer to use BCryptGenRandom instead of (the unofficial) RtlGenRandom but when using\n// dynamic overriding, we observed it can raise an exception when compiled with C++, and\n// sometimes deadlocks when also running under the VS debugger.\n// In contrast, issue #623 implies that on Windows Server 2019 we need to use BCryptGenRandom.\n// To be continued..\n#pragma comment (lib,\"advapi32.lib\")\n#define RtlGenRandom  SystemFunction036\nmi_decl_externc BOOLEAN NTAPI RtlGenRandom(PVOID RandomBuffer, ULONG RandomBufferLength);\n\nbool _mi_prim_random_buf(void* buf, size_t buf_len) {\n  return (RtlGenRandom(buf, (ULONG)buf_len) != 0);\n}\n\n#else\n\n#ifndef BCRYPT_USE_SYSTEM_PREFERRED_RNG\n#define BCRYPT_USE_SYSTEM_PREFERRED_RNG 0x00000002\n#endif\n\ntypedef LONG (NTAPI *PBCryptGenRandom)(HANDLE, PUCHAR, ULONG, ULONG);\nstatic  PBCryptGenRandom pBCryptGenRandom = NULL;\n\nbool _mi_prim_random_buf(void* buf, size_t buf_len) {\n  if (pBCryptGenRandom == NULL) {\n    HINSTANCE hDll = LoadLibrary(TEXT(\"bcrypt.dll\"));\n    if (hDll != NULL) {\n      pBCryptGenRandom = (PBCryptGenRandom)(void (*)(void))GetProcAddress(hDll, \"BCryptGenRandom\");\n    }\n    if (pBCryptGenRandom == NULL) return false;\n  }\n  return (pBCryptGenRandom(NULL, (PUCHAR)buf, (ULONG)buf_len, BCRYPT_USE_SYSTEM_PREFERRED_RNG) >= 0);\n}\n\n#endif  // MI_USE_RTLGENRANDOM\n\n\n\n//----------------------------------------------------------------\n// Process & Thread Init/Done\n//----------------------------------------------------------------\n\nstatic void NTAPI mi_win_main(PVOID module, DWORD reason, LPVOID reserved) {\n  MI_UNUSED(reserved);\n  MI_UNUSED(module);\n  #if MI_TLS_SLOT >= 2\n  if ((reason==DLL_PROCESS_ATTACH || reason==DLL_THREAD_ATTACH) && mi_prim_get_default_heap() == NULL) {\n    _mi_heap_set_default_direct((mi_heap_t*)&_mi_heap_empty);\n  }\n  #endif\n  if (reason==DLL_PROCESS_ATTACH) {\n    _mi_process_load();\n  }\n  else if (reason==DLL_PROCESS_DETACH) {\n    _mi_process_done();\n  }\n  else if (reason==DLL_THREAD_DETACH && !_mi_is_redirected()) {\n    _mi_thread_done(NULL);\n  }\n}\n\n\n#if defined(MI_SHARED_LIB)\n  #define MI_PRIM_HAS_PROCESS_ATTACH  1\n\n  // Windows DLL: easy to hook into process_init and thread_done\n  BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) {\n    mi_win_main((PVOID)inst,reason,reserved);\n    return TRUE;\n  }\n\n  // nothing to do since `_mi_thread_done` is handled through the DLL_THREAD_DETACH event.\n  void _mi_prim_thread_init_auto_done(void) { }\n  void _mi_prim_thread_done_auto_done(void) { }\n  void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {\n    MI_UNUSED(heap);\n  }\n\n#elif !defined(MI_WIN_USE_FLS)\n  #define MI_PRIM_HAS_PROCESS_ATTACH  1\n\n  static void NTAPI mi_win_main_attach(PVOID module, DWORD reason, LPVOID reserved) {\n    if (reason == DLL_PROCESS_ATTACH || reason == DLL_THREAD_ATTACH) {\n      mi_win_main(module, reason, reserved);\n    }\n  }\n  static void NTAPI mi_win_main_detach(PVOID module, DWORD reason, LPVOID reserved) {\n    if (reason == DLL_PROCESS_DETACH || reason == DLL_THREAD_DETACH) {\n      mi_win_main(module, reason, reserved);\n    }\n  }\n\n  // Set up TLS callbacks in a statically linked library by using special data sections.\n  // See <https://stackoverflow.com/questions/14538159/tls-callback-in-windows>\n  // We use 2 entries to ensure we call attach events before constructors\n  // are called, and detach events after destructors are called.\n  #if defined(__cplusplus)\n  extern \"C\" {\n  #endif\n\n  #if defined(_WIN64)\n    #pragma comment(linker, \"/INCLUDE:_tls_used\")\n    #pragma comment(linker, \"/INCLUDE:_mi_tls_callback_pre\")\n    #pragma comment(linker, \"/INCLUDE:_mi_tls_callback_post\")\n    #pragma const_seg(\".CRT$XLB\")\n    extern const PIMAGE_TLS_CALLBACK _mi_tls_callback_pre[];\n    const PIMAGE_TLS_CALLBACK _mi_tls_callback_pre[] = { &mi_win_main_attach };\n    #pragma const_seg()\n    #pragma const_seg(\".CRT$XLY\")\n    extern const PIMAGE_TLS_CALLBACK _mi_tls_callback_post[];\n    const PIMAGE_TLS_CALLBACK _mi_tls_callback_post[] = { &mi_win_main_detach };\n    #pragma const_seg()\n  #else\n    #pragma comment(linker, \"/INCLUDE:__tls_used\")\n    #pragma comment(linker, \"/INCLUDE:__mi_tls_callback_pre\")\n    #pragma comment(linker, \"/INCLUDE:__mi_tls_callback_post\")\n    #pragma data_seg(\".CRT$XLB\")\n    PIMAGE_TLS_CALLBACK _mi_tls_callback_pre[] = { &mi_win_main_attach };\n    #pragma data_seg()\n    #pragma data_seg(\".CRT$XLY\")\n    PIMAGE_TLS_CALLBACK _mi_tls_callback_post[] = { &mi_win_main_detach };\n    #pragma data_seg()\n  #endif\n\n  #if defined(__cplusplus)\n  }\n  #endif\n\n  // nothing to do since `_mi_thread_done` is handled through the DLL_THREAD_DETACH event.\n  void _mi_prim_thread_init_auto_done(void) { }\n  void _mi_prim_thread_done_auto_done(void) { }\n  void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {\n    MI_UNUSED(heap);\n  }\n\n#else // deprecated: statically linked, use fiber api\n\n  #if defined(_MSC_VER) // on clang/gcc use the constructor attribute (in `src/prim/prim.c`)\n    // MSVC: use data section magic for static libraries\n    // See <https://www.codeguru.com/cpp/misc/misc/applicationcontrol/article.php/c6945/Running-Code-Before-and-After-Main.htm>\n    #define MI_PRIM_HAS_PROCESS_ATTACH 1\n\n    static int mi_process_attach(void) {\n      mi_win_main(NULL,DLL_PROCESS_ATTACH,NULL);\n      atexit(&_mi_process_done);\n      return 0;\n    }\n    typedef int(*mi_crt_callback_t)(void);\n    #if defined(_WIN64)\n      #pragma comment(linker, \"/INCLUDE:_mi_tls_callback\")\n      #pragma section(\".CRT$XIU\", long, read)\n    #else\n      #pragma comment(linker, \"/INCLUDE:__mi_tls_callback\")\n    #endif\n    #pragma data_seg(\".CRT$XIU\")\n    mi_decl_externc mi_crt_callback_t _mi_tls_callback[] = { &mi_process_attach };\n    #pragma data_seg()\n  #endif\n\n  // use the fiber api for calling `_mi_thread_done`.\n  #include <fibersapi.h>\n  #if (_WIN32_WINNT < 0x600)  // before Windows Vista\n  WINBASEAPI DWORD WINAPI FlsAlloc( _In_opt_ PFLS_CALLBACK_FUNCTION lpCallback );\n  WINBASEAPI PVOID WINAPI FlsGetValue( _In_ DWORD dwFlsIndex );\n  WINBASEAPI BOOL  WINAPI FlsSetValue( _In_ DWORD dwFlsIndex, _In_opt_ PVOID lpFlsData );\n  WINBASEAPI BOOL  WINAPI FlsFree(_In_ DWORD dwFlsIndex);\n  #endif\n\n  static DWORD mi_fls_key = (DWORD)(-1);\n\n  static void NTAPI mi_fls_done(PVOID value) {\n    mi_heap_t* heap = (mi_heap_t*)value;\n    if (heap != NULL) {\n      _mi_thread_done(heap);\n      FlsSetValue(mi_fls_key, NULL);  // prevent recursion as _mi_thread_done may set it back to the main heap, issue #672\n    }\n  }\n\n  void _mi_prim_thread_init_auto_done(void) {\n    mi_fls_key = FlsAlloc(&mi_fls_done);\n  }\n\n  void _mi_prim_thread_done_auto_done(void) {\n    // call thread-done on all threads (except the main thread) to prevent\n    // dangling callback pointer if statically linked with a DLL; Issue #208\n    FlsFree(mi_fls_key);\n  }\n\n  void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {\n    mi_assert_internal(mi_fls_key != (DWORD)(-1));\n    FlsSetValue(mi_fls_key, heap);\n  }\n#endif\n\n// ----------------------------------------------------\n// Communicate with the redirection module on Windows\n// ----------------------------------------------------\n#if defined(MI_SHARED_LIB) && !defined(MI_WIN_NOREDIRECT)\n  #define MI_PRIM_HAS_ALLOCATOR_INIT 1\n\n  static bool mi_redirected = false;   // true if malloc redirects to mi_malloc\n\n  bool _mi_is_redirected(void) {\n    return mi_redirected;\n  }\n\n  #ifdef __cplusplus\n  extern \"C\" {\n  #endif\n  mi_decl_export void _mi_redirect_entry(DWORD reason) {\n    // called on redirection; careful as this may be called before DllMain\n    #if MI_TLS_SLOT >= 2\n    if ((reason==DLL_PROCESS_ATTACH || reason==DLL_THREAD_ATTACH) && mi_prim_get_default_heap() == NULL) {\n      _mi_heap_set_default_direct((mi_heap_t*)&_mi_heap_empty);\n    }\n    #endif\n    if (reason == DLL_PROCESS_ATTACH) {\n      mi_redirected = true;\n    }\n    else if (reason == DLL_PROCESS_DETACH) {\n      mi_redirected = false;\n    }\n    else if (reason == DLL_THREAD_DETACH) {\n      _mi_thread_done(NULL);\n    }\n  }\n  __declspec(dllimport) bool mi_cdecl mi_allocator_init(const char** message);\n  __declspec(dllimport) void mi_cdecl mi_allocator_done(void);\n  #ifdef __cplusplus\n  }\n  #endif\n  bool _mi_allocator_init(const char** message) {\n    return mi_allocator_init(message);\n  }\n  void _mi_allocator_done(void) {\n    mi_allocator_done();\n  }\n#endif\n"
  },
  {
    "path": "third-party/mimalloc/src/prim/windows/readme.md",
    "content": "## Primitives:\n\n- `prim.c` contains Windows primitives for OS allocation.\n\n## Event Tracing for Windows (ETW)\n\n- `etw.h` is generated from `etw.man` which contains the manifest for mimalloc events.\n  (100 is an allocation, 101 is for a free)\n\n- `etw-mimalloc.wprp` is a profile for the Windows Performance Recorder (WPR).\n  In an admin prompt, you can use:\n  ```\n  > wpr -start src\\prim\\windows\\etw-mimalloc.wprp -filemode\n  > <my mimalloc program>\n  > wpr -stop test.etl\n  ``` \n  and then open `test.etl` in the Windows Performance Analyzer (WPA)."
  },
  {
    "path": "third-party/mimalloc/src/random.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2019-2021, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"mimalloc/prim.h\"    // _mi_prim_random_buf\n#include <string.h>       // memset\n\n/* ----------------------------------------------------------------------------\nWe use our own PRNG to keep predictable performance of random number generation\nand to avoid implementations that use a lock. We only use the OS provided\nrandom source to initialize the initial seeds. Since we do not need ultimate\nperformance but we do rely on the security (for secret cookies in secure mode)\nwe use a cryptographically secure generator (chacha20).\n-----------------------------------------------------------------------------*/\n\n#define MI_CHACHA_ROUNDS (20)   // perhaps use 12 for better performance?\n\n\n/* ----------------------------------------------------------------------------\nChacha20 implementation as the original algorithm with a 64-bit nonce\nand counter: https://en.wikipedia.org/wiki/Salsa20\nThe input matrix has sixteen 32-bit values:\nPosition  0 to  3: constant key\nPosition  4 to 11: the key\nPosition 12 to 13: the counter.\nPosition 14 to 15: the nonce.\n\nThe implementation uses regular C code which compiles very well on modern compilers.\n(gcc x64 has no register spills, and clang 6+ uses SSE instructions)\n-----------------------------------------------------------------------------*/\n\nstatic inline uint32_t rotl(uint32_t x, uint32_t shift) {\n  return (x << shift) | (x >> (32 - shift));\n}\n\nstatic inline void qround(uint32_t x[16], size_t a, size_t b, size_t c, size_t d) {\n  x[a] += x[b]; x[d] = rotl(x[d] ^ x[a], 16);\n  x[c] += x[d]; x[b] = rotl(x[b] ^ x[c], 12);\n  x[a] += x[b]; x[d] = rotl(x[d] ^ x[a], 8);\n  x[c] += x[d]; x[b] = rotl(x[b] ^ x[c], 7);\n}\n\nstatic void chacha_block(mi_random_ctx_t* ctx)\n{\n  // scramble into `x`\n  uint32_t x[16];\n  for (size_t i = 0; i < 16; i++) {\n    x[i] = ctx->input[i];\n  }\n  for (size_t i = 0; i < MI_CHACHA_ROUNDS; i += 2) {\n    qround(x, 0, 4,  8, 12);\n    qround(x, 1, 5,  9, 13);\n    qround(x, 2, 6, 10, 14);\n    qround(x, 3, 7, 11, 15);\n    qround(x, 0, 5, 10, 15);\n    qround(x, 1, 6, 11, 12);\n    qround(x, 2, 7,  8, 13);\n    qround(x, 3, 4,  9, 14);\n  }\n\n  // add scrambled data to the initial state\n  for (size_t i = 0; i < 16; i++) {\n    ctx->output[i] = x[i] + ctx->input[i];\n  }\n  ctx->output_available = 16;\n\n  // increment the counter for the next round\n  ctx->input[12] += 1;\n  if (ctx->input[12] == 0) {\n    ctx->input[13] += 1;\n    if (ctx->input[13] == 0) {  // and keep increasing into the nonce\n      ctx->input[14] += 1;\n    }\n  }\n}\n\nstatic uint32_t chacha_next32(mi_random_ctx_t* ctx) {\n  if (ctx->output_available <= 0) {\n    chacha_block(ctx);\n    ctx->output_available = 16; // (assign again to suppress static analysis warning)\n  }\n  const uint32_t x = ctx->output[16 - ctx->output_available];\n  ctx->output[16 - ctx->output_available] = 0; // reset once the data is handed out\n  ctx->output_available--;\n  return x;\n}\n\nstatic inline uint32_t read32(const uint8_t* p, size_t idx32) {\n  const size_t i = 4*idx32;\n  return ((uint32_t)p[i+0] | (uint32_t)p[i+1] << 8 | (uint32_t)p[i+2] << 16 | (uint32_t)p[i+3] << 24);\n}\n\nstatic void chacha_init(mi_random_ctx_t* ctx, const uint8_t key[32], uint64_t nonce)\n{\n  // since we only use chacha for randomness (and not encryption) we\n  // do not _need_ to read 32-bit values as little endian but we do anyways\n  // just for being compatible :-)\n  memset(ctx, 0, sizeof(*ctx));\n  for (size_t i = 0; i < 4; i++) {\n    const uint8_t* sigma = (uint8_t*)\"expand 32-byte k\";\n    ctx->input[i] = read32(sigma,i);\n  }\n  for (size_t i = 0; i < 8; i++) {\n    ctx->input[i + 4] = read32(key,i);\n  }\n  ctx->input[12] = 0;\n  ctx->input[13] = 0;\n  ctx->input[14] = (uint32_t)nonce;\n  ctx->input[15] = (uint32_t)(nonce >> 32);\n}\n\nstatic void chacha_split(mi_random_ctx_t* ctx, uint64_t nonce, mi_random_ctx_t* ctx_new) {\n  memset(ctx_new, 0, sizeof(*ctx_new));\n  _mi_memcpy(ctx_new->input, ctx->input, sizeof(ctx_new->input));\n  ctx_new->input[12] = 0;\n  ctx_new->input[13] = 0;\n  ctx_new->input[14] = (uint32_t)nonce;\n  ctx_new->input[15] = (uint32_t)(nonce >> 32);\n  mi_assert_internal(ctx->input[14] != ctx_new->input[14] || ctx->input[15] != ctx_new->input[15]); // do not reuse nonces!\n  chacha_block(ctx_new);\n}\n\n\n/* ----------------------------------------------------------------------------\nRandom interface\n-----------------------------------------------------------------------------*/\n\n#if MI_DEBUG>1\nstatic bool mi_random_is_initialized(mi_random_ctx_t* ctx) {\n  return (ctx != NULL && ctx->input[0] != 0);\n}\n#endif\n\nvoid _mi_random_split(mi_random_ctx_t* ctx, mi_random_ctx_t* ctx_new) {\n  mi_assert_internal(mi_random_is_initialized(ctx));\n  mi_assert_internal(ctx != ctx_new);\n  chacha_split(ctx, (uintptr_t)ctx_new /*nonce*/, ctx_new);\n}\n\nuintptr_t _mi_random_next(mi_random_ctx_t* ctx) {\n  mi_assert_internal(mi_random_is_initialized(ctx));\n  #if MI_INTPTR_SIZE <= 4\n    return chacha_next32(ctx);\n  #elif MI_INTPTR_SIZE == 8\n    return (((uintptr_t)chacha_next32(ctx) << 32) | chacha_next32(ctx));\n  #else\n  # error \"define mi_random_next for this platform\"\n  #endif\n}\n\n\n/* ----------------------------------------------------------------------------\nTo initialize a fresh random context.\nIf we cannot get good randomness, we fall back to weak randomness based on a timer and ASLR.\n-----------------------------------------------------------------------------*/\n\nuintptr_t _mi_os_random_weak(uintptr_t extra_seed) {\n  uintptr_t x = (uintptr_t)&_mi_os_random_weak ^ extra_seed; // ASLR makes the address random\n  x ^= _mi_prim_clock_now();  \n  // and do a few randomization steps\n  uintptr_t max = ((x ^ (x >> 17)) & 0x0F) + 1;\n  for (uintptr_t i = 0; i < max; i++) {\n    x = _mi_random_shuffle(x);\n  }\n  mi_assert_internal(x != 0);\n  return x;\n}\n\nstatic void mi_random_init_ex(mi_random_ctx_t* ctx, bool use_weak) {\n  uint8_t key[32];\n  if (use_weak || !_mi_prim_random_buf(key, sizeof(key))) {\n    // if we fail to get random data from the OS, we fall back to a\n    // weak random source based on the current time\n    #if !defined(__wasi__)\n    if (!use_weak) { _mi_warning_message(\"unable to use secure randomness\\n\"); }\n    #endif\n    uintptr_t x = _mi_os_random_weak(0);\n    for (size_t i = 0; i < 8; i++) {  // key is eight 32-bit words.\n      x = _mi_random_shuffle(x);\n      ((uint32_t*)key)[i] = (uint32_t)x;\n    }\n    ctx->weak = true;\n  }\n  else {\n    ctx->weak = false;\n  }\n  chacha_init(ctx, key, (uintptr_t)ctx /*nonce*/ );\n}\n\nvoid _mi_random_init(mi_random_ctx_t* ctx) {\n  mi_random_init_ex(ctx, false);\n}\n\nvoid _mi_random_init_weak(mi_random_ctx_t * ctx) {\n  mi_random_init_ex(ctx, true);\n}\n\nvoid _mi_random_reinit_if_weak(mi_random_ctx_t * ctx) {\n  if (ctx->weak) {\n    _mi_random_init(ctx);\n  }\n}\n\n/* --------------------------------------------------------\ntest vectors from <https://tools.ietf.org/html/rfc8439>\n----------------------------------------------------------- */\n/*\nstatic bool array_equals(uint32_t* x, uint32_t* y, size_t n) {\n  for (size_t i = 0; i < n; i++) {\n    if (x[i] != y[i]) return false;\n  }\n  return true;\n}\nstatic void chacha_test(void)\n{\n  uint32_t x[4] = { 0x11111111, 0x01020304, 0x9b8d6f43, 0x01234567 };\n  uint32_t x_out[4] = { 0xea2a92f4, 0xcb1cf8ce, 0x4581472e, 0x5881c4bb };\n  qround(x, 0, 1, 2, 3);\n  mi_assert_internal(array_equals(x, x_out, 4));\n\n  uint32_t y[16] = {\n       0x879531e0,  0xc5ecf37d,  0x516461b1,  0xc9a62f8a,\n       0x44c20ef3,  0x3390af7f,  0xd9fc690b,  0x2a5f714c,\n       0x53372767,  0xb00a5631,  0x974c541a,  0x359e9963,\n       0x5c971061,  0x3d631689,  0x2098d9d6,  0x91dbd320 };\n  uint32_t y_out[16] = {\n       0x879531e0,  0xc5ecf37d,  0xbdb886dc,  0xc9a62f8a,\n       0x44c20ef3,  0x3390af7f,  0xd9fc690b,  0xcfacafd2,\n       0xe46bea80,  0xb00a5631,  0x974c541a,  0x359e9963,\n       0x5c971061,  0xccc07c79,  0x2098d9d6,  0x91dbd320 };\n  qround(y, 2, 7, 8, 13);\n  mi_assert_internal(array_equals(y, y_out, 16));\n\n  mi_random_ctx_t r = {\n    { 0x61707865, 0x3320646e, 0x79622d32, 0x6b206574,\n      0x03020100, 0x07060504, 0x0b0a0908, 0x0f0e0d0c,\n      0x13121110, 0x17161514, 0x1b1a1918, 0x1f1e1d1c,\n      0x00000001, 0x09000000, 0x4a000000, 0x00000000 },\n    {0},\n    0\n  };\n  uint32_t r_out[16] = {\n       0xe4e7f110, 0x15593bd1, 0x1fdd0f50, 0xc47120a3,\n       0xc7f4d1c7, 0x0368c033, 0x9aaa2204, 0x4e6cd4c3,\n       0x466482d2, 0x09aa9f07, 0x05d7c214, 0xa2028bd9,\n       0xd19c12b5, 0xb94e16de, 0xe883d0cb, 0x4e3c50a2 };\n  chacha_block(&r);\n  mi_assert_internal(array_equals(r.output, r_out, 16));\n}\n*/\n"
  },
  {
    "path": "third-party/mimalloc/src/segment-map.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2019-2023, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n/* -----------------------------------------------------------\n  The following functions are to reliably find the segment or\n  block that encompasses any pointer p (or NULL if it is not\n  in any of our segments).\n  We maintain a bitmap of all memory with 1 bit per MI_SEGMENT_SIZE (64MiB)\n  set to 1 if it contains the segment meta data.\n----------------------------------------------------------- */\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"mimalloc/atomic.h\"\n\n// Reduce total address space to reduce .bss  (due to the `mi_segment_map`)\n#if (MI_INTPTR_SIZE > 4) && MI_TRACK_ASAN\n#define MI_SEGMENT_MAP_MAX_ADDRESS    (128*1024ULL*MI_GiB)  // 128 TiB  (see issue #881)\n#elif (MI_INTPTR_SIZE > 4)\n#define MI_SEGMENT_MAP_MAX_ADDRESS    (48*1024ULL*MI_GiB)   // 48 TiB\n#else\n#define MI_SEGMENT_MAP_MAX_ADDRESS    (UINT32_MAX)\n#endif\n\n#define MI_SEGMENT_MAP_PART_SIZE      (MI_INTPTR_SIZE*MI_KiB - 128)      // 128 > sizeof(mi_memid_t) ! \n#define MI_SEGMENT_MAP_PART_BITS      (8*MI_SEGMENT_MAP_PART_SIZE)\n#define MI_SEGMENT_MAP_PART_ENTRIES   (MI_SEGMENT_MAP_PART_SIZE / MI_INTPTR_SIZE)\n#define MI_SEGMENT_MAP_PART_BIT_SPAN  (MI_SEGMENT_ALIGN)                 // memory area covered by 1 bit\n\n#if (MI_SEGMENT_MAP_PART_BITS < (MI_SEGMENT_MAP_MAX_ADDRESS / MI_SEGMENT_MAP_PART_BIT_SPAN)) // prevent overflow on 32-bit (issue #1017)\n#define MI_SEGMENT_MAP_PART_SPAN      (MI_SEGMENT_MAP_PART_BITS * MI_SEGMENT_MAP_PART_BIT_SPAN)\n#else\n#define MI_SEGMENT_MAP_PART_SPAN      MI_SEGMENT_MAP_MAX_ADDRESS\n#endif\n\n#define MI_SEGMENT_MAP_MAX_PARTS      ((MI_SEGMENT_MAP_MAX_ADDRESS / MI_SEGMENT_MAP_PART_SPAN) + 1)\n\n// A part of the segment map.\ntypedef struct mi_segmap_part_s {\n  mi_memid_t memid;\n  _Atomic(uintptr_t) map[MI_SEGMENT_MAP_PART_ENTRIES];\n} mi_segmap_part_t;\n\n// Allocate parts on-demand to reduce .bss footprint\nstatic _Atomic(mi_segmap_part_t*) mi_segment_map[MI_SEGMENT_MAP_MAX_PARTS]; // = { NULL, .. }\n\nstatic mi_segmap_part_t* mi_segment_map_index_of(const mi_segment_t* segment, bool create_on_demand, size_t* idx, size_t* bitidx) {\n  // note: segment can be invalid or NULL.\n  mi_assert_internal(_mi_ptr_segment(segment + 1) == segment); // is it aligned on MI_SEGMENT_SIZE?\n  *idx = 0;\n  *bitidx = 0;  \n  if ((uintptr_t)segment >= MI_SEGMENT_MAP_MAX_ADDRESS) return NULL;\n  const uintptr_t segindex = ((uintptr_t)segment) / MI_SEGMENT_MAP_PART_SPAN;\n  if (segindex >= MI_SEGMENT_MAP_MAX_PARTS) return NULL;\n  mi_segmap_part_t* part = mi_atomic_load_ptr_relaxed(mi_segmap_part_t, &mi_segment_map[segindex]);\n\n  // allocate on demand to reduce .bss footprint\n  if mi_unlikely(part == NULL) {\n    if (!create_on_demand) return NULL;\n    mi_memid_t memid;\n    part = (mi_segmap_part_t*)_mi_os_alloc(sizeof(mi_segmap_part_t), &memid);\n    if (part == NULL) return NULL;\n    part->memid = memid;\n    mi_segmap_part_t* expected = NULL;\n    if (!mi_atomic_cas_ptr_strong_release(mi_segmap_part_t, &mi_segment_map[segindex], &expected, part)) {\n      _mi_os_free(part, sizeof(mi_segmap_part_t), memid);\n      part = expected;\n      if (part == NULL) return NULL;\n    }\n  }\n  mi_assert(part != NULL);\n  const uintptr_t offset = ((uintptr_t)segment) % MI_SEGMENT_MAP_PART_SPAN;\n  const uintptr_t bitofs = offset / MI_SEGMENT_MAP_PART_BIT_SPAN;\n  *idx = bitofs / MI_INTPTR_BITS;\n  *bitidx = bitofs % MI_INTPTR_BITS;\n  return part;\n}\n\nvoid _mi_segment_map_allocated_at(const mi_segment_t* segment) {\n  if (segment->memid.memkind == MI_MEM_ARENA) return; // we lookup segments first in the arena's and don't need the segment map\n  size_t index;\n  size_t bitidx;\n  mi_segmap_part_t* part = mi_segment_map_index_of(segment, true /* alloc map if needed */, &index, &bitidx);\n  if (part == NULL) return; // outside our address range..\n  uintptr_t mask = mi_atomic_load_relaxed(&part->map[index]);\n  uintptr_t newmask;\n  do {\n    newmask = (mask | ((uintptr_t)1 << bitidx));\n  } while (!mi_atomic_cas_weak_release(&part->map[index], &mask, newmask));\n}\n\nvoid _mi_segment_map_freed_at(const mi_segment_t* segment) {\n  if (segment->memid.memkind == MI_MEM_ARENA) return;\n  size_t index;\n  size_t bitidx;\n  mi_segmap_part_t* part = mi_segment_map_index_of(segment, false /* don't alloc if not present */, &index, &bitidx);\n  if (part == NULL) return; // outside our address range..\n  uintptr_t mask = mi_atomic_load_relaxed(&part->map[index]);\n  uintptr_t newmask;\n  do {\n    newmask = (mask & ~((uintptr_t)1 << bitidx));\n  } while (!mi_atomic_cas_weak_release(&part->map[index], &mask, newmask));\n}\n\n// Determine the segment belonging to a pointer or NULL if it is not in a valid segment.\nstatic mi_segment_t* _mi_segment_of(const void* p) {\n  if (p == NULL) return NULL;\n  mi_segment_t* segment = _mi_ptr_segment(p);  // segment can be NULL  \n  size_t index;\n  size_t bitidx;\n  mi_segmap_part_t* part = mi_segment_map_index_of(segment, false /* dont alloc if not present */, &index, &bitidx);\n  if (part == NULL) return NULL;  \n  const uintptr_t mask = mi_atomic_load_relaxed(&part->map[index]);\n  if mi_likely((mask & ((uintptr_t)1 << bitidx)) != 0) {\n    bool cookie_ok = (_mi_ptr_cookie(segment) == segment->cookie);\n    mi_assert_internal(cookie_ok); MI_UNUSED(cookie_ok);\n    return segment; // yes, allocated by us\n  }\n  return NULL;\n}\n\n// Is this a valid pointer in our heap?\nstatic bool mi_is_valid_pointer(const void* p) {\n  // first check if it is in an arena, then check if it is OS allocated\n  return (_mi_arena_contains(p) || _mi_segment_of(p) != NULL);\n}\n\nmi_decl_nodiscard mi_decl_export bool mi_is_in_heap_region(const void* p) mi_attr_noexcept {\n  return mi_is_valid_pointer(p);\n}\n\nvoid _mi_segment_map_unsafe_destroy(void) {\n  for (size_t i = 0; i < MI_SEGMENT_MAP_MAX_PARTS; i++) {\n    mi_segmap_part_t* part = mi_atomic_exchange_ptr_relaxed(mi_segmap_part_t, &mi_segment_map[i], NULL);\n    if (part != NULL) {\n      _mi_os_free(part, sizeof(mi_segmap_part_t), part->memid);\n    }\n  }\n}\n"
  },
  {
    "path": "third-party/mimalloc/src/segment.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2024, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"mimalloc/atomic.h\"\n\n#include <string.h>  // memset\n#include <stdio.h>\n\n// -------------------------------------------------------------------\n// Segments\n// mimalloc pages reside in segments. See `mi_segment_valid` for invariants.\n// -------------------------------------------------------------------\n\n\nstatic void mi_segment_try_purge(mi_segment_t* segment, bool force);\n\n\n// -------------------------------------------------------------------\n// commit mask\n// -------------------------------------------------------------------\n\nstatic bool mi_commit_mask_all_set(const mi_commit_mask_t* commit, const mi_commit_mask_t* cm) {\n  for (size_t i = 0; i < MI_COMMIT_MASK_FIELD_COUNT; i++) {\n    if ((commit->mask[i] & cm->mask[i]) != cm->mask[i]) return false;\n  }\n  return true;\n}\n\nstatic bool mi_commit_mask_any_set(const mi_commit_mask_t* commit, const mi_commit_mask_t* cm) {\n  for (size_t i = 0; i < MI_COMMIT_MASK_FIELD_COUNT; i++) {\n    if ((commit->mask[i] & cm->mask[i]) != 0) return true;\n  }\n  return false;\n}\n\nstatic void mi_commit_mask_create_intersect(const mi_commit_mask_t* commit, const mi_commit_mask_t* cm, mi_commit_mask_t* res) {\n  for (size_t i = 0; i < MI_COMMIT_MASK_FIELD_COUNT; i++) {\n    res->mask[i] = (commit->mask[i] & cm->mask[i]);\n  }\n}\n\nstatic void mi_commit_mask_clear(mi_commit_mask_t* res, const mi_commit_mask_t* cm) {\n  for (size_t i = 0; i < MI_COMMIT_MASK_FIELD_COUNT; i++) {\n    res->mask[i] &= ~(cm->mask[i]);\n  }\n}\n\nstatic void mi_commit_mask_set(mi_commit_mask_t* res, const mi_commit_mask_t* cm) {\n  for (size_t i = 0; i < MI_COMMIT_MASK_FIELD_COUNT; i++) {\n    res->mask[i] |= cm->mask[i];\n  }\n}\n\nstatic void mi_commit_mask_create(size_t bitidx, size_t bitcount, mi_commit_mask_t* cm) {\n  mi_assert_internal(bitidx < MI_COMMIT_MASK_BITS);\n  mi_assert_internal((bitidx + bitcount) <= MI_COMMIT_MASK_BITS);\n  if (bitcount == MI_COMMIT_MASK_BITS) {\n    mi_assert_internal(bitidx==0);\n    mi_commit_mask_create_full(cm);\n  }\n  else if (bitcount == 0) {\n    mi_commit_mask_create_empty(cm);\n  }\n  else {\n    mi_commit_mask_create_empty(cm);\n    size_t i = bitidx / MI_COMMIT_MASK_FIELD_BITS;\n    size_t ofs = bitidx % MI_COMMIT_MASK_FIELD_BITS;\n    while (bitcount > 0) {\n      mi_assert_internal(i < MI_COMMIT_MASK_FIELD_COUNT);\n      size_t avail = MI_COMMIT_MASK_FIELD_BITS - ofs;\n      size_t count = (bitcount > avail ? avail : bitcount);\n      size_t mask = (count >= MI_COMMIT_MASK_FIELD_BITS ? ~((size_t)0) : (((size_t)1 << count) - 1) << ofs);\n      cm->mask[i] = mask;\n      bitcount -= count;\n      ofs = 0;\n      i++;\n    }\n  }\n}\n\nsize_t _mi_commit_mask_committed_size(const mi_commit_mask_t* cm, size_t total) {\n  mi_assert_internal((total%MI_COMMIT_MASK_BITS)==0);\n  size_t count = 0;\n  for (size_t i = 0; i < MI_COMMIT_MASK_FIELD_COUNT; i++) {\n    size_t mask = cm->mask[i];\n    if (~mask == 0) {\n      count += MI_COMMIT_MASK_FIELD_BITS;\n    }\n    else {\n      for (; mask != 0; mask >>= 1) {  // todo: use popcount\n        if ((mask&1)!=0) count++;\n      }\n    }\n  }\n  // we use total since for huge segments each commit bit may represent a larger size\n  return ((total / MI_COMMIT_MASK_BITS) * count);\n}\n\n\nsize_t _mi_commit_mask_next_run(const mi_commit_mask_t* cm, size_t* idx) {\n  size_t i = (*idx) / MI_COMMIT_MASK_FIELD_BITS;\n  size_t ofs = (*idx) % MI_COMMIT_MASK_FIELD_BITS;\n  size_t mask = 0;\n  // find first ones\n  while (i < MI_COMMIT_MASK_FIELD_COUNT) {\n    mask = cm->mask[i];\n    mask >>= ofs;\n    if (mask != 0) {\n      while ((mask&1) == 0) {\n        mask >>= 1;\n        ofs++;\n      }\n      break;\n    }\n    i++;\n    ofs = 0;\n  }\n  if (i >= MI_COMMIT_MASK_FIELD_COUNT) {\n    // not found\n    *idx = MI_COMMIT_MASK_BITS;\n    return 0;\n  }\n  else {\n    // found, count ones\n    size_t count = 0;\n    *idx = (i*MI_COMMIT_MASK_FIELD_BITS) + ofs;\n    do {\n      mi_assert_internal(ofs < MI_COMMIT_MASK_FIELD_BITS && (mask&1) == 1);\n      do {\n        count++;\n        mask >>= 1;\n      } while ((mask&1) == 1);\n      if ((((*idx + count) % MI_COMMIT_MASK_FIELD_BITS) == 0)) {\n        i++;\n        if (i >= MI_COMMIT_MASK_FIELD_COUNT) break;\n        mask = cm->mask[i];\n        ofs = 0;\n      }\n    } while ((mask&1) == 1);\n    mi_assert_internal(count > 0);\n    return count;\n  }\n}\n\n\n/* --------------------------------------------------------------------------------\n  Segment allocation\n  We allocate pages inside bigger \"segments\" (32 MiB on 64-bit). This is to avoid\n  splitting VMA's on Linux and reduce fragmentation on other OS's.\n  Each thread owns its own segments.\n\n  Currently we have:\n  - small pages (64KiB)\n  - medium pages (512KiB)\n  - large pages (4MiB),\n  - huge segments have 1 page in one segment that can be larger than `MI_SEGMENT_SIZE`.\n    it is used for blocks `> MI_LARGE_OBJ_SIZE_MAX` or with alignment `> MI_BLOCK_ALIGNMENT_MAX`.\n\n  The memory for a segment is usually committed on demand.\n  (i.e. we are careful to not touch the memory until we actually allocate a block there)\n\n  If a  thread ends, it \"abandons\" pages that still contain live blocks.\n  Such segments are abandoned and these can be reclaimed by still running threads,\n  (much like work-stealing).\n-------------------------------------------------------------------------------- */\n\n\n/* -----------------------------------------------------------\n   Slices\n----------------------------------------------------------- */\n\n\nstatic const mi_slice_t* mi_segment_slices_end(const mi_segment_t* segment) {\n  return &segment->slices[segment->slice_entries];\n}\n\nstatic uint8_t* mi_slice_start(const mi_slice_t* slice) {\n  mi_segment_t* segment = _mi_ptr_segment(slice);\n  mi_assert_internal(slice >= segment->slices && slice < mi_segment_slices_end(segment));\n  return ((uint8_t*)segment + ((slice - segment->slices)*MI_SEGMENT_SLICE_SIZE));\n}\n\n\n/* -----------------------------------------------------------\n   Bins\n----------------------------------------------------------- */\n// Use bit scan forward to quickly find the first zero bit if it is available\n\nstatic inline size_t mi_slice_bin8(size_t slice_count) {\n  if (slice_count<=1) return slice_count;\n  mi_assert_internal(slice_count <= MI_SLICES_PER_SEGMENT);\n  slice_count--;\n  size_t s = mi_bsr(slice_count);  // slice_count > 1\n  if (s <= 2) return slice_count + 1;\n  size_t bin = ((s << 2) | ((slice_count >> (s - 2))&0x03)) - 4;\n  return bin;\n}\n\nstatic inline size_t mi_slice_bin(size_t slice_count) {\n  mi_assert_internal(slice_count*MI_SEGMENT_SLICE_SIZE <= MI_SEGMENT_SIZE);\n  mi_assert_internal(mi_slice_bin8(MI_SLICES_PER_SEGMENT) <= MI_SEGMENT_BIN_MAX);\n  size_t bin = mi_slice_bin8(slice_count);\n  mi_assert_internal(bin <= MI_SEGMENT_BIN_MAX);\n  return bin;\n}\n\nstatic inline size_t mi_slice_index(const mi_slice_t* slice) {\n  mi_segment_t* segment = _mi_ptr_segment(slice);\n  ptrdiff_t index = slice - segment->slices;\n  mi_assert_internal(index >= 0 && index < (ptrdiff_t)segment->slice_entries);\n  return index;\n}\n\n\n/* -----------------------------------------------------------\n   Slice span queues\n----------------------------------------------------------- */\n\nstatic void mi_span_queue_push(mi_span_queue_t* sq, mi_slice_t* slice) {\n  // todo: or push to the end?\n  mi_assert_internal(slice->prev == NULL && slice->next==NULL);\n  slice->prev = NULL; // paranoia\n  slice->next = sq->first;\n  sq->first = slice;\n  if (slice->next != NULL) slice->next->prev = slice;\n                     else sq->last = slice;\n  slice->block_size = 0; // free\n}\n\nstatic mi_span_queue_t* mi_span_queue_for(size_t slice_count, mi_segments_tld_t* tld) {\n  size_t bin = mi_slice_bin(slice_count);\n  mi_span_queue_t* sq = &tld->spans[bin];\n  mi_assert_internal(sq->slice_count >= slice_count);\n  return sq;\n}\n\nstatic void mi_span_queue_delete(mi_span_queue_t* sq, mi_slice_t* slice) {\n  mi_assert_internal(slice->block_size==0 && slice->slice_count>0 && slice->slice_offset==0);\n  // should work too if the queue does not contain slice (which can happen during reclaim)\n  if (slice->prev != NULL) slice->prev->next = slice->next;\n  if (slice == sq->first) sq->first = slice->next;\n  if (slice->next != NULL) slice->next->prev = slice->prev;\n  if (slice == sq->last) sq->last = slice->prev;\n  slice->prev = NULL;\n  slice->next = NULL;\n  slice->block_size = 1; // no more free\n}\n\n\n/* -----------------------------------------------------------\n Invariant checking\n----------------------------------------------------------- */\n\nstatic bool mi_slice_is_used(const mi_slice_t* slice) {\n  return (slice->block_size > 0);\n}\n\n\n#if (MI_DEBUG>=3)\nstatic bool mi_span_queue_contains(mi_span_queue_t* sq, mi_slice_t* slice) {\n  for (mi_slice_t* s = sq->first; s != NULL; s = s->next) {\n    if (s==slice) return true;\n  }\n  return false;\n}\n\nstatic bool mi_segment_is_valid(mi_segment_t* segment, mi_segments_tld_t* tld) {\n  mi_assert_internal(segment != NULL);\n  mi_assert_internal(_mi_ptr_cookie(segment) == segment->cookie);\n  mi_assert_internal(segment->abandoned <= segment->used);\n  mi_assert_internal(segment->thread_id == 0 || segment->thread_id == _mi_thread_id());\n  mi_assert_internal(mi_commit_mask_all_set(&segment->commit_mask, &segment->purge_mask)); // can only decommit committed blocks\n  //mi_assert_internal(segment->segment_info_size % MI_SEGMENT_SLICE_SIZE == 0);\n  mi_slice_t* slice = &segment->slices[0];\n  const mi_slice_t* end = mi_segment_slices_end(segment);\n  size_t used_count = 0;\n  mi_span_queue_t* sq;\n  while(slice < end) {\n    mi_assert_internal(slice->slice_count > 0);\n    mi_assert_internal(slice->slice_offset == 0);\n    size_t index = mi_slice_index(slice);\n    size_t maxindex = (index + slice->slice_count >= segment->slice_entries ? segment->slice_entries : index + slice->slice_count) - 1;\n    if (mi_slice_is_used(slice)) { // a page in use, we need at least MAX_SLICE_OFFSET_COUNT valid back offsets\n      used_count++;\n      mi_assert_internal(slice->is_huge == (segment->kind == MI_SEGMENT_HUGE));\n      for (size_t i = 0; i <= MI_MAX_SLICE_OFFSET_COUNT && index + i <= maxindex; i++) {\n        mi_assert_internal(segment->slices[index + i].slice_offset == i*sizeof(mi_slice_t));\n        mi_assert_internal(i==0 || segment->slices[index + i].slice_count == 0);\n        mi_assert_internal(i==0 || segment->slices[index + i].block_size == 1);\n      }\n      // and the last entry as well (for coalescing)\n      const mi_slice_t* last = slice + slice->slice_count - 1;\n      if (last > slice && last < mi_segment_slices_end(segment)) {\n        mi_assert_internal(last->slice_offset == (slice->slice_count-1)*sizeof(mi_slice_t));\n        mi_assert_internal(last->slice_count == 0);\n        mi_assert_internal(last->block_size == 1);\n      }\n    }\n    else {  // free range of slices; only last slice needs a valid back offset\n      mi_slice_t* last = &segment->slices[maxindex];\n      if (segment->kind != MI_SEGMENT_HUGE || slice->slice_count <= (segment->slice_entries - segment->segment_info_slices)) {\n        mi_assert_internal((uint8_t*)slice == (uint8_t*)last - last->slice_offset);\n      }\n      mi_assert_internal(slice == last || last->slice_count == 0 );\n      mi_assert_internal(last->block_size == 0 || (segment->kind==MI_SEGMENT_HUGE && last->block_size==1));\n      if (segment->kind != MI_SEGMENT_HUGE && segment->thread_id != 0) { // segment is not huge or abandoned\n        sq = mi_span_queue_for(slice->slice_count,tld);\n        mi_assert_internal(mi_span_queue_contains(sq,slice));\n      }\n    }\n    slice = &segment->slices[maxindex+1];\n  }\n  mi_assert_internal(slice == end);\n  mi_assert_internal(used_count == segment->used + 1);\n  return true;\n}\n#endif\n\n/* -----------------------------------------------------------\n Segment size calculations\n----------------------------------------------------------- */\n\nstatic size_t mi_segment_info_size(mi_segment_t* segment) {\n  return segment->segment_info_slices * MI_SEGMENT_SLICE_SIZE;\n}\n\nstatic uint8_t* _mi_segment_page_start_from_slice(const mi_segment_t* segment, const mi_slice_t* slice, size_t block_size, size_t* page_size)\n{\n  const ptrdiff_t idx = slice - segment->slices;\n  const size_t psize = (size_t)slice->slice_count * MI_SEGMENT_SLICE_SIZE;\n  uint8_t* const pstart = (uint8_t*)segment + (idx*MI_SEGMENT_SLICE_SIZE);\n  // make the start not OS page aligned for smaller blocks to avoid page/cache effects\n  // note: the offset must always be a block_size multiple since we assume small allocations\n  // are aligned (see `mi_heap_malloc_aligned`).\n  size_t start_offset = 0;\n  if (block_size > 0 && block_size <= MI_MAX_ALIGN_GUARANTEE) {\n    // for small objects, ensure the page start is aligned with the block size (PR#66 by kickunderscore)\n    const size_t adjust = block_size - ((uintptr_t)pstart % block_size);\n    if (adjust < block_size && psize >= block_size + adjust) {\n      start_offset += adjust;\n    }\n  }\n  if (block_size >= MI_INTPTR_SIZE) {\n    if (block_size <= 64) { start_offset += 3*block_size; }\n    else if (block_size <= 512) { start_offset += block_size; }\n  }\n  start_offset = _mi_align_up(start_offset, MI_MAX_ALIGN_SIZE);\n  mi_assert_internal(_mi_is_aligned(pstart + start_offset, MI_MAX_ALIGN_SIZE));\n  mi_assert_internal(block_size == 0 || block_size > MI_MAX_ALIGN_GUARANTEE || _mi_is_aligned(pstart + start_offset,block_size));\n  if (page_size != NULL) { *page_size = psize - start_offset; }\n  return (pstart + start_offset);\n}\n\n// Start of the page available memory; can be used on uninitialized pages\nuint8_t* _mi_segment_page_start(const mi_segment_t* segment, const mi_page_t* page, size_t* page_size)\n{\n  const mi_slice_t* slice = mi_page_to_slice((mi_page_t*)page);\n  uint8_t* p = _mi_segment_page_start_from_slice(segment, slice, mi_page_block_size(page), page_size);\n  mi_assert_internal(mi_page_block_size(page) > 0 || _mi_ptr_page(p) == page);\n  mi_assert_internal(_mi_ptr_segment(p) == segment);\n  return p;\n}\n\n\nstatic size_t mi_segment_calculate_slices(size_t required, size_t* info_slices) {\n  size_t page_size = _mi_os_page_size();\n  size_t isize     = _mi_align_up(sizeof(mi_segment_t), page_size);\n  size_t guardsize = 0;\n\n  if (MI_SECURE>0) {\n    // in secure mode, we set up a protected page in between the segment info\n    // and the page data (and one at the end of the segment)\n    guardsize = page_size;\n    if (required > 0) {\n      required = _mi_align_up(required, MI_SEGMENT_SLICE_SIZE) + page_size;\n    }\n  }\n\n  isize = _mi_align_up(isize + guardsize, MI_SEGMENT_SLICE_SIZE);\n  if (info_slices != NULL) *info_slices = isize / MI_SEGMENT_SLICE_SIZE;\n  size_t segment_size = (required==0 ? MI_SEGMENT_SIZE : _mi_align_up( required + isize + guardsize, MI_SEGMENT_SLICE_SIZE) );\n  mi_assert_internal(segment_size % MI_SEGMENT_SLICE_SIZE == 0);\n  return (segment_size / MI_SEGMENT_SLICE_SIZE);\n}\n\n\n/* ----------------------------------------------------------------------------\nSegment caches\nWe keep a small segment cache per thread to increase local\nreuse and avoid setting/clearing guard pages in secure mode.\n------------------------------------------------------------------------------- */\n\nstatic void mi_segments_track_size(long segment_size, mi_segments_tld_t* tld) {\n  if (segment_size>=0) _mi_stat_increase(&tld->stats->segments,1);\n                  else _mi_stat_decrease(&tld->stats->segments,1);\n  tld->count += (segment_size >= 0 ? 1 : -1);\n  if (tld->count > tld->peak_count) tld->peak_count = tld->count;\n  tld->current_size += segment_size;\n  if (tld->current_size > tld->peak_size) tld->peak_size = tld->current_size;\n}\n\nstatic void mi_segment_os_free(mi_segment_t* segment, mi_segments_tld_t* tld) {\n  segment->thread_id = 0;\n  _mi_segment_map_freed_at(segment);\n  mi_segments_track_size(-((long)mi_segment_size(segment)),tld);\n  if (segment->was_reclaimed) {\n    tld->reclaim_count--;\n    segment->was_reclaimed = false;\n  }\n  if (MI_SECURE>0) {\n    // _mi_os_unprotect(segment, mi_segment_size(segment)); // ensure no more guard pages are set\n    // unprotect the guard pages; we cannot just unprotect the whole segment size as part may be decommitted\n    size_t os_pagesize = _mi_os_page_size();\n    _mi_os_unprotect((uint8_t*)segment + mi_segment_info_size(segment) - os_pagesize, os_pagesize);\n    uint8_t* end = (uint8_t*)segment + mi_segment_size(segment) - os_pagesize;\n    _mi_os_unprotect(end, os_pagesize);\n  }\n\n  // purge delayed decommits now? (no, leave it to the arena)\n  // mi_segment_try_purge(segment,true,tld->stats);\n\n  const size_t size = mi_segment_size(segment);\n  const size_t csize = _mi_commit_mask_committed_size(&segment->commit_mask, size);\n\n  _mi_arena_free(segment, mi_segment_size(segment), csize, segment->memid);\n}\n\n/* -----------------------------------------------------------\n   Commit/Decommit ranges\n----------------------------------------------------------- */\n\nstatic void mi_segment_commit_mask(mi_segment_t* segment, bool conservative, uint8_t* p, size_t size, uint8_t** start_p, size_t* full_size, mi_commit_mask_t* cm) {\n  mi_assert_internal(_mi_ptr_segment(p + 1) == segment);\n  mi_assert_internal(segment->kind != MI_SEGMENT_HUGE);\n  mi_commit_mask_create_empty(cm);\n  if (size == 0 || size > MI_SEGMENT_SIZE || segment->kind == MI_SEGMENT_HUGE) return;\n  const size_t segstart = mi_segment_info_size(segment);\n  const size_t segsize = mi_segment_size(segment);\n  if (p >= (uint8_t*)segment + segsize) return;\n\n  size_t pstart = (p - (uint8_t*)segment);\n  mi_assert_internal(pstart + size <= segsize);\n\n  size_t start;\n  size_t end;\n  if (conservative) {\n    // decommit conservative\n    start = _mi_align_up(pstart, MI_COMMIT_SIZE);\n    end   = _mi_align_down(pstart + size, MI_COMMIT_SIZE);\n    mi_assert_internal(start >= segstart);\n    mi_assert_internal(end <= segsize);\n  }\n  else {\n    // commit liberal\n    start = _mi_align_down(pstart, MI_MINIMAL_COMMIT_SIZE);\n    end   = _mi_align_up(pstart + size, MI_MINIMAL_COMMIT_SIZE);\n  }\n  if (pstart >= segstart && start < segstart) {  // note: the mask is also calculated for an initial commit of the info area\n    start = segstart;\n  }\n  if (end > segsize) {\n    end = segsize;\n  }\n\n  mi_assert_internal(start <= pstart && (pstart + size) <= end);\n  mi_assert_internal(start % MI_COMMIT_SIZE==0 && end % MI_COMMIT_SIZE == 0);\n  *start_p   = (uint8_t*)segment + start;\n  *full_size = (end > start ? end - start : 0);\n  if (*full_size == 0) return;\n\n  size_t bitidx = start / MI_COMMIT_SIZE;\n  mi_assert_internal(bitidx < MI_COMMIT_MASK_BITS);\n\n  size_t bitcount = *full_size / MI_COMMIT_SIZE; // can be 0\n  if (bitidx + bitcount > MI_COMMIT_MASK_BITS) {\n    _mi_warning_message(\"commit mask overflow: idx=%zu count=%zu start=%zx end=%zx p=0x%p size=%zu fullsize=%zu\\n\", bitidx, bitcount, start, end, p, size, *full_size);\n  }\n  mi_assert_internal((bitidx + bitcount) <= MI_COMMIT_MASK_BITS);\n  mi_commit_mask_create(bitidx, bitcount, cm);\n}\n\nstatic bool mi_segment_commit(mi_segment_t* segment, uint8_t* p, size_t size) {\n  mi_assert_internal(mi_commit_mask_all_set(&segment->commit_mask, &segment->purge_mask));\n\n  // commit liberal\n  uint8_t* start = NULL;\n  size_t   full_size = 0;\n  mi_commit_mask_t mask;\n  mi_segment_commit_mask(segment, false /* conservative? */, p, size, &start, &full_size, &mask);\n  if (mi_commit_mask_is_empty(&mask) || full_size == 0) return true;\n\n  if (!mi_commit_mask_all_set(&segment->commit_mask, &mask)) {\n    // committing\n    bool is_zero = false;\n    mi_commit_mask_t cmask;\n    mi_commit_mask_create_intersect(&segment->commit_mask, &mask, &cmask);\n    _mi_stat_decrease(&_mi_stats_main.committed, _mi_commit_mask_committed_size(&cmask, MI_SEGMENT_SIZE)); // adjust for overlap\n    if (!_mi_os_commit(start, full_size, &is_zero)) return false;\n    mi_commit_mask_set(&segment->commit_mask, &mask);\n  }\n\n  // increase purge expiration when using part of delayed purges -- we assume more allocations are coming soon.\n  if (mi_commit_mask_any_set(&segment->purge_mask, &mask)) {\n    segment->purge_expire = _mi_clock_now() + mi_option_get(mi_option_purge_delay);\n  }\n\n  // always clear any delayed purges in our range (as they are either committed now)\n  mi_commit_mask_clear(&segment->purge_mask, &mask);\n  return true;\n}\n\nstatic bool mi_segment_ensure_committed(mi_segment_t* segment, uint8_t* p, size_t size) {\n  mi_assert_internal(mi_commit_mask_all_set(&segment->commit_mask, &segment->purge_mask));\n  // note: assumes commit_mask is always full for huge segments as otherwise the commit mask bits can overflow\n  if (mi_commit_mask_is_full(&segment->commit_mask) && mi_commit_mask_is_empty(&segment->purge_mask)) return true; // fully committed\n  mi_assert_internal(segment->kind != MI_SEGMENT_HUGE);\n  return mi_segment_commit(segment, p, size);\n}\n\nstatic bool mi_segment_purge(mi_segment_t* segment, uint8_t* p, size_t size) {\n  mi_assert_internal(mi_commit_mask_all_set(&segment->commit_mask, &segment->purge_mask));\n  if (!segment->allow_purge) return true;\n\n  // purge conservative\n  uint8_t* start = NULL;\n  size_t   full_size = 0;\n  mi_commit_mask_t mask;\n  mi_segment_commit_mask(segment, true /* conservative? */, p, size, &start, &full_size, &mask);\n  if (mi_commit_mask_is_empty(&mask) || full_size==0) return true;\n\n  if (mi_commit_mask_any_set(&segment->commit_mask, &mask)) {\n    // purging\n    mi_assert_internal((void*)start != (void*)segment);\n    mi_assert_internal(segment->allow_decommit);\n    const bool decommitted = _mi_os_purge(start, full_size);  // reset or decommit\n    if (decommitted) {\n      mi_commit_mask_t cmask;\n      mi_commit_mask_create_intersect(&segment->commit_mask, &mask, &cmask);\n      _mi_stat_increase(&_mi_stats_main.committed, full_size - _mi_commit_mask_committed_size(&cmask, MI_SEGMENT_SIZE)); // adjust for double counting\n      mi_commit_mask_clear(&segment->commit_mask, &mask);\n    }\n  }\n\n  // always clear any scheduled purges in our range\n  mi_commit_mask_clear(&segment->purge_mask, &mask);\n  return true;\n}\n\nstatic void mi_segment_schedule_purge(mi_segment_t* segment, uint8_t* p, size_t size) {\n  if (!segment->allow_purge) return;\n\n  if (mi_option_get(mi_option_purge_delay) == 0) {\n    mi_segment_purge(segment, p, size);\n  }\n  else {\n    // register for future purge in the purge mask\n    uint8_t* start = NULL;\n    size_t   full_size = 0;\n    mi_commit_mask_t mask;\n    mi_segment_commit_mask(segment, true /*conservative*/, p, size, &start, &full_size, &mask);\n    if (mi_commit_mask_is_empty(&mask) || full_size==0) return;\n\n    // update delayed commit\n    mi_assert_internal(segment->purge_expire > 0 || mi_commit_mask_is_empty(&segment->purge_mask));\n    mi_commit_mask_t cmask;\n    mi_commit_mask_create_intersect(&segment->commit_mask, &mask, &cmask);  // only purge what is committed; span_free may try to decommit more\n    mi_commit_mask_set(&segment->purge_mask, &cmask);\n    mi_msecs_t now = _mi_clock_now();\n    if (segment->purge_expire == 0) {\n      // no previous purgess, initialize now\n      segment->purge_expire = now + mi_option_get(mi_option_purge_delay);\n    }\n    else if (segment->purge_expire <= now) {\n      // previous purge mask already expired\n      if (segment->purge_expire + mi_option_get(mi_option_purge_extend_delay) <= now) {\n        mi_segment_try_purge(segment, true);\n      }\n      else {\n        segment->purge_expire = now + mi_option_get(mi_option_purge_extend_delay); // (mi_option_get(mi_option_purge_delay) / 8); // wait a tiny bit longer in case there is a series of free's\n      }\n    }\n    else {\n      // previous purge mask is not yet expired, increase the expiration by a bit.\n      segment->purge_expire += mi_option_get(mi_option_purge_extend_delay);\n    }\n  }\n}\n\nstatic void mi_segment_try_purge(mi_segment_t* segment, bool force) {\n  if (!segment->allow_purge || segment->purge_expire == 0 || mi_commit_mask_is_empty(&segment->purge_mask)) return;\n  mi_msecs_t now = _mi_clock_now();\n  if (!force && now < segment->purge_expire) return;\n\n  mi_commit_mask_t mask = segment->purge_mask;\n  segment->purge_expire = 0;\n  mi_commit_mask_create_empty(&segment->purge_mask);\n\n  size_t idx;\n  size_t count;\n  mi_commit_mask_foreach(&mask, idx, count) {\n    // if found, decommit that sequence\n    if (count > 0) {\n      uint8_t* p = (uint8_t*)segment + (idx*MI_COMMIT_SIZE);\n      size_t size = count * MI_COMMIT_SIZE;\n      mi_segment_purge(segment, p, size);\n    }\n  }\n  mi_commit_mask_foreach_end()\n  mi_assert_internal(mi_commit_mask_is_empty(&segment->purge_mask));\n}\n\n// called from `mi_heap_collect_ex`\n// this can be called per-page so it is important that try_purge has fast exit path\nvoid _mi_segment_collect(mi_segment_t* segment, bool force) {\n  mi_segment_try_purge(segment, force);\n}\n\n/* -----------------------------------------------------------\n   Span free\n----------------------------------------------------------- */\n\nstatic bool mi_segment_is_abandoned(mi_segment_t* segment) {\n  return (mi_atomic_load_relaxed(&segment->thread_id) == 0);\n}\n\n// note: can be called on abandoned segments\nstatic void mi_segment_span_free(mi_segment_t* segment, size_t slice_index, size_t slice_count, bool allow_purge, mi_segments_tld_t* tld) {\n  mi_assert_internal(slice_index < segment->slice_entries);\n  mi_span_queue_t* sq = (segment->kind == MI_SEGMENT_HUGE || mi_segment_is_abandoned(segment)\n                          ? NULL : mi_span_queue_for(slice_count,tld));\n  if (slice_count==0) slice_count = 1;\n  mi_assert_internal(slice_index + slice_count - 1 < segment->slice_entries);\n\n  // set first and last slice (the intermediates can be undetermined)\n  mi_slice_t* slice = &segment->slices[slice_index];\n  slice->slice_count = (uint32_t)slice_count;\n  mi_assert_internal(slice->slice_count == slice_count); // no overflow?\n  slice->slice_offset = 0;\n  if (slice_count > 1) {\n    mi_slice_t* last = slice + slice_count - 1;\n    mi_slice_t* end  = (mi_slice_t*)mi_segment_slices_end(segment);\n    if (last > end) { last = end; }\n    last->slice_count = 0;\n    last->slice_offset = (uint32_t)(sizeof(mi_page_t)*(slice_count - 1));\n    last->block_size = 0;\n  }\n\n  // perhaps decommit\n  if (allow_purge) {\n    mi_segment_schedule_purge(segment, mi_slice_start(slice), slice_count * MI_SEGMENT_SLICE_SIZE);\n  }\n\n  // and push it on the free page queue (if it was not a huge page)\n  if (sq != NULL) mi_span_queue_push( sq, slice );\n             else slice->block_size = 0; // mark huge page as free anyways\n}\n\n/*\n// called from reclaim to add existing free spans\nstatic void mi_segment_span_add_free(mi_slice_t* slice, mi_segments_tld_t* tld) {\n  mi_segment_t* segment = _mi_ptr_segment(slice);\n  mi_assert_internal(slice->xblock_size==0 && slice->slice_count>0 && slice->slice_offset==0);\n  size_t slice_index = mi_slice_index(slice);\n  mi_segment_span_free(segment,slice_index,slice->slice_count,tld);\n}\n*/\n\nstatic void mi_segment_span_remove_from_queue(mi_slice_t* slice, mi_segments_tld_t* tld) {\n  mi_assert_internal(slice->slice_count > 0 && slice->slice_offset==0 && slice->block_size==0);\n  mi_assert_internal(_mi_ptr_segment(slice)->kind != MI_SEGMENT_HUGE);\n  mi_span_queue_t* sq = mi_span_queue_for(slice->slice_count, tld);\n  mi_span_queue_delete(sq, slice);\n}\n\n// note: can be called on abandoned segments\nstatic mi_slice_t* mi_segment_span_free_coalesce(mi_slice_t* slice, mi_segments_tld_t* tld) {\n  mi_assert_internal(slice != NULL && slice->slice_count > 0 && slice->slice_offset == 0);\n  mi_segment_t* const segment = _mi_ptr_segment(slice);\n\n  // for huge pages, just mark as free but don't add to the queues\n  if (segment->kind == MI_SEGMENT_HUGE) {\n    // issue #691: segment->used can be 0 if the huge page block was freed while abandoned (reclaim will get here in that case)\n    mi_assert_internal((segment->used==0 && slice->block_size==0) || segment->used == 1);  // decreased right after this call in `mi_segment_page_clear`\n    slice->block_size = 0;  // mark as free anyways\n    // we should mark the last slice `xblock_size=0` now to maintain invariants but we skip it to\n    // avoid a possible cache miss (and the segment is about to be freed)\n    return slice;\n  }\n\n  // otherwise coalesce the span and add to the free span queues\n  const bool is_abandoned = (segment->thread_id == 0); // mi_segment_is_abandoned(segment);\n  size_t slice_count = slice->slice_count;\n  mi_slice_t* next = slice + slice->slice_count;\n  mi_assert_internal(next <= mi_segment_slices_end(segment));\n  if (next < mi_segment_slices_end(segment) && next->block_size==0) {\n    // free next block -- remove it from free and merge\n    mi_assert_internal(next->slice_count > 0 && next->slice_offset==0);\n    slice_count += next->slice_count; // extend\n    if (!is_abandoned) { mi_segment_span_remove_from_queue(next, tld); }\n  }\n  if (slice > segment->slices) {\n    mi_slice_t* prev = mi_slice_first(slice - 1);\n    mi_assert_internal(prev >= segment->slices);\n    if (prev->block_size==0) {\n      // free previous slice -- remove it from free and merge\n      mi_assert_internal(prev->slice_count > 0 && prev->slice_offset==0);\n      slice_count += prev->slice_count;\n      slice->slice_count = 0;\n      slice->slice_offset = (uint32_t)((uint8_t*)slice - (uint8_t*)prev); // set the slice offset for `segment_force_abandon` (in case the previous free block is very large).\n      if (!is_abandoned) { mi_segment_span_remove_from_queue(prev, tld); }\n      slice = prev;\n    }\n  }\n\n  // and add the new free page\n  mi_segment_span_free(segment, mi_slice_index(slice), slice_count, true, tld);\n  return slice;\n}\n\n\n\n/* -----------------------------------------------------------\n   Page allocation\n----------------------------------------------------------- */\n\n// Note: may still return NULL if committing the memory failed\nstatic mi_page_t* mi_segment_span_allocate(mi_segment_t* segment, size_t slice_index, size_t slice_count) {\n  mi_assert_internal(slice_index < segment->slice_entries);\n  mi_slice_t* const slice = &segment->slices[slice_index];\n  mi_assert_internal(slice->block_size==0 || slice->block_size==1);\n\n  // commit before changing the slice data\n  if (!mi_segment_ensure_committed(segment, _mi_segment_page_start_from_slice(segment, slice, 0, NULL), slice_count * MI_SEGMENT_SLICE_SIZE)) {\n    return NULL;  // commit failed!\n  }\n\n  // convert the slices to a page\n  slice->slice_offset = 0;\n  slice->slice_count = (uint32_t)slice_count;\n  mi_assert_internal(slice->slice_count == slice_count);\n  const size_t bsize = slice_count * MI_SEGMENT_SLICE_SIZE;\n  slice->block_size = bsize;\n  mi_page_t*  page = mi_slice_to_page(slice);\n  mi_assert_internal(mi_page_block_size(page) == bsize);\n\n  // set slice back pointers for the first MI_MAX_SLICE_OFFSET_COUNT entries\n  size_t extra = slice_count-1;\n  if (extra > MI_MAX_SLICE_OFFSET_COUNT) extra = MI_MAX_SLICE_OFFSET_COUNT;\n  if (slice_index + extra >= segment->slice_entries) extra = segment->slice_entries - slice_index - 1;  // huge objects may have more slices than avaiable entries in the segment->slices\n\n  mi_slice_t* slice_next = slice + 1;\n  for (size_t i = 1; i <= extra; i++, slice_next++) {\n    slice_next->slice_offset = (uint32_t)(sizeof(mi_slice_t)*i);\n    slice_next->slice_count = 0;\n    slice_next->block_size = 1;\n  }\n\n  // and also for the last one (if not set already) (the last one is needed for coalescing and for large alignments)\n  // note: the cast is needed for ubsan since the index can be larger than MI_SLICES_PER_SEGMENT for huge allocations (see #543)\n  mi_slice_t* last = slice + slice_count - 1;\n  mi_slice_t* end = (mi_slice_t*)mi_segment_slices_end(segment);\n  if (last > end) last = end;\n  if (last > slice) {\n    last->slice_offset = (uint32_t)(sizeof(mi_slice_t) * (last - slice));\n    last->slice_count = 0;\n    last->block_size = 1;\n  }\n\n  // and initialize the page\n  page->is_committed = true;\n  page->is_huge = (segment->kind == MI_SEGMENT_HUGE);\n  segment->used++;\n  return page;\n}\n\nstatic void mi_segment_slice_split(mi_segment_t* segment, mi_slice_t* slice, size_t slice_count, mi_segments_tld_t* tld) {\n  mi_assert_internal(_mi_ptr_segment(slice) == segment);\n  mi_assert_internal(slice->slice_count >= slice_count);\n  mi_assert_internal(slice->block_size > 0); // no more in free queue\n  if (slice->slice_count <= slice_count) return;\n  mi_assert_internal(segment->kind != MI_SEGMENT_HUGE);\n  size_t next_index = mi_slice_index(slice) + slice_count;\n  size_t next_count = slice->slice_count - slice_count;\n  mi_segment_span_free(segment, next_index, next_count, false /* don't purge left-over part */, tld);\n  slice->slice_count = (uint32_t)slice_count;\n}\n\nstatic mi_page_t* mi_segments_page_find_and_allocate(size_t slice_count, mi_arena_id_t req_arena_id, mi_segments_tld_t* tld) {\n  mi_assert_internal(slice_count*MI_SEGMENT_SLICE_SIZE <= MI_LARGE_OBJ_SIZE_MAX);\n  // search from best fit up\n  mi_span_queue_t* sq = mi_span_queue_for(slice_count, tld);\n  if (slice_count == 0) slice_count = 1;\n  while (sq <= &tld->spans[MI_SEGMENT_BIN_MAX]) {\n    for (mi_slice_t* slice = sq->first; slice != NULL; slice = slice->next) {\n      if (slice->slice_count >= slice_count) {\n        // found one\n        mi_segment_t* segment = _mi_ptr_segment(slice);\n        if (_mi_arena_memid_is_suitable(segment->memid, req_arena_id)) {\n          // found a suitable page span\n          mi_span_queue_delete(sq, slice);\n\n          if (slice->slice_count > slice_count) {\n            mi_segment_slice_split(segment, slice, slice_count, tld);\n          }\n          mi_assert_internal(slice != NULL && slice->slice_count == slice_count && slice->block_size > 0);\n          mi_page_t* page = mi_segment_span_allocate(segment, mi_slice_index(slice), slice->slice_count);\n          if (page == NULL) {\n            // commit failed; return NULL but first restore the slice\n            mi_segment_span_free_coalesce(slice, tld);\n            return NULL;\n          }\n          return page;\n        }\n      }\n    }\n    sq++;\n  }\n  // could not find a page..\n  return NULL;\n}\n\n\n/* -----------------------------------------------------------\n   Segment allocation\n----------------------------------------------------------- */\n\nstatic mi_segment_t* mi_segment_os_alloc( size_t required, size_t page_alignment, bool eager_delayed, mi_arena_id_t req_arena_id,\n                                          size_t* psegment_slices, size_t* pinfo_slices,\n                                          bool commit, mi_segments_tld_t* tld)\n\n{\n  mi_memid_t memid;\n  bool   allow_large = (!eager_delayed && (MI_SECURE == 0)); // only allow large OS pages once we are no longer lazy\n  size_t align_offset = 0;\n  size_t alignment = MI_SEGMENT_ALIGN;\n\n  if (page_alignment > 0) {\n    // mi_assert_internal(huge_page != NULL);\n    mi_assert_internal(page_alignment >= MI_SEGMENT_ALIGN);\n    alignment = page_alignment;\n    const size_t info_size = (*pinfo_slices) * MI_SEGMENT_SLICE_SIZE;\n    align_offset = _mi_align_up( info_size, MI_SEGMENT_ALIGN );\n    const size_t extra = align_offset - info_size;\n    // recalculate due to potential guard pages\n    *psegment_slices = mi_segment_calculate_slices(required + extra, pinfo_slices);\n    mi_assert_internal(*psegment_slices > 0 && *psegment_slices <= UINT32_MAX);\n  }\n\n  const size_t segment_size = (*psegment_slices) * MI_SEGMENT_SLICE_SIZE;\n  mi_segment_t* segment = (mi_segment_t*)_mi_arena_alloc_aligned(segment_size, alignment, align_offset, commit, allow_large, req_arena_id, &memid);\n  if (segment == NULL) {\n    return NULL;  // failed to allocate\n  }\n\n  // ensure metadata part of the segment is committed\n  mi_commit_mask_t commit_mask;\n  if (memid.initially_committed) {\n    mi_commit_mask_create_full(&commit_mask);\n  }\n  else {\n    // at least commit the info slices\n    const size_t commit_needed = _mi_divide_up((*pinfo_slices)*MI_SEGMENT_SLICE_SIZE, MI_COMMIT_SIZE);\n    mi_assert_internal(commit_needed>0);\n    mi_commit_mask_create(0, commit_needed, &commit_mask);\n    mi_assert_internal(commit_needed*MI_COMMIT_SIZE >= (*pinfo_slices)*MI_SEGMENT_SLICE_SIZE);\n    if (!_mi_os_commit(segment, commit_needed*MI_COMMIT_SIZE, NULL)) {\n      _mi_arena_free(segment,segment_size,0,memid);\n      return NULL;\n    }\n  }\n  mi_assert_internal(segment != NULL && (uintptr_t)segment % MI_SEGMENT_SIZE == 0);\n\n  segment->memid = memid;\n  segment->allow_decommit = !memid.is_pinned;\n  segment->allow_purge = segment->allow_decommit && (mi_option_get(mi_option_purge_delay) >= 0);\n  segment->segment_size = segment_size;\n  segment->subproc = tld->subproc;\n  segment->commit_mask = commit_mask;\n  segment->purge_expire = 0;\n  mi_commit_mask_create_empty(&segment->purge_mask);\n\n  mi_segments_track_size((long)(segment_size), tld);\n  _mi_segment_map_allocated_at(segment);\n  return segment;\n}\n\n\n// Allocate a segment from the OS aligned to `MI_SEGMENT_SIZE` .\nstatic mi_segment_t* mi_segment_alloc(size_t required, size_t page_alignment, mi_arena_id_t req_arena_id, mi_segments_tld_t* tld, mi_page_t** huge_page)\n{\n  mi_assert_internal((required==0 && huge_page==NULL) || (required>0 && huge_page != NULL));\n\n  // calculate needed sizes first\n  size_t info_slices;\n  size_t segment_slices = mi_segment_calculate_slices(required, &info_slices);\n  mi_assert_internal(segment_slices > 0 && segment_slices <= UINT32_MAX);\n\n  // Commit eagerly only if not the first N lazy segments (to reduce impact of many threads that allocate just a little)\n  const bool eager_delay = (// !_mi_os_has_overcommit() &&             // never delay on overcommit systems\n                            _mi_current_thread_count() > 1 &&       // do not delay for the first N threads\n                            tld->peak_count < (size_t)mi_option_get(mi_option_eager_commit_delay));\n  const bool eager = !eager_delay && mi_option_is_enabled(mi_option_eager_commit);\n  bool commit = eager || (required > 0);\n\n  // Allocate the segment from the OS\n  mi_segment_t* segment = mi_segment_os_alloc(required, page_alignment, eager_delay, req_arena_id,\n                                              &segment_slices, &info_slices, commit, tld);\n  if (segment == NULL) return NULL;\n\n  // zero the segment info? -- not always needed as it may be zero initialized from the OS\n  if (!segment->memid.initially_zero) {\n    ptrdiff_t ofs    = offsetof(mi_segment_t, next);\n    size_t    prefix = offsetof(mi_segment_t, slices) - ofs;\n    size_t    zsize  = prefix + (sizeof(mi_slice_t) * (segment_slices + 1)); // one more\n    _mi_memzero((uint8_t*)segment + ofs, zsize);\n  }\n\n  // initialize the rest of the segment info\n  const size_t slice_entries = (segment_slices > MI_SLICES_PER_SEGMENT ? MI_SLICES_PER_SEGMENT : segment_slices);\n  segment->segment_slices = segment_slices;\n  segment->segment_info_slices = info_slices;\n  segment->thread_id = _mi_thread_id();\n  segment->cookie = _mi_ptr_cookie(segment);\n  segment->slice_entries = slice_entries;\n  segment->kind = (required == 0 ? MI_SEGMENT_NORMAL : MI_SEGMENT_HUGE);\n\n  // _mi_memzero(segment->slices, sizeof(mi_slice_t)*(info_slices+1));\n  _mi_stat_increase(&tld->stats->page_committed, mi_segment_info_size(segment));\n\n  // set up guard pages\n  size_t guard_slices = 0;\n  if (MI_SECURE>0) {\n    // in secure mode, we set up a protected page in between the segment info\n    // and the page data, and at the end of the segment.\n    size_t os_pagesize = _mi_os_page_size();\n    _mi_os_protect((uint8_t*)segment + mi_segment_info_size(segment) - os_pagesize, os_pagesize);\n    uint8_t* end = (uint8_t*)segment + mi_segment_size(segment) - os_pagesize;\n    mi_segment_ensure_committed(segment, end, os_pagesize);\n    _mi_os_protect(end, os_pagesize);\n    if (slice_entries == segment_slices) segment->slice_entries--; // don't use the last slice :-(\n    guard_slices = 1;\n  }\n\n  // reserve first slices for segment info\n  mi_page_t* page0 = mi_segment_span_allocate(segment, 0, info_slices);\n  mi_assert_internal(page0!=NULL); if (page0==NULL) return NULL; // cannot fail as we always commit in advance\n  mi_assert_internal(segment->used == 1);\n  segment->used = 0; // don't count our internal slices towards usage\n\n  // initialize initial free pages\n  if (segment->kind == MI_SEGMENT_NORMAL) { // not a huge page\n    mi_assert_internal(huge_page==NULL);\n    mi_segment_span_free(segment, info_slices, segment->slice_entries - info_slices, false /* don't purge */, tld);\n  }\n  else {\n    mi_assert_internal(huge_page!=NULL);\n    mi_assert_internal(mi_commit_mask_is_empty(&segment->purge_mask));\n    mi_assert_internal(mi_commit_mask_is_full(&segment->commit_mask));\n    *huge_page = mi_segment_span_allocate(segment, info_slices, segment_slices - info_slices - guard_slices);\n    mi_assert_internal(*huge_page != NULL); // cannot fail as we commit in advance\n  }\n\n  mi_assert_expensive(mi_segment_is_valid(segment,tld));\n  return segment;\n}\n\n\nstatic void mi_segment_free(mi_segment_t* segment, bool force, mi_segments_tld_t* tld) {\n  MI_UNUSED(force);\n  mi_assert_internal(segment != NULL);\n  mi_assert_internal(segment->next == NULL);\n  mi_assert_internal(segment->used == 0);\n\n  // in `mi_segment_force_abandon` we set this to true to ensure the segment's memory stays valid\n  if (segment->dont_free) return;\n\n  // Remove the free pages\n  mi_slice_t* slice = &segment->slices[0];\n  const mi_slice_t* end = mi_segment_slices_end(segment);\n  #if MI_DEBUG>1\n  size_t page_count = 0;\n  #endif\n  while (slice < end) {\n    mi_assert_internal(slice->slice_count > 0);\n    mi_assert_internal(slice->slice_offset == 0);\n    mi_assert_internal(mi_slice_index(slice)==0 || slice->block_size == 0); // no more used pages ..\n    if (slice->block_size == 0 && segment->kind != MI_SEGMENT_HUGE) {\n      mi_segment_span_remove_from_queue(slice, tld);\n    }\n    #if MI_DEBUG>1\n    page_count++;\n    #endif\n    slice = slice + slice->slice_count;\n  }\n  mi_assert_internal(page_count == 2); // first page is allocated by the segment itself\n\n  // stats\n  // _mi_stat_decrease(&tld->stats->page_committed, mi_segment_info_size(segment));\n\n  // return it to the OS\n  mi_segment_os_free(segment, tld);\n}\n\n\n/* -----------------------------------------------------------\n   Page Free\n----------------------------------------------------------- */\n\nstatic void mi_segment_abandon(mi_segment_t* segment, mi_segments_tld_t* tld);\n\n// note: can be called on abandoned pages\nstatic mi_slice_t* mi_segment_page_clear(mi_page_t* page, mi_segments_tld_t* tld) {\n  mi_assert_internal(page->block_size > 0);\n  mi_assert_internal(mi_page_all_free(page));\n  mi_segment_t* segment = _mi_ptr_segment(page);\n  mi_assert_internal(segment->used > 0);\n\n  size_t inuse = page->capacity * mi_page_block_size(page);\n  _mi_stat_decrease(&tld->stats->page_committed, inuse);\n  _mi_stat_decrease(&tld->stats->pages, 1);\n\n  // reset the page memory to reduce memory pressure?\n  if (segment->allow_decommit && mi_option_is_enabled(mi_option_deprecated_page_reset)) {\n    size_t psize;\n    uint8_t* start = _mi_segment_page_start(segment, page, &psize);\n    _mi_os_reset(start, psize);\n  }\n\n  // zero the page data, but not the segment fields and heap tag\n  page->is_zero_init = false;\n  uint8_t heap_tag = page->heap_tag;\n  ptrdiff_t ofs = offsetof(mi_page_t, capacity);\n  _mi_memzero((uint8_t*)page + ofs, sizeof(*page) - ofs);\n  page->block_size = 1;\n  page->heap_tag = heap_tag;\n\n  // and free it\n  mi_slice_t* slice = mi_segment_span_free_coalesce(mi_page_to_slice(page), tld);\n  segment->used--;\n  // cannot assert segment valid as it is called during reclaim\n  // mi_assert_expensive(mi_segment_is_valid(segment, tld));\n  return slice;\n}\n\nvoid _mi_segment_page_free(mi_page_t* page, bool force, mi_segments_tld_t* tld)\n{\n  mi_assert(page != NULL);\n  mi_segment_t* segment = _mi_page_segment(page);\n  mi_assert_expensive(mi_segment_is_valid(segment,tld));\n\n  // mark it as free now\n  mi_segment_page_clear(page, tld);\n  mi_assert_expensive(mi_segment_is_valid(segment, tld));\n\n  if (segment->used == 0) {\n    // no more used pages; remove from the free list and free the segment\n    mi_segment_free(segment, force, tld);\n  }\n  else if (segment->used == segment->abandoned) {\n    // only abandoned pages; remove from free list and abandon\n    mi_segment_abandon(segment,tld);\n  }\n  else {\n    // perform delayed purges\n    mi_segment_try_purge(segment, false /* force? */);\n  }\n}\n\n\n/* -----------------------------------------------------------\nAbandonment\n\nWhen threads terminate, they can leave segments with\nlive blocks (reachable through other threads). Such segments\nare \"abandoned\" and will be reclaimed by other threads to\nreuse their pages and/or free them eventually. The\n`thread_id` of such segments is 0.\n\nWhen a block is freed in an abandoned segment, the segment\nis reclaimed into that thread.\n\nMoreover, if threads are looking for a fresh segment, they\nwill first consider abandoned segments -- these can be found\nby scanning the arena memory\n(segments outside arena memoryare only reclaimed by a free).\n----------------------------------------------------------- */\n\n/* -----------------------------------------------------------\n   Abandon segment/page\n----------------------------------------------------------- */\n\nstatic void mi_segment_abandon(mi_segment_t* segment, mi_segments_tld_t* tld) {\n  mi_assert_internal(segment->used == segment->abandoned);\n  mi_assert_internal(segment->used > 0);\n  mi_assert_internal(segment->abandoned_visits == 0);\n  mi_assert_expensive(mi_segment_is_valid(segment,tld));\n\n  // remove the free pages from the free page queues\n  mi_slice_t* slice = &segment->slices[0];\n  const mi_slice_t* end = mi_segment_slices_end(segment);\n  while (slice < end) {\n    mi_assert_internal(slice->slice_count > 0);\n    mi_assert_internal(slice->slice_offset == 0);\n    if (slice->block_size == 0) { // a free page\n      mi_segment_span_remove_from_queue(slice,tld);\n      slice->block_size = 0; // but keep it free\n    }\n    slice = slice + slice->slice_count;\n  }\n\n  // perform delayed decommits (forcing is much slower on mstress)\n  // Only abandoned segments in arena memory can be reclaimed without a free\n  // so if a segment is not from an arena we force purge here to be conservative.\n  const bool force_purge = (segment->memid.memkind != MI_MEM_ARENA) || mi_option_is_enabled(mi_option_abandoned_page_purge);\n  mi_segment_try_purge(segment, force_purge);\n\n  // all pages in the segment are abandoned; add it to the abandoned list\n  _mi_stat_increase(&tld->stats->segments_abandoned, 1);\n  mi_segments_track_size(-((long)mi_segment_size(segment)), tld);\n  segment->thread_id = 0;\n  segment->abandoned_visits = 1;   // from 0 to 1 to signify it is abandoned\n  if (segment->was_reclaimed) {\n    tld->reclaim_count--;\n    segment->was_reclaimed = false;\n  }\n  _mi_arena_segment_mark_abandoned(segment);\n}\n\nvoid _mi_segment_page_abandon(mi_page_t* page, mi_segments_tld_t* tld) {\n  mi_assert(page != NULL);\n  mi_assert_internal(mi_page_thread_free_flag(page)==MI_NEVER_DELAYED_FREE);\n  mi_assert_internal(mi_page_heap(page) == NULL);\n  mi_segment_t* segment = _mi_page_segment(page);\n\n  mi_assert_expensive(mi_segment_is_valid(segment,tld));\n  segment->abandoned++;\n\n  _mi_stat_increase(&tld->stats->pages_abandoned, 1);\n  mi_assert_internal(segment->abandoned <= segment->used);\n  if (segment->used == segment->abandoned) {\n    // all pages are abandoned, abandon the entire segment\n    mi_segment_abandon(segment, tld);\n  }\n}\n\n/* -----------------------------------------------------------\n  Reclaim abandoned pages\n----------------------------------------------------------- */\n\nstatic mi_slice_t* mi_slices_start_iterate(mi_segment_t* segment, const mi_slice_t** end) {\n  mi_slice_t* slice = &segment->slices[0];\n  *end = mi_segment_slices_end(segment);\n  mi_assert_internal(slice->slice_count>0 && slice->block_size>0); // segment allocated page\n  slice = slice + slice->slice_count; // skip the first segment allocated page\n  return slice;\n}\n\n// Possibly free pages and check if free space is available\nstatic bool mi_segment_check_free(mi_segment_t* segment, size_t slices_needed, size_t block_size, mi_segments_tld_t* tld)\n{\n  mi_assert_internal(mi_segment_is_abandoned(segment));\n  bool has_page = false;\n\n  // for all slices\n  const mi_slice_t* end;\n  mi_slice_t* slice = mi_slices_start_iterate(segment, &end);\n  while (slice < end) {\n    mi_assert_internal(slice->slice_count > 0);\n    mi_assert_internal(slice->slice_offset == 0);\n    if (mi_slice_is_used(slice)) { // used page\n      // ensure used count is up to date and collect potential concurrent frees\n      mi_page_t* const page = mi_slice_to_page(slice);\n      _mi_page_free_collect(page, false);\n      if (mi_page_all_free(page)) {\n        // if this page is all free now, free it without adding to any queues (yet)\n        mi_assert_internal(page->next == NULL && page->prev==NULL);\n        _mi_stat_decrease(&tld->stats->pages_abandoned, 1);\n        segment->abandoned--;\n        slice = mi_segment_page_clear(page, tld); // re-assign slice due to coalesce!\n        mi_assert_internal(!mi_slice_is_used(slice));\n        if (slice->slice_count >= slices_needed) {\n          has_page = true;\n        }\n      }\n      else if (mi_page_block_size(page) == block_size && mi_page_has_any_available(page)) {\n        // a page has available free blocks of the right size\n        has_page = true;\n      }\n    }\n    else {\n      // empty span\n      if (slice->slice_count >= slices_needed) {\n        has_page = true;\n      }\n    }\n    slice = slice + slice->slice_count;\n  }\n  return has_page;\n}\n\n// Reclaim an abandoned segment; returns NULL if the segment was freed\n// set `right_page_reclaimed` to `true` if it reclaimed a page of the right `block_size` that was not full.\nstatic mi_segment_t* mi_segment_reclaim(mi_segment_t* segment, mi_heap_t* heap, size_t requested_block_size, bool* right_page_reclaimed, mi_segments_tld_t* tld) {\n  if (right_page_reclaimed != NULL) { *right_page_reclaimed = false; }\n  // can be 0 still with abandoned_next, or already a thread id for segments outside an arena that are reclaimed on a free.\n  mi_assert_internal(mi_atomic_load_relaxed(&segment->thread_id) == 0 || mi_atomic_load_relaxed(&segment->thread_id) == _mi_thread_id());\n  mi_assert_internal(segment->subproc == heap->tld->segments.subproc); // only reclaim within the same subprocess\n  mi_atomic_store_release(&segment->thread_id, _mi_thread_id());\n  segment->abandoned_visits = 0;\n  segment->was_reclaimed = true;\n  tld->reclaim_count++;\n  mi_segments_track_size((long)mi_segment_size(segment), tld);\n  mi_assert_internal(segment->next == NULL);\n  _mi_stat_decrease(&tld->stats->segments_abandoned, 1);\n\n  // for all slices\n  const mi_slice_t* end;\n  mi_slice_t* slice = mi_slices_start_iterate(segment, &end);\n  while (slice < end) {\n    mi_assert_internal(slice->slice_count > 0);\n    mi_assert_internal(slice->slice_offset == 0);\n    if (mi_slice_is_used(slice)) {\n      // in use: reclaim the page in our heap\n      mi_page_t* page = mi_slice_to_page(slice);\n      mi_assert_internal(page->is_committed);\n      mi_assert_internal(mi_page_thread_free_flag(page)==MI_NEVER_DELAYED_FREE);\n      mi_assert_internal(mi_page_heap(page) == NULL);\n      mi_assert_internal(page->next == NULL && page->prev==NULL);\n      _mi_stat_decrease(&tld->stats->pages_abandoned, 1);\n      segment->abandoned--;\n      // get the target heap for this thread which has a matching heap tag (so we reclaim into a matching heap)\n      mi_heap_t* target_heap = _mi_heap_by_tag(heap, page->heap_tag);  // allow custom heaps to separate objects\n      if (target_heap == NULL) {\n        target_heap = heap;\n        _mi_error_message(EFAULT, \"page with tag %u cannot be reclaimed by a heap with the same tag (using heap tag %u instead)\\n\", page->heap_tag, heap->tag );\n      }\n      // associate the heap with this page, and allow heap thread delayed free again.\n      mi_page_set_heap(page, target_heap);\n      _mi_page_use_delayed_free(page, MI_USE_DELAYED_FREE, true); // override never (after heap is set)\n      _mi_page_free_collect(page, false); // ensure used count is up to date\n      if (mi_page_all_free(page)) {\n        // if everything free by now, free the page\n        slice = mi_segment_page_clear(page, tld);   // set slice again due to coalesceing\n      }\n      else {\n        // otherwise reclaim it into the heap\n        _mi_page_reclaim(target_heap, page);\n        if (requested_block_size == mi_page_block_size(page) && mi_page_has_any_available(page) && heap == target_heap) {\n          if (right_page_reclaimed != NULL) { *right_page_reclaimed = true; }\n        }\n      }\n    }\n    else {\n      // the span is free, add it to our page queues\n      slice = mi_segment_span_free_coalesce(slice, tld); // set slice again due to coalesceing\n    }\n    mi_assert_internal(slice->slice_count>0 && slice->slice_offset==0);\n    slice = slice + slice->slice_count;\n  }\n\n  mi_assert(segment->abandoned == 0);\n  mi_assert_expensive(mi_segment_is_valid(segment, tld));\n  if (segment->used == 0) {  // due to page_clear\n    mi_assert_internal(right_page_reclaimed == NULL || !(*right_page_reclaimed));\n    mi_segment_free(segment, false, tld);\n    return NULL;\n  }\n  else {\n    return segment;\n  }\n}\n\n\n// attempt to reclaim a particular segment (called from multi threaded free `alloc.c:mi_free_block_mt`)\nbool _mi_segment_attempt_reclaim(mi_heap_t* heap, mi_segment_t* segment) {\n  if (mi_atomic_load_relaxed(&segment->thread_id) != 0) return false;  // it is not abandoned\n  if (segment->subproc != heap->tld->segments.subproc)  return false;  // only reclaim within the same subprocess\n  if (!_mi_heap_memid_is_suitable(heap,segment->memid)) return false;  // don't reclaim between exclusive and non-exclusive arena's\n  const long target = _mi_option_get_fast(mi_option_target_segments_per_thread);\n  if (target > 0 && (size_t)target <= heap->tld->segments.count) return false; // don't reclaim if going above the target count\n\n  // don't reclaim more from a `free` call than half the current segments\n  // this is to prevent a pure free-ing thread to start owning too many segments\n  // (but not for out-of-arena segments as that is the main way to be reclaimed for those)\n  if (segment->memid.memkind == MI_MEM_ARENA && heap->tld->segments.reclaim_count * 2 > heap->tld->segments.count) {\n    return false;\n  }\n  if (_mi_arena_segment_clear_abandoned(segment)) {  // atomically unabandon\n    mi_segment_t* res = mi_segment_reclaim(segment, heap, 0, NULL, &heap->tld->segments);\n    mi_assert_internal(res == segment);\n    return (res != NULL);\n  }\n  return false;\n}\n\nvoid _mi_abandoned_reclaim_all(mi_heap_t* heap, mi_segments_tld_t* tld) {\n  mi_segment_t* segment;\n  mi_arena_field_cursor_t current;\n  _mi_arena_field_cursor_init(heap, tld->subproc, true /* visit all, blocking */, &current);\n  while ((segment = _mi_arena_segment_clear_abandoned_next(&current)) != NULL) {\n    mi_segment_reclaim(segment, heap, 0, NULL, tld);\n  }\n  _mi_arena_field_cursor_done(&current);\n}\n\n\nstatic bool segment_count_is_within_target(mi_segments_tld_t* tld, size_t* ptarget) {\n  const size_t target = (size_t)mi_option_get_clamp(mi_option_target_segments_per_thread, 0, 1024);\n  if (ptarget != NULL) { *ptarget = target; }\n  return (target == 0 || tld->count < target);\n}\n\nstatic long mi_segment_get_reclaim_tries(mi_segments_tld_t* tld) {\n  // limit the tries to 10% (default) of the abandoned segments with at least 8 and at most 1024 tries.\n  const size_t perc = (size_t)mi_option_get_clamp(mi_option_max_segment_reclaim, 0, 100);\n  if (perc <= 0) return 0;\n  const size_t total_count = mi_atomic_load_relaxed(&tld->subproc->abandoned_count);\n  if (total_count == 0) return 0;\n  const size_t relative_count = (total_count > 10000 ? (total_count / 100) * perc : (total_count * perc) / 100); // avoid overflow\n  long max_tries = (long)(relative_count <= 1 ? 1 : (relative_count > 1024 ? 1024 : relative_count));\n  if (max_tries < 8 && total_count > 8) { max_tries = 8;  }\n  return max_tries;\n}\n\nstatic mi_segment_t* mi_segment_try_reclaim(mi_heap_t* heap, size_t needed_slices, size_t block_size, bool* reclaimed, mi_segments_tld_t* tld)\n{\n  *reclaimed = false;\n  long max_tries = mi_segment_get_reclaim_tries(tld);\n  if (max_tries <= 0) return NULL;\n\n  mi_segment_t* result = NULL;\n  mi_segment_t* segment = NULL;\n  mi_arena_field_cursor_t current;\n  _mi_arena_field_cursor_init(heap, tld->subproc, false /* non-blocking */, &current);\n  while (segment_count_is_within_target(tld,NULL) && (max_tries-- > 0) && ((segment = _mi_arena_segment_clear_abandoned_next(&current)) != NULL))\n  {\n    mi_assert(segment->subproc == heap->tld->segments.subproc); // cursor only visits segments in our sub-process\n    segment->abandoned_visits++;\n    // todo: should we respect numa affinity for abandoned reclaim? perhaps only for the first visit?\n    // todo: an arena exclusive heap will potentially visit many abandoned unsuitable segments and use many tries\n    // Perhaps we can skip non-suitable ones in a better way?\n    bool is_suitable = _mi_heap_memid_is_suitable(heap, segment->memid);\n    bool has_page = mi_segment_check_free(segment,needed_slices,block_size,tld); // try to free up pages (due to concurrent frees)\n    if (segment->used == 0) {\n      // free the segment (by forced reclaim) to make it available to other threads.\n      // note1: we prefer to free a segment as that might lead to reclaiming another\n      // segment that is still partially used.\n      // note2: we could in principle optimize this by skipping reclaim and directly\n      // freeing but that would violate some invariants temporarily)\n      mi_segment_reclaim(segment, heap, 0, NULL, tld);\n    }\n    else if (has_page && is_suitable) {\n      // found a large enough free span, or a page of the right block_size with free space\n      // we return the result of reclaim (which is usually `segment`) as it might free\n      // the segment due to concurrent frees (in which case `NULL` is returned).\n      result = mi_segment_reclaim(segment, heap, block_size, reclaimed, tld);\n      break;\n    }\n    else if (segment->abandoned_visits > 3 && is_suitable) {\n      // always reclaim on 3rd visit to limit the abandoned segment count.\n      mi_segment_reclaim(segment, heap, 0, NULL, tld);\n    }\n    else {\n      // otherwise, push on the visited list so it gets not looked at too quickly again\n      max_tries++; // don't count this as a try since it was not suitable\n      mi_segment_try_purge(segment, false /* true force? */); // force purge if needed as we may not visit soon again\n      _mi_arena_segment_mark_abandoned(segment);\n    }\n  }\n  _mi_arena_field_cursor_done(&current);\n  return result;\n}\n\n// collect abandoned segments\nvoid _mi_abandoned_collect(mi_heap_t* heap, bool force, mi_segments_tld_t* tld)\n{\n  mi_segment_t* segment;\n  mi_arena_field_cursor_t current; _mi_arena_field_cursor_init(heap, tld->subproc, force /* blocking? */, &current);\n  long max_tries = (force ? (long)mi_atomic_load_relaxed(&tld->subproc->abandoned_count) : 1024);  // limit latency\n  while ((max_tries-- > 0) && ((segment = _mi_arena_segment_clear_abandoned_next(&current)) != NULL)) {\n    mi_segment_check_free(segment,0,0,tld); // try to free up pages (due to concurrent frees)\n    if (segment->used == 0) {\n      // free the segment (by forced reclaim) to make it available to other threads.\n      // note: we could in principle optimize this by skipping reclaim and directly\n      // freeing but that would violate some invariants temporarily)\n      mi_segment_reclaim(segment, heap, 0, NULL, tld);\n    }\n    else {\n      // otherwise, purge if needed and push on the visited list\n      // note: forced purge can be expensive if many threads are destroyed/created as in mstress.\n      mi_segment_try_purge(segment, force);\n      _mi_arena_segment_mark_abandoned(segment);\n    }\n  }\n  _mi_arena_field_cursor_done(&current);\n}\n\n/* -----------------------------------------------------------\n   Force abandon a segment that is in use by our thread\n----------------------------------------------------------- */\n\n// force abandon a segment\nstatic void mi_segment_force_abandon(mi_segment_t* segment, mi_segments_tld_t* tld)\n{\n  mi_assert_internal(!mi_segment_is_abandoned(segment));\n  mi_assert_internal(!segment->dont_free);\n\n  // ensure the segment does not get free'd underneath us (so we can check if a page has been freed in `mi_page_force_abandon`)\n  segment->dont_free = true;\n\n  // for all slices\n  const mi_slice_t* end;\n  mi_slice_t* slice = mi_slices_start_iterate(segment, &end);\n  while (slice < end) {\n    mi_assert_internal(slice->slice_count > 0);\n    mi_assert_internal(slice->slice_offset == 0);\n    if (mi_slice_is_used(slice)) {\n      // ensure used count is up to date and collect potential concurrent frees\n      mi_page_t* const page = mi_slice_to_page(slice);\n      _mi_page_free_collect(page, false);\n      {\n        // abandon the page if it is still in-use (this will free it if possible as well)\n        mi_assert_internal(segment->used > 0);\n        if (segment->used == segment->abandoned+1) {\n          // the last page.. abandon and return as the segment will be abandoned after this\n          // and we should no longer access it.\n          segment->dont_free = false;\n          _mi_page_force_abandon(page);\n          return;\n        }\n        else {\n          // abandon and continue\n          _mi_page_force_abandon(page);\n          // it might be freed, reset the slice (note: relies on coalesce setting the slice_offset)\n          slice = mi_slice_first(slice);\n        }\n      }\n    }\n    slice = slice + slice->slice_count;\n  }\n  segment->dont_free = false;\n  mi_assert(segment->used == segment->abandoned);\n  mi_assert(segment->used == 0);\n  if (segment->used == 0) {  // paranoia\n    // all free now\n    mi_segment_free(segment, false, tld);\n  }\n  else {\n    // perform delayed purges\n    mi_segment_try_purge(segment, false /* force? */);\n  }\n}\n\n\n// try abandon segments.\n// this should be called from `reclaim_or_alloc` so we know all segments are (about) fully in use.\nstatic void mi_segments_try_abandon_to_target(mi_heap_t* heap, size_t target, mi_segments_tld_t* tld) {\n  if (target <= 1) return;\n  const size_t min_target = (target > 4 ? (target*3)/4 : target);  // 75%\n  // todo: we should maintain a list of segments per thread; for now, only consider segments from the heap full pages\n  for (int i = 0; i < 64 && tld->count >= min_target; i++) {\n    mi_page_t* page = heap->pages[MI_BIN_FULL].first;\n    while (page != NULL && mi_page_block_size(page) > MI_LARGE_OBJ_SIZE_MAX) {\n      page = page->next;\n    }\n    if (page==NULL) {\n      break;\n    }\n    mi_segment_t* segment = _mi_page_segment(page);\n    mi_segment_force_abandon(segment, tld);\n    mi_assert_internal(page != heap->pages[MI_BIN_FULL].first); // as it is just abandoned\n  }\n}\n\n// try abandon segments.\n// this should be called from `reclaim_or_alloc` so we know all segments are (about) fully in use.\nstatic void mi_segments_try_abandon(mi_heap_t* heap, mi_segments_tld_t* tld) {\n  // we call this when we are about to add a fresh segment so we should be under our target segment count.\n  size_t target = 0;\n  if (segment_count_is_within_target(tld, &target)) return;\n  mi_segments_try_abandon_to_target(heap, target, tld);\n}\n\nvoid mi_collect_reduce(size_t target_size) mi_attr_noexcept {\n  mi_collect(true);\n  mi_heap_t* heap = mi_heap_get_default();\n  mi_segments_tld_t* tld = &heap->tld->segments;\n  size_t target = target_size / MI_SEGMENT_SIZE;\n  if (target == 0) {\n    target = (size_t)mi_option_get_clamp(mi_option_target_segments_per_thread, 1, 1024);\n  }\n  mi_segments_try_abandon_to_target(heap, target, tld);\n}\n\n/* -----------------------------------------------------------\n   Reclaim or allocate\n----------------------------------------------------------- */\n\nstatic mi_segment_t* mi_segment_reclaim_or_alloc(mi_heap_t* heap, size_t needed_slices, size_t block_size, mi_segments_tld_t* tld)\n{\n  mi_assert_internal(block_size <= MI_LARGE_OBJ_SIZE_MAX);\n\n  // try to abandon some segments to increase reuse between threads\n  mi_segments_try_abandon(heap,tld);\n\n  // 1. try to reclaim an abandoned segment\n  bool reclaimed;\n  mi_segment_t* segment = mi_segment_try_reclaim(heap, needed_slices, block_size, &reclaimed, tld);\n  if (reclaimed) {\n    // reclaimed the right page right into the heap\n    mi_assert_internal(segment != NULL);\n    return NULL; // pretend out-of-memory as the page will be in the page queue of the heap with available blocks\n  }\n  else if (segment != NULL) {\n    // reclaimed a segment with a large enough empty span in it\n    return segment;\n  }\n  // 2. otherwise allocate a fresh segment\n  return mi_segment_alloc(0, 0, heap->arena_id, tld, NULL);\n}\n\n\n/* -----------------------------------------------------------\n   Page allocation\n----------------------------------------------------------- */\n\nstatic mi_page_t* mi_segments_page_alloc(mi_heap_t* heap, mi_page_kind_t page_kind, size_t required, size_t block_size, mi_segments_tld_t* tld)\n{\n  mi_assert_internal(required <= MI_LARGE_OBJ_SIZE_MAX && page_kind <= MI_PAGE_LARGE);\n\n  // find a free page\n  size_t page_size = _mi_align_up(required, (required > MI_MEDIUM_PAGE_SIZE ? MI_MEDIUM_PAGE_SIZE : MI_SEGMENT_SLICE_SIZE));\n  size_t slices_needed = page_size / MI_SEGMENT_SLICE_SIZE;\n  mi_assert_internal(slices_needed * MI_SEGMENT_SLICE_SIZE == page_size);\n  mi_page_t* page = mi_segments_page_find_and_allocate(slices_needed, heap->arena_id, tld); //(required <= MI_SMALL_SIZE_MAX ? 0 : slices_needed), tld);\n  if (page==NULL) {\n    // no free page, allocate a new segment and try again\n    if (mi_segment_reclaim_or_alloc(heap, slices_needed, block_size, tld) == NULL) {\n      // OOM or reclaimed a good page in the heap\n      return NULL;\n    }\n    else {\n      // otherwise try again\n      return mi_segments_page_alloc(heap, page_kind, required, block_size, tld);\n    }\n  }\n  mi_assert_internal(page != NULL && page->slice_count*MI_SEGMENT_SLICE_SIZE == page_size);\n  mi_assert_internal(_mi_ptr_segment(page)->thread_id == _mi_thread_id());\n  mi_segment_try_purge(_mi_ptr_segment(page), false);\n  return page;\n}\n\n\n\n/* -----------------------------------------------------------\n   Huge page allocation\n----------------------------------------------------------- */\n\nstatic mi_page_t* mi_segment_huge_page_alloc(size_t size, size_t page_alignment, mi_arena_id_t req_arena_id, mi_segments_tld_t* tld)\n{\n  mi_page_t* page = NULL;\n  mi_segment_t* segment = mi_segment_alloc(size,page_alignment,req_arena_id,tld,&page);\n  if (segment == NULL || page==NULL) return NULL;\n  mi_assert_internal(segment->used==1);\n  mi_assert_internal(mi_page_block_size(page) >= size);\n  #if MI_HUGE_PAGE_ABANDON\n  segment->thread_id = 0; // huge segments are immediately abandoned\n  #endif\n\n  // for huge pages we initialize the block_size as we may\n  // overallocate to accommodate large alignments.\n  size_t psize;\n  uint8_t* start = _mi_segment_page_start(segment, page, &psize);\n  page->block_size = psize;\n  mi_assert_internal(page->is_huge);\n\n  // decommit the part of the prefix of a page that will not be used; this can be quite large (close to MI_SEGMENT_SIZE)\n  if (page_alignment > 0 && segment->allow_decommit) {\n    uint8_t* aligned_p = (uint8_t*)_mi_align_up((uintptr_t)start, page_alignment);\n    mi_assert_internal(_mi_is_aligned(aligned_p, page_alignment));\n    mi_assert_internal(psize - (aligned_p - start) >= size);\n    uint8_t* decommit_start = start + sizeof(mi_block_t);              // for the free list\n    ptrdiff_t decommit_size = aligned_p - decommit_start;\n    _mi_os_reset(decommit_start, decommit_size);   // note: cannot use segment_decommit on huge segments\n  }\n\n  return page;\n}\n\n#if MI_HUGE_PAGE_ABANDON\n// free huge block from another thread\nvoid _mi_segment_huge_page_free(mi_segment_t* segment, mi_page_t* page, mi_block_t* block) {\n  // huge page segments are always abandoned and can be freed immediately by any thread\n  mi_assert_internal(segment->kind==MI_SEGMENT_HUGE);\n  mi_assert_internal(segment == _mi_page_segment(page));\n  mi_assert_internal(mi_atomic_load_relaxed(&segment->thread_id)==0);\n\n  // claim it and free\n  mi_heap_t* heap = mi_heap_get_default(); // issue #221; don't use the internal get_default_heap as we need to ensure the thread is initialized.\n  // paranoia: if this it the last reference, the cas should always succeed\n  size_t expected_tid = 0;\n  if (mi_atomic_cas_strong_acq_rel(&segment->thread_id, &expected_tid, heap->thread_id)) {\n    mi_block_set_next(page, block, page->free);\n    page->free = block;\n    page->used--;\n    page->is_zero_init = false;\n    mi_assert(page->used == 0);\n    mi_tld_t* tld = heap->tld;\n    _mi_segment_page_free(page, true, &tld->segments);\n  }\n#if (MI_DEBUG!=0)\n  else {\n    mi_assert_internal(false);\n  }\n#endif\n}\n\n#else\n// reset memory of a huge block from another thread\nvoid _mi_segment_huge_page_reset(mi_segment_t* segment, mi_page_t* page, mi_block_t* block) {\n  MI_UNUSED(page);\n  mi_assert_internal(segment->kind == MI_SEGMENT_HUGE);\n  mi_assert_internal(segment == _mi_page_segment(page));\n  mi_assert_internal(page->used == 1); // this is called just before the free\n  mi_assert_internal(page->free == NULL);\n  if (segment->allow_decommit) {\n    size_t csize = mi_usable_size(block);\n    if (csize > sizeof(mi_block_t)) {\n      csize = csize - sizeof(mi_block_t);\n      uint8_t* p = (uint8_t*)block + sizeof(mi_block_t);\n      _mi_os_reset(p, csize);  // note: cannot use segment_decommit on huge segments\n    }\n  }\n}\n#endif\n\n/* -----------------------------------------------------------\n   Page allocation and free\n----------------------------------------------------------- */\nmi_page_t* _mi_segment_page_alloc(mi_heap_t* heap, size_t block_size, size_t page_alignment, mi_segments_tld_t* tld) {\n  mi_page_t* page;\n  if mi_unlikely(page_alignment > MI_BLOCK_ALIGNMENT_MAX) {\n    mi_assert_internal(_mi_is_power_of_two(page_alignment));\n    mi_assert_internal(page_alignment >= MI_SEGMENT_SIZE);\n    if (page_alignment < MI_SEGMENT_SIZE) { page_alignment = MI_SEGMENT_SIZE; }\n    page = mi_segment_huge_page_alloc(block_size,page_alignment,heap->arena_id,tld);\n  }\n  else if (block_size <= MI_SMALL_OBJ_SIZE_MAX) {\n    page = mi_segments_page_alloc(heap,MI_PAGE_SMALL,block_size,block_size,tld);\n  }\n  else if (block_size <= MI_MEDIUM_OBJ_SIZE_MAX) {\n    page = mi_segments_page_alloc(heap,MI_PAGE_MEDIUM,MI_MEDIUM_PAGE_SIZE,block_size,tld);\n  }\n  else if (block_size <= MI_LARGE_OBJ_SIZE_MAX) {\n    page = mi_segments_page_alloc(heap,MI_PAGE_LARGE,block_size,block_size,tld);\n  }\n  else {\n    page = mi_segment_huge_page_alloc(block_size,page_alignment,heap->arena_id,tld);\n  }\n  mi_assert_internal(page == NULL || _mi_heap_memid_is_suitable(heap, _mi_page_segment(page)->memid));\n  mi_assert_expensive(page == NULL || mi_segment_is_valid(_mi_page_segment(page),tld));\n  mi_assert_internal(page == NULL || _mi_page_segment(page)->subproc == tld->subproc);\n  return page;\n}\n\n\n/* -----------------------------------------------------------\n   Visit blocks in a segment (only used for abandoned segments)\n----------------------------------------------------------- */\n\nstatic bool mi_segment_visit_page(mi_page_t* page, bool visit_blocks, mi_block_visit_fun* visitor, void* arg) {\n  mi_heap_area_t area;\n  _mi_heap_area_init(&area, page);\n  if (!visitor(NULL, &area, NULL, area.block_size, arg)) return false;\n  if (visit_blocks) {\n    return _mi_heap_area_visit_blocks(&area, page, visitor, arg);\n  }\n  else {\n    return true;\n  }\n}\n\nbool _mi_segment_visit_blocks(mi_segment_t* segment, int heap_tag, bool visit_blocks, mi_block_visit_fun* visitor, void* arg) {\n  const mi_slice_t* end;\n  mi_slice_t* slice = mi_slices_start_iterate(segment, &end);\n  while (slice < end) {\n    if (mi_slice_is_used(slice)) {\n      mi_page_t* const page = mi_slice_to_page(slice);\n      if (heap_tag < 0 || (int)page->heap_tag == heap_tag) {\n        if (!mi_segment_visit_page(page, visit_blocks, visitor, arg)) return false;\n      }\n    }\n    slice = slice + slice->slice_count;\n  }\n  return true;\n}\n"
  },
  {
    "path": "third-party/mimalloc/src/static.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2020, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#ifndef _DEFAULT_SOURCE\n#define _DEFAULT_SOURCE\n#endif\n#if defined(__sun)\n// same remarks as os.c for the static's context.\n#undef _XOPEN_SOURCE\n#undef _POSIX_C_SOURCE\n#endif\n\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n\n// For a static override we create a single object file\n// containing the whole library. If it is linked first\n// it will override all the standard library allocation\n// functions (on Unix's).\n#include \"alloc.c\"          // includes alloc-override.c\n#include \"alloc-aligned.c\"\n#include \"alloc-posix.c\"\n#include \"arena.c\"\n#include \"bitmap.c\"\n#include \"heap.c\"\n#include \"init.c\"\n#include \"libc.c\"\n#include \"options.c\"\n#include \"os.c\"\n#include \"page.c\"           // includes page-queue.c\n#include \"random.c\"\n#include \"segment.c\"\n#include \"segment-map.c\"\n#include \"stats.c\"\n#include \"prim/prim.c\"\n#if MI_OSX_ZONE\n#include \"prim/osx/alloc-override-zone.c\"\n#endif\n"
  },
  {
    "path": "third-party/mimalloc/src/stats.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2021, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#include \"mimalloc.h\"\n#include \"mimalloc/internal.h\"\n#include \"mimalloc/atomic.h\"\n#include \"mimalloc/prim.h\"\n\n#include <string.h> // memset\n\n#if defined(_MSC_VER) && (_MSC_VER < 1920)\n#pragma warning(disable:4204)  // non-constant aggregate initializer\n#endif\n\n/* -----------------------------------------------------------\n  Statistics operations\n----------------------------------------------------------- */\n\nstatic bool mi_is_in_main(void* stat) {\n  return ((uint8_t*)stat >= (uint8_t*)&_mi_stats_main\n         && (uint8_t*)stat < ((uint8_t*)&_mi_stats_main + sizeof(mi_stats_t)));\n}\n\nstatic void mi_stat_update(mi_stat_count_t* stat, int64_t amount) {\n  if (amount == 0) return;\n  if mi_unlikely(mi_is_in_main(stat))\n  {\n    // add atomically (for abandoned pages)\n    int64_t current = mi_atomic_addi64_relaxed(&stat->current, amount);\n    mi_atomic_maxi64_relaxed(&stat->peak, current + amount);\n    if (amount > 0) {\n      mi_atomic_addi64_relaxed(&stat->total,amount);\n    }\n  }\n  else {\n    // add thread local\n    stat->current += amount;\n    if (stat->current > stat->peak) { stat->peak = stat->current; }\n    if (amount > 0) { stat->total += amount; }\n  }\n}\n\nvoid _mi_stat_counter_increase(mi_stat_counter_t* stat, size_t amount) {\n  if (mi_is_in_main(stat)) {\n    mi_atomic_addi64_relaxed( &stat->total, (int64_t)amount );\n  }\n  else {\n    stat->total += amount;\n  }\n}\n\nvoid _mi_stat_increase(mi_stat_count_t* stat, size_t amount) {\n  mi_stat_update(stat, (int64_t)amount);\n}\n\nvoid _mi_stat_decrease(mi_stat_count_t* stat, size_t amount) {\n  mi_stat_update(stat, -((int64_t)amount));\n}\n\n\n\n// must be thread safe as it is called from stats_merge\nstatic void mi_stat_count_add_mt(mi_stat_count_t* stat, const mi_stat_count_t* src) {\n  if (stat==src) return;\n  mi_atomic_void_addi64_relaxed(&stat->total, &src->total); \n  mi_atomic_void_addi64_relaxed(&stat->current, &src->current); \n  // peak scores do really not work across threads .. we just add them\n  mi_atomic_void_addi64_relaxed( &stat->peak, &src->peak);\n  // or, take the max?\n  // mi_atomic_maxi64_relaxed(&stat->peak, src->peak);\n}\n\nstatic void mi_stat_counter_add_mt(mi_stat_counter_t* stat, const mi_stat_counter_t* src) {\n  if (stat==src) return;\n  mi_atomic_void_addi64_relaxed(&stat->total, &src->total);\n}\n\n#define MI_STAT_COUNT(stat)    mi_stat_count_add_mt(&stats->stat, &src->stat);\n#define MI_STAT_COUNTER(stat)  mi_stat_counter_add_mt(&stats->stat, &src->stat);\n\n// must be thread safe as it is called from stats_merge\nstatic void mi_stats_add(mi_stats_t* stats, const mi_stats_t* src) {\n  if (stats==src) return;\n\n  // copy all fields\n  MI_STAT_FIELDS()\n\n  #if MI_STAT>1\n  for (size_t i = 0; i <= MI_BIN_HUGE; i++) {\n    mi_stat_count_add_mt(&stats->malloc_bins[i], &src->malloc_bins[i]);\n  }\n  #endif\n  for (size_t i = 0; i <= MI_BIN_HUGE; i++) {\n    mi_stat_count_add_mt(&stats->page_bins[i], &src->page_bins[i]);\n  }\n}\n\n#undef MI_STAT_COUNT\n#undef MI_STAT_COUNTER\n\n/* -----------------------------------------------------------\n  Display statistics\n----------------------------------------------------------- */\n\n// unit > 0 : size in binary bytes\n// unit == 0: count as decimal\n// unit < 0 : count in binary\nstatic void mi_printf_amount(int64_t n, int64_t unit, mi_output_fun* out, void* arg, const char* fmt) {\n  char buf[32]; buf[0] = 0;\n  int  len = 32;\n  const char* suffix = (unit <= 0 ? \" \" : \"B\");\n  const int64_t base = (unit == 0 ? 1000 : 1024);\n  if (unit>0) n *= unit;\n\n  const int64_t pos = (n < 0 ? -n : n);\n  if (pos < base) {\n    if (n!=1 || suffix[0] != 'B') {  // skip printing 1 B for the unit column\n      _mi_snprintf(buf, len, \"%lld   %-3s\", (long long)n, (n==0 ? \"\" : suffix));\n    }\n  }\n  else {\n    int64_t divider = base;\n    const char* magnitude = \"K\";\n    if (pos >= divider*base) { divider *= base; magnitude = \"M\"; }\n    if (pos >= divider*base) { divider *= base; magnitude = \"G\"; }\n    const int64_t tens = (n / (divider/10));\n    const long whole = (long)(tens/10);\n    const long frac1 = (long)(tens%10);\n    char unitdesc[8];\n    _mi_snprintf(unitdesc, 8, \"%s%s%s\", magnitude, (base==1024 ? \"i\" : \"\"), suffix);\n    _mi_snprintf(buf, len, \"%ld.%ld %-3s\", whole, (frac1 < 0 ? -frac1 : frac1), unitdesc);\n  }\n  _mi_fprintf(out, arg, (fmt==NULL ? \"%12s\" : fmt), buf);\n}\n\n\nstatic void mi_print_amount(int64_t n, int64_t unit, mi_output_fun* out, void* arg) {\n  mi_printf_amount(n,unit,out,arg,NULL);\n}\n\nstatic void mi_print_count(int64_t n, int64_t unit, mi_output_fun* out, void* arg) {\n  if (unit==1) _mi_fprintf(out, arg, \"%12s\",\" \");\n          else mi_print_amount(n,0,out,arg);\n}\n\nstatic void mi_stat_print_ex(const mi_stat_count_t* stat, const char* msg, int64_t unit, mi_output_fun* out, void* arg, const char* notok ) {\n  _mi_fprintf(out, arg,\"%10s:\", msg);\n  if (unit != 0) {\n    if (unit > 0) {\n      mi_print_amount(stat->peak, unit, out, arg);\n      mi_print_amount(stat->total, unit, out, arg);\n      // mi_print_amount(stat->freed, unit, out, arg);\n      mi_print_amount(stat->current, unit, out, arg);\n      mi_print_amount(unit, 1, out, arg);\n      mi_print_count(stat->total, unit, out, arg);\n    }\n    else {\n      mi_print_amount(stat->peak, -1, out, arg);\n      mi_print_amount(stat->total, -1, out, arg);\n      // mi_print_amount(stat->freed, -1, out, arg);\n      mi_print_amount(stat->current, -1, out, arg);\n      if (unit == -1) {\n        _mi_fprintf(out, arg, \"%24s\", \"\");\n      }\n      else {\n        mi_print_amount(-unit, 1, out, arg);\n        mi_print_count((stat->total / -unit), 0, out, arg);\n      }\n    }\n    if (stat->current != 0) {\n      _mi_fprintf(out, arg, \"  \");\n      _mi_fprintf(out, arg, (notok == NULL ? \"not all freed\" : notok));\n      _mi_fprintf(out, arg, \"\\n\");\n    }\n    else {\n      _mi_fprintf(out, arg, \"  ok\\n\");\n    }\n  }\n  else {\n    mi_print_amount(stat->peak, 1, out, arg);\n    mi_print_amount(stat->total, 1, out, arg);\n    _mi_fprintf(out, arg, \"%11s\", \" \");  // no freed\n    mi_print_amount(stat->current, 1, out, arg);\n    _mi_fprintf(out, arg, \"\\n\");\n  }\n}\n\nstatic void mi_stat_print(const mi_stat_count_t* stat, const char* msg, int64_t unit, mi_output_fun* out, void* arg) {\n  mi_stat_print_ex(stat, msg, unit, out, arg, NULL);\n}\n\nstatic void mi_stat_peak_print(const mi_stat_count_t* stat, const char* msg, int64_t unit, mi_output_fun* out, void* arg) {\n  _mi_fprintf(out, arg, \"%10s:\", msg);\n  mi_print_amount(stat->peak, unit, out, arg);\n  _mi_fprintf(out, arg, \"\\n\");\n}\n\nstatic void mi_stat_counter_print(const mi_stat_counter_t* stat, const char* msg, mi_output_fun* out, void* arg ) {\n  _mi_fprintf(out, arg, \"%10s:\", msg);\n  mi_print_amount(stat->total, -1, out, arg);\n  _mi_fprintf(out, arg, \"\\n\");\n}\n\n\nstatic void mi_stat_counter_print_avg(const mi_stat_counter_t* stat, const char* msg, mi_output_fun* out, void* arg) {\n  const int64_t avg_tens = (stat->total == 0 ? 0 : (stat->total*10 / stat->total));\n  const long avg_whole = (long)(avg_tens/10);\n  const long avg_frac1 = (long)(avg_tens%10);\n  _mi_fprintf(out, arg, \"%10s: %5ld.%ld avg\\n\", msg, avg_whole, avg_frac1);\n}\n\n\nstatic void mi_print_header(mi_output_fun* out, void* arg ) {\n  _mi_fprintf(out, arg, \"%10s: %11s %11s %11s %11s %11s\\n\", \"heap stats\", \"peak   \", \"total   \", \"current   \", \"unit   \", \"total#   \");\n}\n\n#if MI_STAT>1\nstatic void mi_stats_print_bins(const mi_stat_count_t* bins, size_t max, const char* fmt, mi_output_fun* out, void* arg) {\n  bool found = false;\n  char buf[64];\n  for (size_t i = 0; i <= max; i++) {\n    if (bins[i].total > 0) {\n      found = true;\n      int64_t unit = _mi_bin_size((uint8_t)i);\n      _mi_snprintf(buf, 64, \"%s %3lu\", fmt, (long)i);\n      mi_stat_print(&bins[i], buf, unit, out, arg);\n    }\n  }\n  if (found) {\n    _mi_fprintf(out, arg, \"\\n\");\n    mi_print_header(out, arg);\n  }\n}\n#endif\n\n\n\n//------------------------------------------------------------\n// Use an output wrapper for line-buffered output\n// (which is nice when using loggers etc.)\n//------------------------------------------------------------\ntypedef struct buffered_s {\n  mi_output_fun* out;   // original output function\n  void*          arg;   // and state\n  char*          buf;   // local buffer of at least size `count+1`\n  size_t         used;  // currently used chars `used <= count`\n  size_t         count; // total chars available for output\n} buffered_t;\n\nstatic void mi_buffered_flush(buffered_t* buf) {\n  buf->buf[buf->used] = 0;\n  _mi_fputs(buf->out, buf->arg, NULL, buf->buf);\n  buf->used = 0;\n}\n\nstatic void mi_cdecl mi_buffered_out(const char* msg, void* arg) {\n  buffered_t* buf = (buffered_t*)arg;\n  if (msg==NULL || buf==NULL) return;\n  for (const char* src = msg; *src != 0; src++) {\n    char c = *src;\n    if (buf->used >= buf->count) mi_buffered_flush(buf);\n    mi_assert_internal(buf->used < buf->count);\n    buf->buf[buf->used++] = c;\n    if (c == '\\n') mi_buffered_flush(buf);\n  }\n}\n\n//------------------------------------------------------------\n// Print statistics\n//------------------------------------------------------------\n\nstatic void _mi_stats_print(mi_stats_t* stats, mi_output_fun* out0, void* arg0) mi_attr_noexcept {\n  // wrap the output function to be line buffered\n  char buf[256];\n  buffered_t buffer = { out0, arg0, NULL, 0, 255 };\n  buffer.buf = buf;\n  mi_output_fun* out = &mi_buffered_out;\n  void* arg = &buffer;\n\n  // and print using that\n  mi_print_header(out,arg);\n  #if MI_STAT>1\n  mi_stats_print_bins(stats->malloc_bins, MI_BIN_HUGE, \"normal\",out,arg);\n  #endif\n  #if MI_STAT\n  mi_stat_print(&stats->malloc_normal, \"normal\", (stats->malloc_normal_count.total == 0 ? 1 : -1), out, arg);\n  // mi_stat_print(&stats->malloc_large, \"large\", (stats->malloc_large_count.total == 0 ? 1 : -1), out, arg);\n  mi_stat_print(&stats->malloc_huge, \"huge\", (stats->malloc_huge_count.total == 0 ? 1 : -1), out, arg);\n  mi_stat_count_t total = { 0,0,0 };\n  mi_stat_count_add_mt(&total, &stats->malloc_normal);\n  // mi_stat_count_add(&total, &stats->malloc_large);\n  mi_stat_count_add_mt(&total, &stats->malloc_huge);\n  mi_stat_print_ex(&total, \"total\", 1, out, arg, \"\");\n  #endif\n  #if MI_STAT>1\n  mi_stat_print_ex(&stats->malloc_requested, \"malloc req\", 1, out, arg, \"\");\n  _mi_fprintf(out, arg, \"\\n\");\n  #endif\n  mi_stat_print_ex(&stats->reserved, \"reserved\", 1, out, arg, \"\");\n  mi_stat_print_ex(&stats->committed, \"committed\", 1, out, arg, \"\");\n  mi_stat_peak_print(&stats->reset, \"reset\", 1, out, arg );\n  mi_stat_peak_print(&stats->purged, \"purged\", 1, out, arg );\n  mi_stat_print_ex(&stats->page_committed, \"touched\", 1, out, arg, \"\");\n  mi_stat_print(&stats->segments, \"segments\", -1, out, arg);\n  mi_stat_print(&stats->segments_abandoned, \"-abandoned\", -1, out, arg);\n  mi_stat_print(&stats->segments_cache, \"-cached\", -1, out, arg);\n  mi_stat_print(&stats->pages, \"pages\", -1, out, arg);\n  mi_stat_print(&stats->pages_abandoned, \"-abandoned\", -1, out, arg);\n  mi_stat_counter_print(&stats->pages_extended, \"-extended\", out, arg);\n  mi_stat_counter_print(&stats->pages_retire, \"-retire\", out, arg);\n  mi_stat_counter_print(&stats->arena_count, \"arenas\", out, arg);\n  // mi_stat_counter_print(&stats->arena_crossover_count, \"-crossover\", out, arg);\n  mi_stat_counter_print(&stats->arena_rollback_count, \"-rollback\", out, arg);\n  mi_stat_counter_print(&stats->mmap_calls, \"mmaps\", out, arg);\n  mi_stat_counter_print(&stats->commit_calls, \"commits\", out, arg);\n  mi_stat_counter_print(&stats->reset_calls, \"resets\", out, arg);\n  mi_stat_counter_print(&stats->purge_calls, \"purges\", out, arg);\n  mi_stat_counter_print(&stats->malloc_guarded_count, \"guarded\", out, arg);\n  mi_stat_print(&stats->threads, \"threads\", -1, out, arg);\n  mi_stat_counter_print_avg(&stats->page_searches, \"searches\", out, arg);\n  _mi_fprintf(out, arg, \"%10s: %5zu\\n\", \"numa nodes\", _mi_os_numa_node_count());\n\n  size_t elapsed;\n  size_t user_time;\n  size_t sys_time;\n  size_t current_rss;\n  size_t peak_rss;\n  size_t current_commit;\n  size_t peak_commit;\n  size_t page_faults;\n  mi_process_info(&elapsed, &user_time, &sys_time, &current_rss, &peak_rss, &current_commit, &peak_commit, &page_faults);\n  _mi_fprintf(out, arg, \"%10s: %5ld.%03ld s\\n\", \"elapsed\", elapsed/1000, elapsed%1000);\n  _mi_fprintf(out, arg, \"%10s: user: %ld.%03ld s, system: %ld.%03ld s, faults: %lu, rss: \", \"process\",\n              user_time/1000, user_time%1000, sys_time/1000, sys_time%1000, (unsigned long)page_faults );\n  mi_printf_amount((int64_t)peak_rss, 1, out, arg, \"%s\");\n  if (peak_commit > 0) {\n    _mi_fprintf(out, arg, \", commit: \");\n    mi_printf_amount((int64_t)peak_commit, 1, out, arg, \"%s\");\n  }\n  _mi_fprintf(out, arg, \"\\n\");\n}\n\nstatic mi_msecs_t mi_process_start; // = 0\n\nstatic mi_stats_t* mi_stats_get_default(void) {\n  mi_heap_t* heap = mi_heap_get_default();\n  return &heap->tld->stats;\n}\n\nstatic void mi_stats_merge_from(mi_stats_t* stats) {\n  if (stats != &_mi_stats_main) {\n    mi_stats_add(&_mi_stats_main, stats);\n    memset(stats, 0, sizeof(mi_stats_t));\n  }\n}\n\nvoid mi_stats_reset(void) mi_attr_noexcept {\n  mi_stats_t* stats = mi_stats_get_default();\n  if (stats != &_mi_stats_main) { memset(stats, 0, sizeof(mi_stats_t)); }\n  memset(&_mi_stats_main, 0, sizeof(mi_stats_t));\n  if (mi_process_start == 0) { mi_process_start = _mi_clock_start(); };\n}\n\nvoid mi_stats_merge(void) mi_attr_noexcept {\n  mi_stats_merge_from( mi_stats_get_default() );\n}\n\nvoid _mi_stats_done(mi_stats_t* stats) {  // called from `mi_thread_done`\n  mi_stats_merge_from(stats);\n}\n\nvoid mi_stats_print_out(mi_output_fun* out, void* arg) mi_attr_noexcept {\n  mi_stats_merge_from(mi_stats_get_default());\n  _mi_stats_print(&_mi_stats_main, out, arg);\n}\n\nvoid mi_stats_print(void* out) mi_attr_noexcept {\n  // for compatibility there is an `out` parameter (which can be `stdout` or `stderr`)\n  mi_stats_print_out((mi_output_fun*)out, NULL);\n}\n\nvoid mi_thread_stats_print_out(mi_output_fun* out, void* arg) mi_attr_noexcept {\n  _mi_stats_print(mi_stats_get_default(), out, arg);\n}\n\n\n// ----------------------------------------------------------------\n// Basic timer for convenience; use milli-seconds to avoid doubles\n// ----------------------------------------------------------------\n\nstatic mi_msecs_t mi_clock_diff;\n\nmi_msecs_t _mi_clock_now(void) {\n  return _mi_prim_clock_now();\n}\n\nmi_msecs_t _mi_clock_start(void) {\n  if (mi_clock_diff == 0.0) {\n    mi_msecs_t t0 = _mi_clock_now();\n    mi_clock_diff = _mi_clock_now() - t0;\n  }\n  return _mi_clock_now();\n}\n\nmi_msecs_t _mi_clock_end(mi_msecs_t start) {\n  mi_msecs_t end = _mi_clock_now();\n  return (end - start - mi_clock_diff);\n}\n\n\n// --------------------------------------------------------\n// Basic process statistics\n// --------------------------------------------------------\n\nmi_decl_export void mi_process_info(size_t* elapsed_msecs, size_t* user_msecs, size_t* system_msecs, size_t* current_rss, size_t* peak_rss, size_t* current_commit, size_t* peak_commit, size_t* page_faults) mi_attr_noexcept\n{\n  mi_process_info_t pinfo;\n  _mi_memzero_var(pinfo);\n  pinfo.elapsed        = _mi_clock_end(mi_process_start);\n  pinfo.current_commit = (size_t)(mi_atomic_loadi64_relaxed((_Atomic(int64_t)*)&_mi_stats_main.committed.current));\n  pinfo.peak_commit    = (size_t)(mi_atomic_loadi64_relaxed((_Atomic(int64_t)*)&_mi_stats_main.committed.peak));\n  pinfo.current_rss    = pinfo.current_commit;\n  pinfo.peak_rss       = pinfo.peak_commit;\n  pinfo.utime          = 0;\n  pinfo.stime          = 0;\n  pinfo.page_faults    = 0;\n\n  _mi_prim_process_info(&pinfo);\n\n  if (elapsed_msecs!=NULL)  *elapsed_msecs  = (pinfo.elapsed < 0 ? 0 : (pinfo.elapsed < (mi_msecs_t)PTRDIFF_MAX ? (size_t)pinfo.elapsed : PTRDIFF_MAX));\n  if (user_msecs!=NULL)     *user_msecs     = (pinfo.utime < 0 ? 0 : (pinfo.utime < (mi_msecs_t)PTRDIFF_MAX ? (size_t)pinfo.utime : PTRDIFF_MAX));\n  if (system_msecs!=NULL)   *system_msecs   = (pinfo.stime < 0 ? 0 : (pinfo.stime < (mi_msecs_t)PTRDIFF_MAX ? (size_t)pinfo.stime : PTRDIFF_MAX));\n  if (current_rss!=NULL)    *current_rss    = pinfo.current_rss;\n  if (peak_rss!=NULL)       *peak_rss       = pinfo.peak_rss;\n  if (current_commit!=NULL) *current_commit = pinfo.current_commit;\n  if (peak_commit!=NULL)    *peak_commit    = pinfo.peak_commit;\n  if (page_faults!=NULL)    *page_faults    = pinfo.page_faults;\n}\n\n\n// --------------------------------------------------------\n// Return statistics\n// --------------------------------------------------------\n\nvoid mi_stats_get(size_t stats_size, mi_stats_t* stats) mi_attr_noexcept {\n  if (stats == NULL || stats_size == 0) return;\n  _mi_memzero(stats, stats_size);\n  const size_t size = (stats_size > sizeof(mi_stats_t) ? sizeof(mi_stats_t) : stats_size);\n  _mi_memcpy(stats, &_mi_stats_main, size);\n  stats->version = MI_STAT_VERSION;\n}\n\n\n// --------------------------------------------------------\n// Statics in json format\n// --------------------------------------------------------\n\ntypedef struct mi_heap_buf_s {\n  char*   buf;\n  size_t  size;\n  size_t  used;\n  bool    can_realloc;\n} mi_heap_buf_t;\n\nstatic bool mi_heap_buf_expand(mi_heap_buf_t* hbuf) {\n  if (hbuf==NULL) return false;\n  if (hbuf->buf != NULL && hbuf->size>0) {\n    hbuf->buf[hbuf->size-1] = 0;\n  }\n  if (hbuf->size > SIZE_MAX/2 || !hbuf->can_realloc) return false;\n  const size_t newsize = (hbuf->size == 0 ? 2*MI_KiB : 2*hbuf->size);\n  char* const  newbuf  = (char*)mi_rezalloc(hbuf->buf, newsize);\n  if (newbuf == NULL) return false;\n  hbuf->buf = newbuf;\n  hbuf->size = newsize;\n  return true;\n}\n\nstatic void mi_heap_buf_print(mi_heap_buf_t* hbuf, const char* msg) {\n  if (msg==NULL || hbuf==NULL) return;\n  if (hbuf->used + 1 >= hbuf->size && !hbuf->can_realloc) return;\n  for (const char* src = msg; *src != 0; src++) {\n    char c = *src;\n    if (hbuf->used + 1 >= hbuf->size) {\n      if (!mi_heap_buf_expand(hbuf)) return;\n    }\n    mi_assert_internal(hbuf->used < hbuf->size);\n    hbuf->buf[hbuf->used++] = c;\n  }\n  mi_assert_internal(hbuf->used < hbuf->size);\n  hbuf->buf[hbuf->used] = 0;\n}\n\nstatic void mi_heap_buf_print_count_bin(mi_heap_buf_t* hbuf, const char* prefix, mi_stat_count_t* stat, size_t bin, bool add_comma) {\n  const size_t binsize = _mi_bin_size(bin);\n  const size_t pagesize = (binsize <= MI_SMALL_OBJ_SIZE_MAX ? MI_SMALL_PAGE_SIZE :\n                            (binsize <= MI_MEDIUM_OBJ_SIZE_MAX ? MI_MEDIUM_PAGE_SIZE :\n                              #if MI_LARGE_PAGE_SIZE\n                              (binsize <= MI_LARGE_OBJ_SIZE_MAX ? MI_LARGE_PAGE_SIZE : 0)\n                              #else\n                              0\n                              #endif\n                              ));\n  char buf[128];\n  _mi_snprintf(buf, 128, \"%s{ \\\"total\\\": %lld, \\\"peak\\\": %lld, \\\"current\\\": %lld, \\\"block_size\\\": %zu, \\\"page_size\\\": %zu }%s\\n\", prefix, stat->total, stat->peak, stat->current, binsize, pagesize, (add_comma ? \",\" : \"\"));\n  buf[127] = 0;\n  mi_heap_buf_print(hbuf, buf);\n}\n\nstatic void mi_heap_buf_print_count(mi_heap_buf_t* hbuf, const char* prefix, mi_stat_count_t* stat, bool add_comma) {\n  char buf[128];\n  _mi_snprintf(buf, 128, \"%s{ \\\"total\\\": %lld, \\\"peak\\\": %lld, \\\"current\\\": %lld }%s\\n\", prefix, stat->total, stat->peak, stat->current, (add_comma ? \",\" : \"\"));\n  buf[127] = 0;\n  mi_heap_buf_print(hbuf, buf);\n}\n\nstatic void mi_heap_buf_print_count_value(mi_heap_buf_t* hbuf, const char* name, mi_stat_count_t* stat) {\n  char buf[128];\n  _mi_snprintf(buf, 128, \"  \\\"%s\\\": \", name);\n  buf[127] = 0;\n  mi_heap_buf_print(hbuf, buf);\n  mi_heap_buf_print_count(hbuf, \"\", stat, true);\n}\n\nstatic void mi_heap_buf_print_value(mi_heap_buf_t* hbuf, const char* name, int64_t val) {\n  char buf[128];\n  _mi_snprintf(buf, 128, \"  \\\"%s\\\": %lld,\\n\", name, val);\n  buf[127] = 0;\n  mi_heap_buf_print(hbuf, buf);\n}\n\nstatic void mi_heap_buf_print_size(mi_heap_buf_t* hbuf, const char* name, size_t val, bool add_comma) {\n  char buf[128];\n  _mi_snprintf(buf, 128, \"    \\\"%s\\\": %zu%s\\n\", name, val, (add_comma ? \",\" : \"\"));\n  buf[127] = 0;\n  mi_heap_buf_print(hbuf, buf);\n}\n\nstatic void mi_heap_buf_print_counter_value(mi_heap_buf_t* hbuf, const char* name, mi_stat_counter_t* stat) {\n  mi_heap_buf_print_value(hbuf, name, stat->total);\n}\n\n#define MI_STAT_COUNT(stat)    mi_heap_buf_print_count_value(&hbuf, #stat, &stats->stat);\n#define MI_STAT_COUNTER(stat)  mi_heap_buf_print_counter_value(&hbuf, #stat, &stats->stat);\n\nchar* mi_stats_get_json(size_t output_size, char* output_buf) mi_attr_noexcept {\n  mi_heap_buf_t hbuf = { NULL, 0, 0, true };\n  if (output_size > 0 && output_buf != NULL) {\n    _mi_memzero(output_buf, output_size);\n    hbuf.buf = output_buf;\n    hbuf.size = output_size;\n    hbuf.can_realloc = false;\n  }\n  else {\n    if (!mi_heap_buf_expand(&hbuf)) return NULL;\n  }\n  mi_heap_buf_print(&hbuf, \"{\\n\");\n  mi_heap_buf_print_value(&hbuf, \"version\", MI_STAT_VERSION);\n  mi_heap_buf_print_value(&hbuf, \"mimalloc_version\", MI_MALLOC_VERSION);\n\n  // process info\n  mi_heap_buf_print(&hbuf, \"  \\\"process\\\": {\\n\");\n  size_t elapsed;\n  size_t user_time;\n  size_t sys_time;\n  size_t current_rss;\n  size_t peak_rss;\n  size_t current_commit;\n  size_t peak_commit;\n  size_t page_faults;\n  mi_process_info(&elapsed, &user_time, &sys_time, &current_rss, &peak_rss, &current_commit, &peak_commit, &page_faults);\n  mi_heap_buf_print_size(&hbuf, \"elapsed_msecs\", elapsed, true);\n  mi_heap_buf_print_size(&hbuf, \"user_msecs\", user_time, true);\n  mi_heap_buf_print_size(&hbuf, \"system_msecs\", sys_time, true);\n  mi_heap_buf_print_size(&hbuf, \"page_faults\", page_faults, true);\n  mi_heap_buf_print_size(&hbuf, \"rss_current\", current_rss, true);\n  mi_heap_buf_print_size(&hbuf, \"rss_peak\", peak_rss, true);\n  mi_heap_buf_print_size(&hbuf, \"commit_current\", current_commit, true);\n  mi_heap_buf_print_size(&hbuf, \"commit_peak\", peak_commit, false);\n  mi_heap_buf_print(&hbuf, \"  },\\n\");\n\n  // statistics\n  mi_stats_t* stats = &_mi_stats_main;\n  MI_STAT_FIELDS()\n\n  // size bins\n  mi_heap_buf_print(&hbuf, \"  \\\"malloc_bins\\\": [\\n\");\n  for (size_t i = 0; i <= MI_BIN_HUGE; i++) {\n    mi_heap_buf_print_count_bin(&hbuf, \"    \", &stats->malloc_bins[i], i, i!=MI_BIN_HUGE);\n  }\n  mi_heap_buf_print(&hbuf, \"  ],\\n\");\n  mi_heap_buf_print(&hbuf, \"  \\\"page_bins\\\": [\\n\");\n  for (size_t i = 0; i <= MI_BIN_HUGE; i++) {\n    mi_heap_buf_print_count_bin(&hbuf, \"    \", &stats->page_bins[i], i, i!=MI_BIN_HUGE);\n  }\n  mi_heap_buf_print(&hbuf, \"  ]\\n\");\n  mi_heap_buf_print(&hbuf, \"}\\n\");\n  return hbuf.buf;\n}\n"
  },
  {
    "path": "third-party/mimalloc/test/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.18)\nproject(mimalloc-test C CXX)\n\nset(CMAKE_C_STANDARD 11)\nset(CMAKE_CXX_STANDARD 17)\n\n# Set default build type\nif (NOT CMAKE_BUILD_TYPE)\n  if (\"${CMAKE_BINARY_DIR}\" MATCHES \".*(D|d)ebug$\")\n    message(STATUS \"No build type selected, default to *** Debug ***\")\n    set(CMAKE_BUILD_TYPE \"Debug\")\n  else()\n    message(STATUS \"No build type selected, default to *** Release ***\")\n    set(CMAKE_BUILD_TYPE \"Release\")\n  endif()\nendif()\n\n# Import mimalloc (if installed)\nfind_package(mimalloc 2.2 CONFIG REQUIRED)\nmessage(STATUS \"Found mimalloc installed at: ${MIMALLOC_LIBRARY_DIR} (${MIMALLOC_VERSION_DIR})\")\n\n\n# link with a dynamic shared library\n# use `LD_PRELOAD` to actually override malloc/free at runtime with mimalloc\nadd_executable(dynamic-override  main-override.c)\ntarget_link_libraries(dynamic-override PUBLIC mimalloc)\n\nadd_executable(dynamic-override-cxx  main-override.cpp)\ntarget_link_libraries(dynamic-override-cxx PUBLIC mimalloc)\n\n\n# overriding with a static object file works reliable as the symbols in the\n# object file have priority over those in library files\nadd_executable(static-override-obj main-override.c ${MIMALLOC_OBJECT_DIR}/mimalloc${CMAKE_C_OUTPUT_EXTENSION})\ntarget_include_directories(static-override-obj PUBLIC ${MIMALLOC_INCLUDE_DIR})\ntarget_link_libraries(static-override-obj PUBLIC mimalloc-static)\n\n\n# overriding with a static library works too if using the `mimalloc-override.h`\n# header to redefine malloc/free. (the library already overrides new/delete)\nadd_executable(static-override-static main-override-static.c)\ntarget_link_libraries(static-override-static PUBLIC mimalloc-static)\n\n\n# overriding with a static library: this may not work if the library is linked too late\n# on the command line after the C runtime library; but we cannot control that well in CMake\nadd_executable(static-override main-override.c)\ntarget_link_libraries(static-override PUBLIC mimalloc-static)\n\nadd_executable(static-override-cxx  main-override.cpp)\ntarget_link_libraries(static-override-cxx PUBLIC mimalloc-static)\n\n\n## test memory errors\nadd_executable(test-wrong  test-wrong.c)\ntarget_link_libraries(test-wrong PUBLIC mimalloc)\n"
  },
  {
    "path": "third-party/mimalloc/test/main-override-dep.cpp",
    "content": "// Issue #981: test overriding allocation in a DLL that is compiled independent of mimalloc. \n// This is imported by the `mimalloc-test-override` project.\n#include <string>\n#include \"main-override-dep.h\"\n\nstd::string TestAllocInDll::GetString()\n{\n\tchar* test = new char[128];\n\tmemset(test, 0, 128);\n\tconst char* t = \"test\";\n\tmemcpy(test, t, 4);\n\tstd::string r = test;\n\tdelete[] test;\n\treturn r;\n}"
  },
  {
    "path": "third-party/mimalloc/test/main-override-dep.h",
    "content": "#pragma once\n// Issue #981: test overriding allocation in a DLL that is compiled independent of mimalloc. \n// This is imported by the `mimalloc-test-override` project.\n\n#include <string>\n\nclass TestAllocInDll\n{\npublic:\n\t__declspec(dllexport) std::string GetString();\n};\n"
  },
  {
    "path": "third-party/mimalloc/test/main-override-static.c",
    "content": "#if _WIN32\n#include <windows.h>\n#endif\n#include <stdlib.h>\n#include <stdio.h>\n#include <assert.h>\n#include <string.h>\n#include <stdint.h>\n\n#include <mimalloc.h>\n#include <mimalloc-override.h>  // redefines malloc etc.\n\n\nstatic void double_free1();\nstatic void double_free2();\nstatic void corrupt_free();\nstatic void block_overflow1();\nstatic void block_overflow2();\nstatic void invalid_free();\nstatic void test_aslr(void);\nstatic void test_process_info(void);\nstatic void test_reserved(void);\nstatic void negative_stat(void);\nstatic void alloc_huge(void);\nstatic void test_heap_walk(void);\nstatic void test_heap_arena(void);\nstatic void test_align(void);\nstatic void test_canary_leak(void);\nstatic void test_manage_os_memory(void);\n// static void test_large_pages(void);\n\nint main() {\n  mi_version();\n  mi_stats_reset();\n  \n  // mi_bins();\n\n  // test_manage_os_memory();\n  // test_large_pages();\n  // detect double frees and heap corruption\n  // double_free1();\n  // double_free2();\n  // corrupt_free();\n  // block_overflow1();\n  // block_overflow2();\n  // test_canary_leak();\n  // test_aslr();\n  // invalid_free();\n  // test_reserved();\n  // negative_stat();\n  // test_heap_walk();\n  // alloc_huge();\n  // test_heap_walk();\n  // test_heap_arena();\n  // test_align();\n  \n  void* p1 = malloc(78);\n  void* p2 = malloc(24);\n  free(p1);\n  p1 = mi_malloc(8);\n  char* s = strdup(\"hello\\n\");\n  free(p2);\n\n  mi_heap_t* h = mi_heap_new();\n  mi_heap_set_default(h);\n\n  p2 = malloc(16);\n  p1 = realloc(p1, 32);\n  free(p1);\n  free(p2);\n  free(s);\n  \n  /* now test if override worked by allocating/freeing across the api's*/\n  //p1 = mi_malloc(32);\n  //free(p1);\n  //p2 = malloc(32);\n  //mi_free(p2);\n\n  //mi_collect(true);\n  //mi_stats_print(NULL);\n\n  // test_process_info();\n\n  return 0;\n}\n\nstatic void test_align() {\n  void* p = mi_malloc_aligned(256, 256);\n  if (((uintptr_t)p % 256) != 0) {\n    fprintf(stderr, \"%p is not 256 alignend!\\n\", p);\n  }\n}\n\nstatic void invalid_free() {\n  free((void*)0xBADBEEF);\n  realloc((void*)0xBADBEEF,10);\n}\n\nstatic void block_overflow1() {\n  uint8_t* p = (uint8_t*)mi_malloc(17);\n  p[18] = 0;\n  free(p);\n}\n\nstatic void block_overflow2() {\n  uint8_t* p = (uint8_t*)mi_malloc(16);\n  p[17] = 0;\n  free(p);\n}\n\n// The double free samples come ArcHeap [1] by Insu Yun (issue #161)\n// [1]: https://arxiv.org/pdf/1903.00503.pdf\n\nstatic void double_free1() {\n  void* p[256];\n  //uintptr_t buf[256];\n\n  p[0] = mi_malloc(622616);\n  p[1] = mi_malloc(655362);\n  p[2] = mi_malloc(786432);\n  mi_free(p[2]);\n  // [VULN] Double free\n  mi_free(p[2]);\n  p[3] = mi_malloc(786456);\n  // [BUG] Found overlap\n  // p[3]=0x429b2ea2000 (size=917504), p[1]=0x429b2e42000 (size=786432)\n  fprintf(stderr, \"p3: %p-%p, p1: %p-%p, p2: %p\\n\", p[3], (uint8_t*)(p[3]) + 786456, p[1], (uint8_t*)(p[1]) + 655362, p[2]);\n}\n\nstatic void double_free2() {\n  void* p[256];\n  //uintptr_t buf[256];\n  // [INFO] Command buffer: 0x327b2000\n  // [INFO] Input size: 182\n  p[0] = malloc(712352);\n  p[1] = malloc(786432);\n  free(p[0]);\n  // [VULN] Double free\n  free(p[0]);\n  p[2] = malloc(786440);\n  p[3] = malloc(917504);\n  p[4] = malloc(786440);\n  // [BUG] Found overlap\n  // p[4]=0x433f1402000 (size=917504), p[1]=0x433f14c2000 (size=786432)\n  fprintf(stderr, \"p1: %p-%p, p2: %p-%p\\n\", p[4], (uint8_t*)(p[4]) + 917504, p[1], (uint8_t*)(p[1]) + 786432);\n}\n\n\n// Try to corrupt the heap through buffer overflow\n#define N   256\n#define SZ  64\n\nstatic void corrupt_free() {\n  void* p[N];\n  // allocate\n  for (int i = 0; i < N; i++) {\n    p[i] = malloc(SZ);\n  }\n  // free some\n  for (int i = 0; i < N; i += (N/10)) {\n    free(p[i]);\n    p[i] = NULL;\n  }\n  // try to corrupt the free list\n  for (int i = 0; i < N; i++) {\n    if (p[i] != NULL) {\n      memset(p[i], 0, SZ+8);\n    }\n  }\n  // allocate more.. trying to trigger an allocation from a corrupted entry\n  // this may need many allocations to get there (if at all)\n  for (int i = 0; i < 4096; i++) {\n    malloc(SZ);\n  }\n}\n\nstatic void test_aslr(void) {\n  void* p[256];\n  p[0] = malloc(378200);\n  p[1] = malloc(1134626);\n  printf(\"p1: %p, p2: %p\\n\", p[0], p[1]);\n}\n\nstatic void test_process_info(void) {\n  size_t elapsed = 0;\n  size_t user_msecs = 0;\n  size_t system_msecs = 0;\n  size_t current_rss = 0;\n  size_t peak_rss = 0;\n  size_t current_commit = 0;\n  size_t peak_commit = 0;\n  size_t page_faults = 0;\n  for (int i = 0; i < 100000; i++) {\n    void* p = calloc(100,10);\n    free(p);\n  }\n  mi_process_info(&elapsed, &user_msecs, &system_msecs, &current_rss, &peak_rss, &current_commit, &peak_commit, &page_faults);\n  printf(\"\\n\\n*** process info: elapsed %3zd.%03zd s, user: %3zd.%03zd s, rss: %zd b, commit: %zd b\\n\\n\", elapsed/1000, elapsed%1000, user_msecs/1000, user_msecs%1000, peak_rss, peak_commit);\n}\n\nstatic void test_reserved(void) {\n#define KiB 1024ULL\n#define MiB (KiB*KiB)\n#define GiB (MiB*KiB)\n  mi_reserve_os_memory(4*GiB, false, true);\n  void* p1 = malloc(100);\n  void* p2 = malloc(100000);\n  void* p3 = malloc(2*GiB);\n  void* p4 = malloc(1*GiB + 100000);\n  free(p1);\n  free(p2);\n  free(p3);\n  p3 = malloc(1*GiB);\n  free(p4);\n}\n\n\n\nstatic void negative_stat(void) {\n  int* p = mi_malloc(60000);\n  mi_stats_print_out(NULL, NULL);\n  *p = 100;\n  mi_free(p);\n  mi_stats_print_out(NULL, NULL);\n}\n\nstatic void alloc_huge(void) {\n  void* p = mi_malloc(67108872);\n  mi_free(p);\n}\n\nstatic bool test_visit(const mi_heap_t* heap, const mi_heap_area_t* area, void* block, size_t block_size, void* arg) {\n  if (block == NULL) {\n    printf(\"visiting an area with blocks of size %zu (including padding)\\n\", area->full_block_size);\n  }\n  else {\n    printf(\"  block of size %zu (allocated size is %zu)\\n\", block_size, mi_usable_size(block));\n  }\n  return true;\n}\n\nstatic void test_heap_walk(void) {\n  mi_heap_t* heap = mi_heap_new();\n  mi_heap_malloc(heap, 16*2097152);\n  mi_heap_malloc(heap, 2067152);\n  mi_heap_malloc(heap, 2097160);\n  mi_heap_malloc(heap, 24576);\n  mi_heap_visit_blocks(heap, true, &test_visit, NULL);\n}\n\nstatic void test_heap_arena(void) {\n  mi_arena_id_t arena_id;\n  int err = mi_reserve_os_memory_ex(100 * 1024 * 1024, false /* commit */, false /* allow large */, true /* exclusive */, &arena_id);\n  if (err) abort();\n  mi_heap_t* heap = mi_heap_new_in_arena(arena_id);\n  for (int i = 0; i < 500000; i++) {\n    void* p = mi_heap_malloc(heap, 1024);\n    if (p == NULL) {\n      printf(\"out of memory after %d kb (expecting about 100_000kb)\\n\", i);\n      break;\n    }\n  }\n}\n\nstatic void test_canary_leak(void) {\n  char* p = mi_mallocn_tp(char,23);\n  for(int i = 0; i < 23; i++) {\n    p[i] = '0'+i;\n  }\n  puts(p);\n  free(p);\n}\n\n#if _WIN32\nstatic void test_manage_os_memory(void) {\n  size_t size = 256 * 1024 * 1024;\n  void* ptr = VirtualAlloc(NULL, size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE); \n  mi_arena_id_t arena_id;\n  mi_manage_os_memory_ex(ptr, size, true /* committed */, true /* pinned */, false /* is zero */, -1 /* numa node */, true /* exclusive */, &arena_id);\n  mi_heap_t* cuda_heap = mi_heap_new_in_arena(arena_id);    // you can do this in any thread\n\n  // now allocate only in the cuda arena\n  void* p1 = mi_heap_malloc(cuda_heap, 8);\n  int* p2 = mi_heap_malloc_tp(cuda_heap, int);\n  *p2 = 42;\n  \n  // and maybe set the cuda heap as the default heap? (but careful as now `malloc` will allocate in the cuda heap as well)\n  {\n    mi_heap_t* prev_default_heap = mi_heap_set_default(cuda_heap);\n    void* p3 = mi_malloc(8);  // allocate in the cuda heap \n    mi_free(p3);\n  }\n  mi_free(p1);\n  mi_free(p2);\n}\n#else\nstatic void test_manage_os_memory(void) {\n  // empty\n}\n#endif\n\n// Experiment with huge OS pages\n#if 0\n\n#include <mimalloc/types.h>\n#include <mimalloc/internal.h>\n#include <unistd.h>\n#include <sys/mman.h>\n\nstatic void test_large_pages(void) {\n  mi_memid_t memid;\n\n  #if 0\n  size_t pages_reserved;\n  size_t page_size;\n  uint8_t* p = (uint8_t*)_mi_os_alloc_huge_os_pages(1, -1, 30000, &pages_reserved, &page_size, &memid);\n  const size_t req_size = pages_reserved * page_size;\n  #else\n  const size_t req_size = 64*MI_MiB;\n  uint8_t* p = (uint8_t*)_mi_os_alloc(req_size,&memid,NULL);\n  #endif\n\n  p[0] = 1;\n\n  //_mi_os_protect(p, _mi_os_page_size());\n  //_mi_os_unprotect(p, _mi_os_page_size());\n  //_mi_os_decommit(p, _mi_os_page_size(), NULL);\n  if (madvise(p, req_size, MADV_HUGEPAGE) == 0) {\n    printf(\"advised huge pages\\n\");\n    _mi_os_decommit(p, _mi_os_page_size(), NULL);\n  };\n  _mi_os_free(p, req_size, memid, NULL);\n}\n\n#endif\n\n// ----------------------------\n// bin size experiments\n// ------------------------------\n\n#if 0\n#include <stdint.h>\n#include <stdbool.h>\n\n#define MI_INTPTR_SIZE 8\n#define MI_LARGE_WSIZE_MAX (4*1024*1024 / MI_INTPTR_SIZE)\n\n#define MI_BIN_HUGE 100\n//#define MI_ALIGN2W\n\n// Bit scan reverse: return the index of the highest bit.\nstatic inline uint8_t mi_bsr32(uint32_t x);\n\n#if defined(_MSC_VER)\n//#include <Windows.h>\n#include <intrin.h>\nstatic inline uint8_t mi_bsr32(uint32_t x) {\n  uint32_t idx;\n  _BitScanReverse(&idx, x);\n  return idx;\n}\n#elif defined(__GNUC__) || defined(__clang__)\nstatic inline uint8_t mi_bsr32(uint32_t x) {\n  return (31 - __builtin_clz(x));\n}\n#else\nstatic inline uint8_t mi_bsr32(uint32_t x) {\n  // de Bruijn multiplication, see <http://supertech.csail.mit.edu/papers/debruijn.pdf>\n  static const uint8_t debruijn[32] = {\n     31,  0, 22,  1, 28, 23, 18,  2, 29, 26, 24, 10, 19,  7,  3, 12,\n     30, 21, 27, 17, 25,  9,  6, 11, 20, 16,  8,  5, 15,  4, 14, 13,\n  };\n  x |= x >> 1;\n  x |= x >> 2;\n  x |= x >> 4;\n  x |= x >> 8;\n  x |= x >> 16;\n  x++;\n  return debruijn[(x*0x076be629) >> 27];\n}\n#endif\n\n\n// Bit scan reverse: return the index of the highest bit.\nuint8_t _mi_bsr(uintptr_t x) {\n  if (x == 0) return 0;\n  #if MI_INTPTR_SIZE==8\n  uint32_t hi = (x >> 32);\n  return (hi == 0 ? mi_bsr32((uint32_t)x) : 32 + mi_bsr32(hi));\n  #elif MI_INTPTR_SIZE==4\n  return mi_bsr32(x);\n  #else\n  # error \"define bsr for non-32 or 64-bit platforms\"\n  #endif\n}\n\n\n\nstatic inline size_t _mi_wsize_from_size(size_t size) {\n  return (size + sizeof(uintptr_t) - 1) / sizeof(uintptr_t);\n}\n\n// #define MI_ALIGN2W\n\n// Return the bin for a given field size.\n// Returns MI_BIN_HUGE if the size is too large.\n// We use `wsize` for the size in \"machine word sizes\",\n// i.e. byte size == `wsize*sizeof(void*)`.\nstatic inline size_t mi_bin(size_t wsize) {\n  // size_t wsize = _mi_wsize_from_size(size);\n  // size_t bin;\n  /*if (wsize <= 1) {\n    bin = 1;\n  }\n  */\n#if defined(MI_ALIGN4W)\n  if (wsize <= 4) {\n    return (wsize <= 1 ? 1 : (wsize+1)&~1); // round to double word sizes\n  }\n#elif defined(MI_ALIGN2W)\n  if (wsize <= 8) {\n    return (wsize <= 1 ? 1 : (wsize+1)&~1); // round to double word sizes\n  }\n#else\n  if (wsize <= 8) {\n    return (wsize == 0 ? 1 : wsize);\n  }\n#endif\n  else if (wsize > MI_LARGE_WSIZE_MAX) {\n    return MI_BIN_HUGE;\n  }\n  else {\n#if defined(MI_ALIGN4W)\n    if (wsize <= 16) { wsize = (wsize+3)&~3; } // round to 4x word sizes\n#endif\n    wsize--;\n    // find the highest bit\n    const size_t b = _mi_bsr(wsize);  // note: wsize != 0\n    // and use the top 3 bits to determine the bin (~12.5% worst internal fragmentation).\n    // - adjust with 3 because we use do not round the first 8 sizes\n    //   which each get an exact bin\n    const size_t bin = ((b << 2) + ((wsize >> (b - 2)) & 0x03)) - 3;\n    assert(bin > 0 && bin < MI_BIN_HUGE);\n    return bin;\n  }\n}\n\n\nstatic inline uint8_t _mi_bin4(size_t size) {\n  size_t wsize = _mi_wsize_from_size(size);\n  uint8_t bin;\n  if (wsize <= 1) {\n    bin = 1;\n  }\n#if defined(MI_ALIGN4W)\n  else if (wsize <= 4) {\n    bin = (uint8_t)((wsize+1)&~1); // round to double word sizes\n  }\n#elif defined(MI_ALIGN2W)\n  else if (wsize <= 8) {\n    bin = (uint8_t)((wsize+1)&~1); // round to double word sizes\n  }\n#else\n  else if (wsize <= 8) {\n    bin = (uint8_t)wsize;\n  }\n#endif\n  else if (wsize > MI_LARGE_WSIZE_MAX) {\n    bin = MI_BIN_HUGE;\n  }\n  else {\n    uint8_t b = mi_bsr32((uint32_t)wsize);\n    bin = ((b << 1) + (uint8_t)((wsize >> (b - 1)) & 0x01)) + 3;\n  }\n  return bin;\n}\n\nstatic size_t _mi_binx4(size_t wsize) {\n  size_t bin;\n  if (wsize <= 1) {\n    bin = 1;\n  }\n  else if (wsize <= 8) {\n    // bin = (wsize+1)&~1; // round to double word sizes\n    bin = (uint8_t)wsize;\n  }\n  else {\n    uint8_t b = mi_bsr32((uint32_t)wsize);\n    if (b <= 1) return wsize;\n    bin = ((b << 1) | (wsize >> (b - 1))&0x01) + 3;\n  }\n  return bin;\n}\n\nstatic size_t _mi_binx8(size_t bsize) {\n  if (bsize<=1) return bsize;\n  uint8_t b = mi_bsr32((uint32_t)bsize);\n  if (b <= 2) return bsize;\n  size_t bin = ((b << 2) | (bsize >> (b - 2))&0x03) - 5;\n  return bin;\n}\n\n\nstatic inline size_t mi_binx(size_t wsize) {\n  uint8_t bin;\n  if (wsize <= 1) {\n    bin = 1;\n  }\n  else if (wsize <= 8) {\n    // bin = (wsize+1)&~1; // round to double word sizes\n    bin = (uint8_t)wsize;\n  }\n  else {\n    wsize--;\n    // find the highest bit\n    uint8_t b = (uint8_t)mi_bsr32((uint32_t)wsize);  // note: wsize != 0\n    // and use the top 3 bits to determine the bin (~12.5% worst internal fragmentation).\n    // - adjust with 3 because we use do not round the first 8 sizes\n    //   which each get an exact bin\n    bin = ((b << 2) + (uint8_t)((wsize >> (b - 2)) & 0x03)) - 3;\n  }\n  return bin;\n}\n\n\nstatic void mi_bins(void) {\n  //printf(\"  QNULL(1), /* 0 */ \\\\\\n  \");\n  size_t last_bin = 0;\n  for (size_t wsize = 1; wsize <= (4*1024*1024) / 8 + 1024; wsize++) {\n    size_t bin = mi_bin(wsize);\n    if (bin != last_bin) {\n      //printf(\"min bsize: %6zd, max bsize: %6zd, bin: %6zd\\n\", min_wsize, last_wsize, last_bin);\n      printf(\"QNULL(%6zd), \", wsize-1);\n      if (last_bin%8 == 0) printf(\"/* %zu */ \\\\\\n  \", last_bin);\n      last_bin = bin;\n    }\n  }\n}\n#endif\n"
  },
  {
    "path": "third-party/mimalloc/test/main-override.c",
    "content": "#include <stdlib.h>\n#include <stdio.h>\n#include <assert.h>\n#include <string.h>\n\n#include <mimalloc-override.h>\n\nint main() {\n  mi_version();       // ensure mimalloc library is linked\n  void* p1 = malloc(78);\n  void* p2 = malloc(24);\n  free(p1);\n  p1 = malloc(8);\n  //char* s = strdup(\"hello\\n\");\n  free(p2);\n  p2 = malloc(16);\n  p1 = realloc(p1, 32);\n  free(p1);\n  free(p2);\n  //free(s);\n  //mi_collect(true);\n\n  /* now test if override worked by allocating/freeing across the api's*/\n  //p1 = mi_malloc(32);\n  //free(p1);\n  //p2 = malloc(32);\n  //mi_free(p2);\n  p1 = malloc(24);\n  p2 = reallocarray(p1, 16, 16);\n  free(p2);\n  p1 = malloc(24);\n  assert(reallocarr(&p1, 16, 16) == 0);\n  free(p1);\n  mi_stats_print(NULL);\n  return 0;\n}\n"
  },
  {
    "path": "third-party/mimalloc/test/main-override.cpp",
    "content": "#include <stdlib.h>\n#include <stdio.h>\n#include <assert.h>\n#include <string.h>\n#include <stdint.h>\n\n#include <mimalloc.h>\n#include <new>\n#include <vector>\n#include <future>\n#include <iostream>\n#include <thread>\n#include <assert.h>\n\n#ifdef _WIN32\n#include <mimalloc-new-delete.h>\n#include <windows.h>\nstatic void msleep(unsigned long msecs) { Sleep(msecs); }\n#else\n#include <unistd.h>\nstatic void msleep(unsigned long msecs) { usleep(msecs * 1000UL); }\n#endif\n\nstatic void heap_thread_free_large(); // issue #221\nstatic void heap_no_delete();         // issue #202\nstatic void heap_late_free();         // issue #204\nstatic void padding_shrink();         // issue #209\nstatic void various_tests();\nstatic void test_mt_shutdown();\nstatic void large_alloc(void);        // issue #363\nstatic void fail_aslr();              // issue #372\nstatic void tsan_numa_test();         // issue #414\nstatic void strdup_test();            // issue #445\nstatic void bench_alloc_large(void);  // issue #xxx\n//static void test_large_migrate(void); // issue #691\nstatic void heap_thread_free_huge();\nstatic void test_std_string();        // issue #697\nstatic void test_thread_local();      // issue #944\n// static void test_mixed0();             // issue #942\nstatic void test_mixed1();             // issue #942\nstatic void test_stl_allocators();\n\n#if x_WIN32\n#include \"main-override-dep.h\"\nstatic void test_dep();               // issue #981: test overriding in another DLL\n#else\nstatic void test_dep() { };\n#endif\n\nint main() {\n  mi_stats_reset();  // ignore earlier allocations\n  various_tests();\n  test_mixed1();\n\n  test_dep();\n\n  //test_std_string();\n  //test_thread_local();\n  // heap_thread_free_huge();\n  /*\n   heap_thread_free_huge();\n   heap_thread_free_large();\n   heap_no_delete();\n   heap_late_free();\n   padding_shrink();\n   various_tests();\n   large_alloc();\n   tsan_numa_test();\n   strdup_test();\n  */\n  // test_stl_allocators();\n  // test_mt_shutdown();\n  // test_large_migrate();\n\n  //fail_aslr();\n  mi_stats_print(NULL);\n  return 0;\n}\n\nstatic void* p = malloc(8);\n\nvoid free_p() {\n  free(p);\n  return;\n}\n\nclass Test {\nprivate:\n  int i;\npublic:\n  Test(int x) { i = x; }\n  ~Test() { }\n};\n\n\nstatic void various_tests() {\n  atexit(free_p);\n  void* p1 = malloc(78);\n  void* p2 = mi_malloc_aligned(24, 16);\n  free(p1);\n  p1 = malloc(8);\n  char* s = mi_strdup(\"hello\\n\");\n\n  mi_free(p2);\n  p2 = malloc(16);\n  p1 = realloc(p1, 32);\n  free(p1);\n  free(p2);\n  mi_free(s);\n\n  Test* t = new Test(42);\n  delete t;\n  t = new (std::nothrow) Test(42);\n  delete t;\n  auto tbuf = new unsigned char[sizeof(Test)];\n  t = new (tbuf) Test(42);\n  t->~Test();\n  delete[] tbuf;\n\n  #if _WIN32\n  const char* ptr = ::_Getdays();  // test _base overrid\n  free((void*)ptr);\n  #endif\n}\n\nclass Static {\nprivate:\n  void* p;\npublic:\n  Static() {\n    p = malloc(64);\n    return;\n  }\n  ~Static() {\n    free(p);\n    return;\n  }\n};\n\nstatic Static s = Static();\n\n\nstatic bool test_stl_allocator1() {\n  std::vector<int, mi_stl_allocator<int> > vec;\n  vec.push_back(1);\n  vec.pop_back();\n  return vec.size() == 0;\n}\n\nstruct some_struct { int i; int j; double z; };\n\n\n#if x_WIN32\nstatic void test_dep()\n{\n  TestAllocInDll t;\n  std::string s = t.GetString();\n}\n#endif\n\n\nstatic bool test_stl_allocator2() {\n  std::vector<some_struct, mi_stl_allocator<some_struct> > vec;\n  vec.push_back(some_struct());\n  vec.pop_back();\n  return vec.size() == 0;\n}\n\n#if MI_HAS_HEAP_STL_ALLOCATOR\nstatic bool test_stl_allocator3() {\n  std::vector<int, mi_heap_stl_allocator<int> > vec;\n  vec.push_back(1);\n  vec.pop_back();\n  return vec.size() == 0;\n}\n\nstatic bool test_stl_allocator4() {\n  std::vector<some_struct, mi_heap_stl_allocator<some_struct> > vec;\n  vec.push_back(some_struct());\n  vec.pop_back();\n  return vec.size() == 0;\n}\n\nstatic bool test_stl_allocator5() {\n  std::vector<int, mi_heap_destroy_stl_allocator<int> > vec;\n  vec.push_back(1);\n  vec.pop_back();\n  return vec.size() == 0;\n}\n\nstatic bool test_stl_allocator6() {\n  std::vector<some_struct, mi_heap_destroy_stl_allocator<some_struct> > vec;\n  vec.push_back(some_struct());\n  vec.pop_back();\n  return vec.size() == 0;\n}\n#endif\n\nstatic void test_stl_allocators() {\n  test_stl_allocator1();\n  test_stl_allocator2();\n#if MI_HAS_HEAP_STL_ALLOCATOR\n  test_stl_allocator3();\n  test_stl_allocator4();\n  test_stl_allocator5();\n  test_stl_allocator6();\n#endif\n}\n\n#if 0\n#include <algorithm>\n#include <chrono>\n#include <functional>\n#include <iostream>\n#include <thread>\n#include <vector>\n\nstatic void test_mixed0() {\n    std::vector<std::unique_ptr<std::size_t>> numbers(1024 * 1024 * 100);\n    std::vector<std::thread> threads(1);\n\n    std::atomic<std::size_t> index{};\n\n    auto start = std::chrono::system_clock::now();\n\n    for (auto& thread : threads) {\n        thread = std::thread{[&index, &numbers]() {\n            while (true) {\n                auto i = index.fetch_add(1, std::memory_order_relaxed);\n                if (i >= numbers.size()) return;\n\n                numbers[i] = std::make_unique<std::size_t>(i);\n            }\n        }};\n    }\n\n    for (auto& thread : threads) thread.join();\n\n    auto end = std::chrono::system_clock::now();\n\n    auto duration =\n        std::chrono::duration_cast<std::chrono::milliseconds>(end - start);\n    std::cout << \"Running on \" << threads.size() << \" threads took \" << duration\n              << std::endl;\n}\n#endif\n\nvoid asd() {\n  void* p = malloc(128);\n  free(p);\n}\nstatic void test_mixed1() {\n    std::thread thread(asd);\n    thread.join();\n}\n\n#if 0\n// issue #691\nstatic char* cptr;\n\nstatic void* thread1_allocate()\n{\n  cptr = mi_calloc_tp(char,22085632);\n  return NULL;\n}\n\nstatic void* thread2_free()\n{\n  assert(cptr);\n  mi_free(cptr);\n  cptr = NULL;\n  return NULL;\n}\n\nstatic void test_large_migrate(void) {\n  auto t1 = std::thread(thread1_allocate);\n  t1.join();\n  auto t2 = std::thread(thread2_free);\n  t2.join();\n  /*\n  pthread_t thread1, thread2;\n\n  pthread_create(&thread1, NULL, &thread1_allocate, NULL);\n  pthread_join(thread1, NULL);\n\n  pthread_create(&thread2, NULL, &thread2_free, NULL);\n  pthread_join(thread2, NULL);\n  */\n  return;\n}\n#endif\n\n// issue 445\nstatic void strdup_test() {\n#ifdef _MSC_VER\n  char* s = _strdup(\"hello\\n\");\n  char* buf = NULL;\n  size_t len;\n  _dupenv_s(&buf, &len, \"MIMALLOC_VERBOSE\");\n  mi_free(buf);\n  mi_free(s);\n#endif\n}\n\n// Issue #202\nstatic void heap_no_delete_worker() {\n  mi_heap_t* heap = mi_heap_new();\n  void* q = mi_heap_malloc(heap, 1024); (void)(q);\n  // mi_heap_delete(heap); // uncomment to prevent assertion\n}\n\nstatic void heap_no_delete() {\n  auto t1 = std::thread(heap_no_delete_worker);\n  t1.join();\n}\n\n\n// Issue #697\nstatic void test_std_string() {\n  std::string path = \"/Users/xxxx/Library/Developer/Xcode/DerivedData/xxxxxxxxxx/Build/Intermediates.noindex/xxxxxxxxxxx/arm64/XX_lto.o/0.arm64.lto.o\";\n  std::string path1 = \"/Users/xxxx/Library/Developer/Xcode/DerivedData/xxxxxxxxxx/Build/Intermediates.noindex/xxxxxxxxxxx/arm64/XX_lto.o/1.arm64.lto.o\";\n  std::cout << path + \"\\n>>>            \" + path1 + \"\\n>>>            \" << std::endl;\n}\n\n// Issue #204\nstatic volatile void* global_p;\n\nstatic void t1main() {\n  mi_heap_t* heap = mi_heap_new();\n  global_p = mi_heap_malloc(heap, 1024);\n  mi_heap_delete(heap);\n}\n\nstatic void heap_late_free() {\n  auto t1 = std::thread(t1main);\n\n  msleep(2000);\n  assert(global_p);\n  mi_free((void*)global_p);\n\n  t1.join();\n}\n\n// issue  #209\nstatic void* shared_p;\nstatic void alloc0(/* void* arg */)\n{\n  shared_p = mi_malloc(8);\n}\n\nstatic void padding_shrink(void)\n{\n  auto t1 = std::thread(alloc0);\n  t1.join();\n  mi_free(shared_p);\n}\n\n\n// Issue #221\nstatic void heap_thread_free_large_worker() {\n  mi_free(shared_p);\n}\n\nstatic void heap_thread_free_large() {\n  for (int i = 0; i < 100; i++) {\n    shared_p = mi_malloc_aligned(2 * 1024 * 1024 + 1, 8);\n    auto t1 = std::thread(heap_thread_free_large_worker);\n    t1.join();\n  }\n}\n\nstatic void heap_thread_free_huge_worker() {\n  mi_free(shared_p);\n}\n\nstatic void heap_thread_free_huge() {\n  for (int i = 0; i < 100; i++) {\n    shared_p = mi_malloc(1024 * 1024 * 1024);\n    auto t1 = std::thread(heap_thread_free_huge_worker);\n    t1.join();\n  }\n}\n\nstatic void test_mt_shutdown()\n{\n  const int threads = 5;\n  std::vector< std::future< std::vector< char* > > > ts;\n\n  auto fn = [&]()\n  {\n    std::vector< char* > ps;\n    ps.reserve(1000);\n    for (int i = 0; i < 1000; i++)\n      ps.emplace_back(new char[1]);\n    return ps;\n  };\n\n  for (int i = 0; i < threads; i++)\n    ts.emplace_back(std::async(std::launch::async, fn));\n\n  for (auto& f : ts)\n    for (auto& p : f.get())\n      delete[] p;\n\n  std::cout << \"done\" << std::endl;\n}\n\n// issue #363\nusing namespace std;\n\nvoid large_alloc(void)\n{\n  char* a = new char[1ull << 25];\n  thread th([&] {\n    delete[] a;\n    });\n  th.join();\n}\n\n// issue #372\nstatic void fail_aslr() {\n  size_t sz = (size_t)(4ULL << 40); // 4TiB\n  void* p = malloc(sz);\n  printf(\"pointer p: %p: area up to %p\\n\", p, (uint8_t*)p + sz);\n  *(int*)0x5FFFFFFF000 = 0;  // should segfault\n}\n\n// issues #414\nstatic void dummy_worker() {\n  void* p = mi_malloc(0);\n  mi_free(p);\n}\n\nstatic void tsan_numa_test() {\n  auto t1 = std::thread(dummy_worker);\n  dummy_worker();\n  t1.join();\n}\n\n// issue #?\n#include <chrono>\n#include <random>\n#include <iostream>\n\nstatic void bench_alloc_large(void) {\n  static constexpr int kNumBuffers = 20;\n  static constexpr size_t kMinBufferSize = 5 * 1024 * 1024;\n  static constexpr size_t kMaxBufferSize = 25 * 1024 * 1024;\n  std::unique_ptr<char[]> buffers[kNumBuffers];\n\n  std::random_device rd;  (void)rd;\n  std::mt19937 gen(42); //rd());\n  std::uniform_int_distribution<> size_distribution(kMinBufferSize, kMaxBufferSize);\n  std::uniform_int_distribution<> buf_number_distribution(0, kNumBuffers - 1);\n\n  static constexpr int kNumIterations = 2000;\n  const auto start = std::chrono::steady_clock::now();\n  for (int i = 0; i < kNumIterations; ++i) {\n    int buffer_idx = buf_number_distribution(gen);\n    size_t new_size = size_distribution(gen);\n    buffers[buffer_idx] = std::make_unique<char[]>(new_size);\n  }\n  const auto end = std::chrono::steady_clock::now();\n  const auto num_ms = std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();\n  const auto us_per_allocation = std::chrono::duration_cast<std::chrono::microseconds>(end - start).count() / kNumIterations;\n  std::cout << kNumIterations << \" allocations Done in \" << num_ms << \"ms.\" << std::endl;\n  std::cout << \"Avg \" << us_per_allocation << \" us per allocation\" << std::endl;\n}\n\n\nclass MTest\n{\n    char *data;\npublic:\n    MTest() { data = (char*)malloc(1024); }\n    ~MTest() { free(data); };\n};\n\nthread_local MTest tlVariable;\n\nvoid threadFun( int i )\n{\n    printf( \"Thread %d\\n\", i );\n    std::this_thread::sleep_for( std::chrono::milliseconds(100) );\n}\n\nvoid test_thread_local()\n{\n    for( int i=1; i < 100; ++i )\n    {\n        std::thread t( threadFun, i );\n        t.join();\n        mi_stats_print(NULL);\n    }\n    return;\n}\n"
  },
  {
    "path": "third-party/mimalloc/test/main.c",
    "content": "#include <stdio.h>\n#include <assert.h>\n#include <mimalloc.h>\n\nvoid test_heap(void* p_out) {\n  mi_heap_t* heap = mi_heap_new();\n  void* p1 = mi_heap_malloc(heap,32);\n  void* p2 = mi_heap_malloc(heap,48);\n  mi_free(p_out);\n  mi_heap_destroy(heap);\n  //mi_heap_delete(heap); mi_free(p1); mi_free(p2);\n}\n\nvoid test_large() {\n  const size_t N = 1000;\n\n  for (size_t i = 0; i < N; ++i) {\n    size_t sz = 1ull << 21;\n    char* a = mi_mallocn_tp(char,sz);\n    for (size_t k = 0; k < sz; k++) { a[k] = 'x'; }\n    mi_free(a);\n  }\n}\n\nint main() {\n  void* p1 = mi_malloc(16);\n  void* p2 = mi_malloc(1000000);\n  mi_free(p1);\n  mi_free(p2);\n  p1 = mi_malloc(16);\n  p2 = mi_malloc(16);\n  mi_free(p1);\n  mi_free(p2);\n\n  test_heap(mi_malloc(32));\n\n  p1 = mi_malloc_aligned(64, 16);\n  p2 = mi_malloc_aligned(160,24);\n  mi_free(p2);\n  mi_free(p1);\n  //test_large();\n\n  mi_collect(true);\n  mi_stats_print(NULL);\n  return 0;\n}\n"
  },
  {
    "path": "third-party/mimalloc/test/readme.md",
    "content": "Testing allocators is difficult as bugs may only surface after particular\nallocation patterns. The main approach to testing _mimalloc_ is therefore\nto have extensive internal invariant checking (see `page_is_valid` in `page.c`\nfor example), which is enabled in debug mode with `-DMI_DEBUG_FULL=ON`.\nThe main testing strategy is then to run [`mimalloc-bench`][bench] using full\ninvariant checking to catch any potential problems over a wide range of intensive\nallocation benchmarks and programs.\n\nHowever, this does not test well for the entire API surface and this is tested\nwith `test-api.c` when using `make test` (from `out/debug` etc). (This is\nnot complete yet, please add to it.)\n\nThe `main.c` and `main-override.c` are there to test if building and overriding\nfrom a local install works and therefore these build a separate `test/CMakeLists.txt`.\n\n[bench]: https://github.com/daanx/mimalloc-bench\n"
  },
  {
    "path": "third-party/mimalloc/test/test-api-fill.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2020, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#include \"mimalloc.h\"\n#include \"mimalloc/types.h\"\n\n#include \"testhelper.h\"\n\n// ---------------------------------------------------------------------------\n// Helper functions\n// ---------------------------------------------------------------------------\nbool check_zero_init(uint8_t* p, size_t size);\n#if MI_DEBUG >= 2\nbool check_debug_fill_uninit(uint8_t* p, size_t size);\nbool check_debug_fill_freed(uint8_t* p, size_t size);\n#endif\n\n// ---------------------------------------------------------------------------\n// Main testing\n// ---------------------------------------------------------------------------\nint main(void) {\n  mi_option_disable(mi_option_verbose);\n\n  // ---------------------------------------------------\n  // Zeroing allocation\n  // ---------------------------------------------------\n  CHECK_BODY(\"zeroinit-zalloc-small\") {\n    size_t zalloc_size = MI_SMALL_SIZE_MAX / 2;\n    uint8_t* p = (uint8_t*)mi_zalloc(zalloc_size);\n    result = check_zero_init(p, zalloc_size);\n    mi_free(p);\n  };\n  CHECK_BODY(\"zeroinit-zalloc-large\") {\n    size_t zalloc_size = MI_SMALL_SIZE_MAX * 2;\n    uint8_t* p = (uint8_t*)mi_zalloc(zalloc_size);\n    result = check_zero_init(p, zalloc_size);\n    mi_free(p);\n  };\n  CHECK_BODY(\"zeroinit-zalloc_small\") {\n    size_t zalloc_size = MI_SMALL_SIZE_MAX / 2;\n    uint8_t* p = (uint8_t*)mi_zalloc_small(zalloc_size);\n    result = check_zero_init(p, zalloc_size);\n    mi_free(p);\n  };\n\n  CHECK_BODY(\"zeroinit-calloc-small\") {\n    size_t calloc_size = MI_SMALL_SIZE_MAX / 2;\n    uint8_t* p = (uint8_t*)mi_calloc(calloc_size, 1);\n    result = check_zero_init(p, calloc_size);\n    mi_free(p);\n  };\n  CHECK_BODY(\"zeroinit-calloc-large\") {\n    size_t calloc_size = MI_SMALL_SIZE_MAX * 2;\n    uint8_t* p = (uint8_t*)mi_calloc(calloc_size, 1);\n    result = check_zero_init(p, calloc_size);\n    mi_free(p);\n  };\n\n  CHECK_BODY(\"zeroinit-rezalloc-small\") {\n    size_t zalloc_size = MI_SMALL_SIZE_MAX / 2;\n    uint8_t* p = (uint8_t*)mi_zalloc(zalloc_size);\n    result = check_zero_init(p, zalloc_size);\n    zalloc_size *= 3;\n    p = (uint8_t*)mi_rezalloc(p, zalloc_size);\n    result &= check_zero_init(p, zalloc_size);\n    mi_free(p);\n  };\n  CHECK_BODY(\"zeroinit-rezalloc-large\") {\n    size_t zalloc_size = MI_SMALL_SIZE_MAX * 2;\n    uint8_t* p = (uint8_t*)mi_zalloc(zalloc_size);\n    result = check_zero_init(p, zalloc_size);\n    zalloc_size *= 3;\n    p = (uint8_t*)mi_rezalloc(p, zalloc_size);\n    result &= check_zero_init(p, zalloc_size);\n    mi_free(p);\n  };\n\n  CHECK_BODY(\"zeroinit-recalloc-small\") {\n    size_t calloc_size = MI_SMALL_SIZE_MAX / 2;\n    uint8_t* p = (uint8_t*)mi_calloc(calloc_size, 1);\n    result = check_zero_init(p, calloc_size);\n    calloc_size *= 3;\n    p = (uint8_t*)mi_recalloc(p, calloc_size, 1);\n    result &= check_zero_init(p, calloc_size);\n    mi_free(p);\n  };\n  CHECK_BODY(\"zeroinit-recalloc-large\") {\n    size_t calloc_size = MI_SMALL_SIZE_MAX * 2;\n    uint8_t* p = (uint8_t*)mi_calloc(calloc_size, 1);\n    result = check_zero_init(p, calloc_size);\n    calloc_size *= 3;\n    p = (uint8_t*)mi_recalloc(p, calloc_size, 1);\n    result &= check_zero_init(p, calloc_size);\n    mi_free(p);\n  };\n\n  // ---------------------------------------------------\n  // Zeroing in aligned API\n  // ---------------------------------------------------\n  CHECK_BODY(\"zeroinit-zalloc_aligned-small\") {\n    size_t zalloc_size = MI_SMALL_SIZE_MAX / 2;\n    uint8_t* p = (uint8_t*)mi_zalloc_aligned(zalloc_size, MI_MAX_ALIGN_SIZE * 2);\n    result = check_zero_init(p, zalloc_size);\n    mi_free(p);\n  };\n  CHECK_BODY(\"zeroinit-zalloc_aligned-large\") {\n    size_t zalloc_size = MI_SMALL_SIZE_MAX * 2;\n    uint8_t* p = (uint8_t*)mi_zalloc_aligned(zalloc_size, MI_MAX_ALIGN_SIZE * 2);\n    result = check_zero_init(p, zalloc_size);\n    mi_free(p);\n  };\n\n  CHECK_BODY(\"zeroinit-calloc_aligned-small\") {\n    size_t calloc_size = MI_SMALL_SIZE_MAX / 2;\n    uint8_t* p = (uint8_t*)mi_calloc_aligned(calloc_size, 1, MI_MAX_ALIGN_SIZE * 2);\n    result = check_zero_init(p, calloc_size);\n    mi_free(p);\n  };\n  CHECK_BODY(\"zeroinit-calloc_aligned-large\") {\n    size_t calloc_size = MI_SMALL_SIZE_MAX * 2;\n    uint8_t* p = (uint8_t*)mi_calloc_aligned(calloc_size, 1, MI_MAX_ALIGN_SIZE * 2);\n    result = check_zero_init(p, calloc_size);\n    mi_free(p);\n  };\n\n  CHECK_BODY(\"zeroinit-rezalloc_aligned-small\") {\n    size_t zalloc_size = MI_SMALL_SIZE_MAX / 2;\n    uint8_t* p = (uint8_t*)mi_zalloc_aligned(zalloc_size, MI_MAX_ALIGN_SIZE * 2);\n    result = check_zero_init(p, zalloc_size);\n    zalloc_size *= 3;\n    p = (uint8_t*)mi_rezalloc_aligned(p, zalloc_size, MI_MAX_ALIGN_SIZE * 2);\n    result &= check_zero_init(p, zalloc_size);\n    mi_free(p);\n  };\n  CHECK_BODY(\"zeroinit-rezalloc_aligned-large\") {\n    size_t zalloc_size = MI_SMALL_SIZE_MAX * 2;\n    uint8_t* p = (uint8_t*)mi_zalloc_aligned(zalloc_size, MI_MAX_ALIGN_SIZE * 2);\n    result = check_zero_init(p, zalloc_size);\n    zalloc_size *= 3;\n    p = (uint8_t*)mi_rezalloc_aligned(p, zalloc_size, MI_MAX_ALIGN_SIZE * 2);\n    result &= check_zero_init(p, zalloc_size);\n    mi_free(p);\n  };\n\n  CHECK_BODY(\"zeroinit-recalloc_aligned-small\") {\n    size_t calloc_size = MI_SMALL_SIZE_MAX / 2;\n    uint8_t* p = (uint8_t*)mi_calloc_aligned(calloc_size, 1, MI_MAX_ALIGN_SIZE * 2);\n    result = check_zero_init(p, calloc_size);\n    calloc_size *= 3;\n    p = (uint8_t*)mi_recalloc_aligned(p, calloc_size, 1, MI_MAX_ALIGN_SIZE * 2);\n    result &= check_zero_init(p, calloc_size);\n    mi_free(p);\n  };\n  CHECK_BODY(\"zeroinit-recalloc_aligned-large\") {\n    size_t calloc_size = MI_SMALL_SIZE_MAX * 2;\n    uint8_t* p = (uint8_t*)mi_calloc_aligned(calloc_size, 1, MI_MAX_ALIGN_SIZE * 2);\n    result = check_zero_init(p, calloc_size);\n    calloc_size *= 3;\n    p = (uint8_t*)mi_recalloc_aligned(p, calloc_size, 1, MI_MAX_ALIGN_SIZE * 2);\n    result &= check_zero_init(p, calloc_size);\n    mi_free(p);\n  };\n\n#if (MI_DEBUG >= 2) && !MI_TSAN\n  // ---------------------------------------------------\n  // Debug filling\n  // ---------------------------------------------------\n  CHECK_BODY(\"uninit-malloc-small\") {\n    size_t malloc_size = MI_SMALL_SIZE_MAX / 2;\n    uint8_t* p = (uint8_t*)mi_malloc(malloc_size);\n    result = check_debug_fill_uninit(p, malloc_size);\n    mi_free(p);\n  };\n  CHECK_BODY(\"uninit-malloc-large\") {\n    size_t malloc_size = MI_SMALL_SIZE_MAX * 2;\n    uint8_t* p = (uint8_t*)mi_malloc(malloc_size);\n    result = check_debug_fill_uninit(p, malloc_size);\n    mi_free(p);\n  };\n\n  CHECK_BODY(\"uninit-malloc_small\") {\n    size_t malloc_size = MI_SMALL_SIZE_MAX / 2;\n    uint8_t* p = (uint8_t*)mi_malloc_small(malloc_size);\n    result = check_debug_fill_uninit(p, malloc_size);\n    mi_free(p);\n  };\n\n  CHECK_BODY(\"uninit-realloc-small\") {\n    size_t malloc_size = MI_SMALL_SIZE_MAX / 2;\n    uint8_t* p = (uint8_t*)mi_malloc(malloc_size);\n    result = check_debug_fill_uninit(p, malloc_size);\n    malloc_size *= 3;\n    p = (uint8_t*)mi_realloc(p, malloc_size);\n    result &= check_debug_fill_uninit(p, malloc_size);\n    mi_free(p);\n  };\n  CHECK_BODY(\"uninit-realloc-large\") {\n    size_t malloc_size = MI_SMALL_SIZE_MAX * 2;\n    uint8_t* p = (uint8_t*)mi_malloc(malloc_size);\n    result = check_debug_fill_uninit(p, malloc_size);\n    malloc_size *= 3;\n    p = (uint8_t*)mi_realloc(p, malloc_size);\n    result &= check_debug_fill_uninit(p, malloc_size);\n    mi_free(p);\n  };\n\n  CHECK_BODY(\"uninit-mallocn-small\") {\n    size_t malloc_size = MI_SMALL_SIZE_MAX / 2;\n    uint8_t* p = (uint8_t*)mi_mallocn(malloc_size, 1);\n    result = check_debug_fill_uninit(p, malloc_size);\n    mi_free(p);\n  };\n  CHECK_BODY(\"uninit-mallocn-large\") {\n    size_t malloc_size = MI_SMALL_SIZE_MAX * 2;\n    uint8_t* p = (uint8_t*)mi_mallocn(malloc_size, 1);\n    result = check_debug_fill_uninit(p, malloc_size);\n    mi_free(p);\n  };\n\n  CHECK_BODY(\"uninit-reallocn-small\") {\n    size_t malloc_size = MI_SMALL_SIZE_MAX / 2;\n    uint8_t* p = (uint8_t*)mi_mallocn(malloc_size, 1);\n    result = check_debug_fill_uninit(p, malloc_size);\n    malloc_size *= 3;\n    p = (uint8_t*)mi_reallocn(p, malloc_size, 1);\n    result &= check_debug_fill_uninit(p, malloc_size);\n    mi_free(p);\n  };\n  CHECK_BODY(\"uninit-reallocn-large\") {\n    size_t malloc_size = MI_SMALL_SIZE_MAX * 2;\n    uint8_t* p = (uint8_t*)mi_mallocn(malloc_size, 1);\n    result = check_debug_fill_uninit(p, malloc_size);\n    malloc_size *= 3;\n    p = (uint8_t*)mi_reallocn(p, malloc_size, 1);\n    result &= check_debug_fill_uninit(p, malloc_size);\n    mi_free(p);\n  };\n\n  CHECK_BODY(\"uninit-malloc_aligned-small\") {\n    size_t malloc_size = MI_SMALL_SIZE_MAX / 2;\n    uint8_t* p = (uint8_t*)mi_malloc_aligned(malloc_size, MI_MAX_ALIGN_SIZE * 2);\n    result = check_debug_fill_uninit(p, malloc_size);\n    mi_free(p);\n  };\n  CHECK_BODY(\"uninit-malloc_aligned-large\") {\n    size_t malloc_size = MI_SMALL_SIZE_MAX * 2;\n    uint8_t* p = (uint8_t*)mi_malloc_aligned(malloc_size, MI_MAX_ALIGN_SIZE * 2);\n    result = check_debug_fill_uninit(p, malloc_size);\n    mi_free(p);\n  };\n\n  CHECK_BODY(\"uninit-realloc_aligned-small\") {\n    size_t malloc_size = MI_SMALL_SIZE_MAX / 2;\n    uint8_t* p = (uint8_t*)mi_malloc_aligned(malloc_size, MI_MAX_ALIGN_SIZE * 2);\n    result = check_debug_fill_uninit(p, malloc_size);\n    malloc_size *= 3;\n    p = (uint8_t*)mi_realloc_aligned(p, malloc_size, MI_MAX_ALIGN_SIZE * 2);\n    result &= check_debug_fill_uninit(p, malloc_size);\n    mi_free(p);\n  };\n  CHECK_BODY(\"uninit-realloc_aligned-large\") {\n    size_t malloc_size = MI_SMALL_SIZE_MAX * 2;\n    uint8_t* p = (uint8_t*)mi_malloc_aligned(malloc_size, MI_MAX_ALIGN_SIZE * 2);\n    result = check_debug_fill_uninit(p, malloc_size);\n    malloc_size *= 3;\n    p = (uint8_t*)mi_realloc_aligned(p, malloc_size, MI_MAX_ALIGN_SIZE * 2);\n    result &= check_debug_fill_uninit(p, malloc_size);\n    mi_free(p);\n  };\n\n  #if !(MI_TRACK_VALGRIND || MI_TRACK_ASAN || MI_GUARDED)\n  CHECK_BODY(\"fill-freed-small\") {\n    size_t malloc_size = MI_SMALL_SIZE_MAX / 2;\n    uint8_t* p = (uint8_t*)mi_malloc(malloc_size);\n    mi_free(p);\n    // First sizeof(void*) bytes will contain housekeeping data, skip these\n    result = check_debug_fill_freed(p + sizeof(void*), malloc_size - sizeof(void*));\n  };\n  CHECK_BODY(\"fill-freed-large\") {\n    size_t malloc_size = MI_SMALL_SIZE_MAX * 2;\n    uint8_t* p = (uint8_t*)mi_malloc(malloc_size);\n    mi_free(p);\n    // First sizeof(void*) bytes will contain housekeeping data, skip these\n    result = check_debug_fill_freed(p + sizeof(void*), malloc_size - sizeof(void*));\n  };\n  #endif\n#endif\n\n  // ---------------------------------------------------\n  // Done\n  // ---------------------------------------------------[]\n  return print_test_summary();\n}\n\n// ---------------------------------------------------------------------------\n// Helper functions\n// ---------------------------------------------------------------------------\nbool check_zero_init(uint8_t* p, size_t size) {\n  if(!p)\n    return false;\n  bool result = true;\n  for (size_t i = 0; i < size; ++i) {\n    result &= p[i] == 0;\n  }\n  return result;\n}\n\n#if MI_DEBUG >= 2\nbool check_debug_fill_uninit(uint8_t* p, size_t size) {\n#if MI_TRACK_VALGRIND || MI_TRACK_ASAN\n  (void)p; (void)size;\n  return true; // when compiled with valgrind we don't init on purpose\n#else\n  if(!p)\n    return false;\n\n  bool result = true;\n  for (size_t i = 0; i < size; ++i) {\n    result &= p[i] == MI_DEBUG_UNINIT;\n  }\n  return result;\n#endif\n}\n\nbool check_debug_fill_freed(uint8_t* p, size_t size) {\n#if MI_TRACK_VALGRIND\n  (void)p; (void)size;\n  return true; // when compiled with valgrind we don't fill on purpose\n#else\n  if(!p)\n    return false;\n\n  bool result = true;\n  for (size_t i = 0; i < size; ++i) {\n    result &= p[i] == MI_DEBUG_FREED;\n  }\n  return result;\n#endif\n}\n#endif\n"
  },
  {
    "path": "third-party/mimalloc/test/test-api.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2020, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#if defined(__GNUC__) && !defined(__clang__)\n#pragma GCC diagnostic ignored \"-Walloc-size-larger-than=\"\n#endif\n\n/*\nTesting allocators is difficult as bugs may only surface after particular\nallocation patterns. The main approach to testing _mimalloc_ is therefore\nto have extensive internal invariant checking (see `page_is_valid` in `page.c`\nfor example), which is enabled in debug mode with `-DMI_DEBUG_FULL=ON`.\nThe main testing is then to run `mimalloc-bench` [1] using full invariant checking\nto catch any potential problems over a wide range of intensive allocation bench\nmarks.\n\nHowever, this does not test well for the entire API surface. In this test file\nwe therefore test the API over various inputs. Please add more tests :-)\n\n[1] https://github.com/daanx/mimalloc-bench\n*/\n\n#include <assert.h>\n#include <stdbool.h>\n#include <stdint.h>\n#include <errno.h>\n\n#ifdef __cplusplus\n#include <vector>\n#endif\n\n#include \"mimalloc.h\"\n// #include \"mimalloc/internal.h\"\n#include \"mimalloc/types.h\" // for MI_DEBUG and MI_BLOCK_ALIGNMENT_MAX\n\n#include \"testhelper.h\"\n\n// ---------------------------------------------------------------------------\n// Test functions\n// ---------------------------------------------------------------------------\nbool test_heap1(void);\nbool test_heap2(void);\nbool test_stl_allocator1(void);\nbool test_stl_allocator2(void);\n\nbool test_stl_heap_allocator1(void);\nbool test_stl_heap_allocator2(void);\nbool test_stl_heap_allocator3(void);\nbool test_stl_heap_allocator4(void);\n\nbool mem_is_zero(uint8_t* p, size_t size) {\n  if (p==NULL) return false;\n  for (size_t i = 0; i < size; ++i) {\n    if (p[i] != 0) return false;\n  }\n  return true;\n}\n\n// ---------------------------------------------------------------------------\n// Main testing\n// ---------------------------------------------------------------------------\nint main(void) {\n  mi_option_disable(mi_option_verbose);\n\n  CHECK_BODY(\"malloc-aligned9a\") { // test large alignments\n    void* p = mi_zalloc_aligned(1024 * 1024, 2);\n    mi_free(p);\n    p = mi_zalloc_aligned(1024 * 1024, 2);\n    mi_free(p);\n    result = true;\n  };\n  \n\n  // ---------------------------------------------------\n  // Malloc\n  // ---------------------------------------------------\n\n  CHECK_BODY(\"malloc-zero\") {\n    void* p = mi_malloc(0);\n    result = (p != NULL);\n    mi_free(p);\n  };\n  CHECK_BODY(\"malloc-nomem1\") {\n    result = (mi_malloc((size_t)PTRDIFF_MAX + (size_t)1) == NULL);\n  };\n  CHECK_BODY(\"malloc-null\") {\n    mi_free(NULL);\n  };\n  CHECK_BODY(\"calloc-overflow\") {\n    // use (size_t)&mi_calloc to get some number without triggering compiler warnings\n    result = (mi_calloc((size_t)&mi_calloc,SIZE_MAX/1000) == NULL);\n  };\n  CHECK_BODY(\"calloc0\") {\n    void* p = mi_calloc(0,1000);\n    result = (mi_usable_size(p) <= 16);\n    mi_free(p);\n  };\n  CHECK_BODY(\"malloc-large\") {   // see PR #544.\n    void* p = mi_malloc(67108872);\n    mi_free(p);\n  };\n\n  // ---------------------------------------------------\n  // Extended\n  // ---------------------------------------------------\n  CHECK_BODY(\"posix_memalign1\") {\n    void* p = &p;\n    int err = mi_posix_memalign(&p, sizeof(void*), 32);\n    result = ((err==0 && (uintptr_t)p % sizeof(void*) == 0) || p==&p);\n    mi_free(p);\n  };\n  CHECK_BODY(\"posix_memalign_no_align\") {\n    void* p = &p;\n    int err = mi_posix_memalign(&p, 3, 32);\n    result = (err==EINVAL && p==&p);\n  };\n  CHECK_BODY(\"posix_memalign_zero\") {\n    void* p = &p;\n    int err = mi_posix_memalign(&p, sizeof(void*), 0);\n    mi_free(p);\n    result = (err==0);\n  };\n  CHECK_BODY(\"posix_memalign_nopow2\") {\n    void* p = &p;\n    int err = mi_posix_memalign(&p, 3*sizeof(void*), 32);\n    result = (err==EINVAL && p==&p);\n  };\n  CHECK_BODY(\"posix_memalign_nomem\") {\n    void* p = &p;\n    int err = mi_posix_memalign(&p, sizeof(void*), SIZE_MAX);\n    result = (err==ENOMEM && p==&p);\n  };\n\n  // ---------------------------------------------------\n  // Aligned API\n  // ---------------------------------------------------\n  CHECK_BODY(\"malloc-aligned1\") {\n    void* p = mi_malloc_aligned(32,32); result = (p != NULL && (uintptr_t)(p) % 32 == 0); mi_free(p);\n  };\n  CHECK_BODY(\"malloc-aligned2\") {\n    void* p = mi_malloc_aligned(48,32); result = (p != NULL && (uintptr_t)(p) % 32 == 0); mi_free(p);\n  };\n  CHECK_BODY(\"malloc-aligned3\") {\n    void* p1 = mi_malloc_aligned(48,32); bool result1 = (p1 != NULL && (uintptr_t)(p1) % 32 == 0);\n    void* p2 = mi_malloc_aligned(48,32); bool result2 = (p2 != NULL && (uintptr_t)(p2) % 32 == 0);\n    mi_free(p2);\n    mi_free(p1);\n    result = (result1&&result2);\n  };\n  CHECK_BODY(\"malloc-aligned4\") {\n    void* p;\n    bool ok = true;\n    for (int i = 0; i < 8 && ok; i++) {\n      p = mi_malloc_aligned(8, 16);\n      ok = (p != NULL && (uintptr_t)(p) % 16 == 0); mi_free(p);\n    }\n    result = ok;\n  };\n  CHECK_BODY(\"malloc-aligned5\") {\n    void* p = mi_malloc_aligned(4097,4096);\n    size_t usable = mi_usable_size(p);\n    result = (usable >= 4097 && usable < 16000);\n    printf(\"malloc_aligned5: usable size: %zi\\n\", usable);\n    mi_free(p);\n  };\n  /*\n  CHECK_BODY(\"malloc-aligned6\") {\n    bool ok = true;\n    for (size_t align = 1; align <= MI_BLOCK_ALIGNMENT_MAX && ok; align *= 2) {\n      void* ps[8];\n      for (int i = 0; i < 8 && ok; i++) {\n        ps[i] = mi_malloc_aligned(align*13  // size\n                                 , align);\n        if (ps[i] == NULL || (uintptr_t)(ps[i]) % align != 0) {\n          ok = false;\n        }\n      }\n      for (int i = 0; i < 8 && ok; i++) {\n        mi_free(ps[i]);\n      }\n    }\n    result = ok;\n  };\n  */\n  CHECK_BODY(\"malloc-aligned7\") {\n    void* p = mi_malloc_aligned(1024,MI_BLOCK_ALIGNMENT_MAX);\n    mi_free(p);\n    result = ((uintptr_t)p % MI_BLOCK_ALIGNMENT_MAX) == 0;\n  };\n  CHECK_BODY(\"malloc-aligned8\") {\n    bool ok = true;\n    for (int i = 0; i < 5 && ok; i++) {\n      int n = (1 << i);\n      void* p = mi_malloc_aligned(1024, n * MI_BLOCK_ALIGNMENT_MAX);\n      ok = ((uintptr_t)p % (n*MI_BLOCK_ALIGNMENT_MAX)) == 0;\n      mi_free(p);\n    }\n    result = ok;\n  };\n  CHECK_BODY(\"malloc-aligned9\") { // test large alignments\n    bool ok = true;\n    void* p[8];\n    size_t sizes[8] = { 8, 512, 1024 * 1024, MI_BLOCK_ALIGNMENT_MAX, MI_BLOCK_ALIGNMENT_MAX + 1, 2 * MI_BLOCK_ALIGNMENT_MAX, 8 * MI_BLOCK_ALIGNMENT_MAX, 0 };\n    for (int i = 0; i < 28 && ok; i++) {\n      int align = (1 << i);\n      for (int j = 0; j < 8 && ok; j++) {\n        p[j] = mi_zalloc_aligned(sizes[j], align);\n        ok = ((uintptr_t)p[j] % align) == 0;\n      }\n      for (int j = 0; j < 8; j++) {\n        mi_free(p[j]);\n      }\n    }\n    result = ok;\n  };\n  CHECK_BODY(\"malloc-aligned10\") {\n    bool ok = true;\n    void* p[10+1];\n    int align;\n    int j;\n    for(j = 0, align = 1; j <= 10 && ok; align *= 2, j++ ) {\n      p[j] = mi_malloc_aligned(43 + align, align);\n      ok = ((uintptr_t)p[j] % align) == 0;\n    }\n    for ( ; j > 0; j--) {\n      mi_free(p[j-1]);\n    }\n    result = ok;\n  }\n  CHECK_BODY(\"malloc_aligned11\") {\n    mi_heap_t* heap = mi_heap_new();\n    void* p = mi_heap_malloc_aligned(heap, 33554426, 8);\n    result = mi_heap_contains_block(heap, p);\n    mi_heap_destroy(heap);\n  }\n  CHECK_BODY(\"mimalloc-aligned12\") {\n    void* p = mi_malloc_aligned(0x100, 0x100);\n    result = (((uintptr_t)p % 0x100) == 0); // #602\n    mi_free(p);\n  }\n  CHECK_BODY(\"mimalloc-aligned13\") {\n    bool ok = true;\n    for( size_t size = 1; size <= (MI_SMALL_SIZE_MAX * 2) && ok; size++ ) {\n      for(size_t align = 1; align <= size && ok; align *= 2 ) {\n        void* p[10];\n        for(int i = 0; i < 10 && ok; i++) {\n          p[i] = mi_malloc_aligned(size,align);;\n          ok = (p[i] != NULL && ((uintptr_t)(p[i]) % align) == 0);\n        }\n        for(int i = 0; i < 10 && ok; i++) {\n          mi_free(p[i]);\n        }       \n        /*\n        if (ok && align <= size && ((size + MI_PADDING_SIZE) & (align-1)) == 0) {\n          size_t bsize = mi_good_size(size);\n          ok = (align <= bsize && (bsize & (align-1)) == 0);\n        }\n        */\n      }\n    }\n    result = ok;\n  }\n  CHECK_BODY(\"malloc-aligned-at1\") {\n    void* p = mi_malloc_aligned_at(48,32,0); result = (p != NULL && ((uintptr_t)(p) + 0) % 32 == 0); mi_free(p);\n  };\n  CHECK_BODY(\"malloc-aligned-at2\") {\n    void* p = mi_malloc_aligned_at(50,32,8); result = (p != NULL && ((uintptr_t)(p) + 8) % 32 == 0); mi_free(p);\n  };\n  CHECK_BODY(\"memalign1\") {\n    void* p;\n    bool ok = true;\n    for (int i = 0; i < 8 && ok; i++) {\n      p = mi_memalign(16,8);\n      ok = (p != NULL && (uintptr_t)(p) % 16 == 0); mi_free(p);\n    }\n    result = ok;\n  };\n  CHECK_BODY(\"zalloc-aligned-small1\") {\n    size_t zalloc_size = MI_SMALL_SIZE_MAX / 2;\n    uint8_t* p = (uint8_t*)mi_zalloc_aligned(zalloc_size, MI_MAX_ALIGN_SIZE * 2);\n    result = mem_is_zero(p, zalloc_size);\n    mi_free(p);\n  };\n  CHECK_BODY(\"rezalloc_aligned-small1\") {\n    size_t zalloc_size = MI_SMALL_SIZE_MAX / 2;\n    uint8_t* p = (uint8_t*)mi_zalloc_aligned(zalloc_size, MI_MAX_ALIGN_SIZE * 2);\n    result = mem_is_zero(p, zalloc_size);\n    zalloc_size *= 3;\n    p = (uint8_t*)mi_rezalloc_aligned(p, zalloc_size, MI_MAX_ALIGN_SIZE * 2);\n    result = result && mem_is_zero(p, zalloc_size);\n    mi_free(p);\n  };\n\n  // ---------------------------------------------------\n  // Reallocation\n  // ---------------------------------------------------\n  CHECK_BODY(\"realloc-null\") {\n    void* p = mi_realloc(NULL,4);\n    result = (p != NULL);\n    mi_free(p);\n  };\n\n  CHECK_BODY(\"realloc-null-sizezero\") {\n    void* p = mi_realloc(NULL,0);  // <https://en.cppreference.com/w/c/memory/realloc> \"If ptr is NULL, the behavior is the same as calling malloc(new_size).\"\n    result = (p != NULL);\n    mi_free(p);\n  };\n\n  CHECK_BODY(\"realloc-sizezero\") {\n    void* p = mi_malloc(4);\n    void* q = mi_realloc(p, 0);\n    result = (q != NULL);\n    mi_free(q);\n  };\n\n  CHECK_BODY(\"reallocarray-null-sizezero\") {\n    void* p = mi_reallocarray(NULL,0,16);  // issue #574\n    result = (p != NULL && errno == 0);\n    mi_free(p);\n  };\n\n  // ---------------------------------------------------\n  // Heaps\n  // ---------------------------------------------------\n  CHECK(\"heap_destroy\", test_heap1());\n  CHECK(\"heap_delete\", test_heap2());\n\n  //mi_stats_print(NULL);\n\n  // ---------------------------------------------------\n  // various\n  // ---------------------------------------------------\n  #if !defined(MI_TRACK_ASAN)   // realpath may leak with ASAN enabled (as the ASAN allocator intercepts it)\n  CHECK_BODY(\"realpath\") {\n    char* s = mi_realpath( \".\", NULL );\n    // printf(\"realpath: %s\\n\",s);\n    mi_free(s);\n  };\n  #endif\n\n  CHECK(\"stl_allocator1\", test_stl_allocator1());\n  CHECK(\"stl_allocator2\", test_stl_allocator2());\n\n\tCHECK(\"stl_heap_allocator1\", test_stl_heap_allocator1());\n\tCHECK(\"stl_heap_allocator2\", test_stl_heap_allocator2());\n\tCHECK(\"stl_heap_allocator3\", test_stl_heap_allocator3());\n\tCHECK(\"stl_heap_allocator4\", test_stl_heap_allocator4());\n\n  // ---------------------------------------------------\n  // Done\n  // ---------------------------------------------------[]\n  return print_test_summary();\n}\n\n// ---------------------------------------------------\n// Larger test functions\n// ---------------------------------------------------\n\nbool test_heap1(void) {\n  mi_heap_t* heap = mi_heap_new();\n  int* p1 = mi_heap_malloc_tp(heap,int);\n  int* p2 = mi_heap_malloc_tp(heap,int);\n  *p1 = *p2 = 43;\n  mi_heap_destroy(heap);\n  return true;\n}\n\nbool test_heap2(void) {\n  mi_heap_t* heap = mi_heap_new();\n  int* p1 = mi_heap_malloc_tp(heap,int);\n  int* p2 = mi_heap_malloc_tp(heap,int);\n  mi_heap_delete(heap);\n  *p1 = 42;\n  mi_free(p1);\n  mi_free(p2);\n  return true;\n}\n\nbool test_stl_allocator1(void) {\n#ifdef __cplusplus\n  std::vector<int, mi_stl_allocator<int> > vec;\n  vec.push_back(1);\n  vec.pop_back();\n  return vec.size() == 0;\n#else\n  return true;\n#endif\n}\n\nstruct some_struct  { int i; int j; double z; };\n\nbool test_stl_allocator2(void) {\n#ifdef __cplusplus\n  std::vector<some_struct, mi_stl_allocator<some_struct> > vec;\n  vec.push_back(some_struct());\n  vec.pop_back();\n  return vec.size() == 0;\n#else\n  return true;\n#endif\n}\n\nbool test_stl_heap_allocator1(void) {\n#ifdef __cplusplus\n  std::vector<some_struct, mi_heap_stl_allocator<some_struct> > vec;\n  vec.push_back(some_struct());\n  vec.pop_back();\n  return vec.size() == 0;\n#else\n  return true;\n#endif\n}\n\nbool test_stl_heap_allocator2(void) {\n#ifdef __cplusplus\n  std::vector<some_struct, mi_heap_destroy_stl_allocator<some_struct> > vec;\n  vec.push_back(some_struct());\n  vec.pop_back();\n  return vec.size() == 0;\n#else\n  return true;\n#endif\n}\n\nbool test_stl_heap_allocator3(void) {\n#ifdef __cplusplus\n\tmi_heap_t* heap = mi_heap_new();\n\tbool good = false;\n\t{\n\t\tmi_heap_stl_allocator<some_struct> myAlloc(heap);\n\t\tstd::vector<some_struct, mi_heap_stl_allocator<some_struct> > vec(myAlloc);\n\t\tvec.push_back(some_struct());\n\t\tvec.pop_back();\n\t\tgood = vec.size() == 0;\n\t}\n\tmi_heap_delete(heap);\n  return good;\n#else\n  return true;\n#endif\n}\n\nbool test_stl_heap_allocator4(void) {\n#ifdef __cplusplus\n\tmi_heap_t* heap = mi_heap_new();\n\tbool good = false;\n\t{\n\t\tmi_heap_destroy_stl_allocator<some_struct> myAlloc(heap);\n\t\tstd::vector<some_struct, mi_heap_destroy_stl_allocator<some_struct> > vec(myAlloc);\n\t\tvec.push_back(some_struct());\n\t\tvec.pop_back();\n\t\tgood = vec.size() == 0;\n\t}\n\tmi_heap_destroy(heap);\n  return good;\n#else\n  return true;\n#endif\n}\n"
  },
  {
    "path": "third-party/mimalloc/test/test-stress.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2020 Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license.\n-----------------------------------------------------------------------------*/\n\n/* This is a stress test for the allocator, using multiple threads and\n   transferring objects between threads. It tries to reflect real-world workloads:\n   - allocation size is distributed linearly in powers of two\n   - with some fraction extra large (and some very large)\n   - the allocations are initialized and read again at free\n   - pointers transfer between threads\n   - threads are terminated and recreated with some objects surviving in between\n   - uses deterministic \"randomness\", but execution can still depend on\n     (random) thread scheduling. Do not use this test as a benchmark!\n*/\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <stdbool.h>\n#include <string.h>\n#include <assert.h>\n\n// #define MI_GUARDED\n// #define USE_STD_MALLOC\n\n// > mimalloc-test-stress [THREADS] [SCALE] [ITER]\n//\n// argument defaults\n#if defined(MI_TSAN)          // with thread-sanitizer reduce the threads to test within the azure pipeline limits\nstatic int THREADS = 8;\nstatic int SCALE   = 25;\nstatic int ITER    = 400;\n#elif defined(MI_UBSAN)       // with undefined behavious sanitizer reduce parameters to stay within the azure pipeline limits\nstatic int THREADS = 8;\nstatic int SCALE   = 25;\nstatic int ITER    = 20;\n#elif defined(MI_GUARDED)     // with debug guard pages reduce parameters to stay within the azure pipeline limits\nstatic int THREADS = 8;\nstatic int SCALE   = 10;\nstatic int ITER    = 10;\n#else\nstatic int THREADS = 32;      // more repeatable if THREADS <= #processors\nstatic int SCALE   = 50;      // scaling factor\nstatic int ITER    = 50;      // N full iterations destructing and re-creating all threads\n#endif\n\n\n\n#define STRESS                // undefine for leak test\n\nstatic bool   allow_large_objects = false;     // allow very large objects? (set to `true` if SCALE>100)\nstatic size_t use_one_size = 0;               // use single object size of `N * sizeof(uintptr_t)`?\n\nstatic bool   main_participates = false;       // main thread participates as a worker too\n\n#ifdef USE_STD_MALLOC\n#define custom_calloc(n,s)    calloc(n,s)\n#define custom_realloc(p,s)   realloc(p,s)\n#define custom_free(p)        free(p)\n#else\n#include <mimalloc.h>\n#include <mimalloc-stats.h>\n#define custom_calloc(n,s)    mi_calloc(n,s)\n#define custom_realloc(p,s)   mi_realloc(p,s)\n#define custom_free(p)        mi_free(p)\n\n#ifndef NDEBUG\n#define HEAP_WALK             // walk the heap objects?\n#endif\n#endif\n\n// transfer pointer between threads\n#define TRANSFERS     (1000)\nstatic volatile void* transfer[TRANSFERS];\n\n\n#if (UINTPTR_MAX != UINT32_MAX)\nconst uintptr_t cookie = 0xbf58476d1ce4e5b9UL;\n#else\nconst uintptr_t cookie = 0x1ce4e5b9UL;\n#endif\n\nstatic void* atomic_exchange_ptr(volatile void** p, void* newval);\n\ntypedef uintptr_t* random_t;\n\nstatic uintptr_t pick(random_t r) {\n  uintptr_t x = *r;\n#if (UINTPTR_MAX > UINT32_MAX)\n  // by Sebastiano Vigna, see: <http://xoshiro.di.unimi.it/splitmix64.c>\n  x ^= x >> 30;\n  x *= 0xbf58476d1ce4e5b9UL;\n  x ^= x >> 27;\n  x *= 0x94d049bb133111ebUL;\n  x ^= x >> 31;\n#else\n  // by Chris Wellons, see: <https://nullprogram.com/blog/2018/07/31/>\n  x ^= x >> 16;\n  x *= 0x7feb352dUL;\n  x ^= x >> 15;\n  x *= 0x846ca68bUL;\n  x ^= x >> 16;\n#endif\n  *r = x;\n  return x;\n}\n\nstatic bool chance(size_t perc, random_t r) {\n  return (pick(r) % 100 <= perc);\n}\n\nstatic void* alloc_items(size_t items, random_t r) {\n  if (chance(1, r)) {\n    if (chance(1, r) && allow_large_objects) items *= 10000;       // 0.01% giant\n    else if (chance(10, r) && allow_large_objects) items *= 1000;  // 0.1% huge\n    else items *= 100;                                             // 1% large objects;\n  }\n  if (items>=32 && items<=40) items*=2;              // pthreads uses 320b allocations (this shows that more clearly in the stats)\n  if (use_one_size > 0) items = (use_one_size / sizeof(uintptr_t));\n  if (items==0) items = 1;\n  uintptr_t* p = (uintptr_t*)custom_calloc(items,sizeof(uintptr_t));\n  if (p != NULL) {\n    for (uintptr_t i = 0; i < items; i++) {\n      assert(p[i] == 0);\n      p[i] = (items - i) ^ cookie;\n    }\n  }\n  return p;\n}\n\nstatic void free_items(void* p) {\n  if (p != NULL) {\n    uintptr_t* q = (uintptr_t*)p;\n    uintptr_t items = (q[0] ^ cookie);\n    for (uintptr_t i = 0; i < items; i++) {\n      if ((q[i] ^ cookie) != items - i) {\n        fprintf(stderr, \"memory corruption at block %p at %zu\\n\", p, i);\n        abort();\n      }\n    }\n  }\n  custom_free(p);\n}\n\n#ifdef HEAP_WALK\nstatic bool visit_blocks(const mi_heap_t* heap, const mi_heap_area_t* area, void* block, size_t block_size, void* arg) {\n  (void)(heap); (void)(area);\n  size_t* total = (size_t*)arg;\n  if (block != NULL) {\n    *total += block_size;\n  }\n  return true;\n}\n#endif\n\nstatic void stress(intptr_t tid) {\n  //bench_start_thread();\n  uintptr_t r = ((tid + 1) * 43); // rand();\n  const size_t max_item_shift = 5; // 128\n  const size_t max_item_retained_shift = max_item_shift + 2;\n  size_t allocs = 100 * ((size_t)SCALE) * (tid % 8 + 1); // some threads do more\n  size_t retain = allocs / 2;\n  void** data = NULL;\n  size_t data_size = 0;\n  size_t data_top = 0;\n  void** retained = (void**)custom_calloc(retain,sizeof(void*));\n  size_t retain_top = 0;\n\n  while (allocs > 0 || retain > 0) {\n    if (retain == 0 || (chance(50, &r) && allocs > 0)) {\n      // 50%+ alloc\n      allocs--;\n      if (data_top >= data_size) {\n        data_size += 100000;\n        data = (void**)custom_realloc(data, data_size * sizeof(void*));\n      }\n      data[data_top++] = alloc_items(1ULL << (pick(&r) % max_item_shift), &r);\n    }\n    else {\n      // 25% retain\n      retained[retain_top++] = alloc_items( 1ULL << (pick(&r) % max_item_retained_shift), &r);\n      retain--;\n    }\n    if (chance(66, &r) && data_top > 0) {\n      // 66% free previous alloc\n      size_t idx = pick(&r) % data_top;\n      free_items(data[idx]);\n      data[idx] = NULL;\n    }\n    if (chance(25, &r) && data_top > 0) {\n      // 25% exchange a local pointer with the (shared) transfer buffer.\n      size_t data_idx = pick(&r) % data_top;\n      size_t transfer_idx = pick(&r) % TRANSFERS;\n      void* p = data[data_idx];\n      void* q = atomic_exchange_ptr(&transfer[transfer_idx], p);\n      data[data_idx] = q;\n    }\n  }\n\n  #ifdef HEAP_WALK\n  // walk the heap\n  size_t total = 0;\n  mi_heap_visit_blocks(mi_heap_get_default(), true, visit_blocks, &total);\n  #endif\n\n  // free everything that is left\n  for (size_t i = 0; i < retain_top; i++) {\n    free_items(retained[i]);\n  }\n  for (size_t i = 0; i < data_top; i++) {\n    free_items(data[i]);\n  }\n  custom_free(retained);\n  custom_free(data);\n  //bench_end_thread();\n}\n\nstatic void run_os_threads(size_t nthreads, void (*entry)(intptr_t tid));\n\nstatic void test_stress(void) {\n  uintptr_t r = rand();\n  for (int n = 0; n < ITER; n++) {\n    run_os_threads(THREADS, &stress);\n    #if !defined(NDEBUG) && !defined(USE_STD_MALLOC)\n    // switch between arena and OS allocation for testing\n    // mi_option_set_enabled(mi_option_disallow_arena_alloc, (n%2)==1);\n    #endif\n    #ifdef HEAP_WALK\n    size_t total = 0;\n    mi_abandoned_visit_blocks(mi_subproc_main(), -1, true, visit_blocks, &total);\n    #endif\n    for (int i = 0; i < TRANSFERS; i++) {\n      if (chance(50, &r) || n + 1 == ITER) { // free all on last run, otherwise free half of the transfers\n        void* p = atomic_exchange_ptr(&transfer[i], NULL);\n        free_items(p);\n      }\n    }\n    #ifndef NDEBUG\n    //mi_collect(false);\n    //mi_debug_show_arenas(true);\n    #endif\n    #if !defined(NDEBUG) || defined(MI_TSAN)\n    if ((n + 1) % 10 == 0) { printf(\"- iterations left: %3d\\n\", ITER - (n + 1)); }\n    #endif\n  }\n}\n\n#ifndef STRESS\nstatic void leak(intptr_t tid) {\n  uintptr_t r = rand();\n  void* p = alloc_items(1 /*pick(&r)%128*/, &r);\n  if (chance(50, &r)) {\n    intptr_t i = (pick(&r) % TRANSFERS);\n    void* q = atomic_exchange_ptr(&transfer[i], p);\n    free_items(q);\n  }\n}\n\nstatic void test_leak(void) {\n  for (int n = 0; n < ITER; n++) {\n    run_os_threads(THREADS, &leak);\n    mi_collect(false);\n#ifndef NDEBUG\n    if ((n + 1) % 10 == 0) { printf(\"- iterations left: %3d\\n\", ITER - (n + 1)); }\n#endif\n  }\n}\n#endif\n\n#if defined(USE_STD_MALLOC) && defined(MI_LINK_VERSION)\n#ifdef __cplusplus\nextern \"C\"\n#endif\nint mi_version(void);\n#endif\n\nint main(int argc, char** argv) {\n  #ifdef MI_LINK_VERSION\n    mi_version();\n  #endif\n  #ifdef HEAP_WALK\n    mi_option_enable(mi_option_visit_abandoned);\n  #endif\n  #if !defined(NDEBUG) && !defined(USE_STD_MALLOC)\n    mi_option_set(mi_option_arena_reserve, 32 * 1024 /* in kib = 32MiB */);\n  #endif\n\n  // > mimalloc-test-stress [THREADS] [SCALE] [ITER]\n  if (argc >= 2) {\n    char* end;\n    long n = strtol(argv[1], &end, 10);\n    if (n > 0) THREADS = n;\n  }\n  if (argc >= 3) {\n    char* end;\n    long n = (strtol(argv[2], &end, 10));\n    if (n > 0) SCALE = n;\n  }\n  if (argc >= 4) {\n    char* end;\n    long n = (strtol(argv[3], &end, 10));\n    if (n > 0) ITER = n;\n  }\n  if (SCALE > 100) {\n    allow_large_objects = true;\n  }\n  printf(\"Using %d threads with a %d%% load-per-thread and %d iterations %s\\n\", THREADS, SCALE, ITER, (allow_large_objects ? \"(allow large objects)\" : \"\"));\n\n  #if !defined(NDEBUG) && !defined(USE_STD_MALLOC)\n  mi_stats_reset();\n  #endif\n\n  //mi_reserve_os_memory(1024*1024*1024ULL, false, true);\n  //int res = mi_reserve_huge_os_pages(4,1);\n  //printf(\"(reserve huge: %i\\n)\", res);\n\n  //bench_start_program();\n\n  // Run ITER full iterations where half the objects in the transfer buffer survive to the next round.\n  srand(0x7feb352d);\n  \n  //mi_reserve_os_memory(512ULL << 20, true, true);\n\n  #if !defined(NDEBUG) && !defined(USE_STD_MALLOC)\n  mi_stats_reset();\n  #endif\n\n#ifdef STRESS\n  test_stress();\n#else\n  test_leak();\n#endif\n\n#ifndef USE_STD_MALLOC\n  #ifndef NDEBUG\n  mi_debug_show_arenas();\n  mi_collect(true);\n  char* json = mi_stats_get_json(0, NULL);\n  if (json != NULL) {\n    fputs(json,stderr);\n    mi_free(json);\n  }\n  #endif\n  mi_stats_print(NULL);  \n#endif\n  //bench_end_program();\n  return 0;\n}\n\n\nstatic void (*thread_entry_fun)(intptr_t) = &stress;\n\n#ifdef _WIN32\n\n#include <windows.h>\n\nstatic DWORD WINAPI thread_entry(LPVOID param) {\n  thread_entry_fun((intptr_t)param);\n  return 0;\n}\n\nstatic void run_os_threads(size_t nthreads, void (*fun)(intptr_t)) {\n  thread_entry_fun = fun;\n  DWORD* tids = (DWORD*)custom_calloc(nthreads,sizeof(DWORD));\n  HANDLE* thandles = (HANDLE*)custom_calloc(nthreads,sizeof(HANDLE));\n  const size_t start = (main_participates ? 1 : 0);\n  for (size_t i = start; i < nthreads; i++) {\n    thandles[i] = CreateThread(0, 8*1024, &thread_entry, (void*)(i), 0, &tids[i]);\n  }\n  if (main_participates) fun(0); // run the main thread as well\n  for (size_t i = start; i < nthreads; i++) {\n    WaitForSingleObject(thandles[i], INFINITE);\n  }\n  for (size_t i = start; i < nthreads; i++) {\n    CloseHandle(thandles[i]);\n  }\n  custom_free(tids);\n  custom_free(thandles);\n}\n\nstatic void* atomic_exchange_ptr(volatile void** p, void* newval) {\n#if (INTPTR_MAX == INT32_MAX)\n  return (void*)InterlockedExchange((volatile LONG*)p, (LONG)newval);\n#else\n  return (void*)InterlockedExchange64((volatile LONG64*)p, (LONG64)newval);\n#endif\n}\n#else\n\n#include <pthread.h>\n\nstatic void* thread_entry(void* param) {\n  thread_entry_fun((uintptr_t)param);\n  return NULL;\n}\n\nstatic void run_os_threads(size_t nthreads, void (*fun)(intptr_t)) {\n  thread_entry_fun = fun;\n  pthread_t* threads = (pthread_t*)custom_calloc(nthreads,sizeof(pthread_t));\n  memset(threads, 0, sizeof(pthread_t) * nthreads);\n  const size_t start = (main_participates ? 1 : 0);\n  //pthread_setconcurrency(nthreads);\n  for (size_t i = start; i < nthreads; i++) {\n    pthread_create(&threads[i], NULL, &thread_entry, (void*)i);\n  }\n  if (main_participates) fun(0); // run the main thread as well\n  for (size_t i = start; i < nthreads; i++) {\n    pthread_join(threads[i], NULL);\n  }\n  custom_free(threads);\n}\n\n#ifdef __cplusplus\n#include <atomic>\nstatic void* atomic_exchange_ptr(volatile void** p, void* newval) {\n  return std::atomic_exchange((volatile std::atomic<void*>*)p, newval);\n}\n#else\n#include <stdatomic.h>\nstatic void* atomic_exchange_ptr(volatile void** p, void* newval) {\n  return atomic_exchange((volatile _Atomic(void*)*)p, newval);\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "third-party/mimalloc/test/test-wrong.c",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2020, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n\n/* test file for valgrind/asan support.\n\n   VALGRIND:\n   ----------\n   Compile in an \"out/debug\" folder:\n\n   > cd out/debug\n   > cmake ../.. -DMI_TRACK_VALGRIND=1\n   > make -j8\n\n   and then compile this file as:\n\n   > gcc -g -o test-wrong -I../../include ../../test/test-wrong.c libmimalloc-valgrind-debug.a -lpthread\n\n   and test as:\n\n   > valgrind ./test-wrong\n\n   \n   ASAN\n   ----------\n   Compile in an \"out/debug\" folder:\n\n   > cd out/debug\n   > cmake ../.. -DMI_TRACK_ASAN=1\n   > make -j8\n\n   and then compile this file as:\n\n   > clang -g -o test-wrong -I../../include ../../test/test-wrong.c libmimalloc-asan-debug.a -lpthread -fsanitize=address -fsanitize-recover=address\n\n   and test as:\n\n   > ASAN_OPTIONS=verbosity=1:halt_on_error=0 ./test-wrong\n\n\n*/\n#include <stdio.h>\n#include <stdlib.h>\n#include \"mimalloc.h\"\n\n#ifdef USE_STD_MALLOC\n# define mi(x) x\n#else\n# define mi(x) mi_##x\n#endif\n\nint main(int argc, char** argv) {\n  int* p = (int*)mi(malloc)(3*sizeof(int));\n\n  int* r = (int*)mi_malloc_aligned(8,16);\n  mi_free(r);\n\n  // illegal byte wise read\n  char* c = (char*)mi(malloc)(3);\n  printf(\"invalid byte: over: %d, under: %d\\n\", c[4], c[-1]);\n  mi(free)(c);\n\n  // undefined access\n  int* q = (int*)mi(malloc)(sizeof(int));\n  printf(\"undefined: %d\\n\", *q);\n\n  // illegal int read\n  printf(\"invalid: over: %d, under: %d\\n\", q[1], q[-1]);\n\n  *q = 42;\n\n  // buffer overflow\n  q[1] = 43;\n\n  // buffer underflow\n  q[-1] = 44;\n\n  mi(free)(q);\n\n  // double free\n  mi(free)(q);\n\n  // use after free\n  printf(\"use-after-free: %d\\n\", *q);\n\n  // leak p\n  // mi_free(p)\n  return 0;\n}"
  },
  {
    "path": "third-party/mimalloc/test/testhelper.h",
    "content": "/* ----------------------------------------------------------------------------\nCopyright (c) 2018-2020, Microsoft Research, Daan Leijen\nThis is free software; you can redistribute it and/or modify it under the\nterms of the MIT license. A copy of the license can be found in the file\n\"LICENSE\" at the root of this distribution.\n-----------------------------------------------------------------------------*/\n#ifndef TESTHELPER_H_\n#define TESTHELPER_H_\n\n#include <stdbool.h>\n#include <stdio.h>\n#include <errno.h>\n\n// ---------------------------------------------------------------------------\n// Test macros: CHECK(name,predicate) and CHECK_BODY(name,body)\n// ---------------------------------------------------------------------------\nstatic int ok = 0;\nstatic int failed = 0;\n\nstatic bool check_result(bool result, const char* testname, const char* fname, long lineno) {\n  if (!(result)) {\n    failed++;\n    fprintf(stderr,\"\\n  FAILED: %s: %s:%ld\\n\", testname, fname, lineno);\n    /* exit(1); */\n  }\n  else {\n    ok++;\n    fprintf(stderr, \"ok.\\n\");\n  }\n  return true;\n}\n\n#define CHECK_BODY(name) \\\n  fprintf(stderr,\"test: %s...  \", name ); \\\n  errno = 0; \\\n  for(bool done = false, result = true; !done; done = check_result(result,name,__FILE__,__LINE__))\n\n#define CHECK(name,expr)      CHECK_BODY(name){ result = (expr); }\n\n// Print summary of test. Return value can be directly use as a return value for main().\nstatic inline int print_test_summary(void)\n{\n  fprintf(stderr,\"\\n\\n---------------------------------------------\\n\"\n                 \"succeeded: %i\\n\"\n                 \"failed   : %i\\n\\n\", ok, failed);\n  return failed;\n}\n\n#endif // TESTHELPER_H_\n"
  },
  {
    "path": "third-party/rust-demangle/.clang-format",
    "content": "# Attempt to mimic the Rust official style.\nBasedOnStyle: LLVM\nIndentWidth: 4\nAlignAfterOpenBracket: BlockIndent\n"
  },
  {
    "path": "third-party/rust-demangle/.gitignore",
    "content": "target/\n"
  },
  {
    "path": "third-party/rust-demangle/Cargo.toml",
    "content": "[workspace]\nmembers = [\"test-harness\"]\ndefault-members = [\"test-harness\"]\n"
  },
  {
    "path": "third-party/rust-demangle/LICENSE-APACHE",
    "content": "                              Apache License\n                        Version 2.0, January 2004\n                     http://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n   \"License\" shall mean the terms and conditions for use, reproduction,\n   and distribution as defined by Sections 1 through 9 of this document.\n\n   \"Licensor\" shall mean the copyright owner or entity authorized by\n   the copyright owner that is granting the License.\n\n   \"Legal Entity\" shall mean the union of the acting entity and all\n   other entities that control, are controlled by, or are under common\n   control with that entity. For the purposes of this definition,\n   \"control\" means (i) the power, direct or indirect, to cause the\n   direction or management of such entity, whether by contract or\n   otherwise, or (ii) ownership of fifty percent (50%) or more of the\n   outstanding shares, or (iii) beneficial ownership of such entity.\n\n   \"You\" (or \"Your\") shall mean an individual or Legal Entity\n   exercising permissions granted by this License.\n\n   \"Source\" form shall mean the preferred form for making modifications,\n   including but not limited to software source code, documentation\n   source, and configuration files.\n\n   \"Object\" form shall mean any form resulting from mechanical\n   transformation or translation of a Source form, including but\n   not limited to compiled object code, generated documentation,\n   and conversions to other media types.\n\n   \"Work\" shall mean the work of authorship, whether in Source or\n   Object form, made available under the License, as indicated by a\n   copyright notice that is included in or attached to the work\n   (an example is provided in the Appendix below).\n\n   \"Derivative Works\" shall mean any work, whether in Source or Object\n   form, that is based on (or derived from) the Work and for which the\n   editorial revisions, annotations, elaborations, or other modifications\n   represent, as a whole, an original work of authorship. For the purposes\n   of this License, Derivative Works shall not include works that remain\n   separable from, or merely link (or bind by name) to the interfaces of,\n   the Work and Derivative Works thereof.\n\n   \"Contribution\" shall mean any work of authorship, including\n   the original version of the Work and any modifications or additions\n   to that Work or Derivative Works thereof, that is intentionally\n   submitted to Licensor for inclusion in the Work by the copyright owner\n   or by an individual or Legal Entity authorized to submit on behalf of\n   the copyright owner. For the purposes of this definition, \"submitted\"\n   means any form of electronic, verbal, or written communication sent\n   to the Licensor or its representatives, including but not limited to\n   communication on electronic mailing lists, source code control systems,\n   and issue tracking systems that are managed by, or on behalf of, the\n   Licensor for the purpose of discussing and improving the Work, but\n   excluding communication that is conspicuously marked or otherwise\n   designated in writing by the copyright owner as \"Not a Contribution.\"\n\n   \"Contributor\" shall mean Licensor and any individual or Legal Entity\n   on behalf of whom a Contribution has been received by Licensor and\n   subsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\n   this License, each Contributor hereby grants to You a perpetual,\n   worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n   copyright license to reproduce, prepare Derivative Works of,\n   publicly display, publicly perform, sublicense, and distribute the\n   Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\n   this License, each Contributor hereby grants to You a perpetual,\n   worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n   (except as stated in this section) patent license to make, have made,\n   use, offer to sell, sell, import, and otherwise transfer the Work,\n   where such license applies only to those patent claims licensable\n   by such Contributor that are necessarily infringed by their\n   Contribution(s) alone or by combination of their Contribution(s)\n   with the Work to which such Contribution(s) was submitted. If You\n   institute patent litigation against any entity (including a\n   cross-claim or counterclaim in a lawsuit) alleging that the Work\n   or a Contribution incorporated within the Work constitutes direct\n   or contributory patent infringement, then any patent licenses\n   granted to You under this License for that Work shall terminate\n   as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\n   Work or Derivative Works thereof in any medium, with or without\n   modifications, and in Source or Object form, provided that You\n   meet the following conditions:\n\n   (a) You must give any other recipients of the Work or\n       Derivative Works a copy of this License; and\n\n   (b) You must cause any modified files to carry prominent notices\n       stating that You changed the files; and\n\n   (c) You must retain, in the Source form of any Derivative Works\n       that You distribute, all copyright, patent, trademark, and\n       attribution notices from the Source form of the Work,\n       excluding those notices that do not pertain to any part of\n       the Derivative Works; and\n\n   (d) If the Work includes a \"NOTICE\" text file as part of its\n       distribution, then any Derivative Works that You distribute must\n       include a readable copy of the attribution notices contained\n       within such NOTICE file, excluding those notices that do not\n       pertain to any part of the Derivative Works, in at least one\n       of the following places: within a NOTICE text file distributed\n       as part of the Derivative Works; within the Source form or\n       documentation, if provided along with the Derivative Works; or,\n       within a display generated by the Derivative Works, if and\n       wherever such third-party notices normally appear. The contents\n       of the NOTICE file are for informational purposes only and\n       do not modify the License. You may add Your own attribution\n       notices within Derivative Works that You distribute, alongside\n       or as an addendum to the NOTICE text from the Work, provided\n       that such additional attribution notices cannot be construed\n       as modifying the License.\n\n   You may add Your own copyright statement to Your modifications and\n   may provide additional or different license terms and conditions\n   for use, reproduction, or distribution of Your modifications, or\n   for any such Derivative Works as a whole, provided Your use,\n   reproduction, and distribution of the Work otherwise complies with\n   the conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\n   any Contribution intentionally submitted for inclusion in the Work\n   by You to the Licensor shall be under the terms and conditions of\n   this License, without any additional terms or conditions.\n   Notwithstanding the above, nothing herein shall supersede or modify\n   the terms of any separate license agreement you may have executed\n   with Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\n   names, trademarks, service marks, or product names of the Licensor,\n   except as required for reasonable and customary use in describing the\n   origin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\n   agreed to in writing, Licensor provides the Work (and each\n   Contributor provides its Contributions) on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n   implied, including, without limitation, any warranties or conditions\n   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n   PARTICULAR PURPOSE. You are solely responsible for determining the\n   appropriateness of using or redistributing the Work and assume any\n   risks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\n   whether in tort (including negligence), contract, or otherwise,\n   unless required by applicable law (such as deliberate and grossly\n   negligent acts) or agreed to in writing, shall any Contributor be\n   liable to You for damages, including any direct, indirect, special,\n   incidental, or consequential damages of any character arising as a\n   result of this License or out of the use or inability to use the\n   Work (including but not limited to damages for loss of goodwill,\n   work stoppage, computer failure or malfunction, or any and all\n   other commercial damages or losses), even if such Contributor\n   has been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\n   the Work or Derivative Works thereof, You may choose to offer,\n   and charge a fee for, acceptance of support, warranty, indemnity,\n   or other liability obligations and/or rights consistent with this\n   License. However, in accepting such obligations, You may act only\n   on Your own behalf and on Your sole responsibility, not on behalf\n   of any other Contributor, and only if You agree to indemnify,\n   defend, and hold each Contributor harmless for any liability\n   incurred by, or claims asserted against, such Contributor by reason\n   of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n"
  },
  {
    "path": "third-party/rust-demangle/LICENSE-MIT",
    "content": "Permission is hereby granted, free of charge, to any\nperson obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the\nSoftware without restriction, including without\nlimitation the rights to use, copy, modify, merge,\npublish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software\nis furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice\nshall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF\nANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\nSHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR\nIN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "third-party/rust-demangle/README.md",
    "content": "# `rust-demangle.c`\n\nThis is a single-file C99 port of the official Rust symbol demangler ([`rustc-demangle`](https://github.com/rust-lang/rustc-demangle), a Rust library).\n\n## Usecases\n\nThis C port is intended for situations in which a Rust dependency is hard to\njustify, or effectively impossible (e.g. platform toolchains, that would be used\n*while building Rust*, not the other way around).\n\nIf a Rust dependency is acceptable, [using `rustc-demangle` from C](https://github.com/rust-lang/rustc-demangle#usage-from-non-rust-languages)\n(or other languages via FFI) is possible, and may be preferred over this C port.\n\n## Status\n\nAs this C port was originally (see the [History](#history) section) *only* for the\n`rustc-demangle` code demangling the (new at the time) [Rust RFC2603 (aka \"`v0`\") mangling scheme](https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html),\nit may lag behind `rustc-demangle` in functionality, for now.\n\nThe current port status by category is:\n* **ported** `legacy` (pre-RFC2603 Rust symbols) demangling\n* `v0` ([RFC2603](https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html) Rust symbols) demangling\n  * **ported** PRs:\n    * [[#23] Support demangling the new Rust mangling scheme (v0).](https://github.com/rust-lang/rustc-demangle/pull/23)\n    * [[#26] v0: allow identifiers to start with a digit.](https://github.com/rust-lang/rustc-demangle/pull/26)\n    * [[#53] v0: replace `skip_*` methods with `print_*` methods in a \"skip printing\" mode.](https://github.com/rust-lang/rustc-demangle/pull/53)\n      * arguably backported to Rust, as the C port always took this approach\n    * symbol prefix flexibility (`__R` and `R`, instead of `_R`)\n    * [[#39] Add support for `min_const_generics` constants](https://github.com/rust-lang/rustc-demangle/pull/39)\n      * [[#40] Elide the type when the const value is a placeholder `p`](https://github.com/rust-lang/rustc-demangle/pull/40)\n    * [[#55] v0: demangle structural constants and &str.](https://github.com/rust-lang/rustc-demangle/pull/55)\n      (only usable in `const` generics on unstable Rust)\n  * **(UNPORTED)** recursion limits\n* miscellaneous\n  * **ported** PRs:\n    * [[#30] v0: also support preserving extra suffixes found after mangled symbol.](https://github.com/rust-lang/rustc-demangle/pull/30)\n  * **(UNPORTED)** output size limits\n\nNotable differences (intentionally) introduced by porting:\n* `rustc-demangle` can't use the heap (as it's `#![no_std]`), but the C port does\n  * this is mainly dictated by the ergonomics of the `rust_demangle` API, which\n    requires `malloc`/`realloc` to return a new C string allocation\n  * if there is demand for it, `rust_demangle` support could be made optional,\n    forcing heap-less users to always use `rust_demangle_with_callback` instead\n  * a subtler consequence is that `rustc-demangle` uses a fixed-size buffer on\n    the stack for punycode decoding, while the C port can allocate it on the heap\n* Unicode support is always handrolled in the C port, and often simplified\n\n## Usage\n\nGet `rust-demangle.c` and `rust-demangle.h` (via `git submodule`, vendoring, etc.),\nadd them to your project's build system (as C source, and include path, respectively),\nthen you can call `rust_demangle` with a symbol and some flags, e.g.:\n```c\n#include <rust-demangle.h>\n#include <stdio.h>\n\nint main() {\n    const char *sym = \"_RNvNtCsbmNqQUJIY6D_4core3foo3bar\";\n\n    printf(\"demangle(%s) = %s\\n\", sym, rust_demangle(sym, 0));\n\n    printf(\n        \"demangle(%s, VERBOSE) = %s\\n\", sym,\n        rust_demangle(sym, RUST_DEMANGLE_FLAG_VERBOSE)\n    );\n}\n```\nwhich prints out, when ran:\n```\ndemangle(_RNvNtCsbmNqQUJIY6D_4core3foo3bar) = core::foo::bar\ndemangle(_RNvNtCsbmNqQUJIY6D_4core3foo3bar, VERBOSE) = core[846817f741e54dfd]::foo::bar\n```\n\nNote that the example leaks the returned C strings, ideally you would `free` them.\n\n### Advanced usage (callback-based API)\n\nIf you want to avoid the cost of allocating the output in memory, you can also\nuse `rust_demangle_with_callback`, which takes a \"printing\" callback instead, e.g.:\n```c\n#include <rust-demangle.h>\n#include <stdio.h>\n\nstatic void fwrite_callback(const char *data, size_t len, void *opaque) {\n    fwrite(data, len, 1, (FILE *)opaque);\n}\n\nint main() {\n    const char *sym = \"_RNvNtCsbmNqQUJIY6D_4core3foo3bar\";\n\n    printf(\"demangle(%s) = \", sym);\n    rust_demangle_with_callback(sym, 0, fwrite_callback, stdout);\n    printf(\"\\n\");\n\n    printf(\"demangle(%s, VERBOSE) = \", sym);\n    rust_demangle_with_callback(\n        sym, RUST_DEMANGLE_FLAG_VERBOSE, fwrite_callback, stdout\n    );\n    printf(\"\\n\");\n}\n```\n(with identical output to the simpler example)\n\n## Testing\n\n`cargo test` will run built-in tests - it's implemented in Rust (in `test-harness`)\nso that it can depend on `rustc-demangle` itself for comparisons.\n\nAdditionally, `cargo run -q --release --example check-csv-dataset path/to/syms/*.csv`\ncan be used to provide CSV files with additional mangled symbols test data, but such\ndatasets aren't trivial to obtain (existing ones required building `rust-lang/rust`\nwith a compiler patch that reacts to a custom environment variable).\nThey're also quite large (~1GiB uncompressed) so none have been published anywhere yet.\n\n## History\n\nThis C port was started while the [Rust RFC2603 (aka \"`v0`\") mangling scheme](https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html)\nwas still being developed, with the intent of upstreaming it into `libiberty`\n(which provides demangling for `binutils`, `gdb`, Linux `perf`, etc.) and other\nprojects (e.g. `valgrind`) - you can see some of that upstreaming history\n[on the `v0` tracking issue](https://github.com/rust-lang/rust/issues/60705).\n\nAt the time, the expectation was that most projects could either depend on\n`libiberty`, or vendor a copy of its code, so the C port focused on upstreaming\nto it, rather than producing an independent reusable C codebase.\n\nThat meant that instead of a `git` repository, the [code revisions were only tracked by a gist](https://gist.github.com/eddyb/c41a69378750a433767cf53fe2316768/revisions),\nand the GNU code style was followed (including C89 comments and variable declarations).\n\nHowever, the LGPL license of `libiberty` turned out to be a problem for adoption,\ncompared to the typical MIT/Apache-2.0 dual licensing of Rust projects.\n\n### The `rust-demangle.c` fork\n\nThis repository started out as a fork of [the original gist](https://gist.github.com/eddyb/c41a69378750a433767cf53fe2316768/revisions), at commit [`e2c30407516a87c0f8c3820cf152640bd08805dd`](https://github.com/LykenSol/rust-demangle.c/commit/e2c30407516a87c0f8c3820cf152640bd08805dd), *just before `libiberty`\nintegration* (which was in commit [`0e6f57b0e86ccec4395f8850f4885b1e391a9f4b`](https://gist.github.com/eddyb/c41a69378750a433767cf53fe2316768/0e6f57b0e86ccec4395f8850f4885b1e391a9f4b)).\n\nAny changes since that gist are either fresh C ports of the Rust `rustc-demangle`\ncode, or completely new code, in order to maintain the [MIT/Apache-2.0 dual licensing](#license).\n\nWhile this has the disadvantage of starting behind `libiberty` (which kept its\nRust `legacy` demangler, and also got a few more features during/since upstreaming),\nthe relationship may reverse eventually, where this port could get new features\nthat would then have to be upstreamed into `libiberty`.\n\n## License\n\n[Like `rustc-demangle`](https://github.com/rust-lang/rustc-demangle#license), this project is licensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or\n   http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or\n   http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in `rust-demangle.c` you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n"
  },
  {
    "path": "third-party/rust-demangle/rust-demangle.c",
    "content": "// FIXME(eddyb) should this use `<rust-demangle.h>`?\n#include \"rust-demangle.h\"\n\n#include <inttypes.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\nstruct rust_demangler {\n    const char *sym;\n    size_t sym_len;\n\n    void *callback_opaque;\n    void (*callback)(const char *data, size_t len, void *opaque);\n\n    // Position of the next character to read from the symbol.\n    size_t next;\n\n    // `true` if any error occurred.\n    bool errored;\n\n    // `true` if nothing should be printed.\n    bool skipping_printing;\n\n    // `true` if printing should be verbose (e.g. include hashes).\n    bool verbose;\n\n    // Rust mangling version, with legacy mangling being -1.\n    int version;\n\n    uint64_t bound_lifetime_depth;\n};\n\n#define ERROR_AND(x)                                                           \\\n    do {                                                                       \\\n        rdm->errored = true;                                                   \\\n        x;                                                                     \\\n    } while (0)\n#define CHECK_OR(cond, x)                                                      \\\n    do {                                                                       \\\n        if (!(cond))                                                           \\\n            ERROR_AND(x);                                                      \\\n    } while (0)\n\n// FIXME(eddyb) consider renaming these to not start with `IS` (UB?).\n#define IS_DIGIT(c) ((c) >= '0' && (c) <= '9')\n#define IS_UPPER(c) ((c) >= 'A' && (c) <= 'Z')\n#define IS_LOWER(c) ((c) >= 'a' && (c) <= 'z')\n\n// Parsing functions.\n\nstatic char peek(const struct rust_demangler *rdm) {\n    if (rdm->next < rdm->sym_len)\n        return rdm->sym[rdm->next];\n    return 0;\n}\n\nstatic bool eat(struct rust_demangler *rdm, char c) {\n    if (peek(rdm) == c) {\n        rdm->next++;\n        return true;\n    } else\n        return false;\n}\n\nstatic char next(struct rust_demangler *rdm) {\n    char c = peek(rdm);\n    CHECK_OR(c, return 0);\n    rdm->next++;\n    return c;\n}\n\nstruct hex_nibbles {\n    const char *nibbles;\n    size_t nibbles_len;\n};\n\nstatic struct hex_nibbles parse_hex_nibbles(struct rust_demangler *rdm) {\n    struct hex_nibbles hex;\n\n    hex.nibbles = NULL;\n    hex.nibbles_len = 0;\n\n    size_t start = rdm->next, hex_len = 0;\n    while (!eat(rdm, '_')) {\n        char c = next(rdm);\n        CHECK_OR(IS_DIGIT(c) || (c >= 'a' && c <= 'f'), return hex);\n        hex_len++;\n    }\n\n    hex.nibbles = rdm->sym + start;\n    hex.nibbles_len = hex_len;\n    return hex;\n}\n\nstatic struct hex_nibbles\nparse_hex_nibbles_for_const_uint(struct rust_demangler *rdm) {\n    struct hex_nibbles hex = parse_hex_nibbles(rdm);\n    CHECK_OR(!rdm->errored, return hex);\n\n    // Trim leading `0`s.\n    while (hex.nibbles_len > 0 && *hex.nibbles == '0') {\n        hex.nibbles++;\n        hex.nibbles_len--;\n    }\n\n    return hex;\n}\n\nstatic struct hex_nibbles\nparse_hex_nibbles_for_const_bytes(struct rust_demangler *rdm) {\n    struct hex_nibbles hex = parse_hex_nibbles(rdm);\n    CHECK_OR(!rdm->errored && (hex.nibbles_len % 2 == 0), return hex);\n    return hex;\n}\n\nstatic uint8_t decode_hex_nibble(char nibble) {\n    return nibble >= 'a' ? 10 + (nibble - 'a') : nibble - '0';\n}\n\nstatic uint64_t parse_integer_62(struct rust_demangler *rdm) {\n    if (eat(rdm, '_'))\n        return 0;\n\n    uint64_t x = 0;\n    while (!eat(rdm, '_')) {\n        char c = next(rdm);\n        x *= 62;\n        if (IS_DIGIT(c))\n            x += c - '0';\n        else if (IS_LOWER(c))\n            x += 10 + (c - 'a');\n        else if (IS_UPPER(c))\n            x += 10 + 26 + (c - 'A');\n        else\n            ERROR_AND(return 0);\n    }\n    return x + 1;\n}\n\nstatic uint64_t parse_opt_integer_62(struct rust_demangler *rdm, char tag) {\n    if (!eat(rdm, tag))\n        return 0;\n    return 1 + parse_integer_62(rdm);\n}\n\nstatic uint64_t parse_disambiguator(struct rust_demangler *rdm) {\n    return parse_opt_integer_62(rdm, 's');\n}\n\nstruct rust_mangled_ident {\n    // ASCII part of the identifier.\n    const char *ascii;\n    size_t ascii_len;\n\n    // Punycode insertion codes for Unicode codepoints, if any.\n    const char *punycode;\n    size_t punycode_len;\n};\n\nstatic struct rust_mangled_ident parse_ident(struct rust_demangler *rdm) {\n    struct rust_mangled_ident ident;\n\n    ident.ascii = NULL;\n    ident.ascii_len = 0;\n    ident.punycode = NULL;\n    ident.punycode_len = 0;\n\n    bool is_punycode = false;\n    if (rdm->version != -1) {\n        is_punycode = eat(rdm, 'u');\n    }\n\n    char c = next(rdm);\n    CHECK_OR(IS_DIGIT(c), return ident);\n    size_t len = c - '0';\n\n    if (c != '0')\n        while (IS_DIGIT(peek(rdm)))\n            len = len * 10 + (next(rdm) - '0');\n\n    if (rdm->version != -1) {\n        // Skip past the optional `_` separator.\n        eat(rdm, '_');\n    }\n\n    size_t start = rdm->next;\n    rdm->next += len;\n    // Check for overflows.\n    CHECK_OR((start <= rdm->next) && (rdm->next <= rdm->sym_len), return ident);\n\n    ident.ascii = rdm->sym + start;\n    ident.ascii_len = len;\n\n    if (is_punycode) {\n        ident.punycode_len = 0;\n        while (ident.ascii_len > 0) {\n            ident.ascii_len--;\n\n            // The last '_' is a separator between ascii & punycode.\n            if (ident.ascii[ident.ascii_len] == '_')\n                break;\n\n            ident.punycode_len++;\n        }\n        CHECK_OR(ident.punycode_len > 0, return ident);\n        ident.punycode = ident.ascii + (len - ident.punycode_len);\n    }\n\n    if (ident.ascii_len == 0)\n        ident.ascii = NULL;\n\n    return ident;\n}\n\n// Printing functions.\n\nstatic void\nprint_str(struct rust_demangler *rdm, const char *data, size_t len) {\n    if (!rdm->errored && !rdm->skipping_printing)\n        rdm->callback(data, len, rdm->callback_opaque);\n}\n\n#define PRINT(s) print_str(rdm, s, strlen(s))\n\nstatic void print_uint64(struct rust_demangler *rdm, uint64_t x) {\n    char s[21];\n    sprintf(s, \"%\" PRIu64, x);\n    PRINT(s);\n}\n\nstatic void print_uint64_hex(struct rust_demangler *rdm, uint64_t x) {\n    char s[17];\n    sprintf(s, \"%\" PRIx64, x);\n    PRINT(s);\n}\n\nstatic void\nprint_quoted_escaped_char(struct rust_demangler *rdm, char quote, uint32_t c) {\n    CHECK_OR(c < 0xd800 || (c > 0xdfff && c < 0x10ffff), return);\n\n    switch (c) {\n    case '\\0':\n        PRINT(\"\\\\0\");\n        break;\n\n    case '\\t':\n        PRINT(\"\\\\t\");\n        break;\n\n    case '\\r':\n        PRINT(\"\\\\r\");\n        break;\n\n    case '\\n':\n        PRINT(\"\\\\n\");\n        break;\n\n    case '\\\\':\n        PRINT(\"\\\\\\\\\");\n        break;\n\n    case '\"':\n        if (quote == '\"') {\n            PRINT(\"\\\\\\\"\");\n        } else {\n            PRINT(\"\\\"\");\n        }\n        break;\n\n    case '\\'':\n        if (quote == '\\'') {\n            PRINT(\"\\\\'\");\n        } else {\n            PRINT(\"'\");\n        }\n        break;\n\n    default:\n        if (c >= 0x20 && c <= 0x7e) {\n            // Printable ASCII\n            char v = (char)c;\n            print_str(rdm, &v, 1);\n        } else {\n            // FIXME show printable unicode characters without hex encoding\n            PRINT(\"\\\\u{\");\n            char s[9] = {0};\n            sprintf(s, \"%\" PRIx32, c);\n            PRINT(s);\n            PRINT(\"}\");\n        }\n    }\n}\n\nstatic void\nprint_ident(struct rust_demangler *rdm, struct rust_mangled_ident ident) {\n    if (rdm->errored || rdm->skipping_printing)\n        return;\n\n    if (!ident.punycode) {\n        print_str(rdm, ident.ascii, ident.ascii_len);\n        return;\n    }\n\n    size_t len = 0;\n    size_t cap = 4;\n    while (cap < ident.ascii_len) {\n        cap *= 2;\n        // Check for overflows.\n        CHECK_OR((cap * 4) / 4 == cap, return);\n    }\n\n    // Store the output codepoints as groups of 4 UTF-8 bytes.\n    uint8_t *out = (uint8_t *)malloc(cap * 4);\n    CHECK_OR(out, return);\n\n    // Populate initial output from ASCII fragment.\n    for (len = 0; len < ident.ascii_len; len++) {\n        uint8_t *p = out + 4 * len;\n        p[0] = 0;\n        p[1] = 0;\n        p[2] = 0;\n        p[3] = ident.ascii[len];\n    }\n\n    // Punycode parameters and initial state.\n    size_t base = 36;\n    size_t t_min = 1;\n    size_t t_max = 26;\n    size_t skew = 38;\n    size_t damp = 700;\n    size_t bias = 72;\n    size_t i = 0;\n    uint32_t c = 0x80;\n\n    size_t punycode_pos = 0;\n    while (punycode_pos < ident.punycode_len) {\n        // Read one delta value.\n        size_t delta = 0;\n        size_t w = 1;\n        size_t k = 0;\n        size_t t;\n        uint8_t d;\n        do {\n            k += base;\n            t = k < bias ? 0 : (k - bias);\n            if (t < t_min)\n                t = t_min;\n            if (t > t_max)\n                t = t_max;\n\n            CHECK_OR(punycode_pos < ident.punycode_len, goto cleanup);\n            d = ident.punycode[punycode_pos++];\n\n            if (IS_LOWER(d))\n                d = d - 'a';\n            else if (IS_DIGIT(d))\n                d = 26 + (d - '0');\n            else\n                ERROR_AND(goto cleanup);\n\n            delta += d * w;\n            w *= base - t;\n        } while (d >= t);\n\n        // Compute the new insert position and character.\n        len++;\n        i += delta;\n        c += i / len;\n        i %= len;\n\n        // Ensure enough space is available.\n        if (cap < len) {\n            cap *= 2;\n            // Check for overflows.\n            CHECK_OR((cap * 4) / 4 == cap, goto cleanup);\n            CHECK_OR(cap >= len, goto cleanup);\n        }\n        uint8_t *p = (uint8_t *)realloc(out, cap * 4);\n        CHECK_OR(p, goto cleanup);\n        out = p;\n\n        // Move the characters after the insert position.\n        p = out + i * 4;\n        memmove(p + 4, p, (len - i - 1) * 4);\n\n        // Insert the new character, as UTF-8 bytes.\n        p[0] = c >= 0x10000 ? 0xf0 | (c >> 18) : 0;\n        p[1] =\n            c >= 0x800 ? (c < 0x10000 ? 0xe0 : 0x80) | ((c >> 12) & 0x3f) : 0;\n        p[2] = (c < 0x800 ? 0xc0 : 0x80) | ((c >> 6) & 0x3f);\n        p[3] = 0x80 | (c & 0x3f);\n\n        // If there are no more deltas, decoding is complete.\n        if (punycode_pos == ident.punycode_len)\n            break;\n\n        i++;\n\n        // Perform bias adaptation.\n        delta /= damp;\n        damp = 2;\n\n        delta += delta / len;\n        k = 0;\n        while (delta > ((base - t_min) * t_max) / 2) {\n            delta /= base - t_min;\n            k += base;\n        }\n        bias = k + ((base - t_min + 1) * delta) / (delta + skew);\n    }\n\n    // Remove all the 0 bytes to leave behind an UTF-8 string.\n    size_t j;\n    for (i = 0, j = 0; i < len * 4; i++)\n        if (out[i] != 0)\n            out[j++] = out[i];\n\n    print_str(rdm, (const char *)out, j);\n\ncleanup:\n    free(out);\n}\n\n/// Print the lifetime according to the previously decoded index.\n/// An index of `0` always refers to `'_`, but starting with `1`,\n/// indices refer to late-bound lifetimes introduced by a binder.\nstatic void print_lifetime_from_index(struct rust_demangler *rdm, uint64_t lt) {\n    PRINT(\"'\");\n    if (lt == 0) {\n        PRINT(\"_\");\n        return;\n    }\n\n    uint64_t depth = rdm->bound_lifetime_depth - lt;\n    // Try to print lifetimes alphabetically first.\n    if (depth < 26) {\n        char c = 'a' + depth;\n        print_str(rdm, &c, 1);\n    } else {\n        // Use `'_123` after running out of letters.\n        PRINT(\"_\");\n        print_uint64(rdm, depth);\n    }\n}\n\n// Demangling functions.\n\nstatic void demangle_binder(struct rust_demangler *rdm);\nstatic void demangle_path(struct rust_demangler *rdm, bool in_value);\nstatic void demangle_generic_arg(struct rust_demangler *rdm);\nstatic void demangle_type(struct rust_demangler *rdm);\nstatic bool demangle_path_maybe_open_generics(struct rust_demangler *rdm);\nstatic void demangle_dyn_trait(struct rust_demangler *rdm);\nstatic void demangle_const(struct rust_demangler *rdm, bool in_value);\nstatic void demangle_const_uint(struct rust_demangler *rdm, char ty_tag);\nstatic void demangle_const_str_literal(struct rust_demangler *rdm);\n\n/// Optionally enter a binder ('G') for late-bound lifetimes,\n/// printing e.g. `for<'a, 'b> `, and make those lifetimes visible\n/// to the caller (via depth level, which the caller should reset).\nstatic void demangle_binder(struct rust_demangler *rdm) {\n    CHECK_OR(!rdm->errored, return);\n\n    uint64_t bound_lifetimes = parse_opt_integer_62(rdm, 'G');\n    if (bound_lifetimes > 0) {\n        PRINT(\"for<\");\n        for (uint64_t i = 0; i < bound_lifetimes; i++) {\n            if (i > 0)\n                PRINT(\", \");\n            rdm->bound_lifetime_depth++;\n            print_lifetime_from_index(rdm, 1);\n        }\n        PRINT(\"> \");\n    }\n}\n\nstatic void demangle_path(struct rust_demangler *rdm, bool in_value) {\n    CHECK_OR(!rdm->errored, return);\n\n    char tag = next(rdm);\n    switch (tag) {\n    case 'C': {\n        uint64_t dis = parse_disambiguator(rdm);\n        struct rust_mangled_ident name = parse_ident(rdm);\n\n        print_ident(rdm, name);\n        if (rdm->verbose) {\n            PRINT(\"[\");\n            print_uint64_hex(rdm, dis);\n            PRINT(\"]\");\n        }\n        break;\n    }\n    case 'N': {\n        char ns = next(rdm);\n        CHECK_OR(IS_LOWER(ns) || IS_UPPER(ns), return);\n\n        demangle_path(rdm, in_value);\n\n        uint64_t dis = parse_disambiguator(rdm);\n        struct rust_mangled_ident name = parse_ident(rdm);\n\n        if (IS_UPPER(ns)) {\n            // Special namespaces, like closures and shims.\n            PRINT(\"::{\");\n            switch (ns) {\n            case 'C':\n                PRINT(\"closure\");\n                break;\n            case 'S':\n                PRINT(\"shim\");\n                break;\n            default:\n                print_str(rdm, &ns, 1);\n            }\n            if (name.ascii || name.punycode) {\n                PRINT(\":\");\n                print_ident(rdm, name);\n            }\n            PRINT(\"#\");\n            print_uint64(rdm, dis);\n            PRINT(\"}\");\n        } else {\n            // Implementation-specific/unspecified namespaces.\n\n            if (name.ascii || name.punycode) {\n                PRINT(\"::\");\n                print_ident(rdm, name);\n            }\n        }\n        break;\n    }\n    case 'M':\n    case 'X':\n        // Ignore the `impl`'s own path.\n        parse_disambiguator(rdm);\n        bool was_skipping_printing = rdm->skipping_printing;\n        rdm->skipping_printing = true;\n        demangle_path(rdm, in_value);\n        rdm->skipping_printing = was_skipping_printing;\n        __attribute__((fallthrough));\n    case 'Y':\n        PRINT(\"<\");\n        demangle_type(rdm);\n        if (tag != 'M') {\n            PRINT(\" as \");\n            demangle_path(rdm, false);\n        }\n        PRINT(\">\");\n        break;\n    case 'I':\n        demangle_path(rdm, in_value);\n        if (in_value)\n            PRINT(\"::\");\n        PRINT(\"<\");\n        for (size_t i = 0; !rdm->errored && !eat(rdm, 'E'); i++) {\n            if (i > 0)\n                PRINT(\", \");\n            demangle_generic_arg(rdm);\n        }\n        PRINT(\">\");\n        break;\n    case 'B': {\n        size_t backref = parse_integer_62(rdm);\n        if (!rdm->skipping_printing) {\n            size_t old_next = rdm->next;\n            rdm->next = backref;\n            demangle_path(rdm, in_value);\n            rdm->next = old_next;\n        }\n        break;\n    }\n    default:\n        ERROR_AND(return);\n    }\n}\n\nstatic void demangle_generic_arg(struct rust_demangler *rdm) {\n    if (eat(rdm, 'L')) {\n        uint64_t lt = parse_integer_62(rdm);\n        print_lifetime_from_index(rdm, lt);\n    } else if (eat(rdm, 'K'))\n        demangle_const(rdm, false);\n    else\n        demangle_type(rdm);\n}\n\nstatic const char *basic_type(char tag) {\n    switch (tag) {\n    case 'b':\n        return \"bool\";\n    case 'c':\n        return \"char\";\n    case 'e':\n        return \"str\";\n    case 'u':\n        return \"()\";\n    case 'a':\n        return \"i8\";\n    case 's':\n        return \"i16\";\n    case 'l':\n        return \"i32\";\n    case 'x':\n        return \"i64\";\n    case 'n':\n        return \"i128\";\n    case 'i':\n        return \"isize\";\n    case 'h':\n        return \"u8\";\n    case 't':\n        return \"u16\";\n    case 'm':\n        return \"u32\";\n    case 'y':\n        return \"u64\";\n    case 'o':\n        return \"u128\";\n    case 'j':\n        return \"usize\";\n    case 'f':\n        return \"f32\";\n    case 'd':\n        return \"f64\";\n    case 'z':\n        return \"!\";\n    case 'p':\n        return \"_\";\n    case 'v':\n        return \"...\";\n\n    default:\n        return NULL;\n    }\n}\n\nstatic void demangle_type(struct rust_demangler *rdm) {\n    CHECK_OR(!rdm->errored, return);\n\n    char tag = next(rdm);\n\n    const char *basic = basic_type(tag);\n    if (basic) {\n        PRINT(basic);\n        return;\n    }\n\n    switch (tag) {\n    case 'R':\n    case 'Q':\n        PRINT(\"&\");\n        if (eat(rdm, 'L')) {\n            uint64_t lt = parse_integer_62(rdm);\n            if (lt) {\n                print_lifetime_from_index(rdm, lt);\n                PRINT(\" \");\n            }\n        }\n        if (tag != 'R')\n            PRINT(\"mut \");\n        demangle_type(rdm);\n        break;\n    case 'P':\n    case 'O':\n        PRINT(\"*\");\n        if (tag != 'P')\n            PRINT(\"mut \");\n        else\n            PRINT(\"const \");\n        demangle_type(rdm);\n        break;\n    case 'A':\n    case 'S':\n        PRINT(\"[\");\n        demangle_type(rdm);\n        if (tag == 'A') {\n            PRINT(\"; \");\n            demangle_const(rdm, true);\n        }\n        PRINT(\"]\");\n        break;\n    case 'T': {\n        PRINT(\"(\");\n        size_t i;\n        for (i = 0; !rdm->errored && !eat(rdm, 'E'); i++) {\n            if (i > 0)\n                PRINT(\", \");\n            demangle_type(rdm);\n        }\n        if (i == 1)\n            PRINT(\",\");\n        PRINT(\")\");\n        break;\n    }\n    case 'F': {\n        uint64_t old_bound_lifetime_depth = rdm->bound_lifetime_depth;\n        demangle_binder(rdm);\n\n        if (eat(rdm, 'U'))\n            PRINT(\"unsafe \");\n\n        if (eat(rdm, 'K')) {\n            struct rust_mangled_ident abi;\n\n            if (eat(rdm, 'C')) {\n                abi.ascii = \"C\";\n                abi.ascii_len = 1;\n            } else {\n                abi = parse_ident(rdm);\n                CHECK_OR(abi.ascii && !abi.punycode, goto restore);\n            }\n\n            PRINT(\"extern \\\"\");\n\n            // If the ABI had any `-`, they were replaced with `_`,\n            // so the parts between `_` have to be re-joined with `-`.\n            for (size_t i = 0; i < abi.ascii_len; i++) {\n                if (abi.ascii[i] == '_') {\n                    print_str(rdm, abi.ascii, i);\n                    PRINT(\"-\");\n                    abi.ascii += i + 1;\n                    abi.ascii_len -= i + 1;\n                    i = 0;\n                }\n            }\n            print_str(rdm, abi.ascii, abi.ascii_len);\n\n            PRINT(\"\\\" \");\n        }\n\n        PRINT(\"fn(\");\n        for (size_t i = 0; !rdm->errored && !eat(rdm, 'E'); i++) {\n            if (i > 0)\n                PRINT(\", \");\n            demangle_type(rdm);\n        }\n        PRINT(\")\");\n\n        if (eat(rdm, 'u')) {\n            // Skip printing the return type if it's 'u', i.e. `()`.\n        } else {\n            PRINT(\" -> \");\n            demangle_type(rdm);\n        }\n\n    // Restore `bound_lifetime_depth` to outside the binder.\n    restore:\n        rdm->bound_lifetime_depth = old_bound_lifetime_depth;\n        break;\n    }\n    case 'D':\n        PRINT(\"dyn \");\n\n        uint64_t old_bound_lifetime_depth = rdm->bound_lifetime_depth;\n        demangle_binder(rdm);\n\n        for (size_t i = 0; !rdm->errored && !eat(rdm, 'E'); i++) {\n            if (i > 0)\n                PRINT(\" + \");\n            demangle_dyn_trait(rdm);\n        }\n\n        // Restore `bound_lifetime_depth` to outside the binder.\n        rdm->bound_lifetime_depth = old_bound_lifetime_depth;\n\n        CHECK_OR(eat(rdm, 'L'), return);\n        uint64_t lt = parse_integer_62(rdm);\n        if (lt) {\n            PRINT(\" + \");\n            print_lifetime_from_index(rdm, lt);\n        }\n        break;\n    case 'B': {\n        size_t backref = parse_integer_62(rdm);\n        if (!rdm->skipping_printing) {\n            size_t old_next = rdm->next;\n            rdm->next = backref;\n            demangle_type(rdm);\n            rdm->next = old_next;\n        }\n        break;\n    }\n    default:\n        // Go back to the tag, so `demangle_path` also sees it.\n        rdm->next--;\n        demangle_path(rdm, false);\n    }\n}\n\n/// A trait in a trait object may have some \"existential projections\"\n/// (i.e. associated type bindings) after it, which should be printed\n/// in the `<...>` of the trait, e.g. `dyn Trait<T, U, Assoc=X>`.\n/// To this end, this method will keep the `<...>` of an 'I' path\n/// open, by omitting the `>`, and return `Ok(true)` in that case.\nstatic bool demangle_path_maybe_open_generics(struct rust_demangler *rdm) {\n    bool open = false;\n\n    CHECK_OR(!rdm->errored, return open);\n\n    if (eat(rdm, 'B')) {\n        size_t backref = parse_integer_62(rdm);\n        if (!rdm->skipping_printing) {\n            size_t old_next = rdm->next;\n            rdm->next = backref;\n            open = demangle_path_maybe_open_generics(rdm);\n            rdm->next = old_next;\n        }\n    } else if (eat(rdm, 'I')) {\n        demangle_path(rdm, false);\n        PRINT(\"<\");\n        open = true;\n        for (size_t i = 0; !rdm->errored && !eat(rdm, 'E'); i++) {\n            if (i > 0)\n                PRINT(\", \");\n            demangle_generic_arg(rdm);\n        }\n    } else\n        demangle_path(rdm, false);\n    return open;\n}\n\nstatic void demangle_dyn_trait(struct rust_demangler *rdm) {\n    CHECK_OR(!rdm->errored, return);\n\n    bool open = demangle_path_maybe_open_generics(rdm);\n\n    while (eat(rdm, 'p')) {\n        if (!open)\n            PRINT(\"<\");\n        else\n            PRINT(\", \");\n        open = true;\n\n        struct rust_mangled_ident name = parse_ident(rdm);\n        print_ident(rdm, name);\n        PRINT(\" = \");\n        demangle_type(rdm);\n    }\n\n    if (open)\n        PRINT(\">\");\n}\n\nstatic void demangle_const(struct rust_demangler *rdm, bool in_value) {\n    CHECK_OR(!rdm->errored, return);\n\n    bool opened_brace = false;\n\n    char ty_tag = next(rdm);\n    switch (ty_tag) {\n    case 'p':\n        PRINT(\"_\");\n        break;\n\n    // Unsigned integer types.\n    case 'h':\n    case 't':\n    case 'm':\n    case 'y':\n    case 'o':\n    case 'j':\n        demangle_const_uint(rdm, ty_tag);\n        break;\n\n    case 'a':\n    case 's':\n    case 'l':\n    case 'x':\n    case 'n':\n    case 'i':\n        if (eat(rdm, 'n')) {\n            PRINT(\"-\");\n        }\n        demangle_const_uint(rdm, ty_tag);\n        break;\n\n    case 'b': {\n        struct hex_nibbles hex = parse_hex_nibbles_for_const_uint(rdm);\n        CHECK_OR(!rdm->errored && hex.nibbles_len <= 1, return);\n        uint8_t v = hex.nibbles_len > 0 ? decode_hex_nibble(hex.nibbles[0]) : 0;\n        CHECK_OR(v <= 1, return);\n        PRINT(v == 1 ? \"true\" : \"false\");\n        break;\n    }\n\n    case 'c': {\n        struct hex_nibbles hex = parse_hex_nibbles_for_const_uint(rdm);\n        CHECK_OR(!rdm->errored && hex.nibbles_len <= 6, return);\n\n        uint32_t c = 0;\n        for (size_t i = 0; i < hex.nibbles_len; i++)\n            c = (c << 4) | decode_hex_nibble(hex.nibbles[i]);\n\n        PRINT(\"'\");\n        print_quoted_escaped_char(rdm, '\\'', c);\n        PRINT(\"'\");\n\n        break;\n    }\n\n    case 'e':\n        // NOTE(eddyb) a string literal `\"...\"` has type `&str`, so\n        // to get back the type `str`, `*\"...\"` syntax is needed\n        // (even if that may not be valid in Rust itself).\n        if (!in_value) {\n            opened_brace = true;\n            PRINT(\"{\");\n        }\n        PRINT(\"*\");\n\n        demangle_const_str_literal(rdm);\n        break;\n\n    case 'R':\n    case 'Q':\n        if (ty_tag == 'R' && eat(rdm, 'e')) {\n            // NOTE(eddyb) this prints `\"...\"` instead of `&*\"...\"`, which\n            // is what `Re..._` would imply (see comment for `str` above).\n            demangle_const_str_literal(rdm);\n            break;\n        }\n\n        if (!in_value) {\n            opened_brace = true;\n            PRINT(\"{\");\n        }\n\n        PRINT(\"&\");\n        if (ty_tag != 'R') {\n            PRINT(\"mut \");\n        }\n\n        demangle_const(rdm, true);\n        break;\n\n    case 'A': {\n        if (!in_value) {\n            opened_brace = true;\n            PRINT(\"{\");\n        }\n\n        PRINT(\"[\");\n\n        size_t i = 0;\n        while (!eat(rdm, 'E')) {\n            CHECK_OR(!rdm->errored, return);\n\n            if (i > 0)\n                PRINT(\", \");\n\n            demangle_const(rdm, true);\n\n            i += 1;\n        }\n\n        PRINT(\"]\");\n        break;\n    }\n\n    case 'T': {\n        if (!in_value) {\n            opened_brace = true;\n            PRINT(\"{\");\n        }\n\n        PRINT(\"(\");\n\n        size_t i = 0;\n        while (!eat(rdm, 'E')) {\n            CHECK_OR(!rdm->errored, return);\n\n            if (i > 0)\n                PRINT(\", \");\n\n            demangle_const(rdm, true);\n\n            i += 1;\n        }\n\n        if (i == 1)\n            PRINT(\",\");\n\n        PRINT(\")\");\n        break;\n    }\n\n    case 'V':\n        if (!in_value) {\n            opened_brace = true;\n            PRINT(\"{\");\n        }\n\n        demangle_path(rdm, true);\n\n        switch (next(rdm)) {\n        case 'U':\n            break;\n\n        case 'T': {\n            PRINT(\"(\");\n\n            size_t i = 0;\n            while (!eat(rdm, 'E')) {\n                CHECK_OR(!rdm->errored, return);\n\n                if (i > 0)\n                    PRINT(\", \");\n\n                demangle_const(rdm, true);\n\n                i += 1;\n            }\n\n            PRINT(\")\");\n            break;\n        }\n\n        case 'S': {\n            PRINT(\" { \");\n\n            size_t i = 0;\n            while (!eat(rdm, 'E')) {\n                CHECK_OR(!rdm->errored, return);\n\n                if (i > 0)\n                    PRINT(\", \");\n\n                parse_disambiguator(rdm);\n\n                struct rust_mangled_ident name = parse_ident(rdm);\n                print_ident(rdm, name);\n\n                PRINT(\": \");\n\n                demangle_const(rdm, true);\n\n                i += 1;\n            }\n\n            PRINT(\" }\");\n            break;\n        }\n\n        default:\n            ERROR_AND(return);\n        }\n\n        break;\n\n    case 'B': {\n        size_t backref = parse_integer_62(rdm);\n        if (!rdm->skipping_printing) {\n            size_t old_next = rdm->next;\n            rdm->next = backref;\n            demangle_const(rdm, in_value);\n            rdm->next = old_next;\n        }\n        break;\n    }\n\n    default:\n        ERROR_AND(return);\n    }\n\n    if (opened_brace) {\n        PRINT(\"}\");\n    }\n}\n\nstatic void demangle_const_uint(struct rust_demangler *rdm, char ty_tag) {\n    CHECK_OR(!rdm->errored, return);\n\n    struct hex_nibbles hex = parse_hex_nibbles_for_const_uint(rdm);\n    CHECK_OR(!rdm->errored, return);\n\n    // Print anything that doesn't fit in `uint64_t` verbatim.\n    if (hex.nibbles_len > 16) {\n        PRINT(\"0x\");\n        print_str(rdm, hex.nibbles, hex.nibbles_len);\n    } else {\n        uint64_t v = 0;\n        for (size_t i = 0; i < hex.nibbles_len; i++)\n            v = (v << 4) | decode_hex_nibble(hex.nibbles[i]);\n        print_uint64(rdm, v);\n    }\n\n    if (rdm->verbose)\n        PRINT(basic_type(ty_tag));\n}\n\n// UTF-8 uses an unary encoding for its \"length\" field (`1`s followed by a `0`).\nstruct utf8_byte {\n    // Decoded \"length\" field of an UTF-8 byte, including the special cases:\n    // - `0` indicates this is a lone ASCII byte\n    // - `1` indicates a continuation byte (cannot start an UTF-8 sequence)\n    size_t seq_len;\n\n    // Remaining (`payload_width`) bits in the UTF-8 byte, contributing to\n    // the Unicode scalar value being encoded in the UTF-8 sequence.\n    uint8_t payload;\n    size_t payload_width;\n};\nstatic struct utf8_byte utf8_decode(uint8_t byte) {\n    struct utf8_byte utf8;\n\n    utf8.seq_len = 0;\n    utf8.payload = byte;\n    utf8.payload_width = 8;\n\n    // FIXME(eddyb) figure out if using \"count leading ones/zeros\" is an option.\n    while (utf8.seq_len <= 6) {\n        uint8_t msb = 0x80 >> utf8.seq_len;\n        utf8.payload &= ~msb;\n        utf8.payload_width--;\n        if ((byte & msb) == 0)\n            break;\n        utf8.seq_len++;\n    }\n\n    return utf8;\n}\n\nstatic void demangle_const_str_literal(struct rust_demangler *rdm) {\n    CHECK_OR(!rdm->errored, return);\n\n    struct hex_nibbles hex = parse_hex_nibbles_for_const_bytes(rdm);\n    CHECK_OR(!rdm->errored, return);\n\n    PRINT(\"\\\"\");\n    for (size_t i = 0; i < hex.nibbles_len; i += 2) {\n        struct utf8_byte utf8 = utf8_decode(\n            (decode_hex_nibble(hex.nibbles[i]) << 4) |\n            decode_hex_nibble(hex.nibbles[i + 1])\n        );\n        uint32_t c = utf8.payload;\n        if (utf8.seq_len > 0) {\n            CHECK_OR(utf8.seq_len >= 2 && utf8.seq_len <= 4, return);\n            for (size_t extra = utf8.seq_len - 1; extra > 0; extra--) {\n                i += 2;\n                utf8 = utf8_decode(\n                    (decode_hex_nibble(hex.nibbles[i]) << 4) |\n                    decode_hex_nibble(hex.nibbles[i + 1])\n                );\n                CHECK_OR(utf8.seq_len == 1, return);\n                c = (c << utf8.payload_width) | utf8.payload;\n            }\n        }\n        print_quoted_escaped_char(rdm, '\"', c);\n    }\n    PRINT(\"\\\"\");\n}\n\nstatic bool is_rust_hash(struct rust_mangled_ident name) {\n    if (name.ascii[0] != 'h') {\n        return false;\n    }\n    for (size_t i = 1; i < name.ascii_len; i++) {\n        if (!IS_DIGIT(name.ascii[i]) &&\n            !(name.ascii[i] >= 'a' && name.ascii[i] <= 'f')) {\n            return false;\n        }\n    }\n    return true;\n}\n\nstatic void print_legacy_ident(\n    struct rust_demangler *rdm, struct rust_mangled_ident ident\n) {\n    if (rdm->errored || rdm->skipping_printing)\n        return;\n\n    CHECK_OR(!ident.punycode, return);\n\n    if (ident.ascii[0] == '_' && ident.ascii[1] == '$') {\n        ident.ascii += 1;\n        ident.ascii_len -= 1;\n    }\n\n    while (1) {\n        if (ident.ascii_len == 0) {\n            break;\n        } else if (ident.ascii[0] == '.') {\n            if (ident.ascii_len >= 2 && ident.ascii[1] == '.') {\n                PRINT(\"::\");\n                ident.ascii += 2;\n                ident.ascii_len -= 2;\n            } else {\n                PRINT(\".\");\n                ident.ascii += 1;\n                ident.ascii_len -= 1;\n            }\n        } else if (ident.ascii[0] == '$') {\n            const char *end_ptr =\n                (const char *)memchr(&ident.ascii[1], '$', ident.ascii_len - 1);\n            if (!end_ptr)\n                break;\n            const char *escape = &ident.ascii[1];\n            size_t escape_len = end_ptr - escape;\n\n            if (strncmp(escape, \"SP\", 2) == 0) {\n                PRINT(\"@\");\n            } else if (strncmp(escape, \"BP\", 2) == 0) {\n                PRINT(\"*\");\n            } else if (strncmp(escape, \"RF\", 2) == 0) {\n                PRINT(\"&\");\n            } else if (strncmp(escape, \"LT\", 2) == 0) {\n                PRINT(\"<\");\n            } else if (strncmp(escape, \"GT\", 2) == 0) {\n                PRINT(\">\");\n            } else if (strncmp(escape, \"LP\", 2) == 0) {\n                PRINT(\"(\");\n            } else if (strncmp(escape, \"RP\", 2) == 0) {\n                PRINT(\")\");\n            } else if (strncmp(escape, \"C\", 1) == 0) {\n                PRINT(\",\");\n            } else {\n                if (escape[0] != 'u') {\n                    break;\n                }\n\n                const char *digits = &escape[1];\n                size_t digits_len = escape_len - 1;\n\n                bool invalid = false;\n                for (size_t i = 1; i < digits_len; i++) {\n                    if (!IS_DIGIT(digits[i]) &&\n                        !(digits[i] >= 'a' && digits[i] <= 'f')) {\n                        invalid = true;\n                        break;\n                    }\n                }\n                if (invalid)\n                    break;\n\n                struct hex_nibbles hex;\n\n                hex.nibbles = digits;\n                hex.nibbles_len = digits_len;\n\n                uint32_t c = 0;\n                for (size_t i = 0; i < hex.nibbles_len; i++)\n                    c = (c << 4) | decode_hex_nibble(hex.nibbles[i]);\n\n                if (!(c < 0xd800 || (c > 0xdfff && c < 0x10ffff))) {\n                    break; // Not a valid unicode scalar\n                }\n\n                if (c >= 0x20 && c <= 0x7e) {\n                    // Printable ASCII\n                    char v = (char)c;\n                    print_str(rdm, &v, 1);\n                } else {\n                    // FIXME show printable unicode characters without hex\n                    // encoding\n                    PRINT(\"\\\\u{\");\n                    char s[9] = {0};\n                    sprintf(s, \"%\" PRIx32, c);\n                    PRINT(s);\n                    PRINT(\"}\");\n                }\n            }\n\n            ident.ascii += escape_len + 2;\n            ident.ascii_len -= escape_len + 2;\n        } else {\n            bool found = false;\n            for (size_t i = 0; i < ident.ascii_len; i++) {\n                if (ident.ascii[i] == '$' || ident.ascii[i] == '.') {\n                    print_str(rdm, ident.ascii, i);\n                    ident.ascii += i;\n                    ident.ascii_len -= i;\n                    found = true;\n                    break;\n                }\n            }\n            if (!found) {\n                break;\n            }\n        }\n    }\n\n    print_str(rdm, ident.ascii, ident.ascii_len);\n}\n\nstatic void demangle_legacy_path(struct rust_demangler *rdm) {\n    bool first = true;\n\n    while (1) {\n        if (eat(rdm, 'E')) {\n            // FIXME Maybe check if at end of symbol?\n            return;\n        }\n\n        struct rust_mangled_ident name = parse_ident(rdm);\n\n        if (!rdm->verbose && peek(rdm) == 'E' && is_rust_hash(name)) {\n            // Skip printing the hash if verbose mode is disabled.\n            eat(rdm, 'E');\n            break;\n        }\n\n        if (!first) {\n            PRINT(\"::\");\n        }\n        first = false;\n\n        print_legacy_ident(rdm, name);\n\n        CHECK_OR(!rdm->errored, return);\n    }\n}\n\nbool rust_demangle_with_callback(\n    const char *whole_mangled_symbol, int flags,\n    void (*callback)(const char *data, size_t len, void *opaque), void *opaque\n) {\n    struct rust_demangler rdm;\n\n    rdm.sym = whole_mangled_symbol;\n    rdm.sym_len = 0;\n\n    rdm.callback_opaque = opaque;\n    rdm.callback = callback;\n\n    rdm.next = 0;\n    rdm.errored = false;\n    rdm.skipping_printing = false;\n    rdm.verbose = (flags & RUST_DEMANGLE_FLAG_VERBOSE) != 0;\n    rdm.version = -2; // Invalid version\n    rdm.bound_lifetime_depth = 0;\n\n    // Rust symbols always start with R, _R or __R for the v0 scheme or ZN, _ZN\n    // or __ZN for the legacy scheme.\n    if (strncmp(rdm.sym, \"_R\", 2) == 0) {\n        rdm.sym += 2;\n        rdm.version = 0; // v0\n    } else if (rdm.sym[0] == 'R') {\n        // On Windows, dbghelp strips leading underscores, so we accept \"R...\"\n        // form too.\n        rdm.sym += 1;\n        rdm.version = 0; // v0\n    } else if (strncmp(rdm.sym, \"__R\", 3) == 0) {\n        // On OSX, symbols are prefixed with an extra _\n        rdm.sym += 3;\n        rdm.version = 0; // v0\n    } else if (strncmp(rdm.sym, \"_ZN\", 3) == 0) {\n        rdm.sym += 3;\n        rdm.version = -1; // legacy\n    } else if (strncmp(rdm.sym, \"ZN\", 2) == 0) {\n        // On Windows, dbghelp strips leading underscores, so we accept \"R...\"\n        // form too.\n        rdm.sym += 2;\n        rdm.version = -1; // legacy\n    } else if (strncmp(rdm.sym, \"__ZN\", 4) == 0) {\n        // On OSX, symbols are prefixed with an extra _\n        rdm.sym += 4;\n        rdm.version = -1; // legacy\n    } else {\n        return false;\n    }\n\n    if (rdm.version != -1) {\n        // Paths always start with uppercase characters.\n        if (!IS_UPPER(rdm.sym[0]))\n            return false;\n    }\n\n    // Rust symbols only use ASCII characters.\n    for (const char *p = rdm.sym; *p; p++) {\n        if ((*p & 0x80) != 0)\n            return false;\n\n        if (*p == '.' && strncmp(p, \".llvm.\", 6) == 0) {\n            // Ignore .llvm.<hash> suffixes\n            break;\n        }\n\n        rdm.sym_len++;\n    }\n\n    if (rdm.version == -1) {\n        demangle_legacy_path(&rdm);\n    } else {\n        demangle_path(&rdm, true);\n\n        // Skip instantiating crate.\n        if (!rdm.errored && rdm.next < rdm.sym_len && peek(&rdm) >= 'A' &&\n            peek(&rdm) <= 'Z') {\n            rdm.skipping_printing = true;\n            demangle_path(&rdm, false);\n        }\n    }\n\n    if (!rdm.errored && (rdm.sym_len - rdm.next > 0)) {\n        for (const char *p = rdm.sym + rdm.next; *p; p++) {\n            // FIXME match is_symbol_like from rustc-demangle\n            if (!((*p >= 'a' && *p <= 'z') || (*p >= 'A' && *p <= 'Z') ||\n                  (*p >= '0' && *p <= '9') || *p == '.')) {\n                // Suffix is not a symbol like string\n                return false;\n            }\n        }\n\n        // Print LLVM produced suffix\n        print_str(&rdm, rdm.sym + rdm.next, rdm.sym_len - rdm.next);\n    }\n\n    return !rdm.errored;\n}\n\n// Growable string buffers.\nstruct str_buf {\n    char *ptr;\n    size_t len;\n    size_t cap;\n    bool errored;\n};\n\nstatic void str_buf_reserve(struct str_buf *buf, size_t extra) {\n    // Allocation failed before.\n    if (buf->errored)\n        return;\n\n    size_t available = buf->cap - buf->len;\n\n    if (extra <= available)\n        return;\n\n    size_t min_new_cap = buf->cap + (extra - available);\n\n    // Check for overflows.\n    if (min_new_cap < buf->cap) {\n        buf->errored = true;\n        return;\n    }\n\n    size_t new_cap = buf->cap;\n\n    if (new_cap == 0)\n        new_cap = 4;\n\n    // Double capacity until sufficiently large.\n    while (new_cap < min_new_cap) {\n        new_cap *= 2;\n\n        // Check for overflows.\n        if (new_cap < buf->cap) {\n            buf->errored = true;\n            return;\n        }\n    }\n\n    char *new_ptr = (char *)realloc(buf->ptr, new_cap);\n    if (new_ptr == NULL) {\n        free(buf->ptr);\n        buf->ptr = NULL;\n        buf->len = 0;\n        buf->cap = 0;\n        buf->errored = true;\n    } else {\n        buf->ptr = new_ptr;\n        buf->cap = new_cap;\n    }\n}\n\nstatic void str_buf_append(struct str_buf *buf, const char *data, size_t len) {\n    str_buf_reserve(buf, len);\n    if (buf->errored)\n        return;\n\n    memcpy(buf->ptr + buf->len, data, len);\n    buf->len += len;\n}\n\nstatic void\nstr_buf_demangle_callback(const char *data, size_t len, void *opaque) {\n    str_buf_append(opaque, data, len);\n}\n\nchar *rust_demangle(const char *mangled, int flags) {\n    struct str_buf out;\n\n    out.ptr = NULL;\n    out.len = 0;\n    out.cap = 0;\n    out.errored = false;\n\n    bool success = rust_demangle_with_callback(\n        mangled, flags, str_buf_demangle_callback, &out\n    );\n\n    if (!success) {\n        free(out.ptr);\n        return NULL;\n    }\n\n    str_buf_append(&out, \"\\0\", 1);\n    return out.ptr;\n}\n"
  },
  {
    "path": "third-party/rust-demangle/rust-demangle.h",
    "content": "#include <stdbool.h>\n#include <stddef.h>\n\n#define RUST_DEMANGLE_FLAG_VERBOSE 1\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nbool rust_demangle_with_callback(\n    const char *mangled, int flags,\n    void (*callback)(const char *data, size_t len, void *opaque), void *opaque\n);\nchar *rust_demangle(const char *mangled, int flags);\n\n#ifdef __cplusplus\n}\n#endif\n"
  },
  {
    "path": "third-party/rust-demangle/test-harness/Cargo.toml",
    "content": "[package]\nname = \"rust-demangle-c-test-harness\"\nversion = \"0.0.0\"\nlicense = \"MIT OR Apache-2.0\"\nedition = \"2021\"\npublish = false\n\n# Tests go into `tests/`, not in `src/`.\n[lib]\ntest = false\ndoctest = false\n\n[dependencies]\nrustc-demangle = \"0.1.21\"\n\n[build-dependencies]\ncc = \"1.0\"\n"
  },
  {
    "path": "third-party/rust-demangle/test-harness/build.rs",
    "content": "fn main() {\n    let src = \"../rust-demangle.c\";\n    let header = \"../rust-demangle.h\";\n    println!(\"cargo:rerun-if-changed={}\", src);\n    println!(\"cargo:rerun-if-changed={}\", header);\n\n    cc::Build::new()\n        .file(\"../rust-demangle.c\")\n        .flag_if_supported(\"-std=c99\")\n        .flag_if_supported(\"-pedantic\")\n        .warnings(true)\n        .warnings_into_errors(true)\n        .flag_if_supported(\"-Werror=uninitialized\")\n        .compile(\"rust-demangle\");\n}\n"
  },
  {
    "path": "third-party/rust-demangle/test-harness/examples/check-csv-dataset.rs",
    "content": "use std::env;\nuse std::fs::File;\nuse std::io::prelude::*;\nuse std::io::BufReader;\nuse std::path::PathBuf;\n\nuse rust_demangle_c_test_harness::demangle;\n\n// HACK(eddyb) this is only an `example` so that `cargo run` doesn't do anything.\n// FIXME(eddyb) document this better and provide datasets for it.\nfn main() {\n    let header = \"legacy+generics,legacy,mw,mw+compression,v0,v0+compression\";\n\n    for path in env::args_os().skip(1).map(PathBuf::from) {\n        let mut lines = BufReader::new(File::open(path).unwrap())\n            .lines()\n            .map(|l| l.unwrap());\n\n        assert_eq!(lines.next().unwrap(), header);\n\n        for line in lines {\n            for mangling in line.split(',').skip(4) {\n                for verbose in [false, true] {\n                    demangle(mangling).to_string_maybe_verbose(verbose);\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "third-party/rust-demangle/test-harness/src/lib.rs",
    "content": "use std::fmt;\n\n// HACK(eddyb) helper macros for tests.\n#[macro_export]\nmacro_rules! assert_contains {\n    ($s:expr, $needle:expr) => {{\n        let (s, needle) = ($s, $needle);\n        assert!(\n            s.contains(needle),\n            \"{:?} should've contained {:?}\",\n            s,\n            needle\n        );\n    }};\n}\n#[macro_export]\nmacro_rules! assert_ends_with {\n    ($s:expr, $suffix:expr) => {{\n        let (s, suffix) = ($s, $suffix);\n        assert!(\n            s.ends_with(suffix),\n            \"{:?} should've ended in {:?}\",\n            s,\n            suffix\n        );\n    }};\n}\n\n/// `rustc_demangle::Demangle` wrapper that will also attempt demanging with\n/// `rust-demangle.c`'s `rust_demangle` when formatted, and assert equality.\n///\n/// The reason this mimics `rustc_demangle`'s API is to allow its tests to be\n/// reused without rewriting them (which could risk introducing bugs).\npub struct Demangle<'a> {\n    // NOTE(eddyb) we don't trust `rustc_demangle` to keep the original string\n    // unmodified, as if it e.g. strips suffixes early, it could hide the fact\n    // that the C port doesn't have that sort of thing supported yet.\n    original: &'a str,\n\n    rustc_demangle: rustc_demangle::Demangle<'a>,\n}\n\npub fn demangle(s: &str) -> Demangle {\n    Demangle {\n        original: s,\n        rustc_demangle: rustc_demangle::demangle(s),\n    }\n}\n\npub fn try_demangle(s: &str) -> Result<Demangle<'_>, rustc_demangle::TryDemangleError> {\n    match rustc_demangle::try_demangle(s) {\n        Ok(d) => Ok(Demangle {\n            original: s,\n            rustc_demangle: d,\n        }),\n        Err(e) => {\n            assert!(demangle_via_c(s, false).is_err());\n\n            Err(e)\n        }\n    }\n}\n\nimpl fmt::Display for Demangle<'_> {\n    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n        f.write_str(&self.to_string_maybe_verbose(!f.alternate()))\n    }\n}\n\n// HACK(eddyb) the C port doesn't have the \"is printable Unicode\" heuristic,\n// to avoid having to include the non-trivial amount of data that requires,\n// so instead we allow mismatches when `b` has more `\\u{...}` escapes than `a`.\nfn equal_modulo_unicode_escapes(a: &str, b: &str) -> bool {\n    let mut a_chars = a.chars();\n    let mut a_active_escape: Option<std::char::EscapeUnicode> = None;\n    let mut b_chars = b.chars();\n    loop {\n        let a_ch = a_active_escape\n            .as_mut()\n            .and_then(|escape| escape.next())\n            .or_else(|| {\n                a_active_escape = None;\n                a_chars.next()\n            });\n        let b_ch = b_chars.next();\n        match (a_ch, b_ch) {\n            (Some(a_ch), Some(b_ch)) if a_ch == b_ch => {}\n            // Compare with the `\\u{...}` escape instead, if possible.\n            (Some(a_ch), Some('\\\\')) if a_active_escape.is_none() => {\n                let mut escape = a_ch.escape_unicode();\n                assert_eq!(escape.next(), Some('\\\\'));\n                a_active_escape = Some(escape);\n            }\n            (None, None) => return true,\n            _ => return false,\n        }\n    }\n}\n\nimpl Demangle<'_> {\n    pub fn to_string_maybe_verbose(&self, verbose: bool) -> String {\n        let rust = if verbose {\n            format!(\"{}\", self.rustc_demangle)\n        } else {\n            format!(\"{:#}\", self.rustc_demangle)\n        };\n        let c = demangle_via_c(self.original, verbose).unwrap_or_else(|_| self.original.to_owned());\n        if rust != c && !equal_modulo_unicode_escapes(&rust, &c) {\n            panic!(\n                \"Rust vs C demangling difference:\\\n            \\n mangled: {mangled:?}\\\n            \\n    rust: {rust:?}\\\n            \\n       c: {c:?}\\\n            \\n\",\n                mangled = self.original\n            );\n        }\n\n        rust\n    }\n}\n\nfn demangle_via_c(mangled: &str, verbose: bool) -> Result<String, ()> {\n    use std::ffi::{CStr, CString};\n    use std::os::raw::c_char;\n\n    extern \"C\" {\n        fn rust_demangle(mangled: *const c_char, flags: i32) -> *mut c_char;\n        fn free(ptr: *mut c_char);\n    }\n\n    let flags = if verbose { 1 } else { 0 };\n    let Ok(mangled) = CString::new(mangled) else {\n        // C can't handle strings containing nul bytes\n        return Err(());\n    };\n    let out = unsafe { rust_demangle(mangled.as_ptr(), flags) };\n    if out.is_null() {\n        Err(())\n    } else {\n        unsafe {\n            let s = CStr::from_ptr(out).to_string_lossy().into_owned();\n            free(out);\n            Ok(s)\n        }\n    }\n}\n"
  },
  {
    "path": "third-party/rust-demangle/test-harness/tests/legacy.rs",
    "content": "//! Tests copied from `https://github.com/rust-lang/rustc-demangle`'s\n//! `src/legacy.rs` at `fd906f850f90f6d4845c7b8219d218293e0ab3ed`.\n//!\n//! These are the only changes made to the tests:\n//! * `::` absolute paths -> `rust_demangle_c_test_harness::`\n//! * `#[should_panic]` was added to tests that don't pass yet\n\nmacro_rules! t {\n    ($a:expr, $b:expr) => {\n        assert!(ok($a, $b))\n    };\n}\n\nmacro_rules! t_err {\n    ($a:expr) => {\n        assert!(ok_err($a))\n    };\n}\n\nmacro_rules! t_nohash {\n    ($a:expr, $b:expr) => {{\n        assert_eq!(\n            format!(\"{:#}\", rust_demangle_c_test_harness::demangle($a)),\n            $b\n        );\n    }};\n}\n\nfn ok(sym: &str, expected: &str) -> bool {\n    match rust_demangle_c_test_harness::try_demangle(sym) {\n        Ok(s) => {\n            if s.to_string() == expected {\n                true\n            } else {\n                println!(\"\\n{}\\n!=\\n{}\\n\", s, expected);\n                false\n            }\n        }\n        Err(_) => {\n            println!(\"error demangling\");\n            false\n        }\n    }\n}\n\nfn ok_err(sym: &str) -> bool {\n    match rust_demangle_c_test_harness::try_demangle(sym) {\n        Ok(_) => {\n            println!(\"succeeded in demangling\");\n            false\n        }\n        Err(_) => rust_demangle_c_test_harness::demangle(sym).to_string() == sym,\n    }\n}\n\n#[test]\nfn demangle() {\n    t_err!(\"test\");\n    t!(\"_ZN4testE\", \"test\");\n    t_err!(\"_ZN4test\");\n    t!(\"_ZN4test1a2bcE\", \"test::a::bc\");\n}\n\n#[test]\nfn demangle_dollars() {\n    t!(\"_ZN4$RP$E\", \")\");\n    t!(\"_ZN8$RF$testE\", \"&test\");\n    t!(\"_ZN8$BP$test4foobE\", \"*test::foob\");\n    t!(\"_ZN9$u20$test4foobE\", \" test::foob\");\n    t!(\"_ZN35Bar$LT$$u5b$u32$u3b$$u20$4$u5d$$GT$E\", \"Bar<[u32; 4]>\");\n}\n\n#[test]\nfn demangle_many_dollars() {\n    t!(\"_ZN13test$u20$test4foobE\", \"test test::foob\");\n    t!(\"_ZN12test$BP$test4foobE\", \"test*test::foob\");\n}\n\n#[test]\nfn demangle_osx() {\n    t!(\n        \"__ZN5alloc9allocator6Layout9for_value17h02a996811f781011E\",\n        \"alloc::allocator::Layout::for_value::h02a996811f781011\"\n    );\n    t!(\"__ZN38_$LT$core..option..Option$LT$T$GT$$GT$6unwrap18_MSG_FILE_LINE_COL17haf7cb8d5824ee659E\", \"<core::option::Option<T>>::unwrap::_MSG_FILE_LINE_COL::haf7cb8d5824ee659\");\n    t!(\"__ZN4core5slice89_$LT$impl$u20$core..iter..traits..IntoIterator$u20$for$u20$$RF$$u27$a$u20$$u5b$T$u5d$$GT$9into_iter17h450e234d27262170E\", \"core::slice::<impl core::iter::traits::IntoIterator for &'a [T]>::into_iter::h450e234d27262170\");\n}\n\n#[test]\nfn demangle_windows() {\n    t!(\"ZN4testE\", \"test\");\n    t!(\"ZN13test$u20$test4foobE\", \"test test::foob\");\n    t!(\"ZN12test$RF$test4foobE\", \"test&test::foob\");\n}\n\n#[test]\nfn demangle_elements_beginning_with_underscore() {\n    t!(\"_ZN13_$LT$test$GT$E\", \"<test>\");\n    t!(\"_ZN28_$u7b$$u7b$closure$u7d$$u7d$E\", \"{{closure}}\");\n    t!(\"_ZN15__STATIC_FMTSTRE\", \"__STATIC_FMTSTR\");\n}\n\n#[test]\nfn demangle_trait_impls() {\n    t!(\n        \"_ZN71_$LT$Test$u20$$u2b$$u20$$u27$static$u20$as$u20$foo..Bar$LT$Test$GT$$GT$3barE\",\n        \"<Test + 'static as foo::Bar<Test>>::bar\"\n    );\n}\n\n#[test]\nfn demangle_without_hash() {\n    let s = \"_ZN3foo17h05af221e174051e9E\";\n    t!(s, \"foo::h05af221e174051e9\");\n    t_nohash!(s, \"foo\");\n}\n\n#[test]\nfn demangle_without_hash_edgecases() {\n    // One element, no hash.\n    t_nohash!(\"_ZN3fooE\", \"foo\");\n    // Two elements, no hash.\n    t_nohash!(\"_ZN3foo3barE\", \"foo::bar\");\n    // Longer-than-normal hash.\n    t_nohash!(\"_ZN3foo20h05af221e174051e9abcE\", \"foo\");\n    // Shorter-than-normal hash.\n    t_nohash!(\"_ZN3foo5h05afE\", \"foo\");\n    // Valid hash, but not at the end.\n    t_nohash!(\"_ZN17h05af221e174051e93fooE\", \"h05af221e174051e9::foo\");\n    // Not a valid hash, missing the 'h'.\n    t_nohash!(\"_ZN3foo16ffaf221e174051e9E\", \"foo::ffaf221e174051e9\");\n    // Not a valid hash, has a non-hex-digit.\n    t_nohash!(\"_ZN3foo17hg5af221e174051e9E\", \"foo::hg5af221e174051e9\");\n}\n\n#[test]\nfn demangle_thinlto() {\n    // One element, no hash.\n    t!(\"_ZN3fooE.llvm.9D1C9369\", \"foo\");\n    t!(\"_ZN3fooE.llvm.9D1C9369@@16\", \"foo\");\n    t_nohash!(\n        \"_ZN9backtrace3foo17hbb467fcdaea5d79bE.llvm.A5310EB9\",\n        \"backtrace::foo\"\n    );\n}\n\n#[test]\nfn demangle_llvm_ir_branch_labels() {\n    t!(\"_ZN4core5slice77_$LT$impl$u20$core..ops..index..IndexMut$LT$I$GT$$u20$for$u20$$u5b$T$u5d$$GT$9index_mut17haf9727c2edfbc47bE.exit.i.i\", \"core::slice::<impl core::ops::index::IndexMut<I> for [T]>::index_mut::haf9727c2edfbc47b.exit.i.i\");\n    t_nohash!(\"_ZN4core5slice77_$LT$impl$u20$core..ops..index..IndexMut$LT$I$GT$$u20$for$u20$$u5b$T$u5d$$GT$9index_mut17haf9727c2edfbc47bE.exit.i.i\", \"core::slice::<impl core::ops::index::IndexMut<I> for [T]>::index_mut.exit.i.i\");\n}\n\n#[test]\nfn demangle_ignores_suffix_that_doesnt_look_like_a_symbol() {\n    t_err!(\"_ZN3fooE.llvm moocow\");\n}\n\n#[test]\nfn dont_panic() {\n    rust_demangle_c_test_harness::demangle(\"_ZN2222222222222222222222EE\").to_string();\n    rust_demangle_c_test_harness::demangle(\"_ZN5*70527e27.ll34csaғE\").to_string();\n    rust_demangle_c_test_harness::demangle(\"_ZN5*70527a54.ll34_$b.1E\").to_string();\n    rust_demangle_c_test_harness::demangle(\n        \"\\\n         _ZN5~saäb4e\\n\\\n         2734cOsbE\\n\\\n         5usage20h)3\\0\\0\\0\\0\\0\\0\\07e2734cOsbE\\\n         \",\n    )\n    .to_string();\n}\n\n#[test]\nfn invalid_no_chop() {\n    t_err!(\"_ZNfooE\");\n}\n\n#[test]\nfn handle_assoc_types() {\n    t!(\"_ZN151_$LT$alloc..boxed..Box$LT$alloc..boxed..FnBox$LT$A$C$$u20$Output$u3d$R$GT$$u20$$u2b$$u20$$u27$a$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$9call_once17h69e8f44b3723e1caE\", \"<alloc::boxed::Box<alloc::boxed::FnBox<A, Output=R> + 'a> as core::ops::function::FnOnce<A>>::call_once::h69e8f44b3723e1ca\");\n}\n\n#[test]\nfn handle_bang() {\n    t!(\n        \"_ZN88_$LT$core..result..Result$LT$$u21$$C$$u20$E$GT$$u20$as$u20$std..process..Termination$GT$6report17hfc41d0da4a40b3e8E\",\n        \"<core::result::Result<!, E> as std::process::Termination>::report::hfc41d0da4a40b3e8\"\n    );\n}\n\n#[test]\nfn demangle_utf8_idents() {\n    t_nohash!(\n        \"_ZN11utf8_idents157_$u10e1$$u10d0$$u10ed$$u10db$$u10d4$$u10da$$u10d0$$u10d3$_$u10d2$$u10d4$$u10db$$u10e0$$u10d8$$u10d4$$u10da$$u10d8$_$u10e1$$u10d0$$u10d3$$u10d8$$u10da$$u10d8$17h21634fd5714000aaE\",\n        \"utf8_idents::საჭმელად_გემრიელი_სადილი\"\n    );\n}\n\n#[test]\nfn demangle_issue_60925() {\n    t_nohash!(\n        \"_ZN11issue_609253foo37Foo$LT$issue_60925..llv$u6d$..Foo$GT$3foo17h059a991a004536adE\",\n        \"issue_60925::foo::Foo<issue_60925::llvm::Foo>::foo\"\n    );\n}\n"
  },
  {
    "path": "third-party/rust-demangle/test-harness/tests/top_level.rs",
    "content": "//! Tests copied from `https://github.com/rust-lang/rustc-demangle`'s\n//! `src/lib.rs` at `fd906f850f90f6d4845c7b8219d218293e0ab3ed`.\n//!\n//! These are the only changes made to the tests:\n//! * `super::` paths -> `rust_demangle_c_test_harness::`\n//! * `#[ignore = \"stack overflow\"]` was added to tests that overflow the stack\n//! * `#[should_panic]` was added to tests that don't pass yet\n\nuse rust_demangle_c_test_harness::{assert_contains, assert_ends_with};\n\nmacro_rules! t {\n    ($a:expr, $b:expr) => {\n        assert!(ok($a, $b))\n    };\n}\n\nmacro_rules! t_err {\n    ($a:expr) => {\n        assert!(ok_err($a))\n    };\n}\n\nmacro_rules! t_nohash {\n    ($a:expr, $b:expr) => {{\n        assert_eq!(\n            format!(\"{:#}\", rust_demangle_c_test_harness::demangle($a)),\n            $b\n        );\n    }};\n}\n\nfn ok(sym: &str, expected: &str) -> bool {\n    match rust_demangle_c_test_harness::try_demangle(sym) {\n        Ok(s) => {\n            if s.to_string() == expected {\n                true\n            } else {\n                println!(\"\\n{}\\n!=\\n{}\\n\", s, expected);\n                false\n            }\n        }\n        Err(_) => {\n            println!(\"error demangling\");\n            false\n        }\n    }\n}\n\nfn ok_err(sym: &str) -> bool {\n    match rust_demangle_c_test_harness::try_demangle(sym) {\n        Ok(_) => {\n            println!(\"succeeded in demangling\");\n            false\n        }\n        Err(_) => rust_demangle_c_test_harness::demangle(sym).to_string() == sym,\n    }\n}\n\n#[test]\nfn demangle() {\n    t_err!(\"test\");\n    t!(\"_ZN4testE\", \"test\");\n    t_err!(\"_ZN4test\");\n    t!(\"_ZN4test1a2bcE\", \"test::a::bc\");\n}\n\n#[test]\nfn demangle_dollars() {\n    t!(\"_ZN4$RP$E\", \")\");\n    t!(\"_ZN8$RF$testE\", \"&test\");\n    t!(\"_ZN8$BP$test4foobE\", \"*test::foob\");\n    t!(\"_ZN9$u20$test4foobE\", \" test::foob\");\n    t!(\"_ZN35Bar$LT$$u5b$u32$u3b$$u20$4$u5d$$GT$E\", \"Bar<[u32; 4]>\");\n}\n\n#[test]\nfn demangle_many_dollars() {\n    t!(\"_ZN13test$u20$test4foobE\", \"test test::foob\");\n    t!(\"_ZN12test$BP$test4foobE\", \"test*test::foob\");\n}\n\n#[test]\nfn demangle_osx() {\n    t!(\n        \"__ZN5alloc9allocator6Layout9for_value17h02a996811f781011E\",\n        \"alloc::allocator::Layout::for_value::h02a996811f781011\"\n    );\n    t!(\"__ZN38_$LT$core..option..Option$LT$T$GT$$GT$6unwrap18_MSG_FILE_LINE_COL17haf7cb8d5824ee659E\", \"<core::option::Option<T>>::unwrap::_MSG_FILE_LINE_COL::haf7cb8d5824ee659\");\n    t!(\"__ZN4core5slice89_$LT$impl$u20$core..iter..traits..IntoIterator$u20$for$u20$$RF$$u27$a$u20$$u5b$T$u5d$$GT$9into_iter17h450e234d27262170E\", \"core::slice::<impl core::iter::traits::IntoIterator for &'a [T]>::into_iter::h450e234d27262170\");\n}\n\n#[test]\nfn demangle_windows() {\n    t!(\"ZN4testE\", \"test\");\n    t!(\"ZN13test$u20$test4foobE\", \"test test::foob\");\n    t!(\"ZN12test$RF$test4foobE\", \"test&test::foob\");\n}\n\n#[test]\nfn demangle_elements_beginning_with_underscore() {\n    t!(\"_ZN13_$LT$test$GT$E\", \"<test>\");\n    t!(\"_ZN28_$u7b$$u7b$closure$u7d$$u7d$E\", \"{{closure}}\");\n    t!(\"_ZN15__STATIC_FMTSTRE\", \"__STATIC_FMTSTR\");\n}\n\n#[test]\nfn demangle_trait_impls() {\n    t!(\n        \"_ZN71_$LT$Test$u20$$u2b$$u20$$u27$static$u20$as$u20$foo..Bar$LT$Test$GT$$GT$3barE\",\n        \"<Test + 'static as foo::Bar<Test>>::bar\"\n    );\n}\n\n#[test]\nfn demangle_without_hash() {\n    let s = \"_ZN3foo17h05af221e174051e9E\";\n    t!(s, \"foo::h05af221e174051e9\");\n    t_nohash!(s, \"foo\");\n}\n\n#[test]\nfn demangle_without_hash_edgecases() {\n    // One element, no hash.\n    t_nohash!(\"_ZN3fooE\", \"foo\");\n    // Two elements, no hash.\n    t_nohash!(\"_ZN3foo3barE\", \"foo::bar\");\n    // Longer-than-normal hash.\n    t_nohash!(\"_ZN3foo20h05af221e174051e9abcE\", \"foo\");\n    // Shorter-than-normal hash.\n    t_nohash!(\"_ZN3foo5h05afE\", \"foo\");\n    // Valid hash, but not at the end.\n    t_nohash!(\"_ZN17h05af221e174051e93fooE\", \"h05af221e174051e9::foo\");\n    // Not a valid hash, missing the 'h'.\n    t_nohash!(\"_ZN3foo16ffaf221e174051e9E\", \"foo::ffaf221e174051e9\");\n    // Not a valid hash, has a non-hex-digit.\n    t_nohash!(\"_ZN3foo17hg5af221e174051e9E\", \"foo::hg5af221e174051e9\");\n}\n\n#[test]\nfn demangle_thinlto() {\n    // One element, no hash.\n    t!(\"_ZN3fooE.llvm.9D1C9369\", \"foo\");\n    t!(\"_ZN3fooE.llvm.9D1C9369@@16\", \"foo\");\n    t_nohash!(\n        \"_ZN9backtrace3foo17hbb467fcdaea5d79bE.llvm.A5310EB9\",\n        \"backtrace::foo\"\n    );\n}\n\n#[test]\nfn demangle_llvm_ir_branch_labels() {\n    t!(\"_ZN4core5slice77_$LT$impl$u20$core..ops..index..IndexMut$LT$I$GT$$u20$for$u20$$u5b$T$u5d$$GT$9index_mut17haf9727c2edfbc47bE.exit.i.i\", \"core::slice::<impl core::ops::index::IndexMut<I> for [T]>::index_mut::haf9727c2edfbc47b.exit.i.i\");\n    t_nohash!(\"_ZN4core5slice77_$LT$impl$u20$core..ops..index..IndexMut$LT$I$GT$$u20$for$u20$$u5b$T$u5d$$GT$9index_mut17haf9727c2edfbc47bE.exit.i.i\", \"core::slice::<impl core::ops::index::IndexMut<I> for [T]>::index_mut.exit.i.i\");\n}\n\n#[test]\nfn demangle_ignores_suffix_that_doesnt_look_like_a_symbol() {\n    t_err!(\"_ZN3fooE.llvm moocow\");\n}\n\n#[test]\nfn dont_panic() {\n    rust_demangle_c_test_harness::demangle(\"_ZN2222222222222222222222EE\").to_string();\n    rust_demangle_c_test_harness::demangle(\"_ZN5*70527e27.ll34csaғE\").to_string();\n    rust_demangle_c_test_harness::demangle(\"_ZN5*70527a54.ll34_$b.1E\").to_string();\n    rust_demangle_c_test_harness::demangle(\n        \"\\\n         _ZN5~saäb4e\\n\\\n         2734cOsbE\\n\\\n         5usage20h)3\\0\\0\\0\\0\\0\\0\\07e2734cOsbE\\\n         \",\n    )\n    .to_string();\n}\n\n#[test]\nfn invalid_no_chop() {\n    t_err!(\"_ZNfooE\");\n}\n\n#[test]\nfn handle_assoc_types() {\n    t!(\"_ZN151_$LT$alloc..boxed..Box$LT$alloc..boxed..FnBox$LT$A$C$$u20$Output$u3d$R$GT$$u20$$u2b$$u20$$u27$a$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$9call_once17h69e8f44b3723e1caE\", \"<alloc::boxed::Box<alloc::boxed::FnBox<A, Output=R> + 'a> as core::ops::function::FnOnce<A>>::call_once::h69e8f44b3723e1ca\");\n}\n\n#[test]\nfn handle_bang() {\n    t!(\n        \"_ZN88_$LT$core..result..Result$LT$$u21$$C$$u20$E$GT$$u20$as$u20$std..process..Termination$GT$6report17hfc41d0da4a40b3e8E\",\n        \"<core::result::Result<!, E> as std::process::Termination>::report::hfc41d0da4a40b3e8\"\n    );\n}\n\n// FIXME(eddyb) port recursion limits to C.\n#[ignore = \"stack overflow\"]\n#[test]\nfn limit_recursion() {\n    assert_contains!(\n        rust_demangle_c_test_harness::demangle(\"_RNvB_1a\").to_string(),\n        \"{recursion limit reached}\"\n    );\n    assert_contains!(\n        rust_demangle_c_test_harness::demangle(\"_RMC0RB2_\").to_string(),\n        \"{recursion limit reached}\"\n    );\n}\n\n// FIXME(eddyb) port the relevant functionality to C.\n#[ignore = \"would slowly use up all RAM before being OOM-killed\"]\n#[test]\nfn limit_output_oom_hazard() {\n    assert_ends_with!(\n        rust_demangle_c_test_harness::demangle(\"RYFG_FGyyEvRYFF_EvRYFFEvERLB_B_B_ERLRjB_B_B_\")\n            .to_string(),\n        \"{size limit reached}\"\n    );\n}\n\n// FIXME(eddyb) port the relevant functionality to C.\n#[should_panic]\n#[test]\nfn limit_output() {\n    // NOTE(eddyb) somewhat reduced version of the above, effectively\n    // `<for<...> fn()>` with a larger number of lifetimes in `...`.\n    assert_ends_with!(\n        rust_demangle_c_test_harness::demangle(\"_RMC0FGZZZ_Eu\").to_string(),\n        \"{size limit reached}\"\n    );\n}\n"
  },
  {
    "path": "third-party/rust-demangle/test-harness/tests/v0.rs",
    "content": "//! Tests copied from `https://github.com/rust-lang/rustc-demangle`'s\n//! `src/v0.rs` at `fd906f850f90f6d4845c7b8219d218293e0ab3ed`.\n//!\n//! These are the only changes made to the tests:\n//! * `::` absolute paths -> `rust_demangle_c_test_harness::`\n//! * `#[cfg(unsupported_tests)]` was added to tests that couldn't compile\n//! * `#[ignore = \"stack overflow\"]` was added to tests that overflow the stack\n//! * `#[should_panic]` was added to tests that don't pass yet\n\nuse rust_demangle_c_test_harness::assert_contains;\n\nmacro_rules! t {\n    ($a:expr, $b:expr) => {{\n        assert_eq!(\n            format!(\"{}\", rust_demangle_c_test_harness::demangle($a)),\n            $b\n        );\n    }};\n}\nmacro_rules! t_nohash {\n    ($a:expr, $b:expr) => {{\n        assert_eq!(\n            format!(\"{:#}\", rust_demangle_c_test_harness::demangle($a)),\n            $b\n        );\n    }};\n}\nmacro_rules! t_nohash_type {\n    ($a:expr, $b:expr) => {\n        t_nohash!(concat!(\"_RMC0\", $a), concat!(\"<\", $b, \">\"))\n    };\n}\nmacro_rules! t_const {\n    ($mangled:expr, $value:expr) => {\n        t_nohash!(\n            concat!(\"_RIC0K\", $mangled, \"E\"),\n            concat!(\"::<\", $value, \">\")\n        )\n    };\n}\nmacro_rules! t_const_suffixed {\n    ($mangled:expr, $value:expr, $value_ty_suffix:expr) => {{\n        t_const!($mangled, $value);\n        t!(\n            concat!(\"_RIC0K\", $mangled, \"E\"),\n            concat!(\"[0]::<\", $value, $value_ty_suffix, \">\")\n        );\n    }};\n}\n\n#[test]\nfn demangle_crate_with_leading_digit() {\n    t_nohash!(\"_RNvC6_123foo3bar\", \"123foo::bar\");\n}\n\n#[test]\nfn demangle_utf8_idents() {\n    t_nohash!(\n        \"_RNqCs4fqI2P2rA04_11utf8_identsu30____7hkackfecea1cbdathfdh9hlq6y\",\n        \"utf8_idents::საჭმელად_გემრიელი_სადილი\"\n    );\n}\n\n#[test]\nfn demangle_closure() {\n    t_nohash!(\n        \"_RNCNCNgCs6DXkGYLi8lr_2cc5spawn00B5_\",\n        \"cc::spawn::{closure#0}::{closure#0}\"\n    );\n    t_nohash!(\n        \"_RNCINkXs25_NgCsbmNqQUJIY6D_4core5sliceINyB9_4IterhENuNgNoBb_4iter8iterator8Iterator9rpositionNCNgNpB9_6memchr7memrchrs_0E0Bb_\",\n        \"<core::slice::Iter<u8> as core::iter::iterator::Iterator>::rposition::<core::slice::memchr::memrchr::{closure#1}>::{closure#0}\"\n    );\n}\n\n#[test]\nfn demangle_dyn_trait() {\n    t_nohash!(\n        \"_RINbNbCskIICzLVDPPb_5alloc5alloc8box_freeDINbNiB4_5boxed5FnBoxuEp6OutputuEL_ECs1iopQbuBiw2_3std\",\n        \"alloc::alloc::box_free::<dyn alloc::boxed::FnBox<(), Output = ()>>\"\n    );\n}\n\n#[test]\nfn demangle_const_generics_preview() {\n    // NOTE(eddyb) this was hand-written, before rustc had working\n    // const generics support (but the mangling format did include them).\n    t_nohash_type!(\n        \"INtC8arrayvec8ArrayVechKj7b_E\",\n        \"arrayvec::ArrayVec<u8, 123>\"\n    );\n    t_const_suffixed!(\"j7b_\", \"123\", \"usize\");\n}\n\n#[test]\nfn demangle_min_const_generics() {\n    t_const!(\"p\", \"_\");\n    t_const_suffixed!(\"hb_\", \"11\", \"u8\");\n    t_const_suffixed!(\"off00ff00ff00ff00ff_\", \"0xff00ff00ff00ff00ff\", \"u128\");\n    t_const_suffixed!(\"s98_\", \"152\", \"i16\");\n    t_const_suffixed!(\"anb_\", \"-11\", \"i8\");\n    t_const!(\"b0_\", \"false\");\n    t_const!(\"b1_\", \"true\");\n    t_const!(\"c76_\", \"'v'\");\n    t_const!(\"c22_\", r#\"'\"'\"#);\n    t_const!(\"ca_\", \"'\\\\n'\");\n    t_const!(\"c2202_\", \"'∂'\");\n}\n\n#[test]\nfn demangle_const_str() {\n    t_const!(\"e616263_\", \"{*\\\"abc\\\"}\");\n    t_const!(\"e27_\", r#\"{*\"'\"}\"#);\n    t_const!(\"e090a_\", \"{*\\\"\\\\t\\\\n\\\"}\");\n    t_const!(\"ee28882c3bc_\", \"{*\\\"∂ü\\\"}\");\n    t_const!(\n        \"ee183a1e18390e183ade1839be18394e1839ae18390e183935fe18392e18394e1839b\\\n          e183a0e18398e18394e1839ae183985fe183a1e18390e18393e18398e1839ae18398_\",\n        \"{*\\\"საჭმელად_გემრიელი_სადილი\\\"}\"\n    );\n    t_const!(\n        \"ef09f908af09fa688f09fa686f09f90ae20c2a720f09f90b6f09f9192e298\\\n          95f09f94a520c2a720f09fa7a1f09f929bf09f929af09f9299f09f929c_\",\n        \"{*\\\"🐊🦈🦆🐮 § 🐶👒☕🔥 § 🧡💛💚💙💜\\\"}\"\n    );\n}\n\n// NOTE(eddyb) this uses the same strings as `demangle_const_str` and should\n// be kept in sync with it - while a macro could be used to generate both\n// `str` and `&str` tests, from a single list of strings, this seems clearer.\n#[test]\nfn demangle_const_ref_str() {\n    t_const!(\"Re616263_\", \"\\\"abc\\\"\");\n    t_const!(\"Re27_\", r#\"\"'\"\"#);\n    t_const!(\"Re090a_\", \"\\\"\\\\t\\\\n\\\"\");\n    t_const!(\"Ree28882c3bc_\", \"\\\"∂ü\\\"\");\n    t_const!(\n        \"Ree183a1e18390e183ade1839be18394e1839ae18390e183935fe18392e18394e1839b\\\n           e183a0e18398e18394e1839ae183985fe183a1e18390e18393e18398e1839ae18398_\",\n        \"\\\"საჭმელად_გემრიელი_სადილი\\\"\"\n    );\n    t_const!(\n        \"Ref09f908af09fa688f09fa686f09f90ae20c2a720f09f90b6f09f9192e298\\\n           95f09f94a520c2a720f09fa7a1f09f929bf09f929af09f9299f09f929c_\",\n        \"\\\"🐊🦈🦆🐮 § 🐶👒☕🔥 § 🧡💛💚💙💜\\\"\"\n    );\n}\n\n#[test]\nfn demangle_const_ref() {\n    t_const!(\"Rp\", \"{&_}\");\n    t_const!(\"Rh7b_\", \"{&123}\");\n    t_const!(\"Rb0_\", \"{&false}\");\n    t_const!(\"Rc58_\", \"{&'X'}\");\n    t_const!(\"RRRh0_\", \"{&&&0}\");\n    t_const!(\"RRRe_\", \"{&&\\\"\\\"}\");\n    t_const!(\"QAE\", \"{&mut []}\");\n}\n\n#[test]\nfn demangle_const_array() {\n    t_const!(\"AE\", \"{[]}\");\n    t_const!(\"Aj0_E\", \"{[0]}\");\n    t_const!(\"Ah1_h2_h3_E\", \"{[1, 2, 3]}\");\n    t_const!(\"ARe61_Re62_Re63_E\", \"{[\\\"a\\\", \\\"b\\\", \\\"c\\\"]}\");\n    t_const!(\"AAh1_h2_EAh3_h4_EE\", \"{[[1, 2], [3, 4]]}\");\n}\n\n#[test]\nfn demangle_const_tuple() {\n    t_const!(\"TE\", \"{()}\");\n    t_const!(\"Tj0_E\", \"{(0,)}\");\n    t_const!(\"Th1_b0_E\", \"{(1, false)}\");\n    t_const!(\n        \"TRe616263_c78_RAh1_h2_h3_EE\",\n        \"{(\\\"abc\\\", 'x', &[1, 2, 3])}\"\n    );\n}\n\n#[test]\nfn demangle_const_adt() {\n    t_const!(\n        \"VNvINtNtC4core6option6OptionjE4NoneU\",\n        \"{core::option::Option::<usize>::None}\"\n    );\n    t_const!(\n        \"VNvINtNtC4core6option6OptionjE4SomeTj0_E\",\n        \"{core::option::Option::<usize>::Some(0)}\"\n    );\n    t_const!(\n        \"VNtC3foo3BarS1sRe616263_2chc78_5sliceRAh1_h2_h3_EE\",\n        \"{foo::Bar { s: \\\"abc\\\", ch: 'x', slice: &[1, 2, 3] }}\"\n    );\n}\n\n#[test]\nfn demangle_exponential_explosion() {\n    // NOTE(eddyb) because of the prefix added by `t_nohash_type!` is\n    // 3 bytes long, `B2_` refers to the start of the type, not `B_`.\n    // 6 backrefs (`B8_E` through `B3_E`) result in 2^6 = 64 copies of `_`.\n    // Also, because the `p` (`_`) type is after all of the starts of the\n    // backrefs, it can be replaced with any other type, independently.\n    t_nohash_type!(\n        concat!(\"TTTTTT\", \"p\", \"B8_E\", \"B7_E\", \"B6_E\", \"B5_E\", \"B4_E\", \"B3_E\"),\n        \"((((((_, _), (_, _)), ((_, _), (_, _))), (((_, _), (_, _)), ((_, _), (_, _)))), \\\n         ((((_, _), (_, _)), ((_, _), (_, _))), (((_, _), (_, _)), ((_, _), (_, _))))), \\\n         (((((_, _), (_, _)), ((_, _), (_, _))), (((_, _), (_, _)), ((_, _), (_, _)))), \\\n         ((((_, _), (_, _)), ((_, _), (_, _))), (((_, _), (_, _)), ((_, _), (_, _))))))\"\n    );\n}\n\n#[test]\nfn demangle_thinlto() {\n    t_nohash!(\"_RC3foo.llvm.9D1C9369\", \"foo\");\n    t_nohash!(\"_RC3foo.llvm.9D1C9369@@16\", \"foo\");\n    t_nohash!(\"_RNvC9backtrace3foo.llvm.A5310EB9\", \"backtrace::foo\");\n}\n\n#[test]\nfn demangle_extra_suffix() {\n    // From alexcrichton/rustc-demangle#27:\n    t_nohash!(\n        \"_RNvNtNtNtNtCs92dm3009vxr_4rand4rngs7adapter9reseeding4fork23FORK_HANDLER_REGISTERED.0.0\",\n        \"rand::rngs::adapter::reseeding::fork::FORK_HANDLER_REGISTERED.0.0\"\n    );\n}\n\n// FIXME(eddyb) get this working with the `rust-demangle.c` test harness.\n#[cfg(unsupported_tests)]\n#[test]\nfn demangling_limits() {\n    // Stress tests found via fuzzing.\n\n    for sym in include_str!(\"v0-large-test-symbols/early-recursion-limit\")\n        .lines()\n        .filter(|line| !line.is_empty() && !line.starts_with('#'))\n    {\n        assert_eq!(\n            super::demangle(sym).map(|_| ()),\n            Err(super::ParseError::RecursedTooDeep)\n        );\n    }\n\n    assert_contains!(\n        ::demangle(\n            \"RIC20tRYIMYNRYFG05_EB5_B_B6_RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\\\n    RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRB_E\",\n        )\n        .to_string(),\n        \"{recursion limit reached}\"\n    );\n}\n\n// FIXME(eddyb) get this working with the `rust-demangle.c` test harness.\n#[cfg(unsupported_tests)]\n#[test]\nfn recursion_limit_leaks() {\n    // NOTE(eddyb) this test checks that both paths and types support the\n    // recursion limit correctly, i.e. matching `push_depth` and `pop_depth`,\n    // and don't leak \"recursion levels\" and trip the limit.\n    // The test inputs are generated on the fly, using a repeated pattern,\n    // as hardcoding the actual strings would be too verbose.\n    // Also, `MAX_DEPTH` can be directly used, instead of assuming its value.\n    for &(sym_leaf, expected_leaf) in &[(\"p\", \"_\"), (\"Rp\", \"&_\"), (\"C1x\", \"x\")] {\n        let mut sym = format!(\"_RIC0p\");\n        let mut expected = format!(\"::<_\");\n        for _ in 0..(super::MAX_DEPTH * 2) {\n            sym.push_str(sym_leaf);\n            expected.push_str(\", \");\n            expected.push_str(expected_leaf);\n        }\n        sym.push('E');\n        expected.push('>');\n\n        t_nohash!(&sym, expected);\n    }\n}\n\n// FIXME(eddyb) port recursion limits to C.\n#[ignore = \"stack overflow\"]\n#[test]\nfn recursion_limit_backref_free_bypass() {\n    // NOTE(eddyb) this test checks that long symbols cannot bypass the\n    // recursion limit by not using backrefs, and cause a stack overflow.\n\n    // This value was chosen to be high enough that stack overflows were\n    // observed even with `cargo test --release`.\n    let depth = 100_000;\n\n    // In order to hide the long mangling from the initial \"shallow\" parse,\n    // it's nested in an identifier (crate name), preceding its use.\n    let mut sym = format!(\"_RIC{}\", depth);\n    let backref_start = sym.len() - 2;\n    for _ in 0..depth {\n        sym.push('R');\n    }\n\n    // Write a backref to just after the length of the identifier.\n    sym.push('B');\n    sym.push(char::from_digit((backref_start - 1) as u32, 36).unwrap());\n    sym.push('_');\n\n    // Close the `I` at the start.\n    sym.push('E');\n\n    assert_contains!(\n        rust_demangle_c_test_harness::demangle(&sym).to_string(),\n        \"{recursion limit reached}\"\n    );\n}\n"
  },
  {
    "path": "third-party/tbb/.bazelrc",
    "content": "# Copyright (c) 2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# DISCLAIMER: Bazel support is community-based. The maintainers do not\n# use Bazel internally. The Bazel build can have security risks or \n# optimization gaps.\n\nbuild --symlink_prefix=/ # Out of source build\n"
  },
  {
    "path": "third-party/tbb/.bazelversion",
    "content": "7.2.1\n"
  },
  {
    "path": "third-party/tbb/.gitattributes",
    "content": "# Set the default behavior, in case people don't have core.autocrlf set.\n* text=auto\n\n# Explicitly declare text files you want to always be normalized and converted\n# to native line endings on checkout.\n*.c text\n*.h text\n*.cpp text\n*.def text\n*.rc text\n*.i text\n*.sh text\n*.csh text\n*.mk text\n*.java text\n*.csv text\n*.lst text\n*.asm text\n*.cfg text\n*.css text\n*.inc text\n*.js text\n*.rb text\n*.strings text\n*.txt text\n*export.lst text\n*.xml text\n*.py text\n*.md text\n*.classpath text\n*.cproject text\n*.project text\n*.properties text\n*.java text\n*.gradle text\n\n# Declare files that will always have CRLF line endings on checkout.\n*.sln text eol=crlf\n*.bat text eol=crlf\n\n# Denote all files that are truly binary and should not be modified.\n*.png binary\n*.jpg binary\n*.ico binary\n*.spir binary\n"
  },
  {
    "path": "third-party/tbb/.github/CODEOWNERS",
    "content": "# Lines starting with '#' are comments.\n# Each line is a file pattern followed by one or more owners.\n\n# More details are here: https://help.github.com/articles/about-codeowners/\n\nsrc/tbbmalloc @ldorau @lplewa @kfilipek\nsrc/tbbmalloc_proxy @ldorau @lplewa @kfilipek\n"
  },
  {
    "path": "third-party/tbb/.github/ISSUE_TEMPLATE/1_question.md",
    "content": "---\nname: Ask a question\nabout: Use this template for any questions\ntitle: ''\nlabels: 'question'\nassignees: ''\n---"
  },
  {
    "path": "third-party/tbb/.github/ISSUE_TEMPLATE/2_bug_report.md",
    "content": "---\nname: Report a bug or a performance issue\nabout: Use this template to report unexpected behavior\ntitle: ''\nlabels: 'bug'\nassignees: ''\n---\n\n# Summary\nProvide a short summary of the issue. \nSee the sections below\nfor factors important for the reproduction of an issue.\n\n# Version\nReport oneTBB version used to reproduce the problem.\n\n# Environment\nProvide any environmental details that you consider significant for reproducing the issue.\nThe following information is important:\n* Hardware\n* OS name and version\n* Compiler version\n\n# Observed Behavior\nDocument behavior you observe.\n\n# Expected Behavior\nDocument behavior you expect.\n\n# Steps To Reproduce\nCheck that the issue is reproducible with the latest revision\nof the master branch. Include all the steps to reproduce the issue."
  },
  {
    "path": "third-party/tbb/.github/ISSUE_TEMPLATE/3_feature_request.md",
    "content": "---\nname: Request a feature\nabout: Use this template to request new functionality or change the behavior of the library\ntitle: ''\nlabels: 'new feature'\nassignees: ''\n---\n\n# Summary\nInclude a short summary of the request. \n\nSee the sections below\nfor factors important for a feature request.\n\n# Problem Statement\nDescribe the problem you want to solve with a reasonable level of detail.\n\n# Preferred Solution\nProvide your ideas regarding problem solutions."
  },
  {
    "path": "third-party/tbb/.github/ISSUE_TEMPLATE/4_documentation.md",
    "content": "---\nname: Request a documentation change\nabout: Use this template to report documentation issue or request documentation changes\ntitle: ''\nlabels: 'documentation'\nassignees: ''\n---\n\n# Summary\nInclude a short summary of the issue or request. \nSee the sections below\nfor factors important for a documentation\nissue.\n\n# URLs\nInclude pointers to documents that are impacted.\n\n# Additional Details\nProvide a detailed description of the expected changes in documentation\nand suggestions you have."
  },
  {
    "path": "third-party/tbb/.github/dependabot.yml",
    "content": "version: 2\nupdates:\n  - package-ecosystem: \"github-actions\"\n    directory: \"/\"\n    schedule:\n      interval: \"weekly\"\n"
  },
  {
    "path": "third-party/tbb/.github/issue_labeler.yml",
    "content": "# Copyright (c) 2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# PR template regexp's for issue labeler\nbug fix:\n    - '\\[(x|X)\\]\\sbug\\sfix'\nenhancement:\n    - '\\[(x|X)\\]\\snew\\sfeature'\ntests:\n    - '\\[(x|X)\\]\\stests'\ninfrastructure:\n    - '\\[(x|X)\\]\\sinfrastructure'\ndocumentation:\n    - '\\[(x|X)\\]\\sdocumentation'\nallocator:\n    - '\\[(x|X)\\]\\sallocator'"
  },
  {
    "path": "third-party/tbb/.github/labeler.yml",
    "content": "# Copyright (c) 2023-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nallocator:\n- changed-files:\n  - any-glob-to-any-file: ['src/tbbmalloc/**/*', 'src/tbbmalloc_proxy/**/*', 'test/tbbmalloc/**/*']\n"
  },
  {
    "path": "third-party/tbb/.github/pull_request_template.md",
    "content": "### Description \n_Add a comprehensive description of proposed changes_\n\n\nFixes # - _issue number(s) if exists_\n\n### Type of change\n\n_Choose one or multiple, leave empty if none of the other choices apply_\n\n_Add a respective label(s) to PR if you have permissions_\n\n- [ ] bug fix - _change that fixes an issue_\n- [ ] new feature - _change that adds functionality_\n- [ ] tests - _change in tests_\n- [ ] infrastructure - _change in infrastructure and CI_\n- [ ] documentation - _documentation update_\n\n### Tests\n\n- [ ] added - _required for new features and some bug fixes_\n- [ ] not needed\n\n### Documentation\n\n- [ ] updated in # - _add PR number_\n- [ ] needs to be updated\n- [ ] not needed\n\n### Breaks backward compatibility\n- [ ] Yes\n- [ ] No\n- [ ] Unknown\n\n### Notify the following users\n_List users with `@` to send notifications_\n\n### Other information\n"
  },
  {
    "path": "third-party/tbb/.github/scripts/codespell.sh",
    "content": "#!/bin/bash\n#\n# Copyright (c) 2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nSCAN_TARGET=$1\n\nSKIP_PATTERN='*/.github/*'\n\n# Ignored cases\nIGNORE_COMMAND=\"sed -e /.*\\\\sOd\\\\s*=.*/d \\\n-e /.*\\\\sOt\\\\s*=.*/d \\\n-e /.*\\\\siff\\\\s*=.*/d \\\n-e /.*\\\\sith\\\\s*=.*/d \\\n-e /.*\\\\scas\\\\s*=.*/d \\\n-e /.*\\\\sCAS\\\\s*=.*/d \\\n-e /.*\\\\ssom\\\\s*=.*/d \\\n-e /.*\\\\sSOM\\\\s*=.*/d \\\n-e /.*\\\\suint\\\\s*=.*/d \\\n-e /.*\\\\sUINT\\\\s*=.*/d \\\n-e /.*\\\\scopyable\\\\s*=.*/d \\\n-e /.*\\\\sCopyable\\\\s*=.*/d \\\n-e /.*\\\\sFo\\\\s*=.*/d \\\n-e /.*pipeline_filters.h.*nd\\\\s*=.*/d \\\n-e /.*ittnotify.h.*unx\\\\s*=.*/d \\\n-e /.*bzlib.cpp.*MSDOS\\\\s*=.*/d \\\n-e /.*test_task.cpp.*tE\\\\s*=.*/d \\\n-e /.*backend.cpp.*resSize\\\\s*=.*/d \\\n-e /.*test_join_node.h.*Ned\\\\s*=.*/d \\\n-e /.*test_indexer_node.cpp.*OT\\\\s*=.*/d \\\n-e /.*allocator_stl_test_common.h.*Aci*\\\\s*=.*/d \\\n-e /.*seismic_video.cpp.*DialogBox\\\\s*=.*/d \\\n-e /.*test_composite_node.cpp.*que\\\\s*=.*/d \\\n-e /.*blocksort.cpp.*hiSt\\\\s*=.*/d \\\n-e /.*compress.cpp.*fave\\\\s*=.*/d \\\n-e /.*count_strings.cpp.*ue\\\\s*=.*/d \\\n-e /.*count_strings.cpp.*nd\\\\s*=.*/d \\\n-e /.*count_strings.cpp.*ths\\\\s*=.*/d \\\n-e /.*polygon_overlay\\/README.md.*ist\\\\s*=.*/d \\\n-e /.*_pipeline_filters.h.*nd\\\\s*=.*/d \\\n-e /.*sub_string_finder\\/README.md.*ba\\\\s*=.*/d\"\n\nSCAN_RESULT=`codespell --quiet-level=2 --skip \"${SKIP_PATTERN}\" ${SCAN_TARGET}`\nSCAN_RESULT=`echo -e \"${SCAN_RESULT}\" | ${IGNORE_COMMAND}`\necho \"${SCAN_RESULT}\"\n\nif [[ ! -z ${SCAN_RESULT} ]]; then\n    exit 1\nfi\n"
  },
  {
    "path": "third-party/tbb/.github/workflows/ci.yml",
    "content": "# Copyright (c) 2021-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nname: oneTBB CI\n\non:\n  push:\n    branches: [master]\n\n  pull_request:\n    branches: [master]\n    types:\n      - opened\n      - synchronize\n      - reopened\n\npermissions: read-all\n\nenv:\n  BUILD_CONCURRENCY: 2\n  MACOS_BUILD_CONCURRENCY: 3\n  TEST_TIMEOUT: 180\n\njobs:\n  codespell:\n    runs-on: [ubuntu-20.04]\n    timeout-minutes: 10\n    steps:\n      - uses: actions/checkout@v4\n      - name: Run scan\n        run: |\n          sudo apt update && sudo apt install -y codespell\n          ${GITHUB_WORKSPACE}/.github/scripts/codespell.sh `pwd`\n\n  examples_clang-format:\n    runs-on: [ubuntu-20.04]\n    timeout-minutes: 10\n    steps:\n      - uses: actions/checkout@v4\n      - name: Run scan\n        run: |\n          command -v clang-format-10\n          cp -r examples examples_formatted\n          find examples_formatted -regex '.*\\.\\(cpp\\|hpp\\)' -exec clang-format-10 -style=file -i {} \\;\n          diff -r examples examples_formatted\n\n  documentation:\n    needs: [codespell]\n    env:\n      BUILD_TYPE: oss\n    runs-on: [ubuntu-22.04]\n    timeout-minutes: 10\n    steps:\n      - uses: actions/checkout@v4\n      - name: Install prerequisites\n        run: |\n          pip3 install -U Jinja2\n          pip3 install git+https://github.com/executablebooks/sphinx-book-theme.git\n          pip3 install sphinx-tabs\n          echo GITHUB_SHA_SHORT=${GITHUB_SHA::8} >> $GITHUB_ENV\n          mkdir html\n      - name: Build documentation\n        run: |\n          export BUILD_TYPE=${BUILD_TYPE} && sphinx-build doc html\n          tar -czvf html.tar.gz html/\n      - name: Save docs\n        uses: actions/upload-artifact@v4\n        with:\n          name: oneTBB-html-docs-${{ env.GITHUB_SHA_SHORT }}\n          path: html.tar.gz\n\n  pages:\n    if: ${{ github.ref == 'refs/heads/master' }}\n    permissions:\n      contents: write\n      pages: write\n      id-token: write\n    runs-on: ubuntu-latest\n    needs: [documentation]\n    steps:\n      - name: Checkout gh-pages\n        uses: actions/checkout@v4\n        with:\n          ref: gh-pages\n          path: gh-pages\n      - name: Set env\n        run: echo GITHUB_SHA_SHORT=${GITHUB_SHA::8} >> $GITHUB_ENV\n      - name: Download documetation\n        uses: actions/download-artifact@v4\n        with:\n          name: oneTBB-html-docs-${{ env.GITHUB_SHA_SHORT }}\n      - name: Publish to github pages\n        run: |\n          tar -xvf html.tar.gz\n          cd gh-pages\n          rm -rf *\n          touch .nojekyll # https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/\n          cp -r ../html/* .\n          git config user.name github-actions\n          git config user.email github-actions@github.com\n          git add .\n          git commit --reset-author --amend -m \"Update from GitHub Actions\"\n          git push --force origin gh-pages\n\n  copyright_check:\n    if: ${{ github.ref != 'refs/heads/master' }}\n    runs-on: [ubuntu-20.04]\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n      - name: Run check\n        run: |\n          sed -i \\\n            -e \"/Copyright (c) .* Intel Corporation/s/ \\([0-9]\\+\\)[-0-9]*/ \\\\1-$(date +%Y)/\" \\\n            -e \"/Copyright (c) .* Intel Corporation/s/$(date +%Y)-$(date +%Y)/$(date +%Y)/\" \\\n            $(git diff --diff-filter=d --name-only ${{ github.event.pull_request.base.sha }})\n          git checkout -- third-party-programs.txt\n          git diff > years.diff\n          if [[ -s years.diff ]]; then\n            echo \"Wrong copyright years\"\n            cat years.diff\n            exit 1\n          fi\n  python_module_test_ubuntu_latest:\n    runs-on: [ubuntu-latest]\n    timeout-minutes: 15\n    steps:\n      - uses: actions/checkout@v4\n      - name: Run testing\n        run: |\n          mkdir build && cd build\n          cmake -DTBB4PY_BUILD=ON -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc ..\n          make VERBOSE=1 -j${BUILD_CONCURRENCY} python_build\n          ctest -R python_test --output-on-failure --timeout ${TEST_TIMEOUT}\n\n  linux-testing:\n    name: ${{ matrix.os }}_${{ matrix.cxx_compiler }}_cxx${{ matrix.std }}_${{ matrix.build_type }}_preview=${{ matrix.preview }}${{ matrix.cmake_static }}\n    runs-on: ['${{ matrix.os }}']\n    timeout-minutes: 45\n    strategy:\n      fail-fast: false\n      matrix:\n        include:\n          - os: ubuntu-latest\n            c_compiler: gcc\n            cxx_compiler: g++\n            std: 14\n            build_type: relwithdebinfo\n            preview: 'OFF'\n          - os: ubuntu-20.04\n            c_compiler: gcc\n            cxx_compiler: g++\n            std: 17\n            build_type: release\n            preview: 'ON'\n          - os: ubuntu-20.04\n            c_compiler: gcc-10\n            cxx_compiler: g++-10\n            std: 20\n            build_type: debug\n            preview: 'ON'\n          - os: ubuntu-22.04\n            c_compiler: gcc-11\n            cxx_compiler: g++-11\n            std: 20\n            build_type: release\n            preview: 'ON'\n            cmake_static: -DBUILD_SHARED_LIBS=OFF\n    steps:\n      - uses: actions/checkout@v4\n      - name: Run testing\n        shell: bash\n        run: |\n          set -x\n          mkdir build && cd build\n          cmake -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.cmake_static }} \\\n            -DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DTBB_CPF=${{ matrix.preview }} ..\n          make VERBOSE=1 -j${BUILD_CONCURRENCY}\n          ctest --timeout ${TEST_TIMEOUT} --output-on-failure\n\n  macos-testing:\n    name: ${{ matrix.os }}_${{ matrix.cxx_compiler }}_cxx${{ matrix.std }}_${{ matrix.build_type }}_preview=${{ matrix.preview }}${{ matrix.cmake_static }}\n    runs-on: ['${{ matrix.os }}']\n    timeout-minutes: 45\n    strategy:\n      fail-fast: false\n      matrix:\n        include:\n          - os: macos-14\n            c_compiler: clang\n            cxx_compiler: clang++\n            std: 14\n            build_type: relwithdebinfo\n            preview: 'ON'\n          - os: macos-13\n            c_compiler: clang\n            cxx_compiler: clang++\n            std: 20\n            build_type: release\n            preview: 'ON'\n            cmake_static: -DBUILD_SHARED_LIBS=OFF\n    steps:\n      - uses: actions/checkout@v4\n      - name: Run testing\n        shell: bash\n        run: |\n          set -x\n          mkdir build && cd build\n          cmake -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.cmake_static }} \\\n            -DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DTBB_CPF=${{ matrix.preview }} ..\n          make VERBOSE=1 -j${MACOS_BUILD_CONCURRENCY}\n          ctest --timeout ${TEST_TIMEOUT} --output-on-failure\n\n  windows-testing:\n    name: ${{ matrix.job_name }}\n    runs-on: ['${{ matrix.os }}']\n    timeout-minutes: 45\n    strategy:\n      fail-fast: false\n      matrix:\n        include:\n          - os: windows-2019\n            generator: Visual Studio 16 2019\n            c_compiler: cl\n            cxx_compiler: cl\n            std: 14\n            build_type: relwithdebinfo\n            preview: 'ON'\n            job_name: windows_cl2019_cxx14_relwithdebinfo_preview=ON\n          - os: windows-2019\n            generator: Visual Studio 16 2019\n            c_compiler: cl\n            cxx_compiler: cl\n            std: 20\n            build_type: release\n            preview: 'ON'\n            job_name: windows_cl2019_cxx20_release_preview=ON-DBUILD_SHARED_LIBS=OFF\n            cmake_static: -DBUILD_SHARED_LIBS=OFF\n          - os: windows-2022\n            generator: Visual Studio 17 2022\n            c_compiler: cl\n            cxx_compiler: cl\n            std: 17\n            build_type: relwithdebinfo\n            preview: 'OFF'\n            job_name: windows_cl2022_cxx17_relwithdebinfo_preview=OFF\n    steps:\n      - uses: actions/checkout@v4\n      - name: Run testing\n        run: |\n          mkdir build\n          cd build\n          cmake -G \"${{ matrix.generator }}\" -A x64 -DCMAKE_CXX_STANDARD=${{ matrix.std }} ${{ matrix.cmake_static }} `\n            -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} `\n            -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DTBB_CPF=${{ matrix.preview }} ..\n          cmake --build . --config ${{ matrix.build_type }} -j -v\n          ctest -C ${{ matrix.build_type }} --timeout ${env:TEST_TIMEOUT} --output-on-failure\n\n  linux-examples-testing:\n    name: examples_${{ matrix.os }}_${{ matrix.cxx_compiler }}_cxx${{ matrix.std }}_${{ matrix.build_type }}_preview=${{ matrix.preview }}\n    runs-on: ['${{ matrix.os }}']\n    timeout-minutes: 20\n    strategy:\n      fail-fast: false\n      matrix:\n        include:\n          - os: ubuntu-latest\n            c_compiler: gcc\n            cxx_compiler: g++\n            std: 14\n            build_type: relwithdebinfo\n            preview: 'OFF'\n          - os: ubuntu-20.04\n            c_compiler: gcc\n            cxx_compiler: g++\n            std: 17\n            build_type: release\n            preview: 'ON'\n          - os: ubuntu-20.04\n            c_compiler: gcc-10\n            cxx_compiler: g++-10\n            std: 20\n            build_type: debug\n            preview: 'ON'\n    steps:\n      - uses: actions/checkout@v4\n      - name: Run testing\n        shell: bash\n        run: |\n          set -x\n          mkdir build && cd build\n          cmake -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \\\n            -DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \\\n            -DTBB_CPF=${{ matrix.preview }} -DTBB_TEST=OFF -DTBB_EXAMPLES=ON ..\n          cmake --build . -v --target light_test_examples\n\n  macos-examples-testing:\n    name: examples_${{ matrix.os }}_${{ matrix.cxx_compiler }}_cxx${{ matrix.std }}_${{ matrix.build_type }}_preview=${{ matrix.preview }}\n    runs-on: ['${{ matrix.os }}']\n    timeout-minutes: 20\n    strategy:\n      fail-fast: false\n      matrix:\n        include:\n          - os: macos-15\n            c_compiler: clang\n            cxx_compiler: clang++\n            std: 14\n            build_type: relwithdebinfo\n            preview: 'ON'\n    steps:\n      - uses: actions/checkout@v4\n      - name: Run testing\n        shell: bash\n        run: |\n          set -x\n          mkdir build && cd build\n          cmake -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \\\n            -DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \\\n            -DTBB_CPF=${{ matrix.preview }} -DTBB_TEST=OFF -DTBB_EXAMPLES=ON ..\n          cmake --build . -v --target light_test_examples\n\n  windows-examples-testing:\n    name: ${{ matrix.job_name }}\n    runs-on: ['${{ matrix.os }}']\n    timeout-minutes: 20\n    strategy:\n      fail-fast: false\n      matrix:\n        include:\n          - os: windows-2019\n            generator: Visual Studio 16 2019\n            c_compiler: cl\n            cxx_compiler: cl\n            std: 14\n            build_type: relwithdebinfo\n            preview: 'ON'\n            job_name: examples_windows_cl2019_cxx14_relwithdebinfo_preview=ON\n          - os: windows-2022\n            generator: Visual Studio 17 2022\n            c_compiler: cl\n            cxx_compiler: cl\n            std: 17\n            build_type: relwithdebinfo\n            preview: 'OFF'\n            job_name: examples_windows_cl2022_cxx17_relwithdebinfo_preview=OFF\n    steps:\n      - uses: actions/checkout@v4\n      - name: Run testing\n        run: |\n          mkdir build\n          cd build\n          cmake -G \"${{ matrix.generator }}\" -A x64 -DCMAKE_CXX_STANDARD=${{ matrix.std }} `\n            -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} `\n            -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DTBB_CPF=${{ matrix.preview }} -DTBB_TEST=OFF -DTBB_EXAMPLES=ON ..\n          cmake --build . -v --target light_test_examples\n"
  },
  {
    "path": "third-party/tbb/.github/workflows/codeql.yml",
    "content": "# Copyright (c) 2024-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nname: \"CodeQL\"\n\non:\n  push:\n    branches: [ \"master\" ]\n  pull_request:\n    branches: [ \"master\" ]\n  schedule:\n    - cron: '0 0 * * 1'\n\npermissions:\n  contents: read\n  \njobs:\n  analyze:\n    name: Analyze (${{ matrix.language }})\n    runs-on: ubuntu-latest\n    # timeout-minutes: \n    permissions:\n      # required for all workflows\n      security-events: write\n      # required to fetch internal or private CodeQL packs\n      packages: read\n      # only required for workflows in private repositories\n      actions: read\n      contents: read\n\n    strategy:\n      fail-fast: false\n      matrix:\n        language: [\"cpp\", \"python\"]\n    \n    steps:\n      - name: Harden Runner\n        uses: step-security/harden-runner@v2.10.4\n        with:\n          egress-policy: audit\n          \n      - name: Checkout repository\n        uses: actions/checkout@v4\n\n    # Initializes the CodeQL tools for scanning.\n      - name: Initialize CodeQL\n        uses: github/codeql-action/init@v3\n        with:\n          languages: ${{ matrix.language }}\n \n    # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).\n    # If this step fails, then you should remove it and run the build manually (see below)\n      - name: Autobuild\n        uses: github/codeql-action/autobuild@v3.24.10\n    \n    # If the analyze step fails for one of the languages you are analyzing with\n    # \"We were unable to automatically build your code\", modify the matrix above\n    # to set the build mode to \"manual\" for that language. Then modify this step\n    # to build your code.\n    # Command-line programs to run using the OS shell.\n    # See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun\n    #- if: matrix.build-mode == 'manual'\n    #  shell: bash\n    #  run: |\n    #    echo 'If you are using a \"manual\" build mode for one or more of the' \\\n    #      'languages you are analyzing, replace this with the commands to build' \\\n    #      'your code, for example:'\n    #    echo '  make bootstrap'\n    #    echo '  make release'\n    #    exit 1\n\n      - name: Perform CodeQL Analysis\n        uses: github/codeql-action/analyze@v3\n        with:\n          category: \"/language:${{matrix.language}}\"\n"
  },
  {
    "path": "third-party/tbb/.github/workflows/coverity.yml",
    "content": "# Copyright (c) 2024-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nname: Coverity Scan\n\non:\n\n# Only run on push to master branch\n  push:\n    branches: [master]\n\npermissions: read-all\n\nenv:\n  BUILD_CONCURRENCY: 4\n  COVERITY_PROJECT: oneapi-src%2FoneTBB\n\njobs:\n  coverity_linux:\n    name: Coverity Linux\n    if: github.repository == 'uxlfoundation/oneTBB'\n    runs-on: [ubuntu-latest]\n    steps:\n      - uses: actions/checkout@v4\n      - name: Download Linux 64 Coverity Tool\n        run: |\n          curl https://scan.coverity.com/download/cxx/linux64 --output ${GITHUB_WORKSPACE}/cov-linux64-tool.tar.gz \\\n            --data \"token=${{secrets.COVERITY_TOKEN}}&project=${{env.COVERITY_PROJECT}}\"\n          mkdir cov-linux64-tool\n          tar -xzf cov-linux64-tool.tar.gz --strip 1 -C cov-linux64-tool\n      - name: Build with cov-build\n        run: |\n          export PATH=\"${PWD}/cov-linux64-tool/bin:${PATH}\"\n          mkdir build && cd build\n          cmake -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE=relwithdebinfo \\\n            -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc -DTBB_CPF=ON ..\n          cov-build --dir cov-int make VERBOSE=1 -j${{env.BUILD_CONCURRENCY}}\n      - name: Archive Coverity build results\n        run: |\n          cd build\n          tar -czvf cov-int.tgz cov-int\n      - name: Submit Coverity results for analysis\n        run: |\n          cd build\n          curl \\\n            --form token=\"${{ secrets.COVERITY_TOKEN }}\" \\\n            --form email=\"${{ secrets.COVERITY_EMAIL }}\" \\\n            --form file=@cov-int.tgz \\\n            --form version=\"${GITHUB_SHA}\" \\\n            --form description=\"\" \\\n              \"https://scan.coverity.com/builds?project=${{env.COVERITY_PROJECT}}\"\n"
  },
  {
    "path": "third-party/tbb/.github/workflows/issue_labeler.yml",
    "content": "# Copyright (c) 2023-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nname: \"Issue Labeler\"\non:\n  issues:\n    types: [opened, edited]\n  pull_request:\n    types: [opened, edited]\n\npermissions: read-all\n\njobs:\n  triage:\n    runs-on: ubuntu-latest\n    permissions:\n      pull-requests: write\n      issues: write\n      contents: read\n    steps:\n    - uses: github/issue-labeler@v3.4 #May not be the latest version\n      with:\n        repo-token: \"${{ secrets.GITHUB_TOKEN }}\"\n        configuration-path: .github/issue_labeler.yml\n        enable-versioned-regex: 0\n"
  },
  {
    "path": "third-party/tbb/.github/workflows/labeler.yml",
    "content": "# Copyright (c) 2023-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nname: \"Pull Request Labeler\"\non:\n  - pull_request_target\n\npermissions: read-all\n\njobs:\n  triage:\n    permissions:\n      contents: read\n      pull-requests: write\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v4\n    - uses: actions/labeler@v5\n      with:\n        configuration-path: .github/labeler.yml\n"
  },
  {
    "path": "third-party/tbb/.github/workflows/ossf-scorecard.yml",
    "content": "# Copyright (c) 2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nname: OSSF Scorecard\non:\n  # For Branch-Protection check. Only the default branch is supported. See\n  # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection\n  branch_protection_rule:\n  # To guarantee Maintained check is occasionally updated. See\n  # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained\n  schedule:\n    - cron: '00 02 * * *'\n  push:\n    branches: [ \"master\" ]\n\n# Declare default permissions as read only.\npermissions: read-all\n\njobs:\n  analysis:\n    name: Scorecard analysis\n    runs-on: ubuntu-latest\n    permissions:\n      # Needed to upload the results to code-scanning dashboard.\n      security-events: write\n      # Needed to publish results and get a badge (see publish_results below).\n      id-token: write\n      # Uncomment the permissions below if installing in a private repository.\n      # contents: read\n      # actions: read\n\n    steps:\n      - name: \"Checkout code\"\n        uses: actions/checkout@v4.1.1\n        with:\n          persist-credentials: false\n\n      - name: \"Run analysis\"\n        uses: ossf/scorecard-action@v2.4.0\n        with:\n          results_file: results.sarif\n          results_format: sarif\n          # (Optional) \"write\" PAT token. Uncomment the `repo_token` line below if:\n          # - you want to enable the Branch-Protection check on a *public* repository, or\n          # - you are installing Scorecard on a *private* repository\n          # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.\n          # repo_token: ${{ secrets.SCORECARD_TOKEN }}\n\n          # Public repositories:\n          #   - Publish results to OpenSSF REST API for easy access by consumers\n          #   - Allows the repository to include the Scorecard badge.\n          #   - See https://github.com/ossf/scorecard-action#publishing-results.\n          # For private repositories:\n          #   - `publish_results` will always be set to `false`, regardless\n          #     of the value entered here.\n          publish_results: true\n\n      # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF\n      # format to the repository Actions tab.\n      #- name: \"Upload artifact\"\n      #  uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20\n      #  with:\n      #    name: SARIF file\n      #    path: results.sarif\n      #    retention-days: 5\n\n      # Upload the results to GitHub's code scanning dashboard (optional).\n      # Commenting out will disable upload of results to your repo's Code Scanning dashboard\n      #- name: \"Upload to code-scanning\"\n      #  uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9\n      #  with:\n      #    sarif_file: results.sarif\n"
  },
  {
    "path": "third-party/tbb/.gitignore",
    "content": "# -------- C++ --------\n# Prerequisites\n*.d\n\n# Compiled Object files\n*.slo\n*.lo\n*.o\n*.obj\n\n# Precompiled Headers\n*.gch\n*.pch\n\n# Compiled Dynamic libraries\n*.so\n*.so.*\n*.dylib\n*.dll\n\n# Fortran module files\n*.mod\n*.smod\n\n# Compiled Static libraries\n*.lai\n*.la\n*.a\n*.lib\n\n# Executables\n*.exe\n*.out\n*.app\n\n# -------- CMake --------\nCMakeCache.txt\nCMakeFiles\nCMakeScripts\nTesting\nMakefile\ncmake_install.cmake\ninstall_manifest.txt\ncompile_commands.json\nCTestTestfile.cmake\nbuild/*\n\n# -------- Python --------\n__pycache__/\n*.py[cod]\n*$py.class\n\n# -------- IDE --------\n.vscode/*\n.vs/*\nout/*\nCMakeSettings.json\n\n# -------- CTags --------\n.tags\n.ctags\n\n"
  },
  {
    "path": "third-party/tbb/BUILD.bazel",
    "content": "# Copyright (c) 2021-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# DISCLAIMER: Bazel support is community-based. The maintainers do not\n# use Bazel internally. The Bazel build can have security risks or\n# optimization gaps.\n\npackage(\n    default_visibility = [\"//visibility:public\"],\n)\n\ncc_library(\n    name = \"tbb\",\n    srcs = glob([\n        \"src/tbb/*.cpp\",\n        \"src/tbb/*.h\",\n    ]) + select({\n        \"@platforms//cpu:x86_64\": glob([\"src/tbb/tools_api/**/*.h\"]),\n        \"//conditions:default\": [],\n    }),\n    hdrs = glob([\n        \"include/tbb/*.h\",\n        \"include/oneapi/*.h\",\n        \"include/oneapi/tbb/*.h\",\n        \"include/oneapi/tbb/detail/*.h\",\n    ]),\n    copts = [\"-w\"] + select({\n        \"@platforms//os:windows\": [\"\"],\n        \"@platforms//cpu:arm64\": [\"\"],\n        \"//conditions:default\": [\"-mwaitpkg\"],\n    }),\n    defines =\n        select({\n            \"@platforms//cpu:x86_64\": [\"__TBB_NO_IMPLICIT_LINKAGE\"],\n            \"//conditions:default\": [\n                \"USE_PTHREAD\",\n            ],\n        }) +\n        select({\n            \"@platforms//os:osx\": [\"_XOPEN_SOURCE\"],\n            \"//conditions:default\": [],\n        }),\n    includes = [\n        \"include\",\n    ],\n    linkopts =\n        select({\n            \"@platforms//os:windows\": [],\n            \"@platforms//os:linux\": [\n                \"-ldl\",\n                \"-pthread\",\n                \"-lrt\",\n            ],\n            \"//conditions:default\": [\"-pthread\"],\n        }),\n    local_defines = select({\n        \"@platforms//cpu:x86_64\": [\n            \"__TBB_USE_ITT_NOTIFY\",\n        ],\n        \"//conditions:default\": [],\n    }) + [\n        \"__TBB_BUILD\",\n    ],\n    textual_hdrs = select({\n        \"@platforms//cpu:x86_64\": [\n            \"src/tbb/tools_api/ittnotify_static.c\",\n        ],\n        \"//conditions:default\": [],\n    }),\n)\n\ncc_library(\n    name = \"tbbmalloc\",\n    srcs =\n        glob([\n            \"src/tbbmalloc/*.h\",\n            \"src/tbb/*.h\",\n            \"src/tbbmalloc_proxy/*.h\",\n        ]) + [\n            \"src/tbbmalloc/backend.cpp\",\n            \"src/tbbmalloc/backref.cpp\",\n            \"src/tbbmalloc/frontend.cpp\",\n            \"src/tbbmalloc/large_objects.cpp\",\n            \"src/tbbmalloc/tbbmalloc.cpp\",\n        ],\n    hdrs = glob([\n        \"include/tbb/*.h\",\n        \"include/oneapi/tbb/detail/*.h\",\n        \"include/oneapi/tbb/*.h\",\n    ]),\n    includes = [\n        \"include\",\n    ],\n    local_defines = [\n        \"__TBBMALLOC_BUILD\",\n    ],\n)\n\ncc_library(\n    name = \"tbbmalloc_proxy\",\n    srcs = [\n        \"src/tbbmalloc_proxy/function_replacement.cpp\",\n        \"src/tbbmalloc_proxy/proxy.cpp\",\n    ],\n    deps = [\n        \":tbbmalloc\",\n    ],\n)\n\ncc_test(\n    name = \"test_mutex\",\n    srcs = [\n        \"test/tbb/test_mutex.cpp\",\n        \"test/tbb/test_mutex.h\"\n    ] + glob([\n        \"test/common/*.h\",\n    ]),\n    includes = [\"test\"],\n    deps = [\n        \":tbb\",\n    ],\n)\n\ncc_test(\n    name = \"test_parallel_for\",\n    srcs = [\n        \"test/tbb/test_parallel_for.cpp\",\n        \"test/tbb/test_partitioner.h\"\n    ] + glob([\n        \"test/common/*.h\",\n    ]),\n    includes = [\"test\"],\n    deps = [\n        \":tbb\",\n    ],\n)\n\ncc_test(\n    name = \"test_parallel_reduce\",\n    srcs = [\n        \"test/tbb/test_parallel_reduce.cpp\",\n    ] + glob([\n        \"test/common/*.h\",\n    ]),\n    includes = [\"test\"],\n    deps = [\n        \":tbb\",\n    ],\n)\n\ncc_test(\n    name = \"test_task\",\n    srcs = [\n        \"test/tbb/test_task.cpp\",\n    ] + glob([\n        \"test/common/*.h\",\n    ]),\n    includes = [\"test\"],\n    deps = [\n        \":tbb\",\n    ],\n)\n"
  },
  {
    "path": "third-party/tbb/Bazel.md",
    "content": "# Bazel* build support\n\nThe main build system of oneTBB is CMake*.\n[Bazel*](https://bazel.build/) support is community-based.\nThe Bazel configuration may not include recommended compiler and/or linker flags used in the official CMake configuration.\n\n---\n**NOTE**\n\nBazel is not recommended for use by oneTBB maintainers. Thus, it is not used internally. \n\n---\n\n\nThe Bazel oneTBB build is currently only intended for a subset of oneTBB that suffices restricted use cases.\nPull requests to improve the Bazel build experience are welcome.\n\nThe standard Bazel approach to handling third-party libraries is static linking. It is the best practice within the Bazel ecosystem.\n\n## Using oneTBB as a dependency\n\n### Traditional WORKSPACE approach\n\nThis example demonstrates how to use oneTBB as a dependency within a Bazel project.\n\nThe following file structure is assumed:\n\n```\nexample\n├── .bazelrc\n├── BUILD.bazel\n├── main.cpp\n└── WORKSPACE.bazel\n```\n\n_WORKSPACE.bazel_:\n```python\nload(\"@platforms//tools/build_defs/repo:git.bzl\", \"git_repository\")\n\ngit_repository(\n    name = \"oneTBB\",\n    branch = \"master\",\n    remote = \"https://github.com/uxlfoundation/oneTBB/\",\n)\n```\n\nIn the *WORKSPACE* file, the oneTBB GitHub* repository is fetched. \n\n_BUILD.bazel_:\n\n```python\ncc_binary(\n    name = \"Demo\",\n    srcs = [\"main.cpp\"],\n    deps = [\"@oneTBB//:tbb\"],\n)\n```\n\nThe *BUILD* file defines a binary named `Demo` that has a dependency to oneTBB.\n\n_main.cpp_:\n\n```c++\n#include \"oneapi/tbb/version.h\"\n\n#include <iostream>\n\nint main() {\n    std::cout << \"Hello from oneTBB \"\n              << TBB_VERSION_MAJOR << \".\"\n              << TBB_VERSION_MINOR << \".\"\n              << TBB_VERSION_PATCH\n              << \"!\" << std::endl;\n\n    return 0;\n}\n```\n\nThe expected output of this program is the current version of oneTBB.\n\nSwitch to the folder with the files created earlier and run the binary with `bazel run //:Demo`.\n\n### Bzlmod\n\nIf you use Bzlmod, you can fetch oneTBB with the [Bazel Central Registry](https://registry.bazel.build/).\n\nAdd the following line to your `MODULE.bazel` file:\n\n```bazel\nbazel_dep(name = \"onetbb\", version = \"2021.13.0\")\n```\n\n## Build oneTBB using Bazel\n\nRun ```bazel build //...``` in the oneTBB root directory.\n\n## Compiler support\n\nThe Bazel build uses the compiler flag `-mwaitpkg` in non-Windows* builds.\nThis flag is supported by the GNU* Compiler Collection (GCC) version 9.3, Clang* 12, and newer versions of those tools.\n\n\n---\n**NOTE**\n\nTo use the Bazel build with earlier versions of GCC, remove `-mwaitpkg` flag as it leads to errors during compilation.\n\n---\n"
  },
  {
    "path": "third-party/tbb/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# If the running version of CMake is older than 3.12, the extra ... dots will be seen as version component separators,\n# resulting in the ...<max> part being ignored and preserving the pre-3.12 behavior of basing policies on <min>.\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\n# Enable CMake policies\n\nif (POLICY CMP0063)\n    # The NEW behavior for this policy is to honor the visibility properties for all target types.\n    cmake_policy(SET CMP0063 NEW)\n    set(CMAKE_POLICY_DEFAULT_CMP0063 NEW)\nendif()\n\nif (POLICY CMP0068)\n    # RPATH settings do not affect install_name on macOS since CMake 3.9\n    cmake_policy(SET CMP0068 NEW)\nendif()\n\nif (POLICY CMP0091)\n    # The NEW behavior for this policy is to not place MSVC runtime library flags in the default\n    # CMAKE_<LANG>_FLAGS_<CONFIG> cache entries and use CMAKE_MSVC_RUNTIME_LIBRARY abstraction instead.\n    cmake_policy(SET CMP0091 NEW)\nelseif (DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)\n    message(FATAL_ERROR \"CMAKE_MSVC_RUNTIME_LIBRARY was defined while policy CMP0091 is not available. Use CMake 3.15 or newer.\")\nendif()\n\nif (POLICY CMP0148)\n    # CMake 3.27: The FindPythonInterp and FindPythonLibs modules are removed\n    cmake_policy(SET CMP0148 OLD)\nendif()\n\nif (TBB_WINDOWS_DRIVER AND (NOT (\"${CMAKE_MSVC_RUNTIME_LIBRARY}\" STREQUAL MultiThreaded OR \"${CMAKE_MSVC_RUNTIME_LIBRARY}\" STREQUAL MultiThreadedDebug)))\n    message(FATAL_ERROR \"Enabled TBB_WINDOWS_DRIVER requires CMAKE_MSVC_RUNTIME_LIBRARY to be set to MultiThreaded or MultiThreadedDebug.\")\nendif()\n\n# Enable support of minimum supported macOS version flag\nif (APPLE)\n    if (NOT CMAKE_CXX_OSX_DEPLOYMENT_TARGET_FLAG)\n        set(CMAKE_CXX_OSX_DEPLOYMENT_TARGET_FLAG \"-mmacosx-version-min=\" CACHE STRING \"Minimum macOS version flag\")\n    endif()\n    if (NOT CMAKE_C_OSX_DEPLOYMENT_TARGET_FLAG)\n        set(CMAKE_C_OSX_DEPLOYMENT_TARGET_FLAG \"-mmacosx-version-min=\" CACHE STRING \"Minimum macOS version flag\")\n    endif()\nendif()\n\nfile(READ include/oneapi/tbb/version.h _tbb_version_info)\nstring(REGEX REPLACE \".*#define TBB_VERSION_MAJOR ([0-9]+).*\" \"\\\\1\" _tbb_ver_major \"${_tbb_version_info}\")\nstring(REGEX REPLACE \".*#define TBB_VERSION_MINOR ([0-9]+).*\" \"\\\\1\" _tbb_ver_minor \"${_tbb_version_info}\")\nstring(REGEX REPLACE \".*#define TBB_VERSION_PATCH ([0-9]+).*\" \"\\\\1\" _tbb_ver_patch \"${_tbb_version_info}\")\nstring(REGEX REPLACE \".*#define TBB_INTERFACE_VERSION ([0-9]+).*\" \"\\\\1\" TBB_INTERFACE_VERSION \"${_tbb_version_info}\")\nstring(REGEX REPLACE \".*#define __TBB_BINARY_VERSION ([0-9]+).*\" \"\\\\1\" TBB_BINARY_VERSION \"${_tbb_version_info}\")\nstring(REGEX REPLACE \"..(..).\" \"\\\\1\" TBB_BINARY_MINOR_VERSION \"${TBB_INTERFACE_VERSION}\")\nset(TBBMALLOC_BINARY_VERSION 2)\nset(TBBBIND_BINARY_VERSION 3)\n\nproject(TBB VERSION ${_tbb_ver_major}.${_tbb_ver_minor}.${_tbb_ver_patch} LANGUAGES CXX)\nunset(_tbb_ver_major)\nunset(_tbb_ver_minor)\n\ninclude(CheckCXXCompilerFlag)\ninclude(GNUInstallDirs)\ninclude(CMakeDependentOption)\n\n# ---------------------------------------------------------------------------------------------------------\n# Handle C++ standard version.\nif (NOT MSVC)  # no need to cover MSVC as it uses C++14 by default.\n    if (NOT CMAKE_CXX_STANDARD)\n        set(CMAKE_CXX_STANDARD 11)\n    endif()\n\n    if (CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION)  # if standard option was detected by CMake\n        set(CMAKE_CXX_STANDARD_REQUIRED ON)\n    else()  # if standard option wasn't detected by CMake (e.g. for Intel Compiler with CMake 3.1)\n        # TBB_CXX_STD_FLAG should be added to targets via target_compile_options\n        set(TBB_CXX_STD_FLAG -std=c++${CMAKE_CXX_STANDARD})\n\n        check_cxx_compiler_flag(${TBB_CXX_STD_FLAG} c++${CMAKE_CXX_STANDARD})\n        if (NOT c++${CMAKE_CXX_STANDARD})\n            message(FATAL_ERROR \"C++${CMAKE_CXX_STANDARD} (${TBB_CXX_STD_FLAG}) support is required\")\n        endif()\n        unset(c++${CMAKE_CXX_STANDARD})\n    endif()\nendif()\n\nset(CMAKE_CXX_EXTENSIONS OFF) # use -std=c++... instead of -std=gnu++...\n# ---------------------------------------------------------------------------------------------------------\n# Setup symbol visibility properties.\n\nset(CMAKE_VISIBILITY_INLINES_HIDDEN TRUE)\nset(CMAKE_CXX_VISIBILITY_PRESET \"hidden\")\n# ---------------------------------------------------------------------------------------------------------\n\n# Detect architecture (bitness).\nif (CMAKE_SIZEOF_VOID_P EQUAL 4)\n    set(TBB_ARCH 32)\nelse()\n    set(TBB_ARCH 64)\nendif()\n\noption(TBB_TEST \"Enable testing\" ON)\noption(TBB_EXAMPLES \"Enable examples\" OFF)\noption(TBB_STRICT \"Treat compiler warnings as errors\" ON)\noption(TBB_WINDOWS_DRIVER \"Build as Universal Windows Driver (UWD)\" OFF)\noption(TBB_NO_APPCONTAINER \"Apply /APPCONTAINER:NO (for testing binaries for Windows Store)\" OFF)\noption(TBB4PY_BUILD \"Enable tbb4py build\" OFF)\noption(TBB_BUILD \"Enable tbb build\" ON)\noption(TBBMALLOC_BUILD \"Enable tbbmalloc build\" ON)\ncmake_dependent_option(TBBMALLOC_PROXY_BUILD \"Enable tbbmalloc_proxy build\" ON \"TBBMALLOC_BUILD\" OFF)\noption(TBB_CPF \"Enable preview features of the library\" OFF)\noption(TBB_FIND_PACKAGE \"Enable search for external oneTBB using find_package instead of build from sources\" OFF)\noption(TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH \"Disable HWLOC automatic search by pkg-config tool\" ${CMAKE_CROSSCOMPILING})\noption(TBB_ENABLE_IPO \"Enable Interprocedural Optimization (IPO) during the compilation\" ON)\noption(TBB_CONTROL_FLOW_GUARD \"Enable Control Flow Guard (CFG) during the compilation\" OFF)\noption(TBB_FUZZ_TESTING \"Enable fuzz testing\" OFF)\noption(TBB_INSTALL \"Enable installation\" ON)\noption(TBB_FILE_TRIM \"Enable __FILE__ trim\" ON)\nif(LINUX)\noption(TBB_LINUX_SEPARATE_DBG \"Enable separation of the debug symbols during the build\" OFF)\nendif()\nif(APPLE)\noption(TBB_BUILD_APPLE_FRAMEWORKS \"Build as Apple Frameworks\" OFF)\nendif()\n\nif (NOT DEFINED BUILD_SHARED_LIBS)\n    set(BUILD_SHARED_LIBS ON)\nendif()\n\nif (NOT BUILD_SHARED_LIBS)\n    if(NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE)\n        set(CMAKE_POSITION_INDEPENDENT_CODE ON)\n    endif()\n    message(WARNING \"You are building oneTBB as a static library. This is highly discouraged and such configuration is not supported. Consider building a dynamic library to avoid unforeseen issues.\")\nendif()\n\nif (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)\n    set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING \"Build type\" FORCE)\n    message(STATUS \"CMAKE_BUILD_TYPE is not specified. Using default: ${CMAKE_BUILD_TYPE}\")\n    # Possible values of build type for cmake-gui\n    set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS \"Debug\" \"Release\" \"MinSizeRel\" \"RelWithDebInfo\")\nendif()\n\nif (CMAKE_BUILD_TYPE)\n    string(TOLOWER ${CMAKE_BUILD_TYPE} _tbb_build_type)\n    if (_tbb_build_type STREQUAL \"debug\")\n        set(TBB_ENABLE_IPO OFF)\n    endif()\n    unset(_tbb_build_type)\nendif()\n\n# -------------------------------------------------------------------\n# Files and folders naming\nset(CMAKE_DEBUG_POSTFIX _debug)\n\nif (NOT DEFINED TBB_OUTPUT_DIR_BASE)\n    if (MSVC)\n        if (NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY OR CMAKE_MSVC_RUNTIME_LIBRARY MATCHES DLL)\n            set(_tbb_msvc_runtime _md)\n        else()\n            set(_tbb_msvc_runtime _mt)\n        endif()\n\n        if (WINDOWS_STORE)\n            if (TBB_NO_APPCONTAINER)\n                set(_tbb_win_store _wsnoappcont)\n            else()\n                set(_tbb_win_store _ws)\n            endif()\n        elseif(TBB_WINDOWS_DRIVER)\n            set(_tbb_win_store _wd)\n        endif()\n    endif()\n\n     string(REGEX MATCH \"^([0-9]+\\.[0-9]+|[0-9]+)\" _tbb_compiler_version_short ${CMAKE_CXX_COMPILER_VERSION})\n     string(TOLOWER ${CMAKE_CXX_COMPILER_ID}_${_tbb_compiler_version_short}_cxx${CMAKE_CXX_STANDARD}_${TBB_ARCH}${_tbb_msvc_runtime}${_tbb_win_store} TBB_OUTPUT_DIR_BASE)\n     unset(_tbb_msvc_runtime)\n     unset(_tbb_win_store)\n     unset(_tbb_compiler_version_short)\nendif()\n\nforeach(output_type LIBRARY ARCHIVE PDB RUNTIME)\n    if (CMAKE_BUILD_TYPE)\n        string(TOLOWER ${CMAKE_BUILD_TYPE} _tbb_build_type_lower)\n        set(CMAKE_${output_type}_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${TBB_OUTPUT_DIR_BASE}_${_tbb_build_type_lower})\n        unset(_tbb_build_type_lower)\n    endif()\n\n    if (CMAKE_CONFIGURATION_TYPES)\n        foreach(suffix ${CMAKE_CONFIGURATION_TYPES})\n            string(TOUPPER ${suffix} _tbb_suffix_upper)\n            string(TOLOWER ${suffix} _tbb_suffix_lower)\n            set(CMAKE_${output_type}_OUTPUT_DIRECTORY_${_tbb_suffix_upper} ${CMAKE_BINARY_DIR}/${TBB_OUTPUT_DIR_BASE}_${_tbb_suffix_lower})\n        endforeach()\n        unset(_tbb_suffix_lower)\n        unset(_tbb_suffix_upper)\n    endif()\nendforeach()\n\nif (CMAKE_CONFIGURATION_TYPES)\n    # We can't use generator expressions in a cmake variable name.\n    set(TBB_TEST_WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${TBB_OUTPUT_DIR_BASE}_$<LOWER_CASE:$<CONFIG>>)\nelse()\n    set(TBB_TEST_WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})\nendif()\n\n# -------------------------------------------------------------------\n\n# -------------------------------------------------------------------\n# Common dependencies\n#force -pthread during compilation for Emscripten\nif (EMSCRIPTEN AND NOT EMSCRIPTEN_WITHOUT_PTHREAD)\n   set(THREADS_HAVE_PTHREAD_ARG TRUE)\nendif()\n\nset(THREADS_PREFER_PTHREAD_FLAG TRUE)\nfind_package(Threads REQUIRED)\n# -------------------------------------------------------------------\n\nfile(GLOB FILES_WITH_EXTRA_TARGETS ${CMAKE_CURRENT_SOURCE_DIR}/cmake/*.cmake)\nforeach(FILE_WITH_EXTRA_TARGETS ${FILES_WITH_EXTRA_TARGETS})\n    include(${FILE_WITH_EXTRA_TARGETS})\nendforeach()\n\n# - Enabling LTO on Android causes the NDK bug.\n#   NDK throws the warning: \"argument unused during compilation: '-Wa,--noexecstack'\"\n# - For some reason GCC does not instrument code with Thread Sanitizer when lto is enabled and C linker is used.\nif (TBB_ENABLE_IPO AND BUILD_SHARED_LIBS AND NOT ANDROID_PLATFORM AND NOT TBB_SANITIZE MATCHES \"thread\")\n    if (NOT CMAKE_VERSION VERSION_LESS 3.9)\n        cmake_policy(SET CMP0069 NEW)\n        include(CheckIPOSupported)\n        check_ipo_supported(RESULT TBB_IPO_PROPERTY)\n    else()\n        set(TBB_IPO_FLAGS TRUE)\n    endif()\n    if (TBB_IPO_PROPERTY OR TBB_IPO_FLAGS)\n        message(STATUS \"IPO enabled\")\n    endif()\nendif()\n\nif (TBB_FILE_TRIM)\n    file(RELATIVE_PATH TBB_RELATIVE_BIN_PATH ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})\n    file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} NATIVE_TBB_PROJECT_ROOT_DIR)\n    file(TO_NATIVE_PATH ${TBB_RELATIVE_BIN_PATH} NATIVE_TBB_RELATIVE_BIN_PATH)\nendif ()\n\nif (TBB_CONTROL_FLOW_GUARD)\n    message(STATUS \"Control Flow Guard (CFG) enabled\")\nendif()\n\nset(TBB_COMPILER_SETTINGS_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/compilers/${CMAKE_CXX_COMPILER_ID}.cmake)\nif (EXISTS ${TBB_COMPILER_SETTINGS_FILE})\n    include(${TBB_COMPILER_SETTINGS_FILE})\nelse()\n    message(WARNING \"TBB compiler settings not found ${TBB_COMPILER_SETTINGS_FILE}\")\nendif()\n\nif (TBB_FIND_PACKAGE AND TBB_DIR)\n    # Allow specifying external TBB to test with.\n    # Do not add main targets and installation instructions in that case.\n    message(STATUS \"Using external TBB for testing\")\n    find_package(TBB REQUIRED)\nelse()\n    if (TBB_BUILD)\n        add_subdirectory(src/tbb)\n    endif()\n    if (TBBMALLOC_BUILD)\n        add_subdirectory(src/tbbmalloc)\n        if(TBBMALLOC_PROXY_BUILD AND NOT \"${MSVC_CXX_ARCHITECTURE_ID}\" MATCHES \"ARM64\")\n            add_subdirectory(src/tbbmalloc_proxy)\n        endif()\n    endif()\n    if (NOT BUILD_SHARED_LIBS)\n        message(STATUS \"TBBBind build targets are disabled due to unsupported environment\")\n    else()\n        add_subdirectory(src/tbbbind)\n    endif()\n    if (TBB_INSTALL)\n        # -------------------------------------------------------------------\n        # Installation instructions\n        include(CMakePackageConfigHelpers)\n\n        install(DIRECTORY include/\n                DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}\n                COMPONENT devel)\n\n        install(EXPORT ${PROJECT_NAME}Targets\n                NAMESPACE TBB::\n                DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}\n                COMPONENT devel)\n        file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake\n                   \"include(\\${CMAKE_CURRENT_LIST_DIR}/${PROJECT_NAME}Targets.cmake)\\n\")\n        if (NOT BUILD_SHARED_LIBS)\n            file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake\n                       \"include(CMakeFindDependencyMacro)\\nfind_dependency(Threads)\\n\")\n        endif()\n\n        write_basic_package_version_file(\"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake\"\n                                         COMPATIBILITY AnyNewerVersion)\n\n        install(FILES \"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake\"\n                      \"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake\"\n                DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}\n                COMPONENT devel)\n\n        install(FILES \"README.md\"\n                DESTINATION ${CMAKE_INSTALL_DOCDIR}\n                COMPONENT devel)\n        # -------------------------------------------------------------------\n    endif()\nendif()\n\nif (TBB_TEST)\n    enable_testing()\n    add_subdirectory(test)\nendif()\n\nif (TBB_EXAMPLES)\n    add_subdirectory(examples)\nendif()\n\nif (TBB_BENCH)\n    if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/benchmark)\n        message(FATAL_ERROR \"Benchmarks are not supported yet\")\n    endif()\n\n    enable_testing()\n    add_subdirectory(benchmark)\nendif()\n\nif (ANDROID_PLATFORM)\n    if (\"${ANDROID_STL}\" STREQUAL \"c++_shared\")\n        if (${ANDROID_NDK_MAJOR} GREATER_EQUAL \"25\")\n            if(ANDROID_ABI STREQUAL \"arm64-v8a\")\n                set(ANDROID_TOOLCHAIN_NAME \"aarch64-linux-android\")\n            elseif(ANDROID_ABI STREQUAL \"x86_64\")\n                set(ANDROID_TOOLCHAIN_NAME \"x86_64-linux-android\")\n            elseif(ANDROID_ABI STREQUAL \"armeabi-v7a\")\n                set(ANDROID_TOOLCHAIN_NAME \"arm-linux-androideabi\")\n            elseif(ANDROID_ABI STREQUAL \"x86\")\n                set(ANDROID_TOOLCHAIN_NAME \"i686-linux-android\")\n            endif()\n\n            configure_file(\n            \"${ANDROID_TOOLCHAIN_ROOT}/sysroot/usr/lib/${ANDROID_TOOLCHAIN_NAME}/libc++_shared.so\"\n            \"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libc++_shared.so\"\n            COPYONLY)\n        else()\n            configure_file(\n                \"${ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${ANDROID_ABI}/libc++_shared.so\"\n                \"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libc++_shared.so\"\n                COPYONLY)\n        endif()\n    endif()\n    # This custom target may be implemented without separate CMake script, but it requires\n    # ADB(Android Debug Bridge) executable file availability, so to incapsulate this requirement\n    # only for corresponding custom target, it was implemented by this way.\n    add_custom_target(device_environment_cleanup COMMAND ${CMAKE_COMMAND}\n                      -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/android/device_environment_cleanup.cmake)\nendif()\n\nif (TBB4PY_BUILD)\n    add_subdirectory(python)\nendif()\n\n# Keep it the last instruction.\nadd_subdirectory(cmake/post_install)\n"
  },
  {
    "path": "third-party/tbb/CODEOWNERS",
    "content": "# Where component owners are known, add them here.\n\n/oneTBB/src/tbb/ @pavelkumbrasev\n/oneTBB/src/tbb/ @dnmokhov\n/oneTBB/src/tbb/ @sarathnandu\n/oneTBB/include/oneapi/tbb/parallel_* @pavelkumbrasev\n/oneTBB/include/oneapi/tbb/concurrent_* @kboyarinov\n/oneTBB/include/oneapi/tbb/flow_graph* @kboyarinov\n/oneTBB/include/oneapi/tbb/flow_graph* @aleksei-fedotov\n/oneTBB/include/oneapi/tbb/detail/_flow_graph* @kboyarinov\n/oneTBB/include/oneapi/tbb/detail/_flow_graph* @aleksei-fedotov\n/oneTBB/include/oneapi/tbb/detail/_concurrent* @kboyarinov\n/oneTBB/src/doc @aepanchi\n/oneTBB/src/tbbbind/ @isaevil\n/oneTBB/src/tbbmalloc/ @lplewa\n/oneTBB/src/tbbmalloc_proxy/ @lplewa\n/oneTBB/cmake/ @isaevil\n/oneTBB/*CMakeLists.txt @isaevil\n/oneTBB/python/ @sarathnandu\n/oneTBB/python/ @isaevil\n\n# Bazel build related files.\n/oneTBB/.bazelversion @Vertexwahn\n/oneTBB/Bazel.md @Vertexwahn\n/oneTBB/BUILD.bazel @Vertexwahn\n/oneTBB/MODULE.bazel @Vertexwahn\n"
  },
  {
    "path": "third-party/tbb/CODE_OF_CONDUCT.md",
    "content": "\n# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participation in our\ncommunity a harassment-free experience for everyone, regardless of age, body\nsize, visible or invisible disability, ethnicity, sex characteristics, gender\nidentity and expression, level of experience, education, socio-economic status,\nnationality, personal appearance, race, caste, color, religion, or sexual\nidentity and orientation.\n\nWe pledge to act and interact in ways that contribute to an open, welcoming,\ndiverse, inclusive, and healthy community.\n\n## Our Standards\n\nExamples of behavior that contributes to a positive environment for our\ncommunity include:\n\n* Demonstrating empathy and kindness toward other people\n* Being respectful of differing opinions, viewpoints, and experiences\n* Giving and gracefully accepting constructive feedback\n* Accepting responsibility and apologizing to those affected by our mistakes,\n  and learning from the experience\n* Focusing on what is best not just for us as individuals, but for the overall\n  community\n\nExamples of unacceptable behavior include:\n\n* The use of sexualized language or imagery, and sexual attention or advances of\n  any kind\n* Trolling, insulting or derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or email address,\n  without their explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n  professional setting\n\n## Enforcement Responsibilities\n\nCommunity leaders are responsible for clarifying and enforcing our standards of\nacceptable behavior and will take appropriate and fair corrective action in\nresponse to any behavior that they deem inappropriate, threatening, offensive,\nor harmful.\n\nCommunity leaders have the right and responsibility to remove, edit, or reject\ncomments, commits, code, wiki edits, issues, and other contributions that are\nnot aligned to this Code of Conduct, and will communicate reasons for moderation\ndecisions when appropriate.\n\n## Scope\n\nThis Code of Conduct applies within all community spaces, and also applies when\nan individual is officially representing the community in public spaces.\nExamples of representing our community include using an official email address,\nposting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported to the community leaders responsible for enforcement at\noneTBBCodeOfConduct At intel DOT com.\nAll complaints will be reviewed and investigated promptly and fairly.\n\nAll community leaders are obligated to respect the privacy and security of the\nreporter of any incident.\n\n## Enforcement Guidelines\n\nCommunity leaders will follow these Community Impact Guidelines in determining\nthe consequences for any action they deem in violation of this Code of Conduct:\n\n### 1. Correction\n\n**Community Impact**: Use of inappropriate language or other behavior deemed\nunprofessional or unwelcome in the community.\n\n**Consequence**: A private, written warning from community leaders, providing\nclarity around the nature of the violation and an explanation of why the\nbehavior was inappropriate. A public apology may be requested.\n\n### 2. Warning\n\n**Community Impact**: A violation through a single incident or series of\nactions.\n\n**Consequence**: A warning with consequences for continued behavior. No\ninteraction with the people involved, including unsolicited interaction with\nthose enforcing the Code of Conduct, for a specified period of time. This\nincludes avoiding interactions in community spaces as well as external channels\nlike social media. Violating these terms may lead to a temporary or permanent\nban.\n\n### 3. Temporary Ban\n\n**Community Impact**: A serious violation of community standards, including\nsustained inappropriate behavior.\n\n**Consequence**: A temporary ban from any sort of interaction or public\ncommunication with the community for a specified period of time. No public or\nprivate interaction with the people involved, including unsolicited interaction\nwith those enforcing the Code of Conduct, is allowed during this period.\nViolating these terms may lead to a permanent ban.\n\n### 4. Permanent Ban\n\n**Community Impact**: Demonstrating a pattern of violation of community\nstandards, including sustained inappropriate behavior, harassment of an\nindividual, or aggression toward or disparagement of classes of individuals.\n\n**Consequence**: A permanent ban from any sort of public interaction within the\ncommunity.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage],\nversion 2.1, available at\n[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].\n\nCommunity Impact Guidelines were inspired by\n[Mozilla's code of conduct enforcement ladder][Mozilla CoC].\n\nFor answers to common questions about this code of conduct, see the FAQ at\n[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at\n[https://www.contributor-covenant.org/translations][translations].\n\n[homepage]: https://www.contributor-covenant.org\n[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html\n[Mozilla CoC]: https://github.com/mozilla/diversity\n[FAQ]: https://www.contributor-covenant.org/faq\n[translations]: https://www.contributor-covenant.org/translations\n\n"
  },
  {
    "path": "third-party/tbb/CONTRIBUTING.md",
    "content": "<!--\n******************************************************************************\n* \n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n*     http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*******************************************************************************/-->\n\n# How to Contribute\nAs an open source project, we welcome community contributions to oneAPI Threading Building Blocks (oneTBB).  This document explains how to participate in project conversations, log bugs and enhancement requests, and submit code patches to the project. \n\n## Licensing \n\nLicensing is very important to open source projects. It helps ensure the software continues to be available under the terms that the author desired. The oneTBB project uses the [Apache 2.0 License](https://github.com/uxlfoundation/oneTBB/blob/master/LICENSE.txt), a permissive open source license that allows you to freely use, modify, and distribute your own products that include Apache 2.0 licensed software. By contributing to the oneTBB project, you agree to the license and copyright terms therein and release your own contributions under these terms. \n\nSome imported or reused components within oneTBB use other licenses, as described in [third-party-programs.txt](https://github.com/uxlfoundation/oneTBB/blob/master/third-party-programs.txt). By carefully reviewing potential contributions, we can ensure that the community can develop products with oneTBB without concerns over patent or copyright issues. \n\n## Prerequisites \n\nAs a contributor, you'll want to be familiar with the oneTBB project and the repository layout. You should also know how to use it as explained in the [oneTBB documentation](https://uxlfoundation.github.io/oneTBB/) and how to set up your build development environment to configure, build, and test oneTBB as explained in the [oneTBB Build System Description](cmake/README.md). \n\n## Pull Requests \n\nYou can find all [open oneTBB pull requests](https://github.com/uxlfoundation/oneTBB/pulls) on GitHub. \n \n### Before contributing changes directly to the oneTBB repository\n\n* Make sure you can build the product and run all the tests with your patch. \n* For a larger feature, provide a relevant test. \n* Document your code. The oneTBB project uses reStructuredText for documentation.  \n* Update the copyright year in the first line of the changing file(s). \n  For example, if you commit your changes in 2022:\n  * the copyright year should be `2005-2022` for existing files\n  * the copyright year should be `2022` for new files\n* Submit a pull request into the master branch. You can submit changes with a pull request (preferred) or by sending an email patch.  \n\nContinuous Integration (CI) testing is enabled for the repository. Your pull request must pass all checks before it can be merged. We will review your contribution and may provide feedback to guide you if any additional fixes or modifications are necessary. When reviewed and accepted, your pull request will be merged into our GitHub repository. \n"
  },
  {
    "path": "third-party/tbb/INSTALL.md",
    "content": "# Installation from Sources\n\n\n## Prerequisites \n   \n   - Make sure you have installed CMake version 3.1 (or newer) on your system. oneTBB uses CMake build configuration.\n   - Configure and build oneTBB. To work with build configurations, see [Build System Description](cmake/README.md). \n\n\n## Configure oneTBB\n\nAt the command prompt, type:\n```\ncmake <options> <repo_root>\n```\n\nYou may want to use some additional options for configuration:\n\n| Option                    | Purpose                   | Description                                                                        |\n| ------                    |------                     | ------                                                                             |\n| `-G <generator>`          | Specify project generator | For more information, run cmake `–help`.                                           |\n|`-DCMAKE_BUILD_TYPE=Debug` | Specify for Debug build   | Not applicable for multi-configuration generators such as Visual Studio generator. |\n\n\n## Build oneTBB\n \nTo build the system, run:\n```\ncmake --build . <options>\n```\n\nSome useful build options:\n- `--target <target>` - specific target, \"all\" is default.\n-\t`--config <Release|Debug>` - build configuration, applicable only for multi-config generators such as Visual Studio generator.\n\n\n## Install and Pack oneTBB\n\n---\n**NOTE**\n\nBe careful about installing prefix. It defaults to `/usr/local` on UNIX* and `c:/Program Files/${PROJECT_NAME}` on Windows* OS.\nYou can define custom `CMAKE_INSTALL_PREFIX` during configuration:\n\n```\ncmake -DCMAKE_INSTALL_PREFIX=/my/install/prefix ..\n```\n\n---\n\nInstallation can also be done using:\n\n```\ncmake --install <project-binary-dir>\n```\n\nSpecial ``--install`` target can alternatively be used for installation, e.g. ``make install``.\n\nYou can use the ``install`` components for partial installation.\n\nThe following install components are supported:\n- `runtime` - oneTBB runtime package (core shared libraries and `.dll` files on Windows* OS).\n- `devel` - oneTBB development package (header files, CMake integration files, library symbolic links, and `.lib` files on Windows* OS).\n- `tbb4py` - [oneTBB Module for Python](https://github.com/uxlfoundation/oneTBB/blob/master/python/README.md).\n\nIf you want to install specific components after configuration and build, run:\n\n```bash\ncmake -DCOMPONENT=<component> [-DBUILD_TYPE=<build-type>] -P cmake_install.cmake\n```\n\nSimple packaging using CPack is supported.\nThe following commands allow you to create a simple portable package that includes header files, libraries, and integration files for CMake:\n\n```bash\ncmake <options> ..\ncpack\n```\n\n## Installation from vcpkg\n\nYou can download and install oneTBB using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:\n```sh\n  git clone https://github.com/Microsoft/vcpkg.git\n  cd vcpkg\n  ./bootstrap-vcpkg.sh #.\\bootstrap-vcpkg.bat(for Windows)\n  ./vcpkg integrate install\n  ./vcpkg install tbb\n```\n\nThe oneTBB port in vcpkg is kept up to date by Microsoft* team members and community contributors. If the version is out of date, create an issue or pull request on the [vcpkg repository](https://github.com/Microsoft/vcpkg).\n\n## Example of Installation\n\n### Single-configuration generators\n\nThe following example demonstrates how to install oneTBB for single-configuration generators (e.g. GNU Make, Ninja, etc.).\n```bash\n# Do our experiments in /tmp\ncd /tmp\n# Clone oneTBB repository\ngit clone https://github.com/uxlfoundation/oneTBB.git\ncd oneTBB\n# Create binary directory for out-of-source build\nmkdir build && cd build\n# Configure: customize CMAKE_INSTALL_PREFIX and disable TBB_TEST to avoid tests build\ncmake -DCMAKE_INSTALL_PREFIX=/tmp/my_installed_onetbb -DTBB_TEST=OFF ..\n# Build\ncmake --build .\n# Install\ncmake --install .\n# Well done! Your installed oneTBB is in /tmp/my_installed_onetbb\n```\n\n### Multi-configuration generators\n\nThe following example demonstrates how to install oneTBB for multi-configuration generators such as Visual Studio*. \n\nChoose the configuration during the build and install steps:\n```batch\nREM Do our experiments in %TMP%\ncd %TMP%\nREM Clone oneTBB repository\ngit clone https://github.com/uxlfoundation/oneTBB.git\ncd oneTBB\nREM Create binary directory for out-of-source build\nmkdir build && cd build\nREM Configure: customize CMAKE_INSTALL_PREFIX and disable TBB_TEST to avoid tests build\ncmake -DCMAKE_INSTALL_PREFIX=%TMP%\\my_installed_onetbb -DTBB_TEST=OFF ..\nREM Build \"release with debug information\" configuration \ncmake --build . --config relwithdebinfo\nREM Install \"release with debug information\" configuration \ncmake --install . --config relwithdebinfo\nREM Well done! Your installed oneTBB is in %TMP%\\my_installed_onetbb\n```\n"
  },
  {
    "path": "third-party/tbb/LICENSE.txt",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "third-party/tbb/MAINTAINERS.md",
    "content": "<!--\n******************************************************************************\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n*     http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*******************************************************************************/-->\n\n# Introduction\n\nThis document defines roles in the oneTBB project.\n\n# Roles and Responsibilities\n\noneTBB project defines three main roles:\n * [Contributor](#contributor)\n * [Code Owner](#code-Owner)\n * [Maintainer](#maintainer)\n\n[permissions]: https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role\n\n|                                                                                                                                             |       Contributor       |       Code Owner        |       Maintainer        |\n| :------------------------------------------------------------------------------------------------------------------------------------------ | :---------------------: | :---------------------: | :---------------------: |\n| _Responsibilities_                                                                                                                          |                         |                         |                         |\n| Follow the [Code of Conduct](./CODE_OF_CONDUCT.md)                                                                                          |            ✓            |            ✓           |            ✓            |\n| Follow [Contribution Guidelines](./CONTRIBUTING.md)                                                                                         |            ✓            |            ✓           |            ✓            |\n| Ensure [Contribution Guidelines](./CONTRIBUTING.md) are followed                                                                            |            ✗            |            ✓           |            ✓            |\n| Co-own component or aspect of the library,<br>  including contributing: bug fixes, implementing features,<br> and performance optimizations |            ✗            |            ✓           |            ✓            |\n| Co-own on technical direction of component or<br> aspect of the library including work on RFCs                                              |            ✗            |            ✓           |            ✓            |\n| Co-own the project as a whole,<br> including determining strategy and policy for the project                                                |            ✗            |            ✗           |            ✓            |\n| _Privileges_                                                                                                                                |                         |                         |                         |\n| Permission granted                                                                                                                          |   [Read][permissions]   |   [Write][permissions]  | [Maintain][permissions] |\n| Eligible to become                                                                                                                          |       Code Owner        |       Maintainer        |            ✗            |\n| Can recommend Contributors<br> to become Code Owner                                                                                         |            ✗            |            ✓           |            ✓            |\n| Can participate in promotions of<br> Code Owners and  Maintainers                                                                           |            ✗            |            ✗           |            ✓            |\n| Can suggest Milestones during planning                                                                                                      |            ✓            |            ✓           |            ✓            |\n| Can choose Milestones for specific component                                                                                                |            ✗            |            ✓           |            ✓            |\n| Make a decision on project's Milestones during planning                                                                                     |            ✗            |            ✗           |            ✓            |\n| Can propose new RFC or<br> participate in review of existing RFC                                                                            |            ✓            |            ✓           |            ✓            |\n| Can request rework of RFCs<br> in represented area of responsibility                                                                        |            ✗            |            ✓           |            ✓            |\n| Can request rework of RFCs<br> in any part of the project                                                                                   |            ✗            |            ✗           |            ✓            |\n| Can manage release process of the project                                                                                                   |            ✗            |            ✗           |            ✓            |\n| Can represent the project in public as a Maintainer                                                                                         |            ✗            |            ✗           |            ✓            |\n\nThese roles are merit based. Refer to the corresponding section for specific\nrequirements and the nomination process.\n\n## Contributor\n\nA Contributor invests time and resources to improve oneTBB project.\nAnyone can become a Contributor by bringing value in any following way:\n  * Answer questions from community members.\n  * Propose changes to the design.\n  * Provide feedback on design proposals.\n  * Review and/or test pull requests.\n  * Test releases and report bugs.\n  * Contribute code, including bug fixes, features implementations,\nand performance optimizations.\n\n## Code Owner\n\nA Code Owner has responsibility for a specific project component or a functional\narea. Code Owners are collectively responsible\nfor developing and maintaining their component or functional areas, including\nreviewing all changes to corresponding areas of responsibility and indicating\nwhether those changes are ready to be merged. Code Owners have a track record of\ncontribution and review in the project.\n\n**Requirements:**\n  * Track record of accepted code contributions to a specific project component.\n  * Track record of contributions to the code review process.\n  * Demonstrate in-depth knowledge of the architecture of a specific project\n    component.\n  * Commit to being responsible for that specific area.\n\nHow to become a Code Owner?\n1. A Contributor is nominated by opening a PR modifying the MAINTAINERS.md file\nincluding name, Github username, and affiliation.\n2. At least two specific component Maintainers approve the PR.\n3. [CODEOWNERS](./CODEOWNERS) file is updated to represent corresponding areas of responsibility.\n\n## Maintainer\nMaintainers are the most established contributors responsible for the \nproject technical direction. They participate in making decisions about the\nstrategy and priorities of the project.\n\n**Requirements:**\n  * Have experience as a Code Owner.\n  * Track record of major project contributions to a specific project component.\n  * Demonstrate deep knowledge of a specific project component.\n  * Demonstrate broad knowledge of the project across multiple areas.\n  * Commit to using privileges responsibly for the good of the project.\n  * Be able to exercise judgment for the good of the project, independent of\n    their employer, friends, or team.\n\nProcess of becoming a maintainer:\n1. A Maintainer may nominate a current code owner to become a new Maintainer by \nopening a PR against MAINTAINERS.md file.\n2. A majority of the current Maintainers must then approve the PR.\n\n# Code Owners and Maintainers List\n\n## oneTBB core (API, Architecture, Tests)\n\n| Name                  | Github ID             | Affiliation       | Role       |\n| --------------------- | --------------------- | ----------------- | ---------- |\n| Ilya Isaev            | @isaevil              | Intel Corporation | Code Owner |\n| Sarath Nandu R        | @sarathnandu          | Intel Corporation | Code Owner |\n| Dmitri Mokhov         | @dnmokhov             | Intel Corporation | Code Owner |\n| Alexey Kukanov        | @akukanov             | Intel Corporation | Code Owner |\n| Konstantin Boyarinov  | @kboyarinov           | Intel Corporation | Maintainer |\n| Aleksei Fedotov       | @aleksei-fedotov      | Intel Corporation | Maintainer |\n| Michael Voss          | @vossmjp              | Intel Corporation | Maintainer |\n| Pavel Kumbrasev       | @pavelkumbrasev       | Intel Corporation | Maintainer |\n\n## oneTBB TBBMALLOC (API, Architecture, Tests)\n\n| Name                  | Github ID             | Affiliation       | Role       |\n| --------------------- | --------------------- | ----------------- | ---------- |\n| Łukasz Plewa          | @lplewa               | Intel Corporation | Maintainer |\n\n\n## oneTBB Documentation\n\n| Name                   | Github ID             | Affiliation       | Role       |\n| ---------------------- | --------------------- | ----------------- | ---------- |\n| Alexandra Epanchinzeva | @aepanchi             | Intel Corporation | Code Owner |\n\n\n## oneTBB Release Management\n\n| Name               | Github ID             | Affiliation       | Role       |\n| ------------------ | --------------------- | ----------------- | ---------- |\n| Olga Malysheva     | @omalyshe             | Intel Corporation | Maintainer |\n\n"
  },
  {
    "path": "third-party/tbb/MODULE.bazel",
    "content": "# Copyright (c) 2021-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# DISCLAIMER: Bazel support is community-based. The maintainers do not\n# use Bazel internally. The Bazel build can have security risks or\n# optimization gaps.\n\nmodule(\n    name = \"onetbb\",\n    compatibility_level = 1,\n)\n\nbazel_dep(name = \"platforms\", version = \"0.0.10\")\n"
  },
  {
    "path": "third-party/tbb/README.md",
    "content": "# oneAPI Threading Building Blocks (oneTBB) <img align=\"right\" width=\"200\" height=\"100\" src=\"https://raw.githubusercontent.com/uxlfoundation/artwork/e98f1a7a3d305c582d02c5f532e41487b710d470/foundation/uxl-foundation-logo-horizontal-color.svg\">\n[![Apache License Version 2.0](https://img.shields.io/badge/license-Apache_2.0-green.svg)](LICENSE.txt) [![oneTBB CI](https://github.com/uxlfoundation/oneTBB/actions/workflows/ci.yml/badge.svg)](https://github.com/uxlfoundation/oneTBB/actions/workflows/ci.yml?query=branch%3Amaster)\n[![Join the community on GitHub Discussions](https://badgen.net/badge/join%20the%20discussion/on%20github/blue?icon=github)](https://github.com/uxlfoundation/oneTBB/discussions)\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9125/badge)](https://www.bestpractices.dev/projects/9125)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/uxlfoundation/oneTBB/badge)](https://securityscorecards.dev/viewer/?uri=github.com/uxlfoundation/oneTBB)\n[![Gurubase](https://img.shields.io/badge/Gurubase-Ask%20oneTBB%20Guru-006BFF)](https://gurubase.io/g/onetbb)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/oneapi-src/oneTBB/badge)](https://securityscorecards.dev/viewer/?uri=github.com/oneapi-src/oneTBB)\n[![Coverity Scan Build Status](https://img.shields.io/coverity/scan/30373.svg)](https://scan.coverity.com/projects/oneapi-src-onetbb)\n\noneTBB is a flexible C++ library that simplifies the work of adding parallelism\nto complex applications, even if you are not a threading expert.  \n\nThe library lets you easily write parallel programs that take full advantage of the multi-core performance. Such programs are portable, \ncomposable and have a future-proof scalability. oneTBB provides you with functions, interfaces, and classes to parallelize and scale the code.\nAll you have to do is to use the templates. \n\nThe library differs from typical threading packages in the following ways:\n* oneTBB enables you to specify logical parallelism instead of threads.\n* oneTBB targets threading for performance.\n* oneTBB is compatible with other threading packages.\n* oneTBB emphasizes scalable, data parallel programming.\n* oneTBB relies on generic programming.\n\n\nRefer to oneTBB [examples](examples) and [samples](https://github.com/oneapi-src/oneAPI-samples/tree/master/Libraries/oneTBB) to see how you can use the library.\n\noneTBB is a part of the [UXL Foundation](http://www.uxlfoundation.org) and is an implementation of [oneAPI specification](https://oneapi.io).\n\n> **_NOTE:_** Threading Building Blocks (TBB) is now called oneAPI Threading Building Blocks (oneTBB) to highlight that the tool is a part of the oneAPI ecosystem.\n\n## Release Information\n\nSee [Release Notes](RELEASE_NOTES.md) and [System Requirements](SYSTEM_REQUIREMENTS.md).\n\n## Documentation\n* [oneTBB Specification](https://spec.oneapi.com/versions/latest/elements/oneTBB/source/nested-index.html)\n* [oneTBB Developer Guide and Reference](https://uxlfoundation.github.io/oneTBB)\n* [Migrating from TBB to oneTBB](https://uxlfoundation.github.io/oneTBB/main/tbb_userguide/Migration_Guide.html)\n* [README for the CMake build system](cmake/README.md)\n* [oneTBB Testing Approach](https://uxlfoundation.github.io/oneTBB/main/intro/testing_approach.html)\n* [Basic support for the Bazel build system](Bazel.md)\n* [oneTBB Discussions](https://github.com/uxlfoundation/oneTBB/discussions)\n* [WASM Support](WASM_Support.md)\n\n## Installation \nSee [Installation from Sources](INSTALL.md) to learn how to install oneTBB. \n\n## Governance\n\nThe oneTBB project is governed by the UXL Foundation.\nYou can get involved in this project in following ways:\n* Join the [Open Source and Specification Working Group](https://github.com/uxlfoundation/foundation/tree/main?tab=readme-ov-file#working-groups) meetings.\n* Join the mailing lists for the [UXL Foundation](https://lists.uxlfoundation.org/g/main/subgroups) to receive meetings schedule and latest updates.\n* Contribute to oneTBB project or oneTBB specification. Read [CONTRIBUTING](./CONTRIBUTING.md) for more information.\n\n## Support\nSee our [documentation](./SUPPORT.md) to learn how to request help.\n\n## How to Contribute\nWe welcome community contributions, so check our [Contributing Guidelines](CONTRIBUTING.md)\nto learn more.\n\nUse GitHub Issues for feature requests, bug reports, and minor inquiries. For broader questions and development-related discussions, use GitHub Discussions.\n\n## License\noneAPI Threading Building Blocks is licensed under [Apache License, Version 2.0](LICENSE.txt).\nBy its terms, contributions submitted to the project are also done under that license.\n\n------------------------------------------------------------------------\n\\* All names and brands may be claimed as the property of others.\n"
  },
  {
    "path": "third-party/tbb/RELEASE_NOTES.md",
    "content": "<!--\n******************************************************************************\n* \n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n*     http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*******************************************************************************/-->\n\n# Release Notes <!-- omit in toc -->\nThis document contains changes of oneTBB compared to the last release.\n\n## Table of Contents <!-- omit in toc -->\n- [Preview Features](#preview-features)\n- [Known Limitations](#known-limitations)\n- [Issues Fixed](#issues-fixed)\n- [Open-Source Contributions Integrated](#open-source-contributions-integrated)\n\n## :tada: Preview Features\n- Extended the Flow Graph receiving nodes with a new ``try_put_and_wait`` API that submits a message to the graph and waits for its completion.\n\n## :rotating_light: Known Limitations\n- The ``oneapi::tbb::info`` namespace interfaces might unexpectedly change the process affinity mask on Windows* OS systems (see https://github.com/open-mpi/hwloc/issues/366 for details) when using hwloc version lower than 2.5.\n- Using a hwloc version other than 1.11, 2.0, or 2.5 may cause an undefined behavior on Windows OS. See https://github.com/open-mpi/hwloc/issues/477 for details.\n- The NUMA topology may be detected incorrectly on Windows* OS machines where the number of NUMA node threads exceeds the size of 1 processor group.\n- On Windows OS on ARM64*, when compiling an application using oneTBB with the Microsoft* Compiler, the compiler issues a warning C4324 that a structure was padded due to the alignment specifier. Consider suppressing the warning by specifying /wd4324 to the compiler command line.\n- C++ exception handling mechanism on Windows* OS on ARM64* might corrupt memory if an exception is thrown from any oneTBB parallel algorithm (see Windows* OS on ARM64* compiler issue: https://developercommunity.visualstudio.com/t/ARM64-incorrect-stack-unwinding-for-alig/1544293.\n- When CPU resource coordination is enabled, tasks from a lower-priority ``task_arena`` might be executed before tasks from a higher-priority ``task_arena``.\n- Using oneTBB on WASM*, may cause applications to run in a single thread. See [Limitations of WASM Support](https://github.com/uxlfoundation/oneTBB/blob/master/WASM_Support.md#limitations).\n\n> **_NOTE:_**  To see known limitations that impact all versions of oneTBB, refer to [oneTBB Documentation](https://uxlfoundation.github.io/oneTBB/main/intro/limitations.html).\n\n\n## :hammer: Issues Fixed\n- Fixed the missed signal for thread request for enqueue operation.\n- Significantly improved scalability of ``task_group``, ``flow_graph``, and ``parallel_for_each``.\n- Removed usage of ``std::aligned_storage`` deprecated in C++23 (Inspired by Valery Matskevich https://github.com/uxlfoundation/oneTBB/pull/1394).\n- Fixed the issue where ``oneapi::tbb::info`` interfaces might interfere with the process affinity mask on the Windows* OS systems with multiple processor groups.\n\n\n## :octocat: Open-Source Contributions Integrated\n- Detect the GNU Binutils version to determine WAITPKG support better. Contributed by Martijn Courteaux (https://github.com/uxlfoundation/oneTBB/pull/1347).\n- Fixed the build on non-English locales. Contributed by Vladislav Shchapov (https://github.com/uxlfoundation/oneTBB/pull/1450). \n- Improved Bazel support. Contributed by Julian Amann (https://github.com/uxlfoundation/oneTBB/pull/1434).\n"
  },
  {
    "path": "third-party/tbb/SECURITY.md",
    "content": "# Security Policy\nAs an open-source project, we understand the importance of and responsibility\nfor security. This Security Policy outlines our guidelines and procedures to\nensure the highest level of security and trust for oneTBB users. \n\n## Supported Versions\nSecurity vulnerabilities are fixed in the [latest version][1]\nand delivered as a patch release. We don't guarantee security fixes to be\nback-ported to older oneTBB versions.\n\n## Report a Vulnerability\nWe are very grateful to the security researchers and users that report back\nsecurity vulnerabilities. We investigate every report thoroughly.\nWe strongly encourage you to report security vulnerabilities to us privately,\nbefore disclosing them on public forums or opening a public GitHub* issue. \n\nReport a vulnerability to us in one of two ways:\n* Open a draft **[GitHub* Security Advisory][2]**\n* Send an e-mail to: **security@uxlfoundation.org**.\nAlong with the report, provide the following info:\n  * A descriptive title.\n  * Your name and affiliation (if any).\n  * A description of the technical details of the vulnerabilities.\n  * A minimal example of the vulnerability so we can reproduce your findings.\n  * An explanation of who can exploit this vulnerability, and what they gain\n  doing so. \n  * Whether this vulnerability is public or known to third parties. If it is,\n  provide details.\n\n### When Should I Report a Vulnerability?\n* You think you discovered a potential security vulnerability in oneTBB.\n* You are unsure how the potential vulnerability affects oneTBB.\n* You think you discovered a vulnerability in another project or 3rd party\ncomponent on which oneTBB depends. If the issue is not fixed in the 3rd party\ncomponent, try to report directly there first.\n\n### When Should I NOT Report a Vulnerability?\n* You got an automated scan hit and are unable to provide details.\n* You need help using oneTBB for security.\n* You need help applying security-related updates.\n* Your issue is not security-related.\n\n## Security Reports Review Process\nWe aim to respond quickly to your inquiry and coordinate a fix and\ndisclosure with you. All confirmed security vulnerabilities will be addressed\naccording to severity level and impact on oneTBB. Normally, security issues\nare fixed in the next planned release.\n\n## Disclosure Policy\nWe will publish security advisories using the \n[**GitHub Security Advisories feature**][3]\nto keep our community well-informed, and will credit you for your findings\nunless you prefer to stay anonymous. We request that you refrain from\nexploiting the vulnerability or making it public before the official disclosure.\n\nWe will disclose the vulnerabilities and bugs as soon as possible once\nmitigation is implemented and available. \n\n## Feedback on This Policy\nIf you have any suggestions on how this Policy could be improved, submit\nan issue or a pull request to this repository. **Do not** report\npotential vulnerabilities or security flaws via a pull request.\n\n[1]: https://github.com/uxlfoundation/oneTBB/releases/latest\n[2]: https://github.com/uxlfoundation/oneTBB/security/advisories/new\n[3]: https://github.com/uxlfoundation/oneTBB/security/advisories\n"
  },
  {
    "path": "third-party/tbb/SUPPORT.md",
    "content": "<!--\n******************************************************************************\n* \n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n*     http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*******************************************************************************/-->\n\n# oneTBB Support\n\nWe are committed to providing support and assistance to help you make the most out of oneTBB. \nUse the following methods if you face any challenges. \n\n## Issues\n\nIf you have a problem, check out the [GitHub Issues](https://github.com/uxlfoundation/oneTBB/issues) to see if the issue you want to address is already reported. \nYou may find users that have encountered the same bug or have similar ideas for changes or updates.\n\nYou can use issues to report a problem, make a feature request, or add comments on an existing issue.\n\n## Discussions \n\nVisit the [GitHub Discussions](https://github.com/uxlfoundation/oneTBB/discussions) to engage with the community, ask questions, or help others. \n\n## Email\n\nReach out to us privately via [email](mailto:inteltbbdevelopers@intel.com). "
  },
  {
    "path": "third-party/tbb/SYSTEM_REQUIREMENTS.md",
    "content": "<!--\n******************************************************************************\n* \n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n*     http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*******************************************************************************/-->\n\n# System Requirements <!-- omit in toc -->\nThis document provides details about hardware, operating system, and software prerequisites for the oneAPI Threading Building Blocks (oneTBB). \n\n## Table of Contents <!-- omit in toc -->\n- [Supported Hardware](#supported-hardware)\n- [Software](#software)\n  - [Supported Operating Systems](#supported-operating-systems)\n  - [Community-Supported Platforms](#community-supported-platforms)\n  - [Supported Compilers](#supported-compilers)\n- [Limitations](#limitations)\n\n\n## Supported Hardware\n- Intel(R) Celeron(R) processor family\n- Intel(R) Core* processor family\n- Intel(R) Xeon(R) processor family\n- Intel(R) Atom* processor family\n- Non-Intel(R) processors compatible with the processors listed above\n\n\n## Software\n\n### Supported Operating Systems\n- Systems with Microsoft* Windows* operating systems:\n  - Microsoft* Windows* 10\n  - Microsoft* Windows* 11\n  - Microsoft* Windows* Server 2019\n  - Microsoft* Windows* Server 2022\n- Systems with Linux* operating systems:\n  - Oracle Linux* 8\n  - Amazon* Linux 2, 2022\n  - Debian* 9, 10, 11\n  - Fedora* 36, 37, 38\n  - Rocky* Linux* 8, 9\n  - Red Hat* Enterprise Linux* 8, 9\n  - SuSE* Linux* Enterprise Server 15\n  - Ubuntu* 20.04, 22.04\n- Systems with macOS* operating systems:\n  - macOS* 12.x, 13.x\n- Systems with Android* operating systems:\n  - Android* 9\n\n### Community-Supported Platforms\n- MinGW*\n- FreeBSD*\n- Microsoft* Windows* on ARM*/ARM64*\n- macOS* on ARM64*\n\n### Supported Compilers\n- Intel* oneAPI DPC++/C++ Compiler\n- Intel® C++ Compiler Classic 2021.1 - 2021.9\n- Microsoft* Visual C++ 14.2 (Microsoft* Visual Studio* 2019, Windows* OS only)\n- Microsoft* Visual C++ 14.3 (Microsoft* Visual Studio* 2022, Windows* OS only)\n- For each supported Linux* operating system, the standard gcc version provided with that operating system is supported:\n  - GNU Compilers (gcc) 8.x – 12.x\n  - GNU C Library (glibc) version 2.28 – 2.36\n  - Clang* 6.0.0 - 13.0.0\n\n## Limitations\nThere are some cases where we cannot provide support for your platforms. It includes: \n\n1. The platform is out of official support (met end of life). When you use an unsupported platform, you can face a security risk that can be difficult to resolve.\n2. We do not have the infrastructure to test a platform. Therefore we cannot guarantee that oneTBB works correctly on that platform. \n3. Changes affect more code than just platform-specific macros.\n4. The platform is incompatible with oneTBB. Some platforms may have limitations that prevent oneTBB from working correctly. We cannot provide support in these cases as the issue is beyond our control.\n5. The platform is modified or customized. If you made significant updates to your platform, it might be hard for us to find the root cause of the issue. Therefore, we may not be able to provide support as the modification could affect the oneTBB functionality. \n\n\nWe understand that these limitations can be frustrating. Thus, we suggest creating a branch specifically for the unsupported platform, allowing other users to contribute to or use your implementation.\n\n"
  },
  {
    "path": "third-party/tbb/WASM_Support.md",
    "content": "<!--\n******************************************************************************\n* \n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n*     http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*******************************************************************************/-->\n\n# WASM Support\n\noneTBB extends its capabilities by offering robust support for ``WASM`` (see ``Limitation`` sections).\n\n``WASM`` stands for WebAssembly, a low-level binary format for executing code in web browsers. \nIt is designed to be a portable target for compilers and efficient to parse and execute. \n\nUsing oneTBB with WASM, you can take full advantage of parallelism and concurrency while working on web-based applications, interactive websites, and a variety of other WASM-compatible platforms.\n\noneTBB offers WASM support through the integration with [Emscripten*](https://emscripten.org/docs/introducing_emscripten/index.html), a powerful toolchain for compiling C and C++ code into WASM-compatible runtimes. \n\n## Build\n\n**Prerequisites:** Download and install Emscripten*. See the [instructions](https://emscripten.org/docs/getting_started/downloads.html). \n\nTo build the system, run:\n\n```\nmkdir build && cd build\nemcmake cmake .. -DCMAKE_CXX_COMPILER=em++ -DCMAKE_C_COMPILER=emcc -DTBB_STRICT=OFF -DCMAKE_CXX_FLAGS=-Wno-unused-command-line-argument -DTBB_DISABLE_HWLOC_AUTOMATIC_SEARCH=ON -DBUILD_SHARED_LIBS=OFF -DTBB_EXAMPLES=ON -DTBB_TEST=ON\n```\nTo compile oneTBB without ``pthreads``, set the flag ``-DEMSCRIPTEN_WITHOUT_PTHREAD=true`` in the command above. By default, oneTBB uses the ``pthreads``.\n```\ncmake --build . <options>\ncmake --install . <options>\n```\nWhere:\n\n* ``emcmake`` - a tool that sets up the environment for Emscripten*. \n* ``-DCMAKE_CXX_COMPILER=em++`` - specifies the C++ compiler as Emscripten* C++ compiler. \n* ``-DCMAKE_C_COMPILER=emcc`` - specifies the C compiler as Emscripten* C compiler.\n\n\n> **_NOTE:_** See [CMake documentation](https://github.com/uxlfoundation/oneTBB/blob/master/cmake/README.md) to learn about other options. \n\n\n## Run Test\n\nTo run tests, use:\n\n```\nctest\n```\n\n# Limitations\n\nYou can successfully build your application with oneTBB using WASM, but you may not achieve optimal performance immediately. This is due to the limitation with nested Web Workers: a Web Worker cannot schedule another worker without help from a browser thread. This can lead to unexpected performance outcomes, such as the application running in serial.\nFind more information in the [issue](https://github.com/emscripten-core/emscripten/discussions/21963) in the Emscripten repository.\nTo workaround this issue, try one of the following ways:\n1. **Recommended Solution: Use the ``-sPROXY_TO_PTHREAD`` Flag**. \nThis flag splits the initial thread into a browser thread and a main thread (proxied by a Web Worker), effectively resolving the issue as the browser thread is always present in the event loop and can participate in Web Workers scheduling. Refer to the [Emscripten documentation](https://emscripten.org/docs/porting/pthreads.html) for more details about ``-sPROXY_TO_PTHREAD`` since using this flag may require refactoring the code.\n2. **Alternative Solution: Warm Up the oneTBB Thread Pool**\nInitialize the oneTBB thread pool before making the first call to oneTBB. This approach forces the browser thread to participate in Web Workers scheduling.\n```cpp\n    int num_threads = tbb::this_task_arena::max_concurrency();\n    std::atomic<int> barrier{num_threads};\n    tbb::parallel_for(0, num_threads, [&barrier] (int) {\n        barrier--;\n        while (barrier > 0) {\n            // Send browser thread to event loop\n            std::this_thread::yield();\n        }\n    }, tbb::static_partitioner{});\n```\n> **_NOTE:_** Be aware that it might cause delays on the browser side.\n"
  },
  {
    "path": "third-party/tbb/WORKSPACE.bazel",
    "content": "# Copyright (c) 2021-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# DISCLAIMER: Bazel support is community-based. The maintainers do not\n# use Bazel internally. The Bazel build can have security risks or \n# optimization gaps.\n\n# WORKSPACE marker file needed by Bazel\n"
  },
  {
    "path": "third-party/tbb/cmake/README.md",
    "content": "# Build System Description\n\nThe project uses CMake* build configuration.\n\nThe following controls are available during the configure stage:\n```\nTBB_TEST:BOOL - Enable testing (ON by default)\nTBB_STRICT:BOOL - Treat compiler warnings as errors (ON by default)\nTBB_SANITIZE:STRING - Sanitizer parameter, passed to compiler/linker\nTBB_SIGNTOOL:FILEPATH - Tool for digital signing, used in post-install step for libraries if provided.\nTBB_SIGNTOOL_ARGS:STRING - Additional arguments for TBB_SIGNTOOL, used if TBB_SIGNTOOL is set.\nTBB_BUILD:BOOL - Enable Intel(R) oneAPI Threading Building Blocks (oneTBB) build (ON by default)\nTBB_FIND_PACKAGE - Enable search for external oneTBB using find_package instead of build from sources (OFF by default)\nTBBMALLOC_BUILD:BOOL - Enable Intel(R) oneAPI Threading Building Blocks (oneTBB) memory allocator build (ON by default)\nTBBMALLOC_PROXY_BUILD:BOOL - Enable Intel(R) oneAPI Threading Building Blocks (oneTBB) memory allocator proxy build (requires TBBMALLOC_BUILD. ON by default)\nTBB4PY_BUILD:BOOL - Enable Intel(R) oneAPI Threading Building Blocks (oneTBB) Python module build (OFF by default)\nTBB_CPF:BOOL - Enable preview features of the library (OFF by default)\nTBB_INSTALL:BOOL - Enable installation (ON by default)\nTBB_INSTALL_VARS:BOOL - Enable auto-generated vars installation(packages generated by `cpack` and `make install` will also include the vars script)(OFF by default)\nTBB_VALGRIND_MEMCHECK:BOOL - Enable scan for memory leaks using Valgrind (OFF by default)\nTBB_DISABLE_HWLOC_AUTOMATIC_SEARCH - Disable HWLOC automatic search by pkg-config tool (OFF by default)\nTBB_ENABLE_IPO - Enable Interprocedural Optimization (IPO) during the compilation (ON by default)\nTBB_CONTROL_FLOW_GUARD:BOOL - Enable Control Flow Guard (CFG) during the compilation (OFF by default)\nTBB_BUILD_APPLE_FRAMEWORKS - Enable the Apple* frameworks instead of dylibs, only available on the Apple platform. (OFF by default)\nTBB_FILE_TRIM - Enable __FILE__ trim, replace a build-time full path with a relative path in the debug info and macro __FILE__; use it to make\n           reproducible location-independent builds (ON by default)\n```\n\n## Configure, Build, and Test\n\n### Preparation\n\nTo perform an out-of-source build, create a build directory and go there:\n\n```bash\nmkdir /tmp/my-build\ncd /tmp/my-build\n```\n\n### Configure\n\n```bash\ncmake <options> <repo_root>\n```\n\nSome useful options:\n- `-G <generator>` - specify particular project generator. See `cmake --help` for details.\n- `-DCMAKE_BUILD_TYPE=Debug` - specify for Debug build. It is not applicable for multi-config generators, e.g., Microsoft* Visual Studio* generator.\n\n#### TBBBind Library Configuration\n\n> **_TIP:_** It is recommended to install the HWLOC* library. See [oneTBB documentation](https://uxlfoundation.github.io/oneTBB/GSG/next_steps.html#hybrid-cpu-and-numa-support) for details.\n\nThe TBBbind library has three versions: `tbbbind`, `tbbbind_2_0`, and `tbbbind_2_5`. Each of these versions is linked with the corresponding HWLOC* library version: \n- `tbbbind` links with `HWLOC 1.11.x`\n- `tbbbind_2_0` links with `HWLOC 2.1–2.4`\n- `tbbbind_2_5` links with `HWLOC 2.5` and later\n\nThe search for a suitable version of the HWLOC library is enabled by default. If you want to use a specific version of the library, you can specify the path to it manually using the following CMake variables:\n\n - `CMAKE_HWLOC_<HWLOC_VER>_LIBRARY_PATH` - path to the corresponding HWLOC version shared library on Linux* OS or path to `.lib` file on Windows* OS\n - `CMAKE_HWLOC_<HWLOC_VER>_INCLUDE_PATH` - path to the corresponding HWLOC version including directory\n\n\n---\n**NOTE:** Automatic HWLOC searching requires CMake version 3.6 or higher.\n\n---\n\n\nWindows* OS requires an additional variable for correct TBBBind library building:\n - `CMAKE_HWLOC_<HWLOC_VER>_DLL_PATH` - path to the corresponding HWLOC version `.dll` file.\n\nThe `HWLOC_VER` substring used earlier can be replaced with one of the three values:\n- `1_11` for the `tbbbind` library configuration\n- `2` for the `tbbbind_2_0` library configuration\n- `2_5` for the `tbbbind_2_5` library configuration\n\nIf you specify variables for several TBBBind versions, the building process for all of these versions is performed during a single build session.\n\n---\n**TIP**\n\nSpecify the `TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH` to turn off the HWLOC library's automatic search.\n\n---\n\n\n### Build\n\n```bash\ncmake --build . <options>\n```\n\nSome useful options:\n- `--target <target>` - specific target, \"all\" is the default.\n- `--config <Release|Debug>` - build configuration, applicable only for multi-config generators, e.g., Visual Studio* generator.\n\nThe binaries are placed to `./<compiler-id>_<compiler-ver>_cxx<stdver>_<build-type>`. For example, `./gnu_4.8_cxx11_release`.\n\n#### Build For 32-bit\n\n* **Intel(R) Compiler**. Source Intel(R) C++ Compiler with `ia32` and build as usual.\n* **MSVC**. Use switch for [generator](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html) (e.g., `-A Win32` for [VS2019](https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2016%202019.html)) during the configuration stage and then build as usual.\n* **GCC/Clang**. Specify `-m32` during the configuration. It can be `CXXFLAGS=-m32 cmake ..` or `cmake -DCMAKE_CXX_FLAGS=-m32 ..`\n* For any other compiler, which builds for 64-bit by default, specify a 32-bit compiler key during the configuration as above.\n\n#### Windows* OS-Specific Builds\n\n---\n**NOTE**\n\nThe following builds require CMake version 3.15 or higher. \n\n---\n\n* **Dynamic linkage with C Runtime Library (CRT)**. The default behavior can be explicitly specified by setting `CMAKE_MSVC_RUNTIME_LIBRARY` to `MultiThreadedDLL` or `MultiThreadedDebugDLL`.\n```bash\ncmake ..  # dynamic linkage is used by default\n```\n```bash\ncmake -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL ..\n```\n```bash\ncmake -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL -DCMAKE_BUILD_TYPE=Debug ..\n```\n* **Static linkage with CRT**. Set `CMAKE_MSVC_RUNTIME_LIBRARY` to `MultiThreaded` or `MultiThreadedDebug`.\n```bash\ncmake -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ..\n```\n```bash\ncmake -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug -DCMAKE_BUILD_TYPE=Debug ..\n```\n* **Windows OS 10 Universal Windows application build**. Set `CMAKE_SYSTEM_NAME` to `WindowsStore` and `CMAKE_SYSTEM_VERSION` to `10.0`.\n\n---\n**NOTE**\n\nSet `TBB_NO_APPCONTAINER` to `ON` to apply the `/APPCONTAINER:NO` option during the compilation (used for testing).\n\n---\n\n```bash\ncmake -DCMAKE_SYSTEM_NAME:STRING=WindowsStore -DCMAKE_SYSTEM_VERSION:STRING=10.0 ..\n```\n\n* **Universal Windows OS Driver build**. Set `TBB_WINDOWS_DRIVER` to `ON` and use static linkage with CRT.\n\n```bash\ncmake -DTBB_WINDOWS_DRIVER=ON -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ..\n```\n\n#### Example\n\n```bash\ncmake -DCMAKE_CXX_COMPILER=icpc -DCMAKE_C_COMPILER=icc -DTBB_TEST=off -DCMAKE_HWLOC_1_11_LIBRARY_PATH=<path_to_hwloc_library_file>/libhwloc.so.15\n-DCMAKE_HWLOC_1_11_INCLUDE_PATH=<path_to_hwloc_header_directory> -DCMAKE_INSTALL_PREFIX=<path_to_install_oneTBB>/oneTBB_install ..\nmake -j8 && make install\n```\n\n---\n**NOTE**\n\nThe library path points to a file, while the include path points to a directory and not to ``hwloc.h``.\n\n---\n\n### Test\n\n#### Build test\nTo build a test, use the default target ``all``:\n```\ncmake --build .\n```\n\nOr use a specific test target:\n```\ncmake --build . --target <test> # e.g. test_version\n```\n\n#### Run Test\n\nYou can run a test by using CTest:\n```bash\nctest\n```\n\nOr by using the ``test`` target:\n```bash\ncmake --build . --target test # currently does not work on Windows* OS\n```\n\n## Installation\nSee [Installation from Sources](../INSTALL.md) to learn how to install oneTBB.\n\nTo install oneTBB from the release packages, use the following commands: \n```bash\ntar -xvf oneapi-tbb-xxx.xx.x-*.tgz\nsource env/vars.sh\n```\n\n\n## Sanitizers - Configure, Build, and Run\n\n```bash\nmkdir build\ncd build\ncmake -DTBB_SANITIZE=thread ..  # or -DTBB_SANITIZE=memory or any other sanitizer\nmake -j\nctest -V\n```\n\n## Valgrind Memcheck - Configure, Build, and Run\n\n### Prerequisites\n* Valgrind tool executable\n### Example\n```bash\nmkdir build\ncd build\ncmake -DTBB_VALGRIND_MEMCHECK=ON ..\nmake -j memcheck-<test name> # or memcheck-all to scan all tests \n```\n\n## Test Specification\n\nUse Doxygen* to generate oneTBB test specification:\n\n```bash\nmkdir build\ncd build\ncmake -DTBB_TEST_SPEC=ON ..\nmake test_spec\n```\n\n## TBBConfig - Integration of Binary Packages\n\nIt is a configuration module that is used for the integration of prebuilt oneTBB. It consists of two files (``TBBConfig.cmake`` and ``TBBConfigVersion.cmake``) and can be used via the [find_package](https://cmake.org/cmake/help/latest/command/find_package.html) function.\n\nTo use this module in your CMake project:\n 1. Let CMake know where to search for TBBConfig, e.g. specify the location of ``TBBConfig.cmake`` in `TBB_DIR` (for more details about search paths, see [find_package](https://cmake.org/cmake/help/latest/command/find_package.html)).\n 2. Use [find_package](https://cmake.org/cmake/help/latest/command/find_package.html) to find oneTBB.\n 3. Use provided variables and/or imported targets (described below) to work with the found oneTBB.\n\nExample:\n\n```cmake\nadd_executable(foo foo.cpp)\nfind_package(TBB)\ntarget_link_libraries(foo TBB::tbb)\n```\n\noneTBB components can be passed to [find_package](https://cmake.org/cmake/help/latest/command/find_package.html) after keyword ``COMPONENTS`` or ``REQUIRED``.\nUse basic names of components (`tbb`, `tbbmalloc`, etc.).\n\nIf components are not specified, then the default set is used: `tbb`, `tbbmalloc`, and ``tbbmalloc_proxy``.\n\nIf `tbbmalloc_proxy` is requested, the `tbbmalloc` component is also added and set as a dependency for `tbbmalloc_proxy`.\n\nTBBConfig creates [imported targets](https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#imported-targets>) as\nshared libraries using the following format: `TBB::<component>`. For example, `TBB::tbb` or `TBB::tbbmalloc`.\n\nTo search only for release oneTBB version, set `TBB_FIND_RELEASE_ONLY` to `TRUE` before calling `find_package`. This variable helps to avoid simultaneous linkage of release and debug oneTBB versions when CMake configuration is `Debug,` but a third-party component depends on the release oneTBB version.\n\nVariables set during TBB configuration:\n\nVariable | Description\n--- | ---\n`TBB_FOUND`             | oneTBB is found\n`TBB_<component>_FOUND` | Specific oneTBB component is found\n`TBB_VERSION`           | oneTBB version (format: `<major>.<minor>.<patch>.<tweak>`)\n`TBB_IMPORTED_TARGETS`  | All created oneTBB imported targets (not supported for builds from source code)\n\nStarting from [oneTBB 2021.1](https://github.com/uxlfoundation/oneTBB/releases/tag/v2021.1), GitHub* release TBBConfig files in the binary packages are located under `<tbb-root>/lib/cmake/TBB`.\nFor example, `TBB_DIR` should be set to `<tbb-root>/lib/cmake/TBB`.\n\nTBBConfig files are automatically created during the build from source code and can be installed together with the library.\nAlso, oneTBB provides a helper function that creates TBBConfig files from predefined templates. See `tbb_generate_config` in `cmake/config_generation.cmake`.\n\n## oneTBB Python Module Support\nThe `TBB4PY_BUILD` Cmake option provides the ability to build a Python module for oneTBB.\n\n### Targets:\n - `irml` - build IPC RML server\n - `python_build` - build oneTBB module for Python\n\n`python_build` target requirements:\n - Python version 3.5 or newer\n - SWIG version 3.0.6 or newer\n\n## CMake Files\n\n### Compile and Link Options\n\nCompile and link options may be specific for certain compilers. This part is handled in `cmake/compilers/*` files.\n\nOptions in TBB CMake are handled via variables in two ways for convenience:\n\n*  by options group\n*  by the specific option\n\n#### Options Group\n\nNaming convention is the following: `TBB_<SCOPE>_<STAGE>_<CATEGORY>`, where:\n\n*  `<SCOPE>` can be:\n    *  `LIB` - options applied during libraries build.\n    *  `TEST` - options applied during test build.\n    *  `BENCH` - options applied during benchmarks build.\n    *  `COMMON` - options applied during all (libraries, test, benchmarks) builds.\n*  `<STAGE>` can be:\n    *  `COMPILE` - options applied during the compilation.\n    *  `LINK` - options applied during the linkage.\n*  `<CATEGORY>` can be:\n    *  `FLAGS` - list of flags\n    *  `LIBS` - list of libraries\n\n*Examples*\n\nVariable | Description\n--- | ---\n`TBB_COMMON_COMPILE_FLAGS` | Applied to libraries, tests, and benchmarks as compile options\n`TBB_LIB_LINK_FLAGS`       | Applied to libraries as link options\n`TBB_LIB_LINK_LIBS `       | Applied to libraries as link libraries\n`TBB_TEST_COMPILE_FLAGS`   | Applied to tests as compile options\n\nSpecify the `LINK` options prefixed with a dash(-) for MSVC(Visual Studio) compiler with CMake < 3.13 to avoid issues caused by `target_link_libraries` CMake command usage.\n\n#### Specific Options\n\nIf the option is used only in part of the places (library, tests, benchmarks) and adding this option to the group of other options is not possible,\nthen the option must be named using common sense.\n\nWarning suppressions should be added to the `TBB_WARNING_SUPPRESS` variable, which is applied during the compilation of libraries, tests, and benchmarks.\nAdditional warnings should be added to the `TBB_WARNING_TEST_FLAGS` variable, which is applied during the compilation of tests.\n"
  },
  {
    "path": "third-party/tbb/cmake/android/device_environment_cleanup.cmake",
    "content": "# Copyright (c) 2020-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ninclude(${CMAKE_CURRENT_LIST_DIR}/environment.cmake)\n\nexecute_on_device(\"rm -rf ${ANDROID_DEVICE_TESTING_DIRECTORY}\")\n"
  },
  {
    "path": "third-party/tbb/cmake/android/environment.cmake",
    "content": "# Copyright (c) 2020-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset(ANDROID_DEVICE_TESTING_DIRECTORY \"/data/local/tmp/tbb_testing\")\n\nfind_program(adb_executable adb)\nif (NOT adb_executable)\n    message(FATAL_ERROR \"Could not find adb\")\nendif()\n\nmacro(execute_on_device cmd)\n    execute_process(COMMAND ${adb_executable} shell ${cmd} RESULT_VARIABLE CMD_RESULT)\n    if (CMD_RESULT)\n        message(FATAL_ERROR \"Error while on device execution: ${cmd} error_code: ${CMD_RESULT}\")\n    endif()\nendmacro()\n\nmacro(transfer_data data_path)\n    execute_process(COMMAND ${adb_executable} push --sync ${data_path} ${ANDROID_DEVICE_TESTING_DIRECTORY}\n                    RESULT_VARIABLE CMD_RESULT OUTPUT_QUIET)\n    if (CMD_RESULT)\n        message(FATAL_ERROR \"Error while data transferring: ${data_path} error_code: ${CMD_RESULT}\")\n    endif()\nendmacro()\n"
  },
  {
    "path": "third-party/tbb/cmake/android/test_launcher.cmake",
    "content": "# Copyright (c) 2020-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ninclude(${CMAKE_CURRENT_LIST_DIR}/environment.cmake)\n\n# transfer data to device\nexecute_on_device(\"mkdir -m 755 -p ${ANDROID_DEVICE_TESTING_DIRECTORY}\")\n\nfile (GLOB_RECURSE BINARIES_LIST \"${BINARIES_PATH}/*.so*\" \"${BINARIES_PATH}/${TEST_NAME}\")\nforeach(BINARY_FILE ${BINARIES_LIST})\n    transfer_data(${BINARY_FILE})\nendforeach()\n\n# execute binary\nexecute_on_device(\"chmod -R 755 ${ANDROID_DEVICE_TESTING_DIRECTORY}\")\nexecute_on_device(\"LD_LIBRARY_PATH=${ANDROID_DEVICE_TESTING_DIRECTORY} ${ANDROID_DEVICE_TESTING_DIRECTORY}/${TEST_NAME}\")\n"
  },
  {
    "path": "third-party/tbb/cmake/compilers/AppleClang.cmake",
    "content": "# Copyright (c) 2020-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset(TBB_LINK_DEF_FILE_FLAG -Wl,-exported_symbols_list,)\nset(TBB_DEF_FILE_PREFIX mac${TBB_ARCH})\nset(TBB_WARNING_LEVEL -Wall -Wextra $<$<BOOL:${TBB_STRICT}>:-Werror>)\nset(TBB_TEST_WARNING_FLAGS -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor)\nset(TBB_WARNING_SUPPRESS -Wno-parentheses -Wno-non-virtual-dtor -Wno-dangling-else)\n# For correct ucontext.h structures layout\nset(TBB_COMMON_COMPILE_FLAGS -D_XOPEN_SOURCE)\n\n# Depfile options (e.g. -MD) are inserted automatically in some cases.\n# Don't add -MMD to avoid conflicts in such cases.\nif (NOT CMAKE_GENERATOR MATCHES \"Ninja\" AND NOT CMAKE_CXX_DEPENDS_USE_COMPILER)\n    set(TBB_MMD_FLAG -MMD)\nendif()\n\n# Ignore -Werror set through add_compile_options() or added to CMAKE_CXX_FLAGS if TBB_STRICT is disabled.\nif (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)\n    tbb_remove_compile_flag(-Werror)\nendif()\n\n# Enable Intel(R) Transactional Synchronization Extensions (-mrtm) and WAITPKG instructions support (-mwaitpkg) on relevant processors\nif (CMAKE_OSX_ARCHITECTURES)\n    set(_tbb_target_architectures \"${CMAKE_OSX_ARCHITECTURES}\")\nelse()\n    set(_tbb_target_architectures \"${CMAKE_SYSTEM_PROCESSOR}\")\nendif()\nif (\"${_tbb_target_architectures}\" MATCHES \"(x86_64|amd64|AMD64)\") # OSX systems are 64-bit only\n    set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},12.0>>:-mwaitpkg>)\nendif()\nunset(_tbb_target_architectures)\n\nif (TBB_FILE_TRIM AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10)\n    set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -ffile-prefix-map=${NATIVE_TBB_PROJECT_ROOT_DIR}/= -ffile-prefix-map=${NATIVE_TBB_RELATIVE_BIN_PATH}/=)\nendif ()\n\n# TBB malloc settings\nset(TBBMALLOC_LIB_COMPILE_FLAGS -fno-rtti -fno-exceptions)\n\n"
  },
  {
    "path": "third-party/tbb/cmake/compilers/Clang.cmake",
    "content": "# Copyright (c) 2020-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nif (EMSCRIPTEN)\n    set(TBB_EMSCRIPTEN 1)\n    set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -fexceptions)\n    set(TBB_TEST_LINK_FLAGS  ${TBB_COMMON_LINK_FLAGS} -fexceptions -sINITIAL_MEMORY=65536000 -sALLOW_MEMORY_GROWTH=1 -sMALLOC=mimalloc -sEXIT_RUNTIME=1)\n    if (NOT EMSCRIPTEN_WITHOUT_PTHREAD)\n        set_property(TARGET Threads::Threads PROPERTY INTERFACE_LINK_LIBRARIES \"-pthread\")\n    endif()\n    set(TBB_EMSCRIPTEN_STACK_SIZE 65536)\n    set(TBB_LIB_COMPILE_FLAGS -D__TBB_EMSCRIPTEN_STACK_SIZE=${TBB_EMSCRIPTEN_STACK_SIZE})\n    set(TBB_TEST_LINK_FLAGS ${TBB_TEST_LINK_FLAGS} -sTOTAL_STACK=${TBB_EMSCRIPTEN_STACK_SIZE})\n    unset(TBB_EMSCRIPTEN_STACK_SIZE)\nendif()\n\nif (MINGW)\n    set(TBB_LINK_DEF_FILE_FLAG \"\")\n    set(TBB_DEF_FILE_PREFIX \"\")\nelseif (APPLE)\n    set(TBB_LINK_DEF_FILE_FLAG -Wl,-exported_symbols_list,)\n    set(TBB_DEF_FILE_PREFIX mac${TBB_ARCH})\n\n    # For correct ucontext.h structures layout\n    set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -D_XOPEN_SOURCE)\nelseif (MSVC)\n    include(${CMAKE_CURRENT_LIST_DIR}/MSVC.cmake)\n    return()\nelse()\n    set(TBB_LINK_DEF_FILE_FLAG -Wl,--version-script=)\n    set(TBB_DEF_FILE_PREFIX lin${TBB_ARCH})\n    set(TBB_TEST_COMPILE_FLAGS ${TBB_TEST_COMPILE_FLAGS} $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},10.0>>:-ffp-model=precise>)\nendif()\n\n# Depfile options (e.g. -MD) are inserted automatically in some cases.\n# Don't add -MMD to avoid conflicts in such cases.\nif (NOT CMAKE_GENERATOR MATCHES \"Ninja\" AND NOT CMAKE_CXX_DEPENDS_USE_COMPILER)\n    set(TBB_MMD_FLAG -MMD)\nendif()\n\nset(TBB_WARNING_LEVEL -Wall -Wextra $<$<BOOL:${TBB_STRICT}>:-Werror>)\nset(TBB_TEST_WARNING_FLAGS -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor)\n\n# Ignore -Werror set through add_compile_options() or added to CMAKE_CXX_FLAGS if TBB_STRICT is disabled.\nif (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)\n    tbb_remove_compile_flag(-Werror)\nendif()\n\n# Enable Intel(R) Transactional Synchronization Extensions (-mrtm) and WAITPKG instructions support (-mwaitpkg) on relevant processors\nif (CMAKE_SYSTEM_PROCESSOR MATCHES \"(AMD64|amd64|i.86|x86)\" AND NOT EMSCRIPTEN)\n    set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},12.0>>:-mwaitpkg>)\nendif()\n\n# Clang flags to prevent compiler from optimizing out security checks\nset(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -Wformat -Wformat-security -Werror=format-security -fPIC $<$<NOT:$<BOOL:${EMSCRIPTEN}>>:-fstack-protector-strong>)\n\n# -z switch is not supported on MacOS\nif (NOT APPLE)\n    set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} -Wl,-z,relro,-z,now)\nendif()\n\nset(TBB_COMMON_LINK_LIBS ${CMAKE_DL_LIBS})\n\nif (NOT CMAKE_CXX_FLAGS MATCHES \"_FORTIFY_SOURCE\")\n  set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} $<$<NOT:$<CONFIG:Debug>>:-D_FORTIFY_SOURCE=2>)\nendif ()\n\nif (MINGW)\n    list(APPEND TBB_COMMON_COMPILE_FLAGS -U__STRICT_ANSI__)\nendif()\n\nif (TBB_FILE_TRIM AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10)\n    set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -ffile-prefix-map=${NATIVE_TBB_PROJECT_ROOT_DIR}/= -ffile-prefix-map=${NATIVE_TBB_RELATIVE_BIN_PATH}/=)\nendif ()\n\nset(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:-flto>)\nset(TBB_IPO_LINK_FLAGS $<$<NOT:$<CONFIG:Debug>>:-flto>)\n\n# TBB malloc settings\nset(TBBMALLOC_LIB_COMPILE_FLAGS -fno-rtti -fno-exceptions)\n"
  },
  {
    "path": "third-party/tbb/cmake/compilers/GNU.cmake",
    "content": "# Copyright (c) 2020-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nif (MINGW)\n    set(TBB_LINK_DEF_FILE_FLAG \"\")\n    set(TBB_DEF_FILE_PREFIX \"\")\nelseif (APPLE)\n    set(TBB_LINK_DEF_FILE_FLAG -Wl,-exported_symbols_list,)\n    set(TBB_DEF_FILE_PREFIX mac${TBB_ARCH})\n\n    # For correct ucontext.h structures layout\n    set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -D_XOPEN_SOURCE)\nelse()\n    set(TBB_LINK_DEF_FILE_FLAG -Wl,--version-script=)\n    set(TBB_DEF_FILE_PREFIX lin${TBB_ARCH})\nendif()\n\nset(TBB_WARNING_LEVEL -Wall -Wextra $<$<BOOL:${TBB_STRICT}>:-Werror> -Wfatal-errors)\nset(TBB_TEST_WARNING_FLAGS -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor)\n\n# Depfile options (e.g. -MD) are inserted automatically in some cases.\n# Don't add -MMD to avoid conflicts in such cases.\nif (NOT CMAKE_GENERATOR MATCHES \"Ninja\" AND NOT CMAKE_CXX_DEPENDS_USE_COMPILER)\n    set(TBB_MMD_FLAG -MMD)\nendif()\n\n\n# Binutils < 2.31.1 do not support the tpause instruction. When compiling with\n# a modern version of GCC (supporting it) but relying on an outdated assembler,\n# will result in an error reporting \"no such instruction: tpause\".\n# The following code invokes the GNU assembler to extract the version number\n# and convert it to an integer that can be used in the C++ code to compare\n# against, and conditionally disable the __TBB_WAITPKG_INTRINSICS_PRESENT\n# macro if the version is incompatible. Binutils only report the version in the\n# MAJOR.MINOR format, therefore the version checked is >=2.32 (instead of\n# >=2.31.1). Capturing the output in CMake can be done like below. The version\n# information is written to either stdout or stderr. To not make any\n# assumptions, both are captured.\nexecute_process(\n    COMMAND ${CMAKE_COMMAND} -E env \"LANG=C\" ${CMAKE_CXX_COMPILER} -xc -c /dev/null -Wa,-v -o/dev/null\n    OUTPUT_VARIABLE ASSEMBLER_VERSION_LINE_OUT\n    ERROR_VARIABLE ASSEMBLER_VERSION_LINE_ERR\n    OUTPUT_STRIP_TRAILING_WHITESPACE\n    ERROR_STRIP_TRAILING_WHITESPACE\n)\nset(ASSEMBLER_VERSION_LINE ${ASSEMBLER_VERSION_LINE_OUT}${ASSEMBLER_VERSION_LINE_ERR})\nstring(REGEX REPLACE \".*GNU assembler version ([0-9]+)\\\\.([0-9]+).*\" \"\\\\1\" _tbb_gnu_asm_major_version \"${ASSEMBLER_VERSION_LINE}\")\nstring(REGEX REPLACE \".*GNU assembler version ([0-9]+)\\\\.([0-9]+).*\" \"\\\\2\" _tbb_gnu_asm_minor_version \"${ASSEMBLER_VERSION_LINE}\")\nunset(ASSEMBLER_VERSION_LINE_OUT)\nunset(ASSEMBLER_VERSION_LINE_ERR)\nunset(ASSEMBLER_VERSION_LINE)\nmessage(TRACE \"Extracted GNU assembler version: major=${_tbb_gnu_asm_major_version} minor=${_tbb_gnu_asm_minor_version}\")\n\nmath(EXPR _tbb_gnu_asm_version_number  \"${_tbb_gnu_asm_major_version} * 1000 + ${_tbb_gnu_asm_minor_version}\")\nset(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} \"-D__TBB_GNU_ASM_VERSION=${_tbb_gnu_asm_version_number}\")\nmessage(STATUS \"GNU Assembler version: ${_tbb_gnu_asm_major_version}.${_tbb_gnu_asm_minor_version}  (${_tbb_gnu_asm_version_number})\")\n\n# Enable Intel(R) Transactional Synchronization Extensions (-mrtm) and WAITPKG instructions support (-mwaitpkg) on relevant processors\nif (CMAKE_SYSTEM_PROCESSOR MATCHES \"(AMD64|amd64|i.86|x86)\" AND NOT EMSCRIPTEN)\n    set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm $<$<AND:$<NOT:$<CXX_COMPILER_ID:Intel>>,$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},11.0>>>:-mwaitpkg>)\nendif()\n\nset(TBB_COMMON_LINK_LIBS ${CMAKE_DL_LIBS})\n\n# Ignore -Werror set through add_compile_options() or added to CMAKE_CXX_FLAGS if TBB_STRICT is disabled.\nif (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)\n    tbb_remove_compile_flag(-Werror)\nendif()\n\nif (NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL Intel)\n    # gcc 6.0 and later have -flifetime-dse option that controls elimination of stores done outside the object lifetime\n    set(TBB_DSE_FLAG $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},6.0>>:-flifetime-dse=1>)\n    set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},8.0>>:-fstack-clash-protection>)\n\n    # Suppress GCC 12.x-14.x warning here that to_wait_node(n)->my_is_in_list might have size 0\n    set(TBB_COMMON_LINK_FLAGS ${TBB_COMMON_LINK_FLAGS} $<$<AND:$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},12.0>>,$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},15.0>>:-Wno-stringop-overflow>)\nendif()\n\n# Workaround for heavy tests and too many symbols in debug (rellocation truncated to fit: R_MIPS_CALL16)\nif (\"${CMAKE_SYSTEM_PROCESSOR}\" MATCHES \"mips\")\n    set(TBB_TEST_COMPILE_FLAGS ${TBB_TEST_COMPILE_FLAGS} -DTBB_TEST_LOW_WORKLOAD $<$<CONFIG:DEBUG>:-fPIE -mxgot>)\n    set(TBB_TEST_LINK_FLAGS ${TBB_TEST_LINK_FLAGS} $<$<CONFIG:DEBUG>:-pie>)\nendif()\n\nset(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:-flto>)\nset(TBB_IPO_LINK_FLAGS $<$<NOT:$<CONFIG:Debug>>:-flto>)\n\n\nif (MINGW AND CMAKE_SYSTEM_PROCESSOR MATCHES \"i.86\")\n    list (APPEND TBB_COMMON_COMPILE_FLAGS -msse2)\nendif ()\n\n# Gnu flags to prevent compiler from optimizing out security checks\nset(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv)\nset(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -Wformat -Wformat-security -Werror=format-security\n    -fstack-protector-strong )\n# -z switch is not supported on MacOS and MinGW\nif (NOT APPLE AND NOT MINGW)\n    set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} -Wl,-z,relro,-z,now,-z,noexecstack)\nendif()\nif (NOT CMAKE_CXX_FLAGS MATCHES \"_FORTIFY_SOURCE\")\n  set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} $<$<NOT:$<CONFIG:Debug>>:-D_FORTIFY_SOURCE=2> )\nendif ()\n\nif (TBB_FILE_TRIM AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8)\n    set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -ffile-prefix-map=${NATIVE_TBB_PROJECT_ROOT_DIR}/= -ffile-prefix-map=${NATIVE_TBB_RELATIVE_BIN_PATH}/=)\nendif ()\n\n# TBB malloc settings\nset(TBBMALLOC_LIB_COMPILE_FLAGS -fno-rtti -fno-exceptions)\nset(TBB_OPENMP_FLAG -fopenmp)\n"
  },
  {
    "path": "third-party/tbb/cmake/compilers/Intel.cmake",
    "content": "# Copyright (c) 2020-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nif (MSVC)\n    include(${CMAKE_CURRENT_LIST_DIR}/MSVC.cmake)\n    set(TBB_WARNING_LEVEL ${TBB_WARNING_LEVEL} /W3)\n    set(TBB_OPENMP_FLAG /Qopenmp)\n    set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:/Qipo>)\n    set(TBB_IPO_LINK_FLAGS $<$<NOT:$<CONFIG:Debug>>:/INCREMENTAL:NO>)\nelseif (APPLE)\n    include(${CMAKE_CURRENT_LIST_DIR}/AppleClang.cmake)\n    set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -fstack-protector -Wformat -Wformat-security\n                                 $<$<NOT:$<CONFIG:Debug>>:-fno-omit-frame-pointer -qno-opt-report-embed>)\n    if (NOT CMAKE_CXX_FLAGS MATCHES \"_FORTIFY_SOURCE\")\n        set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} $<$<NOT:$<CONFIG:Debug>>:-D_FORTIFY_SOURCE=2>)\n    endif ()\n\n    set(TBB_OPENMP_FLAG -qopenmp)\n    set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:-ipo>)\nelse()\n    include(${CMAKE_CURRENT_LIST_DIR}/GNU.cmake)\n    set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} $<$<EQUAL:${TBB_ARCH},32>:-falign-stack=maintain-16-byte>)\n    set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} -static-intel)\n    set(TBB_OPENMP_FLAG -qopenmp)\n    set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:-ipo>)\nendif()\nset(TBB_IPO_LINK_FLAGS ${TBB_IPO_LINK_FLAGS} ${TBB_IPO_COMPILE_FLAGS})\n"
  },
  {
    "path": "third-party/tbb/cmake/compilers/IntelLLVM.cmake",
    "content": "# Copyright (c) 2020-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nif (WIN32)\n    include(${CMAKE_CURRENT_LIST_DIR}/MSVC.cmake)\n    set(TBB_OPENMP_FLAG /Qopenmp)\n    set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:/Qipo>)\n    set(TBB_IPO_LINK_FLAGS $<$<NOT:$<CONFIG:Debug>>:/INCREMENTAL:NO>)\nelse()\n    include(${CMAKE_CURRENT_LIST_DIR}/Clang.cmake)\n    set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:-ipo>)\n     # \"--exclude-libs,ALL\" is used to avoid accidental exporting of symbols\n    #  from statically linked libraries\n    set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} -static-intel -Wl,--exclude-libs,ALL)\n    set(TBB_OPENMP_FLAG -qopenmp)\nendif()\nset(TBB_IPO_LINK_FLAGS ${TBB_IPO_LINK_FLAGS} ${TBB_IPO_COMPILE_FLAGS})\n"
  },
  {
    "path": "third-party/tbb/cmake/compilers/MSVC.cmake",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset(TBB_LINK_DEF_FILE_FLAG ${CMAKE_LINK_DEF_FILE_FLAG})\nset(TBB_DEF_FILE_PREFIX win${TBB_ARCH})\n\n# Workaround for CMake issue https://gitlab.kitware.com/cmake/cmake/issues/18317.\n# TODO: consider use of CMP0092 CMake policy.\nstring(REGEX REPLACE \"/W[0-4]\" \"\" CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS}\")\n\nset(TBB_WARNING_LEVEL $<$<NOT:$<CXX_COMPILER_ID:Intel>>:/W4> $<$<BOOL:${TBB_STRICT}>:/WX>)\n\n# Warning suppression C4324: structure was padded due to alignment specifier\nset(TBB_WARNING_SUPPRESS /wd4324)\n\nset(TBB_TEST_COMPILE_FLAGS ${TBB_TEST_COMPILE_FLAGS} /bigobj)\nif (MSVC_VERSION LESS_EQUAL 1900)\n    # Warning suppression C4503 for VS2015 and earlier:\n    # decorated name length exceeded, name was truncated.\n    # More info can be found at\n    # https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4503\n    set(TBB_TEST_COMPILE_FLAGS ${TBB_TEST_COMPILE_FLAGS} /wd4503)\nendif()\nset(TBB_LIB_COMPILE_FLAGS -D_CRT_SECURE_NO_WARNINGS /GS)\nset(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} /volatile:iso /FS /EHsc)\n\nset(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} /DEPENDENTLOADFLAG:0x2000 /DYNAMICBASE /NXCOMPAT)\n\nif (TBB_ARCH EQUAL 32)\n    set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} /SAFESEH )\nendif()\n\n# Ignore /WX set through add_compile_options() or added to CMAKE_CXX_FLAGS if TBB_STRICT is disabled.\nif (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)\n    tbb_remove_compile_flag(/WX)\nendif()\n\nif (WINDOWS_STORE OR TBB_WINDOWS_DRIVER)\n    set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} /D_WIN32_WINNT=0x0A00)\n    set(TBB_COMMON_LINK_FLAGS -NODEFAULTLIB:kernel32.lib -INCREMENTAL:NO)\n    set(TBB_COMMON_LINK_LIBS OneCore.lib)\nendif()\n\nif (WINDOWS_STORE)\n    if (NOT CMAKE_SYSTEM_VERSION EQUAL 10.0)\n        message(FATAL_ERROR \"CMAKE_SYSTEM_VERSION must be equal to 10.0\")\n    endif()\n\n    set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} /ZW /ZW:nostdlib)\n\n    # CMake define this extra lib, remove it for this build type\n    string(REGEX REPLACE \"WindowsApp.lib\" \"\" CMAKE_CXX_STANDARD_LIBRARIES \"${CMAKE_CXX_STANDARD_LIBRARIES}\")\n\n    if (TBB_NO_APPCONTAINER)\n        set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} -APPCONTAINER:NO)\n    endif()\nendif()\n\nif (TBB_WINDOWS_DRIVER)\n    # Since this is universal driver disable this variable\n    set(CMAKE_SYSTEM_PROCESSOR \"\")\n\n    # CMake define list additional libs, remove it for this build type\n    set(CMAKE_CXX_STANDARD_LIBRARIES \"\")\n\n    set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} /D _UNICODE /DUNICODE /DWINAPI_FAMILY=WINAPI_FAMILY_APP /D__WRL_NO_DEFAULT_LIB__)\nendif()\n\nif (TBB_FILE_TRIM AND NOT CMAKE_CXX_COMPILER_ID MATCHES \"(Intel|IntelLLVM|Clang)\")\n    add_compile_options(\n        \"$<$<COMPILE_LANGUAGE:CXX>:/d1trimfile:${NATIVE_TBB_PROJECT_ROOT_DIR}\\\\>\"\n        \"$<$<COMPILE_LANGUAGE:CXX>:/d1trimfile:${CMAKE_SOURCE_DIR}/>\")\nendif()\n\nif (TBB_CONTROL_FLOW_GUARD)\n    set(TBB_LIB_COMPILE_FLAGS ${TBB_LIB_COMPILE_FLAGS} /guard:cf)\n    set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} /guard:cf)\nendif()\n\nif (CMAKE_CXX_COMPILER_ID MATCHES \"(Clang|IntelLLVM)\")\n    if (CMAKE_SYSTEM_PROCESSOR MATCHES \"(x86|AMD64|i.86)\")\n        set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm -mwaitpkg)\n    endif()\n    set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:-flto>)\n    set(TBB_IPO_LINK_FLAGS $<$<NOT:$<CONFIG:Debug>>:-flto>)\nelse()\n    set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:/GL>)\n    set(TBB_IPO_LINK_FLAGS $<$<NOT:$<CONFIG:Debug>>:-LTCG> $<$<NOT:$<CONFIG:Debug>>:-INCREMENTAL:NO>)\nendif()\n\nset(TBB_OPENMP_FLAG /openmp)\nset(TBB_OPENMP_NO_LINK_FLAG TRUE) # TBB_OPENMP_FLAG will be used only on compilation but not on linkage\n"
  },
  {
    "path": "third-party/tbb/cmake/compilers/QCC.cmake",
    "content": "# Copyright (c) 2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ninclude(${CMAKE_CURRENT_SOURCE_DIR}/cmake/compilers/GNU.cmake)\n\n# Remove dl library not present in QNX systems\nunset(TBB_COMMON_LINK_LIBS)\n"
  },
  {
    "path": "third-party/tbb/cmake/config_generation.cmake",
    "content": "# Copyright (c) 2020-2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Save current location,\n# see for details: https://cmake.org/cmake/help/latest/variable/CMAKE_CURRENT_LIST_DIR.html\nset(_tbb_gen_cfg_path ${CMAKE_CURRENT_LIST_DIR})\n\ninclude(CMakeParseArguments)\n\nfunction(tbb_generate_config)\n    set(options      HANDLE_SUBDIRS)\n    set(oneValueArgs INSTALL_DIR\n                     SYSTEM_NAME\n                     LIB_REL_PATH INC_REL_PATH\n                     VERSION\n                     TBB_BINARY_VERSION\n                     TBBMALLOC_BINARY_VERSION\n                     TBBMALLOC_PROXY_BINARY_VERSION\n                     TBBBIND_BINARY_VERSION)\n\n    cmake_parse_arguments(tbb_gen_cfg \"${options}\" \"${oneValueArgs}\" \"${multiValueArgs}\" ${ARGN})\n\n    get_filename_component(config_install_dir ${tbb_gen_cfg_INSTALL_DIR} ABSOLUTE)\n    file(MAKE_DIRECTORY ${config_install_dir})\n\n    file(TO_CMAKE_PATH \"${tbb_gen_cfg_LIB_REL_PATH}\" TBB_LIB_REL_PATH)\n    file(TO_CMAKE_PATH \"${tbb_gen_cfg_INC_REL_PATH}\" TBB_INC_REL_PATH)\n\n    set(TBB_VERSION ${tbb_gen_cfg_VERSION})\n\n    set(_tbb_pc_lib_name tbb)\n    set(_prefix_for_pc_file \"\\${pcfiledir}/../../\")\n    set(_includedir_for_pc_file \"\\${prefix}/include\")\n\n    set(TBB_COMPONENTS_BIN_VERSION \"\nset(_tbb_bin_version ${tbb_gen_cfg_TBB_BINARY_VERSION})\nset(_tbbmalloc_bin_version ${tbb_gen_cfg_TBBMALLOC_BINARY_VERSION})\nset(_tbbmalloc_proxy_bin_version ${tbb_gen_cfg_TBBMALLOC_PROXY_BINARY_VERSION})\nset(_tbbbind_bin_version ${tbb_gen_cfg_TBBBIND_BINARY_VERSION})\n\")\n\n    if (tbb_gen_cfg_SYSTEM_NAME STREQUAL \"Linux\")\n        set(TBB_LIB_PREFIX \"lib\")\n        set(TBB_LIB_EXT \"so.\\${_\\${_tbb_component}_bin_version}\")\n\n        set (TBB_HANDLE_IMPLIB \"\n            set (_tbb_release_dll \\${_tbb_release_lib})\n            set (_tbb_debug_dll \\${_tbb_debug_lib})\n\")\n        if (tbb_gen_cfg_HANDLE_SUBDIRS)\n            set(TBB_HANDLE_SUBDIRS \"set(_tbb_subdir gcc4.8)\")\n\n            set(_libdir_for_pc_file \"\\${prefix}/lib/intel64/gcc4.8\")\n            set(_tbb_pc_extra_libdir \"-L\\${prefix}/lib\")\n            configure_file(${_tbb_gen_cfg_path}/../integration/pkg-config/tbb.pc.in ${config_install_dir}/tbb.pc @ONLY)\n\n            set(_libdir_for_pc_file \"\\${prefix}/lib/ia32/gcc4.8\")\n            set(_tbb_pc_extra_libdir \"-L\\${prefix}/lib32\")\n            configure_file(${_tbb_gen_cfg_path}/../integration/pkg-config/tbb.pc.in ${config_install_dir}/tbb32.pc @ONLY)\n        endif()\n    elseif (tbb_gen_cfg_SYSTEM_NAME STREQUAL \"Darwin\")\n        set(TBB_LIB_PREFIX \"lib\")\n        set(TBB_LIB_EXT \"\\${_\\${_tbb_component}_bin_version}.dylib\")\n\n        set (TBB_HANDLE_IMPLIB \"\n            set (_tbb_release_dll \\${_tbb_release_lib})\n            set (_tbb_debug_dll \\${_tbb_debug_lib})\n\")\n        set(_libdir_for_pc_file \"\\${prefix}/lib\")\n        configure_file(${_tbb_gen_cfg_path}/../integration/pkg-config/tbb.pc.in ${config_install_dir}/tbb.pc @ONLY)\n    elseif (tbb_gen_cfg_SYSTEM_NAME STREQUAL \"Windows\")\n        set(TBB_LIB_PREFIX \"\")\n        set(TBB_LIB_EXT \"lib\")\n        set(TBB_COMPILE_DEFINITIONS \"\n                                  INTERFACE_COMPILE_DEFINITIONS \\\"__TBB_NO_IMPLICIT_LINKAGE=1\\\"\")\n        \n        # .lib - installed to TBB_LIB_REL_PATH (e.g. <prefix>/lib) and are passed as IMPORTED_IMPLIB_<CONFIG> property to target\n        # .dll - installed to <prefix>/bin or <prefix>/redist and are passed as IMPORTED_LOCATION_<CONFIG> property to target\n        set (TBB_HANDLE_IMPLIB \"\n            find_file(_tbb_release_dll\n                NAMES \\${_tbb_component}\\${_bin_version}.dll\n                PATHS \\${_tbb_root}\n                PATH_SUFFIXES \\\"redist/\\${_tbb_intel_arch}/\\${_tbb_subdir}\\\" \\\"bin\\${_tbb_arch_suffix}/\\${_tbb_subdir}\\\" \\\"bin\\${_tbb_arch_suffix}/\\\" \\\"bin\\\"\n                NO_DEFAULT_PATH\n            )\n\n            if (EXISTS \\\"\\${_tbb_debug_lib}\\\")\n                find_file(_tbb_debug_dll\n                    NAMES \\${_tbb_component}\\${_bin_version}_debug.dll\n                    PATHS \\${_tbb_root}\n                    PATH_SUFFIXES \\\"redist/\\${_tbb_intel_arch}/\\${_tbb_subdir}\\\" \\\"bin\\${_tbb_arch_suffix}/\\${_tbb_subdir}\\\" \\\"bin\\${_tbb_arch_suffix}/\\\" \\\"bin\\\"\n                    NO_DEFAULT_PATH\n                )\n            endif()\n\")\n            set(TBB_IMPLIB_RELEASE \"\n                                        IMPORTED_IMPLIB_RELEASE \\\"\\${_tbb_release_lib}\\\"\")\n            set(TBB_IMPLIB_DEBUG \"\n                                        IMPORTED_IMPLIB_DEBUG \\\"\\${_tbb_debug_lib}\\\"\")\n\n        if (tbb_gen_cfg_HANDLE_SUBDIRS)\n            set(TBB_HANDLE_SUBDIRS \"\nset(_tbb_subdir vc14)\nif (WINDOWS_STORE)\n    set(_tbb_subdir \\${_tbb_subdir}_uwp)\nendif()\n\")\n            set(_tbb_pc_lib_name ${_tbb_pc_lib_name}${TBB_BINARY_VERSION})\n\n            set(_libdir_for_pc_file \"\\${prefix}/lib/intel64/vc14\")\n            set(_tbb_pc_extra_libdir \"-L\\${prefix}/lib\")\n            configure_file(${_tbb_gen_cfg_path}/../integration/pkg-config/tbb.pc.in ${config_install_dir}/tbb.pc @ONLY)\n\n            set(_libdir_for_pc_file \"\\${prefix}/lib/ia32/vc14\")\n            set(_tbb_pc_extra_libdir \"-L\\${prefix}/lib32\")\n            configure_file(${_tbb_gen_cfg_path}/../integration/pkg-config/tbb.pc.in ${config_install_dir}/tbb32.pc @ONLY)\n        endif()\n\n        set(TBB_HANDLE_BIN_VERSION \"\n    unset(_bin_version)\n    if (_tbb_component STREQUAL tbb)\n        set(_bin_version \\${_tbb_bin_version})\n    endif()\n\")\n    else()\n        message(FATAL_ERROR \"Unsupported OS name: ${tbb_system_name}\")\n    endif()\n\n    configure_file(${_tbb_gen_cfg_path}/templates/TBBConfig.cmake.in ${config_install_dir}/TBBConfig.cmake @ONLY)\n    configure_file(${_tbb_gen_cfg_path}/templates/TBBConfigVersion.cmake.in ${config_install_dir}/TBBConfigVersion.cmake @ONLY)\nendfunction()\n"
  },
  {
    "path": "third-party/tbb/cmake/hwloc_detection.cmake",
    "content": "# Copyright (c) 2020-2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nlist(APPEND HWLOC_REQUIRED_VERSIONS 1_11 2 2_5)\n\nforeach(hwloc_version ${HWLOC_REQUIRED_VERSIONS})\n    if (NOT WIN32)\n        set(CMAKE_HWLOC_${hwloc_version}_DLL_PATH STUB)\n    endif()\n    set(HWLOC_TARGET_NAME HWLOC::hwloc_${hwloc_version})\n\n    if (NOT TARGET ${HWLOC_TARGET_NAME} AND\n        CMAKE_HWLOC_${hwloc_version}_LIBRARY_PATH AND\n        CMAKE_HWLOC_${hwloc_version}_DLL_PATH AND\n        CMAKE_HWLOC_${hwloc_version}_INCLUDE_PATH\n    )\n        add_library(${HWLOC_TARGET_NAME} SHARED IMPORTED)\n        set_target_properties(${HWLOC_TARGET_NAME} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES\n            \"${CMAKE_HWLOC_${hwloc_version}_INCLUDE_PATH}\")\n        if (WIN32)\n            set_target_properties(${HWLOC_TARGET_NAME} PROPERTIES\n                                  IMPORTED_LOCATION \"${CMAKE_HWLOC_${hwloc_version}_DLL_PATH}\"\n                                  IMPORTED_IMPLIB   \"${CMAKE_HWLOC_${hwloc_version}_LIBRARY_PATH}\")\n        else()\n            set_target_properties(${HWLOC_TARGET_NAME} PROPERTIES\n                                  IMPORTED_LOCATION \"${CMAKE_HWLOC_${hwloc_version}_LIBRARY_PATH}\")\n        endif()\n    endif()\n\n    if (TARGET ${HWLOC_TARGET_NAME})\n        set(HWLOC_TARGET_EXPLICITLY_DEFINED TRUE)\n    endif()\nendforeach()\n\nunset(HWLOC_TARGET_NAME)\n\nif (NOT HWLOC_TARGET_EXPLICITLY_DEFINED AND\n    NOT TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH\n)\n    find_package(PkgConfig QUIET)\n    if (PKG_CONFIG_FOUND AND NOT CMAKE_VERSION VERSION_LESS 3.6)\n        pkg_search_module(HWLOC hwloc IMPORTED_TARGET)\n        if (TARGET PkgConfig::HWLOC)\n            if (HWLOC_VERSION VERSION_LESS 2)\n                set(TBBBIND_LIBRARY_NAME tbbbind)\n            elseif(HWLOC_VERSION VERSION_LESS 2.5)\n                set(TBBBIND_LIBRARY_NAME tbbbind_2_0)\n            else()\n                set(TBBBIND_LIBRARY_NAME tbbbind_2_5)\n            endif()\n        endif()\n    endif()\nendif()\n"
  },
  {
    "path": "third-party/tbb/cmake/memcheck.cmake",
    "content": "# Copyright (c) 2020-2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\noption(TBB_VALGRIND_MEMCHECK \"Enable scan for memory leaks using Valgrind\" OFF)\n\nif (NOT TBB_VALGRIND_MEMCHECK)\n    return()\nendif()\n\nadd_custom_target(memcheck-all\n    COMMENT \"Run memcheck on all tests\")\n\nfind_program(VALGRIND_EXE valgrind)\n\nif (NOT VALGRIND_EXE)\n    message(FATAL_ERROR \"Valgrind executable is not found, add tool to PATH or turn off TBB_VALGRIND_MEMCHECK\")\nelse()\n    message(STATUS \"Found Valgrind to run memory leak scan\")\nendif()\n\nfile(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/memcheck)\n\nfunction(_tbb_run_memcheck test_target subdir)\n    set(target_name memcheck-${test_target})\n    if(${subdir} STREQUAL \"tbbmalloc\")\n\t# Valgring intercepts all allocation symbols with its own by default,\n\t# so it disables using tbbmalloc. In case of tbbmalloc tests\n\t# intercept allocation symbols only in the default system libraries,\n\t# but not in any other shared library or the executable\n\t# defining public malloc or operator new related functions.\n\tset(option \"--soname-synonyms=somalloc=nouserintercepts\")\n    endif()\n    add_custom_target(${target_name} \n        COMMAND ${VALGRIND_EXE} ${option} --leak-check=full --show-leak-kinds=all --log-file=${CMAKE_BINARY_DIR}/memcheck/${target_name}.log -v $<TARGET_FILE:${test_target}>)\n    add_dependencies(memcheck-all ${target_name})\nendfunction()\n\nadd_custom_target(memcheck-short\n    COMMENT \"Run memcheck scan on specified list\")\n\n# List of reasonable and quick enough tests to use in automated memcheck\nadd_dependencies(memcheck-short \n    memcheck-test_allocators\n    memcheck-test_arena_constraints\n    memcheck-test_dynamic_link\n    memcheck-test_concurrent_lru_cache\n    memcheck-conformance_concurrent_unordered_map\n    memcheck-conformance_concurrent_unordered_set\n    memcheck-conformance_concurrent_map\n    memcheck-conformance_concurrent_set\n    memcheck-conformance_concurrent_priority_queue\n    memcheck-conformance_concurrent_vector\n    memcheck-conformance_concurrent_queue\n    memcheck-conformance_concurrent_hash_map\n    memcheck-test_parallel_for\n    memcheck-test_parallel_for_each\n    memcheck-test_parallel_reduce\n    memcheck-test_parallel_sort\n    memcheck-test_parallel_invoke\n    memcheck-test_parallel_scan\n    memcheck-test_parallel_pipeline\n    memcheck-test_eh_algorithms\n    memcheck-test_task_group\n    memcheck-test_task_arena\n    memcheck-test_enumerable_thread_specific\n    memcheck-test_resumable_tasks\n    memcheck-conformance_mutex\n    memcheck-test_function_node\n    memcheck-test_multifunction_node\n    memcheck-test_broadcast_node\n    memcheck-test_buffer_node\n    memcheck-test_composite_node\n    memcheck-test_continue_node\n    memcheck-test_eh_flow_graph\n    memcheck-test_flow_graph\n    memcheck-test_flow_graph_priorities\n    memcheck-test_flow_graph_whitebox\n    memcheck-test_indexer_node\n    memcheck-test_join_node\n    memcheck-test_join_node_key_matching\n    memcheck-test_join_node_msg_key_matching\n    memcheck-test_priority_queue_node\n    memcheck-test_sequencer_node\n    memcheck-test_split_node\n    memcheck-test_tagged_msg\n    memcheck-test_overwrite_node\n    memcheck-test_write_once_node\n    memcheck-test_async_node\n    memcheck-test_input_node\n    memcheck-test_profiling\n    memcheck-test_concurrent_queue_whitebox\n    memcheck-test_intrusive_list\n    memcheck-test_semaphore\n    memcheck-test_environment_whitebox\n    memcheck-test_handle_perror\n    memcheck-test_hw_concurrency\n    memcheck-test_eh_thread\n    memcheck-test_global_control\n    memcheck-test_task\n    memcheck-test_concurrent_monitor\n)\n"
  },
  {
    "path": "third-party/tbb/cmake/packaging.cmake",
    "content": "# Copyright (c) 2020-2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Note: current implementation uses CMAKE_BUILD_TYPE,\n# this parameter is not defined for multi-config generators.\nset(CPACK_PACKAGE_NAME \"${PROJECT_NAME}\")\nset(CPACK_PACKAGE_VERSION \"${TBB_VERSION}\")\nstring(TOLOWER ${CPACK_PACKAGE_NAME}-${PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}_${TBB_OUTPUT_DIR_BASE}_${CMAKE_BUILD_TYPE} CPACK_PACKAGE_FILE_NAME)\nset(CPACK_GENERATOR ZIP)\n# Note: this is an internal non-documented variable set by CPack \nif (NOT CPack_CMake_INCLUDED)\n    include(CPack)\nendif()\n"
  },
  {
    "path": "third-party/tbb/cmake/post_install/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Add code signing as post-install step.\nif (DEFINED TBB_SIGNTOOL)\n    file(TO_CMAKE_PATH \"${TBB_SIGNTOOL}\" TBB_SIGNTOOL)\n    install(CODE \"\n    file(GLOB_RECURSE FILES_TO_SIGN \\${CMAKE_INSTALL_PREFIX}/*${CMAKE_SHARED_LIBRARY_SUFFIX})\n    execute_process(COMMAND ${TBB_SIGNTOOL} \\${FILES_TO_SIGN} ${TBB_SIGNTOOL_ARGS})\n\")\nendif()\n"
  },
  {
    "path": "third-party/tbb/cmake/python/test_launcher.cmake",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nif (POLICY CMP0148)\n    # CMake 3.27: The FindPythonInterp and FindPythonLibs modules are removed\n    cmake_policy(SET CMP0148 OLD)\nendif()\n\nfind_package(PythonInterp 3.5 REQUIRED)\n\nfile(GLOB_RECURSE MODULES_LIST \"${PYTHON_MODULE_BUILD_PATH}/*TBB.py*\" )\nlist(LENGTH MODULES_LIST MODULES_COUNT)\n\nif (MODULES_COUNT EQUAL 0)\n    message(FATAL_ERROR \"Cannot find oneTBB Python module\")\nelseif (MODULES_COUNT GREATER 1)\n    message(WARNING \"Found more than oneTBB Python modules, the only first found module will be tested\")\nendif()\n\nlist(GET MODULES_LIST 0 PYTHON_MODULE)\nget_filename_component(PYTHON_MODULE_PATH ${PYTHON_MODULE} DIRECTORY)\n\nexecute_process(\n    COMMAND\n        ${CMAKE_COMMAND} -E env LD_LIBRARY_PATH=${TBB_BINARIES_PATH}\n        ${PYTHON_EXECUTABLE} -m tbb test\n    WORKING_DIRECTORY ${PYTHON_MODULE_PATH}\n    RESULT_VARIABLE CMD_RESULT\n)\nif (CMD_RESULT)\n    message(FATAL_ERROR \"Error while test execution: ${cmd} error_code: ${CMD_RESULT}\")\nendif()\n"
  },
  {
    "path": "third-party/tbb/cmake/resumable_tasks.cmake",
    "content": "# Copyright (c) 2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ninclude(CheckSymbolExists)\n\nif (UNIX)\n    set(CMAKE_REQUIRED_FLAGS -Wno-deprecated-declarations)\n    if (APPLE)\n        set(CMAKE_REQUIRED_DEFINITIONS -D_XOPEN_SOURCE)\n    endif()\n\n    check_symbol_exists(\"getcontext\" \"ucontext.h\" _tbb_have_ucontext)\n    if (NOT _tbb_have_ucontext)\n        set(TBB_RESUMABLE_TASKS_USE_THREADS \"__TBB_RESUMABLE_TASKS_USE_THREADS=1\")\n    endif()\n\n    unset(_tbb_have_ucontext)\n    unset(CMAKE_REQUIRED_DEFINITIONS)\n    unset(CMAKE_REQUIRED_FLAGS)\nendif()\n"
  },
  {
    "path": "third-party/tbb/cmake/sanitize.cmake",
    "content": "# Copyright (c) 2020-2022 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset(TBB_SANITIZE ${TBB_SANITIZE} CACHE STRING \"Sanitizer parameter passed to compiler/linker\" FORCE)\n# Possible values of sanitizer parameter for cmake-gui for convenience, user still can use any other value.\nset_property(CACHE TBB_SANITIZE PROPERTY STRINGS \"thread\" \"memory\" \"leak\" \"address -fno-omit-frame-pointer\")\n\nif (NOT TBB_SANITIZE)\n    return()\nendif()\n\nset(TBB_SANITIZE_OPTION -fsanitize=${TBB_SANITIZE})\n\n# It is required to add sanitizer option to CMAKE_REQUIRED_LIBRARIES to make check_cxx_compiler_flag working properly:\n# sanitizer option should be passed during the compilation phase as well as during the compilation.\nset(CMAKE_REQUIRED_LIBRARIES \"${TBB_SANITIZE_OPTION} ${CMAKE_REQUIRED_LIBRARIES}\")\n\nstring(MAKE_C_IDENTIFIER ${TBB_SANITIZE_OPTION} FLAG_DISPLAY_NAME)\ncheck_cxx_compiler_flag(${TBB_SANITIZE_OPTION} ${FLAG_DISPLAY_NAME})\nif (NOT ${FLAG_DISPLAY_NAME})\n    message(FATAL_ERROR\n    \"${TBB_SANITIZE_OPTION} is not supported by compiler ${CMAKE_CXX_COMPILER_ID}:${CMAKE_CXX_COMPILER_VERSION}, \"\n    \"please try another compiler or omit TBB_SANITIZE variable\")\nendif()\n\nset(TBB_TESTS_ENVIRONMENT ${TBB_TESTS_ENVIRONMENT}\n    \"TSAN_OPTIONS=suppressions=${CMAKE_CURRENT_SOURCE_DIR}/cmake/suppressions/tsan.suppressions\"\n    \"LSAN_OPTIONS=suppressions=${CMAKE_CURRENT_SOURCE_DIR}/cmake/suppressions/lsan.suppressions\")\n\nset(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} ${TBB_SANITIZE_OPTION}\")\nset(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} ${TBB_SANITIZE_OPTION}\")\nset(CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS} ${TBB_SANITIZE_OPTION}\")\n"
  },
  {
    "path": "third-party/tbb/cmake/scripts/cmake_gen_github_configs.cmake",
    "content": "# Copyright (c) 2020-2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ninclude(${CMAKE_CURRENT_LIST_DIR}/../config_generation.cmake)\n\n# TBBConfig in TBB provided packages are expected to be placed into: <tbb-root>/lib/cmake/tbb*\nset(TBB_ROOT_REL_PATH \"../../..\")\n\n# Paths relative to TBB root directory\nset(INC_REL_PATH \"include\")\nset(LIB_REL_PATH \"lib\")\n\n# Parse version info\nfile(READ ${CMAKE_CURRENT_LIST_DIR}/../../include/oneapi/tbb/version.h _tbb_version_info)\nstring(REGEX REPLACE \".*#define TBB_VERSION_MAJOR ([0-9]+).*\" \"\\\\1\" _tbb_ver_major \"${_tbb_version_info}\")\nstring(REGEX REPLACE \".*#define TBB_VERSION_MINOR ([0-9]+).*\" \"\\\\1\" _tbb_ver_minor \"${_tbb_version_info}\")\nstring(REGEX REPLACE \".*#define TBB_VERSION_PATCH ([0-9]+).*\" \"\\\\1\" _tbb_ver_patch \"${_tbb_version_info}\")\nstring(REGEX REPLACE \".*#define __TBB_BINARY_VERSION ([0-9]+).*\" \"\\\\1\" TBB_BINARY_VERSION \"${_tbb_version_info}\")\nfile(READ ${CMAKE_CURRENT_LIST_DIR}/../../CMakeLists.txt _tbb_cmakelist)\nstring(REGEX REPLACE \".*TBBMALLOC_BINARY_VERSION ([0-9]+).*\" \"\\\\1\" TBBMALLOC_BINARY_VERSION \"${_tbb_cmakelist}\")\nset(TBBMALLOC_PROXY_BINARY_VERSION ${TBBMALLOC_BINARY_VERSION})\nstring(REGEX REPLACE \".*TBBBIND_BINARY_VERSION ([0-9]+).*\" \"\\\\1\" TBBBIND_BINARY_VERSION \"${_tbb_cmakelist}\")\n\nset(COMMON_ARGS\n    TBB_ROOT_REL_PATH ${TBB_ROOT_REL_PATH}\n    INC_REL_PATH ${INC_REL_PATH}\n    LIB_REL_PATH ${LIB_REL_PATH}\n    VERSION ${_tbb_ver_major}.${_tbb_ver_minor}.${_tbb_ver_patch}\n    TBB_BINARY_VERSION ${TBB_BINARY_VERSION}\n    TBBMALLOC_BINARY_VERSION ${TBBMALLOC_BINARY_VERSION}\n    TBBMALLOC_PROXY_BINARY_VERSION ${TBBMALLOC_PROXY_BINARY_VERSION}\n    TBBBIND_BINARY_VERSION ${TBBBIND_BINARY_VERSION}\n)\n\ntbb_generate_config(INSTALL_DIR ${INSTALL_DIR}/linux   SYSTEM_NAME Linux   HANDLE_SUBDIRS ${COMMON_ARGS})\ntbb_generate_config(INSTALL_DIR ${INSTALL_DIR}/windows SYSTEM_NAME Windows HANDLE_SUBDIRS ${COMMON_ARGS})\ntbb_generate_config(INSTALL_DIR ${INSTALL_DIR}/darwin  SYSTEM_NAME Darwin                 ${COMMON_ARGS})\nmessage(STATUS \"TBBConfig files were created in ${INSTALL_DIR}\")\n"
  },
  {
    "path": "third-party/tbb/cmake/suppressions/lsan.suppressions",
    "content": "# LSAN suppression for ltdl library known issue.\nleak:libltdl.so\n"
  },
  {
    "path": "third-party/tbb/cmake/suppressions/tsan.suppressions",
    "content": "# TSAN suppression for known issues.\n# Possible data race during ittnotify initialization. Low impact.\nrace:__itt_nullify_all_pointers\nrace:__itt_init_ittlib\n"
  },
  {
    "path": "third-party/tbb/cmake/templates/TBBConfig.cmake.in",
    "content": "# Copyright (c) 2017-2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# It defines the following variables:\n#     TBB_<component>_FOUND\n#     TBB_IMPORTED_TARGETS\n#\n# TBBConfigVersion.cmake defines TBB_VERSION\n#\n# Initialize to default values\nif (NOT TBB_IMPORTED_TARGETS)\n    set(TBB_IMPORTED_TARGETS \"\")\nendif()\n\nif (NOT TBB_FIND_COMPONENTS)\n    set(TBB_FIND_COMPONENTS \"tbb;tbbmalloc;tbbmalloc_proxy\")\n    foreach (_tbb_component ${TBB_FIND_COMPONENTS})\n        set(TBB_FIND_REQUIRED_${_tbb_component} 1)\n    endforeach()\nendif()\n\nget_filename_component(_tbb_root \"${CMAKE_CURRENT_LIST_DIR}\" REALPATH)\nget_filename_component(_tbb_root \"${_tbb_root}/@TBB_ROOT_REL_PATH@\" ABSOLUTE)\n\nset(TBB_INTERFACE_VERSION @TBB_INTERFACE_VERSION@)\n@TBB_COMPONENTS_BIN_VERSION@\n# Add components with internal dependencies: tbbmalloc_proxy -> tbbmalloc\nlist(FIND TBB_FIND_COMPONENTS tbbmalloc_proxy _tbbmalloc_proxy_ix)\nif (NOT _tbbmalloc_proxy_ix EQUAL -1)\n    list(APPEND TBB_FIND_COMPONENTS tbbmalloc)\n    list(REMOVE_DUPLICATES TBB_FIND_COMPONENTS)\n    set(TBB_FIND_REQUIRED_tbbmalloc ${TBB_FIND_REQUIRED_tbbmalloc_proxy})\nendif()\nunset(_tbbmalloc_proxy_ix)\n\nif (CMAKE_SIZEOF_VOID_P STREQUAL \"8\")\n    set(_tbb_intel_arch intel64)\nelse ()\n    set(_tbb_intel_arch ia32)\n    set(_tbb_arch_suffix 32)\nendif()\n\n@TBB_HANDLE_SUBDIRS@\nforeach (_tbb_component ${TBB_FIND_COMPONENTS})\n    unset(_tbb_release_dll CACHE)\n    unset(_tbb_debug_dll   CACHE)\n    unset(_tbb_release_lib CACHE)\n    unset(_tbb_debug_lib   CACHE)\n\n    set(TBB_${_tbb_component}_FOUND 0)\n    @TBB_HANDLE_BIN_VERSION@\n\n    find_library(_tbb_release_lib\n        NAMES @TBB_LIB_PREFIX@${_tbb_component}${_bin_version}.@TBB_LIB_EXT@\n        PATHS ${_tbb_root}\n        PATH_SUFFIXES \"@TBB_LIB_REL_PATH@/${_tbb_intel_arch}/${_tbb_subdir}\" \"@TBB_LIB_REL_PATH@${_tbb_arch_suffix}/${_tbb_subdir}\" \"@TBB_LIB_REL_PATH@${_tbb_arch_suffix}\" \"@TBB_LIB_REL_PATH@\"\n        NO_DEFAULT_PATH\n    )\n\n    if (NOT TBB_FIND_RELEASE_ONLY)\n        find_library(_tbb_debug_lib\n            NAMES @TBB_LIB_PREFIX@${_tbb_component}${_bin_version}_debug.@TBB_LIB_EXT@\n            PATHS ${_tbb_root}\n            PATH_SUFFIXES \"@TBB_LIB_REL_PATH@/${_tbb_intel_arch}/${_tbb_subdir}\" \"@TBB_LIB_REL_PATH@${_tbb_arch_suffix}/${_tbb_subdir}\" \"@TBB_LIB_REL_PATH@${_tbb_arch_suffix}\" \"@TBB_LIB_REL_PATH@\"\n            NO_DEFAULT_PATH\n        )\n    endif()\n\n    if (EXISTS \"${_tbb_release_lib}\" OR EXISTS \"${_tbb_debug_lib}\")\n        if (NOT TARGET TBB::${_tbb_component})\n            add_library(TBB::${_tbb_component} SHARED IMPORTED)\n\n            get_filename_component(_tbb_include_dir \"${_tbb_root}/@TBB_INC_REL_PATH@\" ABSOLUTE)\n            set_target_properties(TBB::${_tbb_component} PROPERTIES\n                                  INTERFACE_INCLUDE_DIRECTORIES \"${_tbb_include_dir}\"@TBB_COMPILE_DEFINITIONS@)\n            unset(_tbb_current_realpath)\n            unset(_tbb_include_dir)\n\n            @TBB_HANDLE_IMPLIB@\n\n            if (EXISTS \"${_tbb_release_dll}\")\n                set_target_properties(TBB::${_tbb_component} PROPERTIES\n                                      IMPORTED_LOCATION_RELEASE \"${_tbb_release_dll}\"@TBB_IMPLIB_RELEASE@)\n                set_property(TARGET TBB::${_tbb_component} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)\n            endif()\n\n            if (EXISTS \"${_tbb_debug_dll}\")\n                set_target_properties(TBB::${_tbb_component} PROPERTIES\n                                      IMPORTED_LOCATION_DEBUG \"${_tbb_debug_dll}\"@TBB_IMPLIB_DEBUG@)\n                set_property(TARGET TBB::${_tbb_component} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)\n            endif()\n\n            # Add internal dependencies for imported targets: TBB::tbbmalloc_proxy -> TBB::tbbmalloc\n            if (_tbb_component STREQUAL tbbmalloc_proxy)\n                set_target_properties(TBB::tbbmalloc_proxy PROPERTIES INTERFACE_LINK_LIBRARIES TBB::tbbmalloc)\n            endif()\n        endif()\n        list(APPEND TBB_IMPORTED_TARGETS TBB::${_tbb_component})\n        set(TBB_${_tbb_component}_FOUND 1)\n    elseif (TBB_FIND_REQUIRED AND TBB_FIND_REQUIRED_${_tbb_component})\n        message(STATUS \"Missed required oneTBB component: ${_tbb_component}\")\n        if (TBB_FIND_RELEASE_ONLY)\n            message(STATUS \"  ${_tbb_release_lib} must exist.\")\n        else()\n            message(STATUS \"  one or both of:\\n   ${_tbb_release_lib}\\n    ${_tbb_debug_lib}\\n   files must exist.\")\n        endif()\n        set(TBB_FOUND FALSE)\n    endif()\nendforeach()\nlist(REMOVE_DUPLICATES TBB_IMPORTED_TARGETS)\nunset(_tbb_release_dll)\nunset(_tbb_debug_dll)\nunset(_tbb_release_lib)\nunset(_tbb_debug_lib)\nunset(_tbb_root)\nunset(_tbb_intel_arch)\nunset(_tbb_arch_suffix)\n"
  },
  {
    "path": "third-party/tbb/cmake/templates/TBBConfigVersion.cmake.in",
    "content": "# Copyright (c) 2017-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset(PACKAGE_VERSION @TBB_VERSION@)\n\nif (\"${PACKAGE_VERSION}\" VERSION_LESS \"${PACKAGE_FIND_VERSION}\")\n    set(PACKAGE_VERSION_COMPATIBLE FALSE)\nelse()\n    set(PACKAGE_VERSION_COMPATIBLE TRUE)\n    if (\"${PACKAGE_VERSION}\" VERSION_EQUAL \"${PACKAGE_FIND_VERSION}\")\n        set(PACKAGE_VERSION_EXACT TRUE)\n    endif()\nendif()\n"
  },
  {
    "path": "third-party/tbb/cmake/test_spec.cmake",
    "content": "# Copyright (c) 2020-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\noption(TBB_TEST_SPEC \"Generate test specification (Doxygen)\" OFF)\n\nif (TBB_TEST_SPEC)\n    find_package(Doxygen REQUIRED)\n\n    set(DOXYGEN_PREDEFINED_MACROS\n      \"TBB_USE_EXCEPTIONS \\\n      __TBB_RESUMABLE_TASKS \\\n      __TBB_HWLOC_PRESENT \\\n      __TBB_CPP17_DEDUCTION_GUIDES_PRESENT \\\n      __TBB_CPP17_MEMORY_RESOURCE_PRESENT \\\n      __TBB_CPP14_GENERIC_LAMBDAS_PRESENT\"\n    )\n\n    add_custom_target(\n      test_spec ALL\n      COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile\n      COMMENT \"Generating test specification with Doxygen\"\n      VERBATIM)\n    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)\nendif()\n"
  },
  {
    "path": "third-party/tbb/cmake/toolchains/mips.cmake",
    "content": "# Copyright (c) 2020-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Prevent double invocation.\nif (MIPS_TOOLCHAIN_INCLUDED)\n    return()\nendif()\nset(MIPS_TOOLCHAIN_INCLUDED TRUE)\n\nset(CMAKE_SYSTEM_NAME Linux)\nset(CMAKE_SYSTEM_VERSION 1)\nset(CMAKE_SYSTEM_PROCESSOR mips)\n\nset(CMAKE_C_COMPILER ${CMAKE_FIND_ROOT_PATH}/bin/mips-img-linux-gnu-gcc)\nset(CMAKE_CXX_COMPILER ${CMAKE_FIND_ROOT_PATH}/bin/mips-img-linux-gnu-g++)\nset(CMAKE_LINKER ${CMAKE_FIND_ROOT_PATH}/bin/mips-img-linux-gnu-ld)\n\n# Define result for try_run used in find_package(Threads).\n# In old CMake versions (checked on 3.5) there is invocation of try_run command in FindThreads.cmake module.\n# It can't be executed on host system in case of cross-compilation for MIPS architecture.\n# Define return code for this try_run as 0 since threads are expected to be available on target machine.\nset(THREADS_PTHREAD_ARG \"0\" CACHE STRING \"Result from TRY_RUN\" FORCE)\n\nset(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\nset(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n\nset(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -EL -mabi=64 -march=mips64r6 -mcrc -mfp64 -mmt -mtune=mips64r6 -ggdb -ffp-contract=off -mhard-float\" CACHE INTERNAL \"\")\nset(CMAKE_SHARED_LINKER_FLAGS \"${CMAKE_SHARED_LINKER_FLAGS} -mvirt -mxpa\" CACHE INTERNAL \"\")\nset(CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS} -mvirt -mxpa\" CACHE INTERNAL \"\")  # for tests\n"
  },
  {
    "path": "third-party/tbb/cmake/toolchains/riscv64.cmake",
    "content": "# Copyright (c) 2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Prevent double invocation.\nif (RISCV_TOOLCHAIN_INCLUDED)\n    return()\nendif()\nset(RISCV_TOOLCHAIN_INCLUDED TRUE)\n\nset(CMAKE_SYSTEM_NAME Linux)\nset(CMAKE_SYSTEM_VERSION 1)\nset(CMAKE_SYSTEM_PROCESSOR riscv)\n\n# User can use -DCMAKE_FIND_ROOT_PATH to specific toolchain path\nset(CMAKE_C_COMPILER ${CMAKE_FIND_ROOT_PATH}/bin/riscv64-unknown-linux-gnu-clang)\nset(CMAKE_CXX_COMPILER ${CMAKE_FIND_ROOT_PATH}/bin/riscv64-unknown-linux-gnu-clang++)\nset(CMAKE_LINKER ${CMAKE_FIND_ROOT_PATH}/bin/riscv64-unknown-linux-gnu-ld)\n\nset(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\nset(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n\n# Most linux on riscv64 support rv64imafd_zba_zbb extensions\nset(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -march=rv64imafd_zba_zbb -mabi=lp64d \" CACHE INTERNAL \"\")\n"
  },
  {
    "path": "third-party/tbb/cmake/utils.cmake",
    "content": "# Copyright (c) 2020-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nmacro(tbb_remove_compile_flag flag)\n    get_property(_tbb_compile_options DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY COMPILE_OPTIONS)\n    list(REMOVE_ITEM _tbb_compile_options ${flag})\n    set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY COMPILE_OPTIONS ${_tbb_compile_options})\n    unset(_tbb_compile_options)\n    if (CMAKE_CXX_FLAGS)\n        string(REGEX REPLACE \"(^|[ \\t\\r\\n]+)${flag}($|[ \\t\\r\\n]+)\" \" \" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})\n    endif()\nendmacro()\n\nmacro(tbb_install_target target)\n    if (TBB_INSTALL)\n        install(TARGETS ${target}\n            EXPORT TBBTargets\n            LIBRARY\n                DESTINATION ${CMAKE_INSTALL_LIBDIR}\n                NAMELINK_SKIP\n                COMPONENT runtime\n            RUNTIME\n                DESTINATION ${CMAKE_INSTALL_BINDIR}\n                COMPONENT runtime\n            ARCHIVE\n                DESTINATION ${CMAKE_INSTALL_LIBDIR}\n                COMPONENT devel\n            FRAMEWORK\n                DESTINATION ${CMAKE_INSTALL_LIBDIR}\n                COMPONENT runtime\n                OPTIONAL)\n\n        if (BUILD_SHARED_LIBS)\n            install(TARGETS ${target}\n                LIBRARY\n                    DESTINATION ${CMAKE_INSTALL_LIBDIR}\n                    NAMELINK_ONLY\n                    COMPONENT devel)\n        endif()\n        if (MSVC AND BUILD_SHARED_LIBS)\n            install(FILES $<TARGET_PDB_FILE:${target}>\n                DESTINATION ${CMAKE_INSTALL_BINDIR}\n                COMPONENT devel\n                OPTIONAL)\n        endif()\n    endif()\nendmacro()\n\nmacro(tbb_handle_ipo target)\n    if (TBB_IPO_PROPERTY)\n        set_target_properties(${target} PROPERTIES \n            INTERPROCEDURAL_OPTIMIZATION TRUE\n            INTERPROCEDURAL_OPTIMIZATION_DEBUG FALSE\n        )\n    elseif (TBB_IPO_FLAGS)\n        target_compile_options(${target} PRIVATE ${TBB_IPO_COMPILE_FLAGS})\n        if (COMMAND target_link_options)\n            target_link_options(${target} PRIVATE ${TBB_IPO_LINK_FLAGS})\n        else()\n            target_link_libraries(${target} PRIVATE ${TBB_IPO_LINK_FLAGS})\n        endif()\n    endif()\nendmacro()\n"
  },
  {
    "path": "third-party/tbb/cmake/vars_utils.cmake",
    "content": "# Copyright (c) 2020-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\noption(TBB_INSTALL_VARS \"Enable auto-generated vars installation\" OFF)\n\nif (WIN32)\n    set(TBB_VARS_TEMPLATE \"windows/env/vars.bat.in\")\nelseif (APPLE)\n    set(TBB_VARS_TEMPLATE \"mac/env/vars.sh.in\")\nelse()\n    set(TBB_VARS_TEMPLATE \"linux/env/vars.sh.in\")\nendif()\n\nget_filename_component(TBB_VARS_TEMPLATE_NAME ${PROJECT_SOURCE_DIR}/integration/${TBB_VARS_TEMPLATE} NAME)\nstring(REPLACE \".in\" \"\" TBB_VARS_NAME ${TBB_VARS_TEMPLATE_NAME})\n\nmacro(tbb_gen_vars target)\n    if (NOT TBB_BUILD_APPLE_FRAMEWORKS)\n        set(BIN_PATH $<TARGET_FILE_DIR:${target}>)\n    else()\n        # For Apple* frameworks, the binaries are placed in a framework bundle. \n        # When using an Apple* framework, you refer to the bundle, not the binary inside, so we take the bundle's path and go up one level.\n        # This path will then be used to generate the vars file, and the contents of the vars file will use the bundle's parent directory.\n        set(BIN_PATH $<TARGET_BUNDLE_DIR:${target}>/..)\n    endif()\n    if (${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME})\n        add_custom_command(TARGET ${target} POST_BUILD COMMAND\n            ${CMAKE_COMMAND}\n            -DBINARY_DIR=${CMAKE_BINARY_DIR}\n            -DSOURCE_DIR=${PROJECT_SOURCE_DIR}\n            -DBIN_PATH=${BIN_PATH}\n            -DVARS_TEMPLATE=${TBB_VARS_TEMPLATE}\n            -DVARS_NAME=${TBB_VARS_NAME}\n            -DTBB_INSTALL_VARS=${TBB_INSTALL_VARS}\n            -DTBB_CMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}\n            -P ${PROJECT_SOURCE_DIR}/integration/cmake/generate_vars.cmake\n        )\n    endif()\nendmacro(tbb_gen_vars)\n\nif (TBB_INSTALL_VARS)\n    install(PROGRAMS \"${CMAKE_BINARY_DIR}/internal_install_vars\"\n            DESTINATION env\n            RENAME ${TBB_VARS_NAME})\nendif()\n"
  },
  {
    "path": "third-party/tbb/doc/Doxyfile.in",
    "content": "# Doxyfile 1.8.13\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org) for a project.\n#\n# All text after a double hash (##) is considered a comment and is placed in\n# front of the TAG it is preceding.\n#\n# All text after a single hash (#) is considered a comment and will be ignored.\n# The format is:\n# TAG = value [value, ...]\n# For lists, items can also be appended using:\n# TAG += value [value, ...]\n# Values that contain spaces should be placed between quotes (\\\" \\\").\n\n#---------------------------------------------------------------------------\n# Project related configuration options\n#---------------------------------------------------------------------------\n\n# This tag specifies the encoding used for all characters in the config file\n# that follow. The default is UTF-8 which is also the encoding used for all text\n# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv\n# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv\n# for the list of possible encodings.\n# The default value is: UTF-8.\n\nDOXYFILE_ENCODING      = UTF-8\n\n# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by\n# double-quotes, unless you are using Doxywizard) that should identify the\n# project for which the documentation is generated. This name is used in the\n# title of most generated pages and in a few other places.\n# The default value is: My Project.\n\nPROJECT_NAME           = \"oneTBB Test Specification\"\n\n# The PROJECT_NUMBER tag can be used to enter a project or revision number. This\n# could be handy for archiving the generated documentation or if some version\n# control system is used.\n\nPROJECT_NUMBER         =\n\n# Using the PROJECT_BRIEF tag one can provide an optional one line description\n# for a project that appears at the top of each page and should give viewer a\n# quick idea about the purpose of the project. Keep the description short.\n\nPROJECT_BRIEF          =\n\n# With the PROJECT_LOGO tag one can specify a logo or an icon that is included\n# in the documentation. The maximum height of the logo should not exceed 55\n# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy\n# the logo to the output directory.\n\nPROJECT_LOGO           =\n\n# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path\n# into which the generated documentation will be written. If a relative path is\n# entered, it will be relative to the location where doxygen was started. If\n# left blank the current directory will be used.\n\nOUTPUT_DIRECTORY       =\n\n# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-\n# directories (in 2 levels) under the output directory of each output format and\n# will distribute the generated files over these directories. Enabling this\n# option can be useful when feeding doxygen a huge amount of source files, where\n# putting all generated files in the same directory would otherwise causes\n# performance problems for the file system.\n# The default value is: NO.\n\nCREATE_SUBDIRS         = NO\n\n# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII\n# characters to appear in the names of generated files. If set to NO, non-ASCII\n# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode\n# U+3044.\n# The default value is: NO.\n\nALLOW_UNICODE_NAMES    = NO\n\n# The OUTPUT_LANGUAGE tag is used to specify the language in which all\n# documentation generated by doxygen is written. Doxygen will use this\n# information to generate all constant output in the proper language.\n# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,\n# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),\n# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,\n# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),\n# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,\n# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,\n# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,\n# Ukrainian and Vietnamese.\n# The default value is: English.\n\nOUTPUT_LANGUAGE        = English\n\n# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member\n# descriptions after the members that are listed in the file and class\n# documentation (similar to Javadoc). Set to NO to disable this.\n# The default value is: YES.\n\nBRIEF_MEMBER_DESC      = YES\n\n# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief\n# description of a member or function before the detailed description\n#\n# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the\n# brief descriptions will be completely suppressed.\n# The default value is: YES.\n\nREPEAT_BRIEF           = YES\n\n# This tag implements a quasi-intelligent brief description abbreviator that is\n# used to form the text in various listings. Each string in this list, if found\n# as the leading text of the brief description, will be stripped from the text\n# and the result, after processing the whole list, is used as the annotated\n# text. Otherwise, the brief description is used as-is. If left blank, the\n# following values are used ($name is automatically replaced with the name of\n# the entity):The $name class, The $name widget, The $name file, is, provides,\n# specifies, contains, represents, a, an and the.\n\nABBREVIATE_BRIEF       = \"The $name class\" \\\n                         \"The $name widget\" \\\n                         \"The $name file\" \\\n                         is \\\n                         provides \\\n                         specifies \\\n                         contains \\\n                         represents \\\n                         a \\\n                         an \\\n                         the\n\n# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then\n# doxygen will generate a detailed section even if there is only a brief\n# description.\n# The default value is: NO.\n\nALWAYS_DETAILED_SEC    = NO\n\n# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all\n# inherited members of a class in the documentation of that class as if those\n# members were ordinary class members. Constructors, destructors and assignment\n# operators of the base classes will not be shown.\n# The default value is: NO.\n\nINLINE_INHERITED_MEMB  = NO\n\n# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path\n# before files name in the file list and in the header files. If set to NO the\n# shortest path that makes the file name unique will be used\n# The default value is: YES.\n\nFULL_PATH_NAMES        = YES\n\n# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.\n# Stripping is only done if one of the specified strings matches the left-hand\n# part of the path. The tag can be used to show relative paths in the file list.\n# If left blank the directory from which doxygen is run is used as the path to\n# strip.\n#\n# Note that you can specify absolute paths here, but also relative paths, which\n# will be relative from the directory where doxygen is started.\n# This tag requires that the tag FULL_PATH_NAMES is set to YES.\n\nSTRIP_FROM_PATH        =\n\n# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the\n# path mentioned in the documentation of a class, which tells the reader which\n# header file to include in order to use a class. If left blank only the name of\n# the header file containing the class definition is used. Otherwise one should\n# specify the list of include paths that are normally passed to the compiler\n# using the -I flag.\n\nSTRIP_FROM_INC_PATH    =\n\n# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but\n# less readable) file names. This can be useful is your file systems doesn't\n# support long names like on DOS, Mac, or CD-ROM.\n# The default value is: NO.\n\nSHORT_NAMES            = NO\n\n# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the\n# first line (until the first dot) of a Javadoc-style comment as the brief\n# description. If set to NO, the Javadoc-style will behave just like regular Qt-\n# style comments (thus requiring an explicit @brief command for a brief\n# description.)\n# The default value is: NO.\n\nJAVADOC_AUTOBRIEF      = NO\n\n# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first\n# line (until the first dot) of a Qt-style comment as the brief description. If\n# set to NO, the Qt-style will behave just like regular Qt-style comments (thus\n# requiring an explicit \\brief command for a brief description.)\n# The default value is: NO.\n\nQT_AUTOBRIEF           = NO\n\n# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a\n# multi-line C++ special comment block (i.e. a block of //! or /// comments) as\n# a brief description. This used to be the default behavior. The new default is\n# to treat a multi-line C++ comment block as a detailed description. Set this\n# tag to YES if you prefer the old behavior instead.\n#\n# Note that setting this tag to YES also means that rational rose comments are\n# not recognized any more.\n# The default value is: NO.\n\nMULTILINE_CPP_IS_BRIEF = NO\n\n# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the\n# documentation from any documented member that it re-implements.\n# The default value is: YES.\n\nINHERIT_DOCS           = YES\n\n# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new\n# page for each member. If set to NO, the documentation of a member will be part\n# of the file/class/namespace that contains it.\n# The default value is: NO.\n\nSEPARATE_MEMBER_PAGES  = NO\n\n# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen\n# uses this value to replace tabs by spaces in code fragments.\n# Minimum value: 1, maximum value: 16, default value: 4.\n\nTAB_SIZE               = 4\n\n# This tag can be used to specify a number of aliases that act as commands in\n# the documentation. An alias has the form:\n# name=value\n# For example adding\n# \"sideeffect=@par Side Effects:\\n\"\n# will allow you to put the command \\sideeffect (or @sideeffect) in the\n# documentation, which will result in a user-defined paragraph with heading\n# \"Side Effects:\". You can put \\n's in the value part of an alias to insert\n# newlines.\n\nALIASES                =\n\n# This tag can be used to specify a number of word-keyword mappings (TCL only).\n# A mapping has the form \"name=value\". For example adding \"class=itcl::class\"\n# will allow you to use the command class in the itcl::class meaning.\n\nTCL_SUBST              =\n\n# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources\n# only. Doxygen will then generate output that is more tailored for C. For\n# instance, some of the names that are used will be different. The list of all\n# members will be omitted, etc.\n# The default value is: NO.\n\nOPTIMIZE_OUTPUT_FOR_C  = NO\n\n# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or\n# Python sources only. Doxygen will then generate output that is more tailored\n# for that language. For instance, namespaces will be presented as packages,\n# qualified scopes will look different, etc.\n# The default value is: NO.\n\nOPTIMIZE_OUTPUT_JAVA   = NO\n\n# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran\n# sources. Doxygen will then generate output that is tailored for Fortran.\n# The default value is: NO.\n\nOPTIMIZE_FOR_FORTRAN   = NO\n\n# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL\n# sources. Doxygen will then generate output that is tailored for VHDL.\n# The default value is: NO.\n\nOPTIMIZE_OUTPUT_VHDL   = NO\n\n# Doxygen selects the parser to use depending on the extension of the files it\n# parses. With this tag you can assign which parser to use for a given\n# extension. Doxygen has a built-in mapping, but you can override or extend it\n# using this tag. The format is ext=language, where ext is a file extension, and\n# language is one of the parsers supported by doxygen: IDL, Java, Javascript,\n# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:\n# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:\n# Fortran. In the later case the parser tries to guess whether the code is fixed\n# or free formatted code, this is the default for Fortran type files), VHDL. For\n# instance to make doxygen treat .inc files as Fortran files (default is PHP),\n# and .f files as C (default is Fortran), use: inc=Fortran f=C.\n#\n# Note: For files without extension you can use no_extension as a placeholder.\n#\n# Note that for custom extensions you also need to set FILE_PATTERNS otherwise\n# the files are not read by doxygen.\n\nEXTENSION_MAPPING      =\n\n# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments\n# according to the Markdown format, which allows for more readable\n# documentation. See http://daringfireball.net/projects/markdown/ for details.\n# The output of markdown processing is further processed by doxygen, so you can\n# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in\n# case of backward compatibilities issues.\n# The default value is: YES.\n\nMARKDOWN_SUPPORT       = YES\n\n# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up\n# to that level are automatically included in the table of contents, even if\n# they do not have an id attribute.\n# Note: This feature currently applies only to Markdown headings.\n# Minimum value: 0, maximum value: 99, default value: 0.\n# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.\n\nTOC_INCLUDE_HEADINGS   = 0\n\n# When enabled doxygen tries to link words that correspond to documented\n# classes, or namespaces to their corresponding documentation. Such a link can\n# be prevented in individual cases by putting a % sign in front of the word or\n# globally by setting AUTOLINK_SUPPORT to NO.\n# The default value is: YES.\n\nAUTOLINK_SUPPORT       = YES\n\n# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want\n# to include (a tag file for) the STL sources as input, then you should set this\n# tag to YES in order to let doxygen match functions declarations and\n# definitions whose arguments contain STL classes (e.g. func(std::string);\n# versus func(std::string) {}). This also make the inheritance and collaboration\n# diagrams that involve STL classes more complete and accurate.\n# The default value is: NO.\n\nBUILTIN_STL_SUPPORT    = NO\n\n# If you use Microsoft's C++/CLI language, you should set this option to YES to\n# enable parsing support.\n# The default value is: NO.\n\nCPP_CLI_SUPPORT        = NO\n\n# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:\n# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen\n# will parse them like normal C++ but will assume all classes use public instead\n# of private inheritance when no explicit protection keyword is present.\n# The default value is: NO.\n\nSIP_SUPPORT            = NO\n\n# For Microsoft's IDL there are propget and propput attributes to indicate\n# getter and setter methods for a property. Setting this option to YES will make\n# doxygen to replace the get and set methods by a property in the documentation.\n# This will only work if the methods are indeed getting or setting a simple\n# type. If this is not the case, or you want to show the methods anyway, you\n# should set this option to NO.\n# The default value is: YES.\n\nIDL_PROPERTY_SUPPORT   = YES\n\n# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC\n# tag is set to YES then doxygen will reuse the documentation of the first\n# member in the group (if any) for the other members of the group. By default\n# all members of a group must be documented explicitly.\n# The default value is: NO.\n\nDISTRIBUTE_GROUP_DOC   = NO\n\n# If one adds a struct or class to a group and this option is enabled, then also\n# any nested class or struct is added to the same group. By default this option\n# is disabled and one has to add nested compounds explicitly via \\ingroup.\n# The default value is: NO.\n\nGROUP_NESTED_COMPOUNDS = NO\n\n# Set the SUBGROUPING tag to YES to allow class member groups of the same type\n# (for instance a group of public functions) to be put as a subgroup of that\n# type (e.g. under the Public Functions section). Set it to NO to prevent\n# subgrouping. Alternatively, this can be done per class using the\n# \\nosubgrouping command.\n# The default value is: YES.\n\nSUBGROUPING            = YES\n\n# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions\n# are shown inside the group in which they are included (e.g. using \\ingroup)\n# instead of on a separate page (for HTML and Man pages) or section (for LaTeX\n# and RTF).\n#\n# Note that this feature does not work in combination with\n# SEPARATE_MEMBER_PAGES.\n# The default value is: NO.\n\nINLINE_GROUPED_CLASSES = NO\n\n# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions\n# with only public data fields or simple typedef fields will be shown inline in\n# the documentation of the scope in which they are defined (i.e. file,\n# namespace, or group documentation), provided this scope is documented. If set\n# to NO, structs, classes, and unions are shown on a separate page (for HTML and\n# Man pages) or section (for LaTeX and RTF).\n# The default value is: NO.\n\nINLINE_SIMPLE_STRUCTS  = NO\n\n# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or\n# enum is documented as struct, union, or enum with the name of the typedef. So\n# typedef struct TypeS {} TypeT, will appear in the documentation as a struct\n# with name TypeT. When disabled the typedef will appear as a member of a file,\n# namespace, or class. And the struct will be named TypeS. This can typically be\n# useful for C code in case the coding convention dictates that all compound\n# types are typedef'ed and only the typedef is referenced, never the tag name.\n# The default value is: NO.\n\nTYPEDEF_HIDES_STRUCT   = NO\n\n# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This\n# cache is used to resolve symbols given their name and scope. Since this can be\n# an expensive process and often the same symbol appears multiple times in the\n# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small\n# doxygen will become slower. If the cache is too large, memory is wasted. The\n# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range\n# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536\n# symbols. At the end of a run doxygen will report the cache usage and suggest\n# the optimal cache size from a speed point of view.\n# Minimum value: 0, maximum value: 9, default value: 0.\n\nLOOKUP_CACHE_SIZE      = 0\n\n#---------------------------------------------------------------------------\n# Build related configuration options\n#---------------------------------------------------------------------------\n\n# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in\n# documentation are documented, even if no documentation was available. Private\n# class members and static file members will be hidden unless the\n# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.\n# Note: This will also disable the warnings about undocumented members that are\n# normally produced when WARNINGS is set to YES.\n# The default value is: NO.\n\nEXTRACT_ALL            = NO\n\n# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will\n# be included in the documentation.\n# The default value is: NO.\n\nEXTRACT_PRIVATE        = NO\n\n# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal\n# scope will be included in the documentation.\n# The default value is: NO.\n\nEXTRACT_PACKAGE        = NO\n\n# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be\n# included in the documentation.\n# The default value is: NO.\n\nEXTRACT_STATIC         = NO\n\n# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined\n# locally in source files will be included in the documentation. If set to NO,\n# only classes defined in header files are included. Does not have any effect\n# for Java sources.\n# The default value is: YES.\n\nEXTRACT_LOCAL_CLASSES  = YES\n\n# This flag is only useful for Objective-C code. If set to YES, local methods,\n# which are defined in the implementation section but not in the interface are\n# included in the documentation. If set to NO, only methods in the interface are\n# included.\n# The default value is: NO.\n\nEXTRACT_LOCAL_METHODS  = NO\n\n# If this flag is set to YES, the members of anonymous namespaces will be\n# extracted and appear in the documentation as a namespace called\n# 'anonymous_namespace{file}', where file will be replaced with the base name of\n# the file that contains the anonymous namespace. By default anonymous namespace\n# are hidden.\n# The default value is: NO.\n\nEXTRACT_ANON_NSPACES   = NO\n\n# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all\n# undocumented members inside documented classes or files. If set to NO these\n# members will be included in the various overviews, but no documentation\n# section is generated. This option has no effect if EXTRACT_ALL is enabled.\n# The default value is: NO.\n\nHIDE_UNDOC_MEMBERS     = NO\n\n# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all\n# undocumented classes that are normally visible in the class hierarchy. If set\n# to NO, these classes will be included in the various overviews. This option\n# has no effect if EXTRACT_ALL is enabled.\n# The default value is: NO.\n\nHIDE_UNDOC_CLASSES     = NO\n\n# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend\n# (class|struct|union) declarations. If set to NO, these declarations will be\n# included in the documentation.\n# The default value is: NO.\n\nHIDE_FRIEND_COMPOUNDS  = NO\n\n# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any\n# documentation blocks found inside the body of a function. If set to NO, these\n# blocks will be appended to the function's detailed documentation block.\n# The default value is: NO.\n\nHIDE_IN_BODY_DOCS      = NO\n\n# The INTERNAL_DOCS tag determines if documentation that is typed after a\n# \\internal command is included. If the tag is set to NO then the documentation\n# will be excluded. Set it to YES to include the internal documentation.\n# The default value is: NO.\n\nINTERNAL_DOCS          = NO\n\n# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file\n# names in lower-case letters. If set to YES, upper-case letters are also\n# allowed. This is useful if you have classes or files whose names only differ\n# in case and if your file system supports case sensitive file names. Windows\n# and Mac users are advised to set this option to NO.\n# The default value is: system dependent.\n\nCASE_SENSE_NAMES       = YES\n\n# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with\n# their full class and namespace scopes in the documentation. If set to YES, the\n# scope will be hidden.\n# The default value is: NO.\n\nHIDE_SCOPE_NAMES       = NO\n\n# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will\n# append additional text to a page's title, such as Class Reference. If set to\n# YES the compound reference will be hidden.\n# The default value is: NO.\n\nHIDE_COMPOUND_REFERENCE= NO\n\n# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of\n# the files that are included by a file in the documentation of that file.\n# The default value is: YES.\n\nSHOW_INCLUDE_FILES     = YES\n\n# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each\n# grouped member an include statement to the documentation, telling the reader\n# which file to include in order to use the member.\n# The default value is: NO.\n\nSHOW_GROUPED_MEMB_INC  = NO\n\n# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include\n# files with double quotes in the documentation rather than with sharp brackets.\n# The default value is: NO.\n\nFORCE_LOCAL_INCLUDES   = NO\n\n# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the\n# documentation for inline members.\n# The default value is: YES.\n\nINLINE_INFO            = YES\n\n# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the\n# (detailed) documentation of file and class members alphabetically by member\n# name. If set to NO, the members will appear in declaration order.\n# The default value is: YES.\n\nSORT_MEMBER_DOCS       = YES\n\n# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief\n# descriptions of file, namespace and class members alphabetically by member\n# name. If set to NO, the members will appear in declaration order. Note that\n# this will also influence the order of the classes in the class list.\n# The default value is: NO.\n\nSORT_BRIEF_DOCS        = NO\n\n# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the\n# (brief and detailed) documentation of class members so that constructors and\n# destructors are listed first. If set to NO the constructors will appear in the\n# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.\n# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief\n# member documentation.\n# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting\n# detailed member documentation.\n# The default value is: NO.\n\nSORT_MEMBERS_CTORS_1ST = NO\n\n# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy\n# of group names into alphabetical order. If set to NO the group names will\n# appear in their defined order.\n# The default value is: NO.\n\nSORT_GROUP_NAMES       = NO\n\n# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by\n# fully-qualified names, including namespaces. If set to NO, the class list will\n# be sorted only by class name, not including the namespace part.\n# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.\n# Note: This option applies only to the class list, not to the alphabetical\n# list.\n# The default value is: NO.\n\nSORT_BY_SCOPE_NAME     = NO\n\n# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper\n# type resolution of all parameters of a function it will reject a match between\n# the prototype and the implementation of a member function even if there is\n# only one candidate or it is obvious which candidate to choose by doing a\n# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still\n# accept a match between prototype and implementation in such cases.\n# The default value is: NO.\n\nSTRICT_PROTO_MATCHING  = NO\n\n# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo\n# list. This list is created by putting \\todo commands in the documentation.\n# The default value is: YES.\n\nGENERATE_TODOLIST      = YES\n\n# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test\n# list. This list is created by putting \\test commands in the documentation.\n# The default value is: YES.\n\nGENERATE_TESTLIST      = YES\n\n# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug\n# list. This list is created by putting \\bug commands in the documentation.\n# The default value is: YES.\n\nGENERATE_BUGLIST       = YES\n\n# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)\n# the deprecated list. This list is created by putting \\deprecated commands in\n# the documentation.\n# The default value is: YES.\n\nGENERATE_DEPRECATEDLIST= YES\n\n# The ENABLED_SECTIONS tag can be used to enable conditional documentation\n# sections, marked by \\if <section_label> ... \\endif and \\cond <section_label>\n# ... \\endcond blocks.\n\nENABLED_SECTIONS       =\n\n# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the\n# initial value of a variable or macro / define can have for it to appear in the\n# documentation. If the initializer consists of more lines than specified here\n# it will be hidden. Use a value of 0 to hide initializers completely. The\n# appearance of the value of individual variables and macros / defines can be\n# controlled using \\showinitializer or \\hideinitializer command in the\n# documentation regardless of this setting.\n# Minimum value: 0, maximum value: 10000, default value: 30.\n\nMAX_INITIALIZER_LINES  = 30\n\n# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at\n# the bottom of the documentation of classes and structs. If set to YES, the\n# list will mention the files that were used to generate the documentation.\n# The default value is: YES.\n\nSHOW_USED_FILES        = YES\n\n# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This\n# will remove the Files entry from the Quick Index and from the Folder Tree View\n# (if specified).\n# The default value is: YES.\n\nSHOW_FILES             = YES\n\n# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces\n# page. This will remove the Namespaces entry from the Quick Index and from the\n# Folder Tree View (if specified).\n# The default value is: YES.\n\nSHOW_NAMESPACES        = NO\n\n# The FILE_VERSION_FILTER tag can be used to specify a program or script that\n# doxygen should invoke to get the current version for each file (typically from\n# the version control system). Doxygen will invoke the program by executing (via\n# popen()) the command command input-file, where command is the value of the\n# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided\n# by doxygen. Whatever the program writes to standard output is used as the file\n# version. For an example see the documentation.\n\nFILE_VERSION_FILTER    =\n\n# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed\n# by doxygen. The layout file controls the global structure of the generated\n# output files in an output format independent way. To create the layout file\n# that represents doxygen's defaults, run doxygen with the -l option. You can\n# optionally specify a file name after the option, if omitted DoxygenLayout.xml\n# will be used as the name of the layout file.\n#\n# Note that if you run doxygen from a directory containing a file called\n# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE\n# tag is left empty.\n\nLAYOUT_FILE            = @CMAKE_CURRENT_SOURCE_DIR@/doc/DoxygenLayout.xml\n\n# The CITE_BIB_FILES tag can be used to specify one or more bib files containing\n# the reference definitions. This must be a list of .bib files. The .bib\n# extension is automatically appended if omitted. This requires the bibtex tool\n# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.\n# For LaTeX the style of the bibliography can be controlled using\n# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the\n# search path. See also \\cite for info how to create references.\n\nCITE_BIB_FILES         =\n\n#---------------------------------------------------------------------------\n# Configuration options related to warning and progress messages\n#---------------------------------------------------------------------------\n\n# The QUIET tag can be used to turn on/off the messages that are generated to\n# standard output by doxygen. If QUIET is set to YES this implies that the\n# messages are off.\n# The default value is: NO.\n\nQUIET                  = NO\n\n# The WARNINGS tag can be used to turn on/off the warning messages that are\n# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES\n# this implies that the warnings are on.\n#\n# Tip: Turn warnings on while writing the documentation.\n# The default value is: YES.\n\nWARNINGS               = YES\n\n# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate\n# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag\n# will automatically be disabled.\n# The default value is: YES.\n\nWARN_IF_UNDOCUMENTED   = YES\n\n# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for\n# potential errors in the documentation, such as not documenting some parameters\n# in a documented function, or documenting parameters that don't exist or using\n# markup commands wrongly.\n# The default value is: YES.\n\nWARN_IF_DOC_ERROR      = YES\n\n# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that\n# are documented, but have no documentation for their parameters or return\n# value. If set to NO, doxygen will only warn about wrong or incomplete\n# parameter documentation, but not about the absence of documentation.\n# The default value is: NO.\n\nWARN_NO_PARAMDOC       = NO\n\n# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when\n# a warning is encountered.\n# The default value is: NO.\n\nWARN_AS_ERROR          = NO\n\n# The WARN_FORMAT tag determines the format of the warning messages that doxygen\n# can produce. The string should contain the $file, $line, and $text tags, which\n# will be replaced by the file and line number from which the warning originated\n# and the warning text. Optionally the format may contain $version, which will\n# be replaced by the version of the file (if it could be obtained via\n# FILE_VERSION_FILTER)\n# The default value is: $file:$line: $text.\n\nWARN_FORMAT            = \"$file:$line: $text\"\n\n# The WARN_LOGFILE tag can be used to specify a file to which warning and error\n# messages should be written. If left blank the output is written to standard\n# error (stderr).\n\nWARN_LOGFILE           =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the input files\n#---------------------------------------------------------------------------\n\n# The INPUT tag is used to specify the files and/or directories that contain\n# documented source files. You may enter file names like myfile.cpp or\n# directories like /usr/src/myproject. Separate the files or directories with\n# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING\n# Note: If this tag is empty the current directory is searched.\n\nINPUT                  = @CMAKE_CURRENT_SOURCE_DIR@/test \\\n                         @CMAKE_CURRENT_SOURCE_DIR@/doc \n\n# This tag can be used to specify the character encoding of the source files\n# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses\n# libiconv (or the iconv built into libc) for the transcoding. See the libiconv\n# documentation (see: http://www.gnu.org/software/libiconv) for the list of\n# possible encodings.\n# The default value is: UTF-8.\n\nINPUT_ENCODING         = UTF-8\n\n# If the value of the INPUT tag contains directories, you can use the\n# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and\n# *.h) to filter out the source-files in the directories.\n#\n# Note that for custom extensions or not directly supported extensions you also\n# need to set EXTENSION_MAPPING for the extension otherwise the files are not\n# read by doxygen.\n#\n# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,\n# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,\n# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,\n# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,\n# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf.\n\nFILE_PATTERNS          = *.c \\\n                         *.cc \\\n                         *.cxx \\\n                         *.cpp \\\n                         *.c++ \\\n                         *.java \\\n                         *.ii \\\n                         *.ixx \\\n                         *.ipp \\\n                         *.i++ \\\n                         *.inl \\\n                         *.idl \\\n                         *.ddl \\\n                         *.odl \\\n                         *.h \\\n                         *.hh \\\n                         *.hxx \\\n                         *.hpp \\\n                         *.h++ \\\n                         *.cs \\\n                         *.d \\\n                         *.php \\\n                         *.php4 \\\n                         *.php5 \\\n                         *.phtml \\\n                         *.inc \\\n                         *.m \\\n                         *.markdown \\\n                         *.md \\\n                         *.mm \\\n                         *.dox \\\n                         *.py \\\n                         *.pyw \\\n                         *.f90 \\\n                         *.f95 \\\n                         *.f03 \\\n                         *.f08 \\\n                         *.f \\\n                         *.for \\\n                         *.tcl \\\n                         *.vhd \\\n                         *.vhdl \\\n                         *.ucf \\\n                         *.qsf\n\n# The RECURSIVE tag can be used to specify whether or not subdirectories should\n# be searched for input files as well.\n# The default value is: NO.\n\nRECURSIVE              = YES\n\n# The EXCLUDE tag can be used to specify files and/or directories that should be\n# excluded from the INPUT source files. This way you can easily exclude a\n# subdirectory from a directory tree whose root is specified with the INPUT tag.\n#\n# Note that relative paths are relative to the directory from which doxygen is\n# run.\n\nEXCLUDE                =\n\n# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or\n# directories that are symbolic links (a Unix file system feature) are excluded\n# from the input.\n# The default value is: NO.\n\nEXCLUDE_SYMLINKS       = NO\n\n# If the value of the INPUT tag contains directories, you can use the\n# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude\n# certain files from those directories.\n#\n# Note that the wildcards are matched against the file with absolute path, so to\n# exclude all test directories for example use the pattern */test/*\n\nEXCLUDE_PATTERNS       = */common/*\n\n# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names\n# (namespaces, classes, functions, etc.) that should be excluded from the\n# output. The symbol name can be a fully qualified name, a word, or if the\n# wildcard * is used, a substring. Examples: ANamespace, AClass,\n# AClass::ANamespace, ANamespace::*Test\n#\n# Note that the wildcards are matched against the file with absolute path, so to\n# exclude all test directories use the pattern */test/*\n\nEXCLUDE_SYMBOLS        =\n\n# The EXAMPLE_PATH tag can be used to specify one or more files or directories\n# that contain example code fragments that are included (see the \\include\n# command).\n\nEXAMPLE_PATH           =\n\n# If the value of the EXAMPLE_PATH tag contains directories, you can use the\n# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and\n# *.h) to filter out the source-files in the directories. If left blank all\n# files are included.\n\nEXAMPLE_PATTERNS       = *\n\n# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be\n# searched for input files to be used with the \\include or \\dontinclude commands\n# irrespective of the value of the RECURSIVE tag.\n# The default value is: NO.\n\nEXAMPLE_RECURSIVE      = NO\n\n# The IMAGE_PATH tag can be used to specify one or more files or directories\n# that contain images that are to be included in the documentation (see the\n# \\image command).\n\nIMAGE_PATH             =\n\n# The INPUT_FILTER tag can be used to specify a program that doxygen should\n# invoke to filter for each input file. Doxygen will invoke the filter program\n# by executing (via popen()) the command:\n#\n# <filter> <input-file>\n#\n# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the\n# name of an input file. Doxygen will then use the output that the filter\n# program writes to standard output. If FILTER_PATTERNS is specified, this tag\n# will be ignored.\n#\n# Note that the filter must not add or remove lines; it is applied before the\n# code is scanned, but not when the output code is generated. If lines are added\n# or removed, the anchors will not be placed correctly.\n#\n# Note that for custom extensions or not directly supported extensions you also\n# need to set EXTENSION_MAPPING for the extension otherwise the files are not\n# properly processed by doxygen.\n\nINPUT_FILTER           =\n\n# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern\n# basis. Doxygen will compare the file name with each pattern and apply the\n# filter if there is a match. The filters are a list of the form: pattern=filter\n# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how\n# filters are used. If the FILTER_PATTERNS tag is empty or if none of the\n# patterns match the file name, INPUT_FILTER is applied.\n#\n# Note that for custom extensions or not directly supported extensions you also\n# need to set EXTENSION_MAPPING for the extension otherwise the files are not\n# properly processed by doxygen.\n\nFILTER_PATTERNS        =\n\n# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using\n# INPUT_FILTER) will also be used to filter the input files that are used for\n# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).\n# The default value is: NO.\n\nFILTER_SOURCE_FILES    = NO\n\n# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file\n# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and\n# it is also possible to disable source filtering for a specific pattern using\n# *.ext= (so without naming a filter).\n# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.\n\nFILTER_SOURCE_PATTERNS =\n\n# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that\n# is part of the input, its contents will be placed on the main page\n# (index.html). This can be useful if you have a project on for instance GitHub\n# and want to reuse the introduction page also for the doxygen output.\n\nUSE_MDFILE_AS_MAINPAGE =\n\n#---------------------------------------------------------------------------\n# Configuration options related to source browsing\n#---------------------------------------------------------------------------\n\n# If the SOURCE_BROWSER tag is set to YES then a list of source files will be\n# generated. Documented entities will be cross-referenced with these sources.\n#\n# Note: To get rid of all source code in the generated output, make sure that\n# also VERBATIM_HEADERS is set to NO.\n# The default value is: NO.\n\nSOURCE_BROWSER         = YES\n\n# Setting the INLINE_SOURCES tag to YES will include the body of functions,\n# classes and enums directly into the documentation.\n# The default value is: NO.\n\nINLINE_SOURCES         = NO\n\n# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any\n# special comment blocks from generated source code fragments. Normal C, C++ and\n# Fortran comments will always remain visible.\n# The default value is: YES.\n\nSTRIP_CODE_COMMENTS    = NO\n\n# If the REFERENCED_BY_RELATION tag is set to YES then for each documented\n# function all documented functions referencing it will be listed.\n# The default value is: NO.\n\nREFERENCED_BY_RELATION = NO\n\n# If the REFERENCES_RELATION tag is set to YES then for each documented function\n# all documented entities called/used by that function will be listed.\n# The default value is: NO.\n\nREFERENCES_RELATION    = NO\n\n# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set\n# to YES then the hyperlinks from functions in REFERENCES_RELATION and\n# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will\n# link to the documentation.\n# The default value is: YES.\n\nREFERENCES_LINK_SOURCE = YES\n\n# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the\n# source code will show a tooltip with additional information such as prototype,\n# brief description and links to the definition and documentation. Since this\n# will make the HTML file larger and loading of large files a bit slower, you\n# can opt to disable this feature.\n# The default value is: YES.\n# This tag requires that the tag SOURCE_BROWSER is set to YES.\n\nSOURCE_TOOLTIPS        = YES\n\n# If the USE_HTAGS tag is set to YES then the references to source code will\n# point to the HTML generated by the htags(1) tool instead of doxygen built-in\n# source browser. The htags tool is part of GNU's global source tagging system\n# (see http://www.gnu.org/software/global/global.html). You will need version\n# 4.8.6 or higher.\n#\n# To use it do the following:\n# - Install the latest version of global\n# - Enable SOURCE_BROWSER and USE_HTAGS in the config file\n# - Make sure the INPUT points to the root of the source tree\n# - Run doxygen as normal\n#\n# Doxygen will invoke htags (and that will in turn invoke gtags), so these\n# tools must be available from the command line (i.e. in the search path).\n#\n# The result: instead of the source browser generated by doxygen, the links to\n# source code will now point to the output of htags.\n# The default value is: NO.\n# This tag requires that the tag SOURCE_BROWSER is set to YES.\n\nUSE_HTAGS              = NO\n\n# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a\n# verbatim copy of the header file for each class for which an include is\n# specified. Set to NO to disable this.\n# See also: Section \\class.\n# The default value is: YES.\n\nVERBATIM_HEADERS       = YES\n\n# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the\n# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the\n# cost of reduced performance. This can be particularly helpful with template\n# rich C++ code for which doxygen's built-in parser lacks the necessary type\n# information.\n# Note: The availability of this option depends on whether or not doxygen was\n# generated with the -Duse-libclang=ON option for CMake.\n# The default value is: NO.\n\nCLANG_ASSISTED_PARSING = NO\n\n# If clang assisted parsing is enabled you can provide the compiler with command\n# line options that you would normally use when invoking the compiler. Note that\n# the include paths will already be set by doxygen for the files and directories\n# specified with INPUT and INCLUDE_PATH.\n# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.\n\nCLANG_OPTIONS          =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the alphabetical class index\n#---------------------------------------------------------------------------\n\n# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all\n# compounds will be generated. Enable this if the project contains a lot of\n# classes, structs, unions or interfaces.\n# The default value is: YES.\n\nALPHABETICAL_INDEX     = YES\n\n# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in\n# which the alphabetical index list will be split.\n# Minimum value: 1, maximum value: 20, default value: 5.\n# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.\n\nCOLS_IN_ALPHA_INDEX    = 5\n\n# In case all classes in a project start with a common prefix, all classes will\n# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag\n# can be used to specify a prefix (or a list of prefixes) that should be ignored\n# while generating the index headers.\n# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.\n\nIGNORE_PREFIX          =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the HTML output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output\n# The default value is: YES.\n\nGENERATE_HTML          = YES\n\n# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it.\n# The default directory is: html.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_OUTPUT            = test_spec\n\n# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each\n# generated HTML page (for example: .htm, .php, .asp).\n# The default value is: .html.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_FILE_EXTENSION    = .html\n\n# The HTML_HEADER tag can be used to specify a user-defined HTML header file for\n# each generated HTML page. If the tag is left blank doxygen will generate a\n# standard header.\n#\n# To get valid HTML the header file that includes any scripts and style sheets\n# that doxygen needs, which is dependent on the configuration options used (e.g.\n# the setting GENERATE_TREEVIEW). It is highly recommended to start with a\n# default header using\n# doxygen -w html new_header.html new_footer.html new_stylesheet.css\n# YourConfigFile\n# and then modify the file new_header.html. See also section \"Doxygen usage\"\n# for information on how to generate the default header that doxygen normally\n# uses.\n# Note: The header is subject to change so you typically have to regenerate the\n# default header when upgrading to a newer version of doxygen. For a description\n# of the possible markers and block names see the documentation.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_HEADER            =\n\n# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each\n# generated HTML page. If the tag is left blank doxygen will generate a standard\n# footer. See HTML_HEADER for more information on how to generate a default\n# footer and what special commands can be used inside the footer. See also\n# section \"Doxygen usage\" for information on how to generate the default footer\n# that doxygen normally uses.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_FOOTER            =\n\n# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style\n# sheet that is used by each HTML page. It can be used to fine-tune the look of\n# the HTML output. If left blank doxygen will generate a default style sheet.\n# See also section \"Doxygen usage\" for information on how to generate the style\n# sheet that doxygen normally uses.\n# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as\n# it is more robust and this tag (HTML_STYLESHEET) will in the future become\n# obsolete.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_STYLESHEET        =\n\n# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined\n# cascading style sheets that are included after the standard style sheets\n# created by doxygen. Using this option one can overrule certain style aspects.\n# This is preferred over using HTML_STYLESHEET since it does not replace the\n# standard style sheet and is therefore more robust against future updates.\n# Doxygen will copy the style sheet files to the output directory.\n# Note: The order of the extra style sheet files is of importance (e.g. the last\n# style sheet in the list overrules the setting of the previous ones in the\n# list). For an example see the documentation.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_EXTRA_STYLESHEET  =\n\n# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or\n# other source files which should be copied to the HTML output directory. Note\n# that these files will be copied to the base HTML output directory. Use the\n# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these\n# files. In the HTML_STYLESHEET file, use the file name only. Also note that the\n# files will be copied as-is; there are no commands or markers available.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_EXTRA_FILES       =\n\n# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen\n# will adjust the colors in the style sheet and background images according to\n# this color. Hue is specified as an angle on a colorwheel, see\n# http://en.wikipedia.org/wiki/Hue for more information. For instance the value\n# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300\n# purple, and 360 is red again.\n# Minimum value: 0, maximum value: 359, default value: 220.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_COLORSTYLE_HUE    = 220\n\n# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors\n# in the HTML output. For a value of 0 the output will use grayscales only. A\n# value of 255 will produce the most vivid colors.\n# Minimum value: 0, maximum value: 255, default value: 100.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_COLORSTYLE_SAT    = 100\n\n# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the\n# luminance component of the colors in the HTML output. Values below 100\n# gradually make the output lighter, whereas values above 100 make the output\n# darker. The value divided by 100 is the actual gamma applied, so 80 represents\n# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not\n# change the gamma.\n# Minimum value: 40, maximum value: 240, default value: 80.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_COLORSTYLE_GAMMA  = 80\n\n# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML\n# page will contain the date and time when the page was generated. Setting this\n# to YES can help to show when doxygen was last run and thus if the\n# documentation is up to date.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_TIMESTAMP         = NO\n\n# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML\n# documentation will contain sections that can be hidden and shown after the\n# page has loaded.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_DYNAMIC_SECTIONS  = NO\n\n# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries\n# shown in the various tree structured indices initially; the user can expand\n# and collapse entries dynamically later on. Doxygen will expand the tree to\n# such a level that at most the specified number of entries are visible (unless\n# a fully collapsed tree already exceeds this amount). So setting the number of\n# entries 1 will produce a full collapsed tree by default. 0 is a special value\n# representing an infinite number of entries and will result in a full expanded\n# tree by default.\n# Minimum value: 0, maximum value: 9999, default value: 100.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_INDEX_NUM_ENTRIES = 100\n\n# If the GENERATE_DOCSET tag is set to YES, additional index files will be\n# generated that can be used as input for Apple's Xcode 3 integrated development\n# environment (see: http://developer.apple.com/tools/xcode/), introduced with\n# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a\n# Makefile in the HTML output directory. Running make will produce the docset in\n# that directory and running make install will install the docset in\n# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at\n# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html\n# for more information.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_DOCSET        = NO\n\n# This tag determines the name of the docset feed. A documentation feed provides\n# an umbrella under which multiple documentation sets from a single provider\n# (such as a company or product suite) can be grouped.\n# The default value is: Doxygen generated docs.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_FEEDNAME        = \"Doxygen generated docs\"\n\n# This tag specifies a string that should uniquely identify the documentation\n# set bundle. This should be a reverse domain-name style string, e.g.\n# com.mycompany.MyDocSet. Doxygen will append .docset to the name.\n# The default value is: org.doxygen.Project.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_BUNDLE_ID       = org.doxygen.Project\n\n# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify\n# the documentation publisher. This should be a reverse domain-name style\n# string, e.g. com.mycompany.MyDocSet.documentation.\n# The default value is: org.doxygen.Publisher.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_PUBLISHER_ID    = org.doxygen.Publisher\n\n# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.\n# The default value is: Publisher.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_PUBLISHER_NAME  = Publisher\n\n# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three\n# additional HTML index files: index.hhp, index.hhc, and index.hhk. The\n# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop\n# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on\n# Windows.\n#\n# The HTML Help Workshop contains a compiler that can convert all HTML output\n# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML\n# files are now used as the Windows 98 help format, and will replace the old\n# Windows help format (.hlp) on all Windows platforms in the future. Compressed\n# HTML files also contain an index, a table of contents, and you can search for\n# words in the documentation. The HTML workshop also contains a viewer for\n# compressed HTML files.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_HTMLHELP      = NO\n\n# The CHM_FILE tag can be used to specify the file name of the resulting .chm\n# file. You can add a path in front of the file if the result should not be\n# written to the html output directory.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nCHM_FILE               =\n\n# The HHC_LOCATION tag can be used to specify the location (absolute path\n# including file name) of the HTML help compiler (hhc.exe). If non-empty,\n# doxygen will try to run the HTML help compiler on the generated index.hhp.\n# The file has to be specified with full path.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nHHC_LOCATION           =\n\n# The GENERATE_CHI flag controls if a separate .chi index file is generated\n# (YES) or that it should be included in the master .chm file (NO).\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nGENERATE_CHI           = NO\n\n# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)\n# and project file content.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nCHM_INDEX_ENCODING     =\n\n# The BINARY_TOC flag controls whether a binary table of contents is generated\n# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it\n# enables the Previous and Next buttons.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nBINARY_TOC             = NO\n\n# The TOC_EXPAND flag can be set to YES to add extra items for group members to\n# the table of contents of the HTML help documentation and to the tree view.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nTOC_EXPAND             = NO\n\n# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and\n# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that\n# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help\n# (.qch) of the generated HTML documentation.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_QHP           = NO\n\n# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify\n# the file name of the resulting .qch file. The path specified is relative to\n# the HTML output folder.\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQCH_FILE               =\n\n# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help\n# Project output. For more information please see Qt Help Project / Namespace\n# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).\n# The default value is: org.doxygen.Project.\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_NAMESPACE          = org.doxygen.Project\n\n# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt\n# Help Project output. For more information please see Qt Help Project / Virtual\n# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-\n# folders).\n# The default value is: doc.\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_VIRTUAL_FOLDER     = doc\n\n# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom\n# filter to add. For more information please see Qt Help Project / Custom\n# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-\n# filters).\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_CUST_FILTER_NAME   =\n\n# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the\n# custom filter to add. For more information please see Qt Help Project / Custom\n# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-\n# filters).\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_CUST_FILTER_ATTRS  =\n\n# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this\n# project's filter section matches. Qt Help Project / Filter Attributes (see:\n# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_SECT_FILTER_ATTRS  =\n\n# The QHG_LOCATION tag can be used to specify the location of Qt's\n# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the\n# generated .qhp file.\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHG_LOCATION           =\n\n# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be\n# generated, together with the HTML files, they form an Eclipse help plugin. To\n# install this plugin and make it available under the help contents menu in\n# Eclipse, the contents of the directory containing the HTML and XML files needs\n# to be copied into the plugins directory of eclipse. The name of the directory\n# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.\n# After copying Eclipse needs to be restarted before the help appears.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_ECLIPSEHELP   = NO\n\n# A unique identifier for the Eclipse help plugin. When installing the plugin\n# the directory name containing the HTML and XML files should also have this\n# name. Each documentation set should have its own identifier.\n# The default value is: org.doxygen.Project.\n# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.\n\nECLIPSE_DOC_ID         = org.doxygen.Project\n\n# If you want full control over the layout of the generated HTML pages it might\n# be necessary to disable the index and replace it with your own. The\n# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top\n# of each HTML page. A value of NO enables the index and the value YES disables\n# it. Since the tabs in the index contain the same information as the navigation\n# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nDISABLE_INDEX          = NO\n\n# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index\n# structure should be generated to display hierarchical information. If the tag\n# value is set to YES, a side panel will be generated containing a tree-like\n# index structure (just like the one that is generated for HTML Help). For this\n# to work a browser that supports JavaScript, DHTML, CSS and frames is required\n# (i.e. any modern browser). Windows users are probably better off using the\n# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can\n# further fine-tune the look of the index. As an example, the default style\n# sheet generated by doxygen has an example that shows how to put an image at\n# the root of the tree instead of the PROJECT_NAME. Since the tree basically has\n# the same information as the tab index, you could consider setting\n# DISABLE_INDEX to YES when enabling this option.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_TREEVIEW      = NO\n\n# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that\n# doxygen will group on one line in the generated HTML documentation.\n#\n# Note that a value of 0 will completely suppress the enum values from appearing\n# in the overview section.\n# Minimum value: 0, maximum value: 20, default value: 4.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nENUM_VALUES_PER_LINE   = 4\n\n# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used\n# to set the initial width (in pixels) of the frame in which the tree is shown.\n# Minimum value: 0, maximum value: 1500, default value: 250.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nTREEVIEW_WIDTH         = 250\n\n# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to\n# external symbols imported via tag files in a separate window.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nEXT_LINKS_IN_WINDOW    = NO\n\n# Use this tag to change the font size of LaTeX formulas included as images in\n# the HTML documentation. When you change the font size after a successful\n# doxygen run you need to manually remove any form_*.png images from the HTML\n# output directory to force them to be regenerated.\n# Minimum value: 8, maximum value: 50, default value: 10.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nFORMULA_FONTSIZE       = 10\n\n# Use the FORMULA_TRANPARENT tag to determine whether or not the images\n# generated for formulas are transparent PNGs. Transparent PNGs are not\n# supported properly for IE 6.0, but are supported on all modern browsers.\n#\n# Note that when changing this option you need to delete any form_*.png files in\n# the HTML output directory before the changes have effect.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nFORMULA_TRANSPARENT    = YES\n\n# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see\n# http://www.mathjax.org) which uses client side Javascript for the rendering\n# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX\n# installed or if you want to formulas look prettier in the HTML output. When\n# enabled you may also need to install MathJax separately and configure the path\n# to it using the MATHJAX_RELPATH option.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nUSE_MATHJAX            = NO\n\n# When MathJax is enabled you can set the default output format to be used for\n# the MathJax output. See the MathJax site (see:\n# http://docs.mathjax.org/en/latest/output.html) for more details.\n# Possible values are: HTML-CSS (which is slower, but has the best\n# compatibility), NativeMML (i.e. MathML) and SVG.\n# The default value is: HTML-CSS.\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_FORMAT         = HTML-CSS\n\n# When MathJax is enabled you need to specify the location relative to the HTML\n# output directory using the MATHJAX_RELPATH option. The destination directory\n# should contain the MathJax.js script. For instance, if the mathjax directory\n# is located at the same level as the HTML output directory, then\n# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax\n# Content Delivery Network so you can quickly see the result without installing\n# MathJax. However, it is strongly recommended to install a local copy of\n# MathJax from http://www.mathjax.org before deployment.\n# The default value is: http://cdn.mathjax.org/mathjax/latest.\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest\n\n# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax\n# extension names that should be enabled during MathJax rendering. For example\n# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_EXTENSIONS     =\n\n# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces\n# of code that will be used on startup of the MathJax code. See the MathJax site\n# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an\n# example see the documentation.\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_CODEFILE       =\n\n# When the SEARCHENGINE tag is enabled doxygen will generate a search box for\n# the HTML output. The underlying search engine uses javascript and DHTML and\n# should work on any modern browser. Note that when using HTML help\n# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)\n# there is already a search function so this one should typically be disabled.\n# For large projects the javascript based search engine can be slow, then\n# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to\n# search using the keyboard; to jump to the search box use <access key> + S\n# (what the <access key> is depends on the OS and browser, but it is typically\n# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down\n# key> to jump into the search results window, the results can be navigated\n# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel\n# the search. The filter options can be selected when the cursor is inside the\n# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>\n# to select a filter and <Enter> or <escape> to activate or cancel the filter\n# option.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nSEARCHENGINE           = YES\n\n# When the SERVER_BASED_SEARCH tag is enabled the search engine will be\n# implemented using a web server instead of a web client using Javascript. There\n# are two flavors of web server based searching depending on the EXTERNAL_SEARCH\n# setting. When disabled, doxygen will generate a PHP script for searching and\n# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing\n# and searching needs to be provided by external tools. See the section\n# \"External Indexing and Searching\" for details.\n# The default value is: NO.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nSERVER_BASED_SEARCH    = NO\n\n# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP\n# script for searching. Instead the search results are written to an XML file\n# which needs to be processed by an external indexer. Doxygen will invoke an\n# external search engine pointed to by the SEARCHENGINE_URL option to obtain the\n# search results.\n#\n# Doxygen ships with an example indexer (doxyindexer) and search engine\n# (doxysearch.cgi) which are based on the open source search engine library\n# Xapian (see: http://xapian.org/).\n#\n# See the section \"External Indexing and Searching\" for details.\n# The default value is: NO.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nEXTERNAL_SEARCH        = NO\n\n# The SEARCHENGINE_URL should point to a search engine hosted by a web server\n# which will return the search results when EXTERNAL_SEARCH is enabled.\n#\n# Doxygen ships with an example indexer (doxyindexer) and search engine\n# (doxysearch.cgi) which are based on the open source search engine library\n# Xapian (see: http://xapian.org/). See the section \"External Indexing and\n# Searching\" for details.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nSEARCHENGINE_URL       =\n\n# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed\n# search data is written to a file for indexing by an external tool. With the\n# SEARCHDATA_FILE tag the name of this file can be specified.\n# The default file is: searchdata.xml.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nSEARCHDATA_FILE        = searchdata.xml\n\n# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the\n# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is\n# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple\n# projects and redirect the results back to the right project.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nEXTERNAL_SEARCH_ID     =\n\n# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen\n# projects other than the one defined by this configuration file, but that are\n# all added to the same external search index. Each project needs to have a\n# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of\n# to a relative location where the documentation can be found. The format is:\n# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nEXTRA_SEARCH_MAPPINGS  =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the LaTeX output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.\n# The default value is: YES.\n\nGENERATE_LATEX         = NO\n\n# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it.\n# The default directory is: latex.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_OUTPUT           = latex\n\n# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be\n# invoked.\n#\n# Note that when enabling USE_PDFLATEX this option is only used for generating\n# bitmaps for formulas in the HTML output, but not in the Makefile that is\n# written to the output directory.\n# The default file is: latex.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_CMD_NAME         = latex\n\n# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate\n# index for LaTeX.\n# The default file is: makeindex.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nMAKEINDEX_CMD_NAME     = makeindex\n\n# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX\n# documents. This may be useful for small projects and may help to save some\n# trees in general.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nCOMPACT_LATEX          = NO\n\n# The PAPER_TYPE tag can be used to set the paper type that is used by the\n# printer.\n# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x\n# 14 inches) and executive (7.25 x 10.5 inches).\n# The default value is: a4.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nPAPER_TYPE             = a4\n\n# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names\n# that should be included in the LaTeX output. The package can be specified just\n# by its name or with the correct syntax as to be used with the LaTeX\n# \\usepackage command. To get the times font for instance you can specify :\n# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}\n# To use the option intlimits with the amsmath package you can specify:\n# EXTRA_PACKAGES=[intlimits]{amsmath}\n# If left blank no extra packages will be included.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nEXTRA_PACKAGES         =\n\n# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the\n# generated LaTeX document. The header should contain everything until the first\n# chapter. If it is left blank doxygen will generate a standard header. See\n# section \"Doxygen usage\" for information on how to let doxygen write the\n# default header to a separate file.\n#\n# Note: Only use a user-defined header if you know what you are doing! The\n# following commands have a special meaning inside the header: $title,\n# $datetime, $date, $doxygenversion, $projectname, $projectnumber,\n# $projectbrief, $projectlogo. Doxygen will replace $title with the empty\n# string, for the replacement values of the other commands the user is referred\n# to HTML_HEADER.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_HEADER           =\n\n# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the\n# generated LaTeX document. The footer should contain everything after the last\n# chapter. If it is left blank doxygen will generate a standard footer. See\n# LATEX_HEADER for more information on how to generate a default footer and what\n# special commands can be used inside the footer.\n#\n# Note: Only use a user-defined footer if you know what you are doing!\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_FOOTER           =\n\n# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined\n# LaTeX style sheets that are included after the standard style sheets created\n# by doxygen. Using this option one can overrule certain style aspects. Doxygen\n# will copy the style sheet files to the output directory.\n# Note: The order of the extra style sheet files is of importance (e.g. the last\n# style sheet in the list overrules the setting of the previous ones in the\n# list).\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_EXTRA_STYLESHEET =\n\n# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or\n# other source files which should be copied to the LATEX_OUTPUT output\n# directory. Note that the files will be copied as-is; there are no commands or\n# markers available.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_EXTRA_FILES      =\n\n# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is\n# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will\n# contain links (just like the HTML output) instead of page references. This\n# makes the output suitable for online browsing using a PDF viewer.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nPDF_HYPERLINKS         = YES\n\n# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate\n# the PDF file directly from the LaTeX files. Set this option to YES, to get a\n# higher quality PDF documentation.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nUSE_PDFLATEX           = YES\n\n# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode\n# command to the generated LaTeX files. This will instruct LaTeX to keep running\n# if errors occur, instead of asking the user for help. This option is also used\n# when generating formulas in HTML.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_BATCHMODE        = NO\n\n# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the\n# index chapters (such as File Index, Compound Index, etc.) in the output.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_HIDE_INDICES     = NO\n\n# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source\n# code with syntax highlighting in the LaTeX output.\n#\n# Note that which sources are shown also depends on other settings such as\n# SOURCE_BROWSER.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_SOURCE_CODE      = NO\n\n# The LATEX_BIB_STYLE tag can be used to specify the style to use for the\n# bibliography, e.g. plainnat, or ieeetr. See\n# http://en.wikipedia.org/wiki/BibTeX and \\cite for more info.\n# The default value is: plain.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_BIB_STYLE        = plain\n\n# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated\n# page will contain the date and time when the page was generated. Setting this\n# to NO can help when comparing the output of multiple runs.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_TIMESTAMP        = NO\n\n#---------------------------------------------------------------------------\n# Configuration options related to the RTF output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The\n# RTF output is optimized for Word 97 and may not look too pretty with other RTF\n# readers/editors.\n# The default value is: NO.\n\nGENERATE_RTF           = NO\n\n# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it.\n# The default directory is: rtf.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_OUTPUT             = rtf\n\n# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF\n# documents. This may be useful for small projects and may help to save some\n# trees in general.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nCOMPACT_RTF            = NO\n\n# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will\n# contain hyperlink fields. The RTF file will contain links (just like the HTML\n# output) instead of page references. This makes the output suitable for online\n# browsing using Word or some other Word compatible readers that support those\n# fields.\n#\n# Note: WordPad (write) and others do not support links.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_HYPERLINKS         = NO\n\n# Load stylesheet definitions from file. Syntax is similar to doxygen's config\n# file, i.e. a series of assignments. You only have to provide replacements,\n# missing definitions are set to their default value.\n#\n# See also section \"Doxygen usage\" for information on how to generate the\n# default style sheet that doxygen normally uses.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_STYLESHEET_FILE    =\n\n# Set optional variables used in the generation of an RTF document. Syntax is\n# similar to doxygen's config file. A template extensions file can be generated\n# using doxygen -e rtf extensionFile.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_EXTENSIONS_FILE    =\n\n# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code\n# with syntax highlighting in the RTF output.\n#\n# Note that which sources are shown also depends on other settings such as\n# SOURCE_BROWSER.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_SOURCE_CODE        = NO\n\n#---------------------------------------------------------------------------\n# Configuration options related to the man page output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for\n# classes and files.\n# The default value is: NO.\n\nGENERATE_MAN           = NO\n\n# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it. A directory man3 will be created inside the directory specified by\n# MAN_OUTPUT.\n# The default directory is: man.\n# This tag requires that the tag GENERATE_MAN is set to YES.\n\nMAN_OUTPUT             = man\n\n# The MAN_EXTENSION tag determines the extension that is added to the generated\n# man pages. In case the manual section does not start with a number, the number\n# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is\n# optional.\n# The default value is: .3.\n# This tag requires that the tag GENERATE_MAN is set to YES.\n\nMAN_EXTENSION          = .3\n\n# The MAN_SUBDIR tag determines the name of the directory created within\n# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by\n# MAN_EXTENSION with the initial . removed.\n# This tag requires that the tag GENERATE_MAN is set to YES.\n\nMAN_SUBDIR             =\n\n# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it\n# will generate one additional man file for each entity documented in the real\n# man page(s). These additional files only source the real man page, but without\n# them the man command would be unable to find the correct page.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_MAN is set to YES.\n\nMAN_LINKS              = NO\n\n#---------------------------------------------------------------------------\n# Configuration options related to the XML output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that\n# captures the structure of the code including all documentation.\n# The default value is: NO.\n\nGENERATE_XML           = NO\n\n# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it.\n# The default directory is: xml.\n# This tag requires that the tag GENERATE_XML is set to YES.\n\nXML_OUTPUT             = xml\n\n# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program\n# listings (including syntax highlighting and cross-referencing information) to\n# the XML output. Note that enabling this will significantly increase the size\n# of the XML output.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_XML is set to YES.\n\nXML_PROGRAMLISTING     = YES\n\n#---------------------------------------------------------------------------\n# Configuration options related to the DOCBOOK output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files\n# that can be used to generate PDF.\n# The default value is: NO.\n\nGENERATE_DOCBOOK       = NO\n\n# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.\n# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in\n# front of it.\n# The default directory is: docbook.\n# This tag requires that the tag GENERATE_DOCBOOK is set to YES.\n\nDOCBOOK_OUTPUT         = docbook\n\n# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the\n# program listings (including syntax highlighting and cross-referencing\n# information) to the DOCBOOK output. Note that enabling this will significantly\n# increase the size of the DOCBOOK output.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_DOCBOOK is set to YES.\n\nDOCBOOK_PROGRAMLISTING = NO\n\n#---------------------------------------------------------------------------\n# Configuration options for the AutoGen Definitions output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an\n# AutoGen Definitions (see http://autogen.sf.net) file that captures the\n# structure of the code including all documentation. Note that this feature is\n# still experimental and incomplete at the moment.\n# The default value is: NO.\n\nGENERATE_AUTOGEN_DEF   = NO\n\n#---------------------------------------------------------------------------\n# Configuration options related to the Perl module output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module\n# file that captures the structure of the code including all documentation.\n#\n# Note that this feature is still experimental and incomplete at the moment.\n# The default value is: NO.\n\nGENERATE_PERLMOD       = NO\n\n# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary\n# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI\n# output from the Perl module output.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_PERLMOD is set to YES.\n\nPERLMOD_LATEX          = NO\n\n# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely\n# formatted so it can be parsed by a human reader. This is useful if you want to\n# understand what is going on. On the other hand, if this tag is set to NO, the\n# size of the Perl module output will be much smaller and Perl will parse it\n# just the same.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_PERLMOD is set to YES.\n\nPERLMOD_PRETTY         = YES\n\n# The names of the make variables in the generated doxyrules.make file are\n# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful\n# so different doxyrules.make files included by the same Makefile don't\n# overwrite each other's variables.\n# This tag requires that the tag GENERATE_PERLMOD is set to YES.\n\nPERLMOD_MAKEVAR_PREFIX =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the preprocessor\n#---------------------------------------------------------------------------\n\n# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all\n# C-preprocessor directives found in the sources and include files.\n# The default value is: YES.\n\nENABLE_PREPROCESSING   = YES\n\n# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names\n# in the source code. If set to NO, only conditional compilation will be\n# performed. Macro expansion can be done in a controlled way by setting\n# EXPAND_ONLY_PREDEF to YES.\n# The default value is: NO.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nMACRO_EXPANSION        = NO\n\n# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then\n# the macro expansion is limited to the macros specified with the PREDEFINED and\n# EXPAND_AS_DEFINED tags.\n# The default value is: NO.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nEXPAND_ONLY_PREDEF     = NO\n\n# If the SEARCH_INCLUDES tag is set to YES, the include files in the\n# INCLUDE_PATH will be searched if a #include is found.\n# The default value is: YES.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nSEARCH_INCLUDES        = YES\n\n# The INCLUDE_PATH tag can be used to specify one or more directories that\n# contain include files that are not input files but should be processed by the\n# preprocessor.\n# This tag requires that the tag SEARCH_INCLUDES is set to YES.\n\nINCLUDE_PATH           =\n\n# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard\n# patterns (like *.h and *.hpp) to filter out the header-files in the\n# directories. If left blank, the patterns specified with FILE_PATTERNS will be\n# used.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nINCLUDE_FILE_PATTERNS  =\n\n# The PREDEFINED tag can be used to specify one or more macro names that are\n# defined before the preprocessor is started (similar to the -D option of e.g.\n# gcc). The argument of the tag is a list of macros of the form: name or\n# name=definition (no spaces). If the definition and the \"=\" are omitted, \"=1\"\n# is assumed. To prevent a macro definition from being undefined via #undef or\n# recursively expanded use the := operator instead of the = operator.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nPREDEFINED             = @DOXYGEN_PREDEFINED_MACROS@\n\n# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this\n# tag can be used to specify a list of macro names that should be expanded. The\n# macro definition that is found in the sources will be used. Use the PREDEFINED\n# tag if you want to use a different macro definition that overrules the\n# definition found in the source code.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nEXPAND_AS_DEFINED      =\n\n# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will\n# remove all references to function-like macros that are alone on a line, have\n# an all uppercase name, and do not end with a semicolon. Such function macros\n# are typically used for boiler-plate code, and will confuse the parser if not\n# removed.\n# The default value is: YES.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nSKIP_FUNCTION_MACROS   = YES\n\n#---------------------------------------------------------------------------\n# Configuration options related to external references\n#---------------------------------------------------------------------------\n\n# The TAGFILES tag can be used to specify one or more tag files. For each tag\n# file the location of the external documentation should be added. The format of\n# a tag file without this location is as follows:\n# TAGFILES = file1 file2 ...\n# Adding location for the tag files is done as follows:\n# TAGFILES = file1=loc1 \"file2 = loc2\" ...\n# where loc1 and loc2 can be relative or absolute paths or URLs. See the\n# section \"Linking to external documentation\" for more information about the use\n# of tag files.\n# Note: Each tag file must have a unique name (where the name does NOT include\n# the path). If a tag file is not located in the directory in which doxygen is\n# run, you must also specify the path to the tagfile here.\n\nTAGFILES               =\n\n# When a file name is specified after GENERATE_TAGFILE, doxygen will create a\n# tag file that is based on the input files it reads. See section \"Linking to\n# external documentation\" for more information about the usage of tag files.\n\nGENERATE_TAGFILE       =\n\n# If the ALLEXTERNALS tag is set to YES, all external class will be listed in\n# the class index. If set to NO, only the inherited external classes will be\n# listed.\n# The default value is: NO.\n\nALLEXTERNALS           = NO\n\n# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed\n# in the modules index. If set to NO, only the current project's groups will be\n# listed.\n# The default value is: YES.\n\nEXTERNAL_GROUPS        = YES\n\n# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in\n# the related pages index. If set to NO, only the current project's pages will\n# be listed.\n# The default value is: YES.\n\nEXTERNAL_PAGES         = YES\n\n# The PERL_PATH should be the absolute path and name of the perl script\n# interpreter (i.e. the result of 'which perl').\n# The default file (with absolute path) is: /usr/bin/perl.\n\nPERL_PATH              = /usr/bin/perl\n\n#---------------------------------------------------------------------------\n# Configuration options related to the dot tool\n#---------------------------------------------------------------------------\n\n# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram\n# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to\n# NO turns the diagrams off. Note that this option also works with HAVE_DOT\n# disabled, but it is recommended to install and use dot, since it yields more\n# powerful graphs.\n# The default value is: YES.\n\nCLASS_DIAGRAMS         = NO\n\n# You can define message sequence charts within doxygen comments using the \\msc\n# command. Doxygen will then run the mscgen tool (see:\n# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the\n# documentation. The MSCGEN_PATH tag allows you to specify the directory where\n# the mscgen tool resides. If left empty the tool is assumed to be found in the\n# default search path.\n\nMSCGEN_PATH            =\n\n# You can include diagrams made with dia in doxygen documentation. Doxygen will\n# then run dia to produce the diagram and insert it in the documentation. The\n# DIA_PATH tag allows you to specify the directory where the dia binary resides.\n# If left empty dia is assumed to be found in the default search path.\n\nDIA_PATH               =\n\n# If set to YES the inheritance and collaboration graphs will hide inheritance\n# and usage relations if the target is undocumented or is not a class.\n# The default value is: YES.\n\nHIDE_UNDOC_RELATIONS   = YES\n\n# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is\n# available from the path. This tool is part of Graphviz (see:\n# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent\n# Bell Labs. The other options in this section have no effect if this option is\n# set to NO\n# The default value is: YES.\n\nHAVE_DOT               = YES\n\n# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed\n# to run in parallel. When set to 0 doxygen will base this on the number of\n# processors available in the system. You can set it explicitly to a value\n# larger than 0 to get control over the balance between CPU load and processing\n# speed.\n# Minimum value: 0, maximum value: 32, default value: 0.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_NUM_THREADS        = 0\n\n# When you want a differently looking font in the dot files that doxygen\n# generates you can specify the font name using DOT_FONTNAME. You need to make\n# sure dot is able to find the font, which can be done by putting it in a\n# standard location or by setting the DOTFONTPATH environment variable or by\n# setting DOT_FONTPATH to the directory containing the font.\n# The default value is: Helvetica.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_FONTNAME           = Helvetica\n\n# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of\n# dot graphs.\n# Minimum value: 4, maximum value: 24, default value: 10.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_FONTSIZE           = 10\n\n# By default doxygen will tell dot to use the default font as specified with\n# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set\n# the path where dot can find it using this tag.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_FONTPATH           =\n\n# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for\n# each documented class showing the direct and indirect inheritance relations.\n# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nCLASS_GRAPH            = YES\n\n# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a\n# graph for each documented class showing the direct and indirect implementation\n# dependencies (inheritance, containment, and class references variables) of the\n# class with other documented classes.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nCOLLABORATION_GRAPH    = YES\n\n# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for\n# groups, showing the direct groups dependencies.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nGROUP_GRAPHS           = YES\n\n# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and\n# collaboration diagrams in a style similar to the OMG's Unified Modeling\n# Language.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nUML_LOOK               = NO\n\n# If the UML_LOOK tag is enabled, the fields and methods are shown inside the\n# class node. If there are many fields or methods and many nodes the graph may\n# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the\n# number of items for each type to make the size more manageable. Set this to 0\n# for no limit. Note that the threshold may be exceeded by 50% before the limit\n# is enforced. So when you set the threshold to 10, up to 15 fields may appear,\n# but if the number exceeds 15, the total amount of fields shown is limited to\n# 10.\n# Minimum value: 0, maximum value: 100, default value: 10.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nUML_LIMIT_NUM_FIELDS   = 10\n\n# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and\n# collaboration graphs will show the relations between templates and their\n# instances.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nTEMPLATE_RELATIONS     = NO\n\n# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to\n# YES then doxygen will generate a graph for each documented file showing the\n# direct and indirect include dependencies of the file with other documented\n# files.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nINCLUDE_GRAPH          = YES\n\n# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are\n# set to YES then doxygen will generate a graph for each documented file showing\n# the direct and indirect include dependencies of the file with other documented\n# files.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nINCLUDED_BY_GRAPH      = YES\n\n# If the CALL_GRAPH tag is set to YES then doxygen will generate a call\n# dependency graph for every global function or class method.\n#\n# Note that enabling this option will significantly increase the time of a run.\n# So in most cases it will be better to enable call graphs for selected\n# functions only using the \\callgraph command. Disabling a call graph can be\n# accomplished by means of the command \\hidecallgraph.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nCALL_GRAPH             = NO\n\n# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller\n# dependency graph for every global function or class method.\n#\n# Note that enabling this option will significantly increase the time of a run.\n# So in most cases it will be better to enable caller graphs for selected\n# functions only using the \\callergraph command. Disabling a caller graph can be\n# accomplished by means of the command \\hidecallergraph.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nCALLER_GRAPH           = NO\n\n# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical\n# hierarchy of all classes instead of a textual one.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nGRAPHICAL_HIERARCHY    = YES\n\n# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the\n# dependencies a directory has on other directories in a graphical way. The\n# dependency relations are determined by the #include relations between the\n# files in the directories.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDIRECTORY_GRAPH        = YES\n\n# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images\n# generated by dot. For an explanation of the image formats see the section\n# output formats in the documentation of the dot tool (Graphviz (see:\n# http://www.graphviz.org/)).\n# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order\n# to make the SVG files visible in IE 9+ (other browsers do not have this\n# requirement).\n# Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd,\n# png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo,\n# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo,\n# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and\n# png:gdiplus:gdiplus.\n# The default value is: png.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_IMAGE_FORMAT       = png\n\n# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to\n# enable generation of interactive SVG images that allow zooming and panning.\n#\n# Note that this requires a modern browser other than Internet Explorer. Tested\n# and working are Firefox, Chrome, Safari, and Opera.\n# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make\n# the SVG files visible. Older versions of IE do not have SVG support.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nINTERACTIVE_SVG        = NO\n\n# The DOT_PATH tag can be used to specify the path where the dot tool can be\n# found. If left blank, it is assumed the dot tool can be found in the path.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_PATH               =\n\n# The DOTFILE_DIRS tag can be used to specify one or more directories that\n# contain dot files that are included in the documentation (see the \\dotfile\n# command).\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOTFILE_DIRS           =\n\n# The MSCFILE_DIRS tag can be used to specify one or more directories that\n# contain msc files that are included in the documentation (see the \\mscfile\n# command).\n\nMSCFILE_DIRS           =\n\n# The DIAFILE_DIRS tag can be used to specify one or more directories that\n# contain dia files that are included in the documentation (see the \\diafile\n# command).\n\nDIAFILE_DIRS           =\n\n# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the\n# path where java can find the plantuml.jar file. If left blank, it is assumed\n# PlantUML is not used or called during a preprocessing step. Doxygen will\n# generate a warning when it encounters a \\startuml command in this case and\n# will not generate output for the diagram.\n\nPLANTUML_JAR_PATH      =\n\n# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a\n# configuration file for plantuml.\n\nPLANTUML_CFG_FILE      =\n\n# When using plantuml, the specified paths are searched for files specified by\n# the !include statement in a plantuml block.\n\nPLANTUML_INCLUDE_PATH  =\n\n# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes\n# that will be shown in the graph. If the number of nodes in a graph becomes\n# larger than this value, doxygen will truncate the graph, which is visualized\n# by representing a node as a red box. Note that doxygen if the number of direct\n# children of the root node in a graph is already larger than\n# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that\n# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.\n# Minimum value: 0, maximum value: 10000, default value: 50.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_GRAPH_MAX_NODES    = 50\n\n# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs\n# generated by dot. A depth value of 3 means that only nodes reachable from the\n# root by following a path via at most 3 edges will be shown. Nodes that lay\n# further from the root node will be omitted. Note that setting this option to 1\n# or 2 may greatly reduce the computation time needed for large code bases. Also\n# note that the size of a graph can be further restricted by\n# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.\n# Minimum value: 0, maximum value: 1000, default value: 0.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nMAX_DOT_GRAPH_DEPTH    = 0\n\n# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent\n# background. This is disabled by default, because dot on Windows does not seem\n# to support this out of the box.\n#\n# Warning: Depending on the platform used, enabling this option may lead to\n# badly anti-aliased labels on the edges of a graph (i.e. they become hard to\n# read).\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_TRANSPARENT        = NO\n\n# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output\n# files in one run (i.e. multiple -o and -T options on the command line). This\n# makes dot run faster, but since only newer versions of dot (>1.8.10) support\n# this, this feature is disabled by default.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_MULTI_TARGETS      = NO\n\n# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page\n# explaining the meaning of the various boxes and arrows in the dot generated\n# graphs.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nGENERATE_LEGEND        = YES\n\n# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot\n# files that are used to generate the various graphs.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_CLEANUP            = YES\n"
  },
  {
    "path": "third-party/tbb/doc/DoxygenLayout.xml",
    "content": "<doxygenlayout version=\"1.0\">\n  <!-- Generated by doxygen 1.8.14 -->\n  <!-- Navigation index tabs for HTML output -->\n  <navindex>\n    <tab type=\"mainpage\" visible=\"no\" title=\"\"/>\n    <tab type=\"pages\" visible=\"no\" title=\"\" intro=\"\"/>\n    <tab type=\"modules\" visible=\"yes\" title=\"\" intro=\"\"/>\n    <tab type=\"namespaces\" visible=\"yes\" title=\"\">\n      <tab type=\"namespacelist\" visible=\"yes\" title=\"\" intro=\"\"/>\n      <tab type=\"namespacemembers\" visible=\"yes\" title=\"\" intro=\"\"/>\n    </tab>\n    <tab type=\"classes\" visible=\"no\" title=\"\">\n      <tab type=\"classlist\" visible=\"yes\" title=\"\" intro=\"\"/>\n      <tab type=\"classindex\" visible=\"$ALPHABETICAL_INDEX\" title=\"\"/> \n      <tab type=\"hierarchy\" visible=\"yes\" title=\"\" intro=\"\"/>\n      <tab type=\"classmembers\" visible=\"yes\" title=\"\" intro=\"\"/>\n    </tab>\n    <tab type=\"files\" visible=\"yes\" title=\"Test Suites\">\n      <tab type=\"filelist\" visible=\"no\" title=\"\" intro=\"\"/>\n      <tab type=\"globals\" visible=\"no\" title=\"\" intro=\"\"/>\n    </tab>\n    <tab type=\"user\" url=\"@ref test_classification\" visible=\"yes\" title=\"Test Classification\"/>\n    <tab type=\"examples\" visible=\"yes\" title=\"\" intro=\"\"/>  \n  </navindex>\n\n  <!-- Layout definition for a class page -->\n  <class>\n    <briefdescription visible=\"yes\"/>\n    <includes visible=\"$SHOW_INCLUDE_FILES\"/>\n    <inheritancegraph visible=\"$CLASS_GRAPH\"/>\n    <collaborationgraph visible=\"$COLLABORATION_GRAPH\"/>\n    <memberdecl>\n      <nestedclasses visible=\"yes\" title=\"\"/>\n      <publictypes title=\"\"/>\n      <services title=\"\"/>\n      <interfaces title=\"\"/>\n      <publicslots title=\"\"/>\n      <signals title=\"\"/>\n      <publicmethods title=\"\"/>\n      <publicstaticmethods title=\"\"/>\n      <publicattributes title=\"\"/>\n      <publicstaticattributes title=\"\"/>\n      <protectedtypes title=\"\"/>\n      <protectedslots title=\"\"/>\n      <protectedmethods title=\"\"/>\n      <protectedstaticmethods title=\"\"/>\n      <protectedattributes title=\"\"/>\n      <protectedstaticattributes title=\"\"/>\n      <packagetypes title=\"\"/>\n      <packagemethods title=\"\"/>\n      <packagestaticmethods title=\"\"/>\n      <packageattributes title=\"\"/>\n      <packagestaticattributes title=\"\"/>\n      <properties title=\"\"/>\n      <events title=\"\"/>\n      <privatetypes title=\"\"/>\n      <privateslots title=\"\"/>\n      <privatemethods title=\"\"/>\n      <privatestaticmethods title=\"\"/>\n      <privateattributes title=\"\"/>\n      <privatestaticattributes title=\"\"/>\n      <friends title=\"\"/>\n      <related title=\"\" subtitle=\"\"/>\n      <membergroups visible=\"yes\"/>\n    </memberdecl>\n    <detaileddescription title=\"\"/>\n    <memberdef>\n      <inlineclasses title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <services title=\"\"/>\n      <interfaces title=\"\"/>\n      <constructors title=\"\"/>\n      <functions title=\"\"/>\n      <related title=\"\"/>\n      <variables title=\"\"/>\n      <properties title=\"\"/>\n      <events title=\"\"/>\n    </memberdef>\n    <allmemberslink visible=\"yes\"/>\n    <usedfiles visible=\"$SHOW_USED_FILES\"/>\n    <authorsection visible=\"yes\"/>\n  </class>\n\n  <!-- Layout definition for a namespace page -->\n  <namespace>\n    <briefdescription visible=\"yes\"/>\n    <memberdecl>\n      <nestednamespaces visible=\"yes\" title=\"\"/>\n      <constantgroups visible=\"yes\" title=\"\"/>\n      <classes visible=\"yes\" title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n      <membergroups visible=\"yes\"/>\n    </memberdecl>\n    <detaileddescription title=\"\"/>\n    <memberdef>\n      <inlineclasses title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n    </memberdef>\n    <authorsection visible=\"yes\"/>\n  </namespace>\n\n  <!-- Layout definition for a file page -->\n  <file>\n    <briefdescription visible=\"yes\"/>\n    <includes visible=\"$SHOW_INCLUDE_FILES\"/>\n    <includegraph visible=\"$INCLUDE_GRAPH\"/>\n    <includedbygraph visible=\"$INCLUDED_BY_GRAPH\"/>\n    <sourcelink visible=\"yes\"/>\n    <memberdecl>\n      <classes visible=\"yes\" title=\"\"/>\n      <namespaces visible=\"yes\" title=\"\"/>\n      <constantgroups visible=\"yes\" title=\"\"/>\n      <defines title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n      <membergroups visible=\"yes\"/>\n    </memberdecl>\n    <detaileddescription title=\"\"/>\n    <memberdef>\n      <inlineclasses title=\"\"/>\n      <defines title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n    </memberdef>\n    <authorsection/>\n  </file>\n\n  <!-- Layout definition for a group page -->\n  <group>\n    <briefdescription visible=\"yes\"/>\n    <groupgraph visible=\"$GROUP_GRAPHS\"/>\n    <memberdecl>\n      <nestedgroups visible=\"yes\" title=\"\"/>\n      <dirs visible=\"yes\" title=\"\"/>\n      <files visible=\"yes\" title=\"\"/>\n      <namespaces visible=\"yes\" title=\"\"/>\n      <classes visible=\"yes\" title=\"\"/>\n      <defines title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <enumvalues title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n      <signals title=\"\"/>\n      <publicslots title=\"\"/>\n      <protectedslots title=\"\"/>\n      <privateslots title=\"\"/>\n      <events title=\"\"/>\n      <properties title=\"\"/>\n      <friends title=\"\"/>\n      <membergroups visible=\"yes\"/>\n    </memberdecl>\n    <detaileddescription title=\"\"/>\n    <memberdef>\n      <pagedocs/>\n      <inlineclasses title=\"\"/>\n      <defines title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <enumvalues title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n      <signals title=\"\"/>\n      <publicslots title=\"\"/>\n      <protectedslots title=\"\"/>\n      <privateslots title=\"\"/>\n      <events title=\"\"/>\n      <properties title=\"\"/>\n      <friends title=\"\"/>\n    </memberdef>\n    <authorsection visible=\"yes\"/>\n  </group>\n\n  <!-- Layout definition for a directory page -->\n  <directory>\n    <briefdescription visible=\"yes\"/>\n    <directorygraph visible=\"yes\"/>\n    <memberdecl>\n      <dirs visible=\"yes\"/>\n      <files visible=\"yes\"/>\n    </memberdecl>\n    <detaileddescription title=\"\"/>\n  </directory>\n</doxygenlayout>\n"
  },
  {
    "path": "third-party/tbb/doc/GSG/get_started.rst",
    "content": ".. _Get_Started_Guide:\n\nGet Started with |full_name|\n=============================\n\n.. include:: /GSG/intro_gsg.rst\n\nTo start using oneTBB, follow the next steps:\n*********************************************\n\n#. See the :ref:`System Requirements<system_requirements>`. \n#. :ref:`Install oneTBB<installation>`.\n#. Run your program using oneTBB following the :ref:`Next Steps <next_steps>`. \n#. Learn how to :ref:`Integrate oneTBB into your project <integrate>` using CMake* and pkg-config tool. \n#. See :ref:`oneTBB Samples <samples>`. \n\n\n   \n   \n\n"
  },
  {
    "path": "third-party/tbb/doc/GSG/installation.rst",
    "content": ".. _installation:\n\nInstallation\n============\n\nSee the `installation instructions <https://github.com/uxlfoundation/oneTBB/blob/master/INSTALL.md>`_ \nthat will help you to install |short_name| successfully.  "
  },
  {
    "path": "third-party/tbb/doc/GSG/integrate.rst",
    "content": ".. _integrate:\n\nIntegrate oneTBB\n================\n\nIf you want to improve the performance and scalability of your application, you can integrate oneTBB into your project. \nFor example, you may want to integrate oneTBB if your application needs to process large amounts of data in parallel. \n\nTo integrate oneTBB, you need to:\n\n* Link oneTBB with the project's source code. \n* Provide the necessary compiler and linker flags.\n\nHowever, you can use CMake* and the pkg-config tool to simplify the process of integrating oneTBB into your project and handling its dependencies.\nSee the instructions below to learn how to use the tools. \n\nCMake*\n*******\n\nCMake* is a cross-platform build tool that helps you manage dependencies and build systems. \nIntegrating oneTBB into your project using CMake*:\n\n* Simplifies the process of building and linking against the library.\n* Ensures that your project can be built and run on multiple platforms.\n* Lets you manage oneTBB dependencies.\n\nTo add oneTBB to another project using CMake*, add the following commands to your ``CMakeLists.txt`` file:\n\n.. code-block:: cmake\n\n       find_package(TBB REQUIRED)\n       target_link_libraries(my_executable TBB::tbb)\n\nAfter that, configure your project with CMake* as usual.\n\n\nCompile a Program Using pkg-config\n***********************************\n\nThe pkg-config tool is used to simplify the compilation line by retrieving information about packages\nfrom special metadata files. It helps avoid large hard-coded paths and makes compilation more portable.\n\nTo compile a test program ``test.cpp`` with oneTBB on Linux* OS, \nprovide the full path to search for included files and libraries, or provide a line as the following: \n\n.. code-block::\n   \n       g++ -o test test.cpp $(pkg-config --libs --cflags tbb)\n\nWhere:\n\n``--cflags`` provides oneTBB library include path:\n\n.. code-block::\n\n       $ pkg-config --cflags tbb\n       -I<path-to>/tbb/latest/lib/pkgconfig/../..//include\n\n``--libs`` provides the Intel(R) oneTBB library name and the search path to find it:\n\n.. code-block::\n   \n       $ pkg-config –libs tbb\n       -L<path to>tbb/latest/lib/pkgconfig/../..//lib/intel64/gcc4.8 -ltbb\n\n.. note::\n\n   For Windows* OS, additionally, use the ``--msvc-syntax`` option flag that converts the compiling and linking flags in an appropriate mode.\n"
  },
  {
    "path": "third-party/tbb/doc/GSG/intro_gsg.rst",
    "content": "|short_name| Get Started Guide provides the information you need to begin working with oneTBB. \nIt is helpful for new users of parallel programming and experienced developers that want to improve code performance. \n\nIt is recommended for you to have a basic knowledge of C++ programming and some experience with parallel programming concepts. \n\n|full_name| is a runtime-based parallel programming model for C++ code that uses tasks.\nThe template-based runtime library can help you harness the latent performance of multi-core processors.\n\noneTBB enables you to simplify parallel programming by breaking computation into parallel running tasks. Within a single process, \nparallelism is carried out by mapping tasks to threads. Threads are an operating system mechanism that allows the same or different sets of instructions \nto be executed simultaneously. Using threads can make your program work faster and more efficiently.\n\nHere you can see one of the possible executions of tasks by threads.\n\n.. figure:: /GSG/Images/how-oneTBB-works.png\n   :scale: 70%\n   :align: center\n\nUse oneTBB to write scalable applications that:\n\n* Specify logical parallel structure instead of threads.\n* Emphasize data-parallel programming.\n* Take advantage of concurrent collections and parallel algorithms.\n\noneTBB supports nested parallelism and load balancing. It means that you can use the library without worrying about oversubscribing a system, which happens when more tasks are assigned to a system than it can handle efficiently. \n\noneTBB is used in different areas, such as scientific simulations, gaming, data analysis, etc. \n\nIt is available as a stand-alone product and as part of the |base_tk|.\n"
  },
  {
    "path": "third-party/tbb/doc/GSG/next_steps.rst",
    "content": ".. _next_steps:\n\nNext Steps\n===========\n\nAfter installing oneTBB, complete the following steps to start working with the library.\n\nSet the Environment Variables\n*****************************\n\nAfter installing |short_name|, set the environment variables:\n  \n#. Go to the oneTBB installation directory. \n\n#. Set the environment variables using the script in ``<install_dir>`` by running:\n     \n   * On Linux* OS: ``vars.{sh|csh} in <install_dir>/tbb/latest/env``\n   * On Windows* OS: ``vars.bat in <install_dir>/tbb/latest/env``\n\n.. tip::\n\n   oneTBB can coordinate with Intel(R) OpenMP on CPU resources usage \n   to avoid excessive oversubscription when both runtimes are used within a process.\n   To enable this feature set up ``TCM_ENABLE`` environment variable to ``1``.\n\n\nBuild and Run a Sample \n**********************\n\n.. tab-set::\n\n    .. tab-item:: Windows* OS\n\n        #. Create a new C++ project using your IDE. In this example, Microsoft* Visual Studio* Code is used. \n        #. Create an ``example.cpp`` file in the project. \n        #. Copy and paste the code below. It is a typical example of a |short_name| algorithm. The sample calculates a sum of all integer numbers from 1 to 100. \n   \n           .. code:: \n\n              #include <oneapi/tbb.h>\n            \n              int main (){\n                  int sum = oneapi::tbb::parallel_reduce(\n                      oneapi::tbb::blocked_range<int>(1,101), 0,\n                      [](oneapi::tbb::blocked_range<int> const& r, int init) -> int {\n                          for (int v = r.begin(); v != r.end(); v++) {\n                              init += v;\n                          }\n                          return init;\n                      },\n                      [](int lhs, int rhs) -> int {\n                          return lhs + rhs;\n                      }\n                  );\n      \n                  printf(\"Sum: %d\\n\", sum);\n                  return 0;\n              }\n      \n        #. Open the ``tasks.json`` file in the ``.vscode`` directory and paste the following lines to the args array:\n\n           * ``-Ipath/to/oneTBB/include`` to add oneTBB include directory. \n           * ``path/to/oneTBB/`` to add oneTBB. \n\n           For example:\n\n           .. code-block::\n\n                  { \n                     \"tasks\": [\n                          {\n                             \"label\": \"build & run\",\n                             \"type\": \"cppbuild\",\n                             \"group\": {\n                             \"args\": [ \n                                 \"/IC:\\\\Program Files (x86)\\\\Intel\\\\oneAPI\\\\tbb\\\\2022.0.0\\\\include\",\n                                 \"C:\\\\Program Files (x86)\\\\Intel\\\\oneAPI\\\\tbb\\\\2022.0.0\\\\lib\\\\tbb12.lib\"\n                           \n\n        #. Build the project. \n        #. Run the example. \n        #. If oneTBB is configured correctly, the output displays ``Sum: 5050``.  \n\n    .. tab-item:: Linux* OS\n\n        #. Create an ``example.cpp`` file in the project. \n        #. Copy and paste the code below. It is a typical example of a |short_name| algorithm. The sample calculates a sum of all integer numbers from 1 to 100. \n         \n           .. code:: \n\n              #include <oneapi/tbb.h>\n\n              int main(){\n                  int sum = oneapi::tbb::parallel_reduce(\n                      oneapi::tbb::blocked_range<int>(1,101), 0,\n                      [](oneapi::tbb::blocked_range<int> const& r, int init) -> int {\n                          for (int v = r.begin(); v != r.end(); v++) {\n                              init += v;\n                          }\n                          return init;\n                      },\n                      [](int lhs, int rhs) -> int {\n                          return lhs + rhs;\n                      }\n                  );\n      \n                  printf(\"Sum: %d\\n\", sum);\n                  return 0;\n              }\n\n        #. Compile the code using oneTBB. For example, \n\n           .. code-block:: \n\n                  g++ -std=c++11 example.cpp -o example -ltbb\n\n      \n        #. Run the executable:\n\n           .. code-block:: \n\n                  ./example\n      \n        #. If oneTBB is configured correctly, the output displays ``Sum: 5050``. \n\n\n\nHybrid CPU and NUMA Support\n****************************\n\nIf you need NUMA/Hybrid CPU support in oneTBB, you need to make sure that HWLOC* is installed on your system.\n\nHWLOC* (Hardware Locality) is a library that provides a portable abstraction of the hierarchical topology of modern architectures (NUMA, hybrid CPU systems, etc). oneTBB relies on HWLOC* to identify the underlying topology of the system to optimize thread scheduling and memory allocation.\n\nWithout HWLOC*, oneTBB may not take advantage of NUMA/Hybrid CPU support. Therefore, it's important to make sure that HWLOC* is installed before using oneTBB on such systems.\n\nCheck HWLOC* on the System\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\nTo check if HWLOC* is already installed on your system, run ``hwloc-ls``:\n\n* For Linux* OS, in the command line.\n* For Windows* OS, in the command prompt.\n\nIf HWLOC* is installed, the command displays information about the hardware topology of your system. If it is not installed, you receive an error message saying that the command ``hwloc-ls`` could not be found.\n\n.. note:: For Hybrid CPU support, make sure that HWLOC* is version 2.5 or higher. For NUMA support, install HWLOC* version 1.11 or higher.\n\nInstall HWLOC*\n^^^^^^^^^^^^^^\n\nTo install HWLOC*, visit the official Portable Hardware Locality website (https://www-lb.open-mpi.org/projects/hwloc/).\n\n* For Windows* OS, binaries are available for download.\n* For Linux* OS, only the source code is provided and binaries should be built.\n\nOn Linux* OS, HWLOC* can be also installed with package managers, such as APT*, YUM*, etc. To do so, run: sudo apt install hwloc.\n\n.. note:: For Hybrid CPU support, make sure that HWLOC* is version 2.5 or higher. For NUMA support, install HWLOC* version 1.11 or higher.\n"
  },
  {
    "path": "third-party/tbb/doc/GSG/samples.rst",
    "content": ".. _samples:\n\noneTBB Samples\n==============\n\nTo become an expert in using oneTBB, explore its samples and examples to learn how \nto properly utilize the features and functionality of oneTBB and avoid common mistakes that may impede your performance.\n\nThe following samples are available:\n\n* **Containers** \n\n  * `concurrent_hash_map <https://github.com/uxlfoundation/oneTBB/tree/master/examples/concurrent_hash_map>`_ \n  * `concurrent_priority_queue <https://github.com/uxlfoundation/oneTBB/tree/master/examples/concurrent_priority_queue>`_ \n\n* `Flow Graph <https://github.com/uxlfoundation/oneTBB/tree/master/examples/graph>`_ \n   * `A solution to the binpacking problem using a queue_node, a buffer_node, and function_node. <https://github.com/uxlfoundation/oneTBB/tree/master/examples/graph/binpack>`_ \n   * `Cholesky Factorization algorithm <https://github.com/uxlfoundation/oneTBB/tree/master/examples/graph/cholesky>`_\n   * `An implementation of dining philosophers in graph using the reserving join_node <https://github.com/uxlfoundation/oneTBB/tree/master/examples/graph/dining_philosophers>`_\n   * `A parallel implementation of bzip2 block-sorting file compressor <https://github.com/uxlfoundation/oneTBB/tree/master/examples/graph/fgbzip2>`_\n   * `An example of a collection of digital logic gates that can be easily composed into larger circuits <https://github.com/uxlfoundation/oneTBB/tree/master/examples/graph/logic_sim>`_\n   * `An example of a Kohonen Self-Organizing Map using cancellation <https://github.com/uxlfoundation/oneTBB/tree/master/examples/graph/som>`_\n   * `Split computational kernel for execution between CPU and GPU <https://github.com/oneapi-src/oneAPI-samples/tree/master/Libraries/oneTBB/tbb-async-sycl>`_\n\n* **Algorithms**\n\n  * `parallel_for <https://github.com/uxlfoundation/oneTBB/tree/master/examples/parallel_for>`_\n     * `Game of life overlay <https://github.com/uxlfoundation/oneTBB/tree/master/examples/parallel_for/game_of_life>`_\n     * `Polygon overlay <https://github.com/uxlfoundation/oneTBB/tree/master/examples/parallel_for/polygon_overlay>`_\n     * `Parallel seismic wave simulation <https://github.com/uxlfoundation/oneTBB/tree/master/examples/parallel_for/seismic>`_\n     * `Parallel 2-D raytracer/renderer <https://github.com/uxlfoundation/oneTBB/tree/master/examples/parallel_for/tachyon>`_\n     * `Find largest matching substrings <https://github.com/uxlfoundation/oneTBB/tree/master/examples/getting_started>`_\n     * `Resumable task: Split computational kernel for execution between CPU and GPU <https://github.com/oneapi-src/oneAPI-samples/tree/master/Libraries/oneTBB/tbb-resumable-tasks-sycl>`_\n  * `parallel_for_each <https://github.com/uxlfoundation/oneTBB/tree/master/examples/parallel_for_each>`_\n  * `parallel_pipeline <https://github.com/uxlfoundation/oneTBB/tree/master/examples/parallel_pipeline>`_\n  * `parallel_reduce <https://github.com/uxlfoundation/oneTBB/tree/master/examples/parallel_reduce>`_\n\n* **Task Scheduler**\n\n  * `task_arena <https://github.com/uxlfoundation/oneTBB/tree/master/examples/task_arena>`_\n  * `task_group <https://github.com/uxlfoundation/oneTBB/tree/master/examples/task_group>`_\n  * `Execute similar computational kernels, with one task executing the SYCL* code and the other task executing the oneTBB code <https://github.com/oneapi-src/oneAPI-samples/tree/master/Libraries/oneTBB/tbb-task-sycl>`_\n\n* **Other**\n\n  * `Compute Fibonacci numbers in different ways <https://github.com/uxlfoundation/oneTBB/tree/master/examples/test_all>`_\n\n\n.. note:: You can also refer to the `oneAPI Samples <https://oneapi-src.github.io/oneAPI-samples/>`_ to learn more about the ecosystem. "
  },
  {
    "path": "third-party/tbb/doc/GSG/system_requirements.rst",
    "content": ".. _System_Requirements:\n\nSystem Requirements\n*******************\n\nRefer to the `oneTBB System Requirements <https://github.com/uxlfoundation/oneTBB/blob/master/SYSTEM_REQUIREMENTS.md>`_."
  },
  {
    "path": "third-party/tbb/doc/README.md",
    "content": "# How to build oneTBB documentation\n\nOur documentation is written in restructured text markup (.rst) and built using [Sphinx](http://www.sphinx-doc.org/en/master/). \n\nThis document explains how to build oneTBB documentation locally. \n\n## Prerequisites\n- Python 3.7.0 or higher\n- Sphinx \n\n## Build documentation\n\nDo the following to generate HTML output of the documentation: \n\n1. Clone oneTBB repository:\n\n```\ngit clone https://github.com/uxlfoundation/oneTBB.git\n```\n\n2. Go to the `doc` folder:\n\n```\ncd oneTBB/doc\n```\n\n3. Run in the command line:\n\n```\nmake html\n```\n\n\nThat's it! Your built documentation is located in the ``build/html`` folder. \n"
  },
  {
    "path": "third-party/tbb/doc/_static/custom.js",
    "content": "window.MathJax = {\n    TeX: {\n    Macros: {\n        src: '\\\\operatorname{src}',\n        srclayer: '\\\\operatorname{src\\\\_layer}',\n        srciter: '\\\\operatorname{src\\\\_iter}',\n        srciterc: '\\\\operatorname{src\\\\_iter\\\\_c}',\n        weights: '\\\\operatorname{weights}',\n        weightslayer: '\\\\operatorname{weights\\\\_layer}',\n        weightsiter: '\\\\operatorname{weights\\\\_iter}',\n        weightspeephole: '\\\\operatorname{weights\\\\_peephole}',\n        weightsprojection: '\\\\operatorname{weights\\\\_projection}',\n        bias: '\\\\operatorname{bias}',\n        dst: '\\\\operatorname{dst}',\n        dstlayer: '\\\\operatorname{dst\\\\_layer}',\n        dstiter: '\\\\operatorname{dst\\\\_iter}',\n        dstiterc: '\\\\operatorname{dst\\\\_iter\\\\_c}',\n        diffsrc: '\\\\operatorname{diff\\\\_src}',\n        diffsrclayer: '\\\\operatorname{diff\\\\_src\\\\_layer}',\n        diffsrciter: '\\\\operatorname{diff\\\\_src\\\\_iter}',\n        diffsrciterc: '\\\\operatorname{diff\\\\_src\\\\_iter\\\\_c}',\n        diffweights: '\\\\operatorname{diff\\\\_weights}',\n        diffweightslayer: '\\\\operatorname{diff\\\\_weights\\\\_layer}',\n        diffweightsiter: '\\\\operatorname{diff\\\\_weights\\\\_iter}',\n        diffweightspeephole: '\\\\operatorname{diff\\\\_weights\\\\_peephole}',\n        diffweightsprojection: '\\\\operatorname{diff\\\\_weights\\\\_projection}',\n        diffbias: '\\\\operatorname{diff\\\\_bias}',\n        diffdst: '\\\\operatorname{diff\\\\_dst}',\n        diffdstlayer: '\\\\operatorname{diff\\\\_dst\\\\_layer}',\n        diffdstiter: '\\\\operatorname{diff\\\\_dst\\\\_iter}',\n        diffdstiterc: '\\\\operatorname{diff\\\\_dst\\\\_iter\\\\_c}',\n        diffgamma: '\\\\operatorname{diff\\\\_\\\\gamma}',\n        diffbeta: '\\\\operatorname{diff\\\\_\\\\beta}',\n        workspace: '\\\\operatorname{workspace}'\n    }\n    }\n}"
  },
  {
    "path": "third-party/tbb/doc/_static/theme_overrides.css",
    "content": "/* override table width restrictions */\n@media screen and (min-width: 767px) {\n\n   .wy-table-responsive table td {\n      /* !important prevents the common CSS stylesheets from overriding\n         this as on RTD they are loaded after this stylesheet */\n      white-space: normal !important;\n   }\n\n   .wy-table-responsive {\n      overflow: visible !important;\n   }\n}\n"
  },
  {
    "path": "third-party/tbb/doc/conf.py",
    "content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#\nimport os\n# import sys\n# sys.path.insert(0, os.path.abspath('.'))\n\nSOURCE_DIR = os.path.dirname(__file__)\nLATEX_DIR = os.path.join(SOURCE_DIR, '_latex')\nPREAMBLE_FILE = os.path.join(LATEX_DIR, 'preamble.tex')\nTITLE_PAGE_FILE = os.path.join(LATEX_DIR, 'title_page.tex')\n\nBUILD_TYPE = os.getenv(\"BUILD_TYPE\")\n\n# -- Project information -----------------------------------------------------\n\nif BUILD_TYPE == 'oneapi' or BUILD_TYPE == 'dita':\n    project = u'Intel® oneAPI Threading Building Blocks (oneTBB)'\nelse:\n    project = u'oneTBB'\ncopyright = u'Intel Corporation'\nauthor = u'Intel'\n\n# The short X.Y version\nversion = u''\n# The full version, including alpha/beta/rc tags\nrelease = u''\n\n\n# -- General configuration ---------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\n# needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    'sphinx.ext.autodoc',\n    'sphinx.ext.doctest',\n    'sphinx.ext.intersphinx',\n    'sphinx.ext.todo',\n    'sphinx.ext.coverage',\n    'sphinx.ext.imgmath',\n    'sphinx.ext.ifconfig',\n    'sphinx.ext.viewcode',\n    'sphinx.ext.githubpages', \n    'sphinx_design'\n]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['main/_templates']\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n#\n# source_suffix = ['.rst', '.md']\nsource_suffix = '.rst'\n\n# The master toctree document.\n#master_doc = 'main/title_main'\nmaster_doc = 'index'\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = 'en'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path.\nexclude_patterns = []\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = None\n\n# Syntax highlighting for the :: directive\nhighlight_language = 'cpp' \n\nif BUILD_TYPE == 'oneapi' or BUILD_TYPE == 'dita':\n    rst_prolog = \"\"\"\n.. |full_name| replace:: Intel\\ |reg|\\  oneAPI Threading Building Blocks (oneTBB)\n.. |short_name| replace:: oneTBB\n.. |product| replace:: oneTBB\n.. |reg| unicode:: U+000AE\n.. |copy| unicode:: U+000A9\n.. |base_tk| replace:: Intel\\ |reg|\\  oneAPI Base Toolkit\n.. |dpcpp| replace:: Intel\\ |reg|\\  oneAPI DPC++/C++ Compiler\n    \"\"\"\nelse:\n    rst_prolog = \"\"\"\n.. |full_name| replace:: oneAPI Threading Building Blocks (oneTBB)\n.. |short_name| replace:: oneTBB\n.. |product| replace:: oneTBB\n.. |reg| unicode:: U+000AE\n.. |copy| unicode:: U+000A9\n.. |base_tk| replace:: Intel\\ |reg|\\  oneAPI Base Toolkit\n.. |dpcpp| replace:: Intel\\ |reg|\\  oneAPI DPC++/C++ Compiler\n    \"\"\"\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#\n\nhtml_theme = 'sphinx_book_theme'\n\nif BUILD_TYPE == 'dita':\n    html_theme_options = {\n        'repository_url': 'https://github.com/uxlfoundation/oneTBB',\n        'path_to_docs': 'doc',\n        'repository_branch': 'master'\n    }\nelse:\n    html_theme_options = {\n        'repository_url': 'https://github.com/uxlfoundation/oneTBB',\n        'path_to_docs': 'doc',\n        'use_issues_button': True,\n        'use_edit_page_button': True,\n        'repository_branch': 'master',\n    }\n\nif BUILD_TYPE != 'oneapi' and BUILD_TYPE != 'dita':\n   html_theme_options[\"extra_footer\"]=\"<div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a> <a data-wap_ref='dns' id='wap_dns' href='https://www.intel.com/content/www/us/en/privacy/intel-cookie- notice.html'>| Do Not Share My Personal Information</a> </div><div>&copy; Intel Corporation. Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries. Other names and brands may be claimed as the property of others. No license (express or implied, by estoppel or otherwise) to any intellectual property rights is granted by this document, with the sole exception that code included in this document is licensed subject to the Zero-Clause BSD open source license (OBSD), <a href='http://opensource.org/licenses/0BSD'>http://opensource.org/licenses/0BSD</a>. </div><br><div>oneTBB is licensed under Apache License Version 2.0. Refer to the <a href='https://github.com/uxlfoundation/oneTBB/blob/master/LICENSE.txt'>LICENSE </a> file for the full license text and copyright notice.</div>\"\n\n    \n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\nif BUILD_TYPE == 'oneapi'  or BUILD_TYPE == 'dita':\n    html_context = {\n        'css_files': [\n            '_static/theme_overrides.css',  # override wide tables in RTD theme\n        ],\n    }\nelse:\n    html_js_files = ['custom.js']\n\nhtml_theme_options[\"logo\"] = {\"text\": \"oneTBB Documentation\"}\n    \nhtml_logo = '_static/oneAPI-rgb-rev-100.png'\nhtml_favicon = '_static/favicons.png'\n\n\n# Custom sidebar templates, must be a dictionary that maps document names\n# to template names.\n#\n# The default sidebars (for documents that don't match any pattern) are\n# defined by theme itself.  Builtin themes are using these templates by\n# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',\n# 'searchbox.html']``.\n#\n# html_sidebars = {}\n\n\n# -- Options for HTMLHelp output ---------------------------------------------\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'sphinx-infodevdoc'\n\n\n# -- Options for LaTeX output ------------------------------------------------\n\n#latex_engine = 'xelatex'\n#PDF_TITLE = 'Information Development Template'\n#\n#with open(PREAMBLE_FILE, 'r', encoding='utf-8') as f:\n#    PREAMBLE = f.read()\n#\n#with open(TITLE_PAGE_FILE, 'r', encoding='utf-8') as f:\n#    TITLE_PAGE = f.read().replace('<PDF_TITLE>', PDF_TITLE)\n#\n#\n#latex_elements = {\n#    # The paper size ('letterpaper' or 'a4paper').\n#    #\n#    'extraclassoptions': 'openany,oneside',\n#    'babel' : '\\\\usepackage[english]{babel}',\n#    'papersize': 'a4paper',\n#    'releasename':\" \",\n#    # Sonny, Lenny, Glenn, Conny, Rejne, Bjarne and Bjornstrup\n#    # 'fncychap': '\\\\usepackage[Lenny]{fncychap}',\n#    'fncychap':  '',\n#    #'fontpkg': '\\\\usepackage{amsmath,amsfonts,amssymb,amsthm}',\n#\n#    'figure_align':'htbp',\n#    # The font size ('10pt', '11pt' or '12pt').\n#    #\n#    'pointsize': '12pt',\n#\n#    # Additional stuff for the LaTeX preamble.\n#    #\n#    'preamble': PREAMBLE,\n#\n#    'maketitle': TITLE_PAGE,\n#    # Latex figure (float) alignment\n#    #\n#    # 'figure_align': 'htbp',\n#    'sphinxsetup': \\\n#        'hmargin={0.7in,0.7in}, vmargin={1in,1in}, \\\n#        verbatimwithframe=true, \\\n#        TitleColor={rgb}{0,0.686,0.941}, \\\n#        HeaderFamily=\\\\rmfamily\\\\bfseries, \\\n#        InnerLinkColor={rgb}{0,0.686,0.941}, \\\n#        OuterLinkColor={rgb}{0,0.686,0.941}',\n#\n#    'tableofcontents':' '\n#}\n#\n#latex_logo = '_latex/intel_logo.png'\n## Grouping the document tree into LaTeX files. List of tuples\n## (source start file, target name, title,\n##  author, documentclass [howto, manual, or own class]).\n#latex_documents = [\n#    (master_doc, 'sphinx-infodev.tex', u'sphinx-infodev Documentation',\n#     u'Intel', 'manual'),\n#]\n\n#breathe_projects = {                                       #todd-mod\n#    project: \"../doxygen/xml\"\n#}\n#breathe_default_project = project\n\n# Setup the exhale extension\n#exhale_args = {                                            #todd-mod\n#    # These arguments are required\n#    \"containmentFolder\":     \"./api\",\n#    \"rootFileName\":          \"library_root.rst\",\n#    \"rootFileTitle\":         \"Library API\",\n#    \"doxygenStripFromPath\":  \"..\",\n#    \"fullApiSubSectionTitle\": 'Full API'\n#}\n\n\n# -- Options for manual page output ------------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n    (master_doc, 'sphinx-infodev', u'sphinx-infodev Documentation',\n     [author], 1)\n]\n\n\n# -- Options for Texinfo output ----------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n    (master_doc, 'sphinx-infodev', u'sphinx-infodev Documentation',\n     author, 'sphinx-infodev', 'One line description of project.',\n     'Miscellaneous'),\n]\n\n\n# -- Options for Epub output -------------------------------------------------\n\n# Bibliographic Dublin Core info.\nepub_title = project\n\n# The unique identifier of the text. This can be a ISBN number\n# or the project homepage.\n#\n# epub_identifier = ''\n\n# A unique identification for the text.\n#\n# epub_uid = ''\n\n# A list of files that should not be packed into the epub file.\nepub_exclude_files = ['search.html']\n\n\n# -- Extension configuration -------------------------------------------------\n\n# -- Options for intersphinx extension ---------------------------------------\n\n# Example configuration for intersphinx: refer to the Python standard library.\nintersphinx_mapping = {'python': ('https://docs.python.org/3', None)}\n\n# -- Options for todo extension ----------------------------------------------\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = True\n"
  },
  {
    "path": "third-party/tbb/doc/index/index_intro.rst",
    "content": ".. _index_intro:\n\nThis document contains information about |short_name|. \nIt is a flexible performance library that let you break computation into parallel running tasks. \n\n"
  },
  {
    "path": "third-party/tbb/doc/index/toctree.rst",
    "content": ".. _toctree:\n\n.. toctree::\n   :caption: About\n   :hidden:\n   :maxdepth: 1\n\n   /main/intro/help_support\n   /main/intro/notation\n   /main/intro/intro_os\n   /main/intro/Benefits\n   /main/intro/testing_approach\n   /main/intro/limitations.rst\n\n\n.. toctree::\n   :caption: Get Started\n   :hidden:\n   :maxdepth: 1\n\n   /GSG/get_started\n   /GSG/system_requirements\n   /GSG/installation\n   /GSG/next_steps \n   /GSG/integrate\n   /GSG/samples\n\n\n.. toctree::\n   :maxdepth: 3\n   :hidden:\n   :caption: Developer Guide\n\n   /main/tbb_userguide/title\n\n\n.. toctree::\n   :maxdepth: 3\n   :hidden:\n   :caption: Developer Reference\n\n   /main/reference/reference\n"
  },
  {
    "path": "third-party/tbb/doc/index/useful_topics.rst",
    "content": ".. _Usefull_Topics:\n\nThe following is an important topic for the ``experienced user``:\n\n:ref:`Migration_Guide` describes how to migrate from TBB to oneTBB."
  },
  {
    "path": "third-party/tbb/doc/index.rst",
    "content": "|full_name|\n===========\n\n.. include:: index/index_intro.rst\n\n\nThe following are some important topics for the ``novice user``:\n\n* :ref:`Get_Started_Guide` gives you a brief explanation of what oneTBB is. \n* :ref:`Benefits` describes how |short_name| differs from typical threading packages.\n* :ref:`Package_Contents` describes dynamic library files and header files for Windows*, Linux*, and macOS* operating systems used in |short_name|.\n\n.. include:: index/useful_topics.rst\n\n.. include:: index/toctree.rst\n"
  },
  {
    "path": "third-party/tbb/doc/main/_templates/layout.html",
    "content": "{% extends \"!layout.html\" %}\n{% block extrahead %}\n    <script defer type=\"text/javascript\" src=\"https://www.intel.com/content/dam/www/global/wap/performance-config.js\" ></script>\n    <script type=\"text/javascript\">\n        // Configure TMS settings\n        var wapLocalCode = 'us-en'; // Dynamically set per localized site, see mapping table for values\n        var wapSection = \"oneapi-tbb\"; // WAP team will give you a unique section for your site\n        // Load TMS\n        (function () {\n            var url = 'https://www.intel.com/content/dam/www/global/wap/tms-loader.js'; // WAP file URL\n            var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = url;\n            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);\n        })();\n      </script>\n{% endblock %}\n"
  },
  {
    "path": "third-party/tbb/doc/main/examples_testing/CMakeLists.txt",
    "content": "# Copyright (c) 2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.11)\nproject(doc_examples_testing LANGUAGES CXX)\n\nset(_reference_examples_path \"${CMAKE_CURRENT_SOURCE_DIR}/../reference/examples\")\nset(_userguide_examples_path \"${CMAKE_CURRENT_SOURCE_DIR}/../tbb_userguide/examples\")\n\nadd_custom_target(build-doc-examples\n    COMMENT \"Build oneTBB documentation samples\")\nset(doc_examples_test_label \"doc-examples\")\n\nmacro(add_doc_example _doc_example_path)\n    get_filename_component(_doc_example_name \"${_doc_example_path}\" NAME_WE)\n    add_executable(${_doc_example_name} EXCLUDE_FROM_ALL \"${_doc_example_path}\")\n\n    add_dependencies(${_doc_example_name} TBB::tbb TBB::tbbmalloc TBB::tbbmalloc_proxy)\n    target_link_libraries(${_doc_example_name} TBB::tbb TBB::tbbmalloc TBB::tbbmalloc_proxy)\n\n    add_dependencies(build-doc-examples ${_doc_example_name})\n    add_test(NAME ${_doc_example_name} COMMAND ${_doc_example_name})\n    set_tests_properties(${_doc_example_name} PROPERTIES LABELS \"${doc_examples_test_label}\")\nendmacro()\n\nfile(GLOB_RECURSE DOC_EXAMPLES_LIST \"${_reference_examples_path}/*.cpp\" \"${_userguide_examples_path}/*.cpp\")\n\nforeach(_doc_example_path IN LISTS DOC_EXAMPLES_LIST)\n    add_doc_example(${_doc_example_path})\nendforeach()\n"
  },
  {
    "path": "third-party/tbb/doc/main/intro/Benefits.rst",
    "content": ".. _Benefits:\n\n|short_name| Benefits\n=====================\n\n\n|full_name| is a library that helps you leverage multi-core performance\nwithout having to be a threading expert. Typically you can improve\nperformance for multi-core processors by implementing the key points\nexplained in the early sections of the Developer Guide. As your\nexpertise grows, you may want to dive into more complex subjects that\nare covered in advanced sections.\n\n\nThere are a variety of approaches to parallel programming, ranging from\nusing platform-dependent threading primitives to exotic new languages.\nThe advantage of oneTBB is that it works at a higher level than raw\nthreads, yet does not require exotic languages or compilers. You can use\nit with any compiler supporting ISO C++. The library differs from\ntypical threading packages in the following ways:\n\n\n-  **oneTBB enables you to specify logical parallelism instead of\n   threads**. Most threading packages require you to specify threads.\n   Programming directly in terms of threads can be tedious and lead to\n   inefficient programs, because threads are low-level, heavy constructs\n   that are close to the hardware. Direct programming with threads\n   forces you to efficiently map logical tasks onto threads. In\n   contrast, the oneTBB run-time library automatically maps logical\n   parallelism onto threads in a way that makes efficient use of\n   processor resources.\n\n\n-  **oneTBB targets threading for performance**. Most general-purpose\n   threading packages support many different kinds of threading, such as\n   threading for asynchronous events in graphical user interfaces. As a\n   result, general-purpose packages tend to be low-level tools that\n   provide a foundation, not a solution. Instead, oneTBB focuses on the\n   particular goal of parallelizing computationally intensive work,\n   delivering higher-level, simpler solutions.\n\n\n-  **oneTBB is compatible with other threading packages.** Because the\n   library is not designed to address all threading problems, it can\n   coexist seamlessly with other threading packages.\n\n\n-  **oneTBB emphasizes scalable, data parallel programming**. Breaking a\n   program up into separate functional blocks, and assigning a separate\n   thread to each block is a solution that typically does not scale well\n   since typically the number of functional blocks is fixed. In\n   contrast, oneTBB emphasizes *data-parallel* programming, enabling\n   multiple threads to work on different parts of a collection.\n   Data-parallel programming scales well to larger numbers of processors\n   by dividing the collection into smaller pieces. With data-parallel\n   programming, program performance increases as you add processors.\n\n\n-  **oneTBB relies on generic programming**. Traditional libraries\n   specify interfaces in terms of specific types or base classes.\n   Instead, oneAPI Threading Building Blocks uses generic programming.\n   The essence of generic programming is writing the best possible\n   algorithms with the fewest constraints. The C++ Standard Template\n   Library (STL) is a good example of generic programming in which the\n   interfaces are specified by *requirements* on types. For example, C++\n   STL has a template function ``sort`` that sorts a sequence abstractly\n   defined in terms of iterators on the sequence. The requirements on\n   the iterators are:\n\n\n   -  Provide random access\n\n\n   -  The expression ``*i<*j`` is true if the item pointed to by\n      iterator ``i`` should precede the item pointed to by iterator\n      ``j``, and false otherwise.\n\n\n   -  The expression ``swap(*i,*j)`` swaps two elements.\n\n\nSpecification in terms of requirements on types enables the template to\nsort many different representations of sequences, such as vectors and\ndeques. Similarly, the oneTBB templates specify requirements on types,\nnot particular types, and thus adapt to different data representations.\nGeneric programming enables oneTBB to deliver high performance\nalgorithms with broad applicability.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/intro/help_support.rst",
    "content": ".. _help_support:\n\nGetting Help and Support\n========================\n\n\n.. container:: section\n\n\n   .. rubric:: Getting Technical Support\n      :class: sectiontitle\n\n   For general information about oneTBB technical support, product\n   updates, user forums, FAQs, tips and tricks and other support\n   questions, go to `GitHub issues <https://github.com/uxlfoundation/oneTBB/issues>`_.\n"
  },
  {
    "path": "third-party/tbb/doc/main/intro/intro_os.rst",
    "content": ".. _intro:\n\nIntroduction\n============\n\n\n|full_name| is a library that supports scalable parallel programming using\nstandard ISO C++ code. It does not require special languages or\ncompilers. It is designed to promote scalable data parallel programming.\nAdditionally, it fully supports nested parallelism, so you can build\nlarger parallel components from smaller parallel components. To use the\nlibrary, you specify tasks, not threads, and let the library map tasks\nonto threads in an efficient manner.\n\n\nMany of the library interfaces employ generic programming, in which\ninterfaces are defined by requirements on types and not specific types.\nThe C++ Standard Template Library (STL) is an example of generic\nprogramming. Generic programming enables oneTBB to be flexible yet\nefficient. The generic interfaces enable you to customize components to\nyour specific needs.\n\n\n.. note:: \n   |full_name| requires C++11 standard compiler support.\n\n\nThe net result is that oneTBB enables you to specify parallelism far\nmore conveniently than using raw threads, and at the same time can\nimprove performance.\n\n\n\n\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/intro/limitations.rst",
    "content": ".. _limitations:\n\nKnown Limitations\n*****************\n\nThis page outlines the known limitations of oneTBB to help you better understand its capabilities. \n\nDebug TBB In The SYCL Program\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n**Limitation:** The application may crash when using the Debug version of oneTBB in a SYCL program compiled with Intel(R) oneAPI DPC++/C++ Compiler. This happens because both ``tbb`` (Release version) and ``tbb_debug`` (Debug version) libraries load simultaneously, causing conflicts.\n\n**Solution:** Do one of the following:\n\n* Link the application with the Release version ``tbb`` instead of ``tbb_debug``.\n* Use the ``qtbb`` flag provided by the Intel(R) oneAPI DPC++/C++ Compiler.\n\nFreestanding Compilation Mode\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n**Limitation:** oneTBB does not support the freestanding compilation mode. \n\n**Risk:** Compiling an application that utilizes oneTBB headers using the Intel(R) oneAPI DPC++/C++ Compiler may result in failure on Windows* OS if the ``/Qfreestanding`` compiler option is employed.\n\nStatic Assert\n^^^^^^^^^^^^^\n\n**Limitation:** A static assert causes the compilation failures in oneTBB headers if the following conditions are satisfied:\n  \n* Compilation is done with Clang 12.0.0 or a more recent version. \n* The LLVM standard library is employed, coupled with the use of the ``-ffreestanding`` flag and C++11/14 compiler options.\n\n**Risk:** The compilation failures. \n\nInterface Incompatibilities: TBB vs oneTBB\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n**Limitation:** An application using Parallel STL algorithms in the ``libstdc++`` versions 9 and 10 may fail to compile due to incompatible interface changes between earlier versions of Threading Building Blocks (TBB) and oneAPI Threading Building Blocks (oneTBB). \n\n**Solution:** Disable support for Parallel STL algorithms by defining ``PSTL_USE_PARALLEL_POLICIES`` (in libstdc++ 9) or ``_GLIBCXX_USE_TBB_PAR_BACKEND`` (in libstdc++ 10) macro to zero before inclusion of the first standard header file in each translation unit.\n\nIncorrect Installation Location\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n**Limitation:** On Linux* OS, if oneAPI Threading Building Blocks (oneTBB) or Threading Building Blocks (TBB) are installed in a system folder, such as ``/usr/lib64``, the application may fail to link due to the order in which the linker searches for libraries.  \n\n**Risk:** The issue does not affect the program execution.\n\n**Solution:** Use the ``-L`` linker option to specify the correct location of oneTBB library. \n\n``fork()`` Support \n^^^^^^^^^^^^^^^^^^^\n\n**Limitation:** oneTBB does not support ``fork()``. \n\n**Solution:** To work-around the issue, consider using ``task_scheduler_handle`` to join oneTBB worker threads before using ``fork()``.\n\nDynamic Malloc Replacement and Topology API Incompatibilities\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n**Limitation:** On Linux* OS, using dynamic malloc replacement with ``tbb::info`` and ``tbb::task_arena::constraints`` APIs may result in runtime failures.\n\n**Solution:** Set ``TBB_ENABLE_SANITIZERS=1`` in the environment. This informs that dynamic malloc replacement is used.\n"
  },
  {
    "path": "third-party/tbb/doc/main/intro/notation.rst",
    "content": ".. _notation:\n\nNotational Conventions\n======================\n\n\nThe following conventions may be used in this document.\n\n\n.. container:: tablenoborder\n\n\n   .. list-table:: \n      :header-rows: 1\n\n      * -     Convention     \n        -     Explanation     \n        -     Example     \n      * -     \\ *Italic*     \n        -     Used for introducing new terms, denotation of terms,    placeholders, or titles of manuals.    \n        -     The filename consists of the *basename* and the *extension*.     \n      * -     \\ ``Monospace``     \n        -     Indicates directory paths and filenames, commands and    command line        options, function names, methods,   classes, data structures in body text, source code.    \n        -     \\ ``ippsapi.h``        \\ ``\\alt\\include``           Use the okCreateObjs() function to...          \\ ``printf(\"hello, world\\n\");``    \n      * -     [ ]     \n        -     Items enclosed in brackets are optional.     \n        -     Fa[c]        Indicates Fa or Fac.     \n      * -     { \\| }     \n        -     Braces and vertical bars indicate the choice of one item    from a selection of two or more items.    \n        -     X{K \\| W \\| P}        Indicates XK, XW, or XP.       \n      * -     \"[\" \"]\" \"{\"    | \" }\" \"|\"    \n        -     Writing a metacharacter in quotation marks negates the      syntactical meaning stated above;   | the character is taken as a literal.    \n        -     \"[\" X \"]\" [ Y ]        Denotes the letter X    enclosed in brackets, optionally followed by the letter Y.    \n      * -     ...     \n        -     The ellipsis indicates that the previous item can be    repeated several times.    \n        -     \\ ``filename`` ...        Indicates that one or    more filenames can be specified.    \n      * -     ,...     \n        -     The ellipsis preceded by a comma indicates that the      previous item can be repeated several times,   | separated by commas.    \n        -     \\ ``word`` ,...        Indicates that one or    more words can be specified. If more than one word is specified, the   words are comma-separated.    \n\n\n\n\n.. container:: section\n\n\n   Class members are summarized by informal class declarations that\n   describe the class as it seems to clients, not how it is actually\n   implemented. For example, here is an informal declaration of class\n   ``Foo``:\n\n\n   ::\n\n\n      class Foo {\n      public:\n          int x();\n          int y;\n          ~Foo();\n      };\n\n\n   The actual implementation might look like:\n\n\n   ::\n\n\n      namespace internal {\n          class FooBase  {\n          protected:\n              int x();\n          };\n\n\n          class Foo_v3: protected FooBase {\n          private:\n              int internal_stuff;\n          public:\n              using FooBase::x;\n              int y;\n          };\n      }\n\n\n      typedef internal::Foo_v3 Foo;\n\n\n   The example shows two cases where the actual implementation departs\n   from the informal declaration:\n\n\n   -  ``Foo`` is actually a typedef to ``Foo_v3``.\n\n\n   -  Method ``x()`` is inherited from a protected base class.\n\n\n   -  The destructor is an implicit method generated by the compiler.\n\n\n   The informal declarations are intended to show you what you need to\n   know to use the class without the distraction of irrelevant clutter\n   particular to the implementation.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/intro/testing_approach.rst",
    "content": ".. _testing_approach:\n\nTesting Approach \n================\n\nThere are four main types of errors/hazards you can encounter in the development of libraries for parallelism:\n\n* Interface correspondence to specification\n* Memory errors\n* Data race\n* Race conditions and deadlocks\n\n|short_name| testing approach is designed to provide high coverage of these error types. \nAll types of errors are covered with unit testing and review.\n\nCode coverage metrics are tracked to ensure high code coverage with tests. Uncovered branches are analyzed manually.\nMemory errors and data races are additionally covered by special tools that include thread and memory sanitizers.\n\nRace conditions and deadlocks are the most complicated errors.\nThey are covered by:\n\n* **Unit tests** that, however, have limited capability to catch such errors\n* **Integration tests**. Multiple different functionalities are heavily combined to emulate user use cases that may trigger such errors based on prior knowledge and expertise. \n* **Stress testing with different possible combinations**. It ensures that even rarely triggered error conditions are caught by testing.\n\n.. note:: Every fix is required to be covered by a test to guarantee the detection of such issues in the future.\n\nContinuous Integration triggers all the tests on each commit. This ensures that:\n\n* Issues are detected, starting from the early development phase and up to the moment of integration of changes into the library.\n* The highest quality of the library is maintained even in such error-prone domains as parallelism.\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/blocked_nd_range_ctad.rst",
    "content": ".. _blocked_nd_range_ctad:\n\nDeduction Guides for ``blocked_nd_range``\n=========================================\n\n.. note::\n    To enable this feature, define the ``TBB_PREVIEW_BLOCKED_ND_RANGE_DEDUCTION_GUIDES`` macro to 1.\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\nThe ``blocked_nd_range`` class represents a recursively divisible N-dimensional half-open interval for the oneTBB\nparallel algorithms. This feature extends ``blocked_nd_range`` to support Class Template Argument\nDeduction (starting from C++17). With that, you do not need to specify template arguments explicitly\nwhile creating a ``blocked_nd_range`` object if they can be inferred from the constructor arguments:\n\n.. literalinclude:: ./examples/blocked_nd_range_ctad_example.cpp\n    :language: c++\n    :start-after: /*begin_blocked_nd_range_ctad_example_1*/\n    :end-before: /*end_blocked_nd_range_ctad_example_1*/\n\n.. note::\n    For more detailed description of the implementation of this feature or to leave comments or feedback on the API, please\n    refer to the [corresponding RFC](https://github.com/uxlfoundation/oneTBB/tree/master/rfcs/experimental/blocked_nd_range_ctad).\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n    \n    #include <oneapi/tbb/blocked_nd_range.h>\n\nSynopsis\n--------\n\n.. code:: cpp\n\n    namespace oneapi {\n    namespace tbb {\n\n        template <typename Value, unsigned int N>\n        class blocked_nd_range {\n        public:\n            // Member types and constructors defined as part of oneTBB specification\n            using value_type = Value;\n            using dim_range_type = blocked_range<value_type>;\n            using size_type = typename dim_range_type::size_type;\n\n            blocked_nd_range(const dim_range_type& dim0, /*exactly N arguments of type const dim_range_type&*/); // [1]\n            blocked_nd_range(const value_type (&dim_size)[N], size_type grainsize = 1);                          // [2]\n            blocked_nd_range(blocked_nd_range& r, split);                                                        // [3]\n            blocked_nd_range(blocked_nd_range& r, proportional_split);                                           // [4]\n        }; // class blocked_nd_range\n\n        // Explicit deduction guides\n        template <typename Value, typename... Values>\n        blocked_nd_range(blocked_range<Value>, blocked_range<Values>...)\n        -> blocked_nd_range<Value, 1 + sizeof...(Values)>;\n\n        template <typename Value, unsigned int... Ns>\n        blocked_nd_range(const Value (&...)[Ns])\n        -> blocked_nd_range<Value, sizeof...(Ns)>;\n\n        template <typename Value, unsigned int N>\n        blocked_nd_range(const Value (&)[N], typename blocked_nd_range<Value, N>::size_type = 1)\n        -> blocked_nd_range<Value, N>;\n\n        template <typename Value, unsigned int N>\n        blocked_nd_range(blocked_nd_range<Value, N>, split)\n        -> blocked_nd_range<Value, N>;\n\n        template <typename Value, unsigned int N>\n        blocked_nd_range(blocked_nd_range<Value, N>, proportional_split)\n        -> blocked_nd_range<Value, N>;\n    } // namespace tbb\n    } // namespace oneapi\n\nDeduction Guides\n----------------\n\nThe copy and move constructors of ``blocked_nd_range`` provide implicitly generated deduction guides. \nIn addition, the following explicit deduction guides are provided:\n\n.. code:: cpp\n\n    template <typename Value, typename... Values>\n    blocked_nd_range(blocked_range<Value>, blocked_range<Values>...)\n    -> blocked_nd_range<Value, 1 + sizeof...(Values)>;\n\n**Effects**: Enables deduction when a set of ``blocked_range`` objects is passed to the ``blocked_nd_range`` constructor ``[1]``.\n\n**Constraints**: Participates in overload resolution only if all of the types in `Values` are same as `Value`.\n\n.. code:: cpp\n\n    template <typename Value, unsigned int... Ns>\n    blocked_nd_range(const Value (&...)[Ns])\n    -> blocked_nd_range<Value, sizeof...(Ns)>;\n\n**Effects**: Enables deduction when a set of ``blocked_range`` objects is provided as braced-init-lists \nto the ``blocked_nd_range`` constructor ``[1]``.\n\n**Constraints**: Participates in overload resolution only if ``sizeof...(Ns) >= 2``, and each integer ``Ni`` in ``Ns``\nis either ``2`` or ``3``, corresponding to ``blocked_range`` constructors with 2 and 3 arguments, respectively.\n\n.. note:: \n    The guide allows a deduction only from braced-init-lists containing objects of the same type. \n    For ranges with non-integral ``value_type``, setting an explicit grainsize argument\n    is not supported by the deduction guides and requires specifying explicit template arguments.\n\n.. code:: cpp\n\n    template <typename Value, unsigned int N>\n    blocked_nd_range(const Value (&)[N], typename blocked_nd_range<Value, N>::size_type = 1)\n    -> blocked_nd_range<Value, N>;\n\n**Effects**: Allows deduction from a single C array object indicating a set of dimension sizes to constructor \n``2`` of ``blocked_nd_range``.\n\n.. code:: cpp\n\n    template <typename Value, unsigned int N>\n    blocked_nd_range(blocked_nd_range<Value, N>, split)\n    -> blocked_nd_range<Value, N>;\n\n**Effects**: Allows deduction while using the splitting constructor ``3`` of ``blocked_nd_range``.\n\n.. code:: cpp\n\n    template <typename Value, unsigned int N>\n    blocked_nd_range(blocked_nd_range<Value, N>, proportional_split)\n    -> blocked_nd_range<Value, N>;\n\n**Effects**: Allows deduction while using the proportional splitting constructor ``4`` of ``blocked_nd_range``.\n\nExample\n-------\n\n.. literalinclude:: ./examples/blocked_nd_range_ctad_example.cpp\n    :language: c++\n    :start-after: /*begin_blocked_nd_range_ctad_example_2*/\n    :end-before: /*end_blocked_nd_range_ctad_example_2*/\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/blocking_terminate.rst",
    "content": ".. _task_scheduler_handle_reference:\n\ntask_scheduler_handle Class\n===========================\n\n.. note::\n    To enable this feature, set the ``TBB_PREVIEW_WAITING_FOR_WORKERS`` macro to 1.\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\nThe ``oneapi::tbb::task_scheduler_handle`` class and the ``oneapi::tbb::finalize`` function allow to wait for completion of worker threads.\n\nWhen the ``oneapi::tbb::finalize`` function is called with an ``oneapi::tbb::task_scheduler_handle`` instance, it blocks the calling\nthread until the completion of all worker threads that were implicitly created by the library.\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n    #include <oneapi/tbb/global_control.h>\n\nSynopsis\n--------\n\n.. code:: cpp\n\n    namespace oneapi {\n        namespace tbb {\n\n            class task_scheduler_handle {\n            public:\n                task_scheduler_handle() = default;\n                ~task_scheduler_handle();\n\n                task_scheduler_handle(const task_scheduler_handle& other) = delete;\n                task_scheduler_handle(task_scheduler_handle&& other) noexcept;\n                task_scheduler_handle& operator=(const task_scheduler_handle& other) = delete;\n                task_scheduler_handle& operator=(task_scheduler_handle&& other) noexcept;\n\n                explicit operator bool() const noexcept;\n\n                static task_scheduler_handle get();\n\n                static void release(task_scheduler_handle& handle);\n            };\n\n            void finalize(task_scheduler_handle& handle);\n            bool finalize(task_scheduler_handle& handle, const std::nothrow_t&) noexcept;\n\n        } // namespace tbb\n    } // namespace oneapi\n\nMember Functions\n----------------\n\n.. cpp:function:: task_scheduler_handle()\n\n    **Effects**: Creates an instance of the ``task_scheduler_handle`` class that does not contain any reference to the task scheduler.\n\n-------------------------------------------------------\n\n.. cpp:function:: ~task_scheduler_handle()\n\n    **Effects**: Destroys an instance of the ``task_scheduler_handle`` class.\n    Releases a reference to the task scheduler and deactivates an instance of the ``task_scheduler_handle`` class.\n\n-------------------------------------------------------\n\n.. cpp:function:: task_scheduler_handle(task_scheduler_handle&& other) noexcept\n\n    **Effects**: Creates an instance of the ``task_scheduler_handle`` class that references the task scheduler referenced by ``other``. In turn, ``other`` releases its reference to the task scheduler.\n\n-------------------------------------------------------\n\n.. cpp:function:: task_scheduler_handle& operator=(task_scheduler_handle&& other) noexcept\n\n    **Effects**: Releases a reference to the task scheduler referenced by ``this``. Adds a reference to the task scheduler referenced by ``other``.\nIn turn, ``other`` releases its reference to the task scheduler.\n\n-------------------------------------------------------\n\n.. cpp:function:: explicit operator bool() const noexcept\n\n    **Returns**: ``true`` if ``this`` references any task scheduler; ``false`` otherwise.\n\n-------------------------------------------------------\n\n.. cpp:function:: task_scheduler_handle get()\n\n    **Returns**: An instance of the ``task_scheduler_handle`` class that holds a reference to the task scheduler preventing\n    its premature destruction.\n\n-------------------------------------------------------\n\n.. cpp:function:: void release(task_scheduler_handle& handle)\n\n    **Effects**: Releases a reference to the task scheduler and deactivates an instance of the ``task_scheduler_handle``\n    class. Non-blocking method.\n\nNon-member Functions\n--------------------\n\n.. cpp:function:: void finalize(task_scheduler_handle& handle)\n\n    **Effects**: Blocks the program execution until all worker threads have been completed. Throws the ``oneapi::tbb::unsafe_wait``\n    exception if it is not safe to wait for the completion of the worker threads.\n\nThe following conditions should be met for finalization to succeed:\n\n- No active (not yet terminated) instances of class ``task_arena`` exist in the whole program;\n- ``task_scheduler_handle::release`` is called for each other active instance of class ``task_scheduler_handle``, possibly by different application threads.\n\nUnder these conditions, it is guaranteed that at least one ``finalize`` call succeeds,\nat which point all worker threads have been completed.\nIf calls are performed simultaneously, more than one call might succeed.\n\n.. note::\n\n    If you know how many active ``task_scheduler_handle`` instances exist in the program,\n    it is necessary to ``release`` all but the last one, then call ``finalize`` for\n    the last instance.\n\n.. caution::\n\n  The method always fails if called within a task, a parallel algorithm, or a flow graph node.\n\n-------------------------------------------------------\n\n.. cpp:function:: bool finalize(task_scheduler_handle& handle, const std::nothrow_t&) noexcept\n\n    **Effects**: Blocks the program execution until all worker threads have been completed. Same as above, but returns ``true`` if all worker\n    threads have been completed successfully, or ``false`` if it is not safe to wait for the completion of the worker threads.\n\nExamples\n********\n\n.. code:: cpp\n\n    #define TBB_PREVIEW_WAITING_FOR_WORKERS 1\n    #include <oneapi/tbb/global_control.h>\n    #include <oneapi/tbb/parallel_for.h>\n\n    #include <iostream>\n\n    int main() {\n        oneapi::tbb::task_scheduler_handle handle = oneapi::tbb::task_scheduler_handle::get();\n        // Do some parallel work here, e.g.\n        oneapi::tbb::parallel_for(0, 10000, [](int){});\n        try {\n            oneapi::tbb::finalize(handle);\n            // oneTBB worker threads are terminated at this point.\n        } catch (const oneapi::tbb::unsafe_wait&) {\n            std::cerr << \"Failed to terminate the worker threads.\" << std::endl;\n        }\n        return 0;\n    }\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/concurrent_lru_cache_cls.rst",
    "content": ".. _concurrent_lru_cache:\n\nconcurrent_lru_cache\n====================\n\n.. note::\n   To enable this feature, define the ``TBB_PREVIEW_CONCURRENT_LRU_CACHE`` macro to 1.\n\nA Class Template for Least Recently Used cache with concurrent operations.\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\nA ``concurrent_lru_cache`` container maps keys to values with the ability\nto limit the number of stored unused values. For each key, there is at most one item\nstored in the container.\n\nThe container permits multiple threads to concurrently retrieve items from it.\n\nThe container tracks which items are in use by returning a proxy\n``concurrent_lru_cache::handle`` object that refers to an item instead of its value.\nOnce there are no ``handle`` objects holding reference to an item, it is considered unused.\n\nThe container stores all the items that are currently in use plus a limited\nnumber of unused items. Excessive unused items are erased according to\nleast recently used policy.\n\nWhen no item is found for a given key, the container calls the user-specified\n``value_function_type`` object to construct a value for the key, and stores that value.\nThe ``value_function_type`` object must be thread-safe.\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n    #include \"oneapi/tbb/concurrent_lru_cache.h\"\n\nSynopsis\n--------\n\n.. code:: cpp\n\n    namespace oneapi {\n        namespace tbb {\n            template <typename Key, typename Value, typename ValueFunctionType = Value (*)(Key)>\n            class concurrent_lru_cache {\n            public:\n                using key_type = Key;\n                using value_type = Value;\n                using pointer = value_type*;\n                using const_pointer = const value_type*;\n                using reference = value_type&;\n                using const_reference = const value_type&;\n\n                using value_function_type = ValueFunctionType;\n\n                class handle {\n                public:\n                    handle();\n                    handle( handle&& other );\n\n                    ~handle();\n\n                    handle& operator=( handle&& other );\n\n                    operator bool() const;\n                    value_type& value();\n                }; // class handle\n\n                concurrent_lru_cache( value_function_type f, std::size_t number_of_lru_history_items );\n                ~concurrent_lru_cache();\n\n                handle operator[]( key_type key );\n            }; // class concurrent_lru_cache\n        } // namespace tbb\n    } // namespace oneapi\n\nMember Functions\n----------------\n\n.. cpp:function:: concurrent_lru_cache( value_function_type f, std::size_t number_of_lru_history_items );\n\n    **Effects**: Constructs an empty cache that can keep up to ``number_of_lru_history_items``\n    unused values, with a function object ``f`` for constructing new values.\n\n-------------------------------------------------------\n\n.. cpp:function:: ~concurrent_lru_cache();\n\n    **Effects**: Destroys the ``concurrent_lru_cache``. Calls the destructors of the stored elements and\n    deallocates the used storage.\n\nThe behavior is undefined in case of concurrent operations with ``*this``.\n\n-------------------------------------------------------\n\n.. cpp:function:: handle operator[]( key_type k );\n\n    **Effects**: Searches the container for an item that corresponds to the given key.\n    If such an item is not found, the user-specified function object is called to\n    construct a value that is inserted into the container.\n\n    **Returns**: a ``handle`` object holding reference to the matching value.\n\nMember Objects\n--------------\n\n``handle`` class\n^^^^^^^^^^^^^^^^\n\n**Member Functions**\n\n.. cpp:function:: handle();\n\n    **Effects**: Constructs a ``handle`` object that does not refer to any value.\n\n--------------------------------------------------\n\n.. cpp:function:: handle( handle&& other );\n\n    **Effects**: Transfers the reference to the value stored in ``concurrent_lru_cache``\n    from ``other`` to the newly constructed object. Upon completion,\n    ``other`` no longer refers to any value.\n\n---------------------------------------------------\n\n.. cpp:function:: ~handle();\n\n    **Effects**: Releases the reference (if it exists) to a value stored in ``concurrent_lru_cache``.\n\nThe behavior is undefined for concurrent operations with ``*this``.\n\n---------------------------------------------------\n\n.. cpp:function:: handle& operator=( handle&& other );\n\n    **Effects**: Transfers the reference to a value stored in ``concurrent_lru_cache`` from ``other``\n    to ``*this``. If existed, the previous reference held by ``*this`` is released. Upon\n    completion ``other`` no longer refers to any value.\n\n    **Returns**: a reference to ``*this``.\n\n---------------------------------------------------\n\n.. cpp:function:: operator bool() const;\n\n    **Returns**: ``true`` if ``*this`` holds reference to a value, ``false`` otherwise.\n\n---------------------------------------------------\n\n.. cpp:function:: value_type& value();\n\n    **Returns**: a reference to a ``value_type`` object stored in ``concurrent_lru_cache``.\n\nThe behavior is undefined if ``*this`` does not refer to any value.\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/constraints_extensions.rst",
    "content": ".. _constraints_extensions:\n\ntask_arena::constraints extensions\n======================================\n\n.. note::\n    To enable this feature, set the ``TBB_PREVIEW_TASK_ARENA_CONSTRAINTS_EXTENSION`` macro to 1.\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\nThese extensions allow to customize ``tbb::task_arena::constraints`` with the following properties:\n\n* On machines with Intel® Hybrid Technology set the preferred core type for threads working within the task arena.\n* Limit the maximum number of threads that can be scheduled to one core simultaneously.\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n    #include <oneapi/tbb/task_arena.h>\n\nSynopsis\n--------\n\n.. code:: cpp\n\n    namespace oneapi {\n        namespace tbb {\n\n            class task_arena {\n            public:\n                struct constraints {\n                    constraints& set_numa_id(numa_node_id id);\n                    constraints& set_max_concurrency(int maximal_concurrency);\n                    constraints& set_core_type(core_type_id id);\n                    constraints& set_max_threads_per_core(int threads_number);\n\n                    numa_node_id numa_id = task_arena::automatic;\n                    int max_concurrency = task_arena::automatic;\n                    core_type_id core_type = task_arena::automatic;\n                    int max_threads_per_core = task_arena::automatic;\n                }; // struct constraints\n            }; // class task_arena\n\n        } // namespace tbb\n    } // namespace oneapi\n\nMember Functions\n----------------\n\n.. cpp:function:: constraints& set_numa_id(numa_node_id id)\n\n    Sets the ``numa_id`` field to the ``id``.\n\n    **Returns:** Reference to ``*this``.\n\n.. cpp:function:: constraints& set_max_concurrency(int maximal_concurrency)\n\n    Sets the ``max_concurrency`` field to the ``maximal_concurrency``.\n\n    **Returns:** Reference to ``*this``.\n\n.. cpp:function:: constraints& set_core_type(core_type_id id)\n\n    Sets the ``core_type`` field to the ``id``.\n\n    **Returns:** Reference to ``*this``.\n\n.. cpp:function:: constraints& set_max_threads_per_core(int threads_number)\n\n    Sets the ``max_threads_per_core`` field to the ``threads_number``.\n\n    **Returns:** Reference to ``*this``.\n\nMember Objects\n--------------\n\n.. cpp:member:: numa_node_id numa_id\n\n    An integral logical index uniquely identifying a NUMA node. All threads joining the\n    ``task_arena`` are bound to this NUMA node.\n\n    .. note::\n\n        To obtain a valid NUMA node ID, call ``oneapi::tbb::info::numa_nodes()``.\n\n.. cpp:member:: int max_concurrency\n\n    The maximum number of threads that can participate in work processing within the\n    ``task_arena`` at the same time.\n\n\n.. cpp:member:: core_type_id core_type\n\n    An integral logical index uniquely identifying a core type. All threads joining the\n    ``task_arena`` are bound to this core type.\n\n    .. note::\n\n        To obtain a valid core type node ID, call ``oneapi::tbb::info::core_types()``.\n\n.. cpp:member:: int max_threads_per_core\n\n    The maximum number of threads that can be scheduled to one core simultaneously.\n\nSee also:\n\n* :doc:`oneapi::tbb::info namespace preview extensions <info_namespace_extensions>`\n* `oneapi::tbb::task_arena specification <https://spec.oneapi.com/versions/latest/elements/oneTBB/source/task_scheduler/task_arena/task_arena_cls.html>`_\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/constructors_for_nodes.rst",
    "content": ".. _constructors_for_fg_nodes:\n\nConstructors for Flow Graph nodes\n=================================\n\n.. note::\n   To enable this feature, define the ``TBB_PREVIEW_FLOW_GRAPH_FEATURES`` macro to 1.\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\nThe \"Helper Functions for Expressing Graphs\" feature adds a set of new constructors\nthat can be used to construct a node that ``follows`` or ``precedes`` a set of nodes.\n\nWhere possible, the constructors support Class Template Argument Deduction (since C++17).\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n    #include <oneapi/tbb/flow_graph.h>\n\nSyntax\n------\n\n.. code:: cpp\n\n    // continue_node\n    continue_node(follows(...), Body body, Policy = Policy());\n    continue_node(precedes(...), Body body, Policy = Policy());\n\n    continue_node(follows(...), int number_of_predecessors, Body body, Policy = Policy());\n    continue_node(precedes(...), int number_of_predecessors, Body body, Policy = Policy());\n\n    // function_node\n    function_node(follows(...), std::size_t concurrency, Policy = Policy());\n    function_node(precedes(...), std::size_t concurrency, Policy = Policy());\n\n    // input_node\n    input_node(precedes(...), body);\n\n    // multifunction_node\n    multifunction_node(follows(...), std::size_t concurrency, Body body);\n    multifunction_node(precedes(...), std::size_t concurrency, Body body);\n\n    // async_node\n    async_node(follows(...), std::size_t concurrency, Body body);\n    async_node(precedes(...), std::size_t concurrency, Body body);\n\n    // overwrite_node\n    explicit overwrite_node(follows(...));\n    explicit overwrite_node(precedes(...));\n\n    // write_once_node\n    explicit write_once_node(follows(...));\n    explicit write_once_node(precedes(...));\n\n    // buffer_node\n    explicit buffer_node(follows(...));\n    explicit buffer_node(precedes(...));\n\n    // queue_node\n    explicit queue_node(follows(...));\n    explicit queue_node(precedes(...));\n\n    // priority_queue_node\n    explicit priority_queue_node(follows(...), const Compare& comp = Compare());\n    explicit priority_queue_node(precedes(...), const Compare& compare = Compare());\n\n    // sequencer_node\n    sequencer_node(follows(...), const Sequencer& s);\n    sequencer_node(precedes(...), const Sequencer& s);\n\n    // limiter_node\n    limiter_node(follows(...), std::size_t threshold);\n    limiter_node(precedes(...), std::size_t threshold);\n\n    // broadcast_node\n    explicit broadcast_node(follows(...));\n    explicit broadcast_node(precedes(...));\n\n    // join_node\n    explicit join_node(follows(...), Policy = Policy());\n    explicit join_node(precedes(...), Policy = Policy());\n\n    // split_node\n    explicit split_node(follows(...));\n    explicit split_node(precedes(...));\n\n    // indexer_node\n    indexer_node(follows(...));\n    indexer_node(precedes(...));\n\nSee Also\n********\n:ref:`follows_precedes`\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/custom_mutex_chmap.rst",
    "content": ".. _custom_mutex_chmap:\n\nThe customizing mutex type for ``concurrent_hash_map``\n======================================================\n\n.. note::\n    To enable this feature, define the ``TBB_PREVIEW_CONCURRENT_HASH_MAP_EXTENSIONS`` macro to 1.\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\noneTBB ``concurrnent_hash_map`` class uses reader-writer mutex\nto provide thread safety and avoid data races for insert, lookup, and erasure operations. This feature adds an extra template parameter\nfor ``concurrent_hash_map`` that allows to customize the type of the reader-writer mutex.\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n    #include <oneapi/tbb/concurrent_hash_map.h>\n\nSynopsis\n--------\n\n.. code:: cpp\n\n    namespace oneapi {\n    namespace tbb {\n\n        template <typename Key, typename T,\n                typename HashCompare = tbb_hash_compare<Key>,\n                typename Allocator = tbb_allocator<std::pair<const Key, T>>,\n                typename Mutex = spin_rw_mutex>\n        class concurrent_hash_map {\n            using mutex_type = Mutex;\n        };\n\n    } // namespace tbb\n    } // namespace oneapi\n\nType requirements\n-----------------\n\nThe type of the mutex passed as a template argument for ``concurrent_hash_map`` should\nmeet the requirements of `ReaderWriterMutex <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/named_requirements/mutexes/rw_mutex>`_.\nIt should also provide the following API:\n\n.. cpp:function:: bool ReaderWriterMutex::scoped_lock::is_writer() const;\n\n**Returns**: ``true`` if the ``scoped_lock`` object acquires the mutex as a writer, ``false`` otherwise.\n\nThe behavior is undefined if the ``scoped_lock`` object does not acquire the mutex.\n\n``oneapi::tbb::spin_rw_mutex``, ``oneapi::tbb::speculative_spin_rw_mutex``, ``oneapi::tbb::queuing_rw_mutex``, ``oneapi::tbb::null_rw_mutex``,\nand ``oneapi::tbb::rw_mutex`` meet the requirements above.\n\n.. rubric:: Example\n\nThe example below demonstrates how to wrap ``std::shared_mutex`` (C++17) to meet the requirements\nof `ReaderWriterMutex` and how to customize ``concurrent_hash_map`` to use this mutex.\n\n.. literalinclude:: ./examples/custom_mutex_chmap_example.cpp\n    :language: c++\n    :start-after: /*begin_custom_mutex_chmap_example*/\n    :end-before: /*end_custom_mutex_chmap_example*/\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/examples/blocked_nd_range_ctad_example.cpp",
    "content": "/*\n    Copyright (c) 2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __cplusplus >= 201703L\n\n#define TBB_PREVIEW_BLOCKED_ND_RANGE_DEDUCTION_GUIDES 1\n#include <oneapi/tbb/blocked_nd_range.h>\n\nint main() {\n    {\n        /*begin_blocked_nd_range_ctad_example_1*/\n        oneapi::tbb::blocked_range<int> range1(0, 100);\n        oneapi::tbb::blocked_range<int> range2(0, 200);\n        oneapi::tbb::blocked_range<int> range3(0, 300);\n\n        // Since 3 unidimensional ranges of type int are provided, the type of nd_range\n        // can be deduced as oneapi::tbb::blocked_nd_range<int, 3>\n        oneapi::tbb::blocked_nd_range nd_range(range1, range2, range3);\n        /*end_blocked_nd_range_ctad_example_1*/\n    }\n    /*begin_blocked_nd_range_ctad_example_2*/\n    {\n        oneapi::tbb::blocked_range<int> range1(0, 100);\n        oneapi::tbb::blocked_range<int> range2(0, 200);\n\n        // Deduced as blocked_nd_range<int, 2>\n        oneapi::tbb::blocked_nd_range nd_range(range1, range2);\n    }\n    {\n        // Deduced as blocked_nd_range<int, 2>\n        oneapi::tbb::blocked_nd_range nd_range({0, 100}, {0, 200, 5});\n    }\n    {\n        int endings[3] = {100, 200, 300};\n\n        // Deduced as blocked_nd_range<int, 3>\n        oneapi::tbb::blocked_nd_range nd_range1(endings);\n\n        // Deduced as blocked_nd_range<int, 3>\n        oneapi::tbb::blocked_nd_range nd_range2({100, 200, 300}, /*grainsize = */10);\n    }\n    /*end_blocked_nd_range_ctad_example_2*/\n}\n\n#else \n// Skip\nint main() {}\n#endif\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/examples/custom_mutex_chmap_example.cpp",
    "content": "/*\n    Copyright (c) 2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __cplusplus >= 201703L\n\n/*begin_custom_mutex_chmap_example*/\n#define TBB_PREVIEW_CONCURRENT_HASH_MAP_EXTENSIONS 1\n#include \"oneapi/tbb/concurrent_hash_map.h\"\n#include <shared_mutex>\n\nclass SharedMutexWrapper {\npublic:\n    // ReaderWriterMutex requirements\n\n    static constexpr bool is_rw_mutex = true;\n    static constexpr bool is_recursive_mutex = false;\n    static constexpr bool is_fair_mutex = false;\n\n    class scoped_lock {\n    public:\n        scoped_lock() : my_mutex_ptr(nullptr), my_writer_flag(false) {}\n        scoped_lock(SharedMutexWrapper& mutex, bool write = true)\n            : my_mutex_ptr(&mutex), my_writer_flag(write)\n        {\n            if (my_writer_flag) {\n                my_mutex_ptr->my_mutex.lock();\n            } else {\n                my_mutex_ptr->my_mutex.lock_shared();\n            }\n        }\n\n        ~scoped_lock() {\n            if (my_mutex_ptr) release();\n        }\n\n        void acquire(SharedMutexWrapper& mutex, bool write = true) {\n            if (my_mutex_ptr) release();\n\n            my_mutex_ptr = &mutex;\n            my_writer_flag = write;\n\n            if (my_writer_flag) {\n                my_mutex_ptr->my_mutex.lock();\n            } else {\n                my_mutex_ptr->my_mutex.lock_shared();\n            }\n        }\n\n        bool try_acquire(SharedMutexWrapper& mutex, bool write = true) {\n            if (my_mutex_ptr) release();\n\n            my_mutex_ptr = &mutex;\n\n            bool result = false;\n\n            if (my_writer_flag) {\n                result = my_mutex_ptr->my_mutex.try_lock();\n            } else {\n                result = my_mutex_ptr->my_mutex.try_lock_shared();\n            }\n\n            if (result) my_writer_flag = write;\n            return result;\n        }\n\n        void release() {\n            if (my_writer_flag) {\n                my_mutex_ptr->my_mutex.unlock();\n            } else {\n                my_mutex_ptr->my_mutex.unlock_shared();\n            }\n        }\n\n        bool upgrade_to_writer() {\n            // std::shared_mutex does not have the upgrade/downgrade semantics\n            if (my_writer_flag) return true; // Already a writer\n\n            my_mutex_ptr->my_mutex.unlock_shared();\n            my_mutex_ptr->my_mutex.lock();\n            return false; // The lock was reacquired\n        }\n\n        bool downgrade_to_reader() {\n            if (!my_writer_flag) return true; // Already a reader\n\n            my_mutex_ptr->my_mutex.unlock();\n            my_mutex_ptr->my_mutex.lock_shared();\n            return false;\n        }\n\n        bool is_writer() const {\n            return my_writer_flag;\n        }\n\n    private:\n        SharedMutexWrapper* my_mutex_ptr;\n        bool                my_writer_flag;\n    };\nprivate:\n    std::shared_mutex my_mutex;\n}; // struct SharedMutexWrapper\n\nint main() {\n    using map_type = oneapi::tbb::concurrent_hash_map<int, int,\n                                                      oneapi::tbb::tbb_hash_compare<int>,\n                                                      oneapi::tbb::tbb_allocator<std::pair<const int, int>>,\n                                                      SharedMutexWrapper>;\n\n    map_type map; // This object will use SharedMutexWrapper for thread safety of insert/find/erase operations\n}\n/*end_custom_mutex_chmap_example*/\n\n#else // C++17\n// Skip\nint main() {}\n#endif\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/examples/fixed_pool_example.cpp",
    "content": "/*\n    Copyright (c) 2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*begin_fixed_pool_example*/\n#define TBB_PREVIEW_MEMORY_POOL 1\n#include \"oneapi/tbb/memory_pool.h\"\n\nint main() {\n    char buf[1024];\n    oneapi::tbb::fixed_pool my_pool(buf, 1024);\n\n    void* my_ptr = my_pool.malloc(10);\n    my_pool.free(my_ptr);\n}\n/*end_fixed_pool_example*/\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/examples/helpers_for_expressing_graphs_preview_api_example.cpp",
    "content": "/*\n    Copyright (c) 2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __cplusplus >= 201703L\n\n/*begin_helpers_for_expressing_graphs_preview_api_example*/\n#define TBB_PREVIEW_FLOW_GRAPH_FEATURES 1\n#include <oneapi/tbb/flow_graph.h>\n\nint main() {\n    using namespace oneapi::tbb::flow;\n\n    graph g;\n\n    function_node doubler(g, unlimited, [](const int& v) { return 2 * v; });\n    function_node squarer(g, unlimited, [](const int& v) { return v * v; });\n    function_node cuber(g, unlimited, [](const int& v) { return v * v * v; });\n\n    auto handlers = make_node_set(doubler, squarer, cuber);\n\n    broadcast_node input(precedes(handlers));\n    join_node join(follows(handlers));\n\n    int sum = 0;\n    function_node summer(follows(join), serial,\n                            [&](const std::tuple<int, int, int>& v) {\n                                int sub_sum = std::get<0>(v) + std::get<1>(v) + std::get<2>(v);\n                                sum += sub_sum;\n                                return sub_sum;\n                            });\n\n    for (int i = 1; i <= 10; ++i) {\n        input.try_put(i);\n    }\n    g.wait_for_all();\n}\n/*end_helpers_for_expressing_graphs_preview_api_example*/\n#else\n// Skip\nint main() {}\n#endif\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/examples/helpers_for_expressing_graphs_regular_api_example.cpp",
    "content": "/*\n    Copyright (c) 2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __cplusplus >= 201703L\n\n/*begin_helpers_for_expressing_graphs_regular_api_example*/\n#include <oneapi/tbb/flow_graph.h>\n\nint main() {\n    using namespace oneapi::tbb::flow;\n\n    graph g;\n\n    broadcast_node<int> input(g);\n\n    function_node doubler(g, unlimited, [](const int& v) { return 2 * v; });\n    function_node squarer(g, unlimited, [](const int& v) { return v * v; });\n    function_node cuber(g, unlimited, [](const int& v) { return v * v * v; });\n\n    join_node<std::tuple<int, int, int>> join(g);\n\n    int sum = 0;\n    function_node summer(g, serial, [&](const std::tuple<int, int, int>& v) {\n        int sub_sum = std::get<0>(v) + std::get<1>(v) + std::get<2>(v);\n        sum += sub_sum;\n        return sub_sum;\n    });\n\n    make_edge(input, doubler);\n    make_edge(input, squarer);\n    make_edge(input, cuber);\n    make_edge(doubler, std::get<0>(join.input_ports()));\n    make_edge(squarer, std::get<1>(join.input_ports()));\n    make_edge(cuber, std::get<2>(join.input_ports()));\n    make_edge(join, summer);\n\n    for (int i = 1; i <= 10; ++i) {\n        input.try_put(i);\n    }\n    g.wait_for_all();\n}\n/*end_helpers_for_expressing_graphs_regular_api_example*/\n\n#else\n// Skip\nint main() {}\n#endif\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/examples/make_edges_function_example.cpp",
    "content": "/*\n    Copyright (c) 2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __cplusplus >= 201703L\n\n/*begin_make_edges_function_example*/\n#define TBB_PREVIEW_FLOW_GRAPH_FEATURES 1\n#include <oneapi/tbb/flow_graph.h>\n\nint main() {\n    using namespace oneapi::tbb::flow;\n\n    graph g;\n    broadcast_node<int> input(g);\n\n    function_node doubler(g, unlimited, [](const int& i) { return 2 * i; });\n    function_node squarer(g, unlimited, [](const int& i) { return i * i; });\n    function_node cuber(g, unlimited, [](const int& i) { return i * i * i; });\n\n    buffer_node<int> buffer(g);\n\n    auto handlers = make_node_set(doubler, squarer, cuber);\n    make_edges(input, handlers);\n    make_edges(handlers, buffer);\n\n    for (int i = 1; i <= 10; ++i) {\n        input.try_put(i);\n    }\n    g.wait_for_all();\n}\n/*end_make_edges_function_example*/\n\n#else\n// Skip\nint main() {}\n#endif\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/examples/malloc_replacement_log_example.cpp",
    "content": "/*\n    Copyright (c) 2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if _WIN32\n\n/*begin_malloc_replacement_log_example*/\n#include \"oneapi/tbb/tbbmalloc_proxy.h\"\n#include <stdio.h>\n\nint main(){\n    char **func_replacement_log;\n    int func_replacement_status = TBB_malloc_replacement_log(&func_replacement_log);\n\n    if (func_replacement_status != 0) {\n        printf(\"tbbmalloc_proxy cannot replace memory allocation routines\\n\");\n        for (char** log_string = func_replacement_log; *log_string != 0; log_string++) {\n            printf(\"%s\\n\",*log_string);\n        }\n    }\n\n    return 0;\n}\n/*end_malloc_replacement_log_example*/\n\n#else\n// Skip\nint main() {}\n#endif\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/examples/memory_pool_allocator_example.cpp",
    "content": "/*\n    Copyright (c) 2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*begin_memory_pool_allocator_example*/\n#define TBB_PREVIEW_MEMORY_POOL 1\n#include \"oneapi/tbb/memory_pool.h\"\n#include <list>\n\nint main() {\n    oneapi::tbb::memory_pool<std::allocator<int>> my_pool;\n\n    typedef oneapi::tbb::memory_pool_allocator<int> pool_allocator_t;\n    std::list<int, pool_allocator_t> my_list(pool_allocator_t{my_pool});\n\n    my_list.emplace_back(1);\n}\n/*end_memory_pool_allocator_example*/\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/examples/memory_pool_example.cpp",
    "content": "/*\n    Copyright (c) 2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*begin_memory_pool_example*/\n#define TBB_PREVIEW_MEMORY_POOL 1\n#include \"oneapi/tbb/memory_pool.h\"\n\nint main() {\n    oneapi::tbb::memory_pool<std::allocator<char>> my_pool;\n\n    void* my_ptr = my_pool.malloc(10);\n    my_pool.free(my_ptr);\n}\n/*end_memory_pool_example*/\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/examples/parallel_phase_example.cpp",
    "content": "/*\n    Copyright (c) 2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*begin_parallel_phase_example*/\n#define TBB_PREVIEW_PARALLEL_PHASE 1\n\n#include \"oneapi/tbb/task_arena.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/parallel_sort.h\"\n\n#include <vector>\n\nint main() {\n    oneapi::tbb::task_arena ta {\n        tbb::task_arena::automatic, /*reserved_for_masters=*/1,\n        tbb::task_arena::priority::normal,\n        tbb::task_arena::leave_policy::fast\n    };\n\n    std::vector<int> data(1000);\n\n    {\n        oneapi::tbb::task_arena::scoped_parallel_phase phase{ta};\n        ta.execute([&data]() {\n            oneapi::tbb::parallel_for(std::size_t(0), data.size(), [&data](std::size_t i) {\n                data[i] = static_cast<int>(i*i);\n            });\n        });\n\n        for (std::size_t i = 1; i < data.size(); ++i) {\n            data[i] += data[i-1];\n        }\n\n        ta.execute([&data]() {\n            oneapi::tbb::parallel_sort(data.begin(), data.end());\n        });\n\n    }\n}\n/*end_parallel_phase_example*/\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/examples/parallel_sort_ranges_extension_example.cpp",
    "content": "/*\n    Copyright (c) 2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __cplusplus >= 202002L\n\n/*begin_parallel_sort_ranges_extension_example*/\n#include <array>\n#include <span> // requires C++20\n#include <oneapi/tbb/parallel_sort.h>\n\nstd::span<int> get_span() {\n    static std::array<int, 3> arr = {3, 2, 1};\n    return std::span<int>(arr);\n}\n\nint main() {\n    tbb::parallel_sort(get_span());\n}\n/*end_parallel_sort_ranges_extension_example*/\n\n#else\n// Skip\nint main() {}\n#endif\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/examples/rvalue_reduce.cpp",
    "content": "/*\n    Copyright (c) 2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __cplusplus >= 201703L\n\n/*begin_rvalue_reduce_example*/\n// C++17\n#include <oneapi/tbb/parallel_reduce.h>\n#include <oneapi/tbb/blocked_range.h>\n#include <vector>\n#include <set>\n\nint main() {\n    std::vector<std::set<int>> sets;\n\n    oneapi::tbb::parallel_reduce(oneapi::tbb::blocked_range<size_t>(0, sets.size()),\n                                    std::set<int>{}, // identity element - empty set\n                                    [&](const oneapi::tbb::blocked_range<size_t>& range, std::set<int>&& value) {\n                                        for (size_t i = range.begin(); i < range.end(); ++i) {\n                                            // Having value as a non-const rvalue reference allows to efficiently\n                                            // transfer nodes from sets[i] without copying/moving the data\n                                            value.merge(std::move(sets[i]));\n                                        }\n                                        return value;\n                                    },\n                                    [&](std::set<int>&& x, std::set<int>&& y) {\n                                        x.merge(std::move(y));\n                                        return x;\n                                    }\n                                    );\n}\n/*end_rvalue_reduce_example*/\n\n#else\n// Skip\nint main() {}\n#endif\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/examples/try_put_and_wait_example.cpp",
    "content": "/*\n    Copyright (c) 2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <tuple>\n\n// dummy bodies\nstruct f1_body {\n    int operator()(int input) { return input; };\n};\n\nstruct f2_body : f1_body {};\nstruct f3_body : f1_body {};\n\nstruct f4_body {\n    int operator()(const std::tuple<int, int>& input) {\n        return 0;\n    }\n};\n\n/*begin_try_put_and_wait_example*/\n#define TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT 1\n#include <oneapi/tbb/flow_graph.h>\n#include <oneapi/tbb/parallel_for.h>\n#include <tuple>\n\nstruct f1_body;\nstruct f2_body;\nstruct f3_body;\nstruct f4_body;\n\nint main() {\n    using namespace oneapi::tbb;\n\n    flow::graph g;\n    flow::broadcast_node<int> start_node(g);\n\n    flow::function_node<int, int> f1(g, flow::unlimited, f1_body{});\n    flow::function_node<int, int> f2(g, flow::unlimited, f2_body{});\n    flow::function_node<int, int> f3(g, flow::unlimited, f3_body{});\n\n    flow::join_node<std::tuple<int, int>> join(g);\n\n    flow::function_node<std::tuple<int, int>, int> f4(g, flow::serial, f4_body{});\n\n    flow::make_edge(start_node, f1);\n    flow::make_edge(f1, f2);\n\n    flow::make_edge(start_node, f3);\n\n    flow::make_edge(f2, flow::input_port<0>(join));\n    flow::make_edge(f3, flow::input_port<1>(join));\n\n    flow::make_edge(join, f4);\n\n    // Submit work into the graph\n    parallel_for(0, 100, [&](int input) {\n        start_node.try_put_and_wait(input);\n\n        // Post processing the result of input\n    });\n}\n/*end_try_put_and_wait_example*/\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/follows_and_precedes_functions.rst",
    "content": ".. _follows_precedes:\n\n``follows`` and ``precedes`` function templates\n===============================================\n\n.. note::\n   To enable this feature, define the ``TBB_PREVIEW_FLOW_GRAPH_FEATURES`` macro to 1.\n\nThe ``follows`` and ``precedes`` helper functions aid in expressing\ndependencies between nodes when building oneTBB flow graphs. These helper functions can\nonly be used while constructing the node.\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\nThe ``follows`` helper function specifies that the node being constructed is\nthe successor of the set of nodes passed as an argument.\n\nThe ``precedes`` helper function specifies that the node being constructed is\nthe predecessor of the set of nodes passed as an argument.\n\nFunctions ``follows`` and ``precedes`` are meant to replace the graph argument, which is\npassed as the first argument to the constructor of the node. The graph argument for the\nnode being constructed is obtained either from the specified node set or the sequence of nodes passed\nto ``follows`` or ``precedes``.\n\nIf the nodes passed to ``follows`` or ``precedes`` belong to\ndifferent graphs, the behavior is undefined.\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n    #include <oneapi/tbb/flow_graph.h>\n\nSyntax\n------\n\n.. code:: cpp\n\n    // node_set is an exposition-only name for the type returned from make_node_set function\n\n    template <typename NodeType, typename... NodeTypes>\n    /*unspecified*/ follows( node_set<NodeType, NodeTypes...>& set );\n\n    template <typename NodeType, typename... NodeTypes>\n    /*unspecified*/ follows( NodeType& node, NodeTypes&... nodes );\n\n    template <typename NodeType, typename... NodeTypes>\n    /*unspecified*/ precedes( node_set<NodeType, NodeTypes...>& set );\n\n    template <typename NodeType, typename... NodeTypes>\n    /*unspecified*/ precedes( NodeType& node, NodeTypes&... nodes );\n\nInput Parameters\n----------------\n\nEither a set or a sequence of nodes can be used as arguments for ``follows`` and\n``precedes``. The following expressions are equivalent:\n\n.. code-block:: cpp\n    :caption: A set of nodes as an input\n\n    auto handlers = make_node_set(n1, n2, n3);\n    broadcast_node<int> input(precedes(handlers));\n\n.. code-block:: cpp\n    :caption: A sequence of nodes as an input\n \n    broadcast_node<int> input(precedes(n1, n2, n3));\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/helpers_for_expressing_graphs.rst",
    "content": ".. _helpers_for_expressing_graphs:\n\nHelper Functions for Expressing Graphs\n======================================\n\n.. note::\n   To enable this feature, define the ``TBB_PREVIEW_FLOW_GRAPH_FEATURES`` macro to 1.\n\nHelper functions are intended to make creation of the flow graphs less verbose.\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\nThis feature adds ``make_edges``, ``make_node_set``,\n``follows`` and ``precedes`` functions to ``oneapi::tbb::flow`` namespace.\nThese functions simplify the process of building flow graphs by allowing to gather nodes\ninto sets and connect them to other nodes in the graph.\n\nAPI\n***\n\n.. toctree::\n    :titlesonly:\n\n    constructors_for_nodes\n    follows_and_precedes_functions\n    make_node_set_function\n    make_edges_function\n\nExample\n*******\n\nConsider the graph depicted below.\n\n.. figure:: ./Resources/fg_api_graph_structure.png\n    :align: center\n\nIn the examples below, C++17 Class Template Argument Deduction is used\nto avoid template parameter specification where possible.\n\n**Regular API**\n\n.. literalinclude:: ./examples/helpers_for_expressing_graphs_regular_api_example.cpp\n    :language: c++\n    :start-after: /*begin_helpers_for_expressing_graphs_regular_api_example*/\n    :end-before: /*end_helpers_for_expressing_graphs_regular_api_example*/\n\n**Preview API**\n\n.. literalinclude:: ./examples/helpers_for_expressing_graphs_preview_api_example.cpp\n    :language: c++\n    :start-after: /*begin_helpers_for_expressing_graphs_preview_api_example*/\n    :end-before: /*end_helpers_for_expressing_graphs_preview_api_example*/\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/heterogeneous_extensions_chmap.rst",
    "content": ".. _heterogeneous_extensions_chmap:\n\nHeterogeneous overloads for ``concurrent_hash_map`` member functions\n====================================================================\n\n.. note::\n    To enable this feature, define the ``TBB_PREVIEW_CONCURRENT_HASH_MAP_EXTENSIONS`` macro to 1.\n\nA set of overloads for ``concurrent_hash_map`` member functions that allow to search, erase, and insert\nelements into the container without creating a temporary ``key_type`` object.\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\nHeterogeneous overloads allow you to perform insert, lookup, and erasure operations on ``concurrent_hash_map`` object\nusing an object of the type that is different from ``key_type`` but comparable with it.\n\nAll member functions described below only participate in overload resolution if ``HashCompareType::is_transparent``\nis valid and denotes a type.``HashCompareType`` is a type of the ``HashCompare`` passed as a template argument\nfor ``concurrent_hash_map``. It means that the ``HashCompare`` object calculates a hash and compares keys for\nequality without creating a temporary ``key_type`` object.\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n    #include \"oneapi/tbb/concurrent_hash_map.h\"\n\nSynopsis\n--------\n\n.. code:: cpp\n\n    namespace oneapi {\n        namespace tbb {\n            template <typename Key, typename Mapped,\n                      typename HashCompare = tbb_hash_compare<Key>,\n                      typename Allocator = tbb_allocator<std::pair<const Key, Mapped>>>\n            class concurrent_hash_map {\n            public:\n                // Insertion\n                template <typename K>\n                bool insert( accessor& result, const K& k );\n\n                template <typename K>\n                bool insert( const_accessor& result, const K& k );\n\n                // Lookup\n                template <typename K>\n                bool find( accessor& result, const K& k );\n\n                template <typename K>\n                bool find( const_accessor& result, const K& k ) const;\n\n                template <typename K>\n                size_type count( const K& k ) const;\n\n                template <typename K>\n                std::pair<iterator, iterator> equal_range( const K& k );\n\n                template <typename K>\n                std::pair<const_iterator, const_iterator> equal_range( const K& k ) const;\n\n                // Erasure\n                template <typename K>\n                bool erase( const K& k );\n            };\n        } // namespace tbb\n    } // namespace oneapi\n\nMember functions\n----------------\n\nInsertion\n^^^^^^^^^\n\n.. code:: cpp\n\n    template <typename K>\n    bool insert( accessor& result, const K& k );\n\n    template <typename K>\n    bool insert( const_accessor& result, const K& k );\n\nIf the accessor ``result`` is not empty, releases the ``result`` and tries to\ninsert the value constructed from ``{k, mapped_type()}`` into the container.\n\nSets the ``result`` to provide access to the inserted element or to the element with the key that\ncompares `equivalent` to the value ``k``.\n\nThis overload only participates in overload resolution if ``std::is_constructible<key_type, const K&>`` is ``true``.\n\n**Returns**: ``true`` if the insertion was applied, ``false`` otherwise.\n\nLookup\n^^^^^^\n\n.. code:: cpp\n\n    template <typename K>\n    bool find( accessor& result, const K& k );\n\n    template <typename K>\n    bool find( const_accessor& result, const K& k ) const;\n\nIf the accessor ``result`` is not empty, releases the ``result``.\n\nIf an element with the key that compares `equivalent` to the value ``k`` exists,\nsets the ``result`` to provide access to this element.\n\n**Returns**: ``true`` if an element with the key that compares `equivalent` to the value ``k`` is found,\n``false`` otherwise.\n\n------------------------------------------------\n\n.. code:: cpp\n\n    template <typename K>\n    size_type count( const K& k ) const;\n\n**Returns**: ``1`` if an element with the key that compares `equivalent` to the value ``k`` exists, ``0`` otherwise.\n\n------------------------------------------------\n\n.. code:: cpp\n\n    template <typename K>\n    std::pair<iterator, iterator> equal_range( const K& k );\n\n    template <typename K>\n    std::pair<const_iterator, const_iterator> equal_range( const K& k ) const;\n\n**Returns**:\n\n- A pair of iterators ``{f, l}`` if an element with the key that compares `equivalent` to the value ``k`` exists in the container.\n  Here ``f`` is an iterator to this element, ``l`` is ``std::next(f)``.\n- ``{end(), end()}`` otherwise.\n\n.. rubric:: Example\n\nThe example below demonstrates how to use heterogeneous lookup feature to find an object with the key of type ``std::string``\nusing an object of type ``const char*`` without conversions.\n\n.. code:: cpp\n\n    #define TBB_PREVIEW_CONCURRENT_HASH_MAP_EXTENSIONS 1\n    #include \"oneapi/tbb/concurrent_hash_map.h\"\n    #include <string>\n    #include <cstring>\n\n    // HashCompare an object that can calculate the hash code for\n    // std::string only and compare strings for equality\n    class RegularHashCompare {\n    private:\n        std::hash<std::string> my_hasher;\n    public:\n        std::size_t hash( const std::string& key ) const {\n            return my_hasher(key);\n        }\n\n        bool equal( const std::string& key1, const std::string& key2 ) const {\n            return key1 == key2;\n        }\n    };\n\n    // HashCompare an object that can calculate the hash code for\n    // std::string and const char*, and compare them for equality\n    class TransparentHashCompare {\n    private:\n        std::hash<char> my_hasher;\n\n        // Calculates a hash for the array of chars\n        std::size_t calculate_hash( const char* ptr ) const {\n            std::size_t h = 0;\n            for (auto c = ptr; *c; ++c) {\n                h = h ^ my_hasher(*c);\n            }\n            return h;\n        }\n    public:\n        using is_transparent = void;\n\n        std::size_t hash( const char* key ) const {\n            return calculate_hash(key);\n        }\n\n        std::size_t hash( const std::string& key ) const {\n            return calculate_hash(key.c_str());\n        }\n\n        bool equal( const char* key1, const char* key2 ) const {\n            return std::strcmp(key1, key2) == 0;\n        }\n\n        bool equal( const char* key1, const std::string& key2 ) const {\n            return std::strcmp(key1, key2.c_str()) == 0;\n        }\n\n        bool equal( const std::string& key1, const char* key2 ) const {\n            return std::strcmp(key1.c_str(), key2) == 0;\n        }\n\n        bool equal( const std::string& key1, const std::string& key2 ) const {\n            return std::strcmp(key1.c_str(), key2.c_str()) == 0;\n        }\n    };\n\n    int main() {\n        using regular_hash_map =\n            oneapi::tbb::concurrent_hash_map<std::string, int, RegularHashCompare>;\n        using transparent_hash_map =\n            oneapi::tbb::concurrent_hash_map<std::string, int, TransparentHashCompare>;\n\n        using regular_accessor = typename regular_hash_map::accessor;\n        using transparent_accessor = typename transparent_hash_map::accessor;\n\n        // Accessors\n        regular_accessor reg_accessor;\n        transparent_accessor tran_accessor;\n\n        // Maps\n        regular_hash_map regular_map;\n        transparent_hash_map tran_map;\n\n        // Heterogeneous overloads do not participate in overload resolution\n        // Such a call matches on the find overload, which accepts key_type (std::string)\n        // Creates a temporary key_type (std::string) object because of implicit conversion\n        bool result = regular_map.find(reg_accessor, \"abc\");\n\n        // Heterogeneous overloads participate in overload resolution\n        // No implicit conversion from const char* to std::string takes place\n        result = tran_map.find(tran_accessor, \"abc\");\n    }\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/info_namespace.rst",
    "content": ".. _info_namespace:\n\noneapi::tbb::info namespace\n===========================\n\nThe ``oneapi::tbb::info`` namespace satisfies `the corresponding oneTBB specification section\n<https://spec.oneapi.com/versions/latest/elements/oneTBB/source/info_namespace.html>`_.\n\nThe |full_name| implementation requires `the hwloc library <https://www-lb.open-mpi.org/projects/hwloc>`_\nto query NUMA(version >= 1.11) and Hybrid CPUs(version >= 2.4) topology information.\n\nSee also:\n\n* `info namespace specification <https://spec.oneapi.com/versions/latest/elements/oneTBB/source/info_namespace.html>`_\n* `oneapi::tbb::task_arena specification <https://spec.oneapi.com/versions/latest/elements/oneTBB/source/task_scheduler/task_arena/task_arena_cls.html>`_\n* :doc:`oneapi::tbb::info namespace preview extensions <info_namespace_extensions>`\n* :doc:`task_arena::constraints class preview extensions <constraints_extensions>`\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/info_namespace_extensions.rst",
    "content": ".. _info_namespace_extensions:\n\noneapi::tbb::info namespace extensions\n======================================\n\n.. note::\n    To enable this feature, set the ``TBB_PREVIEW_TASK_ARENA_CONSTRAINTS_EXTENSION`` macro to 1.\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\nThese extensions allow to query information about execution environment.\n\n.. contents::\n    :local:\n    :depth: 1\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n    #include <oneapi/tbb/info.h>\n\nSyntax\n------\n\n.. code:: cpp\n\n    namespace oneapi {\n        namespace tbb {\n            using core_type_id = /*implementation-defined*/;\n            namespace info {\n                std::vector<core_type_id> core_types();\n                int default_concurrency(task_arena::constraints c);\n            }\n        }\n    }\n\nTypes\n-----\n\n``core_type_id`` - Represents core type identifier.\n\nFunctions\n---------\n\n.. cpp:function:: std::vector<core_type_id> core_types()\n\n    Returns the vector of integral indexes that indicate available core types.\n    The indexes are sorted from the least performant to the most performant core type.\n\n    .. note::\n        If error occurs during system topology parsing, returns vector containing single element\n        that equals to ``task_arena::automatic``.\n\n.. cpp:function:: int default_concurrency(task_arena::constraints c)\n\n    Returns concurrency level for the given constraints.\n\nSee also:\n\n* :doc:`task_arena::constraints class preview extensions <constraints_extensions>`\n* `info namespace specification <https://spec.oneapi.com/versions/latest/elements/oneTBB/source/info_namespace.html>`_\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/make_edges_function.rst",
    "content": ".. _make_edges:\n\n``make_edges`` function template\n================================\n\n.. note::\n   To enable this feature, define the ``TBB_PREVIEW_FLOW_GRAPH_FEATURES`` macro to 1.\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\nThe ``make_edges`` function template creates edges between a single node\nand each node in a set of nodes.\n\nThere are two ways to connect nodes in a set and a single node using\n``make_edges``:\n\n.. figure:: ./Resources/make_edges_usage.png\n   :align: center\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n    #include <oneapi/tbb/flow_graph.h>\n\nSyntax\n------\n\n.. code:: cpp\n\n    // node_set is an exposition-only name for the type returned from make_node_set function\n\n    template <typename NodeType, typename Node, typename... Nodes>\n    void make_edges(node_set<Node, Nodes...>& set, NodeType& node);\n\n    template <typename NodeType, typename Node, typename... Nodes>\n    void make_edges(NodeType& node, node_set<Node, Nodes...>& set);\n\nExample\n-------\n\nThe example implements the graph structure in the picture below.\n\n.. figure:: ./Resources/make_edges_example.png\n    :align: center\n\n.. literalinclude:: ./examples/make_edges_function_example.cpp\n    :language: c++\n    :start-after: /*begin_make_edges_function_example*/\n    :end-before: /*end_make_edges_function_example*/\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/make_node_set_function.rst",
    "content": ".. _make_node_set:\n\n``make_node_set`` function template\n===================================\n\n.. note::\n   To enable this feature, define the ``TBB_PREVIEW_FLOW_GRAPH_FEATURES`` macro to 1.\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\nThe ``make_node_set`` function template creates a set of nodes that\ncan be passed as arguments to ``make_edges``, ``follows`` and ``precedes`` functions.\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n    #include <oneapi/tbb/flow_graph.h>\n\nSyntax\n------\n\n.. code:: cpp\n\n    template <typename Node, typename... Nodes>\n    /*unspecified*/ make_node_set( Node& node, Nodes&... nodes );\n\nSee Also\n********\n\n:ref:`make_edges`\n\n:ref:`follows_precedes`"
  },
  {
    "path": "third-party/tbb/doc/main/reference/mutex_cls.rst",
    "content": ".. _mutex:\n\nmutex\n==========\n\n.. note::\n   To enable this feature, define the ``TBB_PREVIEW_MUTEXES`` macro to 1.\n\nDescription\n***********\n\nA ``mutex`` is a class that models the `Mutex requirement <https://spec.oneapi.com/versions/latest/elements/oneTBB/source/named_requirements/mutexes/mutex.html>`_,\nusing adaptive approach: the combination of spinlock and waiting on system primitives.\nThe ``mutex`` class satisfies all of the mutex requirements described in the [thread.mutex.requirements] section of the ISO C++ standard.\nThe ``mutex`` class is not fair or recursive.\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n    #include <oneapi/tbb/mutex.h>\n\nSynopsis\n--------\n\n.. code:: cpp\n\n    namespace oneapi {\n        namespace tbb {\n            class mutex {\n            public:\n                mutex() noexcept;\n                ~mutex();\n\n                mutex(const mutex&) = delete;\n                mutex& operator=(const mutex&) = delete;\n\n                class scoped_lock;\n\n                void lock();\n                bool try_lock();\n                void unlock();\n\n                static constexpr bool is_rw_mutex = false;\n                static constexpr bool is_recursive_mutex = false;\n                static constexpr bool is_fair_mutex = false;\n            };\n        }\n    }\n\nMember classes\n--------------\n\n.. namespace:: tbb::mutex\n\t       \n.. cpp:class:: scoped_lock\n\n    The corresponding ``scoped_lock`` class. See the `Mutex requirement <https://spec.oneapi.com/versions/latest/elements/oneTBB/source/named_requirements/mutexes/mutex.html>`_.\n\nMember functions\n----------------\n\n.. cpp:function:: mutex()\n\n    Constructs ``mutex`` with unlocked state.\n\n--------------------------------------------------\n\n.. cpp:function:: ~mutex()\n\n    Destroys an unlocked ``mutex``.\n\n--------------------------------------------------\n\n.. cpp:function:: void lock()\n\n    Acquires a lock. It uses adaptive logic for waiting: it blocks after particular time period of busy wait.\n\n--------------------------------------------------\n\n.. cpp:function:: bool try_lock()\n\n    Tries to acquire a lock (non-blocking). Returns **true** if succeeded; **false** otherwise.\n\n--------------------------------------------------\n\n.. cpp:function:: void unlock()\n\n    Releases the lock held by a current thread.\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/parallel_for_each_semantics.rst",
    "content": ".. _parallel_for_each_semantics:\n\nparallel_for_each Body semantics and requirements\n=================================================\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\nThis page clarifies `ParallelForEachBody <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/named_requirements/algorithms/par_for_each_body>`_\nnamed requirements for ``tbb::parallel_for_each`` algorithm specification.\n\n.. code:: cpp\n\n    namespace oneapi {\n        namespace tbb {\n\n            template <typaname InputIterator, typename Body>\n            void parallel_for_each( InputIterator first, InputIterator last, Body body ); // overload (1)\n            template <typename InputIterator, typename Body>\n            void parallel_for_each( InputIterator first, InputIterator last, Body body, task_group_context& group ); // overload (2)\n\n            template <typename Container, typename Body>\n            void parallel_for_each( Container& c, Body body ); // overload (3)\n            template <typename Container, typename Body>\n            void parallel_for_each( Container& c, Body body, task_group_context& group ); // overload (4)\n\n            template <typename Container, typename Body>\n            void parallel_for_each( const Container& c, Body body ); // overload (5)\n            template <typename Container, typename Body>\n            void parallel_for_each( const Container& c, Body body, task_group_context& group ); // overload (6)\n\n        } // namespace tbb\n    } // namespace oneapi\n\nTerms\n-----\n\n* ``iterator`` determines the type of the iterator passed into ``parallel_for_each`` algorithm (which is ``InputIterator`` for overloads `(1)` and `(2)`\n  and ``decltype(std::begin(c))`` for overloads `(3) - (6)`)\n* ``value_type`` - the type ``typename std::iterator_traits<iterator>::value_type``\n* ``reference`` -  the type ``typename std::iterator_traits<iterator>::reference``.\n\nRequirements for different iterator types\n-----------------------------------------\n\nIf the ``iterator`` satisfies `Input iterator` named requirements from [input.iterators] ISO C++ Standard section and do not satisfies\n`Forward iterator` named requirements from [forward.iterators] ISO C++ Standard section, ``tbb::parallel_for_each`` requires the execution\nof the ``body`` with an object of type ``const value_type&`` or ``value_type&&`` to be well-formed. If both forms are well-formed, an overload with\nrvalue reference will be preferred.\n\n.. caution::\n\n  If the ``Body`` only takes non-const lvalue reference to ``value_type``, named requirements above are violated and the program can be ill-formed.\n\nIf the ``iterator`` satisfies `Forward iterator` named requirements from [forward.iterators] ISO C++ Standard section, ``tbb::parallel_for_each`` requires the execution of the ``body``\nwith an object of type ``reference`` to be well-formed.\n\nRequirements for ``Body`` with ``feeder`` argument\n--------------------------------------------------\n\nAdditional elements submitted into ``tbb::parallel_for_each`` through the ``feeder::add`` passes to the ``Body`` as rvalues and therefore the corresponding\nexecution of the ``Body`` is required to be well-formed.\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/parallel_phase_for_task_arena.rst",
    "content": ".. _parallel_phase_for_task_arena:\n\n``parallel_phase`` Interface for Task Arena\n====================================================================\n\n.. note::\n    To enable this feature, set ``TBB_PREVIEW_PARALLEL_PHASE`` macro to 1.\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\nThis feature extends the `tbb::task_arena specification <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/task_scheduler/task_arena/task_arena_cls>`_\nwith the following API:\n\n* Adds the ``leave_policy`` enumeration class to ``task_arena``.\n* Adds ``leave_policy`` as the last parameter in ``task_arena`` constructors and ``task_arena::initialize`` methods.\n  This allows you to inform the scheduler about the preferred policy for worker threads\n  when they are about to leave `task_arena` due to a lack of available work.\n* Adds new ``start_parallel_phase`` and ``end_parallel_phase`` interfaces to the ``task_arena`` class\n  and the ``this_task_arena`` namespace. These interfaces work as hints to the scheduler to mark the start and end\n  of parallel work submission into the arena, enabling different worker thread retention policies.\n* Adds the Resource Acquisition is Initialization (RAII) class ``scoped_parallel_phase`` to ``task_arena``.\n\nMore details about motivation, semantics and conditions for becoming fully supported functionality can be found in the corresponding\n`Request For Comments document for parallel_phase <https://github.com/uxlfoundation/oneTBB/tree/master/rfcs/experimental/parallel_phase_for_task_arena>`_.\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n    #define TBB_PREVIEW_PARALLEL_PHASE 1\n    #include <oneapi/tbb/task_arena.h>\n\nSynopsis\n--------\n\n.. code:: cpp\n\n    namespace oneapi {\n        namespace tbb {\n\n            class task_arena {\n            public:\n\n                enum class leave_policy : /* unspecified type */ {\n                    automatic = /* unspecifed */,\n                    fast = /* unspecifed */,\n                };\n\n                task_arena(int max_concurrency = automatic, unsigned reserved_for_masters = 1,\n                           priority a_priority = priority::normal,\n                           leave_policy a_leave_policy = leave_policy::automatic);\n\n                task_arena(const constraints& constraints_, unsigned reserved_for_masters = 1,\n                           priority a_priority = priority::normal,\n                           leave_policy a_leave_policy = leave_policy::automatic);\n\n                void initialize(int max_concurrency, unsigned reserved_for_masters = 1,\n                                priority a_priority = priority::normal,\n                                leave_policy a_leave_policy = leave_policy::automatic);\n\n                void initialize(constraints a_constraints, unsigned reserved_for_masters = 1,\n                                priority a_priority = priority::normal,\n                                leave_policy a_leave_policy = leave_policy::automatic);\n\n                void start_parallel_phase();\n                void end_parallel_phase(bool with_fast_leave = false);\n\n                class scoped_parallel_phase {\n                public:\n                    scoped_parallel_phase(task_arena& ta, bool with_fast_leave = false);\n                };\n            }; // class task_arena\n\n            namespace this_task_arena {\n                void start_parallel_phase();\n                void end_parallel_phase(bool with_fast_leave = false);\n            } // namespace this_task_arena\n\n        } // namespace tbb\n    } // namespace oneapi\n\nMember Types\n----------------\n\n.. cpp:enum:: leave_policy::automatic\n\nWhen passed to a constructor or the ``initialize`` method, the initialized ``task_arena`` has\nthe default (possibly system specific) policy for how quickly worker threads leave the arena\nwhen there is no more work available in the arena and when the arena is not in a parallel phase.\n\n.. note:: Worker threads in ``task_arena`` might be retained based on internal heuristics.\n\n.. cpp:enum:: leave_policy::fast\n\nWhen passed to a constructor or the ``initialize`` method, the initialized ``task_arena``\nhas policy that allows worker threads to more quickly leave the arena when there is no more work\navailable in the arena and when the arena is not in a parallel phase.\n\n.. cpp:class:: scoped_parallel_phase\n\nThe RAII class to map a parallel phase to a code scope.\n\n.. cpp:function:: scoped_parallel_phase::scoped_parallel_phase(task_arena& ta, bool with_fast_leave = false)\n\nConstructs a ``scoped_parallel_phase`` object that starts a parallel phase in the specified ``task_arena``.\nIf ``with_fast_leave`` is ``true``, the worker threads leave policy is temporarily set to ``fast``.\n\n.. note:: For ``task_arena`` initialized with ``leave_policy::fast``, ``with_fast_leave`` setting has no effect.\n\n.. note::\n   When worker threads enter the arena with no active parallel phases,\n   the leave policy is reset to the value set during the initialization of the arena.\n\nMember Functions\n----------------\n\n.. cpp:function:: task_arena(const task_arena&)\n\nCopies settings from ``task_arena`` instance including the ``leave_policy``.\n\n.. cpp:function:: void start_parallel_phase()\n\nIndicates a point from where the scheduler can use a hint to keep threads in the arena for longer.\n\n.. note:: This function can also be a warm-up hint for the scheduler. It allows the scheduler to wake up worker threads in advance.\n\n.. cpp:function:: void end_parallel_phase(bool with_fast_leave = false)\n\nIndicates the point when the scheduler may drop a hint and no longer retain threads in the arena.\nIf ``with_fast_leave`` is ``true``, worker threads leave policy is temporarily set to ``fast``.\n\n.. note:: For ``task_arena`` initialized with ``leave_policy::fast``, ``with_fast_leave`` setting has no effect.\n\n.. note::\n   When worker threads enter the arena with no active parallel phases,\n   the leave policy is reset to the value set during the initialization of the arena.\n\nFunctions\n---------\n\n.. cpp:function:: void this_task_arena::start_parallel_phase()\n\nIndicates the start of the parallel phase in the current ``task_arena``.\n\n.. cpp:function:: void this_task_arena::end_parallel_phase(bool with_fast_leave = false)\n\nIndicates the end of the parallel phase in the current ``task_arena``.\nIf ``with_fast_leave`` is ``true``, worker threads leave policy is temporarily set to ``fast``.\n\nExample\n*******\n\n.. literalinclude:: .examples/parallel_phase_example.cpp\n   :language: c++\n   :start-after: /*begin_parallel_phase_example*/\n   :end-before: /*end_parallel_phase_example*/\n\nIn this example, ``task_arena`` is created with ``leave_policy::fast``. It means that\nworker threads are not expected to remain in ``task_arena`` once parallel work is completed.\n\nHowever, the workflow includes a sequence of parallel work (initializing and sorting data) interceded by serial work (prefix sum).\nTo hint the start and end of parallel work, ``scoped_parallel_phase`` is used. This provides a hint to the scheduler\nthat worker threads might need to remain in ``task_arena`` since there is more parallel work to come.\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/parallel_sort_ranges_extension.rst",
    "content": ".. _parallel_sort_ranges_extension:\n\nparallel_sort ranges interface extension\n========================================\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\n|full_name| implementation extends the `oneapi::tbb::parallel_sort specification <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/algorithms/functions/parallel_sort_func>`_\nwith overloads that takes the container by forwarding reference.\n\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n    #include <oneapi/tbb/parallel_sort.h>\n\nSyntax\n------\n\n.. code:: cpp\n\n    namespace oneapi {\n        namespace tbb {\n\n            template <typename Container>\n            void parallel_sort( Container&& c );\n            template <typename Container, typename Compare>\n            void parallel_sort( Container&& c, const Compare& comp );\n\n        } // namespace tbb\n    } // namespace oneapi\n\nFunctions\n---------\n\n.. cpp:function:: template <typename Container> void parallel_sort( Container&& c );\n\n    Equivalent to ``parallel_sort( std::begin(c), std::end(c), comp )``, where `comp` uses `operator<` to determine relative orderings.\n\n.. cpp:function:: template <typename Container, typename Compare> void parallel_sort( Container&& c, const Compare& comp );\n\n    Equivalent to ``parallel_sort( std::begin(c), std::end(c), comp )``.\n\nExample\n-------\n\nThis interface may be used for sorting rvalue or constant views:\n\n.. literalinclude:: ./examples/parallel_sort_ranges_extension_example.cpp\n    :language: c++\n    :start-after: /*begin_parallel_sort_ranges_extension_example*/\n    :end-before: /*end_parallel_sort_ranges_extension_example*/\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/reference.rst",
    "content": ".. _reference:\n\n|short_name| API Reference\n==========================\n\nFor oneTBB API Reference, refer to `oneAPI Specification <https://github.com/uxlfoundation/oneAPI-spec>`_. The current supported\nversion of oneAPI Specification is 1.0.\n\nSpecification extensions\n************************\n\n|full_name| implements the `oneTBB specification <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/nested-index>`_.\nThis document provides additional details or restrictions where necessary.\nIt also describes features that are not included in the oneTBB specification.\n\n.. toctree::\n    :titlesonly:\n\n    parallel_for_each_semantics\n    parallel_sort_ranges_extension\n    scalable_memory_pools/malloc_replacement_log\n    rvalue_reduce\n\nPreview features\n****************\n\nA preview feature is a component of oneTBB introduced to receive early feedback from\nusers.\n\nThe key properties of a preview feature are:\n\n- It is off by default and must be explicitly enabled.\n- It is intended to have a high quality implementation.\n- There is no guarantee of future existence or compatibility.\n- It may have limited or no support in tools such as correctness analyzers, profilers and debuggers.\n\n\n.. caution::\n    A preview feature is subject to change in future. It might be removed or significantly\n    altered in future releases. Changes to a preview feature do NOT require\n    usual deprecation and removal process. Therefore, using preview features in production code\n    is strongly discouraged.\n\n.. toctree::\n    :titlesonly:\n\n    type_specified_message_keys\n    scalable_memory_pools\n    helpers_for_expressing_graphs\n    concurrent_lru_cache_cls\n    task_group_extensions\n    custom_mutex_chmap\n    try_put_and_wait\n    parallel_phase_for_task_arena\n    blocked_nd_range_ctad\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/rvalue_reduce.rst",
    "content": ".. _rvalue_reduce:\n\nParallel Reduction for rvalues\n==============================\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\n|full_name| implementation extends the `ParallelReduceFunc <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/named_requirements/algorithms/par_reduce_func>`_ and\n`ParallelReduceReduction <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/named_requirements/algorithms/par_reduce_reduction>`_\nto optimize operating with ``rvalues`` using functional form of ``tbb::parallel_reduce`` and ``tbb::parallel_deterministic_reduce`` algorithms.\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n    #include <oneapi/tbb/parallel_reduce.h>\n\nParallelReduceFunc Requirements: Pseudo-Signature, Semantics\n------------------------------------------------------------\n\n.. cpp:function:: Value Func::operator()(const Range& range, Value&& x) const\n\nor\n\n.. cpp:function:: Value Func::operator()(const Range& range, const Value& x) const\n\n    Accumulates the result for a subrange, starting with initial value ``x``. The ``Range`` type must meet the\n    `Range requirements <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/named_requirements/algorithms/range>`_.\n    The ``Value`` type must be the same as a corresponding template parameter for the `parallel_reduce algorithm <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/algorithms/functions/parallel_reduce_func>`_.\n\n    If both ``rvalue`` and ``lvalue`` forms are provided, the ``rvalue`` is preferred.\n\nParallelReduceReduction Requirements: Pseudo-Signature, Semantics\n-----------------------------------------------------------------\n\n.. cpp:function:: Value Reduction::operator()(Value&& x, Value&& y) const\n\nor\n\n.. cpp:function:: Value Reduction::operator()(const Value& x, const Value& y) const\n\n    Combines the ``x`` and ``y`` results. The ``Value`` type must be the same as a corresponding template parameter for the `parallel_reduce algorithm <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/algorithms/functions/parallel_reduce_func>`_.\n\n    If both ``rvalue`` and ``lvalue`` forms are provided, the ``rvalue`` is preferred.\n\nExample\n*******\n\n.. literalinclude:: ./examples/rvalue_reduce.cpp\n    :language: c++\n    :start-after: /*begin_rvalue_reduce_example*/\n    :end-before: /*end_rvalue_reduce_example*/\n\n.. rubric:: See also\n\n* `oneapi::tbb::parallel_reduce specification <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/algorithms/functions/parallel_reduce_func>`_\n* `oneapi::tbb::parallel_deterministic_reduce specification <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/algorithms/functions/parallel_deterministic_reduce_func>`_\n* `ParallelReduceFunc specification <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/named_requirements/algorithms/par_reduce_func>`_\n* `ParallelReduceReduction specification <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/named_requirements/algorithms/par_reduce_reduction>`_\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/rw_mutex_cls.rst",
    "content": ".. _rw_mutex:\n\nrw_mutex\n=============\n\n.. note::\n   To enable this feature, define the ``TBB_PREVIEW_MUTEXES`` macro to 1.\n\nDescription\n***********\n\nA ``rw_mutex`` is a class that models the `ReaderWriterMutex requirement <https://spec.oneapi.com/versions/latest/elements/oneTBB/source/named_requirements/mutexes/rw_mutex.html>`_,\nusing adaptive approach: the combination of spinlock and waiting on system primitives.\nThe ``rw_mutex`` class satisfies all of the shared mutex requirements described in the [thread.sharedmutex.requirements] section of the ISO C++ standard.\nThe ``rw_mutex`` class is unfair reader-writer lock with writer-preference.\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n    #include <oneapi/tbb/rw_mutex.h>\n\nSynopsis\n--------\n.. code:: cpp\n\n    namespace oneapi {\n        namespace tbb {\n            class rw_mutex {\n            public:\n                rw_mutex() noexcept;\n                ~rw_mutex();\n\n                rw_mutex(const rw_mutex&) = delete;\n                rw_mutex& operator=(const rw_mutex&) = delete;\n\n                class scoped_lock;\n\n                // exclusive ownership\n                void lock();\n                bool try_lock();\n                void unlock();\n\n                // shared ownership\n                void lock_shared();\n                bool try_lock_shared();\n                void unlock_shared();\n\n                static constexpr bool is_rw_mutex = true;\n                static constexpr bool is_recursive_mutex = false;\n                static constexpr bool is_fair_mutex = false;\n            };\n        }\n    }\n\nMember classes\n--------------\n\n.. namespace:: tbb::rw_mutex\n\t       \n.. cpp:class:: scoped_lock\n\n    The corresponding scoped-lock class. See the `ReaderWriterMutex requirement <https://spec.oneapi.com/versions/latest/elements/oneTBB/source/named_requirements/mutexes/rw_mutex.html>`_.\n\nMember functions\n----------------\n\n.. cpp:function:: rw_mutex()\n\n    Constructs unlocked ``rw_mutex``.\n\n--------------------------------------------------\n\n.. cpp:function:: ~rw_mutex()\n\n    Destroys unlocked ``rw_mutex``.\n\n--------------------------------------------------\n\n.. cpp:function:: void lock()\n\n    Acquires a lock. It uses adaptive logic for waiting: it blocks after particular time period of busy wait.\n\n--------------------------------------------------\n\n.. cpp:function:: bool try_lock()\n\n    Tries to acquire a lock (non-blocking) on write. Returns **true** if succeeded; **false** otherwise.\n\n--------------------------------------------------\n\n.. cpp:function:: void unlock()\n\n    Releases the write lock held by the current thread.\n\n--------------------------------------------------\n\n.. cpp:function:: void lock_shared()\n\n    Acquires a lock on read. It uses adaptive logic for waiting: it blocks after particular time period of busy wait.\n\n--------------------------------------------------\n\n.. cpp:function:: bool try_lock_shared()\n\n    Tries to acquire the lock (non-blocking) on read. Returns **true** if succeeded; **false** otherwise.\n\n--------------------------------------------------\n\n.. cpp:function:: void unlock_shared()\n\n    Releases the read lock held by the current thread.\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/scalable_memory_pools/fixed_pool_cls.rst",
    "content": ".. _fixed_pool_cls:\n\nfixed_pool\n==========\n\n.. note::\n   To enable this feature, set the ``TBB_PREVIEW_MEMORY_POOL`` macro to 1.\n\nA class for scalable memory allocation from a buffer of fixed size.\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\n``fixed_pool`` allocates and frees memory in a way that scales with the number of processors.\nAll the memory available for the allocation is initially passed through arguments of the constructor.\n``fixed_pool`` meet the :doc:`Memory Pool named requirement<../scalable_memory_pools>`.\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n    #include \"oneapi/tbb/memory_pool.h\"\n\nSynopsis\n--------\n\n.. code:: cpp\n\n    namespace oneapi {\n        namespace tbb {\n            class fixed_pool {\n            public:\n                fixed_pool(void *buffer, size_t size);\n                fixed_pool(const fixed_pool& other) = delete;\n                fixed_pool& operator=(const fixed_pool& other) = delete;\n                ~fixed_pool();\n\n                void recycle();\n                void* malloc(size_t size);\n                void free(void* ptr);\n                void* realloc(void* ptr, size_t size);\n            };\n        } // namespace tbb\n    } // namespace oneapi\n\nMember Functions\n----------------\n\n.. cpp:function:: fixed_pool(void *buffer, size_t size)\n\n    **Effects**: Constructs a memory pool to manage the memory of size ``size`` pointed to by ``buffer``.\n    Throws the ``bad_alloc`` exception if the library fails to construct an instance of the class.\n\nExamples\n********\n\nThe code below provides a simple example of allocation from a fixed pool.\n\n.. literalinclude:: ../examples/fixed_pool_example.cpp\n    :language: c++\n    :start-after: /*begin_fixed_pool_example*/\n    :end-before: /*end_fixed_pool_example*/\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/scalable_memory_pools/malloc_replacement_log.rst",
    "content": ".. _malloc_replacement_log:\n\nTBB_malloc_replacement_log Function\n===================================\n\n.. note:: This function is for Windows* OS only.\n\nSummary\n*******\n\nProvides information about the status of dynamic memory allocation replacement.\n\nSyntax\n*******\n\n::\n\n   extern \"C\" int TBB_malloc_replacement_log(char *** log_ptr);\n\n\nHeader\n******\n\n::\n\n   #include \"oneapi/tbb/tbbmalloc_proxy.h\"\n\n\nDescription\n***********\n\nDynamic replacement of memory allocation functions on Windows* OS uses in-memory binary instrumentation techniques.\nTo make sure that such instrumentation is safe, oneTBB first searches for a subset of replaced functions in the Visual C++* runtime DLLs\nand checks if each one has a known bytecode pattern. If any required function is not found or its bytecode pattern is unknown, the replacement is skipped,\nand the program continues to use the standard memory allocation functions.\n\nThe ``TBB_malloc_replacement_log`` function allows the program to check if the dynamic memory replacement happens and to get a log of the performed checks.\n\n**Returns:**\n\n* 0, if all necessary functions are successfully found and the replacement takes place.\n* 1, otherwise.\n\nThe ``log_ptr`` parameter must be an address of a char** variable or be ``NULL``. If it is not ``NULL``, the function writes there the address of an array of\nNULL-terminated strings containing detailed information about the searched functions in the following format:\n\n::\n\n   search_status: function_name (dll_name), byte pattern: <bytecodes>\n\n\nFor more information about the replacement of dynamic memory allocation functions, see :ref:`Windows_C_Dynamic_Memory_Interface_Replacement`.\n\n\nExample\n*******\n\n.. literalinclude:: ../examples/malloc_replacement_log_example.cpp\n    :language: c++\n    :start-after: /*begin_malloc_replacement_log_example*/\n    :end-before: /*end_malloc_replacement_log_example*/\n\nExample output:\n\n::\n\n   tbbmalloc_proxy cannot replace memory allocation routines\n   Success: free (ucrtbase.dll), byte pattern: <C7442410000000008B4424>\n   Fail: _msize (ucrtbase.dll), byte pattern: <E90B000000CCCCCCCCCCCC>\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/scalable_memory_pools/memory_pool_allocator_cls.rst",
    "content": ".. _memory_pool_allocator_cls:\n\nmemory_pool_allocator\n=====================\n\n.. note::\n   To enable this feature, set the ``TBB_PREVIEW_MEMORY_POOL`` macro to 1.\n\nA class template that provides a memory pool with a C++ allocator interface.\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\n``memory_pool_allocator`` meets the allocator requirements from the [allocator.requirements] ISO C++ Standard section\nIt also provides a constructor to allocate and deallocate memory.\nThis constructor is linked with an instance of either the ``memory_pool`` or the ``fixed_pool`` class.\nThe class is mainly intended for enabling memory pools within STL containers.\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n    #include \"oneapi/tbb/memory_pool.h\"\n\nSynopsis\n--------\n\n.. code:: cpp\n\n    namespace oneapi {\n        namespace tbb {\n            template<typename T>\n            class memory_pool_allocator {\n            public:\n                using value_type = T;\n                using pointer = value_type*;\n                using const_pointer = const value_type*;\n                using reference = value_type&;\n                using const_reference = const value_type&;\n                using size_type = size_t;\n                using difference_type = ptrdiff_t;\n                template<typename U> struct rebind {\n                    using other = memory_pool_allocator<U>;\n                };\n                explicit memory_pool_allocator(memory_pool &pool) throw();\n                explicit memory_pool_allocator(fixed_pool &pool) throw();\n                memory_pool_allocator(const memory_pool_allocator& src) throw();\n                template<typename U>\n                memory_pool_allocator(const memory_pool_allocator<U,P>& src) throw();\n                pointer address(reference x) const;\n                const_pointer address(const_reference x) const;\n                pointer allocate(size_type n, const void* hint=0);\n                void deallocate(pointer p, size_type);\n                size_type max_size() const throw();\n                void construct(pointer p, const T& value);\n                void destroy(pointer p);\n            };\n\n            template<>\n            class memory_pool_allocator<void> {\n            public:\n                using pointer = void*;\n                using const_pointer = const void*;\n                using value_type = void;\n                template<typename U> struct rebind {\n                    using other = memory_pool_allocator<U>;\n                };\n                memory_pool_allocator(memory_pool &pool) throw();\n                memory_pool_allocator(fixed_pool &pool) throw();\n                memory_pool_allocator(const memory_pool_allocator& src) throw();\n                template<typename U>\n                memory_pool_allocator(const memory_pool_allocator<U>& src) throw();\n            };\n        } // namespace tbb\n    } // namespace oneapi\n\n    template<typename T, typename U>\n    inline bool operator==( const memory_pool_allocator<T>& a,\n                           const memory_pool_allocator<U>& b);\n    template<typename T, typename U>\n    inline bool operator!=( const memory_pool_allocator<T>& a,\n                            const memory_pool_allocator<U>& b);\n\nMember Functions\n----------------\n\n.. cpp:function:: explicit memory_pool_allocator(memory_pool &pool)\n\n    **Effects**: Constructs a memory pool allocator serviced by ``memory_pool`` instance pool.\n\n-------------------------------------------------------\n\n.. cpp:function:: explicit memory_pool_allocator(fixed_pool &pool)\n\n    **Effects**: Constructs a memory pool allocator serviced by ``fixed_pool`` instance pool.\n\nExamples\n********\n\nThe code below provides a simple example of container construction with the use of a memory pool.\n\n.. literalinclude:: ../examples/memory_pool_allocator_example.cpp\n    :language: c++\n    :start-after: /*begin_memory_pool_allocator_example*/\n    :end-before: /*end_memory_pool_allocator_example*/\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/scalable_memory_pools/memory_pool_cls.rst",
    "content": ".. _memory_pool_cls:\n\nmemory_pool\n===========\n\n.. note::\n   To enable this feature, set the ``TBB_PREVIEW_MEMORY_POOL`` macro to 1.\n\nA class template for scalable memory allocation from memory blocks provided by an underlying allocator.\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\nA ``memory_pool`` allocates and frees memory in a way that scales with the number of processors.\nThe memory is obtained as big chunks from an underlying allocator specified by the template\nargument. The latter must satisfy the subset of the allocator requirements from the [allocator.requirements]\nISO C++ Standard section. A ``memory_pool`` meet the :doc:`Memory Pool named requirement<../scalable_memory_pools>`.\n\n.. caution::\n\n    If the underlying allocator refers to another scalable memory pool, the inner pool (or pools)\n    must be destroyed before the outer pool is destroyed or recycled.\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n    #include \"oneapi/tbb/memory_pool.h\"\n\nSynopsis\n--------\n\n.. code:: cpp\n\n    namespace oneapi {\n        namespace tbb {\n            template <typename Alloc>\n            class memory_pool {\n            public:\n                explicit memory_pool(const Alloc &src = Alloc());\n                memory_pool(const memory_pool& other) = delete;\n                memory_pool& operator=(const memory_pool& other) = delete;\n                ~memory_pool();\n                void recycle();\n                void *malloc(size_t size);\n                void free(void* ptr);\n               void *realloc(void* ptr, size_t size);\n            };\n        }\n    }\n\nMember Functions\n----------------\n\n.. cpp:function:: explicit memory_pool(const Alloc &src = Alloc())\n\n    **Effects**: Constructs a memory pool with an instance of underlying memory allocator of type ``Alloc`` copied from ``src``.\n    Throws the ``bad_alloc`` exception if runtime fails to construct an instance of the class.\n\nExamples\n********\n\nThe code below provides a simple example of allocation from an extensible memory pool.\n\n.. literalinclude:: ../examples/memory_pool_example.cpp\n    :language: c++\n    :start-after: /*begin_memory_pool_example*/\n    :end-before: /*end_memory_pool_example*/\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/scalable_memory_pools.rst",
    "content": ".. _scalable_memory_pools_reference:\n\nScalable Memory Pools\n=====================\n\n.. note::\n   To enable this feature, set the ``TBB_PREVIEW_MEMORY_POOL`` macro to 1.\n\nMemory pools allocate and free memory from a specified region or an underlying allocator using\nthread-safe, scalable operations. The  following table summarizes the Memory Pool named requirement.\nHere, ``P`` represents an instance of the memory pool class.\n\n.. container:: tablenoborder\n\n   .. list-table:: \n      :header-rows: 1\n\n      * -    Pseudo-Signature\n        -    Semantics\n      * -    \\ ``~P() throw();``\n        -    Destructor. Frees all the allocated memory.\n      * -    \\ ``void P::recycle();``\n        -    Frees all the allocated memory.\n      * -    \\ ``void* P::malloc(size_t n);``\n        -    Returns a pointer to ``n`` bytes allocated from the memory pool.\n      * -    \\ ``void P::free(void* ptr);``\n        -    Frees the memory object specified via ``ptr`` pointer.\n      * -    \\ ``void* P::realloc(void* ptr, size_t n);``\n        -    Reallocates the memory object pointed by ``ptr`` to ``n`` bytes.\n\n.. container:: section\n\n    .. rubric:: Model Types\n        :class: sectiontitle\n\n    The ``memory_pool`` template class and the ``fixed_pool`` class meet the Memory Pool named requirement.\n\n.. toctree::\n    :titlesonly:\n\n    scalable_memory_pools/memory_pool_cls\n    scalable_memory_pools/fixed_pool_cls\n    scalable_memory_pools/memory_pool_allocator_cls\n    \n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/task_group_extensions.rst",
    "content": ".. _task_group_extensions:\n\ntask_group extensions\n=====================\n\n.. note::\n    To enable these extensions, set the ``TBB_PREVIEW_TASK_GROUP_EXTENSIONS`` macro to 1.\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\n|full_name| implementation extends the `tbb::task_group specification <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/task_scheduler/task_group/task_group_cls>`_ with the requirements for a user-provided function object.\n   \n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n    #include <oneapi/tbb/task_group.h>\n\nSynopsis\n--------\n\n.. code:: cpp\n\n    namespace oneapi {\n        namespace tbb {\n   \n           class task_group {\n           public:\n\n               //only the requirements for the return type of function F are changed              \n               template<typename F>\n               task_handle defer(F&& f);\n                   \n               //only the requirements for the return type of function F are changed\n               template<typename F>\n               task_group_status run_and_wait(const F& f);\n    \n               //only the requirements for the return type of function F are changed              \n               template<typename F>\n               void run(F&& f);\n           }; \n\n        } // namespace tbb\n    } // namespace oneapi\n\n\n\nMember Functions\n----------------\n\n.. cpp:function:: template<typename F> task_handle  defer(F&& f)\n\nAs an optimization hint, ``F`` might return a ``task_handle``, which task object can be executed next.\n\n.. note::\n   The ``task_handle`` returned by the function must be created using ``*this`` ``task_group``. That is, the one for which the run method is called, otherwise it is undefined behavior. \n\n.. cpp:function:: template<typename F> task_group_status run_and_wait(const F& f)\n\nAs an optimization hint, ``F`` might return a ``task_handle``, which task object can be executed next.\n\n.. note::\n   The ``task_handle`` returned by the function must be created using ``*this`` ``task_group``. That is, the one for which the run method is called, otherwise it is undefined behavior. \n\n \n.. cpp:function:: template<typename F> void  run(F&& f)\n\nAs an optimization hint, ``F`` might return a ``task_handle``, which task object can be executed next.\n\n.. note::\n   The ``task_handle`` returned by the function must be created with ``*this`` ``task_group``. It means, with the one for which run method is called, otherwise it is an undefined behavior. \n    \n               \n.. rubric:: See also\n\n* `oneapi::tbb::task_group specification <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/task_scheduler/task_group/task_group_cls>`_\n* `oneapi::tbb::task_group_context specification <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/task_scheduler/scheduling_controls/task_group_context_cls>`_\n* `oneapi::tbb::task_group_status specification <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/task_scheduler/task_group/task_group_status_enum>`_ \n* `oneapi::tbb::task_handle class <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/task_scheduler/task_group/task_handle>`_\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/try_put_and_wait.rst",
    "content": ".. _try_put_and_wait:\n\nWaiting for Single Messages in Flow Graph\n=========================================\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\nThis feature adds a new ``try_put_and_wait`` interface to the receiving nodes in the Flow Graph.\nThis function puts a message as an input into a Flow Graph and waits until all work related to\nthat message is complete.\n``try_put_and_wait`` may reduce latency compared to calling ``graph::wait_for_all`` since\n``graph::wait_for_all`` waits for all work, including work that is unrelated to the input message, to complete.\n\n``node.try_put_and_wait(msg)`` performs ``node.try_put(msg)`` on the node and waits until the work on ``msg`` is completed.\nTherefore, the following conditions are true:\n\n* Any task initiated by any node in the Flow Graph that involves working with ``msg`` or any other intermediate result\n  computed from ``msg`` is completed.\n* No intermediate results computed from ``msg`` remain in any buffers in the graph.\n\n.. caution::\n\n    To prevent ``try_put_and_wait`` calls from infinite waiting, avoid using buffering nodes at the end of the Flow Graph since the final result\n    will not be automatically consumed by the Flow Graph.\n\n.. caution::\n\n    The ``multifunction_node`` and ``async_node`` classes are not currently supported by this feature. Including one of these nodes in the\n    Flow Graph may cause ``try_put_and_wait`` to exit early, even if the computations on the initial input message are\n    still in progress.\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n    #define TBB_PREVIEW_FLOW_GRAPH_FEATURES // macro option 1\n    #define TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT // macro option 2\n    #include <oneapi/tbb/flow_graph.h>\n\nSynopsis\n--------\n\n.. code:: cpp\n\n    namespace oneapi {\n        namespace tbb {\n            template <typename Output, typename Policy = /*default-policy*/>\n            class continue_node {\n            public:\n                bool try_put_and_wait(const continue_msg& input);\n            }; // class continue_node\n\n            template <typename Input, typename Output = continue_msg, typename Policy = /*default-policy*/>\n            class function_node {\n            public:\n                bool try_put_and_wait(const Input& input);\n            }; // class function_node\n\n            template <typename T>\n            class overwrite_node {\n            public:\n                bool try_put_and_wait(const T& input);\n            }; // class overwrite_node\n\n            template <typename T>\n            class write_once_node {\n            public:\n                bool try_put_and_wait(const T& input);\n            }; // class write_once_node\n\n            template <typename T>\n            class buffer_node {\n            public:\n                bool try_put_and_wait(const T& input);\n            }; // class buffer_node\n\n            template <typename T>\n            class queue_node {\n            public:\n                bool try_put_and_wait(const T& input);\n            }; // class queue_node\n\n            template <typename T, typename Compare = std::less<T>>\n            class priority_queue_node {\n            public:\n                bool try_put_and_wait(const T& input);\n            }; // class priority_queue_node\n\n            template <typename T>\n            class sequencer_node {\n            public:\n                bool try_put_and_wait(const T& input);\n            }; // class sequencer_node\n\n            template <typename T, typename DecrementType = continue_msg>\n            class limiter_node {\n            public:\n                bool try_put_and_wait(const T& input);\n            }; // class limiter_node\n\n            template <typename T>\n            class broadcast_node {\n            public:\n                bool try_put_and_wait(const T& input);\n            }; // class broadcast_node\n\n            template <typename TupleType>\n            class split_node {\n            public:\n                bool try_put_and_wait(const TupleType& input);\n            }; // class split_node\n        } // namespace tbb\n    } // namespace oneapi\n\nMember Functions\n----------------\n\n.. code:: cpp\n\n    template <typename Output, typename Policy>\n    bool continue_node<Output, Policy>::try_put_and_wait(const continue_msg& input)\n\n**Effects**: Increments the count of input signals received. If the incremented count is equal to the number\nof known predecessors, performs the ``body`` function object execution.\n\nWaits for the completion of the ``input`` in the Flow Graph, meaning all tasks created by each node and\nrelated to ``input`` are executed, and no related objects remain in any buffer within the graph.\n\n**Returns**: ``true``.\n\n.. code:: cpp\n\n    template <typename Input, typename Output, typename Policy>\n    bool function_node<Input, Output, Policy>::try_put_and_wait(const Input& input)\n\n**Effects**: If the concurrency limit allows, executes the user-provided body on the incoming message ``input``.\nOtherwise, depending on the ``Policy`` of the node, either queues the incoming message ``input`` or rejects it.\n\nWaits for the completion of the ``input`` in the Flow Graph, meaning all tasks created by each node and\nrelated to ``input`` are executed, and no related objects remain in any buffer within the graph.\n\n**Returns**: ``true`` if the input is accepted, ``false`` otherwise.\n\n.. code:: cpp\n\n    template <typename T>\n    bool overwrite_node<T>::try_put_and_wait(const T& input)\n\n**Effects**: Stores ``input`` in the internal single-item buffer and broadcasts it to all successors.\n\nWaits for the completion of the ``input`` in the Flow Graph, meaning all tasks created by each node and\nrelated to ``input`` are executed, and no related objects remain in any buffer within the graph.\n\n**Returns**: ``true``.\n\n.. caution::\n\n    Since the input element is not retrieved from ``overwrite_node`` once accepted by the successor,\n    retrieve it by explicitly calling the ``clear()`` method or by overwriting with another element to prevent\n    ``try_put_and_wait`` from indefinite waiting.\n\n.. code:: cpp\n\n    template <typename T>\n    bool write_once_node<T>::try_put_and_wait(const T& input)\n\n**Effects**: Stores ``input`` in the internal single-item buffer if it does not contain a valid value already.\nIf a new value is set, the node broadcasts it to all successors.\n\nWaits for the completion of the ``input`` in the Flow Graph, meaning all tasks created by each node and\nrelated to ``input`` are executed, and no related objects remain in any buffer within the graph.\n\n**Returns**: ``true`` for the first time after construction or a call to ``clear()``.\n\n.. caution::\n\n    Since the input element is not retrieved from the ``write_once_node`` once accepted by the successor,\n    retrieve it by explicitly calling the ``clear()`` method to prevent ``try_put_and_wait`` from indefinite waiting.\n\n.. code:: cpp\n\n    template <typename T>\n    bool buffer_node<T>::try_put_and_wait(const T& input)\n\n**Effects**: Adds ``input`` to the set of items managed by the node and tries forwarding it to a successor.\n\nWaits for the completion of the ``input`` in the Flow Graph, meaning all tasks created by each node and\nrelated to ``input`` are executed, and no related objects remain in any buffer within the graph.\n\n**Returns**: ``true``.\n\n.. code:: cpp\n\n    template <typename T>\n    bool queue_node<T>::try_put_and_wait(const T& input)\n\n**Effects**: Adds ``input`` to the set of items managed by the node and tries forwarding the least recently added item\nto a successor.\n\nWaits for the completion of the ``input`` in the Flow Graph, meaning all tasks created by each node and\nrelated to ``input`` are executed, and no related objects remain in any buffer within the graph.\n\n**Returns**: ``true``.\n\n.. code:: cpp\n\n    template <typename T, typename Compare>\n    bool priority_queue_node<T>::try_put_and_wait(const T& input)\n\n**Effects**: Adds ``input`` to the ``priority_queue_node`` and attempts to forward the item with the highest\npriority among all items added to the node but not yet forwarded to the successors.\n\nWaits for the completion of the ``input`` in the Flow Graph, meaning all tasks created by each node and\nrelated to ``input`` are executed, and no related objects remain in any buffer within the graph.\n\n**Returns**: ``true``.\n\n.. code:: cpp\n\n    template <typename T>\n    bool sequencer_node<T>::try_put_and_wait(const T& input)\n\n**Effects**: Adds ``input`` to the ``sequencer_node`` and tries forwarding the next item in sequence to a successor.\n\nWaits for the completion of the ``input`` in the Flow Graph, meaning all tasks created by each node and\nrelated to ``input`` are executed, and no related objects remain in any buffer within the graph.\n\n**Returns**: ``true``.\n\n.. code:: cpp\n\n    template <typename T, typename DecrementType>\n    bool limiter_node<T, DecrementType>::try_put_and_wait(const T& input)\n\n**Effects**: If the broadcast count is below the threshold, broadcasts ``input`` to all successors.\n\nWaits for the completion of the ``input`` in the Flow Graph, meaning all tasks created by each node and\nrelated to ``input`` are executed, and no related objects remain in any buffer within the graph.\n\n**Returns**: ``true`` if ``input`` is broadcasted; ``false`` otherwise.\n\n.. code:: cpp\n\n    template <typename T>\n    bool broadcast_node<T>::try_put_and_wait(const T& input)\n\n**Effects**: Broadcasts ``input`` to all successors.\n\nWaits for the completion of the ``input`` in the Flow Graph, meaning all tasks created by each node and\nrelated to ``input`` are executed, and no related objects remain in any buffer within the graph.\n\n**Returns**: ``true`` even if the node cannot successfully forward the message to any of its successors.\n\n.. code:: cpp\n\n    template <typename TupleType>\n    bool split_node<TupleType>::try_put_and_wait(const TupleType& input);\n\n**Effects**: Broadcasts each element in the incoming tuple to the nodes connected to the ``split_node`` output ports.\nThe element at index ``i`` of ``input`` is broadcasted through the output port number ``i``.\n\nWaits for the completion of the ``input`` in the Flow Graph, meaning all tasks created by each node and\nrelated to ``input`` are executed, and no related objects remain in any buffer within the graph.\n\n**Returns**: ``true``.\n\nExample\n*******\n\n.. literalinclude:: ./examples/try_put_and_wait_example.cpp\n    :language: c++\n    :start-after: /*begin_try_put_and_wait_example*/\n    :end-before: /*end_try_put_and_wait_example*/\n\nEach iteration of ``parallel_for`` submits an input into the Flow Graph. After returning from ``try_put_and_wait(input)``, it is\nguaranteed that all of the work related to the completion of ``input`` is done by all of the nodes in the graph. Tasks related to inputs\nsubmitted by other calls are not guaranteed to be completed.\n"
  },
  {
    "path": "third-party/tbb/doc/main/reference/type_specified_message_keys.rst",
    "content": ".. _class_join_node_extension:\n\nType-specified message keys for join_node\n=========================================\n\n.. note::\n    To enable this feature, define the ``TBB_PREVIEW_FLOW_GRAPH_FEATURES`` macro to 1.\n\n.. contents::\n    :local:\n    :depth: 1\n\nDescription\n***********\n\nThe extension allows a key matching ``join_node`` to obtain keys via functions associated with\nits input types. The extension simplifies the existing approach by removing the need to\nprovide a function object for each input port of ``join_node``.\n\nAPI\n***\n\nHeader\n------\n\n.. code:: cpp\n\n   #include \"oneapi/tbb/flow_graph.h\"\n\nSyntax\n------\n\nThe extension adds a special constructor to the ``join_node`` interface when the\n``key_matching<typename K, class KHash=tbb_hash_compare>`` policy is\nused. The constructor has the following signature:\n\n.. code:: cpp\n\n   join_node( graph &g )\n\nWhen constructed this way, a ``join_node`` calls the\n``key_from_message`` function for each incoming message to obtain the key associated\nwith it. The default implementation of ``key_from_message`` is the following\n\n.. code:: cpp\n\n   namespace oneapi {\n       namespace tbb {\n           namespace flow {\n               template <typename K, typename T>\n               K key_from_message( const T &t ) {\n                   return t.key();\n               }\n           }\n       }\n   }\n\n``T`` is one of the user-provided types in ``OutputTuple`` and is\nused to construct the ``join_node``, and ``K`` is the key type\nof the node.\nBy default, the ``key()`` method defined in the message class will be called.\nAlternatively, the user can define its own ``key_from_message`` function in the\nsame namespace with the message type. This function will be found via C++ argument-dependent\nlookup and used in place of the default implementation.\n\nSee Also\n********\n\n`join_node Specification <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/flow_graph/join_node_cls>`_\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Advanced_Example.rst",
    "content": ".. _Advanced_Example:\n\nAdvanced Example\n================\n\n\nAn example of a more advanced associative operation is to find the index\nwhere ``Foo(i)`` is minimized. A serial version might look like this:\n\n\n::\n\n\n   long SerialMinIndexFoo( const float a[], size_t n ) {\n       float value_of_min = FLT_MAX;        // FLT_MAX from <climits>\n       long index_of_min = -1;\n       for( size_t i=0; i<n; ++i ) {\n           float value = Foo(a[i]);\n           if( value<value_of_min ) {\n               value_of_min = value;\n               index_of_min = i;\n           }\n       }  \n       return index_of_min;\n   }\n\n\nThe loop works by keeping track of the minimum value found so far, and\nthe index of this value. This is the only information carried between\nloop iterations. To convert the loop to use ``parallel_reduce``, the\nfunction object must keep track of the carried information, and how to\nmerge this information when iterations are spread across multiple\nthreads. Also, the function object must record a pointer to ``a`` to\nprovide context.\n\n\nThe following code shows the complete function object.\n\n\n::\n\n\n   class MinIndexFoo {\n       const float *const my_a;\n   public:\n       float value_of_min;\n       long index_of_min; \n       void operator()( const blocked_range<size_t>& r ) {\n           const float *a = my_a;\n           for( size_t i=r.begin(); i!=r.end(); ++i ) {\n              float value = Foo(a[i]);    \n              if( value<value_of_min ) {\n                  value_of_min = value;\n                  index_of_min = i;\n              }\n           }\n       }\n    \n\n       MinIndexFoo( MinIndexFoo& x, split ) : \n           my_a(x.my_a), \n           value_of_min(FLT_MAX),    // FLT_MAX from <climits>\n           index_of_min(-1) \n      {}\n    \n\n       void join( const SumFoo& y ) {\n           if( y.value_of_min<value_of_min ) {\n               value_of_min = y.value_of_min;\n               index_of_min = y.index_of_min;\n           }\n       }\n                \n\n       MinIndexFoo( const float a[] ) :\n           my_a(a), \n           value_of_min(FLT_MAX),    // FLT_MAX from <climits>\n           index_of_min(-1),\n       {}\n   };\n\n\nNow ``SerialMinIndex`` can be rewritten using ``parallel_reduce`` as\nshown below:\n\n\n::\n\n\n   long ParallelMinIndexFoo( float a[], size_t n ) {\n       MinIndexFoo mif(a);\n       parallel_reduce(blocked_range<size_t>(0,n), mif );\n      \n\n    return mif.index_of_min;\n   }\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Advanced_Topic_Other_Kinds_of_Iteration_Spaces.rst",
    "content": ".. _Advanced_Topic_Other_Kinds_of_Iteration_Spaces:\n\nAdvanced Topic: Other Kinds of Iteration Spaces\n===============================================\n\n\nThe examples so far have used the class ``blocked_range<T>`` to specify ranges.\nThis class is useful in many situations, but it does not fit every situation.\nYou can use |full_name| to define your own iteration space objects. The object\nmust specify how it can be split into subspaces by providing a basic splitting\nconstructor, an optional proportional splitting constructor, and two predicate\nmethods. If your class is called ``R``, the methods and constructors should be\nas follows:\n\n\n::\n\n\n   class R {\n       // True if range is empty\n       bool empty() const;\n       // True if range can be split into non-empty subranges\n       bool is_divisible() const;\n       // Splits r into subranges r and *this\n       R( R& r, split );\n       // (optional) Splits r into subranges r and *this in proportion p\n       R( R& r, proportional_split p );\n       ...\n   };\n       \n\n\n\nThe method ``empty`` should return true if the range is empty. The\nmethod ``is_divisible`` should return true if the range can be split\ninto two non-empty subspaces, and such a split is worth the overhead.\nThe basic splitting constructor should take two arguments:\n\n\n-  The first of type ``R``\n\n\n-  The second of type oneapi::tbb::split\n\n\nThe second argument is not used; it serves only to distinguish the\nconstructor from an ordinary copy constructor. The basic splitting\nconstructor should attempt to split ``r`` roughly into two halves, and\nupdate ``r`` to be the first half, and set the constructed object as the\nsecond half.\n\n\nUnlike the basic splitting constructor, the proportional splitting\nconstructor is optional and takes the second argument of type\n``oneapi::tbb::proportional_split``. The type has methods ``left`` and ``right``\nthat return the values of the proportion. These values should be used to\nsplit ``r`` accordingly, so that the updated ``r`` corresponds to the\nleft part of the proportion, and the constructed object corresponds to\nthe right part.\n\n\nBoth splitting constructors should guarantee that the updated ``r`` part\nand the constructed object are not empty. The parallel algorithm\ntemplates call the splitting constructors on ``r`` only if\n``r.is_divisible`` is true.\n\n\nThe iteration space does not have to be linear. Look at\n``oneapi/tbb/blocked_range2d.h`` for an example of a range that is\ntwo-dimensional. Its splitting constructor attempts to split the range\nalong its longest axis. When used with ``parallel_for``, it causes the\nloop to be \"recursively blocked\" in a way that improves cache usage.\nThis nice cache behavior means that using ``parallel_for`` over a\n``blocked_range2d<T>`` can make a loop run faster than the sequential\nequivalent, even on a single processor. \n\nThe ``blocked_range2d`` allows you to use different value types for\nits first dimension, *rows*, and the second one, *columns*.\nThat means you can combine indexes, pointers, and iterators into a joint\niteration space. Use the methods ``rows()`` and ``cols()`` to obtain\n``blocked_range`` objects that represent the respective dimensions.\n\nThe ``blocked_range3d`` class template extends this approach to 3D by adding\n``pages()`` as the first dimension, followed by ``rows()`` and ``cols()``.\n\nThe ``blocked_nd_range<T,N>`` class template represents a blocked iteration\nspace of any dimensionality. Unlike the previously described 2D and 3D ranges,\n``blocked_nd_range`` uses the same value type for all its axes, and its\nconstructor requires you to pass N instances of ``blocked_range<T>`` instead of\nindividual boundary values. The change in the naming pattern reflects these\ndifferences.\n\n\nExample of a Multidimensional Iteration Space\n------------------------------------------------\n\nThe example demonstrates calculation of a 3-dimensional filter over the pack\nof feature maps.\n\nThe ``convolution3d`` function iterates over the output cells, assigning to\neach cell the result of the ``kernel3d`` function that combines the values\nfrom a range in the feature maps.\n\nTo run the computation in parallel, ``tbb::parallel_for`` is called with\n``tbb::blocked_nd_range<int,3>`` as an argument. The body function processes\nthe received 3D subrange in nested loops, using the method ``dim`` to get\nthe loop boundaries for each dimension.\n\n\n.. literalinclude:: ./examples/blocked_nd_range_example.cpp\n   :language: c++\n   :start-after: /*begin_blocked_nd_range_example*/\n   :end-before: /*end_blocked_nd_range_example*/"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Allocator_Configuration.rst",
    "content": ".. _Allocator_Configuration:\n\nConfiguring the Memory Allocator\n================================\n\n\nThe oneTBB memory allocator provides the following API functions and\nenvironment variables to configure its behavior:\n\n\n-  the ``scalable_allocation_command`` function instructs the allocator\n   to perform a certain action, such as cleaning up its internal memory\n   buffers.\n\n\n-  the ``scalable_allocation_mode`` function allows an application to\n   set certain parameters for the memory allocator, such as an option to\n   map memory in huge pages or define a recommended heap size. These\n   settings take effect until modified by another call to\n   ``scalable_allocation_mode``.\n\n\nSome of the memory allocator parameters can also be set via system\nenvironment variables. It can be useful to adjust the behavior without\nmodifying application source code, to ensure that a setting takes effect\nas early as possible, or to avoid explicit dependency on the oneTBB\nallocator binaries. The following environment variables are recognized:\n\n\n-  ``TBB_MALLOC_USE_HUGE_PAGES`` controls usage of huge pages for memory\n   mapping.\n\n\n-  ``TBB_MALLOC_SET_HUGE_OBJECT_THRESHOLD`` defines the lower bound for\n   the size (bytes), that is interpreted as huge and not released during\n   regular cleanup operations.\n\n\nThese variables only take effect at the time the memory manager is\ninitialized; later environment changes are ignored. A call to\n``scalable_allocation_mode`` overrides the effect of the corresponding\nenvironment variable.\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Automatic_Chunking.rst",
    "content": ".. _Automatic_Chunking:\n\nAutomatic Chunking\n==================\n\n\nA parallel loop construct incurs overhead cost for every chunk of work\nthat it schedules. |full_name|\nchooses chunk sizes automatically, depending upon load balancing\nneeds. The heuristic attempts to limit overheads while\nstill providing ample opportunities for load balancing.\n\n\n.. CAUTION::\n   Typically a loop needs to take at least a million clock cycles to\n   make it worth using ``parallel_for``. For example, a loop that takes\n   at least 500 microseconds on a 2 GHz processor might benefit from\n   ``parallel_for``.\n\n\nThe default automatic chunking is recommended for most uses. As with\nmost heuristics, however, there are situations where controlling the\nchunk size more precisely might yield better performance.\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Automically_Replacing_malloc.rst",
    "content": ".. _Automically_Replacing_malloc:\n\nAutomatically Replacing ``malloc`` and Other C/C++ Functions for Dynamic Memory Allocation\n==========================================================================================\n\n\nOn Windows*, Linux\\* operating systems, it is possible to automatically\nreplace all calls to standard functions for dynamic memory allocation\n(such as ``malloc``) with the |full_name| scalable equivalents.\nDoing so can sometimes improve application performance.\n\n\nReplacements are provided by the proxy library (the library names can be\nfound in platform-specific sections below). A proxy library and a\nscalable memory allocator library should be taken from the same release\nof oneTBB, otherwise the libraries may be mutually incompatible.\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/Windows_C_Dynamic_Memory_Interface_Replacement\n   ../tbb_userguide/Linux_C_Dynamic_Memory_Interface_Replacement"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Bandwidth_and_Cache_Affinity_os.rst",
    "content": ".. _Bandwidth_and_Cache_Affinity:\n\nBandwidth and Cache Affinity\n============================\n\n\nFor a sufficiently simple function ``Foo``, the examples might not show\ngood speedup when written as parallel loops. The cause could be\ninsufficient system bandwidth between the processors and memory. In that\ncase, you may have to rethink your algorithm to take better advantage of\ncache. Restructuring to better utilize the cache usually benefits the\nparallel program as well as the serial program.\n\n\nAn alternative to restructuring that works in some cases is\n``affinity_partitioner.`` It not only automatically chooses the\ngrainsize, but also optimizes for cache affinity and tries to distribute\nthe data uniformly among threads. Using ``affinity_partitioner`` can\nsignificantly improve performance when:\n\n\n-  The computation does a few operations per data access.\n\n\n-  The data acted upon by the loop fits in cache.\n\n\n-  The loop, or a similar loop, is re-executed over the same data.\n\n\n-  There are more than two hardware threads available (and especially if\n   the number of threads is not a power of two). If only two threads are\n   available, the default scheduling in |full_name| \n   usually provides sufficient cache affinity.\n\n\nThe following code shows how to use ``affinity_partitioner``.\n\n\n::\n\n\n   #include \"oneapi/tbb.h\"\n    \n\n   void ParallelApplyFoo( float a[], size_t n ) {\n       static affinity_partitioner ap;\n       parallel_for(blocked_range<size_t>(0,n), ApplyFoo(a), ap);\n   }\n    \n\n   void TimeStepFoo( float a[], size_t n, int steps ) {    \n       for( int t=0; t<steps; ++t )\n           ParallelApplyFoo( a, n );\n   }\n\n\nIn the example, the ``affinity_partitioner`` object ``ap`` lives between\nloop iterations. It remembers where iterations of the loop ran, so that\neach iteration can be handed to the same thread that executed it before.\nThe example code gets the lifetime of the partitioner right by declaring\nthe ``affinity_partitioner`` as a local static object. Another approach\nwould be to declare it at a scope outside the iterative loop in\n``TimeStepFoo``, and hand it down the call chain to ``parallel_for``.\n\n\nIf the data does not fit across the system’s caches, there may be little\nbenefit. The following figure shows the situations.\n\n\n.. container:: fignone\n   :name: fig3\n\n\n   Benefit of Affinity Determined by Relative Size of Data Set and Cache\n   |image0|\n\n\nThe next figure shows how parallel speedup might vary with the size of a\ndata set. The computation for the example is ``A[i]+=B[i]`` for ``i`` in\nthe range [0,N). It was chosen for dramatic effect. You are unlikely to\nsee quite this much variation in your code. The graph shows not much\nimprovement at the extremes. For small N, parallel scheduling overhead\ndominates, resulting in little speedup. For large N, the data set is too\nlarge to be carried in cache between loop invocations. The peak in the\nmiddle is the sweet spot for affinity. Hence ``affinity_partitioner``\nshould be considered a tool, not a cure-all, when there is a low ratio\nof computations to memory accesses.\n\n\n.. container:: fignone\n   :name: fig4\n\n\n   Improvement from Affinity Dependent on Array Size\n   |image1|\n\n\n\n\n.. |image0| image:: Images/image007.jpg\n   :width: 453px\n   :height: 178px\n.. |image1| image:: Images/image008.jpg\n   :width: 551px\n   :height: 192px\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Basic_Flow_Graph_concepts.rst",
    "content": ".. _Basic_Flow_Graph_concepts:\n\nBasic Flow Graph Concepts\n=========================\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/Graph_Object\n   ../tbb_userguide/Nodes\n   ../tbb_userguide/Edges\n   ../tbb_userguide/Mapping_Nodes2Tasks\n   ../tbb_userguide/Flow_Graph_Message_Passing_Protocol\n   ../tbb_userguide/Flow_Graph_Single_Vs_Broadcast\n   ../tbb_userguide/Flow_Graph_Buffering_in_Nodes\n   ../tbb_userguide/Flow_Graph_Reservation"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Cancellation_Without_An_Exception.rst",
    "content": ".. _Cancellation_Without_An_Exception:\n\nCancellation Without An Exception\n=================================\n\n\nTo cancel an algorithm but not throw an exception, use the expression ``current_context()->cancel_group_execution()``.\nThe part ``current_context()`` references the ``task_group_context*`` of the currently executing task if any on the current thread.\nCalling ``cancel_group_execution()`` cancels all tasks in its ``task_group_context``, which is explained in more detail in :ref:`Cancellation_and_Nested_Parallelism`.\nThe method returns ``true`` if it actually causes cancellation, ``false`` if the ``task_group_context`` was already cancelled.\n\nThe example below shows how to use ``current_context()->cancel_group_execution()``.\n\n::\n\n   #include \"oneapi/tbb.h\"\n\n   #include <vector>\n   #include <iostream>\n    \n   using namespace oneapi::tbb;\n   using namespace std;\n    \n   vector<int> Data;\n    \n   struct Update {\n       void operator()( const blocked_range<int>& r ) const {\n           for( int i=r.begin(); i!=r.end(); ++i )\n               if( i<Data.size() ) {\n                   ++Data[i];\n               } else {\n                   // Cancel related tasks.\n                   if( current_context()->cancel_group_execution() )\n                       cout << \"Index \" << i << \" caused cancellation\\n\";\n                   return;\n               }\n       }\n   };\n    \n\n   int main() {\n       Data.resize(1000);\n       parallel_for( blocked_range<int>(0, 2000), Update());\n       return 0;\n   }\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Cancellation_and_Nested_Parallelism.rst",
    "content": ".. _Cancellation_and_Nested_Parallelism:\n\nCancellation and Nested Parallelism\n===================================\n\n\nThe discussion so far was simplified by assuming non-nested parallelism\nand skipping details of ``task_group_context``. This topic explains\nboth.\n\n\nAn |full_name| algorithm executes\nby creating ``task`` objects that execute the snippets of code that you\nsupply to the algorithm template. By default, these ``task`` objects are\nassociated with a ``task_group_context`` created by the algorithm.\nNested oneTBB algorithms create a tree of these ``task_group_context``\nobjects. Cancelling a ``task_group_context`` cancels all of its child\n``task_group_context`` objects, and transitively all its descendants.\nHence an algorithm and all algorithms it called can be cancelled with a\nsingle request.\n\n\nExceptions propagate upwards. Cancellation propagates downwards. The\nopposition interplays to cleanly stop a nested computation when an\nexception occurs. For example, consider the tree in the following\nfigure. Imagine that each node represents an algorithm and its\n``task_group_context``.\n\n\n.. container:: fignone\n   :name: fig6\n\n\n   Tree of task_group_context\n   |image0|\n\n\nSuppose that the algorithm in C throws an exception and no node catches\nthe exception. oneTBB propagates the exception upwards, cancelling\nrelated subtrees downwards, as follows:\n\n\n#. Handle exception in C:\n\n\n   a. Capture exception in C.\n\n\n   b. Cancel tasks in C.\n\n\n   c. Throw exception from C to B.\n\n\n#. Handle exception in B:\n\n\n   a. Capture exception in B.\n\n\n   b. Cancel tasks in B and, by downwards propagation, in D.\n\n\n   c. Throw an exception out of B to A.\n\n\n#. Handle exception in A:\n\n\n   a. Capture exception in A.\n\n\n   b. Cancel tasks in A and, by downwards propagation, in E, F, and G.\n\n\n   c. Throw an exception upwards out of A.\n\n\nIf your code catches the exception at any level, then oneTBB does not\npropagate it any further. For example, an exception that does not escape\noutside the body of a ``parallel_for`` does not cause cancellation of\nother iterations.\n\n\nTo prevent downwards propagation of cancellation into an algorithm,\nconstruct an 'isolated' ``task_group_context`` on the stack and pass it\nto the algorithm explicitly. The example uses C++11 lambda expressions for brevity.\n\n\n::\n\n\n   #include \"oneapi/tbb.h\"\n    \n\n   bool Data[1000][1000];\n    \n\n   int main() {\n       try {\n           parallel_for( 0, 1000, 1, \n               []( int i ) {\n                   task_group_context root(task_group_context::isolated);\n                   parallel_for( 0, 1000, 1,\n                      []( int  ) {\n                          Data[i][j] = true;\n                      },\n                      root);\n                   throw \"oops\";\n               });\n       } catch(...) {\n       }\n       return 0;\n   }\n\n\nThe example performs two parallel loops: an outer loop over ``i`` and\ninner loop over ``j``. The creation of the isolated\n``task_group_context`` ``root`` protects the inner loop from downwards\npropagation of cancellation from the ``i`` loop. When the exception\npropagates to the outer loop, any pending ``outer`` iterations are\ncancelled, but not inner iterations for an outer iteration that started.\nHence when the program completes, each row of ``Data`` may be different,\ndepending upon whether its iteration ``i`` ran at all, but within a row,\nthe elements will be homogeneously ``false`` or ``true``, not a mixture.\n\n\nRemoving the blue text would permit cancellation to propagate down into\nthe inner loop. In that case, a row of ``Data`` might end up with both\n``true`` and ``false`` values.\n\n\n.. |image0| image:: Images/image013.jpg\n   :width: 261px\n   :height: 131px\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Concurrent_Queue_Classes.rst",
    "content": ".. _Concurrent_Queue_Classes:\n\nConcurrent Queue Classes\n========================\n\n\nTemplate class ``concurrent_queue<T,Alloc>`` implements a concurrent\nqueue with values of type ``T``. Multiple threads may simultaneously\npush and pop elements from the queue. The queue is unbounded and has no\nblocking operations. The fundamental operations on it are ``push`` and\n``try_pop``. The ``push`` operation works just like ``push`` for a\nstd::queue. The operation ``try_pop`` pops an item if it is available.\nThe check and popping have to be done in a single operation for sake of\nthread safety.\n\n\nFor example, consider the following serial code:\n\n\n::\n\n\n           extern std::queue<T> MySerialQueue;\n           T item;\n           if( !MySerialQueue.empty() ) {\n               item = MySerialQueue.front(); \n               MySerialQueue.pop_front();\n               ... process item...\n           }\n\n\nEven if each std::queue method were implemented in a thread-safe manner,\nthe composition of those methods as shown in the example would not be\nthread safe if there were other threads also popping from the same\nqueue. For example, ``MySerialQueue.empty()`` might return true just\nbefore another thread snatches the last item from ``MySerialQueue``.\n\n\nThe equivalent thread-safe |full_name| code is:\n\n\n::\n\n\n           extern concurrent_queue<T> MyQueue;\n           T item;\n           if( MyQueue.try_pop(item) ) {\n               ...process item...\n           }            \n\n\nIn a single-threaded program, a queue is a first-in first-out structure.\nBut if multiple threads are pushing and popping concurrently, the\ndefinition of \"first\" is uncertain. Use of ``concurrent_queue``\nguarantees that if a thread pushes two values, and another thread pops\nthose two values, they will be popped in the same order that they were\npushed.\n\n\nTemplate class ``concurrent_queue`` is unbounded and has no methods that\nwait. It is up to the user to provide synchronization to avoid overflow,\nor to wait for the queue to become non-empty. Typically this is\nappropriate when the synchronization has to be done at a higher level.\n\n\nTemplate class ``concurrent_bounded_queue<T,Alloc>`` is a variant that\nadds blocking operations and the ability to specify a capacity. The\nmethods of particular interest on it are:\n\n\n-  ``pop(item)`` waits until it can succeed.\n\n\n-  ``push(item)`` waits until it can succeed without exceeding the\n   queue's capacity.\n\n\n-  ``try_push(item)`` pushes ``item`` only if it would not exceed the\n   queue's capacity.\n\n\n-  size() returns a *signed* integer.\n\n\nThe value of concurrent_queue::size() is defined as the number of push\noperations started minus the number of pop operations started. If pops\noutnumber pushes, ``size()`` becomes negative. For example, if a\n``concurrent_queue`` is empty, and there are ``n`` pending pop\noperations, ``size()`` returns -\\ ``n``. This provides an easy way for\nproducers to know how many consumers are waiting on the queue. Method\n``empty()`` is defined to be true if and only if ``size()`` is not\npositive.\n\n\nBy default, a ``concurrent_bounded_queue`` is unbounded. It may hold any\nnumber of values, until memory runs out. It can be bounded by setting\nthe queue capacity with method ``set_capacity``.Setting the capacity\ncauses ``push`` to block until there is room in the queue. Bounded\nqueues are slower than unbounded queues, so if there is a constraint\nelsewhere in your program that prevents the queue from becoming too\nlarge, it is better not to set the capacity. If you do not need the\nbounds or the blocking pop, consider using ``concurrent_queue`` instead.\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/Iterating_Over_a_Concurrent_Queue_for_Debugging\n   ../tbb_userguide/When_Not_to_Use_Queues"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Constraints.rst",
    "content": ".. _Constraints:\n\nConstrained APIs\n================\n\nStarting from C++20, most of |full_name| APIs are constrained to\nenforce `named requirements <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/named_requirements>`_ on\ntemplate arguments types.\n\nThe violations of these requirements are detected at a compile time during the template instantiation.\n\n.. rubric:: Example\n\n.. code:: cpp\n\n    // Call for body(oneapi::tbb::blocked_range) is ill-formed\n    // oneapi::tbb::parallel_for call results in constraint failure\n    auto body = [](const int& r) { /*...*/ };\n    oneapi::tbb::parallel_for(oneapi::tbb::blocked_range{1, 10}, body);\n\n    // Error example:\n    // error: no matching function to call to oneapi::tbb::parallel_for\n    // note: constraints not satisfied\n    // note: the required expression 'body(range)' is invalid\n            body(range);\n\n.. caution::\n\n    The code that violates named requirements but compiles successfully until C++20,\n    may not compile in C++20 mode due to early and strict constraints diagnostics.\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Containers.rst",
    "content": ".. _Containers:\n\nContainers\n==========\n\n\n|full_name| provides highly concurrent\ncontainer classes. These containers can be used with raw Windows\\* OS or\nLinux\\* OS threads, or in conjunction with task-based programming.\n\n\nA concurrent container allows multiple threads to concurrently access\nand update items in the container. Typical C++ STL containers do not\npermit concurrent update; attempts to modify them concurrently often\nresult in corrupting the container. STL containers can be wrapped in a\nmutex to make them safe for concurrent access, by letting only one\nthread operate on the container at a time, but that approach eliminates\nconcurrency, thus restricting parallel speedup.\n\n\nContainers provided by oneTBB offer a much higher level of concurrency,\nvia one or both of the following methods:\n\n\n-  **Fine-grained locking:** Multiple threads operate on the container\n   by locking only those portions they really need to lock. As long as\n   different threads access different portions, they can proceed\n   concurrently.\n\n\n-  **Lock-free techniques:** Different threads account and correct for\n   the effects of other interfering threads.\n\n\nNotice that highly-concurrent containers come at a cost. They typically\nhave higher overheads than regular STL containers. Operations on\nhighly-concurrent containers may take longer than for STL containers.\nTherefore, use highly-concurrent containers when the speedup from the\nadditional concurrency that they enable outweighs their slower\nsequential performance.\n\n\n.. CAUTION:: \n   As with most objects in C++, the constructor or destructor of a\n   container object must not be invoked concurrently with another\n   operation on the same object. Otherwise the resulting race may cause\n   the operation to be executed on an undefined object.\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/concurrent_hash_map\n   ../tbb_userguide/concurrent_vector_ug\n   ../tbb_userguide/Concurrent_Queue_Classes\n   ../tbb_userguide/Summary_of_Containers\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Controlling_Chunking_os.rst",
    "content": ".. _Controlling_Chunking:\n\nControlling Chunking\n====================\n\n\nChunking is controlled by a *partitioner* and a *grainsize.*\\  To gain\nthe most control over chunking, you specify both.\n\n\n-  Specify ``simple_partitioner()`` as the third argument to\n   ``parallel_for``. Doing so turns off automatic chunking.\n\n\n-  Specify the grainsize when constructing the range. The thread\n   argument form of the constructor is\n   ``blocked_range<T>(begin,end,grainsize)``. The default value of\n   ``grainsize`` is 1. It is in units of loop iterations per chunk.\n\n\nIf the chunks are too small, the overhead may exceed the performance\nadvantage.\n\n\nThe following code is the last example from parallel_for, modified to\nuse an explicit grainsize ``G``.\n\n\n::\n\n\n   #include \"oneapi/tbb.h\"\n    \n\n   void ParallelApplyFoo( float a[], size_t n ) {\n       parallel_for(blocked_range<size_t>(0,n,G), ApplyFoo(a), \n                    simple_partitioner());\n   }\n\n\nThe grainsize sets a minimum threshold for parallelization. The\n``parallel_for`` in the example invokes ``ApplyFoo::operator()`` on\nchunks, possibly of different sizes. Let *chunksize* be the number of\niterations in a chunk. Using ``simple_partitioner`` guarantees that\n[G/2] <= *chunksize* <= G.\n\n\nThere is also an intermediate level of control where you specify the\ngrainsize for the range, but use an ``auto_partitioner`` and\n``affinity_partitioner``. An ``auto_partitioner`` is the default\npartitioner. Both partitioners implement the automatic grainsize\nheuristic described in :ref:`Automatic_Chunking`. An\n``affinity_partitioner`` implies an additional hint, as explained later\nin Section :ref:`Bandwidth_and_Cache_Affinity`. Though these partitioners\nmay cause chunks to have more than G iterations, they never generate\nchunks with less than [G/2] iterations. Specifying a range with an\nexplicit grainsize may occasionally be useful to prevent these\npartitioners from generating wastefully small chunks if their heuristics\nfail.\n\n\nBecause of the impact of grainsize on parallel loops, it is worth\nreading the following material even if you rely on ``auto_partitioner``\nand ``affinity_partitioner`` to choose the grainsize automatically.\n\n\n.. container:: tablenoborder\n\n\n   .. list-table:: \n      :header-rows: 1\n\n      * -     |image0|\n        -     |image1|\n      * -     Case A     \n        -     Case B     \n\n\n\n\nThe above figure illustrates the impact of grainsize by showing the\nuseful work as the gray area inside a brown border that represents\noverhead. Both Case A and Case B have the same total gray area. Case A\nshows how too small a grainsize leads to a relatively high proportion of\noverhead. Case B shows how a large grainsize reduces this proportion, at\nthe cost of reducing potential parallelism. The overhead as a fraction\nof useful work depends upon the grainsize, not on the number of grains.\nConsider this relationship and not the total number of iterations or\nnumber of processors when setting a grainsize.\n\n\nA rule of thumb is that ``grainsize`` iterations of ``operator()``\nshould take at least 100,000 clock cycles to execute. For example, if a\nsingle iteration takes 100 clocks, then the ``grainsize`` needs to be at\nleast 1000 iterations. When in doubt, do the following experiment:\n\n\n#. Set the ``grainsize`` parameter higher than necessary. The grainsize\n   is specified in units of loop iterations. If you have no idea of how\n   many clock cycles an iteration might take, start with\n   ``grainsize``\\ =100,000. The rationale is that each iteration\n   normally requires at least one clock per iteration. In most cases,\n   step 3 will guide you to a much smaller value.\n\n\n#. Run your algorithm.\n\n\n#. Iteratively halve the ``grainsize`` parameter and see how much the\n   algorithm slows down or speeds up as the value decreases.\n\n\nA drawback of setting a grainsize too high is that it can reduce\nparallelism. For example, if the grainsize is 1000 and the loop has 2000\niterations, the ``parallel_for`` distributes the loop across only two\nprocessors, even if more are available. However, if you are unsure, err\non the side of being a little too high instead of a little too low,\nbecause too low a value hurts serial performance, which in turns hurts\nparallel performance if there is other parallelism available higher up\nin the call tree.\n\n\n.. tip:: \n   You do not have to set the grainsize too precisely.\n\n\nThe next figure shows the typical \"bathtub curve\" for execution time\nversus grainsize, based on the floating point ``a[i]=b[i]*c``\ncomputation over a million indices. There is little work per iteration.\nThe times were collected on a four-socket machine with eight hardware\nthreads.\n\n\n.. container:: fignone\n   :name: fig2\n\n\n   Wall Clock Time Versus Grainsize\n   |image2|\n\n\nThe scale is logarithmic. The downward slope on the left side indicates\nthat with a grainsize of one, most of the overhead is parallel\nscheduling overhead, not useful work. An increase in grainsize brings a\nproportional decrease in parallel overhead. Then the curve flattens out\nbecause the parallel overhead becomes insignificant for a sufficiently\nlarge grainsize. At the end on the right, the curve turns up because the\nchunks are so large that there are fewer chunks than available hardware\nthreads. Notice that a grainsize over the wide range 100-100,000 works\nquite well.\n\n\n.. tip:: \n   A general rule of thumb for parallelizing loop nests is to\n   parallelize the outermost one possible. The reason is that each\n   iteration of an outer loop is likely to provide a bigger grain of\n   work than an iteration of an inner loop.\n\n\n\n.. |image0| image:: Images/image002.jpg\n   :width: 161px\n   :height: 163px\n.. |image1| image:: Images/image004.jpg\n   :width: 157px\n   :height: 144px\n.. |image2| image:: Images/image006.jpg\n   :width: 462px\n   :height: 193px\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Cook_Until_Done_parallel_do.rst",
    "content": ".. _Cook_Until_Done_parallel_do:\n\nCook Until Done: parallel_for_each\n==================================\n\n\nFor some loops, the end of the iteration space is not known in advance,\nor the loop body may add more iterations to do before the loop exits.\nYou can deal with both situations using the template class ``oneapi::tbb::parallel_for_each``.\n\n\nA linked list is an example of an iteration space that is not known in\nadvance. In parallel programming, it is usually better to use dynamic\narrays instead of linked lists, because accessing items in a linked list\nis inherently serial. But if you are limited to linked lists, the items\ncan be safely processed in parallel, and processing each item takes at\nleast a few thousand instructions, you can use ``parallel_for_each`` to\ngain some parallelism.\n\n\nFor example, consider the following serial code:\n\n\n::\n\n\n   void SerialApplyFooToList( const std::list<Item>& list ) {\n       for( std::list<Item>::const_iterator i=list.begin() i!=list.end(); ++i ) \n           Foo(*i);\n   }\n\n\nIf ``Foo`` takes at least a few thousand instructions to run, you can\nget parallel speedup by converting the loop to use\n``parallel_for_each``. To do so, define an object with a ``const``\nqualified ``operator()``. This is similar to a C++ function object from\nthe C++ standard header ``<functional>``, except that ``operator()``\nmust be ``const``.\n\n\n::\n\n\n   class ApplyFoo {\n   public:\n       void operator()( Item& item ) const {\n           Foo(item);\n       }\n   };\n\n\nThe parallel form of ``SerialApplyFooToList`` is as follows:\n\n\n::\n\n\n   void ParallelApplyFooToList( const std::list<Item>& list ) {\n       parallel_for_each( list.begin(), list.end(), ApplyFoo() ); \n   }\n\n\nAn invocation of ``parallel_for_each`` never causes two threads to act\non an input iterator concurrently. Thus typical definitions of input\niterators for sequential programs work correctly. This convenience makes\n``parallel_for_each`` unscalable, because the fetching of work is\nserial. But in many situations, you still get useful speedup over doing\nthings sequentially.\n\n\nThere are two ways that ``parallel_for_each`` can acquire work scalably.\n\n\n-  The iterators can be random-access iterators.\n\n\n-  The body argument to ``parallel_for_each``, if it takes a second\n   argument *feeder* of type ``parallel_for_each<Item>&``, can add more\n   work by calling ``feeder.add(item)``. For example, suppose processing\n   a node in a tree is a prerequisite to processing its descendants.\n   With ``parallel_for_each``, after processing a node, you could use\n   ``feeder.add`` to add the descendant nodes. The instance of\n   ``parallel_for_each`` does not terminate until all items have been\n   processed.\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Data_Flow_Graph.rst",
    "content": ".. _Data_Flow_Graph:\n\nData Flow Graph\n===============\n\n\nIn a data flow graph, nodes are computations that send and receive data\nmessages. Some nodes may only send messages, others may only receive\nmessages, and others may send messages in response to messages that they\nreceive.\n\n\nIn the following data flow graph, the left-most node generates the\ninteger values from 1 to 10 and passes them to two successor nodes. One\nof the successors squares each value it receives and passes the result\ndownstream. The second successor cubes each value it receives and passes\nthe result downstream. The right-most node receives values from both of\nthe middle nodes. As it receives each value, it adds it to a running sum\nof values. When the application is run to completion, the value of sum\nwill be equal to the sum of the sequence of squares and cubes from 1 to\n10.\n\n\n.. container:: fignone\n   :name: simple_data_flow_title\n\n\n   Simple Data Flow Graph\n\n\n   .. container:: imagecenter\n\n\n      |image0|\n\n\nThe following code snippet shows an implementation of the **Simple Data\nFlow Graph** shown above:\n\n\n::\n\n\n       int sum = 0;\n       graph g;\n       function_node< int, int > squarer( g, unlimited, [](const int &v) { \n           return v*v; \n       } );\n       function_node< int, int > cuber( g, unlimited, [](const int &v) { \n           return v*v*v; \n       } );\n       function_node< int, int > summer( g, 1, [&](const int &v ) -> int { \n           return sum += v; \n       } );\n       make_edge( squarer, summer );\n       make_edge( cuber, summer );\n\n\n       for ( int i = 1; i <= 10; ++i ) {\n         squarer.try_put(i);\n         cuber.try_put(i);\n       }\n       g.wait_for_all();\n\n\n       cout << \"Sum is \" << sum << \"\\n\";\n\n\nIn the implementation above, the following function_nodes are created:\n\n\n-  one to square values\n-  one to cube values\n-  one to add values to the global sum\n\n\nSince the squarer and cuber nodes are side-effect free, they are created\nwith an unlimited concurrency. The summer node updates the sum through a\nreference to a global variable and therefore is not safe to execute in\nparallel. It is therefore created with a concurrency limit of 1. The\nnode F from **Simple Data Flow Graph** above is implemented as a loop\nthat puts messages to both the squarer and cuber node.\n\n\nA slight improvement over the first implementation is to introduce an\nadditional node type, a ``broadcast_node``. A ``broadcast_node`` broadcasts any\nmessage it receives to all of its successors.\n\n\nThis enables replacing the two ``try_put``'s in the loop with a single\n``try_put``:\n\n\n::\n\n\n       broadcast_node<int> b(g);\n       make_edge( b, squarer );\n       make_edge( b, cuber );\n       for ( int i = 1; i <= 10; ++i ) {\n         b.try_put(i);\n       }\n       g.wait_for_all();\n\n\nAn even better option, which will make the implementation even more like\nthe **Simple Data Flow Graph** above, is to introduce an ``input_node``. An\n``input_node``, as the name implies only sends messages and does not\nreceive messages. Its constructor takes two arguments:\n\n\n::\n\n\n   template< typename Body > input_node( graph &g, Body body)\n\nThe body is a function object, or lambda expression, that contains a\nfunction operator:\n\n\n::\n\n\n   Output Body::operator()( oneapi::tbb::flow_control &fc );\n\n\nYou can replace the loop in the example with an ``input_node``\n\n\n::\n\n\n       input_node< int > src( g, src_body(10) );\n       make_edge( src, squarer );\n       make_edge( src, cuber );\n       src.activate();\n       g.wait_for_all();\n\n\nThe runtime library will repeatedly invoke the function operator in\n``src_body`` until ``fc.stop()`` is invoked inside the body. You therefore\nneed to create body that will act like the body of the loop in the **Simple Data Flow Graph**\nabove. The final implementation after all of these changes is shown\nbelow:\n\n\n::\n\n\n       class src_body {\n           const int my_limit;\n           int my_next_value;\n       public:\n           src_body(int l) : my_limit(l), my_next_value(1) {}\n           int operator()( oneapi::tbb::flow_control& fc ) {\n               if ( my_next_value <= my_limit ) {\n                   return my_next_value++;\n               } else {\n                   fc.stop();\n                   return int();\n               }\n           }\n       };\n\n\n       int main() {\n         int sum = 0;\n         graph g;\n         function_node< int, int > squarer( g, unlimited, [](const int &v) { \n             return v*v; \n         } );\n         function_node< int, int > cuber( g, unlimited, [](const int &v) { \n             return v*v*v; \n         } );\n         function_node< int, int > summer( g, 1, [&](const int &v ) -> int { \n             return sum += v; \n         } );\n         make_edge( squarer, summer );\n         make_edge( cuber, summer );\n         input_node< int > src( g, src_body(10) );\n         make_edge( src, squarer );\n         make_edge( src, cuber );\n         src.activate();\n         g.wait_for_all();\n         cout << \"Sum is \" << sum << \"\\n\";\n       }\n\n\nThis final implementation has all of the nodes and edges from the\n**Simple Data Flow Graph** above. In this simple example, there is not\nmuch advantage in using an ``input_node`` over an explicit loop. But,\nbecause an ``input_node`` is able to react to the behavior of downstream\nnodes, it can limit memory use in more complex graphs. For more\ninformation, see:ref:`create_token_based_system` .\n\n\n.. |image0| image:: Images/flow_graph.jpg\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Debug_Versus_Release_Libraries.rst",
    "content": ".. _Debug_Versus_Release_Libraries:\n\nDebug Versus Release Libraries\n==============================\n\n\nThe following table details the |full_name| \ndynamic shared libraries that come in debug and release\nversions.\n\n\n.. container:: tablenoborder\n\n\n   .. list-table::\n      :header-rows: 1\n\n      * -     Library \n        -     Description    \n        -     When to Use    \n      * -    | ``tbb_debug``\n\t     | ``tbbmalloc_debug``\n\t     | ``tbbmalloc_proxy_debug``\n\t     | ``tbbbind_debug``    \n        -     These versions have extensive internal checking for correct use of the library.   \n        -     Use with code that is compiled with the macro ``TBB_USE_DEBUG`` set to 1.    \n      * -    | ``tbb``\n\t     | ``tbbmalloc``\n\t     | ``tbbmalloc_proxy``\n\t     | ``tbbbind``    \n        -     These versions deliver top performance. They eliminate  most checking for correct use of the library.    \n        -     Use with code compiled with ``TBB_USE_DEBUG`` undefined or set to zero.    \n\n.. tip:: \n   Test your programs with the debug versions of the libraries first, to\n   assure that you are using the library correctly.  With the release\n   versions, incorrect usage may result in unpredictable program\n   behavior.\n\n\noneTBB supports Intel® Inspector, Intel® VTune™ Profiler and Intel® Advisor.\nFull support of these tools requires compiling with macro ``TBB_USE_PROFILING_TOOLS=1``.\nThat symbol defaults to 1 in the following conditions:\n\n-  When ``TBB_USE_DEBUG=1``.\n-  On the Microsoft Windows\\* operating system, when ``_DEBUG=1``.\n\nThe :ref:`reference` section explains the default values in more detail.\n\n\n.. CAUTION:: \n   The instrumentation support for Intel® Inspector becomes live after\n   the first initialization of the task library. If the library\n   components are used before this initialization occurs, Intel® Inspector\n   may falsely report race conditions that are not really races.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Dependence_Graph.rst",
    "content": ".. _Dependence_Graph:\n\nDependence Graph\n================\n\n\nIn a dependence graph, the nodes invoke body objects to perform\ncomputations and the edges create a partial ordering of these\ncomputations. At runtime, the library spawns and schedules tasks to\nexecute the body objects when it is legal to do so according to the\nspecified partial ordering. The following figure shows an example of an\napplication that could be expressed using a dependence graph.\n\n\n.. container:: fignone\n   :name: dependence_graph_make_sandwitch\n\n\n   Dependence Graph for Making a Sandwich\n\n\n   .. container:: imagecenter\n\n\n      |image0|\n\n\nDependence graphs are a special case of data flow graphs, where the data\npassed between nodes are of type ``oneapi::tbb::flow::continue_msg``. Unlike a\ngeneral data flow graph, nodes in a dependence graph do not spawn a task\nfor each message they receive. Instead, they are aware of the number of\npredecessors they have, count the messages they receive and only spawn a\ntask to execute their body when this count is equal to the total number\nof their predecessors.\n\n\nThe following figure shows another example of a dependence graph. It has\nthe same topology as the figure above, but with simple functions\nreplacing the sandwich making steps. In this partial ordering, function\nA must complete executing before any other computation starts executing.\nFunction B must complete before C and D start executing; and E must\ncomplete before D and F start executing. This is a partial ordering\nbecause, for example, there is no explicit ordering requirement between\nB and E or C and F.\n\n\n.. container:: fignone\n   :name: simple_dependence_graph\n\n\n   Simple Dependence Graph\n\n\n   .. container:: imagecenter\n\n\n      |image1|\n\n\nTo implement this as a flow graph, continue_node objects are used for\nthe nodes and ``continue_msg`` objects as the messages. A continue_node\nconstructor takes two arguments:\n\n\n::\n\n\n   template< typename Body > continue_node( graph &g, Body body)\n\n\nThe first argument is the graph it belongs to and the second is a\nfunction object or lambda expression. Unlike a ``function_node``, a\n``continue_node`` is always assumed to have unlimited concurrency and will\nimmediately spawn a task whenever its dependencies are met.\n\n\nThe following code snippet is an implementation of the example in this\nfigure.\n\n\n::\n\n\n   typedef continue_node< continue_msg > node_t;\n   typedef const continue_msg & msg_t;\n\n\n   int main() {\n     oneapi::tbb::flow::graph g;\n     node_t A(g, [](msg_t){ a(); } );\n     node_t B(g, [](msg_t){ b(); } );\n     node_t C(g, [](msg_t){ c(); } );\n     node_t D(g, [](msg_t){ d(); } );\n     node_t E(g, [](msg_t){ e(); } );\n     node_t F(g, [](msg_t){ f(); } );\n     make_edge(A, B);\n     make_edge(B, C);\n     make_edge(B, D);\n     make_edge(A, E);\n     make_edge(E, D);\n     make_edge(E, F);\n     A.try_put( continue_msg() );\n     g.wait_for_all();\n     return 0;\n   }\n\n\nOne possible execution of this graph is shown below. The execution of D\ndoes not start until both B and E are finished. While a task is waiting\nin the ``wait_for_all``, its thread can participate in executing other tasks\nfrom the oneTBB work pool.\n\n\n.. container:: fignone\n\n\n   Execution Timeline for a Dependence Graph\n\n\n   .. container:: imagecenter\n\n\n      |image2|\n\n\nAgain, it is important to note that all execution in the flow graph\nhappens asynchronously. The call to ``A.try_put`` returns control to the\ncalling thread quickly, after incrementing the counter and spawning a\ntask to execute the body of A. Likewise, the body tasks execute the\nlambda expressions and then put a continue_msg to all successor nodes,\nif any. Only the call to ``wait_for_all`` blocks, as it should, and even in\nthis case the calling thread may be used to execute tasks from the\noneTBB work pool while it is waiting.\n\n\nThe above timeline shows the sequence when there are enough threads to\nexecute all of the tasks that can be executed concurrently in parallel.\nIf there are fewer threads, then some tasks that are spawned will need\nto wait until a thread is available to execute them.\n\n\n.. |image0| image:: Images/flow_graph_complex.jpg\n   :width: 440px\n   :height: 337px\n.. |image1| image:: Images/dependence_graph.jpg\n.. |image2| image:: Images/execution_timeline_dependence.jpg\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Edges.rst",
    "content": ".. _Edges:\n\nFlow Graph Basics: Edges\n========================\n\n\nMost applications contain multiple nodes with edges connecting them to\neach other. In the flow graph interface, edges are directed channels\nover which messages are passed. They are created by calling the function\n``make_edge( p, s )`` with two arguments: ``p``, the predecessor, and ``s``, the\nsuccessor. You can modify the example used in the :ref:`Nodes` topic to\ninclude a second node that squares the value it receives before printing\nit and then connect that to the first node with an edge.\n\n\n::\n\n\n       graph g;\n       function_node< int, int > n( g, unlimited, []( int v ) -> int { \n           cout << v;\n           spin_for( v );\n           cout << v;\n           return v;\n       } );\n       function_node< int, int > m( g, 1, []( int v ) -> int {\n           v *= v;\n           cout << v;\n           spin_for( v );\n           cout << v;\n           return v;\n       } );\n       make_edge( n, m );\n       n.try_put( 1 );\n       n.try_put( 2 );\n       n.try_put( 3 );\n       g.wait_for_all();\n\n\nNow there are two ``function_node`` ``s``, ``n`` and ``m``. The call to ``make_edge`` creates\nan edge from ``n`` to ``m``. The node ``n`` is created with unlimited concurrency,\nwhile ``m`` has a concurrency limit of 1. The invocations of ``n`` can all\nproceed in parallel, while the invocations of ``m`` will be serialized.\nBecause there is an edge from ``n`` to ``m``, each value ``v``, returned by ``n``, will\nbe automatically passed to node ``m`` by the runtime library.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Exceptions_and_Cancellation.rst",
    "content": ".. _Exceptions_and_Cancellation:\n\nExceptions and Cancellation\n===========================\n\n\n|full_name| supports exceptions and\ncancellation. When code inside an oneTBB algorithm throws an exception,\nthe following steps generally occur:\n\n\n#. The exception is captured. Any further exceptions inside the\n   algorithm are ignored.\n\n\n#. The algorithm is cancelled. Pending iterations are not executed. If\n   there is oneTBB parallelism nested inside, the nested parallelism may\n   also be cancelled as explained in :ref:`Cancellation_and_Nested_Parallelism`.\n\n\n#. Once all parts of the algorithm stop, an exception is thrown on the\n   thread that invoked the algorithm.\n\n\nAs compilers evolve to support this functionality, future versions of\noneTBB might throw the original exception. So be sure your code can\ncatch either type of exception. The following example demonstrates\nexception handling:\n\n\n\n::\n\n\n   #include \"oneapi/tbb.h\"\n   #include <vector>\n   #include <iostream>\n    \n\n   using namespace oneapi::tbb;\n   using namespace std;\n    \n\n   vector<int> Data;\n    \n\n   struct Update {\n       void operator()( const blocked_range<int>& r ) const {\n           for( int i=r.begin(); i!=r.end(); ++i )\n               Data.at(i) += 1;\n       }\n   };\n    \n\n   int main() {\n       Data.resize(1000);\n       try {\n           parallel_for( blocked_range<int>(0, 2000), Update());\n       } catch( out_of_range& ex ) {\n          cout << \"out_of_range: \" << ex.what() << endl;\n       }\n       return 0;\n   }\n\n\nThe ``parallel_for`` attempts to iterate over 2000 elements of a vector\nwith only 1000 elements. Hence the expression ``Data.at(i)`` sometimes\nthrows an exception ``std::out_of_range`` during execution of the\nalgorithm. When the exception happens, the algorithm is cancelled and an\nexception thrown at the call site to ``parallel_for``.\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/Cancellation_Without_An_Exception\n   ../tbb_userguide/Cancellation_and_Nested_Parallelism\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Floating_Point_Settings.rst",
    "content": ".. _Floating_Point_Settings:\n\nFloating-point Settings\n=======================\n\nTo propagate CPU-specific settings for floating-point computations to tasks executed by the task scheduler, you can use one of the following two methods:\n\n* When a ``task_arena`` or a task scheduler for a given application thread is initialized, they capture the current floating-point settings of the thread. \n* The ``task_group_context`` class has a method to capture the current floating-point settings. \n\nBy default, worker threads use floating-point settings obtained during the initialization of a ``task_arena`` or the implicit arena of the application thread. The settings are applied to all computations within that ``task_arena`` or started by that application thread.\n\n\nFor better control over floating point behavior, a thread may capture the current settings in a task group context. Do it at context creation with a special flag passed to the constructor:\n\n::\n    \n    task_group_context ctx( task_group_context::isolated,\n                        task_group_context::default_traits | task_group_context::fp_settings );\n\n\nOr call the ``capture_fp_settings`` method:\n\n::\n    \n     task_group_context ctx;\n    ctx.capture_fp_settings();\n\n\nYou can then pass the task group context to most parallel algorithms, including ``flow::graph``, to ensure that all tasks related to this algorithm use the specified floating-point settings. \nIt is possible to execute the parallel algorithms with different floating-point settings captured to separate contexts, even at the same time.\n\nFloating-point settings captured to a task group context prevail over the settings captured during task scheduler initialization. It means, if a context is passed to a parallel algorithm, the floating-point settings captured to the context are used. \nOtherwise, if floating-point settings are not captured to the context, or a context is not explicitly specified, the settings captured during the task arena initialization are used.\n\nIn a nested call to a parallel algorithm that does not use the context of a task group with explicitly captured floating-point settings, the outer-level settings are used. \nIf none of the outer-level contexts capture floating-point settings, the settings captured during task arena initialization are used.\n\nIt guarantees that: \n\n* Floating-point settings are applied to all tasks executed within a task arena, if they are captured: \n\n  * To a task group context. \n  * During the arena initialization. \n\n* A call to a oneTBB parallel algorithm does not change the floating-point settings of the calling thread, even if the algorithm uses different settings.\n\n.. note:: \n    The guarantees above apply only to the following conditions:\n    \n    * A user code inside a task should: \n      \n      * Not change the floating-point settings.\n      * Revert any modifications. \n      * Restore previous settings before the end of the task.\n\n    * oneTBB task scheduler observers are not used to set or modify floating point settings.\n\n    Otherwise, the stated guarantees are not valid and the behavior related to floating-point settings is undefined.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Flow-Graph-exception-tips.rst",
    "content": ".. _Flow_Graph_exception_tips:\n\nFlow Graph Tips for Exception Handling and Cancellation\n=======================================================\n\n\nThe execution of a flow graph can be canceled directly or as a result of\nan exception that propagates beyond a node's body. You can then\noptionally reset the graph so that it can be re-executed.\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/catching_exceptions\n   ../tbb_userguide/cancel_a_graph\n   ../tbb_userguide/use_graph_reset\n   ../tbb_userguide/cancelling_nested_parallelism\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Flow-Graph-waiting-tips.rst",
    "content": ".. _Flow_Graph_waiting_tips:\n\nFlow Graph Tips for Waiting for and Destroying a Flow Graph\n===========================================================\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/always_use_wait_for_all\n   ../tbb_userguide/avoid_dynamic_node_removal\n   ../tbb_userguide/destroy_graphs_outside_main_thread\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Flow_Graph.rst",
    "content": ".. _Flow_Graph:\n\nParallelizing Data Flow and Dependence Graphs\n=============================================\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/Parallelizing_Flow_Graph\n   ../tbb_userguide/Basic_Flow_Graph_concepts\n   ../tbb_userguide/Graph_Main_Categories\n   ../tbb_userguide/Predefined_Node_Types\n   ../tbb_userguide/Flow_Graph_Tips\n   ../tbb_userguide/estimate_flow_graph_performance\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Flow_Graph_Buffering_in_Nodes.rst",
    "content": ".. _Flow_Graph_Buffering_in_Nodes:\n\nFlow Graph Basics: Buffering and Forwarding\n===========================================\n\n\n|full_name| flow graph nodes use messages\nto communicate data and to enforce dependencies. If a node passes a\nmessage successfully to any successor, no further action is taken with\nthe message by that node. As noted in the section on Single-push vs.\nBroadcast-push, a message may be passed to one or to multiple\nsuccessors, depending on the type of the node, how many successors are\nconnected to the node, and whether the message is pushed or pulled.\n\n\nThere are times when a node cannot successfully push a message to any\nsuccessor. In this case what happens to the message depends on the type\nof the node. The two possibilities are:\n\n\n-  The node stores the message to be forwarded later.\n-  The node discards the message.\n\n\nIf a node discards messages that are not forwarded, and this behavior is\nnot desired, the node should be connected to a buffering node that does\nstore messages that cannot be pushed.\n\n\nIf a message has been stored by a node, there are two ways it can be\npassed to another node:\n\n\n-  A successor to the node can pull the message using ``try_get()`` or\n   ``try_reserve()``.\n-  A successor can be connected using ``make_edge()``.\n\n\nIf a ``try_get()`` successfully forwards a message, it is removed from\nthe node that stored it. If a node is connected using ``make_edge`` the\nnode will attempt to push a stored message to the new successor.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Flow_Graph_Message_Passing_Protocol.rst",
    "content": ".. _Flow_Graph_Message_Passing_Protocol:\n\nFlow Graph Basics: Message Passing Protocol\n===========================================\n\n\n|full_name| flow graph operates by passing\nmessages between nodes. A node may not be able to receive and process a\nmessage from its predecessor. For a graph to operate most-efficiently,\nif this occurs the state of the edge between the nodes can change its\nstate to pull so when the successor is able to handle a message it can\nquery its predecessor to see if a message is available. If the edge did\nnot reverse from push to pull, the predecessor node would have to\nrepeatedly attempt to forward its message until the successor accepts\nit. This would consume resources needlessly.\n\n\nOnce the edge is in pull mode, when the successor is not busy, it will\ntry to pull a message from a predecessor.\n\n\n#. If a predecessor has a message, the successor will process it and the\n   edge will remain in pull mode.\n#. If the predecessor has no message, the edge between the nodes will\n   switch from pull to push mode.\n\n\nThe state diagram of this Push-Pull protocol is:\n\n\n.. container:: fignone\n   :name: basic_push_pull\n\n\n   **The dynamic push / pull protocol.**\n\n\n   .. container:: imagecenter\n\n\n      |image0|\n\n\n.. |image0| image:: Images/flow_graph_message_passing_protocol.jpg\n   :width: 442px\n   :height: 196px\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Flow_Graph_Reservation.rst",
    "content": ".. _Flow_Graph_Reservation:\n\nFlow Graph Basics: Reservation\n==============================\n\n\n|full_name| flow graph\n``join_node`` has four possible policies: ``queueing``, ``reserving``,\n``key_matching`` and ``tag_matching``. ``join_nodes`` need messages at\nevery input before they can create an output message. The reserving\n``join_node`` does not have internal buffering, and it does not pull\nmessages from its inputs until it has a message at each input. To create\nan output message it temporarily reserves a message at each input port,\nand only if all input ports succeed reserving messages will an output\nmessage be created. If any input port fails to reserve a message, no\nmessage will be pulled by the ``join_node``.\n\n\nTo support the reserving ``join_node`` some nodes support\n**reservation** of their outputs. The way reservation works is:\n\n\n-  When a node connected to a reserving ``join_node`` in push state\n   tries to push a message, the ``join_node`` always rejects the push\n   and the edge connecting the nodes is switched to pull mode.\n-  The reserving input port calls ``try_reserve`` on each edge in pull\n   state. This may fail; if so, the reserving input port switches that\n   edge to push state, and tries to reserve the next node connected by\n   an edge in pull state. While the input port's predecessor is in\n   reserved state, no other node can retrieve the reserved value.\n-  If each input port successfully reserves an edge in pull state, the\n   reserving ``join_node`` will create a message using the reserved\n   messages and try to push the resulting message to any nodes connected\n   to it.\n-  If the message is successfully pushed to a successor, the\n   predecessors that were reserved are signaled that the messages were\n   used (by calling ``try_consume()``.) Those messages will be discarded\n   by the predecessor nodes, because they have been successfully pushed.\n-  If the message was not successfully pushed to any successor, the\n   predecessors that were reserved are signaled that the messages were\n   not used (by calling ``try_release()``.) At this point, the messages\n   may be pushed to or pulled by other nodes.\n\n\nBecause the reserving ``join_node`` will only attempt to push when each\ninput port has at least one edge in a pull state, and will only attempt\nto create and push a message if all input ports succeed reserving\nmessages, at least one of the predecessors to each of the reserving\n``join_node`` input ports must be reservable.\n\n\nThe following example demonstrates a reserving ``join_node``'s behavior.\n``buffer_nodes`` buffer their output, so they accept a switch of their\noutput edge from push to pull mode. ``broadcast_nodes`` do not buffer\nmessages and do not support ``try_get()`` or ``try_reserve()``.\n\n\n::\n\n\n   void run_example2() {  // example for Flow_Graph_Reservation.xml\n       graph g;\n       broadcast_node<int> bn(g);\n       buffer_node<int> buf1(g);\n       buffer_node<int> buf2(g);\n       typedef join_node<tuple<int,int>, reserving> join_type;\n       join_type jn(g);\n       buffer_node<join_type::output_type> buf_out(g);\n       join_type::output_type tuple_out;\n       int icnt;\n\n\n       // join_node predecessors are both reservable buffer_nodes\n       make_edge(buf1,input_port<0>(jn));\n       make_edge(bn,input_port<0>(jn));      // attach a broadcast_node\n       make_edge(buf2,input_port<1>(jn));\n       make_edge(jn, buf_out);\n       bn.try_put(2);\n       buf1.try_put(3);\n       buf2.try_put(4);\n       buf2.try_put(7);\n       g.wait_for_all();\n       while (buf_out.try_get(tuple_out)) {\n           printf(\"join_node output == (%d,%d)\\n\",get<0>(tuple_out), get<1>(tuple_out) );\n       }\n       if(buf1.try_get(icnt)) printf(\"buf1 had %d\\n\", icnt);\n       else printf(\"buf1 was empty\\n\");\n       if(buf2.try_get(icnt)) printf(\"buf2 had %d\\n\", icnt);\n       else printf(\"buf2 was empty\\n\");\n   }\n\n\nIn the example above, port 0 of the reserving ``join_node`` ``jn`` has\ntwo predecessors: a ``buffer_node`` ``buf1`` and a ``broadcast_node``\n``bn``. Port 1 of the ``join_node`` has one predecessor, ``buffer_node``\n``buf2``.\n\n\n.. container:: fignone\n   :name: reserve_step1\n\n\n   .. container:: imagecenter\n\n\n      |image0|\n\n\nWe will discuss one possible execution sequence (the scheduling of tasks\nmay differ slightly, but the end result will be the same.)\n\n\n::\n\n\n       bn.try_put(2);\n\n\n``bn`` attempts to forward 2 to ``jn``. ``jn`` does not accept the value\nand the arc from ``bn`` to ``jn`` reverses. Because neither bn nor jn\nbuffer messages, the message is dropped. Because not all the inputs to\n``jn`` have available predecessors, ``jn`` does nothing further.\n\n\n.. CAUTION:: \n   Any node which does not support reservation will not work correctly\n   when attached to a reserving ``join_node``. This program demonstrates\n   why this occurs; connecting non-reserving nodes to nodes requiring\n   support for reservation is **not** recommended practice.\n\n\n.. container:: fignone\n   :name: reserve_step2\n\n\n   .. container:: imagecenter\n\n\n      |image1|\n\n\n::\n\n\n       buf1.try_put(3);\n\n\n``buf1`` attempts to forward 3 to ``jn``. ``jn`` does not accept the\nvalue and the arc from ``buf1`` to ``jn`` reverses. Because not all the\ninputs to ``jn`` have available predecessors, ``jn`` does nothing\nfurther.\n\n\n.. container:: fignone\n   :name: reserve_step3\n\n\n   .. container:: imagecenter\n\n\n      |image2|\n\n\n::\n\n\n       buf2.try_put(4);\n\n\n``buf2`` attempts to forward 4 to ``jn``. ``jn`` does not accept the\nvalue and the arc from ``buf2`` to ``jn`` reverses. Now both inputs of\n``jn`` have predecessors, a task to build and forward a message from\n``jn`` will be spawned. We assume that task is not yet executing.\n\n\n.. container:: fignone\n   :name: reserve_step4\n\n\n   .. container:: imagecenter\n\n\n      |image3|\n\n\n::\n\n\n       buf2.try_put(7);\n\n\n``buf2`` has no successor (because the arc to ``jn`` is reversed,) so it\nstores the value 7.\n\n\n.. container:: fignone\n   :name: reserve_step5\n\n\n   .. container:: imagecenter\n\n\n      |image4|\n\n\nNow the task spawned to run ``jn`` runs.\n\n\n-  ``jn`` tries to reserve ``bn``, which fails. The arc to ``bn``\n   switches back to the forward direction.\n-  ``jn`` tries to reserve ``buf1``, which succeeds (reserved nodes are\n   colored grey.) ``jn`` receives the value 3 from ``buf1``, but it\n   remains in ``buf1`` (in case the attempt to forward a message from\n   ``jn`` fails.)\n-  ``jn`` tries to reserve ``buf2``, which succeeds. ``jn`` receives the\n   value 4 from ``buf2``, but it remains in ``buf2``.\n-  ``jn`` constructs the output message ``tuple<3,4>``.\n\n\n.. container:: fignone\n   :name: reserve_step6\n\n\n   .. container:: imagecenter\n\n\n      |image5|\n\n\nNow ``jn`` pushes its message to ``buf_out``, which accepts it. Because\nthe push succeeded, ``jn`` signals ``buf1`` and ``buf2`` that the\nreserved values were used, and the buffers discard those values. Now\n``jn`` attempts to reserve again.\n\n\n-  No attempt to pull from ``bn`` is made, because the edge from ``bn``\n   to ``jn`` is in push state.\n-  ``jn`` tries to reserve ``buf1``, which fails. The arc to ``buf1``\n   switches back to the forward direction.\n-  ``jn`` does not try any further actions.\n\n\n.. container:: fignone\n   :name: reserve_step7\n\n\n   .. container:: imagecenter\n\n\n      |image6|\n\n\nNo further activity occurs in the graph, and the ``wait_for_all()`` will\ncomplete. The output of this code is\n\n\n::\n\n\n   join_node output == (3,4)\n   buf1 was empty\n   buf2 had 7\n\n\n.. |image0| image:: Images/flow_graph_reserve_buffers_1.png\n   :width: 400px\n   :height: 222px\n.. |image1| image:: Images/flow_graph_reserve_buffers_2.png\n   :width: 400px\n   :height: 222px\n.. |image2| image:: Images/flow_graph_reserve_buffers_3.png\n   :width: 400px\n   :height: 222px\n.. |image3| image:: Images/flow_graph_reserve_buffers_4.png\n   :width: 400px\n   :height: 222px\n.. |image4| image:: Images/flow_graph_reserve_buffers_5.png\n   :width: 400px\n   :height: 222px\n.. |image5| image:: Images/flow_graph_reserve_buffers_6.png\n   :width: 400px\n   :height: 222px\n.. |image6| image:: Images/flow_graph_reserve_buffers_7.png\n   :width: 400px\n   :height: 222px\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Flow_Graph_Single_Vs_Broadcast.rst",
    "content": ".. _Flow_Graph_Single_Vs_Broadcast:\n\nFlow Graph Basics: Single-push vs. Broadcast-push\n=================================================\n\n\nNodes in the |full_name| flow graph\ncommunicate by pushing and pulling messages. Two policies for pushing\nmessages are used, depending on the type of the node:\n\n\n-  **single-push**: No matter how many successors to the node exist and\n   are able to accept a message, each message will be only sent to one\n   successor.\n-  **broadcast-push**: A message will be pushed to every successor which\n   is connected to the node by an edge in push mode, and which accepts\n   the message.\n\n\nThe following code demonstrates this difference:\n\n\n::\n\n\n   using namespace oneapi::tbb::flow;\n\n\n   std::atomic<size_t> g_cnt;\n\n\n   struct fn_body1 {\n       std::atomic<size_t> &body_cnt;\n       fn_body1(std::atomic<size_t> &b_cnt) : body_cnt(b_cnt) {}\n       continue_msg operator()( continue_msg /*dont_care*/) {\n           ++g_cnt;\n           ++body_cnt;\n           return continue_msg();\n       }\n   };\n\n\n   void run_example1() {  // example for Flow_Graph_Single_Vs_Broadcast.xml\n       graph g;\n       std::atomic<size_t> b1;  // local counts\n       std::atomic<size_t> b2;  // for each function _node body\n       std::atomic<size_t> b3;  //\n       function_node<continue_msg> f1(g,serial,fn_body1(b1));\n       function_node<continue_msg> f2(g,serial,fn_body1(b2));\n       function_node<continue_msg> f3(g,serial,fn_body1(b3));\n       buffer_node<continue_msg> buf1(g);\n       //\n       // single-push policy\n       //\n       g_cnt = b1 = b2 = b3 = 0;\n       make_edge(buf1,f1);\n       make_edge(buf1,f2);\n       make_edge(buf1,f3);\n       buf1.try_put(continue_msg());\n       buf1.try_put(continue_msg());\n       buf1.try_put(continue_msg());\n       g.wait_for_all();\n       printf( \"after single-push test, g_cnt == %d, b1==%d, b2==%d, b3==%d\\n\", (int)g_cnt, (int)b1, (int)b2, (int)b3);\n       remove_edge(buf1,f1);\n       remove_edge(buf1,f2);\n       remove_edge(buf1,f3);\n       //\n       // broadcast-push policy\n       //\n       broadcast_node<continue_msg> bn(g);\n       g_cnt = b1 = b2 = b3 = 0;\n       make_edge(bn,f1);\n       make_edge(bn,f2);\n       make_edge(bn,f3);\n       bn.try_put(continue_msg());\n       bn.try_put(continue_msg());\n       bn.try_put(continue_msg());\n       g.wait_for_all();\n       printf( \"after broadcast-push test, g_cnt == %d, b1==%d, b2==%d, b3==%d\\n\", (int)g_cnt, (int)b1, (int)b2, (int)b3);\n   }\n\n\nThe output of this code is\n\n\n::\n\n\n   after single-push test, g_cnt == 3, b1==3, b2==0, b3==0\n   after broadcast-push test, g_cnt == 9, b1==3, b2==3, b3==3\n\n\nThe single-push test uses a ``buffer_node``, which has a \"single-push\"\npolicy for forwarding messages. Putting three messages to the\n``buffer_node`` results in three messages being pushed. Notice also only\nthe first ``function_node`` is sent to; in general there is no policy\nfor which node is pushed to if more than one successor can accept.\n\n\nThe broadcast-push test uses a ``broadcast_node``, which will push any\nmessage it receives to all accepting successors. Putting three messages\nto the ``broadcast_node`` results in a total of nine messages pushed to\nthe ``function_nodes``.\n\n\nOnly nodes designed to buffer (hold and forward received messages) have\na \"single-push\" policy; all other nodes have a \"broadcast-push\" policy.\n\nPlease see the :ref:`broadcast_or_send` section of\n:ref:`Flow_Graph_Tips`, and :ref:`Flow_Graph_Buffering_in_Nodes` for more\ninformation.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Flow_Graph_Tips.rst",
    "content": ".. _Flow_Graph_Tips:\n\nFlow Graph Tips and Tricks\n==========================\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/Flow-Graph-waiting-tips\n   ../tbb_userguide/Flow_Graph_making_edges_tips\n   ../tbb_userguide/Flow_Graph_nested_parallelism_tips\n   ../tbb_userguide/Flow_Graph_resource_tips\n   ../tbb_userguide/Flow-Graph-exception-tips"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Flow_Graph_exception_tips.rst",
    "content": ".. _Flow_Graph_exception_tips:\n\nFlow Graph Tips for Exception Handling and Cancellation\n=======================================================\n\n\nThe execution of a flow graph can be canceled directly or as a result of\nan exception that propagates beyond a node's body. You can then\noptionally reset the graph so that it can be re-executed.\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/catching_exceptions\n   ../tbb_userguide/cancel_a_graph\n   ../tbb_userguide/use_graph_reset\n   ../tbb_userguide/cancelling_nested_parallelism"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Flow_Graph_making_edges_tips.rst",
    "content": ".. _Flow_Graph_making_edges_tips:\n\nFlow Graph Tips on Making Edges\n===============================\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/use_make_edge\n   ../tbb_userguide/broadcast_or_send\n   ../tbb_userguide/communicate_with_nodes\n   ../tbb_userguide/use_input_node\n   ../tbb_userguide/avoiding_data_races\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Flow_Graph_nested_parallelism_tips.rst",
    "content": ".. _Flow_Graph_nested_parallelism_tips:\n\nFlow Graph Tips on Nested Parallelism\n=====================================\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/use_nested_algorithms\n   ../tbb_userguide/use_nested_flow_graphs"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Flow_Graph_resource_tips.rst",
    "content": ".. _Flow_Graph_resource_tips:\n\nFlow Graph Tips for Limiting Resource Consumption\n=================================================\n\n\nYou may want to control the number of messages allowed to enter parts of\nyour graph, or control the maximum number of tasks in the work pool.\nThere are several mechanisms available for limiting resource consumption\nin a flow graph.\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/use_limiter_node\n   ../tbb_userguide/use_concurrency_limits\n   ../tbb_userguide/create_token_based_system\n   ../tbb_userguide/attach_flow_graph_to_arena"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Flow_Graph_waiting_tips.rst",
    "content": ".. _Flow_Graph_waiting_tips:\n\nFlow Graph Tips for Waiting for and Destroying a Flow Graph\n===========================================================\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/always_use_wait_for_all\n   ../tbb_userguide/avoid_dynamic_node_removal\n   ../tbb_userguide/destroy_graphs_outside_main_thread"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Graph_Main_Categories.rst",
    "content": ".. _Graph_Main_Categories:\n\nGraph Application Categories\n============================\n\n\nMost flow graphs fall into one of two categories:\n\n\n-  **Data flow graphs.** In this type of graph, data is passed along the\n   graph's edges. The nodes receive, transform and then pass along the\n   data messages.\n-  **Dependence graphs.** In this type of graph, the data operated on by\n   the nodes is obtained through shared memory directly and is not\n   passed along the edges.\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/Data_Flow_Graph\n   ../tbb_userguide/Dependence_Graph"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Graph_Object.rst",
    "content": ".. _Graph_Object:\n\nFlow Graph Basics: Graph Object\n===============================\n\n\nConceptually a flow graph is a collection of nodes and edges. Each node\nbelongs to exactly one graph and edges are made only between nodes in\nthe same graph. In the flow graph interface, a graph object represents\nthis collection of nodes and edges, and is used for invoking whole graph\noperations such as waiting for all tasks related to the graph to\ncomplete, resetting the state of all nodes in the graph, and canceling\nthe execution of all nodes in the graph.\n\n\nThe code below creates a graph object and then waits for all tasks\nspawned by the graph to complete. The call to ``wait_for_all`` in this\nexample returns immediately since this is a trivial graph with no nodes\nor edges, and therefore no tasks are spawned.\n\n\n::\n\n\n   graph g;\n   g.wait_for_all();\n\nThe graph object does not own the nodes associated with it. You need to make sure that the graph object's lifetime is longer than the lifetimes of all nodes added to the graph and any activity associated with the graph. \n\n.. tip:: Call ``wait_for_all`` on a graph object before destroying it to make sure all activities are complete. \n\n Even when using smart pointers, be aware of the order of destruction for nodes and the graph to make sure that nodes are not deleted before the graph.\n\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Guiding_Task_Scheduler_Execution.rst",
    "content": ".. _guiding_task_scheduler_execution:\n\nGuiding Task Scheduler Execution\n================================\n\nBy default, the task scheduler tries to use all available computing resources. In some cases,\nyou may want to configure the task scheduler to use only some of them.\n\n.. caution:: Guiding the execution of the task scheduler may cause composability issues.\n\n\n|full_name| provides the ``task_arena`` interface to guide tasks execution within the arena by:\n  \n    - setting the preferred computation units;\n  \n    - restricting part of computation units.\n\nSuch customizations are encapsulated within the ``task_arena::constraints`` structure.\nTo set the limitation, you have to customize the ``task_arena::constraints`` and then pass\nit to the ``task_arena`` instance during the construction or initialization.\n\nThe structure ``task_arena::constraints`` allows to specify the following restrictions:\n\n- Preferred NUMA node\n- Preferred core type\n- The maximum number of logical threads scheduled per single core simultaneously\n- The level of ``task_arena`` concurrency\n\nYou may use the interfaces from ``tbb::info`` namespace to construct the ``tbb::task_arena::constraints``\ninstance. Interfaces from ``tbb::info`` namespace respect the process affinity mask. For instance,\nif the process affinity mask excludes execution on some of the NUMA nodes, then these NUMA nodes are\nnot returned by ``tbb::info::numa_nodes()`` interface.\n\nThe following examples show how to use these interfaces:\n\nSet NUMA Node\n*************\n\nThe execution on systems with non-uniform memory access (NUMA https://en.wikipedia.org/wiki/Non-uniform_memory_access systems)\nmay cause a performance penalty if threads from one NUMA node access the memory allocated on\na different NUMA node. To reduce this overhead, the work may be divided among several ``task_arena``\ninstances, whose execution preference is set to different NUMA nodes. To set execution preference,\nassign a NUMA node identifier to the ``task_arena::constraints::numa_id`` field.\n\n::\n\n    std::vector<tbb::numa_node_id> numa_indexes = tbb::info::numa_nodes();\n    std::vector<tbb::task_arena> arenas(numa_indexes.size());\n    std::vector<tbb::task_group> task_groups(numa_indexes.size());\n\n    for(unsigned j = 0; j < numa_indexes.size(); j++) {\n        arenas[j].initialize(tbb::task_arena::constraints(numa_indexes[j]));\n        arenas[j].execute([&task_groups, &j](){ \n            task_groups[j].run([](){/*some parallel stuff*/});\n        });\n    }\n\n    for(unsigned j = 0; j < numa_indexes.size(); j++) {\n        arenas[j].execute([&task_groups, &j](){ task_groups[j].wait(); });\n    }\n\nSet Core Type\n*************\n\nThe processors with `Intel® Hybrid Technology <https://www.intel.com/content/www/us/en/products/docs/processors/core/core-processors-with-hybrid-technology-brief.html>`_\ncontain several core types, each is suited for different purposes.\nIn most cases, systems with hybrid CPU architecture show reasonable performance without involving additional API calls.\nHowever, in some exceptional scenarios, performance may be tuned by setting the preferred core type.\nTo set the preferred core type for the execution, assign a specific core type identifier to the ``task_arena::constraints::core_type`` field.\n\nThe example shows how to set the most performant core type as preferable for work execution:\n\n::\n\n    std::vector<tbb::core_type_id> core_types = tbb::info::core_types();\n    tbb::task_arena arena(\n        tbb::task_arena::constraints{}.set_core_type(core_types.back())\n    );\n\n    arena.execute( [] {\n        /*the most performant core type is defined as preferred.*/\n    });\n\nLimit The Maximum Number of Threads Simultaneously Scheduled To One Core\n****************************************************************************\n\nThe processors with `Intel® Hyper-Threading Technology <https://www.intel.com/content/www/us/en/architecture-and-technology/hyper-threading/hyper-threading-technology.html>`_\nallow more than one thread to run on each core simultaneously. However, there might be situations\nwhen there is need to lower the number of simultaneously running threads per core. In such cases,\nassign the desired value to the ``task_arena::constraints::max_threads_per_core`` field.\n\nThe example shows how to allow only one thread to run on each core at a time:\n\n::\n\n    tbb::task_arena no_ht_arena( tbb::task_arena::constraints{}.set_max_threads_per_core(1) );\n    no_ht_arena.execute( [] {\n        /*parallel work*/\n    });\n\nA more composable way to limit the number of threads executing on cores is by setting the maximal\nconcurrency of the ``tbb::task_arena``: \n\n::\n\n    int no_ht_concurrency = tbb::info::default_concurrency(\n        tbb::task_arena::constraints{}.set_max_threads_per_core(1)\n    );\n    tbb::task_arena arena( no_ht_concurrency );\n    arena.execute( [] {\n        /*parallel work*/\n    });\n\nSimilarly to the previous example, the number of threads inside the arena is equal to the\nnumber of available cores. However, this one results in fewer overheads and better composability\nby imposing a less constrained execution.\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/How_Task_Scheduler_Works.rst",
    "content": ".. _How_Task_Scheduler_Works.rst:\n\nHow Task Scheduler Works\n========================\n\n\nWhile the task scheduler is not bound to any particular type of parallelism, \nit was designed to work efficiently for fork-join parallelism with lots of forks.\nThis type of parallelism is typical for parallel algorithms such as `oneapi::tbb::parallel_for\n<https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/algorithms/functions/parallel_for_func>`_.\n\nLet's consider the mapping of fork-join parallelism on the task scheduler in more detail. \n\nThe scheduler runs tasks in a way that tries to achieve several targets simultaneously: \n - Enable as many threads as possible, by creating enough job, to achieve actual parallelism\n - Preserve data locality to make a single thread execution more efficient  \n - Minimize both memory demands and cross-thread communication to reduce an overhead \n\nTo achieve this, a balance between depth-first and breadth-first execution strategies \nmust be reached. Assuming that the task graph is finite, depth-first is better for \na sequential execution because:\n\n- **Strike when the cache is hot**. The deepest tasks are the most recently created tasks and therefore are the hottest in the cache.\n  Also, if they can be completed, tasks that depend on it can continue executing, and though not the hottest in a cache, \n  they are still warmer than the older tasks deeper in the dequeue.\n \n- **Minimize space**. Execution of the shallowest task leads to the breadth-first unfolding of a graph. It creates an exponential\n  number of nodes that co-exist simultaneously. In contrast, depth-first execution creates the same number \n  of nodes, but only a linear number can exists at the same time, since it creates a stack of other ready \n  tasks.\n  \nEach thread has its deque of tasks that are ready to run. When a \nthread spawns a task, it pushes it onto the bottom of its deque.\n\nWhen a thread participates in the evaluation of tasks, it constantly executes \na task obtained by the first rule that applies from the roughly equivalent ruleset:\n\n- Get the task returned by the previous one, if any.\n\n- Take a task from the bottom of its deque, if any.\n\n- Steal a task from the top of another randomly chosen deque. If the \n  selected deque is empty, the thread tries again to execute this rule until it succeeds.\n\nRule 1 is described in :doc:`Task Scheduler Bypass <Task_Scheduler_Bypass>`. \nThe overall effect of rule 2 is to execute the *youngest* task spawned by the thread, \nwhich causes the depth-first execution until the thread runs out of work. \nThen rule 3 applies. It steals the *oldest* task spawned by another thread, \nwhich causes temporary breadth-first execution that converts potential parallelism \ninto actual parallelism.\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Initializing_and_Terminating_the_Library.rst",
    "content": ".. _Initializing_and_Terminating_the_Library:\n\nInitializing and Terminating the Library\n========================================\n\n|full_name| automatically initializes the task scheduler.\nThe initialization process is involved when a thread uses task scheduling services the first time,\nfor example any parallel algorithm, flow graph or task group.\nThe termination happens when the last such thread exits.\n\nExplicit Library Finalization\n*****************************\n\noneTBB supports an explicit library termination as a preview feature.\nThe ``oneapi::tbb::finalize`` function called with an instance of class ``oneapi::tbb::task_scheduler_handle`` blocks the calling thread\nuntil all worker threads implicitly created by the library have completed.\nIf waiting for thread completion is not safe, e.g. may result in a deadlock\nor called inside a task, a parallel algorithm, or a flow graph node, the method fails.\n\nIf you know how many active ``oneapi::tbb::task_scheduler_handle`` instances exist in the program,\nit is recommended to call ``oneapi::tbb::release`` function on all but the last one, then call ``oneapi::tbb::finalize`` for the last instance.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Iterating_Over_a_Concurrent_Queue_for_Debugging.rst",
    "content": ".. _Iterating_Over_a_Concurrent_Queue_for_Debugging:\n\nIterating Over a Concurrent Queue for Debugging\n===============================================\n\n\nThe template classes ``concurrent_queue`` and\n``concurrent_bounded_queue`` support STL-style iteration. This support\nis intended only for debugging, when you need to dump a queue. The\niterators go forwards only, and are too slow to be very useful in\nproduction code. If a queue is modified, all iterators pointing to it\nbecome invalid and unsafe to use. The following snippet dumps a queue.\nThe ``operator<<`` is defined for a ``Foo``.\n\n\n::\n\n\n   concurrent_queue<Foo> q;\n   ...\n   typedef concurrent_queue<Foo>::const_iterator iter;\n   for(iter i(q.unsafe_begin()); i!=q.unsafe_end(); ++i ) {\n       cout << *i;\n   }\n\n\nThe prefix ``unsafe_`` on the methods is a reminder that they are not\nconcurrency safe.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Lambda_Expressions.rst",
    "content": ".. _Lambda_Expressions:\n\nLambda Expressions\n==================\n\n\nC++11 lambda expressions make the |full_name|\n``parallel_for`` much easier to use. A lambda expression lets\nthe compiler do the tedious work of creating a function object.\n\n\nBelow is the example from the previous section, rewritten with a lambda\nexpression. The lambda expression, replaces both the declaration and construction of function object ``ApplyFoo`` in the\nexample of the previous section.\n\n\n.. literalinclude:: ./examples/parallel_for_lambda_example_1.cpp\n    :language: c++\n    :start-after: /*begin_parallel_for_lambda_1*/\n    :end-before: /*end_parallel_for_lambda_1*/\n\nThe [=] introduces the lambda expression. The expression creates a\nfunction object very similar to ``ApplyFoo``. When local variables like\n``a`` and ``n`` are declared outside the lambda expression, but used\ninside it, they are \"captured\" as fields inside the function object. The\n[=] specifies that capture is by value. Writing [&] instead would\ncapture the values by reference. After the [=] is the parameter list and\ndefinition for the ``operator()`` of the generated function object. The\ncompiler documentation says more about lambda expressions and other\nimplemented C++11 features. It is worth reading more complete\ndescriptions of lambda expressions than can fit here, because lambda\nexpressions are a powerful feature for using template libraries in\ngeneral.\n\n\nC++11 support is off by default in the compiler. The following table\nshows the option for turning it on.\n\n\n.. container:: tablenoborder\n\n\n   .. list-table::\n      :header-rows: 1\n\n      * -     Environment\n        -     Intel® C++ Compiler Classic\n        -     Intel® oneAPI DPC++/C++ Compiler\n      * -     Windows\\* OS systems\n        -     \\ ``icl /Qstd=c++11 foo.cpp``\n        -     \\ ``icx /Qstd=c++11 foo.cpp``\n      * -     Linux\\* OS systems\n        -     \\ ``icc -std=c++11 foo.cpp``\n        -     \\ ``icx -std=c++11 foo.cpp``\n\n\n\n\nFor further compactness, oneTBB has a form of ``parallel_for`` expressly\nfor parallel looping over a consecutive range of integers. The\nexpression ``parallel_for(first,last,step,f)`` is like writing\n``for(auto i=first; i<last; i+=step)f(i)`` except that\neach f(i) can be evaluated in parallel if resources permit. The ``step``\nparameter is optional. Here is the previous example rewritten in the\ncompact form:\n\n.. literalinclude:: ./examples/parallel_for_lambda_example_2.cpp\n    :language: c++\n    :start-after: /*begin_parallel_for_lambda_2*/\n    :end-before: /*end_parallel_for_lambda_2*/\n\nThe compact form supports only unidimensional iteration spaces of\nintegers and the automatic chunking feature detailed on the following\nsection.\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Linux_C_Dynamic_Memory_Interface_Replacement.rst",
    "content": ".. _Linux_C_Dynamic_Memory_Interface_Replacement:\n\nLinux\\* OS C/C++ Dynamic Memory Interface Replacement\n=====================================================\n\n\nRelease version of the proxy library is ``libtbbmalloc_proxy.so``,\ndebug version is ``libtbbmalloc_proxy_debug.so``.\n\n\nThe following dynamic memory functions are replaced:\n\n\n-  Standard C library functions: ``malloc``, ``calloc``, ``realloc``,\n   ``free``, (added in C11) ``aligned_alloc``\n\n\n-  Standard POSIX\\* function: ``posix_memalign``\n\n\n-  Obsolete functions: ``valloc``, ``memalign``, ``pvalloc``,\n   ``mallopt``\n\n\n-  Replaceable global C++ operators ``new`` and ``delete``\n\n\n-  GNU C library (glibc) specific functions: ``malloc_usable_size``,\n   ``__libc_malloc``, ``__libc_calloc``, ``__libc_memalign``,\n   ``__libc_free``, ``__libc_realloc``, ``__libc_pvalloc``,\n   ``__libc_valloc``\n\n\nYou can do the replacement either by loading the proxy library at\nprogram load time using the ``LD_PRELOAD`` environment variable (without\nchanging the executable file), or by linking the main executable file\nwith the proxy library.\n\n\nThe OS program loader must be able to find the proxy library and the\nscalable memory allocator library at program load time. For that you may\ninclude the directory containing the libraries in the\n``LD_LIBRARY_PATH`` environment variable or add it to\n``/etc/ld.so.conf``.\n\n\nThere are limitations for dynamic memory replacement:\n\n\n-  glibc memory allocation hooks, such as ``__malloc_hook``, are not\n   supported.\n\n\n-  Mono is not supported.\n\n\n.. container:: section\n\n\n   .. rubric:: Examples\n      :class: sectiontitle\n\n   These examples show how to set ``LD_PRELOAD`` and how to link a\n   program to use the memory allocation replacements.\n\n\n   ::\n\n\n      # Set LD_PRELOAD to load the release version of the proxy library\n      LD_PRELOAD=libtbbmalloc_proxy.so \n      # Link with the release version of the proxy library\n      g++ foo.o bar.o -ltbbmalloc_proxy -o a.out\n\n\n   To use the debug version of the library, replace *tbbmalloc_proxy*\n   with *tbbmalloc_proxy_debug* in the above examples.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Linux_OS.rst",
    "content": ".. _Linux_OS:\n\nLinux\\* \n=======\n\n\nThis section uses *<tbb_install_dir>* to indicate the top-level\ninstallation directory. The following table describes the subdirectory\nstructure for Linux\\*, relative to *<tbb_install_dir>*\n\n.. container:: tablenoborder\n\n  .. list-table:: \n    :header-rows: 1\n\n    * - Item     \n      - Location     \n      - Environment Variable     \n    * - Header files     \n      - | ``include/oneapi/tbb.h``\n\t| ``include/oneapi/tbb/*.h``     \n      - ``CPATH``     \n    * - Shared libraries     \n      - ``lib/<arch>/<lib><variant>.so.<version>``\n      - | ``LIBRARY_PATH``\n\t| ``LD_LIBRARY_PATH``\n\nWhere:\n\n* ``<arch>`` - ``ia32`` or ``intel64``\n  \n   .. note:: Starting with oneTBB 2022.0, 32-bit binaries are supported only by the open-source version of the library. \n\n* ``<lib>`` - ``libtbb``, ``libtbbmalloc``, ``libtbbmalloc_proxy`` or ``libtbbbind``\n* ``<variant>`` - ``_debug`` or empty\n* ``<version>`` - binary version in a form of ``<major>.<minor>``\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Lock_Pathologies.rst",
    "content": ".. _Lock_Pathologies:\n\nLock Pathologies\n================\n\n\nLocks can introduce performance and correctness problems. If you are new\nto locking, here are some of the problems to avoid:\n\n\n.. container:: section\n\n\n   .. rubric:: Deadlock\n      :class: sectiontitle\n\n   Deadlock happens when threads are trying to acquire more than one\n   lock, and each holds some of the locks the other threads need to\n   proceed. More precisely, deadlock happens when:\n\n\n   -  There is a cycle of threads\n\n\n   -  Each thread holds at least one lock on a mutex, and is waiting on\n      a mutex for which the *next* thread in the cycle already has a\n      lock.\n\n\n   -  No thread is willing to give up its lock.\n\n\n   Think of classic gridlock at an intersection – each car has\n   \"acquired\" part of the road, but needs to \"acquire\" the road under\n   another car to get through. Two common ways to avoid deadlock are:\n\n\n   -  Avoid needing to hold two locks at the same time. Break your\n      program into small actions in which each can be accomplished while\n      holding a single lock.\n\n\n   -  Always acquire locks in the same order. For example, if you have\n      \"outer container\" and \"inner container\" mutexes, and need to\n      acquire a lock on one of each, you could always acquire the \"outer\n      sanctum\" one first. Another example is \"acquire locks in\n      alphabetical order\" in a situation where the locks have names. Or\n      if the locks are unnamed, acquire locks in order of the mutex’s\n      numerical addresses.\n\n\n   -  Use atomic operations instead of locks.\n\n\n.. container:: section\n\n\n   .. rubric:: Convoying\n      :class: sectiontitle\n\n   Another common problem with locks is *convoying*. Convoying occurs\n   when the operating system interrupts a thread that is holding a lock.\n   All other threads must wait until the interrupted thread resumes and\n   releases the lock. Fair mutexes can make the situation even worse,\n   because if a waiting thread is interrupted, all the threads behind it\n   must wait for it to resume.\n\n\n   To minimize convoying, try to hold the lock as briefly as possible.\n   Precompute whatever you can before acquiring the lock.\n\n\n   To avoid convoying, use atomic operations instead of locks where\n   possible.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Mac_OS.rst",
    "content": ".. _Mac_OS:\n\nmacOS\\*\n=======\n\nThis section uses *<install_dir>* to indicate the top-level installation directory.\nThe following table describes the subdirectory structure for macOS\\*, relative to *<install_dir>*.\n\n.. container:: tablenoborder\n\n   .. list-table:: \n      :header-rows: 1\n\n      * - Item     \n        - Location     \n        - Environment Variable     \n      * - Header files     \n        - | ``include/oneapi/tbb.h``\n \t  | ``include/oneapi/tbb/*.h``     \n        - ``CPATH`` \n      * - Shared libraries\n        - ``lib/<lib><variant>.<version>.dylib``\n        - | ``LIBRARY_PATH``\n\t  | ``DYLD_LIBRARY_PATH``\n\nwhere\n\n* ``<lib>`` - ``libtbb``, ``libtbbmalloc`` or ``libtbbmalloc_proxy``\n\n* ``<variant>`` - ``_debug`` or empty\n\n* ``<version>`` - binary version in a form of ``<major>.<minor>``\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Mapping_Nodes2Tasks.rst",
    "content": ".. _Mapping_Nodes2Tasks:\n\nFlow Graph Basics: Mapping Nodes to Tasks\n=========================================\n\n\nThe following figure shows the timeline for one possible execution of\nthe two node graph example in the previous section. The bodies of n and\nm will be referred to as λ\\ :sub:`n` and λ\\ :sub:`m`, respectively. The\nthree calls to try_put spawn three tasks; each one applies the lambda\nexpression, λ\\ :sub:`n`, on one of the three input messages. Because n\nhas unlimited concurrency, these tasks can execute concurrently if there\nare enough threads available. The call to ``g.wait_for_all()`` blocks until\nthere are no tasks executing in the graph. As with other ``wait_for_all``\nfunctions in oneTBB, the thread that calls ``wait_for_all`` is not spinning\nidly during this time, but instead can join in executing other tasks\nfrom the work pool.\n\n\n.. container:: fignone\n\n\n   **Execution Timeline of a Two Node Graph**\n\n\n   .. container:: imagecenter\n\n\n      |image0|\n\n\nAs each task from n finishes, it puts its output to m, since m is a\nsuccessor of n. Unlike node n, m has been constructed with a concurrency\nlimit of 1 and therefore does not spawn all tasks immediately. Instead,\nit sequentially spawns tasks to execute its body, λ\\ :sub:`m`, on the\nmessages in the order that they arrive. When all tasks are complete, the\ncall to ``wait_for_all`` returns.\n\n\n.. note:: \n   All execution in the flow graph happens asynchronously. The calls to\n   try_put return control to the calling thread quickly, after either\n   immediately spawning a task or buffering the message being passed.\n   Likewise, the body tasks execute the lambda expressions and then put\n   the result to any successor nodes. Only the call to ``wait_for_all``\n   blocks, as it should, and even in this case the calling thread may be\n   used to execute tasks from the oneTBB work pool while it is waiting.\n\n\nThe above timeline shows the sequence when there are enough threads to\nexecute all of the tasks that can be executed in parallel. If there are\nfewer threads, some spawned tasks will need to wait until a thread is\navailable to execute them.\n\n\n.. |image0| image:: Images/execution_timeline2node.jpg\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Memory_Allocation.rst",
    "content": ".. _Memory_Allocation:\n\nMemory Allocation\n=================\n\n\n|full_name| provides several memory\nallocator templates that are similar to the STL template class\nstd::allocator. Two templates, ``scalable_allocator<T>`` and\n``cache_aligned_allocator<T>``, address critical issues in parallel\nprogramming as follows:\n\n\n-  **Scalability**. Problems of scalability arise when using memory\n   allocators originally designed for serial programs, on threads that\n   might have to compete for a single shared pool in a way that allows\n   only one thread to allocate at a time.\n\n\n   Use the ``scalable_allocator<T>`` template to avoid scalability\n   bottlenecks. This template can improve the performance of programs\n   that rapidly allocate and free memory.\n\n\n-  **False sharing**. Problems of sharing arise when two threads access\n   different words that share the same cache line. The problem is that a\n   cache line is the unit of information interchange between processor\n   caches. If one processor modifies a cache line and another processor\n   reads the same cache line, the line must be moved from one processor\n   to the other, even if the two processors are dealing with different\n   words within the line. False sharing can hurt performance because\n   cache lines can take hundreds of clocks to move.\n\n\n   Use the ``cache_aligned_allocator<T>`` template to always allocate on\n   a separate cache line. Two objects allocated by\n   ``cache_aligned_allocator`` are guaranteed to not have false sharing.\n   However, if an object is allocated by ``cache_aligned_allocator`` and\n   another object is allocated some other way, there is no guarantee.\n\n\nYou can use these allocator templates as the *allocator* argument to STL\ntemplate classes.The following code shows how to declare an STL vector\nthat uses ``cache_aligned_allocator``\\ for allocation:\n\n\n::\n\n\n   std::vector<int,cache_aligned_allocator<int> >;\n\n\n.. tip::\n   The functionality of ``cache_aligned_allocator<T>`` comes at some\n   cost in space, because it must allocate at least one cache line’s\n   worth of memory, even for a small object. So use\n   ``cache_aligned_allocator<T>`` only if false sharing is likely to be\n   a real problem.\n\n\nThe scalable memory allocator also provides a set of functions\nequivalent to the C standard library memory management routines but has\nthe ``scalable_`` prefix in their names, as well as the way to easily\nredirect the standard routines to these functions.\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/Which_Dynamic_Libraries_to_Use\n   ../tbb_userguide/Allocator_Configuration\n   ../tbb_userguide/automatically-replacing-malloc\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Migration_Guide/Mixing_Two_Runtimes.rst",
    "content": ".. _Mixing_Two_Runtimes:\n\nMixing two runtimes\n=======================================\n\nThreading Building Blocks (TBB) and oneAPI Threading Building Blocks (oneTBB) can be safely used in\nthe same application. TBB and oneTBB runtimes are named differently and can be loaded safely within\nthe same process. In addition, the ABI versioning is completely different that prevents symbols\nconflicts.\n\nHowever, if both runtimes are loaded into the same process it can lead to\noversubscription because each runtime will use its own pool of threads. It might lead to a\nperformance penalty due to increased number of context switches. To check if both TBB and\noneTBB are loaded to the application, export ``TBB_VERSION=1`` before the application run. If\nboth runtimes are loaded there will be two blocks of output, for example:\n\noneTBB possible output:\n\n.. code:: text\n\n    oneTBB: SPECIFICATION VERSION\t1.0\n    oneTBB: VERSION\t\t2021.2\n    oneTBB: INTERFACE VERSION\t12020\n    oneTBB: TBB_USE_DEBUG\t1\n    oneTBB: TBB_USE_ASSERT\t1\n    oneTBB: TOOLS SUPPORT\tdisabled\n\nTBB possible output:\n\n.. code:: text\n\n    TBB: VERSION\t\t2018.0\n    TBB: INTERFACE VERSION\t10006\n    TBB: BUILD_DATE\t\tMon 01 Mar 2021 01:28:40 PM UTC\n    TBB: BUILD_HOST\t\tlocalhost (x86_64)\n    TBB: BUILD_OS\t\tFedora release 32 (Thirty Two)\n    TBB: BUILD_KERNEL\tLinux 5.8.9-200.fc32.x86_64 #1 SMP Mon Sep 14 18:28:45 UTC 2020\n    TBB: BUILD_GCC\t\tg++ (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9)\n    TBB: BUILD_LIBC\t2.31\n    TBB: BUILD_LD\t\tGNU ld version 2.34-6.fc32\n    TBB: BUILD_TARGET\tintel64 on cc10_libc2.31_kernel5.8.9\n    TBB: BUILD_COMMAND\tg++ -DDO_ITT_NOTIFY -g -O2 -DUSE_PTHREAD -m64 -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -I../../src -I../../src/rml/include -I../../include -I.\n    TBB: TBB_USE_DEBUG\t0\n    TBB: TBB_USE_ASSERT\t0\n    TBB: DO_ITT_NOTIFY\t1\n    TBB: RML\tprivate\n    TBB: Tools support\tdisabled\n\n.. note:: The ``tbbmalloc`` library in oneTBB is fully binary compatible with TBB. \n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Migration_Guide/Task_API.rst",
    "content": ".. _Task_API:\n\nMigrating from low-level task API\n=================================\n\nThe low-level task API of Intel(R) Threading Building Blocks (TBB) was considered complex and hence\nerror-prone, which was the primary reason it had been removed from oneAPI Threading Building Blocks\n(oneTBB). This guide helps with the migration from TBB to oneTBB for the use cases where low-level\ntask API is used.\n\nSpawning of individual tasks\n----------------------------\nFor most use cases, the spawning of individual tasks can be replaced with the use of either\n``oneapi::tbb::task_group`` or ``oneapi::tbb::parallel_invoke``.\n\nFor example, ``RootTask``, ``ChildTask1``, and ``ChildTask2`` are the user-side functors that\ninherit ``tbb::task`` and implement its interface. Then spawning of ``ChildTask1`` and\n``ChildTask2`` tasks that can execute in parallel with each other and waiting on the ``RootTask`` is\nimplemented as:\n\n.. code:: cpp\n\n    #include <tbb/task.h>\n\n    int main() {\n        // Assuming RootTask, ChildTask1, and ChildTask2 are defined.\n        RootTask& root = *new(tbb::task::allocate_root()) RootTask{};\n\n        ChildTask1& child1 = *new(root.allocate_child()) ChildTask1{/*params*/};\n        ChildTask2& child2 = *new(root.allocate_child()) ChildTask2{/*params*/};\n\n        root.set_ref_count(3);\n        \n        tbb::task::spawn(child1);\n        tbb::task::spawn(child2);\n\n        root.wait_for_all();\n    }\n\n\nUsing ``oneapi::tbb::task_group``\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nThe code above can be rewritten using ``oneapi::tbb::task_group``:\n\n.. code:: cpp\n\n    #include <oneapi/tbb/task_group.h>\n\n    int main() {\n        // Assuming ChildTask1, and ChildTask2 are defined.\n        oneapi::tbb::task_group tg;\n        tg.run(ChildTask1{/*params*/});\n        tg.run(ChildTask2{/*params*/});\n        tg.wait();\n    }\n\nThe code looks more concise now. It also enables lambda functions and does not require you to\nimplement ``tbb::task`` interface that overrides the ``tbb::task* tbb::task::execute()`` virtual\nmethod. With this new approach, you work with functors in a C++-standard way by implementing ``void\noperator() const``:\n\n.. code:: cpp\n\n    struct Functor {\n        // Member to be called when object of this type are passed into\n        // oneapi::tbb::task_group::run() method\n        void operator()() const {}\n    };\n\n\nUsing ``oneapi::tbb::parallel_invoke``\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nIt is also possible to use ``oneapi::tbb::parallel_invoke`` to rewrite the original code and make it\neven more concise:\n\n.. code:: cpp\n\n    #include <oneapi/tbb/parallel_invoke.h>\n\n    int main() {\n        // Assuming ChildTask1, and ChildTask2 are defined.\n        oneapi::tbb::parallel_invoke(\n            ChildTask1{/*params*/},\n            ChildTask2{/*params*/}\n        );\n    }\n\n\nAdding more work during task execution\n--------------------------------------\n``oneapi::tbb::parallel_invoke`` follows a blocking style of programming, which means that it\ncompletes only when all functors passed to the parallel pattern complete their execution.\n\nIn TBB, cases when the amount of work is not known in advance and the work needs to be added during\nthe execution of a parallel algorithm were mostly covered by ``tbb::parallel_do`` high-level\nparallel pattern. The ``tbb::parallel_do`` algorithm logic may be implemented using the task API as:\n\n.. code:: cpp\n\n    #include <cstddef>\n    #include <vector>\n    #include <tbb/task.h>\n\n    // Assuming RootTask and OtherWork are defined and implement tbb::task interface.\n\n    struct Task : public tbb::task {\n        Task(tbb::task& root, int i)\n            : m_root(root), m_i(i)\n        {}\n\n        tbb::task* execute() override {\n            // ... do some work for item m_i ...\n\n            if (add_more_parallel_work) {\n                tbb::task& child = *new(m_root.allocate_child()) OtherWork;\n                tbb::task::spawn(child);\n            }\n            return nullptr;\n        }\n\n        tbb::task& m_root;\n        int m_i;\n    };\n\n    int main() {\n        std::vector<int> items = { 0, 1, 2, 3, 4, 5, 6, 7 };\n        RootTask& root = *new(tbb::task::allocate_root()) RootTask{/*params*/};\n        \n        root.set_ref_count(items.size() + 1);\n        \n        for (std::size_t i = 0; i < items.size(); ++i) {\n            Task& task = *new(root.allocate_child()) Task(root, items[i]);\n            tbb::task::spawn(task);\n        }\n\n        root.wait_for_all();\n        return 0;\n    }\n\nIn oneTBB ``tbb::parallel_do`` interface was removed. Instead, the functionality of adding new work\nwas included into the ``oneapi::tbb::parallel_for_each`` interface.\n\nThe previous use case can be rewritten in oneTBB as follows:\n\n.. code:: cpp\n\n    #include <vector>\n    #include <oneapi/tbb/parallel_for_each.h>\n\n    int main() {\n        std::vector<int> items = { 0, 1, 2, 3, 4, 5, 6, 7 };\n\n        oneapi::tbb::parallel_for_each(\n            items.begin(), items.end(),\n            [](int& i, tbb::feeder<int>& feeder) {\n\n                // ... do some work for item i ...\n\n                if (add_more_parallel_work)\n                    feeder.add(i);\n            }\n        );\n    }\n\nSince both TBB and oneTBB support nested expressions, you can run additional functors from within an\nalready running functor.\n\nThe previous use case can be rewritten using ``oneapi::tbb::task_group`` as:\n\n.. code:: cpp\n\n    #include <cstddef>\n    #include <vector>\n    #include <oneapi/tbb/task_group.h>\n\n    int main() {\n        std::vector<int> items = { 0, 1, 2, 3, 4, 5, 6, 7 };\n\n        oneapi::tbb::task_group tg;\n        for (std::size_t i = 0; i < items.size(); ++i) {\n            tg.run([&i = items[i], &tg] {\n\n                // ... do some work for item i ...\n\n                if (add_more_parallel_work)\n                    // Assuming OtherWork is defined.\n                    tg.run(OtherWork{});\n\n            });\n        }\n        tg.wait();\n    }\n\n\nTask recycling\n--------------\nYou can re-run the functor by passing ``*this`` to the ``oneapi::tbb::task_group::run()``\nmethod. The functor will be copied in this case. However, its state can be shared among instances:\n\n.. code:: cpp\n\n    #include <memory>\n    #include <oneapi/tbb/task_group.h>\n\n    struct SharedStateFunctor {\n        std::shared_ptr<Data> m_shared_data;\n        oneapi::tbb::task_group& m_task_group;\n\n        void operator()() const {\n            // do some work processing m_shared_data\n\n            if (has_more_work)\n                m_task_group.run(*this);\n\n            // Note that this might be concurrently accessing m_shared_data already\n        }\n    };\n\n    int main() {\n        // Assuming Data is defined.\n        std::shared_ptr<Data> data = std::make_shared<Data>(/*params*/);\n        oneapi::tbb::task_group tg;\n        tg.run(SharedStateFunctor{data, tg});\n        tg.wait();\n    }\n\nSuch patterns are particularly useful when the work within a functor is not completed but there is a\nneed for the task scheduler to react to outer circumstances, such as cancellation of group\nexecution. To avoid issues with concurrent access, it is recommended to submit it for re-execution\nas the last step:\n\n.. code:: cpp\n\n    #include <memory>\n    #include <oneapi/tbb/task_group.h>\n\n    struct SharedStateFunctor {\n        std::shared_ptr<Data> m_shared_data;\n        oneapi::tbb::task_group& m_task_group;\n\n        void operator()() const {\n            // do some work processing m_shared_data\n\n            if (need_to_yield) {\n                m_task_group.run(*this);\n                return;\n            }\n        }\n    };\n\n    int main() {\n        // Assuming Data is defined.\n        std::shared_ptr<Data> data = std::make_shared<Data>(/*params*/);\n        oneapi::tbb::task_group tg;\n        tg.run(SharedStateFunctor{data, tg});\n        tg.wait();\n    }\n\n   \nRecycling as child or continuation\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nIn oneTBB this kind of recycling is done manually. You have to track when it is time to run the\ntask:\n\n.. code:: cpp\n          \n    #include <cstddef>\n    #include <vector>\n    #include <atomic>\n    #include <cassert>\n    #include <oneapi/tbb/task_group.h>\n\n    struct ContinuationTask {\n        ContinuationTask(std::vector<int>& data, int& result)\n            : m_data(data), m_result(result)\n        {}\n\n        void operator()() const {\n            for (const auto& item : m_data)\n                m_result += item;\n        }\n\n        std::vector<int>& m_data;\n        int& m_result;\n    };\n\n    struct ChildTask {\n        ChildTask(std::vector<int>& data, int& result,\n                  std::atomic<std::size_t>& tasks_left, std::atomic<std::size_t>& tasks_done,\n                  oneapi::tbb::task_group& tg)\n            : m_data(data), m_result(result), m_tasks_left(tasks_left), m_tasks_done(tasks_done), m_tg(tg)\n        {}\n\n        void operator()() const {\n            std::size_t index = --m_tasks_left;\n            m_data[index] = produce_item_for(index);\n            std::size_t done_num = ++m_tasks_done;\n            if (index % 2 != 0) {\n                // Recycling as child\n                m_tg.run(*this);\n                return;\n            } else if (done_num == m_data.size()) {\n                assert(m_tasks_left == 0);\n                // Spawning a continuation that does reduction\n                m_tg.run(ContinuationTask(m_data, m_result));\n            }\n        }\n        std::vector<int>& m_data;\n        int& m_result;\n        std::atomic<std::size_t>& m_tasks_left;\n        std::atomic<std::size_t>& m_tasks_done;\n        oneapi::tbb::task_group& m_tg;\n    };\n\n\n    int main() {\n        int result = 0;\n        std::vector<int> items(10, 0);\n        std::atomic<std::size_t> tasks_left{items.size()};\n        std::atomic<std::size_t> tasks_done{0};\n\n        oneapi::tbb::task_group tg;\n        for (std::size_t i = 0; i < items.size(); i+=2) {\n            tg.run(ChildTask(items, result, tasks_left, tasks_done, tg));\n        }\n        tg.wait();\n    }\n\n\nScheduler Bypass\n----------------\n\nTBB ``task::execute()`` method can return a pointer to a task that can be executed next by the current thread.\nThis might reduce scheduling overheads compared to direct ``spawn``. Similar to ``spawn``, the returned task \nis not guaranteed to be executed next by the current thread.\n\n.. code:: cpp\n    \n    #include <tbb/task.h>\n    \n    // Assuming OtherTask is defined.\n    \n    struct Task : tbb::task {\n        task* execute(){\n            // some work to do ...\n            \n            auto* other_p = new(this->parent().allocate_child()) OtherTask{};\n            this->parent().add_ref_count();\n            \n            return other_p;\n        }\n    };\n    \n    int main(){\n        // Assuming RootTask is  defined.\n        RootTask& root = *new(tbb::task::allocate_root()) RootTask{};\n    \n        Task& child = *new(root.allocate_child()) Task{/*params*/};\n        \n        root.add_ref_count();\n        \n        tbb::task_spawn(child);\n        \n        root.wait_for_all();\n    }\n\nIn oneTBB, this can be done using ``oneapi::tbb::task_group``. \n\n.. code:: cpp\n   \n    #include <oneapi/tbb/task_group.h>\n    \n    // Assuming OtherTask is defined.\n    \n    int main(){\n        oneapi::tbb::task_group tg;\n        \n        tg.run([&tg](){\n            //some work to do ...\n            \n            return tg.defer(OtherTask{});\n        });\n        \n        tg.wait();\n    }\n\nHere ``oneapi::tbb::task_group::defer`` adds a new task into the ``tg``. However, the task is not put into a \nqueue of tasks ready for execution via ``oneapi::tbb::task_group::run``, but bypassed to the executing thread directly \nvia function return value. \n\nDeferred task creation\n----------------------\nThe TBB low-level task API separates the task creation from the actual spawning. This separation allows to\npostpone the task spawning, while the parent task and final result production are blocked from premature leave. \nFor example, ``RootTask``, ``ChildTask``, and ``CallBackTask`` are the user-side functors that\ninherit ``tbb::task`` and implement its interface. Then, blocking the ``RootTask`` from leaving prematurely\nand waiting on it is implemented as follows: \n\n.. code:: cpp\n\n    #include <tbb/task.h>\n\n    int main() {\n        // Assuming RootTask, ChildTask, and CallBackTask are defined.\n        RootTask& root = *new(tbb::task::allocate_root()) RootTask{};\n\n        ChildTask&    child    = *new(root.allocate_child()) ChildTask{/*params*/};\n        CallBackTask& cb_task  = *new(root.allocate_child()) CallBackTask{/*params*/};\n\n        root.set_ref_count(3);\n        \n        tbb::task::spawn(child);\n        \n        register_callback([cb_task&](){\n            tbb::task::enqueue(cb_task);\n        });\n\n        root.wait_for_all();\n        // Control flow will reach here only after both ChildTask and CallBackTask are executed,\n        // i.e. after the callback is called  \n    }\n\nIn oneTBB, this can be done using ``oneapi::tbb::task_group``.\n\n.. code:: cpp\n\n    #include <oneapi/tbb/task_group.h>\n\n    int main(){\n        oneapi::tbb::task_group tg;\n        oneapi::tbb::task_arena arena;\n        // Assuming ChildTask and CallBackTask are defined.\n        \n        auto cb = tg.defer(CallBackTask{/*params*/});\n        \n        register_callback([&tg, c = std::move(cb), &arena]{\n            arena.enqueue(c);\n        });        \n\n        tg.run(ChildTask{/*params*/});\n\n \n        tg.wait();\n        // Control flow gets here once both ChildTask and CallBackTask are executed\n        // i.e. after the callback is called  \n    }\n\nHere ``oneapi::tbb::task_group::defer`` adds a new task into the ``tg``. However, the task is not spawned until \n``oneapi::tbb::task_arena::enqueue`` is called. \n\n.. note::\n   The call to ``oneapi::tbb::task_group::wait`` will not return control until both ``ChildTask`` and \n   ``CallBackTask`` are executed.\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Migration_Guide/Task_Scheduler_Init.rst",
    "content": ".. _Task_Scheduler_Init:\n\nMigrating from tbb::task_scheduler_init\n=======================================\n\n``tbb::task_scheduler_init`` was a multipurpose functionality in the previous versions of Threading\nBuilding Blocks (TBB). This section considers different use cases and how they can be covered with\noneTBB.\n\nManaging the number of threads\n---------------------------------------\n\nQuerying the default number of threads\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n* `oneapi::tbb::info::default_concurrency()\n  <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/info_namespace>`_\n  returns the maximum concurrency that will be created by *default* in implicit or explicit ``task_arena``.\n\n* `oneapi::tbb::this_task_arena::max_concurrency()\n  <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/task_scheduler/task_arena/this_task_arena_ns>`_\n  returns the maximum number of threads available for the parallel algorithms within the current context\n  (or *default* if an implicit arena is not initialized)\n\n* `oneapi::tbb::global_control::active_value(tbb::global_control::max_allowed_parallelism)\n  <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/task_scheduler/scheduling_controls/global_control_cls>`_\n  returns the current limit of the thread pool (or *default* if oneTBB scheduler is not initialized)\n\nSetting the maximum concurrency\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n* `task_arena(/* max_concurrency */)\n  <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/task_scheduler/task_arena/this_task_arena_ns>`_\n  limits the maximum concurrency of the parallel algorithm running inside ``task_arena``\n\n* `tbb::global_control(tbb::global_control::max_allowed_parallelism, /* max_concurrency */)\n  <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/task_scheduler/scheduling_controls/global_control_cls>`_\n  limits the total number of oneTBB worker threads\n\nExamples\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe default parallelism:\n\n.. code:: cpp\n\n    #include <oneapi/tbb/info.h>\n    #include <oneapi/tbb/parallel_for.h>\n    #include <oneapi/tbb/task_arena.h>\n    #include <cassert>\n\n    int main() {\n        // Get the default number of threads\n        int num_threads = oneapi::tbb::info::default_concurrency();\n\n        // Run the default parallelism\n        oneapi::tbb::parallel_for( /* ... */ [] {\n            // Assert the maximum number of threads\n            assert(num_threads == oneapi::tbb::this_task_arena::max_concurrency());\n        });\n\n        // Create the default task_arena\n        oneapi::tbb::task_arena arena;\n        arena.execute([]{\n            oneapi::tbb::parallel_for( /* ... */ [] {\n                // Assert the maximum number of threads\n                assert(num_threads == oneapi::tbb::this_task_arena::max_concurrency());\n            });\n        });\n\n        return 0;\n    }\n\nThe limited parallelism:\n\n.. code:: cpp\n\n    #include <oneapi/tbb/info.h>\n    #include <oneapi/tbb/parallel_for.h>\n    #include <oneapi/tbb/task_arena.h>\n    #include <oneapi/tbb/global_control.h>\n    #include <cassert>\n\n    int main() {\n        // Create the custom task_arena with four threads\n        oneapi::tbb::task_arena arena(4);\n        arena.execute([]{\n            oneapi::tbb::parallel_for( /* ... */ [] {\n                // This arena is limited with for threads\n                assert(oneapi::tbb::this_task_arena::max_concurrency() == 4);\n            });\n        });\n\n        // Limit the number of threads to two for all oneTBB parallel interfaces\n        oneapi::tbb::global_control global_limit(oneapi::tbb::global_control::max_allowed_parallelism, 2);\n\n        // the default parallelism\n        oneapi::tbb::parallel_for( /* ... */ [] {\n            // No more than two threads is expected; however, tbb::this_task_arena::max_concurrency() can return a bigger value\n            int thread_limit = oneapi::tbb::global_control::active_value(oneapi::tbb::global_control::max_allowed_parallelism);\n            assert(thread_limit == 2);\n        });\n\n        arena.execute([]{\n            oneapi::tbb::parallel_for( /* ... */ [] {\n                // No more than two threads is expected; however, tbb::this_task_arena::max_concurrency() is four\n                int thread_limit = oneapi::tbb::global_control::active_value(oneapi::tbb::global_control::max_allowed_parallelism);\n                assert(thread_limit == 2);\n                assert(tbb::this_task_arena::max_concurrency() == 4);\n            });\n        });\n\n        return 0;\n    }\n\nSetting thread stack size\n---------------------------------------\nUse `oneapi::tbb::global_control(oneapi::tbb::global_control::thread_stack_size, /* stack_size */)\n<https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/task_scheduler/scheduling_controls/global_control_cls>`_\nto set the stack size for oneTBB worker threads:\n\n.. code:: cpp\n\n    #include <oneapi/tbb/parallel_for.h>\n    #include <oneapi/tbb/global_control.h>\n\n    int main() {\n        // Set 16 MB of the stack size for oneTBB worker threads.\n        // Note that the stack size of the main thread should be configured in accordace with the\n        // system documentation, e.g. at application startup moment\n        oneapi::tbb::global_control global_limit(tbb::global_control::thread_stack_size, 16 * 1024 * 1024);\n\n        oneapi::tbb::parallel_for( /* ... */ [] {\n            // Create a big array in the stack\n            char big_array[10*1024*1024];\n        });\n\n        return 0;\n    }\n\nTerminating oneTBB scheduler\n---------------------------------------\n\n`task_scheduler_handle <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/task_scheduler/scheduling_controls/task_scheduler_handle_cls>`_\nallows waiting for oneTBB worker threads completion:\n\n.. code:: cpp\n\n    #include <oneapi/tbb/global_control.h>\n    #include <oneapi/tbb/parallel_for.h>\n\n    int main() {\n        oneapi::tbb::task_scheduler_handle handle{tbb::attach{}};\n        // Do some parallel work here\n        oneapi::tbb::parallel_for(/* ... */);\n        oneapi::tbb::finalize(handle);\n        return 0;\n    }\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Migration_Guide.rst",
    "content": ".. _Migration_Guide:\n\nMigrating from Threading Building Blocks (TBB)\n==============================================\n\nWhile oneTBB is mostly source compatible with TBB, some interfaces were deprecated\nin TBB and redesigned or removed in oneTBB. This section considers the most difficult use cases for\nmigrating TBB to oneTBB.\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/Migration_Guide/Task_Scheduler_Init\n   ../tbb_userguide/Migration_Guide/Task_API\n   ../tbb_userguide/Migration_Guide/Mixing_Two_Runtimes\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/More_on_HashCompare.rst",
    "content": ".. _More_on_HashCompare:\n\nMore on HashCompare\n===================\n\n\nThere are several ways to make the ``HashCompare`` argument for\n``concurrent_hash_map`` work for your own types.\n\n\n-  Specify the ``HashCompare`` argument explicitly\n\n\n-  Let the ``HashCompare`` default to ``tbb_hash_compare<Key>`` and do\n   one of the following:\n\n\n   -  Define a specialization of template ``tbb_hash_compare<Key>``.\n\n\nFor example, if you have keys of type ``Foo``, and ``operator==`` is\ndefined for ``Foo``, you just have to provide a definition of\n``tbb_hasher`` as shown below:\n\n\n::\n\n\n   size_t tbb_hasher(const Foo& f) {\n       size_t h = ...compute hash code for f...\n       return h;\n   };\n\n\nIn general, the definition of ``tbb_hash_compare<Key>`` or\n``HashCompare`` must provide two signatures:\n\n\n-  A method ``hash`` that maps a ``Key`` to a ``size_t``\n\n\n-  A method ``equal`` that determines if two keys are equal\n\n\nThe signatures go together in a single class because *if two keys are\nequal, then they must hash to the same value*, otherwise the hash table\nmight not work. You could trivially meet this requirement by always\nhashing to ``0``, but that would cause tremendous inefficiency. Ideally,\neach key should hash to a different value, or at least the probability\nof two distinct keys hashing to the same value should be kept low.\n\n\nThe methods of ``HashCompare`` should be ``static`` unless you need to\nhave them behave differently for different instances. If so, then you\nshould construct the ``concurrent_hash_map`` using the constructor that\ntakes a ``HashCompare`` as a parameter. The following example is a\nvariation on an earlier example with instance-dependent methods. The\ninstance performs both case-sensitive or case-insensitive hashing, and\ncomparison, depending upon an internal flag ``ignore_case``.\n\n\n::\n\n\n   // Structure that defines hashing and comparison operations\n   class VariantHashCompare {\n       // If true, then case of letters is ignored.\n       bool ignore_case;\n   public:\n       size_t hash(const string& x) const {\n           size_t h = 0;\n           for(const char* s = x.c_str(); *s; s++) \n               h = (h*16777179)^*(ignore_case?tolower(*s):*s);\n           return h;\n       }\n       // True if strings are equal\n       bool equal(const string& x, const string& y) const {\n           if( ignore_case )\n               strcasecmp(x.c_str(), y.c_str())==0;\n           else\n               return x==y;\n       }\n       VariantHashCompare(bool ignore_case_) : ignore_case(ignore_case_) {}\n   };\n    \n\n   typedef concurrent_hash_map<string,int, VariantHashCompare> VariantStringTable;\n    \n\n   VariantStringTable CaseSensitiveTable(VariantHashCompare(false));\n   VariantStringTable CaseInsensitiveTable(VariantHashCompare(true));\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Mutex_Flavors.rst",
    "content": ".. _Mutex_Flavors:\n\nMutex Flavors\n=============\n\n\nConnoisseurs of mutexes distinguish various attributes of mutexes. It\nhelps to know some of these, because they involve tradeoffs of\ngenerality and efficiency. Picking the right one often helps\nperformance. Mutexes can be described by the following qualities, also\nsummarized in the table below.\n\n\n-  **Scalable**. Some mutexes are called *scalable*. In a strict sense,\n   this is not an accurate name, because a mutex limits execution to one\n   thread at a time. A *scalable mutex* is one that does not do *worse*\n   than this. A mutex can do worse than serialize execution if the\n   waiting threads consume excessive processor cycles and memory\n   bandwidth, reducing the speed of threads trying to do real work.\n   Scalable mutexes are often slower than non-scalable mutexes under\n   light contention, so a non-scalable mutex may be better. When in\n   doubt, use a scalable mutex.\n\n\n-  **Fair**. Mutexes can be *fair* or *unfair*. A fair mutex lets\n   threads through in the order they arrived. Fair mutexes avoid\n   starving threads. Each thread gets its turn. However, unfair mutexes\n   can be faster, because they let threads that are running go through\n   first, instead of the thread that is next in line which may be\n   sleeping on account of an interrupt.\n\n\n-  **Yield or Block**. This is an implementation detail that impacts\n   performance. On long waits, an |full_name|\n   mutex either *yields* or *blocks*. Here *yields* means to\n   repeatedly poll whether progress can be made, and if not, temporarily\n   yield [#]_ the processor. To *block* means to yield the\n   processor until the mutex permits progress. Use the yielding mutexes\n   if waits are typically short and blocking mutexes if waits are\n   typically long.\n\n\nThe following is a summary of mutex behaviors:\n\n\n-  ``spin_mutex`` is non-scalable, unfair, non-recursive, and spins in\n   user space. It would seem to be the worst of all possible worlds,\n   except that it is *very fast* in *lightly contended* situations. If\n   you can design your program so that contention is somehow spread out\n   among many ``spin_mutex`` objects, you can improve performance over\n   using other kinds of mutexes. If a mutex is heavily contended, your\n   algorithm will not scale anyway. Consider redesigning the algorithm\n   instead of looking for a more efficient lock.\n\n\n-  ``mutex`` has behavior similar to the ``spin_mutex``. However,\n   the ``mutex`` *blocks* on long waits that makes it\n   resistant to high contention.\n\n\n-  ``queuing_mutex`` is scalable, fair, non-recursive, and spins in user\n   space. Use it when scalability and fairness are important.\n\n\n-  ``spin_rw_mutex`` and ``queuing_rw_mutex`` are similar to\n   ``spin_mutex`` and ``queuing_mutex``, but additionally support\n   *reader* locks.\n\n\n-  ``rw_mutex`` is similar to ``mutex``, but additionally support\n   *reader* locks.\n\n\n-  ``speculative_spin_mutex`` and ``speculative_spin_rw_mutex`` are\n   similar to ``spin_mutex`` and ``spin_rw_mutex``, but additionally\n   provide *speculative locking* on processors that support hardware\n   transaction memory. Speculative locking allows multiple threads\n   acquire the same lock, as long as there are no \"conflicts\" that may\n   generate different results than non-speculative locking. These\n   mutexes are *scalable* when work with low conflict rate, i.e. mostly\n   in speculative locking mode.\n\n\n-  ``null_mutex`` and ``null_rw_mutex`` do nothing. They can be useful\n   as template arguments. For example, suppose you are defining a\n   container template and know that some instantiations will be shared\n   by multiple threads and need internal locking, but others will be\n   private to a thread and not need locking. You can define the template\n   to take a Mutex type parameter. The parameter can be one of the real\n   mutex types when locking is necessary, and ``null_mutex`` when\n   locking is unnecessary.\n\n\n.. container:: tablenoborder\n\n\n   .. list-table:: \n      :header-rows: 1\n\n      * -     Mutex     \n        -     Scalable     \n        -     Fair     \n        -     Recursive     \n        -     Long Wait     \n        -     Size     \n      * -     \\ ``spin_mutex``     \n        -     no     \n        -     no     \n        -     no     \n        -     yields     \n        -     1 byte     \n      * -     \\ ``mutex``     \n        -     ✓     \n        -     no     \n        -     no     \n        -     blocks     \n        -     1 byte     \n      * -     \\ ``speculative_spin_mutex``     \n        -     HW dependent     \n        -     no     \n        -     no     \n        -     yields     \n        -     2 cache lines     \n      * -     \\ ``queuing_mutex``     \n        -     ✓     \n        -     ✓     \n        -     no     \n        -     yields     \n        -     1 word     \n      * -     \\ ``spin_rw_mutex``     \n        -     no     \n        -     no     \n        -     no     \n        -     yields     \n        -     1 word     \n      * -     \\ ``spin_rw_mutex``     \n        -     ✓     \n        -     no     \n        -     no     \n        -     blocks     \n        -     1 word     \n      * -     \\ ``speculative_spin_rw_mutex``     \n        -     HW dependent     \n        -     no     \n        -     no     \n        -     yields     \n        -     3 cache lines     \n      * -     \\ ``queuing_rw_mutex``     \n        -     ✓     \n        -     ✓     \n        -     no     \n        -     yields     \n        -     1 word     \n      * -     \\ ``null_mutex`` [#]_   \n        -     moot     \n        -     ✓     \n        -     ✓     \n        -     never     \n        -     empty     \n      * -     \\ ``null_rw_mutex``     \n        -     moot     \n        -     ✓     \n        -     ✓     \n        -     never     \n        -     empty     \n\n\n\n\n.. [#] The yielding is implemented via ``SwitchToThread()`` on Microsoft\n       Windows\\* operating systems and by ``sched_yield()`` on other systems.\n\n\n.. [#] Null mutexes are considered fair by oneTBB because they cannot cause\n       starvation. They lack any non-static data members.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Mutual_Exclusion.rst",
    "content": ".. _Mutual_Exclusion:\n\nMutual Exclusion\n================\n\n\nMutual exclusion controls how many threads can simultaneously run a\nregion of code. In |full_name|, mutual\nexclusion is implemented by *mutexes* and *locks.* A mutex is an object\non which a thread can acquire a lock. Only one thread at a time can have\na lock on a mutex; other threads have to wait their turn.\n\n\nThe simplest mutex is ``spin_mutex``. A thread trying to acquire a lock\non a ``spin_mutex`` busy waits until it can acquire the lock. A\n``spin_mutex`` is appropriate when the lock is held for only a few\ninstructions. For example, the following code uses a mutex\n``FreeListMutex`` to protect a shared variable ``FreeList``. It checks\nthat only a single thread has access to ``FreeList`` at a time.\n\n::\n\n   Node* FreeList;\n   typedef spin_mutex FreeListMutexType;\n   FreeListMutexType FreeListMutex;\n    \n\n   Node* AllocateNode() {\n       Node* n;\n       {\n           FreeListMutexType::scoped_lock lock(FreeListMutex);\n           n = FreeList;\n           if( n )\n               FreeList = n->next;\n       }\n       if( !n )\n           n = new Node();\n       return n;\n   }\n    \n\n   void FreeNode( Node* n ) {\n       FreeListMutexType::scoped_lock lock(FreeListMutex);\n       n->next = FreeList;\n       FreeList = n;\n   }\n\n\nThe constructor for ``scoped_lock`` waits until there are no other locks\non ``FreeListMutex``. The destructor releases the lock. The braces\ninside routine ``AllocateNode`` may look unusual. Their role is to keep\nthe lifetime of the lock as short as possible, so that other waiting\nthreads can get their chance as soon as possible.\n\n\n.. CAUTION:: \n   Be sure to name the lock object, otherwise it will be destroyed too\n   soon. For example, if the creation of the ``scoped_lock`` object in\n   the example is changed to\n\n   ::\n\n      FreeListMutexType::scoped_lock (FreeListMutex);\n\n   then the ``scoped_lock`` is destroyed when execution reaches the\n   semicolon, which releases the lock *before* ``FreeList`` is accessed.\n\n\nThe following shows an alternative way to write ``AllocateNode``:\n\n\n::\n\n\n   Node* AllocateNode() {\n       Node* n;\n       FreeListMutexType::scoped_lock lock;\n       lock.acquire(FreeListMutex);\n       n = FreeList;\n       if( n )\n           FreeList = n->next;\n       lock.release();\n       if( !n ) \n           n = new Node();\n       return n;\n   }\n\n\nMethod ``acquire`` waits until it can acquire a lock on the mutex;\nmethod ``release`` releases the lock.\n\n\nIt is recommended that you add extra braces where possible, to clarify\nto maintainers which code is protected by the lock.\n\n\nIf you are familiar with C interfaces for locks, you may be wondering\nwhy there are not simply acquire and release methods on the mutex object\nitself. The reason is that the C interface would not be exception safe,\nbecause if the protected region threw an exception, control would skip\nover the release. With the object-oriented interface, destruction of the\n``scoped_lock`` object causes the lock to be released, no matter whether\nthe protected region was exited by normal control flow or an exception.\nThis is true even for our version of ``AllocateNode`` that used methods\n``acquire`` and ``release –`` the explicit release causes the lock to be\nreleased earlier, and the destructor then sees that the lock was\nreleased and does nothing.\n\n\nAll mutexes in oneTBB have a similar interface, which not only makes\nthem easier to learn, but enables generic programming. For example, all\nof the mutexes have a nested ``scoped_lock`` type, so given a mutex of\ntype ``M``, the corresponding lock type is ``M::scoped_lock``.\n\n\n.. tip::\n   It is recommended that you always use a ``typedef`` for the mutex\n   type, as shown in the previous examples. That way, you can change the\n   type of the lock later without having to edit the rest of the code.\n   In the examples, you could replace the ``typedef`` with\n   ``typedef queuing_mutex FreeListMutexType``, and the code would still\n   be correct.\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/Mutex_Flavors\n   ../tbb_userguide/Reader_Writer_Mutexes\n   ../tbb_userguide/UpgradeDowngrade\n   ../tbb_userguide/Lock_Pathologies\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Nodes.rst",
    "content": ".. _Nodes:\n\nFlow Graph Basics: Nodes\n========================\n\n\nA node is a class that inherits from ``oneapi::tbb::flow::graph_node`` and also\ntypically inherits from ``oneapi::tbb::flow::sender<T>``, ``oneapi::tbb::flow::receiver<T>``, or\nboth. A node performs some operation, usually on an incoming message and\nmay generate zero or more output messages. Some nodes require more than\none input message or generate more than one output message.\n\n\nWhile it is possible to define your own node types by inheriting from\ngraph_node, sender and receiver, it is more typical that predefined node\ntypes are used to construct a graph.\n\n\nA ``function_node`` is a predefined type available in ``flow_graph.h`` and\nrepresents a simple function with one input and one output. The\nconstructor for a ``function_node`` takes three arguments:\n\n\n::\n\n\n   template< typename Body> function_node(graph &g, size_t concurrency, Body body)\n\n\n.. container:: tablenoborder\n\n\n   .. list-table:: \n      :header-rows: 1\n\n      * -  Parameter \n        -  Description \n      * -  Body \n        -     Type of the body object.     \n      * -  g \n        -     The graph the node belongs to.     \n      * -  concurrency \n        -     The concurrency limit for the node. You can use the    concurrency limit to control how many invocations of the node are   allowed to proceed concurrently, from 1 (serial) to an unlimited   number.    \n      * -  body \n        -     User defined function object, or lambda expression, that    is applied to the incoming message to generate the outgoing message.      \n\n\n\n\nBelow is code for creating a simple graph that contains a single\nfunction_node. In this example, a node n is constructed that belongs to\ngraph g, and has a second argument of 1, which allows at most 1\ninvocation of the node to occur concurrently. The body is a lambda\nexpression that prints each value v that it receives, spins for v\nseconds, prints the value again, and then returns v unmodified. The code\nfor the function spin_for is not provided.\n\n\n::\n\n\n       graph g;\n       function_node< int, int > n( g, 1, []( int v ) -> int { \n           cout << v;\n           spin_for( v );\n           cout << v;\n           return v;\n       } );\n\n\nAfter the node is constructed in the example above, you can pass\nmessages to it, either by connecting it to other nodes using edges or by\ninvoking its function try_put. Using edges is described in the next\nsection.\n\n\n::\n\n\n       n.try_put( 1 );\n       n.try_put( 2 );\n       n.try_put( 3 );\n\n\nYou can then wait for the messages to be processed by calling\n``wait_for_all`` on the graph object:\n\n\n::\n\n\n       g.wait_for_all(); \n\n\nIn the above example code, the function_node n was created with a\nconcurrency limit of 1. When it receives the message sequence 1, 2 and\n3, the node n will spawn a task to apply the body to the first input, 1.\nWhen that task is complete, it will then spawn another task to apply the\nbody to 2. And likewise, the node will wait for that task to complete\nbefore spawning a third task to apply the body to 3. The calls to\ntry_put do not block until a task is spawned; if a node cannot\nimmediately spawn a task to process the message, the message will be\nbuffered in the node. When it is legal, based on concurrency limits, a\ntask will be spawned to process the next buffered message.\n\n\nIn the above graph, each message is processed sequentially. If however,\nyou construct the node with a different concurrency limit, parallelism\ncan be achieved:\n\n\n::\n\n\n       function_node< int, int > n( g, oneapi::tbb::flow::unlimited, []( int v ) -> int { \n           cout << v;\n           spin_for( v );\n           cout << v;\n           return v;\n       } );\n\n\nYou can use unlimited as the concurrency limit to instruct the library\nto spawn a task as soon as a message arrives, regardless of how many\nother tasks have been spawned. You can also use any specific value, such\nas 4 or 8, to limit concurrency to at most 4 or 8, respectively. It is\nimportant to remember that spawning a task does not mean creating a\nthread. So while a graph may spawn many tasks, only the number of\nthreads available in the library's thread pool will be used to execute\nthese tasks.\n\n\nSuppose you use unlimited in the function_node constructor instead and\ncall try_put on the node:\n\n\n::\n\n\n       n.try_put( 1 );\n       n.try_put( 2 );\n       n.try_put( 3 );\n       g.wait_for_all(); \n\n\nThe library spawns three tasks, each one applying n's lambda expression\nto one of the messages. If you have a sufficient number of threads\navailable on your system, then all three invocations of the body will\noccur in parallel. If however, you have only one thread in the system,\nthey execute sequentially.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Non-Linear_Pipelines.rst",
    "content": ".. _Non-Linear_Pipelines:\n\nNon-Linear Pipelines\n====================\n\n\nTemplate function ``parallel_pipeline`` supports only linear pipelines.\nIt does not directly handle more baroque plumbing, such as in the\ndiagram below.\n\n\n.. container:: fignone\n   :name: image011\n\n\n   |image0|\n\n\nHowever, you can still use a pipeline for this. Just topologically sort\nthe filters into a linear order, like this:\n\n\nThe light gray arrows are the original arrows that are now implied by\ntransitive closure of the other arrows. It might seem that lot of\nparallelism is lost by forcing a linear order on the filters, but in\nfact the only loss is in the *latency* of the pipeline, not the\nthroughput. The latency is the time it takes a token to flow from the\nbeginning to the end of the pipeline. Given a sufficient number of\nprocessors, the latency of the original non-linear pipeline is three\nfilters. This is because filters A and B could process the token\nconcurrently, and likewise filters D and E could process the token\nconcurrently.\n\n\n.. container:: fignone\n   :name: image012\n\n\n   |image1|\n\n\nIn the linear pipeline, the latency is five filters. The behavior of\nfilters A, B, D and E above may need to be modified in order to properly\nhandle objects that don’t need to be acted upon by the filter other than\nto be passed along to the next filter in the pipeline.\n\n\nThe throughput remains the same, because regardless of the topology, the\nthroughput is still limited by the throughput of the slowest serial\nfilter. If ``parallel_pipeline`` supported non-linear pipelines, it\nwould add a lot of programming complexity, and not improve throughput.\nThe linear limitation of ``parallel_pipeline`` is a good tradeoff of\ngain versus pain.\n\n\n.. |image0| image:: Images/image011.jpg\n   :width: 281px\n   :height: 107px\n.. |image1| image:: Images/image012.jpg\n   :width: 281px\n   :height: 107px\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Package_Contents_os.rst",
    "content": ".. _Package_Contents:\n\nPackage Contents\n================\n\n\n|full_name| includes dynamic library files and header files for Windows\\*, Linux\\*\nand macOS\\* operating systems as described in this section.\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/Debug_Versus_Release_Libraries\n   ../tbb_userguide/Scalable_Memory_Allocator\n   ../tbb_userguide/Windows_OS_ug\n   ../tbb_userguide/Linux_OS\n   ../tbb_userguide/Mac_OS\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Parallelizing_Complex_Loops.rst",
    "content": ".. _Parallelizing_Complex_Loops:\n\nParallelizing Complex Loops\n===========================\n\n\nYou can successfully parallelize many applications using only the\nconstructs in the :ref:`Parallelizing_Simple_Loops` section. However, some\nsituations call for other parallel patterns. This section describes the\nsupport for some of these alternate patterns.\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/Cook_Until_Done_parallel_do\n   ../tbb_userguide/Working_on_the_Assembly_Line_pipeline\n   ../tbb_userguide/Summary_of_Loops_and_Pipelines"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Parallelizing_Flow_Graph.rst",
    "content": ".. _Parallelizing_Flow_Graph:\n\nParallelizing Data Flow and Dependency Graphs\n=============================================\n\n\nIn addition to loop parallelism, the |full_name| library also supports graph parallelism.\nIt's possible to create graphs that are highly scalable, but it is also possible to\ncreate graphs that are completely sequential.\n\n\nUsing graph parallelism, computations are represented by nodes and the\ncommunication channels between these computations are represented by\nedges. When a node in the graph receives a message, a task is spawned to\nexecute its body object on the incoming message. Messages flow through\nthe graph across the edges that connect the nodes. The following\nsections present two examples of applications that can be expressed as\ngraphs.\n\n\nThe following figure shows a *streaming* or *data flow* application\nwhere a sequence of values is processed as each value passes through the\nnodes in the graph. In this example, the sequence is created by a\nfunction F. For each value in the sequence, G squares the value and H\ncubes the value. J then takes each of the squared and cubed values and\nadds them to a global sum. After all values in the sequence are\ncompletely processed, sum is equal to the sum of the sequence of squares\nand cubes from 1 to 10. In a streaming or data flow graph, the values\nactually flow across the edges; the output of one node becomes the input\nof its successor(s).\n\n\n.. container:: fignone\n   :name: simple_data_flow_title\n\n\n   **Simple Data Flow Graph**\n\n\n   .. container:: imagecenter\n\n\n      |image0|\n\n\nThe following graphic shows a different form of graph application. In\nthis example, a dependence graph is used to establish a partial ordering\namong the steps for making a peanut butter and jelly sandwich. In this\npartial ordering, you must first get the bread before spreading the\npeanut butter or jelly on the bread. You must spread on the peanut\nbutter before you put away the peanut butter jar, and likewise spread on\nthe jelly before you put away the jelly jar. And, you need to spread on\nboth the peanut butter and jelly before putting the two slices of bread\ntogether. This is a partial ordering because, for example, it doesn't\nmatter if you spread on the peanut butter first or the jelly first. It\nalso doesn't matter if you finish making the sandwich before putting\naway the jars.\n\n\n.. container:: fignone\n   :name: dependence_graph_make_sandwitch\n\n\n   **Dependence Graph for Making a Sandwich**\n\n\n   .. container:: imagecenter\n\n\n      |image1|\n\n\nWhile it can be inferred that resources, such as the bread, or the jelly\njar, are shared between ordered steps, it is not explicit in the graph.\nInstead, only the required ordering of steps is explicit in a dependence\ngraph. For example, you must \"Put jelly on 1 slice\" **before** you \"Put\naway jelly jar\".\n\n\nThe flow graph interface in the oneTBB library allows you to express\ndata flow and dependence graphs such as these, as well as more\ncomplicated graphs that include cycles, conditionals, buffering and\nmore. If you express your application using the flow graph interface,\nthe runtime library spawns tasks to exploit the parallelism that is\npresent in the graph. For example, in the first example above, perhaps\ntwo different values might be squared in parallel, or the same value\nmight be squared and cubed in parallel. Likewise in the second example,\nthe peanut butter might be spread on one slice of bread in parallel with\nthe jelly being spread on the other slice. The interface expresses what\nis legal to execute in parallel, but allows the runtime library to\nchoose at runtime what will be executed in parallel.\n\n\nThe support for graph parallelism is contained within the namespace\n``oneapi::tbb::flow`` and is defined in the ``flow_graph.h`` header file.\n\n\n.. |image0| image:: Images/flow_graph.jpg\n.. |image1| image:: Images/flow_graph_complex.jpg\n   :width: 440px\n   :height: 337px\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Parallelizing_Simple_Loops_os.rst",
    "content": ".. _Parallelizing_Simple_Loops:\n\nParallelizing Simple Loops\n==========================\n\n\nThe simplest form of scalable parallelism is a loop of iterations that\ncan each run simultaneously without interfering with each other. The\nfollowing sections demonstrate how to parallelize simple loops.\n\n\n.. note:: \n   |full_name| components are\n   defined in namespace ``tbb``. For brevity’s sake, the namespace is\n   explicit in the first mention of a component, but implicit\n   afterwards.\n\n\nWhen compiling oneTBB programs, be sure to link in the oneTBB shared\nlibrary, otherwise undefined references will occur. The following table\nshows compilation commands that use the debug version of the library.\nRemove the ``_debug`` portion to link against the production version\nof the library.\n\n\n.. container:: tablenoborder\n\n\n   .. list-table:: \n      :header-rows: 1\n\n      * -  Operating System \n        -  Command line \n      * -     Windows\\* OS     \n        -      ``icl /MD example.cpp tbb_debug.lib``     \n      * -     Linux\\* OS     \n        -      ``icc example.cpp -ltbb_debug``     \n\n\n.. include:: Parallelizing_Simple_Loops_toctree.rst"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Parallelizing_Simple_Loops_toctree.rst",
    "content": ".. _Parallelizing_Simple_Loops_toctree:\n\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/Initializing_and_Terminating_the_Library\n   ../tbb_userguide/parallel_for_os\n   ../tbb_userguide/parallel_reduce\n   ../tbb_userguide/Advanced_Example\n   ../tbb_userguide/Advanced_Topic_Other_Kinds_of_Iteration_Spaces"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Partitioner_Summary.rst",
    "content": ".. _Partitioner_Summary:\n\nPartitioner Summary\n===================\n\n\nThe parallel loop templates ``parallel_for`` and ``parallel_reduce``\ntake an optional *partitioner* argument, which specifies a strategy for\nexecuting the loop. The following table summarizes partitioners and\ntheir effect when used in conjunction with ``blocked_range``.\n\n\n.. container:: tablenoborder\n\n\n   .. list-table::\n      :header-rows: 1\n\n      * -     Partitioner    \n        -     Description    \n        -     When Used with ``blocked_range(i,j,g)``\n      * -     ``simple_partitioner``\n        -     Chunksize bounded by grain size.    \n        -      ``g/2 ≤ chunksize ≤ g``\n      * -      ``auto_partitioner`` (default)    \n        -     Automatic chunk size.    \n        -     ``g/2 ≤ chunksize``     \n      * -     ``affinity_partitioner``     \n        -      Automatic chunk size, cache affinity and uniform distribution of iterations.    \n        -     ``g/2 ≤ chunksize``     \n      * -     ``static_partitioner``     \n        -      Deterministic chunk size, cache affinity and uniform distribution of iterations without load balancing.    \n        -     ``max(g/3, problem_size/num_of_resources) ≤ chunksize``      \n\n\n\n\nAn ``auto_partitioner`` is used when no partitioner is specified. In\ngeneral, the ``auto_partitioner`` or ``affinity_partitioner`` should be\nused, because these tailor the number of chunks based on available\nexecution resources. ``affinity_partitioner`` and ``static_partitioner``\nmay take advantage of ``Range`` ability to split in a given ratio (see\n\"Advanced Topic: Other Kinds of Iteration Spaces\") for distributing\niterations in nearly equal chunks between computing resources.\n\n\n``simple_partitioner`` can be useful in the following situations:\n\n\n-  The subrange size for ``operator()`` must not exceed a limit. That\n   might be advantageous, for example, if your ``operator()`` needs a\n   temporary array proportional to the size of the range. With a limited\n   subrange size, you can use an automatic variable for the array\n   instead of having to use dynamic memory allocation.\n\n\n-  A large subrange might use cache inefficiently. For example, suppose\n   the processing of a subrange involves repeated sweeps over the same\n   memory locations. Keeping the subrange below a limit might enable the\n   repeatedly referenced memory locations to fit in cache.\n\n\n-  You want to tune to a specific machine.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Predefined_Node_Types.rst",
    "content": ".. _Predefined_Node_Types:\n\nPredefined Node Types\n=====================\n\n\nYou can define your own node types by inheriting from class graph_node,\nclass sender and class receiver but it is likely that you can create\nyour graph with the predefined node types already available in\nflow_graph.h. Below is a table that lists all of the predefined types\nwith a basic description. See the Developer Reference for a more\ndetailed description of each node.\n\n\n.. container:: tablenoborder\n\n\n   .. list-table:: \n      :header-rows: 1\n      :widths: 25 25\n\n      * - Predefined Node Type \n        - Description \n      * - ``input_node``\n        - A single-output node, with a generic output type.\n          When activated, it executes a user body to generate its output. Its body is invoked if downstream nodes have accepted the previous generated output.\n          Otherwise, the previous output is temporarily buffered until it is accepted downstream and then the body is again invoked.\n      * - ``function_node``\n        - A single-input single-output node that broadcasts its output to all successors. Has generic input and output types. Executes a user body and has controllable concurrency level and buffering policy. For each input exactly one output is returned.\n      * - ``continue_node`` \n        - A single-input, single-output node that broadcasts its output to all successors. It has a single input that requires 1 or more inputs   of type ``continue_msg`` and has a generic output type. It executes a   user body when it receives N ``continue_msg objects`` at its input. N is   equal to the number of predecessors plus any additional offset   assigned at construction time.\n      * - ``multifunction_node``\n        - A single-input multi-output node. It has a generic input type and    several generic output types. It executes a user body, and has   controllable concurrency level and buffering policy. The body can   output zero or more messages on each output port.\n      * - ``broadcast_node`` \n        - A single-input, single-output node that broadcasts each message    received to all successors. Its input and output are of the same   generic type. It does not buffer messages.\n      * - ``buffer_node``, ``queue_node``, ``priority_queue_node``, and ``sequencer_node``. \n        - Single-input, single-output nodes that buffer messages and send    their output to one successor. The order in which the messages are   sent are node specific (see the Developer Reference). These nodes are   unique in that they send to only a single successor and not all   successors.\n      * - ``join_node``\n        - A multi-input, single-output node. There are several generic    input types and the output type is a tuple of these generic types.   The node combines one message from each input port to create a tuple   that is broadcast to all successors. The policy used to combine   messages is selectable as queueing, reserving or tag-matching.\n      * - ``split_node`` \n        - A single-input, multi-output node. The input type is a tuple of    generic types and there is one output port for each of the types in   the tuple. The node receives a tuple of values and outputs each   element of the tuple on a corresponding output port.\n      * - ``write_once_node``, ``overwrite_node`` \n        - Single-input, single-output nodes that buffer a single message    and broadcast their outputs to all successors. After broadcast, the   nodes retain the last message received, so it is available to any   future successor. A ``write_once_node`` will only accept the first   message it receives, while the ``overwrite_node`` will accept all   messages, broadcasting them to all successors, and replacing the old   value with the new.\n      * - ``limiter_node`` \n        - A multi-input, single output node that broadcasts its output to    all successors. The main input type and output type are of the same   generic type. The node increments an internal counter when it   broadcasts a message. If the increment causes it to reach its   user-assigned threshold, it will broadcast no more messages. A   special input port can be used to adjust the internal count, allowing   further messages to be broadcast. The node does not buffer messages.\n      * - ``indexer_node`` \n        - A multi-input, single-output node that broadcasts its output    message to all of its successors. The input type is a list of generic   types and the output type is a ``tagged_msg``. The message is of one of   the types listed in the input and the tag identifies the port on   which the message was received. Messages are broadcast individually   as they arrive at the input ports.\n      * - ``composite_node`` \n        - A node that might have 0, 1 or multiple ports for both input and    output. The ``composite_node`` packages a group of other nodes together   and maintains a tuple of references to ports that border it. This   allows for the corresponding ports of the ``composite_node`` to be used   to make edges which hitherto would have been made from the actual   nodes in the ``composite_node``.\n      * - async_node (preview feature) \n        - A node that allows a flow graph to communicate with an external    activity managed by the user or another runtime. This node receives   messages of generic type, invokes the user-provided body to submit a   message to an external activity. The external activity can use a   special interface to return a generic type and put it to all   successors of ``async_node``.\n\n\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Reader_Writer_Mutexes.rst",
    "content": ".. _Reader_Writer_Mutexes:\n\nReader Writer Mutexes\n=====================\n\n\nMutual exclusion is necessary when at least one thread *writes* to a\nshared variable. But it does no harm to permit multiple readers into a\nprotected region. The reader-writer variants of the mutexes, denoted by\n``_rw_`` in the class names, enable multiple readers by distinguishing\n*reader locks* from *writer locks.* There can be more than one reader\nlock on a given mutex.\n\n\nRequests for a reader lock are distinguished from requests for a writer\nlock via an extra boolean parameter in the constructor for\n``scoped_lock``. The parameter is false to request a reader lock and\ntrue to request a writer lock. It defaults to ``true`` so that when\nomitted, a ``spin_rw_mutex`` or ``queuing_rw_mutex`` behaves like its\nnon-``_rw_`` counterpart.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/References.rst",
    "content": ".. _References:\n\nReferences\n==========\n\n\n**[1]**   \"Memory Consistency & .NET\", Arch D. Robison, Dr. Dobb’s\nJournal, April 2003.\n\n\n**[2]**   A Formal Specification of Intel® Itanium® Processor Family\nMemory Ordering, Intel Corporation, October 2002.\n\n\n**[3]**   \"Cilk: An Efficient Multithreaded Runtime System\", Robert\nBlumofe, Christopher Joerg, Bradley Kuszmaul, C. Leiserson, and Keith\nRandall, Proceedings of the fifth ACM SIGPLAN symposium on Principles\nand practice of parallel programming, 1995.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Scalable_Memory_Allocator.rst",
    "content": ".. _Scalable_Memory_Allocator:\n\nScalable Memory Allocator\n=========================\n\n\nBoth the debug and release versions of |full_name| \nconsists of two dynamic shared libraries, one with\ngeneral support and the other with a scalable memory allocator. The\nlatter is distinguished by ``malloc`` in its name. For example, the\nrelease versions for Windows\\* OS are ``tbb<version>.dll`` and ``tbbmalloc.dll``\nrespectively. Applications may choose to use only the general library,\nor only the scalable memory allocator, or both. See the links below for\nmore information on memory allocation.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Summary_of_Containers.rst",
    "content": ".. _Summary_of_Containers:\n\nSummary of Containers\n=====================\n\n\nThe high-level containers in |full_name|\nenable common idioms for concurrent access. They are suitable for\nscenarios where the alternative would be a serial container with a lock\naround it.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Summary_of_Loops_and_Pipelines.rst",
    "content": ".. _Summary_of_Loops_and_Pipelines:\n\nSummary of Loops and Pipelines\n==============================\n\nThe high-level loop and pipeline templates in |full_name|\ngive you efficient scalable ways to exploit the power of multi-core chips without having to start from scratch.\nThey let you design your software at a high task-pattern level and not worry about low-level manipulation of threads.\nBecause they are generic, you can customize them to your specific needs.\nHave fun using these templates to unlock the power of multi-core.\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Task-Based_Programming.rst",
    "content": ".. _Task-Based_Programming:\n\nTask-Based Programming\n======================\n\n\nWhen striving for performance, programming in terms of threads can be a\npoor way to do multithreaded programming. It is much better to formulate\nyour program in terms of *logical tasks*, not threads, for several\nreasons.\n\n\n-  Matching parallelism to available resources\n\n\n-  Faster task startup and shutdown\n\n\n-  More efficient evaluation order\n\n\n-  Improved load balancing\n\n\n-  Higher–level thinking\n\n\nThe following paragraphs explain these points in detail.\n\n\nThe threads you create with a threading package are *logical* threads,\nwhich map onto the *physical threads* of the hardware. For computations\nthat do not wait on external devices, highest efficiency usually occurs\nwhen there is exactly one running logical thread per physical thread.\nOtherwise, there can be inefficiencies from the mismatch\\ *.\nUndersubscription* occurs when there are not enough running logical\nthreads to keep the physical threads working. *Oversubscription* occurs\nwhen there are more running logical threads than physical threads.\nOversubscription usually leads to *time sliced* execution of logical\nthreads, which incurs overheads as discussed in Appendix A, *Costs of\nTime Slicing*. The scheduler tries to avoid oversubscription, by having\none logical thread per physical thread, and mapping tasks to logical\nthreads, in a way that tolerates interference by other threads from the\nsame or other processes.\n\n\nThe key advantage of tasks versus logical threads is that tasks are much\n*lighter weight* than logical threads. On Linux systems, starting and\nterminating a task is about 18 times faster than starting and\nterminating a thread. On Windows systems, the ratio is more than 100.\nThis is because a thread has its own copy of a lot of resources, such as\nregister state and a stack. On Linux, a thread even has its own process\nid. A task in |full_name|, in contrast, is\ntypically a small routine, and also, cannot be preempted at the task\nlevel (though its logical thread can be preempted).\n\n\nTasks in oneTBB are efficient too because *the scheduler is unfair*. Thread schedulers typically\ndistribute time slices in a round-robin fashion. This distribution is\ncalled \"fair\", because each logical thread gets its fair share of time.\nThread schedulers are typically fair because it is the safest strategy\nto undertake without understanding the higher-level organization of a\nprogram. In task-based programming, the task scheduler does have some\nhigher-level information, and so can sacrifice fairness for efficiency.\nIndeed, it often delays starting a task until it can make useful\nprogress.\n\n\nThe scheduler does *load balancing*. In addition to using the right\nnumber of threads, it is important to distribute work evenly across\nthose threads. As long as you break your program into enough small\ntasks, the scheduler usually does a good job of assigning tasks to\nthreads to balance load. With thread-based programming, you are often\nstuck dealing with load-balancing yourself, which can be tricky to get\nright.\n\n\n.. tip:: \n   Design your programs to try to create many more tasks than there are\n   threads, and let the task scheduler choose the mapping from tasks to\n   threads.\n\n\nFinally, the main advantage of using tasks instead of threads is that\nthey let you think at a higher, task-based, level. With thread-based\nprogramming, you are forced to think at the low level of physical\nthreads to get good efficiency, because you have one logical thread per\nphysical thread to avoid undersubscription or oversubscription. You also\nhave to deal with the relatively coarse grain of threads. With tasks,\nyou can concentrate on the logical dependences between tasks, and leave\nthe efficient scheduling to the scheduler.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Task_Scheduler_Bypass.rst",
    "content": ".. _Task_Scheduler_Bypass:\n\nTask Scheduler Bypass\n=====================\n\nScheduler bypass is an optimization where you directly specify the next task to run. \nAccording to the rules of execution described in :doc:`How Task Scheduler Works <How_Task_Scheduler_Works>`, \nthe spawning of the new task to be executed by the current thread involves the next steps:\n\n -  Push a new task onto the thread's deque.\n -  Continue to execute the current task until it is completed.\n -  Take a task from the thread's deque, unless it is stolen by another thread.\n\nSteps 1 and 3 introduce unnecessary deque operations or, even worse, allow stealing that can hurt \nlocality without adding significant parallelism. These problems can be avoided by using \"Task Scheduler Bypass\" technique to directly point the preferable task to be executed next \ninstead of spawning it. When, as described in :doc:`How Task Scheduler Works <How_Task_Scheduler_Works>`,\nthe returned task becomes the first candidate for the next task to be executed by the thread. Furthermore, this approach almost guarantees that \nthe task is executed by the current thread and not by any other thread.\n\nPlease note that at the moment the only way to use this optimization is to use `preview feature of ``onepai::tbb::task_group`` "
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/The_Task_Scheduler.rst",
    "content": ".. _The_Task_Scheduler:\n\nThe Task Scheduler\n==================\n\n\nThis section introduces the |full_name|\n*task scheduler*. The task scheduler is the engine that powers the loop\ntemplates. When practical, use the loop templates instead of\nthe task scheduler, because the templates hide the complexity of the\nscheduler. However, if you have an algorithm that does not naturally map\nonto one of the high-level templates, use the task scheduler.\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/Task-Based_Programming\n   ../tbb_userguide/When_Task-Based_Programming_Is_Inappropriate\n   ../tbb_userguide/How_Task_Scheduler_Works\n   ../tbb_userguide/Task_Scheduler_Bypass\n   ../tbb_userguide/Guiding_Task_Scheduler_Execution"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Throughput_of_pipeline.rst",
    "content": ".. _Throughput_of_pipeline:\n\nThroughput of pipeline\n======================\n\n\nThe throughput of a pipeline is the rate at which tokens flow through\nit, and is limited by two constraints. First, if a pipeline is run with\n``N`` tokens, then obviously there cannot be more than ``N`` operations\nrunning in parallel. Selecting the right value of ``N`` may involve some\nexperimentation. Too low a value limits parallelism; too high a value\nmay demand too many resources (for example, more buffers). Second, the\nthroughput of a pipeline is limited by the throughput of the slowest\nsequential filter. This is true even for a pipeline with no parallel\nfilters. No matter how fast the other filters are, the slowest\nsequential filter is the bottleneck. So in general you should try to\nkeep the sequential filters fast, and when possible, shift work to the\nparallel filters.\n\n\nThe text processing example has relatively poor speedup, because the\nserial filters are limited by the I/O speed of the system. Indeed, even\nwith files that are on a local disk, you are unlikely to see a speedup\nmuch more than 2. To really benefit from a pipeline, the parallel\nfilters need to be doing some heavy lifting compared to the serial\nfilters.\n\n\nThe window size, or sub-problem size for each token, can also limit\nthroughput. Making windows too small may cause overheads to dominate the\nuseful work. Making windows too large may cause them to spill out of\ncache. A good guideline is to try for a large window size that still\nfits in cache. You may have to experiment a bit to find a good window\nsize.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Timing.rst",
    "content": ".. _Timing:\n\nTiming\n======\n\n\nWhen measuring the performance of parallel programs, it is usually *wall\nclock* time, not CPU time, that matters. The reason is that better\nparallelization typically increases aggregate CPU time by employing more\nCPUs. The goal of parallelizing a program is usually to make it run\n*faster* in real time.\n\n\nThe class ``tick_count`` in |full_name|\nprovides a simple interface for measuring wall clock time. A\n``tick_count`` value obtained from the static method tick_count::now()\nrepresents the current absolute time. Subtracting two ``tick_count``\nvalues yields a relative time in ``tick_count::interval_t``, which you\ncan convert to seconds, as in the following example:\n\n\n::\n\n\n   tick_count t0 = tick_count::now();\n   ... do some work ...\n   tick_count t1 = tick_count::now();\n   printf(\"work took %g seconds\\n\",(t1-t0).seconds());\n       \n\n\n\nUnlike some timing interfaces, ``tick_count`` is guaranteed to be safe\nto use across threads. It is valid to subtract ``tick_count`` values\nthat were created by different threads. A ``tick_count`` difference can\nbe converted to seconds.\n\n\nThe resolution of ``tick_count`` corresponds to the highest resolution\ntiming service on the platform that is valid across threads in the same\nprocess. Since the CPU timer registers are *not* valid across threads on\nsome platforms, this means that the resolution of tick_count can not be\nguaranteed to be consistent across platforms.\n\n\n.. note::\n\n   On Linux\\* OS, you may need to add -lrt to the linker command when\n   you use oneapi::tbb::tick_count class. For more information, see\n   `http://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking \n   <http://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking>`_.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/UpgradeDowngrade.rst",
    "content": ".. _UpgradeDowngrade:\n\nUpgrade/Downgrade\n=================\n\n\nIt is possible to upgrade a reader lock to a writer lock, by using the\nmethod ``upgrade_to_writer``. Here is an example.\n\n\n::\n\n\n   std::vector<string> MyVector;\n   typedef spin_rw_mutex MyVectorMutexType;\n   MyVectorMutexType MyVectorMutex;\n    \n\n   void AddKeyIfMissing( const string& key ) {\n       // Obtain a reader lock on MyVectorMutex\n       MyVectorMutexType::scoped_lock lock(MyVectorMutex,/*is_writer=*/false);\n       size_t n = MyVector.size();\n       for( size_t i=0; i<n; ++i )\n           if( MyVector[i]==key ) return;\n       if( !lock.upgrade_to_writer() )\n           // Check if key was added while lock was temporarily released\n           for( int i=n; i<MyVector.size(); ++i )\n              if(MyVector[i]==key ) return; \n       vector.push_back(key);\n   }\n\n\nNote that the vector must sometimes be searched again. This is necessary\nbecause ``upgrade_to_writer`` might have to temporarily release the lock\nbefore it can upgrade. Otherwise, deadlock might ensue, as discussed in\n**Lock Pathologies**. Method ``upgrade_to_writer`` returns a ``bool``\nthat is true if it successfully upgraded the lock without releasing it,\nand false if the lock was released temporarily. Thus when\n``upgrade_to_writer`` returns false, the code must rerun the search to\ncheck that the key was not inserted by another writer. The example\npresumes that keys are always added to the end of the vector, and that\nkeys are never removed. Because of these assumptions, it does not have\nto re-search the entire vector, but only the elements beyond those\noriginally searched. The key point to remember is that when\n``upgrade_to_writer`` returns false, any assumptions established while\nholding a reader lock may have been invalidated, and must be rechecked.\n\n\nFor symmetry, there is a corresponding method ``downgrade_to_reader``,\nthough in practice there are few reasons to use it.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Using_Circular_Buffers.rst",
    "content": ".. _Using_Circular_Buffers:\n\nUsing Circular Buffers\n======================\n\n\nCircular buffers can sometimes be used to minimize the overhead of\nallocating and freeing the items passed between pipeline filters. If the\nfirst filter to create an item and last filter to consume an item are\nboth ``serial_in_order``, the items can be allocated and freed via a\ncircular buffer of size at least ``ntoken``, where ``ntoken`` is the\nfirst parameter to ``parallel_pipeline``. Under these conditions, no\nchecking of whether an item is still in use is necessary.\n\n\nThe reason this works is that at most ``ntoken`` items can be in flight,\nand items will be freed in the order that they were allocated. Hence by\nthe time the circular buffer wraps around to reallocate an item, the\nitem must have been freed from its previous use in the pipeline. If the\nfirst and last filter are *not* ``serial_in_order``, then you have to\nkeep track of which buffers are currently in use, because buffers might\nnot be retired in the same order they were allocated.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/When_Not_to_Use_Queues.rst",
    "content": ".. _When_Not_to_Use_Queues:\n\nWhen Not to Use Queues\n======================\n\n\nQueues are widely used in parallel programs to buffer consumers from\nproducers. Before using an explicit queue, however, consider using\n``parallel_for_each`` ``parallel_pipeline`` instead. These is often more\nefficient than queues for the following reasons:\n\n\n-  A queue is inherently a bottle neck, because it must maintain\n   first-in first-out order.\n\n\n-  A thread that is popping a value may have to wait idly until the\n   value is pushed.\n\n\n-  A queue is a passive data structure. If a thread pushes a value, it\n   could take time until it pops the value, and in the meantime the\n   value (and whatever it references) becomes \"cold\" in cache. Or worse\n   yet, another thread pops the value, and the value (and whatever it\n   references) must be moved to the other processor.\n\n\nIn contrast, ``parallel_pipeline`` avoids these bottlenecks. Because its\nthreading is implicit, it optimizes use of worker threads so that they\ndo other work until a value shows up. It also tries to keep items hot in\ncache.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/When_Task-Based_Programming_Is_Inappropriate.rst",
    "content": ".. _When_Task-Based_Programming_Is_Inappropriate:\n\nWhen Task-Based Programming Is Inappropriate\n============================================\n\n\nUsing the task scheduler is usually the best approach to threading for\nperformance, however there are cases when the task scheduler is not\nappropriate. The task scheduler is intended for high-performance\nalgorithms composed from non-blocking tasks. It still works if the tasks\nrarely block. However, if threads block frequently, there is a\nperformance loss when using the task scheduler because while the thread\nis blocked, it is not working on any tasks. Blocking typically occurs\nwhile waiting for I/O or mutexes for long periods. If threads hold\nmutexes for long periods, your code is not likely to perform well\nanyway, no matter how many threads it has. If you have blocking tasks,\nit is best to use full-blown threads for those. The task scheduler is\ndesigned so that you can safely mix your own threads with |full_name| tasks.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Which_Dynamic_Libraries_to_Use.rst",
    "content": ".. _Which_Dynamic_Libraries_to_Use:\n\nWhich Dynamic Libraries to Use\n==============================\n\n\nThe template ``scalable_allocator<T>`` requires the |full_name| \nscalable memory allocator library as\ndescribed in **Scalable Memory Allocator**. It does not require the\noneTBB general library, and can be used independently of the rest of\noneTBB.\n\n\nThe templates ``tbb_allocator<T>`` and ``cache_aligned_allocator<T>``\nuse the scalable allocator library if it is present otherwise it reverts\nto using ``malloc`` and ``free``. Thus, you can use these templates even\nin applications that choose to omit the scalable memory allocator\nlibrary.\n\n\nThe rest of |full_name| can be used\nwith or without the oneTBB scalable memory allocator library.\n\n\n.. container:: tablenoborder\n\n\n   .. list-table:: \n      :header-rows: 1\n\n      * -     Template     \n        -     Requirements     \n        -     Notes     \n      * -     \\ ``scalable_allocator<T>``     \n        -     |full_name| scalable    memory allocator library. See **Scalable Memory Allocator**.    \n        -           \n      * -     \\ ``tbb_allocator<T>``           \\ ``cache_aligned_allocator<T>``    \n        -           \n        -     Uses the scalable allocator library if it is present,    otherwise it reverts to using ``malloc`` and ``free``.    \n\n\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Windows_C_Dynamic_Memory_Interface_Replacement.rst",
    "content": ".. _Windows_C_Dynamic_Memory_Interface_Replacement:\n\nWindows\\* OS C/C++ Dynamic Memory Interface Replacement\n=======================================================\n\n\nRelease version of the proxy library is ``tbbmalloc_proxy.dll``, debug\nversion is ``tbbmalloc_proxy_debug.dll``.\n\n\nThe following dynamic memory functions are replaced:\n\n\n-  Standard C library functions: ``malloc``, ``calloc``, ``realloc``,\n   ``free``\n\n\n-  Replaceable global C++ operators ``new`` and ``delete``\n\n\n-  Microsoft\\* C run-time library functions: ``_msize``,\n   ``_aligned_malloc``, ``_aligned_realloc``, ``_aligned_free``,\n   ``_aligned_msize``\n\n\n.. note:: \n   Replacement of memory allocation functions is not supported for\n   Universal Windows Platform applications.\n\n\nTo do the replacement use one of the following methods:\n\n\n-  Add the following header to a source code of any binary which is\n   loaded during application startup.\n\n\n   ::\n\n\n      #include \"oneapi/tbb/tbbmalloc_proxy.h\"\n\n\n-  Alternatively, add the following parameters to the linker options for\n   the .exe or .dll file that is loaded during application startup.\n\n   For 32-bit code (note the triple underscore):\n\n\n   ::\n\n\n      tbbmalloc_proxy.lib /INCLUDE:\"___TBB_malloc_proxy\"\n   \n   For 64-bit code (note the double underscore):\n\n\n   ::\n\n\n      tbbmalloc_proxy.lib /INCLUDE:\"__TBB_malloc_proxy\"\n\n\nThe OS program loader must be able to find the proxy library and the\nscalable memory allocator library at program load time. For that you may\ninclude the directory containing the libraries in the ``PATH``\nenvironment variable.\n\n\nThe replacement uses in-memory binary instrumentation of Visual C++\\*\nruntime libraries. To ensure correctness, it must first recognize a\nsubset of dynamic memory functions in these libraries. If a problem\noccurs, the replacement is skipped, and the program continues to use the\nstandard memory allocation functions. You can use the ``TBB_malloc_replacement_log``\nfunction to check if the replacement has succeeded and to get additional information.\n\n\nSet the ``TBB_MALLOC_DISABLE_REPLACEMENT`` environment variable to 1 to\ndisable replacement for a specific program invocation. In this case, the\nprogram will use standard dynamic memory allocation functions. Note that\nthe oneTBB memory allocation libraries are still required for the\nprogram to start even if their usage is disabled.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Windows_OS_ug.rst",
    "content": ".. _Windows_OS_ug:\n\nWindows\\*\n=========\n\nThis section uses <*tbb_install_dir*> to indicate the top-level\ninstallation directory. The following table describes the subdirectory\nstructure for Windows\\*, relative to <*tbb_install_dir*>.\n\n.. container:: tablenoborder\n\n\n   .. list-table:: \n      :header-rows: 1\n\n      * - Item     \n        - Location     \n        - Environment Variable     \n      * - Header files     \n        - | ``include\\oneapi\\tbb.h``\n\t  | ``include\\oneapi\\tbb\\*.h``     \n        - ``INCLUDE``     \n      * - .lib files     \n        - ``lib\\<arch>\\vc<vcversion>\\<lib><variant><version>.lib``\\    \n        - ``LIB``     \n      * - .dll files     \n        - ``redist\\<arch>\\vc<vcversion>\\<lib><variant><version>.dll``\n        - ``PATH``\n      * - .pdb files\n        - Same as corresponding ``.dll`` file.\n        - \\\n\nWhere\n\n* ``<arch>`` - ``ia32`` or ``intel64``\n\n  .. note:: Starting with oneTBB 2022.0, 32-bit binaries are supported only by the open-source version of the library.\n\n* ``<lib>`` - ``tbb``, ``tbbmalloc``, ``tbbmalloc_proxy`` or ``tbbbind``\n* ``<vcversion>`` \n\n  - ``14`` - use for dynamic linkage  with the CRT\n\n  - ``14_uwp`` - use for Windows 10 Universal Windows applications\n\n  - ``14_uwd`` - use for Universal Windows Drivers\n\n  - ``_mt`` - use for static linkage with the CRT\n\n* ``<variant>`` - ``_debug`` or empty\n* ``<version>`` - binary version\n \nThe last column shows, which environment variables are used by the\nMicrosoft\\* Visual C++\\* or Intel® C++ Compiler Classic or Intel® oneAPI DPC++/C++ Compiler, to find these\nsubdirectories.\n\n.. CAUTION:: \n   Ensure that the relevant product directories are mentioned by the\n   environment variables; otherwise the compiler might not find the\n   required files.\n\n\n.. note::\n   Microsoft\\* C/C++ run-time libraries come in static and dynamic\n   forms. Either can be used with oneTBB. Linking to the oneTBB library\n   is always dynamic.\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/Working_on_the_Assembly_Line_pipeline.rst",
    "content": ".. _Working_on_the_Assembly_Line_pipeline:\n\nWorking on the Assembly Line: parallel_pipeline\n===============================================\n\n\n*Pipelining* is a common parallel pattern that mimics a traditional\nmanufacturing assembly line. Data flows through a series of pipeline\nfilters and each filter processes the data in some way. Given an\nincoming stream of data, some of these filters can operate in parallel,\nand others cannot. For example, in video processing, some operations on\nframes do not depend on other frames, and so can be done on multiple\nframes at the same time. On the other hand, some operations on frames\nrequire processing prior frames first.\n\n\nThe |full_name| classes\n``parallel_pipeline`` and filter implement the pipeline pattern. A\nsimple text processing example will be used to demonstrate the usage of\n``parallel_pipeline`` and filter to perform parallel formatting. The\nexample reads a text file, squares each decimal numeral in the text, and\nwrites the modified text to a new file. Below is a picture of the\npipeline.\n\n\n.. CAUTION:: \n   Since the body object provided to the filters of the\n   ``parallel_pipeline`` might be copied, its ``operator()`` should not\n   modify the body. Otherwise the modification might or might not become\n   visible to the thread that invoked ``parallel_pipeline``, depending\n   upon whether ``operator()`` is acting on the original or a copy. As a\n   reminder of this nuance, ``parallel_pipeline`` requires that the body\n   object's ``operator()`` be declared ``const``.\n\n\n.. container:: tablenoborder\n\n\n   .. list-table:: \n      :header-rows: 0\n\n      * -     Read chunk from input file    \n        -     |image0|\n        -     Square numerals in chunk    \n        -     |image1|\n        -     Write chunk to output file    \n\n\n\n\nAssume that the raw file I/O is sequential. The squaring filter can be\ndone in parallel. That is, if you can serially read ``n`` chunks very\nquickly, you can transform each of the ``n`` chunks in parallel, as long\nas they are written in the proper order to the output file. Though the\nraw I/O is sequential, the formatting of input and output can be moved\nto the middle filter, and thus be parallel.\n\n\nTo amortize parallel scheduling overheads, the filters operate on chunks\nof text. Each input chunk is approximately 4000 characters. Each chunk\nis represented by an instance of class ``TextSlice``:\n\n\n::\n\n\n   // Holds a slice of text.\n   /** Instances *must* be allocated/freed using methods herein, because the C++ declaration\n      represents only the header of a much larger object in memory. */\n   class TextSlice {\n       // Pointer to one past last character in sequence\n       char* logical_end;\n       // Pointer to one past last available byte in sequence.\n       char* physical_end;\n   public:\n       // Allocate a TextSlice object that can hold up to max_size characters.\n       static TextSlice* allocate( size_t max_size ) {\n           // +1 leaves room for a terminating null character.\n           TextSlice* t = (TextSlice*)oneapi::tbb::tbb_allocator<char>().allocate( sizeof(TextSlice)+max_size+1 );\n           t->logical_end = t->begin();\n           t->physical_end = t->begin()+max_size;\n           return t;\n       }\n       // Free this TextSlice object\n       void free() {\n           oneapi::tbb::tbb_allocator<char>().deallocate((char*)this, sizeof(TextSlice)+(physical_end-begin())+1);\n       }\n       // Pointer to beginning of sequence\n       char* begin() {return (char*)(this+1);}\n       // Pointer to one past last character in sequence\n       char* end() {return logical_end;}\n       // Length of sequence\n       size_t size() const {return logical_end-(char*)(this+1);}\n       // Maximum number of characters that can be appended to sequence\n       size_t avail() const {return physical_end-logical_end;}\n       // Append sequence [first,last) to this sequence.\n       void append( char* first, char* last ) {\n           memcpy( logical_end, first, last-first );\n           logical_end += last-first;\n       }\n       // Set end() to given value.\n       void set_end( char* p ) {logical_end=p;}\n   };\n\n\nBelow is the top-level code for building and running the pipeline.\n``TextSlice`` objects are passed between filters using pointers to avoid\nthe overhead of copying a ``TextSlice``.\n\n\n::\n\n\n   void RunPipeline( int ntoken, FILE* input_file, FILE* output_file ) {\n       oneapi::tbb::parallel_pipeline(\n           ntoken,\n           oneapi::tbb::make_filter<void,TextSlice*>(\n               oneapi::tbb::filter_mode::serial_in_order, MyInputFunc(input_file) )\n       &\n           oneapi::tbb::make_filter<TextSlice*,TextSlice*>(\n               oneapi::tbb::filter_mode::parallel, MyTransformFunc() )\n       &\n           oneapi::tbb::make_filter<TextSlice*,void>(\n               oneapi::tbb::filter_mode::serial_in_order, MyOutputFunc(output_file) ) );\n   } \n\n\nThe parameter ``ntoken`` to method ``parallel_pipeline`` controls the\nlevel of parallelism. Conceptually, tokens flow through the pipeline. In\na serial in-order filter, each token must be processed serially in\norder. In a parallel filter, multiple tokens can by processed in\nparallel by the filter. If the number of tokens were unlimited, there\nmight be a problem where the unordered filter in the middle keeps\ngaining tokens because the output filter cannot keep up. This situation\ntypically leads to undesirable resource consumption by the middle\nfilter. The parameter to method ``parallel_pipeline`` specifies the\nmaximum number of tokens that can be in flight. Once this limit is\nreached, the pipeline never creates a new token at the input filter\nuntil another token is destroyed at the output filter.\n\n\nThe second parameter specifies the sequence of filters. Each filter is\nconstructed by function ``make_filter<inputType, outputType>(mode,functor)``.\n\n\n-  The *inputType* specifies the type of values input by a filter. For\n   the input filter, the type is ``void``.\n\n\n-  The *outputType* specifies the type of values output by a filter. For\n   the output filter, the type is ``void``.\n\n\n-  The *mode* specifies whether the filter processes items in parallel,\n   serial in-order, or serial out-of-order.\n\n\n-  The *functor* specifies how to produce an output value from an input\n   value.\n\n\nThe filters are concatenated with ``operator&``. When concatenating two\nfilters, the *outputType* of the first filter must match the *inputType*\nof the second filter.\n\n\nThe filters can be constructed and concatenated ahead of time. An\nequivalent version of the previous example that does this follows:\n\n\n::\n\n\n   void RunPipeline( int ntoken, FILE* input_file, FILE* output_file ) {\n       oneapi::tbb::filter<void,TextSlice*> f1( oneapi::tbb::filter_mode::serial_in_order, \n                                          MyInputFunc(input_file) );\n       oneapi::tbb::filter<TextSlice*,TextSlice*> f2(oneapi::tbb::filter_mode::parallel, \n                                               MyTransformFunc() );\n       oneapi::tbb::filter<TextSlice*,void> f3(oneapi::tbb::filter_mode::serial_in_order, \n                                         MyOutputFunc(output_file) );\n       oneapi::tbb::filter<void,void> f = f1 & f2 & f3;\n       oneapi::tbb::parallel_pipeline(ntoken,f);\n   }\n\n\nThe input filter must be ``serial_in_order`` in this example because the\nfilter reads chunks from a sequential file and the output filter must\nwrite the chunks in the same order. All ``serial_in_order`` filters\nprocess items in the same order. Thus if an item arrives at\n``MyOutputFunc`` out of the order established by ``MyInputFunc``, the\npipeline automatically delays invoking ``MyOutputFunc::operator()`` on\nthe item until its predecessors are processed. There is another kind of\nserial filter, ``serial_out_of_order``, that does not preserve order.\n\n\nThe middle filter operates on purely local data. Thus any number of\ninvocations of its functor can run concurrently. Hence it is specified\nas a parallel filter.\n\n\nThe functors for each filter are explained in detail now. The output\nfunctor is the simplest. All it has to do is write a ``TextSlice`` to a\nfile and free the ``TextSlice``.\n\n\n::\n\n\n   // Functor that writes a TextSlice to a file.\n   class MyOutputFunc {\n       FILE* my_output_file;\n   public:\n       MyOutputFunc( FILE* output_file );\n       void operator()( TextSlice* item ) const;\n   };\n    \n\n   MyOutputFunc::MyOutputFunc( FILE* output_file ) :\n       my_output_file(output_file)\n   {\n   }\n    \n\n   void MyOutputFunc::operator()( TextSlice* out ) const {\n       size_t n = fwrite( out->begin(), 1, out->size(), my_output_file );\n       if( n!=out->size() ) {\n           fprintf(stderr,\"Can't write into file '%s'\\n\", OutputFileName);\n           exit(1);\n       }\n       out->free();\n   } \n\n\nMethod ``operator()`` processes a ``TextSlice``. The parameter ``out``\npoints to the ``TextSlice`` to be processed. Since it is used for the\nlast filter of the pipeline, it returns ``void``.\n\n\nThe functor for the middle filter is similar, but a bit more complex. It\nreturns a pointer to the ``TextSlice`` that it produces.\n\n\n::\n\n\n   // Functor that changes each decimal number to its square.\n   class MyTransformFunc {\n   public:\n       TextSlice* operator()( TextSlice* input ) const;\n   };\n\n\n   TextSlice* MyTransformFunc::operator()( TextSlice* input ) const {\n       // Add terminating null so that strtol works right even if number is at end of the input.\n       *input->end() = '\\0';\n       char* p = input->begin();\n       TextSlice* out = TextSlice::allocate( 2*MAX_CHAR_PER_INPUT_SLICE );\n       char* q = out->begin();\n       for(;;) {\n           while( p<input->end() && !isdigit(*p) )\n               *q++ = *p++;\n           if( p==input->end() )\n               break;\n           long x = strtol( p, &p, 10 );\n           // Note: no overflow checking is needed here, as we have twice the\n           // input string length, but the square of a non-negative integer n\n           // cannot have more than twice as many digits as n.\n           long y = x*x;\n           sprintf(q,\"%ld\",y);\n           q = strchr(q,0);\n       }\n       out->set_end(q);\n       input->free();\n       return out;\n   } \n\n\nThe input functor is the most complicated, because it has to ensure that\nno numeral crosses a boundary. When it finds what could be a numeral\ncrossing into the next slice, it copies the partial numeral to the next\nslice. Furthermore, it has to indicate when the end of input is reached.\nIt does this by invoking method ``stop()`` on a special argument of type\n``flow_control``. This idiom is required for any functor used for the\nfirst filter of a pipeline.\n\n::\n\n\n   TextSlice* next_slice = NULL;\n\n\n   class MyInputFunc {\n   public:\n       MyInputFunc( FILE* input_file_ );\n       MyInputFunc( const MyInputFunc& f ) : input_file(f.input_file) { }\n       ~MyInputFunc();\n       TextSlice* operator()( oneapi::tbb::flow_control& fc ) const;\n   private:\n       FILE* input_file;\n   };\n    \n\n   MyInputFunc::MyInputFunc( FILE* input_file_ ) :\n       input_file(input_file_) { }\n    \n\n   MyInputFunc::~MyInputFunc() {\n   }\n    \n\n   TextSlice* MyInputFunc::operator()( oneapi::tbb::flow_control& fc ) const {\n       // Read characters into space that is available in the next slice.\n       if( !next_slice )\n           next_slice = TextSlice::allocate( MAX_CHAR_PER_INPUT_SLICE );\n       size_t m = next_slice->avail();\n       size_t n = fread( next_slice->end(), 1, m, input_file );\n       if( !n && next_slice->size()==0 ) {\n           // No more characters to process\n           fc.stop();\n           return NULL;\n       } else {\n           // Have more characters to process.\n           TextSlice* t = next_slice;\n           next_slice = TextSlice::allocate( MAX_CHAR_PER_INPUT_SLICE );\n           char* p = t->end()+n;\n           if( n==m ) {\n               // Might have read partial number.  \n               // If so, transfer characters of partial number to next slice.\n               while( p>t->begin() && isdigit(p[-1]) )\n                   --p;\n               assert(p>t->begin(),\"Number too large to fit in buffer.\\n\");\n               next_slice->append( p, t->end()+n );\n           }\n           t->set_end(p);\n           return t;\n       }\n   }\n\n\nThe copy constructor must be defined because the functor is copied when\nthe underlying ``oneapi::tbb::filter_t`` is built from the functor, and again when the pipeline runs.\n\n\n.. |image0| image:: Images/image010.jpg\n   :width: 31px\n   :height: 26px\n.. |image1| image:: Images/image010.jpg\n   :width: 31px\n   :height: 26px\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/Using_Circular_Buffers\n   ../tbb_userguide/Throughput_of_pipeline\n   ../tbb_userguide/Non-Linear_Pipelines\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/always_use_wait_for_all.rst",
    "content": ".. _always_use_wait_for_all:\n\nAlways Use wait_for_all()\n=========================\n\n\nOne of the most common mistakes made in flow graph programming is to\nforget to call ``wait_for_all``. The function ``graph::wait_for_all`` blocks\nuntil all tasks spawned by the graph are complete. This is not only\nuseful when you want to wait until the computation is done, but it is\nnecessary to call ``wait_for_all`` before destroying the graph, or any of\nits nodes. For example, the following function will lead to a program\nfailure:\n\n\n::\n\n\n   void no_wait_for_all() {\n       graph g;\n       function_node< int, int > f( g, 1, []( int i ) -> int {\n           return spin_for(i);\n       } );\n       f.try_put(1);\n\n\n       // program will fail when f and g are destroyed at the\n       // end of the scope, since the body of f is not complete\n   }\n\n\nIn the function above, the graph g and its node f are destroyed at the\nend of the function's scope. However, the task spawned to execute f's\nbody is still in flight. When the task completes, it will look for any\nsuccessors connected to its node, but by then both the graph and the\nnode have been deleted out from underneath it. Placing a\n``g.wait_for_all()`` at the end of the function prevents the premature\ndestruction of the graph and node.\n\n\nIf you use a flow graph and see mysterious behavior, check first to see\nthat you have called ``wait_for_all``.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/appendix_A.rst",
    "content": ".. _appendix_A:\n\nAppendix A Costs of Time Slicing\n================================\n\n\nTime slicing enables there to be more logical threads than physical\nthreads. Each logical thread is serviced for a *time slice* by a\nphysical thread. If a thread runs longer than a time slice, as most do,\nit relinquishes the physical thread until it gets another turn. This\nappendix details the costs incurred by time slicing.\n\n\nThe most obvious is the time for *context switching* between logical\nthreads. Each context switch requires that the processor save all its\nregisters for the previous logical thread that it was executing, and\nload its registers for the next logical thread that it runs.\n\n\nA more subtle cost is *cache cooling*. Processors keep recently accessed\ndata in cache memory, which is very fast, but also relatively small\ncompared to main memory. When the processor runs out of cache memory, it\nhas to evict items from cache and put them back into main memory.\nTypically, it chooses the least recently used items in the cache. (The\nreality of set-associative caches is a bit more complicated, but this is\nnot a cache primer.) When a logical thread gets its time slice, as it\nreferences a piece of data for the first time, this data will be pulled\ninto cache, taking hundreds of cycles. If it is referenced frequently\nenough to not be evicted, each subsequent reference will find it in\ncache, and only take a few cycles. Such data is called \"hot in cache\".\nTime slicing undoes this, because if a thread A finishes its time slice,\nand subsequently thread B runs on the same physical thread, B will tend\nto evict data that was hot in cache for A, unless both threads need the\ndata. When thread A gets its next time slice, it will need to reload\nevicted data, at the cost of hundreds of cycles for each cache miss. Or\nworse yet, the next time slice for thread A may be on a different\nphysical thread that has a different cache altogether.\n\n\nAnother cost is *lock preemption.* This happens if a thread acquires a\nlock on a resource, and its time slice runs out before it releases the\nlock. No matter how short a time the thread intended to hold the lock,\nit is now going to hold it for at least as long as it takes for its next\nturn at a time slice to come up. Any other threads waiting on the lock\neither pointlessly busy-wait, or lose the rest of their time slice. The\neffect is called *convoying*, because the threads end up \"bumper to\nbumper\" waiting for the preempted thread in front to resume driving.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/appendix_B.rst",
    "content": ".. _appendix_B:\n\nAppendix B Mixing With Other Threading Packages\n===============================================\n\n\n|full_name| can be mixed with other\nthreading packages. No special effort is required to use any part of\noneTBB with other threading packages.\n\n\nHere is an example that parallelizes an outer loop with OpenMP and an\ninner loop with oneTBB.\n\n\n::\n\n\n   int M, N;\n    \n\n   struct InnerBody {\n       ...\n   };\n    \n\n   void TBB_NestedInOpenMP() {\n   #pragma omp parallel\n       {\n   #pragma omp for\n           for( int i=0; i<M; ++ ) {\n               parallel_for( blocked_range<int>(0,N,10), InnerBody(i) );\n           }\n       }\n   }\n\n\nThe details of ``InnerBody`` are omitted for brevity. The\n``#pragma omp parallel`` causes the OpenMP to create a team of threads,\nand each thread executes the block statement associated with the pragma.\nThe ``#pragma omp for`` indicates that the compiler should use the\npreviously created thread team to execute the loop in parallel.\n\n\nHere is the same example written using POSIX\\* Threads.\n\n\n::\n\n\n   int M, N;\n    \n\n   struct InnerBody {\n       ...\n   };\n    \n\n   void* OuterLoopIteration( void* args ) {\n       int i = (int)args;\n       parallel_for( blocked_range<int>(0,N,10), InnerBody(i) );\n   }\n    \n\n   void TBB_NestedInPThreads() {\n       std::vector<pthread_t> id( M );\n       // Create thread for each outer loop iteration\n       for( int i=0; i<M; ++i )\n           pthread_create( &id[i], NULL, OuterLoopIteration, NULL );\n       // Wait for outer loop threads to finish\n       for( int i=0; i<M; ++i )\n           pthread_join( &id[i], NULL );\n   } \n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/attach_flow_graph_to_arena.rst",
    "content": ".. _attach_flow_graph_to_arena:\n\nAttach Flow Graph to an Arbitrary Task Arena\n=============================================\n\n\n|short_name| ``task_arena`` interface provides mechanisms to guide tasks\nexecution within the arena by setting the preferred computation units,\nrestricting part of computation units, or limiting arena concurrency. In some\ncases, you may want to apply such mechanisms when a flow graph executes.\n\nDuring its construction, a ``graph`` object attaches to the arena, in which the constructing\nthread occupies a slot.\n\nThis example shows how to set the most performant core type as the preferred one\nfor a graph execution:\n\n\n.. literalinclude:: ./examples/flow_graph_examples.cpp\n   :language: c++\n   :start-after: /*begin_attach_to_arena_1*/\n   :end-before: /*end_attach_to_arena_1*/\n\n\nA ``graph`` object can be reattached to a different ``task_arena`` by calling\nthe ``graph::reset()`` function. It reinitializes and reattaches the ``graph`` to\nthe task arena instance, inside which the ``graph::reset()`` method is executed.\n\nThis example shows how to reattach existing graph to an arena with the most performant\ncore type as the preferred one for a work execution. Whenever a task is spawned on behalf\nof the graph, it is spawned in the arena of a graph it is attached to, disregarding\nthe arena of the thread that the task is spawned from:\n\n\n.. literalinclude:: ./examples/flow_graph_examples.cpp\n   :language: c++\n   :start-after: /*begin_attach_to_arena_2*/\n   :end-before: /*end_attach_to_arena_2*/\n\nSee the following topics to learn more:\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/Guiding_Task_Scheduler_Execution\n   ../tbb_userguide/work_isolation\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/automatically-replacing-malloc.rst",
    "content": ".. _automatically-replacing-malloc:\n\nAutomatically Replacing ``malloc`` and Other C/C++ Functions for Dynamic Memory Allocation\n==========================================================================================\n\n\nOn Windows*, Linux\\* operating systems, it is possible to automatically\nreplace all calls to standard functions for dynamic memory allocation\n(such as ``malloc``) with the |full_name| scalable equivalents.\nDoing so can sometimes improve application performance.\n\n\nReplacements are provided by the proxy library (the library names can be\nfound in platform-specific sections below). A proxy library and a\nscalable memory allocator library should be taken from the same release\nof oneTBB, otherwise the libraries may be mutually incompatible.\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/Windows_C_Dynamic_Memory_Interface_Replacement\n   ../tbb_userguide/Linux_C_Dynamic_Memory_Interface_Replacement\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/avoid_dynamic_node_removal.rst",
    "content": ".. _avoid_dynamic_node_removal:\n\nAvoid Dynamic Node Removal\n==========================\n\n\nThese are the basic guidelines regarding nodes and edges:\n\n\n-  Avoid dynamic node removal\n\n\n-  Adding edges and nodes is supported\n\n\n-  Removing edges is supported\n\n\nIt is possible to add new nodes and edges and to remove old edges from a\nflow graph as nodes are actively processing messages in the graph.\nHowever, removing nodes is discouraged. Destroying a graph or any of its\nnodes while there are messages being processed in the graph can lead to\npremature deletion of memory that will be later touched by tasks in the\ngraph causing program failure. Removal of nodes when the graph is not\nidle may lead to intermittent failures and hard to find failures, so it\nshould be avoided.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/avoiding_data_races.rst",
    "content": ".. _avoiding_data_races:\n\nAvoiding Data Races\n===================\n\n\nThe edges in a flow graph make explicit the dependence relationships\nthat you want the library to enforce. Similarly, the concurrency limits\non ``function_node`` and ``multifunction_node`` objects limit the maximum number\nof concurrent invocations that the runtime library will allow. These are\nthe limits that are enforced by the library; the library does not\nautomatically protect you from data races. You must explicitly prevent\ndata races by using these mechanisms.\n\n\nFor example, the follow code has a data race because there is nothing to\nprevent concurrent accesses to the global count object referenced by\nnode f:\n\n\n::\n\n\n     graph g;\n     int src_count = 1;\n     int global_sum = 0;\n     int limit = 100000;\n\n     input_node< int > src( g, [&]( oneapi::tbb::flow_control& fc ) -> int {\n       if ( src_count <= limit ) {\n         return src_count++;\n       } else {\n         fc.stop();\n         return int();\n       }\n     } );\n     src.activate();\n\n     function_node< int, int > f( g, unlimited, [&]( int i ) -> int {\n       global_sum += i;  // data race on global_sum\n       return i; \n     } );\n\n\n     make_edge( src, f );\n     g.wait_for_all();\n\n\n     cout << \"global sum = \" << global_sum \n          << \" and closed form = \" << limit*(limit+1)/2 << \"\\n\";\n\n\nIf you run the above example, it will likely calculate a global sum that\nis a bit smaller than the expected solution due to the data race. The\ndata race could be avoided in this simple example by changing the\nallowed concurrency in ``f`` from unlimited to 1, forcing each value to be\nprocessed sequentially by ``f``. You may also note that the ``input_node`` also\nupdates a global value, ``src_count``. However, since an ``input_node`` always\nexecutes serially, there is no race possible.\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/broadcast_or_send.rst",
    "content": ".. _broadcast_or_send:\n\nSending to One or Multiple Successors\n=====================================\n\n\nAn important characteristic of the predefined nodes is whether they push\ntheir output to a single successor or broadcast to all successors. The\nfollowing predefined nodes push messages to a single successor:\n\n\n-  ``buffer_node``\n-  ``queue_node``\n-  ``priority_queue_node``\n-  ``sequencer_node``\n\n\nOther nodes push messages to all successors that will accept them.\n\n\nThe nodes that push to only a single successor are all buffer nodes.\nTheir purpose is to hold messages temporarily, until they are consumed\ndownstream. Consider the example below:\n\n\n::\n\n\n   void use_buffer_and_two_nodes() {\n     graph g;\n\n\n     function_node< int, int, rejecting > f1( g, 1, []( int i ) -> int {\n       spin_for(0.1);\n       cout << \"f1 consuming \" << i << \"\\n\";\n       return i; \n     } );\n\n\n     function_node< int, int, rejecting > f2( g, 1, []( int i ) -> int {\n       spin_for(0.2);\n       cout << \"f2 consuming \" << i << \"\\n\";\n       return i; \n     } );\n\n\n     priority_queue_node< int > q(g);\n\n\n     make_edge( q, f1 );\n     make_edge( q, f2 );\n     for ( int i = 10; i > 0; --i ) {\n       q.try_put( i );\n     }\n     g.wait_for_all();\n   }\n\n\nFirst, function_nodes by default queue up the messages they receive at\ntheir input. To make a ``priority_queue_node`` work properly with a\n``function_node``, the example above constructs its ``function_nodes`` with its\nbuffer policy set to rejecting. So, ``f1`` and ``f2`` do not internally buffer\nincoming messages, but instead rely on upstream buffering in the\n``priority_queue_node``.\n\n\nIn the above example, each message buffered by the ``priority_queue_node``\nis sent to either ``f1`` or ``f2``, but not both.\n\n\nLet's consider the alternative behavior; that is; what if the\n``priority_queue_node`` broadcasts to all successors. What if some, but not\nall, nodes accept a message? Should the message be buffered until all\nnodes accept it, or be only delivered to the accepting subset? If the\nnode continues to buffer the message, should it eventually deliver the\nmessages in the same order to all nodes or in the current priority order\nat the time the node accepts the next message? For example, assume a\n``priority_queue_node`` only contains \"9\" when a successor node, ``f1``, accepts\n\"9\" but another successor node, ``f2``, rejects it. Later a value \"100\"\narrives and ``f2`` is available to accept messages. Should ``f2`` receive \"9\"\nnext or \"100\", which has a higher priority? In any case, trying to\nensure that all successors receive each message creates a garbage\ncollection problem and complicates reasoning. Therefore, these buffering\nnodes push each message to only one successor. And, you can use this\ncharacteristic to create useful graph structures such as the one shown\nin the graph above, where each message will be processed in priority\norder, by either ``f1`` or ``f2``.\n\n\nBut what if you really do want both ``f1`` and ``f2`` to receive all of the\nvalues, and in priority order? You can easily create this behavior by\ncreating one ``priority_queue_node`` for each ``function_node``, and pushing\neach value to both queues through a broadcast_node, as shown below:\n\n\n::\n\n\n     graph g;\n\n\n     function_node< int, int, rejecting > f1( g, 1, []( int i ) -> int {\n       spin_for(0.1);\n       cout << \"f1 consuming \" << i << \"\\n\";\n       return i; \n     } );\n\n\n     function_node< int, int, rejecting > f2( g, 1, []( int i ) -> int {\n       spin_for(0.2);\n       cout << \"f2 consuming \" << i << \"\\n\";\n       return i; \n     } );\n\n\n     priority_queue_node< int > q1(g);\n     priority_queue_node< int > q2(g);\n     broadcast_node< int > b(g);\n\n\n     make_edge( b, q1 );\n     make_edge( b, q2 );\n     make_edge( q1, f1 );\n     make_edge( q2, f2 );\n     for ( int i = 10; i > 0; --i ) {\n       b.try_put( i );\n     }\n     g.wait_for_all();\n\n\nSo, when connecting a node in your graph to multiple successors, be sure\nto understand whether the output will broadcast to all of the\nsuccessors, or just a single successor.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/cancel_a_graph.rst",
    "content": ".. _cancel_a_graph:\n\nCancel a Graph Explicitly\n=========================\n\n\nTo cancel a graph execution without an exception, you can create the\ngraph using an explicit task_group_context, and then call\n``cancel_group_execution()`` on that object. This is done in the example\nbelow:\n\n\n::\n\n\n     task_group_context t;\n     graph g(t);\n\n\n     function_node< int, int > f1( g, 1, []( int i ) {  return i; } );\n\n\n     function_node< int, int > f2( g, 1, \n         []( const int i ) -> int {\n             cout << \"Begin \" << i << \"\\n\";\n             spin_for(0.2);\n             cout << \"End \" << i << \"\\n\";\n             return i;\n     } );\n\n\n     function_node< int, int > f3( g, 1, []( int i ) {  return i; } );\n\n\n     make_edge( f1, f2 );\n     make_edge( f2, f3 );\n     f1.try_put(1);\n     f1.try_put(2);\n     spin_for(0.1);\n     t.cancel_group_execution();\n     g.wait_for_all();\n\n\nWhen a graph execution is canceled, any node that has already started to\nexecute will execute to completion, but any node that has not started to\nexecute will not start. So in the example above, f2 will print both the\nBegin and End message for input 1, but will not receive the input 2.\n\n\nYou can also get the task_group_context that a node belongs to from\nwithin the node body and use it to cancel the execution of the graph it\nbelongs to:\n\n\n::\n\n\n     graph g;\n\n\n     function_node< int, int > f1( g, 1, []( int i ) {  return i; } );\n\n\n     function_node< int, int > f2( g, 1, \n         []( const int i ) -> int {\n          cout << \"Begin \" << i << \"\\n\";\n          spin_for(0.2);\n             cout << \"End \" << i << \"\\n\";\n             task::self().group()->cancel_group_execution();\n             return i;\n     } );\n\n\n     function_node< int, int > f3( g, 1, []( int i ) {  return i; } );\n\n\n     make_edge( f1, f2 );\n     make_edge( f2, f3 );\n     f1.try_put(1);\n     f1.try_put(2);\n     g.wait_for_all();\n\n\nYou can get the ``task_group_context`` from a node's body even if the graph\nwas not explicitly passed one at construction time.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/cancelling_nested_parallelism.rst",
    "content": ".. _cancelling_nested_parallelism:\n\nCanceling Nested Parallelism\n============================\n\n\nNested parallelism is canceled if the inner context is bound to the\nouter context; otherwise it is not.\n\n\nIf the execution of a flow graph is canceled, either explicitly or due\nto an exception, any tasks started by parallel algorithms or flow graphs\nnested within the nodes of the canceled flow graph may or may not be\ncanceled.\n\n\nAs with all of the library's nested parallelism, you can control\ncancellation relationships by use of explicit ``task_group_context``\nobjects. If you do not provide an explicit ``task_group_context`` to a flow\ngraph, it is created with an isolated context by default.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/catching_exceptions.rst",
    "content": ".. _catching_exceptions:\n\nCatching Exceptions Inside the Node that Throws the Exception\n=============================================================\n\n\nIf you catch an exception within the node's body, execution continues\nnormally, as you might expect. If an exception is thrown but is not\ncaught before it propagates beyond the node's body, the execution of all\nof the graph's nodes are canceled and the exception is rethrown at the\ncall site of graph::wait_for_all(). Take the graph below as an example:\n\n\n::\n\n\n     graph g;\n\n\n     function_node< int, int > f1( g, 1, []( int i ) {  return i; } );\n\n\n     function_node< int, int > f2( g, 1, \n         []( const int i ) -> int {\n         throw i;\n         return i;\n     } );\n\n\n     function_node< int, int > f3( g, 1, []( int i ) {  return i; } );\n\n\n     make_edge( f1, f2 );\n     make_edge( f2, f3 );\n     f1.try_put(1);\n     f1.try_put(2);\n     g.wait_for_all();\n\n\nIn the code above, the second function_node, f2, throws an exception\nthat is not caught within the body. This will cause the execution of the\ngraph to be canceled and the exception to be rethrown at the call to\ng.wait_for_all(). Since it is not handled there either, the program will\nterminate. If desirable, the exception could be caught and handled\nwithin the body:\n\n\n::\n\n\n     function_node< int, int > f2( g, 1, \n         []( const int i ) -> int {\n             try {\n                 throw i;\n             } catch (int j) {\n                 cout << \"Caught \" << j << \"\\n\";\n             }\n             return i;\n     } );\n\n\nIf the exception is caught and handled in the body, then there is no\neffect on the overall execution of the graph. However, you could choose\ninstead to catch the exception at the call to wait_for_all:\n\n\n::\n\n\n     try {\n         g.wait_for_all();\n     } catch ( int j ) {\n         cout << \"Caught \" << j << \"\\n\";\n     }\n\n\nIn this case, the execution of the graph is canceled. For our example,\nthis means that the input 1 never reaches f3 and that input 2 never\nreaches either f2 or f3.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/communicate_with_nodes.rst",
    "content": ".. _communicate_with_nodes:\n\nCommunication Between Graphs\n============================\n\n\nAll graph nodes require a reference to a graph object as one of the\narguments to their constructor. It is only safe to construct edges\nbetween nodes that are part of the same graph. An edge expresses the\ntopology of your graph to the runtime library. Connecting two nodes in\ndifferent graphs can make it difficult to reason about whole graph\noperations, such as calls to ``graph::wait_for_all`` and exception handling.\nTo optimize performance, the library may make calls to a node's\npredecessor or successor at times that are unexpected by the user.\n\n\nIf two graphs must communicate, do NOT create an edge between them, but\ninstead use explicit calls to try_put. This will prevent the runtime\nlibrary from making any assumptions about the relationship of the two\nnodes, and therefore make it easier to reason about events that cross\nthe graph boundaries. However, it may still be difficult to reason about\nwhole graph operations. For example, consider the graphs below:\n\n\n::\n\n\n       graph g;\n       function_node< int, int > n1( g, 1, [](int i) -> int { \n           cout << \"n1\\n\"; \n           spin_for(i); \n           return i; \n       } );\n       function_node< int, int > n2( g, 1, [](int i) -> int { \n           cout << \"n2\\n\"; \n           spin_for(i); \n           return i; \n       } );\n       make_edge( n1, n2 );\n\n\n       graph g2;\n       function_node< int, int > m1( g2, 1, [](int i) -> int { \n           cout << \"m1\\n\"; \n           spin_for(i); \n           return i; \n       } );\n       function_node< int, int > m2( g2, 1, [&](int i) -> int { \n           cout << \"m2\\n\"; \n           spin_for(i); \n           n1.try_put(i); \n           return i; \n       } );\n       make_edge( m1, m2 );\n\n\n       m1.try_put( 1 );\n\n\n       // The following call returns immediately:\n       g.wait_for_all();\n       // The following call returns after m1 & m2\n       g2.wait_for_all();\n\n\n       // we reach here before n1 & n2 are finished\n       // even though wait_for_all was called on both graphs\n\n\nIn the example above, ``m1.try_put(1)`` sends a message to node m1, which\nruns its body and then sends a message to node ``m2``. Next, node ``m2`` runs\nits body and sends a message to ``n1`` using an explicit ``try_put``. In turn,\n``n1`` runs its body and sends a message to n2. The runtime library does not\nconsider ``m2`` to be a predecessor of ``n1`` since no edge exists.\n\n\nIf you want to wait until all of the tasks spawned by these graphs are\ndone, you need to call the function ``wait_for_all`` on both graphs.\nHowever, because there is cross-graph communication, the order of the\ncalls is important. In the (incorrect) code segment above, the first\ncall to ``g.wait_for_all()`` returns immediately because there are no tasks\nyet active in ``g``; the only tasks that have been spawned by then belong to\n``g2``. The call to ``g2.wait_for_all`` returns after both ``m1`` and ``m2`` are done,\nsince they belong to ``g2``; the call does not however wait for ``n1`` and ``n2``,\nsince they belong to ``g``. The end of this code segment is therefore\nreached before ``n1`` and ``n2`` are done.\n\n\nIf the calls to ``wait_for_all`` are swapped, the code works as expected:\n\n\n::\n\n\n       g2.wait_for_all();\n       g.wait_for_all();\n\n\n       // all tasks are done\n\n\nWhile it is not too difficult to reason about how these two very small\ngraphs interact, the interaction of two larger graphs, perhaps with\ncycles, will be more difficult to understand. Therefore, communication\nbetween nodes in different graphs should be done with caution.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/concurrent_hash_map.rst",
    "content": ".. _concurrent_hash_map:\n\nconcurrent_hash_map\n===================\n\n\nA ``concurrent_hash_map<Key, T, HashCompare >`` is a hash table that\npermits concurrent accesses. The table is a map from a key to a type\n``T``. The traits type HashCompare defines how to hash a key and how to\ncompare two keys.\n\n\nThe following example builds a ``concurrent_hash_map`` where the keys\nare strings and the corresponding data is the number of times each\nstring occurs in the array ``Data``.\n\n\n::\n\n\n   #include \"oneapi/tbb/concurrent_hash_map.h\"\n   #include \"oneapi/tbb/blocked_range.h\"\n   #include \"oneapi/tbb/parallel_for.h\"\n   #include <string>\n    \n\n   using namespace oneapi::tbb;\n   using namespace std;\n    \n\n   // Structure that defines hashing and comparison operations for user's type.\n   struct MyHashCompare {\n       size_t hash( const string& x ) const {\n           size_t h = 0;\n           for( const char* s = x.c_str(); *s; ++s )\n               h = (h*17)^*s;\n           return h;\n       }\n       //! True if strings are equal\n       bool equal( const string& x, const string& y ) const {\n           return x==y;\n       }\n   };\n    \n\n   // A concurrent hash table that maps strings to ints.\n   typedef concurrent_hash_map<string,int,MyHashCompare> StringTable;\n    \n\n   // Function object for counting occurrences of strings.\n   struct Tally {\n       StringTable& table;\n       Tally( StringTable& table_ ) : table(table_) {}\n       void operator()( const blocked_range<string*> range ) const {\n           for( string* p=range.begin(); p!=range.end(); ++p ) {\n               StringTable::accessor a;\n               table.insert( a, *p );\n               a->second += 1;\n           }\n       }\n   };\n    \n\n   const size_t N = 1000000;\n    \n\n   string Data[N];\n    \n\n   void CountOccurrences() {\n       // Construct empty table.\n       StringTable table;\n    \n\n       // Put occurrences into the table\n       parallel_for( blocked_range<string*>( Data, Data+N, 1000 ),\n                     Tally(table) );\n    \n\n       // Display the occurrences\n       for( StringTable::iterator i=table.begin(); i!=table.end(); ++i )\n           printf(\"%s %d\\n\",i->first.c_str(),i->second);\n   }\n\n\nA ``concurrent_hash_map`` acts as a container of elements of type\n``std::pair<const Key,T>``. Typically, when accessing a container\nelement, you are interested in either updating it or reading it. The\ntemplate class ``concurrent_hash_map`` supports these two purposes\nrespectively with the classes ``accessor`` and ``const_accessor`` that\nact as smart pointers. An *accessor* represents *update* (*write*)\naccess. As long as it points to an element, all other attempts to look\nup that key in the table block until the ``accessor`` is done. A\n``const_accessor`` is similar, except that is represents *read-only*\naccess. Multiple ``const_accessors`` can point to the same element at\nthe same time. This feature can greatly improve concurrency in\nsituations where elements are frequently read and infrequently updated.\n\n\nThe methods ``find`` and ``insert`` take an ``accessor`` or\n``const_accessor`` as an argument. The choice tells\n``concurrent_hash_map`` whether you are asking for *update* or\n*read-only* access. Once the method returns, the access lasts until the\n``accessor`` or ``const_accessor`` is destroyed. Because having access\nto an element can block other threads, try to shorten the lifetime of\nthe ``accessor`` or ``const_accessor``. To do so, declare it in the\ninnermost block possible. To release access even sooner than the end of\nthe block, use method ``release``. The following example is a rework of\nthe loop body that uses ``release`` instead of depending upon\ndestruction to end thread lifetime:\n\n\n::\n\n\n           StringTable accessor a;\n           for( string* p=range.begin(); p!=range.end(); ++p ) {\n               table.insert( a, *p );\n               a->second += 1;\n               a.release();\n           }\n\n\nThe method ``remove(key)`` can also operate concurrently. It implicitly\nrequests write access. Therefore before removing the key, it waits on\nany other extant accesses on ``key``.\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/More_on_HashCompare\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/concurrent_vector_ug.rst",
    "content": ".. _concurrent_vector_ug:\n\nconcurrent_vector\n=================\n\n\n``A concurrent_vector<T>`` is a dynamically growable array of ``T``. It\nis safe to grow a ``concurrent_vector`` while other threads are also\noperating on elements of it, or even growing it themselves. For safe\nconcurrent growing, ``concurrent_vector`` has three methods that support\ncommon uses of dynamic arrays: ``push_back``, ``grow_by``, and\n``grow_to_at_least``.\n\n\nMethod ``push_back(x)`` safely appends x to the array. Method\n``grow_by(n)`` safely appends ``n`` consecutive elements initialized\nwith ``T()``. Both methods return an iterator pointing to the first\nappended element. Each element is initialized with ``T()``. So for\nexample, the following routine safely appends a C string to a shared\nvector:\n\n\n::\n\n\n   void Append( concurrent_vector<char>& vector, const char* string ) {\n       size_t n = strlen(string)+1;\n       std::copy( string, string+n, vector.grow_by(n) );\n   }\n\n\nThe related method ``grow_to_at_least(n)``\\ grows a vector to size ``n``\nif it is shorter. Concurrent calls to the growth methods do not\nnecessarily return in the order that elements are appended to the\nvector.\n\n\nMethod ``size()`` returns the number of elements in the vector, which\nmay include elements that are still undergoing concurrent construction\nby methods ``push_back``, ``grow_by,`` or ``grow_to_at_least``. The\nexample uses std::copy and iterators, not ``strcpy and pointers``,\nbecause elements in a ``concurrent_vector`` might not be at consecutive\naddresses. It is safe to use the iterators while the\n``concurrent_vector`` is being grown, as long as the iterators never go\npast the current value of ``end()``. However, the iterator may reference\nan element undergoing concurrent construction. You must synchronize\nconstruction and access.\n\n\nA ``concurrent_vector<T>`` never moves an element until the array is\ncleared, which can be an advantage over the STL std::vector even for\nsingle-threaded code. However, ``concurrent_vector`` does have more\noverhead than std::vector. Use ``concurrent_vector`` only if you really\nneed the ability to dynamically resize it while other accesses are (or\nmight be) in flight, or require that an element never move.\n\n\n.. CAUTION:: \n   Operations on ``concurrent_vector`` are concurrency safe with respect\n   to *growing*, not for clearing or destroying a vector. Never invoke\n   method ``clear()`` if there are other operations in flight on the\n   ``concurrent_vector``.\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/create_token_based_system.rst",
    "content": ".. _create_token_based_system:\n\nCreate a Token-Based System\n===========================\n\n\nA more flexible solution to limit the number of messages in a flow graph\nis to use tokens. In a token-based system, a limited number of tokens\nare available in the graph and a message will not be allowed to enter\nthe graph until it can be paired with an available token. When a message\nis retired from the graph, its token is released, and can be paired with\na new message that will then be allowed to enter.\n\n\nThe ``oneapi::tbb::parallel_pipeline`` algorithm relies on a token-based system. In\nthe flow graph interface, there is no explicit support for tokens, but\n``join_node`` can be used to create an analogous system. A ``join_node`` has\ntwo template arguments, the tuple that describes the types of its inputs\nand a buffer policy:\n\n\n::\n\n\n   template<typename OutputTuple, graph_buffer_policy JP = queueing>\n   class join_node;\n\n\nThe buffer policy can be one of the following:\n\n\n-  ``queueing``. This type of policy causes inputs to be matched\n   first-in-first-out; that is, the inputs are joined together to form a\n   tuple in the order they are received.\n-  ``tag_matching``. This type of policy joins inputs together that have\n   matching tags.\n-  ``reserving``. This type of policy causes the ``join_node`` to do no\n   internally buffering, but instead to consume inputs only when it can\n   first reserve an input on each port from an upstream source. If it\n   can reserve an input at each port, it gets those inputs and joins\n   those together to form an output tuple.\n\n\nA token-based system can be created by using reserving join_nodes.\n\n\nIn the example below, there is an ``input_node`` that generates ``M`` big\nobjects and a ``buffer_node`` that is pre-filled with three tokens. The\n``token_t`` can be anything, for example it could be ``typedef int token_t;``.\nThe ``input_node`` and ``buffer_node`` are connected to a reserving ``join_node``.\nThe ``input_node`` will only generate an input when one is pulled from it\nby the reserving ``join_node``, and the reserving ``join_node`` will only pull\nthe input from the ``input_node`` when it knows there is also an item to\npull from the ``buffer_node``.\n\n\n::\n\n\n     graph g;\n\n\n     int src_count = 0;\n     int number_of_objects = 0;\n     int max_objects = 3;\n\n\n     input_node< big_object * > s( g, [&]( oneapi::tbb::flow_control& fc ) -> big_object* {\n         if ( src_count < M ) {\n           big_object* v = new big_object();\n           ++src_count;\n           return v;\n         } else {\n           fc.stop();\n           return nullptr;\n         }\n     } );\n     s.activate();\n\n     join_node< tuple_t, reserving > j(g);\n\n\n     buffer_node< token_t > b(g);\n\n\n     function_node< tuple_t, token_t > f( g, unlimited, \n       []( const tuple_t &t ) -> token_t {\n           spin_for(1);\n        cout << get<1>(t) << \"\\n\";\n           delete get<0>(t);\n        return get<1>(t);\n     } );\n\n\n     make_edge( s, input_port<0>(j) );\n     make_edge( b, input_port<1>(j) );\n     make_edge( j, f );\n     make_edge( f, b );\n\n\n     b.try_put( 1 );\n     b.try_put( 2 );\n     b.try_put( 3 );\n\n\n     g.wait_for_all();\n\n\nIn the above code, you can see that the ``function_node`` returns the token\nback to the ``buffer_node``. This cycle in the flow graph allows the token\nto be recycled and paired with another input from the ``input_node``. So\nlike in the previous sections, there will be at most four big objects in\nthe graph. There could be three big objects in the ``function_node`` and one\nbuffered in the ``input_node``, awaiting a token to be paired with.\n\n\nSince there is no specific ``token_t`` defined for the flow graph, you can\nuse any type for a token, including objects or pointers to arrays.\nTherefore, unlike in the example above, the ``token_t`` doesn't need to be a\ndummy type; it could for example be a buffer or other object that is\nessential to the computation. We could, for example, modify the example\nabove to use the big objects themselves as the tokens, removing the need\nto repeatedly allocate and deallocate them, and essentially create a\nfree list of big objects using a cycle back to the ``buffer_node``.\n\n\nAlso, in our example above, the ``buffer_node`` was prefilled by a fixed\nnumber of explicit calls to ``try_put``, but there are other options. For\nexample, an ``input_node`` could be attached to the input of the\n``buffer_node``, and it could generate the tokens. In addition, our\n``function_node`` could be replaced by a ``multifunction_node`` that can\noptionally put 0 or more outputs to each of its output ports. Using a\n``multifunction_node``, you can choose to recycle or not recycle a token, or\neven generate more tokens, thereby increasing or decreasing the allowed\nconcurrency in the graph.\n\n\nA token based system is therefore very flexible. You are free to declare\nthe token to be of any type and to inject or remove tokens from the\nsystem as it is executing, thereby having dynamic control of the allowed\nconcurrency in the system. Since you can pair the token with an input at\nthe source, this approach enables you to limit resource consumption\nacross the entire graph.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/design_patterns/Agglomeration.rst",
    "content": ".. _Agglomeration:\n\nAgglomeration\n=============\n\n\n.. container:: section\n\n\n   .. rubric:: Problem\n      :class: sectiontitle\n\n   Parallelism is so fine grained that overhead of parallel scheduling\n   or communication swamps the useful work.\n\n\n.. container:: section\n\n\n   .. rubric:: Context\n      :class: sectiontitle\n\n   Many algorithms permit parallelism at a very fine grain, on the order\n   of a few instructions per task. But synchronization between threads\n   usually requires orders of magnitude more cycles. For example,\n   elementwise addition of two arrays can be done fully in parallel, but\n   if each scalar addition is scheduled as a separate task, most of the\n   time will be spent doing synchronization instead of useful addition.\n\n\n.. container:: section\n\n\n   .. rubric:: Forces\n      :class: sectiontitle\n\n   -  Individual computations can be done in parallel, but are small.\n      For practical use of |full_name|, \n      \"small\" here means less than 10,000 clock cycles.\n\n\n   -  The parallelism is for sake of performance and not required for\n      semantic reasons.\n\n\n.. container:: section\n\n\n   .. rubric:: Solution\n      :class: sectiontitle\n\n   Group the computations into blocks. Evaluate computations within a\n   block serially.\n\n\n   The block size should be chosen to be large enough to amortize\n   parallel overhead. Too large a block size may limit parallelism or\n   load balancing because the number of blocks becomes too small to\n   distribute work evenly across processors.\n\n\n   The choice of block topology is typically driven by two concerns:\n\n\n   -  Minimizing synchronization between blocks.\n\n\n   -  Minimizing cache traffic between blocks.\n\n\n   If the computations are completely independent, then the blocks will\n   be independent too, and then only cache traffic issues must be\n   considered.\n\n\n   If the loop is \"small\", on the order of less than 10,000 clock\n   cycles, then it may be impractical to parallelize at all, because the\n   optimal agglomeration might be a single block,\n\n\n.. container:: section\n\n\n   .. rubric:: Examples\n      :class: sectiontitle\n\n   TBB loop templates such as ``oneapi::tbb::parallel_for`` that take a *range*\n   argument support automatic agglomeration.\n\n\n   When agglomerating, think about cache effects. Avoid having cache\n   lines cross between groups if possible.\n\n\n   There may be boundary to interior ratio effects. For example, if the\n   computations form a 2D grid, and communicate only with nearest\n   neighbors, then the computation per block grows quadratically (with\n   the block's area), but the cross-block communication grows with\n   linearly (with the block's perimeter). The following figure shows\n   four different ways to agglomerate an 8×8 grid. If doing such\n   analysis, be careful to consider that information is transferred in\n   cache line units. For a given area, the perimeter may be minimized\n   when the block is square with respect to the underlying grid of cache\n   lines, not square with respect to the logical grid.\n\n\n   .. container:: fignone\n      :name: fig1\n\n\n      Four different agglomerations of an 8×8 grid. |image0|\n\n\n   Also consider vectorization. Blocks that contain long contiguous\n   subsets of data may better enable vectorization.\n\n\n   For recursive computations, most of the work is towards the leaves,\n   so the solution is to treat subtrees as a groups as shown in the\n   following figure.\n\n\n   .. container:: fignone\n      :name: fig2\n\n\n      Agglomeration of a recursive computation |image1|\n\n\n   Often such an agglomeration is achieved by recursing serially once\n   some threshold is reached. For example, a recursive sort might solve\n   sub-problems in parallel only if they are above a certain threshold\n   size.\n\n\n.. container:: section\n\n\n   .. rubric:: Reference\n      :class: sectiontitle\n\n   Ian Foster introduced the term \"agglomeration\" in his book Designing\n   and Building Parallel Programs http://www.mcs.anl.gov/~itf/dbpp.\n   There agglomeration is part of a four step **PCAM** design method:\n\n\n   #. **P**\\ artitioning - break the program into the smallest tasks\n      possible.\n\n\n   #. **C**\\ ommunication – figure out what communication is required\n      between tasks. When using oneTBB, communication is usually cache\n      line transfers. Though they are automatic, understanding which\n      ones happen between tasks helps guide the agglomeration step.\n\n\n   #. **A**\\ gglomeration – combine tasks into larger tasks. His book\n      has an extensive list of considerations that is worth reading.\n\n\n   #. **M**\\ apping – map tasks onto processors. The oneTBB task\n      scheduler does this step for you.\n\n\n.. |image0| image:: Images/image002a.jpg\n   :width: 301px\n   :height: 293px\n.. |image1| image:: Images/image003a.jpg\n   :width: 291px\n   :height: 150px\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/design_patterns/Design_Patterns.rst",
    "content": ".. _design_patterns:\n\nDesign Patterns\n===============\n\n\nThis section provides some common parallel programming patterns and how\nto implement them in |full_name|.\n\n\nThe description of each pattern has the following format:\n\n\n-  **Problem** – describes the problem to be solved.\n\n\n-  **Context** – describes contexts in which the problem arises.\n\n\n-  **Forces** - considerations that drive use of the pattern.\n\n\n-  **Solution** - describes how to implement the pattern.\n\n\n-  **Example** – presents an example implementation.\n\n\nVariations and examples are sometimes discussed. The code examples are\nintended to emphasize key points and are not full-fledged code. Examples\nmay omit obvious const overloads of non-const methods.\n\n\nMuch of the nomenclature and examples are adapted from Web pages created\nby Eun-Gyu and Marc Snir, and the Berkeley parallel patterns wiki. See\nlinks in the **General References** section.\n\n\nFor brevity, some of the code examples use C++11 lambda expressions. It\nis straightforward, albeit sometimes tedious, to translate such lambda\nexpressions into equivalent C++03 code.\n\n.. toctree::\n   :maxdepth: 4\n\n   ../../tbb_userguide/design_patterns/Agglomeration\n   ../../tbb_userguide/design_patterns/Elementwise\n   ../../tbb_userguide/design_patterns/Odd-Even_Communication\n   ../../tbb_userguide/design_patterns/Wavefront\n   ../../tbb_userguide/design_patterns/Reduction\n   ../../tbb_userguide/design_patterns/Divide_and_Conquer\n   ../../tbb_userguide/design_patterns/GUI_Thread\n   ../../tbb_userguide/design_patterns/Non-Preemptive_Priorities\n   ../../tbb_userguide/design_patterns/Lazy_Initialization\n   ../../tbb_userguide/design_patterns/Local_Serializer\n   ../../tbb_userguide/design_patterns/Fenced_Data_Transfer\n   ../../tbb_userguide/design_patterns/Reference_Counting\n   ../../tbb_userguide/design_patterns/General_References\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/design_patterns/Divide_and_Conquer.rst",
    "content": ".. _Divide_and_Conquer:\n\nDivide and Conquer\n==================\n\n\n.. container:: section\n\n\n   .. rubric:: Problem\n      :class: sectiontitle\n\n   Parallelize a divide and conquer algorithm.\n\n\n.. container:: section\n\n\n   .. rubric:: Context\n      :class: sectiontitle\n\n   Divide and conquer is widely used in serial algorithms. Common\n   examples are quicksort and mergesort.\n\n\n.. container:: section\n\n\n   .. rubric:: Forces\n      :class: sectiontitle\n\n   -  Problem can be transformed into subproblems that can be solved\n      independently.\n\n\n   -  Splitting problem or merging solutions is relatively cheap\n      compared to cost of solving the subproblems.\n\n\n.. container:: section\n\n\n   .. rubric:: Solution\n      :class: sectiontitle\n\n   There are several ways to implement divide and conquer in\n   |full_name|. The best choice depends upon circumstances.\n\n\n   -  If division always yields the same number of subproblems, use\n      recursion and ``oneapi::tbb::parallel_invoke``.\n\n\n   -  If the number of subproblems varies, use recursion and\n      ``oneapi::tbb::task_group``.\n\n\n.. container:: section\n\n\n   .. rubric:: Example\n      :class: sectiontitle\n\n   Quicksort is a classic divide-and-conquer algorithm. It divides a\n   sorting problem into two subsorts. A simple serial version looks like [1]_.\n\n\n   ::\n\n\n      void SerialQuicksort( T* begin, T* end ) {\n         if( end-begin>1  ) {\n             using namespace std;\n             T* mid = partition( begin+1, end, bind2nd(less<T>(),*begin) );\n             swap( *begin, mid[-1] );\n             SerialQuicksort( begin, mid-1 );\n             SerialQuicksort( mid, end );\n         }\n      }\n\n\n   The number of subsorts is fixed at two, so ``oneapi::tbb::parallel_invoke``\n   provides a simple way to parallelize it. The parallel code is shown\n   below:\n\n\n   ::\n\n\n      void ParallelQuicksort( T* begin, T* end ) {\n         if( end-begin>1 ) {\n             using namespace std;\n             T* mid = partition( begin+1, end, bind2nd(less<T>(),*begin) );\n             swap( *begin, mid[-1] );\n             oneapi::tbb::parallel_invoke( [=]{ParallelQuicksort( begin, mid-1 );},\n                                   [=]{ParallelQuicksort( mid, end );} );\n         }\n      }\n\n\n   Eventually the subsorts become small enough that serial execution is\n   more efficient. The following variation, does sorts of less than 500 elements using the earlier serial code.\n\n\n   ::\n\n\n      void ParallelQuicksort( T* begin, T* end ) {\n         if( end-begin>=500 ) {\n             using namespace std;\n             T* mid = partition( begin+1, end, bind2nd(less<T>(),*begin) );\n             swap( *begin, mid[-1] );\n             oneapi::tbb::parallel_invoke( [=]{ParallelQuicksort( begin, mid-1 );},\n                                   [=]{ParallelQuicksort( mid, end );} );\n         } else {\n             SerialQuicksort( begin, end );\n         }\n      }\n\n\n   The change is an instance of the Agglomeration pattern.\n\n\n   The next example considers a problem where there are a variable\n   number of subproblems. The problem involves a tree-like description\n   of a mechanical assembly. There are two kinds of nodes:\n\n\n   -  Leaf nodes represent individual parts.\n\n\n   -  Internal nodes represent groups of parts.\n\n\n   The problem is to find all nodes that collide with a target node. The\n   following code shows a serial solution that walks the tree. It\n   records in ``Hits`` any nodes that collide with ``Target``.\n\n\n   ::\n\n\n      std::list<Node*> Hits;\n      Node* Target;\n       \n\n      void SerialFindCollisions( Node& x ) {\n         if( x.is_leaf() ) {\n             if( x.collides_with( *Target ) )\n                 Hits.push_back(&x);\n         } else {\n             for( Node::const_iterator y=x.begin();y!=x.end(); ++y )\n                 SerialFindCollisions(*y);\n         }\n      } \n\n\n   A parallel version is shown below.\n\n\n   ::\n\n\n      typedef oneapi::tbb::enumerable_thread_specific<std::list<Node*> > LocalList;\n      LocalList LocalHits; \n      Node* Target;    // Target node    \n       \n\n      void ParallelWalk( Node& x ) {\n         if( x.is_leaf() ) {\n             if( x.collides_with( *Target ) )\n                 LocalHits.local().push_back(&x);\n         } else {\n             // Recurse on each child y of x in parallel\n             oneapi::tbb::task_group g;\n             for( Node::const_iterator y=x.begin(); y!=x.end(); ++y )\n                 g.run( [=]{ParallelWalk(*y);} );\n             // Wait for recursive calls to complete\n             g.wait();\n         }\n      }\n       \n\n      void ParallelFindCollisions( Node& x ) {\n         ParallelWalk(x);\n         for(LocalList::iterator i=LocalHits.begin();i!=LocalHits.end(); ++i)\n             Hits.splice( Hits.end(), *i );\n      } \n\n\n   The recursive walk is parallelized using class ``task_group`` to do\n   recursive calls in parallel.\n\n\n   There is another significant change because of the parallelism that\n   is introduced. Because it would be unsafe to update ``Hits``\n   concurrently, the parallel walk uses variable ``LocalHits`` to\n   accumulate results. Because it is of type\n   ``enumerable_thread_specific``, each thread accumulates its own\n   private result. The results are spliced together into Hits after the\n   walk completes.\n\n\n   The results will *not* be in the same order as the original serial\n   code.\n\n\n   If parallel overhead is high, use the agglomeration pattern. For\n   example, use the serial walk for subtrees under a certain threshold.\n\n\n.. [1] Production quality quicksort implementations typically\n   use more sophisticated pivot selection, explicit stacks instead of\n   recursion, and some other sorting algorithm for small subsorts. The\n   simple algorithm is used here to focus on exposition of the parallel\n   pattern.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/design_patterns/Elementwise.rst",
    "content": ".. _Elementwise:\n\nElementwise\n===========\n\n\n.. container:: section\n\n\n   .. rubric:: Problem\n      :class: sectiontitle\n\n   Initiate similar independent computations across items in a data set,\n   and wait until all complete.\n\n\n.. container:: section\n\n\n   .. rubric:: Context\n      :class: sectiontitle\n\n   Many serial algorithms sweep over a set of items and do an\n   independent computation on each item. However, if some kind of\n   summary information is collected, use the Reduction pattern instead.\n\n\n.. container:: section\n\n\n   .. rubric:: Forces\n      :class: sectiontitle\n\n   No information is carried or merged between the computations.\n\n\n.. container:: section\n\n\n   .. rubric:: Solution\n      :class: sectiontitle\n\n   If the number of items is known in advance, use\n   ``oneapi::tbb::parallel_for``. If not, consider using\n   ``oneapi::tbb::parallel_for_each``.\n\n\n   Use agglomeration if the individual computations are small relative\n   to scheduler overheads.\n\n\n   If the pattern is followed by a reduction on the same data, consider\n   doing the element-wise operation as part of the reduction, so that\n   the combination of the two patterns is accomplished in a single sweep\n   instead of two sweeps. Doing so may improve performance by reducing\n   traffic through the memory hierarchy.\n\n\n.. container:: section\n\n\n   .. rubric:: Example\n      :class: sectiontitle\n\n   Convolution is often used in signal processing. The convolution of a\n   filter ``c`` and signal ``x`` is computed as:\n\n\n   |image0|\n   Serial code for this computation might look like:\n\n\n   ::\n\n\n      // Assumes c[0..clen-1] and x[1-clen..xlen-1] are defined\n      for( int i=0; i<xlen+clen-1; ++i ) {\n         float tmp = 0;\n         for( int j=0; j<clen; ++j )\n             tmp += c[j]*x[i-j];\n         y[i] = tmp;\n      }\n\n\n   For simplicity, the fragment assumes that ``x`` is a pointer into an\n   array padded with zeros such that ``x[k]``\\ returns zero when ``k<0``\n   or ``k≥xlen``.\n\n\n   The inner loop does not fit the elementwise pattern, because each\n   iteration depends on the previous iteration. However, the outer loop\n   fits the elementwise pattern. It is straightforward to render it\n   using ``oneapi::tbb::parallel_for`` as shown:\n\n\n   ::\n\n\n      oneapi::tbb::parallel_for( 0, xlen+clen-1, [=]( int i ) { \n         float tmp = 0;\n         for( int j=0; j<clen; ++j )\n             tmp += c[j]*x[i-j];\n         y[i] = tmp;\n      });\n\n\n   ``oneapi::tbb::parallel_for`` does automatic agglomeration by implicitly\n   using ``oneapi::tbb::auto_partitioner`` in its underlying implementation. If\n   there is reason to agglomerate explicitly, use the overload of\n   ``oneapi::tbb::parallel_for`` that takes an explicit range argument. The\n   following shows the example transformed to use the overload.\n\n\n   ::\n\n\n      oneapi::tbb::parallel_for(\n         oneapi::tbb::blocked_range<int>(0,xlen+clen-1,1000),\n         [=]( oneapi::tbb::blocked_range<int> r ) { \n               int end = r.end();\n             for( int i=r.begin(); i!=end; ++i ) {\n                 float tmp = 0;\n                 for( int j=0; j<clen; ++j )\n                     tmp += c[j]*x[i-j];\n                 y[i] = tmp;\n             }\n         }\n      );\n\n\n    \n\n\n\n.. |image0| image:: Images/image004a.jpg\n   :width: 99px\n   :height: 29px\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/design_patterns/Fenced_Data_Transfer.rst",
    "content": ".. _Fenced_Data_Transfer:\n\nFenced Data Transfer\n====================\n\n\n.. container:: section\n\n\n   .. rubric:: Problem\n      :class: sectiontitle\n\n   Write a message to memory and have another processor read it on\n   hardware that does not have a sequentially consistent memory model.\n\n\n.. container:: section\n\n\n   .. rubric:: Context\n      :class: sectiontitle\n\n   The problem normally arises only when unsynchronized threads\n   concurrently act on a memory location, or are using reads and writes\n   to create synchronization. High level synchronization constructs\n   normally include mechanisms that prevent unwanted reordering.\n\n\n   Modern hardware and compilers can reorder memory operations in a way\n   that preserves the order of a thread's operation from its viewpoint,\n   but not as observed by other threads. A serial common idiom is to\n   write a message and mark it as ready to ready as shown in the\n   following code:\n\n\n   ::\n\n\n      bool Ready;\n      std::string Message;\n       \n\n      void Send( const std::string& src ) {. // Executed by thread 1\n         Message=src;\n         Ready = true;\n      }\n       \n\n      bool Receive( std::string& dst ) {    // Executed by thread 2\n         bool result = Ready;\n         if( result ) dst=Message;\n         return result;              // Return true if message was received.\n      }\n\n\n   Two key assumptions of the code are:\n\n\n   #. ``Ready`` does not become true until ``Message`` is written.\n\n\n   #. ``Message`` is not read until ``Ready`` becomes true.\n\n\n   These assumptions are trivially true on uniprocessor hardware.\n   However, they may break on multiprocessor hardware. Reordering by the\n   hardware or compiler can cause the sender's writes to appear out of\n   order to the receiver (thus breaking condition a) or the receiver's\n   reads to appear out of order (thus breaking condition b).\n\n\n.. container:: section\n\n\n   .. rubric:: Forces\n      :class: sectiontitle\n\n   -  Creating synchronization via raw reads and writes.\n\n\n.. container:: section\n\n\n   .. rubric:: Solution\n      :class: sectiontitle\n\n   Change the flag from ``bool`` to ``std::atomic<bool>`` for the flag\n   that indicates when the message is ready. Here is the previous\n   example with modifications.\n\n\n   ::\n\n\n      std::atomic<bool> Ready;\n      std::string Message;\n       \n\n      void Send( const std::string& src ) {. // Executed by thread 1\n         Message=src;\n         Ready.store(true, std::memory_order_release);\n      }\n       \n\n      bool Receive( std::string& dst ) {    // Executed by thread 2\n         bool result = Ready.load(std::memory_order_acquire);\n         if( result ) dst=Message;\n         return result;              // Return true if message was received.\n      }\n\n\n   A write to a ``std::atomic`` value has *release* semantics, which\n   means that all of its prior writes will be seen before the releasing\n   write. A read from ``std::atomic`` value has *acquire* semantics,\n   which means that all of its subsequent reads will happen after the\n   acquiring read. The implementation of ``std::atomic`` ensures that\n   both the compiler and the hardware observe these ordering\n   constraints.\n\n\n.. container:: section\n\n\n   .. rubric:: Variations\n      :class: sectiontitle\n\n   Higher level synchronization constructs normally include the\n   necessary *acquire* and *release* fences. For example, mutexes are\n   normally implemented such that acquisition of a lock has *acquire*\n   semantics and release of a lock has *release* semantics. Thus a\n   thread that acquires a lock on a mutex always sees any memory writes\n   done by another thread before it released a lock on that mutex.\n\n\n.. container:: section\n\n\n   .. rubric:: Non Solutions\n      :class: sectiontitle\n\n   Mistaken solutions are so often proposed that it is worth\n   understanding why they are wrong.\n\n\n   One common mistake is to assume that declaring the flag with the\n   ``volatile`` keyword solves the problem. Though the ``volatile``\n   keyword forces a write to happen immediately, it generally has no\n   effect on the visible ordering of that write with respect to other\n   memory operations.\n\n\n   Another mistake is to assume that conditionally executed code cannot\n   happen before the condition is tested. However, the compiler or\n   hardware may speculatively hoist the conditional code above the\n   condition.\n\n\n   Similarly, it is a mistake to assume that a processor cannot read the\n   target of a pointer before reading the pointer. A modern processor\n   does not read individual values from main memory. It reads cache\n   lines. The target of a pointer may be in a cache line that has\n   already been read before the pointer was read, thus giving the\n   appearance that the processor presciently read the pointer target.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/design_patterns/GUI_Thread.rst",
    "content": ".. _GUI_Thread:\n\nGUI Thread\n==========\n\n.. container:: section\n\n\n   .. rubric:: Problem\n      :class: sectiontitle\n\n   A user interface thread must remain responsive to user requests, and\n   must not get bogged down in long computations.\n\n\n.. container:: section\n\n\n   .. rubric:: Context\n      :class: sectiontitle\n\n   Graphical user interfaces often have a dedicated thread (\"GUI\n   thread\") for servicing user interactions. The thread must remain\n   responsive to user requests even while the application has long\n   computations running. For example, the user might want to press a\n   \"cancel\" button to stop the long running computation. If the GUI\n   thread takes part in the long running computation, it will not be\n   able to respond to user requests.\n\n\n.. container:: section\n\n\n   .. rubric:: Forces\n      :class: sectiontitle\n\n   -  The GUI thread services an event loop.\n\n\n   -  The GUI thread needs to offload work onto other threads without\n      waiting for the work to complete.\n\n\n   -  The GUI thread must be responsive to the event loop and not become\n      dedicated to doing the offloaded work.\n\n\n.. container:: section\n\n\n   .. rubric:: Related\n      :class: sectiontitle\n\n   -  Non-Preemptive Priorities\n   -  Local Serializer\n\n\n.. container:: section\n\n\n   .. rubric:: Solution\n      :class: sectiontitle\n\n   The GUI thread offloads the work by firing off a task to do it using\n   method ``task_arena::enqueue`` of a ``task_arena`` instance.\n   When finished, the task posts an event to the GUI thread to indicate that the work is done.\n   The semantics of ``enqueue`` cause the task to eventually run on a worker thread\n   distinct from the calling thread.\n\n   The following figure sketches the communication paths. Items in black are executed \n   by the GUI thread; items in blue are executed by another thread.\n\n   |image0|\n\n.. container:: section\n\n\n   .. rubric:: Example\n      :class: sectiontitle\n\n   The example is for the Microsoft Windows\\* operating systems, though\n   similar principles apply to any GUI using an event loop idiom. For\n   each event, the GUI thread calls a user-defined function ``WndProc`` to process an event.\n\n\n   ::\n\n\n      // Event posted from enqueued task when it finishes its work.\n      const UINT WM_POP_FOO = WM_USER+0;\n\n\n      // Queue for transmitting results from enqueued task to GUI thread.\n      oneapi::tbb::concurrent_queue<Foo>ResultQueue;\n\n\n      // GUI thread's private copy of most recently computed result.\n      Foo CurrentResult;\n       \n\n      LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {\n         switch(msg) {\n             case WM_COMMAND:\n                 switch (LOWORD(wParam)) {\n                     case IDM_LONGRUNNINGWORK:\n                         // User requested a long computation. Delegate it to another thread.\n                         LaunchLongRunningWork(hWnd);\n                         break;\n                     case IDM_EXIT:\n                         DestroyWindow(hWnd);\n                         break;\n                     default:\n                         return DefWindowProc(hWnd, msg, wParam, lParam);\n                 }\n                 break;\n             case WM_POP_FOO:\n                 // There is another result in ResultQueue for me to grab.\n                 ResultQueue.try_pop(CurrentResult);\n                 // Update the window with the latest result.\n                 RedrawWindow( hWnd, NULL, NULL, RDW_ERASE|RDW_INVALIDATE );\n                 break;\n             case WM_PAINT: \n                 Repaint the window using CurrentResult\n                 break;\n             case WM_DESTROY:\n                 PostQuitMessage(0);\n                 break;\n             default:\n                 return DefWindowProc( hWnd, msg, wParam, lParam );\n         }\n         return 0;\n      } \n\n\n   The GUI thread processes long computations as follows:\n\n\n   #. The GUI thread calls ``LongRunningWork``, which hands off the work\n      to a worker thread and immediately returns.\n\n\n   #. The GUI thread continues servicing the event loop. If it has to\n      repaint the window, it uses the value of\\ ``CurrentResult``, which\n      is the most recent ``Foo`` that it has seen.\n\n\n   When a worker finishes the long computation, it pushes the result\n   into ResultQueue, and sends a message WM_POP_FOO to the GUI thread.\n\n\n   #. The GUI thread services a ``WM_POP_FOO`` message by popping an\n      item from ResultQueue into CurrentResult. The ``try_pop`` always\n      succeeds because there is exactly one ``WM_POP_FOO`` message for\n      each item in ``ResultQueue``.\n\n\n   Routine ``LaunchLongRunningWork`` creates a function task and launches it\n   using method ``task_arena::enqueue``.\n\n   ::\n\n\n      class LongTask {\n         HWND hWnd;\n         void operator()() {\n             Do long computation\n             Foo x = result of long computation\n             ResultQueue.push( x );\n             // Notify GUI thread that result is available.\n             PostMessage(hWnd,WM_POP_FOO,0,0);\n         }\n      public:\n         LongTask( HWND hWnd_ ) : hWnd(hWnd_) {}\n      };\n\n      void LaunchLongRunningWork( HWND hWnd ) {\n         oneapi::tbb::task_arena a;\n         a.enqueue(LongTask(hWnd));\n      }\n\n\n   It is essential to use method ``task_arena::enqueue`` here.\n   Even though, an explicit ``task_arena`` instance is created,\n   the method ``enqueue`` ensures that the function task eventually executes when resources permit,\n   even if no thread explicitly waits on the task. In contrast, ``oneapi::tbb::task_group::run`` may\n   postpone execution of the function task until it is explicitly waited upon with the ``oneapi::tbb::task_group::wait``.\n\n   The example uses a ``concurrent_queue`` for workers to communicate\n   results back to the GUI thread. Since only the most recent result\n   matters in the example, and alternative would be to use a shared\n   variable protected by a mutex. However, doing so would block the\n   worker while the GUI thread was holding a lock on the mutex, and vice\n   versa. Using ``concurrent_queue`` provides a simple robust solution.\n\n   If two long computations are in flight, there is a chance that the\n   first computation completes after the second one. If displaying the\n   result of the most recently requested computation is important, then\n   associate a request serial number with the computation. The GUI\n   thread can pop from ``ResultQueue`` into a temporary variable, check\n   the serial number, and update ``CurrentResult`` only if doing so\n   advances the serial number.\n\n.. |image0| image:: Images/image007a.jpg\n   :width: 400px\n   :height: 150px\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/design_patterns/General_References.rst",
    "content": ".. _General_References:\n\nGeneral References\n==================\n\n\nThis section lists general references. References specific to a pattern\nare listed at the end of the topic for the pattern.\n\n- E. Gamma, R. Helm, R. Johnson, J. Vlissides. Design Patterns (1995)\n- `Berkeley Pattern Language for Parallel Programming <https://patterns.eecs.berkeley.edu/?page_id=98>`_\n- T. Mattson, B. Sanders, B. Massingill. Patterns for Parallel Programming (2005)\n- `ParaPLoP 2009 <https://web.archive.org/web/20111118224546/http://www.upcrc.illinois.edu/workshops/paraplop09/program.html>`_\n- `ParaPLoP 2010 <https://web.archive.org/web/20111118222933/http://www.upcrc.illinois.edu/workshops/paraplop10/program.html>`_\n- Eun-Gyu Kim and Marc Snir, `Parallel Programming Patterns <http://snir.cs.illinois.edu/PPP.html>`_\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/design_patterns/Lazy_Initialization.rst",
    "content": ".. _Lazy_Initialization:\n\nLazy Initialization\n====================\n\n\n.. container:: section\n\n\n   .. rubric:: Problem\n      :class: sectiontitle\n\n   Delay the creation of an object, potentially expensive, until it is accessed.\n   In parallel programming, initialization must also be guarded against race conditions.\n\n\n.. container:: section\n\n\n   .. rubric:: Context\n      :class: sectiontitle\n\n   The cost of operations that take place during the initialization\n   of the object may be considerably high. In that case, the object\n   should be initialized only when needed. Lazy initialization is\n   the common tactic that allows implementing such an approach.\n\n\n.. container:: section\n\n\n   .. rubric:: Solution\n      :class: sectiontitle\n\n   Using ``oneapi::tbb::collaborative_call_once`` with ``oneapi::tbb::collaborative_once_flag``\n   helps to implement thread-safe lazy initialization for a user object.\n\n\n   In addition, ``collaborative_call_once`` allows other thread blocked on\n   the same ``collaborative_once_flag`` to join other |short_name|\n   parallel constructions called within the initializing function.\n\n\n.. container:: section\n\n\n   .. rubric:: Example\n      :class: sectiontitle\n\n   This example illustrates the implementation of lazy initialization\n   for the calculation of the Fibonacci numbers. Here is a graphical\n   representation of the Fibonacci recursion tree for N=4.\n\n\n   |image0|\n\n\n   As seen in the diagram, some elements are recalculated more than once. These operations are redundant,\n   so the \"lazy initialized\" Fibonacci numbers are relevant here.\n\n\n   An implementation without the use of lazy initialization would have *O(2^N)* time complexity due to\n   the full recursion tree traversal and recalculation of values. Since all the nodes are traversed once,\n   the tree becomes a list, making the time complexity *O(N)*.\n\n\n   |image1|\n\n\n   Here you can see the code for the implementation. Already calculated values are stored in a buffer\n   paired with ``collaborative_once_flag`` and will not be recalculated when ``collaborative_call_once``\n   is invoked when initialization has already been done.\n\n\n   ::\n\n\n      using FibBuffer = std::vector<std::pair<oneapi::tbb::collaborative_once_flag, std::uint64_t>>;\n\n      std::uint64_t LazyFibHelper(int n, FibBuffer& buffer) {\n         // Base case\n         if (n <= 1) {\n            return n;\n         }\n         // Calculate nth value only once and store it in the buffer.\n         // Other threads won't be blocked on already taken collaborative_once_flag\n         // but join parallelism inside functor\n         oneapi::tbb::collaborative_call_once(buffer[n].first, [&]() {\n            std::uint64_t a, b;\n            oneapi::tbb::parallel_invoke([&] { a = LazyFibHelper(n - 2, buffer); },\n                                         [&] { b = LazyFibHelper(n - 1, buffer); });\n            buffer[n].second = a + b;\n         });\n\n         return buffer[n].second;\n      }\n\n      std::uint64_t Fib(int n) {\n         FibBuffer buffer(n+1);\n         return LazyFibHelper(n, buffer);\n      }\n\n\n.. |image0| image:: Images/image008a.jpg\n   :width: 744px\n   :height: 367px\n.. |image1| image:: Images/image009a.jpg\n   :width: 744px\n   :height: 367px\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/design_patterns/Local_Serializer.rst",
    "content": ".. _Local_Serializer:\n\nLocal Serializer\n================\n\n\n.. container:: section\n\n\n   .. rubric:: Context\n      :class: sectiontitle\n\n   Consider an interactive program. To maximize concurrency and\n   responsiveness, operations requested by the user can be implemented\n   as tasks. The order of operations can be important. For example,\n   suppose the program presents editable text to the user. There might\n   be operations to select text and delete selected text. Reversing the\n   order of \"select\" and \"delete\" operations on the same buffer would be\n   bad. However, commuting operations on different buffers might be\n   okay. Hence the goal is to establish serial ordering of tasks\n   associated with a given object, but not constrain ordering of tasks\n   between different objects.\n\n\n.. container:: section\n\n\n   .. rubric:: Forces\n      :class: sectiontitle\n\n   -  Operations associated with a certain object must be performed in\n      serial order.\n\n\n   -  Serializing with a lock would be wasteful because threads would be\n      waiting at the lock when they could be doing useful work\n      elsewhere.\n\n\n.. container:: section\n\n\n   .. rubric:: Solution\n      :class: sectiontitle\n\n   Sequence the work items using a FIFO (first-in first-out structure).\n   Always keep an item in flight if possible. If no item is in flight\n   when a work item appears, put the item in flight. Otherwise, push the\n   item onto the FIFO. When the current item in flight completes, pop\n   another item from the FIFO and put it in flight.\n\n\n   The logic can be implemented without mutexes, by using\n   ``concurrent_queue`` for the FIFO and ``atomic<int>`` to count the\n   number of items waiting and in flight. The example explains the\n   accounting in detail.\n\n\n.. container:: section\n\n\n   .. rubric:: Example\n      :class: sectiontitle\n\n   The following example builds on the Non-Preemptive Priorities example\n   to implement local serialization in addition to priorities. It\n   implements three priority levels and local serializers. The user\n   interface for it follows:\n\n\n   ::\n\n\n      enum Priority {\n         P_High,\n         P_Medium,\n         P_Low\n      };\n       \n\n      template<typename Func>\n      void EnqueueWork( Priority p, Func f, Serializer* s=NULL );\n\n\n   Template function ``EnqueueWork`` causes functor ``f`` to run when\n   the three constraints in the following table are met.\n\n\n   .. container:: tablenoborder\n\n\n      .. list-table:: \n         :header-rows: 1\n\n         * -     Constraint     \n           -     Resolved by class...     \n         * -     Any prior work for the ``Serializer`` has completed.          \n           -     \\ ``Serializer``     \n         * -     A thread is available.     \n           -     \\ ``RunWorkItem``     \n         * -     No higher priority work is ready to run.     \n           -     \\ ``ReadyPileType``     \n\n\n\n\n   Constraints on a given functor are resolved from top to bottom in the\n   table. The first constraint does not exist when s is NULL. The\n   implementation of ``EnqueueWork`` packages the functor in a\n   ``SerializedWorkItem`` and routes it to the class that enforces the\n   first relevant constraint between pieces of work.\n\n\n   ::\n\n\n      template<typename Func>\n      void EnqueueWork( Priority p, Func f, Serializer* s=NULL ) {\n         WorkItem* item = new SerializedWorkItem<Func>( p, f, s );\n         if( s )\n             s->add(item);\n         else\n             ReadyPile.add(item);\n      }\n\n\n   A ``SerializedWorkItem`` is derived from a ``WorkItem``, which serves\n   as a way to pass around a prioritized piece of work without knowing\n   further details of the work.\n\n\n   ::\n\n\n      // Abstract base class for a prioritized piece of work.\n      class WorkItem {\n      public:\n         WorkItem( Priority p ) : priority(p) {}\n         // Derived class defines the actual work.\n         virtual void run() = 0;\n         const Priority priority;\n      };\n       \n\n      template<typename Func>\n      class SerializedWorkItem: public WorkItem {\n         Serializer* serializer;\n         Func f;\n         /*override*/ void run() {\n             f();\n             Serializer* s = serializer;\n             // Destroy f before running Serializer’s next functor.\n             delete this;\n             if( s )\n                 s->noteCompletion();\n         }\n      public:\n         SerializedWorkItem( Priority p, const Func& f_, Serializer* s ) :\n             WorkItem(p), serializer(s), f(f_) \n         {}\n      };\n\n\n   Base class ``WorkItem`` is the same as class WorkItem in the example\n   for Non-Preemptive Priorities. The notion of serial constraints is\n   completely hidden from the base class, thus permitting the framework\n   to extend other kinds of constraints or lack of constraints. Class\n   ``SerializedWorkItem`` is essentially ``ConcreteWorkItem`` from the\n   example for Non-Preemptive Priorities, extended with a ``Serializer``\n   aspect.\n\n\n   Virtual method ``run()`` is invoked when it becomes time to run the\n   functor. It performs three steps:\n\n\n   #. Run the functor.\n\n\n   #. Destroy the functor.\n\n\n   #. Notify the ``Serializer`` that the functor completed, and thus\n      unconstraining the next waiting functor.\n\n\n   Step 3 is the difference from the operation of ConcreteWorkItem::run.\n   Step 2 could be done after step 3 in some contexts to increase\n   concurrency slightly. However, the presented order is recommended\n   because if step 2 takes non-trivial time, it likely has side effects\n   that should complete before the next functor runs.\n\n\n   Class ``Serializer`` implements the core of the Local Serializer\n   pattern:\n\n\n   ::\n\n\n      class Serializer {\n         oneapi::tbb::concurrent_queue<WorkItem*> queue;\n         std::atomic<int> count;         // Count of queued items and in-flight item\n         void moveOneItemToReadyPile() { // Transfer item from queue to ReadyPile\n             WorkItem* item;\n             queue.try_pop(item);\n             ReadyPile.add(item);\n         }\n      public:\n         void add( WorkItem* item ) {\n             queue.push(item);\n             if( ++count==1 )\n                 moveOneItemToReadyPile();\n         }\n         void noteCompletion() {        // Called when WorkItem completes.\n             if( --count!=0 )\n                 moveOneItemToReadyPile();\n         }\n      };\n\n\n   The class maintains two members:\n\n\n   -  A queue of WorkItem waiting for prior work to complete.\n\n\n   -  A count of queued or in-flight work.\n\n\n   Mutexes are avoided by using ``concurrent_queue<WorkItem*>`` and\n   ``atomic<int>`` along with careful ordering of operations. The\n   transitions of count are the key understanding how class\n   ``Serializer`` works.\n\n\n   -  If method ``add`` increments ``count`` from 0 to 1, this indicates\n      that no other work is in flight and thus the work should be moved\n      to the ``ReadyPile``.\n\n\n   -  If method ``noteCompletion`` decrements count and it is *not* from\n      1 to 0, then the queue is non-empty and another item in the queue\n      should be moved to ``ReadyPile``.\n\n\n   Class ``ReadyPile`` is explained in the example for Non-Preemptive\n   Priorities.\n\n\n   If priorities are not necessary, there are two variations on method\n   ``moveOneItemToReadyPile``, with different implications.\n\n\n   -  Method ``moveOneItemToReadyPile`` could directly\n      invoke\\ ``item->run()``. This approach has relatively low overhead\n      and high thread locality for a given ``Serializer``. But it is\n      unfair. If the ``Serializer`` has a continual stream of tasks, the\n      thread operating on it will keep servicing those tasks to the\n      exclusion of others.\n\n\n   -  Method ``moveOneItemToReadyPile`` could invoke ``task::enqueue``\n      to enqueue a task that invokes ``item->run()``. Doing so\n      introduces higher overhead and less locality than the first\n      approach, but avoids starvation.\n\n\n   The conflict between fairness and maximum locality is fundamental.\n   The best resolution depends upon circumstance.\n\n\n   The pattern generalizes to constraints on work items more general\n   than those maintained by class Serializer. A generalized\n   ``Serializer::add`` determines if a work item is unconstrained, and\n   if so, runs it immediately. A generalized\n   ``Serializer::noteCompletion`` runs all previously constrained items\n   that have become unconstrained by the completion of the current work\n   item. The term \"run\" means to run work immediately, or if there are\n   more constraints, forwarding the work to the next constraint\n   resolver.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/design_patterns/Non-Preemptive_Priorities.rst",
    "content": ".. _Non-Preemptive_Priorities:\n\nNon-Preemptive Priorities\n=========================\n\n\n.. container:: section\n\n\n   .. rubric:: Problem\n      :class: sectiontitle\n\n   Choose the next work item to do, based on priorities.\n\n\n.. container:: section\n\n\n   .. rubric:: Context\n      :class: sectiontitle\n\n   The scheduler in |full_name|\n   chooses tasks using rules based on scalability concerns. The rules\n   are based on the order in which tasks were spawned or enqueued, and\n   are oblivious to the contents of tasks. However, sometimes it is best\n   to choose work based on some kind of priority relationship.\n\n\n.. container:: section\n\n\n   .. rubric:: Forces\n      :class: sectiontitle\n\n   -  Given multiple work items, there is a rule for which item should\n      be done next that is *not* the default oneTBB rule.\n\n\n   -  Preemptive priorities are not necessary. If a higher priority item\n      appears, it is not necessary to immediately stop lower priority\n      items in flight. If preemptive priorities are necessary, then\n      non-preemptive tasking is inappropriate. Use threads instead.\n\n\n.. container:: section\n\n\n   .. rubric:: Solution\n      :class: sectiontitle\n\n   Put the work in a shared work pile. Decouple tasks from specific\n   work, so that task execution chooses the actual piece of work to be\n   selected from the pile.\n\n\n.. container:: section\n\n\n   .. rubric:: Example\n      :class: sectiontitle\n\n   The following example implements three priority levels. The user\n   interface for it and top-level implementation follow:\n\n\n   ::\n\n\n      enum Priority {\n         P_High,\n         P_Medium,\n         P_Low\n      };\n       \n\n      template<typename Func>\n      void EnqueueWork( Priority p, Func f ) {\n         WorkItem* item = new ConcreteWorkItem<Func>( p, f );\n         ReadyPile.add(item);\n      }\n\n\n   The caller provides a priority ``p`` and a functor ``f`` to routine ``EnqueueWork``.\n   The functor may be the result of a lambda expression. ``EnqueueWork`` packages ``f`` as a ``WorkItem`` and adds\n   it to global object ``ReadyPile``.\n\n\n   Class ``WorkItem`` provides a uniform interface for running functors of unknown type:\n\n\n   ::\n\n\n      // Abstract base class for a prioritized piece of work.\n      class WorkItem {\n      public:\n         WorkItem( Priority p ) : priority(p) {}\n         // Derived class defines the actual work.\n         virtual void run() = 0;\n         const Priority priority;\n      };\n       \n\n      template<typename Func>\n      class ConcreteWorkItem: public WorkItem {\n         Func f;\n         /*override*/ void run() {\n             f();\n             delete this;\n         }\n      public:\n         ConcreteWorkItem( Priority p, const Func& f_ ) :\n             WorkItem(p), f(f_)\n         {}\n      };\n\n\n   Class ``ReadyPile`` contains the core pattern. It maintains a\n   collection of work and fires off tasks through the ``oneapi::tbb::task_group::run`` interface\n   and then choose a work from the collection:\n\n\n   ::\n\n\n      class ReadyPileType {\n         // One queue for each priority level\n         oneapi::tbb::concurrent_queue<WorkItem*> level[P_Low+1];\n         oneapi::tbb::task_group tg;\n      public:\n         void add( WorkItem* item ) {\n             level[item->priority].push(item);\n             tg.run(RunWorkItem());\n         }\n         void runNextWorkItem() {\n             // Scan queues in priority order for an item.\n             WorkItem* item=NULL;\n             for( int i=P_High; i<=P_Low; ++i )\n                 if( level[i].try_pop(item) )\n                     break;\n             assert(item);\n             item->run();\n         }\n      };\n       \n\n      ReadyPileType ReadyPile;\n\n\n   The task added by ``add(item)`` does *not* necessarily execute\n   that item. The task itself executes ``runNextWorkItem()``, which may find a\n   higher priority item. There is one task for each item, but the\n   mapping resolves when the task actually executes, not when it is created.\n\n   Here are the details of class ``RunWorkItem``:\n\n   ::\n\n      class RunWorkItem {\n         void operator()() {\n             ReadyPile.runNextWorkItem();\n         };\n      };\n\n\n   ``RunWorkItem`` objects are fungible. They enable the oneTBB\n   scheduler to choose when to do a work item, not which work item to do.\n\n\n   Other priority schemes can be implemented by changing the internals\n   for ``ReadyPileType``. A priority queue could be used to implement\n   very fine grained priorities.\n\n   The scalability of the pattern is limited by the scalability of\n   ``ReadyPileType``. Ideally scalable concurrent containers should be\n   used for it.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/design_patterns/Odd-Even_Communication.rst",
    "content": ".. _Odd-Even_Communication:\n\nOdd-Even Communication\n======================\n\n\n.. container:: section\n\n\n   .. rubric:: Problem\n      :class: sectiontitle\n\n   Operations on data cannot be done entirely independently, but data\n   can be partitioned into two subsets such that all operations on a\n   subset can run in parallel.\n\n\n.. container:: section\n\n\n   .. rubric:: Context\n      :class: sectiontitle\n\n   Solvers for partial differential equations can often be modified to\n   follow this pattern. For example, for a 2D grid with only\n   nearest-neighbor communication, it may be possible to treat the grid\n   as a checkerboard, and alternate between updating red squares and\n   black squares.\n\n\n   Another context is staggered grid (\"leap frog\") Finite Difference\n   Time Domain (FDTD solvers, which naturally fit the pattern.\n\n\n.. container:: section\n\n\n   .. rubric:: Forces\n      :class: sectiontitle\n\n   -  Dependencies between items form a bipartite graph.\n\n\n.. container:: section\n\n\n   .. rubric:: Solution\n      :class: sectiontitle\n\n   Alternate between updating one subset and then the other subset.\n   Apply the elementwise pattern to each subset.\n\n.. container:: section\n\n\n   .. rubric:: References\n      :class: sectiontitle\n\n   Eun-Gyu Kim and Mark Snir, \"Odd-Even Communication Group\",\n   http://snir.cs.illinois.edu/patterns/oddeven.pdf\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/design_patterns/Reduction.rst",
    "content": ".. _Reduction:\n\nReduction\n=========\n\n\n.. container:: section\n\n\n   .. rubric:: Problem\n      :class: sectiontitle\n\n   Perform an associative reduction operation across a data set.\n\n\n.. container:: section\n\n\n   .. rubric:: Context\n      :class: sectiontitle\n\n   Many serial algorithms sweep over a set of items to collect summary\n   information.\n\n\n.. container:: section\n\n\n   .. rubric:: Forces\n      :class: sectiontitle\n\n   The summary can be expressed as an associative operation over the\n   data set, or at least is close enough to associative that\n   reassociation does not matter.\n\n\n.. container:: section\n\n\n   .. rubric:: Solution\n      :class: sectiontitle\n\n   Two solutions exist in |full_name|.\n   The choice on which to use depends upon several considerations:\n\n\n   -  Is the operation commutative as well as associative?\n\n\n   -  Are instances of the reduction type expensive to construct and\n      destroy. For example, a floating point number is inexpensive to\n      construct. A sparse floating-point matrix might be very expensive\n      to construct.\n\n\n   Use ``oneapi::tbb::parallel_reduce`` when the objects are inexpensive to\n   construct. It works even if the reduction operation is not\n   commutative.\n\n\n   Use ``oneapi::tbb::parallel_for`` and ``oneapi::tbb::combinable`` if the reduction\n   operation is commutative and instances of the type are expensive.\n\n\n   If the operation is not precisely associative but a precisely\n   deterministic result is required, use recursive reduction and\n   parallelize it using ``oneapi::tbb::parallel_invoke``.\n\n\n.. container:: section\n\n\n   .. rubric:: Examples\n      :class: sectiontitle\n\n   The examples presented here illustrate the various solutions and some\n   tradeoffs.\n\n\n   The first example uses ``oneapi::tbb::parallel_reduce`` to do a + reduction\n   over sequence of type ``T``. The sequence is defined by a half-open\n   interval [first,last).\n\n\n   ::\n\n\n      T AssociativeReduce( const T* first, const T* last, T identity ) {\n         return oneapi::tbb::parallel_reduce(\n             // Index range for reduction\n             oneapi::tbb::blocked_range<const T*>(first,last),\n             // Identity element\n             identity,\n             // Reduce a subrange and partial sum\n             [&]( oneapi::tbb::blocked_range<const T*> r, T partial_sum )->float {\n                 return std::accumulate( r.begin(), r.end(), partial_sum );\n             },\n             // Reduce two partial sums\n             std::plus<T>()\n         );\n      }\n\n\n   The third and fourth arguments to this form of ``parallel_reduce``\n   are a built in form of the agglomeration pattern. If there is an\n   elementwise action to be performed before the reduction,\n   incorporating it into the third argument (reduction of a subrange)\n   may improve performance because of better locality of reference. Note\n   that the block size for agglomeration is not explicitly specified;\n   ``parallel_reduce`` defines blocks automatically with the help of\n   implicitly used ``oneapi::tbb::auto_partitioner``.\n\n\n   The second example assumes the + is commutative on ``T``. It is a\n   good solution when ``T`` objects are expensive to construct.\n\n\n   ::\n\n\n      T CombineReduce( const T* first, const T* last, T identity ) {\n         oneapi::tbb::combinable<T> sum(identity);\n         oneapi::tbb::parallel_for(\n             oneapi::tbb::blocked_range<const T*>(first,last),\n             [&]( oneapi::tbb::blocked_range<const T*> r ) {\n                 sum.local() += std::accumulate(r.begin(), r.end(), identity);\n             }\n         );\n         return sum.combine( []( const T& x, const T& y ) {return x+y;} );\n      }\n\n\n   Sometimes it is desirable to destructively use the partial results to\n   generate the final result. For example, if the partial results are\n   lists, they can be spliced together to form the final result. In that\n   case use class ``oneapi::tbb::enumerable_thread_specific`` instead of\n   ``combinable``. The ``ParallelFindCollisions`` example in :ref:`Divide_and_Conquer`\n   demonstrates the technique.\n\n\n   Floating-point addition and multiplication are almost associative.\n   Reassociation can cause changes because of rounding effects. The\n   techniques shown so far reassociate terms non-deterministically.\n   Fully deterministic parallel reduction for a not quite associative\n   operation requires using deterministic reassociation. The code below\n   demonstrates this in the form of a template that does a + reduction\n   over a sequence of values of type ``T``.\n\n\n   ::\n\n\n      template<typename T>\n      T RepeatableReduce( const T* first, const T* last, T identity ) {\n         if( last-first<=1000 ) {\n             // Use serial reduction\n             return std::accumulate( first, last, identity );\n         } else {\n             // Do parallel divide-and-conquer reduction\n             const T* mid = first+(last-first)/2;\n             T left, right;\n             oneapi::tbb::parallel_invoke(\n                 [&]{left=RepeatableReduce(first,mid,identity);},\n                 [&]{right=RepeatableReduce(mid,last,identity);} \n             );\n             return left+right;\n         }\n      }\n\n\n   The outer if-else is an instance of the agglomeration pattern for\n   recursive computations. The reduction graph, though not a strict\n   binary tree, is fully deterministic. Thus the result will always be\n   the same for a given input sequence, assuming all threads do\n   identical floating-point rounding.\n\n\n   ``oneapi::tbb::parallel_deterministic_reduce`` is a simpler and more\n   efficient way to get reproducible non-associative reduction. It is\n   very similar to ``oneapi::tbb::parallel_reduce`` but, unlike the latter,\n   builds a deterministic reduction graph. With it, the\n   ``RepeatableReduce`` sample can be almost identical to\n   ``AssociativeReduce``:\n\n\n   ::\n\n\n      template<typename T>\n      T RepeatableReduce( const T* first, const T* last, T identity ) {\n         return oneapi::tbb::parallel_deterministic_reduce(\n             // Index range for reduction\n             oneapi::tbb::blocked_range<const T*>(first,last,1000),\n             // Identity element\n             identity,\n             // Reduce a subrange and partial sum\n             [&]( oneapi::tbb::blocked_range<const T*> r, T partial_sum )->float {\n                 return std::accumulate( r.begin(), r.end(), partial_sum );\n             },\n             // Reduce two partial sums\n             std::plus<T>()\n         );\n      }\n\n\n   Besides the function name change, note the grain size of 1000\n   specified for ``oneapi::tbb::blocked_range``. It defines the desired block\n   size for agglomeration; automatic block size selection is not used\n   due to non-determinism.\n\n\n   The final example shows how a problem that typically is not viewed as\n   a reduction can be parallelized by viewing it as a reduction. The\n   problem is retrieving floating-point exception flags for a\n   computation across a data set. The serial code might look something\n   like:\n\n\n   ::\n\n\n         feclearexcept(FE_ALL_EXCEPT);\n         for( int i=0; i<N; ++i )\n             C[i]=A[i]*B[i];\n         int flags = fetestexcept(FE_ALL_EXCEPT);\n         if (flags & FE_DIVBYZERO) ...;\n         if (flags & FE_OVERFLOW) ...;\n         ...\n\n\n   The code can be parallelized by computing chunks of the loop\n   separately, and merging floating-point flags from each chunk. To do\n   this with ``tbb:parallel_reduce``, first define a \"body\" type, as\n   shown below.\n\n\n   ::\n\n\n      struct ComputeChunk {\n         int flags;          // Holds floating-point exceptions seen so far.\n         void reset_fpe() {\n             flags=0;\n             feclearexcept(FE_ALL_EXCEPT);\n         }\n         ComputeChunk () {\n             reset_fpe();\n         }\n         // \"Splitting constructor\"called by parallel_reduce when splitting a range into subranges.\n         ComputeChunk ( const ComputeChunk&, oneapi::tbb::split ) {\n             reset_fpe();\n         }\n         // Operates on a chunk and collects floating-point exception state into flags member.\n         void operator()( oneapi::tbb::blocked_range<int> r ) {\n             int end=r.end();\n             for( int i=r.begin(); i!=end; ++i )\n                 C[i] = A[i]/B[i];\n             // It is critical to do |= here, not =, because otherwise we\n             // might lose earlier exceptions from the same thread.\n             flags |= fetestexcept(FE_ALL_EXCEPT);\n         }\n         // Called by parallel_reduce when joining results from two subranges.\n         void join( Body& other ) {\n             flags |= other.flags;\n         }\n      };\n\n\n   Then invoke it as follows:\n\n\n   ::\n\n\n      // Construction of cc implicitly resets FP exception state.\n         ComputeChunk cc;\n         oneapi::tbb::parallel_reduce( oneapi::tbb::blocked_range<int>(0,N), cc );\n         if (cc.flags & FE_DIVBYZERO) ...;\n         if (cc.flags & FE_OVERFLOW) ...;\n         ...\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/design_patterns/Reference_Counting.rst",
    "content": ".. _Reference_Counting:\n\nReference Counting\n==================\n\n\n.. container:: section\n\n\n   .. rubric:: Problem\n      :class: sectiontitle\n\n   Destroy an object when it will no longer be used.\n\n\n.. container:: section\n\n\n   .. rubric:: Context\n      :class: sectiontitle\n\n   Often it is desirable to destroy an object when it is known that it\n   will not be used in the future. Reference counting is a common serial\n   solution that extends to parallel programming if done carefully.\n\n\n.. container:: section\n\n\n   .. rubric:: Forces\n      :class: sectiontitle\n\n   -  If there are cycles of references, basic reference counting is\n      insufficient unless the cycle is explicitly broken.\n\n\n   -  Atomic counting is relatively expensive in hardware.\n\n\n.. container:: section\n\n\n   .. rubric:: Solution\n      :class: sectiontitle\n\n   Thread-safe reference counting is like serial reference counting,\n   except that the increment/decrement is done atomically, and the\n   decrement and test \"count is zero?\" must act as a single atomic\n   operation. The following example uses ``std::atomic<int>`` to achieve\n   this.\n\n\n   ::\n\n\n      template<typename T>\n      class counted {\n         std::atomic<int> my_count;\n         T value;\n      public:\n         // Construct object with a single reference to it.\n         counted() {my_count=1;}\n         // Add reference\n         void add_ref() {++my_count;}\n         // Remove reference. Return true if it was the last reference.\n         bool remove_ref() {return --my_count==0;}\n         // Get reference to underlying object\n         T& get() {\n             assert(my_count>0);\n             return my_value;\n         }\n      };\n\n\n   It is incorrect to use a separate read for testing if the count is\n   zero. The following code would be an incorrect implementation of\n   method ``remove_ref``\\ () because two threads might both execute the\n   decrement, and then both read ``my_count`` as zero. Hence two callers\n   would both be told incorrectly that they had removed the last\n   reference.\n\n\n   ::\n\n\n            --my_count;\n            return my_count==0. // WRONG!\n\n\n   The decrement may need to have a *release* fence so that any pending\n   writes complete before the object is deleted.\n\n\n   There is no simple way to atomically copy a pointer and increment its\n   reference count, because there will be a timing hole between the\n   copying and the increment where the reference count is too low, and\n   thus another thread might decrement the count to zero and delete the\n   object. Two ways to address the problem are \"hazard pointers\" and\n   \"pass the buck\". See the references below for details.\n\n\n.. container:: section\n\n\n   .. rubric:: Variations\n      :class: sectiontitle\n\n   Atomic increment/decrement can be more than an order of magnitude\n   more expensive than ordinary increment/decrement. The serial\n   optimization of eliminating redundant increment/decrement operations\n   becomes more important with atomic reference counts.\n\n\n   Weighted reference counting can be used to reduce costs if the\n   pointers are unshared but the referent is shared. Associate a\n   *weight* with each pointer. The reference count is the sum of the\n   weights. A pointer ``x`` can be copied as a pointer ``x'`` without\n   updating the reference count by splitting the original weight between\n   ``x`` and ``x'``. If the weight of ``x`` is too low to split, then first add a\n   constant W to the reference count and weight of ``x``.\n\n\n.. container:: section\n\n\n   .. rubric:: References\n      :class: sectiontitle\n\n   D. Bacon and V.T. Rajan, \"Concurrent Cycle Collection in Reference\n   Counted Systems\" in Proc. European Conf. on Object-Oriented\n   Programming (June 2001). Describes a garbage collector based on\n   reference counting that does collect cycles.\n\n\n   M. Michael, \"Hazard Pointers: Safe Memory Reclamation for Lock-Free\n   Objects\" in IEEE Transactions on Parallel and Distributed Systems\n   (June 2004). Describes the \"hazard pointer\" technique.\n\n\n   M. Herlihy, V. Luchangco, and M. Moir, \"The Repeat Offender Problem:\n   A Mechanism for Supporting Dynamic-Sized, Lock-Free Data Structures\"\n   in Proceedings of the 16th International Symposium on Distributed\n   Computing (Oct. 2002). Describes the \"pass the buck\" technique.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/design_patterns/Wavefront.rst",
    "content": ".. _Wavefront:\n\nWavefront\n=========\n\n\n.. container:: section\n\n\n   .. rubric:: Problem\n      :class: sectiontitle\n\n   Perform computations on items in a data set, where the computation on\n   an item uses results from computations on predecessor items.\n\n\n.. container:: section\n\n\n   .. rubric:: Context\n      :class: sectiontitle\n\n   The dependences between computations form an acyclic graph.\n\n\n.. container:: section\n\n\n   .. rubric:: Forces\n      :class: sectiontitle\n\n   -  Dependence constraints between items form an acyclic graph.\n\n\n   -  The number of immediate predecessors in the graph is known in\n      advance, or can be determined some time before the last\n      predecessor completes.\n\n\n.. container:: section\n\n\n   .. rubric:: Solution\n      :class: sectiontitle\n\n   The solution is a parallel variant of topological sorting, using\n   ``oneapi::tbb::parallel_for_each`` to process items. Associate an atomic\n   counter with each item. Initialize each counter to the number of\n   predecessors. Invoke ``oneapi::tbb::parallel_for_each`` to process the items that\n   have no predessors (have counts of zero). After an item is processed,\n   decrement the counters of its successors. If a successor's counter\n   reaches zero, add that successor to the ``oneapi::tbb::parallel_for_each``\n   via a \"feeder\".\n\n\n   If the number of predecessors for an item cannot be determined in\n   advance, treat the information \"know number of predecessors\" as an\n   additional predecessor. When the number of predecessors becomes\n   known, treat this conceptual predecessor as completed.\n\n\n   If the overhead of counting individual items is excessive, aggregate\n   items into blocks, and do the wavefront over the blocks.\n\n\n.. container:: section\n\n\n   .. rubric:: Example\n      :class: sectiontitle\n\n   Below is a serial kernel for the longest common subsequence\n   algorithm. The parameters are strings ``x`` and ``y`` with respective\n   lengths ``xlen`` and ``ylen``.\n\n\n   ::\n\n\n      int F[MAX_LEN+1][MAX_LEN+1];\n\n\n      void SerialLCS( const char* x, size_t xlen, const char* y, size_t ylen )\n      {\n         for( size_t i=1; i<=xlen; ++i )\n             for( size_t j=1; j<=ylen; ++j )\n                 F[i][j] = x[i-1]==y[j-1] ? F[i-1][j-1]+1:\n                                            max(F[i][j-1],F[i-1][j]);\n      }\n\n\n   The kernel sets ``F[i][j]`` to the length of the longest common\n   subsequence shared by ``x[0..i-1]`` and ``y[0..j-1]``. It assumes\n   that F[0][0..ylen] and ``F[0..xlen][0]`` have already been\n   initialized to zero.\n\n\n   The following figure shows the data dependences for calculating\n   ``F[i][j]``.\n\n\n   .. container:: fignone\n      :name: fig3\n\n\n      Data dependences for longest common substring calculation.\n      |image0|\n\n\n   The following figure shows the gray diagonal dependence is the\n   transitive closure of other dependencies. Thus for parallelization\n   purposes it is a redundant dependence that can be ignored.\n\n\n   .. container:: fignone\n      :name: fig4\n\n\n      Diagonal dependence is redundant.\n      |image1|\n\n\n   It is generally good to remove redundant dependences from\n   consideration, because the atomic counting incurs a cost for each\n   dependence considered.\n\n\n   Another consideration is grain size. Scheduling each ``F[i][j]``\n   element calculation separately is prohibitively expensive. A good\n   solution is to aggregate the elements into contiguous blocks, and\n   process the contents of a block serially. The blocks have the same\n   dependence pattern, but at a block scale. Hence scheduling overheads\n   can be amortized over blocks.\n\n\n   The parallel code follows. Each block consists of ``N×N`` elements.\n   Each block has an associated atomic counter. Array ``Count``\n   organizes these counters for easy lookup. The code initializes the\n   counters and then rolls a wavefront using ``parallel_for_each``,\n   starting with the block at the origin since it has no predecessors.\n\n\n   ::\n\n\n      const int N = 64;\n      std::atomic<char> Count[MAX_LEN/N+1][MAX_LEN/N+1];\n       \n\n      void ParallelLCS( const char* x, size_t xlen, const char* y, size_t ylen ) {\n         // Initialize predecessor counts for blocks.\n         size_t m = (xlen+N-1)/N;\n         size_t n = (ylen+N-1)/N;\n         for( int i=0; i<m; ++i )\n             for( int j=0; j<n; ++j )\n                 Count[i][j] = (i>0)+(j>0);\n         // Roll the wavefront from the origin.\n         typedef pair<size_t,size_t> block;\n         block origin(0,0);\n         oneapi::tbb::parallel_for_each( &origin, &origin+1,\n             [=]( const block& b, oneapi::tbb::feeder<block>&feeder ) {\n                 // Extract bounds on block\n                 size_t bi = b.first;\n                 size_t bj = b.second;\n                 size_t xl = N*bi+1;\n                 size_t xu = min(xl+N,xlen+1);\n                 size_t yl = N*bj+1;\n                 size_t yu = min(yl+N,ylen+1);\n                 // Process the block\n                 for( size_t i=xl; i<xu; ++i )\n                     for( size_t j=yl; j<yu; ++j )\n                         F[i][j] = x[i-1]==y[j-1] ? F[i-1][j-1]+1:\n                                                    max(F[i][j-1],F[i-1][j]);\n                 // Account for successors\n                 if( bj+1<n && --Count[bi][bj+1]==0 )\n                     feeder.add( block(bi,bj+1) );\n                 if( bi+1<m && --Count[bi+1][bj]==0 )\n                     feeder.add( block(bi+1,bj) );       }\n         );\n      }\n\n\n.. container:: section\n\n\n   .. rubric:: References\n      :class: sectiontitle\n\n   Eun-Gyu Kim and Mark Snir, \"Wavefront Pattern\",\n   http://snir.cs.illinois.edu/patterns/wavefront.pdf\n\n\n.. |image0| image:: Images/image005a.jpg\n   :width: 122px\n   :height: 122px\n.. |image1| image:: Images/image006a.jpg\n   :width: 122px\n   :height: 122px\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/destroy_graphs_outside_main_thread.rst",
    "content": ".. _destroy_graphs_outside_main_thread:\n\nDestroying Graphs That Run Outside the Main Thread\n==================================================\n\nMake sure to enqueue a task to wait for and destroy graphs that run outside the main thread.\n\nYou may not always want to block the main application thread by calling\n``wait_for_all()``. However, it is safest to call ``wait_for_all`` on a graph\nbefore destroying it. A common solution is to enqueue a task to build\nand wait for the graph to complete. For example, assume you really do\nnot want to call a ``wait_for_all`` in the example from :ref:`always_use_wait_for_all`,\nInstead you can enqueue a task that creates the graph and waits for it:\n\n\n::\n\n\n   class background_task {\n   public:\n     void operator()() {\n       graph g;\n       function_node< int, int > f( g, 1, []( int i ) -> int {\n         return spin_for(i);\n       } );\n       f.try_put(1);\n       g.wait_for_all();\n     }\n   };\n\n\n   void no_wait_for_all_enqueue() {\n     task_arena a;\n     a.enqueue(background_task());\n     // do other things without waiting…\n   }\n\n\nIn the code snippet above, the enqueued task executes at some point, but\nit's not clear when. If you need to use the results of the enqueued\ntask, or even ensure that it completes before the program ends, you will\nneed to use some mechanism to signal from the enqueued task that the\ngraph is complete.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/estimate_flow_graph_performance.rst",
    "content": ".. _estimate_flow_graph_performance:\n\nEstimating Flow Graph Performance\n=================================\n\n\nThe performance or scalability of a flow graph is not easy to predict.\nHowever there are a few key points that can guide you in estimating the\nlimits on performance and speedup of some graphs.\n\n\n.. container:: section\n\n\n   .. rubric:: The Critical Path Limits the Scalability in a Dependence\n      Graph\n      :class: sectiontitle\n\n   A critical path is the most time consuming path from a node with no\n   predecessors to a node with no successors. In a dependence graph, the\n   execution of the nodes along a path cannot be overlapped since they\n   have a strict ordering. Therefore, for a dependence graph, the\n   critical path limits scalability.\n\n\n   More formally, let T be the total time consumed by all of the nodes\n   in your graph if executed sequentially. Then let C be the time\n   consumed along the path that takes the most time. The nodes along\n   this path cannot be overlapped even in a parallel execution.\n   Therefore, even if all other paths are executed in parallel with C,\n   the wall clock time for the parallel execution is at least C, and the\n   maximum possible speedup (ignoring microarchitectural and memory\n   effects) is T/C.\n\n\n.. container:: section\n\n\n   .. rubric:: There is Overhead in Spawning a Node's Body as a Task\n      :class: sectiontitle\n\n   The bodies of ``input_nodes``, ``function_nodes``, ``continue_nodes`` and\n   ``multifunction_nodes`` execute within spawned tasks by default. This\n   means that you need to take into account the overhead of task\n   scheduling when estimating the time it takes for a node to execute\n   its body. All of the rules of thumb for determining the appropriate\n   granularity of tasks therefore also apply to node bodies as well. If\n   you have many fine-grained nodes in your flow graph, the impact of\n   these overheads can noticeably impact your performance. However,\n   depending on the graph structure, you can reduce such overheads by\n   using lightweight policy with these nodes.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/examples/blocked_nd_range_example.cpp",
    "content": "/*\n    Copyright (c) 2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*begin_blocked_nd_range_example*/\n#include \"oneapi/tbb/blocked_nd_range.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n\ntemplate<typename Features>\nfloat kernel3d(const Features& feature_maps, int i, int j, int k,\n               int kernel_length, int kernel_width, int kernel_height) {\n    float result = 0.f;\n\n    for (int feature_i = i; feature_i < i + kernel_length; ++feature_i)\n        for (int feature_j = j; feature_j < j + kernel_width; ++feature_j)\n            for (int feature_k = k; feature_k < k + kernel_width; ++feature_k)\n                result += feature_maps[feature_i][feature_j][feature_k];\n\n    return result;\n}\n\ntemplate<typename Features, typename Output>\nvoid convolution3d(const Features& feature_maps, Output& out,\n                   int out_length, int out_width, int out_heigth,\n                   int kernel_length, int kernel_width, int kernel_height) {\n    using range_t = oneapi::tbb::blocked_nd_range<int, 3>;\n\n    oneapi::tbb::parallel_for(\n        range_t({0, out_length}, {0, out_width}, {0, out_heigth}),\n        [&](const range_t& out_range) {\n            auto out_x = out_range.dim(0);\n            auto out_y = out_range.dim(1);\n            auto out_z = out_range.dim(2);\n\n            for (int i = out_x.begin(); i < out_x.end(); ++i)\n                for (int j = out_y.begin(); j < out_y.end(); ++j)\n                    for (int k = out_z.begin(); k < out_z.end(); ++k)\n                        out[i][j][k] = kernel3d(feature_maps, i, j, k,\n                                                kernel_length, kernel_width, kernel_height);\n        }\n    );\n}\n/*end_blocked_nd_range_example*/\n\n#include <vector>\n#include <cassert>\n\nint main() {\n    const int kernel_length = 9;\n    const int kernel_width = 5;\n    const int kernel_height = 5;\n\n    const int feature_maps_length = 128;\n    const int feature_maps_width = 16;\n    const int feature_maps_heigth = 16;\n\n    const int out_length = feature_maps_length - kernel_length + 1;\n    const int out_width = feature_maps_width - kernel_width + 1;\n    const int out_heigth = feature_maps_heigth - kernel_height + 1;\n\n    // Initializes feature maps with 1 in each cell and out with zeros.\n    std::vector<std::vector<std::vector<float>>> feature_maps(feature_maps_length, std::vector<std::vector<float>>(feature_maps_width, std::vector<float>(feature_maps_heigth, 1.0f)));\n    std::vector<std::vector<std::vector<float>>> out(out_length, std::vector<std::vector<float>>(out_width, std::vector<float>(out_heigth, 0.f)));\n\n    // 3D convolution calculates the sum of all elements in the kernel\n    convolution3d(feature_maps, out,\n                  out_length, out_width, out_heigth,\n                  kernel_length, kernel_width, kernel_height);\n\n    // Checks correctness of convolution by equality to the expected sum of elements\n    float expected = float(kernel_length * kernel_height * kernel_width);\n    for (auto i : out) {\n        for (auto j : i) {\n            for (auto k : j) {\n                assert(k == expected && \"convolution failed to calculate correctly\");\n            }\n        }\n    }\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/examples/flow_graph_examples.cpp",
    "content": "/*\n    Copyright (c) 2022-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/* Flow Graph Code Example for the Userguide.\n*/\n\n#include <oneapi/tbb/flow_graph.h>\n#include <vector>\n\nusing namespace tbb::flow;\n\n//! Example shows how to set the most performant core type as the preferred one\n//! for a graph execution.\nstatic void flow_graph_attach_to_arena_1() {\n/*begin_attach_to_arena_1*/\n    std::vector<tbb::core_type_id> core_types = tbb::info::core_types();\n    tbb::task_arena arena(\n        tbb::task_arena::constraints{}.set_core_type(core_types.back())\n    );\n\n    arena.execute( [&]() {\n        graph g;\n        function_node< int > f( g, unlimited, []( int ) {\n             /*the most performant core type is defined as preferred.*/\n        } );\n        f.try_put(1);\n        g.wait_for_all();\n    } );\n/*end_attach_to_arena_1*/\n}\n\n//! Reattach existing graph to an arena with the most performant core type as\n//! the preferred one for a work execution.\nstatic void flow_graph_attach_to_arena_2() {\n/*begin_attach_to_arena_2*/\n    graph g;\n    function_node< int > f( g, unlimited, []( int ) {\n        /*the most performant core type is defined as preferred.*/\n    } );\n\n    std::vector<tbb::core_type_id> core_types = tbb::info::core_types();\n    tbb::task_arena arena(\n        tbb::task_arena::constraints{}.set_core_type(core_types.back())\n    );\n\n    arena.execute( [&]() {\n        g.reset();\n    } );\n    f.try_put(1);\n    g.wait_for_all();\n/*end_attach_to_arena_2*/\n}\n\nint main() {\n    flow_graph_attach_to_arena_1();\n    flow_graph_attach_to_arena_2();\n\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/examples/parallel_for_lambda_example_1.cpp",
    "content": "/*\n    Copyright (c) 2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\nvoid Foo(float) {}\n\n/*begin_parallel_for_lambda_1*/\n#include \"oneapi/tbb.h\"\n\nusing namespace oneapi::tbb;\n\nvoid ParallelApplyFoo( float* a, size_t n ) {\n    parallel_for( blocked_range<size_t>(0,n),\n        [=](const blocked_range<size_t>& r) {\n            for(size_t i=r.begin(); i!=r.end(); ++i)\n                Foo(a[i]);\n        }\n    );\n}\n/*end_parallel_for_lambda_1*/\n\nint main() {\n    constexpr std::size_t size = 10;\n    float array[size] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};\n\n    ParallelApplyFoo(array, size);\n}\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/examples/parallel_for_lambda_example_2.cpp",
    "content": "/*\n    Copyright (c) 2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\nvoid Foo(float) {}\n\n/*begin_parallel_for_lambda_2*/\n#include \"oneapi/tbb.h\"\n\nusing namespace oneapi::tbb;\n\n#pragma warning(disable: 588)\n\nvoid ParallelApplyFoo(float a[], size_t n) {\n    parallel_for(size_t(0), n, [=](size_t i) {Foo(a[i]);});\n}\n/*end_parallel_for_lambda_2*/\n\nint main() {\n    constexpr std::size_t size = 10;\n    float array[size] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};\n\n    ParallelApplyFoo(array, size);\n}\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/examples/parallel_for_os_example.cpp",
    "content": "/*\n    Copyright (c) 2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\nvoid Foo(float) {}\n\n/*begin_parallel_for_os_1*/\n#include \"oneapi/tbb.h\"\n\nusing namespace oneapi::tbb;\n\nclass ApplyFoo {\n    float *const my_a;\npublic:\n    void operator()( const blocked_range<size_t>& r ) const {\n        float *a = my_a;\n        for( size_t i=r.begin(); i!=r.end(); ++i )\n            Foo(a[i]);\n    }\n    ApplyFoo( float a[] ) :\n        my_a(a)\n    {}\n};\n/*end_parallel_for_os_1*/\n\n/*begin_parallel_for_os_2*/\n#include \"oneapi/tbb.h\"\n\nvoid ParallelApplyFoo( float a[], size_t n ) {\n    parallel_for(blocked_range<size_t>(0,n), ApplyFoo(a));\n}\n/*end_parallel_for_os_2*/\n\nint main() {\n    constexpr std::size_t size = 10;\n    float array[size] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};\n\n    ParallelApplyFoo(array, size);\n}\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/parallel_for_os.rst",
    "content": ".. _parallel_for:\n\nparallel_for\n============\n\n\nSuppose you want to apply a function ``Foo`` to each element of an\narray, and it is safe to process each element concurrently. Here is the\nsequential code to do this:\n\n\n::\n\n\n   void SerialApplyFoo( float a[], size_t n ) {\n       for( size_t i=0; i!=n; ++i )\n           Foo(a[i]);\n   }\n\n\nThe iteration space here is of type ``size_t``, and goes from ``0`` to\n``n-1``. The template function ``oneapi::tbb::parallel_for`` breaks this iteration\nspace into chunks, and runs each chunk on a separate thread. The first\nstep in parallelizing this loop is to convert the loop body into a form\nthat operates on a chunk. The form is an STL-style function object,\ncalled the *body* object, in which ``operator()`` processes a chunk. The\nfollowing code declares the body object.\n\n.. literalinclude:: ./examples/parallel_for_os_example.cpp\n    :language: c++\n    :start-after: /*begin_parallel_for_os_1*/\n    :end-before: /*end_parallel_for_os_1*/\n\nThe ``using`` directive in the example enables you to use the library\nidentifiers without having to write out the namespace prefix ``oneapi::tbb``\nbefore each identifier. The rest of the examples assume that such a\n``using`` directive is present.\n\n\nNote the argument to ``operator()``. A ``blocked_range<T>`` is a\ntemplate class provided by the library. It describes a one-dimensional\niteration space over type ``T``. Class ``parallel_for`` works with other\nkinds of iteration spaces too. The library provides ``blocked_range2d``,\n``blocked_range3d``, and ``blocked_nd_range`` for multidimensional spaces.\nYou can define your own spaces as explained\nin :ref:`Advanced_Topic_Other_Kinds_of_Iteration_Spaces`.\n\n\nAn instance of ``ApplyFoo`` needs member fields that remember all the\nlocal variables that were defined outside the original loop but used\ninside it. Usually, the constructor for the body object will initialize\nthese fields, though ``parallel_for`` does not care how the body object\nis created. Template function ``parallel_for`` requires that the body\nobject have a copy constructor, which is invoked to create a separate\ncopy (or copies) for each worker thread. It also invokes the destructor\nto destroy these copies. In most cases, the implicitly generated copy\nconstructor and destructor work correctly. If they do not, it is almost\nalways the case (as usual in C++) that you must define *both* to be\nconsistent.\n\n\nBecause the body object might be copied, its ``operator()`` should not\nmodify the body. Otherwise the modification might or might not become\nvisible to the thread that invoked ``parallel_for``, depending upon\nwhether ``operator()`` is acting on the original or a copy. As a\nreminder of this nuance, ``parallel_for`` requires that the body\nobject's ``operator()`` be declared ``const``.\n\n\nThe example ``operator()`` loads ``my_a`` into a local variable ``a``.\nThough not necessary, there are two reasons for doing this in the\nexample:\n\n\n-  **Style**. It makes the loop body look more like the original.\n\n\n-  **Performance**. Sometimes putting frequently accessed values into\n   local variables helps the compiler optimize the loop better, because\n   local variables are often easier for the compiler to track.\n\n\nOnce you have the loop body written as a body object, invoke the\ntemplate function ``parallel_for``, as follows:\n\n.. literalinclude:: ./examples/parallel_for_os_example.cpp\n    :language: c++\n    :start-after: /*begin_parallel_for_os_2*/\n    :end-before: /*end_parallel_for_os_2*/\n\nThe ``blocked_range`` constructed here represents the entire iteration\nspace from 0 to n-1, which ``parallel_for`` divides into subspaces for\neach processor. The general form of the constructor is\n``blocked_range<T>(begin,end,grainsize)``. The ``T`` specifies the value\ntype. The arguments ``begin`` and ``end`` specify the iteration space\nSTL-style as a half-open interval [``begin``,\\ ``end``). The argument\n*grainsize* is explained in the :ref:`Controlling_Chunking` section. The\nexample uses the default grainsize of 1 because by default\n``parallel_for`` applies a heuristic that works well with the default\ngrainsize.\n\n.. include:: parallel_for_toctree.rst\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/parallel_for_toctree.rst",
    "content": ".. _parallel_for_toctree:\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/Lambda_Expressions\n   ../tbb_userguide/Automatic_Chunking\n   ../tbb_userguide/Controlling_Chunking_os\n   ../tbb_userguide/Bandwidth_and_Cache_Affinity_os\n   ../tbb_userguide/Partitioner_Summary"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/parallel_reduce.rst",
    "content": ".. _parallel_reduce:\n\nparallel_reduce\n===============\n\n\nA loop can do a reduction, as in this summation:\n\n\n::\n\n\n   float SerialSumFoo( float a[], size_t n ) {\n       float sum = 0;\n       for( size_t i=0; i!=n; ++i )\n           sum += Foo(a[i]);\n       return sum;\n   }\n\n\nIf the iterations are independent, you can parallelize this loop using\nthe template class ``parallel_reduce`` as follows:\n\n\n::\n\n\n   float ParallelSumFoo( const float a[], size_t n ) {\n       SumFoo sf(a);\n       parallel_reduce( blocked_range<size_t>(0,n), sf );\n       return sf.my_sum;\n   }\n\n\nThe class ``SumFoo`` specifies details of the reduction, such as how to\naccumulate subsums and combine them. Here is the definition of class\n``SumFoo``:\n\n\n::\n\n\n   class SumFoo {\n       float* my_a;\n   public:\n       float my_sum; \n       void operator()( const blocked_range<size_t>& r ) {\n           float *a = my_a;\n           float sum = my_sum;\n           size_t end = r.end();\n           for( size_t i=r.begin(); i!=end; ++i ) \n               sum += Foo(a[i]); \n           my_sum = sum;    \n       }\n    \n\n       SumFoo( SumFoo& x, split ) : my_a(x.my_a), my_sum(0) {}\n    \n\n       void join( const SumFoo& y ) {my_sum+=y.my_sum;}\n                \n\n       SumFoo(float a[] ) :\n           my_a(a), my_sum(0)\n       {}\n   };\n\n\nNote the differences with class ``ApplyFoo`` from parallel_for. First,\n``operator()`` is *not* ``const``. This is because it must update\nSumFoo::my_sum. Second, ``SumFoo`` has a *splitting constructor* and a\nmethod ``join`` that must be present for ``parallel_reduce`` to work.\nThe splitting constructor takes as arguments a reference to the original\nobject, and a dummy argument of type ``split``, which is defined by the\nlibrary. The dummy argument distinguishes the splitting constructor from\na copy constructor.\n\n\n.. tip:: \n   In the example, the definition of ``operator()`` uses local temporary\n   variables (``a``, ``sum``, ``end``) for scalar values accessed inside\n   the loop. This technique can improve performance by making it obvious\n   to the compiler that the values can be held in registers instead of\n   memory. If the values are too large to fit in registers, or have\n   their address taken in a way the compiler cannot track, the technique\n   might not help. With a typical optimizing compiler, using local\n   temporaries for only written variables (such as ``sum`` in the\n   example) can suffice, because then the compiler can deduce that the\n   loop does not write to any of the other locations, and hoist the\n   other reads to outside the loop.\n\n\nWhen a worker thread is available, as decided by the task scheduler,\n``parallel_reduce`` invokes the splitting constructor to create a\nsubtask for the worker. When the subtask completes, ``parallel_reduce``\nuses method ``join`` to accumulate the result of the subtask. The graph\nat the top of the following figure shows the split-join sequence that\nhappens when a worker is available:\n\n\n.. container:: fignone\n   :name: fig5\n\n\n   Graph of the Split-join Sequence\n   |image0|\n\n\nAn arrows in the above figure indicate order in time. The splitting\nconstructor might run concurrently while object ``x`` is being used for the\nfirst half of the reduction. Therefore, all actions of the splitting\nconstructor that creates y must be made thread safe with respect to ``x``.\nSo if the splitting constructor needs to increment a reference count\nshared with other objects, it should use an atomic increment.\n\n\nIf a worker is not available, the second half of the iteration is\nreduced using the same body object that reduced the first half. That is\nthe reduction of the second half starts where reduction of the first\nhalf finished.\n\n\n.. CAUTION:: \n   Since split/join are not used if workers are unavailable,\n   ``parallel_reduce`` does not necessarily do recursive splitting.\n\n\n.. CAUTION:: \n   Since the same body might be used to accumulate multiple subranges,\n   it is critical that ``operator()`` not discard earlier accumulations.\n   The code below shows an incorrect definition of\n   ``SumFoo::operator()``.\n\n\n::\n\n\n   class SumFoo {\n       ...\n   public:\n       float my_sum; \n       void operator()( const blocked_range<size_t>& r ) {\n           ...\n           float sum = 0;  // WRONG – should be 'sum = my_sum\".\n           ...\n           for( ... ) \n               sum += Foo(a[i]); \n           my_sum = sum;   \n       }\n       ...\n   };\n\n\nWith the mistake, the body returns a partial sum for the last subrange\ninstead of all subranges to which ``parallel_reduce`` applies it.\n\n\nThe rules for partitioners and grain sizes for ``parallel_reduce`` are\nthe same as for ``parallel_for``.\n\n\n``parallel_reduce`` generalizes to any associative operation. In\ngeneral, the splitting constructor does two things:\n\n\n-  Copy read-only information necessary to run the loop body.\n\n\n-  Initialize the reduction variable(s) to the identity element of the\n   operation(s).\n\n\nThe join method should do the corresponding merge(s). You can do more\nthan one reduction at the same time: you can gather the min and max with\na single ``parallel_reduce``.\n\n\n.. note:: \n   The reduction operation can be non-commutative. The example still\n   works if floating-point addition is replaced by string concatenation.\n\n\n.. |image0| image:: Images/image009.jpg\n   :width: 512px\n   :height: 438px\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/snippets/blocked_nd_range_example.cpp",
    "content": "#include \"blocked_nd_range_example.h\"\n#include <vector>\n#include <cassert>\n\nint main() {\n    const int kernel_length = 9;\n    const int kernel_width = 5;\n    const int kernel_height = 5;\n\n    const int feature_maps_length = 128;\n    const int feature_maps_width = 16;\n    const int feature_maps_heigth = 16;\n\n    const int out_length = feature_maps_length - kernel_length + 1;\n    const int out_width = feature_maps_width - kernel_width + 1;\n    const int out_heigth = feature_maps_heigth - kernel_height + 1;\n\n    // Initializes feature maps with 1 in each cell and out with zeros.\n    std::vector<std::vector<std::vector<float>>> feature_maps(feature_maps_length, std::vector<std::vector<float>>(feature_maps_width, std::vector<float>(feature_maps_heigth, 1.0f)));\n    std::vector<std::vector<std::vector<float>>> out(out_length, std::vector<std::vector<float>>(out_width, std::vector<float>(out_heigth, 0.f)));\n\n    // 3D convolution calculates the sum of all elements in the kernel\n    convolution3d(feature_maps, out,\n                  out_length, out_width, out_heigth,\n                  kernel_length, kernel_width, kernel_height);\n\n    // Checks correctness of convolution by equality to the expected sum of elements\n    float expected = float(kernel_length * kernel_height * kernel_width);\n    for (auto i : out) {\n        for (auto j : i) {\n            for (auto k : j) {\n                assert(k == expected && \"convolution failed to calculate correctly\");\n            }\n        }\n    }\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/snippets/blocked_nd_range_example.h",
    "content": "#include \"oneapi/tbb/blocked_nd_range.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n\ntemplate<typename Features>\nfloat kernel3d(const Features& feature_maps, int i, int j, int k,\n               int kernel_length, int kernel_width, int kernel_height) {\n    float result = 0.f;\n\n    for (int feature_i = i; feature_i < i + kernel_length; ++feature_i)\n        for (int feature_j = j; feature_j < j + kernel_width; ++feature_j)\n            for (int feature_k = k; feature_k < k + kernel_width; ++feature_k)\n                result += feature_maps[feature_i][feature_j][feature_k];\n\n    return result;\n}\n\ntemplate<typename Features, typename Output>\nvoid convolution3d(const Features& feature_maps, Output& out,\n                   int out_length, int out_width, int out_heigth,\n                   int kernel_length, int kernel_width, int kernel_height) {\n    using range_t = oneapi::tbb::blocked_nd_range<int, 3>;\n\n    oneapi::tbb::parallel_for(\n        range_t({0, out_length}, {0, out_width}, {0, out_heigth}),\n        [&](const range_t& out_range) {\n            auto out_x = out_range.dim(0);\n            auto out_y = out_range.dim(1);\n            auto out_z = out_range.dim(2);\n\n            for (int i = out_x.begin(); i < out_x.end(); ++i)\n                for (int j = out_y.begin(); j < out_y.end(); ++j)\n                    for (int k = out_z.begin(); k < out_z.end(); ++k)\n                        out[i][j][k] = kernel3d(feature_maps, i, j, k,\n                                                kernel_length, kernel_width, kernel_height);\n        }\n    );\n}\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/snippets/flow_graph_examples.cpp",
    "content": "/*\n    Copyright (c) 2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/* Flow Graph Code Example for the Userguide.\n*/\n\n#include <oneapi/tbb/flow_graph.h>\n#include <vector>\n\nusing namespace tbb::flow;\n\n//! Example shows how to set the most performant core type as the preferred one\n//! for a graph execution.\nstatic void flow_graph_attach_to_arena_1() {\n/*begin_attach_to_arena_1*/\n    std::vector<tbb::core_type_id> core_types = tbb::info::core_types();\n    tbb::task_arena arena(\n        tbb::task_arena::constraints{}.set_core_type(core_types.back())\n    );\n\n    arena.execute( [&]() {\n        graph g;\n        function_node< int > f( g, unlimited, []( int ) {\n             /*the most performant core type is defined as preferred.*/\n        } );\n        f.try_put(1);\n        g.wait_for_all();\n    } );\n/*end_attach_to_arena_1*/\n}\n\n//! Reattach existing graph to an arena with the most performant core type as\n//! the preferred one for a work execution.\nstatic void flow_graph_attach_to_arena_2() {\n/*begin_attach_to_arena_2*/\n    graph g;\n    function_node< int > f( g, unlimited, []( int ) {\n        /*the most performant core type is defined as preferred.*/\n    } );\n\n    std::vector<tbb::core_type_id> core_types = tbb::info::core_types();\n    tbb::task_arena arena(\n        tbb::task_arena::constraints{}.set_core_type(core_types.back())\n    );\n\n    arena.execute( [&]() {\n        g.reset();\n    } );\n    f.try_put(1);\n    g.wait_for_all();\n/*end_attach_to_arena_2*/\n}\n\nint main() {\n    flow_graph_attach_to_arena_1();\n    flow_graph_attach_to_arena_2();\n\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/std_invoke.rst",
    "content": ".. _std_invoke:\n\nInvoke a Callable Object\n==========================\n\nStarting from C++17, the requirements for callable objects passed to algorithms or Flow Graph nodes are relaxed. It allows using additional types of bodies. \nPreviously, the body of the algorithm or Flow Graph node needed to be a Function Object (see `C++ Standard Function Object <https://en.cppreference.com/w/cpp/utility/functional>`_) and provide an \n``operator()`` that accepts input parameters. \n\nNow the body needs to meet the more relaxed requirements of being Callable (see `C++ Standard Callable <https://en.cppreference.com/w/cpp/named_req/Callable>`_) that covers three types of objects:\n\n* **Function Objects that provide operator(arg1, arg2, ...)**, which accepts the input parameters\n* **Pointers to member functions** that you can use as the body of the algorithm or the Flow Graph node\n* **Pointers to member objects** work as the body of the algorithm or parallel construct\n\nYou can use it not only for a Flow Graph but also for algorithms. See the example below: \n\n.. code::\n   \n    // The class models oneTBB Range \n    class StrideRange {\n    public:\n        StrideRange(int* s, std::size_t sz, std::size_t str)\n            : start(s), size(sz), stride(str) {}\n\n        // A copy constructor\n        StrideRange(const StrideRange&) = default;\n\n        // A splitting constructor\n        StrideRange(StrideRange& other, oneapi::tbb::split) \n            : start(other.start), size(other.size / 2)\n        {\n            other.size -= size;\n            other.start += size;\n        }\n\n        ~StrideRange() = default;\n\n        // Indicate if the range is empty\n        bool empty() const {\n            return size == 0;\n        }\n\n        // Indicate if the range can be divided\n        bool is_divisible() const {\n            return size >= stride;\n        }\n\n        void iterate() const {\n            for (std::size_t i = 0; i < size; i += stride) {\n                // Performed an action for each element of the range,\n                // implement the code based on your requirements\n            }\n        }\n\n    private:\n        int* start;\n        std::size_t size;\n        std::size_t stride;\n    };\n\nWhere:\n\n* The ``StrideRange`` class models oneTBB range that should be iterated with a specified stride during its initial construction. \n* The ``stride`` value is stored in a private field within the range. Therefore, the class provides the member function ``iterate() const`` that implements a loop with the specified stride. \n\n``range.iterate()``\n*******************\n\nBefore C++17, to utilize a range in a parallel algorithm, such as ``parallel_for``, it was required to provide a ``Function Object`` as the algorithm's body. This Function Object defined the operations to be executed on each iteration of the range:\n\n.. code:: \n\n    int main() {\n        std::size_t array_size = 1000;\n\n        int* array_to_iterate = new int[array_size];\n        \n        StrideRange range(array_to_iterate, array_size, /* stride = */ 2);\n\n        // Define a lambda function as the body of the parallel_for loop\n        auto pfor_body = [] (const StrideRange& range) {\n            range.iterate();\n        };\n\n        // Perform parallel iteration \n        oneapi::tbb::parallel_for(range, pfor_body);\n\n        delete[] array_to_iterate;\n    }\n\nAn additional lambda function ``pfor_body`` was also required. This lambda function invoked the ``rage.iterate()`` function.\n\nNow with C++17, you can directly utilize a pointer to ``range.iterate()`` as the body of the algorithm:\n\n.. code::\n   \n    int main() {\n        std::size_t array_size = 1000;\n\n        int* array_to_iterate = new int[array_size];\n\n        // Performs the iteration over the array elements with the specified stride\n        StrideRange range(array_to_iterate, array_size, /* stride = */ 2);\n\n        // Parallelize the iteration over the range object\n        oneapi::tbb::parallel_for(range, &StrideRange::iterate);\n\n        delete[] array_to_iterate;\n    }\n\n``std::invoke``\n****************\n\n``std::invoke`` is a function template that provides a syntax for invoking different types of callable objects with a set of arguments.\n\noneTBB implementation uses the C++ standard function ``std::invoke(&StrideRange::iterate, range)`` to execute the body. It is the equivalent of ``range.iterate()``.\nTherefore, it allows you to invoke a callable object, such as a function object, with the provided arguments. \n\n.. tip:: Refer to `C++ Standard <https://en.cppreference.com/w/cpp/utility/functional/invoke>`_ to learn more about ``std::invoke``. \n\nExample\n^^^^^^^^\n\nConsider a specific scenario with ``function_node`` within a Flow Graph.\n\nIn the example below, a ``function_node`` takes an object as an input to read a member object of that input and proceed it to the next node in the graph:\n\n.. code:: \n\n    struct Object {\n        int number;\n    };\n\n    int main() {\n        using namespace oneapi::tbb::flow;\n\n        // Lambda function to read the member object of the input Object\n        auto number_reader = [] (const Object& obj) {\n            return obj.number;\n        };\n\n        // Lambda function to process the received integer\n        auto number_processor = [] (int i) { /* processing integer */ };\n\n        graph g;\n\n        // Function node that takes an Object as input and produces an integer\n        function_node<Object, int> func1(g, unlimited, number_reader);\n\n        // Function node that takes an integer as input and processes it\n        function_node<int, int> func2(g, unlimited, number_processor);\n\n        // Connect the function nodes\n        make_edge(func1, func2);\n\n        // Provide produced input to the graph\n        func1.try_put(Object{1});\n\n        // Wait for the graph to complete\n        g.wait_for_all();\n    }\n\n\nBefore C++17, the ``function_node`` in the Flow Graph required the body to be a Function Object. A lambda function was required to extract the number from the Object. \n\nWith C++17, you can use ``std::invoke`` with a pointer to the member number directly as the body. \n\nYou can update the previous example as follows:\n\n.. code::\n\n    struct Object {\n        int number;\n    };\n\n    int main() {\n        using namespace oneapi::tbb::flow;\n \n        // The processing logic for the received integer\n        auto number_processor = [] (int i) { /* processing integer */ };\n\n        // Create a graph object g to hold the flow graph\n        graph g;\n\n        // Use a member function pointer to the number member of the Object struct as the body\n        function_node<Object, int> func1(g, unlimited, &Object::number);\n\n        // Use the number_processor lambda function as the body\n        function_node<int, int> func2(g, unlimited, number_processor);\n\n        // Connect the function nodes\n        make_edge(func1, func2);\n\n        // Connect the function nodes\n        func1.try_put(Object{1});\n\n       // Wait for the graph to complete\n       g.wait_for_all();\n    }\n\nFind More \n*********\n\nThe following APIs supports Callable object as Bodies: \n\n* `parallel_for <https://uxlfoundation.github.io/oneAPI-spec/spec/elements/oneTBB/source/algorithms/functions/parallel_for_func.html>`_\n* `parallel_reduce <https://uxlfoundation.github.io/oneAPI-spec/spec/elements/oneTBB/source/algorithms/functions/parallel_reduce_func.html>`_\n* `parallel_deterministic_reduce <https://uxlfoundation.github.io/oneAPI-spec/spec/elements/oneTBB/source/algorithms/functions/parallel_deterministic_reduce_func.html>`_\n* `parallel_for_each <https://uxlfoundation.github.io/oneAPI-spec/spec/elements/oneTBB/source/algorithms/functions/parallel_for_each_func.html>`_\n* `parallel_scan <https://uxlfoundation.github.io/oneAPI-spec/spec/elements/oneTBB/source/algorithms/functions/parallel_scan_func.html>`_ \n* `parallel_pipeline <https://uxlfoundation.github.io/oneAPI-spec/spec/elements/oneTBB/source/algorithms/functions/parallel_pipeline_func.html>`_ \n* `function_node <https://uxlfoundation.github.io/oneAPI-spec/spec/elements/oneTBB/source/flow_graph/func_node_cls.html>`_ \n* `multifunction_node <https://uxlfoundation.github.io/oneAPI-spec/spec/elements/oneTBB/source/flow_graph/multifunc_node_cls.html>`_ \n* `async_node <https://uxlfoundation.github.io/oneAPI-spec/spec/elements/oneTBB/source/flow_graph/async_node_cls.html>`_ \n* `sequencer_node <https://uxlfoundation.github.io/oneAPI-spec/spec/elements/oneTBB/source/flow_graph/sequencer_node_cls.html>`_ \n* `join_node with key_matching policy <https://uxlfoundation.github.io/oneAPI-spec/spec/elements/oneTBB/source/flow_graph/join_node_cls.html>`_ \n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/title.rst",
    "content": ".. _title:\n\n|short_name| Developer Guide\n============================\n\n|full_name|\n\n.. toctree::\n   :maxdepth: 4\n\n   ../tbb_userguide/Package_Contents_os\n   ../tbb_userguide/Parallelizing_Simple_Loops_os\n   ../tbb_userguide/Parallelizing_Complex_Loops\n   ../tbb_userguide/Flow_Graph\n   ../tbb_userguide/work_isolation\n   ../tbb_userguide/Exceptions_and_Cancellation\n   ../tbb_userguide/Floating_Point_Settings\n   ../tbb_userguide/Containers\n   ../tbb_userguide/Mutual_Exclusion\n   ../tbb_userguide/Timing\n   ../tbb_userguide/Memory_Allocation\n   ../tbb_userguide/The_Task_Scheduler\n   ../tbb_userguide/design_patterns/Design_Patterns\n   ../tbb_userguide/Migration_Guide\n   ../tbb_userguide/Constraints\n   ../tbb_userguide/std_invoke\n   ../tbb_userguide/appendix_A\n   ../tbb_userguide/appendix_B\n   ../tbb_userguide/References\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/use_concurrency_limits.rst",
    "content": ".. _use_concurrency_limits:\n\nUse Concurrency Limits\n======================\n\n\nTo control the number of instances of a single node, you can use the\nconcurrency limit on the node. To cause it to reject messages after it\nreaches its concurrency limit, you construct it as a \"rejecting\" node.\n\n\nA function node is constructed with one or more template arguments. The\nthird argument controls the buffer policy used by the node, and is by\ndefault queueing. With a queueing policy, a ``function_node`` that has\nreached its concurrency limit still accepts incoming messages, but\nbuffers them internally. If the policy is set to rejecting the node will\ninstead reject the incoming messages.\n\n\n::\n\n\n   template < typename Input,\n              typename Output = continue_msg,\n              graph_buffer_policy = queueing >\n   class function_node;\n\n\nFor example, you can control the number of big objects in flight in a\ngraph by placing a rejecting function_node downstream of an ``input_node``,\nas is done below:\n\n\n::\n\n\n     graph g;\n\n\n     int src_count = 0;\n     int number_of_objects = 0;\n     int max_objects = 3;\n\n\n     input_node< big_object * > s( g, [&]( oneapi::tbb::flow_control& fc ) -> big_object* {\n         if ( src_count < M ) {\n           big_object* v = new big_object();\n           ++src_count;\n           return v;\n         } else {\n           fc.stop();\n           return nullptr;\n         }\n     } );\n     s.activate();\n\n     function_node< big_object *, continue_msg, rejecting > f( g, 3, \n         []( big_object *v ) -> continue_msg {\n         spin_for(1);\n            delete v;\n         return continue_msg();\n     } );\n\n\n     make_edge( s, f );\n     g.wait_for_all();\n\n\nThe ``function_node`` will operate on at most three big objects\nconcurrently. The node's concurrency threshold that limits the node to\nthree concurrent invocations. When the ``function_node`` is running three\ninstances concurrently, it will start rejecting incoming messages from\nthe ``input_node``, causing the ``input_node`` to buffer its last created\nobject and temporarily stop invoking its body object. Whenever the\n``function_node`` drops below its concurrency limit, it will pull new\nmessages from the ``input_node``. At most four big objects will exist\nsimultaneously, three in the ``function_node`` and one buffered in the\n``input_node``.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/use_graph_reset.rst",
    "content": ".. _use_graph_reset:\n\nUse ``graph::reset()`` to Reset a Canceled Graph\n================================================\n\n\nWhen a graph execution is canceled either because of an unhandled\nexception or because its ``task_group_context`` is canceled explicitly, the\ngraph and its nodes may be left in an indeterminate state. For example,\nin the code samples shown in :ref:`cancel_a_graph` the input 2 may be\nleft in a buffer. But even beyond remnants in the buffers, there are\nother optimizations performed during the execution of a flow graph that\ncan leave its nodes and edges in an indeterminate state. If you want to\nre-execute or restart a graph, you first need to reset the graph:\n\n\n::\n\n\n     try {\n         g.wait_for_all();\n     } catch ( int j ) {\n         cout << \"Caught \" << j << \"\\n\";\n         // do something to fix the problem\n         g.reset();\n         f1.try_put(1);\n         f1.try_put(2);\n         g.wait_for_all();\n     }\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/use_input_node.rst",
    "content": ".. _use_input_node:\n\nUsing input_node\n=================\n\n\nBy default, an ``input_node`` is constructed in the inactive state:\n\n\n::\n\n\n   template< typename Body > input_node( graph &g, Body body, bool is_active=true )\n\n\nTo activate an inactive ``input_node``, you call the node's function\nactivate:\n\n\n::\n\n\n       input_node< int > src( g, src_body(10), false );\n       // use it in calls to make_edge…\n       src.activate();\n\n\nAll ``input_node`` objects are constructed in the inactive state and usually\nactivated after the entire flow graph is constructed.\n\n\nFor example, you can use the code in :ref:`Data_Flow_Graph`. In that implementation,\nthe ``input_node`` is constructed in the inactive state and activated after\nall other edges are made:\n\n\n::\n\n\n         make_edge( squarer, summer );\n         make_edge( cuber, summer );\n         input_node< int > src( g, src_body(10), false );\n         make_edge( src, squarer );\n         make_edge( src, cuber );\n         src.activate();\n         g.wait_for_all();\n\n\nIn this example, if the ``input_node`` was toggled to the active state at the beginning,\nit might send a message to squarer immediately after the edge to\nsquarer is connected. Later, when the edge to cuber is connected, cuber\nwill receive all future messages, but may have already missed some.\n\n\nIn general it is safest to create your ``input_node`` objects in the inactive\nstate and then activate them after the whole graph is constructed.\nHowever, this approach serializes graph construction and graph\nexecution.\n\n\nSome graphs can be constructed safely with ``input_node`` active, allowing\nthe overlap of construction and execution. If your graph is a directed\nacyclic graph (DAG), and each ``input_node`` has only one successor, you\ncan activate your ``input_node`` just after their construction if you construct the\nedges in reverse topological order; that is, make the edges at the\nlargest depth in the tree first, and work back to the shallowest edges.\nFor example, if src is an ``input_node`` and ``func1`` and ``func2`` are both\nfunction nodes, the following graph would not drop messages, even though\nsrc is activated just after its construction:\n\n\n::\n\n\n       const int limit = 10;\n       int count = 0;\n       graph g;\n       oneapi::tbb::flow::graph g;\n       oneapi::tbb::flow::input_node<int> src( g, [&]( oneapi::tbb::flow_control &fc ) -> int {\n         if ( count < limit ) {\n           return ++count;\n         }\n         fc.stop();\n         return {};\n       });\n       src.activate();\n\n       oneapi::tbb::flow::function_node<int,int> func1( g, 1, []( int i ) -> int {\n         std::cout << i << \"\\n\";\n         return i;\n       } );\n       oneapi::tbb::flow::function_node<int,int> func2( g, 1, []( int i ) -> int {\n         std::cout << i << \"\\n\";\n         return i;\n       } );\n\n\n       make_edge( func1, func2 );\n       make_edge( src, func1 );\n\n\n       g.wait_for_all();\n\n\nThe above code is safe because the edge from ``func1`` to ``func2`` is made\nbefore the edge from src to ``func1``. If the edge from src to func1 were\nmade first, ``func1`` might generate a message before ``func2`` is attached to\nit; that message would be dropped. Also, src has only a single\nsuccessor. If src had more than one successor, the successor that is\nattached first might receive messages that do not reach the successors\nthat are attached after it.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/use_limiter_node.rst",
    "content": ".. _use_limiter_node:\n\nUsing limiter_node\n==================\n\n\nOne way to limit resource consumption is to use a limiter_node to set a\nlimit on the number of messages that can flow through a given point in\nyour graph. The constructor for a limiter node takes two arguments:\n\n\n::\n\n\n   limiter_node( graph &g, size_t threshold )\n\n\nThe first argument is a reference to the graph it belongs to. The second\nargument sets the maximum number of items that should be allowed to pass\nthrough before the node starts rejecting incoming messages.\n\n\nA limiter_node maintains an internal count of the messages that it has\nallowed to pass. When a message leaves the controlled part of the graph,\na message can be sent to the decrement port on the ``limiter_node`` to\ndecrement the count, allowing additional messages to pass through. In\nthe example below, an ``input_node`` will generate ``M`` big objects. But the\nuser wants to allow at most three big objects to reach the ``function_node``\nat a time, and to prevent the ``input_node`` from generating all ``M`` big\nobjects at once.\n\n\n::\n\n\n     graph g;\n\n\n     int src_count = 0;\n     int number_of_objects = 0;\n     int max_objects = 3;\n\n\n     input_node< big_object * > s( g, [&]( oneapi::tbb::flow_control& fc ) -> big_object* {\n         if ( src_count < M ) {\n           big_object* v = new big_object();\n           ++src_count;\n           return v;\n         } else {\n           fc.stop();\n           return nullptr;\n         }\n     } );\n     s.activate();\n\n     limiter_node< big_object * > l( g, max_objects );\n\n\n     function_node< big_object *, continue_msg > f( g, unlimited, \n       []( big_object *v ) -> continue_msg {\n         spin_for(1);\n         delete v;\n         return continue_msg();\n     } );\n\n\n\n\n     make_edge( l, f );\n     make_edge( f, l.decrement );\n     make_edge( s, l );\n     g.wait_for_all();\n\n\nThe example above prevents the ``input_node`` from generating all ``M`` big\nobjects at once. The ``limiter_node`` has a threshold of 3, and will\ntherefore start rejecting incoming messages after its internal count\nreaches 3. When the ``input_node`` sees its message rejected, it stops\ncalling its body object and temporarily buffers the last generated\nvalue. The ``function_node`` has its output, a ``continue_msg``, sent to the\ndecrement port of the ``limiter_node``. So, after it completes executing,\nthe ``limiter_node`` internal count is decremented. When the internal count\ndrops below the threshold, messages begin flowing from the ``input_node``\nagain. So in this example, at most four big objects exist at a time, the\nthree that have passed through the ``limiter_node`` and the one that is\nbuffered in the ``input_node``.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/use_make_edge.rst",
    "content": ".. _use_make_edge:\n\nUse make_edge and remove_edge\n=============================\n\n\nThese are the basic guidelines for creating and removing edges:\n\n\n-  Use ``make_edge`` and ``remove_edge``\n\n\n-  Avoid using ``register_successor`` and ``register_predecessor``\n\n\n-  Avoid using ``remove_successor`` and ``remove_predecessor``\n\n\nAs a convention, to communicate the topology, use only functions\n``flow::make_edge`` and ``flow::remove_edge``. The runtime library uses node\nfunctions, such as ``sender<T>::register_successor``, to create these edges,\nbut those functions should not be called directly. The runtime library\ncalls these node functions directly to implement optimizations on the\ntopology at runtime.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/use_nested_algorithms.rst",
    "content": ".. _use_nested_algorithms:\n\nUse Nested Algorithms to Increase Scalability\n=============================================\n\n\nOne powerful way to increase the scalability of a flow graph is to nest\nother parallel algorithms inside of node bodies. Doing so, you can use a\nflow graph as a coordination language, expressing the most\ncoarse-grained parallelism at the level of the graph, with finer grained\nparallelism nested within.\n\n\nIn the example below, five nodes are created: an ``input_node``,\n``matrix_source``, that reads a sequence of matrices from a file, two\n``function_nodes``, ``n1`` and ``n2``, that receive these matrices and generate two\nnew matrices by applying a function to each element, and two final\n``function_nodes``, ``n1_sink`` and ``n2_sink``, that process these resulting\nmatrices. The ``matrix_source`` is connected to both ``n1`` and ``n2``. The node ``n1``\nis connected to ``n1_sink``, and ``n2`` is connected to ``n2_sink``. In the lambda\nexpressions for ``n1`` and ``n2``, a ``parallel_for`` is used to apply the functions\nto the elements of the matrix in parallel. The functions\n``read_next_matrix``, ``f1``, ``f2``, ``consume_f1`` and ``consume_f2`` are not provided\nbelow.\n\n\n::\n\n\n       graph g;\n       input_node< double * > matrix_source( g, [&]( oneapi::tbb::flow_control &fc ) -> double* {\n         double *a = read_next_matrix();\n         if ( a ) {\n           return a;\n         } else {\n           fc.stop();\n           return nullptr;\n         }\n       } );\n       function_node< double *, double * > n1( g, unlimited, [&]( double *a ) -> double * {\n         double *b = new double[N];\n         parallel_for( 0, N, [&](int i) {\n           b[i] = f1(a[i]);\n         } );\n         return b;\n       } );\n       function_node< double *, double * > n2( g, unlimited, [&]( double *a ) -> double * {\n         double *b = new double[N];\n         parallel_for( 0, N, [&](int i) {\n           b[i] = f2(a[i]);\n         } );\n         return b;\n       } );\n       function_node< double *, double * > n1_sink( g, unlimited, \n         []( double *b ) -> double * {\n           return consume_f1(b);\n       } );\n       function_node< double *, double * > n2_sink( g, unlimited, \n         []( double *b ) -> double * {\n           return consume_f2(b);\n       } );\n       make_edge( matrix_source, n1 );\n       make_edge( matrix_source, n2 );\n       make_edge( n1, n1_sink );\n       make_edge( n2, n2_sink );\n       matrix_source.activate();\n       g.wait_for_all();\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/use_nested_flow_graphs.rst",
    "content": ".. _use_nested_flow_graphs:\n\nUse Nested Flow Graphs\n======================\n\n\nIn addition to nesting algorithms within a flow graph node, it is also\npossible to nest flow graphs. For example, below there is a graph ``g`` with\ntwo nodes, ``a`` and ``b``. When node ``a`` receives a message, it constructs and\nexecutes an inner dependence graph. When node ``b`` receives a message, it\nconstructs and executes an inner data flow graph:\n\n\n::\n\n\n     graph g;\n       function_node< int, int > a( g, unlimited, []( int i ) -> int {\n           graph h;\n           node_t n1( h, [=]( msg_t ) { cout << \"n1: \" << i << \"\\n\"; } );\n           node_t n2( h, [=]( msg_t ) { cout << \"n2: \" << i << \"\\n\"; } );\n           node_t n3( h, [=]( msg_t ) { cout << \"n3: \" << i << \"\\n\"; } );\n           node_t n4( h, [=]( msg_t ) { cout << \"n4: \" << i << \"\\n\"; } );\n           make_edge( n1, n2 );\n           make_edge( n1, n3 );\n           make_edge( n2, n4 );\n           make_edge( n3, n4 );\n           n1.try_put(continue_msg());\n           h.wait_for_all();\n           return i;\n       } );\n       function_node< int, int > b( g, unlimited, []( int i ) -> int {\n           graph h;\n           function_node< int, int > m1( h, unlimited, []( int j ) -> int {\n               cout << \"m1: \" << j << \"\\n\";\n               return j;\n           } );\n           function_node< int, int > m2( h, unlimited, []( int j ) -> int {\n               cout << \"m2: \" << j << \"\\n\";\n               return j;\n           } );\n           function_node< int, int > m3( h, unlimited, []( int j ) -> int {\n               cout << \"m3: \" << j << \"\\n\";\n               return j;\n           } );\n           function_node< int, int > m4( h, unlimited, []( int j ) -> int {\n               cout << \"m4: \" << j << \"\\n\";\n               return j;\n           } );\n           make_edge( m1, m2 );\n           make_edge( m1, m3 );\n           make_edge( m2, m4 );\n           make_edge( m3, m4 );\n           m1.try_put(i);\n           h.wait_for_all();\n           return i;\n       } );\n       make_edge( a, b );\n       for ( int i = 0; i < 3; ++i ) {\n           a.try_put(i);\n       }\n       g.wait_for_all();\n\n\nIf the nested graph remains unchanged in structure between invocations\nof the node, it is redundant to construct it each time. Reconstructing\nthe graph only adds overhead to the execution. You can modify the\nexample above, for example, to have node ``b`` reuse a graph that is\npersistent across its invocations:\n\n\n::\n\n\n     graph h;\n       function_node< int, int > m1( h, unlimited, []( int j ) -> int {\n           cout << \"m1: \" << j << \"\\n\";\n           return j;\n       } );\n       function_node< int, int > m2( h, unlimited, []( int j ) -> int {\n           cout << \"m2: \" << j << \"\\n\";\n           return j;\n       } );\n       function_node< int, int > m3( h, unlimited, []( int j ) -> int {\n           cout << \"m3: \" << j << \"\\n\";\n           return j;\n       } );\n       function_node< int, int > m4( h, unlimited, []( int j ) -> int {\n           cout << \"m4: \" << j << \"\\n\";\n           return j;\n       } );\n       make_edge( m1, m2 );\n       make_edge( m1, m3 );\n       make_edge( m2, m4 );\n       make_edge( m3, m4 );\n\n\n       graph g;\n       function_node< int, int > a( g, unlimited, []( int i ) -> int {\n           graph h;\n           node_t n1( h, [=]( msg_t ) { cout << \"n1: \" << i << \"\\n\"; } );\n           node_t n2( h, [=]( msg_t ) { cout << \"n2: \" << i << \"\\n\"; } );\n           node_t n3( h, [=]( msg_t ) { cout << \"n3: \" << i << \"\\n\"; } );\n           node_t n4( h, [=]( msg_t ) { cout << \"n4: \" << i << \"\\n\"; } );\n           make_edge( n1, n2 );\n           make_edge( n1, n3 );\n           make_edge( n2, n4 );\n           make_edge( n3, n4 );\n           n1.try_put(continue_msg());\n           h.wait_for_all();\n           return i;\n       } );\n       function_node< int, int > b( g, unlimited, [&]( int i ) -> int {\n           m1.try_put(i);\n           h.wait_for_all(); // optional since h is not destroyed\n           return i;\n       } );\n       make_edge( a, b );\n       for ( int i = 0; i < 3; ++i ) {\n           a.try_put(i);\n       }\n       g.wait_for_all();\n\n\nIt is only necessary to call ``h.wait_for_all()`` at the end of each\ninvocation of ``b``'s body in our modified code, if you wish for this ``b``'s\nbody to block until the inner graph is done. In the first implementation\nof ``b``, it was necessary to call ``h.wait_for_all`` at the end of each\ninvocation since the graph was destroyed at the end of the scope. So it\nwould be valid in the body of ``b`` above to call ``m1.try_put(i)`` and then\nreturn without waiting for ``h`` to become idle.\n\n"
  },
  {
    "path": "third-party/tbb/doc/main/tbb_userguide/work_isolation.rst",
    "content": ".. _work_isolation:\n\nWork Isolation\n==============\n\n\n.. container:: section\n\n\n   In |full_name|, a thread waiting for a\n   group of tasks to complete might execute other available tasks. In\n   particular, when a parallel construct calls another parallel\n   construct, a thread can obtain a task from the outer-level construct\n   while waiting for completion of the inner-level one.\n\n\n   In the following example with two ``parallel_for`` calls, the call to\n   the second (nested) parallel loop blocks execution of the first\n   (outer) loop iteration:\n\n\n   ::\n\n\n      // The first parallel loop.\n      oneapi::tbb::parallel_for( 0, N1, []( int i ) { \n          // The second parallel loop.\n          oneapi::tbb::parallel_for( 0, N2, []( int j ) { /* Some work */ } );\n      } );\n\n\n   The blocked thread is allowed to take tasks belonging to the first\n   parallel loop. As a result, two or more iterations of the outer loop\n   might be simultaneously assigned to the same thread. In other words,\n   in oneTBB execution of functions constituting a parallel construct is\n   *unsequenced* even within a single thread. In most cases, this\n   behavior is harmless or even beneficial because it does not restrict\n   parallelism available for the thread.\n\n\n   However, in some cases such unsequenced execution may result in\n   errors. For example, a thread-local variable might unexpectedly\n   change its value after a nested parallel construct:\n\n\n   ::\n\n\n      oneapi::tbb::enumerable_thread_specific<int> ets;\n      oneapi::tbb::parallel_for( 0, N1, [&ets]( int i ) {\n          // Set a thread specific value\n          ets.local() = i;\n          oneapi::tbb::parallel_for( 0, N2, []( int j ) { /* Some work */ } );\n          // While executing the above parallel_for, the thread might have run iterations\n          // of the outer parallel_for, and so might have changed the thread specific value.\n          assert( ets.local()==i ); // The assertion may fail!\n      } );\n\n\n   In other scenarios, the described behavior might lead to deadlocks\n   and other issues. In these cases, a stronger guarantee of execution\n   being sequenced within a thread is desired. For that, oneTBB provides\n   ways to *isolate* execution of a parallel construct, for its tasks to\n   not interfere with other simultaneously running tasks.\n\n\n   One of these ways is to execute the inner level loop in a separate\n   ``task_arena``:\n\n\n   ::\n\n\n      oneapi::tbb::enumerable_thread_specific<int> ets;\n      oneapi::tbb::task_arena nested;\n      oneapi::tbb::parallel_for( 0, N1, [&]( int i ) {\n          // Set a thread specific value\n          ets.local() = i;\n          nested.execute( []{\n              // Run the inner parallel_for in a separate arena to prevent the thread\n              // from taking tasks of the outer parallel_for.\n              oneapi::tbb::parallel_for( 0, N2, []( int j ) { /* Some work */ } );\n          } );\n          assert( ets.local()==i ); // Valid assertion\n      } );\n\n\n   However, using a separate arena for work isolation is not always\n   convenient, and might have noticeable overheads. To address these\n   shortcomings, oneTBB provides ``this_task_arena::isolate`` function\n   which runs a user-provided functor in isolation by restricting the\n   calling thread to process only tasks scheduled in the scope of the\n   functor (also called the isolation region).\n\n\n   When entered a task waiting call or a blocking parallel construct\n   inside an isolated region, a thread can only execute tasks spawned\n   within the region and their child tasks spawned by other threads. The\n   thread is prohibited from executing any outer level tasks or tasks\n   belonging to other isolated regions.\n\n\n   The isolation region imposes restrictions only upon the thread that\n   called it. Other threads running in the same task arena have no\n   restrictions on task selection unless isolated by a distinct call to\n   ``this_task_arena::isolate``.\n\n\n   The following example demonstrates the use of\n   ``this_task_arena::isolate`` to ensure that a thread-local variable\n   is not changed unexpectedly during the call to a nested parallel\n   construct.\n\n\n   ::\n\n\n      #include \"oneapi/tbb/task_arena.h\"\n      #include \"oneapi/tbb/parallel_for.h\"\n      #include \"oneapi/tbb/enumerable_thread_specific.h\"\n      #include <cassert>\n\n\n      int main() {\n          const int N1 = 1000, N2 = 1000;\n          oneapi::tbb::enumerable_thread_specific<int> ets;\n          oneapi::tbb::parallel_for( 0, N1, [&ets]( int i ) {\n              // Set a thread specific value\n              ets.local() = i;\n              // Run the second parallel loop in an isolated region to prevent the current thread\n              // from taking tasks related to the outer parallel loop.\n              oneapi::tbb::this_task_arena::isolate( []{\n                  oneapi::tbb::parallel_for( 0, N2, []( int j ) { /* Some work */ } );\n              } );\n              assert( ets.local()==i ); // Valid assertion\n          } );\n          return 0;\n      }\n\n"
  },
  {
    "path": "third-party/tbb/doc/make.bat",
    "content": "@ECHO OFF\r\n\r\nrem ============================================================================\r\nrem Copyright (C) 2022 Intel Corporation\r\nrem\r\nrem Licensed under the Apache License, Version 2.0 (the \"License\");\r\nrem you may not use this file except in compliance with the License.\r\nrem You may obtain a copy of the License at\r\nrem\r\nrem     http://www.apache.org/licenses/LICENSE-2.0\r\nrem\r\nrem Unless required by applicable law or agreed to in writing, software\r\nrem distributed under the License is distributed on an \"AS IS\" BASIS,\r\nrem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\nrem See the License for the specific language governing permissions and\r\nrem limitations under the License.\r\nrem ============================================================================\r\n\r\n\r\n\r\npushd %~dp0\r\n\r\nREM Command file for Sphinx documentation\r\n\r\nif \"%SPHINXBUILD%\" == \"\" (\r\n\tset SPHINXBUILD=sphinx-build\r\n)\r\nset SOURCEDIR=.\r\nset BUILDDIR=build\r\n\r\nif \"%1\" == \"\" goto help\r\n\r\n%SPHINXBUILD% >NUL 2>NUL\r\nif errorlevel 9009 (\r\n\techo.\r\n\techo.The 'sphinx-build' command was not found. Make sure you have Sphinx\r\n\techo.installed, then set the SPHINXBUILD environment variable to point\r\n\techo.to the full path of the 'sphinx-build' executable. Alternatively you\r\n\techo.may add the Sphinx directory to PATH.\r\n\techo.\r\n\techo.If you don't have Sphinx installed, grab it from\r\n\techo.http://sphinx-doc.org/\r\n\texit /b 1\r\n)\r\n\r\n%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%\r\ngoto end\r\n\r\n:help\r\n%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%\r\n\r\n:end\r\npopd\r\n"
  },
  {
    "path": "third-party/tbb/doc/test_classification.dox",
    "content": "/// \\page test_classification Test classification\n/// The list of test classes attributed to test cases.\n///\n/// \\section interface \\\\\\#interface\n/// This class of tests covers interface availability and checks basic\n/// interface behavior.\n///\n/// \\section requirement \\\\\\#requirement\n/// This class of tests covers one or more statements in the\n/// specification document.\n///\n/// \\section negative \\\\\\#negative\n/// This class of tests checks that input specified as invalid is\n/// processed correctly. Additionally, this class of tests might\n/// check imposibility to call particular interfaces that are not\n/// described by the specification.\n///\n/// \\section resource_usage \\\\\\#resource usage\n/// This class of tests checks correct resource usage and absence of\n/// resource leaks.\n///\n/// \\section boundary \\\\\\#boundary\n/// This class of tests checks boundary values, possible overflows, etc.\n///\n/// \\section stress \\\\\\#stress\n/// This class of tests tries to detect synchronization and other issues\n/// under heavy load and extensive usage of the functionality.\n///\n/// \\section error_guessing \\\\\\#error guessing\n/// This class of tests tries to detect issues that implementation might\n/// have but these issues cannot be deduced from the specification.\n///\n/// \\section regression \\\\\\#regression\n/// This class of tests covers issues that were detected and fixed after\n/// functionality release.\n"
  },
  {
    "path": "third-party/tbb/examples/.clang-format",
    "content": "# Copyright (c) 2020-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n---\nLanguage: Cpp\nAccessModifierOffset: -4\nAlignAfterOpenBracket: Align\nAlignConsecutiveAssignments: false\nAlignConsecutiveDeclarations: false\nAlignConsecutiveMacros: true\nAlignEscapedNewlines: Left\nAlignOperands: true\nAlignTrailingComments: false\nAllowAllArgumentsOnNextLine: true\nAllowAllConstructorInitializersOnNextLine: false\nAllowAllParametersOfDeclarationOnNextLine: false\nAllowShortBlocksOnASingleLine: false\nAllowShortCaseLabelsOnASingleLine: true\nAllowShortFunctionsOnASingleLine: Empty\nAllowShortIfStatementsOnASingleLine: Never\nAllowShortLambdasOnASingleLine: Empty\nAllowShortLoopsOnASingleLine: false\nAlwaysBreakAfterDefinitionReturnType: None\nAlwaysBreakAfterReturnType: None\nAlwaysBreakBeforeMultilineStrings: false\nAlwaysBreakTemplateDeclarations: Yes\nBinPackArguments: false\nBinPackParameters: false\nBraceWrapping:\n  AfterCaseLabel: false\n  AfterClass: false\n  AfterControlStatement: false\n  AfterEnum: false\n  AfterFunction: false\n  AfterNamespace: false\n  AfterObjCDeclaration: false\n  AfterStruct: false\n  AfterUnion: false\n  AfterExternBlock: false\n  BeforeCatch: true\n  BeforeElse: true\n  IndentBraces: false\n  SplitEmptyFunction: false\n  SplitEmptyRecord: false\n  SplitEmptyNamespace: false\nBreakBeforeBinaryOperators: None\nBreakBeforeBraces: Custom\nBreakBeforeTernaryOperators: true\nBreakConstructorInitializers: BeforeColon\nBreakInheritanceList: BeforeColon\nBreakStringLiterals: false\nColumnLimit: 100\nCommentPragmas: '^ IWYU pragma:'\nCompactNamespaces: false\nConstructorInitializerAllOnOneLineOrOnePerLine: true\nConstructorInitializerIndentWidth: 8\nContinuationIndentWidth: 4\nCpp11BracedListStyle: false\nDerivePointerAlignment: true\nDisableFormat: false\nFixNamespaceComments: true\nForEachMacros:\n  - foreach\n  - Q_FOREACH\n  - BOOST_FOREACH\nIncludeBlocks: Preserve\nIncludeCategories:\n  - Regex:           '^<ext/.*\\.h>'\n    Priority:        2\n  - Regex:           '^<.*\\.h>'\n    Priority:        1\n  - Regex:           '^<.*'\n    Priority:        2\n  - Regex:           '.*'\n    Priority:        3\nIncludeIsMainRegex: '([-_](test|unittest))?$'\nIndentCaseLabels: true\nIndentPPDirectives: None\nIndentWidth: 4\nIndentWrappedFunctionNames: false\nKeepEmptyLinesAtTheStartOfBlocks: false\nMacroBlockBegin: ''\nMacroBlockEnd:   ''\nMaxEmptyLinesToKeep: 1\nNamespaceIndentation: None\nPenaltyBreakAssignment: 2\nPenaltyBreakBeforeFirstCallParameter: 1\nPenaltyBreakComment: 300\nPenaltyBreakFirstLessLess: 120\nPenaltyBreakString: 1000\nPenaltyBreakTemplateDeclaration: 10\nPenaltyExcessCharacter: 1000000\nPenaltyReturnTypeOnItsOwnLine: 200\nPointerAlignment: Left\nRawStringFormats:\n  - Language: Cpp\n    Delimiters:\n      - cc\n      - CC\n      - cpp\n      - Cpp\n      - CPP\n      - 'c++'\n      - 'C++'\n    CanonicalDelimiter: ''\n    BasedOnStyle: google\n  - Language: TextProto\n    Delimiters:\n      - pb\n      - PB\n      - proto\n      - PROTO\n    EnclosingFunctions:\n      - EqualsProto\n      - EquivToProto\n      - PARSE_PARTIAL_TEXT_PROTO\n      - PARSE_TEST_PROTO\n      - PARSE_TEXT_PROTO\n      - ParseTextOrDie\n      - ParseTextProtoOrDie\n    CanonicalDelimiter: ''\n    BasedOnStyle: google\nReflowComments: false\nSortIncludes: false\nSortUsingDeclarations: false\nSpaceAfterCStyleCast: false\nSpaceAfterLogicalNot: false\nSpaceAfterTemplateKeyword: true\nSpaceBeforeAssignmentOperators: true\nSpaceBeforeCpp11BracedList: false\nSpaceBeforeCtorInitializerColon: true\nSpaceBeforeInheritanceColon: true\nSpaceBeforeParens: ControlStatements\nSpaceBeforeRangeBasedForLoopColon: true\nSpaceInEmptyParentheses: false\nSpacesBeforeTrailingComments: 1\nSpacesInAngles: false\nSpacesInContainerLiterals: false\nSpacesInCStyleCastParentheses: false\nSpacesInParentheses: false\nSpacesInSquareBrackets: false\nStandard: Cpp11\nStatementMacros:\n  - Q_UNUSED\n  - QT_REQUIRE_VERSION\nTabWidth: 1\nUseTab: Never\n...\n"
  },
  {
    "path": "third-party/tbb/examples/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(tbb_examples CXX)\n\nadd_custom_target(build_examples)\nadd_custom_target(run_examples)\nadd_dependencies(run_examples build_examples)\n\nadd_custom_target(light_test_examples)\nadd_dependencies(light_test_examples build_examples)\n\nmacro(tbb_add_example subdir name)\n    add_subdirectory(${subdir}/${name})\n    add_dependencies(build_examples ${name})\n    add_dependencies(run_examples run_${name})\n    if (TARGET light_test_${name})\n        add_dependencies(light_test_examples light_test_${name})\n    else()\n        add_dependencies(light_test_examples run_${name})\n    endif()\nendmacro()\n\ntbb_add_example(concurrent_hash_map count_strings)\ntbb_add_example(concurrent_priority_queue shortpath)\n\ntbb_add_example(getting_started sub_string_finder)\n\ntbb_add_example(graph binpack)\n\n# TODO: Consider using FindMKL module\nfind_library(MKL_INTEL_LP64_LIB mkl_intel_lp64 PATHS ENV LIBRARY_PATH)\nfind_library(MKL_SEQUENTIAL_LIB mkl_sequential PATHS ENV LIBRARY_PATH)\nfind_library(MKL_CORE_LIB       mkl_core PATHS ENV LIBRARY_PATH)\nif(MKL_INTEL_LP64_LIB AND MKL_SEQUENTIAL_LIB AND MKL_CORE_LIB)\n    tbb_add_example(graph cholesky)\nelse()\n    message(WARNING \"Intel(R) Math Kernel Library (Intel(R) MKL) libraries were not found, graph/cholesky example is excluded from the build.\")\nendif()\n\ntbb_add_example(graph dining_philosophers)\ntbb_add_example(graph fgbzip2)\ntbb_add_example(graph logic_sim)\ntbb_add_example(graph som)\n\ntbb_add_example(parallel_for game_of_life)\ntbb_add_example(parallel_for polygon_overlay)\ntbb_add_example(parallel_for seismic)\ntbb_add_example(parallel_for tachyon)\n\ntbb_add_example(parallel_for_each parallel_preorder)\n\ntbb_add_example(parallel_pipeline square)\n\ntbb_add_example(parallel_reduce convex_hull)\ntbb_add_example(parallel_reduce pi)\ntbb_add_example(parallel_reduce primes)\n\ntbb_add_example(task_arena fractal)\n\ntbb_add_example(task_group sudoku)\n\ntbb_add_example(test_all fibonacci)\n\ntbb_add_example(migration recursive_fibonacci)\n"
  },
  {
    "path": "third-party/tbb/examples/README.md",
    "content": "# Code Samples of oneAPI Threading Building Blocks (oneTBB)\nThis directory contains example usages of oneAPI Threading Building Blocks.\n\n| Code sample name | Description\n|:--- |:---\n| getting_started/sub_string_finder | Example referenced by the [oneAPI Threading Building Blocks Get Started Guide](https://uxlfoundation.github.io/oneTBB/GSG/get_started.html#get-started-guide). Finds the largest matching substrings.\n| concurrent_hash_map/count_strings | Concurrently inserts strings into a `concurrent_hash_map` container.\n| concurrent_priority_queue/shortpath | Solves the single source shortest path problem using a  `concurrent_priority_queue` container.\n| graph/binpack | A solution to the binpacking problem using a `queue_node`, a `buffer_node`, and `function_node`s.\n| graph/cholesky | Several versions of Cholesky Factorization algorithm implementation.\n| graph/dining_philosophers | An implementation of dining philosophers in a graph using the reserving `join_node`.\n| graph/fgbzip2 | A parallel implementation of bzip2 block-sorting file compressor.\n| graph/logic_sim | An example of a collection of digital logic gates that can be easily composed into larger circuits.\n| graph/som | An example of a Kohonen Self-Organizing Map using cancellation.\n| parallel_for/game_of_life | Game of life overlay.\n| parallel_for/polygon_overlay | Polygon overlay.\n| parallel_for/seismic | Parallel seismic wave simulation.\n| parallel_for/tachyon | Parallel 2-D raytracer/renderer.\n| parallel_for_each/parallel_preorder | Parallel preorder traversal of a graph.\n| parallel_pipeline/square | Another string transformation example that squares numbers read from a file.\n| parallel_reduce/convex_hull | Parallel version of convex hull algorithm (quick hull).\n| parallel_reduce/pi | Parallel version of calculating &pi; by numerical integration.\n| parallel_reduce/primes | Parallel version of the Sieve of Eratosthenes.\n| task_arena/fractal |The example calculates two classical Mandelbrot fractals with different concurrency limits.\n| task_group/sudoku | Compute all solutions for a Sudoku board.\n| test_all/fibonacci | Compute Fibonacci numbers in different ways.\n\n## System Requirements\nRefer to the [System Requirements](https://github.com/uxlfoundation/oneTBB/blob/master/SYSTEM_REQUIREMENTS.md) for the list of supported hardware and software.\n\n### Graphical User Interface (GUI)\nSome examples (e.g., fractal, seismic, tachyon, polygon_overlay) support different GUI modes, which may be defined via the `EXAMPLES_UI_MODE` CMake variable. \nSupported values are:\n- Cross-platform:\n    - `con` - Console mode (Default).\n- Windows* OS:\n    - `gdi` - `GDI+` based implementation.\n    - `d2d` - `Direct 2D` based implementation. May offer superior performance but can only be used if the Microsoft* DirectX* SDK is installed on your system(`DXSDK_DIR` should be defined).\n- Linux* OS:\n    - `x` - `X11` based implementation. Also `libXext` may be required to display the output correctly.\n- macOS*:\n    - `mac` - `OpenGL` based implementation. Also requires the `Foundation` and `Cocoa` libraries availability.\n"
  },
  {
    "path": "third-party/tbb/examples/common/cmake/common.cmake",
    "content": "# Copyright (c) 2020-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nmacro(set_common_project_settings required_components)\n    # Path to common headers\n    include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../)\n\n    if (NOT TARGET TBB::tbb)\n        list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../common/cmake/modules)\n        find_package(TBB REQUIRED COMPONENTS ${required_components})\n    endif()\n    find_package(Threads REQUIRED)\n\n    # ---------------------------------------------------------------------------------------------------------\n    # Handle C++ standard version.\n    if (NOT MSVC)  # no need to cover MSVC as it uses C++14 by default.\n        if (NOT CMAKE_CXX_STANDARD)\n            set(CMAKE_CXX_STANDARD 11)\n        endif()\n        if (CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION)  # if standard option was detected by CMake\n            set(CMAKE_CXX_STANDARD_REQUIRED ON)\n        endif()\n    endif()\n\n    set(CMAKE_CXX_EXTENSIONS OFF) # use -std=c++... instead of -std=gnu++...\n    # ---------------------------------------------------------------------------------------------------------\nendmacro()\n\nmacro(add_execution_target TARGET_NAME TARGET_DEPENDENCIES EXECUTABLE ARGS)\n    if (WIN32)\n        add_custom_target(${TARGET_NAME} set \"PATH=$<TARGET_FILE_DIR:TBB::tbb>\\\\;$ENV{PATH}\" & ${EXECUTABLE} ${ARGS})\n    else()\n        add_custom_target(${TARGET_NAME} ${EXECUTABLE} ${ARGS})\n    endif()\n\n    add_dependencies(${TARGET_NAME} ${TARGET_DEPENDENCIES})\nendmacro()\n"
  },
  {
    "path": "third-party/tbb/examples/common/cmake/modules/FindTBB.cmake",
    "content": "# Copyright (c) 2020-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ninclude(FindPackageHandleStandardArgs)\n\n# Firstly search for TBB in config mode (i.e. search for TBBConfig.cmake).\nfind_package(TBB QUIET CONFIG)\nif (TBB_FOUND)\n    find_package_handle_standard_args(TBB CONFIG_MODE)\n    return()\nendif()\n\nif (NOT TBB_FIND_COMPONENTS)\n    set(TBB_FIND_COMPONENTS tbb tbbmalloc)\n    foreach (_tbb_component ${TBB_FIND_COMPONENTS})\n        set(TBB_FIND_REQUIRED_${_tbb_component} 1)\n    endforeach()\nendif()\n\nif (WIN32)\n    list(APPEND ADDITIONAL_LIB_DIRS ENV PATH ENV LIB)\n    list(APPEND ADDITIONAL_INCLUDE_DIRS ENV INCLUDE ENV CPATH)\nelse()\n    list(APPEND ADDITIONAL_LIB_DIRS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH ENV DYLD_LIBRARY_PATH)\n    list(APPEND ADDITIONAL_INCLUDE_DIRS ENV CPATH ENV C_INCLUDE_PATH ENV CPLUS_INCLUDE_PATH ENV INCLUDE_PATH)\nendif()\n\nfind_path(_tbb_include_dir NAMES tbb/tbb.h PATHS ${ADDITIONAL_INCLUDE_DIRS})\n\nif (_tbb_include_dir)\n    # TODO: consider TBB_VERSION handling\n    set(_TBB_BUILD_MODES RELEASE DEBUG)\n    set(_TBB_DEBUG_SUFFIX _debug)\n\n    foreach (_tbb_component ${TBB_FIND_COMPONENTS})\n        if (NOT TARGET TBB::${_tbb_component})\n            add_library(TBB::${_tbb_component} SHARED IMPORTED)\n            set_property(TARGET TBB::${_tbb_component} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_tbb_include_dir})\n\n            foreach(_TBB_BUILD_MODE ${_TBB_BUILD_MODES})\n                set(_tbb_component_lib_name ${_tbb_component}${_TBB_${_TBB_BUILD_MODE}_SUFFIX})\n                if (WIN32)\n                    find_library(${_tbb_component_lib_name}_lib ${_tbb_component_lib_name} PATHS ${ADDITIONAL_LIB_DIRS})\n                    find_file(${_tbb_component_lib_name}_dll ${_tbb_component_lib_name}.dll PATHS ${ADDITIONAL_LIB_DIRS})\n\n                    set_target_properties(TBB::${_tbb_component} PROPERTIES\n                                          IMPORTED_LOCATION_${_TBB_BUILD_MODE} \"${${_tbb_component_lib_name}_dll}\"\n                                          IMPORTED_IMPLIB_${_TBB_BUILD_MODE}   \"${${_tbb_component_lib_name}_lib}\"\n                                          )\n                else()\n                    find_library(${_tbb_component_lib_name}_so ${_tbb_component_lib_name} PATHS ${ADDITIONAL_LIB_DIRS})\n\n                    set_target_properties(TBB::${_tbb_component} PROPERTIES\n                                          IMPORTED_LOCATION_${_TBB_BUILD_MODE} \"${${_tbb_component_lib_name}_so}\"\n                                          )\n                endif()\n                if (${_tbb_component_lib_name}_lib AND ${_tbb_component_lib_name}_dll OR ${_tbb_component_lib_name}_so)\n                    set_property(TARGET TBB::${_tbb_component} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${_TBB_BUILD_MODE})\n                    list(APPEND TBB_IMPORTED_TARGETS TBB::${_tbb_component})\n                    set(TBB_${_tbb_component}_FOUND 1)\n                endif()\n                unset(${_tbb_component_lib_name}_lib CACHE)\n                unset(${_tbb_component_lib_name}_dll CACHE)\n                unset(${_tbb_component_lib_name}_so CACHE)\n                unset(_tbb_component_lib_name)\n            endforeach()\n        endif()\n    endforeach()\n    unset(_TBB_BUILD_MODESS)\n    unset(_TBB_DEBUG_SUFFIX)\nendif()\nunset(_tbb_include_dir CACHE)\n\nlist(REMOVE_DUPLICATES TBB_IMPORTED_TARGETS)\n\nfind_package_handle_standard_args(TBB\n                                  REQUIRED_VARS TBB_IMPORTED_TARGETS\n                                  HANDLE_COMPONENTS)\n"
  },
  {
    "path": "third-party/tbb/examples/common/gui/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nset(EXAMPLES_UI_MODE \"con\" CACHE STRING \"EXAMPLES_UI_MODE\")\n\nif (WIN32)\n    set_property(CACHE EXAMPLES_UI_MODE PROPERTY STRINGS \"con\" \"gdi\" \"d2d\")\nelseif (APPLE)\n    set_property(CACHE EXAMPLES_UI_MODE PROPERTY STRINGS \"con\" \"mac\")\nelse()\n    set_property(CACHE EXAMPLES_UI_MODE PROPERTY STRINGS \"con\" \"x\")\nendif()\n\nget_property(_available_ui_modes CACHE EXAMPLES_UI_MODE PROPERTY STRINGS)\n\nlist(FIND _available_ui_modes ${EXAMPLES_UI_MODE} _find_index)\nif  (NOT _find_index EQUAL -1)\n    add_library(UI_LIB_${PROJECT_NAME} STATIC ${CMAKE_CURRENT_LIST_DIR}/${EXAMPLES_UI_MODE}video.cpp)\n\n    if (EXAMPLES_UI_MODE STREQUAL \"mac\")\n        enable_language(C)\n        add_library(UI_LIB_OBJECT_${PROJECT_NAME} OBJECT  \n            ${CMAKE_CURRENT_LIST_DIR}/xcode/tbbExample/main.m \n            ${CMAKE_CURRENT_LIST_DIR}/xcode/tbbExample/OpenGLView.m \n            ${CMAKE_CURRENT_LIST_DIR}/xcode/tbbExample/tbbAppDelegate.m\n        )\n        target_sources(UI_LIB_${PROJECT_NAME} PUBLIC $<TARGET_OBJECTS:UI_LIB_OBJECT_${PROJECT_NAME}>)\n    endif()\nelse()\n    string(REPLACE \";\" \", \" _available_ui_modes \"${_available_ui_modes}\")\n    message(FATAL_ERROR\n        \"Selected UI mode (${EXAMPLES_UI_MODE}) is not supported on ${CMAKE_SYSTEM_NAME}. \n        Supported UI modes: ${_available_ui_modes}\"\n    )\nendif()\n\nmacro(set_gdi_ui_project_settings)\n    find_program(RC rc REQUIRED)\n    add_custom_command(TARGET UI_LIB_${PROJECT_NAME} PRE_BUILD COMMAND\n        ${RC} /r -fo ${PROJECT_BINARY_DIR}/${PROJECT_NAME}.res ${PROJECT_SOURCE_DIR}/gui/${PROJECT_NAME}.rc\n    )\n\n    set_target_properties(${PROJECT_NAME} PROPERTIES WIN32_EXECUTABLE TRUE)\n    if (COMMAND target_link_options)\n        target_link_options(UI_LIB_${PROJECT_NAME} PUBLIC ${PROJECT_BINARY_DIR}/${PROJECT_NAME}.res)\n    else()\n        set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS ${PROJECT_BINARY_DIR}/${PROJECT_NAME}.res)\n    endif()\nendmacro()\n\nmacro(set_d2d_ui_project_settings)\n    set_gdi_ui_project_settings()\n\n    if (IS_DIRECTORY $ENV{DXSDK_DIR})\n        target_include_directories(UI_LIB_${PROJECT_NAME} PUBLIC $ENV{DXSDK_DIR}\\\\include)\n        target_link_directories(UI_LIB_${PROJECT_NAME} PUBLIC $ENV{DXSDK_DIR}\\\\lib\\\\x64)\n    else()\n        message(FATAL_ERROR \"Cannot find the DirectX library (required by the 'd2d' UI mode)\")\n    endif()\nendmacro()\n\nmacro(set_x_ui_project_settings)\n    find_package(X11 REQUIRED)\n    target_link_libraries(UI_LIB_${PROJECT_NAME} PUBLIC  ${X11_LIBRARIES})\n    target_include_directories(UI_LIB_${PROJECT_NAME} PUBLIC ${X11_INCLUDE_DIR})\n\n    find_library(LIB_Xext Xext PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH ENV DYLD_LIBRARY_PATH)\n    if (LIB_Xext)\n        target_link_libraries(UI_LIB_${PROJECT_NAME} PUBLIC  ${LIB_Xext})\n    else()\n        target_compile_definitions(UI_LIB_${PROJECT_NAME} PUBLIC -DX_NOSHMEM)\n    endif()\nendmacro()\n\nmacro(set_mac_ui_project_settings)\n    find_package(OpenGL REQUIRED)\n\n    find_library(FOUNDATION_LIBRARY Foundation PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH ENV DYLD_LIBRARY_PATH)\n    if (NOT FOUNDATION_LIBRARY)\n        message(FATAL_ERROR \"Cannot find the Foundation library (required by the 'mac' UI mode)\")\n    endif()\n\n    find_library(COCOA_LIBRARY Cocoa PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH ENV DYLD_LIBRARY_PATH)\n    if (NOT COCOA_LIBRARY)\n        message(FATAL_ERROR \"Cannot find the Cocoa library (required by the 'mac' UI mode)\")\n    endif()\n\n    target_link_libraries(UI_LIB_${PROJECT_NAME} PUBLIC ${OPENGL_LIBRARIES} ${FOUNDATION_LIBRARY} ${COCOA_LIBRARY})\n    target_include_directories(UI_LIB_${PROJECT_NAME} PUBLIC ${OPENGL_INCLUDE_DIR})\n\n    file(MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/MacUI/${PROJECT_NAME}.app/Contents/Resources)\n    file(MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/MacUI/${PROJECT_NAME}.app/Contents/MacOS)\n\n    file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/../../common/gui/xcode/tbbExample/PkgInfo DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/MacUI/${PROJECT_NAME}.app/Contents)\n    file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/../../common/gui/xcode/tbbExample/en.lproj DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/MacUI/${PROJECT_NAME}.app/Contents/Resources)\n    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../common/gui/xcode/tbbExample/tbbExample-Info.plist ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/MacUI/${PROJECT_NAME}.app/Contents/Info.plist COPYONLY)\n\n    set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX \"MacUI/${PROJECT_NAME}.app/Contents/MacOS/\")\nendmacro()\n\nif  (NOT _find_index EQUAL -1)\n    if (\"${EXAMPLES_UI_MODE}\" STREQUAL \"gdi\")\n        set_gdi_ui_project_settings()\n    elseif (\"${EXAMPLES_UI_MODE}\" STREQUAL \"d2d\")\n        set_d2d_ui_project_settings()\n    elseif (\"${EXAMPLES_UI_MODE}\" STREQUAL \"mac\")\n        set_mac_ui_project_settings()\n    elseif (\"${EXAMPLES_UI_MODE}\" STREQUAL \"x\")\n        set_x_ui_project_settings()\n    endif()\n    target_compile_options(UI_LIB_${PROJECT_NAME} PRIVATE ${TBB_CXX_STD_FLAG})\nendif()\n\nunset(_available_ui_modes)\nunset(_find_index)\n"
  },
  {
    "path": "third-party/tbb/examples/common/gui/convideo.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <cassert>\n#include <stdio.h>\n\n#include \"video.hpp\"\n\nunsigned int *g_pImg = nullptr;\nint g_sizex, g_sizey;\nstatic video *g_video = nullptr;\nstatic int g_fps = 0;\n\n#if _WIN32 || _WIN64\n\nstatic DWORD g_msec = 0;\n\n#ifdef _WINDOWS\nHINSTANCE video::win_hInstance = 0;\nint video::win_iCmdShow = 0;\nvoid video::win_set_class(WNDCLASSEX &wcex) {}\nvoid video::win_load_accelerators(int idc) {}\n#endif //_WINDOWS\n\n#else\n#include <sched.h>\n#include <sys/time.h>\nstruct timeval g_time;\n#endif //_WIN32||_WIN64\n\n#define CALC_FPS_ENABLED ((WINAPI_FAMILY != WINAPI_FAMILY_APP) && (!__ANDROID__))\n\nvideo::video()\n        // OpenGL* RGBA byte order for little-endian CPU\n        : depth(24),\n          red_shift(0),\n          green_shift(8),\n          blue_shift(16),\n          red_mask(0xff),\n          green_mask(0xff00),\n          blue_mask(0xff0000) {\n    assert(g_video == nullptr);\n    g_video = this;\n    title = \"Video\";\n    updating = calc_fps = false;\n}\n\nbool video::init_window(int x, int y) {\n    g_sizex = x;\n    g_sizey = y;\n    g_pImg = new unsigned int[x * y];\n    running = true;\n    return false;\n}\n\nbool video::init_console() {\n    running = true;\n    return true;\n}\n\nvoid video::terminate() {\n#if CALC_FPS_ENABLED\n    if (calc_fps) {\n        double fps = g_fps;\n#if _WIN32 || _WIN64\n        fps /= (GetTickCount() - g_msec) / 1000.0;\n#else\n        struct timezone tz;\n        struct timeval end_time;\n        gettimeofday(&end_time, &tz);\n        fps /= (end_time.tv_sec + 1.0 * end_time.tv_usec / 1000000.0) -\n               (g_time.tv_sec + 1.0 * g_time.tv_usec / 1000000.0);\n#endif\n        printf(\"%s: %.1f fps\\n\", title, fps);\n    }\n#endif\n    g_video = nullptr;\n    running = false;\n\n    delete[] g_pImg;\n    g_pImg = nullptr;\n}\n\nvideo::~video() {\n    if (g_video)\n        terminate();\n}\n\n//! Count and display FPS count in titlebar\nbool video::next_frame() {\n#if CALC_FPS_ENABLED\n    if (calc_fps) {\n        if (!g_fps) {\n#if _WIN32 || _WIN64\n            g_msec = GetTickCount();\n#else\n            struct timezone tz;\n            gettimeofday(&g_time, &tz);\n#endif\n        }\n        g_fps++;\n    }\n#endif\n    return running;\n}\n\n//! Do standard loop\nvoid video::main_loop() {\n    on_process();\n}\n\n//! Change window title\nvoid video::show_title() {}\n\n///////////////////////////////////////////// public methods of video class ///////////////////////\n\ndrawing_area::drawing_area(int x, int y, int sizex, int sizey)\n        : base_index(y * g_sizex + x),\n          max_index(g_sizex * g_sizey),\n          index_stride(g_sizex),\n          pixel_depth(24),\n          ptr32(g_pImg),\n          start_x(x),\n          start_y(y),\n          size_x(sizex),\n          size_y(sizey) {\n    assert(x < g_sizex);\n    assert(y < g_sizey);\n    assert(x + sizex <= g_sizex);\n    assert(y + sizey <= g_sizey);\n\n    index = base_index; // current index\n}\n\nvoid drawing_area::update() {}\n"
  },
  {
    "path": "third-party/tbb/examples/common/gui/d2dvideo.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// common Windows parts\n#include \"winvideo.hpp\"\n\n// and another headers\n#include <cassert>\n#include <stdio.h>\n#include <dxsdkver.h>\n#if _DXSDK_PRODUCT_MAJOR < 9\n#error DXSDK Version 9 and above required.\n#endif\n#include <d2d1.h>\n#include <d2d1helper.h>\n#pragma comment(lib, \"d2d1.lib\")\n\nID2D1Factory *m_pD2DFactory;\nID2D1HwndRenderTarget *m_pRenderTarget;\nID2D1Bitmap *m_pBitmap;\nD2D1_SIZE_U bitmapSize;\n\nHANDLE g_hVSync;\n\n#include <DXErr.h>\n#pragma comment(lib, \"DxErr.lib\")\n\n//! Create a dialog box and tell the user what went wrong\nbool DisplayError(LPSTR lpstrErr, HRESULT hres) {\n    if (hres != S_OK) {\n        static bool InError = false;\n        int retval = 0;\n        if (!InError) {\n            InError = true;\n            const char *message = hres ? DXGetErrorString(hres) : 0;\n            retval =\n                MessageBoxA(g_hAppWnd, lpstrErr, hres ? message : \"Error!\", MB_OK | MB_ICONERROR);\n            InError = false;\n        }\n    }\n    return false;\n}\n\nvoid DrawBitmap() {\n    HRESULT hr = S_OK;\n    if (m_pRenderTarget) {\n        m_pRenderTarget->BeginDraw();\n        if (m_pBitmap)\n            hr = m_pBitmap->CopyFromMemory(nullptr, (BYTE *)g_pImg, 4 * g_sizex);\n        DisplayError(\"DrawBitmap error\", hr);\n        m_pRenderTarget->DrawBitmap(m_pBitmap);\n        m_pRenderTarget->EndDraw();\n    }\n    return;\n}\n\ninline void mouse(int k, LPARAM lParam) {\n    int x = (int)LOWORD(lParam);\n    int y = (int)HIWORD(lParam);\n    RECT rc;\n    GetClientRect(g_hAppWnd, &rc);\n    g_video->on_mouse(x * g_sizex / (rc.right - rc.left), y * g_sizey / (rc.bottom - rc.top), k);\n}\n\n//! Win event processing function\nLRESULT CALLBACK InternalWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) {\n    switch (iMsg) {\n        case WM_MOVE:\n            // Check to make sure our window exists before we tell it to repaint.\n            // This will fail the first time (while the window is being created).\n            if (hwnd) {\n                InvalidateRect(hwnd, nullptr, FALSE);\n                UpdateWindow(hwnd);\n            }\n            return 0L;\n\n        case WM_SIZE:\n        case WM_PAINT:\n            if (g_video->running && g_video->updating) {\n                DrawBitmap();\n                Sleep(0);\n            }\n            break;\n        // Process all mouse and keyboard events\n        case WM_LBUTTONDOWN: mouse(1, lParam); break;\n        case WM_LBUTTONUP: mouse(-1, lParam); break;\n        case WM_RBUTTONDOWN: mouse(2, lParam); break;\n        case WM_RBUTTONUP: mouse(-2, lParam); break;\n        case WM_MBUTTONDOWN: mouse(3, lParam); break;\n        case WM_MBUTTONUP: mouse(-3, lParam); break;\n        case WM_CHAR: g_video->on_key((int)wParam); break;\n\n        // some useless stuff\n        case WM_ERASEBKGND: return 1; // keeps erase-background events from happening, reduces chop\n        case WM_DISPLAYCHANGE: return 0;\n\n        // Now, shut down the window...\n        case WM_DESTROY: PostQuitMessage(0); return 0;\n    }\n    // call user defined proc, if exists\n    return g_pUserProc ? g_pUserProc(hwnd, iMsg, wParam, lParam)\n                       : DefWindowProc(hwnd, iMsg, wParam, lParam);\n}\n\nbool video::init_window(int sizex, int sizey) {\n    assert(win_hInstance != 0);\n    g_sizex = sizex;\n    g_sizey = sizey;\n    if (!WinInit(win_hInstance, win_iCmdShow, gWndClass, title, false)) {\n        DisplayError(\"Unable to initialize the program's window.\");\n        return false;\n    }\n    ShowWindow(g_hAppWnd, SW_SHOW);\n    g_pImg = new unsigned int[sizex * sizey];\n\n    HRESULT hr = S_OK;\n\n    hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &m_pD2DFactory);\n    // Create a Direct2D render target.\n    if (SUCCEEDED(hr) && !m_pRenderTarget) {\n        RECT rc;\n        GetClientRect(g_hAppWnd, &rc);\n\n        bitmapSize = D2D1::SizeU(rc.right - rc.left, rc.bottom - rc.top);\n\n        hr = m_pD2DFactory->CreateHwndRenderTarget(\n            D2D1::RenderTargetProperties(),\n            D2D1::HwndRenderTargetProperties(g_hAppWnd, bitmapSize),\n            &m_pRenderTarget);\n        if (SUCCEEDED(hr) && !m_pBitmap) {\n            D2D1_PIXEL_FORMAT pixelFormat =\n                D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_IGNORE);\n            D2D1_BITMAP_PROPERTIES bitmapProperties;\n            bitmapProperties.pixelFormat = pixelFormat;\n            m_pRenderTarget->GetDpi(&bitmapProperties.dpiX, &bitmapProperties.dpiY);\n            m_pRenderTarget->CreateBitmap(bitmapSize, bitmapProperties, &m_pBitmap);\n            m_pRenderTarget->DrawBitmap(m_pBitmap);\n        }\n    }\n\n    running = true;\n    return true;\n}\n\nvoid video::terminate() {\n    if (m_pBitmap)\n        m_pBitmap->Release();\n    if (m_pRenderTarget)\n        m_pRenderTarget->Release();\n    if (m_pD2DFactory)\n        m_pD2DFactory->Release();\n    g_video = nullptr;\n    running = false;\n\n    delete[] g_pImg;\n    g_pImg = nullptr;\n}\n\n//////////// drawing area constructor & destructor /////////////\n\ndrawing_area::drawing_area(int x, int y, int sizex, int sizey)\n        : base_index(y * g_sizex + x),\n          max_index(g_sizex * g_sizey),\n          index_stride(g_sizex),\n          pixel_depth(24),\n          ptr32(g_pImg),\n          start_x(x),\n          start_y(y),\n          size_x(sizex),\n          size_y(sizey) {\n    assert(x < g_sizex);\n    assert(y < g_sizey);\n    assert(x + sizex <= g_sizex);\n    assert(y + sizey <= g_sizey);\n\n    index = base_index; // current index\n}\n\nvoid drawing_area::update() {\n    if (g_video->updating) {\n        RECT r;\n        r.left = start_x;\n        r.right = start_x + size_x;\n        r.top = start_y;\n        r.bottom = start_y + size_y;\n        InvalidateRect(g_hAppWnd, &r, false);\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/examples/common/gui/gdivideo.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// common Windows parts\n#include \"winvideo.hpp\"\n// include GDI+ headers\n#include <gdiplus.h>\n// and another headers\n#include <stdio.h>\n\n// tag linking library\n#pragma comment(lib, \"gdiplus.lib\")\n\n// global specific variables\nGdiplus::Bitmap* g_pBitmap; // main drawing bitmap\nULONG_PTR gdiplusToken;\nGdiplus::GdiplusStartupInput gdiplusStartupInput; // GDI+\n\n//! display system error\nbool DisplayError(LPSTR lpstrErr, HRESULT hres) {\n    static bool InError = false;\n    int retval = 0;\n    if (!InError) {\n        InError = true;\n        LPCSTR lpMsgBuf;\n        if (!hres)\n            hres = GetLastError();\n        FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |\n                          FORMAT_MESSAGE_IGNORE_INSERTS,\n                      nullptr,\n                      hres,\n                      MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),\n                      (LPTSTR)&lpMsgBuf,\n                      0,\n                      nullptr);\n        retval = MessageBox(g_hAppWnd, lpstrErr, lpMsgBuf, MB_OK | MB_ICONERROR);\n        LocalFree((HLOCAL)lpMsgBuf);\n        InError = false;\n    }\n    return false;\n}\n\n//! Win event processing function\nLRESULT CALLBACK InternalWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) {\n    switch (iMsg) {\n        case WM_MOVE:\n            // Check to make sure our window exists before we tell it to repaint.\n            // This will fail the first time (while the window is being created).\n            if (hwnd) {\n                InvalidateRect(hwnd, nullptr, FALSE);\n                UpdateWindow(hwnd);\n            }\n            return 0L;\n\n        case WM_PAINT: {\n            PAINTSTRUCT ps;\n            Gdiplus::Graphics graphics(BeginPaint(hwnd, &ps));\n            // redraw just requested area. This call is as fast as simple DrawImage() call.\n            if (g_video->updating)\n                graphics.DrawImage(g_pBitmap,\n                                   ps.rcPaint.left,\n                                   ps.rcPaint.top,\n                                   ps.rcPaint.left,\n                                   ps.rcPaint.top,\n                                   ps.rcPaint.right,\n                                   ps.rcPaint.bottom,\n                                   Gdiplus::UnitPixel);\n            EndPaint(hwnd, &ps);\n        }\n            return 0L;\n\n        // Process all mouse and keyboard events\n        case WM_LBUTTONDOWN: g_video->on_mouse((int)LOWORD(lParam), (int)HIWORD(lParam), 1); break;\n        case WM_LBUTTONUP: g_video->on_mouse((int)LOWORD(lParam), (int)HIWORD(lParam), -1); break;\n        case WM_RBUTTONDOWN: g_video->on_mouse((int)LOWORD(lParam), (int)HIWORD(lParam), 2); break;\n        case WM_RBUTTONUP: g_video->on_mouse((int)LOWORD(lParam), (int)HIWORD(lParam), -2); break;\n        case WM_MBUTTONDOWN: g_video->on_mouse((int)LOWORD(lParam), (int)HIWORD(lParam), 3); break;\n        case WM_MBUTTONUP: g_video->on_mouse((int)LOWORD(lParam), (int)HIWORD(lParam), -3); break;\n        case WM_CHAR: g_video->on_key((int)wParam); break;\n\n        // some useless stuff\n        case WM_ERASEBKGND: return 1; // keeps erase-background events from happening, reduces chop\n        case WM_DISPLAYCHANGE: return 0;\n\n        // Now, shut down the window...\n        case WM_DESTROY: PostQuitMessage(0); return 0;\n    }\n    // call user defined proc, if exists\n    return g_pUserProc ? g_pUserProc(hwnd, iMsg, wParam, lParam)\n                       : DefWindowProc(hwnd, iMsg, wParam, lParam);\n}\n\n///////////// video functions ////////////////\n\nbool video::init_window(int sizex, int sizey) {\n    assert(win_hInstance != 0);\n    g_sizex = sizex;\n    g_sizey = sizey;\n    if (!WinInit(win_hInstance, win_iCmdShow, gWndClass, title, true)) {\n        DisplayError(\"Unable to initialize the program's window.\");\n        return false;\n    }\n    ShowWindow(g_hAppWnd, SW_SHOW);\n    Gdiplus::GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, nullptr);\n    g_pImg = new unsigned int[sizex * sizey];\n    g_pBitmap =\n        new Gdiplus::Bitmap(g_sizex, g_sizey, 4 * g_sizex, PixelFormat32bppRGB, (BYTE*)g_pImg);\n    running = true;\n    return true;\n}\n\nvoid video::terminate() {\n    delete g_pBitmap;\n    g_pBitmap = nullptr;\n\n    Gdiplus::GdiplusShutdown(gdiplusToken);\n    g_video = nullptr;\n    running = false;\n\n    delete[] g_pImg;\n    g_pImg = nullptr;\n}\n\n//////////// drawing area constructor & destructor /////////////\n\ndrawing_area::drawing_area(int x, int y, int sizex, int sizey)\n        : base_index(y * g_sizex + x),\n          max_index(g_sizex * g_sizey),\n          index_stride(g_sizex),\n          pixel_depth(24),\n          ptr32(g_pImg),\n          start_x(x),\n          start_y(y),\n          size_x(sizex),\n          size_y(sizey) {\n    assert(x < g_sizex);\n    assert(y < g_sizey);\n    assert(x + sizex <= g_sizex);\n    assert(y + sizey <= g_sizey);\n\n    index = base_index; // current index\n}\n\nvoid drawing_area::update() {\n    if (g_video->updating) {\n        RECT r;\n        r.left = start_x;\n        r.right = start_x + size_x;\n        r.top = start_y;\n        r.bottom = start_y + size_y;\n        InvalidateRect(g_hAppWnd, &r, false);\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/examples/common/gui/macvideo.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"video.hpp\"\n#include <cassert>\n#include <stdio.h>\n#include <iostream>\n#include <pthread.h>\n\nunsigned int *g_pImg = nullptr;\nint g_sizex = 0, g_sizey = 0;\nstatic video *g_video = nullptr;\nstatic int g_fps = 0;\nchar *window_title = nullptr;\n#define WINDOW_TITLE_SIZE 256\nint cocoa_update = 0;\n\n#include <sched.h>\n#include <sys/time.h>\nstruct timeval g_time;\n\nvideo::video()\n#if __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__\n        : depth(24),\n          red_shift(0),\n          green_shift(8),\n          blue_shift(16),\n          red_mask(0xff),\n          green_mask(0xff00),\n          blue_mask(0xff0000)\n#else\n        : depth(24),\n          red_shift(16),\n          green_shift(8),\n          blue_shift(0),\n          red_mask(0xff0000),\n          green_mask(0xff00),\n          blue_mask(0xff)\n#endif\n{\n    assert(g_video == nullptr);\n    g_video = this;\n    title = \"Video\";\n    cocoa_update = 1;\n    updating = true;\n    calc_fps = false;\n}\n\nbool video::init_window(int x, int y) {\n    g_sizex = x;\n    g_sizey = y;\n    g_pImg = new unsigned int[x * y];\n    if (window_title == nullptr)\n        window_title = (char *)malloc(WINDOW_TITLE_SIZE);\n    strncpy(window_title, title, WINDOW_TITLE_SIZE - 1);\n    running = true;\n    return true;\n}\n\nbool video::init_console() {\n    running = true;\n    return true;\n}\n\nvoid video::terminate() {\n    if (calc_fps) {\n        double fps = g_fps;\n        struct timezone tz;\n        struct timeval end_time;\n        gettimeofday(&end_time, &tz);\n        fps /= (end_time.tv_sec + 1.0 * end_time.tv_usec / 1000000.0) -\n               (g_time.tv_sec + 1.0 * g_time.tv_usec / 1000000.0);\n        printf(\"%s: %.1f fps\\n\", title, fps);\n    }\n    g_video = nullptr;\n    running = false;\n\n    delete[] g_pImg;\n    g_pImg = nullptr;\n}\n\nvideo::~video() {\n    if (g_video)\n        terminate();\n}\n\n//! Count and display FPS count in titlebar\nbool video::next_frame() {\n    if (calc_fps) {\n        if (!g_fps) {\n            struct timezone tz;\n            gettimeofday(&g_time, &tz);\n        }\n        g_fps++;\n    }\n    struct timezone tz;\n    struct timeval now_time;\n    gettimeofday(&now_time, &tz);\n    double sec = ((now_time.tv_sec + 1.0 * now_time.tv_usec / 1000000.0) -\n                  (g_time.tv_sec + 1.0 * g_time.tv_usec / 1000000.0));\n    if (sec > 1) {\n        if (calc_fps) {\n            memcpy(&g_time, &now_time, sizeof(g_time));\n            int fps;\n            fps = g_fps / sec;\n            cocoa_update = (int)updating;\n            snprintf(window_title,\n                     WINDOW_TITLE_SIZE,\n                     \"%s%s: %d fps\",\n                     title,\n                     updating ? \"\" : \" (no updating)\",\n                     int(fps));\n            g_fps = 0;\n        }\n    }\n    return running;\n}\n\nvoid *thread_func(void *) {\n    g_video->on_process();\n    exit(EXIT_SUCCESS);\n}\n\nextern \"C\" void on_mouse_func(int x, int y, int k) {\n    g_video->on_mouse(x, y, k);\n    return;\n}\n\nextern \"C\" void on_key_func(int x) {\n    g_video->on_key(x);\n    return;\n}\n\nextern \"C\" int cocoa_main(int argc, char *argv[]);\n//! Do standard loop\nvoid video::main_loop() {\n    pthread_t handle;\n    pthread_attr_t attr;\n    pthread_attr_init(&attr);\n    pthread_create(&handle, &attr, &thread_func, (void *)nullptr);\n    pthread_detach(handle);\n    cocoa_main(0, nullptr);\n}\n\n//! Change window title\nvoid video::show_title() {\n    if (title)\n        strncpy(window_title, title, WINDOW_TITLE_SIZE);\n    return;\n}\n\n///////////////////////////////////////////// public methods of video class ///////////////////////\n\ndrawing_area::drawing_area(int x, int y, int sizex, int sizey)\n        : base_index(y * g_sizex + x),\n          max_index(g_sizex * g_sizey),\n          index_stride(g_sizex),\n          pixel_depth(24),\n          ptr32(g_pImg),\n          start_x(x),\n          start_y(y),\n          size_x(sizex),\n          size_y(sizey) {\n    assert(x < g_sizex);\n    assert(y < g_sizey);\n    assert(x + sizex <= g_sizex);\n    assert(y + sizey <= g_sizey);\n\n    index = base_index; // current index\n}\n\nvoid drawing_area::update() {\n    //nothing to do, updating via timer in cocoa part.\n}\n"
  },
  {
    "path": "third-party/tbb/examples/common/gui/video.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TBB_examples_video_H\n#define TBB_examples_video_H\n\n#include <cassert>\n#include <cstddef>\n#if _MSC_VER\n#include <stddef.h> // for uintptr_t\n#else\n#include <stdint.h> // for uintptr_t\n#endif\n#if _WIN32 || _WIN64\n#include <windows.h>\n#else\n#include <unistd.h>\n#endif\n\ntypedef unsigned int color_t;\ntypedef unsigned char colorcomp_t;\ntypedef signed char depth_t;\n\n//! Class for getting access to drawing memory\nclass drawing_memory {\n    uintptr_t my_address;\n\npublic:\n    depth_t pixel_depth;\n    int sizex, sizey;\n    //! Get drawing memory\n    inline char *get_address() const {\n        return reinterpret_cast<char *>(my_address);\n    }\n    //! Get drawing memory size\n    inline int get_size() const {\n        return ((pixel_depth > 16) ? 4 : 2) * sizex * sizey;\n    }\n    //! Set drawing memory\n    inline void set_address(char *mem) {\n        my_address = reinterpret_cast<uintptr_t>(mem);\n    }\n\n    friend class drawing_area;\n    friend class video;\n};\n\n//! Simple proxy class for managing of different video systems\nclass video {\n    //! colorspace information\n    depth_t depth, red_shift, green_shift, blue_shift;\n    color_t red_mask, green_mask, blue_mask;\n    friend class drawing_area;\n\npublic:\n    //! Constructor\n    video();\n    //! Destructor\n    ~video();\n    //! member to set window name\n    const char *title;\n    //! true is enable to show fps\n    bool calc_fps;\n    //! if true: on windows fork processing thread for on_process(), on non-windows note that next_frame() is called concurrently.\n    bool threaded;\n    //! true while running within main_loop()\n    bool running;\n    //! if true, do gui updating\n    bool updating;\n    //! initialize graphical video system\n    bool init_window(int sizex, int sizey);\n    //! initialize console. returns true if console is available\n    bool init_console();\n    //! terminate video system\n    void terminate();\n    //! Do standard event & processing loop. Use threaded = true to separate event/updating loop from frame processing\n    void main_loop();\n    //! Process next frame\n    bool next_frame();\n    //! Change window title\n    void show_title();\n    //! translate RGB components into packed type\n    inline color_t get_color(colorcomp_t red, colorcomp_t green, colorcomp_t blue) const;\n    //! Get drawing memory descriptor\n    inline drawing_memory get_drawing_memory() const;\n\n    //! code of the ESCape key\n    static const int esc_key = 27;\n    //! Mouse events handler.\n    virtual void on_mouse(int x, int y, int key) {}\n    //! Mouse events handler.\n    virtual void on_key(int key) {}\n    //! Main processing loop. Redefine with your own\n    virtual void on_process() {\n        while (next_frame())\n            ;\n    }\n\n#ifdef _WINDOWS\n    //! Windows specific members\n    //! if VIDEO_WINMAIN isn't defined then set this just before init() by arguments of WinMain\n    static HINSTANCE win_hInstance;\n    static int win_iCmdShow;\n    //! optionally call it just before init() to set own. Use ascii strings convention\n    void win_set_class(WNDCLASSEX &);\n    //! load and set accelerator table from resources\n    void win_load_accelerators(int idc);\n#endif\n};\n\n//! Drawing class\nclass drawing_area {\n    const std::size_t base_index, max_index, index_stride;\n    const depth_t pixel_depth;\n    unsigned int *const ptr32;\n    std::size_t index;\n\npublic:\n    const int start_x, start_y, size_x, size_y;\n    //! constructors\n    drawing_area(int x, int y, int sizex, int sizey);\n    inline drawing_area(int x, int y, int sizex, int sizey, const drawing_memory &dmem);\n    //! destructor\n    inline ~drawing_area();\n    //! update the image\n    void update();\n    //! set current position. local_x could be bigger then size_x\n    inline void set_pos(int local_x, int local_y);\n    //! put pixel in current position with incremental address calculating to next right pixel\n    inline void put_pixel(color_t color);\n    //! draw pixel at position by packed color\n    void set_pixel(int localx, int localy, color_t color) {\n        set_pos(localx, localy);\n        put_pixel(color);\n    }\n};\n\nextern int g_sizex;\nextern int g_sizey;\nextern unsigned int *g_pImg;\n\ninline drawing_memory video::get_drawing_memory() const {\n    drawing_memory dmem;\n    dmem.pixel_depth = depth;\n    dmem.my_address = reinterpret_cast<uintptr_t>(g_pImg);\n    dmem.sizex = g_sizex;\n    dmem.sizey = g_sizey;\n    return dmem;\n}\n\ninline color_t video::get_color(colorcomp_t red, colorcomp_t green, colorcomp_t blue) const {\n    if (red_shift == 16) // only for depth == 24 && red_shift > blue_shift\n        return (red << 16) | (green << 8) | blue;\n    else if (depth >= 24)\n        return\n#if __ANDROID__\n            // Setting Alpha to 0xFF\n            0xFF000000 |\n#endif\n            (red << red_shift) | (green << green_shift) | (blue << blue_shift);\n    else if (depth > 0) {\n        depth_t bs = blue_shift, rs = red_shift;\n        if (blue_shift < 0)\n            blue >>= -bs, bs = 0;\n        else /*red_shift < 0*/\n            red >>= -rs, rs = 0;\n        return ((red << rs) & red_mask) | ((green << green_shift) & green_mask) |\n               ((blue << bs) & blue_mask);\n    }\n    else { // UYVY colorspace\n        unsigned y, u, v;\n        y = red * 77 + green * 150 + blue * 29; // sum(77+150+29=256) * max(=255):  limit->2^16\n        u = (2048 + (blue << 3) - (y >> 5)) >> 4; // (limit->2^12)>>4\n        v = (2048 + (red << 3) - (y >> 5)) >> 4;\n        y = y >> 8;\n        return u | (y << 8) | (v << 16) | (y << 24);\n    }\n}\n\ninline drawing_area::drawing_area(int x, int y, int sizex, int sizey, const drawing_memory &dmem)\n        : base_index(y * dmem.sizex + x),\n          max_index(dmem.sizex * dmem.sizey),\n          index_stride(dmem.sizex),\n          pixel_depth(dmem.pixel_depth),\n          ptr32(reinterpret_cast<unsigned int *>(dmem.my_address)),\n          start_x(x),\n          start_y(y),\n          size_x(sizex),\n          size_y(sizey) {\n    assert(x < dmem.sizex);\n    assert(y < dmem.sizey);\n    assert(x + sizex <= dmem.sizex);\n    assert(y + sizey <= dmem.sizey);\n\n    index = base_index; // current index\n}\n\ninline void drawing_area::set_pos(int local_x, int local_y) {\n    index = base_index + local_x + local_y * index_stride;\n}\n\ninline void drawing_area::put_pixel(color_t color) {\n    assert(index < max_index);\n    if (pixel_depth > 16)\n        ptr32[index++] = color;\n    else if (pixel_depth > 0)\n        ((unsigned short *)ptr32)[index++] = (unsigned short)color;\n    else { // UYVY colorspace\n        if (index & 1)\n            color >>= 16;\n        ((unsigned short *)ptr32)[index++] = (unsigned short)color;\n    }\n}\n\ninline drawing_area::~drawing_area() {}\n\n#if defined(_WINDOWS) && (defined(VIDEO_WINMAIN) || defined(VIDEO_WINMAIN_ARGS))\n#include <cstdlib>\n//! define WinMain for subsystem:windows.\n#ifdef VIDEO_WINMAIN_ARGS\nint main(int, char *[]);\n#else\nint main();\n#endif\nint WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, PSTR szCmdLine, int iCmdShow) {\n    video::win_hInstance = hInstance;\n    video::win_iCmdShow = iCmdShow;\n#ifdef VIDEO_WINMAIN_ARGS\n    return main(__argc, __argv);\n#else\n    return main();\n#endif\n}\n#endif\n\n#endif /* TBB_examples_video_H */\n"
  },
  {
    "path": "third-party/tbb/examples/common/gui/winvideo.hpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/////// Common internal implementation of Windows-specific stuff //////////////\n///////                  Must be the first included header       //////////////\n\n#ifndef __WINVIDEO_H__\n#define __WINVIDEO_H__\n\n#ifndef _CRT_SECURE_NO_DEPRECATE\n#define _CRT_SECURE_NO_DEPRECATE\n#endif\n// Check that the target Windows version has all API calls required.\n#ifndef _WIN32_WINNT\n#define _WIN32_WINNT 0x0400\n#endif\n#if _WIN32_WINNT < 0x0400\n#define YIELD_TO_THREAD() Sleep(0)\n#else\n#define YIELD_TO_THREAD() SwitchToThread()\n#endif\n#include \"video.hpp\"\n#include <fcntl.h>\n#include <io.h>\n#include <iostream>\n#include <fstream>\n\n#pragma comment(lib, \"gdi32.lib\")\n#pragma comment(lib, \"user32.lib\")\n\n// maximum number of lines the output console should have\nstatic const WORD MAX_CONSOLE_LINES = 500;\nconst COLORREF RGBKEY = RGB(8, 8, 16); // at least 8 for 16-bit palette\nHWND g_hAppWnd; // The program's window handle\nHANDLE g_handles[2] = { 0, 0 }; // thread and wake up event\nunsigned int *g_pImg = 0; // drawing memory\nint g_sizex, g_sizey;\nstatic video *g_video = 0;\nWNDPROC g_pUserProc = 0;\nHINSTANCE video::win_hInstance = 0;\nint video::win_iCmdShow = 0;\nstatic WNDCLASSEX *gWndClass = 0;\nstatic HACCEL hAccelTable = 0;\nstatic DWORD g_msec = 0;\nstatic int g_fps = 0, g_updates = 0, g_skips = 0;\n\nbool DisplayError(LPSTR lpstrErr, HRESULT hres = 0); // always returns false\nLRESULT CALLBACK InternalWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam);\n\n//! Create window\nbool WinInit(HINSTANCE hInstance,\n             int nCmdShow,\n             WNDCLASSEX *uwc,\n             const char *title,\n             bool fixedsize) {\n    WNDCLASSEX wndclass; // Our app's windows class\n    if (uwc) {\n        memcpy(&wndclass, uwc, sizeof(wndclass));\n        g_pUserProc = uwc->lpfnWndProc;\n    }\n    else {\n        memset(&wndclass, 0, sizeof(wndclass));\n        wndclass.hCursor = LoadCursor(nullptr, IDC_ARROW);\n        wndclass.lpszClassName = title;\n    }\n    wndclass.cbSize = sizeof(wndclass);\n    wndclass.hInstance = hInstance;\n    wndclass.lpfnWndProc = InternalWndProc;\n    wndclass.style |= CS_HREDRAW | CS_VREDRAW;\n    wndclass.hbrBackground = CreateSolidBrush(RGBKEY);\n\n    if (!RegisterClassExA(&wndclass))\n        return false;\n    int xaddend = GetSystemMetrics(fixedsize ? SM_CXFIXEDFRAME : SM_CXFRAME) * 2;\n    int yaddend = GetSystemMetrics(fixedsize ? SM_CYFIXEDFRAME : SM_CYFRAME) * 2 +\n                  GetSystemMetrics(SM_CYCAPTION);\n    if (wndclass.lpszMenuName)\n        yaddend += GetSystemMetrics(SM_CYMENU);\n\n    // Setup the new window's physical parameters - and tell Windows to create it\n    g_hAppWnd = CreateWindowA(wndclass.lpszClassName, // Window class name\n                              title, // Window caption\n                              !fixedsize ? WS_OVERLAPPEDWINDOW : // Window style\n                                  WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX,\n                              CW_USEDEFAULT, // Initial x pos: use default placement\n                              0, // Initial y pos: not used here\n                              g_sizex + xaddend, // Initial x size\n                              g_sizey + yaddend, // Initial y size\n                              nullptr, // parent window handle\n                              nullptr, // window menu handle\n                              hInstance, // program instance handle\n                              nullptr); // Creation parameters\n    return g_hAppWnd != nullptr;\n}\n\n//! create console window with redirection\nstatic bool RedirectIOToConsole(void) {\n    int hConHandle;\n    size_t lStdHandle;\n    CONSOLE_SCREEN_BUFFER_INFO coninfo;\n    FILE *fp;\n    // allocate a console for this app\n    AllocConsole();\n\n    // set the screen buffer to be big enough to let us scroll text\n    GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &coninfo);\n    coninfo.dwSize.Y = MAX_CONSOLE_LINES;\n    SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), coninfo.dwSize);\n\n    // redirect unbuffered STDOUT to the console\n    lStdHandle = (size_t)GetStdHandle(STD_OUTPUT_HANDLE);\n    hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);\n    if (hConHandle <= 0)\n        return false;\n    fp = _fdopen(hConHandle, \"w\");\n    *stdout = *fp;\n    setvbuf(stdout, nullptr, _IONBF, 0);\n\n    // redirect unbuffered STDERR to the console\n    lStdHandle = (size_t)GetStdHandle(STD_ERROR_HANDLE);\n    hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);\n    if (hConHandle > 0) {\n        fp = _fdopen(hConHandle, \"w\");\n        *stderr = *fp;\n        setvbuf(stderr, nullptr, _IONBF, 0);\n    }\n\n    // redirect unbuffered STDIN to the console\n    lStdHandle = (size_t)GetStdHandle(STD_INPUT_HANDLE);\n    hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);\n    if (hConHandle > 0) {\n        fp = _fdopen(hConHandle, \"r\");\n        *stdin = *fp;\n        setvbuf(stdin, nullptr, _IONBF, 0);\n    }\n\n    // make cout, wcout, cin, wcin, wcerr, cerr, wclog and clog\n    // point to console as well\n    std::ios::sync_with_stdio();\n    return true;\n}\n\nvideo::video()\n        : depth(24),\n          red_shift(16),\n          green_shift(8),\n          blue_shift(0),\n          red_mask(0xff0000),\n          green_mask(0xff00),\n          blue_mask(0xff) {\n    assert(g_video == 0);\n    g_video = this;\n    title = \"Video\";\n    running = threaded = calc_fps = false;\n    updating = true;\n}\n\n//! optionally call it just before init() to set own\nvoid video::win_set_class(WNDCLASSEX &wcex) {\n    gWndClass = &wcex;\n}\n\nvoid video::win_load_accelerators(int idc) {\n    hAccelTable = LoadAccelerators(win_hInstance, MAKEINTRESOURCE(idc));\n}\n\nbool video::init_console() {\n    if (RedirectIOToConsole()) {\n        if (!g_pImg && g_sizex && g_sizey)\n            g_pImg = new unsigned int[g_sizex * g_sizey];\n        if (g_pImg)\n            running = true;\n        return true;\n    }\n    return false;\n}\n\nvideo::~video() {\n    if (g_video)\n        terminate();\n}\n\nDWORD WINAPI thread_video(LPVOID lpParameter) {\n    video *v = (video *)lpParameter;\n    v->on_process();\n    return 0;\n}\n\nstatic bool loop_once(video *v) {\n    // screen update notify\n    if (int updates = g_updates) {\n        g_updates = 0;\n        if (g_video->updating) {\n            g_skips += updates - 1;\n            g_fps++;\n        }\n        else\n            g_skips += updates;\n        UpdateWindow(g_hAppWnd);\n    }\n    // update fps\n    DWORD msec = GetTickCount();\n    if (v->calc_fps && msec >= g_msec + 1000) {\n        double sec = (msec - g_msec) / 1000.0;\n        char buffer[256],\n            n = _snprintf(buffer, 128, \"%s: %d fps\", v->title, int(double(g_fps + g_skips) / sec));\n        if (g_skips)\n            _snprintf(buffer + n,\n                      128,\n                      \" - %d skipped = %d updates\",\n                      int(g_skips / sec),\n                      int(g_fps / sec));\n        SetWindowTextA(g_hAppWnd, buffer);\n        g_msec = msec;\n        g_skips = g_fps = 0;\n    }\n    // event processing, including painting\n    MSG msg;\n    if (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) {\n        if (msg.message == WM_QUIT) {\n            v->running = false;\n            return false;\n        }\n        if (!hAccelTable || !TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) {\n            TranslateMessage(&msg);\n            DispatchMessage(&msg);\n        }\n        return true; // try again\n    }\n    return false;\n}\n\n//! Do standard event loop\nvoid video::main_loop() {\n    // let Windows draw and unroll the window\n    InvalidateRect(g_hAppWnd, 0, false);\n    g_msec = GetTickCount(); // let's stay for 0,5 sec\n    while (g_msec + 500 > GetTickCount()) {\n        loop_once(this);\n        Sleep(1);\n    }\n    g_msec = GetTickCount();\n    // now, start main process\n    if (threaded) {\n        g_handles[0] = CreateThread(nullptr, // LPSECURITY_ATTRIBUTES security_attrs\n                                    0, // SIZE_T stacksize\n                                    (LPTHREAD_START_ROUTINE)thread_video,\n                                    this, // argument\n                                    0,\n                                    0);\n        if (!g_handles[0]) {\n            DisplayError(\"Can't create thread\");\n            return;\n        }\n        else // harmless race is possible here\n            g_handles[1] = CreateEvent(nullptr, false, false, nullptr);\n        while (running) {\n            while (loop_once(this))\n                ;\n            YIELD_TO_THREAD(); // give time for processing when running on single CPU\n            DWORD r = MsgWaitForMultipleObjects(\n                2, g_handles, false, INFINITE, QS_ALLINPUT ^ QS_MOUSEMOVE);\n            if (r == WAIT_OBJECT_0)\n                break; // thread terminated\n        }\n        running = false;\n        if (WaitForSingleObject(g_handles[0], 3000) == WAIT_TIMEOUT) {\n            // there was not enough time for graceful shutdown, killing the example with code 1.\n            exit(1);\n        }\n        if (g_handles[0])\n            CloseHandle(g_handles[0]);\n        if (g_handles[1])\n            CloseHandle(g_handles[1]);\n        g_handles[0] = g_handles[1] = 0;\n    }\n    else\n        on_process();\n}\n\n//! Refresh screen picture\nbool video::next_frame() {\n    if (!running)\n        return false;\n    g_updates++; // Fast but inaccurate counter. The data race here is benign.\n    if (!threaded)\n        while (loop_once(this))\n            ;\n    else if (g_handles[1]) {\n        SetEvent(g_handles[1]);\n        YIELD_TO_THREAD();\n    }\n    return true;\n}\n\n//! Change window title\nvoid video::show_title() {\n    if (g_hAppWnd)\n        SetWindowTextA(g_hAppWnd, title);\n}\n\n#endif //__WINVIDEO_H__\n"
  },
  {
    "path": "third-party/tbb/examples/common/gui/xcode/tbbExample/OpenGLView.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#import <Foundation/Foundation.h>\n\n#if TARGET_OS_IPHONE\n\n#import <UIKit/UIKit.h>\n#import \"OpenGLES/ES2/gl.h\"\n\n@interface OpenGLView : UIView {\n    NSTimer *timer;\n    CGRect imageRect;\n}\n\n@property (nonatomic, retain) NSTimer *timer;\n@property (nonatomic) CGRect imageRect;\n\n- (void) drawRect:(CGRect)rect;\n- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;\n\n@end\n\n#elif TARGET_OS_MAC\n\n#import <Foundation/Foundation.h>\n#import <Cocoa/Cocoa.h>\n\n@interface OpenGLView : NSOpenGLView{\n    NSTimer *timer;\n}\n\n@property (nonatomic,retain) NSTimer *timer;\n\n- (void) drawRect:(NSRect)start;\n- (void) mouseDown:(NSEvent *)theEvent;\n- (void) keyDown:(NSEvent *)theEvent;\n- (BOOL) acceptsFirstResponder;\n- (void) viewDidEndLiveResize;\n\n@end\n\n#endif\n"
  },
  {
    "path": "third-party/tbb/examples/common/gui/xcode/tbbExample/OpenGLView.m",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#import <Foundation/Foundation.h>\n#import \"OpenGLView.h\"\n\n// defined in macvideo.cpp\nextern char* window_title;\nextern int cocoa_update;\nextern int g_sizex, g_sizey;\nextern unsigned int *g_pImg;\nvoid on_mouse_func(int x, int y, int k);\nvoid on_key_func(int x);\n\nbool initialized = false;\n\n#if TARGET_OS_IPHONE\n\n#import \"OpenGLES/ES2/gl.h\"\n\n@implementation OpenGLView\n\n@synthesize timer;\n@synthesize imageRect;\n\n- (void)drawRect:(CGRect)start\n{\n    if (initialized == false) {\n        NSLog(@\"INITIALIZE\");\n        timer = [NSTimer scheduledTimerWithTimeInterval:0.03 target:self selector:@selector(update_window) userInfo:nil repeats:YES];\n        imageRect = [[UIScreen mainScreen] bounds];\n        CGFloat full_height = imageRect.size.height;\n        const float ratio=(float)g_sizex/g_sizey;\n        imageRect.size.height=imageRect.size.width/ratio;\n        imageRect.origin.y=(full_height-imageRect.size.height)/2;\n        initialized = true;\n    }\n\n    CGColorSpaceRef colourSpace = CGColorSpaceCreateDeviceRGB();\n    CGDataProviderRef dataProvider = CGDataProviderCreateWithData(NULL, g_pImg, 4*g_sizex*g_sizey, NULL);\n\n    CGImageRef inputImage = CGImageCreate(g_sizex, g_sizey, 8, 32, g_sizex * 4, colourSpace,(CGBitmapInfo)kCGImageAlphaNoneSkipLast, dataProvider, NULL, NO, kCGRenderingIntentDefault);\n    UIImage *image = [UIImage imageWithCGImage:inputImage];\n\n    CGDataProviderRelease(dataProvider);\n    CGColorSpaceRelease(colourSpace);\n    CGImageRelease(inputImage);\n\n    [image drawInRect:imageRect];\n\n}\n\n- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event\n{\n    CGPoint point = [[touches anyObject] locationInView:self];\n    const int x = point.x;\n    const int y = point.y;\n    if ( (y-imageRect.origin.y) > 0 && y < (imageRect.origin.y + imageRect.size.height ))\n    on_mouse_func( x*g_sizex/(imageRect.size.width), (y-imageRect.origin.y)*g_sizey/imageRect.size.height,1);\n    [self setNeedsDisplay];\n}\n\n-(void) update_window{\n    if( cocoa_update ) [self setNeedsDisplay];\n}\n\n@end\n\n#elif TARGET_OS_MAC\n\n#import <OpenGL/gl.h>\n\n@implementation OpenGLView\n\n@synthesize timer;\n\n- (void) drawRect:(NSRect)start\n{\n    if (initialized == false) {\n        NSLog(@\"INITIALIZE\");\n        timer = [NSTimer scheduledTimerWithTimeInterval:0.03 target:self selector:@selector(update_window) userInfo:nil repeats:YES];\n        initialized = true;\n    }\n    glWindowPos2i(0, (int)self.visibleRect.size.height);\n    glPixelZoom( (float)self.visibleRect.size.width /(float)g_sizex,\n                -(float)self.visibleRect.size.height/(float)g_sizey);\n    glDrawPixels(g_sizex, g_sizey, GL_BGRA_EXT, GL_UNSIGNED_INT_8_8_8_8_REV, g_pImg);\n    glFlush();\n}\n\n-(void) update_window{\n    if( cocoa_update ) [self setNeedsDisplay:YES];\n    if( window_title ) [self.window setTitle:[NSString stringWithFormat:@\"%s\", window_title]];\n}\n\n-(void) keyDown:(NSEvent *)theEvent{\n    on_key_func([theEvent.characters characterAtIndex:0]);\n}\n\n-(void) mouseDown:(NSEvent *)theEvent{\n    // mouse event for seismic and fractal\n    NSPoint point= theEvent.locationInWindow;\n    const int x = (int)point.x;\n    const int y = (int)point.y;\n    NSRect rect = self.visibleRect;\n    on_mouse_func(x*g_sizex/(int)rect.size.width,((int)rect.size.height-y)*g_sizey/(int)rect.size.height,1);\n    [self setNeedsDisplay:YES];\n}\n\n- (BOOL) acceptsFirstResponder\n{\n    return YES;\n}\n\n- (void) rightMouseDown:(NSEvent *)theEvent\n{\n    return;\n}\n\n-(void) viewDidEndLiveResize\n{\n    NSRect rect = self.visibleRect;\n    const int x=(int)rect.size.width;\n    const int y=(int)rect.size.height;\n    [self.window setTitle:[NSString stringWithFormat:@\"X=%d Y=%d\", x,y]];\n}\n\n@end\n\n#endif\n"
  },
  {
    "path": "third-party/tbb/examples/common/gui/xcode/tbbExample/PkgInfo",
    "content": "APPL????"
  },
  {
    "path": "third-party/tbb/examples/common/gui/xcode/tbbExample/en.lproj/InfoPlist.strings",
    "content": "/* Localized versions of Info.plist keys */\n\n"
  },
  {
    "path": "third-party/tbb/examples/common/gui/xcode/tbbExample/en.lproj/MainMenu.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"9060\" systemVersion=\"15B42\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"9060\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"NSApplication\">\n            <connections>\n                <outlet property=\"delegate\" destination=\"494\" id=\"495\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\"/>\n        <menu title=\"AMainMenu\" systemMenu=\"main\" id=\"29\">\n            <items>\n                <menuItem title=\"tbbExample\" id=\"56\">\n                    <menu key=\"submenu\" title=\"tbbExample\" systemMenu=\"apple\" id=\"57\">\n                        <items>\n                            <menuItem title=\"Quit tbbExample\" keyEquivalent=\"q\" id=\"136\">\n                                <connections>\n                                    <action selector=\"terminate:\" target=\"-3\" id=\"449\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n            </items>\n        </menu>\n        <window title=\"tbbExample\" allowsToolTipsWhenApplicationIsInactive=\"NO\" deferred=\"NO\" oneShot=\"NO\" releasedWhenClosed=\"NO\" showsToolbarButton=\"NO\" animationBehavior=\"default\" id=\"371\">\n            <windowStyleMask key=\"styleMask\" titled=\"YES\" closable=\"YES\" miniaturizable=\"YES\" resizable=\"YES\"/>\n            <windowPositionMask key=\"initialPositionMask\" leftStrut=\"YES\" rightStrut=\"YES\" topStrut=\"YES\" bottomStrut=\"YES\"/>\n            <rect key=\"contentRect\" x=\"100\" y=\"100\" width=\"480\" height=\"360\"/>\n            <rect key=\"screenRect\" x=\"0.0\" y=\"0.0\" width=\"1280\" height=\"1002\"/>\n            <view key=\"contentView\" focusRingType=\"none\" horizontalHuggingPriority=\"1\" verticalHuggingPriority=\"9\" horizontalCompressionResistancePriority=\"1\" verticalCompressionResistancePriority=\"1\" id=\"372\" customClass=\"OpenGLView\">\n                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"480\" height=\"360\"/>\n                <autoresizingMask key=\"autoresizingMask\"/>\n                <animations/>\n            </view>\n        </window>\n        <customObject id=\"494\" customClass=\"tbbAppDelegate\">\n            <connections>\n                <outlet property=\"window\" destination=\"371\" id=\"532\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"420\" customClass=\"NSFontManager\"/>\n    </objects>\n</document>\n"
  },
  {
    "path": "third-party/tbb/examples/common/gui/xcode/tbbExample/iOS.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"9060\" systemVersion=\"15B42\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" initialViewController=\"AKo-RD-jUr\">\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"9051\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"aF8-QV-POo\">\n            <objects>\n                <viewController id=\"AKo-RD-jUr\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"SEe-ff-xUc\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"Cp9-IV-SKb\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"1aY-my-944\" customClass=\"OpenGLView\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"320\" height=\"568\"/>\n                        <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                        <animations/>\n                        <color key=\"backgroundColor\" white=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"calibratedWhite\"/>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"wcZ-9q-FxX\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"90\" y=\"88\"/>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "third-party/tbb/examples/common/gui/xcode/tbbExample/main.m",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#import <Availability.h>\n#import <Foundation/Foundation.h>\n\n#if TARGET_OS_IPHONE\n\n#import <UIKit/UIKit.h>\n#import \"tbbAppDelegate.h\"\n\nvoid get_screen_resolution(int *x, int *y) {\n    // Getting landscape screen resolution in any case\n    CGRect imageRect = [[UIScreen mainScreen] bounds];\n    *x=imageRect.size.width>imageRect.size.height?imageRect.size.width:imageRect.size.height;\n    *y=imageRect.size.width<imageRect.size.height?imageRect.size.width:imageRect.size.height;\n    return;\n}\n\nint cocoa_main(int argc, char * argv[]) {\n    @autoreleasepool {\n        return UIApplicationMain(argc, argv, nil, NSStringFromClass([tbbAppDelegate class]));\n    }\n}\n\n#elif TARGET_OS_MAC\n\n#import <Cocoa/Cocoa.h>\n\nint cocoa_main(int argc, char *argv[])\n{\n    return NSApplicationMain(argc, (const char **)argv);\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/examples/common/gui/xcode/tbbExample/tbbAppDelegate.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//\n//  Created by Xcode* 4.3.2\n//\n\n#import <Foundation/Foundation.h>\n\n#if TARGET_OS_IPHONE\n\n#import <UIKit/UIKit.h>\n\n@interface tbbAppDelegate : UIResponder <UIApplicationDelegate>\n\n@property (strong, nonatomic) UIWindow *window;\n\n@end\n\n#elif TARGET_OS_MAC\n\n#import <Cocoa/Cocoa.h>\n\n@interface tbbAppDelegate : NSObject <NSApplicationDelegate>{\n    __unsafe_unretained NSWindow *_window;\n}\n\n@property (assign) IBOutlet NSWindow *window;\n\n- (BOOL) applicationShouldTerminateAfterLastWindowClosed:(NSApplication *) sender;\n\n@end\n\n#endif\n"
  },
  {
    "path": "third-party/tbb/examples/common/gui/xcode/tbbExample/tbbAppDelegate.m",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#import \"tbbAppDelegate.h\"\n\n#if TARGET_OS_IPHONE\n\n@implementation tbbAppDelegate\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n{\n    return YES;\n}\n\n- (void)applicationDidEnterBackground:(UIApplication *)application\n{\n    exit(EXIT_SUCCESS);\n}\n\n@end\n\n#elif TARGET_OS_MAC\n\n@implementation tbbAppDelegate\n\n@synthesize window = _window;\n\n//declared in macvideo.cpp file\nextern int g_sizex, g_sizey;\n\n- (void)applicationDidFinishLaunching:(NSNotification *)aNotification\n{\n    // Insert code here to initialize your application\n    NSRect windowSize;\n    windowSize.size.height = g_sizey;\n    windowSize.size.width = g_sizex;\n    windowSize.origin=_window.frame.origin;\n    [_window setFrame:windowSize display:YES];\n\n}\n\n- (BOOL) applicationShouldTerminateAfterLastWindowClosed:(NSApplication *) sender\n{\n    return YES;\n}\n\n@end\n\n#endif\n"
  },
  {
    "path": "third-party/tbb/examples/common/gui/xcode/tbbExample/tbbExample-Info.ios.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>UILaunchStoryboardName</key>\n\t<string>iOS</string>\n\t<key>UIMainStoryboardFile</key>\n\t<string>iOS</string>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>armv7</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations~ipad</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "third-party/tbb/examples/common/gui/xcode/tbbExample/tbbExample-Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleDisplayName</key>\n\t<string></string>\n\t<key>CFBundleExecutable</key>\n\t<string>${EXECUTABLE_NAME}</string>\n\t<key>CFBundleIconFile</key>\n\t<string></string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n\t<key>LSApplicationCategoryType</key>\n\t<string>public.app-category.business</string>\n\t<key>LSEnvironment</key>\n\t<dict>\n\t\t<key>DYLD_LIBRARY_PATH</key>\n\t\t<string>Resources:.:../Resources:/tmp:$DYLD_LIBRARY_PATH</string>\n\t\t<key>LIBRARY_PATH</key>\n\t\t<string>Resources:.:../:/tmp:$DYLD_LIBRARY_PATH</string>\n\t</dict>\n\t<key>LSMinimumSystemVersion</key>\n\t<string>${MACOSX_DEPLOYMENT_TARGET}</string>\n\t<key>NSHumanReadableCopyright</key>\n\t<string>Copyright 2005-2021 Intel Corporation.  All Rights Reserved.</string>\n\t<key>NSMainNibFile</key>\n\t<string>MainMenu</string>\n\t<key>NSPrincipalClass</key>\n\t<string>NSApplication</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "third-party/tbb/examples/common/gui/xvideo.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// Uncomment next line to disable shared memory features if you do not have libXext\n// (http://www.xfree86.org/current/mit-shm.html)\n//#define X_NOSHMEM\n\n// Note that it may happen that the build environment supports the shared-memory extension\n// (so there's no build-time reason to disable the relevant code by defining X_NOSHMEM),\n// but that using shared memory still fails at run time.\n// This situation will (ultimately) cause the error handler set by XSetErrorHandler()\n// to be invoked with XErrorEvent::minor_code==X_ShmAttach. The code below tries to make\n// such a determination at XShmAttach() time, which seems plausible, but unfortunately\n// it has also been observed in a specific environment that the error may be reported\n// at a later time instead, even after video::init_window() has returned.\n// It is not clear whether this may happen in that way in any environment where it might\n// depend on the kind of display, e.g., local vs. over \"ssh -X\", so #define'ing X_NOSHMEM\n// may not always be the appropriate solution, therefore an environment variable\n// has been introduced to disable shared memory at run time.\n// A diagnostic has been added to advise the user about possible workarounds.\n// X_ShmAttach macro was changed to 1 due to recent changes to X11/extensions/XShm.h header.\n\n#include \"video.hpp\"\n#include <string.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n#include <X11/Xlib.h>\n#include <X11/Xutil.h>\n#include <X11/keysym.h>\n#include <sys/time.h>\n#include <signal.h>\n#include <pthread.h>\n\n#ifndef X_NOSHMEM\n#include <errno.h>\n#include <X11/extensions/XShm.h>\n#include <sys/ipc.h>\n#include <sys/shm.h>\n\nstatic XShmSegmentInfo shmseginfo;\nstatic Pixmap pixmap = 0;\nstatic bool already_called_X_ShmAttach = false;\nstatic bool already_advised_about_NOSHMEM_workarounds = false;\n#endif\nstatic char *display_name = nullptr;\nstatic Display *dpy = nullptr;\nstatic Screen *scrn;\nstatic Visual *vis;\nstatic Colormap cmap;\nstatic GC gc;\nstatic Window win, rootW;\nstatic int dispdepth = 0;\nstatic XGCValues xgcv;\nstatic XImage *ximage;\nstatic int x_error = 0;\nstatic int vidtype = 3;\nint g_sizex, g_sizey;\nstatic video *g_video = 0;\nunsigned int *g_pImg = 0;\nstatic int g_fps = 0;\nstruct timeval g_time;\nstatic pthread_mutex_t g_mutex = PTHREAD_MUTEX_INITIALIZER;\nAtom _XA_WM_DELETE_WINDOW = 0; // like in Xatom.h\n\n///////////////////////////////////////////// public methods of video class ///////////////////////\n\nvideo::video() {\n    assert(g_video == 0);\n    g_video = this;\n    title = \"Video\";\n    calc_fps = running = false;\n    updating = true;\n}\n\ninline void mask2bits(unsigned int mask, unsigned int &save, depth_t &shift) {\n    save = mask;\n    if (!mask) {\n        shift = dispdepth / 3;\n        return;\n    }\n    shift = 0;\n    while (!(mask & 1))\n        ++shift, mask >>= 1;\n    int bits = 0;\n    while (mask & 1)\n        ++bits, mask >>= 1;\n    shift += bits - 8;\n}\n\nint xerr_handler(Display *dpy_, XErrorEvent *error) {\n    x_error = error->error_code;\n    if (g_video)\n        g_video->running = false;\n#ifndef X_NOSHMEM\n    if (error->minor_code == 1 /*X_ShmAttach*/ && already_called_X_ShmAttach &&\n        !already_advised_about_NOSHMEM_workarounds) {\n        char err[256];\n        XGetErrorText(dpy_, x_error, err, 255);\n        fprintf(stderr, \"Warning: Can't attach shared memory to display: %s (%d)\\n\", err, x_error);\n        fprintf(\n            stderr,\n            \"If you are seeing a black output window, сheck if you have installed Xext library and rebuild project\");\n        already_advised_about_NOSHMEM_workarounds = true;\n    }\n#else\n    (void)dpy_; // warning prevention\n#endif\n    return 0;\n}\n\nbool video::init_window(int xsize, int ysize) {\n    { //enclose local variables before fail label\n        g_sizex = xsize;\n        g_sizey = ysize;\n\n        // Open the display\n        if (!dpy) {\n            dpy = XOpenDisplay(display_name);\n            if (!dpy) {\n                fprintf(stderr, \"Can't open X11 display %s\\n\", XDisplayName(display_name));\n                goto fail;\n            }\n        }\n        int theScreen = DefaultScreen(dpy);\n        scrn = ScreenOfDisplay(dpy, theScreen);\n        dispdepth = DefaultDepth(dpy, theScreen);\n        XVisualInfo vinfo;\n        if (!((dispdepth >= 15 && dispdepth <= 32 &&\n               XMatchVisualInfo(dpy, theScreen, dispdepth, TrueColor, &vinfo)) ||\n              XMatchVisualInfo(dpy, theScreen, 24, TrueColor, &vinfo) ||\n              XMatchVisualInfo(dpy, theScreen, 32, TrueColor, &vinfo) ||\n              XMatchVisualInfo(dpy, theScreen, 16, TrueColor, &vinfo) ||\n              XMatchVisualInfo(dpy, theScreen, 15, TrueColor, &vinfo))) {\n            fprintf(stderr, \"Display has no appropriate True Color visual\\n\");\n            goto fail;\n        }\n        vis = vinfo.visual;\n        depth = dispdepth = vinfo.depth;\n        mask2bits(vinfo.red_mask, red_mask, red_shift);\n        mask2bits(vinfo.green_mask, green_mask, green_shift);\n        mask2bits(vinfo.blue_mask, blue_mask, blue_shift);\n        rootW = RootWindow(dpy, theScreen);\n        cmap = XCreateColormap(dpy, rootW, vis, AllocNone);\n        XSetWindowAttributes attrs;\n        attrs.backing_store = Always;\n        attrs.colormap = cmap;\n        attrs.event_mask = StructureNotifyMask | KeyPressMask | ButtonPressMask | ButtonReleaseMask;\n        attrs.background_pixel = BlackPixelOfScreen(scrn);\n        attrs.border_pixel = WhitePixelOfScreen(scrn);\n        win = XCreateWindow(dpy,\n                            rootW,\n                            0,\n                            0,\n                            xsize,\n                            ysize,\n                            2,\n                            dispdepth,\n                            InputOutput,\n                            vis,\n                            CWBackingStore | CWColormap | CWEventMask | CWBackPixel | CWBorderPixel,\n                            &attrs);\n        if (!win) {\n            fprintf(stderr, \"Can't create the window\\n\");\n            goto fail;\n        }\n        XSizeHints sh;\n        sh.flags = PSize | PMinSize | PMaxSize;\n        sh.width = sh.min_width = sh.max_width = xsize;\n        sh.height = sh.min_height = sh.max_height = ysize;\n        XSetStandardProperties(dpy, win, g_video->title, g_video->title, None, nullptr, 0, &sh);\n        _XA_WM_DELETE_WINDOW = XInternAtom(dpy, \"WM_DELETE_WINDOW\", false);\n        XSetWMProtocols(dpy, win, &_XA_WM_DELETE_WINDOW, 1);\n        gc = XCreateGC(dpy, win, 0L, &xgcv);\n        XMapRaised(dpy, win);\n        XFlush(dpy);\n#ifdef X_FULLSYNC\n        XSynchronize(dpy, true);\n#endif\n        XSetErrorHandler(xerr_handler);\n\n        int imgbytes = xsize * ysize * (dispdepth <= 16 ? 2 : 4);\n        const char *vidstr;\n#ifndef X_NOSHMEM\n        int major, minor, pixmaps;\n        if (XShmQueryExtension(dpy) &&\n            XShmQueryVersion(dpy, &major, &minor, &pixmaps)) { // Shared memory\n            shmseginfo.shmid = shmget(IPC_PRIVATE, imgbytes, IPC_CREAT | 0777);\n            if (shmseginfo.shmid < 0) {\n                fprintf(stderr, \"Warning: Can't get shared memory: %s\\n\", strerror(errno));\n                goto generic;\n            }\n            g_pImg = (unsigned int *)(shmseginfo.shmaddr = (char *)shmat(shmseginfo.shmid, 0, 0));\n            if (g_pImg == (unsigned int *)-1) {\n                fprintf(stderr, \"Warning: Can't attach to shared memory: %s\\n\", strerror(errno));\n                shmctl(shmseginfo.shmid, IPC_RMID, nullptr);\n                goto generic;\n            }\n            shmseginfo.readOnly = false;\n            if (!XShmAttach(dpy, &shmseginfo) || x_error) {\n                char err[256];\n                XGetErrorText(dpy, x_error, err, 255);\n                fprintf(stderr,\n                        \"Warning: Can't attach shared memory to display: %s (%d)\\n\",\n                        err,\n                        x_error);\n                shmdt(shmseginfo.shmaddr);\n                shmctl(shmseginfo.shmid, IPC_RMID, nullptr);\n                goto generic;\n            }\n            already_called_X_ShmAttach = true;\n\n#ifndef X_NOSHMPIX\n            if (pixmaps && XShmPixmapFormat(dpy) == ZPixmap) { // Pixmaps\n                vidtype = 2;\n                vidstr = \"X11 shared memory pixmap\";\n                pixmap = XShmCreatePixmap(\n                    dpy, win, (char *)g_pImg, &shmseginfo, xsize, ysize, dispdepth);\n                XSetWindowBackgroundPixmap(dpy, win, pixmap);\n            }\n            else\n#endif //!X_NOSHMPIX\n            { // Standard\n                vidtype = 1;\n                vidstr = \"X11 shared memory\";\n                ximage =\n                    XShmCreateImage(dpy, vis, dispdepth, ZPixmap, 0, &shmseginfo, xsize, ysize);\n                if (!ximage) {\n                    fprintf(stderr, \"Can't create the shared image\\n\");\n                    goto fail;\n                }\n                assert(ximage->bytes_per_line == xsize * (dispdepth <= 16 ? 2 : 4));\n                ximage->data = shmseginfo.shmaddr;\n            }\n        }\n        else\n#endif\n        {\n#ifndef X_NOSHMEM\n        generic:\n#endif\n            vidtype = 0;\n            vidstr = \"generic X11\";\n            g_pImg = new unsigned int[imgbytes / sizeof(int)];\n            ximage = XCreateImage(dpy,\n                                  vis,\n                                  dispdepth,\n                                  ZPixmap,\n                                  0,\n                                  (char *)g_pImg,\n                                  xsize,\n                                  ysize,\n                                  32,\n                                  imgbytes / ysize);\n            if (!ximage) {\n                fprintf(stderr, \"Can't create the image\\n\");\n                goto fail;\n            }\n        }\n        if (ximage) {\n            // Note: It may be more efficient to adopt the server's byte order\n            //       and swap once per get_color() call instead of once per pixel.\n            const uint32_t probe = 0x03020100;\n            const bool big_endian = (((const char *)(&probe))[0] == 0x03);\n            ximage->byte_order = big_endian ? MSBFirst : LSBFirst;\n        }\n        printf(\"Note: using %s with %s visual for %d-bit color depth\\n\",\n               vidstr,\n               vis == DefaultVisual(dpy, theScreen) ? \"default\" : \"non-default\",\n               dispdepth);\n        running = true;\n        return true;\n    } // end of enclosing local variables\nfail:\n    terminate();\n    init_console();\n    return false;\n}\n\nbool video::init_console() {\n    if (!g_pImg && g_sizex && g_sizey) {\n        dispdepth = 24;\n        red_shift = 16;\n        vidtype = 3; // fake video\n        g_pImg = new unsigned int[g_sizex * g_sizey];\n        running = true;\n    }\n    return true;\n}\n\nvoid video::terminate() {\n    running = false;\n    if (dpy) {\n        vidtype = 3; // stop video\n        if (threaded) {\n            pthread_mutex_lock(&g_mutex);\n            pthread_mutex_unlock(&g_mutex);\n        }\n        if (ximage) {\n            XDestroyImage(ximage);\n            ximage = 0;\n            g_pImg = 0;\n        } // it frees g_pImg for vidtype == 0\n#ifndef X_NOSHMEM\n        if (pixmap)\n            XFreePixmap(dpy, pixmap);\n        if (shmseginfo.shmaddr) {\n            XShmDetach(dpy, &shmseginfo);\n            shmdt(shmseginfo.shmaddr);\n            g_pImg = 0;\n        }\n        if (shmseginfo.shmid >= 0)\n            shmctl(shmseginfo.shmid, IPC_RMID, nullptr);\n#endif\n        if (gc)\n            XFreeGC(dpy, gc);\n        if (win)\n            XDestroyWindow(dpy, win);\n        XCloseDisplay(dpy);\n        dpy = 0;\n    }\n    if (g_pImg) {\n        delete[] g_pImg;\n        g_pImg = 0;\n    } // if was allocated for console mode\n}\n\nvideo::~video() {\n    if (g_video)\n        terminate();\n    g_video = 0;\n}\n\n//! Do standard event loop\nvoid video::main_loop() {\n    struct timezone tz;\n    gettimeofday(&g_time, &tz);\n    on_process();\n}\n\n//! Check for pending events once\nbool video::next_frame() {\n    if (!running)\n        return false;\n    //! try acquire mutex if threaded code, returns on failure\n    if (vidtype == 3 || threaded && pthread_mutex_trylock(&g_mutex))\n        return running;\n    //! Refresh screen picture\n    g_fps++;\n#ifndef X_NOSHMPIX\n    if (vidtype == 2 && updating)\n        XClearWindow(dpy, win);\n#endif\n    while (XPending(dpy)) {\n        XEvent report;\n        XNextEvent(dpy, &report);\n        switch (report.type) {\n            case ClientMessage:\n                if (report.xclient.format != 32 || report.xclient.data.l[0] != _XA_WM_DELETE_WINDOW)\n                    break;\n            case DestroyNotify: running = false;\n            case KeyPress: on_key(XLookupKeysym(&report.xkey, 0)); break;\n            case ButtonPress:\n                on_mouse(report.xbutton.x, report.xbutton.y, report.xbutton.button);\n                break;\n            case ButtonRelease:\n                on_mouse(report.xbutton.x, report.xbutton.y, -report.xbutton.button);\n                break;\n        }\n    }\n    struct timezone tz;\n    struct timeval now_time;\n    gettimeofday(&now_time, &tz);\n    double sec = (now_time.tv_sec + 1.0 * now_time.tv_usec / 1000000.0) -\n                 (g_time.tv_sec + 1.0 * g_time.tv_usec / 1000000.0);\n    if (sec > 1) {\n        memcpy(&g_time, &now_time, sizeof(g_time));\n        if (calc_fps) {\n            double fps = g_fps;\n            g_fps = 0;\n            char buffer[256];\n            snprintf(buffer,\n                     256,\n                     \"%s%s: %d fps\",\n                     title,\n                     updating ? \"\" : \" (no updating)\",\n                     int(fps / sec));\n            XStoreName(dpy, win, buffer);\n        }\n#ifndef X_FULLSYNC\n        XSync(dpy, false); // It is often better then using XSynchronize(dpy, true)\n#endif //X_FULLSYNC\n    }\n    if (threaded)\n        pthread_mutex_unlock(&g_mutex);\n    return true;\n}\n\n//! Change window title\nvoid video::show_title() {\n    if (vidtype < 3)\n        XStoreName(dpy, win, title);\n}\n\ndrawing_area::drawing_area(int x, int y, int sizex, int sizey)\n        : base_index(y * g_sizex + x),\n          max_index(g_sizex * g_sizey),\n          index_stride(g_sizex),\n          pixel_depth(dispdepth),\n          ptr32(g_pImg),\n          start_x(x),\n          start_y(y),\n          size_x(sizex),\n          size_y(sizey) {\n    assert(x < g_sizex);\n    assert(y < g_sizey);\n    assert(x + sizex <= g_sizex);\n    assert(y + sizey <= g_sizey);\n\n    index = base_index; // current index\n}\n\nvoid drawing_area::update() {\n    if (!g_video->updating)\n        return;\n#ifndef X_NOSHMEM\n    switch (vidtype) {\n        case 0:\n#endif\n            pthread_mutex_lock(&g_mutex);\n            if (vidtype == 0)\n                XPutImage(dpy, win, gc, ximage, start_x, start_y, start_x, start_y, size_x, size_y);\n            pthread_mutex_unlock(&g_mutex);\n#ifndef X_NOSHMEM\n            break;\n        case 1:\n            pthread_mutex_lock(&g_mutex);\n            if (vidtype == 1)\n                XShmPutImage(dpy,\n                             win,\n                             gc,\n                             ximage,\n                             start_x,\n                             start_y,\n                             start_x,\n                             start_y,\n                             size_x,\n                             size_y,\n                             false);\n            pthread_mutex_unlock(&g_mutex);\n            break;\n            /*case 2: make it in next_frame(); break;*/\n    }\n#endif\n}\n"
  },
  {
    "path": "third-party/tbb/examples/common/utility/fast_random.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TBB_examples_fast_random_H\n#define TBB_examples_fast_random_H\n\n#include <cstddef>\n\nnamespace utility {\n//------------------------------------------------------------------------\n// FastRandom\n//------------------------------------------------------------------------\n\nnamespace internal {\nstd::size_t GetPrime(std::size_t seed);\n}\n\n//! A fast random number generator.\n/** Uses linear congruential method. */\nclass FastRandom {\n    std::size_t x, a;\n\npublic:\n    //! Get a random number.\n    unsigned short get() {\n        return get(x);\n    }\n    //! Get a random number for the given seed; update the seed for next use.\n    unsigned short get(std::size_t& seed) {\n        unsigned short r = (unsigned short)(seed >> 16);\n        seed = seed * a + 1;\n        return r;\n    }\n    //! Construct a random number generator.\n    FastRandom(std::size_t seed) {\n        x = seed * internal::GetPrime(seed);\n        a = internal::GetPrime(x);\n    }\n};\n} // namespace utility\n\nnamespace utility {\nnamespace internal {\n//! Table of primes used by fast random-number generator (FastRandom).\nstatic const unsigned Primes[] = {\n    0x9e3779b1, 0xffe6cc59, 0x2109f6dd, 0x43977ab5, 0xba5703f5, 0xb495a877, 0xe1626741, 0x79695e6b,\n    0xbc98c09f, 0xd5bee2b3, 0x287488f9, 0x3af18231, 0x9677cd4d, 0xbe3a6929, 0xadc6a877, 0xdcf0674b,\n    0xbe4d6fe9, 0x5f15e201, 0x99afc3fd, 0xf3f16801, 0xe222cfff, 0x24ba5fdb, 0x0620452d, 0x79f149e3,\n    0xc8b93f49, 0x972702cd, 0xb07dd827, 0x6c97d5ed, 0x085a3d61, 0x46eb5ea7, 0x3d9910ed, 0x2e687b5b,\n    0x29609227, 0x6eb081f1, 0x0954c4e1, 0x9d114db9, 0x542acfa9, 0xb3e6bd7b, 0x0742d917, 0xe9f3ffa7,\n    0x54581edb, 0xf2480f45, 0x0bb9288f, 0xef1affc7, 0x85fa0ca7, 0x3ccc14db, 0xe6baf34b, 0x343377f7,\n    0x5ca19031, 0xe6d9293b, 0xf0a9f391, 0x5d2e980b, 0xfc411073, 0xc3749363, 0xb892d829, 0x3549366b,\n    0x629750ad, 0xb98294e5, 0x892d9483, 0xc235baf3, 0x3d2402a3, 0x6bdef3c9, 0xbec333cd, 0x40c9520f\n};\nstd::size_t GetPrime(std::size_t seed) {\n    return Primes[seed % (sizeof(Primes) / sizeof(Primes[0]))];\n}\n} // namespace internal\n} // namespace utility\n\n#endif /* TBB_examples_fast_random_H */\n"
  },
  {
    "path": "third-party/tbb/examples/common/utility/get_default_num_threads.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TBB_examples_num_threads_H\n#define TBB_examples_num_threads_H\n\n#include \"oneapi/tbb/task_arena.h\"\n\nnamespace utility {\ninline int get_default_num_threads() {\n    return oneapi::tbb::this_task_arena::max_concurrency();\n}\n} // namespace utility\n\n#endif /* TBB_examples_num_threads_H */\n"
  },
  {
    "path": "third-party/tbb/examples/common/utility/utility.hpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TBB_examples_utility_H\n#define TBB_examples_utility_H\n\n#include <cassert>\n#include <cstring>\n#include <cstdlib>\n#include <cmath>\n\n#include <utility>\n#include <string>\n#include <vector>\n#include <map>\n#include <set>\n#include <algorithm>\n#include <sstream>\n#include <numeric>\n#include <stdexcept>\n#include <memory>\n#include <iostream>\n#include <chrono>\n// TBB headers should not be used, as some examples may need to be built without TBB.\n\nnamespace utility {\nnamespace internal {\n\n//TODO: add tcs\ntemplate <class dest_type>\ndest_type& string_to(std::string const& s, dest_type& result) {\n    std::stringstream stream(s);\n    stream >> result;\n    if ((!stream) || (stream.fail())) {\n        throw std::invalid_argument(\"error converting string '\" + std::string(s) + \"'\");\n    }\n    return result;\n}\n\ntemplate <class dest_type>\ndest_type string_to(std::string const& s) {\n    dest_type result;\n    return string_to(s, result);\n}\n\ntemplate <typename>\nstruct is_bool {\n    static bool value() {\n        return false;\n    }\n};\ntemplate <>\nstruct is_bool<bool> {\n    static bool value() {\n        return true;\n    }\n};\n\nclass type_base {\n    type_base& operator=(const type_base&);\n\npublic:\n    const std::string name;\n    const std::string description;\n\n    type_base(std::string a_name, std::string a_description)\n            : name(a_name),\n              description(a_description) {}\n    virtual void parse_and_store(const std::string& s) = 0;\n    virtual std::string value() const = 0;\n    virtual std::unique_ptr<type_base> clone() const = 0;\n    virtual ~type_base() {}\n};\ntemplate <typename type>\nclass type_impl : public type_base {\nprivate:\n    type_impl(const type_impl& src)\n            : type_base(src.name, src.description),\n              target(src.target),\n              validating_function(src.validating_function) {}\n    type_impl& operator=(const type_impl&);\n    typedef bool (*validating_function_type)(const type&);\n    type& target;\n    validating_function_type validating_function;\n\npublic:\n    type_impl(std::string a_name,\n              std::string a_description,\n              type& a_target,\n              validating_function_type a_validating_function = nullptr)\n            : type_base(a_name, a_description),\n              target(a_target),\n              validating_function(a_validating_function){};\n    void parse_and_store(const std::string& s) /*override*/ {\n        try {\n            const bool is_bool = internal::is_bool<type>::value();\n            if (is_bool && s.empty()) {\n                //to avoid directly assigning true\n                //(as it will impose additional layer of indirection)\n                //so, simply pass it as string\n                internal::string_to(\"1\", target);\n            }\n            else {\n                internal::string_to(s, target);\n            }\n        }\n        catch (std::invalid_argument& e) {\n            std::stringstream str;\n            str << \"'\" << s << \"' is incorrect input for argument '\" << name << \"'\"\n                << \" (\" << e.what() << \")\";\n            throw std::invalid_argument(str.str());\n        }\n        if (validating_function) {\n            if (!((validating_function)(target))) {\n                std::stringstream str;\n                str << \"'\" << target << \"' is invalid value for argument '\" << name << \"'\";\n                throw std::invalid_argument(str.str());\n            }\n        }\n    }\n    template <typename t>\n    static bool is_null_c_str(t&) {\n        return false;\n    }\n    static bool is_null_c_str(char* s) {\n        return s == nullptr;\n    }\n    std::string value() const /*override*/ {\n        std::stringstream str;\n        if (!is_null_c_str(target))\n            str << target;\n        return str.str();\n    }\n    std::unique_ptr<type_base> clone() const /*override*/ {\n        return std::unique_ptr<type_base>(new type_impl(*this));\n    }\n};\n\nclass argument {\nprivate:\n    std::unique_ptr<type_base> p_type;\n    bool matched_;\n\npublic:\n    argument(argument const& other)\n            : p_type(other.p_type.get() ? (other.p_type->clone()).release() : nullptr),\n              matched_(other.matched_) {}\n    argument& operator=(argument a) {\n        this->swap(a);\n        return *this;\n    }\n    void swap(argument& other) {\n        std::swap(p_type, other.p_type);\n        std::swap(matched_, other.matched_);\n    }\n    template <class type>\n    argument(std::string a_name,\n             std::string a_description,\n             type& dest,\n             bool (*a_validating_function)(const type&) = nullptr)\n            : p_type(new type_impl<type>(a_name, a_description, dest, a_validating_function)),\n              matched_(false) {}\n    std::string value() const {\n        return p_type->value();\n    }\n    std::string name() const {\n        return p_type->name;\n    }\n    std::string description() const {\n        return p_type->description;\n    }\n    void parse_and_store(const std::string& s) {\n        p_type->parse_and_store(s);\n        matched_ = true;\n    }\n    bool is_matched() const {\n        return matched_;\n    }\n};\n} // namespace internal\n\nclass cli_argument_pack {\n    typedef std::map<std::string, internal::argument> args_map_type;\n    typedef std::vector<std::string> args_display_order_type;\n    typedef std::vector<std::string> positional_arg_names_type;\n\nprivate:\n    args_map_type args_map;\n    args_display_order_type args_display_order;\n    positional_arg_names_type positional_arg_names;\n    std::set<std::string> bool_args_names;\n\nprivate:\n    void add_arg(internal::argument const& a) {\n        std::pair<args_map_type::iterator, bool> result =\n            args_map.insert(std::make_pair(a.name(), a));\n        if (!result.second) {\n            throw std::invalid_argument(\"argument with name: '\" + a.name() +\n                                        \"' already registered\");\n        }\n        args_display_order.push_back(a.name());\n    }\n\npublic:\n    template <typename type>\n    cli_argument_pack& arg(type& dest,\n                           std::string const& name,\n                           std::string const& description,\n                           bool (*validate)(const type&) = nullptr) {\n        internal::argument a(name, description, dest, validate);\n        add_arg(a);\n        if (internal::is_bool<type>::value()) {\n            bool_args_names.insert(name);\n        }\n        return *this;\n    }\n\n    //Positional means that argument name can be omitted in actual CL\n    //only key to match values for parameters with\n    template <typename type>\n    cli_argument_pack& positional_arg(type& dest,\n                                      std::string const& name,\n                                      std::string const& description,\n                                      bool (*validate)(const type&) = nullptr) {\n        internal::argument a(name, description, dest, validate);\n        add_arg(a);\n        if (internal::is_bool<type>::value()) {\n            bool_args_names.insert(name);\n        }\n        positional_arg_names.push_back(name);\n        return *this;\n    }\n\n    void parse(std::size_t argc, char const* argv[]) {\n        {\n            std::size_t current_positional_index = 0;\n            for (std::size_t j = 1; j < argc; j++) {\n                internal::argument* pa = nullptr;\n                std::string argument_value;\n\n                const char* const begin = argv[j];\n                const char* const end = begin + std::strlen(argv[j]);\n\n                const char* const assign_sign = std::find(begin, end, '=');\n\n                struct throw_unknown_parameter {\n                    static void _(std::string const& location) {\n                        throw std::invalid_argument(std::string(\"unknown parameter starting at:'\") +\n                                                    location + \"'\");\n                    }\n                };\n                //first try to interpret it like parameter=value string\n                if (assign_sign != end) {\n                    std::string name_found = std::string(begin, assign_sign);\n                    args_map_type::iterator it = args_map.find(name_found);\n\n                    if (it != args_map.end()) {\n                        pa = &((*it).second);\n                        argument_value = std::string(assign_sign + 1, end);\n                    }\n                    else {\n                        throw_unknown_parameter::_(argv[j]);\n                    }\n                }\n                //then see is it a named flag\n                else {\n                    args_map_type::iterator it = args_map.find(argv[j]);\n                    if (it != args_map.end()) {\n                        pa = &((*it).second);\n                        argument_value = \"\";\n                    }\n                    //then try it as positional argument without name specified\n                    else if (current_positional_index < positional_arg_names.size()) {\n                        std::stringstream str(argv[j]);\n                        args_map_type::iterator found_positional_arg =\n                            args_map.find(positional_arg_names.at(current_positional_index));\n                        //TODO: probably use of smarter assert would help here\n                        assert(\n                            found_positional_arg !=\n                            args_map\n                                .end() /*&&\"positional_arg_names and args_map are out of sync\"*/);\n                        if (found_positional_arg == args_map.end()) {\n                            throw std::logic_error(\n                                \"positional_arg_names and args_map are out of sync\");\n                        }\n                        pa = &((*found_positional_arg).second);\n                        argument_value = argv[j];\n\n                        current_positional_index++;\n                    }\n                    else {\n                        //TODO: add tc to check\n                        throw_unknown_parameter::_(argv[j]);\n                    }\n                }\n                assert(pa);\n                if (pa->is_matched()) {\n                    throw std::invalid_argument(std::string(\"several values specified for: '\") +\n                                                pa->name() + \"' argument\");\n                }\n                pa->parse_and_store(argument_value);\n            }\n        }\n    }\n    std::string usage_string(const std::string& binary_name) const {\n        std::string command_line_params;\n        std::string summary_description;\n\n        for (args_display_order_type::const_iterator it = args_display_order.begin();\n             it != args_display_order.end();\n             ++it) {\n            const bool is_bool = (0 != bool_args_names.count((*it)));\n            args_map_type::const_iterator argument_it = args_map.find(*it);\n            //TODO: probably use of smarter assert would help here\n            assert(argument_it !=\n                   args_map.end() /*&&\"args_display_order and args_map are out of sync\"*/);\n            if (argument_it == args_map.end()) {\n                throw std::logic_error(\"args_display_order and args_map are out of sync\");\n            }\n            const internal::argument& a = (*argument_it).second;\n            command_line_params += \" [\" + a.name() + (is_bool ? \"\" : \"=value\") + \"]\";\n            summary_description +=\n                \" \" + a.name() + \" - \" + a.description() + \" (\" + a.value() + \")\" + \"\\n\";\n        }\n\n        std::string positional_arg_cl;\n        for (positional_arg_names_type::const_iterator it = positional_arg_names.begin();\n             it != positional_arg_names.end();\n             ++it) {\n            positional_arg_cl += \" [\" + (*it);\n        }\n        for (std::size_t i = 0; i < positional_arg_names.size(); ++i) {\n            positional_arg_cl += \"]\";\n        }\n        command_line_params += positional_arg_cl;\n        std::stringstream str;\n        str << \" Program usage is:\"\n            << \"\\n\"\n            << \" \" << binary_name << command_line_params << \"\\n\"\n            << \"\\n\"\n            << \" where:\"\n            << \"\\n\"\n            << summary_description;\n        return str.str();\n    }\n}; // class cli_argument_pack\n\n// utility class to aid relative error measurement of samples\nclass measurements {\npublic:\n    measurements() = default;\n\n    measurements(unsigned iterations) {\n        _time_intervals.reserve(iterations);\n    }\n\n    inline void start() {\n        _startTime = std::chrono::steady_clock::now();\n    }\n    inline void stop() {\n        auto _endTime = std::chrono::steady_clock::now();\n        // store the end time and start time\n        _time_intervals.push_back(std::make_pair(_startTime, _endTime));\n    }\n    double computeRelError() {\n        // Accumulate the total duration in microseconds using std::accumulate with a lambda function\n        assert(0 != _time_intervals.size());\n        auto total_duration = std::accumulate(\n            _time_intervals.begin(),\n            _time_intervals.end(),\n            0, // Start with 0 count\n            [](long long total, const std::pair<time_point, time_point>& interval) {\n                // Compute the difference and add it to the total\n                return total + std::chrono::duration_cast<std::chrono::microseconds>(\n                                   interval.second - interval.first)\n                                   .count();\n            });\n        unsigned long long averageTimePerFrame = total_duration / _time_intervals.size();\n        unsigned long long sumOfSquareDiff = 0;\n        std::for_each(_time_intervals.begin(),\n                      _time_intervals.end(),\n                      [&](const std::pair<time_point, time_point>& interval) {\n                          unsigned long long duration =\n                              std::chrono::duration_cast<std::chrono::microseconds>(\n                                  interval.second - interval.first)\n                                  .count();\n                          long long diff = duration - averageTimePerFrame;\n                          sumOfSquareDiff += diff * diff;\n                      });\n        double stdDev = std::sqrt(sumOfSquareDiff / _time_intervals.size());\n        double relError = 100 * (stdDev / averageTimePerFrame);\n        return relError;\n    }\n\nprivate:\n    using time_point = std::chrono::steady_clock::time_point;\n    time_point _startTime;\n    std::vector<std::pair<time_point, time_point>> _time_intervals;\n};\n\nnamespace internal {\ntemplate <typename T>\nbool is_power_of_2(T val) {\n    std::size_t intval = std::size_t(val);\n    return (intval & (intval - 1)) == std::size_t(0);\n}\nint step_function_plus(int previous, double step) {\n    return static_cast<int>(previous + step);\n}\nint step_function_multiply(int previous, double multiply) {\n    return static_cast<int>(previous * multiply);\n}\n// \"Power-of-2 ladder\": nsteps is the desired number of steps between any subsequent powers of 2.\n// The actual step is the quotient of the nearest smaller power of 2 divided by that number (but at least 1).\n// E.g., '1:32:#4' means 1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32\nint step_function_power2_ladder(int previous, double nsteps) {\n    int steps = int(nsteps);\n    assert(is_power_of_2(steps)); // must be a power of 2\n    // The actual step is 1 until the value is twice as big as nsteps\n    if (previous < 2 * steps)\n        return previous + 1;\n    // calculate the previous power of 2\n    int prev_power2 = previous / 2; // start with half the given value\n    int rshift = 1; // and with the shift of 1;\n    while (int shifted =\n               prev_power2 >> rshift) { // shift the value right; while the result is non-zero,\n        prev_power2 |= shifted; //   add the bits set in 'shifted';\n        rshift <<= 1; //   double the shift, as twice as many top bits are set;\n    } // repeat.\n    ++prev_power2; // all low bits set; now it's just one less than the desired power of 2\n    assert(is_power_of_2(prev_power2));\n    assert((prev_power2 <= previous) && (2 * prev_power2 > previous));\n    // The actual step value is the previous power of 2 divided by steps\n    return previous + (prev_power2 / steps);\n}\ntypedef int (*step_function_ptr_type)(int, double);\n\nstruct step_function_descriptor {\n    char mnemonic;\n    step_function_ptr_type function;\n\npublic:\n    step_function_descriptor(char a_mnemonic, step_function_ptr_type a_function)\n            : mnemonic(a_mnemonic),\n              function(a_function) {}\n\nprivate:\n    void operator=(step_function_descriptor const&);\n};\nstep_function_descriptor step_function_descriptors[] = {\n    step_function_descriptor('*', step_function_multiply),\n    step_function_descriptor('+', step_function_plus),\n    step_function_descriptor('#', step_function_power2_ladder)\n};\n\ntemplate <typename T, std::size_t N>\ninline std::size_t array_length(const T (&)[N]) {\n    return N;\n}\n\nstruct thread_range_step {\n    step_function_ptr_type step_function;\n    double step_function_argument;\n\n    thread_range_step(step_function_ptr_type step_function_, double step_function_argument_)\n            : step_function(step_function_),\n              step_function_argument(step_function_argument_) {\n        if (!step_function_)\n            throw std::invalid_argument(\n                \"step_function for thread range step should not be nullptr\");\n    }\n    int operator()(int previous) const {\n        assert(0 <= previous); // test 0<=first and loop discipline\n        const int ret = step_function(previous, step_function_argument);\n        assert(previous < ret);\n        return ret;\n    }\n    friend std::istream& operator>>(std::istream& input_stream, thread_range_step& step) {\n        char function_char;\n        double function_argument;\n        input_stream >> function_char >> function_argument;\n        std::size_t i = 0;\n        while ((i < array_length(step_function_descriptors)) &&\n               (step_function_descriptors[i].mnemonic != function_char))\n            ++i;\n        if (i >= array_length(step_function_descriptors)) {\n            throw std::invalid_argument(\"unknown step function mnemonic: \" +\n                                        std::string(1, function_char));\n        }\n        else if ((function_char == '#') && !is_power_of_2(function_argument)) {\n            throw std::invalid_argument(\"the argument of # should be a power of 2\");\n        }\n        step.step_function = step_function_descriptors[i].function;\n        step.step_function_argument = function_argument;\n        return input_stream;\n    }\n};\n} // namespace internal\n\nstruct thread_number_range {\n    int (*auto_number_of_threads)();\n    int first; // 0<=first (0 can be used as a special value)\n    int last; // first<=last\n\n    ::utility::internal::thread_range_step step;\n\n    thread_number_range(\n        int (*auto_number_of_threads_)(),\n        int low_ = 1,\n        int high_ = -1,\n        ::utility::internal::thread_range_step step_ =\n            ::utility::internal::thread_range_step(::utility::internal::step_function_power2_ladder,\n                                                   4))\n            : auto_number_of_threads(auto_number_of_threads_),\n              first(low_),\n              last((high_ > -1) ? high_ : auto_number_of_threads_()),\n              step(step_) {\n        if (first < 0) {\n            throw std::invalid_argument(\"negative value not allowed\");\n        }\n        if (first > last) {\n            throw std::invalid_argument(\"decreasing sequence not allowed\");\n        }\n    }\n    friend std::istream& operator>>(std::istream& i, thread_number_range& range) {\n        try {\n            std::string s;\n            i >> s;\n            struct string_to_number_of_threads {\n                int auto_value;\n                string_to_number_of_threads(int auto_value_) : auto_value(auto_value_) {}\n                int operator()(const std::string& value) const {\n                    return (value == \"auto\") ? auto_value : internal::string_to<int>(value);\n                }\n            };\n            string_to_number_of_threads string_to_number_of_threads(range.auto_number_of_threads());\n            int low, high;\n            std::size_t colon = s.find(':');\n            if (colon == std::string::npos) {\n                low = high = string_to_number_of_threads(s);\n            }\n            else {\n                //it is a range\n                std::size_t second_colon = s.find(':', colon + 1);\n\n                low = string_to_number_of_threads(std::string(s, 0, colon)); //not copying the colon\n                high = string_to_number_of_threads(\n                    std::string(s, colon + 1, second_colon - (colon + 1))); //not copying the colons\n                if (second_colon != std::string::npos) {\n                    internal::string_to(std::string(s, second_colon + 1), range.step);\n                }\n            }\n            range = thread_number_range(range.auto_number_of_threads, low, high, range.step);\n        }\n        catch (std::invalid_argument&) {\n            i.setstate(std::ios::failbit);\n            throw;\n        }\n        return i;\n    }\n    friend std::ostream& operator<<(std::ostream& o, thread_number_range const& range) {\n        using namespace internal;\n        std::size_t i = 0;\n        for (; i < array_length(step_function_descriptors) &&\n               step_function_descriptors[i].function != range.step.step_function;\n             ++i) {\n        }\n        if (i >= array_length(step_function_descriptors)) {\n            throw std::invalid_argument(\"unknown step function for thread range\");\n        }\n        o << range.first << \":\" << range.last << \":\" << step_function_descriptors[i].mnemonic\n          << range.step.step_function_argument;\n        return o;\n    }\n}; // struct thread_number_range\n//TODO: fix unused warning here\nstatic const char* thread_number_range_desc =\n    \"number of threads to use; a range of the form low[:high[:(+|*|#)step]],\"\n    \"\\n\\twhere low and optional high are non-negative integers or 'auto' for the default choice,\"\n    \"\\n\\tand optional step expression specifies how thread numbers are chosen within the range.\";\n\ninline void report_elapsed_time(double seconds) {\n    std::cout << \"elapsed time : \" << seconds << \" seconds\"\n              << \"\\n\";\n}\n\ninline void report_skipped() {\n    std::cout << \"skip\"\n              << \"\\n\";\n}\n\ninline void report_relative_error(double err) {\n    std::cout << \"Relative_Err : \" << err << \" %\"\n              << \"\\n\";\n}\n\ninline void parse_cli_arguments(int argc, const char* argv[], utility::cli_argument_pack cli_pack) {\n    bool show_help = false;\n    cli_pack.arg(show_help, \"-h\", \"show this message\");\n\n    bool invalid_input = false;\n    try {\n        cli_pack.parse(argc, argv);\n    }\n    catch (std::exception& e) {\n        std::cerr << \"error occurred while parsing command line.\"\n                  << \"\\n\"\n                  << \"error text: \" << e.what() << \"\\n\"\n                  << std::flush;\n        invalid_input = true;\n    }\n    if (show_help || invalid_input) {\n        std::cout << cli_pack.usage_string(argv[0]) << std::flush;\n        std::exit(0);\n    }\n}\ninline void parse_cli_arguments(int argc, char* argv[], utility::cli_argument_pack cli_pack) {\n    parse_cli_arguments(argc, const_cast<const char**>(argv), cli_pack);\n}\n} // namespace utility\n\n#endif /* TBB_examples_utility_H */\n"
  },
  {
    "path": "third-party/tbb/examples/concurrent_hash_map/README.md",
    "content": "# Code Samples of oneAPI Threading Building Blocks (oneTBB)\nThis directory contains examples of the `concurrent_hash_map` container.\n\n| Code sample name | Description\n|:--- |:---\n| count_strings | Concurrently inserts strings into a `concurrent_hash_map` container.\n"
  },
  {
    "path": "third-party/tbb/examples/concurrent_hash_map/count_strings/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(count_strings CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(tbb)\n\nadd_executable(count_strings count_strings.cpp)\n\ntarget_link_libraries(count_strings TBB::tbb Threads::Threads)\ntarget_compile_options(count_strings PRIVATE ${TBB_CXX_STD_FLAG})\n\nset(EXECUTABLE \"$<TARGET_FILE:count_strings>\")\nset(ARGS \"\")\nset(PERF_ARGS auto 10000000 silent)\n\nadd_execution_target(run_count_strings count_strings ${EXECUTABLE} \"${ARGS}\")\nadd_execution_target(perf_run_count_strings count_strings ${EXECUTABLE} \"${PERF_ARGS}\")\n"
  },
  {
    "path": "third-party/tbb/examples/concurrent_hash_map/count_strings/README.md",
    "content": "# Count_strings sample\nThe example counts the number of unique words in a text.\n\n## Building the example\n```\ncmake <path_to_example>\ncmake --build .\n```\n\n## Running the sample\n### Predefined make targets\n* `make run_count_strings` - executes the example with predefined parameters.\n* `make perf_run_count_strings` - executes the example with suggested parameters to measure the oneTBB performance.\n\n### Application parameters\nUsage:\n```\ncount_strings [n-of-threads=value] [n-of-strings=value] [verbose] [silent] [count_collisions] [-h] [n-of-threads [n-of-strings]]\n```\n* `-h` - prints the help for command line options.\n* `n-of-threads` - number of threads to use; a range of the form low\\[:high\\], where low and optional high are non-negative integers or `auto` for a platform-specific default number.\n* `n-of-strings` - number of strings.\n* `verbose` - prints diagnostic output to screen.\n* `silent` - no output except elapsed time.\n"
  },
  {
    "path": "third-party/tbb/examples/concurrent_hash_map/count_strings/count_strings.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <cstring>\n#include <cctype>\n#include <cstdlib>\n#include <cstdio>\n\n#include <string>\n\n// Apple clang and MSVC defines their own specializations for std::hash<std::basic_string<T, Traits, Alloc>>\n#if !(_LIBCPP_VERSION) && !(_CPPLIB_VER)\n\nnamespace std {\n\ntemplate <typename CharT, typename Traits, typename Allocator>\nclass hash<std::basic_string<CharT, Traits, Allocator>> {\npublic:\n    std::size_t operator()(const std::basic_string<CharT, Traits, Allocator>& s) const {\n        std::size_t h = 0;\n        for (const CharT* c = s.c_str(); *c; ++c) {\n            h = h * hash_multiplier ^ char_hash(*c);\n        }\n        return h;\n    }\n\nprivate:\n    static constexpr std::size_t hash_multiplier = (std::size_t)(\n        (sizeof(std::size_t) == sizeof(unsigned)) ? 2654435769U : 11400714819323198485ULL);\n\n    std::hash<CharT> char_hash;\n}; // struct hash<std::basic_string>\n\n} // namespace std\n\n#endif // !(_LIBCPP_VERSION || _CPPLIB_VER)\n\n#include \"oneapi/tbb/concurrent_hash_map.h\"\n#include \"oneapi/tbb/blocked_range.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/tick_count.h\"\n#include \"oneapi/tbb/tbb_allocator.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include \"common/utility/utility.hpp\"\n#include \"common/utility/get_default_num_threads.hpp\"\n\n#include <map>\n\n//! Count collisions\nstd::map<std::size_t, int> hashes;\nint c = 0;\n\n//! String type\ntypedef std::basic_string<char, std::char_traits<char>, oneapi::tbb::tbb_allocator<char>> MyString;\n\n//! Set to true to counts.\nstatic bool verbose = false;\nstatic bool silent = false;\nstatic bool count_collisions = false;\n//! Problem size\nlong N = 1000000;\nconst int size_factor = 2;\n\n//! A concurrent hash table that maps strings to ints.\ntypedef oneapi::tbb::concurrent_hash_map<MyString, int> StringTable;\n\n//! Function object for counting occurrences of strings.\nstruct Tally {\n    StringTable& table;\n    Tally(StringTable& table_) : table(table_) {}\n    void operator()(const oneapi::tbb::blocked_range<MyString*> range) const {\n        for (MyString* p = range.begin(); p != range.end(); ++p) {\n            StringTable::accessor a;\n            table.insert(a, *p);\n            a->second += 1;\n        }\n    }\n};\n\nstatic MyString* Data;\n\nstatic void CountOccurrences(int nthreads) {\n    StringTable table;\n\n    oneapi::tbb::tick_count t0 = oneapi::tbb::tick_count::now();\n    oneapi::tbb::parallel_for(oneapi::tbb::blocked_range<MyString*>(Data, Data + N, 1000),\n                              Tally(table));\n    oneapi::tbb::tick_count t1 = oneapi::tbb::tick_count::now();\n\n    int n = 0;\n    for (StringTable::iterator i = table.begin(); i != table.end(); ++i) {\n        if (verbose && nthreads)\n            printf(\"%s %d\\n\", i->first.c_str(), i->second);\n        if (!silent && count_collisions) {\n            // it doesn't count real collisions in hash_map, a mask should be applied on hash value\n            hashes[std::hash<MyString>()(i->first) & 0xFFFF]++;\n        }\n        n += i->second;\n    }\n    if (!silent && count_collisions) {\n        for (auto i = hashes.begin(); i != hashes.end(); ++i)\n            c += i->second - 1;\n        printf(\"hashes = %d  collisions = %d  \", static_cast<int>(hashes.size()), c);\n        c = 0;\n        hashes.clear();\n    }\n\n    if (!silent)\n        printf(\n            \"total = %d  unique = %u  time = %g\\n\", n, unsigned(table.size()), (t1 - t0).seconds());\n}\n\n/// Generator of random words\n\nstruct Sound {\n    const char* chars;\n    int rates[3]; // beginning, middle, ending\n};\nSound Vowels[] = {\n    { \"e\", { 445, 6220, 1762 } }, { \"a\", { 704, 5262, 514 } }, { \"i\", { 402, 5224, 162 } },\n    { \"o\", { 248, 3726, 191 } },  { \"u\", { 155, 1669, 23 } },  { \"y\", { 4, 400, 989 } },\n    { \"io\", { 5, 512, 18 } },     { \"ia\", { 1, 329, 111 } },   { \"ea\", { 21, 370, 16 } },\n    { \"ou\", { 32, 298, 4 } },     { \"ie\", { 0, 177, 140 } },   { \"ee\", { 2, 183, 57 } },\n    { \"ai\", { 17, 206, 7 } },     { \"oo\", { 1, 215, 7 } },     { \"au\", { 40, 111, 2 } },\n    { \"ua\", { 0, 102, 4 } },      { \"ui\", { 0, 104, 1 } },     { \"ei\", { 6, 94, 3 } },\n    { \"ue\", { 0, 67, 28 } },      { \"ay\", { 1, 42, 52 } },     { \"ey\", { 1, 14, 80 } },\n    { \"oa\", { 5, 84, 3 } },       { \"oi\", { 2, 81, 1 } },      { \"eo\", { 1, 71, 5 } },\n    { \"iou\", { 0, 61, 0 } },      { \"oe\", { 2, 46, 9 } },      { \"eu\", { 12, 43, 0 } },\n    { \"iu\", { 0, 45, 0 } },       { \"ya\", { 12, 19, 5 } },     { \"ae\", { 7, 18, 10 } },\n    { \"oy\", { 0, 10, 13 } },      { \"ye\", { 8, 7, 7 } },       { \"ion\", { 0, 0, 20 } },\n    { \"ing\", { 0, 0, 20 } },      { \"ium\", { 0, 0, 10 } },     { \"er\", { 0, 0, 20 } }\n};\nSound Consonants[] = {\n    { \"r\", { 483, 1414, 1110 } }, { \"n\", { 312, 1548, 1114 } }, { \"t\", { 363, 1653, 251 } },\n    { \"l\", { 424, 1341, 489 } },  { \"c\", { 734, 735, 260 } },   { \"m\", { 732, 785, 161 } },\n    { \"d\", { 558, 612, 389 } },   { \"s\", { 574, 570, 405 } },   { \"p\", { 519, 361, 98 } },\n    { \"b\", { 528, 356, 30 } },    { \"v\", { 197, 598, 16 } },    { \"ss\", { 3, 191, 567 } },\n    { \"g\", { 285, 430, 42 } },    { \"st\", { 142, 323, 180 } },  { \"h\", { 470, 89, 30 } },\n    { \"nt\", { 0, 350, 231 } },    { \"ng\", { 0, 117, 442 } },    { \"f\", { 319, 194, 19 } },\n    { \"ll\", { 1, 414, 83 } },     { \"w\", { 249, 131, 64 } },    { \"k\", { 154, 179, 47 } },\n    { \"nd\", { 0, 279, 92 } },     { \"bl\", { 62, 235, 0 } },     { \"z\", { 35, 223, 16 } },\n    { \"sh\", { 112, 69, 79 } },    { \"ch\", { 139, 95, 25 } },    { \"th\", { 70, 143, 39 } },\n    { \"tt\", { 0, 219, 19 } },     { \"tr\", { 131, 104, 0 } },    { \"pr\", { 186, 41, 0 } },\n    { \"nc\", { 0, 223, 2 } },      { \"j\", { 184, 32, 1 } },      { \"nn\", { 0, 188, 20 } },\n    { \"rt\", { 0, 148, 51 } },     { \"ct\", { 0, 160, 29 } },     { \"rr\", { 0, 182, 3 } },\n    { \"gr\", { 98, 87, 0 } },      { \"ck\", { 0, 92, 86 } },      { \"rd\", { 0, 81, 88 } },\n    { \"x\", { 8, 102, 48 } },      { \"ph\", { 47, 101, 10 } },    { \"br\", { 115, 43, 0 } },\n    { \"cr\", { 92, 60, 0 } },      { \"rm\", { 0, 131, 18 } },     { \"ns\", { 0, 124, 18 } },\n    { \"sp\", { 81, 55, 4 } },      { \"sm\", { 25, 29, 85 } },     { \"sc\", { 53, 83, 1 } },\n    { \"rn\", { 0, 100, 30 } },     { \"cl\", { 78, 42, 0 } },      { \"mm\", { 0, 116, 0 } },\n    { \"pp\", { 0, 114, 2 } },      { \"mp\", { 0, 99, 14 } },      { \"rs\", { 0, 96, 16 } },\n    { \"rl\", { 0, 97, 7 } },       { \"rg\", { 0, 81, 15 } },      { \"pl\", { 56, 39, 0 } },\n    { \"sn\", { 32, 62, 1 } },      { \"str\", { 38, 56, 0 } },     { \"dr\", { 47, 44, 0 } },\n    { \"fl\", { 77, 13, 1 } },      { \"fr\", { 77, 11, 0 } },      { \"ld\", { 0, 47, 38 } },\n    { \"ff\", { 0, 62, 20 } },      { \"lt\", { 0, 61, 19 } },      { \"rb\", { 0, 75, 4 } },\n    { \"mb\", { 0, 72, 7 } },       { \"rc\", { 0, 76, 1 } },       { \"gg\", { 0, 74, 1 } },\n    { \"pt\", { 1, 56, 10 } },      { \"bb\", { 0, 64, 1 } },       { \"sl\", { 48, 17, 0 } },\n    { \"dd\", { 0, 59, 2 } },       { \"gn\", { 3, 50, 4 } },       { \"rk\", { 0, 30, 28 } },\n    { \"nk\", { 0, 35, 20 } },      { \"gl\", { 40, 14, 0 } },      { \"wh\", { 45, 6, 0 } },\n    { \"ntr\", { 0, 50, 0 } },      { \"rv\", { 0, 47, 1 } },       { \"ght\", { 0, 19, 29 } },\n    { \"sk\", { 23, 17, 5 } },      { \"nf\", { 0, 46, 0 } },       { \"cc\", { 0, 45, 0 } },\n    { \"ln\", { 0, 41, 0 } },       { \"sw\", { 36, 4, 0 } },       { \"rp\", { 0, 36, 4 } },\n    { \"dn\", { 0, 38, 0 } },       { \"ps\", { 14, 19, 5 } },      { \"nv\", { 0, 38, 0 } },\n    { \"tch\", { 0, 21, 16 } },     { \"nch\", { 0, 26, 11 } },     { \"lv\", { 0, 35, 0 } },\n    { \"wn\", { 0, 14, 21 } },      { \"rf\", { 0, 32, 3 } },       { \"lm\", { 0, 30, 5 } },\n    { \"dg\", { 0, 34, 0 } },       { \"ft\", { 0, 18, 15 } },      { \"scr\", { 23, 10, 0 } },\n    { \"rch\", { 0, 24, 6 } },      { \"rth\", { 0, 23, 7 } },      { \"rh\", { 13, 15, 0 } },\n    { \"mpl\", { 0, 29, 0 } },      { \"cs\", { 0, 1, 27 } },       { \"gh\", { 4, 10, 13 } },\n    { \"ls\", { 0, 23, 3 } },       { \"ndr\", { 0, 25, 0 } },      { \"tl\", { 0, 23, 1 } },\n    { \"ngl\", { 0, 25, 0 } },      { \"lk\", { 0, 15, 9 } },       { \"rw\", { 0, 23, 0 } },\n    { \"lb\", { 0, 23, 1 } },       { \"tw\", { 15, 8, 0 } },       { \"chr\", { 18, 4, 0 } },\n    { \"dl\", { 0, 23, 0 } },       { \"ctr\", { 0, 22, 0 } },      { \"nst\", { 0, 21, 0 } },\n    { \"lc\", { 0, 22, 0 } },       { \"sch\", { 16, 4, 0 } },      { \"ths\", { 0, 1, 20 } },\n    { \"nl\", { 0, 21, 0 } },       { \"lf\", { 0, 15, 6 } },       { \"ssn\", { 0, 20, 0 } },\n    { \"xt\", { 0, 18, 1 } },       { \"xp\", { 0, 20, 0 } },       { \"rst\", { 0, 15, 5 } },\n    { \"nh\", { 0, 19, 0 } },       { \"wr\", { 14, 5, 0 } }\n};\nconst int VowelsNumber = sizeof(Vowels) / sizeof(Sound);\nconst int ConsonantsNumber = sizeof(Consonants) / sizeof(Sound);\nint VowelsRatesSum[3] = { 0, 0, 0 }, ConsonantsRatesSum[3] = { 0, 0, 0 };\n\nint CountRateSum(Sound sounds[], const int num, const int part) {\n    int sum = 0;\n    for (int i = 0; i < num; i++)\n        sum += sounds[i].rates[part];\n    return sum;\n}\n\nconst char* GetLetters(int type, const int part) {\n    Sound* sounds;\n    int rate, i = 0;\n    if (type & 1)\n        sounds = Vowels, rate = rand() % VowelsRatesSum[part];\n    else\n        sounds = Consonants, rate = rand() % ConsonantsRatesSum[part];\n    do {\n        rate -= sounds[i++].rates[part];\n    } while (rate > 0);\n    return sounds[--i].chars;\n}\n\nstatic void CreateData() {\n    for (int i = 0; i < 3; i++) {\n        ConsonantsRatesSum[i] = CountRateSum(Consonants, ConsonantsNumber, i);\n        VowelsRatesSum[i] = CountRateSum(Vowels, VowelsNumber, i);\n    }\n    for (int i = 0; i < N; ++i) {\n        int type = rand();\n        Data[i] = GetLetters(type++, 0);\n        for (int j = 0; j < type % size_factor; ++j)\n            Data[i] += GetLetters(type++, 1);\n        Data[i] += GetLetters(type, 2);\n    }\n    MyString planet = Data[12];\n    planet[0] = toupper(planet[0]);\n    MyString helloworld = Data[0];\n    helloworld[0] = toupper(helloworld[0]);\n    helloworld += \", \" + Data[1] + \" \" + Data[2] + \" \" + Data[3] + \" \" + Data[4] + \" \" + Data[5];\n    if (!silent)\n        printf(\"Message from planet '%s': %s!\\nAnalyzing whole text...\\n\",\n               planet.c_str(),\n               helloworld.c_str());\n}\n\nint main(int argc, char* argv[]) {\n    StringTable table;\n    oneapi::tbb::tick_count mainStartTime = oneapi::tbb::tick_count::now();\n    srand(2);\n\n    //! Working threads count\n    // The 1st argument is the function to obtain 'auto' value; the 2nd is the default value\n    // The example interprets 0 threads as \"run serially, then fully subscribed\"\n    utility::thread_number_range threads(utility::get_default_num_threads, 0);\n\n    utility::parse_cli_arguments(\n        argc,\n        argv,\n        utility::cli_argument_pack()\n            //\"-h\" option for displaying help is present implicitly\n            .positional_arg(threads, \"n-of-threads\", utility::thread_number_range_desc)\n            .positional_arg(N, \"n-of-strings\", \"number of strings\")\n            .arg(verbose, \"verbose\", \"verbose mode\")\n            .arg(silent, \"silent\", \"no output except elapsed time\")\n            .arg(count_collisions, \"count_collisions\", \"print the count of collisions\"));\n\n    if (silent)\n        verbose = false;\n\n    Data = new MyString[N];\n    CreateData();\n\n    if (threads.first) {\n        for (int p = threads.first; p <= threads.last; p = threads.step(p)) {\n            if (!silent)\n                printf(\"threads = %d  \", p);\n            oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism, p);\n            CountOccurrences(p);\n        }\n    }\n    else { // Number of threads wasn't set explicitly. Run serial and parallel version\n        { // serial run\n            if (!silent)\n                printf(\"serial run   \");\n            oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism, 1);\n            CountOccurrences(1);\n        }\n        { // parallel run (number of threads is selected automatically)\n            if (!silent)\n                printf(\"parallel run \");\n            oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism,\n                                          utility::get_default_num_threads());\n            CountOccurrences(0);\n        }\n    }\n\n    delete[] Data;\n\n    utility::report_elapsed_time((oneapi::tbb::tick_count::now() - mainStartTime).seconds());\n\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/concurrent_priority_queue/README.md",
    "content": "# Code Samples of oneAPI Threading Building Blocks (oneTBB)\nThis directory contains examples of the `concurrent_priority_queue` container.\n\n| Code sample name | Description\n|:--- |:---\n| shortpath | Solves the single source shortest path problem using a  `concurrent_priority_queue` container.\n"
  },
  {
    "path": "third-party/tbb/examples/concurrent_priority_queue/shortpath/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(shortpath CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(tbb)\n\nadd_executable(shortpath shortpath.cpp)\n\ntarget_link_libraries(shortpath TBB::tbb Threads::Threads)\ntarget_compile_options(shortpath PRIVATE ${TBB_CXX_STD_FLAG})\n\nset(EXECUTABLE \"$<TARGET_FILE:shortpath>\")\nset(ARGS 4 N=1000 start=0 end=999 verbose)\nset(PERF_ARGS auto N=1000 start=0 end=99 silent)\n\nadd_execution_target(run_shortpath shortpath ${EXECUTABLE} \"${ARGS}\")\nadd_execution_target(perf_run_shortpath shortpath ${EXECUTABLE} \"${PERF_ARGS}\")\n"
  },
  {
    "path": "third-party/tbb/examples/concurrent_priority_queue/shortpath/README.md",
    "content": "# Shortpath sample\nThis directory contains an example that solves the single source shortest path problem.\n\nIt is parameterized by `N`, a number of nodes, and a start and end node in `[0..N)`. A graph is generated with `N` nodes and some random number of connections between those nodes. A parallel algorithm based on `A*` is used to find the shortest path.\n\nThis algorithm varies from serial `A*` in that it needs to add nodes back to the open set when the `g` estimate (shortest path from start to the node) is improved, even if the node has already been \"visited\". This is because nodes are added and removed from the open-set in parallel, resulting in some less optimal paths being explored. The open-set is implemented with the `concurrent_priority_queue`.\n\nNote that since we re-visit nodes, the `f` estimate (on which the priority queue is sorted) is not technically needed, so we could use this same parallel algorithm with just a `concurrent_queue`. However, keeping the `f` estimate and using `concurrent_priority_queue` results in much better performance.\n\nSilent mode prints run time only, regular mode prints the shortest path length, and verbose mode prints out the shortest path.\n\nThe generated graph follows a pattern in which the closer two pairs of node ids are together, the fewer hops there are in a typical path between those nodes. So, for example, the path between 5 and 7 likely has few hops whereas 14 to 78 has more and 0 to 9999 has even more, etc.\n\n## Building the example\n```\ncmake <path_to_example>\ncmake --build .\n```\n\n## Running the sample\n### Predefined make targets\n* `make run_shortpath` - executes the example with predefined parameters.\n* `make perf_run_shortpath` - executes the example with suggested parameters to measure the oneTBB performance.\n\n### Application parameters\nUsage:\n```\nshortpath [#threads=value] [verbose] [silent] [N=value] [start=value] [end=value] [-h] [#threads]\n```\n* `-h` - prints the help for command line options.\n* `n-of-threads` - number of threads to use; a range of the form low[:high], where low and optional high are non-negative integers or `auto` for a platform-specific default number.\n* `verbose` - prints diagnostic output to screen.\n* `silent` - no output except elapsed time.\n* `N` - number of nodes in graph.\n* `start` - node to start path at.\n* `end` - node to end path at.\n"
  },
  {
    "path": "third-party/tbb/examples/concurrent_priority_queue/shortpath/shortpath.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <cmath>\n#include <cstdio>\n\n#include <vector>\n#include <atomic>\n\n#include \"oneapi/tbb/tick_count.h\"\n#include \"oneapi/tbb/task_group.h\"\n#include \"oneapi/tbb/concurrent_priority_queue.h\"\n#include \"oneapi/tbb/spin_mutex.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/blocked_range.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include \"common/utility/utility.hpp\"\n#include \"common/utility/fast_random.hpp\"\n#include \"common/utility/get_default_num_threads.hpp\"\n\n#if defined(_MSC_VER) && defined(_Wp64)\n// Workaround for overzealous compiler warnings in /Wp64 mode\n#pragma warning(disable : 4267)\n#endif /* _MSC_VER && _Wp64 */\n\nstruct point {\n    double x, y;\n    point() {}\n    point(double _x, double _y) : x(_x), y(_y) {}\n    point(const point& p) : x(p.x), y(p.y) {}\n};\n\ndouble get_distance(const point& p1, const point& p2) {\n    double xdiff = p1.x - p2.x, ydiff = p1.y - p2.y;\n    return sqrt(xdiff * xdiff + ydiff * ydiff);\n}\n\n// generates random points on 2D plane within a box of maxsize width & height\npoint generate_random_point(utility::FastRandom& mr) {\n    const std::size_t maxsize = 500;\n    double x = (double)(mr.get() % maxsize);\n    double y = (double)(mr.get() % maxsize);\n    return point(x, y);\n}\n\n// weighted toss makes closer nodes (in the point vector) heavily connected\nbool die_toss(std::size_t a, std::size_t b, utility::FastRandom& mr) {\n    int node_diff = std::abs(int(a - b));\n    // near nodes\n    if (node_diff < 16)\n        return true;\n    // mid nodes\n    if (node_diff < 64)\n        return ((int)mr.get() % 8 == 0);\n    // far nodes\n    if (node_diff < 512)\n        return ((int)mr.get() % 16 == 0);\n    return false;\n}\n\ntypedef std::vector<point> point_set;\ntypedef std::size_t vertex_id;\ntypedef std::pair<vertex_id, double> vertex_rec;\ntypedef std::vector<std::vector<vertex_id>> edge_set;\n\nbool verbose = false; // prints bin details and other diagnostics to screen\nbool silent = false; // suppress all output except for time\nstd::size_t N = 1000; // number of vertices\nstd::size_t src = 0; // start of path\nstd::size_t dst = N - 1; // end of path\ndouble INF = 100000.0; // infinity\nstd::size_t grainsize = 16; // number of vertices per task on average\nstd::size_t max_spawn; // max tasks to spawn\nstd::atomic<std::size_t> num_spawn; // number of active tasks\n\npoint_set vertices; // vertices\nedge_set edges; // edges\nstd::vector<vertex_id> predecessor; // for recreating path from src to dst\n\nstd::vector<double> f_distance; // estimated distances at particular vertex\nstd::vector<double> g_distance; // current shortest distances from src vertex\noneapi::tbb::spin_mutex* locks; // a lock for each vertex\noneapi::tbb::task_group* sp_group; // task group for tasks executing sub-problems\n\nstruct compare_f {\n    bool operator()(const vertex_rec& u, const vertex_rec& v) const {\n        return u.second > v.second;\n    }\n};\n\noneapi::tbb::concurrent_priority_queue<vertex_rec, compare_f> open_set; // tentative vertices\n\nvoid shortpath_helper();\n\nvoid shortpath() {\n    sp_group = new oneapi::tbb::task_group;\n    g_distance[src] = 0.0; // src's distance from src is zero\n    f_distance[src] =\n        get_distance(vertices[src], vertices[dst]); // estimate distance from src to dst\n    open_set.emplace(src, f_distance[src]); // emplace src into open_set\n    sp_group->run([]() {\n        shortpath_helper();\n    });\n    sp_group->wait();\n    delete sp_group;\n}\n\nvoid shortpath_helper() {\n    vertex_rec u_rec;\n    while (open_set.try_pop(u_rec)) {\n        vertex_id u = u_rec.first;\n        if (u == dst)\n            continue;\n        double f = u_rec.second;\n        double old_g_u = 0.0;\n        {\n            oneapi::tbb::spin_mutex::scoped_lock l(locks[u]);\n            if (f > f_distance[u])\n                continue; // prune search space\n            old_g_u = g_distance[u];\n        }\n        for (std::size_t i = 0; i < edges[u].size(); ++i) {\n            vertex_id v = edges[u][i];\n            double new_g_v = old_g_u + get_distance(vertices[u], vertices[v]);\n            double new_f_v = 0.0;\n            // the push flag lets us move some work out of the critical section below\n            bool push = false;\n            {\n                oneapi::tbb::spin_mutex::scoped_lock l(locks[v]);\n                if (new_g_v < g_distance[v]) {\n                    predecessor[v] = u;\n                    g_distance[v] = new_g_v;\n                    new_f_v = f_distance[v] =\n                        g_distance[v] + get_distance(vertices[v], vertices[dst]);\n                    push = true;\n                }\n            }\n            if (push) {\n                open_set.push(std::make_pair(v, new_f_v));\n                std::size_t n_spawn = ++num_spawn;\n                if (n_spawn < max_spawn) {\n                    sp_group->run([] {\n                        shortpath_helper();\n                    });\n                }\n                else\n                    --num_spawn;\n            }\n        }\n    }\n    --num_spawn;\n}\n\nvoid make_path(vertex_id src, vertex_id dst, std::vector<vertex_id>& path) {\n    vertex_id at = predecessor[dst];\n    if (at == N)\n        path.push_back(src);\n    else if (at == src) {\n        path.push_back(src);\n        path.push_back(dst);\n    }\n    else {\n        make_path(src, at, path);\n        path.push_back(dst);\n    }\n}\n\nvoid print_path() {\n    std::vector<vertex_id> path;\n    double path_length = 0.0;\n    make_path(src, dst, path);\n    if (verbose)\n        printf(\"\\n      \");\n    for (std::size_t i = 0; i < path.size(); ++i) {\n        if (path[i] != dst) {\n            double seg_length = get_distance(vertices[path[i]], vertices[path[i + 1]]);\n            if (verbose)\n                printf(\"%6.1f       \", seg_length);\n            path_length += seg_length;\n        }\n        else if (verbose)\n            printf(\"\\n\");\n    }\n    if (verbose) {\n        for (std::size_t i = 0; i < path.size(); ++i) {\n            if (path[i] != dst)\n                printf(\"(%4d)------>\", (int)path[i]);\n            else\n                printf(\"(%4d)\\n\", (int)path[i]);\n        }\n    }\n    if (verbose)\n        printf(\"Total distance = %5.1f\\n\", path_length);\n    else if (!silent)\n        printf(\" %5.1f\\n\", path_length);\n}\n\nvoid InitializeGraph() {\n    oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism,\n                                  utility::get_default_num_threads());\n    vertices.resize(N);\n    edges.resize(N);\n    predecessor.resize(N);\n    g_distance.resize(N);\n    f_distance.resize(N);\n    locks = new oneapi::tbb::spin_mutex[N];\n\n    if (verbose)\n        printf(\"Generating vertices...\\n\");\n    oneapi::tbb::parallel_for(\n        oneapi::tbb::blocked_range<std::size_t>(0, N, 64),\n        [&](oneapi::tbb::blocked_range<std::size_t>& r) {\n            utility::FastRandom my_random(r.begin());\n            for (std::size_t i = r.begin(); i != r.end(); ++i) {\n                vertices[i] = generate_random_point(my_random);\n            }\n        },\n        oneapi::tbb::simple_partitioner());\n\n    if (verbose)\n        printf(\"Generating edges...\\n\");\n    oneapi::tbb::parallel_for(\n        oneapi::tbb::blocked_range<std::size_t>(0, N, 64),\n        [&](oneapi::tbb::blocked_range<std::size_t>& r) {\n            utility::FastRandom my_random(r.begin());\n            for (std::size_t i = r.begin(); i != r.end(); ++i) {\n                for (std::size_t j = 0; j < i; ++j) {\n                    if (die_toss(i, j, my_random))\n                        edges[i].push_back(j);\n                }\n            }\n        },\n        oneapi::tbb::simple_partitioner());\n\n    for (std::size_t i = 0; i < N; ++i) {\n        for (std::size_t j = 0; j < edges[i].size(); ++j) {\n            vertex_id k = edges[i][j];\n            edges[k].push_back(i);\n        }\n    }\n    if (verbose)\n        printf(\"Done.\\n\");\n}\n\nvoid ReleaseGraph() {\n    delete[] locks;\n}\n\nvoid ResetGraph() {\n    oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism,\n                                  utility::get_default_num_threads());\n    oneapi::tbb::parallel_for(oneapi::tbb::blocked_range<std::size_t>(0, N),\n                              [&](oneapi::tbb::blocked_range<std::size_t>& r) {\n                                  for (std::size_t i = r.begin(); i != r.end(); ++i) {\n                                      f_distance[i] = g_distance[i] = INF;\n                                      predecessor[i] = N;\n                                  }\n                              });\n}\n\nint main(int argc, char* argv[]) {\n    utility::thread_number_range threads(utility::get_default_num_threads);\n    utility::parse_cli_arguments(\n        argc,\n        argv,\n        utility::cli_argument_pack()\n            //\"-h\" option for displaying help is present implicitly\n            .positional_arg(threads, \"#threads\", utility::thread_number_range_desc)\n            .arg(verbose, \"verbose\", \"   print diagnostic output to screen\")\n            .arg(silent, \"silent\", \"    limits output to timing info; overrides verbose\")\n            .arg(N, \"N\", \"         number of vertices\")\n            .arg(src, \"start\", \"      start of path\")\n            .arg(dst, \"end\", \"        end of path\"));\n    if (silent)\n        verbose = false; // make silent override verbose\n    else\n        printf(\"shortpath will run with %d vertices to find shortest path between vertices\"\n               \" %d and %d using %d:%d threads.\\n\",\n               (int)N,\n               (int)src,\n               (int)dst,\n               (int)threads.first,\n               (int)threads.last);\n\n    if (dst >= N) {\n        if (verbose)\n            printf(\"end value %d is invalid for %d vertices; correcting to %d\\n\",\n                   (int)dst,\n                   (int)N,\n                   (int)N - 1);\n        dst = N - 1;\n    }\n\n    num_spawn = 0;\n    max_spawn = N / grainsize;\n    oneapi::tbb::tick_count t0, t1;\n    InitializeGraph();\n    for (int n_thr = threads.first; n_thr <= threads.last; n_thr = threads.step(n_thr)) {\n        ResetGraph();\n        oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism, n_thr);\n        t0 = oneapi::tbb::tick_count::now();\n        shortpath();\n        t1 = oneapi::tbb::tick_count::now();\n        if (!silent) {\n            if (predecessor[dst] != N) {\n                printf(\"%d threads: [%6.6f] The shortest path from vertex %d to vertex %d is:\",\n                       (int)n_thr,\n                       (t1 - t0).seconds(),\n                       (int)src,\n                       (int)dst);\n                print_path();\n            }\n            else {\n                printf(\"%d threads: [%6.6f] There is no path from vertex %d to vertex %d\\n\",\n                       (int)n_thr,\n                       (t1 - t0).seconds(),\n                       (int)src,\n                       (int)dst);\n            }\n        }\n        else\n            utility::report_elapsed_time((t1 - t0).seconds());\n    }\n    ReleaseGraph();\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/getting_started/README.md",
    "content": "# Code Samples of oneAPI Threading Building Blocks (oneTBB)\nThis directory contains the examples referenced by the [oneAPI Threading Building Blocks Get Started Guide](https://www.intel.com/content/www/us/en/docs/onetbb/get-started-guide/current/overview.html)\n\n| Code sample name | Description\n|:--- |:---\n| sub_string_finder | Finds largest matching substrings.\n"
  },
  {
    "path": "third-party/tbb/examples/getting_started/sub_string_finder/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(sub_string_finder_simple CXX)\nproject(sub_string_finder_extended CXX)\nproject(sub_string_finder_pretty CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(tbb)\n\nadd_executable(sub_string_finder_simple sub_string_finder.cpp)\nadd_executable(sub_string_finder_extended sub_string_finder_extended.cpp)\nadd_executable(sub_string_finder_pretty sub_string_finder_pretty.cpp)\n\ntarget_link_libraries(sub_string_finder_simple TBB::tbb Threads::Threads)\ntarget_link_libraries(sub_string_finder_extended TBB::tbb Threads::Threads)\ntarget_link_libraries(sub_string_finder_pretty TBB::tbb Threads::Threads)\n\ntarget_compile_options(sub_string_finder_simple PRIVATE ${TBB_CXX_STD_FLAG})\ntarget_compile_options(sub_string_finder_extended PRIVATE ${TBB_CXX_STD_FLAG})\ntarget_compile_options(sub_string_finder_pretty PRIVATE ${TBB_CXX_STD_FLAG})\n\nadd_custom_target(sub_string_finder)\nadd_dependencies(sub_string_finder sub_string_finder_simple sub_string_finder_extended sub_string_finder_pretty)\n\nset(EXECUTABLE \"$<TARGET_FILE:sub_string_finder_extended>\")\nset(LIGHT_EXECUTABLE \"$<TARGET_FILE:sub_string_finder_simple>\")\nset(ARGS \"\")\nset(LIGHT_ARGS \"silent\")\n\nadd_execution_target(run_sub_string_finder sub_string_finder ${EXECUTABLE} \"${ARGS}\")\nadd_execution_target(light_test_sub_string_finder sub_string_finder ${LIGHT_EXECUTABLE} \"${LIGHT_ARGS}\")\n"
  },
  {
    "path": "third-party/tbb/examples/getting_started/sub_string_finder/README.md",
    "content": "# Sub_string_finder sample\nAn example that uses the `parallel_for` template in a substring matching program. The [oneAPI Threading Building Blocks Get Started Guide](https://www.intel.com/content/www/us/en/docs/onetbb/get-started-guide/current/overview.html) describes this example.\n\nFor each position in a string, the program displays the length of the largest matching substring elsewhere in the string. The program also displays the location of a largest match for each position. Consider the string \"babba\" as an example. Starting at position 0, \"ba\" is the largest substring with a match elsewhere in the string (position 3).\n\n## Building the example\n```\ncmake <path_to_example>\ncmake --build .\n```\n\n### Predefined make targets\n* `make sub_string_finder_simple` - builds the example as it appears in the Get Started Guide.\n* `make sub_string_finder_extended` - builds the similar example with more attractive printing of the results.\n* `make sub_string_finder_pretty` - builds the example extended with a sequential implementation.\n* `make sub_string_finder` - builds all sample versions.\n\n## Running the sample\n### Predefined make targets\n* `make run_sub_string_finder` - executes the example with predefined parameters.\n* `make light_test_sub_string_finder` - executes the example with suggested parameters to reduce execution time.\n\n### Application parameters\nUsage:\n```\nsub_string_finder_simple\nsub_string_finder_extended\nsub_string_finder_pretty\n```\n\nThe example does not requires application parameters.\n"
  },
  {
    "path": "third-party/tbb/examples/getting_started/sub_string_finder/sub_string_finder.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <iostream>\n#include <string>\n#include <vector>\n#include <algorithm> // std::max\n\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/blocked_range.h\"\n\n#include \"common/utility/utility.hpp\"\n\nbool silent = false;\n\nstatic const std::size_t N = 23;\n\nclass SubStringFinder {\n    const std::string &str;\n    std::vector<std::size_t> &max_array;\n    std::vector<std::size_t> &pos_array;\n\npublic:\n    void operator()(const oneapi::tbb::blocked_range<std::size_t> &r) const {\n        for (std::size_t i = r.begin(); i != r.end(); ++i) {\n            std::size_t max_size = 0, max_pos = 0;\n            for (std::size_t j = 0; j < str.size(); ++j) {\n                if (j != i) {\n                    std::size_t limit = str.size() - (std::max)(i, j);\n                    for (std::size_t k = 0; k < limit; ++k) {\n                        if (str[i + k] != str[j + k])\n                            break;\n                        if (k > max_size) {\n                            max_size = k;\n                            max_pos = j;\n                        }\n                    }\n                }\n            }\n            max_array[i] = max_size;\n            pos_array[i] = max_pos;\n        }\n    }\n\n    SubStringFinder(const std::string &s, std::vector<std::size_t> &m, std::vector<std::size_t> &p)\n            : str(s),\n              max_array(m),\n              pos_array(p) {}\n};\n\nint main(int argc, char *argv[]) {\n    // command line parsing\n    utility::parse_cli_arguments(argc,\n                                 argv,\n                                 utility::cli_argument_pack()\n                                     //\"-h\" option for displaying help is present implicitly\n                                     .arg(silent, \"silent\", \"no output\"));\n\n    std::string str[N] = { std::string(\"a\"), std::string(\"b\") };\n    for (std::size_t i = 2; i < N; ++i)\n        str[i] = str[i - 1] + str[i - 2];\n    std::string &to_scan = str[N - 1];\n    const std::size_t num_elem = to_scan.size();\n\n    std::vector<std::size_t> max(num_elem);\n    std::vector<std::size_t> pos(num_elem);\n\n    oneapi::tbb::parallel_for(oneapi::tbb::blocked_range<std::size_t>(0, num_elem),\n                              SubStringFinder(to_scan, max, pos));\n\n    for (std::size_t i = 0; i < num_elem; ++i)\n        if (!silent)\n            std::cout << \" \" << max[i] << \"(\" << pos[i] << \")\"\n                      << \"\\n\";\n\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/getting_started/sub_string_finder/sub_string_finder_extended.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <iostream>\n#include <string>\n#include <vector>\n#include <algorithm> // std::max\n\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/blocked_range.h\"\n#include \"oneapi/tbb/tick_count.h\"\n\nstatic const std::size_t N = 22;\n\nvoid SerialSubStringFinder(const std::string &str,\n                           std::vector<std::size_t> &max_array,\n                           std::vector<std::size_t> &pos_array) {\n    for (std::size_t i = 0; i < str.size(); ++i) {\n        std::size_t max_size = 0, max_pos = 0;\n        for (std::size_t j = 0; j < str.size(); ++j)\n            if (j != i) {\n                std::size_t limit = str.size() - (std::max)(i, j);\n                for (std::size_t k = 0; k < limit; ++k) {\n                    if (str[i + k] != str[j + k])\n                        break;\n                    if (k > max_size) {\n                        max_size = k;\n                        max_pos = j;\n                    }\n                }\n            }\n        max_array[i] = max_size;\n        pos_array[i] = max_pos;\n    }\n}\n\nclass SubStringFinder {\n    const char *str;\n    const std::size_t len;\n    std::size_t *max_array;\n    std::size_t *pos_array;\n\npublic:\n    void operator()(const oneapi::tbb::blocked_range<std::size_t> &r) const {\n        for (std::size_t i = r.begin(); i != r.end(); ++i) {\n            std::size_t max_size = 0, max_pos = 0;\n            for (std::size_t j = 0; j < len; ++j) {\n                if (j != i) {\n                    std::size_t limit = len - (std::max)(i, j);\n                    for (std::size_t k = 0; k < limit; ++k) {\n                        if (str[i + k] != str[j + k])\n                            break;\n                        if (k > max_size) {\n                            max_size = k;\n                            max_pos = j;\n                        }\n                    }\n                }\n            }\n            max_array[i] = max_size;\n            pos_array[i] = max_pos;\n        }\n    }\n    // We do not use std::vector for compatibility with offload execution\n    SubStringFinder(const char *s, const std::size_t s_len, std::size_t *m, std::size_t *p)\n            : str(s),\n              len(s_len),\n              max_array(m),\n              pos_array(p) {}\n};\n\nint main() {\n    std::string str[N] = { std::string(\"a\"), std::string(\"b\") };\n    for (std::size_t i = 2; i < N; ++i)\n        str[i] = str[i - 1] + str[i - 2];\n    std::string &to_scan = str[N - 1];\n    const std::size_t num_elem = to_scan.size();\n\n    std::vector<std::size_t> max1(num_elem);\n    std::vector<std::size_t> pos1(num_elem);\n    std::vector<std::size_t> max2(num_elem);\n    std::vector<std::size_t> pos2(num_elem);\n\n    std::cout << \" Done building string.\"\n              << \"\\n\";\n\n    oneapi::tbb::tick_count serial_t0 = oneapi::tbb::tick_count::now();\n    SerialSubStringFinder(to_scan, max2, pos2);\n    oneapi::tbb::tick_count serial_t1 = oneapi::tbb::tick_count::now();\n    std::cout << \" Done with serial version.\"\n              << \"\\n\";\n\n    oneapi::tbb::tick_count parallel_t0 = oneapi::tbb::tick_count::now();\n    oneapi::tbb::parallel_for(oneapi::tbb::blocked_range<std::size_t>(0, num_elem, 100),\n                              SubStringFinder(to_scan.c_str(), num_elem, &max1[0], &pos1[0]));\n    oneapi::tbb::tick_count parallel_t1 = oneapi::tbb::tick_count::now();\n    std::cout << \" Done with parallel version.\"\n              << \"\\n\";\n\n    for (std::size_t i = 0; i < num_elem; ++i) {\n        if (max1[i] != max2[i] || pos1[i] != pos2[i]) {\n            std::cout << \"ERROR: Serial and Parallel Results are Different!\"\n                      << \"\\n\";\n            break;\n        }\n    }\n    std::cout << \" Done validating results.\"\n              << \"\\n\";\n\n    std::cout << \"Serial version ran in \" << (serial_t1 - serial_t0).seconds() << \" seconds\"\n              << \"\\n\"\n              << \"Parallel version ran in \" << (parallel_t1 - parallel_t0).seconds() << \" seconds\"\n              << \"\\n\"\n              << \"Resulting in a speedup of \"\n              << (serial_t1 - serial_t0).seconds() / (parallel_t1 - parallel_t0).seconds() << \"\\n\";\n\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/getting_started/sub_string_finder/sub_string_finder_pretty.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <iostream>\n#include <string>\n#include <algorithm>\n#include <vector>\n#include <algorithm> // std::max\n\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/blocked_range.h\"\n\nstatic const std::size_t N = 9;\n\nclass SubStringFinder {\n    const std::string &str;\n    std::vector<std::size_t> &max_array;\n    std::vector<std::size_t> &pos_array;\n\npublic:\n    void operator()(const oneapi::tbb::blocked_range<std::size_t> &r) const {\n        for (std::size_t i = r.begin(); i != r.end(); ++i) {\n            std::size_t max_size = 0, max_pos = 0;\n            for (std::size_t j = 0; j < str.size(); ++j) {\n                if (j != i) {\n                    std::size_t limit = str.size() - (std::max)(i, j);\n                    for (std::size_t k = 0; k < limit; ++k) {\n                        if (str[i + k] != str[j + k])\n                            break;\n                        if (k + 1 > max_size) {\n                            max_size = k + 1;\n                            max_pos = j;\n                        }\n                    }\n                }\n            }\n            max_array[i] = max_size;\n            pos_array[i] = max_pos;\n        }\n    }\n\n    SubStringFinder(const std::string &s, std::vector<std::size_t> &m, std::vector<std::size_t> &p)\n            : str(s),\n              max_array(m),\n              pos_array(p) {}\n};\n\nint main() {\n    std::string str[N] = { std::string(\"a\"), std::string(\"b\") };\n    for (std::size_t i = 2; i < N; ++i)\n        str[i] = str[i - 1] + str[i - 2];\n    std::string &to_scan = str[N - 1];\n    const std::size_t num_elem = to_scan.size();\n    std::cout << \"String to scan: \" << to_scan << \"\\n\";\n\n    std::vector<std::size_t> max(num_elem);\n    std::vector<std::size_t> pos(num_elem);\n\n    oneapi::tbb::parallel_for(oneapi::tbb::blocked_range<std::size_t>(0, num_elem, 100),\n                              SubStringFinder(to_scan, max, pos));\n\n    for (std::size_t i = 0; i < num_elem; ++i) {\n        for (std::size_t j = 0; j < num_elem; ++j) {\n            if (j >= i && j < i + max[i])\n                std::cout << \"_\";\n            else\n                std::cout << \" \";\n        }\n        std::cout << \"\\n\" << to_scan << \"\\n\";\n\n        for (std::size_t j = 0; j < num_elem; ++j) {\n            if (j >= pos[i] && j < pos[i] + max[i])\n                std::cout << \"*\";\n            else\n                std::cout << \" \";\n        }\n        std::cout << \"\\n\";\n    }\n\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/graph/README.md",
    "content": "# Code Samples of oneAPI Threading Building Blocks (oneTBB)\nExamples using oneTBB Flow Graph feature.\n\n| Code sample name | Description\n|:--- |:---\n| binpack | A solution to the binpacking problem using a `queue_node`, a `buffer_node` and `function_node`s.\n| cholesky | Several versions of Cholesky Factorization algorithm implementation.\n| dining_philosophers | An implementation of dining philosophers in graph using the reserving `join_node`.\n| fgbzip2 | A parallel implementation of bzip2 block-sorting file compressor.\n| logic_sim | An example of a collection of digital logic gates that can be easily composed into larger circuits.\n| som | An example of a Kohonen Self-Organizing Map using cancellation.\n"
  },
  {
    "path": "third-party/tbb/examples/graph/binpack/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(binpack CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(tbb)\n\nadd_executable(binpack binpack.cpp)\n\ntarget_link_libraries(binpack TBB::tbb Threads::Threads)\ntarget_compile_options(binpack PRIVATE ${TBB_CXX_STD_FLAG})\n\nset(EXECUTABLE \"$<TARGET_FILE:binpack>\")\nset(ARGS 4 elements_num=1000)\nset(PERF_ARGS auto elements_num=1000 silent)\n\nadd_execution_target(run_binpack binpack ${EXECUTABLE} \"${ARGS}\")\nadd_execution_target(perf_run_binpack binpack ${EXECUTABLE} \"${PERF_ARGS}\")\n"
  },
  {
    "path": "third-party/tbb/examples/graph/binpack/README.md",
    "content": "# Binpack sample\nThis directory contains an `oneapi::tbb::flow` example that performs binpacking of `N` integer values into a near-optimal number of bins of capacity `V`.\n\nIt features a `source_node` which passes randomly generated integer values of `size <= V` to a `queue_node`. Multiple function nodes set about taking values from this `queue_node` and packing them into bins according to a best-fit policy. Items that cannot be made to fit are rejected and returned to the queue. When a bin is packed as well as it can be, it is passed to a `buffer_node` where it waits to be picked up by another `function_node`. This final function node gathers stats about the bin and optionally prints its contents. When all bins are accounted for, it optionally prints a summary of the quality of the bin-packing.\n\n## Building the example\n```\ncmake <path_to_example>\ncmake --build .\n```\n\n## Running the sample\n### Predefined make targets\n* `make run_binpack` - executes the example with predefined parameters.\n* `make perf_run_binpack` - executes the example with suggested parameters to measure the oneTBB performance.\n\n### Application parameters\nUsage:\n```\nbinpack [#threads=value] [verbose] [silent] [elements_num=value] [bin_capacity=value] [#packers=value] [optimality=value] [-h] [#threads]\n```\n* `-h` - prints the help for command line options.\n* `#threads` - the number of threads to use; a range of the form low\\[:high\\] where low and optional high are non-negative integers, or `auto` for a platform-specific default number.\n* `verbose` - prints diagnostic output to screen.\n* `silent` - limits output to timing info; overrides verbose.\n* `N` - number of values to pack.\n* `V` - capacity of each bin.\n* `#packers` - number of concurrent bin packers to use (`default=#threads`).\n* `optimality` - controls optimality of solution; 1 is highest, use larger numbers for less optimal but faster solution.\n"
  },
  {
    "path": "third-party/tbb/examples/graph/binpack/binpack.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/* Bin-packing algorithm that attempts to use minimal number of bins B of\n   size desired_bin_capacity to contain elements_num items of varying sizes. */\n\n#include <cmath>\n\n#include <string>\n#include <iostream>\n#include <tuple>\n#include <vector>\n#include <atomic>\n#include <algorithm>\n\n#include \"oneapi/tbb/tick_count.h\"\n#include \"oneapi/tbb/flow_graph.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include \"common/utility/utility.hpp\"\n#include \"common/utility/get_default_num_threads.hpp\"\n\ntypedef std::size_t size_type; // to represent non-zero indices, capacities, etc.\ntypedef std::size_t value_type; // the type of items we are attempting to pack into bins\ntypedef std::vector<value_type> bin; // we use a simple vector to represent a bin\n// Our bin packers will be function nodes in the graph that take value_type items and\n// return a dummy value.  They will also implicitly send packed bins to the bin_buffer\n// node, and unused items back to the value_pool node:\ntypedef oneapi::tbb::flow::\n    multifunction_node<value_type, std::tuple<value_type, bin>, oneapi::tbb::flow::rejecting>\n        bin_packer;\n// Items are placed into a pool that all bin packers grab from, represent by a queue_node:\ntypedef oneapi::tbb::flow::queue_node<value_type> value_pool;\n// Packed bins are placed in this buffer waiting to be serially printed and/or accounted for:\ntypedef oneapi::tbb::flow::buffer_node<bin> bin_buffer;\n// Packed bins are taken from the_bin_buffer and processed by the_writer:\ntypedef oneapi::tbb::flow::\n    function_node<bin, oneapi::tbb::flow::continue_msg, oneapi::tbb::flow::rejecting>\n        bin_writer;\n// Items are injected into the graph when this node sends them to the_value_pool:\ntypedef oneapi::tbb::flow::input_node<value_type> value_source;\n\n// User-specified globals with default values\nsize_type desired_bin_capacity = 42;\nsize_type elements_num = 1000; // number of elements to generate\nbool verbose = false; // prints bin details and other diagnostics to screen\nbool silent = false; // suppress all output except for time\nint num_bin_packers = -1; // number of concurrent bin packers in operation; default is #threads;\n    // larger values can result in more bins at less than full capacity\nsize_type optimality =\n    1; // 1 (default) is highest the algorithm can obtain; larger numbers run faster\n\n// Calculated globals\nsize_type bins_num_min; // lower bound on the optimal number of bins\nsize_type bins_num; // the answer, i.e. number of bins used by the algorithm\nstd::vector<size_type> input_array; // stores randomly generated input values\nvalue_type item_sum; // sum of all randomly generated input values\nstd::atomic<value_type> packed_sum; // sum of all values currently packed into all bins\nstd::atomic<size_type> packed_items; // number of values currently packed into all bins\nstd::atomic<size_type> active_bins; // number of active bin_packers\nstd::vector<bin_packer*> bins; // the array of bin packers\n\n// This class is the Body type for bin_packer\nclass bin_filler {\n    typedef bin_packer::output_ports_type ports_type;\n    bin my_bin; // the current bin that this bin_filler is packing\n    size_type\n        my_used; // capacity of bin used by current contents (not to be confused with my_bin.size())\n    size_type relax,\n        relax_val; // relaxation counter for determining when to settle for a non-full bin\n    bin_packer* my_bin_packer; // ptr to the bin packer that this body object is associated with\n    size_type bin_index; // index of the encapsulating bin packer in the global bins array\n    value_type looking_for; // the minimum size of item this bin_packer will accept\n    value_pool* the_value_pool; // the queue of incoming values\n    bool done; // flag to indicate that this binpacker has been deactivated\npublic:\n    bin_filler(std::size_t bidx, value_pool* _q)\n            : my_used(0),\n              relax(0),\n              relax_val(0),\n              my_bin_packer(nullptr),\n              bin_index(bidx),\n              looking_for(desired_bin_capacity),\n              the_value_pool(_q),\n              done(false) {}\n    void operator()(const value_type& item, ports_type& p) {\n        if (!my_bin_packer)\n            my_bin_packer = bins[bin_index];\n        if (done)\n            // this bin_packer is done packing items; put item back to pool\n            std::get<0>(p).try_put(item);\n        else if (\n            item >\n            desired_bin_capacity) { // signal that packed_sum has reached item_sum at some point\n            size_type remaining = active_bins--;\n            if (remaining == 1 &&\n                packed_sum == item_sum) { // this is the last bin and it has seen everything\n                // this bin_packer may not have seen everything, so stay active\n                if (my_used > 0)\n                    std::get<1>(p).try_put(my_bin);\n                my_bin.clear();\n                my_used = 0;\n                looking_for = desired_bin_capacity;\n                ++active_bins;\n            }\n            else if (remaining == 1) { // this is the last bin, but there are remaining items\n                std::get<0>(p).try_put(desired_bin_capacity + 1); // send out signal\n                ++active_bins;\n            }\n            else if (remaining > 1) { // this is not the last bin; deactivate\n                // this bin is ill-utilized; throw back items and deactivate\n                if (my_used < desired_bin_capacity / (1 + optimality * .1)) {\n                    packed_sum -= my_used;\n                    packed_items -= my_bin.size();\n                    for (size_type i = 0; i < my_bin.size(); ++i)\n                        std::get<0>(p).try_put(my_bin[i]);\n                    oneapi::tbb::flow::remove_edge(*the_value_pool, *my_bin_packer); // deactivate\n                    done = true;\n                    std::get<0>(p).try_put(desired_bin_capacity + 1); // send out signal\n                }\n                else { // this bin is well-utilized; send out bin and deactivate\n                    oneapi::tbb::flow::remove_edge(*the_value_pool,\n                                                   *my_bin_packer); // build no more bins\n                    done = true;\n                    if (my_used > 0)\n                        std::get<1>(p).try_put(my_bin);\n                    std::get<0>(p).try_put(desired_bin_capacity + 1); // send out signal\n                }\n            }\n        }\n        else if (item <= desired_bin_capacity - my_used &&\n                 item >= looking_for) { // this item can be packed\n            my_bin.push_back(item);\n            my_used += item;\n            packed_sum += item;\n            ++packed_items;\n            looking_for = desired_bin_capacity - my_used;\n            relax = 0;\n            if (packed_sum == item_sum) {\n                std::get<0>(p).try_put(desired_bin_capacity + 1); // send out signal\n            }\n            if (my_used == desired_bin_capacity) {\n                std::get<1>(p).try_put(my_bin);\n                my_bin.clear();\n                my_used = 0;\n                looking_for = desired_bin_capacity;\n            }\n        }\n        else { // this item can't be packed; relax constraints\n            ++relax;\n            // this bin_packer has looked through enough items\n            if (relax >= (elements_num - packed_items) / optimality) {\n                relax = 0;\n                --looking_for; // accept a wider range of items\n                if (looking_for == 0 && my_used < desired_bin_capacity / (1 + optimality * .1) &&\n                    my_used > 0 && active_bins > 1) {\n                    // this bin_packer is ill-utilized and can't find items; deactivate and throw back items\n                    size_type remaining = active_bins--;\n                    if (remaining > 1) { // not the last bin_packer\n                        oneapi::tbb::flow::remove_edge(*the_value_pool,\n                                                       *my_bin_packer); // deactivate\n                        done = true;\n                    }\n                    else\n                        active_bins++; // can't deactivate last bin_packer\n                    packed_sum -= my_used;\n                    packed_items -= my_bin.size();\n                    for (size_type i = 0; i < my_bin.size(); ++i)\n                        std::get<0>(p).try_put(my_bin[i]);\n                    my_bin.clear();\n                    my_used = 0;\n                }\n                else if (looking_for == 0 &&\n                         (my_used >= desired_bin_capacity / (1 + optimality * .1) ||\n                          active_bins == 1)) {\n                    // this bin_packer can't find items but is well-utilized, so send it out and reset\n                    std::get<1>(p).try_put(my_bin);\n                    my_bin.clear();\n                    my_used = 0;\n                    looking_for = desired_bin_capacity;\n                }\n            }\n            std::get<0>(p).try_put(item); // put unused item back to pool\n        }\n    }\n};\n\n// input node uses this to send the values to the value_pool\nclass item_generator {\n    size_type counter;\n\npublic:\n    item_generator() : counter(0) {}\n    value_type operator()(oneapi::tbb::flow_control& fc) {\n        if (counter < elements_num) {\n            value_type result = input_array[counter];\n            ++counter;\n            return result;\n        }\n\n        fc.stop();\n        return value_type{};\n    }\n};\n\n// the terminal function_node uses this to gather stats and print bin information\nclass bin_printer {\n    value_type running_count;\n    size_type item_count;\n    value_type my_min, my_max;\n    double avg;\n\npublic:\n    bin_printer()\n            : running_count(0),\n              item_count(0),\n              my_min(desired_bin_capacity),\n              my_max(0),\n              avg(0) {}\n    oneapi::tbb::flow::continue_msg operator()(bin b) {\n        value_type sum = 0;\n        ++bins_num;\n        if (verbose)\n            std::cout << \"[ \";\n        for (size_type i = 0; i < b.size(); ++i) {\n            if (verbose)\n                std::cout << b[i] << \" \";\n            sum += b[i];\n            ++item_count;\n        }\n        my_min = std::min(sum, my_min);\n        my_max = std::max(sum, my_max);\n        avg += sum;\n        running_count += sum;\n        if (verbose) {\n            std::cout << \"]=\" << sum << \"; Done/Packed/Total cap: \" << running_count << \"/\"\n                      << packed_sum << \"/\" << item_sum << \" items:\" << item_count << \"/\"\n                      << packed_items << \"/\" << elements_num << \" bins_num=\" << bins_num << \"\\n\";\n        }\n        if (item_count == elements_num) { // should be the last; print stats\n            avg = avg / (double)bins_num;\n            if (!silent)\n                std::cout << \"SUMMARY: #Bins used: \" << bins_num << \"; Avg size: \" << avg\n                          << \"; Max size: \" << my_max << \"; Min size: \" << my_min << \"\\n\"\n                          << \"         Lower bound on optimal #bins: \" << bins_num_min\n                          << \"; Start #bins: \" << num_bin_packers << \"\\n\";\n        }\n        return oneapi::tbb::flow::continue_msg(); // need to return something\n    }\n};\n\nint main(int argc, char* argv[]) {\n    utility::thread_number_range threads(utility::get_default_num_threads);\n    utility::parse_cli_arguments(\n        argc,\n        argv,\n        utility::cli_argument_pack()\n            //\"-h\" option for displaying help is present implicitly\n            .positional_arg(threads, \"#threads\", utility::thread_number_range_desc)\n            .arg(verbose, \"verbose\", \"   print diagnostic output to screen\")\n            .arg(silent, \"silent\", \"    limits output to timing info; overrides verbose\")\n            .arg(elements_num, \"elements_num\", \"         number of values to pack\")\n            .arg(desired_bin_capacity, \"bin_capacity\", \"         capacity of each bin\")\n            .arg(num_bin_packers,\n                 \"#packers\",\n                 \"  number of concurrent bin packers to use \"\n                 \"(default=#threads)\")\n            .arg(optimality,\n                 \"optimality\",\n                 \"controls optimality of solution; 1 is highest, use\\n\"\n                 \"              larger numbers for less optimal but faster solution\"));\n\n    if (silent)\n        verbose = false; // make silent override verbose\n    // Generate random input data\n    srand(42);\n    input_array.resize(elements_num);\n    item_sum = 0;\n    for (auto& item : input_array) {\n        item = rand() % desired_bin_capacity + 1; // generate items that fit in a bin\n        item_sum += item;\n    }\n    bins_num_min = (item_sum % desired_bin_capacity) ? item_sum / desired_bin_capacity + 1\n                                                     : item_sum / desired_bin_capacity;\n\n    oneapi::tbb::tick_count start = oneapi::tbb::tick_count::now();\n    for (int p = threads.first; p <= threads.last; p = threads.step(p)) {\n        oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism, p);\n        packed_sum = 0;\n        packed_items = 0;\n        bins_num = 0;\n        if (num_bin_packers == -1)\n            num_bin_packers = p;\n        active_bins = num_bin_packers;\n        if (!silent)\n            std::cout << \"binpack running with \" << item_sum << \" capacity over \" << elements_num\n                      << \" items, optimality=\" << optimality << \", \" << num_bin_packers\n                      << \" bins of capacity=\" << desired_bin_capacity << \" on \" << p << \" threads.\"\n                      << \"\\n\";\n        oneapi::tbb::flow::graph g;\n        value_source the_source(g, item_generator());\n        value_pool the_value_pool(g);\n        oneapi::tbb::flow::make_edge(the_source, the_value_pool);\n        bin_buffer the_bin_buffer(g);\n        bins.resize(num_bin_packers);\n        for (int i = 0; i < num_bin_packers; ++i) {\n            bins[i] = new bin_packer(g, 1, bin_filler(i, &the_value_pool));\n            oneapi::tbb::flow::make_edge(the_value_pool, *(bins[i]));\n            oneapi::tbb::flow::make_edge(oneapi::tbb::flow::output_port<0>(*(bins[i])),\n                                         the_value_pool);\n            oneapi::tbb::flow::make_edge(oneapi::tbb::flow::output_port<1>(*(bins[i])),\n                                         the_bin_buffer);\n        }\n        bin_writer the_writer(g, 1, bin_printer());\n        make_edge(the_bin_buffer, the_writer);\n        the_source.activate();\n        g.wait_for_all();\n        for (int i = 0; i < num_bin_packers; ++i) {\n            delete bins[i];\n        }\n    }\n    utility::report_elapsed_time((oneapi::tbb::tick_count::now() - start).seconds());\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/graph/cholesky/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(cholesky CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(tbb)\n\n# TODO: Consider using FindMKL module\nfind_library(MKL_INTEL_LP64_LIB mkl_intel_lp64 PATHS ENV LIBRARY_PATH)\nfind_library(MKL_SEQUENTIAL_LIB mkl_sequential PATHS ENV LIBRARY_PATH)\nfind_library(MKL_CORE_LIB       mkl_core PATHS ENV LIBRARY_PATH)\nif(NOT (MKL_INTEL_LP64_LIB OR MKL_SEQUENTIAL_LIB OR MKL_CORE_LIB))\n    message(FATAL_ERROR \"Cannot find Intel(R) Math Kernel Library (Intel(R) MKL).\")\nendif()\n\nadd_executable(cholesky init.cpp cholesky.cpp)\ntarget_link_libraries(cholesky\n    ${MKL_INTEL_LP64_LIB}\n    ${MKL_SEQUENTIAL_LIB}\n    ${MKL_CORE_LIB}\n    TBB::tbb\n    Threads::Threads\n)\ntarget_compile_options(cholesky PRIVATE ${TBB_CXX_STD_FLAG})\n\nset(EXECUTABLE \"$<TARGET_FILE:cholesky>\")\nset(ARGS 4 2)\nadd_execution_target(run_cholesky cholesky ${EXECUTABLE} \"${ARGS}\")\n"
  },
  {
    "path": "third-party/tbb/examples/graph/cholesky/README.md",
    "content": "# Cholesky sample\nThis directory contains an example of several versions of Cholesky Factorization algorithm.\n\n**dpotrf**: An implementation that calls the oneAPI Math Kernel Library (oneMKL) `dpotrf` function to directly perform the factorization. This can be a serial implementation or threaded implementation depending on the version of the oneMKL library that is linked against.\n\n**crout**: A serial implementation that uses the Crout-Cholesky algorithm for factorization. The same approach is parallelized for the other oneAPI Threading Building Blocks (oneTBB) based approaches below.\n\n**depend**: A parallel version of Crout-Cholesky factorization that uses the oneTBB flow graph. This version uses a dependency graph made solely of `continue_node` objects. This an inspector-executor approach, where a loop nest that is similar to the serial implementation is used to create an unrolled version of the computation. Where the oneMKL calls would have been made in the original serial implementation of Crout-Cholesky, graph nodes are created instead and these nodes are linked by edges to the other nodes they are dependent upon. The resulting graph is relatively large, with a node for each instance of each oneMKL call. For example, there are many nodes that call `dtrsm`; one for each invocation of `dtrsm` in the serial implementation. The is very little overhead in message management for this version and so it is often the highest performing.\n\n**join**: A parallel version of Crout-Cholesky factorization that uses the oneTBB flow graph. This version uses a data flow approach. This is a small, compact graph that passes tiles along its edges. There is one node per type of oneMKL call, plus `join_node`s that combine the inputs required for each call. So for example, there is only a single node that applies all calls to `dtrsm`. This node is invoked when the tiles that hold the inputs and outputs for an invocation are matched together in the tag-matching `join_node` that precedes it. The tag represents the iteration values of the `i`, `j`, `k` loops in the serial implementation at that invocation of the call. There is some overhead in message matching and forwarding, so it may not perform as well as the dependency graph implementation.\n\nThis sample code requires a oneTBB library and also the oneMKL library.\n\n## Building the example\n```\ncmake <path_to_example>\ncmake --build .\n```\n\n## Running the sample\n### Predefined make targets\n* `make run_cholesky` - executes the example with predefined parameters.\n\n### Application parameters\nUsage:\n```\ncholesky [size=value] [blocksize=value] [num_trials=value] [output_prefix=value] [algorithm=value] [num_tbb_threads=value] [input_file=value] [-x] [-h] [size [blocksize [num_trials [output_prefix [algorithm [num_tbb_threads]]]]]]\n```\n* `-h` - prints the help for command line options.\n* `size` - the row/column size of `NxN` matrix (size <= 46000).\n* `blocksize` - the block size; size must be a multiple of the blocksize.\n* `num_trials` - the number of times to run each algorithm.\n* `output_prefix` - if provided the prefix will be prepended to output files: <output_prefix>_posdef.txt and <output_prefix>_X.txt; where `X` is the algorithm used. If `output_prefix` is not provided, no output will be written.\n* `algorithm` - name of the used algorithm - can be dpotrf, crout, depend or join.\n* `num_tbb_threads` - number of oneTBB threads.\n* `input_file` - input matrix (optional). If omitted, randomly generated values are used.\n* `-x` - skips all validation.\n"
  },
  {
    "path": "third-party/tbb/examples/graph/cholesky/cholesky.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <string>\n#include <cstring>\n#include <cstdio>\n#include <cmath>\n\n#include <vector>\n#include <map>\n#include <tuple>\n\n#include \"mkl_lapack.h\"\n#include \"mkl.h\"\n\n#include \"oneapi/tbb/flow_graph.h\"\n#include \"oneapi/tbb/tick_count.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n// Application command line arguments parsing\n#include \"common/utility/utility.hpp\"\n#include \"common/utility/get_default_num_threads.hpp\"\n\n/************************************************************\n FORWARD DECLARATIONS\n************************************************************/\n\n/**********************************************\n Read or generate a positive-definite matrix\n -- reads from file if fname != nullptr\n     -- sets n to matrix size\n     -- allocates and reads values in to A\n -- otherwise generates a matrix\n     -- uses n to determine size\n     -- allocates and generates values in to A\n**********************************************/\nvoid matrix_init(double *&A, int &n, const char *fname);\n\n/**********************************************\n Writes a lower triangular matrix to a file\n -- first line of file is n\n -- subsequently 1 row per line\n**********************************************/\nvoid matrix_write(double *A, int n, const char *fname, bool is_triangular = false);\n\n/************************************************************\n GLOBAL VARIABLES\n************************************************************/\nbool g_benchmark_run = false;\nint g_n = -1, g_b = -1, g_num_trials = 1;\nchar *g_input_file_name = nullptr;\nchar *g_output_prefix = nullptr;\nstd::string g_alg_name;\nint g_num_tbb_threads;\n\n// Creates tiled array\nstatic double ***create_tile_array(double *A, int n, int b) {\n    const int p = n / b;\n    double ***tile = (double ***)calloc(sizeof(double **), p);\n\n    for (int j = 0; j < p; ++j) {\n        tile[j] = (double **)calloc(sizeof(double *), p);\n    }\n\n    for (int j = 0; j < p; ++j) {\n        for (int i = 0; i < p; ++i) {\n            double *temp_block = (double *)calloc(sizeof(double), b * b);\n\n            for (int A_j = j * b, T_j = 0; T_j < b; ++A_j, ++T_j) {\n                for (int A_i = i * b, T_i = 0; T_i < b; ++A_i, ++T_i) {\n                    temp_block[T_j * b + T_i] = A[A_j * n + A_i];\n                }\n            }\n\n            tile[j][i] = temp_block;\n        }\n    }\n    return tile;\n}\n\nstatic void collapse_tile_array(double ***tile, double *A, int n, int b) {\n    const int p = n / b;\n\n    for (int j = 0; j < p; ++j) {\n        for (int i = 0; i < p; ++i) {\n            double *temp_block = tile[j][i];\n\n            for (int A_j = j * b, T_j = 0; T_j < b; ++A_j, ++T_j) {\n                for (int A_i = i * b, T_i = 0; T_i < b; ++A_i, ++T_i) {\n                    A[A_j * n + A_i] = temp_block[T_j * b + T_i];\n                }\n            }\n\n            free(temp_block);\n            tile[j][i] = nullptr;\n        }\n\n        free(tile[j]);\n    }\n\n    free(tile);\n}\n\n/************************************************************\n Helper base class: algorithm\n************************************************************/\nclass algorithm {\n    std::string name;\n    bool is_tiled;\n\n    bool check_if_valid(double *A0, double *C, double *A, int n) {\n        char transa = 'n', transb = 't';\n        double alpha = 1;\n        double beta = 0;\n\n        for (int i = 0; i < n; ++i) {\n            for (int j = i + 1; j < n; ++j) {\n                A0[j * n + i] = 0.;\n            }\n        }\n\n        dgemm(&transa, &transb, &n, &n, &n, &alpha, A0, &n, A0, &n, &beta, C, &n);\n\n        for (int j = 0; j < n; ++j) {\n            for (int i = 0; i < n; ++i) {\n                const double epsilon = std::abs(A[j * n + i] * 0.1);\n\n                if (std::abs(C[j * n + i] - A[j * n + i]) > epsilon) {\n                    printf(\"ERROR: %s did not validate at C(%d,%d) = %lf != A(%d,%d) = %lf\\n\",\n                           name.c_str(),\n                           i,\n                           j,\n                           C[j * n + i],\n                           i,\n                           j,\n                           A[j * n + i]);\n                    printf(\"ERROR: %g; %g < %g < %g\\n\",\n                           epsilon,\n                           A[j * n + i] - epsilon,\n                           C[j * n + i],\n                           A[j * n + i] + epsilon);\n                    return false;\n                }\n            }\n        }\n        return true;\n    }\n\npublic:\n    algorithm(const std::string &alg_name, bool t) : name(alg_name), is_tiled(t) {}\n\n    double operator()(double *A, int n, int b, int trials) {\n        oneapi::tbb::tick_count t0, t1;\n        double elapsed_time = 0.0;\n        double *A0 = (double *)calloc(sizeof(double), n * n);\n        double *C = (double *)calloc(sizeof(double), n * n);\n\n        for (int i = 0; i < trials + 1; ++i) {\n            if (is_tiled) {\n                double ***tile = create_tile_array(A, n, b);\n                t0 = oneapi::tbb::tick_count::now();\n                func(tile, n, b);\n                t1 = oneapi::tbb::tick_count::now();\n\n                collapse_tile_array(tile, A0, n, b);\n            }\n            else {\n                memcpy(A0, A, sizeof(double) * n * n);\n                t0 = oneapi::tbb::tick_count::now();\n                func(A0, n, b);\n                t1 = oneapi::tbb::tick_count::now();\n            }\n\n            if (i)\n                elapsed_time += (t1 - t0).seconds();\n\n            if (!g_benchmark_run && !check_if_valid(A0, C, A, n)) {\n                if (g_output_prefix) {\n                    std::string s(g_output_prefix);\n                    s += \"_\" + name + \".txt\";\n                    matrix_write(A0, g_n, s.c_str(), true);\n                    free(A0);\n                    free(C);\n                    return 0.;\n                }\n            }\n        }\n\n        if (g_output_prefix) {\n            std::string s(g_output_prefix);\n            s += \"_\" + name + \".txt\";\n            matrix_write(A0, g_n, s.c_str(), true);\n        }\n\n        printf(\"%s %d %d %d %d %lf %lf\\n\",\n               name.c_str(),\n               g_num_tbb_threads,\n               trials,\n               n,\n               b,\n               elapsed_time,\n               elapsed_time / trials);\n        free(A0);\n        free(C);\n        return elapsed_time;\n    }\n\nprotected:\n    // Main algorithm body function must be defined in any direved class\n    virtual void func(void *ptr, int n, int b) = 0;\n};\n\n/***********************************************************/\n\nstatic void call_dpotf2(double ***tile, int b, int k) {\n    double *A_block = tile[k][k];\n    char uplo = 'l';\n    int info = 0;\n    dpotf2(&uplo, &b, A_block, &b, &info);\n    return;\n}\n\nstatic void call_dtrsm(double ***tile, int b, int k, int j) {\n    double *A_block = tile[k][j];\n    double *L_block = tile[k][k];\n    char uplo = 'l', side = 'r', transa = 't', diag = 'n';\n    double alpha = 1;\n    dtrsm(&side, &uplo, &transa, &diag, &b, &b, &alpha, L_block, &b, A_block, &b);\n    return;\n}\n\nstatic void call_dsyr2k(double ***tile, int b, int k, int j, int i) {\n    double *A_block = tile[i][j];\n    char transa = 'n', transb = 't';\n    char uplo = 'l';\n    double alpha = -1;\n    double beta = 1;\n\n    if (i == j) { // Diagonal block\n        double *L_block = tile[k][i];\n        dsyrk(&uplo, &transa, &b, &b, &alpha, L_block, &b, &beta, A_block, &b);\n    }\n    else { // Non-diagonal block\n        double *L2_block = tile[k][i];\n        double *L1_block = tile[k][j];\n        dgemm(&transa, &transb, &b, &b, &b, &alpha, L1_block, &b, L2_block, &b, &beta, A_block, &b);\n    }\n    return;\n}\n\nclass algorithm_crout : public algorithm {\npublic:\n    algorithm_crout() : algorithm(\"crout_cholesky\", true) {}\n\nprotected:\n    virtual void func(void *ptr, int n, int b) {\n        double ***tile = (double ***)ptr;\n        const int p = n / b;\n\n        for (int k = 0; k < p; ++k) {\n            call_dpotf2(tile, b, k);\n\n            for (int j = k + 1; j < p; ++j) {\n                call_dtrsm(tile, b, k, j);\n\n                for (int i = k + 1; i <= j; ++i) {\n                    call_dsyr2k(tile, b, k, j, i);\n                }\n            }\n        }\n    }\n};\n\nclass algorithm_dpotrf : public algorithm {\npublic:\n    algorithm_dpotrf() : algorithm(\"dpotrf_cholesky\", false) {}\n\nprotected:\n    virtual void func(void *ptr, int n, int /* b */) {\n        double *A = (double *)ptr;\n        int lda = n;\n        int info = 0;\n        char uplo = 'l';\n        dpotrf(&uplo, &n, A, &lda, &info);\n    }\n};\n\n/************************************************************\n Begin data join graph based version of cholesky\n************************************************************/\n\ntypedef union {\n    char a[4];\n    std::size_t tag;\n} tag_t;\n\ntypedef double *tile_t;\n\ntypedef std::pair<tag_t, tile_t> tagged_tile_t;\ntypedef std::tuple<tagged_tile_t> t1_t;\ntypedef std::tuple<tagged_tile_t, tagged_tile_t> t2_t;\ntypedef std::tuple<tagged_tile_t, tagged_tile_t, tagged_tile_t> t3_t;\n\ntypedef oneapi::tbb::flow::multifunction_node<tagged_tile_t, t1_t> dpotf2_node_t;\ntypedef oneapi::tbb::flow::multifunction_node<t2_t, t2_t> dtrsm_node_t;\ntypedef oneapi::tbb::flow::multifunction_node<t3_t, t3_t> dsyr2k_node_t;\n\ntypedef oneapi::tbb::flow::join_node<t2_t, oneapi::tbb::flow::tag_matching> dtrsm_join_t;\ntypedef oneapi::tbb::flow::join_node<t3_t, oneapi::tbb::flow::tag_matching> dsyr2k_join_t;\n\nclass dpotf2_body {\n    int p;\n    int b;\n\npublic:\n    dpotf2_body(int p_, int b_) : p(p_), b(b_) {}\n\n    void operator()(const tagged_tile_t &in, dpotf2_node_t::output_ports_type &ports) {\n        int k = in.first.a[0];\n        tile_t A_block = in.second;\n        tag_t t;\n        t.tag = 0;\n        t.a[0] = k;\n        char uplo = 'l';\n        int info = 0;\n        dpotf2(&uplo, &b, A_block, &b, &info);\n\n        // Send to dtrsms in same column\n        // k == k  j == k\n        t.a[2] = k;\n        for (int j = k + 1; j < p; ++j) {\n            t.a[1] = j;\n            std::get<0>(ports).try_put(std::make_pair(t, A_block));\n        }\n    }\n};\n\nclass dtrsm_body {\n    int p;\n    int b;\n\npublic:\n    dtrsm_body(int p_, int b_) : p(p_), b(b_) {}\n\n    void operator()(const t2_t &in, dtrsm_node_t::output_ports_type &ports) {\n        tagged_tile_t in0 = std::get<0>(in);\n        tagged_tile_t in1 = std::get<1>(in);\n        int k = in0.first.a[0];\n        int j = in0.first.a[1];\n        tile_t L_block = in0.second;\n        tile_t A_block = in1.second;\n        tag_t t;\n        t.tag = 0;\n        t.a[0] = k;\n        char uplo = 'l', side = 'r', transa = 't', diag = 'n';\n        double alpha = 1;\n        dtrsm(&side, &uplo, &transa, &diag, &b, &b, &alpha, L_block, &b, A_block, &b);\n\n        // Send to rest of my row\n        t.a[1] = j;\n        for (int i = k + 1; i <= j; ++i) {\n            t.a[2] = i;\n            std::get<0>(ports).try_put(std::make_pair(t, A_block));\n        }\n\n        // Send to transposed row\n        t.a[2] = j;\n        for (int i = j; i < p; ++i) {\n            t.a[1] = i;\n            std::get<1>(ports).try_put(std::make_pair(t, A_block));\n        }\n    }\n};\n\nclass dsyr2k_body {\n    int p;\n    int b;\n\npublic:\n    dsyr2k_body(int p_, int b_) : p(p_), b(b_) {}\n\n    void operator()(const t3_t &in, dsyr2k_node_t::output_ports_type &ports) {\n        tag_t t;\n        t.tag = 0;\n        char transa = 'n', transb = 't';\n        char uplo = 'l';\n        double alpha = -1;\n        double beta = 1;\n\n        tagged_tile_t in0 = std::get<0>(in);\n        tagged_tile_t in1 = std::get<1>(in);\n        tagged_tile_t in2 = std::get<2>(in);\n        int k = in2.first.a[0];\n        int j = in2.first.a[1];\n        int i = in2.first.a[2];\n\n        tile_t A_block = in2.second;\n        if (i == j) { // Diagonal block\n            tile_t L_block = in0.second;\n            dsyrk(&uplo, &transa, &b, &b, &alpha, L_block, &b, &beta, A_block, &b);\n        }\n        else { // Non-diagonal block\n            tile_t L1_block = in0.second;\n            tile_t L2_block = in1.second;\n            dgemm(&transa,\n                  &transb,\n                  &b,\n                  &b,\n                  &b,\n                  &alpha,\n                  L1_block,\n                  &b,\n                  L2_block,\n                  &b,\n                  &beta,\n                  A_block,\n                  &b);\n        }\n\n        // All outputs flow to next step\n        t.a[0] = k + 1;\n        t.a[1] = j;\n        t.a[2] = i;\n        if (k != p - 1 && j == k + 1 && i == k + 1) {\n            std::get<0>(ports).try_put(std::make_pair(t, A_block));\n        }\n\n        if (k < p - 2) {\n            if (i == k + 1 && j > i) {\n                t.a[0] = k + 1;\n                t.a[1] = j;\n                std::get<1>(ports).try_put(std::make_pair(t, A_block));\n            }\n\n            if (j != k + 1 && i != k + 1) {\n                t.a[0] = k + 1;\n                t.a[1] = j;\n                t.a[2] = i;\n                std::get<2>(ports).try_put(std::make_pair(t, A_block));\n            }\n        }\n    }\n};\n\nstruct tagged_tile_to_size_t {\n    std::size_t operator()(const tagged_tile_t &t) {\n        return t.first.tag;\n    }\n};\n\nclass algorithm_join : public algorithm {\npublic:\n    algorithm_join() : algorithm(\"data_join_cholesky\", true) {}\n\nprotected:\n    virtual void func(void *ptr, int n, int b) {\n        using oneapi::tbb::flow::unlimited;\n        using oneapi::tbb::flow::output_port;\n        using oneapi::tbb::flow::input_port;\n\n        double ***tile = (double ***)ptr;\n        const int p = n / b;\n        oneapi::tbb::flow::graph g;\n\n        dpotf2_node_t dpotf2_node(g, unlimited, dpotf2_body(p, b));\n        dtrsm_node_t dtrsm_node(g, unlimited, dtrsm_body(p, b));\n        dsyr2k_node_t dsyr2k_node(g, unlimited, dsyr2k_body(p, b));\n        dtrsm_join_t dtrsm_join(g, tagged_tile_to_size_t(), tagged_tile_to_size_t());\n        dsyr2k_join_t dsyr2k_join(\n            g, tagged_tile_to_size_t(), tagged_tile_to_size_t(), tagged_tile_to_size_t());\n\n        make_edge(output_port<0>(dsyr2k_node), dpotf2_node);\n\n        make_edge(output_port<0>(dpotf2_node), input_port<0>(dtrsm_join));\n        make_edge(output_port<1>(dsyr2k_node), input_port<1>(dtrsm_join));\n        make_edge(dtrsm_join, dtrsm_node);\n\n        make_edge(output_port<0>(dtrsm_node), input_port<0>(dsyr2k_join));\n        make_edge(output_port<1>(dtrsm_node), input_port<1>(dsyr2k_join));\n        make_edge(output_port<2>(dsyr2k_node), input_port<2>(dsyr2k_join));\n        make_edge(dsyr2k_join, dsyr2k_node);\n\n        // Now we need to send out the tiles to their first nodes\n        tag_t t;\n        t.tag = 0;\n        t.a[0] = 0;\n        t.a[1] = 0;\n        t.a[2] = 0;\n\n        // Send to feedback input of first dpotf2\n        // k == 0, j == 0, i == 0\n        dpotf2_node.try_put(std::make_pair(t, tile[0][0]));\n\n        // Send to feedback input (port 1) of each dtrsm\n        // k == 0, j == 1..p-1\n        for (int j = 1; j < p; ++j) {\n            t.a[1] = j;\n            input_port<1>(dtrsm_join).try_put(std::make_pair(t, tile[0][j]));\n        }\n\n        // Send to feedback input (port 2) of each dsyr2k\n        // k == 0\n        for (int i = 1; i < p; ++i) {\n            t.a[2] = i;\n\n            for (int j = i; j < p; ++j) {\n                t.a[1] = j;\n                input_port<2>(dsyr2k_join).try_put(std::make_pair(t, tile[i][j]));\n            }\n        }\n\n        g.wait_for_all();\n    }\n};\n\n/************************************************************\n End data join graph based version of cholesky\n************************************************************/\n\n/************************************************************\n Begin dependence graph based version of cholesky\n************************************************************/\n\ntypedef oneapi::tbb::flow::continue_node<oneapi::tbb::flow::continue_msg> continue_type;\ntypedef continue_type *continue_ptr_type;\n\nclass algorithm_depend : public algorithm {\npublic:\n    algorithm_depend() : algorithm(\"depend_cholesky\", true) {}\n\nprotected:\n    virtual void func(void *ptr, int n, int b) {\n        double ***tile = (double ***)ptr;\n\n        const int p = n / b;\n        continue_ptr_type *c = new continue_ptr_type[p];\n        continue_ptr_type **t = new continue_ptr_type *[p];\n        continue_ptr_type ***u = new continue_ptr_type **[p];\n\n        oneapi::tbb::flow::graph g;\n        for (int k = p - 1; k >= 0; --k) {\n            c[k] = new continue_type(g, [=](const oneapi::tbb::flow::continue_msg &) {\n                call_dpotf2(tile, b, k);\n            });\n            t[k] = new continue_ptr_type[p];\n            u[k] = new continue_ptr_type *[p];\n\n            for (int j = k + 1; j < p; ++j) {\n                t[k][j] = new continue_type(g, [=](const oneapi::tbb::flow::continue_msg &) {\n                    call_dtrsm(tile, b, k, j);\n                });\n                make_edge(*c[k], *t[k][j]);\n                u[k][j] = new continue_ptr_type[p];\n\n                for (int i = k + 1; i <= j; ++i) {\n                    u[k][j][i] = new continue_type(g, [=](const oneapi::tbb::flow::continue_msg &) {\n                        call_dsyr2k(tile, b, k, j, i);\n                    });\n\n                    if (k < p - 2 && k + 1 != j && k + 1 != i) {\n                        make_edge(*u[k][j][i], *u[k + 1][j][i]);\n                    }\n\n                    make_edge(*t[k][j], *u[k][j][i]);\n\n                    if (i != j) {\n                        make_edge(*t[k][i], *u[k][j][i]);\n                    }\n\n                    if (k < p - 2 && j > i && i == k + 1) {\n                        make_edge(*u[k][j][i], *t[i][j]);\n                    }\n                }\n            }\n\n            if (k != p - 1) {\n                make_edge(*u[k][k + 1][k + 1], *c[k + 1]);\n            }\n        }\n\n        c[0]->try_put(oneapi::tbb::flow::continue_msg());\n        g.wait_for_all();\n\n        for (int k = p - 1; k >= 0; --k) {\n            for (int j = k + 1; j < p; ++j) {\n                for (int i = k + 1; i <= j; ++i) {\n                    delete u[k][j][i];\n                }\n                delete t[k][j];\n                delete[] u[k][j];\n            }\n            delete c[k];\n            delete[] t[k];\n            delete[] u[k];\n        }\n        delete[] c;\n        delete[] t;\n        delete[] u;\n    }\n}; // class algorithm_depend\n\n/************************************************************\n End dependence graph based version of cholesky\n************************************************************/\n\nbool process_args(int argc, char *argv[]) {\n    utility::parse_cli_arguments(\n        argc,\n        argv,\n        utility::cli_argument_pack()\n            //\"-h\" option for displaying help is present implicitly\n            .positional_arg(g_n, \"size\", \"the row/column size of NxN matrix (size <= 46000)\")\n            .positional_arg(\n                g_b, \"blocksize\", \"the block size; size must be a multiple of the blocksize\")\n            .positional_arg(g_num_trials, \"num_trials\", \"the number of times to run each algorithm\")\n            .positional_arg(\n                g_output_prefix,\n                \"output_prefix\",\n                \"if provided the prefix will be preappended to output files:\\n\"\n                \"                     output_prefix_posdef.txt\\n\"\n                \"                     output_prefix_X.txt; where X is the algorithm used\\n\"\n                \"                 if output_prefix is not provided, no output will be written\")\n            .positional_arg(g_alg_name,\n                            \"algorithm\",\n                            \"name of the used algorithm - can be dpotrf, crout, depend or join\")\n            .positional_arg(g_num_tbb_threads, \"num_tbb_threads\", \"number of started TBB threads\")\n\n            .arg(g_input_file_name,\n                 \"input_file\",\n                 \"if provided it will be read to get the input matrix\")\n            .arg(g_benchmark_run, \"-x\", \"skips all validation\"));\n\n    if (g_n > 46000) {\n        printf(\"ERROR: invalid 'size' value (must be less or equal 46000): %d\\n\", g_n);\n        return false;\n    }\n\n    if (g_n % g_b != 0) {\n        printf(\"ERROR: size %d must be a multiple of the blocksize %d\\n\", g_n, g_b);\n        return false;\n    }\n\n    if (g_n / g_b > 256) {\n        // Because tile index size is 1 byte only in tag_t type\n        printf(\"ERROR: size / blocksize must be less or equal 256, but %d / %d = %d\\n\",\n               g_n,\n               g_b,\n               g_n / g_b);\n        return false;\n    }\n\n    if (g_b == -1 || (g_n == -1 && g_input_file_name == nullptr)) {\n        return false;\n    }\n\n    return true;\n}\n\nint main(int argc, char *argv[]) {\n    g_num_tbb_threads = utility::get_default_num_threads();\n    typedef std::map<std::string, algorithm *> algmap_t;\n    algmap_t algmap;\n\n    // Init algorithms\n    algmap.insert(std::pair<std::string, algorithm *>(\"dpotrf\", new algorithm_dpotrf));\n    algmap.insert(std::pair<std::string, algorithm *>(\"crout\", new algorithm_crout));\n    algmap.insert(std::pair<std::string, algorithm *>(\"depend\", new algorithm_depend));\n    algmap.insert(std::pair<std::string, algorithm *>(\"join\", new algorithm_join));\n\n    if (!process_args(argc, argv)) {\n        printf(\"ERROR: Invalid arguments. Run: %s -h\\n\", argv[0]);\n        return -1;\n    }\n\n    oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism,\n                                  g_num_tbb_threads);\n    double *A = nullptr;\n\n    // Read input matrix\n    matrix_init(A, g_n, g_input_file_name);\n\n    // Write input matrix if output_prefix is set and we didn't read from a file\n    if (!g_input_file_name && g_output_prefix) {\n        std::string s(g_output_prefix);\n        s += \"_posdef.txt\";\n        matrix_write(A, g_n, s.c_str());\n    }\n\n    if (g_alg_name.empty()) {\n        for (algmap_t::iterator i = algmap.begin(); i != algmap.end(); ++i) {\n            algorithm *const alg = i->second;\n            (*alg)(A, g_n, g_b, g_num_trials);\n        }\n    }\n    else {\n        algmap_t::iterator alg_iter = algmap.find(g_alg_name);\n\n        if (alg_iter != algmap.end()) {\n            algorithm *const alg = alg_iter->second;\n            (*alg)(A, g_n, g_b, g_num_trials);\n        }\n        else {\n            printf(\"ERROR: Invalid algorithm name: %s\\n\", g_alg_name.c_str());\n            return -1;\n        }\n    }\n\n    free(A);\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/graph/cholesky/init.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <cstdio>\n#include <cassert>\n#include <cstring>\n#include <cstdlib>\n\n#include <mkl_cblas.h>\n\nstatic void posdef_gen(double *A, int n) {\n    /* Allocate memory for the matrix and its transpose */\n    double *L = (double *)calloc(sizeof(double), n * n);\n    assert(L);\n\n    double *LT = (double *)calloc(sizeof(double), n * n);\n    assert(LT);\n\n    memset(A, 0, sizeof(double) * n * n);\n\n    /* Generate a conditioned matrix and fill it with random numbers */\n    for (int j = 0; j < n; ++j) {\n        for (int k = 0; k < j; ++k) {\n            // The initial value has to be between [0,1].\n            L[k * n + j] =\n                (((j * k) / ((double)(j + 1)) / ((double)(k + 2)) * 2.0) - 1.0) / ((double)n);\n        }\n\n        L[j * n + j] = 1;\n    }\n\n    /* Compute transpose of the matrix */\n    for (int i = 0; i < n; ++i) {\n        for (int j = 0; j < n; ++j) {\n            LT[j * n + i] = L[i * n + j];\n        }\n    }\n    cblas_dgemm(CblasColMajor, CblasNoTrans, CblasNoTrans, n, n, n, 1, L, n, LT, n, 0, A, n);\n\n    free(L);\n    free(LT);\n}\n\n// Read the matrix from the input file\nvoid matrix_init(double *&A, int &n, const char *fname) {\n    if (fname) {\n        int i;\n        int j;\n        FILE *fp;\n\n        fp = fopen(fname, \"r\");\n        if (fp == nullptr) {\n            fprintf(stderr, \"\\nFile does not exist\\n\");\n            std::exit(0);\n        }\n        if (fscanf(fp, \"%d\", &n) <= 0) {\n            fprintf(stderr, \"\\nCouldn't read n from %s\\n\", fname);\n            std::exit(-1);\n        }\n        A = (double *)calloc(sizeof(double), n * n);\n        for (i = 0; i < n; ++i) {\n            for (j = 0; j <= i; ++j) {\n                if (fscanf(fp, \"%lf \", &A[i * n + j]) <= 0) {\n                    fprintf(stderr, \"\\nMatrix size incorrect %i %i\\n\", i, j);\n                    std::exit(-1);\n                }\n                if (i != j) {\n                    A[j * n + i] = A[i * n + j];\n                }\n            }\n        }\n        fclose(fp);\n    }\n    else {\n        A = (double *)calloc(sizeof(double), n * n);\n        posdef_gen(A, n);\n    }\n}\n\n// write matrix to file\nvoid matrix_write(double *A, int n, const char *fname, bool is_triangular = false) {\n    if (fname) {\n        int i = 0;\n        int j = 0;\n        FILE *fp = nullptr;\n\n        fp = fopen(fname, \"w\");\n        if (fp == nullptr) {\n            fprintf(stderr, \"\\nCould not open file %s for writing.\\n\", fname);\n            std::exit(0);\n        }\n        fprintf(fp, \"%d\\n\", n);\n        for (i = 0; i < n; ++i) {\n            for (j = 0; j <= i; ++j) {\n                fprintf(fp, \"%lf \", A[j * n + i]);\n            }\n            if (!is_triangular) {\n                for (; j < n; ++j) {\n                    fprintf(fp, \"%lf \", A[i * n + j]);\n                }\n            }\n            else {\n                for (; j < n; ++j) {\n                    fprintf(fp, \"%lf \", 0.0);\n                }\n            }\n            fprintf(fp, \"\\n\");\n        }\n        if (is_triangular) {\n            fprintf(fp, \"\\n\");\n            for (i = 0; i < n; ++i) {\n                for (j = 0; j < i; ++j) {\n                    fprintf(fp, \"%lf \", 0.0);\n                }\n                for (; j < n; ++j) {\n                    fprintf(fp, \"%lf \", A[i * n + j]);\n                }\n                fprintf(fp, \"\\n\");\n            }\n        }\n        fclose(fp);\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/examples/graph/dining_philosophers/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(dining_philosophers CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(tbb)\n\nadd_executable(dining_philosophers dining_philosophers.cpp)\n\ntarget_link_libraries(dining_philosophers TBB::tbb Threads::Threads)\ntarget_compile_options(dining_philosophers PRIVATE ${TBB_CXX_STD_FLAG})\n\nset(EXECUTABLE \"$<TARGET_FILE:dining_philosophers>\")\nset(ARGS auto 5)\nset(LIGHT_ARGS auto 3)\n\nadd_execution_target(run_dining_philosophers dining_philosophers ${EXECUTABLE} \"${ARGS}\")\nadd_execution_target(light_test_dining_philosophers dining_philosophers ${EXECUTABLE} \"${LIGHT_ARGS}\")\n"
  },
  {
    "path": "third-party/tbb/examples/graph/dining_philosophers/README.md",
    "content": "# Dining_philosophers sample\nThe Dining Philosophers problem demonstrates `oneapi::tbb::flow` and the use of the reserving `join_node` to solve the potential deadlock.\n\nThis program runs some number of philosophers in parallel, each thinking and then waiting for chopsticks to be available before eating. Eating and thinking are implemented with `sleep()`. The chopstick positions are represented by a `queue_node` with one item.\n\n## Building the example\n```\ncmake <path_to_example>\ncmake --build .\n```\n\n## Running the sample\n### Predefined make targets\n* `make run_dining_philosophers` - executes the example with predefined parameters.\n* `make light_test_dining_philosophers` -  executes the example with suggested parameters to reduce execution time.\n\n### Application parameters\nUsage:\n```\ndining_philosophers [n-of_threads=value] [n-of-philosophers=value] [verbose] [-h] [n-of_threads [n-of-philosophers]]\n```\n* `-h` - prints the help for command line options.\n* `n-of_threads` - number of threads to use; a range of the form low\\[:high\\[:(+|*|#)step\\]\\], where low and optional high are non-negative integers or 'auto' for the default choice, and optional step expression specifies how thread numbers are chosen within the range.\n* `n-of-philosophers` - how many philosophers, from 2-26.\n* `verbose` - prints diagnostic output to screen.\n"
  },
  {
    "path": "third-party/tbb/examples/graph/dining_philosophers/dining_philosophers.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if _MSC_VER\n// Suppress \"decorated name length exceeded, name was truncated\" warning\n#pragma warning(disable : 4503)\n#endif\n\n#include <cstdlib>\n#include <cstdio>\n\n#include <iostream>\n#include <thread>\n#include <chrono>\n#include <tuple>\n\n#include \"oneapi/tbb/flow_graph.h\"\n#include \"oneapi/tbb/tick_count.h\"\n#include \"oneapi/tbb/spin_mutex.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include \"common/utility/utility.hpp\"\n#include \"common/utility/get_default_num_threads.hpp\"\n\n// Each philosopher is an object, and is invoked in the think() function_node, the\n// eat() function_node and forward() multifunction_node.\n//\n// The graph is constructed, and each think() function_node is started with a continue_msg.\n//\n// The philosopher will think, then gather two chopsticks, eat, place the chopsticks back,\n// and if they have not completed the required number of cycles, will start to think() again\n// by sending a continue_msg to their corresponding think() function_node.\n//\n// The reserving join has as its inputs the left and right chopstick queues an a queue\n// that stores the continue_msg emitted by the function_node after think()ing is done.\n// When all three inputs are available, a tuple of the inputs will be forwarded to the\n// eat() function_node.  The output of the eat() function_node is sent to the forward()\n// multifunction_node.\n\nconst std::chrono::seconds think_time(1);\nconst std::chrono::seconds eat_time(1);\nconst int num_times = 10;\n\noneapi::tbb::tick_count t0;\nbool verbose = false;\n\nconst char *names[] = { \"Archimedes\", \"Bakunin\",   \"Confucius\",    \"Democritus\",  \"Euclid\",\n                        \"Favorinus\",  \"Geminus\",   \"Heraclitus\",   \"Ichthyas\",    \"Jason of Nysa\",\n                        \"Kant\",       \"Lavrov\",    \"Metrocles\",    \"Nausiphanes\", \"Onatas\",\n                        \"Phaedrus\",   \"Quillot\",   \"Russell\",      \"Socrates\",    \"Thales\",\n                        \"Udayana\",    \"Vernadsky\", \"Wittgenstein\", \"Xenophilus\",  \"Yen Yuan\",\n                        \"Zenodotus\" };\nconst int NumPhilosophers = sizeof(names) / sizeof(char *);\n\nstruct RunOptions {\n    utility::thread_number_range threads;\n    int number_of_philosophers;\n    bool silent;\n    RunOptions(utility::thread_number_range threads_, int number_of_philosophers_, bool silent_)\n            : threads(threads_),\n              number_of_philosophers(number_of_philosophers_),\n              silent(silent_) {}\n};\n\nRunOptions ParseCommandLine(int argc, char *argv[]) {\n    int auto_threads = utility::get_default_num_threads();\n    utility::thread_number_range threads(\n        utility::get_default_num_threads, auto_threads, auto_threads);\n    int nPhilosophers = 5;\n    bool verbose = false;\n    char charbuf[100];\n    std::sprintf(charbuf, \"%d\", NumPhilosophers);\n    std::string pCount = \"how many philosophers, from 2-\";\n    pCount += charbuf;\n\n    utility::cli_argument_pack cli_pack;\n    cli_pack.positional_arg(threads, \"n-of_threads\", utility::thread_number_range_desc)\n        .positional_arg(nPhilosophers, \"n-of-philosophers\", pCount)\n        .arg(verbose, \"verbose\", \"verbose output\");\n    utility::parse_cli_arguments(argc, argv, cli_pack);\n    if (nPhilosophers < 2 || nPhilosophers > NumPhilosophers) {\n        std::cout << \"Number of philosophers (\" << nPhilosophers\n                  << \") out of range [2:\" << NumPhilosophers << \"]\\n\";\n        std::cout << cli_pack.usage_string(argv[0]) << std::flush;\n        std::exit(-1);\n    }\n    return RunOptions(threads, nPhilosophers, !verbose);\n}\n\noneapi::tbb::spin_mutex my_mutex;\n\nclass chopstick {};\n\ntypedef std::tuple<oneapi::tbb::flow::continue_msg, chopstick, chopstick> join_output;\ntypedef oneapi::tbb::flow::join_node<join_output, oneapi::tbb::flow::reserving> join_node_type;\n\ntypedef oneapi::tbb::flow::function_node<oneapi::tbb::flow::continue_msg,\n                                         oneapi::tbb::flow::continue_msg>\n    think_node_type;\ntypedef oneapi::tbb::flow::function_node<join_output, oneapi::tbb::flow::continue_msg>\n    eat_node_type;\ntypedef oneapi::tbb::flow::multifunction_node<oneapi::tbb::flow::continue_msg, join_output>\n    forward_node_type;\n\nclass philosopher {\npublic:\n    philosopher(const char *name) : my_name(name), my_count(num_times) {}\n\n    ~philosopher() {}\n\n    void check();\n    const char *name() const {\n        return my_name;\n    }\n\nprivate:\n    friend std::ostream &operator<<(std::ostream &o, philosopher const &p);\n\n    const char *my_name;\n    int my_count;\n\n    friend class think_node_body;\n    friend class eat_node_body;\n    friend class forward_node_body;\n\n    void think();\n    void eat();\n    void forward(const oneapi::tbb::flow::continue_msg &in,\n                 forward_node_type::output_ports_type &out_ports);\n};\n\nstd::ostream &operator<<(std::ostream &o, philosopher const &p) {\n    o << \"< philosopher[\" << reinterpret_cast<uintptr_t>(const_cast<philosopher *>(&p)) << \"] \"\n      << p.name() << \", my_count=\" << p.my_count;\n\n    return o;\n}\n\nclass think_node_body {\n    philosopher &my_philosopher;\n\npublic:\n    think_node_body(philosopher &p) : my_philosopher(p) {}\n    think_node_body(const think_node_body &other) : my_philosopher(other.my_philosopher) {}\n    oneapi::tbb::flow::continue_msg operator()(oneapi::tbb::flow::continue_msg /*m*/) {\n        my_philosopher.think();\n        return oneapi::tbb::flow::continue_msg();\n    }\n};\n\nclass eat_node_body {\n    philosopher &my_philosopher;\n\npublic:\n    eat_node_body(philosopher &p) : my_philosopher(p) {}\n    eat_node_body(const eat_node_body &other) : my_philosopher(other.my_philosopher) {}\n    oneapi::tbb::flow::continue_msg operator()(const join_output &in) {\n        my_philosopher.eat();\n        return oneapi::tbb::flow::continue_msg();\n    }\n};\n\nclass forward_node_body {\n    philosopher &my_philosopher;\n\npublic:\n    forward_node_body(philosopher &p) : my_philosopher(p) {}\n    forward_node_body(const forward_node_body &other) : my_philosopher(other.my_philosopher) {}\n    void operator()(const oneapi::tbb::flow::continue_msg &in,\n                    forward_node_type::output_ports_type &out) {\n        my_philosopher.forward(in, out);\n    }\n};\n\nvoid philosopher::check() {\n    if (my_count != 0) {\n        std::printf(\"ERROR: philosopher %s still had to run %d more times\\n\", name(), my_count);\n        std::exit(-1);\n    }\n}\n\nvoid philosopher::forward(const oneapi::tbb::flow::continue_msg & /*in*/,\n                          forward_node_type::output_ports_type &out_ports) {\n    if (my_count < 0)\n        abort();\n    --my_count;\n    (void)std::get<1>(out_ports).try_put(chopstick());\n    (void)std::get<2>(out_ports).try_put(chopstick());\n    if (my_count > 0) {\n        (void)std::get<0>(out_ports).try_put(\n            oneapi::tbb::flow::continue_msg()); //start thinking again\n    }\n    else {\n        if (verbose) {\n            oneapi::tbb::spin_mutex::scoped_lock lock(my_mutex);\n            std::printf(\"%s has left the building\\n\", name());\n        }\n    }\n}\n\nvoid philosopher::eat() {\n    if (verbose) {\n        oneapi::tbb::spin_mutex::scoped_lock lock(my_mutex);\n        std::printf(\"%s eating\\n\", name());\n    }\n    std::this_thread::sleep_for(eat_time);\n    if (verbose) {\n        oneapi::tbb::spin_mutex::scoped_lock lock(my_mutex);\n        std::printf(\"%s done eating\\n\", name());\n    }\n}\n\nvoid philosopher::think() {\n    if (verbose) {\n        oneapi::tbb::spin_mutex::scoped_lock lock(my_mutex);\n        std::printf(\"%s thinking\\n\", name());\n    }\n    std::this_thread::sleep_for(think_time);\n    if (verbose) {\n        oneapi::tbb::spin_mutex::scoped_lock lock(my_mutex);\n        std::printf(\"%s done thinking\\n\", name());\n    }\n}\n\ntypedef oneapi::tbb::flow::queue_node<oneapi::tbb::flow::continue_msg> thinking_done_type;\n\nint main(int argc, char *argv[]) {\n    using oneapi::tbb::flow::make_edge;\n    using oneapi::tbb::flow::input_port;\n    using oneapi::tbb::flow::output_port;\n\n    oneapi::tbb::tick_count main_time = oneapi::tbb::tick_count::now();\n    int num_threads;\n    int num_philosophers;\n\n    RunOptions options = ParseCommandLine(argc, argv);\n    num_philosophers = options.number_of_philosophers;\n    verbose = !options.silent;\n\n    for (num_threads = options.threads.first; num_threads <= options.threads.last;\n         num_threads = options.threads.step(num_threads)) {\n        oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism,\n                                      num_threads);\n\n        oneapi::tbb::flow::graph g;\n\n        if (verbose) {\n            std::cout << \"\\n\"\n                      << num_philosophers << \" philosophers with \" << num_threads << \" threads\"\n                      << \"\\n\"\n                      << \"\\n\";\n        }\n        t0 = oneapi::tbb::tick_count::now();\n\n        std::vector<oneapi::tbb::flow::queue_node<chopstick>> places(\n            num_philosophers, oneapi::tbb::flow::queue_node<chopstick>(g));\n        std::vector<philosopher> philosophers;\n        philosophers.reserve(num_philosophers);\n        std::vector<think_node_type *> think_nodes;\n        think_nodes.reserve(num_philosophers);\n        std::vector<thinking_done_type> done_vector(num_philosophers, thinking_done_type(g));\n        std::vector<join_node_type> join_vector(num_philosophers, join_node_type(g));\n        std::vector<eat_node_type *> eat_nodes;\n        eat_nodes.reserve(num_philosophers);\n        std::vector<forward_node_type *> forward_nodes;\n        forward_nodes.reserve(num_philosophers);\n        for (int i = 0; i < num_philosophers; ++i) {\n            places[i].try_put(chopstick());\n            philosophers.push_back(\n                philosopher(names[i])); // allowed because of default generated assignment\n            if (verbose) {\n                oneapi::tbb::spin_mutex::scoped_lock lock(my_mutex);\n                std::cout << \"Built philosopher \" << philosophers[i] << \"\\n\";\n            }\n            think_nodes.push_back(new think_node_type(\n                g, oneapi::tbb::flow::unlimited, think_node_body(philosophers[i])));\n            eat_nodes.push_back(\n                new eat_node_type(g, oneapi::tbb::flow::unlimited, eat_node_body(philosophers[i])));\n            forward_nodes.push_back(new forward_node_type(\n                g, oneapi::tbb::flow::unlimited, forward_node_body(philosophers[i])));\n        }\n\n        // attach chopstick buffers and think function_nodes to joins\n        for (int i = 0; i < num_philosophers; ++i) {\n            make_edge(*think_nodes[i], done_vector[i]);\n            make_edge(done_vector[i], input_port<0>(join_vector[i]));\n            make_edge(places[i], input_port<1>(join_vector[i])); // left chopstick\n            make_edge(places[(i + 1) % num_philosophers],\n                      input_port<2>(join_vector[i])); // right chopstick\n            make_edge(join_vector[i], *eat_nodes[i]);\n            make_edge(*eat_nodes[i], *forward_nodes[i]);\n            make_edge(output_port<0>(*forward_nodes[i]), *think_nodes[i]);\n            make_edge(output_port<1>(*forward_nodes[i]), places[i]);\n            make_edge(output_port<2>(*forward_nodes[i]), places[(i + 1) % num_philosophers]);\n        }\n\n        // start all the philosophers thinking\n        for (int i = 0; i < num_philosophers; ++i)\n            think_nodes[i]->try_put(oneapi::tbb::flow::continue_msg());\n\n        g.wait_for_all();\n\n        oneapi::tbb::tick_count t1 = oneapi::tbb::tick_count::now();\n        if (verbose)\n            std::cout << \"\\n\"\n                      << num_philosophers << \" philosophers with \" << num_threads\n                      << \" threads have taken \" << (t1 - t0).seconds() << \"seconds\"\n                      << \"\\n\";\n\n        for (int i = 0; i < num_philosophers; ++i)\n            philosophers[i].check();\n\n        for (int i = 0; i < num_philosophers; ++i) {\n            delete think_nodes[i];\n            delete eat_nodes[i];\n            delete forward_nodes[i];\n        }\n    }\n\n    utility::report_elapsed_time((oneapi::tbb::tick_count::now() - main_time).seconds());\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/graph/fgbzip2/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(fgbzip2 CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(tbb)\n\nadd_executable(fgbzip2\n    blocksort.cpp\n    bzlib.cpp\n    compress.cpp\n    crctable.cpp\n    decompress.cpp\n    fgbzip2.cpp\n    huffman.cpp\n    randtable.cpp\n)\n\ntarget_link_libraries(fgbzip2 TBB::tbb Threads::Threads)\ntarget_compile_options(fgbzip2 PRIVATE ${TBB_CXX_STD_FLAG})\n\nif (MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL IntelLLVM)\n    target_compile_options(fgbzip2 PRIVATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)\nendif()\n\nif (MSVC AND (CMAKE_CXX_COMPILER_ID STREQUAL Intel OR CMAKE_CXX_COMPILER_ID STREQUAL IntelLLVM))\n    if (COMMAND target_link_options)\n        target_link_options(fgbzip2 PRIVATE /FORCE:MULTIPLE /INCREMENTAL:NO)\n    else()\n        set_target_properties(fgbzip2 PROPERTIES LINK_FLAGS /FORCE:MULTIPLE /INCREMENTAL:NO)\n    endif()\nendif()\n\nset(EXECUTABLE \"$<TARGET_FILE:fgbzip2>\")\nset(ARGS -b=9 -async \"$<TARGET_FILE:fgbzip2>\")\n\nadd_execution_target(run_fgbzip2 fgbzip2 ${EXECUTABLE} \"${ARGS}\")\nadd_execution_target(perf_run_fgbzip2 fgbzip2 ${EXECUTABLE} \"${ARGS}\")\n"
  },
  {
    "path": "third-party/tbb/examples/graph/fgbzip2/README.md",
    "content": "# fgbzip2 sample\nfgbzip2 is a parallel implementation of bzip2 block-sorting file compressor that uses `oneapi::tbb::flow`. The output of this application is fully compatible with bzip2 v1.0.6 or newer.\n\nThis example includes software developed by Julian R Seward. See here for copyright information.\nIt exemplifies support for asynchronous capabilities in the flow graph API.\n\n## Building the example\n```\ncmake <path_to_example>\ncmake --build .\n```\n\n## Running the sample\n### Predefined make targets\n* `make run_fgbzip2` - executes the example with predefined parameters.\n* `make perf_run_fgbzip2` - executes the example with suggested parameters to measure the oneTBB performance.\n\n### Application parameters\nUsage:\n```\nfgbzip2 [-b=value] [-v] [-l=value] [-async] [filename=value] [-h] [filename]\n```\n* `-h` - prints the help for command line options.\n* `-b` - block size in 100 KB chunks, [1 .. 9].\n* `-v` - prints diagnostic output to screen.\n* `-l` - use memory limit for compression algorithm with 1 MB (minimum) granularity.\n* `-async` - use graph `async_node`-based implementation.\n* `filename` - name of the file to compress.\n"
  },
  {
    "path": "third-party/tbb/examples/graph/fgbzip2/blocksort.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*-------------------------------------------------------------*/\n/*--- Block sorting machinery                               ---*/\n/*---                                         blocksort.cpp ---*/\n/*-------------------------------------------------------------*/\n\n/* ------------------------------------------------------------------\n    The original source for this example:\n    This file is part of bzip2/libbzip2, a program and library for\n    lossless, block-sorting data compression.\n\n    bzip2/libbzip2 version 1.0.6 of 6 September 2010\n    Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>\n\n    This program, \"bzip2\", the associated library \"libbzip2\", and all\n    documentation, are copyright (C) 1996-2010 Julian R Seward.  All\n    rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n\n    1. Redistributions of source code must retain the above copyright\n    notice, this list of conditions and the following disclaimer.\n\n    2. The origin of this software must not be misrepresented; you must \n    not claim that you wrote the original software.  If you use this \n    software in a product, an acknowledgment in the product \n    documentation would be appreciated but is not required.\n\n    3. Altered source versions must be plainly marked as such, and must\n    not be misrepresented as being the original software.\n\n    4. The name of the author may not be used to endorse or promote \n    products derived from this software without specific prior written \n    permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n    GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n    WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n    Julian Seward, jseward@bzip.org\n    bzip2/libbzip2 version 1.0.6 of 6 September 2010\n   ------------------------------------------------------------------ */\n\n#include \"bzlib_private.hpp\"\n\n/*---------------------------------------------*/\n/*--- Fallback O(N log(N)^2) sorting        ---*/\n/*--- algorithm, for repetitive blocks      ---*/\n/*---------------------------------------------*/\n\n/*---------------------------------------------*/\nstatic __inline__ void fallbackSimpleSort(UInt32* fmap, UInt32* eclass, Int32 lo, Int32 hi) {\n    Int32 i, j, tmp;\n    UInt32 ec_tmp;\n\n    if (lo == hi)\n        return;\n\n    if (hi - lo > 3) {\n        for (i = hi - 4; i >= lo; i--) {\n            tmp = fmap[i];\n            ec_tmp = eclass[tmp];\n            for (j = i + 4; j <= hi && ec_tmp > eclass[fmap[j]]; j += 4)\n                fmap[j - 4] = fmap[j];\n            fmap[j - 4] = tmp;\n        }\n    }\n\n    for (i = hi - 1; i >= lo; i--) {\n        tmp = fmap[i];\n        ec_tmp = eclass[tmp];\n        for (j = i + 1; j <= hi && ec_tmp > eclass[fmap[j]]; j++)\n            fmap[j - 1] = fmap[j];\n        fmap[j - 1] = tmp;\n    }\n}\n\n/*---------------------------------------------*/\n#define fswap(zz1, zz2)    \\\n    {                      \\\n        Int32 zztmp = zz1; \\\n        zz1 = zz2;         \\\n        zz2 = zztmp;       \\\n    }\n\n#define fvswap(zzp1, zzp2, zzn)            \\\n    {                                      \\\n        Int32 yyp1 = (zzp1);               \\\n        Int32 yyp2 = (zzp2);               \\\n        Int32 yyn = (zzn);                 \\\n        while (yyn > 0) {                  \\\n            fswap(fmap[yyp1], fmap[yyp2]); \\\n            yyp1++;                        \\\n            yyp2++;                        \\\n            yyn--;                         \\\n        }                                  \\\n    }\n\n#define fmin(a, b) ((a) < (b)) ? (a) : (b)\n\n#define fpush(lz, hz)     \\\n    {                     \\\n        stackLo[sp] = lz; \\\n        stackHi[sp] = hz; \\\n        sp++;             \\\n    }\n\n#define fpop(lz, hz)      \\\n    {                     \\\n        sp--;             \\\n        lz = stackLo[sp]; \\\n        hz = stackHi[sp]; \\\n    }\n\n#define FALLBACK_QSORT_SMALL_THRESH 10\n#define FALLBACK_QSORT_STACK_SIZE   100\n\nstatic void fallbackQSort3(UInt32* fmap, UInt32* eclass, Int32 loSt, Int32 hiSt) {\n    Int32 unLo, unHi, ltLo, gtHi, n, m;\n    Int32 sp, lo, hi;\n    UInt32 med, r, r3;\n    Int32 stackLo[FALLBACK_QSORT_STACK_SIZE];\n    Int32 stackHi[FALLBACK_QSORT_STACK_SIZE];\n\n    r = 0;\n\n    sp = 0;\n    fpush(loSt, hiSt);\n\n    while (sp > 0) {\n        AssertH(sp < FALLBACK_QSORT_STACK_SIZE - 1, 1004);\n\n        fpop(lo, hi);\n        if (hi - lo < FALLBACK_QSORT_SMALL_THRESH) {\n            fallbackSimpleSort(fmap, eclass, lo, hi);\n            continue;\n        }\n\n        /* Random partitioning.  Median of 3 sometimes fails to\n         avoid bad cases.  Median of 9 seems to help but \n         looks rather expensive.  This too seems to work but\n         is cheaper.  Guidance for the magic constants \n         7621 and 32768 is taken from Sedgewick's algorithms\n         book, chapter 35.\n      */\n        r = ((r * 7621) + 1) % 32768;\n        r3 = r % 3;\n        if (r3 == 0)\n            med = eclass[fmap[lo]];\n        else if (r3 == 1)\n            med = eclass[fmap[(lo + hi) >> 1]];\n        else\n            med = eclass[fmap[hi]];\n\n        unLo = ltLo = lo;\n        unHi = gtHi = hi;\n\n        while (1) {\n            while (1) {\n                if (unLo > unHi)\n                    break;\n                n = (Int32)eclass[fmap[unLo]] - (Int32)med;\n                if (n == 0) {\n                    fswap(fmap[unLo], fmap[ltLo]);\n                    ltLo++;\n                    unLo++;\n                    continue;\n                };\n                if (n > 0)\n                    break;\n                unLo++;\n            }\n            while (1) {\n                if (unLo > unHi)\n                    break;\n                n = (Int32)eclass[fmap[unHi]] - (Int32)med;\n                if (n == 0) {\n                    fswap(fmap[unHi], fmap[gtHi]);\n                    gtHi--;\n                    unHi--;\n                    continue;\n                };\n                if (n < 0)\n                    break;\n                unHi--;\n            }\n            if (unLo > unHi)\n                break;\n            fswap(fmap[unLo], fmap[unHi]);\n            unLo++;\n            unHi--;\n        }\n\n        AssertD(unHi == unLo - 1, \"fallbackQSort3(2)\");\n\n        if (gtHi < ltLo)\n            continue;\n\n        n = fmin(ltLo - lo, unLo - ltLo);\n        fvswap(lo, unLo - n, n);\n        m = fmin(hi - gtHi, gtHi - unHi);\n        fvswap(unLo, hi - m + 1, m);\n\n        n = lo + unLo - ltLo - 1;\n        m = hi - (gtHi - unHi) + 1;\n\n        if (n - lo > hi - m) {\n            fpush(lo, n);\n            fpush(m, hi);\n        }\n        else {\n            fpush(m, hi);\n            fpush(lo, n);\n        }\n    }\n}\n\n#undef fmin\n#undef fpush\n#undef fpop\n#undef fswap\n#undef fvswap\n#undef FALLBACK_QSORT_SMALL_THRESH\n#undef FALLBACK_QSORT_STACK_SIZE\n\n/*---------------------------------------------*/\n/* Pre:\n      nblock > 0\n      eclass exists for [0 .. nblock-1]\n      ((UChar*)eclass) [0 .. nblock-1] holds block\n      ptr exists for [0 .. nblock-1]\n\n   Post:\n      ((UChar*)eclass) [0 .. nblock-1] holds block\n      All other areas of eclass destroyed\n      fmap [0 .. nblock-1] holds sorted order\n      bhtab [ 0 .. 2+(nblock/32) ] destroyed\n*/\n\n#define SET_BH(zz)       bhtab[(zz) >> 5] |= (1 << ((zz)&31))\n#define CLEAR_BH(zz)     bhtab[(zz) >> 5] &= ~(1 << ((zz)&31))\n#define ISSET_BH(zz)     (bhtab[(zz) >> 5] & (1 << ((zz)&31)))\n#define WORD_BH(zz)      bhtab[(zz) >> 5]\n#define UNALIGNED_BH(zz) ((zz)&0x01f)\n\nstatic void fallbackSort(UInt32* fmap, UInt32* eclass, UInt32* bhtab, Int32 nblock, Int32 verb) {\n    Int32 ftab[257];\n    Int32 ftabCopy[256];\n    Int32 H, i, j, k, l, r, cc, cc1;\n    Int32 nNotDone;\n    Int32 nBhtab;\n    UChar* eclass8 = (UChar*)eclass;\n\n    /*--\n      Initial 1-char radix sort to generate\n      initial fmap and initial BH bits.\n   --*/\n    if (verb >= 4)\n        VPrintf0(\"        bucket sorting ...\\n\");\n    for (i = 0; i < 257; i++)\n        ftab[i] = 0;\n    for (i = 0; i < nblock; i++)\n        ftab[eclass8[i]]++;\n    for (i = 0; i < 256; i++)\n        ftabCopy[i] = ftab[i];\n    for (i = 1; i < 257; i++)\n        ftab[i] += ftab[i - 1];\n\n    for (i = 0; i < nblock; i++) {\n        j = eclass8[i];\n        k = ftab[j] - 1;\n        ftab[j] = k;\n        fmap[k] = i;\n    }\n\n    nBhtab = 2 + (nblock / 32);\n    for (i = 0; i < nBhtab; i++)\n        bhtab[i] = 0;\n    for (i = 0; i < 256; i++)\n        SET_BH(ftab[i]);\n\n    /*--\n      Inductively refine the buckets.  Kind-of an\n      \"exponential radix sort\" (!), inspired by the\n      Manber-Myers suffix array construction algorithm.\n   --*/\n\n    /*-- set sentinel bits for block-end detection --*/\n    for (i = 0; i < 32; i++) {\n        SET_BH(nblock + 2 * i);\n        CLEAR_BH(nblock + 2 * i + 1);\n    }\n\n    /*-- the log(N) loop --*/\n    H = 1;\n    while (1) {\n        if (verb >= 4)\n            VPrintf1(\"        depth %6d has \", H);\n\n        j = 0;\n        for (i = 0; i < nblock; i++) {\n            if (ISSET_BH(i))\n                j = i;\n            k = fmap[i] - H;\n            if (k < 0)\n                k += nblock;\n            eclass[k] = j;\n        }\n\n        nNotDone = 0;\n        r = -1;\n        while (1) {\n            /*-- find the next non-singleton bucket --*/\n            k = r + 1;\n            while (ISSET_BH(k) && UNALIGNED_BH(k))\n                k++;\n            if (ISSET_BH(k)) {\n                while (WORD_BH(k) == 0xffffffff)\n                    k += 32;\n                while (ISSET_BH(k))\n                    k++;\n            }\n            l = k - 1;\n            if (l >= nblock)\n                break;\n            while (!ISSET_BH(k) && UNALIGNED_BH(k))\n                k++;\n            if (!ISSET_BH(k)) {\n                while (WORD_BH(k) == 0x00000000)\n                    k += 32;\n                while (!ISSET_BH(k))\n                    k++;\n            }\n            r = k - 1;\n            if (r >= nblock)\n                break;\n\n            /*-- now [l, r] bracket current bucket --*/\n            if (r > l) {\n                nNotDone += (r - l + 1);\n                fallbackQSort3(fmap, eclass, l, r);\n\n                /*-- scan bucket and generate header bits-- */\n                cc = -1;\n                for (i = l; i <= r; i++) {\n                    cc1 = eclass[fmap[i]];\n                    if (cc != cc1) {\n                        SET_BH(i);\n                        cc = cc1;\n                    };\n                }\n            }\n        }\n\n        if (verb >= 4)\n            VPrintf1(\"%6d unresolved strings\\n\", nNotDone);\n\n        H *= 2;\n        if (H > nblock || nNotDone == 0)\n            break;\n    }\n\n    /*-- \n      Reconstruct the original block in\n      eclass8 [0 .. nblock-1], since the\n      previous phase destroyed it.\n   --*/\n    if (verb >= 4)\n        VPrintf0(\"        reconstructing block ...\\n\");\n    j = 0;\n    for (i = 0; i < nblock; i++) {\n        while (ftabCopy[j] == 0)\n            j++;\n        ftabCopy[j]--;\n        eclass8[fmap[i]] = (UChar)j;\n    }\n    AssertH(j < 256, 1005);\n}\n\n#undef SET_BH\n#undef CLEAR_BH\n#undef ISSET_BH\n#undef WORD_BH\n#undef UNALIGNED_BH\n\n/*---------------------------------------------*/\n/*--- The main, O(N^2 log(N)) sorting       ---*/\n/*--- algorithm.  Faster for \"normal\"       ---*/\n/*--- non-repetitive blocks.                ---*/\n/*---------------------------------------------*/\n\n/*---------------------------------------------*/\nstatic __inline__ Bool mainGtU(UInt32 i1,\n                               UInt32 i2,\n                               UChar* block,\n                               UInt16* quadrant,\n                               UInt32 nblock,\n                               Int32* budget) {\n    Int32 k;\n    UChar c1, c2;\n    UInt16 s1, s2;\n\n    AssertD(i1 != i2, \"mainGtU\");\n    /* 1 */\n    c1 = block[i1];\n    c2 = block[i2];\n    if (c1 != c2)\n        return (c1 > c2);\n    i1++;\n    i2++;\n    /* 2 */\n    c1 = block[i1];\n    c2 = block[i2];\n    if (c1 != c2)\n        return (c1 > c2);\n    i1++;\n    i2++;\n    /* 3 */\n    c1 = block[i1];\n    c2 = block[i2];\n    if (c1 != c2)\n        return (c1 > c2);\n    i1++;\n    i2++;\n    /* 4 */\n    c1 = block[i1];\n    c2 = block[i2];\n    if (c1 != c2)\n        return (c1 > c2);\n    i1++;\n    i2++;\n    /* 5 */\n    c1 = block[i1];\n    c2 = block[i2];\n    if (c1 != c2)\n        return (c1 > c2);\n    i1++;\n    i2++;\n    /* 6 */\n    c1 = block[i1];\n    c2 = block[i2];\n    if (c1 != c2)\n        return (c1 > c2);\n    i1++;\n    i2++;\n    /* 7 */\n    c1 = block[i1];\n    c2 = block[i2];\n    if (c1 != c2)\n        return (c1 > c2);\n    i1++;\n    i2++;\n    /* 8 */\n    c1 = block[i1];\n    c2 = block[i2];\n    if (c1 != c2)\n        return (c1 > c2);\n    i1++;\n    i2++;\n    /* 9 */\n    c1 = block[i1];\n    c2 = block[i2];\n    if (c1 != c2)\n        return (c1 > c2);\n    i1++;\n    i2++;\n    /* 10 */\n    c1 = block[i1];\n    c2 = block[i2];\n    if (c1 != c2)\n        return (c1 > c2);\n    i1++;\n    i2++;\n    /* 11 */\n    c1 = block[i1];\n    c2 = block[i2];\n    if (c1 != c2)\n        return (c1 > c2);\n    i1++;\n    i2++;\n    /* 12 */\n    c1 = block[i1];\n    c2 = block[i2];\n    if (c1 != c2)\n        return (c1 > c2);\n    i1++;\n    i2++;\n\n    k = nblock + 8;\n\n    do {\n        /* 1 */\n        c1 = block[i1];\n        c2 = block[i2];\n        if (c1 != c2)\n            return (c1 > c2);\n        s1 = quadrant[i1];\n        s2 = quadrant[i2];\n        if (s1 != s2)\n            return (s1 > s2);\n        i1++;\n        i2++;\n        /* 2 */\n        c1 = block[i1];\n        c2 = block[i2];\n        if (c1 != c2)\n            return (c1 > c2);\n        s1 = quadrant[i1];\n        s2 = quadrant[i2];\n        if (s1 != s2)\n            return (s1 > s2);\n        i1++;\n        i2++;\n        /* 3 */\n        c1 = block[i1];\n        c2 = block[i2];\n        if (c1 != c2)\n            return (c1 > c2);\n        s1 = quadrant[i1];\n        s2 = quadrant[i2];\n        if (s1 != s2)\n            return (s1 > s2);\n        i1++;\n        i2++;\n        /* 4 */\n        c1 = block[i1];\n        c2 = block[i2];\n        if (c1 != c2)\n            return (c1 > c2);\n        s1 = quadrant[i1];\n        s2 = quadrant[i2];\n        if (s1 != s2)\n            return (s1 > s2);\n        i1++;\n        i2++;\n        /* 5 */\n        c1 = block[i1];\n        c2 = block[i2];\n        if (c1 != c2)\n            return (c1 > c2);\n        s1 = quadrant[i1];\n        s2 = quadrant[i2];\n        if (s1 != s2)\n            return (s1 > s2);\n        i1++;\n        i2++;\n        /* 6 */\n        c1 = block[i1];\n        c2 = block[i2];\n        if (c1 != c2)\n            return (c1 > c2);\n        s1 = quadrant[i1];\n        s2 = quadrant[i2];\n        if (s1 != s2)\n            return (s1 > s2);\n        i1++;\n        i2++;\n        /* 7 */\n        c1 = block[i1];\n        c2 = block[i2];\n        if (c1 != c2)\n            return (c1 > c2);\n        s1 = quadrant[i1];\n        s2 = quadrant[i2];\n        if (s1 != s2)\n            return (s1 > s2);\n        i1++;\n        i2++;\n        /* 8 */\n        c1 = block[i1];\n        c2 = block[i2];\n        if (c1 != c2)\n            return (c1 > c2);\n        s1 = quadrant[i1];\n        s2 = quadrant[i2];\n        if (s1 != s2)\n            return (s1 > s2);\n        i1++;\n        i2++;\n\n        if (i1 >= nblock)\n            i1 -= nblock;\n        if (i2 >= nblock)\n            i2 -= nblock;\n\n        k -= 8;\n        (*budget)--;\n    } while (k >= 0);\n\n    return False;\n}\n\n/*---------------------------------------------*/\n/*--\n   Knuth's increments seem to work better\n   than Incerpi-Sedgewick here.  Possibly\n   because the number of elements to sort\n   is usually small, typically <= 20.\n--*/\nstatic Int32 incs[14] = { 1,    4,    13,    40,    121,    364,    1093,\n                          3280, 9841, 29524, 88573, 265720, 797161, 2391484 };\n\nstatic void mainSimpleSort(UInt32* ptr,\n                           UChar* block,\n                           UInt16* quadrant,\n                           Int32 nblock,\n                           Int32 lo,\n                           Int32 hi,\n                           Int32 d,\n                           Int32* budget) {\n    Int32 i, j, h, bigN, hp;\n    UInt32 v;\n\n    bigN = hi - lo + 1;\n    if (bigN < 2)\n        return;\n\n    hp = 0;\n    while (incs[hp] < bigN)\n        hp++;\n    hp--;\n\n    for (; hp >= 0; hp--) {\n        h = incs[hp];\n\n        i = lo + h;\n        while (True) {\n            /*-- copy 1 --*/\n            if (i > hi)\n                break;\n            v = ptr[i];\n            j = i;\n            while (mainGtU(ptr[j - h] + d, v + d, block, quadrant, nblock, budget)) {\n                ptr[j] = ptr[j - h];\n                j = j - h;\n                if (j <= (lo + h - 1))\n                    break;\n            }\n            ptr[j] = v;\n            i++;\n\n            /*-- copy 2 --*/\n            if (i > hi)\n                break;\n            v = ptr[i];\n            j = i;\n            while (mainGtU(ptr[j - h] + d, v + d, block, quadrant, nblock, budget)) {\n                ptr[j] = ptr[j - h];\n                j = j - h;\n                if (j <= (lo + h - 1))\n                    break;\n            }\n            ptr[j] = v;\n            i++;\n\n            /*-- copy 3 --*/\n            if (i > hi)\n                break;\n            v = ptr[i];\n            j = i;\n            while (mainGtU(ptr[j - h] + d, v + d, block, quadrant, nblock, budget)) {\n                ptr[j] = ptr[j - h];\n                j = j - h;\n                if (j <= (lo + h - 1))\n                    break;\n            }\n            ptr[j] = v;\n            i++;\n\n            if (*budget < 0)\n                return;\n        }\n    }\n}\n\n/*---------------------------------------------*/\n/*--\n   The following is an implementation of\n   an elegant 3-way quicksort for strings,\n   described in a paper \"Fast Algorithms for\n   Sorting and Searching Strings\", by Robert\n   Sedgewick and Jon L. Bentley.\n--*/\n\n#define mswap(zz1, zz2)    \\\n    {                      \\\n        Int32 zztmp = zz1; \\\n        zz1 = zz2;         \\\n        zz2 = zztmp;       \\\n    }\n\n#define mvswap(zzp1, zzp2, zzn)          \\\n    {                                    \\\n        Int32 yyp1 = (zzp1);             \\\n        Int32 yyp2 = (zzp2);             \\\n        Int32 yyn = (zzn);               \\\n        while (yyn > 0) {                \\\n            mswap(ptr[yyp1], ptr[yyp2]); \\\n            yyp1++;                      \\\n            yyp2++;                      \\\n            yyn--;                       \\\n        }                                \\\n    }\n\nstatic __inline__ UChar mmed3(UChar a, UChar b, UChar c) {\n    UChar t;\n    if (a > b) {\n        t = a;\n        a = b;\n        b = t;\n    };\n    if (b > c) {\n        b = c;\n        if (a > b)\n            b = a;\n    }\n    return b;\n}\n\n#define mmin(a, b) ((a) < (b)) ? (a) : (b)\n\n#define mpush(lz, hz, dz) \\\n    {                     \\\n        stackLo[sp] = lz; \\\n        stackHi[sp] = hz; \\\n        stackD[sp] = dz;  \\\n        sp++;             \\\n    }\n\n#define mpop(lz, hz, dz)  \\\n    {                     \\\n        sp--;             \\\n        lz = stackLo[sp]; \\\n        hz = stackHi[sp]; \\\n        dz = stackD[sp];  \\\n    }\n\n#define mnextsize(az) (nextHi[az] - nextLo[az])\n\n#define mnextswap(az, bz)        \\\n    {                            \\\n        Int32 tz;                \\\n        tz = nextLo[az];         \\\n        nextLo[az] = nextLo[bz]; \\\n        nextLo[bz] = tz;         \\\n        tz = nextHi[az];         \\\n        nextHi[az] = nextHi[bz]; \\\n        nextHi[bz] = tz;         \\\n        tz = nextD[az];          \\\n        nextD[az] = nextD[bz];   \\\n        nextD[bz] = tz;          \\\n    }\n\n#define MAIN_QSORT_SMALL_THRESH 20\n#define MAIN_QSORT_DEPTH_THRESH (BZ_N_RADIX + BZ_N_QSORT)\n#define MAIN_QSORT_STACK_SIZE   100\n\nstatic void mainQSort3(UInt32* ptr,\n                       UChar* block,\n                       UInt16* quadrant,\n                       Int32 nblock,\n                       Int32 loSt,\n                       Int32 hiSt,\n                       Int32 dSt,\n                       Int32* budget) {\n    Int32 unLo, unHi, ltLo, gtHi, n, m, med;\n    Int32 sp, lo, hi, d;\n\n    Int32 stackLo[MAIN_QSORT_STACK_SIZE];\n    Int32 stackHi[MAIN_QSORT_STACK_SIZE];\n    Int32 stackD[MAIN_QSORT_STACK_SIZE];\n\n    Int32 nextLo[3];\n    Int32 nextHi[3];\n    Int32 nextD[3];\n\n    sp = 0;\n    mpush(loSt, hiSt, dSt);\n\n    while (sp > 0) {\n        AssertH(sp < MAIN_QSORT_STACK_SIZE - 2, 1001);\n\n        mpop(lo, hi, d);\n        if (hi - lo < MAIN_QSORT_SMALL_THRESH || d > MAIN_QSORT_DEPTH_THRESH) {\n            mainSimpleSort(ptr, block, quadrant, nblock, lo, hi, d, budget);\n            if (*budget < 0)\n                return;\n            continue;\n        }\n\n        med = (Int32)mmed3(block[ptr[lo] + d], block[ptr[hi] + d], block[ptr[(lo + hi) >> 1] + d]);\n\n        unLo = ltLo = lo;\n        unHi = gtHi = hi;\n\n        while (True) {\n            while (True) {\n                if (unLo > unHi)\n                    break;\n                n = ((Int32)block[ptr[unLo] + d]) - med;\n                if (n == 0) {\n                    mswap(ptr[unLo], ptr[ltLo]);\n                    ltLo++;\n                    unLo++;\n                    continue;\n                };\n                if (n > 0)\n                    break;\n                unLo++;\n            }\n            while (True) {\n                if (unLo > unHi)\n                    break;\n                n = ((Int32)block[ptr[unHi] + d]) - med;\n                if (n == 0) {\n                    mswap(ptr[unHi], ptr[gtHi]);\n                    gtHi--;\n                    unHi--;\n                    continue;\n                };\n                if (n < 0)\n                    break;\n                unHi--;\n            }\n            if (unLo > unHi)\n                break;\n            mswap(ptr[unLo], ptr[unHi]);\n            unLo++;\n            unHi--;\n        }\n\n        AssertD(unHi == unLo - 1, \"mainQSort3(2)\");\n\n        if (gtHi < ltLo) {\n            mpush(lo, hi, d + 1);\n            continue;\n        }\n\n        n = mmin(ltLo - lo, unLo - ltLo);\n        mvswap(lo, unLo - n, n);\n        m = mmin(hi - gtHi, gtHi - unHi);\n        mvswap(unLo, hi - m + 1, m);\n\n        n = lo + unLo - ltLo - 1;\n        m = hi - (gtHi - unHi) + 1;\n\n        nextLo[0] = lo;\n        nextHi[0] = n;\n        nextD[0] = d;\n        nextLo[1] = m;\n        nextHi[1] = hi;\n        nextD[1] = d;\n        nextLo[2] = n + 1;\n        nextHi[2] = m - 1;\n        nextD[2] = d + 1;\n\n        if (mnextsize(0) < mnextsize(1))\n            mnextswap(0, 1);\n        if (mnextsize(1) < mnextsize(2))\n            mnextswap(1, 2);\n        if (mnextsize(0) < mnextsize(1))\n            mnextswap(0, 1);\n\n        AssertD(mnextsize(0) >= mnextsize(1), \"mainQSort3(8)\");\n        AssertD(mnextsize(1) >= mnextsize(2), \"mainQSort3(9)\");\n\n        mpush(nextLo[0], nextHi[0], nextD[0]);\n        mpush(nextLo[1], nextHi[1], nextD[1]);\n        mpush(nextLo[2], nextHi[2], nextD[2]);\n    }\n}\n\n#undef mswap\n#undef mvswap\n#undef mpush\n#undef mpop\n#undef mmin\n#undef mnextsize\n#undef mnextswap\n#undef MAIN_QSORT_SMALL_THRESH\n#undef MAIN_QSORT_DEPTH_THRESH\n#undef MAIN_QSORT_STACK_SIZE\n\n/*---------------------------------------------*/\n/* Pre:\n      nblock > N_OVERSHOOT\n      block32 exists for [0 .. nblock-1 +N_OVERSHOOT]\n      ((UChar*)block32) [0 .. nblock-1] holds block\n      ptr exists for [0 .. nblock-1]\n\n   Post:\n      ((UChar*)block32) [0 .. nblock-1] holds block\n      All other areas of block32 destroyed\n      ftab [0 .. 65536 ] destroyed\n      ptr [0 .. nblock-1] holds sorted order\n      if (*budget < 0), sorting was abandoned\n*/\n\n#define BIGFREQ(b) (ftab[((b) + 1) << 8] - ftab[(b) << 8])\n#define SETMASK    (1 << 21)\n#define CLEARMASK  (~(SETMASK))\n\nstatic void mainSort(UInt32* ptr,\n                     UChar* block,\n                     UInt16* quadrant,\n                     UInt32* ftab,\n                     Int32 nblock,\n                     Int32 verb,\n                     Int32* budget) {\n    Int32 i, j, k, ss, sb;\n    Int32 runningOrder[256];\n    Bool bigDone[256];\n    Int32 copyStart[256];\n    Int32 copyEnd[256];\n    UChar c1;\n    Int32 numQSorted;\n    UInt16 s;\n    if (verb >= 4)\n        VPrintf0(\"        main sort initialise ...\\n\");\n\n    /*-- set up the 2-byte frequency table --*/\n    for (i = 65536; i >= 0; i--)\n        ftab[i] = 0;\n\n    j = block[0] << 8;\n    i = nblock - 1;\n    for (; i >= 3; i -= 4) {\n        quadrant[i] = 0;\n        j = (j >> 8) | (((UInt16)block[i]) << 8);\n        ftab[j]++;\n        quadrant[i - 1] = 0;\n        j = (j >> 8) | (((UInt16)block[i - 1]) << 8);\n        ftab[j]++;\n        quadrant[i - 2] = 0;\n        j = (j >> 8) | (((UInt16)block[i - 2]) << 8);\n        ftab[j]++;\n        quadrant[i - 3] = 0;\n        j = (j >> 8) | (((UInt16)block[i - 3]) << 8);\n        ftab[j]++;\n    }\n    for (; i >= 0; i--) {\n        quadrant[i] = 0;\n        j = (j >> 8) | (((UInt16)block[i]) << 8);\n        ftab[j]++;\n    }\n\n    /*-- (emphasises close relationship of block & quadrant) --*/\n    for (i = 0; i < BZ_N_OVERSHOOT; i++) {\n        block[nblock + i] = block[i];\n        quadrant[nblock + i] = 0;\n    }\n\n    if (verb >= 4)\n        VPrintf0(\"        bucket sorting ...\\n\");\n\n    /*-- Complete the initial radix sort --*/\n    for (i = 1; i <= 65536; i++)\n        ftab[i] += ftab[i - 1];\n\n    s = block[0] << 8;\n    i = nblock - 1;\n    for (; i >= 3; i -= 4) {\n        s = (s >> 8) | (block[i] << 8);\n        j = ftab[s] - 1;\n        ftab[s] = j;\n        ptr[j] = i;\n        s = (s >> 8) | (block[i - 1] << 8);\n        j = ftab[s] - 1;\n        ftab[s] = j;\n        ptr[j] = i - 1;\n        s = (s >> 8) | (block[i - 2] << 8);\n        j = ftab[s] - 1;\n        ftab[s] = j;\n        ptr[j] = i - 2;\n        s = (s >> 8) | (block[i - 3] << 8);\n        j = ftab[s] - 1;\n        ftab[s] = j;\n        ptr[j] = i - 3;\n    }\n    for (; i >= 0; i--) {\n        s = (s >> 8) | (block[i] << 8);\n        j = ftab[s] - 1;\n        ftab[s] = j;\n        ptr[j] = i;\n    }\n\n    /*--\n      Now ftab contains the first loc of every small bucket.\n      Calculate the running order, from smallest to largest\n      big bucket.\n   --*/\n    for (i = 0; i <= 255; i++) {\n        bigDone[i] = False;\n        runningOrder[i] = i;\n    }\n\n    {\n        Int32 vv;\n        Int32 h = 1;\n        do\n            h = 3 * h + 1;\n        while (h <= 256);\n        do {\n            h = h / 3;\n            for (i = h; i <= 255; i++) {\n                vv = runningOrder[i];\n                j = i;\n                while (BIGFREQ(runningOrder[j - h]) > BIGFREQ(vv)) {\n                    runningOrder[j] = runningOrder[j - h];\n                    j = j - h;\n                    if (j <= (h - 1))\n                        goto zero;\n                }\n            zero:\n                runningOrder[j] = vv;\n            }\n        } while (h != 1);\n    }\n\n    /*--\n      The main sorting loop.\n   --*/\n\n    numQSorted = 0;\n\n    for (i = 0; i <= 255; i++) {\n        /*--\n         Process big buckets, starting with the least full.\n         Basically this is a 3-step process in which we call\n         mainQSort3 to sort the small buckets [ss, j], but\n         also make a big effort to avoid the calls if we can.\n      --*/\n        ss = runningOrder[i];\n\n        /*--\n         Step 1:\n         Complete the big bucket [ss] by quicksorting\n         any unsorted small buckets [ss, j], for j != ss.  \n         Hopefully previous pointer-scanning phases have already\n         completed many of the small buckets [ss, j], so\n         we don't have to sort them at all.\n      --*/\n        for (j = 0; j <= 255; j++) {\n            if (j != ss) {\n                sb = (ss << 8) + j;\n                if (!(ftab[sb] & SETMASK)) {\n                    Int32 lo = ftab[sb] & CLEARMASK;\n                    Int32 hi = (ftab[sb + 1] & CLEARMASK) - 1;\n                    if (hi > lo) {\n                        if (verb >= 4)\n                            VPrintf4(\"        qsort [0x%x, 0x%x]   \"\n                                     \"done %d   this %d\\n\",\n                                     ss,\n                                     j,\n                                     numQSorted,\n                                     hi - lo + 1);\n                        mainQSort3(ptr, block, quadrant, nblock, lo, hi, BZ_N_RADIX, budget);\n                        numQSorted += (hi - lo + 1);\n                        if (*budget < 0)\n                            return;\n                    }\n                }\n                ftab[sb] |= SETMASK;\n            }\n        }\n\n        AssertH(!bigDone[ss], 1006);\n\n        /*--\n         Step 2:\n         Now scan this big bucket [ss] so as to synthesise the\n         sorted order for small buckets [t, ss] for all t,\n         including, magically, the bucket [ss,ss] too.\n         This will avoid doing Real Work in subsequent Step 1's.\n      --*/\n        {\n            for (j = 0; j <= 255; j++) {\n                copyStart[j] = ftab[(j << 8) + ss] & CLEARMASK;\n                copyEnd[j] = (ftab[(j << 8) + ss + 1] & CLEARMASK) - 1;\n            }\n            for (j = ftab[ss << 8] & CLEARMASK; j < copyStart[ss]; j++) {\n                k = ptr[j] - 1;\n                if (k < 0)\n                    k += nblock;\n                c1 = block[k];\n                if (!bigDone[c1])\n                    ptr[copyStart[c1]++] = k;\n            }\n            for (j = (ftab[(ss + 1) << 8] & CLEARMASK) - 1; j > copyEnd[ss]; j--) {\n                k = ptr[j] - 1;\n                if (k < 0)\n                    k += nblock;\n                c1 = block[k];\n                if (!bigDone[c1])\n                    ptr[copyEnd[c1]--] = k;\n            }\n        }\n\n        AssertH((copyStart[ss] - 1 == copyEnd[ss]) ||\n                    /* Extremely rare case missing in bzip2-1.0.0 and 1.0.1.\n                   Necessity for this case is demonstrated by compressing \n                   a sequence of approximately 48.5 million of character \n                   251; 1.0.0/1.0.1 will then die here. */\n                    (copyStart[ss] == 0 && copyEnd[ss] == nblock - 1),\n                1007)\n\n            for (j = 0; j <= 255; j++) ftab[(j << 8) + ss] |= SETMASK;\n\n        /*--\n         Step 3:\n         The [ss] big bucket is now done.  Record this fact,\n         and update the quadrant descriptors.  Remember to\n         update quadrants in the overshoot area too, if\n         necessary.  The \"if (i < 255)\" test merely skips\n         this updating for the last bucket processed, since\n         updating for the last bucket is pointless.\n\n         The quadrant array provides a way to incrementally\n         cache sort orderings, as they appear, so as to \n         make subsequent comparisons in fullGtU() complete\n         faster.  For repetitive blocks this makes a big\n         difference (but not big enough to be able to avoid\n         the fallback sorting mechanism, exponential radix sort).\n\n         The precise meaning is: at all times:\n\n            for 0 <= i < nblock and 0 <= j <= nblock\n\n            if block[i] != block[j], \n\n               then the relative values of quadrant[i] and \n                    quadrant[j] are meaningless.\n\n               else {\n                  if quadrant[i] < quadrant[j]\n                     then the string starting at i lexicographically\n                     precedes the string starting at j\n\n                  else if quadrant[i] > quadrant[j]\n                     then the string starting at j lexicographically\n                     precedes the string starting at i\n\n                  else\n                     the relative ordering of the strings starting\n                     at i and j has not yet been determined.\n               }\n      --*/\n        bigDone[ss] = True;\n\n        if (i < 255) {\n            Int32 bbStart = ftab[ss << 8] & CLEARMASK;\n            Int32 bbSize = (ftab[(ss + 1) << 8] & CLEARMASK) - bbStart;\n            Int32 shifts = 0;\n\n            while ((bbSize >> shifts) > 65534)\n                shifts++;\n\n            for (j = bbSize - 1; j >= 0; j--) {\n                Int32 a2update = ptr[bbStart + j];\n                UInt16 qVal = (UInt16)(j >> shifts);\n                quadrant[a2update] = qVal;\n                if (a2update < BZ_N_OVERSHOOT)\n                    quadrant[a2update + nblock] = qVal;\n            }\n            AssertH(((bbSize - 1) >> shifts) <= 65535, 1002);\n        }\n    }\n\n    if (verb >= 4)\n        VPrintf3(\"        %d pointers, %d sorted, %d scanned\\n\",\n                 nblock,\n                 numQSorted,\n                 nblock - numQSorted);\n}\n\n#undef BIGFREQ\n#undef SETMASK\n#undef CLEARMASK\n\n/*---------------------------------------------*/\n/* Pre:\n      nblock > 0\n      arr2 exists for [0 .. nblock-1 +N_OVERSHOOT]\n      ((UChar*)arr2)  [0 .. nblock-1] holds block\n      arr1 exists for [0 .. nblock-1]\n\n   Post:\n      ((UChar*)arr2) [0 .. nblock-1] holds block\n      All other areas of block destroyed\n      ftab [ 0 .. 65536 ] destroyed\n      arr1 [0 .. nblock-1] holds sorted order\n*/\nvoid BZ2_blockSort(EState* s) {\n    UInt32* ptr = s->ptr;\n    UChar* block = s->block;\n    UInt32* ftab = s->ftab;\n    Int32 nblock = s->nblock;\n    Int32 verb = s->verbosity;\n    Int32 wfact = s->workFactor;\n    UInt16* quadrant;\n    Int32 budget;\n    Int32 budgetInit;\n    Int32 i;\n\n    if (nblock < 10000) {\n        fallbackSort(s->arr1, s->arr2, ftab, nblock, verb);\n    }\n    else {\n        /* Calculate the location for quadrant, remembering to get\n         the alignment right.  Assumes that &(block[0]) is at least\n         2-byte aligned -- this should be ok since block is really\n         the first section of arr2.\n      */\n        i = nblock + BZ_N_OVERSHOOT;\n        if (i & 1)\n            i++;\n        quadrant = (UInt16*)(&(block[i]));\n\n        /* (wfact-1) / 3 puts the default-factor-30\n         transition point at very roughly the same place as \n         with v0.1 and v0.9.0.  \n         Not that it particularly matters any more, since the\n         resulting compressed stream is now the same regardless\n         of whether or not we use the main sort or fallback sort.\n      */\n        if (wfact < 1)\n            wfact = 1;\n        if (wfact > 100)\n            wfact = 100;\n        budgetInit = nblock * ((wfact - 1) / 3);\n        budget = budgetInit;\n\n        mainSort(ptr, block, quadrant, ftab, nblock, verb, &budget);\n        if (verb >= 3)\n            VPrintf3(\"      %d work, %d block, ratio %5.2f\\n\",\n                     budgetInit - budget,\n                     nblock,\n                     (float)(budgetInit - budget) / (float)(nblock == 0 ? 1 : nblock));\n        if (budget < 0) {\n            if (verb >= 2)\n                VPrintf0(\"    too repetitive; using fallback\"\n                         \" sorting algorithm\\n\");\n            fallbackSort(s->arr1, s->arr2, ftab, nblock, verb);\n        }\n    }\n\n    s->origPtr = -1;\n    for (i = 0; i < s->nblock; i++)\n        if (ptr[i] == 0) {\n            s->origPtr = i;\n            break;\n        };\n\n    AssertH(s->origPtr != -1, 1003);\n}\n\n/*-------------------------------------------------------------*/\n/*--- end                                       blocksort.c ---*/\n/*-------------------------------------------------------------*/\n"
  },
  {
    "path": "third-party/tbb/examples/graph/fgbzip2/bzlib.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*-------------------------------------------------------------*/\n/*--- Library top-level functions.                          ---*/\n/*---                                             bzlib.cpp ---*/\n/*-------------------------------------------------------------*/\n\n/* ------------------------------------------------------------------\n   The original source for this example:\n   This file is part of bzip2/libbzip2, a program and library for\n   lossless, block-sorting data compression.\n\n   bzip2/libbzip2 version 1.0.6 of 6 September 2010\n   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>\n\n   This program, \"bzip2\", the associated library \"libbzip2\", and all\n   documentation, are copyright (C) 1996-2010 Julian R Seward.  All\n   rights reserved.\n\n   Redistribution and use in source and binary forms, with or without\n   modification, are permitted provided that the following conditions\n   are met:\n\n   1. Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   2. The origin of this software must not be misrepresented; you must \n   not claim that you wrote the original software.  If you use this \n   software in a product, an acknowledgment in the product \n   documentation would be appreciated but is not required.\n\n   3. Altered source versions must be plainly marked as such, and must\n   not be misrepresented as being the original software.\n\n   4. The name of the author may not be used to endorse or promote \n   products derived from this software without specific prior written \n   permission.\n\n   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n   OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n   ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n   Julian Seward, jseward@bzip.org\n   bzip2/libbzip2 version 1.0.6 of 6 September 2010\n   ------------------------------------------------------------------ */\n\n/* CHANGES\n   0.9.0    -- original version.\n   0.9.0a/b -- no changes in this file.\n   0.9.0c   -- made zero-length BZ_FLUSH work correctly in bzCompress().\n     fixed bzWrite/bzRead to ignore zero-length requests.\n     fixed bzread to correctly handle read requests after EOF.\n     wrong parameter order in call to bzDecompressInit in\n     bzBuffToBuffDecompress.  Fixed.\n*/\n\n#include \"bzlib_private.hpp\"\n\n/*---------------------------------------------------*/\n/*--- Compression stuff                           ---*/\n/*---------------------------------------------------*/\n\n/*---------------------------------------------------*/\n#ifndef BZ_NO_STDIO\nvoid BZ2_bz__AssertH__fail(int errcode) {\n    fprintf(stderr,\n            \"\\n\\nbzip2/libbzip2: internal error number %d.\\n\"\n            \"This is a bug in bzip2/libbzip2, %s.\\n\"\n            \"Please report it to me at: jseward@bzip.org.  If this happened\\n\"\n            \"when you were using some program which uses libbzip2 as a\\n\"\n            \"component, you should also report this bug to the author(s)\\n\"\n            \"of that program.  Please make an effort to report this bug;\\n\"\n            \"timely and accurate bug reports eventually lead to higher\\n\"\n            \"quality software.  Thanks.  Julian Seward, 10 December 2007.\\n\\n\",\n            errcode,\n            BZ2_bzlibVersion());\n\n    if (errcode == 1007) {\n        fprintf(stderr,\n                \"\\n*** A special note about internal error number 1007 ***\\n\"\n                \"\\n\"\n                \"Experience suggests that a common cause of i.e. 1007\\n\"\n                \"is unreliable memory or other hardware.  The 1007 assertion\\n\"\n                \"just happens to cross-check the results of huge numbers of\\n\"\n                \"memory reads/writes, and so acts (unintendedly) as a stress\\n\"\n                \"test of your memory system.\\n\"\n                \"\\n\"\n                \"I suggest the following: try compressing the file again,\\n\"\n                \"possibly monitoring progress in detail with the -vv flag.\\n\"\n                \"\\n\"\n                \"* If the error cannot be reproduced, and/or happens at different\\n\"\n                \"  points in compression, you may have a flaky memory system.\\n\"\n                \"  Try a memory-test program.  I have used Memtest86\\n\"\n                \"  (www.memtest86.com).  At the time of writing it is free (GPLd).\\n\"\n                \"  Memtest86 tests memory much more thorougly than your BIOSs\\n\"\n                \"  power-on test, and may find failures that the BIOS doesn't.\\n\"\n                \"\\n\"\n                \"* If the error can be repeatably reproduced, this is a bug in\\n\"\n                \"  bzip2, and I would very much like to hear about it.  Please\\n\"\n                \"  let me know, and, ideally, save a copy of the file causing the\\n\"\n                \"  problem -- without which I will be unable to investigate it.\\n\"\n                \"\\n\");\n    }\n\n    std::exit(-1);\n}\n#endif\n\n/*---------------------------------------------------*/\nstatic int bz_config_ok(void) {\n    if (sizeof(int) != 4)\n        return 0;\n    if (sizeof(short) != 2)\n        return 0;\n    if (sizeof(char) != 1)\n        return 0;\n    return 1;\n}\n\n/*---------------------------------------------------*/\nstatic void* default_bzalloc(void* opaque, Int32 items, Int32 size) {\n    void* v = malloc(items * size);\n    return v;\n}\n\nstatic void default_bzfree(void* opaque, void* addr) {\n    if (addr != nullptr)\n        free(addr);\n}\n\n/*---------------------------------------------------*/\nstatic void prepare_new_block(EState* s) {\n    Int32 i;\n    s->nblock = 0;\n    s->numZ = 0;\n    s->state_out_pos = 0;\n    BZ_INITIALISE_CRC(s->blockCRC);\n    for (i = 0; i < 256; i++)\n        s->inUse[i] = False;\n    s->blockNo++;\n}\n\n/*---------------------------------------------------*/\nstatic void init_RL(EState* s) {\n    s->state_in_ch = 256;\n    s->state_in_len = 0;\n}\n\nstatic Bool isempty_RL(EState* s) {\n    if (s->state_in_ch < 256 && s->state_in_len > 0)\n        return False;\n    else\n        return True;\n}\n\n/*---------------------------------------------------*/\nint BZ_API(BZ2_bzCompressInit)(bz_stream* strm, int blockSize100k, int verbosity, int workFactor) {\n    Int32 n;\n    EState* s;\n\n    if (!bz_config_ok())\n        return BZ_CONFIG_ERROR;\n\n    if (strm == nullptr || blockSize100k < 1 || blockSize100k > 9 || workFactor < 0 ||\n        workFactor > 250)\n        return BZ_PARAM_ERROR;\n\n    if (workFactor == 0)\n        workFactor = 30;\n    if (strm->bzalloc == nullptr)\n        strm->bzalloc = default_bzalloc;\n    if (strm->bzfree == nullptr)\n        strm->bzfree = default_bzfree;\n\n    s = (EState*)BZALLOC(sizeof(EState));\n    if (s == nullptr)\n        return BZ_MEM_ERROR;\n    s->strm = strm;\n\n    s->arr1 = nullptr;\n    s->arr2 = nullptr;\n    s->ftab = nullptr;\n\n    n = 100000 * blockSize100k;\n    s->arr1 = (UInt32*)BZALLOC(n * sizeof(UInt32));\n    s->arr2 = (UInt32*)BZALLOC((n + BZ_N_OVERSHOOT) * sizeof(UInt32));\n    s->ftab = (UInt32*)BZALLOC(65537 * sizeof(UInt32));\n\n    if (s->arr1 == nullptr || s->arr2 == nullptr || s->ftab == nullptr) {\n        if (s->arr1 != nullptr)\n            BZFREE(s->arr1);\n        if (s->arr2 != nullptr)\n            BZFREE(s->arr2);\n        if (s->ftab != nullptr)\n            BZFREE(s->ftab);\n        if (s != nullptr)\n            BZFREE(s);\n        return BZ_MEM_ERROR;\n    }\n\n    s->blockNo = 0;\n    s->state = BZ_S_INPUT;\n    s->mode = BZ_M_RUNNING;\n    s->combinedCRC = 0;\n    s->blockSize100k = blockSize100k;\n    s->nblockMAX = 100000 * blockSize100k - 19;\n    s->verbosity = verbosity;\n    s->workFactor = workFactor;\n\n    s->block = (UChar*)s->arr2;\n    s->mtfv = (UInt16*)s->arr1;\n    s->zbits = nullptr;\n    s->ptr = (UInt32*)s->arr1;\n\n    strm->state = s;\n    strm->total_in_lo32 = 0;\n    strm->total_in_hi32 = 0;\n    strm->total_out_lo32 = 0;\n    strm->total_out_hi32 = 0;\n    init_RL(s);\n    prepare_new_block(s);\n    return BZ_OK;\n}\n\n/*---------------------------------------------------*/\nstatic void add_pair_to_block(EState* s) {\n    Int32 i;\n    UChar ch = (UChar)(s->state_in_ch);\n    for (i = 0; i < s->state_in_len; i++) {\n        BZ_UPDATE_CRC(s->blockCRC, ch);\n    }\n    s->inUse[s->state_in_ch] = True;\n    switch (s->state_in_len) {\n        case 1:\n            s->block[s->nblock] = (UChar)ch;\n            s->nblock++;\n            break;\n        case 2:\n            s->block[s->nblock] = (UChar)ch;\n            s->nblock++;\n            s->block[s->nblock] = (UChar)ch;\n            s->nblock++;\n            break;\n        case 3:\n            s->block[s->nblock] = (UChar)ch;\n            s->nblock++;\n            s->block[s->nblock] = (UChar)ch;\n            s->nblock++;\n            s->block[s->nblock] = (UChar)ch;\n            s->nblock++;\n            break;\n        default:\n            s->inUse[s->state_in_len - 4] = True;\n            s->block[s->nblock] = (UChar)ch;\n            s->nblock++;\n            s->block[s->nblock] = (UChar)ch;\n            s->nblock++;\n            s->block[s->nblock] = (UChar)ch;\n            s->nblock++;\n            s->block[s->nblock] = (UChar)ch;\n            s->nblock++;\n            s->block[s->nblock] = ((UChar)(s->state_in_len - 4));\n            s->nblock++;\n            break;\n    }\n}\n\n/*---------------------------------------------------*/\nstatic void flush_RL(EState* s) {\n    if (s->state_in_ch < 256)\n        add_pair_to_block(s);\n    init_RL(s);\n}\n\n/*---------------------------------------------------*/\n#define ADD_CHAR_TO_BLOCK(zs, zchh0)                                  \\\n    {                                                                 \\\n        UInt32 zchh = (UInt32)(zchh0);                                \\\n        /*-- fast track the common case --*/                          \\\n        if (zchh != zs->state_in_ch && zs->state_in_len == 1) {       \\\n            UChar ch = (UChar)(zs->state_in_ch);                      \\\n            BZ_UPDATE_CRC(zs->blockCRC, ch);                          \\\n            zs->inUse[zs->state_in_ch] = True;                        \\\n            zs->block[zs->nblock] = (UChar)ch;                        \\\n            zs->nblock++;                                             \\\n            zs->state_in_ch = zchh;                                   \\\n        }                                                             \\\n        else /*-- general, uncommon cases --*/                        \\\n            if (zchh != zs->state_in_ch || zs->state_in_len == 255) { \\\n            if (zs->state_in_ch < 256)                                \\\n                add_pair_to_block(zs);                                \\\n            zs->state_in_ch = zchh;                                   \\\n            zs->state_in_len = 1;                                     \\\n        }                                                             \\\n        else {                                                        \\\n            zs->state_in_len++;                                       \\\n        }                                                             \\\n    }\n\n/*---------------------------------------------------*/\nstatic Bool copy_input_until_stop(EState* s) {\n    Bool progress_in = False;\n\n    if (s->mode == BZ_M_RUNNING) {\n        /*-- fast track the common case --*/\n        while (True) {\n            /*-- block full? --*/\n            if (s->nblock >= s->nblockMAX)\n                break;\n            /*-- no input? --*/\n            if (s->strm->avail_in == 0)\n                break;\n            progress_in = True;\n            ADD_CHAR_TO_BLOCK(s, (UInt32)(*((UChar*)(s->strm->next_in))));\n            s->strm->next_in++;\n            s->strm->avail_in--;\n            s->strm->total_in_lo32++;\n            if (s->strm->total_in_lo32 == 0)\n                s->strm->total_in_hi32++;\n        }\n    }\n    else {\n        /*-- general, uncommon case --*/\n        while (True) {\n            /*-- block full? --*/\n            if (s->nblock >= s->nblockMAX)\n                break;\n            /*-- no input? --*/\n            if (s->strm->avail_in == 0)\n                break;\n            /*-- flush/finish end? --*/\n            if (s->avail_in_expect == 0)\n                break;\n            progress_in = True;\n            ADD_CHAR_TO_BLOCK(s, (UInt32)(*((UChar*)(s->strm->next_in))));\n            s->strm->next_in++;\n            s->strm->avail_in--;\n            s->strm->total_in_lo32++;\n            if (s->strm->total_in_lo32 == 0)\n                s->strm->total_in_hi32++;\n            s->avail_in_expect--;\n        }\n    }\n    return progress_in;\n}\n\n/*---------------------------------------------------*/\nstatic Bool copy_output_until_stop(EState* s) {\n    Bool progress_out = False;\n\n    while (True) {\n        /*-- no output space? --*/\n        if (s->strm->avail_out == 0)\n            break;\n\n        /*-- block done? --*/\n        if (s->state_out_pos >= s->numZ)\n            break;\n\n        progress_out = True;\n        *(s->strm->next_out) = s->zbits[s->state_out_pos];\n        s->state_out_pos++;\n        s->strm->avail_out--;\n        s->strm->next_out++;\n        s->strm->total_out_lo32++;\n        if (s->strm->total_out_lo32 == 0)\n            s->strm->total_out_hi32++;\n    }\n\n    return progress_out;\n}\n\n/*---------------------------------------------------*/\nstatic Bool handle_compress(bz_stream* strm) {\n    Bool progress_in = False;\n    Bool progress_out = False;\n    EState* s = (EState*)strm->state;\n\n    while (True) {\n        if (s->state == BZ_S_OUTPUT) {\n            progress_out |= copy_output_until_stop(s);\n            if (s->state_out_pos < s->numZ)\n                break;\n            if (s->mode == BZ_M_FINISHING && s->avail_in_expect == 0 && isempty_RL(s))\n                break;\n            prepare_new_block(s);\n            s->state = BZ_S_INPUT;\n            if (s->mode == BZ_M_FLUSHING && s->avail_in_expect == 0 && isempty_RL(s))\n                break;\n        }\n\n        if (s->state == BZ_S_INPUT) {\n            progress_in |= copy_input_until_stop(s);\n            if (s->mode != BZ_M_RUNNING && s->avail_in_expect == 0) {\n                flush_RL(s);\n                BZ2_compressBlock(s, (Bool)(s->mode == BZ_M_FINISHING));\n                s->state = BZ_S_OUTPUT;\n            }\n            else if (s->nblock >= s->nblockMAX) {\n                BZ2_compressBlock(s, False);\n                s->state = BZ_S_OUTPUT;\n            }\n            else if (s->strm->avail_in == 0) {\n                break;\n            }\n        }\n    }\n\n    return progress_in || progress_out;\n}\n\n/*---------------------------------------------------*/\nint BZ_API(BZ2_bzCompress)(bz_stream* strm, int action) {\n    Bool progress;\n    EState* s;\n    if (strm == nullptr)\n        return BZ_PARAM_ERROR;\n    s = (EState*)strm->state;\n    if (s == nullptr)\n        return BZ_PARAM_ERROR;\n    if (s->strm != strm)\n        return BZ_PARAM_ERROR;\n\npreswitch:\n    switch (s->mode) {\n        case BZ_M_IDLE: return BZ_SEQUENCE_ERROR;\n\n        case BZ_M_RUNNING:\n            if (action == BZ_RUN) {\n                progress = handle_compress(strm);\n                return progress ? BZ_RUN_OK : BZ_PARAM_ERROR;\n            }\n            else if (action == BZ_FLUSH) {\n                s->avail_in_expect = strm->avail_in;\n                s->mode = BZ_M_FLUSHING;\n                goto preswitch;\n            }\n            else if (action == BZ_FINISH) {\n                s->avail_in_expect = strm->avail_in;\n                s->mode = BZ_M_FINISHING;\n                goto preswitch;\n            }\n            else\n                return BZ_PARAM_ERROR;\n\n        case BZ_M_FLUSHING:\n            if (action != BZ_FLUSH)\n                return BZ_SEQUENCE_ERROR;\n            if (s->avail_in_expect != s->strm->avail_in)\n                return BZ_SEQUENCE_ERROR;\n            progress = handle_compress(strm);\n            if (s->avail_in_expect > 0 || !isempty_RL(s) || s->state_out_pos < s->numZ)\n                return BZ_FLUSH_OK;\n            s->mode = BZ_M_RUNNING;\n            return BZ_RUN_OK;\n\n        case BZ_M_FINISHING:\n            if (action != BZ_FINISH)\n                return BZ_SEQUENCE_ERROR;\n            if (s->avail_in_expect != s->strm->avail_in)\n                return BZ_SEQUENCE_ERROR;\n            progress = handle_compress(strm);\n            if (!progress)\n                return BZ_SEQUENCE_ERROR;\n            if (s->avail_in_expect > 0 || !isempty_RL(s) || s->state_out_pos < s->numZ)\n                return BZ_FINISH_OK;\n            s->mode = BZ_M_IDLE;\n            return BZ_STREAM_END;\n    }\n    return BZ_OK; /*--not reached--*/\n}\n\n/*---------------------------------------------------*/\nint BZ_API(BZ2_bzCompressEnd)(bz_stream* strm) {\n    EState* s;\n    if (strm == nullptr)\n        return BZ_PARAM_ERROR;\n    s = (EState*)strm->state;\n    if (s == nullptr)\n        return BZ_PARAM_ERROR;\n    if (s->strm != strm)\n        return BZ_PARAM_ERROR;\n\n    if (s->arr1 != nullptr)\n        BZFREE(s->arr1);\n    if (s->arr2 != nullptr)\n        BZFREE(s->arr2);\n    if (s->ftab != nullptr)\n        BZFREE(s->ftab);\n    BZFREE(strm->state);\n\n    strm->state = nullptr;\n\n    return BZ_OK;\n}\n\n/*---------------------------------------------------*/\n/*--- Decompression stuff                         ---*/\n/*---------------------------------------------------*/\n\n/*---------------------------------------------------*/\nint BZ_API(BZ2_bzDecompressInit)(bz_stream* strm, int verbosity, int small) {\n    DState* s;\n\n    if (!bz_config_ok())\n        return BZ_CONFIG_ERROR;\n\n    if (strm == nullptr)\n        return BZ_PARAM_ERROR;\n    if (small != 0 && small != 1)\n        return BZ_PARAM_ERROR;\n    if (verbosity < 0 || verbosity > 4)\n        return BZ_PARAM_ERROR;\n\n    if (strm->bzalloc == nullptr)\n        strm->bzalloc = default_bzalloc;\n    if (strm->bzfree == nullptr)\n        strm->bzfree = default_bzfree;\n\n    s = (DState*)BZALLOC(sizeof(DState));\n    if (s == nullptr)\n        return BZ_MEM_ERROR;\n    s->strm = strm;\n    strm->state = s;\n    s->state = BZ_X_MAGIC_1;\n    s->bsLive = 0;\n    s->bsBuff = 0;\n    s->calculatedCombinedCRC = 0;\n    strm->total_in_lo32 = 0;\n    strm->total_in_hi32 = 0;\n    strm->total_out_lo32 = 0;\n    strm->total_out_hi32 = 0;\n    s->smallDecompress = (Bool)small;\n    s->ll4 = nullptr;\n    s->ll16 = nullptr;\n    s->tt = nullptr;\n    s->currBlockNo = 0;\n    s->verbosity = verbosity;\n\n    return BZ_OK;\n}\n\n/*---------------------------------------------------*/\n/* Return  True iff data corruption is discovered.\n   Returns False if there is no problem.\n*/\nstatic Bool unRLE_obuf_to_output_FAST(DState* s) {\n    UChar k1;\n\n    if (s->blockRandomised) {\n        while (True) {\n            /* try to finish existing run */\n            while (True) {\n                if (s->strm->avail_out == 0)\n                    return False;\n                if (s->state_out_len == 0)\n                    break;\n                *((UChar*)(s->strm->next_out)) = s->state_out_ch;\n                BZ_UPDATE_CRC(s->calculatedBlockCRC, s->state_out_ch);\n                s->state_out_len--;\n                s->strm->next_out++;\n                s->strm->avail_out--;\n                s->strm->total_out_lo32++;\n                if (s->strm->total_out_lo32 == 0)\n                    s->strm->total_out_hi32++;\n            }\n\n            /* can a new run be started? */\n            if (s->nblock_used == s->save_nblock + 1)\n                return False;\n\n            /* Only caused by corrupt data stream? */\n            if (s->nblock_used > s->save_nblock + 1)\n                return True;\n\n            s->state_out_len = 1;\n            s->state_out_ch = s->k0;\n            BZ_GET_FAST(k1);\n            BZ_RAND_UPD_MASK;\n            k1 ^= BZ_RAND_MASK;\n            s->nblock_used++;\n            if (s->nblock_used == s->save_nblock + 1)\n                continue;\n            if (k1 != s->k0) {\n                s->k0 = k1;\n                continue;\n            };\n\n            s->state_out_len = 2;\n            BZ_GET_FAST(k1);\n            BZ_RAND_UPD_MASK;\n            k1 ^= BZ_RAND_MASK;\n            s->nblock_used++;\n            if (s->nblock_used == s->save_nblock + 1)\n                continue;\n            if (k1 != s->k0) {\n                s->k0 = k1;\n                continue;\n            };\n\n            s->state_out_len = 3;\n            BZ_GET_FAST(k1);\n            BZ_RAND_UPD_MASK;\n            k1 ^= BZ_RAND_MASK;\n            s->nblock_used++;\n            if (s->nblock_used == s->save_nblock + 1)\n                continue;\n            if (k1 != s->k0) {\n                s->k0 = k1;\n                continue;\n            };\n\n            BZ_GET_FAST(k1);\n            BZ_RAND_UPD_MASK;\n            k1 ^= BZ_RAND_MASK;\n            s->nblock_used++;\n            s->state_out_len = ((Int32)k1) + 4;\n            BZ_GET_FAST(s->k0);\n            BZ_RAND_UPD_MASK;\n            s->k0 ^= BZ_RAND_MASK;\n            s->nblock_used++;\n        }\n    }\n    else {\n        /* restore */\n        UInt32 c_calculatedBlockCRC = s->calculatedBlockCRC;\n        UChar c_state_out_ch = s->state_out_ch;\n        Int32 c_state_out_len = s->state_out_len;\n        Int32 c_nblock_used = s->nblock_used;\n        Int32 c_k0 = s->k0;\n        UInt32* c_tt = s->tt;\n        UInt32 c_tPos = s->tPos;\n        char* cs_next_out = s->strm->next_out;\n        unsigned int cs_avail_out = s->strm->avail_out;\n        Int32 ro_blockSize100k = s->blockSize100k;\n        /* end restore */\n\n        UInt32 avail_out_INIT = cs_avail_out;\n        Int32 s_save_nblockPP = s->save_nblock + 1;\n        unsigned int total_out_lo32_old;\n\n        while (True) {\n            /* try to finish existing run */\n            if (c_state_out_len > 0) {\n                while (True) {\n                    if (cs_avail_out == 0)\n                        goto return_notr;\n                    if (c_state_out_len == 1)\n                        break;\n                    *((UChar*)(cs_next_out)) = c_state_out_ch;\n                    BZ_UPDATE_CRC(c_calculatedBlockCRC, c_state_out_ch);\n                    c_state_out_len--;\n                    cs_next_out++;\n                    cs_avail_out--;\n                }\n            s_state_out_len_eq_one : {\n                if (cs_avail_out == 0) {\n                    c_state_out_len = 1;\n                    goto return_notr;\n                };\n                *((UChar*)(cs_next_out)) = c_state_out_ch;\n                BZ_UPDATE_CRC(c_calculatedBlockCRC, c_state_out_ch);\n                cs_next_out++;\n                cs_avail_out--;\n            }\n            }\n            /* Only caused by corrupt data stream? */\n            if (c_nblock_used > s_save_nblockPP)\n                return True;\n\n            /* can a new run be started? */\n            if (c_nblock_used == s_save_nblockPP) {\n                c_state_out_len = 0;\n                goto return_notr;\n            };\n            c_state_out_ch = c_k0;\n            BZ_GET_FAST_C(k1);\n            c_nblock_used++;\n            if (k1 != c_k0) {\n                c_k0 = k1;\n                goto s_state_out_len_eq_one;\n            };\n            if (c_nblock_used == s_save_nblockPP)\n                goto s_state_out_len_eq_one;\n\n            c_state_out_len = 2;\n            BZ_GET_FAST_C(k1);\n            c_nblock_used++;\n            if (c_nblock_used == s_save_nblockPP)\n                continue;\n            if (k1 != c_k0) {\n                c_k0 = k1;\n                continue;\n            };\n\n            c_state_out_len = 3;\n            BZ_GET_FAST_C(k1);\n            c_nblock_used++;\n            if (c_nblock_used == s_save_nblockPP)\n                continue;\n            if (k1 != c_k0) {\n                c_k0 = k1;\n                continue;\n            };\n\n            BZ_GET_FAST_C(k1);\n            c_nblock_used++;\n            c_state_out_len = ((Int32)k1) + 4;\n            BZ_GET_FAST_C(c_k0);\n            c_nblock_used++;\n        }\n\n    return_notr:\n        total_out_lo32_old = s->strm->total_out_lo32;\n        s->strm->total_out_lo32 += (avail_out_INIT - cs_avail_out);\n        if (s->strm->total_out_lo32 < total_out_lo32_old)\n            s->strm->total_out_hi32++;\n\n        /* save */\n        s->calculatedBlockCRC = c_calculatedBlockCRC;\n        s->state_out_ch = c_state_out_ch;\n        s->state_out_len = c_state_out_len;\n        s->nblock_used = c_nblock_used;\n        s->k0 = c_k0;\n        s->tt = c_tt;\n        s->tPos = c_tPos;\n        s->strm->next_out = cs_next_out;\n        s->strm->avail_out = cs_avail_out;\n        /* end save */\n    }\n    return False;\n}\n\n/*---------------------------------------------------*/\nInt32 BZ2_indexIntoF(Int32 indx, Int32* cftab) {\n    Int32 nb, na, mid;\n    nb = 0;\n    na = 256;\n    do {\n        mid = (nb + na) >> 1;\n        if (indx >= cftab[mid])\n            nb = mid;\n        else\n            na = mid;\n    } while (na - nb != 1);\n    return nb;\n}\n\n/*---------------------------------------------------*/\n/* Return  True iff data corruption is discovered.\n   Returns False if there is no problem.\n*/\nstatic Bool unRLE_obuf_to_output_SMALL(DState* s) {\n    UChar k1;\n\n    if (s->blockRandomised) {\n        while (True) {\n            /* try to finish existing run */\n            while (True) {\n                if (s->strm->avail_out == 0)\n                    return False;\n                if (s->state_out_len == 0)\n                    break;\n                *((UChar*)(s->strm->next_out)) = s->state_out_ch;\n                BZ_UPDATE_CRC(s->calculatedBlockCRC, s->state_out_ch);\n                s->state_out_len--;\n                s->strm->next_out++;\n                s->strm->avail_out--;\n                s->strm->total_out_lo32++;\n                if (s->strm->total_out_lo32 == 0)\n                    s->strm->total_out_hi32++;\n            }\n\n            /* can a new run be started? */\n            if (s->nblock_used == s->save_nblock + 1)\n                return False;\n\n            /* Only caused by corrupt data stream? */\n            if (s->nblock_used > s->save_nblock + 1)\n                return True;\n\n            s->state_out_len = 1;\n            s->state_out_ch = s->k0;\n            BZ_GET_SMALL(k1);\n            BZ_RAND_UPD_MASK;\n            k1 ^= BZ_RAND_MASK;\n            s->nblock_used++;\n            if (s->nblock_used == s->save_nblock + 1)\n                continue;\n            if (k1 != s->k0) {\n                s->k0 = k1;\n                continue;\n            };\n\n            s->state_out_len = 2;\n            BZ_GET_SMALL(k1);\n            BZ_RAND_UPD_MASK;\n            k1 ^= BZ_RAND_MASK;\n            s->nblock_used++;\n            if (s->nblock_used == s->save_nblock + 1)\n                continue;\n            if (k1 != s->k0) {\n                s->k0 = k1;\n                continue;\n            };\n\n            s->state_out_len = 3;\n            BZ_GET_SMALL(k1);\n            BZ_RAND_UPD_MASK;\n            k1 ^= BZ_RAND_MASK;\n            s->nblock_used++;\n            if (s->nblock_used == s->save_nblock + 1)\n                continue;\n            if (k1 != s->k0) {\n                s->k0 = k1;\n                continue;\n            };\n\n            BZ_GET_SMALL(k1);\n            BZ_RAND_UPD_MASK;\n            k1 ^= BZ_RAND_MASK;\n            s->nblock_used++;\n            s->state_out_len = ((Int32)k1) + 4;\n            BZ_GET_SMALL(s->k0);\n            BZ_RAND_UPD_MASK;\n            s->k0 ^= BZ_RAND_MASK;\n            s->nblock_used++;\n        }\n    }\n    else {\n        while (True) {\n            /* try to finish existing run */\n            while (True) {\n                if (s->strm->avail_out == 0)\n                    return False;\n                if (s->state_out_len == 0)\n                    break;\n                *((UChar*)(s->strm->next_out)) = s->state_out_ch;\n                BZ_UPDATE_CRC(s->calculatedBlockCRC, s->state_out_ch);\n                s->state_out_len--;\n                s->strm->next_out++;\n                s->strm->avail_out--;\n                s->strm->total_out_lo32++;\n                if (s->strm->total_out_lo32 == 0)\n                    s->strm->total_out_hi32++;\n            }\n\n            /* can a new run be started? */\n            if (s->nblock_used == s->save_nblock + 1)\n                return False;\n\n            /* Only caused by corrupt data stream? */\n            if (s->nblock_used > s->save_nblock + 1)\n                return True;\n\n            s->state_out_len = 1;\n            s->state_out_ch = s->k0;\n            BZ_GET_SMALL(k1);\n            s->nblock_used++;\n            if (s->nblock_used == s->save_nblock + 1)\n                continue;\n            if (k1 != s->k0) {\n                s->k0 = k1;\n                continue;\n            };\n\n            s->state_out_len = 2;\n            BZ_GET_SMALL(k1);\n            s->nblock_used++;\n            if (s->nblock_used == s->save_nblock + 1)\n                continue;\n            if (k1 != s->k0) {\n                s->k0 = k1;\n                continue;\n            };\n\n            s->state_out_len = 3;\n            BZ_GET_SMALL(k1);\n            s->nblock_used++;\n            if (s->nblock_used == s->save_nblock + 1)\n                continue;\n            if (k1 != s->k0) {\n                s->k0 = k1;\n                continue;\n            };\n\n            BZ_GET_SMALL(k1);\n            s->nblock_used++;\n            s->state_out_len = ((Int32)k1) + 4;\n            BZ_GET_SMALL(s->k0);\n            s->nblock_used++;\n        }\n    }\n}\n\n/*---------------------------------------------------*/\nint BZ_API(BZ2_bzDecompress)(bz_stream* strm) {\n    Bool corrupt;\n    DState* s;\n    if (strm == nullptr)\n        return BZ_PARAM_ERROR;\n    s = (DState*)strm->state;\n    if (s == nullptr)\n        return BZ_PARAM_ERROR;\n    if (s->strm != strm)\n        return BZ_PARAM_ERROR;\n\n    while (True) {\n        if (s->state == BZ_X_IDLE)\n            return BZ_SEQUENCE_ERROR;\n        if (s->state == BZ_X_OUTPUT) {\n            if (s->smallDecompress)\n                corrupt = unRLE_obuf_to_output_SMALL(s);\n            else\n                corrupt = unRLE_obuf_to_output_FAST(s);\n            if (corrupt)\n                return BZ_DATA_ERROR;\n            if (s->nblock_used == s->save_nblock + 1 && s->state_out_len == 0) {\n                BZ_FINALISE_CRC(s->calculatedBlockCRC);\n                if (s->verbosity >= 3)\n                    VPrintf2(\" {0x%08x, 0x%08x}\", s->storedBlockCRC, s->calculatedBlockCRC);\n                if (s->verbosity >= 2)\n                    VPrintf0(\"]\");\n                if (s->calculatedBlockCRC != s->storedBlockCRC)\n                    return BZ_DATA_ERROR;\n                s->calculatedCombinedCRC =\n                    (s->calculatedCombinedCRC << 1) | (s->calculatedCombinedCRC >> 31);\n                s->calculatedCombinedCRC ^= s->calculatedBlockCRC;\n                s->state = BZ_X_BLKHDR_1;\n            }\n            else {\n                return BZ_OK;\n            }\n        }\n        if (s->state >= BZ_X_MAGIC_1) {\n            Int32 r = BZ2_decompress(s);\n            if (r == BZ_STREAM_END) {\n                if (s->verbosity >= 3)\n                    VPrintf2(\"\\n    combined CRCs: stored = 0x%08x, computed = 0x%08x\",\n                             s->storedCombinedCRC,\n                             s->calculatedCombinedCRC);\n                if (s->calculatedCombinedCRC != s->storedCombinedCRC)\n                    return BZ_DATA_ERROR;\n                return r;\n            }\n            if (s->state != BZ_X_OUTPUT)\n                return r;\n        }\n    }\n\n    AssertH(0, 6001);\n\n    return 0; /*NOTREACHED*/\n}\n\n/*---------------------------------------------------*/\nint BZ_API(BZ2_bzDecompressEnd)(bz_stream* strm) {\n    DState* s;\n    if (strm == nullptr)\n        return BZ_PARAM_ERROR;\n    s = (DState*)strm->state;\n    if (s == nullptr)\n        return BZ_PARAM_ERROR;\n    if (s->strm != strm)\n        return BZ_PARAM_ERROR;\n\n    if (s->tt != nullptr)\n        BZFREE(s->tt);\n    if (s->ll16 != nullptr)\n        BZFREE(s->ll16);\n    if (s->ll4 != nullptr)\n        BZFREE(s->ll4);\n\n    BZFREE(strm->state);\n    strm->state = nullptr;\n\n    return BZ_OK;\n}\n\n#ifndef BZ_NO_STDIO\n/*---------------------------------------------------*/\n/*--- File I/O stuff                              ---*/\n/*---------------------------------------------------*/\n\n#define BZ_SETERR(eee)          \\\n    {                           \\\n        if (bzerror != nullptr) \\\n            *bzerror = eee;     \\\n        if (bzf != nullptr)     \\\n            bzf->lastErr = eee; \\\n    }\n\ntypedef struct {\n    FILE* handle;\n    Char buf[BZ_MAX_UNUSED];\n    Int32 bufN;\n    Bool writing;\n    bz_stream strm;\n    Int32 lastErr;\n    Bool initialisedOk;\n} bzFile;\n\n/*---------------------------------------------*/\nstatic Bool myfeof(FILE* f) {\n    Int32 c = fgetc(f);\n    if (c == EOF)\n        return True;\n    ungetc(c, f);\n    return False;\n}\n\n/*---------------------------------------------------*/\nBZFILE* BZ_API(\n    BZ2_bzWriteOpen)(int* bzerror, FILE* f, int blockSize100k, int verbosity, int workFactor) {\n    Int32 ret;\n    bzFile* bzf = nullptr;\n\n    BZ_SETERR(BZ_OK);\n\n    if (f == nullptr || (blockSize100k < 1 || blockSize100k > 9) ||\n        (workFactor < 0 || workFactor > 250) || (verbosity < 0 || verbosity > 4)) {\n        BZ_SETERR(BZ_PARAM_ERROR);\n        return nullptr;\n    };\n\n    if (ferror(f)) {\n        BZ_SETERR(BZ_IO_ERROR);\n        return nullptr;\n    };\n\n    bzf = (bzFile*)malloc(sizeof(bzFile));\n    if (bzf == nullptr) {\n        BZ_SETERR(BZ_MEM_ERROR);\n        return nullptr;\n    };\n\n    BZ_SETERR(BZ_OK);\n    bzf->initialisedOk = False;\n    bzf->bufN = 0;\n    bzf->handle = f;\n    bzf->writing = True;\n    bzf->strm.bzalloc = nullptr;\n    bzf->strm.bzfree = nullptr;\n    bzf->strm.opaque = nullptr;\n\n    if (workFactor == 0)\n        workFactor = 30;\n    ret = BZ2_bzCompressInit(&(bzf->strm), blockSize100k, verbosity, workFactor);\n    if (ret != BZ_OK) {\n        BZ_SETERR(ret);\n        free(bzf);\n        return nullptr;\n    };\n\n    bzf->strm.avail_in = 0;\n    bzf->initialisedOk = True;\n    return bzf;\n}\n\n/*---------------------------------------------------*/\nvoid BZ_API(BZ2_bzWrite)(int* bzerror, BZFILE* b, void* buf, int len) {\n    Int32 n, n2, ret;\n    bzFile* bzf = (bzFile*)b;\n\n    BZ_SETERR(BZ_OK);\n    if (bzf == nullptr || buf == nullptr || len < 0) {\n        BZ_SETERR(BZ_PARAM_ERROR);\n        return;\n    };\n    if (!(bzf->writing)) {\n        BZ_SETERR(BZ_SEQUENCE_ERROR);\n        return;\n    };\n    if (ferror(bzf->handle)) {\n        BZ_SETERR(BZ_IO_ERROR);\n        return;\n    };\n\n    if (len == 0) {\n        BZ_SETERR(BZ_OK);\n        return;\n    };\n\n    bzf->strm.avail_in = len;\n    bzf->strm.next_in = (char*)buf;\n\n    while (True) {\n        bzf->strm.avail_out = BZ_MAX_UNUSED;\n        bzf->strm.next_out = bzf->buf;\n        ret = BZ2_bzCompress(&(bzf->strm), BZ_RUN);\n        if (ret != BZ_RUN_OK) {\n            BZ_SETERR(ret);\n            return;\n        };\n\n        if (bzf->strm.avail_out < BZ_MAX_UNUSED) {\n            n = BZ_MAX_UNUSED - bzf->strm.avail_out;\n            n2 = fwrite((void*)(bzf->buf), sizeof(UChar), n, bzf->handle);\n            if (n != n2 || ferror(bzf->handle)) {\n                BZ_SETERR(BZ_IO_ERROR);\n                return;\n            };\n        }\n\n        if (bzf->strm.avail_in == 0) {\n            BZ_SETERR(BZ_OK);\n            return;\n        };\n    }\n}\n\n/*---------------------------------------------------*/\nvoid BZ_API(BZ2_bzWriteClose)(int* bzerror,\n                              BZFILE* b,\n                              int abandon,\n                              unsigned int* nbytes_in,\n                              unsigned int* nbytes_out) {\n    BZ2_bzWriteClose64(bzerror, b, abandon, nbytes_in, nullptr, nbytes_out, nullptr);\n}\n\nvoid BZ_API(BZ2_bzWriteClose64)(int* bzerror,\n                                BZFILE* b,\n                                int abandon,\n                                unsigned int* nbytes_in_lo32,\n                                unsigned int* nbytes_in_hi32,\n                                unsigned int* nbytes_out_lo32,\n                                unsigned int* nbytes_out_hi32) {\n    Int32 n, n2, ret;\n    bzFile* bzf = (bzFile*)b;\n\n    if (bzf == nullptr) {\n        BZ_SETERR(BZ_OK);\n        return;\n    };\n    if (!(bzf->writing)) {\n        BZ_SETERR(BZ_SEQUENCE_ERROR);\n        return;\n    };\n    if (ferror(bzf->handle)) {\n        BZ_SETERR(BZ_IO_ERROR);\n        return;\n    };\n\n    if (nbytes_in_lo32 != nullptr)\n        *nbytes_in_lo32 = 0;\n    if (nbytes_in_hi32 != nullptr)\n        *nbytes_in_hi32 = 0;\n    if (nbytes_out_lo32 != nullptr)\n        *nbytes_out_lo32 = 0;\n    if (nbytes_out_hi32 != nullptr)\n        *nbytes_out_hi32 = 0;\n\n    if ((!abandon) && bzf->lastErr == BZ_OK) {\n        while (True) {\n            bzf->strm.avail_out = BZ_MAX_UNUSED;\n            bzf->strm.next_out = bzf->buf;\n            ret = BZ2_bzCompress(&(bzf->strm), BZ_FINISH);\n            if (ret != BZ_FINISH_OK && ret != BZ_STREAM_END) {\n                BZ_SETERR(ret);\n                return;\n            };\n\n            if (bzf->strm.avail_out < BZ_MAX_UNUSED) {\n                n = BZ_MAX_UNUSED - bzf->strm.avail_out;\n                n2 = fwrite((void*)(bzf->buf), sizeof(UChar), n, bzf->handle);\n                if (n != n2 || ferror(bzf->handle)) {\n                    BZ_SETERR(BZ_IO_ERROR);\n                    return;\n                };\n            }\n\n            if (ret == BZ_STREAM_END)\n                break;\n        }\n    }\n\n    if (!abandon && !ferror(bzf->handle)) {\n        fflush(bzf->handle);\n        if (ferror(bzf->handle)) {\n            BZ_SETERR(BZ_IO_ERROR);\n            return;\n        };\n    }\n\n    if (nbytes_in_lo32 != nullptr)\n        *nbytes_in_lo32 = bzf->strm.total_in_lo32;\n    if (nbytes_in_hi32 != nullptr)\n        *nbytes_in_hi32 = bzf->strm.total_in_hi32;\n    if (nbytes_out_lo32 != nullptr)\n        *nbytes_out_lo32 = bzf->strm.total_out_lo32;\n    if (nbytes_out_hi32 != nullptr)\n        *nbytes_out_hi32 = bzf->strm.total_out_hi32;\n\n    BZ_SETERR(BZ_OK);\n    BZ2_bzCompressEnd(&(bzf->strm));\n    free(bzf);\n}\n\n/*---------------------------------------------------*/\nBZFILE* BZ_API(\n    BZ2_bzReadOpen)(int* bzerror, FILE* f, int verbosity, int small, void* unused, int nUnused) {\n    bzFile* bzf = nullptr;\n    int ret;\n\n    BZ_SETERR(BZ_OK);\n\n    if (f == nullptr || (small != 0 && small != 1) || (verbosity < 0 || verbosity > 4) ||\n        (unused == nullptr && nUnused != 0) ||\n        (unused != nullptr && (nUnused < 0 || nUnused > BZ_MAX_UNUSED))) {\n        BZ_SETERR(BZ_PARAM_ERROR);\n        return nullptr;\n    };\n\n    if (ferror(f)) {\n        BZ_SETERR(BZ_IO_ERROR);\n        return nullptr;\n    };\n\n    bzf = (bzFile*)malloc(sizeof(bzFile));\n    if (bzf == nullptr) {\n        BZ_SETERR(BZ_MEM_ERROR);\n        return nullptr;\n    };\n\n    BZ_SETERR(BZ_OK);\n\n    bzf->initialisedOk = False;\n    bzf->handle = f;\n    bzf->bufN = 0;\n    bzf->writing = False;\n    bzf->strm.bzalloc = nullptr;\n    bzf->strm.bzfree = nullptr;\n    bzf->strm.opaque = nullptr;\n\n    while (nUnused > 0) {\n        bzf->buf[bzf->bufN] = *((UChar*)(unused));\n        bzf->bufN++;\n        unused = ((void*)(1 + ((UChar*)(unused))));\n        nUnused--;\n    }\n\n    ret = BZ2_bzDecompressInit(&(bzf->strm), verbosity, small);\n    if (ret != BZ_OK) {\n        BZ_SETERR(ret);\n        free(bzf);\n        return nullptr;\n    };\n\n    bzf->strm.avail_in = bzf->bufN;\n    bzf->strm.next_in = bzf->buf;\n\n    bzf->initialisedOk = True;\n    return bzf;\n}\n\n/*---------------------------------------------------*/\nvoid BZ_API(BZ2_bzReadClose)(int* bzerror, BZFILE* b) {\n    bzFile* bzf = (bzFile*)b;\n\n    BZ_SETERR(BZ_OK);\n    if (bzf == nullptr) {\n        BZ_SETERR(BZ_OK);\n        return;\n    };\n\n    if (bzf->writing) {\n        BZ_SETERR(BZ_SEQUENCE_ERROR);\n        return;\n    };\n\n    if (bzf->initialisedOk)\n        (void)BZ2_bzDecompressEnd(&(bzf->strm));\n    free(bzf);\n}\n\n/*---------------------------------------------------*/\nint BZ_API(BZ2_bzRead)(int* bzerror, BZFILE* b, void* buf, int len) {\n    Int32 n, ret;\n    bzFile* bzf = (bzFile*)b;\n\n    BZ_SETERR(BZ_OK);\n\n    if (bzf == nullptr || buf == nullptr || len < 0) {\n        BZ_SETERR(BZ_PARAM_ERROR);\n        return 0;\n    };\n\n    if (bzf->writing) {\n        BZ_SETERR(BZ_SEQUENCE_ERROR);\n        return 0;\n    };\n\n    if (len == 0) {\n        BZ_SETERR(BZ_OK);\n        return 0;\n    };\n\n    bzf->strm.avail_out = len;\n    bzf->strm.next_out = (char*)buf;\n\n    while (True) {\n        if (ferror(bzf->handle)) {\n            BZ_SETERR(BZ_IO_ERROR);\n            return 0;\n        };\n\n        if (bzf->strm.avail_in == 0 && !myfeof(bzf->handle)) {\n            n = fread(bzf->buf, sizeof(UChar), BZ_MAX_UNUSED, bzf->handle);\n            if (ferror(bzf->handle)) {\n                BZ_SETERR(BZ_IO_ERROR);\n                return 0;\n            };\n            bzf->bufN = n;\n            bzf->strm.avail_in = bzf->bufN;\n            bzf->strm.next_in = bzf->buf;\n        }\n\n        ret = BZ2_bzDecompress(&(bzf->strm));\n\n        if (ret != BZ_OK && ret != BZ_STREAM_END) {\n            BZ_SETERR(ret);\n            return 0;\n        };\n\n        if (ret == BZ_OK && myfeof(bzf->handle) && bzf->strm.avail_in == 0 &&\n            bzf->strm.avail_out > 0) {\n            BZ_SETERR(BZ_UNEXPECTED_EOF);\n            return 0;\n        };\n\n        if (ret == BZ_STREAM_END) {\n            BZ_SETERR(BZ_STREAM_END);\n            return len - bzf->strm.avail_out;\n        };\n        if (bzf->strm.avail_out == 0) {\n            BZ_SETERR(BZ_OK);\n            return len;\n        };\n    }\n\n    return 0; /*not reached*/\n}\n\n/*---------------------------------------------------*/\nvoid BZ_API(BZ2_bzReadGetUnused)(int* bzerror, BZFILE* b, void** unused, int* nUnused) {\n    bzFile* bzf = (bzFile*)b;\n    if (bzf == nullptr) {\n        BZ_SETERR(BZ_PARAM_ERROR);\n        return;\n    };\n    if (bzf->lastErr != BZ_STREAM_END) {\n        BZ_SETERR(BZ_SEQUENCE_ERROR);\n        return;\n    };\n    if (unused == nullptr || nUnused == nullptr) {\n        BZ_SETERR(BZ_PARAM_ERROR);\n        return;\n    };\n\n    BZ_SETERR(BZ_OK);\n    *nUnused = bzf->strm.avail_in;\n    *unused = bzf->strm.next_in;\n}\n#endif\n\n/*---------------------------------------------------*/\n/*--- Misc convenience stuff                      ---*/\n/*---------------------------------------------------*/\n\n/*---------------------------------------------------*/\nint BZ_API(BZ2_bzBuffToBuffCompress)(char* dest,\n                                     unsigned int* destLen,\n                                     char* source,\n                                     unsigned int sourceLen,\n                                     int blockSize100k,\n                                     int verbosity,\n                                     int workFactor) {\n    bz_stream strm;\n    int ret;\n\n    if (dest == nullptr || destLen == nullptr || source == nullptr || blockSize100k < 1 ||\n        blockSize100k > 9 || verbosity < 0 || verbosity > 4 || workFactor < 0 || workFactor > 250)\n        return BZ_PARAM_ERROR;\n\n    if (workFactor == 0)\n        workFactor = 30;\n    strm.bzalloc = nullptr;\n    strm.bzfree = nullptr;\n    strm.opaque = nullptr;\n    ret = BZ2_bzCompressInit(&strm, blockSize100k, verbosity, workFactor);\n    if (ret != BZ_OK)\n        return ret;\n\n    strm.next_in = source;\n    strm.next_out = dest;\n    strm.avail_in = sourceLen;\n    strm.avail_out = *destLen;\n\n    ret = BZ2_bzCompress(&strm, BZ_FINISH);\n    if (ret == BZ_FINISH_OK)\n        goto output_overflow;\n    if (ret != BZ_STREAM_END)\n        goto errhandler;\n\n    /* normal termination */\n    *destLen -= strm.avail_out;\n    BZ2_bzCompressEnd(&strm);\n    return BZ_OK;\n\noutput_overflow:\n    BZ2_bzCompressEnd(&strm);\n    return BZ_OUTBUFF_FULL;\n\nerrhandler:\n    BZ2_bzCompressEnd(&strm);\n    return ret;\n}\n\n/*---------------------------------------------------*/\nint BZ_API(BZ2_bzBuffToBuffDecompress)(char* dest,\n                                       unsigned int* destLen,\n                                       char* source,\n                                       unsigned int sourceLen,\n                                       int small,\n                                       int verbosity) {\n    bz_stream strm;\n    int ret;\n\n    if (dest == nullptr || destLen == nullptr || source == nullptr || (small != 0 && small != 1) ||\n        verbosity < 0 || verbosity > 4)\n        return BZ_PARAM_ERROR;\n\n    strm.bzalloc = nullptr;\n    strm.bzfree = nullptr;\n    strm.opaque = nullptr;\n    ret = BZ2_bzDecompressInit(&strm, verbosity, small);\n    if (ret != BZ_OK)\n        return ret;\n\n    strm.next_in = source;\n    strm.next_out = dest;\n    strm.avail_in = sourceLen;\n    strm.avail_out = *destLen;\n\n    ret = BZ2_bzDecompress(&strm);\n    if (ret == BZ_OK)\n        goto output_overflow_or_eof;\n    if (ret != BZ_STREAM_END)\n        goto errhandler;\n\n    /* normal termination */\n    *destLen -= strm.avail_out;\n    BZ2_bzDecompressEnd(&strm);\n    return BZ_OK;\n\noutput_overflow_or_eof:\n    if (strm.avail_out > 0) {\n        BZ2_bzDecompressEnd(&strm);\n        return BZ_UNEXPECTED_EOF;\n    }\n    else {\n        BZ2_bzDecompressEnd(&strm);\n        return BZ_OUTBUFF_FULL;\n    };\n\nerrhandler:\n    BZ2_bzDecompressEnd(&strm);\n    return ret;\n}\n\n/*---------------------------------------------------*/\n/*--\n   Code contributed by Yoshioka Tsuneo (tsuneo@rr.iij4u.or.jp)\n   to support better zlib compatibility.\n   This code is not _officially_ part of libbzip2 (yet);\n   I haven't tested it, documented it, or considered the\n   threading-safeness of it.\n   If this code breaks, please contact both Yoshioka and me.\n--*/\n/*---------------------------------------------------*/\n\n/*---------------------------------------------------*/\n/*--\n   return version like \"0.9.5d, 4-Sept-1999\".\n--*/\nconst char* BZ_API(BZ2_bzlibVersion)(void) {\n    return BZ_VERSION;\n}\n\n#ifndef BZ_NO_STDIO\n/*---------------------------------------------------*/\n\n#if defined(_WIN32) || defined(OS2) || defined(MSDOS)\n#include <fcntl.h>\n#include <io.h>\n#define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)\n#else\n#define SET_BINARY_MODE(file)\n#endif\nstatic BZFILE* bzopen_or_bzdopen(const char* path, /* no use when bzdopen */\n                                 int fd, /* no use when bzdopen */\n                                 const char* mode,\n                                 int open_mode) /* bzopen: 0, bzdopen:1 */\n{\n    int bzerr;\n    char unused[BZ_MAX_UNUSED];\n    int blockSize100k = 9;\n    int writing = 0;\n    char mode2[10] = \"\";\n    FILE* fp = nullptr;\n    BZFILE* bzfp = nullptr;\n    int verbosity = 0;\n    int workFactor = 30;\n    int smallMode = 0;\n    int nUnused = 0;\n\n    if (mode == nullptr)\n        return nullptr;\n    while (*mode) {\n        switch (*mode) {\n            case 'r': writing = 0; break;\n            case 'w': writing = 1; break;\n            case 's': smallMode = 1; break;\n            default:\n                if (isdigit((int)(*mode))) {\n                    blockSize100k = *mode - BZ_HDR_0;\n                }\n        }\n        mode++;\n    }\n    strcat(mode2, writing ? \"w\" : \"r\");\n    strcat(mode2, \"b\"); /* binary mode */\n\n    if (open_mode == 0) {\n        if (path == nullptr || strcmp(path, \"\") == 0) {\n            fp = (writing ? stdout : stdin);\n            SET_BINARY_MODE(fp);\n        }\n        else {\n            fp = fopen(path, mode2);\n        }\n    }\n    else {\n#ifdef BZ_STRICT_ANSI\n        fp = nullptr;\n#else\n        fp = fdopen(fd, mode2);\n#endif\n    }\n    if (fp == nullptr)\n        return nullptr;\n\n    if (writing) {\n        /* Guard against total chaos and anarchy -- JRS */\n        if (blockSize100k < 1)\n            blockSize100k = 1;\n        if (blockSize100k > 9)\n            blockSize100k = 9;\n        bzfp = BZ2_bzWriteOpen(&bzerr, fp, blockSize100k, verbosity, workFactor);\n    }\n    else {\n        bzfp = BZ2_bzReadOpen(&bzerr, fp, verbosity, smallMode, unused, nUnused);\n    }\n    if (bzfp == nullptr) {\n        if (fp != stdin && fp != stdout)\n            fclose(fp);\n        return nullptr;\n    }\n    return bzfp;\n}\n\n/*---------------------------------------------------*/\n/*--\n   open file for read or write.\n      ex) bzopen(\"file\",\"w9\")\n      case path=\"\" or nullptr => use stdin or stdout.\n--*/\nBZFILE* BZ_API(BZ2_bzopen)(const char* path, const char* mode) {\n    return bzopen_or_bzdopen(path, -1, mode, /*bzopen*/ 0);\n}\n\n/*---------------------------------------------------*/\nBZFILE* BZ_API(BZ2_bzdopen)(int fd, const char* mode) {\n    return bzopen_or_bzdopen(nullptr, fd, mode, /*bzdopen*/ 1);\n}\n\n/*---------------------------------------------------*/\nint BZ_API(BZ2_bzread)(BZFILE* b, void* buf, int len) {\n    int bzerr, nread;\n    if (((bzFile*)b)->lastErr == BZ_STREAM_END)\n        return 0;\n    nread = BZ2_bzRead(&bzerr, b, buf, len);\n    if (bzerr == BZ_OK || bzerr == BZ_STREAM_END) {\n        return nread;\n    }\n    else {\n        return -1;\n    }\n}\n\n/*---------------------------------------------------*/\nint BZ_API(BZ2_bzwrite)(BZFILE* b, void* buf, int len) {\n    int bzerr;\n\n    BZ2_bzWrite(&bzerr, b, buf, len);\n    if (bzerr == BZ_OK) {\n        return len;\n    }\n    else {\n        return -1;\n    }\n}\n\n/*---------------------------------------------------*/\nint BZ_API(BZ2_bzflush)(BZFILE* b) {\n    /* do nothing now... */\n    return 0;\n}\n\n/*---------------------------------------------------*/\nvoid BZ_API(BZ2_bzclose)(BZFILE* b) {\n    int bzerr;\n    FILE* fp;\n\n    if (b == nullptr) {\n        return;\n    }\n    fp = ((bzFile*)b)->handle;\n    if (((bzFile*)b)->writing) {\n        BZ2_bzWriteClose(&bzerr, b, 0, nullptr, nullptr);\n        if (bzerr != BZ_OK) {\n            BZ2_bzWriteClose(nullptr, b, 1, nullptr, nullptr);\n        }\n    }\n    else {\n        BZ2_bzReadClose(&bzerr, b);\n    }\n    if (fp != stdin && fp != stdout) {\n        fclose(fp);\n    }\n}\n\n/*---------------------------------------------------*/\n/*--\n   return last error code \n--*/\nstatic const char* bzerrorstrings[] = {\n    \"OK\",\n    \"SEQUENCE_ERROR\",\n    \"PARAM_ERROR\",\n    \"MEM_ERROR\",\n    \"DATA_ERROR\",\n    \"DATA_ERROR_MAGIC\",\n    \"IO_ERROR\",\n    \"UNEXPECTED_EOF\",\n    \"OUTBUFF_FULL\",\n    \"CONFIG_ERROR\",\n    \"???\" /* for future */\n    ,\n    \"???\" /* for future */\n    ,\n    \"???\" /* for future */\n    ,\n    \"???\" /* for future */\n    ,\n    \"???\" /* for future */\n    ,\n    \"???\" /* for future */\n};\n\nconst char* BZ_API(BZ2_bzerror)(BZFILE* b, int* errnum) {\n    int err = ((bzFile*)b)->lastErr;\n\n    if (err > 0)\n        err = 0;\n    *errnum = err;\n    return bzerrorstrings[err * -1];\n}\n#endif\n\n/*-------------------------------------------------------------*/\n/*--- end                                           bzlib.c ---*/\n/*-------------------------------------------------------------*/\n"
  },
  {
    "path": "third-party/tbb/examples/graph/fgbzip2/bzlib.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*-------------------------------------------------------------*/\n/*--- Public header file for the library.                   ---*/\n/*---                                               bzlib.h ---*/\n/*-------------------------------------------------------------*/\n\n/* ------------------------------------------------------------------\n   The original source for this example:\n   This file is part of bzip2/libbzip2, a program and library for\n   lossless, block-sorting data compression.\n\n   bzip2/libbzip2 version 1.0.6 of 6 September 2010\n   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>\n\n   This program, \"bzip2\", the associated library \"libbzip2\", and all\n   documentation, are copyright (C) 1996-2010 Julian R Seward.  All\n   rights reserved.\n\n   Redistribution and use in source and binary forms, with or without\n   modification, are permitted provided that the following conditions\n   are met:\n\n   1. Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   2. The origin of this software must not be misrepresented; you must \n   not claim that you wrote the original software.  If you use this \n   software in a product, an acknowledgment in the product \n   documentation would be appreciated but is not required.\n\n   3. Altered source versions must be plainly marked as such, and must\n   not be misrepresented as being the original software.\n\n   4. The name of the author may not be used to endorse or promote \n   products derived from this software without specific prior written \n   permission.\n\n   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n   OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n   ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n   Julian Seward, jseward@bzip.org\n   bzip2/libbzip2 version 1.0.6 of 6 September 2010\n   ------------------------------------------------------------------ */\n\n#ifndef _BZLIB_H\n#define _BZLIB_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#define BZ_RUN    0\n#define BZ_FLUSH  1\n#define BZ_FINISH 2\n\n#define BZ_OK               0\n#define BZ_RUN_OK           1\n#define BZ_FLUSH_OK         2\n#define BZ_FINISH_OK        3\n#define BZ_STREAM_END       4\n#define BZ_SEQUENCE_ERROR   (-1)\n#define BZ_PARAM_ERROR      (-2)\n#define BZ_MEM_ERROR        (-3)\n#define BZ_DATA_ERROR       (-4)\n#define BZ_DATA_ERROR_MAGIC (-5)\n#define BZ_IO_ERROR         (-6)\n#define BZ_UNEXPECTED_EOF   (-7)\n#define BZ_OUTBUFF_FULL     (-8)\n#define BZ_CONFIG_ERROR     (-9)\n\ntypedef struct {\n    char* next_in;\n    unsigned int avail_in;\n    unsigned int total_in_lo32;\n    unsigned int total_in_hi32;\n\n    char* next_out;\n    unsigned int avail_out;\n    unsigned int total_out_lo32;\n    unsigned int total_out_hi32;\n\n    void* state;\n\n    void* (*bzalloc)(void*, int, int);\n    void (*bzfree)(void*, void*);\n    void* opaque;\n} bz_stream;\n\n#ifndef BZ_IMPORT\n#define BZ_EXPORT\n#endif\n\n#ifndef BZ_NO_STDIO\n/* Need a definitition for FILE */\n#include <stdio.h>\n#endif\n\n#ifdef _WIN32\n#include <windows.h>\n#ifdef small\n/* windows.h define small to char */\n#undef small\n#endif\n#ifdef BZ_EXPORT\n#define BZ_API(func) WINAPI func\n#define BZ_EXTERN    extern\n#else\n/* import windows dll dynamically */\n#define BZ_API(func) (WINAPI * func)\n#define BZ_EXTERN\n#endif\n#else\n#define BZ_API(func) func\n#define BZ_EXTERN    extern\n#endif\n\n/*-- Core (low-level) library functions --*/\n\nBZ_EXTERN int BZ_API(BZ2_bzCompressInit)(bz_stream* strm,\n                                         int blockSize100k,\n                                         int verbosity,\n                                         int workFactor);\n\nBZ_EXTERN int BZ_API(BZ2_bzCompress)(bz_stream* strm, int action);\n\nBZ_EXTERN int BZ_API(BZ2_bzCompressEnd)(bz_stream* strm);\n\nBZ_EXTERN int BZ_API(BZ2_bzDecompressInit)(bz_stream* strm, int verbosity, int small);\n\nBZ_EXTERN int BZ_API(BZ2_bzDecompress)(bz_stream* strm);\n\nBZ_EXTERN int BZ_API(BZ2_bzDecompressEnd)(bz_stream* strm);\n\n/*-- High(er) level library functions --*/\n\n#ifndef BZ_NO_STDIO\n#define BZ_MAX_UNUSED 5000\n\ntypedef void BZFILE;\n\nBZ_EXTERN BZFILE* BZ_API(\n    BZ2_bzReadOpen)(int* bzerror, FILE* f, int verbosity, int small, void* unused, int nUnused);\n\nBZ_EXTERN void BZ_API(BZ2_bzReadClose)(int* bzerror, BZFILE* b);\n\nBZ_EXTERN void BZ_API(BZ2_bzReadGetUnused)(int* bzerror, BZFILE* b, void** unused, int* nUnused);\n\nBZ_EXTERN int BZ_API(BZ2_bzRead)(int* bzerror, BZFILE* b, void* buf, int len);\n\nBZ_EXTERN BZFILE* BZ_API(\n    BZ2_bzWriteOpen)(int* bzerror, FILE* f, int blockSize100k, int verbosity, int workFactor);\n\nBZ_EXTERN void BZ_API(BZ2_bzWrite)(int* bzerror, BZFILE* b, void* buf, int len);\n\nBZ_EXTERN void BZ_API(BZ2_bzWriteClose)(int* bzerror,\n                                        BZFILE* b,\n                                        int abandon,\n                                        unsigned int* nbytes_in,\n                                        unsigned int* nbytes_out);\n\nBZ_EXTERN void BZ_API(BZ2_bzWriteClose64)(int* bzerror,\n                                          BZFILE* b,\n                                          int abandon,\n                                          unsigned int* nbytes_in_lo32,\n                                          unsigned int* nbytes_in_hi32,\n                                          unsigned int* nbytes_out_lo32,\n                                          unsigned int* nbytes_out_hi32);\n#endif\n\n/*-- Utility functions --*/\n\nBZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress)(char* dest,\n                                               unsigned int* destLen,\n                                               char* source,\n                                               unsigned int sourceLen,\n                                               int blockSize100k,\n                                               int verbosity,\n                                               int workFactor);\n\nBZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress)(char* dest,\n                                                 unsigned int* destLen,\n                                                 char* source,\n                                                 unsigned int sourceLen,\n                                                 int small,\n                                                 int verbosity);\n\n/*--\n   Code contributed by Yoshioka Tsuneo (tsuneo@rr.iij4u.or.jp)\n   to support better zlib compatibility.\n   This code is not _officially_ part of libbzip2 (yet);\n   I haven't tested it, documented it, or considered the\n   threading-safeness of it.\n   If this code breaks, please contact both Yoshioka and me.\n--*/\n\nBZ_EXTERN const char* BZ_API(BZ2_bzlibVersion)(void);\n\n#ifndef BZ_NO_STDIO\nBZ_EXTERN BZFILE* BZ_API(BZ2_bzopen)(const char* path, const char* mode);\n\nBZ_EXTERN BZFILE* BZ_API(BZ2_bzdopen)(int fd, const char* mode);\n\nBZ_EXTERN int BZ_API(BZ2_bzread)(BZFILE* b, void* buf, int len);\n\nBZ_EXTERN int BZ_API(BZ2_bzwrite)(BZFILE* b, void* buf, int len);\n\nBZ_EXTERN int BZ_API(BZ2_bzflush)(BZFILE* b);\n\nBZ_EXTERN void BZ_API(BZ2_bzclose)(BZFILE* b);\n\nBZ_EXTERN const char* BZ_API(BZ2_bzerror)(BZFILE* b, int* errnum);\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n\n/*-------------------------------------------------------------*/\n/*--- end                                           bzlib.h ---*/\n/*-------------------------------------------------------------*/\n"
  },
  {
    "path": "third-party/tbb/examples/graph/fgbzip2/bzlib_private.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*-------------------------------------------------------------*/\n/*--- Private header file for the library.                  ---*/\n/*---                                       bzlib_private.h ---*/\n/*-------------------------------------------------------------*/\n\n/* ------------------------------------------------------------------\n   The original source for this example:\n   This file is part of bzip2/libbzip2, a program and library for\n   lossless, block-sorting data compression.\n\n   bzip2/libbzip2 version 1.0.6 of 6 September 2010\n   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>\n\n   This program, \"bzip2\", the associated library \"libbzip2\", and all\n   documentation, are copyright (C) 1996-2010 Julian R Seward.  All\n   rights reserved.\n\n   Redistribution and use in source and binary forms, with or without\n   modification, are permitted provided that the following conditions\n   are met:\n\n   1. Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   2. The origin of this software must not be misrepresented; you must \n   not claim that you wrote the original software.  If you use this \n   software in a product, an acknowledgment in the product \n   documentation would be appreciated but is not required.\n\n   3. Altered source versions must be plainly marked as such, and must\n   not be misrepresented as being the original software.\n\n   4. The name of the author may not be used to endorse or promote \n   products derived from this software without specific prior written \n   permission.\n\n   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n   OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n   ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n   Julian Seward, jseward@bzip.org\n   bzip2/libbzip2 version 1.0.6 of 6 September 2010\n   ------------------------------------------------------------------ */\n\n#ifndef _BZLIB_PRIVATE_H\n#define _BZLIB_PRIVATE_H\n\n#include <cstdlib>\n\n#ifndef BZ_NO_STDIO\n#include <stdio.h>\n#include <ctype.h>\n#include <string.h>\n#endif\n\n#include \"bzlib.hpp\"\n\n/*-- General stuff. --*/\n\n#define BZ_VERSION \"1.0.6, 6-Sept-2010\"\n\ntypedef char Char;\ntypedef unsigned char Bool;\ntypedef unsigned char UChar;\ntypedef int Int32;\ntypedef unsigned int UInt32;\ntypedef short Int16;\ntypedef unsigned short UInt16;\n\n#define True  ((Bool)1)\n#define False ((Bool)0)\n\n#ifndef __GNUC__\n#define __inline__ /* */\n#endif\n\n#ifndef BZ_NO_STDIO\n\nextern void BZ2_bz__AssertH__fail(int errcode);\n#define AssertH(cond, errcode)              \\\n    {                                       \\\n        if (!(cond))                        \\\n            BZ2_bz__AssertH__fail(errcode); \\\n    }\n\n#if BZ_DEBUG\n#define AssertD(cond, msg)                                                             \\\n    {                                                                                  \\\n        if (!(cond)) {                                                                 \\\n            fprintf(stderr, \"\\n\\nlibbzip2(debug build): internal error\\n\\t%s\\n\", msg); \\\n            std::exit(-1);                                                             \\\n        }                                                                              \\\n    }\n#else\n#define AssertD(cond, msg) /* */\n#endif\n\n#define VPrintf0(zf)                          fprintf(stderr, zf)\n#define VPrintf1(zf, za1)                     fprintf(stderr, zf, za1)\n#define VPrintf2(zf, za1, za2)                fprintf(stderr, zf, za1, za2)\n#define VPrintf3(zf, za1, za2, za3)           fprintf(stderr, zf, za1, za2, za3)\n#define VPrintf4(zf, za1, za2, za3, za4)      fprintf(stderr, zf, za1, za2, za3, za4)\n#define VPrintf5(zf, za1, za2, za3, za4, za5) fprintf(stderr, zf, za1, za2, za3, za4, za5)\n\n#else\n\nextern void bz_internal_error(int errcode);\n#define AssertH(cond, errcode)          \\\n    {                                   \\\n        if (!(cond))                    \\\n            bz_internal_error(errcode); \\\n    }\n#define AssertD(cond, msg) \\\n    do {                   \\\n    } while (0)\n#define VPrintf0(zf) \\\n    do {             \\\n    } while (0)\n#define VPrintf1(zf, za1) \\\n    do {                  \\\n    } while (0)\n#define VPrintf2(zf, za1, za2) \\\n    do {                       \\\n    } while (0)\n#define VPrintf3(zf, za1, za2, za3) \\\n    do {                            \\\n    } while (0)\n#define VPrintf4(zf, za1, za2, za3, za4) \\\n    do {                                 \\\n    } while (0)\n#define VPrintf5(zf, za1, za2, za3, za4, za5) \\\n    do {                                      \\\n    } while (0)\n\n#endif\n\n#define BZALLOC(nnn) (strm->bzalloc)(strm->opaque, (nnn), 1)\n#define BZFREE(ppp)  (strm->bzfree)(strm->opaque, (ppp))\n\n/*-- Header bytes. --*/\n\n#define BZ_HDR_B 0x42 /* 'B' */\n#define BZ_HDR_Z 0x5a /* 'Z' */\n#define BZ_HDR_h 0x68 /* 'h' */\n#define BZ_HDR_0 0x30 /* '0' */\n\n/*-- Constants for the back end. --*/\n\n#define BZ_MAX_ALPHA_SIZE 258\n#define BZ_MAX_CODE_LEN   23\n\n#define BZ_RUNA 0\n#define BZ_RUNB 1\n\n#define BZ_N_GROUPS 6\n#define BZ_G_SIZE   50\n#define BZ_N_ITERS  4\n\n#define BZ_MAX_SELECTORS (2 + (900000 / BZ_G_SIZE))\n\n/*-- Stuff for randomising repetitive blocks. --*/\n\nextern Int32 BZ2_rNums[512];\n\n#define BZ_RAND_DECLS \\\n    Int32 rNToGo;     \\\n    Int32 rTPos\n\n#define BZ_RAND_INIT_MASK \\\n    s->rNToGo = 0;        \\\n    s->rTPos = 0\n\n#define BZ_RAND_MASK ((s->rNToGo == 1) ? 1 : 0)\n\n#define BZ_RAND_UPD_MASK                 \\\n    if (s->rNToGo == 0) {                \\\n        s->rNToGo = BZ2_rNums[s->rTPos]; \\\n        s->rTPos++;                      \\\n        if (s->rTPos == 512)             \\\n            s->rTPos = 0;                \\\n    }                                    \\\n    s->rNToGo--;\n\n/*-- Stuff for doing CRCs. --*/\n\nextern UInt32 BZ2_crc32Table[256];\n\n#define BZ_INITIALISE_CRC(crcVar) \\\n    { crcVar = 0xffffffffL; }\n\n#define BZ_FINALISE_CRC(crcVar) \\\n    { crcVar = ~(crcVar); }\n\n#define BZ_UPDATE_CRC(crcVar, cha) \\\n    { crcVar = (crcVar << 8) ^ BZ2_crc32Table[(crcVar >> 24) ^ ((UChar)cha)]; }\n\n/*-- States and modes for compression. --*/\n\n#define BZ_M_IDLE      1\n#define BZ_M_RUNNING   2\n#define BZ_M_FLUSHING  3\n#define BZ_M_FINISHING 4\n\n#define BZ_S_OUTPUT 1\n#define BZ_S_INPUT  2\n\n#define BZ_N_RADIX     2\n#define BZ_N_QSORT     12\n#define BZ_N_SHELL     18\n#define BZ_N_OVERSHOOT (BZ_N_RADIX + BZ_N_QSORT + BZ_N_SHELL + 2)\n\n/*-- Structure holding all the compression-side stuff. --*/\n\ntypedef struct {\n    /* pointer back to the struct bz_stream */\n    bz_stream* strm;\n\n    /* mode this stream is in, and whether inputting */\n    /* or outputting data */\n    Int32 mode;\n    Int32 state;\n\n    /* remembers avail_in when flush/finish requested */\n    UInt32 avail_in_expect;\n\n    /* for doing the block sorting */\n    UInt32* arr1;\n    UInt32* arr2;\n    UInt32* ftab;\n    Int32 origPtr;\n\n    /* aliases for arr1 and arr2 */\n    UInt32* ptr;\n    UChar* block;\n    UInt16* mtfv;\n    UChar* zbits;\n\n    /* for deciding when to use the fallback sorting algorithm */\n    Int32 workFactor;\n\n    /* run-length-encoding of the input */\n    UInt32 state_in_ch;\n    Int32 state_in_len;\n    BZ_RAND_DECLS;\n\n    /* input and output limits and current posns */\n    Int32 nblock;\n    Int32 nblockMAX;\n    Int32 numZ;\n    Int32 state_out_pos;\n\n    /* map of bytes used in block */\n    Int32 nInUse;\n    Bool inUse[256];\n    UChar unseqToSeq[256];\n\n    /* the buffer for bit stream creation */\n    UInt32 bsBuff;\n    Int32 bsLive;\n\n    /* block and combined CRCs */\n    UInt32 blockCRC;\n    UInt32 combinedCRC;\n\n    /* misc administratium */\n    Int32 verbosity;\n    Int32 blockNo;\n    Int32 blockSize100k;\n\n    /* stuff for coding the MTF values */\n    Int32 nMTF;\n    Int32 mtfFreq[BZ_MAX_ALPHA_SIZE];\n    UChar selector[BZ_MAX_SELECTORS];\n    UChar selectorMtf[BZ_MAX_SELECTORS];\n\n    UChar len[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];\n    Int32 code[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];\n    Int32 rfreq[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];\n    /* second dimension: only 3 needed; 4 makes index calculations faster */\n    UInt32 len_pack[BZ_MAX_ALPHA_SIZE][4];\n\n} EState;\n\n/*-- externs for compression. --*/\n\nextern void BZ2_blockSort(EState*);\n\nextern void BZ2_compressBlock(EState*, Bool);\n\nextern void BZ2_bsInitWrite(EState*);\n\nextern void BZ2_hbAssignCodes(Int32*, UChar*, Int32, Int32, Int32);\n\nextern void BZ2_hbMakeCodeLengths(UChar*, Int32*, Int32, Int32);\n\n/*-- states for decompression. --*/\n\n#define BZ_X_IDLE   1\n#define BZ_X_OUTPUT 2\n\n#define BZ_X_MAGIC_1    10\n#define BZ_X_MAGIC_2    11\n#define BZ_X_MAGIC_3    12\n#define BZ_X_MAGIC_4    13\n#define BZ_X_BLKHDR_1   14\n#define BZ_X_BLKHDR_2   15\n#define BZ_X_BLKHDR_3   16\n#define BZ_X_BLKHDR_4   17\n#define BZ_X_BLKHDR_5   18\n#define BZ_X_BLKHDR_6   19\n#define BZ_X_BCRC_1     20\n#define BZ_X_BCRC_2     21\n#define BZ_X_BCRC_3     22\n#define BZ_X_BCRC_4     23\n#define BZ_X_RANDBIT    24\n#define BZ_X_ORIGPTR_1  25\n#define BZ_X_ORIGPTR_2  26\n#define BZ_X_ORIGPTR_3  27\n#define BZ_X_MAPPING_1  28\n#define BZ_X_MAPPING_2  29\n#define BZ_X_SELECTOR_1 30\n#define BZ_X_SELECTOR_2 31\n#define BZ_X_SELECTOR_3 32\n#define BZ_X_CODING_1   33\n#define BZ_X_CODING_2   34\n#define BZ_X_CODING_3   35\n#define BZ_X_MTF_1      36\n#define BZ_X_MTF_2      37\n#define BZ_X_MTF_3      38\n#define BZ_X_MTF_4      39\n#define BZ_X_MTF_5      40\n#define BZ_X_MTF_6      41\n#define BZ_X_ENDHDR_2   42\n#define BZ_X_ENDHDR_3   43\n#define BZ_X_ENDHDR_4   44\n#define BZ_X_ENDHDR_5   45\n#define BZ_X_ENDHDR_6   46\n#define BZ_X_CCRC_1     47\n#define BZ_X_CCRC_2     48\n#define BZ_X_CCRC_3     49\n#define BZ_X_CCRC_4     50\n\n/*-- Constants for the fast MTF decoder. --*/\n\n#define MTFA_SIZE 4096\n#define MTFL_SIZE 16\n\n/*-- Structure holding all the decompression-side stuff. --*/\n\ntypedef struct {\n    /* pointer back to the struct bz_stream */\n    bz_stream* strm;\n\n    /* state indicator for this stream */\n    Int32 state;\n\n    /* for doing the final run-length decoding */\n    UChar state_out_ch;\n    Int32 state_out_len;\n    Bool blockRandomised;\n    BZ_RAND_DECLS;\n\n    /* the buffer for bit stream reading */\n    UInt32 bsBuff;\n    Int32 bsLive;\n\n    /* misc administratium */\n    Int32 blockSize100k;\n    Bool smallDecompress;\n    Int32 currBlockNo;\n    Int32 verbosity;\n\n    /* for undoing the Burrows-Wheeler transform */\n    Int32 origPtr;\n    UInt32 tPos;\n    Int32 k0;\n    Int32 unzftab[256];\n    Int32 nblock_used;\n    Int32 cftab[257];\n    Int32 cftabCopy[257];\n\n    /* for undoing the Burrows-Wheeler transform (FAST) */\n    UInt32* tt;\n\n    /* for undoing the Burrows-Wheeler transform (SMALL) */\n    UInt16* ll16;\n    UChar* ll4;\n\n    /* stored and calculated CRCs */\n    UInt32 storedBlockCRC;\n    UInt32 storedCombinedCRC;\n    UInt32 calculatedBlockCRC;\n    UInt32 calculatedCombinedCRC;\n\n    /* map of bytes used in block */\n    Int32 nInUse;\n    Bool inUse[256];\n    Bool inUse16[16];\n    UChar seqToUnseq[256];\n\n    /* for decoding the MTF values */\n    UChar mtfa[MTFA_SIZE];\n    Int32 mtfbase[256 / MTFL_SIZE];\n    UChar selector[BZ_MAX_SELECTORS];\n    UChar selectorMtf[BZ_MAX_SELECTORS];\n    UChar len[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];\n\n    Int32 limit[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];\n    Int32 base[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];\n    Int32 perm[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];\n    Int32 minLens[BZ_N_GROUPS];\n\n    /* save area for scalars in the main decompress code */\n    Int32 save_i;\n    Int32 save_j;\n    Int32 save_t;\n    Int32 save_alphaSize;\n    Int32 save_nGroups;\n    Int32 save_nSelectors;\n    Int32 save_EOB;\n    Int32 save_groupNo;\n    Int32 save_groupPos;\n    Int32 save_nextSym;\n    Int32 save_nblockMAX;\n    Int32 save_nblock;\n    Int32 save_es;\n    Int32 save_N;\n    Int32 save_curr;\n    Int32 save_zt;\n    Int32 save_zn;\n    Int32 save_zvec;\n    Int32 save_zj;\n    Int32 save_gSel;\n    Int32 save_gMinlen;\n    Int32* save_gLimit;\n    Int32* save_gBase;\n    Int32* save_gPerm;\n\n} DState;\n\n/*-- Macros for decompression. --*/\n\n#define BZ_GET_FAST(cccc)                                     \\\n    /* c_tPos is unsigned, hence test < 0 is pointless. */    \\\n    if (s->tPos >= (UInt32)100000 * (UInt32)s->blockSize100k) \\\n        return True;                                          \\\n    s->tPos = s->tt[s->tPos];                                 \\\n    cccc = (UChar)(s->tPos & 0xff);                           \\\n    s->tPos >>= 8;\n\n#define BZ_GET_FAST_C(cccc)                                  \\\n    /* c_tPos is unsigned, hence test < 0 is pointless. */   \\\n    if (c_tPos >= (UInt32)100000 * (UInt32)ro_blockSize100k) \\\n        return True;                                         \\\n    c_tPos = c_tt[c_tPos];                                   \\\n    cccc = (UChar)(c_tPos & 0xff);                           \\\n    c_tPos >>= 8;\n\n#define SET_LL4(i, n)                                                  \\\n    {                                                                  \\\n        if (((i)&0x1) == 0)                                            \\\n            s->ll4[(i) >> 1] = (s->ll4[(i) >> 1] & 0xf0) | (n);        \\\n        else                                                           \\\n            s->ll4[(i) >> 1] = (s->ll4[(i) >> 1] & 0x0f) | ((n) << 4); \\\n    }\n\n#define GET_LL4(i) ((((UInt32)(s->ll4[(i) >> 1])) >> (((i) << 2) & 0x4)) & 0xF)\n\n#define SET_LL(i, n)                           \\\n    {                                          \\\n        s->ll16[i] = (UInt16)(n & 0x0000ffff); \\\n        SET_LL4(i, n >> 16);                   \\\n    }\n\n#define GET_LL(i) (((UInt32)s->ll16[i]) | (GET_LL4(i) << 16))\n\n#define BZ_GET_SMALL(cccc)                                    \\\n    /* c_tPos is unsigned, hence test < 0 is pointless. */    \\\n    if (s->tPos >= (UInt32)100000 * (UInt32)s->blockSize100k) \\\n        return True;                                          \\\n    cccc = BZ2_indexIntoF(s->tPos, s->cftab);                 \\\n    s->tPos = GET_LL(s->tPos);\n\n/*-- externs for decompression. --*/\n\nextern Int32 BZ2_indexIntoF(Int32, Int32*);\n\nextern Int32 BZ2_decompress(DState*);\n\nextern void BZ2_hbCreateDecodeTables(Int32*, Int32*, Int32*, UChar*, Int32, Int32, Int32);\n\n#endif\n\n/*-- BZ_NO_STDIO seems to make nullptr disappear on some platforms. --*/\n\n#ifdef BZ_NO_STDIO\n#ifndef nullptr\n#define nullptr 0\n#endif\n#endif\n\n/*-------------------------------------------------------------*/\n/*--- end                                   bzlib_private.h ---*/\n/*-------------------------------------------------------------*/\n"
  },
  {
    "path": "third-party/tbb/examples/graph/fgbzip2/compress.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*-------------------------------------------------------------*/\n/*--- Compression machinery (not incl block sorting)        ---*/\n/*---                                          compress.cpp ---*/\n/*-------------------------------------------------------------*/\n\n/* ------------------------------------------------------------------\n   The original source for this example:\n   This file is part of bzip2/libbzip2, a program and library for\n   lossless, block-sorting data compression.\n\n   bzip2/libbzip2 version 1.0.6 of 6 September 2010\n   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>\n\n   This program, \"bzip2\", the associated library \"libbzip2\", and all\n   documentation, are copyright (C) 1996-2010 Julian R Seward.  All\n   rights reserved.\n\n   Redistribution and use in source and binary forms, with or without\n   modification, are permitted provided that the following conditions\n   are met:\n\n   1. Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   2. The origin of this software must not be misrepresented; you must \n   not claim that you wrote the original software.  If you use this \n   software in a product, an acknowledgment in the product \n   documentation would be appreciated but is not required.\n\n   3. Altered source versions must be plainly marked as such, and must\n   not be misrepresented as being the original software.\n\n   4. The name of the author may not be used to endorse or promote \n   products derived from this software without specific prior written \n   permission.\n\n   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n   OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n   ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n   Julian Seward, jseward@bzip.org\n   bzip2/libbzip2 version 1.0.6 of 6 September 2010\n   ------------------------------------------------------------------ */\n\n/* CHANGES\n    0.9.0    -- original version.\n    0.9.0a/b -- no changes in this file.\n    0.9.0c   -- changed setting of nGroups in sendMTFValues() \n                so as to do a bit better on small files\n*/\n\n#include \"bzlib_private.hpp\"\n\n/*---------------------------------------------------*/\n/*--- Bit stream I/O                              ---*/\n/*---------------------------------------------------*/\n\n/*---------------------------------------------------*/\nvoid BZ2_bsInitWrite(EState* s) {\n    s->bsLive = 0;\n    s->bsBuff = 0;\n}\n\n/*---------------------------------------------------*/\nstatic void bsFinishWrite(EState* s) {\n    while (s->bsLive > 0) {\n        s->zbits[s->numZ] = (UChar)(s->bsBuff >> 24);\n        s->numZ++;\n        s->bsBuff <<= 8;\n        s->bsLive -= 8;\n    }\n}\n\n/*---------------------------------------------------*/\n#define bsNEEDW(nz)                                       \\\n    {                                                     \\\n        while (s->bsLive >= 8) {                          \\\n            s->zbits[s->numZ] = (UChar)(s->bsBuff >> 24); \\\n            s->numZ++;                                    \\\n            s->bsBuff <<= 8;                              \\\n            s->bsLive -= 8;                               \\\n        }                                                 \\\n    }\n\n/*---------------------------------------------------*/\nstatic __inline__ void bsW(EState* s, Int32 n, UInt32 v) {\n    bsNEEDW(n);\n    s->bsBuff |= (v << (32 - s->bsLive - n));\n    s->bsLive += n;\n}\n\n/*---------------------------------------------------*/\nstatic void bsPutUInt32(EState* s, UInt32 u) {\n    bsW(s, 8, (u >> 24) & 0xffL);\n    bsW(s, 8, (u >> 16) & 0xffL);\n    bsW(s, 8, (u >> 8) & 0xffL);\n    bsW(s, 8, u & 0xffL);\n}\n\n/*---------------------------------------------------*/\nstatic void bsPutUChar(EState* s, UChar c) {\n    bsW(s, 8, (UInt32)c);\n}\n\n/*---------------------------------------------------*/\n/*--- The back end proper                         ---*/\n/*---------------------------------------------------*/\n\n/*---------------------------------------------------*/\nstatic void makeMaps_e(EState* s) {\n    Int32 i;\n    s->nInUse = 0;\n    for (i = 0; i < 256; i++)\n        if (s->inUse[i]) {\n            s->unseqToSeq[i] = s->nInUse;\n            s->nInUse++;\n        }\n}\n\n/*---------------------------------------------------*/\nstatic void generateMTFValues(EState* s) {\n    UChar yy[256];\n    Int32 i, j;\n    Int32 zPend;\n    Int32 wr;\n    Int32 EOB;\n\n    /* \n      After sorting (eg, here),\n         s->arr1 [ 0 .. s->nblock-1 ] holds sorted order,\n         and\n         ((UChar*)s->arr2) [ 0 .. s->nblock-1 ] \n         holds the original block data.\n\n      The first thing to do is generate the MTF values,\n      and put them in\n         ((UInt16*)s->arr1) [ 0 .. s->nblock-1 ].\n      Because there are strictly fewer or equal MTF values\n      than block values, ptr values in this area are overwritten\n      with MTF values only when they are no longer needed.\n\n      The final compressed bitstream is generated into the\n      area starting at\n         (UChar*) (&((UChar*)s->arr2)[s->nblock])\n\n      These storage aliases are set up in bzCompressInit(),\n      except for the last one, which is arranged in \n      compressBlock().\n   */\n    UInt32* ptr = s->ptr;\n    UChar* block = s->block;\n    UInt16* mtfv = s->mtfv;\n\n    makeMaps_e(s);\n    EOB = s->nInUse + 1;\n\n    for (i = 0; i <= EOB; i++)\n        s->mtfFreq[i] = 0;\n\n    wr = 0;\n    zPend = 0;\n    for (i = 0; i < s->nInUse; i++)\n        yy[i] = (UChar)i;\n\n    for (i = 0; i < s->nblock; i++) {\n        UChar ll_i;\n        AssertD(wr <= i, \"generateMTFValues(1)\");\n        j = ptr[i] - 1;\n        if (j < 0)\n            j += s->nblock;\n        ll_i = s->unseqToSeq[block[j]];\n        AssertD(ll_i < s->nInUse, \"generateMTFValues(2a)\");\n\n        if (yy[0] == ll_i) {\n            zPend++;\n        }\n        else {\n            if (zPend > 0) {\n                zPend--;\n                while (True) {\n                    if (zPend & 1) {\n                        mtfv[wr] = BZ_RUNB;\n                        wr++;\n                        s->mtfFreq[BZ_RUNB]++;\n                    }\n                    else {\n                        mtfv[wr] = BZ_RUNA;\n                        wr++;\n                        s->mtfFreq[BZ_RUNA]++;\n                    }\n                    if (zPend < 2)\n                        break;\n                    zPend = (zPend - 2) / 2;\n                };\n                zPend = 0;\n            }\n            {\n                UChar rtmp;\n                UChar* ryy_j;\n                UChar rll_i;\n                rtmp = yy[1];\n                yy[1] = yy[0];\n                ryy_j = &(yy[1]);\n                rll_i = ll_i;\n                while (rll_i != rtmp) {\n                    UChar rtmp2;\n                    ryy_j++;\n                    rtmp2 = rtmp;\n                    rtmp = *ryy_j;\n                    *ryy_j = rtmp2;\n                };\n                yy[0] = rtmp;\n                j = ryy_j - &(yy[0]);\n                mtfv[wr] = j + 1;\n                wr++;\n                s->mtfFreq[j + 1]++;\n            }\n        }\n    }\n\n    if (zPend > 0) {\n        zPend--;\n        while (True) {\n            if (zPend & 1) {\n                mtfv[wr] = BZ_RUNB;\n                wr++;\n                s->mtfFreq[BZ_RUNB]++;\n            }\n            else {\n                mtfv[wr] = BZ_RUNA;\n                wr++;\n                s->mtfFreq[BZ_RUNA]++;\n            }\n            if (zPend < 2)\n                break;\n            zPend = (zPend - 2) / 2;\n        };\n        zPend = 0;\n    }\n\n    mtfv[wr] = EOB;\n    wr++;\n    s->mtfFreq[EOB]++;\n\n    s->nMTF = wr;\n}\n\n/*---------------------------------------------------*/\n#define BZ_LESSER_ICOST  0\n#define BZ_GREATER_ICOST 15\n\nstatic void sendMTFValues(EState* s) {\n    Int32 t, i, j, k, gs, ge, totc, bt, bc;\n    Int32 nSelectors, alphaSize, minLen, maxLen, selCtr;\n    Int32 nGroups, nBytes;\n\n    /*--\n   UChar  len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];\n   is a global since the decoder also needs it.\n\n   Int32  code[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];\n   Int32  rfreq[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];\n   are also globals only used in this proc.\n   Made global to keep stack frame size small.\n   --*/\n\n    UInt16 cost[BZ_N_GROUPS];\n    Int32 fave[BZ_N_GROUPS];\n\n    UInt16* mtfv = s->mtfv;\n\n    if (s->verbosity >= 3)\n        VPrintf3(\"      %d in block, %d after MTF & 1-2 coding, \"\n                 \"%d+2 syms in use\\n\",\n                 s->nblock,\n                 s->nMTF,\n                 s->nInUse);\n\n    alphaSize = s->nInUse + 2;\n    for (i = 0; i < BZ_N_GROUPS; i++)\n        for (j = 0; j < alphaSize; j++)\n            s->len[i][j] = BZ_GREATER_ICOST;\n\n    /*--- Decide how many coding tables to use ---*/\n    AssertH(s->nMTF > 0, 3001);\n    if (s->nMTF < 200)\n        nGroups = 2;\n    else if (s->nMTF < 600)\n        nGroups = 3;\n    else if (s->nMTF < 1200)\n        nGroups = 4;\n    else if (s->nMTF < 2400)\n        nGroups = 5;\n    else\n        nGroups = 6;\n\n    /*--- Generate an initial set of coding tables ---*/\n    {\n        Int32 nPart, remF, tFreq, aFreq;\n\n        nPart = nGroups;\n        remF = s->nMTF;\n        gs = 0;\n        while (nPart > 0) {\n            tFreq = remF / nPart;\n            ge = gs - 1;\n            aFreq = 0;\n            while (aFreq < tFreq && ge < alphaSize - 1) {\n                ge++;\n                aFreq += s->mtfFreq[ge];\n            }\n\n            if (ge > gs && nPart != nGroups && nPart != 1 && ((nGroups - nPart) % 2 == 1)) {\n                aFreq -= s->mtfFreq[ge];\n                ge--;\n            }\n\n            if (s->verbosity >= 3)\n                VPrintf5(\"      initial group %d, [%d .. %d], \"\n                         \"has %d syms (%4.1f%%)\\n\",\n                         nPart,\n                         gs,\n                         ge,\n                         aFreq,\n                         (100.0 * (float)aFreq) / (float)(s->nMTF));\n\n            for (i = 0; i < alphaSize; i++)\n                if (i >= gs && i <= ge)\n                    s->len[nPart - 1][i] = BZ_LESSER_ICOST;\n                else\n                    s->len[nPart - 1][i] = BZ_GREATER_ICOST;\n\n            nPart--;\n            gs = ge + 1;\n            remF -= aFreq;\n        }\n    }\n\n    /*--- \n      Iterate up to BZ_N_ITERS times to improve the tables.\n   ---*/\n    for (k = 0; k < BZ_N_ITERS; k++) {\n        for (i = 0; i < nGroups; i++)\n            fave[i] = 0;\n\n        for (i = 0; i < nGroups; i++)\n            for (j = 0; j < alphaSize; j++)\n                s->rfreq[i][j] = 0;\n\n        /*---\n        Set up an auxiliary length table which is used to fast-track\n\tthe common case (nGroups == 6). \n      ---*/\n        if (nGroups == 6) {\n            for (i = 0; i < alphaSize; i++) {\n                s->len_pack[i][0] = (s->len[1][i] << 16) | s->len[0][i];\n                s->len_pack[i][1] = (s->len[3][i] << 16) | s->len[2][i];\n                s->len_pack[i][2] = (s->len[5][i] << 16) | s->len[4][i];\n            }\n        }\n\n        nSelectors = 0;\n        totc = 0;\n        gs = 0;\n        while (True) {\n            /*--- Set group start & end marks. --*/\n            if (gs >= s->nMTF)\n                break;\n            ge = gs + BZ_G_SIZE - 1;\n            if (ge >= s->nMTF)\n                ge = s->nMTF - 1;\n\n            /*-- \n            Calculate the cost of this group as coded\n            by each of the coding tables.\n         --*/\n            for (i = 0; i < nGroups; i++)\n                cost[i] = 0;\n\n            if (nGroups == 6 && 50 == ge - gs + 1) {\n                /*--- fast track the common case ---*/\n                UInt32 cost01, cost23, cost45;\n                UInt16 icv;\n                cost01 = cost23 = cost45 = 0;\n\n#define BZ_ITER(nn)                \\\n    icv = mtfv[gs + (nn)];         \\\n    cost01 += s->len_pack[icv][0]; \\\n    cost23 += s->len_pack[icv][1]; \\\n    cost45 += s->len_pack[icv][2];\n\n                BZ_ITER(0);\n                BZ_ITER(1);\n                BZ_ITER(2);\n                BZ_ITER(3);\n                BZ_ITER(4);\n                BZ_ITER(5);\n                BZ_ITER(6);\n                BZ_ITER(7);\n                BZ_ITER(8);\n                BZ_ITER(9);\n                BZ_ITER(10);\n                BZ_ITER(11);\n                BZ_ITER(12);\n                BZ_ITER(13);\n                BZ_ITER(14);\n                BZ_ITER(15);\n                BZ_ITER(16);\n                BZ_ITER(17);\n                BZ_ITER(18);\n                BZ_ITER(19);\n                BZ_ITER(20);\n                BZ_ITER(21);\n                BZ_ITER(22);\n                BZ_ITER(23);\n                BZ_ITER(24);\n                BZ_ITER(25);\n                BZ_ITER(26);\n                BZ_ITER(27);\n                BZ_ITER(28);\n                BZ_ITER(29);\n                BZ_ITER(30);\n                BZ_ITER(31);\n                BZ_ITER(32);\n                BZ_ITER(33);\n                BZ_ITER(34);\n                BZ_ITER(35);\n                BZ_ITER(36);\n                BZ_ITER(37);\n                BZ_ITER(38);\n                BZ_ITER(39);\n                BZ_ITER(40);\n                BZ_ITER(41);\n                BZ_ITER(42);\n                BZ_ITER(43);\n                BZ_ITER(44);\n                BZ_ITER(45);\n                BZ_ITER(46);\n                BZ_ITER(47);\n                BZ_ITER(48);\n                BZ_ITER(49);\n\n#undef BZ_ITER\n\n                cost[0] = cost01 & 0xffff;\n                cost[1] = cost01 >> 16;\n                cost[2] = cost23 & 0xffff;\n                cost[3] = cost23 >> 16;\n                cost[4] = cost45 & 0xffff;\n                cost[5] = cost45 >> 16;\n            }\n            else {\n                /*--- slow version which correctly handles all situations ---*/\n                for (i = gs; i <= ge; i++) {\n                    UInt16 icv = mtfv[i];\n                    for (j = 0; j < nGroups; j++)\n                        cost[j] += s->len[j][icv];\n                }\n            }\n\n            /*-- \n            Find the coding table which is best for this group,\n            and record its identity in the selector table.\n         --*/\n            bc = 999999999;\n            bt = -1;\n            for (i = 0; i < nGroups; i++)\n                if (cost[i] < bc) {\n                    bc = cost[i];\n                    bt = i;\n                };\n            totc += bc;\n            fave[bt]++;\n            s->selector[nSelectors] = bt;\n            nSelectors++;\n\n            /*-- \n            Increment the symbol frequencies for the selected table.\n          --*/\n            if (nGroups == 6 && 50 == ge - gs + 1) {\n                /*--- fast track the common case ---*/\n\n#define BZ_ITUR(nn) s->rfreq[bt][mtfv[gs + (nn)]]++\n\n                BZ_ITUR(0);\n                BZ_ITUR(1);\n                BZ_ITUR(2);\n                BZ_ITUR(3);\n                BZ_ITUR(4);\n                BZ_ITUR(5);\n                BZ_ITUR(6);\n                BZ_ITUR(7);\n                BZ_ITUR(8);\n                BZ_ITUR(9);\n                BZ_ITUR(10);\n                BZ_ITUR(11);\n                BZ_ITUR(12);\n                BZ_ITUR(13);\n                BZ_ITUR(14);\n                BZ_ITUR(15);\n                BZ_ITUR(16);\n                BZ_ITUR(17);\n                BZ_ITUR(18);\n                BZ_ITUR(19);\n                BZ_ITUR(20);\n                BZ_ITUR(21);\n                BZ_ITUR(22);\n                BZ_ITUR(23);\n                BZ_ITUR(24);\n                BZ_ITUR(25);\n                BZ_ITUR(26);\n                BZ_ITUR(27);\n                BZ_ITUR(28);\n                BZ_ITUR(29);\n                BZ_ITUR(30);\n                BZ_ITUR(31);\n                BZ_ITUR(32);\n                BZ_ITUR(33);\n                BZ_ITUR(34);\n                BZ_ITUR(35);\n                BZ_ITUR(36);\n                BZ_ITUR(37);\n                BZ_ITUR(38);\n                BZ_ITUR(39);\n                BZ_ITUR(40);\n                BZ_ITUR(41);\n                BZ_ITUR(42);\n                BZ_ITUR(43);\n                BZ_ITUR(44);\n                BZ_ITUR(45);\n                BZ_ITUR(46);\n                BZ_ITUR(47);\n                BZ_ITUR(48);\n                BZ_ITUR(49);\n\n#undef BZ_ITUR\n            }\n            else {\n                /*--- slow version which correctly handles all situations ---*/\n                for (i = gs; i <= ge; i++)\n                    s->rfreq[bt][mtfv[i]]++;\n            }\n\n            gs = ge + 1;\n        }\n        if (s->verbosity >= 3) {\n            VPrintf2(\"      pass %d: size is %d, grp uses are \", k + 1, totc / 8);\n            for (i = 0; i < nGroups; i++)\n                VPrintf1(\"%d \", fave[i]);\n            VPrintf0(\"\\n\");\n        }\n\n        /*--\n        Recompute the tables based on the accumulated frequencies.\n      --*/\n        /* maxLen was changed from 20 to 17 in bzip2-1.0.3.  See \n         comment in huffman.c for details. */\n        for (i = 0; i < nGroups; i++)\n            BZ2_hbMakeCodeLengths(&(s->len[i][0]), &(s->rfreq[i][0]), alphaSize, 17 /*20*/);\n    }\n\n    AssertH(nGroups < 8, 3002);\n    AssertH(nSelectors < 32768 && nSelectors <= (2 + (900000 / BZ_G_SIZE)), 3003);\n\n    /*--- Compute MTF values for the selectors. ---*/\n    {\n        UChar pos[BZ_N_GROUPS], ll_i, tmp2, tmp;\n        for (i = 0; i < nGroups; i++)\n            pos[i] = i;\n        for (i = 0; i < nSelectors; i++) {\n            ll_i = s->selector[i];\n            j = 0;\n            tmp = pos[j];\n            while (ll_i != tmp) {\n                j++;\n                tmp2 = tmp;\n                tmp = pos[j];\n                pos[j] = tmp2;\n            };\n            pos[0] = tmp;\n            s->selectorMtf[i] = j;\n        }\n    };\n\n    /*--- Assign actual codes for the tables. --*/\n    for (j = 0; j < nGroups; j++) {\n        minLen = 32;\n        maxLen = 0;\n        for (i = 0; i < alphaSize; i++) {\n            if (s->len[j][i] > maxLen)\n                maxLen = s->len[j][i];\n            if (s->len[j][i] < minLen)\n                minLen = s->len[j][i];\n        }\n        AssertH(!(maxLen > 17 /*20*/), 3004);\n        AssertH(!(minLen < 1), 3005);\n        BZ2_hbAssignCodes(&(s->code[j][0]), &(s->len[j][0]), minLen, maxLen, alphaSize);\n    }\n\n    /*--- Transmit the mapping table. ---*/\n    {\n        Bool inUse16[16];\n        for (i = 0; i < 16; i++) {\n            inUse16[i] = False;\n            for (j = 0; j < 16; j++)\n                if (s->inUse[i * 16 + j])\n                    inUse16[i] = True;\n        }\n\n        nBytes = s->numZ;\n        for (i = 0; i < 16; i++)\n            if (inUse16[i])\n                bsW(s, 1, 1);\n            else\n                bsW(s, 1, 0);\n\n        for (i = 0; i < 16; i++)\n            if (inUse16[i])\n                for (j = 0; j < 16; j++) {\n                    if (s->inUse[i * 16 + j])\n                        bsW(s, 1, 1);\n                    else\n                        bsW(s, 1, 0);\n                }\n\n        if (s->verbosity >= 3)\n            VPrintf1(\"      bytes: mapping %d, \", s->numZ - nBytes);\n    }\n\n    /*--- Now the selectors. ---*/\n    nBytes = s->numZ;\n    bsW(s, 3, nGroups);\n    bsW(s, 15, nSelectors);\n    for (i = 0; i < nSelectors; i++) {\n        for (j = 0; j < s->selectorMtf[i]; j++)\n            bsW(s, 1, 1);\n        bsW(s, 1, 0);\n    }\n    if (s->verbosity >= 3)\n        VPrintf1(\"selectors %d, \", s->numZ - nBytes);\n\n    /*--- Now the coding tables. ---*/\n    nBytes = s->numZ;\n\n    for (t = 0; t < nGroups; t++) {\n        Int32 curr = s->len[t][0];\n        bsW(s, 5, curr);\n        for (i = 0; i < alphaSize; i++) {\n            while (curr < s->len[t][i]) {\n                bsW(s, 2, 2);\n                curr++; /* 10 */\n            };\n            while (curr > s->len[t][i]) {\n                bsW(s, 2, 3);\n                curr--; /* 11 */\n            };\n            bsW(s, 1, 0);\n        }\n    }\n\n    if (s->verbosity >= 3)\n        VPrintf1(\"code lengths %d, \", s->numZ - nBytes);\n\n    /*--- And finally, the block data proper ---*/\n    nBytes = s->numZ;\n    selCtr = 0;\n    gs = 0;\n    while (True) {\n        if (gs >= s->nMTF)\n            break;\n        ge = gs + BZ_G_SIZE - 1;\n        if (ge >= s->nMTF)\n            ge = s->nMTF - 1;\n        AssertH(s->selector[selCtr] < nGroups, 3006);\n\n        if (nGroups == 6 && 50 == ge - gs + 1) {\n            /*--- fast track the common case ---*/\n            UInt16 mtfv_i;\n            UChar* s_len_sel_selCtr = &(s->len[s->selector[selCtr]][0]);\n            Int32* s_code_sel_selCtr = &(s->code[s->selector[selCtr]][0]);\n\n#define BZ_ITAH(nn)           \\\n    mtfv_i = mtfv[gs + (nn)]; \\\n    bsW(s, s_len_sel_selCtr[mtfv_i], s_code_sel_selCtr[mtfv_i])\n\n            BZ_ITAH(0);\n            BZ_ITAH(1);\n            BZ_ITAH(2);\n            BZ_ITAH(3);\n            BZ_ITAH(4);\n            BZ_ITAH(5);\n            BZ_ITAH(6);\n            BZ_ITAH(7);\n            BZ_ITAH(8);\n            BZ_ITAH(9);\n            BZ_ITAH(10);\n            BZ_ITAH(11);\n            BZ_ITAH(12);\n            BZ_ITAH(13);\n            BZ_ITAH(14);\n            BZ_ITAH(15);\n            BZ_ITAH(16);\n            BZ_ITAH(17);\n            BZ_ITAH(18);\n            BZ_ITAH(19);\n            BZ_ITAH(20);\n            BZ_ITAH(21);\n            BZ_ITAH(22);\n            BZ_ITAH(23);\n            BZ_ITAH(24);\n            BZ_ITAH(25);\n            BZ_ITAH(26);\n            BZ_ITAH(27);\n            BZ_ITAH(28);\n            BZ_ITAH(29);\n            BZ_ITAH(30);\n            BZ_ITAH(31);\n            BZ_ITAH(32);\n            BZ_ITAH(33);\n            BZ_ITAH(34);\n            BZ_ITAH(35);\n            BZ_ITAH(36);\n            BZ_ITAH(37);\n            BZ_ITAH(38);\n            BZ_ITAH(39);\n            BZ_ITAH(40);\n            BZ_ITAH(41);\n            BZ_ITAH(42);\n            BZ_ITAH(43);\n            BZ_ITAH(44);\n            BZ_ITAH(45);\n            BZ_ITAH(46);\n            BZ_ITAH(47);\n            BZ_ITAH(48);\n            BZ_ITAH(49);\n\n#undef BZ_ITAH\n        }\n        else {\n            /*--- slow version which correctly handles all situations ---*/\n            for (i = gs; i <= ge; i++) {\n                bsW(s, s->len[s->selector[selCtr]][mtfv[i]], s->code[s->selector[selCtr]][mtfv[i]]);\n            }\n        }\n\n        gs = ge + 1;\n        selCtr++;\n    }\n    AssertH(selCtr == nSelectors, 3007);\n\n    if (s->verbosity >= 3)\n        VPrintf1(\"codes %d\\n\", s->numZ - nBytes);\n}\n\n/*---------------------------------------------------*/\nvoid BZ2_compressBlock(EState* s, Bool is_last_block) {\n    if (s->nblock > 0) {\n        BZ_FINALISE_CRC(s->blockCRC);\n        s->combinedCRC = (s->combinedCRC << 1) | (s->combinedCRC >> 31);\n        s->combinedCRC ^= s->blockCRC;\n        if (s->blockNo > 1)\n            s->numZ = 0;\n\n        if (s->verbosity >= 2)\n            VPrintf4(\"    block %d: crc = 0x%08x, \"\n                     \"combined CRC = 0x%08x, size = %d\\n\",\n                     s->blockNo,\n                     s->blockCRC,\n                     s->combinedCRC,\n                     s->nblock);\n\n        BZ2_blockSort(s);\n    }\n\n    s->zbits = (UChar*)(&((UChar*)s->arr2)[s->nblock]);\n\n    /*-- If this is the first block, create the stream header. --*/\n    if (s->blockNo == 1) {\n        BZ2_bsInitWrite(s);\n        bsPutUChar(s, BZ_HDR_B);\n        bsPutUChar(s, BZ_HDR_Z);\n        bsPutUChar(s, BZ_HDR_h);\n        bsPutUChar(s, (UChar)(BZ_HDR_0 + s->blockSize100k));\n    }\n\n    if (s->nblock > 0) {\n        bsPutUChar(s, 0x31);\n        bsPutUChar(s, 0x41);\n        bsPutUChar(s, 0x59);\n        bsPutUChar(s, 0x26);\n        bsPutUChar(s, 0x53);\n        bsPutUChar(s, 0x59);\n\n        /*-- Now the block's CRC, so it is in a known place. --*/\n        bsPutUInt32(s, s->blockCRC);\n\n        /*-- \n         Now a single bit indicating (non-)randomisation. \n         As of version 0.9.5, we use a better sorting algorithm\n         which makes randomisation unnecessary.  So always set\n         the randomised bit to 'no'.  Of course, the decoder\n         still needs to be able to handle randomised blocks\n         so as to maintain backwards compatibility with\n         older versions of bzip2.\n      --*/\n        bsW(s, 1, 0);\n\n        bsW(s, 24, s->origPtr);\n        generateMTFValues(s);\n        sendMTFValues(s);\n    }\n\n    /*-- If this is the last block, add the stream trailer. --*/\n    if (is_last_block) {\n        bsPutUChar(s, 0x17);\n        bsPutUChar(s, 0x72);\n        bsPutUChar(s, 0x45);\n        bsPutUChar(s, 0x38);\n        bsPutUChar(s, 0x50);\n        bsPutUChar(s, 0x90);\n        bsPutUInt32(s, s->combinedCRC);\n        if (s->verbosity >= 2)\n            VPrintf1(\"    final combined CRC = 0x%08x\\n   \", s->combinedCRC);\n        bsFinishWrite(s);\n    }\n}\n\n/*-------------------------------------------------------------*/\n/*--- end                                        compress.c ---*/\n/*-------------------------------------------------------------*/\n"
  },
  {
    "path": "third-party/tbb/examples/graph/fgbzip2/crctable.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*-------------------------------------------------------------*/\n/*--- Table for doing CRCs                                  ---*/\n/*---                                          crctable.cpp ---*/\n/*-------------------------------------------------------------*/\n\n/* ------------------------------------------------------------------\n   The original source for this example:\n   This file is part of bzip2/libbzip2, a program and library for\n   lossless, block-sorting data compression.\n\n   bzip2/libbzip2 version 1.0.6 of 6 September 2010\n   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>\n\n   This program, \"bzip2\", the associated library \"libbzip2\", and all\n   documentation, are copyright (C) 1996-2010 Julian R Seward.  All\n   rights reserved.\n\n   Redistribution and use in source and binary forms, with or without\n   modification, are permitted provided that the following conditions\n   are met:\n\n   1. Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   2. The origin of this software must not be misrepresented; you must \n   not claim that you wrote the original software.  If you use this \n   software in a product, an acknowledgment in the product \n   documentation would be appreciated but is not required.\n\n   3. Altered source versions must be plainly marked as such, and must\n   not be misrepresented as being the original software.\n\n   4. The name of the author may not be used to endorse or promote \n   products derived from this software without specific prior written \n   permission.\n\n   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n   OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n   ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n   Julian Seward, jseward@bzip.org\n   bzip2/libbzip2 version 1.0.6 of 6 September 2010\n   ------------------------------------------------------------------ */\n\n#include \"bzlib_private.hpp\"\n\n/*--\n  I think this is an implementation of the AUTODIN-II,\n  Ethernet & FDDI 32-bit CRC standard.  Vaguely derived\n  from code by Rob Warnock, in Section 51 of the\n  comp.compression FAQ.\n--*/\n\nUInt32 BZ2_crc32Table[256] = {\n\n    /*-- Ugly, innit? --*/\n\n    0x00000000L, 0x04c11db7L, 0x09823b6eL, 0x0d4326d9L, 0x130476dcL, 0x17c56b6bL, 0x1a864db2L,\n    0x1e475005L, 0x2608edb8L, 0x22c9f00fL, 0x2f8ad6d6L, 0x2b4bcb61L, 0x350c9b64L, 0x31cd86d3L,\n    0x3c8ea00aL, 0x384fbdbdL, 0x4c11db70L, 0x48d0c6c7L, 0x4593e01eL, 0x4152fda9L, 0x5f15adacL,\n    0x5bd4b01bL, 0x569796c2L, 0x52568b75L, 0x6a1936c8L, 0x6ed82b7fL, 0x639b0da6L, 0x675a1011L,\n    0x791d4014L, 0x7ddc5da3L, 0x709f7b7aL, 0x745e66cdL, 0x9823b6e0L, 0x9ce2ab57L, 0x91a18d8eL,\n    0x95609039L, 0x8b27c03cL, 0x8fe6dd8bL, 0x82a5fb52L, 0x8664e6e5L, 0xbe2b5b58L, 0xbaea46efL,\n    0xb7a96036L, 0xb3687d81L, 0xad2f2d84L, 0xa9ee3033L, 0xa4ad16eaL, 0xa06c0b5dL, 0xd4326d90L,\n    0xd0f37027L, 0xddb056feL, 0xd9714b49L, 0xc7361b4cL, 0xc3f706fbL, 0xceb42022L, 0xca753d95L,\n    0xf23a8028L, 0xf6fb9d9fL, 0xfbb8bb46L, 0xff79a6f1L, 0xe13ef6f4L, 0xe5ffeb43L, 0xe8bccd9aL,\n    0xec7dd02dL, 0x34867077L, 0x30476dc0L, 0x3d044b19L, 0x39c556aeL, 0x278206abL, 0x23431b1cL,\n    0x2e003dc5L, 0x2ac12072L, 0x128e9dcfL, 0x164f8078L, 0x1b0ca6a1L, 0x1fcdbb16L, 0x018aeb13L,\n    0x054bf6a4L, 0x0808d07dL, 0x0cc9cdcaL, 0x7897ab07L, 0x7c56b6b0L, 0x71159069L, 0x75d48ddeL,\n    0x6b93dddbL, 0x6f52c06cL, 0x6211e6b5L, 0x66d0fb02L, 0x5e9f46bfL, 0x5a5e5b08L, 0x571d7dd1L,\n    0x53dc6066L, 0x4d9b3063L, 0x495a2dd4L, 0x44190b0dL, 0x40d816baL, 0xaca5c697L, 0xa864db20L,\n    0xa527fdf9L, 0xa1e6e04eL, 0xbfa1b04bL, 0xbb60adfcL, 0xb6238b25L, 0xb2e29692L, 0x8aad2b2fL,\n    0x8e6c3698L, 0x832f1041L, 0x87ee0df6L, 0x99a95df3L, 0x9d684044L, 0x902b669dL, 0x94ea7b2aL,\n    0xe0b41de7L, 0xe4750050L, 0xe9362689L, 0xedf73b3eL, 0xf3b06b3bL, 0xf771768cL, 0xfa325055L,\n    0xfef34de2L, 0xc6bcf05fL, 0xc27dede8L, 0xcf3ecb31L, 0xcbffd686L, 0xd5b88683L, 0xd1799b34L,\n    0xdc3abdedL, 0xd8fba05aL, 0x690ce0eeL, 0x6dcdfd59L, 0x608edb80L, 0x644fc637L, 0x7a089632L,\n    0x7ec98b85L, 0x738aad5cL, 0x774bb0ebL, 0x4f040d56L, 0x4bc510e1L, 0x46863638L, 0x42472b8fL,\n    0x5c007b8aL, 0x58c1663dL, 0x558240e4L, 0x51435d53L, 0x251d3b9eL, 0x21dc2629L, 0x2c9f00f0L,\n    0x285e1d47L, 0x36194d42L, 0x32d850f5L, 0x3f9b762cL, 0x3b5a6b9bL, 0x0315d626L, 0x07d4cb91L,\n    0x0a97ed48L, 0x0e56f0ffL, 0x1011a0faL, 0x14d0bd4dL, 0x19939b94L, 0x1d528623L, 0xf12f560eL,\n    0xf5ee4bb9L, 0xf8ad6d60L, 0xfc6c70d7L, 0xe22b20d2L, 0xe6ea3d65L, 0xeba91bbcL, 0xef68060bL,\n    0xd727bbb6L, 0xd3e6a601L, 0xdea580d8L, 0xda649d6fL, 0xc423cd6aL, 0xc0e2d0ddL, 0xcda1f604L,\n    0xc960ebb3L, 0xbd3e8d7eL, 0xb9ff90c9L, 0xb4bcb610L, 0xb07daba7L, 0xae3afba2L, 0xaafbe615L,\n    0xa7b8c0ccL, 0xa379dd7bL, 0x9b3660c6L, 0x9ff77d71L, 0x92b45ba8L, 0x9675461fL, 0x8832161aL,\n    0x8cf30badL, 0x81b02d74L, 0x857130c3L, 0x5d8a9099L, 0x594b8d2eL, 0x5408abf7L, 0x50c9b640L,\n    0x4e8ee645L, 0x4a4ffbf2L, 0x470cdd2bL, 0x43cdc09cL, 0x7b827d21L, 0x7f436096L, 0x7200464fL,\n    0x76c15bf8L, 0x68860bfdL, 0x6c47164aL, 0x61043093L, 0x65c52d24L, 0x119b4be9L, 0x155a565eL,\n    0x18197087L, 0x1cd86d30L, 0x029f3d35L, 0x065e2082L, 0x0b1d065bL, 0x0fdc1becL, 0x3793a651L,\n    0x3352bbe6L, 0x3e119d3fL, 0x3ad08088L, 0x2497d08dL, 0x2056cd3aL, 0x2d15ebe3L, 0x29d4f654L,\n    0xc5a92679L, 0xc1683bceL, 0xcc2b1d17L, 0xc8ea00a0L, 0xd6ad50a5L, 0xd26c4d12L, 0xdf2f6bcbL,\n    0xdbee767cL, 0xe3a1cbc1L, 0xe760d676L, 0xea23f0afL, 0xeee2ed18L, 0xf0a5bd1dL, 0xf464a0aaL,\n    0xf9278673L, 0xfde69bc4L, 0x89b8fd09L, 0x8d79e0beL, 0x803ac667L, 0x84fbdbd0L, 0x9abc8bd5L,\n    0x9e7d9662L, 0x933eb0bbL, 0x97ffad0cL, 0xafb010b1L, 0xab710d06L, 0xa6322bdfL, 0xa2f33668L,\n    0xbcb4666dL, 0xb8757bdaL, 0xb5365d03L, 0xb1f740b4L\n};\n\n/*-------------------------------------------------------------*/\n/*--- end                                        crctable.c ---*/\n/*-------------------------------------------------------------*/\n"
  },
  {
    "path": "third-party/tbb/examples/graph/fgbzip2/decompress.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*-------------------------------------------------------------*/\n/*--- Decompression machinery                               ---*/\n/*---                                        decompress.cpp ---*/\n/*-------------------------------------------------------------*/\n\n/* ------------------------------------------------------------------\n   The original source for this example:\n   This file is part of bzip2/libbzip2, a program and library for\n   lossless, block-sorting data compression.\n\n   bzip2/libbzip2 version 1.0.6 of 6 September 2010\n   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>\n\n   This program, \"bzip2\", the associated library \"libbzip2\", and all\n   documentation, are copyright (C) 1996-2010 Julian R Seward.  All\n   rights reserved.\n\n   Redistribution and use in source and binary forms, with or without\n   modification, are permitted provided that the following conditions\n   are met:\n\n   1. Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   2. The origin of this software must not be misrepresented; you must \n   not claim that you wrote the original software.  If you use this \n   software in a product, an acknowledgment in the product \n   documentation would be appreciated but is not required.\n\n   3. Altered source versions must be plainly marked as such, and must\n   not be misrepresented as being the original software.\n\n   4. The name of the author may not be used to endorse or promote \n   products derived from this software without specific prior written \n   permission.\n\n   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n   OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n   ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n   Julian Seward, jseward@bzip.org\n   bzip2/libbzip2 version 1.0.6 of 6 September 2010\n   ------------------------------------------------------------------ */\n\n#include \"bzlib_private.hpp\"\n\n/*---------------------------------------------------*/\nstatic void makeMaps_d(DState* s) {\n    Int32 i;\n    s->nInUse = 0;\n    for (i = 0; i < 256; i++)\n        if (s->inUse[i]) {\n            s->seqToUnseq[s->nInUse] = i;\n            s->nInUse++;\n        }\n}\n\n/*---------------------------------------------------*/\n#define RETURN(rrr)                 \\\n    {                               \\\n        retVal = rrr;               \\\n        goto save_state_and_return; \\\n    };\n\n#define GET_BITS(lll, vvv, nnn)                                                       \\\n    case lll:                                                                         \\\n        s->state = lll;                                                               \\\n        while (True) {                                                                \\\n            if (s->bsLive >= nnn) {                                                   \\\n                UInt32 v;                                                             \\\n                v = (s->bsBuff >> (s->bsLive - nnn)) & ((1 << nnn) - 1);              \\\n                s->bsLive -= nnn;                                                     \\\n                vvv = v;                                                              \\\n                break;                                                                \\\n            }                                                                         \\\n            if (s->strm->avail_in == 0)                                               \\\n                RETURN(BZ_OK);                                                        \\\n            s->bsBuff = (s->bsBuff << 8) | ((UInt32)(*((UChar*)(s->strm->next_in)))); \\\n            s->bsLive += 8;                                                           \\\n            s->strm->next_in++;                                                       \\\n            s->strm->avail_in--;                                                      \\\n            s->strm->total_in_lo32++;                                                 \\\n            if (s->strm->total_in_lo32 == 0)                                          \\\n                s->strm->total_in_hi32++;                                             \\\n        }\n\n#define GET_UCHAR(lll, uuu) GET_BITS(lll, uuu, 8)\n\n#define GET_BIT(lll, uuu) GET_BITS(lll, uuu, 1)\n\n/*---------------------------------------------------*/\n#define GET_MTF_VAL(label1, label2, lval)                                  \\\n    {                                                                      \\\n        if (groupPos == 0) {                                               \\\n            groupNo++;                                                     \\\n            if (groupNo >= nSelectors)                                     \\\n                RETURN(BZ_DATA_ERROR);                                     \\\n            groupPos = BZ_G_SIZE;                                          \\\n            gSel = s->selector[groupNo];                                   \\\n            gMinlen = s->minLens[gSel];                                    \\\n            gLimit = &(s->limit[gSel][0]);                                 \\\n            gPerm = &(s->perm[gSel][0]);                                   \\\n            gBase = &(s->base[gSel][0]);                                   \\\n        }                                                                  \\\n        groupPos--;                                                        \\\n        zn = gMinlen;                                                      \\\n        GET_BITS(label1, zvec, zn);                                        \\\n        while (1) {                                                        \\\n            if (zn > 20 /* the longest code */)                            \\\n                RETURN(BZ_DATA_ERROR);                                     \\\n            if (zvec <= gLimit[zn])                                        \\\n                break;                                                     \\\n            zn++;                                                          \\\n            GET_BIT(label2, zj);                                           \\\n            zvec = (zvec << 1) | zj;                                       \\\n        };                                                                 \\\n        if (zvec - gBase[zn] < 0 || zvec - gBase[zn] >= BZ_MAX_ALPHA_SIZE) \\\n            RETURN(BZ_DATA_ERROR);                                         \\\n        lval = gPerm[zvec - gBase[zn]];                                    \\\n    }\n\n/*---------------------------------------------------*/\nInt32 BZ2_decompress(DState* s) {\n    UChar uc;\n    Int32 retVal;\n    Int32 minLen, maxLen;\n    bz_stream* strm = s->strm;\n\n    /* stuff that needs to be saved/restored */\n    Int32 i;\n    Int32 j;\n    Int32 t;\n    Int32 alphaSize;\n    Int32 nGroups;\n    Int32 nSelectors;\n    Int32 EOB;\n    Int32 groupNo;\n    Int32 groupPos;\n    Int32 nextSym;\n    Int32 nblockMAX;\n    Int32 nblock;\n    Int32 es;\n    Int32 N;\n    Int32 curr;\n    Int32 zt;\n    Int32 zn;\n    Int32 zvec;\n    Int32 zj;\n    Int32 gSel;\n    Int32 gMinlen;\n    Int32* gLimit;\n    Int32* gBase;\n    Int32* gPerm;\n\n    if (s->state == BZ_X_MAGIC_1) {\n        /*initialise the save area*/\n        s->save_i = 0;\n        s->save_j = 0;\n        s->save_t = 0;\n        s->save_alphaSize = 0;\n        s->save_nGroups = 0;\n        s->save_nSelectors = 0;\n        s->save_EOB = 0;\n        s->save_groupNo = 0;\n        s->save_groupPos = 0;\n        s->save_nextSym = 0;\n        s->save_nblockMAX = 0;\n        s->save_nblock = 0;\n        s->save_es = 0;\n        s->save_N = 0;\n        s->save_curr = 0;\n        s->save_zt = 0;\n        s->save_zn = 0;\n        s->save_zvec = 0;\n        s->save_zj = 0;\n        s->save_gSel = 0;\n        s->save_gMinlen = 0;\n        s->save_gLimit = nullptr;\n        s->save_gBase = nullptr;\n        s->save_gPerm = nullptr;\n    }\n\n    /*restore from the save area*/\n    i = s->save_i;\n    j = s->save_j;\n    t = s->save_t;\n    alphaSize = s->save_alphaSize;\n    nGroups = s->save_nGroups;\n    nSelectors = s->save_nSelectors;\n    EOB = s->save_EOB;\n    groupNo = s->save_groupNo;\n    groupPos = s->save_groupPos;\n    nextSym = s->save_nextSym;\n    nblockMAX = s->save_nblockMAX;\n    nblock = s->save_nblock;\n    es = s->save_es;\n    N = s->save_N;\n    curr = s->save_curr;\n    zt = s->save_zt;\n    zn = s->save_zn;\n    zvec = s->save_zvec;\n    zj = s->save_zj;\n    gSel = s->save_gSel;\n    gMinlen = s->save_gMinlen;\n    gLimit = s->save_gLimit;\n    gBase = s->save_gBase;\n    gPerm = s->save_gPerm;\n\n    retVal = BZ_OK;\n\n    switch (s->state) {\n        GET_UCHAR(BZ_X_MAGIC_1, uc);\n        if (uc != BZ_HDR_B)\n            RETURN(BZ_DATA_ERROR_MAGIC);\n\n        GET_UCHAR(BZ_X_MAGIC_2, uc);\n        if (uc != BZ_HDR_Z)\n            RETURN(BZ_DATA_ERROR_MAGIC);\n\n        GET_UCHAR(BZ_X_MAGIC_3, uc)\n        if (uc != BZ_HDR_h)\n            RETURN(BZ_DATA_ERROR_MAGIC);\n\n        GET_BITS(BZ_X_MAGIC_4, s->blockSize100k, 8)\n        if (s->blockSize100k < (BZ_HDR_0 + 1) || s->blockSize100k > (BZ_HDR_0 + 9))\n            RETURN(BZ_DATA_ERROR_MAGIC);\n        s->blockSize100k -= BZ_HDR_0;\n\n        if (s->smallDecompress) {\n            s->ll16 = (UInt16*)BZALLOC(s->blockSize100k * 100000 * sizeof(UInt16));\n            s->ll4 = (UChar*)BZALLOC(((1 + s->blockSize100k * 100000) >> 1) * sizeof(UChar));\n            if (s->ll16 == nullptr || s->ll4 == nullptr)\n                RETURN(BZ_MEM_ERROR);\n        }\n        else {\n            s->tt = (UInt32*)BZALLOC(s->blockSize100k * 100000 * sizeof(Int32));\n            if (s->tt == nullptr)\n                RETURN(BZ_MEM_ERROR);\n        }\n\n        GET_UCHAR(BZ_X_BLKHDR_1, uc);\n\n        if (uc == 0x17)\n            goto endhdr_2;\n        if (uc != 0x31)\n            RETURN(BZ_DATA_ERROR);\n        GET_UCHAR(BZ_X_BLKHDR_2, uc);\n        if (uc != 0x41)\n            RETURN(BZ_DATA_ERROR);\n        GET_UCHAR(BZ_X_BLKHDR_3, uc);\n        if (uc != 0x59)\n            RETURN(BZ_DATA_ERROR);\n        GET_UCHAR(BZ_X_BLKHDR_4, uc);\n        if (uc != 0x26)\n            RETURN(BZ_DATA_ERROR);\n        GET_UCHAR(BZ_X_BLKHDR_5, uc);\n        if (uc != 0x53)\n            RETURN(BZ_DATA_ERROR);\n        GET_UCHAR(BZ_X_BLKHDR_6, uc);\n        if (uc != 0x59)\n            RETURN(BZ_DATA_ERROR);\n\n        s->currBlockNo++;\n        if (s->verbosity >= 2)\n            VPrintf1(\"\\n    [%d: huff+mtf \", s->currBlockNo);\n\n        s->storedBlockCRC = 0;\n        GET_UCHAR(BZ_X_BCRC_1, uc);\n        s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc);\n        GET_UCHAR(BZ_X_BCRC_2, uc);\n        s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc);\n        GET_UCHAR(BZ_X_BCRC_3, uc);\n        s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc);\n        GET_UCHAR(BZ_X_BCRC_4, uc);\n        s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc);\n\n        GET_BITS(BZ_X_RANDBIT, s->blockRandomised, 1);\n\n        s->origPtr = 0;\n        GET_UCHAR(BZ_X_ORIGPTR_1, uc);\n        s->origPtr = (s->origPtr << 8) | ((Int32)uc);\n        GET_UCHAR(BZ_X_ORIGPTR_2, uc);\n        s->origPtr = (s->origPtr << 8) | ((Int32)uc);\n        GET_UCHAR(BZ_X_ORIGPTR_3, uc);\n        s->origPtr = (s->origPtr << 8) | ((Int32)uc);\n\n        if (s->origPtr < 0)\n            RETURN(BZ_DATA_ERROR);\n        if (s->origPtr > 10 + 100000 * s->blockSize100k)\n            RETURN(BZ_DATA_ERROR);\n\n        /*--- Receive the mapping table ---*/\n        for (i = 0; i < 16; i++) {\n            GET_BIT(BZ_X_MAPPING_1, uc);\n            if (uc == 1)\n                s->inUse16[i] = True;\n            else\n                s->inUse16[i] = False;\n        }\n\n        for (i = 0; i < 256; i++)\n            s->inUse[i] = False;\n\n        for (i = 0; i < 16; i++)\n            if (s->inUse16[i])\n                for (j = 0; j < 16; j++) {\n                    GET_BIT(BZ_X_MAPPING_2, uc);\n                    if (uc == 1)\n                        s->inUse[i * 16 + j] = True;\n                }\n        makeMaps_d(s);\n        if (s->nInUse == 0)\n            RETURN(BZ_DATA_ERROR);\n        alphaSize = s->nInUse + 2;\n\n        /*--- Now the selectors ---*/\n        GET_BITS(BZ_X_SELECTOR_1, nGroups, 3);\n        if (nGroups < 2 || nGroups > 6)\n            RETURN(BZ_DATA_ERROR);\n        GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15);\n        if (nSelectors < 1)\n            RETURN(BZ_DATA_ERROR);\n        for (i = 0; i < nSelectors; i++) {\n            j = 0;\n            while (True) {\n                GET_BIT(BZ_X_SELECTOR_3, uc);\n                if (uc == 0)\n                    break;\n                j++;\n                if (j >= nGroups)\n                    RETURN(BZ_DATA_ERROR);\n            }\n            s->selectorMtf[i] = j;\n        }\n\n        /*--- Undo the MTF values for the selectors. ---*/\n        {\n            UChar pos[BZ_N_GROUPS], tmp, v;\n            for (i = 0; i < nGroups; i++)\n                pos[i] = i;\n\n            for (i = 0; i < nSelectors; i++) {\n                v = s->selectorMtf[i];\n                tmp = pos[v];\n                while (v > 0) {\n                    pos[v] = pos[v - 1];\n                    v--;\n                }\n                pos[0] = tmp;\n                s->selector[i] = tmp;\n            }\n        }\n\n        /*--- Now the coding tables ---*/\n        for (j = 0; j < nGroups; j++) {\n            GET_BITS(BZ_X_CODING_1, curr, 5);\n            for (i = 0; i < alphaSize; i++) {\n                while (True) {\n                    if (curr < 1 || curr > 20)\n                        RETURN(BZ_DATA_ERROR);\n                    GET_BIT(BZ_X_CODING_2, uc);\n                    if (uc == 0)\n                        break;\n                    GET_BIT(BZ_X_CODING_3, uc);\n                    if (uc == 0)\n                        curr++;\n                    else\n                        curr--;\n                }\n                s->len[j][i] = curr;\n            }\n        }\n\n        /*--- Create the Huffman decoding tables ---*/\n        for (j = 0; j < nGroups; j++) {\n            minLen = 32;\n            maxLen = 0;\n            for (i = 0; i < alphaSize; i++) {\n                if (s->len[j][i] > maxLen)\n                    maxLen = s->len[j][i];\n                if (s->len[j][i] < minLen)\n                    minLen = s->len[j][i];\n            }\n            BZ2_hbCreateDecodeTables(&(s->limit[j][0]),\n                                     &(s->base[j][0]),\n                                     &(s->perm[j][0]),\n                                     &(s->len[j][0]),\n                                     minLen,\n                                     maxLen,\n                                     alphaSize);\n            s->minLens[j] = minLen;\n        }\n\n        /*--- Now the MTF values ---*/\n\n        EOB = s->nInUse + 1;\n        nblockMAX = 100000 * s->blockSize100k;\n        groupNo = -1;\n        groupPos = 0;\n\n        for (i = 0; i <= 255; i++)\n            s->unzftab[i] = 0;\n\n        /*-- MTF init --*/\n        {\n            Int32 l, j, k;\n            k = MTFA_SIZE - 1;\n            for (l = 256 / MTFL_SIZE - 1; l >= 0; l--) {\n                for (j = MTFL_SIZE - 1; j >= 0; j--) {\n                    s->mtfa[k] = (UChar)(l * MTFL_SIZE + j);\n                    k--;\n                }\n                s->mtfbase[l] = k + 1;\n            }\n        }\n        /*-- end MTF init --*/\n\n        nblock = 0;\n        GET_MTF_VAL(BZ_X_MTF_1, BZ_X_MTF_2, nextSym);\n\n        while (True) {\n            if (nextSym == EOB)\n                break;\n\n            if (nextSym == BZ_RUNA || nextSym == BZ_RUNB) {\n                es = -1;\n                N = 1;\n                do {\n                    /* Check that N doesn't get too big, so that es doesn't\n                  go negative.  The maximum value that can be\n                  RUNA/RUNB encoded is equal to the block size (post\n                  the initial RLE), viz, 900k, so bounding N at 2\n                  million should guard against overflow without\n                  rejecting any legitimate inputs. */\n                    if (N >= 2 * 1024 * 1024)\n                        RETURN(BZ_DATA_ERROR);\n                    if (nextSym == BZ_RUNA)\n                        es = es + (0 + 1) * N;\n                    else if (nextSym == BZ_RUNB)\n                        es = es + (1 + 1) * N;\n                    N = N * 2;\n                    GET_MTF_VAL(BZ_X_MTF_3, BZ_X_MTF_4, nextSym);\n                } while (nextSym == BZ_RUNA || nextSym == BZ_RUNB);\n\n                es++;\n                uc = s->seqToUnseq[s->mtfa[s->mtfbase[0]]];\n                s->unzftab[uc] += es;\n\n                if (s->smallDecompress)\n                    while (es > 0) {\n                        if (nblock >= nblockMAX)\n                            RETURN(BZ_DATA_ERROR);\n                        s->ll16[nblock] = (UInt16)uc;\n                        nblock++;\n                        es--;\n                    }\n                else\n                    while (es > 0) {\n                        if (nblock >= nblockMAX)\n                            RETURN(BZ_DATA_ERROR);\n                        s->tt[nblock] = (UInt32)uc;\n                        nblock++;\n                        es--;\n                    };\n\n                continue;\n            }\n            else {\n                if (nblock >= nblockMAX)\n                    RETURN(BZ_DATA_ERROR);\n\n                /*-- uc = MTF ( nextSym-1 ) --*/\n                {\n                    Int32 i, j, k, l, lno, off;\n                    UInt32 nn;\n                    nn = (UInt32)(nextSym - 1);\n\n                    if (nn < MTFL_SIZE) {\n                        /* avoid general-case expense */\n                        l = s->mtfbase[0];\n                        uc = s->mtfa[l + nn];\n                        while (nn > 3) {\n                            Int32 z = l + nn;\n                            s->mtfa[(z)] = s->mtfa[(z)-1];\n                            s->mtfa[(z)-1] = s->mtfa[(z)-2];\n                            s->mtfa[(z)-2] = s->mtfa[(z)-3];\n                            s->mtfa[(z)-3] = s->mtfa[(z)-4];\n                            nn -= 4;\n                        }\n                        while (nn > 0) {\n                            s->mtfa[(l + nn)] = s->mtfa[(l + nn) - 1];\n                            nn--;\n                        };\n                        s->mtfa[l] = uc;\n                    }\n                    else {\n                        /* general case */\n                        lno = nn / MTFL_SIZE;\n                        off = nn % MTFL_SIZE;\n                        l = s->mtfbase[lno] + off;\n                        uc = s->mtfa[l];\n                        while (l > s->mtfbase[lno]) {\n                            s->mtfa[l] = s->mtfa[l - 1];\n                            l--;\n                        };\n                        s->mtfbase[lno]++;\n                        while (lno > 0) {\n                            s->mtfbase[lno]--;\n                            s->mtfa[s->mtfbase[lno]] = s->mtfa[s->mtfbase[lno - 1] + MTFL_SIZE - 1];\n                            lno--;\n                        }\n                        s->mtfbase[0]--;\n                        s->mtfa[s->mtfbase[0]] = uc;\n                        if (s->mtfbase[0] == 0) {\n                            k = MTFA_SIZE - 1;\n                            for (i = 256 / MTFL_SIZE - 1; i >= 0; i--) {\n                                for (j = MTFL_SIZE - 1; j >= 0; j--) {\n                                    s->mtfa[k] = s->mtfa[s->mtfbase[i] + j];\n                                    k--;\n                                }\n                                s->mtfbase[i] = k + 1;\n                            }\n                        }\n                    }\n                }\n                /*-- end uc = MTF ( nextSym-1 ) --*/\n\n                s->unzftab[s->seqToUnseq[uc]]++;\n                if (s->smallDecompress)\n                    s->ll16[nblock] = (UInt16)(s->seqToUnseq[uc]);\n                else\n                    s->tt[nblock] = (UInt32)(s->seqToUnseq[uc]);\n                nblock++;\n\n                GET_MTF_VAL(BZ_X_MTF_5, BZ_X_MTF_6, nextSym);\n                continue;\n            }\n        }\n\n        /* Now we know what nblock is, we can do a better sanity\n         check on s->origPtr.\n      */\n        if (s->origPtr < 0 || s->origPtr >= nblock)\n            RETURN(BZ_DATA_ERROR);\n\n        /*-- Set up cftab to facilitate generation of T^(-1) --*/\n        /* Check: unzftab entries in range. */\n        for (i = 0; i <= 255; i++) {\n            if (s->unzftab[i] < 0 || s->unzftab[i] > nblock)\n                RETURN(BZ_DATA_ERROR);\n        }\n        /* Actually generate cftab. */\n        s->cftab[0] = 0;\n        for (i = 1; i <= 256; i++)\n            s->cftab[i] = s->unzftab[i - 1];\n        for (i = 1; i <= 256; i++)\n            s->cftab[i] += s->cftab[i - 1];\n        /* Check: cftab entries in range. */\n        for (i = 0; i <= 256; i++) {\n            if (s->cftab[i] < 0 || s->cftab[i] > nblock) {\n                /* s->cftab[i] can legitimately be == nblock */\n                RETURN(BZ_DATA_ERROR);\n            }\n        }\n        /* Check: cftab entries non-descending. */\n        for (i = 1; i <= 256; i++) {\n            if (s->cftab[i - 1] > s->cftab[i]) {\n                RETURN(BZ_DATA_ERROR);\n            }\n        }\n\n        s->state_out_len = 0;\n        s->state_out_ch = 0;\n        BZ_INITIALISE_CRC(s->calculatedBlockCRC);\n        s->state = BZ_X_OUTPUT;\n        if (s->verbosity >= 2)\n            VPrintf0(\"rt+rld\");\n\n        if (s->smallDecompress) {\n            /*-- Make a copy of cftab, used in generation of T --*/\n            for (i = 0; i <= 256; i++)\n                s->cftabCopy[i] = s->cftab[i];\n\n            /*-- compute the T vector --*/\n            for (i = 0; i < nblock; i++) {\n                uc = (UChar)(s->ll16[i]);\n                SET_LL(i, s->cftabCopy[uc]);\n                s->cftabCopy[uc]++;\n            }\n\n            /*-- Compute T^(-1) by pointer reversal on T --*/\n            i = s->origPtr;\n            j = GET_LL(i);\n            do {\n                Int32 tmp = GET_LL(j);\n                SET_LL(j, i);\n                i = j;\n                j = tmp;\n            } while (i != s->origPtr);\n\n            s->tPos = s->origPtr;\n            s->nblock_used = 0;\n            if (s->blockRandomised) {\n                BZ_RAND_INIT_MASK;\n                BZ_GET_SMALL(s->k0);\n                s->nblock_used++;\n                BZ_RAND_UPD_MASK;\n                s->k0 ^= BZ_RAND_MASK;\n            }\n            else {\n                BZ_GET_SMALL(s->k0);\n                s->nblock_used++;\n            }\n        }\n        else {\n            /*-- compute the T^(-1) vector --*/\n            for (i = 0; i < nblock; i++) {\n                uc = (UChar)(s->tt[i] & 0xff);\n                s->tt[s->cftab[uc]] |= (i << 8);\n                s->cftab[uc]++;\n            }\n\n            s->tPos = s->tt[s->origPtr] >> 8;\n            s->nblock_used = 0;\n            if (s->blockRandomised) {\n                BZ_RAND_INIT_MASK;\n                BZ_GET_FAST(s->k0);\n                s->nblock_used++;\n                BZ_RAND_UPD_MASK;\n                s->k0 ^= BZ_RAND_MASK;\n            }\n            else {\n                BZ_GET_FAST(s->k0);\n                s->nblock_used++;\n            }\n        }\n\n        RETURN(BZ_OK);\n\n    endhdr_2:\n\n        GET_UCHAR(BZ_X_ENDHDR_2, uc);\n        if (uc != 0x72)\n            RETURN(BZ_DATA_ERROR);\n        GET_UCHAR(BZ_X_ENDHDR_3, uc);\n        if (uc != 0x45)\n            RETURN(BZ_DATA_ERROR);\n        GET_UCHAR(BZ_X_ENDHDR_4, uc);\n        if (uc != 0x38)\n            RETURN(BZ_DATA_ERROR);\n        GET_UCHAR(BZ_X_ENDHDR_5, uc);\n        if (uc != 0x50)\n            RETURN(BZ_DATA_ERROR);\n        GET_UCHAR(BZ_X_ENDHDR_6, uc);\n        if (uc != 0x90)\n            RETURN(BZ_DATA_ERROR);\n\n        s->storedCombinedCRC = 0;\n        GET_UCHAR(BZ_X_CCRC_1, uc);\n        s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc);\n        GET_UCHAR(BZ_X_CCRC_2, uc);\n        s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc);\n        GET_UCHAR(BZ_X_CCRC_3, uc);\n        s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc);\n        GET_UCHAR(BZ_X_CCRC_4, uc);\n        s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc);\n\n        s->state = BZ_X_IDLE;\n        RETURN(BZ_STREAM_END);\n\n        default: AssertH(False, 4001);\n    }\n\n    AssertH(False, 4002);\n\nsave_state_and_return:\n\n    s->save_i = i;\n    s->save_j = j;\n    s->save_t = t;\n    s->save_alphaSize = alphaSize;\n    s->save_nGroups = nGroups;\n    s->save_nSelectors = nSelectors;\n    s->save_EOB = EOB;\n    s->save_groupNo = groupNo;\n    s->save_groupPos = groupPos;\n    s->save_nextSym = nextSym;\n    s->save_nblockMAX = nblockMAX;\n    s->save_nblock = nblock;\n    s->save_es = es;\n    s->save_N = N;\n    s->save_curr = curr;\n    s->save_zt = zt;\n    s->save_zn = zn;\n    s->save_zvec = zvec;\n    s->save_zj = zj;\n    s->save_gSel = gSel;\n    s->save_gMinlen = gMinlen;\n    s->save_gLimit = gLimit;\n    s->save_gBase = gBase;\n    s->save_gPerm = gPerm;\n\n    return retVal;\n}\n\n/*-------------------------------------------------------------*/\n/*--- end                                      decompress.c ---*/\n/*-------------------------------------------------------------*/\n"
  },
  {
    "path": "third-party/tbb/examples/graph/fgbzip2/fgbzip2.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <iostream>\n#include <fstream>\n#include <string>\n#include <memory>\n#include <queue>\n#include <thread>\n\n#include \"bzlib.hpp\"\n\n#include \"common/utility/utility.hpp\"\n\n#include \"oneapi/tbb/flow_graph.h\"\n#include \"oneapi/tbb/tick_count.h\"\n#include \"oneapi/tbb/concurrent_queue.h\"\n\n// TODO: change memory allocation/deallocation to be managed in constructor/destructor\nstruct Buffer {\n    std::size_t len;\n    char* b;\n};\n\nstruct BufferMsg {\n    BufferMsg() {}\n    BufferMsg(Buffer& inputBuffer, Buffer& outputBuffer, std::size_t seqId, bool isLast = false)\n            : inputBuffer(inputBuffer),\n              outputBuffer(outputBuffer),\n              seqId(seqId),\n              isLast(isLast) {}\n\n    static BufferMsg createBufferMsg(std::size_t seqId, std::size_t chunkSize) {\n        Buffer inputBuffer;\n        inputBuffer.b = new char[chunkSize];\n        inputBuffer.len = chunkSize;\n\n        Buffer outputBuffer;\n        std::size_t compressedChunkSize = chunkSize * 1.01 + 600; // compression overhead\n        outputBuffer.b = new char[compressedChunkSize];\n        outputBuffer.len = compressedChunkSize;\n\n        return BufferMsg(inputBuffer, outputBuffer, seqId);\n    }\n\n    static void destroyBufferMsg(const BufferMsg& destroyMsg) {\n        delete[] destroyMsg.inputBuffer.b;\n        delete[] destroyMsg.outputBuffer.b;\n    }\n\n    void markLast(std::size_t lastId) {\n        isLast = true;\n        seqId = lastId;\n    }\n\n    std::size_t seqId;\n    Buffer inputBuffer;\n    Buffer outputBuffer;\n    bool isLast;\n};\n\nclass BufferCompressor {\npublic:\n    BufferCompressor(int blockSizeIn100KB) : m_blockSize(blockSizeIn100KB) {}\n\n    BufferMsg operator()(BufferMsg buffer) const {\n        if (!buffer.isLast) {\n            unsigned int outSize = buffer.outputBuffer.len;\n            BZ2_bzBuffToBuffCompress(buffer.outputBuffer.b,\n                                     &outSize,\n                                     buffer.inputBuffer.b,\n                                     buffer.inputBuffer.len,\n                                     m_blockSize,\n                                     0,\n                                     30);\n            buffer.outputBuffer.len = outSize;\n        }\n        return buffer;\n    }\n\nprivate:\n    int m_blockSize;\n};\n\nclass IOOperations {\npublic:\n    IOOperations(std::ifstream& inputStream, std::ofstream& outputStream, std::size_t chunkSize)\n            : m_inputStream(inputStream),\n              m_outputStream(outputStream),\n              m_chunkSize(chunkSize),\n              m_chunksRead(0) {}\n\n    void readChunk(Buffer& buffer) {\n        m_inputStream.read(buffer.b, m_chunkSize);\n        buffer.len = static_cast<std::size_t>(m_inputStream.gcount());\n        m_chunksRead++;\n    }\n\n    void writeChunk(const Buffer& buffer) {\n        m_outputStream.write(buffer.b, buffer.len);\n    }\n\n    std::size_t chunksRead() const {\n        return m_chunksRead;\n    }\n\n    std::size_t chunkSize() const {\n        return m_chunkSize;\n    }\n\n    bool hasDataToRead() const {\n        return m_inputStream.is_open() && !m_inputStream.eof();\n    }\n\nprivate:\n    std::ifstream& m_inputStream;\n    std::ofstream& m_outputStream;\n\n    std::size_t m_chunkSize;\n    std::size_t m_chunksRead;\n};\n\n//-----------------------------------------------------------------------------------------------------------------------\n//---------------------------------------Compression example based on async_node-----------------------------------------\n//-----------------------------------------------------------------------------------------------------------------------\n\ntypedef oneapi::tbb::flow::async_node<oneapi::tbb::flow::continue_msg, BufferMsg>\n    async_file_reader_node;\ntypedef oneapi::tbb::flow::async_node<BufferMsg, oneapi::tbb::flow::continue_msg>\n    async_file_writer_node;\n\nclass AsyncNodeActivity {\npublic:\n    AsyncNodeActivity(IOOperations& io)\n            : m_io(io),\n              m_fileWriterThread(&AsyncNodeActivity::writingLoop, this) {}\n\n    ~AsyncNodeActivity() {\n        m_fileReaderThread.join();\n        m_fileWriterThread.join();\n    }\n\n    void submitRead(async_file_reader_node::gateway_type& gateway) {\n        gateway.reserve_wait();\n        std::thread(&AsyncNodeActivity::readingLoop, this, std::ref(gateway))\n            .swap(m_fileReaderThread);\n    }\n\n    void submitWrite(const BufferMsg& bufferMsg) {\n        m_writeQueue.push(bufferMsg);\n    }\n\nprivate:\n    void readingLoop(async_file_reader_node::gateway_type& gateway) {\n        while (m_io.hasDataToRead()) {\n            BufferMsg bufferMsg = BufferMsg::createBufferMsg(m_io.chunksRead(), m_io.chunkSize());\n            m_io.readChunk(bufferMsg.inputBuffer);\n            gateway.try_put(bufferMsg);\n        }\n        sendLastMessage(gateway);\n        gateway.release_wait();\n    }\n\n    void writingLoop() {\n        BufferMsg buffer;\n        m_writeQueue.pop(buffer);\n        while (!buffer.isLast) {\n            m_io.writeChunk(buffer.outputBuffer);\n            m_writeQueue.pop(buffer);\n        }\n    }\n\n    void sendLastMessage(async_file_reader_node::gateway_type& gateway) {\n        BufferMsg lastMsg;\n        lastMsg.markLast(m_io.chunksRead());\n        gateway.try_put(lastMsg);\n    }\n\n    IOOperations& m_io;\n\n    oneapi::tbb::concurrent_bounded_queue<BufferMsg> m_writeQueue;\n\n    std::thread m_fileReaderThread;\n    std::thread m_fileWriterThread;\n};\n\nvoid fgCompressionAsyncNode(IOOperations& io, int blockSizeIn100KB) {\n    oneapi::tbb::flow::graph g;\n\n    AsyncNodeActivity asyncNodeActivity(io);\n\n    async_file_reader_node file_reader(\n        g,\n        oneapi::tbb::flow::unlimited,\n        [&asyncNodeActivity](const oneapi::tbb::flow::continue_msg& msg,\n                             async_file_reader_node::gateway_type& gateway) {\n            asyncNodeActivity.submitRead(gateway);\n        });\n\n    oneapi::tbb::flow::function_node<BufferMsg, BufferMsg> compressor(\n        g, oneapi::tbb::flow::unlimited, BufferCompressor(blockSizeIn100KB));\n\n    oneapi::tbb::flow::sequencer_node<BufferMsg> ordering(g,\n                                                          [](const BufferMsg& bufferMsg) -> size_t {\n                                                              return bufferMsg.seqId;\n                                                          });\n\n    // The node is serial to preserve the right order of buffers set by the preceding sequencer_node\n    async_file_writer_node output_writer(\n        g,\n        oneapi::tbb::flow::serial,\n        [&asyncNodeActivity](const BufferMsg& bufferMsg,\n                             async_file_writer_node::gateway_type& gateway) {\n            asyncNodeActivity.submitWrite(bufferMsg);\n        });\n\n    make_edge(file_reader, compressor);\n    make_edge(compressor, ordering);\n    make_edge(ordering, output_writer);\n\n    file_reader.try_put(oneapi::tbb::flow::continue_msg());\n\n    g.wait_for_all();\n}\n\n//-----------------------------------------------------------------------------------------------------------------------\n//---------------------------------------------Simple compression example------------------------------------------------\n//-----------------------------------------------------------------------------------------------------------------------\n\nvoid fgCompression(IOOperations& io, int blockSizeIn100KB) {\n    oneapi::tbb::flow::graph g;\n\n    oneapi::tbb::flow::input_node<BufferMsg> file_reader(\n        g, [&io](oneapi::tbb::flow_control& fc) -> BufferMsg {\n            if (io.hasDataToRead()) {\n                BufferMsg bufferMsg = BufferMsg::createBufferMsg(io.chunksRead(), io.chunkSize());\n                io.readChunk(bufferMsg.inputBuffer);\n                return bufferMsg;\n            }\n            fc.stop();\n            return BufferMsg{};\n        });\n    file_reader.activate();\n\n    oneapi::tbb::flow::function_node<BufferMsg, BufferMsg> compressor(\n        g, oneapi::tbb::flow::unlimited, BufferCompressor(blockSizeIn100KB));\n\n    oneapi::tbb::flow::sequencer_node<BufferMsg> ordering(g, [](const BufferMsg& buffer) -> size_t {\n        return buffer.seqId;\n    });\n\n    oneapi::tbb::flow::function_node<BufferMsg> output_writer(\n        g, oneapi::tbb::flow::serial, [&io](const BufferMsg& bufferMsg) {\n            io.writeChunk(bufferMsg.outputBuffer);\n            BufferMsg::destroyBufferMsg(bufferMsg);\n        });\n\n    make_edge(file_reader, compressor);\n    make_edge(compressor, ordering);\n    make_edge(ordering, output_writer);\n\n    g.wait_for_all();\n}\n\n//-----------------------------------------------------------------------------------------------------------------------\n\nbool endsWith(const std::string& str, const std::string& suffix) {\n    return str.find(suffix, str.length() - suffix.length()) != std::string::npos;\n}\n\n//-----------------------------------------------------------------------------------------------------------------------\n\nint main(int argc, char* argv[]) {\n    oneapi::tbb::tick_count mainStartTime = oneapi::tbb::tick_count::now();\n\n    const std::string archiveExtension = \".bz2\";\n    bool verbose = false;\n    bool asyncType;\n    std::string inputFileName;\n    int blockSizeIn100KB = 1; // block size in 100KB chunks\n    std::size_t memoryLimitIn1MB = 1; // memory limit for compression in megabytes granularity\n\n    utility::parse_cli_arguments(\n        argc,\n        argv,\n        utility::cli_argument_pack()\n            //\"-h\" option for displaying help is present implicitly\n            .arg(blockSizeIn100KB, \"-b\", \"\\t block size in 100KB chunks, [1 .. 9]\")\n            .arg(verbose, \"-v\", \"verbose mode\")\n            .arg(memoryLimitIn1MB,\n                 \"-l\",\n                 \"used memory limit for compression algorithm in 1MB (minimum) granularity\")\n            .arg(asyncType, \"-async\", \"use graph async_node-based implementation\")\n            .positional_arg(inputFileName, \"filename\", \"input file name\"));\n\n    if (inputFileName.empty()) {\n        throw std::invalid_argument(\n            \"Input file name is not specified. Try 'fgbzip2 -h' for more information.\");\n    }\n\n    if (blockSizeIn100KB < 1 || blockSizeIn100KB > 9) {\n        throw std::invalid_argument(\"Incorrect block size. Try 'fgbzip2 -h' for more information.\");\n    }\n\n    if (memoryLimitIn1MB < 1) {\n        throw std::invalid_argument(\n            \"Incorrect memory limit size. Try 'fgbzip2 -h' for more information.\");\n    }\n\n    if (verbose)\n        std::cout << \"Input file name: \" << inputFileName << \"\\n\";\n    if (endsWith(inputFileName, archiveExtension)) {\n        throw std::invalid_argument(\"Input file already have \" + archiveExtension + \" extension.\");\n    }\n\n    std::ifstream inputStream(inputFileName.c_str(), std::ios::in | std::ios::binary);\n    if (!inputStream.is_open()) {\n        throw std::invalid_argument(\"Cannot open \" + inputFileName + \" file.\");\n    }\n\n    std::string outputFileName(inputFileName + archiveExtension);\n\n    std::ofstream outputStream(outputFileName.c_str(),\n                               std::ios::out | std::ios::binary | std::ios::trunc);\n    if (!outputStream.is_open()) {\n        throw std::invalid_argument(\"Cannot open \" + outputFileName + \" file.\");\n    }\n\n    // General interface to work with I/O buffers operations\n    std::size_t chunkSize = blockSizeIn100KB * 100 * 1024;\n    IOOperations io(inputStream, outputStream, chunkSize);\n\n    if (asyncType) {\n        if (verbose)\n            std::cout\n                << \"Running flow graph based compression algorithm with async_node based asynchronous IO operations.\"\n                << \"\\n\";\n        fgCompressionAsyncNode(io, blockSizeIn100KB);\n    }\n    else {\n        if (verbose)\n            std::cout << \"Running flow graph based compression algorithm.\"\n                      << \"\\n\";\n        fgCompression(io, blockSizeIn100KB);\n    }\n\n    inputStream.close();\n    outputStream.close();\n\n    utility::report_elapsed_time((oneapi::tbb::tick_count::now() - mainStartTime).seconds());\n\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/graph/fgbzip2/huffman.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*-------------------------------------------------------------*/\n/*--- Huffman coding low-level stuff                        ---*/\n/*---                                           huffman.cpp ---*/\n/*-------------------------------------------------------------*/\n\n/* ------------------------------------------------------------------\n   The original source for this example:\n   This file is part of bzip2/libbzip2, a program and library for\n   lossless, block-sorting data compression.\n\n   bzip2/libbzip2 version 1.0.6 of 6 September 2010\n   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>\n\n   This program, \"bzip2\", the associated library \"libbzip2\", and all\n   documentation, are copyright (C) 1996-2010 Julian R Seward.  All\n   rights reserved.\n\n   Redistribution and use in source and binary forms, with or without\n   modification, are permitted provided that the following conditions\n   are met:\n\n   1. Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   2. The origin of this software must not be misrepresented; you must \n   not claim that you wrote the original software.  If you use this \n   software in a product, an acknowledgment in the product \n   documentation would be appreciated but is not required.\n\n   3. Altered source versions must be plainly marked as such, and must\n   not be misrepresented as being the original software.\n\n   4. The name of the author may not be used to endorse or promote \n   products derived from this software without specific prior written \n   permission.\n\n   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n   OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n   ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n   Julian Seward, jseward@bzip.org\n   bzip2/libbzip2 version 1.0.6 of 6 September 2010\n   ------------------------------------------------------------------ */\n\n#include \"bzlib_private.hpp\"\n\n/*---------------------------------------------------*/\n#define WEIGHTOF(zz0)   ((zz0)&0xffffff00)\n#define DEPTHOF(zz1)    ((zz1)&0x000000ff)\n#define MYMAX(zz2, zz3) ((zz2) > (zz3) ? (zz2) : (zz3))\n\n#define ADDWEIGHTS(zw1, zw2) \\\n    (WEIGHTOF(zw1) + WEIGHTOF(zw2)) | (1 + MYMAX(DEPTHOF(zw1), DEPTHOF(zw2)))\n\n#define UPHEAP(z)                                     \\\n    {                                                 \\\n        Int32 zz, tmp;                                \\\n        zz = z;                                       \\\n        tmp = heap[zz];                               \\\n        while (weight[tmp] < weight[heap[zz >> 1]]) { \\\n            heap[zz] = heap[zz >> 1];                 \\\n            zz >>= 1;                                 \\\n        }                                             \\\n        heap[zz] = tmp;                               \\\n    }\n\n#define DOWNHEAP(z)                                                    \\\n    {                                                                  \\\n        Int32 zz, yy, tmp;                                             \\\n        zz = z;                                                        \\\n        tmp = heap[zz];                                                \\\n        while (True) {                                                 \\\n            yy = zz << 1;                                              \\\n            if (yy > nHeap)                                            \\\n                break;                                                 \\\n            if (yy < nHeap && weight[heap[yy + 1]] < weight[heap[yy]]) \\\n                yy++;                                                  \\\n            if (weight[tmp] < weight[heap[yy]])                        \\\n                break;                                                 \\\n            heap[zz] = heap[yy];                                       \\\n            zz = yy;                                                   \\\n        }                                                              \\\n        heap[zz] = tmp;                                                \\\n    }\n\n/*---------------------------------------------------*/\nvoid BZ2_hbMakeCodeLengths(UChar *len, Int32 *freq, Int32 alphaSize, Int32 maxLen) {\n    /*--\n      Nodes and heap entries run from 1.  Entry 0\n      for both the heap and nodes is a sentinel.\n   --*/\n    Int32 nNodes, nHeap, n1, n2, i, j, k;\n    Bool tooLong;\n\n    Int32 heap[BZ_MAX_ALPHA_SIZE + 2];\n    Int32 weight[BZ_MAX_ALPHA_SIZE * 2];\n    Int32 parent[BZ_MAX_ALPHA_SIZE * 2];\n\n    for (i = 0; i < alphaSize; i++)\n        weight[i + 1] = (freq[i] == 0 ? 1 : freq[i]) << 8;\n\n    while (True) {\n        nNodes = alphaSize;\n        nHeap = 0;\n\n        heap[0] = 0;\n        weight[0] = 0;\n        parent[0] = -2;\n\n        for (i = 1; i <= alphaSize; i++) {\n            parent[i] = -1;\n            nHeap++;\n            heap[nHeap] = i;\n            UPHEAP(nHeap);\n        }\n\n        AssertH(nHeap < (BZ_MAX_ALPHA_SIZE + 2), 2001);\n\n        while (nHeap > 1) {\n            n1 = heap[1];\n            heap[1] = heap[nHeap];\n            nHeap--;\n            DOWNHEAP(1);\n            n2 = heap[1];\n            heap[1] = heap[nHeap];\n            nHeap--;\n            DOWNHEAP(1);\n            nNodes++;\n            parent[n1] = parent[n2] = nNodes;\n            weight[nNodes] = ADDWEIGHTS(weight[n1], weight[n2]);\n            parent[nNodes] = -1;\n            nHeap++;\n            heap[nHeap] = nNodes;\n            UPHEAP(nHeap);\n        }\n\n        AssertH(nNodes < (BZ_MAX_ALPHA_SIZE * 2), 2002);\n\n        tooLong = False;\n        for (i = 1; i <= alphaSize; i++) {\n            j = 0;\n            k = i;\n            while (parent[k] >= 0) {\n                k = parent[k];\n                j++;\n            }\n            len[i - 1] = j;\n            if (j > maxLen)\n                tooLong = True;\n        }\n\n        if (!tooLong)\n            break;\n\n        /* 17 Oct 04: keep-going condition for the following loop used\n         to be 'i < alphaSize', which missed the last element,\n         theoretically leading to the possibility of the compressor\n         looping.  However, this count-scaling step is only needed if\n         one of the generated Huffman code words is longer than\n         maxLen, which up to and including version 1.0.2 was 20 bits,\n         which is extremely unlikely.  In version 1.0.3 maxLen was\n         changed to 17 bits, which has minimal effect on compression\n         ratio, but does mean this scaling step is used from time to\n         time, enough to verify that it works.\n\n         This means that bzip2-1.0.3 and later will only produce\n         Huffman codes with a maximum length of 17 bits.  However, in\n         order to preserve backwards compatibility with bitstreams\n         produced by versions pre-1.0.3, the decompressor must still\n         handle lengths of up to 20. */\n\n        for (i = 1; i <= alphaSize; i++) {\n            j = weight[i] >> 8;\n            j = 1 + (j / 2);\n            weight[i] = j << 8;\n        }\n    }\n}\n\n/*---------------------------------------------------*/\nvoid BZ2_hbAssignCodes(Int32 *code, UChar *length, Int32 minLen, Int32 maxLen, Int32 alphaSize) {\n    Int32 j, vec, i;\n\n    vec = 0;\n    for (j = minLen; j <= maxLen; j++) {\n        for (i = 0; i < alphaSize; i++)\n            if (length[i] == j) {\n                code[i] = vec;\n                vec++;\n            };\n        vec <<= 1;\n    }\n}\n\n/*---------------------------------------------------*/\nvoid BZ2_hbCreateDecodeTables(Int32 *limit,\n                              Int32 *base,\n                              Int32 *perm,\n                              UChar *length,\n                              Int32 minLen,\n                              Int32 maxLen,\n                              Int32 alphaSize) {\n    Int32 pp, i, j, vec;\n\n    pp = 0;\n    for (i = minLen; i <= maxLen; i++)\n        for (j = 0; j < alphaSize; j++)\n            if (length[j] == i) {\n                perm[pp] = j;\n                pp++;\n            };\n\n    for (i = 0; i < BZ_MAX_CODE_LEN; i++)\n        base[i] = 0;\n    for (i = 0; i < alphaSize; i++)\n        base[length[i] + 1]++;\n\n    for (i = 1; i < BZ_MAX_CODE_LEN; i++)\n        base[i] += base[i - 1];\n\n    for (i = 0; i < BZ_MAX_CODE_LEN; i++)\n        limit[i] = 0;\n    vec = 0;\n\n    for (i = minLen; i <= maxLen; i++) {\n        vec += (base[i + 1] - base[i]);\n        limit[i] = vec - 1;\n        vec <<= 1;\n    }\n    for (i = minLen + 1; i <= maxLen; i++)\n        base[i] = ((limit[i - 1] + 1) << 1) - base[i];\n}\n\n/*-------------------------------------------------------------*/\n/*--- end                                         huffman.c ---*/\n/*-------------------------------------------------------------*/\n"
  },
  {
    "path": "third-party/tbb/examples/graph/fgbzip2/randtable.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*-------------------------------------------------------------*/\n/*--- Table for randomising repetitive blocks               ---*/\n/*---                                         randtable.cpp ---*/\n/*-------------------------------------------------------------*/\n\n/* ------------------------------------------------------------------\n   The original source for this example:\n   This file is part of bzip2/libbzip2, a program and library for\n   lossless, block-sorting data compression.\n\n   bzip2/libbzip2 version 1.0.6 of 6 September 2010\n   Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>\n\n   This program, \"bzip2\", the associated library \"libbzip2\", and all\n   documentation, are copyright (C) 1996-2010 Julian R Seward.  All\n   rights reserved.\n\n   Redistribution and use in source and binary forms, with or without\n   modification, are permitted provided that the following conditions\n   are met:\n\n   1. Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n   2. The origin of this software must not be misrepresented; you must \n   not claim that you wrote the original software.  If you use this \n   software in a product, an acknowledgment in the product \n   documentation would be appreciated but is not required.\n\n   3. Altered source versions must be plainly marked as such, and must\n   not be misrepresented as being the original software.\n\n   4. The name of the author may not be used to endorse or promote \n   products derived from this software without specific prior written \n   permission.\n\n   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n   OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n   ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n   Julian Seward, jseward@bzip.org\n   bzip2/libbzip2 version 1.0.6 of 6 September 2010\n   ------------------------------------------------------------------ */\n\n#include \"bzlib_private.hpp\"\n\n/*---------------------------------------------*/\nInt32 BZ2_rNums[512] = {\n    619, 720, 127, 481, 931, 816, 813, 233, 566, 247, 985, 724, 205, 454, 863, 491, 741, 242, 949,\n    214, 733, 859, 335, 708, 621, 574, 73,  654, 730, 472, 419, 436, 278, 496, 867, 210, 399, 680,\n    480, 51,  878, 465, 811, 169, 869, 675, 611, 697, 867, 561, 862, 687, 507, 283, 482, 129, 807,\n    591, 733, 623, 150, 238, 59,  379, 684, 877, 625, 169, 643, 105, 170, 607, 520, 932, 727, 476,\n    693, 425, 174, 647, 73,  122, 335, 530, 442, 853, 695, 249, 445, 515, 909, 545, 703, 919, 874,\n    474, 882, 500, 594, 612, 641, 801, 220, 162, 819, 984, 589, 513, 495, 799, 161, 604, 958, 533,\n    221, 400, 386, 867, 600, 782, 382, 596, 414, 171, 516, 375, 682, 485, 911, 276, 98,  553, 163,\n    354, 666, 933, 424, 341, 533, 870, 227, 730, 475, 186, 263, 647, 537, 686, 600, 224, 469, 68,\n    770, 919, 190, 373, 294, 822, 808, 206, 184, 943, 795, 384, 383, 461, 404, 758, 839, 887, 715,\n    67,  618, 276, 204, 918, 873, 777, 604, 560, 951, 160, 578, 722, 79,  804, 96,  409, 713, 940,\n    652, 934, 970, 447, 318, 353, 859, 672, 112, 785, 645, 863, 803, 350, 139, 93,  354, 99,  820,\n    908, 609, 772, 154, 274, 580, 184, 79,  626, 630, 742, 653, 282, 762, 623, 680, 81,  927, 626,\n    789, 125, 411, 521, 938, 300, 821, 78,  343, 175, 128, 250, 170, 774, 972, 275, 999, 639, 495,\n    78,  352, 126, 857, 956, 358, 619, 580, 124, 737, 594, 701, 612, 669, 112, 134, 694, 363, 992,\n    809, 743, 168, 974, 944, 375, 748, 52,  600, 747, 642, 182, 862, 81,  344, 805, 988, 739, 511,\n    655, 814, 334, 249, 515, 897, 955, 664, 981, 649, 113, 974, 459, 893, 228, 433, 837, 553, 268,\n    926, 240, 102, 654, 459, 51,  686, 754, 806, 760, 493, 403, 415, 394, 687, 700, 946, 670, 656,\n    610, 738, 392, 760, 799, 887, 653, 978, 321, 576, 617, 626, 502, 894, 679, 243, 440, 680, 879,\n    194, 572, 640, 724, 926, 56,  204, 700, 707, 151, 457, 449, 797, 195, 791, 558, 945, 679, 297,\n    59,  87,  824, 713, 663, 412, 693, 342, 606, 134, 108, 571, 364, 631, 212, 174, 643, 304, 329,\n    343, 97,  430, 751, 497, 314, 983, 374, 822, 928, 140, 206, 73,  263, 980, 736, 876, 478, 430,\n    305, 170, 514, 364, 692, 829, 82,  855, 953, 676, 246, 369, 970, 294, 750, 807, 827, 150, 790,\n    288, 923, 804, 378, 215, 828, 592, 281, 565, 555, 710, 82,  896, 831, 547, 261, 524, 462, 293,\n    465, 502, 56,  661, 821, 976, 991, 658, 869, 905, 758, 745, 193, 768, 550, 608, 933, 378, 286,\n    215, 979, 792, 961, 61,  688, 793, 644, 986, 403, 106, 366, 905, 644, 372, 567, 466, 434, 645,\n    210, 389, 550, 919, 135, 780, 773, 635, 389, 707, 100, 626, 958, 165, 504, 920, 176, 193, 713,\n    857, 265, 203, 50,  668, 108, 645, 990, 626, 197, 510, 357, 358, 850, 858, 364, 936, 638\n};\n\n/*-------------------------------------------------------------*/\n/*--- end                                       randtable.c ---*/\n/*-------------------------------------------------------------*/\n"
  },
  {
    "path": "third-party/tbb/examples/graph/logic_sim/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(logic_sim CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(tbb)\n\nadd_executable(logic_sim test_all.cpp)\n\ntarget_link_libraries(logic_sim TBB::tbb Threads::Threads)\ntarget_compile_options(logic_sim PRIVATE ${TBB_CXX_STD_FLAG})\n\nset(EXECUTABLE \"$<TARGET_FILE:logic_sim>\")\nset(ARGS 4)\nset(PERF_ARGS auto silent)\n\nadd_execution_target(run_logic_sim logic_sim ${EXECUTABLE} \"${ARGS}\")\nadd_execution_target(perf_run_logic_sim logic_sim ${EXECUTABLE} \"${PERF_ARGS}\")\n"
  },
  {
    "path": "third-party/tbb/examples/graph/logic_sim/D_latch.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TBB_examples_logic_sim_dlatch_H\n#define TBB_examples_logic_sim_dlatch_H\n\n#include \"basics.hpp\"\n\nclass D_latch : public oneapi::tbb::flow::composite_node<std::tuple<signal_t, signal_t>,\n                                                         std::tuple<signal_t, signal_t>> {\n    oneapi::tbb::flow::broadcast_node<signal_t> D_port;\n    oneapi::tbb::flow::broadcast_node<signal_t> E_port;\n    not_gate a_not;\n    and_gate<2> first_and;\n    and_gate<2> second_and;\n    nor_gate<2> first_nor;\n    nor_gate<2> second_nor;\n    oneapi::tbb::flow::graph& my_graph;\n    typedef oneapi::tbb::flow::composite_node<std::tuple<signal_t, signal_t>,\n                                              std::tuple<signal_t, signal_t>>\n        base_type;\n\npublic:\n    D_latch(oneapi::tbb::flow::graph& g)\n            : base_type(g),\n              my_graph(g),\n              D_port(g),\n              E_port(g),\n              a_not(g),\n              first_and(g),\n              second_and(g),\n              first_nor(g),\n              second_nor(g) {\n        make_edge(D_port, input_port<0>(a_not));\n        make_edge(D_port, input_port<1>(second_and));\n        make_edge(E_port, input_port<1>(first_and));\n        make_edge(E_port, input_port<0>(second_and));\n        make_edge(a_not, input_port<0>(first_and));\n        make_edge(first_and, input_port<0>(first_nor));\n        make_edge(second_and, input_port<1>(second_nor));\n        make_edge(first_nor, input_port<0>(second_nor));\n        make_edge(second_nor, input_port<1>(first_nor));\n\n        base_type::input_ports_type input_tuple(D_port, E_port);\n        base_type::output_ports_type output_tuple(output_port<0>(first_nor),\n                                                  output_port<0>(second_nor));\n\n        base_type::set_external_ports(input_tuple, output_tuple);\n        base_type::add_visible_nodes(\n            D_port, E_port, a_not, first_and, second_and, first_nor, second_nor);\n    }\n    ~D_latch() {}\n};\n\n#endif /* TBB_examples_logic_sim_dlatch_H */\n"
  },
  {
    "path": "third-party/tbb/examples/graph/logic_sim/README.md",
    "content": "# Logic_sim sample\nThis directory contains  `oneapi::tbb::flow` example that performs simplistic digital logic simulations with basic logic gates that can be easily composed to create more interesting circuits.\n\n## Building the example\n```\ncmake <path_to_example>\ncmake --build .\n```\n\n## Running the sample\n### Predefined make targets\n* `make run_logic_sim` - executes the example with predefined parameters.\n* `make perf_run_logic_sim` - executes the example with suggested parameters to measure the oneTBB performance.\n\n### Application parameters\nUsage:\n```\nlogic_sim [#threads=value] [verbose] [silent] [-h] [#threads]\n```\n* `-h` - prints the help for command line options.\n* `#threads` - the number of threads to use; a range of the form low[:high] where low and optional high are non-negative integers, or `auto` for a platform-specific default number.\n* `verbose` - prints diagnostic output to screen.\n* `silent` limits output to timing info; overrides verbose\n"
  },
  {
    "path": "third-party/tbb/examples/graph/logic_sim/basics.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TBB_examples_logic_sim_basic_H\n#define TBB_examples_logic_sim_basic_H\n\n#include <cstdio>\n\n#include <string>\n#include <tuple>\n\n#include \"oneapi/tbb/tick_count.h\"\n#include \"oneapi/tbb/flow_graph.h\"\n#include \"common/utility/utility.hpp\"\n\n#ifndef _WIN32\n#include <sys/time.h>\n#include <unistd.h>\n\nvoid rt_sleep(int msec) {\n    usleep(msec * 1000);\n}\n\n#else //_WIN32\n\n#undef OLDUNIXTIME\n#undef STDTIME\n\n#include <windows.h>\n\nvoid rt_sleep(int msec) {\n    Sleep(msec);\n}\n#endif /*  _WIN32  */\n\nusing oneapi::tbb::flow::make_edge;\nusing oneapi::tbb::flow::cast_to;\nusing oneapi::tbb::flow::input_port;\nusing oneapi::tbb::flow::output_port;\n\ntypedef enum { low = 0, high, undefined } signal_t;\n\ntemplate <int N>\nclass gate;\n\ntemplate <>\nclass gate<1>\n        : public oneapi::tbb::flow::composite_node<std::tuple<signal_t>, std::tuple<signal_t>> {\nprotected:\n    typedef oneapi::tbb::flow::indexer_node<signal_t> input_port_t;\n    typedef oneapi::tbb::flow::multifunction_node<input_port_t::output_type, std::tuple<signal_t>>\n        gate_fn_t;\n    typedef gate_fn_t::output_ports_type ports_type;\n    typedef oneapi::tbb::flow::composite_node<std::tuple<signal_t>, std::tuple<signal_t>> base_type;\n\npublic:\n    template <typename Body>\n    gate(oneapi::tbb::flow::graph& g, Body b)\n            : base_type(g),\n              my_graph(g),\n              in_ports(g),\n              gate_fn(g, 1, b) {\n        make_edge(in_ports, gate_fn);\n        base_type::input_ports_type input_tuple(input_port<0>(in_ports));\n        base_type::output_ports_type output_tuple(output_port<0>(gate_fn));\n        base_type::set_external_ports(input_tuple, output_tuple);\n        base_type::add_visible_nodes(in_ports, gate_fn);\n    }\n    virtual ~gate() {}\n    gate& operator=(const gate& src) {\n        return *this;\n    }\n\nprotected:\n    oneapi::tbb::flow::graph& my_graph;\n\nprivate:\n    input_port_t in_ports;\n    gate_fn_t gate_fn;\n};\n\ntemplate <>\nclass gate<2> : public oneapi::tbb::flow::composite_node<std::tuple<signal_t, signal_t>,\n                                                         std::tuple<signal_t>> {\nprotected:\n    typedef oneapi::tbb::flow::indexer_node<signal_t, signal_t> input_port_t;\n    typedef oneapi::tbb::flow::multifunction_node<input_port_t::output_type, std::tuple<signal_t>>\n        gate_fn_t;\n    typedef gate_fn_t::output_ports_type ports_type;\n    typedef oneapi::tbb::flow::composite_node<std::tuple<signal_t, signal_t>, std::tuple<signal_t>>\n        base_type;\n\npublic:\n    template <typename Body>\n    gate(oneapi::tbb::flow::graph& g, Body b)\n            : base_type(g),\n              my_graph(g),\n              in_ports(g),\n              gate_fn(g, 1, b) {\n        make_edge(in_ports, gate_fn);\n        base_type::input_ports_type input_tuple(input_port<0>(in_ports), input_port<1>(in_ports));\n        base_type::output_ports_type output_tuple(output_port<0>(gate_fn));\n        base_type::set_external_ports(input_tuple, output_tuple);\n        base_type::add_visible_nodes(in_ports, gate_fn);\n    }\n    virtual ~gate() {}\n    gate& operator=(const gate& src) {\n        return *this;\n    }\n\nprotected:\n    oneapi::tbb::flow::graph& my_graph;\n\nprivate:\n    input_port_t in_ports;\n    gate_fn_t gate_fn;\n};\n\ntemplate <>\nclass gate<3> : public oneapi::tbb::flow::composite_node<std::tuple<signal_t, signal_t, signal_t>,\n                                                         std::tuple<signal_t>> {\nprotected:\n    typedef oneapi::tbb::flow::indexer_node<signal_t, signal_t, signal_t> input_port_t;\n    typedef oneapi::tbb::flow::multifunction_node<input_port_t::output_type, std::tuple<signal_t>>\n        gate_fn_t;\n    typedef gate_fn_t::output_ports_type ports_type;\n    typedef oneapi::tbb::flow::composite_node<std::tuple<signal_t, signal_t, signal_t>,\n                                              std::tuple<signal_t>>\n        base_type;\n\npublic:\n    template <typename Body>\n    gate(oneapi::tbb::flow::graph& g, Body b)\n            : base_type(g),\n              my_graph(g),\n              in_ports(g),\n              gate_fn(g, 1, b) {\n        make_edge(in_ports, gate_fn);\n        base_type::input_ports_type input_tuple(\n            input_port<0>(in_ports), input_port<1>(in_ports), input_port<2>(in_ports));\n        base_type::output_ports_type output_tuple(output_port<0>(gate_fn));\n        base_type::set_external_ports(input_tuple, output_tuple);\n        base_type::add_visible_nodes(in_ports, gate_fn);\n    }\n    virtual ~gate() {}\n    gate& operator=(const gate& src) {\n        return *this;\n    }\n\nprotected:\n    oneapi::tbb::flow::graph& my_graph;\n\nprivate:\n    input_port_t in_ports;\n    gate_fn_t gate_fn;\n};\n\ntemplate <>\nclass gate<4> : public oneapi::tbb::flow::composite_node<\n                    std::tuple<signal_t, signal_t, signal_t, signal_t>,\n                    std::tuple<signal_t>> {\nprotected:\n    typedef oneapi::tbb::flow::indexer_node<signal_t, signal_t, signal_t, signal_t> input_port_t;\n    typedef oneapi::tbb::flow::multifunction_node<input_port_t::output_type, std::tuple<signal_t>>\n        gate_fn_t;\n    typedef gate_fn_t::output_ports_type ports_type;\n    typedef oneapi::tbb::flow::composite_node<std::tuple<signal_t, signal_t, signal_t, signal_t>,\n                                              std::tuple<signal_t>>\n        base_type;\n\npublic:\n    template <typename Body>\n    gate(oneapi::tbb::flow::graph& g, Body b)\n            : base_type(g),\n              my_graph(g),\n              in_ports(g),\n              gate_fn(g, 1, b) {\n        make_edge(in_ports, gate_fn);\n        base_type::input_ports_type input_tuple(input_port<0>(in_ports),\n                                                input_port<1>(in_ports),\n                                                input_port<2>(in_ports),\n                                                input_port<3>(in_ports));\n        base_type::output_ports_type output_tuple(output_port<0>(gate_fn));\n        base_type::set_external_ports(input_tuple, output_tuple);\n        base_type::add_visible_nodes(in_ports, gate_fn);\n    }\n    virtual ~gate() {}\n    gate& operator=(const gate& src) {\n        return *this;\n    }\n\nprotected:\n    oneapi::tbb::flow::graph& my_graph;\n\nprivate:\n    input_port_t in_ports;\n    gate_fn_t gate_fn;\n};\n\n// Input devices\nclass steady_signal {\n    oneapi::tbb::flow::graph& my_graph;\n    signal_t init_signal;\n    oneapi::tbb::flow::write_once_node<signal_t> signal_node;\n\npublic:\n    steady_signal(oneapi::tbb::flow::graph& g, signal_t v)\n            : my_graph(g),\n              init_signal(v),\n              signal_node(g) {}\n    steady_signal(const steady_signal& src)\n            : my_graph(src.my_graph),\n              init_signal(src.init_signal),\n              signal_node(src.my_graph) {}\n    ~steady_signal() {}\n    // Assignment is ignored\n    steady_signal& operator=(const steady_signal& src) {\n        return *this;\n    }\n    oneapi::tbb::flow::write_once_node<signal_t>& get_out() {\n        return signal_node;\n    }\n    void activate() {\n        signal_node.try_put(init_signal);\n    }\n};\n\nclass pulse {\n    class clock_body {\n        std::size_t& ms;\n        int& reps;\n        signal_t val;\n\n    public:\n        clock_body(std::size_t& _ms, int& _reps) : ms(_ms), reps(_reps), val(low) {}\n        signal_t operator()(oneapi::tbb::flow_control& fc) {\n            rt_sleep((int)ms);\n\n            if (reps > 0)\n                --reps;\n            if (val == low)\n                val = high;\n            else\n                val = low;\n\n            if (!(reps > 0 || reps == -1))\n                fc.stop();\n            return val;\n        }\n    };\n    oneapi::tbb::flow::graph& my_graph;\n    std::size_t ms, init_ms;\n    int reps, init_reps;\n    oneapi::tbb::flow::input_node<signal_t> clock_node;\n\npublic:\n    pulse(oneapi::tbb::flow::graph& g, std::size_t _ms = 1000, int _reps = -1)\n            : my_graph(g),\n              ms(_ms),\n              init_ms(_ms),\n              reps(_reps),\n              init_reps(_reps),\n              clock_node(g, clock_body(ms, reps)) {}\n    pulse(const pulse& src)\n            : my_graph(src.my_graph),\n              ms(src.init_ms),\n              init_ms(src.init_ms),\n              reps(src.init_reps),\n              init_reps(src.init_reps),\n              clock_node(src.my_graph, clock_body(ms, reps)) {}\n    ~pulse() {}\n    // Assignment changes the behavior of LHS to that of the RHS, but doesn't change owning graph\n    pulse& operator=(const pulse& src) {\n        ms = src.ms;\n        init_ms = src.init_ms;\n        reps = src.reps;\n        init_reps = src.init_reps;\n        return *this;\n    }\n    oneapi::tbb::flow::input_node<signal_t>& get_out() {\n        return clock_node;\n    }\n    void activate() {\n        clock_node.activate();\n    }\n    void reset() {\n        reps = init_reps;\n    }\n};\n\nclass push_button {\n    oneapi::tbb::flow::graph& my_graph;\n    oneapi::tbb::flow::overwrite_node<signal_t> push_button_node;\n\npublic:\n    push_button(oneapi::tbb::flow::graph& g) : my_graph(g), push_button_node(g) {\n        push_button_node.try_put(low);\n    }\n    push_button(const push_button& src) : my_graph(src.my_graph), push_button_node(src.my_graph) {\n        push_button_node.try_put(low);\n    }\n    ~push_button() {}\n    // Assignment is ignored\n    push_button& operator=(const push_button& src) {\n        return *this;\n    }\n    oneapi::tbb::flow::overwrite_node<signal_t>& get_out() {\n        return push_button_node;\n    }\n    void press() {\n        push_button_node.try_put(high);\n    }\n    void release() {\n        push_button_node.try_put(low);\n    }\n};\n\nclass toggle {\n    oneapi::tbb::flow::graph& my_graph;\n    signal_t state;\n    oneapi::tbb::flow::overwrite_node<signal_t> toggle_node;\n\npublic:\n    toggle(oneapi::tbb::flow::graph& g) : my_graph(g), state(undefined), toggle_node(g) {}\n    toggle(const toggle& src)\n            : my_graph(src.my_graph),\n              state(undefined),\n              toggle_node(src.my_graph) {}\n    ~toggle() {}\n    // Assignment ignored\n    toggle& operator=(const toggle& src) {\n        return *this;\n    }\n    oneapi::tbb::flow::overwrite_node<signal_t>& get_out() {\n        return toggle_node;\n    }\n    void flip() {\n        if (state == high)\n            state = low;\n        else\n            state = high;\n        toggle_node.try_put(state);\n    }\n    void activate() {\n        state = low;\n        toggle_node.try_put(state);\n    }\n};\n\n// Basic gates\nclass buffer : public gate<1> {\n    using gate<1>::my_graph;\n    typedef gate<1>::ports_type ports_type;\n    class buffer_body {\n        signal_t state;\n        bool touched;\n\n    public:\n        buffer_body() : state(undefined), touched(false) {}\n        void operator()(const input_port_t::output_type& v, ports_type& p) {\n            if (!touched || state != cast_to<signal_t>(v)) {\n                state = cast_to<signal_t>(v);\n                std::get<0>(p).try_put(state);\n                touched = true;\n            }\n        }\n    };\n\npublic:\n    buffer(oneapi::tbb::flow::graph& g) : gate<1>(g, buffer_body()) {}\n    buffer(const buffer& src) : gate<1>(src.my_graph, buffer_body()) {}\n    ~buffer() {}\n};\n\nclass not_gate : public gate<1> {\n    using gate<1>::my_graph;\n    typedef gate<1>::ports_type ports_type;\n    class not_body {\n        signal_t port;\n        bool touched;\n\n    public:\n        not_body() : port(undefined), touched(false) {}\n        void operator()(const input_port_t::output_type& v, ports_type& p) {\n            if (!touched || port != cast_to<signal_t>(v)) {\n                port = cast_to<signal_t>(v);\n                signal_t state = low;\n                if (port == low)\n                    state = high;\n                std::get<0>(p).try_put(state);\n                touched = true;\n            }\n        }\n    };\n\npublic:\n    not_gate(oneapi::tbb::flow::graph& g) : gate<1>(g, not_body()) {}\n    not_gate(const not_gate& src) : gate<1>(src.my_graph, not_body()) {}\n    ~not_gate() {}\n};\n\ntemplate <int N>\nclass and_gate : public gate<N> {\n    using gate<N>::my_graph;\n    typedef typename gate<N>::ports_type ports_type;\n    typedef typename gate<N>::input_port_t::output_type from_input;\n    class and_body {\n        signal_t* ports;\n        signal_t state;\n        bool touched;\n\n    public:\n        and_body() : state(undefined), touched(false) {\n            ports = new signal_t[N];\n            for (int i = 0; i < N; ++i)\n                ports[i] = undefined;\n        }\n        void operator()(const from_input& v, ports_type& p) {\n            ports[v.tag()] = cast_to<signal_t>(v);\n            signal_t new_state = high;\n            std::size_t i = 0;\n            while (i < N) {\n                if (ports[i] == low) {\n                    new_state = low;\n                    break;\n                }\n                else if (ports[i] == undefined && new_state != low) {\n                    new_state = undefined;\n                }\n                ++i;\n            }\n            if (!touched || state != new_state) {\n                state = new_state;\n                std::get<0>(p).try_put(state);\n                touched = true;\n            }\n        }\n    };\n\npublic:\n    and_gate(oneapi::tbb::flow::graph& g) : gate<N>(g, and_body()) {}\n    and_gate(const and_gate<N>& src) : gate<N>(src.my_graph, and_body()) {}\n    ~and_gate() {}\n};\n\ntemplate <int N>\nclass or_gate : public gate<N> {\n    using gate<N>::my_graph;\n    typedef typename gate<N>::ports_type ports_type;\n    typedef typename gate<N>::input_port_t::output_type from_input;\n    class or_body {\n        signal_t* ports;\n        signal_t state;\n        bool touched;\n\n    public:\n        or_body() : state(undefined), touched(false) {\n            ports = new signal_t[N];\n            for (int i = 0; i < N; ++i)\n                ports[i] = undefined;\n        }\n        void operator()(const from_input& v, ports_type& p) {\n            ports[v.tag()] = cast_to<signal_t>(v);\n            signal_t new_state = low;\n            std::size_t i = 0;\n            while (i < N) {\n                if (ports[i] == high) {\n                    new_state = high;\n                    break;\n                }\n                else if (ports[i] == undefined && new_state != high) {\n                    new_state = undefined;\n                }\n                ++i;\n            }\n            if (!touched || state != new_state) {\n                state = new_state;\n                std::get<0>(p).try_put(state);\n                touched = true;\n            }\n        }\n    };\n\npublic:\n    or_gate(oneapi::tbb::flow::graph& g) : gate<N>(g, or_body()) {}\n    or_gate(const or_gate& src) : gate<N>(src.my_graph, or_body()) {}\n    ~or_gate() {}\n};\n\ntemplate <int N>\nclass xor_gate : public gate<N> {\n    using gate<N>::my_graph;\n    typedef typename gate<N>::ports_type ports_type;\n    typedef typename gate<N>::input_port_t input_port_t;\n    class xor_body {\n        signal_t* ports;\n        signal_t state;\n        bool touched;\n\n    public:\n        xor_body() : state(undefined), touched(false) {\n            ports = new signal_t[N];\n            for (int i = 0; i < N; ++i)\n                ports[i] = undefined;\n        }\n        void operator()(const typename input_port_t::output_type& v, ports_type& p) {\n            ports[v.tag()] = cast_to<signal_t>(v);\n            signal_t new_state = low;\n            std::size_t i = 0, highs = 0;\n            while (i < N) {\n                if (ports[i] == undefined) {\n                    new_state = undefined;\n                }\n                else if (ports[i] == high && new_state == low) {\n                    new_state = high;\n                    ++highs;\n                }\n                else if (ports[i] == high && highs > 0) {\n                    new_state = low;\n                    break;\n                }\n                else if (ports[i] == high) {\n                    ++highs;\n                }\n                ++i;\n            }\n            if (!touched || state != new_state) {\n                state = new_state;\n                std::get<0>(p).try_put(state);\n                touched = true;\n            }\n        }\n    };\n\npublic:\n    xor_gate(oneapi::tbb::flow::graph& g) : gate<N>(g, xor_body()) {}\n    xor_gate(const xor_gate& src) : gate<N>(src.my_graph, xor_body()) {}\n    ~xor_gate() {}\n};\n\ntemplate <int N>\nclass nor_gate : public gate<N> {\n    using gate<N>::my_graph;\n    typedef typename gate<N>::ports_type ports_type;\n    typedef typename gate<N>::input_port_t input_port_t;\n    class nor_body {\n        signal_t* ports;\n        signal_t state;\n        bool touched;\n\n    public:\n        nor_body() : state(undefined), touched(false) {\n            ports = new signal_t[N];\n            for (int i = 0; i < N; ++i)\n                ports[i] = undefined;\n        }\n        void operator()(const typename input_port_t::output_type& v, ports_type& p) {\n            ports[v.tag()] = cast_to<signal_t>(v);\n            signal_t new_state = low;\n            std::size_t i = 0;\n            while (i < N) {\n                if (ports[i] == high) {\n                    new_state = high;\n                    break;\n                }\n                else if (ports[i] == undefined && new_state != high) {\n                    new_state = undefined;\n                }\n                ++i;\n            }\n            if (new_state == high)\n                new_state = low;\n            else if (new_state == low)\n                new_state = high;\n            if (!touched || state != new_state) {\n                state = new_state;\n                std::get<0>(p).try_put(state);\n                touched = true;\n            }\n        }\n    };\n\npublic:\n    nor_gate(oneapi::tbb::flow::graph& g) : gate<N>(g, nor_body()) {}\n    nor_gate(const nor_gate& src) : gate<N>(src.my_graph, nor_body()) {}\n    ~nor_gate() {}\n};\n\n// Output devices\nclass led {\n    class led_body {\n        signal_t& state;\n        std::string& label;\n        bool report_changes;\n        bool touched;\n\n    public:\n        led_body(signal_t& s, std::string& l, bool r)\n                : state(s),\n                  label(l),\n                  report_changes(r),\n                  touched(false) {}\n        oneapi::tbb::flow::continue_msg operator()(signal_t b) {\n            if (!touched || b != state) {\n                state = b;\n                if (state != undefined && report_changes) {\n                    if (state)\n                        printf(\"%s: (*)\\n\", label.c_str());\n                    else\n                        printf(\"%s: ( )\\n\", label.c_str());\n                }\n                touched = false;\n            }\n            return oneapi::tbb::flow::continue_msg();\n        }\n    };\n    oneapi::tbb::flow::graph& my_graph;\n    std::string label;\n    signal_t state;\n    bool report_changes;\n    oneapi::tbb::flow::function_node<signal_t, oneapi::tbb::flow::continue_msg> led_node;\n\npublic:\n    led(oneapi::tbb::flow::graph& g, std::string l, bool rc = false)\n            : my_graph(g),\n              label(l),\n              state(undefined),\n              report_changes(rc),\n              led_node(g, 1, led_body(state, label, report_changes)) {}\n    led(const led& src)\n            : my_graph(src.my_graph),\n              label(src.label),\n              state(undefined),\n              report_changes(src.report_changes),\n              led_node(src.my_graph, 1, led_body(state, label, report_changes)) {}\n    ~led() {}\n    // Assignment changes the behavior of LHS to that of the RHS, but doesn't change owning graph\n    // state is set to undefined so that next signal changes it\n    led& operator=(const led& src) {\n        label = src.label;\n        state = undefined;\n        report_changes = src.report_changes;\n        return *this;\n    }\n    oneapi::tbb::flow::function_node<signal_t, oneapi::tbb::flow::continue_msg>& get_in() {\n        return led_node;\n    }\n    void display() {\n        if (state == high)\n            printf(\"%s: (*)\\n\", label.c_str());\n        else if (state == low)\n            printf(\"%s: ( )\\n\", label.c_str());\n        else\n            printf(\"%s: (u)\\n\", label.c_str());\n    }\n    signal_t get_value() {\n        return state;\n    }\n};\n\nclass digit : public gate<4> {\n    using gate<4>::my_graph;\n    typedef gate<4>::ports_type ports_type;\n    typedef gate<4>::input_port_t input_port_t;\n    class digit_body {\n        signal_t ports[4];\n        static const int N = 4;\n        unsigned int& state;\n        std::string& label;\n        bool& report_changes;\n\n    public:\n        digit_body(unsigned int& s, std::string& l, bool& r)\n                : state(s),\n                  label(l),\n                  report_changes(r) {\n            for (int i = 0; i < N; ++i)\n                ports[i] = undefined;\n        }\n        void operator()(const input_port_t::output_type& v, ports_type& p) {\n            unsigned int new_state = 0;\n            ports[v.tag()] = cast_to<signal_t>(v);\n            if (ports[0] == high)\n                ++new_state;\n            if (ports[1] == high)\n                new_state += 2;\n            if (ports[2] == high)\n                new_state += 4;\n            if (ports[3] == high)\n                new_state += 8;\n            if (state != new_state) {\n                state = new_state;\n                if (report_changes) {\n                    printf(\"%s: %x\\n\", label.c_str(), state);\n                }\n            }\n        }\n    };\n    std::string label;\n    unsigned int state;\n    bool report_changes;\n\npublic:\n    digit(oneapi::tbb::flow::graph& g, std::string l, bool rc = false)\n            : gate<4>(g, digit_body(state, label, report_changes)),\n              label(l),\n              state(0),\n              report_changes(rc) {}\n    digit(const digit& src)\n            : gate<4>(src.my_graph, digit_body(state, label, report_changes)),\n              label(src.label),\n              state(0),\n              report_changes(src.report_changes) {}\n    ~digit() {}\n    // Assignment changes the behavior of LHS to that of the RHS, but doesn't change owning graph.\n    // state is reset as in constructors\n    digit& operator=(const digit& src) {\n        label = src.label;\n        state = 0;\n        report_changes = src.report_changes;\n        return *this;\n    }\n    void display() {\n        printf(\"%s: %x\\n\", label.c_str(), state);\n    }\n    unsigned int get_value() {\n        return state;\n    }\n};\n\n#endif /* TBB_examples_logic_sim_basic_H */\n"
  },
  {
    "path": "third-party/tbb/examples/graph/logic_sim/four_bit_adder.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TBB_examples_logic_sim_fba_H\n#define TBB_examples_logic_sim_fba_H\n\n#include \"one_bit_adder.hpp\"\n\ntypedef oneapi::tbb::flow::composite_node<\n    std::tuple<signal_t,\n               signal_t,\n               signal_t,\n               signal_t,\n               signal_t,\n               signal_t,\n               signal_t,\n               signal_t,\n               signal_t>,\n    std::tuple<signal_t, signal_t, signal_t, signal_t, signal_t>>\n    fba_base_type;\n\nclass four_bit_adder : public fba_base_type {\n    oneapi::tbb::flow::graph& my_graph;\n    std::vector<one_bit_adder> four_adders;\n\npublic:\n    four_bit_adder(oneapi::tbb::flow::graph& g)\n            : fba_base_type(g),\n              my_graph(g),\n              four_adders(4, one_bit_adder(g)) {\n        make_connections();\n        set_up_composite();\n    }\n    four_bit_adder(const four_bit_adder& src)\n            : fba_base_type(src.my_graph),\n              my_graph(src.my_graph),\n              four_adders(4, one_bit_adder(src.my_graph)) {\n        make_connections();\n        set_up_composite();\n    }\n    ~four_bit_adder() {}\n\nprivate:\n    void make_connections() {\n        make_edge(output_port<1>(four_adders[0]), input_port<0>(four_adders[1]));\n        make_edge(output_port<1>(four_adders[1]), input_port<0>(four_adders[2]));\n        make_edge(output_port<1>(four_adders[2]), input_port<0>(four_adders[3]));\n    }\n    void set_up_composite() {\n        fba_base_type::input_ports_type input_tuple(input_port<0>(four_adders[0] /*CI*/),\n                                                    input_port<1>(four_adders[0]),\n                                                    input_port<2>(four_adders[0]),\n                                                    input_port<1>(four_adders[1]),\n                                                    input_port<2>(four_adders[1]),\n                                                    input_port<1>(four_adders[2]),\n                                                    input_port<2>(four_adders[2]),\n                                                    input_port<1>(four_adders[3]),\n                                                    input_port<2>(four_adders[3]));\n\n        fba_base_type::output_ports_type output_tuple(output_port<0>(four_adders[0]),\n                                                      output_port<0>(four_adders[1]),\n                                                      output_port<0>(four_adders[2]),\n                                                      output_port<0>(four_adders[3]),\n                                                      output_port<1>(four_adders[3] /*CO*/));\n\n        fba_base_type::set_external_ports(input_tuple, output_tuple);\n    }\n};\n\n#endif /* TBB_examples_logic_sim_fba_H */\n"
  },
  {
    "path": "third-party/tbb/examples/graph/logic_sim/one_bit_adder.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TBB_examples_logic_sim_oba_H\n#define TBB_examples_logic_sim_oba_H\n\nnamespace P {\n//input ports\nconst int CI = 0;\nconst int A0 = 1;\nconst int B0 = 2;\nconst int A1 = 3;\nconst int B1 = 4;\nconst int A2 = 5;\nconst int B2 = 6;\nconst int A3 = 7;\nconst int B3 = 8;\n\n//output_ports\nconst int S0 = 0;\nconst int S1 = 1;\nconst int S2 = 2;\nconst int S3 = 3;\n\n#if USE_TWO_BIT_FULL_ADDER\nconst int CO = 2;\n#else\nconst int CO = 4;\n#endif\n} // namespace P\n\n#include \"basics.hpp\"\n\nclass one_bit_adder\n        : public oneapi::tbb::flow::composite_node<std::tuple<signal_t, signal_t, signal_t>,\n                                                   std::tuple<signal_t, signal_t>> {\n    oneapi::tbb::flow::broadcast_node<signal_t> A_port;\n    oneapi::tbb::flow::broadcast_node<signal_t> B_port;\n    oneapi::tbb::flow::broadcast_node<signal_t> CI_port;\n    xor_gate<2> FirstXOR;\n    xor_gate<2> SecondXOR;\n    and_gate<2> FirstAND;\n    and_gate<2> SecondAND;\n    or_gate<2> FirstOR;\n    oneapi::tbb::flow::graph& my_graph;\n    typedef oneapi::tbb::flow::composite_node<std::tuple<signal_t, signal_t, signal_t>,\n                                              std::tuple<signal_t, signal_t>>\n        base_type;\n\npublic:\n    one_bit_adder(oneapi::tbb::flow::graph& g)\n            : base_type(g),\n              my_graph(g),\n              A_port(g),\n              B_port(g),\n              CI_port(g),\n              FirstXOR(g),\n              SecondXOR(g),\n              FirstAND(g),\n              SecondAND(g),\n              FirstOR(g) {\n        make_connections();\n        set_up_composite();\n    }\n    one_bit_adder(const one_bit_adder& src)\n            : base_type(src.my_graph),\n              my_graph(src.my_graph),\n              A_port(src.my_graph),\n              B_port(src.my_graph),\n              CI_port(src.my_graph),\n              FirstXOR(src.my_graph),\n              SecondXOR(src.my_graph),\n              FirstAND(src.my_graph),\n              SecondAND(src.my_graph),\n              FirstOR(src.my_graph) {\n        make_connections();\n        set_up_composite();\n    }\n\n    ~one_bit_adder() {}\n\nprivate:\n    void make_connections() {\n        make_edge(A_port, input_port<0>(FirstXOR));\n        make_edge(A_port, input_port<0>(FirstAND));\n        make_edge(B_port, input_port<1>(FirstXOR));\n        make_edge(B_port, input_port<1>(FirstAND));\n        make_edge(CI_port, input_port<1>(SecondXOR));\n        make_edge(CI_port, input_port<1>(SecondAND));\n        make_edge(FirstXOR, input_port<0>(SecondXOR));\n        make_edge(FirstXOR, input_port<0>(SecondAND));\n        make_edge(SecondAND, input_port<0>(FirstOR));\n        make_edge(FirstAND, input_port<1>(FirstOR));\n    }\n\n    void set_up_composite() {\n        base_type::input_ports_type input_tuple(CI_port, A_port, B_port);\n        base_type::output_ports_type output_tuple(output_port<0>(SecondXOR),\n                                                  output_port<0>(FirstOR));\n        base_type::set_external_ports(input_tuple, output_tuple);\n        base_type::add_visible_nodes(\n            A_port, B_port, CI_port, FirstXOR, SecondXOR, FirstAND, SecondAND, FirstOR);\n    }\n};\n\n#endif /* TBB_examples_logic_sim_oba_H */\n"
  },
  {
    "path": "third-party/tbb/examples/graph/logic_sim/test_all.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <cstdio>\n#include <cassert>\n\n#include \"oneapi/tbb/global_control.h\"\n\n#include \"common/utility/utility.hpp\"\n#include \"common/utility/get_default_num_threads.hpp\"\n\n#if _MSC_VER\n#pragma warning( \\\n    disable : 4503) // Suppress \"decorated name length exceeded, name was truncated\" warning\n#endif\n\n#define USE_TWO_BIT_FULL_ADDER 1\n\n#include \"basics.hpp\"\n#include \"one_bit_adder.hpp\"\n#if USE_TWO_BIT_FULL_ADDER\n#include \"two_bit_adder.hpp\"\n#else\n#include \"four_bit_adder.hpp\"\n#endif\n#include \"D_latch.hpp\"\n\n// User-specified globals with default values\nbool verbose = false; // prints bin details and other diagnostics to screen\nbool silent = false; // suppress all output except for time\n\nint main(int argc, char *argv[]) {\n    utility::thread_number_range threads(utility::get_default_num_threads);\n    utility::parse_cli_arguments(\n        argc,\n        argv,\n        utility::cli_argument_pack()\n            //\"-h\" option for displaying help is present implicitly\n            .positional_arg(threads, \"#threads\", utility::thread_number_range_desc)\n            .arg(verbose, \"verbose\", \"   print diagnostic output to screen\")\n            .arg(silent, \"silent\", \"    limits output to timing info; overrides verbose\"));\n\n    if (silent)\n        verbose = false; // make silent override verbose\n\n    oneapi::tbb::tick_count start = oneapi::tbb::tick_count::now();\n    for (int p = threads.first; p <= threads.last; p = threads.step(p)) {\n        oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism, p);\n        if (!silent)\n            std::cout << \"graph test running on \" << p << \" threads.\"\n                      << \"\\n\";\n\n        oneapi::tbb::flow::graph g;\n\n        { // test buffer: 0, 1\n            buffer b(g);\n            toggle input(g);\n            led output(\n                g, \"OUTPUT\", false); // false means we will explicitly call display to see LED\n\n            make_edge(input.get_out(), input_port<0>(b));\n            make_edge(output_port<0>(b), output.get_in());\n\n            if (!silent)\n                printf(\"Testing buffer...\\n\");\n            input.activate(); // 0\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == low);\n            input.flip(); // 1\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == high);\n        }\n\n        { // test not_gate: 0, 1\n            not_gate n(g);\n            toggle input(g);\n            led output(g, \"OUTPUT\", false);\n\n            make_edge(input.get_out(), input_port<0>(n));\n            make_edge(output_port<0>(n), output.get_in());\n\n            if (!silent)\n                printf(\"Testing not_gate...\\n\");\n            input.activate(); // 0\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == high);\n            input.flip(); // 1\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == low);\n        }\n\n        { // test two-input and_gate: 00, 01, 10, 11\n            and_gate<2> a(g);\n            toggle input0(g);\n            toggle input1(g);\n            led output(g, \"OUTPUT\", false);\n\n            make_edge(input0.get_out(), input_port<0>(a));\n            make_edge(input1.get_out(), input_port<1>(a));\n            make_edge(output_port<0>(a), output.get_in());\n\n            if (!silent)\n                printf(\"Testing and_gate...\\n\");\n            input1.activate();\n            input0.activate(); // 0 0\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == low);\n            input0.flip(); // 0 1\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == low);\n            input1.flip();\n            input0.flip(); // 1 0\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == low);\n            input0.flip(); // 1 1\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == high);\n        }\n\n        { // test three-input or_gate: 000, 001, 010, 100, 011, 101, 110, 111\n            or_gate<3> o(g);\n            toggle input0(g);\n            toggle input1(g);\n            toggle input2(g);\n            led output(g, \"OUTPUT\", false);\n\n            make_edge(input0.get_out(), input_port<0>(o));\n            make_edge(input1.get_out(), input_port<1>(o));\n            make_edge(input2.get_out(), input_port<2>(o));\n            make_edge(output_port<0>(o), output.get_in());\n\n            if (!silent)\n                printf(\"Testing or_gate...\\n\");\n            input2.activate();\n            input1.activate();\n            input0.activate(); // 0 0 0\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == low);\n            input0.flip(); // 0 0 1\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == high);\n            input1.flip();\n            input0.flip(); // 0 1 0\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == high);\n            input2.flip();\n            input1.flip(); // 1 0 0\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == high);\n            input2.flip();\n            input1.flip();\n            input0.flip(); // 0 1 1\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == high);\n            input2.flip();\n            input1.flip(); // 1 0 1\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == high);\n            input1.flip();\n            input0.flip(); // 1 1 0\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == high);\n            input0.flip(); // 1 1 1\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == high);\n        }\n\n        { // test two-input xor_gate: 00, 01, 10, 11\n            xor_gate<2> x(g);\n            toggle input0(g);\n            toggle input1(g);\n            led output(g, \"OUTPUT\", false);\n\n            make_edge(input0.get_out(), input_port<0>(x));\n            make_edge(input1.get_out(), input_port<1>(x));\n            make_edge(output_port<0>(x), output.get_in());\n\n            if (!silent)\n                printf(\"Testing xor_gate...\\n\");\n            input1.activate();\n            input0.activate(); // 0 0\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == low);\n            input0.flip(); // 0 1\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == high);\n            input1.flip();\n            input0.flip(); // 1 0\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == high);\n            input0.flip(); // 1 1\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == low);\n        }\n\n        { // test two-input nor_gate: 00, 01, 10, 11\n            nor_gate<2> n(g);\n            toggle input0(g);\n            toggle input1(g);\n            led output(g, \"OUTPUT\", false);\n\n            make_edge(input0.get_out(), input_port<0>(n));\n            make_edge(input1.get_out(), input_port<1>(n));\n            make_edge(output_port<0>(n), output.get_in());\n\n            if (!silent)\n                printf(\"Testing nor_gate...\\n\");\n            input1.activate();\n            input0.activate(); // 0 0\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == high);\n            input0.flip(); // 0 1\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == low);\n            input1.flip();\n            input0.flip(); // 1 0\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == low);\n            input0.flip(); // 1 1\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == low);\n        }\n\n        { // test steady_signal and digit\n            steady_signal input0(g, high);\n            steady_signal input1(g, low);\n            and_gate<2> a(g);\n            or_gate<2> o(g);\n            xor_gate<2> x(g);\n            nor_gate<2> n(g);\n            digit output(g, \"OUTPUT\", false);\n\n            make_edge(input0.get_out(), input_port<0>(a));\n            make_edge(input1.get_out(), input_port<1>(a));\n            make_edge(output_port<0>(a), input_port<0>(output));\n\n            make_edge(input0.get_out(), input_port<0>(o));\n            make_edge(input1.get_out(), input_port<1>(o));\n            make_edge(output_port<0>(o), input_port<1>(output));\n\n            make_edge(input0.get_out(), input_port<0>(x));\n            make_edge(input1.get_out(), input_port<1>(x));\n            make_edge(output_port<0>(x), input_port<2>(output));\n\n            make_edge(input0.get_out(), input_port<0>(n));\n            make_edge(input1.get_out(), input_port<1>(n));\n            make_edge(output_port<0>(n), input_port<3>(output));\n\n            if (!silent)\n                printf(\"Testing steady_signal...\\n\");\n            input0.activate(); // 1\n            input1.activate(); // 0\n            g.wait_for_all();\n            if (!silent)\n                output.display();\n            assert(output.get_value() == 6);\n        }\n\n        { // test push_button\n            push_button p(g);\n            buffer b(g);\n            led output(g, \"OUTPUT\", !silent); // true means print all LED state changes\n\n            make_edge(p.get_out(), input_port<0>(b));\n            make_edge(output_port<0>(b), output.get_in());\n\n            if (!silent)\n                printf(\"Testing push_button...\\n\");\n            p.press();\n            p.release();\n            p.press();\n            p.release();\n            g.wait_for_all();\n        }\n\n        { // test one_bit_adder\n            one_bit_adder my_adder(g);\n            toggle A(g);\n            toggle B(g);\n            toggle CarryIN(g);\n            led Sum(g, \"SUM\");\n            led CarryOUT(g, \"CarryOUT\");\n\n            make_edge(A.get_out(), input_port<P::A0>(my_adder));\n            make_edge(B.get_out(), input_port<P::B0>(my_adder));\n            make_edge(CarryIN.get_out(), input_port<P::CI>(my_adder));\n            make_edge(output_port<P::S0>(my_adder), Sum.get_in());\n            make_edge(output_port<1>(my_adder), CarryOUT.get_in());\n\n            A.activate();\n            B.activate();\n            CarryIN.activate();\n\n            if (!silent)\n                printf(\"A on\\n\");\n            A.flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == high) && (CarryOUT.get_value() == low));\n\n            if (!silent)\n                printf(\"A off\\n\");\n            A.flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == low) && (CarryOUT.get_value() == low));\n\n            if (!silent)\n                printf(\"B on\\n\");\n            B.flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == high) && (CarryOUT.get_value() == low));\n            if (!silent)\n                printf(\"B off\\n\");\n            B.flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == low) && (CarryOUT.get_value() == low));\n\n            if (!silent)\n                printf(\"CarryIN on\\n\");\n            CarryIN.flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == high) && (CarryOUT.get_value() == low));\n            if (!silent)\n                printf(\"CarryIN off\\n\");\n            CarryIN.flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == low) && (CarryOUT.get_value() == low));\n\n            if (!silent)\n                printf(\"A&B on\\n\");\n            A.flip();\n            B.flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == low) && (CarryOUT.get_value() == high));\n            if (!silent)\n                printf(\"A&B off\\n\");\n            A.flip();\n            B.flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == low) && (CarryOUT.get_value() == low));\n\n            if (!silent)\n                printf(\"A&CarryIN on\\n\");\n            A.flip();\n            CarryIN.flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == low) && (CarryOUT.get_value() == high));\n            if (!silent)\n                printf(\"A&CarryIN off\\n\");\n            A.flip();\n            CarryIN.flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == low) && (CarryOUT.get_value() == low));\n\n            if (!silent)\n                printf(\"B&CarryIN on\\n\");\n            B.flip();\n            CarryIN.flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == low) && (CarryOUT.get_value() == high));\n            if (!silent)\n                printf(\"B&CarryIN off\\n\");\n            B.flip();\n            CarryIN.flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == low) && (CarryOUT.get_value() == low));\n\n            if (!silent)\n                printf(\"A&B&CarryIN on\\n\");\n            A.flip();\n            B.flip();\n            CarryIN.flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == high) && (CarryOUT.get_value() == high));\n            if (!silent)\n                printf(\"A&B&CarryIN off\\n\");\n            A.flip();\n            B.flip();\n            CarryIN.flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == low) && (CarryOUT.get_value() == low));\n        }\n\n#if USE_TWO_BIT_FULL_ADDER\n        { // test two_bit_adder\n            if (!silent)\n                printf(\"testing two_bit adder\\n\");\n            two_bit_adder two_adder(g);\n            std::vector<toggle> A(2, toggle(g));\n            std::vector<toggle> B(2, toggle(g));\n            toggle CarryIN(g);\n            digit Sum(g, \"SUM\");\n            led CarryOUT(g, \"CarryOUT\");\n\n            make_edge(A[0].get_out(), input_port<P::A0>(two_adder));\n            make_edge(B[0].get_out(), input_port<P::B0>(two_adder));\n            make_edge(output_port<P::S0>(two_adder), input_port<0>(Sum));\n\n            make_edge(A[1].get_out(), input_port<P::A1>(two_adder));\n            make_edge(B[1].get_out(), input_port<P::B1>(two_adder));\n            make_edge(output_port<P::S1>(two_adder), input_port<1>(Sum));\n\n            make_edge(CarryIN.get_out(), input_port<P::CI>(two_adder));\n            make_edge(output_port<P::CO>(two_adder), CarryOUT.get_in());\n\n            // Activate all switches at low state\n            for (int i = 0; i < 2; ++i) {\n                A[i].activate();\n                B[i].activate();\n            }\n            CarryIN.activate();\n\n            if (!silent)\n                printf(\"1+0\\n\");\n            A[0].flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == 1) && (CarryOUT.get_value() == low));\n\n            if (!silent)\n                printf(\"0+1\\n\");\n            A[0].flip();\n            B[0].flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == 1) && (CarryOUT.get_value() == low));\n        }\n#else\n        { // test four_bit_adder\n            four_bit_adder four_adder(g);\n            std::vector<toggle> A(4, toggle(g));\n            std::vector<toggle> B(4, toggle(g));\n            toggle CarryIN(g);\n            digit Sum(g, \"SUM\");\n            led CarryOUT(g, \"CarryOUT\");\n\n            make_edge(A[0].get_out(), input_port<P::A0>(four_adder));\n            make_edge(B[0].get_out(), input_port<P::B0>(four_adder));\n            make_edge(output_port<P::S0>(four_adder), input_port<0>(Sum));\n\n            make_edge(A[1].get_out(), input_port<P::A1>(four_adder));\n            make_edge(B[1].get_out(), input_port<P::B1>(four_adder));\n            make_edge(output_port<P::S1>(four_adder), input_port<1>(Sum));\n\n            make_edge(A[2].get_out(), input_port<P::A2>(four_adder));\n            make_edge(B[2].get_out(), input_port<P::B2>(four_adder));\n            make_edge(output_port<P::S2>(four_adder), input_port<2>(Sum));\n\n            make_edge(A[3].get_out(), input_port<P::A3>(four_adder));\n            make_edge(B[3].get_out(), input_port<P::B3>(four_adder));\n            make_edge(output_port<P::S3>(four_adder), input_port<3>(Sum));\n\n            make_edge(CarryIN.get_out(), input_port<P::CI>(four_adder));\n            make_edge(output_port<P::CO>(four_adder), CarryOUT.get_in());\n\n            // Activate all switches at low state\n            for (int i = 0; i < 4; ++i) {\n                A[i].activate();\n                B[i].activate();\n            }\n            CarryIN.activate();\n\n            if (!silent)\n                printf(\"1+0\\n\");\n            A[0].flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == 1) && (CarryOUT.get_value() == low));\n\n            if (!silent)\n                printf(\"0+1\\n\");\n            A[0].flip();\n            B[0].flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == 1) && (CarryOUT.get_value() == low));\n\n            if (!silent)\n                printf(\"3+4\\n\");\n            A[0].flip();\n            A[1].flip();\n            B[0].flip();\n            B[2].flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == 7) && (CarryOUT.get_value() == low));\n\n            if (!silent)\n                printf(\"6+1\\n\");\n            A[0].flip();\n            A[2].flip();\n            B[0].flip();\n            B[2].flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == 7) && (CarryOUT.get_value() == low));\n\n            if (!silent)\n                printf(\"0+0+carry\\n\");\n            A[1].flip();\n            A[2].flip();\n            B[0].flip();\n            CarryIN.flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == 1) && (CarryOUT.get_value() == low));\n\n            if (!silent)\n                printf(\"15+15+carry\\n\");\n            A[0].flip();\n            A[1].flip();\n            A[2].flip();\n            A[3].flip();\n            B[0].flip();\n            B[1].flip();\n            B[2].flip();\n            B[3].flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == 0xf) && (CarryOUT.get_value() == high));\n\n            if (!silent)\n                printf(\"8+8\\n\");\n            A[0].flip();\n            A[1].flip();\n            A[2].flip();\n            B[0].flip();\n            B[1].flip();\n            B[2].flip();\n            CarryIN.flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == 0) && (CarryOUT.get_value() == high));\n\n            if (!silent)\n                printf(\"0+0\\n\");\n            A[3].flip();\n            B[3].flip();\n            g.wait_for_all();\n            if (!silent)\n                Sum.display();\n            if (!silent)\n                CarryOUT.display();\n            assert((Sum.get_value() == 0) && (CarryOUT.get_value() == low));\n        }\n#endif\n\n        { // test D_latch\n            D_latch my_d_latch(g);\n            toggle D(g);\n            pulse E(g, 500, 4); // clock changes every 500ms; stops after 4 changes\n            led Q(g, \" Q\", verbose); // if true, LEDs print at every state change\n            led notQ(g, \"~Q\", verbose);\n\n            make_edge(D.get_out(), input_port<0>(my_d_latch));\n            make_edge(E.get_out(), input_port<1>(my_d_latch));\n            make_edge(output_port<0>(my_d_latch), Q.get_in());\n            make_edge(output_port<1>(my_d_latch), notQ.get_in());\n\n            D.activate();\n\n            if (!silent)\n                printf(\"Toggling D\\n\");\n            E.activate();\n            D.flip();\n            g.wait_for_all();\n            if (!silent && !verbose) {\n                Q.display();\n                notQ.display();\n            }\n            assert((Q.get_value() == high) && (notQ.get_value() == low));\n            E.reset();\n\n            if (!silent)\n                printf(\"Toggling D\\n\");\n            E.activate();\n            D.flip();\n            g.wait_for_all();\n            if (!silent && !verbose) {\n                Q.display();\n                notQ.display();\n            }\n            assert((Q.get_value() == low) && (notQ.get_value() == high));\n            E.reset();\n\n            if (!silent)\n                printf(\"Toggling D\\n\");\n            E.activate();\n            D.flip();\n            g.wait_for_all();\n            if (!silent && !verbose) {\n                Q.display();\n                notQ.display();\n            }\n            assert((Q.get_value() == high) && (notQ.get_value() == low));\n            E.reset();\n\n            if (!silent)\n                printf(\"Toggling D\\n\");\n            E.activate();\n            D.flip();\n            g.wait_for_all();\n            if (!silent && !verbose) {\n                Q.display();\n                notQ.display();\n            }\n            assert((Q.get_value() == low) && (notQ.get_value() == high));\n            E.reset();\n\n            if (!silent)\n                printf(\"Toggling D\\n\");\n            E.activate();\n            D.flip();\n            g.wait_for_all();\n            if (!silent && !verbose) {\n                Q.display();\n                notQ.display();\n            }\n            assert((Q.get_value() == high) && (notQ.get_value() == low));\n        }\n    }\n    utility::report_elapsed_time((oneapi::tbb::tick_count::now() - start).seconds());\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/graph/logic_sim/two_bit_adder.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TBB_examples_logic_sim_tba_H\n#define TBB_examples_logic_sim_tba_H\n\n#include \"one_bit_adder.hpp\"\n\nclass two_bit_adder : public oneapi::tbb::flow::composite_node<\n                          std::tuple<signal_t, signal_t, signal_t, signal_t, signal_t>,\n                          std::tuple<signal_t, signal_t, signal_t>> {\n    oneapi::tbb::flow::graph& my_graph;\n    std::vector<one_bit_adder> two_adders;\n    typedef oneapi::tbb::flow::composite_node<\n        std::tuple<signal_t, signal_t, signal_t, signal_t, signal_t>,\n        std::tuple<signal_t, signal_t, signal_t>>\n        base_type;\n\npublic:\n    two_bit_adder(oneapi::tbb::flow::graph& g)\n            : base_type(g),\n              my_graph(g),\n              two_adders(2, one_bit_adder(g)) {\n        make_connections();\n        set_up_composite();\n    }\n    two_bit_adder(const two_bit_adder& src)\n            : base_type(src.my_graph),\n              my_graph(src.my_graph),\n              two_adders(2, one_bit_adder(src.my_graph)) {\n        make_connections();\n        set_up_composite();\n    }\n    ~two_bit_adder() {}\n\nprivate:\n    void make_connections() {\n        make_edge(output_port<1>(two_adders[0]), input_port<0>(two_adders[1]));\n    }\n    void set_up_composite() {\n        base_type::input_ports_type input_tuple(input_port<0>(two_adders[0] /*CI*/),\n                                                input_port<1>(two_adders[0]),\n                                                input_port<2>(two_adders[0]),\n                                                input_port<1>(two_adders[1]),\n                                                input_port<2>(two_adders[1]));\n\n        base_type::output_ports_type output_tuple(output_port<0>(two_adders[0]),\n                                                  output_port<0>(two_adders[1]),\n                                                  output_port<1>(two_adders[1] /*CO*/));\n        base_type::set_external_ports(input_tuple, output_tuple);\n    }\n};\n\n#endif /* TBB_examples_logic_sim_tba_H */\n"
  },
  {
    "path": "third-party/tbb/examples/graph/som/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\ninclude(../../common/cmake/common.cmake)\nproject(som CXX)\nset_common_project_settings(tbb)\n\nadd_executable(som som_graph.cpp som.cpp)\n\ntarget_link_libraries(som TBB::tbb Threads::Threads)\ntarget_compile_options(som PRIVATE ${TBB_CXX_STD_FLAG})\n\nset(EXECUTABLE \"$<TARGET_FILE:som>\")\nset(ARGS)\nset(LIGHT_ARGS 4)\n\nadd_execution_target(run_som som ${EXECUTABLE} \"${ARGS}\")\nadd_execution_target(light_test_som som ${EXECUTABLE} \"${LIGHT_ARGS}\")\n"
  },
  {
    "path": "third-party/tbb/examples/graph/som/README.md",
    "content": "# Self-Organizing Map (SOM) sample\nThe Self-Organizing Map demonstrates `oneapi::tbb::flow` and the use of cancellation in scheduling multiple iterations of map updates.\n\nFor tutorials on Self-organizing Maps, see [here](http://www.ai-junkie.com/ann/som/som1.html) and [here](http://davis.wpi.edu/~matt/courses/soms/).\n\nThe program trains the map with several examples, splitting the map into subsections and looking for best-match for multiple examples. When an example is used to update the map, the graphs examining the sections being updated for the next example are cancelled and restarted after the update.\n\n## Building the example\n```\ncmake <path_to_example>\ncmake --build .\n```\n\n## Running the sample\n### Predefined make targets\n* `make run_som` - executes the example with predefined parameters.\n* `make light_test_som` - executes the example with suggested parameters to reduce execution time.\n\n### Application parameters\nUsage:\n```\nsom [n-of-threads=value] [radius-fraction=value] [number-of-epochs=value] [cancel-test] [debug] [nospeculate] [-h] [n-of-threads [radius-fraction [number-of-epochs]]]\n```\n* `-h` - prints the help for command line options.\n* `n-of-threads` - number of threads to use; a range of the form low\\[:high\\], where low and optional high are non-negative integers or `auto` for the oneTBB default.\n* `radius-fraction` - size of radius at which to start speculating.\n* `number-of-epochs` - number of examples used in learning phase.\n* `cancel-test` - test for cancel signal while finding BMU.\n* `debug` - additional output.\n* `nospeculate` - don't speculate in SOM map teaching.\n"
  },
  {
    "path": "third-party/tbb/examples/graph/som/som.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//\n// Self-organizing map in TBB flow::graph\n//\n// we will do a color map (the simple example.)\n//\n//  serial algorithm\n//\n//       initialize map with vectors (could be random, gradient, or something else)\n//       for some number of iterations\n//           update radius r, weight of change L\n//           for each example V\n//               find the best matching unit\n//               for each part of map within radius of BMU W\n//                   update vector:  W(t+1) = W(t) + w(dist)*L*(V - W(t))\n\n#include \"oneapi/tbb/task_group.h\"\n\n#include \"som.hpp\"\n\nstd::ostream &operator<<(std::ostream &out, const SOM_element &s) {\n    out << \"(\";\n    for (int i = 0; i < (int)s.w.size(); ++i) {\n        out << s.w[i];\n        if (i < (int)s.w.size() - 1) {\n            out << \",\";\n        }\n    }\n    out << \")\";\n    return out;\n}\n\nvoid remark_SOM_element(const SOM_element &s) {\n    printf(\"(\");\n    for (int i = 0; i < (int)s.w.size(); ++i) {\n        printf(\"%g\", s.w[i]);\n        if (i < (int)s.w.size() - 1) {\n            printf(\",\");\n        }\n    }\n    printf(\")\");\n}\n\nstd::ostream &operator<<(std::ostream &out, const search_result_type &s) {\n    out << \"<\";\n    out << std::get<RADIUS>(s);\n    out << \", \" << std::get<XV>(s);\n    out << \", \";\n    out << std::get<YV>(s);\n    out << \">\";\n    return out;\n}\n\nvoid remark_search_result_type(const search_result_type &s) {\n    printf(\"<%g,%d,%d>\", std::get<RADIUS>(s), std::get<XV>(s), std::get<YV>(s));\n}\n\ndouble randval(double lowlimit, double highlimit) {\n    return double(rand()) / double(RAND_MAX) * (highlimit - lowlimit) + lowlimit;\n}\n\nvoid find_data_ranges(teaching_vector_type &teaching,\n                      SOM_element &max_range,\n                      SOM_element &min_range) {\n    if (teaching.size() == 0)\n        return;\n    max_range = min_range = teaching[0];\n    for (int i = 1; i < (int)teaching.size(); ++i) {\n        max_range.elementwise_max(teaching[i]);\n        min_range.elementwise_min(teaching[i]);\n    }\n}\n\nvoid add_fraction_of_difference(SOM_element &to, SOM_element const &from, double frac) {\n    for (int i = 0; i < (int)from.size(); ++i) {\n        to[i] += frac * (from[i] - to[i]);\n    }\n}\n\ndouble distance_squared(SOM_element x, SOM_element y) {\n    double rval = 0.0;\n    for (int i = 0; i < (int)x.size(); ++i) {\n        double diff = x[i] - y[i];\n        rval += diff * diff;\n    }\n    return rval;\n}\n\nvoid SOMap::initialize(InitializeType it, SOM_element &max_range, SOM_element &min_range) {\n    for (int x = 0; x < xMax; ++x) {\n        for (int y = 0; y < yMax; ++y) {\n            for (int i = 0; i < (int)max_range.size(); ++i) {\n                if (it == InitializeRandom) {\n                    my_map[x][y][i] = (randval(min_range[i], max_range[i]));\n                }\n                else if (it == InitializeGradient) {\n                    my_map[x][y][i] =\n                        ((double)(x + y) / (xMax + yMax) * (max_range[i] - min_range[i]) +\n                         min_range[i]);\n                }\n            }\n        }\n    }\n}\n\n// subsquare [low,high)\ndouble SOMap::BMU_range(const SOM_element &s, int &xval, int &yval, subsquare_type &r) {\n    double min_distance_squared = DBL_MAX;\n    int min_x = -1;\n    int min_y = -1;\n    for (int x = r.rows().begin(); x != r.rows().end(); ++x) {\n        for (int y = r.cols().begin(); y != r.cols().end(); ++y) {\n            double dist = distance_squared(s, my_map[x][y]);\n            if (dist < min_distance_squared) {\n                min_distance_squared = dist;\n                min_x = x;\n                min_y = y;\n            }\n            if (cancel_test && oneapi::tbb::is_current_task_group_canceling()) {\n                xval = r.rows().begin();\n                yval = r.cols().begin();\n                return DBL_MAX;\n            }\n        }\n    }\n    xval = min_x;\n    yval = min_y;\n    return sqrt(min_distance_squared);\n}\n\nvoid SOMap::epoch_update_range(SOM_element const &s,\n                               int epoch,\n                               int min_x,\n                               int min_y,\n                               double radius,\n                               double learning_rate,\n                               oneapi::tbb::blocked_range<int> &r) {\n    int min_xiter = (int)((double)min_x - radius);\n    if (min_xiter < 0)\n        min_xiter = 0;\n    int max_xiter = (int)((double)min_x + radius);\n    if (max_xiter > (int)my_map.size() - 1)\n        max_xiter = (int)my_map.size() - 1;\n    for (int xx = r.begin(); xx <= r.end(); ++xx) {\n        double xrsq = (xx - min_x) * (xx - min_x);\n        double ysq = radius * radius - xrsq; // max extent of y influence\n        double yd;\n        if (ysq > 0) {\n            yd = sqrt(ysq);\n            int lb = (int)(min_y - yd);\n            int ub = (int)(min_y + yd);\n            for (int yy = lb; yy < ub; ++yy) {\n                if (yy >= 0 && yy < (int)my_map[xx].size()) {\n                    // [xx, yy] is in the range of the update.\n                    double my_rsq = xrsq + (yy - min_y) * (yy - min_y); // distance from BMU squared\n                    double theta = exp(-(radius * radius) / (2.0 * my_rsq));\n                    add_fraction_of_difference(my_map[xx][yy], s, theta * learning_rate);\n                }\n            }\n        }\n    }\n}\n\nvoid SOMap::teach(teaching_vector_type &in) {\n    for (int i = 0; i < nPasses; ++i) {\n        int j = (int)(randval(0, (double)in.size())); // this won't be reproducible.\n        if (j == in.size())\n            --j;\n\n        int min_x = -1;\n        int min_y = -1;\n        subsquare_type br2(0, (int)my_map.size(), 1, 0, (int)my_map[0].size(), 1);\n        (void)BMU_range(in[j], min_x, min_y, br2); // just need min_x, min_y\n        // radius of interest\n        double radius = max_radius * exp(-(double)i * radius_decay_rate);\n        // update circle is min_xiter to max_xiter inclusive.\n        double learning_rate = max_learning_rate * exp(-(double)i * learning_decay_rate);\n        epoch_update(in[j], i, min_x, min_y, radius, learning_rate);\n    }\n}\n\nvoid SOMap::debug_output() {\n    printf(\"SOMap:\\n\");\n    for (int i = 0; i < (int)(this->my_map.size()); ++i) {\n        for (int j = 0; j < (int)(this->my_map[i].size()); ++j) {\n            printf(\"map[%d, %d] == \", i, j);\n            remark_SOM_element(this->my_map[i][j]);\n            printf(\"\\n\");\n        }\n    }\n}\n\n#define RED   0\n#define GREEN 1\n#define BLUE  2\n\nvoid readInputData() {\n    my_teaching.push_back(SOM_element());\n    my_teaching.push_back(SOM_element());\n    my_teaching.push_back(SOM_element());\n    my_teaching.push_back(SOM_element());\n    my_teaching.push_back(SOM_element());\n    my_teaching[0][RED] = 1.0;\n    my_teaching[0][GREEN] = 0.0;\n    my_teaching[0][BLUE] = 0.0;\n    my_teaching[1][RED] = 0.0;\n    my_teaching[1][GREEN] = 1.0;\n    my_teaching[1][BLUE] = 0.0;\n    my_teaching[2][RED] = 0.0;\n    my_teaching[2][GREEN] = 0.0;\n    my_teaching[2][BLUE] = 1.0;\n    my_teaching[3][RED] = 0.3;\n    my_teaching[3][GREEN] = 0.3;\n    my_teaching[3][BLUE] = 0.0;\n    my_teaching[4][RED] = 0.5;\n    my_teaching[4][GREEN] = 0.5;\n    my_teaching[4][BLUE] = 0.9;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/graph/som/som.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//\n// Self-organizing map\n//\n// support for self-ordering maps\n\n#ifndef TBB_examples_som_H\n#define TBB_examples_som_H\n\n#include <cmath>\n#include <cfloat>\n#include <cstdio>\n#include <cstdlib>\n\n#include <vector>\n#include <iostream>\n#include <tuple>\n\n#include \"oneapi/tbb/blocked_range2d.h\"\n\ntypedef oneapi::tbb::blocked_range2d<int> subsquare_type;\ntypedef std::tuple<double, int, int> search_result_type;\n\nstd::ostream &operator<<(std::ostream &out, const search_result_type &s);\n\n#define RADIUS 0 // for the std::gets\n#define XV     1\n#define YV     2\n\n// to have single definitions of static variables, define _MAIN_C_ in the main program\n//\n#ifdef _MAIN_C_\n#define DEFINE  // nothing\n#define INIT(n) = n\n#else // not in main file\n#define DEFINE  extern\n#define INIT(n) // nothing\n#endif // _MAIN_C_\n\nDEFINE int nElements INIT(3); // length of input vectors, matching vector in map\nDEFINE double max_learning_rate INIT(0.8); // decays exponentially\nDEFINE double radius_decay_rate;\nDEFINE double learning_decay_rate INIT(0.005);\nDEFINE double max_radius;\nDEFINE bool extra_debug INIT(false);\nDEFINE bool cancel_test INIT(false);\n\nDEFINE int xMax INIT(100);\nDEFINE int yMax INIT(100);\nDEFINE int nPasses INIT(100);\n\nenum InitializeType { InitializeRandom, InitializeGradient };\n#define RED   0\n#define GREEN 1\n#define BLUE  2\nclass SOM_element;\nvoid remark_SOM_element(const SOM_element &s);\n\n// all SOM_element vectors are the same length (nElements), so we do not have\n// to range-check the vector accesses.\nclass SOM_element {\n    std::vector<double> w;\n\npublic:\n    friend std::ostream &operator<<(std::ostream &out, const SOM_element &s);\n    friend void remark_SOM_element(const SOM_element &s);\n    SOM_element() : w(nElements, 0.0) {}\n    double &operator[](int indx) {\n        return w.at(indx);\n    }\n    const double &operator[](int indx) const {\n        return w.at(indx);\n    }\n    bool operator==(SOM_element const &other) const {\n        for (std::size_t i = 0; i < size(); ++i) {\n            if (w[i] != other.w[i]) {\n                return false;\n            }\n        }\n        return true;\n    }\n    bool operator!=(SOM_element const &other) const {\n        return !operator==(other);\n    }\n    void elementwise_max(SOM_element const &other) {\n        for (std::size_t i = 0; i < w.size(); ++i)\n            if (w[i] < other.w[i])\n                w[i] = other.w[i];\n    }\n    void elementwise_min(SOM_element const &other) {\n        for (std::size_t i = 0; i < w.size(); ++i)\n            if (w[i] > other.w[i])\n                w[i] = other.w[i];\n    }\n    std::size_t size() const {\n        return w.size();\n    }\n};\n\ntypedef std::vector<SOM_element> teaching_vector_type;\n\nDEFINE SOM_element max_range;\nDEFINE SOM_element min_range;\n\nextern double randval(double lowlimit, double highlimit);\n\nextern void find_data_ranges(teaching_vector_type &teaching,\n                             SOM_element &max_range,\n                             SOM_element &min_range);\n\nextern void add_fraction_of_difference(SOM_element &to, SOM_element &from, double frac);\n\nDEFINE teaching_vector_type my_teaching;\n\nclass SOMap {\n    std::vector<std::vector<SOM_element>> my_map;\n\npublic:\n    SOMap(int xSize, int ySize) {\n        my_map.reserve(xSize);\n        for (int i = 0; i < xSize; ++i) {\n            my_map.push_back(teaching_vector_type());\n            my_map[i].reserve(ySize);\n            for (int j = 0; j < ySize; ++j) {\n                my_map[i].push_back(SOM_element());\n            }\n        }\n    }\n    std::size_t size() {\n        return my_map.size();\n    }\n    void initialize(InitializeType it, SOM_element &max_range, SOM_element &min_range);\n    teaching_vector_type &operator[](int indx) {\n        return my_map[indx];\n    }\n    SOM_element &at(int xVal, int yVal) {\n        return my_map[xVal][yVal];\n    }\n    SOM_element &at(search_result_type const &s) {\n        return my_map[std::get<1>(s)][std::get<2>(s)];\n    }\n    void epoch_update(SOM_element const &s,\n                      int epoch,\n                      int min_x,\n                      int min_y,\n                      double radius,\n                      double learning_rate) {\n        int min_xiter = (int)((double)min_x - radius);\n        if (min_xiter < 0)\n            min_xiter = 0;\n        int max_xiter = (int)((double)min_x + radius);\n        if (max_xiter > (int)my_map.size() - 1)\n            max_xiter = (int)(my_map.size() - 1);\n        oneapi::tbb::blocked_range<int> br1(min_xiter, max_xiter, 1);\n        epoch_update_range(s, epoch, min_x, min_y, radius, learning_rate, br1);\n    }\n    void epoch_update_range(SOM_element const &s,\n                            int epoch,\n                            int min_x,\n                            int min_y,\n                            double radius,\n                            double learning_rate,\n                            oneapi::tbb::blocked_range<int> &r);\n    void teach(teaching_vector_type &id);\n    void debug_output();\n    // find BMU given an input, returns distance\n    double BMU_range(const SOM_element &s, int &xval, int &yval, subsquare_type &r);\n    double BMU(const SOM_element &s, int &xval, int &yval) {\n        subsquare_type br(0, (int)my_map.size(), 1, 0, (int)my_map[0].size(), 1);\n        return BMU_range(s, xval, yval, br);\n    }\n};\n\nextern double distance_squared(SOM_element x, SOM_element y);\nvoid remark_SOM_element(const SOM_element &s);\n\nextern void readInputData();\n#endif // TBB_examples_som_H\n"
  },
  {
    "path": "third-party/tbb/examples/graph/som/som_graph.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//\n// Self-organizing map in TBB flow::graph\n//\n//   This is an example of the use of cancellation in a graph.  After a point in searching for\n//   the best match for an example, two examples are looked for simultaneously.  When the\n//   earlier example is found and the update radius is determined, the affected searches\n//   for the subsequent example are cancelled, and after the update they are restarted.\n//   As the update radius shrinks fewer searches are cancelled, and by the last iterations\n//   virtually all the work done for the speculating example is useful.\n//\n// first, a simple implementation with only one example vector\n// at a time.\n//\n// we will do a color map (the simple example.)\n//\n//  graph algorithm\n//\n//       for some number of iterations\n//           update radius r, weight of change L\n//           for each example V\n//               use graph to find BMU\n//               for each part of map within radius of BMU W\n//                   update vector:  W(t+1) = W(t) + w(dist)*L*(V - W(t))\n\n#ifndef NOMINMAX\n#define NOMINMAX\n#endif // NOMINMAX\n\n#include <algorithm>\n\n#define _MAIN_C_ 1\n#include \"som.hpp\"\n\n#include \"oneapi/tbb/flow_graph.h\"\n#include \"oneapi/tbb/blocked_range2d.h\"\n#include \"oneapi/tbb/tick_count.h\"\n#include \"oneapi/tbb/task_arena.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include \"common/utility/utility.hpp\"\n#include \"common/utility/get_default_num_threads.hpp\"\n\n#define RED   0\n#define GREEN 1\n#define BLUE  2\n\nstatic int xranges = 1;\nstatic int yranges = 1;\nstatic int xsize = -1;\nstatic int ysize = -1;\n\nstatic int global_i = 0;\nstatic int speculation_start;\n\n#if EXTRA_DEBUG\nstd::vector<int> cancel_count;\nstd::vector<int> extra_count;\nstd::vector<int> missing_count;\nstd::vector<int> canceled_before;\n#endif\nstd::vector<int> function_node_execs;\nstatic int xRangeMax = 3;\nstatic int yRangeMax = 3;\nstatic bool dont_speculate = false;\nstatic search_result_type last_update;\n\nclass BMU_search_body {\n    SOMap &my_map;\n    subsquare_type my_square;\n    int &fn_tally;\n\npublic:\n    BMU_search_body(SOMap &_m, subsquare_type &_sq, int &fnt)\n            : my_map(_m),\n              my_square(_sq),\n              fn_tally(fnt) {}\n    BMU_search_body(const BMU_search_body &other)\n            : my_map(other.my_map),\n              my_square(other.my_square),\n              fn_tally(other.fn_tally) {}\n    search_result_type operator()(const SOM_element s) {\n        int my_x;\n        int my_y;\n        double min_dist = my_map.BMU_range(s, my_x, my_y, my_square);\n        ++fn_tally; // count how many times this function_node executed\n        return search_result_type(min_dist, my_x, my_y);\n    }\n};\n\ntypedef oneapi::tbb::flow::function_node<SOM_element, search_result_type> search_node;\ntypedef oneapi::tbb::flow::broadcast_node<SOM_element> b_node;\ntypedef std::vector<search_node *> search_node_vector_type;\ntypedef std::vector<search_node_vector_type> search_node_array_type;\ntypedef std::vector<oneapi::tbb::flow::graph *> graph_vector_type;\ntypedef std::vector<graph_vector_type> graph_array_type;\n\n#define SPECULATION_CNT 2\n\noneapi::tbb::flow::graph *g[SPECULATION_CNT]; // main graph; there should only be one per epoch\nb_node *send_to[SPECULATION_CNT]; // broadcast node to send exemplar to all function_nodes\noneapi::tbb::flow::queue_node<search_result_type>\n    *q[SPECULATION_CNT]; // queue for function nodes to put their results in\n// each function_node should have its own graph\nsearch_node_array_type *s_array[SPECULATION_CNT]; // 2d array of function nodes\ngraph_array_type *g_array[SPECULATION_CNT]; // 2d array of graphs\n\n// All graphs must locate in the same arena.\noneapi::tbb::flow::graph *construct_graph(oneapi::tbb::task_arena &ta) {\n    oneapi::tbb::flow::graph *result;\n    ta.execute([&result] {\n        result = new oneapi::tbb::flow::graph();\n    });\n    return result;\n}\n\n// build a set of SPECULATION_CNT graphs, each of which consists of a broadcast_node,\n//    xranges x yranges function_nodes, and one queue_node for output.\n//    once speculation starts, if i % SPECULATION_CNT is the current graph, (i+1) % SPECULATION_CNT\n//    is the first speculation, and so on.\nvoid build_BMU_graph(SOMap &map1, oneapi::tbb::task_arena &ta) {\n    // build current graph\n    xsize = ((int)map1.size() + xranges - 1) / xranges;\n    ysize = ((int)map1[0].size() + yranges - 1) / yranges;\n    function_node_execs.clear();\n    function_node_execs.reserve(xranges * yranges + 1);\n    for (int i = 0; i < xranges * yranges + 1; ++i)\n        function_node_execs.push_back(0);\n\n    for (int scnt = 0; scnt < SPECULATION_CNT; ++scnt) {\n        g[scnt] = construct_graph(ta);\n        send_to[scnt] = new b_node(*(g[scnt])); // broadcast node to the function_nodes\n        q[scnt] = new oneapi::tbb::flow::queue_node<search_result_type>(*(g[scnt])); // output queue\n\n        // create the function_nodes, tie to the graph\n        s_array[scnt] = new search_node_array_type;\n        s_array[scnt]->reserve(xranges);\n        g_array[scnt] = new graph_array_type;\n        g_array[scnt]->reserve(xranges);\n        for (int i = 0; i < (int)map1.size(); i += xsize) {\n            int xindex = i / xsize;\n            s_array[scnt]->push_back(search_node_vector_type());\n#if EXTRA_DEBUG\n            if (s_array[scnt]->size() != xindex + 1) {\n                printf(\"Error; s_array[%d]->size() == %d, xindex== %d\\n\",\n                       scnt,\n                       (int)(s_array[scnt]->size()),\n                       xindex);\n            }\n#endif\n            (*s_array[scnt])[xindex].reserve(yranges);\n            g_array[scnt]->push_back(graph_vector_type());\n            (*g_array[scnt])[xindex].reserve(yranges);\n            for (int j = 0; j < (int)map1[0].size(); j += ysize) {\n                int offset = (i / xsize) * yranges + (j / ysize);\n                int xmax = (i + xsize) > (int)map1.size() ? (int)map1.size() : i + xsize;\n                int ymax = (j + ysize) > (int)map1[0].size() ? (int)map1[0].size() : j + ysize;\n                subsquare_type sst(i, xmax, 1, j, ymax, 1);\n                BMU_search_body bb(map1, sst, function_node_execs[offset]);\n                oneapi::tbb::flow::graph *g_local = construct_graph(ta);\n                search_node *s =\n                    new search_node(*g_local, oneapi::tbb::flow::serial, bb); // copies Body\n                (*g_array[scnt])[xindex].push_back(g_local);\n                (*s_array[scnt])[xindex].push_back(s);\n                oneapi::tbb::flow::make_edge(*(send_to[scnt]),\n                                             *s); // broadcast_node -> function_node\n                oneapi::tbb::flow::make_edge(*s, *(q[scnt])); // function_node -> queue_node\n            }\n        }\n    }\n}\n\n// Wait for the 2D array of flow::graphs.\nvoid wait_for_all_graphs(int cIndex) { // cIndex ranges over [0 .. SPECULATION_CNT - 1]\n    for (int x = 0; x < xranges; ++x) {\n        for (int y = 0; y < yranges; ++y) {\n            (*g_array[cIndex])[x][y]->wait_for_all();\n        }\n    }\n}\n\nvoid destroy_BMU_graph() {\n    for (int scnt = 0; scnt < SPECULATION_CNT; ++scnt) {\n        for (int i = 0; i < (int)(*s_array[scnt]).size(); ++i) {\n            for (int j = 0; j < (int)(*s_array[scnt])[i].size(); ++j) {\n                delete (*s_array[scnt])[i][j];\n                delete (*g_array[scnt])[i][j];\n            }\n        }\n        (*s_array[scnt]).clear();\n        delete s_array[scnt];\n        (*g_array[scnt]).clear();\n        delete g_array[scnt];\n        delete q[scnt];\n        delete send_to[scnt];\n        delete g[scnt];\n    }\n}\n\nvoid find_subrange_overlap(int const &xval,\n                           int const &yval,\n                           double const &radius,\n                           int &xlow,\n                           int &xhigh,\n                           int &ylow,\n                           int &yhigh) {\n    xlow = int((xval - radius) / xsize);\n    xhigh = int((xval + radius) / xsize);\n    ylow = int((yval - radius) / ysize);\n    yhigh = int((yval + radius) / ysize);\n    // circle may fall partly outside map\n    if (xlow < 0)\n        xlow = 0;\n    if (xhigh >= xranges)\n        xhigh = xranges - 1;\n    if (ylow < 0)\n        ylow = 0;\n    if (yhigh >= yranges)\n        yhigh = yranges - 1;\n#if EXTRA_DEBUG\n    if (xlow >= xranges)\n        printf(\" Error *** xlow == %d\\n\", xlow);\n    if (xhigh < 0)\n        printf(\"Error *** xhigh == %d\\n\", xhigh);\n    if (ylow >= yranges)\n        printf(\"Error *** ylow == %d\\n\", ylow);\n    if (yhigh < 0)\n        printf(\"Error *** yhigh == %d\\n\", yhigh);\n#endif\n}\n\nbool overlap(int &xval, int &yval, search_result_type &sr) {\n    int xlow, xhigh, ylow, yhigh;\n    find_subrange_overlap(\n        std::get<XV>(sr), std::get<YV>(sr), std::get<RADIUS>(sr), xlow, xhigh, ylow, yhigh);\n    return xval >= xlow && xval <= xhigh && yval >= ylow && yval <= yhigh;\n}\n\nvoid cancel_submaps(int &xval, int &yval, double &radius, int indx) {\n    int xlow;\n    int xhigh;\n    int ylow;\n    int yhigh;\n    find_subrange_overlap(xval, yval, radius, xlow, xhigh, ylow, yhigh);\n    for (int x = xlow; x <= xhigh; ++x) {\n        for (int y = ylow; y <= yhigh; ++y) {\n            (*g_array[indx])[x][y]->cancel();\n        }\n    }\n#if EXTRA_DEBUG\n    ++cancel_count[(xhigh - xlow + 1) * (yhigh - ylow + 1)];\n#endif\n}\n\nvoid restart_submaps(int &xval, int &yval, double &radius, int indx, SOM_element &vector) {\n    int xlow;\n    int xhigh;\n    int ylow;\n    int yhigh;\n    find_subrange_overlap(xval, yval, radius, xlow, xhigh, ylow, yhigh);\n    for (int x = xlow; x <= xhigh; ++x) {\n        for (int y = ylow; y <= yhigh; ++y) {\n            // have to reset the graph\n            (*g_array[indx])[x][y]->reset();\n            // and re-submit the exemplar for search.\n            (*s_array[indx])[x][y]->try_put(vector);\n        }\n    }\n}\n\nsearch_result_type graph_BMU(int indx) { // indx ranges over [0 .. SPECULATION_CNT -1]\n    wait_for_all_graphs(indx); // wait for the array of subgraphs\n    (g[indx])->wait_for_all();\n    std::vector<search_result_type> all_srs(xRangeMax * yRangeMax,\n                                            search_result_type(DBL_MAX, -1, -1));\n#if EXTRA_DEBUG\n    int extra_computations = 0;\n#endif\n    search_result_type sr;\n    search_result_type min_sr;\n    std::get<RADIUS>(min_sr) = DBL_MAX;\n    int result_count = 0;\n    while ((q[indx])->try_get(sr)) {\n        ++result_count;\n        // figure which submap this came from\n        int x = std::get<XV>(sr) / xsize;\n        int y = std::get<YV>(sr) / ysize;\n#if EXTRA_DEBUG\n        if (x < 0 || x >= xranges)\n            printf(\" ###  x value out of range (%d)\\n\", x);\n        if (y < 0 || y >= yranges)\n            printf(\" ###  y value out of range (%d)\\n\", y);\n#endif\n        int offset = x * yranges + y; // linearized subscript\n#if EXTRA_DEBUG\n        if (std::get<RADIUS>(all_srs[offset]) !=\n            DBL_MAX) { // we've already got a result from this subsquare\n            ++extra_computations;\n        }\n        else if (std::get<XV>(all_srs[offset]) != -1) {\n            if (extra_debug)\n                printf(\"More than one cancellation of [%d,%d] iteration %d\\n\", x, y, global_i);\n        }\n#endif\n        all_srs[offset] = sr;\n        if (std::get<RADIUS>(sr) < std::get<RADIUS>(min_sr))\n            min_sr = sr;\n        else if (std::get<RADIUS>(sr) == std::get<RADIUS>(min_sr)) {\n            if (std::get<XV>(sr) < std::get<XV>(min_sr)) {\n                min_sr = sr;\n            }\n            else if ((std::get<XV>(sr) == std::get<XV>(min_sr) &&\n                      std::get<YV>(sr) < std::get<YV>(min_sr))) {\n                min_sr = sr;\n            }\n        }\n    }\n#if EXTRA_DEBUG\n    if (result_count != xranges * yranges + extra_computations) {\n        // we are missing at least one of the expected results.  Tally the missing values\n        for (int i = 0; i < xranges * yranges; ++i) {\n            if (std::get<RADIUS>(all_srs[i]) == DBL_MAX) {\n                // i == x*yranges + y\n                int xval = i / yranges;\n                int yval = i % yranges;\n                bool received_cancel_result = std::get<XV>(all_srs[i]) != -1;\n                if (overlap(xval, yval, last_update)) {\n                    // we have previously canceled this subsquare.\n                    printf(\"No result for [%d,%d] which was canceled(%s)\\n\",\n                           xval,\n                           yval,\n                           received_cancel_result ? \"T\" : \"F\");\n                    ++canceled_before[i];\n                }\n                else {\n                    printf(\"No result for [%d,%d] which was not canceled(%s)\\n\",\n                           xval,\n                           yval,\n                           received_cancel_result ? \"T\" : \"F\");\n                }\n                ++missing_count[i];\n            }\n        }\n    }\n    if (extra_computations)\n        ++extra_count[extra_computations];\n#endif\n    return min_sr;\n    // end of one epoch\n}\n\nvoid graph_teach(SOMap &map1, teaching_vector_type &in, oneapi::tbb::task_arena &ta) {\n    build_BMU_graph(map1, ta);\n#if EXTRA_DEBUG\n    cancel_count.clear();\n    extra_count.clear();\n    missing_count.clear();\n    canceled_before.clear();\n    cancel_count.reserve(xRangeMax * yRangeMax + 1);\n    extra_count.reserve(xRangeMax * yRangeMax + 1);\n    missing_count.reserve(xRangeMax * yRangeMax + 1);\n    canceled_before.reserve(xRangeMax * yRangeMax + 1);\n    for (int i = 0; i < xRangeMax * yRangeMax + 1; ++i) {\n        cancel_count.push_back(0);\n        extra_count.push_back(0);\n        missing_count.push_back(0);\n        canceled_before.push_back(0);\n    }\n#endif\n    // normally the training would pick random exemplars to teach the SOM.  We need\n    // the process to be reproducible, so we will pick the exemplars in order, [0, in.size())\n    int next_j = 0;\n    for (int epoch = 0; epoch < nPasses; ++epoch) {\n        global_i = epoch;\n        bool canceled_submaps = false;\n        int j = next_j; // try to make reproducible\n        next_j = (epoch + 1) % in.size();\n        search_result_type min_sr;\n        if (epoch < speculation_start) {\n            (send_to[epoch % SPECULATION_CNT])->try_put(in[j]);\n        }\n        else if (epoch == speculation_start) {\n            (send_to[epoch % SPECULATION_CNT])->try_put(in[j]);\n            if (epoch < nPasses - 1) {\n                (send_to[(epoch + 1) % SPECULATION_CNT])->try_put(in[next_j]);\n            }\n        }\n        else if (epoch < nPasses - 1) {\n            (send_to[(epoch + 1) % SPECULATION_CNT])->try_put(in[next_j]);\n        }\n        min_sr = graph_BMU(epoch % SPECULATION_CNT); //calls wait_for_all()\n        double min_distance = std::get<0>(min_sr);\n        double radius = max_radius * exp(-(double)epoch * radius_decay_rate);\n        double learning_rate = max_learning_rate * exp(-(double)epoch * learning_decay_rate);\n        if (epoch >= speculation_start && epoch < (nPasses - 1)) {\n            // have to cancel the affected submaps\n            cancel_submaps(\n                std::get<XV>(min_sr), std::get<YV>(min_sr), radius, (epoch + 1) % SPECULATION_CNT);\n            canceled_submaps = true;\n        }\n        map1.epoch_update(\n            in[j], epoch, std::get<1>(min_sr), std::get<2>(min_sr), radius, learning_rate);\n        ++global_i;\n        if (canceled_submaps) {\n            // do I have to wait for all the non-canceled speculative graph to complete first?\n            // yes, in case a canceled task was already executing.\n            wait_for_all_graphs((epoch + 1) % SPECULATION_CNT); // wait for the array of subgraphs\n            restart_submaps(std::get<1>(min_sr),\n                            std::get<2>(min_sr),\n                            radius,\n                            (epoch + 1) % SPECULATION_CNT,\n                            in[next_j]);\n        }\n\n        last_update = min_sr;\n        std::get<RADIUS>(last_update) = radius; // not smallest value, but range of effect\n    }\n    destroy_BMU_graph();\n}\n\nstatic const double serial_time_adjust = 1.25;\nstatic double radius_fraction = 3.0;\n\nint main(int argc, char *argv[]) {\n    int l_speculation_start;\n    utility::thread_number_range threads(\n        utility::get_default_num_threads,\n        utility::\n            get_default_num_threads() // run only the default number of threads if none specified\n    );\n\n    utility::parse_cli_arguments(\n        argc,\n        argv,\n        utility::cli_argument_pack()\n            //\"-h\" option for for displaying help is present implicitly\n            .positional_arg(\n                threads,\n                \"n-of-threads\",\n                \"number of threads to use; a range of the form low[:high], where low and optional high are non-negative integers or 'auto' for the TBB default.\")\n            // .positional_arg(InputFileName,\"input-file\",\"input file name\")\n            // .positional_arg(OutputFileName,\"output-file\",\"output file name\")\n            .positional_arg(\n                radius_fraction, \"radius-fraction\", \"size of radius at which to start speculating\")\n            .positional_arg(\n                nPasses, \"number-of-epochs\", \"number of examples used in learning phase\")\n            .arg(cancel_test, \"cancel-test\", \"test for cancel signal while finding BMU\")\n            .arg(extra_debug, \"debug\", \"additional output\")\n            .arg(dont_speculate, \"nospeculate\", \"don't speculate in SOM map teaching\"));\n\n    readInputData();\n    max_radius = (xMax < yMax) ? yMax / 2 : xMax / 2;\n    // need this value for the 1x1 timing below\n    radius_decay_rate = -(log(1.0 / (double)max_radius) / (double)nPasses);\n    find_data_ranges(my_teaching, max_range, min_range);\n    if (extra_debug) {\n        printf(\"Data range: \");\n        remark_SOM_element(min_range);\n        printf(\" to \");\n        remark_SOM_element(max_range);\n        printf(\"\\n\");\n    }\n\n    // find how much time is taken for the single function_node case.\n    // adjust nPasses so the 1x1 time is somewhere around serial_time_adjust seconds.\n    // make sure the example test runs for at least 0.5 second.\n    for (;;) {\n        // Restrict max concurrency level via task_arena interface\n        oneapi::tbb::task_arena ta(1);\n        SOMap map1(xMax, yMax);\n        speculation_start = nPasses + 1; // Don't speculate\n\n        xranges = 1;\n        yranges = 1;\n        map1.initialize(InitializeGradient, max_range, min_range);\n        oneapi::tbb::tick_count t0 = oneapi::tbb::tick_count::now();\n        graph_teach(map1, my_teaching, ta);\n        oneapi::tbb::tick_count t1 = oneapi::tbb::tick_count::now();\n        double nSeconds = (t1 - t0).seconds();\n        if (nSeconds < 0.5) {\n            xMax *= 2;\n            yMax *= 2;\n            continue;\n        }\n        double size_adjust = sqrt(serial_time_adjust / nSeconds);\n        xMax = (int)((double)xMax * size_adjust);\n        yMax = (int)((double)yMax * size_adjust);\n        max_radius = (xMax < yMax) ? yMax / 2 : xMax / 2;\n        radius_decay_rate = log((double)max_radius) / (double)nPasses;\n\n        if (extra_debug) {\n            printf(\"original 1x1 case ran in %g seconds\\n\", nSeconds);\n            printf(\"   Size of table == %d x %d\\n\", xMax, yMax);\n            printf(\"   radius_decay_rate == %g\\n\", radius_decay_rate);\n        }\n        break;\n    }\n\n    // the \"max_radius\" starts at 1/2*radius_fraction the table size.  To start the speculation when the radius is\n    // 1 / n * the table size, the constant in the log below should be n / 2.  so 2 == 1/4, 3 == 1/6th,\n    // et c.\n    if (dont_speculate) {\n        l_speculation_start = nPasses + 1;\n        if (extra_debug)\n            printf(\"speculation will not be done\\n\");\n    }\n    else {\n        if (radius_fraction < 1.0) {\n            if (extra_debug)\n                printf(\"Warning: radius_fraction should be >= 1.  Setting to 1.\\n\");\n            radius_fraction = 1.0;\n        }\n        l_speculation_start = (int)((double)nPasses * log(radius_fraction) / log((double)nPasses));\n        if (extra_debug)\n            printf(\"We will start speculation at iteration %d\\n\", l_speculation_start);\n    }\n    double single_time; // for speedup calculations\n#if EXTRA_DEBUG\n    // storage for the single-subrange answers, for comparing maps\n    std::vector<double> single_dist;\n    single_dist.reserve(my_teaching.size());\n    std::vector<int> single_xval;\n    single_xval.reserve(my_teaching.size());\n    std::vector<int> single_yval;\n    single_yval.reserve(my_teaching.size());\n#endif\n    //TODO: Investigate how to not require mandatory concurrency\n    for (int p = std::max(threads.first, 2); p <= std::max(threads.last, 2); ++p) {\n        // Restrict max concurrency level via task_arena interface\n        oneapi::tbb::global_control limit(oneapi::tbb::global_control::max_allowed_parallelism, p);\n        oneapi::tbb::task_arena ta(p);\n        if (extra_debug)\n            printf(\" -------------- Running with %d threads. ------------\\n\", p);\n        // run the SOM build for a series of subranges\n        for (xranges = 1; xranges <= xRangeMax; ++xranges) {\n            for (yranges = xranges; yranges <= yRangeMax; ++yranges) {\n                if (xranges == 1 && yranges == 1) {\n                    // don't pointlessly speculate if we're only running one subrange.\n                    speculation_start = nPasses + 1;\n                }\n                else {\n                    speculation_start = l_speculation_start;\n                }\n                SOMap map1(xMax, yMax);\n                map1.initialize(InitializeGradient, max_range, min_range);\n\n                if (extra_debug)\n                    printf(\"Start learning for [%d,%d] ----------- \\n\", xranges, yranges);\n                oneapi::tbb::tick_count t0 = oneapi::tbb::tick_count::now();\n                graph_teach(map1, my_teaching, ta);\n                oneapi::tbb::tick_count t1 = oneapi::tbb::tick_count::now();\n\n                if (extra_debug)\n                    printf(\"Done learning for [%d,%d], which took %g seconds \",\n                           xranges,\n                           yranges,\n                           (t1 - t0).seconds());\n                if (xranges == 1 && yranges == 1)\n                    single_time = (t1 - t0).seconds();\n                if (extra_debug)\n                    printf(\": speedup == %g\\n\", single_time / (t1 - t0).seconds());\n\n#if EXTRA_DEBUG\n                if (extra_debug) {\n                    // number of times cancel was called, indexed by number of subranges canceled\n                    for (int i = 0; i < cancel_count.size(); ++i) {\n                        // only write output if we have a non-zero value.\n                        if (cancel_count[i] > 0) {\n                            int totalcnt = 0;\n                            printf(\"     cancellations: \");\n                            for (int j = 0; j < cancel_count.size(); ++j) {\n                                if (cancel_count[j]) {\n                                    printf(\" %d [%d]\", j, cancel_count[j]);\n                                    totalcnt += cancel_count[j];\n                                }\n                            }\n                            totalcnt += speculation_start;\n                            printf(\" for a total of %d\\n\", totalcnt);\n                            break; // from for\n                        }\n                    }\n\n                    // number of extra results (these occur when the subrange task starts before\n                    // cancel is received.)\n                    for (int i = 0; i < extra_count.size(); ++i) {\n                        if (extra_count[i] > 0) {\n                            int totalcnt = 0;\n                            printf(\"extra computations: \");\n                            for (int j = 0; j < extra_count.size(); ++j) {\n                                if (extra_count[j]) {\n                                    printf(\" %d[%d]\", j, extra_count[j]);\n                                    totalcnt += extra_count[j];\n                                }\n                            }\n                            totalcnt += speculation_start;\n                            printf(\" for a total of %d\\n\", totalcnt);\n                            break; // from for\n                        }\n                    }\n\n                    // here we count the number of times we looked for a particular subrange when fetching\n                    // the queue_node output and didn't find anything.  This may occur when a function_node\n                    // is \"stuck\" and doesn't process some number of exemplars.  function_node_execs is\n                    // a count of the number of times the corresponding function_node was executed (in\n                    // case the problem is dropped output in the queue_node.)\n                    for (int i = 0; i < missing_count.size(); ++i) {\n                        if (missing_count[i]) {\n                            int xval = i / yranges;\n                            int yval = i % yranges;\n                            printf(\" f_node[%d,%d] missed %d values\", xval, yval, missing_count[i]);\n                            if (canceled_before[i]) {\n                                printf(\" canceled_before == %d\", canceled_before[i]);\n                            }\n                            printf(\", fn_tally == %d\\n\", function_node_execs[i]);\n                        }\n                    }\n                }\n\n                // check that output matches the 1x1 case\n                for (int i = 0; i < my_teaching.size(); ++i) {\n                    int xdist;\n                    int ydist;\n                    double my_dist = map1.BMU(my_teaching[i], xdist, ydist);\n                    if (xranges == 1 && yranges == 1) {\n                        single_dist.push_back(my_dist);\n                        single_xval.push_back(xdist);\n                        single_yval.push_back(ydist);\n                    }\n                    else {\n                        if (single_dist[i] != my_dist || single_xval[i] != xdist ||\n                            single_yval[i] != ydist)\n                            printf(\n                                \"Error in output: expecting <%g, %d, %d>, but got <%g, %d, %d>\\n\",\n                                single_dist[i],\n                                single_xval[i],\n                                single_yval[i],\n                                my_dist,\n                                xdist,\n                                ydist);\n                    }\n                }\n#endif\n            } // yranges\n        } // xranges\n    } // #threads p\n    printf(\"done\\n\");\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/migration/README.md",
    "content": "# Code Samples of oneAPI Threading Building Blocks (oneTBB)\nExamples of migrating from TBB APIs to the oneTBB APIs.\n\n| Code sample name | Description\n|:--- |:---\n| recursive_fibonacci | Compute Fibonacci number in recursive way.\n"
  },
  {
    "path": "third-party/tbb/examples/migration/recursive_fibonacci/CMakeLists.txt",
    "content": "# Copyright (c) 2023-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(recursive_fibonacci CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(tbb)\n\nadd_executable(recursive_fibonacci fibonacci.cpp)\ntarget_link_libraries(recursive_fibonacci\n                      TBB::tbb\n                      Threads::Threads\n                      $<$<PLATFORM_ID:Linux>:rt>)  # Link \"rt\" library on Linux\ntarget_compile_options(recursive_fibonacci PRIVATE ${TBB_CXX_STD_FLAG})\n\nset(EXECUTABLE \"$<TARGET_FILE:recursive_fibonacci>\")\n\n# Parameters of executable N C I:\n# `N` - specifies the fibonacci number which would be calculated.\n# `C` - cutoff that will be used to stop recursive split.\n# `I` - number of iteration to measure benchmark time.\nset(ARGS 30 16 20 1)\nset(PERF_ARGS 50 5 20)\n\nadd_execution_target(run_recursive_fibonacci recursive_fibonacci ${EXECUTABLE} \"${ARGS}\")\nadd_execution_target(perf_run_recursive_fibonacci recursive_fibonacci ${EXECUTABLE} \"${PERF_ARGS}\")\n"
  },
  {
    "path": "third-party/tbb/examples/migration/recursive_fibonacci/README.md",
    "content": "# Fibonacci sample\nThis directory contains an example that computes Fibonacci numbers using emulation for TBB Task API.\n\n## Building the example\n```\ncmake <path_to_example>\ncmake --build .\n```\n\n## Running the sample\n### Predefined make targets\n* `make run_recursive_fibonacci` - executes the example with predefined parameters (extended testing enabled).\n* `make perf_run_recursive_fibonacci` - executes the example with suggested parameters to measure the oneTBB performance.\n\n### Application parameters\nUsage:\n```\nrecursive_fibonacci N C I T\n```\n* `N` - specifies the fibonacci number which would be calculated.\n* `C` - cutoff that will be used to stop recursive split.\n* `I` - number of iteration to measure benchmark time.\n* `T` - enables extended testing (recycle task in a loop).\n"
  },
  {
    "path": "third-party/tbb/examples/migration/recursive_fibonacci/fibonacci.cpp",
    "content": "/*\n    Copyright (c) 2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"fibonacci_single_task.h\"\n#include \"fibonacci_two_tasks.h\"\n\n#include <iostream>\n#include <numeric>\n#include <utility>\n\nint cutoff;\nbool testing_enabled;\n\ntemplate <typename F>\nstd::pair</* result */ unsigned long, /* time */ unsigned long> measure(F&& f,\n                                                                        int number,\n                                                                        unsigned long ntrial) {\n    std::vector<unsigned long> times;\n\n    unsigned long result;\n    for (unsigned long i = 0; i < ntrial; ++i) {\n        auto t1 = std::chrono::steady_clock::now();\n        result = f(number);\n        auto t2 = std::chrono::steady_clock::now();\n\n        auto time = std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1).count();\n        times.push_back(time);\n    }\n\n    return std::make_pair(\n        result,\n        static_cast<unsigned long>(std::accumulate(times.begin(), times.end(), 0) / times.size()));\n}\n\nint main(int argc, char* argv[]) {\n    int numbers = argc > 1 ? strtol(argv[1], nullptr, 0) : 50;\n    cutoff = argc > 2 ? strtol(argv[2], nullptr, 0) : 16;\n    unsigned long ntrial = argc > 3 ? (unsigned long)strtoul(argv[3], nullptr, 0) : 20;\n    testing_enabled = argc > 4 ? (bool)strtol(argv[4], nullptr, 0) : false;\n\n    auto res = measure(fibonacci_two_tasks, numbers, ntrial);\n    std::cout << \"Fibonacci two tasks impl N = \" << res.first << \" Avg time = \" << res.second\n              << \" ms\" << std::endl;\n\n    res = measure(fibonacci_single_task, numbers, ntrial);\n    std::cout << \"Fibonacci single task impl N = \" << res.first << \" Avg time = \" << res.second\n              << \" ms\" << std::endl;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/migration/recursive_fibonacci/fibonacci_single_task.h",
    "content": "/*\n    Copyright (c) 2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef SINGLE_TASK_HEADER\n#define SINGLE_TASK_HEADER\n\n#include \"task_emulation_layer.h\"\n\n#include <iostream>\n#include <numeric>\n#include <utility>\n\nextern int cutoff;\nextern bool testing_enabled;\n\nlong serial_fib_1(int n) {\n    return n < 2 ? n : serial_fib_1(n - 1) + serial_fib_1(n - 2);\n}\n\nstruct single_fib_task : task_emulation::base_task {\n    enum class state {\n        compute,\n        sum\n    };\n\n    single_fib_task(int n, int* x) : n(n), x(x), s(state::compute)\n    {}\n\n    task_emulation::base_task* execute() override {\n        task_emulation::base_task* bypass = nullptr;\n        switch (s) {\n            case state::compute : {\n                bypass = compute_impl();\n                break;\n            }\n            case state::sum : {\n                *x = x_l + x_r;\n\n                if (testing_enabled) {\n                    if (n == cutoff && num_recycles > 0) {\n                        --num_recycles;\n                        bypass = compute_impl();\n                    }\n                }\n\n                break;\n            }\n        }\n        return bypass;\n    }\n\n    task_emulation::base_task* compute_impl() {\n        task_emulation::base_task* bypass = nullptr;\n        if (n < cutoff) {\n            *x = serial_fib_1(n);\n        }\n        else {\n            bypass = this->allocate_child_and_increment<single_fib_task>(n - 2, &x_r);\n            task_emulation::run_task(this->allocate_child_and_increment<single_fib_task>(n - 1, &x_l));\n\n            // Recycling\n            this->s = state::sum;\n            this->recycle_as_continuation();\n        }\n        return bypass;\n    }\n\n\n    int n;\n    int* x;\n    state s;\n\n    int x_l{ 0 }, x_r{ 0 };\n    int num_recycles{5};\n};\n\nint fibonacci_single_task(int n) {\n    int sum{};\n    tbb::task_group tg;\n    task_emulation::run_and_wait(tg, task_emulation::allocate_root_task<single_fib_task>(/* for root task = */ tg, n, &sum));\n    return sum;\n}\n\n#endif // SINGLE_TASK_HEADER\n"
  },
  {
    "path": "third-party/tbb/examples/migration/recursive_fibonacci/fibonacci_two_tasks.h",
    "content": "/*\n    Copyright (c) 2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TWO_TASKS_HEADER\n#define TWO_TASKS_HEADER\n\n#include \"task_emulation_layer.h\"\n\n#include <iostream>\n#include <numeric>\n#include <utility>\n#include <functional>\n\nextern int cutoff;\n\nlong serial_fib(int n) {\n    return n < 2 ? n : serial_fib(n - 1) + serial_fib(n - 2);\n}\n\nstruct fib_continuation : task_emulation::base_task {\n    fib_continuation(int& s) : sum(s) {}\n\n    task_emulation::base_task* execute() override {\n        sum = x + y;\n        return nullptr;\n    }\n\n    int x{ 0 }, y{ 0 };\n    int& sum;\n};\n\nstruct fib_computation : task_emulation::base_task {\n    fib_computation(int n, int* x) : n(n), x(x) {}\n\n    task_emulation::base_task* execute() override {\n        task_emulation::base_task* bypass = nullptr;\n        if (n < cutoff) {\n            *x = serial_fib(n);\n        }\n        else {\n            // Continuation passing\n            auto& c = *this->allocate_continuation<fib_continuation>(/* children_counter = */ 2, *x);\n            task_emulation::run_task(c.create_child<fib_computation>(n - 1, &c.x));\n\n            // Recycling\n            this->recycle_as_child_of(c);\n            n = n - 2;\n            x = &c.y;\n            bypass = this;\n        }\n        return bypass;\n    }\n\n    int n;\n    int* x;\n};\n\nint fibonacci_two_tasks(int n) {\n    int sum{};\n    tbb::task_group tg;\n    tg.run_and_wait(\n        task_emulation::create_root_task<fib_computation>(/* for root task = */ tg, n, &sum));\n    return sum;\n}\n\n#endif // TWO_TASKS_HEADER\n"
  },
  {
    "path": "third-party/tbb/examples/migration/recursive_fibonacci/task_emulation_layer.h",
    "content": "/*\n    Copyright (c) 2023-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_task_emulation_layer_H\n#define __TBB_task_emulation_layer_H\n\n#include \"tbb/task_group.h\"\n#include \"tbb/task_arena.h\"\n\n#include <atomic>\n\nnamespace task_emulation {\n\nstruct task_group_pool {\n    task_group_pool() : pool_size(tbb::this_task_arena::max_concurrency()), task_submitters(new tbb::task_group[pool_size]) {}\n\n    ~task_group_pool() {\n        for (std::size_t i = 0; i < pool_size; ++i) {\n            task_submitters[i].wait();\n        }\n\n        delete [] task_submitters;\n    }\n\n    tbb::task_group& operator[] (std::size_t idx) { return task_submitters[idx]; }\n\n    const std::size_t pool_size;\n    tbb::task_group* task_submitters;\n};\n\nstatic task_group_pool tg_pool;\n\nclass base_task {\npublic:\n    base_task() = default;\n\n    base_task(const base_task& t) : m_type(t.m_type), m_parent(t.m_parent), m_child_counter(t.m_child_counter.load())\n    {}\n\n    virtual ~base_task() = default;\n\n    void operator() () const {\n        task_type type_snapshot = m_type;\n\n        base_task* bypass = const_cast<base_task*>(this)->execute();\n\n        if (m_parent && m_type != task_type::recycled) {\n            if (m_parent->remove_child_reference() == 0) {\n                m_parent->operator()();\n            }\n        }\n\n        if (m_type == task_type::allocated) {\n            delete this;\n        }\n\n        if (bypass != nullptr) {\n            m_type = type_snapshot;\n\n            // Bypass is not supported by task_emulation and next_task executed directly.\n            // However, the old-TBB bypass behavior can be achieved with\n            // `return task_group::defer()` (check Migration Guide).\n            // Consider submit another task if recursion call is not acceptable\n            // i.e. instead of Direct Body call\n            // submit task_emulation::run_task();\n            bypass->operator()();\n        }\n    }\n\n    virtual base_task* execute() = 0;\n\n    template <typename C, typename... Args>\n    C* allocate_continuation(std::uint64_t ref, Args&&... args) {\n        C* continuation = new C{std::forward<Args>(args)...};\n        continuation->m_type = task_type::allocated;\n        continuation->reset_parent(reset_parent());\n        continuation->m_child_counter = ref;\n        return continuation;\n    }\n\n    template <typename F, typename... Args>\n    F create_child(Args&&... args) {\n        return create_child_impl<F>(std::forward<Args>(args)...);\n    }\n\n    template <typename F, typename... Args>\n    F create_child_and_increment(Args&&... args) {\n        add_child_reference();\n        return create_child_impl<F>(std::forward<Args>(args)...);\n    }\n\n    template <typename F, typename... Args>\n    F* allocate_child(Args&&... args) {\n        return allocate_child_impl<F>(std::forward<Args>(args)...);\n    }\n\n    template <typename F, typename... Args>\n    F* allocate_child_and_increment(Args&&... args) {\n        add_child_reference();\n        return allocate_child_impl<F>(std::forward<Args>(args)...);\n    }\n\n    template <typename C>\n    void recycle_as_child_of(C& c) {\n        m_type = task_type::recycled;\n        reset_parent(&c);\n    }\n\n    void recycle_as_continuation() {\n        m_type = task_type::recycled;\n    }\n\n    void add_child_reference() {\n        ++m_child_counter;\n    }\n\n    std::uint64_t remove_child_reference() {\n        return --m_child_counter;\n    }\n\nprotected:\n    enum class task_type {\n        stack_based,\n        allocated,\n        recycled\n    };\n\n    mutable task_type m_type;\n\nprivate:\n    template <typename F, typename... Args>\n    friend F create_root_task(tbb::task_group& tg, Args&&... args);\n\n    template <typename F, typename... Args>\n    friend F* allocate_root_task(tbb::task_group& tg, Args&&... args);\n\n    template <typename F, typename... Args>\n    F create_child_impl(Args&&... args) {\n        F obj{std::forward<Args>(args)...};\n        obj.m_type = task_type::stack_based;\n        obj.reset_parent(this);\n        return obj;\n    }\n\n    template <typename F, typename... Args>\n    F* allocate_child_impl(Args&&... args) {\n        F* obj = new F{std::forward<Args>(args)...};\n        obj->m_type = task_type::allocated;\n        obj->reset_parent(this);\n        return obj;\n    }\n\n    base_task* reset_parent(base_task* ptr = nullptr) {\n        auto p = m_parent;\n        m_parent = ptr;\n        return p;\n    }\n\n    base_task* m_parent{nullptr};\n    std::atomic<std::uint64_t> m_child_counter{0};\n};\n\nclass root_task : public base_task {\npublic:\n    root_task(tbb::task_group& tg) : m_tg(tg), m_callback(m_tg.defer([] { /* Create empty callback to preserve reference for wait. */})) {\n        add_child_reference();\n        m_type = base_task::task_type::allocated;\n    }\n\nprivate:\n    base_task* execute() override {\n        m_tg.run(std::move(m_callback));\n        return nullptr;\n    }\n\n    tbb::task_group& m_tg;\n    tbb::task_handle m_callback;\n};\n\ntemplate <typename F, typename... Args>\nF create_root_task(tbb::task_group& tg, Args&&... args) {\n    F obj{std::forward<Args>(args)...};\n    obj.m_type = base_task::task_type::stack_based;\n    obj.reset_parent(new root_task{tg});\n    return obj;\n}\n\ntemplate <typename F, typename... Args>\nF* allocate_root_task(tbb::task_group& tg, Args&&... args) {\n    F* obj = new F{std::forward<Args>(args)...};\n    obj->m_type = base_task::task_type::allocated;\n    obj->reset_parent(new root_task{tg});\n    return obj;\n}\n\ntemplate <typename F>\nvoid run_task(F&& f) {\n    tg_pool[tbb::this_task_arena::current_thread_index()].run(std::forward<F>(f));\n}\n\ntemplate <typename F>\nvoid run_task(F* f) {\n    tg_pool[tbb::this_task_arena::current_thread_index()].run(std::ref(*f));\n}\n\ntemplate <typename F>\nvoid run_and_wait(tbb::task_group& tg, F* f) {\n   tg.run_and_wait(std::ref(*f));\n}\n} // namespace task_emulation\n\n#endif // __TBB_task_emulation_layer_H\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/README.md",
    "content": "# Code Samples of oneAPI Threading Building Blocks (oneTBB)\nExamples using `parallel_for` algorithm.\n\n| Code sample name | Description\n|:--- |:---\n| game_of_life | Game of life overlay.\n| polygon_overlay | polygon overlay.\n| seismic | Parallel seismic wave simulation.\n| tachyon | Parallel 2-D raytracer/renderer.\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/game_of_life/Board.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TBB_examples_game_of_life_board_H\n#define TBB_examples_game_of_life_board_H\n\n#define LabelPtr int*\n#define BoardPtr Board*\n\nstruct Matrix {\n    int width;\n    int height;\n    char* data;\n};\n\nclass Board {\npublic:\n    Board(int width, int height, int squareSize, LabelPtr counter);\n    virtual ~Board();\n    void seed(int s);\n    void seed(const BoardPtr s);\n\npublic:\n    Matrix* m_matrix;\n\nprivate:\n    int m_width;\n    int m_height;\n    int m_squareSize;\n    LabelPtr m_counter;\n};\n\n#endif /* TBB_examples_game_of_life_board_H */\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/game_of_life/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(game_of_life CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(tbb)\n\nadd_executable(game_of_life Evolution.cpp Game_of_life.cpp Update_state.cpp)\n\ntarget_compile_definitions(game_of_life PUBLIC _CONSOLE)\ntarget_link_libraries(game_of_life TBB::tbb Threads::Threads)\ntarget_compile_options(game_of_life PRIVATE ${TBB_CXX_STD_FLAG})\n\nset(EXECUTABLE \"$<TARGET_FILE:game_of_life>\")\nset(ARGS 2:4 -t 5)\nset(LIGHT_ARGS 1:2 -t 5)\n\nadd_execution_target(run_game_of_life game_of_life ${EXECUTABLE} \"${ARGS}\")\nadd_execution_target(light_test_game_of_life game_of_life ${EXECUTABLE} \"${LIGHT_ARGS}\")\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/game_of_life/Evolution.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    Evolution.cpp: implementation file for evolution classes; evolution\n                  classes do looped evolution of patterns in a defined\n                  2 dimensional space\n*/\n\n#include \"common/utility/get_default_num_threads.hpp\"\n\n#include \"Evolution.hpp\"\n#include \"Board.hpp\"\n\n#ifdef USE_SSE\n#define GRAIN_SIZE 14\n#else\n#define GRAIN_SIZE 4000\n#endif\n#define TIME_SLICE 330\n\n/*\n    Evolution\n*/\n\n/**\n    Evolution::UpdateMatrix() - moves the calculated destination data\n    to the source data block. No destination zeroing is required since it will\n    be completely overwritten during the next calculation cycle.\n**/\nvoid Evolution::UpdateMatrix() {\n    memcpy(m_matrix->data, m_dest, m_size);\n}\n\n/*\n    SequentialEvolution\n*/\n\n//! SequentialEvolution::Run - begins looped evolution\nvoid SequentialEvolution::Run(double execution_time, int nthread) {\n    printf(\"Starting game (Sequential evolution)\\n\");\n\n    m_nIteration = 0;\n    m_serial_time = 0;\n    oneapi::tbb::tick_count t0 = oneapi::tbb::tick_count::now();\n    while (!m_done) {\n        if (!is_paused) {\n            oneapi::tbb::tick_count t = oneapi::tbb::tick_count::now();\n            Step();\n            oneapi::tbb::tick_count t1 = oneapi::tbb::tick_count::now();\n            ++m_nIteration;\n            double work_time = (t1 - t0).seconds();\n            m_serial_time += work_time;\n        }\n        //! Let the parallel algorithm work uncontended almost the same time\n        //! as the serial one. See ParallelEvolution::Run() as well.\n        t0 = oneapi::tbb::tick_count::now();\n        if (m_serial_time > execution_time) {\n            printf(\"iterations count = %d time = %g\\n\", m_nIteration, m_serial_time);\n            break;\n        }\n    }\n}\n\n//! SequentialEvolution::Step() - override of step method\nvoid SequentialEvolution::Step() {\n    if (!is_paused) {\n#ifdef USE_SSE\n        UpdateState(m_matrix, m_matrix->data, 0, m_matrix->height);\n#else\n        UpdateState(m_matrix, m_dest, 0, (m_matrix->width * m_matrix->height) - 1);\n        UpdateMatrix();\n#endif\n    }\n}\n\n/*\n    ParallelEvolution\n*/\n\n//! SequentialEvolution::Run - begins looped evolution\nvoid ParallelEvolution::Run(double execution_time, int nthread) {\n    if (nthread == utility::get_default_num_threads())\n        printf(\"Starting game (Parallel evolution for automatic number of thread(s))\\n\");\n    else\n        printf(\"Starting game (Parallel evolution for %d thread(s))\\n\", nthread);\n\n    m_nIteration = 0;\n    m_parallel_time = 0;\n\n    oneapi::tbb::global_control* pGlobControl = new oneapi::tbb::global_control(\n        oneapi::tbb::global_control::max_allowed_parallelism, nthread);\n\n    double work_time = m_serial_time;\n    oneapi::tbb::tick_count t0 = oneapi::tbb::tick_count::now();\n\n    while (!m_done) {\n        if (!is_paused) {\n            oneapi::tbb::tick_count t = oneapi::tbb::tick_count::now();\n            Step();\n            oneapi::tbb::tick_count t1 = oneapi::tbb::tick_count::now();\n            ++m_nIteration;\n            double real_work_time = (t1 - t0).seconds();\n            m_parallel_time += real_work_time;\n        }\n        //! Let the serial algorithm work the same time as the parallel one.\n        t0 = oneapi::tbb::tick_count::now();\n        if (m_parallel_time > execution_time) {\n            printf(\"iterations count = %d time = %g\\n\", m_nIteration, m_parallel_time);\n            delete pGlobControl;\n            pGlobControl = nullptr;\n            break;\n        }\n    }\n    delete pGlobControl;\n    pGlobControl = nullptr;\n}\n\n/**\n    class tbb_parallel_task\n\n    TBB requires a class for parallel loop implementations. The actual\n    loop \"chunks\" are performed using the () operator of the class.\n    The blocked_range contains the range to calculate. Please see the\n    TBB documentation for more information.\n**/\nclass tbb_parallel_task {\npublic:\n    static void set_values(Matrix* source, char* dest) {\n        m_source = source;\n        m_dest = dest;\n        return;\n    }\n\n    void operator()(const oneapi::tbb::blocked_range<std::size_t>& r) const {\n        int begin = (int)r.begin(); //! capture lower range number for this chunk\n        int end = (int)r.end(); //! capture upper range number for this chunk\n        UpdateState(m_source, m_dest, begin, end);\n    }\n\n    tbb_parallel_task() {}\n\nprivate:\n    static Matrix* m_source;\n    static char* m_dest;\n};\n\nMatrix* tbb_parallel_task::m_source;\nchar* tbb_parallel_task::m_dest;\n\n//! ParallelEvolution::Step() - override of Step method\nvoid ParallelEvolution::Step() {\n    std::size_t begin = 0; //! beginning cell position\n#ifdef USE_SSE\n    std::size_t end = m_matrix->height; //! ending cell position\n#else\n    std::size_t end = m_size - 1; //! ending cell position\n#endif\n\n    //! set matrix pointers\n    tbb_parallel_task::set_values(m_matrix, m_dest);\n\n    //! do calculation loop\n    parallel_for(oneapi::tbb::blocked_range<std::size_t>(begin, end, GRAIN_SIZE),\n                 tbb_parallel_task());\n    UpdateMatrix();\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/game_of_life/Evolution.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/**\n    Evolution.h: Header file for evolution classes; evolution classes do\n    looped evolution of patterns in a defined 2 dimensional space\n**/\n\n#ifndef TBB_examples_game_of_life_evolution_H\n#define TBB_examples_game_of_life_evolution_H\n\n#include <cstring>\n#include <cstdlib>\n#include <cstdio>\n\n#include \"oneapi/tbb/blocked_range.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/tick_count.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include \"Board.hpp\"\n\ntypedef unsigned int Int32;\n\nvoid UpdateState(Matrix* m_matrix, char* dest, int begin, int end);\n\n/**\n    class Evolution - base class for SequentialEvolution and ParallelEvolution\n**/\nclass Evolution {\npublic:\n    Evolution(Matrix* m, //! beginning matrix including initial pattern\n              BoardPtr board //! the board to update\n              )\n            : m_matrix(m),\n              m_board(board),\n              m_size(m_matrix->height * m_matrix->width),\n              m_done(false) {\n        //! allocate memory for second matrix data block\n        m_dest = new char[m_size];\n        is_paused = false;\n    }\n\n    virtual ~Evolution() {\n        delete[] m_dest;\n    }\n\n    //! Run() - begins looped evolution\n    virtual void Run(double execution_time, int nthread) = 0;\n\n    //! Quit() - tell the thread to terminate\n    virtual void Quit() {\n        m_done = true;\n    }\n\n    //! Step() - performs a single evolutionary generation computation on the game matrix\n    virtual void Step() = 0;\n\n    //! SetPause() - change condition of variable is_paused\n    virtual void SetPause(bool condition) {\n        if (condition == true)\n            is_paused = true;\n        else\n            is_paused = false;\n    }\n\nprotected:\n    /**\n        UpdateMatrix() - moves the previous destination data to the source\n        data block and zeros out destination.\n    **/\n    void UpdateMatrix();\n\nprotected:\n    Matrix* m_matrix; //! Pointer to initial matrix\n    char* m_dest; //! Pointer to calculation destination data\n    BoardPtr m_board; //! The game board to update\n    int m_size; //! size of the matrix data block\n    volatile bool m_done; //! a flag used to terminate the thread\n    Int32 m_nIteration; //! current calculation cycle index\n    volatile bool is_paused; //! is needed to perform next iteration\n\n    //! Calculation time of the sequential version (since the start), seconds.\n    /**\n        This member is updated by the sequential version and read by parallel,\n        so no synchronization is necessary.\n    **/\n    double m_serial_time;\n};\n\n/**\n    class SequentialEvolution - derived from Evolution - calculate life generations serially\n**/\nclass SequentialEvolution : public Evolution {\npublic:\n    SequentialEvolution(Matrix* m, BoardPtr board) : Evolution(m, board) {}\n    virtual void Run(double execution_time, int nthread);\n    virtual void Step();\n};\n\n/**\n    class ParallelEvolution - derived from Evolution - calculate life generations\n    in parallel using oneTBB\n**/\nclass ParallelEvolution : public Evolution {\npublic:\n    ParallelEvolution(Matrix* m, BoardPtr board) : Evolution(m, board), m_parallel_time(0) {\n        // instantiate a global_control object and save a pointer to it\n        m_pGlobControl = nullptr;\n    }\n\n    ~ParallelEvolution() {\n        //! delete global_control object\n        delete m_pGlobControl;\n        m_pGlobControl = nullptr;\n    }\n    virtual void Run(double execution_time, int nthread);\n    virtual void Step();\n\nprivate:\n    oneapi::tbb::global_control* m_pGlobControl;\n\n    double m_parallel_time;\n};\n\n#endif /* TBB_examples_game_of_life_evolution_H */\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/game_of_life/Game_of_life.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/* \n    Game_of_life.cpp : \n                      main project file.\n*/\n\n#include <ctime>\n\n#include <iostream>\n#include <sstream>\n\n#include \"common/utility/get_default_num_threads.hpp\"\n\n#include \"Board.hpp\"\n#include \"Evolution.hpp\"\n\n#define BOARD_SQUARE_SIZE 2\n\nint low; //! lower range limit of threads\nint high; //! high range limit of threads\ndouble execution_time; //! time for game of life iterations\n\nBoard::Board(int width, int height, int squareSize, LabelPtr counter)\n        : m_width(width),\n          m_height(height),\n          m_squareSize(squareSize),\n          m_counter(counter) {\n    m_matrix = new Matrix();\n    m_matrix->width = width;\n    m_matrix->height = height;\n    m_matrix->data = new char[width * height];\n    memset(m_matrix->data, 0, width * height);\n}\n\nBoard::~Board() {\n    delete[] m_matrix->data;\n    delete m_matrix;\n}\n\nvoid Board::seed(int s) {\n    srand(s);\n    for (int j = 0; j < m_height; j++) {\n        for (int i = 0; i < m_width; i++) {\n            int x = rand() / (int)(((unsigned)RAND_MAX + 1) / 100);\n            m_matrix->data[i + j * m_width] = x > 75 ? 1 : 0; // 25% occupied\n        }\n    }\n}\n\nvoid Board::seed(const BoardPtr src) {\n    memcpy(m_matrix->data, src->m_matrix->data, m_height * m_width);\n}\n\n//! Print usage of this program\nvoid PrintUsage() {\n    printf(\"Usage: game_of_life [M[:N] -t execution_time]\\n\"\n           \"M and N are a range of numbers of threads to be used.\\n\"\n           \"execution_time is a time (in sec) for execution game_of_life iterations\\n\");\n    printf(\"Default values:\\n\"\n           \"M:\\t\\tautomatic\\n\"\n           \"N:\\t\\tM\\n\"\n           \"execution_time:\\t10\\n\");\n}\n\n//! Parse command line\nbool ParseCommandLine(int argc, char* argv[]) {\n    char* s = argv[1];\n    char* end;\n    //! command line without parameters\n    if (argc == 1) {\n        low = utility::get_default_num_threads();\n        high = low;\n        execution_time = 5;\n        return true;\n    }\n    //! command line with parameters\n    if (argc != 4) {\n        PrintUsage();\n        return false;\n    }\n    if (std::string(\"-t\") != argv[argc - 2])\n        //! process M[:N] parameter\n        high = strtol(s, &end, 0);\n    low = strtol(s, &end, 0);\n    switch (*end) {\n        case ':': high = strtol(end + 1, nullptr, 0); break;\n        case '\\0': break;\n        default: PrintUsage(); return false;\n    }\n    if (high < low) {\n        std::cout << \"Set correct range. Current range: \" << low << \":\" << high << \"\\n\";\n        PrintUsage();\n        return false;\n    }\n    //! process execution_time parameter\n    execution_time = strtol(argv[argc - 1], &end, 0);\n    return true;\n}\n\nint main(int argc, char* argv[]) {\n    if (!ParseCommandLine(argc, argv))\n        return -1;\n    SequentialEvolution* m_seq;\n    ParallelEvolution* m_par;\n    Board* m_board1;\n    Board* m_board2;\n    int* count = nullptr;\n\n    int boardWidth = 300;\n    int boardHeight = 300;\n\n    m_board1 = new Board(boardWidth, boardHeight, BOARD_SQUARE_SIZE, count);\n    m_board2 = new Board(boardWidth, boardHeight, BOARD_SQUARE_SIZE, count);\n\n    time_t now = time(nullptr);\n    printf(\"Generate Game of life board\\n\");\n    m_board1->seed((int)now);\n    m_board2->seed(m_board1);\n\n    m_seq = new SequentialEvolution(m_board1->m_matrix, m_board1);\n    m_seq->Run(execution_time, 1);\n    delete m_seq;\n\n    m_par = new ParallelEvolution(m_board2->m_matrix, m_board2);\n    for (int p = low; p <= high; ++p) {\n        m_par->Run(execution_time, p);\n    }\n    delete m_par;\n\n    delete m_board1;\n    delete m_board2;\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/game_of_life/README.md",
    "content": "# Game_of_life sample\nThe \"Game of life\" example demonstrates interoperability of oneAPI Threading Building Blocks (oneTBB) and Microsoft* .NET*.\n\nThis program runs 2 simultaneous instances of the classic Conway's \"Game of Life\". One of these instances uses serial calculations to update the board. The other one calculates in parallel with oneTBB. The visualization is written in managed C++ and uses .NET CLR.\n\n## Building the example\n```\ncmake <path_to_example>\ncmake --build .\n```\n\n## Running the sample\n### Predefined make targets\n* `make run_game_of_life` - executes the example with predefined parameters.\n* `make light_test_game_of_life` - executes the example with suggested parameters to reduce execution time.\n\n### Application parameters\nUsage:\n```\ngame_of_life [M[:N] -t execution_time] [-h]\n```\n* `-h` - prints the help for command line options.\n* `M:N` - range of numbers of threads to be used.\n* `execution_time` - time (in sec) for execution `game_of_life` iterations.\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/game_of_life/Update_state.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"Evolution.hpp\"\n\n#ifdef USE_SSE\n/* Update states with SSE */\n\n#include <xmmintrin.h>\n#include <emmintrin.h>\n\ninline void create_record(char* src, unsigned* dst, unsigned width) {\n    dst[0] |= src[width - 1];\n    for (unsigned i = 0; i < 31u; ++i)\n        dst[0] |= src[i] << (i + 1);\n    unsigned col;\n    for (unsigned col = 31u; col < width; ++col)\n        dst[(col + 1) / 32u] |= src[col] << ((col + 1) % 32u);\n    dst[(col + 1) / 32u] |= src[0] << ((col + 1) % 32u);\n}\n\ninline void sum_offset(__m128i* X,\n                       __m128i* A,\n                       __m128i* B,\n                       __m128i* C,\n                       unsigned size_sse_ar,\n                       unsigned shift) {\n    for (unsigned i = 0; i < size_sse_ar; ++i) {\n        __m128i tmp = _mm_and_si128(A[i], X[shift + i]);\n        A[i] = _mm_xor_si128(A[i], X[shift + i]);\n        C[i] = _mm_or_si128(C[i], _mm_and_si128(B[i], tmp));\n        B[i] = _mm_xor_si128(B[i], tmp);\n    }\n}\n\ninline void shift_left2D(__m128i* X, unsigned height, unsigned size_sse_row) {\n    for (unsigned row = 0; row < height; ++row) {\n        unsigned ind = row * size_sse_row;\n        unsigned x0 = X[ind].m128i_u32[0] & 1;\n\n        X[ind] =\n            _mm_or_si128(_mm_srli_epi16(X[ind], 1), _mm_slli_epi16(_mm_srli_si128(X[ind], 2), 15));\n\n        unsigned x1 = X[ind + 1].m128i_u32[0] & 1;\n        X[ind + 1] = _mm_or_si128(_mm_srli_epi16(X[ind + 1], 1),\n                                  _mm_slli_epi16(_mm_srli_si128(X[ind + 1], 2), 15));\n        X[ind].m128i_u32[3] |= x1 << 31;\n\n        unsigned x2 = X[ind + 2].m128i_u32[0] & 1;\n        X[ind + 2] = _mm_or_si128(_mm_srli_epi16(X[ind + 2], 1),\n                                  _mm_slli_epi16(_mm_srli_si128(X[ind + 2], 2), 15));\n        X[ind + 1].m128i_u32[3] |= x2 << 31;\n\n        unsigned* dst = (unsigned*)&X[ind];\n        dst[301 / 32u] |= x0 << (301 % 32u);\n    }\n}\n\ninline void shift_right2D(__m128i* X, unsigned height, unsigned size_sse_row) {\n    for (unsigned row = 0; row < height; ++row) {\n        unsigned ind = row * size_sse_row;\n\n        unsigned x0 = X[ind].m128i_u32[3];\n        x0 >>= 31;\n        X[ind] =\n            _mm_or_si128(_mm_slli_epi16(X[ind], 1), _mm_srli_epi16(_mm_slli_si128(X[ind], 2), 15));\n\n        unsigned x1 = X[ind + 1].m128i_u32[3];\n        x1 >>= 31;\n        X[ind + 1] = _mm_or_si128(_mm_slli_epi16(X[ind + 1], 1),\n                                  _mm_srli_epi16(_mm_slli_si128(X[ind + 1], 2), 15));\n        X[ind + 1].m128i_u32[0] |= x0;\n\n        unsigned* dst = (unsigned*)&X[ind];\n        unsigned x2 = dst[301 / 32u] & (1 << (301 % 32u));\n        x2 >>= (301 % 32u);\n        X[ind + 2] = _mm_or_si128(_mm_slli_epi16(X[ind + 2], 1),\n                                  _mm_srli_epi16(_mm_slli_si128(X[ind + 2], 2), 15));\n        X[ind + 2].m128i_u32[0] |= x1;\n        X[ind].m128i_u32[0] |= x2;\n    }\n}\n\nvoid UpdateState(Matrix* m_matrix, char* dest, int begin, int end) {\n    //300/128 + 1 =3, 3*300=900\n    unsigned size_sse_row = m_matrix->width / 128 + 1; //3\n    unsigned size_sse_ar = size_sse_row * (end - begin);\n    __m128i X[906], A[900], B[900], C[900];\n    char* mas = m_matrix->data;\n\n    for (unsigned i = 0; i < size_sse_ar; ++i) {\n        A[i].m128i_u32[0] = 0;\n        A[i].m128i_u32[1] = 0;\n        A[i].m128i_u32[2] = 0;\n        A[i].m128i_u32[3] = 0;\n        B[i].m128i_u32[0] = 0;\n        B[i].m128i_u32[1] = 0;\n        B[i].m128i_u32[2] = 0;\n        B[i].m128i_u32[3] = 0;\n        C[i].m128i_u32[0] = 0;\n        C[i].m128i_u32[1] = 0;\n        C[i].m128i_u32[2] = 0;\n        C[i].m128i_u32[3] = 0;\n    }\n\n    for (unsigned i = 0; i < size_sse_ar + 6; ++i) {\n        X[i].m128i_u32[0] = 0;\n        X[i].m128i_u32[1] = 0;\n        X[i].m128i_u32[2] = 0;\n        X[i].m128i_u32[3] = 0;\n    }\n\n    // create X[] with bounds\n    unsigned height = end - begin;\n    unsigned width = m_matrix->width;\n    for (unsigned row = 0; row < height; ++row) {\n        char* src = &mas[(row + begin) * width];\n        unsigned* dst = (unsigned*)&X[(row + 1) * size_sse_row];\n        create_record(src, dst, width);\n    }\n    // create high row in X[]\n    char* src;\n    if (begin == 0) {\n        src = &mas[(m_matrix->height - 1) * width];\n    }\n    else {\n        src = &mas[(begin - 1) * width];\n    }\n    unsigned* dst = (unsigned*)X;\n    create_record(src, dst, width);\n\n    //create lower row in X[]\n    if (end == m_matrix->height) {\n        src = mas;\n    }\n    else {\n        src = &mas[end * width];\n    }\n    dst = (unsigned*)&X[(height + 1) * size_sse_row];\n    create_record(src, dst, width);\n\n    //sum( C, B, A, X+offset_for_upwards ); high-left friend\n    sum_offset(X, A, B, C, size_sse_ar, 0);\n\n    //sum( C, B, A, X+offset_for_no_vertical_shift );\n    sum_offset(X, A, B, C, size_sse_ar, size_sse_row);\n\n    //sum( C, B, A, X+offset_for_downwards );\n    sum_offset(X, A, B, C, size_sse_ar, 2 * size_sse_row);\n\n    //shift_left( X ); (when view 2D) in our logic it is in right\n    height = end - begin + 2;\n    shift_left2D(X, height, size_sse_row);\n\n    //sum( C, B, A, X+offset_for_upwards ); high-left friend\n    sum_offset(X, A, B, C, size_sse_ar, 0);\n\n    //sum( C, B, A, X+offset_for_downwards );\n    sum_offset(X, A, B, C, size_sse_ar, 2 * size_sse_row);\n\n    //shift_left( X ); (view in 2D) in our logic it is right shift\n    height = end - begin + 2;\n    shift_left2D(X, height, size_sse_row);\n\n    //sum( C, B, A, X+offset_for_upwards ); high-right friend\n    sum_offset(X, A, B, C, size_sse_ar, 0);\n\n    //sum( C, B, A, X+offset_for_no_vertical_shift ); right friend\n    sum_offset(X, A, B, C, size_sse_ar, size_sse_row);\n\n    //sum( C, B, A, X+offset_for_downwards ); right down friend\n    sum_offset(X, A, B, C, size_sse_ar, 2 * size_sse_row);\n\n    //shift_right( X ); (when view in 2D) in our case it left shift.\n    height = end - begin + 2;\n    shift_right2D(X, height, size_sse_row);\n\n    //X = (X|A)&B&~C (done bitwise over the arrays)\n    unsigned shift = size_sse_row;\n    for (unsigned i = 0; i < size_sse_ar; ++i) {\n        C[i].m128i_u32[0] = ~C[i].m128i_u32[0];\n        C[i].m128i_u32[1] = ~C[i].m128i_u32[1];\n        C[i].m128i_u32[2] = ~C[i].m128i_u32[2];\n        C[i].m128i_u32[3] = ~C[i].m128i_u32[3];\n        X[shift + i] = _mm_and_si128(_mm_and_si128(_mm_or_si128(X[shift + i], A[i]), B[i]), C[i]);\n    }\n\n    height = end - begin;\n    width = m_matrix->width;\n    for (unsigned row = 0; row < height; ++row) {\n        char* dst = &dest[(row + begin) * width];\n        unsigned* src = (unsigned*)&X[(row + 1) * size_sse_row];\n        for (unsigned col = 0; col < width; ++col) {\n            unsigned c = src[col / 32u] & 1 << (col % 32u);\n            dst[col] = c >> (col % 32u);\n        }\n    }\n}\n#else\n/* end SSE block */\n\n// ----------------------------------------------------------------------\n// GetAdjacentCellState() - returns the state (value) of the specified\n// adjacent cell of the current cell \"cellNumber\"\nchar GetAdjacentCellState(char* source, // pointer to source data block\n                          int x, // logical width of field\n                          int y, // logical height of field\n                          int cellNumber, // number of cell position to examine\n                          int cp // which adjacent position\n) {\n    /*\ncp \n*-- cp=1 ... --- cp=8 (summary: -1-2-3-\n-x-          -x-                -4-x-5-\n---          --*                -6-7-8- )\n*/\n    char cellState = 0; // return value\n\n    // set up boundary flags to trigger field-wrap logic\n    bool onTopRow = false;\n    bool onBottomRow = false;\n    bool onLeftColumn = false;\n    bool onRightColumn = false;\n\n    // check to see if cell is on top row\n    if (cellNumber < x) {\n        onTopRow = true;\n    }\n    // check to see if cell is on bottom row\n    if ((x * y) - cellNumber <= x) {\n        onBottomRow = true;\n    }\n    // check to see if cell is on left column\n    if (cellNumber % x == 0) {\n        onLeftColumn = true;\n    }\n    // check to see if cell is on right column\n    if ((cellNumber + 1) % x == 0) {\n        onRightColumn = true;\n    }\n\n    switch (cp) {\n        case 1:\n            if (onTopRow && onLeftColumn) {\n                return *(source + ((x * y) - 1));\n            }\n            if (onTopRow && !onLeftColumn) {\n                return *(source + (((x * y) - x) + (cellNumber - 1)));\n            }\n            if (onLeftColumn && !onTopRow) {\n                return *(source + (cellNumber - 1));\n            }\n            return *((source + cellNumber) - (x + 1));\n\n        case 2:\n            if (onTopRow) {\n                return *(source + (((x * y) - x) + cellNumber));\n            }\n            return *((source + cellNumber) - x);\n\n        case 3:\n            if (onTopRow && onRightColumn) {\n                return *(source + ((x * y) - x));\n            }\n            if (onTopRow && !onRightColumn) {\n                return *(source + (((x * y) - x) + (cellNumber + 1)));\n            }\n            if (onRightColumn && !onTopRow) {\n                return *(source + ((cellNumber - (x * 2)) + 1));\n            }\n            return *(source + (cellNumber - (x - 1)));\n\n        case 4:\n            if (onRightColumn) {\n                return *(source + (cellNumber - (x - 1)));\n            }\n            return *(source + (cellNumber + 1));\n\n        case 5:\n            if (onBottomRow && onRightColumn) {\n                return *source;\n            }\n            if (onBottomRow && !onRightColumn) {\n                return *(source + ((cellNumber - ((x * y) - x)) + 1));\n            }\n            if (onRightColumn && !onBottomRow) {\n                return *(source + (cellNumber + 1));\n            }\n            return *(source + (((cellNumber + x)) + 1));\n\n        case 6:\n            if (onBottomRow) {\n                return *(source + (cellNumber - ((x * y) - x)));\n            }\n            return *(source + (cellNumber + x));\n\n        case 7:\n            if (onBottomRow && onLeftColumn) {\n                return *(source + (x - 1));\n            }\n            if (onBottomRow && !onLeftColumn) {\n                return *(source + (cellNumber - ((x * y) - x) - 1));\n            }\n            if (onLeftColumn && !onBottomRow) {\n                return *(source + (cellNumber + ((x * 2) - 1)));\n            }\n            return *(source + (cellNumber + (x - 1)));\n\n        case 8:\n            if (onLeftColumn) {\n                return *(source + (cellNumber + (x - 1)));\n            }\n            return *(source + (cellNumber - 1));\n    }\n    return cellState;\n}\n\nchar CheckCell(Matrix* m_matrix, int cellNumber) {\n    char total = 0;\n    char* source = m_matrix->data;\n    //look around to find cell's with status \"alive\"\n    for (int i = 1; i < 9; i++) {\n        total += GetAdjacentCellState(source, m_matrix->width, m_matrix->height, cellNumber, i);\n    }\n    // if the number of adjacent live cells is < 2 or > 3, the result is a dead\n    // cell regardless of its current state. (A live cell dies of loneliness if it\n    // has less than 2 neighbors, and of overcrowding if it has more than 3; a new\n    // cell is born in an empty spot only if it has exactly 3 neighbors.\n    if (total < 2 || total > 3) {\n        return 0;\n    }\n\n    // if we get here and the cell position holds a living cell, it stays alive\n    if (*(source + cellNumber)) {\n        return 1;\n    }\n\n    // we have an empty position. If there are only 2 neighbors, the position stays\n    // empty.\n    if (total == 2) {\n        return 0;\n    }\n\n    // we have an empty position and exactly 3 neighbors. A cell is born.\n    return 1;\n}\n\nvoid UpdateState(Matrix* m_matrix, char* dest, int begin, int end) {\n    for (int i = begin; i <= end; i++) {\n        *(dest + i) = CheckCell(m_matrix, i);\n    }\n}\n\n#endif\n/* end non-SSE block */\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/polygon_overlay/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(polygon_overlay CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(\"tbb;tbbmalloc\")\n\nadd_executable(polygon_overlay pover_video.cpp polymain.cpp polyover.cpp)\n\nadd_subdirectory(../../common/gui gui)\n\ntarget_link_libraries(polygon_overlay TBB::tbb TBB::tbbmalloc Threads::Threads UI_LIB_polygon_overlay)\ntarget_compile_options(polygon_overlay PRIVATE ${TBB_CXX_STD_FLAG})\nif (MSVC)\n    target_compile_options(polygon_overlay PRIVATE -DNOMINMAX)\nendif()\n\nset(EXECUTABLE \"$<TARGET_FILE:polygon_overlay>\")\nset(ARGS \"\")\nset(LIGHT_ARGS --polys 10 --size 5x5)\n\nadd_execution_target(run_polygon_overlay polygon_overlay ${EXECUTABLE} \"${ARGS}\")\nadd_execution_target(light_test_polygon_overlay polygon_overlay ${EXECUTABLE} \"${LIGHT_ARGS}\")\n\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/polygon_overlay/README.md",
    "content": "# Polygon_overlay sample\nPolygon Overlay example that demonstrates the use of `parallel_for`.\n\nThis example is a simple implementation of polygon overlay, as described in Parallelizing the [Polygon Overlay Problem Using Orca, by H.F. Langendoen](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.46.9538).\n\nThe solution was implemented in three forms:\n* The naive serial solution.\n* The naive parallel solution, by splitting list of polygons from one map and intersecting each sub-list against the entire list of polygons from the second map.\n* A parallel solution where each map is split into submaps, with each resulting submap being intersected against the corresponding submap from the other map. This solution requires some redundancy (some polygons are members of more than one submap). To prevent multiple copies of a polygon from being placed in the solution map, if both polygons are duplicated (that is, if they both appear in more than one map), they are intersected but the result is not placed in the solution map.\n\nThe only optimization in each solution is that the area of the generated sub-polygons are subtracted from the original area of one of the source polygons. When the remaining area is zero, the intersection process is halted.\n\nA word about the speedup of the submap case. One may get superlinear speedup in this case (for instance a laptop with Intel® Core(TM) Duo processor got a speedup of about 20 percent over serial.) This results from two effects:\n* the number of threads used, and\n* the fact that for each submap, the number of polygons is smaller than that for the other two cases.\n\nIf there are, say, 400 polygons in each map, then on average the number of intersections calculated is approximately 80,000 (400 * 200, where 200 is the average number of polygons examined before stopping.) If the maps are split into 2 submaps, the time for each submap is about 200*100, or 20,000. So even comparing the two sets of submaps serially should result in a speedup somewhere around 2. This number is affected by the number of redundant polygons being compared; this effect would eventually swamp the gain from comparing smaller numbers of polygons per submap. And remember the submaps are created by intersecting each map with a rectangular polygon covering the submap being generated, which is additional work taking about `N * O(400)` in the case above, where `N` is the number of submaps generated, that can be done in parallel.\n\nRunning the default release pover while varying the number of submaps from 1 to 1000, the speedup on the submap case for a 2-processor system looks like\n\n![Speedup vs Submap count](speedup.gif)\n\nOne further optimization would be to sort one map, say map1, by maxY, and sort the other map (map2) by minY. For p1 in map1, start testing for intersection at the first p2 in map2 that intersected the last polygon tested in map1. This would speed up the intersection process greatly, but the optimization would apply to all the methods, and the sort would have to be accounted for in the timing.\n\nThe source maps are generated pseudo-randomly in the manner described in the paper above. That is, if we need `N` polygons, then `N` \"boxes\" are chosen at random, then one-at-a-time the areas are expanded in one of fours directions until the area hits an adjacent polygon. When this process is finished, the resulting map is inspected and any remaining unoccupied \"boxes\" are made into additional polygons, as large as possible in each case. So the actual number of polygons in each map will in general be larger than the number of polygons requested (sometimes by 10% or more.)\n\nOne limitation of the program is that if the number of polygons in the source map is greater than the number of \"boxes\" (pixels in the GUI case), the maps cannot be generated.\n\n## Building the example\n```\ncmake <path_to_example> [EXAMPLES_UI_MODE=value]\ncmake --build .\n```\n### Predefined CMake variables\n* `EXAMPLES_UI_MODE` - defines the GUI mode, supported values are `gdi`, `d2d`, `con` on Windows, `x`,`con` on Linux and `mac`,`con` on macOS. The default mode is `con`. See the [common page](../../README.md) to get more information.\n\n## Running the sample\n### Predefined make targets\n* `make run_polygon_overlay` - executes the example with predefined parameters.\n* `make light_test_polygon_overlay` - executes the example with suggested parameters to reduce execution time.\n\n### Application parameters\nUsage:\n```\npolygon_overlay [threads[:threads2]] [--polys npolys] [--size nnnxnnn] [--seed nnn] [--csv filename] [--grainsize n] [--use_malloc]\n```\n* `-h` - prints the help for command line options.\n* `threads[:threads2]` - number of threads to run.\n* `--polys npolys` - number of polygons in each map.\n* `--size nnnxnnn` - size of each map (X x Y).\n* `--seed nnn` - initial value of random number generator.\n* `--csv filename` - write timing data to CSV-format file.\n* `--grainsize n` - set grainsize to n.\n* `--use_malloc` - allocate polygons with malloc instead of scalable allocator.\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/polygon_overlay/gui/polygon_overlay.rc",
    "content": "// Microsoft Visual C++ generated resource script.\n//\n#include \"resource.h\"\n\n#define APSTUDIO_READONLY_SYMBOLS\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 2 resource.\n//\n#include <windows.h>\n\n/////////////////////////////////////////////////////////////////////////////\n#undef APSTUDIO_READONLY_SYMBOLS\n\n/////////////////////////////////////////////////////////////////////////////\n// English (U.S.) resources\n\n#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\nLANGUAGE 9, 1\n#pragma code_page(1252)\n\n#ifdef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// TEXTINCLUDE\n//\n\n1 TEXTINCLUDE  \nBEGIN\n    \"resource.h\\0\"\nEND\n\n2 TEXTINCLUDE  \nBEGIN\n    \"#include \"\"windows.h\"\"\\r\\n\"\n    \"\\0\"\nEND\n\n3 TEXTINCLUDE  \nBEGIN\n    \"\\r\\n\"\n    \"\\0\"\nEND\n\n#endif    // APSTUDIO_INVOKED\n\n#endif    // English (U.S.) resources\n/////////////////////////////////////////////////////////////////////////////\n\n\n\n#ifndef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 3 resource.\n//\n\n\n/////////////////////////////////////////////////////////////////////////////\n#endif    // not APSTUDIO_INVOKED\n\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/polygon_overlay/gui/resource.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//{{NO_DEPENDENCIES}}\n// Microsoft Visual C++ generated include file.\n// Used by pover.rc\n\n// Next default values for new objects\n//\n#ifdef APSTUDIO_INVOKED\n#ifndef APSTUDIO_READONLY_SYMBOLS\n#define _APS_NEXT_RESOURCE_VALUE 101\n#define _APS_NEXT_COMMAND_VALUE  40001\n#define _APS_NEXT_CONTROL_VALUE  1001\n#define _APS_NEXT_SYMED_VALUE    101\n#endif\n#endif\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/polygon_overlay/polymain.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// Polygon overlay\n//\n// Don't want warnings about deprecated sscanf, getenv\n#ifndef _CRT_SECURE_NO_DEPRECATE\n#define _CRT_SECURE_NO_DEPRECATE\n#endif\n#define _MAIN_C_ 1\n\n#include <cstring>\n\n#include <iostream>\n#include <iomanip>\n#include <algorithm>\n\n#include \"oneapi/tbb/tick_count.h\"\n\n#include \"pover_global.hpp\"\n#include \"polyover.hpp\"\n#include \"pover_video.hpp\"\n#include \"polymain.hpp\"\n\n#if _DEBUG\nconst char *faceNames[] = { \"North\", \"East\", \"South\", \"West\" };\n#endif\n\n/**\n**/\nint main(int argc, char *argv[]) {\n    pover_video poly;\n    poly.threaded = true;\n    gVideo = &poly;\n\n    if (!initializeVideo(argc, argv)) {\n        return -1;\n    }\n\n    gIsGraphicalVersion = poly.graphic_display();\n    if (argc > 1) {\n        if (!ParseCmdLine(argc, argv)) {\n            if (gIsGraphicalVersion)\n                rt_sleep(10000);\n            // if graphical, we haven't opened the console window so all the error messages we\n            // so carefully wrote out disappeared into the ether.  :(\n            return -1;\n        }\n    }\n\n    if (gCsvFilename != nullptr) {\n#define BUFLEN 1000\n        std::string fname_buf = gCsvFilename;\n        fname_buf += \".csv\";\n        gCsvFile.open(fname_buf.c_str());\n    }\n\n    // we have gMapXSize and gMapYSize determining the number of \"squares\"\n    // we have g_xwinsize and g_ywinsize the total size of the window\n    // we also have BORDER_SIZE the size of the border between maps\n    // we need to determine\n    //      g_polyBoxSize -- the number of pixels on each size of each square\n\n    if (gIsGraphicalVersion) {\n        int xpixelsPerMap =\n            (g_xwinsize - 4 * BORDER_SIZE) / 3; // three maps, with borders between and outside\n        gMapXSize = xpixelsPerMap; // make the boxes one per pixel\n        gPolyXBoxSize = xpixelsPerMap / gMapXSize;\n        int ypixelsPerMap = (g_ywinsize - 2 * BORDER_SIZE); // one map vertically\n        gMapYSize = ypixelsPerMap; // one pixel per box, rather.\n\n        gPolyYBoxSize = ypixelsPerMap / gMapYSize;\n        if ((gPolyXBoxSize == 0) || (gPolyYBoxSize == 0)) {\n            std::cout << \"The display window is not large enough to show the maps\"\n                      << \"\\n\";\n            int minxSize = 4 * BORDER_SIZE + 3 * gMapXSize;\n            int minySize = 2 * BORDER_SIZE + gMapYSize;\n            std::cout << \"  Should be at least \" << minxSize << \" x \" << minySize << \".\"\n                      << \"\\n\";\n            return -1;\n        }\n        map2XLoc = 2 * BORDER_SIZE + gMapXSize * gPolyXBoxSize;\n        maprXLoc = 3 * BORDER_SIZE + 2 * gMapXSize * gPolyXBoxSize;\n    }\n    else { // not gIsGraphicalVersion\n        // gMapXSize, gMapYSize, gNPolygons defined in pover_global.h\n    }\n\n    // create two polygon maps\n    SetRandomSeed(gMyRandomSeed); // for repeatability\n\n    gVideo->main_loop();\n\n    return 0;\n}\n\nvoid Usage(int argc, char *argv[]) {\n    char *cmdTail = strrchr(*argv, '\\\\');\n    if (cmdTail == nullptr) {\n        cmdTail = *argv;\n    }\n    else {\n        cmdTail++;\n    }\n    std::cout\n        << cmdTail\n        << \" [threads[:threads2]] [--polys npolys] [--size nnnxnnn] [--seed nnn] [--csv filename] [--grainsize n] [--use_malloc]\"\n        << \"\\n\";\n    std::cout << \"Create polygon maps and overlay them.\"\n              << \"\\n\"\n              << \"\\n\";\n    std::cout << \"Parameters:\"\n              << \"\\n\";\n    std::cout << \"   threads[:threads2] - number of threads to run\"\n              << \"\\n\";\n    std::cout << \"   --polys npolys - number of polygons in each map\"\n              << \"\\n\";\n    std::cout << \"   --size nnnxnnn - size of each map (X x Y)\"\n              << \"\\n\";\n    std::cout << \"   --seed nnn - initial value of random number generator\"\n              << \"\\n\";\n    std::cout << \"   --csv filename - write timing data to CSV-format file\"\n              << \"\\n\";\n    std::cout << \"   --grainsize n - set grainsize to n\"\n              << \"\\n\";\n    std::cout << \"   --use_malloc - allocate polygons with malloc instead of scalable allocator\"\n              << \"\\n\";\n    std::cout << \"\\n\";\n    std::cout << \"npolys must be smaller than the size of the map\"\n              << \"\\n\";\n    std::cout << \"\\n\";\n    std::exit(-1);\n}\n\nbool ParseCmdLine(int argc, char *argv[]) {\n    bool error_found = false;\n    bool nPolysSpecified = false;\n    bool nMapSizeSpecified = false;\n    bool nSeedSpecified = false;\n    bool csvSpecified = false;\n    bool grainsizeSpecified = false;\n    bool mallocSpecified = false;\n    int origArgc = argc;\n    char **origArgv = argv;\n    unsigned int newnPolygons = gNPolygons;\n    unsigned int newSeed = gMyRandomSeed;\n    unsigned int newX = gMapXSize;\n    unsigned int newY = gMapYSize;\n    unsigned int newGrainSize = gGrainSize;\n    argc--;\n    argv++;\n    if (argc > 0 && isdigit((*argv)[0])) {\n        // first argument is one or two numbers, specifying how mny threads to run\n        char *end;\n        gThreadsHigh = gThreadsLow = (int)strtol(argv[0], &end, 0);\n        switch (*end) {\n            case ':': gThreadsHigh = (int)strtol(end + 1, nullptr, 0); break;\n            case '\\0': break;\n            default:\n                std::cout << \"Unexpected character in thread specifier: \" << *end << \"\\n\";\n                break;\n        }\n        if (gThreadsLow > gThreadsHigh) {\n            int t = gThreadsLow;\n            gThreadsLow = gThreadsHigh;\n            gThreadsHigh = t;\n        }\n        argv++;\n        argc--;\n    }\n    while (argc > 0) {\n        // format 1: --size nnnxnnn, where nnn in {0 .. 9}+ -- size of map in \"squares\"\n        if (!strncmp(\"--size\", *argv, (std::size_t)6)) {\n            if (nMapSizeSpecified) {\n                std::cout << \" Error: map size multiply specified\"\n                          << \"\\n\";\n                error_found = true;\n            }\n            else {\n                argv++;\n                argc--;\n                if (argc == 0) {\n                    error_found = true;\n                    std::cout << \" Error: --size must have a value\"\n                              << \"\\n\";\n                }\n                if (strchr(*argv, 'x') != strrchr(*argv, 'x')) {\n                    // more than one 'x'\n                    std::cout << \"Error: map size should be nnnxnnn (\" << *argv << \")\"\n                              << \"\\n\";\n                    error_found = true;\n                }\n                else {\n                    int rval;\n                    rval = sscanf(*argv, \"%ux%u\", &newX, &newY);\n                    if (rval != 2) {\n                        std::cout << \"Error parsing map size (format should be nnnxnnn (\" << *argv\n                                  << \")\"\n                                  << \"\\n\";\n                        error_found = true;\n                    }\n                    if (newX == 0 || newY == 0) {\n                        std::cout << \"Error: size of map should be greater than 0 (\" << *argv << \")\"\n                                  << \"\\n\";\n                        error_found = true;\n                    }\n                }\n            }\n            argc--;\n            argv++;\n        }\n        // format 2: --seed nnn -- initial random number seed\n        else if (!strncmp(\"--seed\", *argv, (std::size_t)6)) {\n            argv++;\n            argc--;\n            if (nSeedSpecified) {\n                std::cout << \"Error: new seed multiply specified\"\n                          << \"\\n\";\n                error_found = true;\n            }\n            else {\n                nSeedSpecified = true;\n                int rtval = sscanf(*argv, \"%u\", &newSeed);\n                if (rtval == 0) {\n                    std::cout << \"Error: --seed should be an unsigned number (instead of \" << *argv\n                              << \")\"\n                              << \"\\n\";\n                    error_found = true;\n                }\n            }\n            argv++;\n            argc--;\n        }\n        // format 3: --polys n[n] -- number of polygons in each map\n        else if (!strncmp(\"--polys\", *argv, (std::size_t)7)) {\n            //unsigned int newnPolygons;\n            argv++;\n            argc--;\n            if (nPolysSpecified) {\n                std::cout << \"Error: number of polygons multiply-specified\"\n                          << \"\\n\";\n                error_found = true;\n            }\n            else {\n                int rtval = sscanf(*argv, \"%u\", &newnPolygons);\n                if (newnPolygons == 0) {\n                    std::cout << \"Error: number of polygons must be greater than 0 (\" << *argv\n                              << \")\"\n                              << \"\\n\";\n                }\n            }\n            argv++;\n            argc--;\n        }\n        // format 4: --csv <fileroot> -- name of CSV output file (\"xxx\" for \"xxx.csv\")\n        else if (!strncmp(\"--csv\", *argv, (std::size_t)5)) {\n            argv++;\n            argc--;\n            if (csvSpecified) {\n                std::cout << \"Error: Multiple specification of CSV file\"\n                          << \"\\n\";\n                error_found = true;\n            }\n            else {\n                gCsvFilename = *argv;\n                argv++;\n                argc--;\n                csvSpecified = true;\n            }\n        }\n        else if (!strncmp(\"--grainsize\", *argv, (std::size_t)11)) {\n            argv++;\n            argc--;\n            if (grainsizeSpecified) {\n                std::cout << \"Error: Multiple specification of grainsize\"\n                          << \"\\n\";\n                error_found = true;\n            }\n            else {\n                int grval = sscanf(*argv, \"%u\", &newGrainSize);\n                grainsizeSpecified = true;\n                if (newGrainSize == 0) {\n                    std::cout << \"Error: grainsize must be greater than 0\"\n                              << \"\\n\";\n                    error_found = true;\n                }\n            }\n            argv++;\n            argc--;\n        }\n        else if (!strncmp(\"--use_malloc\", *argv, (std::size_t)12)) {\n            argv++;\n            argc--;\n            if (mallocSpecified) {\n                std::cout << \"Error: --use_malloc multiply-specified\"\n                          << \"\\n\";\n                error_found = true;\n            }\n            else {\n                mallocSpecified = true;\n                gMBehavior = UseMalloc;\n            }\n        }\n        else {\n            std::cout << \"Error: unrecognized argument: \" << *argv << \"\\n\";\n            error_found = true;\n            argv++;\n            argc--;\n        }\n    }\n    if (!error_found) {\n        if (newX * newY < newnPolygons) {\n            error_found = true;\n            std::cout\n                << \"Error: map size should not be smaller than the number of polygons (gNPolygons = \"\n                << newnPolygons << \", map size \" << newX << \"x\" << newY << \")\"\n                << \"\\n\";\n        }\n    }\n    if (!error_found) {\n        gMapXSize = newX;\n        gMapYSize = newY;\n        gNPolygons = newnPolygons;\n        gMyRandomSeed = newSeed;\n        gGrainSize = (int)newGrainSize;\n    }\n    else {\n        Usage(origArgc, origArgv);\n    }\n    return !error_found;\n}\n\n// create a polygon map with at least gNPolygons polygons.\n// Usually more than gNPolygons polygons will be generated, because the\n// process of growing the polygons results in holes.\nbool GenerateMap(Polygon_map_t **newMap,\n                 int xSize,\n                 int ySize,\n                 int gNPolygons,\n                 colorcomp_t maxR,\n                 colorcomp_t maxG,\n                 colorcomp_t maxB) {\n    bool error_found = false;\n    int *validPolys;\n    int *validSide;\n    int maxSides;\n    RPolygon *newPoly;\n\n    if (xSize <= 0) {\n        std::cout << \"xSize (\" << xSize << \") should be > 0.\"\n                  << \"\\n\";\n        error_found = true;\n    }\n    if (ySize <= 0) {\n        std::cout << \"ySize (\" << ySize << \") should be > 0.\"\n                  << \"\\n\";\n        error_found = true;\n    }\n    if (gNPolygons > (xSize * ySize)) {\n        std::cout << \"gNPolygons (\" << gNPolygons << \") should be less than \" << (xSize * ySize)\n                  << \"\\n\";\n        error_found = true;\n    }\n    if (error_found)\n        return false;\n    // the whole map is [xSize x ySize] squares\n    // the way we create the map is to\n    //    1) pick nPolygon discrete squares on an [xSize x ySize] grid\n    //    2) while there are unused squares on the grid\n    //        3) pick a polygon with a side that has unused squares on a side\n    //        4) expand the polygon by 1 to occupy the unused squares\n    //\n    // Continue until every square on the grid is occupied by a polygon\n    int *tempMap;\n    tempMap = (int *)malloc(xSize * ySize * sizeof(int));\n    for (int i = 0; i < xSize; i++) {\n        for (int j = 0; j < ySize; j++) {\n            tempMap[i * ySize + j] = 0;\n        }\n    }\n\n    // *newMap = new vector<RPolygon>;\n    *newMap = new Polygon_map_t;\n    (*newMap)->reserve(gNPolygons + 1); // how much bigger does this need to be on average?\n    (*newMap)->push_back(RPolygon(0, 0, xSize - 1, ySize - 1));\n    for (int i = 0; i < gNPolygons; i++) {\n        int nX;\n        int nY;\n        do { // look for an empty square.\n            nX = NextRan(xSize);\n            nY = NextRan(ySize);\n        } while (tempMap[nX * ySize + nY] != 0);\n        int nR = (maxR * NextRan(1000)) / 999;\n        int nG = (maxG * NextRan(1000)) / 999;\n        int nB = (maxB * NextRan(1000)) / 999;\n        (*newMap)->push_back(RPolygon(nX, nY, nX, nY, nR, nG, nB));\n        tempMap[nX * ySize + nY] = i + 1; // index of this polygon + 1\n    }\n    // now have to grow polygons to fill the space.\n    validPolys = (int *)malloc(4 * gNPolygons * sizeof(int));\n    validSide = (int *)malloc(4 * gNPolygons * sizeof(int));\n    for (int i = 0; i < gNPolygons; i++) {\n        validPolys[4 * i] = validPolys[4 * i + 1] = validPolys[4 * i + 2] = validPolys[4 * i + 3] =\n            i + 1;\n        validSide[4 * i] = NORTH_SIDE;\n        validSide[4 * i + 1] = EAST_SIDE;\n        validSide[4 * i + 2] = SOUTH_SIDE;\n        validSide[4 * i + 3] = WEST_SIDE;\n    }\n    maxSides = 4 * gNPolygons;\n    while (maxSides > 0) {\n        int indx = NextRan(maxSides);\n        int polyIndx = validPolys[indx];\n        int checkSide = validSide[indx];\n        int xlow, xhigh, ylow, yhigh;\n        int xlnew, xhnew, ylnew, yhnew;\n        (**newMap)[polyIndx].get(&xlow, &ylow, &xhigh, &yhigh);\n        xlnew = xlow;\n        xhnew = xhigh;\n        ylnew = ylow;\n        yhnew = yhigh;\n        // can this polygon be expanded along the chosen side?\n        switch (checkSide) {\n            case NORTH_SIDE:\n                // y-1 from xlow to xhigh\n                ylow = yhigh = (ylow - 1);\n                ylnew--;\n                break;\n            case EAST_SIDE:\n                // x+1 from ylow to yhigh\n                xlow = xhigh = (xhigh + 1);\n                xhnew++;\n                break;\n            case SOUTH_SIDE:\n                // y+1 from xlow to xhigh\n                ylow = yhigh = (yhigh + 1);\n                yhnew++;\n                break;\n            case WEST_SIDE:\n                // x-1 from ylow to yhigh\n                xlow = xhigh = (xlow - 1);\n                xlnew--;\n                break;\n        }\n        bool okay_to_extend = !(((xlow < 0) || (xlow >= xSize)) || ((ylow < 0) || (ylow >= ySize)));\n        for (int i = xlow; (i <= xhigh) && okay_to_extend; i++) {\n            for (int j = ylow; (j <= yhigh) && okay_to_extend; j++) {\n                okay_to_extend = tempMap[i * ySize + j] == 0;\n            }\n        }\n        if (okay_to_extend) {\n            (**newMap)[polyIndx].set(xlnew, ylnew, xhnew, yhnew);\n            for (int i = xlow; i <= xhigh; i++) {\n                for (int j = ylow; j <= yhigh && okay_to_extend; j++) {\n                    tempMap[i * ySize + j] = polyIndx;\n                }\n            }\n        }\n        else {\n            // once we cannot expand along a side, we will never be able to; remove from the list.\n            for (int i = indx + 1; i < maxSides; i++) {\n                validPolys[i - 1] = validPolys[i];\n                validSide[i - 1] = validSide[i];\n            }\n            maxSides--;\n        }\n    }\n\n    // Once no polygons can be grown, look for unused squares, and fill them with polygons.\n    for (int j = 0; j < ySize; j++) {\n        for (int i = 0; i < xSize; i++) {\n            if (tempMap[i * ySize + j] == 0) {\n                // try to grow in the x direction, then the y direction\n                int ilen = i;\n                int jlen = j;\n                while (ilen < (xSize - 1) && tempMap[(ilen + 1) * ySize + jlen] == 0) {\n                    ilen++;\n                }\n                bool yok = true;\n                while (yok && jlen < (ySize - 1)) {\n                    for (int k = i; k <= ilen && yok; k++) {\n                        yok = (tempMap[k * ySize + jlen + 1] == 0);\n                    }\n                    if (yok) {\n                        jlen++;\n                    }\n                }\n\n                // create new polygon and push it on our list.\n                int nR = (maxR * NextRan(1000)) / 999;\n                int nG = (maxG * NextRan(1000)) / 999;\n                int nB = (maxB * NextRan(1000)) / 999;\n                (*newMap)->push_back(RPolygon(i, j, ilen, jlen, nR, nG, nB));\n                gNPolygons++;\n                for (int k = i; k <= ilen; k++) {\n                    for (int l = j; l <= jlen; l++) {\n                        tempMap[k * ySize + l] = gNPolygons;\n                    }\n                }\n            }\n        }\n    }\n\n#if _DEBUG\n    if (!gIsGraphicalVersion) {\n        std::cout << \"\\n\"\n                  << \"Final Map:\"\n                  << \"\\n\";\n        for (int j = 0; j < ySize; j++) {\n            std::cout << \"Row \" << std::setw(2) << j << \":\";\n            for (int i = 0; i < xSize; i++) {\n                int it = tempMap[i * ySize + j];\n                if (it < 10) {\n                    std::cout << std::setw(2) << it;\n                }\n                else {\n                    char ct = (int)'a' + it - 10;\n                    std::cout << \" \" << ct;\n                }\n            }\n            std::cout << \"\\n\";\n        }\n    }\n#endif // _DEBUG\n    free(tempMap);\n    free(validPolys);\n    free(validSide);\n    return true;\n}\n\nvoid CheckPolygonMap(Polygon_map_t *checkMap) {\n#define indx(i, j) (i * gMapYSize + j)\n#define rangeCheck(str, n, limit)                                               \\\n    if (((n) < 0) || ((n) >= limit)) {                                          \\\n        std::cout << \"checkMap error: \" << str << \" out of range (\" << n << \")\" \\\n                  << \"\\n\";                                                      \\\n        anError = true;                                                         \\\n    }\n#define xRangeCheck(str, n) rangeCheck(str, n, gMapXSize)\n#define yRangeCheck(str, n) rangeCheck(str, n, gMapYSize)\n    // The first polygon is the whole map.\n    bool anError = false;\n    int *cArray;\n    if (checkMap->size() <= 0) {\n        std::cout << \"checkMap error: no polygons in map\"\n                  << \"\\n\";\n        return;\n    }\n    // mapXhigh and mapYhigh are inclusive, that is, if the map is 5x5, those values would be 4.\n    int mapXhigh, mapYhigh, mapLowX, mapLowY;\n    int gMapXSize, gMapYSize;\n    (*checkMap)[0].get(&mapLowX, &mapLowY, &mapXhigh, &mapYhigh);\n    if ((mapLowX != 0) || (mapLowY != 0)) {\n        std::cout << \"checkMap error: map origin not (0,0) (X=\" << mapLowX << \", Y=\" << mapLowY\n                  << \")\"\n                  << \"\\n\";\n        anError = true;\n    }\n    if ((mapXhigh < 0) || (mapYhigh < 0)) {\n        std::cout << \"checkMap error: no area in map (X=\" << mapXhigh << \", Y=\" << mapYhigh << \")\"\n                  << \"\\n\";\n        anError = true;\n    }\n    if (anError)\n        return;\n    // bounds for array.\n    gMapXSize = mapXhigh + 1;\n    gMapYSize = mapYhigh + 1;\n    cArray = (int *)malloc(sizeof(int) * (gMapXSize * gMapYSize));\n\n    for (int i = 0; i < gMapXSize; i++) {\n        for (int j = 0; j < gMapYSize; j++) {\n            cArray[indx(i, j)] = 0;\n        }\n    }\n\n    int xlow, xhigh, ylow, yhigh;\n    for (int k = 1; k < int(checkMap->size()) && !anError; k++) {\n        (*checkMap)[k].get(&xlow, &ylow, &xhigh, &yhigh);\n        xRangeCheck(\"xlow\", xlow);\n        yRangeCheck(\"ylow\", ylow);\n        xRangeCheck(\"xhigh\", xhigh);\n        yRangeCheck(\"yhigh\", yhigh);\n        if (xlow > xhigh) {\n            std::cout << \"checkMap error: xlow > xhigh (\" << xlow << \",\" << xhigh << \")\"\n                      << \"\\n\";\n            anError = true;\n        }\n        if (ylow > yhigh) {\n            std::cout << \"checkMap error: ylow > yhigh (\" << ylow << \",\" << yhigh << \")\"\n                      << \"\\n\";\n            anError = true;\n        }\n        for (int i = xlow; i <= xhigh; i++) {\n            for (int j = ylow; j <= yhigh; j++) {\n                if (cArray[indx(i, j)] != 0) {\n                    std::cout << \"checkMap error: polygons \" << cArray[indx(i, j)] << \" and \" << k\n                              << \" intersect\"\n                              << \"\\n\";\n                    anError = true;\n                }\n                cArray[indx(i, j)] = k;\n            }\n        }\n    }\n    for (int i = 0; i < gMapXSize; i++) {\n        for (int j = 0; j < gMapYSize; j++) {\n            if (cArray[indx(i, j)] == 0) {\n                std::cout << \"checkMap error: block(\" << i << \", \" << j << \") not in any polygon\"\n                          << \"\\n\";\n                anError = true;\n            }\n        }\n    }\n    free(cArray);\n}\n\nbool CompOnePolygon(RPolygon &p1, RPolygon &p2) {\n    int xl1, xh1, yl1, yh1;\n    int xl2, xh2, yl2, yh2;\n    p1.get(&xl1, &yl1, &xh1, &yh1);\n    p2.get(&xl2, &yl2, &xh2, &yh2);\n    if (yl1 > yl2)\n        return true;\n    if (yl1 < yl2)\n        return false;\n    return (xl1 > xl2);\n}\n\nbool PolygonsEqual(RPolygon *p1, RPolygon *p2) {\n    int xl1, xh1, yl1, yh1;\n    int xl2, xh2, yl2, yh2;\n    p1->get(&xl1, &yl1, &xh1, &yh1);\n    p2->get(&xl2, &yl2, &xh2, &yh2);\n    return ((xl1 == xl2) && (yl1 == yl2) && (xh1 == xh2) && (yh1 == yh2));\n}\n\nbool ComparePolygonMaps(Polygon_map_t *map1, Polygon_map_t *map2) {\n    // create two new polygon maps, copy the pointers from the original to these.\n    // we have to skip the first polygon, which is the size of the whole map\n    Polygon_map_t *t1, *t2;\n    bool is_ok = true;\n    t1 = new Polygon_map_t;\n    t1->reserve(map1->size());\n    for (unsigned int i = 1; i < map1->size(); i++) {\n        t1->push_back(map1->at(i));\n    }\n    t2 = new Polygon_map_t;\n    t2->reserve(map2->size());\n    for (unsigned int i = 1; i < map2->size(); i++) {\n        t2->push_back(map2->at(i));\n    }\n    // sort the two created maps by (xlow, ylow)\n    sort(t1->begin(), t1->end());\n    sort(t2->begin(), t2->end());\n    // compare each element of both maps.\n    if (t1->size() != t2->size()) {\n        std::cout << \"Error: maps not the same size ( \" << int(t1->size()) << \" vs \"\n                  << int(t2->size()) << \").\"\n                  << \"\\n\";\n    }\n    int maxSize = (int)((t1->size() < t2->size()) ? t1->size() : t2->size());\n    for (int i = 0; i < maxSize; i++) {\n        if (!PolygonsEqual(&((*t1)[i]), &((*t2)[i]))) {\n            std::cout << \"Error: polygons unequal (\" << (*t1)[i] << \" vs \" << (*t2)[i] << \"\\n\";\n            is_ok = false;\n        }\n    }\n    delete t1;\n    delete t2;\n    return is_ok;\n}\n\nvoid SetRandomSeed(int newSeed) {\n    srand((unsigned)newSeed);\n}\n\nint NextRan(int n) {\n    // assert(n > 1);\n    // if we are given 1, we will just return 0\n    //assert(n < RAND_MAX);\n    int rrand = rand() << 15 | rand();\n    if (rrand < 0)\n        rrand = -rrand;\n    return rrand % n;\n}\n\nstd::ostream &operator<<(std::ostream &s, const RPolygon &p) {\n    int xl, yl, xh, yh;\n    p.get(&xl, &yl, &xh, &yh);\n    return s << \"[(\" << xl << \",\" << yl << \")-(\" << xh << \",\" << yh << \")] \";\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/polygon_overlay/polymain.hpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TBB_examples_polygon_overlay_polymain_H\n#define TBB_examples_polygon_overlay_polymain_H\n\n#include \"pover_global.hpp\" // for declaration of DEFINE and INIT\n\nDEFINE Polygon_map_t *gPolymap1 INIT(nullptr);\nDEFINE Polygon_map_t *gPolymap2 INIT(nullptr);\nDEFINE Polygon_map_t *gResultMap INIT(nullptr);\n\nextern void Usage(int argc, char *argv[]);\n\nextern bool ParseCmdLine(int argc, char *argv[]);\n\nextern bool GenerateMap(Polygon_map_t **newMap,\n                        int xSize,\n                        int ySize,\n                        int gNPolygons,\n                        colorcomp_t maxR,\n                        colorcomp_t maxG,\n                        colorcomp_t maxB);\n\nextern bool PolygonsOverlap(RPolygon *p1, RPolygon *p2, int &xl, int &yl, int &xh, int &yh);\n\nextern void CheckPolygonMap(Polygon_map_t *checkMap);\n\nextern bool CompOnePolygon(RPolygon *p1, RPolygon *p2);\n\nextern bool PolygonsEqual(RPolygon *p1, RPolygon *p2);\n\nextern bool ComparePolygonMaps(Polygon_map_t *map1, Polygon_map_t *map2);\n\nextern void SetRandomSeed(int newSeed);\n\nextern int NextRan(int n);\n\n#endif /* TBB_examples_polygon_overlay_polymain_H */\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/polygon_overlay/polyover.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// Polygon overlay\n//\n#include <cstdlib>\n#include <cstring>\n#include <cassert>\n\n#include <iostream>\n#include <algorithm>\n\n#include \"oneapi/tbb/tick_count.h\"\n#include \"oneapi/tbb/blocked_range.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/spin_mutex.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include \"common/utility/get_default_num_threads.hpp\"\n\n#include \"polyover.hpp\"\n#include \"polymain.hpp\"\n#include \"pover_video.hpp\"\n\n/*!\n* @brief intersects a polygon with a map, adding any results to output map\n*\n* @param[out] resultMap output map (must be allocated)\n* @param[in] polygon to be intersected\n* @param[in] map intersected against\n* @param[in] lock to use when adding output polygons to result map\n*\n*/\nvoid OverlayOnePolygonWithMap(Polygon_map_t *resultMap,\n                              RPolygon *myPoly,\n                              Polygon_map_t *map2,\n                              oneapi::tbb::spin_mutex *rMutex) {\n    int r1, g1, b1, r2, g2, b2;\n    int myr = 0;\n    int myg = 0;\n    int myb = 0;\n    int p1Area = myPoly->area();\n    for (unsigned int j = 1; (j < map2->size()) && (p1Area > 0); j++) {\n        RPolygon *p2 = &((*map2)[j]);\n        RPolygon *pnew;\n        int newxMin, newxMax, newyMin, newyMax;\n        myPoly->getColor(&r1, &g1, &b1);\n        if (PolygonsOverlap(myPoly, p2, newxMin, newyMin, newxMax, newyMax)) {\n            p2->getColor(&r2, &g2, &b2);\n            myr = r1 + r2;\n            myg = g1 + g2;\n            myb = b1 + b2;\n            p1Area -= (newxMax - newxMin + 1) * (newyMax - newyMin + 1);\n            if (rMutex) {\n                oneapi::tbb::spin_mutex::scoped_lock lock(*rMutex);\n                resultMap->push_back(RPolygon(newxMin, newyMin, newxMax, newyMax, myr, myg, myb));\n            }\n            else {\n                resultMap->push_back(RPolygon(newxMin, newyMin, newxMax, newyMax, myr, myg, myb));\n            }\n        }\n    }\n}\n\n/*!\n* @brief Serial version of polygon overlay\n* @param[out] output map\n* @param[in]  first map (map that individual polygons are taken from)\n* @param[in]  second map (map passed to OverlayOnePolygonWithMap)\n*/\nvoid SerialOverlayMaps(Polygon_map_t **resultMap, Polygon_map_t *map1, Polygon_map_t *map2) {\n    std::cout << \"SerialOverlayMaps called\"\n              << \"\\n\";\n    *resultMap = new Polygon_map_t;\n\n    RPolygon *p0 = &((*map1)[0]);\n    int mapxSize, mapySize, ignore1, ignore2;\n    p0->get(&ignore1, &ignore2, &mapxSize, &mapySize);\n    (*resultMap)->reserve(mapxSize * mapySize); // can't be any bigger than this\n    // push the map size as the first polygon,\n    (*resultMap)->push_back(RPolygon(0, 0, mapxSize, mapySize));\n    for (unsigned int i = 1; i < map1->size(); i++) {\n        RPolygon *p1 = &((*map1)[i]);\n        OverlayOnePolygonWithMap(*resultMap, p1, map2, nullptr);\n    }\n}\n\n/*!\n* @class ApplyOverlay\n* @brief Simple version of parallel overlay (make parallel on polygons in map1)\n*/\nclass ApplyOverlay {\n    Polygon_map_t *m_map1, *m_map2, *m_resultMap;\n    oneapi::tbb::spin_mutex *m_rMutex;\n\npublic:\n    /*!\n    * @brief functor to apply\n    * @param[in] r range of polygons to intersect from map1\n    */\n    void operator()(const oneapi::tbb::blocked_range<int> &r) const {\n        PRINT_DEBUG(\"From \" << r.begin() << \" to \" << r.end());\n        for (int i = r.begin(); i != r.end(); i++) {\n            RPolygon *myPoly = &((*m_map1)[i]);\n            OverlayOnePolygonWithMap(m_resultMap, myPoly, m_map2, m_rMutex);\n        }\n    }\n    ApplyOverlay(Polygon_map_t *resultMap,\n                 Polygon_map_t *map1,\n                 Polygon_map_t *map2,\n                 oneapi::tbb::spin_mutex *rmutex)\n            : m_resultMap(resultMap),\n              m_map1(map1),\n              m_map2(map2),\n              m_rMutex(rmutex) {}\n};\n\n/*!\n* @brief apply the parallel algorithm\n* @param[out] result_map generated map\n* @param[in] polymap1 first map to be applied (algorithm is parallel on this map)\n* @param[in] polymap2 second map.\n*/\nvoid NaiveParallelOverlay(Polygon_map_t *&result_map,\n                          Polygon_map_t &polymap1,\n                          Polygon_map_t &polymap2) {\n    // -----------------------------------\n    bool automatic_threadcount = false;\n\n    if (gThreadsLow == THREADS_UNSET || gThreadsLow == utility::get_default_num_threads()) {\n        gThreadsLow = gThreadsHigh = utility::get_default_num_threads();\n        automatic_threadcount = true;\n    }\n    result_map = new Polygon_map_t;\n\n    RPolygon *p0 = &(polymap1[0]);\n    int mapxSize, mapySize, ignore1, ignore2;\n    p0->get(&ignore1, &ignore2, &mapxSize, &mapySize);\n    result_map->reserve(mapxSize * mapySize); // can't be any bigger than this\n    // push the map size as the first polygon,\n    oneapi::tbb::spin_mutex *resultMutex = new oneapi::tbb::spin_mutex();\n    int grain_size = gGrainSize;\n\n    for (int nthreads = gThreadsLow; nthreads <= gThreadsHigh; nthreads++) {\n        oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism,\n                                      nthreads);\n        if (gIsGraphicalVersion) {\n            RPolygon *xp =\n                new RPolygon(0, 0, gMapXSize - 1, gMapYSize - 1, 0, 0, 0); // Clear the output space\n            delete xp;\n        }\n        // put size polygon in result map\n        result_map->push_back(RPolygon(0, 0, mapxSize, mapySize));\n\n        oneapi::tbb::tick_count t0 = oneapi::tbb::tick_count::now();\n        oneapi::tbb::parallel_for(\n            oneapi::tbb::blocked_range<int>(1, (int)(polymap1.size()), grain_size),\n            ApplyOverlay(result_map, &polymap1, &polymap2, resultMutex));\n        oneapi::tbb::tick_count t1 = oneapi::tbb::tick_count::now();\n\n        double naiveParallelTime = (t1 - t0).seconds() * 1000;\n        std::cout << \"Naive parallel with spin lock and \";\n        if (automatic_threadcount)\n            std::cout << \"automatic\";\n        else\n            std::cout << nthreads;\n        std::cout << ((nthreads == 1) ? \" thread\" : \" threads\");\n        std::cout << \" took \" << naiveParallelTime << \" msec : speedup over serial \"\n                  << (gSerialTime / naiveParallelTime) << \"\\n\";\n        if (gCsvFile.is_open()) {\n            gCsvFile << \",\" << naiveParallelTime;\n        }\n#if _DEBUG\n        CheckPolygonMap(result_map);\n        ComparePolygonMaps(result_map, gResultMap);\n#endif\n        result_map->clear();\n    }\n    delete resultMutex;\n    if (gCsvFile.is_open()) {\n        gCsvFile << \"\\n\";\n    }\n    // -----------------------------------\n}\n\ntemplate <typename T>\nvoid split_at(Flagged_map_t &in_map,\n              Flagged_map_t &left_out,\n              Flagged_map_t &right_out,\n              const T median) {\n    left_out.reserve(in_map.size());\n    right_out.reserve(in_map.size());\n    for (Flagged_map_t::iterator i = in_map.begin(); i != in_map.end(); ++i) {\n        RPolygon *p = i->p();\n        if (p->xmax() < median) {\n            // in left map\n            left_out.push_back(*i);\n        }\n        else if (p->xmin() >= median) {\n            right_out.push_back(*i);\n            // in right map\n        }\n        else {\n            // in both maps.\n            left_out.push_back(*i);\n            right_out.push_back(RPolygon_flagged(p, true));\n        }\n    }\n}\n\n// range that splits the maps as well as the range.  the flagged_map_t are\n// vectors of pointers, and each range owns its maps (has to free them on destruction.)\ntemplate <typename T>\nclass blocked_range_with_maps {\n    typedef oneapi::tbb::blocked_range<T> my_range_type;\n\nprivate:\n    my_range_type my_range;\n    Flagged_map_t my_map1;\n    Flagged_map_t my_map2;\n\npublic:\n    blocked_range_with_maps(T begin,\n                            T end,\n                            typename my_range_type::size_type my_grainsize,\n                            Polygon_map_t *p1,\n                            Polygon_map_t *p2)\n            : my_range(begin, end, my_grainsize) {\n        my_map1.reserve(p1->size());\n        my_map2.reserve(p2->size());\n        for (int i = 1; i < p1->size(); ++i) {\n            my_map1.push_back(RPolygon_flagged(&((*p1)[i]), false));\n        }\n        for (int i = 1; i < p2->size(); ++i) {\n            my_map2.push_back(RPolygon_flagged(&(p2->at(i)), false));\n        }\n    }\n\n    // copy-constructor required for deep copy of flagged maps.  One copy is done at the start of the\n    // parallel for.\n    blocked_range_with_maps(const blocked_range_with_maps &other)\n            : my_range(other.my_range),\n              my_map1(other.my_map1),\n              my_map2(other.my_map2) {}\n    bool empty() const {\n        return my_range.empty();\n    }\n    bool is_divisible() const {\n        return my_range.is_divisible();\n    }\n\n#if _DEBUG\n    void check_my_map() {\n        assert(my_range.begin() <= my_range.end());\n        for (Flagged_map_t::iterator i = my_map1.begin(); i != my_map1.end(); ++i) {\n            RPolygon *rp = i->p();\n            assert(rp->xmax() >= my_range.begin());\n            assert(rp->xmin() < my_range.end());\n        }\n        for (Flagged_map_t::iterator i = my_map2.begin(); i != my_map2.end(); ++i) {\n            RPolygon *rp = i->p();\n            assert(rp->xmax() >= my_range.begin());\n            assert(rp->xmin() < my_range.end());\n        }\n    }\n\n    void dump_map(Flagged_map_t &mapx) {\n        std::cout << \" ** MAP **\\n\";\n        for (Flagged_map_t::iterator i = mapx.begin(); i != mapx.end(); ++i) {\n            std::cout << *(i->p());\n            if (i->isDuplicate()) {\n                std::cout << \" -- is_duplicate\";\n            }\n            std::cout << \"\\n\";\n        }\n        std::cout << \"\\n\";\n    }\n#endif\n\n    blocked_range_with_maps(blocked_range_with_maps &lhs_r, oneapi::tbb::split)\n            : my_range(my_range_type(lhs_r.my_range, oneapi::tbb::split())) {\n        // lhs_r.my_range makes my_range from [median, high) and rhs_r.my_range from [low, median)\n        Flagged_map_t original_map1 = lhs_r.my_map1;\n        Flagged_map_t original_map2 = lhs_r.my_map2;\n        lhs_r.my_map1.clear();\n        lhs_r.my_map2.clear();\n        split_at(original_map1, lhs_r.my_map1, my_map1, my_range.begin());\n        split_at(original_map2, lhs_r.my_map2, my_map2, my_range.begin());\n#if _DEBUG\n        this->check_my_map();\n        lhs_r.check_my_map();\n#endif\n    }\n\n    const my_range_type &range() const {\n        return my_range;\n    }\n    Flagged_map_t &map1() {\n        return my_map1;\n    }\n    Flagged_map_t &map2() {\n        return my_map2;\n    }\n};\n\n/*!\n* @class ApplySplitOverlay\n* @brief parallel by columnar strip\n*/\nclass ApplySplitOverlay {\n    Polygon_map_t *m_map1, *m_map2, *m_resultMap;\n    oneapi::tbb::spin_mutex *m_rMutex;\n\npublic:\n    /*!\n    * @brief functor for columnar parallel version\n    * @param[in] r range of map to be operated on\n    */\n    void operator()(/*const*/ blocked_range_with_maps<int> &r) const {\n#ifdef _DEBUG\n        // if we are debugging, serialize the method.  That way we can\n        // see what is happening in each strip without the interleaving\n        // confusing things.\n        oneapi::tbb::spin_mutex::scoped_lock lock(*m_rMutex);\n        std::cout << std::unitbuf << \"From \" << r.range().begin() << \" to \" << r.range().end() - 1\n                  << \"\\n\";\n#endif\n        // get yMapSize\n        int r1, g1, b1, r2, g2, b2;\n        int myr = -1;\n        int myg = -1;\n        int myb = -1;\n        int i1, i2, i3, yMapSize;\n        (*m_map1)[0].get(&i1, &i2, &i3, &yMapSize);\n\n        Flagged_map_t &fmap1 = r.map1();\n        Flagged_map_t &fmap2 = r.map2();\n\n        // When intersecting polygons from fmap1 and fmap2, if BOTH are flagged\n        // as duplicate, don't add the result to the output map.  We can still\n        // intersect them, because we are keeping track of how much of the polygon\n        // is left over from intersecting, and quitting when the polygon is\n        // used up.\n\n        for (unsigned int i = 0; i < fmap1.size(); i++) {\n            RPolygon *p1 = fmap1[i].p();\n            bool is_dup = fmap1[i].isDuplicate();\n            int parea = p1->area();\n            p1->getColor(&r1, &g1, &b1);\n            for (unsigned int j = 0; (j < fmap2.size()) && (parea > 0); j++) {\n                int xl, yl, xh, yh;\n                RPolygon *p2 = fmap2[j].p();\n                if (PolygonsOverlap(p1, p2, xl, yl, xh, yh)) {\n                    if (!(is_dup && fmap2[j].isDuplicate())) {\n                        p2->getColor(&r2, &g2, &b2);\n                        myr = r1 + r2;\n                        myg = g1 + g2;\n                        myb = b1 + b2;\n#ifdef _DEBUG\n#else\n                        oneapi::tbb::spin_mutex::scoped_lock lock(*m_rMutex);\n#endif\n                        (*m_resultMap).push_back(RPolygon(xl, yl, xh, yh, myr, myg, myb));\n                    }\n                    parea -= (xh - xl + 1) * (yh - yl + 1);\n                }\n            }\n        }\n    }\n\n    ApplySplitOverlay(Polygon_map_t *resultMap,\n                      Polygon_map_t *map1,\n                      Polygon_map_t *map2,\n                      oneapi::tbb::spin_mutex *rmutex)\n            : m_resultMap(resultMap),\n              m_map1(map1),\n              m_map2(map2),\n              m_rMutex(rmutex) {}\n};\n\n/*!\n* @brief intersects two maps strip-wise\n*\n* @param[out] resultMap output map (must be allocated)\n* @param[in] polymap1 map to be intersected\n* @param[in] polymap2 map to be intersected\n*/\nvoid SplitParallelOverlay(Polygon_map_t **result_map,\n                          Polygon_map_t *polymap1,\n                          Polygon_map_t *polymap2) {\n    int nthreads;\n    bool automatic_threadcount = false;\n    double domainSplitParallelTime;\n    oneapi::tbb::tick_count t0, t1;\n    oneapi::tbb::spin_mutex *resultMutex;\n    if (gThreadsLow == THREADS_UNSET || gThreadsLow == utility::get_default_num_threads()) {\n        gThreadsLow = gThreadsHigh = utility::get_default_num_threads();\n        automatic_threadcount = true;\n    }\n    *result_map = new Polygon_map_t;\n\n    RPolygon *p0 = &((*polymap1)[0]);\n    int mapxSize, mapySize, ignore1, ignore2;\n    p0->get(&ignore1, &ignore2, &mapxSize, &mapySize);\n    (*result_map)->reserve(mapxSize * mapySize); // can't be any bigger than this\n    resultMutex = new oneapi::tbb::spin_mutex();\n\n    int grain_size;\n#ifdef _DEBUG\n    grain_size = gMapXSize / 4;\n#else\n    grain_size = gGrainSize;\n#endif\n    for (nthreads = gThreadsLow; nthreads <= gThreadsHigh; nthreads++) {\n        oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism,\n                                      nthreads);\n        if (gIsGraphicalVersion) {\n            RPolygon *xp =\n                new RPolygon(0, 0, gMapXSize - 1, gMapYSize - 1, 0, 0, 0); // Clear the output space\n            delete xp;\n        }\n        // push the map size as the first polygon,\n        (*result_map)->push_back(RPolygon(0, 0, mapxSize, mapySize));\n        t0 = oneapi::tbb::tick_count::now();\n        oneapi::tbb::parallel_for(\n            blocked_range_with_maps<int>(0, (int)(mapxSize + 1), grain_size, polymap1, polymap2),\n            ApplySplitOverlay((*result_map), polymap1, polymap2, resultMutex));\n        t1 = oneapi::tbb::tick_count::now();\n        domainSplitParallelTime = (t1 - t0).seconds() * 1000;\n        std::cout << \"Splitting parallel with spin lock and \";\n        if (automatic_threadcount)\n            std::cout << \"automatic\";\n        else\n            std::cout << nthreads;\n        std::cout << ((nthreads == 1) ? \" thread\" : \" threads\");\n        std::cout << \" took \" << domainSplitParallelTime << \" msec : speedup over serial \"\n                  << (gSerialTime / domainSplitParallelTime) << \"\\n\";\n        if (gCsvFile.is_open()) {\n            gCsvFile << \",\" << domainSplitParallelTime;\n        }\n#if _DEBUG\n        CheckPolygonMap(*result_map);\n        ComparePolygonMaps(*result_map, gResultMap);\n#endif\n        (*result_map)->clear();\n    }\n    delete resultMutex;\n    if (gCsvFile.is_open()) {\n        gCsvFile << \"\\n\";\n    }\n}\n\nclass ApplySplitOverlayCV {\n    Polygon_map_t *m_map1, *m_map2;\n    concurrent_Polygon_map_t *m_resultMap;\n\npublic:\n    /*!\n    * @brief functor for columnar parallel version\n    * @param[in] r range of map to be operated on\n    */\n    void operator()(blocked_range_with_maps<int> &r) const {\n        // get yMapSize\n        int r1, g1, b1, r2, g2, b2;\n        int myr = -1;\n        int myg = -1;\n        int myb = -1;\n        int i1, i2, i3, yMapSize;\n        (*m_map1)[0].get(&i1, &i2, &i3, &yMapSize);\n\n        Flagged_map_t &fmap1 = r.map1();\n        Flagged_map_t &fmap2 = r.map2();\n\n        // When intersecting polygons from fmap1 and fmap2, if BOTH are flagged\n        // as duplicate, don't add the result to the output map.  We can still\n        // intersect them, because we are keeping track of how much of the polygon\n        // is left over from intersecting, and quitting when the polygon is\n        // used up.\n\n        for (unsigned int i = 0; i < fmap1.size(); i++) {\n            RPolygon *p1 = fmap1[i].p();\n            bool is_dup = fmap1[i].isDuplicate();\n            int parea = p1->area();\n            p1->getColor(&r1, &g1, &b1);\n            for (unsigned int j = 0; (j < fmap2.size()) && (parea > 0); j++) {\n                int xl, yl, xh, yh;\n                RPolygon *p2 = fmap2[j].p();\n                if (PolygonsOverlap(p1, p2, xl, yl, xh, yh)) {\n                    if (!(is_dup && fmap2[j].isDuplicate())) {\n                        p2->getColor(&r2, &g2, &b2);\n                        myr = r1 + r2;\n                        myg = g1 + g2;\n                        myb = b1 + b2;\n                        (*m_resultMap).push_back(RPolygon(xl, yl, xh, yh, myr, myg, myb));\n                    }\n                    parea -= (xh - xl + 1) * (yh - yl + 1);\n                }\n            }\n        }\n    }\n\n    ApplySplitOverlayCV(concurrent_Polygon_map_t *resultMap,\n                        Polygon_map_t *map1,\n                        Polygon_map_t *map2)\n            : m_resultMap(resultMap),\n              m_map1(map1),\n              m_map2(map2) {}\n};\n\n/*!\n* @brief intersects two maps strip-wise, accumulating into a concurrent_vector\n*\n* @param[out] resultMap output map (must be allocated)\n* @param[in] polymap1 map to be intersected\n* @param[in] polymap2 map to be intersected\n*/\nvoid SplitParallelOverlayCV(concurrent_Polygon_map_t **result_map,\n                            Polygon_map_t *polymap1,\n                            Polygon_map_t *polymap2) {\n    int nthreads;\n    bool automatic_threadcount = false;\n    double domainSplitParallelTime;\n    oneapi::tbb::tick_count t0, t1;\n    if (gThreadsLow == THREADS_UNSET || gThreadsLow == utility::get_default_num_threads()) {\n        gThreadsLow = gThreadsHigh = utility::get_default_num_threads();\n        automatic_threadcount = true;\n    }\n    *result_map = new concurrent_Polygon_map_t;\n\n    RPolygon *p0 = &((*polymap1)[0]);\n    int mapxSize, mapySize, ignore1, ignore2;\n    p0->get(&ignore1, &ignore2, &mapxSize, &mapySize);\n    // (*result_map)->reserve(mapxSize*mapySize); // can't be any bigger than this\n\n    int grain_size;\n#ifdef _DEBUG\n    grain_size = gMapXSize / 4;\n#else\n    grain_size = gGrainSize;\n#endif\n    for (nthreads = gThreadsLow; nthreads <= gThreadsHigh; nthreads++) {\n        oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism,\n                                      nthreads);\n        if (gIsGraphicalVersion) {\n            RPolygon *xp =\n                new RPolygon(0, 0, gMapXSize - 1, gMapYSize - 1, 0, 0, 0); // Clear the output space\n            delete xp;\n        }\n        // push the map size as the first polygon,\n        (*result_map)->push_back(RPolygon(0, 0, mapxSize, mapySize));\n        t0 = oneapi::tbb::tick_count::now();\n        oneapi::tbb::parallel_for(\n            blocked_range_with_maps<int>(0, (int)(mapxSize + 1), grain_size, polymap1, polymap2),\n            ApplySplitOverlayCV((*result_map), polymap1, polymap2));\n        t1 = oneapi::tbb::tick_count::now();\n        domainSplitParallelTime = (t1 - t0).seconds() * 1000;\n        std::cout << \"Splitting parallel with concurrent_vector and \";\n        if (automatic_threadcount)\n            std::cout << \"automatic\";\n        else\n            std::cout << nthreads;\n        std::cout << ((nthreads == 1) ? \" thread\" : \" threads\");\n        std::cout << \" took \" << domainSplitParallelTime << \" msec : speedup over serial \"\n                  << (gSerialTime / domainSplitParallelTime) << \"\\n\";\n        if (gCsvFile.is_open()) {\n            gCsvFile << \",\" << domainSplitParallelTime;\n        }\n#if _DEBUG\n        {\n            Polygon_map_t s_result_map;\n            for (concurrent_Polygon_map_t::const_iterator i = (*result_map)->begin();\n                 i != (*result_map)->end();\n                 ++i) {\n                s_result_map.push_back(*i);\n            }\n            CheckPolygonMap(&s_result_map);\n            ComparePolygonMaps(&s_result_map, gResultMap);\n        }\n#endif\n        (*result_map)->clear();\n    }\n\n    if (gCsvFile.is_open()) {\n        gCsvFile << \"\\n\";\n    }\n}\n\n// ------------------------------------------------------\n\nclass ApplySplitOverlayETS {\n    Polygon_map_t *m_map1, *m_map2;\n    ETS_Polygon_map_t *m_resultMap;\n\npublic:\n    /*!\n    * @brief functor for columnar parallel version\n    * @param[in] r range of map to be operated on\n    */\n    void operator()(blocked_range_with_maps<int> &r) const {\n        // get yMapSize\n        int r1, g1, b1, r2, g2, b2;\n        int myr = -1;\n        int myg = -1;\n        int myb = -1;\n        int i1, i2, i3, yMapSize;\n        (*m_map1)[0].get(&i1, &i2, &i3, &yMapSize);\n\n        Flagged_map_t &fmap1 = r.map1();\n        Flagged_map_t &fmap2 = r.map2();\n\n        // When intersecting polygons from fmap1 and fmap2, if BOTH are flagged\n        // as duplicate, don't add the result to the output map.  We can still\n        // intersect them, because we are keeping track of how much of the polygon\n        // is left over from intersecting, and quitting when the polygon is\n        // used up.\n\n        for (unsigned int i = 0; i < fmap1.size(); i++) {\n            RPolygon *p1 = fmap1[i].p();\n            bool is_dup = fmap1[i].isDuplicate();\n            int parea = p1->area();\n            p1->getColor(&r1, &g1, &b1);\n            for (unsigned int j = 0; (j < fmap2.size()) && (parea > 0); j++) {\n                int xl, yl, xh, yh;\n                RPolygon *p2 = fmap2[j].p();\n                if (PolygonsOverlap(p1, p2, xl, yl, xh, yh)) {\n                    if (!(is_dup && fmap2[j].isDuplicate())) {\n                        p2->getColor(&r2, &g2, &b2);\n                        myr = r1 + r2;\n                        myg = g1 + g2;\n                        myb = b1 + b2;\n                        (*m_resultMap).local().push_back(RPolygon(xl, yl, xh, yh, myr, myg, myb));\n                    }\n                    parea -= (xh - xl + 1) * (yh - yl + 1);\n                }\n            }\n        }\n    }\n\n    ApplySplitOverlayETS(ETS_Polygon_map_t *resultMap, Polygon_map_t *map1, Polygon_map_t *map2)\n            : m_resultMap(resultMap),\n              m_map1(map1),\n              m_map2(map2) {}\n};\n\n/*!\n* @brief intersects two maps strip-wise, accumulating into an ets variable\n*\n* @param[out] resultMap output map (must be allocated)\n* @param[in] polymap1 map to be intersected\n* @param[in] polymap2 map to be intersected\n*/\nvoid SplitParallelOverlayETS(ETS_Polygon_map_t **result_map,\n                             Polygon_map_t *polymap1,\n                             Polygon_map_t *polymap2) {\n    int nthreads;\n    bool automatic_threadcount = false;\n    double domainSplitParallelTime;\n    oneapi::tbb::tick_count t0, t1;\n    if (gThreadsLow == THREADS_UNSET || gThreadsLow == utility::get_default_num_threads()) {\n        gThreadsLow = gThreadsHigh = utility::get_default_num_threads();\n        automatic_threadcount = true;\n    }\n    *result_map = new ETS_Polygon_map_t;\n\n    RPolygon *p0 = &((*polymap1)[0]);\n    int mapxSize, mapySize, ignore1, ignore2;\n    p0->get(&ignore1, &ignore2, &mapxSize, &mapySize);\n    // (*result_map)->reserve(mapxSize*mapySize); // can't be any bigger than this\n\n    int grain_size;\n#ifdef _DEBUG\n    grain_size = gMapXSize / 4;\n#else\n    grain_size = gGrainSize;\n#endif\n    for (nthreads = gThreadsLow; nthreads <= gThreadsHigh; nthreads++) {\n        oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism,\n                                      nthreads);\n        if (gIsGraphicalVersion) {\n            RPolygon *xp =\n                new RPolygon(0, 0, gMapXSize - 1, gMapYSize - 1, 0, 0, 0); // Clear the output space\n            delete xp;\n        }\n        // push the map size as the first polygon,\n        // This polygon needs to be first, so we can push it at the start of a combine.\n        // (*result_map)->local.push_back(RPolygon(0,0,mapxSize, mapySize));\n        t0 = oneapi::tbb::tick_count::now();\n        oneapi::tbb::parallel_for(\n            blocked_range_with_maps<int>(0, (int)(mapxSize + 1), grain_size, polymap1, polymap2),\n            ApplySplitOverlayETS((*result_map), polymap1, polymap2));\n        t1 = oneapi::tbb::tick_count::now();\n        domainSplitParallelTime = (t1 - t0).seconds() * 1000;\n        std::cout << \"Splitting parallel with ETS and \";\n        if (automatic_threadcount)\n            std::cout << \"automatic\";\n        else\n            std::cout << nthreads;\n        std::cout << ((nthreads == 1) ? \" thread\" : \" threads\");\n        std::cout << \" took \" << domainSplitParallelTime << \" msec : speedup over serial \"\n                  << (gSerialTime / domainSplitParallelTime) << \"\\n\";\n        if (gCsvFile.is_open()) {\n            gCsvFile << \",\" << domainSplitParallelTime;\n        }\n#if _DEBUG\n        {\n            Polygon_map_t s_result_map;\n            oneapi::tbb::flattened2d<ETS_Polygon_map_t> psv = flatten2d(**result_map);\n            s_result_map.push_back(RPolygon(0, 0, mapxSize, mapySize));\n            for (oneapi::tbb::flattened2d<ETS_Polygon_map_t>::const_iterator ci = psv.begin();\n                 ci != psv.end();\n                 ++ci) {\n                s_result_map.push_back(*ci);\n            }\n            CheckPolygonMap(&s_result_map);\n            ComparePolygonMaps(&s_result_map, gResultMap);\n        }\n#endif\n        (*result_map)->clear();\n    }\n\n    if (gCsvFile.is_open()) {\n        gCsvFile << \"\\n\";\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/polygon_overlay/polyover.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*!\n * polyover.h : extern declarations for polyover.cpp\n*/\n\n#ifndef TBB_examples_polygon_overlay_polyover_H\n#define TBB_examples_polygon_overlay_polyover_H\n\n#include \"oneapi/tbb/spin_mutex.h\"\n\n#include \"rpolygon.hpp\"\n\nextern void OverlayOnePolygonWithMap(Polygon_map_t *resultMap,\n                                     RPolygon *myPoly,\n                                     Polygon_map_t *map2,\n                                     oneapi::tbb::spin_mutex *rMutex);\n\nextern void SerialOverlayMaps(Polygon_map_t **resultMap, Polygon_map_t *map1, Polygon_map_t *map2);\n\n// extern void NaiveParallelOverlay(Polygon_map_t **result_map, Polygon_map_t *polymap1, Polygon_map_t *polymap2);\nextern void NaiveParallelOverlay(Polygon_map_t *&result_map,\n                                 Polygon_map_t &polymap1,\n                                 Polygon_map_t &polymap2);\n\nextern void SplitParallelOverlay(Polygon_map_t **result_map,\n                                 Polygon_map_t *polymap1,\n                                 Polygon_map_t *polymap2);\nextern void SplitParallelOverlayCV(concurrent_Polygon_map_t **result_map,\n                                   Polygon_map_t *polymap1,\n                                   Polygon_map_t *polymap2);\nextern void SplitParallelOverlayETS(ETS_Polygon_map_t **result_map,\n                                    Polygon_map_t *polymap1,\n                                    Polygon_map_t *polymap2);\n\nextern void CheckPolygonMap(Polygon_map_t *checkMap);\nextern bool ComparePolygonMaps(Polygon_map_t *map1, Polygon_map_t *map2);\n\n#endif /* TBB_examples_polygon_overlay_polyover_H */\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/polygon_overlay/pover_global.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//\n// pover_global.h\n//\n#ifndef TBB_examples_polygon_overlay_pover_global_H\n#define TBB_examples_polygon_overlay_pover_global_H\n\n#ifdef _MAIN_C_\n#define DEFINE  // nothing\n#define STATIC  static\n#define INIT(n) = n\n#else // not in main file\n#define DEFINE  extern\n#define STATIC  // nothing\n#define INIT(n) // nothing\n#endif // _MAIN_C_\n\n#include <iostream>\n#include <fstream>\n\n#ifdef _WINDOWS\n#include <windows.h>\n#endif\n\n// this Polygon class only supports rectangles\nDEFINE int gDrawXOffset INIT(0); // used for drawing polygons\nDEFINE int gDrawYOffset INIT(0);\nDEFINE int gPolyXBoxSize INIT(0); // number of pixels orresponding to one \"square\" (x)\nDEFINE int gPolyYBoxSize INIT(0); // number of pixels orresponding to one \"square\" (y)\nDEFINE bool gDoDraw INIT(false); // render the boxes\n\n#define THREADS_UNSET 0\nDEFINE int gThreadsLow INIT(THREADS_UNSET);\nDEFINE int gThreadsHigh INIT(THREADS_UNSET);\n\nDEFINE std::ofstream gCsvFile;\nDEFINE double gSerialTime;\nDEFINE char *gCsvFilename INIT(nullptr);\n\n#define BORDER_SIZE 10 // number of pixels between maps\n\n// The map size and the number of polygons depends on the version we are compiling.\n// If DEBUG then it is small; else it is large.\n\n#ifdef _DEBUG\nDEFINE int gNPolygons INIT(30); // default number of polygons in map\nDEFINE int gMapXSize INIT(30);\nDEFINE int gMapYSize INIT(30);\nDEFINE int gGrainSize INIT(5);\n#else\nDEFINE int gNPolygons INIT(50000); // default number of polygons in map\nDEFINE int gMapXSize INIT(1000);\nDEFINE int gMapYSize INIT(1000);\nDEFINE int gGrainSize INIT(20);\n#endif\nDEFINE int gMyRandomSeed INIT(2453185);\n\nDEFINE bool gIsGraphicalVersion INIT(false);\n\ntypedef enum { NORTH_SIDE, EAST_SIDE, SOUTH_SIDE, WEST_SIDE } allSides;\n\n#if _DEBUG\n#define PRINT_DEBUG(x) (std::cout << x << \"\\n\")\n#else\n#define PRINT_DEBUG(x)\n#endif\n\n#endif // TBB_examples_polygon_overlay_pover_global_H\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/polygon_overlay/pover_video.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// Support for GUI display for Polygon overlay demo\n\n#define VIDEO_WINMAIN_ARGS\n#include <iostream>\n\n#include \"oneapi/tbb/tick_count.h\"\n\n#include \"common/utility/get_default_num_threads.hpp\"\n\n#include \"polyover.hpp\"\n#include \"polymain.hpp\"\n#include \"pover_video.hpp\"\n#ifndef _WIN32\n#include <sys/time.h>\n#include <unistd.h>\n\nvoid rt_sleep(int msec) {\n    usleep(msec * 1000);\n}\n\n#else //_WIN32\n\n#undef OLDUNIXTIME\n#undef STDTIME\n\n#include <windows.h>\n\nvoid rt_sleep(int msec) {\n    Sleep(msec);\n}\n\n#endif /*  _WIN32  */\n\nbool g_next_frame() {\n    if (++n_next_frame_calls >= frame_skips) { // the data race here is benign\n        n_next_frame_calls = 0;\n        return gVideo->next_frame();\n    }\n    return gVideo->running;\n}\n\nbool g_last_frame() {\n    if (n_next_frame_calls)\n        return gVideo->next_frame();\n    return gVideo->running;\n}\n\nbool initializeVideo(int argc, char *argv[]) {\n    //pover_video *l_video = new pover_video();\n    //gVideo = l_video;\n    gVideo->init_console(); // don't check return code.\n    gVideo->title = g_windowTitle;\n    g_useGraphics = gVideo->init_window(g_xwinsize, g_ywinsize);\n    return true;\n}\n\nvoid pover_video::on_process() {\n    oneapi::tbb::tick_count t0, t1;\n    double naiveParallelTime, domainSplitParallelTime;\n    // create map1  These could be done in parallel, if the pseudorandom number generator were re-seeded.\n    GenerateMap(\n        &gPolymap1, gMapXSize, gMapYSize, gNPolygons, /*red*/ 255, /*green*/ 0, /*blue*/ 127);\n    // create map2\n    GenerateMap(\n        &gPolymap2, gMapXSize, gMapYSize, gNPolygons, /*red*/ 0, /*green*/ 255, /*blue*/ 127);\n    //\n    // Draw source maps\n    gDrawXOffset = map1XLoc;\n    gDrawYOffset = map1YLoc;\n    for (int i = 0; i < int(gPolymap1->size()); i++) {\n        (*gPolymap1)[i].drawPoly();\n    }\n    gDrawXOffset = map2XLoc;\n    gDrawYOffset = map2YLoc;\n    for (int i = 0; i < int(gPolymap2->size()); i++) {\n        (*gPolymap2)[i].drawPoly();\n    }\n    gDoDraw = true;\n\n    // run serial map generation\n    gDrawXOffset = maprXLoc;\n    gDrawYOffset = maprYLoc;\n    {\n        RPolygon *xp =\n            new RPolygon(0, 0, gMapXSize - 1, gMapYSize - 1, 0, 0, 0); // Clear the output space\n        delete xp;\n        t0 = oneapi::tbb::tick_count::now();\n        SerialOverlayMaps(&gResultMap, gPolymap1, gPolymap2);\n        t1 = oneapi::tbb::tick_count::now();\n        std::cout << \"Serial overlay took \" << (t1 - t0).seconds() * 1000 << \" msec\"\n                  << \"\\n\";\n        gSerialTime = (t1 - t0).seconds() * 1000;\n#if _DEBUG\n        CheckPolygonMap(gResultMap);\n        // keep the map for comparison purposes.\n#else\n        delete gResultMap;\n#endif\n        if (gCsvFile.is_open()) {\n            gCsvFile << \"Serial Time,\" << gSerialTime << \"\\n\";\n            gCsvFile << \"Threads,\";\n            if (gThreadsLow == THREADS_UNSET || gThreadsLow == utility::get_default_num_threads()) {\n                gCsvFile << \"Threads,Automatic\";\n            }\n            else {\n                for (int i = gThreadsLow; i <= gThreadsHigh; i++) {\n                    gCsvFile << i;\n                    if (i < gThreadsHigh)\n                        gCsvFile << \",\";\n                }\n            }\n            gCsvFile << \"\\n\";\n        }\n        if (gIsGraphicalVersion)\n            rt_sleep(2000);\n    }\n    // run naive parallel map generation\n    {\n        Polygon_map_t *resultMap;\n        if (gCsvFile.is_open()) {\n            gCsvFile << \"Naive Time\";\n        }\n        NaiveParallelOverlay(resultMap, *gPolymap1, *gPolymap2);\n        delete resultMap;\n        if (gIsGraphicalVersion)\n            rt_sleep(2000);\n    }\n    // run split map generation\n    {\n        Polygon_map_t *resultMap;\n        if (gCsvFile.is_open()) {\n            gCsvFile << \"Split Time\";\n        }\n        SplitParallelOverlay(&resultMap, gPolymap1, gPolymap2);\n        delete resultMap;\n        if (gIsGraphicalVersion)\n            rt_sleep(2000);\n    }\n    // split, accumulating into concurrent vector\n    {\n        concurrent_Polygon_map_t *cresultMap;\n        if (gCsvFile.is_open()) {\n            gCsvFile << \"Split CV time\";\n        }\n        SplitParallelOverlayCV(&cresultMap, gPolymap1, gPolymap2);\n        delete cresultMap;\n        if (gIsGraphicalVersion)\n            rt_sleep(2000);\n    }\n    // split, accumulating into ETS\n    {\n        ETS_Polygon_map_t *cresultMap;\n        if (gCsvFile.is_open()) {\n            gCsvFile << \"Split ETS time\";\n        }\n        SplitParallelOverlayETS(&cresultMap, gPolymap1, gPolymap2);\n        delete cresultMap;\n        if (gIsGraphicalVersion)\n            rt_sleep(2000);\n    }\n    if (gIsGraphicalVersion)\n        rt_sleep(8000);\n    delete gPolymap1;\n    delete gPolymap2;\n#if _DEBUG\n    delete gResultMap;\n#endif\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/polygon_overlay/pover_video.hpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// support for GUI for polygon overlay demo\n//\n#ifndef TBB_examples_polygon_overlay_pover_video_H\n#define TBB_examples_polygon_overlay_pover_video_H\n#include \"common/gui/video.hpp\"\n\n#include \"pover_global.hpp\" // for declaration of DEFINE and INIT\n\nDEFINE class video *gVideo INIT(nullptr);\n\nDEFINE int n_next_frame_calls INIT(0);\nDEFINE int frame_skips INIT(10);\nextern bool g_next_frame();\nextern bool g_last_frame();\n\nclass pover_video : public video {\n    void on_process();\n\npublic:\n#ifdef _WINDOWS\n    bool graphic_display() {\n        return video::win_hInstance != (HINSTANCE) nullptr;\n    }\n#else\n    bool graphic_display() {\n        return true;\n    } // fix this for Linux\n#endif\n    //void on_key(int key);\n};\n\nDEFINE int g_xwinsize INIT(1024);\nDEFINE int g_ywinsize INIT(768);\n\nDEFINE int map1XLoc INIT(10);\nDEFINE int map1YLoc INIT(10);\nDEFINE int map2XLoc INIT(270);\nDEFINE int map2YLoc INIT(10);\nDEFINE int maprXLoc INIT(530);\nDEFINE int maprYLoc INIT(10);\n\nDEFINE const char *g_windowTitle INIT(\"Polygon Overlay\");\nDEFINE bool g_useGraphics INIT(true);\n\nextern bool initializeVideo(int argc, char *argv[]);\n\nextern void rt_sleep(int msec);\n\n#endif // TBB_examples_polygon_overlay_pover_video_H\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/polygon_overlay/rpolygon.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// rpolygon.h\n//\n#ifndef TBB_examples_polygon_overlay_rpolygon_H\n#define TBB_examples_polygon_overlay_rpolygon_H\n\n#include <vector>\n#include <iostream>\n\n#include \"oneapi/tbb/scalable_allocator.h\"\n#include \"oneapi/tbb/concurrent_vector.h\"\n#include \"oneapi/tbb/enumerable_thread_specific.h\"\n\n#include \"pover_video.hpp\"\n\nclass RPolygon;\ntypedef oneapi::tbb::scalable_allocator<RPolygon> RPolygon_allocator;\nDEFINE RPolygon_allocator rAlloc;\n\nenum MallocBehavior { UseMalloc, UseScalableAllocator };\n\nDEFINE MallocBehavior gMBehavior INIT(UseScalableAllocator);\n\nclass RPolygon {\npublic:\n    RPolygon() {\n        m_XMin = m_YMin = m_XMax = m_YMax = 0;\n        m_r = m_g = m_b = 0;\n    }\n    RPolygon(int xMin, int yMin, int xMax, int yMax, int r = -1, int g = -1, int b = -1)\n            : m_XMin(xMin),\n              m_YMin(yMin),\n              m_XMax(xMax),\n              m_YMax(yMax) {\n        if (r >= 0) {\n            m_r = (colorcomp_t)r;\n            m_g = (colorcomp_t)g;\n            m_b = (colorcomp_t)b;\n            if (gDoDraw)\n                drawPoly();\n        }\n    }\n\n    void set_nodraw(int xMin, int yMin, int xMax, int yMax) {\n        m_XMin = xMin;\n        m_YMin = yMin;\n        m_XMax = xMax;\n        m_YMax = yMax;\n    }\n\n    RPolygon &intersect(RPolygon &otherPoly);\n    void set(int xMin, int yMin, int xMax, int yMax) {\n        set_nodraw(xMin, yMin, xMax, yMax);\n        if (gDoDraw) {\n            drawPoly();\n        }\n    }\n    void get(int *xMin, int *yMin, int *xMax, int *yMax) const {\n        *xMin = m_XMin;\n        *yMin = m_YMin;\n        *xMax = m_XMax;\n        *yMax = m_YMax;\n    }\n    int xmax() const {\n        return m_XMax;\n    }\n    int xmin() const {\n        return m_XMin;\n    }\n    int ymax() const {\n        return m_YMax;\n    }\n    int ymin() const {\n        return m_YMin;\n    }\n    void setColor(colorcomp_t newr, colorcomp_t newg, colorcomp_t newb) {\n        m_r = newr;\n        m_g = newg;\n        m_b = newb;\n    }\n    void getColor(int *myr, int *myg, int *myb) {\n        *myr = m_r;\n        *myg = m_g;\n        *myb = m_b;\n    }\n    color_t myColor() {\n        return gVideo->get_color(m_r, m_g, m_b);\n    }\n    void drawPoly() {\n        if (gVideo->running) {\n            if (g_next_frame()) { // Shouldn't call next_frame each time\n                drawing_area ldrawing(gDrawXOffset + m_XMin * gPolyXBoxSize, //x\n                                      gDrawYOffset + m_YMin * gPolyYBoxSize, //y\n                                      (m_XMax - m_XMin + 1) * gPolyXBoxSize, //sizex\n                                      (m_YMax - m_YMin + 1) * gPolyYBoxSize); //sizey\n                for (int y = 0; y < ldrawing.size_y; y++) {\n                    ldrawing.set_pos(0, y);\n                    color_t my_color = myColor();\n                    for (int x = 0; x < ldrawing.size_x; x++) {\n                        ldrawing.put_pixel(my_color);\n                    }\n                }\n            }\n        }\n    }\n\n    int area() {\n        return ((m_XMax - m_XMin + 1) * (m_YMax - m_YMin + 1));\n    }\n    void print(int i) {\n        std::cout << \"RPolygon \" << i << \" (\" << m_XMin << \", \" << m_YMin << \")-(\" << m_XMax << \", \"\n                  << m_YMax << \") \"\n                  << \"\\n\";\n        fflush(stdout);\n    }\n\nprivate:\n    int m_XMin;\n    int m_YMin;\n    int m_XMax;\n    int m_YMax;\n    colorcomp_t m_r;\n    colorcomp_t m_g;\n    colorcomp_t m_b;\n};\n\n#if _MAIN_C_\nbool operator<(const RPolygon &a, const RPolygon &b) {\n    if (a.ymin() > b.ymin())\n        return false;\n    if (a.ymin() < b.ymin())\n        return true;\n    return a.xmin() < b.xmin();\n}\n#else\nextern bool operator<(const RPolygon &a, const RPolygon &b);\n#endif\n\nextern std::ostream &operator<<(std::ostream &s, const RPolygon &p);\n\nclass RPolygon_flagged {\n    RPolygon *myPoly;\n    bool is_duplicate;\n\npublic:\n    RPolygon_flagged() {\n        myPoly = nullptr;\n        is_duplicate = false;\n    }\n    RPolygon_flagged(RPolygon *_p, bool _is_duplicate) : myPoly(_p), is_duplicate(_is_duplicate) {}\n    bool isDuplicate() {\n        return is_duplicate;\n    }\n    void setDuplicate(bool newValue) {\n        is_duplicate = newValue;\n    }\n    RPolygon *p() {\n        return myPoly;\n    }\n    void setp(RPolygon *newp) {\n        myPoly = newp;\n    }\n};\n\ntypedef class std::vector<RPolygon, RPolygon_allocator> Polygon_map_t;\ntypedef class oneapi::tbb::concurrent_vector<RPolygon, RPolygon_allocator> concurrent_Polygon_map_t;\ntypedef class oneapi::tbb::enumerable_thread_specific<Polygon_map_t> ETS_Polygon_map_t;\ntypedef class std::vector<RPolygon_flagged, oneapi::tbb::tbb_allocator<RPolygon_flagged>>\n    Flagged_map_t; // we'll make shallow copies\n\ninline bool PolygonsOverlap(RPolygon *p1, RPolygon *p2, int &xl, int &yl, int &xh, int &yh) {\n    int xl1, yl1, xh1, yh1, xl2, yl2, xh2, yh2;\n#if _DEBUG\n    rt_sleep(1); // slow down the process so we can see it.\n#endif\n    p1->get(&xl1, &yl1, &xh1, &yh1);\n    p2->get(&xl2, &yl2, &xh2, &yh2);\n    if (xl1 > xh2)\n        return false;\n    if (xh1 < xl2)\n        return false;\n    if (yl1 > yh2)\n        return false;\n    if (yh1 < yl2)\n        return false;\n    xl = (xl1 < xl2) ? xl2 : xl1;\n    xh = (xh1 < xh2) ? xh1 : xh2;\n    yl = (yl1 < yl2) ? yl2 : yl1;\n    yh = (yh1 < yh2) ? yh1 : yh2;\n    return true;\n}\n\n#endif // TBB_examples_polygon_overlay_rpolygon_H\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/seismic/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(seismic CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(tbb)\n\nadd_executable(seismic universe.cpp seismic_video.cpp main.cpp)\n\nadd_subdirectory(../../common/gui gui)\n\ntarget_link_libraries(seismic PUBLIC TBB::tbb Threads::Threads UI_LIB_seismic)\ntarget_compile_options(seismic PRIVATE ${TBB_CXX_STD_FLAG})\n\nif (EXAMPLES_UI_MODE STREQUAL \"con\")\n    target_compile_definitions(seismic PRIVATE _CONSOLE)\nendif()\n\nset(EXECUTABLE \"$<TARGET_FILE:seismic>\")\nset(ARGS auto 0)\nset(PERF_ARGS auto 10000 silent)\nset(LIGHT_ARGS 1:2 100)\n\nadd_execution_target(run_seismic seismic ${EXECUTABLE} \"${ARGS}\")\nadd_execution_target(perf_run_seismic seismic ${EXECUTABLE} \"${PERF_ARGS}\")\nadd_execution_target(light_test_seismic seismic ${EXECUTABLE} \"${LIGHT_ARGS}\")\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/seismic/README.md",
    "content": "# Seismic sample\nParallel seismic wave simulation that demonstrates use of `parallel_for` and `affinity_partitioner`.\n\n## Building the example\n```\ncmake <path_to_example> [EXAMPLES_UI_MODE=value]\ncmake --build .\n```\n### Predefined CMake variables\n* `EXAMPLES_UI_MODE` - defines the GUI mode, supported values are `gdi`, `d2d`, `con` on Windows, `x`,`con` on Linux and `mac`,`con` on macOS. The default mode is `con`. See the [common page](../../README.md) to get more information.\n\n## Running the sample\n### Predefined make targets\n* `make run_seismic` - executes the example with predefined parameters.\n* `make perf_run_seismic` ` - executes the example with suggested parameters to measure the oneTBB performance.\n* `make light_test_seismic` - executes the example with suggested parameters to reduce execution time.\n\n### Application parameters\nUsage:\n```\nseismic [n-of-threads=value] [n-of-frames=value] [silent] [serial] [-h] [n-of-threads [n-of-frames]]\n```\n* `-h` - prints the help for command line options.\n* `n-of-threads` -e number of threads to use; a range of the form low\\[:high\\], where low and optional high are non-negative integers or `auto` for a platform-specific default number.\n* `n-of-frames` - number of frames the example processes internally.\n* `silent` - no output except elapsed time.\n* `serial` - in GUI mode start with serial version of algorithm.\n\n### Interactive graphical user interface\nThe following hot keys can be used in interactive execution mode when the example is compiled with the graphical user interface:\n\n* `left mouse button` - starts new seismic wave in place specified by mouse cursor.\n* `space` - toggles between parallel and serial execution modes.\n* `p` - enables parallel execution mode.\n* `s` - enables serial execution mode.\n* `e` - enables screen updates.\n* `d` - disables screen updates (strongly recommended when measuring performance or scalability; see note below).\n* `esc` - stop execution.\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/seismic/gui/resource.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//{{NO_DEPENDENCIES}}\n// Microsoft Visual C++ generated include file.\n// Used by SeismicSimulation.rc\n//\n#define IDC_MYICON                   2\n#define IDD_SEISMICSIMULATION_DIALOG 102\n#define IDS_APP_TITLE                103\n#define IDD_ABOUTBOX                 103\n#define IDM_ABOUT                    104\n#define IDM_EXIT                     105\n#define IDI_SEISMICSIMULATION        107\n#define IDI_SMALL                    108\n#define IDC_SEISMICSIMULATION        109\n#define IDR_MAINFRAME                128\n#define ID_FILE_PARALLEL             32771\n#define ID_FILE_SERIAL               32772\n#define IDM_PARALLEL                 32773\n#define ID_FILE_ENABLEGUI            32774\n#define ID_FILE_DISABLEGUI           32775\n#define IDC_STATIC                   -1\n\n// Next default values for new objects\n//\n#ifdef APSTUDIO_INVOKED\n#ifndef APSTUDIO_READONLY_SYMBOLS\n#define _APS_NO_MFC              1\n#define _APS_NEXT_RESOURCE_VALUE 129\n#define _APS_NEXT_COMMAND_VALUE  32782\n#define _APS_NEXT_CONTROL_VALUE  1000\n#define _APS_NEXT_SYMED_VALUE    110\n#endif\n#endif\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/seismic/gui/seismic.rc",
    "content": "// Microsoft Visual C++ generated resource script.\n//\n#include \"resource.h\"\n\n#define APSTUDIO_READONLY_SYMBOLS\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 2 resource.\n//\n#define APSTUDIO_HIDDEN_SYMBOLS\n#include \"windows.h\"\n#undef APSTUDIO_HIDDEN_SYMBOLS\n\n/////////////////////////////////////////////////////////////////////////////\n#undef APSTUDIO_READONLY_SYMBOLS\n\n/////////////////////////////////////////////////////////////////////////////\n// English (U.S.) resources\n\n#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\n#ifdef _WIN32\nLANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\n#pragma code_page(1252)\n#endif //_WIN32\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Icon\n//\n\n// Icon with lowest ID value placed first to ensure application icon\n// remains consistent on all systems.\nIDI_SEISMICSIMULATION   ICON                    \"SeismicSimulation.ico\"\nIDI_SMALL               ICON                    \"small.ico\"\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Menu\n//\n\nIDC_SEISMICSIMULATION MENU \nBEGIN\n    POPUP \"&File\"\n    BEGIN\n        MENUITEM \"&Parallel\",                   ID_FILE_PARALLEL\n        MENUITEM \"&Serial\",                     ID_FILE_SERIAL\n        MENUITEM SEPARATOR\n        MENUITEM \"&Enable GUI\",                 ID_FILE_ENABLEGUI\n        MENUITEM \"&Disable GUI\",                ID_FILE_DISABLEGUI\n        MENUITEM SEPARATOR\n        MENUITEM \"E&xit\",                       IDM_EXIT\n    END\n    POPUP \"&Help\"\n    BEGIN\n        MENUITEM \"&About ...\",                  IDM_ABOUT\n    END\nEND\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Accelerator\n//\n\nIDC_SEISMICSIMULATION ACCELERATORS \nBEGIN\n    VK_OEM_2,       IDM_ABOUT,              VIRTKEY, ALT, NOINVERT\n    \"P\",            ID_FILE_PARALLEL,       VIRTKEY, ALT, NOINVERT\n    \"S\",            ID_FILE_SERIAL,         VIRTKEY, ALT, NOINVERT\n    \"D\",            ID_FILE_DISABLEGUI,     VIRTKEY, ALT, NOINVERT\n    \"E\",            ID_FILE_ENABLEGUI,      VIRTKEY, ALT, NOINVERT\nEND\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Dialog\n//\n\nIDD_ABOUTBOX DIALOG  22, 17, 230, 75\nSTYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU\nCAPTION \"About\"\nFONT 8, \"System\"\nBEGIN\n    ICON            IDI_SEISMICSIMULATION,IDC_MYICON,14,9,16,16\n    LTEXT           \"SeismicSimulation Version 1.1\",IDC_STATIC,49,10,119,8,SS_NOPREFIX\n    LTEXT           \"Copyright (C) 2005-2008\",IDC_STATIC,49,20,119,8\n    DEFPUSHBUTTON   \"OK\",IDOK,195,6,30,11,WS_GROUP\nEND\n\n\n#ifdef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// TEXTINCLUDE\n//\n\n1 TEXTINCLUDE \nBEGIN\n    \"resource.h\\0\"\nEND\n\n2 TEXTINCLUDE \nBEGIN\n    \"#define APSTUDIO_HIDDEN_SYMBOLS\\r\\n\"\n    \"#include \"\"windows.h\"\"\\r\\n\"\n    \"#undef APSTUDIO_HIDDEN_SYMBOLS\\r\\n\"\n    \"\\0\"\nEND\n\n3 TEXTINCLUDE \nBEGIN\n    \"\\r\\n\"\n    \"\\0\"\nEND\n\n#endif    // APSTUDIO_INVOKED\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// String Table\n//\n\nSTRINGTABLE \nBEGIN\n    IDS_APP_TITLE           \"SeismicSimulation\"\n    IDC_SEISMICSIMULATION   \"SEISMICSIMULATION\"\nEND\n\n#endif    // English (U.S.) resources\n/////////////////////////////////////////////////////////////////////////////\n\n\n\n#ifndef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 3 resource.\n//\n\n\n/////////////////////////////////////////////////////////////////////////////\n#endif    // not APSTUDIO_INVOKED\n\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/seismic/main.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#define VIDEO_WINMAIN_ARGS\n\n#include <iostream>\n\n#include \"oneapi/tbb/tick_count.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include \"common/utility/utility.hpp\"\n#include \"common/utility/get_default_num_threads.hpp\"\n\n#include \"seismic_video.hpp\"\n#include \"universe.hpp\"\n\nUniverse u;\n\nstruct RunOptions {\n    //! It is used for console mode for test with different number of threads and also has\n    //! meaning for GUI: threads.first  - use separate event/updating loop thread (>0) or not (0).\n    //!                  threads.second - initialization value for scheduler\n    utility::thread_number_range threads;\n    int numberOfFrames;\n    int numberOfIterations;\n    bool silent;\n    bool parallel;\n    RunOptions(utility::thread_number_range threads_,\n               int number_of_frames_,\n               int number_of_iterations_,\n               bool silent_,\n               bool parallel_)\n            : threads(threads_),\n              numberOfFrames(number_of_frames_),\n              numberOfIterations(number_of_iterations_),\n              silent(silent_),\n              parallel(parallel_) {}\n};\n\nRunOptions ParseCommandLine(int argc, char *argv[]) {\n    // zero number of threads means to run serial version\n    utility::thread_number_range threads(\n        utility::get_default_num_threads, 0, utility::get_default_num_threads());\n\n    int numberOfFrames = 0;\n    int numberOfIterations = 0;\n    bool silent = false;\n    bool serial = false;\n\n    utility::parse_cli_arguments(\n        argc,\n        argv,\n        utility::cli_argument_pack()\n            //\"-h\" option for displaying help is present implicitly\n            .positional_arg(threads, \"n-of-threads\", utility::thread_number_range_desc)\n            .positional_arg(numberOfFrames,\n                            \"n-of-frames\",\n                            \"number of frames the example processes internally (0 means unlimited)\")\n            .positional_arg(numberOfIterations,\n                            \"n-of-iterations\",\n                            \"number of iterations the example runs internally\")\n            .arg(silent, \"silent\", \"no output except elapsed time\")\n            .arg(serial, \"serial\", \"in GUI mode start with serial version of algorithm\"));\n    return RunOptions(threads, numberOfFrames, numberOfIterations, silent, !serial);\n}\n\nint main(int argc, char *argv[]) {\n    oneapi::tbb::tick_count mainStartTime = oneapi::tbb::tick_count::now();\n    RunOptions options = ParseCommandLine(argc, argv);\n    SeismicVideo video(u, options.numberOfFrames, options.threads.last, options.parallel);\n    double rel_error;\n\n    // video layer init\n    if (video.init_window(u.UniverseWidth, u.UniverseHeight)) {\n        video.calc_fps = true;\n        video.threaded = options.threads.first > 0;\n        // video is ok, init Universe\n        u.InitializeUniverse(video);\n        // main loop\n        video.main_loop();\n    }\n    else if (video.init_console()) {\n        // do console mode\n        if (options.numberOfFrames == 0) {\n            options.numberOfFrames = 1000;\n            std::cout << \"Substituting 1000 for unlimited frames because not running interactively\"\n                      << \"\\n\";\n        }\n        // TODO : Extend utility::cli_argument_pack() to allow specifying the default value.\n        if (options.numberOfIterations <= 0) {\n            options.numberOfIterations = 10;\n            std::cout << \"Setting the number of iterations = 10 default\"\n                      << \"\\n\";\n        }\n        for (int p = options.threads.first; p <= options.threads.last;\n             p = options.threads.step(p)) {\n            oneapi::tbb::tick_count xwayParallelismStartTime = oneapi::tbb::tick_count::now();\n            u.InitializeUniverse(video);\n            int numberOfFrames = options.numberOfFrames;\n            assert(options.numberOfIterations > 0 && \"Number of iterations cannot be <= 0\");\n            unsigned numberOfIterations = unsigned(options.numberOfIterations);\n\n            if (p == 0) {\n                //run a serial version\n                for (int i = 0; i < numberOfFrames; ++i) {\n                    u.SerialUpdateUniverse();\n                }\n            }\n            else {\n                oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism,\n                                              p);\n                utility::measurements mu(numberOfIterations);\n                for (int iter = 0; iter < numberOfIterations; ++iter) {\n                    mu.start();\n                    for (int i = 0; i < numberOfFrames; ++i) {\n                        u.ParallelUpdateUniverse();\n                    }\n                    mu.stop();\n                }\n                rel_error = mu.computeRelError();\n            }\n\n            if (!options.silent) {\n                double fps =\n                    options.numberOfFrames /\n                    ((oneapi::tbb::tick_count::now() - xwayParallelismStartTime).seconds());\n                std::cout << fps << \" frame per sec with \";\n                if (p == 0) {\n                    std::cout << \"serial code\"\n                              << \"\\n\";\n                }\n                else {\n                    std::cout << p << \" way parallelism\"\n                              << \"\\n\";\n                }\n            }\n        }\n    }\n    video.terminate();\n    utility::report_elapsed_time((oneapi::tbb::tick_count::now() - mainStartTime).seconds());\n    utility::report_relative_error(rel_error);\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/seismic/resource.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//{{NO_DEPENDENCIES}}\n// Microsoft Visual C++ generated include file.\n// Used by SeismicSimulation.rc\n//\n#define IDC_MYICON                   2\n#define IDD_SEISMICSIMULATION_DIALOG 102\n#define IDS_APP_TITLE                103\n#define IDD_ABOUTBOX                 103\n#define IDM_ABOUT                    104\n#define IDM_EXIT                     105\n#define IDI_SEISMICSIMULATION        107\n#define IDI_SMALL                    108\n#define IDC_SEISMICSIMULATION        109\n#define IDR_MAINFRAME                128\n#define ID_FILE_PARALLEL             32771\n#define ID_FILE_SERIAL               32772\n#define IDM_PARALLEL                 32773\n#define ID_FILE_ENABLEGUI            32774\n#define ID_FILE_DISABLEGUI           32775\n#define IDC_STATIC                   -1\n\n// Next default values for new objects\n//\n#ifdef APSTUDIO_INVOKED\n#ifndef APSTUDIO_READONLY_SYMBOLS\n#define _APS_NO_MFC              1\n#define _APS_NEXT_RESOURCE_VALUE 129\n#define _APS_NEXT_COMMAND_VALUE  32782\n#define _APS_NEXT_CONTROL_VALUE  1000\n#define _APS_NEXT_SYMED_VALUE    110\n#endif\n#endif\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/seismic/seismic_video.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/global_control.h\"\n\n#include \"seismic_video.hpp\"\n#include \"universe.hpp\"\n\nconst char *const SeismicVideo::titles[2] = { \"Seismic Simulation: Serial\",\n                                              \"Seismic Simulation: Parallel\" };\nvoid SeismicVideo::on_mouse(int x, int y, int key) {\n    if (key == 1) {\n        u_.TryPutNewPulseSource(x, y);\n    }\n}\n\nvoid SeismicVideo::on_key(int key) {\n    key &= 0xff;\n    if (char(key) == ' ')\n        initIsParallel = !initIsParallel;\n    else if (char(key) == 'p')\n        initIsParallel = true;\n    else if (char(key) == 's')\n        initIsParallel = false;\n    else if (char(key) == 'e')\n        updating = true;\n    else if (char(key) == 'd')\n        updating = false;\n    else if (key == 27)\n        running = false;\n    title = titles[initIsParallel ? 1 : 0];\n}\n\nvoid SeismicVideo::on_process() {\n    oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism,\n                                  threadsHigh);\n    for (int frames = 0; numberOfFrames_ == 0 || frames < numberOfFrames_; ++frames) {\n        if (initIsParallel)\n            u_.ParallelUpdateUniverse();\n        else\n            u_.SerialUpdateUniverse();\n        if (!next_frame())\n            break;\n    }\n}\n\n#if defined(_WINDOWS) && !defined(_CONSOLE)\n#include \"resource.hpp\"\nLRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);\nSeismicVideo *gVideo = nullptr;\n#endif\n\nSeismicVideo::SeismicVideo(Universe &u,\n                           int number_of_frames,\n                           int threads_high,\n                           bool init_is_parallel)\n        : numberOfFrames_(number_of_frames),\n          initIsParallel(init_is_parallel),\n          u_(u),\n          threadsHigh(threads_high) {\n    title = titles[initIsParallel ? 1 : 0];\n#if defined(_WINDOWS) && !defined(_CONSOLE)\n    gVideo = this;\n    LoadStringA(video::win_hInstance, IDC_SEISMICSIMULATION, szWindowClass, MAX_LOADSTRING);\n    memset(&wcex, 0, sizeof(wcex));\n    wcex.lpfnWndProc = (WNDPROC)WndProc;\n    wcex.hIcon = LoadIcon(video::win_hInstance, MAKEINTRESOURCE(IDI_SEISMICSIMULATION));\n    wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);\n    wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);\n    wcex.lpszMenuName = LPCTSTR(IDC_SEISMICSIMULATION);\n    wcex.lpszClassName = szWindowClass;\n    wcex.hIconSm = LoadIcon(video::win_hInstance, MAKEINTRESOURCE(IDI_SMALL));\n    win_set_class(wcex); // ascii convention here\n    win_load_accelerators(IDC_SEISMICSIMULATION);\n#endif\n}\n\n#if defined(_WINDOWS) && !defined(_CONSOLE)\n\n//  FUNCTION: WndProc(HWND, unsigned, WORD, LONG)\n\n//  PURPOSE:  Processes messages for the main window.\n\n//  WM_COMMAND  - process the application menu\n//  WM_PAINT    - Paint the main window\n//  WM_DESTROY  - post a quit message and return\n\nLRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) {\n    switch (message) {\n        case WM_INITDIALOG: return TRUE;\n        case WM_COMMAND:\n            if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) {\n                EndDialog(hDlg, LOWORD(wParam));\n                return TRUE;\n            }\n            break;\n    }\n    return FALSE;\n}\n\nLRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {\n    int wmId;\n    switch (message) {\n        case WM_COMMAND:\n            wmId = LOWORD(wParam);\n            // Parse the menu selections:\n            switch (wmId) {\n                case IDM_ABOUT:\n                    DialogBox(\n                        video::win_hInstance, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, (DLGPROC)About);\n                    break;\n                case IDM_EXIT: PostQuitMessage(0); break;\n                case ID_FILE_PARALLEL: gVideo->on_key('p'); break;\n                case ID_FILE_SERIAL: gVideo->on_key('s'); break;\n                case ID_FILE_ENABLEGUI: gVideo->on_key('e'); break;\n                case ID_FILE_DISABLEGUI: gVideo->on_key('d'); break;\n                default: return DefWindowProc(hWnd, message, wParam, lParam);\n            }\n            break;\n        default: return DefWindowProc(hWnd, message, wParam, lParam);\n    }\n    return 0;\n}\n\n#endif\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/seismic/seismic_video.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TBB_examples_seismic_video_H\n#define TBB_examples_seismic_video_H\n\n#include \"common/gui/video.hpp\"\n\nclass Universe;\n\nclass SeismicVideo : public video {\n#if defined(_WINDOWS) && !defined(_CONSOLE)\n#define MAX_LOADSTRING 100\n    TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name\n    WNDCLASSEX wcex;\n#endif\n    static const char *const titles[2];\n\n    bool initIsParallel;\n\n    Universe &u_;\n    int numberOfFrames_; // 0 means forever, positive means number of frames, negative is undefined\n    int threadsHigh;\n\nprivate:\n    void on_mouse(int x, int y, int key);\n    void on_process();\n\n#if defined(_WINDOWS) && !defined(_CONSOLE)\npublic:\n#endif\n    void on_key(int key);\n\npublic:\n    SeismicVideo(Universe &u, int numberOfFrames, int threadsHigh, bool initIsParallel = true);\n};\n#endif /* TBB_examples_seismic_video_H */\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/seismic/universe.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <cmath>\n#include <cstring>\n\n#include \"oneapi/tbb/blocked_range.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n\n#include \"common/gui/video.hpp\"\n\n#ifdef _MSC_VER\n// warning C4068: unknown pragma\n#pragma warning(disable : 4068)\n// warning C4351: new behavior: elements of array 'array' will be default initialized\n#pragma warning(disable : 4351)\n#endif\n\n#include \"universe.hpp\"\n\nconst colorcomp_t MaterialColor[4][3] = {\n    // BGR\n    { 96, 0, 0 }, // WATER\n    { 0, 48, 48 }, // SANDSTONE\n    { 32, 32, 23 } // SHALE\n};\n\nvoid Universe::InitializeUniverse(video const& colorizer) {\n    pulseCounter = pulseTime = 100;\n    pulseX = UniverseWidth / 3;\n    pulseY = UniverseHeight / 4;\n    // Initialize V, S, and T to slightly non-zero values, in order to avoid denormal waves.\n    for (int i = 0; i < UniverseHeight; ++i)\n#pragma ivdep\n        for (int j = 0; j < UniverseWidth; ++j) {\n            T[i][j] = S[i][j] = V[i][j] = ValueType(1.0E-6);\n        }\n    for (int i = 1; i < UniverseHeight - 1; ++i) {\n        for (int j = 1; j < UniverseWidth - 1; ++j) {\n            float x = float(j - UniverseWidth / 2) / (UniverseWidth / 2);\n            ValueType t = (ValueType)i / (ValueType)UniverseHeight;\n            MaterialType m;\n            D[i][j] = 1.0;\n            // Coefficient values are fictitious, and chosen to visually exaggerate\n            // physical effects such as Rayleigh waves.  The fabs/exp line generates\n            // a shale layer with a gentle upwards slope and an anticline.\n            if (t < 0.3f) {\n                m = WATER;\n                M[i][j] = 0.125;\n                L[i][j] = 0.125;\n            }\n            else if (fabs(t - 0.7 + 0.2 * exp(-8 * x * x) + 0.025 * x) <= 0.1) {\n                m = SHALE;\n                M[i][j] = 0.5;\n                L[i][j] = 0.6;\n            }\n            else {\n                m = SANDSTONE;\n                M[i][j] = 0.3;\n                L[i][j] = 0.4;\n            }\n            material[i][j] = m;\n        }\n    }\n    ValueType scale = 2.0f / (ValueType)ColorMapSize;\n    for (int k = 0; k < 4; ++k) {\n        for (int i = 0; i < ColorMapSize; ++i) {\n            colorcomp_t c[3];\n            ValueType t = (i - ColorMapSize / 2) * scale;\n            ValueType r = t > 0 ? t : 0;\n            ValueType b = t < 0 ? -t : 0;\n            ValueType g = 0.5f * fabs(t);\n            memcpy(c, MaterialColor[k], sizeof(c));\n            c[2] = colorcomp_t(r * (255 - c[2]) + c[2]);\n            c[1] = colorcomp_t(g * (255 - c[1]) + c[1]);\n            c[0] = colorcomp_t(b * (255 - c[0]) + c[0]);\n            ColorMap[k][i] = colorizer.get_color(c[2], c[1], c[0]);\n        }\n    }\n    // Set damping coefficients around border to reduce reflections from boundaries.\n    ValueType d = 1.0;\n    for (int k = DamperSize - 1; k > 0; --k) {\n        d *= 1 - 1.0f / (DamperSize * DamperSize);\n        for (int j = 1; j < UniverseWidth - 1; ++j) {\n            D[k][j] *= d;\n            D[UniverseHeight - 1 - k][j] *= d;\n        }\n        for (int i = 1; i < UniverseHeight - 1; ++i) {\n            D[i][k] *= d;\n            D[i][UniverseWidth - 1 - k] *= d;\n        }\n    }\n    drawingMemory = colorizer.get_drawing_memory();\n}\nvoid Universe::UpdatePulse() {\n    if (pulseCounter > 0) {\n        ValueType t = (pulseCounter - pulseTime / 2) * 0.05f;\n        V[pulseY][pulseX] += 64 * sqrt(M[pulseY][pulseX]) * exp(-t * t);\n        --pulseCounter;\n    }\n}\n\nstruct Universe::Rectangle {\n    struct std::pair<int, int> xRange;\n    struct std::pair<int, int> yRange;\n    Rectangle(int startX, int startY, int width, int height)\n            : xRange(startX, width),\n              yRange(startY, height) {}\n    int StartX() const {\n        return xRange.first;\n    }\n    int StartY() const {\n        return yRange.first;\n    }\n    int Width() const {\n        return xRange.second;\n    }\n    int Height() const {\n        return yRange.second;\n    }\n    int EndX() const {\n        return xRange.first + xRange.second;\n    }\n    int EndY() const {\n        return yRange.first + yRange.second;\n    }\n};\n\nvoid Universe::UpdateStress(Rectangle const& r) {\n    drawing_area drawing(r.StartX(), r.StartY(), r.Width(), r.Height(), drawingMemory);\n    for (int i = r.StartY(); i < r.EndY(); ++i) {\n        drawing.set_pos(1, i - r.StartY());\n#pragma ivdep\n        for (int j = r.StartX(); j < r.EndX(); ++j) {\n            S[i][j] += M[i][j] * (V[i][j + 1] - V[i][j]);\n            T[i][j] += M[i][j] * (V[i + 1][j] - V[i][j]);\n            int index = (int)(V[i][j] * (ColorMapSize / 2)) + ColorMapSize / 2;\n            if (index < 0)\n                index = 0;\n            if (index >= ColorMapSize)\n                index = ColorMapSize - 1;\n            color_t* c = ColorMap[material[i][j]];\n            drawing.put_pixel(c[index]);\n        }\n    }\n}\n\nvoid Universe::SerialUpdateStress() {\n    Rectangle area(0, 0, UniverseWidth - 1, UniverseHeight - 1);\n    UpdateStress(area);\n}\n\nstruct UpdateStressBody {\n    Universe& u_;\n    UpdateStressBody(Universe& u) : u_(u) {}\n    void operator()(const oneapi::tbb::blocked_range<int>& range) const {\n        Universe::Rectangle area(0, range.begin(), u_.UniverseWidth - 1, range.size());\n        u_.UpdateStress(area);\n    }\n};\n\nvoid Universe::ParallelUpdateStress(oneapi::tbb::affinity_partitioner& affinity) {\n    oneapi::tbb::parallel_for(\n        oneapi::tbb::blocked_range<int>(0, UniverseHeight - 1), // Index space for loop\n        UpdateStressBody(*this), // Body of loop\n        affinity); // Affinity hint\n}\n\nvoid Universe::UpdateVelocity(Rectangle const& r) {\n    for (int i = r.StartY(); i < r.EndY(); ++i)\n#pragma ivdep\n        for (int j = r.StartX(); j < r.EndX(); ++j)\n            V[i][j] =\n                D[i][j] * (V[i][j] + L[i][j] * (S[i][j] - S[i][j - 1] + T[i][j] - T[i - 1][j]));\n}\n\nvoid Universe::SerialUpdateVelocity() {\n    UpdateVelocity(Rectangle(1, 1, UniverseWidth - 1, UniverseHeight - 1));\n}\n\nstruct UpdateVelocityBody {\n    Universe& u_;\n    UpdateVelocityBody(Universe& u) : u_(u) {}\n    void operator()(const oneapi::tbb::blocked_range<int>& y_range) const {\n        u_.UpdateVelocity(\n            Universe::Rectangle(1, y_range.begin(), u_.UniverseWidth - 1, y_range.size()));\n    }\n};\n\nvoid Universe::ParallelUpdateVelocity(oneapi::tbb::affinity_partitioner& affinity) {\n    oneapi::tbb::parallel_for(\n        oneapi::tbb::blocked_range<int>(1, UniverseHeight), // Index space for loop\n        UpdateVelocityBody(*this), // Body of loop\n        affinity); // Affinity hint\n}\n\nvoid Universe::SerialUpdateUniverse() {\n    UpdatePulse();\n    SerialUpdateStress();\n    SerialUpdateVelocity();\n}\n\nvoid Universe::ParallelUpdateUniverse() {\n    /** Affinity is an argument to parallel_for to hint that an iteration of a loop\n    is best replayed on the same processor for each execution of the loop.\n    It is a static object because it must remember where the iterations happened\n    in previous executions. */\n    static oneapi::tbb::affinity_partitioner affinity;\n    UpdatePulse();\n    ParallelUpdateStress(affinity);\n    ParallelUpdateVelocity(affinity);\n}\n\nbool Universe::TryPutNewPulseSource(int x, int y) {\n    if (pulseCounter == 0) {\n        pulseCounter = pulseTime;\n        pulseX = x;\n        pulseY = y;\n        return true;\n    }\n    return false;\n}\n\nvoid Universe::SetDrawingMemory(const drawing_memory& dmem) {\n    drawingMemory = dmem;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/seismic/universe.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TBB_examples_seismic_universe_H\n#define TBB_examples_seismic_universe_H\n\n#ifndef UNIVERSE_WIDTH\n#define UNIVERSE_WIDTH 1024\n#endif\n#ifndef UNIVERSE_HEIGHT\n#define UNIVERSE_HEIGHT 512\n#endif\n\n#include \"oneapi/tbb/partitioner.h\"\n\n#include \"common/gui/video.hpp\"\n\nclass Universe {\npublic:\n    enum { UniverseWidth = UNIVERSE_WIDTH, UniverseHeight = UNIVERSE_HEIGHT };\n\nprivate:\n    //in order to avoid performance degradation due to cache aliasing issue\n    //some padding is needed after each row in array, and between array themselves.\n    //the padding is achieved by adjusting number of rows and columns.\n    //as the compiler is forced to place class members of the same clause in order of the\n    //declaration this seems to be the right way of padding.\n\n    //magic constants added below are chosen experimentally for 1024x512.\n    enum { MaxWidth = UniverseWidth + 1, MaxHeight = UniverseHeight + 3 };\n\n    typedef float ValueType;\n\n    //! Horizontal stress\n    ValueType S[MaxHeight][MaxWidth];\n\n    //! Velocity at each grid point\n    ValueType V[MaxHeight][MaxWidth];\n\n    //! Vertical stress\n    ValueType T[MaxHeight][MaxWidth];\n\n    //! Coefficient related to modulus\n    ValueType M[MaxHeight][MaxWidth];\n\n    //! Damping coefficients\n    ValueType D[MaxHeight][MaxWidth];\n\n    //! Coefficient related to lightness\n    ValueType L[MaxHeight][MaxWidth];\n\n    enum { ColorMapSize = 1024 };\n    color_t ColorMap[4][ColorMapSize];\n\n    enum MaterialType { WATER = 0, SANDSTONE = 1, SHALE = 2 };\n\n    //! Values are MaterialType, cast to an unsigned char to save space.\n    unsigned char material[MaxHeight][MaxWidth];\n\nprivate:\n    enum { DamperSize = 32 };\n\n    int pulseTime;\n    int pulseCounter;\n    int pulseX;\n    int pulseY;\n\n    drawing_memory drawingMemory;\n\npublic:\n    void InitializeUniverse(video const& colorizer);\n\n    void SerialUpdateUniverse();\n    void ParallelUpdateUniverse();\n    bool TryPutNewPulseSource(int x, int y);\n    void SetDrawingMemory(const drawing_memory& dmem);\n\nprivate:\n    struct Rectangle;\n    void UpdatePulse();\n    void UpdateStress(Rectangle const& r);\n\n    void SerialUpdateStress();\n    friend struct UpdateStressBody;\n    friend struct UpdateVelocityBody;\n    void ParallelUpdateStress(oneapi::tbb::affinity_partitioner& affinity);\n\n    void UpdateVelocity(Rectangle const& r);\n\n    void SerialUpdateVelocity();\n    void ParallelUpdateVelocity(oneapi::tbb::affinity_partitioner& affinity);\n};\n\n#endif /* TBB_examples_seismic_universe_H */\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(tachyon CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(tbb)\n\nset(TACHYON_VERSION tbb CACHE STRING \"Defines the version of the tachyon example\")\n\nadd_executable(\n    tachyon src/trace.${TACHYON_VERSION}.cpp\n    src/main.cpp src/pthread.cpp\n    src/tachyon_video.cpp src/api.cpp\n    src/apigeom.cpp\n    src/apitrigeom.cpp\n    src/bndbox.cpp\n    src/box.cpp\n    src/camera.cpp\n    src/coordsys.cpp\n    src/cylinder.cpp\n    src/extvol.cpp\n    src/global.cpp\n    src/grid.cpp\n    src/imageio.cpp\n    src/imap.cpp\n    src/intersect.cpp\n    src/light.cpp\n    src/objbound.cpp\n    src/parse.cpp\n    src/plane.cpp\n    src/ppm.cpp\n    src/quadric.cpp\n    src/render.cpp\n    src/ring.cpp\n    src/shade.cpp\n    src/sphere.cpp\n    src/texture.cpp\n    src/tgafile.cpp\n    src/trace_rest.cpp\n    src/triangle.cpp\n    src/ui.cpp\n    src/util.cpp\n    src/vector.cpp\n    src/vol.cpp \n)\n\nadd_subdirectory(../../common/gui gui)\n\ntarget_link_libraries(tachyon TBB::tbb Threads::Threads UI_LIB_tachyon)\ntarget_compile_options(tachyon PRIVATE ${TBB_CXX_STD_FLAG})\n\nif (MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL IntelLLVM)\n    target_compile_options(tachyon PRIVATE -D_CRT_SECURE_NO_WARNINGS)\nendif()\n\nset(EXECUTABLE \"$<TARGET_FILE:tachyon>\")\nset(ARGS ${CMAKE_CURRENT_SOURCE_DIR}/dat/balls.dat)\nset(PERF_ARGS silent ${CMAKE_CURRENT_SOURCE_DIR}/dat/balls3.dat)\nset(LIGHT_ARGS ${CMAKE_CURRENT_SOURCE_DIR}/dat/model2.dat)\n\nadd_execution_target(run_tachyon tachyon ${EXECUTABLE} \"${ARGS}\")\nadd_execution_target(perf_run_tachyon tachyon ${EXECUTABLE} \"${PERF_ARGS}\")\nadd_execution_target(light_test_tachyon tachyon ${EXECUTABLE} \"${LIGHT_ARGS}\")\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/README.md",
    "content": "# Tachyon sample\nParallel raytracer / renderer that demonstrates the use of parallel_for.\n\n*This example includes software developed by John E. Stone.*\n\nThis example is a 2-D raytracer/renderer that visually shows different parallel scheduling methods and their resulting speedup. The code was parallelized by speculating that each pixel could be rendered in parallel. The resulting parallel code was then checked for correctness by using Intel® Thread Checker, which pointed out where synchronization was needed. Minimal synchronization was then inserted into the parallel code. The resulting parallel code exhibits good speedup.\n\n## Building the example\n```\ncmake <path_to_example> [EXAMPLES_UI_MODE=value]\ncmake --build .\n```\n### Predefined CMake variables\n* `EXAMPLES_UI_MODE` - defines the GUI mode, supported values are `gdi`, `d2d`, `con` on Windows, `x`,`con` on Linux and `mac`,`con` on macOS. The default mode is `con`. See the [common page](../../README.md) to get more information.\n\n* `TACHYON_VERSION` - this examples contains several version that may be changed via `TACHYON_VERSION` Cmake variable.\n    * **serial** - Original sequential version.\n    * **tbb1d** - Parallel version that uses oneAPI Threading Building Blocks (oneTBB) and `blocked_range` to parallelize over tasks that are groups of scan-lines.\n    * **tbb** (Default) - Parallel version that uses oneTBB and `blocked_range2d` to parallelize over tasks that are rectangular sub-areas.\n\n## Running the sample\n### Predefined make targets\n* `make run_tachyon` - executes the example with predefined parameters.\n* `make perf_run_tachyon` ` - executes the example with suggested parameters to measure the oneTBB performance.\n* `make light_test_tachyon` - executes the example with suggested parameters to reduce execution time.\n\n### Application parameters\nUsage:\n```\ntachyon [dataset=value] [boundthresh=value] [no-display-updating] [no-bounding] [silent] [-h] [dataset [boundthresh]]\n```\n* `-h` - Prints the help for command line options.\n* `dataset` - path/name of one of the *.dat files in the dat directory for the example.\n* `boundthresh` - bounding threshold value.\n* `no-display-updating` - disable run-time display updating.\n* `no-bounding` - disable bounding technique.\n\n### Environment variables\nThe `tbb` and `tbb1d` version of examples has the following settings that may be handled by environment variables:\n* By default, these versions use one thread per available processor. To change this default, set the `TBB_NUM_THREADS` environment variable to the desired number of threads before running.\n* These versions use `auto_partitioner` by default. To change this default, set the `TBB_PARTITIONER` environment variable to the `aff` value to use `affinity_partitioner` and to `simp` to use `simple_partitioner`.\n* These versions use a reasonable task grain size by default. To change this default, set the `TBB_GRAINSIZE` environment variable to the desired grain size before running. The grain size corresponds to the number of pixels (in the `X` or `Y` direction, for a rectangular sub-area) in each parallel task.\n\n### Interactive graphical user interface\nThe following hot keys can be used in interactive execution mode when the example is compiled with the graphical user interface:\n\n* `any key` - enable repetition of rendering after the pause. Press ESC to stop the application.\n* `space` - toggle run-time display updating mode while rendering (see no-display-updating above).\n* `p` - holds the picture after rendering completion. Press 'p' again to continue.\n* `esc` - stop execution.\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/gui/resource.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#define IDC_MYICON    2\n#define IDD_GUI       102\n#define IDS_APP_TITLE 103\n#define IDI_GUI       107\n#define IDI_SMALL     108\n#define IDC_GUI       109\n#define IDR_MAINFRAME 128\n#define IDC_STATIC    -1\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/gui/tachyon.rc",
    "content": "// Microsoft Visual C++ generated resource script.\n//\n#include \"resource.h\"\n\n#define APSTUDIO_READONLY_SYMBOLS\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 2 resource.\n//\n#define APSTUDIO_HIDDEN_SYMBOLS\n#include \"windows.h\"\n#undef APSTUDIO_HIDDEN_SYMBOLS\n\n/////////////////////////////////////////////////////////////////////////////\n#undef APSTUDIO_READONLY_SYMBOLS\n\n/////////////////////////////////////////////////////////////////////////////\n// English (U.S.) resources\n\n#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\n#ifdef _WIN32\nLANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\n#pragma code_page(1252)\n#endif //_WIN32\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Icon\n//\n\n// Icon with lowest ID value placed first to ensure application icon\n// remains consistent on all systems.\nIDI_GUI   ICON                    \"gui.ico\"\nIDI_SMALL               ICON                    \"small.ico\"\n\n\n#ifdef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// TEXTINCLUDE\n//\n\n1 TEXTINCLUDE \nBEGIN\n    \"resource.h\\0\"\nEND\n\n2 TEXTINCLUDE \nBEGIN\n    \"#define APSTUDIO_HIDDEN_SYMBOLS\\r\\n\"\n    \"#include \"\"windows.h\"\"\\r\\n\"\n    \"#undef APSTUDIO_HIDDEN_SYMBOLS\\r\\n\"\n    \"\\0\"\nEND\n\n3 TEXTINCLUDE \nBEGIN\n    \"\\r\\n\"\n    \"\\0\"\nEND\n\n#endif    // APSTUDIO_INVOKED\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// String Table\n//\n\nSTRINGTABLE \nBEGIN\n    IDS_APP_TITLE           \"gui\"\n    IDC_GUI   \"GUI\"\nEND\n\n#endif    // English (U.S.) resources\n/////////////////////////////////////////////////////////////////////////////\n\n\n\n#ifndef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 3 resource.\n//\n\n\n/////////////////////////////////////////////////////////////////////////////\n#endif    // not APSTUDIO_INVOKED\n\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/api.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * api.cpp - This file contains all of the API calls that are defined for\n *         external driver code to use.  \n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n\n#include \"box.hpp\"\n#include \"cylinder.hpp\"\n#include \"plane.hpp\"\n#include \"quadric.hpp\"\n#include \"ring.hpp\"\n#include \"sphere.hpp\"\n#include \"triangle.hpp\"\n#include \"vol.hpp\"\n#include \"extvol.hpp\"\n\n#include \"texture.hpp\"\n#include \"light.hpp\"\n#include \"render.hpp\"\n#include \"camera.hpp\"\n#include \"vector.hpp\"\n#include \"intersect.hpp\"\n#include \"shade.hpp\"\n#include \"util.hpp\"\n#include \"imap.hpp\"\n#include \"global.hpp\"\n\n#include \"tachyon_video.hpp\"\n\ntypedef void *SceneHandle;\n#include \"api.hpp\"\n\nvector rt_vector(apiflt x, apiflt y, apiflt z) {\n    vector v;\n\n    v.x = x;\n    v.y = y;\n    v.z = z;\n\n    return v;\n}\n\ncolor rt_color(apiflt r, apiflt g, apiflt b) {\n    color c;\n\n    c.r = r;\n    c.g = g;\n    c.b = b;\n\n    return c;\n}\n\nvoid rt_initialize() {\n    rpcmsg msg;\n\n    reset_object();\n    reset_lights();\n    InitTextures();\n\n    if (!parinitted) {\n        parinitted = 1;\n\n        msg.type = 1; /* setup a ping message */\n    }\n}\n\nvoid rt_renderscene(SceneHandle voidscene) {\n    scenedef *scene = (scenedef *)voidscene;\n    renderscene(*scene);\n}\n\nvoid rt_camerasetup(SceneHandle voidscene,\n                    apiflt zoom,\n                    apiflt aspectratio,\n                    int antialiasing,\n                    int raydepth,\n                    vector camcent,\n                    vector viewvec,\n                    vector upvec) {\n    scenedef *scene = (scenedef *)voidscene;\n\n    vector newupvec;\n    vector newviewvec;\n    vector newrightvec;\n\n    VCross((vector *)&upvec, &viewvec, &newrightvec);\n    VNorm(&newrightvec);\n\n    VCross((vector *)&viewvec, &newrightvec, &newupvec);\n    VNorm(&newupvec);\n\n    newviewvec = viewvec;\n    VNorm(&newviewvec);\n\n    scene->camzoom = zoom;\n    scene->aspectratio = aspectratio;\n    scene->antialiasing = antialiasing;\n    scene->raydepth = raydepth;\n    scene->camcent = camcent;\n    scene->camviewvec = newviewvec;\n    scene->camrightvec = newrightvec;\n    scene->camupvec = newupvec;\n}\n\nvoid rt_outputfile(SceneHandle voidscene, const char *outname) {\n    scenedef *scene = (scenedef *)voidscene;\n    strcpy((char *)&scene->outfilename, outname);\n}\n\nvoid rt_resolution(SceneHandle voidscene, int hres, int vres) {\n    scenedef *scene = (scenedef *)voidscene;\n    scene->hres = hres;\n    scene->vres = vres;\n}\n\nvoid rt_verbose(SceneHandle voidscene, int v) {\n    scenedef *scene = (scenedef *)voidscene;\n    scene->verbosemode = v;\n}\n\nvoid rt_rawimage(SceneHandle voidscene, unsigned char *rawimage) {\n    scenedef *scene = (scenedef *)voidscene;\n    scene->rawimage = rawimage;\n}\n\nvoid rt_background(SceneHandle voidscene, color col) {\n    scenedef *scene = (scenedef *)voidscene;\n    scene->background.r = col.r;\n    scene->background.g = col.g;\n    scene->background.b = col.b;\n}\n\nvoid rt_boundmode(SceneHandle voidscene, int mode) {\n    scenedef *scene = (scenedef *)voidscene;\n    scene->boundmode = mode;\n}\n\nvoid rt_boundthresh(SceneHandle voidscene, int threshold) {\n    scenedef *scene = (scenedef *)voidscene;\n\n    if (threshold > 1) {\n        scene->boundthresh = threshold;\n    }\n    else {\n        rtmesg(\"Ignoring out-of-range automatic bounding threshold.\\n\");\n        rtmesg(\"Automatic bounding threshold reset to default.\\n\");\n        scene->boundthresh = MAXOCTNODES;\n    }\n}\n\nvoid rt_displaymode(SceneHandle voidscene, int mode) {\n    scenedef *scene = (scenedef *)voidscene;\n    scene->displaymode = mode;\n}\n\nvoid rt_scenesetup(SceneHandle voidscene, char *outname, int hres, int vres, int verbose) {\n    rt_outputfile(voidscene, outname);\n    rt_resolution(voidscene, hres, vres);\n    rt_verbose(voidscene, verbose);\n}\n\nSceneHandle rt_newscene(void) {\n    scenedef *scene;\n    SceneHandle voidscene;\n\n    scene = (scenedef *)malloc(sizeof(scenedef));\n    memset(scene, 0, sizeof(scenedef)); /* clear all valuas to 0  */\n\n    voidscene = (SceneHandle)scene;\n\n    rt_outputfile(voidscene, \"/dev/null\"); /* default output file (.tga) */\n    rt_resolution(voidscene, 512, 512); /* 512x512 resolution */\n    rt_verbose(voidscene, 0); /* verbose messages off */\n    rt_rawimage(voidscene, nullptr); /* raw image output off */\n    rt_boundmode(voidscene, RT_BOUNDING_ENABLED); /* spatial subdivision on */\n    rt_boundthresh(voidscene, MAXOCTNODES); /* default threshold */\n    rt_displaymode(voidscene, RT_DISPLAY_ENABLED); /* video output on */\n    rt_camerasetup(voidscene,\n                   1.0,\n                   1.0,\n                   0,\n                   6,\n                   rt_vector(0.0, 0.0, 0.0),\n                   rt_vector(0.0, 0.0, 1.0),\n                   rt_vector(0.0, 1.0, 0.0));\n\n    return scene;\n}\n\nvoid rt_deletescene(SceneHandle scene) {\n    if (scene != nullptr)\n        free(scene);\n}\n\nvoid apitextotex(apitexture *apitex, texture *tex) {\n    switch (apitex->texturefunc) {\n        case 0: tex->texfunc = (color(*)(void *, void *, void *))(standard_texture); break;\n\n        case 1: tex->texfunc = (color(*)(void *, void *, void *))(checker_texture); break;\n\n        case 2: tex->texfunc = (color(*)(void *, void *, void *))(grit_texture); break;\n\n        case 3: tex->texfunc = (color(*)(void *, void *, void *))(marble_texture); break;\n\n        case 4: tex->texfunc = (color(*)(void *, void *, void *))(wood_texture); break;\n\n        case 5: tex->texfunc = (color(*)(void *, void *, void *))(gnoise_texture); break;\n\n        case 6: tex->texfunc = (color(*)(void *, void *, void *))(cyl_checker_texture); break;\n\n        case 7:\n            tex->texfunc = (color(*)(void *, void *, void *))(image_sphere_texture);\n            tex->img = AllocateImage((char *)apitex->imap);\n            break;\n\n        case 8:\n            tex->texfunc = (color(*)(void *, void *, void *))(image_cyl_texture);\n            tex->img = AllocateImage((char *)apitex->imap);\n            break;\n\n        case 9:\n            tex->texfunc = (color(*)(void *, void *, void *))(image_plane_texture);\n            tex->img = AllocateImage((char *)apitex->imap);\n            break;\n\n        default: tex->texfunc = (color(*)(void *, void *, void *))(standard_texture); break;\n    }\n\n    tex->ctr = apitex->ctr;\n    tex->rot = apitex->rot;\n    tex->scale = apitex->scale;\n    tex->uaxs = apitex->uaxs;\n    tex->vaxs = apitex->vaxs;\n    tex->ambient = apitex->ambient;\n    tex->diffuse = apitex->diffuse;\n    tex->specular = apitex->specular;\n    tex->opacity = apitex->opacity;\n    tex->col = apitex->col;\n\n    tex->islight = 0;\n    tex->shadowcast = 1;\n    tex->phong = 0.0;\n    tex->phongexp = 0.0;\n    tex->phongtype = 0;\n}\n\nvoid *rt_texture(apitexture *apitex) {\n    texture *tex;\n\n    tex = (texture *)rt_getmem(sizeof(texture));\n    apitextotex(apitex, tex);\n    return (tex);\n}\n\nvoid rt_tex_color(void *voidtex, color col) {\n    texture *tex = (texture *)voidtex;\n    tex->col = col;\n}\n\nvoid rt_tex_phong(void *voidtex, apiflt phong, apiflt phongexp, int type) {\n    texture *tex = (texture *)voidtex;\n    tex->phong = phong;\n    tex->phongexp = phongexp;\n    tex->phongtype = type;\n}\n\nvoid rt_light(void *tex, vector ctr, apiflt rad) {\n    point_light *li;\n\n    li = newlight(tex, (vector)ctr, rad);\n\n    li->tex->islight = 1;\n    li->tex->shadowcast = 1;\n    li->tex->diffuse = 0.0;\n    li->tex->specular = 0.0;\n    li->tex->opacity = 1.0;\n\n    add_light(li);\n    add_object((object *)li);\n}\n\nvoid rt_scalarvol(void *tex,\n                  vector min,\n                  vector max,\n                  int xs,\n                  int ys,\n                  int zs,\n                  char *fname,\n                  void *invol) {\n    add_object((object *)newscalarvol(\n        tex, (vector)min, (vector)max, xs, ys, zs, fname, (scalarvol *)invol));\n}\n\nvoid rt_extvol(void *tex, vector min, vector max, int samples, flt (*evaluator)(flt, flt, flt)) {\n    add_object((object *)newextvol(tex, (vector)min, (vector)max, samples, evaluator));\n}\n\nvoid rt_box(void *tex, vector min, vector max) {\n    add_object((object *)newbox(tex, (vector)min, (vector)max));\n}\n\nvoid rt_cylinder(void *tex, vector ctr, vector axis, apiflt rad) {\n    add_object(newcylinder(tex, (vector)ctr, (vector)axis, rad));\n}\n\nvoid rt_fcylinder(void *tex, vector ctr, vector axis, apiflt rad) {\n    add_object(newfcylinder(tex, (vector)ctr, (vector)axis, rad));\n}\n\nvoid rt_plane(void *tex, vector ctr, vector norm) {\n    add_object(newplane(tex, (vector)ctr, (vector)norm));\n}\n\nvoid rt_ring(void *tex, vector ctr, vector norm, apiflt a, apiflt b) {\n    add_object(newring(tex, (vector)ctr, (vector)norm, a, b));\n}\n\nvoid rt_sphere(void *tex, vector ctr, apiflt rad) {\n    add_object(newsphere(tex, (vector)ctr, rad));\n}\n\nvoid rt_tri(void *tex, vector v0, vector v1, vector v2) {\n    object *trn;\n\n    trn = newtri(tex, (vector)v0, (vector)v1, (vector)v2);\n\n    if (trn != nullptr) {\n        add_object(trn);\n    }\n}\n\nvoid rt_stri(void *tex, vector v0, vector v1, vector v2, vector n0, vector n1, vector n2) {\n    object *trn;\n\n    trn = newstri(tex, (vector)v0, (vector)v1, (vector)v2, (vector)n0, (vector)n1, (vector)n2);\n\n    if (trn != nullptr) {\n        add_object(trn);\n    }\n}\n\nvoid rt_quadsphere(void *tex, vector ctr, apiflt rad) {\n    quadric *q;\n    flt factor;\n    q = (quadric *)newquadric();\n    factor = 1.0 / (rad * rad);\n    q->tex = (texture *)tex;\n    q->ctr = ctr;\n\n    q->mat.a = factor;\n    q->mat.b = 0.0;\n    q->mat.c = 0.0;\n    q->mat.d = 0.0;\n    q->mat.e = factor;\n    q->mat.f = 0.0;\n    q->mat.g = 0.0;\n    q->mat.h = factor;\n    q->mat.i = 0.0;\n    q->mat.j = -1.0;\n\n    add_object((object *)q);\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/api.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*****************************************************************************\n * api.h - The declarations and prototypes needed so that 3rd party driver   *\n *         code can run the raytracer.  Third party driver code should       * \n *         only use the functions in this header file to interface with      *\n *         the rendering engine.                                             *\n *************************************************************************** */\n\n/* \n *  $Id: api.h,v 1.2 2007-02-22 17:54:15 Exp $\n */\n\n/********************************************/\n/* Types defined for use with the API calls */\n/********************************************/\n\n#ifdef USESINGLEFLT\ntypedef float apiflt; /* generic floating point number */\n#else\ntypedef double apiflt; /* generic floating point number */\n#endif\n\ntypedef void *SceneHandle;\n\ntypedef struct {\n    int texturefunc; /* which texture function to use */\n    color col; /* base object color */\n    int shadowcast; /* does the object cast a shadow */\n    apiflt ambient; /* ambient lighting */\n    apiflt diffuse; /* diffuse reflection */\n    apiflt specular; /* specular reflection */\n    apiflt opacity; /* how opaque the object is */\n    vector ctr; /* origin of texture */\n    vector rot; /* rotation of texture around origin */\n    vector scale; /* scale of texture in x,y,z */\n    vector uaxs; /* planar map u axis */\n    vector vaxs; /* planar map v axis */\n    char imap[96]; /* name of image map */\n} apitexture;\n\n/*******************************************************************\n *  NOTE: The value passed in apitexture.texturefunc corresponds to \n *        the meanings given in this table:\n *\n *   0 - No texture function is applied other than standard lighting.\n *   1 - 3D checkerboard texture.  Red & Blue checkers through 3d space.\n *   2 - Grit texture, roughens up the surface of the object a bit.\n *   3 - 3D marble texture.  Makes a 3D swirl pattern through the object.\n *   4 - 3D wood texture.  Makes a 3D wood pattern through the object.\n *   5 - 3D gradient noise function.\n *   6 - I've forgotten :-)\n *   7 - Cylindrical Image Map  **** IMAGE MAPS REQUIRE the filename \n *   8 - Spherical Image Map         of the image be put in imap[]\n *   9 - Planar Image Map            part of the texture...\n *        planar requires uaxs, and vaxs..\n *\n *******************************************************************/\n\n/********************************************/\n/* Functions implemented to provide the API */\n/********************************************/\n\nvector rt_vector(apiflt x, apiflt y, apiflt z); /* helper to make vectors */\ncolor rt_color(apiflt r, apiflt g, apiflt b); /* helper to make colors */\n\nvoid rt_initialize(); /* reset raytracer, memory deallocation */\nvoid rt_finalize(void); /* close down for good.. */\n\nSceneHandle rt_newscene(void); /* allocate new scene */\nvoid rt_deletescene(SceneHandle); /* delete a scene */\nvoid rt_renderscene(SceneHandle); /* raytrace the current scene */\nvoid rt_outputfile(SceneHandle, const char *outname);\nvoid rt_resolution(SceneHandle, int hres, int vres);\nvoid rt_verbose(SceneHandle, int v);\nvoid rt_rawimage(SceneHandle, unsigned char *rawimage);\nvoid rt_background(SceneHandle, color);\n\n/* Parameter values for rt_boundmode() */\n#define RT_BOUNDING_DISABLED 0\n#define RT_BOUNDING_ENABLED  1\n\nvoid rt_boundmode(SceneHandle, int);\nvoid rt_boundthresh(SceneHandle, int);\n\n/* Parameter values for rt_displaymode() */\n#define RT_DISPLAY_DISABLED 0\n#define RT_DISPLAY_ENABLED  1\n\nvoid rt_displaymode(SceneHandle, int);\n\nvoid rt_scenesetup(SceneHandle, char *, int, int, int);\n/* scene, output filename, horizontal resolution, vertical resolution,\n            verbose mode */\n\nvoid rt_camerasetup(SceneHandle, apiflt, apiflt, int, int, vector, vector, vector);\n/* camera parms: scene, zoom, aspectratio, antialiasing, raydepth,\n\t\tcamera center, view direction, up direction */\n\nvoid *rt_texture(apitexture *);\n/* pointer to the texture struct that would have been passed to each \n      object() call in older revisions.. */\n\nvoid rt_light(void *, vector, apiflt); /* add a light */\n/* light parms: texture, center, radius */\n\nvoid rt_sphere(void *, vector, apiflt); /* add a sphere */\n/* sphere parms: texture, center, radius */\n\nvoid rt_scalarvol(void *, vector, vector, int, int, int, char *, void *);\n\nvoid rt_extvol(void *, vector, vector, int, apiflt (*evaluator)(apiflt, apiflt, apiflt));\n\nvoid rt_box(void *, vector, vector);\n/* box parms: texture, min, max */\n\nvoid rt_plane(void *, vector, vector);\n/* plane parms: texture, center, normal */\n\nvoid rt_ring(void *, vector, vector, apiflt, apiflt);\n/* ring parms: texture, center, normal, inner, outer */\n\nvoid rt_tri(void *, vector, vector, vector);\n/* tri parms: texture, vertex 0, vertex 1, vertex 2 */\n\nvoid rt_stri(void *, vector, vector, vector, vector, vector, vector);\n/* stri parms: texture, vertex 0, vertex 1, vertex 2, norm 0, norm 1, norm 2 */\n\nvoid rt_heightfield(void *, vector, int, int, apiflt *, apiflt, apiflt);\n/* field parms: texture, center, m, n, field, wx, wy */\n\nvoid rt_landscape(void *, int, int, vector, apiflt, apiflt);\n\nvoid rt_quadsphere(void *, vector, apiflt); /* add quadric sphere */\n/* sphere parms: texture, center, radius */\n\nvoid rt_cylinder(void *, vector, vector, apiflt);\n\nvoid rt_fcylinder(void *, vector, vector, apiflt);\n\nvoid rt_polycylinder(void *, vector *, int, apiflt);\n\n/* new texture handling routines */\nvoid rt_tex_color(void *voidtex, color col);\n\n#define RT_PHONG_PLASTIC 0\n#define RT_PHONG_METAL   1\nvoid rt_tex_phong(void *voidtex, apiflt phong, apiflt phongexp, int type);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/apigeom.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * api.cpp - This file contains all of the API calls that are defined for\n *         external driver code to use.  \n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"api.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n\n#define MyVNorm(a) VNorm((vector *)a)\n\nvoid rt_polycylinder(void *tex, vector *points, int numpts, apiflt rad) {\n    vector a;\n    int i;\n\n    if ((points == nullptr) || (numpts == 0)) {\n        return;\n    }\n\n    if (numpts > 0) {\n        rt_sphere(tex, points[0], rad);\n\n        if (numpts > 1) {\n            for (i = 1; i < numpts; i++) {\n                a.x = points[i].x - points[i - 1].x;\n                a.y = points[i].y - points[i - 1].y;\n                a.z = points[i].z - points[i - 1].z;\n\n                rt_fcylinder(tex, points[i - 1], a, rad);\n                rt_sphere(tex, points[i], rad);\n            }\n        }\n    }\n}\n\nvoid rt_heightfield(void *tex, vector ctr, int m, int n, apiflt *field, apiflt wx, apiflt wy) {\n    int xx, yy;\n    vector v0, v1, v2;\n    apiflt xoff, yoff, zoff;\n\n    xoff = ctr.x - (wx / 2.0);\n    yoff = ctr.z - (wy / 2.0);\n    zoff = ctr.y;\n\n    for (yy = 0; yy < (n - 1); yy++) {\n        for (xx = 0; xx < (m - 1); xx++) {\n            v0.x = wx * (xx) / (m * 1.0) + xoff;\n            v0.y = field[(yy)*m + (xx)] + zoff;\n            v0.z = wy * (yy) / (n * 1.0) + yoff;\n\n            v1.x = wx * (xx + 1) / (m * 1.0) + xoff;\n            v1.y = field[(yy)*m + (xx + 1)] + zoff;\n            v1.z = wy * (yy) / (n * 1.0) + yoff;\n\n            v2.x = wx * (xx + 1) / (m * 1.0) + xoff;\n            v2.y = field[(yy + 1) * m + (xx + 1)] + zoff;\n            v2.z = wy * (yy + 1) / (n * 1.0) + yoff;\n\n            rt_tri(tex, v1, v0, v2);\n\n            v0.x = wx * (xx) / (m * 1.0) + xoff;\n            v0.y = field[(yy)*m + (xx)] + zoff;\n            v0.z = wy * (yy) / (n * 1.0) + yoff;\n\n            v1.x = wx * (xx) / (m * 1.0) + xoff;\n            v1.y = field[(yy + 1) * m + (xx)] + zoff;\n            v1.z = wy * (yy + 1) / (n * 1.0) + yoff;\n\n            v2.x = wx * (xx + 1) / (m * 1.0) + xoff;\n            v2.y = field[(yy + 1) * m + (xx + 1)] + zoff;\n            v2.z = wy * (yy + 1) / (n * 1.0) + yoff;\n\n            rt_tri(tex, v0, v1, v2);\n        }\n    }\n} /* end of heightfield */\n\nstatic void\nrt_sheightfield(void *tex, vector ctr, int m, int n, apiflt *field, apiflt wx, apiflt wy) {\n    vector *vertices;\n    vector *normals;\n    vector offset;\n    apiflt xinc, yinc;\n    int x, y, addr;\n\n    vertices = (vector *)malloc(m * n * sizeof(vector));\n    normals = (vector *)malloc(m * n * sizeof(vector));\n\n    offset.x = ctr.x - (wx / 2.0);\n    offset.y = ctr.z - (wy / 2.0);\n    offset.z = ctr.y;\n\n    xinc = wx / ((apiflt)m);\n    yinc = wy / ((apiflt)n);\n\n    /* build vertex list */\n    for (y = 0; y < n; y++) {\n        for (x = 0; x < m; x++) {\n            addr = y * m + x;\n            vertices[addr] =\n                rt_vector(x * xinc + offset.x, field[addr] + offset.z, y * yinc + offset.y);\n        }\n    }\n\n    /* build normals from vertex list */\n    for (x = 1; x < m; x++) {\n        normals[x] = normals[(n - 1) * m + x] = rt_vector(0.0, 1.0, 0.0);\n    }\n    for (y = 1; y < n; y++) {\n        normals[y * m] = normals[y * m + (m - 1)] = rt_vector(0.0, 1.0, 0.0);\n    }\n    for (y = 1; y < (n - 1); y++) {\n        for (x = 1; x < (m - 1); x++) {\n            addr = y * m + x;\n\n            normals[addr] = rt_vector(-(field[addr + 1] - field[addr - 1]) / (2.0 * xinc),\n                                      1.0,\n                                      -(field[addr + m] - field[addr - m]) / (2.0 * yinc));\n\n            MyVNorm(&normals[addr]);\n        }\n    }\n\n    /* generate actual triangles */\n    for (y = 0; y < (n - 1); y++) {\n        for (x = 0; x < (m - 1); x++) {\n            addr = y * m + x;\n\n            rt_stri(tex,\n                    vertices[addr],\n                    vertices[addr + 1 + m],\n                    vertices[addr + 1],\n                    normals[addr],\n                    normals[addr + 1 + m],\n                    normals[addr + 1]);\n            rt_stri(tex,\n                    vertices[addr],\n                    vertices[addr + m],\n                    vertices[addr + 1 + m],\n                    normals[addr],\n                    normals[addr + m],\n                    normals[addr + 1 + m]);\n        }\n    }\n\n    free(normals);\n    free(vertices);\n} /* end of smoothed heightfield */\n\nstatic void adjust(apiflt *base,\n                   int xres,\n                   int yres,\n                   apiflt wx,\n                   apiflt wy,\n                   int xa,\n                   int ya,\n                   int x,\n                   int y,\n                   int xb,\n                   int yb) {\n    apiflt d, v;\n\n    if (base[x + (xres * y)] == 0.0) {\n        d = (abs(xa - xb) / (xres * 1.0)) * wx + (abs(ya - yb) / (yres * 1.0)) * wy;\n\n        v = (base[xa + (xres * ya)] + base[xb + (xres * yb)]) / 2.0 +\n            (((((rand() % 1000) - 500.0) / 500.0) * d) / 8.0);\n\n        if (v < 0.0)\n            v = 0.0;\n        if (v > (xres + yres))\n            v = (xres + yres);\n        base[x + (xres * y)] = v;\n    }\n}\n\nstatic void\nsubdivide(apiflt *base, int xres, int yres, apiflt wx, apiflt wy, int x1, int y1, int x2, int y2) {\n    long x, y;\n\n    if (((x2 - x1) < 2) && ((y2 - y1) < 2)) {\n        return;\n    }\n\n    x = (x1 + x2) / 2;\n    y = (y1 + y2) / 2;\n\n    adjust(base, xres, yres, wx, wy, x1, y1, x, y1, x2, y1);\n    adjust(base, xres, yres, wx, wy, x2, y1, x2, y, x2, y2);\n    adjust(base, xres, yres, wx, wy, x1, y2, x, y2, x2, y2);\n    adjust(base, xres, yres, wx, wy, x1, y1, x1, y, x1, y2);\n\n    if (base[x + xres * y] == 0.0) {\n        base[x + (xres * y)] = (base[x1 + xres * y1] + base[x2 + xres * y1] + base[x2 + xres * y2] +\n                                base[x1 + xres * y2]) /\n                               4.0;\n    }\n\n    subdivide(base, xres, yres, wx, wy, x1, y1, x, y);\n    subdivide(base, xres, yres, wx, wy, x, y1, x2, y);\n    subdivide(base, xres, yres, wx, wy, x, y, x2, y2);\n    subdivide(base, xres, yres, wx, wy, x1, y, x, y2);\n}\n\nvoid rt_landscape(void *tex, int m, int n, vector ctr, apiflt wx, apiflt wy) {\n    int totalsize, x, y;\n    apiflt *field;\n\n    totalsize = m * n;\n\n    srand(totalsize);\n\n    field = (apiflt *)malloc(totalsize * sizeof(apiflt));\n\n    for (y = 0; y < n; y++) {\n        for (x = 0; x < m; x++) {\n            field[x + y * m] = 0.0;\n        }\n    }\n\n    field[0 + 0] = 1.0 + (rand() % 100) / 100.0;\n    field[m - 1] = 1.0 + (rand() % 100) / 100.0;\n    field[0 + m * (n - 1)] = 1.0 + (rand() % 100) / 100.0;\n    field[m - 1 + m * (n - 1)] = 1.0 + (rand() % 100) / 100.0;\n\n    subdivide(field, m, n, wx, wy, 0, 0, m - 1, n - 1);\n\n    rt_sheightfield(tex, ctr, m, n, field, wx, wy);\n\n    free(field);\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/apitrigeom.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * apitrigeom.cpp - This file contains code for generating triangle tessellated\n *                geometry, for use with OpenGL, XGL, etc.\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"api.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n\n#define MyVNorm(a)          VNorm((vector *)a)\n#define MyVCross(a, b, c)   VCross((vector *)a, (vector *)b, (vector *)c)\n#define MyVAddS(x, a, b, c) VAddS((flt)x, (vector *)a, (vector *)b, (vector *)c)\n\n#define CYLFACETS    36\n#define RINGFACETS   36\n#define SPHEREFACETS 25\n\nvoid rt_tri_fcylinder(void *tex, vector ctr, vector axis, apiflt rad) {\n    vector x, y, z, tmp;\n    double u, v, u2, v2;\n    int j;\n    vector p1, p2, p3, p4;\n    vector n1, n2;\n\n    z = axis;\n    MyVNorm(&z);\n    tmp.x = z.y - 2.1111111;\n    tmp.y = -z.z + 3.14159267;\n    tmp.z = z.x - 3.915292342341;\n    MyVNorm(&z);\n    MyVNorm(&tmp);\n    MyVCross(&z, &tmp, &x);\n    MyVNorm(&x);\n    MyVCross(&x, &z, &y);\n    MyVNorm(&y);\n\n    for (j = 0; j < CYLFACETS; j++) {\n        u = rad * sin((6.28 * j) / (CYLFACETS - 1.0));\n        v = rad * cos((6.28 * j) / (CYLFACETS - 1.0));\n        u2 = rad * sin((6.28 * (j + 1.0)) / (CYLFACETS - 1.0));\n        v2 = rad * cos((6.28 * (j + 1.0)) / (CYLFACETS - 1.0));\n\n        p1.x = p1.y = p1.z = 0.0;\n        p4 = p3 = p2 = p1;\n\n        MyVAddS(u, &x, &p1, &p1);\n        MyVAddS(v, &y, &p1, &p1);\n        n1 = p1;\n        MyVNorm(&n1);\n        MyVAddS(1.0, &ctr, &p1, &p1);\n\n        MyVAddS(u2, &x, &p2, &p2);\n        MyVAddS(v2, &y, &p2, &p2);\n        n2 = p2;\n        MyVNorm(&n2);\n        MyVAddS(1.0, &ctr, &p2, &p2);\n\n        MyVAddS(1.0, &axis, &p1, &p3);\n        MyVAddS(1.0, &axis, &p2, &p4);\n\n        rt_stri(tex, p1, p2, p3, n1, n2, n1);\n        rt_stri(tex, p3, p2, p4, n1, n2, n2);\n    }\n}\n\nvoid rt_tri_cylinder(void *tex, vector ctr, vector axis, apiflt rad) {\n    rt_fcylinder(tex, ctr, axis, rad);\n}\n\nvoid rt_tri_ring(void *tex, vector ctr, vector norm, apiflt a, apiflt b) {\n    vector x, y, z, tmp;\n    double u, v, u2, v2;\n    int j;\n    vector p1, p2, p3, p4;\n    vector n1, n2;\n\n    z = norm;\n    MyVNorm(&z);\n    tmp.x = z.y - 2.1111111;\n    tmp.y = -z.z + 3.14159267;\n    tmp.z = z.x - 3.915292342341;\n    MyVNorm(&z);\n    MyVNorm(&tmp);\n    MyVCross(&z, &tmp, &x);\n    MyVNorm(&x);\n    MyVCross(&x, &z, &y);\n    MyVNorm(&y);\n\n    for (j = 0; j < RINGFACETS; j++) {\n        u = sin((6.28 * j) / (RINGFACETS - 1.0));\n        v = cos((6.28 * j) / (RINGFACETS - 1.0));\n        u2 = sin((6.28 * (j + 1.0)) / (RINGFACETS - 1.0));\n        v2 = cos((6.28 * (j + 1.0)) / (RINGFACETS - 1.0));\n\n        p1.x = p1.y = p1.z = 0.0;\n        p4 = p3 = p2 = p1;\n\n        MyVAddS(u, &x, &p1, &p1);\n        MyVAddS(v, &y, &p1, &p1);\n        n1 = p1;\n        MyVNorm(&n1);\n        MyVAddS(a, &n1, &ctr, &p1);\n        MyVAddS(b, &n1, &ctr, &p3);\n\n        MyVAddS(u2, &x, &p2, &p2);\n        MyVAddS(v2, &y, &p2, &p2);\n        n2 = p2;\n        MyVNorm(&n2);\n        MyVAddS(a, &n2, &ctr, &p2);\n        MyVAddS(b, &n2, &ctr, &p4);\n\n        rt_stri(tex, p1, p2, p3, norm, norm, norm);\n        rt_stri(tex, p3, p2, p4, norm, norm, norm);\n    }\n}\n\nvoid rt_tri_box(void *tex, vector min, vector max) {\n    /* -XY face */\n    rt_tri(tex,\n           rt_vector(min.x, min.y, min.z),\n           rt_vector(min.x, max.y, min.z),\n           rt_vector(max.x, max.y, min.z));\n    rt_tri(tex,\n           rt_vector(min.x, min.y, min.z),\n           rt_vector(max.x, max.y, min.z),\n           rt_vector(max.x, min.y, min.z));\n\n    /* +XY face */\n    rt_tri(tex,\n           rt_vector(min.x, min.y, max.z),\n           rt_vector(max.x, max.y, max.z),\n           rt_vector(min.x, max.y, max.z));\n    rt_tri(tex,\n           rt_vector(min.x, min.y, max.z),\n           rt_vector(max.x, min.y, max.z),\n           rt_vector(max.x, max.y, max.z));\n\n    /* -YZ face */\n    rt_tri(tex,\n           rt_vector(min.x, min.y, min.z),\n           rt_vector(min.x, max.y, max.z),\n           rt_vector(min.x, min.y, max.z));\n    rt_tri(tex,\n           rt_vector(min.x, min.y, min.z),\n           rt_vector(min.x, max.y, min.z),\n           rt_vector(min.x, max.y, max.z));\n\n    /* +YZ face */\n    rt_tri(tex,\n           rt_vector(max.x, min.y, min.z),\n           rt_vector(max.x, min.y, max.z),\n           rt_vector(max.x, max.y, max.z));\n    rt_tri(tex,\n           rt_vector(max.x, min.y, min.z),\n           rt_vector(max.x, max.y, max.z),\n           rt_vector(max.x, max.y, min.z));\n\n    /* -XZ face */\n    rt_tri(tex,\n           rt_vector(min.x, min.y, min.z),\n           rt_vector(min.x, min.y, max.z),\n           rt_vector(max.x, min.y, max.z));\n    rt_tri(tex,\n           rt_vector(min.x, min.y, min.z),\n           rt_vector(max.x, min.y, max.z),\n           rt_vector(max.x, min.y, min.z));\n\n    /* +XZ face */\n    rt_tri(tex,\n           rt_vector(min.x, max.y, min.z),\n           rt_vector(max.x, max.y, max.z),\n           rt_vector(min.x, max.y, max.z));\n    rt_tri(tex,\n           rt_vector(min.x, max.y, min.z),\n           rt_vector(max.x, max.y, min.z),\n           rt_vector(max.x, max.y, max.z));\n}\n\nvoid rt_tri_sphere(void *tex, vector ctr, apiflt rad) {}\n\nvoid rt_tri_plane(void *tex, vector ctr, vector norm) {\n    rt_tri_ring(tex, ctr, norm, 0.0, 10000.0);\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/apitrigeom.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * apitrigeom.h - header for functions to generate triangle tessellated \n *                geometry for use with OpenGL, XGL, etc.\n *\n */\n\nvoid rt_tri_fcylinder(void* tex, vector ctr, vector axis, apiflt rad);\nvoid rt_tri_cylinder(void* tex, vector ctr, vector axis, apiflt rad);\nvoid rt_tri_ring(void* tex, vector ctr, vector norm, apiflt a, apiflt b);\nvoid rt_tri_plane(void* tex, vector ctr, vector norm);\nvoid rt_tri_box(void* tex, vector min, vector max);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/bndbox.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * bndbox.cpp - This file contains the functions for dealing with bounding boxes.\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n#include \"intersect.hpp\"\n#include \"util.hpp\"\n\n#define BNDBOX_PRIVATE\n#include \"bndbox.hpp\"\n\nstatic object_methods bndbox_methods = { (void (*)(void *, void *))(bndbox_intersect),\n                                         (void (*)(void *, void *, void *, void *))(nullptr),\n                                         bndbox_bbox,\n                                         free_bndbox };\n\nbndbox *newbndbox(vector min, vector max) {\n    bndbox *b;\n\n    b = (bndbox *)rt_getmem(sizeof(bndbox));\n    memset(b, 0, sizeof(bndbox));\n    b->min = min;\n    b->max = max;\n    b->methods = &bndbox_methods;\n\n    b->objlist = nullptr;\n    b->tex = nullptr;\n    b->nextobj = nullptr;\n    return b;\n}\n\nstatic int bndbox_bbox(void *obj, vector *min, vector *max) {\n    bndbox *b = (bndbox *)obj;\n\n    *min = b->min;\n    *max = b->max;\n\n    return 1;\n}\n\nstatic void free_bndbox(void *v) {\n    bndbox *b = (bndbox *)v;\n\n    free_objects(b->objlist);\n\n    free(b);\n}\n\nstatic void bndbox_intersect(bndbox *bx, ray *ry) {\n    flt a, tx1, tx2, ty1, ty2, tz1, tz2;\n    flt tnear, tfar;\n    object *obj;\n    ray newray;\n\n    /* eliminate bounded rays whose bounds do not intersect  */\n    /* the bounds of the box..                               */\n    if (ry->flags & RT_RAY_BOUNDED) {\n        if ((ry->s.x > bx->max.x) && (ry->e.x > bx->max.x))\n            return;\n        if ((ry->s.x < bx->min.x) && (ry->e.x < bx->min.x))\n            return;\n\n        if ((ry->s.y > bx->max.y) && (ry->e.y > bx->max.y))\n            return;\n        if ((ry->s.y < bx->min.y) && (ry->e.y < bx->min.y))\n            return;\n\n        if ((ry->s.z > bx->max.z) && (ry->e.z > bx->max.z))\n            return;\n        if ((ry->s.z < bx->min.z) && (ry->e.z < bx->min.z))\n            return;\n    }\n\n    tnear = -FHUGE;\n    tfar = FHUGE;\n\n    if (ry->d.x == 0.0) {\n        if ((ry->o.x < bx->min.x) || (ry->o.x > bx->max.x))\n            return;\n    }\n    else {\n        tx1 = (bx->min.x - ry->o.x) / ry->d.x;\n        tx2 = (bx->max.x - ry->o.x) / ry->d.x;\n        if (tx1 > tx2) {\n            a = tx1;\n            tx1 = tx2;\n            tx2 = a;\n        }\n        if (tx1 > tnear)\n            tnear = tx1;\n        if (tx2 < tfar)\n            tfar = tx2;\n    }\n    if (tnear > tfar)\n        return;\n    if (tfar < 0.0)\n        return;\n\n    if (ry->d.y == 0.0) {\n        if ((ry->o.y < bx->min.y) || (ry->o.y > bx->max.y))\n            return;\n    }\n    else {\n        ty1 = (bx->min.y - ry->o.y) / ry->d.y;\n        ty2 = (bx->max.y - ry->o.y) / ry->d.y;\n        if (ty1 > ty2) {\n            a = ty1;\n            ty1 = ty2;\n            ty2 = a;\n        }\n        if (ty1 > tnear)\n            tnear = ty1;\n        if (ty2 < tfar)\n            tfar = ty2;\n    }\n    if (tnear > tfar)\n        return;\n    if (tfar < 0.0)\n        return;\n\n    if (ry->d.z == 0.0) {\n        if ((ry->o.z < bx->min.z) || (ry->o.z > bx->max.z))\n            return;\n    }\n    else {\n        tz1 = (bx->min.z - ry->o.z) / ry->d.z;\n        tz2 = (bx->max.z - ry->o.z) / ry->d.z;\n        if (tz1 > tz2) {\n            a = tz1;\n            tz1 = tz2;\n            tz2 = a;\n        }\n        if (tz1 > tnear)\n            tnear = tz1;\n        if (tz2 < tfar)\n            tfar = tz2;\n    }\n    if (tnear > tfar)\n        return;\n    if (tfar < 0.0)\n        return;\n\n    /* intersect all of the enclosed objects */\n    newray = *ry;\n    newray.flags |= RT_RAY_BOUNDED;\n\n    RAYPNT(newray.s, (*ry), tnear);\n    RAYPNT(newray.e, (*ry), (tfar + EPSILON));\n\n    obj = bx->objlist;\n    while (obj != nullptr) {\n        obj->methods->intersect(obj, &newray);\n        obj = (object *)obj->nextobj;\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/bndbox.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * bndbox.h - This file contains the defines for bounding boxes etc.\n *\n *  $Id: bndbox.h,v 1.2 2007-02-22 17:54:15 Exp $\n */\n\ntypedef struct {\n    unsigned int id; /* Unique Object serial number */\n    void *nextobj; /* pointer to next object in list */\n    object_methods *methods; /* this object's methods  */\n    texture *tex; /* object texture */\n    vector min;\n    vector max;\n    object *objlist;\n} bndbox;\n\nbndbox *newbndbox(vector min, vector max);\n\n#ifdef BNDBOX_PRIVATE\n\nstatic int bndbox_bbox(void *obj, vector *min, vector *max);\nstatic void free_bndbox(void *v);\nstatic void bndbox_intersect(bndbox *, ray *);\n\n#endif\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/box.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * box.cpp - This file contains the functions for dealing with boxes.\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"box.hpp\"\n#include \"vector.hpp\"\n#include \"intersect.hpp\"\n#include \"util.hpp\"\n\nint box_bbox(void *obj, vector *min, vector *max) {\n    box *b = (box *)obj;\n\n    *min = b->min;\n    *max = b->max;\n\n    return 1;\n}\n\nstatic object_methods box_methods = { (void (*)(void *, void *))(box_intersect),\n                                      (void (*)(void *, void *, void *, void *))(box_normal),\n                                      box_bbox,\n                                      free };\n\nbox *newbox(void *tex, vector min, vector max) {\n    box *b;\n\n    b = (box *)rt_getmem(sizeof(box));\n    memset(b, 0, sizeof(box));\n    b->methods = &box_methods;\n    b->tex = (texture *)tex;\n    b->min = min;\n    b->max = max;\n\n    return b;\n}\n\nvoid box_intersect(box *bx, ray *ry) {\n    flt a, tx1, tx2, ty1, ty2, tz1, tz2;\n    flt tnear, tfar;\n\n    tnear = -FHUGE;\n    tfar = FHUGE;\n\n    if (ry->d.x == 0.0) {\n        if ((ry->o.x < bx->min.x) || (ry->o.x > bx->max.x))\n            return;\n    }\n    else {\n        tx1 = (bx->min.x - ry->o.x) / ry->d.x;\n        tx2 = (bx->max.x - ry->o.x) / ry->d.x;\n        if (tx1 > tx2) {\n            a = tx1;\n            tx1 = tx2;\n            tx2 = a;\n        }\n        if (tx1 > tnear)\n            tnear = tx1;\n        if (tx2 < tfar)\n            tfar = tx2;\n    }\n    if (tnear > tfar)\n        return;\n    if (tfar < 0.0)\n        return;\n\n    if (ry->d.y == 0.0) {\n        if ((ry->o.y < bx->min.y) || (ry->o.y > bx->max.y))\n            return;\n    }\n    else {\n        ty1 = (bx->min.y - ry->o.y) / ry->d.y;\n        ty2 = (bx->max.y - ry->o.y) / ry->d.y;\n        if (ty1 > ty2) {\n            a = ty1;\n            ty1 = ty2;\n            ty2 = a;\n        }\n        if (ty1 > tnear)\n            tnear = ty1;\n        if (ty2 < tfar)\n            tfar = ty2;\n    }\n    if (tnear > tfar)\n        return;\n    if (tfar < 0.0)\n        return;\n\n    if (ry->d.z == 0.0) {\n        if ((ry->o.z < bx->min.z) || (ry->o.z > bx->max.z))\n            return;\n    }\n    else {\n        tz1 = (bx->min.z - ry->o.z) / ry->d.z;\n        tz2 = (bx->max.z - ry->o.z) / ry->d.z;\n        if (tz1 > tz2) {\n            a = tz1;\n            tz1 = tz2;\n            tz2 = a;\n        }\n        if (tz1 > tnear)\n            tnear = tz1;\n        if (tz2 < tfar)\n            tfar = tz2;\n    }\n    if (tnear > tfar)\n        return;\n    if (tfar < 0.0)\n        return;\n\n    add_intersection(tnear, (object *)bx, ry);\n    add_intersection(tfar, (object *)bx, ry);\n}\n\nvoid box_normal(box *bx, vector *pnt, ray *incident, vector *N) {\n    vector a, b, c;\n    flt t;\n\n    c.x = (bx->max.x + bx->min.x) / 2.0;\n    c.y = (bx->max.y + bx->min.y) / 2.0;\n    c.z = (bx->max.z + bx->min.z) / 2.0;\n\n    VSub((vector *)pnt, &c, N);\n    b = (*N);\n\n    a.x = fabs(N->x);\n    a.y = fabs(N->y);\n    a.z = fabs(N->z);\n\n    N->x = 0.0;\n    N->y = 0.0;\n    N->z = 0.0;\n\n    t = MYMAX(a.x, MYMAX(a.y, a.z));\n\n    if (t == a.x)\n        N->x = b.x;\n\n    if (t == a.y)\n        N->y = b.y;\n\n    if (t == a.z)\n        N->z = b.z;\n\n    VNorm(N);\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/box.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * box.h - This file contains the defines for boxes etc.\n *\n *  $Id: box.h,v 1.2 2007-02-22 17:54:15 Exp $\n */\n\ntypedef struct {\n    unsigned int id; /* Unique Object serial number */\n    void *nextobj; /* pointer to next object in list */\n    object_methods *methods; /* this object's methods */\n    texture *tex; /* object texture */\n    vector min;\n    vector max;\n} box;\n\nbox *newbox(void *tex, vector min, vector max);\nvoid box_intersect(box *, ray *);\nvoid box_normal(box *, vector *, ray *incident, vector *);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/camera.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * camera.cpp - This file contains all of the functions for doing camera work.\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n#include \"camera.hpp\"\n#include \"util.hpp\"\n\nray camray(scenedef *scene, int x, int y) {\n    ray ray1, newray;\n    vector projcent;\n    vector projpixel;\n    flt px, py, sx, sy;\n\n    sx = (flt)scene->hres;\n    sy = (flt)scene->vres;\n\n    /* calculate the width and height of the image plane given   */\n    /* the aspect ratio, image resolution, and zoom factor       */\n\n    px = ((sx / sy) / scene->aspectratio) / scene->camzoom;\n    py = 1.0 / scene->camzoom;\n\n    /* assuming viewvec is a unit vector, then the center of the */\n    /* image plane is the camera center + vievec                 */\n    projcent.x = scene->camcent.x + scene->camviewvec.x;\n    projcent.y = scene->camcent.y + scene->camviewvec.y;\n    projcent.z = scene->camcent.z + scene->camviewvec.z;\n\n    /* starting from the center of the image plane, we move the   */\n    /* center of the pel we're calculating, to                    */\n    /* projcent + (rightvec * x distance)                         */\n    ray1.o = projcent;\n    ray1.d = scene->camrightvec;\n    projpixel = Raypnt(&ray1, ((x * px / sx) - (px / 2.0)));\n\n    /* starting from the horizontally translated pel, we move the */\n    /* center of the pel we're calculating, to                    */\n    /* projcent + (upvec * y distance)                            */\n    ray1.o = projpixel;\n    ray1.d = scene->camupvec;\n    projpixel = Raypnt(&ray1, ((y * py / sy) - (py / 2.0)));\n\n    /* now that we have the exact pel center in the image plane */\n    /* we create the real primary ray that will be used by the  */\n    /* rest of the system.                                      */\n    /* The ray is expected to be re-normalized elsewhere, we're */\n    /* only really concerned about getting its direction right. */\n    newray.o = scene->camcent;\n    VSub(&projpixel, &scene->camcent, &newray.d);\n    newray.depth = scene->raydepth;\n    newray.flags = RT_RAY_REGULAR; /* camera only generates primary rays */\n\n    return newray;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/camera.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * camera.h - This file contains the defines for camera routines etc.\n *\n *  $Id: camera.h,v 1.2 2007-02-22 17:54:15 Exp $\n */\n\nray camray(scenedef *, int, int);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/coordsys.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * coordsys.cpp -  Routines to translate from one coordinate system to another.\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"coordsys.hpp\"\n\nvoid xytopolar(flt x, flt y, flt rad, flt* u, flt* v) {\n    flt r1;\n    r1 = x * x + y * y;\n    *v = sqrt(r1 / (rad * rad));\n    if (y < 0.0)\n        *u = 1.0 - acos(x / sqrt(r1)) / TWOPI;\n    else\n        *u = acos(x / sqrt(r1)) / TWOPI;\n}\n\nvoid xyztocyl(vector pnt, flt height, flt* u, flt* v) {\n    flt r1;\n\n    r1 = pnt.x * pnt.x + pnt.y * pnt.y;\n\n    *v = pnt.z / height;\n    if (pnt.y < 0.0)\n        *u = 1.0 - acos(pnt.x / sqrt(r1)) / TWOPI;\n    else\n        *u = acos(pnt.x / sqrt(r1)) / TWOPI;\n}\n\nvoid xyztospr(vector pnt, flt* u, flt* v) {\n    flt r1, phi, theta;\n\n    r1 = sqrt(pnt.x * pnt.x + pnt.y * pnt.y + pnt.z * pnt.z);\n\n    phi = acos(-pnt.y / r1);\n    *v = phi / 3.1415926;\n\n    theta = acos((pnt.x / r1) / sin(phi)) / TWOPI;\n\n    if (pnt.z > 0.0)\n        *u = theta;\n    else\n        *u = 1 - theta;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/coordsys.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * coordsys.h - defines for coordinate system routines.\n *  \n *  $Id: coordsys.h,v 1.2 2007-02-22 17:54:15 Exp $\n */\n\n#define TWOPI 6.2831853\n\nvoid xytopolar(flt, flt, flt, flt *, flt *);\nvoid xyztocyl(vector, flt, flt *, flt *);\nvoid xyztospr(vector, flt *, flt *);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/cylinder.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * cylinder.cpp - This file contains the functions for dealing with cylinders.\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n#include \"intersect.hpp\"\n#include \"util.hpp\"\n\n#define CYLINDER_PRIVATE\n#include \"cylinder.hpp\"\n\nstatic object_methods cylinder_methods = { (void (*)(void *, void *))(cylinder_intersect),\n                                           (void (*)(void *, void *, void *, void *))(\n                                               cylinder_normal),\n                                           cylinder_bbox,\n                                           free };\n\nstatic object_methods fcylinder_methods = { (void (*)(void *, void *))(fcylinder_intersect),\n                                            (void (*)(void *, void *, void *, void *))(\n                                                cylinder_normal),\n                                            fcylinder_bbox,\n                                            free };\n\nobject *newcylinder(void *tex, vector ctr, vector axis, flt rad) {\n    cylinder *c;\n\n    c = (cylinder *)rt_getmem(sizeof(cylinder));\n    memset(c, 0, sizeof(cylinder));\n    c->methods = &cylinder_methods;\n\n    c->tex = (texture *)tex;\n    c->ctr = ctr;\n    c->axis = axis;\n    c->rad = rad;\n    return (object *)c;\n}\n\nstatic int cylinder_bbox(void *obj, vector *min, vector *max) {\n    return 0; /* infinite / unbounded object */\n}\n\nstatic void cylinder_intersect(cylinder *cyl, ray *ry) {\n    vector rc, n, D, O;\n    flt t, s, tin, tout, ln, d;\n\n    rc.x = ry->o.x - cyl->ctr.x;\n    rc.y = ry->o.y - cyl->ctr.y;\n    rc.z = ry->o.z - cyl->ctr.z;\n\n    VCross(&ry->d, &cyl->axis, &n);\n\n    VDOT(ln, n, n);\n    ln = sqrt(ln); /* finish length calculation */\n\n    if (ln == 0.0) { /* ray is parallel to the cylinder.. */\n        VDOT(d, rc, cyl->axis);\n        D.x = rc.x - d * cyl->axis.x;\n        D.y = rc.y - d * cyl->axis.y;\n        D.z = rc.z - d * cyl->axis.z;\n        VDOT(d, D, D);\n        d = sqrt(d);\n        tin = -FHUGE;\n        tout = FHUGE;\n        /* if (d <= cyl->rad) then ray is inside cylinder.. else outside */\n    }\n\n    VNorm(&n);\n    VDOT(d, rc, n);\n    d = fabs(d);\n\n    if (d <= cyl->rad) { /* ray intersects cylinder.. */\n        VCross(&rc, &cyl->axis, &O);\n        VDOT(t, O, n);\n        t = -t / ln;\n        VCross(&n, &cyl->axis, &O);\n        VNorm(&O);\n        VDOT(s, ry->d, O);\n        s = fabs(sqrt(cyl->rad * cyl->rad - d * d) / s);\n        tin = t - s;\n        add_intersection(tin, (object *)cyl, ry);\n        tout = t + s;\n        add_intersection(tout, (object *)cyl, ry);\n    }\n}\n\nstatic void cylinder_normal(cylinder *cyl, vector *pnt, ray *incident, vector *N) {\n    vector a, b, c;\n    flt t;\n\n    VSub((vector *)pnt, &(cyl->ctr), &a);\n\n    c = cyl->axis;\n\n    VNorm(&c);\n\n    VDOT(t, a, c);\n\n    b.x = c.x * t + cyl->ctr.x;\n    b.y = c.y * t + cyl->ctr.y;\n    b.z = c.z * t + cyl->ctr.z;\n\n    VSub(pnt, &b, N);\n    VNorm(N);\n\n    if (VDot(N, &(incident->d)) > 0.0) { /* make cylinder double sided */\n        N->x = -N->x;\n        N->y = -N->y;\n        N->z = -N->z;\n    }\n}\n\nobject *newfcylinder(void *tex, vector ctr, vector axis, flt rad) {\n    cylinder *c;\n\n    c = (cylinder *)rt_getmem(sizeof(cylinder));\n    memset(c, 0, sizeof(cylinder));\n    c->methods = &fcylinder_methods;\n\n    c->tex = (texture *)tex;\n    c->ctr = ctr;\n    c->axis = axis;\n    c->rad = rad;\n\n    return (object *)c;\n}\n\nstatic int fcylinder_bbox(void *obj, vector *min, vector *max) {\n    cylinder *c = (cylinder *)obj;\n    vector mintmp, maxtmp;\n\n    mintmp.x = c->ctr.x;\n    mintmp.y = c->ctr.y;\n    mintmp.z = c->ctr.z;\n    maxtmp.x = c->ctr.x + c->axis.x;\n    maxtmp.y = c->ctr.y + c->axis.y;\n    maxtmp.z = c->ctr.z + c->axis.z;\n\n    min->x = MYMIN(mintmp.x, maxtmp.x);\n    min->y = MYMIN(mintmp.y, maxtmp.y);\n    min->z = MYMIN(mintmp.z, maxtmp.z);\n    min->x -= c->rad;\n    min->y -= c->rad;\n    min->z -= c->rad;\n\n    max->x = MYMAX(mintmp.x, maxtmp.x);\n    max->y = MYMAX(mintmp.y, maxtmp.y);\n    max->z = MYMAX(mintmp.z, maxtmp.z);\n    max->x += c->rad;\n    max->y += c->rad;\n    max->z += c->rad;\n\n    return 1;\n}\n\nstatic void fcylinder_intersect(cylinder *cyl, ray *ry) {\n    vector rc, n, O, hit, tmp2, ctmp4;\n    flt t, s, tin, tout, ln, d, tmp, tmp3;\n\n    rc.x = ry->o.x - cyl->ctr.x;\n    rc.y = ry->o.y - cyl->ctr.y;\n    rc.z = ry->o.z - cyl->ctr.z;\n\n    VCross(&ry->d, &cyl->axis, &n);\n\n    VDOT(ln, n, n);\n    ln = sqrt(ln); /* finish length calculation */\n\n    if (ln == 0.0) { /* ray is parallel to the cylinder.. */\n        return; /* in this case, we want to miss or go through the \"hole\" */\n    }\n\n    VNorm(&n);\n    VDOT(d, rc, n);\n    d = fabs(d);\n\n    if (d <= cyl->rad) { /* ray intersects cylinder.. */\n        VCross(&rc, &cyl->axis, &O);\n        VDOT(t, O, n);\n        t = -t / ln;\n        VCross(&n, &cyl->axis, &O);\n        VNorm(&O);\n        VDOT(s, ry->d, O);\n        s = fabs(sqrt(cyl->rad * cyl->rad - d * d) / s);\n        tin = t - s;\n\n        RAYPNT(hit, (*ry), tin);\n\n        ctmp4 = cyl->axis;\n        VNorm(&ctmp4);\n\n        tmp2.x = hit.x - cyl->ctr.x;\n        tmp2.y = hit.y - cyl->ctr.y;\n        tmp2.z = hit.z - cyl->ctr.z;\n\n        VDOT(tmp, tmp2, ctmp4);\n        VDOT(tmp3, cyl->axis, cyl->axis);\n\n        if ((tmp > 0.0) && (tmp < sqrt(tmp3)))\n            add_intersection(tin, (object *)cyl, ry);\n        tout = t + s;\n\n        RAYPNT(hit, (*ry), tout);\n\n        tmp2.x = hit.x - cyl->ctr.x;\n        tmp2.y = hit.y - cyl->ctr.y;\n        tmp2.z = hit.z - cyl->ctr.z;\n\n        VDOT(tmp, tmp2, ctmp4);\n        VDOT(tmp3, cyl->axis, cyl->axis);\n\n        if ((tmp > 0.0) && (tmp < sqrt(tmp3)))\n            add_intersection(tout, (object *)cyl, ry);\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/cylinder.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * cylinder.h - This file contains the defines for cylinders etc.\n *\n *  $Id: cylinder.h,v 1.2 2007-02-22 17:54:15 Exp $\n */\n\nobject *newcylinder(void *, vector, vector, flt);\nobject *newfcylinder(void *, vector, vector, flt);\n\n#ifdef CYLINDER_PRIVATE\n\ntypedef struct {\n    unsigned int id; /* Unique Object serial number */\n    void *nextobj; /* pointer to next object in list */\n    object_methods *methods; /* this object's methods */\n    texture *tex; /* object texture */\n    vector ctr;\n    vector axis;\n    flt rad;\n} cylinder;\n\nstatic void cylinder_intersect(cylinder *, ray *);\nstatic void fcylinder_intersect(cylinder *, ray *);\n\nstatic int cylinder_bbox(void *obj, vector *min, vector *max);\nstatic int fcylinder_bbox(void *obj, vector *min, vector *max);\n\nstatic void cylinder_normal(cylinder *, vector *, ray *, vector *);\n#endif\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/extvol.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * extvol.cpp - Volume rendering helper routines etc.\n */\n\n#include <cstdio>\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n#include \"util.hpp\"\n#include \"box.hpp\"\n#include \"extvol.hpp\"\n#include \"trace.hpp\"\n#include \"sphere.hpp\"\n#include \"light.hpp\"\n#include \"shade.hpp\"\n#include \"global.hpp\"\n\nint extvol_bbox(void *obj, vector *min, vector *max) {\n    box *b = (box *)obj;\n\n    *min = b->min;\n    *max = b->max;\n\n    return 1;\n}\n\nstatic object_methods extvol_methods = { (void (*)(void *, void *))(box_intersect),\n                                         (void (*)(void *, void *, void *, void *))(box_normal),\n                                         extvol_bbox,\n                                         free };\n\nextvol *newextvol(void *voidtex,\n                  vector min,\n                  vector max,\n                  int samples,\n                  flt (*evaluator)(flt, flt, flt)) {\n    extvol *xvol;\n    texture *tex;\n\n    tex = (texture *)voidtex;\n\n    xvol = (extvol *)rt_getmem(sizeof(extvol));\n    memset(xvol, 0, sizeof(extvol));\n\n    xvol->methods = &extvol_methods;\n\n    xvol->min = min;\n    xvol->max = max;\n    xvol->evaluator = evaluator;\n    xvol->ambient = tex->ambient;\n    xvol->diffuse = tex->diffuse;\n    xvol->opacity = tex->opacity;\n    xvol->samples = samples;\n\n    xvol->tex = (texture *)rt_getmem(sizeof(texture));\n    memset(xvol->tex, 0, sizeof(texture));\n\n    xvol->tex->ctr.x = 0.0;\n    xvol->tex->ctr.y = 0.0;\n    xvol->tex->ctr.z = 0.0;\n    xvol->tex->rot = xvol->tex->ctr;\n    xvol->tex->scale = xvol->tex->ctr;\n    xvol->tex->uaxs = xvol->tex->ctr;\n    xvol->tex->vaxs = xvol->tex->ctr;\n    xvol->tex->islight = 0;\n    xvol->tex->shadowcast = 0;\n\n    xvol->tex->col = tex->col;\n    xvol->tex->ambient = 1.0;\n    xvol->tex->diffuse = 0.0;\n    xvol->tex->specular = 0.0;\n    xvol->tex->opacity = 1.0;\n    xvol->tex->img = nullptr;\n    xvol->tex->texfunc = (color(*)(void *, void *, void *))(ext_volume_texture);\n    xvol->tex->obj = (void *)xvol; /* XXX hack! */\n\n    return xvol;\n}\n\ncolor ExtVoxelColor(flt scalar) {\n    color col;\n\n    if (scalar > 1.0)\n        scalar = 1.0;\n\n    if (scalar < 0.0)\n        scalar = 0.0;\n\n    if (scalar < 0.5) {\n        col.g = 0.0;\n    }\n    else {\n        col.g = (scalar - 0.5) * 2.0;\n    }\n\n    col.r = scalar;\n    col.b = 1.0 - (scalar / 2.0);\n\n    return col;\n}\n\ncolor ext_volume_texture(vector *hit, texture *tex, ray *ry) {\n    color col, col2;\n    box *bx;\n    extvol *xvol;\n    flt a, tx1, tx2, ty1, ty2, tz1, tz2;\n    flt tnear, tfar;\n    flt t, tdist, dt, ddt, sum, tt;\n    vector pnt, bln;\n    flt scalar, transval;\n    int i;\n    point_light *li;\n    color diffint;\n    vector N, L;\n    flt inten;\n\n    col.r = 0.0;\n    col.g = 0.0;\n    col.b = 0.0;\n\n    bx = (box *)tex->obj;\n    xvol = (extvol *)tex->obj;\n\n    tnear = -FHUGE;\n    tfar = FHUGE;\n\n    if (ry->d.x == 0.0) {\n        if ((ry->o.x < bx->min.x) || (ry->o.x > bx->max.x))\n            return col;\n    }\n    else {\n        tx1 = (bx->min.x - ry->o.x) / ry->d.x;\n        tx2 = (bx->max.x - ry->o.x) / ry->d.x;\n        if (tx1 > tx2) {\n            a = tx1;\n            tx1 = tx2;\n            tx2 = a;\n        }\n        if (tx1 > tnear)\n            tnear = tx1;\n        if (tx2 < tfar)\n            tfar = tx2;\n    }\n    if (tnear > tfar)\n        return col;\n    if (tfar < 0.0)\n        return col;\n\n    if (ry->d.y == 0.0) {\n        if ((ry->o.y < bx->min.y) || (ry->o.y > bx->max.y))\n            return col;\n    }\n    else {\n        ty1 = (bx->min.y - ry->o.y) / ry->d.y;\n        ty2 = (bx->max.y - ry->o.y) / ry->d.y;\n        if (ty1 > ty2) {\n            a = ty1;\n            ty1 = ty2;\n            ty2 = a;\n        }\n        if (ty1 > tnear)\n            tnear = ty1;\n        if (ty2 < tfar)\n            tfar = ty2;\n    }\n    if (tnear > tfar)\n        return col;\n    if (tfar < 0.0)\n        return col;\n\n    if (ry->d.z == 0.0) {\n        if ((ry->o.z < bx->min.z) || (ry->o.z > bx->max.z))\n            return col;\n    }\n    else {\n        tz1 = (bx->min.z - ry->o.z) / ry->d.z;\n        tz2 = (bx->max.z - ry->o.z) / ry->d.z;\n        if (tz1 > tz2) {\n            a = tz1;\n            tz1 = tz2;\n            tz2 = a;\n        }\n        if (tz1 > tnear)\n            tnear = tz1;\n        if (tz2 < tfar)\n            tfar = tz2;\n    }\n    if (tnear > tfar)\n        return col;\n    if (tfar < 0.0)\n        return col;\n\n    if (tnear < 0.0)\n        tnear = 0.0;\n\n    tdist = xvol->samples;\n\n    tt = (xvol->opacity / tdist);\n\n    bln.x = fabs(bx->min.x - bx->max.x);\n    bln.y = fabs(bx->min.y - bx->max.y);\n    bln.z = fabs(bx->min.z - bx->max.z);\n\n    dt = 1.0 / tdist;\n    sum = 0.0;\n\n    /* Accumulate color as the ray passes through the voxels */\n    for (t = tnear; t <= tfar; t += dt) {\n        if (sum < 1.0) {\n            pnt.x = ((ry->o.x + (ry->d.x * t)) - bx->min.x) / bln.x;\n            pnt.y = ((ry->o.y + (ry->d.y * t)) - bx->min.y) / bln.y;\n            pnt.z = ((ry->o.z + (ry->d.z * t)) - bx->min.z) / bln.z;\n\n            /* call external evaluator assume 0.0 -> 1.0 range.. */\n            scalar = xvol->evaluator(pnt.x, pnt.y, pnt.z);\n\n            transval = tt * scalar;\n            sum += transval;\n\n            col2 = ExtVoxelColor(scalar);\n\n            col.r += transval * col2.r * xvol->ambient;\n            col.g += transval * col2.g * xvol->ambient;\n            col.b += transval * col2.b * xvol->ambient;\n\n            ddt = dt;\n\n            /* Add in diffuse shaded light sources (no shadows) */\n            if (xvol->diffuse > 0.0) {\n                /* Calculate the Volume gradient at the voxel */\n                N.x = (xvol->evaluator(pnt.x - ddt, pnt.y, pnt.z) -\n                       xvol->evaluator(pnt.x + ddt, pnt.y, pnt.z)) *\n                      8.0 * tt;\n\n                N.y = (xvol->evaluator(pnt.x, pnt.y - ddt, pnt.z) -\n                       xvol->evaluator(pnt.x, pnt.y + ddt, pnt.z)) *\n                      8.0 * tt;\n\n                N.z = (xvol->evaluator(pnt.x, pnt.y, pnt.z - ddt) -\n                       xvol->evaluator(pnt.x, pnt.y, pnt.z + ddt)) *\n                      8.0 * tt;\n\n                /* only light surfaces with enough of a normal.. */\n                if ((N.x * N.x + N.y * N.y + N.z * N.z) > 0.0) {\n                    diffint.r = 0.0;\n                    diffint.g = 0.0;\n                    diffint.b = 0.0;\n\n                    /* add the contribution of each of the lights.. */\n                    for (i = 0; i < numlights; i++) {\n                        li = lightlist[i];\n                        VSUB(li->ctr, (*hit), L)\n                        VNorm(&L);\n                        VDOT(inten, N, L)\n\n                        /* only add light if its from the front of the surface */\n                        /* could add back-lighting if we wanted to later.. */\n                        if (inten > 0.0) {\n                            diffint.r += inten * li->tex->col.r;\n                            diffint.g += inten * li->tex->col.g;\n                            diffint.b += inten * li->tex->col.b;\n                        }\n                    }\n                    col.r += col2.r * diffint.r * xvol->diffuse;\n                    col.g += col2.g * diffint.g * xvol->diffuse;\n                    col.b += col2.b * diffint.b * xvol->diffuse;\n                }\n            }\n        }\n        else {\n            sum = 1.0;\n        }\n    }\n\n    /* Add in transmitted ray from outside environment */\n    if (sum < 1.0) { /* spawn transmission rays / refraction */\n        color transcol;\n\n        transcol = shade_transmission(ry, hit, 1.0 - sum);\n\n        col.r += transcol.r; /* add the transmitted ray  */\n        col.g += transcol.g; /* to the diffuse and       */\n        col.b += transcol.b; /* transmission total..     */\n    }\n\n    return col;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/extvol.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * vol.h - Volume rendering definitions etc.\n *\n *\n *  $Id: extvol.h,v 1.2 2007-02-22 17:54:15 Exp $\n */\n\ntypedef struct {\n    unsigned int id; /* Unique Object serial number */\n    void *nextobj; /* pointer to next object in list */\n    object_methods *methods; /* this object's methods */\n    texture *tex; /* object texture */\n    vector min;\n    vector max;\n    flt ambient;\n    flt diffuse;\n    flt opacity;\n    int samples;\n    flt (*evaluator)(flt, flt, flt);\n} extvol;\n\nextvol *newextvol(void *voidtex,\n                  vector min,\n                  vector max,\n                  int samples,\n                  flt (*evaluator)(flt, flt, flt));\ncolor ext_volume_texture(vector *, texture *, ray *);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/global.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * global.cpp - any/all global data items etc should be in this file\n */\n\n#include \"types.hpp\"\n#include \"machine.hpp\"\n#include \"sphere.hpp\"\n#include \"light.hpp\"\n\n/* stuff moved from intersect.c */\nobject* rootobj = nullptr; /* starts out empty. */\n\npoint_light* lightlist[MAXLIGHTS];\nint numlights = 0;\n\nunsigned int numobjects = 0; /* used to assign unique object ID's */\n\n/* used in util.c */\nunsigned int rt_mem_in_use = 0;\n\n/* used in api.c */\nint parinitted = 0;\n\nint graphicswindowopen = 0;\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/global.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * global.h - any/all global data items etc should be in this file\n *\n *  $Id: global.h,v 1.2 2007-02-22 17:54:15 Exp $\n *\n */\n\n/* stuff moved from intersect.c */\nextern object* rootobj;\n\nextern point_light* lightlist[MAXLIGHTS];\nextern int numlights;\n\nextern unsigned int numobjects;\n\nextern unsigned int rt_mem_in_use;\nextern int parinitted;\n\nextern int graphicswindowopen;\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/grid.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * grid.cpp - spatial subdivision efficiency structures\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n#include \"intersect.hpp\"\n#include \"util.hpp\"\n\n#define GRID_PRIVATE\n#include \"grid.hpp\"\n\n#ifndef cbrt\n#define cbrt(x) \\\n    ((x) > 0.0 ? pow((double)(x), 1.0 / 3.0) : ((x) < 0.0 ? -pow((double)-(x), 1.0 / 3.0) : 0.0))\n\n#define qbrt(x) \\\n    ((x) > 0.0 ? pow((double)(x), 1.0 / 4.0) : ((x) < 0.0 ? -pow((double)-(x), 1.0 / 4.0) : 0.0))\n\n#endif\n\nstatic object_methods grid_methods = { (void (*)(void *, void *))(grid_intersect),\n                                       (void (*)(void *, void *, void *, void *))(nullptr),\n                                       grid_bbox,\n                                       grid_free };\n\nextern bool silent_mode;\n\nobject *newgrid(int xsize, int ysize, int zsize, vector min, vector max) {\n    grid *g;\n\n    g = (grid *)rt_getmem(sizeof(grid));\n    memset(g, 0, sizeof(grid));\n\n    g->methods = &grid_methods;\n    g->id = new_objectid();\n\n    g->xsize = xsize;\n    g->ysize = ysize;\n    g->zsize = zsize;\n\n    g->min = min;\n    g->max = max;\n\n    VSub(&g->max, &g->min, &g->voxsize);\n    g->voxsize.x /= (flt)g->xsize;\n    g->voxsize.y /= (flt)g->ysize;\n    g->voxsize.z /= (flt)g->zsize;\n\n    g->cells = (objectlist **)rt_getmem(xsize * ysize * zsize * sizeof(objectlist *));\n    memset(g->cells, 0, xsize * ysize * zsize * sizeof(objectlist *));\n\n    /* fprintf(stderr, \"New grid, size: %8d %8d %8d\\n\", g->xsize, g->ysize, g->zsize); */\n\n    return (object *)g;\n}\n\nstatic int grid_bbox(void *obj, vector *min, vector *max) {\n    grid *g = (grid *)obj;\n\n    *min = g->min;\n    *max = g->max;\n\n    return 1;\n}\n\nstatic void grid_free(void *v) {\n    int i, numvoxels;\n    grid *g = (grid *)v;\n\n    /* loop through all voxels and free the object lists */\n    numvoxels = g->xsize * g->ysize * g->zsize;\n    for (i = 0; i < numvoxels; i++) {\n        objectlist *lcur, *lnext;\n\n        lcur = g->cells[i];\n        while (lcur != nullptr) {\n            lnext = lcur->next;\n            free(lcur);\n        }\n    }\n\n    /* free the grid cells */\n    free(g->cells);\n\n    /* free all objects on the grid object list */\n    free_objects(g->objects);\n\n    free(g);\n}\n\nstatic void globalbound(object **rootlist, vector *gmin, vector *gmax) {\n    vector min, max;\n    object *cur;\n\n    if (*rootlist == nullptr) /* don't bound non-existent objects */\n        return;\n\n    gmin->x = FHUGE;\n    gmin->y = FHUGE;\n    gmin->z = FHUGE;\n    gmax->x = -FHUGE;\n    gmax->y = -FHUGE;\n    gmax->z = -FHUGE;\n\n    cur = *rootlist;\n    while (cur != nullptr) { /* Go! */\n        min.x = -FHUGE;\n        min.y = -FHUGE;\n        min.z = -FHUGE;\n        max.x = FHUGE;\n        max.y = FHUGE;\n        max.z = FHUGE;\n\n        if (cur->methods->bbox((void *)cur, &min, &max)) {\n            gmin->x = MYMIN(gmin->x, min.x);\n            gmin->y = MYMIN(gmin->y, min.y);\n            gmin->z = MYMIN(gmin->z, min.z);\n\n            gmax->x = MYMAX(gmax->x, max.x);\n            gmax->y = MYMAX(gmax->y, max.y);\n            gmax->z = MYMAX(gmax->z, max.z);\n        }\n\n        cur = (object *)cur->nextobj;\n    }\n}\n\nstatic int cellbound(grid *g, gridindex *index, vector *cmin, vector *cmax) {\n    vector min, max, cellmin, cellmax;\n    objectlist *cur;\n    int numinbounds = 0;\n\n    cur = g->cells[index->z * g->xsize * g->ysize + index->y * g->xsize + index->x];\n\n    if (cur == nullptr) /* don't bound non-existent objects */\n        return 0;\n\n    cellmin.x = voxel2x(g, index->x);\n    cellmin.y = voxel2y(g, index->y);\n    cellmin.z = voxel2z(g, index->z);\n\n    cellmax.x = cellmin.x + g->voxsize.x;\n    cellmax.y = cellmin.y + g->voxsize.y;\n    cellmax.z = cellmin.z + g->voxsize.z;\n\n    cmin->x = FHUGE;\n    cmin->y = FHUGE;\n    cmin->z = FHUGE;\n    cmax->x = -FHUGE;\n    cmax->y = -FHUGE;\n    cmax->z = -FHUGE;\n\n    while (cur != nullptr) { /* Go! */\n        min.x = -FHUGE;\n        min.y = -FHUGE;\n        min.z = -FHUGE;\n        max.x = FHUGE;\n        max.y = FHUGE;\n        max.z = FHUGE;\n\n        if (cur->obj->methods->bbox((void *)cur->obj, &min, &max)) {\n            if ((min.x >= cellmin.x) && (max.x <= cellmax.x) && (min.y >= cellmin.y) &&\n                (max.y <= cellmax.y) && (min.z >= cellmin.z) && (max.z <= cellmax.z)) {\n                cmin->x = MYMIN(cmin->x, min.x);\n                cmin->y = MYMIN(cmin->y, min.y);\n                cmin->z = MYMIN(cmin->z, min.z);\n\n                cmax->x = MYMAX(cmax->x, max.x);\n                cmax->y = MYMAX(cmax->y, max.y);\n                cmax->z = MYMAX(cmax->z, max.z);\n\n                numinbounds++;\n            }\n        }\n\n        cur = cur->next;\n    }\n\n    /* in case we get a 0.0 sized axis on the cell bounds, we'll */\n    /* use the original cell bounds */\n    if ((cmax->x - cmin->x) < EPSILON) {\n        cmax->x += EPSILON;\n        cmin->x -= EPSILON;\n    }\n    if ((cmax->y - cmin->y) < EPSILON) {\n        cmax->y += EPSILON;\n        cmin->y -= EPSILON;\n    }\n    if ((cmax->z - cmin->z) < EPSILON) {\n        cmax->z += EPSILON;\n        cmin->z -= EPSILON;\n    }\n\n    return numinbounds;\n}\n\nstatic int countobj(object *root) {\n    object *cur; /* counts the number of objects on a list */\n    int numobj;\n\n    numobj = 0;\n    cur = root;\n\n    while (cur != nullptr) {\n        cur = (object *)cur->nextobj;\n        numobj++;\n    }\n    return numobj;\n}\n\nstatic int countobjlist(objectlist *root) {\n    objectlist *cur;\n    int numobj;\n\n    numobj = 0;\n    cur = root;\n\n    while (cur != nullptr) {\n        cur = cur->next;\n        numobj++;\n    }\n    return numobj;\n}\n\nint engrid_scene(object **list) {\n    grid *g;\n    int numobj, numcbrt;\n    vector gmin, gmax;\n    gridindex index;\n\n    if (*list == nullptr)\n        return 0;\n\n    numobj = countobj(*list);\n\n    if (!silent_mode)\n        fprintf(stderr, \"Scene contains %d bounded objects.\\n\", numobj);\n\n    if (numobj > 16) {\n        numcbrt = (int)cbrt(4 * numobj);\n        globalbound(list, &gmin, &gmax);\n\n        g = (grid *)newgrid(numcbrt, numcbrt, numcbrt, gmin, gmax);\n        engrid_objlist(g, list);\n\n        numobj = countobj(*list);\n        g->nextobj = *list;\n        *list = (object *)g;\n\n        /* now create subgrids.. */\n        for (index.z = 0; index.z < g->zsize; index.z++) {\n            for (index.y = 0; index.y < g->ysize; index.y++) {\n                for (index.x = 0; index.x < g->xsize; index.x++) {\n                    engrid_cell(g, &index);\n                }\n            }\n        }\n    }\n\n    return 1;\n}\n\nvoid engrid_objlist(grid *g, object **list) {\n    object *cur, *next, **prev;\n\n    if (*list == nullptr)\n        return;\n\n    prev = list;\n    cur = *list;\n\n    while (cur != nullptr) {\n        next = (object *)cur->nextobj;\n\n        if (engrid_object(g, cur))\n            *prev = next;\n        else\n            prev = (object **)&cur->nextobj;\n\n        cur = next;\n    }\n}\n\nstatic int engrid_cell(grid *gold, gridindex *index) {\n    vector gmin, gmax, gsize;\n    flt len;\n    int numobj, numcbrt, xs, ys, zs;\n    grid *g;\n    objectlist **list;\n    objectlist *newobj;\n\n    list = &gold->cells[index->z * gold->xsize * gold->ysize + index->y * gold->xsize + index->x];\n\n    if (*list == nullptr)\n        return 0;\n\n    numobj = cellbound(gold, index, &gmin, &gmax);\n\n    VSub(&gmax, &gmin, &gsize);\n    len = 1.0 / (MYMAX(MYMAX(gsize.x, gsize.y), gsize.z));\n    gsize.x *= len;\n    gsize.y *= len;\n    gsize.z *= len;\n\n    if (numobj > 16) {\n        numcbrt = (int)cbrt(2 * numobj);\n\n        xs = (int)((flt)numcbrt * gsize.x);\n        if (xs < 1)\n            xs = 1;\n        ys = (int)((flt)numcbrt * gsize.y);\n        if (ys < 1)\n            ys = 1;\n        zs = (int)((flt)numcbrt * gsize.z);\n        if (zs < 1)\n            zs = 1;\n\n        g = (grid *)newgrid(xs, ys, zs, gmin, gmax);\n        engrid_objectlist(g, list);\n\n        newobj = (objectlist *)rt_getmem(sizeof(objectlist));\n        newobj->obj = (object *)g;\n        newobj->next = *list;\n        *list = newobj;\n\n        g->nextobj = gold->objects;\n        gold->objects = (object *)g;\n    }\n\n    return 1;\n}\n\nstatic int engrid_objectlist(grid *g, objectlist **list) {\n    objectlist *cur, *next, **prev;\n    int numsucceeded = 0;\n\n    if (*list == nullptr)\n        return 0;\n\n    prev = list;\n    cur = *list;\n\n    while (cur != nullptr) {\n        next = cur->next;\n\n        if (engrid_object(g, cur->obj)) {\n            *prev = next;\n            free(cur);\n            numsucceeded++;\n        }\n        else {\n            prev = &cur->next;\n        }\n\n        cur = next;\n    }\n\n    return numsucceeded;\n}\n\nstatic int engrid_object(grid *g, object *obj) {\n    vector omin, omax;\n    gridindex low, high;\n    int x, y, z, zindex, yindex, voxindex;\n    objectlist *tmp;\n\n    if (obj->methods->bbox(obj, &omin, &omax)) {\n        if (!pos2grid(g, &omin, &low) || !pos2grid(g, &omax, &high)) {\n            return 0; /* object is not wholly contained in the grid */\n        }\n    }\n    else {\n        return 0; /* object is unbounded */\n    }\n\n    /* add the object to the complete list of objects in the grid */\n    obj->nextobj = g->objects;\n    g->objects = obj;\n\n    /* add this object to all voxels it inhabits */\n    for (z = low.z; z <= high.z; z++) {\n        zindex = z * g->xsize * g->ysize;\n        for (y = low.y; y <= high.y; y++) {\n            yindex = y * g->xsize;\n            for (x = low.x; x <= high.x; x++) {\n                voxindex = x + yindex + zindex;\n                tmp = (objectlist *)rt_getmem(sizeof(objectlist));\n                tmp->next = g->cells[voxindex];\n                tmp->obj = obj;\n                g->cells[voxindex] = tmp;\n            }\n        }\n    }\n\n    return 1;\n}\n\nstatic int pos2grid(grid *g, vector *pos, gridindex *index) {\n    index->x = (int)((pos->x - g->min.x) / g->voxsize.x);\n    index->y = (int)((pos->y - g->min.y) / g->voxsize.y);\n    index->z = (int)((pos->z - g->min.z) / g->voxsize.z);\n\n    if (index->x == g->xsize)\n        index->x--;\n    if (index->y == g->ysize)\n        index->y--;\n    if (index->z == g->zsize)\n        index->z--;\n\n    if (index->x < 0 || index->x > g->xsize || index->y < 0 || index->y > g->ysize ||\n        index->z < 0 || index->z > g->zsize)\n        return 0;\n\n    if (pos->x < g->min.x || pos->x > g->max.x || pos->y < g->min.y || pos->y > g->max.y ||\n        pos->z < g->min.z || pos->z > g->max.z)\n        return 0;\n\n    return 1;\n}\n\n/* the real thing */\nstatic void grid_intersect(grid *g, ray *ry) {\n    flt tnear, tfar, offset;\n    vector curpos, tmax, tdelta, pdeltaX, pdeltaY, pdeltaZ, nXp, nYp, nZp;\n    gridindex curvox, step, out;\n    int voxindex;\n    objectlist *cur;\n\n    if (ry->flags & RT_RAY_FINISHED)\n        return;\n\n    if (!grid_bounds_intersect(g, ry, &tnear, &tfar))\n        return;\n\n    if (ry->maxdist < tnear)\n        return;\n\n    curpos = Raypnt(ry, tnear);\n    pos2grid(g, &curpos, &curvox);\n    offset = tnear;\n\n    /* Setup X iterator stuff */\n    if (fabs(ry->d.x) < EPSILON) {\n        tmax.x = FHUGE;\n        tdelta.x = 0.0;\n        step.x = 0;\n        out.x = 0; /* never goes out of bounds on this axis */\n    }\n    else if (ry->d.x < 0.0) {\n        tmax.x = offset + ((voxel2x(g, curvox.x) - curpos.x) / ry->d.x);\n        tdelta.x = g->voxsize.x / -ry->d.x;\n        step.x = out.x = -1;\n    }\n    else {\n        tmax.x = offset + ((voxel2x(g, curvox.x + 1) - curpos.x) / ry->d.x);\n        tdelta.x = g->voxsize.x / ry->d.x;\n        step.x = 1;\n        out.x = g->xsize;\n    }\n\n    /* Setup Y iterator stuff */\n    if (fabs(ry->d.y) < EPSILON) {\n        tmax.y = FHUGE;\n        tdelta.y = 0.0;\n        step.y = 0;\n        out.y = 0; /* never goes out of bounds on this axis */\n    }\n    else if (ry->d.y < 0.0) {\n        tmax.y = offset + ((voxel2y(g, curvox.y) - curpos.y) / ry->d.y);\n        tdelta.y = g->voxsize.y / -ry->d.y;\n        step.y = out.y = -1;\n    }\n    else {\n        tmax.y = offset + ((voxel2y(g, curvox.y + 1) - curpos.y) / ry->d.y);\n        tdelta.y = g->voxsize.y / ry->d.y;\n        step.y = 1;\n        out.y = g->ysize;\n    }\n\n    /* Setup Z iterator stuff */\n    if (fabs(ry->d.z) < EPSILON) {\n        tmax.z = FHUGE;\n        tdelta.z = 0.0;\n        step.z = 0;\n        out.z = 0; /* never goes out of bounds on this axis */\n    }\n    else if (ry->d.z < 0.0) {\n        tmax.z = offset + ((voxel2z(g, curvox.z) - curpos.z) / ry->d.z);\n        tdelta.z = g->voxsize.z / -ry->d.z;\n        step.z = out.z = -1;\n    }\n    else {\n        tmax.z = offset + ((voxel2z(g, curvox.z + 1) - curpos.z) / ry->d.z);\n        tdelta.z = g->voxsize.z / ry->d.z;\n        step.z = 1;\n        out.z = g->zsize;\n    }\n\n    pdeltaX = ry->d;\n    VScale(&pdeltaX, tdelta.x);\n    pdeltaY = ry->d;\n    VScale(&pdeltaY, tdelta.y);\n    pdeltaZ = ry->d;\n    VScale(&pdeltaZ, tdelta.z);\n\n    nXp = Raypnt(ry, tmax.x);\n    nYp = Raypnt(ry, tmax.y);\n    nZp = Raypnt(ry, tmax.z);\n\n    voxindex = curvox.z * g->xsize * g->ysize + curvox.y * g->xsize + curvox.x;\n    while (1) {\n        if (tmax.x < tmax.y && tmax.x < tmax.z) {\n            cur = g->cells[voxindex];\n            while (cur != nullptr) {\n                if (ry->mbox[cur->obj->id] != ry->serial) {\n                    ry->mbox[cur->obj->id] = ry->serial;\n                    cur->obj->methods->intersect(cur->obj, ry);\n                }\n                cur = cur->next;\n            }\n            curvox.x += step.x;\n            if (ry->maxdist < tmax.x || curvox.x == out.x)\n                break;\n            voxindex += step.x;\n            tmax.x += tdelta.x;\n            curpos = nXp;\n            nXp.x += pdeltaX.x;\n            nXp.y += pdeltaX.y;\n            nXp.z += pdeltaX.z;\n        }\n        else if (tmax.z < tmax.y) {\n            cur = g->cells[voxindex];\n            while (cur != nullptr) {\n                if (ry->mbox[cur->obj->id] != ry->serial) {\n                    ry->mbox[cur->obj->id] = ry->serial;\n                    cur->obj->methods->intersect(cur->obj, ry);\n                }\n                cur = cur->next;\n            }\n            curvox.z += step.z;\n            if (ry->maxdist < tmax.z || curvox.z == out.z)\n                break;\n            voxindex += step.z * g->xsize * g->ysize;\n            tmax.z += tdelta.z;\n            curpos = nZp;\n            nZp.x += pdeltaZ.x;\n            nZp.y += pdeltaZ.y;\n            nZp.z += pdeltaZ.z;\n        }\n        else {\n            cur = g->cells[voxindex];\n            while (cur != nullptr) {\n                if (ry->mbox[cur->obj->id] != ry->serial) {\n                    ry->mbox[cur->obj->id] = ry->serial;\n                    cur->obj->methods->intersect(cur->obj, ry);\n                }\n                cur = cur->next;\n            }\n            curvox.y += step.y;\n            if (ry->maxdist < tmax.y || curvox.y == out.y)\n                break;\n            voxindex += step.y * g->xsize;\n            tmax.y += tdelta.y;\n            curpos = nYp;\n            nYp.x += pdeltaY.x;\n            nYp.y += pdeltaY.y;\n            nYp.z += pdeltaY.z;\n        }\n\n        if (ry->flags & RT_RAY_FINISHED)\n            break;\n    }\n}\n\nstatic void voxel_intersect(grid *g, ray *ry, int voxindex) {\n    objectlist *cur;\n\n    cur = g->cells[voxindex];\n    while (cur != nullptr) {\n        cur->obj->methods->intersect(cur->obj, ry);\n        cur = cur->next;\n    }\n}\n\nstatic int grid_bounds_intersect(grid *g, ray *ry, flt *nr, flt *fr) {\n    flt a, tx1, tx2, ty1, ty2, tz1, tz2;\n    flt tnear, tfar;\n\n    tnear = -FHUGE;\n    tfar = FHUGE;\n\n    if (ry->d.x == 0.0) {\n        if ((ry->o.x < g->min.x) || (ry->o.x > g->max.x))\n            return 0;\n    }\n    else {\n        tx1 = (g->min.x - ry->o.x) / ry->d.x;\n        tx2 = (g->max.x - ry->o.x) / ry->d.x;\n        if (tx1 > tx2) {\n            a = tx1;\n            tx1 = tx2;\n            tx2 = a;\n        }\n        if (tx1 > tnear)\n            tnear = tx1;\n        if (tx2 < tfar)\n            tfar = tx2;\n    }\n    if (tnear > tfar)\n        return 0;\n    if (tfar < 0.0)\n        return 0;\n\n    if (ry->d.y == 0.0) {\n        if ((ry->o.y < g->min.y) || (ry->o.y > g->max.y))\n            return 0;\n    }\n    else {\n        ty1 = (g->min.y - ry->o.y) / ry->d.y;\n        ty2 = (g->max.y - ry->o.y) / ry->d.y;\n        if (ty1 > ty2) {\n            a = ty1;\n            ty1 = ty2;\n            ty2 = a;\n        }\n        if (ty1 > tnear)\n            tnear = ty1;\n        if (ty2 < tfar)\n            tfar = ty2;\n    }\n    if (tnear > tfar)\n        return 0;\n    if (tfar < 0.0)\n        return 0;\n\n    if (ry->d.z == 0.0) {\n        if ((ry->o.z < g->min.z) || (ry->o.z > g->max.z))\n            return 0;\n    }\n    else {\n        tz1 = (g->min.z - ry->o.z) / ry->d.z;\n        tz2 = (g->max.z - ry->o.z) / ry->d.z;\n        if (tz1 > tz2) {\n            a = tz1;\n            tz1 = tz2;\n            tz2 = a;\n        }\n        if (tz1 > tnear)\n            tnear = tz1;\n        if (tz2 < tfar)\n            tfar = tz2;\n    }\n    if (tnear > tfar)\n        return 0;\n    if (tfar < 0.0)\n        return 0;\n\n    *nr = tnear;\n    *fr = tfar;\n    return 1;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/grid.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * grid.h - spatial subdivision efficiency structures\n *\n * $Id: grid.h,v 1.2 2007-02-22 17:54:15 Exp $\n * \n */\n\nint engrid_scene(object **list);\nobject *newgrid(int xsize, int ysize, int zsize, vector min, vector max);\n\n#ifdef GRID_PRIVATE\n\ntypedef struct objectlist {\n    struct objectlist *next; /* next link in the list */\n    object *obj; /* the actual object */\n} objectlist;\n\ntypedef struct {\n    unsigned int id; /* Unique Object serial number */\n    void *nextobj; /* pointer to next object in list */\n    object_methods *methods; /* this object's methods */\n    texture *tex; /* object texture */\n    int xsize; /* number of cells along the X direction */\n    int ysize; /* number of cells along the Y direction */\n    int zsize; /* number of cells along the Z direction */\n    vector min; /* the minimum coords for the box containing the grid */\n    vector max; /* the maximum coords for the box containing the grid */\n    vector voxsize; /* the size of a grid cell/voxel */\n    object *objects; /* all objects contained in the grid */\n    objectlist **cells; /* the grid cells themselves */\n} grid;\n\ntypedef struct {\n    int x; /* Voxel X address */\n    int y; /* Voxel Y address */\n    int z; /* Voxel Z address */\n} gridindex;\n\n/*\n * Convert from voxel number along X/Y/Z to corresponding coordinate.\n */\n#define voxel2x(g, X) ((X) * (g->voxsize.x) + (g->min.x))\n#define voxel2y(g, Y) ((Y) * (g->voxsize.y) + (g->min.y))\n#define voxel2z(g, Z) ((Z) * (g->voxsize.z) + (g->min.z))\n\n/*\n * And vice-versa.\n */\n#define x2voxel(g, x) (((x)-g->min.x) / g->voxsize.x)\n#define y2voxel(g, y) (((y)-g->min.y) / g->voxsize.y)\n#define z2voxel(g, z) (((z)-g->min.z) / g->voxsize.z)\n\nstatic int grid_bbox(void *obj, vector *min, vector *max);\nstatic void grid_free(void *v);\n\nstatic int cellbound(grid *g, gridindex *index, vector *cmin, vector *cmax);\n\nvoid engrid_objlist(grid *g, object **list);\nstatic int engrid_object(grid *g, object *obj);\n\nstatic int engrid_objectlist(grid *g, objectlist **list);\nstatic int engrid_cell(grid *, gridindex *);\n\nstatic int pos2grid(grid *g, vector *pos, gridindex *index);\nstatic void grid_intersect(grid *, ray *);\nstatic void voxel_intersect(grid *g, ray *ry, int voxaddr);\nstatic int grid_bounds_intersect(grid *g, ray *ry, flt *near, flt *far);\n\n#endif\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/imageio.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n *  imageio.cpp - This file deals with reading/writing image files\n */\n\n/* For our purposes, we're interested only in the 3 byte per pixel 24 bit\n * truecolor sort of file..\n */\n\n#include <cstdio>\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"util.hpp\"\n#include \"imageio.hpp\"\n#include \"ppm.hpp\" /* PPM files */\n#include \"tgafile.hpp\" /* Truevision Targa files */\n\nstatic int fakeimage(char *name, int *xres, int *yres, unsigned char **imgdata) {\n    int i, imgsize;\n\n    fprintf(stderr, \"Error loading image %s.  Faking it.\\n\", name);\n\n    *xres = 2;\n    *yres = 2;\n    imgsize = 3 * (*xres) * (*yres);\n    *imgdata = (unsigned char *)rt_getmem(imgsize);\n    for (i = 0; i < imgsize; i++) {\n        (*imgdata)[i] = 255;\n    }\n\n    return IMAGENOERR;\n}\n\nint readimage(rawimage *img) {\n    int rc;\n    int xres, yres;\n    unsigned char *imgdata = nullptr;\n    char *name = img->name;\n\n    if (strstr(name, \".ppm\")) {\n        rc = readppm(name, &xres, &yres, &imgdata);\n    }\n    else if (strstr(name, \".tga\")) {\n        rc = readtga(name, &xres, &yres, &imgdata);\n    }\n    else if (strstr(name, \".jpg\")) {\n        rc = IMAGEUNSUP;\n    }\n    else if (strstr(name, \".gif\")) {\n        rc = IMAGEUNSUP;\n    }\n    else if (strstr(name, \".png\")) {\n        rc = IMAGEUNSUP;\n    }\n    else if (strstr(name, \".tiff\")) {\n        rc = IMAGEUNSUP;\n    }\n    else if (strstr(name, \".rgb\")) {\n        rc = IMAGEUNSUP;\n    }\n    else if (strstr(name, \".xpm\")) {\n        rc = IMAGEUNSUP;\n    }\n    else {\n        rc = readppm(name, &xres, &yres, &imgdata);\n    }\n\n    switch (rc) {\n        case IMAGEREADERR:\n            fprintf(stderr, \"Short read encountered while loading image %s\\n\", name);\n            rc = IMAGENOERR; /* remap to non-fatal error */\n            break;\n\n        case IMAGEUNSUP:\n            fprintf(stderr, \"Cannot read unsupported image format for image %s\\n\", name);\n            break;\n    }\n\n    /* If the image load failed, create a tiny white colored image to fake it */\n    /* this allows a scene to render even when a file can't be loaded */\n    if (rc != IMAGENOERR) {\n        rc = fakeimage(name, &xres, &yres, &imgdata);\n    }\n\n    /* If we succeeded in loading the image, return it. */\n    if (rc == IMAGENOERR) {\n        img->xres = xres;\n        img->yres = yres;\n        img->bpp = 3;\n        img->data = imgdata;\n    }\n\n    return rc;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/imageio.hpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n *  imageio.h - This file deals with reading/writing image files \n *\n *  $Id: imageio.h,v 1.2 2007-02-22 17:54:15 Exp $\n */\n\n/* For our purposes, we're interested only in the 3 byte per pixel 24 bit\n   truecolor sort of file.. */\n\n#define IMAGENOERR    0 /* no error */\n#define IMAGEBADFILE  1 /* can't find or can't open the file */\n#define IMAGEUNSUP    2 /* the image file is an unsupported format */\n#define IMAGEALLOCERR 3 /* not enough remaining memory to load this image */\n#define IMAGEREADERR  4 /* failed read, short reads etc */\n\nint readimage(rawimage *);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/imap.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * imap.cpp - This file contains code for doing image map type things.  \n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"imap.hpp\"\n#include \"util.hpp\"\n#include \"imageio.hpp\"\n\nrawimage *imagelist[MAXIMGS];\nint numimages;\n\nvoid ResetImages(void) {\n    int i;\n    numimages = 0;\n    for (i = 0; i < MAXIMGS; i++) {\n        imagelist[i] = nullptr;\n    }\n}\n\nvoid LoadImage(rawimage *image) {\n    if (!image->loaded) {\n        readimage(image);\n        image->loaded = 1;\n    }\n}\n\ncolor ImageMap(rawimage *image, flt u, flt v) {\n    color col, colx, colx2;\n    flt x, y, px, py;\n    int x1, x2, y1, y2;\n    unsigned char *ptr;\n    unsigned char *ptr2;\n\n    if (!image->loaded) {\n        LoadImage(image);\n        image->loaded = 1;\n    }\n\n    if ((u <= 1.0) && (u >= 0.0) && (v <= 1.0) && (v >= 0.0)) {\n        x = (image->xres - 1.0) * u; /* floating point X location */\n        y = (image->yres - 1.0) * v; /* floating point Y location */\n\n        px = x - ((int)x);\n        py = y - ((int)y);\n\n        x1 = (int)x;\n        x2 = x1 + 1;\n\n        y1 = (int)y;\n        y2 = y1 + 1;\n\n        ptr = image->data + ((image->xres * y1) + x1) * 3;\n        ptr2 = image->data + ((image->xres * y1) + x2) * 3;\n\n        colx.r = (flt)((flt)ptr[0] + px * ((flt)ptr2[0] - (flt)ptr[0])) / 255.0;\n        colx.g = (flt)((flt)ptr[1] + px * ((flt)ptr2[1] - (flt)ptr[1])) / 255.0;\n        colx.b = (flt)((flt)ptr[2] + px * ((flt)ptr2[2] - (flt)ptr[2])) / 255.0;\n\n        ptr = image->data + ((image->xres * y2) + x1) * 3;\n        ptr2 = image->data + ((image->xres * y2) + x2) * 3;\n\n        colx2.r = ((flt)ptr[0] + px * ((flt)ptr2[0] - (flt)ptr[0])) / 255.0;\n        colx2.g = ((flt)ptr[1] + px * ((flt)ptr2[1] - (flt)ptr[1])) / 255.0;\n        colx2.b = ((flt)ptr[2] + px * ((flt)ptr2[2] - (flt)ptr[2])) / 255.0;\n\n        col.r = colx.r + py * (colx2.r - colx.r);\n        col.g = colx.g + py * (colx2.g - colx.g);\n        col.b = colx.b + py * (colx2.b - colx.b);\n    }\n    else {\n        col.r = 0.0;\n        col.g = 0.0;\n        col.b = 0.0;\n    }\n    return col;\n}\n\nrawimage *AllocateImage(char *filename) {\n    rawimage *newimage = nullptr;\n    int i, intable;\n    std::size_t len;\n\n    intable = 0;\n    if (numimages != 0) {\n        for (i = 0; i < numimages; i++) {\n            if (!strcmp(filename, imagelist[i]->name)) {\n                newimage = imagelist[i];\n                intable = 1;\n            }\n        }\n    }\n\n    if (!intable) {\n        newimage = (rawimage *)rt_getmem(sizeof(rawimage));\n        newimage->loaded = 0;\n        newimage->xres = 0;\n        newimage->yres = 0;\n        newimage->bpp = 0;\n        newimage->data = nullptr;\n        len = strlen(filename);\n        if (len > 80)\n            rtbomb(\"Filename too long in image map!!\");\n        strcpy(newimage->name, filename);\n\n        imagelist[numimages] = newimage; /* add new one to the table */\n        numimages++; /* increment the number of images */\n    }\n\n    return newimage;\n}\n\nvoid DeallocateImage(rawimage *image) {\n    image->loaded = 0;\n    rt_freemem(image->data);\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/imap.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * imap.h - This file contains defines etc for doing image map type things.  \n *\n *  $Id: imap.h,v 1.2 2007-02-22 17:54:15 Exp $\n */\n\nvoid ResetImage(void);\nvoid LoadImage(rawimage *);\ncolor ImageMap(rawimage *, flt, flt);\nrawimage *AllocateImage(char *);\nvoid DeallocateImage(rawimage *);\nvoid ResetImages(void);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/intersect.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * intersect.cpp - This file contains code for CSG and intersection routines.\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"intersect.hpp\"\n#include \"light.hpp\"\n#include \"util.hpp\"\n#include \"global.hpp\"\n\nunsigned int new_objectid(void) {\n    return numobjects++; /* global used to generate unique object ID's */\n}\n\nunsigned int max_objectid(void) {\n    return numobjects;\n}\n\nvoid add_object(object *obj) {\n    object *objtemp;\n\n    if (obj == nullptr)\n        return;\n\n    obj->id = new_objectid();\n\n    objtemp = rootobj;\n    rootobj = obj;\n    obj->nextobj = objtemp;\n}\n\nvoid free_objects(object *start) {\n    object *cur;\n    object *cur2;\n\n    cur = start;\n    while (cur->nextobj != nullptr) {\n        cur2 = (object *)cur->nextobj;\n        cur->methods->free(cur);\n        cur = cur2;\n    }\n    free(cur);\n}\n\nvoid reset_object(void) {\n    if (rootobj != nullptr)\n        free_objects(rootobj);\n\n    rootobj = nullptr;\n    numobjects = 0; /* set number of objects back to 0 */\n}\n\nvoid intersect_objects(ray *intray) {\n    object *cur;\n    object temp;\n\n    temp.nextobj = rootobj; /* setup the initial object pointers.. */\n    cur = &temp; /* ready, set                          */\n\n    while ((cur = (object *)cur->nextobj) != nullptr)\n        cur->methods->intersect(cur, intray);\n}\n\nvoid reset_intersection(intersectstruct *intstruct) {\n    intstruct->num = 0;\n    intstruct->list[0].t = FHUGE;\n    intstruct->list[0].obj = nullptr;\n    intstruct->list[1].t = FHUGE;\n    intstruct->list[1].obj = nullptr;\n}\n\nvoid add_intersection(flt t, object *obj, ray *ry) {\n    intersectstruct *intstruct = ry->intstruct;\n\n    if (t > EPSILON) {\n        /* if we hit something before maxdist update maxdist */\n        if (t < ry->maxdist) {\n            ry->maxdist = t;\n\n            /* if we hit *anything* before maxdist, and we're firing a */\n            /* shadow ray, then we are finished ray tracing the shadow */\n            if (ry->flags & RT_RAY_SHADOW)\n                ry->flags |= RT_RAY_FINISHED;\n        }\n\n        intstruct->num++;\n        intstruct->list[intstruct->num].obj = obj;\n        intstruct->list[intstruct->num].t = t;\n    }\n}\n\nint closest_intersection(flt *t, object **obj, intersectstruct *intstruct) {\n    int i;\n    *t = FHUGE;\n\n    for (i = 1; i <= intstruct->num; i++) {\n        if (intstruct->list[i].t < *t) {\n            *t = intstruct->list[i].t;\n            *obj = intstruct->list[i].obj;\n        }\n    }\n\n    return intstruct->num;\n}\n\nint shadow_intersection(intersectstruct *intstruct, flt maxdist) {\n    int i;\n\n    if (intstruct->num > 0) {\n        for (i = 1; i <= intstruct->num; i++) {\n            if ((intstruct->list[i].t < maxdist) &&\n                (intstruct->list[i].obj->tex->shadowcast == 1)) {\n                return 1;\n            }\n        }\n    }\n\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/intersect.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * intersect.h - This file contains the declarations and defines for the\n *               functions that manage intersection, bounding and CSG..\n *\n *  $Id: intersect.h,v 1.2 2007-02-22 17:54:15 Exp $\n */\n\nunsigned int new_objectid(void);\nunsigned int max_objectid(void);\nvoid add_object(object *);\nvoid reset_object(void);\nvoid free_objects(object *);\nvoid intersect_objects(ray *);\nvoid reset_intersection(intersectstruct *);\nvoid add_intersection(flt, object *, ray *);\nint closest_intersection(flt *, object **, intersectstruct *);\nint next_intersection(object **, object *, intersectstruct *);\nint shadow_intersection(intersectstruct *intstruct, flt maxdist);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/jpeg.cpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n *  jpeg.cpp - This file deals with JPEG format image files (reading/writing)\n */\n\n/*\n * This code requires support from the Independent JPEG Group's libjpeg.\n * For our purposes, we're interested only in the 3 byte per pixel 24 bit\n * RGB output.  Probably won't implement any decent checking at this point.\n */\n\n#include <cstdio>\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"util.hpp\"\n#include \"imageio.hpp\" /* error codes etc */\n#include \"jpeg.hpp\" /* the protos for this file */\n\n#if !defined(USEJPEG)\n\nint readjpeg(char *name, int *xres, int *yres, unsigned char **imgdata) {\n    return IMAGEUNSUP;\n}\n\n#else\n\n#include \"jpeglib.hpp\" /* the IJG jpeg library headers */\n\nint readjpeg(char *name, int *xres, int *yres, unsigned char **imgdata) {\n    FILE *ifp;\n    struct jpeg_decompress_struct cinfo; /* JPEG decompression struct */\n    struct jpeg_error_mgr jerr; /* JPEG Error handler */\n    JSAMPROW row_pointer[1]; /* output row buffer */\n    int row_stride; /* physical row width in output buf */\n\n    /* open input file before doing any JPEG decompression setup */\n    if ((ifp = fopen(name, \"rb\")) == nullptr)\n        return IMAGEBADFILE; /* Could not open image, return error */\n\n    /*\n   * Note: The Independent JPEG Group's library does not have a way\n   *       of returning errors without the use of setjmp/longjmp.\n   *       This is a problem in multi-threaded environment, since setjmp\n   *       and longjmp are declared thread-unsafe by many vendors currently.\n   *       For now, JPEG decompression errors will result in the \"default\"\n   *       error handling provided by the JPEG library, which is an error\n   *       message and a fatal call to exit().  I'll have to work around this\n   *       or find a reasonably thread-safe way of doing setjmp/longjmp..\n   */\n\n    cinfo.err = jpeg_std_error(&jerr); /* Set JPEG error handler to default */\n\n    jpeg_create_decompress(&cinfo); /* Create decompression context */\n    jpeg_stdio_src(&cinfo, ifp); /* Set input mechanism to stdio type */\n    jpeg_read_header(&cinfo, TRUE); /* Read the JPEG header for info */\n    jpeg_start_decompress(&cinfo); /* Prepare for actual decompression */\n\n    *xres = cinfo.output_width; /* set returned image width */\n    *yres = cinfo.output_height; /* set returned image height */\n\n    /* Calculate the size of a row in the image */\n    row_stride = cinfo.output_width * cinfo.output_components;\n\n    /* Allocate the image buffer which will be returned to the ray tracer */\n    *imgdata = (unsigned char *)malloc(row_stride * cinfo.output_height);\n\n    /* decompress the JPEG, one scanline at a time into the buffer */\n    while (cinfo.output_scanline < cinfo.output_height) {\n        row_pointer[0] = &((*imgdata)[(cinfo.output_scanline) * row_stride]);\n        jpeg_read_scanlines(&cinfo, row_pointer, 1);\n    }\n\n    jpeg_finish_decompress(&cinfo); /* Tell the JPEG library to cleanup */\n    jpeg_destroy_decompress(&cinfo); /* Destroy JPEG decompression context */\n\n    fclose(ifp); /* Close the input file */\n\n    return IMAGENOERR; /* No fatal errors */\n}\n\n#endif\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/jpeg.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n *  jpeg.h - This file deals with JPEG format image files (reading/writing)\n *\n *  $Id: jpeg.h,v 1.2 2007-02-22 17:54:15 Exp $\n */\n\nint readjpeg(char *name, int *xres, int *yres, unsigned char **imgdata);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/light.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * light.cpp - This file contains declarations and defines for light sources.\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n#include \"intersect.hpp\"\n#include \"util.hpp\"\n\n#define LIGHT_PRIVATE\n#include \"light.hpp\"\n\nstatic object_methods light_methods = { (void (*)(void *, void *))(light_intersect),\n                                        (void (*)(void *, void *, void *, void *))(light_normal),\n                                        light_bbox,\n                                        free };\n\npoint_light *newlight(void *tex, vector ctr, flt rad) {\n    point_light *l;\n\n    l = (point_light *)rt_getmem(sizeof(point_light));\n    memset(l, 0, sizeof(point_light));\n    l->methods = &light_methods;\n\n    l->tex = (texture *)tex;\n    l->ctr = ctr;\n    l->rad = rad;\n\n    return l;\n}\n\nstatic int light_bbox(void *obj, vector *min, vector *max) {\n    return 0; /* lights are unbounded currently */\n}\n\nstatic void light_intersect(point_light *l, ray *ry) {\n    flt b, disc, t1, t2, temp;\n    vector V;\n\n    /* Lights do not cast shadows.. */\n    if (ry->flags & RT_RAY_SHADOW)\n        return;\n\n    VSUB(l->ctr, ry->o, V);\n    VDOT(b, V, ry->d);\n    VDOT(temp, V, V);\n\n    disc = b * b + l->rad * l->rad - temp;\n\n    if (disc <= 0.0)\n        return;\n    disc = sqrt(disc);\n\n    t2 = b + disc;\n    if (t2 <= SPEPSILON)\n        return;\n    add_intersection(t2, (object *)l, ry);\n\n    t1 = b - disc;\n    if (t1 > SPEPSILON)\n        add_intersection(t1, (object *)l, ry);\n}\n\nstatic void light_normal(point_light *l, vector *pnt, ray *incident, vector *N) {\n    VSub((vector *)pnt, &(l->ctr), N);\n\n    VNorm(N);\n\n    if (VDot(N, &(incident->d)) > 0.0) {\n        N->x = -N->x;\n        N->y = -N->y;\n        N->z = -N->z;\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/light.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * light.h - this file includes declarations and defines for light sources.\n *\n *  $Id: light.h,v 1.2 2007-02-22 17:54:15 Exp $\n */\n\ntypedef struct {\n    unsigned int id; /* Unique Object serial number */\n    void *nextobj; /* pointer to next object in list */\n    object_methods *methods; /* this object's methods */\n    texture *tex; /* object texture */\n    vector ctr;\n    flt rad;\n} point_light;\n\npoint_light *newlight(void *, vector, flt);\n\n#ifdef LIGHT_PRIVATE\nstatic int light_bbox(void *obj, vector *min, vector *max);\nstatic void light_intersect(point_light *, ray *);\nstatic void light_normal(point_light *, vector *, ray *, vector *);\n#endif\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/machine.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * machine.h - This is the machine specific include file\n *\n *  $Id: machine.h,v 1.2 2007-02-22 17:54:15 Exp $\n */\n\n#include <cstdio>\n#include <cstdlib>\n#include <cstring>\n#include <cmath>\n\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <fcntl.h>\n\n#define STDTIME\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/macros.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * macros.h - This file contains macro versions of functions that would be best \n * used as inlined code rather than function calls.\n *\n *  $Id: macros.h,v 1.2 2007-02-22 17:54:15 Exp $\n */\n\n#define MYMAX(a, b) ((a) > (b) ? (a) : (b))\n#define MYMIN(a, b) ((a) < (b) ? (a) : (b))\n\n#define VDOT(return, a, b) return = (a.x * b.x + a.y * b.y + a.z * b.z);\n\n#define RAYPNT(c, a, b)        \\\n    c.x = a.o.x + (a.d.x * b); \\\n    c.y = a.o.y + (a.d.y * b); \\\n    c.z = a.o.z + (a.d.z * b);\n\n#define VSUB(a, b, c)  \\\n    c.x = (a.x - b.x); \\\n    c.y = (a.y - b.y); \\\n    c.z = (a.z - b.z);\n\n#define VCROSS(a, b, c)                   \\\n    c->x = (a->y * b->z) - (a->z * b->y); \\\n    c->y = (a->z * b->x) - (a->x * b->z); \\\n    c->z = (a->x * b->y) - (a->y * b->x);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/main.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n#include <cstdio>\n#include <cstdlib>\n#include <cstring>\n\n#define VIDEO_WINMAIN_ARGS\n#include \"types.hpp\"\n#include \"api.hpp\" /* The ray tracing library API */\n#include \"parse.hpp\" /* Support for my own file format */\n#include \"ui.hpp\"\n#include \"util.hpp\"\n#include \"tachyon_video.hpp\"\n#include \"common/utility/utility.hpp\"\n\n#if WIN8UI_EXAMPLE\n#include \"oneapi/tbb.h\"\nvolatile long global_startTime = 0;\nvolatile long global_elapsedTime = 0;\nvolatile bool global_isCancelled = false;\nvolatile int global_number_of_threads;\n#endif\n\nSceneHandle global_scene;\nint global_xsize; /* size of graphic image rendered in window (from hres, vres) */\nint global_ysize;\nint global_xwinsize; /* size of window (may be larger than above) */\nint global_ywinsize;\nchar *global_window_title;\nbool global_usegraphics;\n\nbool silent_mode = false; /* silent mode */\n\nclass tachyon_video *video = nullptr;\n\ntypedef struct {\n    int foundfilename; /* was a model file name found in the args? */\n    char filename[1024]; /* model file to render */\n    int useoutfilename; /* command line override of output filename */\n    char outfilename[1024]; /* name of output image file */\n    int verbosemode; /* verbose flags */\n    int antialiasing; /* antialiasing setting */\n    int displaymode; /* display mode */\n    int boundmode; /* bounding mode */\n    int boundthresh; /* bounding threshold */\n    int usecamfile; /* use camera file */\n    char camfilename[1024]; /* camera filename */\n} argoptions;\n\nvoid initoptions(argoptions *opt) {\n    memset(opt, 0, sizeof(argoptions));\n    opt->foundfilename = -1;\n    opt->useoutfilename = -1;\n    opt->verbosemode = -1;\n    opt->antialiasing = -1;\n    opt->displaymode = -1;\n    opt->boundmode = -1;\n    opt->boundthresh = -1;\n    opt->usecamfile = -1;\n}\n\n#if WIN8UI_EXAMPLE\nint CreateScene() {\n    char *filename = \"Assets/balls.dat\";\n\n    global_scene = rt_newscene();\n    rt_initialize();\n\n    if (readmodel(filename, global_scene) != 0) {\n        rt_finalize();\n        return -1;\n    }\n\n    // need these early for create_graphics_window() so grab these here...\n    scenedef *scene = (scenedef *)global_scene;\n\n    // scene->hres and scene->vres should be equal to screen resolution\n    scene->hres = global_xwinsize = global_xsize;\n    scene->vres = global_ywinsize = global_ysize;\n\n    return 0;\n}\n\nunsigned int __stdcall example_main(void *) {\n    if (CreateScene() != 0)\n        std::exit(-1);\n\n    tachyon_video tachyon;\n    tachyon.threaded = true;\n    tachyon.init_console();\n\n    // always using window even if(!global_usegraphics)\n    global_usegraphics = tachyon.init_window(global_xwinsize, global_ywinsize);\n    if (!tachyon.running)\n        std::exit(-1);\n\n    video = &tachyon;\n\n    for (;;) {\n        global_elapsedTime = 0;\n        global_startTime = (long)time(nullptr);\n        global_isCancelled = false;\n        if (video)\n            video->running = true;\n        oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism,\n                                      global_number_of_threads);\n        memset(g_pImg, 0, sizeof(unsigned int) * global_xsize * global_ysize);\n        tachyon.main_loop();\n        global_elapsedTime = (long)(time(nullptr) - global_startTime);\n        video->running = false;\n        //The timer to restart drawing then it is complete.\n        int timer = 50;\n        while ((!global_isCancelled && (timer--) > 0)) {\n            rt_sleep(100);\n        }\n    }\n    return nullptr;\n}\n\n#elif __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__\n\n#include \"oneapi/tbb.h\"\n#include \"CoreFoundation/CoreFoundation.hpp\"\nextern \"C\" void get_screen_resolution(int *x, int *y);\n\nint CreateScene() {\n    CFURLRef balls_dat_url =\n        CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR(\"balls\"), CFSTR(\"dat\"), nullptr);\n    char filename[1024];\n    CFURLGetFileSystemRepresentation(\n        balls_dat_url, true, (UInt8 *)filename, (CFIndex)sizeof(filename));\n    CFRelease(balls_dat_url);\n\n    global_scene = rt_newscene();\n    rt_initialize();\n\n    if (readmodel(filename, global_scene) != 0) {\n        rt_finalize();\n        return -1;\n    }\n\n    // need these early for create_graphics_window() so grab these here...\n    scenedef *scene = (scenedef *)global_scene;\n\n    get_screen_resolution(&global_xsize, &global_ysize);\n\n    // scene->hres and scene->vres should be equal to screen resolution\n    scene->hres = global_xwinsize = global_xsize;\n    scene->vres = global_ywinsize = global_ysize;\n    return 0;\n}\n\nint main(int argc, char *argv[]) {\n    if (CreateScene() != 0)\n        return -1;\n\n    tachyon_video tachyon;\n    tachyon.threaded = true;\n    tachyon.init_console();\n\n    global_usegraphics = tachyon.init_window(global_xwinsize, global_ywinsize);\n    if (!tachyon.running)\n        return -1;\n\n    //TODO: add a demo loop.\n    video = &tachyon;\n    if (video)\n        video->running = true;\n    memset(g_pImg, 0, sizeof(unsigned int) * global_xsize * global_ysize);\n    tachyon.main_loop();\n    video->running = false;\n    return 0;\n}\n\n#else\n\nstatic char *window_title_string(int argc, const char *argv[]) {\n    int i;\n    char *name;\n\n    name = (char *)malloc(8192);\n    char *title = getenv(\"TITLE\");\n    if (title)\n        strcpy(name, title);\n    else {\n        if (strrchr(argv[0], '\\\\'))\n            strcpy(name, strrchr(argv[0], '\\\\') + 1);\n        else if (strrchr(argv[0], '/'))\n            strcpy(name, strrchr(argv[0], '/') + 1);\n        else\n            strcpy(name, *argv[0] ? argv[0] : \"Tachyon\");\n    }\n    for (i = 1; i < argc; i++) {\n        strcat(name, \" \");\n        strcat(name, argv[i]);\n    }\n#ifdef _DEBUG\n    strcat(name, \" (DEBUG BUILD)\");\n#endif\n    return name;\n}\n\nint useoptions(argoptions *opt, SceneHandle scene) {\n    if (opt->useoutfilename == 1) {\n        rt_outputfile(scene, opt->outfilename);\n    }\n\n    if (opt->verbosemode == 1) {\n        rt_verbose(scene, 1);\n    }\n\n    if (opt->antialiasing != -1) {\n        /* need new api code for this */\n    }\n\n    if (opt->displaymode != -1) {\n        rt_displaymode(scene, opt->displaymode);\n    }\n\n    if (opt->boundmode != -1) {\n        rt_boundmode(scene, opt->boundmode);\n    }\n\n    if (opt->boundthresh != -1) {\n        rt_boundthresh(scene, opt->boundthresh);\n    }\n\n    return 0;\n}\n\nargoptions ParseCommandLine(int argc, const char *argv[]) {\n    argoptions opt;\n\n    initoptions(&opt);\n\n    bool nobounding = false;\n    bool nodisp = false;\n\n    std::string filename;\n\n    utility::parse_cli_arguments(\n        argc,\n        argv,\n        utility::cli_argument_pack()\n            .positional_arg(filename, \"dataset\", \"Model file\")\n            .positional_arg(opt.boundthresh, \"boundthresh\", \"bounding threshold value\")\n            .arg(nodisp, \"no-display-updating\", \"disable run-time display updating\")\n            .arg(nobounding, \"no-bounding\", \"disable bounding technique\")\n            .arg(silent_mode, \"silent\", \"no output except elapsed time\"));\n\n    strcpy(opt.filename, filename.c_str());\n\n    opt.displaymode = nodisp ? RT_DISPLAY_DISABLED : RT_DISPLAY_ENABLED;\n    opt.boundmode = nobounding ? RT_BOUNDING_DISABLED : RT_BOUNDING_ENABLED;\n\n    return opt;\n}\n\nint CreateScene(argoptions &opt) {\n    char *filename;\n\n    global_scene = rt_newscene();\n    rt_initialize();\n\n    /* process command line overrides */\n    useoptions(&opt, global_scene);\n\n#ifdef DEFAULT_MODELFILE\n#if _WIN32 || _WIN64\n#define _GLUE_FILENAME(x) \"..\\\\dat\\\\\" #x\n#else\n#define _GLUE_FILENAME(x) #x\n#endif\n#define GLUE_FILENAME(x) _GLUE_FILENAME(x)\n    if (opt.foundfilename == -1)\n        filename = GLUE_FILENAME(DEFAULT_MODELFILE);\n    else\n#endif //DEFAULT_MODELFILE\n        filename = opt.filename;\n\n    if (readmodel(filename, global_scene) != 0) {\n        fprintf(stderr, \"Parser returned a non-zero error code reading %s\\n\", filename);\n        fprintf(stderr, \"Aborting Render...\\n\");\n        rt_finalize();\n        return -1;\n    }\n\n    // need these early for create_graphics_window() so grab these here...\n    scenedef *scene = (scenedef *)global_scene;\n    global_xsize = scene->hres;\n    global_ysize = scene->vres;\n    global_xwinsize = global_xsize;\n    global_ywinsize =\n        global_ysize; // add some here to leave extra blank space on bottom for status etc.\n\n    return 0;\n}\n\nint main(int argc, char *argv[]) {\n    timer mainStartTime = gettimer();\n\n    global_window_title = window_title_string(argc, (const char **)argv);\n\n    argoptions opt = ParseCommandLine(argc, (const char **)argv);\n\n    if (CreateScene(opt) != 0)\n        return -1;\n\n    tachyon_video tachyon;\n    tachyon.threaded = true;\n    tachyon.init_console();\n\n    tachyon.title = global_window_title;\n    // always using window even if(!global_usegraphics)\n    global_usegraphics = tachyon.init_window(global_xwinsize, global_ywinsize);\n    if (!tachyon.running)\n        return -1;\n\n    video = &tachyon;\n    tachyon.main_loop();\n\n    utility::report_elapsed_time(timertime(mainStartTime, gettimer()));\n    return 0;\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/objbound.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * objbound.cpp - This file contains the functions to find bounding boxes\n *              for the various primitives\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"bndbox.hpp\"\n\n#define OBJBOUND_PRIVATE\n#include \"objbound.hpp\"\n\nstatic void globalbound(object **rootlist, vector *gmin, vector *gmax) {\n    vector min, max;\n    object *cur;\n\n    if (*rootlist == nullptr) /* don't bound non-existent objects */\n        return;\n\n    gmin->x = FHUGE;\n    gmin->y = FHUGE;\n    gmin->z = FHUGE;\n    gmax->x = -FHUGE;\n    gmax->y = -FHUGE;\n    gmax->z = -FHUGE;\n\n    cur = *rootlist;\n    while (cur != nullptr) { /* Go! */\n        min.x = -FHUGE;\n        min.y = -FHUGE;\n        min.z = -FHUGE;\n        max.x = FHUGE;\n        max.y = FHUGE;\n        max.z = FHUGE;\n\n        cur->methods->bbox((void *)cur, &min, &max);\n\n        gmin->x = MYMIN(gmin->x, min.x);\n        gmin->y = MYMIN(gmin->y, min.y);\n        gmin->z = MYMIN(gmin->z, min.z);\n\n        gmax->x = MYMAX(gmax->x, max.x);\n        gmax->y = MYMAX(gmax->y, max.y);\n        gmax->z = MYMAX(gmax->z, max.z);\n\n        cur = (object *)cur->nextobj;\n    }\n}\n\nstatic int objinside(object *obj, vector *min, vector *max) {\n    vector omin, omax;\n\n    if (obj == nullptr) /* non-existent object, shouldn't get here */\n        return 0;\n\n    if (obj->methods->bbox((void *)obj, &omin, &omax)) {\n        if ((min->x <= omin.x) && (min->y <= omin.y) && (min->z <= omin.z) && (max->x >= omax.x) &&\n            (max->y >= omax.y) && (max->z >= omax.z)) {\n            return 1;\n        }\n    }\n    return 0;\n}\n\nstatic int countobj(object *root) {\n    object *cur; /* counts the number of objects on a list */\n    int numobj;\n\n    numobj = 0;\n    cur = root;\n\n    while (cur != nullptr) {\n        cur = (object *)cur->nextobj;\n        numobj++;\n    }\n    return numobj;\n}\n\nstatic void movenextobj(object *thisobj, object **root) {\n    object *cur, *tmp;\n\n    /* move the object after thisobj to the front of the object list  */\n    /* headed by root */\n    if (thisobj != nullptr) {\n        if (thisobj->nextobj != nullptr) {\n            cur = (object *)thisobj->nextobj; /* the object to be moved */\n            thisobj->nextobj = cur->nextobj; /* link around the moved obj */\n            tmp = *root; /* store the root node */\n            cur->nextobj = tmp; /* attach root to cur */\n            *root = cur; /* make cur, the new root */\n        }\n    }\n}\n\nstatic void octreespace(object **rootlist, int maxoctnodes) {\n    object *cur;\n    vector gmin, gmax, gctr;\n    vector cmin1, cmin2, cmin3, cmin4, cmin5, cmin6, cmin7, cmin8;\n    vector cmax1, cmax2, cmax3, cmax4, cmax5, cmax6, cmax7, cmax8;\n    bndbox *box1, *box2, *box3, *box4;\n    bndbox *box5, *box6, *box7, *box8;\n    int skipobj;\n\n    if (*rootlist == nullptr) /* don't subdivide non-existent data */\n        return;\n\n    skipobj = 0;\n    globalbound(rootlist, &gmin, &gmax); /* find global min and max */\n\n    gctr.x = ((gmax.x - gmin.x) / 2.0) + gmin.x;\n    gctr.y = ((gmax.y - gmin.y) / 2.0) + gmin.y;\n    gctr.z = ((gmax.z - gmin.z) / 2.0) + gmin.z;\n\n    cmin1 = gmin;\n    cmax1 = gctr;\n    box1 = newbndbox(cmin1, cmax1);\n\n    cmin2 = gmin;\n    cmin2.x = gctr.x;\n    cmax2 = gmax;\n    cmax2.y = gctr.y;\n    cmax2.z = gctr.z;\n    box2 = newbndbox(cmin2, cmax2);\n\n    cmin3 = gmin;\n    cmin3.y = gctr.y;\n    cmax3 = gmax;\n    cmax3.x = gctr.x;\n    cmax3.z = gctr.z;\n    box3 = newbndbox(cmin3, cmax3);\n\n    cmin4 = gmin;\n    cmin4.x = gctr.x;\n    cmin4.y = gctr.y;\n    cmax4 = gmax;\n    cmax4.z = gctr.z;\n    box4 = newbndbox(cmin4, cmax4);\n\n    cmin5 = gmin;\n    cmin5.z = gctr.z;\n    cmax5 = gctr;\n    cmax5.z = gmax.z;\n    box5 = newbndbox(cmin5, cmax5);\n\n    cmin6 = gctr;\n    cmin6.y = gmin.y;\n    cmax6 = gmax;\n    cmax6.y = gctr.y;\n    box6 = newbndbox(cmin6, cmax6);\n\n    cmin7 = gctr;\n    cmin7.x = gmin.x;\n    cmax7 = gctr;\n    cmax7.y = gmax.y;\n    cmax7.z = gmax.z;\n    box7 = newbndbox(cmin7, cmax7);\n\n    cmin8 = gctr;\n    cmax8 = gmax;\n    box8 = newbndbox(cmin8, cmax8);\n\n    cur = *rootlist;\n    while (cur != nullptr) {\n        if (objinside((object *)cur->nextobj, &cmin1, &cmax1)) {\n            movenextobj(cur, &box1->objlist);\n        }\n        else if (objinside((object *)cur->nextobj, &cmin2, &cmax2)) {\n            movenextobj(cur, &box2->objlist);\n        }\n        else if (objinside((object *)cur->nextobj, &cmin3, &cmax3)) {\n            movenextobj(cur, &box3->objlist);\n        }\n        else if (objinside((object *)cur->nextobj, &cmin4, &cmax4)) {\n            movenextobj(cur, &box4->objlist);\n        }\n        else if (objinside((object *)cur->nextobj, &cmin5, &cmax5)) {\n            movenextobj(cur, &box5->objlist);\n        }\n        else if (objinside((object *)cur->nextobj, &cmin6, &cmax6)) {\n            movenextobj(cur, &box6->objlist);\n        }\n        else if (objinside((object *)cur->nextobj, &cmin7, &cmax7)) {\n            movenextobj(cur, &box7->objlist);\n        }\n        else if (objinside((object *)cur->nextobj, &cmin8, &cmax8)) {\n            movenextobj(cur, &box8->objlist);\n        }\n        else {\n            skipobj++;\n            cur = (object *)cur->nextobj;\n        }\n    }\n\n    /* new scope, for redefinition of cur, and old */\n    {\n        bndbox *cur, *old;\n        old = box1;\n        cur = box2;\n        if (countobj(cur->objlist) > 0) {\n            old->nextobj = cur;\n            globalbound(&cur->objlist, &cur->min, &cur->max);\n            old = cur;\n        }\n        cur = box3;\n        if (countobj(cur->objlist) > 0) {\n            old->nextobj = cur;\n            globalbound(&cur->objlist, &cur->min, &cur->max);\n            old = cur;\n        }\n        cur = box4;\n        if (countobj(cur->objlist) > 0) {\n            old->nextobj = cur;\n            globalbound(&cur->objlist, &cur->min, &cur->max);\n            old = cur;\n        }\n        cur = box5;\n        if (countobj(cur->objlist) > 0) {\n            old->nextobj = cur;\n            globalbound(&cur->objlist, &cur->min, &cur->max);\n            old = cur;\n        }\n        cur = box6;\n        if (countobj(cur->objlist) > 0) {\n            old->nextobj = cur;\n            globalbound(&cur->objlist, &cur->min, &cur->max);\n            old = cur;\n        }\n        cur = box7;\n        if (countobj(cur->objlist) > 0) {\n            old->nextobj = cur;\n            globalbound(&cur->objlist, &cur->min, &cur->max);\n            old = cur;\n        }\n        cur = box8;\n        if (countobj(cur->objlist) > 0) {\n            old->nextobj = cur;\n            globalbound(&cur->objlist, &cur->min, &cur->max);\n            old = cur;\n        }\n\n        old->nextobj = *rootlist;\n\n        if (countobj(box1->objlist) > 0) {\n            globalbound(&box1->objlist, &box1->min, &box1->max);\n            *rootlist = (object *)box1;\n        }\n        else {\n            *rootlist = (object *)box1->nextobj;\n        }\n\n    } /**** end of special cur and old scope */\n\n    if (countobj(box1->objlist) > maxoctnodes) {\n        octreespace(&box1->objlist, maxoctnodes);\n    }\n    if (countobj(box2->objlist) > maxoctnodes) {\n        octreespace(&box2->objlist, maxoctnodes);\n    }\n    if (countobj(box3->objlist) > maxoctnodes) {\n        octreespace(&box3->objlist, maxoctnodes);\n    }\n    if (countobj(box4->objlist) > maxoctnodes) {\n        octreespace(&box4->objlist, maxoctnodes);\n    }\n    if (countobj(box5->objlist) > maxoctnodes) {\n        octreespace(&box5->objlist, maxoctnodes);\n    }\n    if (countobj(box6->objlist) > maxoctnodes) {\n        octreespace(&box6->objlist, maxoctnodes);\n    }\n    if (countobj(box7->objlist) > maxoctnodes) {\n        octreespace(&box7->objlist, maxoctnodes);\n    }\n    if (countobj(box8->objlist) > maxoctnodes) {\n        octreespace(&box8->objlist, maxoctnodes);\n    }\n}\n\nvoid dividespace(int maxoctnodes, object **toplist) {\n    bndbox *gbox;\n    vector gmin, gmax;\n\n    if (countobj(*toplist) > maxoctnodes) {\n        globalbound(toplist, &gmin, &gmax);\n\n        octreespace(toplist, maxoctnodes);\n\n        gbox = newbndbox(gmin, gmax);\n        gbox->objlist = nullptr;\n        gbox->tex = nullptr;\n        gbox->nextobj = nullptr;\n        gbox->objlist = *toplist;\n        *toplist = (object *)gbox;\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/objbound.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*  \n * objbound.h - defines for object bounding code.\n *\n *  $Id: objbound.h,v 1.2 2007-02-22 17:54:15 Exp $\n */\n\nvoid dividespace(int, object **);\n\n#ifdef OBJBOUND_PRIVATE\n\nstatic void globalbound(object **, vector *, vector *);\nstatic int objinside(object *obj, vector *min, vector *max);\nstatic int countobj(object *);\nstatic void movenextobj(object *, object **);\nstatic void octreespace(object **, int);\n\n#endif\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/parse.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * parse.cpp - an UltraLame (tm) parser for simple data files...\n */\n\n// Try preventing lots of GCC warnings about ignored results of fscanf etc.\n#ifdef __GNUC__\n// Starting from 4.5, GCC has a suppression option\n#pragma GCC diagnostic ignored \"-Wunused-result\"\n#endif\n\n#include <cstdio>\n#include <cmath>\n#include <cstring>\n#include <cstdlib>\n#include <cctype> /* needed for toupper(), macro.. */\n\n#include \"types.hpp\"\n#include \"api.hpp\" /* rendering API */\n\n#define PARSE_INTERNAL\n#include \"parse.hpp\" /* self protos */\n#undef PARSE_INTERNAL\n\nstatic texentry textable[NUMTEXS]; /* texture lookup table */\nstatic texentry defaulttex; /* The default texture when a lookup fails */\nstatic int numtextures; /* number of TEXDEF textures */\nstatic int numobjectsparsed; /* total number of objects parsed so far */\nstatic color scenebackcol; /* scene background color */\n\nstatic int stringcmp(const char *a, const char *b) {\n    std::size_t i, s, l;\n\n    s = strlen(a);\n    l = strlen(b);\n\n    if (s != l)\n        return 1;\n\n    for (i = 0; i < s; i++) {\n        if (toupper(a[i]) != toupper(b[i])) {\n            return 1;\n        }\n    }\n    return 0;\n}\n\nstatic void reset_tex_table(void) {\n    apitexture apitex;\n\n    numtextures = 0;\n    memset(&textable, 0, sizeof(textable));\n\n    apitex.col.r = 1.0;\n    apitex.col.g = 1.0;\n    apitex.col.b = 1.0;\n    apitex.ambient = 0.1;\n    apitex.diffuse = 0.9;\n    apitex.specular = 0.0;\n    apitex.opacity = 1.0;\n    apitex.texturefunc = 0;\n\n    defaulttex.tex = rt_texture(&apitex);\n}\n\nstatic errcode add_texture(void *tex, char name[TEXNAMELEN]) {\n    textable[numtextures].tex = tex;\n    strcpy(textable[numtextures].name, name);\n\n    numtextures++;\n    if (numtextures > NUMTEXS) {\n        fprintf(stderr, \"Parse: %d textures allocated, texture slots full!\\n\", numtextures);\n        numtextures--; /* keep writing over last texture if we've run out.. */\n        return PARSEALLOCERR;\n    }\n\n    return PARSENOERR;\n}\n\nstatic void *find_texture(char name[TEXNAMELEN]) {\n    int i;\n\n    for (i = 0; i < numtextures; i++) {\n        if (strcmp(name, textable[i].name) == 0)\n            return textable[i].tex;\n    }\n    fprintf(stderr, \"Undefined texture '%s', using default. \\n\", name);\n    return (defaulttex.tex);\n}\n\napiflt degtorad(apiflt deg) {\n    apiflt tmp;\n    tmp = deg * 3.1415926 / 180.0;\n    return tmp;\n}\n\nstatic void degvectoradvec(vector *degvec) {\n    vector tmp;\n\n    tmp.x = degtorad(degvec->x);\n    tmp.y = degtorad(degvec->y);\n    tmp.z = degtorad(degvec->z);\n    *degvec = tmp;\n}\n\nstatic void InitRot3d(RotMat *rot, apiflt x, apiflt y, apiflt z) {\n    rot->rx1 = cos(y) * cos(z);\n    rot->rx2 = sin(x) * sin(y) * cos(z) - cos(x) * sin(z);\n    rot->rx3 = sin(x) * sin(z) + cos(x) * cos(z) * sin(y);\n\n    rot->ry1 = cos(y) * sin(z);\n    rot->ry2 = cos(x) * cos(z) + sin(x) * sin(y) * sin(z);\n    rot->ry3 = cos(x) * sin(y) * sin(z) - sin(x) * cos(z);\n\n    rot->rz1 = sin(y);\n    rot->rz2 = sin(x) * cos(y);\n    rot->rz3 = cos(x) * cos(y);\n}\n\nstatic void Rotate3d(RotMat *rot, vector *vec) {\n    vector tmp;\n    tmp.x = (vec->x * (rot->rx1) + vec->y * (rot->rx2) + vec->z * (rot->rx3));\n    tmp.y = (vec->x * (rot->ry1) + vec->y * (rot->ry2) + vec->z * (rot->ry3));\n    tmp.z = (vec->x * (rot->rz1) + vec->y * (rot->rz2) + vec->z * (rot->rz3));\n    *vec = tmp;\n}\n\nstatic void Scale3d(vector *scale, vector *vec) {\n    vec->x = vec->x * scale->x;\n    vec->y = vec->y * scale->y;\n    vec->z = vec->z * scale->z;\n}\n\nstatic void Trans3d(vector *trans, vector *vec) {\n    vec->x += trans->x;\n    vec->y += trans->y;\n    vec->z += trans->z;\n}\n\nstatic errcode GetString(FILE *dfile, const char *string) {\n    char data[255];\n\n    fscanf(dfile, \"%s\", data);\n    if (stringcmp(data, string) != 0) {\n        fprintf(stderr, \"parse: Expected %s, got %s \\n\", string, data);\n        fprintf(stderr, \"parse: Error while parsing object: %d \\n\", numobjectsparsed);\n        return PARSEBADSYNTAX;\n    }\n\n    return PARSENOERR;\n}\n\nunsigned int readmodel(char *modelfile, SceneHandle scene) {\n    FILE *dfile;\n    errcode rc;\n\n    reset_tex_table();\n    dfile = nullptr;\n\n    dfile = fopen(modelfile, \"r\");\n    if (dfile == nullptr) {\n        return PARSEBADFILE;\n    }\n\n    rc = GetScenedefs(dfile, scene);\n    if (rc != PARSENOERR) {\n        fclose(dfile);\n        return rc;\n    }\n\n    scenebackcol.r = 0.0; /* default background is black */\n    scenebackcol.g = 0.0;\n    scenebackcol.b = 0.0;\n\n    numobjectsparsed = 0;\n    while ((rc = GetObject(dfile, scene)) == PARSENOERR) {\n        numobjectsparsed++;\n    }\n    fclose(dfile);\n\n    if (rc == PARSEEOF)\n        rc = PARSENOERR;\n\n    rt_background(scene, scenebackcol);\n\n    return rc;\n}\n\nstatic errcode GetScenedefs(FILE *dfile, SceneHandle scene) {\n    vector Ccenter, Cview, Cup;\n    apiflt zoom, aspectratio;\n    int raydepth, antialiasing;\n    char outfilename[200];\n    int xres, yres, verbose;\n    float a, b, c;\n    errcode rc = PARSENOERR;\n\n    rc |= GetString(dfile, \"BEGIN_SCENE\");\n\n    rc |= GetString(dfile, \"OUTFILE\");\n    fscanf(dfile, \"%s\", outfilename);\n#ifdef _WIN32\n    if (strcmp(outfilename, \"/dev/null\") == 0) {\n        strcpy(outfilename, \"NUL:\");\n    }\n#endif\n\n    rc |= GetString(dfile, \"RESOLUTION\");\n    fscanf(dfile, \"%d %d\", &xres, &yres);\n\n    rc |= GetString(dfile, \"VERBOSE\");\n    fscanf(dfile, \"%d\", &verbose);\n\n    rt_scenesetup(scene, outfilename, xres, yres, verbose);\n\n    rc |= GetString(dfile, \"CAMERA\");\n\n    rc |= GetString(dfile, \"ZOOM\");\n    fscanf(dfile, \"%f\", &a);\n    zoom = a;\n\n    rc |= GetString(dfile, \"ASPECTRATIO\");\n    fscanf(dfile, \"%f\", &b);\n    aspectratio = b;\n\n    rc |= GetString(dfile, \"ANTIALIASING\");\n    fscanf(dfile, \"%d\", &antialiasing);\n\n    rc |= GetString(dfile, \"RAYDEPTH\");\n    fscanf(dfile, \"%d\", &raydepth);\n\n    rc |= GetString(dfile, \"CENTER\");\n    fscanf(dfile, \"%f %f %f\", &a, &b, &c);\n    Ccenter.x = a;\n    Ccenter.y = b;\n    Ccenter.z = c;\n\n    rc |= GetString(dfile, \"VIEWDIR\");\n    fscanf(dfile, \"%f %f %f\", &a, &b, &c);\n    Cview.x = a;\n    Cview.y = b;\n    Cview.z = c;\n\n    rc |= GetString(dfile, \"UPDIR\");\n    fscanf(dfile, \"%f %f %f\", &a, &b, &c);\n    Cup.x = a;\n    Cup.y = b;\n    Cup.z = c;\n\n    rc |= GetString(dfile, \"END_CAMERA\");\n\n    rt_camerasetup(scene, zoom, aspectratio, antialiasing, raydepth, Ccenter, Cview, Cup);\n\n    return rc;\n}\n\nstatic errcode GetObject(FILE *dfile, SceneHandle scene) {\n    char objtype[80];\n\n    fscanf(dfile, \"%s\", objtype);\n    if (!stringcmp(objtype, \"END_SCENE\")) {\n        return PARSEEOF; /* end parsing */\n    }\n    if (!stringcmp(objtype, \"TEXDEF\")) {\n        return GetTexDef(dfile);\n    }\n    if (!stringcmp(objtype, \"TEXALIAS\")) {\n        return GetTexAlias(dfile);\n    }\n    if (!stringcmp(objtype, \"BACKGROUND\")) {\n        return GetBackGnd(dfile);\n    }\n    if (!stringcmp(objtype, \"CYLINDER\")) {\n        return GetCylinder(dfile);\n    }\n    if (!stringcmp(objtype, \"FCYLINDER\")) {\n        return GetFCylinder(dfile);\n    }\n    if (!stringcmp(objtype, \"POLYCYLINDER\")) {\n        return GetPolyCylinder(dfile);\n    }\n    if (!stringcmp(objtype, \"SPHERE\")) {\n        return GetSphere(dfile);\n    }\n    if (!stringcmp(objtype, \"PLANE\")) {\n        return GetPlane(dfile);\n    }\n    if (!stringcmp(objtype, \"RING\")) {\n        return GetRing(dfile);\n    }\n    if (!stringcmp(objtype, \"BOX\")) {\n        return GetBox(dfile);\n    }\n    if (!stringcmp(objtype, \"SCALARVOL\")) {\n        return GetVol(dfile);\n    }\n    if (!stringcmp(objtype, \"TRI\")) {\n        return GetTri(dfile);\n    }\n    if (!stringcmp(objtype, \"STRI\")) {\n        return GetSTri(dfile);\n    }\n    if (!stringcmp(objtype, \"LIGHT\")) {\n        return GetLight(dfile);\n    }\n    if (!stringcmp(objtype, \"SCAPE\")) {\n        return GetLandScape(dfile);\n    }\n    if (!stringcmp(objtype, \"TPOLYFILE\")) {\n        return GetTPolyFile(dfile);\n    }\n\n    fprintf(stderr, \"Found bad token: %s expected an object type\\n\", objtype);\n    return PARSEBADSYNTAX;\n}\n\nstatic errcode GetVector(FILE *dfile, vector *v1) {\n    float a, b, c;\n\n    fscanf(dfile, \"%f %f %f\", &a, &b, &c);\n    v1->x = a;\n    v1->y = b;\n    v1->z = c;\n\n    return PARSENOERR;\n}\n\nstatic errcode GetColor(FILE *dfile, color *c1) {\n    float r, g, b;\n    int rc;\n\n    rc = GetString(dfile, \"COLOR\");\n    fscanf(dfile, \"%f %f %f\", &r, &g, &b);\n    c1->r = r;\n    c1->g = g;\n    c1->b = b;\n\n    return rc;\n}\n\nstatic errcode GetTexDef(FILE *dfile) {\n    char texname[TEXNAMELEN];\n\n    fscanf(dfile, \"%s\", texname);\n    add_texture(GetTexBody(dfile), texname);\n\n    return PARSENOERR;\n}\n\nstatic errcode GetTexAlias(FILE *dfile) {\n    char texname[TEXNAMELEN];\n    char aliasname[TEXNAMELEN];\n\n    fscanf(dfile, \"%s\", texname);\n    fscanf(dfile, \"%s\", aliasname);\n    add_texture(find_texture(aliasname), texname);\n\n    return PARSENOERR;\n}\n\nstatic errcode GetTexture(FILE *dfile, void **tex) {\n    char tmp[255];\n    errcode rc = PARSENOERR;\n\n    fscanf(dfile, \"%s\", tmp);\n    if (!stringcmp(\"TEXTURE\", tmp)) {\n        *tex = GetTexBody(dfile);\n    }\n    else\n        *tex = find_texture(tmp);\n\n    return rc;\n}\n\nvoid *GetTexBody(FILE *dfile) {\n    char tmp[255];\n    float a, b, c, d, phong, phongexp, phongtype;\n    apitexture tex;\n    void *voidtex;\n    errcode rc;\n\n    rc = GetString(dfile, \"AMBIENT\");\n    fscanf(dfile, \"%f\", &a);\n    tex.ambient = a;\n\n    rc |= GetString(dfile, \"DIFFUSE\");\n    fscanf(dfile, \"%f\", &b);\n    tex.diffuse = b;\n\n    rc |= GetString(dfile, \"SPECULAR\");\n    fscanf(dfile, \"%f\", &c);\n    tex.specular = c;\n\n    rc |= GetString(dfile, \"OPACITY\");\n    fscanf(dfile, \"%f\", &d);\n    tex.opacity = d;\n\n    fscanf(dfile, \"%s\", tmp);\n    if (!stringcmp(\"PHONG\", tmp)) {\n        fscanf(dfile, \"%s\", tmp);\n        if (!stringcmp(\"METAL\", tmp)) {\n            phongtype = RT_PHONG_METAL;\n        }\n        else if (!stringcmp(\"PLASTIC\", tmp)) {\n            phongtype = RT_PHONG_PLASTIC;\n        }\n        else {\n            phongtype = RT_PHONG_PLASTIC;\n        }\n\n        fscanf(dfile, \"%f\", &phong);\n        GetString(dfile, \"PHONG_SIZE\");\n        fscanf(dfile, \"%f\", &phongexp);\n        fscanf(dfile, \"%s\", tmp);\n    }\n    else {\n        phong = 0.0;\n        phongexp = 100.0;\n        phongtype = RT_PHONG_PLASTIC;\n    }\n\n    fscanf(dfile, \"%f %f %f\", &a, &b, &c);\n    tex.col.r = a;\n    tex.col.g = b;\n    tex.col.b = c;\n\n    rc |= GetString(dfile, \"TEXFUNC\");\n    fscanf(dfile, \"%d\", &tex.texturefunc);\n    if (tex.texturefunc >= 7) { /* if its an image map, we need a filename */\n        fscanf(dfile, \"%s\", tex.imap);\n    }\n    if (tex.texturefunc != 0) {\n        rc |= GetString(dfile, \"CENTER\");\n        rc |= GetVector(dfile, &tex.ctr);\n        rc |= GetString(dfile, \"ROTATE\");\n        rc |= GetVector(dfile, &tex.rot);\n        rc |= GetString(dfile, \"SCALE\");\n        rc |= GetVector(dfile, &tex.scale);\n    }\n    if (tex.texturefunc == 9) {\n        rc |= GetString(dfile, \"UAXIS\");\n        rc |= GetVector(dfile, &tex.uaxs);\n        rc |= GetString(dfile, \"VAXIS\");\n        rc |= GetVector(dfile, &tex.vaxs);\n    }\n\n    voidtex = rt_texture(&tex);\n    rt_tex_phong(voidtex, phong, phongexp, (int)phongtype);\n\n    return voidtex;\n}\n\nstatic errcode GetLight(FILE *dfile) {\n    apiflt rad;\n    vector ctr;\n    apitexture tex;\n    float a;\n    errcode rc;\n\n    memset(&tex, 0, sizeof(apitexture));\n\n    rc = GetString(dfile, \"CENTER\");\n    rc |= GetVector(dfile, &ctr);\n    rc |= GetString(dfile, \"RAD\");\n    fscanf(dfile, \"%f\", &a); /* read in radius */\n    rad = a;\n\n    rc |= GetColor(dfile, &tex.col);\n\n    rt_light(rt_texture(&tex), ctr, rad);\n\n    return rc;\n}\n\nstatic errcode GetBackGnd(FILE *dfile) {\n    float r, g, b;\n\n    fscanf(dfile, \"%f %f %f\", &r, &g, &b);\n\n    scenebackcol.r = r;\n    scenebackcol.g = g;\n    scenebackcol.b = b;\n\n    return PARSENOERR;\n}\n\nstatic errcode GetCylinder(FILE *dfile) {\n    apiflt rad;\n    vector ctr, axis;\n    void *tex;\n    float a;\n    errcode rc;\n\n    rc = GetString(dfile, \"CENTER\");\n    rc |= GetVector(dfile, &ctr);\n    rc |= GetString(dfile, \"AXIS\");\n    rc |= GetVector(dfile, &axis);\n    rc |= GetString(dfile, \"RAD\");\n    fscanf(dfile, \"%f\", &a);\n    rad = a;\n\n    rc |= GetTexture(dfile, &tex);\n    rt_cylinder(tex, ctr, axis, rad);\n\n    return rc;\n}\n\nstatic errcode GetFCylinder(FILE *dfile) {\n    apiflt rad;\n    vector ctr, axis;\n    vector pnt1, pnt2;\n    void *tex;\n    float a;\n    errcode rc;\n\n    rc = GetString(dfile, \"BASE\");\n    rc |= GetVector(dfile, &pnt1);\n    rc |= GetString(dfile, \"APEX\");\n    rc |= GetVector(dfile, &pnt2);\n\n    ctr = pnt1;\n    axis.x = pnt2.x - pnt1.x;\n    axis.y = pnt2.y - pnt1.y;\n    axis.z = pnt2.z - pnt1.z;\n\n    rc |= GetString(dfile, \"RAD\");\n    fscanf(dfile, \"%f\", &a);\n    rad = a;\n\n    rc |= GetTexture(dfile, &tex);\n    rt_fcylinder(tex, ctr, axis, rad);\n\n    return rc;\n}\n\nstatic errcode GetPolyCylinder(FILE *dfile) {\n    apiflt rad;\n    vector *temp;\n    void *tex;\n    float a;\n    int numpts, i;\n    errcode rc;\n\n    rc = GetString(dfile, \"POINTS\");\n    fscanf(dfile, \"%d\", &numpts);\n\n    temp = (vector *)malloc(numpts * sizeof(vector));\n\n    for (i = 0; i < numpts; i++) {\n        rc |= GetVector(dfile, &temp[i]);\n    }\n\n    rc |= GetString(dfile, \"RAD\");\n    fscanf(dfile, \"%f\", &a);\n    rad = a;\n\n    rc |= GetTexture(dfile, &tex);\n    rt_polycylinder(tex, temp, numpts, rad);\n\n    free(temp);\n\n    return rc;\n}\n\nstatic errcode GetSphere(FILE *dfile) {\n    apiflt rad;\n    vector ctr;\n    void *tex;\n    float a;\n    errcode rc;\n\n    rc = GetString(dfile, \"CENTER\");\n    rc |= GetVector(dfile, &ctr);\n    rc |= GetString(dfile, \"RAD\");\n    fscanf(dfile, \"%f\", &a);\n    rad = a;\n\n    rc |= GetTexture(dfile, &tex);\n\n    rt_sphere(tex, ctr, rad);\n\n    return rc;\n}\n\nstatic errcode GetPlane(FILE *dfile) {\n    vector normal;\n    vector ctr;\n    void *tex;\n    errcode rc;\n\n    rc = GetString(dfile, \"CENTER\");\n    rc |= GetVector(dfile, &ctr);\n    rc |= GetString(dfile, \"NORMAL\");\n    rc |= GetVector(dfile, &normal);\n    rc |= GetTexture(dfile, &tex);\n\n    rt_plane(tex, ctr, normal);\n\n    return rc;\n}\n\nstatic errcode GetVol(FILE *dfile) {\n    vector min, max;\n    int x, y, z;\n    char fname[255];\n    void *tex;\n    errcode rc;\n\n    rc = GetString(dfile, \"MIN\");\n    rc |= GetVector(dfile, &min);\n    rc |= GetString(dfile, \"MAX\");\n    rc |= GetVector(dfile, &max);\n    rc |= GetString(dfile, \"DIM\");\n    fscanf(dfile, \"%d %d %d \", &x, &y, &z);\n    rc |= GetString(dfile, \"FILE\");\n    fscanf(dfile, \"%s\", fname);\n    rc |= GetTexture(dfile, &tex);\n\n    rt_scalarvol(tex, min, max, x, y, z, fname, nullptr);\n\n    return rc;\n}\n\nstatic errcode GetBox(FILE *dfile) {\n    vector min, max;\n    void *tex;\n    errcode rc;\n\n    rc = GetString(dfile, \"MIN\");\n    rc |= GetVector(dfile, &min);\n    rc |= GetString(dfile, \"MAX\");\n    rc |= GetVector(dfile, &max);\n    rc |= GetTexture(dfile, &tex);\n\n    rt_box(tex, min, max);\n\n    return rc;\n}\n\nstatic errcode GetRing(FILE *dfile) {\n    vector normal;\n    vector ctr;\n    void *tex;\n    float a, b;\n    errcode rc;\n\n    rc = GetString(dfile, \"CENTER\");\n    rc |= GetVector(dfile, &ctr);\n    rc |= GetString(dfile, \"NORMAL\");\n    rc |= GetVector(dfile, &normal);\n    rc |= GetString(dfile, \"INNER\");\n    fscanf(dfile, \" %f \", &a);\n    rc |= GetString(dfile, \"OUTER\");\n    fscanf(dfile, \" %f \", &b);\n    rc |= GetTexture(dfile, &tex);\n\n    rt_ring(tex, ctr, normal, a, b);\n\n    return rc;\n}\n\nstatic errcode GetTri(FILE *dfile) {\n    vector v0, v1, v2;\n    void *tex;\n    errcode rc;\n\n    rc = GetString(dfile, \"V0\");\n    rc |= GetVector(dfile, &v0);\n\n    rc |= GetString(dfile, \"V1\");\n    rc |= GetVector(dfile, &v1);\n\n    rc |= GetString(dfile, \"V2\");\n    rc |= GetVector(dfile, &v2);\n\n    rc |= GetTexture(dfile, &tex);\n\n    rt_tri(tex, v0, v1, v2);\n\n    return rc;\n}\n\nstatic errcode GetSTri(FILE *dfile) {\n    vector v0, v1, v2, n0, n1, n2;\n    void *tex;\n    errcode rc;\n\n    rc = GetString(dfile, \"V0\");\n    rc |= GetVector(dfile, &v0);\n\n    rc |= GetString(dfile, \"V1\");\n    rc |= GetVector(dfile, &v1);\n\n    rc |= GetString(dfile, \"V2\");\n    rc |= GetVector(dfile, &v2);\n\n    rc |= GetString(dfile, \"N0\");\n    rc |= GetVector(dfile, &n0);\n\n    rc |= GetString(dfile, \"N1\");\n    rc |= GetVector(dfile, &n1);\n\n    rc |= GetString(dfile, \"N2\");\n    rc |= GetVector(dfile, &n2);\n\n    rc |= GetTexture(dfile, &tex);\n\n    rt_stri(tex, v0, v1, v2, n0, n1, n2);\n\n    return rc;\n}\n\nstatic errcode GetLandScape(FILE *dfile) {\n    void *tex;\n    vector ctr;\n    apiflt wx, wy;\n    int m, n;\n    float a, b;\n    errcode rc;\n\n    rc = GetString(dfile, \"RES\");\n    fscanf(dfile, \"%d %d\", &m, &n);\n\n    rc |= GetString(dfile, \"SCALE\");\n    fscanf(dfile, \"%f %f\", &a, &b);\n    wx = a;\n    wy = b;\n\n    rc |= GetString(dfile, \"CENTER\");\n    rc |= GetVector(dfile, &ctr);\n\n    rc |= GetTexture(dfile, &tex);\n\n    rt_landscape(tex, m, n, ctr, wx, wy);\n\n    return rc;\n}\n\nstatic errcode GetTPolyFile(FILE *dfile) {\n    void *tex;\n    vector ctr, rot, scale;\n    vector v1, v2, v0;\n    char ifname[255];\n    FILE *ifp;\n    int v, totalpolys;\n    RotMat RotA;\n    errcode rc;\n\n    totalpolys = 0;\n\n    rc = GetString(dfile, \"SCALE\");\n    rc |= GetVector(dfile, &scale);\n\n    rc |= GetString(dfile, \"ROT\");\n    rc |= GetVector(dfile, &rot);\n\n    degvectoradvec(&rot);\n    InitRot3d(&RotA, rot.x, rot.y, rot.z);\n\n    rc |= GetString(dfile, \"CENTER\");\n    rc |= GetVector(dfile, &ctr);\n\n    rc |= GetString(dfile, \"FILE\");\n    fscanf(dfile, \"%s\", ifname);\n\n    rc |= GetTexture(dfile, &tex);\n\n    if ((ifp = fopen(ifname, \"r\")) == nullptr) {\n        fprintf(stderr, \"Can't open data file %s for input!! Aborting...\\n\", ifname);\n        return PARSEBADSUBFILE;\n    }\n\n    while (!feof(ifp)) {\n        fscanf(ifp, \"%d\", &v);\n        if (v != 3) {\n            break;\n        }\n\n        totalpolys++;\n        v = 0;\n\n        rc |= GetVector(ifp, &v0);\n        rc |= GetVector(ifp, &v1);\n        rc |= GetVector(ifp, &v2);\n\n        Scale3d(&scale, &v0);\n        Scale3d(&scale, &v1);\n        Scale3d(&scale, &v2);\n\n        Rotate3d(&RotA, &v0);\n        Rotate3d(&RotA, &v1);\n        Rotate3d(&RotA, &v2);\n\n        Trans3d(&ctr, &v0);\n        Trans3d(&ctr, &v1);\n        Trans3d(&ctr, &v2);\n\n        rt_tri(tex, v1, v0, v2);\n    }\n\n    fclose(ifp);\n\n    return rc;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/parse.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * parse.h - this file contains defines for model file reading.\n *\n *  $Id: parse.h,v 1.2 2007-02-22 17:54:16 Exp $\n */\n\n#define PARSENOERR      0\n#define PARSEBADFILE    1\n#define PARSEBADSUBFILE 2\n#define PARSEBADSYNTAX  4\n#define PARSEEOF        8\n#define PARSEALLOCERR   16\n\nunsigned int readmodel(char *, SceneHandle);\n\n#ifdef PARSE_INTERNAL\n#define NUMTEXS    32768\n#define TEXNAMELEN 24\n\ntypedef struct {\n    double rx1;\n    double rx2;\n    double rx3;\n    double ry1;\n    double ry2;\n    double ry3;\n    double rz1;\n    double rz2;\n    double rz3;\n} RotMat;\n\ntypedef struct {\n    char name[TEXNAMELEN];\n    void *tex;\n} texentry;\n\n#ifdef _ERRCODE_DEFINED\n#define errcode errcode_t\n#endif //_ERRCODE_DEFINED\ntypedef unsigned int errcode;\n\nstatic errcode add_texture(void *tex, char name[TEXNAMELEN]);\nstatic errcode GetString(FILE *, const char *);\nstatic errcode GetScenedefs(FILE *, SceneHandle);\nstatic errcode GetColor(FILE *, color *);\nstatic errcode GetVector(FILE *, vector *);\nstatic errcode GetTexDef(FILE *);\nstatic errcode GetTexAlias(FILE *);\nstatic errcode GetTexture(FILE *, void **);\nvoid *GetTexBody(FILE *);\nstatic errcode GetBackGnd(FILE *);\nstatic errcode GetCylinder(FILE *);\nstatic errcode GetFCylinder(FILE *);\nstatic errcode GetPolyCylinder(FILE *);\nstatic errcode GetSphere(FILE *);\nstatic errcode GetPlane(FILE *);\nstatic errcode GetRing(FILE *);\nstatic errcode GetBox(FILE *);\nstatic errcode GetVol(FILE *);\nstatic errcode GetTri(FILE *);\nstatic errcode GetSTri(FILE *);\nstatic errcode GetLight(FILE *);\nstatic errcode GetLandScape(FILE *);\nstatic errcode GetTPolyFile(FILE *);\nstatic errcode GetMGFFile(FILE *, SceneHandle);\nstatic errcode GetObject(FILE *, SceneHandle);\n\n#endif\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/plane.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * plane.cpp - This file contains the functions for dealing with planes.\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n#include \"intersect.hpp\"\n#include \"util.hpp\"\n\n#define PLANE_PRIVATE\n#include \"plane.hpp\"\n\nstatic object_methods plane_methods = { (void (*)(void *, void *))(plane_intersect),\n                                        (void (*)(void *, void *, void *, void *))(plane_normal),\n                                        plane_bbox,\n                                        free };\n\nobject *newplane(void *tex, vector ctr, vector norm) {\n    plane *p;\n\n    p = (plane *)rt_getmem(sizeof(plane));\n    memset(p, 0, sizeof(plane));\n    p->methods = &plane_methods;\n\n    p->tex = (texture *)tex;\n    p->norm = norm;\n    VNorm(&p->norm);\n    p->d = -VDot(&ctr, &p->norm);\n\n    return (object *)p;\n}\n\nstatic int plane_bbox(void *obj, vector *min, vector *max) {\n    return 0;\n}\n\nstatic void plane_intersect(plane *pln, ray *ry) {\n    flt t, td;\n\n    t = -(pln->d + VDot(&pln->norm, &ry->o));\n    td = VDot(&pln->norm, &ry->d);\n    if (td != 0.0) {\n        t /= td;\n        if (t > 0.0)\n            add_intersection(t, (object *)pln, ry);\n    }\n}\n\nstatic void plane_normal(plane *pln, vector *pnt, ray *incident, vector *N) {\n    *N = pln->norm;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/plane.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * plane.h - This file contains the defines for planes etc.\n *\n *  $Id: plane.h,v 1.2 2007-02-22 17:54:16 Exp $\n */\n\nobject *newplane(void *tex, vector ctr, vector norm);\n\n#ifdef PLANE_PRIVATE\ntypedef struct {\n    unsigned int id; /* Unique Object serial number */\n    void *nextobj; /* pointer to next object in list */\n    object_methods *methods; /* this object's methods */\n    texture *tex; /* object texture */\n    flt d;\n    vector norm;\n} plane;\n\nstatic void plane_intersect(plane *, ray *);\nstatic int plane_bbox(void *obj, vector *min, vector *max);\nstatic void plane_normal(plane *, vector *, ray *incident, vector *);\n#endif\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/ppm.cpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n *  ppm.cpp - This file deals with PPM format image files (reading/writing)\n */\n\n/* For our purposes, we're interested only in the 3 byte per pixel 24 bit\n   truecolor sort of file..  Probably won't implement any decent checking\n   at this point, probably choke on things like the # comments.. */\n\n// Try preventing lots of GCC warnings about ignored results of fscanf etc.\n#ifdef __GNUC__\n#pragma GCC diagnostic ignored \"-Wunused-result\"\n#endif\n\n#include <cstdio>\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"util.hpp\"\n#include \"imageio.hpp\" /* error codes etc */\n#include \"ppm.hpp\"\n\nstatic int getint(FILE *dfile) {\n    char ch[200];\n    int i;\n    int num;\n\n    num = 0;\n    while (num == 0) {\n        fscanf(dfile, \"%s\", ch);\n        while (ch[0] == '#') {\n            fgets(ch, 200, dfile);\n        }\n        num = sscanf(ch, \"%d\", &i);\n    }\n    return i;\n}\n\nint readppm(char *name, int *xres, int *yres, unsigned char **imgdata) {\n    char data[200];\n    FILE *ifp;\n    int i;\n    std::size_t bytesread;\n    int datasize;\n\n    ifp = fopen(name, \"r\");\n    if (ifp == nullptr) {\n        return IMAGEBADFILE; /* couldn't open the file */\n    }\n    fscanf(ifp, \"%s\", data);\n\n    if (strcmp(data, \"P6\")) {\n        fclose(ifp);\n        return IMAGEUNSUP; /* not a format we support */\n    }\n\n    *xres = getint(ifp);\n    *yres = getint(ifp);\n    i = getint(ifp); /* eat the maxval number */\n    fread(&i, 1, 1, ifp); /* eat the newline */\n    datasize = 3 * (*xres) * (*yres);\n\n    *imgdata = (unsigned char *)rt_getmem(datasize);\n\n    bytesread = fread(*imgdata, 1, datasize, ifp);\n\n    fclose(ifp);\n\n    if (bytesread != datasize)\n        return IMAGEREADERR;\n\n    return IMAGENOERR;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/ppm.hpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n *  ppm.h - This file deals with PPM format image files (reading/writing)\n *\n *  $Id: ppm.h,v 1.2 2007-02-22 17:54:16 Exp $\n */\n\n/* For our purposes, we're interested only in the 3 byte per pixel 24 bit\n   truecolor sort of file..  Probably won't implement any decent checking\n   at this point, probably choke on things like the # comments.. */\n\nint readppm(char *name, int *xres, int *yres, unsigned char **imgdata);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/pthread.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n#ifdef EMULATE_PTHREADS\n\n#include <assert.h>\n#include \"pthread_w.hpp\"\n\n/*\n    Basics\n*/\n\nint pthread_create(pthread_t *thread,\n                   pthread_attr_t *attr,\n                   void *(*start_routine)(void *),\n                   void *arg) {\n    pthread_t th;\n\n    if (thread == nullptr)\n        return EINVAL;\n    *thread = nullptr;\n\n    if (start_routine == nullptr)\n        return EINVAL;\n\n    th = (pthread_t)malloc(sizeof(pthread_s));\n    memset(th, 0, sizeof(pthread_s));\n\n    th->winthread_handle =\n        CreateThread(nullptr, 0, (LPTHREAD_START_ROUTINE)start_routine, arg, 0, &th->winthread_id);\n    if (th->winthread_handle == nullptr)\n        return EAGAIN; /*  GetLastError()  */\n\n    *thread = th;\n    return 0;\n}\n\nint pthread_join(pthread_t th, void **thread_return) {\n    BOOL b_ret;\n    DWORD dw_ret;\n\n    if (thread_return)\n        *thread_return = nullptr;\n\n    if ((th == nullptr) || (th->winthread_handle == nullptr))\n        return EINVAL;\n\n    dw_ret = WaitForSingleObject(th->winthread_handle, INFINITE);\n    if (dw_ret != WAIT_OBJECT_0)\n        return ERROR_PTHREAD; /*  dw_ret == WAIT_FAILED; GetLastError()  */\n\n    if (thread_return) {\n        BOOL e_ret;\n        DWORD exit_val;\n        e_ret = GetExitCodeThread(th->winthread_handle, &exit_val);\n        if (!e_ret)\n            return ERROR_PTHREAD; /*  GetLastError()  */\n        *thread_return = (void *)(std::size_t)exit_val;\n    }\n\n    b_ret = CloseHandle(th->winthread_handle);\n    if (!b_ret)\n        return ERROR_PTHREAD; /*  GetLastError()  */\n    memset(th, 0, sizeof(pthread_s));\n    free(th);\n    th = nullptr;\n\n    return 0;\n}\n\nvoid pthread_exit(void *retval) {\n    /*  specific to PTHREAD_TO_WINTHREAD  */\n\n    ExitThread((DWORD)(\n        (std::size_t)retval)); /* thread becomes signalled so its death can be waited upon */\n    /*NOTREACHED*/\n    assert(0);\n    return; /* void fnc; can't return an error code */\n}\n\n/*\n    Mutex\n*/\n\nint pthread_mutex_init(pthread_mutex_t *mutex, pthread_mutexattr_t *mutex_attr) {\n    InitializeCriticalSection(&mutex->critsec);\n    return 0;\n}\n\nint pthread_mutex_destroy(pthread_mutex_t *mutex) {\n    return 0;\n}\n\nint pthread_mutex_lock(pthread_mutex_t *mutex) {\n    EnterCriticalSection(&mutex->critsec);\n    return 0;\n}\n\nint pthread_mutex_unlock(pthread_mutex_t *mutex) {\n    LeaveCriticalSection(&mutex->critsec);\n    return 0;\n}\n\n#endif /*  EMULATE_PTHREADS  */\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/pthread_w.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n#ifdef EMULATE_PTHREADS\n\n#ifndef _PTHREAD_H_DEFINED\n#define _PTHREAD_H_DEFINED\n\n#include <windows.h>\n#include <errno.h>\n#ifndef ENOTSUP\n#define ENOTSUP EPERM\n#endif\n\n/*  just need <stddef.h> on Windows to get std::size_t defined  */\n#include <stddef.h>\n\n#define ERROR_PTHREAD 1000\n#define ERROR_MODE    1001\n#define ERROR_UNIMPL  1002\n\n/*\n    Basics\n*/\n\nstruct pthread_s {\n    HANDLE winthread_handle;\n    DWORD winthread_id;\n};\ntypedef struct pthread_s *pthread_t; /*  one of the few types that's pointer, not struct  */\n\ntypedef struct {\n    int i; /*  not yet defined...  */\n} pthread_attr_t;\n\n/*\n    Mutex\n*/\n\ntypedef struct {\n    int i; /*  not yet defined...  */\n} pthread_mutexattr_t;\n\ntypedef struct {\n    CRITICAL_SECTION critsec;\n} pthread_mutex_t;\n\n/*\n    Function prototypes\n*/\n\nextern int pthread_create(pthread_t *thread,\n                          pthread_attr_t *attr,\n                          void *(*start_routine)(void *),\n                          void *arg);\nextern int pthread_join(pthread_t th, void **thread_return);\nextern void pthread_exit(void *retval);\n\nextern int pthread_mutex_init(pthread_mutex_t *mutex, pthread_mutexattr_t *mutex_attr);\nextern int pthread_mutex_destroy(pthread_mutex_t *mutex);\nextern int pthread_mutex_lock(pthread_mutex_t *mutex);\nextern int pthread_mutex_unlock(pthread_mutex_t *mutex);\n\n#endif /*  _PTHREAD_H_DEFINED  */\n\n#endif /*  EMULATE_PTHREADS  */\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/quadric.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * quadric.cpp - This file contains the functions for dealing with quadrics.\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"quadric.hpp\"\n#include \"vector.hpp\"\n#include \"intersect.hpp\"\n#include \"util.hpp\"\n\nint quadric_bbox(void *obj, vector *min, vector *max) {\n    return 0;\n}\n\nstatic object_methods quadric_methods = { (void (*)(void *, void *))(quadric_intersect),\n                                          (void (*)(void *, void *, void *, void *))(\n                                              quadric_normal),\n                                          quadric_bbox,\n                                          free };\n\nquadric *newquadric() {\n    quadric *q;\n\n    q = (quadric *)rt_getmem(sizeof(quadric));\n    memset(q, 0, sizeof(quadric));\n    q->ctr.x = 0.0;\n    q->ctr.y = 0.0;\n    q->ctr.z = 0.0;\n    q->methods = &quadric_methods;\n\n    return q;\n}\n\nvoid quadric_intersect(quadric *q, ray *ry) {\n    flt Aq, Bq, Cq;\n    flt t1, t2;\n    flt disc;\n    vector rd;\n    vector ro;\n\n    rd = ry->d;\n    VNorm(&rd);\n\n    ro.x = ry->o.x - q->ctr.x;\n    ro.y = ry->o.y - q->ctr.y;\n    ro.z = ry->o.z - q->ctr.z;\n\n    Aq = (q->mat.a * (rd.x * rd.x)) + (2.0 * q->mat.b * rd.x * rd.y) +\n         (2.0 * q->mat.c * rd.x * rd.z) + (q->mat.e * (rd.y * rd.y)) +\n         (2.0 * q->mat.f * rd.y * rd.z) + (q->mat.h * (rd.z * rd.z));\n\n    Bq = 2.0 * ((q->mat.a * ro.x * rd.x) + (q->mat.b * ((ro.x * rd.y) + (rd.x * ro.y))) +\n                (q->mat.c * ((ro.x * rd.z) + (rd.x * ro.z))) + (q->mat.d * rd.x) +\n                (q->mat.e * ro.y * rd.y) + (q->mat.f * ((ro.y * rd.z) + (rd.y * ro.z))) +\n                (q->mat.g * rd.y) + (q->mat.h * ro.z * rd.z) + (q->mat.i * rd.z));\n\n    Cq = (q->mat.a * (ro.x * ro.x)) + (2.0 * q->mat.b * ro.x * ro.y) +\n         (2.0 * q->mat.c * ro.x * ro.z) + (2.0 * q->mat.d * ro.x) + (q->mat.e * (ro.y * ro.y)) +\n         (2.0 * q->mat.f * ro.y * ro.z) + (2.0 * q->mat.g * ro.y) + (q->mat.h * (ro.z * ro.z)) +\n         (2.0 * q->mat.i * ro.z) + q->mat.j;\n\n    if (Aq == 0.0) {\n        t1 = -Cq / Bq;\n        add_intersection(t1, (object *)q, ry);\n    }\n    else {\n        disc = (Bq * Bq - 4.0 * Aq * Cq);\n        if (disc > 0.0) {\n            disc = sqrt(disc);\n            t1 = (-Bq + disc) / (2.0 * Aq);\n            t2 = (-Bq - disc) / (2.0 * Aq);\n            add_intersection(t1, (object *)q, ry);\n            add_intersection(t2, (object *)q, ry);\n        }\n    }\n}\n\nvoid quadric_normal(quadric *q, vector *pnt, ray *incident, vector *N) {\n    N->x = (q->mat.a * (pnt->x - q->ctr.x) + q->mat.b * (pnt->y - q->ctr.y) +\n            q->mat.c * (pnt->z - q->ctr.z) + q->mat.d);\n\n    N->y = (q->mat.b * (pnt->x - q->ctr.x) + q->mat.e * (pnt->y - q->ctr.y) +\n            q->mat.f * (pnt->z - q->ctr.z) + q->mat.g);\n\n    N->z = (q->mat.c * (pnt->x - q->ctr.x) + q->mat.f * (pnt->y - q->ctr.y) +\n            q->mat.h * (pnt->z - q->ctr.z) + q->mat.i);\n\n    VNorm(N);\n\n    if (VDot(N, &(incident->d)) > 0.0) {\n        N->x = -N->x;\n        N->y = -N->y;\n        N->z = -N->z;\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/quadric.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * quadric.h - This file contains the defines for quadrics.\n *\n *  $Id: quadric.h,v 1.2 2007-02-22 17:54:16 Exp $\n */\n\ntypedef struct {\n    flt a;\n    flt b;\n    flt c;\n    flt d;\n    flt e;\n    flt f;\n    flt g;\n    flt h;\n    flt i;\n    flt j;\n} quadmatrix;\n\ntypedef struct {\n    unsigned int id; /* Unique Object serial number */\n    void *nextobj; /* pointer to next object in list */\n    object_methods *methods; /* this object's methods */\n    texture *tex; /* object texture */\n    vector ctr;\n    quadmatrix mat;\n} quadric;\n\nquadric *newquadric(void);\nvoid quadric_intersect(quadric *, ray *);\nvoid quadric_normal(quadric *, vector *, ray *, vector *);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/render.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * render.cpp - This file contains the main program and driver for the raytracer.\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"tgafile.hpp\"\n#include \"trace.hpp\"\n#include \"render.hpp\"\n#include \"util.hpp\"\n#include \"light.hpp\"\n#include \"global.hpp\"\n#include \"ui.hpp\"\n#include \"tachyon_video.hpp\"\n#include \"objbound.hpp\"\n#include \"grid.hpp\"\n\n/* how many pieces to divide each scanline into */\n#define NUMHORZDIV 1\n\nvoid renderscene(scenedef scene) {\n    //char msgtxt[2048];\n    //void * outfile;\n    /* Grid based accerlation scheme */\n    if (scene.boundmode == RT_BOUNDING_ENABLED)\n        engrid_scene(&rootobj); /* grid */\n    /* Not used now\n  if (scene.verbosemode) { \n    sprintf(msgtxt, \"Opening %s for output.\", scene.outfilename); \n    rt_ui_message(MSG_0, msgtxt);\n  }\n\n  createtgafile(scene.outfilename,  \n                  (unsigned short) scene.hres, \n                  (unsigned short) scene.vres);\n  outfile = opentgafile(scene.outfilename);\n  */\n\n    trace_region(scene, nullptr /*outfile*/, 0, 0, scene.hres, scene.vres);\n    //fclose((FILE *)outfile);\n} /* end of renderscene() */\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/render.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * render.h - This file contains the defines for the top level functions \n *\n *  $Id: render.h,v 1.2 2007-02-22 17:54:16 Exp $\n */\n\nvoid renderscene(scenedef);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/ring.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * ring.cpp - This file contains the functions for dealing with rings.\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n#include \"intersect.hpp\"\n#include \"util.hpp\"\n\n#define RING_PRIVATE\n#include \"ring.hpp\"\n\nstatic object_methods ring_methods = { (void (*)(void *, void *))(ring_intersect),\n                                       (void (*)(void *, void *, void *, void *))(ring_normal),\n                                       ring_bbox,\n                                       free };\n\nobject *newring(void *tex, vector ctr, vector norm, flt inrad, flt outrad) {\n    ring *r;\n\n    r = (ring *)rt_getmem(sizeof(ring));\n    memset(r, 0, sizeof(ring));\n    r->methods = &ring_methods;\n\n    r->tex = (texture *)tex;\n    r->ctr = ctr;\n    r->norm = norm;\n    r->inrad = inrad;\n    r->outrad = outrad;\n\n    return (object *)r;\n}\n\nstatic int ring_bbox(void *obj, vector *min, vector *max) {\n    ring *r = (ring *)obj;\n\n    min->x = r->ctr.x - r->outrad;\n    min->y = r->ctr.y - r->outrad;\n    min->z = r->ctr.z - r->outrad;\n    max->x = r->ctr.x + r->outrad;\n    max->y = r->ctr.y + r->outrad;\n    max->z = r->ctr.z + r->outrad;\n\n    return 1;\n}\n\nstatic void ring_intersect(ring *rng, ray *ry) {\n    flt d;\n    flt t, td;\n    vector hit, pnt;\n\n    d = -VDot(&(rng->ctr), &(rng->norm));\n\n    t = -(d + VDot(&(rng->norm), &(ry->o)));\n    td = VDot(&(rng->norm), &(ry->d));\n    if (td != 0.0) {\n        t = t / td;\n        if (t >= 0.0) {\n            hit = Raypnt(ry, t);\n            VSUB(hit, rng->ctr, pnt);\n            VDOT(td, pnt, pnt);\n            td = sqrt(td);\n            if ((td > rng->inrad) && (td < rng->outrad))\n                add_intersection(t, (object *)rng, ry);\n        }\n    }\n}\n\nstatic void ring_normal(ring *rng, vector *pnt, ray *incident, vector *N) {\n    *N = rng->norm;\n    VNorm(N);\n    if (VDot(N, &(incident->d)) > 0.0) {\n        N->x = -N->x;\n        N->y = -N->y;\n        N->z = -N->z;\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/ring.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * ring.h - This file contains the defines for rings etc.\n *\n *  $Id: ring.h,v 1.2 2007-02-22 17:54:16 Exp $\n */\n\nobject *newring(void *tex, vector ctr, vector norm, flt in, flt out);\n\n#ifdef RING_PRIVATE\ntypedef struct {\n    unsigned int id; /* Unique Object serial number */\n    void *nextobj; /* pointer to next object in list */\n    object_methods *methods; /* this object's methods */\n    texture *tex; /* object texture */\n    vector ctr;\n    vector norm;\n    flt inrad;\n    flt outrad;\n} ring;\n\nstatic int ring_bbox(void *obj, vector *min, vector *max);\nstatic void ring_intersect(ring *, ray *);\nstatic void ring_normal(ring *, vector *, ray *incident, vector *);\n#endif\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/shade.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * shade.cpp - This file contains the functions that perform surface shading.\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"light.hpp\"\n#include \"intersect.hpp\"\n#include \"vector.hpp\"\n#include \"trace.hpp\"\n#include \"global.hpp\"\n#include \"shade.hpp\"\n\nvoid reset_lights(void) {\n    numlights = 0;\n}\n\nvoid add_light(point_light* li) {\n    lightlist[numlights] = li;\n    numlights++;\n}\n\ncolor shader(ray* incident) {\n    color col, diffuse, phongcol;\n    vector N, L, hit;\n    ray shadowray;\n    flt inten, t, Llen;\n    object* obj;\n    int numints, i;\n    point_light* li;\n\n    numints = closest_intersection(&t, &obj, incident->intstruct);\n    /* find the number of intersections */\n    /* and return the closest one.      */\n\n    if (numints < 1) {\n        /* if there weren't any object intersections then return the */\n        /* background color for the pixel color.                     */\n        return incident->scene->background;\n    }\n\n    if (obj->tex->islight) { /* if the current object is a light, then we   */\n        return obj->tex->col; /* will only use the objects ambient color    */\n    }\n\n    RAYPNT(hit, (*incident), t) /* find the point of intersection from t */\n    obj->methods->normal(obj, &hit, incident, &N); /* find the surface normal */\n\n    /* execute the object's texture function */\n    col = obj->tex->texfunc(&hit, obj->tex, incident);\n\n    diffuse.r = 0.0;\n    diffuse.g = 0.0;\n    diffuse.b = 0.0;\n    phongcol = diffuse;\n\n    if ((obj->tex->diffuse > 0.0) || (obj->tex->phong > 0.0)) {\n        for (i = 0; i < numlights; i++) { /* loop for light contributions */\n            li = lightlist[i]; /* set li=to the current light */\n            VSUB(li->ctr, hit, L) /* find the light vector */\n\n            /* calculate the distance to the light from the hit point */\n            Llen = sqrt(L.x * L.x + L.y * L.y + L.z * L.z) + EPSILON;\n\n            L.x /= Llen; /* normalize the light direction vector */\n            L.y /= Llen;\n            L.z /= Llen;\n\n            VDOT(inten, N, L) /* light intensity */\n\n            /* add in diffuse lighting for this light if we're facing it */\n            if (inten > 0.0) {\n                /* test for a shadow */\n                shadowray.intstruct = incident->intstruct;\n                shadowray.flags = RT_RAY_SHADOW | RT_RAY_BOUNDED;\n                incident->serial++;\n                shadowray.serial = incident->serial;\n                shadowray.mbox = incident->mbox;\n                shadowray.o = hit;\n                shadowray.d = L;\n                shadowray.maxdist = Llen;\n                shadowray.s = hit;\n                shadowray.e = li->ctr;\n                shadowray.scene = incident->scene;\n                reset_intersection(incident->intstruct);\n                intersect_objects(&shadowray);\n\n                if (!shadow_intersection(incident->intstruct, Llen)) {\n                    /* XXX now that opacity is in the code, have to be more careful */\n                    ColorAddS(&diffuse, &li->tex->col, inten);\n\n                    /* phong type specular highlights */\n                    if (obj->tex->phong > 0.0) {\n                        flt phongval;\n                        phongval = shade_phong(incident, &hit, &N, &L, obj->tex->phongexp);\n                        if (obj->tex->phongtype)\n                            ColorAddS(&phongcol, &col, phongval);\n                        else\n                            ColorAddS(&phongcol, &(li->tex->col), phongval);\n                    }\n                }\n            }\n        }\n    }\n\n    ColorScale(&diffuse, obj->tex->diffuse);\n\n    col.r *= (diffuse.r + obj->tex->ambient); /* do a product of the */\n    col.g *= (diffuse.g + obj->tex->ambient); /* diffuse intensity with */\n    col.b *= (diffuse.b + obj->tex->ambient); /* object color + ambient */\n\n    if (obj->tex->phong > 0.0) {\n        ColorAccum(&col, &phongcol);\n    }\n\n    /* spawn reflection rays if necessary */\n    /* note: this will overwrite the old intersection list */\n    if (obj->tex->specular > 0.0) {\n        color specol;\n        specol = shade_reflection(incident, &hit, &N, obj->tex->specular);\n        ColorAccum(&col, &specol);\n    }\n\n    /* spawn transmission rays / refraction */\n    /* note: this will overwrite the old intersection list */\n    if (obj->tex->opacity < 1.0) {\n        color transcol;\n        transcol = shade_transmission(incident, &hit, 1.0 - obj->tex->opacity);\n        ColorAccum(&col, &transcol);\n    }\n\n    return col; /* return the color of the shaded pixel... */\n}\n\ncolor shade_reflection(ray* incident, vector* hit, vector* N, flt specular) {\n    ray specray;\n    color col;\n    vector R;\n\n    VAddS(-2.0 * (incident->d.x * N->x + incident->d.y * N->y + incident->d.z * N->z),\n          N,\n          &incident->d,\n          &R);\n\n    specray.intstruct = incident->intstruct; /* what thread are we */\n    specray.depth = incident->depth - 1; /* go up a level in recursion depth */\n    specray.flags = RT_RAY_REGULAR; /* infinite ray, to start with */\n    specray.serial = incident->serial + 1; /* next serial number */\n    specray.mbox = incident->mbox;\n    specray.o = *hit;\n    specray.d = R; /* reflect incident ray about normal */\n    specray.o = Raypnt(&specray, EPSILON); /* avoid numerical precision bugs */\n    specray.maxdist = FHUGE; /* take any intersection */\n    specray.scene = incident->scene; /* global scenedef info */\n    col = trace(&specray); /* trace specular reflection ray */\n\n    incident->serial = specray.serial; /* update the serial number */\n\n    ColorScale(&col, specular);\n\n    return col;\n}\n\ncolor shade_transmission(ray* incident, vector* hit, flt trans) {\n    ray transray;\n    color col;\n\n    transray.intstruct = incident->intstruct; /* what thread are we   */\n    transray.depth = incident->depth - 1; /* go up a level in recursion depth */\n    transray.flags = RT_RAY_REGULAR; /* infinite ray, to start with */\n    transray.serial = incident->serial + 1; /* update serial number */\n    transray.mbox = incident->mbox;\n    transray.o = *hit;\n    transray.d = incident->d; /* ray continues along incident path */\n    transray.o = Raypnt(&transray, EPSILON); /* avoid numerical precision bugs */\n    transray.maxdist = FHUGE; /* take any intersection */\n    transray.scene = incident->scene; /* global scenedef info */\n    col = trace(&transray); /* trace transmission ray */\n\n    incident->serial = transray.serial;\n\n    ColorScale(&col, trans);\n\n    return col;\n}\n\nflt shade_phong(ray* incident, vector* hit, vector* N, vector* L, flt specpower) {\n    vector H, V;\n    flt inten;\n\n    V = incident->d;\n    VScale(&V, -1.0);\n    VAdd(&V, L, &H);\n    VScale(&H, 0.5);\n    VNorm(&H);\n    inten = VDot(N, &H);\n    if (inten > 0.0)\n        inten = pow(inten, specpower);\n    else\n        inten = 0.0;\n\n    return inten;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/shade.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * shade.h - This file contains declarations and definitions for the shader.\n *\n *  $Id: shade.h,v 1.2 2007-02-22 17:54:16 Exp $\n */\n\nvoid reset_lights(void);\nvoid add_light(point_light *);\n\ncolor shader(ray *);\ncolor shade_reflection(ray *, vector *, vector *, flt);\ncolor shade_transmission(ray *, vector *, flt);\nflt shade_phong(ray *incident, vector *hit, vector *N, vector *L, flt specpower);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/sphere.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * sphere.cpp - This file contains the functions for dealing with spheres.\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n#include \"intersect.hpp\"\n#include \"util.hpp\"\n\n#define SPHERE_PRIVATE\n#include \"sphere.hpp\"\n\nstatic object_methods sphere_methods = { (void (*)(void *, void *))(sphere_intersect),\n                                         (void (*)(void *, void *, void *, void *))(sphere_normal),\n                                         sphere_bbox,\n                                         free };\n\nobject *newsphere(void *tex, vector ctr, flt rad) {\n    sphere *s;\n\n    s = (sphere *)rt_getmem(sizeof(sphere));\n    memset(s, 0, sizeof(sphere));\n    s->methods = &sphere_methods;\n\n    s->tex = (texture *)tex;\n    s->ctr = ctr;\n    s->rad = rad;\n\n    return (object *)s;\n}\n\nstatic int sphere_bbox(void *obj, vector *min, vector *max) {\n    sphere *s = (sphere *)obj;\n\n    min->x = s->ctr.x - s->rad;\n    min->y = s->ctr.y - s->rad;\n    min->z = s->ctr.z - s->rad;\n    max->x = s->ctr.x + s->rad;\n    max->y = s->ctr.y + s->rad;\n    max->z = s->ctr.z + s->rad;\n\n    return 1;\n}\n\nstatic void sphere_intersect(sphere *spr, ray *ry) {\n    flt b, disc, t1, t2, temp;\n    vector V;\n\n    VSUB(spr->ctr, ry->o, V);\n    VDOT(b, V, ry->d);\n    VDOT(temp, V, V);\n\n    disc = b * b + spr->rad * spr->rad - temp;\n\n    if (disc <= 0.0)\n        return;\n    disc = sqrt(disc);\n\n    t2 = b + disc;\n    if (t2 <= SPEPSILON)\n        return;\n    add_intersection(t2, (object *)spr, ry);\n\n    t1 = b - disc;\n    if (t1 > SPEPSILON)\n        add_intersection(t1, (object *)spr, ry);\n}\n\nstatic void sphere_normal(sphere *spr, vector *pnt, ray *incident, vector *N) {\n    VSub((vector *)pnt, &(spr->ctr), N);\n\n    VNorm(N);\n\n    if (VDot(N, &(incident->d)) > 0.0) {\n        N->x = -N->x;\n        N->y = -N->y;\n        N->z = -N->z;\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/sphere.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * sphere.h - This file contains the defines for spheres etc.\n *\n *  $Id: sphere.h,v 1.2 2007-02-22 17:54:16 Exp $\n */\n\nobject *newsphere(void *, vector, flt);\n\n#ifdef SPHERE_PRIVATE\n\ntypedef struct {\n    unsigned int id; /* Unique Object serial number */\n    void *nextobj; /* pointer to next object in list */\n    object_methods *methods; /* this object's methods */\n    texture *tex; /* object texture */\n    vector ctr;\n    flt rad;\n} sphere;\n\nstatic int sphere_bbox(void *obj, vector *min, vector *max);\nstatic void sphere_intersect(sphere *, ray *);\nstatic void sphere_normal(sphere *, vector *, ray *, vector *);\n\n#endif /* SPHERE_PRIVATE */\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/tachyon_video.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n#include <cstdio>\n#include <cstdlib>\n#include <cstring>\n\n#include \"types.hpp\"\n#include \"api.hpp\" /* The ray tracing library API */\n#include \"ui.hpp\"\n#include \"util.hpp\"\n#include \"tachyon_video.hpp\"\n\nextern SceneHandle global_scene;\nextern char *global_window_title;\nextern bool global_usegraphics;\n\nvoid tachyon_video::on_process() {\n    char buf[8192];\n    flt runtime;\n    scenedef *scene = (scenedef *)global_scene;\n    updating_mode = scene->displaymode == RT_DISPLAY_ENABLED;\n    recycling = false;\n    pausing = false;\n    do {\n        updating = updating_mode;\n        timer start_timer = gettimer();\n        rt_renderscene(global_scene);\n        timer end_timer = gettimer();\n        runtime = timertime(start_timer, end_timer);\n        sprintf(buf, \"%s: %.3f seconds\", global_window_title, runtime);\n        rt_ui_message(MSG_0, buf);\n        title = buf;\n        show_title(); // show time spent for rendering\n        if (!updating) {\n            updating = true;\n            drawing_memory dm = get_drawing_memory();\n            drawing_area drawing(0, 0, dm.sizex, dm.sizey); // invalidate whole screen\n        }\n        rt_finalize();\n        title = global_window_title;\n        show_title(); // reset title to default\n    } while (recycling && running);\n}\n\nvoid tachyon_video::on_key(int key) {\n    key &= 0xff;\n    recycling = true;\n    if (key == esc_key)\n        running = false;\n    else if (key == ' ') {\n        if (!updating) {\n            updating = true;\n            drawing_memory dm = get_drawing_memory();\n            drawing_area drawing(0, 0, dm.sizex, dm.sizey); // invalidate whole screen\n        }\n        updating = updating_mode = !updating_mode;\n    }\n    else if (key == 'p') {\n        pausing = !pausing;\n        if (pausing) {\n            title = \"Press ESC to exit or 'p' to continue after rendering completion\";\n            show_title();\n        }\n    }\n}\n\nvoid rt_finalize(void) {\n    timer t0, t1;\n    t0 = gettimer();\n    if (global_usegraphics)\n        do {\n            rt_sleep(1);\n            t1 = gettimer();\n        } while ((timertime(t0, t1) < 10 || video->pausing) && video->next_frame());\n#ifdef _WINDOWS\n    else\n        rt_sleep(10000);\n#endif\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/tachyon_video.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n#include \"common/gui/video.hpp\"\n\nclass tachyon_video : public video {\npublic:\n    bool updating_mode;\n    bool recycling;\n    bool pausing;\n    void on_process();\n    void on_key(int key);\n};\n\nextern class tachyon_video *video;\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/texture.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * texture.cpp - This file contains functions for implementing textures.\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"texture.hpp\"\n#include \"coordsys.hpp\"\n#include \"imap.hpp\"\n#include \"vector.hpp\"\n#include \"box.hpp\"\n\n/* plain vanilla texture solely based on object color */\ncolor standard_texture(vector *hit, texture *tex, ray *ry) {\n    return tex->col;\n}\n\n/* cylindrical image map */\ncolor image_cyl_texture(vector *hit, texture *tex, ray *ry) {\n    vector rh;\n    flt u, v;\n\n    rh.x = hit->x - tex->ctr.x;\n    rh.z = hit->y - tex->ctr.y;\n    rh.y = hit->z - tex->ctr.z;\n\n    xyztocyl(rh, 1.0, &u, &v);\n\n    u = u * tex->scale.x;\n    u = u + tex->rot.x;\n    u = fmod(u, 1.0);\n    if (u < 0.0)\n        u += 1.0;\n\n    v = v * tex->scale.y;\n    v = v + tex->rot.y;\n    v = fmod(v, 1.0);\n    if (v < 0.0)\n        v += 1.0;\n\n    return ImageMap((rawimage *)tex->img, u, v);\n}\n\n/* spherical image map */\ncolor image_sphere_texture(vector *hit, texture *tex, ray *ry) {\n    vector rh;\n    flt u, v;\n\n    rh.x = hit->x - tex->ctr.x;\n    rh.y = hit->y - tex->ctr.y;\n    rh.z = hit->z - tex->ctr.z;\n\n    xyztospr(rh, &u, &v);\n\n    u = u * tex->scale.x;\n    u = u + tex->rot.x;\n    u = fmod(u, 1.0);\n    if (u < 0.0)\n        u += 1.0;\n\n    v = v * tex->scale.y;\n    v = v + tex->rot.y;\n    v = fmod(v, 1.0);\n    if (v < 0.0)\n        v += 1.0;\n\n    return ImageMap((rawimage *)tex->img, u, v);\n}\n\n/* planar image map */\ncolor image_plane_texture(vector *hit, texture *tex, ray *ry) {\n    vector pnt;\n    flt u, v;\n\n    pnt.x = hit->x - tex->ctr.x;\n    pnt.y = hit->y - tex->ctr.y;\n    pnt.z = hit->z - tex->ctr.z;\n\n    VDOT(u, tex->uaxs, pnt);\n    /*  VDOT(len, tex->uaxs, tex->uaxs);\n  u = u / sqrt(len); */\n\n    VDOT(v, tex->vaxs, pnt);\n    /*  VDOT(len, tex->vaxs, tex->vaxs);\n  v = v / sqrt(len); */\n\n    u = u * tex->scale.x;\n    u = u + tex->rot.x;\n    u = fmod(u, 1.0);\n    if (u < 0.0)\n        u += 1.0;\n\n    v = v * tex->scale.y;\n    v = v + tex->rot.y;\n    v = fmod(v, 1.0);\n    if (v < 0.0)\n        v += 1.0;\n\n    return ImageMap((rawimage *)tex->img, u, v);\n}\n\ncolor grit_texture(vector *hit, texture *tex, ray *ry) {\n    int rnum;\n    flt fnum;\n    color col;\n\n    rnum = rand() % 4096;\n    fnum = (rnum / 4096.0 * 0.2) + 0.8;\n\n    col.r = tex->col.r * fnum;\n    col.g = tex->col.g * fnum;\n    col.b = tex->col.b * fnum;\n\n    return col;\n}\n\ncolor checker_texture(vector *hit, texture *tex, ray *ry) {\n    long x, y, z;\n    flt xh, yh, zh;\n    color col;\n\n    xh = hit->x - tex->ctr.x;\n    x = (long)((fabs(xh) * 3) + 0.5);\n    x = x % 2;\n    yh = hit->y - tex->ctr.y;\n    y = (long)((fabs(yh) * 3) + 0.5);\n    y = y % 2;\n    zh = hit->z - tex->ctr.z;\n    z = (long)((fabs(zh) * 3) + 0.5);\n    z = z % 2;\n\n    if (((x + y + z) % 2) == 1) {\n        col.r = 1.0;\n        col.g = 0.2;\n        col.b = 0.0;\n    }\n    else {\n        col.r = 0.0;\n        col.g = 0.2;\n        col.b = 1.0;\n    }\n\n    return col;\n}\n\ncolor cyl_checker_texture(vector *hit, texture *tex, ray *ry) {\n    long x, y;\n    vector rh;\n    flt u, v;\n    color col;\n\n    rh.x = hit->x - tex->ctr.x;\n    rh.y = hit->y - tex->ctr.y;\n    rh.z = hit->z - tex->ctr.z;\n\n    xyztocyl(rh, 1.0, &u, &v);\n\n    x = (long)(fabs(u) * 18.0);\n    x = x % 2;\n    y = (long)(fabs(v) * 10.0);\n    y = y % 2;\n\n    if (((x + y) % 2) == 1) {\n        col.r = 1.0;\n        col.g = 0.2;\n        col.b = 0.0;\n    }\n    else {\n        col.r = 0.0;\n        col.g = 0.2;\n        col.b = 1.0;\n    }\n\n    return col;\n}\n\ncolor wood_texture(vector *hit, texture *tex, ray *ry) {\n    flt radius, angle;\n    int grain;\n    color col;\n    flt x, y, z;\n\n    x = (hit->x - tex->ctr.x) * 1000;\n    y = (hit->y - tex->ctr.y) * 1000;\n    z = (hit->z - tex->ctr.z) * 1000;\n\n    radius = sqrt(x * x + z * z);\n    if (z == 0.0)\n        angle = 3.1415926 / 2.0;\n    else\n        angle = atan(x / z);\n\n    radius = radius + 3.0 * sin(20 * angle + y / 150.0);\n    grain = ((int)(radius + 0.5)) % 60;\n    if (grain < 40) {\n        col.r = 0.8;\n        col.g = 1.0;\n        col.b = 0.2;\n    }\n    else {\n        col.r = 0.0;\n        col.g = 0.0;\n        col.b = 0.0;\n    }\n\n    return col;\n}\n\n#define NMAX 28\nshort int NoiseMatrix[NMAX][NMAX][NMAX];\n\nvoid InitNoise(void) {\n    byte_t x, y, z, i, j, k;\n\n    for (x = 0; x < NMAX; x++) {\n        for (y = 0; y < NMAX; y++) {\n            for (z = 0; z < NMAX; z++) {\n                NoiseMatrix[x][y][z] = rand() % 12000;\n\n                if (x == NMAX - 1)\n                    i = 0;\n                else\n                    i = x;\n\n                if (y == NMAX - 1)\n                    j = 0;\n                else\n                    j = y;\n\n                if (z == NMAX - 1)\n                    k = 0;\n                else\n                    k = z;\n\n                NoiseMatrix[x][y][z] = NoiseMatrix[i][j][k];\n            }\n        }\n    }\n}\n\nint Noise(flt x, flt y, flt z) {\n    byte_t ix, iy, iz;\n    flt ox, oy, oz;\n    int p000, p001, p010, p011;\n    int p100, p101, p110, p111;\n    int p00, p01, p10, p11;\n    int p0, p1;\n    int d00, d01, d10, d11;\n    int d0, d1, d;\n\n    x = fabs(x);\n    y = fabs(y);\n    z = fabs(z);\n\n    ix = ((int)x) % (NMAX - 1);\n    iy = ((int)y) % (NMAX - 1);\n    iz = ((int)z) % (NMAX - 1);\n\n    ox = (x - ((int)x));\n    oy = (y - ((int)y));\n    oz = (z - ((int)z));\n\n    p000 = NoiseMatrix[ix][iy][iz];\n    p001 = NoiseMatrix[ix][iy][iz + 1];\n    p010 = NoiseMatrix[ix][iy + 1][iz];\n    p011 = NoiseMatrix[ix][iy + 1][iz + 1];\n    p100 = NoiseMatrix[ix + 1][iy][iz];\n    p101 = NoiseMatrix[ix + 1][iy][iz + 1];\n    p110 = NoiseMatrix[ix + 1][iy + 1][iz];\n    p111 = NoiseMatrix[ix + 1][iy + 1][iz + 1];\n\n    d00 = p100 - p000;\n    d01 = p101 - p001;\n    d10 = p110 - p010;\n    d11 = p111 - p011;\n\n    p00 = (int)((int)d00 * ox) + p000;\n    p01 = (int)((int)d01 * ox) + p001;\n    p10 = (int)((int)d10 * ox) + p010;\n    p11 = (int)((int)d11 * ox) + p011;\n    d0 = p10 - p00;\n    d1 = p11 - p01;\n    p0 = (int)((int)d0 * oy) + p00;\n    p1 = (int)((int)d1 * oy) + p01;\n    d = p1 - p0;\n\n    return (int)((int)d * oz) + p0;\n}\n\ncolor marble_texture(vector *hit, texture *tex, ray *ry) {\n    flt i, d;\n    flt x, y, z;\n    color col;\n\n    x = hit->x;\n    y = hit->y;\n    z = hit->z;\n\n    x = x * 1.0;\n\n    d = x + 0.0006 * Noise(x, (y * 1.0), (z * 1.0));\n    d = d * (((int)d) % 25);\n    i = 0.0 + 0.10 * fabs(d - 10.0 - 20.0 * ((int)d * 0.05));\n    if (i > 1.0)\n        i = 1.0;\n    if (i < 0.0)\n        i = 0.0;\n\n    /*\n  col.r=i * tex->col.r;\n  col.g=i * tex->col.g;\n  col.b=i * tex->col.b;\n*/\n\n    col.r = (1.0 + sin(i * 6.28)) / 2.0;\n    col.g = (1.0 + sin(i * 16.28)) / 2.0;\n    col.b = (1.0 + cos(i * 30.28)) / 2.0;\n\n    return col;\n}\n\ncolor gnoise_texture(vector *hit, texture *tex, ray *ry) {\n    color col;\n    flt f;\n\n    f = Noise((hit->x - tex->ctr.x), (hit->y - tex->ctr.y), (hit->z - tex->ctr.z));\n\n    if (f < 0.01)\n        f = 0.01;\n    if (f > 1.0)\n        f = 1.0;\n\n    col.r = tex->col.r * f;\n    col.g = tex->col.g * f;\n    col.b = tex->col.b * f;\n\n    return col;\n}\n\nvoid InitTextures(void) {\n    InitNoise();\n    ResetImages();\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/texture.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * texture.h This file contains all of the includes and defines for the texture \n * mapping part of the shader.\n *\n *  $Id: texture.h,v 1.2 2007-02-22 17:54:16 Exp $\n */\n\nvoid InitTextures(void);\ncolor standard_texture(vector *, texture *, ray *);\ncolor image_cyl_texture(vector *, texture *, ray *);\ncolor image_sphere_texture(vector *, texture *, ray *);\ncolor image_plane_texture(vector *, texture *, ray *);\ncolor checker_texture(vector *, texture *, ray *);\ncolor cyl_checker_texture(vector *, texture *, ray *);\ncolor grit_texture(vector *, texture *, ray *);\ncolor wood_texture(vector *, texture *, ray *);\ncolor marble_texture(vector *, texture *, ray *);\ncolor gnoise_texture(vector *, texture *, ray *);\nint Noise(flt, flt, flt);\nvoid InitTextures(void);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/tgafile.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * tgafile.cpp - This file contains the code to write 24 bit targa files...\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"util.hpp\"\n#include \"ui.hpp\"\n#include \"imageio.hpp\"\n#include \"tgafile.hpp\"\n\nvoid createtgafile(char *name, unsigned short width, unsigned short height) {\n    int filesize;\n    FILE *ofp;\n\n    filesize = 3 * width * height + 18 - 10;\n\n    if (name == nullptr)\n        std::exit(-1);\n    else {\n        ofp = fopen(name, \"w+b\");\n        if (ofp == nullptr) {\n            char msgtxt[2048];\n            sprintf(msgtxt, \"Cannot create %s for output!\", name);\n            rt_ui_message(MSG_ERR, msgtxt);\n            rt_ui_message(MSG_ABORT, \"Rendering Aborted.\");\n            std::exit(-1);\n        }\n\n        fputc(0, ofp); /* IdLength      */\n        fputc(0, ofp); /* ColorMapType  */\n        fputc(2, ofp); /* ImageTypeCode */\n        fputc(0, ofp); /* ColorMapOrigin, low byte  */\n        fputc(0, ofp); /* ColorMapOrigin, high byte */\n        fputc(0, ofp); /* ColorMapLength, low byte  */\n        fputc(0, ofp); /* ColorMapLength, high byte */\n        fputc(0, ofp); /* ColorMapEntrySize  */\n        fputc(0, ofp); /* XOrigin, low byte  */\n        fputc(0, ofp); /* XOrigin, high byte */\n        fputc(0, ofp); /* YOrigin, low byte  */\n        fputc(0, ofp); /* YOrigin, high byte */\n        fputc((width & 0xff), ofp); /* Width, low byte */\n        fputc(((width >> 8) & 0xff), ofp); /* Width, high byte */\n        fputc((height & 0xff), ofp); /* Height, low byte */\n        fputc(((height >> 8) & 0xff), ofp); /* Height, high byte */\n        fputc(24, ofp); /* ImagePixelSize */\n        fputc(0x20, ofp); /* ImageDescriptorByte 0x20 == flip vertically */\n\n        fseek(ofp, filesize, 0);\n        fprintf(ofp, \"9876543210\");\n\n        fclose(ofp);\n    }\n}\n\nvoid *opentgafile(char *filename) {\n    FILE *ofp;\n\n    ofp = fopen(filename, \"r+b\");\n    if (ofp == nullptr) {\n        char msgtxt[2048];\n        sprintf(msgtxt, \"Cannot open %s for output!\", filename);\n        rt_ui_message(MSG_ERR, msgtxt);\n        rt_ui_message(MSG_ABORT, \"Rendering Aborted.\");\n        std::exit(-1);\n    }\n\n    return ofp;\n}\n\nvoid writetgaregion(void *voidofp,\n                    int iwidth,\n                    int iheight,\n                    int startx,\n                    int starty,\n                    int stopx,\n                    int stopy,\n                    char *buffer) {\n    int y, totalx, totaly;\n    char *bufpos;\n    long filepos;\n    std::size_t numbytes;\n    FILE *ofp = (FILE *)voidofp;\n\n    totalx = stopx - startx + 1;\n    totaly = stopy - starty + 1;\n\n    for (y = 0; y < totaly; y++) {\n        bufpos = buffer + (totalx * 3) * (totaly - y - 1);\n        filepos = 18 + iwidth * 3 * (iheight - starty - totaly + y + 1) + (startx - 1) * 3;\n\n        if (filepos >= 18) {\n            fseek(ofp, filepos, 0);\n            numbytes = fwrite(bufpos, 3, totalx, ofp);\n\n            if (numbytes != totalx) {\n                char msgtxt[256];\n                sprintf(msgtxt, \"File write problem, %d bytes written.\", (int)numbytes);\n                rt_ui_message(MSG_ERR, msgtxt);\n            }\n        }\n        else {\n            rt_ui_message(MSG_ERR, \"writetgaregion: file ptr out of range!!!\\n\");\n            return; /* don't try to continue */\n        }\n    }\n}\n\nint readtga(char *name, int *xres, int *yres, unsigned char **imgdata) {\n    int format, width, height, w1, w2, h1, h2, depth, flags;\n    int imgsize, i, tmp;\n    std::size_t bytesread;\n    FILE *ifp;\n\n    ifp = fopen(name, \"r\");\n    if (ifp == nullptr) {\n        return IMAGEBADFILE; /* couldn't open the file */\n    }\n\n    /* read the targa header */\n    getc(ifp); /* ID length */\n    getc(ifp); /* colormap type */\n    format = getc(ifp); /* image type */\n    getc(ifp); /* color map origin */\n    getc(ifp); /* color map origin */\n    getc(ifp); /* color map length */\n    getc(ifp); /* color map length */\n    getc(ifp); /* color map entry size */\n    getc(ifp); /* x origin */\n    getc(ifp); /* x origin */\n    getc(ifp); /* y origin */\n    getc(ifp); /* y origin */\n    w1 = getc(ifp); /* width (low) */\n    w2 = getc(ifp); /* width (hi) */\n    h1 = getc(ifp); /* height (low) */\n    h2 = getc(ifp); /* height (hi) */\n    depth = getc(ifp); /* image pixel size */\n    flags = getc(ifp); /* image descriptor byte */\n\n    if ((format != 2) || (depth != 24)) {\n        fclose(ifp);\n        return IMAGEUNSUP; /* unsupported targa format */\n    }\n\n    width = ((w2 << 8) | w1);\n    height = ((h2 << 8) | h1);\n\n    imgsize = 3 * width * height;\n    *imgdata = (unsigned char *)rt_getmem(imgsize);\n    bytesread = fread(*imgdata, 1, imgsize, ifp);\n    fclose(ifp);\n\n    /* flip image vertically */\n    if (flags == 0x20) {\n        int rowsize = 3 * width;\n        unsigned char *copytmp;\n\n        copytmp = (unsigned char *)malloc(rowsize);\n\n        for (i = 0; i < height / 2; i++) {\n            memcpy(copytmp, &((*imgdata)[rowsize * i]), rowsize);\n            memcpy(&(*imgdata)[rowsize * i], &(*imgdata)[rowsize * (height - 1 - i)], rowsize);\n            memcpy(&(*imgdata)[rowsize * (height - 1 - i)], copytmp, rowsize);\n        }\n\n        free(copytmp);\n    }\n\n    /* convert from BGR order to RGB order */\n    for (i = 0; i < imgsize; i += 3) {\n        tmp = (*imgdata)[i]; /* Blue */\n        (*imgdata)[i] = (*imgdata)[i + 2]; /* Red */\n        (*imgdata)[i + 2] = tmp; /* Blue */\n    }\n\n    *xres = width;\n    *yres = height;\n\n    if (bytesread != imgsize)\n        return IMAGEREADERR;\n\n    return IMAGENOERR;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/tgafile.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * tgafile.h - this file contains defines and structures for tgafile.c\n *\n *  $Id: tgafile.h,v 1.2 2007-02-22 17:54:16 Exp $\n */\n\n/* declare other functions */\nvoid createtgafile(char *, unsigned short, unsigned short);\nvoid *opentgafile(char *);\nvoid writetgaregion(void *, int, int, int, int, int, int, char *);\n\nint readtga(char *name, int *xres, int *yres, unsigned char **imgdata);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/trace.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * trace.h - This file contains the declarations and defines for the trace module\n *\n *   $Id: trace.h,v 1.2 2007-02-22 17:54:16 Exp $\n */\n\nextern char *global_buffer;\n\ntypedef struct {\n    int tid;\n    int nthr;\n    scenedef scene;\n    char *buffer;\n    int startx;\n    int stopx;\n    int starty;\n    int stopy;\n} thr_parms;\n\ntypedef struct {\n    int startx;\n    int stopx;\n    int starty;\n    int stopy;\n} patch;\n\ntypedef struct {\n    void *tga;\n    int iwidth;\n    int iheight;\n    int startx;\n    int starty;\n    int stopx;\n    int stopy;\n    char *buffer;\n} thr_io_parms;\n\ncolor trace(ray *);\n\nvoid *thread_trace(thr_parms *parms);\n\nvoid thread_trace1(thr_parms *, patch *, int depth);\nvoid thread_trace2(thr_parms *, patch *);\n\nvoid *thread_io(void *);\n\nvoid trace_shm(scenedef, /*char *,*/ int, int, int, int);\n\nvoid trace_region(scenedef, void *, int, int, int, int);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/trace.omp.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n#include <omp.h>\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n#include \"tgafile.hpp\"\n#include \"trace.hpp\"\n#include \"light.hpp\"\n#include \"shade.hpp\"\n#include \"camera.hpp\"\n#include \"util.hpp\"\n#include \"intersect.hpp\"\n#include \"global.hpp\"\n#include \"ui.hpp\"\n#include \"tachyon_video.hpp\"\n\n// shared but read-only so could be private too\nstatic thr_parms *all_parms;\nstatic scenedef scene;\nstatic int startx;\nstatic int stopx;\nstatic int starty;\nstatic int stopy;\nstatic flt jitterscale;\nstatic int totaly;\n\nstatic color_t render_one_pixel(int x,\n                                int y,\n                                unsigned int *local_mbox,\n                                unsigned int &serial,\n                                int startx,\n                                int stopx,\n                                int starty,\n                                int stopy) {\n    /* private vars moved inside loop */\n    ray primary, sample;\n    color col, avcol;\n    int R, G, B;\n    intersectstruct local_intersections;\n    int alias;\n    /* end private */\n\n    primary = camray(&scene, x, y);\n    primary.intstruct = &local_intersections;\n    primary.flags = RT_RAY_REGULAR;\n\n    serial++;\n    primary.serial = serial;\n    primary.mbox = local_mbox;\n    primary.maxdist = FHUGE;\n    primary.scene = &scene;\n    col = trace(&primary);\n\n    serial = primary.serial;\n\n    /* perform antialiasing if enabled.. */\n    if (scene.antialiasing > 0) {\n        for (alias = 0; alias < scene.antialiasing; alias++) {\n            serial++; /* increment serial number */\n            sample = primary; /* copy the regular primary ray to start with */\n            sample.serial = serial;\n\n#pragma omp critical\n            {\n                sample.d.x += ((rand() % 100) - 50) / jitterscale;\n                sample.d.y += ((rand() % 100) - 50) / jitterscale;\n                sample.d.z += ((rand() % 100) - 50) / jitterscale;\n            }\n\n            avcol = trace(&sample);\n\n            serial = sample.serial; /* update our overall serial # */\n\n            col.r += avcol.r;\n            col.g += avcol.g;\n            col.b += avcol.b;\n        }\n\n        col.r /= (scene.antialiasing + 1.0);\n        col.g /= (scene.antialiasing + 1.0);\n        col.b /= (scene.antialiasing + 1.0);\n    }\n\n    /* Handle overexposure and underexposure here... */\n    R = (int)(col.r * 255);\n    if (R > 255)\n        R = 255;\n    else if (R < 0)\n        R = 0;\n\n    G = (int)(col.g * 255);\n    if (G > 255)\n        G = 255;\n    else if (G < 0)\n        G = 0;\n\n    B = (int)(col.b * 255);\n    if (B > 255)\n        B = 255;\n    else if (B < 0)\n        B = 0;\n\n    return video->get_color(R, G, B);\n}\n\nstatic void parallel_thread(void) {\n    // thread-local storage\n    unsigned int serial = 1;\n    unsigned int mboxsize = sizeof(unsigned int) * (max_objectid() + 20);\n    unsigned int *local_mbox = (unsigned int *)alloca(mboxsize);\n    memset(local_mbox, 0, mboxsize);\n\n#pragma omp for nowait schedule(runtime)\n    for (int y = starty; y < stopy; y++) {\n        if (!video->running)\n            continue;\n        drawing_area drawing(startx, totaly - y, stopx - startx, 1);\n        for (int x = startx; x < stopx; x++) {\n            color_t c = render_one_pixel(x, y, local_mbox, serial, startx, stopx, starty, stopy);\n            drawing.put_pixel(c);\n        }\n        video->next_frame();\n    }\n}\n\nvoid *thread_trace(thr_parms *parms) {\n    // shared but read-only so could be private too\n    all_parms = parms;\n    scene = parms->scene;\n    startx = parms->startx;\n    stopx = parms->stopx;\n    starty = parms->starty;\n    stopy = parms->stopy;\n    jitterscale = 40.0 * (scene.hres + scene.vres);\n    totaly = parms->scene.vres - 1;\n\n#pragma omp parallel\n    parallel_thread();\n\n    return (nullptr);\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/trace.serial.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n#include \"tgafile.hpp\"\n#include \"trace.hpp\"\n#include \"light.hpp\"\n#include \"shade.hpp\"\n#include \"camera.hpp\"\n#include \"util.hpp\"\n#include \"intersect.hpp\"\n#include \"global.hpp\"\n#include \"ui.hpp\"\n#include \"tachyon_video.hpp\"\n\n// shared but read-only so could be private too\nstatic thr_parms *all_parms;\nstatic scenedef scene;\nstatic int startx;\nstatic int stopx;\nstatic int starty;\nstatic int stopy;\nstatic flt jitterscale;\nstatic int totaly;\n\nstatic color_t render_one_pixel(int x,\n                                int y,\n                                unsigned int *local_mbox,\n                                unsigned int &serial,\n                                int startx,\n                                int stopx,\n                                int starty,\n                                int stopy) {\n    /* private vars moved inside loop */\n    ray primary, sample;\n    color col, avcol;\n    int R, G, B;\n    intersectstruct local_intersections;\n    int alias;\n    /* end private */\n\n    primary = camray(&scene, x, y);\n    primary.intstruct = &local_intersections;\n    primary.flags = RT_RAY_REGULAR;\n\n    serial++;\n    primary.serial = serial;\n    primary.mbox = local_mbox;\n    primary.maxdist = FHUGE;\n    primary.scene = &scene;\n    col = trace(&primary);\n\n    serial = primary.serial;\n\n    /* perform antialiasing if enabled.. */\n    if (scene.antialiasing > 0) {\n        for (alias = 0; alias < scene.antialiasing; alias++) {\n            serial++; /* increment serial number */\n            sample = primary; /* copy the regular primary ray to start with */\n            sample.serial = serial;\n\n            {\n                sample.d.x += ((std::rand() % 100) - 50) / jitterscale;\n                sample.d.y += ((std::rand() % 100) - 50) / jitterscale;\n                sample.d.z += ((std::rand() % 100) - 50) / jitterscale;\n            }\n\n            avcol = trace(&sample);\n\n            serial = sample.serial; /* update our overall serial # */\n\n            col.r += avcol.r;\n            col.g += avcol.g;\n            col.b += avcol.b;\n        }\n\n        col.r /= (scene.antialiasing + 1.0);\n        col.g /= (scene.antialiasing + 1.0);\n        col.b /= (scene.antialiasing + 1.0);\n    }\n\n    /* Handle overexposure and underexposure here... */\n    R = (int)(col.r * 255);\n    if (R > 255)\n        R = 255;\n    else if (R < 0)\n        R = 0;\n\n    G = (int)(col.g * 255);\n    if (G > 255)\n        G = 255;\n    else if (G < 0)\n        G = 0;\n\n    B = (int)(col.b * 255);\n    if (B > 255)\n        B = 255;\n    else if (B < 0)\n        B = 0;\n\n    return video->get_color(R, G, B);\n}\n\nstatic void parallel_thread(void) {\n    // thread-local storage\n    unsigned int serial = 1;\n    unsigned int mboxsize = sizeof(unsigned int) * (max_objectid() + 20);\n    unsigned int *local_mbox = (unsigned int *)alloca(mboxsize);\n    memset(local_mbox, 0, mboxsize);\n\n    for (int y = starty; y < stopy; y++) {\n        {\n            drawing_area drawing(startx, totaly - y, stopx - startx, 1);\n            for (int x = startx; x < stopx; x++) {\n                color_t c =\n                    render_one_pixel(x, y, local_mbox, serial, startx, stopx, starty, stopy);\n                drawing.put_pixel(c);\n            }\n        }\n        if (!video->next_frame())\n            return;\n    }\n}\n\nvoid *thread_trace(thr_parms *parms) {\n    // shared but read-only so could be private too\n    all_parms = parms;\n    scene = parms->scene;\n    startx = parms->startx;\n    stopx = parms->stopx;\n    starty = parms->starty;\n    stopy = parms->stopy;\n    jitterscale = 40.0 * (scene.hres + scene.vres);\n    totaly = parms->scene.vres - 1;\n\n    parallel_thread();\n\n    return (nullptr);\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/trace.simple.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n#include \"tgafile.hpp\"\n#include \"trace.hpp\"\n#include \"light.hpp\"\n#include \"shade.hpp\"\n#include \"camera.hpp\"\n#include \"util.hpp\"\n#include \"intersect.hpp\"\n#include \"global.hpp\"\n#include \"ui.hpp\"\n#include \"tachyon_video.hpp\"\n\n// shared but read-only so could be private too\nstatic thr_parms *all_parms;\nstatic scenedef scene;\nstatic int startx;\nstatic int stopx;\nstatic int starty;\nstatic int stopy;\nstatic flt jitterscale;\nstatic int totaly;\n\nstatic color_t render_one_pixel(int x,\n                                int y,\n                                unsigned int *local_mbox,\n                                unsigned int &serial,\n                                int startx,\n                                int stopx,\n                                int starty,\n                                int stopy) {\n    /* private vars moved inside loop */\n    ray primary;\n    color col;\n    int R, G, B;\n    intersectstruct local_intersections;\n    /* end private */\n\n    primary = camray(&scene, x, y);\n    primary.intstruct = &local_intersections;\n    primary.flags = RT_RAY_REGULAR;\n\n    serial++;\n    primary.serial = serial;\n    primary.mbox = local_mbox;\n    primary.maxdist = FHUGE;\n    primary.scene = &scene;\n    col = trace(&primary);\n    serial = primary.serial;\n\n    /* Handle overexposure and underexposure here... */\n    R = (int)(col.r * 255);\n    if (R > 255)\n        R = 255;\n    else if (R < 0)\n        R = 0;\n\n    G = (int)(col.g * 255);\n    if (G > 255)\n        G = 255;\n    else if (G < 0)\n        G = 0;\n\n    B = (int)(col.b * 255);\n    if (B > 255)\n        B = 255;\n    else if (B < 0)\n        B = 0;\n\n    return video->get_color(R, G, B);\n}\n\n#if DO_ITT_NOTIFY\n#include \"ittnotify.h\"\n#endif\n\n#define RUNTIME_SERIAL 1\n#define RUNTIME_OPENMP 2\n#define RUNTIME_TBB    3\n\n#ifndef RUNTIME\n#define RUNTIME RUNTIME_TBB\n#endif\n\n#if RUNTIME == RUNTIME_OPENMP\n#include <omp.h>\n#elif RUNTIME == RUNTIME_TBB\n#include \"oneapi/tbb.h\"\n#endif\n\nstatic void parallel_thread(void) {\n    unsigned int mboxsize = sizeof(unsigned int) * (max_objectid() + 20);\n#if RUNTIME == RUNTIME_SERIAL\n    for (int y = starty; y < stopy; y++)\n#elif RUNTIME == RUNTIME_OPENMP\n#pragma omp parallel for\n    for (int y = starty; y < stopy; y++)\n#elif RUNTIME == RUNTIME_TBB\n    oneapi::tbb::parallel_for(starty, stopy, [mboxsize] (int y)\n#endif\n    {\n        unsigned int serial = 1;\n        unsigned int local_mbox[mboxsize];\n        memset(local_mbox, 0, mboxsize);\n        drawing_area drawing(startx, totaly - y, stopx - startx, 1);\n        for (int x = startx; x < stopx; x++) {\n            color_t c = render_one_pixel(x, y, local_mbox, serial, startx, stopx, starty, stopy);\n            drawing.put_pixel(c);\n        }\n        video->next_frame();\n    }\n#if RUNTIME == RUNTIME_TBB\n    );\n#endif\n}\n\nvoid *thread_trace(thr_parms *parms) {\n    // shared but read-only so could be private too\n    all_parms = parms;\n    scene = parms->scene;\n    startx = parms->startx;\n    stopx = parms->stopx;\n    starty = parms->starty;\n    stopy = parms->stopy;\n    jitterscale = 40.0 * (scene.hres + scene.vres);\n    totaly = parms->scene.vres - 1;\n\n#if DO_ITT_NOTIFY\n    __itt_resume();\n#endif\n    parallel_thread();\n#if DO_ITT_NOTIFY\n    __itt_pause();\n#endif\n\n    return (nullptr);\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/trace.taskq.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n#include <omp.h>\n#include <string.h>\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n#include \"tgafile.hpp\"\n#include \"trace.hpp\"\n#include \"light.hpp\"\n#include \"shade.hpp\"\n#include \"camera.hpp\"\n#include \"util.hpp\"\n#include \"intersect.hpp\"\n#include \"global.hpp\"\n#include \"ui.hpp\"\n#include \"tachyon_video.hpp\"\n\n// shared but read-only so could be private too\nstatic thr_parms *all_parms;\nstatic scenedef scene;\nstatic int startx;\nstatic int stopx;\nstatic int starty;\nstatic int stopy;\nstatic flt jitterscale;\nstatic int totaly, totalx;\n\nstatic int grain_size = 50;\nconst int DIVFACTOR = 2;\n\n#define MIN(a, b) ((a) < (b) ? (a) : (b))\n\nstatic color_t render_one_pixel(int x,\n                                int y,\n                                unsigned int *local_mbox,\n                                unsigned int &serial,\n                                int startx,\n                                int stopx,\n                                int starty,\n                                int stopy) {\n    /* private vars moved inside loop */\n    ray primary, sample;\n    color col, avcol;\n    int R, G, B;\n    intersectstruct local_intersections;\n    int alias;\n    /* end private */\n\n    primary = camray(&scene, x, y);\n    primary.intstruct = &local_intersections;\n    primary.flags = RT_RAY_REGULAR;\n\n    serial++;\n    primary.serial = serial;\n    primary.mbox = local_mbox;\n    primary.maxdist = FHUGE;\n    primary.scene = &scene;\n    col = trace(&primary);\n\n    serial = primary.serial;\n\n    /* perform antialiasing if enabled.. */\n    if (scene.antialiasing > 0) {\n        for (alias = 0; alias < scene.antialiasing; alias++) {\n            serial++; /* increment serial number */\n            sample = primary; /* copy the regular primary ray to start with */\n            sample.serial = serial;\n\n#pragma omp critical\n            {\n                sample.d.x += ((rand() % 100) - 50) / jitterscale;\n                sample.d.y += ((rand() % 100) - 50) / jitterscale;\n                sample.d.z += ((rand() % 100) - 50) / jitterscale;\n            }\n\n            avcol = trace(&sample);\n\n            serial = sample.serial; /* update our overall serial # */\n\n            col.r += avcol.r;\n            col.g += avcol.g;\n            col.b += avcol.b;\n        }\n\n        col.r /= (scene.antialiasing + 1.0);\n        col.g /= (scene.antialiasing + 1.0);\n        col.b /= (scene.antialiasing + 1.0);\n    }\n\n    /* Handle overexposure and underexposure here... */\n    R = (int)(col.r * 255);\n    if (R > 255)\n        R = 255;\n    else if (R < 0)\n        R = 0;\n\n    G = (int)(col.g * 255);\n    if (G > 255)\n        G = 255;\n    else if (G < 0)\n        G = 0;\n\n    B = (int)(col.b * 255);\n    if (B > 255)\n        B = 255;\n    else if (B < 0)\n        B = 0;\n\n    return video->get_color(R, G, B);\n}\n\nstatic void parallel_thread(patch *pchin, int depth) {\n    unsigned char col[3];\n    col[0] = col[1] = col[2] = (32 * depth) % 256;\n    depth++;\n#pragma intel omp taskq firstprivate(depth)\n    {\n        int startx, stopx, starty, stopy;\n        int xs, ys;\n\n        startx = pchin->startx;\n        stopx = pchin->stopx;\n        starty = pchin->starty;\n        stopy = pchin->stopy;\n\n        if (((stopx - startx) >= grain_size) || ((stopy - starty) >= grain_size)) {\n            int xpatchsize = (stopx - startx) / DIVFACTOR + 1;\n            int ypatchsize = (stopy - starty) / DIVFACTOR + 1;\n            for (ys = starty; ys <= stopy; ys += ypatchsize)\n                for (xs = startx; xs <= stopx; xs += xpatchsize) {\n                    patch pch;\n                    pch.startx = xs;\n                    pch.starty = ys;\n                    pch.stopx = MIN(xs + xpatchsize, stopx);\n                    pch.stopy = MIN(ys + ypatchsize, stopy);\n\n#pragma intel omp task\n                    parallel_thread(&pch, depth);\n                }\n        }\n        else {\n            /* just trace this patch */\n            unsigned int mboxsize = sizeof(unsigned int) * (max_objectid() + 20);\n            unsigned int *local_mbox = (unsigned int *)alloca(mboxsize);\n            memset(local_mbox, 0, mboxsize);\n\n            drawing_area drawing(startx, totaly - stopy, stopx - startx, stopy - starty);\n            for (int i = 1, y = starty; y < stopy; ++y, i++) {\n                if (!video->running)\n                    continue;\n                drawing.set_pos(0, drawing.size_y - i);\n                unsigned int serial = 5 * ((stopx - startx) + (stopy - starty) * totalx);\n                for (int x = startx; x < stopx; x++) {\n                    color_t c =\n                        render_one_pixel(x, y, local_mbox, serial, startx, stopx, starty, stopy);\n                    drawing.put_pixel(c);\n                }\n            }\n            video->next_frame();\n        }\n    }\n}\n\nvoid *thread_trace(thr_parms *parms) {\n    // shared but read-only so could be private too\n    all_parms = parms;\n    scene = parms->scene;\n    startx = parms->startx;\n    stopx = parms->stopx;\n    starty = parms->starty;\n    stopy = parms->stopy;\n    jitterscale = 40.0 * (scene.hres + scene.vres);\n    totalx = parms->stopx - parms->startx + 1;\n    totaly = parms->scene.vres;\n\n    patch pch;\n    pch.startx = startx;\n    pch.stopx = stopx;\n    pch.starty = starty;\n    pch.stopy = stopy;\n    int g;\n    char *grain_str = getenv(\"TASKQ_GRAINSIZE\");\n    if (grain_str && (sscanf(grain_str, \"%d\", &g) > 0) && (g > 0))\n        grain_size = g;\n#pragma omp parallel\n    parallel_thread(&pch, 0);\n\n    return (nullptr);\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/trace.tbb.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n#include \"tgafile.hpp\"\n#include \"trace.hpp\"\n#include \"light.hpp\"\n#include \"shade.hpp\"\n#include \"camera.hpp\"\n#include \"util.hpp\"\n#include \"intersect.hpp\"\n#include \"global.hpp\"\n#include \"ui.hpp\"\n#include \"tachyon_video.hpp\"\n\n// shared but read-only so could be private too\nstatic thr_parms *all_parms;\nstatic scenedef scene;\nstatic int startx;\nstatic int stopx;\nstatic int starty;\nstatic int stopy;\nstatic flt jitterscale;\nstatic int totaly;\n\n#ifdef MARK_RENDERING_AREA\n\n// rgb colors list for coloring image by each thread\nstatic const float inner_alpha = 0.3;\nstatic const float border_alpha = 0.5;\n#define NUM_COLORS 24\nstatic int colors[NUM_COLORS][3] = {\n    { 255, 110, 0 },   { 220, 254, 0 },   { 102, 254, 0 },  { 0, 21, 254 },    { 97, 0, 254 },\n    { 254, 30, 0 },    { 20, 41, 8 },     { 144, 238, 38 }, { 184, 214, 139 }, { 28, 95, 20 },\n    { 139, 173, 148 }, { 188, 228, 183 }, { 145, 47, 56 },  { 204, 147, 193 }, { 45, 202, 143 },\n    { 204, 171, 143 }, { 143, 160, 204 }, { 220, 173, 3 },  { 1, 152, 231 },   { 79, 235, 237 },\n    { 52, 193, 72 },   { 67, 136, 151 },  { 78, 87, 179 },  { 143, 255, 9 },\n};\n\n#include <atomic>\n#include \"oneapi/tbb/enumerable_thread_specific.h\"\n// storage and counter for thread numbers in order of first task run\ntypedef oneapi::tbb::enumerable_thread_specific<int> thread_id_t;\nthread_id_t thread_ids(-1);\nstd::atomic<int> thread_number;\n\n#endif\n\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/spin_mutex.h\"\n#include \"oneapi/tbb/blocked_range2d.h\"\n#include \"oneapi/tbb/global_control.h\"\n#include \"common/utility/get_default_num_threads.hpp\"\n\nstatic oneapi::tbb::spin_mutex MyMutex, MyMutex2;\n\nstatic color_t render_one_pixel(int x,\n                                int y,\n                                unsigned int *local_mbox,\n                                unsigned int &serial,\n                                int startx,\n                                int stopx,\n                                int starty,\n                                int stopy\n#ifdef MARK_RENDERING_AREA\n                                ,\n                                int *blend,\n                                float alpha\n#endif\n) {\n    /* private vars moved inside loop */\n    ray primary, sample;\n    color col, avcol;\n    int R, G, B;\n    intersectstruct local_intersections;\n    int alias;\n    /* end private */\n\n    primary = camray(&scene, x, y);\n    primary.intstruct = &local_intersections;\n    primary.flags = RT_RAY_REGULAR;\n\n    serial++;\n    primary.serial = serial;\n    primary.mbox = local_mbox;\n    primary.maxdist = FHUGE;\n    primary.scene = &scene;\n    col = trace(&primary);\n\n    serial = primary.serial;\n\n    /* perform antialiasing if enabled.. */\n    if (scene.antialiasing > 0) {\n        for (alias = 0; alias < scene.antialiasing; alias++) {\n            serial++; /* increment serial number */\n            sample = primary; /* copy the regular primary ray to start with */\n            sample.serial = serial;\n\n            {\n                oneapi::tbb::spin_mutex::scoped_lock lock(MyMutex);\n                sample.d.x += ((rand() % 100) - 50) / jitterscale;\n                sample.d.y += ((rand() % 100) - 50) / jitterscale;\n                sample.d.z += ((rand() % 100) - 50) / jitterscale;\n            }\n\n            avcol = trace(&sample);\n\n            serial = sample.serial; /* update our overall serial # */\n\n            col.r += avcol.r;\n            col.g += avcol.g;\n            col.b += avcol.b;\n        }\n\n        col.r /= (scene.antialiasing + 1.0);\n        col.g /= (scene.antialiasing + 1.0);\n        col.b /= (scene.antialiasing + 1.0);\n    }\n\n    /* Handle overexposure and underexposure here... */\n    R = (int)(col.r * 255);\n    if (R > 255)\n        R = 255;\n    else if (R < 0)\n        R = 0;\n\n    G = (int)(col.g * 255);\n    if (G > 255)\n        G = 255;\n    else if (G < 0)\n        G = 0;\n\n    B = (int)(col.b * 255);\n    if (B > 255)\n        B = 255;\n    else if (B < 0)\n        B = 0;\n\n#ifdef MARK_RENDERING_AREA\n    R = int((1.0 - alpha) * R + alpha * blend[0]);\n    G = int((1.0 - alpha) * G + alpha * blend[1]);\n    B = int((1.0 - alpha) * B + alpha * blend[2]);\n#endif\n\n    return video->get_color(R, G, B);\n}\n\nclass parallel_task {\npublic:\n    void operator()(const oneapi::tbb::blocked_range2d<int> &r) const {\n        // task-local storage\n        unsigned int serial = 1;\n        unsigned int mboxsize = sizeof(unsigned int) * (max_objectid() + 20);\n        unsigned int *local_mbox = (unsigned int *)alloca(mboxsize);\n        memset(local_mbox, 0, mboxsize);\n#ifdef MARK_RENDERING_AREA\n        // compute thread number while first task run\n        thread_id_t::reference thread_id = thread_ids.local();\n        if (thread_id == -1)\n            thread_id = thread_number++;\n        // choose thread color\n        int pos = thread_id % NUM_COLORS;\n        if (video->running) {\n            drawing_area drawing(r.cols().begin(),\n                                 totaly - r.rows().end(),\n                                 r.cols().end() - r.cols().begin(),\n                                 r.rows().end() - r.rows().begin());\n            for (int i = 1, y = r.rows().begin(); y != r.rows().end(); ++y, i++) {\n                drawing.set_pos(0, drawing.size_y - i);\n                for (int x = r.cols().begin(); x != r.cols().end(); x++) {\n                    int d = (y % 3 == 0) ? 2 : 1;\n                    drawing.put_pixel(video->get_color(\n                        colors[pos][0] / d, colors[pos][1] / d, colors[pos][2] / d));\n                }\n            }\n        }\n#endif\n        if (video->next_frame()) {\n            drawing_area drawing(r.cols().begin(),\n                                 totaly - r.rows().end(),\n                                 r.cols().end() - r.cols().begin(),\n                                 r.rows().end() - r.rows().begin());\n            for (int i = 1, y = r.rows().begin(); y != r.rows().end(); ++y, i++) {\n                drawing.set_pos(0, drawing.size_y - i);\n                for (int x = r.cols().begin(); x != r.cols().end(); x++) {\n#ifdef MARK_RENDERING_AREA\n                    float alpha = y == r.rows().begin() || y == r.rows().end() - 1 ||\n                                          x == r.cols().begin() || x == r.cols().end() - 1\n                                      ? border_alpha\n                                      : inner_alpha;\n                    color_t c = render_one_pixel(\n                        x, y, local_mbox, serial, startx, stopx, starty, stopy, colors[pos], alpha);\n#else\n                    color_t c =\n                        render_one_pixel(x, y, local_mbox, serial, startx, stopx, starty, stopy);\n#endif\n                    drawing.put_pixel(c);\n                }\n            }\n        }\n    }\n\n    parallel_task() {}\n};\n\nvoid *thread_trace(thr_parms *parms) {\n#if !WIN8UI_EXAMPLE\n    int n, nthreads = utility::get_default_num_threads();\n    char *nthreads_str = getenv(\"TBB_NUM_THREADS\");\n    if (nthreads_str && (sscanf(nthreads_str, \"%d\", &n) > 0) && (n > 0))\n        nthreads = n;\n    oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism, nthreads);\n#endif\n\n    // shared but read-only so could be private too\n    all_parms = parms;\n    scene = parms->scene;\n    startx = parms->startx;\n    stopx = parms->stopx;\n    starty = parms->starty;\n    stopy = parms->stopy;\n    jitterscale = 40.0 * (scene.hres + scene.vres);\n    totaly = parms->scene.vres;\n#ifdef MARK_RENDERING_AREA\n    thread_ids.clear();\n#endif\n\n    int grain_size = 8;\n//WIN8UI does not support getenv() function so using auto_partitioner unconditionally\n#if !WIN8UI_EXAMPLE\n    int g;\n    char *grain_str = getenv(\"TBB_GRAINSIZE\");\n    if (grain_str && (sscanf(grain_str, \"%d\", &g) > 0) && (g > 0))\n        grain_size = g;\n    char *sched_str = getenv(\"TBB_PARTITIONER\");\n    static oneapi::tbb::affinity_partitioner g_ap; // reused across calls to thread_trace\n    if (sched_str && !strncmp(sched_str, \"aff\", 3))\n        oneapi::tbb::parallel_for(\n            oneapi::tbb::blocked_range2d<int>(starty, stopy, grain_size, startx, stopx, grain_size),\n            parallel_task(),\n            g_ap);\n    else if (sched_str && !strncmp(sched_str, \"simp\", 4))\n        oneapi::tbb::parallel_for(\n            oneapi::tbb::blocked_range2d<int>(starty, stopy, grain_size, startx, stopx, grain_size),\n            parallel_task(),\n            oneapi::tbb::simple_partitioner());\n    else\n#endif\n        oneapi::tbb::parallel_for(\n            oneapi::tbb::blocked_range2d<int>(starty, stopy, grain_size, startx, stopx, grain_size),\n            parallel_task(),\n            oneapi::tbb::auto_partitioner());\n\n    return (nullptr);\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/trace.tbb1d.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n#include \"tgafile.hpp\"\n#include \"trace.hpp\"\n#include \"light.hpp\"\n#include \"shade.hpp\"\n#include \"camera.hpp\"\n#include \"util.hpp\"\n#include \"intersect.hpp\"\n#include \"global.hpp\"\n#include \"ui.hpp\"\n#include \"tachyon_video.hpp\"\n\n// shared but read-only so could be private too\nstatic thr_parms *all_parms;\nstatic scenedef scene;\nstatic int startx;\nstatic int stopx;\nstatic int starty;\nstatic int stopy;\nstatic flt jitterscale;\nstatic int totaly;\n\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/spin_mutex.h\"\n#include \"oneapi/tbb/blocked_range.h\"\n#include \"oneapi/tbb/global_control.h\"\n#include \"common/utility/get_default_num_threads.hpp\"\n\nstatic oneapi::tbb::spin_mutex MyMutex, MyMutex2;\n\nstatic color_t render_one_pixel(int x,\n                                int y,\n                                unsigned int *local_mbox,\n                                unsigned int &serial,\n                                int startx,\n                                int stopx,\n                                int starty,\n                                int stopy) {\n    /* private vars moved inside loop */\n    ray primary, sample;\n    color col, avcol;\n    int R, G, B;\n    intersectstruct local_intersections;\n    int alias;\n    /* end private */\n\n    primary = camray(&scene, x, y);\n    primary.intstruct = &local_intersections;\n    primary.flags = RT_RAY_REGULAR;\n\n    serial++;\n    primary.serial = serial;\n    primary.mbox = local_mbox;\n    primary.maxdist = FHUGE;\n    primary.scene = &scene;\n    col = trace(&primary);\n\n    serial = primary.serial;\n\n    /* perform antialiasing if enabled.. */\n    if (scene.antialiasing > 0) {\n        for (alias = 0; alias < scene.antialiasing; alias++) {\n            serial++; /* increment serial number */\n            sample = primary; /* copy the regular primary ray to start with */\n            sample.serial = serial;\n\n            {\n                oneapi::tbb::spin_mutex::scoped_lock lock(MyMutex);\n                sample.d.x += ((rand() % 100) - 50) / jitterscale;\n                sample.d.y += ((rand() % 100) - 50) / jitterscale;\n                sample.d.z += ((rand() % 100) - 50) / jitterscale;\n            }\n\n            avcol = trace(&sample);\n\n            serial = sample.serial; /* update our overall serial # */\n\n            col.r += avcol.r;\n            col.g += avcol.g;\n            col.b += avcol.b;\n        }\n\n        col.r /= (scene.antialiasing + 1.0);\n        col.g /= (scene.antialiasing + 1.0);\n        col.b /= (scene.antialiasing + 1.0);\n    }\n\n    /* Handle overexposure and underexposure here... */\n    R = (int)(col.r * 255);\n    if (R > 255)\n        R = 255;\n    else if (R < 0)\n        R = 0;\n\n    G = (int)(col.g * 255);\n    if (G > 255)\n        G = 255;\n    else if (G < 0)\n        G = 0;\n\n    B = (int)(col.b * 255);\n    if (B > 255)\n        B = 255;\n    else if (B < 0)\n        B = 0;\n\n    return video->get_color(R, G, B);\n}\n\nclass parallel_task {\npublic:\n    void operator()(const oneapi::tbb::blocked_range<int> &r) const {\n        // task-local storage\n        unsigned int serial = 1;\n        unsigned int mboxsize = sizeof(unsigned int) * (max_objectid() + 20);\n        unsigned int *local_mbox = (unsigned int *)alloca(mboxsize);\n        memset(local_mbox, 0, mboxsize);\n\n        for (int y = r.begin(); y != r.end(); ++y) {\n            {\n                drawing_area drawing(startx, totaly - y, stopx - startx, 1);\n                for (int x = startx; x < stopx; x++) {\n                    color_t c =\n                        render_one_pixel(x, y, local_mbox, serial, startx, stopx, starty, stopy);\n                    drawing.put_pixel(c);\n                }\n            }\n            if (!video->next_frame())\n                return;\n        }\n    }\n\n    parallel_task() {}\n};\n\nvoid *thread_trace(thr_parms *parms) {\n    int n, nthreads = utility::get_default_num_threads();\n    char *nthreads_str = getenv(\"TBB_NUM_THREADS\");\n    if (nthreads_str && (sscanf(nthreads_str, \"%d\", &n) > 0) && (n > 0))\n        nthreads = n;\n    oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism, nthreads);\n\n    // shared but read-only so could be private too\n    all_parms = parms;\n    scene = parms->scene;\n    startx = parms->startx;\n    stopx = parms->stopx;\n    starty = parms->starty;\n    stopy = parms->stopy;\n    jitterscale = 40.0 * (scene.hres + scene.vres);\n    totaly = parms->scene.vres - 1;\n\n    int g, grain_size = 1;\n    char *grain_str = getenv(\"TBB_GRAINSIZE\");\n    if (grain_str && (sscanf(grain_str, \"%d\", &g) > 0) && (g > 0))\n        grain_size = g;\n    char *sched_str = getenv(\"TBB_PARTITIONER\");\n    static oneapi::tbb::affinity_partitioner g_ap;\n    if (sched_str && !strncmp(sched_str, \"aff\", 3))\n        oneapi::tbb::parallel_for(\n            oneapi::tbb::blocked_range<int>(starty, stopy, grain_size), parallel_task(), g_ap);\n    else if (sched_str && !strncmp(sched_str, \"simp\", 4))\n        oneapi::tbb::parallel_for(oneapi::tbb::blocked_range<int>(starty, stopy, grain_size),\n                                  parallel_task(),\n                                  oneapi::tbb::simple_partitioner());\n    else\n        oneapi::tbb::parallel_for(oneapi::tbb::blocked_range<int>(starty, stopy, grain_size),\n                                  parallel_task(),\n                                  oneapi::tbb::auto_partitioner());\n\n    return (nullptr);\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/trace.threads.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n#include \"tgafile.hpp\"\n#include \"trace.hpp\"\n#include \"light.hpp\"\n#include \"shade.hpp\"\n#include \"camera.hpp\"\n#include \"util.hpp\"\n#include \"intersect.hpp\"\n#include \"global.hpp\"\n#include \"ui.hpp\"\n#include \"tachyon_video.hpp\"\n\n// shared but read-only so could be private too\nstatic thr_parms *all_parms;\nstatic scenedef scene;\nstatic int startx;\nstatic int stopx;\nstatic int starty;\nstatic int stopy;\nstatic flt jitterscale;\nstatic int totaly;\nstatic int nthreads;\n\nstatic int grain_size = 50;\n\n#ifdef _WIN32\n#include <windows.h>\n#include \"pthread_w.hpp\"\n#else\n#include <pthread.h>\n#endif\n\nstatic pthread_mutex_t MyMutex, MyMutex2, MyMutex3;\n\nstatic color_t render_one_pixel(int x,\n                                int y,\n                                unsigned int *local_mbox,\n                                unsigned int &serial,\n                                int startx,\n                                int stopx,\n                                int starty,\n                                int stopy) {\n    /* private vars moved inside loop */\n    ray primary, sample;\n    color col, avcol;\n    int R, G, B;\n    intersectstruct local_intersections;\n    int alias;\n    /* end private */\n\n    primary = camray(&scene, x, y);\n    primary.intstruct = &local_intersections;\n    primary.flags = RT_RAY_REGULAR;\n\n    serial++;\n    primary.serial = serial;\n    primary.mbox = local_mbox;\n    primary.maxdist = FHUGE;\n    primary.scene = &scene;\n    col = trace(&primary);\n\n    serial = primary.serial;\n\n    /* perform antialiasing if enabled.. */\n    if (scene.antialiasing > 0) {\n        for (alias = 0; alias < scene.antialiasing; alias++) {\n            serial++; /* increment serial number */\n            sample = primary; /* copy the regular primary ray to start with */\n            sample.serial = serial;\n\n            {\n                pthread_mutex_lock(&MyMutex);\n                sample.d.x += ((rand() % 100) - 50) / jitterscale;\n                sample.d.y += ((rand() % 100) - 50) / jitterscale;\n                sample.d.z += ((rand() % 100) - 50) / jitterscale;\n                pthread_mutex_unlock(&MyMutex);\n            }\n\n            avcol = trace(&sample);\n\n            serial = sample.serial; /* update our overall serial # */\n\n            col.r += avcol.r;\n            col.g += avcol.g;\n            col.b += avcol.b;\n        }\n\n        col.r /= (scene.antialiasing + 1.0);\n        col.g /= (scene.antialiasing + 1.0);\n        col.b /= (scene.antialiasing + 1.0);\n    }\n\n    /* Handle overexposure and underexposure here... */\n    R = (int)(col.r * 255);\n    if (R > 255)\n        R = 255;\n    else if (R < 0)\n        R = 0;\n\n    G = (int)(col.g * 255);\n    if (G > 255)\n        G = 255;\n    else if (G < 0)\n        G = 0;\n\n    B = (int)(col.b * 255);\n    if (B > 255)\n        B = 255;\n    else if (B < 0)\n        B = 0;\n\n    return video->get_color(R, G, B);\n}\n\n// need this so threads can self-schedule work; returns true (and bounds of work) if more work to do\n\n#define MIN(a, b) (((a) < (b)) ? (a) : (b))\n\nstatic int sched_nexty;\n\nstatic bool schedule_thread_work(int &y1, int &y2) {\n    pthread_mutex_lock(&MyMutex3);\n#ifdef STATIC_EVEN_SCHEDULING\n    // optional static-even scheduling\n    y1 = sched_nexty;\n    sched_nexty += ((stopy - starty + 1) / nthreads);\n    y2 = MIN(sched_nexty, stopy);\n#else\n    // dynamic-chunk scheduling with specified grain_size\n    y1 = sched_nexty;\n    sched_nexty += grain_size;\n    y2 = MIN(sched_nexty, stopy);\n#endif\n    pthread_mutex_unlock(&MyMutex3);\n    return (y1 <= stopy);\n}\n\nstatic void parallel_thread(void *arg) {\n    // thread-local storage\n    unsigned int serial = 1;\n    unsigned int mboxsize = sizeof(unsigned int) * (max_objectid() + 20);\n    unsigned int *local_mbox = (unsigned int *)alloca(mboxsize);\n    memset(local_mbox, 0, mboxsize);\n\n    // int thread_no = (int) arg;\n    int y1, y2;\n    while (schedule_thread_work(y1, y2)) {\n        for (int y = y1; y < y2; y++) {\n            {\n                drawing_area drawing(startx, totaly - y, stopx - startx, 1);\n                for (int x = startx; x < stopx; x++) {\n                    color_t c =\n                        render_one_pixel(x, y, local_mbox, serial, startx, stopx, starty, stopy);\n                    drawing.put_pixel(c);\n                }\n            }\n            if (!video->next_frame())\n                pthread_exit(arg);\n        }\n    }\n    pthread_exit(arg);\n}\n\n// need this (for each platform) so we can create the right number of threads, to work efficiently\n\n#if defined(_WIN32)\n\nstatic int get_num_cpus(void) {\n    SYSTEM_INFO si;\n    GetNativeSystemInfo(&si);\n    return (int)si.dwNumberOfProcessors;\n}\n\n#elif defined(__APPLE__)\n\n#include \"sys/types.hpp\"\n#include \"sys/sysctl.hpp\"\nstatic int get_num_cpus(void) {\n    int name[2] = { CTL_HW, HW_NCPU };\n    int ncpu;\n    std::size_t size = sizeof(ncpu);\n    sysctl(name, 2, &ncpu, &size, nullptr, 0);\n    return ncpu;\n}\n\n#else /*  Linux  */\n\n#include <sys/sysinfo.h>\nstatic int get_num_cpus(void) {\n    return get_nprocs();\n}\n\n#endif\n\nvoid *thread_trace(thr_parms *parms) {\n    // shared but read-only so could be private too\n    all_parms = parms;\n    scene = parms->scene;\n    startx = parms->startx;\n    stopx = parms->stopx;\n    starty = parms->starty;\n    stopy = parms->stopy;\n    jitterscale = 40.0 * (scene.hres + scene.vres);\n    totaly = parms->scene.vres - 1;\n\n    int n;\n    nthreads = get_num_cpus();\n    char *nthreads_str = getenv(\"THR_NUM_THREADS\");\n    if (nthreads_str && (sscanf(nthreads_str, \"%d\", &n) > 0) && (n > 0))\n        nthreads = n;\n    char *grain_str = getenv(\"THR_GRAINSIZE\");\n    if (grain_str && (sscanf(grain_str, \"%d\", &n) > 0) && (n > 0))\n        grain_size = n;\n    pthread_t *threads = (pthread_t *)alloca(nthreads * sizeof(pthread_t));\n    pthread_mutex_init(&MyMutex, nullptr);\n    pthread_mutex_init(&MyMutex2, nullptr);\n    pthread_mutex_init(&MyMutex3, nullptr);\n    sched_nexty = starty; // initialize schedule_thread_work() self-scheduler\n    for (int i = 0; i < nthreads; i++) {\n        pthread_create(\n            &threads[i], nullptr, (void *(*)(void *))parallel_thread, (void *)((std::size_t)i));\n    }\n    for (int i = 0; i < nthreads; i++) {\n        void *exit_val;\n        pthread_join(threads[i], &exit_val);\n        // expect i = (int) exit_val\n    }\n\n    return (nullptr);\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/trace.threads2d.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n#include \"tgafile.hpp\"\n#include \"trace.hpp\"\n#include \"light.hpp\"\n#include \"shade.hpp\"\n#include \"camera.hpp\"\n#include \"util.hpp\"\n#include \"intersect.hpp\"\n#include \"global.hpp\"\n#include \"ui.hpp\"\n#include \"tachyon_video.hpp\"\n\n// shared but read-only so could be private too\nstatic thr_parms *all_parms;\nstatic scenedef scene;\nstatic int startx;\nstatic int stopx;\nstatic int starty;\nstatic int stopy;\nstatic flt jitterscale;\nstatic int totaly;\nstatic int nthreads;\n\nstatic int grain_size = 50;\nconst int DIVFACTOR = 2;\n\n#define MIN(a, b) ((a) < (b) ? (a) : (b))\n\n#ifdef _WIN32\n#include <windows.h>\n#include \"pthread_w.hpp\"\n#else\n#include <pthread.h>\n#endif\n\nstatic pthread_mutex_t MyMutex, MyMutex2, MyMutex3;\n\nstatic color_t render_one_pixel(int x,\n                                int y,\n                                unsigned int *local_mbox,\n                                unsigned int &serial,\n                                int startx,\n                                int stopx,\n                                int starty,\n                                int stopy) {\n    /* private vars moved inside loop */\n    ray primary, sample;\n    color col, avcol;\n    int R, G, B;\n    intersectstruct local_intersections;\n    int alias;\n    /* end private */\n\n    primary = camray(&scene, x, y);\n    primary.intstruct = &local_intersections;\n    primary.flags = RT_RAY_REGULAR;\n\n    serial++;\n    primary.serial = serial;\n    primary.mbox = local_mbox;\n    primary.maxdist = FHUGE;\n    primary.scene = &scene;\n    col = trace(&primary);\n\n    serial = primary.serial;\n\n    /* perform antialiasing if enabled.. */\n    if (scene.antialiasing > 0) {\n        for (alias = 0; alias < scene.antialiasing; alias++) {\n            serial++; /* increment serial number */\n            sample = primary; /* copy the regular primary ray to start with */\n            sample.serial = serial;\n\n            {\n                pthread_mutex_lock(&MyMutex);\n                sample.d.x += ((rand() % 100) - 50) / jitterscale;\n                sample.d.y += ((rand() % 100) - 50) / jitterscale;\n                sample.d.z += ((rand() % 100) - 50) / jitterscale;\n                pthread_mutex_unlock(&MyMutex);\n            }\n\n            avcol = trace(&sample);\n\n            serial = sample.serial; /* update our overall serial # */\n\n            col.r += avcol.r;\n            col.g += avcol.g;\n            col.b += avcol.b;\n        }\n\n        col.r /= (scene.antialiasing + 1.0);\n        col.g /= (scene.antialiasing + 1.0);\n        col.b /= (scene.antialiasing + 1.0);\n    }\n\n    /* Handle overexposure and underexposure here... */\n    R = (int)(col.r * 255);\n    if (R > 255)\n        R = 255;\n    else if (R < 0)\n        R = 0;\n\n    G = (int)(col.g * 255);\n    if (G > 255)\n        G = 255;\n    else if (G < 0)\n        G = 0;\n\n    B = (int)(col.b * 255);\n    if (B > 255)\n        B = 255;\n    else if (B < 0)\n        B = 0;\n\n    return video->get_color(R, G, B);\n}\n\n// need this so threads can self-schedule work; returns true (and bounds of work) if more work to do\n\ntypedef struct work_queue_entry_s {\n    patch pch;\n    struct work_queue_entry_s *next;\n} work_queue_entry_t;\nstatic work_queue_entry_t *work_queue_head = nullptr;\nstatic work_queue_entry_t *work_queue_tail = nullptr;\n\nstatic void generate_work(patch *pchin) {\n    int startx, stopx, starty, stopy;\n    int xs, ys;\n\n    startx = pchin->startx;\n    stopx = pchin->stopx;\n    starty = pchin->starty;\n    stopy = pchin->stopy;\n\n    if (((stopx - startx) >= grain_size) || ((stopy - starty) >= grain_size)) {\n        int xpatchsize = (stopx - startx) / DIVFACTOR + 1;\n        int ypatchsize = (stopy - starty) / DIVFACTOR + 1;\n        for (ys = starty; ys <= stopy; ys += ypatchsize)\n            for (xs = startx; xs <= stopx; xs += xpatchsize) {\n                patch pch;\n                pch.startx = xs;\n                pch.starty = ys;\n                pch.stopx = MIN(xs + xpatchsize, stopx);\n                pch.stopy = MIN(ys + ypatchsize, stopy);\n\n                generate_work(&pch);\n            }\n    }\n    else {\n        /* just trace this patch */\n        work_queue_entry_t *q = (work_queue_entry_t *)malloc(sizeof(work_queue_entry_t));\n        q->pch.starty = starty;\n        q->pch.stopy = stopy;\n        q->pch.startx = startx;\n        q->pch.stopx = stopx;\n        q->next = nullptr;\n        if (work_queue_head == nullptr) {\n            work_queue_head = q;\n        }\n        else {\n            work_queue_tail->next = q;\n        }\n        work_queue_tail = q;\n    }\n}\n\nstatic void generate_worklist(void) {\n    patch pch;\n    pch.startx = startx;\n    pch.stopx = stopx;\n    pch.starty = starty;\n    pch.stopy = stopy;\n    generate_work(&pch);\n}\n\nstatic bool schedule_thread_work(patch &pch) {\n    pthread_mutex_lock(&MyMutex3);\n    work_queue_entry_t *q = work_queue_head;\n    if (q != nullptr) {\n        pch = q->pch;\n        work_queue_head = work_queue_head->next;\n    }\n    pthread_mutex_unlock(&MyMutex3);\n    return (q != nullptr);\n}\n\nstatic void parallel_thread(void *arg) {\n    // thread-local storage\n    unsigned int serial = 1;\n    unsigned int mboxsize = sizeof(unsigned int) * (max_objectid() + 20);\n    unsigned int *local_mbox = (unsigned int *)alloca(mboxsize);\n    memset(local_mbox, 0, mboxsize);\n\n    // int thread_no = (int) arg;\n    patch pch;\n    while (schedule_thread_work(pch)) {\n        {\n            drawing_area drawing(\n                pch.startx, totaly - pch.stopy, pch.stopx - pch.startx, pch.stopy - pch.starty);\n            for (int i = 1, y = pch.starty; y < pch.stopy; ++y, i++) {\n                drawing.set_pos(0, drawing.size_y - i);\n                for (int x = pch.startx; x < pch.stopx; x++) {\n                    color_t c =\n                        render_one_pixel(x, y, local_mbox, serial, startx, stopx, starty, stopy);\n                    drawing.put_pixel(c);\n                }\n            }\n        }\n        if (!video->next_frame())\n            pthread_exit(arg);\n    }\n    pthread_exit(arg);\n}\n\n// need this (for each platform) so we can create the right number of threads, to work efficiently\n\n#if defined(_WIN32)\n\nstatic int get_num_cpus(void) {\n    SYSTEM_INFO si;\n    GetNativeSystemInfo(&si);\n    return (int)si.dwNumberOfProcessors;\n}\n\n#elif defined(__APPLE__)\n\n#include \"sys/types.hpp\"\n#include \"sys/sysctl.hpp\"\nstatic int get_num_cpus(void) {\n    int name[2] = { CTL_HW, HW_NCPU };\n    int ncpu;\n    std::size_t size = sizeof(ncpu);\n    sysctl(name, 2, &ncpu, &size, nullptr, 0);\n    return ncpu;\n}\n\n#else /*  Linux  */\n\n#include <sys/sysinfo.h>\nstatic int get_num_cpus(void) {\n    return get_nprocs();\n}\n\n#endif\n\nvoid *thread_trace(thr_parms *parms) {\n    // shared but read-only so could be private too\n    all_parms = parms;\n    scene = parms->scene;\n    startx = parms->startx;\n    stopx = parms->stopx;\n    starty = parms->starty;\n    stopy = parms->stopy;\n    jitterscale = 40.0 * (scene.hres + scene.vres);\n    totaly = parms->scene.vres;\n\n    int n;\n    nthreads = get_num_cpus();\n    char *nthreads_str = getenv(\"THR_NUM_THREADS\");\n    if (nthreads_str && (sscanf(nthreads_str, \"%d\", &n) > 0) && (n > 0))\n        nthreads = n;\n    char *grain_str = getenv(\"THR_GRAINSIZE\");\n    if (grain_str && (sscanf(grain_str, \"%d\", &n) > 0) && (n > 0))\n        grain_size = n;\n    pthread_t *threads = (pthread_t *)alloca(nthreads * sizeof(pthread_t));\n    pthread_mutex_init(&MyMutex, nullptr);\n    pthread_mutex_init(&MyMutex2, nullptr);\n    pthread_mutex_init(&MyMutex3, nullptr);\n    generate_worklist(); // initialize schedule_thread_work() self-scheduler\n    for (int i = 0; i < nthreads; i++) {\n        pthread_create(\n            &threads[i], nullptr, (void *(*)(void *))parallel_thread, (void *)((std::size_t)i));\n    }\n    for (int i = 0; i < nthreads; i++) {\n        void *exit_val;\n        pthread_join(threads[i], &exit_val);\n        // expect i = (int) exit_val\n    }\n\n    return (nullptr);\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/trace_rest.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * trace.cpp - This file contains the functions for firing primary rays\n *           and handling subsequent calculations\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n#include \"tgafile.hpp\"\n#include \"trace.hpp\"\n#include \"light.hpp\"\n#include \"shade.hpp\"\n#include \"camera.hpp\"\n#include \"util.hpp\"\n#include \"intersect.hpp\"\n#include \"global.hpp\"\n#include \"ui.hpp\"\n#include \"tachyon_video.hpp\"\n\ncolor trace(ray *primary) {\n    if (primary->depth > 0) {\n        VNorm(&primary->d);\n        reset_intersection(primary->intstruct);\n        intersect_objects(primary);\n        return shader(primary);\n    }\n\n    /* if ray is truncated, return the background as its color */\n    return primary->scene->background;\n}\n\nvoid *thread_io(void *parms) {\n    thr_io_parms p;\n\n    p = *((thr_io_parms *)parms);\n    writetgaregion(p.tga, p.iwidth, p.iheight, p.startx, p.starty, p.stopx, p.stopy, p.buffer);\n    free(p.buffer); /* free the buffer once we are done with it.. */\n    free(parms);\n\n    return (nullptr);\n}\n\nvoid trace_shm(scenedef scene, /*char * buffer,  */ int startx, int stopx, int starty, int stopy) {\n    thr_parms *parms;\n\n    parms = (thr_parms *)rt_getmem(sizeof(thr_parms));\n\n    parms->tid = 0;\n    parms->nthr = 1;\n    parms->scene = scene;\n    parms->startx = startx;\n    parms->stopx = stopx;\n    parms->starty = starty;\n    parms->stopy = stopy;\n\n    thread_trace(parms);\n\n    rt_freemem(parms);\n}\n\nvoid trace_region(scenedef scene, void *tga, int startx, int starty, int stopx, int stopy) {\n    if (scene.verbosemode) {\n        char msgtxt[2048];\n        sprintf(msgtxt,\n                \"Node %3d tracing region  %4d, %4d  --->  %4d, %4d \\n\",\n                0,\n                startx,\n                starty,\n                stopx,\n                stopy);\n        rt_ui_message(MSG_0, msgtxt);\n    }\n\n    trace_shm(scene, /*buffer,*/ startx, stopx, starty, stopy);\n    /* not used now\n  writetgaregion(tga, scene.hres, scene.vres, \n                 startx, starty, stopx, stopy, global_buffer);\n\n  if (scene.rawimage != nullptr) {\n    int x, y;\n    int totalx = stopx - startx + 1;\n    for (y=starty; y<=stopy; y++) {\n      for (x=0; x<scene.hres; x++) {\n        scene.rawimage[(scene.vres-y)*scene.hres*3 + x*3] = global_buffer[(y-starty)*totalx*3 + x*3 + 2];\n        scene.rawimage[(scene.vres-y)*scene.hres*3 + x*3 +1] = global_buffer[(y-starty)*totalx*3 + x*3 + 1];\n        scene.rawimage[(scene.vres-y)*scene.hres*3 + x*3 +2] = global_buffer[(y-starty)*totalx*3 + x*3];\n      }\n    }\n  }\n*/\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/triangle.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * triangle.cpp - This file contains the functions for dealing with triangles.\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"vector.hpp\"\n#include \"macros.hpp\"\n#include \"intersect.hpp\"\n#include \"util.hpp\"\n\n#define TRIANGLE_PRIVATE\n#include \"triangle.hpp\"\n\nstatic object_methods tri_methods = { (void (*)(void *, void *))(tri_intersect),\n                                      (void (*)(void *, void *, void *, void *))(tri_normal),\n                                      tri_bbox,\n                                      free };\n\nstatic object_methods stri_methods = { (void (*)(void *, void *))(tri_intersect),\n                                       (void (*)(void *, void *, void *, void *))(stri_normal),\n                                       tri_bbox,\n                                       free };\n\nobject *newtri(void *tex, vector v0, vector v1, vector v2) {\n    tri *t;\n    vector edge1, edge2, edge3;\n\n    VSub(&v1, &v0, &edge1);\n    VSub(&v2, &v0, &edge2);\n    VSub(&v2, &v1, &edge3);\n\n    /* check to see if this will be a degenerate triangle before creation */\n    if ((VLength(&edge1) >= EPSILON) && (VLength(&edge2) >= EPSILON) &&\n        (VLength(&edge3) >= EPSILON)) {\n        t = (tri *)rt_getmem(sizeof(tri));\n\n        t->nextobj = nullptr;\n        t->methods = &tri_methods;\n\n        t->tex = (texture *)tex;\n        t->v0 = v0;\n        t->edge1 = edge1;\n        t->edge2 = edge2;\n\n        return (object *)t;\n    }\n\n    return nullptr; /* was a degenerate triangle */\n}\n\nobject *newstri(void *tex, vector v0, vector v1, vector v2, vector n0, vector n1, vector n2) {\n    stri *t;\n    vector edge1, edge2, edge3;\n\n    VSub(&v1, &v0, &edge1);\n    VSub(&v2, &v0, &edge2);\n    VSub(&v2, &v1, &edge3);\n\n    /* check to see if this will be a degenerate triangle before creation */\n    if ((VLength(&edge1) >= EPSILON) && (VLength(&edge2) >= EPSILON) &&\n        (VLength(&edge3) >= EPSILON)) {\n        t = (stri *)rt_getmem(sizeof(stri));\n\n        t->nextobj = nullptr;\n        t->methods = &stri_methods;\n\n        t->tex = (texture *)tex;\n        t->v0 = v0;\n        t->edge1 = edge1;\n        t->edge2 = edge2;\n        t->n0 = n0;\n        t->n1 = n1;\n        t->n2 = n2;\n\n        return (object *)t;\n    }\n\n    return nullptr; /* was a degenerate triangle */\n}\n\n#define CROSS(dest, v1, v2)             \\\n    dest.x = v1.y * v2.z - v1.z * v2.y; \\\n    dest.y = v1.z * v2.x - v1.x * v2.z; \\\n    dest.z = v1.x * v2.y - v1.y * v2.x;\n\n#define DOT(v1, v2) (v1.x * v2.x + v1.y * v2.y + v1.z * v2.z)\n\n#define SUB(dest, v1, v2) \\\n    dest.x = v1.x - v2.x; \\\n    dest.y = v1.y - v2.y; \\\n    dest.z = v1.z - v2.z;\n\nstatic int tri_bbox(void *obj, vector *min, vector *max) {\n    tri *t = (tri *)obj;\n    vector v1, v2;\n\n    VAdd(&t->v0, &t->edge1, &v1);\n    VAdd(&t->v0, &t->edge2, &v2);\n\n    min->x = MYMIN(t->v0.x, MYMIN(v1.x, v2.x));\n    min->y = MYMIN(t->v0.y, MYMIN(v1.y, v2.y));\n    min->z = MYMIN(t->v0.z, MYMIN(v1.z, v2.z));\n\n    max->x = MYMAX(t->v0.x, MYMAX(v1.x, v2.x));\n    max->y = MYMAX(t->v0.y, MYMAX(v1.y, v2.y));\n    max->z = MYMAX(t->v0.z, MYMAX(v1.z, v2.z));\n\n    return 1;\n}\n\nstatic void tri_intersect(tri *trn, ray *ry) {\n    vector tvec, pvec, qvec;\n    flt det, inv_det, t, u, v;\n\n    /* begin calculating determinant - also used to calculate U parameter */\n    CROSS(pvec, ry->d, trn->edge2);\n\n    /* if determinant is near zero, ray lies in plane of triangle */\n    det = DOT(trn->edge1, pvec);\n\n    if (det > -EPSILON && det < EPSILON)\n        return;\n\n    inv_det = 1.0 / det;\n\n    /* calculate distance from vert0 to ray origin */\n    SUB(tvec, ry->o, trn->v0);\n\n    /* calculate U parameter and test bounds */\n    u = DOT(tvec, pvec) * inv_det;\n    if (u < 0.0 || u > 1.0)\n        return;\n\n    /* prepare to test V parameter */\n    CROSS(qvec, tvec, trn->edge1);\n\n    /* calculate V parameter and test bounds */\n    v = DOT(ry->d, qvec) * inv_det;\n    if (v < 0.0 || u + v > 1.0)\n        return;\n\n    /* calculate t, ray intersects triangle */\n    t = DOT(trn->edge2, qvec) * inv_det;\n\n    add_intersection(t, (object *)trn, ry);\n}\n\nstatic void tri_normal(tri *trn, vector *pnt, ray *incident, vector *N) {\n    CROSS((*N), trn->edge1, trn->edge2);\n\n    VNorm(N);\n\n    if (VDot(N, &(incident->d)) > 0.0) {\n        N->x = -N->x;\n        N->y = -N->y;\n        N->z = -N->z;\n    }\n}\n\nstatic void stri_normal(stri *trn, vector *pnt, ray *incident, vector *N) {\n    flt U, V, W, lensqr;\n    vector P, tmp, norm;\n\n    CROSS(norm, trn->edge1, trn->edge2);\n    lensqr = DOT(norm, norm);\n\n    VSUB((*pnt), trn->v0, P);\n\n    CROSS(tmp, P, trn->edge2);\n    U = DOT(tmp, norm) / lensqr;\n\n    CROSS(tmp, trn->edge1, P);\n    V = DOT(tmp, norm) / lensqr;\n\n    W = 1.0 - (U + V);\n\n    N->x = W * trn->n0.x + U * trn->n1.x + V * trn->n2.x;\n    N->y = W * trn->n0.y + U * trn->n1.y + V * trn->n2.y;\n    N->z = W * trn->n0.z + U * trn->n1.z + V * trn->n2.z;\n\n    VNorm(N);\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/triangle.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * triangle.h - This file contains the defines for triangles etc.\n *\n *  $Id: triangle.h,v 1.2 2007-02-22 17:54:16 Exp $\n */\n\nobject *newtri(void *, vector, vector, vector);\nobject *newstri(void *, vector, vector, vector, vector, vector, vector);\n\n#ifdef TRIANGLE_PRIVATE\n\n#define TRIXMAJOR 0\n#define TRIYMAJOR 1\n#define TRIZMAJOR 2\n\ntypedef struct {\n    unsigned int id; /* Unique Object serial number    */\n    void *nextobj; /* pointer to next object in list */\n    object_methods *methods; /* this object's methods */\n    texture *tex; /* object texture */\n    vector edge2;\n    vector edge1;\n    vector v0;\n} tri;\n\ntypedef struct {\n    unsigned int id; /* Unique Object serial number */\n    void *nextobj; /* pointer to next object in list */\n    object_methods *methods; /* this object's methods */\n    texture *tex; /* object texture */\n    vector edge2;\n    vector edge1;\n    vector v0;\n    vector n0;\n    vector n1;\n    vector n2;\n} stri;\n\nstatic int tri_bbox(void *obj, vector *min, vector *max);\n\nstatic void tri_intersect(tri *, ray *);\n\nstatic void tri_normal(tri *, vector *, ray *, vector *);\nstatic void stri_normal(stri *, vector *, ray *, vector *);\n#endif\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/types.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n#if __MINGW32__\n#include <malloc.h>\n#elif _WIN32\n#include <malloc.h>\n#define alloca _alloca\n#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__\n#include <stdlib.h>\n#else\n#include <alloca.h>\n#endif\n\n/*\n * types.h - This file contains all of the type definitions for the raytracer\n *\n *  $Id: types.h,v 1.2 2007-02-22 17:54:16 Exp $\n */\n\n#define MAXOCTNODES 25 /* subdivide octants /w > # of children */\n#define SPEPSILON   0.000001 /* amount to crawl down a ray           */\n#define EPSILON     0.000001 /* amount to crawl down a ray           */\n#define TWOPI       6.2831853 /* guess                               */\n#define FHUGE       1e18 /* biggest fp number we can represent       */\n\n/* Maximum internal table sizes */\n/* Use prime numbers for best memory system performance */\n#define INTTBSIZE 1024 /* maximum intersections we can hold */\n#define MAXLIGHTS 39 /* maximum number of lights in a scene */\n#define MAXIMGS   39 /* maximum number of distinct images   */\n#define RPCQSIZE  113 /* number of RPC messages to queue    */\n\n/* Parameter values for rt_boundmode() */\n#define RT_BOUNDING_DISABLED 0 /* spatial subdivision/bounding disabled */\n#define RT_BOUNDING_ENABLED  1 /* spatial subdivision/bounding enabled  */\n\n/* Parameter values for rt_displaymode() */\n#define RT_DISPLAY_DISABLED 0 /* video output enabled  */\n#define RT_DISPLAY_ENABLED  1 /* video output disabled */\n\n/* Ray flags */\n#define RT_RAY_REGULAR  1\n#define RT_RAY_SHADOW   2\n#define RT_RAY_BOUNDED  4\n#define RT_RAY_FINISHED 8\n\n#ifdef USESINGLEFLT\ntypedef float flt; /* generic floating point number, using float */\n#else\ntypedef double flt; /* generic floating point number, using double */\n#endif\n\ntypedef unsigned char byte_t; /* 1 byte */\ntypedef signed int word_t; /* 32 bit integer */\n\ntypedef struct {\n    flt x; /* X coordinate value */\n    flt y; /* Y coordinate value */\n    flt z; /* Z coordinate value */\n} vector;\n\ntypedef struct {\n    flt r; /* Red component   */\n    flt g; /* Green component */\n    flt b; /* Blue component  */\n} color;\n\ntypedef struct {\n    byte_t r; /* Red component   */\n    byte_t g; /* Green component */\n    byte_t b; /* Blue component  */\n} bytecolor;\n\ntypedef struct { /* Raw 24 bit image structure, for tga, ppm etc */\n    int loaded; /* image memory residence flag */\n    int xres; /* image X axis size */\n    int yres; /* image Y axis size */\n    int bpp; /* image bits per pixel */\n    char name[96]; /* image filename (with path)     */\n    unsigned char *data; /* pointer to raw byte image data */\n} rawimage;\n\ntypedef struct { /* Scalar Volume Data */\n    int loaded; /* Volume data memory residence flag */\n    int xres; /* volume X axis size */\n    int yres; /* volume Y axis size */\n    int zres; /* volume Z axis size */\n    flt opacity; /* opacity per unit length */\n    char name[96]; /* Volume data filename */\n    unsigned char *data; /* pointer to raw byte volume data */\n} scalarvol;\n\ntypedef struct {\n    color (*texfunc)(void *, void *, void *);\n    int shadowcast; /* does the object cast a shadow */\n    int islight; /* light flag... */\n    color col; /* base object color */\n    flt ambient; /* ambient lighting */\n    flt diffuse; /* diffuse reflection */\n    flt phong; /* phong specular highlights */\n    flt phongexp; /* phong exponent/shininess factor */\n    int phongtype; /* phong type: 0 == plastic, nonzero == metal */\n    flt specular; /* specular reflection */\n    flt opacity; /* how opaque the object is */\n    vector ctr; /* origin of texture */\n    vector rot; /* rotation of texture about origin */\n    vector scale; /* scale of texture in x,y,z */\n    vector uaxs; /* planar map U axis */\n    vector vaxs; /* planar map V axis */\n    void *img; /* pointer to image for image mapping */\n    void *obj; /* object ptr, hack for volume shaders for now */\n} texture;\n\ntypedef struct {\n    void (*intersect)(void *, void *); /* intersection func ptr  */\n    void (*normal)(void *, void *, void *, void *); /* normal function ptr */\n    int (*bbox)(void *, vector *, vector *); /* return the object bbox */\n    void (*free)(void *); /* free the object */\n} object_methods;\n\ntypedef struct {\n    unsigned int id; /* Unique Object serial number */\n    void *nextobj; /* pointer to next object in list */\n    object_methods *methods; /* this object's methods */\n    texture *tex; /* object texture */\n} object;\n\ntypedef struct {\n    object *obj; /* to object we hit */\n    flt t; /* distance along the ray to the hit point */\n} intersection;\n\ntypedef struct {\n    int num; /* number of intersections    */\n    intersection closest; /* closest intersection > 0.0 */\n    intersection list[INTTBSIZE]; /* list of all intersections  */\n} intersectstruct;\n\ntypedef struct {\n    char outfilename[200]; /* name of the output image */\n    unsigned char *rawimage; /* pointer to a raw rgb image to be stored */\n    int hres; /* horizontal output image resolution */\n    int vres; /* vertical output image resolution */\n    flt aspectratio; /* aspect ratio of output image */\n    int raydepth; /* maximum recursion depth */\n    int antialiasing; /* number of antialiasing rays to fire */\n    int verbosemode; /* verbose reporting flag */\n    int boundmode; /* automatic spatial subdivision flag */\n    int boundthresh; /* threshold number of subobjects */\n    int displaymode; /* run-time X11 display flag */\n    vector camcent; /* center of the camera in world coords */\n    vector camviewvec; /* view direction of the camera (Z axis) */\n    vector camrightvec; /* right axis for the camera (X axis) */\n    vector camupvec; /* up axis for the camera (Y axis) */\n    flt camzoom; /* zoom factor for the camera */\n    color background; /* scene background color */\n} scenedef;\n\ntypedef struct {\n    intersectstruct *intstruct; /* ptr to thread's intersection data */\n    unsigned int depth; /* levels left to recurse.. (maxdepth - curdepth) */\n    unsigned int flags; /* ray flags, any special treatment needed etc */\n    unsigned int serial; /* serial number of the ray */\n    unsigned int *mbox; /* mailbox array for optimizing intersections */\n    vector o; /* origin of the ray X,Y,Z */\n    vector d; /* normalized direction of the ray */\n    flt maxdist; /* maximum distance to search for intersections */\n    vector s; /* startpoint of the ray (may differ from origin */\n    vector e; /* endpoint of the ray if bounded */\n    scenedef *scene; /* pointer to the scene, for global parms such as */\n    /* background colors etc */\n} ray;\n\ntypedef struct {\n    int type; /* RPC call type */\n    int from; /* Sending processor */\n    int len; /* length of parms in bytes */\n    void *parms; /* Parameters to RPC */\n} rpcmsg;\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/ui.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * ui.cpp - Contains functions for dealing with user interfaces\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"util.hpp\"\n#include \"ui.hpp\"\n\nstatic void (*rt_static_ui_message)(int, const char *) = nullptr;\nstatic void (*rt_static_ui_progress)(int) = nullptr;\nstatic int (*rt_static_ui_checkaction)(void) = nullptr;\n\nextern bool silent_mode;\n\nvoid set_rt_ui_message(void (*func)(int, const char *)) {\n    rt_static_ui_message = func;\n}\n\nvoid set_rt_ui_progress(void (*func)(int)) {\n    rt_static_ui_progress = func;\n}\n\nvoid rt_ui_message(int level, const char *msg) {\n    if (rt_static_ui_message == nullptr) {\n        if (!silent_mode) {\n            fprintf(stderr, \"%s\\n\", msg);\n            fflush(stderr);\n        }\n    }\n    else {\n        rt_static_ui_message(level, msg);\n    }\n}\n\nvoid rt_ui_progress(int percent) {\n    if (rt_static_ui_progress != nullptr)\n        rt_static_ui_progress(percent);\n    else {\n        if (!silent_mode) {\n            fprintf(stderr, \"\\r %3d%% Complete            \\r\", percent);\n            fflush(stderr);\n        }\n    }\n}\n\nint rt_ui_checkaction(void) {\n    if (rt_static_ui_checkaction != nullptr)\n        return rt_static_ui_checkaction();\n    else\n        return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/ui.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * ui.h - defines for user interface functions\n *\n *  $Id: ui.h,v 1.2 2007-02-22 17:54:16 Exp $\n */\n\n/* Different types of message, for levels of verbosity etc */\n#define MSG_0     100\n#define MSG_1     101\n#define MSG_2     102\n#define MSG_3     103\n#define MSG_4     104\n#define MSG_5     105\n#define MSG_ERR   200\n#define MSG_ABORT 300\n\nvoid rt_ui_message(int, const char *);\nvoid rt_ui_progress(int);\nint rt_ui_checkaction(void);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/util.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * util.cpp - Contains all of the timing functions for various platforms.\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"util.hpp\"\n#include \"light.hpp\"\n#include \"global.hpp\"\n#include \"ui.hpp\"\n\nvoid rt_finalize(void);\n\n#if !defined(_WIN32)\n#include <sys/time.h>\n#include <unistd.h>\n\nvoid rt_sleep(int msec) {\n    usleep(msec * 1000);\n}\n\n#else //_WIN32\n\n#undef OLDUNIXTIME\n#undef STDTIME\n\nvoid rt_sleep(int msec) {\n#if !WIN8UI_EXAMPLE\n    Sleep(msec);\n#else\n    std::chrono::milliseconds sleep_time(msec);\n    std::this_thread::sleep_for(sleep_time);\n#endif\n}\n\ntimer gettimer(void) {\n    return GetTickCount();\n}\n\nflt timertime(timer st, timer fn) {\n    double ttime, start, end;\n\n    start = ((double)st) / ((double)1000.00);\n    end = ((double)fn) / ((double)1000.00);\n    ttime = end - start;\n\n    return ttime;\n}\n#endif /*  _WIN32  */\n\n/* if we're on a Unix with gettimeofday() we'll use newer timers */\n#if defined(STDTIME)\nstruct timezone tz;\n\ntimer gettimer(void) {\n    timer t;\n    gettimeofday(&t, &tz);\n    return t;\n}\n\nflt timertime(timer st, timer fn) {\n    double ttime, start, end;\n\n    start = (st.tv_sec + 1.0 * st.tv_usec / 1000000.0);\n    end = (fn.tv_sec + 1.0 * fn.tv_usec / 1000000.0);\n    ttime = end - start;\n\n    return ttime;\n}\n#endif /*  STDTIME  */\n\n/* use the old fashioned Unix time functions */\n#if defined(OLDUNIXTIME)\ntimer gettimer(void) {\n    return time(nullptr);\n}\n\nflt timertime(timer st, timer fn) {\n    return difftime(fn, st);\n    ;\n}\n#endif /*  OLDUNIXTIME  */\n\n/* random other helper utility functions */\nint rt_meminuse(void) {\n    return rt_mem_in_use;\n}\n\nvoid* rt_getmem(unsigned int bytes) {\n    void* mem;\n\n    mem = malloc(bytes);\n    if (mem != nullptr) {\n        rt_mem_in_use += bytes;\n    }\n    else {\n        rtbomb(\"No more memory!!!!\");\n    }\n    return mem;\n}\n\nunsigned int rt_freemem(void* addr) {\n    unsigned int bytes;\n\n    free(addr);\n\n    bytes = 0;\n    rt_mem_in_use -= bytes;\n    return bytes;\n}\n\nvoid rtbomb(const char* msg) {\n    rt_ui_message(MSG_ERR, msg);\n    rt_ui_message(MSG_ABORT, \"Rendering Aborted.\");\n\n    rt_finalize();\n    std::exit(-1);\n}\n\nvoid rtmesg(const char* msg) {\n    rt_ui_message(MSG_0, msg);\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/util.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * util.h - This file contains defines for the timer functions...\n *\n *  $Id: util.h,v 1.3 2007-02-22 17:54:17 Exp $\n */\n\n#include \"machine.hpp\"\n\n#if defined(_WIN32)\n#include <windows.h>\n#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)\n#define WIN8UI_EXAMPLE 1\n#include <thread>\ntypedef ULONGLONG timer;\n#ifdef GetTickCount\n#undef GetTickCount\n#endif\n#define GetTickCount GetTickCount64\n#else\ntypedef DWORD timer;\n#endif\n#else\n#include <sys/time.h>\n#include <unistd.h>\n#if defined(STDTIME)\ntypedef timeval timer;\n#elif defined(OLDUNIXTIME)\ntypedef time_t timer;\n#endif /*  OLDUNIXTIME  */ /*  STDTIME  */\n#endif /*  _WIN32  */\n\ntimer gettimer(void);\nflt timertime(timer st, timer fn);\nvoid rt_sleep(int);\nint rt_meminuse(void);\nvoid *rt_getmem(unsigned int);\nunsigned int rt_freemem(void *);\nvoid rtbomb(const char *);\nvoid rtmesg(const char *);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/vector.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/* \n * vector.cpp - This file contains all of the vector arithmetic functions.\n */\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n\nflt VDot(vector *a, vector *b) {\n    return (a->x * b->x + a->y * b->y + a->z * b->z);\n}\n\nvoid VCross(vector *a, vector *b, vector *c) {\n    c->x = (a->y * b->z) - (a->z * b->y);\n    c->y = (a->z * b->x) - (a->x * b->z);\n    c->z = (a->x * b->y) - (a->y * b->x);\n}\n\nflt VLength(vector *a) {\n    return (flt)sqrt((a->x * a->x) + (a->y * a->y) + (a->z * a->z));\n}\n\nvoid VNorm(vector *a) {\n    flt len;\n\n    len = sqrt((a->x * a->x) + (a->y * a->y) + (a->z * a->z));\n    if (len != 0.0) {\n        a->x /= len;\n        a->y /= len;\n        a->z /= len;\n    }\n}\n\nvoid VAdd(vector *a, vector *b, vector *c) {\n    c->x = (a->x + b->x);\n    c->y = (a->y + b->y);\n    c->z = (a->z + b->z);\n}\n\nvoid VSub(vector *a, vector *b, vector *c) {\n    c->x = (a->x - b->x);\n    c->y = (a->y - b->y);\n    c->z = (a->z - b->z);\n}\n\nvoid VAddS(flt a, vector *A, vector *B, vector *C) {\n    C->x = (a * A->x) + B->x;\n    C->y = (a * A->y) + B->y;\n    C->z = (a * A->z) + B->z;\n}\n\nvector Raypnt(ray *a, flt t) {\n    vector temp;\n\n    temp.x = a->o.x + (a->d.x * t);\n    temp.y = a->o.y + (a->d.y * t);\n    temp.z = a->o.z + (a->d.z * t);\n\n    return temp;\n}\n\nvoid VScale(vector *a, flt s) {\n    a->x *= s;\n    a->y *= s;\n    a->z *= s;\n}\n\nvoid ColorAddS(color *a, color *b, flt s) {\n    a->r += b->r * s;\n    a->g += b->g * s;\n    a->b += b->b * s;\n}\n\nvoid ColorAccum(color *a, color *b) {\n    a->r += b->r;\n    a->g += b->g;\n    a->b += b->b;\n}\n\nvoid ColorScale(color *a, flt s) {\n    a->r *= s;\n    a->g *= s;\n    a->b *= s;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/vector.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * vector.h - This file contains declarations of vector functions\n *\n *  $Id: vector.h,v 1.2 2007-02-22 17:54:17 Exp $\n */\n\nflt VDot(vector *, vector *);\nvoid VCross(vector *, vector *, vector *);\nflt VLength(vector *);\nvoid VNorm(vector *);\nvoid VAdd(vector *, vector *, vector *);\nvoid VSub(vector *, vector *, vector *);\nvoid VAddS(flt, vector *, vector *, vector *);\nvector Raypnt(ray *, flt);\nvoid VScale(vector *a, flt s);\n\nvoid ColorAddS(color *a, color *b, flt s);\nvoid ColorAccum(color *a, color *b);\nvoid ColorScale(color *a, flt s);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/vol.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * vol.cpp - Volume rendering helper routines etc.\n */\n\n#include <cstdio>\n\n#include \"machine.hpp\"\n#include \"types.hpp\"\n#include \"macros.hpp\"\n#include \"vector.hpp\"\n#include \"util.hpp\"\n#include \"vol.hpp\"\n#include \"box.hpp\"\n#include \"trace.hpp\"\n#include \"ui.hpp\"\n#include \"light.hpp\"\n#include \"shade.hpp\"\n\nint scalarvol_bbox(void *obj, vector *min, vector *max) {\n    box *b = (box *)obj;\n\n    *min = b->min;\n    *max = b->max;\n\n    return 1;\n}\n\nvoid *newscalarvol(void *intex,\n                   vector min,\n                   vector max,\n                   int xs,\n                   int ys,\n                   int zs,\n                   char *fname,\n                   scalarvol *invol) {\n    box *bx;\n    texture *tx, *tex;\n    scalarvol *vol;\n\n    tex = (texture *)intex;\n    tex->shadowcast = 0; /* doesn't cast a shadow */\n\n    tx = (texture *)rt_getmem(sizeof(texture));\n\n    /* is the volume data already loaded? */\n    if (invol == nullptr) {\n        vol = (scalarvol *)rt_getmem(sizeof(scalarvol));\n        vol->loaded = 0;\n        vol->data = nullptr;\n    }\n    else\n        vol = invol;\n\n    vol->opacity = tex->opacity;\n    vol->xres = xs;\n    vol->yres = ys;\n    vol->zres = zs;\n    strcpy(vol->name, fname);\n\n    tx->ctr.x = 0.0;\n    tx->ctr.y = 0.0;\n    tx->ctr.z = 0.0;\n    tx->rot = tx->ctr;\n    tx->scale = tx->ctr;\n    tx->uaxs = tx->ctr;\n    tx->vaxs = tx->ctr;\n\n    tx->islight = 0;\n    tx->shadowcast = 0; /* doesn't cast a shadow */\n\n    tx->col = tex->col;\n    tx->ambient = 1.0;\n    tx->diffuse = 0.0;\n    tx->specular = 0.0;\n    tx->opacity = 1.0;\n    tx->img = vol;\n    tx->texfunc = (color(*)(void *, void *, void *))(scalar_volume_texture);\n\n    bx = newbox(tx, min, max);\n    tx->obj = (void *)bx; /* XXX hack! */\n\n    return (void *)bx;\n}\n\ncolor VoxelColor(flt scalar) {\n    color col;\n\n    if (scalar > 1.0)\n        scalar = 1.0;\n\n    if (scalar < 0.0)\n        scalar = 0.0;\n\n    if (scalar < 0.25) {\n        col.r = scalar * 4.0;\n        col.g = 0.0;\n        col.b = 0.0;\n    }\n    else {\n        if (scalar < 0.75) {\n            col.r = 1.0;\n            col.g = (scalar - 0.25) * 2.0;\n            col.b = 0.0;\n        }\n        else {\n            col.r = 1.0;\n            col.g = 1.0;\n            col.b = (scalar - 0.75) * 4.0;\n        }\n    }\n\n    return col;\n}\n\ncolor scalar_volume_texture(vector *hit, texture *tex, ray *ry) {\n    color col, col2;\n    box *bx;\n    flt a, tx1, tx2, ty1, ty2, tz1, tz2;\n    flt tnear, tfar;\n    flt t, tdist, dt, sum, tt;\n    vector pnt, bln;\n    scalarvol *vol;\n    flt scalar, transval;\n    int x, y, z;\n    unsigned char *ptr;\n\n    bx = (box *)tex->obj;\n    vol = (scalarvol *)bx->tex->img;\n\n    col.r = 0.0;\n    col.g = 0.0;\n    col.b = 0.0;\n\n    tnear = -FHUGE;\n    tfar = FHUGE;\n\n    if (ry->d.x == 0.0) {\n        if ((ry->o.x < bx->min.x) || (ry->o.x > bx->max.x))\n            return col;\n    }\n    else {\n        tx1 = (bx->min.x - ry->o.x) / ry->d.x;\n        tx2 = (bx->max.x - ry->o.x) / ry->d.x;\n        if (tx1 > tx2) {\n            a = tx1;\n            tx1 = tx2;\n            tx2 = a;\n        }\n        if (tx1 > tnear)\n            tnear = tx1;\n        if (tx2 < tfar)\n            tfar = tx2;\n    }\n    if (tnear > tfar)\n        return col;\n    if (tfar < 0.0)\n        return col;\n\n    if (ry->d.y == 0.0) {\n        if ((ry->o.y < bx->min.y) || (ry->o.y > bx->max.y))\n            return col;\n    }\n    else {\n        ty1 = (bx->min.y - ry->o.y) / ry->d.y;\n        ty2 = (bx->max.y - ry->o.y) / ry->d.y;\n        if (ty1 > ty2) {\n            a = ty1;\n            ty1 = ty2;\n            ty2 = a;\n        }\n        if (ty1 > tnear)\n            tnear = ty1;\n        if (ty2 < tfar)\n            tfar = ty2;\n    }\n    if (tnear > tfar)\n        return col;\n    if (tfar < 0.0)\n        return col;\n\n    if (ry->d.z == 0.0) {\n        if ((ry->o.z < bx->min.z) || (ry->o.z > bx->max.z))\n            return col;\n    }\n    else {\n        tz1 = (bx->min.z - ry->o.z) / ry->d.z;\n        tz2 = (bx->max.z - ry->o.z) / ry->d.z;\n        if (tz1 > tz2) {\n            a = tz1;\n            tz1 = tz2;\n            tz2 = a;\n        }\n        if (tz1 > tnear)\n            tnear = tz1;\n        if (tz2 < tfar)\n            tfar = tz2;\n    }\n    if (tnear > tfar)\n        return col;\n    if (tfar < 0.0)\n        return col;\n\n    if (tnear < 0.0)\n        tnear = 0.0;\n\n    tdist = sqrt((flt)(vol->xres * vol->xres + vol->yres * vol->yres + vol->zres * vol->zres));\n    tt = (vol->opacity / tdist);\n\n    bln.x = fabs(bx->min.x - bx->max.x);\n    bln.y = fabs(bx->min.y - bx->max.y);\n    bln.z = fabs(bx->min.z - bx->max.z);\n\n    dt = sqrt(bln.x * bln.x + bln.y * bln.y + bln.z * bln.z) / tdist;\n    sum = 0.0;\n\n    /* move the volume residency check out of loop.. */\n    if (!vol->loaded) {\n        LoadVol(vol);\n        vol->loaded = 1;\n    }\n\n    for (t = tnear; t <= tfar; t += dt) {\n        pnt.x = ((ry->o.x + (ry->d.x * t)) - bx->min.x) / bln.x;\n        pnt.y = ((ry->o.y + (ry->d.y * t)) - bx->min.y) / bln.y;\n        pnt.z = ((ry->o.z + (ry->d.z * t)) - bx->min.z) / bln.z;\n\n        x = (int)((vol->xres - 1.5) * pnt.x + 0.5);\n        y = (int)((vol->yres - 1.5) * pnt.y + 0.5);\n        z = (int)((vol->zres - 1.5) * pnt.z + 0.5);\n\n        ptr = vol->data + ((vol->xres * vol->yres * z) + (vol->xres * y) + x);\n\n        scalar = (flt)((flt)1.0 * ((int)ptr[0])) / 255.0;\n\n        sum += tt * scalar;\n\n        transval = tt * scalar;\n\n        col2 = VoxelColor(scalar);\n\n        if (sum < 1.0) {\n            col.r += transval * col2.r;\n            col.g += transval * col2.g;\n            col.b += transval * col2.b;\n            if (sum < 0.0)\n                sum = 0.0;\n        }\n        else {\n            sum = 1.0;\n        }\n    }\n\n    if (sum < 1.0) { /* spawn transmission rays / refraction */\n        color transcol;\n\n        transcol = shade_transmission(ry, hit, 1.0 - sum);\n\n        col.r += transcol.r; /* add the transmitted ray  */\n        col.g += transcol.g; /* to the diffuse and       */\n        col.b += transcol.b; /* transmission total..     */\n    }\n\n    return col;\n}\n\nvoid LoadVol(scalarvol *vol) {\n    FILE *dfile;\n    std::size_t status;\n    char msgtxt[2048];\n\n    dfile = fopen(vol->name, \"r\");\n    if (dfile == nullptr) {\n        char msgtxt[2048];\n        sprintf(msgtxt, \"Vol: can't open %s for input!!! Aborting\\n\", vol->name);\n        rt_ui_message(MSG_ERR, msgtxt);\n        rt_ui_message(MSG_ABORT, \"Rendering Aborted.\");\n        std::exit(-1);\n    }\n\n    sprintf(\n        msgtxt, \"loading %dx%dx%d volume set from %s\", vol->xres, vol->yres, vol->zres, vol->name);\n    rt_ui_message(MSG_0, msgtxt);\n\n    vol->data = (unsigned char *)rt_getmem(vol->xres * vol->yres * vol->zres);\n\n    status = fread(vol->data, 1, (vol->xres * vol->yres * vol->zres), dfile);\n    fclose(dfile);\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for/tachyon/src/vol.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    The original source for this example is\n    Copyright (c) 1994-2008 John E. Stone\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\n    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n*/\n\n/*\n * vol.h - Volume rendering definitions etc.\n *\n *\n *  $Id: vol.h,v 1.2 2007-02-22 17:54:17 Exp $\n */\n\nvoid *newscalarvol(void *intex,\n                   vector min,\n                   vector max,\n                   int xs,\n                   int ys,\n                   int zs,\n                   char *fname,\n                   scalarvol *invol);\n\nvoid LoadVol(scalarvol *);\ncolor scalar_volume_texture(vector *, texture *, ray *);\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for_each/README.md",
    "content": "# Code Samples of oneAPI Threading Building Blocks (oneTBB)\nExamples using `parallel_for_each` algorithm.\n\n| Code sample name | Description\n|:--- |:---\n| parallel_preorder | Parallel preorder traversal of a graph.\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for_each/parallel_preorder/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(parallel_preorder CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(tbb)\n\nadd_executable(parallel_preorder parallel_preorder.cpp Graph.cpp main.cpp)\n\ntarget_link_libraries(parallel_preorder TBB::tbb Threads::Threads)\ntarget_compile_options(parallel_preorder PRIVATE ${TBB_CXX_STD_FLAG})\n\nset(EXECUTABLE \"$<TARGET_FILE:parallel_preorder>\")\nset(ARGS \"\")\nset(PERF_ARGS auto silent 500000 100)\nset(LIGHT_ARGS 1:auto:+4 n-of-traversals=50)\n\nadd_execution_target(run_parallel_preorder parallel_preorder ${EXECUTABLE} \"${ARGS}\")\nadd_execution_target(perf_run_parallel_preorder parallel_preorder ${EXECUTABLE} \"${PERF_ARGS}\")\nadd_execution_target(light_test_parallel_preorder parallel_preorder ${EXECUTABLE} \"${LIGHT_ARGS}\")"
  },
  {
    "path": "third-party/tbb/examples/parallel_for_each/parallel_preorder/Graph.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <cstdlib>\n\n#include <iostream>\n\n#include \"Graph.hpp\"\n\nCell::Cell(const Cell& other) : op(other.op), value(other.value), successor(other.successor) {\n    ref_count = other.ref_count.load();\n\n    input[0] = other.input[0];\n    input[1] = other.input[1];\n}\n\nvoid Graph::create_random_dag(std::size_t number_of_nodes) {\n    my_vertex_set.resize(number_of_nodes);\n    for (std::size_t k = 0; k < number_of_nodes; ++k) {\n        Cell& c = my_vertex_set[k];\n        int op = int((rand() >> 8) % 5u);\n        if (op > int(k))\n            op = int(k);\n        switch (op) {\n            default:\n                c.op = OP_VALUE;\n                c.value = Cell::value_type((float)k);\n                break;\n            case 1: c.op = OP_NEGATE; break;\n            case 2: c.op = OP_SUB; break;\n            case 3: c.op = OP_ADD; break;\n            case 4: c.op = OP_MUL; break;\n        }\n        for (int j = 0; j < ArityOfOp[c.op]; ++j) {\n            Cell& input = my_vertex_set[rand() % k];\n            c.input[j] = &input;\n        }\n    }\n}\n\nvoid Graph::print() {\n    for (std::size_t k = 0; k < my_vertex_set.size(); ++k) {\n        std::cout << \"Cell \" << k << \":\";\n        for (std::size_t j = 0; j < my_vertex_set[k].successor.size(); ++j)\n            std::cout << \" \" << int(my_vertex_set[k].successor[j] - &my_vertex_set[0]);\n        std::cout << \"\\n\";\n    }\n}\n\nvoid Graph::get_root_set(std::vector<Cell*>& root_set) {\n    for (std::size_t k = 0; k < my_vertex_set.size(); ++k) {\n        my_vertex_set[k].successor.clear();\n    }\n    root_set.clear();\n    for (std::size_t k = 0; k < my_vertex_set.size(); ++k) {\n        Cell& c = my_vertex_set[k];\n        c.ref_count = ArityOfOp[c.op];\n        for (int j = 0; j < ArityOfOp[c.op]; ++j) {\n            c.input[j]->successor.push_back(&c);\n        }\n        if (ArityOfOp[c.op] == 0)\n            root_set.push_back(&my_vertex_set[k]);\n    }\n}\n\nvoid Cell::update() {\n    switch (op) {\n        case OP_VALUE: break;\n        case OP_NEGATE: value = -(input[0]->value); break;\n        case OP_ADD: value = input[0]->value + input[1]->value; break;\n        case OP_SUB: value = input[0]->value - input[1]->value; break;\n        case OP_MUL: value = input[0]->value * input[1]->value; break;\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for_each/parallel_preorder/Graph.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TBB_examples_parallel_preorder_graph_H\n#define TBB_examples_parallel_preorder_graph_H\n\n#include <vector>\n#include <atomic>\n\n#include \"Matrix.hpp\"\n\nenum OpKind {\n    // Use Cell's value\n    OP_VALUE,\n    // Unary negation\n    OP_NEGATE,\n    // Addition\n    OP_ADD,\n    // Subtraction\n    OP_SUB,\n    // Multiplication\n    OP_MUL\n};\n\nstatic const int ArityOfOp[] = { 0, 1, 2, 2, 2 };\n\nclass Cell {\npublic:\n    //! Operation for this cell\n    OpKind op;\n\n    //! Inputs to this cell\n    Cell* input[2];\n\n    //! Type of value stored in a Cell\n    typedef Matrix value_type;\n\n    //! Value associated with this Cell\n    value_type value;\n\n    //! Set of cells that use this Cell as an input\n    std::vector<Cell*> successor;\n\n    //! Reference count of number of inputs that are not yet updated.\n    std::atomic<int> ref_count;\n\n    //! Update the Cell's value.\n    void update();\n\n    //! Default constructor\n    Cell() {}\n\n    //! Copy constructor\n    Cell(const Cell& other);\n};\n\n//! A directed graph where the vertices are Cells.\nclass Graph {\n    std::vector<Cell> my_vertex_set;\n\npublic:\n    //! Create a random acyclic directed graph\n    void create_random_dag(std::size_t number_of_nodes);\n\n    //! Print the graph\n    void print();\n\n    //! Get set of cells that have no inputs.\n    void get_root_set(std::vector<Cell*>& root_set);\n};\n\n#endif /* TBB_examples_parallel_preorder_graph_H */\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for_each/parallel_preorder/Matrix.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TBB_examples_parallel_preorder_matrix_H\n#define TBB_examples_parallel_preorder_matrix_H\n\nclass Matrix {\n    static const int n = 20;\n    float array[n][n];\n\npublic:\n    Matrix() {}\n    Matrix(float z) {\n        for (int i = 0; i < n; ++i)\n            for (int j = 0; j < n; ++j)\n                array[i][j] = i == j ? z : 0;\n    }\n    friend Matrix operator-(const Matrix& x) {\n        Matrix result;\n        for (int i = 0; i < n; ++i)\n            for (int j = 0; j < n; ++j)\n                result.array[i][j] = -x.array[i][j];\n        return result;\n    }\n    friend Matrix operator+(const Matrix& x, const Matrix& y) {\n        Matrix result;\n        for (int i = 0; i < n; ++i)\n            for (int j = 0; j < n; ++j)\n                result.array[i][j] = x.array[i][j] + y.array[i][j];\n        return result;\n    }\n    friend Matrix operator-(const Matrix& x, const Matrix& y) {\n        Matrix result;\n        for (int i = 0; i < n; ++i)\n            for (int j = 0; j < n; ++j)\n                result.array[i][j] = x.array[i][j] - y.array[i][j];\n        return result;\n    }\n    friend Matrix operator*(const Matrix& x, const Matrix& y) {\n        Matrix result(0);\n        for (int i = 0; i < n; ++i)\n            for (int k = 0; k < n; ++k)\n                for (int j = 0; j < n; ++j)\n                    result.array[i][j] += x.array[i][k] * y.array[k][j];\n        return result;\n    }\n};\n\n#endif /* TBB_examples_parallel_preorder_matrix_H */\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for_each/parallel_preorder/README.md",
    "content": "# Parallel_preorder sample\nExample that uses `parallel_for_each` to do parallel preorder traversal of a sparse graph.\n\nEach vertex in the graph is called a \"cell\". Each cell has a value. The value is a matrix. Some of the cells have operators that compute the cell's value, using other cell's values as input. A cell that uses the value of cell `x` is called a successor of `x`.\n\nThe algorithm works as follows.\n\n1. Compute the set of cells that have no inputs. This set is called `root_set`.\n2. Each cell has an associated field `ref_count` that is an atomic integer. Initialize `ref_count` to the number of inputs for the `Cell`.\n3. Update each cell in `root_set`, by applying a `parallel_for_each` to a `root_set`.\n4. After updating a cell, for each of its successors\n    1. Atomically decrement the successor's ref_count\n    2. If the count became zero, add the cell to the set of cells to be updated, by calling `feeder::add`.\n\nThe times printed are for the traversal and update, and do not include time for computing the `root_set`.\n\nThe example is using custom synchronization via ref_count atomic variable. Correctness checking tools might not take this into account, and report data races between different tasks that are actually synchronized.\n\n**Note:** It is important to understand that this example is unlikely to show speedup if the cell values are changed to type \"float\". The reason is twofold.\n* The smaller value type causes each `Cell` to be significantly smaller than a cache line, which leads to false sharing conflicts.\n* The time to update the cells becomes very small, and consequently the overhead of `parallel_for_each` swamps the useful work.\n\n## Building the example\n```\ncmake <path_to_example>\ncmake --build .\n```\n\n## Running the sample\n### Predefined make targets\n* `make run_parallel_preorder` - executes the example with predefined parameters\n* `make perf_run_parallel_preorder` - executes the example with suggested parameters to measure the oneTBB performance\n* `make light_test_parallel_preorder` - executes the example with suggested parameters to reduce execution time.\n\n### Application parameters\nUsage:\n```\nparallel_preorder [n-of-threads=value] [n-of-nodes=value] [n-of-traversals=value] [silent] [-h] [n-of-threads [n-of-nodes [n-of-traversals]]]\n```\n* `-h` - prints the help for command line options.\n* `n-of-threads` - the number of threads to use; a range of the form low\\[:high\\], where low and optional high are non-negative integers or `auto` for a platform-specific default number.\n* `n-of-nodes` - the number of nodes in the graph. Default value is 1000.\n* `n-of-traversals` - the number of times to evaluate the graph. Default value is 500.\n* `silent` - no output except elapsed time.\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for_each/parallel_preorder/main.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/* Example program that shows how to use parallel_for_each to do parallel preorder\n   traversal of a directed acyclic graph. */\n\n#include <cstdlib>\n\n#include <iostream>\n#include <vector>\n\n#include \"oneapi/tbb/tick_count.h\"\n#include \"oneapi/tbb/global_control.h\"\n#include \"common/utility/utility.hpp\"\n#include \"common/utility/get_default_num_threads.hpp\"\n\n#include \"Graph.hpp\"\n\n// some forward declarations\nclass Cell;\nvoid ParallelPreorderTraversal(const std::vector<Cell*>& root_set);\n\n//------------------------------------------------------------------------\n// Test driver\n//------------------------------------------------------------------------\nstatic unsigned nodes = 1000;\nstatic unsigned traversals = 500;\nstatic bool SilentFlag = false;\n\n//! Parse the command line.\nstatic void ParseCommandLine(int argc, char* argv[], utility::thread_number_range& threads) {\n    utility::parse_cli_arguments(\n        argc,\n        argv,\n        utility::cli_argument_pack()\n            //\"-h\" option for displaying help is present implicitly\n            .positional_arg(threads, \"n-of-threads\", utility::thread_number_range_desc)\n            .positional_arg(nodes, \"n-of-nodes\", \"number of nodes in the graph.\")\n            .positional_arg(\n                traversals,\n                \"n-of-traversals\",\n                \"number of times to evaluate the graph. Reduce it (e.g. to 100) to shorten example run time\\n\")\n            .arg(SilentFlag, \"silent\", \"no output except elapsed time \"));\n}\n\nint main(int argc, char* argv[]) {\n    utility::thread_number_range threads(utility::get_default_num_threads);\n    oneapi::tbb::tick_count main_start = oneapi::tbb::tick_count::now();\n    ParseCommandLine(argc, argv, threads);\n\n    // Start scheduler with given number of threads.\n    for (int p = threads.first; p <= threads.last; p = threads.step(p)) {\n        oneapi::tbb::tick_count t0 = oneapi::tbb::tick_count::now();\n        oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism, p);\n        srand(2);\n        std::size_t root_set_size = 0;\n        {\n            Graph g;\n            g.create_random_dag(nodes);\n            std::vector<Cell*> root_set;\n            g.get_root_set(root_set);\n            root_set_size = root_set.size();\n            for (unsigned int trial = 0; trial < traversals; ++trial) {\n                ParallelPreorderTraversal(root_set);\n            }\n        }\n        oneapi::tbb::tick_count::interval_t interval = oneapi::tbb::tick_count::now() - t0;\n        if (!SilentFlag) {\n            std::cout << interval.seconds() << \" seconds using \" << p << \" threads (\"\n                      << root_set_size << \" nodes in root_set)\\n\";\n        }\n    }\n    utility::report_elapsed_time((oneapi::tbb::tick_count::now() - main_start).seconds());\n\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_for_each/parallel_preorder/parallel_preorder.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <vector>\n#include <algorithm>\n\n#include \"oneapi/tbb/parallel_for_each.h\"\n\n#include \"Graph.hpp\"\n\nclass Body {\npublic:\n    Body(){};\n\n    //------------------------------------------------------------------------\n    // Following signatures are required by parallel_for_each\n    //------------------------------------------------------------------------\n    typedef Cell* argument_type;\n\n    void operator()(Cell* c, oneapi::tbb::feeder<Cell*>& feeder) const {\n        c->update();\n        // Restore ref_count in preparation for subsequent traversal.\n        c->ref_count = ArityOfOp[c->op];\n        for (std::size_t k = 0; k < c->successor.size(); ++k) {\n            Cell* successor = c->successor[k];\n            // ref_count is used for inter-task synchronization.\n            // Correctness checking tools might not take this into account, and report\n            // data races between different tasks, that are actually synchronized.\n            if (0 == --(successor->ref_count)) {\n                feeder.add(successor);\n            }\n        }\n    }\n};\n\nvoid ParallelPreorderTraversal(const std::vector<Cell*>& root_set) {\n    oneapi::tbb::parallel_for_each(root_set.begin(), root_set.end(), Body());\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_pipeline/README.md",
    "content": "# Code Samples of oneAPI Threading Building Blocks (oneTBB)\nExamples using `parallel_pipeline` algorithm.\n\n| Code sample name | Description\n|:--- |:---\n| square | Another string transformation example that squares numbers read from a file.\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_pipeline/square/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(square CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(tbb)\n\nadd_executable(square gen_input.cpp square.cpp)\n\ntarget_link_libraries(square TBB::tbb Threads::Threads)\ntarget_compile_options(square PRIVATE ${TBB_CXX_STD_FLAG})\n\nif (MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL IntelLLVM)\n    target_compile_options(square PRIVATE -D_CRT_SECURE_NO_WARNINGS)\nendif()\n\nset(EXECUTABLE \"$<TARGET_FILE:square>\")\nset(ARGS 0 input.txt output.txt)\nset(PERF_ARGS auto input.txt output.txt silent)\n\nadd_execution_target(run_square square ${EXECUTABLE} \"${ARGS}\")\nadd_execution_target(perf_run_square square ${EXECUTABLE} \"${PERF_ARGS}\")\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_pipeline/square/README.md",
    "content": "# Square sample\nText filter that demonstrates the use of `parallel_pipeline`. Example program reads a file containing decimal integers in text format, and changes each to its square.\n\n## Building the example\n```\ncmake <path_to_example>\ncmake --build .\n```\n\n## Running the sample\n### Predefined make targets\n* `make run_square` - executes the example with predefined parameters\n* `make perf_run_square` - executes the example with suggested parameters to measure the oneTBB performance\n* `make light_test_square` - executes the example with suggested parameters to reduce execution time.\n\n### Application parameters\nUsage:\n```\nsquare [n-of-threads=value] [input-file=value] [output-file=value] [max-slice-size=value] [silent] [-h] [n-of-threads [input-file [output-file [max-slice-size]]]]\n```\n* `-h` - prints the help for command line options.\n* `n-of-threads` - the number of threads to use; a range of the form low\\[:high\\], where low and optional high are non-negative integers or `auto` for a platform-specific default number.\n* `input`- file is an input file name.\n* `output`- file is an output file name.\n* `max-slice-size` - the maximum number of characters in one slice.\n* `silent` - no output except elapsed time.\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_pipeline/square/gen_input.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <cstdlib>\n#include <cstdio>\n\n#include <stdexcept>\n\n#if _WIN32\n#include <io.h>\n#ifndef F_OK\n#define F_OK 0\n#endif\n#define access _access\n#else\n#include <unistd.h>\n#endif\n\nconst long INPUT_SIZE = 1000000;\n\n//! Generates sample input for square.cpp\nvoid gen_input(const char *fname) {\n    long num = INPUT_SIZE;\n    FILE *fptr = fopen(fname, \"w\");\n    if (!fptr) {\n        throw std::runtime_error(\"Could not open file for generating input\");\n    }\n\n    int a = 0;\n    int b = 1;\n    for (long j = 0; j < num; ++j) {\n        fprintf(fptr, \"%u\\n\", a);\n        b += a;\n        a = (b - a) % 10000;\n        if (a < 0)\n            a = -a;\n    }\n\n    if (fptr) {\n        fclose(fptr);\n    }\n}\n\nvoid generate_if_needed(const char *fname) {\n    if (access(fname, F_OK) != 0)\n        gen_input(fname);\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_pipeline/square/square.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//\n// Example program that reads a file of decimal integers in text format\n// and changes each to its square.\n//\n\n#include <cstring>\n#include <cstdlib>\n#include <cstdio>\n#include <cctype>\n\n#include \"oneapi/tbb/parallel_pipeline.h\"\n#include \"oneapi/tbb/tick_count.h\"\n#include \"oneapi/tbb/tbb_allocator.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include \"common/utility/utility.hpp\"\n#include \"common/utility/get_default_num_threads.hpp\"\n\nextern void generate_if_needed(const char*);\n\n//! Holds a slice of text.\n/** Instances *must* be allocated/freed using methods herein, because the C++ declaration\n    represents only the header of a much larger object in memory. */\nclass TextSlice {\n    //! Pointer to one past last character in sequence\n    char* logical_end;\n    //! Pointer to one past last available byte in sequence.\n    char* physical_end;\n\npublic:\n    //! Allocate a TextSlice object that can hold up to max_size characters.\n    static TextSlice* allocate(std::size_t max_size) {\n        // +1 leaves room for a terminating null character.\n        TextSlice* t = (TextSlice*)oneapi::tbb::tbb_allocator<char>().allocate(sizeof(TextSlice) +\n                                                                               max_size + 1);\n        t->logical_end = t->begin();\n        t->physical_end = t->begin() + max_size;\n        return t;\n    }\n    //! Free a TextSlice object\n    void free() {\n        oneapi::tbb::tbb_allocator<char>().deallocate(\n            (char*)this, sizeof(TextSlice) + (physical_end - begin()) + 1);\n    }\n    //! Pointer to beginning of sequence\n    char* begin() {\n        return (char*)(this + 1);\n    }\n    //! Pointer to one past last character in sequence\n    char* end() {\n        return logical_end;\n    }\n    //! Length of sequence\n    std::size_t size() const {\n        return logical_end - (char*)(this + 1);\n    }\n    //! Maximum number of characters that can be appended to sequence\n    std::size_t avail() const {\n        return physical_end - logical_end;\n    }\n    //! Append sequence [first,last) to this sequence.\n    void append(char* first, char* last) {\n        memcpy(logical_end, first, last - first);\n        logical_end += last - first;\n    }\n    //! Set end() to given value.\n    void set_end(char* p) {\n        logical_end = p;\n    }\n};\n\nstd::size_t MAX_CHAR_PER_INPUT_SLICE = 4000;\nstd::string InputFileName = \"input.txt\";\nstd::string OutputFileName = \"output.txt\";\n\nTextSlice* next_slice = nullptr;\n\nclass MyInputFunc {\npublic:\n    MyInputFunc(FILE* input_file_);\n    MyInputFunc(const MyInputFunc& f) : input_file(f.input_file) {}\n    ~MyInputFunc();\n    TextSlice* operator()(oneapi::tbb::flow_control& fc) const;\n\nprivate:\n    FILE* input_file;\n};\n\nMyInputFunc::MyInputFunc(FILE* input_file_) : input_file(input_file_) {}\n\nMyInputFunc::~MyInputFunc() {}\n\nTextSlice* MyInputFunc::operator()(oneapi::tbb::flow_control& fc) const {\n    // Read characters into space that is available in the next slice.\n    if (!next_slice)\n        next_slice = TextSlice::allocate(MAX_CHAR_PER_INPUT_SLICE);\n    std::size_t m = next_slice->avail();\n    std::size_t n = fread(next_slice->end(), 1, m, input_file);\n    if (!n && next_slice->size() == 0) {\n        // No more characters to process\n        fc.stop();\n        return nullptr;\n    }\n    else {\n        // Have more characters to process.\n        TextSlice* t = next_slice;\n        next_slice = TextSlice::allocate(MAX_CHAR_PER_INPUT_SLICE);\n        char* p = t->end() + n;\n        if (n == m) {\n            // Might have read partial number.\n            // If so, transfer characters of partial number to next slice.\n            while (p > t->begin() && isdigit(p[-1]))\n                --p;\n            assert(p > t->begin()); // Number too large to fit in buffer\n            next_slice->append(p, t->end() + n);\n        }\n        t->set_end(p);\n        return t;\n    }\n}\n\n// Functor that changes each decimal number to its square.\nclass MyTransformFunc {\npublic:\n    TextSlice* operator()(TextSlice* input) const;\n};\n\nTextSlice* MyTransformFunc::operator()(TextSlice* input) const {\n    // Add terminating null so that strtol works right even if number is at end of the input.\n    *input->end() = '\\0';\n    char* p = input->begin();\n    TextSlice* out = TextSlice::allocate(2 * MAX_CHAR_PER_INPUT_SLICE);\n    char* q = out->begin();\n    for (;;) {\n        while (p < input->end() && !isdigit(*p))\n            *q++ = *p++;\n        if (p == input->end())\n            break;\n        long x = strtol(p, &p, 10);\n        // Note: no overflow checking is needed here, as we have twice the\n        // input string length, but the square of a non-negative integer n\n        // cannot have more than twice as many digits as n.\n        long y = x * x;\n        sprintf(q, \"%ld\", y);\n        q = strchr(q, 0);\n    }\n    out->set_end(q);\n    input->free();\n    return out;\n}\n\n// Functor that writes a TextSlice to a file.\nclass MyOutputFunc {\n    FILE* my_output_file;\n\npublic:\n    MyOutputFunc(FILE* output_file);\n    void operator()(TextSlice* item) const;\n};\n\nMyOutputFunc::MyOutputFunc(FILE* output_file) : my_output_file(output_file) {}\n\nvoid MyOutputFunc::operator()(TextSlice* out) const {\n    std::size_t n = fwrite(out->begin(), 1, out->size(), my_output_file);\n    if (n != out->size()) {\n        fprintf(stderr, \"Can't write into file '%s'\\n\", OutputFileName.c_str());\n        std::exit(-1);\n    }\n    out->free();\n}\n\nbool silent = false;\n\nint run_pipeline(int nthreads) {\n    FILE* input_file = fopen(InputFileName.c_str(), \"r\");\n    if (!input_file) {\n        throw std::invalid_argument((\"Invalid input file name: \" + InputFileName).c_str());\n        return 0;\n    }\n    FILE* output_file = fopen(OutputFileName.c_str(), \"w\");\n    if (!output_file) {\n        throw std::invalid_argument((\"Invalid output file name: \" + OutputFileName).c_str());\n        return 0;\n    }\n\n    oneapi::tbb::tick_count t0 = oneapi::tbb::tick_count::now();\n\n    // Need more than one token in flight per thread to keep all threads\n    // busy; 2-4 works\n    oneapi::tbb::parallel_pipeline(\n        nthreads * 4,\n        oneapi::tbb::make_filter<void, TextSlice*>(oneapi::tbb::filter_mode::serial_in_order,\n                                                   MyInputFunc(input_file)) &\n            oneapi::tbb::make_filter<TextSlice*, TextSlice*>(oneapi::tbb::filter_mode::parallel,\n                                                             MyTransformFunc()) &\n            oneapi::tbb::make_filter<TextSlice*, void>(oneapi::tbb::filter_mode::serial_in_order,\n                                                       MyOutputFunc(output_file)));\n\n    oneapi::tbb::tick_count t1 = oneapi::tbb::tick_count::now();\n\n    fclose(output_file);\n    fclose(input_file);\n\n    if (!silent)\n        printf(\"time = %g\\n\", (t1 - t0).seconds());\n\n    return 1;\n}\n\nint main(int argc, char* argv[]) {\n    oneapi::tbb::tick_count mainStartTime = oneapi::tbb::tick_count::now();\n\n    // The 1st argument is the function to obtain 'auto' value; the 2nd is the default value\n    // The example interprets 0 threads as \"run serially, then fully subscribed\"\n    utility::thread_number_range threads(utility::get_default_num_threads, 0);\n\n    utility::parse_cli_arguments(\n        argc,\n        argv,\n        utility::cli_argument_pack()\n            //\"-h\" option for displaying help is present implicitly\n            .positional_arg(threads, \"n-of-threads\", utility::thread_number_range_desc)\n            .positional_arg(InputFileName, \"input-file\", \"input file name\")\n            .positional_arg(OutputFileName, \"output-file\", \"output file name\")\n            .positional_arg(MAX_CHAR_PER_INPUT_SLICE,\n                            \"max-slice-size\",\n                            \"the maximum number of characters in one slice\")\n            .arg(silent, \"silent\", \"no output except elapsed time\"));\n    generate_if_needed(InputFileName.c_str());\n\n    if (threads.first) {\n        for (int p = threads.first; p <= threads.last; p = threads.step(p)) {\n            if (!silent)\n                printf(\"threads = %d \", p);\n            oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism, p);\n            if (!run_pipeline(p))\n                return -1;\n        }\n    }\n    else { // Number of threads wasn't set explicitly. Run serial and parallel version\n        { // serial run\n            if (!silent)\n                printf(\"serial run   \");\n            oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism, 1);\n            if (!run_pipeline(1))\n                return -1;\n        }\n        { // parallel run (number of threads is selected automatically)\n            if (!silent)\n                printf(\"parallel run \");\n            oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism,\n                                          utility::get_default_num_threads());\n            if (!run_pipeline(utility::get_default_num_threads()))\n                return -1;\n        }\n    }\n\n    utility::report_elapsed_time((oneapi::tbb::tick_count::now() - mainStartTime).seconds());\n\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_reduce/README.md",
    "content": "# Code Samples of oneAPI Threading Building Blocks (oneTBB)\nExamples using `parallel_reduce` algorithm.\n\n| Code sample name | Description\n|:--- |:---\n| convex_hull | Parallel version of convex hull algorithm (quick hull).\n| pi | Parallel version of calculating &pi; by numerical integration.\n| primes | Parallel version of the Sieve of Eratosthenes.\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_reduce/convex_hull/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(convex_hull_bench CXX)\nproject(convex_hull_sample CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(tbb)\n\nadd_executable(convex_hull_bench convex_hull_bench.cpp)\nadd_executable(convex_hull_sample convex_hull_sample.cpp)\n\ntarget_link_libraries(convex_hull_bench TBB::tbb Threads::Threads)\ntarget_link_libraries(convex_hull_sample TBB::tbb Threads::Threads)\n\ntarget_compile_options(convex_hull_bench PRIVATE ${TBB_CXX_STD_FLAG})\ntarget_compile_options(convex_hull_sample PRIVATE ${TBB_CXX_STD_FLAG})\n\nadd_custom_target(convex_hull)\nadd_dependencies(convex_hull convex_hull_bench convex_hull_sample)\n\nset(EXECUTABLE \"$<TARGET_FILE:convex_hull_bench>\")\nset(PERF_EXECUTABLE \"$<TARGET_FILE:convex_hull_sample>\")\nset(ARGS \"\")\nset(LIGHT_ARGS 4 400)\nset(PERF_ARGS silent auto 40000000)\n\nadd_execution_target(run_convex_hull convex_hull ${EXECUTABLE} \"${ARGS}\")\nadd_execution_target(light_test_convex_hull convex_hull ${EXECUTABLE} \"${LIGHT_ARGS}\")\nadd_execution_target(perf_run_convex_hull convex_hull ${PERF_EXECUTABLE} \"${PERF_ARGS}\")\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_reduce/convex_hull/README.md",
    "content": "# Convex_hull sample\nParallel version of convex hull algorithm (quick hull).\n\n## Building the example\n```\ncmake <path_to_example>\ncmake --build .\n```\n\nThis sample contains two additional predefined build targets:\n- `convex_hull_sample` -  builds parallel version of the example which uses `parallel_reduce`, `parallel_for` and `concurrent_vector`.\n- `convex_hull_bench` - build version of the example that compares serial and parallel buffered and unbuffered implementations.\n\n## Running the sample\n### Predefined make targets\n* `make run_convex_hull` - executes the example with predefined parameters.\n* `make perf_run_convex_hull` - executes the example with suggested parameters to measure the oneTBB performance.\n* `make light_test_convex_hull` - executes the example with suggested parameters to reduce execution time.\n\n### Application parameters\nUsage:\n```\nconvex_hull_sample [n-of-threads=value] [n-of-points=value] [silent] [verbose] [-h] [n-of-threads [n-of-points]]\nconvex_hull_bench [n-of-threads=value] [n-of-points=value] [silent] [verbose] [-h] [n-of-threads [n-of-points]]\n```\n* `-h` - prints the help for command line options.\n* `n-of-threads` - the number of threads to use; a range of the form low\\[:high\\], where low and optional high are non-negative integers or `auto` for a platform-specific default number.\n* `n-of-points` - number of points.\n* `silent` - no output except elapsed time.\n* `verbose` - turns verbose ON.\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_reduce/convex_hull/convex_hull.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TBB_examples_convex_hull_H\n#define TBB_examples_convex_hull_H\n\n#include <cassert>\n#include <cstdlib>\n#include <cstring>\n#include <climits>\n\n#include <iostream>\n#include <iomanip>\n#include <sstream>\n#include <vector>\n#include <string>\n#include <algorithm>\n#include <functional>\n\n#include \"oneapi/tbb/tick_count.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include \"common/utility/utility.hpp\"\n#include \"common/utility/get_default_num_threads.hpp\"\n#include \"common/utility/fast_random.hpp\"\n\nnamespace cfg {\n// convex hull problem user set parameters\nlong numberOfPoints = 5000000; // problem size\n\n// convex hull grain sizes for 3 subproblems. Be sure 16*GS < 512Kb\nconst std::size_t generateGrainSize = 25000;\nconst std::size_t findExtremumGrainSize = 25000;\nconst std::size_t divideGrainSize = 25000;\n}; // namespace cfg\n\nnamespace util {\nbool silent = false;\nbool verbose = false;\nstd::vector<std::string> OUTPUT;\n\n// utility functionality\nvoid ParseInputArgs(int argc, char* argv[], utility::thread_number_range& threads) {\n    utility::parse_cli_arguments(\n        argc,\n        argv,\n        utility::cli_argument_pack()\n            //\"-h\" option for displaying help is present implicitly\n            .positional_arg(threads, \"n-of-threads\", utility::thread_number_range_desc)\n            .positional_arg(cfg::numberOfPoints, \"n-of-points\", \"number of points\")\n            .arg(silent, \"silent\", \"no output except elapsed time\")\n            .arg(verbose, \"verbose\", \"turns verbose ON\"));\n    //disabling verbose if silent is specified\n    if (silent)\n        verbose = false;\n    ;\n}\n\ntemplate <typename T>\nstruct point {\n    T x;\n    T y;\n    //According to subparagraph 4 of paragraph 12.6.2 \"Initializing bases and members\" [class.base.init]\n    //of ANSI-ISO-IEC C++ 2003 standard, POD members will _not_ be initialized if they are not mentioned\n    //in the base-member initializer list.\n\n    //For more details why this needed please see comment in FillRNDPointsVector_buf\n    point() {}\n    point(T _x, T _y) : x(_x), y(_y) {}\n};\n\nstd::ostream& operator<<(std::ostream& o, point<double> const& p) {\n    return o << \"(\" << p.x << \",\" << p.y << \")\";\n}\n\nstruct rng {\n    static const std::size_t max_rand = USHRT_MAX;\n    utility::FastRandom my_fast_random;\n    rng(std::size_t seed) : my_fast_random(seed) {}\n    unsigned short operator()() {\n        return my_fast_random.get();\n    }\n    unsigned short operator()(std::size_t& seed) {\n        return my_fast_random.get(seed);\n    }\n};\n\ntemplate <typename T, typename rng_functor_type>\npoint<T> GenerateRNDPoint(std::size_t& count, rng_functor_type random, std::size_t rand_max) {\n    /* generates random points on 2D plane so that the cluster\n        is somewhat circle shaped */\n    const std::size_t maxsize = 500;\n    T x = random() * 2.0 / (double)rand_max - 1;\n    T y = random() * 2.0 / (double)rand_max - 1;\n    T r = (x * x + y * y);\n    if (r > 1) {\n        count++;\n        if (count > 10) {\n            if (random() / (double)rand_max > 0.5)\n                x /= r;\n            if (random() / (double)rand_max > 0.5)\n                y /= r;\n            count = 0;\n        }\n        else {\n            x /= r;\n            y /= r;\n        }\n    }\n\n    x = (x + 1) * 0.5 * maxsize;\n    y = (y + 1) * 0.5 * maxsize;\n\n    return point<T>(x, y);\n}\n\ntemplate <typename Index>\nstruct edge {\n    Index start;\n    Index end;\n    edge(Index _p1, Index _p2) : start(_p1), end(_p2){};\n};\n\ntemplate <typename T>\nstd::ostream& operator<<(std::ostream& _ostr, point<T> _p) {\n    return _ostr << '(' << _p.x << ',' << _p.y << ')';\n}\n\ntemplate <typename T>\nstd::istream& operator>>(std::istream& _istr, point<T> _p) {\n    return _istr >> _p.x >> _p.y;\n}\n\ntemplate <typename T>\nbool operator==(point<T> p1, point<T> p2) {\n    return (p1.x == p2.x && p1.y == p2.y);\n}\n\ntemplate <typename T>\nbool operator!=(point<T> p1, point<T> p2) {\n    return !(p1 == p2);\n}\n\ntemplate <typename T>\ndouble cross_product(const point<T>& start, const point<T>& end1, const point<T>& end2) {\n    return ((end1.x - start.x) * (end2.y - start.y) - (end2.x - start.x) * (end1.y - start.y));\n}\n\n// Timing functions are based on TBB to always obtain wall-clock time\ntypedef oneapi::tbb::tick_count my_time_t;\n\nmy_time_t gettime() {\n    return oneapi::tbb::tick_count::now();\n}\n\ndouble time_diff(my_time_t start, my_time_t end) {\n    return (end - start).seconds();\n}\n\nvoid WriteResults(int nthreads, double initTime, double calcTime) {\n    if (verbose) {\n        std::cout << \" Step by step hull construction:\"\n                  << \"\\n\";\n        for (std::size_t i = 0; i < OUTPUT.size(); ++i)\n            std::cout << OUTPUT[i] << \"\\n\";\n    }\n    if (!silent) {\n        std::cout << \"  Number of nodes:\" << cfg::numberOfPoints\n                  << \"  Number of threads:\" << nthreads << \"  Initialization time:\" << std::setw(10)\n                  << std::setprecision(3) << initTime << \"  Calculation time:\" << std::setw(10)\n                  << std::setprecision(3) << calcTime << \"\\n\";\n    }\n}\n}; // namespace util\n\n#endif /* TBB_examples_convex_hull_H */\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_reduce/convex_hull/convex_hull_bench.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    This file contains a few implementations, so it may look overly complicated.\n    The most efficient implementation is also separated into convex_hull_sample.cpp\n*/\n#include \"convex_hull.hpp\"\n\ntypedef util::point<double> point_t;\n\n#ifndef USETBB\n#define USETBB 1\n#endif\n#ifndef USECONCVEC\n#define USECONCVEC 1\n#endif\n\n#if !USETBB // Serial implementation of Quick Hull algorithm\n\ntypedef std::vector<point_t> pointVec_t;\n\nvoid serial_initialize(pointVec_t &points);\n\nclass FindXExtremum : public std::unary_function<const point_t &, void> {\npublic:\n    typedef enum { minX, maxX } extremumType;\n\n    FindXExtremum(const point_t &frstPoint, extremumType exType_)\n            : extrXPoint(frstPoint),\n              exType(exType_) {}\n\n    void operator()(const point_t &p) {\n        if (closerToExtremum(p))\n            extrXPoint = p;\n    }\n\n    operator point_t() {\n        return extrXPoint;\n    }\n\nprivate:\n    const extremumType exType;\n    point_t extrXPoint;\n\n    bool closerToExtremum(const point_t &p) const {\n        switch (exType) {\n            case minX: return p.x < extrXPoint.x; break;\n            case maxX: return p.x > extrXPoint.x; break;\n        }\n        return false; // avoid warning\n    }\n};\n\ntemplate <FindXExtremum::extremumType type>\npoint_t extremum(const pointVec_t &points) {\n    assert(!points.empty());\n    return std::for_each(points.begin(), points.end(), FindXExtremum(points[0], type));\n}\n\nclass SplitByCP : public std::unary_function<const point_t &, void> {\n    pointVec_t &reducedSet;\n    point_t p1, p2;\n    point_t farPoint;\n    double howFar;\n\npublic:\n    SplitByCP(point_t _p1, point_t _p2, pointVec_t &_reducedSet)\n            : p1(_p1),\n              p2(_p2),\n              reducedSet(_reducedSet),\n              howFar(0),\n              farPoint(p1) {}\n\n    void operator()(const point_t &p) {\n        double cp;\n        if ((p != p1) && (p != p2)) {\n            cp = util::cross_product(p1, p2, p);\n            if (cp > 0) {\n                reducedSet.push_back(p);\n                if (cp > howFar) {\n                    farPoint = p;\n                    howFar = cp;\n                }\n            }\n        }\n    }\n\n    operator point_t() {\n        return farPoint;\n    }\n};\n\npoint_t divide(const pointVec_t &P, pointVec_t &P_reduced, const point_t &p1, const point_t &p2) {\n    SplitByCP splitByCP(p1, p2, P_reduced);\n    point_t farPoint = std::for_each(P.begin(), P.end(), splitByCP);\n\n    if (util::verbose) {\n        std::stringstream ss;\n        ss << P.size() << \" nodes in bucket\"\n           << \", \"\n           << \"dividing by: [ \" << p1 << \", \" << p2 << \" ], \"\n           << \"farthest node: \" << farPoint;\n        util::OUTPUT.push_back(ss.str());\n    }\n\n    return farPoint;\n}\n\nvoid divide_and_conquer(const pointVec_t &P, pointVec_t &H, point_t p1, point_t p2) {\n    assert(P.size() >= 2);\n    pointVec_t P_reduced;\n    pointVec_t H1, H2;\n    point_t p_far = divide(P, P_reduced, p1, p2);\n    if (P_reduced.size() < 2) {\n        H.push_back(p1);\n        H.insert(H.end(), P_reduced.begin(), P_reduced.end());\n    }\n    else {\n        divide_and_conquer(P_reduced, H1, p1, p_far);\n        divide_and_conquer(P_reduced, H2, p_far, p2);\n\n        H.insert(H.end(), H1.begin(), H1.end());\n        H.insert(H.end(), H2.begin(), H2.end());\n    }\n}\n\nvoid quickhull(const pointVec_t &points, pointVec_t &hull) {\n    if (points.size() < 2) {\n        hull.insert(hull.end(), points.begin(), points.end());\n        return;\n    }\n    point_t p_maxx = extremum<FindXExtremum::maxX>(points);\n    point_t p_minx = extremum<FindXExtremum::minX>(points);\n\n    pointVec_t H;\n\n    divide_and_conquer(points, hull, p_maxx, p_minx);\n    divide_and_conquer(points, H, p_minx, p_maxx);\n    hull.insert(hull.end(), H.begin(), H.end());\n}\n\nint main(int argc, char *argv[]) {\n    utility::thread_number_range single_thread([] {\n        return -1;\n    });\n    util::ParseInputArgs(argc, argv, single_thread);\n\n    pointVec_t points;\n    pointVec_t hull;\n    util::my_time_t tm_init, tm_start, tm_end;\n\n    std::cout << \"Starting serial version of QUICK HULL algorithm\"\n              << \"\\n\";\n\n    tm_init = util::gettime();\n    serial_initialize(points);\n    tm_start = util::gettime();\n    std::cout << \"Init time: \" << util::time_diff(tm_init, tm_start)\n              << \"  Points in input: \" << points.size() << \"\\n\";\n    tm_start = util::gettime();\n    quickhull(points, hull);\n    tm_end = util::gettime();\n    std::cout << \"Serial time: \" << util::time_diff(tm_start, tm_end)\n              << \"  Points in hull: \" << hull.size() << \"\\n\";\n\n    return 0;\n}\n\n#else // USETBB - parallel version of Quick Hull algorithm\n\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/parallel_reduce.h\"\n#include \"oneapi/tbb/blocked_range.h\"\n\ntypedef oneapi::tbb::blocked_range<std::size_t> range_t;\n\n#if USECONCVEC\n#include \"oneapi/tbb/concurrent_vector.h\"\n\ntypedef oneapi::tbb::concurrent_vector<point_t> pointVec_t;\n\nvoid appendVector(const point_t *src, std::size_t srcSize, pointVec_t &dest) {\n    std::copy(src, src + srcSize, dest.grow_by(srcSize));\n}\n\nvoid appendVector(const pointVec_t &src, pointVec_t &dest) {\n    std::copy(src.begin(), src.end(), dest.grow_by(src.size()));\n}\n\nvoid grow_vector_to_at_least(pointVec_t &vect, std::size_t size) {\n    vect.grow_to_at_least(size);\n}\n#else // USE STD::VECTOR - include spin_mutex.h and lock vector operations\n#include \"oneapi/tbb/spin_mutex.h\"\n\ntypedef oneapi::tbb::spin_mutex mutex_t;\ntypedef std::vector<point_t> pointVec_t;\n\nvoid appendVector(mutex_t &insertMutex, const pointVec_t &src, pointVec_t &dest) {\n    mutex_t::scoped_lock lock(insertMutex);\n    dest.insert(dest.end(), src.begin(), src.end());\n}\n\nvoid appendVector(mutex_t &insertMutex, const point_t *src, std::size_t srcSize, pointVec_t &dest) {\n    mutex_t::scoped_lock lock(insertMutex);\n    dest.insert(dest.end(), src, src + srcSize);\n}\n\nvoid grow_vector_to_at_least(mutex_t &mutex, pointVec_t &vect, std::size_t size) {\n    mutex_t::scoped_lock lock(mutex);\n    if (vect.size() < size) {\n        vect.resize(size);\n    }\n}\n#endif // USECONCVEC\n\nclass FillRNDPointsVector {\n    pointVec_t &points;\n\npublic:\n    static const std::size_t grainSize = cfg::generateGrainSize;\n#if !USECONCVEC\n    static mutex_t pushBackMutex;\n#endif // USECONCVEC\n\n    explicit FillRNDPointsVector(pointVec_t &_points) : points(_points) {}\n\n    void operator()(const range_t &range) const {\n        util::rng the_rng(range.begin());\n        const std::size_t i_end = range.end();\n        std::size_t count = 0;\n#if USECONCVEC\n        points.grow_to_at_least(i_end);\n#else // Locked enlarge to a not thread-safe STD::VECTOR\n        grow_vector_to_at_least(pushBackMutex, points, i_end);\n#endif // USECONCVEC\n\n        for (std::size_t i = range.begin(); i != i_end; ++i) {\n            points[i] = util::GenerateRNDPoint<double>(count, the_rng, util::rng::max_rand);\n        }\n    }\n};\n\nclass FillRNDPointsVector_buf {\n    pointVec_t &points;\n\npublic:\n    static const std::size_t grainSize = cfg::generateGrainSize;\n#if !USECONCVEC\n    static mutex_t insertMutex;\n#endif // USECONCVEC\n\n    explicit FillRNDPointsVector_buf(pointVec_t &_points) : points(_points) {}\n\n    void operator()(const range_t &range) const {\n        util::rng the_rng(range.begin());\n        const std::size_t i_end = range.end();\n        std::size_t count = 0, j = 0;\n        point_t tmp_vec[grainSize];\n\n        for (std::size_t i = range.begin(); i != i_end; ++i) {\n            tmp_vec[j++] = util::GenerateRNDPoint<double>(count, the_rng, util::rng::max_rand);\n        }\n#if USECONCVEC\n        grow_vector_to_at_least(points, range.end());\n#else // USE STD::VECTOR\n        grow_vector_to_at_least(insertMutex, points, range.end());\n#endif // USECONCVEC\n        std::copy(tmp_vec, tmp_vec + j, points.begin() + range.begin());\n    }\n};\n\n#if !USECONCVEC\nmutex_t FillRNDPointsVector::pushBackMutex{};\nmutex_t FillRNDPointsVector_buf::insertMutex{};\n#endif\n\ntemplate <typename BodyType>\nvoid initialize(pointVec_t &points) {\n    //This function generate the same series of point on every call.\n    //Reproducibility is needed for benchmarking to produce reliable results.\n    //It is achieved through the following points:\n    //      - FillRNDPointsVector_buf instance has its own local instance\n    //        of random number generator, which in turn does not use any global data\n    //      - oneapi::tbb::simple_partitioner produce the same set of ranges on every call to\n    //        oneapi::tbb::parallel_for\n    //      - local RNG instances are seeded by the starting indexes of corresponding ranges\n    //      - grow_to_at_least() enables putting points into the resulting vector in deterministic order\n    //        (unlike concurrent push_back or grow_by).\n\n    // In the buffered version, a temporary storage for as much as grainSize elements\n    // is allocated inside the body. Since auto_partitioner may increase effective\n    // range size which would cause a crash, simple partitioner has to be used.\n\n    oneapi::tbb::parallel_for(range_t(0, cfg::numberOfPoints, BodyType::grainSize),\n                              BodyType(points),\n                              oneapi::tbb::simple_partitioner());\n}\n\nclass FindXExtremum {\npublic:\n    typedef enum { minX, maxX } extremumType;\n\n    static const std::size_t grainSize = cfg::findExtremumGrainSize;\n\n    FindXExtremum(const pointVec_t &points_, extremumType exType_)\n            : points(points_),\n              exType(exType_),\n              extrXPoint(points[0]) {}\n\n    FindXExtremum(const FindXExtremum &fxex, oneapi::tbb::split)\n            : points(fxex.points),\n              exType(fxex.exType),\n              extrXPoint(fxex.extrXPoint) {}\n\n    void operator()(const range_t &range) {\n        const std::size_t i_end = range.end();\n        if (!range.empty()) {\n            for (std::size_t i = range.begin(); i != i_end; ++i) {\n                if (closerToExtremum(points[i])) {\n                    extrXPoint = points[i];\n                }\n            }\n        }\n    }\n\n    void join(const FindXExtremum &rhs) {\n        if (closerToExtremum(rhs.extrXPoint)) {\n            extrXPoint = rhs.extrXPoint;\n        }\n    }\n\n    point_t extremeXPoint() {\n        return extrXPoint;\n    }\n\nprivate:\n    const pointVec_t &points;\n    const extremumType exType;\n    point_t extrXPoint;\n    bool closerToExtremum(const point_t &p) const {\n        switch (exType) {\n            case minX: return p.x < extrXPoint.x; break;\n            case maxX: return p.x > extrXPoint.x; break;\n        }\n        return false; // avoid warning\n    }\n};\n\ntemplate <FindXExtremum::extremumType type>\npoint_t extremum(const pointVec_t &P) {\n    FindXExtremum fxBody(P, type);\n    oneapi::tbb::parallel_reduce(range_t(0, P.size(), FindXExtremum::grainSize), fxBody);\n    return fxBody.extremeXPoint();\n}\n\nclass SplitByCP {\n    const pointVec_t &initialSet;\n    pointVec_t &reducedSet;\n    point_t p1, p2;\n    point_t farPoint;\n    double howFar;\n\npublic:\n    static const std::size_t grainSize = cfg::divideGrainSize;\n#if !USECONCVEC\n    static mutex_t pushBackMutex;\n#endif // USECONCVEC\n\n    SplitByCP(point_t _p1, point_t _p2, const pointVec_t &_initialSet, pointVec_t &_reducedSet)\n            : p1(_p1),\n              p2(_p2),\n              initialSet(_initialSet),\n              reducedSet(_reducedSet),\n              howFar(0),\n              farPoint(p1) {}\n\n    SplitByCP(SplitByCP &sbcp, oneapi::tbb::split)\n            : p1(sbcp.p1),\n              p2(sbcp.p2),\n              initialSet(sbcp.initialSet),\n              reducedSet(sbcp.reducedSet),\n              howFar(0),\n              farPoint(p1) {}\n\n    void operator()(const range_t &range) {\n        const std::size_t i_end = range.end();\n        double cp;\n        for (std::size_t i = range.begin(); i != i_end; ++i) {\n            if ((initialSet[i] != p1) && (initialSet[i] != p2)) {\n                cp = util::cross_product(p1, p2, initialSet[i]);\n                if (cp > 0) {\n#if USECONCVEC\n                    reducedSet.push_back(initialSet[i]);\n#else // Locked push_back to a not thread-safe STD::VECTOR\n                    {\n                        mutex_t::scoped_lock lock(pushBackMutex);\n                        reducedSet.push_back(initialSet[i]);\n                    }\n#endif // USECONCVEC\n                    if (cp > howFar) {\n                        farPoint = initialSet[i];\n                        howFar = cp;\n                    }\n                }\n            }\n        }\n    }\n\n    void join(const SplitByCP &rhs) {\n        if (rhs.howFar > howFar) {\n            howFar = rhs.howFar;\n            farPoint = rhs.farPoint;\n        }\n    }\n\n    point_t farthestPoint() const {\n        return farPoint;\n    }\n};\n\nclass SplitByCP_buf {\n    const pointVec_t &initialSet;\n    pointVec_t &reducedSet;\n    point_t p1, p2;\n    point_t farPoint;\n    double howFar;\n\npublic:\n    static const std::size_t grainSize = cfg::divideGrainSize;\n#if !USECONCVEC\n    static mutex_t insertMutex;\n#endif // USECONCVEC\n\n    SplitByCP_buf(point_t _p1, point_t _p2, const pointVec_t &_initialSet, pointVec_t &_reducedSet)\n            : p1(_p1),\n              p2(_p2),\n              initialSet(_initialSet),\n              reducedSet(_reducedSet),\n              howFar(0),\n              farPoint(p1) {}\n\n    SplitByCP_buf(SplitByCP_buf &sbcp, oneapi::tbb::split)\n            : p1(sbcp.p1),\n              p2(sbcp.p2),\n              initialSet(sbcp.initialSet),\n              reducedSet(sbcp.reducedSet),\n              howFar(0),\n              farPoint(p1) {}\n\n    void operator()(const range_t &range) {\n        const std::size_t i_end = range.end();\n        std::size_t j = 0;\n        double cp;\n        point_t tmp_vec[grainSize];\n        for (std::size_t i = range.begin(); i != i_end; ++i) {\n            if ((initialSet[i] != p1) && (initialSet[i] != p2)) {\n                cp = util::cross_product(p1, p2, initialSet[i]);\n                if (cp > 0) {\n                    tmp_vec[j++] = initialSet[i];\n                    if (cp > howFar) {\n                        farPoint = initialSet[i];\n                        howFar = cp;\n                    }\n                }\n            }\n        }\n\n#if USECONCVEC\n        appendVector(tmp_vec, j, reducedSet);\n#else // USE STD::VECTOR\n        appendVector(insertMutex, tmp_vec, j, reducedSet);\n#endif // USECONCVEC\n    }\n\n    void join(const SplitByCP_buf &rhs) {\n        if (rhs.howFar > howFar) {\n            howFar = rhs.howFar;\n            farPoint = rhs.farPoint;\n        }\n    }\n\n    point_t farthestPoint() const {\n        return farPoint;\n    }\n};\n\n#if !USECONCVEC\nmutex_t SplitByCP::pushBackMutex{};\nmutex_t SplitByCP_buf::insertMutex{};\n#endif\n\ntemplate <typename BodyType>\npoint_t divide(const pointVec_t &P, pointVec_t &P_reduced, const point_t &p1, const point_t &p2) {\n    BodyType body(p1, p2, P, P_reduced);\n    // Must use simple_partitioner (see the comment in initialize() above)\n    oneapi::tbb::parallel_reduce(\n        range_t(0, P.size(), BodyType::grainSize), body, oneapi::tbb::simple_partitioner());\n\n    if (util::verbose) {\n        std::stringstream ss;\n        ss << P.size() << \" nodes in bucket\"\n           << \", \"\n           << \"dividing by: [ \" << p1 << \", \" << p2 << \" ], \"\n           << \"farthest node: \" << body.farthestPoint();\n        util::OUTPUT.push_back(ss.str());\n    }\n\n    return body.farthestPoint();\n}\n\nvoid divide_and_conquer(const pointVec_t &P, pointVec_t &H, point_t p1, point_t p2, bool buffered) {\n    assert(P.size() >= 2);\n    pointVec_t P_reduced;\n    pointVec_t H1, H2;\n    point_t p_far;\n\n    if (buffered) {\n        p_far = divide<SplitByCP_buf>(P, P_reduced, p1, p2);\n    }\n    else {\n        p_far = divide<SplitByCP>(P, P_reduced, p1, p2);\n    }\n\n    if (P_reduced.size() < 2) {\n        H.push_back(p1);\n#if USECONCVEC\n        appendVector(P_reduced, H);\n#else // insert into STD::VECTOR\n        H.insert(H.end(), P_reduced.begin(), P_reduced.end());\n#endif\n    }\n    else {\n        divide_and_conquer(P_reduced, H1, p1, p_far, buffered);\n        divide_and_conquer(P_reduced, H2, p_far, p2, buffered);\n\n#if USECONCVEC\n        appendVector(H1, H);\n        appendVector(H2, H);\n#else // insert into STD::VECTOR\n        H.insert(H.end(), H1.begin(), H1.end());\n        H.insert(H.end(), H2.begin(), H2.end());\n#endif\n    }\n}\n\nvoid quickhull(const pointVec_t &points, pointVec_t &hull, bool buffered) {\n    if (points.size() < 2) {\n#if USECONCVEC\n        appendVector(points, hull);\n#else // STD::VECTOR\n        hull.insert(hull.end(), points.begin(), points.end());\n#endif // USECONCVEC\n        return;\n    }\n\n    point_t p_maxx = extremum<FindXExtremum::maxX>(points);\n    point_t p_minx = extremum<FindXExtremum::minX>(points);\n\n    pointVec_t H;\n\n    divide_and_conquer(points, hull, p_maxx, p_minx, buffered);\n    divide_and_conquer(points, H, p_minx, p_maxx, buffered);\n#if USECONCVEC\n    appendVector(H, hull);\n#else // STD::VECTOR\n    hull.insert(hull.end(), H.begin(), H.end());\n#endif // USECONCVEC\n}\n\nint main(int argc, char *argv[]) {\n    utility::thread_number_range threads(utility::get_default_num_threads);\n    util::ParseInputArgs(argc, argv, threads);\n\n    int nthreads;\n    util::my_time_t tm_init, tm_start, tm_end;\n\n#if USECONCVEC\n    std::cout << \"Starting TBB unbuffered push_back version of QUICK HULL algorithm\"\n              << \"\\n\";\n#else\n    std::cout << \"Starting STL locked unbuffered push_back version of QUICK HULL algorithm\"\n              << \"\\n\";\n#endif // USECONCVEC\n\n    for (nthreads = threads.first; nthreads <= threads.last; nthreads = threads.step(nthreads)) {\n        pointVec_t points;\n        pointVec_t hull;\n\n        oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism,\n                                      nthreads);\n        tm_init = util::gettime();\n        initialize<FillRNDPointsVector>(points);\n        tm_start = util::gettime();\n        std::cout << \"Parallel init time on \" << nthreads\n                  << \" threads: \" << util::time_diff(tm_init, tm_start)\n                  << \"  Points in input: \" << points.size() << \"\\n\";\n\n        tm_start = util::gettime();\n        quickhull(points, hull, false);\n        tm_end = util::gettime();\n        std::cout << \"Time on \" << nthreads << \" threads: \" << util::time_diff(tm_start, tm_end)\n                  << \"  Points in hull: \" << hull.size() << \"\\n\";\n    }\n\n#if USECONCVEC\n    std::cout << \"Starting TBB buffered version of QUICK HULL algorithm\"\n              << \"\\n\";\n#else\n    std::cout << \"Starting STL locked buffered version of QUICK HULL algorithm\"\n              << \"\\n\";\n#endif\n\n    for (nthreads = threads.first; nthreads <= threads.last; nthreads = threads.step(nthreads)) {\n        pointVec_t points;\n        pointVec_t hull;\n\n        oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism,\n                                      nthreads);\n\n        tm_init = util::gettime();\n        initialize<FillRNDPointsVector_buf>(points);\n        tm_start = util::gettime();\n        std::cout << \"Init time on \" << nthreads\n                  << \" threads: \" << util::time_diff(tm_init, tm_start)\n                  << \"  Points in input: \" << points.size() << \"\\n\";\n\n        tm_start = util::gettime();\n        quickhull(points, hull, true);\n        tm_end = util::gettime();\n        std::cout << \"Time on \" << nthreads << \" threads: \" << util::time_diff(tm_start, tm_end)\n                  << \"  Points in hull: \" << hull.size() << \"\\n\";\n    }\n\n    return 0;\n}\n\n#endif // USETBB\n\nvoid serial_initialize(pointVec_t &points) {\n    points.reserve(cfg::numberOfPoints);\n\n    unsigned int rseed = 1;\n    for (std::size_t i = 0, count = 0; long(i) < cfg::numberOfPoints; ++i) {\n        points.push_back(util::GenerateRNDPoint<double>(count, &std::rand, RAND_MAX));\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_reduce/convex_hull/convex_hull_sample.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\n    This file contains the TBB-based implementation of convex hull algorithm.\n    It corresponds to the following settings in convex_hull_bench.cpp:\n    - USETBB defined to 1\n    - USECONCVEC defined to 1\n    - INIT_ONCE defined to 0\n    - only buffered version is used\n*/\n\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/parallel_reduce.h\"\n#include \"oneapi/tbb/blocked_range.h\"\n#include \"oneapi/tbb/tick_count.h\"\n#include \"oneapi/tbb/concurrent_vector.h\"\n\n#include \"convex_hull.hpp\"\n\ntypedef util::point<double> point_t;\ntypedef oneapi::tbb::concurrent_vector<point_t> pointVec_t;\ntypedef oneapi::tbb::blocked_range<std::size_t> range_t;\n\nvoid appendVector(const point_t *src, std::size_t srcSize, pointVec_t &dest) {\n    std::copy(src, src + srcSize, dest.grow_by(srcSize));\n}\n\nvoid appendVector(const pointVec_t &src, pointVec_t &dest) {\n    std::copy(src.begin(), src.end(), dest.grow_by(src.size()));\n}\nclass FillRNDPointsVector_buf {\n    pointVec_t &points;\n\npublic:\n    static const std::size_t grainSize = cfg::generateGrainSize;\n\n    explicit FillRNDPointsVector_buf(pointVec_t &_points) : points(_points) {}\n\n    void operator()(const range_t &range) const {\n        util::rng the_rng(range.begin());\n        const std::size_t i_end = range.end();\n        std::size_t count = 0, j = 0;\n        point_t tmp_vec[grainSize];\n\n        for (std::size_t i = range.begin(); i != i_end; ++i) {\n            tmp_vec[j++] = util::GenerateRNDPoint<double>(count, the_rng, util::rng::max_rand);\n        }\n        //Here we have race condition. Elements being written to may be still under construction.\n        //For C++ 2003 it is workarounded by vector element type which default constructor does not touch memory,\n        //it being constructed on. See comments near default ctor of point class for more details.\n        //Strictly speaking it is UB.\n        //TODO: need to find more reliable/correct way\n        points.grow_to_at_least(range.end());\n        std::copy(tmp_vec, tmp_vec + j, points.begin() + range.begin());\n    }\n};\n\nvoid initialize(pointVec_t &points) {\n    //This function generate the same series of point on every call.\n    //Reproducibility is needed for benchmarking to produce reliable results.\n    //It is achieved through the following points:\n    //      - FillRNDPointsVector_buf instance has its own local instance\n    //        of random number generator, which in turn does not use any global data\n    //      - oneapi::tbb::simple_partitioner produce the same set of ranges on every call to\n    //        oneapi::tbb::parallel_for\n    //      - local RNG instances are seeded by the starting indexes of corresponding ranges\n    //      - grow_to_at_least() enables putting points into the resulting vector in deterministic order\n    //        (unlike concurrent push_back or grow_by).\n\n    // In the buffered version, a temporary storage for as much as grainSize elements\n    // is allocated inside the body. Since auto_partitioner may increase effective\n    // range size which would cause a crash, simple partitioner has to be used.\n    oneapi::tbb::parallel_for(range_t(0, cfg::numberOfPoints, FillRNDPointsVector_buf::grainSize),\n                              FillRNDPointsVector_buf(points),\n                              oneapi::tbb::simple_partitioner());\n}\n\nclass FindXExtremum {\npublic:\n    typedef enum { minX, maxX } extremumType;\n\n    static const std::size_t grainSize = cfg::findExtremumGrainSize;\n\n    FindXExtremum(const pointVec_t &points_, extremumType exType_)\n            : points(points_),\n              exType(exType_),\n              extrXPoint(points[0]) {}\n\n    FindXExtremum(const FindXExtremum &fxex, oneapi::tbb::split)\n            // Can run in parallel with fxex.operator()() or fxex.join().\n            // The data race reported by tools is harmless.\n            : points(fxex.points),\n              exType(fxex.exType),\n              extrXPoint(fxex.extrXPoint) {}\n\n    void operator()(const range_t &range) {\n        const std::size_t i_end = range.end();\n        if (!range.empty()) {\n            for (std::size_t i = range.begin(); i != i_end; ++i) {\n                if (closerToExtremum(points[i])) {\n                    extrXPoint = points[i];\n                }\n            }\n        }\n    }\n\n    void join(const FindXExtremum &rhs) {\n        if (closerToExtremum(rhs.extrXPoint)) {\n            extrXPoint = rhs.extrXPoint;\n        }\n    }\n\n    point_t extremeXPoint() {\n        return extrXPoint;\n    }\n\nprivate:\n    const pointVec_t &points;\n    const extremumType exType;\n    point_t extrXPoint;\n    bool closerToExtremum(const point_t &p) const {\n        switch (exType) {\n            case minX: return p.x < extrXPoint.x; break;\n            case maxX: return p.x > extrXPoint.x; break;\n        }\n        return false; // avoid warning\n    }\n};\n\ntemplate <FindXExtremum::extremumType type>\npoint_t extremum(const pointVec_t &P) {\n    FindXExtremum fxBody(P, type);\n    oneapi::tbb::parallel_reduce(range_t(0, P.size(), FindXExtremum::grainSize), fxBody);\n    return fxBody.extremeXPoint();\n}\n\nclass SplitByCP_buf {\n    const pointVec_t &initialSet;\n    pointVec_t &reducedSet;\n    point_t p1, p2;\n    point_t farPoint;\n    double howFar;\n\npublic:\n    static const std::size_t grainSize = cfg::divideGrainSize;\n\n    SplitByCP_buf(point_t _p1, point_t _p2, const pointVec_t &_initialSet, pointVec_t &_reducedSet)\n            : p1(_p1),\n              p2(_p2),\n              initialSet(_initialSet),\n              reducedSet(_reducedSet),\n              howFar(0),\n              farPoint(p1) {}\n\n    SplitByCP_buf(SplitByCP_buf &sbcp, oneapi::tbb::split)\n            : p1(sbcp.p1),\n              p2(sbcp.p2),\n              initialSet(sbcp.initialSet),\n              reducedSet(sbcp.reducedSet),\n              howFar(0),\n              farPoint(p1) {}\n\n    void operator()(const range_t &range) {\n        const std::size_t i_end = range.end();\n        std::size_t j = 0;\n        double cp;\n        point_t tmp_vec[grainSize];\n        for (std::size_t i = range.begin(); i != i_end; ++i) {\n            if ((initialSet[i] != p1) && (initialSet[i] != p2)) {\n                cp = util::cross_product(p1, p2, initialSet[i]);\n                if (cp > 0) {\n                    tmp_vec[j++] = initialSet[i];\n                    if (cp > howFar) {\n                        farPoint = initialSet[i];\n                        howFar = cp;\n                    }\n                }\n            }\n        }\n\n        appendVector(tmp_vec, j, reducedSet);\n    }\n\n    void join(const SplitByCP_buf &rhs) {\n        if (rhs.howFar > howFar) {\n            howFar = rhs.howFar;\n            farPoint = rhs.farPoint;\n        }\n    }\n\n    point_t farthestPoint() const {\n        return farPoint;\n    }\n};\n\npoint_t divide(const pointVec_t &P, pointVec_t &P_reduced, const point_t &p1, const point_t &p2) {\n    SplitByCP_buf sbcpb(p1, p2, P, P_reduced);\n    // Must use simple_partitioner (see the comment in initialize() above)\n    oneapi::tbb::parallel_reduce(\n        range_t(0, P.size(), SplitByCP_buf::grainSize), sbcpb, oneapi::tbb::simple_partitioner());\n\n    if (util::verbose) {\n        std::stringstream ss;\n        ss << P.size() << \" nodes in bucket\"\n           << \", \"\n           << \"dividing by: [ \" << p1 << \", \" << p2 << \" ], \"\n           << \"farthest node: \" << sbcpb.farthestPoint();\n        util::OUTPUT.push_back(ss.str());\n    }\n\n    return sbcpb.farthestPoint();\n}\n\nvoid divide_and_conquer(const pointVec_t &P, pointVec_t &H, point_t p1, point_t p2) {\n    assert(P.size() >= 2);\n    pointVec_t P_reduced;\n    pointVec_t H1, H2;\n    point_t p_far = divide(P, P_reduced, p1, p2);\n    if (P_reduced.size() < 2) {\n        H.push_back(p1);\n        appendVector(P_reduced, H);\n    }\n    else {\n        divide_and_conquer(P_reduced, H1, p1, p_far);\n        divide_and_conquer(P_reduced, H2, p_far, p2);\n\n        appendVector(H1, H);\n        appendVector(H2, H);\n    }\n}\n\nvoid quickhull(const pointVec_t &points, pointVec_t &hull) {\n    if (points.size() < 2) {\n        appendVector(points, hull);\n        return;\n    }\n\n    point_t p_maxx = extremum<FindXExtremum::maxX>(points);\n    point_t p_minx = extremum<FindXExtremum::minX>(points);\n\n    pointVec_t H;\n\n    divide_and_conquer(points, hull, p_maxx, p_minx);\n    divide_and_conquer(points, H, p_minx, p_maxx);\n\n    appendVector(H, hull);\n}\n\nint main(int argc, char *argv[]) {\n    utility::thread_number_range threads(utility::get_default_num_threads);\n    util::my_time_t tm_main_begin = util::gettime();\n\n    util::ParseInputArgs(argc, argv, threads);\n\n    pointVec_t points;\n    pointVec_t hull;\n    int nthreads;\n\n    points.reserve(cfg::numberOfPoints);\n\n    if (!util::silent) {\n        std::cout << \"Starting TBB-buffered version of QUICK HULL algorithm\"\n                  << \"\\n\";\n    }\n\n    for (nthreads = threads.first; nthreads <= threads.last; nthreads = threads.step(nthreads)) {\n        oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism,\n                                      nthreads);\n\n        points.clear();\n        util::my_time_t tm_init = util::gettime();\n        initialize(points);\n        util::my_time_t tm_start = util::gettime();\n        if (!util::silent) {\n            std::cout << \"Init time on \" << nthreads\n                      << \" threads: \" << util::time_diff(tm_init, tm_start)\n                      << \"  Points in input: \" << points.size() << \"\\n\";\n        }\n\n        tm_start = util::gettime();\n        quickhull(points, hull);\n        util::my_time_t tm_end = util::gettime();\n        if (!util::silent) {\n            std::cout << \"Time on \" << nthreads << \" threads: \" << util::time_diff(tm_start, tm_end)\n                      << \"  Points in hull: \" << hull.size() << \"\\n\";\n        }\n        hull.clear();\n    }\n    utility::report_elapsed_time(util::time_diff(tm_main_begin, util::gettime()));\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_reduce/pi/CMakeLists.txt",
    "content": "# Copyright (c) 2023-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(pi CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(tbb)\n\nadd_executable(pi main.cpp pi.cpp)\n\ntarget_link_libraries(pi TBB::tbb Threads::Threads)\ntarget_compile_options(pi PRIVATE ${TBB_CXX_STD_FLAG})\n\nset(EXECUTABLE \"$<TARGET_FILE:pi>\")\nset(ARGS \"\")\nset(PERF_ARGS auto 100000000000)\n\nadd_execution_target(run_pi pi ${EXECUTABLE} \"${ARGS}\")\nadd_execution_target(perf_run_pi pi ${EXECUTABLE} \"${PERF_ARGS}\")\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_reduce/pi/README.md",
    "content": "# Pi Sample\nParallel version of calculating &pi; by numerical integration.\n\n## Build\nTo build the sample, run the following commands:\n```\ncmake <path_to_example>\ncmake --build .\n```\n\n## Run\n### Predefined Make Targets\n* `make run_pi` - executes the example with predefined parameters\n* `make perf_run_pi` - executes the example with suggested parameters to measure the oneTBB performance\n\n### Application Parameters\nYou can use the following application parameters:\n```\npi [n-of-threads=value] [n-of-intervals=value] [silent] [-h] [n-of-threads [n-of-intervals]]\n```\n* `-h` - prints the help for command-line options.\n* `n-of-threads` - the number of threads to use. This number is specified in the low\\[:high\\] range format, where both ``low`` and, optionally, ``high`` are non-negative integers. You can also use ``auto`` to let the system choose a default number of threads suitable for the platform.\n* `n-of-intervals` - the number of intervals to subdivide into. Must be a positive integer.\n* `silent` - no output except the elapsed time.\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_reduce/pi/common.h",
    "content": "/*\n    Copyright (c) 2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TBB_examples_pi_H\n#define TBB_examples_pi_H\n\n#include <cstdlib>\n\ntypedef std::size_t number_t;\ntypedef double pi_t;\n\nextern const number_t chunk_size;\nextern number_t num_intervals;\nextern pi_t step;\n\nextern bool silent;\n\ninline pi_t pi_kernel(number_t i) {\n    pi_t dx = (pi_t(i) + pi_t(0.5)) * step;\n    return pi_t(4.0) / (pi_t(1.0) + dx * dx);\n}\n\ninline double pi_slice_kernel(number_t slice, number_t slice_size = chunk_size) {\n    pi_t pi = pi_t(0.0);\n    for (number_t i = slice; i < slice + slice_size; ++i) {\n        pi += pi_kernel(i);\n    }\n    return pi;\n}\n\nstruct threading {\n    threading(int p);\n    ~threading();\n};\n\ndouble compute_pi_parallel();\n\n#endif //  TBB_examples_pi_H\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_reduce/pi/main.cpp",
    "content": "/*\n    Copyright (c) 2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/tick_count.h\"\n\n#include \"common/utility/get_default_num_threads.hpp\"\n#include \"common/utility/utility.hpp\"\n\n#include \"common.h\"\n\nconst number_t chunk_size = 4096; // Multiple of 16, to fit float datatype to a vector register.\n\n// number of intervals\nnumber_t num_intervals = 1000000000;\npi_t step = pi_t(0.0);\n\nbool silent = false;\n\ndouble compute_pi_serial() {\n    double ret = 0;\n\n    step = pi_t(1.0) / num_intervals;\n\n    number_t tail = num_intervals % chunk_size;\n    number_t last = num_intervals - tail;\n\n    for (number_t slice = 0; slice < last; slice += chunk_size) {\n        ret += pi_slice_kernel(slice);\n    }\n    ret += pi_slice_kernel(last, tail);\n    ret *= step;\n\n    return ret;\n}\n\nint main(int argc, char* argv[]) {\n    try {\n        tbb::tick_count main_start_time = tbb::tick_count::now();\n        // zero number of threads means to run serial version\n        utility::thread_number_range threads(utility::get_default_num_threads, 0);\n\n        utility::parse_cli_arguments(\n            argc,\n            argv,\n            utility::cli_argument_pack()\n                //\"-h\" option for for displaying help is present implicitly\n                .positional_arg(threads, \"n-of-threads\", utility::thread_number_range_desc)\n                .positional_arg(num_intervals, \"n-of-intervals\", \"number of intervals\")\n                .arg(silent, \"silent\", \"no output except time elapsed\"));\n\n        for (int p = threads.first; p <= threads.last; p = threads.step(p)) {\n            pi_t pi;\n            double compute_time;\n            if (p == 0) {\n                //run a serial version\n                tbb::tick_count compute_start_time = tbb::tick_count::now();\n                pi = compute_pi_serial();\n                compute_time = (tbb::tick_count::now() - compute_start_time).seconds();\n            }\n            else {\n                //run a parallel version\n                threading tp(p);\n                tbb::tick_count compute_start_time = tbb::tick_count::now();\n                pi = compute_pi_parallel();\n                compute_time = (tbb::tick_count::now() - compute_start_time).seconds();\n            }\n\n            if (!silent) {\n                if (p == 0) {\n                    std::cout << \"Serial run:\\tpi = \" << pi << \"\\tcompute time = \" << compute_time\n                              << \" sec\\n\";\n                }\n                else {\n                    std::cout << \"Parallel run:\\tpi = \" << pi << \"\\tcompute time = \" << compute_time\n                              << \" sec\\t on \" << p << \" threads\\n\";\n                }\n            }\n        }\n\n        utility::report_elapsed_time((tbb::tick_count::now() - main_start_time).seconds());\n        return 0;\n    }\n    catch (std::exception& e) {\n        std::cerr << \"error occurred. error text is :\\\"\" << e.what() << \"\\\"\\n\";\n        return 1;\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_reduce/pi/pi.cpp",
    "content": "/*\n    Copyright (c) 2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common.h\"\n#include \"oneapi/tbb/blocked_range.h\"\n#include \"oneapi/tbb/global_control.h\"\n#include \"oneapi/tbb/parallel_reduce.h\"\n\nstruct reduce_body {\n    double my_pi;\n    reduce_body() : my_pi(0) {}\n    reduce_body(reduce_body& x, tbb::split) : my_pi(0) {}\n    void operator()(const tbb::blocked_range<number_t>& r) {\n        my_pi += pi_slice_kernel(r.begin(), r.size());\n    }\n    void join(const reduce_body& y) {\n        my_pi += y.my_pi;\n    }\n};\n\ndouble compute_pi_parallel() {\n    step = pi_t(1.0) / num_intervals;\n\n    double ret = 0.0;\n\n    reduce_body body;\n    tbb::parallel_reduce(tbb::blocked_range<number_t>(0, num_intervals), body);\n\n    ret = body.my_pi * step;\n\n    return ret;\n}\n\nstatic std::unique_ptr<tbb::global_control> gc;\n\nthreading::threading(int p) {\n    gc.reset(new tbb::global_control(tbb::global_control::max_allowed_parallelism, p));\n}\n\nthreading::~threading() {\n    gc.reset();\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_reduce/primes/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(primes CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(tbb)\n\nadd_executable(primes main.cpp primes.cpp)\n\ntarget_link_libraries(primes TBB::tbb Threads::Threads)\ntarget_compile_options(primes PRIVATE ${TBB_CXX_STD_FLAG})\n\nset(EXECUTABLE \"$<TARGET_FILE:primes>\")\nset(ARGS \"\")\nset(PERF_ARGS silent auto 1000000000 1000 20)\n\nadd_execution_target(run_primes primes ${EXECUTABLE} \"${ARGS}\")\nadd_execution_target(perf_run_primes primes ${EXECUTABLE} \"${PERF_ARGS}\")\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_reduce/primes/README.md",
    "content": "# Primes sample\nParallel version of the Sieve of Eratosthenes.\n\n## Building the example\n```\ncmake <path_to_example>\ncmake --build .\n```\n\n## Running the sample\n### Predefined make targets\n* `make run_primes` - executes the example with predefined parameters\n* `make perf_run_primes` - executes the example with suggested parameters to measure the oneTBB performance\n\n### Application parameters\nUsage:\n```\nprimes [n-of-threads=value] [number=value] [grain-size=value] [n-of-repeats=value] [silent] [-h] [n-of-threads [number [grain-size [n-of-repeats]]]]\n```\n* `-h` - prints the help for command line options.\n* `n-of-threads` - the number of threads to use; a range of the form low\\[:high\\], where low and optional high are non-negative integers or `auto` for a platform-specific default number.\n* `number` - the upper bound of range to search primes in, must be a positive integer.\n* `grain-size` - the optional grain size, must be a positive integer.\n* `n-of-repeats` - the number of the calculation repeats, must be a positive integer.\n* `silent` - no output except elapsed time.\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_reduce/primes/main.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <cstdlib>\n#include <cstdio>\n#include <cstring>\n#include <cctype>\n\n#include <utility>\n#include <iostream>\n#include <sstream>\n\n#include \"oneapi/tbb/tick_count.h\"\n\n#include \"common/utility/utility.hpp\"\n\n#include \"primes.hpp\"\n\nstruct RunOptions {\n    //! NumberType of threads to use.\n    utility::thread_number_range threads;\n    //whether to suppress additional output\n    bool silentFlag;\n    //\n    NumberType n;\n    //! Grain size parameter\n    NumberType grainSize;\n    // number of time to repeat calculation\n    NumberType repeatNumber;\n\n    RunOptions(utility::thread_number_range threads_,\n               NumberType grainSize_,\n               NumberType n_,\n               bool silentFlag_,\n               NumberType repeatNumber_)\n            : threads(threads_),\n              silentFlag(silentFlag_),\n              n(n_),\n              grainSize(grainSize_),\n              repeatNumber(repeatNumber_) {}\n};\n\n//! Parse the command line.\nstatic RunOptions ParseCommandLine(int argc, char* argv[]) {\n    utility::thread_number_range threads(\n        utility::get_default_num_threads, 0, utility::get_default_num_threads());\n    NumberType grainSize = 1000;\n    bool silent = false;\n    NumberType number = 100000000;\n    NumberType repeatNumber = 1;\n\n    utility::parse_cli_arguments(\n        argc,\n        argv,\n        utility::cli_argument_pack()\n            //\"-h\" option for displaying help is present implicitly\n            .positional_arg(threads, \"n-of-threads\", utility::thread_number_range_desc)\n            .positional_arg(number,\n                            \"number\",\n                            \"upper bound of range to search primes in, must be a positive integer\")\n            .positional_arg(grainSize, \"grain-size\", \"must be a positive integer\")\n            .positional_arg(\n                repeatNumber,\n                \"n-of-repeats\",\n                \"repeat the calculation this number of times, must be a positive integer\")\n            .arg(silent, \"silent\", \"no output except elapsed time\"));\n\n    RunOptions options(threads, grainSize, number, silent, repeatNumber);\n    return options;\n}\n\nint main(int argc, char* argv[]) {\n    oneapi::tbb::tick_count mainBeginMark = oneapi::tbb::tick_count::now();\n    RunOptions options = ParseCommandLine(argc, argv);\n\n    // Try different numbers of threads\n    for (int p = options.threads.first; p <= options.threads.last; p = options.threads.step(p)) {\n        for (NumberType i = 0; i < options.repeatNumber; ++i) {\n            oneapi::tbb::tick_count iterationBeginMark = oneapi::tbb::tick_count::now();\n            NumberType count = 0;\n            NumberType n = options.n;\n            if (p == 0) {\n                count = SerialCountPrimes(n);\n            }\n            else {\n                NumberType grainSize = options.grainSize;\n                count = ParallelCountPrimes(n, p, grainSize);\n            }\n            oneapi::tbb::tick_count iterationEndMark = oneapi::tbb::tick_count::now();\n            if (!options.silentFlag) {\n                std::cout << \"#primes from [2..\" << options.n << \"] = \" << count << \" (\"\n                          << (iterationEndMark - iterationBeginMark).seconds() << \" sec with \";\n                if (0 != p)\n                    std::cout << p << \"-way parallelism\";\n                else\n                    std::cout << \"serial code\";\n                std::cout << \")\\n\";\n            }\n        }\n    }\n    utility::report_elapsed_time((oneapi::tbb::tick_count::now() - mainBeginMark).seconds());\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_reduce/primes/primes.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// Example program that computes number of prime numbers up to n,\n// where n is a command line argument.  The algorithm here is a\n// fairly efficient version of the sieve of Eratosthenes.\n// The parallel version demonstrates how to use parallel_reduce,\n// and in particular how to exploit lazy splitting.\n\n#include <cassert>\n#include <cstdio>\n#include <cstring>\n#include <cmath>\n#include <cstdlib>\n#include <cctype>\n\n#include <algorithm>\n\n#include \"oneapi/tbb/parallel_reduce.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include \"primes.hpp\"\n\n//! If true, then print primes on stdout.\nstatic bool printPrimes = false;\n\nclass Multiples {\n    inline NumberType strike(NumberType start, NumberType limit, NumberType stride) {\n        // Hoist \"my_is_composite\" into register for sake of speed.\n        bool* is_composite = my_is_composite;\n        assert(stride >= 2);\n        for (; start < limit; start += stride)\n            is_composite[start] = true;\n        return start;\n    }\n    //! Window into conceptual sieve\n    bool* my_is_composite;\n\n    //! Indexes into window\n    /** my_striker[k] is an index into my_composite corresponding to\n        an odd multiple multiple of my_factor[k]. */\n    NumberType* my_striker;\n\n    //! Prime numbers less than m.\n    NumberType* my_factor;\n\npublic:\n    //! NumberType of factors in my_factor.\n    NumberType n_factor;\n    NumberType m;\n    Multiples(NumberType n) {\n        m = NumberType(sqrt(double(n)));\n        // Round up to even\n        m += m & 1;\n        my_is_composite = new bool[m / 2];\n        my_striker = new NumberType[m / 2];\n        my_factor = new NumberType[m / 2];\n        n_factor = 0;\n        memset(my_is_composite, 0, m / 2);\n        for (NumberType i = 3; i < m; i += 2) {\n            if (!my_is_composite[i / 2]) {\n                if (printPrimes)\n                    printf(\"%d\\n\", (int)i);\n                my_striker[n_factor] = strike(i / 2, m / 2, i);\n                my_factor[n_factor++] = i;\n            }\n        }\n    }\n\n    //! Find primes in range [start,window_size), advancing my_striker as we go.\n    /** Returns number of primes found. */\n    NumberType find_primes_in_window(NumberType start, NumberType window_size) {\n        bool* is_composite = my_is_composite;\n        memset(is_composite, 0, window_size / 2);\n        for (std::size_t k = 0; k < n_factor; ++k)\n            my_striker[k] = strike(my_striker[k] - m / 2, window_size / 2, my_factor[k]);\n        NumberType count = 0;\n        for (NumberType k = 0; k < window_size / 2; ++k) {\n            if (!is_composite[k]) {\n                if (printPrimes)\n                    printf(\"%ld\\n\", long(start + 2 * k + 1));\n                ++count;\n            }\n        }\n        return count;\n    }\n\n    ~Multiples() {\n        delete[] my_factor;\n        delete[] my_striker;\n        delete[] my_is_composite;\n    }\n\n    //------------------------------------------------------------------------\n    // Begin extra members required by parallel version\n    //------------------------------------------------------------------------\n\n    // Splitting constructor\n    Multiples(const Multiples& f, oneapi::tbb::split)\n            : n_factor(f.n_factor),\n              m(f.m),\n              my_is_composite(nullptr),\n              my_striker(nullptr),\n              my_factor(f.my_factor) {}\n\n    bool is_initialized() const {\n        return my_is_composite != nullptr;\n    }\n\n    void initialize(NumberType start) {\n        assert(start >= 1);\n        my_is_composite = new bool[m / 2];\n        my_striker = new NumberType[m / 2];\n        for (std::size_t k = 0; k < n_factor; ++k) {\n            NumberType f = my_factor[k];\n            NumberType p = (start - 1) / f * f % m;\n            my_striker[k] = (p & 1 ? p + 2 * f : p + f) / 2;\n            assert(m / 2 <= my_striker[k]);\n        }\n    }\n\n    // Move other to *this.\n    void move(Multiples& other) {\n        // The swap moves the contents of other to *this and causes the old contents\n        // of *this to be deleted later when other is destroyed.\n        std::swap(my_striker, other.my_striker);\n        std::swap(my_is_composite, other.my_is_composite);\n        // other.my_factor is a shared pointer that was copied by the splitting constructor.\n        // Set it to nullptr to prevent premature deletion by the destructor of ~other.\n        assert(my_factor == other.my_factor);\n        other.my_factor = nullptr;\n    }\n\n    //------------------------------------------------------------------------\n    // End extra methods required by parallel version\n    //------------------------------------------------------------------------\n};\n\n//! Count number of primes between 0 and n\n/** This is the serial version. */\nNumberType SerialCountPrimes(NumberType n) {\n    // Two is special case\n    NumberType count = n >= 2;\n    if (n >= 3) {\n        Multiples multiples(n);\n        count += multiples.n_factor;\n        if (printPrimes)\n            printf(\"---\\n\");\n        NumberType window_size = multiples.m;\n        for (NumberType j = multiples.m; j <= n; j += window_size) {\n            if (j + window_size > n + 1)\n                window_size = n + 1 - j;\n            count += multiples.find_primes_in_window(j, window_size);\n        }\n    }\n    return count;\n}\n\n//! Range of a sieve window.\nclass SieveRange {\n    //! Width of full-size window into sieve.\n    const NumberType my_stride;\n\n    //! Always multiple of my_stride\n    NumberType my_begin;\n\n    //! One past last number in window.\n    NumberType my_end;\n\n    //! Width above which it is worth forking.\n    const NumberType my_grainsize;\n\n    bool assert_okay() const {\n        assert(my_begin % my_stride == 0);\n        assert(my_begin <= my_end);\n        assert(my_stride <= my_grainsize);\n        return true;\n    }\n\npublic:\n    //------------------------------------------------------------------------\n    // Begin signatures required by parallel_reduce\n    //------------------------------------------------------------------------\n    bool is_divisible() const {\n        return my_end - my_begin > my_grainsize;\n    }\n    bool empty() const {\n        return my_end <= my_begin;\n    }\n    SieveRange(SieveRange& r, oneapi::tbb::split)\n            : my_stride(r.my_stride),\n              my_grainsize(r.my_grainsize),\n              my_end(r.my_end) {\n        assert(r.is_divisible());\n        assert(r.assert_okay());\n        NumberType middle = r.my_begin + (r.my_end - r.my_begin + r.my_stride - 1) / 2;\n        middle = middle / my_stride * my_stride;\n        my_begin = middle;\n        r.my_end = middle;\n        assert(assert_okay());\n        assert(r.assert_okay());\n    }\n    //------------------------------------------------------------------------\n    // End of signatures required by parallel_reduce\n    //------------------------------------------------------------------------\n    NumberType begin() const {\n        return my_begin;\n    }\n    NumberType end() const {\n        return my_end;\n    }\n    SieveRange(NumberType begin, NumberType end, NumberType stride, NumberType grainsize)\n            : my_begin(begin),\n              my_end(end),\n              my_stride(stride),\n              my_grainsize(grainsize < stride ? stride : grainsize) {\n        assert(assert_okay());\n    }\n};\n\n//! Loop body for parallel_reduce.\n/** parallel_reduce splits the sieve into subsieves.\n    Each subsieve handles a subrange of [0..n]. */\nclass Sieve {\npublic:\n    //! Prime Multiples to consider, and working storage for this subsieve.\n    ::Multiples multiples;\n\n    //! NumberType of primes found so far by this subsieve.\n    NumberType count;\n\n    //! Construct Sieve for counting primes in [0..n].\n    Sieve(NumberType n) : multiples(n), count(0) {}\n\n    //------------------------------------------------------------------------\n    // Begin signatures required by parallel_reduce\n    //------------------------------------------------------------------------\n    void operator()(const SieveRange& r) {\n        NumberType m = multiples.m;\n        if (multiples.is_initialized()) {\n            // Simply reuse \"Multiples\" structure from previous window\n            // This works because parallel_reduce always applies\n            // *this from left to right.\n        }\n        else {\n            // Need to initialize \"Multiples\" because *this is a forked copy\n            // that needs to be set up to start at r.begin().\n            multiples.initialize(r.begin());\n        }\n        NumberType window_size = m;\n        for (NumberType j = r.begin(); j < r.end(); j += window_size) {\n            assert(j % multiples.m == 0);\n            if (j + window_size > r.end())\n                window_size = r.end() - j;\n            count += multiples.find_primes_in_window(j, window_size);\n        }\n    }\n    void join(Sieve& other) {\n        count += other.count;\n        // Final value of multiples needs to final value of other multiples,\n        // so that *this can correctly process next window to right.\n        multiples.move(other.multiples);\n    }\n    Sieve(Sieve& other, oneapi::tbb::split)\n            : multiples(other.multiples, oneapi::tbb::split()),\n              count(0) {}\n    //------------------------------------------------------------------------\n    // End of signatures required by parallel_reduce\n    //------------------------------------------------------------------------\n};\n\n//! Count number of primes between 0 and n\n/** This is the parallel version. */\nNumberType ParallelCountPrimes(NumberType n, int number_of_threads, NumberType grain_size) {\n    oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism,\n                                  number_of_threads);\n\n    // Two is special case\n    NumberType count = n >= 2;\n    if (n >= 3) {\n        Sieve s(n);\n        count += s.multiples.n_factor;\n        if (printPrimes)\n            printf(\"---\\n\");\n        // Explicit grain size and simple_partitioner() used here instead of automatic grainsize\n        // determination because we want SieveRange to be decomposed down to grainSize or smaller.\n        // Doing so improves odds that the working set fits in cache when evaluating Sieve::operator().\n        oneapi::tbb::parallel_reduce(SieveRange(s.multiples.m, n, s.multiples.m, grain_size),\n                                     s,\n                                     oneapi::tbb::simple_partitioner());\n        count += s.count;\n    }\n    return count;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/parallel_reduce/primes/primes.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TBB_examples_primes_H\n#define TBB_examples_primes_H\n\n#include <cstddef>\n\n#include \"common/utility/get_default_num_threads.hpp\"\n\ntypedef std::size_t NumberType;\n\n//! Count number of primes between 0 and n\n/** This is the serial version. */\nNumberType SerialCountPrimes(NumberType n);\n\n//! Count number of primes between 0 and n\n/** This is the parallel version. */\nNumberType ParallelCountPrimes(NumberType n,\n                               int numberOfThreads = utility::get_default_num_threads(),\n                               NumberType grainSize = 1000);\n\n#endif /* TBB_examples_primes_H */\n"
  },
  {
    "path": "third-party/tbb/examples/task_arena/README.md",
    "content": "# Code Samples of oneAPI Threading Building Blocks (oneTBB)\nExamples using the `task_arena` feature.\n\n| Code sample name | Description\n|:--- |:---\n| fractal |The example calculates two classical Mandelbrot fractals with different concurrency limits.\n"
  },
  {
    "path": "third-party/tbb/examples/task_arena/fractal/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(fractal CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(tbb)\n\nadd_executable(fractal fractal.cpp main.cpp ) \n\nadd_subdirectory(../../common/gui gui)\n\ntarget_link_libraries(fractal PUBLIC TBB::tbb Threads::Threads UI_LIB_fractal)\ntarget_compile_options(fractal PRIVATE ${TBB_CXX_STD_FLAG})\n\nset(EXECUTABLE \"$<TARGET_FILE:fractal>\")\nset(ARGS auto)\nset(PERF_ARGS auto 1 1000000 silent)\nset(LIGHT_ARGS auto 1 1000)\n\nadd_execution_target(run_fractal fractal ${EXECUTABLE} \"${ARGS}\")\nadd_execution_target(perf_run_fractal fractal ${EXECUTABLE} \"${PERF_ARGS}\")\nadd_execution_target(light_test_fractal fractal ${EXECUTABLE} \"${LIGHT_ARGS}\")\n"
  },
  {
    "path": "third-party/tbb/examples/task_arena/fractal/README.md",
    "content": "# Fractal sample\nThe example calculates two classical Mandelbrot fractals with different concurrency levels.\n\nThe application window is divided into two areas where fractals are rendered. The example also has the console mode.\n\n## Building the example\n```\ncmake <path_to_example> [EXAMPLES_UI_MODE=value]\ncmake --build .\n\n```\n### Predefined CMake variables\n* `EXAMPLES_UI_MODE` - defines the GUI mode, supported values are `gdi`, `d2d`, `con` on Windows, `x`,`con` on Linux and `mac`,`con` on macOS. The default mode is `con`. See the [common page](../../README.md) to get more information.\n\n## Running the sample\n### Predefined make targets\n* `make run_fractal` - executes the example with predefined parameters.\n* `make perf_run_fractal` - executes the example with suggested parameters to measure the oneTBB performance.\n* `make light_test_fractal` - executes the example with suggested parameters to reduce execution time.\n\n### Application parameters\nUsage:\n```\nfractal [n-of-threads=value] [n-of-frames=value] [max-of-iterations=value] [grain-size=value] [use-auto-partitioner] [silent] [single] [-h] [n-of-threads [n-of-frames [max-of-iterations [grain-size]]]]\n```\n* `-h` - prints the help for command line options.\n* `n-of-threads` - the number of threads to use; a range of the form low\\[:high\\], where low and optional high are non-negative integers or `auto` for a platform-specific default number.\n* `n-of-frames` - the number of frames the example processes internally.\n* `max-of-iterations` - the maximum number of the fractal iterations.\n* `grain-size` - the optional grain size, must be a positive integer.\n* `use-auto-partitioner` - use oneapi::tbb::auto_partitioner.\n* `silent` - no output except elapsed time.\n* `single` - process only one fractal.\n\n### Interactive graphical user interface\nThe following hot keys can be used in interactive execution mode when the example is compiled with the graphical user interface:\n\n* `left mouse button` - make the fractal active.\n* `w` - move the active fractal up.\n* `a` - move the active fractal to the left.\n* `s` - move the active fractal down.\n* `d` - move the active fractal to the right.\n* `q` - zoom in the active fractal.\n* `e` - zoom out the active fractal.\n* `r` - increase quality (count of iterations for each pixel) the active fractal.\n* `f` - decrease quality (count of iterations for each pixel) the active fractal.\n* `esc` - stop execution.\n"
  },
  {
    "path": "third-party/tbb/examples/task_arena/fractal/fractal.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <cmath>\n#include <cstdio>\n\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/blocked_range2d.h\"\n#include \"oneapi/tbb/tick_count.h\"\n\n#include \"fractal.hpp\"\n\nvideo *v;\nextern bool silent;\nextern bool schedule_auto;\nextern int grain_size;\n\ncolor_t fractal::calc_one_pixel(int x0, int y0) const {\n    unsigned int iter;\n    double fx0, fy0, xtemp, x, y, mu;\n\n    color_t color;\n\n    fx0 = (double)x0 - (double)size_x / 2.0;\n    fy0 = (double)y0 - (double)size_y / 2.0;\n    fx0 = fx0 / magn + cx;\n    fy0 = fy0 / magn + cy;\n\n    iter = 0;\n    x = 0;\n    y = 0;\n    mu = 0;\n\n    while (((x * x + y * y) <= 4) && (iter < max_iterations)) {\n        xtemp = x * x - y * y + fx0;\n        y = 2 * x * y + fy0;\n        x = xtemp;\n        mu += exp(-sqrt(x * x + y * y));\n        iter++;\n    }\n\n    if (iter == max_iterations) {\n        // point corresponds to the mandelbrot set\n        color = v->get_color(255, 255, 255);\n        return color;\n    }\n\n    int b = (int)(256 * mu);\n    int g = (b / 8);\n    int r = (g / 16);\n\n    b = b > 255 ? 255 : b;\n    g = g > 255 ? 255 : g;\n    r = r > 255 ? 255 : r;\n\n    color = v->get_color(r, g, b);\n    return color;\n}\n\nvoid fractal::clear() {\n    drawing_area area(off_x, off_y, size_x, size_y, dm);\n\n    // fill the rendering area with black color\n    for (int y = 0; y < size_y; ++y) {\n        area.set_pos(0, y);\n        for (int x = 0; x < size_x; ++x) {\n            area.put_pixel(v->get_color(0, 0, 0));\n        }\n    }\n}\n\nvoid fractal::draw_border(bool is_active) {\n    color_t color = is_active ? v->get_color(0, 255, 0) // green color\n                              : v->get_color(96, 128, 96); // green-gray color\n\n    // top border\n    drawing_area area0(off_x - 1, off_y - 1, size_x + 2, 1, dm);\n    for (int i = -1; i < size_x + 1; ++i)\n        area0.put_pixel(color);\n    // bottom border\n    drawing_area area1(off_x - 1, off_y + size_y, size_x + 2, 1, dm);\n    for (int i = -1; i < size_x + 1; ++i)\n        area1.put_pixel(color);\n    // left border\n    drawing_area area2(off_x - 1, off_y, 1, size_y + 2, dm);\n    for (int i = 0; i < size_y; ++i)\n        area2.set_pixel(0, i, color);\n    // right border\n    drawing_area area3(size_x + off_x, off_y, 1, size_y + 2, dm);\n    for (int i = 0; i < size_y; ++i)\n        area3.set_pixel(0, i, color);\n}\n\nvoid fractal::render_rect(int x0, int y0, int x1, int y1) const {\n    // render the specified rectangle area\n    drawing_area area(off_x + x0, off_y + y0, x1 - x0, y1 - y0, dm);\n    for (int y = y0; y < y1; ++y) {\n        area.set_pos(0, y - y0);\n        for (int x = x0; x < x1; ++x) {\n            area.put_pixel(calc_one_pixel(x, y));\n        }\n    }\n}\n\nclass fractal_body {\n    fractal &f;\n\npublic:\n    void operator()(oneapi::tbb::blocked_range2d<int> &r) const {\n        if (v->next_frame())\n            f.render_rect(r.cols().begin(), r.rows().begin(), r.cols().end(), r.rows().end());\n    }\n\n    fractal_body(fractal &_f) : f(_f) {}\n};\n\nvoid fractal::render(oneapi::tbb::task_group_context &context) {\n    // Make copy of fractal object and render fractal with parallel_for with\n    // the provided context and partitioner chosen by schedule_auto.\n    // Updates to fractal are not reflected in the render.\n    fractal f = *this;\n    fractal_body body(f);\n\n    if (schedule_auto)\n        oneapi::tbb::parallel_for(\n            oneapi::tbb::blocked_range2d<int>(0, size_y, grain_size, 0, size_x, grain_size),\n            body,\n            oneapi::tbb::auto_partitioner(),\n            context);\n    else\n        oneapi::tbb::parallel_for(\n            oneapi::tbb::blocked_range2d<int>(0, size_y, grain_size, 0, size_x, grain_size),\n            body,\n            oneapi::tbb::simple_partitioner(),\n            context);\n}\n\nvoid fractal::run(oneapi::tbb::task_group_context &context) {\n    clear();\n    context.reset();\n    render(context);\n}\n\nbool fractal::check_point(int x, int y) const {\n    return x >= off_x && x <= off_x + size_x && y >= off_y && y <= off_y + size_y;\n}\n\nvoid fractal_group::calc_fractal(int num) {\n    // calculate the fractal\n    fractal &f = num ? f1 : f0;\n\n    oneapi::tbb::tick_count t0 = oneapi::tbb::tick_count::now();\n    while (v->next_frame() && num_frames[num] != 0) {\n        f.run(context[num]);\n        if (num_frames[num] > 0)\n            num_frames[num] -= 1;\n    }\n    oneapi::tbb::tick_count t1 = oneapi::tbb::tick_count::now();\n\n    if (!silent) {\n        printf(\"  %s fractal finished. Time: %g\\n\", num ? \"Second\" : \"First\", (t1 - t0).seconds());\n    }\n}\n\nvoid fractal_group::switch_active(int new_active) {\n    if (new_active != -1)\n        active = new_active;\n    else\n        active = 1 - active; // assumes 'active' is only 0 or 1\n    draw_borders();\n}\n\nvoid fractal_group::set_num_frames_at_least(int n) {\n    if (num_frames[0] < n)\n        num_frames[0] = n;\n    if (num_frames[1] < n)\n        num_frames[1] = n;\n}\n\nvoid fractal_group::run(bool create_second_fractal) {\n    // First argument of arenas construntor is used to restrict concurrency\n    arenas[0].initialize(num_threads);\n    arenas[1].initialize(num_threads / 2);\n\n    draw_borders();\n\n    // the second fractal is calculating on separated thread\n    if (create_second_fractal) {\n        arenas[1].execute([&] {\n            groups[1].run([&] {\n                calc_fractal(1);\n            });\n        });\n    }\n\n    arenas[0].execute([&] {\n        groups[0].run([&] {\n            calc_fractal(0);\n        });\n    });\n\n    if (create_second_fractal) {\n        arenas[1].execute([&] {\n            groups[1].wait();\n        });\n    }\n\n    arenas[0].execute([&] {\n        groups[0].wait();\n    });\n}\n\nvoid fractal_group::draw_borders() {\n    f0.draw_border(active == 0);\n    f1.draw_border(active == 1);\n}\n\nfractal_group::fractal_group(const drawing_memory &_dm,\n                             int _num_threads,\n                             unsigned int _max_iterations,\n                             int _num_frames)\n        : f0(_dm),\n          f1(_dm),\n          num_threads(_num_threads) {\n    // set rendering areas\n    f0.size_x = f1.size_x = _dm.sizex / 2 - 4;\n    f0.size_y = f1.size_y = _dm.sizey - 4;\n    f0.off_x = f0.off_y = f1.off_y = 2;\n    f1.off_x = f0.size_x + 4 + 2;\n\n    // set fractals parameters\n    f0.cx = -0.6f;\n    f0.cy = 0.0f;\n    f0.magn = 200.0f;\n    f1.cx = -0.6f;\n    f1.cy = 0.0f;\n    f1.magn = 200.0f;\n    f0.max_iterations = f1.max_iterations = _max_iterations;\n\n    // initially the first fractal is active\n    active = 0;\n\n    num_frames[0] = num_frames[1] = _num_frames;\n}\n\nvoid fractal_group::mouse_click(int x, int y) {\n    // assumption that the point is not inside any fractal area\n    int new_active = -1;\n\n    if (f0.check_point(x, y)) {\n        // the point is inside the first fractal area\n        new_active = 0;\n    }\n    else if (f1.check_point(x, y)) {\n        // the point is inside the second fractal area\n        new_active = 1;\n    }\n\n    if (new_active != -1 && new_active != active) {\n        switch_active(new_active);\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/examples/task_arena/fractal/fractal.hpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TBB_examples_fractal_H\n#define TBB_examples_fractal_H\n\n#include <atomic>\n\n#include \"oneapi/tbb/task_arena.h\"\n#include \"oneapi/tbb/task_group.h\"\n\n#include \"common/gui/video.hpp\"\n#include \"common/utility/get_default_num_threads.hpp\"\n\n//! Fractal class\nclass fractal {\n    //! Left corner of the fractal area\n    int off_x, off_y;\n    //! Size of the fractal area\n    int size_x, size_y;\n\n    //! Fractal properties\n    float cx, cy;\n    float magn;\n    float step;\n    unsigned int max_iterations;\n\n    //! Drawing memory object for rendering\n    const drawing_memory &dm;\n\n    //! One pixel calculation routine\n    color_t calc_one_pixel(int x, int y) const;\n    //! Clears the fractal area\n    void clear();\n    //! Draws the border around the fractal area\n    void draw_border(bool is_active);\n    //! Renders the fractal\n    void render(oneapi::tbb::task_group_context &context);\n    //! Check if the point is inside the fractal area\n    bool check_point(int x, int y) const;\n\npublic:\n    //! Constructor\n    fractal(const drawing_memory &dm) : step(0.2), dm(dm) {\n#if _MSC_VER && _WIN64 && !__INTEL_COMPILER\n        // Workaround for MSVC x64 compiler issue\n        volatile int i = 0;\n#endif\n    }\n    //! Runs the fractal calculation\n    void run(oneapi::tbb::task_group_context &context);\n    //! Renders the fractal rectangular area\n    void render_rect(int x0, int y0, int x1, int y1) const;\n\n    void move_up() {\n        cy += step;\n    }\n    void move_down() {\n        cy -= step;\n    }\n    void move_left() {\n        cx += step;\n    }\n    void move_right() {\n        cx -= step;\n    }\n\n    void zoom_in() {\n        magn *= 2.;\n        step /= 2.;\n    }\n    void zoom_out() {\n        magn /= 2.;\n        step *= 2.;\n    }\n\n    void quality_inc() {\n        max_iterations += max_iterations / 2;\n    }\n    void quality_dec() {\n        max_iterations -= max_iterations / 2;\n    }\n\n    friend class fractal_group;\n};\n\n//! The group of fractals\nclass fractal_group {\n    //! Fractals definition\n    fractal f0, f1;\n    //! Number of frames to calculate\n    std::atomic<int> num_frames[2];\n\n    //! Contexts, arenas and groups for concurrent computation\n    oneapi::tbb::task_group_context context[2];\n    oneapi::tbb::task_arena arenas[2];\n    oneapi::tbb::task_group groups[2];\n\n    //! Border type enumeration\n    enum BORDER_TYPE { BORDER_INACTIVE = 0, BORDER_ACTIVE };\n\n    //! The number of the threads\n    int num_threads;\n    //! The active (high priority) fractal number\n    int active;\n\n    //! Draws the borders around the fractals\n    void draw_borders();\n    //! Sets priorities for fractals calculations\n    void set_priorities();\n\npublic:\n    //! Constructor\n    fractal_group(const drawing_memory &_dm,\n                  int num_threads = utility::get_default_num_threads(),\n                  unsigned int max_iterations = 100000,\n                  int num_frames = 1);\n    //! Run calculation\n    void run(bool create_second_fractal = true);\n    //! Mouse event handler\n    void mouse_click(int x, int y);\n    //! Fractal calculation routine\n    void calc_fractal(int num);\n    //! Get number of threads\n    int get_num_threads() const {\n        return num_threads;\n    }\n    //! Reset the number of frames to be not less than the given value\n    void set_num_frames_at_least(int n);\n    //! Switch active fractal\n    void switch_active(int new_active = -1);\n    //! Get active fractal\n    fractal &get_active_fractal() {\n        return active ? f1 : f0;\n    }\n\n    void active_fractal_zoom_in() {\n        get_active_fractal().zoom_in();\n        context[active].cancel_group_execution();\n    }\n    void active_fractal_zoom_out() {\n        get_active_fractal().zoom_out();\n        context[active].cancel_group_execution();\n    }\n    void active_fractal_quality_inc() {\n        get_active_fractal().quality_inc();\n        context[active].cancel_group_execution();\n    }\n    void active_fractal_quality_dec() {\n        get_active_fractal().quality_dec();\n        context[active].cancel_group_execution();\n    }\n    void active_fractal_move_up() {\n        get_active_fractal().move_up();\n        context[active].cancel_group_execution();\n    }\n    void active_fractal_move_down() {\n        get_active_fractal().move_down();\n        context[active].cancel_group_execution();\n    }\n    void active_fractal_move_left() {\n        get_active_fractal().move_left();\n        context[active].cancel_group_execution();\n    }\n    void active_fractal_move_right() {\n        get_active_fractal().move_right();\n        context[active].cancel_group_execution();\n    }\n};\n\n#endif /* TBB_examples_fractal_H */\n"
  },
  {
    "path": "third-party/tbb/examples/task_arena/fractal/fractal_video.hpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef TBB_examples_fractal_video_H\n#define TBB_examples_fractal_video_H\n\n#include \"common/gui/video.hpp\"\n\n#include \"fractal.hpp\"\n\nextern video *v;\nextern bool single;\n\nclass fractal_video : public video {\n    fractal_group *fg;\n\nprivate:\n    void on_mouse(int x, int y, int key) {\n        if (key == 1) {\n            if (fg) {\n                fg->set_num_frames_at_least(20);\n                fg->mouse_click(x, y);\n            }\n        }\n    }\n\n    void on_key(int key) {\n        switch (key & 0xff) {\n            case esc_key: running = false; break;\n\n            case 'q':\n                if (fg)\n                    fg->active_fractal_zoom_in();\n                break;\n            case 'e':\n                if (fg)\n                    fg->active_fractal_zoom_out();\n                break;\n\n            case 'r':\n                if (fg)\n                    fg->active_fractal_quality_inc();\n                break;\n            case 'f':\n                if (fg)\n                    fg->active_fractal_quality_dec();\n                break;\n\n            case 'w':\n                if (fg)\n                    fg->active_fractal_move_up();\n                break;\n            case 'a':\n                if (fg)\n                    fg->active_fractal_move_left();\n                break;\n            case 's':\n                if (fg)\n                    fg->active_fractal_move_down();\n                break;\n            case 'd':\n                if (fg)\n                    fg->active_fractal_move_right();\n                break;\n        }\n        if (fg)\n            fg->set_num_frames_at_least(20);\n    }\n\n    void on_process() {\n        if (fg) {\n            fg->run(!single);\n        }\n    }\n\npublic:\n    fractal_video() : fg(nullptr) {\n        title = \"oneTBB: Fractal Example\";\n        v = this;\n    }\n\n    void set_fractal_group(fractal_group &_fg) {\n        fg = &_fg;\n    }\n};\n\n#endif /* TBB_examples_fractal_video_H */\n"
  },
  {
    "path": "third-party/tbb/examples/task_arena/fractal/gui/fractal.rc",
    "content": "// Microsoft Visual C++ generated resource script.\n//\n#include \"resource.h\"\n\n#define APSTUDIO_READONLY_SYMBOLS\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 2 resource.\n//\n#define APSTUDIO_HIDDEN_SYMBOLS\n#include \"windows.h\"\n#undef APSTUDIO_HIDDEN_SYMBOLS\n\n/////////////////////////////////////////////////////////////////////////////\n#undef APSTUDIO_READONLY_SYMBOLS\n\n/////////////////////////////////////////////////////////////////////////////\n// English (U.S.) resources\n\n#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\n#ifdef _WIN32\nLANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\n#pragma code_page(1252)\n#endif //_WIN32\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Icon\n//\n\n// Icon with lowest ID value placed first to ensure application icon\n// remains consistent on all systems.\nIDI_GUI   ICON                    \"gui.ico\"\nIDI_SMALL               ICON                    \"small.ico\"\n\n\n#ifdef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// TEXTINCLUDE\n//\n\n1 TEXTINCLUDE \nBEGIN\n    \"resource.h\\0\"\nEND\n\n2 TEXTINCLUDE \nBEGIN\n    \"#define APSTUDIO_HIDDEN_SYMBOLS\\r\\n\"\n    \"#include \"\"windows.h\"\"\\r\\n\"\n    \"#undef APSTUDIO_HIDDEN_SYMBOLS\\r\\n\"\n    \"\\0\"\nEND\n\n3 TEXTINCLUDE \nBEGIN\n    \"\\r\\n\"\n    \"\\0\"\nEND\n\n#endif    // APSTUDIO_INVOKED\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// String Table\n//\n\nSTRINGTABLE \nBEGIN\n    IDS_APP_TITLE           \"gui\"\n    IDC_GUI   \"GUI\"\nEND\n\n#endif    // English (U.S.) resources\n/////////////////////////////////////////////////////////////////////////////\n\n\n\n#ifndef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 3 resource.\n//\n\n\n/////////////////////////////////////////////////////////////////////////////\n#endif    // not APSTUDIO_INVOKED\n\n"
  },
  {
    "path": "third-party/tbb/examples/task_arena/fractal/gui/resource.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#define IDC_MYICON    2\n#define IDD_GUI       102\n#define IDS_APP_TITLE 103\n#define IDI_GUI       107\n#define IDI_SMALL     108\n#define IDC_GUI       109\n#define IDR_MAINFRAME 128\n#define IDC_STATIC    -1\n"
  },
  {
    "path": "third-party/tbb/examples/task_arena/fractal/main.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#define VIDEO_WINMAIN_ARGS\n\n#include <cstdio>\n\n#include <iostream>\n\n#include \"oneapi/tbb/tick_count.h\"\n\n#include \"common/utility/utility.hpp\"\n\n#include \"fractal.hpp\"\n#include \"fractal_video.hpp\"\n\nbool silent = false;\nbool single = false;\nbool schedule_auto = false;\nint grain_size = 8;\n\nint main(int argc, char *argv[]) {\n    oneapi::tbb::tick_count mainStartTime = oneapi::tbb::tick_count::now();\n\n    // It is used for console mode for test with different number of threads and also has\n    // meaning for GUI: threads.first  - use separate event/updating loop thread (>0) or not (0).\n    //                  threads.second - initialization value for scheduler\n    utility::thread_number_range threads(utility::get_default_num_threads);\n    int num_frames = -1;\n    int max_iterations = 1000000;\n\n    // command line parsing\n    utility::parse_cli_arguments(\n        argc,\n        argv,\n        utility::cli_argument_pack()\n            //\"-h\" option for displaying help is present implicitly\n            .positional_arg(threads, \"n-of-threads\", utility::thread_number_range_desc)\n            .positional_arg(\n                num_frames, \"n-of-frames\", \"number of frames the example processes internally\")\n            .positional_arg(\n                max_iterations, \"max-of-iterations\", \"maximum number of the fractal iterations\")\n            .positional_arg(grain_size, \"grain-size\", \"the grain size value\")\n            .arg(schedule_auto, \"use-auto-partitioner\", \"use oneapi::tbb::auto_partitioner\")\n            .arg(silent, \"silent\", \"no output except elapsed time\")\n            .arg(single, \"single\", \"process only one fractal\"));\n\n    fractal_video video;\n\n    // video layer init\n    if (video.init_window(1024, 512)) {\n        video.calc_fps = false;\n        video.threaded = threads.first > 0;\n        // initialize fractal group\n        fractal_group fg(video.get_drawing_memory(), threads.last, max_iterations, num_frames);\n        video.set_fractal_group(fg);\n        // main loop\n        video.main_loop();\n    }\n    else if (video.init_console()) {\n        // in console mode we always have limited number of frames\n        num_frames = num_frames < 0 ? 1 : num_frames;\n        for (int p = threads.first; p <= threads.last; p = threads.step(p)) {\n            if (!silent)\n                printf(\"Threads = %d\\n\", p);\n            fractal_group fg(video.get_drawing_memory(), p, max_iterations, num_frames);\n            fg.run(!single);\n        }\n    }\n    video.terminate();\n    utility::report_elapsed_time((oneapi::tbb::tick_count::now() - mainStartTime).seconds());\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/examples/task_group/README.md",
    "content": "# Code Samples of oneAPI Threading Building Blocks (oneTBB)\nExamples using `task_group` interface.\n\n| Code sample name | Description\n|:--- |:---\n| sudoku | Compute all solutions for a Sudoku board.\n"
  },
  {
    "path": "third-party/tbb/examples/task_group/sudoku/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(sudoku CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(tbb)\n\nadd_executable(sudoku sudoku.cpp)\n\ntarget_link_libraries(sudoku TBB::tbb Threads::Threads)\ntarget_compile_options(sudoku PRIVATE ${TBB_CXX_STD_FLAG})\n\nif (MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL IntelLLVM)\n    target_compile_options(sudoku PRIVATE -D_CRT_SECURE_NO_WARNINGS)\nendif()\n\nset(EXECUTABLE \"$<TARGET_FILE:sudoku>\")\nset(ARGS 4 ${CMAKE_CURRENT_SOURCE_DIR}/input1 verbose)\nset(PERF_ARGS auto ${CMAKE_CURRENT_SOURCE_DIR}/input1 silent)\n\nadd_execution_target(run_sudoku sudoku ${EXECUTABLE} \"${ARGS}\")\nadd_execution_target(perf_run_sudoku sudoku ${EXECUTABLE} \"${PERF_ARGS}\")\n"
  },
  {
    "path": "third-party/tbb/examples/task_group/sudoku/README.md",
    "content": "# Sudoku sample\nThis directory contains an example that finds all solutions to a Sudoku board.\n\nIt uses a straightforward state-space search algorithm that exhibits OR-parallelism. It can be optionally run until it obtains just the first solution. The point of the example is to teach how to use the `task_group` interface.\n\n## Building the example\n```\ncmake <path_to_example>\ncmake --build .\n```\n\n## Running the sample\n### Predefined make targets\n* `make run_sudoku` - executes the example with predefined parameters.\n* `make perf_run_sudoku` - executes the example with suggested parameters to measure the oneTBB performance.\n\n### Application parameters\nUsage:\n```\nsudoku [n-of-threads=value] [filename=value] [verbose] [silent] [find-one] [-h] [n-of-threads [filename]]\n```\n* `-h` - prints the help for command line options.\n* `n-of-threads` - the number of threads to use; a range of the form low\\[:high\\], where low and optional high are non-negative integers or `auto` for a platform-specific default number.\n* `filename` - the input filename.\n* `verbose` - prints the first solution.\n* `silent` - no output except elapsed time.\n* `find-one` - stops after finding first solution.\n\nThe example's directory contains following files that may be used as an input file:\n`input1` - Sample input file with modest number of solutions.\n`input2` - Sample input file with small number of solutions.\n`input3` - Sample input file with larger number of solutions.\n`input4` - Sample input file with very large number of solutions.\n"
  },
  {
    "path": "third-party/tbb/examples/task_group/sudoku/input1",
    "content": "1 0 0 9 0 0 0 8 0 0 8 0 2 0 0 0 0 0 0 0 5 0 0 0 7 0 0 0 5 2 1 0 0 4 0 0 0 0 0 0 0 5 0 0 7 4 0 0 7 0 0 0 3 0 0 3 0 0 0 2 0 0 5 0 0 0 0 0 0 1 0 0 5 0 0 0 1 0 0 0 0\n\n\n\n\n\n\n\n1 0 0  9 0 0  0 8 0\n0 8 0  2 0 0  0 0 0\n0 0 5  0 0 0  7 0 0\n\n0 5 2  1 0 0  4 0 0\n0 0 0  0 0 5  0 0 7\n4 0 0  7 0 0  0 3 0\n \n0 3 0  0 0 2  0 0 5\n0 0 0  0 0 0  1 0 0\n5 0 0  0 1 0  0 0 0\n"
  },
  {
    "path": "third-party/tbb/examples/task_group/sudoku/input2",
    "content": "2 0 1 0 0 0 0 8 0 0 8 0 2 1 9 6 0 0 0 0 5 0 0 0 7 0 0 0 5 2 1 0 0 4 0 0 0 0 0 0 0 5 0 0 7 4 0 0 7 0 0 0 3 0 0 3 0 0 0 2 0 0 5 0 0 0 0 3 0 1 0 0 5 0 0 0 8 0 0 0 6\n\n\n\n\n\n\n2 0 1  0 0 0  0 8 0\n0 8 0  2 1 9  6 0 0\n0 0 5  0 0 0  7 0 0\n\n0 5 2  1 0 0  4 0 0\n0 0 0  0 0 5  0 0 7\n4 0 0  7 0 0  0 3 0\n \n0 3 0  0 0 2  0 0 5\n0 0 0  0 3 0  1 0 0\n5 0 0  0 8 0  0 0 6\n"
  },
  {
    "path": "third-party/tbb/examples/task_group/sudoku/input3",
    "content": "1 0 0 9 0 0 0 8 0 0 0 0 2 0 0 0 0 0 0 0 5 0 0 0 7 0 0 0 5 2 6 0 0 4 0 0 0 0 0 0 0 5 0 0 7 4 0 0 7 0 0 0 3 0 0 3 0 0 0 2 0 0 5 0 0 0 0 0 0 1 0 0 5 0 0 0 1 0 0 0 0\n\n\n\n\n\n\n\n1 0 0  9 0 0  0 8 0\n0 0 0  2 0 0  0 0 0\n0 0 5  0 0 0  7 0 0\n\n0 5 2  6 0 0  4 0 0\n0 0 0  0 0 5  0 0 7\n4 0 0  7 0 0  0 3 0\n \n0 3 0  0 0 2  0 0 5\n0 0 0  0 0 0  1 0 0\n5 0 0  0 1 0  0 0 0\n"
  },
  {
    "path": "third-party/tbb/examples/task_group/sudoku/input4",
    "content": "1 0 0 9 0 0 0 8 0 0 0 0 2 0 0 0 0 0 0 0 5 0 0 0 7 0 0 0 0 2 6 0 0 0 0 0 0 0 0 0 0 5 0 0 7 4 0 0 0 0 0 0 3 0 0 3 0 0 0 2 0 0 5 0 0 0 0 0 0 1 0 0 5 0 0 0 1 0 0 0 0\n\n\n\n\n\n\n\n1 0 0  9 0 0  0 8 0\n0 0 0  2 0 0  0 0 0\n0 0 5  0 0 0  7 0 0\n\n0 0 2  6 0 0  0 0 0\n0 0 0  0 0 5  0 0 7\n4 0 0  0 0 0  0 3 0\n \n0 3 0  0 0 2  0 0 5\n0 0 0  0 0 0  1 0 0\n5 0 0  0 1 0  0 0 0\n"
  },
  {
    "path": "third-party/tbb/examples/task_group/sudoku/sudoku.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <cstdio>\n#include <cstdlib>\n\n#include <string>\n#include <atomic>\n\n#include \"oneapi/tbb/tick_count.h\"\n#include \"oneapi/tbb/task_group.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include \"common/utility/utility.hpp\"\n#include \"common/utility/get_default_num_threads.hpp\"\n\n#pragma warning(disable : 4996)\n\nconst unsigned BOARD_SIZE = 81;\nconst unsigned BOARD_DIM = 9;\nstd::atomic<unsigned> nSols;\nbool find_one = false;\nbool verbose = false;\nunsigned short init_values[BOARD_SIZE] = { 1, 0, 0, 9, 0, 0, 0, 8, 0, 0, 8, 0, 2, 0, 0, 0, 0,\n                                           0, 0, 0, 5, 0, 0, 0, 7, 0, 0, 0, 5, 2, 1, 0, 0, 4,\n                                           0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 7, 4, 0, 0, 7, 0, 0,\n                                           0, 3, 0, 0, 3, 0, 0, 0, 2, 0, 0, 5, 0, 0, 0, 0, 0,\n                                           0, 1, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 0 };\ndouble solve_time;\n\ntypedef struct {\n    unsigned short solved_element;\n    unsigned potential_set;\n} board_element;\n\nvoid read_board(const char* filename) {\n    FILE* fp;\n    int input;\n    fp = fopen(filename, \"r\");\n    if (!fp) {\n        fprintf(stderr, \"sudoku: Could not open input file '%s'.\\n\", filename);\n        std::exit(-1);\n    }\n    for (unsigned i = 0; i < BOARD_SIZE; ++i) {\n        if (fscanf(fp, \"%d\", &input))\n            init_values[i] = input;\n        else {\n            fprintf(stderr, \"sudoku: Error in input file at entry %d, assuming 0.\\n\", i);\n            init_values[i] = 0;\n        }\n    }\n    fclose(fp);\n}\n\nvoid print_board(const std::vector<board_element>& b) {\n    for (unsigned row = 0; row < BOARD_DIM; ++row) {\n        for (unsigned col = 0; col < BOARD_DIM; ++col) {\n            printf(\" %d\", b[row * BOARD_DIM + col].solved_element);\n            if (col == 2 || col == 5)\n                printf(\" |\");\n        }\n        printf(\"\\n\");\n        if (row == 2 || row == 5)\n            printf(\" ---------------------\\n\");\n    }\n}\n\nvoid print_potential_board(const std::vector<board_element>& b) {\n    for (unsigned row = 0; row < BOARD_DIM; ++row) {\n        for (unsigned col = 0; col < BOARD_DIM; ++col) {\n            if (b[row * BOARD_DIM + col].solved_element)\n                printf(\"  %4d \", b[row * BOARD_DIM + col].solved_element);\n            else\n                printf(\" [%4d]\", b[row * BOARD_DIM + col].potential_set);\n            if (col == 2 || col == 5)\n                printf(\" |\");\n        }\n        printf(\"\\n\");\n        if (row == 2 || row == 5)\n            printf(\" ------------------------------------------------------------------\\n\");\n    }\n}\n\nvoid init_board(std::vector<board_element>& b) {\n    for (unsigned i = 0; i < BOARD_SIZE; ++i)\n        b[i].solved_element = b[i].potential_set = 0;\n}\n\nvoid init_board(std::vector<board_element>& b, unsigned short arr[BOARD_SIZE]) {\n    for (unsigned i = 0; i < BOARD_SIZE; ++i) {\n        b[i].solved_element = arr[i];\n        b[i].potential_set = 0;\n    }\n}\n\nvoid init_potentials(std::vector<board_element>& b) {\n    for (unsigned i = 0; i < BOARD_SIZE; ++i)\n        b[i].potential_set = 0;\n}\n\nbool fixed_board(const std::vector<board_element>& b) {\n    for (int i = BOARD_SIZE - 1; i >= 0; --i)\n        if (b[i].solved_element == 0)\n            return false;\n    return true;\n}\n\nbool in_row(const std::vector<board_element>& b, unsigned row, unsigned col, unsigned short p) {\n    for (unsigned c = 0; c < BOARD_DIM; ++c)\n        if (c != col && b[row * BOARD_DIM + c].solved_element == p)\n            return true;\n    return false;\n}\n\nbool in_col(const std::vector<board_element>& b, unsigned row, unsigned col, unsigned short p) {\n    for (unsigned r = 0; r < BOARD_DIM; ++r)\n        if (r != row && b[r * BOARD_DIM + col].solved_element == p)\n            return true;\n    return false;\n}\n\nbool in_block(const std::vector<board_element>& b, unsigned row, unsigned col, unsigned short p) {\n    unsigned b_row = row / 3 * 3, b_col = col / 3 * 3;\n    for (unsigned i = b_row; i < b_row + 3; ++i)\n        for (unsigned j = b_col; j < b_col + 3; ++j)\n            if (!(i == row && j == col) && b[i * BOARD_DIM + j].solved_element == p)\n                return true;\n    return false;\n}\n\nvoid calculate_potentials(std::vector<board_element>& b) {\n    for (unsigned i = 0; i < BOARD_SIZE; ++i) {\n        b[i].potential_set = 0;\n        if (!b[i].solved_element) { // element is not yet fixed\n            unsigned row = i / BOARD_DIM, col = i % BOARD_DIM;\n            for (unsigned potential = 1; potential <= BOARD_DIM; ++potential) {\n                if (!in_row(b, row, col, potential) && !in_col(b, row, col, potential) &&\n                    !in_block(b, row, col, potential))\n                    b[i].potential_set |= 1 << (potential - 1);\n            }\n        }\n    }\n}\n\nbool valid_board(const std::vector<board_element>& b) {\n    bool success = true;\n    for (unsigned i = 0; i < BOARD_SIZE; ++i) {\n        if (success && b[i].solved_element) { // element is fixed\n            unsigned row = i / BOARD_DIM, col = i % BOARD_DIM;\n            if (in_row(b, row, col, b[i].solved_element) ||\n                in_col(b, row, col, b[i].solved_element) ||\n                in_block(b, row, col, b[i].solved_element))\n                success = false;\n        }\n    }\n    return success;\n}\n\nbool examine_potentials(std::vector<board_element>& b, bool& progress) {\n    bool singletons = false;\n    for (unsigned i = 0; i < BOARD_SIZE; ++i) {\n        if (b[i].solved_element == 0 && b[i].potential_set == 0) // empty set\n            return false;\n        switch (b[i].potential_set) {\n            case 1: {\n                b[i].solved_element = 1;\n                singletons = true;\n                break;\n            }\n            case 2: {\n                b[i].solved_element = 2;\n                singletons = true;\n                break;\n            }\n            case 4: {\n                b[i].solved_element = 3;\n                singletons = true;\n                break;\n            }\n            case 8: {\n                b[i].solved_element = 4;\n                singletons = true;\n                break;\n            }\n            case 16: {\n                b[i].solved_element = 5;\n                singletons = true;\n                break;\n            }\n            case 32: {\n                b[i].solved_element = 6;\n                singletons = true;\n                break;\n            }\n            case 64: {\n                b[i].solved_element = 7;\n                singletons = true;\n                break;\n            }\n            case 128: {\n                b[i].solved_element = 8;\n                singletons = true;\n                break;\n            }\n            case 256: {\n                b[i].solved_element = 9;\n                singletons = true;\n                break;\n            }\n        }\n    }\n    progress = singletons;\n    return valid_board(b);\n}\n\nvoid partial_solve(oneapi::tbb::task_group& g,\n                   std::vector<board_element>& b,\n                   unsigned first_potential_set) {\n    if (fixed_board(b)) {\n        if (find_one)\n            g.cancel();\n        if (++nSols == 1 && verbose) {\n            print_board(b);\n        }\n        return;\n    }\n    calculate_potentials(b);\n    bool progress = true;\n    bool success = examine_potentials(b, progress);\n    if (success && progress) {\n        partial_solve(g, b, first_potential_set);\n    }\n    else if (success && !progress) {\n        while (b[first_potential_set].solved_element != 0)\n            ++first_potential_set;\n        for (unsigned short potential = 1; potential <= BOARD_DIM; ++potential) {\n            if (1 << (potential - 1) & b[first_potential_set].potential_set) {\n                g.run([&g, b /*make a copy of the board*/, first_potential_set, potential]() {\n                    //as task_group treat passed in functor as const - const_cast is needed\n                    //to allow modification of the copy\n                    auto& new_board = const_cast<std::vector<board_element>&>(b);\n                    new_board[first_potential_set].solved_element = potential;\n                    partial_solve(g, new_board, first_potential_set);\n                });\n            }\n        }\n    }\n}\n\nunsigned solve(int p) {\n    oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism, p);\n    nSols = 0;\n    std::vector<board_element> start_board(BOARD_SIZE);\n    init_board(start_board, init_values);\n    oneapi::tbb::task_group g;\n    oneapi::tbb::tick_count t0 = oneapi::tbb::tick_count::now();\n    partial_solve(g, start_board, 0);\n    g.wait();\n    solve_time = (oneapi::tbb::tick_count::now() - t0).seconds();\n    return nSols;\n}\n\nint main(int argc, char* argv[]) {\n    oneapi::tbb::tick_count mainStartTime = oneapi::tbb::tick_count::now();\n\n    utility::thread_number_range threads(utility::get_default_num_threads);\n    std::string filename = \"\";\n    bool silent = false;\n\n    utility::parse_cli_arguments(\n        argc,\n        argv,\n        utility::cli_argument_pack()\n            //\"-h\" option for displaying help is present implicitly\n            .positional_arg(threads, \"n-of-threads\", utility::thread_number_range_desc)\n            .positional_arg(filename, \"filename\", \"input filename\")\n\n            .arg(verbose, \"verbose\", \"prints the first solution\")\n            .arg(silent, \"silent\", \"no output except elapsed time\")\n            .arg(find_one, \"find-one\", \"stops after finding first solution\\n\"));\n\n    if (silent)\n        verbose = false;\n\n    if (!filename.empty())\n        read_board(filename.c_str());\n    // otherwise (if file name not specified), the default statically initialized board will be used.\n    for (int p = threads.first; p <= threads.last; p = threads.step(p)) {\n        unsigned number = solve(p);\n\n        if (!silent) {\n            if (find_one) {\n                printf(\"Sudoku: Time to find first solution on %d threads: %6.6f seconds.\\n\",\n                       p,\n                       solve_time);\n            }\n            else {\n                printf(\"Sudoku: Time to find all %u solutions on %d threads: %6.6f seconds.\\n\",\n                       number,\n                       p,\n                       solve_time);\n            }\n        }\n    }\n\n    utility::report_elapsed_time((oneapi::tbb::tick_count::now() - mainStartTime).seconds());\n\n    return 0;\n};\n"
  },
  {
    "path": "third-party/tbb/examples/test_all/README.md",
    "content": "# Code Samples of oneAPI Threading Building Blocks (oneTBB)\nExamples that test various components of oneTBB.\n\n| Code sample name | Description\n|:--- |:---\n| fibonacci | Compute Fibonacci numbers in different ways.\n"
  },
  {
    "path": "third-party/tbb/examples/test_all/fibonacci/CMakeLists.txt",
    "content": "# Copyright (c) 2019-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ncmake_minimum_required(VERSION 3.5.0...3.31.3)\n\nproject(fibonacci CXX)\n\ninclude(../../common/cmake/common.cmake)\n\nset_common_project_settings(tbb)\n\nadd_executable(fibonacci fibonacci.cpp)\ntarget_link_libraries(fibonacci\n                      TBB::tbb\n                      Threads::Threads\n                      $<$<PLATFORM_ID:Linux>:rt>)  # Link \"rt\" library on Linux\ntarget_compile_options(fibonacci PRIVATE ${TBB_CXX_STD_FLAG})\n\nset(EXECUTABLE \"$<TARGET_FILE:fibonacci>\")\nset(ARGS \"\")\n\nadd_execution_target(run_fibonacci fibonacci ${EXECUTABLE} \"${ARGS}\")\n"
  },
  {
    "path": "third-party/tbb/examples/test_all/fibonacci/README.md",
    "content": "# Fibonacci sample\nThis directory contains an example that computes Fibonacci numbers in several different ways.\n\nThe purpose of the example is to exercise every include file and class in Intel® oneAPI Threading Building Blocks. Most of the computations are deliberately silly and not expected to show any speedup on multiprocessors.\n\n## Building the example\n```\ncmake <path_to_example>\ncmake --build .\n```\n\n## Running the sample\n### Predefined make targets\n* `make run_fibonacci` - executes the example with predefined parameters.\n\n### Application parameters\nUsage:\n```\nfibonacci K [M[:N]] [R]\n```\n* `K` - specifies the fibonacci number which would be calculated.\n* `[M:N]` -a range of numbers of threads to be used.\n* `R` - the number of times to repeat the calculation.\n"
  },
  {
    "path": "third-party/tbb/examples/test_all/fibonacci/fibonacci.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/* Example program that computes Fibonacci numbers in different ways.\n   Arguments are: [ Number [Threads [Repeats]]]\n   The defaults are Number=500 Threads=1:4 Repeats=1.\n\n   The point of this program is to check that the library is working properly.\n   Most of the computations are deliberately silly and not expected to\n   show any speedup on multiprocessors.\n*/\n\n// enable assertions\n#ifdef NDEBUG\n#undef NDEBUG\n#endif\n\n#include <cstdio>\n#include <cstdlib>\n#include <cassert>\n\n#include <utility>\n#include <thread>\n#include <atomic>\n#include <mutex>\n\n#include \"oneapi/tbb/tick_count.h\"\n#include \"oneapi/tbb/blocked_range.h\"\n#include \"oneapi/tbb/concurrent_vector.h\"\n#include \"oneapi/tbb/concurrent_queue.h\"\n#include \"oneapi/tbb/concurrent_hash_map.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/parallel_reduce.h\"\n#include \"oneapi/tbb/parallel_scan.h\"\n#include \"oneapi/tbb/parallel_pipeline.h\"\n#include \"oneapi/tbb/spin_mutex.h\"\n#include \"oneapi/tbb/queuing_mutex.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n//! type used for Fibonacci number computations\ntypedef long long value;\n\n//! Matrix 2x2 class\nstruct Matrix2x2 {\n    //! Array of values\n    value v[2][2];\n    Matrix2x2() {}\n    Matrix2x2(value v00, value v01, value v10, value v11) {\n        v[0][0] = v00;\n        v[0][1] = v01;\n        v[1][0] = v10;\n        v[1][1] = v11;\n    }\n    Matrix2x2 operator*(const Matrix2x2 &to) const; //< Multiply two Matrices\n};\n//! Identity matrix\nstatic const Matrix2x2 MatrixIdentity(1, 0, 0, 1);\n//! Default matrix to multiply\nstatic const Matrix2x2 Matrix1110(1, 1, 1, 0);\n//! Raw arrays matrices multiply\nvoid Matrix2x2Multiply(const value a[2][2], const value b[2][2], value c[2][2]);\n\n/////////////////////// Serial methods ////////////////////////\n\n//! Plain serial sum\nvalue SerialFib(int n) {\n    if (n < 2)\n        return n;\n    value a = 0, b = 1, sum;\n    int i;\n    for (i = 2; i <= n; i++) { // n is really index of Fibonacci number\n        sum = a + b;\n        a = b;\n        b = sum;\n    }\n    return sum;\n}\n//! Serial n-1 matrices multiplication\nvalue SerialMatrixFib(int n) {\n    value c[2][2], a[2][2] = { { 1, 1 }, { 1, 0 } }, b[2][2] = { { 1, 1 }, { 1, 0 } };\n    int i;\n    for (i = 2; i < n; i++) { // Using condition to prevent copying of values\n        if (i & 1)\n            Matrix2x2Multiply(a, c, b);\n        else\n            Matrix2x2Multiply(a, b, c);\n    }\n    return (i & 1) ? c[0][0] : b[0][0]; // get result from upper left cell\n}\n//! Recursive summing. Just for complete list of serial algorithms, not used\nvalue SerialRecursiveFib(int n) {\n    value result;\n    if (n < 2)\n        result = n;\n    else\n        result = SerialRecursiveFib(n - 1) + SerialRecursiveFib(n - 2);\n    return result;\n}\n\n// GCC 4.8 C++ standard library implements std::this_thread::yield as no-op.\n#if __TBB_GLIBCXX_THIS_THREAD_YIELD_BROKEN\nstatic inline void yield() {\n    sched_yield();\n}\n#else\nusing std::this_thread::yield;\n#endif\n\n//! Introducing of queue method in serial\nvalue SerialQueueFib(int n) {\n    oneapi::tbb::concurrent_queue<Matrix2x2> Q;\n    for (int i = 1; i < n; i++)\n        Q.push(Matrix1110);\n    Matrix2x2 A, B;\n    while (true) {\n        while (!Q.try_pop(A))\n            yield();\n        if (Q.empty())\n            break;\n        while (!Q.try_pop(B))\n            yield();\n        Q.push(A * B);\n    }\n    return A.v[0][0];\n}\n//! Trying to use concurrent_vector\nvalue SerialVectorFib(int n) {\n    oneapi::tbb::concurrent_vector<value> A;\n    A.grow_by(2);\n    A[0] = 0;\n    A[1] = 1;\n    for (int i = 2; i <= n; i++) {\n        A.grow_to_at_least(i + 1);\n        A[i] = A[i - 1] + A[i - 2];\n    }\n    return A[n];\n}\n\n///////////////////// Parallel methods ////////////////////////\n\n// *** Serial shared by mutexes *** //\n\n//! Shared glabals\nvalue SharedA = 0, SharedB = 1;\nint SharedI = 1, SharedN;\n\n//! Template task class which computes Fibonacci numbers with shared globals\ntemplate <typename M>\nclass SharedSerialFibBody {\n    M &mutex;\n\npublic:\n    SharedSerialFibBody(M &m) : mutex(m) {}\n    //! main loop\n    void operator()(const oneapi::tbb::blocked_range<int> &range) const {\n        for (;;) {\n            typename M::scoped_lock lock(mutex);\n            if (SharedI >= SharedN)\n                break;\n            value sum = SharedA + SharedB;\n            SharedA = SharedB;\n            SharedB = sum;\n            ++SharedI;\n        }\n    }\n};\n\ntemplate <>\nvoid SharedSerialFibBody<std::mutex>::operator()(\n    const oneapi::tbb::blocked_range<int> &range) const {\n    for (;;) {\n        std::lock_guard<std::mutex> lock(mutex);\n        if (SharedI >= SharedN)\n            break;\n        value sum = SharedA + SharedB;\n        SharedA = SharedB;\n        SharedB = sum;\n        ++SharedI;\n    }\n}\n\n//! Root function\ntemplate <class M>\nvalue SharedSerialFib(int n) {\n    SharedA = 0;\n    SharedB = 1;\n    SharedI = 1;\n    SharedN = n;\n    M mutex;\n    parallel_for(oneapi::tbb::blocked_range<int>(0, 4, 1), SharedSerialFibBody<M>(mutex));\n    return SharedB;\n}\n\n// *** Serial shared by concurrent hash map *** //\n\n//! Hash comparer\nstruct IntHashCompare {\n    bool equal(const int j, const int k) const {\n        return j == k;\n    }\n    std::size_t hash(const int k) const {\n        return (std::size_t)k;\n    }\n};\n//! NumbersTable type based on concurrent_hash_map\ntypedef oneapi::tbb::concurrent_hash_map<int, value, IntHashCompare> NumbersTable;\n//! task for serial method using shared concurrent_hash_map\nclass ConcurrentHashSerialFibTask {\n    NumbersTable &Fib;\n    int my_n;\n\npublic:\n    //! constructor\n    ConcurrentHashSerialFibTask(NumbersTable &cht, int n) : Fib(cht), my_n(n) {}\n    //! executing task\n    void operator()() const {\n        for (int i = 2; i <= my_n; ++i) { // there is no difference in to recycle or to make loop\n            NumbersTable::const_accessor f1, f2; // same as iterators\n            if (!Fib.find(f1, i - 1) || !Fib.find(f2, i - 2)) {\n                // Something is seriously wrong, because i-1 and i-2 must have been inserted\n                // earlier by this thread or another thread.\n                assert(0);\n            }\n            value sum = f1->second + f2->second;\n            NumbersTable::const_accessor fsum;\n            Fib.insert(fsum, std::make_pair(i, sum)); // inserting\n            assert(fsum->second == sum); // check value\n        }\n    }\n};\n\n//! Root function\nvalue ConcurrentHashSerialFib(int n) {\n    NumbersTable Fib;\n    bool okay;\n    okay = Fib.insert(std::make_pair(0, 0));\n    assert(okay); // assign initial values\n    okay = Fib.insert(std::make_pair(1, 1));\n    assert(okay);\n\n    // task_list list;\n    oneapi::tbb::task_group tg;\n    // allocate tasks\n    tg.run(ConcurrentHashSerialFibTask(Fib, n));\n    tg.run(ConcurrentHashSerialFibTask(Fib, n));\n    tg.wait();\n    NumbersTable::const_accessor fresult;\n    okay = Fib.find(fresult, n);\n    assert(okay);\n    return fresult->second;\n}\n\n// *** Queue with parallel_pipeline *** //\n\ntypedef oneapi::tbb::concurrent_queue<Matrix2x2> queue_t;\nnamespace parallel_pipeline_ns {\nstd::atomic<int> N; //< index of Fibonacci number minus 1\nqueue_t Queue;\n} // namespace parallel_pipeline_ns\n\n//! functor to fills queue\nstruct InputFunc {\n    InputFunc() {}\n    queue_t *operator()(oneapi::tbb::flow_control &fc) const {\n        using namespace parallel_pipeline_ns;\n\n        int n = --N;\n        if (n <= 0) {\n            fc.stop();\n            return nullptr;\n        }\n        Queue.push(Matrix1110);\n        return &Queue;\n    }\n};\n//! functor to process queue\nstruct MultiplyFunc {\n    MultiplyFunc() {}\n    void operator()(queue_t *queue) const {\n        //concurrent_queue<Matrix2x2> &Queue = *static_cast<concurrent_queue<Matrix2x2> *>(p);\n        Matrix2x2 m1, m2;\n        // get two elements\n        while (!queue->try_pop(m1))\n            yield();\n        while (!queue->try_pop(m2))\n            yield();\n        m1 = m1 * m2; // process them\n        queue->push(m1); // and push back\n    }\n};\n//! Root function\nvalue ParallelPipeFib(int n) {\n    using namespace parallel_pipeline_ns;\n\n    N = n - 1;\n    Queue.push(Matrix1110);\n\n    oneapi::tbb::parallel_pipeline(\n        n,\n        oneapi::tbb::make_filter<void, queue_t *>(oneapi::tbb::filter_mode::parallel, InputFunc()) &\n            oneapi::tbb::make_filter<queue_t *, void>(oneapi::tbb::filter_mode::parallel,\n                                                      MultiplyFunc()));\n\n    assert(Queue.unsafe_size() == 1);\n    Matrix2x2 M;\n    bool result = Queue.try_pop(M); // get last element\n    assert(result);\n    value res = M.v[0][0]; // get value\n    Queue.clear();\n    return res;\n}\n\n// *** parallel_reduce *** //\n\n//! Functor for parallel_reduce\nstruct parallel_reduceFibBody {\n    Matrix2x2 sum;\n    int split_flag; //< flag to make one less operation for split bodies\n    //! Constructor fills sum with initial matrix\n    parallel_reduceFibBody() : sum(Matrix1110), split_flag(0) {}\n    //! Splitting constructor\n    parallel_reduceFibBody(parallel_reduceFibBody &other, oneapi::tbb::split)\n            : sum(Matrix1110),\n              split_flag(1 /*note that it is split*/) {}\n    //! Join point\n    void join(parallel_reduceFibBody &s) {\n        sum = sum * s.sum;\n    }\n    //! Process multiplications\n    void operator()(const oneapi::tbb::blocked_range<int> &r) {\n        for (int k = r.begin() + split_flag; k < r.end(); ++k)\n            sum = sum * Matrix1110;\n        split_flag = 0; // reset flag, because this method can be reused for next range\n    }\n};\n//! Root function\nvalue parallel_reduceFib(int n) {\n    parallel_reduceFibBody b;\n    oneapi::tbb::parallel_reduce(oneapi::tbb::blocked_range<int>(2, n, 3),\n                                 b); // do parallel reduce on range [2, n) for b\n    return b.sum.v[0][0];\n}\n\n// *** parallel_scan *** //\n\n//! Functor for parallel_scan\nstruct parallel_scanFibBody {\n    /** Though parallel_scan is usually used to accumulate running sums,\n        it can be used to accumulate running products too. */\n    Matrix2x2 product;\n    /** Pointer to output sequence */\n    value *const output;\n    //! Constructor sets product to identity matrix\n    parallel_scanFibBody(value *output_) : product(MatrixIdentity), output(output_) {}\n    //! Splitting constructor\n    parallel_scanFibBody(parallel_scanFibBody &b, oneapi::tbb::split)\n            : product(MatrixIdentity),\n              output(b.output) {}\n    //! Method for merging summary information from a, which was split off from *this, into *this.\n    void reverse_join(parallel_scanFibBody &a) {\n        // When using non-commutative reduction operation, reverse_join\n        // should put argument \"a\" on the left side of the operation.\n        // The reversal from the argument order is why the method is\n        // called \"reverse_join\" instead of \"join\".\n        product = a.product * product;\n    }\n    //! Method for assigning final result back to original body.\n    void assign(parallel_scanFibBody &b) {\n        product = b.product;\n    }\n    //! Compute matrix running product.\n    /** Tag indicates whether is is the final scan over the range, or\n        just a helper \"prescan\" that is computing a partial reduction. */\n    template <typename Tag>\n    void operator()(const oneapi::tbb::blocked_range<int> &r, Tag tag) {\n        for (int k = r.begin(); k < r.end(); ++k) {\n            // Code performs an \"exclusive\" scan, which outputs a value *before* updating the product.\n            // For an \"inclusive\" scan, output the value after the update.\n            if (tag.is_final_scan())\n                output[k] = product.v[0][1];\n            product = product * Matrix1110;\n        }\n    }\n};\n//! Root function\nvalue parallel_scanFib(int n) {\n    value *output = new value[n];\n    parallel_scanFibBody b(output);\n    oneapi::tbb::parallel_scan(oneapi::tbb::blocked_range<int>(0, n, 3), b);\n    // output[0..n-1] now contains the Fibonacci sequence (modulo integer wrap-around).\n    // Check the last two values for correctness.\n    assert(n < 2 || output[n - 2] + output[n - 1] == b.product.v[0][1]);\n    delete[] output;\n    return b.product.v[0][1];\n}\n\n/////////////////////////// Main ////////////////////////////////////////////////////\n\n//! A closed range of int.\nstruct IntRange {\n    int low;\n    int high;\n    void set_from_string(const char *s);\n    IntRange(int low_, int high_) : low(low_), high(high_) {}\n};\n\nvoid IntRange::set_from_string(const char *s) {\n    char *end;\n    high = low = strtol(s, &end, 0);\n    switch (*end) {\n        case ':': high = strtol(end + 1, nullptr, 0); break;\n        case '\\0': break;\n        default: printf(\"unexpected character = %c\\n\", *end);\n    }\n}\n\n//! Tick count for start\nstatic oneapi::tbb::tick_count t0;\n\n//! Verbose output flag\nstatic bool Verbose = false;\n\ntypedef value (*MeasureFunc)(int);\n//! Measure ticks count in loop [2..n]\nvalue Measure(const char *name, MeasureFunc func, int n) {\n    value result;\n    if (Verbose)\n        printf(\"%s\", name);\n    t0 = oneapi::tbb::tick_count::now();\n    for (int number = 2; number <= n; number++)\n        result = func(number);\n    if (Verbose)\n        printf(\"\\t- in %f msec\\n\", (oneapi::tbb::tick_count::now() - t0).seconds() * 1000);\n    return result;\n}\n\n//! program entry\nint main(int argc, char *argv[]) {\n    if (argc > 1)\n        Verbose = true;\n    int NumbersCount = argc > 1 ? strtol(argv[1], nullptr, 0) : 500;\n    IntRange NThread(1, 4); // Number of threads to use.\n    if (argc > 2)\n        NThread.set_from_string(argv[2]);\n    unsigned long ntrial = argc > 3 ? (unsigned long)strtoul(argv[3], nullptr, 0) : 1;\n    value result, sum;\n\n    if (Verbose)\n        printf(\"Fibonacci numbers example. Generating %d numbers..\\n\", NumbersCount);\n\n    result = Measure(\"Serial loop\", SerialFib, NumbersCount);\n    sum = Measure(\"Serial matrix\", SerialMatrixFib, NumbersCount);\n    assert(result == sum);\n    sum = Measure(\"Serial vector\", SerialVectorFib, NumbersCount);\n    assert(result == sum);\n    sum = Measure(\"Serial queue\", SerialQueueFib, NumbersCount);\n    assert(result == sum);\n    // now in parallel\n    for (unsigned long i = 0; i < ntrial; ++i) {\n        for (int threads = NThread.low; threads <= NThread.high; threads *= 2) {\n            oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism,\n                                          threads);\n            if (Verbose)\n                printf(\"\\nThreads number is %d\\n\", threads);\n\n            sum = Measure(\"Shared serial (mutex)\\t\", SharedSerialFib<std::mutex>, NumbersCount);\n            assert(result == sum);\n            sum = Measure(\"Shared serial (spin_mutex)\",\n                          SharedSerialFib<oneapi::tbb::spin_mutex>,\n                          NumbersCount);\n            assert(result == sum);\n            sum = Measure(\"Shared serial (queuing_mutex)\",\n                          SharedSerialFib<oneapi::tbb::queuing_mutex>,\n                          NumbersCount);\n            assert(result == sum);\n            sum = Measure(\"Shared serial (Conc.HashTable)\", ConcurrentHashSerialFib, NumbersCount);\n            assert(result == sum);\n            sum = Measure(\"Parallel pipe/queue\\t\", ParallelPipeFib, NumbersCount);\n            assert(result == sum);\n            sum = Measure(\"Parallel reduce\\t\\t\", parallel_reduceFib, NumbersCount);\n            assert(result == sum);\n            sum = Measure(\"Parallel scan\\t\\t\", parallel_scanFib, NumbersCount);\n            assert(result == sum);\n        }\n\n#ifdef __GNUC__\n        if (Verbose)\n            printf(\"Fibonacci number #%d modulo 2^64 is %lld\\n\\n\", NumbersCount, result);\n#else\n        if (Verbose)\n            printf(\"Fibonacci number #%d modulo 2^64 is %I64d\\n\\n\", NumbersCount, result);\n#endif\n    }\n    if (!Verbose)\n        printf(\"TEST PASSED\\n\");\n    // flush to prevent bufferization on exit\n    fflush(stdout);\n    return 0;\n}\n\n// Utils\n\nvoid Matrix2x2Multiply(const value a[2][2], const value b[2][2], value c[2][2]) {\n    for (int i = 0; i <= 1; i++)\n        for (int j = 0; j <= 1; j++)\n            c[i][j] = a[i][0] * b[0][j] + a[i][1] * b[1][j];\n}\n\nMatrix2x2 Matrix2x2::operator*(const Matrix2x2 &to) const {\n    Matrix2x2 result;\n    Matrix2x2Multiply(v, to.v, result.v);\n    return result;\n}\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/blocked_nd_range.h",
    "content": "/*\n    Copyright (c) 2017-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_blocked_nd_range_H\n#define __TBB_blocked_nd_range_H\n\n#include <algorithm>    // std::any_of\n#include <array>\n#include <cstddef>\n#include <type_traits>  // std::is_same, std::enable_if\n\n#include \"detail/_config.h\"\n#include \"detail/_template_helpers.h\" // index_sequence, make_index_sequence\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_range_common.h\"\n\n#include \"blocked_range.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n/*\n    The blocked_nd_range_impl uses make_index_sequence<N> to automatically generate a ctor with\n    exactly N arguments of the type tbb::blocked_range<Value>. Such ctor provides an opportunity\n    to use braced-init-list parameters to initialize each dimension.\n    Use of parameters, whose representation is a braced-init-list, but they're not\n    std::initializer_list or a reference to one, produces a non-deduced context\n    within template argument deduction.\n\n    NOTE: blocked_nd_range must be exactly a templated alias to the blocked_nd_range_impl\n    (and not e.g. a derived class), otherwise it would need to declare its own ctor\n    facing the same problem that the impl class solves.\n*/\n\ntemplate<typename Value, unsigned int N, typename = detail::make_index_sequence<N>>\nclass blocked_nd_range_impl;\n\ntemplate<typename Value, unsigned int N, std::size_t... Is>\nclass blocked_nd_range_impl<Value, N, detail::index_sequence<Is...>> {\npublic:\n    //! Type of a value.\n    using value_type = Value;\n\n    //! Type of a dimension range.\n    using dim_range_type = tbb::blocked_range<value_type>;\n\n    //! Type for the size of a range.\n    using size_type = typename dim_range_type::size_type;\n\n    blocked_nd_range_impl() = delete;\n\n    //! Constructs N-dimensional range over N half-open intervals each represented as tbb::blocked_range<Value>.\n    blocked_nd_range_impl(const indexed_t<dim_range_type, Is>&... args) : my_dims{ {args...} } {}\n\n#if __clang__ && __TBB_CLANG_VERSION < 140000\n    // On clang prior to version 14.0.0, passing a single braced init list to the constructor of blocked_nd_range<T, 1>\n    // matches better on the C array constructor and generates compile-time error because of unexpected size\n    // Adding constraints for this constructor to force the compiler to drop it from overload resolution if the size is unexpected\n    template <unsigned int M, typename = typename std::enable_if<M == N>::type>\n    blocked_nd_range_impl(const value_type (&size)[M], size_type grainsize = 1) :\n#else\n    blocked_nd_range_impl(const value_type (&size)[N], size_type grainsize = 1) :\n#endif\n        my_dims { dim_range_type(0, size[Is], grainsize)... } {}\n\n    //! Dimensionality of a range.\n    static constexpr unsigned int dim_count() { return N; }\n\n    //! Range in certain dimension.\n    const dim_range_type& dim(unsigned int dimension) const {\n        __TBB_ASSERT(dimension < N, \"out of bound\");\n        return my_dims[dimension];\n    }\n\n    //------------------------------------------------------------------------\n    // Methods that implement Range concept\n    //------------------------------------------------------------------------\n\n    //! True if at least one dimension is empty.\n    bool empty() const {\n        return std::any_of(my_dims.begin(), my_dims.end(), [](const dim_range_type& d) {\n            return d.empty();\n        });\n    }\n\n    //! True if at least one dimension is divisible.\n    bool is_divisible() const {\n        return std::any_of(my_dims.begin(), my_dims.end(), [](const dim_range_type& d) {\n            return d.is_divisible();\n        });\n    }\n\n    blocked_nd_range_impl(blocked_nd_range_impl& r, proportional_split proportion) : my_dims(r.my_dims) {\n        do_split(r, proportion);\n    }\n\n    blocked_nd_range_impl(blocked_nd_range_impl& r, split proportion) : my_dims(r.my_dims) {\n        do_split(r, proportion);\n    }\n\nprivate:\n    static_assert(N != 0, \"zero dimensional blocked_nd_range can't be constructed\");\n\n    //! Ranges in each dimension.\n    std::array<dim_range_type, N> my_dims;\n\n    template<typename split_type>\n    void do_split(blocked_nd_range_impl& r, split_type proportion) {\n        static_assert((std::is_same<split_type, split>::value || std::is_same<split_type, proportional_split>::value),\n                      \"type of split object is incorrect\");\n        __TBB_ASSERT(r.is_divisible(), \"can't split not divisible range\");\n\n        auto my_it = std::max_element(my_dims.begin(), my_dims.end(), [](const dim_range_type& first, const dim_range_type& second) {\n            return (first.size() * double(second.grainsize()) < second.size() * double(first.grainsize()));\n        });\n\n        auto r_it = r.my_dims.begin() + (my_it - my_dims.begin());\n\n        my_it->my_begin = dim_range_type::do_split(*r_it, proportion);\n\n        // (!(my_it->my_begin < r_it->my_end) && !(r_it->my_end < my_it->my_begin)) equals to\n        // (my_it->my_begin == r_it->my_end), but we can't use operator== due to Value concept\n        __TBB_ASSERT(!(my_it->my_begin < r_it->my_end) && !(r_it->my_end < my_it->my_begin),\n                     \"blocked_range has been split incorrectly\");\n    }\n};\n\ntemplate<typename Value, unsigned int N>\n         __TBB_requires(blocked_range_value<Value>)\nclass blocked_nd_range : public blocked_nd_range_impl<Value, N> {\n    using base = blocked_nd_range_impl<Value, N>;\n    // Making constructors of base class visible\n    using base::base;\n};\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT && __TBB_PREVIEW_BLOCKED_ND_RANGE_DEDUCTION_GUIDES\n// blocked_nd_range(const dim_range_type& dim0, const dim_range_type& dim1, ...)\n// while the arguments are passed as braced-init-lists\n// Works only for 2 and more arguments since the deduction from\n// single braced-init-list or single C-array argument prefers the multi-dimensional range\n// Only braced-init-lists of size 2 and 3 are allowed since dim_range_type may only\n// be constructed from 2 or 3 arguments\ntemplate <typename Value, unsigned int... Ns,\n          typename = std::enable_if_t<sizeof...(Ns) >= 2>,\n          typename = std::enable_if_t<(... && (Ns == 2 || Ns == 3))>>\nblocked_nd_range(const Value (&... dim)[Ns])\n-> blocked_nd_range<Value, sizeof...(Ns)>;\n\n// blocked_nd_range(const dim_range_type& dim0, const dim_range_type& dim1, ...)\n// while the arguments are passed as blocked_range objects of the same type\ntemplate <typename Value, typename... Values,\n          typename = std::enable_if_t<(... && std::is_same_v<Value, Values>)>>\nblocked_nd_range(blocked_range<Value>, blocked_range<Values>...)\n-> blocked_nd_range<Value, 1 + sizeof...(Values)>;\n\n// blocked_nd_range(const value_type (&size)[N], size_type grainsize = 1)\ntemplate <typename Value, unsigned int N>\nblocked_nd_range(const Value (&)[N], typename blocked_nd_range<Value, N>::size_type = 1)\n-> blocked_nd_range<Value, N>;\n\n// blocked_nd_range(blocked_nd_range<Value, N>&, oneapi::tbb::split)\ntemplate <typename Value, unsigned int N>\nblocked_nd_range(blocked_nd_range<Value, N>, oneapi::tbb::split)\n-> blocked_nd_range<Value, N>;\n\n// blocked_nd_range(blocked_nd_range<Value, N>&, oneapi::tbb::proportional_split)\ntemplate <typename Value, unsigned int N>\nblocked_nd_range(blocked_nd_range<Value, N>, oneapi::tbb::proportional_split)\n-> blocked_nd_range<Value, N>;\n\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT && __TBB_PREVIEW_BLOCKED_ND_RANGE_DEDUCTION_GUIDES\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::blocked_nd_range;\n} // namespace v1\n} // namespace tbb\n\n#endif /* __TBB_blocked_nd_range_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/blocked_range.h",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_blocked_range_H\n#define __TBB_blocked_range_H\n\n#include <cstddef>\n\n#include \"detail/_range_common.h\"\n#include \"detail/_namespace_injection.h\"\n\n#include \"version.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n/** \\page range_req Requirements on range concept\n    Class \\c R implementing the concept of range must define:\n    - \\code R::R( const R& ); \\endcode               Copy constructor\n    - \\code R::~R(); \\endcode                        Destructor\n    - \\code bool R::is_divisible() const; \\endcode   True if range can be partitioned into two subranges\n    - \\code bool R::empty() const; \\endcode          True if range is empty\n    - \\code R::R( R& r, split ); \\endcode            Split range \\c r into two subranges.\n**/\n\n//! A range over which to iterate.\n/** @ingroup algorithms */\ntemplate<typename Value>\n    __TBB_requires(blocked_range_value<Value>)\nclass blocked_range {\npublic:\n    //! Type of a value\n    /** Called a const_iterator for sake of algorithms that need to treat a blocked_range\n        as an STL container. */\n    using const_iterator = Value;\n\n    //! Type for size of a range\n    using size_type = std::size_t;\n\n    //! Construct range over half-open interval [begin,end), with the given grainsize.\n    blocked_range( Value begin_, Value end_, size_type grainsize_=1 ) :\n        my_end(end_), my_begin(begin_), my_grainsize(grainsize_)\n    {\n        __TBB_ASSERT( my_grainsize>0, \"grainsize must be positive\" );\n    }\n\n    //! Beginning of range.\n    const_iterator begin() const { return my_begin; }\n\n    //! One past last value in range.\n    const_iterator end() const { return my_end; }\n\n    //! Size of the range\n    /** Unspecified if end()<begin(). */\n    size_type size() const {\n        __TBB_ASSERT( !(end()<begin()), \"size() unspecified if end()<begin()\" );\n        return size_type(my_end-my_begin);\n    }\n\n    //! The grain size for this range.\n    size_type grainsize() const { return my_grainsize; }\n\n    //------------------------------------------------------------------------\n    // Methods that implement Range concept\n    //------------------------------------------------------------------------\n\n    //! True if range is empty.\n    bool empty() const { return !(my_begin<my_end); }\n\n    //! True if range is divisible.\n    /** Unspecified if end()<begin(). */\n    bool is_divisible() const { return my_grainsize<size(); }\n\n    //! Split range.\n    /** The new Range *this has the second part, the old range r has the first part.\n        Unspecified if end()<begin() or !is_divisible(). */\n    blocked_range( blocked_range& r, split ) :\n        my_end(r.my_end),\n        my_begin(do_split(r, split())),\n        my_grainsize(r.my_grainsize)\n    {\n        // only comparison 'less than' is required from values of blocked_range objects\n        __TBB_ASSERT( !(my_begin < r.my_end) && !(r.my_end < my_begin), \"blocked_range has been split incorrectly\" );\n    }\n\n    //! Split range.\n    /** The new Range *this has the second part split according to specified proportion, the old range r has the first part.\n        Unspecified if end()<begin() or !is_divisible(). */\n    blocked_range( blocked_range& r, proportional_split& proportion ) :\n        my_end(r.my_end),\n        my_begin(do_split(r, proportion)),\n        my_grainsize(r.my_grainsize)\n    {\n        // only comparison 'less than' is required from values of blocked_range objects\n        __TBB_ASSERT( !(my_begin < r.my_end) && !(r.my_end < my_begin), \"blocked_range has been split incorrectly\" );\n    }\n\nprivate:\n    /** NOTE: my_end MUST be declared before my_begin, otherwise the splitting constructor will break. */\n    Value my_end;\n    Value my_begin;\n    size_type my_grainsize;\n\n    //! Auxiliary function used by the splitting constructor.\n    static Value do_split( blocked_range& r, split )\n    {\n        __TBB_ASSERT( r.is_divisible(), \"cannot split blocked_range that is not divisible\" );\n        Value middle = r.my_begin + (r.my_end - r.my_begin) / 2u;\n        r.my_end = middle;\n        return middle;\n    }\n\n    static Value do_split( blocked_range& r, proportional_split& proportion )\n    {\n        __TBB_ASSERT( r.is_divisible(), \"cannot split blocked_range that is not divisible\" );\n\n        // usage of 32-bit floating point arithmetic is not enough to handle ranges of\n        // more than 2^24 iterations accurately. However, even on ranges with 2^64\n        // iterations the computational error approximately equals to 0.000001% which\n        // makes small impact on uniform distribution of such range's iterations (assuming\n        // all iterations take equal time to complete). See 'test_partitioner_whitebox'\n        // for implementation of an exact split algorithm\n        size_type right_part = size_type(float(r.size()) * float(proportion.right())\n                                         / float(proportion.left() + proportion.right()) + 0.5f);\n        return r.my_end = Value(r.my_end - right_part);\n    }\n\n    template<typename RowValue, typename ColValue>\n        __TBB_requires(blocked_range_value<RowValue> &&\n                       blocked_range_value<ColValue>)\n    friend class blocked_range2d;\n\n    template<typename RowValue, typename ColValue, typename PageValue>\n        __TBB_requires(blocked_range_value<RowValue> &&\n                       blocked_range_value<ColValue> &&\n                       blocked_range_value<PageValue>)\n    friend class blocked_range3d;\n\n    template<typename DimValue, unsigned int N, typename>\n    friend class blocked_nd_range_impl;\n};\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::blocked_range;\n// Split types\nusing detail::split;\nusing detail::proportional_split;\n} // namespace v1\n\n} // namespace tbb\n\n#endif /* __TBB_blocked_range_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/blocked_range2d.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_blocked_range2d_H\n#define __TBB_blocked_range2d_H\n\n#include <cstddef>\n\n#include \"detail/_config.h\"\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_range_common.h\"\n\n#include \"blocked_range.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n//! A 2-dimensional range that models the Range concept.\n/** @ingroup algorithms */\ntemplate<typename RowValue, typename ColValue = RowValue>\n    __TBB_requires(blocked_range_value<RowValue> &&\n                   blocked_range_value<ColValue>)\nclass blocked_range2d {\npublic:\n    //! Type for size of an iteration range\n    using row_range_type = blocked_range<RowValue>;\n    using col_range_type = blocked_range<ColValue>;\n\nprivate:\n    row_range_type my_rows;\n    col_range_type my_cols;\n\npublic:\n    blocked_range2d( RowValue row_begin, RowValue row_end, typename row_range_type::size_type row_grainsize,\n                     ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_grainsize ) :\n        my_rows(row_begin,row_end,row_grainsize),\n        my_cols(col_begin,col_end,col_grainsize)\n    {}\n\n    blocked_range2d( RowValue row_begin, RowValue row_end,\n                     ColValue col_begin, ColValue col_end ) :\n        my_rows(row_begin,row_end),\n        my_cols(col_begin,col_end)\n    {}\n\n    //! True if range is empty\n    bool empty() const {\n        // Range is empty if at least one dimension is empty.\n        return my_rows.empty() || my_cols.empty();\n    }\n\n    //! True if range is divisible into two pieces.\n    bool is_divisible() const {\n        return my_rows.is_divisible() || my_cols.is_divisible();\n    }\n\n    blocked_range2d( blocked_range2d& r, split ) :\n        my_rows(r.my_rows),\n        my_cols(r.my_cols)\n    {\n        split split_obj;\n        do_split(r, split_obj);\n    }\n\n    blocked_range2d( blocked_range2d& r, proportional_split& proportion ) :\n        my_rows(r.my_rows),\n        my_cols(r.my_cols)\n    {\n        do_split(r, proportion);\n    }\n\n    //! The rows of the iteration space\n    const row_range_type& rows() const { return my_rows; }\n\n    //! The columns of the iteration space\n    const col_range_type& cols() const { return my_cols; }\n\nprivate:\n    template <typename Split>\n    void do_split( blocked_range2d& r, Split& split_obj ) {\n        if ( my_rows.size()*double(my_cols.grainsize()) < my_cols.size()*double(my_rows.grainsize()) ) {\n            my_cols.my_begin = col_range_type::do_split(r.my_cols, split_obj);\n        } else {\n            my_rows.my_begin = row_range_type::do_split(r.my_rows, split_obj);\n        }\n    }\n};\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::blocked_range2d;\n} // namespace v1\n} // namespace tbb\n\n#endif /* __TBB_blocked_range2d_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/blocked_range3d.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_blocked_range3d_H\n#define __TBB_blocked_range3d_H\n\n#include <cstddef>\n\n#include \"detail/_config.h\"\n#include \"detail/_namespace_injection.h\"\n\n#include \"blocked_range.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n//! A 3-dimensional range that models the Range concept.\n/** @ingroup algorithms */\ntemplate<typename PageValue, typename RowValue = PageValue, typename ColValue = RowValue>\n    __TBB_requires(blocked_range_value<PageValue> &&\n                   blocked_range_value<RowValue> &&\n                   blocked_range_value<ColValue>)\nclass blocked_range3d {\npublic:\n    //! Type for size of an iteration range\n    using page_range_type = blocked_range<PageValue>;\n    using row_range_type = blocked_range<RowValue>;\n    using col_range_type = blocked_range<ColValue>;\n\nprivate:\n    page_range_type my_pages;\n    row_range_type  my_rows;\n    col_range_type  my_cols;\n\npublic:\n\n    blocked_range3d( PageValue page_begin, PageValue page_end,\n                     RowValue  row_begin,  RowValue row_end,\n                     ColValue  col_begin,  ColValue col_end ) :\n        my_pages(page_begin,page_end),\n        my_rows(row_begin,row_end),\n        my_cols(col_begin,col_end)\n    {}\n\n    blocked_range3d( PageValue page_begin, PageValue page_end, typename page_range_type::size_type page_grainsize,\n                     RowValue  row_begin,  RowValue row_end,   typename row_range_type::size_type row_grainsize,\n                     ColValue  col_begin,  ColValue col_end,   typename col_range_type::size_type col_grainsize ) :\n        my_pages(page_begin,page_end,page_grainsize),\n        my_rows(row_begin,row_end,row_grainsize),\n        my_cols(col_begin,col_end,col_grainsize)\n    {}\n\n    //! True if range is empty\n    bool empty() const {\n        // Range is empty if at least one dimension is empty.\n        return my_pages.empty() || my_rows.empty() || my_cols.empty();\n    }\n\n    //! True if range is divisible into two pieces.\n    bool is_divisible() const {\n        return  my_pages.is_divisible() || my_rows.is_divisible() || my_cols.is_divisible();\n    }\n\n    blocked_range3d( blocked_range3d& r, split split_obj ) :\n        my_pages(r.my_pages),\n        my_rows(r.my_rows),\n        my_cols(r.my_cols)\n    {\n        do_split(r, split_obj);\n    }\n\n    blocked_range3d( blocked_range3d& r, proportional_split& proportion ) :\n        my_pages(r.my_pages),\n        my_rows(r.my_rows),\n        my_cols(r.my_cols)\n    {\n        do_split(r, proportion);\n    }\n\n    //! The pages of the iteration space\n    const page_range_type& pages() const { return my_pages; }\n\n    //! The rows of the iteration space\n    const row_range_type& rows() const { return my_rows; }\n\n    //! The columns of the iteration space\n    const col_range_type& cols() const { return my_cols; }\n\nprivate:\n    template <typename Split>\n    void do_split( blocked_range3d& r, Split& split_obj) {\n        if ( my_pages.size()*double(my_rows.grainsize()) < my_rows.size()*double(my_pages.grainsize()) ) {\n            if ( my_rows.size()*double(my_cols.grainsize()) < my_cols.size()*double(my_rows.grainsize()) ) {\n                my_cols.my_begin = col_range_type::do_split(r.my_cols, split_obj);\n            } else {\n                my_rows.my_begin = row_range_type::do_split(r.my_rows, split_obj);\n            }\n        } else {\n            if ( my_pages.size()*double(my_cols.grainsize()) < my_cols.size()*double(my_pages.grainsize()) ) {\n                my_cols.my_begin = col_range_type::do_split(r.my_cols, split_obj);\n            } else {\n                my_pages.my_begin = page_range_type::do_split(r.my_pages, split_obj);\n            }\n        }\n    }\n};\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::blocked_range3d;\n} // namespace v1\n} // namespace tbb\n\n#endif /* __TBB_blocked_range3d_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/blocked_rangeNd.h",
    "content": "/*\n    Copyright (c) 2017-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_blocked_rangeNd_H\n#define __TBB_blocked_rangeNd_H\n\n#if !TBB_PREVIEW_BLOCKED_RANGE_ND\n    #error Set TBB_PREVIEW_BLOCKED_RANGE_ND to include blocked_rangeNd.h\n#endif\n\n#include <algorithm>    // std::any_of\n#include <array>\n#include <cstddef>\n#include <type_traits>  // std::is_same, std::enable_if\n\n#include \"detail/_config.h\"\n#include \"detail/_template_helpers.h\" // index_sequence, make_index_sequence\n#include \"detail/_range_common.h\"\n\n#include \"blocked_range.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n/*\n    The blocked_rangeNd_impl uses make_index_sequence<N> to automatically generate a ctor with\n    exactly N arguments of the type tbb::blocked_range<Value>. Such ctor provides an opportunity\n    to use braced-init-list parameters to initialize each dimension.\n    Use of parameters, whose representation is a braced-init-list, but they're not\n    std::initializer_list or a reference to one, produces a non-deduced context\n    within template argument deduction.\n\n    NOTE: blocked_rangeNd must be exactly a templated alias to the blocked_rangeNd_impl\n    (and not e.g. a derived class), otherwise it would need to declare its own ctor\n    facing the same problem that the impl class solves.\n*/\n\ntemplate<typename Value, unsigned int N, typename = detail::make_index_sequence<N>>\n    __TBB_requires(blocked_range_value<Value>)\nclass blocked_rangeNd_impl;\n\ntemplate<typename Value, unsigned int N, std::size_t... Is>\n    __TBB_requires(blocked_range_value<Value>)\nclass blocked_rangeNd_impl<Value, N, detail::index_sequence<Is...>> {\npublic:\n    //! Type of a value.\n    using value_type = Value;\n\nprivate:\n    //! Helper type to construct range with N tbb::blocked_range<value_type> objects.\n    template<std::size_t>\n    using dim_type_helper = tbb::blocked_range<value_type>;\n\npublic:\n    blocked_rangeNd_impl() = delete;\n\n    //! Constructs N-dimensional range over N half-open intervals each represented as tbb::blocked_range<Value>.\n    blocked_rangeNd_impl(const dim_type_helper<Is>&... args) : my_dims{ {args...} } {}\n\n    //! Dimensionality of a range.\n    static constexpr unsigned int ndims() { return N; }\n\n    //! Range in certain dimension.\n    const tbb::blocked_range<value_type>& dim(unsigned int dimension) const {\n        __TBB_ASSERT(dimension < N, \"out of bound\");\n        return my_dims[dimension];\n    }\n\n    //------------------------------------------------------------------------\n    // Methods that implement Range concept\n    //------------------------------------------------------------------------\n\n    //! True if at least one dimension is empty.\n    bool empty() const {\n        return std::any_of(my_dims.begin(), my_dims.end(), [](const tbb::blocked_range<value_type>& d) {\n            return d.empty();\n        });\n    }\n\n    //! True if at least one dimension is divisible.\n    bool is_divisible() const {\n        return std::any_of(my_dims.begin(), my_dims.end(), [](const tbb::blocked_range<value_type>& d) {\n            return d.is_divisible();\n        });\n    }\n\n    blocked_rangeNd_impl(blocked_rangeNd_impl& r, proportional_split proportion) : my_dims(r.my_dims) {\n        do_split(r, proportion);\n    }\n\n    blocked_rangeNd_impl(blocked_rangeNd_impl& r, split proportion) : my_dims(r.my_dims) {\n        do_split(r, proportion);\n    }\n\nprivate:\n    static_assert(N != 0, \"zero dimensional blocked_rangeNd can't be constructed\");\n\n    //! Ranges in each dimension.\n    std::array<tbb::blocked_range<value_type>, N> my_dims;\n\n    template<typename split_type>\n    void do_split(blocked_rangeNd_impl& r, split_type proportion) {\n        static_assert((std::is_same<split_type, split>::value || std::is_same<split_type, proportional_split>::value), \"type of split object is incorrect\");\n        __TBB_ASSERT(r.is_divisible(), \"can't split not divisible range\");\n\n        auto my_it = std::max_element(my_dims.begin(), my_dims.end(), [](const tbb::blocked_range<value_type>& first, const tbb::blocked_range<value_type>& second) {\n            return (first.size() * second.grainsize() < second.size() * first.grainsize());\n        });\n\n        auto r_it = r.my_dims.begin() + (my_it - my_dims.begin());\n\n        my_it->my_begin = tbb::blocked_range<value_type>::do_split(*r_it, proportion);\n\n        // (!(my_it->my_begin < r_it->my_end) && !(r_it->my_end < my_it->my_begin)) equals to\n        // (my_it->my_begin == r_it->my_end), but we can't use operator== due to Value concept\n        __TBB_ASSERT(!(my_it->my_begin < r_it->my_end) && !(r_it->my_end < my_it->my_begin),\n                     \"blocked_range has been split incorrectly\");\n    }\n};\n\ntemplate<typename Value, unsigned int N>\nusing blocked_rangeNd = blocked_rangeNd_impl<Value, N>;\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::blocked_rangeNd;\n} // namespace v1\n} // namespace tbb\n\n#endif /* __TBB_blocked_rangeNd_H */\n\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/cache_aligned_allocator.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_cache_aligned_allocator_H\n#define __TBB_cache_aligned_allocator_H\n\n#include \"detail/_utils.h\"\n#include \"detail/_namespace_injection.h\"\n#include <cstdlib>\n#include <utility>\n\n#if __TBB_CPP17_MEMORY_RESOURCE_PRESENT\n#include <memory_resource>\n#endif\n\nnamespace tbb {\nnamespace detail {\n\nnamespace r1 {\nTBB_EXPORT void*       __TBB_EXPORTED_FUNC cache_aligned_allocate(std::size_t size);\nTBB_EXPORT void        __TBB_EXPORTED_FUNC cache_aligned_deallocate(void* p);\nTBB_EXPORT std::size_t __TBB_EXPORTED_FUNC cache_line_size();\n}\n\nnamespace d1 {\n\ntemplate<typename T>\nclass cache_aligned_allocator {\npublic:\n    using value_type = T;\n    using propagate_on_container_move_assignment = std::true_type;\n\n    //! Always defined for TBB containers (supported since C++17 for std containers)\n    using is_always_equal = std::true_type;\n\n    cache_aligned_allocator() = default;\n    template<typename U> cache_aligned_allocator(const cache_aligned_allocator<U>&) noexcept {}\n\n    //! Allocate space for n objects, starting on a cache/sector line.\n    __TBB_nodiscard T* allocate(std::size_t n) {\n        return static_cast<T*>(r1::cache_aligned_allocate(n * sizeof(value_type)));\n    }\n\n    //! Free block of memory that starts on a cache line\n    void deallocate(T* p, std::size_t) {\n        r1::cache_aligned_deallocate(p);\n    }\n\n    //! Largest value for which method allocate might succeed.\n    std::size_t max_size() const noexcept {\n        return (~std::size_t(0) - r1::cache_line_size()) / sizeof(value_type);\n    }\n\n#if TBB_ALLOCATOR_TRAITS_BROKEN\n    using pointer = value_type*;\n    using const_pointer = const value_type*;\n    using reference = value_type&;\n    using const_reference = const value_type&;\n    using difference_type = std::ptrdiff_t;\n    using size_type = std::size_t;\n    template<typename U> struct rebind {\n        using other = cache_aligned_allocator<U>;\n    };\n    template<typename U, typename... Args>\n    void construct(U *p, Args&&... args)\n        { ::new (p) U(std::forward<Args>(args)...); }\n    void destroy(pointer p) { p->~value_type(); }\n    pointer address(reference x) const { return &x; }\n    const_pointer address(const_reference x) const { return &x; }\n#endif // TBB_ALLOCATOR_TRAITS_BROKEN\n};\n\n#if TBB_ALLOCATOR_TRAITS_BROKEN\n    template<>\n    class cache_aligned_allocator<void> {\n    public:\n        using pointer = void*;\n        using const_pointer = const void*;\n        using value_type = void;\n        template<typename U> struct rebind {\n            using other = cache_aligned_allocator<U>;\n        };\n    };\n#endif\n\ntemplate<typename T, typename U>\nbool operator==(const cache_aligned_allocator<T>&, const cache_aligned_allocator<U>&) noexcept { return true; }\n\n#if !__TBB_CPP20_COMPARISONS_PRESENT\ntemplate<typename T, typename U>\nbool operator!=(const cache_aligned_allocator<T>&, const cache_aligned_allocator<U>&) noexcept { return false; }\n#endif\n\n#if __TBB_CPP17_MEMORY_RESOURCE_PRESENT\n\n//! C++17 memory resource wrapper to ensure cache line size alignment\nclass cache_aligned_resource : public std::pmr::memory_resource {\npublic:\n    cache_aligned_resource() : cache_aligned_resource(std::pmr::get_default_resource()) {}\n    explicit cache_aligned_resource(std::pmr::memory_resource* upstream) : m_upstream(upstream) {}\n\n    std::pmr::memory_resource* upstream_resource() const {\n        return m_upstream;\n    }\n\nprivate:\n    //! We don't know what memory resource set. Use padding to guarantee alignment\n    void* do_allocate(std::size_t bytes, std::size_t alignment) override {\n        // TODO: make it common with tbb_allocator.cpp\n        std::size_t cache_line_alignment = correct_alignment(alignment);\n        std::size_t space = correct_size(bytes) + cache_line_alignment;\n        std::uintptr_t base = reinterpret_cast<std::uintptr_t>(m_upstream->allocate(space));\n        __TBB_ASSERT(base != 0, \"Upstream resource returned nullptr.\");\n\n        // Round up to the next cache line (align the base address)\n        std::uintptr_t result = (base + cache_line_alignment) & ~(cache_line_alignment - 1);\n        __TBB_ASSERT((result - base) >= sizeof(std::uintptr_t), \"Can`t store a base pointer to the header\");\n        __TBB_ASSERT(space - (result - base) >= bytes, \"Not enough space for the storage\");\n\n        // Record where block actually starts.\n        (reinterpret_cast<std::uintptr_t*>(result))[-1] = base;\n        return reinterpret_cast<void*>(result);\n    }\n\n    void do_deallocate(void* ptr, std::size_t bytes, std::size_t alignment) override {\n        if (ptr) {\n            // Recover where block actually starts\n            std::uintptr_t base = (reinterpret_cast<std::uintptr_t*>(ptr))[-1];\n            m_upstream->deallocate(reinterpret_cast<void*>(base), correct_size(bytes) + correct_alignment(alignment));\n        }\n    }\n\n    bool do_is_equal(const std::pmr::memory_resource& other) const noexcept override {\n        if (this == &other) { return true; }\n#if __TBB_USE_OPTIONAL_RTTI\n        const cache_aligned_resource* other_res = dynamic_cast<const cache_aligned_resource*>(&other);\n        return other_res && (upstream_resource() == other_res->upstream_resource());\n#else\n        return false;\n#endif\n    }\n\n    std::size_t correct_alignment(std::size_t alignment) {\n        __TBB_ASSERT(tbb::detail::is_power_of_two(alignment), \"Alignment is not a power of 2\");\n#if __TBB_CPP17_HW_INTERFERENCE_SIZE_PRESENT\n        std::size_t cache_line_size = std::hardware_destructive_interference_size;\n#else\n        std::size_t cache_line_size = r1::cache_line_size();\n#endif\n        return alignment < cache_line_size ? cache_line_size : alignment;\n    }\n\n    std::size_t correct_size(std::size_t bytes) {\n        // To handle the case, when small size requested. There could be not\n        // enough space to store the original pointer.\n        return bytes < sizeof(std::uintptr_t) ? sizeof(std::uintptr_t) : bytes;\n    }\n\n    std::pmr::memory_resource* m_upstream;\n};\n\n#endif // __TBB_CPP17_MEMORY_RESOURCE_PRESENT\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::cache_aligned_allocator;\n#if __TBB_CPP17_MEMORY_RESOURCE_PRESENT\nusing detail::d1::cache_aligned_resource;\n#endif\n} // namespace v1\n} // namespace tbb\n\n#endif /* __TBB_cache_aligned_allocator_H */\n\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/collaborative_call_once.h",
    "content": "/*\n    Copyright (c) 2021-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_collaborative_call_once_H\n#define __TBB_collaborative_call_once_H\n\n#include \"task_arena.h\"\n#include \"task_group.h\"\n\n#include <atomic>\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    // Suppress warning: structure was padded due to alignment specifier\n    #pragma warning (push)\n    #pragma warning (disable: 4324)\n#endif\n\ntemplate <typename F>\nclass collaborative_call_stack_task : public task {\n    const F& m_func;\n    wait_context& m_wait_ctx;\n\n    void finalize() {\n        m_wait_ctx.release();\n    }\n    task* execute(d1::execution_data&) override {\n        task* res = d2::task_ptr_or_nullptr(m_func);\n        finalize();\n        return res;\n    }\n    task* cancel(d1::execution_data&) override {\n        finalize();\n        return nullptr;\n    }\npublic:\n    collaborative_call_stack_task(const F& f, wait_context& wctx) : m_func(f), m_wait_ctx(wctx) {}\n};\n\nconstexpr std::uintptr_t collaborative_once_max_references = max_nfs_size;\nconstexpr std::uintptr_t collaborative_once_references_mask = collaborative_once_max_references-1;\n\nclass alignas(max_nfs_size) collaborative_once_runner : no_copy {\n\n    struct storage_t {\n        task_arena m_arena{ task_arena::attach{} };\n        wait_context m_wait_context{1};\n    };\n\n    std::atomic<std::int64_t> m_ref_count{0};\n    std::atomic<bool> m_is_ready{false};\n\n    // Storage with task_arena and wait_context must be initialized only by winner thread\n    union {\n        storage_t m_storage;\n    };\n\n    template<typename Fn>\n    void isolated_execute(Fn f) {\n        auto func = [f] {\n            f();\n           // delegate_base requires bool returning functor while isolate_within_arena ignores the result\n            return true;\n        };\n\n        delegated_function<decltype(func)> delegate(func);\n\n        r1::isolate_within_arena(delegate, reinterpret_cast<std::intptr_t>(this));\n    }\n\npublic:\n    class lifetime_guard : no_copy {\n        collaborative_once_runner& m_runner;\n    public:\n        lifetime_guard(collaborative_once_runner& r) : m_runner(r) {\n            m_runner.m_ref_count++;\n        }\n        ~lifetime_guard() {\n            m_runner.m_ref_count--;\n        }\n    };\n\n    collaborative_once_runner() {}\n\n    ~collaborative_once_runner() {\n        spin_wait_until_eq(m_ref_count, 0, std::memory_order_acquire);\n        if (m_is_ready.load(std::memory_order_relaxed)) {\n            m_storage.~storage_t();\n        }\n    }\n\n    std::uintptr_t to_bits() {\n        return reinterpret_cast<std::uintptr_t>(this);\n    }\n\n    static collaborative_once_runner* from_bits(std::uintptr_t bits) {\n        __TBB_ASSERT( (bits & collaborative_once_references_mask) == 0, \"invalid pointer, last log2(max_nfs_size) bits must be zero\" );\n        return reinterpret_cast<collaborative_once_runner*>(bits);\n    }\n\n    template <typename F>\n    void run_once(F&& f) {\n        __TBB_ASSERT(!m_is_ready.load(std::memory_order_relaxed), \"storage with task_arena and wait_context is already initialized\");\n        // Initialize internal state\n        new(&m_storage) storage_t();\n        m_storage.m_arena.execute([&] {\n            isolated_execute([&] {\n                task_group_context context{ task_group_context::bound,\n                    task_group_context::default_traits | task_group_context::concurrent_wait };\n\n                collaborative_call_stack_task<F> t{ std::forward<F>(f), m_storage.m_wait_context };\n\n                // Set the ready flag after entering the execute body to prevent\n                // moonlighting threads from occupying all slots inside the arena.\n                m_is_ready.store(true, std::memory_order_release);\n                execute_and_wait(t, context, m_storage.m_wait_context, context);\n            });\n        });\n    }\n\n    void assist() noexcept {\n        // Do not join the arena until the winner thread takes the slot\n        spin_wait_while_eq(m_is_ready, false);\n        m_storage.m_arena.execute([&] {\n            isolated_execute([&] {\n                // We do not want to get an exception from user functor on moonlighting threads.\n                // The exception is handled with the winner thread\n                task_group_context stub_context;\n                wait(m_storage.m_wait_context, stub_context);\n            });\n        });\n    }\n\n};\n\nclass collaborative_once_flag : no_copy {\n    enum state : std::uintptr_t {\n        uninitialized,\n        done,\n#if TBB_USE_ASSERT\n        dead\n#endif\n    };\n    std::atomic<std::uintptr_t> m_state{ state::uninitialized };\n\n    template <typename Fn, typename... Args>\n    friend void collaborative_call_once(collaborative_once_flag& flag, Fn&& f, Args&&... args);\n\n    void set_completion_state(std::uintptr_t runner_bits, std::uintptr_t desired) {\n        std::uintptr_t expected = runner_bits;\n        do {\n            expected = runner_bits;\n            // Possible inefficiency: when we start waiting,\n            // some moonlighting threads might continue coming that will prolong our waiting.\n            // Fortunately, there are limited number of threads on the system so wait time is limited.\n            spin_wait_until_eq(m_state, expected);\n        } while (!m_state.compare_exchange_strong(expected, desired));\n    }\n\n    template <typename Fn>\n    void do_collaborative_call_once(Fn&& f) {\n        std::uintptr_t expected = m_state.load(std::memory_order_acquire);\n        collaborative_once_runner runner;\n\n        do {\n            if (expected == state::uninitialized && m_state.compare_exchange_strong(expected, runner.to_bits())) {\n                // Winner thread\n                runner.run_once([&] {\n                    try_call([&] {\n                        std::forward<Fn>(f)();\n                    }).on_exception([&] {\n                        // Reset the state to uninitialized to allow other threads to try initialization again\n                        set_completion_state(runner.to_bits(), state::uninitialized);\n                    });\n                    // We successfully executed functor\n                    set_completion_state(runner.to_bits(), state::done);\n                });\n                break;\n            } else {\n                // Moonlighting thread: we need to add a reference to the state to prolong runner lifetime.\n                // However, the maximum number of references are limited with runner alignment.\n                // So, we use CAS loop and spin_wait to guarantee that references never exceed \"max_value\".\n                do {\n                    auto max_value = expected | collaborative_once_references_mask;\n                    expected = spin_wait_while_eq(m_state, max_value);\n                // \"expected > state::done\" prevents storing values, when state is uninitialized or done\n                } while (expected > state::done && !m_state.compare_exchange_strong(expected, expected + 1));\n\n                if (auto shared_runner = collaborative_once_runner::from_bits(expected & ~collaborative_once_references_mask)) {\n                    collaborative_once_runner::lifetime_guard guard{*shared_runner};\n                    m_state.fetch_sub(1);\n\n                    // The moonlighting threads are not expected to handle exceptions from user functor.\n                    // Therefore, no exception is expected from assist().\n                    shared_runner->assist();\n                }\n            }\n            __TBB_ASSERT(m_state.load(std::memory_order_relaxed) != state::dead,\n                         \"collaborative_once_flag has been prematurely destroyed\");\n        } while (expected != state::done);\n    }\n\n#if TBB_USE_ASSERT\npublic:\n    ~collaborative_once_flag() {\n        m_state.store(state::dead, std::memory_order_relaxed);\n    }\n#endif\n};\n\n\ntemplate <typename Fn, typename... Args>\nvoid collaborative_call_once(collaborative_once_flag& flag, Fn&& fn, Args&&... args) {\n    __TBB_ASSERT(flag.m_state.load(std::memory_order_relaxed) != collaborative_once_flag::dead,\n                 \"collaborative_once_flag has been prematurely destroyed\");\n    if (flag.m_state.load(std::memory_order_acquire) != collaborative_once_flag::done) {\n    #if __TBB_GCC_PARAMETER_PACK_IN_LAMBDAS_BROKEN\n        // Using stored_pack to suppress bug in GCC 4.8\n        // with parameter pack expansion in lambda\n        auto stored_pack = save_pack(std::forward<Args>(args)...);\n        auto func = [&] { call(std::forward<Fn>(fn), std::move(stored_pack)); };\n    #else\n        auto func = [&] { fn(std::forward<Args>(args)...); };\n    #endif\n        flag.do_collaborative_call_once(func);\n    }\n}\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    #pragma warning (pop) // 4324 warning\n#endif\n\n} // namespace d1\n} // namespace detail\n\nusing detail::d1::collaborative_call_once;\nusing detail::d1::collaborative_once_flag;\n} // namespace tbb\n\n#endif // __TBB_collaborative_call_once_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/combinable.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_combinable_H\n#define __TBB_combinable_H\n\n#include \"detail/_namespace_injection.h\"\n\n#include \"enumerable_thread_specific.h\"\n#include \"cache_aligned_allocator.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n/** \\name combinable **/\n//@{\n//! Thread-local storage with optional reduction\n/** @ingroup containers */\ntemplate <typename T>\nclass combinable {\n    using my_alloc = typename tbb::cache_aligned_allocator<T>;\n    using my_ets_type = typename tbb::enumerable_thread_specific<T, my_alloc, ets_no_key>;\n    my_ets_type my_ets;\n\npublic:\n    combinable() = default;\n\n    template <typename Finit>\n    explicit combinable(Finit _finit) : my_ets(_finit) { }\n\n    void clear() { my_ets.clear(); }\n\n    T& local() { return my_ets.local(); }\n\n    T& local(bool& exists) { return my_ets.local(exists); }\n\n    // combine_func_t has signature T(T,T) or T(const T&, const T&)\n    template <typename CombineFunc>\n    T combine(CombineFunc f_combine) { return my_ets.combine(f_combine); }\n\n    // combine_func_t has signature void(T) or void(const T&)\n    template <typename CombineFunc>\n    void combine_each(CombineFunc f_combine) { my_ets.combine_each(f_combine); }\n};\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::combinable;\n} // inline namespace v1\n\n} // namespace tbb\n\n#endif /* __TBB_combinable_H */\n\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/concurrent_hash_map.h",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_concurrent_hash_map_H\n#define __TBB_concurrent_hash_map_H\n\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_utils.h\"\n#include \"detail/_assert.h\"\n#include \"detail/_allocator_traits.h\"\n#include \"detail/_containers_helpers.h\"\n#include \"detail/_template_helpers.h\"\n#include \"detail/_hash_compare.h\"\n#include \"detail/_range_common.h\"\n#include \"tbb_allocator.h\"\n#include \"spin_rw_mutex.h\"\n\n#include <atomic>\n#include <initializer_list>\n#include <tuple>\n#include <iterator>\n#include <utility>      // Need std::pair\n#include <cstring>      // Need std::memset\n\nnamespace tbb {\nnamespace detail {\nnamespace d2 {\n\n#if __TBB_PREVIEW_CONCURRENT_HASH_MAP_EXTENSIONS && __TBB_CPP20_CONCEPTS_PRESENT\ntemplate <typename Mutex>\nconcept ch_map_rw_scoped_lockable = rw_scoped_lockable<Mutex> &&\n\trequires(const typename Mutex::scoped_lock& sl) {\n\t\t{ sl.is_writer() } -> std::convertible_to<bool>;\n};\n#endif\n\ntemplate <typename MutexType>\nstruct hash_map_node_base : no_copy {\n    using mutex_type = MutexType;\n    // Scoped lock type for mutex\n    using scoped_type = typename MutexType::scoped_lock;\n    // Next node in chain\n    hash_map_node_base* next;\n    mutex_type mutex;\n};\n\n// Incompleteness flag value\nstatic void* const rehash_req_flag = reinterpret_cast<void*>(std::size_t(3));\n// Rehashed empty bucket flag\nstatic void* const empty_rehashed_flag = reinterpret_cast<void*>(std::size_t(0));\n\ntemplate <typename MutexType>\nbool rehash_required( hash_map_node_base<MutexType>* node_ptr ) {\n    return reinterpret_cast<void*>(node_ptr) == rehash_req_flag;\n}\n\n#if TBB_USE_ASSERT\ntemplate <typename MutexType>\nbool empty_rehashed( hash_map_node_base<MutexType>* node_ptr ) {\n    return reinterpret_cast<void*>(node_ptr) == empty_rehashed_flag;\n}\n#endif\n\n// base class of concurrent_hash_map\n\ntemplate <typename Allocator, typename MutexType>\nclass hash_map_base {\npublic:\n    using size_type = std::size_t;\n    using hashcode_type = std::size_t;\n    using segment_index_type = std::size_t;\n    using node_base = hash_map_node_base<MutexType>;\n\n    struct bucket : no_copy {\n        using mutex_type = MutexType;\n        using scoped_type = typename mutex_type::scoped_lock;\n\n        bucket() : node_list(nullptr) {}\n        bucket( node_base* ptr ) : node_list(ptr) {}\n\n        mutex_type mutex;\n        std::atomic<node_base*> node_list;\n    };\n\n    using allocator_type = Allocator;\n    using allocator_traits_type = tbb::detail::allocator_traits<allocator_type>;\n    using bucket_allocator_type = typename allocator_traits_type::template rebind_alloc<bucket>;\n    using bucket_allocator_traits = tbb::detail::allocator_traits<bucket_allocator_type>;\n\n    // Count of segments in the first block\n    static constexpr size_type embedded_block = 1;\n    // Count of segments in the first block\n    static constexpr size_type embedded_buckets = 1 << embedded_block;\n    // Count of segments in the first block\n    static constexpr size_type first_block = 8; //including embedded_block. perfect with bucket size 16, so the allocations are power of 4096\n    // Size of a pointer / table size\n    static constexpr size_type pointers_per_table = sizeof(segment_index_type) * 8; // one segment per bit\n\n    using segment_ptr_type = bucket*;\n    using atomic_segment_type = std::atomic<segment_ptr_type>;\n    using segments_table_type = atomic_segment_type[pointers_per_table];\n\n    hash_map_base( const allocator_type& alloc ) : my_allocator(alloc), my_mask(embedded_buckets - 1), my_size(0) {\n        for (size_type i = 0; i != embedded_buckets; ++i) {\n            my_embedded_segment[i].node_list.store(nullptr, std::memory_order_relaxed);\n        }\n\n        for (size_type segment_index = 0; segment_index < pointers_per_table; ++segment_index) {\n            auto argument = segment_index < embedded_block ? my_embedded_segment + segment_base(segment_index) : nullptr;\n            my_table[segment_index].store(argument, std::memory_order_relaxed);\n        }\n\n        __TBB_ASSERT( embedded_block <= first_block, \"The first block number must include embedded blocks\");\n    }\n\n    // segment index of given index in the array\n    static segment_index_type segment_index_of( size_type index ) {\n        return segment_index_type(tbb::detail::log2( index|1 ));\n    }\n\n    // the first array index of given segment\n    static segment_index_type segment_base( segment_index_type k ) {\n        return (segment_index_type(1) << k & ~segment_index_type(1));\n    }\n\n    // segment size except for k == 0\n    static size_type segment_size( segment_index_type k ) {\n        return size_type(1) << k; // fake value for k==0\n    }\n\n    // true if ptr is valid pointer\n    static bool is_valid( void* ptr ) {\n        return reinterpret_cast<uintptr_t>(ptr) > uintptr_t(63);\n    }\n\n    template <typename... Args>\n    void init_buckets_impl( segment_ptr_type ptr, size_type sz, const Args&... args ) {\n        for (size_type i = 0; i < sz; ++i) {\n            bucket_allocator_traits::construct(my_allocator, ptr + i, args...);\n        }\n    }\n\n    // Initialize buckets\n    void init_buckets( segment_ptr_type ptr, size_type sz, bool is_initial ) {\n        if (is_initial) {\n            init_buckets_impl(ptr, sz);\n        } else {\n            init_buckets_impl(ptr, sz, reinterpret_cast<node_base*>(rehash_req_flag));\n        }\n    }\n\n    // Add node n to bucket b\n    static void add_to_bucket( bucket* b, node_base* n ) {\n        __TBB_ASSERT(!rehash_required(b->node_list.load(std::memory_order_relaxed)), nullptr);\n        n->next = b->node_list.load(std::memory_order_relaxed);\n        b->node_list.store(n, std::memory_order_relaxed); // its under lock and flag is set\n    }\n\n    const bucket_allocator_type& get_allocator() const {\n        return my_allocator;\n    }\n\n    bucket_allocator_type& get_allocator() {\n        return my_allocator;\n    }\n\n    // Enable segment\n    void enable_segment( segment_index_type k, bool is_initial = false ) {\n        __TBB_ASSERT( k, \"Zero segment must be embedded\" );\n        size_type sz;\n        __TBB_ASSERT( !is_valid(my_table[k].load(std::memory_order_relaxed)), \"Wrong concurrent assignment\");\n        if (k >= first_block) {\n            sz = segment_size(k);\n            segment_ptr_type ptr = nullptr;\n            try_call( [&] {\n                ptr = bucket_allocator_traits::allocate(my_allocator, sz);\n            } ).on_exception( [&] {\n                my_table[k].store(nullptr, std::memory_order_relaxed);\n            });\n\n            __TBB_ASSERT(ptr, nullptr);\n            init_buckets(ptr, sz, is_initial);\n            my_table[k].store(ptr, std::memory_order_release);\n            sz <<= 1;// double it to get entire capacity of the container\n        } else { // the first block\n            __TBB_ASSERT( k == embedded_block, \"Wrong segment index\" );\n            sz = segment_size(first_block);\n            segment_ptr_type ptr = nullptr;\n            try_call( [&] {\n                ptr = bucket_allocator_traits::allocate(my_allocator, sz - embedded_buckets);\n            } ).on_exception( [&] {\n                my_table[k].store(nullptr, std::memory_order_relaxed);\n            });\n\n            __TBB_ASSERT(ptr, nullptr);\n            init_buckets(ptr, sz - embedded_buckets, is_initial);\n            ptr -= segment_base(embedded_block);\n            for(segment_index_type i = embedded_block; i < first_block; i++) // calc the offsets\n                my_table[i].store(ptr + segment_base(i), std::memory_order_release);\n        }\n        my_mask.store(sz-1, std::memory_order_release);\n    }\n\n    void delete_segment( segment_index_type s ) {\n        segment_ptr_type buckets_ptr = my_table[s].load(std::memory_order_relaxed);\n        size_type sz = segment_size( s ? s : 1 );\n\n        size_type deallocate_size = 0;\n\n        if (s >= first_block) { // the first segment or the next\n            deallocate_size = sz;\n        } else if (s == embedded_block && embedded_block != first_block) {\n            deallocate_size = segment_size(first_block) - embedded_buckets;\n        }\n\n        for (size_type i = 0; i < deallocate_size; ++i) {\n            bucket_allocator_traits::destroy(my_allocator, buckets_ptr + i);\n        }\n        if (deallocate_size != 0) {\n            bucket_allocator_traits::deallocate(my_allocator, buckets_ptr, deallocate_size);\n        }\n\n        if (s >= embedded_block) my_table[s].store(nullptr, std::memory_order_relaxed);\n    }\n\n    // Get bucket by (masked) hashcode\n    bucket *get_bucket( hashcode_type h ) const noexcept {\n        segment_index_type s = segment_index_of( h );\n        h -= segment_base(s);\n        segment_ptr_type seg = my_table[s].load(std::memory_order_acquire);\n        __TBB_ASSERT( is_valid(seg), \"hashcode must be cut by valid mask for allocated segments\" );\n        return &seg[h];\n    }\n\n    // detail serial rehashing helper\n    void mark_rehashed_levels( hashcode_type h ) noexcept {\n        segment_index_type s = segment_index_of( h );\n        while (segment_ptr_type seg = my_table[++s].load(std::memory_order_relaxed))\n            if (rehash_required(seg[h].node_list.load(std::memory_order_relaxed))) {\n                seg[h].node_list.store(reinterpret_cast<node_base*>(empty_rehashed_flag), std::memory_order_relaxed);\n                mark_rehashed_levels( h + ((hashcode_type)1<<s) ); // optimized segment_base(s)\n            }\n    }\n\n    // Check for mask race\n    // Splitting into two functions should help inlining\n    inline bool check_mask_race( const hashcode_type h, hashcode_type &m ) const {\n        hashcode_type m_now, m_old = m;\n        m_now = my_mask.load(std::memory_order_acquire);\n        if (m_old != m_now) {\n            return check_rehashing_collision(h, m_old, m = m_now);\n        }\n        return false;\n    }\n\n    // Process mask race, check for rehashing collision\n    bool check_rehashing_collision( const hashcode_type h, hashcode_type m_old, hashcode_type m ) const {\n        __TBB_ASSERT(m_old != m, nullptr); // TODO?: m arg could be optimized out by passing h = h&m\n        if( (h & m_old) != (h & m) ) { // mask changed for this hashcode, rare event\n            // condition above proves that 'h' has some other bits set beside 'm_old'\n            // find next applicable mask after m_old    //TODO: look at bsl instruction\n            for( ++m_old; !(h & m_old); m_old <<= 1 ) // at maximum few rounds depending on the first block size\n                ;\n            m_old = (m_old<<1) - 1; // get full mask from a bit\n            __TBB_ASSERT((m_old&(m_old+1))==0 && m_old <= m, nullptr);\n            // check whether it is rehashing/ed\n            if (!rehash_required(get_bucket(h & m_old)->node_list.load(std::memory_order_acquire))) {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    // Insert a node and check for load factor. @return segment index to enable.\n    segment_index_type insert_new_node( bucket *b, node_base *n, hashcode_type mask ) {\n        size_type sz = ++my_size; // prefix form is to enforce allocation after the first item inserted\n        add_to_bucket( b, n );\n        // check load factor\n        if( sz >= mask ) { // TODO: add custom load_factor\n            segment_index_type new_seg = tbb::detail::log2( mask+1 ); //optimized segment_index_of\n            __TBB_ASSERT( is_valid(my_table[new_seg-1].load(std::memory_order_relaxed)), \"new allocations must not publish new mask until segment has allocated\");\n            static const segment_ptr_type is_allocating = segment_ptr_type(2);\n            segment_ptr_type disabled = nullptr;\n            if (!(my_table[new_seg].load(std::memory_order_acquire))\n                && my_table[new_seg].compare_exchange_strong(disabled, is_allocating))\n                return new_seg; // The value must be processed\n        }\n        return 0;\n    }\n\n    // Prepare enough segments for number of buckets\n    void reserve(size_type buckets) {\n        if( !buckets-- ) return;\n        bool is_initial = !my_size.load(std::memory_order_relaxed);\n        for (size_type m = my_mask.load(std::memory_order_relaxed); buckets > m;\n            m = my_mask.load(std::memory_order_relaxed))\n        {\n            enable_segment( segment_index_of( m+1 ), is_initial );\n        }\n    }\n\n    // Swap hash_map_bases\n    void internal_swap_content(hash_map_base &table) {\n        using std::swap;\n        swap_atomics_relaxed(my_mask, table.my_mask);\n        swap_atomics_relaxed(my_size, table.my_size);\n\n        for(size_type i = 0; i < embedded_buckets; i++) {\n            auto temp = my_embedded_segment[i].node_list.load(std::memory_order_relaxed);\n            my_embedded_segment[i].node_list.store(table.my_embedded_segment[i].node_list.load(std::memory_order_relaxed),\n                std::memory_order_relaxed);\n            table.my_embedded_segment[i].node_list.store(temp, std::memory_order_relaxed);\n        }\n        for(size_type i = embedded_block; i < pointers_per_table; i++) {\n            auto temp = my_table[i].load(std::memory_order_relaxed);\n            my_table[i].store(table.my_table[i].load(std::memory_order_relaxed),\n                std::memory_order_relaxed);\n            table.my_table[i].store(temp, std::memory_order_relaxed);\n        }\n    }\n\n    void internal_move(hash_map_base&& other) {\n        my_mask.store(other.my_mask.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        other.my_mask.store(embedded_buckets - 1, std::memory_order_relaxed);\n\n        my_size.store(other.my_size.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        other.my_size.store(0, std::memory_order_relaxed);\n\n        for (size_type i = 0; i < embedded_buckets; ++i) {\n            my_embedded_segment[i].node_list.store(other.my_embedded_segment[i].node_list, std::memory_order_relaxed);\n            other.my_embedded_segment[i].node_list.store(nullptr, std::memory_order_relaxed);\n        }\n\n        for (size_type i = embedded_block; i < pointers_per_table; ++i) {\n            my_table[i].store(other.my_table[i].load(std::memory_order_relaxed),\n                std::memory_order_relaxed);\n            other.my_table[i].store(nullptr, std::memory_order_relaxed);\n        }\n    }\n\nprotected:\n    bucket_allocator_type my_allocator;\n    // Hash mask = sum of allocated segment sizes - 1\n    std::atomic<hashcode_type> my_mask;\n    // Size of container in stored items\n    std::atomic<size_type> my_size; // It must be in separate cache line from my_mask due to performance effects\n    // Zero segment\n    bucket my_embedded_segment[embedded_buckets];\n    // Segment pointers table. Also prevents false sharing between my_mask and my_size\n    segments_table_type my_table;\n};\n\ntemplate <typename Iterator>\nclass hash_map_range;\n\n// Meets requirements of a forward iterator for STL\n// Value is either the T or const T type of the container.\ntemplate <typename Container, typename Value>\nclass hash_map_iterator {\n    using map_type = Container;\n    using node = typename Container::node;\n    using map_base = typename Container::base_type;\n    using node_base = typename map_base::node_base;\n    using bucket = typename map_base::bucket;\npublic:\n    using value_type = Value;\n    using size_type = typename Container::size_type;\n    using difference_type = typename Container::difference_type;\n    using pointer = value_type*;\n    using reference = value_type&;\n    using iterator_category = std::forward_iterator_tag;\n\n    // Construct undefined iterator\n    hash_map_iterator(): my_map(), my_index(), my_bucket(), my_node() {}\n    hash_map_iterator( const hash_map_iterator<Container, typename Container::value_type>& other ) :\n        my_map(other.my_map),\n        my_index(other.my_index),\n        my_bucket(other.my_bucket),\n        my_node(other.my_node)\n    {}\n\n    hash_map_iterator& operator=( const hash_map_iterator<Container, typename Container::value_type>& other ) {\n        my_map = other.my_map;\n        my_index = other.my_index;\n        my_bucket = other.my_bucket;\n        my_node = other.my_node;\n        return *this;\n    }\n\n    Value& operator*() const {\n        __TBB_ASSERT( map_base::is_valid(my_node), \"iterator uninitialized or at end of container?\" );\n        return my_node->value();\n    }\n\n    Value* operator->() const {return &operator*();}\n\n    hash_map_iterator& operator++() {\n        my_node = static_cast<node*>( my_node->next );\n        if( !my_node ) advance_to_next_bucket();\n        return *this;\n    }\n\n    // Post increment\n    hash_map_iterator operator++(int) {\n        hash_map_iterator old(*this);\n        operator++();\n        return old;\n    }\nprivate:\n    template <typename C, typename T, typename U>\n    friend bool operator==( const hash_map_iterator<C,T>& i, const hash_map_iterator<C,U>& j );\n\n    template <typename C, typename T, typename U>\n    friend bool operator!=( const hash_map_iterator<C,T>& i, const hash_map_iterator<C,U>& j );\n\n    template <typename C, typename T, typename U>\n    friend ptrdiff_t operator-( const hash_map_iterator<C,T>& i, const hash_map_iterator<C,U>& j );\n\n    template <typename C, typename U>\n    friend class hash_map_iterator;\n\n    template <typename I>\n    friend class hash_map_range;\n\n    void advance_to_next_bucket() { // TODO?: refactor to iterator_base class\n        size_t k = my_index+1;\n        __TBB_ASSERT( my_bucket, \"advancing an invalid iterator?\");\n        while (k <= my_map->my_mask.load(std::memory_order_relaxed)) {\n            // Following test uses 2's-complement wizardry\n            if( k&(k-2) ) // not the beginning of a segment\n                ++my_bucket;\n            else my_bucket = my_map->get_bucket( k );\n            node_base *n = my_bucket->node_list.load(std::memory_order_relaxed);\n            if( map_base::is_valid(n) ) {\n                my_node = static_cast<node*>(n);\n                my_index = k;\n                return;\n            }\n            ++k;\n        }\n        my_bucket = nullptr; my_node = nullptr; my_index = k; // the end\n    }\n\n    template <typename Key, typename T, typename HashCompare, typename A\n#if __TBB_PREVIEW_CONCURRENT_HASH_MAP_EXTENSIONS\n            , typename M\n             >\n        __TBB_requires(tbb::detail::hash_compare<HashCompare, Key> &&\n                       ch_map_rw_scoped_lockable<M>)\n#else\n             >\n        __TBB_requires(tbb::detail::hash_compare<HashCompare, Key>)\n#endif\n    friend class concurrent_hash_map;\n\n    hash_map_iterator( const Container &map, std::size_t index, const bucket *b, node_base *n ) :\n        my_map(&map), my_index(index), my_bucket(b), my_node(nullptr)\n    {\n        // Cannot directly initialize to n, because it could be an invalid node pointer (e.g., when\n        // setting a midpoint for a 1-element range). If it is, try one from a subsequent bucket.\n        if( map_base::is_valid(n) )\n            my_node = static_cast<node*>(n);\n        else if( b )\n            advance_to_next_bucket();\n    }\n\n    // concurrent_hash_map over which we are iterating.\n    const Container *my_map;\n    // Index in hash table for current item\n    size_t my_index;\n    // Pointer to bucket\n    const bucket* my_bucket;\n    // Pointer to node that has current item\n    node* my_node;\n};\n\ntemplate <typename Container, typename T, typename U>\nbool operator==( const hash_map_iterator<Container,T>& i, const hash_map_iterator<Container,U>& j ) {\n    return i.my_node == j.my_node && i.my_map == j.my_map;\n}\n\ntemplate <typename Container, typename T, typename U>\nbool operator!=( const hash_map_iterator<Container,T>& i, const hash_map_iterator<Container,U>& j ) {\n    return i.my_node != j.my_node || i.my_map != j.my_map;\n}\n\n// Range class used with concurrent_hash_map\ntemplate <typename Iterator>\nclass hash_map_range {\n    using map_type = typename Iterator::map_type;\npublic:\n    // Type for size of a range\n    using size_type = std::size_t;\n    using value_type = typename Iterator::value_type;\n    using reference = typename Iterator::reference;\n    using difference_type = typename Iterator::difference_type;\n    using iterator = Iterator;\n\n    // True if range is empty.\n    bool empty() const { return my_begin == my_end; }\n\n    // True if range can be partitioned into two subranges.\n    bool is_divisible() const {\n        return my_midpoint != my_end;\n    }\n\n    // Split range.\n    hash_map_range( hash_map_range& r, split ) :\n        my_end(r.my_end),\n        my_grainsize(r.my_grainsize)\n    {\n        r.my_end = my_begin = r.my_midpoint;\n        __TBB_ASSERT( !empty(), \"Splitting despite the range is not divisible\" );\n        __TBB_ASSERT( !r.empty(), \"Splitting despite the range is not divisible\" );\n        set_midpoint();\n        r.set_midpoint();\n    }\n\n    // Init range with container and grainsize specified\n    hash_map_range( const map_type &map, size_type grainsize_ = 1 ) :\n        my_begin( Iterator( map, 0, map.my_embedded_segment, map.my_embedded_segment->node_list.load(std::memory_order_relaxed) ) ),\n        my_end( Iterator( map, map.my_mask.load(std::memory_order_relaxed) + 1, nullptr, nullptr ) ),\n        my_grainsize( grainsize_ )\n    {\n        __TBB_ASSERT( grainsize_>0, \"grainsize must be positive\" );\n        set_midpoint();\n    }\n\n    Iterator begin() const { return my_begin; }\n    Iterator end() const { return my_end; }\n    // The grain size for this range.\n    size_type grainsize() const { return my_grainsize; }\n\nprivate:\n    Iterator my_begin;\n    Iterator my_end;\n    mutable Iterator my_midpoint;\n    size_t my_grainsize;\n    // Set my_midpoint to point approximately half way between my_begin and my_end.\n    void set_midpoint() const;\n    template <typename U> friend class hash_map_range;\n};\n\ntemplate <typename Iterator>\nvoid hash_map_range<Iterator>::set_midpoint() const {\n    // Split by groups of nodes\n    size_t m = my_end.my_index-my_begin.my_index;\n    if( m > my_grainsize ) {\n        m = my_begin.my_index + m/2u;\n        auto b = my_begin.my_map->get_bucket(m);\n        my_midpoint = Iterator(*my_begin.my_map,m,b,b->node_list.load(std::memory_order_relaxed));\n    } else {\n        my_midpoint = my_end;\n    }\n    __TBB_ASSERT( my_begin.my_index <= my_midpoint.my_index,\n        \"my_begin is after my_midpoint\" );\n    __TBB_ASSERT( my_midpoint.my_index <= my_end.my_index,\n        \"my_midpoint is after my_end\" );\n    __TBB_ASSERT( my_begin != my_midpoint || my_begin == my_end,\n        \"[my_begin, my_midpoint) range should not be empty\" );\n}\n\ntemplate <typename Key, typename T,\n          typename HashCompare = d1::tbb_hash_compare<Key>,\n          typename Allocator = tbb_allocator<std::pair<const Key, T>>\n#if __TBB_PREVIEW_CONCURRENT_HASH_MAP_EXTENSIONS\n        , typename MutexType = spin_rw_mutex\n         >\n    __TBB_requires(tbb::detail::hash_compare<HashCompare, Key> &&\n                   ch_map_rw_scoped_lockable<MutexType>)\n#else\n         >\n    __TBB_requires(tbb::detail::hash_compare<HashCompare, Key>)\n#endif\nclass concurrent_hash_map\n#if __TBB_PREVIEW_CONCURRENT_HASH_MAP_EXTENSIONS\n    : protected hash_map_base<Allocator, MutexType>\n#else\n    : protected hash_map_base<Allocator, spin_rw_mutex>\n#endif\n{\n    template <typename Container, typename Value>\n    friend class hash_map_iterator;\n\n    template <typename I>\n    friend class hash_map_range;\n    using allocator_traits_type = tbb::detail::allocator_traits<Allocator>;\n\n#if __TBB_PREVIEW_CONCURRENT_HASH_MAP_EXTENSIONS\n    using base_type = hash_map_base<Allocator, MutexType>;\n#else\n    using base_type = hash_map_base<Allocator, spin_rw_mutex>;\n#endif\npublic:\n    using key_type = Key;\n    using mapped_type = T;\n    // type_identity is needed to disable implicit deduction guides for std::initializer_list constructors\n    // and copy/move constructor with explicit allocator argument\n    using allocator_type = tbb::detail::type_identity_t<Allocator>;\n    using hash_compare_type = tbb::detail::type_identity_t<HashCompare>;\n    using value_type = std::pair<const Key, T>;\n    using size_type = typename base_type::size_type;\n    using difference_type = std::ptrdiff_t;\n#if __TBB_PREVIEW_CONCURRENT_HASH_MAP_EXTENSIONS\n    using mutex_type = MutexType;\n#endif\n    using pointer = typename allocator_traits_type::pointer;\n    using const_pointer = typename allocator_traits_type::const_pointer;\n\n    using reference = value_type&;\n    using const_reference = const value_type&;\n    using iterator = hash_map_iterator<concurrent_hash_map, value_type>;\n    using const_iterator = hash_map_iterator<concurrent_hash_map, const value_type>;\n    using range_type = hash_map_range<iterator>;\n    using const_range_type = hash_map_range<const_iterator>;\n\nprotected:\n    static_assert(std::is_same<value_type, typename Allocator::value_type>::value,\n        \"value_type of the container must be the same as its allocator's\");\n\n    friend class const_accessor;\n    class node;\n    using segment_index_type = typename base_type::segment_index_type;\n    using segment_ptr_type = typename base_type::segment_ptr_type;\n    using node_base = typename base_type::node_base;\n    using bucket = typename base_type::bucket;\n    using hashcode_type = typename base_type::hashcode_type;\n    using bucket_allocator_type = typename base_type::bucket_allocator_type;\n    using node_allocator_type = typename base_type::allocator_traits_type::template rebind_alloc<node>;\n    using node_allocator_traits = tbb::detail::allocator_traits<node_allocator_type>;\n    hash_compare_type my_hash_compare;\n\n    class node : public node_base {\n    public:\n        node() {}\n        ~node() {}\n        pointer storage() { return &my_value; }\n        value_type& value() { return *storage(); }\n    private:\n        union {\n            value_type my_value;\n        };\n    };\n\n    void delete_node( node_base *n ) {\n        node_allocator_type node_allocator(this->get_allocator());\n        node_allocator_traits::destroy(node_allocator, static_cast<node*>(n)->storage());\n        node_allocator_traits::destroy(node_allocator, static_cast<node*>(n));\n        node_allocator_traits::deallocate(node_allocator, static_cast<node*>(n), 1);\n    }\n\n    template <typename... Args>\n    static node* create_node(bucket_allocator_type& allocator, Args&&... args) {\n        node_allocator_type node_allocator(allocator);\n        node* node_ptr = node_allocator_traits::allocate(node_allocator, 1);\n        auto guard = make_raii_guard([&] {\n            node_allocator_traits::destroy(node_allocator, node_ptr);\n            node_allocator_traits::deallocate(node_allocator, node_ptr, 1);\n        });\n\n        node_allocator_traits::construct(node_allocator, node_ptr);\n        node_allocator_traits::construct(node_allocator, node_ptr->storage(), std::forward<Args>(args)...);\n        guard.dismiss();\n        return node_ptr;\n    }\n\n    static node* allocate_node_copy_construct(bucket_allocator_type& allocator, const Key &key, const T * t){\n        return create_node(allocator, key, *t);\n    }\n\n    static node* allocate_node_move_construct(bucket_allocator_type& allocator, const Key &key, const T * t){\n        return create_node(allocator, key, std::move(*const_cast<T*>(t)));\n    }\n\n    template <typename K = Key>\n    static node* allocate_node_default_construct(bucket_allocator_type& allocator, const K &key, const T * ){\n        // Emplace construct an empty T object inside the pair\n        return create_node(allocator, std::piecewise_construct,\n                           std::forward_as_tuple(key), std::forward_as_tuple());\n    }\n\n    static node* do_not_allocate_node(bucket_allocator_type& , const Key &, const T * ){\n        __TBB_ASSERT(false,\"this dummy function should not be called\");\n        return nullptr;\n    }\n\n    template <typename K>\n    node *search_bucket( const K &key, bucket *b ) const {\n        node *n = static_cast<node*>( b->node_list.load(std::memory_order_relaxed) );\n        while (this->is_valid(n) && !my_hash_compare.equal(key, n->value().first))\n            n = static_cast<node*>( n->next );\n        __TBB_ASSERT(!rehash_required(n), \"Search can be executed only for rehashed bucket\");\n        return n;\n    }\n\n    // bucket accessor is to find, rehash, acquire a lock, and access a bucket\n    class bucket_accessor : public bucket::scoped_type {\n        bucket *my_b;\n    public:\n        bucket_accessor( concurrent_hash_map *base, const hashcode_type h, bool writer = false ) { acquire( base, h, writer ); }\n        // find a bucket by masked hashcode, optionally rehash, and acquire the lock\n        inline void acquire( concurrent_hash_map *base, const hashcode_type h, bool writer = false ) {\n            my_b = base->get_bucket( h );\n            // TODO: actually, notification is unnecessary here, just hiding double-check\n            if (rehash_required(my_b->node_list.load(std::memory_order_acquire))\n                && bucket::scoped_type::try_acquire( my_b->mutex, /*write=*/true ) )\n            {\n                if (rehash_required(my_b->node_list.load(std::memory_order_relaxed))) base->rehash_bucket(my_b, h); // recursive rehashing\n            }\n            else bucket::scoped_type::acquire( my_b->mutex, writer );\n            __TBB_ASSERT(!rehash_required(my_b->node_list.load(std::memory_order_relaxed)), nullptr);\n        }\n\n        // get bucket pointer\n        bucket *operator() () { return my_b; }\n    };\n\n    // TODO refactor to hash_base\n    void rehash_bucket( bucket *b_new, const hashcode_type hash ) {\n        __TBB_ASSERT( hash > 1, \"The lowermost buckets can't be rehashed\" );\n        b_new->node_list.store(reinterpret_cast<node_base*>(empty_rehashed_flag), std::memory_order_release); // mark rehashed\n        hashcode_type mask = (hashcode_type(1) << tbb::detail::log2(hash)) - 1; // get parent mask from the topmost bit\n        bucket_accessor b_old( this, hash & mask );\n\n        mask = (mask<<1) | 1; // get full mask for new bucket\n        __TBB_ASSERT( (mask&(mask+1))==0 && (hash & mask) == hash, nullptr );\n    restart:\n        node_base* prev = nullptr;\n        node_base* curr = b_old()->node_list.load(std::memory_order_acquire);\n        while (this->is_valid(curr)) {\n            hashcode_type curr_node_hash = my_hash_compare.hash(static_cast<node*>(curr)->value().first);\n\n            if ((curr_node_hash & mask) == hash) {\n                if (!b_old.is_writer()) {\n                    if (!b_old.upgrade_to_writer()) {\n                        goto restart; // node ptr can be invalid due to concurrent erase\n                    }\n                }\n                node_base* next = curr->next;\n                // exclude from b_old\n                if (prev == nullptr) {\n                    b_old()->node_list.store(curr->next, std::memory_order_relaxed);\n                } else {\n                    prev->next = curr->next;\n                }\n                this->add_to_bucket(b_new, curr);\n                curr = next;\n            } else {\n                prev = curr;\n                curr = curr->next;\n            }\n        }\n    }\n\n    template <typename U>\n    using hash_compare_is_transparent = dependent_bool<comp_is_transparent<hash_compare_type>, U>;\n\npublic:\n\n    class accessor;\n    // Combines data access, locking, and garbage collection.\n    class const_accessor : private node::scoped_type /*which derived from no_copy*/ {\n#if __TBB_PREVIEW_CONCURRENT_HASH_MAP_EXTENSIONS\n        friend class concurrent_hash_map<Key,T,HashCompare,Allocator,MutexType>;\n#else\n        friend class concurrent_hash_map<Key,T,HashCompare,Allocator>;\n#endif\n        friend class accessor;\n    public:\n        // Type of value\n        using value_type = const typename concurrent_hash_map::value_type;\n\n        // True if result is empty.\n        bool empty() const { return !my_node; }\n\n        // Set to null\n        void release() {\n            if( my_node ) {\n                node::scoped_type::release();\n                my_node = nullptr;\n            }\n        }\n\n        // Return reference to associated value in hash table.\n        const_reference operator*() const {\n            __TBB_ASSERT( my_node, \"attempt to dereference empty accessor\" );\n            return my_node->value();\n        }\n\n        // Return pointer to associated value in hash table.\n        const_pointer operator->() const {\n            return &operator*();\n        }\n\n        // Create empty result\n        const_accessor() : my_node(nullptr), my_hash() {}\n\n        // Destroy result after releasing the underlying reference.\n        ~const_accessor() {\n            my_node = nullptr; // scoped lock's release() is called in its destructor\n        }\n    protected:\n        bool is_writer() { return node::scoped_type::is_writer(); }\n        node *my_node;\n        hashcode_type my_hash;\n    };\n\n    // Allows write access to elements and combines data access, locking, and garbage collection.\n    class accessor: public const_accessor {\n    public:\n        // Type of value\n        using value_type = typename concurrent_hash_map::value_type;\n\n        // Return reference to associated value in hash table.\n        reference operator*() const {\n            __TBB_ASSERT( this->my_node, \"attempt to dereference empty accessor\" );\n            return this->my_node->value();\n        }\n\n        // Return pointer to associated value in hash table.\n        pointer operator->() const {\n            return &operator*();\n        }\n    };\n\n    explicit concurrent_hash_map( const hash_compare_type& compare, const allocator_type& a = allocator_type() )\n        : base_type(a)\n        , my_hash_compare(compare)\n    {}\n\n    concurrent_hash_map() : concurrent_hash_map(hash_compare_type()) {}\n\n    explicit concurrent_hash_map( const allocator_type& a )\n        : concurrent_hash_map(hash_compare_type(), a)\n    {}\n\n    // Construct empty table with n preallocated buckets. This number serves also as initial concurrency level.\n    concurrent_hash_map( size_type n, const allocator_type &a = allocator_type() )\n        : concurrent_hash_map(a)\n    {\n        this->reserve(n);\n    }\n\n    concurrent_hash_map( size_type n, const hash_compare_type& compare, const allocator_type& a = allocator_type() )\n        : concurrent_hash_map(compare, a)\n    {\n        this->reserve(n);\n    }\n\n    // Copy constructor\n    concurrent_hash_map( const concurrent_hash_map &table )\n        : concurrent_hash_map(node_allocator_traits::select_on_container_copy_construction(table.get_allocator()))\n    {\n        try_call( [&] {\n            internal_copy(table);\n        }).on_exception( [&] {\n            this->clear();\n        });\n    }\n\n    concurrent_hash_map( const concurrent_hash_map &table, const allocator_type &a)\n        : concurrent_hash_map(a)\n    {\n        try_call( [&] {\n            internal_copy(table);\n        }).on_exception( [&] {\n            this->clear();\n        });\n    }\n\n    // Move constructor\n    concurrent_hash_map( concurrent_hash_map &&table )\n        : concurrent_hash_map(std::move(table.get_allocator()))\n    {\n        this->internal_move(std::move(table));\n    }\n\n    // Move constructor\n    concurrent_hash_map( concurrent_hash_map &&table, const allocator_type &a )\n        : concurrent_hash_map(a)\n    {\n        using is_equal_type = typename node_allocator_traits::is_always_equal;\n        internal_move_construct_with_allocator(std::move(table), a, is_equal_type());\n    }\n\n    // Construction with copying iteration range and given allocator instance\n    template <typename I>\n    concurrent_hash_map( I first, I last, const allocator_type &a = allocator_type() )\n        : concurrent_hash_map(a)\n    {\n        try_call( [&] {\n            internal_copy(first, last, std::distance(first, last));\n        }).on_exception( [&] {\n            this->clear();\n        });\n    }\n\n    template <typename I>\n    concurrent_hash_map( I first, I last, const hash_compare_type& compare, const allocator_type& a = allocator_type() )\n        : concurrent_hash_map(compare, a)\n    {\n        try_call( [&] {\n            internal_copy(first, last, std::distance(first, last));\n        }).on_exception( [&] {\n            this->clear();\n        });\n    }\n\n    concurrent_hash_map( std::initializer_list<value_type> il, const hash_compare_type& compare = hash_compare_type(), const allocator_type& a = allocator_type() )\n        : concurrent_hash_map(compare, a)\n    {\n        try_call( [&] {\n            internal_copy(il.begin(), il.end(), il.size());\n        }).on_exception( [&] {\n            this->clear();\n        });\n    }\n\n    concurrent_hash_map( std::initializer_list<value_type> il, const allocator_type& a )\n        : concurrent_hash_map(il, hash_compare_type(), a) {}\n\n    // Assignment\n    concurrent_hash_map& operator=( const concurrent_hash_map &table ) {\n        if( this != &table ) {\n            clear();\n            copy_assign_allocators(this->my_allocator, table.my_allocator);\n            internal_copy(table);\n        }\n        return *this;\n    }\n\n    // Move Assignment\n    concurrent_hash_map& operator=( concurrent_hash_map &&table ) {\n        if( this != &table ) {\n            using pocma_type = typename node_allocator_traits::propagate_on_container_move_assignment;\n            using is_equal_type = typename node_allocator_traits::is_always_equal;\n            move_assign_allocators(this->my_allocator, table.my_allocator);\n            internal_move_assign(std::move(table), tbb::detail::disjunction<is_equal_type, pocma_type>());\n        }\n        return *this;\n    }\n\n    // Assignment\n    concurrent_hash_map& operator=( std::initializer_list<value_type> il ) {\n        clear();\n        internal_copy(il.begin(), il.end(), il.size());\n        return *this;\n    }\n\n    // Rehashes and optionally resizes the whole table.\n    /** Useful to optimize performance before or after concurrent operations.\n        Also enables using of find() and count() concurrent methods in serial context. */\n    void rehash(size_type sz = 0) {\n        this->reserve(sz); // TODO: add reduction of number of buckets as well\n        hashcode_type mask = this->my_mask.load(std::memory_order_relaxed);\n        hashcode_type b = (mask+1)>>1; // size or first index of the last segment\n        __TBB_ASSERT((b&(b-1))==0, nullptr); // zero or power of 2\n        bucket *bp = this->get_bucket( b ); // only the last segment should be scanned for rehashing\n        for(; b <= mask; b++, bp++ ) {\n            node_base *n = bp->node_list.load(std::memory_order_relaxed);\n            __TBB_ASSERT( this->is_valid(n) || empty_rehashed(n) || rehash_required(n), \"Broken internal structure\" );\n            __TBB_ASSERT( *reinterpret_cast<intptr_t*>(&bp->mutex) == 0, \"concurrent or unexpectedly terminated operation during rehash() execution\" );\n            if (rehash_required(n)) { // rehash bucket, conditional because rehashing of a previous bucket may affect this one\n                hashcode_type h = b; bucket *b_old = bp;\n                do {\n                    __TBB_ASSERT( h > 1, \"The lowermost buckets can't be rehashed\" );\n                    hashcode_type m = ( hashcode_type(1) << tbb::detail::log2( h ) ) - 1; // get parent mask from the topmost bit\n                    b_old = this->get_bucket( h &= m );\n                } while( rehash_required(b_old->node_list.load(std::memory_order_relaxed)) );\n                // now h - is index of the root rehashed bucket b_old\n                this->mark_rehashed_levels( h ); // mark all non-rehashed children recursively across all segments\n                node_base* prev = nullptr;\n                node_base* curr = b_old->node_list.load(std::memory_order_relaxed);\n                while (this->is_valid(curr)) {\n                    hashcode_type curr_node_hash = my_hash_compare.hash(static_cast<node*>(curr)->value().first);\n\n                    if ((curr_node_hash & mask) != h) { // should be rehashed\n                        node_base* next = curr->next;\n                        // exclude from b_old\n                        if (prev == nullptr) {\n                            b_old->node_list.store(curr->next, std::memory_order_relaxed);\n                        } else {\n                            prev->next = curr->next;\n                        }\n                        bucket *b_new = this->get_bucket(curr_node_hash & mask);\n                        __TBB_ASSERT(!rehash_required(b_new->node_list.load(std::memory_order_relaxed)), \"hash() function changed for key in table or internal error\");\n                        this->add_to_bucket(b_new, curr);\n                        curr = next;\n                    } else {\n                        prev = curr;\n                        curr = curr->next;\n                    }\n                }\n            }\n        }\n    }\n\n    // Clear table\n    void clear() {\n        hashcode_type m = this->my_mask.load(std::memory_order_relaxed);\n        __TBB_ASSERT((m&(m+1))==0, \"data structure is invalid\");\n        this->my_size.store(0, std::memory_order_relaxed);\n        segment_index_type s = this->segment_index_of( m );\n        __TBB_ASSERT( s+1 == this->pointers_per_table || !this->my_table[s+1].load(std::memory_order_relaxed), \"wrong mask or concurrent grow\" );\n        do {\n            __TBB_ASSERT(this->is_valid(this->my_table[s].load(std::memory_order_relaxed)), \"wrong mask or concurrent grow\" );\n            segment_ptr_type buckets_ptr = this->my_table[s].load(std::memory_order_relaxed);\n            size_type sz = this->segment_size( s ? s : 1 );\n            for( segment_index_type i = 0; i < sz; i++ )\n                for( node_base *n = buckets_ptr[i].node_list.load(std::memory_order_relaxed);\n                    this->is_valid(n); n = buckets_ptr[i].node_list.load(std::memory_order_relaxed) )\n                {\n                    buckets_ptr[i].node_list.store(n->next, std::memory_order_relaxed);\n                    delete_node( n );\n                }\n            this->delete_segment(s);\n        } while(s-- > 0);\n        this->my_mask.store(this->embedded_buckets - 1, std::memory_order_relaxed);\n    }\n\n    // Clear table and destroy it.\n    ~concurrent_hash_map() { clear(); }\n\n    //------------------------------------------------------------------------\n    // Parallel algorithm support\n    //------------------------------------------------------------------------\n    range_type range( size_type grainsize=1 ) {\n        return range_type( *this, grainsize );\n    }\n    const_range_type range( size_type grainsize=1 ) const {\n        return const_range_type( *this, grainsize );\n    }\n\n    //------------------------------------------------------------------------\n    // STL support - not thread-safe methods\n    //------------------------------------------------------------------------\n    iterator begin() { return iterator( *this, 0, this->my_embedded_segment, this->my_embedded_segment->node_list.load(std::memory_order_relaxed) ); }\n    const_iterator begin() const { return const_iterator( *this, 0, this->my_embedded_segment, this->my_embedded_segment->node_list.load(std::memory_order_relaxed) ); }\n    const_iterator cbegin() const { return const_iterator( *this, 0, this->my_embedded_segment, this->my_embedded_segment->node_list.load(std::memory_order_relaxed) ); }\n    iterator end() { return iterator( *this, 0, nullptr, nullptr ); }\n    const_iterator end() const { return const_iterator( *this, 0, nullptr, nullptr ); }\n    const_iterator cend() const { return const_iterator( *this, 0, nullptr, nullptr ); }\n    std::pair<iterator, iterator> equal_range( const Key& key ) { return internal_equal_range( key, end() ); }\n    std::pair<const_iterator, const_iterator> equal_range( const Key& key ) const { return internal_equal_range( key, end() ); }\n\n    template <typename K>\n    typename std::enable_if<hash_compare_is_transparent<K>::value,\n                            std::pair<iterator, iterator>>::type equal_range( const K& key ) {\n        return internal_equal_range(key, end());\n    }\n\n    template <typename K>\n    typename std::enable_if<hash_compare_is_transparent<K>::value,\n                            std::pair<const_iterator, const_iterator>>::type equal_range( const K& key ) const {\n        return internal_equal_range(key, end());\n    }\n\n    // Number of items in table.\n    size_type size() const { return this->my_size.load(std::memory_order_acquire); }\n\n    // True if size()==0.\n    __TBB_nodiscard bool empty() const { return size() == 0; }\n\n    // Upper bound on size.\n    size_type max_size() const {\n        return allocator_traits_type::max_size(base_type::get_allocator());\n    }\n\n    // Returns the current number of buckets\n    size_type bucket_count() const { return this->my_mask.load(std::memory_order_relaxed) + 1; }\n\n    // return allocator object\n    allocator_type get_allocator() const { return base_type::get_allocator(); }\n\n    // swap two instances. Iterators are invalidated\n    void swap(concurrent_hash_map& table) {\n        using pocs_type = typename node_allocator_traits::propagate_on_container_swap;\n        using is_equal_type = typename node_allocator_traits::is_always_equal;\n        swap_allocators(this->my_allocator, table.my_allocator);\n        internal_swap(table, tbb::detail::disjunction<pocs_type, is_equal_type>());\n    }\n\n    //------------------------------------------------------------------------\n    // concurrent map operations\n    //------------------------------------------------------------------------\n\n    // Return count of items (0 or 1)\n    size_type count( const Key &key ) const {\n        return const_cast<concurrent_hash_map*>(this)->lookup</*insert*/false>(key, nullptr, nullptr, /*write=*/false, &do_not_allocate_node);\n    }\n\n    template <typename K>\n    typename std::enable_if<hash_compare_is_transparent<K>::value,\n                            size_type>::type count( const K& key ) const {\n        return const_cast<concurrent_hash_map*>(this)->lookup</*insert*/false>(key, nullptr, nullptr, /*write=*/false, &do_not_allocate_node);\n    }\n\n    // Find item and acquire a read lock on the item.\n    /** Return true if item is found, false otherwise. */\n    bool find( const_accessor &result, const Key &key ) const {\n        result.release();\n        return const_cast<concurrent_hash_map*>(this)->lookup</*insert*/false>(key, nullptr, &result, /*write=*/false, &do_not_allocate_node );\n    }\n\n    // Find item and acquire a write lock on the item.\n    /** Return true if item is found, false otherwise. */\n    bool find( accessor &result, const Key &key ) {\n        result.release();\n        return lookup</*insert*/false>(key, nullptr, &result, /*write=*/true, &do_not_allocate_node);\n    }\n\n    template <typename K>\n    typename std::enable_if<hash_compare_is_transparent<K>::value,\n                            bool>::type find( const_accessor& result, const K& key ) {\n        result.release();\n        return lookup</*insert*/false>(key, nullptr, &result, /*write=*/false, &do_not_allocate_node);\n    }\n\n    template <typename K>\n    typename std::enable_if<hash_compare_is_transparent<K>::value,\n                            bool>::type find( accessor& result, const K& key ) {\n        result.release();\n        return lookup</*insert*/false>(key, nullptr, &result, /*write=*/true, &do_not_allocate_node);\n    }\n\n    // Insert item (if not already present) and acquire a read lock on the item.\n    /** Returns true if item is new. */\n    bool insert( const_accessor &result, const Key &key ) {\n        result.release();\n        return lookup</*insert*/true>(key, nullptr, &result, /*write=*/false, &allocate_node_default_construct<>);\n    }\n\n    // Insert item (if not already present) and acquire a write lock on the item.\n    /** Returns true if item is new. */\n    bool insert( accessor &result, const Key &key ) {\n        result.release();\n        return lookup</*insert*/true>(key, nullptr, &result, /*write=*/true, &allocate_node_default_construct<>);\n    }\n\n    template <typename K>\n    typename std::enable_if<hash_compare_is_transparent<K>::value &&\n                            std::is_constructible<key_type, const K&>::value,\n                            bool>::type insert( const_accessor& result, const K& key ) {\n        result.release();\n        return lookup</*insert*/true>(key, nullptr, &result, /*write=*/false, &allocate_node_default_construct<K>);\n    }\n\n    template <typename K>\n    typename std::enable_if<hash_compare_is_transparent<K>::value &&\n                            std::is_constructible<key_type, const K&>::value,\n                            bool>::type insert( accessor& result, const K& key ) {\n        result.release();\n        return lookup</*insert*/true>(key, nullptr, &result, /*write=*/true, &allocate_node_default_construct<K>);\n    }\n\n    // Insert item by copying if there is no such key present already and acquire a read lock on the item.\n    /** Returns true if item is new. */\n    bool insert( const_accessor &result, const value_type &value ) {\n        result.release();\n        return lookup</*insert*/true>(value.first, &value.second, &result, /*write=*/false, &allocate_node_copy_construct);\n    }\n\n    // Insert item by copying if there is no such key present already and acquire a write lock on the item.\n    /** Returns true if item is new. */\n    bool insert( accessor &result, const value_type &value ) {\n        result.release();\n        return lookup</*insert*/true>(value.first, &value.second, &result, /*write=*/true, &allocate_node_copy_construct);\n    }\n\n    // Insert item by copying if there is no such key present already\n    /** Returns true if item is inserted. */\n    bool insert( const value_type &value ) {\n        return lookup</*insert*/true>(value.first, &value.second, nullptr, /*write=*/false, &allocate_node_copy_construct);\n    }\n\n    // Insert item by copying if there is no such key present already and acquire a read lock on the item.\n    /** Returns true if item is new. */\n    bool insert( const_accessor &result, value_type && value ) {\n        return generic_move_insert(result, std::move(value));\n    }\n\n    // Insert item by copying if there is no such key present already and acquire a write lock on the item.\n    /** Returns true if item is new. */\n    bool insert( accessor &result, value_type && value ) {\n        return generic_move_insert(result, std::move(value));\n    }\n\n    // Insert item by copying if there is no such key present already\n    /** Returns true if item is inserted. */\n    bool insert( value_type && value ) {\n        return generic_move_insert(accessor_not_used(), std::move(value));\n    }\n\n    // Insert item by copying if there is no such key present already and acquire a read lock on the item.\n    /** Returns true if item is new. */\n    template <typename... Args>\n    bool emplace( const_accessor &result, Args&&... args ) {\n        return generic_emplace(result, std::forward<Args>(args)...);\n    }\n\n    // Insert item by copying if there is no such key present already and acquire a write lock on the item.\n    /** Returns true if item is new. */\n    template <typename... Args>\n    bool emplace( accessor &result, Args&&... args ) {\n        return generic_emplace(result, std::forward<Args>(args)...);\n    }\n\n    // Insert item by copying if there is no such key present already\n    /** Returns true if item is inserted. */\n    template <typename... Args>\n    bool emplace( Args&&... args ) {\n        return generic_emplace(accessor_not_used(), std::forward<Args>(args)...);\n    }\n\n    // Insert range [first, last)\n    template <typename I>\n    void insert( I first, I last ) {\n        for ( ; first != last; ++first )\n            insert( *first );\n    }\n\n    // Insert initializer list\n    void insert( std::initializer_list<value_type> il ) {\n        insert( il.begin(), il.end() );\n    }\n\n    // Erase item.\n    /** Return true if item was erased by particularly this call. */\n    bool erase( const Key &key ) {\n        return internal_erase(key);\n    }\n\n    template <typename K>\n    typename std::enable_if<hash_compare_is_transparent<K>::value,\n                            bool>::type erase( const K& key ) {\n        return internal_erase(key);\n    }\n\n    // Erase item by const_accessor.\n    /** Return true if item was erased by particularly this call. */\n    bool erase( const_accessor& item_accessor ) {\n        return exclude( item_accessor );\n    }\n\n    // Erase item by accessor.\n    /** Return true if item was erased by particularly this call. */\n    bool erase( accessor& item_accessor ) {\n        return exclude( item_accessor );\n    }\n\nprotected:\n    template <typename K, typename AllocateNodeType>\n    node* allocate_node_helper( const K& key, const T* t, AllocateNodeType allocate_node, std::true_type ) {\n        return allocate_node(base_type::get_allocator(), key, t);\n    }\n\n    template <typename K, typename AllocateNodeType>\n    node* allocate_node_helper( const K&, const T*, AllocateNodeType, std::false_type ) {\n        __TBB_ASSERT(false, \"allocate_node_helper with std::false_type should never been called\");\n        return nullptr;\n    }\n\n    // Insert or find item and optionally acquire a lock on the item.\n    template <bool OpInsert, typename K, typename AllocateNodeType>\n    bool lookup( const K &key, const T *t, const_accessor *result, bool write, AllocateNodeType allocate_node, node *tmp_n  = nullptr)\n    {\n        __TBB_ASSERT( !result || !result->my_node, nullptr );\n        bool return_value;\n        hashcode_type const h = my_hash_compare.hash( key );\n        hashcode_type m = this->my_mask.load(std::memory_order_acquire);\n        segment_index_type grow_segment = 0;\n        node *n;\n        restart:\n        {//lock scope\n            __TBB_ASSERT((m&(m+1))==0, \"data structure is invalid\");\n            return_value = false;\n            // get bucket\n            bucket_accessor b( this, h & m );\n            // find a node\n            n = search_bucket( key, b() );\n            if( OpInsert ) {\n                // [opt] insert a key\n                if( !n ) {\n                    if( !tmp_n ) {\n                        tmp_n = allocate_node_helper(key, t, allocate_node, std::integral_constant<bool, OpInsert>{});\n                    }\n                    while ( !b.is_writer() && !b.upgrade_to_writer() ) { // TODO: improved insertion\n                        // Rerun search list, in case another thread inserted the intem during the upgrade\n                        n = search_bucket(key, b());\n                        if (this->is_valid(n)) { // unfortunately, it did\n                            if (!b.downgrade_to_reader()) {\n                                // If the lock was downgraded with reacquiring the mutex\n                                // Rerun search list in case another thread removed the item during the downgrade\n                                n = search_bucket(key, b());\n                                if (!this->is_valid(n)) {\n                                    // Unfortunately, it did\n                                    // We need to try upgrading to writer again\n                                    continue;\n                                }\n                            }\n                            goto exists;\n                        }\n                    }\n\n                    if( this->check_mask_race(h, m) )\n                        goto restart; // b.release() is done in ~b().\n                    // insert and set flag to grow the container\n                    grow_segment = this->insert_new_node( b(), n = tmp_n, m );\n                    tmp_n = nullptr;\n                    return_value = true;\n                }\n            } else { // find or count\n                if( !n ) {\n                    if( this->check_mask_race( h, m ) )\n                        goto restart; // b.release() is done in ~b(). TODO: replace by continue\n                    return false;\n                }\n                return_value = true;\n            }\n        exists:\n            if( !result ) goto check_growth;\n            // TODO: the following seems as generic/regular operation\n            // acquire the item\n            if( !result->try_acquire( n->mutex, write ) ) {\n                for( tbb::detail::atomic_backoff backoff(true);; ) {\n                    if( result->try_acquire( n->mutex, write ) ) break;\n                    if( !backoff.bounded_pause() ) {\n                        // the wait takes really long, restart the operation\n                        b.release();\n                        __TBB_ASSERT( !OpInsert || !return_value, \"Can't acquire new item in locked bucket?\" );\n                        yield();\n                        m = this->my_mask.load(std::memory_order_acquire);\n                        goto restart;\n                    }\n                }\n            }\n        }//lock scope\n        result->my_node = n;\n        result->my_hash = h;\n    check_growth:\n        // [opt] grow the container\n        if( grow_segment ) {\n            this->enable_segment( grow_segment );\n        }\n        if( tmp_n ) // if OpInsert only\n            delete_node( tmp_n );\n        return return_value;\n    }\n\n    struct accessor_not_used { void release(){}};\n    friend const_accessor* accessor_location( accessor_not_used const& ){ return nullptr;}\n    friend const_accessor* accessor_location( const_accessor & a )      { return &a;}\n\n    friend bool is_write_access_needed( accessor const& )           { return true;}\n    friend bool is_write_access_needed( const_accessor const& )     { return false;}\n    friend bool is_write_access_needed( accessor_not_used const& )  { return false;}\n\n    template <typename Accessor>\n    bool generic_move_insert( Accessor && result, value_type && value ) {\n        result.release();\n        return lookup</*insert*/true>(value.first, &value.second, accessor_location(result), is_write_access_needed(result), &allocate_node_move_construct);\n    }\n\n    template <typename Accessor, typename... Args>\n    bool generic_emplace( Accessor && result, Args &&... args ) {\n        result.release();\n        node * node_ptr = create_node(base_type::get_allocator(), std::forward<Args>(args)...);\n        return lookup</*insert*/true>(node_ptr->value().first, nullptr, accessor_location(result), is_write_access_needed(result), &do_not_allocate_node, node_ptr);\n    }\n\n    // delete item by accessor\n    bool exclude( const_accessor &item_accessor ) {\n        __TBB_ASSERT( item_accessor.my_node, nullptr );\n        node_base *const exclude_node = item_accessor.my_node;\n        hashcode_type const hash = item_accessor.my_hash;\n        hashcode_type mask = this->my_mask.load(std::memory_order_acquire);\n        do {\n            // get bucket\n            bucket_accessor b( this, hash & mask, /*writer=*/true );\n            node_base* prev = nullptr;\n            node_base* curr = b()->node_list.load(std::memory_order_relaxed);\n\n            while (curr && curr != exclude_node) {\n                prev = curr;\n                curr = curr->next;\n            }\n\n            if (curr == nullptr) { // someone else was first\n                if (this->check_mask_race(hash, mask))\n                    continue;\n                item_accessor.release();\n                return false;\n            }\n            __TBB_ASSERT( curr == exclude_node, nullptr );\n            // remove from container\n            if (prev == nullptr) {\n                b()->node_list.store(curr->next, std::memory_order_relaxed);\n            } else {\n                prev->next = curr->next;\n            }\n\n            this->my_size--;\n            break;\n        } while(true);\n        if (!item_accessor.is_writer()) { // need to get exclusive lock\n            item_accessor.upgrade_to_writer(); // return value means nothing here\n        }\n\n        item_accessor.release();\n        delete_node(exclude_node); // Only one thread can delete it\n        return true;\n    }\n\n    template <typename K>\n    bool internal_erase( const K& key ) {\n        node_base *erase_node;\n        hashcode_type const hash = my_hash_compare.hash(key);\n        hashcode_type mask = this->my_mask.load(std::memory_order_acquire);\n    restart:\n        {//lock scope\n            // get bucket\n            bucket_accessor b( this, hash & mask );\n        search:\n            node_base* prev = nullptr;\n            erase_node = b()->node_list.load(std::memory_order_relaxed);\n            while (this->is_valid(erase_node) && !my_hash_compare.equal(key, static_cast<node*>(erase_node)->value().first ) ) {\n                prev = erase_node;\n                erase_node = erase_node->next;\n            }\n\n            if (erase_node == nullptr) { // not found, but mask could be changed\n                if (this->check_mask_race(hash, mask))\n                    goto restart;\n                return false;\n            } else if (!b.is_writer() && !b.upgrade_to_writer()) {\n                if (this->check_mask_race(hash, mask)) // contended upgrade, check mask\n                    goto restart;\n                goto search;\n            }\n\n            // remove from container\n            if (prev == nullptr) {\n                b()->node_list.store(erase_node->next, std::memory_order_relaxed);\n            } else {\n                prev->next = erase_node->next;\n            }\n            this->my_size--;\n        }\n        {\n            typename node::scoped_type item_locker( erase_node->mutex, /*write=*/true );\n        }\n        // note: there should be no threads pretending to acquire this mutex again, do not try to upgrade const_accessor!\n        delete_node(erase_node); // Only one thread can delete it due to write lock on the bucket\n        return true;\n    }\n\n    // Returns an iterator for an item defined by the key, or for the next item after it (if upper==true)\n    template <typename K, typename I>\n    std::pair<I, I> internal_equal_range( const K& key, I end_ ) const {\n        hashcode_type h = my_hash_compare.hash( key );\n        hashcode_type m = this->my_mask.load(std::memory_order_relaxed);\n        __TBB_ASSERT((m&(m+1))==0, \"data structure is invalid\");\n        h &= m;\n        bucket *b = this->get_bucket( h );\n        while (rehash_required(b->node_list.load(std::memory_order_relaxed))) {\n            m = ( hashcode_type(1) << tbb::detail::log2( h ) ) - 1; // get parent mask from the topmost bit\n            b = this->get_bucket( h &= m );\n        }\n        node *n = search_bucket( key, b );\n        if( !n )\n            return std::make_pair(end_, end_);\n        iterator lower(*this, h, b, n), upper(lower);\n        return std::make_pair(lower, ++upper);\n    }\n\n    // Copy \"source\" to *this, where *this must start out empty.\n    void internal_copy( const concurrent_hash_map& source ) {\n        hashcode_type mask = source.my_mask.load(std::memory_order_relaxed);\n        if( this->my_mask.load(std::memory_order_relaxed) == mask ) { // optimized version\n            this->reserve(source.my_size.load(std::memory_order_relaxed)); // TODO: load_factor?\n            bucket *dst = nullptr, *src = nullptr;\n            bool rehashing_required = false;\n            for( hashcode_type k = 0; k <= mask; k++ ) {\n                if( k & (k-2) ) ++dst,src++; // not the beginning of a segment\n                else { dst = this->get_bucket( k ); src = source.get_bucket( k ); }\n                __TBB_ASSERT(!rehash_required(dst->node_list.load(std::memory_order_relaxed)), \"Invalid bucket in destination table\");\n                node *n = static_cast<node*>( src->node_list.load(std::memory_order_relaxed) );\n                if (rehash_required(n)) { // source is not rehashed, items are in previous buckets\n                    rehashing_required = true;\n                    dst->node_list.store(reinterpret_cast<node_base*>(rehash_req_flag), std::memory_order_relaxed);\n                } else for(; n; n = static_cast<node*>( n->next ) ) {\n                    node* node_ptr = create_node(base_type::get_allocator(), n->value().first, n->value().second);\n                    this->add_to_bucket( dst, node_ptr);\n                    this->my_size.fetch_add(1, std::memory_order_relaxed);\n                }\n            }\n            if( rehashing_required ) rehash();\n        } else internal_copy(source.begin(), source.end(), source.my_size.load(std::memory_order_relaxed));\n    }\n\n    template <typename I>\n    void internal_copy( I first, I last, size_type reserve_size ) {\n        this->reserve(reserve_size); // TODO: load_factor?\n        hashcode_type m = this->my_mask.load(std::memory_order_relaxed);\n        for(; first != last; ++first) {\n            hashcode_type h = my_hash_compare.hash( (*first).first );\n            bucket *b = this->get_bucket( h & m );\n            __TBB_ASSERT(!rehash_required(b->node_list.load(std::memory_order_relaxed)), \"Invalid bucket in destination table\");\n            node* node_ptr = create_node(base_type::get_allocator(), (*first).first, (*first).second);\n            this->add_to_bucket( b, node_ptr );\n            ++this->my_size; // TODO: replace by non-atomic op\n        }\n    }\n\n    void internal_move_construct_with_allocator( concurrent_hash_map&& other, const allocator_type&,\n                                                /*is_always_equal=*/std::true_type )\n    {\n        this->internal_move(std::move(other));\n    }\n\n    void internal_move_construct_with_allocator( concurrent_hash_map&& other, const allocator_type& a,\n                                                /*is_always_equal=*/std::false_type )\n    {\n        if (a == other.get_allocator()){\n            this->internal_move(std::move(other));\n        } else {\n            try_call( [&] {\n                internal_copy(std::make_move_iterator(other.begin()), std::make_move_iterator(other.end()),\n                    other.size());\n            }).on_exception( [&] {\n                this->clear();\n            });\n        }\n    }\n\n    void internal_move_assign( concurrent_hash_map&& other,\n        /*is_always_equal || POCMA = */std::true_type)\n    {\n        this->internal_move(std::move(other));\n    }\n\n    void internal_move_assign(concurrent_hash_map&& other, /*is_always_equal=*/ std::false_type) {\n        if (this->my_allocator == other.my_allocator) {\n            this->internal_move(std::move(other));\n        } else {\n            //do per element move\n            internal_copy(std::make_move_iterator(other.begin()), std::make_move_iterator(other.end()),\n                other.size());\n        }\n    }\n\n    void internal_swap(concurrent_hash_map& other, /*is_always_equal || POCS = */ std::true_type) {\n        this->internal_swap_content(other);\n    }\n\n    void internal_swap(concurrent_hash_map& other, /*is_always_equal || POCS = */ std::false_type) {\n        __TBB_ASSERT(this->my_allocator == other.my_allocator, nullptr);\n        this->internal_swap_content(other);\n    }\n\n    // Fast find when no concurrent erasure is used. For internal use inside TBB only!\n    /** Return pointer to item with given key, or nullptr if no such item exists.\n        Must not be called concurrently with erasure operations. */\n    const_pointer internal_fast_find( const Key& key ) const {\n        hashcode_type h = my_hash_compare.hash( key );\n        hashcode_type m = this->my_mask.load(std::memory_order_acquire);\n        node *n;\n    restart:\n        __TBB_ASSERT((m&(m+1))==0, \"data structure is invalid\");\n        bucket *b = this->get_bucket( h & m );\n        // TODO: actually, notification is unnecessary here, just hiding double-check\n        if (rehash_required(b->node_list.load(std::memory_order_acquire)))\n        {\n            typename bucket::scoped_type lock;\n            if( lock.try_acquire( b->mutex, /*write=*/true ) ) {\n                if (rehash_required(b->node_list.load(std::memory_order_relaxed)))\n                    const_cast<concurrent_hash_map*>(this)->rehash_bucket( b, h & m ); //recursive rehashing\n            }\n            else lock.acquire( b->mutex, /*write=*/false );\n            __TBB_ASSERT(!rehash_required(b->node_list.load(std::memory_order_relaxed)), nullptr);\n        }\n        n = search_bucket( key, b );\n        if( n )\n            return n->storage();\n        else if( this->check_mask_race( h, m ) )\n            goto restart;\n        return nullptr;\n    }\n};\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\ntemplate <typename It,\n          typename HashCompare = d1::tbb_hash_compare<iterator_key_t<It>>,\n          typename Alloc = tbb_allocator<iterator_alloc_pair_t<It>>,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<HashCompare>>>\nconcurrent_hash_map( It, It, HashCompare = HashCompare(), Alloc = Alloc() )\n-> concurrent_hash_map<iterator_key_t<It>, iterator_mapped_t<It>, HashCompare, Alloc>;\n\ntemplate <typename It, typename Alloc,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_hash_map( It, It, Alloc )\n-> concurrent_hash_map<iterator_key_t<It>, iterator_mapped_t<It>, d1::tbb_hash_compare<iterator_key_t<It>>, Alloc>;\n\ntemplate <typename Key, typename T,\n          typename HashCompare = d1::tbb_hash_compare<std::remove_const_t<Key>>,\n          typename Alloc = tbb_allocator<std::pair<const Key, T>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<HashCompare>>>\nconcurrent_hash_map( std::initializer_list<std::pair<Key, T>>, HashCompare = HashCompare(), Alloc = Alloc() )\n-> concurrent_hash_map<std::remove_const_t<Key>, T, HashCompare, Alloc>;\n\ntemplate <typename Key, typename T, typename Alloc,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_hash_map( std::initializer_list<std::pair<Key, T>>, Alloc )\n-> concurrent_hash_map<std::remove_const_t<Key>, T, d1::tbb_hash_compare<std::remove_const_t<Key>>, Alloc>;\n\n#endif /* __TBB_CPP17_DEDUCTION_GUIDES_PRESENT */\n\ntemplate <typename Key, typename T, typename HashCompare, typename A1, typename A2>\ninline bool operator==(const concurrent_hash_map<Key, T, HashCompare, A1> &a, const concurrent_hash_map<Key, T, HashCompare, A2> &b) {\n    if(a.size() != b.size()) return false;\n    typename concurrent_hash_map<Key, T, HashCompare, A1>::const_iterator i(a.begin()), i_end(a.end());\n    typename concurrent_hash_map<Key, T, HashCompare, A2>::const_iterator j, j_end(b.end());\n    for(; i != i_end; ++i) {\n        j = b.equal_range(i->first).first;\n        if( j == j_end || !(i->second == j->second) ) return false;\n    }\n    return true;\n}\n\n#if !__TBB_CPP20_COMPARISONS_PRESENT\ntemplate <typename Key, typename T, typename HashCompare, typename A1, typename A2>\ninline bool operator!=(const concurrent_hash_map<Key, T, HashCompare, A1> &a, const concurrent_hash_map<Key, T, HashCompare, A2> &b)\n{    return !(a == b); }\n#endif // !__TBB_CPP20_COMPARISONS_PRESENT\n\ntemplate <typename Key, typename T, typename HashCompare, typename A>\ninline void swap(concurrent_hash_map<Key, T, HashCompare, A> &a, concurrent_hash_map<Key, T, HashCompare, A> &b)\n{    a.swap( b ); }\n\n} // namespace d2\n} // namespace detail\n\ninline namespace v1 {\n    using detail::split;\n    using detail::d2::concurrent_hash_map;\n    using detail::d1::tbb_hash_compare;\n} // namespace v1\n\n} // namespace tbb\n\n#endif /* __TBB_concurrent_hash_map_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/concurrent_lru_cache.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_concurrent_lru_cache_H\n#define __TBB_concurrent_lru_cache_H\n\n#if ! TBB_PREVIEW_CONCURRENT_LRU_CACHE\n    #error Set TBB_PREVIEW_CONCURRENT_LRU_CACHE to include concurrent_lru_cache.h\n#endif\n\n#include \"detail/_assert.h\"\n#include \"detail/_aggregator.h\"\n\n#include <map>       // for std::map\n#include <list>      // for std::list\n#include <utility>   // for std::make_pair\n#include <algorithm> // for std::find\n#include <atomic>    // for std::atomic<bool>\n\nnamespace tbb {\n\nnamespace detail {\nnamespace d1 {\n\n//-----------------------------------------------------------------------------\n// Concurrent LRU cache\n//-----------------------------------------------------------------------------\n\ntemplate<typename KeyT, typename ValT, typename KeyToValFunctorT = ValT (*) (KeyT)>\nclass concurrent_lru_cache : no_assign {\n// incapsulated helper classes\nprivate:\n    struct handle_object;\n    struct storage_map_value_type;\n\n    struct aggregator_operation;\n    struct retrieve_aggregator_operation;\n    struct signal_end_of_usage_aggregator_operation;\n\n// typedefs\npublic:\n    using key_type = KeyT;\n    using value_type = ValT;\n    using pointer = ValT*;\n    using reference = ValT&;\n    using const_pointer = const ValT*;\n    using const_reference = const ValT&;\n\n    using value_function_type = KeyToValFunctorT;\n    using handle = handle_object;\nprivate:\n    using lru_cache_type = concurrent_lru_cache<KeyT, ValT, KeyToValFunctorT>;\n\n    using storage_map_type = std::map<key_type, storage_map_value_type>;\n    using storage_map_iterator_type = typename storage_map_type::iterator;\n    using storage_map_pointer_type = typename storage_map_type::pointer;\n    using storage_map_reference_type = typename storage_map_type::reference;\n\n    using history_list_type = std::list<storage_map_iterator_type>;\n    using history_list_iterator_type = typename history_list_type::iterator;\n\n    using aggregator_operation_type = aggregator_operation;\n    using aggregator_function_type = aggregating_functor<lru_cache_type, aggregator_operation_type>;\n    using aggregator_type = aggregator<aggregator_function_type, aggregator_operation_type>;\n\n    friend class aggregating_functor<lru_cache_type,aggregator_operation_type>;\n\n// fields\nprivate:\n    value_function_type my_value_function;\n    aggregator_type my_aggregator;\n\n    storage_map_type my_storage_map;            // storage map for used objects\n    history_list_type my_history_list;          // history list for unused objects\n    const std::size_t my_history_list_capacity; // history list's allowed capacity\n\n// interface\npublic:\n\n    concurrent_lru_cache(value_function_type value_function, std::size_t cache_capacity)\n        : my_value_function(value_function), my_history_list_capacity(cache_capacity) {\n        my_aggregator.initialize_handler(aggregator_function_type(this));\n    }\n\n    handle operator[](key_type key) {\n        retrieve_aggregator_operation op(key);\n        my_aggregator.execute(&op);\n\n        if (op.is_new_value_needed()) {\n            op.result().second.my_value = my_value_function(key);\n            op.result().second.my_is_ready.store(true, std::memory_order_release);\n        } else {\n            spin_wait_while_eq(op.result().second.my_is_ready, false);\n        }\n\n        return handle(*this, op.result());\n    }\n\nprivate:\n\n    void handle_operations(aggregator_operation* op_list) {\n        while (op_list) {\n            op_list->cast_and_handle(*this);\n            aggregator_operation* prev_op = op_list;\n            op_list = op_list->next;\n\n            (prev_op->status).store(1, std::memory_order_release);\n        }\n    }\n\n    void signal_end_of_usage(storage_map_reference_type map_record_ref) {\n        signal_end_of_usage_aggregator_operation op(map_record_ref);\n        my_aggregator.execute(&op);\n    }\n\n    void signal_end_of_usage_serial(storage_map_reference_type map_record_ref) {\n        storage_map_iterator_type map_it = my_storage_map.find(map_record_ref.first);\n\n        __TBB_ASSERT(map_it != my_storage_map.end(),\n            \"cache should not return past-end iterators to outer world\");\n        __TBB_ASSERT(&(*map_it) == &map_record_ref,\n            \"dangling reference has been returned to outside world: data race?\");\n        __TBB_ASSERT(std::find(my_history_list.begin(), my_history_list.end(), map_it) == my_history_list.end(),\n            \"object in use should not be in list of unused objects \");\n\n        // if it was the last reference, put it to the LRU history\n        if (! --(map_it->second.my_ref_counter)) {\n            // if the LRU history is full, evict the oldest items to get space\n            if (my_history_list.size() >= my_history_list_capacity) {\n                if (my_history_list_capacity == 0) {\n                    // Since LRU history capacity is zero, there is no need to keep the element in history\n                    my_storage_map.erase(map_it);\n                    return;\n                }\n                std::size_t number_of_elements_to_evict = 1 + my_history_list.size() - my_history_list_capacity;\n\n                for (std::size_t i = 0; i < number_of_elements_to_evict; ++i) {\n                    storage_map_iterator_type map_it_to_evict = my_history_list.back();\n\n                    __TBB_ASSERT(map_it_to_evict->second.my_ref_counter == 0,\n                        \"item to be evicted should not have a live references\");\n\n                    // TODO: can we use forward_list instead of list? pop_front / insert_after last\n                    my_history_list.pop_back();\n                    my_storage_map.erase(map_it_to_evict);\n                }\n            }\n\n            // TODO: can we use forward_list instead of list? pop_front / insert_after last\n            my_history_list.push_front(map_it);\n            map_it->second.my_history_list_iterator = my_history_list.begin();\n        }\n    }\n\n    storage_map_reference_type retrieve_serial(key_type key, bool& is_new_value_needed) {\n        storage_map_iterator_type map_it = my_storage_map.find(key);\n\n        if (map_it == my_storage_map.end()) {\n            map_it = my_storage_map.emplace_hint(\n                map_it, std::piecewise_construct, std::make_tuple(key), std::make_tuple(value_type(), 0, my_history_list.end(), false));\n            is_new_value_needed = true;\n        } else {\n            history_list_iterator_type list_it = map_it->second.my_history_list_iterator;\n            if (list_it != my_history_list.end()) {\n                __TBB_ASSERT(map_it->second.my_ref_counter == 0,\n                    \"item to be evicted should not have a live references\");\n\n                // Item is going to be used. Therefore it is not a subject for eviction,\n                // so we remove it from LRU history.\n                my_history_list.erase(list_it);\n                map_it->second.my_history_list_iterator = my_history_list.end();\n            }\n        }\n\n        ++(map_it->second.my_ref_counter);\n        return *map_it;\n    }\n};\n\n//-----------------------------------------------------------------------------\n// Value type for storage map in concurrent LRU cache\n//-----------------------------------------------------------------------------\n\ntemplate<typename KeyT, typename ValT, typename KeyToValFunctorT>\nstruct concurrent_lru_cache<KeyT, ValT, KeyToValFunctorT>::storage_map_value_type {\n//typedefs\npublic:\n    using ref_counter_type = std::size_t;\n\n// fields\npublic:\n    value_type my_value;\n    ref_counter_type my_ref_counter;\n    history_list_iterator_type my_history_list_iterator;\n    std::atomic<bool> my_is_ready;\n\n// interface\npublic:\n    storage_map_value_type(\n        value_type const& value, ref_counter_type ref_counter,\n        history_list_iterator_type history_list_iterator, bool is_ready)\n        : my_value(value), my_ref_counter(ref_counter),\n          my_history_list_iterator(history_list_iterator), my_is_ready(is_ready) {}\n};\n\n//-----------------------------------------------------------------------------\n// Handle object for operator[] in concurrent LRU cache\n//-----------------------------------------------------------------------------\n\ntemplate<typename KeyT, typename ValT, typename KeyToValFunctorT>\nstruct concurrent_lru_cache<KeyT, ValT, KeyToValFunctorT>::handle_object {\n// fields\nprivate:\n    lru_cache_type* my_lru_cache_ptr;\n    storage_map_pointer_type my_map_record_ptr;\n\n// interface\npublic:\n    handle_object()\n        : my_lru_cache_ptr(nullptr), my_map_record_ptr(nullptr) {}\n    handle_object(lru_cache_type& lru_cache_ref, storage_map_reference_type map_record_ref)\n        : my_lru_cache_ptr(&lru_cache_ref), my_map_record_ptr(&map_record_ref) {}\n\n    handle_object(handle_object&) = delete;\n    void operator=(handle_object&) = delete;\n\n    handle_object(handle_object&& other)\n        : my_lru_cache_ptr(other.my_lru_cache_ptr), my_map_record_ptr(other.my_map_record_ptr) {\n\n        __TBB_ASSERT(\n            (other.my_lru_cache_ptr != nullptr && other.my_map_record_ptr != nullptr) ||\n            (other.my_lru_cache_ptr == nullptr && other.my_map_record_ptr == nullptr),\n            \"invalid state of moving object?\");\n\n        other.my_lru_cache_ptr = nullptr;\n        other.my_map_record_ptr = nullptr;\n    }\n\n    handle_object& operator=(handle_object&& other) {\n        __TBB_ASSERT(\n            (other.my_lru_cache_ptr != nullptr && other.my_map_record_ptr != nullptr) ||\n            (other.my_lru_cache_ptr == nullptr && other.my_map_record_ptr == nullptr),\n            \"invalid state of moving object?\");\n\n        if (my_lru_cache_ptr)\n            my_lru_cache_ptr->signal_end_of_usage(*my_map_record_ptr);\n\n        my_lru_cache_ptr = other.my_lru_cache_ptr;\n        my_map_record_ptr = other.my_map_record_ptr;\n        other.my_lru_cache_ptr = nullptr;\n        other.my_map_record_ptr = nullptr;\n\n        return *this;\n    }\n\n    ~handle_object() {\n        if (my_lru_cache_ptr)\n            my_lru_cache_ptr->signal_end_of_usage(*my_map_record_ptr);\n    }\n\n    operator bool() const {\n        return (my_lru_cache_ptr && my_map_record_ptr);\n    }\n\n    value_type& value() {\n        __TBB_ASSERT(my_lru_cache_ptr, \"get value from already moved object?\");\n        __TBB_ASSERT(my_map_record_ptr, \"get value from an invalid or already moved object?\");\n\n        return my_map_record_ptr->second.my_value;\n    }\n};\n\n//-----------------------------------------------------------------------------\n// Aggregator operation for aggregator type in concurrent LRU cache\n//-----------------------------------------------------------------------------\n\ntemplate<typename KeyT, typename ValT, typename KeyToValFunctorT>\nstruct concurrent_lru_cache<KeyT, ValT, KeyToValFunctorT>::aggregator_operation\n    : aggregated_operation<aggregator_operation> {\n// incapsulated helper classes\npublic:\n    enum class op_type { retrieve, signal_end_of_usage };\n\n// fields\nprivate:\n    op_type my_op;\n\n// interface\npublic:\n    aggregator_operation(op_type op) : my_op(op) {}\n\n    // TODO: aggregator_operation can be implemented\n    //   - as a statically typed variant type or CRTP? (static, dependent on the use case)\n    //   - or use pointer to function and apply_visitor (dynamic)\n    //   - or use virtual functions (dynamic)\n    void cast_and_handle(lru_cache_type& lru_cache_ref) {\n        if (my_op == op_type::retrieve)\n            static_cast<retrieve_aggregator_operation*>(this)->handle(lru_cache_ref);\n        else\n            static_cast<signal_end_of_usage_aggregator_operation*>(this)->handle(lru_cache_ref);\n    }\n};\n\ntemplate<typename KeyT, typename ValT, typename KeyToValFunctorT>\nstruct concurrent_lru_cache<KeyT, ValT, KeyToValFunctorT>::retrieve_aggregator_operation\n    : aggregator_operation, private no_assign {\npublic:\n    key_type my_key;\n    storage_map_pointer_type my_map_record_ptr;\n    bool my_is_new_value_needed;\n\npublic:\n    retrieve_aggregator_operation(key_type key)\n        : aggregator_operation(aggregator_operation::op_type::retrieve),\n          my_key(key), my_map_record_ptr(nullptr), my_is_new_value_needed(false) {}\n\n    void handle(lru_cache_type& lru_cache_ref) {\n        my_map_record_ptr = &lru_cache_ref.retrieve_serial(my_key, my_is_new_value_needed);\n    }\n\n    storage_map_reference_type result() {\n        __TBB_ASSERT(my_map_record_ptr, \"Attempt to call result() before calling handle()\");\n        return *my_map_record_ptr;\n    }\n\n    bool is_new_value_needed() { return my_is_new_value_needed; }\n};\n\ntemplate<typename KeyT, typename ValT, typename KeyToValFunctorT>\nstruct concurrent_lru_cache<KeyT, ValT, KeyToValFunctorT>::signal_end_of_usage_aggregator_operation\n    : aggregator_operation, private no_assign {\n\nprivate:\n    storage_map_reference_type my_map_record_ref;\n\npublic:\n    signal_end_of_usage_aggregator_operation(storage_map_reference_type map_record_ref)\n        : aggregator_operation(aggregator_operation::op_type::signal_end_of_usage),\n          my_map_record_ref(map_record_ref) {}\n\n    void handle(lru_cache_type& lru_cache_ref) {\n        lru_cache_ref.signal_end_of_usage_serial(my_map_record_ref);\n    }\n};\n\n// TODO: if we have guarantees that KeyToValFunctorT always have\n//       ValT as a return type and KeyT as an argument type\n//       we can deduce template parameters of concurrent_lru_cache\n//       by pattern matching on KeyToValFunctorT\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\n\nusing detail::d1::concurrent_lru_cache;\n\n} // inline namespace v1\n} // namespace tbb\n\n#endif // __TBB_concurrent_lru_cache_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/concurrent_map.h",
    "content": "/*\n    Copyright (c) 2019-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_concurrent_map_H\n#define __TBB_concurrent_map_H\n\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_concurrent_skip_list.h\"\n#include \"tbb_allocator.h\"\n#include <functional>\n#include <tuple>\n#include <utility>\n\nnamespace tbb {\nnamespace detail {\nnamespace d2 {\n\ntemplate<typename Key, typename Value, typename KeyCompare, typename RandomGenerator,\n         typename Allocator, bool AllowMultimapping>\nstruct map_traits {\n    static constexpr std::size_t max_level = RandomGenerator::max_level;\n    using random_level_generator_type = RandomGenerator;\n    using key_type = Key;\n    using mapped_type = Value;\n    using compare_type = KeyCompare;\n    using value_type = std::pair<const key_type, mapped_type>;\n    using reference = value_type&;\n    using const_reference = const value_type&;\n    using allocator_type = Allocator;\n\n    static constexpr bool allow_multimapping = AllowMultimapping;\n\n    class value_compare {\n    public:\n        bool operator()(const value_type& lhs, const value_type& rhs) const {\n            return comp(lhs.first, rhs.first);\n        }\n\n    protected:\n        value_compare(compare_type c) : comp(c) {}\n\n        friend struct map_traits;\n\n        compare_type comp;\n    };\n\n    static value_compare value_comp(compare_type comp) { return value_compare(comp); }\n\n    static const key_type& get_key(const_reference val) {\n        return val.first;\n    }\n}; // struct map_traits\n\ntemplate <typename Key, typename Value, typename Compare, typename Allocator>\nclass concurrent_multimap;\n\ntemplate <typename Key, typename Value, typename Compare = std::less<Key>, typename Allocator = tbb::tbb_allocator<std::pair<const Key, Value>>>\nclass concurrent_map : public concurrent_skip_list<map_traits<Key, Value, Compare, concurrent_geometric_level_generator<32>, Allocator, false>> {\n    using base_type = concurrent_skip_list<map_traits<Key, Value, Compare, concurrent_geometric_level_generator<32>, Allocator, false>>;\npublic:\n    using key_type = Key;\n    using mapped_type = Value;\n    using value_type = typename base_type::value_type;\n    using size_type = typename base_type::size_type;\n    using difference_type = typename base_type::difference_type;\n    using key_compare = Compare;\n    using value_compare = typename base_type::value_compare;\n    using allocator_type = Allocator;\n\n    using reference = typename base_type::reference;\n    using const_reference = typename base_type::const_reference;\n    using pointer = typename base_type::pointer;\n    using const_pointer = typename base_type::const_pointer;\n\n    using iterator = typename base_type::iterator;\n    using const_iterator = typename base_type::const_iterator;\n\n    using node_type = typename base_type::node_type;\n\n    // Include constructors of base type\n    using base_type::base_type;\n\n    // Required for implicit deduction guides\n    concurrent_map() = default;\n    concurrent_map( const concurrent_map& ) = default;\n    concurrent_map( const concurrent_map& other, const allocator_type& alloc ) : base_type(other, alloc) {}\n    concurrent_map( concurrent_map&& ) = default;\n    concurrent_map( concurrent_map&& other, const allocator_type& alloc ) : base_type(std::move(other), alloc) {}\n    // Required to respect the rule of 5\n    concurrent_map& operator=( const concurrent_map& ) = default;\n    concurrent_map& operator=( concurrent_map&& ) = default;\n\n    concurrent_map& operator=( std::initializer_list<value_type> il ) {\n        base_type::operator= (il);\n        return *this;\n    }\n\n    // Observers\n    mapped_type& at(const key_type& key) {\n        iterator it = this->find(key);\n\n        if (it == this->end()) {\n            throw_exception(exception_id::invalid_key);\n        }\n        return it->second;\n    }\n\n    const mapped_type& at(const key_type& key) const {\n        return const_cast<concurrent_map*>(this)->at(key);\n    }\n\n    mapped_type& operator[](const key_type& key) {\n        iterator it = this->find(key);\n\n        if (it == this->end()) {\n            it = this->emplace(std::piecewise_construct, std::forward_as_tuple(key), std::tuple<>()).first;\n        }\n        return it->second;\n    }\n\n    mapped_type& operator[](key_type&& key) {\n        iterator it = this->find(key);\n\n        if (it == this->end()) {\n            it = this->emplace(std::piecewise_construct, std::forward_as_tuple(std::move(key)), std::tuple<>()).first;\n        }\n        return it->second;\n    }\n\n    using base_type::insert;\n\n    template <typename P>\n    typename std::enable_if<std::is_constructible<value_type, P&&>::value,\n                            std::pair<iterator, bool>>::type insert( P&& value )\n    {\n        return this->emplace(std::forward<P>(value));\n    }\n\n    template <typename P>\n    typename std::enable_if<std::is_constructible<value_type, P&&>::value,\n                            iterator>::type insert( const_iterator hint, P&& value )\n    {\n        return this->emplace_hint(hint, std::forward<P>(value));\n    }\n\n    template<typename OtherCompare>\n    void merge(concurrent_map<key_type, mapped_type, OtherCompare, Allocator>& source) {\n        this->internal_merge(source);\n    }\n\n    template<typename OtherCompare>\n    void merge(concurrent_map<key_type, mapped_type, OtherCompare, Allocator>&& source) {\n        this->internal_merge(std::move(source));\n    }\n\n    template<typename OtherCompare>\n    void merge(concurrent_multimap<key_type, mapped_type, OtherCompare, Allocator>& source) {\n        this->internal_merge(source);\n    }\n\n    template<typename OtherCompare>\n    void merge(concurrent_multimap<key_type, mapped_type, OtherCompare, Allocator>&& source) {\n        this->internal_merge(std::move(source));\n    }\n}; // class concurrent_map\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate <typename It,\n          typename Comp = std::less<iterator_key_t<It>>,\n          typename Alloc = tbb::tbb_allocator<iterator_alloc_pair_t<It>>,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Comp>>>\nconcurrent_map( It, It, Comp = Comp(), Alloc = Alloc() )\n-> concurrent_map<iterator_key_t<It>, iterator_mapped_t<It>, Comp, Alloc>;\n\ntemplate <typename Key, typename T,\n          typename Comp = std::less<std::remove_const_t<Key>>,\n          typename Alloc = tbb::tbb_allocator<std::pair<const Key, T>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Comp>>>\nconcurrent_map( std::initializer_list<std::pair<Key, T>>, Comp = Comp(), Alloc = Alloc() )\n-> concurrent_map<std::remove_const_t<Key>, T, Comp, Alloc>;\n\ntemplate <typename It, typename Alloc,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_map( It, It, Alloc )\n-> concurrent_map<iterator_key_t<It>, iterator_mapped_t<It>,\n                  std::less<iterator_key_t<It>>, Alloc>;\n\ntemplate <typename Key, typename T, typename Alloc,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_map( std::initializer_list<std::pair<Key, T>>, Alloc )\n-> concurrent_map<std::remove_const_t<Key>, T, std::less<std::remove_const_t<Key>>, Alloc>;\n\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate <typename Key, typename Value, typename Compare, typename Allocator>\nvoid swap( concurrent_map<Key, Value, Compare, Allocator>& lhs,\n           concurrent_map<Key, Value, Compare, Allocator>& rhs )\n{\n    lhs.swap(rhs);\n}\n\ntemplate <typename Key, typename Value, typename Compare = std::less<Key>, typename Allocator = tbb::tbb_allocator<std::pair<const Key, Value>>>\nclass concurrent_multimap : public concurrent_skip_list<map_traits<Key, Value, Compare, concurrent_geometric_level_generator<32>, Allocator, true>> {\n    using base_type = concurrent_skip_list<map_traits<Key, Value, Compare, concurrent_geometric_level_generator<32>, Allocator, true>>;\npublic:\n    using key_type = Key;\n    using mapped_type = Value;\n    using value_type = typename base_type::value_type;\n    using size_type = typename base_type::size_type;\n    using difference_type = typename base_type::difference_type;\n    using key_compare = Compare;\n    using value_compare = typename base_type::value_compare;\n    using allocator_type = Allocator;\n\n    using reference = typename base_type::reference;\n    using const_reference = typename base_type::const_reference;\n    using pointer = typename base_type::pointer;\n    using const_pointer = typename base_type::const_pointer;\n\n    using iterator = typename base_type::iterator;\n    using const_iterator = typename base_type::const_iterator;\n\n    using node_type = typename base_type::node_type;\n\n    // Include constructors of base_type\n    using base_type::base_type;\n    using base_type::insert;\n\n    // Required for implicit deduction guides\n    concurrent_multimap() = default;\n    concurrent_multimap( const concurrent_multimap& ) = default;\n    concurrent_multimap( const concurrent_multimap& other, const allocator_type& alloc ) : base_type(other, alloc) {}\n    concurrent_multimap( concurrent_multimap&& ) = default;\n    concurrent_multimap( concurrent_multimap&& other, const allocator_type& alloc ) : base_type(std::move(other), alloc) {}\n    // Required to respect the rule of 5\n    concurrent_multimap& operator=( const concurrent_multimap& ) = default;\n    concurrent_multimap& operator=( concurrent_multimap&& ) = default;\n\n    concurrent_multimap& operator=( std::initializer_list<value_type> il ) {\n        base_type::operator= (il);\n        return *this;\n    }\n\n    template <typename P>\n    typename std::enable_if<std::is_constructible<value_type, P&&>::value,\n                            std::pair<iterator, bool>>::type insert( P&& value )\n    {\n        return this->emplace(std::forward<P>(value));\n    }\n\n    template <typename P>\n    typename std::enable_if<std::is_constructible<value_type, P&&>::value,\n                            iterator>::type insert( const_iterator hint, P&& value )\n    {\n        return this->emplace_hint(hint, std::forward<P>(value));\n    }\n\n    template<typename OtherCompare>\n    void merge(concurrent_multimap<key_type, mapped_type, OtherCompare, Allocator>& source) {\n        this->internal_merge(source);\n    }\n\n    template<typename OtherCompare>\n    void merge(concurrent_multimap<key_type, mapped_type, OtherCompare, Allocator>&& source) {\n        this->internal_merge(std::move(source));\n    }\n\n    template<typename OtherCompare>\n    void merge(concurrent_map<key_type, mapped_type, OtherCompare, Allocator>& source) {\n        this->internal_merge(source);\n    }\n\n    template<typename OtherCompare>\n    void merge(concurrent_map<key_type, mapped_type, OtherCompare, Allocator>&& source) {\n        this->internal_merge(std::move(source));\n    }\n}; // class concurrent_multimap\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate <typename It,\n          typename Comp = std::less<iterator_key_t<It>>,\n          typename Alloc = tbb::tbb_allocator<iterator_alloc_pair_t<It>>,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Comp>>>\nconcurrent_multimap( It, It, Comp = Comp(), Alloc = Alloc() )\n-> concurrent_multimap<iterator_key_t<It>, iterator_mapped_t<It>, Comp, Alloc>;\n\ntemplate <typename Key, typename T,\n          typename Comp = std::less<std::remove_const_t<Key>>,\n          typename Alloc = tbb::tbb_allocator<std::pair<const Key, T>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Comp>>>\nconcurrent_multimap( std::initializer_list<std::pair<Key, T>>, Comp = Comp(), Alloc = Alloc() )\n-> concurrent_multimap<std::remove_const_t<Key>, T, Comp, Alloc>;\n\ntemplate <typename It, typename Alloc,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_multimap( It, It, Alloc )\n-> concurrent_multimap<iterator_key_t<It>, iterator_mapped_t<It>,\n                       std::less<iterator_key_t<It>>, Alloc>;\n\ntemplate <typename Key, typename T, typename Alloc,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_multimap( std::initializer_list<std::pair<Key, T>>, Alloc )\n-> concurrent_multimap<std::remove_const_t<Key>, T, std::less<std::remove_const_t<Key>>, Alloc>;\n\n\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate <typename Key, typename Value, typename Compare, typename Allocator>\nvoid swap( concurrent_multimap<Key, Value, Compare, Allocator>& lhs,\n           concurrent_multimap<Key, Value, Compare, Allocator>& rhs )\n{\n    lhs.swap(rhs);\n}\n\n} // namespace d2\n} // namespace detail\n\ninline namespace v1 {\n\nusing detail::d2::concurrent_map;\nusing detail::d2::concurrent_multimap;\nusing detail::split;\n\n} // inline namespace v1\n} // namespace tbb\n\n#endif // __TBB_concurrent_map_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/concurrent_priority_queue.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_concurrent_priority_queue_H\n#define __TBB_concurrent_priority_queue_H\n\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_aggregator.h\"\n#include \"detail/_template_helpers.h\"\n#include \"detail/_allocator_traits.h\"\n#include \"detail/_range_common.h\"\n#include \"detail/_exception.h\"\n#include \"detail/_utils.h\"\n#include \"detail/_containers_helpers.h\"\n#include \"cache_aligned_allocator.h\"\n#include <vector>\n#include <iterator>\n#include <functional>\n#include <utility>\n#include <initializer_list>\n#include <type_traits>\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\ntemplate <typename T, typename Compare = std::less<T>, typename Allocator = cache_aligned_allocator<T>>\nclass concurrent_priority_queue {\npublic:\n    using value_type = T;\n    using reference = T&;\n    using const_reference = const T&;\n\n    using size_type = std::size_t;\n    using difference_type = std::ptrdiff_t;\n\n    using allocator_type = Allocator;\n\n    concurrent_priority_queue() : concurrent_priority_queue(allocator_type{}) {}\n\n    explicit concurrent_priority_queue( const allocator_type& alloc )\n        : mark(0), my_size(0), my_compare(), data(alloc)\n    {\n        my_aggregator.initialize_handler(functor{this});\n    }\n\n    explicit concurrent_priority_queue( const Compare& compare, const allocator_type& alloc = allocator_type() )\n        : mark(0), my_size(0), my_compare(compare), data(alloc)\n    {\n        my_aggregator.initialize_handler(functor{this});\n    }\n\n    explicit concurrent_priority_queue( size_type init_capacity, const allocator_type& alloc = allocator_type() )\n        : mark(0), my_size(0), my_compare(), data(alloc)\n    {\n        data.reserve(init_capacity);\n        my_aggregator.initialize_handler(functor{this});\n    }\n\n    explicit concurrent_priority_queue( size_type init_capacity, const Compare& compare, const allocator_type& alloc = allocator_type() )\n        : mark(0), my_size(0), my_compare(compare), data(alloc)\n    {\n        data.reserve(init_capacity);\n        my_aggregator.initialize_handler(functor{this});\n    }\n\n    template <typename InputIterator>\n    concurrent_priority_queue( InputIterator begin, InputIterator end, const Compare& compare, const allocator_type& alloc = allocator_type() )\n        : mark(0), my_compare(compare), data(begin, end, alloc)\n    {\n        my_aggregator.initialize_handler(functor{this});\n        heapify();\n        my_size.store(data.size(), std::memory_order_relaxed);\n    }\n\n    template <typename InputIterator>\n    concurrent_priority_queue( InputIterator begin, InputIterator end, const allocator_type& alloc = allocator_type() )\n        : concurrent_priority_queue(begin, end, Compare(), alloc) {}\n\n    concurrent_priority_queue( std::initializer_list<value_type> init, const Compare& compare, const allocator_type& alloc = allocator_type() )\n        : concurrent_priority_queue(init.begin(), init.end(), compare, alloc) {}\n\n    concurrent_priority_queue( std::initializer_list<value_type> init, const allocator_type& alloc = allocator_type() )\n        : concurrent_priority_queue(init, Compare(), alloc) {}\n\n    concurrent_priority_queue( const concurrent_priority_queue& other )\n        : mark(other.mark), my_size(other.my_size.load(std::memory_order_relaxed)), my_compare(other.my_compare),\n          data(other.data)\n    {\n        my_aggregator.initialize_handler(functor{this});\n    }\n\n    concurrent_priority_queue( const concurrent_priority_queue& other, const allocator_type& alloc )\n        : mark(other.mark), my_size(other.my_size.load(std::memory_order_relaxed)), my_compare(other.my_compare),\n          data(other.data, alloc)\n    {\n        my_aggregator.initialize_handler(functor{this});\n    }\n\n    concurrent_priority_queue( concurrent_priority_queue&& other )\n        : mark(other.mark), my_size(other.my_size.load(std::memory_order_relaxed)), my_compare(other.my_compare),\n          data(std::move(other.data))\n    {\n        my_aggregator.initialize_handler(functor{this});\n    }\n\n    concurrent_priority_queue( concurrent_priority_queue&& other, const allocator_type& alloc )\n        : mark(other.mark), my_size(other.my_size.load(std::memory_order_relaxed)), my_compare(other.my_compare),\n          data(std::move(other.data), alloc)\n    {\n        my_aggregator.initialize_handler(functor{this});\n    }\n\n    concurrent_priority_queue& operator=( const concurrent_priority_queue& other ) {\n        if (this != &other) {\n            data = other.data;\n            mark = other.mark;\n            my_size.store(other.my_size.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        }\n        return *this;\n    }\n\n    concurrent_priority_queue& operator=( concurrent_priority_queue&& other ) {\n        if (this != &other) {\n            // TODO: check if exceptions from std::vector::operator=(vector&&) should be handled separately\n            data = std::move(other.data);\n            mark = other.mark;\n            my_size.store(other.my_size.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        }\n        return *this;\n    }\n\n    concurrent_priority_queue& operator=( std::initializer_list<value_type> init ) {\n        assign(init.begin(), init.end());\n        return *this;\n    }\n\n    template <typename InputIterator>\n    void assign( InputIterator begin, InputIterator end ) {\n        data.assign(begin, end);\n        mark = 0;\n        my_size.store(data.size(), std::memory_order_relaxed);\n        heapify();\n    }\n\n    void assign( std::initializer_list<value_type> init ) {\n        assign(init.begin(), init.end());\n    }\n\n    /* Returned value may not reflect results of pending operations.\n       This operation reads shared data and will trigger a race condition. */\n    __TBB_nodiscard bool empty() const { return size() == 0; }\n\n    // Returns the current number of elements contained in the queue\n    /* Returned value may not reflect results of pending operations.\n       This operation reads shared data and will trigger a race condition. */\n    size_type size() const { return my_size.load(std::memory_order_relaxed); }\n\n    /* This operation can be safely used concurrently with other push, try_pop or emplace operations. */\n    void push( const value_type& value ) {\n        cpq_operation op_data(value, PUSH_OP);\n        my_aggregator.execute(&op_data);\n        if (op_data.status == FAILED)\n            throw_exception(exception_id::bad_alloc);\n    }\n\n    /* This operation can be safely used concurrently with other push, try_pop or emplace operations. */\n    void push( value_type&& value ) {\n        cpq_operation op_data(value, PUSH_RVALUE_OP);\n        my_aggregator.execute(&op_data);\n        if (op_data.status == FAILED)\n            throw_exception(exception_id::bad_alloc);\n    }\n\n    /* This operation can be safely used concurrently with other push, try_pop or emplace operations. */\n    template <typename... Args>\n    void emplace( Args&&... args ) {\n        // TODO: support uses allocator construction in this place\n        push(value_type(std::forward<Args>(args)...));\n    }\n\n    // Gets a reference to and removes highest priority element\n    /* If a highest priority element was found, sets elem and returns true,\n       otherwise returns false.\n       This operation can be safely used concurrently with other push, try_pop or emplace operations. */\n    bool try_pop( value_type& value ) {\n        cpq_operation op_data(value, POP_OP);\n        my_aggregator.execute(&op_data);\n        return op_data.status == SUCCEEDED;\n    }\n\n    // This operation affects the whole container => it is not thread-safe\n    void clear() {\n        data.clear();\n        mark = 0;\n        my_size.store(0, std::memory_order_relaxed);\n    }\n\n    // This operation affects the whole container => it is not thread-safe\n    void swap( concurrent_priority_queue& other ) {\n        if (this != &other) {\n            using std::swap;\n            swap(data, other.data);\n            swap(mark, other.mark);\n\n            size_type sz = my_size.load(std::memory_order_relaxed);\n            my_size.store(other.my_size.load(std::memory_order_relaxed), std::memory_order_relaxed);\n            other.my_size.store(sz, std::memory_order_relaxed);\n        }\n    }\n\n    allocator_type get_allocator() const { return data.get_allocator(); }\nprivate:\n    enum operation_type {INVALID_OP, PUSH_OP, POP_OP, PUSH_RVALUE_OP};\n    enum operation_status {WAIT = 0, SUCCEEDED, FAILED};\n\n    class cpq_operation : public aggregated_operation<cpq_operation> {\n    public:\n        operation_type type;\n        union {\n            value_type* elem;\n            size_type sz;\n        };\n        cpq_operation( const value_type& value, operation_type t )\n            : type(t), elem(const_cast<value_type*>(&value)) {}\n    }; // class cpq_operation\n\n    class functor {\n        concurrent_priority_queue* my_cpq;\n    public:\n        functor() : my_cpq(nullptr) {}\n        functor( concurrent_priority_queue* cpq ) : my_cpq(cpq) {}\n\n        void operator()(cpq_operation* op_list) {\n            __TBB_ASSERT(my_cpq != nullptr, \"Invalid functor\");\n            my_cpq->handle_operations(op_list);\n        }\n    }; // class functor\n\n    void handle_operations( cpq_operation* op_list ) {\n        call_itt_notify(acquired, this);\n        cpq_operation* tmp, *pop_list = nullptr;\n        __TBB_ASSERT(mark == data.size(), nullptr);\n\n        // First pass processes all constant (amortized; reallocation may happen) time pushes and pops.\n        while(op_list) {\n            // ITT note: &(op_list->status) tag is used to cover accesses to op_list\n            // node. This thread is going to handle the operation, and so will acquire it\n            // and perform the associated operation w/o triggering a race condition; the\n            // thread that created the operation is waiting on the status field, so when\n            // this thread is done with the operation, it will perform a\n            // store_with_release to give control back to the waiting thread in\n            // aggregator::insert_operation.\n            // TODO: enable\n            call_itt_notify(acquired, &(op_list->status));\n            __TBB_ASSERT(op_list->type != INVALID_OP, nullptr);\n\n            tmp = op_list;\n            op_list = op_list->next.load(std::memory_order_relaxed);\n            if (tmp->type == POP_OP) {\n                if (mark < data.size() &&\n                    my_compare(data[0], data.back()))\n                {\n                    // there are newly pushed elems and the last one is higher than top\n                    *(tmp->elem) = std::move(data.back());\n                    my_size.store(my_size.load(std::memory_order_relaxed) - 1, std::memory_order_relaxed);\n                    tmp->status.store(uintptr_t(SUCCEEDED), std::memory_order_release);\n\n                    data.pop_back();\n                    __TBB_ASSERT(mark <= data.size(), nullptr);\n                } else { // no convenient item to pop; postpone\n                    tmp->next.store(pop_list, std::memory_order_relaxed);\n                    pop_list = tmp;\n                }\n            } else { // PUSH_OP or PUSH_RVALUE_OP\n                __TBB_ASSERT(tmp->type == PUSH_OP || tmp->type == PUSH_RVALUE_OP, \"Unknown operation\");\n#if TBB_USE_EXCEPTIONS\n                try\n#endif\n                {\n                    if (tmp->type == PUSH_OP) {\n                        push_back_helper(*(tmp->elem));\n                    } else {\n                        data.push_back(std::move(*(tmp->elem)));\n                    }\n                    my_size.store(my_size.load(std::memory_order_relaxed) + 1, std::memory_order_relaxed);\n                    tmp->status.store(uintptr_t(SUCCEEDED), std::memory_order_release);\n                }\n#if TBB_USE_EXCEPTIONS\n                catch(...) {\n                    tmp->status.store(uintptr_t(FAILED), std::memory_order_release);\n                }\n#endif\n            }\n        }\n\n        // Second pass processes pop operations\n        while(pop_list) {\n            tmp = pop_list;\n            pop_list = pop_list->next.load(std::memory_order_relaxed);\n            __TBB_ASSERT(tmp->type == POP_OP, nullptr);\n            if (data.empty()) {\n                tmp->status.store(uintptr_t(FAILED), std::memory_order_release);\n            } else {\n                __TBB_ASSERT(mark <= data.size(), nullptr);\n                if (mark < data.size() &&\n                    my_compare(data[0], data.back()))\n                {\n                    // there are newly pushed elems and the last one is higher than top\n                    *(tmp->elem) = std::move(data.back());\n                    my_size.store(my_size.load(std::memory_order_relaxed) - 1, std::memory_order_relaxed);\n                    tmp->status.store(uintptr_t(SUCCEEDED), std::memory_order_release);\n                    data.pop_back();\n                } else { // extract top and push last element down heap\n                    *(tmp->elem) = std::move(data[0]);\n                    my_size.store(my_size.load(std::memory_order_relaxed) - 1, std::memory_order_relaxed);\n                    tmp->status.store(uintptr_t(SUCCEEDED), std::memory_order_release);\n                    reheap();\n                }\n            }\n        }\n\n        // heapify any leftover pushed elements before doing the next\n        // batch of operations\n        if (mark < data.size()) heapify();\n        __TBB_ASSERT(mark == data.size(), nullptr);\n        call_itt_notify(releasing, this);\n    }\n\n    // Merge unsorted elements into heap\n    void heapify() {\n        if (!mark && data.size() > 0) mark = 1;\n        for (; mark < data.size(); ++mark) {\n            // for each unheapified element under size\n            size_type cur_pos = mark;\n            value_type to_place = std::move(data[mark]);\n            do { // push to_place up the heap\n                size_type parent = (cur_pos - 1) >> 1;\n                if (!my_compare(data[parent], to_place))\n                    break;\n                data[cur_pos] = std::move(data[parent]);\n                cur_pos = parent;\n            } while(cur_pos);\n            data[cur_pos] = std::move(to_place);\n        }\n    }\n\n    // Re-heapify after an extraction\n    // Re-heapify by pushing last element down the heap from the root.\n    void reheap() {\n        size_type cur_pos = 0, child = 1;\n\n        while(child < mark) {\n            size_type target = child;\n            if (child + 1 < mark && my_compare(data[child], data[child + 1]))\n                ++target;\n            // target now has the higher priority child\n            if (my_compare(data[target], data.back()))\n                break;\n            data[cur_pos] = std::move(data[target]);\n            cur_pos = target;\n            child = (cur_pos << 1) + 1;\n        }\n        if (cur_pos != data.size() - 1)\n            data[cur_pos] = std::move(data.back());\n        data.pop_back();\n        if (mark > data.size()) mark = data.size();\n    }\n\n    void push_back_helper( const T& value ) {\n        push_back_helper_impl(value, std::is_copy_constructible<T>{});\n    }\n\n    void push_back_helper_impl( const T& value, /*is_copy_constructible = */std::true_type ) {\n        data.push_back(value);\n    }\n\n    void push_back_helper_impl( const T&, /*is_copy_constructible = */std::false_type ) {\n        __TBB_ASSERT(false, \"error: calling tbb::concurrent_priority_queue.push(const value_type&) for move-only type\");\n    }\n\n    using aggregator_type = aggregator<functor, cpq_operation>;\n\n    aggregator_type my_aggregator;\n    // Padding added to avoid false sharing\n    char padding1[max_nfs_size - sizeof(aggregator_type)];\n    // The point at which unsorted elements begin\n    size_type mark;\n    std::atomic<size_type> my_size;\n    Compare my_compare;\n\n    // Padding added to avoid false sharing\n    char padding2[max_nfs_size - (2*sizeof(size_type)) - sizeof(Compare)];\n    //! Storage for the heap of elements in queue, plus unheapified elements\n    /** data has the following structure:\n\n         binary unheapified\n          heap   elements\n        ____|_______|____\n        |       |       |\n        v       v       v\n        [_|...|_|_|...|_| |...| ]\n         0       ^       ^       ^\n                 |       |       |__capacity\n                 |       |__my_size\n                 |__mark\n\n        Thus, data stores the binary heap starting at position 0 through\n        mark-1 (it may be empty).  Then there are 0 or more elements\n        that have not yet been inserted into the heap, in positions\n        mark through my_size-1. */\n\n    using vector_type = std::vector<value_type, allocator_type>;\n    vector_type data;\n\n    friend bool operator==( const concurrent_priority_queue& lhs,\n                            const concurrent_priority_queue& rhs )\n    {\n        return lhs.data == rhs.data;\n    }\n\n#if !__TBB_CPP20_COMPARISONS_PRESENT\n    friend bool operator!=( const concurrent_priority_queue& lhs,\n                            const concurrent_priority_queue& rhs )\n    {\n        return !(lhs == rhs);\n    }\n#endif\n}; // class concurrent_priority_queue\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\ntemplate <typename It,\n          typename Comp = std::less<iterator_value_t<It>>,\n          typename Alloc = tbb::cache_aligned_allocator<iterator_value_t<It>>,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Comp>>>\nconcurrent_priority_queue( It, It, Comp = Comp(), Alloc = Alloc() )\n-> concurrent_priority_queue<iterator_value_t<It>, Comp, Alloc>;\n\ntemplate <typename It, typename Alloc,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_priority_queue( It, It, Alloc )\n-> concurrent_priority_queue<iterator_value_t<It>, std::less<iterator_value_t<It>>, Alloc>;\n\ntemplate <typename T,\n          typename Comp = std::less<T>,\n          typename Alloc = tbb::cache_aligned_allocator<T>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Comp>>>\nconcurrent_priority_queue( std::initializer_list<T>, Comp = Comp(), Alloc = Alloc() )\n-> concurrent_priority_queue<T, Comp, Alloc>;\n\ntemplate <typename T, typename Alloc,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_priority_queue( std::initializer_list<T>, Alloc )\n-> concurrent_priority_queue<T, std::less<T>, Alloc>;\n\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate <typename T, typename Compare, typename Allocator>\nvoid swap( concurrent_priority_queue<T, Compare, Allocator>& lhs,\n           concurrent_priority_queue<T, Compare, Allocator>& rhs )\n{\n    lhs.swap(rhs);\n}\n\n} // namespace d1\n} // namespace detail\ninline namespace v1 {\nusing detail::d1::concurrent_priority_queue;\n\n} // inline namespace v1\n} // namespace tbb\n\n#endif // __TBB_concurrent_priority_queue_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/concurrent_queue.h",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_concurrent_queue_H\n#define __TBB_concurrent_queue_H\n\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_concurrent_queue_base.h\"\n#include \"detail/_allocator_traits.h\"\n#include \"detail/_exception.h\"\n#include \"detail/_containers_helpers.h\"\n#include \"cache_aligned_allocator.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace d2 {\n\ntemplate <typename QueueRep, typename Allocator>\nstd::pair<bool, ticket_type> internal_try_pop_impl(void* dst, QueueRep& queue, Allocator& alloc ) {\n    ticket_type ticket{};\n    do {\n        // Basically, we need to read `head_counter` before `tail_counter`. To achieve it we build happens-before on `head_counter`\n        ticket = queue.head_counter.load(std::memory_order_acquire);\n        do {\n            if (static_cast<std::ptrdiff_t>(queue.tail_counter.load(std::memory_order_relaxed) - ticket) <= 0) { // queue is empty\n                // Queue is empty\n                return { false, ticket };\n            }\n            // Queue had item with ticket k when we looked.  Attempt to get that item.\n            // Another thread snatched the item, retry.\n        } while (!queue.head_counter.compare_exchange_strong(ticket, ticket + 1));\n    } while (!queue.choose(ticket).pop(dst, ticket, queue, alloc));\n    return { true, ticket };\n}\n\n// A high-performance thread-safe non-blocking concurrent queue.\n// Multiple threads may each push and pop concurrently.\ntemplate <typename T, typename Allocator = tbb::cache_aligned_allocator<T>>\nclass concurrent_queue {\n    using allocator_traits_type = tbb::detail::allocator_traits<Allocator>;\n    using queue_representation_type = concurrent_queue_rep<T, Allocator>;\n    using queue_allocator_type = typename allocator_traits_type::template rebind_alloc<queue_representation_type>;\n    using queue_allocator_traits = tbb::detail::allocator_traits<queue_allocator_type>;\npublic:\n    using size_type = std::size_t;\n    using value_type = T;\n    using reference = T&;\n    using const_reference = const T&;\n    using difference_type = std::ptrdiff_t;\n\n    using allocator_type = Allocator;\n    using pointer = typename allocator_traits_type::pointer;\n    using const_pointer = typename allocator_traits_type::const_pointer;\n\n    using iterator = concurrent_queue_iterator<concurrent_queue, T, Allocator>;\n    using const_iterator = concurrent_queue_iterator<concurrent_queue, const T, Allocator>;\n\n    concurrent_queue() : concurrent_queue(allocator_type()) {}\n\n    explicit concurrent_queue(const allocator_type& a) :\n        my_allocator(a), my_queue_representation(nullptr)\n    {\n        my_queue_representation = static_cast<queue_representation_type*>(r1::cache_aligned_allocate(sizeof(queue_representation_type)));\n        queue_allocator_traits::construct(my_allocator, my_queue_representation);\n\n        __TBB_ASSERT(is_aligned(my_queue_representation, max_nfs_size), \"alignment error\" );\n        __TBB_ASSERT(is_aligned(&my_queue_representation->head_counter, max_nfs_size), \"alignment error\" );\n        __TBB_ASSERT(is_aligned(&my_queue_representation->tail_counter, max_nfs_size), \"alignment error\" );\n        __TBB_ASSERT(is_aligned(&my_queue_representation->array, max_nfs_size), \"alignment error\" );\n    }\n\n    template <typename InputIterator>\n    concurrent_queue(InputIterator begin, InputIterator end, const allocator_type& a = allocator_type()) :\n        concurrent_queue(a)\n    {\n        for (; begin != end; ++begin)\n            push(*begin);\n    }\n\n    concurrent_queue( std::initializer_list<value_type> init, const allocator_type& alloc = allocator_type() ) :\n        concurrent_queue(init.begin(), init.end(), alloc)\n    {}\n\n    concurrent_queue(const concurrent_queue& src, const allocator_type& a) :\n        concurrent_queue(a)\n    {\n        my_queue_representation->assign(*src.my_queue_representation, my_allocator, copy_construct_item);\n    }\n\n    concurrent_queue(const concurrent_queue& src) :\n        concurrent_queue(queue_allocator_traits::select_on_container_copy_construction(src.get_allocator()))\n    {\n        my_queue_representation->assign(*src.my_queue_representation, my_allocator, copy_construct_item);\n    }\n\n    // Move constructors\n    concurrent_queue(concurrent_queue&& src) :\n        concurrent_queue(std::move(src.my_allocator))\n    {\n        internal_swap(src);\n    }\n\n    concurrent_queue(concurrent_queue&& src, const allocator_type& a) :\n        concurrent_queue(a)\n    {\n        // checking that memory allocated by one instance of allocator can be deallocated\n        // with another\n        if (my_allocator == src.my_allocator) {\n            internal_swap(src);\n        } else {\n            // allocators are different => performing per-element move\n            my_queue_representation->assign(*src.my_queue_representation, my_allocator, move_construct_item);\n            src.clear();\n        }\n    }\n\n    // Destroy queue\n    ~concurrent_queue() {\n        clear();\n        my_queue_representation->clear(my_allocator);\n        queue_allocator_traits::destroy(my_allocator, my_queue_representation);\n        r1::cache_aligned_deallocate(my_queue_representation);\n    }\n\n    concurrent_queue& operator=( const concurrent_queue& other ) {\n        //TODO: implement support for std::allocator_traits::propagate_on_container_copy_assignment\n        if (my_queue_representation != other.my_queue_representation) {\n            clear();\n            my_allocator = other.my_allocator;\n            my_queue_representation->assign(*other.my_queue_representation, my_allocator, copy_construct_item);\n        }\n        return *this;\n    }\n\n    concurrent_queue& operator=( concurrent_queue&& other ) {\n        //TODO: implement support for std::allocator_traits::propagate_on_container_move_assignment\n        if (my_queue_representation != other.my_queue_representation) {\n            clear();\n            if (my_allocator == other.my_allocator) {\n                internal_swap(other);\n            } else {\n                my_queue_representation->assign(*other.my_queue_representation, other.my_allocator, move_construct_item);\n                other.clear();\n                my_allocator = std::move(other.my_allocator);\n            }\n        }\n        return *this;\n    }\n\n    concurrent_queue& operator=( std::initializer_list<value_type> init ) {\n        assign(init);\n        return *this;\n    }\n\n    template <typename InputIterator>\n    void assign( InputIterator first, InputIterator last ) {\n        concurrent_queue src(first, last);\n        clear();\n        my_queue_representation->assign(*src.my_queue_representation, my_allocator, move_construct_item);\n    }\n\n    void assign( std::initializer_list<value_type> init ) {\n        assign(init.begin(), init.end());\n    }\n\n    void swap ( concurrent_queue& other ) {\n        //TODO: implement support for std::allocator_traits::propagate_on_container_swap\n        __TBB_ASSERT(my_allocator == other.my_allocator, \"unequal allocators\");\n        internal_swap(other);\n    }\n\n    // Enqueue an item at tail of queue.\n    void push(const T& value) {\n        internal_push(value);\n    }\n\n    void push(T&& value) {\n        internal_push(std::move(value));\n    }\n\n    template <typename... Args>\n    void emplace( Args&&... args ) {\n        internal_push(std::forward<Args>(args)...);\n    }\n\n    // Attempt to dequeue an item from head of queue.\n    /** Does not wait for item to become available.\n        Returns true if successful; false otherwise. */\n    bool try_pop( T& result ) {\n        return internal_try_pop(&result);\n    }\n\n    // Return the number of items in the queue; thread unsafe\n    size_type unsafe_size() const {\n        std::ptrdiff_t size = my_queue_representation->size();\n        return size < 0 ? 0 :  size_type(size);\n    }\n\n    // Equivalent to size()==0.\n    __TBB_nodiscard bool empty() const {\n        return my_queue_representation->empty();\n    }\n\n    // Clear the queue. not thread-safe.\n    void clear() {\n        my_queue_representation->clear(my_allocator);\n    }\n\n    // Return allocator object\n    allocator_type get_allocator() const { return my_allocator; }\n\n    //------------------------------------------------------------------------\n    // The iterators are intended only for debugging.  They are slow and not thread safe.\n    //------------------------------------------------------------------------\n\n    iterator unsafe_begin() { return concurrent_queue_iterator_provider::get<iterator>(*this); }\n    iterator unsafe_end() { return iterator(); }\n    const_iterator unsafe_begin() const { return concurrent_queue_iterator_provider::get<const_iterator>(*this); }\n    const_iterator unsafe_end() const { return const_iterator(); }\n    const_iterator unsafe_cbegin() const { return concurrent_queue_iterator_provider::get<const_iterator>(*this); }\n    const_iterator unsafe_cend() const { return const_iterator(); }\n\nprivate:\n    void internal_swap(concurrent_queue& src) {\n        using std::swap;\n        swap(my_queue_representation, src.my_queue_representation);\n    }\n\n    template <typename... Args>\n    void internal_push( Args&&... args ) {\n        ticket_type k = my_queue_representation->tail_counter++;\n        my_queue_representation->choose(k).push(k, *my_queue_representation, my_allocator, std::forward<Args>(args)...);\n    }\n\n    bool internal_try_pop( void* dst ) {\n        return internal_try_pop_impl(dst, *my_queue_representation, my_allocator).first;\n    }\n\n    template <typename Container, typename Value, typename A>\n    friend class concurrent_queue_iterator;\n\n    static void copy_construct_item(T* location, const void* src) {\n        // TODO: use allocator_traits for copy construction\n        new (location) value_type(*static_cast<const value_type*>(src));\n        // queue_allocator_traits::construct(my_allocator, location, *static_cast<const T*>(src));\n    }\n\n    static void move_construct_item(T* location, const void* src) {\n        // TODO: use allocator_traits for move construction\n        new (location) value_type(std::move(*static_cast<value_type*>(const_cast<void*>(src))));\n    }\n\n    queue_allocator_type my_allocator;\n    queue_representation_type* my_queue_representation;\n\n    friend void swap( concurrent_queue& lhs, concurrent_queue& rhs ) {\n        lhs.swap(rhs);\n    }\n\n    friend bool operator==( const concurrent_queue& lhs, const concurrent_queue& rhs ) {\n        return lhs.unsafe_size() == rhs.unsafe_size() && std::equal(lhs.unsafe_begin(), lhs.unsafe_end(), rhs.unsafe_begin());\n    }\n\n#if !__TBB_CPP20_COMPARISONS_PRESENT\n    friend bool operator!=( const concurrent_queue& lhs,  const concurrent_queue& rhs ) {\n        return !(lhs == rhs);\n    }\n#endif // __TBB_CPP20_COMPARISONS_PRESENT\n}; // class concurrent_queue\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n// Deduction guide for the constructor from two iterators\ntemplate <typename It, typename Alloc = tbb::cache_aligned_allocator<iterator_value_t<It>>,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_queue( It, It, Alloc = Alloc() )\n-> concurrent_queue<iterator_value_t<It>, Alloc>;\n\n#endif /* __TBB_CPP17_DEDUCTION_GUIDES_PRESENT */\n\nclass concurrent_monitor;\n\n// The concurrent monitor tags for concurrent_bounded_queue.\nstatic constexpr std::size_t cbq_slots_avail_tag = 0;\nstatic constexpr std::size_t cbq_items_avail_tag = 1;\n} // namespace d2\n\n\nnamespace r1 {\n    class concurrent_monitor;\n\n    TBB_EXPORT std::uint8_t* __TBB_EXPORTED_FUNC allocate_bounded_queue_rep( std::size_t queue_rep_size );\n    TBB_EXPORT void __TBB_EXPORTED_FUNC deallocate_bounded_queue_rep( std::uint8_t* mem, std::size_t queue_rep_size );\n    TBB_EXPORT void __TBB_EXPORTED_FUNC abort_bounded_queue_monitors( concurrent_monitor* monitors );\n    TBB_EXPORT void __TBB_EXPORTED_FUNC notify_bounded_queue_monitor( concurrent_monitor* monitors, std::size_t monitor_tag\n                                                            , std::size_t ticket );\n    TBB_EXPORT void __TBB_EXPORTED_FUNC wait_bounded_queue_monitor( concurrent_monitor* monitors, std::size_t monitor_tag,\n                                                            std::ptrdiff_t target, d1::delegate_base& predicate );\n} // namespace r1\n\n\nnamespace d2 {\n// A high-performance thread-safe blocking concurrent bounded queue.\n// Supports boundedness and blocking semantics.\n// Multiple threads may each push and pop concurrently.\ntemplate <typename T, typename Allocator = tbb::cache_aligned_allocator<T>>\nclass concurrent_bounded_queue {\n    using allocator_traits_type = tbb::detail::allocator_traits<Allocator>;\n    using queue_representation_type = concurrent_queue_rep<T, Allocator>;\n    using queue_allocator_type = typename allocator_traits_type::template rebind_alloc<queue_representation_type>;\n    using queue_allocator_traits = tbb::detail::allocator_traits<queue_allocator_type>;\n\n    template <typename FuncType>\n    void internal_wait(r1::concurrent_monitor* monitors, std::size_t monitor_tag, std::ptrdiff_t target, FuncType pred) {\n        d1::delegated_function<FuncType> func(pred);\n        r1::wait_bounded_queue_monitor(monitors, monitor_tag, target, func);\n    }\npublic:\n    using size_type = std::ptrdiff_t;\n    using value_type = T;\n    using reference = T&;\n    using const_reference = const T&;\n    using difference_type = std::ptrdiff_t;\n\n    using allocator_type = Allocator;\n    using pointer = typename allocator_traits_type::pointer;\n    using const_pointer = typename allocator_traits_type::const_pointer;\n\n    using iterator = concurrent_queue_iterator<concurrent_bounded_queue, T, Allocator>;\n    using const_iterator = concurrent_queue_iterator<concurrent_bounded_queue, const T, Allocator> ;\n\n    concurrent_bounded_queue() : concurrent_bounded_queue(allocator_type()) {}\n\n    explicit concurrent_bounded_queue( const allocator_type& a ) :\n        my_allocator(a), my_capacity(0), my_abort_counter(0), my_queue_representation(nullptr)\n    {\n        my_queue_representation = reinterpret_cast<queue_representation_type*>(\n            r1::allocate_bounded_queue_rep(sizeof(queue_representation_type)));\n        my_monitors = reinterpret_cast<r1::concurrent_monitor*>(my_queue_representation + 1);\n        queue_allocator_traits::construct(my_allocator, my_queue_representation);\n        my_capacity = std::size_t(-1) / (queue_representation_type::item_size > 1 ? queue_representation_type::item_size : 2);\n\n        __TBB_ASSERT(is_aligned(my_queue_representation, max_nfs_size), \"alignment error\" );\n        __TBB_ASSERT(is_aligned(&my_queue_representation->head_counter, max_nfs_size), \"alignment error\" );\n        __TBB_ASSERT(is_aligned(&my_queue_representation->tail_counter, max_nfs_size), \"alignment error\" );\n        __TBB_ASSERT(is_aligned(&my_queue_representation->array, max_nfs_size), \"alignment error\" );\n    }\n\n    template <typename InputIterator>\n    concurrent_bounded_queue( InputIterator begin, InputIterator end, const allocator_type& a = allocator_type() ) :\n        concurrent_bounded_queue(a)\n    {\n        for (; begin != end; ++begin)\n            push(*begin);\n    }\n\n    concurrent_bounded_queue( std::initializer_list<value_type> init, const allocator_type& alloc = allocator_type() ):\n        concurrent_bounded_queue(init.begin(), init.end(), alloc)\n    {}\n\n    concurrent_bounded_queue( const concurrent_bounded_queue& src, const allocator_type& a ) :\n        concurrent_bounded_queue(a)\n    {\n        my_capacity = src.my_capacity;\n        my_queue_representation->assign(*src.my_queue_representation, my_allocator, copy_construct_item);\n    }\n\n    concurrent_bounded_queue( const concurrent_bounded_queue& src ) :\n        concurrent_bounded_queue(queue_allocator_traits::select_on_container_copy_construction(src.get_allocator()))\n    {\n        my_capacity = src.my_capacity;\n        my_queue_representation->assign(*src.my_queue_representation, my_allocator, copy_construct_item);\n    }\n\n    // Move constructors\n    concurrent_bounded_queue( concurrent_bounded_queue&& src ) :\n        concurrent_bounded_queue(std::move(src.my_allocator))\n    {\n        internal_swap(src);\n    }\n\n    concurrent_bounded_queue( concurrent_bounded_queue&& src, const allocator_type& a ) :\n        concurrent_bounded_queue(a)\n    {\n        // checking that memory allocated by one instance of allocator can be deallocated\n        // with another\n        if (my_allocator == src.my_allocator) {\n            internal_swap(src);\n        } else {\n            // allocators are different => performing per-element move\n            my_queue_representation->assign(*src.my_queue_representation, my_allocator, move_construct_item);\n            src.clear();\n        }\n    }\n\n    // Destroy queue\n    ~concurrent_bounded_queue() {\n        clear();\n        my_queue_representation->clear(my_allocator);\n        queue_allocator_traits::destroy(my_allocator, my_queue_representation);\n        r1::deallocate_bounded_queue_rep(reinterpret_cast<std::uint8_t*>(my_queue_representation),\n                                         sizeof(queue_representation_type));\n    }\n\n    concurrent_bounded_queue& operator=( const concurrent_bounded_queue& other ) {\n        //TODO: implement support for std::allocator_traits::propagate_on_container_copy_assignment\n        if (my_queue_representation != other.my_queue_representation) {\n            clear();\n            my_allocator = other.my_allocator;\n            my_capacity = other.my_capacity;\n            my_queue_representation->assign(*other.my_queue_representation, my_allocator, copy_construct_item);\n        }\n        return *this;\n    }\n\n    concurrent_bounded_queue& operator=( concurrent_bounded_queue&& other ) {\n        //TODO: implement support for std::allocator_traits::propagate_on_container_move_assignment\n        if (my_queue_representation != other.my_queue_representation) {\n            clear();\n            if (my_allocator == other.my_allocator) {\n                internal_swap(other);\n            } else {\n                my_queue_representation->assign(*other.my_queue_representation, other.my_allocator, move_construct_item);\n                other.clear();\n                my_allocator = std::move(other.my_allocator);\n                my_capacity = other.my_capacity;\n            }\n        }\n        return *this;\n    }\n\n    concurrent_bounded_queue& operator=( std::initializer_list<value_type> init ) {\n        assign(init);\n        return *this;\n    }\n\n    template <typename InputIterator>\n    void assign( InputIterator first, InputIterator last ) {\n        concurrent_bounded_queue src(first, last);\n        clear();\n        my_queue_representation->assign(*src.my_queue_representation, my_allocator, move_construct_item);\n    }\n\n    void assign( std::initializer_list<value_type> init ) {\n        assign(init.begin(), init.end());\n    }\n\n    void swap ( concurrent_bounded_queue& other ) {\n        //TODO: implement support for std::allocator_traits::propagate_on_container_swap\n        __TBB_ASSERT(my_allocator == other.my_allocator, \"unequal allocators\");\n        internal_swap(other);\n    }\n\n    // Enqueue an item at tail of queue.\n    void push( const T& value ) {\n        internal_push(value);\n    }\n\n    void push( T&& value ) {\n        internal_push(std::move(value));\n    }\n\n    // Enqueue an item at tail of queue if queue is not already full.\n    // Does not wait for queue to become not full.\n    // Returns true if item is pushed; false if queue was already full.\n    bool try_push( const T& value ) {\n        return internal_push_if_not_full(value);\n    }\n\n    bool try_push( T&& value ) {\n        return internal_push_if_not_full(std::move(value));\n    }\n\n    template <typename... Args>\n    void emplace( Args&&... args ) {\n        internal_push(std::forward<Args>(args)...);\n    }\n\n    template <typename... Args>\n    bool try_emplace( Args&&... args ) {\n        return internal_push_if_not_full(std::forward<Args>(args)...);\n    }\n\n    // Attempt to dequeue an item from head of queue.\n    void pop( T& result ) {\n        internal_pop(&result);\n    }\n\n    /** Does not wait for item to become available.\n        Returns true if successful; false otherwise. */\n    bool try_pop( T& result ) {\n        return internal_pop_if_present(&result);\n    }\n\n    void abort() {\n        internal_abort();\n    }\n\n    // Return the number of items in the queue; thread unsafe\n    std::ptrdiff_t size() const {\n        return my_queue_representation->size();\n    }\n\n    void set_capacity( size_type new_capacity ) {\n        std::ptrdiff_t c = new_capacity < 0 ? infinite_capacity : new_capacity;\n        my_capacity = c;\n    }\n\n    size_type capacity() const {\n        return my_capacity;\n    }\n\n    // Equivalent to size()==0.\n    __TBB_nodiscard bool empty() const {\n        return my_queue_representation->empty();\n    }\n\n    // Clear the queue. not thread-safe.\n    void clear() {\n        my_queue_representation->clear(my_allocator);\n    }\n\n    // Return allocator object\n    allocator_type get_allocator() const { return my_allocator; }\n\n    //------------------------------------------------------------------------\n    // The iterators are intended only for debugging.  They are slow and not thread safe.\n    //------------------------------------------------------------------------\n\n    iterator unsafe_begin() { return concurrent_queue_iterator_provider::get<iterator>(*this); }\n    iterator unsafe_end() { return iterator(); }\n    const_iterator unsafe_begin() const { return concurrent_queue_iterator_provider::get<const_iterator>(*this); }\n    const_iterator unsafe_end() const { return const_iterator(); }\n    const_iterator unsafe_cbegin() const { return concurrent_queue_iterator_provider::get<const_iterator>(*this); }\n    const_iterator unsafe_cend() const { return const_iterator(); }\n\nprivate:\n    void internal_swap( concurrent_bounded_queue& src ) {\n        using std::swap;\n        swap(my_queue_representation, src.my_queue_representation);\n        swap(my_capacity, src.my_capacity);\n        swap(my_monitors, src.my_monitors);\n    }\n\n    static constexpr std::ptrdiff_t infinite_capacity = std::ptrdiff_t(~size_type(0) / 2);\n\n    template <typename... Args>\n    void internal_push( Args&&... args ) {\n        unsigned old_abort_counter = my_abort_counter.load(std::memory_order_relaxed);\n        ticket_type ticket = my_queue_representation->tail_counter++;\n        std::ptrdiff_t target = ticket - my_capacity;\n\n        if (static_cast<std::ptrdiff_t>(my_queue_representation->head_counter.load(std::memory_order_relaxed)) <= target) { // queue is full\n            auto pred = [&] {\n                if (my_abort_counter.load(std::memory_order_relaxed) != old_abort_counter) {\n                    throw_exception(exception_id::user_abort);\n                }\n\n                return static_cast<std::ptrdiff_t>(my_queue_representation->head_counter.load(std::memory_order_relaxed)) <= target;\n            };\n\n            try_call( [&] {\n                internal_wait(my_monitors, cbq_slots_avail_tag, target, pred);\n            }).on_exception( [&] {\n                my_queue_representation->choose(ticket).abort_push(ticket, *my_queue_representation, my_allocator);\n            });\n\n        }\n        __TBB_ASSERT((static_cast<std::ptrdiff_t>(my_queue_representation->head_counter.load(std::memory_order_relaxed)) > target), nullptr);\n        my_queue_representation->choose(ticket).push(ticket, *my_queue_representation, my_allocator, std::forward<Args>(args)...);\n        r1::notify_bounded_queue_monitor(my_monitors, cbq_items_avail_tag, ticket);\n    }\n\n    template <typename... Args>\n    bool internal_push_if_not_full( Args&&... args ) {\n        ticket_type ticket = my_queue_representation->tail_counter.load(std::memory_order_relaxed);\n        do {\n            if (static_cast<std::ptrdiff_t>(ticket - my_queue_representation->head_counter.load(std::memory_order_relaxed)) >= my_capacity) {\n                // Queue is full\n                return false;\n            }\n            // Queue had empty slot with ticket k when we looked. Attempt to claim that slot.\n            // Another thread claimed the slot, so retry.\n        } while (!my_queue_representation->tail_counter.compare_exchange_strong(ticket, ticket + 1));\n\n        my_queue_representation->choose(ticket).push(ticket, *my_queue_representation, my_allocator, std::forward<Args>(args)...);\n        r1::notify_bounded_queue_monitor(my_monitors, cbq_items_avail_tag, ticket);\n        return true;\n    }\n\n    void internal_pop( void* dst ) {\n        std::ptrdiff_t target;\n        // This loop is a single pop operation; abort_counter should not be re-read inside\n        unsigned old_abort_counter = my_abort_counter.load(std::memory_order_relaxed);\n\n        do {\n            target = my_queue_representation->head_counter++;\n            if (static_cast<std::ptrdiff_t>(my_queue_representation->tail_counter.load(std::memory_order_relaxed)) <= target) {\n                auto pred = [&] {\n                    if (my_abort_counter.load(std::memory_order_relaxed) != old_abort_counter) {\n                            throw_exception(exception_id::user_abort);\n                    }\n\n                    return static_cast<std::ptrdiff_t>(my_queue_representation->tail_counter.load(std::memory_order_relaxed)) <= target;\n                };\n\n                try_call( [&] {\n                    internal_wait(my_monitors, cbq_items_avail_tag, target, pred);\n                }).on_exception( [&] {\n                    my_queue_representation->head_counter--;\n                });\n            }\n            __TBB_ASSERT(static_cast<std::ptrdiff_t>(my_queue_representation->tail_counter.load(std::memory_order_relaxed)) > target, nullptr);\n        } while (!my_queue_representation->choose(target).pop(dst, target, *my_queue_representation, my_allocator));\n\n        r1::notify_bounded_queue_monitor(my_monitors, cbq_slots_avail_tag, target);\n    }\n\n    bool internal_pop_if_present( void* dst ) {\n        bool present{};\n        ticket_type ticket{};\n        std::tie(present, ticket) = internal_try_pop_impl(dst, *my_queue_representation, my_allocator);\n\n        if (present) {\n            r1::notify_bounded_queue_monitor(my_monitors, cbq_slots_avail_tag, ticket);\n        }\n        return present;\n    }\n\n    void internal_abort() {\n        ++my_abort_counter;\n        r1::abort_bounded_queue_monitors(my_monitors);\n    }\n\n    static void copy_construct_item(T* location, const void* src) {\n        // TODO: use allocator_traits for copy construction\n        new (location) value_type(*static_cast<const value_type*>(src));\n    }\n\n    static void move_construct_item(T* location, const void* src) {\n        // TODO: use allocator_traits for move construction\n        new (location) value_type(std::move(*static_cast<value_type*>(const_cast<void*>(src))));\n    }\n\n    template <typename Container, typename Value, typename A>\n    friend class concurrent_queue_iterator;\n\n    queue_allocator_type my_allocator;\n    std::ptrdiff_t my_capacity;\n    std::atomic<unsigned> my_abort_counter;\n    queue_representation_type* my_queue_representation;\n\n    r1::concurrent_monitor* my_monitors;\n\n    friend void swap( concurrent_bounded_queue& lhs, concurrent_bounded_queue& rhs ) {\n        lhs.swap(rhs);\n    }\n\n    friend bool operator==( const concurrent_bounded_queue& lhs, const concurrent_bounded_queue& rhs ) {\n        return lhs.size() == rhs.size() && std::equal(lhs.unsafe_begin(), lhs.unsafe_end(), rhs.unsafe_begin());\n    }\n\n#if !__TBB_CPP20_COMPARISONS_PRESENT\n    friend bool operator!=( const concurrent_bounded_queue& lhs, const concurrent_bounded_queue& rhs ) {\n        return !(lhs == rhs);\n    }\n#endif // __TBB_CPP20_COMPARISONS_PRESENT\n}; // class concurrent_bounded_queue\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n// Deduction guide for the constructor from two iterators\ntemplate <typename It, typename Alloc = tbb::cache_aligned_allocator<iterator_value_t<It>>>\nconcurrent_bounded_queue( It, It, Alloc = Alloc() )\n-> concurrent_bounded_queue<iterator_value_t<It>, Alloc>;\n\n#endif /* __TBB_CPP17_DEDUCTION_GUIDES_PRESENT */\n\n} //namespace d2\n} // namespace detail\n\ninline namespace v1 {\n\nusing detail::d2::concurrent_queue;\nusing detail::d2::concurrent_bounded_queue;\nusing detail::r1::user_abort;\nusing detail::r1::bad_last_alloc;\n\n} // inline namespace v1\n} // namespace tbb\n\n#endif // __TBB_concurrent_queue_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/concurrent_set.h",
    "content": "/*\n    Copyright (c) 2019-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_concurrent_set_H\n#define __TBB_concurrent_set_H\n\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_concurrent_skip_list.h\"\n#include \"tbb_allocator.h\"\n#include <functional>\n#include <utility>\n\nnamespace tbb {\nnamespace detail {\nnamespace d2 {\n\ntemplate<typename Key, typename KeyCompare, typename RandomGenerator, typename Allocator, bool AllowMultimapping>\nstruct set_traits {\n    static constexpr std::size_t max_level = RandomGenerator::max_level;\n    using random_level_generator_type = RandomGenerator;\n    using key_type = Key;\n    using value_type = key_type;\n    using compare_type = KeyCompare;\n    using value_compare = compare_type;\n    using reference = value_type&;\n    using const_reference = const value_type&;\n    using allocator_type = Allocator;\n\n    static constexpr bool allow_multimapping = AllowMultimapping;\n\n    static const key_type& get_key(const_reference val) {\n        return val;\n    }\n\n    static value_compare value_comp(compare_type comp) { return comp; }\n}; // struct set_traits\n\ntemplate <typename Key, typename Compare, typename Allocator>\nclass concurrent_multiset;\n\ntemplate <typename Key, typename Compare = std::less<Key>, typename Allocator = tbb::tbb_allocator<Key>>\nclass concurrent_set : public concurrent_skip_list<set_traits<Key, Compare, concurrent_geometric_level_generator<32>, Allocator, false>> {\n    using base_type = concurrent_skip_list<set_traits<Key, Compare, concurrent_geometric_level_generator<32>, Allocator, false>>;\npublic:\n    using key_type = Key;\n    using value_type = typename base_type::value_type;\n    using size_type = typename base_type::size_type;\n    using difference_type = typename base_type::difference_type;\n    using key_compare = Compare;\n    using value_compare = typename base_type::value_compare;\n    using allocator_type = Allocator;\n\n    using reference = typename base_type::reference;\n    using const_reference = typename base_type::const_reference;\n    using pointer = typename base_type::pointer;\n    using const_pointer = typename base_type::const_pointer;\n\n    using iterator = typename base_type::iterator;\n    using const_iterator = typename base_type::const_iterator;\n\n    using node_type = typename base_type::node_type;\n\n    // Include constructors of base_type\n    using base_type::base_type;\n\n    // Required for implicit deduction guides\n    concurrent_set() = default;\n    concurrent_set( const concurrent_set& ) = default;\n    concurrent_set( const concurrent_set& other, const allocator_type& alloc ) : base_type(other, alloc) {}\n    concurrent_set( concurrent_set&& ) = default;\n    concurrent_set( concurrent_set&& other, const allocator_type& alloc ) : base_type(std::move(other), alloc) {}\n    // Required to respect the rule of 5\n    concurrent_set& operator=( const concurrent_set& ) = default;\n    concurrent_set& operator=( concurrent_set&& ) = default;\n\n    concurrent_set& operator=( std::initializer_list<value_type> il ) {\n        base_type::operator= (il);\n        return *this;\n    }\n\n    template<typename OtherCompare>\n    void merge(concurrent_set<key_type, OtherCompare, Allocator>& source) {\n        this->internal_merge(source);\n    }\n\n    template<typename OtherCompare>\n    void merge(concurrent_set<key_type, OtherCompare, Allocator>&& source) {\n        this->internal_merge(std::move(source));\n    }\n\n    template<typename OtherCompare>\n    void merge(concurrent_multiset<key_type, OtherCompare, Allocator>& source) {\n        this->internal_merge(source);\n    }\n\n    template<typename OtherCompare>\n    void merge(concurrent_multiset<key_type, OtherCompare, Allocator>&& source) {\n        this->internal_merge(std::move(source));\n    }\n}; // class concurrent_set\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate <typename It,\n          typename Comp = std::less<iterator_value_t<It>>,\n          typename Alloc = tbb::tbb_allocator<iterator_value_t<It>>,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Comp>>>\nconcurrent_set( It, It, Comp = Comp(), Alloc = Alloc() )\n-> concurrent_set<iterator_value_t<It>, Comp, Alloc>;\n\ntemplate <typename Key,\n          typename Comp = std::less<Key>,\n          typename Alloc = tbb::tbb_allocator<Key>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Comp>>>\nconcurrent_set( std::initializer_list<Key>, Comp = Comp(), Alloc = Alloc() )\n-> concurrent_set<Key, Comp, Alloc>;\n\ntemplate <typename It, typename Alloc,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_set( It, It, Alloc )\n-> concurrent_set<iterator_value_t<It>,\n                  std::less<iterator_value_t<It>>, Alloc>;\n\ntemplate <typename Key, typename Alloc,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_set( std::initializer_list<Key>, Alloc )\n-> concurrent_set<Key, std::less<Key>, Alloc>;\n\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate <typename Key, typename Compare, typename Allocator>\nvoid swap( concurrent_set<Key, Compare, Allocator>& lhs,\n           concurrent_set<Key, Compare, Allocator>& rhs )\n{\n    lhs.swap(rhs);\n}\n\ntemplate <typename Key, typename Compare = std::less<Key>, typename Allocator = tbb::tbb_allocator<Key>>\nclass concurrent_multiset : public concurrent_skip_list<set_traits<Key, Compare, concurrent_geometric_level_generator<32>, Allocator, true>> {\n    using base_type = concurrent_skip_list<set_traits<Key, Compare, concurrent_geometric_level_generator<32>, Allocator, true>>;\npublic:\n    using key_type = Key;\n    using value_type = typename base_type::value_type;\n    using size_type = typename base_type::size_type;\n    using difference_type = typename base_type::difference_type;\n    using key_compare = Compare;\n    using value_compare = typename base_type::value_compare;\n    using allocator_type = Allocator;\n\n    using reference = typename base_type::reference;\n    using const_reference = typename base_type::const_reference;\n    using pointer = typename base_type::pointer;\n    using const_pointer = typename base_type::const_pointer;\n\n    using iterator = typename base_type::iterator;\n    using const_iterator = typename base_type::const_iterator;\n\n    using node_type = typename base_type::node_type;\n\n    // Include constructors of base_type;\n    using base_type::base_type;\n\n    // Required for implicit deduction guides\n    concurrent_multiset() = default;\n    concurrent_multiset( const concurrent_multiset& ) = default;\n    concurrent_multiset( const concurrent_multiset& other, const allocator_type& alloc ) : base_type(other, alloc) {}\n    concurrent_multiset( concurrent_multiset&& ) = default;\n    concurrent_multiset( concurrent_multiset&& other, const allocator_type& alloc ) : base_type(std::move(other), alloc) {}\n    // Required to respect the rule of 5\n    concurrent_multiset& operator=( const concurrent_multiset& ) = default;\n    concurrent_multiset& operator=( concurrent_multiset&& ) = default;\n\n    concurrent_multiset& operator=( std::initializer_list<value_type> il ) {\n        base_type::operator= (il);\n        return *this;\n    }\n\n    template<typename OtherCompare>\n    void merge(concurrent_set<key_type, OtherCompare, Allocator>& source) {\n        this->internal_merge(source);\n    }\n\n    template<typename OtherCompare>\n    void merge(concurrent_set<key_type, OtherCompare, Allocator>&& source) {\n        this->internal_merge(std::move(source));\n    }\n\n    template<typename OtherCompare>\n    void merge(concurrent_multiset<key_type, OtherCompare, Allocator>& source) {\n        this->internal_merge(source);\n    }\n\n    template<typename OtherCompare>\n    void merge(concurrent_multiset<key_type, OtherCompare, Allocator>&& source) {\n        this->internal_merge(std::move(source));\n    }\n}; // class concurrent_multiset\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate <typename It,\n          typename Comp = std::less<iterator_value_t<It>>,\n          typename Alloc = tbb::tbb_allocator<iterator_value_t<It>>,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Comp>>>\nconcurrent_multiset( It, It, Comp = Comp(), Alloc = Alloc() )\n-> concurrent_multiset<iterator_value_t<It>, Comp, Alloc>;\n\ntemplate <typename Key,\n          typename Comp = std::less<Key>,\n          typename Alloc = tbb::tbb_allocator<Key>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Comp>>>\nconcurrent_multiset( std::initializer_list<Key>, Comp = Comp(), Alloc = Alloc() )\n-> concurrent_multiset<Key, Comp, Alloc>;\n\ntemplate <typename It, typename Alloc,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_multiset( It, It, Alloc )\n-> concurrent_multiset<iterator_value_t<It>, std::less<iterator_value_t<It>>, Alloc>;\n\ntemplate <typename Key, typename Alloc,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_multiset( std::initializer_list<Key>, Alloc )\n-> concurrent_multiset<Key, std::less<Key>, Alloc>;\n\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate <typename Key, typename Compare, typename Allocator>\nvoid swap( concurrent_multiset<Key, Compare, Allocator>& lhs,\n           concurrent_multiset<Key, Compare, Allocator>& rhs )\n{\n    lhs.swap(rhs);\n}\n\n} // namespace d2\n} // namespace detail\n\ninline namespace v1 {\n\nusing detail::d2::concurrent_set;\nusing detail::d2::concurrent_multiset;\nusing detail::split;\n\n} // inline namespace v1\n} // namespace tbb\n\n#endif // __TBB_concurrent_set_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/concurrent_unordered_map.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_concurrent_unordered_map_H\n#define __TBB_concurrent_unordered_map_H\n\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_concurrent_unordered_base.h\"\n#include \"tbb_allocator.h\"\n#include <functional>\n\nnamespace tbb {\nnamespace detail {\nnamespace d2 {\n\ntemplate <typename Key, typename T, typename Hash, typename KeyEqual, typename Allocator, bool AllowMultimapping>\nstruct concurrent_unordered_map_traits {\n    using value_type = std::pair<const Key, T>;\n    using key_type = Key;\n    using allocator_type = Allocator;\n    using hash_compare_type = d1::hash_compare<Key, Hash, KeyEqual>;\n    static constexpr bool allow_multimapping = AllowMultimapping;\n\n    static constexpr const key_type& get_key( const value_type& value ) {\n        return value.first;\n    }\n}; // struct concurrent_unordered_map_traits\n\ntemplate <typename Key, typename T, typename Hash, typename KeyEqual, typename Allocator>\nclass concurrent_unordered_multimap;\n\ntemplate <typename Key, typename T, typename Hash = std::hash<Key>, typename KeyEqual = std::equal_to<Key>,\n          typename Allocator = tbb::tbb_allocator<std::pair<const Key, T>> >\nclass concurrent_unordered_map\n    : public concurrent_unordered_base<concurrent_unordered_map_traits<Key, T, Hash, KeyEqual, Allocator, false>>\n{\n    using traits_type = concurrent_unordered_map_traits<Key, T, Hash, KeyEqual, Allocator, false>;\n    using base_type = concurrent_unordered_base<traits_type>;\npublic:\n    using key_type = typename base_type::key_type;\n    using mapped_type = T;\n    using value_type = typename base_type::value_type;\n    using size_type = typename base_type::size_type;\n    using difference_type = typename base_type::difference_type;\n    using hasher = typename base_type::hasher;\n    using key_equal = typename base_type::key_equal;\n    using allocator_type = typename base_type::allocator_type;\n    using reference = typename base_type::reference;\n    using const_reference = typename base_type::const_reference;\n    using pointer = typename base_type::pointer;\n    using const_pointer = typename base_type::const_pointer;\n    using iterator = typename base_type::iterator;\n    using const_iterator = typename base_type::const_iterator;\n    using local_iterator = typename base_type::local_iterator;\n    using const_local_iterator = typename base_type::const_local_iterator;\n    using node_type = typename base_type::node_type;\n\n    // Include constructors of base type\n    using base_type::base_type;\n\n    // Required for implicit deduction guides\n    concurrent_unordered_map() = default;\n    concurrent_unordered_map( const concurrent_unordered_map& ) = default;\n    concurrent_unordered_map( const concurrent_unordered_map& other, const allocator_type& alloc ) : base_type(other, alloc) {}\n    concurrent_unordered_map( concurrent_unordered_map&& ) = default;\n    concurrent_unordered_map( concurrent_unordered_map&& other, const allocator_type& alloc ) : base_type(std::move(other), alloc) {}\n    // Required to respect the rule of 5\n    concurrent_unordered_map& operator=( const concurrent_unordered_map& ) = default;\n    concurrent_unordered_map& operator=( concurrent_unordered_map&& ) = default;\n\n    concurrent_unordered_map& operator=( std::initializer_list<value_type> il ) {\n        base_type::operator= (il);\n        return *this;\n    }\n\n    // Observers\n    mapped_type& operator[]( const key_type& key ) {\n        iterator where = this->find(key);\n\n        if (where == this->end()) {\n            where = this->emplace(std::piecewise_construct, std::forward_as_tuple(key), std::tuple<>()).first;\n        }\n        return where->second;\n    }\n\n    mapped_type& operator[]( key_type&& key ) {\n        iterator where = this->find(key);\n\n        if (where == this->end()) {\n            where = this->emplace(std::piecewise_construct, std::forward_as_tuple(std::move(key)), std::tuple<>()).first;\n        }\n        return where->second;\n    }\n\n    mapped_type& at( const key_type& key ) {\n        iterator where = this->find(key);\n\n        if (where == this->end()) {\n            throw_exception(exception_id::invalid_key);\n        }\n        return where->second;\n    }\n\n    const mapped_type& at( const key_type& key ) const {\n        const_iterator where = this->find(key);\n\n        if (where == this->end()) {\n            throw_exception(exception_id::out_of_range);\n        }\n        return where->second;\n    }\n\n    using base_type::insert;\n\n    template<typename P>\n    typename std::enable_if<std::is_constructible<value_type, P&&>::value,\n                            std::pair<iterator, bool>>::type insert( P&& value ) {\n        return this->emplace(std::forward<P>(value));\n    }\n\n    template<typename P>\n    typename std::enable_if<std::is_constructible<value_type, P&&>::value,\n                            iterator>::type insert( const_iterator hint, P&& value ) {\n        return this->emplace_hint(hint, std::forward<P>(value));\n    }\n\n    template <typename OtherHash, typename OtherKeyEqual>\n    void merge( concurrent_unordered_map<key_type, mapped_type, OtherHash, OtherKeyEqual, allocator_type>& source ) {\n        this->internal_merge(source);\n    }\n\n    template <typename OtherHash, typename OtherKeyEqual>\n    void merge( concurrent_unordered_map<key_type, mapped_type, OtherHash, OtherKeyEqual, allocator_type>&& source ) {\n        this->internal_merge(std::move(source));\n    }\n\n    template <typename OtherHash, typename OtherKeyEqual>\n    void merge( concurrent_unordered_multimap<key_type, mapped_type, OtherHash, OtherKeyEqual, allocator_type>& source ) {\n        this->internal_merge(source);\n    }\n\n    template <typename OtherHash, typename OtherKeyEqual>\n    void merge( concurrent_unordered_multimap<key_type, mapped_type, OtherHash, OtherKeyEqual, allocator_type>&& source ) {\n        this->internal_merge(std::move(source));\n    }\n}; // class concurrent_unordered_map\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\ntemplate <typename It,\n          typename Hash = std::hash<iterator_key_t<It>>,\n          typename KeyEq = std::equal_to<iterator_key_t<It>>,\n          typename Alloc = tbb::tbb_allocator<iterator_alloc_pair_t<It>>,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Hash>>,\n          typename = std::enable_if_t<!is_allocator_v<KeyEq>>,\n          typename = std::enable_if_t<!std::is_integral_v<Hash>>>\nconcurrent_unordered_map( It, It, std::size_t =  {},\n                          Hash = Hash(), KeyEq = KeyEq(), Alloc = Alloc() )\n-> concurrent_unordered_map<iterator_key_t<It>, iterator_mapped_t<It>, Hash, KeyEq, Alloc>;\n\ntemplate <typename Key, typename T,\n          typename Hash = std::hash<std::remove_const_t<Key>>,\n          typename KeyEq = std::equal_to<std::remove_const_t<Key>>,\n          typename Alloc = tbb::tbb_allocator<std::pair<const Key, T>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Hash>>,\n          typename = std::enable_if_t<!is_allocator_v<KeyEq>>,\n          typename = std::enable_if_t<!std::is_integral_v<Hash>>>\nconcurrent_unordered_map( std::initializer_list<std::pair<Key, T>>, std::size_t = {},\n                          Hash = Hash(), KeyEq = KeyEq(), Alloc = Alloc() )\n-> concurrent_unordered_map<std::remove_const_t<Key>, T, Hash, KeyEq, Alloc>;\n\ntemplate <typename It, typename Alloc,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_unordered_map( It, It, std::size_t, Alloc )\n-> concurrent_unordered_map<iterator_key_t<It>, iterator_mapped_t<It>,\n                            std::hash<iterator_key_t<It>>,\n                            std::equal_to<iterator_key_t<It>>, Alloc>;\n\n// TODO: investigate if a deduction guide for concurrent_unordered_map(It, It, Alloc) is needed\n\ntemplate <typename It, typename Hash, typename Alloc,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Hash>>,\n          typename = std::enable_if_t<!std::is_integral_v<Hash>>>\nconcurrent_unordered_map( It, It, std::size_t, Hash, Alloc )\n-> concurrent_unordered_map<iterator_key_t<It>, iterator_mapped_t<It>,\n                            Hash, std::equal_to<iterator_key_t<It>>, Alloc>;\n\ntemplate <typename Key, typename T, typename Alloc,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_unordered_map( std::initializer_list<std::pair<Key, T>>, std::size_t, Alloc )\n-> concurrent_unordered_map<std::remove_const_t<Key>, T, std::hash<std::remove_const_t<Key>>,\n                            std::equal_to<std::remove_const_t<Key>>, Alloc>;\n\ntemplate <typename Key, typename T, typename Alloc,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_unordered_map( std::initializer_list<std::pair<Key, T>>, Alloc )\n-> concurrent_unordered_map<std::remove_const_t<Key>, T, std::hash<std::remove_const_t<Key>>,\n                            std::equal_to<std::remove_const_t<Key>>, Alloc>;\n\ntemplate <typename Key, typename T, typename Hash, typename Alloc,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Hash>>,\n          typename = std::enable_if_t<!std::is_integral_v<Hash>>>\nconcurrent_unordered_map( std::initializer_list<std::pair<Key, T>>, std::size_t, Hash, Alloc )\n-> concurrent_unordered_map<std::remove_const_t<Key>, T, Hash,\n                            std::equal_to<std::remove_const_t<Key>>, Alloc>;\n\n#if __APPLE__ && __TBB_CLANG_VERSION == 100000\n// An explicit deduction guide is required for copy/move constructor with allocator for APPLE LLVM 10.0.0\n// due to an issue with generating an implicit deduction guide for these constructors under several strange surcumstances.\n// Currently the issue takes place because the last template parameter for Traits is boolean, it should not affect the deduction guides\n// The issue reproduces only on this version of the compiler\ntemplate <typename Key, typename T, typename Hash, typename KeyEq, typename Alloc>\nconcurrent_unordered_map( concurrent_unordered_map<Key, T, Hash, KeyEq, Alloc>, Alloc )\n-> concurrent_unordered_map<Key, T, Hash, KeyEq, Alloc>;\n#endif\n\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate <typename Key, typename T, typename Hash, typename KeyEqual, typename Allocator>\nvoid swap( concurrent_unordered_map<Key, T, Hash, KeyEqual, Allocator>& lhs,\n           concurrent_unordered_map<Key, T, Hash, KeyEqual, Allocator>& rhs ) {\n    lhs.swap(rhs);\n}\n\ntemplate <typename Key, typename T, typename Hash = std::hash<Key>, typename KeyEqual = std::equal_to<Key>,\n          typename Allocator = tbb::tbb_allocator<std::pair<const Key, T>> >\nclass concurrent_unordered_multimap\n    : public concurrent_unordered_base<concurrent_unordered_map_traits<Key, T, Hash, KeyEqual, Allocator, true>>\n{\n    using traits_type = concurrent_unordered_map_traits<Key, T, Hash, KeyEqual, Allocator, true>;\n    using base_type = concurrent_unordered_base<traits_type>;\npublic:\n    using key_type = typename base_type::key_type;\n    using mapped_type = T;\n    using value_type = typename base_type::value_type;\n    using size_type = typename base_type::size_type;\n    using difference_type = typename base_type::difference_type;\n    using hasher = typename base_type::hasher;\n    using key_equal = typename base_type::key_equal;\n    using allocator_type = typename base_type::allocator_type;\n    using reference = typename base_type::reference;\n    using const_reference = typename base_type::const_reference;\n    using pointer = typename base_type::pointer;\n    using const_pointer = typename base_type::const_pointer;\n    using iterator = typename base_type::iterator;\n    using const_iterator = typename base_type::const_iterator;\n    using local_iterator = typename base_type::local_iterator;\n    using const_local_iterator = typename base_type::const_local_iterator;\n    using node_type = typename base_type::node_type;\n\n    // Include constructors of base type\n    using base_type::base_type;\n    using base_type::insert;\n\n    // Required for implicit deduction guides\n    concurrent_unordered_multimap() = default;\n    concurrent_unordered_multimap( const concurrent_unordered_multimap& ) = default;\n    concurrent_unordered_multimap( const concurrent_unordered_multimap& other, const allocator_type& alloc ) : base_type(other, alloc) {}\n    concurrent_unordered_multimap( concurrent_unordered_multimap&& ) = default;\n    concurrent_unordered_multimap( concurrent_unordered_multimap&& other, const allocator_type& alloc ) : base_type(std::move(other), alloc) {}\n    // Required to respect the rule of 5\n    concurrent_unordered_multimap& operator=( const concurrent_unordered_multimap& ) = default;\n    concurrent_unordered_multimap& operator=( concurrent_unordered_multimap&& ) = default;\n\n    concurrent_unordered_multimap& operator=( std::initializer_list<value_type> il ) {\n        base_type::operator= (il);\n        return *this;\n    }\n\n    template <typename P>\n    typename std::enable_if<std::is_constructible<value_type, P&&>::value,\n                            std::pair<iterator, bool>>::type insert( P&& value ) {\n        return this->emplace(std::forward<P>(value));\n    }\n\n    template<typename P>\n    typename std::enable_if<std::is_constructible<value_type, P&&>::value,\n                            iterator>::type insert( const_iterator hint, P&& value ) {\n        return this->emplace_hint(hint, std::forward<P&&>(value));\n    }\n\n    template <typename OtherHash, typename OtherKeyEqual>\n    void merge( concurrent_unordered_map<key_type, mapped_type, OtherHash, OtherKeyEqual, allocator_type>& source ) {\n        this->internal_merge(source);\n    }\n\n    template <typename OtherHash, typename OtherKeyEqual>\n    void merge( concurrent_unordered_map<key_type, mapped_type, OtherHash, OtherKeyEqual, allocator_type>&& source ) {\n        this->internal_merge(std::move(source));\n    }\n\n    template <typename OtherHash, typename OtherKeyEqual>\n    void merge( concurrent_unordered_multimap<key_type, mapped_type, OtherHash, OtherKeyEqual, allocator_type>& source ) {\n        this->internal_merge(source);\n    }\n\n    template <typename OtherHash, typename OtherKeyEqual>\n    void merge( concurrent_unordered_multimap<key_type, mapped_type, OtherHash, OtherKeyEqual, allocator_type>&& source ) {\n        this->internal_merge(std::move(source));\n    }\n}; // class concurrent_unordered_multimap\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate <typename It,\n          typename Hash = std::hash<iterator_key_t<It>>,\n          typename KeyEq = std::equal_to<iterator_key_t<It>>,\n          typename Alloc = tbb::tbb_allocator<iterator_alloc_pair_t<It>>,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Hash>>,\n          typename = std::enable_if_t<!is_allocator_v<KeyEq>>,\n          typename = std::enable_if_t<!std::is_integral_v<Hash>>>\nconcurrent_unordered_multimap( It, It, std::size_t = {}, Hash = Hash(), KeyEq = KeyEq(), Alloc = Alloc() )\n-> concurrent_unordered_multimap<iterator_key_t<It>, iterator_mapped_t<It>, Hash, KeyEq, Alloc>;\n\ntemplate <typename Key, typename T,\n          typename Hash = std::hash<std::remove_const_t<Key>>,\n          typename KeyEq = std::equal_to<std::remove_const_t<Key>>,\n          typename Alloc = tbb::tbb_allocator<std::pair<const Key, T>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Hash>>,\n          typename = std::enable_if_t<!is_allocator_v<KeyEq>>,\n          typename = std::enable_if_t<!std::is_integral_v<Hash>>>\nconcurrent_unordered_multimap( std::initializer_list<std::pair<Key, T>>, std::size_t = {},\n                               Hash = Hash(), KeyEq = KeyEq(), Alloc = Alloc() )\n-> concurrent_unordered_multimap<std::remove_const_t<Key>, T, Hash, KeyEq, Alloc>;\n\ntemplate <typename It, typename Alloc,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_unordered_multimap( It, It, std::size_t, Alloc )\n-> concurrent_unordered_multimap<iterator_key_t<It>, iterator_mapped_t<It>,\n                                 std::hash<iterator_key_t<It>>,\n                                 std::equal_to<iterator_key_t<It>>, Alloc>;\n\ntemplate <typename It, typename Hash, typename Alloc,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Hash>>,\n          typename = std::enable_if_t<!std::is_integral_v<Hash>>>\nconcurrent_unordered_multimap( It, It, std::size_t, Hash, Alloc )\n-> concurrent_unordered_multimap<iterator_key_t<It>, iterator_mapped_t<It>, Hash,\n                                 std::equal_to<iterator_key_t<It>>, Alloc>;\n\ntemplate <typename Key, typename T, typename Alloc,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_unordered_multimap( std::initializer_list<std::pair<Key, T>>, std::size_t, Alloc )\n-> concurrent_unordered_multimap<std::remove_const_t<Key>, T, std::hash<std::remove_const_t<Key>>,\n                                 std::equal_to<std::remove_const_t<Key>>, Alloc>;\n\ntemplate <typename Key, typename T, typename Alloc,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_unordered_multimap( std::initializer_list<std::pair<Key, T>>, Alloc )\n-> concurrent_unordered_multimap<std::remove_const_t<Key>, T, std::hash<std::remove_const_t<Key>>,\n                                 std::equal_to<std::remove_const_t<Key>>, Alloc>;\n\ntemplate <typename Key, typename T, typename Hash, typename Alloc,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Hash>>,\n          typename = std::enable_if_t<!std::is_integral_v<Hash>>>\nconcurrent_unordered_multimap( std::initializer_list<std::pair<Key, T>>, std::size_t, Hash, Alloc )\n-> concurrent_unordered_multimap<std::remove_const_t<Key>, T, Hash,\n                                 std::equal_to<std::remove_const_t<Key>>, Alloc>;\n\n#if __APPLE__ && __TBB_CLANG_VERSION == 100000\n// An explicit deduction guide is required for copy/move constructor with allocator for APPLE LLVM 10.0.0\n// due to an issue with generating an implicit deduction guide for these constructors under several strange surcumstances.\n// Currently the issue takes place because the last template parameter for Traits is boolean, it should not affect the deduction guides\n// The issue reproduces only on this version of the compiler\ntemplate <typename Key, typename T, typename Hash, typename KeyEq, typename Alloc>\nconcurrent_unordered_multimap( concurrent_unordered_multimap<Key, T, Hash, KeyEq, Alloc>, Alloc )\n-> concurrent_unordered_multimap<Key, T, Hash, KeyEq, Alloc>;\n#endif\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate <typename Key, typename T, typename Hash, typename KeyEqual, typename Allocator>\nvoid swap( concurrent_unordered_multimap<Key, T, Hash, KeyEqual, Allocator>& lhs,\n           concurrent_unordered_multimap<Key, T, Hash, KeyEqual, Allocator>& rhs ) {\n    lhs.swap(rhs);\n}\n\n} // namespace d2\n} // namespace detail\n\ninline namespace v1 {\n\nusing detail::d2::concurrent_unordered_map;\nusing detail::d2::concurrent_unordered_multimap;\nusing detail::split;\n\n} // inline namespace v1\n} // namespace tbb\n\n#endif // __TBB_concurrent_unordered_map_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/concurrent_unordered_set.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_concurrent_unordered_set_H\n#define __TBB_concurrent_unordered_set_H\n\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_concurrent_unordered_base.h\"\n#include \"tbb_allocator.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace d2 {\n\ntemplate <typename Key, typename Hash, typename KeyEqual, typename Allocator, bool AllowMultimapping>\nstruct concurrent_unordered_set_traits {\n    using key_type = Key;\n    using value_type = key_type;\n    using allocator_type = Allocator;\n    using hash_compare_type = d1::hash_compare<key_type, Hash, KeyEqual>;\n    static constexpr bool allow_multimapping = AllowMultimapping;\n\n    static constexpr const key_type& get_key( const value_type& value ) {\n        return value;\n    }\n}; // class concurrent_unordered_set_traits\n\ntemplate <typename Key, typename Hash, typename KeyEqual, typename Allocator>\nclass concurrent_unordered_multiset;\n\ntemplate <typename Key, typename Hash = std::hash<Key>, typename KeyEqual = std::equal_to<Key>,\n          typename Allocator = tbb::tbb_allocator<Key>>\nclass concurrent_unordered_set\n    : public concurrent_unordered_base<concurrent_unordered_set_traits<Key, Hash, KeyEqual, Allocator, false>>\n{\n    using traits_type = concurrent_unordered_set_traits<Key, Hash, KeyEqual, Allocator, false>;\n    using base_type = concurrent_unordered_base<traits_type>;\npublic:\n    using key_type = typename base_type::key_type;\n    using value_type = typename base_type::value_type;\n    using size_type = typename base_type::size_type;\n    using difference_type = typename base_type::difference_type;\n    using hasher = typename base_type::hasher;\n    using key_equal = typename base_type::key_equal;\n    using allocator_type = typename base_type::allocator_type;\n    using reference = typename base_type::reference;\n    using const_reference = typename base_type::const_reference;\n    using pointer = typename base_type::pointer;\n    using const_pointer = typename base_type::const_pointer;\n    using iterator = typename base_type::iterator;\n    using const_iterator = typename base_type::const_iterator;\n    using local_iterator = typename base_type::local_iterator;\n    using const_local_iterator = typename base_type::const_local_iterator;\n    using node_type = typename base_type::node_type;\n\n    // Include constructors of base_type;\n    using base_type::base_type;\n\n    // Required for implicit deduction guides\n    concurrent_unordered_set() = default;\n    concurrent_unordered_set( const concurrent_unordered_set& ) = default;\n    concurrent_unordered_set( const concurrent_unordered_set& other, const allocator_type& alloc ) : base_type(other, alloc) {}\n    concurrent_unordered_set( concurrent_unordered_set&& ) = default;\n    concurrent_unordered_set( concurrent_unordered_set&& other, const allocator_type& alloc ) : base_type(std::move(other), alloc) {}\n    // Required to respect the rule of 5\n    concurrent_unordered_set& operator=( const concurrent_unordered_set& ) = default;\n    concurrent_unordered_set& operator=( concurrent_unordered_set&& ) = default;\n\n    concurrent_unordered_set& operator=( std::initializer_list<value_type> il ) {\n        base_type::operator= (il);\n        return *this;\n    }\n\n    template <typename OtherHash, typename OtherKeyEqual>\n    void merge( concurrent_unordered_set<key_type, OtherHash, OtherKeyEqual, allocator_type>& source ) {\n        this->internal_merge(source);\n    }\n\n    template <typename OtherHash, typename OtherKeyEqual>\n    void merge( concurrent_unordered_set<key_type, OtherHash, OtherKeyEqual, allocator_type>&& source ) {\n        this->internal_merge(std::move(source));\n    }\n\n    template <typename OtherHash, typename OtherKeyEqual>\n    void merge( concurrent_unordered_multiset<key_type, OtherHash, OtherKeyEqual, allocator_type>& source ) {\n        this->internal_merge(source);\n    }\n\n    template <typename OtherHash, typename OtherKeyEqual>\n    void merge( concurrent_unordered_multiset<key_type, OtherHash, OtherKeyEqual, allocator_type>&& source ) {\n        this->internal_merge(std::move(source));\n    }\n}; // class concurrent_unordered_set\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate <typename It,\n          typename Hash = std::hash<iterator_value_t<It>>,\n          typename KeyEq = std::equal_to<iterator_value_t<It>>,\n          typename Alloc = tbb::tbb_allocator<iterator_value_t<It>>,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Hash>>,\n          typename = std::enable_if_t<!is_allocator_v<KeyEq>>,\n          typename = std::enable_if_t<!std::is_integral_v<Hash>>>\nconcurrent_unordered_set( It, It, std::size_t = {}, Hash = Hash(), KeyEq = KeyEq(), Alloc = Alloc() )\n-> concurrent_unordered_set<iterator_value_t<It>, Hash, KeyEq, Alloc>;\n\ntemplate <typename T,\n          typename Hash = std::hash<T>,\n          typename KeyEq = std::equal_to<T>,\n          typename Alloc = tbb::tbb_allocator<T>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Hash>>,\n          typename = std::enable_if_t<!is_allocator_v<KeyEq>>,\n          typename = std::enable_if_t<!std::is_integral_v<Hash>>>\nconcurrent_unordered_set( std::initializer_list<T>, std::size_t = {},\n                          Hash = Hash(), KeyEq = KeyEq(), Alloc = Alloc() )\n-> concurrent_unordered_set<T, Hash, KeyEq, Alloc>;\n\ntemplate <typename It, typename Alloc,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_unordered_set( It, It, std::size_t, Alloc )\n-> concurrent_unordered_set<iterator_value_t<It>, std::hash<iterator_value_t<It>>,\n                            std::equal_to<iterator_value_t<It>>, Alloc>;\n\ntemplate <typename It, typename Hash, typename Alloc,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Hash>>,\n          typename = std::enable_if_t<!std::is_integral_v<Hash>>>\nconcurrent_unordered_set( It, It, std::size_t, Hash, Alloc )\n-> concurrent_unordered_set<iterator_value_t<It>, Hash, std::equal_to<iterator_value_t<It>>, Alloc>;\n\ntemplate <typename T, typename Alloc,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_unordered_set( std::initializer_list<T>, std::size_t, Alloc )\n-> concurrent_unordered_set<T, std::hash<T>, std::equal_to<T>, Alloc>;\n\ntemplate <typename T, typename Alloc,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_unordered_set( std::initializer_list<T>, Alloc )\n-> concurrent_unordered_set<T, std::hash<T>, std::equal_to<T>, Alloc>;\n\ntemplate <typename T, typename Hash, typename Alloc,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Hash>>,\n          typename = std::enable_if_t<!std::is_integral_v<Hash>>>\nconcurrent_unordered_set( std::initializer_list<T>, std::size_t, Hash, Alloc )\n-> concurrent_unordered_set<T, Hash, std::equal_to<T>, Alloc>;\n\n#if __APPLE__ && __TBB_CLANG_VERSION == 100000\n// An explicit deduction guide is required for copy/move constructor with allocator for APPLE LLVM 10.0.0\n// due to an issue with generating an implicit deduction guide for these constructors under several strange surcumstances.\n// Currently the issue takes place because the last template parameter for Traits is boolean, it should not affect the deduction guides\n// The issue reproduces only on this version of the compiler\ntemplate <typename T, typename Hash, typename KeyEq, typename Alloc>\nconcurrent_unordered_set( concurrent_unordered_set<T, Hash, KeyEq, Alloc>, Alloc )\n-> concurrent_unordered_set<T, Hash, KeyEq, Alloc>;\n#endif\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate <typename Key, typename Hash, typename KeyEqual, typename Allocator>\nvoid swap( concurrent_unordered_set<Key, Hash, KeyEqual, Allocator>& lhs,\n           concurrent_unordered_set<Key, Hash, KeyEqual, Allocator>& rhs ) {\n    lhs.swap(rhs);\n}\n\ntemplate <typename Key, typename Hash = std::hash<Key>, typename KeyEqual = std::equal_to<Key>,\n          typename Allocator = tbb::tbb_allocator<Key>>\nclass concurrent_unordered_multiset\n    : public concurrent_unordered_base<concurrent_unordered_set_traits<Key, Hash, KeyEqual, Allocator, true>>\n{\n    using traits_type = concurrent_unordered_set_traits<Key, Hash, KeyEqual, Allocator, true>;\n    using base_type = concurrent_unordered_base<traits_type>;\npublic:\n    using key_type = typename base_type::key_type;\n    using value_type = typename base_type::value_type;\n    using size_type = typename base_type::size_type;\n    using difference_type = typename base_type::difference_type;\n    using hasher = typename base_type::hasher;\n    using key_equal = typename base_type::key_equal;\n    using allocator_type = typename base_type::allocator_type;\n    using reference = typename base_type::reference;\n    using const_reference = typename base_type::const_reference;\n    using pointer = typename base_type::pointer;\n    using const_pointer = typename base_type::const_pointer;\n    using iterator = typename base_type::iterator;\n    using const_iterator = typename base_type::const_iterator;\n    using local_iterator = typename base_type::local_iterator;\n    using const_local_iterator = typename base_type::const_local_iterator;\n    using node_type = typename base_type::node_type;\n\n    // Include constructors of base_type;\n    using base_type::base_type;\n\n    // Required for implicit deduction guides\n    concurrent_unordered_multiset() = default;\n    concurrent_unordered_multiset( const concurrent_unordered_multiset& ) = default;\n    concurrent_unordered_multiset( const concurrent_unordered_multiset& other, const allocator_type& alloc ) : base_type(other, alloc) {}\n    concurrent_unordered_multiset( concurrent_unordered_multiset&& ) = default;\n    concurrent_unordered_multiset( concurrent_unordered_multiset&& other, const allocator_type& alloc ) : base_type(std::move(other), alloc) {}\n    // Required to respect the rule of 5\n    concurrent_unordered_multiset& operator=( const concurrent_unordered_multiset& ) = default;\n    concurrent_unordered_multiset& operator=( concurrent_unordered_multiset&& ) = default;\n\n    concurrent_unordered_multiset& operator=( std::initializer_list<value_type> il ) {\n        base_type::operator= (il);\n        return *this;\n    }\n\n    template <typename OtherHash, typename OtherKeyEqual>\n    void merge( concurrent_unordered_set<key_type, OtherHash, OtherKeyEqual, allocator_type>& source ) {\n        this->internal_merge(source);\n    }\n\n    template <typename OtherHash, typename OtherKeyEqual>\n    void merge( concurrent_unordered_set<key_type, OtherHash, OtherKeyEqual, allocator_type>&& source ) {\n        this->internal_merge(std::move(source));\n    }\n\n    template <typename OtherHash, typename OtherKeyEqual>\n    void merge( concurrent_unordered_multiset<key_type, OtherHash, OtherKeyEqual, allocator_type>& source ) {\n        this->internal_merge(source);\n    }\n\n    template <typename OtherHash, typename OtherKeyEqual>\n    void merge( concurrent_unordered_multiset<key_type, OtherHash, OtherKeyEqual, allocator_type>&& source ) {\n        this->internal_merge(std::move(source));\n    }\n}; // class concurrent_unordered_multiset\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\ntemplate <typename It,\n          typename Hash = std::hash<iterator_value_t<It>>,\n          typename KeyEq = std::equal_to<iterator_value_t<It>>,\n          typename Alloc = tbb::tbb_allocator<iterator_value_t<It>>,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Hash>>,\n          typename = std::enable_if_t<!is_allocator_v<KeyEq>>,\n          typename = std::enable_if_t<!std::is_integral_v<Hash>>>\nconcurrent_unordered_multiset( It, It, std::size_t = {}, Hash = Hash(), KeyEq = KeyEq(), Alloc = Alloc() )\n-> concurrent_unordered_multiset<iterator_value_t<It>, Hash, KeyEq, Alloc>;\n\ntemplate <typename T,\n          typename Hash = std::hash<T>,\n          typename KeyEq = std::equal_to<T>,\n          typename Alloc = tbb::tbb_allocator<T>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Hash>>,\n          typename = std::enable_if_t<!is_allocator_v<KeyEq>>,\n          typename = std::enable_if_t<!std::is_integral_v<Hash>>>\nconcurrent_unordered_multiset( std::initializer_list<T>, std::size_t = {},\n                          Hash = Hash(), KeyEq = KeyEq(), Alloc = Alloc() )\n-> concurrent_unordered_multiset<T, Hash, KeyEq, Alloc>;\n\ntemplate <typename It, typename Alloc,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_unordered_multiset( It, It, std::size_t, Alloc )\n-> concurrent_unordered_multiset<iterator_value_t<It>, std::hash<iterator_value_t<It>>,\n                            std::equal_to<iterator_value_t<It>>, Alloc>;\n\ntemplate <typename It, typename Hash, typename Alloc,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Hash>>,\n          typename = std::enable_if_t<!std::is_integral_v<Hash>>>\nconcurrent_unordered_multiset( It, It, std::size_t, Hash, Alloc )\n-> concurrent_unordered_multiset<iterator_value_t<It>, Hash, std::equal_to<iterator_value_t<It>>, Alloc>;\n\ntemplate <typename T, typename Alloc,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_unordered_multiset( std::initializer_list<T>, std::size_t, Alloc )\n-> concurrent_unordered_multiset<T, std::hash<T>, std::equal_to<T>, Alloc>;\n\ntemplate <typename T, typename Alloc,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_unordered_multiset( std::initializer_list<T>, Alloc )\n-> concurrent_unordered_multiset<T, std::hash<T>, std::equal_to<T>, Alloc>;\n\ntemplate <typename T, typename Hash, typename Alloc,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>,\n          typename = std::enable_if_t<!is_allocator_v<Hash>>,\n          typename = std::enable_if_t<!std::is_integral_v<Hash>>>\nconcurrent_unordered_multiset( std::initializer_list<T>, std::size_t, Hash, Alloc )\n-> concurrent_unordered_multiset<T, Hash, std::equal_to<T>, Alloc>;\n\n#if __APPLE__ && __TBB_CLANG_VERSION == 100000\n// An explicit deduction guide is required for copy/move constructor with allocator for APPLE LLVM 10.0.0\n// due to an issue with generating an implicit deduction guide for these constructors under several strange surcumstances.\n// Currently the issue takes place because the last template parameter for Traits is boolean, it should not affect the deduction guides\n// The issue reproduces only on this version of the compiler\ntemplate <typename T, typename Hash, typename KeyEq, typename Alloc>\nconcurrent_unordered_multiset( concurrent_unordered_multiset<T, Hash, KeyEq, Alloc>, Alloc )\n-> concurrent_unordered_multiset<T, Hash, KeyEq, Alloc>;\n#endif\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate <typename Key, typename Hash, typename KeyEqual, typename Allocator>\nvoid swap( concurrent_unordered_multiset<Key, Hash, KeyEqual, Allocator>& lhs,\n           concurrent_unordered_multiset<Key, Hash, KeyEqual, Allocator>& rhs ) {\n    lhs.swap(rhs);\n}\n\n} // namespace d2\n} // namespace detail\n\ninline namespace v1 {\n\nusing detail::d2::concurrent_unordered_set;\nusing detail::d2::concurrent_unordered_multiset;\nusing detail::split;\n\n} // inline namespace v1\n} // namespace tbb\n\n#endif // __TBB_concurrent_unordered_set_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/concurrent_vector.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_concurrent_vector_H\n#define __TBB_concurrent_vector_H\n\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_utils.h\"\n#include \"detail/_assert.h\"\n#include \"detail/_allocator_traits.h\"\n#include \"detail/_segment_table.h\"\n#include \"detail/_containers_helpers.h\"\n#include \"blocked_range.h\"\n#include \"cache_aligned_allocator.h\"\n\n#include <algorithm>\n#include <utility> // std::move_if_noexcept\n#include <algorithm>\n#if __TBB_CPP20_COMPARISONS_PRESENT\n#include <compare>\n#endif\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\ntemplate <typename Vector, typename Value>\nclass vector_iterator {\n    using vector_type = Vector;\n\npublic:\n    using value_type = Value;\n    using size_type = typename vector_type::size_type;\n    using difference_type = typename vector_type::difference_type;\n    using pointer = value_type*;\n    using reference = value_type&;\n    using iterator_category = std::random_access_iterator_tag;\n\n    template <typename Vec, typename Val>\n    friend vector_iterator<Vec, Val> operator+( typename vector_iterator<Vec, Val>::difference_type, const vector_iterator<Vec, Val>& );\n\n    template <typename Vec, typename Val1, typename Val2>\n    friend typename vector_iterator<Vec, Val1>::difference_type operator-( const vector_iterator<Vec, Val1>&, const vector_iterator<Vec, Val2>& );\n\n    template <typename Vec, typename Val1, typename Val2>\n    friend bool operator==( const vector_iterator<Vec, Val1>&, const vector_iterator<Vec, Val2>& );\n\n    template <typename Vec, typename Val1, typename Val2>\n    friend bool operator<( const vector_iterator<Vec, Val1>&, const vector_iterator<Vec, Val2>& );\n\n    template <typename Vec, typename Val>\n    friend class vector_iterator;\n\n    template <typename T, typename Allocator>\n    friend class concurrent_vector;\n\nprivate:\n    vector_iterator( const vector_type& vector, size_type index, value_type* item = nullptr )\n        : my_vector(const_cast<vector_type*>(&vector)), my_index(index), my_item(item)\n    {}\n\npublic:\n    vector_iterator() : my_vector(nullptr), my_index(~size_type(0)), my_item(nullptr)\n    {}\n\n    vector_iterator( const vector_iterator<vector_type, typename vector_type::value_type>& other )\n        : my_vector(other.my_vector), my_index(other.my_index), my_item(other.my_item)\n    {}\n\n    vector_iterator& operator=( const vector_iterator<vector_type, typename vector_type::value_type>& other ) {\n        my_vector = other.my_vector;\n        my_index = other.my_index;\n        my_item = other.my_item;\n        return *this;\n    }\n\n    vector_iterator operator+( difference_type offset ) const {\n        return vector_iterator(*my_vector, my_index + offset);\n    }\n\n    vector_iterator& operator+=( difference_type offset ) {\n        my_index += offset;\n        my_item = nullptr;\n        return *this;\n    }\n\n    vector_iterator operator-( difference_type offset ) const {\n        return vector_iterator(*my_vector, my_index - offset);\n    }\n\n    vector_iterator& operator-=( difference_type offset ) {\n        my_index -= offset;\n        my_item = nullptr;\n        return *this;\n    }\n\n    reference operator*() const {\n        value_type *item = my_item;\n        if (item == nullptr) {\n            item = &my_vector->internal_subscript(my_index);\n        } else {\n            __TBB_ASSERT(item == &my_vector->internal_subscript(my_index), \"corrupt cache\");\n        }\n        return *item;\n    }\n\n    pointer operator->() const { return &(operator*()); }\n\n    reference operator[]( difference_type k ) const {\n        return my_vector->internal_subscript(my_index + k);\n    }\n\n    vector_iterator& operator++() {\n        ++my_index;\n        if (my_item != nullptr) {\n            if (vector_type::is_first_element_in_segment(my_index)) {\n                // If the iterator crosses a segment boundary, the pointer become invalid\n                // as possibly next segment is in another memory location\n                my_item = nullptr;\n            } else {\n                ++my_item;\n            }\n        }\n        return *this;\n    }\n\n    vector_iterator operator++(int) {\n        vector_iterator result = *this;\n        ++(*this);\n        return result;\n    }\n\n    vector_iterator& operator--() {\n        __TBB_ASSERT(my_index > 0, \"operator--() applied to iterator already at beginning of concurrent_vector\");\n        --my_index;\n        if (my_item != nullptr) {\n            if (vector_type::is_first_element_in_segment(my_index)) {\n                // If the iterator crosses a segment boundary, the pointer become invalid\n                // as possibly next segment is in another memory location\n                my_item = nullptr;\n            } else {\n                --my_item;\n            }\n        }\n        return *this;\n    }\n\n    vector_iterator operator--(int) {\n        vector_iterator result = *this;\n        --(*this);\n        return result;\n    }\n\nprivate:\n    // concurrent_vector over which we are iterating.\n    vector_type* my_vector;\n\n    // Index into the vector\n    size_type my_index;\n\n    // Caches my_vector *it;\n    // If my_item == nullptr cached value is not available use internal_subscript(my_index)\n    mutable value_type* my_item;\n}; // class vector_iterator\n\ntemplate <typename Vector, typename T>\nvector_iterator<Vector, T> operator+( typename vector_iterator<Vector, T>::difference_type offset,\n                                      const vector_iterator<Vector, T>& v )\n{\n    return vector_iterator<Vector, T>(*v.my_vector, v.my_index + offset);\n}\n\ntemplate <typename Vector, typename T, typename U>\ntypename vector_iterator<Vector, T>::difference_type operator-( const vector_iterator<Vector, T>& i,\n                                                                const vector_iterator<Vector, U>& j )\n{\n    using difference_type = typename vector_iterator<Vector, T>::difference_type;\n    return static_cast<difference_type>(i.my_index) - static_cast<difference_type>(j.my_index);\n}\n\ntemplate <typename Vector, typename T, typename U>\nbool operator==( const vector_iterator<Vector, T>& i, const vector_iterator<Vector, U>& j ) {\n    return i.my_vector == j.my_vector && i.my_index == j.my_index;\n}\n\ntemplate <typename Vector, typename T, typename U>\nbool operator!=( const vector_iterator<Vector, T>& i, const vector_iterator<Vector, U>& j ) {\n    return !(i == j);\n}\n\ntemplate <typename Vector, typename T, typename U>\nbool operator<( const vector_iterator<Vector, T>& i, const vector_iterator<Vector, U>& j ) {\n    return i.my_index < j.my_index;\n}\n\ntemplate <typename Vector, typename T, typename U>\nbool operator>( const vector_iterator<Vector, T>& i, const vector_iterator<Vector, U>& j ) {\n    return j < i;\n}\n\ntemplate <typename Vector, typename T, typename U>\nbool operator>=( const vector_iterator<Vector, T>& i, const vector_iterator<Vector, U>& j ) {\n    return !(i < j);\n}\n\ntemplate <typename Vector, typename T, typename U>\nbool operator<=( const vector_iterator<Vector, T>& i, const vector_iterator<Vector, U>& j ) {\n    return !(j < i);\n}\n\nstatic constexpr std::size_t embedded_table_num_segments = 3;\n\ntemplate <typename T, typename Allocator = tbb::cache_aligned_allocator<T>>\nclass concurrent_vector\n    : private segment_table<T, Allocator, concurrent_vector<T, Allocator>, embedded_table_num_segments>\n{\n    using self_type = concurrent_vector<T, Allocator>;\n    using base_type = segment_table<T, Allocator, self_type, embedded_table_num_segments>;\n\n    friend class segment_table<T, Allocator, self_type, embedded_table_num_segments>;\n\n    template <typename Iterator>\n    class generic_range_type : public tbb::blocked_range<Iterator> {\n        using base_type = tbb::blocked_range<Iterator>;\n    public:\n        using value_type = T;\n        using reference = T&;\n        using const_reference = const T&;\n        using iterator = Iterator;\n        using difference_type = std::ptrdiff_t;\n\n        using base_type::base_type;\n\n        template<typename U>\n        generic_range_type( const generic_range_type<U>& r) : blocked_range<Iterator>(r.begin(), r.end(), r.grainsize()) {}\n        generic_range_type( generic_range_type& r, split ) : blocked_range<Iterator>(r, split()) {}\n    }; // class generic_range_type\n\n    static_assert(std::is_same<T, typename Allocator::value_type>::value,\n                  \"value_type of the container must be the same as its allocator's\");\n    using allocator_traits_type = tbb::detail::allocator_traits<Allocator>;\n    // Segment table for concurrent_vector can be extended\n    static constexpr bool allow_table_extending = true;\n    static constexpr bool is_noexcept_assignment = allocator_traits_type::propagate_on_container_move_assignment::value ||\n                                                   allocator_traits_type::is_always_equal::value;\n    static constexpr bool is_noexcept_swap = allocator_traits_type::propagate_on_container_swap::value ||\n                                             allocator_traits_type::is_always_equal::value;\n\npublic:\n    using value_type = T;\n    using allocator_type = Allocator;\n    using size_type = std::size_t;\n    using difference_type = std::ptrdiff_t;\n    using reference = value_type&;\n    using const_reference = const value_type&;\n\n    using pointer = typename allocator_traits_type::pointer;\n    using const_pointer = typename allocator_traits_type::const_pointer;\n\n    using iterator = vector_iterator<concurrent_vector, value_type>;\n    using const_iterator = vector_iterator<concurrent_vector, const value_type>;\n    using reverse_iterator = std::reverse_iterator<iterator>;\n    using const_reverse_iterator = std::reverse_iterator<const_iterator>;\n\n    using range_type = generic_range_type<iterator>;\n    using const_range_type = generic_range_type<const_iterator>;\n\n    concurrent_vector() : concurrent_vector(allocator_type()) {}\n\n    explicit concurrent_vector( const allocator_type& alloc ) noexcept\n        : base_type(alloc)\n    {}\n\n    explicit concurrent_vector( size_type count, const value_type& value,\n                                const allocator_type& alloc = allocator_type() )\n        : concurrent_vector(alloc)\n    {\n        try_call( [&] {\n            grow_by(count, value);\n        } ).on_exception( [&] {\n            base_type::clear();\n        });\n    }\n\n    explicit concurrent_vector( size_type count, const allocator_type& alloc = allocator_type() )\n        : concurrent_vector(alloc)\n    {\n        try_call( [&] {\n            grow_by(count);\n        } ).on_exception( [&] {\n            base_type::clear();\n        });\n    }\n\n    template <typename InputIterator>\n    concurrent_vector( InputIterator first, InputIterator last, const allocator_type& alloc = allocator_type() )\n        : concurrent_vector(alloc)\n    {\n        try_call( [&] {\n            grow_by(first, last);\n        } ).on_exception( [&] {\n            base_type::clear();\n        });\n    }\n\n    concurrent_vector( const concurrent_vector& other )\n        : base_type(segment_table_allocator_traits::select_on_container_copy_construction(other.get_allocator()))\n    {\n        try_call( [&] {\n            grow_by(other.begin(), other.end());\n        } ).on_exception( [&] {\n            base_type::clear();\n        });\n    }\n\n    concurrent_vector( const concurrent_vector& other, const allocator_type& alloc )\n        : base_type(other, alloc) {}\n\n    concurrent_vector(concurrent_vector&& other) noexcept\n        : base_type(std::move(other))\n    {}\n\n    concurrent_vector( concurrent_vector&& other, const allocator_type& alloc )\n        : base_type(std::move(other), alloc)\n    {}\n\n    concurrent_vector( std::initializer_list<value_type> init,\n                       const allocator_type& alloc = allocator_type() )\n        : concurrent_vector(init.begin(), init.end(), alloc)\n    {}\n\n    ~concurrent_vector() {}\n\n    // Assignment\n    concurrent_vector& operator=( const concurrent_vector& other ) {\n        base_type::operator=(other);\n        return *this;\n    }\n\n    concurrent_vector& operator=( concurrent_vector&& other ) noexcept(is_noexcept_assignment) {\n        base_type::operator=(std::move(other));\n        return *this;\n    }\n\n    concurrent_vector& operator=( std::initializer_list<value_type> init ) {\n        assign(init);\n        return *this;\n    }\n\n    void assign( size_type count, const value_type& value ) {\n        destroy_elements();\n        grow_by(count, value);\n    }\n\n    template <typename InputIterator>\n    typename std::enable_if<is_input_iterator<InputIterator>::value, void>::type\n    assign( InputIterator first, InputIterator last ) {\n        destroy_elements();\n        grow_by(first, last);\n    }\n\n    void assign( std::initializer_list<value_type> init ) {\n        destroy_elements();\n        assign(init.begin(), init.end());\n    }\n\n    // Concurrent growth\n    iterator grow_by( size_type delta ) {\n        return internal_grow_by_delta(delta);\n    }\n\n    iterator grow_by( size_type delta, const value_type& value ) {\n        return internal_grow_by_delta(delta, value);\n    }\n\n    template <typename ForwardIterator>\n    typename std::enable_if<is_input_iterator<ForwardIterator>::value, iterator>::type\n    grow_by( ForwardIterator first, ForwardIterator last ) {\n        auto delta = std::distance(first, last);\n        return internal_grow_by_delta(delta, first, last);\n    }\n\n    iterator grow_by( std::initializer_list<value_type> init ) {\n        return grow_by(init.begin(), init.end());\n    }\n\n    iterator grow_to_at_least( size_type n ) {\n        return internal_grow_to_at_least(n);\n    }\n    iterator grow_to_at_least( size_type n, const value_type& value ) {\n        return internal_grow_to_at_least(n, value);\n    }\n\n    iterator push_back( const value_type& item ) {\n        return internal_emplace_back(item);\n    }\n\n    iterator push_back( value_type&& item ) {\n        return internal_emplace_back(std::move(item));\n    }\n\n    template <typename... Args>\n    iterator emplace_back( Args&&... args ) {\n        return internal_emplace_back(std::forward<Args>(args)...);\n    }\n\n    // Items access\n    reference operator[]( size_type index ) {\n        return internal_subscript(index);\n    }\n    const_reference operator[]( size_type index ) const {\n        return internal_subscript(index);\n    }\n\n    reference at( size_type index ) {\n        return internal_subscript_with_exceptions(index);\n    }\n    const_reference at( size_type index ) const {\n        return internal_subscript_with_exceptions(index);\n    }\n\n    // Get range for iterating with parallel algorithms\n    range_type range( size_t grainsize = 1 ) {\n        return range_type(begin(), end(), grainsize);\n    }\n\n    // Get const range for iterating with parallel algorithms\n    const_range_type range( size_t grainsize = 1 ) const {\n        return const_range_type(begin(), end(), grainsize);\n    }\n\n    reference front() {\n        return internal_subscript(0);\n    }\n\n    const_reference front() const {\n        return internal_subscript(0);\n    }\n\n    reference back() {\n        return internal_subscript(size() - 1);\n    }\n\n    const_reference back() const {\n        return internal_subscript(size() - 1);\n    }\n\n    // Iterators\n    iterator begin() { return iterator(*this, 0); }\n    const_iterator begin() const { return const_iterator(*this, 0); }\n    const_iterator cbegin() const { return const_iterator(*this, 0); }\n\n    iterator end() { return iterator(*this, size()); }\n    const_iterator end() const { return const_iterator(*this, size()); }\n    const_iterator cend() const { return const_iterator(*this, size()); }\n\n    reverse_iterator rbegin() { return reverse_iterator(end()); }\n    const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }\n    const_reverse_iterator crbegin() const { return const_reverse_iterator(cend()); }\n\n    reverse_iterator rend() { return reverse_iterator(begin()); }\n    const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }\n    const_reverse_iterator crend() const { return const_reverse_iterator(cbegin()); }\n\n    allocator_type get_allocator() const {\n        return base_type::get_allocator();\n    }\n\n    // Storage\n    bool empty() const noexcept {\n        return 0 == size();\n    }\n\n    size_type size() const noexcept {\n        return std::min(this->my_size.load(std::memory_order_acquire), capacity());\n    }\n\n    size_type max_size() const noexcept {\n        return allocator_traits_type::max_size(base_type::get_allocator());\n    }\n\n    size_type capacity() const noexcept {\n        return base_type::capacity();\n    }\n\n    void reserve( size_type n ) {\n        if (n == 0) return;\n\n        if (n > max_size()) {\n            tbb::detail::throw_exception(exception_id::reservation_length_error);\n        }\n\n        this->assign_first_block_if_necessary(this->segment_index_of(n - 1) + 1);\n        base_type::reserve(n);\n    }\n\n    void resize( size_type n ) {\n        internal_resize(n);\n    }\n\n    void resize( size_type n, const value_type& val ) {\n        internal_resize(n, val);\n    }\n\n    void shrink_to_fit() {\n        internal_compact();\n    }\n\n    void swap(concurrent_vector& other) noexcept(is_noexcept_swap) {\n        base_type::swap(other);\n    }\n\n    void clear() {\n        destroy_elements();\n    }\n\nprivate:\n    using segment_type = typename base_type::segment_type;\n    using segment_table_type = typename base_type::segment_table_type;\n    using segment_table_allocator_traits = typename base_type::segment_table_allocator_traits;\n    using segment_index_type = typename base_type::segment_index_type;\n\n    using segment_element_type = typename base_type::value_type;\n    using segment_element_allocator_type = typename allocator_traits_type::template rebind_alloc<segment_element_type>;\n    using segment_element_allocator_traits = tbb::detail::allocator_traits<segment_element_allocator_type>;\n\n    segment_table_type allocate_long_table( const typename base_type::atomic_segment* embedded_table, size_type start_index ) {\n        __TBB_ASSERT(start_index <= this->embedded_table_size, \"Start index out of embedded table\");\n\n        // If other threads are trying to set pointers in the short segment, wait for them to finish their\n        // assignments before we copy the short segment to the long segment. Note: grow_to_at_least depends on it\n        for (segment_index_type i = 0; this->segment_base(i) < start_index; ++i) {\n            spin_wait_while_eq(embedded_table[i], segment_type(nullptr));\n        }\n\n        // It is possible that the table was extend by a thread allocating first_block, need to check this.\n        if (this->get_table() != embedded_table) {\n            return nullptr;\n        }\n\n        // Allocate long segment table and fill with null pointers\n        segment_table_type new_segment_table = segment_table_allocator_traits::allocate(base_type::get_allocator(), this->pointers_per_long_table);\n        // Copy segment pointers from the embedded table\n        for (size_type segment_index = 0; segment_index < this->pointers_per_embedded_table; ++segment_index) {\n            segment_table_allocator_traits::construct(base_type::get_allocator(), &new_segment_table[segment_index],\n                embedded_table[segment_index].load(std::memory_order_relaxed));\n        }\n        for (size_type segment_index = this->pointers_per_embedded_table; segment_index < this->pointers_per_long_table; ++segment_index) {\n            segment_table_allocator_traits::construct(base_type::get_allocator(), &new_segment_table[segment_index], nullptr);\n        }\n\n        return new_segment_table;\n    }\n\n    // create_segment function is required by the segment_table base class\n    segment_type create_segment( segment_table_type table, segment_index_type seg_index, size_type index ) {\n        size_type first_block = this->my_first_block.load(std::memory_order_relaxed);\n        // First block allocation\n        if (seg_index < first_block) {\n            // If 0 segment is already allocated, then it remains to wait until the segments are filled to requested\n            if (table[0].load(std::memory_order_acquire) != nullptr) {\n                spin_wait_while_eq(table[seg_index], segment_type(nullptr));\n                return nullptr;\n            }\n\n            segment_element_allocator_type segment_allocator(base_type::get_allocator());\n            segment_type new_segment = nullptr;\n            size_type first_block_size = this->segment_size(first_block);\n            try_call( [&] {\n                new_segment = segment_element_allocator_traits::allocate(segment_allocator, first_block_size);\n            } ).on_exception( [&] {\n                segment_type disabled_segment = nullptr;\n                if (table[0].compare_exchange_strong(disabled_segment, this->segment_allocation_failure_tag)) {\n                    size_type end_segment = table == this->my_embedded_table ? this->pointers_per_embedded_table : first_block;\n                    for (size_type i = 1; i < end_segment; ++i) {\n                        table[i].store(this->segment_allocation_failure_tag, std::memory_order_release);\n                    }\n                }\n            });\n\n            segment_type disabled_segment = nullptr;\n            if (table[0].compare_exchange_strong(disabled_segment, new_segment)) {\n                this->extend_table_if_necessary(table, /*start_index*/0, /*end_index*/first_block_size);\n                for (size_type i = 1; i < first_block; ++i) {\n                    table[i].store(new_segment, std::memory_order_release);\n                }\n\n                // Other threads can wait on a snapshot of an embedded table, need to fill it.\n                for (size_type i = 1; i < first_block && i < this->pointers_per_embedded_table; ++i) {\n                    this->my_embedded_table[i].store(new_segment, std::memory_order_release);\n                }\n            } else if (new_segment != this->segment_allocation_failure_tag) {\n                // Deallocate the memory\n                segment_element_allocator_traits::deallocate(segment_allocator, new_segment, first_block_size);\n                // 0 segment is already allocated, then it remains to wait until the segments are filled to requested\n                spin_wait_while_eq(table[seg_index], segment_type(nullptr));\n            }\n        } else {\n            size_type offset = this->segment_base(seg_index);\n            if (index == offset) {\n                __TBB_ASSERT(table[seg_index].load(std::memory_order_relaxed) == nullptr, \"Only this thread can enable this segment\");\n                segment_element_allocator_type segment_allocator(base_type::get_allocator());\n                segment_type new_segment = this->segment_allocation_failure_tag;\n                try_call( [&] {\n                    new_segment = segment_element_allocator_traits::allocate(segment_allocator,this->segment_size(seg_index));\n                    // Shift base address to simplify access by index\n                    new_segment -= this->segment_base(seg_index);\n                } ).on_completion( [&] {\n                    table[seg_index].store(new_segment, std::memory_order_release);\n                });\n            } else {\n                spin_wait_while_eq(table[seg_index], segment_type(nullptr));\n            }\n        }\n        return nullptr;\n    }\n\n    // Returns the number of elements in the segment to be destroy\n    size_type number_of_elements_in_segment( segment_index_type seg_index ) {\n        size_type curr_vector_size = this->my_size.load(std::memory_order_relaxed);\n        size_type curr_segment_base = this->segment_base(seg_index);\n\n        if (seg_index == 0) {\n            return std::min(curr_vector_size, this->segment_size(seg_index));\n        } else {\n            // Perhaps the segment is allocated, but there are no elements in it.\n            if (curr_vector_size < curr_segment_base) {\n                return 0;\n            }\n            return curr_segment_base * 2 > curr_vector_size ? curr_vector_size - curr_segment_base : curr_segment_base;\n        }\n    }\n\n    segment_type nullify_segment( segment_table_type table, size_type segment_index ) {\n        segment_type target_segment = table[segment_index].load(std::memory_order_relaxed);\n        if (segment_index >= this->my_first_block) {\n            table[segment_index].store(nullptr, std::memory_order_relaxed);\n        } else {\n            if (segment_index == 0) {\n                for (size_type i = 0; i < this->my_first_block; ++i) {\n                    table[i].store(nullptr, std::memory_order_relaxed);\n                }\n            }\n        }\n\n        return target_segment;\n    }\n\n    void deallocate_segment( segment_type address, segment_index_type seg_index ) {\n        segment_element_allocator_type segment_allocator(base_type::get_allocator());\n        size_type first_block = this->my_first_block.load(std::memory_order_relaxed);\n        if (seg_index >= first_block) {\n            segment_element_allocator_traits::deallocate(segment_allocator, address, this->segment_size(seg_index));\n        }\n        else if (seg_index == 0) {\n            size_type elements_to_deallocate = first_block > 0 ? this->segment_size(first_block) : this->segment_size(0);\n            segment_element_allocator_traits::deallocate(segment_allocator, address, elements_to_deallocate);\n        }\n    }\n\n    // destroy_segment function is required by the segment_table base class\n    void destroy_segment( segment_type address, segment_index_type seg_index ) {\n        size_type elements_to_destroy = number_of_elements_in_segment(seg_index);\n        segment_element_allocator_type segment_allocator(base_type::get_allocator());\n\n        for (size_type i = 0; i < elements_to_destroy; ++i) {\n            segment_element_allocator_traits::destroy(segment_allocator, address + i);\n        }\n\n        deallocate_segment(address, seg_index);\n    }\n\n    // copy_segment function is required by the segment_table base class\n    void copy_segment( segment_index_type seg_index, segment_type from, segment_type to ) {\n        size_type i = 0;\n        try_call( [&] {\n            for (; i != number_of_elements_in_segment(seg_index); ++i) {\n                segment_table_allocator_traits::construct(base_type::get_allocator(), to + i, from[i]);\n            }\n        } ).on_exception( [&] {\n            // Zero-initialize items left not constructed after the exception\n            zero_unconstructed_elements(this->get_segment(seg_index) + i, this->segment_size(seg_index) - i);\n\n            segment_index_type last_segment = this->segment_index_of(this->my_size.load(std::memory_order_relaxed));\n            auto table = this->get_table();\n            for (segment_index_type j = seg_index + 1; j != last_segment; ++j) {\n                auto curr_segment = table[j].load(std::memory_order_relaxed);\n                if (curr_segment) {\n                    zero_unconstructed_elements(curr_segment + this->segment_base(j), this->segment_size(j));\n                }\n            }\n            this->my_size.store(this->segment_size(seg_index) + i, std::memory_order_relaxed);\n        });\n    }\n\n    // move_segment function is required by the segment_table base class\n    void move_segment( segment_index_type seg_index, segment_type from, segment_type to ) {\n        size_type i = 0;\n        try_call( [&] {\n            for (; i != number_of_elements_in_segment(seg_index); ++i) {\n                segment_table_allocator_traits::construct(base_type::get_allocator(), to + i, std::move(from[i]));\n            }\n        } ).on_exception( [&] {\n            // Zero-initialize items left not constructed after the exception\n            zero_unconstructed_elements(this->get_segment(seg_index) + i, this->segment_size(seg_index) - i);\n\n            segment_index_type last_segment = this->segment_index_of(this->my_size.load(std::memory_order_relaxed));\n            auto table = this->get_table();\n            for (segment_index_type j = seg_index + 1; j != last_segment; ++j) {\n                auto curr_segment = table[j].load(std::memory_order_relaxed);\n                if (curr_segment) {\n                    zero_unconstructed_elements(curr_segment + this->segment_base(j), this->segment_size(j));\n                }\n            }\n            this->my_size.store(this->segment_size(seg_index) + i, std::memory_order_relaxed);\n        });\n    }\n\n    static constexpr bool is_first_element_in_segment( size_type index ) {\n        // An element is the first in a segment if its index is equal to a power of two\n        return is_power_of_two_at_least(index, 2);\n    }\n\n    const_reference internal_subscript( size_type index ) const {\n        return const_cast<self_type*>(this)->internal_subscript(index);\n    }\n\n    reference internal_subscript( size_type index ) {\n        __TBB_ASSERT(index < this->my_size.load(std::memory_order_relaxed), \"Invalid subscript index\");\n        return base_type::template internal_subscript</*allow_out_of_range_access=*/false>(index);\n    }\n\n    const_reference internal_subscript_with_exceptions( size_type index ) const {\n        return const_cast<self_type*>(this)->internal_subscript_with_exceptions(index);\n    }\n\n    reference internal_subscript_with_exceptions( size_type index ) {\n        if (index >= this->my_size.load(std::memory_order_acquire)) {\n            tbb::detail::throw_exception(exception_id::out_of_range);\n        }\n\n        segment_table_type table = this->my_segment_table.load(std::memory_order_acquire);\n\n        size_type seg_index = this->segment_index_of(index);\n        if (base_type::number_of_segments(table) < seg_index) {\n            tbb::detail::throw_exception(exception_id::out_of_range);\n        }\n\n        if (table[seg_index] <= this->segment_allocation_failure_tag) {\n            tbb::detail::throw_exception(exception_id::out_of_range);\n        }\n\n        return base_type::template internal_subscript</*allow_out_of_range_access=*/false>(index);\n    }\n\n    static void zero_unconstructed_elements( pointer start, size_type count ) {\n        std::memset(static_cast<void *>(start), 0, count * sizeof(value_type));\n    }\n\n    template <typename... Args>\n    iterator internal_emplace_back( Args&&... args ) {\n        size_type old_size = this->my_size++;\n        this->assign_first_block_if_necessary(default_first_block_size);\n        auto element_address = &base_type::template internal_subscript</*allow_out_of_range_access=*/true>(old_size);\n\n        // try_call API is not convenient here due to broken\n        // variadic capture on GCC 4.8.5\n        auto value_guard = make_raii_guard([&] {\n            zero_unconstructed_elements(element_address, /*count =*/1);\n        });\n\n        segment_table_allocator_traits::construct(base_type::get_allocator(), element_address, std::forward<Args>(args)...);\n        value_guard.dismiss();\n        return iterator(*this, old_size, element_address);\n    }\n\n    template <typename... Args>\n    void internal_loop_construct( segment_table_type table, size_type start_idx, size_type end_idx, const Args&... args ) {\n        static_assert(sizeof...(Args) < 2, \"Too many parameters\");\n        for (size_type idx = start_idx; idx < end_idx; ++idx) {\n            auto element_address = &base_type::template internal_subscript</*allow_out_of_range_access=*/true>(idx);\n            // try_call API is not convenient here due to broken\n            // variadic capture on GCC 4.8.5\n            auto value_guard = make_raii_guard( [&] {\n                segment_index_type last_allocated_segment = this->find_last_allocated_segment(table);\n                size_type segment_size = this->segment_size(last_allocated_segment);\n                end_idx = end_idx < segment_size ? end_idx : segment_size;\n                for (size_type i = idx; i < end_idx; ++i) {\n                    zero_unconstructed_elements(&this->internal_subscript(i), /*count =*/1);\n                }\n            });\n            segment_table_allocator_traits::construct(base_type::get_allocator(), element_address, args...);\n            value_guard.dismiss();\n        }\n    }\n\n    template <typename ForwardIterator>\n    void internal_loop_construct( segment_table_type table, size_type start_idx, size_type end_idx, ForwardIterator first, ForwardIterator ) {\n        for (size_type idx = start_idx; idx < end_idx; ++idx) {\n            auto element_address = &base_type::template internal_subscript</*allow_out_of_range_access=*/true>(idx);\n            try_call( [&] {\n                segment_table_allocator_traits::construct(base_type::get_allocator(), element_address, *first++);\n            } ).on_exception( [&] {\n                segment_index_type last_allocated_segment = this->find_last_allocated_segment(table);\n                size_type segment_size = this->segment_size(last_allocated_segment);\n                end_idx = end_idx < segment_size ? end_idx : segment_size;\n                for (size_type i = idx; i < end_idx; ++i) {\n                    zero_unconstructed_elements(&this->internal_subscript(i), /*count =*/1);\n                }\n            });\n        }\n    }\n\n    template <typename... Args>\n    iterator internal_grow( size_type start_idx, size_type end_idx, const Args&... args ) {\n        size_type seg_index = this->segment_index_of(end_idx - 1);\n        this->assign_first_block_if_necessary(seg_index + 1);\n        segment_table_type table = this->get_table();\n        this->extend_table_if_necessary(table, start_idx, end_idx);\n\n        if (seg_index > this->my_first_block.load(std::memory_order_relaxed)) {\n            // So that other threads be able to work with the last segment of grow_by, allocate it immediately.\n            // If the last segment is not less than the first block\n            if (table[seg_index].load(std::memory_order_relaxed) == nullptr) {\n                size_type first_element = this->segment_base(seg_index);\n                if (first_element >= start_idx && first_element < end_idx) {\n                    segment_type segment = table[seg_index].load(std::memory_order_relaxed);\n                    base_type::enable_segment(segment, table, seg_index, first_element);\n                }\n            }\n        }\n\n        internal_loop_construct(table, start_idx, end_idx, args...);\n\n        return iterator(*this, start_idx, &base_type::template internal_subscript</*allow_out_of_range_access=*/false>(start_idx));\n    }\n\n\n    template <typename... Args>\n    iterator internal_grow_by_delta( size_type delta, const Args&... args ) {\n        if (delta == size_type(0)) {\n            return end();\n        }\n        size_type start_idx = this->my_size.fetch_add(delta);\n        size_type end_idx = start_idx + delta;\n\n        return internal_grow(start_idx, end_idx, args...);\n    }\n\n    template <typename... Args>\n    iterator internal_grow_to_at_least( size_type new_size, const Args&... args ) {\n        size_type old_size = this->my_size.load(std::memory_order_relaxed);\n        if (new_size == size_type(0)) return iterator(*this, 0);\n        while (old_size < new_size && !this->my_size.compare_exchange_weak(old_size, new_size))\n        {}\n\n        int delta = static_cast<int>(new_size) - static_cast<int>(old_size);\n        if (delta > 0) {\n            return internal_grow(old_size, new_size, args...);\n        }\n\n        size_type end_segment = this->segment_index_of(new_size - 1);\n\n        // Check/wait for segments allocation completes\n        if (end_segment >= this->pointers_per_embedded_table &&\n            this->get_table() == this->my_embedded_table)\n        {\n            spin_wait_while_eq(this->my_segment_table, this->my_embedded_table);\n        }\n\n        for (segment_index_type seg_idx = 0; seg_idx <= end_segment; ++seg_idx) {\n            if (this->get_table()[seg_idx].load(std::memory_order_relaxed) == nullptr) {\n                atomic_backoff backoff(true);\n                while (this->get_table()[seg_idx].load(std::memory_order_relaxed) == nullptr) {\n                    backoff.pause();\n                }\n            }\n        }\n\n    #if TBB_USE_DEBUG\n        size_type cap = capacity();\n        __TBB_ASSERT( cap >= new_size, nullptr);\n    #endif\n        return iterator(*this, size());\n    }\n\n    template <typename... Args>\n    void internal_resize( size_type n, const Args&... args ) {\n        if (n == 0) {\n            clear();\n            return;\n        }\n\n        size_type old_size = this->my_size.load(std::memory_order_acquire);\n        if (n > old_size) {\n            reserve(n);\n            grow_to_at_least(n, args...);\n        } else {\n            if (old_size == n) {\n                return;\n            }\n            size_type last_segment = this->segment_index_of(old_size - 1);\n            // Delete segments\n            for (size_type seg_idx = this->segment_index_of(n - 1) + 1; seg_idx <= last_segment; ++seg_idx) {\n                this->delete_segment(seg_idx);\n            }\n\n            // If n > segment_size(n) => we need to destroy all of the items in the first segment\n            // Otherwise, we need to destroy only items with the index < n\n            size_type n_segment = this->segment_index_of(n - 1);\n            size_type last_index_to_destroy = std::min(this->segment_base(n_segment) + this->segment_size(n_segment), old_size);\n            // Destroy elements in curr segment\n            for (size_type idx = n; idx < last_index_to_destroy; ++idx) {\n                segment_table_allocator_traits::destroy(base_type::get_allocator(), &base_type::template internal_subscript</*allow_out_of_range_access=*/false>(idx));\n            }\n            this->my_size.store(n, std::memory_order_release);\n        }\n    }\n\n    void destroy_elements() {\n        allocator_type alloc(base_type::get_allocator());\n        for (size_type i = 0; i < this->my_size.load(std::memory_order_relaxed); ++i) {\n            allocator_traits_type::destroy(alloc, &base_type::template internal_subscript</*allow_out_of_range_access=*/false>(i));\n        }\n        this->my_size.store(0, std::memory_order_relaxed);\n    }\n\n    static bool incompact_predicate( size_type size ) {\n        // memory page size\n        const size_type page_size = 4096;\n        return size < page_size || ((size - 1) % page_size < page_size / 2 && size < page_size * 128);\n    }\n\n    void internal_compact() {\n        const size_type curr_size = this->my_size.load(std::memory_order_relaxed);\n        segment_table_type table = this->get_table();\n        const segment_index_type k_end = this->find_last_allocated_segment(table);                   // allocated segments\n        const segment_index_type k_stop = curr_size ? this->segment_index_of(curr_size - 1) + 1 : 0; // number of segments to store existing items: 0=>0; 1,2=>1; 3,4=>2; [5-8]=>3;..\n        const segment_index_type first_block = this->my_first_block;                                 // number of merged segments, getting values from atomics\n\n        segment_index_type k = first_block;\n        if (k_stop < first_block) {\n            k = k_stop;\n        }\n        else {\n            while (k < k_stop && incompact_predicate(this->segment_size(k) * sizeof(value_type))) k++;\n        }\n\n        if (k_stop == k_end && k == first_block) {\n            return;\n        }\n\n        // First segment optimization\n        if (k != first_block && k) {\n            size_type max_block = std::max(first_block, k);\n\n            auto buffer_table = segment_table_allocator_traits::allocate(base_type::get_allocator(), max_block);\n\n            for (size_type seg_idx = 0; seg_idx < max_block; ++seg_idx) {\n                segment_table_allocator_traits::construct(base_type::get_allocator(), &buffer_table[seg_idx],\n                    table[seg_idx].load(std::memory_order_relaxed));\n                table[seg_idx].store(nullptr, std::memory_order_relaxed);\n            }\n\n            this->my_first_block.store(k, std::memory_order_relaxed);\n            size_type index = 0;\n            try_call( [&] {\n                for (; index < std::min(this->segment_size(max_block), curr_size); ++index) {\n                    auto element_address = &static_cast<base_type*>(this)->operator[](index);\n                    segment_index_type seg_idx = this->segment_index_of(index);\n                    segment_table_allocator_traits::construct(base_type::get_allocator(), element_address,\n                    std::move_if_noexcept(buffer_table[seg_idx].load(std::memory_order_relaxed)[index]));\n                }\n            } ).on_exception( [&] {\n                segment_element_allocator_type allocator(base_type::get_allocator());\n                for (size_type i = 0; i < index; ++i) {\n                    auto element_adress = &this->operator[](i);\n                    segment_element_allocator_traits::destroy(allocator, element_adress);\n                }\n                segment_element_allocator_traits::deallocate(allocator,\n                    table[0].load(std::memory_order_relaxed), this->segment_size(max_block));\n\n                for (size_type seg_idx = 0; seg_idx < max_block; ++seg_idx) {\n                    table[seg_idx].store(buffer_table[seg_idx].load(std::memory_order_relaxed),\n                        std::memory_order_relaxed);\n                    buffer_table[seg_idx].store(nullptr, std::memory_order_relaxed);\n                }\n                segment_table_allocator_traits::deallocate(base_type::get_allocator(),\n                    buffer_table, max_block);\n                this->my_first_block.store(first_block, std::memory_order_relaxed);\n            });\n\n            // Need to correct deallocate old segments\n            // Method destroy_segment respect active first_block, therefore,\n            // in order for the segment deletion to work correctly, set the first_block size that was earlier,\n            // destroy the unnecessary segments.\n            this->my_first_block.store(first_block, std::memory_order_relaxed);\n            for (size_type seg_idx = max_block; seg_idx > 0 ; --seg_idx) {\n                auto curr_segment = buffer_table[seg_idx - 1].load(std::memory_order_relaxed);\n                if (curr_segment != nullptr) {\n                    destroy_segment(buffer_table[seg_idx - 1].load(std::memory_order_relaxed) + this->segment_base(seg_idx - 1),\n                        seg_idx - 1);\n                }\n            }\n\n            this->my_first_block.store(k, std::memory_order_relaxed);\n\n            for (size_type seg_idx = 0; seg_idx < max_block; ++seg_idx) {\n                segment_table_allocator_traits::destroy(base_type::get_allocator(), &buffer_table[seg_idx]);\n            }\n\n            segment_table_allocator_traits::deallocate(base_type::get_allocator(), buffer_table, max_block);\n        }\n        // free unnecessary segments allocated by reserve() call\n        if (k_stop < k_end) {\n            for (size_type seg_idx = k_end; seg_idx != k_stop; --seg_idx) {\n                if (table[seg_idx - 1].load(std::memory_order_relaxed) != nullptr) {\n                    this->delete_segment(seg_idx - 1);\n                }\n            }\n            if (!k) this->my_first_block.store(0, std::memory_order_relaxed);\n        }\n    }\n\n    // Lever for adjusting the size of first_block at the very first insertion.\n    // TODO: consider >1 value, check performance\n    static constexpr size_type default_first_block_size = 1;\n\n    template <typename Vector, typename Value>\n    friend class vector_iterator;\n}; // class concurrent_vector\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n// Deduction guide for the constructor from two iterators\ntemplate <typename It, typename Alloc = tbb::cache_aligned_allocator<iterator_value_t<It>>,\n          typename = std::enable_if_t<is_input_iterator_v<It>>,\n          typename = std::enable_if_t<is_allocator_v<Alloc>>>\nconcurrent_vector( It, It, Alloc = Alloc() )\n-> concurrent_vector<iterator_value_t<It>, Alloc>;\n#endif\n\ntemplate <typename T, typename Allocator>\nvoid swap(concurrent_vector<T, Allocator> &lhs,\n          concurrent_vector<T, Allocator> &rhs)\n{\n    lhs.swap(rhs);\n}\n\ntemplate <typename T, typename Allocator>\nbool operator==(const concurrent_vector<T, Allocator> &lhs,\n                const concurrent_vector<T, Allocator> &rhs)\n{\n    return lhs.size() == rhs.size() && std::equal(lhs.begin(), lhs.end(), rhs.begin());\n}\n\n#if !__TBB_CPP20_COMPARISONS_PRESENT\ntemplate <typename T, typename Allocator>\nbool operator!=(const concurrent_vector<T, Allocator> &lhs,\n                const concurrent_vector<T, Allocator> &rhs)\n{\n    return !(lhs == rhs);\n}\n#endif // !__TBB_CPP20_COMPARISONS_PRESENT\n\n#if __TBB_CPP20_COMPARISONS_PRESENT && __TBB_CPP20_CONCEPTS_PRESENT\ntemplate <typename T, typename Allocator>\ntbb::detail::synthesized_three_way_result<typename concurrent_vector<T, Allocator>::value_type>\noperator<=>(const concurrent_vector<T, Allocator> &lhs,\n            const concurrent_vector<T, Allocator> &rhs)\n{\n    return std::lexicographical_compare_three_way(lhs.begin(), lhs.end(),\n                                                  rhs.begin(), rhs.end(),\n                                                  tbb::detail::synthesized_three_way_comparator{});\n}\n\n#else\n\ntemplate <typename T, typename Allocator>\nbool operator<(const concurrent_vector<T, Allocator> &lhs,\n               const concurrent_vector<T, Allocator> &rhs)\n{\n    return std::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());\n}\n\ntemplate <typename T, typename Allocator>\nbool operator<=(const concurrent_vector<T, Allocator> &lhs,\n                const concurrent_vector<T, Allocator> &rhs)\n{\n    return !(rhs < lhs);\n}\n\ntemplate <typename T, typename Allocator>\nbool operator>(const concurrent_vector<T, Allocator> &lhs,\n               const concurrent_vector<T, Allocator> &rhs)\n{\n    return rhs < lhs;\n}\n\ntemplate <typename T, typename Allocator>\nbool operator>=(const concurrent_vector<T, Allocator> &lhs,\n                const concurrent_vector<T, Allocator> &rhs)\n{\n    return !(lhs < rhs);\n}\n#endif // __TBB_CPP20_COMPARISONS_PRESENT && __TBB_CPP20_CONCEPTS_PRESENT\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\n    using detail::d1::concurrent_vector;\n} // namespace v1\n\n} // namespace tbb\n\n#endif // __TBB_concurrent_vector_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_aggregator.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n\n#ifndef __TBB_detail__aggregator_H\n#define __TBB_detail__aggregator_H\n\n#include \"_assert.h\"\n#include \"_utils.h\"\n#include <atomic>\n#if !__TBBMALLOC_BUILD // TODO: check this macro with TBB Malloc\n#include \"../profiling.h\"\n#endif\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n// Base class for aggregated operation\ntemplate <typename Derived>\nclass aggregated_operation {\npublic:\n    // Zero value means \"wait\" status, all other values are \"user\" specified values and\n    // are defined into the scope of a class which uses \"status\"\n    std::atomic<uintptr_t> status;\n\n    std::atomic<Derived*> next;\n    aggregated_operation() : status{}, next(nullptr) {}\n}; // class aggregated_operation\n\n// Aggregator base class\n/* An aggregator for collecting operations coming from multiple sources and executing\n   them serially on a single thread.  OperationType must be derived from\n   aggregated_operation. The parameter HandlerType is a functor that will be passed the\n   list of operations and is expected to handle each operation appropriately, setting the\n   status of each operation to non-zero. */\ntemplate <typename OperationType>\nclass aggregator_generic {\npublic:\n    aggregator_generic() : pending_operations(nullptr), handler_busy(false) {}\n\n    // Execute an operation\n    /* Places an operation into the waitlist (pending_operations), and either handles the list,\n       or waits for the operation to complete, or returns.\n       The long_life_time parameter specifies the life time of the given operation object.\n       Operations with long_life_time == true may be accessed after execution.\n       A \"short\" life time operation (long_life_time == false) can be destroyed\n       during execution, and so any access to it after it was put into the waitlist,\n       including status check, is invalid. As a consequence, waiting for completion\n       of such operation causes undefined behavior. */\n    template <typename HandlerType>\n    void execute( OperationType* op, HandlerType& handle_operations, bool long_life_time = true ) {\n        // op->status should be read before inserting the operation into the\n        // aggregator waitlist since it can become invalid after executing a\n        // handler (if the operation has 'short' life time.)\n        const uintptr_t status = op->status.load(std::memory_order_relaxed);\n\n        // ITT note: &(op->status) tag is used to cover accesses to this op node. This\n        // thread has created the operation, and now releases it so that the handler\n        // thread may handle the associated operation w/o triggering a race condition;\n        // thus this tag will be acquired just before the operation is handled in the\n        // handle_operations functor.\n        call_itt_notify(releasing, &(op->status));\n        // insert the operation in the queue.\n        OperationType* res = pending_operations.load(std::memory_order_relaxed);\n        do {\n            op->next.store(res, std::memory_order_relaxed);\n        } while (!pending_operations.compare_exchange_strong(res, op));\n        if (!res) { // first in the list; handle the operations\n            // ITT note: &pending_operations tag covers access to the handler_busy flag,\n            // which this waiting handler thread will try to set before entering\n            // handle_operations.\n            call_itt_notify(acquired, &pending_operations);\n            start_handle_operations(handle_operations);\n            // The operation with 'short' life time can already be destroyed\n            if (long_life_time)\n                __TBB_ASSERT(op->status.load(std::memory_order_relaxed), nullptr);\n        }\n        // Not first; wait for op to be ready\n        else if (!status) { // operation is blocking here.\n            __TBB_ASSERT(long_life_time, \"Waiting for an operation object that might be destroyed during processing\");\n            call_itt_notify(prepare, &(op->status));\n            spin_wait_while_eq(op->status, uintptr_t(0));\n        }\n   }\n\nprivate:\n    // Trigger the handling of operations when the handler is free\n    template <typename HandlerType>\n    void start_handle_operations( HandlerType& handle_operations ) {\n        OperationType* op_list;\n\n        // ITT note: &handler_busy tag covers access to pending_operations as it is passed\n        // between active and waiting handlers.  Below, the waiting handler waits until\n        // the active handler releases, and the waiting handler acquires &handler_busy as\n        // it becomes the active_handler. The release point is at the end of this\n        // function, when all operations in pending_operations have been handled by the\n        // owner of this aggregator.\n        call_itt_notify(prepare, &handler_busy);\n        // get the handler_busy:\n        // only one thread can possibly spin here at a time\n        spin_wait_until_eq(handler_busy, uintptr_t(0));\n        call_itt_notify(acquired, &handler_busy);\n        // acquire fence not necessary here due to causality rule and surrounding atomics\n        handler_busy.store(1, std::memory_order_relaxed);\n\n        // ITT note: &pending_operations tag covers access to the handler_busy flag\n        // itself. Capturing the state of the pending_operations signifies that\n        // handler_busy has been set and a new active handler will now process that list's\n        // operations.\n        call_itt_notify(releasing, &pending_operations);\n        // grab pending_operations\n        op_list = pending_operations.exchange(nullptr);\n\n        // handle all the operations\n        handle_operations(op_list);\n\n        // release the handler\n        handler_busy.store(0, std::memory_order_release);\n    }\n\n    // An atomically updated list (aka mailbox) of pending operations\n    std::atomic<OperationType*> pending_operations;\n    // Controls threads access to handle_operations\n    std::atomic<uintptr_t> handler_busy;\n}; // class aggregator_generic\n\ntemplate <typename HandlerType, typename OperationType>\nclass aggregator : public aggregator_generic<OperationType> {\n    HandlerType handle_operations;\npublic:\n    aggregator() = default;\n\n    void initialize_handler( HandlerType h ) { handle_operations = h; }\n\n    void execute(OperationType* op) {\n        aggregator_generic<OperationType>::execute(op, handle_operations);\n    }\n}; // class aggregator\n\n// the most-compatible friend declaration (vs, gcc, icc) is\n// template<class U, class V> friend class aggregating_functor;\ntemplate <typename AggregatingClass, typename OperationList>\nclass aggregating_functor {\n    AggregatingClass* my_object{nullptr};\npublic:\n    aggregating_functor() = default;\n    aggregating_functor( AggregatingClass* object ) : my_object(object) {\n        __TBB_ASSERT(my_object, nullptr);\n    }\n\n    void operator()( OperationList* op_list ) {\n        __TBB_ASSERT(my_object, nullptr);\n        my_object->handle_operations(op_list);\n    }\n}; // class aggregating_functor\n\n\n} // namespace d1\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_detail__aggregator_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_aligned_space.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n#ifndef __TBB_aligned_space_H\n#define __TBB_aligned_space_H\n\n#include <cstddef>\n\n#include \"_template_helpers.h\"\n\nnamespace tbb {\nnamespace detail {\ninline namespace d0 {\n\n//! Block of space aligned sufficiently to construct an array T with N elements.\n/** The elements are not constructed or destroyed by this class.\n    @ingroup memory_allocation */\ntemplate<typename T, std::size_t N = 1>\nclass aligned_space {\n    alignas(alignof(T)) std::uint8_t aligned_array[N * sizeof(T)];\n\npublic:\n    //! Pointer to beginning of array\n    T* begin() const { return punned_cast<T*>(&aligned_array); }\n\n    //! Pointer to one past last element in array.\n    T* end() const { return begin() + N; }\n};\n\n} // namespace d0\n} // namespace detail\n} // namespace tbb\n\n#endif /* __TBB_aligned_space_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_allocator_traits.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_detail__allocator_traits_H\n#define __TBB_detail__allocator_traits_H\n\n#include \"_config.h\"\n#include \"_template_helpers.h\"\n#include <memory>\n#include <type_traits>\n\nnamespace tbb {\nnamespace detail {\ninline namespace d0 {\n\n#if !__TBB_CPP17_ALLOCATOR_IS_ALWAYS_EQUAL_PRESENT\n// Struct is_always_equal_detector provides the member type \"type\" which is\n// Allocator::is_always_equal if it is present, std::false_type otherwise\ntemplate <typename Allocator, typename = void>\nstruct is_always_equal_detector {\n    using type = std::false_type;\n};\n\ntemplate <typename Allocator>\nstruct is_always_equal_detector<Allocator, tbb::detail::void_t<typename Allocator::is_always_equal>>\n{\n    using type = typename Allocator::is_always_equal;\n};\n#endif // !__TBB_CPP17_ALLOCATOR_IS_ALWAYS_EQUAL_PRESENT\n\ntemplate <typename Allocator>\nclass allocator_traits : public std::allocator_traits<Allocator>\n{\n    using base_type = std::allocator_traits<Allocator>;\npublic:\n#if !__TBB_CPP17_ALLOCATOR_IS_ALWAYS_EQUAL_PRESENT\n    using is_always_equal = typename is_always_equal_detector<Allocator>::type;\n#endif\n\n    template <typename T>\n    using rebind_traits = typename tbb::detail::allocator_traits<typename base_type::template rebind_alloc<T>>;\n}; // struct allocator_traits\n\ntemplate <typename Allocator>\nvoid copy_assign_allocators_impl( Allocator& lhs, const Allocator& rhs, /*pocca = */std::true_type ) {\n    lhs = rhs;\n}\n\ntemplate <typename Allocator>\nvoid copy_assign_allocators_impl( Allocator&, const Allocator&, /*pocca = */ std::false_type ) {}\n\n// Copy assigns allocators only if propagate_on_container_copy_assignment is true\ntemplate <typename Allocator>\nvoid copy_assign_allocators( Allocator& lhs, const Allocator& rhs ) {\n    using pocca_type = typename allocator_traits<Allocator>::propagate_on_container_copy_assignment;\n    copy_assign_allocators_impl(lhs, rhs, pocca_type());\n}\n\ntemplate <typename Allocator>\nvoid move_assign_allocators_impl( Allocator& lhs, Allocator& rhs, /*pocma = */ std::true_type ) {\n    lhs = std::move(rhs);\n}\n\ntemplate <typename Allocator>\nvoid move_assign_allocators_impl( Allocator&, Allocator&, /*pocma = */ std::false_type ) {}\n\n// Move assigns allocators only if propagate_on_container_move_assignment is true\ntemplate <typename Allocator>\nvoid move_assign_allocators( Allocator& lhs, Allocator& rhs ) {\n    using pocma_type = typename allocator_traits<Allocator>::propagate_on_container_move_assignment;\n    move_assign_allocators_impl(lhs, rhs, pocma_type());\n}\n\ntemplate <typename Allocator>\nvoid swap_allocators_impl( Allocator& lhs, Allocator& rhs, /*pocs = */ std::true_type ) {\n    using std::swap;\n    swap(lhs, rhs);\n}\n\ntemplate <typename Allocator>\nvoid swap_allocators_impl( Allocator&, Allocator&, /*pocs = */ std::false_type ) {}\n\n// Swaps allocators only if propagate_on_container_swap is true\ntemplate <typename Allocator>\nvoid swap_allocators( Allocator& lhs, Allocator& rhs ) {\n    using pocs_type = typename allocator_traits<Allocator>::propagate_on_container_swap;\n    swap_allocators_impl(lhs, rhs, pocs_type());\n}\n\n} // inline namespace d0\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_detail__allocator_traits_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_assert.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_detail__assert_H\n#define __TBB_detail__assert_H\n\n#include \"_config.h\"\n\n#if __TBBMALLOC_BUILD\nnamespace rml { namespace internal {\n#else\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n#endif\n//! Process an assertion failure.\n/** Normally called from __TBB_ASSERT macro.\n  If assertion handler is null, print message for assertion failure and abort.\n  Otherwise call the assertion handler. */\nTBB_EXPORT void __TBB_EXPORTED_FUNC assertion_failure(const char* location, int line, const char* expression, const char* comment);\n#if __TBBMALLOC_BUILD\n}} // namespaces rml::internal\n#else\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n#endif\n\n#if __TBBMALLOC_BUILD\n//! Release version of assertions\n#define __TBB_ASSERT_RELEASE(predicate,message) ((predicate)?((void)0) : rml::internal::assertion_failure(__func__,__LINE__,#predicate,message))\n#else\n#define __TBB_ASSERT_RELEASE(predicate,message) ((predicate)?((void)0) : tbb::detail::r1::assertion_failure(__func__,__LINE__,#predicate,message))\n#endif\n\n#if TBB_USE_ASSERT\n    //! Assert that predicate is true.\n    /** If predicate is false, print assertion failure message.\n        If the comment argument is not nullptr, it is printed as part of the failure message.\n        The comment argument has no other effect. */\n    #define __TBB_ASSERT(predicate,message) __TBB_ASSERT_RELEASE(predicate,message)\n    //! \"Extended\" version\n    #define __TBB_ASSERT_EX __TBB_ASSERT\n#else\n    //! No-op version of __TBB_ASSERT.\n    #define __TBB_ASSERT(predicate,comment) ((void)0)\n    //! \"Extended\" version is useful to suppress warnings if a variable is only used with an assert\n    #define __TBB_ASSERT_EX(predicate,comment) ((void)(1 && (predicate)))\n#endif // TBB_USE_ASSERT\n\n#endif // __TBB_detail__assert_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_attach.h",
    "content": "/*\n    Copyright (c) 2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_detail__attach_H\n#define __TBB_detail__attach_H\n\n#include \"_config.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n    struct attach {};\n\n} // namespace d1\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_detail__attach_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_concurrent_queue_base.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_detail__concurrent_queue_base_H\n#define __TBB_detail__concurrent_queue_base_H\n\n#include \"_utils.h\"\n#include \"_exception.h\"\n#include \"_machine.h\"\n#include \"_allocator_traits.h\"\n\n#include \"../profiling.h\"\n#include \"../spin_mutex.h\"\n#include \"../cache_aligned_allocator.h\"\n\n#include <atomic>\n\nnamespace tbb {\nnamespace detail {\nnamespace d2 {\n\nusing ticket_type = std::size_t;\n\ntemplate <typename Page>\ninline bool is_valid_page(const Page p) {\n    return reinterpret_cast<std::uintptr_t>(p) > 1;\n}\n\ntemplate <typename T, typename Allocator>\nstruct concurrent_queue_rep;\n\ntemplate <typename Container, typename T, typename Allocator>\nclass micro_queue_pop_finalizer;\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n// unary minus operator applied to unsigned type, result still unsigned\n#pragma warning( push )\n#pragma warning( disable: 4146 )\n#endif\n\n// A queue using simple locking.\n// For efficiency, this class has no constructor.\n// The caller is expected to zero-initialize it.\ntemplate <typename T, typename Allocator>\nclass micro_queue {\nprivate:\n    using queue_rep_type = concurrent_queue_rep<T, Allocator>;\n    using self_type = micro_queue<T, Allocator>;\npublic:\n    using size_type = std::size_t;\n    using value_type = T;\n    using reference = value_type&;\n    using const_reference = const value_type&;\n\n    using allocator_type = Allocator;\n    using allocator_traits_type = tbb::detail::allocator_traits<allocator_type>;\n    using queue_allocator_type = typename allocator_traits_type::template rebind_alloc<queue_rep_type>;\n\n    static constexpr size_type item_size = sizeof(T);\n    static constexpr size_type items_per_page = item_size <=   8 ? 32 :\n                                                item_size <=  16 ? 16 :\n                                                item_size <=  32 ?  8 :\n                                                item_size <=  64 ?  4 :\n                                                item_size <= 128 ?  2 : 1;\n\n    struct padded_page {\n        padded_page() {}\n        ~padded_page() {}\n\n        reference operator[] (std::size_t index) {\n            __TBB_ASSERT(index < items_per_page, \"Index out of range\");\n            return items[index];\n        }\n\n        const_reference operator[] (std::size_t index) const {\n            __TBB_ASSERT(index < items_per_page, \"Index out of range\");\n            return items[index];\n        }\n\n        padded_page* next{ nullptr };\n        std::atomic<std::uintptr_t> mask{};\n\n        union {\n            value_type items[items_per_page];\n        };\n    }; // struct padded_page\n\n    using page_allocator_type = typename allocator_traits_type::template rebind_alloc<padded_page>;\nprotected:\n    using page_allocator_traits = tbb::detail::allocator_traits<page_allocator_type>;\n\npublic:\n    using item_constructor_type = void (*)(value_type* location, const void* src);\n    micro_queue() = default;\n    micro_queue( const micro_queue& ) = delete;\n    micro_queue& operator=( const micro_queue& ) = delete;\n\n    size_type prepare_page( ticket_type k, queue_rep_type& base, page_allocator_type page_allocator,\n                            padded_page*& p ) {\n        __TBB_ASSERT(p == nullptr, \"Invalid page argument for prepare_page\");\n        k &= -queue_rep_type::n_queue;\n        size_type index = modulo_power_of_two(k / queue_rep_type::n_queue, items_per_page);\n        if (!index) {\n            try_call( [&] {\n                p = page_allocator_traits::allocate(page_allocator, 1);\n            }).on_exception( [&] {\n                ++base.n_invalid_entries;\n                invalidate_page( k );\n            });\n            page_allocator_traits::construct(page_allocator, p);\n        }\n\n        spin_wait_until_my_turn(tail_counter, k, base);\n        d1::call_itt_notify(d1::acquired, &tail_counter);\n\n        if (p) {\n            spin_mutex::scoped_lock lock( page_mutex );\n            padded_page* q = tail_page.load(std::memory_order_relaxed);\n            if (is_valid_page(q)) {\n                q->next = p;\n            } else {\n                head_page.store(p, std::memory_order_relaxed);\n            }\n            tail_page.store(p, std::memory_order_relaxed);\n        } else {\n            p = tail_page.load(std::memory_order_relaxed);\n        }\n        return index;\n    }\n\n    template<typename... Args>\n    void push( ticket_type k, queue_rep_type& base, queue_allocator_type& allocator, Args&&... args )\n    {\n        padded_page* p = nullptr;\n        page_allocator_type page_allocator(allocator);\n        size_type index = prepare_page(k, base, page_allocator, p);\n        __TBB_ASSERT(p != nullptr, \"Page was not prepared\");\n\n        // try_call API is not convenient here due to broken\n        // variadic capture on GCC 4.8.5\n        auto value_guard = make_raii_guard([&] {\n            ++base.n_invalid_entries;\n            d1::call_itt_notify(d1::releasing, &tail_counter);\n            tail_counter.fetch_add(queue_rep_type::n_queue);\n        });\n\n        page_allocator_traits::construct(page_allocator, &(*p)[index], std::forward<Args>(args)...);\n        // If no exception was thrown, mark item as present.\n        p->mask.store(p->mask.load(std::memory_order_relaxed) | uintptr_t(1) << index, std::memory_order_relaxed);\n        d1::call_itt_notify(d1::releasing, &tail_counter);\n\n        value_guard.dismiss();\n        tail_counter.fetch_add(queue_rep_type::n_queue);\n    }\n\n    void abort_push( ticket_type k, queue_rep_type& base, queue_allocator_type& allocator ) {\n        padded_page* p = nullptr;\n        prepare_page(k, base, allocator, p);\n        ++base.n_invalid_entries;\n        tail_counter.fetch_add(queue_rep_type::n_queue);\n    }\n\n    bool pop( void* dst, ticket_type k, queue_rep_type& base, queue_allocator_type& allocator ) {\n        k &= -queue_rep_type::n_queue;\n        spin_wait_until_eq(head_counter, k);\n        d1::call_itt_notify(d1::acquired, &head_counter);\n        spin_wait_while_eq(tail_counter, k);\n        d1::call_itt_notify(d1::acquired, &tail_counter);\n        padded_page *p = head_page.load(std::memory_order_relaxed);\n        __TBB_ASSERT( p, nullptr );\n        size_type index = modulo_power_of_two( k/queue_rep_type::n_queue, items_per_page );\n        bool success = false;\n        {\n            page_allocator_type page_allocator(allocator);\n            micro_queue_pop_finalizer<self_type, value_type, page_allocator_type> finalizer(*this, page_allocator,\n                k + queue_rep_type::n_queue, index == items_per_page - 1 ? p : nullptr );\n            if (p->mask.load(std::memory_order_relaxed) & (std::uintptr_t(1) << index)) {\n                success = true;\n                assign_and_destroy_item(dst, *p, index);\n            } else {\n                --base.n_invalid_entries;\n            }\n        }\n        return success;\n    }\n\n    micro_queue& assign( const micro_queue& src, queue_allocator_type& allocator,\n        item_constructor_type construct_item )\n    {\n        head_counter.store(src.head_counter.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        tail_counter.store(src.tail_counter.load(std::memory_order_relaxed), std::memory_order_relaxed);\n\n        const padded_page* srcp = src.head_page.load(std::memory_order_relaxed);\n        if( is_valid_page(srcp) ) {\n            ticket_type g_index = head_counter.load(std::memory_order_relaxed);\n            size_type n_items  = (tail_counter.load(std::memory_order_relaxed) - head_counter.load(std::memory_order_relaxed))\n                / queue_rep_type::n_queue;\n            size_type index = modulo_power_of_two(head_counter.load(std::memory_order_relaxed) / queue_rep_type::n_queue, items_per_page);\n            size_type end_in_first_page = (index+n_items < items_per_page) ? (index + n_items) : items_per_page;\n\n            try_call( [&] {\n                head_page.store(make_copy(allocator, srcp, index, end_in_first_page, g_index, construct_item), std::memory_order_relaxed);\n            }).on_exception( [&] {\n                head_counter.store(0, std::memory_order_relaxed);\n                tail_counter.store(0, std::memory_order_relaxed);\n            });\n            padded_page* cur_page = head_page.load(std::memory_order_relaxed);\n\n            try_call( [&] {\n                if (srcp != src.tail_page.load(std::memory_order_relaxed)) {\n                    for (srcp = srcp->next; srcp != src.tail_page.load(std::memory_order_relaxed); srcp=srcp->next ) {\n                        cur_page->next = make_copy( allocator, srcp, 0, items_per_page, g_index, construct_item );\n                        cur_page = cur_page->next;\n                    }\n\n                    __TBB_ASSERT(srcp == src.tail_page.load(std::memory_order_relaxed), nullptr );\n                    size_type last_index = modulo_power_of_two(tail_counter.load(std::memory_order_relaxed) / queue_rep_type::n_queue, items_per_page);\n                    if( last_index==0 ) last_index = items_per_page;\n\n                    cur_page->next = make_copy( allocator, srcp, 0, last_index, g_index, construct_item );\n                    cur_page = cur_page->next;\n                }\n                tail_page.store(cur_page, std::memory_order_relaxed);\n            }).on_exception( [&] {\n                padded_page* invalid_page = reinterpret_cast<padded_page*>(std::uintptr_t(1));\n                tail_page.store(invalid_page, std::memory_order_relaxed);\n            });\n        } else {\n            head_page.store(nullptr, std::memory_order_relaxed);\n            tail_page.store(nullptr, std::memory_order_relaxed);\n        }\n        return *this;\n    }\n\n    padded_page* make_copy( queue_allocator_type& allocator, const padded_page* src_page, size_type begin_in_page,\n        size_type end_in_page, ticket_type& g_index, item_constructor_type construct_item )\n    {\n        page_allocator_type page_allocator(allocator);\n        padded_page* new_page = page_allocator_traits::allocate(page_allocator, 1);\n        new_page->next = nullptr;\n        new_page->mask.store(src_page->mask.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        for (; begin_in_page!=end_in_page; ++begin_in_page, ++g_index) {\n            if (new_page->mask.load(std::memory_order_relaxed) & uintptr_t(1) << begin_in_page) {\n                copy_item(*new_page, begin_in_page, *src_page, begin_in_page, construct_item);\n            }\n        }\n        return new_page;\n    }\n\n    void invalidate_page( ticket_type k )  {\n        // Append an invalid page at address 1 so that no more pushes are allowed.\n        padded_page* invalid_page = reinterpret_cast<padded_page*>(std::uintptr_t(1));\n        {\n            spin_mutex::scoped_lock lock( page_mutex );\n            tail_counter.store(k + queue_rep_type::n_queue + 1, std::memory_order_relaxed);\n            padded_page* q = tail_page.load(std::memory_order_relaxed);\n            if (is_valid_page(q)) {\n                q->next = invalid_page;\n            } else {\n                head_page.store(invalid_page, std::memory_order_relaxed);\n            }\n            tail_page.store(invalid_page, std::memory_order_relaxed);\n        }\n    }\n\n    padded_page* get_head_page() {\n        return head_page.load(std::memory_order_relaxed);\n    }\n\n    void clear(queue_allocator_type& allocator, padded_page* new_head = nullptr, padded_page* new_tail = nullptr) {\n        padded_page* curr_page = get_head_page();\n        size_type index = (head_counter.load(std::memory_order_relaxed) / queue_rep_type::n_queue) % items_per_page;\n        page_allocator_type page_allocator(allocator);\n\n        while (curr_page && is_valid_page(curr_page)) {\n            while (index != items_per_page) {\n                if (curr_page->mask.load(std::memory_order_relaxed) & (std::uintptr_t(1) << index)) {\n                    page_allocator_traits::destroy(page_allocator, &curr_page->operator[](index));\n                }\n                ++index;\n            }\n\n            index = 0;\n            padded_page* next_page = curr_page->next;\n            page_allocator_traits::destroy(page_allocator, curr_page);\n            page_allocator_traits::deallocate(page_allocator, curr_page, 1);\n            curr_page = next_page;\n        }\n        head_counter.store(0, std::memory_order_relaxed);\n        tail_counter.store(0, std::memory_order_relaxed);\n        head_page.store(new_head, std::memory_order_relaxed);\n        tail_page.store(new_tail, std::memory_order_relaxed);\n    }\n\n    void clear_and_invalidate(queue_allocator_type& allocator) {\n        padded_page* invalid_page = reinterpret_cast<padded_page*>(std::uintptr_t(1));\n        clear(allocator, invalid_page, invalid_page);\n    }\n\nprivate:\n    // template <typename U, typename A>\n    friend class micro_queue_pop_finalizer<self_type, value_type, page_allocator_type>;\n\n    // Class used to ensure exception-safety of method \"pop\"\n    class destroyer  {\n        value_type& my_value;\n    public:\n        destroyer( reference value ) : my_value(value) {}\n        destroyer( const destroyer& ) = delete;\n        destroyer& operator=( const destroyer& ) = delete;\n        ~destroyer() {my_value.~T();}\n    }; // class destroyer\n\n    void copy_item( padded_page& dst, size_type dindex, const padded_page& src, size_type sindex,\n        item_constructor_type construct_item )\n    {\n        auto& src_item = src[sindex];\n        construct_item( &dst[dindex], static_cast<const void*>(&src_item) );\n    }\n\n    void assign_and_destroy_item( void* dst, padded_page& src, size_type index ) {\n        auto& from = src[index];\n        destroyer d(from);\n        *static_cast<T*>(dst) = std::move(from);\n    }\n\n    void spin_wait_until_my_turn( std::atomic<ticket_type>& counter, ticket_type k, queue_rep_type& rb ) const {\n        for (atomic_backoff b{};; b.pause()) {\n            ticket_type c = counter.load(std::memory_order_acquire);\n            if (c == k) return;\n            else if (c & 1) {\n                ++rb.n_invalid_entries;\n                throw_exception( exception_id::bad_last_alloc);\n            }\n        }\n    }\n\n    std::atomic<padded_page*> head_page{};\n    std::atomic<ticket_type> head_counter{};\n\n    std::atomic<padded_page*> tail_page{};\n    std::atomic<ticket_type> tail_counter{};\n\n    spin_mutex page_mutex{};\n}; // class micro_queue\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n#pragma warning( pop )\n#endif // warning 4146 is back\n\ntemplate <typename Container, typename T, typename Allocator>\nclass micro_queue_pop_finalizer {\npublic:\n    using padded_page = typename Container::padded_page;\n    using allocator_type = Allocator;\n    using allocator_traits_type = tbb::detail::allocator_traits<allocator_type>;\n\n    micro_queue_pop_finalizer( Container& queue, Allocator& alloc, ticket_type k, padded_page* p ) :\n        my_ticket_type(k), my_queue(queue), my_page(p), allocator(alloc)\n    {}\n\n    micro_queue_pop_finalizer( const micro_queue_pop_finalizer& ) = delete;\n    micro_queue_pop_finalizer& operator=( const micro_queue_pop_finalizer& ) = delete;\n\n    ~micro_queue_pop_finalizer() {\n        padded_page* p = my_page;\n        if( is_valid_page(p) ) {\n            spin_mutex::scoped_lock lock( my_queue.page_mutex );\n            padded_page* q = p->next;\n            my_queue.head_page.store(q, std::memory_order_relaxed);\n            if( !is_valid_page(q) ) {\n                my_queue.tail_page.store(nullptr, std::memory_order_relaxed);\n            }\n        }\n        my_queue.head_counter.store(my_ticket_type, std::memory_order_release);\n        if ( is_valid_page(p) ) {\n            allocator_traits_type::destroy(allocator, static_cast<padded_page*>(p));\n            allocator_traits_type::deallocate(allocator, static_cast<padded_page*>(p), 1);\n        }\n    }\nprivate:\n    ticket_type my_ticket_type;\n    Container& my_queue;\n    padded_page* my_page;\n    Allocator& allocator;\n}; // class micro_queue_pop_finalizer\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n// structure was padded due to alignment specifier\n#pragma warning( push )\n#pragma warning( disable: 4324 )\n#endif\n\ntemplate <typename T, typename Allocator>\nstruct concurrent_queue_rep {\n    using self_type = concurrent_queue_rep<T, Allocator>;\n    using size_type = std::size_t;\n    using micro_queue_type = micro_queue<T, Allocator>;\n    using allocator_type = Allocator;\n    using allocator_traits_type = tbb::detail::allocator_traits<allocator_type>;\n    using padded_page = typename micro_queue_type::padded_page;\n    using page_allocator_type = typename micro_queue_type::page_allocator_type;\n    using item_constructor_type = typename micro_queue_type::item_constructor_type;\nprivate:\n    using page_allocator_traits = tbb::detail::allocator_traits<page_allocator_type>;\n    using queue_allocator_type = typename allocator_traits_type::template rebind_alloc<self_type>;\n\npublic:\n    // must be power of 2\n    static constexpr size_type n_queue = 8;\n    // Approximately n_queue/golden ratio\n    static constexpr size_type phi = 3;\n    static constexpr size_type item_size = micro_queue_type::item_size;\n    static constexpr size_type items_per_page = micro_queue_type::items_per_page;\n\n    concurrent_queue_rep() {}\n\n    concurrent_queue_rep( const concurrent_queue_rep& ) = delete;\n    concurrent_queue_rep& operator=( const concurrent_queue_rep& ) = delete;\n\n    void clear( queue_allocator_type& alloc ) {\n        for (size_type index = 0; index < n_queue; ++index) {\n            array[index].clear(alloc);\n        }\n        head_counter.store(0, std::memory_order_relaxed);\n        tail_counter.store(0, std::memory_order_relaxed);\n        n_invalid_entries.store(0, std::memory_order_relaxed);\n    }\n\n    void assign( const concurrent_queue_rep& src, queue_allocator_type& alloc, item_constructor_type construct_item ) {\n        head_counter.store(src.head_counter.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        tail_counter.store(src.tail_counter.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        n_invalid_entries.store(src.n_invalid_entries.load(std::memory_order_relaxed), std::memory_order_relaxed);\n\n        // copy or move micro_queues\n        size_type queue_idx = 0;\n        try_call( [&] {\n            for (; queue_idx < n_queue; ++queue_idx) {\n                array[queue_idx].assign(src.array[queue_idx], alloc, construct_item);\n            }\n        }).on_exception( [&] {\n            for (size_type i = 0; i < queue_idx + 1; ++i) {\n                array[i].clear_and_invalidate(alloc);\n            }\n            head_counter.store(0, std::memory_order_relaxed);\n            tail_counter.store(0, std::memory_order_relaxed);\n            n_invalid_entries.store(0, std::memory_order_relaxed);\n        });\n\n        __TBB_ASSERT(head_counter.load(std::memory_order_relaxed) == src.head_counter.load(std::memory_order_relaxed) &&\n                     tail_counter.load(std::memory_order_relaxed) == src.tail_counter.load(std::memory_order_relaxed),\n                     \"the source concurrent queue should not be concurrently modified.\" );\n    }\n\n    bool empty() const {\n        ticket_type tc = tail_counter.load(std::memory_order_acquire);\n        ticket_type hc = head_counter.load(std::memory_order_relaxed);\n        // if tc!=r.tail_counter, the queue was not empty at some point between the two reads.\n        return tc == tail_counter.load(std::memory_order_relaxed) &&\n               std::ptrdiff_t(tc - hc - n_invalid_entries.load(std::memory_order_relaxed)) <= 0;\n    }\n\n    std::ptrdiff_t size() const {\n        __TBB_ASSERT(sizeof(std::ptrdiff_t) <= sizeof(size_type), nullptr);\n        std::ptrdiff_t hc = head_counter.load(std::memory_order_acquire);\n        std::ptrdiff_t tc = tail_counter.load(std::memory_order_relaxed);\n        std::ptrdiff_t nie = n_invalid_entries.load(std::memory_order_relaxed);\n\n        return tc - hc - nie;\n    }\n\n    friend class micro_queue<T, Allocator>;\n\n    // Map ticket_type to an array index\n    static size_type index( ticket_type k ) {\n        return k * phi % n_queue;\n    }\n\n    micro_queue_type& choose( ticket_type k ) {\n        // The formula here approximates LRU in a cache-oblivious way.\n        return array[index(k)];\n    }\n\n    alignas(max_nfs_size) micro_queue_type array[n_queue];\n\n    alignas(max_nfs_size) std::atomic<ticket_type> head_counter{};\n    alignas(max_nfs_size) std::atomic<ticket_type> tail_counter{};\n    alignas(max_nfs_size) std::atomic<size_type> n_invalid_entries{};\n}; // class concurrent_queue_rep\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n#pragma warning( pop )\n#endif\n\ntemplate <typename Value, typename Allocator>\nclass concurrent_queue_iterator_base {\n    using queue_rep_type = concurrent_queue_rep<Value, Allocator>;\n    using padded_page = typename queue_rep_type::padded_page;\nprotected:\n    concurrent_queue_iterator_base() = default;\n\n    concurrent_queue_iterator_base( const concurrent_queue_iterator_base& other ) {\n        assign(other);\n    }\n\n    concurrent_queue_iterator_base( queue_rep_type* queue_rep )\n        : my_queue_rep(queue_rep),\n          my_head_counter(my_queue_rep->head_counter.load(std::memory_order_relaxed))\n    {\n        for (std::size_t i = 0; i < queue_rep_type::n_queue; ++i) {\n            my_array[i] = my_queue_rep->array[i].get_head_page();\n        }\n\n        if (!get_item(my_item, my_head_counter)) advance();\n    }\n\n    void assign( const concurrent_queue_iterator_base& other ) {\n        my_item = other.my_item;\n        my_queue_rep = other.my_queue_rep;\n\n        if (my_queue_rep != nullptr) {\n            my_head_counter = other.my_head_counter;\n\n            for (std::size_t i = 0; i < queue_rep_type::n_queue; ++i) {\n                my_array[i] = other.my_array[i];\n            }\n        }\n    }\n\n    void advance() {\n        __TBB_ASSERT(my_item, \"Attempt to increment iterator past end of the queue\");\n        std::size_t k = my_head_counter;\n#if TBB_USE_ASSERT\n        Value* tmp;\n        get_item(tmp, k);\n        __TBB_ASSERT(my_item == tmp, nullptr);\n#endif\n        std::size_t i = modulo_power_of_two(k / queue_rep_type::n_queue, my_queue_rep->items_per_page);\n        if (i == my_queue_rep->items_per_page - 1) {\n            padded_page*& root = my_array[queue_rep_type::index(k)];\n            root = root->next;\n        }\n        // Advance k\n        my_head_counter = ++k;\n        if (!get_item(my_item, k)) advance();\n    }\n\n    concurrent_queue_iterator_base& operator=( const concurrent_queue_iterator_base& other ) {\n        this->assign(other);\n        return *this;\n    }\n\n    bool get_item( Value*& item, std::size_t k ) {\n        if (k == my_queue_rep->tail_counter.load(std::memory_order_relaxed)) {\n            item = nullptr;\n            return true;\n        } else {\n            padded_page* p = my_array[queue_rep_type::index(k)];\n            __TBB_ASSERT(p, nullptr);\n            std::size_t i = modulo_power_of_two(k / queue_rep_type::n_queue, my_queue_rep->items_per_page);\n            item = &(*p)[i];\n            return (p->mask & uintptr_t(1) << i) != 0;\n        }\n    }\n\n    Value* my_item{ nullptr };\n    queue_rep_type* my_queue_rep{ nullptr };\n    ticket_type my_head_counter{};\n    padded_page* my_array[queue_rep_type::n_queue]{};\n}; // class concurrent_queue_iterator_base\n\nstruct concurrent_queue_iterator_provider {\n    template <typename Iterator, typename Container>\n    static Iterator get( const Container& container ) {\n        return Iterator(container);\n    }\n}; // struct concurrent_queue_iterator_provider\n\ntemplate <typename Container, typename Value, typename Allocator>\nclass concurrent_queue_iterator : public concurrent_queue_iterator_base<typename std::remove_cv<Value>::type, Allocator> {\n    using base_type = concurrent_queue_iterator_base<typename std::remove_cv<Value>::type, Allocator>;\npublic:\n    using value_type = Value;\n    using pointer = value_type*;\n    using reference = value_type&;\n    using difference_type = std::ptrdiff_t;\n    using iterator_category = std::forward_iterator_tag;\n\n    concurrent_queue_iterator() = default;\n\n    /** If Value==Container::value_type, then this routine is the copy constructor.\n        If Value==const Container::value_type, then this routine is a conversion constructor. */\n    concurrent_queue_iterator( const concurrent_queue_iterator<Container, typename Container::value_type, Allocator>& other )\n        : base_type(other) {}\n\nprivate:\n    concurrent_queue_iterator( const Container& container )\n        : base_type(container.my_queue_representation) {}\npublic:\n    concurrent_queue_iterator& operator=( const concurrent_queue_iterator<Container, typename Container::value_type, Allocator>& other ) {\n        this->assign(other);\n        return *this;\n    }\n\n    reference operator*() const {\n        return *static_cast<pointer>(this->my_item);\n    }\n\n    pointer operator->() const { return &operator*(); }\n\n    concurrent_queue_iterator& operator++() {\n        this->advance();\n        return *this;\n    }\n\n    concurrent_queue_iterator operator++(int) {\n        concurrent_queue_iterator tmp = *this;\n        ++*this;\n        return tmp;\n    }\n\n    friend bool operator==( const concurrent_queue_iterator& lhs, const concurrent_queue_iterator& rhs ) {\n        return lhs.my_item == rhs.my_item;\n    }\n\n    friend bool operator!=( const concurrent_queue_iterator& lhs, const concurrent_queue_iterator& rhs ) {\n        return lhs.my_item != rhs.my_item;\n    }\nprivate:\n    friend struct concurrent_queue_iterator_provider;\n}; // class concurrent_queue_iterator\n\n} // namespace d2\n} // namespace detail\n} // tbb\n\n#endif // __TBB_detail__concurrent_queue_base_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_concurrent_skip_list.h",
    "content": "/*\n    Copyright (c) 2019-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_detail__concurrent_skip_list_H\n#define __TBB_detail__concurrent_skip_list_H\n\n#if !defined(__TBB_concurrent_map_H) && !defined(__TBB_concurrent_set_H)\n#error Do not #include this internal file directly; use public TBB headers instead.\n#endif\n\n#include \"_config.h\"\n#include \"_range_common.h\"\n#include \"_allocator_traits.h\"\n#include \"_template_helpers.h\"\n#include \"_node_handle.h\"\n#include \"_containers_helpers.h\"\n#include \"_assert.h\"\n#include \"_exception.h\"\n#include \"../enumerable_thread_specific.h\"\n#include <utility>\n#include <initializer_list>\n#include <atomic>\n#include <array>\n#include <type_traits>\n#include <random> // Need std::geometric_distribution\n#include <algorithm> // Need std::equal and std::lexicographical_compare\n#include <cstdint>\n#if __TBB_CPP20_COMPARISONS_PRESENT\n#include <compare>\n#endif\n\n#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n#pragma warning(push)\n#pragma warning(disable: 4127) // warning C4127: conditional expression is constant\n#endif\n\nnamespace tbb {\nnamespace detail {\nnamespace d2 {\n\ntemplate <typename Value, typename Allocator>\nclass skip_list_node {\n    using node_ptr = skip_list_node*;\npublic:\n    using value_type = Value;\n    using atomic_node_ptr = std::atomic<node_ptr>;\n    using size_type = std::size_t;\n    using container_allocator_type = Allocator;\n\n    using reference = value_type&;\n    using const_reference = const value_type&;\nprivate:\n    using allocator_traits = tbb::detail::allocator_traits<container_allocator_type>;\n\n    // Allocator is the same as the container allocator=> allocates unitptr_t\n    // It is required to rebind it to value_type to get the correct pointer and const_pointer\n    using value_allocator_traits = typename allocator_traits::template rebind_traits<value_type>;\npublic:\n    using pointer = typename value_allocator_traits::pointer;\n    using const_pointer = typename value_allocator_traits::const_pointer;\n\n    //In perfect world these constructor and destructor would have been private,\n    //however this seems technically impractical due to use of allocator_traits.\n\n    //Should not be called directly, instead use create method\n    skip_list_node( size_type levels )\n        : my_height(levels), my_index_number(0)\n    {}\n\n    //Should not be called directly, instead use destroy method\n    ~skip_list_node() {}\n\n    skip_list_node( const skip_list_node& ) = delete;\n    skip_list_node( skip_list_node&& ) = delete;\n    skip_list_node& operator=( const skip_list_node& ) = delete;\n    skip_list_node& operator=( skip_list_node&& ) = delete;\n\n    static skip_list_node* create( container_allocator_type& alloc, size_type height ) {\n        size_type sz = calc_node_size(height);\n        static_assert(std::is_same<typename allocator_traits::value_type, std::uint8_t>::value, \"skip_list_node assumes that passed in allocator operates on bytes\");\n        auto* node = reinterpret_cast<skip_list_node*>(allocator_traits::allocate(alloc, sz));\n\n        //Construct the node itself\n        allocator_traits::construct(alloc, node, height);\n\n        //Construct the level pointers\n        for (size_type l = 0; l < height; ++l) {\n            allocator_traits::construct(alloc, &node->get_atomic_next(l), nullptr);\n        }\n\n        return node;\n    }\n\n    static void destroy( container_allocator_type& alloc, skip_list_node* node ) {\n        //Destroy the level pointers\n        for (size_type l = 0; l < node->height(); ++l) {\n            allocator_traits::destroy(alloc, &node->atomic_next(l));\n        }\n        size_type sz = calc_node_size(node->height());\n        // Destroy the node itself\n        allocator_traits::destroy(alloc, node);\n\n        // Deallocate the node\n        allocator_traits::deallocate(alloc, reinterpret_cast<std::uint8_t*>(node), sz);\n    }\n\n\n    pointer storage() {\n        return &my_value;\n    }\n\n    reference value() {\n        return *storage();\n    }\n\n    node_ptr next( size_type level ) const {\n        node_ptr res = get_atomic_next(level).load(std::memory_order_acquire);\n        __TBB_ASSERT(res == nullptr || res->height() > level, \"Broken internal structure\");\n        return res;\n    }\n\n    atomic_node_ptr& atomic_next( size_type level ) {\n        atomic_node_ptr& res = get_atomic_next(level);\n#if TBB_USE_DEBUG\n        node_ptr node = res.load(std::memory_order_acquire);\n        __TBB_ASSERT(node == nullptr || node->height() > level, \"Broken internal structure\");\n#endif\n        return res;\n    }\n\n    void set_next( size_type level, node_ptr n ) {\n        __TBB_ASSERT(n == nullptr || n->height() > level, \"Broken internal structure\");\n        get_atomic_next(level).store(n, std::memory_order_relaxed);\n    }\n\n    size_type height() const {\n        return my_height;\n    }\n\n    void set_index_number( size_type index_num ) {\n        my_index_number = index_num;\n    }\n\n    size_type index_number() const {\n        return my_index_number;\n    }\n\nprivate:\n    static size_type calc_node_size( size_type height ) {\n        static_assert(alignof(skip_list_node) >= alignof(atomic_node_ptr), \"Incorrect alignment\");\n        return sizeof(skip_list_node) + height * sizeof(atomic_node_ptr);\n    }\n\n    atomic_node_ptr& get_atomic_next( size_type level ) {\n        atomic_node_ptr* arr = reinterpret_cast<atomic_node_ptr*>(this + 1);\n        return arr[level];\n    }\n\n    const atomic_node_ptr& get_atomic_next( size_type level ) const {\n        const atomic_node_ptr* arr = reinterpret_cast<const atomic_node_ptr*>(this + 1);\n        return arr[level];\n    }\n\n    union {\n        value_type my_value;\n    };\n    size_type my_height;\n    size_type my_index_number;\n}; // class skip_list_node\n\ntemplate <typename NodeType, typename ValueType>\nclass skip_list_iterator {\n    using node_type = NodeType;\n    using node_ptr = node_type*;\npublic:\n    using iterator_category = std::forward_iterator_tag;\n    using value_type = ValueType;\n\n    using difference_type = std::ptrdiff_t;\n    using pointer = value_type*;\n    using reference = value_type&;\n\n    skip_list_iterator() : skip_list_iterator(nullptr) {}\n\n    skip_list_iterator( const skip_list_iterator<node_type, typename node_type::value_type>& other )\n        : my_node_ptr(other.my_node_ptr) {}\n\n    skip_list_iterator& operator=( const skip_list_iterator<node_type, typename node_type::value_type>& other ) {\n        my_node_ptr = other.my_node_ptr;\n        return *this;\n    }\n\n    reference operator*() const { return my_node_ptr->value(); }\n    pointer operator->() const { return my_node_ptr->storage(); }\n\n    skip_list_iterator& operator++() {\n        __TBB_ASSERT(my_node_ptr != nullptr, nullptr);\n        my_node_ptr = my_node_ptr->next(0);\n        return *this;\n    }\n\n    skip_list_iterator operator++(int) {\n        skip_list_iterator tmp = *this;\n        ++*this;\n        return tmp;\n    }\n\nprivate:\n    skip_list_iterator(node_type* n) : my_node_ptr(n) {}\n\n    node_ptr my_node_ptr;\n\n    template <typename Traits>\n    friend class concurrent_skip_list;\n\n    template <typename N, typename V>\n    friend class skip_list_iterator;\n\n    friend class const_range;\n    friend class range;\n\n    friend bool operator==( const skip_list_iterator& lhs, const skip_list_iterator& rhs ) {\n        return lhs.my_node_ptr == rhs.my_node_ptr;\n    }\n\n    friend bool operator!=( const skip_list_iterator& lhs, const skip_list_iterator& rhs ) {\n        return lhs.my_node_ptr != rhs.my_node_ptr;\n    }\n}; // class skip_list_iterator\n\ntemplate <typename Traits>\nclass concurrent_skip_list {\nprotected:\n    using container_traits = Traits;\n    using self_type = concurrent_skip_list<container_traits>;\n    using allocator_type = typename container_traits::allocator_type;\n    using allocator_traits_type = tbb::detail::allocator_traits<allocator_type>;\n    using key_compare = typename container_traits::compare_type;\n    using value_compare = typename container_traits::value_compare;\n    using key_type = typename container_traits::key_type;\n    using value_type = typename container_traits::value_type;\n    static_assert(std::is_same<value_type, typename allocator_type::value_type>::value,\n                  \"value_type of the container should be the same as its allocator\");\n\n    using size_type = std::size_t;\n    using difference_type = std::ptrdiff_t;\n\n    static constexpr size_type max_level = container_traits::max_level;\n\n    using node_allocator_type = typename allocator_traits_type::template rebind_alloc<std::uint8_t>;\n    using node_allocator_traits = tbb::detail::allocator_traits<node_allocator_type>;\n\n    using list_node_type = skip_list_node<value_type, node_allocator_type>;\n    using node_type = d1::node_handle<key_type, value_type, list_node_type, allocator_type>;\n\n    using iterator = skip_list_iterator<list_node_type, value_type>;\n    using const_iterator = skip_list_iterator<list_node_type, const value_type>;\n\n    using reference = value_type&;\n    using const_reference = const value_type&;\n    using pointer = typename allocator_traits_type::pointer;\n    using const_pointer = typename allocator_traits_type::const_pointer;\n\n    using random_level_generator_type = typename container_traits::random_level_generator_type;\n\n    using node_ptr = list_node_type*;\n\n    using array_type = std::array<node_ptr, max_level>;\nprivate:\n    template <typename T>\n    using is_transparent = dependent_bool<comp_is_transparent<key_compare>, T>;\npublic:\n    static constexpr bool allow_multimapping = container_traits::allow_multimapping;\n\n    concurrent_skip_list() : my_head_ptr(nullptr), my_size(0), my_max_height(0) {}\n\n    explicit concurrent_skip_list( const key_compare& comp, const allocator_type& alloc = allocator_type() )\n        : my_node_allocator(alloc), my_compare(comp), my_head_ptr(nullptr), my_size(0), my_max_height(0) {}\n\n    explicit concurrent_skip_list( const allocator_type& alloc )\n        : concurrent_skip_list(key_compare(), alloc) {}\n\n    template<typename InputIterator>\n    concurrent_skip_list( InputIterator first, InputIterator last, const key_compare& comp = key_compare(),\n                          const allocator_type& alloc = allocator_type() )\n        : concurrent_skip_list(comp, alloc)\n    {\n        internal_copy(first, last);\n    }\n\n    template <typename InputIterator>\n    concurrent_skip_list( InputIterator first, InputIterator last, const allocator_type& alloc )\n        : concurrent_skip_list(first, last, key_compare(), alloc) {}\n\n    concurrent_skip_list( std::initializer_list<value_type> init, const key_compare& comp = key_compare(),\n                          const allocator_type& alloc = allocator_type() )\n        : concurrent_skip_list(init.begin(), init.end(), comp, alloc) {}\n\n    concurrent_skip_list( std::initializer_list<value_type> init, const allocator_type& alloc )\n        : concurrent_skip_list(init, key_compare(), alloc) {}\n\n    concurrent_skip_list( const concurrent_skip_list& other )\n        : my_node_allocator(node_allocator_traits::select_on_container_copy_construction(other.get_allocator())),\n          my_compare(other.my_compare), my_rng(other.my_rng), my_head_ptr(nullptr),\n          my_size(0), my_max_height(0)\n    {\n        internal_copy(other);\n        __TBB_ASSERT(my_size == other.my_size, \"Wrong size of copy-constructed container\");\n    }\n\n    concurrent_skip_list( const concurrent_skip_list& other, const allocator_type& alloc )\n        : my_node_allocator(alloc), my_compare(other.my_compare), my_rng(other.my_rng), my_head_ptr(nullptr),\n          my_size(0), my_max_height(0)\n    {\n        internal_copy(other);\n        __TBB_ASSERT(my_size == other.my_size, \"Wrong size of copy-constructed container\");\n    }\n\n    concurrent_skip_list( concurrent_skip_list&& other )\n        : my_node_allocator(std::move(other.my_node_allocator)), my_compare(other.my_compare),\n          my_rng(std::move(other.my_rng)), my_head_ptr(nullptr) // my_head_ptr would be stored in internal_move\n    {\n        internal_move(std::move(other));\n    }\n\n    concurrent_skip_list( concurrent_skip_list&& other, const allocator_type& alloc )\n        : my_node_allocator(alloc), my_compare(other.my_compare),\n          my_rng(std::move(other.my_rng)), my_head_ptr(nullptr)\n    {\n        using is_always_equal = typename allocator_traits_type::is_always_equal;\n        internal_move_construct_with_allocator(std::move(other), is_always_equal());\n    }\n\n    ~concurrent_skip_list() {\n        clear();\n        delete_head();\n    }\n\n    concurrent_skip_list& operator=( const concurrent_skip_list& other ) {\n        if (this != &other) {\n            clear();\n            copy_assign_allocators(my_node_allocator, other.my_node_allocator);\n            my_compare = other.my_compare;\n            my_rng = other.my_rng;\n            internal_copy(other);\n        }\n        return *this;\n    }\n\n    concurrent_skip_list& operator=( concurrent_skip_list&& other ) {\n        if (this != &other) {\n            clear();\n            delete_head();\n\n            my_compare = std::move(other.my_compare);\n            my_rng = std::move(other.my_rng);\n\n            move_assign_allocators(my_node_allocator, other.my_node_allocator);\n            using pocma_type = typename node_allocator_traits::propagate_on_container_move_assignment;\n            using is_always_equal = typename node_allocator_traits::is_always_equal;\n            internal_move_assign(std::move(other), tbb::detail::disjunction<pocma_type, is_always_equal>());\n        }\n        return *this;\n    }\n\n    concurrent_skip_list& operator=( std::initializer_list<value_type> il )\n    {\n        clear();\n        insert(il.begin(),il.end());\n        return *this;\n    }\n\n    std::pair<iterator, bool> insert( const value_type& value ) {\n        return internal_insert(value);\n    }\n\n    std::pair<iterator, bool> insert( value_type&& value ) {\n        return internal_insert(std::move(value));\n    }\n\n    iterator insert( const_iterator, const_reference value ) {\n        // Ignore hint\n        return insert(value).first;\n    }\n\n    iterator insert( const_iterator, value_type&& value ) {\n        // Ignore hint\n        return insert(std::move(value)).first;\n    }\n\n    template<typename InputIterator>\n    void insert( InputIterator first, InputIterator last ) {\n        while (first != last) {\n            insert(*first);\n            ++first;\n        }\n    }\n\n    void insert( std::initializer_list<value_type> init ) {\n        insert(init.begin(), init.end());\n    }\n\n    std::pair<iterator, bool> insert( node_type&& nh ) {\n        if (!nh.empty()) {\n            auto insert_node = d1::node_handle_accessor::get_node_ptr(nh);\n            std::pair<iterator, bool> insert_result = internal_insert_node(insert_node);\n            if (insert_result.second) {\n                d1::node_handle_accessor::deactivate(nh);\n            }\n            return insert_result;\n        }\n        return std::pair<iterator, bool>(end(), false);\n    }\n\n    iterator insert( const_iterator, node_type&& nh ) {\n        // Ignore hint\n        return insert(std::move(nh)).first;\n    }\n\n    template<typename... Args>\n    std::pair<iterator, bool> emplace( Args&&... args ) {\n        return internal_insert(std::forward<Args>(args)...);\n    }\n\n    template<typename... Args>\n    iterator emplace_hint( const_iterator, Args&&... args ) {\n        // Ignore hint\n        return emplace(std::forward<Args>(args)...).first;\n    }\n\n    iterator unsafe_erase( iterator pos ) {\n        std::pair<node_ptr, node_ptr> extract_result = internal_extract(pos);\n        if (extract_result.first) { // node was extracted\n            delete_value_node(extract_result.first);\n            return extract_result.second;\n        }\n        return end();\n    }\n\n    iterator unsafe_erase( const_iterator pos ) {\n        return unsafe_erase(get_iterator(pos));\n    }\n\n    iterator unsafe_erase( const_iterator first, const_iterator last ) {\n        while (first != last) {\n            // Unsafe erase returns the iterator which follows the erased one\n            first = unsafe_erase(first);\n        }\n        return get_iterator(first);\n    }\n\n    size_type unsafe_erase( const key_type& key ) {\n        return internal_erase(key);\n    }\n\n    template <typename K>\n    typename std::enable_if<is_transparent<K>::value\n                            && !std::is_convertible<K, const_iterator>::value\n                            && !std::is_convertible<K, iterator>::value,\n                            size_type>::type unsafe_erase( const K& key )\n    {\n        return internal_erase(key);\n    }\n\n    node_type unsafe_extract( const_iterator pos ) {\n        std::pair<node_ptr, node_ptr> extract_result = internal_extract(pos);\n        return extract_result.first ? d1::node_handle_accessor::construct<node_type>(extract_result.first) : node_type();\n    }\n\n    node_type unsafe_extract( iterator pos ) {\n        return unsafe_extract(const_iterator(pos));\n    }\n\n    node_type unsafe_extract( const key_type& key ) {\n        return unsafe_extract(find(key));\n    }\n\n    template <typename K>\n    typename std::enable_if<is_transparent<K>::value\n                            && !std::is_convertible<K, const_iterator>::value\n                            && !std::is_convertible<K, iterator>::value,\n                            node_type>::type unsafe_extract( const K& key )\n    {\n        return unsafe_extract(find(key));\n    }\n\n    iterator lower_bound( const key_type& key ) {\n        return iterator(internal_get_bound(key, my_compare));\n    }\n\n    const_iterator lower_bound( const key_type& key ) const {\n        return const_iterator(internal_get_bound(key, my_compare));\n    }\n\n    template <typename K>\n    typename std::enable_if<is_transparent<K>::value, iterator>::type lower_bound( const K& key ) {\n        return iterator(internal_get_bound(key, my_compare));\n    }\n\n    template <typename K>\n    typename std::enable_if<is_transparent<K>::value, const_iterator>::type lower_bound( const K& key ) const {\n        return const_iterator(internal_get_bound(key, my_compare));\n    }\n\n    iterator upper_bound( const key_type& key ) {\n        return iterator(internal_get_bound(key, not_greater_compare(my_compare)));\n    }\n\n    const_iterator upper_bound( const key_type& key ) const {\n        return const_iterator(internal_get_bound(key, not_greater_compare(my_compare)));\n    }\n\n    template <typename K>\n    typename std::enable_if<is_transparent<K>::value, iterator>::type upper_bound( const K& key ) {\n        return iterator(internal_get_bound(key, not_greater_compare(my_compare)));\n    }\n\n    template <typename K>\n    typename std::enable_if<is_transparent<K>::value, const_iterator>::type upper_bound( const K& key ) const {\n        return const_iterator(internal_get_bound(key, not_greater_compare(my_compare)));\n    }\n\n    iterator find( const key_type& key ) {\n        return iterator(internal_find(key));\n    }\n\n    const_iterator find( const key_type& key ) const {\n        return const_iterator(internal_find(key));\n    }\n\n    template <typename K>\n    typename std::enable_if<is_transparent<K>::value, iterator>::type find( const K& key ) {\n        return iterator(internal_find(key));\n    }\n\n    template <typename K>\n    typename std::enable_if<is_transparent<K>::value, const_iterator>::type find( const K& key ) const {\n        return const_iterator(internal_find(key));\n    }\n\n    size_type count( const key_type& key ) const {\n        return internal_count(key);\n    }\n\n    template <typename K>\n    typename std::enable_if<is_transparent<K>::value, size_type>::type count( const K& key ) const {\n        return internal_count(key);\n    }\n\n    bool contains( const key_type& key ) const {\n        return find(key) != end();\n    }\n\n    template <typename K>\n    typename std::enable_if<is_transparent<K>::value, bool>::type contains( const K& key ) const {\n        return find(key) != end();\n    }\n\n    void clear() noexcept {\n        // clear is not thread safe - load can be relaxed\n        node_ptr head = my_head_ptr.load(std::memory_order_relaxed);\n\n        if (head == nullptr) return; // Head is not allocated => container is empty\n\n        node_ptr current = head->next(0);\n\n        // Delete all value nodes in the container\n        while (current) {\n            node_ptr next = current->next(0);\n            delete_value_node(current);\n            current = next;\n        }\n\n        for (size_type level = 0; level < head->height(); ++level) {\n            head->set_next(level, nullptr);\n        }\n\n        my_size.store(0, std::memory_order_relaxed);\n        my_max_height.store(0, std::memory_order_relaxed);\n    }\n\n    iterator begin() {\n        return iterator(internal_begin());\n    }\n\n    const_iterator begin() const {\n        return const_iterator(internal_begin());\n    }\n\n    const_iterator cbegin() const {\n        return const_iterator(internal_begin());\n    }\n\n    iterator end() {\n        return iterator(nullptr);\n    }\n\n    const_iterator end() const {\n        return const_iterator(nullptr);\n    }\n\n    const_iterator cend() const {\n        return const_iterator(nullptr);\n    }\n\n    size_type size() const {\n        return my_size.load(std::memory_order_relaxed);\n    }\n\n    size_type max_size() const {\n        return node_allocator_traits::max_size(my_node_allocator);\n    }\n\n    __TBB_nodiscard bool empty() const {\n        return 0 == size();\n    }\n\n    allocator_type get_allocator() const {\n        return my_node_allocator;\n    }\n\n    void swap(concurrent_skip_list& other) {\n        if (this != &other) {\n            using pocs_type = typename node_allocator_traits::propagate_on_container_swap;\n            using is_always_equal = typename node_allocator_traits::is_always_equal;\n            internal_swap(other, tbb::detail::disjunction<pocs_type, is_always_equal>());\n        }\n    }\n\n    std::pair<iterator, iterator> equal_range(const key_type& key) {\n        return internal_equal_range(key);\n    }\n\n    std::pair<const_iterator, const_iterator> equal_range(const key_type& key) const {\n        return internal_equal_range(key);\n    }\n\n    template <typename K>\n    typename std::enable_if<is_transparent<K>::value, std::pair<iterator, iterator>>::type equal_range( const K& key ) {\n        return internal_equal_range(key);\n    }\n\n    template <typename K>\n    typename std::enable_if<is_transparent<K>::value, std::pair<const_iterator, const_iterator>>::type equal_range( const K& key ) const {\n        return internal_equal_range(key);\n    }\n\n    key_compare key_comp() const { return my_compare; }\n\n    value_compare value_comp() const { return container_traits::value_comp(my_compare); }\n\n    class const_range_type {\n    public:\n        using size_type = typename concurrent_skip_list::size_type;\n        using difference_type = typename concurrent_skip_list::difference_type;\n        using iterator = typename concurrent_skip_list::const_iterator;\n        using value_type = typename iterator::value_type;\n        using reference = typename iterator::reference;\n\n        bool empty() const {\n            return my_begin.my_node_ptr ? (my_begin.my_node_ptr->next(0) == my_end.my_node_ptr)\n                                        : true;\n        }\n\n        bool is_divisible() const {\n            return my_begin.my_node_ptr && my_level != 0\n                        ? my_begin.my_node_ptr->next(my_level - 1) != my_end.my_node_ptr\n                        : false;\n        }\n\n        size_type size() const { return std::distance(my_begin, my_end); }\n\n        const_range_type( const_range_type& r, split)\n            : my_end(r.my_end) {\n            if (r.empty()) {\n                __TBB_ASSERT(my_end.my_node_ptr == nullptr, nullptr);\n                my_begin = my_end;\n                my_level = 0;\n            } else {\n                my_begin = iterator(r.my_begin.my_node_ptr->next(r.my_level - 1));\n                my_level = my_begin.my_node_ptr->height();\n            }\n            r.my_end = my_begin;\n        }\n\n        const_range_type( const concurrent_skip_list& l)\n            : my_end(l.end()), my_begin(l.begin()),\n              my_level(my_begin.my_node_ptr ? my_begin.my_node_ptr->height() : 0) {}\n\n        iterator begin() const { return my_begin; }\n        iterator end() const { return my_end; }\n        size_type grainsize() const { return 1; }\n\n    private:\n        const_iterator my_end;\n        const_iterator my_begin;\n        size_type my_level;\n    }; // class const_range_type\n\n    class range_type : public const_range_type {\n    public:\n        using iterator = typename concurrent_skip_list::iterator;\n        using value_type = typename iterator::value_type;\n        using reference = typename iterator::reference;\n\n        range_type(range_type& r, split) : const_range_type(r, split()) {}\n        range_type(const concurrent_skip_list& l) : const_range_type(l) {}\n\n        iterator begin() const {\n            node_ptr node = const_range_type::begin().my_node_ptr;\n            return iterator(node);\n        }\n\n        iterator end() const {\n            node_ptr node = const_range_type::end().my_node_ptr;\n            return iterator(node);\n        }\n    }; // class range_type\n\n    range_type range() { return range_type(*this); }\n    const_range_type range() const { return const_range_type(*this); }\n\nprivate:\n    node_ptr internal_begin() const {\n        node_ptr head = get_head();\n        return head == nullptr ? head : head->next(0);\n    }\n\n    void internal_move(concurrent_skip_list&& other) {\n        my_head_ptr.store(other.my_head_ptr.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        other.my_head_ptr.store(nullptr, std::memory_order_relaxed);\n\n        my_size.store(other.my_size.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        other.my_size.store(0, std::memory_order_relaxed);\n\n        my_max_height.store(other.my_max_height.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        other.my_max_height.store(0, std::memory_order_relaxed);\n    }\n\n    void internal_move_construct_with_allocator(concurrent_skip_list&& other,\n                                                /*is_always_equal = */std::true_type) {\n        internal_move(std::move(other));\n    }\n\n    void internal_move_construct_with_allocator(concurrent_skip_list&& other,\n                                                /*is_always_equal = */std::false_type) {\n        if (my_node_allocator == other.get_allocator()) {\n            internal_move(std::move(other));\n        } else {\n            my_size.store(0, std::memory_order_relaxed);\n            my_max_height.store(other.my_max_height.load(std::memory_order_relaxed), std::memory_order_relaxed);\n            internal_copy(std::make_move_iterator(other.begin()), std::make_move_iterator(other.end()));\n        }\n    }\n\n    static const key_type& get_key( node_ptr n ) {\n        __TBB_ASSERT(n, nullptr);\n        return container_traits::get_key(static_cast<node_ptr>(n)->value());\n    }\n\n    template <typename K>\n    bool found( node_ptr node, const K& key ) const {\n        return node != nullptr && !my_compare(key, get_key(node));\n    }\n\n    template <typename K>\n    node_ptr internal_find(const K& key) const {\n        return allow_multimapping ? internal_find_multi(key) : internal_find_unique(key);\n    }\n\n    template <typename K>\n    node_ptr internal_find_multi( const K& key ) const {\n        node_ptr prev = get_head();\n        if (prev == nullptr) return nullptr; // If the head node is not allocated - exit\n\n        node_ptr curr = nullptr;\n        node_ptr old_curr = curr;\n\n        for (size_type h = my_max_height.load(std::memory_order_acquire); h > 0; --h) {\n            curr = internal_find_position(h - 1, prev, key, my_compare);\n\n            if (curr != old_curr && found(curr, key)) {\n                return curr;\n            }\n            old_curr = curr;\n        }\n        return nullptr;\n    }\n\n    template <typename K>\n    node_ptr internal_find_unique( const K& key ) const {\n        const_iterator it = lower_bound(key);\n        return (it == end() || my_compare(key, container_traits::get_key(*it))) ? nullptr : it.my_node_ptr;\n    }\n\n    template <typename K>\n    size_type internal_count( const K& key ) const {\n        if (allow_multimapping) {\n            // TODO: reimplement without double traversal\n            std::pair<const_iterator, const_iterator> r = equal_range(key);\n            return std::distance(r.first, r.second);\n        }\n        return size_type(contains(key) ? 1 : 0);\n    }\n\n    template <typename K>\n    std::pair<iterator, iterator> internal_equal_range(const K& key) const {\n        iterator lb = get_iterator(lower_bound(key));\n        auto result = std::make_pair(lb, lb);\n\n        // If the lower bound points to the node with the requested key\n        if (found(lb.my_node_ptr, key)) {\n\n            if (!allow_multimapping) {\n                // For unique containers - move the second iterator forward and exit\n                ++result.second;\n            } else {\n                // For multi containers - find the upper bound starting from the lower bound\n                node_ptr prev = lb.my_node_ptr;\n                node_ptr curr = nullptr;\n                not_greater_compare cmp(my_compare);\n\n                // Start from the lower bound of the range\n                for (size_type h = prev->height(); h > 0; --h) {\n                    curr = prev->next(h - 1);\n                    while (curr && cmp(get_key(curr), key)) {\n                        prev = curr;\n                        // If the height of the next node is greater than the current one - jump to its height\n                        if (h < curr->height()) {\n                            h = curr->height();\n                        }\n                        curr = prev->next(h - 1);\n                    }\n                }\n                result.second = iterator(curr);\n            }\n        }\n\n        return result;\n    }\n\n    // Finds position on the level using comparator cmp starting from the node prev\n    template <typename K, typename Comparator>\n    node_ptr internal_find_position( size_type level, node_ptr& prev, const K& key,\n                                     const Comparator& cmp ) const {\n        __TBB_ASSERT(level < prev->height(), \"Wrong level to find position\");\n        node_ptr curr = prev->next(level);\n\n        while (curr && cmp(get_key(curr), key)) {\n            prev = curr;\n            __TBB_ASSERT(level < prev->height(), nullptr);\n            curr = prev->next(level);\n        }\n\n        return curr;\n    }\n\n    // The same as previous overload, but allows index_number comparison\n    template <typename Comparator>\n    node_ptr internal_find_position( size_type level, node_ptr& prev, node_ptr node,\n                                     const Comparator& cmp ) const {\n        __TBB_ASSERT(level < prev->height(), \"Wrong level to find position\");\n        node_ptr curr = prev->next(level);\n\n        while (curr && cmp(get_key(curr), get_key(node))) {\n            if (allow_multimapping && cmp(get_key(node), get_key(curr)) && curr->index_number() > node->index_number()) {\n                break;\n            }\n\n            prev = curr;\n            __TBB_ASSERT(level < prev->height(), nullptr);\n            curr = prev->next(level);\n        }\n        return curr;\n    }\n\n    template <typename Comparator>\n    void fill_prev_curr_arrays(array_type& prev_nodes, array_type& curr_nodes, node_ptr node, const key_type& key,\n                               const Comparator& cmp, node_ptr head ) {\n\n        size_type curr_max_height = my_max_height.load(std::memory_order_acquire);\n        size_type node_height = node->height();\n        if (curr_max_height < node_height) {\n            std::fill(prev_nodes.begin() + curr_max_height, prev_nodes.begin() + node_height, head);\n            std::fill(curr_nodes.begin() + curr_max_height, curr_nodes.begin() + node_height, nullptr);\n        }\n\n        node_ptr prev = head;\n        for (size_type level = curr_max_height; level > 0; --level) {\n            node_ptr curr = internal_find_position(level - 1, prev, key, cmp);\n            prev_nodes[level - 1] = prev;\n            curr_nodes[level - 1] = curr;\n        }\n    }\n\n    void fill_prev_array_for_existing_node( array_type& prev_nodes, node_ptr node ) {\n        node_ptr head = create_head_if_necessary();\n        prev_nodes.fill(head);\n\n        node_ptr prev = head;\n        for (size_type level = node->height(); level > 0; --level) {\n            while (prev->next(level - 1) != node) {\n                prev = prev->next(level - 1);\n            }\n            prev_nodes[level - 1] = prev;\n        }\n    }\n\n    struct not_greater_compare {\n        const key_compare& my_less_compare;\n\n        not_greater_compare( const key_compare& less_compare ) : my_less_compare(less_compare) {}\n\n        template <typename K1, typename K2>\n        bool operator()( const K1& first, const K2& second ) const {\n            return !my_less_compare(second, first);\n        }\n    };\n\n    not_greater_compare select_comparator( /*allow_multimapping = */ std::true_type ) {\n        return not_greater_compare(my_compare);\n    }\n\n    key_compare select_comparator( /*allow_multimapping = */ std::false_type ) {\n        return my_compare;\n    }\n\n    template<typename... Args>\n    std::pair<iterator, bool> internal_insert( Args&&... args ) {\n        node_ptr new_node = create_value_node(std::forward<Args>(args)...);\n        std::pair<iterator, bool> insert_result = internal_insert_node(new_node);\n        if (!insert_result.second) {\n            delete_value_node(new_node);\n        }\n        return insert_result;\n    }\n\n    std::pair<iterator, bool> internal_insert_node( node_ptr new_node ) {\n        array_type prev_nodes;\n        array_type curr_nodes;\n        size_type new_height = new_node->height();\n        auto compare = select_comparator(std::integral_constant<bool, allow_multimapping>{});\n\n        node_ptr head_node = create_head_if_necessary();\n\n        for (;;) {\n            fill_prev_curr_arrays(prev_nodes, curr_nodes, new_node, get_key(new_node), compare, head_node);\n\n            node_ptr prev = prev_nodes[0];\n            node_ptr next = curr_nodes[0];\n\n            if (allow_multimapping) {\n                new_node->set_index_number(prev->index_number() + 1);\n            } else {\n                if (found(next, get_key(new_node))) {\n                    return std::pair<iterator, bool>(iterator(next), false);\n                }\n            }\n\n            new_node->set_next(0, next);\n            if (!prev->atomic_next(0).compare_exchange_strong(next, new_node)) {\n                continue;\n            }\n\n            // If the node was successfully linked on the first level - it will be linked on other levels\n            // Insertion cannot fail starting from this point\n\n            // If the height of inserted node is greater than maximum - increase maximum\n            size_type max_height = my_max_height.load(std::memory_order_acquire);\n            for (;;) {\n                if (new_height <= max_height || my_max_height.compare_exchange_strong(max_height, new_height)) {\n                    // If the maximum was successfully updated by current thread\n                    // or by an other thread for the value, greater or equal to new_height\n                    break;\n                }\n            }\n\n            for (std::size_t level = 1; level < new_height; ++level) {\n                // Link the node on upper levels\n                for (;;) {\n                    prev = prev_nodes[level];\n                    next = static_cast<node_ptr>(curr_nodes[level]);\n\n                    new_node->set_next(level, next);\n                    __TBB_ASSERT(new_node->height() > level, \"Internal structure break\");\n                    if (prev->atomic_next(level).compare_exchange_strong(next, new_node)) {\n                        break;\n                    }\n\n                    for (size_type lev = level; lev != new_height; ++lev ) {\n                        curr_nodes[lev] = internal_find_position(lev, prev_nodes[lev], new_node, compare);\n                    }\n                }\n            }\n            ++my_size;\n            return std::pair<iterator, bool>(iterator(new_node), true);\n        }\n    }\n\n    template <typename K, typename Comparator>\n    node_ptr internal_get_bound( const K& key, const Comparator& cmp ) const {\n        node_ptr prev = get_head();\n        if (prev == nullptr) return nullptr; // If the head node is not allocated - exit\n\n        node_ptr curr = nullptr;\n\n        for (size_type h = my_max_height.load(std::memory_order_acquire); h > 0; --h) {\n            curr = internal_find_position(h - 1, prev, key, cmp);\n        }\n\n        return curr;\n    }\n\n    template <typename K>\n    size_type internal_erase( const K& key ) {\n        auto eq = equal_range(key);\n        size_type old_size = size();\n        unsafe_erase(eq.first, eq.second);\n        return old_size - size();\n    }\n\n    // Returns node_ptr to the extracted node and node_ptr to the next node after the extracted\n    std::pair<node_ptr, node_ptr> internal_extract( const_iterator it ) {\n        std::pair<node_ptr, node_ptr> result(nullptr, nullptr);\n        if ( it != end() ) {\n            array_type prev_nodes;\n\n            node_ptr erase_node = it.my_node_ptr;\n            node_ptr next_node = erase_node->next(0);\n            fill_prev_array_for_existing_node(prev_nodes, erase_node);\n\n            for (size_type level = 0; level < erase_node->height(); ++level) {\n                prev_nodes[level]->set_next(level, erase_node->next(level));\n                erase_node->set_next(level, nullptr);\n            }\n            my_size.fetch_sub(1, std::memory_order_relaxed);\n\n            result.first = erase_node;\n            result.second = next_node;\n        }\n        return result;\n    }\n\nprotected:\n    template<typename SourceType>\n    void internal_merge( SourceType&& source ) {\n        using source_type = typename std::decay<SourceType>::type;\n        using source_iterator = typename source_type::iterator;\n        static_assert((std::is_same<node_type, typename source_type::node_type>::value), \"Incompatible containers cannot be merged\");\n\n        for (source_iterator it = source.begin(); it != source.end();) {\n            source_iterator where = it++;\n            if (allow_multimapping || !contains(container_traits::get_key(*where))) {\n                node_type handle = source.unsafe_extract(where);\n                __TBB_ASSERT(!handle.empty(), \"Extracted handle in merge is empty\");\n\n                if (!insert(std::move(handle)).second) {\n                    __TBB_ASSERT(!handle.empty(), \"Handle should not be empty if insert fails\");\n                    //If the insertion fails - return the node into source\n                    source.insert(std::move(handle));\n                }\n                __TBB_ASSERT(handle.empty(), \"Node handle should be empty after the insertion\");\n            }\n        }\n    }\n\nprivate:\n    void internal_copy( const concurrent_skip_list& other ) {\n        internal_copy(other.begin(), other.end());\n    }\n\n    template<typename Iterator>\n    void internal_copy( Iterator first, Iterator last ) {\n        try_call([&] {\n            for (auto it = first; it != last; ++it) {\n                insert(*it);\n            }\n        }).on_exception([&] {\n            clear();\n            delete_head();\n        });\n    }\n\n    node_ptr create_node( size_type height ) {\n        return list_node_type::create(my_node_allocator, height);\n    }\n\n    template <typename... Args>\n    node_ptr create_value_node( Args&&... args ) {\n        node_ptr node = create_node(my_rng());\n\n        // try_call API is not convenient here due to broken\n        // variadic capture on GCC 4.8.5\n        auto value_guard = make_raii_guard([&] {\n            delete_node(node);\n        });\n\n        // Construct the value inside the node\n        node_allocator_traits::construct(my_node_allocator, node->storage(), std::forward<Args>(args)...);\n        value_guard.dismiss();\n        return node;\n    }\n\n    node_ptr create_head_node() {\n        return create_node(max_level);\n    }\n\n    void delete_head() {\n        node_ptr head = my_head_ptr.load(std::memory_order_relaxed);\n        if (head != nullptr) {\n            delete_node(head);\n            my_head_ptr.store(nullptr, std::memory_order_relaxed);\n        }\n    }\n\n    void delete_node( node_ptr node ) {\n        list_node_type::destroy(my_node_allocator, node);\n    }\n\n    void delete_value_node( node_ptr node ) {\n        // Destroy the value inside the node\n        node_allocator_traits::destroy(my_node_allocator, node->storage());\n        delete_node(node);\n    }\n\n    node_ptr get_head() const {\n        return my_head_ptr.load(std::memory_order_acquire);\n    }\n\n    node_ptr create_head_if_necessary() {\n        node_ptr current_head = get_head();\n        if (current_head == nullptr) {\n            // Head node was not created - create it\n            node_ptr new_head = create_head_node();\n            if (my_head_ptr.compare_exchange_strong(current_head, new_head)) {\n                current_head = new_head;\n            } else {\n                // If an other thread has already created the head node - destroy new_head\n                // current_head now points to the actual head node\n                delete_node(new_head);\n            }\n        }\n        __TBB_ASSERT(my_head_ptr.load(std::memory_order_relaxed) != nullptr, nullptr);\n        __TBB_ASSERT(current_head != nullptr, nullptr);\n        return current_head;\n    }\n\n    static iterator get_iterator( const_iterator it ) {\n        return iterator(it.my_node_ptr);\n    }\n\n    void internal_move_assign( concurrent_skip_list&& other, /*POCMA || is_always_equal =*/std::true_type ) {\n        internal_move(std::move(other));\n    }\n\n    void internal_move_assign( concurrent_skip_list&& other, /*POCMA || is_always_equal =*/std::false_type ) {\n        if (my_node_allocator == other.my_node_allocator) {\n            internal_move(std::move(other));\n        } else {\n            internal_copy(std::make_move_iterator(other.begin()), std::make_move_iterator(other.end()));\n        }\n    }\n\n    void internal_swap_fields( concurrent_skip_list& other ) {\n        using std::swap;\n        swap_allocators(my_node_allocator, other.my_node_allocator);\n        swap(my_compare, other.my_compare);\n        swap(my_rng, other.my_rng);\n\n        swap_atomics_relaxed(my_head_ptr, other.my_head_ptr);\n        swap_atomics_relaxed(my_size, other.my_size);\n        swap_atomics_relaxed(my_max_height, other.my_max_height);\n    }\n\n    void internal_swap( concurrent_skip_list& other, /*POCMA || is_always_equal =*/std::true_type ) {\n        internal_swap_fields(other);\n    }\n\n    void internal_swap( concurrent_skip_list& other, /*POCMA || is_always_equal =*/std::false_type ) {\n        __TBB_ASSERT(my_node_allocator == other.my_node_allocator, \"Swapping with unequal allocators is not allowed\");\n        internal_swap_fields(other);\n    }\n\n    node_allocator_type my_node_allocator;\n    key_compare my_compare;\n    random_level_generator_type my_rng;\n    std::atomic<list_node_type*> my_head_ptr;\n    std::atomic<size_type> my_size;\n    std::atomic<size_type> my_max_height;\n\n    template<typename OtherTraits>\n    friend class concurrent_skip_list;\n}; // class concurrent_skip_list\n\ntemplate <typename Traits>\nbool operator==( const concurrent_skip_list<Traits>& lhs, const concurrent_skip_list<Traits>& rhs ) {\n    if (lhs.size() != rhs.size()) return false;\n#if _MSC_VER\n    // Passing \"unchecked\" iterators to std::equal with 3 parameters\n    // causes compiler warnings.\n    // The workaround is to use overload with 4 parameters, which is\n    // available since C++14 - minimally supported version on MSVC\n    return std::equal(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());\n#else\n    return std::equal(lhs.begin(), lhs.end(), rhs.begin());\n#endif\n}\n\n#if !__TBB_CPP20_COMPARISONS_PRESENT\ntemplate <typename Traits>\nbool operator!=( const concurrent_skip_list<Traits>& lhs, const concurrent_skip_list<Traits>& rhs ) {\n    return !(lhs == rhs);\n}\n#endif\n\n#if __TBB_CPP20_COMPARISONS_PRESENT && __TBB_CPP20_CONCEPTS_PRESENT\ntemplate <typename Traits>\ntbb::detail::synthesized_three_way_result<typename Traits::value_type>\noperator<=>( const concurrent_skip_list<Traits>& lhs, const concurrent_skip_list<Traits>& rhs ) {\n    return std::lexicographical_compare_three_way(lhs.begin(), lhs.end(),\n                                                  rhs.begin(), rhs.end(),\n                                                  tbb::detail::synthesized_three_way_comparator{});\n}\n#else\ntemplate <typename Traits>\nbool operator<( const concurrent_skip_list<Traits>& lhs, const concurrent_skip_list<Traits>& rhs ) {\n    return std::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());\n}\n\ntemplate <typename Traits>\nbool operator>( const concurrent_skip_list<Traits>& lhs, const concurrent_skip_list<Traits>& rhs ) {\n    return rhs < lhs;\n}\n\ntemplate <typename Traits>\nbool operator<=( const concurrent_skip_list<Traits>& lhs, const concurrent_skip_list<Traits>& rhs ) {\n    return !(rhs < lhs);\n}\n\ntemplate <typename Traits>\nbool operator>=( const concurrent_skip_list<Traits>& lhs, const concurrent_skip_list<Traits>& rhs ) {\n    return !(lhs < rhs);\n}\n#endif // __TBB_CPP20_COMPARISONS_PRESENT && __TBB_CPP20_CONCEPTS_PRESENT\n\n// Generates a number from the interval [0, MaxLevel).\ntemplate <std::size_t MaxLevel>\nclass concurrent_geometric_level_generator {\npublic:\n    static constexpr std::size_t max_level = MaxLevel;\n    // TODO: modify the algorithm to accept other values of max_level\n    static_assert(max_level == 32, \"Incompatible max_level for rng\");\n\n    concurrent_geometric_level_generator() : engines(std::minstd_rand::result_type(time(nullptr))) {}\n\n    std::size_t operator()() {\n        // +1 is required to pass at least 1 into log2 (log2(0) is undefined)\n        // -1 is required to have an ability to return 0 from the generator (max_level - log2(2^31) - 1)\n        std::size_t result = max_level - std::size_t(tbb::detail::log2(engines.local()() + 1)) - 1;\n        __TBB_ASSERT(result <= max_level, nullptr);\n        return result;\n    }\n\nprivate:\n    tbb::enumerable_thread_specific<std::minstd_rand> engines;\n};\n\n} // namespace d2\n\n} // namespace detail\n} // namespace tbb\n\n#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n#pragma warning(pop) // warning 4127 is back\n#endif\n\n#endif // __TBB_detail__concurrent_skip_list_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_concurrent_unordered_base.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_detail__concurrent_unordered_base_H\n#define __TBB_detail__concurrent_unordered_base_H\n\n#if !defined(__TBB_concurrent_unordered_map_H) && !defined(__TBB_concurrent_unordered_set_H)\n#error Do not #include this internal file directly; use public TBB headers instead.\n#endif\n\n#include \"_range_common.h\"\n#include \"_containers_helpers.h\"\n#include \"_segment_table.h\"\n#include \"_hash_compare.h\"\n#include \"_allocator_traits.h\"\n#include \"_node_handle.h\"\n#include \"_assert.h\"\n#include \"_utils.h\"\n#include \"_exception.h\"\n#include <iterator>\n#include <utility>\n#include <functional>\n#include <initializer_list>\n#include <atomic>\n#include <type_traits>\n#include <memory>\n#include <algorithm>\n\n#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n#pragma warning(push)\n#pragma warning(disable: 4127) // warning C4127: conditional expression is constant\n#endif\n\nnamespace tbb {\nnamespace detail {\nnamespace d2 {\n\ntemplate <typename Traits>\nclass concurrent_unordered_base;\n\ntemplate<typename Container, typename Value>\nclass solist_iterator {\nprivate:\n    using node_ptr = typename Container::value_node_ptr;\n    template <typename T, typename Allocator>\n    friend class split_ordered_list;\n    template<typename M, typename V>\n    friend class solist_iterator;\n    template <typename Traits>\n    friend class concurrent_unordered_base;\n    template<typename M, typename T, typename U>\n    friend bool operator==( const solist_iterator<M,T>& i, const solist_iterator<M,U>& j );\n    template<typename M, typename T, typename U>\n    friend bool operator!=( const solist_iterator<M,T>& i, const solist_iterator<M,U>& j );\npublic:\n    using value_type = Value;\n    using difference_type = typename Container::difference_type;\n    using pointer = value_type*;\n    using reference = value_type&;\n    using iterator_category = std::forward_iterator_tag;\n\n    solist_iterator() : my_node_ptr(nullptr) {}\n    solist_iterator( const solist_iterator<Container, typename Container::value_type>& other )\n        : my_node_ptr(other.my_node_ptr) {}\n\n    solist_iterator& operator=( const solist_iterator<Container, typename Container::value_type>& other ) {\n        my_node_ptr = other.my_node_ptr;\n        return *this;\n    }\n\n    reference operator*() const {\n        return my_node_ptr->value();\n    }\n\n    pointer operator->() const {\n        return my_node_ptr->storage();\n    }\n\n    solist_iterator& operator++() {\n        auto next_node = my_node_ptr->next();\n        while(next_node && next_node->is_dummy()) {\n            next_node = next_node->next();\n        }\n        my_node_ptr = static_cast<node_ptr>(next_node);\n        return *this;\n    }\n\n    solist_iterator operator++(int) {\n        solist_iterator tmp = *this;\n        ++*this;\n        return tmp;\n    }\n\nprivate:\n    solist_iterator( node_ptr pnode ) : my_node_ptr(pnode) {}\n\n    node_ptr get_node_ptr() const { return my_node_ptr; }\n\n    node_ptr my_node_ptr;\n};\n\ntemplate<typename Solist, typename T, typename U>\nbool operator==( const solist_iterator<Solist, T>& i, const solist_iterator<Solist, U>& j ) {\n    return i.my_node_ptr == j.my_node_ptr;\n}\n\ntemplate<typename Solist, typename T, typename U>\nbool operator!=( const solist_iterator<Solist, T>& i, const solist_iterator<Solist, U>& j ) {\n    return i.my_node_ptr != j.my_node_ptr;\n}\n\ntemplate <typename SokeyType>\nclass list_node {\npublic:\n    using node_ptr = list_node*;\n    using sokey_type = SokeyType;\n\n    list_node(sokey_type key) : my_next(nullptr), my_order_key(key) {}\n\n    void init( sokey_type key ) {\n        my_order_key = key;\n    }\n\n    sokey_type order_key() const {\n        return my_order_key;\n    }\n\n    bool is_dummy() {\n        // The last bit of order key is unset for dummy nodes\n        return (my_order_key & 0x1) == 0;\n    }\n\n    node_ptr next() const {\n        return my_next.load(std::memory_order_acquire);\n    }\n\n    void set_next( node_ptr next_node ) {\n        my_next.store(next_node, std::memory_order_release);\n    }\n\n    bool try_set_next( node_ptr expected_next, node_ptr new_next ) {\n        return my_next.compare_exchange_strong(expected_next, new_next);\n    }\n\nprivate:\n    std::atomic<node_ptr> my_next;\n    sokey_type my_order_key;\n}; // class list_node\n\ntemplate <typename ValueType, typename SokeyType>\nclass value_node : public list_node<SokeyType>\n{\npublic:\n    using base_type = list_node<SokeyType>;\n    using sokey_type = typename base_type::sokey_type;\n    using value_type = ValueType;\n\n    value_node( sokey_type ord_key ) : base_type(ord_key) {}\n    ~value_node() {}\n    value_type* storage() {\n        return &my_value;\n    }\n\n    value_type& value() {\n        return *storage();\n    }\n\nprivate:\n    union {\n        value_type my_value;\n    };\n}; // class value_node\n\ntemplate <typename Traits>\nclass concurrent_unordered_base {\n    using self_type = concurrent_unordered_base<Traits>;\n    using traits_type = Traits;\n    using hash_compare_type = typename traits_type::hash_compare_type;\n    class unordered_segment_table;\npublic:\n    using value_type = typename traits_type::value_type;\n    using key_type = typename traits_type::key_type;\n    using allocator_type = typename traits_type::allocator_type;\n\nprivate:\n    using allocator_traits_type = tbb::detail::allocator_traits<allocator_type>;\n    // TODO: check assert conditions for different C++ standards\n    static_assert(std::is_same<typename allocator_traits_type::value_type, value_type>::value,\n                  \"value_type of the container must be the same as its allocator\");\n    using sokey_type = std::size_t;\n\npublic:\n    using size_type = std::size_t;\n    using difference_type = std::ptrdiff_t;\n\n    using iterator = solist_iterator<self_type, value_type>;\n    using const_iterator = solist_iterator<self_type, const value_type>;\n    using local_iterator = iterator;\n    using const_local_iterator = const_iterator;\n\n    using reference = value_type&;\n    using const_reference = const value_type&;\n    using pointer = typename allocator_traits_type::pointer;\n    using const_pointer = typename allocator_traits_type::const_pointer;\n\n    using hasher = typename hash_compare_type::hasher;\n    using key_equal = typename hash_compare_type::key_equal;\n\nprivate:\n    using list_node_type = list_node<sokey_type>;\n    using value_node_type = value_node<value_type, sokey_type>;\n    using node_ptr = list_node_type*;\n    using value_node_ptr = value_node_type*;\n\n    using value_node_allocator_type = typename allocator_traits_type::template rebind_alloc<value_node_type>;\n    using node_allocator_type = typename allocator_traits_type::template rebind_alloc<list_node_type>;\n\n    using node_allocator_traits = tbb::detail::allocator_traits<node_allocator_type>;\n    using value_node_allocator_traits = tbb::detail::allocator_traits<value_node_allocator_type>;\n\n    static constexpr size_type round_up_to_power_of_two( size_type bucket_count ) {\n        return size_type(1) << size_type(tbb::detail::log2(uintptr_t(bucket_count == 0 ? 1 : bucket_count) * 2 - 1));\n    }\n\n    template <typename T>\n    using is_transparent = dependent_bool<has_transparent_key_equal<key_type, hasher, key_equal>, T>;\npublic:\n    using node_type = d1::node_handle<key_type, value_type, value_node_type, allocator_type>;\n\n    explicit concurrent_unordered_base( size_type bucket_count, const hasher& hash = hasher(),\n                                        const key_equal& equal = key_equal(), const allocator_type& alloc = allocator_type() )\n        : my_size(0),\n          my_bucket_count(round_up_to_power_of_two(bucket_count)),\n          my_max_load_factor(float(initial_max_load_factor)),\n          my_hash_compare(hash, equal),\n          my_head(sokey_type(0)),\n          my_segments(alloc) {}\n\n    concurrent_unordered_base() : concurrent_unordered_base(initial_bucket_count) {}\n\n    concurrent_unordered_base( size_type bucket_count, const allocator_type& alloc )\n        : concurrent_unordered_base(bucket_count, hasher(), key_equal(), alloc) {}\n\n    concurrent_unordered_base( size_type bucket_count, const hasher& hash, const allocator_type& alloc )\n        : concurrent_unordered_base(bucket_count, hash, key_equal(), alloc) {}\n\n    explicit concurrent_unordered_base( const allocator_type& alloc )\n        : concurrent_unordered_base(initial_bucket_count, hasher(), key_equal(), alloc) {}\n\n    template <typename InputIterator>\n    concurrent_unordered_base( InputIterator first, InputIterator last,\n                               size_type bucket_count = initial_bucket_count, const hasher& hash = hasher(),\n                               const key_equal& equal = key_equal(), const allocator_type& alloc = allocator_type() )\n        : concurrent_unordered_base(bucket_count, hash, equal, alloc)\n    {\n        insert(first, last);\n    }\n\n    template <typename InputIterator>\n    concurrent_unordered_base( InputIterator first, InputIterator last,\n                               size_type bucket_count, const allocator_type& alloc )\n        : concurrent_unordered_base(first, last, bucket_count, hasher(), key_equal(), alloc) {}\n\n    template <typename InputIterator>\n    concurrent_unordered_base( InputIterator first, InputIterator last,\n                               size_type bucket_count, const hasher& hash, const allocator_type& alloc )\n        : concurrent_unordered_base(first, last, bucket_count, hash, key_equal(), alloc) {}\n\n    concurrent_unordered_base( const concurrent_unordered_base& other )\n        : my_size(other.my_size.load(std::memory_order_relaxed)),\n          my_bucket_count(other.my_bucket_count.load(std::memory_order_relaxed)),\n          my_max_load_factor(other.my_max_load_factor),\n          my_hash_compare(other.my_hash_compare),\n          my_head(other.my_head.order_key()),\n          my_segments(other.my_segments)\n    {\n        try_call( [&] {\n            internal_copy(other);\n        } ).on_exception( [&] {\n            clear();\n        });\n    }\n\n    concurrent_unordered_base( const concurrent_unordered_base& other, const allocator_type& alloc )\n        : my_size(other.my_size.load(std::memory_order_relaxed)),\n          my_bucket_count(other.my_bucket_count.load(std::memory_order_relaxed)),\n          my_max_load_factor(other.my_max_load_factor),\n          my_hash_compare(other.my_hash_compare),\n          my_head(other.my_head.order_key()),\n          my_segments(other.my_segments, alloc)\n    {\n        try_call( [&] {\n            internal_copy(other);\n        } ).on_exception( [&] {\n            clear();\n        });\n    }\n\n    concurrent_unordered_base( concurrent_unordered_base&& other )\n        : my_size(other.my_size.load(std::memory_order_relaxed)),\n          my_bucket_count(other.my_bucket_count.load(std::memory_order_relaxed)),\n          my_max_load_factor(std::move(other.my_max_load_factor)),\n          my_hash_compare(std::move(other.my_hash_compare)),\n          my_head(other.my_head.order_key()),\n          my_segments(std::move(other.my_segments))\n    {\n        move_content(std::move(other));\n    }\n\n    concurrent_unordered_base( concurrent_unordered_base&& other, const allocator_type& alloc )\n        : my_size(other.my_size.load(std::memory_order_relaxed)),\n          my_bucket_count(other.my_bucket_count.load(std::memory_order_relaxed)),\n          my_max_load_factor(std::move(other.my_max_load_factor)),\n          my_hash_compare(std::move(other.my_hash_compare)),\n          my_head(other.my_head.order_key()),\n          my_segments(std::move(other.my_segments), alloc)\n    {\n        using is_always_equal = typename allocator_traits_type::is_always_equal;\n        internal_move_construct_with_allocator(std::move(other), alloc, is_always_equal());\n    }\n\n    concurrent_unordered_base( std::initializer_list<value_type> init,\n                               size_type bucket_count = initial_bucket_count,\n                               const hasher& hash = hasher(), const key_equal& equal = key_equal(),\n                               const allocator_type& alloc = allocator_type() )\n        : concurrent_unordered_base(init.begin(), init.end(), bucket_count, hash, equal, alloc) {}\n\n    concurrent_unordered_base( std::initializer_list<value_type> init,\n                               size_type bucket_count, const allocator_type& alloc )\n        : concurrent_unordered_base(init, bucket_count, hasher(), key_equal(), alloc) {}\n\n    concurrent_unordered_base( std::initializer_list<value_type> init,\n                               size_type bucket_count, const hasher& hash, const allocator_type& alloc )\n        : concurrent_unordered_base(init, bucket_count, hash, key_equal(), alloc) {}\n\n    ~concurrent_unordered_base() {\n        internal_clear();\n    }\n\n    concurrent_unordered_base& operator=( const concurrent_unordered_base& other ) {\n        if (this != &other) {\n            clear();\n            my_size.store(other.my_size.load(std::memory_order_relaxed), std::memory_order_relaxed);\n            my_bucket_count.store(other.my_bucket_count.load(std::memory_order_relaxed), std::memory_order_relaxed);\n            my_max_load_factor = other.my_max_load_factor;\n            my_hash_compare = other.my_hash_compare;\n            my_segments = other.my_segments;\n            internal_copy(other); // TODO: guards for exceptions?\n        }\n        return *this;\n    }\n\n    concurrent_unordered_base& operator=( concurrent_unordered_base&& other ) noexcept(unordered_segment_table::is_noexcept_assignment) {\n        if (this != &other) {\n            clear();\n            my_size.store(other.my_size.load(std::memory_order_relaxed), std::memory_order_relaxed);\n            my_bucket_count.store(other.my_bucket_count.load(std::memory_order_relaxed), std::memory_order_relaxed);\n            my_max_load_factor = std::move(other.my_max_load_factor);\n            my_hash_compare = std::move(other.my_hash_compare);\n            my_segments = std::move(other.my_segments);\n\n            using pocma_type = typename allocator_traits_type::propagate_on_container_move_assignment;\n            using is_always_equal = typename allocator_traits_type::is_always_equal;\n            internal_move_assign(std::move(other), tbb::detail::disjunction<pocma_type, is_always_equal>());\n        }\n        return *this;\n    }\n\n    concurrent_unordered_base& operator=( std::initializer_list<value_type> init ) {\n        clear();\n        insert(init);\n        return *this;\n    }\n\n    void swap( concurrent_unordered_base& other ) noexcept(unordered_segment_table::is_noexcept_swap) {\n        if (this != &other) {\n            using pocs_type = typename allocator_traits_type::propagate_on_container_swap;\n            using is_always_equal = typename allocator_traits_type::is_always_equal;\n            internal_swap(other, tbb::detail::disjunction<pocs_type, is_always_equal>());\n        }\n    }\n\n    allocator_type get_allocator() const noexcept { return my_segments.get_allocator(); }\n\n    iterator begin() noexcept { return iterator(first_value_node(&my_head)); }\n    const_iterator begin() const noexcept { return const_iterator(first_value_node(const_cast<node_ptr>(&my_head))); }\n    const_iterator cbegin() const noexcept { return const_iterator(first_value_node(const_cast<node_ptr>(&my_head))); }\n\n    iterator end() noexcept { return iterator(nullptr); }\n    const_iterator end() const noexcept { return const_iterator(nullptr); }\n    const_iterator cend() const noexcept { return const_iterator(nullptr); }\n\n    __TBB_nodiscard bool empty() const noexcept { return size() == 0; }\n    size_type size() const noexcept { return my_size.load(std::memory_order_relaxed); }\n    size_type max_size() const noexcept { return allocator_traits_type::max_size(get_allocator()); }\n\n    void clear() noexcept {\n        internal_clear();\n    }\n\n    std::pair<iterator, bool> insert( const value_type& value ) {\n        return internal_insert_value(value);\n    }\n\n    std::pair<iterator, bool> insert( value_type&& value ) {\n        return internal_insert_value(std::move(value));\n    }\n\n    iterator insert( const_iterator, const value_type& value ) {\n        // Ignore hint\n        return insert(value).first;\n    }\n\n    iterator insert( const_iterator, value_type&& value ) {\n        // Ignore hint\n        return insert(std::move(value)).first;\n    }\n\n    template <typename InputIterator>\n    void insert( InputIterator first, InputIterator last ) {\n        for (; first != last; ++first) {\n            insert(*first);\n        }\n    }\n\n    void insert( std::initializer_list<value_type> init ) {\n        insert(init.begin(), init.end());\n    }\n\n    std::pair<iterator, bool> insert( node_type&& nh ) {\n        if (!nh.empty()) {\n            value_node_ptr insert_node = d1::node_handle_accessor::get_node_ptr(nh);\n            auto init_node = [&insert_node]( sokey_type order_key )->value_node_ptr {\n                insert_node->init(order_key);\n                return insert_node;\n            };\n            auto insert_result = internal_insert(insert_node->value(), init_node);\n            if (insert_result.inserted) {\n                // If the insertion succeeded - set node handle to the empty state\n                __TBB_ASSERT(insert_result.remaining_node == nullptr,\n                            \"internal_insert_node should not return the remaining node if the insertion succeeded\");\n                d1::node_handle_accessor::deactivate(nh);\n            }\n            return { iterator(insert_result.node_with_equal_key), insert_result.inserted };\n        }\n        return {end(), false};\n    }\n\n    iterator insert( const_iterator, node_type&& nh ) {\n        // Ignore hint\n        return insert(std::move(nh)).first;\n    }\n\n    template <typename... Args>\n    std::pair<iterator, bool> emplace( Args&&... args ) {\n        // Create a node with temporary order_key 0, which will be reinitialize\n        // in internal_insert after the hash calculation\n        value_node_ptr insert_node = create_node(0, std::forward<Args>(args)...);\n\n        auto init_node = [&insert_node]( sokey_type order_key )->value_node_ptr {\n            insert_node->init(order_key);\n            return insert_node;\n        };\n\n        auto insert_result = internal_insert(insert_node->value(), init_node);\n\n        if (!insert_result.inserted) {\n            // If the insertion failed - destroy the node which was created\n            insert_node->init(split_order_key_regular(1));\n            destroy_node(insert_node);\n        }\n\n        return { iterator(insert_result.node_with_equal_key), insert_result.inserted };\n    }\n\n    template <typename... Args>\n    iterator emplace_hint( const_iterator, Args&&... args ) {\n        // Ignore hint\n        return emplace(std::forward<Args>(args)...).first;\n    }\n\n    iterator unsafe_erase( const_iterator pos ) {\n        return iterator(first_value_node(internal_erase(pos.get_node_ptr())));\n    }\n\n    iterator unsafe_erase( iterator pos ) {\n        return iterator(first_value_node(internal_erase(pos.get_node_ptr())));\n    }\n\n    iterator unsafe_erase( const_iterator first, const_iterator last ) {\n        while(first != last) {\n            first = unsafe_erase(first);\n        }\n        return iterator(first.get_node_ptr());\n    }\n\n    size_type unsafe_erase( const key_type& key ) {\n        return internal_erase_by_key(key);\n    }\n\n    template <typename K>\n    typename std::enable_if<is_transparent<K>::value\n                            && !std::is_convertible<K, const_iterator>::value\n                            && !std::is_convertible<K, iterator>::value,\n                            size_type>::type unsafe_erase( const K& key )\n    {\n        return internal_erase_by_key(key);\n    }\n\n    node_type unsafe_extract( const_iterator pos ) {\n        internal_extract(pos.get_node_ptr());\n        return d1::node_handle_accessor::construct<node_type>(pos.get_node_ptr());\n    }\n\n    node_type unsafe_extract( iterator pos ) {\n        internal_extract(pos.get_node_ptr());\n        return d1::node_handle_accessor::construct<node_type>(pos.get_node_ptr());\n    }\n\n    node_type unsafe_extract( const key_type& key ) {\n        iterator item = find(key);\n        return item == end() ? node_type() : unsafe_extract(item);\n    }\n\n    template <typename K>\n    typename std::enable_if<is_transparent<K>::value\n                            && !std::is_convertible<K, const_iterator>::value\n                            && !std::is_convertible<K, iterator>::value,\n                            node_type>::type unsafe_extract( const K& key )\n    {\n        iterator item = find(key);\n        return item == end() ? node_type() : unsafe_extract(item);\n    }\n\n    // Lookup functions\n    iterator find( const key_type& key ) {\n        value_node_ptr result = internal_find(key);\n        return result == nullptr ? end() : iterator(result);\n    }\n\n    const_iterator find( const key_type& key ) const {\n        value_node_ptr result = const_cast<self_type*>(this)->internal_find(key);\n        return result == nullptr ? end() : const_iterator(result);\n    }\n\n    template <typename K>\n    typename std::enable_if<is_transparent<K>::value, iterator>::type find( const K& key ) {\n        value_node_ptr result = internal_find(key);\n        return result == nullptr ? end() : iterator(result);\n    }\n\n    template <typename K>\n    typename std::enable_if<is_transparent<K>::value, const_iterator>::type find( const K& key ) const {\n        value_node_ptr result = const_cast<self_type*>(this)->internal_find(key);\n        return result == nullptr ? end() : const_iterator(result);\n    }\n\n    std::pair<iterator, iterator> equal_range( const key_type& key ) {\n        auto result = internal_equal_range(key);\n        return std::make_pair(iterator(result.first), iterator(result.second));\n    }\n\n    std::pair<const_iterator, const_iterator> equal_range( const key_type& key ) const {\n        auto result = const_cast<self_type*>(this)->internal_equal_range(key);\n        return std::make_pair(const_iterator(result.first), const_iterator(result.second));\n    }\n\n    template <typename K>\n    typename std::enable_if<is_transparent<K>::value, std::pair<iterator, iterator>>::type equal_range( const K& key ) {\n        auto result = internal_equal_range(key);\n        return std::make_pair(iterator(result.first), iterator(result.second));\n    }\n\n    template <typename K>\n    typename std::enable_if<is_transparent<K>::value, std::pair<const_iterator, const_iterator>>::type equal_range( const K& key ) const {\n        auto result = const_cast<self_type*>(this)->internal_equal_range(key);\n        return std::make_pair(iterator(result.first), iterator(result.second));\n    }\n\n    size_type count( const key_type& key ) const {\n        return internal_count(key);\n    }\n\n    template <typename K>\n    typename std::enable_if<is_transparent<K>::value, size_type>::type count( const K& key ) const {\n        return internal_count(key);\n    }\n\n    bool contains( const key_type& key ) const {\n        return find(key) != end();\n    }\n\n    template <typename K>\n    typename std::enable_if<is_transparent<K>::value, bool>::type contains( const K& key ) const {\n        return find(key) != end();\n    }\n\n    // Bucket interface\n    local_iterator unsafe_begin( size_type n ) {\n        return local_iterator(first_value_node(get_bucket(n)));\n    }\n\n    const_local_iterator unsafe_begin( size_type n ) const {\n        auto bucket_begin = first_value_node(const_cast<self_type*>(this)->get_bucket(n));\n        return const_local_iterator(bucket_begin);\n    }\n\n    const_local_iterator unsafe_cbegin( size_type n ) const {\n        auto bucket_begin = first_value_node(const_cast<self_type*>(this)->get_bucket(n));\n        return const_local_iterator(bucket_begin);\n    }\n\n    local_iterator unsafe_end( size_type n ) {\n        size_type bucket_count = my_bucket_count.load(std::memory_order_relaxed);\n        return n != bucket_count - 1 ? unsafe_begin(get_next_bucket_index(n)) : local_iterator(nullptr);\n    }\n\n    const_local_iterator unsafe_end( size_type n ) const {\n        size_type bucket_count = my_bucket_count.load(std::memory_order_relaxed);\n        return n != bucket_count - 1 ? unsafe_begin(get_next_bucket_index(n)) : const_local_iterator(nullptr);\n    }\n\n    const_local_iterator unsafe_cend( size_type n ) const {\n        size_type bucket_count = my_bucket_count.load(std::memory_order_relaxed);\n        return n != bucket_count - 1 ? unsafe_begin(get_next_bucket_index(n)) : const_local_iterator(nullptr);\n    }\n\n    size_type unsafe_bucket_count() const { return my_bucket_count.load(std::memory_order_relaxed); }\n\n    size_type unsafe_max_bucket_count() const {\n        return max_size();\n    }\n\n    size_type unsafe_bucket_size( size_type n ) const {\n        return size_type(std::distance(unsafe_begin(n), unsafe_end(n)));\n    }\n\n    size_type unsafe_bucket( const key_type& key ) const {\n        return my_hash_compare(key) % my_bucket_count.load(std::memory_order_relaxed);\n    }\n\n    // Hash policy\n    float load_factor() const {\n        return float(size() / float(my_bucket_count.load(std::memory_order_acquire)));\n    }\n\n    float max_load_factor() const { return my_max_load_factor; }\n\n    void max_load_factor( float mlf ) {\n        if (mlf != mlf || mlf < 0) {\n            tbb::detail::throw_exception(exception_id::invalid_load_factor);\n        }\n        my_max_load_factor = mlf;\n    } // TODO: unsafe?\n\n    void rehash( size_type bucket_count ) {\n        size_type current_bucket_count = my_bucket_count.load(std::memory_order_acquire);\n        if (current_bucket_count < bucket_count) {\n            // TODO: do we need do-while here?\n            my_bucket_count.compare_exchange_strong(current_bucket_count, round_up_to_power_of_two(bucket_count));\n        }\n    }\n\n    void reserve( size_type elements_count ) {\n        size_type current_bucket_count = my_bucket_count.load(std::memory_order_acquire);\n        size_type necessary_bucket_count = current_bucket_count;\n\n        // max_load_factor() is currently unsafe, so we can assume that my_max_load_factor\n        // would not be changed during the calculation\n        // TODO: Log2 seems useful here\n        while (necessary_bucket_count * max_load_factor() < elements_count) {\n                necessary_bucket_count <<= 1;\n        }\n\n        while (!my_bucket_count.compare_exchange_strong(current_bucket_count, necessary_bucket_count)) {\n            if (current_bucket_count >= necessary_bucket_count)\n                break;\n        }\n    }\n\n    // Observers\n    hasher hash_function() const { return my_hash_compare.hash_function(); }\n    key_equal key_eq() const { return my_hash_compare.key_eq(); }\n\n    class const_range_type {\n    private:\n        const concurrent_unordered_base& my_instance;\n        node_ptr my_begin_node; // may be node* const\n        node_ptr my_end_node;\n        mutable node_ptr my_midpoint_node;\n    public:\n        using size_type = typename concurrent_unordered_base::size_type;\n        using value_type = typename concurrent_unordered_base::value_type;\n        using reference = typename concurrent_unordered_base::reference;\n        using difference_type = typename concurrent_unordered_base::difference_type;\n        using iterator = typename concurrent_unordered_base::const_iterator;\n\n        bool empty() const { return my_begin_node == my_end_node; }\n\n        bool is_divisible() const {\n            return my_midpoint_node != my_end_node;\n        }\n\n        size_type grainsize() const { return 1; }\n\n        const_range_type( const_range_type& range, split )\n            : my_instance(range.my_instance),\n              my_begin_node(range.my_midpoint_node),\n              my_end_node(range.my_end_node)\n        {\n            range.my_end_node = my_begin_node;\n            __TBB_ASSERT(!empty(), \"Splitting despite the range is not divisible\");\n            __TBB_ASSERT(!range.empty(), \"Splitting despite the range is not divisible\");\n            set_midpoint();\n            range.set_midpoint();\n        }\n\n        iterator begin() const { return iterator(my_instance.first_value_node(my_begin_node)); }\n        iterator end() const { return iterator(my_instance.first_value_node(my_end_node)); }\n\n        const_range_type( const concurrent_unordered_base& table )\n            : my_instance(table), my_begin_node(my_instance.first_value_node(const_cast<node_ptr>(&table.my_head))), my_end_node(nullptr)\n        {\n            set_midpoint();\n        }\n    private:\n        void set_midpoint() const {\n            if (empty()) {\n                my_midpoint_node = my_end_node;\n            } else {\n                sokey_type invalid_key = ~sokey_type(0);\n                sokey_type begin_key = my_begin_node != nullptr ? my_begin_node->order_key() : invalid_key;\n                sokey_type end_key = my_end_node != nullptr ? my_end_node->order_key() : invalid_key;\n\n                size_type mid_bucket = reverse_bits(begin_key + (end_key - begin_key) / 2) %\n                    my_instance.my_bucket_count.load(std::memory_order_relaxed);\n                while( my_instance.my_segments[mid_bucket].load(std::memory_order_relaxed) == nullptr) {\n                    mid_bucket = my_instance.get_parent(mid_bucket);\n                }\n                if (reverse_bits(mid_bucket) > begin_key) {\n                    // Found a dummy node between begin and end\n                    my_midpoint_node = my_instance.first_value_node(\n                        my_instance.my_segments[mid_bucket].load(std::memory_order_relaxed));\n                } else {\n                    // Didn't find a dummy node between begin and end\n                    my_midpoint_node = my_end_node;\n                }\n            }\n        }\n    }; // class const_range_type\n\n    class range_type : public const_range_type {\n    public:\n        using iterator = typename concurrent_unordered_base::iterator;\n        using const_range_type::const_range_type;\n\n        iterator begin() const { return iterator(const_range_type::begin().get_node_ptr()); }\n        iterator end() const { return iterator(const_range_type::end().get_node_ptr()); }\n    }; // class range_type\n\n    // Parallel iteration\n    range_type range() {\n        return range_type(*this);\n    }\n\n    const_range_type range() const {\n        return const_range_type(*this);\n    }\nprotected:\n    static constexpr bool allow_multimapping = traits_type::allow_multimapping;\n\nprivate:\n    static constexpr size_type initial_bucket_count = 8;\n    static constexpr float initial_max_load_factor = 4; // TODO: consider 1?\n    static constexpr size_type pointers_per_embedded_table = sizeof(size_type) * 8 - 1;\n\n    class unordered_segment_table\n        : public d1::segment_table<std::atomic<node_ptr>, allocator_type, unordered_segment_table, pointers_per_embedded_table>\n    {\n        using self_type = unordered_segment_table;\n        using atomic_node_ptr = std::atomic<node_ptr>;\n        using base_type = d1::segment_table<std::atomic<node_ptr>, allocator_type, unordered_segment_table, pointers_per_embedded_table>;\n        using segment_type = typename base_type::segment_type;\n        using base_allocator_type = typename base_type::allocator_type;\n\n        using segment_allocator_type = typename allocator_traits_type::template rebind_alloc<atomic_node_ptr>;\n        using segment_allocator_traits = tbb::detail::allocator_traits<segment_allocator_type>;\n    public:\n        // Segment table for unordered containers should not be extended in the wait- free implementation\n        static constexpr bool allow_table_extending = false;\n        static constexpr bool is_noexcept_assignment = std::is_nothrow_move_assignable<hasher>::value &&\n                                                       std::is_nothrow_move_assignable<key_equal>::value &&\n                                                       segment_allocator_traits::is_always_equal::value;\n        static constexpr bool is_noexcept_swap = tbb::detail::is_nothrow_swappable<hasher>::value &&\n                                                 tbb::detail::is_nothrow_swappable<key_equal>::value &&\n                                                 segment_allocator_traits::is_always_equal::value;\n\n        // TODO: using base_type::base_type is not compiling on Windows and Intel Compiler - investigate\n        unordered_segment_table( const base_allocator_type& alloc = base_allocator_type() )\n            : base_type(alloc) {}\n\n        unordered_segment_table( const unordered_segment_table& ) = default;\n\n        unordered_segment_table( const unordered_segment_table& other, const base_allocator_type& alloc )\n            : base_type(other, alloc) {}\n\n        unordered_segment_table( unordered_segment_table&& ) = default;\n\n        unordered_segment_table( unordered_segment_table&& other, const base_allocator_type& alloc )\n            : base_type(std::move(other), alloc) {}\n\n        unordered_segment_table& operator=( const unordered_segment_table& ) = default;\n\n        unordered_segment_table& operator=( unordered_segment_table&& ) = default;\n\n        segment_type create_segment( typename base_type::segment_table_type, typename base_type::segment_index_type segment_index, size_type ) {\n            segment_allocator_type alloc(this->get_allocator());\n            size_type seg_size = this->segment_size(segment_index);\n            segment_type new_segment = segment_allocator_traits::allocate(alloc, seg_size);\n            for (size_type i = 0; i != seg_size; ++i) {\n                segment_allocator_traits::construct(alloc, new_segment + i, nullptr);\n            }\n            return new_segment;\n        }\n\n        segment_type nullify_segment( typename base_type::segment_table_type table, size_type segment_index ) {\n            segment_type target_segment = table[segment_index].load(std::memory_order_relaxed);\n            table[segment_index].store(nullptr, std::memory_order_relaxed);\n            return target_segment;\n        }\n\n        // deallocate_segment is required by the segment_table base class, but\n        // in unordered, it is also necessary to call the destructor during deallocation\n        void deallocate_segment( segment_type address, size_type index ) {\n            destroy_segment(address, index);\n        }\n\n        void destroy_segment( segment_type address, size_type index ) {\n            segment_allocator_type alloc(this->get_allocator());\n            for (size_type i = 0; i != this->segment_size(index); ++i) {\n                segment_allocator_traits::destroy(alloc, address + i);\n            }\n            segment_allocator_traits::deallocate(alloc, address, this->segment_size(index));\n        }\n\n\n        void copy_segment( size_type index, segment_type, segment_type to ) {\n            if (index == 0) {\n                // The first element in the first segment is embedded into the table (my_head)\n                // so the first pointer should not be stored here\n                // It would be stored during move ctor/assignment operation\n                to[1].store(nullptr, std::memory_order_relaxed);\n            } else {\n                for (size_type i = 0; i != this->segment_size(index); ++i) {\n                    to[i].store(nullptr, std::memory_order_relaxed);\n                }\n            }\n        }\n\n        void move_segment( size_type index, segment_type from, segment_type to ) {\n            if (index == 0) {\n                // The first element in the first segment is embedded into the table (my_head)\n                // so the first pointer should not be stored here\n                // It would be stored during move ctor/assignment operation\n                to[1].store(from[1].load(std::memory_order_relaxed), std::memory_order_relaxed);\n            } else {\n                for (size_type i = 0; i != this->segment_size(index); ++i) {\n                    to[i].store(from[i].load(std::memory_order_relaxed), std::memory_order_relaxed);\n                    from[i].store(nullptr, std::memory_order_relaxed);\n                }\n            }\n        }\n\n        // allocate_long_table is required by the segment_table base class, but unused for unordered containers\n        typename base_type::segment_table_type allocate_long_table( const typename base_type::atomic_segment*, size_type ) {\n            __TBB_ASSERT(false, \"This method should never been called\");\n            // TableType is a pointer\n            return nullptr;\n        }\n\n        // destroy_elements is required by the segment_table base class, but unused for unordered containers\n        // this function call but do nothing\n        void destroy_elements() {}\n    }; // struct unordered_segment_table\n\n    void internal_clear() {\n        // TODO: consider usefulness of two versions of clear() - with dummy nodes deallocation and without it\n        node_ptr next = my_head.next();\n        node_ptr curr = next;\n\n        my_head.set_next(nullptr);\n\n        while (curr != nullptr) {\n            next = curr->next();\n            destroy_node(curr);\n            curr = next;\n        }\n\n        my_size.store(0, std::memory_order_relaxed);\n        my_segments.clear();\n    }\n\n    void destroy_node( node_ptr node ) {\n        if (node->is_dummy()) {\n            node_allocator_type dummy_node_allocator(my_segments.get_allocator());\n            // Destroy the node\n            node_allocator_traits::destroy(dummy_node_allocator, node);\n            // Deallocate the memory\n            node_allocator_traits::deallocate(dummy_node_allocator, node, 1);\n        } else {\n            // GCC 11.1 issues a warning here that incorrect destructor might be called for dummy_nodes\n            #if (__TBB_GCC_VERSION >= 110100 && __TBB_GCC_VERSION < 150000 ) && !__clang__ && !__INTEL_COMPILER\n            volatile\n            #endif\n            value_node_ptr val_node = static_cast<value_node_ptr>(node);\n            value_node_allocator_type value_node_allocator(my_segments.get_allocator());\n            // Destroy the value\n            value_node_allocator_traits::destroy(value_node_allocator, val_node->storage());\n            // Destroy the node\n            value_node_allocator_traits::destroy(value_node_allocator, val_node);\n            // Deallocate the memory\n            value_node_allocator_traits::deallocate(value_node_allocator, val_node, 1);\n        }\n    }\n\n    struct internal_insert_return_type {\n        // If the insertion failed - the remaining_node points to the node, which was failed to insert\n        // This node can be allocated in process of insertion\n        value_node_ptr remaining_node;\n        // If the insertion failed - node_with_equal_key points to the node in the list with the\n        // key, equivalent to the inserted, otherwise it points to the node, which was inserted.\n        value_node_ptr node_with_equal_key;\n        // Insertion status\n        // NOTE: if it is true - remaining_node should be nullptr\n        bool inserted;\n    }; // struct internal_insert_return_type\n\n    // Inserts the value into the split ordered list\n    template <typename ValueType>\n    std::pair<iterator, bool> internal_insert_value( ValueType&& value ) {\n\n        auto create_value_node = [&value, this]( sokey_type order_key )->value_node_ptr {\n            return create_node(order_key, std::forward<ValueType>(value));\n        };\n\n        auto insert_result = internal_insert(value, create_value_node);\n\n        if (insert_result.remaining_node != nullptr) {\n            // If the insertion fails - destroy the node which was failed to insert if it exist\n            __TBB_ASSERT(!insert_result.inserted,\n                         \"remaining_node should be nullptr if the node was successfully inserted\");\n            destroy_node(insert_result.remaining_node);\n        }\n\n        return { iterator(insert_result.node_with_equal_key), insert_result.inserted };\n    }\n\n    // Inserts the node into the split ordered list\n    // Creates a node using the specified callback after the place for insertion was found\n    // Returns internal_insert_return_type object, where:\n    //     - If the insertion succeeded:\n    //         - remaining_node is nullptr\n    //         - node_with_equal_key point to the inserted node\n    //         - inserted is true\n    //     - If the insertion failed:\n    //         - remaining_node points to the node, that was failed to insert if it was created.\n    //           nullptr if the node was not created, because the requested key was already\n    //           presented in the list\n    //         - node_with_equal_key point to the element in the list with the key, equivalent to\n    //           to the requested key\n    //         - inserted is false\n    template <typename ValueType, typename CreateInsertNode>\n    internal_insert_return_type internal_insert( ValueType&& value, CreateInsertNode create_insert_node ) {\n        static_assert(std::is_same<typename std::decay<ValueType>::type, value_type>::value,\n                      \"Incorrect type in internal_insert\");\n        const key_type& key = traits_type::get_key(value);\n        sokey_type hash_key = sokey_type(my_hash_compare(key));\n\n        sokey_type order_key = split_order_key_regular(hash_key);\n        node_ptr prev = prepare_bucket(hash_key);\n        __TBB_ASSERT(prev != nullptr, \"Invalid head node\");\n\n        auto search_result = search_after(prev, order_key, key);\n\n        if (search_result.second) {\n            return internal_insert_return_type{ nullptr, search_result.first, false };\n        }\n\n        value_node_ptr new_node = create_insert_node(order_key);\n        node_ptr curr = search_result.first;\n\n        while (!try_insert(prev, new_node, curr)) {\n            search_result = search_after(prev, order_key, key);\n            if (search_result.second) {\n                return internal_insert_return_type{ new_node, search_result.first, false };\n            }\n            curr = search_result.first;\n        }\n\n        auto sz = my_size.fetch_add(1);\n        adjust_table_size(sz + 1, my_bucket_count.load(std::memory_order_acquire));\n        return internal_insert_return_type{ nullptr, static_cast<value_node_ptr>(new_node), true };\n    }\n\n    // Searches the node with the key, equivalent to key with requested order key after the node prev\n    // Returns the existing node and true if the node is already in the list\n    // Returns the first node with the order key, greater than requested and false if the node is not presented in the list\n    std::pair<value_node_ptr, bool> search_after( node_ptr& prev, sokey_type order_key, const key_type& key ) {\n        // NOTE: static_cast<value_node_ptr>(curr) should be done only after we would ensure\n        // that the node is not a dummy node\n\n        node_ptr curr = prev->next();\n\n        while (curr != nullptr && (curr->order_key() < order_key ||\n               (curr->order_key() == order_key && !my_hash_compare(traits_type::get_key(static_cast<value_node_ptr>(curr)->value()), key))))\n        {\n            prev = curr;\n            curr = curr->next();\n        }\n\n        if (curr != nullptr && curr->order_key() == order_key && !allow_multimapping) {\n            return { static_cast<value_node_ptr>(curr), true };\n        }\n        return { static_cast<value_node_ptr>(curr), false };\n    }\n\n    void adjust_table_size( size_type total_elements, size_type current_size ) {\n        // Grow the table by a factor of 2 if possible and needed\n        if ( (float(total_elements) / float(current_size)) > my_max_load_factor ) {\n            // Double the size of the hash only if size hash not changed in between loads\n            my_bucket_count.compare_exchange_strong(current_size, 2u * current_size);\n        }\n    }\n\n    node_ptr insert_dummy_node( node_ptr parent_dummy_node, sokey_type order_key ) {\n        node_ptr prev_node = parent_dummy_node;\n\n        node_ptr dummy_node = create_dummy_node(order_key);\n        node_ptr next_node;\n\n        do {\n            next_node = prev_node->next();\n            // Move forward through the list while the order key is less than requested\n            while (next_node != nullptr && next_node->order_key() < order_key) {\n                prev_node = next_node;\n                next_node = next_node->next();\n            }\n\n            if (next_node != nullptr && next_node->order_key() == order_key) {\n                // Another dummy node with the same order key was inserted by another thread\n                // Destroy the node and exit\n                destroy_node(dummy_node);\n                return next_node;\n            }\n        } while (!try_insert(prev_node, dummy_node, next_node));\n\n        return dummy_node;\n    }\n\n    // Try to insert a node between prev_node and expected next\n    // If the next is not equal to expected next - return false\n    static bool try_insert( node_ptr prev_node, node_ptr new_node, node_ptr current_next_node ) {\n        new_node->set_next(current_next_node);\n        return prev_node->try_set_next(current_next_node, new_node);\n    }\n\n    // Returns the bucket, associated with the hash_key\n    node_ptr prepare_bucket( sokey_type hash_key ) {\n        size_type bucket = hash_key % my_bucket_count.load(std::memory_order_acquire);\n        return get_bucket(bucket);\n    }\n\n    // Initialize the corresponding bucket if it is not initialized\n    node_ptr get_bucket( size_type bucket_index ) {\n        if (my_segments[bucket_index].load(std::memory_order_acquire) == nullptr) {\n            init_bucket(bucket_index);\n        }\n        return my_segments[bucket_index].load(std::memory_order_acquire);\n    }\n\n    void init_bucket( size_type bucket ) {\n        if (bucket == 0) {\n            // Atomicaly store the first bucket into my_head\n            node_ptr disabled = nullptr;\n            my_segments[0].compare_exchange_strong(disabled, &my_head);\n            return;\n        }\n\n        size_type parent_bucket = get_parent(bucket);\n\n        while (my_segments[parent_bucket].load(std::memory_order_acquire) == nullptr) {\n            // Initialize all of the parent buckets\n            init_bucket(parent_bucket);\n        }\n\n        __TBB_ASSERT(my_segments[parent_bucket].load(std::memory_order_acquire) != nullptr, \"Parent bucket should be initialized\");\n        node_ptr parent = my_segments[parent_bucket].load(std::memory_order_acquire);\n\n        // Insert dummy node into the list\n        node_ptr dummy_node = insert_dummy_node(parent, split_order_key_dummy(bucket));\n        // TODO: consider returning pair<node_ptr, bool> to avoid store operation if the bucket was stored by an other thread\n        // or move store to insert_dummy_node\n        // Add dummy_node into the segment table\n        my_segments[bucket].store(dummy_node, std::memory_order_release);\n    }\n\n    node_ptr create_dummy_node( sokey_type order_key ) {\n        node_allocator_type dummy_node_allocator(my_segments.get_allocator());\n        node_ptr dummy_node = node_allocator_traits::allocate(dummy_node_allocator, 1);\n        node_allocator_traits::construct(dummy_node_allocator, dummy_node, order_key);\n        return dummy_node;\n    }\n\n    template <typename... Args>\n    value_node_ptr create_node( sokey_type order_key, Args&&... args ) {\n        value_node_allocator_type value_node_allocator(my_segments.get_allocator());\n        // Allocate memory for the value_node\n        value_node_ptr new_node = value_node_allocator_traits::allocate(value_node_allocator, 1);\n        // Construct the node\n        value_node_allocator_traits::construct(value_node_allocator, new_node, order_key);\n\n        // try_call API is not convenient here due to broken\n        // variadic capture on GCC 4.8.5\n        auto value_guard = make_raii_guard([&] {\n            value_node_allocator_traits::destroy(value_node_allocator, new_node);\n            value_node_allocator_traits::deallocate(value_node_allocator, new_node, 1);\n        });\n\n        // Construct the value in the node\n        value_node_allocator_traits::construct(value_node_allocator, new_node->storage(), std::forward<Args>(args)...);\n        value_guard.dismiss();\n        return new_node;\n    }\n\n    value_node_ptr first_value_node( node_ptr first_node ) const {\n        while (first_node != nullptr && first_node->is_dummy()) {\n            first_node = first_node->next();\n        }\n        return static_cast<value_node_ptr>(first_node);\n    }\n\n    // Unsafe method, which removes the node from the list and returns the next node\n    node_ptr internal_erase( value_node_ptr node_to_erase ) {\n        __TBB_ASSERT(node_to_erase != nullptr, \"Invalid iterator for erase\");\n        node_ptr next_node = node_to_erase->next();\n        internal_extract(node_to_erase);\n        destroy_node(node_to_erase);\n        return next_node;\n    }\n\n    template <typename K>\n    size_type internal_erase_by_key( const K& key ) {\n        // TODO: consider reimplementation without equal_range - it is not effective to perform lookup over a bucket\n        // for each unsafe_erase call\n        auto eq_range = equal_range(key);\n        size_type erased_count = 0;\n\n        for (auto it = eq_range.first; it != eq_range.second;) {\n            it = unsafe_erase(it);\n            ++erased_count;\n        }\n        return erased_count;\n    }\n\n    // Unsafe method, which extracts the node from the list\n    void internal_extract( value_node_ptr node_to_extract ) {\n        const key_type& key = traits_type::get_key(node_to_extract->value());\n        sokey_type hash_key = sokey_type(my_hash_compare(key));\n\n        node_ptr prev_node = prepare_bucket(hash_key);\n\n        for (node_ptr node = prev_node->next(); node != nullptr; prev_node = node, node = node->next()) {\n            if (node == node_to_extract) {\n                unlink_node(prev_node, node, node_to_extract->next());\n                my_size.store(my_size.load(std::memory_order_relaxed) - 1, std::memory_order_relaxed);\n                return;\n            }\n            __TBB_ASSERT(node->order_key() <= node_to_extract->order_key(),\n                         \"node, which is going to be extracted should be presented in the list\");\n        }\n    }\n\nprotected:\n    template <typename SourceType>\n    void internal_merge( SourceType&& source ) {\n        static_assert(std::is_same<node_type, typename std::decay<SourceType>::type::node_type>::value,\n                      \"Incompatible containers cannot be merged\");\n\n        for (node_ptr source_prev = &source.my_head; source_prev->next() != nullptr;) {\n            if (!source_prev->next()->is_dummy()) {\n                value_node_ptr curr = static_cast<value_node_ptr>(source_prev->next());\n                // If the multimapping is allowed, or the key is not presented\n                // in the *this container - extract the node from the list\n                if (allow_multimapping || !contains(traits_type::get_key(curr->value()))) {\n                    node_ptr next_node = curr->next();\n                    source.unlink_node(source_prev, curr, next_node);\n\n                    // Remember the old order key\n                    sokey_type old_order_key = curr->order_key();\n\n                    // Node handle with curr cannot be used directly in insert call, because\n                    // the destructor of node_type will destroy curr\n                    node_type curr_node = d1::node_handle_accessor::construct<node_type>(curr);\n\n                    // If the insertion fails - return ownership of the node to the source\n                    if (!insert(std::move(curr_node)).second) {\n                        __TBB_ASSERT(!allow_multimapping, \"Insertion should succeed for multicontainer\");\n                        __TBB_ASSERT(source_prev->next() == next_node,\n                                     \"Concurrent operations with the source container in merge are prohibited\");\n\n                        // Initialize the node with the old order key, because the order key\n                        // can change during the insertion\n                        curr->init(old_order_key);\n                        __TBB_ASSERT(old_order_key >= source_prev->order_key() &&\n                                     (next_node == nullptr || old_order_key <= next_node->order_key()),\n                                     \"Wrong nodes order in the source container\");\n                        // Merge is unsafe for source container, so the insertion back can be done without compare_exchange\n                        curr->set_next(next_node);\n                        source_prev->set_next(curr);\n                        source_prev = curr;\n                        d1::node_handle_accessor::deactivate(curr_node);\n                    } else {\n                        source.my_size.fetch_sub(1, std::memory_order_relaxed);\n                    }\n                } else {\n                    source_prev = curr;\n                }\n            } else {\n                source_prev = source_prev->next();\n            }\n        }\n    }\n\nprivate:\n    // Unsafe method, which unlinks the node between prev and next\n    void unlink_node( node_ptr prev_node, node_ptr node_to_unlink, node_ptr next_node ) {\n        __TBB_ASSERT(prev_node->next() == node_to_unlink &&\n                     node_to_unlink->next() == next_node,\n                     \"erasing and extracting nodes from the containers are unsafe in concurrent mode\");\n        prev_node->set_next(next_node);\n        node_to_unlink->set_next(nullptr);\n    }\n\n    template <typename K>\n    value_node_ptr internal_find( const K& key ) {\n        sokey_type hash_key = sokey_type(my_hash_compare(key));\n        sokey_type order_key = split_order_key_regular(hash_key);\n\n        node_ptr curr = prepare_bucket(hash_key);\n\n        while (curr != nullptr) {\n            if (curr->order_key() > order_key) {\n                // If the order key is greater than the requested order key,\n                // the element is not in the hash table\n                return nullptr;\n            } else if (curr->order_key() == order_key &&\n                       my_hash_compare(traits_type::get_key(static_cast<value_node_ptr>(curr)->value()), key)) {\n                // The fact that order keys match does not mean that the element is found.\n                // Key function comparison has to be performed to check whether this is the\n                // right element. If not, keep searching while order key is the same.\n                return static_cast<value_node_ptr>(curr);\n            }\n            curr = curr->next();\n        }\n\n        return nullptr;\n    }\n\n    template <typename K>\n    std::pair<value_node_ptr, value_node_ptr> internal_equal_range( const K& key ) {\n        sokey_type hash_key = sokey_type(my_hash_compare(key));\n        sokey_type order_key = split_order_key_regular(hash_key);\n\n        node_ptr curr = prepare_bucket(hash_key);\n\n        while (curr != nullptr) {\n            if (curr->order_key() > order_key) {\n                // If the order key is greater than the requested order key,\n                // the element is not in the hash table\n                return std::make_pair(nullptr, nullptr);\n            } else if (curr->order_key() == order_key &&\n                       my_hash_compare(traits_type::get_key(static_cast<value_node_ptr>(curr)->value()), key)) {\n                value_node_ptr first = static_cast<value_node_ptr>(curr);\n                node_ptr last = first;\n                do {\n                    last = last->next();\n                } while (allow_multimapping && last != nullptr && !last->is_dummy() &&\n                        my_hash_compare(traits_type::get_key(static_cast<value_node_ptr>(last)->value()), key));\n                return std::make_pair(first, first_value_node(last));\n            }\n            curr = curr->next();\n        }\n        return {nullptr, nullptr};\n    }\n\n    template <typename K>\n    size_type internal_count( const K& key ) const {\n        if (allow_multimapping) {\n            // TODO: consider reimplementing the internal_equal_range with elements counting to avoid std::distance\n            auto eq_range = equal_range(key);\n            return std::distance(eq_range.first, eq_range.second);\n        } else {\n            return contains(key) ? 1 : 0;\n        }\n    }\n\n    void internal_copy( const concurrent_unordered_base& other ) {\n        node_ptr last_node = &my_head;\n        my_segments[0].store(&my_head, std::memory_order_relaxed);\n\n        for (node_ptr node = other.my_head.next(); node != nullptr; node = node->next()) {\n            node_ptr new_node;\n            if (!node->is_dummy()) {\n                // The node in the right table contains a value\n                new_node = create_node(node->order_key(), static_cast<value_node_ptr>(node)->value());\n            } else {\n                // The node in the right table is a dummy node\n                new_node = create_dummy_node(node->order_key());\n                my_segments[reverse_bits(node->order_key())].store(new_node, std::memory_order_relaxed);\n            }\n\n            last_node->set_next(new_node);\n            last_node = new_node;\n        }\n    }\n\n    void internal_move( concurrent_unordered_base&& other ) {\n        node_ptr last_node = &my_head;\n        my_segments[0].store(&my_head, std::memory_order_relaxed);\n\n        for (node_ptr node = other.my_head.next(); node != nullptr; node = node->next()) {\n            node_ptr new_node;\n            if (!node->is_dummy()) {\n                // The node in the right table contains a value\n                new_node = create_node(node->order_key(), std::move(static_cast<value_node_ptr>(node)->value()));\n            } else {\n                // TODO: do we need to destroy a dummy node in the right container?\n                // The node in the right table is a dummy_node\n                new_node = create_dummy_node(node->order_key());\n                my_segments[reverse_bits(node->order_key())].store(new_node, std::memory_order_relaxed);\n            }\n\n            last_node->set_next(new_node);\n            last_node = new_node;\n        }\n    }\n\n    void move_content( concurrent_unordered_base&& other ) {\n        // NOTE: allocators should be equal\n        my_head.set_next(other.my_head.next());\n        other.my_head.set_next(nullptr);\n        my_segments[0].store(&my_head, std::memory_order_relaxed);\n\n        other.my_bucket_count.store(initial_bucket_count, std::memory_order_relaxed);\n        other.my_max_load_factor = initial_max_load_factor;\n        other.my_size.store(0, std::memory_order_relaxed);\n    }\n\n    void internal_move_construct_with_allocator( concurrent_unordered_base&& other, const allocator_type&,\n                                                 /*is_always_equal = */std::true_type ) {\n        // Allocators are always equal - no need to compare for equality\n        move_content(std::move(other));\n    }\n\n    void internal_move_construct_with_allocator( concurrent_unordered_base&& other, const allocator_type& alloc,\n                                                 /*is_always_equal = */std::false_type ) {\n        // Allocators are not always equal\n        if (alloc == other.my_segments.get_allocator()) {\n            move_content(std::move(other));\n        } else {\n            try_call( [&] {\n                internal_move(std::move(other));\n            } ).on_exception( [&] {\n                clear();\n            });\n        }\n    }\n\n    // Move assigns the hash table to other is any instances of allocator_type are always equal\n    // or propagate_on_container_move_assignment is true\n    void internal_move_assign( concurrent_unordered_base&& other, /*is_always_equal || POCMA = */std::true_type ) {\n        move_content(std::move(other));\n    }\n\n    // Move assigns the hash table to other is any instances of allocator_type are not always equal\n    // and propagate_on_container_move_assignment is false\n    void internal_move_assign( concurrent_unordered_base&& other, /*is_always_equal || POCMA = */std::false_type ) {\n        if (my_segments.get_allocator() == other.my_segments.get_allocator()) {\n            move_content(std::move(other));\n        } else {\n            // TODO: guards for exceptions\n            internal_move(std::move(other));\n        }\n    }\n\n    void internal_swap( concurrent_unordered_base& other, /*is_always_equal || POCS = */std::true_type ) {\n        internal_swap_fields(other);\n    }\n\n    void internal_swap( concurrent_unordered_base& other, /*is_always_equal || POCS = */std::false_type ) {\n        __TBB_ASSERT(my_segments.get_allocator() == other.my_segments.get_allocator(),\n                     \"Swapping with unequal allocators is not allowed\");\n        internal_swap_fields(other);\n    }\n\n    void internal_swap_fields( concurrent_unordered_base& other ) {\n        node_ptr first_node = my_head.next();\n        my_head.set_next(other.my_head.next());\n        other.my_head.set_next(first_node);\n\n        size_type current_size = my_size.load(std::memory_order_relaxed);\n        my_size.store(other.my_size.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        other.my_size.store(current_size, std::memory_order_relaxed);\n\n        size_type bucket_count = my_bucket_count.load(std::memory_order_relaxed);\n        my_bucket_count.store(other.my_bucket_count.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        other.my_bucket_count.store(bucket_count, std::memory_order_relaxed);\n\n        using std::swap;\n        swap(my_max_load_factor, other.my_max_load_factor);\n        swap(my_hash_compare, other.my_hash_compare);\n        my_segments.swap(other.my_segments);\n\n        // swap() method from segment table swaps all of the segments including the first segment\n        // We should restore it to my_head. Without it the first segment of the container will point\n        // to other.my_head.\n        my_segments[0].store(&my_head, std::memory_order_relaxed);\n        other.my_segments[0].store(&other.my_head, std::memory_order_relaxed);\n    }\n\n    // A regular order key has its original hash value reversed and the last bit set\n    static constexpr sokey_type split_order_key_regular( sokey_type hash ) {\n        return reverse_bits(hash) | 0x1;\n    }\n\n    // A dummy order key has its original hash value reversed and the last bit unset\n    static constexpr sokey_type split_order_key_dummy( sokey_type hash ) {\n        return reverse_bits(hash) & ~sokey_type(0x1);\n    }\n\n    size_type get_parent( size_type bucket ) const {\n        // Unset bucket's most significant turned-on bit\n        __TBB_ASSERT(bucket != 0, \"Unable to get_parent of the bucket 0\");\n        size_type msb = tbb::detail::log2(bucket);\n        return bucket & ~(size_type(1) << msb);\n    }\n\n    size_type get_next_bucket_index( size_type bucket ) const {\n        size_type bits = tbb::detail::log2(my_bucket_count.load(std::memory_order_relaxed));\n        size_type reversed_next = reverse_n_bits(bucket, bits) + 1;\n        return reverse_n_bits(reversed_next, bits);\n    }\n\n    std::atomic<size_type> my_size;\n    std::atomic<size_type> my_bucket_count;\n    float my_max_load_factor;\n    hash_compare_type my_hash_compare;\n\n    list_node_type my_head; // Head node for split ordered list\n    unordered_segment_table my_segments; // Segment table of pointers to nodes\n\n    template <typename Container, typename Value>\n    friend class solist_iterator;\n\n    template <typename OtherTraits>\n    friend class concurrent_unordered_base;\n}; // class concurrent_unordered_base\n\ntemplate <typename Traits>\nbool operator==( const concurrent_unordered_base<Traits>& lhs,\n                 const concurrent_unordered_base<Traits>& rhs ) {\n    if (&lhs == &rhs) { return true; }\n    if (lhs.size() != rhs.size()) { return false; }\n\n#if _MSC_VER\n    // Passing \"unchecked\" iterators to std::permutation with 3 parameters\n    // causes compiler warnings.\n    // The workaround is to use overload with 4 parameters, which is\n    // available since C++14 - minimally supported version on MSVC\n    return std::is_permutation(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());\n#else\n    return std::is_permutation(lhs.begin(), lhs.end(), rhs.begin());\n#endif\n}\n\n#if !__TBB_CPP20_COMPARISONS_PRESENT\ntemplate <typename Traits>\nbool operator!=( const concurrent_unordered_base<Traits>& lhs,\n                 const concurrent_unordered_base<Traits>& rhs ) {\n    return !(lhs == rhs);\n}\n#endif\n\n#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n#pragma warning(pop) // warning 4127 is back\n#endif\n\n} // namespace d2\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_detail__concurrent_unordered_base_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_config.h",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_detail__config_H\n#define __TBB_detail__config_H\n\n/** This header is supposed to contain macro definitions only.\n    The macros defined here are intended to control such aspects of TBB build as\n    - presence of compiler features\n    - compilation modes\n    - feature sets\n    - known compiler/platform issues\n**/\n\n/* Check which standard library we use. */\n#include <cstddef>\n\n#ifdef __has_include\n#if __has_include(<version>)\n#include <version>\n#endif\n#endif\n\n#include \"_export.h\"\n\n#if _MSC_VER\n    #define __TBB_EXPORTED_FUNC   __cdecl\n    #define __TBB_EXPORTED_METHOD __thiscall\n#else\n    #define __TBB_EXPORTED_FUNC\n    #define __TBB_EXPORTED_METHOD\n#endif\n\n#if defined(_MSVC_LANG)\n    #define __TBB_LANG _MSVC_LANG\n#else\n    #define __TBB_LANG __cplusplus\n#endif // _MSVC_LANG\n\n#define __TBB_CPP14_PRESENT (__TBB_LANG >= 201402L)\n#define __TBB_CPP17_PRESENT (__TBB_LANG >= 201703L)\n#define __TBB_CPP20_PRESENT (__TBB_LANG >= 202002L)\n\n#if __INTEL_COMPILER || _MSC_VER\n    #define __TBB_NOINLINE(decl) __declspec(noinline) decl\n#elif __GNUC__\n    #define __TBB_NOINLINE(decl) decl __attribute__ ((noinline))\n#else\n    #define __TBB_NOINLINE(decl) decl\n#endif\n\n#define __TBB_STRING_AUX(x) #x\n#define __TBB_STRING(x) __TBB_STRING_AUX(x)\n\n// Note that when ICC or Clang is in use, __TBB_GCC_VERSION might not fully match\n// the actual GCC version on the system.\n#define __TBB_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)\n\n/* Check which standard library we use. */\n\n// Prior to GCC 7, GNU libstdc++ did not have a convenient version macro.\n// Therefore we use different ways to detect its version.\n#ifdef TBB_USE_GLIBCXX_VERSION\n    // The version is explicitly specified in our public TBB_USE_GLIBCXX_VERSION macro.\n    // Its format should match the __TBB_GCC_VERSION above, e.g. 70301 for libstdc++ coming with GCC 7.3.1.\n    #define __TBB_GLIBCXX_VERSION TBB_USE_GLIBCXX_VERSION\n#elif _GLIBCXX_RELEASE && _GLIBCXX_RELEASE != __GNUC__\n    // Reported versions of GCC and libstdc++ do not match; trust the latter\n    #define __TBB_GLIBCXX_VERSION (_GLIBCXX_RELEASE*10000)\n#elif __GLIBCPP__ || __GLIBCXX__\n    // The version macro is not defined or matches the GCC version; use __TBB_GCC_VERSION\n    #define __TBB_GLIBCXX_VERSION __TBB_GCC_VERSION\n#endif\n\n#if __clang__\n    // according to clang documentation, version can be vendor specific\n    #define __TBB_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)\n#endif\n\n/** Macro helpers **/\n\n#define __TBB_CONCAT_AUX(A,B) A##B\n// The additional level of indirection is needed to expand macros A and B (not to get the AB macro).\n// See [cpp.subst] and [cpp.concat] for more details.\n#define __TBB_CONCAT(A,B) __TBB_CONCAT_AUX(A,B)\n// The IGNORED argument and comma are needed to always have 2 arguments (even when A is empty).\n#define __TBB_IS_MACRO_EMPTY(A,IGNORED) __TBB_CONCAT_AUX(__TBB_MACRO_EMPTY,A)\n#define __TBB_MACRO_EMPTY 1\n\n#if _M_X64 || _M_ARM64\n    #define __TBB_W(name) name##64\n#else\n    #define __TBB_W(name) name\n#endif\n\n/** User controlled TBB features & modes **/\n\n#ifndef TBB_USE_DEBUG\n    /*\n    There are four cases that are supported:\n    1. \"_DEBUG is undefined\" means \"no debug\";\n    2. \"_DEBUG defined to something that is evaluated to 0\" (including \"garbage\", as per [cpp.cond]) means \"no debug\";\n    3. \"_DEBUG defined to something that is evaluated to a non-zero value\" means \"debug\";\n    4. \"_DEBUG defined to nothing (empty)\" means \"debug\".\n    */\n    #ifdef _DEBUG\n        // Check if _DEBUG is empty.\n        #define __TBB_IS__DEBUG_EMPTY (__TBB_IS_MACRO_EMPTY(_DEBUG,IGNORED)==__TBB_MACRO_EMPTY)\n        #if __TBB_IS__DEBUG_EMPTY\n            #define TBB_USE_DEBUG 1\n        #else\n            #define TBB_USE_DEBUG _DEBUG\n        #endif // __TBB_IS__DEBUG_EMPTY\n    #else\n        #define TBB_USE_DEBUG 0\n    #endif // _DEBUG\n#endif // TBB_USE_DEBUG\n\n#ifndef TBB_USE_ASSERT\n    #define TBB_USE_ASSERT TBB_USE_DEBUG\n#endif // TBB_USE_ASSERT\n\n#ifndef TBB_USE_PROFILING_TOOLS\n#if TBB_USE_DEBUG\n    #define TBB_USE_PROFILING_TOOLS 2\n#else // TBB_USE_DEBUG\n    #define TBB_USE_PROFILING_TOOLS 0\n#endif // TBB_USE_DEBUG\n#endif // TBB_USE_PROFILING_TOOLS\n\n// Exceptions support cases\n#if !(__EXCEPTIONS || defined(_CPPUNWIND) || __SUNPRO_CC)\n    #if TBB_USE_EXCEPTIONS\n        #error Compilation settings do not support exception handling. Please do not set TBB_USE_EXCEPTIONS macro or set it to 0.\n    #elif !defined(TBB_USE_EXCEPTIONS)\n        #define TBB_USE_EXCEPTIONS 0\n    #endif\n#elif !defined(TBB_USE_EXCEPTIONS)\n    #define TBB_USE_EXCEPTIONS 1\n#endif\n\n/** Preprocessor symbols to determine HW architecture **/\n\n#if _WIN32 || _WIN64\n    #if defined(_M_X64) || defined(__x86_64__)  // the latter for MinGW support\n        #define __TBB_x86_64 1\n    #elif defined(_M_IA64)\n        #define __TBB_ipf 1\n    #elif defined(_M_IX86) || defined(__i386__) // the latter for MinGW support\n        #define __TBB_x86_32 1\n    #else\n        #define __TBB_generic_arch 1\n    #endif\n#else /* Assume generic Unix */\n    #if __x86_64__\n        #define __TBB_x86_64 1\n    #elif __ia64__\n        #define __TBB_ipf 1\n    #elif __i386__||__i386  // __i386 is for Sun OS\n        #define __TBB_x86_32 1\n    #else\n        #define __TBB_generic_arch 1\n    #endif\n#endif\n\n/** Windows API or POSIX API **/\n\n#if _WIN32 || _WIN64\n    #define __TBB_USE_WINAPI 1\n#else\n    #define __TBB_USE_POSIX 1\n#endif\n\n/** Internal TBB features & modes **/\n\n/** __TBB_DYNAMIC_LOAD_ENABLED describes the system possibility to load shared libraries at run time **/\n#ifndef __TBB_DYNAMIC_LOAD_ENABLED\n    #define __TBB_DYNAMIC_LOAD_ENABLED (!__EMSCRIPTEN__)\n#endif\n\n/** __TBB_WIN8UI_SUPPORT enables support of Windows* Store Apps and limit a possibility to load\n    shared libraries at run time only from application container **/\n#if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_APP\n    #define __TBB_WIN8UI_SUPPORT 1\n#else\n    #define __TBB_WIN8UI_SUPPORT 0\n#endif\n\n/** __TBB_WEAK_SYMBOLS_PRESENT denotes that the system supports the weak symbol mechanism **/\n#ifndef __TBB_WEAK_SYMBOLS_PRESENT\n    #define __TBB_WEAK_SYMBOLS_PRESENT ( !__EMSCRIPTEN__ && !_WIN32 && !__APPLE__ && !__sun && (__TBB_GCC_VERSION >= 40000 || __INTEL_COMPILER ) )\n#endif\n\n/** Presence of compiler features **/\n\n#if __clang__ && !__INTEL_COMPILER\n    #define __TBB_USE_OPTIONAL_RTTI __has_feature(cxx_rtti)\n#elif defined(_CPPRTTI)\n    #define __TBB_USE_OPTIONAL_RTTI 1\n#else\n    #define __TBB_USE_OPTIONAL_RTTI (__GXX_RTTI || __RTTI || __INTEL_RTTI__)\n#endif\n\n/** Address sanitizer detection **/\n#ifdef __SANITIZE_ADDRESS__\n    #define __TBB_USE_ADDRESS_SANITIZER 1\n#elif defined(__has_feature)\n#if __has_feature(address_sanitizer)\n    #define __TBB_USE_ADDRESS_SANITIZER 1\n#endif\n#endif\n\n/** Library features presence macros **/\n\n#define __TBB_CPP14_INTEGER_SEQUENCE_PRESENT       (__TBB_LANG >= 201402L)\n#define __TBB_CPP17_INVOKE_PRESENT                 (__TBB_LANG >= 201703L)\n\n// TODO: Remove the condition(__INTEL_COMPILER > 2021) from the __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n// macro when this feature start working correctly on this compiler.\n#if __INTEL_COMPILER && (!_MSC_VER || __INTEL_CXX11_MOVE__)\n    #define __TBB_CPP14_VARIABLE_TEMPLATES_PRESENT (__TBB_LANG >= 201402L)\n    #define __TBB_CPP17_DEDUCTION_GUIDES_PRESENT   (__INTEL_COMPILER > 2021 && __TBB_LANG >= 201703L)\n#elif __clang__\n    #define __TBB_CPP14_VARIABLE_TEMPLATES_PRESENT (__has_feature(cxx_variable_templates))\n    #ifdef __cpp_deduction_guides\n        #define __TBB_CPP17_DEDUCTION_GUIDES_PRESENT (__cpp_deduction_guides >= 201611L)\n    #else\n        #define __TBB_CPP17_DEDUCTION_GUIDES_PRESENT 0\n    #endif\n#elif __GNUC__\n    #define __TBB_CPP14_VARIABLE_TEMPLATES_PRESENT (__TBB_LANG >= 201402L && __TBB_GCC_VERSION >= 50000)\n    #define __TBB_CPP17_DEDUCTION_GUIDES_PRESENT   (__cpp_deduction_guides >= 201606L)\n#elif _MSC_VER\n    #define __TBB_CPP14_VARIABLE_TEMPLATES_PRESENT (_MSC_FULL_VER >= 190023918 && (!__INTEL_COMPILER || __INTEL_COMPILER >= 1700))\n    #define __TBB_CPP17_DEDUCTION_GUIDES_PRESENT   (_MSC_VER >= 1914 && __TBB_LANG >= 201703L && (!__INTEL_COMPILER || __INTEL_COMPILER > 2021))\n#else\n    #define __TBB_CPP14_VARIABLE_TEMPLATES_PRESENT (__TBB_LANG >= 201402L)\n    #define __TBB_CPP17_DEDUCTION_GUIDES_PRESENT   (__TBB_LANG >= 201703L)\n#endif\n\n// GCC4.8 on RHEL7 does not support std::get_new_handler\n#define __TBB_CPP11_GET_NEW_HANDLER_PRESENT             (_MSC_VER >= 1900 || __TBB_GLIBCXX_VERSION >= 40900 && __GXX_EXPERIMENTAL_CXX0X__ || _LIBCPP_VERSION)\n// GCC4.8 on RHEL7 does not support std::is_trivially_copyable\n#define __TBB_CPP11_TYPE_PROPERTIES_PRESENT             (_LIBCPP_VERSION || _MSC_VER >= 1700 || (__TBB_GLIBCXX_VERSION >= 50000 && __GXX_EXPERIMENTAL_CXX0X__))\n\n#define __TBB_CPP17_MEMORY_RESOURCE_PRESENT             (_MSC_VER >= 1913 && (__TBB_LANG > 201402L) || \\\n                                                        __TBB_GLIBCXX_VERSION >= 90000 && __TBB_LANG >= 201703L)\n#define __TBB_CPP17_HW_INTERFERENCE_SIZE_PRESENT        (_MSC_VER >= 1911)\n#define __TBB_CPP17_LOGICAL_OPERATIONS_PRESENT          (__TBB_LANG >= 201703L)\n#define __TBB_CPP17_ALLOCATOR_IS_ALWAYS_EQUAL_PRESENT   (__TBB_LANG >= 201703L)\n#define __TBB_CPP17_IS_SWAPPABLE_PRESENT                (__TBB_LANG >= 201703L)\n\n// TODO: fix concepts on Clang or define the broken versions\n#if !(__clang__) && defined(__cpp_concepts) && defined(__cpp_lib_concepts)\n    #define __TBB_CPP20_CONCEPTS_PRESENT ((__cpp_concepts >= 201907L) && (__cpp_lib_concepts >= 202002L))\n#else\n    #define __TBB_CPP20_CONCEPTS_PRESENT 0\n#endif\n\n#if defined(__cpp_impl_three_way_comparison) && defined(__cpp_lib_three_way_comparison)\n    #define __TBB_CPP20_COMPARISONS_PRESENT ((__cpp_impl_three_way_comparison >= 201907L) && (__cpp_lib_three_way_comparison >= 201907L))\n#else\n    #define __TBB_CPP20_COMPARISONS_PRESENT 0\n#endif\n\n#define __TBB_RESUMABLE_TASKS                           (!__TBB_WIN8UI_SUPPORT && !__ANDROID__ && !__QNXNTO__ && (!__linux__ || __GLIBC__))\n\n/* This macro marks incomplete code or comments describing ideas which are considered for the future.\n * See also for plain comment with TODO and FIXME marks for small improvement opportunities.\n */\n#define __TBB_TODO 0\n\n/* Check which standard library we use. */\n/* __TBB_SYMBOL is defined only while processing exported symbols list where C++ is not allowed. */\n#if !defined(__TBB_SYMBOL) && !__TBB_CONFIG_PREPROC_ONLY\n    #include <cstddef>\n#endif\n\n/** Target OS is either iOS* or iOS* simulator **/\n#if __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__\n    #define __TBB_IOS 1\n#endif\n\n#if __APPLE__\n    #if __INTEL_COMPILER && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1099 \\\n                         && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101000\n        // ICC does not correctly set the macro if -mmacosx-min-version is not specified\n        #define __TBB_MACOS_TARGET_VERSION  (100000 + 10*(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ - 1000))\n    #else\n        #define __TBB_MACOS_TARGET_VERSION  __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__\n    #endif\n#endif\n\n#if defined(__GNUC__) && !defined(__INTEL_COMPILER)\n    #define __TBB_GCC_WARNING_IGNORED_ATTRIBUTES_PRESENT (__TBB_GCC_VERSION >= 60100)\n#endif\n\n#if __GNUC__ && !__INTEL_COMPILER && !__clang__\n    #define __TBB_GCC_PARAMETER_PACK_IN_LAMBDAS_BROKEN (__TBB_GCC_VERSION <= 40805)\n#endif\n\n#define __TBB_CPP17_FALLTHROUGH_PRESENT (__TBB_LANG >= 201703L)\n#define __TBB_CPP17_NODISCARD_PRESENT   (__TBB_LANG >= 201703L)\n#define __TBB_FALLTHROUGH_PRESENT       (__TBB_GCC_VERSION >= 70000 && !__INTEL_COMPILER)\n\n#if __TBB_CPP17_FALLTHROUGH_PRESENT\n    #define __TBB_fallthrough [[fallthrough]]\n#elif __TBB_FALLTHROUGH_PRESENT\n    #define __TBB_fallthrough __attribute__ ((fallthrough))\n#else\n    #define __TBB_fallthrough\n#endif\n\n#if __TBB_CPP17_NODISCARD_PRESENT\n    #define __TBB_nodiscard [[nodiscard]]\n#elif __clang__ || __GNUC__\n    #define __TBB_nodiscard __attribute__((warn_unused_result))\n#else\n    #define __TBB_nodiscard\n#endif\n\n#define __TBB_CPP17_UNCAUGHT_EXCEPTIONS_PRESENT             (_MSC_VER >= 1900 || __GLIBCXX__ && __cpp_lib_uncaught_exceptions \\\n                                                            || _LIBCPP_VERSION >= 3700 && (!__TBB_MACOS_TARGET_VERSION || __TBB_MACOS_TARGET_VERSION >= 101200))\n\n#define __TBB_TSX_INTRINSICS_PRESENT (__RTM__ || __INTEL_COMPILER || (_MSC_VER>=1700 && (__TBB_x86_64 || __TBB_x86_32)))\n\n#define __TBB_WAITPKG_INTRINSICS_PRESENT ((__INTEL_COMPILER >= 1900 || (__TBB_GCC_VERSION >= 110000 && __TBB_GNU_ASM_VERSION >= 2032) || __TBB_CLANG_VERSION >= 120000) \\\n                                         && (_WIN32 || _WIN64 || __unix__ || __APPLE__) && (__TBB_x86_32 || __TBB_x86_64) && !__ANDROID__)\n\n/** Internal TBB features & modes **/\n\n/** __TBB_SOURCE_DIRECTLY_INCLUDED is a mode used in whitebox testing when\n    it's necessary to test internal functions not exported from TBB DLLs\n**/\n#if (_WIN32||_WIN64) && (__TBB_SOURCE_DIRECTLY_INCLUDED || TBB_USE_PREVIEW_BINARY)\n    #define __TBB_NO_IMPLICIT_LINKAGE 1\n    #define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1\n#endif\n\n#if (__TBB_BUILD || __TBBMALLOC_BUILD || __TBBMALLOCPROXY_BUILD || __TBBBIND_BUILD) && !defined(__TBB_NO_IMPLICIT_LINKAGE)\n    #define __TBB_NO_IMPLICIT_LINKAGE 1\n#endif\n\n#if _MSC_VER\n    #if !__TBB_NO_IMPLICIT_LINKAGE\n        #ifdef _DEBUG\n            #pragma comment(lib, \"tbb12_debug.lib\")\n        #else\n            #pragma comment(lib, \"tbb12.lib\")\n        #endif\n    #endif\n#endif\n\n#ifndef __TBB_SCHEDULER_OBSERVER\n    #define __TBB_SCHEDULER_OBSERVER 1\n#endif /* __TBB_SCHEDULER_OBSERVER */\n\n#ifndef __TBB_FP_CONTEXT\n    #define __TBB_FP_CONTEXT 1\n#endif /* __TBB_FP_CONTEXT */\n\n#define __TBB_RECYCLE_TO_ENQUEUE __TBB_BUILD // keep non-official\n\n#ifndef __TBB_ARENA_OBSERVER\n    #define __TBB_ARENA_OBSERVER __TBB_SCHEDULER_OBSERVER\n#endif /* __TBB_ARENA_OBSERVER */\n\n#ifndef __TBB_ARENA_BINDING\n    #define __TBB_ARENA_BINDING 1\n#endif\n\n// Thread pinning is not available on macOS*\n#define __TBB_CPUBIND_PRESENT (__TBB_ARENA_BINDING && !__APPLE__)\n\n#ifndef __TBB_ENQUEUE_ENFORCED_CONCURRENCY\n    #define __TBB_ENQUEUE_ENFORCED_CONCURRENCY 1\n#endif\n\n#if !defined(__TBB_SURVIVE_THREAD_SWITCH) && \\\n          (_WIN32 || _WIN64 || __APPLE__ || (defined(__unix__) && !__ANDROID__))\n    #define __TBB_SURVIVE_THREAD_SWITCH 1\n#endif /* __TBB_SURVIVE_THREAD_SWITCH */\n\n#ifndef TBB_PREVIEW_FLOW_GRAPH_FEATURES\n    #define TBB_PREVIEW_FLOW_GRAPH_FEATURES __TBB_CPF_BUILD\n#endif\n\n#ifndef __TBB_DEFAULT_PARTITIONER\n    #define __TBB_DEFAULT_PARTITIONER tbb::auto_partitioner\n#endif\n\n#ifndef __TBB_FLOW_TRACE_CODEPTR\n    #define __TBB_FLOW_TRACE_CODEPTR __TBB_CPF_BUILD\n#endif\n\n// Intel(R) C++ Compiler starts analyzing usages of the deprecated content at the template\n// instantiation site, which is too late for suppression of the corresponding messages for internal\n// stuff.\n#if !defined(__INTEL_COMPILER) && (!defined(TBB_SUPPRESS_DEPRECATED_MESSAGES) || (TBB_SUPPRESS_DEPRECATED_MESSAGES == 0))\n    #if (__TBB_LANG >= 201402L && (!defined(_MSC_VER) || _MSC_VER >= 1920))\n        #define __TBB_DEPRECATED [[deprecated]]\n        #define __TBB_DEPRECATED_MSG(msg) [[deprecated(msg)]]\n    #elif _MSC_VER\n        #define __TBB_DEPRECATED __declspec(deprecated)\n        #define __TBB_DEPRECATED_MSG(msg) __declspec(deprecated(msg))\n    #elif (__GNUC__ && __TBB_GCC_VERSION >= 40805) || __clang__\n        #define __TBB_DEPRECATED __attribute__((deprecated))\n        #define __TBB_DEPRECATED_MSG(msg) __attribute__((deprecated(msg)))\n    #endif\n#endif  // !defined(TBB_SUPPRESS_DEPRECATED_MESSAGES) || (TBB_SUPPRESS_DEPRECATED_MESSAGES == 0)\n\n#if !defined(__TBB_DEPRECATED)\n    #define __TBB_DEPRECATED\n    #define __TBB_DEPRECATED_MSG(msg)\n#elif !defined(__TBB_SUPPRESS_INTERNAL_DEPRECATED_MESSAGES)\n    // Suppress deprecated messages from self\n    #define __TBB_SUPPRESS_INTERNAL_DEPRECATED_MESSAGES 1\n#endif\n\n#if defined(TBB_SUPPRESS_DEPRECATED_MESSAGES) && (TBB_SUPPRESS_DEPRECATED_MESSAGES == 0)\n    #define __TBB_DEPRECATED_VERBOSE __TBB_DEPRECATED\n    #define __TBB_DEPRECATED_VERBOSE_MSG(msg) __TBB_DEPRECATED_MSG(msg)\n#else\n    #define __TBB_DEPRECATED_VERBOSE\n    #define __TBB_DEPRECATED_VERBOSE_MSG(msg)\n#endif // (TBB_SUPPRESS_DEPRECATED_MESSAGES == 0)\n\n#if (!defined(TBB_SUPPRESS_DEPRECATED_MESSAGES) || (TBB_SUPPRESS_DEPRECATED_MESSAGES == 0)) && !(__TBB_LANG >= 201103L || _MSC_VER >= 1900)\n    #pragma message(\"TBB Warning: Support for C++98/03 is deprecated. Please use the compiler that supports C++11 features at least.\")\n#endif\n\n#ifdef _VARIADIC_MAX\n    #define __TBB_VARIADIC_MAX _VARIADIC_MAX\n#else\n    #if _MSC_VER == 1700\n        #define __TBB_VARIADIC_MAX 5 // VS11 setting, issue resolved in VS12\n    #elif _MSC_VER == 1600\n        #define __TBB_VARIADIC_MAX 10 // VS10 setting\n    #else\n        #define __TBB_VARIADIC_MAX 15\n    #endif\n#endif\n\n#if __SANITIZE_THREAD__\n    #define __TBB_USE_THREAD_SANITIZER 1\n#elif defined(__has_feature)\n#if __has_feature(thread_sanitizer)\n    #define __TBB_USE_THREAD_SANITIZER 1\n#endif\n#endif\n\n#ifndef __TBB_USE_SANITIZERS\n#define __TBB_USE_SANITIZERS (__TBB_USE_THREAD_SANITIZER || __TBB_USE_ADDRESS_SANITIZER)\n#endif\n\n#ifndef __TBB_RESUMABLE_TASKS_USE_THREADS\n#define __TBB_RESUMABLE_TASKS_USE_THREADS __TBB_USE_SANITIZERS\n#endif\n\n#ifndef __TBB_USE_CONSTRAINTS\n#define __TBB_USE_CONSTRAINTS 1\n#endif\n\n#ifndef __TBB_STRICT_CONSTRAINTS\n#define __TBB_STRICT_CONSTRAINTS 1\n#endif\n\n#if __TBB_CPP20_CONCEPTS_PRESENT && __TBB_USE_CONSTRAINTS\n    #define __TBB_requires(...) requires __VA_ARGS__\n#else // __TBB_CPP20_CONCEPTS_PRESENT\n    #define __TBB_requires(...)\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n\n/** Macros of the form __TBB_XXX_BROKEN denote known issues that are caused by\n    the bugs in compilers, standard or OS specific libraries. They should be\n    removed as soon as the corresponding bugs are fixed or the buggy OS/compiler\n    versions go out of the support list.\n**/\n\n// Some STL containers not support allocator traits in old GCC versions\n#if __GXX_EXPERIMENTAL_CXX0X__ && __TBB_GLIBCXX_VERSION <= 50301\n    #define TBB_ALLOCATOR_TRAITS_BROKEN 1\n#endif\n\n// GCC 4.8 C++ standard library implements std::this_thread::yield as no-op.\n#if __TBB_GLIBCXX_VERSION >= 40800 && __TBB_GLIBCXX_VERSION < 40900\n    #define __TBB_GLIBCXX_THIS_THREAD_YIELD_BROKEN 1\n#endif\n\n/** End of __TBB_XXX_BROKEN macro section **/\n\n#if defined(_MSC_VER) && _MSC_VER>=1500 && !defined(__INTEL_COMPILER)\n    // A macro to suppress erroneous or benign \"unreachable code\" MSVC warning (4702)\n    #define __TBB_MSVC_UNREACHABLE_CODE_IGNORED 1\n#endif\n\n// Many OS versions (Android 4.0.[0-3] for example) need workaround for dlopen to avoid non-recursive loader lock hang\n// Setting the workaround for all compile targets ($APP_PLATFORM) below Android 4.4 (android-19)\n#if __ANDROID__\n    #include <android/api-level.h>\n#endif\n\n#define __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING (TBB_PREVIEW_FLOW_GRAPH_FEATURES)\n\n#ifndef __TBB_PREVIEW_CRITICAL_TASKS\n#define __TBB_PREVIEW_CRITICAL_TASKS            1\n#endif\n\n#ifndef __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n#define __TBB_PREVIEW_FLOW_GRAPH_NODE_SET       (TBB_PREVIEW_FLOW_GRAPH_FEATURES)\n#endif\n\n#ifndef __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n#define __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT (TBB_PREVIEW_FLOW_GRAPH_FEATURES \\\n                                                   || TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT)\n#endif\n\n#if TBB_PREVIEW_CONCURRENT_HASH_MAP_EXTENSIONS\n#define __TBB_PREVIEW_CONCURRENT_HASH_MAP_EXTENSIONS 1\n#endif\n\n#if TBB_PREVIEW_TASK_GROUP_EXTENSIONS || __TBB_BUILD\n#define __TBB_PREVIEW_TASK_GROUP_EXTENSIONS 1\n#endif\n\n#if TBB_PREVIEW_PARALLEL_PHASE || __TBB_BUILD\n#define __TBB_PREVIEW_PARALLEL_PHASE 1\n#endif\n\n#if TBB_PREVIEW_BLOCKED_ND_RANGE_DEDUCTION_GUIDES\n#define __TBB_PREVIEW_BLOCKED_ND_RANGE_DEDUCTION_GUIDES 1\n#endif\n\n#endif // __TBB_detail__config_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_containers_helpers.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_detail__containers_helpers_H\n#define __TBB_detail__containers_helpers_H\n\n#include \"_template_helpers.h\"\n#include \"_allocator_traits.h\"\n#include <type_traits>\n#include <memory>\n#include <functional>\n\nnamespace tbb {\nnamespace detail {\ninline namespace d0 {\n\ntemplate <typename Compare, typename = void>\nstruct comp_is_transparent : std::false_type {};\n\ntemplate <typename Compare>\nstruct comp_is_transparent<Compare, tbb::detail::void_t<typename Compare::is_transparent>> : std::true_type {};\n\ntemplate <typename Key, typename Hasher, typename KeyEqual, typename = void >\nstruct has_transparent_key_equal : std::false_type { using type = KeyEqual; };\n\ntemplate <typename Key, typename Hasher, typename KeyEqual>\nstruct has_transparent_key_equal<Key, Hasher, KeyEqual, tbb::detail::void_t<typename Hasher::transparent_key_equal>> : std::true_type {\n    using type = typename Hasher::transparent_key_equal;\n    static_assert(comp_is_transparent<type>::value, \"Hash::transparent_key_equal::is_transparent is not valid or does not denote a type.\");\n    static_assert((std::is_same<KeyEqual, std::equal_to<Key>>::value ||\n        std::is_same<typename Hasher::transparent_key_equal, KeyEqual>::value), \"KeyEqual is a different type than equal_to<Key> or Hash::transparent_key_equal.\");\n };\n\nstruct is_iterator_impl {\ntemplate <typename T>\nusing iter_traits_category = typename std::iterator_traits<T>::iterator_category;\n\ntemplate <typename T>\nusing input_iter_category = typename std::enable_if<std::is_base_of<std::input_iterator_tag, iter_traits_category<T>>::value>::type;\n}; // struct is_iterator_impl\n\ntemplate <typename T>\nusing is_input_iterator = supports<T, is_iterator_impl::iter_traits_category, is_iterator_impl::input_iter_category>;\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\ntemplate <typename T>\ninline constexpr bool is_input_iterator_v = is_input_iterator<T>::value;\n#endif\n\n} // inline namespace d0\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_detail__containers_helpers_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_exception.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB__exception_H\n#define __TBB__exception_H\n\n#include \"_config.h\"\n\n#include <new>          // std::bad_alloc\n#include <exception>    // std::exception\n#include <stdexcept>    // std::runtime_error\n\nnamespace tbb {\nnamespace detail {\ninline namespace d0 {\nenum class exception_id {\n    bad_alloc = 1,\n    bad_last_alloc,\n    user_abort,\n    nonpositive_step,\n    out_of_range,\n    reservation_length_error,\n    missing_wait,\n    invalid_load_factor,\n    invalid_key,\n    bad_tagged_msg_cast,\n    unsafe_wait,\n    last_entry\n};\n} // namespace d0\n\n#if _MSC_VER\n    #pragma warning(disable: 4275)\n#endif\n\nnamespace r1 {\n//! Exception for concurrent containers\nclass TBB_EXPORT bad_last_alloc : public std::bad_alloc {\npublic:\n    const char* __TBB_EXPORTED_METHOD what() const noexcept(true) override;\n};\n\n//! Exception for user-initiated abort\nclass TBB_EXPORT user_abort : public std::exception {\npublic:\n    const char* __TBB_EXPORTED_METHOD what() const noexcept(true) override;\n};\n\n//! Exception for missing wait on structured_task_group\nclass TBB_EXPORT missing_wait : public std::exception {\npublic:\n    const char* __TBB_EXPORTED_METHOD what() const noexcept(true) override;\n};\n\n//! Exception for impossible finalization of task_sheduler_handle\n#if __APPLE__\n    #pragma GCC visibility push(default)\n#endif\nclass TBB_EXPORT unsafe_wait : public std::runtime_error {\npublic:\n    unsafe_wait(const char* msg) : std::runtime_error(msg) {}\n};\n#if __APPLE__\n    #pragma GCC visibility pop\n#endif\n\n//! Gathers all throw operators in one place.\n/** Its purpose is to minimize code bloat that can be caused by throw operators\n    scattered in multiple places, especially in templates. **/\nTBB_EXPORT void __TBB_EXPORTED_FUNC throw_exception ( exception_id );\n} // namespace r1\n\ninline namespace d0 {\nusing r1::throw_exception;\n} // namespace d0\n\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB__exception_H\n\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_export.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_detail__export_H\n#define __TBB_detail__export_H\n\n#if defined(__MINGW32__)\n    #define __TBB_EXPORT __declspec(dllexport)\n#elif defined(_WIN32) // Use .def files for these\n    #define __TBB_EXPORT\n#elif defined(__unix__) || defined(__APPLE__) // Use .def files for these\n    #define __TBB_EXPORT __attribute__ ((visibility (\"default\")))\n#else\n    #error \"Unknown platform/compiler\"\n#endif\n\n#if __TBB_BUILD\n    #define TBB_EXPORT __TBB_EXPORT\n#else\n    #define TBB_EXPORT\n#endif\n\n#if __TBBMALLOC_BUILD\n    #define TBBMALLOC_EXPORT __TBB_EXPORT\n#else\n    #define TBBMALLOC_EXPORT\n#endif\n\n#if __TBBMALLOCPROXY_BUILD\n    #define TBBMALLOCPROXY_EXPORT __TBB_EXPORT\n#else\n    #define TBBMALLOCPROXY_EXPORT\n#endif\n\n#if __TBBBIND_BUILD\n    #define TBBBIND_EXPORT __TBB_EXPORT\n#else\n    #define TBBBIND_EXPORT\n#endif\n\n#endif\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_flow_graph_body_impl.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB__flow_graph_body_impl_H\n#define __TBB__flow_graph_body_impl_H\n\n#ifndef __TBB_flow_graph_H\n#error Do not #include this internal file directly; use public TBB headers instead.\n#endif\n\n// included in namespace tbb::detail::d2 (in flow_graph.h)\n\ntypedef std::uint64_t tag_value;\n\n\n// TODO revamp: find out if there is already helper for has_policy.\ntemplate<typename ... Policies> struct Policy {};\n\ntemplate<typename ... Policies> struct has_policy;\n\ntemplate<typename ExpectedPolicy, typename FirstPolicy, typename ...Policies>\nstruct has_policy<ExpectedPolicy, FirstPolicy, Policies...> :\n    std::integral_constant<bool, has_policy<ExpectedPolicy, FirstPolicy>::value ||\n                                 has_policy<ExpectedPolicy, Policies...>::value> {};\n\ntemplate<typename ExpectedPolicy, typename SinglePolicy>\nstruct has_policy<ExpectedPolicy, SinglePolicy> :\n    std::integral_constant<bool, std::is_same<ExpectedPolicy, SinglePolicy>::value> {};\n\ntemplate<typename ExpectedPolicy, typename ...Policies>\nstruct has_policy<ExpectedPolicy, Policy<Policies...> > : has_policy<ExpectedPolicy, Policies...> {};\n\nnamespace graph_policy_namespace {\n\n    struct rejecting { };\n    struct reserving { };\n    struct queueing  { };\n    struct lightweight  { };\n\n    // K == type of field used for key-matching.  Each tag-matching port will be provided\n    // functor that, given an object accepted by the port, will return the\n    /// field of type K being used for matching.\n    template<typename K, typename KHash=d1::tbb_hash_compare<typename std::decay<K>::type > >\n        __TBB_requires(tbb::detail::hash_compare<KHash, K>)\n    struct key_matching {\n        typedef K key_type;\n        typedef typename std::decay<K>::type base_key_type;\n        typedef KHash hash_compare_type;\n    };\n\n    // old tag_matching join's new specifier\n    typedef key_matching<tag_value> tag_matching;\n\n    // Aliases for Policy combinations\n    typedef Policy<queueing, lightweight> queueing_lightweight;\n    typedef Policy<rejecting, lightweight> rejecting_lightweight;\n\n} // namespace graph_policy_namespace\n\n// -------------- function_body containers ----------------------\n\n//! A functor that takes no input and generates a value of type Output\ntemplate< typename Output >\nclass input_body : no_assign {\npublic:\n    virtual ~input_body() {}\n    virtual Output operator()(d1::flow_control& fc) = 0;\n    virtual input_body* clone() = 0;\n};\n\n//! The leaf for input_body\ntemplate< typename Output, typename Body>\nclass input_body_leaf : public input_body<Output> {\npublic:\n    input_body_leaf( const Body &_body ) : body(_body) { }\n    Output operator()(d1::flow_control& fc) override { return body(fc); }\n    input_body_leaf* clone() override {\n        return new input_body_leaf< Output, Body >(body);\n    }\n    Body get_body() { return body; }\nprivate:\n    Body body;\n};\n\n//! A functor that takes an Input and generates an Output\ntemplate< typename Input, typename Output >\nclass function_body : no_assign {\npublic:\n    virtual ~function_body() {}\n    virtual Output operator()(const Input &input) = 0;\n    virtual function_body* clone() = 0;\n};\n\n//! the leaf for function_body\ntemplate <typename Input, typename Output, typename B>\nclass function_body_leaf : public function_body< Input, Output > {\npublic:\n    function_body_leaf( const B &_body ) : body(_body) { }\n    Output operator()(const Input &i) override { return tbb::detail::invoke(body,i); }\n    B get_body() { return body; }\n    function_body_leaf* clone() override {\n        return new function_body_leaf< Input, Output, B >(body);\n    }\nprivate:\n    B body;\n};\n\n//! the leaf for function_body specialized for Input and output of continue_msg\ntemplate <typename B>\nclass function_body_leaf< continue_msg, continue_msg, B> : public function_body< continue_msg, continue_msg > {\npublic:\n    function_body_leaf( const B &_body ) : body(_body) { }\n    continue_msg operator()( const continue_msg &i ) override {\n        body(i);\n        return i;\n    }\n    B get_body() { return body; }\n    function_body_leaf* clone() override {\n        return new function_body_leaf< continue_msg, continue_msg, B >(body);\n    }\nprivate:\n    B body;\n};\n\n//! the leaf for function_body specialized for Output of continue_msg\ntemplate <typename Input, typename B>\nclass function_body_leaf< Input, continue_msg, B> : public function_body< Input, continue_msg > {\npublic:\n    function_body_leaf( const B &_body ) : body(_body) { }\n    continue_msg operator()(const Input &i) override {\n        body(i);\n        return continue_msg();\n    }\n    B get_body() { return body; }\n    function_body_leaf* clone() override {\n        return new function_body_leaf< Input, continue_msg, B >(body);\n    }\nprivate:\n    B body;\n};\n\n//! the leaf for function_body specialized for Input of continue_msg\ntemplate <typename Output, typename B>\nclass function_body_leaf< continue_msg, Output, B > : public function_body< continue_msg, Output > {\npublic:\n    function_body_leaf( const B &_body ) : body(_body) { }\n    Output operator()(const continue_msg &i) override {\n        return body(i);\n    }\n    B get_body() { return body; }\n    function_body_leaf* clone() override {\n        return new function_body_leaf< continue_msg, Output, B >(body);\n    }\nprivate:\n    B body;\n};\n\n//! function_body that takes an Input and a set of output ports\ntemplate<typename Input, typename OutputSet>\nclass multifunction_body : no_assign {\npublic:\n    virtual ~multifunction_body () {}\n    virtual void operator()(const Input &/* input*/, OutputSet &/*oset*/) = 0;\n    virtual multifunction_body* clone() = 0;\n    virtual void* get_body_ptr() = 0;\n};\n\n//! leaf for multifunction.  OutputSet can be a std::tuple or a vector.\ntemplate<typename Input, typename OutputSet, typename B >\nclass multifunction_body_leaf : public multifunction_body<Input, OutputSet> {\npublic:\n    multifunction_body_leaf(const B &_body) : body(_body) { }\n    void operator()(const Input &input, OutputSet &oset) override {\n        tbb::detail::invoke(body, input, oset); // body may explicitly put() to one or more of oset.\n    }\n    void* get_body_ptr() override { return &body; }\n    multifunction_body_leaf* clone() override {\n        return new multifunction_body_leaf<Input, OutputSet,B>(body);\n    }\n\nprivate:\n    B body;\n};\n\n// ------ function bodies for hash_buffers and key-matching joins.\n\ntemplate<typename Input, typename Output>\nclass type_to_key_function_body : no_assign {\n    public:\n        virtual ~type_to_key_function_body() {}\n        virtual Output operator()(const Input &input) = 0;  // returns an Output\n        virtual type_to_key_function_body* clone() = 0;\n};\n\n// specialization for ref output\ntemplate<typename Input, typename Output>\nclass type_to_key_function_body<Input,Output&> : no_assign {\n    public:\n        virtual ~type_to_key_function_body() {}\n        virtual const Output & operator()(const Input &input) = 0;  // returns a const Output&\n        virtual type_to_key_function_body* clone() = 0;\n};\n\ntemplate <typename Input, typename Output, typename B>\nclass type_to_key_function_body_leaf : public type_to_key_function_body<Input, Output> {\npublic:\n    type_to_key_function_body_leaf( const B &_body ) : body(_body) { }\n    Output operator()(const Input &i) override { return tbb::detail::invoke(body, i); }\n    type_to_key_function_body_leaf* clone() override {\n        return new type_to_key_function_body_leaf< Input, Output, B>(body);\n    }\nprivate:\n    B body;\n};\n\ntemplate <typename Input, typename Output, typename B>\nclass type_to_key_function_body_leaf<Input,Output&,B> : public type_to_key_function_body< Input, Output&> {\npublic:\n    type_to_key_function_body_leaf( const B &_body ) : body(_body) { }\n    const Output& operator()(const Input &i) override {\n        return tbb::detail::invoke(body, i);\n    }\n    type_to_key_function_body_leaf* clone() override {\n        return new type_to_key_function_body_leaf< Input, Output&, B>(body);\n    }\nprivate:\n    B body;\n};\n\n// --------------------------- end of function_body containers ------------------------\n\n// --------------------------- node task bodies ---------------------------------------\n\n//! A task that calls a node's forward_task function\ntemplate< typename NodeType >\nclass forward_task_bypass : public graph_task {\n    NodeType &my_node;\npublic:\n    forward_task_bypass( graph& g, d1::small_object_allocator& allocator, NodeType &n\n                         , node_priority_t node_priority = no_priority\n    ) : graph_task(g, allocator, node_priority),\n    my_node(n) {}\n\n    d1::task* execute(d1::execution_data& ed) override {\n        graph_task* next_task = my_node.forward_task();\n        if (SUCCESSFULLY_ENQUEUED == next_task)\n            next_task = nullptr;\n        else if (next_task)\n            next_task = prioritize_task(my_node.graph_reference(), *next_task);\n        finalize<forward_task_bypass>(ed);\n        return next_task;\n    }\n\n    d1::task* cancel(d1::execution_data& ed) override {\n        finalize<forward_task_bypass>(ed);\n        return nullptr;\n    }\n};\n\n//! A task that calls a node's apply_body_bypass function, passing in an input of type Input\n//  return the task* unless it is SUCCESSFULLY_ENQUEUED, in which case return nullptr\ntemplate< typename NodeType, typename Input, typename BaseTaskType = graph_task>\nclass apply_body_task_bypass\n    : public BaseTaskType\n{\n    NodeType &my_node;\n    Input my_input;\n\n    using check_metainfo = std::is_same<BaseTaskType, graph_task>;\n    using without_metainfo = std::true_type;\n    using with_metainfo = std::false_type;\n\n    graph_task* call_apply_body_bypass_impl(without_metainfo) {\n        return my_node.apply_body_bypass(my_input\n                                         __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo{}));\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    graph_task* call_apply_body_bypass_impl(with_metainfo) {\n        return my_node.apply_body_bypass(my_input, message_metainfo{this->get_msg_wait_context_vertices()});\n    }\n#endif\n\n    graph_task* call_apply_body_bypass() {\n        return call_apply_body_bypass_impl(check_metainfo{});\n    }\n\npublic:\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    template <typename Metainfo>\n    apply_body_task_bypass( graph& g, d1::small_object_allocator& allocator, NodeType &n, const Input &i,\n                            node_priority_t node_priority, Metainfo&& metainfo )\n        : BaseTaskType(g, allocator, node_priority, std::forward<Metainfo>(metainfo).waiters())\n        , my_node(n), my_input(i) {}\n#endif\n\n    apply_body_task_bypass( graph& g, d1::small_object_allocator& allocator, NodeType& n, const Input& i,\n                            node_priority_t node_priority = no_priority )\n        : BaseTaskType(g, allocator, node_priority), my_node(n), my_input(i) {}\n\n    d1::task* execute(d1::execution_data& ed) override {\n        graph_task* next_task = call_apply_body_bypass();\n        if (SUCCESSFULLY_ENQUEUED == next_task)\n            next_task = nullptr;\n        else if (next_task)\n            next_task = prioritize_task(my_node.graph_reference(), *next_task);\n        BaseTaskType::template finalize<apply_body_task_bypass>(ed);\n        return next_task;\n    }\n\n    d1::task* cancel(d1::execution_data& ed) override {\n        BaseTaskType::template finalize<apply_body_task_bypass>(ed);\n        return nullptr;\n    }\n};\n\n//! A task that calls a node's apply_body_bypass function with no input\ntemplate< typename NodeType >\nclass input_node_task_bypass : public graph_task {\n    NodeType &my_node;\npublic:\n    input_node_task_bypass( graph& g, d1::small_object_allocator& allocator, NodeType &n )\n        : graph_task(g, allocator), my_node(n) {}\n\n    d1::task* execute(d1::execution_data& ed) override {\n        graph_task* next_task = my_node.apply_body_bypass( );\n        if (SUCCESSFULLY_ENQUEUED == next_task)\n            next_task = nullptr;\n        else if (next_task)\n            next_task = prioritize_task(my_node.graph_reference(), *next_task);\n        finalize<input_node_task_bypass>(ed);\n        return next_task;\n    }\n\n    d1::task* cancel(d1::execution_data& ed) override {\n        finalize<input_node_task_bypass>(ed);\n        return nullptr;\n    }\n};\n\n// ------------------------ end of node task bodies -----------------------------------\n\ntemplate<typename T, typename DecrementType, typename DummyType = void>\nclass threshold_regulator;\n\ntemplate<typename T, typename DecrementType>\nclass threshold_regulator<T, DecrementType,\n                  typename std::enable_if<std::is_integral<DecrementType>::value>::type>\n    : public receiver<DecrementType>, no_copy\n{\n    T* my_node;\nprotected:\n\n    graph_task* try_put_task( const DecrementType& value ) override {\n        graph_task* result = my_node->decrement_counter( value );\n        if( !result )\n            result = SUCCESSFULLY_ENQUEUED;\n        return result;\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    // Intentionally ignore the metainformation\n    // If there are more items associated with passed metainfo to be processed\n    // They should be stored in the buffer before the limiter_node\n    graph_task* try_put_task(const DecrementType& value, const message_metainfo&) override {\n        return try_put_task(value);\n    }\n#endif\n\n    graph& graph_reference() const override {\n        return my_node->my_graph;\n    }\n\n    template<typename U, typename V> friend class limiter_node;\n    void reset_receiver( reset_flags ) {}\n\npublic:\n    threshold_regulator(T* owner) : my_node(owner) {\n        // Do not work with the passed pointer here as it may not be fully initialized yet\n    }\n};\n\ntemplate<typename T>\nclass threshold_regulator<T, continue_msg, void> : public continue_receiver, no_copy {\n\n    T *my_node;\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    // Intentionally ignore the metainformation\n    // If there are more items associated with passed metainfo to be processed\n    // They should be stored in the buffer before the limiter_node\n    graph_task* execute(const message_metainfo&) override {\n#else\n    graph_task* execute() override {\n#endif\n        return my_node->decrement_counter( 1 );\n    }\n\nprotected:\n\n    graph& graph_reference() const override {\n        return my_node->my_graph;\n    }\n\npublic:\n\n    typedef continue_msg input_type;\n    typedef continue_msg output_type;\n    threshold_regulator(T* owner)\n        : continue_receiver( /*number_of_predecessors=*/0, no_priority ), my_node(owner)\n    {\n        // Do not work with the passed pointer here as it may not be fully initialized yet\n    }\n};\n\n#endif // __TBB__flow_graph_body_impl_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_flow_graph_cache_impl.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB__flow_graph_cache_impl_H\n#define __TBB__flow_graph_cache_impl_H\n\n#ifndef __TBB_flow_graph_H\n#error Do not #include this internal file directly; use public TBB headers instead.\n#endif\n\n// included in namespace tbb::detail::d2 (in flow_graph.h)\n\n//! A node_cache maintains a std::queue of elements of type T.  Each operation is protected by a lock.\ntemplate< typename T, typename M=spin_mutex >\nclass node_cache {\n    public:\n\n    typedef size_t size_type;\n\n    bool empty() {\n        typename mutex_type::scoped_lock lock( my_mutex );\n        return internal_empty();\n    }\n\n    void add( T &n ) {\n        typename mutex_type::scoped_lock lock( my_mutex );\n        internal_push(n);\n    }\n\n    void remove( T &n ) {\n        typename mutex_type::scoped_lock lock( my_mutex );\n        for ( size_t i = internal_size(); i != 0; --i ) {\n            T &s = internal_pop();\n            if ( &s == &n )\n                break;  // only remove one predecessor per request\n            internal_push(s);\n        }\n    }\n\n    void clear() {\n        while( !my_q.empty()) (void)my_q.pop();\n    }\n\nprotected:\n\n    typedef M mutex_type;\n    mutex_type my_mutex;\n    std::queue< T * > my_q;\n\n    // Assumes lock is held\n    inline bool internal_empty( )  {\n        return my_q.empty();\n    }\n\n    // Assumes lock is held\n    inline size_type internal_size( )  {\n        return my_q.size();\n    }\n\n    // Assumes lock is held\n    inline void internal_push( T &n )  {\n        my_q.push(&n);\n    }\n\n    // Assumes lock is held\n    inline T &internal_pop() {\n        T *v = my_q.front();\n        my_q.pop();\n        return *v;\n    }\n\n};\n\n//! A cache of predecessors that only supports try_get\ntemplate< typename T, typename M=spin_mutex >\nclass predecessor_cache : public node_cache< sender<T>, M > {\npublic:\n    typedef M mutex_type;\n    typedef T output_type;\n    typedef sender<output_type> predecessor_type;\n    typedef receiver<output_type> successor_type;\n\n    predecessor_cache( successor_type* owner ) : my_owner( owner ) {\n        __TBB_ASSERT( my_owner, \"predecessor_cache should have an owner.\" );\n        // Do not work with the passed pointer here as it may not be fully initialized yet\n    }\n\nprivate:\n    bool get_item_impl( output_type& v\n                        __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo* metainfo_ptr = nullptr) )\n    {\n\n        bool successful_get = false;\n\n        do {\n            predecessor_type *src;\n            {\n                typename mutex_type::scoped_lock lock(this->my_mutex);\n                if ( this->internal_empty() ) {\n                    break;\n                }\n                src = &this->internal_pop();\n            }\n\n            // Try to get from this sender\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            if (metainfo_ptr) {\n                successful_get = src->try_get( v, *metainfo_ptr );\n            } else\n#endif\n            {\n                successful_get = src->try_get( v );\n            }\n\n            if (successful_get == false) {\n                // Relinquish ownership of the edge\n                register_successor(*src, *my_owner);\n            } else {\n                // Retain ownership of the edge\n                this->add(*src);\n            }\n        } while ( successful_get == false );\n        return successful_get;\n    }\npublic:\n    bool get_item( output_type& v ) {\n        return get_item_impl(v);\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    bool get_item( output_type& v, message_metainfo& metainfo ) {\n        return get_item_impl(v, &metainfo);\n    }\n#endif\n\n    // If we are removing arcs (rf_clear_edges), call clear() rather than reset().\n    void reset() {\n        for(;;) {\n            predecessor_type *src;\n            {\n                if (this->internal_empty()) break;\n                src = &this->internal_pop();\n            }\n            register_successor(*src, *my_owner);\n        }\n    }\n\nprotected:\n    successor_type* my_owner;\n};\n\n//! An cache of predecessors that supports requests and reservations\ntemplate< typename T, typename M=spin_mutex >\nclass reservable_predecessor_cache : public predecessor_cache< T, M > {\npublic:\n    typedef M mutex_type;\n    typedef T output_type;\n    typedef sender<T> predecessor_type;\n    typedef receiver<T> successor_type;\n\n    reservable_predecessor_cache( successor_type* owner )\n        : predecessor_cache<T,M>(owner), reserved_src(nullptr)\n    {\n        // Do not work with the passed pointer here as it may not be fully initialized yet\n    }\n\nprivate:\n    bool try_reserve_impl( output_type &v __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo* metainfo) ) {\n        bool successful_reserve = false;\n\n        do {\n            predecessor_type* pred = nullptr;\n            {\n                typename mutex_type::scoped_lock lock(this->my_mutex);\n                if ( reserved_src.load(std::memory_order_relaxed) || this->internal_empty() )\n                    return false;\n\n                pred = &this->internal_pop();\n                reserved_src.store(pred, std::memory_order_relaxed);\n            }\n\n            // Try to get from this sender\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            if (metainfo) {\n                successful_reserve = pred->try_reserve( v, *metainfo );\n            } else\n#endif\n            {\n                successful_reserve = pred->try_reserve( v );\n            }\n\n            if (successful_reserve == false) {\n                typename mutex_type::scoped_lock lock(this->my_mutex);\n                // Relinquish ownership of the edge\n                register_successor( *pred, *this->my_owner );\n                reserved_src.store(nullptr, std::memory_order_relaxed);\n            } else {\n                // Retain ownership of the edge\n                this->add( *pred);\n            }\n        } while ( successful_reserve == false );\n\n        return successful_reserve;\n    }\npublic:\n    bool try_reserve( output_type& v ) {\n        return try_reserve_impl(v __TBB_FLOW_GRAPH_METAINFO_ARG(nullptr));\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    bool try_reserve( output_type& v, message_metainfo& metainfo ) {\n        return try_reserve_impl(v, &metainfo);\n    }\n#endif\n\n    bool try_release() {\n        reserved_src.load(std::memory_order_relaxed)->try_release();\n        reserved_src.store(nullptr, std::memory_order_relaxed);\n        return true;\n    }\n\n    bool try_consume() {\n        reserved_src.load(std::memory_order_relaxed)->try_consume();\n        reserved_src.store(nullptr, std::memory_order_relaxed);\n        return true;\n    }\n\n    void reset() {\n        reserved_src.store(nullptr, std::memory_order_relaxed);\n        predecessor_cache<T, M>::reset();\n    }\n\n    void clear() {\n        reserved_src.store(nullptr, std::memory_order_relaxed);\n        predecessor_cache<T, M>::clear();\n    }\n\nprivate:\n    std::atomic<predecessor_type*> reserved_src;\n};\n\n\n//! An abstract cache of successors\ntemplate<typename T, typename M=spin_rw_mutex >\nclass successor_cache : no_copy {\nprotected:\n\n    typedef M mutex_type;\n    mutex_type my_mutex;\n\n    typedef receiver<T> successor_type;\n    typedef receiver<T>* pointer_type;\n    typedef sender<T> owner_type;\n    // TODO revamp: introduce heapified collection of successors for strict priorities\n    typedef std::list< pointer_type > successors_type;\n    successors_type my_successors;\n\n    owner_type* my_owner;\n\npublic:\n    successor_cache( owner_type* owner ) : my_owner(owner) {\n        // Do not work with the passed pointer here as it may not be fully initialized yet\n    }\n\n    virtual ~successor_cache() {}\n\n    void register_successor( successor_type& r ) {\n        typename mutex_type::scoped_lock l(my_mutex, true);\n        if( r.priority() != no_priority )\n            my_successors.push_front( &r );\n        else\n            my_successors.push_back( &r );\n    }\n\n    void remove_successor( successor_type& r ) {\n        typename mutex_type::scoped_lock l(my_mutex, true);\n        for ( typename successors_type::iterator i = my_successors.begin();\n              i != my_successors.end(); ++i ) {\n            if ( *i == & r ) {\n                my_successors.erase(i);\n                break;\n            }\n        }\n    }\n\n    bool empty() {\n        typename mutex_type::scoped_lock l(my_mutex, false);\n        return my_successors.empty();\n    }\n\n    void clear() {\n        my_successors.clear();\n    }\n\n    virtual graph_task* try_put_task( const T& t ) = 0;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    virtual graph_task* try_put_task( const T& t, const message_metainfo& metainfo ) = 0;\n#endif\n};  // successor_cache<T>\n\n//! An abstract cache of successors, specialized to continue_msg\ntemplate<typename M>\nclass successor_cache< continue_msg, M > : no_copy {\nprotected:\n\n    typedef M mutex_type;\n    mutex_type my_mutex;\n\n    typedef receiver<continue_msg> successor_type;\n    typedef receiver<continue_msg>* pointer_type;\n    typedef sender<continue_msg> owner_type;\n    typedef std::list< pointer_type > successors_type;\n    successors_type my_successors;\n    owner_type* my_owner;\n\npublic:\n    successor_cache( sender<continue_msg>* owner ) : my_owner(owner) {\n        // Do not work with the passed pointer here as it may not be fully initialized yet\n    }\n\n    virtual ~successor_cache() {}\n\n    void register_successor( successor_type& r ) {\n        typename mutex_type::scoped_lock l(my_mutex, true);\n        if( r.priority() != no_priority )\n            my_successors.push_front( &r );\n        else\n            my_successors.push_back( &r );\n        __TBB_ASSERT( my_owner, \"Cache of successors must have an owner.\" );\n        if ( r.is_continue_receiver() ) {\n            r.register_predecessor( *my_owner );\n        }\n    }\n\n    void remove_successor( successor_type& r ) {\n        typename mutex_type::scoped_lock l(my_mutex, true);\n        for ( successors_type::iterator i = my_successors.begin(); i != my_successors.end(); ++i ) {\n            if ( *i == &r ) {\n                __TBB_ASSERT(my_owner, \"Cache of successors must have an owner.\");\n                // TODO: check if we need to test for continue_receiver before removing from r.\n                r.remove_predecessor( *my_owner );\n                my_successors.erase(i);\n                break;\n            }\n        }\n    }\n\n    bool empty() {\n        typename mutex_type::scoped_lock l(my_mutex, false);\n        return my_successors.empty();\n    }\n\n    void clear() {\n        my_successors.clear();\n    }\n\n    virtual graph_task* try_put_task( const continue_msg& t ) = 0;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    virtual graph_task* try_put_task( const continue_msg& t, const message_metainfo& metainfo ) = 0;\n#endif\n};  // successor_cache< continue_msg >\n\n//! A cache of successors that are broadcast to\ntemplate<typename T, typename M=spin_rw_mutex>\nclass broadcast_cache : public successor_cache<T, M> {\n    typedef successor_cache<T, M> base_type;\n    typedef M mutex_type;\n    typedef typename successor_cache<T,M>::successors_type successors_type;\n\n    graph_task* try_put_task_impl( const T& t __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo) ) {\n        graph_task * last_task = nullptr;\n        typename mutex_type::scoped_lock l(this->my_mutex, /*write=*/true);\n        typename successors_type::iterator i = this->my_successors.begin();\n        while ( i != this->my_successors.end() ) {\n            graph_task *new_task = (*i)->try_put_task(t __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n            // workaround for icc bug\n            graph& graph_ref = (*i)->graph_reference();\n            last_task = combine_tasks(graph_ref, last_task, new_task);  // enqueue if necessary\n            if(new_task) {\n                ++i;\n            }\n            else {  // failed\n                if ( (*i)->register_predecessor(*this->my_owner) ) {\n                    i = this->my_successors.erase(i);\n                } else {\n                    ++i;\n                }\n            }\n        }\n        return last_task;\n    }\npublic:\n\n    broadcast_cache( typename base_type::owner_type* owner ): base_type(owner) {\n        // Do not work with the passed pointer here as it may not be fully initialized yet\n    }\n\n    graph_task* try_put_task( const T &t ) override {\n        return try_put_task_impl(t __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo{}));\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    graph_task* try_put_task( const T &t, const message_metainfo& metainfo ) override {\n        return try_put_task_impl(t, metainfo);\n    }\n#endif\n\n    // call try_put_task and return list of received tasks\n    bool gather_successful_try_puts( const T &t, graph_task_list& tasks ) {\n        bool is_at_least_one_put_successful = false;\n        typename mutex_type::scoped_lock l(this->my_mutex, /*write=*/true);\n        typename successors_type::iterator i = this->my_successors.begin();\n        while ( i != this->my_successors.end() ) {\n            graph_task * new_task = (*i)->try_put_task(t);\n            if(new_task) {\n                ++i;\n                if(new_task != SUCCESSFULLY_ENQUEUED) {\n                    tasks.push_back(*new_task);\n                }\n                is_at_least_one_put_successful = true;\n            }\n            else {  // failed\n                if ( (*i)->register_predecessor(*this->my_owner) ) {\n                    i = this->my_successors.erase(i);\n                } else {\n                    ++i;\n                }\n            }\n        }\n        return is_at_least_one_put_successful;\n    }\n};\n\n//! A cache of successors that are put in a round-robin fashion\ntemplate<typename T, typename M=spin_rw_mutex >\nclass round_robin_cache : public successor_cache<T, M> {\n    typedef successor_cache<T, M> base_type;\n    typedef size_t size_type;\n    typedef M mutex_type;\n    typedef typename successor_cache<T,M>::successors_type successors_type;\n\npublic:\n\n    round_robin_cache( typename base_type::owner_type* owner ): base_type(owner) {\n        // Do not work with the passed pointer here as it may not be fully initialized yet\n    }\n\n    size_type size() {\n        typename mutex_type::scoped_lock l(this->my_mutex, false);\n        return this->my_successors.size();\n    }\n\nprivate:\n\n    graph_task* try_put_task_impl( const T &t\n                                   __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo) )\n    {\n        typename mutex_type::scoped_lock l(this->my_mutex, /*write=*/true);\n        typename successors_type::iterator i = this->my_successors.begin();\n        while ( i != this->my_successors.end() ) {\n            graph_task* new_task = (*i)->try_put_task(t __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n            if ( new_task ) {\n                return new_task;\n            } else {\n               if ( (*i)->register_predecessor(*this->my_owner) ) {\n                   i = this->my_successors.erase(i);\n               }\n               else {\n                   ++i;\n               }\n            }\n        }\n        return nullptr;\n    }\n\npublic:\n    graph_task* try_put_task(const T& t) override {\n        return try_put_task_impl(t __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo{}));\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    graph_task* try_put_task( const T& t, const message_metainfo& metainfo ) override {\n        return try_put_task_impl(t, metainfo);\n    }\n#endif\n};\n\n#endif // __TBB__flow_graph_cache_impl_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_flow_graph_impl.h",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_flow_graph_impl_H\n#define __TBB_flow_graph_impl_H\n\n// #include \"../config.h\"\n#include \"_task.h\"\n#include \"../task_group.h\"\n#include \"../task_arena.h\"\n#include \"../flow_graph_abstractions.h\"\n\n#include \"../concurrent_priority_queue.h\"\n\n#include <list>\n\nnamespace tbb {\nnamespace detail {\n\nnamespace d2 {\n\nclass graph_task;\nstatic graph_task* const SUCCESSFULLY_ENQUEUED = (graph_task*)-1;\ntypedef unsigned int node_priority_t;\nstatic const node_priority_t no_priority = node_priority_t(0);\n\nclass graph;\nclass graph_node;\n\ntemplate <typename GraphContainerType, typename GraphNodeType>\nclass graph_iterator {\n    friend class graph;\n    friend class graph_node;\npublic:\n    typedef size_t size_type;\n    typedef GraphNodeType value_type;\n    typedef GraphNodeType* pointer;\n    typedef GraphNodeType& reference;\n    typedef const GraphNodeType& const_reference;\n    typedef std::forward_iterator_tag iterator_category;\n\n    //! Copy constructor\n    graph_iterator(const graph_iterator& other) :\n        my_graph(other.my_graph), current_node(other.current_node)\n    {}\n\n    //! Assignment\n    graph_iterator& operator=(const graph_iterator& other) {\n        if (this != &other) {\n            my_graph = other.my_graph;\n            current_node = other.current_node;\n        }\n        return *this;\n    }\n\n    //! Dereference\n    reference operator*() const;\n\n    //! Dereference\n    pointer operator->() const;\n\n    //! Equality\n    bool operator==(const graph_iterator& other) const {\n        return ((my_graph == other.my_graph) && (current_node == other.current_node));\n    }\n\n#if !__TBB_CPP20_COMPARISONS_PRESENT\n    //! Inequality\n    bool operator!=(const graph_iterator& other) const { return !(operator==(other)); }\n#endif\n\n    //! Pre-increment\n    graph_iterator& operator++() {\n        internal_forward();\n        return *this;\n    }\n\n    //! Post-increment\n    graph_iterator operator++(int) {\n        graph_iterator result = *this;\n        operator++();\n        return result;\n    }\n\nprivate:\n    // the graph over which we are iterating\n    GraphContainerType *my_graph;\n    // pointer into my_graph's my_nodes list\n    pointer current_node;\n\n    //! Private initializing constructor for begin() and end() iterators\n    graph_iterator(GraphContainerType *g, bool begin);\n    void internal_forward();\n};  // class graph_iterator\n\n// flags to modify the behavior of the graph reset().  Can be combined.\nenum reset_flags {\n    rf_reset_protocol = 0,\n    rf_reset_bodies = 1 << 0,  // delete the current node body, reset to a copy of the initial node body.\n    rf_clear_edges = 1 << 1   // delete edges\n};\n\nvoid activate_graph(graph& g);\nvoid deactivate_graph(graph& g);\nbool is_graph_active(graph& g);\ngraph_task* prioritize_task(graph& g, graph_task& arena_task);\nvoid spawn_in_graph_arena(graph& g, graph_task& arena_task);\nvoid enqueue_in_graph_arena(graph &g, graph_task& arena_task);\n\nclass graph;\n\n//! Base class for tasks generated by graph nodes.\nclass graph_task : public d1::task {\npublic:\n    graph_task(graph& g, d1::small_object_allocator& allocator,\n               node_priority_t node_priority = no_priority);\n\n    graph& my_graph; // graph instance the task belongs to\n    // TODO revamp: rename to my_priority\n    node_priority_t priority;\n    template <typename DerivedType>\n    void destruct_and_deallocate(const d1::execution_data& ed);\nprotected:\n    template <typename DerivedType>\n    void finalize(const d1::execution_data& ed);\nprivate:\n    // To organize task_list\n    graph_task* my_next{ nullptr };\n    d1::small_object_allocator my_allocator;\n    d1::wait_tree_vertex_interface* my_reference_vertex;\n    // TODO revamp: elaborate internal interfaces to avoid friends declarations\n    friend class graph_task_list;\n    friend graph_task* prioritize_task(graph& g, graph_task& gt);\n};\n\ninline bool is_this_thread_in_graph_arena(graph& g);\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\nclass trackable_messages_graph_task : public graph_task {\npublic:\n    trackable_messages_graph_task(graph& g, d1::small_object_allocator& allocator,\n                                  node_priority_t node_priority,\n                                  const std::forward_list<d1::wait_context_vertex*>& msg_waiters)\n        : graph_task(g, allocator, node_priority)\n        , my_msg_wait_context_vertices(msg_waiters)\n    {\n        auto last_iterator = my_msg_reference_vertices.cbefore_begin();\n\n        for (auto& msg_waiter : my_msg_wait_context_vertices) {\n            // If the task is created by the thread outside the graph arena, the lifetime of the thread reference vertex\n            // may be shorter that the lifetime of the task, so thread reference vertex approach cannot be used\n            // and the task should be associated with the msg wait context itself\n            d1::wait_tree_vertex_interface* ref_vertex = is_this_thread_in_graph_arena(g) ?\n                                                         r1::get_thread_reference_vertex(msg_waiter) :\n                                                         msg_waiter;\n            last_iterator = my_msg_reference_vertices.emplace_after(last_iterator,\n                                                                    ref_vertex);\n            ref_vertex->reserve(1);\n        }\n    }\n\n    trackable_messages_graph_task(graph& g, d1::small_object_allocator& allocator,\n                                  node_priority_t node_priority,\n                                  std::forward_list<d1::wait_context_vertex*>&& msg_waiters)\n        : graph_task(g, allocator, node_priority)\n        , my_msg_wait_context_vertices(std::move(msg_waiters))\n    {\n    }\n\n    const std::forward_list<d1::wait_context_vertex*> get_msg_wait_context_vertices() const {\n        return my_msg_wait_context_vertices;\n    }\n\nprotected:\n    template <typename DerivedType>\n    void finalize(const d1::execution_data& ed) {\n        auto wait_context_vertices = std::move(my_msg_wait_context_vertices);\n        auto msg_reference_vertices = std::move(my_msg_reference_vertices);\n        graph_task::finalize<DerivedType>(ed);\n\n        // If there is no thread reference vertices associated with the task\n        // then this task was created by transferring the ownership from other metainfo\n        // instance (e.g. while taking from the buffer)\n        if (msg_reference_vertices.empty()) {\n            for (auto& msg_waiter : wait_context_vertices) {\n                msg_waiter->release(1);\n            }\n        } else {\n            for (auto& msg_waiter : msg_reference_vertices) {\n                msg_waiter->release(1);\n            }\n        }\n    }\nprivate:\n    // Each task that holds information about single message wait_contexts should hold two lists\n    // The first one is wait_contexts associated with the message itself. They are needed\n    // to be able to broadcast the list of wait_contexts to the node successors while executing the task.\n    // The second list is a list of reference vertices for each wait_context_vertex in the first list\n    // to support the distributed reference counting schema\n    std::forward_list<d1::wait_context_vertex*> my_msg_wait_context_vertices;\n    std::forward_list<d1::wait_tree_vertex_interface*> my_msg_reference_vertices;\n}; // class trackable_messages_graph_task\n#endif // __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n\nstruct graph_task_comparator {\n    bool operator()(const graph_task* left, const graph_task* right) {\n        return left->priority < right->priority;\n    }\n};\n\ntypedef tbb::concurrent_priority_queue<graph_task*, graph_task_comparator> graph_task_priority_queue_t;\n\nclass priority_task_selector : public d1::task {\npublic:\n    priority_task_selector(graph_task_priority_queue_t& priority_queue, d1::small_object_allocator& allocator)\n        : my_priority_queue(priority_queue), my_allocator(allocator), my_task() {}\n    task* execute(d1::execution_data& ed) override {\n        next_task();\n        __TBB_ASSERT(my_task, nullptr);\n        task* t_next = my_task->execute(ed);\n        my_allocator.delete_object(this, ed);\n        return t_next;\n    }\n    task* cancel(d1::execution_data& ed) override {\n        if (!my_task) {\n            next_task();\n        }\n        __TBB_ASSERT(my_task, nullptr);\n        task* t_next = my_task->cancel(ed);\n        my_allocator.delete_object(this, ed);\n        return t_next;\n    }\nprivate:\n    void next_task() {\n        // TODO revamp: hold functors in priority queue instead of real tasks\n        bool result = my_priority_queue.try_pop(my_task);\n        __TBB_ASSERT_EX(result, \"Number of critical tasks for scheduler and tasks\"\n            \" in graph's priority queue mismatched\");\n        __TBB_ASSERT(my_task && my_task != SUCCESSFULLY_ENQUEUED,\n            \"Incorrect task submitted to graph priority queue\");\n        __TBB_ASSERT(my_task->priority != no_priority,\n            \"Tasks from graph's priority queue must have priority\");\n    }\n\n    graph_task_priority_queue_t& my_priority_queue;\n    d1::small_object_allocator my_allocator;\n    graph_task* my_task;\n};\n\ntemplate <typename Receiver, typename Body> class run_and_put_task;\ntemplate <typename Body> class run_task;\n\n//********************************************************************************\n// graph tasks helpers\n//********************************************************************************\n\n//! The list of graph tasks\nclass graph_task_list : no_copy {\nprivate:\n    graph_task* my_first;\n    graph_task** my_next_ptr;\npublic:\n    //! Construct empty list\n    graph_task_list() : my_first(nullptr), my_next_ptr(&my_first) {}\n\n    //! True if list is empty; false otherwise.\n    bool empty() const { return !my_first; }\n\n    //! Push task onto back of list.\n    void push_back(graph_task& task) {\n        task.my_next = nullptr;\n        *my_next_ptr = &task;\n        my_next_ptr = &task.my_next;\n    }\n\n    //! Pop the front task from the list.\n    graph_task& pop_front() {\n        __TBB_ASSERT(!empty(), \"attempt to pop item from empty task_list\");\n        graph_task* result = my_first;\n        my_first = result->my_next;\n        if (!my_first) {\n            my_next_ptr = &my_first;\n        }\n        return *result;\n    }\n};\n\n//! The graph class\n/** This class serves as a handle to the graph */\nclass graph : no_copy, public graph_proxy {\n    friend class graph_node;\n\n    void prepare_task_arena(bool reinit = false) {\n        if (reinit) {\n            __TBB_ASSERT(my_task_arena, \"task arena is nullptr\");\n            my_task_arena->terminate();\n            my_task_arena->initialize(task_arena::attach());\n        }\n        else {\n            __TBB_ASSERT(my_task_arena == nullptr, \"task arena is not nullptr\");\n            my_task_arena = new task_arena(task_arena::attach());\n        }\n        if (!my_task_arena->is_active()) // failed to attach\n            my_task_arena->initialize(); // create a new, default-initialized arena\n        __TBB_ASSERT(my_task_arena->is_active(), \"task arena is not active\");\n    }\n\npublic:\n    //! Constructs a graph with isolated task_group_context\n    graph();\n\n    //! Constructs a graph with use_this_context as context\n    explicit graph(task_group_context& use_this_context);\n\n    //! Destroys the graph.\n    /** Calls wait_for_all, then destroys the root task and context. */\n    ~graph();\n\n    //! Used to register that an external entity may still interact with the graph.\n    /** The graph will not return from wait_for_all until a matching number of release_wait calls is\n    made. */\n    void reserve_wait() override;\n\n    //! Deregisters an external entity that may have interacted with the graph.\n    /** The graph will not return from wait_for_all until all the number of reserve_wait calls\n    matches the number of release_wait calls. */\n    void release_wait() override;\n\n    //! Wait until graph is idle and the number of release_wait calls equals to the number of\n    //! reserve_wait calls.\n    /** The waiting thread will go off and steal work while it is blocked in the wait_for_all. */\n    void wait_for_all() {\n        cancelled = false;\n        caught_exception = false;\n        try_call([this] {\n            my_task_arena->execute([this] {\n                d1::wait(my_wait_context_vertex.get_context(), *my_context);\n            });\n            cancelled = my_context->is_group_execution_cancelled();\n        }).on_exception([this] {\n            my_context->reset();\n            caught_exception = true;\n            cancelled = true;\n        });\n        // TODO: the \"if\" condition below is just a work-around to support the concurrent wait\n        // mode. The cancellation and exception mechanisms are still broken in this mode.\n        // Consider using task group not to re-implement the same functionality.\n        if (!(my_context->traits() & task_group_context::concurrent_wait)) {\n            my_context->reset();  // consistent with behavior in catch()\n        }\n    }\n\n    // TODO revamp: consider adding getter for task_group_context.\n\n    // ITERATORS\n    template<typename C, typename N>\n    friend class graph_iterator;\n\n    // Graph iterator typedefs\n    typedef graph_iterator<graph, graph_node> iterator;\n    typedef graph_iterator<const graph, const graph_node> const_iterator;\n\n    // Graph iterator constructors\n    //! start iterator\n    iterator begin();\n    //! end iterator\n    iterator end();\n    //! start const iterator\n    const_iterator begin() const;\n    //! end const iterator\n    const_iterator end() const;\n    //! start const iterator\n    const_iterator cbegin() const;\n    //! end const iterator\n    const_iterator cend() const;\n\n    // thread-unsafe state reset.\n    void reset(reset_flags f = rf_reset_protocol);\n\n    //! cancels execution of the associated task_group_context\n    void cancel();\n\n    //! return status of graph execution\n    bool is_cancelled() { return cancelled; }\n    bool exception_thrown() { return caught_exception; }\n\nprivate:\n    d1::wait_context_vertex my_wait_context_vertex;\n    task_group_context *my_context;\n    bool own_context;\n    bool cancelled;\n    bool caught_exception;\n    bool my_is_active;\n\n    graph_node *my_nodes, *my_nodes_last;\n\n    tbb::spin_mutex nodelist_mutex;\n    void register_node(graph_node *n);\n    void remove_node(graph_node *n);\n\n    task_arena* my_task_arena;\n\n    graph_task_priority_queue_t my_priority_queue;\n\n    d1::wait_context_vertex& get_wait_context_vertex() { return my_wait_context_vertex; }\n\n    friend void activate_graph(graph& g);\n    friend void deactivate_graph(graph& g);\n    friend bool is_graph_active(graph& g);\n    friend bool is_this_thread_in_graph_arena(graph& g);\n    friend graph_task* prioritize_task(graph& g, graph_task& arena_task);\n    friend void spawn_in_graph_arena(graph& g, graph_task& arena_task);\n    friend void enqueue_in_graph_arena(graph &g, graph_task& arena_task);\n\n    friend class d1::task_arena_base;\n    friend class graph_task;\n\n    template <typename T>\n    friend class receiver;\n};  // class graph\n\ntemplate<typename DerivedType>\ninline void graph_task::destruct_and_deallocate(const d1::execution_data& ed) {\n    auto allocator = my_allocator;\n    // TODO: investigate if direct call of derived destructor gives any benefits.\n    this->~graph_task();\n    allocator.deallocate(static_cast<DerivedType*>(this), ed);\n}\n\ntemplate<typename DerivedType>\ninline void graph_task::finalize(const d1::execution_data& ed) {\n    d1::wait_tree_vertex_interface* reference_vertex = my_reference_vertex;\n    destruct_and_deallocate<DerivedType>(ed);\n    reference_vertex->release();\n}\n\ninline graph_task::graph_task(graph& g, d1::small_object_allocator& allocator,\n                              node_priority_t node_priority)\n    : my_graph(g)\n    , priority(node_priority)\n    , my_allocator(allocator)\n{\n    // If the task is created by the thread outside the graph arena, the lifetime of the thread reference vertex\n    // may be shorter that the lifetime of the task, so thread reference vertex approach cannot be used\n    // and the task should be associated with the graph wait context itself\n    // TODO: consider how reference counting can be improved for such a use case. Most common example is the async_node\n    d1::wait_context_vertex* graph_wait_context_vertex = &my_graph.get_wait_context_vertex();\n    my_reference_vertex = is_this_thread_in_graph_arena(g) ? r1::get_thread_reference_vertex(graph_wait_context_vertex)\n                                                           : graph_wait_context_vertex;\n    __TBB_ASSERT(my_reference_vertex, nullptr);\n    my_reference_vertex->reserve();\n}\n\n//********************************************************************************\n// end of graph tasks helpers\n//********************************************************************************\n\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\nclass get_graph_helper;\n#endif\n\n//! The base of all graph nodes.\nclass graph_node : no_copy {\n    friend class graph;\n    template<typename C, typename N>\n    friend class graph_iterator;\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    friend class get_graph_helper;\n#endif\n\nprotected:\n    graph& my_graph;\n    graph& graph_reference() const {\n        // TODO revamp: propagate graph_reference() method to all the reference places.\n        return my_graph;\n    }\n    graph_node* next = nullptr;\n    graph_node* prev = nullptr;\npublic:\n    explicit graph_node(graph& g);\n\n    virtual ~graph_node();\n\nprotected:\n    // performs the reset on an individual node.\n    virtual void reset_node(reset_flags f = rf_reset_protocol) = 0;\n};  // class graph_node\n\ninline void activate_graph(graph& g) {\n    g.my_is_active = true;\n}\n\ninline void deactivate_graph(graph& g) {\n    g.my_is_active = false;\n}\n\ninline bool is_graph_active(graph& g) {\n    return g.my_is_active;\n}\n\ninline bool is_this_thread_in_graph_arena(graph& g) {\n    __TBB_ASSERT(g.my_task_arena && g.my_task_arena->is_active(), nullptr);\n    return r1::execution_slot(*g.my_task_arena) != d1::slot_id(-1);\n}\n\ninline graph_task* prioritize_task(graph& g, graph_task& gt) {\n    if( no_priority == gt.priority )\n        return &gt;\n\n    //! Non-preemptive priority pattern. The original task is submitted as a work item to the\n    //! priority queue, and a new critical task is created to take and execute a work item with\n    //! the highest known priority. The reference counting responsibility is transferred to\n    //! the new task.\n    // A newly created small_object_allocator should be used to allocate the priority_task_selector\n    // instead of the allocator, associated with gt since gt can be allocated by another thread\n    d1::small_object_allocator allocator;\n    d1::task* critical_task = allocator.new_object<priority_task_selector>(g.my_priority_queue, allocator);\n    __TBB_ASSERT( critical_task, \"bad_alloc?\" );\n    g.my_priority_queue.push(&gt);\n    using tbb::detail::d1::submit;\n    submit( *critical_task, *g.my_task_arena, *g.my_context, /*as_critical=*/true );\n    return nullptr;\n}\n\n//! Spawns a task inside graph arena\ninline void spawn_in_graph_arena(graph& g, graph_task& arena_task) {\n    if (is_graph_active(g)) {\n        d1::task* gt = prioritize_task(g, arena_task);\n        if( !gt )\n            return;\n\n        __TBB_ASSERT(g.my_task_arena && g.my_task_arena->is_active(), nullptr);\n        submit( *gt, *g.my_task_arena, *g.my_context\n#if __TBB_PREVIEW_CRITICAL_TASKS\n                , /*as_critical=*/false\n#endif\n        );\n    }\n}\n\n// TODO revamp: unify *_in_graph_arena functions\n\n//! Enqueues a task inside graph arena\ninline void enqueue_in_graph_arena(graph &g, graph_task& arena_task) {\n    if (is_graph_active(g)) {\n        __TBB_ASSERT( g.my_task_arena && g.my_task_arena->is_active(), \"Is graph's arena initialized and active?\" );\n\n        // TODO revamp: decide on the approach that does not postpone critical task\n        if( d1::task* gt = prioritize_task(g, arena_task) )\n            submit( *gt, *g.my_task_arena, *g.my_context, /*as_critical=*/false);\n    }\n}\n\n} // namespace d2\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_flow_graph_impl_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_flow_graph_indexer_impl.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB__flow_graph_indexer_impl_H\n#define __TBB__flow_graph_indexer_impl_H\n\n#ifndef __TBB_flow_graph_H\n#error Do not #include this internal file directly; use public TBB headers instead.\n#endif\n\n// included in namespace tbb::detail::d2\n\n#include \"_flow_graph_types_impl.h\"\n\n    // Output of the indexer_node is a tbb::flow::tagged_msg, and will be of\n    // the form  tagged_msg<tag, result>\n    // where the value of tag will indicate which result was put to the\n    // successor.\n\n    template<typename IndexerNodeBaseType, typename T, size_t K>\n    graph_task* do_try_put(const T &v, void *p __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo)) {\n        typename IndexerNodeBaseType::output_type o(K, v);\n        return reinterpret_cast<IndexerNodeBaseType *>(p)->try_put_task(&o __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n    }\n\n    template<typename TupleTypes,int N>\n    struct indexer_helper {\n        template<typename IndexerNodeBaseType, typename PortTuple>\n        static inline void set_indexer_node_pointer(PortTuple &my_input, IndexerNodeBaseType *p, graph& g) {\n            typedef typename std::tuple_element<N-1, TupleTypes>::type T;\n            auto indexer_node_put_task = do_try_put<IndexerNodeBaseType, T, N-1>;\n            std::get<N-1>(my_input).set_up(p, indexer_node_put_task, g);\n            indexer_helper<TupleTypes,N-1>::template set_indexer_node_pointer<IndexerNodeBaseType,PortTuple>(my_input, p, g);\n        }\n    };\n\n    template<typename TupleTypes>\n    struct indexer_helper<TupleTypes,1> {\n        template<typename IndexerNodeBaseType, typename PortTuple>\n        static inline void set_indexer_node_pointer(PortTuple &my_input, IndexerNodeBaseType *p, graph& g) {\n            typedef typename std::tuple_element<0, TupleTypes>::type T;\n            auto indexer_node_put_task = do_try_put<IndexerNodeBaseType, T, 0>;\n            std::get<0>(my_input).set_up(p, indexer_node_put_task, g);\n        }\n    };\n\n    template<typename T>\n    class indexer_input_port : public receiver<T> {\n    private:\n        void* my_indexer_ptr;\n        typedef graph_task* (* forward_function_ptr)(T const &, void*\n                                                     __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo&));\n        forward_function_ptr my_try_put_task;\n        graph* my_graph;\n    public:\n        void set_up(void* p, forward_function_ptr f, graph& g) {\n            my_indexer_ptr = p;\n            my_try_put_task = f;\n            my_graph = &g;\n        }\n\n    protected:\n        template< typename R, typename B > friend class run_and_put_task;\n        template<typename X, typename Y> friend class broadcast_cache;\n        template<typename X, typename Y> friend class round_robin_cache;\n        graph_task* try_put_task(const T &v) override {\n            return my_try_put_task(v, my_indexer_ptr __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo{}));\n        }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        graph_task* try_put_task(const T& v, const message_metainfo& metainfo) override {\n            return my_try_put_task(v, my_indexer_ptr, metainfo);\n        }\n#endif\n\n        graph& graph_reference() const override {\n            return *my_graph;\n        }\n    };\n\n    template<typename InputTuple, typename OutputType, typename StructTypes>\n    class indexer_node_FE {\n    public:\n        static const int N = std::tuple_size<InputTuple>::value;\n        typedef OutputType output_type;\n        typedef InputTuple input_type;\n\n        // Some versions of Intel(R) C++ Compiler fail to generate an implicit constructor for the class which has std::tuple as a member.\n        indexer_node_FE() : my_inputs() {}\n\n        input_type &input_ports() { return my_inputs; }\n    protected:\n        input_type my_inputs;\n    };\n\n    //! indexer_node_base\n    template<typename InputTuple, typename OutputType, typename StructTypes>\n    class indexer_node_base : public graph_node, public indexer_node_FE<InputTuple, OutputType,StructTypes>,\n                           public sender<OutputType> {\n    protected:\n       using graph_node::my_graph;\n    public:\n        static const size_t N = std::tuple_size<InputTuple>::value;\n        typedef OutputType output_type;\n        typedef StructTypes tuple_types;\n        typedef typename sender<output_type>::successor_type successor_type;\n        typedef indexer_node_FE<InputTuple, output_type,StructTypes> input_ports_type;\n\n    private:\n        // ----------- Aggregator ------------\n        enum op_type { reg_succ, rem_succ, try__put_task\n        };\n        typedef indexer_node_base<InputTuple,output_type,StructTypes> class_type;\n\n        class indexer_node_base_operation : public d1::aggregated_operation<indexer_node_base_operation> {\n        public:\n            char type;\n            union {\n                output_type const *my_arg;\n                successor_type *my_succ;\n                graph_task* bypass_t;\n            };\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            message_metainfo const* metainfo;\n#endif\n            indexer_node_base_operation(const output_type* e, op_type t) :\n                type(char(t)), my_arg(e) __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo(nullptr))\n            {}\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            indexer_node_base_operation(const output_type* e, op_type t, const message_metainfo& info)\n                : type(char(t)), my_arg(e), metainfo(&info) {}\n#endif\n            indexer_node_base_operation(const successor_type &s, op_type t) : type(char(t)),\n                my_succ(const_cast<successor_type *>(&s)) {}\n        };\n\n        typedef d1::aggregating_functor<class_type, indexer_node_base_operation> handler_type;\n        friend class d1::aggregating_functor<class_type, indexer_node_base_operation>;\n        d1::aggregator<handler_type, indexer_node_base_operation> my_aggregator;\n\n        void handle_operations(indexer_node_base_operation* op_list) {\n            indexer_node_base_operation *current;\n            while(op_list) {\n                current = op_list;\n                op_list = op_list->next;\n                switch(current->type) {\n\n                case reg_succ:\n                    my_successors.register_successor(*(current->my_succ));\n                    current->status.store( SUCCEEDED, std::memory_order_release);\n                    break;\n\n                case rem_succ:\n                    my_successors.remove_successor(*(current->my_succ));\n                    current->status.store( SUCCEEDED, std::memory_order_release);\n                    break;\n                case try__put_task: {\n                        current->bypass_t = my_successors.try_put_task(*(current->my_arg)\n                                                                       __TBB_FLOW_GRAPH_METAINFO_ARG(*(current->metainfo)));\n                        current->status.store( SUCCEEDED, std::memory_order_release);  // return of try_put_task actual return value\n                    }\n                    break;\n                }\n            }\n        }\n        // ---------- end aggregator -----------\n    public:\n        indexer_node_base(graph& g) : graph_node(g), input_ports_type(), my_successors(this) {\n            indexer_helper<StructTypes,N>::set_indexer_node_pointer(this->my_inputs, this, g);\n            my_aggregator.initialize_handler(handler_type(this));\n        }\n\n        indexer_node_base(const indexer_node_base& other)\n            : graph_node(other.my_graph), input_ports_type(), sender<output_type>(), my_successors(this)\n        {\n            indexer_helper<StructTypes,N>::set_indexer_node_pointer(this->my_inputs, this, other.my_graph);\n            my_aggregator.initialize_handler(handler_type(this));\n        }\n\n        bool register_successor(successor_type &r) override {\n            indexer_node_base_operation op_data(r, reg_succ);\n            my_aggregator.execute(&op_data);\n            return op_data.status == SUCCEEDED;\n        }\n\n        bool remove_successor( successor_type &r) override {\n            indexer_node_base_operation op_data(r, rem_succ);\n            my_aggregator.execute(&op_data);\n            return op_data.status == SUCCEEDED;\n        }\n\n        // not a virtual method in this class\n        graph_task* try_put_task(output_type const *v\n                                 __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo))\n        {\n            indexer_node_base_operation op_data(v, try__put_task __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n            my_aggregator.execute(&op_data);\n            return op_data.bypass_t;\n        }\n\n    protected:\n        void reset_node(reset_flags f) override {\n            if(f & rf_clear_edges) {\n                my_successors.clear();\n            }\n        }\n\n    private:\n        broadcast_cache<output_type, null_rw_mutex> my_successors;\n    };  //indexer_node_base\n\n\n    template<int N, typename InputTuple> struct input_types;\n\n    template<typename InputTuple>\n    struct input_types<1, InputTuple> {\n        typedef typename std::tuple_element<0, InputTuple>::type first_type;\n        typedef tagged_msg<size_t, first_type > type;\n    };\n\n    template<typename InputTuple>\n    struct input_types<2, InputTuple> {\n        typedef typename std::tuple_element<0, InputTuple>::type first_type;\n        typedef typename std::tuple_element<1, InputTuple>::type second_type;\n        typedef tagged_msg<size_t, first_type, second_type> type;\n    };\n\n    template<typename InputTuple>\n    struct input_types<3, InputTuple> {\n        typedef typename std::tuple_element<0, InputTuple>::type first_type;\n        typedef typename std::tuple_element<1, InputTuple>::type second_type;\n        typedef typename std::tuple_element<2, InputTuple>::type third_type;\n        typedef tagged_msg<size_t, first_type, second_type, third_type> type;\n    };\n\n    template<typename InputTuple>\n    struct input_types<4, InputTuple> {\n        typedef typename std::tuple_element<0, InputTuple>::type first_type;\n        typedef typename std::tuple_element<1, InputTuple>::type second_type;\n        typedef typename std::tuple_element<2, InputTuple>::type third_type;\n        typedef typename std::tuple_element<3, InputTuple>::type fourth_type;\n        typedef tagged_msg<size_t, first_type, second_type, third_type,\n                                                      fourth_type> type;\n    };\n\n    template<typename InputTuple>\n    struct input_types<5, InputTuple> {\n        typedef typename std::tuple_element<0, InputTuple>::type first_type;\n        typedef typename std::tuple_element<1, InputTuple>::type second_type;\n        typedef typename std::tuple_element<2, InputTuple>::type third_type;\n        typedef typename std::tuple_element<3, InputTuple>::type fourth_type;\n        typedef typename std::tuple_element<4, InputTuple>::type fifth_type;\n        typedef tagged_msg<size_t, first_type, second_type, third_type,\n                                                      fourth_type, fifth_type> type;\n    };\n\n    template<typename InputTuple>\n    struct input_types<6, InputTuple> {\n        typedef typename std::tuple_element<0, InputTuple>::type first_type;\n        typedef typename std::tuple_element<1, InputTuple>::type second_type;\n        typedef typename std::tuple_element<2, InputTuple>::type third_type;\n        typedef typename std::tuple_element<3, InputTuple>::type fourth_type;\n        typedef typename std::tuple_element<4, InputTuple>::type fifth_type;\n        typedef typename std::tuple_element<5, InputTuple>::type sixth_type;\n        typedef tagged_msg<size_t, first_type, second_type, third_type,\n                                                      fourth_type, fifth_type, sixth_type> type;\n    };\n\n    template<typename InputTuple>\n    struct input_types<7, InputTuple> {\n        typedef typename std::tuple_element<0, InputTuple>::type first_type;\n        typedef typename std::tuple_element<1, InputTuple>::type second_type;\n        typedef typename std::tuple_element<2, InputTuple>::type third_type;\n        typedef typename std::tuple_element<3, InputTuple>::type fourth_type;\n        typedef typename std::tuple_element<4, InputTuple>::type fifth_type;\n        typedef typename std::tuple_element<5, InputTuple>::type sixth_type;\n        typedef typename std::tuple_element<6, InputTuple>::type seventh_type;\n        typedef tagged_msg<size_t, first_type, second_type, third_type,\n                                                      fourth_type, fifth_type, sixth_type,\n                                                      seventh_type> type;\n    };\n\n\n    template<typename InputTuple>\n    struct input_types<8, InputTuple> {\n        typedef typename std::tuple_element<0, InputTuple>::type first_type;\n        typedef typename std::tuple_element<1, InputTuple>::type second_type;\n        typedef typename std::tuple_element<2, InputTuple>::type third_type;\n        typedef typename std::tuple_element<3, InputTuple>::type fourth_type;\n        typedef typename std::tuple_element<4, InputTuple>::type fifth_type;\n        typedef typename std::tuple_element<5, InputTuple>::type sixth_type;\n        typedef typename std::tuple_element<6, InputTuple>::type seventh_type;\n        typedef typename std::tuple_element<7, InputTuple>::type eighth_type;\n        typedef tagged_msg<size_t, first_type, second_type, third_type,\n                                                      fourth_type, fifth_type, sixth_type,\n                                                      seventh_type, eighth_type> type;\n    };\n\n\n    template<typename InputTuple>\n    struct input_types<9, InputTuple> {\n        typedef typename std::tuple_element<0, InputTuple>::type first_type;\n        typedef typename std::tuple_element<1, InputTuple>::type second_type;\n        typedef typename std::tuple_element<2, InputTuple>::type third_type;\n        typedef typename std::tuple_element<3, InputTuple>::type fourth_type;\n        typedef typename std::tuple_element<4, InputTuple>::type fifth_type;\n        typedef typename std::tuple_element<5, InputTuple>::type sixth_type;\n        typedef typename std::tuple_element<6, InputTuple>::type seventh_type;\n        typedef typename std::tuple_element<7, InputTuple>::type eighth_type;\n        typedef typename std::tuple_element<8, InputTuple>::type nineth_type;\n        typedef tagged_msg<size_t, first_type, second_type, third_type,\n                                                      fourth_type, fifth_type, sixth_type,\n                                                      seventh_type, eighth_type, nineth_type> type;\n    };\n\n    template<typename InputTuple>\n    struct input_types<10, InputTuple> {\n        typedef typename std::tuple_element<0, InputTuple>::type first_type;\n        typedef typename std::tuple_element<1, InputTuple>::type second_type;\n        typedef typename std::tuple_element<2, InputTuple>::type third_type;\n        typedef typename std::tuple_element<3, InputTuple>::type fourth_type;\n        typedef typename std::tuple_element<4, InputTuple>::type fifth_type;\n        typedef typename std::tuple_element<5, InputTuple>::type sixth_type;\n        typedef typename std::tuple_element<6, InputTuple>::type seventh_type;\n        typedef typename std::tuple_element<7, InputTuple>::type eighth_type;\n        typedef typename std::tuple_element<8, InputTuple>::type nineth_type;\n        typedef typename std::tuple_element<9, InputTuple>::type tenth_type;\n        typedef tagged_msg<size_t, first_type, second_type, third_type,\n                                                      fourth_type, fifth_type, sixth_type,\n                                                      seventh_type, eighth_type, nineth_type,\n                                                      tenth_type> type;\n    };\n\n    // type generators\n    template<typename OutputTuple>\n    struct indexer_types : public input_types<std::tuple_size<OutputTuple>::value, OutputTuple> {\n        static const int N = std::tuple_size<OutputTuple>::value;\n        typedef typename input_types<N, OutputTuple>::type output_type;\n        typedef typename wrap_tuple_elements<N,indexer_input_port,OutputTuple>::type input_ports_type;\n        typedef indexer_node_FE<input_ports_type,output_type,OutputTuple> indexer_FE_type;\n        typedef indexer_node_base<input_ports_type, output_type, OutputTuple> indexer_base_type;\n    };\n\n    template<class OutputTuple>\n    class unfolded_indexer_node : public indexer_types<OutputTuple>::indexer_base_type {\n    public:\n        typedef typename indexer_types<OutputTuple>::input_ports_type input_ports_type;\n        typedef OutputTuple tuple_types;\n        typedef typename indexer_types<OutputTuple>::output_type output_type;\n    private:\n        typedef typename indexer_types<OutputTuple>::indexer_base_type base_type;\n    public:\n        unfolded_indexer_node(graph& g) : base_type(g) {}\n        unfolded_indexer_node(const unfolded_indexer_node &other) : base_type(other) {}\n    };\n\n#endif  /* __TBB__flow_graph_indexer_impl_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_flow_graph_item_buffer_impl.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB__flow_graph_item_buffer_impl_H\n#define __TBB__flow_graph_item_buffer_impl_H\n\n#ifndef __TBB_flow_graph_H\n#error Do not #include this internal file directly; use public TBB headers instead.\n#endif\n\n#include \"_aligned_space.h\"\n\n// in namespace tbb::flow::interfaceX (included in _flow_graph_node_impl.h)\n\n//! Expandable buffer of items.  The possible operations are push, pop,\n//* tests for empty and so forth.  No mutual exclusion is built in.\n//* objects are constructed into and explicitly-destroyed.  get_my_item gives\n// a read-only reference to the item in the buffer.  set_my_item may be called\n// with either an empty or occupied slot.\n\ntemplate <typename T, typename A=cache_aligned_allocator<T> >\nclass item_buffer {\npublic:\n    typedef T item_type;\n    enum buffer_item_state { no_item=0, has_item=1, reserved_item=2 };\nprotected:\n    struct aligned_space_item {\n        item_type item;\n        buffer_item_state state;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        message_metainfo metainfo;\n#endif\n    };\n    typedef size_t size_type;\n    typedef aligned_space<aligned_space_item> buffer_item_type;\n    typedef typename allocator_traits<A>::template rebind_alloc<buffer_item_type> allocator_type;\n    buffer_item_type *my_array;\n    size_type my_array_size;\n    static const size_type initial_buffer_size = 4;\n    size_type my_head;\n    size_type my_tail;\n\n    bool buffer_empty() const { return my_head == my_tail; }\n\n    aligned_space_item &element(size_type i) {\n        __TBB_ASSERT(!(size_type(&(my_array[i&(my_array_size-1)].begin()->state))%alignment_of<buffer_item_state>::value), nullptr);\n        __TBB_ASSERT(!(size_type(&(my_array[i&(my_array_size-1)].begin()->item))%alignment_of<item_type>::value), nullptr);\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        __TBB_ASSERT(!(size_type(&(my_array[i&(my_array_size-1)].begin()->metainfo))%alignment_of<message_metainfo>::value), nullptr);\n#endif\n        return *my_array[i & (my_array_size - 1) ].begin();\n    }\n\n    const aligned_space_item &element(size_type i) const {\n        __TBB_ASSERT(!(size_type(&(my_array[i&(my_array_size-1)].begin()->state))%alignment_of<buffer_item_state>::value), nullptr);\n        __TBB_ASSERT(!(size_type(&(my_array[i&(my_array_size-1)].begin()->item))%alignment_of<item_type>::value), nullptr);\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        __TBB_ASSERT(!(size_type(&(my_array[i&(my_array_size-1)].begin()->metainfo))%alignment_of<message_metainfo>::value), nullptr);\n#endif\n        return *my_array[i & (my_array_size-1)].begin();\n    }\n\n    bool my_item_valid(size_type i) const { return (i < my_tail) && (i >= my_head) && (element(i).state != no_item); }\n#if TBB_USE_ASSERT\n    bool my_item_reserved(size_type i) const { return element(i).state == reserved_item; }\n#endif\n\n    // object management in buffer\n    const item_type &get_my_item(size_t i) const {\n        __TBB_ASSERT(my_item_valid(i),\"attempt to get invalid item\");\n        return element(i).item;\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    message_metainfo& get_my_metainfo(size_t i) {\n        __TBB_ASSERT(my_item_valid(i), \"attempt to get invalid item\");\n        return element(i).metainfo;\n    }\n#endif\n\n    // may be called with an empty slot or a slot that has already been constructed into.\n    void set_my_item(size_t i, const item_type &o\n                     __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo))\n    {\n        if(element(i).state != no_item) {\n            destroy_item(i);\n        }\n        new(&(element(i).item)) item_type(o);\n        element(i).state = has_item;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        new(&element(i).metainfo) message_metainfo(metainfo);\n\n        for (auto& waiter : metainfo.waiters()) {\n            waiter->reserve(1);\n        }\n#endif\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    void set_my_item(size_t i, const item_type& o, message_metainfo&& metainfo) {\n        if(element(i).state != no_item) {\n            destroy_item(i);\n        }\n\n        new(&(element(i).item)) item_type(o);\n        new(&element(i).metainfo) message_metainfo(std::move(metainfo));\n        // Skipping the reservation on metainfo.waiters since the ownership\n        // is moving from metainfo to the cache\n        element(i).state = has_item;\n    }\n#endif\n\n    // destructively-fetch an object from the buffer\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    void fetch_item(size_t i, item_type& o, message_metainfo& metainfo) {\n        __TBB_ASSERT(my_item_valid(i), \"Trying to fetch an empty slot\");\n        o = get_my_item(i);  // could have std::move assign semantics\n        metainfo = std::move(get_my_metainfo(i));\n        destroy_item(i);\n    }\n#else\n    void fetch_item(size_t i, item_type &o) {\n        __TBB_ASSERT(my_item_valid(i), \"Trying to fetch an empty slot\");\n        o = get_my_item(i);  // could have std::move assign semantics\n        destroy_item(i);\n    }\n#endif\n\n    // move an existing item from one slot to another.  The moved-to slot must be unoccupied,\n    // the moved-from slot must exist and not be reserved.  The after, from will be empty,\n    // to will be occupied but not reserved\n    void move_item(size_t to, size_t from) {\n        __TBB_ASSERT(!my_item_valid(to), \"Trying to move to a non-empty slot\");\n        __TBB_ASSERT(my_item_valid(from), \"Trying to move from an empty slot\");\n        // could have std::move semantics\n        set_my_item(to, get_my_item(from) __TBB_FLOW_GRAPH_METAINFO_ARG(get_my_metainfo(from)));\n        destroy_item(from);\n    }\n\n    // put an item in an empty slot.  Return true if successful, else false\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    template <typename Metainfo>\n    bool place_item(size_t here, const item_type &me, Metainfo&& metainfo) {\n#if !TBB_DEPRECATED_SEQUENCER_DUPLICATES\n        if(my_item_valid(here)) return false;\n#endif\n        set_my_item(here, me, std::forward<Metainfo>(metainfo));\n        return true;\n    }\n#else\n    bool place_item(size_t here, const item_type &me) {\n#if !TBB_DEPRECATED_SEQUENCER_DUPLICATES\n        if(my_item_valid(here)) return false;\n#endif\n        set_my_item(here, me);\n        return true;\n    }\n#endif\n\n    // could be implemented with std::move semantics\n    void swap_items(size_t i, size_t j) {\n        __TBB_ASSERT(my_item_valid(i) && my_item_valid(j), \"attempt to swap invalid item(s)\");\n        item_type temp = get_my_item(i);\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        message_metainfo temp_metainfo = get_my_metainfo(i);\n        set_my_item(i, get_my_item(j), get_my_metainfo(j));\n        set_my_item(j, temp, temp_metainfo);\n#else\n        set_my_item(i, get_my_item(j));\n        set_my_item(j, temp);\n#endif\n    }\n\n    void destroy_item(size_type i) {\n        __TBB_ASSERT(my_item_valid(i), \"destruction of invalid item\");\n\n        auto& e = element(i);\n        e.item.~item_type();\n        e.state = no_item;\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        for (auto& msg_waiter : e.metainfo.waiters()) {\n            msg_waiter->release(1);\n        }\n\n        e.metainfo.~message_metainfo();\n#endif\n    }\n\n    // returns the front element\n    const item_type& front() const\n    {\n        __TBB_ASSERT(my_item_valid(my_head), \"attempt to fetch head non-item\");\n        return get_my_item(my_head);\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    const message_metainfo& front_metainfo() const\n    {\n        __TBB_ASSERT(my_item_valid(my_head), \"attempt to fetch head non-item\");\n        return element(my_head).metainfo;\n    }\n#endif\n\n    // returns  the back element\n    const item_type& back() const\n    {\n        __TBB_ASSERT(my_item_valid(my_tail - 1), \"attempt to fetch head non-item\");\n        return get_my_item(my_tail - 1);\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    const message_metainfo& back_metainfo() const {\n        __TBB_ASSERT(my_item_valid(my_tail - 1), \"attempt to fetch head non-item\");\n        return element(my_tail - 1).metainfo;\n    }\n#endif\n\n    // following methods are for reservation of the front of a buffer.\n    void reserve_item(size_type i) {\n        __TBB_ASSERT(my_item_valid(i) && !my_item_reserved(i), \"item cannot be reserved\");\n        element(i).state = reserved_item;\n    }\n\n    void release_item(size_type i) {\n        __TBB_ASSERT(my_item_reserved(i), \"item is not reserved\");\n        element(i).state = has_item;\n    }\n\n    void destroy_front() { destroy_item(my_head); ++my_head; }\n    void destroy_back() { destroy_item(my_tail-1); --my_tail; }\n\n    // we have to be able to test against a new tail value without changing my_tail\n    // grow_array doesn't work if we change my_tail when the old array is too small\n    size_type size(size_t new_tail = 0) { return (new_tail ? new_tail : my_tail) - my_head; }\n    size_type capacity() { return my_array_size; }\n    // sequencer_node does not use this method, so we don't\n    // need a version that passes in the new_tail value.\n    bool buffer_full() { return size() >= capacity(); }\n\n    //! Grows the internal array.\n    void grow_my_array( size_t minimum_size ) {\n        // test that we haven't made the structure inconsistent.\n        __TBB_ASSERT(capacity() >= my_tail - my_head, \"total items exceed capacity\");\n        size_type new_size = my_array_size ? 2*my_array_size : initial_buffer_size;\n        while( new_size<minimum_size )\n            new_size*=2;\n\n        buffer_item_type* new_array = allocator_type().allocate(new_size);\n\n        // initialize validity to \"no\"\n        for( size_type i=0; i<new_size; ++i ) { new_array[i].begin()->state = no_item; }\n\n        for( size_type i=my_head; i<my_tail; ++i) {\n            if(my_item_valid(i)) {  // sequencer_node may have empty slots\n                // placement-new copy-construct; could be std::move\n                char *new_space = (char *)&(new_array[i&(new_size-1)].begin()->item);\n                (void)new(new_space) item_type(get_my_item(i));\n                new_array[i&(new_size-1)].begin()->state = element(i).state;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n                char* meta_space = (char *)&(new_array[i&(new_size-1)].begin()->metainfo);\n                ::new(meta_space) message_metainfo(std::move(element(i).metainfo));\n#endif\n            }\n        }\n\n        clean_up_buffer(/*reset_pointers*/false);\n\n        my_array = new_array;\n        my_array_size = new_size;\n    }\n\n    bool push_back(item_type& v\n                   __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo))\n    {\n        if (buffer_full()) {\n            grow_my_array(size() + 1);\n        }\n        set_my_item(my_tail, v __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n        ++my_tail;\n        return true;\n    }\n\n    bool pop_back(item_type& v\n                  __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo& metainfo))\n    {\n        if (!my_item_valid(my_tail - 1)) {\n            return false;\n        }\n        auto& e = element(my_tail - 1);\n        v = e.item;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        metainfo = std::move(e.metainfo);\n#endif\n\n        destroy_back();\n        return true;\n    }\n\n    bool pop_front(item_type& v\n                   __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo& metainfo))\n    {\n        if (!my_item_valid(my_head)) {\n            return false;\n        }\n        auto& e = element(my_head);\n        v = e.item;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        metainfo = std::move(e.metainfo);\n#endif\n\n        destroy_front();\n        return true;\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    bool pop_back(item_type& v) {\n        message_metainfo metainfo;\n        return pop_back(v, metainfo);\n    }\n\n    bool pop_front(item_type& v) {\n        message_metainfo metainfo;\n        return pop_front(v, metainfo);\n    }\n#endif\n\n    // This is used both for reset and for grow_my_array.  In the case of grow_my_array\n    // we want to retain the values of the head and tail.\n    void clean_up_buffer(bool reset_pointers) {\n        if (my_array) {\n            for( size_type i=my_head; i<my_tail; ++i ) {\n                if(my_item_valid(i))\n                    destroy_item(i);\n            }\n            allocator_type().deallocate(my_array,my_array_size);\n        }\n        my_array = nullptr;\n        if(reset_pointers) {\n            my_head = my_tail = my_array_size = 0;\n        }\n    }\n\npublic:\n    //! Constructor\n    item_buffer( ) : my_array(nullptr), my_array_size(0),\n                     my_head(0), my_tail(0) {\n        grow_my_array(initial_buffer_size);\n    }\n\n    ~item_buffer() {\n        clean_up_buffer(/*reset_pointers*/true);\n    }\n\n    void reset() { clean_up_buffer(/*reset_pointers*/true); grow_my_array(initial_buffer_size); }\n\n};\n\n//! item_buffer with reservable front-end.  NOTE: if reserving, do not\n//* complete operation with pop_front(); use consume_front().\n//* No synchronization built-in.\ntemplate<typename T, typename A=cache_aligned_allocator<T> >\nclass reservable_item_buffer : public item_buffer<T, A> {\nprotected:\n    using item_buffer<T, A>::my_item_valid;\n    using item_buffer<T, A>::my_head;\n\npublic:\n    reservable_item_buffer() : item_buffer<T, A>(), my_reserved(false) {}\n    void reset() {my_reserved = false; item_buffer<T,A>::reset(); }\nprotected:\n\n    bool reserve_front(T &v) {\n        if(my_reserved || !my_item_valid(this->my_head)) return false;\n        my_reserved = true;\n        // reserving the head\n        v = this->front();\n        this->reserve_item(this->my_head);\n        return true;\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    bool reserve_front(T& v, message_metainfo& metainfo) {\n        if (my_reserved || !my_item_valid(this->my_head)) return false;\n        my_reserved = true;\n        // reserving the head\n        v = this->front();\n        metainfo = this->front_metainfo();\n        this->reserve_item(this->my_head);\n        return true;\n    }\n#endif\n\n    void consume_front() {\n        __TBB_ASSERT(my_reserved, \"Attempt to consume a non-reserved item\");\n        this->destroy_front();\n        my_reserved = false;\n    }\n\n    void release_front() {\n        __TBB_ASSERT(my_reserved, \"Attempt to release a non-reserved item\");\n        this->release_item(this->my_head);\n        my_reserved = false;\n    }\n\n    bool my_reserved;\n};\n\n#endif // __TBB__flow_graph_item_buffer_impl_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_flow_graph_join_impl.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB__flow_graph_join_impl_H\n#define __TBB__flow_graph_join_impl_H\n\n#ifndef __TBB_flow_graph_H\n#error Do not #include this internal file directly; use public TBB headers instead.\n#endif\n\n// included into namespace tbb::detail::d2\n\n    struct forwarding_base : no_assign {\n        forwarding_base(graph &g) : graph_ref(g) {}\n        virtual ~forwarding_base() {}\n        graph& graph_ref;\n    };\n\n    struct queueing_forwarding_base : forwarding_base {\n        using forwarding_base::forwarding_base;\n        // decrement_port_count may create a forwarding task.  If we cannot handle the task\n        // ourselves, ask decrement_port_count to deal with it.\n        virtual graph_task* decrement_port_count(bool handle_task) = 0;\n    };\n\n    struct reserving_forwarding_base : forwarding_base {\n        using forwarding_base::forwarding_base;\n        // decrement_port_count may create a forwarding task.  If we cannot handle the task\n        // ourselves, ask decrement_port_count to deal with it.\n        virtual graph_task* decrement_port_count() = 0;\n        virtual void increment_port_count() = 0;\n    };\n\n    // specialization that lets us keep a copy of the current_key for building results.\n    // KeyType can be a reference type.\n    template<typename KeyType>\n    struct matching_forwarding_base : public forwarding_base {\n        typedef typename std::decay<KeyType>::type current_key_type;\n        matching_forwarding_base(graph &g) : forwarding_base(g) { }\n        virtual graph_task* increment_key_count(current_key_type const & /*t*/) = 0;\n        current_key_type current_key; // so ports can refer to FE's desired items\n    };\n\n    template< int N >\n    struct join_helper {\n\n        template< typename TupleType, typename PortType >\n        static inline void set_join_node_pointer(TupleType &my_input, PortType *port) {\n            std::get<N-1>( my_input ).set_join_node_pointer(port);\n            join_helper<N-1>::set_join_node_pointer( my_input, port );\n        }\n        template< typename TupleType >\n        static inline void consume_reservations( TupleType &my_input ) {\n            std::get<N-1>( my_input ).consume();\n            join_helper<N-1>::consume_reservations( my_input );\n        }\n\n        template< typename TupleType >\n        static inline void release_my_reservation( TupleType &my_input ) {\n            std::get<N-1>( my_input ).release();\n        }\n\n        template <typename TupleType>\n        static inline void release_reservations( TupleType &my_input) {\n            join_helper<N-1>::release_reservations(my_input);\n            release_my_reservation(my_input);\n        }\n\n        template< typename InputTuple, typename OutputTuple >\n        static inline bool reserve( InputTuple &my_input, OutputTuple &out) {\n            if ( !std::get<N-1>( my_input ).reserve( std::get<N-1>( out ) ) ) return false;\n            if ( !join_helper<N-1>::reserve( my_input, out ) ) {\n                release_my_reservation( my_input );\n                return false;\n            }\n            return true;\n        }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        template <typename InputTuple, typename OutputTuple>\n        static inline bool reserve(InputTuple& my_input, OutputTuple& out, message_metainfo& metainfo) {\n            message_metainfo element_metainfo;\n            if (!std::get<N - 1>(my_input).reserve(std::get<N - 1>(out), element_metainfo)) return false;\n            if (!join_helper<N - 1>::reserve(my_input, out, metainfo)) {\n                release_my_reservation(my_input);\n                return false;\n            }\n            metainfo.merge(element_metainfo);\n            return true;\n\n        }\n#endif\n\n        template<typename InputTuple, typename OutputTuple>\n        static inline bool get_my_item( InputTuple &my_input, OutputTuple &out) {\n            bool res = std::get<N-1>(my_input).get_item(std::get<N-1>(out) ); // may fail\n            return join_helper<N-1>::get_my_item(my_input, out) && res;       // do get on other inputs before returning\n        }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        template <typename InputTuple, typename OutputTuple>\n        static inline bool get_my_item(InputTuple& my_input, OutputTuple& out, message_metainfo& metainfo) {\n            message_metainfo element_metainfo;\n            bool res = std::get<N-1>(my_input).get_item(std::get<N-1>(out), element_metainfo);\n            metainfo.merge(element_metainfo);\n            return join_helper<N-1>::get_my_item(my_input, out, metainfo) && res;\n        }\n#endif\n\n        template<typename InputTuple, typename OutputTuple>\n        static inline bool get_items(InputTuple &my_input, OutputTuple &out) {\n            return get_my_item(my_input, out);\n        }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        template <typename InputTuple, typename OutputTuple>\n        static inline bool get_items(InputTuple& my_input, OutputTuple& out, message_metainfo& metainfo) {\n            return get_my_item(my_input, out, metainfo);\n        }\n#endif\n\n        template<typename InputTuple>\n        static inline void reset_my_port(InputTuple &my_input) {\n            join_helper<N-1>::reset_my_port(my_input);\n            std::get<N-1>(my_input).reset_port();\n        }\n\n        template<typename InputTuple>\n        static inline void reset_ports(InputTuple& my_input) {\n            reset_my_port(my_input);\n        }\n\n        template<typename InputTuple, typename KeyFuncTuple>\n        static inline void set_key_functors(InputTuple &my_input, KeyFuncTuple &my_key_funcs) {\n            std::get<N-1>(my_input).set_my_key_func(std::get<N-1>(my_key_funcs));\n            std::get<N-1>(my_key_funcs) = nullptr;\n            join_helper<N-1>::set_key_functors(my_input, my_key_funcs);\n        }\n\n        template< typename KeyFuncTuple>\n        static inline void copy_key_functors(KeyFuncTuple &my_inputs, KeyFuncTuple &other_inputs) {\n            __TBB_ASSERT(\n                std::get<N-1>(other_inputs).get_my_key_func(),\n                \"key matching join node should not be instantiated without functors.\"\n            );\n            std::get<N-1>(my_inputs).set_my_key_func(std::get<N-1>(other_inputs).get_my_key_func()->clone());\n            join_helper<N-1>::copy_key_functors(my_inputs, other_inputs);\n        }\n\n        template<typename InputTuple>\n        static inline void reset_inputs(InputTuple &my_input, reset_flags f) {\n            join_helper<N-1>::reset_inputs(my_input, f);\n            std::get<N-1>(my_input).reset_receiver(f);\n        }\n    };  // join_helper<N>\n\n    template< >\n    struct join_helper<1> {\n\n        template< typename TupleType, typename PortType >\n        static inline void set_join_node_pointer(TupleType &my_input, PortType *port) {\n            std::get<0>( my_input ).set_join_node_pointer(port);\n        }\n\n        template< typename TupleType >\n        static inline void consume_reservations( TupleType &my_input ) {\n            std::get<0>( my_input ).consume();\n        }\n\n        template< typename TupleType >\n        static inline void release_my_reservation( TupleType &my_input ) {\n            std::get<0>( my_input ).release();\n        }\n\n        template<typename TupleType>\n        static inline void release_reservations( TupleType &my_input) {\n            release_my_reservation(my_input);\n        }\n\n        template< typename InputTuple, typename OutputTuple >\n        static inline bool reserve( InputTuple &my_input, OutputTuple &out) {\n            return std::get<0>( my_input ).reserve( std::get<0>( out ) );\n        }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        template <typename InputTuple, typename OutputTuple>\n        static inline bool reserve(InputTuple& my_input, OutputTuple& out, message_metainfo& metainfo) {\n            message_metainfo element_metainfo;\n            bool result = std::get<0>(my_input).reserve(std::get<0>(out), element_metainfo);\n            metainfo.merge(element_metainfo);\n            return result;\n        }\n#endif\n\n        template<typename InputTuple, typename OutputTuple>\n        static inline bool get_my_item( InputTuple &my_input, OutputTuple &out) {\n            return std::get<0>(my_input).get_item(std::get<0>(out));\n        }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        template <typename InputTuple, typename OutputTuple>\n        static inline bool get_my_item(InputTuple& my_input, OutputTuple& out, message_metainfo& metainfo) {\n            message_metainfo element_metainfo;\n            bool res = std::get<0>(my_input).get_item(std::get<0>(out), element_metainfo);\n            metainfo.merge(element_metainfo);\n            return res;\n        }\n#endif\n\n        template<typename InputTuple, typename OutputTuple>\n        static inline bool get_items(InputTuple &my_input, OutputTuple &out) {\n            return get_my_item(my_input, out);\n        }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        template <typename InputTuple, typename OutputTuple>\n        static inline bool get_items(InputTuple& my_input, OutputTuple& out, message_metainfo& metainfo) {\n            return get_my_item(my_input, out, metainfo);\n        }\n#endif\n\n        template<typename InputTuple>\n        static inline void reset_my_port(InputTuple &my_input) {\n            std::get<0>(my_input).reset_port();\n        }\n\n        template<typename InputTuple>\n        static inline void reset_ports(InputTuple& my_input) {\n            reset_my_port(my_input);\n        }\n\n        template<typename InputTuple, typename KeyFuncTuple>\n        static inline void set_key_functors(InputTuple &my_input, KeyFuncTuple &my_key_funcs) {\n            std::get<0>(my_input).set_my_key_func(std::get<0>(my_key_funcs));\n            std::get<0>(my_key_funcs) = nullptr;\n        }\n\n        template< typename KeyFuncTuple>\n        static inline void copy_key_functors(KeyFuncTuple &my_inputs, KeyFuncTuple &other_inputs) {\n            __TBB_ASSERT(\n                std::get<0>(other_inputs).get_my_key_func(),\n                \"key matching join node should not be instantiated without functors.\"\n            );\n            std::get<0>(my_inputs).set_my_key_func(std::get<0>(other_inputs).get_my_key_func()->clone());\n        }\n        template<typename InputTuple>\n        static inline void reset_inputs(InputTuple &my_input, reset_flags f) {\n            std::get<0>(my_input).reset_receiver(f);\n        }\n    };  // join_helper<1>\n\n    //! The two-phase join port\n    template< typename T >\n    class reserving_port : public receiver<T> {\n    public:\n        typedef T input_type;\n        typedef typename receiver<input_type>::predecessor_type predecessor_type;\n\n    private:\n        // ----------- Aggregator ------------\n        enum op_type { reg_pred, rem_pred, res_item, rel_res, con_res\n        };\n        typedef reserving_port<T> class_type;\n\n        class reserving_port_operation : public d1::aggregated_operation<reserving_port_operation> {\n        public:\n            char type;\n            union {\n                T *my_arg;\n                predecessor_type *my_pred;\n            };\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            message_metainfo* metainfo;\n#endif\n            reserving_port_operation(const T& e, op_type t __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo& info)) :\n                type(char(t)), my_arg(const_cast<T*>(&e))\n                __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo(&info)) {}\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            reserving_port_operation(const T& e, op_type t)\n                : type(char(t)), my_arg(const_cast<T*>(&e)), metainfo(nullptr) {}\n#endif\n            reserving_port_operation(const predecessor_type &s, op_type t) : type(char(t)),\n                my_pred(const_cast<predecessor_type *>(&s)) {}\n            reserving_port_operation(op_type t) : type(char(t)) {}\n        };\n\n        typedef d1::aggregating_functor<class_type, reserving_port_operation> handler_type;\n        friend class d1::aggregating_functor<class_type, reserving_port_operation>;\n        d1::aggregator<handler_type, reserving_port_operation> my_aggregator;\n\n        void handle_operations(reserving_port_operation* op_list) {\n            reserving_port_operation *current;\n            bool was_missing_predecessors = false;\n            while(op_list) {\n                current = op_list;\n                op_list = op_list->next;\n                switch(current->type) {\n                case reg_pred:\n                    was_missing_predecessors = my_predecessors.empty();\n                    my_predecessors.add(*(current->my_pred));\n                    if ( was_missing_predecessors ) {\n                        (void) my_join->decrement_port_count(); // may try to forward\n                    }\n                    current->status.store( SUCCEEDED, std::memory_order_release);\n                    break;\n                case rem_pred:\n                    if ( !my_predecessors.empty() ) {\n                        my_predecessors.remove(*(current->my_pred));\n                        if ( my_predecessors.empty() ) // was the last predecessor\n                            my_join->increment_port_count();\n                    }\n                    // TODO: consider returning failure if there were no predecessors to remove\n                    current->status.store( SUCCEEDED, std::memory_order_release );\n                    break;\n                case res_item:\n                    if ( reserved ) {\n                        current->status.store( FAILED, std::memory_order_release);\n                    }\n                    else {\n                        bool reserve_result = false;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n                        if (current->metainfo) {\n                            reserve_result = my_predecessors.try_reserve(*(current->my_arg),\n                                                                         *(current->metainfo));\n                        } else\n#endif\n                        {\n                            reserve_result = my_predecessors.try_reserve(*(current->my_arg));\n                        }\n                        if (reserve_result) {\n                            reserved = true;\n                            current->status.store( SUCCEEDED, std::memory_order_release);\n                        } else {\n                            if ( my_predecessors.empty() ) {\n                                my_join->increment_port_count();\n                            }\n                            current->status.store( FAILED, std::memory_order_release);\n                        }\n                    }\n                    break;\n                case rel_res:\n                    reserved = false;\n                    my_predecessors.try_release( );\n                    current->status.store( SUCCEEDED, std::memory_order_release);\n                    break;\n                case con_res:\n                    reserved = false;\n                    my_predecessors.try_consume( );\n                    current->status.store( SUCCEEDED, std::memory_order_release);\n                    break;\n                }\n            }\n        }\n\n    protected:\n        template< typename R, typename B > friend class run_and_put_task;\n        template<typename X, typename Y> friend class broadcast_cache;\n        template<typename X, typename Y> friend class round_robin_cache;\n        graph_task* try_put_task( const T & ) override {\n            return nullptr;\n        }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    graph_task* try_put_task(const T&, const message_metainfo&) override { return nullptr; }\n#endif\n\n        graph& graph_reference() const override {\n            return my_join->graph_ref;\n        }\n\n    public:\n\n        //! Constructor\n        reserving_port() : my_join(nullptr), my_predecessors(this), reserved(false) {\n            my_aggregator.initialize_handler(handler_type(this));\n        }\n\n        // copy constructor\n        reserving_port(const reserving_port& /* other */) = delete;\n\n        void set_join_node_pointer(reserving_forwarding_base *join) {\n            my_join = join;\n        }\n\n        //! Add a predecessor\n        bool register_predecessor( predecessor_type &src ) override {\n            reserving_port_operation op_data(src, reg_pred);\n            my_aggregator.execute(&op_data);\n            return op_data.status == SUCCEEDED;\n        }\n\n        //! Remove a predecessor\n        bool remove_predecessor( predecessor_type &src ) override {\n            reserving_port_operation op_data(src, rem_pred);\n            my_aggregator.execute(&op_data);\n            return op_data.status == SUCCEEDED;\n        }\n\n        //! Reserve an item from the port\n        bool reserve( T &v ) {\n            reserving_port_operation op_data(v, res_item);\n            my_aggregator.execute(&op_data);\n            return op_data.status == SUCCEEDED;\n        }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        bool reserve( T& v, message_metainfo& metainfo ) {\n            reserving_port_operation op_data(v, res_item, metainfo);\n            my_aggregator.execute(&op_data);\n            return op_data.status == SUCCEEDED;\n        }\n#endif\n\n        //! Release the port\n        void release( ) {\n            reserving_port_operation op_data(rel_res);\n            my_aggregator.execute(&op_data);\n        }\n\n        //! Complete use of the port\n        void consume( ) {\n            reserving_port_operation op_data(con_res);\n            my_aggregator.execute(&op_data);\n        }\n\n        void reset_receiver( reset_flags f) {\n            if(f & rf_clear_edges) my_predecessors.clear();\n            else\n            my_predecessors.reset();\n            reserved = false;\n            __TBB_ASSERT(!(f&rf_clear_edges) || my_predecessors.empty(), \"port edges not removed\");\n        }\n\n    private:\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n        friend class get_graph_helper;\n#endif\n\n        reserving_forwarding_base *my_join;\n        reservable_predecessor_cache< T, null_mutex > my_predecessors;\n        bool reserved;\n    };  // reserving_port\n\n    //! queueing join_port\n    template<typename T>\n    class queueing_port : public receiver<T>, public item_buffer<T> {\n    public:\n        typedef T input_type;\n        typedef typename receiver<input_type>::predecessor_type predecessor_type;\n        typedef queueing_port<T> class_type;\n\n    // ----------- Aggregator ------------\n    private:\n        enum op_type { get__item, res_port, try__put_task\n        };\n\n        class queueing_port_operation : public d1::aggregated_operation<queueing_port_operation> {\n        public:\n            char type;\n            T my_val;\n            T* my_arg;\n            graph_task* bypass_t;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            message_metainfo* metainfo;\n#endif\n            // constructor for value parameter\n            queueing_port_operation(const T& e, op_type t __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& info))\n                : type(char(t)), my_val(e), my_arg(nullptr)\n                , bypass_t(nullptr)\n                __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo(const_cast<message_metainfo*>(&info)))\n            {}\n            // constructor for pointer parameter\n            queueing_port_operation(const T* p, op_type t __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo& info)) :\n                type(char(t)), my_arg(const_cast<T*>(p))\n                , bypass_t(nullptr)\n                __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo(&info))\n            {}\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            queueing_port_operation(const T* p, op_type t)\n                : type(char(t)), my_arg(const_cast<T*>(p)), bypass_t(nullptr), metainfo(nullptr)\n            {}\n#endif\n            // constructor with no parameter\n            queueing_port_operation(op_type t) : type(char(t)), my_arg(nullptr)\n                , bypass_t(nullptr)\n                __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo(nullptr))\n            {}\n        };\n\n        typedef d1::aggregating_functor<class_type, queueing_port_operation> handler_type;\n        friend class d1::aggregating_functor<class_type, queueing_port_operation>;\n        d1::aggregator<handler_type, queueing_port_operation> my_aggregator;\n\n        void handle_operations(queueing_port_operation* op_list) {\n            queueing_port_operation *current;\n            bool was_empty;\n            while(op_list) {\n                current = op_list;\n                op_list = op_list->next;\n                switch(current->type) {\n                case try__put_task: {\n                        graph_task* rtask = nullptr;\n                        was_empty = this->buffer_empty();\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n                        __TBB_ASSERT(current->metainfo, nullptr);\n                        this->push_back(current->my_val, *(current->metainfo));\n#else\n                        this->push_back(current->my_val);\n#endif\n                        if (was_empty) rtask = my_join->decrement_port_count(false);\n                        else\n                            rtask = SUCCESSFULLY_ENQUEUED;\n                        current->bypass_t = rtask;\n                        current->status.store( SUCCEEDED, std::memory_order_release);\n                    }\n                    break;\n                case get__item:\n                    if(!this->buffer_empty()) {\n                        __TBB_ASSERT(current->my_arg, nullptr);\n                        *(current->my_arg) = this->front();\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n                        if (current->metainfo) {\n                            *(current->metainfo) = this->front_metainfo();\n                        }\n#endif\n                        current->status.store( SUCCEEDED, std::memory_order_release);\n                    }\n                    else {\n                        current->status.store( FAILED, std::memory_order_release);\n                    }\n                    break;\n                case res_port:\n                    __TBB_ASSERT(this->my_item_valid(this->my_head), \"No item to reset\");\n                    this->destroy_front();\n                    if(this->my_item_valid(this->my_head)) {\n                        (void)my_join->decrement_port_count(true);\n                    }\n                    current->status.store( SUCCEEDED, std::memory_order_release);\n                    break;\n                }\n            }\n        }\n    // ------------ End Aggregator ---------------\n\n    protected:\n        template< typename R, typename B > friend class run_and_put_task;\n        template<typename X, typename Y> friend class broadcast_cache;\n        template<typename X, typename Y> friend class round_robin_cache;\n\n    private:\n        graph_task* try_put_task_impl(const T& v __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo)) {\n            queueing_port_operation op_data(v, try__put_task __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n            my_aggregator.execute(&op_data);\n            __TBB_ASSERT(op_data.status == SUCCEEDED || !op_data.bypass_t, \"inconsistent return from aggregator\");\n            if(!op_data.bypass_t) return SUCCESSFULLY_ENQUEUED;\n            return op_data.bypass_t;\n        }\n\n    protected:\n        graph_task* try_put_task(const T &v) override {\n            return try_put_task_impl(v __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo{}));\n        }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        graph_task* try_put_task(const T& v, const message_metainfo& metainfo) override {\n            return try_put_task_impl(v, metainfo);\n        }\n#endif\n\n        graph& graph_reference() const override {\n            return my_join->graph_ref;\n        }\n\n    public:\n\n        //! Constructor\n        queueing_port() : item_buffer<T>() {\n            my_join = nullptr;\n            my_aggregator.initialize_handler(handler_type(this));\n        }\n\n        //! copy constructor\n        queueing_port(const queueing_port& /* other */) = delete;\n\n        //! record parent for tallying available items\n        void set_join_node_pointer(queueing_forwarding_base *join) {\n            my_join = join;\n        }\n\n        bool get_item( T &v ) {\n            queueing_port_operation op_data(&v, get__item);\n            my_aggregator.execute(&op_data);\n            return op_data.status == SUCCEEDED;\n        }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        bool get_item( T& v, message_metainfo& metainfo ) {\n            queueing_port_operation op_data(&v, get__item, metainfo);\n            my_aggregator.execute(&op_data);\n            return op_data.status == SUCCEEDED;\n        }\n#endif\n\n        // reset_port is called when item is accepted by successor, but\n        // is initiated by join_node.\n        void reset_port() {\n            queueing_port_operation op_data(res_port);\n            my_aggregator.execute(&op_data);\n            return;\n        }\n\n        void reset_receiver(reset_flags) {\n            item_buffer<T>::reset();\n        }\n\n    private:\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n        friend class get_graph_helper;\n#endif\n\n        queueing_forwarding_base *my_join;\n    };  // queueing_port\n\n#include \"_flow_graph_tagged_buffer_impl.h\"\n\n    template<typename K>\n    struct count_element {\n        K my_key;\n        size_t my_value;\n    };\n\n    // method to access the key in the counting table\n    // the ref has already been removed from K\n    template< typename K >\n    struct key_to_count_functor {\n        typedef count_element<K> table_item_type;\n        const K& operator()(const table_item_type& v) { return v.my_key; }\n    };\n\n    template <typename K, typename T, typename TtoK, typename KHash>\n    struct key_matching_port_base {\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        using type = metainfo_hash_buffer<K, T, TtoK, KHash>;\n#else\n        using type = hash_buffer<K, T, TtoK, KHash>;\n#endif\n    };\n\n    // the ports can have only one template parameter.  We wrap the types needed in\n    // a traits type\n    template< class TraitsType >\n    class key_matching_port :\n        public receiver<typename TraitsType::T>,\n        public key_matching_port_base< typename TraitsType::K, typename TraitsType::T, typename TraitsType::TtoK,\n                                       typename TraitsType::KHash >::type\n    {\n    public:\n        typedef TraitsType traits;\n        typedef key_matching_port<traits> class_type;\n        typedef typename TraitsType::T input_type;\n        typedef typename TraitsType::K key_type;\n        typedef typename std::decay<key_type>::type noref_key_type;\n        typedef typename receiver<input_type>::predecessor_type predecessor_type;\n        typedef typename TraitsType::TtoK type_to_key_func_type;\n        typedef typename TraitsType::KHash hash_compare_type;\n        typedef typename key_matching_port_base<key_type, input_type, type_to_key_func_type, hash_compare_type>::type buffer_type;\n\n    private:\n// ----------- Aggregator ------------\n    private:\n        enum op_type { try__put, get__item, res_port\n        };\n\n        class key_matching_port_operation : public d1::aggregated_operation<key_matching_port_operation> {\n        public:\n            char type;\n            input_type my_val;\n            input_type *my_arg;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            message_metainfo* metainfo = nullptr;\n#endif\n            // constructor for value parameter\n            key_matching_port_operation(const input_type& e, op_type t\n                                        __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& info))\n                : type(char(t)), my_val(e), my_arg(nullptr)\n                  __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo(const_cast<message_metainfo*>(&info))) {}\n\n            // constructor for pointer parameter\n            key_matching_port_operation(const input_type* p, op_type t\n                                        __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo& info))\n                : type(char(t)), my_arg(const_cast<input_type*>(p))\n                  __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo(&info)) {}\n\n            // constructor with no parameter\n            key_matching_port_operation(op_type t) : type(char(t)), my_arg(nullptr) {}\n        };\n\n        typedef d1::aggregating_functor<class_type, key_matching_port_operation> handler_type;\n        friend class d1::aggregating_functor<class_type, key_matching_port_operation>;\n        d1::aggregator<handler_type, key_matching_port_operation> my_aggregator;\n\n        void handle_operations(key_matching_port_operation* op_list) {\n            key_matching_port_operation *current;\n            while(op_list) {\n                current = op_list;\n                op_list = op_list->next;\n                switch(current->type) {\n                case try__put: {\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n                        __TBB_ASSERT(current->metainfo, nullptr);\n                        bool was_inserted = this->insert_with_key(current->my_val, *(current->metainfo));\n#else\n                        bool was_inserted = this->insert_with_key(current->my_val);\n#endif\n                        // return failure if a duplicate insertion occurs\n                        current->status.store( was_inserted ? SUCCEEDED : FAILED, std::memory_order_release);\n                    }\n                    break;\n                case get__item: {\n                    // use current_key from FE for item\n                    __TBB_ASSERT(current->my_arg, nullptr);\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n                    __TBB_ASSERT(current->metainfo, nullptr);\n                    bool find_result = this->find_with_key(my_join->current_key, *(current->my_arg),\n                                                           *(current->metainfo));\n#else\n                    bool find_result = this->find_with_key(my_join->current_key, *(current->my_arg));\n#endif\n#if TBB_USE_DEBUG\n                    if (!find_result) {\n                        __TBB_ASSERT(false, \"Failed to find item corresponding to current_key.\");\n                    }\n#else\n                    tbb::detail::suppress_unused_warning(find_result);\n#endif\n                    current->status.store( SUCCEEDED, std::memory_order_release);\n                    }\n                    break;\n                case res_port:\n                    // use current_key from FE for item\n                    this->delete_with_key(my_join->current_key);\n                    current->status.store( SUCCEEDED, std::memory_order_release);\n                    break;\n                }\n            }\n        }\n// ------------ End Aggregator ---------------\n    protected:\n        template< typename R, typename B > friend class run_and_put_task;\n        template<typename X, typename Y> friend class broadcast_cache;\n        template<typename X, typename Y> friend class round_robin_cache;\n    private:\n        graph_task* try_put_task_impl(const input_type& v __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo)) {\n            key_matching_port_operation op_data(v, try__put __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n            graph_task* rtask = nullptr;\n            my_aggregator.execute(&op_data);\n            if(op_data.status == SUCCEEDED) {\n                rtask = my_join->increment_key_count((*(this->get_key_func()))(v)); // may spawn\n                // rtask has to reflect the return status of the try_put\n                if(!rtask) rtask = SUCCESSFULLY_ENQUEUED;\n            }\n            return rtask;\n        }\n    protected:\n        graph_task* try_put_task(const input_type& v) override {\n            return try_put_task_impl(v __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo{}));\n        }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        graph_task* try_put_task(const input_type& v, const message_metainfo& metainfo) override {\n            return try_put_task_impl(v, metainfo);\n        }\n#endif\n\n        graph& graph_reference() const override {\n            return my_join->graph_ref;\n        }\n\n    public:\n\n        key_matching_port() : receiver<input_type>(), buffer_type() {\n            my_join = nullptr;\n            my_aggregator.initialize_handler(handler_type(this));\n        }\n\n        // copy constructor\n        key_matching_port(const key_matching_port& /*other*/) = delete;\n#if __INTEL_COMPILER <= 2021\n        // Suppress superfluous diagnostic about virtual keyword absence in a destructor of an inherited\n        // class while the parent class has the virtual keyword for the destrocutor.\n        virtual\n#endif\n        ~key_matching_port() { }\n\n        void set_join_node_pointer(forwarding_base *join) {\n            my_join = dynamic_cast<matching_forwarding_base<key_type>*>(join);\n        }\n\n        void set_my_key_func(type_to_key_func_type *f) { this->set_key_func(f); }\n\n        type_to_key_func_type* get_my_key_func() { return this->get_key_func(); }\n\n        bool get_item( input_type &v ) {\n            // aggregator uses current_key from FE for Key\n            key_matching_port_operation op_data(&v, get__item);\n            my_aggregator.execute(&op_data);\n            return op_data.status == SUCCEEDED;\n        }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        bool get_item( input_type& v, message_metainfo& metainfo ) {\n            // aggregator uses current_key from FE for Key\n            key_matching_port_operation op_data(&v, get__item, metainfo);\n            my_aggregator.execute(&op_data);\n            return op_data.status == SUCCEEDED;\n        }\n#endif\n\n        // reset_port is called when item is accepted by successor, but\n        // is initiated by join_node.\n        void reset_port() {\n            key_matching_port_operation op_data(res_port);\n            my_aggregator.execute(&op_data);\n            return;\n        }\n\n        void reset_receiver(reset_flags ) {\n            buffer_type::reset();\n        }\n\n    private:\n        // my_join forwarding base used to count number of inputs that\n        // received key.\n        matching_forwarding_base<key_type> *my_join;\n    };  // key_matching_port\n\n    using namespace graph_policy_namespace;\n\n    template<typename JP, typename InputTuple, typename OutputTuple>\n    class join_node_base;\n\n    //! join_node_FE : implements input port policy\n    template<typename JP, typename InputTuple, typename OutputTuple>\n    class join_node_FE;\n\n    template<typename InputTuple, typename OutputTuple>\n    class join_node_FE<reserving, InputTuple, OutputTuple> : public reserving_forwarding_base {\n    private:\n        static const int N = std::tuple_size<OutputTuple>::value;\n        typedef OutputTuple output_type;\n        typedef InputTuple input_type;\n        typedef join_node_base<reserving, InputTuple, OutputTuple> base_node_type; // for forwarding\n    public:\n        join_node_FE(graph &g) : reserving_forwarding_base(g), my_node(nullptr) {\n            ports_with_no_inputs = N;\n            join_helper<N>::set_join_node_pointer(my_inputs, this);\n        }\n\n        join_node_FE(const join_node_FE& other) : reserving_forwarding_base((other.reserving_forwarding_base::graph_ref)), my_node(nullptr) {\n            ports_with_no_inputs = N;\n            join_helper<N>::set_join_node_pointer(my_inputs, this);\n        }\n\n        void set_my_node(base_node_type *new_my_node) { my_node = new_my_node; }\n\n       void increment_port_count() override {\n            ++ports_with_no_inputs;\n        }\n\n        // if all input_ports have predecessors, spawn forward to try and consume tuples\n        graph_task* decrement_port_count() override {\n            if(ports_with_no_inputs.fetch_sub(1) == 1) {\n                if(is_graph_active(this->graph_ref)) {\n                    d1::small_object_allocator allocator{};\n                    typedef forward_task_bypass<base_node_type> task_type;\n                    graph_task* t = allocator.new_object<task_type>(graph_ref, allocator, *my_node);\n                    spawn_in_graph_arena(this->graph_ref, *t);\n                }\n            }\n            return nullptr;\n        }\n\n        input_type &input_ports() { return my_inputs; }\n\n    protected:\n\n        void reset(  reset_flags f) {\n            // called outside of parallel contexts\n            ports_with_no_inputs = N;\n            join_helper<N>::reset_inputs(my_inputs, f);\n        }\n\n        // all methods on input ports should be called under mutual exclusion from join_node_base.\n\n        bool tuple_build_may_succeed() {\n            return !ports_with_no_inputs;\n        }\n\n        bool try_to_make_tuple(output_type &out) {\n            if(ports_with_no_inputs) return false;\n            return join_helper<N>::reserve(my_inputs, out);\n        }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        bool try_to_make_tuple(output_type &out, message_metainfo& metainfo) {\n            if (ports_with_no_inputs) return false;\n            return join_helper<N>::reserve(my_inputs, out, metainfo);\n        }\n#endif\n\n        void tuple_accepted() {\n            join_helper<N>::consume_reservations(my_inputs);\n        }\n        void tuple_rejected() {\n            join_helper<N>::release_reservations(my_inputs);\n        }\n\n        input_type my_inputs;\n        base_node_type *my_node;\n        std::atomic<std::size_t> ports_with_no_inputs;\n    };  // join_node_FE<reserving, ... >\n\n    template<typename InputTuple, typename OutputTuple>\n    class join_node_FE<queueing, InputTuple, OutputTuple> : public queueing_forwarding_base {\n    public:\n        static const int N = std::tuple_size<OutputTuple>::value;\n        typedef OutputTuple output_type;\n        typedef InputTuple input_type;\n        typedef join_node_base<queueing, InputTuple, OutputTuple> base_node_type; // for forwarding\n\n        join_node_FE(graph &g) : queueing_forwarding_base(g), my_node(nullptr) {\n            ports_with_no_items = N;\n            join_helper<N>::set_join_node_pointer(my_inputs, this);\n        }\n\n        join_node_FE(const join_node_FE& other) : queueing_forwarding_base((other.queueing_forwarding_base::graph_ref)), my_node(nullptr) {\n            ports_with_no_items = N;\n            join_helper<N>::set_join_node_pointer(my_inputs, this);\n        }\n\n        // needed for forwarding\n        void set_my_node(base_node_type *new_my_node) { my_node = new_my_node; }\n\n        void reset_port_count() {\n            ports_with_no_items = N;\n        }\n\n        // if all input_ports have items, spawn forward to try and consume tuples\n        graph_task* decrement_port_count(bool handle_task) override\n        {\n            if(ports_with_no_items.fetch_sub(1) == 1) {\n                if(is_graph_active(this->graph_ref)) {\n                    d1::small_object_allocator allocator{};\n                    typedef forward_task_bypass<base_node_type> task_type;\n                    graph_task* t = allocator.new_object<task_type>(graph_ref, allocator, *my_node);\n                    if( !handle_task )\n                        return t;\n                    spawn_in_graph_arena(this->graph_ref, *t);\n                }\n            }\n            return nullptr;\n        }\n\n        input_type &input_ports() { return my_inputs; }\n\n    protected:\n\n        void reset(  reset_flags f) {\n            reset_port_count();\n            join_helper<N>::reset_inputs(my_inputs, f );\n        }\n\n        // all methods on input ports should be called under mutual exclusion from join_node_base.\n\n        bool tuple_build_may_succeed() {\n            return !ports_with_no_items;\n        }\n\n        bool try_to_make_tuple(output_type &out) {\n            if(ports_with_no_items) return false;\n            return join_helper<N>::get_items(my_inputs, out);\n        }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        bool try_to_make_tuple(output_type &out, message_metainfo& metainfo) {\n            if(ports_with_no_items) return false;\n            return join_helper<N>::get_items(my_inputs, out, metainfo);\n        }\n#endif\n\n        void tuple_accepted() {\n            reset_port_count();\n            join_helper<N>::reset_ports(my_inputs);\n        }\n        void tuple_rejected() {\n            // nothing to do.\n        }\n\n        input_type my_inputs;\n        base_node_type *my_node;\n        std::atomic<std::size_t> ports_with_no_items;\n    };  // join_node_FE<queueing, ...>\n\n    // key_matching join front-end.\n    template<typename InputTuple, typename OutputTuple, typename K, typename KHash>\n    class join_node_FE<key_matching<K,KHash>, InputTuple, OutputTuple> : public matching_forwarding_base<K>,\n             // buffer of key value counts\n              public hash_buffer<   // typedefed below to key_to_count_buffer_type\n                  typename std::decay<K>::type&,        // force ref type on K\n                  count_element<typename std::decay<K>::type>,\n                  type_to_key_function_body<\n                      count_element<typename std::decay<K>::type>,\n                      typename std::decay<K>::type& >,\n                  KHash >,\n             // buffer of output items\n             public item_buffer<OutputTuple> {\n    public:\n        static const int N = std::tuple_size<OutputTuple>::value;\n        typedef OutputTuple output_type;\n        typedef InputTuple input_type;\n        typedef K key_type;\n        typedef typename std::decay<key_type>::type unref_key_type;\n        typedef KHash key_hash_compare;\n        // must use K without ref.\n        typedef count_element<unref_key_type> count_element_type;\n        // method that lets us refer to the key of this type.\n        typedef key_to_count_functor<unref_key_type> key_to_count_func;\n        typedef type_to_key_function_body< count_element_type, unref_key_type&> TtoK_function_body_type;\n        typedef type_to_key_function_body_leaf<count_element_type, unref_key_type&, key_to_count_func> TtoK_function_body_leaf_type;\n        // this is the type of the special table that keeps track of the number of discrete\n        // elements corresponding to each key that we've seen.\n        typedef hash_buffer< unref_key_type&, count_element_type, TtoK_function_body_type, key_hash_compare >\n                 key_to_count_buffer_type;\n        typedef item_buffer<output_type> output_buffer_type;\n        typedef join_node_base<key_matching<key_type,key_hash_compare>, InputTuple, OutputTuple> base_node_type; // for forwarding\n        typedef matching_forwarding_base<key_type> forwarding_base_type;\n\n// ----------- Aggregator ------------\n        // the aggregator is only needed to serialize the access to the hash table.\n        // and the output_buffer_type base class\n    private:\n        enum op_type { res_count, inc_count, may_succeed, try_make };\n        typedef join_node_FE<key_matching<key_type,key_hash_compare>, InputTuple, OutputTuple> class_type;\n\n        class key_matching_FE_operation : public d1::aggregated_operation<key_matching_FE_operation> {\n        public:\n            char type;\n            unref_key_type my_val;\n            output_type* my_output;\n            graph_task* bypass_t;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            message_metainfo* metainfo = nullptr;\n#endif\n            // constructor for value parameter\n            key_matching_FE_operation(const unref_key_type& e , op_type t) : type(char(t)), my_val(e),\n                 my_output(nullptr), bypass_t(nullptr) {}\n            key_matching_FE_operation(output_type *p, op_type t) : type(char(t)), my_output(p), bypass_t(nullptr) {}\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            key_matching_FE_operation(output_type *p, op_type t, message_metainfo& info)\n                : type(char(t)), my_output(p), bypass_t(nullptr), metainfo(&info) {}\n#endif\n            // constructor with no parameter\n            key_matching_FE_operation(op_type t) : type(char(t)), my_output(nullptr), bypass_t(nullptr) {}\n        };\n\n        typedef d1::aggregating_functor<class_type, key_matching_FE_operation> handler_type;\n        friend class d1::aggregating_functor<class_type, key_matching_FE_operation>;\n        d1::aggregator<handler_type, key_matching_FE_operation> my_aggregator;\n\n        // called from aggregator, so serialized\n        // returns a task pointer if the a task would have been enqueued but we asked that\n        // it be returned.  Otherwise returns nullptr.\n        graph_task* fill_output_buffer(unref_key_type &t) {\n            output_type l_out;\n            graph_task* rtask = nullptr;\n            bool do_fwd = this->buffer_empty() && is_graph_active(this->graph_ref);\n            this->current_key = t;\n            this->delete_with_key(this->current_key);   // remove the key\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            message_metainfo metainfo;\n#endif\n            if(join_helper<N>::get_items(my_inputs, l_out __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo))) {  //  <== call back\n                this->push_back(l_out __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n                if(do_fwd) {  // we enqueue if receiving an item from predecessor, not if successor asks for item\n                    d1::small_object_allocator allocator{};\n                    typedef forward_task_bypass<base_node_type> task_type;\n                    rtask = allocator.new_object<task_type>(this->graph_ref, allocator, *my_node);\n                    do_fwd = false;\n                }\n                // retire the input values\n                join_helper<N>::reset_ports(my_inputs);  //  <== call back\n            }\n            else {\n                __TBB_ASSERT(false, \"should have had something to push\");\n            }\n            return rtask;\n        }\n\n        void handle_operations(key_matching_FE_operation* op_list) {\n            key_matching_FE_operation *current;\n            while(op_list) {\n                current = op_list;\n                op_list = op_list->next;\n                switch(current->type) {\n                case res_count:  // called from BE\n                    {\n                        this->destroy_front();\n                        current->status.store( SUCCEEDED, std::memory_order_release);\n                    }\n                    break;\n                case inc_count: {  // called from input ports\n                        count_element_type *p = nullptr;\n                        unref_key_type &t = current->my_val;\n                        if(!(this->find_ref_with_key(t,p))) {\n                            count_element_type ev;\n                            ev.my_key = t;\n                            ev.my_value = 0;\n                            this->insert_with_key(ev);\n                            bool found = this->find_ref_with_key(t, p);\n                            __TBB_ASSERT_EX(found, \"should find key after inserting it\");\n                        }\n                        if(++(p->my_value) == size_t(N)) {\n                            current->bypass_t = fill_output_buffer(t);\n                        }\n                    }\n                    current->status.store( SUCCEEDED, std::memory_order_release);\n                    break;\n                case may_succeed:  // called from BE\n                    current->status.store( this->buffer_empty() ? FAILED : SUCCEEDED, std::memory_order_release);\n                    break;\n                case try_make:  // called from BE\n                    if(this->buffer_empty()) {\n                        current->status.store( FAILED, std::memory_order_release);\n                    }\n                    else {\n                        *(current->my_output) = this->front();\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n                        if (current->metainfo) {\n                            *(current->metainfo) = this->front_metainfo();\n                        }\n#endif\n                        current->status.store( SUCCEEDED, std::memory_order_release);\n                    }\n                    break;\n                }\n            }\n        }\n// ------------ End Aggregator ---------------\n\n    public:\n        template<typename FunctionTuple>\n        join_node_FE(graph &g, FunctionTuple &TtoK_funcs) : forwarding_base_type(g), my_node(nullptr) {\n            join_helper<N>::set_join_node_pointer(my_inputs, this);\n            join_helper<N>::set_key_functors(my_inputs, TtoK_funcs);\n            my_aggregator.initialize_handler(handler_type(this));\n                    TtoK_function_body_type *cfb = new TtoK_function_body_leaf_type(key_to_count_func());\n            this->set_key_func(cfb);\n        }\n\n        join_node_FE(const join_node_FE& other) : forwarding_base_type((other.forwarding_base_type::graph_ref)), key_to_count_buffer_type(),\n        output_buffer_type() {\n            my_node = nullptr;\n            join_helper<N>::set_join_node_pointer(my_inputs, this);\n            join_helper<N>::copy_key_functors(my_inputs, const_cast<input_type &>(other.my_inputs));\n            my_aggregator.initialize_handler(handler_type(this));\n            TtoK_function_body_type *cfb = new TtoK_function_body_leaf_type(key_to_count_func());\n            this->set_key_func(cfb);\n        }\n\n        // needed for forwarding\n        void set_my_node(base_node_type *new_my_node) { my_node = new_my_node; }\n\n        void reset_port_count() {  // called from BE\n            key_matching_FE_operation op_data(res_count);\n            my_aggregator.execute(&op_data);\n            return;\n        }\n\n        // if all input_ports have items, spawn forward to try and consume tuples\n        // return a task if we are asked and did create one.\n        graph_task *increment_key_count(unref_key_type const & t) override {  // called from input_ports\n            key_matching_FE_operation op_data(t, inc_count);\n            my_aggregator.execute(&op_data);\n            return op_data.bypass_t;\n        }\n\n        input_type &input_ports() { return my_inputs; }\n\n    protected:\n\n        void reset(  reset_flags f ) {\n            // called outside of parallel contexts\n            join_helper<N>::reset_inputs(my_inputs, f);\n\n            key_to_count_buffer_type::reset();\n            output_buffer_type::reset();\n        }\n\n        // all methods on input ports should be called under mutual exclusion from join_node_base.\n\n        bool tuple_build_may_succeed() {  // called from back-end\n            key_matching_FE_operation op_data(may_succeed);\n            my_aggregator.execute(&op_data);\n            return op_data.status == SUCCEEDED;\n        }\n\n        // cannot lock while calling back to input_ports.  current_key will only be set\n        // and reset under the aggregator, so it will remain consistent.\n        bool try_to_make_tuple(output_type &out) {\n            key_matching_FE_operation op_data(&out,try_make);\n            my_aggregator.execute(&op_data);\n            return op_data.status == SUCCEEDED;\n        }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        bool try_to_make_tuple(output_type &out, message_metainfo& metainfo) {\n            key_matching_FE_operation op_data(&out, try_make, metainfo);\n            my_aggregator.execute(&op_data);\n            return op_data.status == SUCCEEDED;\n        }\n#endif\n\n        void tuple_accepted() {\n            reset_port_count();  // reset current_key after ports reset.\n        }\n\n        void tuple_rejected() {\n            // nothing to do.\n        }\n\n        input_type my_inputs;  // input ports\n        base_node_type *my_node;\n    }; // join_node_FE<key_matching<K,KHash>, InputTuple, OutputTuple>\n\n    //! join_node_base\n    template<typename JP, typename InputTuple, typename OutputTuple>\n    class join_node_base : public graph_node, public join_node_FE<JP, InputTuple, OutputTuple>,\n                           public sender<OutputTuple> {\n    protected:\n        using graph_node::my_graph;\n    public:\n        typedef OutputTuple output_type;\n\n        typedef typename sender<output_type>::successor_type successor_type;\n        typedef join_node_FE<JP, InputTuple, OutputTuple> input_ports_type;\n        using input_ports_type::tuple_build_may_succeed;\n        using input_ports_type::try_to_make_tuple;\n        using input_ports_type::tuple_accepted;\n        using input_ports_type::tuple_rejected;\n\n    private:\n        // ----------- Aggregator ------------\n        enum op_type { reg_succ, rem_succ, try__get, do_fwrd, do_fwrd_bypass\n        };\n        typedef join_node_base<JP,InputTuple,OutputTuple> class_type;\n\n        class join_node_base_operation : public d1::aggregated_operation<join_node_base_operation> {\n        public:\n            char type;\n            union {\n                output_type *my_arg;\n                successor_type *my_succ;\n            };\n            graph_task* bypass_t;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            message_metainfo* metainfo;\n#endif\n            join_node_base_operation(const output_type& e, op_type t __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo& info))\n                : type(char(t)), my_arg(const_cast<output_type*>(&e)), bypass_t(nullptr)\n                  __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo(&info)) {}\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            join_node_base_operation(const output_type& e, op_type t)\n                : type(char(t)), my_arg(const_cast<output_type*>(&e)), bypass_t(nullptr), metainfo(nullptr) {}\n#endif\n            join_node_base_operation(const successor_type &s, op_type t) : type(char(t)),\n                my_succ(const_cast<successor_type *>(&s)), bypass_t(nullptr) {}\n            join_node_base_operation(op_type t) : type(char(t)), bypass_t(nullptr) {}\n        };\n\n        typedef d1::aggregating_functor<class_type, join_node_base_operation> handler_type;\n        friend class d1::aggregating_functor<class_type, join_node_base_operation>;\n        bool forwarder_busy;\n        d1::aggregator<handler_type, join_node_base_operation> my_aggregator;\n\n        void handle_operations(join_node_base_operation* op_list) {\n            join_node_base_operation *current;\n            while(op_list) {\n                current = op_list;\n                op_list = op_list->next;\n                switch(current->type) {\n                case reg_succ: {\n                        my_successors.register_successor(*(current->my_succ));\n                        if(tuple_build_may_succeed() && !forwarder_busy && is_graph_active(my_graph)) {\n                            d1::small_object_allocator allocator{};\n                            typedef forward_task_bypass< join_node_base<JP, InputTuple, OutputTuple> > task_type;\n                            graph_task* t = allocator.new_object<task_type>(my_graph, allocator, *this);\n                            spawn_in_graph_arena(my_graph, *t);\n                            forwarder_busy = true;\n                        }\n                        current->status.store( SUCCEEDED, std::memory_order_release);\n                    }\n                    break;\n                case rem_succ:\n                    my_successors.remove_successor(*(current->my_succ));\n                    current->status.store( SUCCEEDED, std::memory_order_release);\n                    break;\n                case try__get:\n                    if(tuple_build_may_succeed()) {\n                        bool make_tuple_result = false;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n                        if (current->metainfo) {\n                            make_tuple_result = try_to_make_tuple(*(current->my_arg), *(current->metainfo));\n                        } else\n#endif\n                        {\n                            make_tuple_result = try_to_make_tuple(*(current->my_arg));\n                        }\n                        if(make_tuple_result) {\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n                            if (current->metainfo) {\n                                // Since elements would be removed from queues while calling to tuple_accepted\n                                // together with corresponding message_metainfo objects\n                                // we need to prolong the wait until the successor would create a task for removed elements\n                                for (auto waiter : current->metainfo->waiters()) {\n                                    waiter->reserve(1);\n                                }\n                            }\n#endif\n                            tuple_accepted();\n                            current->status.store( SUCCEEDED, std::memory_order_release);\n                        }\n                        else current->status.store( FAILED, std::memory_order_release);\n                    }\n                    else current->status.store( FAILED, std::memory_order_release);\n                    break;\n                case do_fwrd_bypass: {\n                        bool build_succeeded;\n                        graph_task *last_task = nullptr;\n                        output_type out;\n                        // forwarding must be exclusive, because try_to_make_tuple and tuple_accepted\n                        // are separate locked methods in the FE.  We could conceivably fetch the front\n                        // of the FE queue, then be swapped out, have someone else consume the FE's\n                        // object, then come back, forward, and then try to remove it from the queue\n                        // again. Without reservation of the FE, the methods accessing it must be locked.\n                        // We could remember the keys of the objects we forwarded, and then remove\n                        // them from the input ports after forwarding is complete?\n                        if(tuple_build_may_succeed()) {  // checks output queue of FE\n                            do {\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n                                message_metainfo metainfo;\n#endif\n                                // fetch front_end of queue\n                                build_succeeded = try_to_make_tuple(out __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n                                if(build_succeeded) {\n                                    graph_task *new_task =\n                                        my_successors.try_put_task(out __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n                                    last_task = combine_tasks(my_graph, last_task, new_task);\n                                    if(new_task) {\n                                        tuple_accepted();\n                                    }\n                                    else {\n                                        tuple_rejected();\n                                        build_succeeded = false;\n                                    }\n                                }\n                            } while(build_succeeded);\n                        }\n                        current->bypass_t = last_task;\n                        current->status.store( SUCCEEDED, std::memory_order_release);\n                        forwarder_busy = false;\n                    }\n                    break;\n                }\n            }\n        }\n        // ---------- end aggregator -----------\n    public:\n        join_node_base(graph &g)\n            : graph_node(g), input_ports_type(g), forwarder_busy(false), my_successors(this)\n        {\n            input_ports_type::set_my_node(this);\n            my_aggregator.initialize_handler(handler_type(this));\n        }\n\n        join_node_base(const join_node_base& other) :\n            graph_node(other.graph_node::my_graph), input_ports_type(other),\n            sender<OutputTuple>(), forwarder_busy(false), my_successors(this)\n        {\n            input_ports_type::set_my_node(this);\n            my_aggregator.initialize_handler(handler_type(this));\n        }\n\n        template<typename FunctionTuple>\n        join_node_base(graph &g, FunctionTuple f)\n            : graph_node(g), input_ports_type(g, f), forwarder_busy(false), my_successors(this)\n        {\n            input_ports_type::set_my_node(this);\n            my_aggregator.initialize_handler(handler_type(this));\n        }\n\n        bool register_successor(successor_type &r) override {\n            join_node_base_operation op_data(r, reg_succ);\n            my_aggregator.execute(&op_data);\n            return op_data.status == SUCCEEDED;\n        }\n\n        bool remove_successor( successor_type &r) override {\n            join_node_base_operation op_data(r, rem_succ);\n            my_aggregator.execute(&op_data);\n            return op_data.status == SUCCEEDED;\n        }\n\n        bool try_get( output_type &v) override {\n            join_node_base_operation op_data(v, try__get);\n            my_aggregator.execute(&op_data);\n            return op_data.status == SUCCEEDED;\n        }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        bool try_get( output_type &v, message_metainfo& metainfo) override {\n            join_node_base_operation op_data(v, try__get, metainfo);\n            my_aggregator.execute(&op_data);\n            return op_data.status == SUCCEEDED;\n        }\n#endif\n\n    protected:\n        void reset_node(reset_flags f) override {\n            input_ports_type::reset(f);\n            if(f & rf_clear_edges) my_successors.clear();\n        }\n\n    private:\n        broadcast_cache<output_type, null_rw_mutex> my_successors;\n\n        friend class forward_task_bypass< join_node_base<JP, InputTuple, OutputTuple> >;\n        graph_task *forward_task() {\n            join_node_base_operation op_data(do_fwrd_bypass);\n            my_aggregator.execute(&op_data);\n            return op_data.bypass_t;\n        }\n\n    };  // join_node_base\n\n    // join base class type generator\n    template<int N, template<class> class PT, typename OutputTuple, typename JP>\n    struct join_base {\n        typedef join_node_base<JP, typename wrap_tuple_elements<N,PT,OutputTuple>::type, OutputTuple> type;\n    };\n\n    template<int N, typename OutputTuple, typename K, typename KHash>\n    struct join_base<N, key_matching_port, OutputTuple, key_matching<K,KHash> > {\n        typedef key_matching<K, KHash> key_traits_type;\n        typedef K key_type;\n        typedef KHash key_hash_compare;\n        typedef join_node_base< key_traits_type,\n                // ports type\n                typename wrap_key_tuple_elements<N,key_matching_port,key_traits_type,OutputTuple>::type,\n                OutputTuple > type;\n    };\n\n    //! unfolded_join_node : passes input_ports_type to join_node_base.  We build the input port type\n    //  using tuple_element.  The class PT is the port type (reserving_port, queueing_port, key_matching_port)\n    //  and should match the typename.\n\n    template<int M, template<class> class PT, typename OutputTuple, typename JP>\n    class unfolded_join_node : public join_base<M,PT,OutputTuple,JP>::type {\n    public:\n        typedef typename wrap_tuple_elements<M, PT, OutputTuple>::type input_ports_type;\n        typedef OutputTuple output_type;\n    private:\n        typedef join_node_base<JP, input_ports_type, output_type > base_type;\n    public:\n        unfolded_join_node(graph &g) : base_type(g) {}\n        unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}\n    };\n\n#if __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING\n    template <typename K, typename T>\n    struct key_from_message_body {\n        K operator()(const T& t) const {\n            return key_from_message<K>(t);\n        }\n    };\n    // Adds const to reference type\n    template <typename K, typename T>\n    struct key_from_message_body<K&,T> {\n        const K& operator()(const T& t) const {\n            return key_from_message<const K&>(t);\n        }\n    };\n#endif /* __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING */\n    // key_matching unfolded_join_node.  This must be a separate specialization because the constructors\n    // differ.\n\n    template<typename OutputTuple, typename K, typename KHash>\n    class unfolded_join_node<2,key_matching_port,OutputTuple,key_matching<K,KHash> > : public\n            join_base<2,key_matching_port,OutputTuple,key_matching<K,KHash> >::type {\n        typedef typename std::tuple_element<0, OutputTuple>::type T0;\n        typedef typename std::tuple_element<1, OutputTuple>::type T1;\n    public:\n        typedef typename wrap_key_tuple_elements<2,key_matching_port,key_matching<K,KHash>,OutputTuple>::type input_ports_type;\n        typedef OutputTuple output_type;\n    private:\n        typedef join_node_base<key_matching<K,KHash>, input_ports_type, output_type > base_type;\n        typedef type_to_key_function_body<T0, K> *f0_p;\n        typedef type_to_key_function_body<T1, K> *f1_p;\n        typedef std::tuple< f0_p, f1_p > func_initializer_type;\n    public:\n#if __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING\n        unfolded_join_node(graph &g) : base_type(g,\n                func_initializer_type(\n                    new type_to_key_function_body_leaf<T0, K, key_from_message_body<K,T0> >(key_from_message_body<K,T0>()),\n                    new type_to_key_function_body_leaf<T1, K, key_from_message_body<K,T1> >(key_from_message_body<K,T1>())\n                    ) ) {\n        }\n#endif /* __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING */\n        template<typename Body0, typename Body1>\n        unfolded_join_node(graph &g, Body0 body0, Body1 body1) : base_type(g,\n                func_initializer_type(\n                    new type_to_key_function_body_leaf<T0, K, Body0>(body0),\n                    new type_to_key_function_body_leaf<T1, K, Body1>(body1)\n                    ) ) {\n            static_assert(std::tuple_size<OutputTuple>::value == 2, \"wrong number of body initializers\");\n        }\n        unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}\n    };\n\n    template<typename OutputTuple, typename K, typename KHash>\n    class unfolded_join_node<3,key_matching_port,OutputTuple,key_matching<K,KHash> > : public\n            join_base<3,key_matching_port,OutputTuple,key_matching<K,KHash> >::type {\n        typedef typename std::tuple_element<0, OutputTuple>::type T0;\n        typedef typename std::tuple_element<1, OutputTuple>::type T1;\n        typedef typename std::tuple_element<2, OutputTuple>::type T2;\n    public:\n        typedef typename wrap_key_tuple_elements<3,key_matching_port,key_matching<K,KHash>,OutputTuple>::type input_ports_type;\n        typedef OutputTuple output_type;\n    private:\n        typedef join_node_base<key_matching<K,KHash>, input_ports_type, output_type > base_type;\n        typedef type_to_key_function_body<T0, K> *f0_p;\n        typedef type_to_key_function_body<T1, K> *f1_p;\n        typedef type_to_key_function_body<T2, K> *f2_p;\n        typedef std::tuple< f0_p, f1_p, f2_p > func_initializer_type;\n    public:\n#if __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING\n        unfolded_join_node(graph &g) : base_type(g,\n                func_initializer_type(\n                    new type_to_key_function_body_leaf<T0, K, key_from_message_body<K,T0> >(key_from_message_body<K,T0>()),\n                    new type_to_key_function_body_leaf<T1, K, key_from_message_body<K,T1> >(key_from_message_body<K,T1>()),\n                    new type_to_key_function_body_leaf<T2, K, key_from_message_body<K,T2> >(key_from_message_body<K,T2>())\n                    ) ) {\n        }\n#endif /* __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING */\n        template<typename Body0, typename Body1, typename Body2>\n        unfolded_join_node(graph &g, Body0 body0, Body1 body1, Body2 body2) : base_type(g,\n                func_initializer_type(\n                    new type_to_key_function_body_leaf<T0, K, Body0>(body0),\n                    new type_to_key_function_body_leaf<T1, K, Body1>(body1),\n                    new type_to_key_function_body_leaf<T2, K, Body2>(body2)\n                    ) ) {\n            static_assert(std::tuple_size<OutputTuple>::value == 3, \"wrong number of body initializers\");\n        }\n        unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}\n    };\n\n    template<typename OutputTuple, typename K, typename KHash>\n    class unfolded_join_node<4,key_matching_port,OutputTuple,key_matching<K,KHash> > : public\n            join_base<4,key_matching_port,OutputTuple,key_matching<K,KHash> >::type {\n        typedef typename std::tuple_element<0, OutputTuple>::type T0;\n        typedef typename std::tuple_element<1, OutputTuple>::type T1;\n        typedef typename std::tuple_element<2, OutputTuple>::type T2;\n        typedef typename std::tuple_element<3, OutputTuple>::type T3;\n    public:\n        typedef typename wrap_key_tuple_elements<4,key_matching_port,key_matching<K,KHash>,OutputTuple>::type input_ports_type;\n        typedef OutputTuple output_type;\n    private:\n        typedef join_node_base<key_matching<K,KHash>, input_ports_type, output_type > base_type;\n        typedef type_to_key_function_body<T0, K> *f0_p;\n        typedef type_to_key_function_body<T1, K> *f1_p;\n        typedef type_to_key_function_body<T2, K> *f2_p;\n        typedef type_to_key_function_body<T3, K> *f3_p;\n        typedef std::tuple< f0_p, f1_p, f2_p, f3_p > func_initializer_type;\n    public:\n#if __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING\n        unfolded_join_node(graph &g) : base_type(g,\n                func_initializer_type(\n                    new type_to_key_function_body_leaf<T0, K, key_from_message_body<K,T0> >(key_from_message_body<K,T0>()),\n                    new type_to_key_function_body_leaf<T1, K, key_from_message_body<K,T1> >(key_from_message_body<K,T1>()),\n                    new type_to_key_function_body_leaf<T2, K, key_from_message_body<K,T2> >(key_from_message_body<K,T2>()),\n                    new type_to_key_function_body_leaf<T3, K, key_from_message_body<K,T3> >(key_from_message_body<K,T3>())\n                    ) ) {\n        }\n#endif /* __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING */\n        template<typename Body0, typename Body1, typename Body2, typename Body3>\n        unfolded_join_node(graph &g, Body0 body0, Body1 body1, Body2 body2, Body3 body3) : base_type(g,\n                func_initializer_type(\n                    new type_to_key_function_body_leaf<T0, K, Body0>(body0),\n                    new type_to_key_function_body_leaf<T1, K, Body1>(body1),\n                    new type_to_key_function_body_leaf<T2, K, Body2>(body2),\n                    new type_to_key_function_body_leaf<T3, K, Body3>(body3)\n                    ) ) {\n            static_assert(std::tuple_size<OutputTuple>::value == 4, \"wrong number of body initializers\");\n        }\n        unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}\n    };\n\n    template<typename OutputTuple, typename K, typename KHash>\n    class unfolded_join_node<5,key_matching_port,OutputTuple,key_matching<K,KHash> > : public\n            join_base<5,key_matching_port,OutputTuple,key_matching<K,KHash> >::type {\n        typedef typename std::tuple_element<0, OutputTuple>::type T0;\n        typedef typename std::tuple_element<1, OutputTuple>::type T1;\n        typedef typename std::tuple_element<2, OutputTuple>::type T2;\n        typedef typename std::tuple_element<3, OutputTuple>::type T3;\n        typedef typename std::tuple_element<4, OutputTuple>::type T4;\n    public:\n        typedef typename wrap_key_tuple_elements<5,key_matching_port,key_matching<K,KHash>,OutputTuple>::type input_ports_type;\n        typedef OutputTuple output_type;\n    private:\n        typedef join_node_base<key_matching<K,KHash> , input_ports_type, output_type > base_type;\n        typedef type_to_key_function_body<T0, K> *f0_p;\n        typedef type_to_key_function_body<T1, K> *f1_p;\n        typedef type_to_key_function_body<T2, K> *f2_p;\n        typedef type_to_key_function_body<T3, K> *f3_p;\n        typedef type_to_key_function_body<T4, K> *f4_p;\n        typedef std::tuple< f0_p, f1_p, f2_p, f3_p, f4_p > func_initializer_type;\n    public:\n#if __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING\n        unfolded_join_node(graph &g) : base_type(g,\n                func_initializer_type(\n                    new type_to_key_function_body_leaf<T0, K, key_from_message_body<K,T0> >(key_from_message_body<K,T0>()),\n                    new type_to_key_function_body_leaf<T1, K, key_from_message_body<K,T1> >(key_from_message_body<K,T1>()),\n                    new type_to_key_function_body_leaf<T2, K, key_from_message_body<K,T2> >(key_from_message_body<K,T2>()),\n                    new type_to_key_function_body_leaf<T3, K, key_from_message_body<K,T3> >(key_from_message_body<K,T3>()),\n                    new type_to_key_function_body_leaf<T4, K, key_from_message_body<K,T4> >(key_from_message_body<K,T4>())\n                    ) ) {\n        }\n#endif /* __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING */\n        template<typename Body0, typename Body1, typename Body2, typename Body3, typename Body4>\n        unfolded_join_node(graph &g, Body0 body0, Body1 body1, Body2 body2, Body3 body3, Body4 body4) : base_type(g,\n                func_initializer_type(\n                    new type_to_key_function_body_leaf<T0, K, Body0>(body0),\n                    new type_to_key_function_body_leaf<T1, K, Body1>(body1),\n                    new type_to_key_function_body_leaf<T2, K, Body2>(body2),\n                    new type_to_key_function_body_leaf<T3, K, Body3>(body3),\n                    new type_to_key_function_body_leaf<T4, K, Body4>(body4)\n                    ) ) {\n            static_assert(std::tuple_size<OutputTuple>::value == 5, \"wrong number of body initializers\");\n        }\n        unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}\n    };\n\n#if __TBB_VARIADIC_MAX >= 6\n    template<typename OutputTuple, typename K, typename KHash>\n    class unfolded_join_node<6,key_matching_port,OutputTuple,key_matching<K,KHash> > : public\n            join_base<6,key_matching_port,OutputTuple,key_matching<K,KHash> >::type {\n        typedef typename std::tuple_element<0, OutputTuple>::type T0;\n        typedef typename std::tuple_element<1, OutputTuple>::type T1;\n        typedef typename std::tuple_element<2, OutputTuple>::type T2;\n        typedef typename std::tuple_element<3, OutputTuple>::type T3;\n        typedef typename std::tuple_element<4, OutputTuple>::type T4;\n        typedef typename std::tuple_element<5, OutputTuple>::type T5;\n    public:\n        typedef typename wrap_key_tuple_elements<6,key_matching_port,key_matching<K,KHash>,OutputTuple>::type input_ports_type;\n        typedef OutputTuple output_type;\n    private:\n        typedef join_node_base<key_matching<K,KHash> , input_ports_type, output_type > base_type;\n        typedef type_to_key_function_body<T0, K> *f0_p;\n        typedef type_to_key_function_body<T1, K> *f1_p;\n        typedef type_to_key_function_body<T2, K> *f2_p;\n        typedef type_to_key_function_body<T3, K> *f3_p;\n        typedef type_to_key_function_body<T4, K> *f4_p;\n        typedef type_to_key_function_body<T5, K> *f5_p;\n        typedef std::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p > func_initializer_type;\n    public:\n#if __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING\n        unfolded_join_node(graph &g) : base_type(g,\n                func_initializer_type(\n                    new type_to_key_function_body_leaf<T0, K, key_from_message_body<K,T0> >(key_from_message_body<K,T0>()),\n                    new type_to_key_function_body_leaf<T1, K, key_from_message_body<K,T1> >(key_from_message_body<K,T1>()),\n                    new type_to_key_function_body_leaf<T2, K, key_from_message_body<K,T2> >(key_from_message_body<K,T2>()),\n                    new type_to_key_function_body_leaf<T3, K, key_from_message_body<K,T3> >(key_from_message_body<K,T3>()),\n                    new type_to_key_function_body_leaf<T4, K, key_from_message_body<K,T4> >(key_from_message_body<K,T4>()),\n                    new type_to_key_function_body_leaf<T5, K, key_from_message_body<K,T5> >(key_from_message_body<K,T5>())\n                    ) ) {\n        }\n#endif /* __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING */\n        template<typename Body0, typename Body1, typename Body2, typename Body3, typename Body4, typename Body5>\n        unfolded_join_node(graph &g, Body0 body0, Body1 body1, Body2 body2, Body3 body3, Body4 body4, Body5 body5)\n                : base_type(g, func_initializer_type(\n                    new type_to_key_function_body_leaf<T0, K, Body0>(body0),\n                    new type_to_key_function_body_leaf<T1, K, Body1>(body1),\n                    new type_to_key_function_body_leaf<T2, K, Body2>(body2),\n                    new type_to_key_function_body_leaf<T3, K, Body3>(body3),\n                    new type_to_key_function_body_leaf<T4, K, Body4>(body4),\n                    new type_to_key_function_body_leaf<T5, K, Body5>(body5)\n                    ) ) {\n            static_assert(std::tuple_size<OutputTuple>::value == 6, \"wrong number of body initializers\");\n        }\n        unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}\n    };\n#endif\n\n#if __TBB_VARIADIC_MAX >= 7\n    template<typename OutputTuple, typename K, typename KHash>\n    class unfolded_join_node<7,key_matching_port,OutputTuple,key_matching<K,KHash> > : public\n            join_base<7,key_matching_port,OutputTuple,key_matching<K,KHash> >::type {\n        typedef typename std::tuple_element<0, OutputTuple>::type T0;\n        typedef typename std::tuple_element<1, OutputTuple>::type T1;\n        typedef typename std::tuple_element<2, OutputTuple>::type T2;\n        typedef typename std::tuple_element<3, OutputTuple>::type T3;\n        typedef typename std::tuple_element<4, OutputTuple>::type T4;\n        typedef typename std::tuple_element<5, OutputTuple>::type T5;\n        typedef typename std::tuple_element<6, OutputTuple>::type T6;\n    public:\n        typedef typename wrap_key_tuple_elements<7,key_matching_port,key_matching<K,KHash>,OutputTuple>::type input_ports_type;\n        typedef OutputTuple output_type;\n    private:\n        typedef join_node_base<key_matching<K,KHash> , input_ports_type, output_type > base_type;\n        typedef type_to_key_function_body<T0, K> *f0_p;\n        typedef type_to_key_function_body<T1, K> *f1_p;\n        typedef type_to_key_function_body<T2, K> *f2_p;\n        typedef type_to_key_function_body<T3, K> *f3_p;\n        typedef type_to_key_function_body<T4, K> *f4_p;\n        typedef type_to_key_function_body<T5, K> *f5_p;\n        typedef type_to_key_function_body<T6, K> *f6_p;\n        typedef std::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p, f6_p > func_initializer_type;\n    public:\n#if __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING\n        unfolded_join_node(graph &g) : base_type(g,\n                func_initializer_type(\n                    new type_to_key_function_body_leaf<T0, K, key_from_message_body<K,T0> >(key_from_message_body<K,T0>()),\n                    new type_to_key_function_body_leaf<T1, K, key_from_message_body<K,T1> >(key_from_message_body<K,T1>()),\n                    new type_to_key_function_body_leaf<T2, K, key_from_message_body<K,T2> >(key_from_message_body<K,T2>()),\n                    new type_to_key_function_body_leaf<T3, K, key_from_message_body<K,T3> >(key_from_message_body<K,T3>()),\n                    new type_to_key_function_body_leaf<T4, K, key_from_message_body<K,T4> >(key_from_message_body<K,T4>()),\n                    new type_to_key_function_body_leaf<T5, K, key_from_message_body<K,T5> >(key_from_message_body<K,T5>()),\n                    new type_to_key_function_body_leaf<T6, K, key_from_message_body<K,T6> >(key_from_message_body<K,T6>())\n                    ) ) {\n        }\n#endif /* __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING */\n        template<typename Body0, typename Body1, typename Body2, typename Body3, typename Body4,\n                 typename Body5, typename Body6>\n        unfolded_join_node(graph &g, Body0 body0, Body1 body1, Body2 body2, Body3 body3, Body4 body4,\n                Body5 body5, Body6 body6) : base_type(g, func_initializer_type(\n                    new type_to_key_function_body_leaf<T0, K, Body0>(body0),\n                    new type_to_key_function_body_leaf<T1, K, Body1>(body1),\n                    new type_to_key_function_body_leaf<T2, K, Body2>(body2),\n                    new type_to_key_function_body_leaf<T3, K, Body3>(body3),\n                    new type_to_key_function_body_leaf<T4, K, Body4>(body4),\n                    new type_to_key_function_body_leaf<T5, K, Body5>(body5),\n                    new type_to_key_function_body_leaf<T6, K, Body6>(body6)\n                    ) ) {\n            static_assert(std::tuple_size<OutputTuple>::value == 7, \"wrong number of body initializers\");\n        }\n        unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}\n    };\n#endif\n\n#if __TBB_VARIADIC_MAX >= 8\n    template<typename OutputTuple, typename K, typename KHash>\n    class unfolded_join_node<8,key_matching_port,OutputTuple,key_matching<K,KHash> > : public\n            join_base<8,key_matching_port,OutputTuple,key_matching<K,KHash> >::type {\n        typedef typename std::tuple_element<0, OutputTuple>::type T0;\n        typedef typename std::tuple_element<1, OutputTuple>::type T1;\n        typedef typename std::tuple_element<2, OutputTuple>::type T2;\n        typedef typename std::tuple_element<3, OutputTuple>::type T3;\n        typedef typename std::tuple_element<4, OutputTuple>::type T4;\n        typedef typename std::tuple_element<5, OutputTuple>::type T5;\n        typedef typename std::tuple_element<6, OutputTuple>::type T6;\n        typedef typename std::tuple_element<7, OutputTuple>::type T7;\n    public:\n        typedef typename wrap_key_tuple_elements<8,key_matching_port,key_matching<K,KHash>,OutputTuple>::type input_ports_type;\n        typedef OutputTuple output_type;\n    private:\n        typedef join_node_base<key_matching<K,KHash> , input_ports_type, output_type > base_type;\n        typedef type_to_key_function_body<T0, K> *f0_p;\n        typedef type_to_key_function_body<T1, K> *f1_p;\n        typedef type_to_key_function_body<T2, K> *f2_p;\n        typedef type_to_key_function_body<T3, K> *f3_p;\n        typedef type_to_key_function_body<T4, K> *f4_p;\n        typedef type_to_key_function_body<T5, K> *f5_p;\n        typedef type_to_key_function_body<T6, K> *f6_p;\n        typedef type_to_key_function_body<T7, K> *f7_p;\n        typedef std::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p, f6_p, f7_p > func_initializer_type;\n    public:\n#if __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING\n        unfolded_join_node(graph &g) : base_type(g,\n                func_initializer_type(\n                    new type_to_key_function_body_leaf<T0, K, key_from_message_body<K,T0> >(key_from_message_body<K,T0>()),\n                    new type_to_key_function_body_leaf<T1, K, key_from_message_body<K,T1> >(key_from_message_body<K,T1>()),\n                    new type_to_key_function_body_leaf<T2, K, key_from_message_body<K,T2> >(key_from_message_body<K,T2>()),\n                    new type_to_key_function_body_leaf<T3, K, key_from_message_body<K,T3> >(key_from_message_body<K,T3>()),\n                    new type_to_key_function_body_leaf<T4, K, key_from_message_body<K,T4> >(key_from_message_body<K,T4>()),\n                    new type_to_key_function_body_leaf<T5, K, key_from_message_body<K,T5> >(key_from_message_body<K,T5>()),\n                    new type_to_key_function_body_leaf<T6, K, key_from_message_body<K,T6> >(key_from_message_body<K,T6>()),\n                    new type_to_key_function_body_leaf<T7, K, key_from_message_body<K,T7> >(key_from_message_body<K,T7>())\n                    ) ) {\n        }\n#endif /* __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING */\n        template<typename Body0, typename Body1, typename Body2, typename Body3, typename Body4,\n                 typename Body5, typename Body6, typename Body7>\n        unfolded_join_node(graph &g, Body0 body0, Body1 body1, Body2 body2, Body3 body3, Body4 body4,\n                Body5 body5, Body6 body6, Body7 body7) : base_type(g, func_initializer_type(\n                    new type_to_key_function_body_leaf<T0, K, Body0>(body0),\n                    new type_to_key_function_body_leaf<T1, K, Body1>(body1),\n                    new type_to_key_function_body_leaf<T2, K, Body2>(body2),\n                    new type_to_key_function_body_leaf<T3, K, Body3>(body3),\n                    new type_to_key_function_body_leaf<T4, K, Body4>(body4),\n                    new type_to_key_function_body_leaf<T5, K, Body5>(body5),\n                    new type_to_key_function_body_leaf<T6, K, Body6>(body6),\n                    new type_to_key_function_body_leaf<T7, K, Body7>(body7)\n                    ) ) {\n            static_assert(std::tuple_size<OutputTuple>::value == 8, \"wrong number of body initializers\");\n        }\n        unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}\n    };\n#endif\n\n#if __TBB_VARIADIC_MAX >= 9\n    template<typename OutputTuple, typename K, typename KHash>\n    class unfolded_join_node<9,key_matching_port,OutputTuple,key_matching<K,KHash> > : public\n            join_base<9,key_matching_port,OutputTuple,key_matching<K,KHash> >::type {\n        typedef typename std::tuple_element<0, OutputTuple>::type T0;\n        typedef typename std::tuple_element<1, OutputTuple>::type T1;\n        typedef typename std::tuple_element<2, OutputTuple>::type T2;\n        typedef typename std::tuple_element<3, OutputTuple>::type T3;\n        typedef typename std::tuple_element<4, OutputTuple>::type T4;\n        typedef typename std::tuple_element<5, OutputTuple>::type T5;\n        typedef typename std::tuple_element<6, OutputTuple>::type T6;\n        typedef typename std::tuple_element<7, OutputTuple>::type T7;\n        typedef typename std::tuple_element<8, OutputTuple>::type T8;\n    public:\n        typedef typename wrap_key_tuple_elements<9,key_matching_port,key_matching<K,KHash>,OutputTuple>::type input_ports_type;\n        typedef OutputTuple output_type;\n    private:\n        typedef join_node_base<key_matching<K,KHash> , input_ports_type, output_type > base_type;\n        typedef type_to_key_function_body<T0, K> *f0_p;\n        typedef type_to_key_function_body<T1, K> *f1_p;\n        typedef type_to_key_function_body<T2, K> *f2_p;\n        typedef type_to_key_function_body<T3, K> *f3_p;\n        typedef type_to_key_function_body<T4, K> *f4_p;\n        typedef type_to_key_function_body<T5, K> *f5_p;\n        typedef type_to_key_function_body<T6, K> *f6_p;\n        typedef type_to_key_function_body<T7, K> *f7_p;\n        typedef type_to_key_function_body<T8, K> *f8_p;\n        typedef std::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p, f6_p, f7_p, f8_p > func_initializer_type;\n    public:\n#if __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING\n        unfolded_join_node(graph &g) : base_type(g,\n                func_initializer_type(\n                    new type_to_key_function_body_leaf<T0, K, key_from_message_body<K,T0> >(key_from_message_body<K,T0>()),\n                    new type_to_key_function_body_leaf<T1, K, key_from_message_body<K,T1> >(key_from_message_body<K,T1>()),\n                    new type_to_key_function_body_leaf<T2, K, key_from_message_body<K,T2> >(key_from_message_body<K,T2>()),\n                    new type_to_key_function_body_leaf<T3, K, key_from_message_body<K,T3> >(key_from_message_body<K,T3>()),\n                    new type_to_key_function_body_leaf<T4, K, key_from_message_body<K,T4> >(key_from_message_body<K,T4>()),\n                    new type_to_key_function_body_leaf<T5, K, key_from_message_body<K,T5> >(key_from_message_body<K,T5>()),\n                    new type_to_key_function_body_leaf<T6, K, key_from_message_body<K,T6> >(key_from_message_body<K,T6>()),\n                    new type_to_key_function_body_leaf<T7, K, key_from_message_body<K,T7> >(key_from_message_body<K,T7>()),\n                    new type_to_key_function_body_leaf<T8, K, key_from_message_body<K,T8> >(key_from_message_body<K,T8>())\n                    ) ) {\n        }\n#endif /* __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING */\n        template<typename Body0, typename Body1, typename Body2, typename Body3, typename Body4,\n                 typename Body5, typename Body6, typename Body7, typename Body8>\n        unfolded_join_node(graph &g, Body0 body0, Body1 body1, Body2 body2, Body3 body3, Body4 body4,\n                Body5 body5, Body6 body6, Body7 body7, Body8 body8) : base_type(g, func_initializer_type(\n                    new type_to_key_function_body_leaf<T0, K, Body0>(body0),\n                    new type_to_key_function_body_leaf<T1, K, Body1>(body1),\n                    new type_to_key_function_body_leaf<T2, K, Body2>(body2),\n                    new type_to_key_function_body_leaf<T3, K, Body3>(body3),\n                    new type_to_key_function_body_leaf<T4, K, Body4>(body4),\n                    new type_to_key_function_body_leaf<T5, K, Body5>(body5),\n                    new type_to_key_function_body_leaf<T6, K, Body6>(body6),\n                    new type_to_key_function_body_leaf<T7, K, Body7>(body7),\n                    new type_to_key_function_body_leaf<T8, K, Body8>(body8)\n                    ) ) {\n            static_assert(std::tuple_size<OutputTuple>::value == 9, \"wrong number of body initializers\");\n        }\n        unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}\n    };\n#endif\n\n#if __TBB_VARIADIC_MAX >= 10\n    template<typename OutputTuple, typename K, typename KHash>\n    class unfolded_join_node<10,key_matching_port,OutputTuple,key_matching<K,KHash> > : public\n            join_base<10,key_matching_port,OutputTuple,key_matching<K,KHash> >::type {\n        typedef typename std::tuple_element<0, OutputTuple>::type T0;\n        typedef typename std::tuple_element<1, OutputTuple>::type T1;\n        typedef typename std::tuple_element<2, OutputTuple>::type T2;\n        typedef typename std::tuple_element<3, OutputTuple>::type T3;\n        typedef typename std::tuple_element<4, OutputTuple>::type T4;\n        typedef typename std::tuple_element<5, OutputTuple>::type T5;\n        typedef typename std::tuple_element<6, OutputTuple>::type T6;\n        typedef typename std::tuple_element<7, OutputTuple>::type T7;\n        typedef typename std::tuple_element<8, OutputTuple>::type T8;\n        typedef typename std::tuple_element<9, OutputTuple>::type T9;\n    public:\n        typedef typename wrap_key_tuple_elements<10,key_matching_port,key_matching<K,KHash>,OutputTuple>::type input_ports_type;\n        typedef OutputTuple output_type;\n    private:\n        typedef join_node_base<key_matching<K,KHash> , input_ports_type, output_type > base_type;\n        typedef type_to_key_function_body<T0, K> *f0_p;\n        typedef type_to_key_function_body<T1, K> *f1_p;\n        typedef type_to_key_function_body<T2, K> *f2_p;\n        typedef type_to_key_function_body<T3, K> *f3_p;\n        typedef type_to_key_function_body<T4, K> *f4_p;\n        typedef type_to_key_function_body<T5, K> *f5_p;\n        typedef type_to_key_function_body<T6, K> *f6_p;\n        typedef type_to_key_function_body<T7, K> *f7_p;\n        typedef type_to_key_function_body<T8, K> *f8_p;\n        typedef type_to_key_function_body<T9, K> *f9_p;\n        typedef std::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p, f6_p, f7_p, f8_p, f9_p > func_initializer_type;\n    public:\n#if __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING\n        unfolded_join_node(graph &g) : base_type(g,\n                func_initializer_type(\n                    new type_to_key_function_body_leaf<T0, K, key_from_message_body<K,T0> >(key_from_message_body<K,T0>()),\n                    new type_to_key_function_body_leaf<T1, K, key_from_message_body<K,T1> >(key_from_message_body<K,T1>()),\n                    new type_to_key_function_body_leaf<T2, K, key_from_message_body<K,T2> >(key_from_message_body<K,T2>()),\n                    new type_to_key_function_body_leaf<T3, K, key_from_message_body<K,T3> >(key_from_message_body<K,T3>()),\n                    new type_to_key_function_body_leaf<T4, K, key_from_message_body<K,T4> >(key_from_message_body<K,T4>()),\n                    new type_to_key_function_body_leaf<T5, K, key_from_message_body<K,T5> >(key_from_message_body<K,T5>()),\n                    new type_to_key_function_body_leaf<T6, K, key_from_message_body<K,T6> >(key_from_message_body<K,T6>()),\n                    new type_to_key_function_body_leaf<T7, K, key_from_message_body<K,T7> >(key_from_message_body<K,T7>()),\n                    new type_to_key_function_body_leaf<T8, K, key_from_message_body<K,T8> >(key_from_message_body<K,T8>()),\n                    new type_to_key_function_body_leaf<T9, K, key_from_message_body<K,T9> >(key_from_message_body<K,T9>())\n                    ) ) {\n        }\n#endif /* __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING */\n        template<typename Body0, typename Body1, typename Body2, typename Body3, typename Body4,\n            typename Body5, typename Body6, typename Body7, typename Body8, typename Body9>\n        unfolded_join_node(graph &g, Body0 body0, Body1 body1, Body2 body2, Body3 body3, Body4 body4,\n                Body5 body5, Body6 body6, Body7 body7, Body8 body8, Body9 body9) : base_type(g, func_initializer_type(\n                    new type_to_key_function_body_leaf<T0, K, Body0>(body0),\n                    new type_to_key_function_body_leaf<T1, K, Body1>(body1),\n                    new type_to_key_function_body_leaf<T2, K, Body2>(body2),\n                    new type_to_key_function_body_leaf<T3, K, Body3>(body3),\n                    new type_to_key_function_body_leaf<T4, K, Body4>(body4),\n                    new type_to_key_function_body_leaf<T5, K, Body5>(body5),\n                    new type_to_key_function_body_leaf<T6, K, Body6>(body6),\n                    new type_to_key_function_body_leaf<T7, K, Body7>(body7),\n                    new type_to_key_function_body_leaf<T8, K, Body8>(body8),\n                    new type_to_key_function_body_leaf<T9, K, Body9>(body9)\n                    ) ) {\n            static_assert(std::tuple_size<OutputTuple>::value == 10, \"wrong number of body initializers\");\n        }\n        unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}\n    };\n#endif\n\n    //! templated function to refer to input ports of the join node\n    template<size_t N, typename JNT>\n    typename std::tuple_element<N, typename JNT::input_ports_type>::type &input_port(JNT &jn) {\n        return std::get<N>(jn.input_ports());\n    }\n\n#endif // __TBB__flow_graph_join_impl_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_flow_graph_node_impl.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB__flow_graph_node_impl_H\n#define __TBB__flow_graph_node_impl_H\n\n#ifndef __TBB_flow_graph_H\n#error Do not #include this internal file directly; use public TBB headers instead.\n#endif\n\n#include \"_flow_graph_item_buffer_impl.h\"\n\ntemplate< typename T, typename A >\nclass function_input_queue : public item_buffer<T,A> {\npublic:\n    bool empty() const {\n        return this->buffer_empty();\n    }\n\n    const T& front() const {\n        return this->item_buffer<T, A>::front();\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    const message_metainfo& front_metainfo() const {\n        return this->item_buffer<T,A>::front_metainfo();\n    }\n#endif\n\n    void pop() {\n        this->destroy_front();\n    }\n\n    bool push( T& t ) {\n        return this->push_back( t );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    bool push( T& t, const message_metainfo& metainfo ) {\n        return this->push_back(t, metainfo);\n    }\n#endif\n};\n\n//! Input and scheduling for a function node that takes a type Input as input\n//  The only up-ref is apply_body_impl, which should implement the function\n//  call and any handling of the result.\ntemplate< typename Input, typename Policy, typename A, typename ImplType >\nclass function_input_base : public receiver<Input>, no_assign {\n    enum op_type {reg_pred, rem_pred, try_fwd, tryput_bypass, app_body_bypass, occupy_concurrency\n    };\n    typedef function_input_base<Input, Policy, A, ImplType> class_type;\n\npublic:\n\n    //! The input type of this receiver\n    typedef Input input_type;\n    typedef typename receiver<input_type>::predecessor_type predecessor_type;\n    typedef predecessor_cache<input_type, null_mutex > predecessor_cache_type;\n    typedef function_input_queue<input_type, A> input_queue_type;\n    typedef typename allocator_traits<A>::template rebind_alloc<input_queue_type> allocator_type;\n    static_assert(!has_policy<queueing, Policy>::value || !has_policy<rejecting, Policy>::value, \"\");\n\n    //! Constructor for function_input_base\n    function_input_base( graph &g, size_t max_concurrency, node_priority_t a_priority, bool is_no_throw )\n        : my_graph_ref(g), my_max_concurrency(max_concurrency)\n        , my_concurrency(0), my_priority(a_priority), my_is_no_throw(is_no_throw)\n        , my_queue(!has_policy<rejecting, Policy>::value ? new input_queue_type() : nullptr)\n        , my_predecessors(this)\n        , forwarder_busy(false)\n    {\n        my_aggregator.initialize_handler(handler_type(this));\n    }\n\n    //! Copy constructor\n    function_input_base( const function_input_base& src )\n        : function_input_base(src.my_graph_ref, src.my_max_concurrency, src.my_priority, src.my_is_no_throw) {}\n\n    //! Destructor\n    // The queue is allocated by the constructor for {multi}function_node.\n    // TODO: pass the graph_buffer_policy to the base so it can allocate the queue instead.\n    // This would be an interface-breaking change.\n    virtual ~function_input_base() {\n        delete my_queue;\n        my_queue = nullptr;\n    }\n\n    graph_task* try_put_task( const input_type& t) override {\n        return try_put_task_base(t __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo{}));\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    graph_task* try_put_task( const input_type& t, const message_metainfo& metainfo ) override {\n        return try_put_task_base(t, metainfo);\n    }\n#endif // __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n\n    //! Adds src to the list of cached predecessors.\n    bool register_predecessor( predecessor_type &src ) override {\n        operation_type op_data(reg_pred);\n        op_data.r = &src;\n        my_aggregator.execute(&op_data);\n        return true;\n    }\n\n    //! Removes src from the list of cached predecessors.\n    bool remove_predecessor( predecessor_type &src ) override {\n        operation_type op_data(rem_pred);\n        op_data.r = &src;\n        my_aggregator.execute(&op_data);\n        return true;\n    }\n\nprotected:\n\n    void reset_function_input_base( reset_flags f) {\n        my_concurrency = 0;\n        if(my_queue) {\n            my_queue->reset();\n        }\n        reset_receiver(f);\n        forwarder_busy = false;\n    }\n\n    graph& my_graph_ref;\n    const size_t my_max_concurrency;\n    size_t my_concurrency;\n    node_priority_t my_priority;\n    const bool my_is_no_throw;\n    input_queue_type *my_queue;\n    predecessor_cache<input_type, null_mutex > my_predecessors;\n\n    void reset_receiver( reset_flags f) {\n        if( f & rf_clear_edges) my_predecessors.clear();\n        else\n            my_predecessors.reset();\n        __TBB_ASSERT(!(f & rf_clear_edges) || my_predecessors.empty(), \"function_input_base reset failed\");\n    }\n\n    graph& graph_reference() const override {\n        return my_graph_ref;\n    }\n\n    graph_task* try_get_postponed_task(const input_type& i) {\n        operation_type op_data(i, app_body_bypass);  // tries to pop an item or get_item\n        my_aggregator.execute(&op_data);\n        return op_data.bypass_t;\n    }\n\nprivate:\n\n    friend class apply_body_task_bypass< class_type, input_type >;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    friend class apply_body_task_bypass< class_type, input_type, trackable_messages_graph_task >;\n#endif\n    friend class forward_task_bypass< class_type >;\n\n    class operation_type : public d1::aggregated_operation< operation_type > {\n    public:\n        char type;\n        union {\n            input_type *elem;\n            predecessor_type *r;\n        };\n        graph_task* bypass_t;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        message_metainfo* metainfo;\n#endif\n        operation_type(const input_type& e, op_type t) :\n            type(char(t)), elem(const_cast<input_type*>(&e)), bypass_t(nullptr)\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            , metainfo(nullptr)\n#endif\n        {}\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        operation_type(const input_type& e, op_type t, const message_metainfo& info) :\n            type(char(t)), elem(const_cast<input_type*>(&e)), bypass_t(nullptr),\n            metainfo(const_cast<message_metainfo*>(&info)) {}\n#endif\n        operation_type(op_type t) : type(char(t)), r(nullptr), bypass_t(nullptr) {}\n    };\n\n    bool forwarder_busy;\n    typedef d1::aggregating_functor<class_type, operation_type> handler_type;\n    friend class d1::aggregating_functor<class_type, operation_type>;\n    d1::aggregator< handler_type, operation_type > my_aggregator;\n\n    graph_task* perform_queued_requests() {\n        graph_task* new_task = nullptr;\n        if(my_queue) {\n            if(!my_queue->empty()) {\n                ++my_concurrency;\n                // TODO: consider removing metainfo from the queue using move semantics to avoid\n                // ref counter increase\n                new_task = create_body_task(my_queue->front()\n                                            __TBB_FLOW_GRAPH_METAINFO_ARG(my_queue->front_metainfo()));\n\n                my_queue->pop();\n            }\n        }\n        else {\n            input_type i;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            message_metainfo metainfo;\n#endif\n            if(my_predecessors.get_item(i __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo))) {\n                ++my_concurrency;\n                new_task = create_body_task(i __TBB_FLOW_GRAPH_METAINFO_ARG(std::move(metainfo)));\n            }\n        }\n        return new_task;\n    }\n    void handle_operations(operation_type *op_list) {\n        operation_type* tmp;\n        while (op_list) {\n            tmp = op_list;\n            op_list = op_list->next;\n            switch (tmp->type) {\n            case reg_pred:\n                my_predecessors.add(*(tmp->r));\n                tmp->status.store(SUCCEEDED, std::memory_order_release);\n                if (!forwarder_busy) {\n                    forwarder_busy = true;\n                    spawn_forward_task();\n                }\n                break;\n            case rem_pred:\n                my_predecessors.remove(*(tmp->r));\n                tmp->status.store(SUCCEEDED, std::memory_order_release);\n                break;\n            case app_body_bypass: {\n                tmp->bypass_t = nullptr;\n                __TBB_ASSERT(my_max_concurrency != 0, nullptr);\n                --my_concurrency;\n                if(my_concurrency<my_max_concurrency)\n                    tmp->bypass_t = perform_queued_requests();\n                tmp->status.store(SUCCEEDED, std::memory_order_release);\n            }\n                break;\n            case tryput_bypass: internal_try_put_task(tmp);  break;\n            case try_fwd: internal_forward(tmp);  break;\n            case occupy_concurrency:\n                if (my_concurrency < my_max_concurrency) {\n                    ++my_concurrency;\n                    tmp->status.store(SUCCEEDED, std::memory_order_release);\n                } else {\n                    tmp->status.store(FAILED, std::memory_order_release);\n                }\n                break;\n            }\n        }\n    }\n\n    //! Put to the node, but return the task instead of enqueueing it\n    void internal_try_put_task(operation_type *op) {\n        __TBB_ASSERT(my_max_concurrency != 0, nullptr);\n        if (my_concurrency < my_max_concurrency) {\n            ++my_concurrency;\n            graph_task* new_task = create_body_task(*(op->elem)\n                                                    __TBB_FLOW_GRAPH_METAINFO_ARG(*(op->metainfo)));\n            op->bypass_t = new_task;\n            op->status.store(SUCCEEDED, std::memory_order_release);\n        } else if ( my_queue && my_queue->push(*(op->elem)\n                    __TBB_FLOW_GRAPH_METAINFO_ARG(*(op->metainfo))) )\n        {\n            op->bypass_t = SUCCESSFULLY_ENQUEUED;\n            op->status.store(SUCCEEDED, std::memory_order_release);\n        } else {\n            op->bypass_t = nullptr;\n            op->status.store(FAILED, std::memory_order_release);\n        }\n    }\n\n    //! Creates tasks for postponed messages if available and if concurrency allows\n    void internal_forward(operation_type *op) {\n        op->bypass_t = nullptr;\n        if (my_concurrency < my_max_concurrency)\n            op->bypass_t = perform_queued_requests();\n        if(op->bypass_t)\n            op->status.store(SUCCEEDED, std::memory_order_release);\n        else {\n            forwarder_busy = false;\n            op->status.store(FAILED, std::memory_order_release);\n        }\n    }\n\n    graph_task* internal_try_put_bypass( const input_type& t\n                                         __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo))\n    {\n        operation_type op_data(t, tryput_bypass __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n        my_aggregator.execute(&op_data);\n        if( op_data.status == SUCCEEDED ) {\n            return op_data.bypass_t;\n        }\n        return nullptr;\n    }\n\n    graph_task* try_put_task_base(const input_type& t\n                                  __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo))\n    {\n        if ( my_is_no_throw )\n            return try_put_task_impl(t, has_policy<lightweight, Policy>()\n                                     __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n        else\n            return try_put_task_impl(t, std::false_type()\n                                     __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n    }\n\n    graph_task* try_put_task_impl( const input_type& t, /*lightweight=*/std::true_type\n                                   __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo))\n    {\n        if( my_max_concurrency == 0 ) {\n            return apply_body_bypass(t __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n        } else {\n            operation_type check_op(t, occupy_concurrency);\n            my_aggregator.execute(&check_op);\n            if( check_op.status == SUCCEEDED ) {\n                return apply_body_bypass(t __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n            }\n            return internal_try_put_bypass(t __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n        }\n    }\n\n    graph_task* try_put_task_impl( const input_type& t, /*lightweight=*/std::false_type\n                                   __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo))\n    {\n        if( my_max_concurrency == 0 ) {\n            return create_body_task(t __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n        } else {\n            return internal_try_put_bypass(t __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n        }\n    }\n\n    //! Applies the body to the provided input\n    //  then decides if more work is available\n    graph_task* apply_body_bypass( const input_type &i\n                                   __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo))\n\n    {\n        return static_cast<ImplType *>(this)->apply_body_impl_bypass(i __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n    }\n\n    //! allocates a task to apply a body\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    template <typename Metainfo>\n    graph_task* create_body_task( const input_type &input, Metainfo&& metainfo )\n#else\n    graph_task* create_body_task( const input_type &input )\n#endif\n    {\n        if (!is_graph_active(my_graph_ref)) {\n            return nullptr;\n        }\n        // TODO revamp: extract helper for common graph task allocation part\n        d1::small_object_allocator allocator{};\n        graph_task* t = nullptr;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        if (!metainfo.empty()) {\n            using task_type = apply_body_task_bypass<class_type, input_type, trackable_messages_graph_task>;\n            t = allocator.new_object<task_type>(my_graph_ref, allocator, *this, input, my_priority, std::forward<Metainfo>(metainfo));\n        } else\n#endif\n        {\n            using task_type = apply_body_task_bypass<class_type, input_type>;\n            t = allocator.new_object<task_type>(my_graph_ref, allocator, *this, input, my_priority);\n        }\n        return t;\n    }\n\n    //! This is executed by an enqueued task, the \"forwarder\"\n    graph_task* forward_task() {\n        operation_type op_data(try_fwd);\n        graph_task* rval = nullptr;\n        do {\n            op_data.status = WAIT;\n            my_aggregator.execute(&op_data);\n            if(op_data.status == SUCCEEDED) {\n                graph_task* ttask = op_data.bypass_t;\n                __TBB_ASSERT( ttask && ttask != SUCCESSFULLY_ENQUEUED, nullptr);\n                rval = combine_tasks(my_graph_ref, rval, ttask);\n            }\n        } while (op_data.status == SUCCEEDED);\n        return rval;\n    }\n\n    inline graph_task* create_forward_task() {\n        if (!is_graph_active(my_graph_ref)) {\n            return nullptr;\n        }\n        d1::small_object_allocator allocator{};\n        typedef forward_task_bypass<class_type> task_type;\n        graph_task* t = allocator.new_object<task_type>( graph_reference(), allocator, *this, my_priority );\n        return t;\n    }\n\n    //! Spawns a task that calls forward()\n    inline void spawn_forward_task() {\n        graph_task* tp = create_forward_task();\n        if(tp) {\n            spawn_in_graph_arena(graph_reference(), *tp);\n        }\n    }\n\n    node_priority_t priority() const override { return my_priority; }\n};  // function_input_base\n\n//! Implements methods for a function node that takes a type Input as input and sends\n//  a type Output to its successors.\ntemplate< typename Input, typename Output, typename Policy, typename A>\nclass function_input : public function_input_base<Input, Policy, A, function_input<Input,Output,Policy,A> > {\npublic:\n    typedef Input input_type;\n    typedef Output output_type;\n    typedef function_body<input_type, output_type> function_body_type;\n    typedef function_input<Input, Output, Policy,A> my_class;\n    typedef function_input_base<Input, Policy, A, my_class> base_type;\n    typedef function_input_queue<input_type, A> input_queue_type;\n\n    // constructor\n    template<typename Body>\n    function_input(\n        graph &g, size_t max_concurrency, Body& body, node_priority_t a_priority )\n      : base_type(g, max_concurrency, a_priority, noexcept(tbb::detail::invoke(body, input_type())))\n      , my_body( new function_body_leaf< input_type, output_type, Body>(body) )\n      , my_init_body( new function_body_leaf< input_type, output_type, Body>(body) ) {\n    }\n\n    //! Copy constructor\n    function_input( const function_input& src ) :\n        base_type(src),\n        my_body( src.my_init_body->clone() ),\n        my_init_body(src.my_init_body->clone() ) {\n    }\n#if __INTEL_COMPILER <= 2021\n    // Suppress superfluous diagnostic about virtual keyword absence in a destructor of an inherited\n    // class while the parent class has the virtual keyword for the destrocutor.\n    virtual\n#endif\n    ~function_input() {\n        delete my_body;\n        delete my_init_body;\n    }\n\n    template< typename Body >\n    Body copy_function_object() {\n        function_body_type &body_ref = *this->my_body;\n        return dynamic_cast< function_body_leaf<input_type, output_type, Body> & >(body_ref).get_body();\n    }\n\n    output_type apply_body_impl( const input_type& i) {\n        // There is an extra copied needed to capture the\n        // body execution without the try_put\n        fgt_begin_body( my_body );\n        output_type v = tbb::detail::invoke(*my_body, i);\n        fgt_end_body( my_body );\n        return v;\n    }\n\n    //TODO: consider moving into the base class\n    graph_task* apply_body_impl_bypass( const input_type &i\n                                        __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo))\n    {\n        output_type v = apply_body_impl(i);\n        graph_task* postponed_task = nullptr;\n        if( base_type::my_max_concurrency != 0 ) {\n            postponed_task = base_type::try_get_postponed_task(i);\n            __TBB_ASSERT( !postponed_task || postponed_task != SUCCESSFULLY_ENQUEUED, nullptr);\n        }\n        if( postponed_task ) {\n            // make the task available for other workers since we do not know successors'\n            // execution policy\n            spawn_in_graph_arena(base_type::graph_reference(), *postponed_task);\n        }\n        graph_task* successor_task = successors().try_put_task(v __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n#if _MSC_VER && !__INTEL_COMPILER\n#pragma warning (push)\n#pragma warning (disable: 4127)  /* suppress conditional expression is constant */\n#endif\n        if(has_policy<lightweight, Policy>::value) {\n#if _MSC_VER && !__INTEL_COMPILER\n#pragma warning (pop)\n#endif\n            if(!successor_task) {\n                // Return confirmative status since current\n                // node's body has been executed anyway\n                successor_task = SUCCESSFULLY_ENQUEUED;\n            }\n        }\n        return successor_task;\n    }\n\nprotected:\n\n    void reset_function_input(reset_flags f) {\n        base_type::reset_function_input_base(f);\n        if(f & rf_reset_bodies) {\n            function_body_type *tmp = my_init_body->clone();\n            delete my_body;\n            my_body = tmp;\n        }\n    }\n\n    function_body_type *my_body;\n    function_body_type *my_init_body;\n    virtual broadcast_cache<output_type > &successors() = 0;\n\n};  // function_input\n\n\n// helper templates to clear the successor edges of the output ports of an multifunction_node\ntemplate<int N> struct clear_element {\n    template<typename P> static void clear_this(P &p) {\n        (void)std::get<N-1>(p).successors().clear();\n        clear_element<N-1>::clear_this(p);\n    }\n#if TBB_USE_ASSERT\n    template<typename P> static bool this_empty(P &p) {\n        if(std::get<N-1>(p).successors().empty())\n            return clear_element<N-1>::this_empty(p);\n        return false;\n    }\n#endif\n};\n\ntemplate<> struct clear_element<1> {\n    template<typename P> static void clear_this(P &p) {\n        (void)std::get<0>(p).successors().clear();\n    }\n#if TBB_USE_ASSERT\n    template<typename P> static bool this_empty(P &p) {\n        return std::get<0>(p).successors().empty();\n    }\n#endif\n};\n\ntemplate <typename OutputTuple>\nstruct init_output_ports {\n    template <typename... Args>\n    static OutputTuple call(graph& g, const std::tuple<Args...>&) {\n        return OutputTuple(Args(g)...);\n    }\n}; // struct init_output_ports\n\n//! Implements methods for a function node that takes a type Input as input\n//  and has a tuple of output ports specified.\ntemplate< typename Input, typename OutputPortSet, typename Policy, typename A>\nclass multifunction_input : public function_input_base<Input, Policy, A, multifunction_input<Input,OutputPortSet,Policy,A> > {\npublic:\n    static const int N = std::tuple_size<OutputPortSet>::value;\n    typedef Input input_type;\n    typedef OutputPortSet output_ports_type;\n    typedef multifunction_body<input_type, output_ports_type> multifunction_body_type;\n    typedef multifunction_input<Input, OutputPortSet, Policy, A> my_class;\n    typedef function_input_base<Input, Policy, A, my_class> base_type;\n    typedef function_input_queue<input_type, A> input_queue_type;\n\n    // constructor\n    template<typename Body>\n    multifunction_input(graph &g, size_t max_concurrency,Body& body, node_priority_t a_priority )\n      : base_type(g, max_concurrency, a_priority, noexcept(tbb::detail::invoke(body, input_type(), my_output_ports)))\n      , my_body( new multifunction_body_leaf<input_type, output_ports_type, Body>(body) )\n      , my_init_body( new multifunction_body_leaf<input_type, output_ports_type, Body>(body) )\n      , my_output_ports(init_output_ports<output_ports_type>::call(g, my_output_ports)){\n    }\n\n    //! Copy constructor\n    multifunction_input( const multifunction_input& src ) :\n        base_type(src),\n        my_body( src.my_init_body->clone() ),\n        my_init_body(src.my_init_body->clone() ),\n        my_output_ports( init_output_ports<output_ports_type>::call(src.my_graph_ref, my_output_ports) ) {\n    }\n\n    ~multifunction_input() {\n        delete my_body;\n        delete my_init_body;\n    }\n\n    template< typename Body >\n    Body copy_function_object() {\n        multifunction_body_type &body_ref = *this->my_body;\n        return *static_cast<Body*>(dynamic_cast< multifunction_body_leaf<input_type, output_ports_type, Body> & >(body_ref).get_body_ptr());\n    }\n\n    // for multifunction nodes we do not have a single successor as such.  So we just tell\n    // the task we were successful.\n    //TODO: consider moving common parts with implementation in function_input into separate function\n    graph_task* apply_body_impl_bypass( const input_type &i\n                                        __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo&) )\n    {\n        fgt_begin_body( my_body );\n        (*my_body)(i, my_output_ports);\n        fgt_end_body( my_body );\n        graph_task* ttask = nullptr;\n        if(base_type::my_max_concurrency != 0) {\n            ttask = base_type::try_get_postponed_task(i);\n        }\n        return ttask ? ttask : SUCCESSFULLY_ENQUEUED;\n    }\n\n    output_ports_type &output_ports(){ return my_output_ports; }\n\nprotected:\n\n    void reset(reset_flags f) {\n        base_type::reset_function_input_base(f);\n        if(f & rf_clear_edges)clear_element<N>::clear_this(my_output_ports);\n        if(f & rf_reset_bodies) {\n            multifunction_body_type* tmp = my_init_body->clone();\n            delete my_body;\n            my_body = tmp;\n        }\n        __TBB_ASSERT(!(f & rf_clear_edges) || clear_element<N>::this_empty(my_output_ports), \"multifunction_node reset failed\");\n    }\n\n    multifunction_body_type *my_body;\n    multifunction_body_type *my_init_body;\n    output_ports_type my_output_ports;\n\n};  // multifunction_input\n\n// template to refer to an output port of a multifunction_node\ntemplate<size_t N, typename MOP>\ntypename std::tuple_element<N, typename MOP::output_ports_type>::type &output_port(MOP &op) {\n    return std::get<N>(op.output_ports());\n}\n\ninline void check_task_and_spawn(graph& g, graph_task* t) {\n    if (t && t != SUCCESSFULLY_ENQUEUED) {\n        spawn_in_graph_arena(g, *t);\n    }\n}\n\n// helper structs for split_node\ntemplate<int N>\nstruct emit_element {\n    template<typename T, typename P>\n    static graph_task* emit_this(graph& g, const T &t, P &p) {\n        // TODO: consider to collect all the tasks in task_list and spawn them all at once\n        graph_task* last_task = std::get<N-1>(p).try_put_task(std::get<N-1>(t));\n        check_task_and_spawn(g, last_task);\n        return emit_element<N-1>::emit_this(g,t,p);\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    template <typename TupleType, typename PortsType>\n    static graph_task* emit_this(graph& g, const TupleType& t, PortsType& p,\n                                 const message_metainfo& metainfo)\n    {\n        // TODO: consider to collect all the tasks in task_list and spawn them all at once\n        graph_task* last_task = std::get<N-1>(p).try_put_task(std::get<N-1>(t), metainfo);\n        check_task_and_spawn(g, last_task);\n        return emit_element<N-1>::emit_this(g, t, p, metainfo);\n    }\n#endif\n};\n\ntemplate<>\nstruct emit_element<1> {\n    template<typename T, typename P>\n    static graph_task* emit_this(graph& g, const T &t, P &p) {\n        graph_task* last_task = std::get<0>(p).try_put_task(std::get<0>(t));\n        check_task_and_spawn(g, last_task);\n        return SUCCESSFULLY_ENQUEUED;\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    template <typename TupleType, typename PortsType>\n    static graph_task* emit_this(graph& g, const TupleType& t, PortsType& ports,\n                                 const message_metainfo& metainfo)\n    {\n        graph_task* last_task = std::get<0>(ports).try_put_task(std::get<0>(t), metainfo);\n        check_task_and_spawn(g, last_task);\n        return SUCCESSFULLY_ENQUEUED;\n    }\n#endif\n};\n\n//! Implements methods for an executable node that takes continue_msg as input\ntemplate< typename Output, typename Policy>\nclass continue_input : public continue_receiver {\npublic:\n\n    //! The input type of this receiver\n    typedef continue_msg input_type;\n\n    //! The output type of this receiver\n    typedef Output output_type;\n    typedef function_body<input_type, output_type> function_body_type;\n    typedef continue_input<output_type, Policy> class_type;\n\n    template< typename Body >\n    continue_input( graph &g, Body& body, node_priority_t a_priority )\n        : continue_receiver(/*number_of_predecessors=*/0, a_priority)\n        , my_graph_ref(g)\n        , my_body( new function_body_leaf< input_type, output_type, Body>(body) )\n        , my_init_body( new function_body_leaf< input_type, output_type, Body>(body) )\n    { }\n\n    template< typename Body >\n    continue_input( graph &g, int number_of_predecessors,\n                    Body& body, node_priority_t a_priority )\n      : continue_receiver( number_of_predecessors, a_priority )\n      , my_graph_ref(g)\n      , my_body( new function_body_leaf< input_type, output_type, Body>(body) )\n      , my_init_body( new function_body_leaf< input_type, output_type, Body>(body) )\n    { }\n\n    continue_input( const continue_input& src ) : continue_receiver(src),\n                                                  my_graph_ref(src.my_graph_ref),\n                                                  my_body( src.my_init_body->clone() ),\n                                                  my_init_body( src.my_init_body->clone() ) {}\n\n    ~continue_input() {\n        delete my_body;\n        delete my_init_body;\n    }\n\n    template< typename Body >\n    Body copy_function_object() {\n        function_body_type &body_ref = *my_body;\n        return dynamic_cast< function_body_leaf<input_type, output_type, Body> & >(body_ref).get_body();\n    }\n\n    void reset_receiver( reset_flags f) override {\n        continue_receiver::reset_receiver(f);\n        if(f & rf_reset_bodies) {\n            function_body_type *tmp = my_init_body->clone();\n            delete my_body;\n            my_body = tmp;\n        }\n    }\n\nprotected:\n\n    graph& my_graph_ref;\n    function_body_type *my_body;\n    function_body_type *my_init_body;\n\n    virtual broadcast_cache<output_type > &successors() = 0;\n\n    friend class apply_body_task_bypass< class_type, continue_msg >;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    friend class apply_body_task_bypass< class_type, continue_msg, trackable_messages_graph_task >;\n#endif\n\n    //! Applies the body to the provided input\n    graph_task* apply_body_bypass( input_type __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo) ) {\n        // There is an extra copied needed to capture the\n        // body execution without the try_put\n        fgt_begin_body( my_body );\n        output_type v = (*my_body)( continue_msg() );\n        fgt_end_body( my_body );\n        return successors().try_put_task( v __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo) );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    graph_task* execute(const message_metainfo& metainfo) override {\n#else\n    graph_task* execute() override {\n#endif\n        if(!is_graph_active(my_graph_ref)) {\n            return nullptr;\n        }\n#if _MSC_VER && !__INTEL_COMPILER\n#pragma warning (push)\n#pragma warning (disable: 4127)  /* suppress conditional expression is constant */\n#endif\n        if(has_policy<lightweight, Policy>::value) {\n#if _MSC_VER && !__INTEL_COMPILER\n#pragma warning (pop)\n#endif\n            return apply_body_bypass( continue_msg() __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo) );\n        }\n        else {\n            d1::small_object_allocator allocator{};\n            graph_task* t = nullptr;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            if (!metainfo.empty()) {\n                using task_type = apply_body_task_bypass<class_type, continue_msg, trackable_messages_graph_task>;\n                t = allocator.new_object<task_type>( graph_reference(), allocator, *this, continue_msg(), my_priority, metainfo );\n            } else\n#endif\n            {\n                using task_type = apply_body_task_bypass<class_type, continue_msg>;\n                t = allocator.new_object<task_type>( graph_reference(), allocator, *this, continue_msg(), my_priority );\n            }\n            return t;\n        }\n    }\n\n    graph& graph_reference() const override {\n        return my_graph_ref;\n    }\n};  // continue_input\n\n//! Implements methods for both executable and function nodes that puts Output to its successors\ntemplate< typename Output >\nclass function_output : public sender<Output> {\npublic:\n\n    template<int N> friend struct clear_element;\n    typedef Output output_type;\n    typedef typename sender<output_type>::successor_type successor_type;\n    typedef broadcast_cache<output_type> broadcast_cache_type;\n\n    function_output(graph& g) : my_successors(this), my_graph_ref(g) {}\n    function_output(const function_output& other) = delete;\n\n    //! Adds a new successor to this node\n    bool register_successor( successor_type &r ) override {\n        successors().register_successor( r );\n        return true;\n    }\n\n    //! Removes a successor from this node\n    bool remove_successor( successor_type &r ) override {\n        successors().remove_successor( r );\n        return true;\n    }\n\n    broadcast_cache_type &successors() { return my_successors; }\n\n    graph& graph_reference() const { return my_graph_ref; }\nprotected:\n    broadcast_cache_type my_successors;\n    graph& my_graph_ref;\n};  // function_output\n\ntemplate< typename Output >\nclass multifunction_output : public function_output<Output> {\npublic:\n    typedef Output output_type;\n    typedef function_output<output_type> base_type;\n    using base_type::my_successors;\n\n    multifunction_output(graph& g) : base_type(g) {}\n    multifunction_output(const multifunction_output& other) : base_type(other.my_graph_ref) {}\n\n    bool try_put(const output_type &i) {\n        graph_task *res = try_put_task(i);\n        if( !res ) return false;\n        if( res != SUCCESSFULLY_ENQUEUED ) {\n            // wrapping in task_arena::execute() is not needed since the method is called from\n            // inside task::execute()\n            spawn_in_graph_arena(graph_reference(), *res);\n        }\n        return true;\n    }\n\n    using base_type::graph_reference;\n\nprotected:\n\n    graph_task* try_put_task(const output_type &i) {\n        return my_successors.try_put_task(i);\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    graph_task* try_put_task(const output_type& i, const message_metainfo& metainfo) {\n        return my_successors.try_put_task(i, metainfo);\n    }\n#endif\n\n    template <int N> friend struct emit_element;\n\n};  // multifunction_output\n\n//composite_node\ntemplate<typename CompositeType>\nvoid add_nodes_impl(CompositeType*, bool) {}\n\ntemplate< typename CompositeType, typename NodeType1, typename... NodeTypes >\nvoid add_nodes_impl(CompositeType *c_node, bool visible, const NodeType1& n1, const NodeTypes&... n) {\n    void *addr = const_cast<NodeType1 *>(&n1);\n\n    fgt_alias_port(c_node, addr, visible);\n    add_nodes_impl(c_node, visible, n...);\n}\n\n#endif // __TBB__flow_graph_node_impl_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_flow_graph_node_set_impl.h",
    "content": "/*\n    Copyright (c) 2020-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_flow_graph_node_set_impl_H\n#define __TBB_flow_graph_node_set_impl_H\n\n#ifndef __TBB_flow_graph_H\n#error Do not #include this internal file directly; use public TBB headers instead.\n#endif\n\n// Included in namespace tbb::detail::d2 (in flow_graph.h)\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n// Visual Studio 2019 reports an error while calling predecessor_selector::get and successor_selector::get\n// Seems like the well-formed expression in trailing decltype is treated as ill-formed\n// TODO: investigate problems with decltype in trailing return types or find the cross-platform solution\n#define __TBB_MSVC_DISABLE_TRAILING_DECLTYPE (_MSC_VER >= 1900)\n\nnamespace order {\nstruct undefined {};\nstruct following {};\nstruct preceding {};\n}\n\nclass get_graph_helper {\npublic:\n    // TODO: consider making graph_reference() public and consistent interface to get a reference to the graph\n    // and remove get_graph_helper\n    template <typename T>\n    static graph& get(const T& object) {\n        return get_impl(object, std::is_base_of<graph_node, T>());\n    }\n\nprivate:\n    // Get graph from the object of type derived from graph_node\n    template <typename T>\n    static graph& get_impl(const T& object, std::true_type) {\n        return static_cast<const graph_node*>(&object)->my_graph;\n    }\n\n    template <typename T>\n    static graph& get_impl(const T& object, std::false_type) {\n        return object.graph_reference();\n    }\n};\n\ntemplate<typename Order, typename... Nodes>\nstruct node_set {\n    typedef Order order_type;\n\n    std::tuple<Nodes&...> nodes;\n    node_set(Nodes&... ns) : nodes(ns...) {}\n\n    template <typename... Nodes2>\n    node_set(const node_set<order::undefined, Nodes2...>& set) : nodes(set.nodes) {}\n\n    graph& graph_reference() const {\n        return get_graph_helper::get(std::get<0>(nodes));\n    }\n};\n\nnamespace alias_helpers {\ntemplate <typename T> using output_type = typename T::output_type;\ntemplate <typename T> using output_ports_type = typename T::output_ports_type;\ntemplate <typename T> using input_type = typename T::input_type;\ntemplate <typename T> using input_ports_type = typename T::input_ports_type;\n} // namespace alias_helpers\n\ntemplate <typename T>\nusing has_output_type = supports<T, alias_helpers::output_type>;\n\ntemplate <typename T>\nusing has_input_type = supports<T, alias_helpers::input_type>;\n\ntemplate <typename T>\nusing has_input_ports_type = supports<T, alias_helpers::input_ports_type>;\n\ntemplate <typename T>\nusing has_output_ports_type = supports<T, alias_helpers::output_ports_type>;\n\ntemplate<typename T>\nstruct is_sender : std::is_base_of<sender<typename T::output_type>, T> {};\n\ntemplate<typename T>\nstruct is_receiver : std::is_base_of<receiver<typename T::input_type>, T> {};\n\ntemplate <typename Node>\nstruct is_async_node : std::false_type {};\n\ntemplate <typename... Args>\nstruct is_async_node<async_node<Args...>> : std::true_type {};\n\ntemplate<typename FirstPredecessor, typename... Predecessors>\nnode_set<order::following, FirstPredecessor, Predecessors...>\nfollows(FirstPredecessor& first_predecessor, Predecessors&... predecessors) {\n    static_assert((conjunction<has_output_type<FirstPredecessor>,\n                                                   has_output_type<Predecessors>...>::value),\n                        \"Not all node's predecessors has output_type typedef\");\n    static_assert((conjunction<is_sender<FirstPredecessor>, is_sender<Predecessors>...>::value),\n                        \"Not all node's predecessors are senders\");\n    return node_set<order::following, FirstPredecessor, Predecessors...>(first_predecessor, predecessors...);\n}\n\ntemplate<typename... Predecessors>\nnode_set<order::following, Predecessors...>\nfollows(node_set<order::undefined, Predecessors...>& predecessors_set) {\n    static_assert((conjunction<has_output_type<Predecessors>...>::value),\n                        \"Not all nodes in the set has output_type typedef\");\n    static_assert((conjunction<is_sender<Predecessors>...>::value),\n                        \"Not all nodes in the set are senders\");\n    return node_set<order::following, Predecessors...>(predecessors_set);\n}\n\ntemplate<typename FirstSuccessor, typename... Successors>\nnode_set<order::preceding, FirstSuccessor, Successors...>\nprecedes(FirstSuccessor& first_successor, Successors&... successors) {\n    static_assert((conjunction<has_input_type<FirstSuccessor>,\n                                                    has_input_type<Successors>...>::value),\n                        \"Not all node's successors has input_type typedef\");\n    static_assert((conjunction<is_receiver<FirstSuccessor>, is_receiver<Successors>...>::value),\n                        \"Not all node's successors are receivers\");\n    return node_set<order::preceding, FirstSuccessor, Successors...>(first_successor, successors...);\n}\n\ntemplate<typename... Successors>\nnode_set<order::preceding, Successors...>\nprecedes(node_set<order::undefined, Successors...>& successors_set) {\n    static_assert((conjunction<has_input_type<Successors>...>::value),\n                        \"Not all nodes in the set has input_type typedef\");\n    static_assert((conjunction<is_receiver<Successors>...>::value),\n                        \"Not all nodes in the set are receivers\");\n    return node_set<order::preceding, Successors...>(successors_set);\n}\n\ntemplate <typename Node, typename... Nodes>\nnode_set<order::undefined, Node, Nodes...>\nmake_node_set(Node& first_node, Nodes&... nodes) {\n    return node_set<order::undefined, Node, Nodes...>(first_node, nodes...);\n}\n\ntemplate<size_t I>\nclass successor_selector {\n    template <typename NodeType>\n    static auto get_impl(NodeType& node, std::true_type) -> decltype(input_port<I>(node)) {\n        return input_port<I>(node);\n    }\n\n    template <typename NodeType>\n    static NodeType& get_impl(NodeType& node, std::false_type) { return node; }\n\npublic:\n    template <typename NodeType>\n#if __TBB_MSVC_DISABLE_TRAILING_DECLTYPE\n    static auto& get(NodeType& node)\n#else\n    static auto get(NodeType& node) -> decltype(get_impl(node, has_input_ports_type<NodeType>()))\n#endif\n    {\n        return get_impl(node, has_input_ports_type<NodeType>());\n    }\n};\n\ntemplate<size_t I>\nclass predecessor_selector {\n    template <typename NodeType>\n    static auto internal_get(NodeType& node, std::true_type) -> decltype(output_port<I>(node)) {\n        return output_port<I>(node);\n    }\n\n    template <typename NodeType>\n    static NodeType& internal_get(NodeType& node, std::false_type) { return node;}\n\n    template <typename NodeType>\n#if __TBB_MSVC_DISABLE_TRAILING_DECLTYPE\n    static auto& get_impl(NodeType& node, std::false_type)\n#else\n    static auto get_impl(NodeType& node, std::false_type) -> decltype(internal_get(node, has_output_ports_type<NodeType>()))\n#endif\n    {\n        return internal_get(node, has_output_ports_type<NodeType>());\n    }\n\n    template <typename AsyncNode>\n    static AsyncNode& get_impl(AsyncNode& node, std::true_type) { return node; }\n\npublic:\n    template <typename NodeType>\n#if __TBB_MSVC_DISABLE_TRAILING_DECLTYPE\n    static auto& get(NodeType& node)\n#else\n    static auto get(NodeType& node) -> decltype(get_impl(node, is_async_node<NodeType>()))\n#endif\n    {\n        return get_impl(node, is_async_node<NodeType>());\n    }\n};\n\ntemplate<size_t I>\nclass make_edges_helper {\npublic:\n    template<typename PredecessorsTuple, typename NodeType>\n    static void connect_predecessors(PredecessorsTuple& predecessors, NodeType& node) {\n        make_edge(std::get<I>(predecessors), successor_selector<I>::get(node));\n        make_edges_helper<I - 1>::connect_predecessors(predecessors, node);\n    }\n\n    template<typename SuccessorsTuple, typename NodeType>\n    static void connect_successors(NodeType& node, SuccessorsTuple& successors) {\n        make_edge(predecessor_selector<I>::get(node), std::get<I>(successors));\n        make_edges_helper<I - 1>::connect_successors(node, successors);\n    }\n};\n\ntemplate<>\nstruct make_edges_helper<0> {\n    template<typename PredecessorsTuple, typename NodeType>\n    static void connect_predecessors(PredecessorsTuple& predecessors, NodeType& node) {\n        make_edge(std::get<0>(predecessors), successor_selector<0>::get(node));\n    }\n\n    template<typename SuccessorsTuple, typename NodeType>\n    static void connect_successors(NodeType& node, SuccessorsTuple& successors) {\n        make_edge(predecessor_selector<0>::get(node), std::get<0>(successors));\n    }\n};\n\n// TODO: consider adding an overload for making edges between node sets\ntemplate<typename NodeType, typename OrderFlagType, typename... Args>\nvoid make_edges(const node_set<OrderFlagType, Args...>& s, NodeType& node) {\n    const std::size_t SetSize = std::tuple_size<decltype(s.nodes)>::value;\n    make_edges_helper<SetSize - 1>::connect_predecessors(s.nodes, node);\n}\n\ntemplate <typename NodeType, typename OrderFlagType, typename... Args>\nvoid make_edges(NodeType& node, const node_set<OrderFlagType, Args...>& s) {\n    const std::size_t SetSize = std::tuple_size<decltype(s.nodes)>::value;\n    make_edges_helper<SetSize - 1>::connect_successors(node, s.nodes);\n}\n\ntemplate <typename NodeType, typename... Nodes>\nvoid make_edges_in_order(const node_set<order::following, Nodes...>& ns, NodeType& node) {\n    make_edges(ns, node);\n}\n\ntemplate <typename NodeType, typename... Nodes>\nvoid make_edges_in_order(const node_set<order::preceding, Nodes...>& ns, NodeType& node) {\n    make_edges(node, ns);\n}\n\n#endif  // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n\n#endif // __TBB_flow_graph_node_set_impl_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_flow_graph_nodes_deduction.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_flow_graph_nodes_deduction_H\n#define __TBB_flow_graph_nodes_deduction_H\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\nnamespace tbb {\nnamespace detail {\nnamespace d2 {\n\ntemplate <typename Input, typename Output>\nstruct declare_body_types {\n    using input_type = Input;\n    using output_type = Output;\n};\n\nstruct NoInputBody {};\n\ntemplate <typename Output>\nstruct declare_body_types<NoInputBody, Output> {\n    using output_type = Output;\n};\n\ntemplate <typename T> struct body_types;\n\ntemplate <typename T, typename Input, typename Output>\nstruct body_types<Output (T::*)(const Input&) const> : declare_body_types<Input, Output> {};\n\ntemplate <typename T, typename Input, typename Output>\nstruct body_types<Output (T::*)(const Input&)> : declare_body_types<Input, Output> {};\n\ntemplate <typename T, typename Input, typename Output>\nstruct body_types<Output (T::*)(Input&) const> : declare_body_types<Input, Output> {};\n\ntemplate <typename T, typename Input, typename Output>\nstruct body_types<Output (T::*)(Input&)> : declare_body_types<Input, Output> {};\n\ntemplate <typename T, typename Output>\nstruct body_types<Output (T::*)(d1::flow_control&) const> : declare_body_types<NoInputBody, Output> {};\n\ntemplate <typename T, typename Output>\nstruct body_types<Output (T::*)(d1::flow_control&)> : declare_body_types<NoInputBody, Output> {};\n\ntemplate <typename Input, typename Output>\nstruct body_types<Output (*)(Input&)> : declare_body_types<Input, Output> {};\n\ntemplate <typename Input, typename Output>\nstruct body_types<Output (*)(const Input&)> : declare_body_types<Input, Output> {};\n\ntemplate <typename Output>\nstruct body_types<Output (*)(d1::flow_control&)> : declare_body_types<NoInputBody, Output> {};\n\ntemplate <typename Body>\nusing input_t = typename body_types<Body>::input_type;\n\ntemplate <typename Body>\nusing output_t = typename body_types<Body>::output_type;\n\ntemplate <typename T, typename Input, typename Output>\nauto decide_on_operator_overload(Output (T::*name)(const Input&) const)->decltype(name);\n\ntemplate <typename T, typename Input, typename Output>\nauto decide_on_operator_overload(Output (T::*name)(const Input&))->decltype(name);\n\ntemplate <typename T, typename Input, typename Output>\nauto decide_on_operator_overload(Output (T::*name)(Input&) const)->decltype(name);\n\ntemplate <typename T, typename Input, typename Output>\nauto decide_on_operator_overload(Output (T::*name)(Input&))->decltype(name);\n\ntemplate <typename Input, typename Output>\nauto decide_on_operator_overload(Output (*name)(const Input&))->decltype(name);\n\ntemplate <typename Input, typename Output>\nauto decide_on_operator_overload(Output (*name)(Input&))->decltype(name);\n\ntemplate <typename Body>\ndecltype(decide_on_operator_overload(&Body::operator())) decide_on_callable_type(int);\n\ntemplate <typename Body>\ndecltype(decide_on_operator_overload(std::declval<Body>())) decide_on_callable_type(...);\n\n// Deduction guides for Flow Graph nodes\n\ntemplate <typename GraphOrSet, typename Body>\ninput_node(GraphOrSet&&, Body)\n->input_node<output_t<decltype(decide_on_callable_type<Body>(0))>>;\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n\ntemplate <typename NodeSet>\nstruct decide_on_set;\n\ntemplate <typename Node, typename... Nodes>\nstruct decide_on_set<node_set<order::following, Node, Nodes...>> {\n    using type = typename Node::output_type;\n};\n\ntemplate <typename Node, typename... Nodes>\nstruct decide_on_set<node_set<order::preceding, Node, Nodes...>> {\n    using type = typename Node::input_type;\n};\n\ntemplate <typename NodeSet>\nusing decide_on_set_t = typename decide_on_set<std::decay_t<NodeSet>>::type;\n\ntemplate <typename NodeSet>\nbroadcast_node(const NodeSet&)\n->broadcast_node<decide_on_set_t<NodeSet>>;\n\ntemplate <typename NodeSet>\nbuffer_node(const NodeSet&)\n->buffer_node<decide_on_set_t<NodeSet>>;\n\ntemplate <typename NodeSet>\nqueue_node(const NodeSet&)\n->queue_node<decide_on_set_t<NodeSet>>;\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n\ntemplate <typename GraphOrProxy, typename Sequencer>\nsequencer_node(GraphOrProxy&&, Sequencer)\n->sequencer_node<input_t<decltype(decide_on_callable_type<Sequencer>(0))>>;\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\ntemplate <typename NodeSet, typename Compare>\npriority_queue_node(const NodeSet&, const Compare&)\n->priority_queue_node<decide_on_set_t<NodeSet>, Compare>;\n\ntemplate <typename NodeSet>\npriority_queue_node(const NodeSet&)\n->priority_queue_node<decide_on_set_t<NodeSet>, std::less<decide_on_set_t<NodeSet>>>;\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n\ntemplate <typename Key>\nstruct join_key {\n    using type = Key;\n};\n\ntemplate <typename T>\nstruct join_key<const T&> {\n    using type = T&;\n};\n\ntemplate <typename Key>\nusing join_key_t = typename join_key<Key>::type;\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\ntemplate <typename Policy, typename... Predecessors>\njoin_node(const node_set<order::following, Predecessors...>&, Policy)\n->join_node<std::tuple<typename Predecessors::output_type...>,\n            Policy>;\n\ntemplate <typename Policy, typename Successor, typename... Successors>\njoin_node(const node_set<order::preceding, Successor, Successors...>&, Policy)\n->join_node<typename Successor::input_type, Policy>;\n\ntemplate <typename... Predecessors>\njoin_node(const node_set<order::following, Predecessors...>)\n->join_node<std::tuple<typename Predecessors::output_type...>,\n            queueing>;\n\ntemplate <typename Successor, typename... Successors>\njoin_node(const node_set<order::preceding, Successor, Successors...>)\n->join_node<typename Successor::input_type, queueing>;\n#endif\n\ntemplate <typename GraphOrProxy, typename Body, typename... Bodies>\njoin_node(GraphOrProxy&&, Body, Bodies...)\n->join_node<std::tuple<input_t<decltype(decide_on_callable_type<Body>(0))>,\n                       input_t<decltype(decide_on_callable_type<Bodies>(0))>...>,\n            key_matching<join_key_t<output_t<decltype(decide_on_callable_type<Body>(0))>>>>;\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\ntemplate <typename... Predecessors>\nindexer_node(const node_set<order::following, Predecessors...>&)\n->indexer_node<typename Predecessors::output_type...>;\n#endif\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\ntemplate <typename NodeSet>\nlimiter_node(const NodeSet&, size_t)\n->limiter_node<decide_on_set_t<NodeSet>>;\n\ntemplate <typename Predecessor, typename... Predecessors>\nsplit_node(const node_set<order::following, Predecessor, Predecessors...>&)\n->split_node<typename Predecessor::output_type>;\n\ntemplate <typename... Successors>\nsplit_node(const node_set<order::preceding, Successors...>&)\n->split_node<std::tuple<typename Successors::input_type...>>;\n\n#endif\n\ntemplate <typename GraphOrSet, typename Body, typename Policy>\nfunction_node(GraphOrSet&&,\n              size_t, Body,\n              Policy, node_priority_t = no_priority)\n->function_node<input_t<decltype(decide_on_callable_type<Body>(0))>,\n                output_t<decltype(decide_on_callable_type<Body>(0))>,\n                Policy>;\n\ntemplate <typename GraphOrSet, typename Body>\nfunction_node(GraphOrSet&&, size_t,\n              Body, node_priority_t = no_priority)\n->function_node<input_t<decltype(decide_on_callable_type<Body>(0))>,\n                output_t<decltype(decide_on_callable_type<Body>(0))>,\n                queueing>;\n\ntemplate <typename Output>\nstruct continue_output {\n    using type = Output;\n};\n\ntemplate <>\nstruct continue_output<void> {\n    using type = continue_msg;\n};\n\ntemplate <typename T>\nusing continue_output_t = typename continue_output<T>::type;\n\ntemplate <typename GraphOrSet, typename Body, typename Policy>\ncontinue_node(GraphOrSet&&, Body,\n              Policy, node_priority_t = no_priority)\n->continue_node<continue_output_t<std::invoke_result_t<Body, continue_msg>>,\n                Policy>;\n\ntemplate <typename GraphOrSet, typename Body, typename Policy>\ncontinue_node(GraphOrSet&&,\n              int, Body,\n              Policy, node_priority_t = no_priority)\n->continue_node<continue_output_t<std::invoke_result_t<Body, continue_msg>>,\n                Policy>;\n\ntemplate <typename GraphOrSet, typename Body>\ncontinue_node(GraphOrSet&&,\n              Body, node_priority_t = no_priority)\n->continue_node<continue_output_t<std::invoke_result_t<Body, continue_msg>>, Policy<void>>;\n\ntemplate <typename GraphOrSet, typename Body>\ncontinue_node(GraphOrSet&&, int,\n              Body, node_priority_t = no_priority)\n->continue_node<continue_output_t<std::invoke_result_t<Body, continue_msg>>,\n                Policy<void>>;\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n\ntemplate <typename NodeSet>\noverwrite_node(const NodeSet&)\n->overwrite_node<decide_on_set_t<NodeSet>>;\n\ntemplate <typename NodeSet>\nwrite_once_node(const NodeSet&)\n->write_once_node<decide_on_set_t<NodeSet>>;\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n} // namespace d2\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\n#endif // __TBB_flow_graph_nodes_deduction_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_flow_graph_tagged_buffer_impl.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// a hash table buffer that can expand, and can support as many deletions as\n// additions, list-based, with elements of list held in array (for destruction\n// management), multiplicative hashing (like ets).  No synchronization built-in.\n//\n\n#ifndef __TBB__flow_graph_hash_buffer_impl_H\n#define __TBB__flow_graph_hash_buffer_impl_H\n\n#ifndef __TBB_flow_graph_H\n#error Do not #include this internal file directly; use public TBB headers instead.\n#endif\n\n// included in namespace tbb::flow::interfaceX::internal\n\n// elements in the table are a simple list; we need pointer to next element to\n// traverse the chain\n\ntemplate <typename Key, typename ValueType>\nstruct hash_buffer_element : public aligned_pair<ValueType, void*> {\n    using key_type = Key;\n    using value_type = ValueType;\n\n    value_type* get_value_ptr() { return reinterpret_cast<value_type*>(this->first); }\n    hash_buffer_element* get_next() { return reinterpret_cast<hash_buffer_element*>(this->second); }\n    void set_next(hash_buffer_element* new_next) { this->second = reinterpret_cast<void*>(new_next); }\n\n    void create_element(const value_type& v) {\n        ::new(this->first) value_type(v);\n    }\n\n    void create_element(hash_buffer_element&& other) {\n        ::new(this->first) value_type(std::move(*other.get_value_ptr()));\n    }\n\n    void destroy_element() {\n        get_value_ptr()->~value_type();\n    }\n};\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\ntemplate <typename Key, typename ValueType>\nstruct metainfo_hash_buffer_element : public aligned_triple<ValueType, void*, message_metainfo> {\n    using key_type = Key;\n    using value_type = ValueType;\n\n    value_type* get_value_ptr() { return reinterpret_cast<value_type*>(this->first); }\n    metainfo_hash_buffer_element* get_next() {\n        return reinterpret_cast<metainfo_hash_buffer_element*>(this->second);\n    }\n    void set_next(metainfo_hash_buffer_element* new_next) { this->second = reinterpret_cast<void*>(new_next); }\n    message_metainfo& get_metainfo() { return this->third; }\n\n    void create_element(const value_type& v, const message_metainfo& metainfo) {\n        __TBB_ASSERT(this->third.empty(), nullptr);\n        ::new(this->first) value_type(v);\n        this->third = metainfo;\n\n        for (auto waiter : metainfo.waiters()) {\n            waiter->reserve(1);\n        }\n    }\n\n    void create_element(metainfo_hash_buffer_element&& other) {\n        __TBB_ASSERT(this->third.empty(), nullptr);\n        ::new(this->first) value_type(std::move(*other.get_value_ptr()));\n        this->third = std::move(other.get_metainfo());\n    }\n\n    void destroy_element() {\n        get_value_ptr()->~value_type();\n\n        for (auto waiter : get_metainfo().waiters()) {\n            waiter->release(1);\n        }\n        get_metainfo() = message_metainfo{};\n    }\n};\n#endif\n\ntemplate\n    <\n     typename ElementType,\n     typename ValueToKey,  // abstract method that returns \"const Key\" or \"const Key&\" given ValueType\n     typename HashCompare, // has hash and equal\n     typename Allocator=tbb::cache_aligned_allocator<ElementType>\n    >\nclass hash_buffer_impl : public HashCompare {\npublic:\n    static const size_t INITIAL_SIZE = 8;  // initial size of the hash pointer table\n    typedef typename ElementType::key_type key_type;\n    typedef typename ElementType::value_type value_type;\n    typedef ElementType element_type;\n    typedef value_type *pointer_type;\n    typedef element_type *list_array_type;  // array we manage manually\n    typedef list_array_type *pointer_array_type;\n    typedef typename std::allocator_traits<Allocator>::template rebind_alloc<list_array_type> pointer_array_allocator_type;\n    typedef typename std::allocator_traits<Allocator>::template rebind_alloc<element_type> elements_array_allocator;\n    typedef typename std::decay<key_type>::type Knoref;\n\nprivate:\n    ValueToKey *my_key;\n    size_t my_size;\n    size_t nelements;\n    pointer_array_type pointer_array;    // pointer_array[my_size]\n    list_array_type elements_array;      // elements_array[my_size / 2]\n    element_type* free_list;\n\n    size_t mask() { return my_size - 1; }\n\n    void set_up_free_list( element_type **p_free_list, list_array_type la, size_t sz) {\n        for(size_t i=0; i < sz - 1; ++i ) {  // construct free list\n            la[i].set_next(&(la[i + 1]));\n        }\n        la[sz - 1].set_next(nullptr);\n        *p_free_list = (element_type *)&(la[0]);\n    }\n\n    // cleanup for exceptions\n    struct DoCleanup {\n        pointer_array_type *my_pa;\n        list_array_type *my_elements;\n        size_t my_size;\n\n        DoCleanup(pointer_array_type &pa, list_array_type &my_els, size_t sz) :\n            my_pa(&pa), my_elements(&my_els), my_size(sz) {  }\n        ~DoCleanup() {\n            if(my_pa) {\n                size_t dont_care = 0;\n                internal_free_buffer(*my_pa, *my_elements, my_size, dont_care);\n            }\n        }\n    };\n\n    // exception-safety requires we do all the potentially-throwing operations first\n    void grow_array() {\n        size_t new_size = my_size*2;\n        size_t new_nelements = nelements;  // internal_free_buffer zeroes this\n        list_array_type new_elements_array = nullptr;\n        pointer_array_type new_pointer_array = nullptr;\n        list_array_type new_free_list = nullptr;\n        {\n            DoCleanup my_cleanup(new_pointer_array, new_elements_array, new_size);\n            new_elements_array = elements_array_allocator().allocate(my_size);\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            for (std::size_t i = 0; i < my_size; ++i) {\n                ::new(new_elements_array + i) element_type();\n            }\n#endif\n            new_pointer_array = pointer_array_allocator_type().allocate(new_size);\n            for(size_t i=0; i < new_size; ++i) new_pointer_array[i] = nullptr;\n            set_up_free_list(&new_free_list, new_elements_array, my_size );\n\n            for(size_t i=0; i < my_size; ++i) {\n                for( element_type* op = pointer_array[i]; op; op = (element_type *)(op->get_next())) {\n                    internal_insert_with_key(new_pointer_array, new_size, new_free_list, std::move(*op));\n                }\n            }\n            my_cleanup.my_pa = nullptr;\n            my_cleanup.my_elements = nullptr;\n        }\n\n        internal_free_buffer(pointer_array, elements_array, my_size, nelements);\n        free_list = new_free_list;\n        pointer_array = new_pointer_array;\n        elements_array = new_elements_array;\n        my_size = new_size;\n        nelements = new_nelements;\n    }\n\n    // v should have perfect forwarding if std::move implemented.\n    // we use this method to move elements in grow_array, so can't use class fields\n    template <typename Value, typename... Args>\n    const value_type& get_value_from_pack(const Value& value, const Args&...) {\n        return value;\n    }\n\n    template <typename Element>\n    const value_type& get_value_from_pack(Element&& element) {\n        return *(element.get_value_ptr());\n    }\n\n    template <typename... Args>\n    void internal_insert_with_key( element_type **p_pointer_array, size_t p_sz, list_array_type &p_free_list,\n                                   Args&&... args) {\n        size_t l_mask = p_sz-1;\n        __TBB_ASSERT(my_key, \"Error: value-to-key functor not provided\");\n        size_t h = this->hash(tbb::detail::invoke(*my_key, get_value_from_pack(args...))) & l_mask;\n        __TBB_ASSERT(p_free_list, \"Error: free list not set up.\");\n        element_type* my_elem = p_free_list; p_free_list = (element_type *)(p_free_list->get_next());\n        my_elem->create_element(std::forward<Args>(args)...);\n        my_elem->set_next(p_pointer_array[h]);\n        p_pointer_array[h] = my_elem;\n    }\n\n    void internal_initialize_buffer() {\n        pointer_array = pointer_array_allocator_type().allocate(my_size);\n        for(size_t i = 0; i < my_size; ++i) pointer_array[i] = nullptr;\n        elements_array = elements_array_allocator().allocate(my_size / 2);\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        for (std::size_t i = 0; i < my_size / 2; ++i) {\n            ::new(elements_array + i) element_type();\n        }\n#endif\n        set_up_free_list(&free_list, elements_array, my_size / 2);\n    }\n\n    // made static so an enclosed class can use to properly dispose of the internals\n    static void internal_free_buffer( pointer_array_type &pa, list_array_type &el, size_t &sz, size_t &ne ) {\n        if(pa) {\n            for(size_t i = 0; i < sz; ++i ) {\n                element_type *p_next;\n                for( element_type *p = pa[i]; p; p = p_next) {\n                    p_next = p->get_next();\n                    p->destroy_element();\n                }\n            }\n            pointer_array_allocator_type().deallocate(pa, sz);\n            pa = nullptr;\n        }\n        // Separate test (if allocation of pa throws, el may be allocated.\n        // but no elements will be constructed.)\n        if(el) {\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            for (std::size_t i = 0; i < sz / 2; ++i) {\n                (el + i)->~element_type();\n            }\n#endif\n            elements_array_allocator().deallocate(el, sz / 2);\n            el = nullptr;\n        }\n        sz = INITIAL_SIZE;\n        ne = 0;\n    }\n\npublic:\n    hash_buffer_impl() : my_key(nullptr), my_size(INITIAL_SIZE), nelements(0) {\n        internal_initialize_buffer();\n    }\n\n    ~hash_buffer_impl() {\n        internal_free_buffer(pointer_array, elements_array, my_size, nelements);\n        delete my_key;\n        my_key = nullptr;\n    }\n    hash_buffer_impl(const hash_buffer_impl&) = delete;\n    hash_buffer_impl& operator=(const hash_buffer_impl&) = delete;\n\n    void reset() {\n        internal_free_buffer(pointer_array, elements_array, my_size, nelements);\n        internal_initialize_buffer();\n    }\n\n    // Take ownership of func object allocated with new.\n    // This method is only used internally, so can't be misused by user.\n    void set_key_func(ValueToKey *vtk) { my_key = vtk; }\n    // pointer is used to clone()\n    ValueToKey* get_key_func() { return my_key; }\n\n    template <typename... Args>\n    bool insert_with_key(const value_type &v, Args&&... args) {\n        element_type* p = nullptr;\n        __TBB_ASSERT(my_key, \"Error: value-to-key functor not provided\");\n        if(find_element_ref_with_key(tbb::detail::invoke(*my_key, v), p)) {\n            p->destroy_element();\n            p->create_element(v, std::forward<Args>(args)...);\n            return false;\n        }\n        ++nelements;\n        if(nelements*2 > my_size) grow_array();\n        internal_insert_with_key(pointer_array, my_size, free_list, v, std::forward<Args>(args)...);\n        return true;\n    }\n\n    bool find_element_ref_with_key(const Knoref& k, element_type*& v) {\n        size_t i = this->hash(k) & mask();\n        for(element_type* p = pointer_array[i]; p; p = (element_type *)(p->get_next())) {\n            __TBB_ASSERT(my_key, \"Error: value-to-key functor not provided\");\n            if(this->equal(tbb::detail::invoke(*my_key, *p->get_value_ptr()), k)) {\n                v = p;\n                return true;\n            }\n        }\n        return false;\n    }\n\n    // returns true and sets v to array element if found, else returns false.\n    bool find_ref_with_key(const Knoref& k, pointer_type &v) {\n        element_type* element_ptr = nullptr;\n        bool res = find_element_ref_with_key(k, element_ptr);\n        v = element_ptr->get_value_ptr();\n        return res;\n    }\n\n    bool find_with_key( const Knoref& k, value_type &v) {\n        value_type *p;\n        if(find_ref_with_key(k, p)) {\n            v = *p;\n            return true;\n        }\n        else\n            return false;\n    }\n\n    void delete_with_key(const Knoref& k) {\n        size_t h = this->hash(k) & mask();\n        element_type* prev = nullptr;\n        for(element_type* p = pointer_array[h]; p; prev = p, p = (element_type *)(p->get_next())) {\n            value_type *vp = p->get_value_ptr();\n            __TBB_ASSERT(my_key, \"Error: value-to-key functor not provided\");\n            if(this->equal(tbb::detail::invoke(*my_key, *vp), k)) {\n                p->destroy_element();\n                if(prev) prev->set_next(p->get_next());\n                else pointer_array[h] = (element_type *)(p->get_next());\n                p->set_next(free_list);\n                free_list = p;\n                --nelements;\n                return;\n            }\n        }\n        __TBB_ASSERT(false, \"key not found for delete\");\n    }\n};\n\ntemplate\n    <\n     typename Key,         // type of key within ValueType\n     typename ValueType,\n     typename ValueToKey,  // abstract method that returns \"const Key\" or \"const Key&\" given ValueType\n     typename HashCompare, // has hash and equal\n     typename Allocator=tbb::cache_aligned_allocator<hash_buffer_element<Key, ValueType>>\n    >\nusing hash_buffer = hash_buffer_impl<hash_buffer_element<Key, ValueType>,\n                                     ValueToKey, HashCompare, Allocator>;\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\ntemplate\n    <\n     typename Key,         // type of key within ValueType\n     typename ValueType,\n     typename ValueToKey,  // abstract method that returns \"const Key\" or \"const Key&\" given ValueType\n     typename HashCompare, // has hash and equal\n     typename Allocator=tbb::cache_aligned_allocator<metainfo_hash_buffer_element<Key, ValueType>>\n    >\nstruct metainfo_hash_buffer : public hash_buffer_impl<metainfo_hash_buffer_element<Key, ValueType>,\n                                               ValueToKey, HashCompare, Allocator>\n{\nprivate:\n    using base_type = hash_buffer_impl<metainfo_hash_buffer_element<Key, ValueType>,\n                                       ValueToKey, HashCompare, Allocator>;\npublic:\n    bool find_with_key(const typename base_type::Knoref& k,\n                       typename base_type::value_type& v, message_metainfo& metainfo)\n    {\n        typename base_type::element_type* p = nullptr;\n        bool result = this->find_element_ref_with_key(k, p);\n        if (result) {\n            v = *(p->get_value_ptr());\n            metainfo = p->get_metainfo();\n        }\n        return result;\n    }\n};\n#endif // __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n#endif // __TBB__flow_graph_hash_buffer_impl_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_flow_graph_trace_impl.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _FGT_GRAPH_TRACE_IMPL_H\n#define _FGT_GRAPH_TRACE_IMPL_H\n\n#include \"../profiling.h\"\n#if (_MSC_VER >= 1900)\n    #include <intrin.h>\n#endif\n\nnamespace tbb {\nnamespace detail {\nnamespace d2 {\n\ntemplate< typename T > class sender;\ntemplate< typename T > class receiver;\n\n#if TBB_USE_PROFILING_TOOLS\n    #if __TBB_FLOW_TRACE_CODEPTR\n        #if (_MSC_VER >= 1900)\n            #define CODEPTR() (_ReturnAddress())\n        #elif __TBB_GCC_VERSION >= 40800\n            #define CODEPTR() ( __builtin_return_address(0))\n        #else\n            #define CODEPTR() nullptr\n        #endif\n    #else\n        #define CODEPTR() nullptr\n    #endif /* __TBB_FLOW_TRACE_CODEPTR */\n\nstatic inline void fgt_alias_port(void *node, void *p, bool visible) {\n    if(visible)\n        itt_relation_add( d1::ITT_DOMAIN_FLOW, node, FLOW_NODE, __itt_relation_is_parent_of, p, FLOW_NODE );\n    else\n        itt_relation_add( d1::ITT_DOMAIN_FLOW, p, FLOW_NODE, __itt_relation_is_child_of, node, FLOW_NODE );\n}\n\nstatic inline void fgt_composite ( void* codeptr, void *node, void *graph ) {\n    itt_make_task_group( d1::ITT_DOMAIN_FLOW, node, FLOW_NODE, graph, FLOW_GRAPH, FLOW_COMPOSITE_NODE );\n    suppress_unused_warning( codeptr );\n#if __TBB_FLOW_TRACE_CODEPTR\n    if (codeptr != nullptr) {\n        register_node_addr(d1::ITT_DOMAIN_FLOW, node, FLOW_NODE, CODE_ADDRESS, &codeptr);\n    }\n#endif\n}\n\nstatic inline void fgt_internal_alias_input_port( void *node, void *p, string_resource_index name_index ) {\n    itt_make_task_group( d1::ITT_DOMAIN_FLOW, p, FLOW_INPUT_PORT, node, FLOW_NODE, name_index );\n    itt_relation_add( d1::ITT_DOMAIN_FLOW, node, FLOW_NODE, __itt_relation_is_parent_of, p, FLOW_INPUT_PORT );\n}\n\nstatic inline void fgt_internal_alias_output_port( void *node, void *p, string_resource_index name_index ) {\n    itt_make_task_group( d1::ITT_DOMAIN_FLOW, p, FLOW_OUTPUT_PORT, node, FLOW_NODE, name_index );\n    itt_relation_add( d1::ITT_DOMAIN_FLOW, node, FLOW_NODE, __itt_relation_is_parent_of, p, FLOW_OUTPUT_PORT );\n}\n\ntemplate<typename InputType>\nvoid alias_input_port(void *node, receiver<InputType>* port, string_resource_index name_index) {\n    // TODO: Make fgt_internal_alias_input_port a function template?\n    fgt_internal_alias_input_port( node, port, name_index);\n}\n\ntemplate < typename PortsTuple, int N >\nstruct fgt_internal_input_alias_helper {\n    static void alias_port( void *node, PortsTuple &ports ) {\n        alias_input_port( node, &(std::get<N-1>(ports)), static_cast<string_resource_index>(FLOW_INPUT_PORT_0 + N - 1) );\n        fgt_internal_input_alias_helper<PortsTuple, N-1>::alias_port( node, ports );\n    }\n};\n\ntemplate < typename PortsTuple >\nstruct fgt_internal_input_alias_helper<PortsTuple, 0> {\n    static void alias_port( void * /* node */, PortsTuple & /* ports */ ) { }\n};\n\ntemplate<typename OutputType>\nvoid alias_output_port(void *node, sender<OutputType>* port, string_resource_index name_index) {\n    // TODO: Make fgt_internal_alias_output_port a function template?\n    fgt_internal_alias_output_port( node, static_cast<void *>(port), name_index);\n}\n\ntemplate < typename PortsTuple, int N >\nstruct fgt_internal_output_alias_helper {\n    static void alias_port( void *node, PortsTuple &ports ) {\n        alias_output_port( node, &(std::get<N-1>(ports)), static_cast<string_resource_index>(FLOW_OUTPUT_PORT_0 + N - 1) );\n        fgt_internal_output_alias_helper<PortsTuple, N-1>::alias_port( node, ports );\n    }\n};\n\ntemplate < typename PortsTuple >\nstruct fgt_internal_output_alias_helper<PortsTuple, 0> {\n    static void alias_port( void * /*node*/, PortsTuple &/*ports*/ ) {\n    }\n};\n\nstatic inline void fgt_internal_create_input_port( void *node, void *p, string_resource_index name_index ) {\n    itt_make_task_group( d1::ITT_DOMAIN_FLOW, p, FLOW_INPUT_PORT, node, FLOW_NODE, name_index );\n}\n\nstatic inline void fgt_internal_create_output_port( void* codeptr, void *node, void *p, string_resource_index name_index ) {\n    itt_make_task_group(d1::ITT_DOMAIN_FLOW, p, FLOW_OUTPUT_PORT, node, FLOW_NODE, name_index);\n    suppress_unused_warning( codeptr );\n#if __TBB_FLOW_TRACE_CODEPTR\n    if (codeptr != nullptr) {\n        register_node_addr(d1::ITT_DOMAIN_FLOW, node, FLOW_NODE, CODE_ADDRESS, &codeptr);\n    }\n#endif\n}\n\ntemplate<typename InputType>\nvoid register_input_port(void *node, receiver<InputType>* port, string_resource_index name_index) {\n    // TODO: Make fgt_internal_create_input_port a function template?\n    fgt_internal_create_input_port(node, static_cast<void*>(port), name_index);\n}\n\ntemplate < typename PortsTuple, int N >\nstruct fgt_internal_input_helper {\n    static void register_port( void *node, PortsTuple &ports ) {\n        register_input_port( node, &(std::get<N-1>(ports)), static_cast<string_resource_index>(FLOW_INPUT_PORT_0 + N - 1) );\n        fgt_internal_input_helper<PortsTuple, N-1>::register_port( node, ports );\n    }\n};\n\ntemplate < typename PortsTuple >\nstruct fgt_internal_input_helper<PortsTuple, 1> {\n    static void register_port( void *node, PortsTuple &ports ) {\n        register_input_port( node, &(std::get<0>(ports)), FLOW_INPUT_PORT_0 );\n    }\n};\n\ntemplate<typename OutputType>\nvoid register_output_port(void* codeptr, void *node, sender<OutputType>* port, string_resource_index name_index) {\n    // TODO: Make fgt_internal_create_output_port a function template?\n    fgt_internal_create_output_port( codeptr, node, static_cast<void *>(port), name_index);\n}\n\ntemplate < typename PortsTuple, int N >\nstruct fgt_internal_output_helper {\n    static void register_port( void* codeptr, void *node, PortsTuple &ports ) {\n        register_output_port( codeptr, node, &(std::get<N-1>(ports)), static_cast<string_resource_index>(FLOW_OUTPUT_PORT_0 + N - 1) );\n        fgt_internal_output_helper<PortsTuple, N-1>::register_port( codeptr, node, ports );\n    }\n};\n\ntemplate < typename PortsTuple >\nstruct fgt_internal_output_helper<PortsTuple,1> {\n    static void register_port( void* codeptr, void *node, PortsTuple &ports ) {\n        register_output_port( codeptr, node, &(std::get<0>(ports)), FLOW_OUTPUT_PORT_0 );\n    }\n};\n\ntemplate< typename NodeType >\nvoid fgt_multioutput_node_desc( const NodeType *node, const char *desc ) {\n    void *addr =  (void *)( static_cast< receiver< typename NodeType::input_type > * >(const_cast< NodeType *>(node)) );\n    itt_metadata_str_add( d1::ITT_DOMAIN_FLOW, addr, FLOW_NODE, FLOW_OBJECT_NAME, desc );\n}\n\ntemplate< typename NodeType >\nvoid fgt_multiinput_multioutput_node_desc( const NodeType *node, const char *desc ) {\n    void *addr =  const_cast<NodeType *>(node);\n    itt_metadata_str_add( d1::ITT_DOMAIN_FLOW, addr, FLOW_NODE, FLOW_OBJECT_NAME, desc );\n}\n\ntemplate< typename NodeType >\nstatic inline void fgt_node_desc( const NodeType *node, const char *desc ) {\n    void *addr =  (void *)( static_cast< sender< typename NodeType::output_type > * >(const_cast< NodeType *>(node)) );\n    itt_metadata_str_add( d1::ITT_DOMAIN_FLOW, addr, FLOW_NODE, FLOW_OBJECT_NAME, desc );\n}\n\nstatic inline void fgt_graph_desc( const void *g, const char *desc ) {\n    void *addr = const_cast< void *>(g);\n    itt_metadata_str_add( d1::ITT_DOMAIN_FLOW, addr, FLOW_GRAPH, FLOW_OBJECT_NAME, desc );\n}\n\nstatic inline void fgt_body( void *node, void *body ) {\n    itt_relation_add( d1::ITT_DOMAIN_FLOW, body, FLOW_BODY, __itt_relation_is_child_of, node, FLOW_NODE );\n}\n\ntemplate< int N, typename PortsTuple >\nstatic inline void fgt_multioutput_node(void* codeptr, string_resource_index t, void *g, void *input_port, PortsTuple &ports ) {\n    itt_make_task_group( d1::ITT_DOMAIN_FLOW, input_port, FLOW_NODE, g, FLOW_GRAPH, t );\n    fgt_internal_create_input_port( input_port, input_port, FLOW_INPUT_PORT_0 );\n    fgt_internal_output_helper<PortsTuple, N>::register_port(codeptr, input_port, ports );\n}\n\ntemplate< int N, typename PortsTuple >\nstatic inline void fgt_multioutput_node_with_body( void* codeptr, string_resource_index t, void *g, void *input_port, PortsTuple &ports, void *body ) {\n    itt_make_task_group( d1::ITT_DOMAIN_FLOW, input_port, FLOW_NODE, g, FLOW_GRAPH, t );\n    fgt_internal_create_input_port( input_port, input_port, FLOW_INPUT_PORT_0 );\n    fgt_internal_output_helper<PortsTuple, N>::register_port( codeptr, input_port, ports );\n    fgt_body( input_port, body );\n}\n\ntemplate< int N, typename PortsTuple >\nstatic inline void fgt_multiinput_node( void* codeptr, string_resource_index t, void *g, PortsTuple &ports, void *output_port) {\n    itt_make_task_group( d1::ITT_DOMAIN_FLOW, output_port, FLOW_NODE, g, FLOW_GRAPH, t );\n    fgt_internal_create_output_port( codeptr, output_port, output_port, FLOW_OUTPUT_PORT_0 );\n    fgt_internal_input_helper<PortsTuple, N>::register_port( output_port, ports );\n}\n\nstatic inline void fgt_multiinput_multioutput_node( void* codeptr, string_resource_index t, void *n, void *g ) {\n    itt_make_task_group( d1::ITT_DOMAIN_FLOW, n, FLOW_NODE, g, FLOW_GRAPH, t );\n    suppress_unused_warning( codeptr );\n#if __TBB_FLOW_TRACE_CODEPTR\n    if (codeptr != nullptr) {\n        register_node_addr(d1::ITT_DOMAIN_FLOW, n, FLOW_NODE, CODE_ADDRESS, &codeptr);\n    }\n#endif\n}\n\nstatic inline void fgt_node( void* codeptr, string_resource_index t, void *g, void *output_port ) {\n    itt_make_task_group( d1::ITT_DOMAIN_FLOW, output_port, FLOW_NODE, g, FLOW_GRAPH, t );\n    fgt_internal_create_output_port( codeptr, output_port, output_port, FLOW_OUTPUT_PORT_0 );\n}\n\nstatic void fgt_node_with_body( void* codeptr, string_resource_index t, void *g, void *output_port, void *body ) {\n    itt_make_task_group( d1::ITT_DOMAIN_FLOW, output_port, FLOW_NODE, g, FLOW_GRAPH, t );\n    fgt_internal_create_output_port(codeptr, output_port, output_port, FLOW_OUTPUT_PORT_0 );\n    fgt_body( output_port, body );\n}\n\nstatic inline void fgt_node( void* codeptr, string_resource_index t, void *g, void *input_port, void *output_port ) {\n    fgt_node( codeptr, t, g, output_port );\n    fgt_internal_create_input_port( output_port, input_port, FLOW_INPUT_PORT_0 );\n}\n\nstatic inline void  fgt_node_with_body( void* codeptr, string_resource_index t, void *g, void *input_port, void *output_port, void *body ) {\n    fgt_node_with_body( codeptr, t, g, output_port, body );\n    fgt_internal_create_input_port( output_port, input_port, FLOW_INPUT_PORT_0 );\n}\n\n\nstatic inline void  fgt_node( void* codeptr, string_resource_index t, void *g, void *input_port, void *decrement_port, void *output_port ) {\n    fgt_node( codeptr, t, g, input_port, output_port );\n    fgt_internal_create_input_port( output_port, decrement_port, FLOW_INPUT_PORT_1 );\n}\n\nstatic inline void fgt_make_edge( void *output_port, void *input_port ) {\n    itt_relation_add( d1::ITT_DOMAIN_FLOW, output_port, FLOW_OUTPUT_PORT, __itt_relation_is_predecessor_to, input_port, FLOW_INPUT_PORT);\n}\n\nstatic inline void fgt_remove_edge( void *output_port, void *input_port ) {\n    itt_relation_add( d1::ITT_DOMAIN_FLOW, output_port, FLOW_OUTPUT_PORT, __itt_relation_is_sibling_of, input_port, FLOW_INPUT_PORT);\n}\n\nstatic inline void fgt_graph( void *g ) {\n    itt_make_task_group( d1::ITT_DOMAIN_FLOW, g, FLOW_GRAPH, nullptr, FLOW_NULL, FLOW_GRAPH );\n}\n\nstatic inline void fgt_begin_body( void *body ) {\n    itt_task_begin( d1::ITT_DOMAIN_FLOW, body, FLOW_BODY, nullptr, FLOW_NULL, FLOW_BODY );\n}\n\nstatic inline void fgt_end_body( void * ) {\n    itt_task_end( d1::ITT_DOMAIN_FLOW );\n}\n\nstatic inline void fgt_async_try_put_begin( void *node, void *port ) {\n    itt_task_begin( d1::ITT_DOMAIN_FLOW, port, FLOW_OUTPUT_PORT, node, FLOW_NODE, FLOW_OUTPUT_PORT );\n}\n\nstatic inline void fgt_async_try_put_end( void *, void * ) {\n    itt_task_end( d1::ITT_DOMAIN_FLOW );\n}\n\nstatic inline void fgt_async_reserve( void *node, void *graph ) {\n    itt_region_begin( d1::ITT_DOMAIN_FLOW, node, FLOW_NODE, graph, FLOW_GRAPH, FLOW_NULL );\n}\n\nstatic inline void fgt_async_commit( void *node, void * /*graph*/) {\n    itt_region_end( d1::ITT_DOMAIN_FLOW, node, FLOW_NODE );\n}\n\nstatic inline void fgt_reserve_wait( void *graph ) {\n    itt_region_begin( d1::ITT_DOMAIN_FLOW, graph, FLOW_GRAPH, nullptr, FLOW_NULL, FLOW_NULL );\n}\n\nstatic inline void fgt_release_wait( void *graph ) {\n    itt_region_end( d1::ITT_DOMAIN_FLOW, graph, FLOW_GRAPH );\n}\n\n#else // TBB_USE_PROFILING_TOOLS\n\n#define CODEPTR() nullptr\n\nstatic inline void fgt_alias_port(void * /*node*/, void * /*p*/, bool /*visible*/ ) { }\n\nstatic inline void fgt_composite ( void* /*codeptr*/, void * /*node*/, void * /*graph*/ ) { }\n\nstatic inline void fgt_graph( void * /*g*/ ) { }\n\ntemplate< typename NodeType >\nstatic inline void fgt_multioutput_node_desc( const NodeType * /*node*/, const char * /*desc*/ ) { }\n\ntemplate< typename NodeType >\nstatic inline void fgt_node_desc( const NodeType * /*node*/, const char * /*desc*/ ) { }\n\nstatic inline void fgt_graph_desc( const void * /*g*/, const char * /*desc*/ ) { }\n\ntemplate< int N, typename PortsTuple >\nstatic inline void fgt_multioutput_node( void* /*codeptr*/, string_resource_index /*t*/, void * /*g*/, void * /*input_port*/, PortsTuple & /*ports*/ ) { }\n\ntemplate< int N, typename PortsTuple >\nstatic inline void fgt_multioutput_node_with_body( void* /*codeptr*/, string_resource_index /*t*/, void * /*g*/, void * /*input_port*/, PortsTuple & /*ports*/, void * /*body*/ ) { }\n\ntemplate< int N, typename PortsTuple >\nstatic inline void fgt_multiinput_node( void* /*codeptr*/, string_resource_index /*t*/, void * /*g*/, PortsTuple & /*ports*/, void * /*output_port*/ ) { }\n\nstatic inline void fgt_multiinput_multioutput_node( void* /*codeptr*/, string_resource_index /*t*/, void * /*node*/, void * /*graph*/ ) { }\n\nstatic inline void fgt_node( void* /*codeptr*/, string_resource_index /*t*/, void * /*g*/, void * /*input_port*/, void * /*output_port*/ ) { }\nstatic inline void  fgt_node( void* /*codeptr*/, string_resource_index /*t*/, void * /*g*/, void * /*input_port*/, void * /*decrement_port*/, void * /*output_port*/ ) { }\n\nstatic inline void fgt_node_with_body( void* /*codeptr*/, string_resource_index /*t*/, void * /*g*/, void * /*output_port*/, void * /*body*/ ) { }\nstatic inline void fgt_node_with_body( void* /*codeptr*/, string_resource_index /*t*/, void * /*g*/, void * /*input_port*/, void * /*output_port*/, void * /*body*/ ) { }\n\nstatic inline void fgt_make_edge( void * /*output_port*/, void * /*input_port*/ ) { }\nstatic inline void fgt_remove_edge( void * /*output_port*/, void * /*input_port*/ ) { }\n\nstatic inline void fgt_begin_body( void * /*body*/ ) { }\nstatic inline void fgt_end_body( void *  /*body*/) { }\n\nstatic inline void fgt_async_try_put_begin( void * /*node*/, void * /*port*/ ) { }\nstatic inline void fgt_async_try_put_end( void * /*node*/ , void * /*port*/ ) { }\nstatic inline void fgt_async_reserve( void * /*node*/, void * /*graph*/ ) { }\nstatic inline void fgt_async_commit( void * /*node*/, void * /*graph*/ ) { }\nstatic inline void fgt_reserve_wait( void * /*graph*/ ) { }\nstatic inline void fgt_release_wait( void * /*graph*/ ) { }\n\ntemplate< typename NodeType >\nvoid fgt_multiinput_multioutput_node_desc( const NodeType * /*node*/, const char * /*desc*/ ) { }\n\ntemplate < typename PortsTuple, int N >\nstruct fgt_internal_input_alias_helper {\n    static void alias_port( void * /*node*/, PortsTuple & /*ports*/ ) { }\n};\n\ntemplate < typename PortsTuple, int N >\nstruct fgt_internal_output_alias_helper {\n    static void alias_port( void * /*node*/, PortsTuple & /*ports*/ ) { }\n};\n\n#endif // TBB_USE_PROFILING_TOOLS\n\n} // d2\n} // namespace detail\n} // namespace tbb\n\n#endif // _FGT_GRAPH_TRACE_IMPL_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_flow_graph_types_impl.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB__flow_graph_types_impl_H\n#define __TBB__flow_graph_types_impl_H\n\n#ifndef __TBB_flow_graph_H\n#error Do not #include this internal file directly; use public TBB headers instead.\n#endif\n\n// included in namespace tbb::detail::d2\n\n// the change to key_matching (adding a K and KHash template parameter, making it a class)\n// means we have to pass this data to the key_matching_port.  All the ports have only one\n// template parameter, so we have to wrap the following types in a trait:\n//\n//    . K == key_type\n//    . KHash == hash and compare for Key\n//    . TtoK == function_body that given an object of T, returns its K\n//    . T == type accepted by port, and stored in the hash table\n//\n// The port will have an additional parameter on node construction, which is a function_body\n// that accepts a const T& and returns a K which is the field in T which is its K.\ntemplate<typename Kp, typename KHashp, typename Tp>\nstruct KeyTrait {\n    typedef Kp K;\n    typedef Tp T;\n    typedef type_to_key_function_body<T,K> TtoK;\n    typedef KHashp KHash;\n};\n\n// wrap each element of a tuple in a template, and make a tuple of the result.\ntemplate<int N, template<class> class PT, typename TypeTuple>\nstruct wrap_tuple_elements;\n\n// A wrapper that generates the traits needed for each port of a key-matching join,\n// and the type of the tuple of input ports.\ntemplate<int N, template<class> class PT, typename KeyTraits, typename TypeTuple>\nstruct wrap_key_tuple_elements;\n\ntemplate<int N, template<class> class PT,  typename... Args>\nstruct wrap_tuple_elements<N, PT, std::tuple<Args...> >{\n    typedef typename std::tuple<PT<Args>... > type;\n};\n\ntemplate<int N, template<class> class PT, typename KeyTraits, typename... Args>\nstruct wrap_key_tuple_elements<N, PT, KeyTraits, std::tuple<Args...> > {\n    typedef typename KeyTraits::key_type K;\n    typedef typename KeyTraits::hash_compare_type KHash;\n    typedef typename std::tuple<PT<KeyTrait<K, KHash, Args> >... > type;\n};\n\ntemplate< int... S > class sequence {};\n\ntemplate< int N, int... S >\nstruct make_sequence : make_sequence < N - 1, N - 1, S... > {};\n\ntemplate< int... S >\nstruct make_sequence < 0, S... > {\n    typedef sequence<S...> type;\n};\n\ntemplate<class U> struct alignment_of {\n    typedef struct { char t; U    padded; } test_alignment;\n    static const size_t value = sizeof(test_alignment) - sizeof(U);\n};\n\ntemplate <typename... Types>\nstruct max_alignment_helper;\n\ntemplate <typename T1, typename... Types>\nstruct max_alignment_helper<T1, Types...> {\n    using type = typename max_alignment_helper<T1, typename max_alignment_helper<Types...>::type>::type;\n};\n\ntemplate <typename T1, typename T2>\nstruct max_alignment_helper<T1, T2> {\n    using type = typename std::conditional<alignof(T1) < alignof(T2), T2, T1>::type;\n};\n\ntemplate <typename... Types>\nusing max_alignment_helper_t = typename max_alignment_helper<Types...>::type;\n\n#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n#pragma warning(push)\n#pragma warning(disable: 4324) // warning C4324: structure was padded due to alignment specifier\n#endif\n\n// T1, T2 are actual types stored.  The space defined for T1 in the type returned\n// is a char array of the correct size.  Type T2 should be trivially-constructible,\n// T1 must be explicitly managed.\n\ntemplate <typename T1, typename T2>\nstruct alignas(alignof(max_alignment_helper_t<T1, T2>)) aligned_pair {\n    char first[sizeof(T1)];\n    T2 second;\n};\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\ntemplate <typename T1, typename T2, typename T3>\nstruct alignas(alignof(max_alignment_helper_t<T1, T2, T3>)) aligned_triple {\n    char first[sizeof(T1)];\n    T2 second;\n    T3 third;\n};\n#endif\n\n\n#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n#pragma warning(pop) // warning 4324 is back\n#endif\n\n// support for variant type\n// type we use when we're not storing a value\nstruct default_constructed { };\n\n// type which contains another type, tests for what type is contained, and references to it.\n// Wrapper<T>\n//     void CopyTo( void *newSpace) : builds a Wrapper<T> copy of itself in newSpace\n\n// struct to allow us to copy and test the type of objects\nstruct WrapperBase {\n    virtual ~WrapperBase() {}\n    virtual void CopyTo(void* /*newSpace*/) const = 0;\n};\n\n// Wrapper<T> contains a T, with the ability to test what T is.  The Wrapper<T> can be\n// constructed from a T, can be copy-constructed from another Wrapper<T>, and can be\n// examined via value(), but not modified.\ntemplate<typename T>\nstruct Wrapper: public WrapperBase {\n    typedef T value_type;\n    typedef T* pointer_type;\nprivate:\n    T value_space;\npublic:\n    const value_type &value() const { return value_space; }\n\nprivate:\n    Wrapper();\n\n    // on exception will ensure the Wrapper will contain only a trivially-constructed object\n    struct _unwind_space {\n        pointer_type space;\n        _unwind_space(pointer_type p) : space(p) {}\n        ~_unwind_space() {\n            if(space) (void) new (space) Wrapper<default_constructed>(default_constructed());\n        }\n    };\npublic:\n    explicit Wrapper( const T& other ) : value_space(other) { }\n    explicit Wrapper(const Wrapper& other) = delete;\n\n    void CopyTo(void* newSpace) const override {\n        _unwind_space guard((pointer_type)newSpace);\n        (void) new(newSpace) Wrapper(value_space);\n        guard.space = nullptr;\n    }\n    ~Wrapper() { }\n};\n\n// specialization for array objects\ntemplate<typename T, size_t N>\nstruct Wrapper<T[N]> : public WrapperBase {\n    typedef T value_type;\n    typedef T* pointer_type;\n    // space must be untyped.\n    typedef T ArrayType[N];\nprivate:\n    // The space is not of type T[N] because when copy-constructing, it would be\n    // default-initialized and then copied to in some fashion, resulting in two\n    // constructions and one destruction per element.  If the type is char[ ], we\n    // placement new into each element, resulting in one construction per element.\n    static const size_t space_size = sizeof(ArrayType);\n    char value_space[space_size];\n\n\n    // on exception will ensure the already-built objects will be destructed\n    // (the value_space is a char array, so it is already trivially-destructible.)\n    struct _unwind_class {\n        pointer_type space;\n        int    already_built;\n        _unwind_class(pointer_type p) : space(p), already_built(0) {}\n        ~_unwind_class() {\n            if(space) {\n                for(size_t i = already_built; i > 0 ; --i ) space[i-1].~value_type();\n                (void) new(space) Wrapper<default_constructed>(default_constructed());\n            }\n        }\n    };\npublic:\n    const ArrayType &value() const {\n        char *vp = const_cast<char *>(value_space);\n        return reinterpret_cast<ArrayType &>(*vp);\n    }\n\nprivate:\n    Wrapper();\npublic:\n    // have to explicitly construct because other decays to a const value_type*\n    explicit Wrapper(const ArrayType& other) {\n        _unwind_class guard((pointer_type)value_space);\n        pointer_type vp = reinterpret_cast<pointer_type>(&value_space);\n        for(size_t i = 0; i < N; ++i ) {\n            (void) new(vp++) value_type(other[i]);\n            ++(guard.already_built);\n        }\n        guard.space = nullptr;\n    }\n    explicit Wrapper(const Wrapper& other) : WrapperBase() {\n        // we have to do the heavy lifting to copy contents\n        _unwind_class guard((pointer_type)value_space);\n        pointer_type dp = reinterpret_cast<pointer_type>(value_space);\n        pointer_type sp = reinterpret_cast<pointer_type>(const_cast<char *>(other.value_space));\n        for(size_t i = 0; i < N; ++i, ++dp, ++sp) {\n            (void) new(dp) value_type(*sp);\n            ++(guard.already_built);\n        }\n        guard.space = nullptr;\n    }\n\n    void CopyTo(void* newSpace) const override {\n        (void) new(newSpace) Wrapper(*this);  // exceptions handled in copy constructor\n    }\n\n    ~Wrapper() {\n        // have to destroy explicitly in reverse order\n        pointer_type vp = reinterpret_cast<pointer_type>(&value_space);\n        for(size_t i = N; i > 0 ; --i ) vp[i-1].~value_type();\n    }\n};\n\n// given a tuple, return the type of the element that has the maximum alignment requirement.\n// Given a tuple and that type, return the number of elements of the object with the max\n// alignment requirement that is at least as big as the largest object in the tuple.\n\ntemplate<bool, class T1, class T2> struct pick_one;\ntemplate<class T1, class T2> struct pick_one<true , T1, T2> { typedef T1 type; };\ntemplate<class T1, class T2> struct pick_one<false, T1, T2> { typedef T2 type; };\n\ntemplate< template<class> class Selector, typename T1, typename T2 >\nstruct pick_max {\n    typedef typename pick_one< (Selector<T1>::value > Selector<T2>::value), T1, T2 >::type type;\n};\n\ntemplate<typename T> struct size_of { static const int value = sizeof(T); };\n\ntemplate< size_t N, class Tuple, template<class> class Selector > struct pick_tuple_max {\n    typedef typename pick_tuple_max<N-1, Tuple, Selector>::type LeftMaxType;\n    typedef typename std::tuple_element<N-1, Tuple>::type ThisType;\n    typedef typename pick_max<Selector, LeftMaxType, ThisType>::type type;\n};\n\ntemplate< class Tuple, template<class> class Selector > struct pick_tuple_max<0, Tuple, Selector> {\n    typedef typename std::tuple_element<0, Tuple>::type type;\n};\n\n// is the specified type included in a tuple?\ntemplate<class Q, size_t N, class Tuple>\nstruct is_element_of {\n    typedef typename std::tuple_element<N-1, Tuple>::type T_i;\n    static const bool value = std::is_same<Q,T_i>::value || is_element_of<Q,N-1,Tuple>::value;\n};\n\ntemplate<class Q, class Tuple>\nstruct is_element_of<Q,0,Tuple> {\n    typedef typename std::tuple_element<0, Tuple>::type T_i;\n    static const bool value = std::is_same<Q,T_i>::value;\n};\n\n// allow the construction of types that are listed tuple.  If a disallowed type\n// construction is written, a method involving this type is created.  The\n// type has no definition, so a syntax error is generated.\ntemplate<typename T> struct ERROR_Type_Not_allowed_In_Tagged_Msg_Not_Member_Of_Tuple;\n\ntemplate<typename T, bool BUILD_IT> struct do_if;\ntemplate<typename T>\nstruct do_if<T, true> {\n    static void construct(void *mySpace, const T& x) {\n        (void) new(mySpace) Wrapper<T>(x);\n    }\n};\ntemplate<typename T>\nstruct do_if<T, false> {\n    static void construct(void * /*mySpace*/, const T& x) {\n        // This method is instantiated when the type T does not match any of the\n        // element types in the Tuple in variant<Tuple>.\n        ERROR_Type_Not_allowed_In_Tagged_Msg_Not_Member_Of_Tuple<T>::bad_type(x);\n    }\n};\n\n// Tuple tells us the allowed types that variant can hold.  It determines the alignment of the space in\n// Wrapper, and how big Wrapper is.\n//\n// the object can only be tested for type, and a read-only reference can be fetched by cast_to<T>().\n\nusing tbb::detail::punned_cast;\nstruct tagged_null_type {};\ntemplate<typename TagType, typename T0, typename T1=tagged_null_type, typename T2=tagged_null_type, typename T3=tagged_null_type,\n                           typename T4=tagged_null_type, typename T5=tagged_null_type, typename T6=tagged_null_type,\n                           typename T7=tagged_null_type, typename T8=tagged_null_type, typename T9=tagged_null_type>\nclass tagged_msg {\n    typedef std::tuple<T0, T1, T2, T3, T4\n                  //TODO: Should we reject lists longer than a tuple can hold?\n                  #if __TBB_VARIADIC_MAX >= 6\n                  , T5\n                  #endif\n                  #if __TBB_VARIADIC_MAX >= 7\n                  , T6\n                  #endif\n                  #if __TBB_VARIADIC_MAX >= 8\n                  , T7\n                  #endif\n                  #if __TBB_VARIADIC_MAX >= 9\n                  , T8\n                  #endif\n                  #if __TBB_VARIADIC_MAX >= 10\n                  , T9\n                  #endif\n                  > Tuple;\n\nprivate:\n    class variant {\n        static const size_t N = std::tuple_size<Tuple>::value;\n        typedef typename pick_tuple_max<N, Tuple, alignment_of>::type AlignType;\n        typedef typename pick_tuple_max<N, Tuple, size_of>::type MaxSizeType;\n        static const size_t MaxNBytes = (sizeof(Wrapper<MaxSizeType>)+sizeof(AlignType)-1);\n        static const size_t MaxNElements = MaxNBytes/sizeof(AlignType);\n        typedef aligned_space<AlignType, MaxNElements> SpaceType;\n        SpaceType my_space;\n        static const size_t MaxSize = sizeof(SpaceType);\n\n    public:\n        variant() { (void) new(&my_space) Wrapper<default_constructed>(default_constructed()); }\n\n        template<typename T>\n        variant( const T& x ) {\n            do_if<T, is_element_of<T, N, Tuple>::value>::construct(&my_space,x);\n        }\n\n        variant(const variant& other) {\n            const WrapperBase * h = punned_cast<const WrapperBase *>(&(other.my_space));\n            h->CopyTo(&my_space);\n        }\n\n        // assignment must destroy and re-create the Wrapper type, as there is no way\n        // to create a Wrapper-to-Wrapper assign even if we find they agree in type.\n        void operator=( const variant& rhs ) {\n            if(&rhs != this) {\n                WrapperBase *h = punned_cast<WrapperBase *>(&my_space);\n                h->~WrapperBase();\n                const WrapperBase *ch = punned_cast<const WrapperBase *>(&(rhs.my_space));\n                ch->CopyTo(&my_space);\n            }\n        }\n\n        template<typename U>\n        const U& variant_cast_to() const {\n            const Wrapper<U> *h = dynamic_cast<const Wrapper<U>*>(punned_cast<const WrapperBase *>(&my_space));\n            if(!h) {\n                throw_exception(exception_id::bad_tagged_msg_cast);\n            }\n            return h->value();\n        }\n        template<typename U>\n        bool variant_is_a() const { return dynamic_cast<const Wrapper<U>*>(punned_cast<const WrapperBase *>(&my_space)) != nullptr; }\n\n        bool variant_is_default_constructed() const {return variant_is_a<default_constructed>();}\n\n        ~variant() {\n            WrapperBase *h = punned_cast<WrapperBase *>(&my_space);\n            h->~WrapperBase();\n        }\n    }; //class variant\n\n    TagType my_tag;\n    variant my_msg;\n\npublic:\n    tagged_msg(): my_tag(TagType(~0)), my_msg(){}\n\n    template<typename T, typename R>\n    tagged_msg(T const &index, R const &value) : my_tag(index), my_msg(value) {}\n\n    template<typename T, typename R, size_t N>\n    tagged_msg(T const &index,  R (&value)[N]) : my_tag(index), my_msg(value) {}\n\n    void set_tag(TagType const &index) {my_tag = index;}\n    TagType tag() const {return my_tag;}\n\n    template<typename V>\n    const V& cast_to() const {return my_msg.template variant_cast_to<V>();}\n\n    template<typename V>\n    bool is_a() const {return my_msg.template variant_is_a<V>();}\n\n    bool is_default_constructed() const {return my_msg.variant_is_default_constructed();}\n}; //class tagged_msg\n\n// template to simplify cast and test for tagged_msg in template contexts\ntemplate<typename V, typename T>\nconst V& cast_to(T const &t) { return t.template cast_to<V>(); }\n\ntemplate<typename V, typename T>\nbool is_a(T const &t) { return t.template is_a<V>(); }\n\nenum op_stat { WAIT = 0, SUCCEEDED, FAILED };\n\n#endif  /* __TBB__flow_graph_types_impl_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_hash_compare.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_detail__hash_compare_H\n#define __TBB_detail__hash_compare_H\n\n#include <functional>\n\n#include \"_containers_helpers.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\ntemplate <typename Key, typename Hash, typename KeyEqual>\nclass hash_compare {\n    using is_transparent_hash = has_transparent_key_equal<Key, Hash, KeyEqual>;\npublic:\n    using hasher = Hash;\n    using key_equal = typename is_transparent_hash::type;\n\n    hash_compare() = default;\n    hash_compare( hasher hash, key_equal equal ) : my_hasher(hash), my_equal(equal) {}\n\n    std::size_t operator()( const Key& key ) const {\n        return std::size_t(my_hasher(key));\n    }\n\n    bool operator()( const Key& key1, const Key& key2 ) const {\n        return my_equal(key1, key2);\n    }\n\n    template <typename K, typename = typename std::enable_if<is_transparent_hash::value, K>::type>\n    std::size_t operator()( const K& key ) const {\n        return std::size_t(my_hasher(key));\n    }\n\n    template <typename K1, typename K2, typename = typename std::enable_if<is_transparent_hash::value, K1>::type>\n    bool operator()( const K1& key1, const K2& key2 ) const {\n        return my_equal(key1, key2);\n    }\n\n    hasher hash_function() const {\n        return my_hasher;\n    }\n\n    key_equal key_eq() const {\n        return my_equal;\n    }\n\n\nprivate:\n    hasher my_hasher;\n    key_equal my_equal;\n}; // class hash_compare\n\n//! hash_compare that is default argument for concurrent_hash_map\ntemplate <typename Key>\nclass tbb_hash_compare {\npublic:\n    std::size_t hash( const Key& a ) const { return my_hash_func(a); }\n#if defined(_MSC_VER) && _MSC_VER <= 1900\n#pragma warning (push)\n// MSVC 2015 throws a strange warning: 'std::size_t': forcing value to bool 'true' or 'false'\n#pragma warning (disable: 4800)\n#endif\n    bool equal( const Key& a, const Key& b ) const { return my_key_equal(a, b); }\n#if defined(_MSC_VER) && _MSC_VER <= 1900\n#pragma warning (pop)\n#endif\nprivate:\n    std::hash<Key> my_hash_func;\n    std::equal_to<Key> my_key_equal;\n};\n\n} // namespace d1\n#if __TBB_CPP20_CONCEPTS_PRESENT\ninline namespace d0 {\n\ntemplate <typename HashCompare, typename Key>\nconcept hash_compare = std::copy_constructible<HashCompare> &&\n                       requires( const std::remove_reference_t<HashCompare>& hc, const Key& key1, const Key& key2 ) {\n                           { hc.hash(key1) } -> std::same_as<std::size_t>;\n                           { hc.equal(key1, key2) } -> std::convertible_to<bool>;\n                       };\n\n} // namespace d0\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n} // namespace detail\n} // namespace tbb\n\n#if TBB_DEFINE_STD_HASH_SPECIALIZATIONS\n\nnamespace std {\n\ntemplate <typename T, typename U>\nstruct hash<std::pair<T, U>> {\npublic:\n    std::size_t operator()( const std::pair<T, U>& p ) const {\n        return first_hash(p.first) ^ second_hash(p.second);\n    }\n\nprivate:\n    std::hash<T> first_hash;\n    std::hash<U> second_hash;\n}; // struct hash<std::pair>\n\n// Apple clang and MSVC defines their own specializations for std::hash<std::basic_string<T, Traits, Alloc>>\n#if !(_LIBCPP_VERSION) && !(_CPPLIB_VER)\n\ntemplate <typename CharT, typename Traits, typename Allocator>\nstruct hash<std::basic_string<CharT, Traits, Allocator>> {\npublic:\n    std::size_t operator()( const std::basic_string<CharT, Traits, Allocator>& s ) const {\n        std::size_t h = 0;\n        for ( const CharT* c = s.c_str(); *c; ++c ) {\n            h = h * hash_multiplier ^ char_hash(*c);\n        }\n        return h;\n    }\n\nprivate:\n    static constexpr std::size_t hash_multiplier = tbb::detail::select_size_t_constant<2654435769U, 11400714819323198485ULL>::value;\n\n    std::hash<CharT> char_hash;\n}; // struct hash<std::basic_string>\n\n#endif // !(_LIBCPP_VERSION || _CPPLIB_VER)\n\n} // namespace std\n\n#endif // TBB_DEFINE_STD_HASH_SPECIALIZATIONS\n\n#endif // __TBB_detail__hash_compare_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_intrusive_list_node.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_detail__intrusive_list_node_H\n#define _TBB_detail__intrusive_list_node_H\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n//! Data structure to be inherited by the types that can form intrusive lists.\n/** Intrusive list is formed by means of the member_intrusive_list<T> template class.\n    Note that type T must derive from intrusive_list_node either publicly or\n    declare instantiation member_intrusive_list<T> as a friend.\n    This class implements a limited subset of std::list interface. **/\nstruct intrusive_list_node {\n    intrusive_list_node* my_prev_node{};\n    intrusive_list_node* my_next_node{};\n#if TBB_USE_ASSERT\n    intrusive_list_node() { my_prev_node = my_next_node = this; }\n#endif /* TBB_USE_ASSERT */\n};\n\n} // namespace d1\n} // namespace detail\n} // namespace tbb\n\n#endif // _TBB_detail__intrusive_list_node_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_machine.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_detail__machine_H\n#define __TBB_detail__machine_H\n\n#include \"_config.h\"\n#include \"_assert.h\"\n\n#include <atomic>\n#include <climits>\n#include <cstdint>\n#include <cstddef>\n\n#ifdef _WIN32\n#include <intrin.h>\n#ifdef __TBBMALLOC_BUILD\n#define WIN32_LEAN_AND_MEAN\n#ifndef NOMINMAX\n#define NOMINMAX\n#endif\n#include <windows.h> // SwitchToThread()\n#endif\n#ifdef _MSC_VER\n#if __TBB_x86_64 || __TBB_x86_32\n#pragma intrinsic(__rdtsc)\n#endif\n#endif\n#endif\n#if __TBB_x86_64 || __TBB_x86_32\n#include <immintrin.h> // _mm_pause\n#endif\n#if (_WIN32)\n#include <float.h> // _control87\n#endif\n\n#if __TBB_GLIBCXX_THIS_THREAD_YIELD_BROKEN\n#include <sched.h> // sched_yield\n#else\n#include <thread> // std::this_thread::yield()\n#endif\n\nnamespace tbb {\nnamespace detail {\ninline namespace d0 {\n\n//--------------------------------------------------------------------------------------------------\n// Yield implementation\n//--------------------------------------------------------------------------------------------------\n\n#if __TBB_GLIBCXX_THIS_THREAD_YIELD_BROKEN\nstatic inline void yield() {\n    int err = sched_yield();\n    __TBB_ASSERT_EX(err == 0, \"sched_yield has failed\");\n}\n#elif __TBBMALLOC_BUILD && _WIN32\n// Use Windows API for yield in tbbmalloc to avoid dependency on C++ runtime with some implementations.\nstatic inline void yield() {\n    SwitchToThread();\n}\n#else\nusing std::this_thread::yield;\n#endif\n\n//--------------------------------------------------------------------------------------------------\n// atomic_fence_seq_cst implementation\n//--------------------------------------------------------------------------------------------------\n\nstatic inline void atomic_fence_seq_cst() {\n#if (__TBB_x86_64 || __TBB_x86_32) && defined(__GNUC__) && __GNUC__ < 11\n    unsigned char dummy = 0u;\n    __asm__ __volatile__ (\"lock; notb %0\" : \"+m\" (dummy) :: \"memory\");\n#else\n    std::atomic_thread_fence(std::memory_order_seq_cst);\n#endif\n}\n\n//--------------------------------------------------------------------------------------------------\n// Pause implementation\n//--------------------------------------------------------------------------------------------------\n\nstatic inline void machine_pause(int32_t delay) {\n#if __TBB_x86_64 || __TBB_x86_32\n    while (delay-- > 0) { _mm_pause(); }\n#elif __ARM_ARCH_7A__ || __aarch64__\n    while (delay-- > 0) { __asm__ __volatile__(\"isb sy\" ::: \"memory\"); }\n#else /* Generic */\n    (void)delay; // suppress without including _template_helpers.h\n    yield();\n#endif\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////\n// tbb::detail::log2() implementation\n////////////////////////////////////////////////////////////////////////////////////////////////////\n// TODO: Use log2p1() function that will be available in C++20 standard\n\n#if defined(__GNUC__) || defined(__clang__)\nnamespace gnu_builtins {\n    inline uintptr_t clz(unsigned int x) { return static_cast<uintptr_t>(__builtin_clz(x)); }\n    inline uintptr_t clz(unsigned long int x) { return static_cast<uintptr_t>(__builtin_clzl(x)); }\n    inline uintptr_t clz(unsigned long long int x) { return static_cast<uintptr_t>(__builtin_clzll(x)); }\n}\n#elif defined(_MSC_VER)\n#pragma intrinsic(__TBB_W(_BitScanReverse))\nnamespace msvc_intrinsics {\n    static inline uintptr_t bit_scan_reverse(uintptr_t i) {\n        unsigned long j;\n        __TBB_W(_BitScanReverse)( &j, i );\n        return j;\n    }\n}\n#endif\n\ntemplate <typename T>\nconstexpr std::uintptr_t number_of_bits() {\n    return sizeof(T) * CHAR_BIT;\n}\n\n// logarithm is the index of the most significant non-zero bit\nstatic inline uintptr_t machine_log2(uintptr_t x) {\n#if defined(__GNUC__) || defined(__clang__)\n    // If P is a power of 2 and x<P, then (P-1)-x == (P-1) XOR x\n    return (number_of_bits<decltype(x)>() - 1) ^ gnu_builtins::clz(x);\n#elif defined(_MSC_VER)\n    return msvc_intrinsics::bit_scan_reverse(x);\n#elif __i386__ || __i386 /*for Sun OS*/ || __MINGW32__\n    uintptr_t j, i = x;\n    __asm__(\"bsr %1,%0\" : \"=r\"(j) : \"r\"(i));\n    return j;\n#elif __powerpc__ || __POWERPC__\n    #if __TBB_WORDSIZE==8\n    __asm__ __volatile__ (\"cntlzd %0,%0\" : \"+r\"(x));\n    return 63 - static_cast<intptr_t>(x);\n    #else\n    __asm__ __volatile__ (\"cntlzw %0,%0\" : \"+r\"(x));\n    return 31 - static_cast<intptr_t>(x);\n    #endif /*__TBB_WORDSIZE*/\n#elif __sparc\n    uint64_t count;\n    // one hot encode\n    x |= (x >> 1);\n    x |= (x >> 2);\n    x |= (x >> 4);\n    x |= (x >> 8);\n    x |= (x >> 16);\n    x |= (x >> 32);\n    // count 1's\n    __asm__ (\"popc %1, %0\" : \"=r\"(count) : \"r\"(x) );\n    return count - 1;\n#else\n    intptr_t result = 0;\n\n    if( sizeof(x) > 4 && (uintptr_t tmp = x >> 32) ) { x = tmp; result += 32; }\n    if( uintptr_t tmp = x >> 16 ) { x = tmp; result += 16; }\n    if( uintptr_t tmp = x >> 8 )  { x = tmp; result += 8; }\n    if( uintptr_t tmp = x >> 4 )  { x = tmp; result += 4; }\n    if( uintptr_t tmp = x >> 2 )  { x = tmp; result += 2; }\n\n    return (x & 2) ? result + 1 : result;\n#endif\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////\n// tbb::detail::reverse_bits() implementation\n////////////////////////////////////////////////////////////////////////////////////////////////////\n#if TBB_USE_CLANG_BITREVERSE_BUILTINS\nnamespace  llvm_builtins {\n    inline uint8_t  builtin_bitreverse(uint8_t  x) { return __builtin_bitreverse8 (x); }\n    inline uint16_t builtin_bitreverse(uint16_t x) { return __builtin_bitreverse16(x); }\n    inline uint32_t builtin_bitreverse(uint32_t x) { return __builtin_bitreverse32(x); }\n    inline uint64_t builtin_bitreverse(uint64_t x) { return __builtin_bitreverse64(x); }\n}\n#else // generic\ntemplate<typename T>\nstruct reverse {\n    static const T byte_table[256];\n};\n\ntemplate<typename T>\nconst T reverse<T>::byte_table[256] = {\n    0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0,\n    0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8,\n    0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4, 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4,\n    0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, 0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC,\n    0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2,\n    0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA, 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA,\n    0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6, 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6,\n    0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE, 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE,\n    0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1, 0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1,\n    0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9,\n    0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5, 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5,\n    0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED, 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD,\n    0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3, 0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3,\n    0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB,\n    0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,\n    0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF\n};\n\ninline unsigned char reverse_byte(unsigned char src) {\n    return reverse<unsigned char>::byte_table[src];\n}\n#endif // TBB_USE_CLANG_BITREVERSE_BUILTINS\n\ntemplate<typename T>\nT machine_reverse_bits(T src) {\n#if TBB_USE_CLANG_BITREVERSE_BUILTINS\n    return builtin_bitreverse(fixed_width_cast(src));\n#else /* Generic */\n    T dst;\n    unsigned char *original = reinterpret_cast<unsigned char *>(&src);\n    unsigned char *reversed = reinterpret_cast<unsigned char *>(&dst);\n\n    for ( int i = sizeof(T) - 1; i >= 0; i-- ) {\n        reversed[i] = reverse_byte( original[sizeof(T) - i - 1] );\n    }\n\n    return dst;\n#endif // TBB_USE_CLANG_BITREVERSE_BUILTINS\n}\n\n} // inline namespace d0\n\nnamespace d1 {\n\n#if (_WIN32)\n// API to retrieve/update FPU control setting\n#define __TBB_CPU_CTL_ENV_PRESENT 1\nstruct cpu_ctl_env {\n    unsigned int x87cw{};\n#if (__TBB_x86_64)\n    // Changing the infinity mode or the floating-point precision is not supported on x64.\n    // The attempt causes an assertion. See\n    // https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/control87-controlfp-control87-2\n    static constexpr unsigned int X87CW_CONTROL_MASK = _MCW_DN | _MCW_EM | _MCW_RC;\n#else\n    static constexpr unsigned int X87CW_CONTROL_MASK = ~0U;\n#endif\n#if (__TBB_x86_32 || __TBB_x86_64)\n    unsigned int mxcsr{};\n    static constexpr unsigned int MXCSR_CONTROL_MASK = ~0x3fu; /* all except last six status bits */\n#endif\n\n    bool operator!=( const cpu_ctl_env& ctl ) const {\n        return\n#if (__TBB_x86_32 || __TBB_x86_64)\n            mxcsr != ctl.mxcsr ||\n#endif\n            x87cw != ctl.x87cw;\n    }\n    void get_env() {\n        x87cw = _control87(0, 0);\n#if (__TBB_x86_32 || __TBB_x86_64)\n        mxcsr = _mm_getcsr();\n#endif\n    }\n    void set_env() const {\n        _control87(x87cw, X87CW_CONTROL_MASK);\n#if (__TBB_x86_32 || __TBB_x86_64)\n        _mm_setcsr(mxcsr & MXCSR_CONTROL_MASK);\n#endif\n    }\n};\n#elif (__TBB_x86_32 || __TBB_x86_64)\n// API to retrieve/update FPU control setting\n#define __TBB_CPU_CTL_ENV_PRESENT 1\nstruct cpu_ctl_env {\n    int     mxcsr{};\n    short   x87cw{};\n    static const int MXCSR_CONTROL_MASK = ~0x3f; /* all except last six status bits */\n\n    bool operator!=(const cpu_ctl_env& ctl) const {\n        return mxcsr != ctl.mxcsr || x87cw != ctl.x87cw;\n    }\n    void get_env() {\n        __asm__ __volatile__(\n            \"stmxcsr %0\\n\\t\"\n            \"fstcw %1\"\n            : \"=m\"(mxcsr), \"=m\"(x87cw)\n        );\n        mxcsr &= MXCSR_CONTROL_MASK;\n    }\n    void set_env() const {\n        __asm__ __volatile__(\n            \"ldmxcsr %0\\n\\t\"\n            \"fldcw %1\"\n            : : \"m\"(mxcsr), \"m\"(x87cw)\n        );\n    }\n};\n#endif\n\n} // namespace d1\n\n} // namespace detail\n} // namespace tbb\n\n#if !__TBB_CPU_CTL_ENV_PRESENT\n#include <fenv.h>\n\n#include <cstring>\n\nnamespace tbb {\nnamespace detail {\n\nnamespace r1 {\nvoid* __TBB_EXPORTED_FUNC cache_aligned_allocate(std::size_t size);\nvoid __TBB_EXPORTED_FUNC cache_aligned_deallocate(void* p);\n} // namespace r1\n\nnamespace d1 {\n\nclass cpu_ctl_env {\n    fenv_t *my_fenv_ptr;\npublic:\n    cpu_ctl_env() : my_fenv_ptr(nullptr) {}\n    ~cpu_ctl_env() {\n        if ( my_fenv_ptr )\n            r1::cache_aligned_deallocate( (void*)my_fenv_ptr );\n    }\n    // It is possible not to copy memory but just to copy pointers but the following issues should be addressed:\n    //   1. The arena lifetime and the context lifetime are independent;\n    //   2. The user is allowed to recapture different FPU settings to context so 'current FPU settings' inside\n    //   dispatch loop may become invalid.\n    // But do we really want to improve the fenv implementation? It seems to be better to replace the fenv implementation\n    // with a platform specific implementation.\n    cpu_ctl_env( const cpu_ctl_env &src ) : my_fenv_ptr(nullptr) {\n        *this = src;\n    }\n    cpu_ctl_env& operator=( const cpu_ctl_env &src ) {\n        __TBB_ASSERT( src.my_fenv_ptr, nullptr);\n        if ( !my_fenv_ptr )\n            my_fenv_ptr = (fenv_t*)r1::cache_aligned_allocate(sizeof(fenv_t));\n        *my_fenv_ptr = *src.my_fenv_ptr;\n        return *this;\n    }\n    bool operator!=( const cpu_ctl_env &ctl ) const {\n        __TBB_ASSERT( my_fenv_ptr, \"cpu_ctl_env is not initialized.\" );\n        __TBB_ASSERT( ctl.my_fenv_ptr, \"cpu_ctl_env is not initialized.\" );\n        return std::memcmp( (void*)my_fenv_ptr, (void*)ctl.my_fenv_ptr, sizeof(fenv_t) );\n    }\n    void get_env () {\n        if ( !my_fenv_ptr )\n            my_fenv_ptr = (fenv_t*)r1::cache_aligned_allocate(sizeof(fenv_t));\n        fegetenv( my_fenv_ptr );\n    }\n    const cpu_ctl_env& set_env () const {\n        __TBB_ASSERT( my_fenv_ptr, \"cpu_ctl_env is not initialized.\" );\n        fesetenv( my_fenv_ptr );\n        return *this;\n    }\n};\n\n} // namespace d1\n} // namespace detail\n} // namespace tbb\n\n#endif /* !__TBB_CPU_CTL_ENV_PRESENT */\n\n#endif // __TBB_detail__machine_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_mutex_common.h",
    "content": "/*\n    Copyright (c) 2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_detail__mutex_common_H\n#define __TBB_detail__mutex_common_H\n\n#include \"_config.h\"\n#include \"_utils.h\"\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n#include <concepts>\n\nnamespace tbb {\nnamespace detail {\ninline namespace d0 {\n\ntemplate <typename Lock, typename Mutex>\nconcept mutex_scoped_lock = std::default_initializable<Lock> &&\n                            std::constructible_from<Lock, Mutex&> &&\n                            requires( Lock& lock, Mutex& mutex ) {\n                                lock.acquire(mutex);\n                                { lock.try_acquire(mutex) } -> adaptive_same_as<bool>;\n                                lock.release();\n                            };\n\ntemplate <typename Lock, typename Mutex>\nconcept rw_mutex_scoped_lock = mutex_scoped_lock<Lock, Mutex> &&\n                               std::constructible_from<Lock, Mutex&, bool> &&\n                               requires( Lock& lock, Mutex& mutex ) {\n                                   lock.acquire(mutex, false);\n                                   { lock.try_acquire(mutex, false) } -> adaptive_same_as<bool>;\n                                   { lock.upgrade_to_writer() } -> adaptive_same_as<bool>;\n                                   { lock.downgrade_to_reader() } -> adaptive_same_as<bool>;\n                               };\n\ntemplate <typename Mutex>\nconcept scoped_lockable = mutex_scoped_lock<typename Mutex::scoped_lock, Mutex>;\n\ntemplate <typename Mutex>\nconcept rw_scoped_lockable = scoped_lockable<Mutex> &&\n                             rw_mutex_scoped_lock<typename Mutex::scoped_lock, Mutex>;\n\n} // namespace d0\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n#endif // __TBB_detail__mutex_common_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_namespace_injection.h",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// All public entities of the OneAPI Spec are available under oneapi namespace\n\n// Define tbb namespace first as it might not be known yet\nnamespace tbb {}\n\nnamespace oneapi {\nnamespace tbb = ::tbb;\n}\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_node_handle.h",
    "content": "/*\n    Copyright (c) 2019-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_detail__node_handle_H\n#define __TBB_detail__node_handle_H\n\n#include \"_allocator_traits.h\"\n#include \"_assert.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n// A structure to access private node handle methods in internal TBB classes\n// Regular friend declaration is not convenient because classes which use node handle\n// can be placed in the different versioning namespaces.\nstruct node_handle_accessor {\n    template <typename NodeHandleType>\n    static typename NodeHandleType::node* get_node_ptr( NodeHandleType& nh ) {\n        return nh.get_node_ptr();\n    }\n\n    template <typename NodeHandleType>\n    static NodeHandleType construct( typename NodeHandleType::node* node_ptr ) {\n        return NodeHandleType{node_ptr};\n    }\n\n    template <typename NodeHandleType>\n    static void deactivate( NodeHandleType& nh ) {\n        nh.deactivate();\n    }\n}; // struct node_handle_accessor\n\ntemplate<typename Value, typename Node, typename Allocator>\nclass node_handle_base {\npublic:\n    using allocator_type = Allocator;\nprotected:\n    using node = Node;\n    using allocator_traits_type = tbb::detail::allocator_traits<allocator_type>;\npublic:\n\n    node_handle_base() : my_node(nullptr), my_allocator() {}\n    node_handle_base(node_handle_base&& nh) : my_node(nh.my_node),\n                                              my_allocator(std::move(nh.my_allocator)) {\n        nh.my_node = nullptr;\n    }\n\n    __TBB_nodiscard bool empty() const { return my_node == nullptr; }\n    explicit operator bool() const { return my_node != nullptr; }\n\n    ~node_handle_base() { internal_destroy(); }\n\n    node_handle_base& operator=( node_handle_base&& nh ) {\n        internal_destroy();\n        my_node = nh.my_node;\n        move_assign_allocators(my_allocator, nh.my_allocator);\n        nh.deactivate();\n        return *this;\n    }\n\n    void swap( node_handle_base& nh ) {\n        using std::swap;\n        swap(my_node, nh.my_node);\n        swap_allocators(my_allocator, nh.my_allocator);\n    }\n\n    allocator_type get_allocator() const {\n        return my_allocator;\n    }\n\nprotected:\n    node_handle_base( node* n ) : my_node(n) {}\n\n    void internal_destroy() {\n        if(my_node != nullptr) {\n            allocator_traits_type::destroy(my_allocator, my_node->storage());\n            typename allocator_traits_type::template rebind_alloc<node> node_allocator(my_allocator);\n            node_allocator.deallocate(my_node, 1);\n        }\n    }\n\n    node* get_node_ptr() { return my_node; }\n\n    void deactivate() { my_node = nullptr; }\n\n    node* my_node;\n    allocator_type my_allocator;\n};\n\n// node handle for maps\ntemplate<typename Key, typename Value, typename Node, typename Allocator>\nclass node_handle : public node_handle_base<Value, Node, Allocator> {\n    using base_type = node_handle_base<Value, Node, Allocator>;\npublic:\n    using key_type = Key;\n    using mapped_type = typename Value::second_type;\n    using allocator_type = typename base_type::allocator_type;\n\n    node_handle() = default;\n\n    key_type& key() const {\n        __TBB_ASSERT(!this->empty(), \"Cannot get key from the empty node_type object\");\n        return *const_cast<key_type*>(&(this->my_node->value().first));\n    }\n\n    mapped_type& mapped() const {\n        __TBB_ASSERT(!this->empty(), \"Cannot get mapped value from the empty node_type object\");\n        return this->my_node->value().second;\n    }\n\nprivate:\n    friend struct node_handle_accessor;\n\n    node_handle( typename base_type::node* n ) : base_type(n) {}\n}; // class node_handle\n\n// node handle for sets\ntemplate<typename Key, typename Node, typename Allocator>\nclass node_handle<Key, Key, Node, Allocator> : public node_handle_base<Key, Node, Allocator> {\n    using base_type = node_handle_base<Key, Node, Allocator>;\npublic:\n    using value_type = Key;\n    using allocator_type = typename base_type::allocator_type;\n\n    node_handle() = default;\n\n    value_type& value() const {\n        __TBB_ASSERT(!this->empty(), \"Cannot get value from the empty node_type object\");\n        return *const_cast<value_type*>(&(this->my_node->value()));\n    }\n\nprivate:\n    friend struct node_handle_accessor;\n\n    node_handle( typename base_type::node* n ) : base_type(n) {}\n}; // class node_handle\n\ntemplate <typename Key, typename Value, typename Node, typename Allocator>\nvoid swap( node_handle<Key, Value, Node, Allocator>& lhs,\n           node_handle<Key, Value, Node, Allocator>& rhs ) {\n    return lhs.swap(rhs);\n}\n\n} // namespace d1\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_detail__node_handle_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_pipeline_filters.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_parallel_filters_H\n#define __TBB_parallel_filters_H\n\n#include \"_config.h\"\n#include \"_task.h\"\n#include \"_pipeline_filters_deduction.h\"\n#include \"../tbb_allocator.h\"\n\n#include <cstddef>\n#include <cstdint>\n\nnamespace tbb {\nnamespace detail {\n\nnamespace d1 {\nclass base_filter;\n}\n\nnamespace d2 {\ntemplate <typename Output>\n__TBB_requires(std::copyable<Output>)\nclass input_node;\n}\n\nnamespace r1 {\nTBB_EXPORT void __TBB_EXPORTED_FUNC set_end_of_input(d1::base_filter&);\nclass pipeline;\nclass stage_task;\nclass input_buffer;\n}\n\nnamespace d1 {\nclass filter_node;\n\n//! A stage in a pipeline.\n/** @ingroup algorithms */\nclass base_filter{\nprivate:\n    //! Value used to mark \"not in pipeline\"\n    static base_filter* not_in_pipeline() { return reinterpret_cast<base_filter*>(std::intptr_t(-1)); }\npublic:\n    //! The lowest bit 0 is for parallel vs serial\n    static constexpr  unsigned int filter_is_serial = 0x1;\n\n    //! 2nd bit distinguishes ordered vs unordered filters.\n    static constexpr  unsigned int filter_is_out_of_order = 0x1<<1;\n\n    //! 3rd bit marks input filters emitting small objects\n    static constexpr  unsigned int filter_may_emit_null = 0x1<<2;\n\n    base_filter(const base_filter&) = delete;\n    base_filter& operator=(const base_filter&) = delete;\n\nprotected:\n    explicit base_filter( unsigned int m ) :\n        next_filter_in_pipeline(not_in_pipeline()),\n        my_input_buffer(nullptr),\n        my_filter_mode(m),\n        my_pipeline(nullptr)\n    {}\n\n    // signal end-of-input for concrete_filters\n    void set_end_of_input() {\n        r1::set_end_of_input(*this);\n    }\n\npublic:\n    //! True if filter is serial.\n    bool is_serial() const {\n        return bool( my_filter_mode & filter_is_serial );\n    }\n\n    //! True if filter must receive stream in order.\n    bool is_ordered() const {\n        return (my_filter_mode & filter_is_serial) && !(my_filter_mode & filter_is_out_of_order);\n    }\n\n    //! true if an input filter can emit null\n    bool object_may_be_null() {\n        return ( my_filter_mode & filter_may_emit_null ) == filter_may_emit_null;\n    }\n\n    //! Operate on an item from the input stream, and return item for output stream.\n    /** Returns nullptr if filter is a sink. */\n    virtual void* operator()( void* item ) = 0;\n\n    //! Destroy filter.\n    virtual ~base_filter() {};\n\n    //! Destroys item if pipeline was cancelled.\n    /** Required to prevent memory leaks.\n        Note it can be called concurrently even for serial filters.*/\n    virtual void finalize( void* /*item*/ ) {}\n\nprivate:\n    //! Pointer to next filter in the pipeline.\n    base_filter* next_filter_in_pipeline;\n\n    //! Buffer for incoming tokens, or nullptr if not required.\n    /** The buffer is required if the filter is serial. */\n    r1::input_buffer* my_input_buffer;\n\n    friend class r1::stage_task;\n    friend class r1::pipeline;\n    friend void r1::set_end_of_input(d1::base_filter&);\n\n    //! Storage for filter mode and dynamically checked implementation version.\n    const unsigned int my_filter_mode;\n\n    //! Pointer to the pipeline.\n    r1::pipeline* my_pipeline;\n};\n\ntemplate<typename Body, typename InputType, typename OutputType >\nclass concrete_filter;\n\n//! input_filter control to signal end-of-input for parallel_pipeline\nclass flow_control {\n    bool is_pipeline_stopped = false;\n    flow_control() = default;\n    template<typename Body, typename InputType, typename OutputType > friend class concrete_filter;\n    template<typename Output>\n    __TBB_requires(std::copyable<Output>)\n    friend class d2::input_node;\npublic:\n    void stop() { is_pipeline_stopped = true; }\n};\n\n// Emulate std::is_trivially_copyable (false positives not allowed, false negatives suboptimal but safe).\n#if __TBB_CPP11_TYPE_PROPERTIES_PRESENT\ntemplate<typename T> using tbb_trivially_copyable = std::is_trivially_copyable<T>;\n#else\ntemplate<typename T> struct tbb_trivially_copyable                      { enum { value = false }; };\ntemplate<typename T> struct tbb_trivially_copyable <         T*       > { enum { value = true  }; };\ntemplate<>           struct tbb_trivially_copyable <         bool     > { enum { value = true  }; };\ntemplate<>           struct tbb_trivially_copyable <         char     > { enum { value = true  }; };\ntemplate<>           struct tbb_trivially_copyable <  signed char     > { enum { value = true  }; };\ntemplate<>           struct tbb_trivially_copyable <unsigned char     > { enum { value = true  }; };\ntemplate<>           struct tbb_trivially_copyable <         short    > { enum { value = true  }; };\ntemplate<>           struct tbb_trivially_copyable <unsigned short    > { enum { value = true  }; };\ntemplate<>           struct tbb_trivially_copyable <         int      > { enum { value = true  }; };\ntemplate<>           struct tbb_trivially_copyable <unsigned int      > { enum { value = true  }; };\ntemplate<>           struct tbb_trivially_copyable <         long     > { enum { value = true  }; };\ntemplate<>           struct tbb_trivially_copyable <unsigned long     > { enum { value = true  }; };\ntemplate<>           struct tbb_trivially_copyable <         long long> { enum { value = true  }; };\ntemplate<>           struct tbb_trivially_copyable <unsigned long long> { enum { value = true  }; };\ntemplate<>           struct tbb_trivially_copyable <         float    > { enum { value = true  }; };\ntemplate<>           struct tbb_trivially_copyable <         double   > { enum { value = true  }; };\ntemplate<>           struct tbb_trivially_copyable <    long double   > { enum { value = true  }; };\n#endif // __TBB_CPP11_TYPE_PROPERTIES_PRESENT\n\ntemplate<typename T>\nstruct use_allocator {\n   static constexpr bool value = sizeof(T) > sizeof(void *) || !tbb_trivially_copyable<T>::value;\n};\n\n// A helper class to customize how a type is passed between filters.\n// Usage: token_helper<T, use_allocator<T>::value>\ntemplate<typename T, bool Allocate> struct token_helper;\n\n// using tbb_allocator\ntemplate<typename T>\nstruct token_helper<T, true> {\n    using pointer = T*;\n    using value_type = T;\n    static pointer create_token(value_type && source) {\n        return new (r1::allocate_memory(sizeof(T))) T(std::move(source));\n    }\n    static value_type & token(pointer & t) { return *t; }\n    static void * cast_to_void_ptr(pointer ref) { return reinterpret_cast<void *>(ref); }\n    static pointer cast_from_void_ptr(void * ref) { return reinterpret_cast<pointer>(ref); }\n    static void destroy_token(pointer token) {\n        token->~value_type();\n        r1::deallocate_memory(token);\n    }\n};\n\n// pointer specialization\ntemplate<typename T>\nstruct token_helper<T*, false> {\n    using pointer = T*;\n    using value_type = T*;\n    static pointer create_token(const value_type & source) { return source; }\n    static value_type & token(pointer & t) { return t; }\n    static void * cast_to_void_ptr(pointer ref) { return reinterpret_cast<void *>(ref); }\n    static pointer cast_from_void_ptr(void * ref) { return reinterpret_cast<pointer>(ref); }\n    static void destroy_token( pointer /*token*/) {}\n};\n\n// converting type to and from void*, passing objects directly\ntemplate<typename T>\nstruct token_helper<T, false> {\n    typedef union {\n        T actual_value;\n        void * void_overlay;\n    } type_to_void_ptr_map;\n    using pointer = T;  // not really a pointer in this case.\n    using value_type = T;\n    static pointer create_token(const value_type & source) { return source; }\n    static value_type & token(pointer & t) { return t; }\n    static void * cast_to_void_ptr(pointer ref) {\n        type_to_void_ptr_map mymap;\n        mymap.void_overlay = nullptr;\n        mymap.actual_value = ref;\n        return mymap.void_overlay;\n    }\n    static pointer cast_from_void_ptr(void * ref) {\n        type_to_void_ptr_map mymap;\n        mymap.void_overlay = ref;\n        return mymap.actual_value;\n    }\n    static void destroy_token( pointer /*token*/) {}\n};\n\n// intermediate\ntemplate<typename InputType,  typename OutputType, typename Body>\nclass concrete_filter: public base_filter {\n    const Body& my_body;\n    using input_helper = token_helper<InputType, use_allocator<InputType >::value>;\n    using input_pointer = typename input_helper::pointer;\n    using output_helper = token_helper<OutputType, use_allocator<OutputType>::value>;\n    using output_pointer = typename output_helper::pointer;\n\n    void* operator()(void* input) override {\n        input_pointer temp_input = input_helper::cast_from_void_ptr(input);\n        output_pointer temp_output = output_helper::create_token(tbb::detail::invoke(my_body, std::move(input_helper::token(temp_input))));\n        input_helper::destroy_token(temp_input);\n        return output_helper::cast_to_void_ptr(temp_output);\n    }\n\n    void finalize(void * input) override {\n        input_pointer temp_input = input_helper::cast_from_void_ptr(input);\n        input_helper::destroy_token(temp_input);\n    }\n\npublic:\n    concrete_filter(unsigned int m, const Body& body) : base_filter(m), my_body(body) {}\n};\n\n// input\ntemplate<typename OutputType, typename Body>\nclass concrete_filter<void, OutputType, Body>: public base_filter {\n    const Body& my_body;\n    using output_helper = token_helper<OutputType, use_allocator<OutputType>::value>;\n    using output_pointer = typename output_helper::pointer;\n\n    void* operator()(void*) override {\n        flow_control control;\n        output_pointer temp_output = output_helper::create_token(my_body(control));\n        if(control.is_pipeline_stopped) {\n            output_helper::destroy_token(temp_output);\n            set_end_of_input();\n            return nullptr;\n        }\n        return output_helper::cast_to_void_ptr(temp_output);\n    }\n\npublic:\n    concrete_filter(unsigned int m, const Body& body) :\n        base_filter(m | filter_may_emit_null),\n        my_body(body)\n    {}\n};\n\n// output\ntemplate<typename InputType, typename Body>\nclass concrete_filter<InputType, void, Body>: public base_filter {\n    const Body& my_body;\n    using input_helper = token_helper<InputType, use_allocator<InputType >::value>;\n    using input_pointer = typename input_helper::pointer;\n\n    void* operator()(void* input) override {\n        input_pointer temp_input = input_helper::cast_from_void_ptr(input);\n        tbb::detail::invoke(my_body, std::move(input_helper::token(temp_input)));\n        input_helper::destroy_token(temp_input);\n        return nullptr;\n    }\n    void finalize(void* input) override {\n        input_pointer temp_input = input_helper::cast_from_void_ptr(input);\n        input_helper::destroy_token(temp_input);\n    }\n\npublic:\n    concrete_filter(unsigned int m, const Body& body) : base_filter(m), my_body(body) {}\n};\n\ntemplate<typename Body>\nclass concrete_filter<void, void, Body>: public base_filter {\n    const Body& my_body;\n\n    void* operator()(void*) override {\n        flow_control control;\n        my_body(control);\n        void* output = control.is_pipeline_stopped ? nullptr : (void*)(std::intptr_t)-1;\n        return output;\n    }\npublic:\n    concrete_filter(unsigned int m, const Body& body) : base_filter(m), my_body(body) {}\n};\n\nclass filter_node_ptr {\n    filter_node * my_node;\n\npublic:\n    filter_node_ptr() : my_node(nullptr) {}\n    filter_node_ptr(filter_node *);\n    ~filter_node_ptr();\n    filter_node_ptr(const filter_node_ptr &);\n    filter_node_ptr(filter_node_ptr &&);\n    void operator=(filter_node *);\n    void operator=(const filter_node_ptr &);\n    void operator=(filter_node_ptr &&);\n    filter_node& operator*() const;\n    operator bool() const;\n};\n\n//! Abstract base class that represents a node in a parse tree underlying a filter class.\n/** These nodes are always heap-allocated and can be shared by filter objects. */\nclass filter_node {\n    /** Count must be atomic because it is hidden state for user, but might be shared by threads. */\n    std::atomic<std::intptr_t> ref_count;\npublic:\n    filter_node_ptr left;\n    filter_node_ptr right;\nprotected:\n    filter_node() : ref_count(0), left(nullptr), right(nullptr) {\n#ifdef __TBB_TEST_FILTER_NODE_COUNT\n        ++(__TBB_TEST_FILTER_NODE_COUNT);\n#endif\n    }\npublic:\n    filter_node(const filter_node_ptr& x, const filter_node_ptr& y) : filter_node(){\n        left = x;\n        right = y;\n    }\n    filter_node(const filter_node&) = delete;\n    filter_node& operator=(const filter_node&) = delete;\n\n    //! Add concrete_filter to pipeline\n    virtual base_filter* create_filter() const {\n        __TBB_ASSERT(false, \"method of non-leaf was called\");\n        return nullptr;\n    }\n\n    //! Increment reference count\n    void add_ref() { ref_count.fetch_add(1, std::memory_order_relaxed); }\n\n    //! Decrement reference count and delete if it becomes zero.\n    void remove_ref() {\n        __TBB_ASSERT(ref_count>0,\"ref_count underflow\");\n        if( ref_count.fetch_sub(1, std::memory_order_relaxed) == 1 ) {\n            this->~filter_node();\n            r1::deallocate_memory(this);\n        }\n    }\n\n    virtual ~filter_node() {\n#ifdef __TBB_TEST_FILTER_NODE_COUNT\n        --(__TBB_TEST_FILTER_NODE_COUNT);\n#endif\n    }\n};\n\ninline filter_node_ptr::filter_node_ptr(filter_node * nd) : my_node(nd) {\n    if (my_node) {\n        my_node->add_ref();\n    }\n}\n\ninline filter_node_ptr::~filter_node_ptr() {\n    if (my_node) {\n        my_node->remove_ref();\n    }\n}\n\ninline filter_node_ptr::filter_node_ptr(const filter_node_ptr & rhs) : my_node(rhs.my_node) {\n    if (my_node) {\n        my_node->add_ref();\n    }\n}\n\ninline filter_node_ptr::filter_node_ptr(filter_node_ptr && rhs) : my_node(rhs.my_node) {\n    rhs.my_node = nullptr;\n}\n\ninline void filter_node_ptr::operator=(filter_node * rhs) {\n    // Order of operations below carefully chosen so that reference counts remain correct\n    // in unlikely event that remove_ref throws exception.\n    filter_node* old = my_node;\n    my_node = rhs;\n    if (my_node) {\n        my_node->add_ref();\n    }\n    if (old) {\n        old->remove_ref();\n    }\n}\n\ninline void filter_node_ptr::operator=(const filter_node_ptr & rhs) {\n    *this = rhs.my_node;\n}\n\ninline void filter_node_ptr::operator=(filter_node_ptr && rhs) {\n    filter_node* old = my_node;\n    my_node = rhs.my_node;\n    rhs.my_node = nullptr;\n    if (old) {\n        old->remove_ref();\n    }\n}\n\ninline filter_node& filter_node_ptr::operator*() const{\n    __TBB_ASSERT(my_node,\"nullptr node is used\");\n    return *my_node;\n}\n\ninline filter_node_ptr::operator bool() const {\n    return my_node != nullptr;\n}\n\n//! Node in parse tree representing result of make_filter.\ntemplate<typename InputType, typename OutputType, typename Body>\nclass filter_node_leaf: public filter_node {\n    const unsigned int my_mode;\n    const Body my_body;\n    base_filter* create_filter() const override {\n        return new(r1::allocate_memory(sizeof(concrete_filter<InputType, OutputType, Body>))) concrete_filter<InputType, OutputType, Body>(my_mode,my_body);\n    }\npublic:\n    filter_node_leaf( unsigned int m, const Body& b ) : my_mode(m), my_body(b) {}\n};\n\n\ntemplate <typename Body, typename Input = typename filter_body_types<decltype(&Body::operator())>::input_type>\nusing filter_input = typename std::conditional<std::is_same<Input, flow_control>::value, void, Input>::type;\n\ntemplate <typename Body>\nusing filter_output = typename filter_body_types<decltype(&Body::operator())>::output_type;\n\n} // namespace d1\n} // namespace detail\n} // namespace tbb\n\n\n#endif /* __TBB_parallel_filters_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_pipeline_filters_deduction.h",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB__pipeline_filters_deduction_H\n#define __TBB__pipeline_filters_deduction_H\n\n#include \"_config.h\"\n#include <utility>\n#include <type_traits>\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\ntemplate <typename Input, typename Output>\nstruct declare_filter_types {\n    using input_type = typename std::remove_const<typename std::remove_reference<Input>::type>::type;\n    using output_type = typename std::remove_const<typename std::remove_reference<Output>::type>::type;\n};\n\ntemplate <typename T> struct filter_body_types;\n\ntemplate <typename T, typename Input, typename Output>\nstruct filter_body_types<Output(T::*)(Input) const> : declare_filter_types<Input, Output> {};\n\ntemplate <typename T, typename Input, typename Output>\nstruct filter_body_types<Output(T::*)(Input)> : declare_filter_types<Input, Output> {};\n\n} // namespace d1\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB__pipeline_filters_deduction_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_range_common.h",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_detail__range_common_H\n#define __TBB_detail__range_common_H\n\n#include \"_config.h\"\n#include \"_utils.h\"\n#if __TBB_CPP20_CONCEPTS_PRESENT\n#include <concepts>\n#endif\n#include <iterator>\n\nnamespace tbb {\nnamespace detail {\ninline namespace d0 {\n\n//! Dummy type that distinguishes splitting constructor from copy constructor.\n/**\n * See description of parallel_for and parallel_reduce for example usages.\n * @ingroup algorithms\n */\nclass split {};\n\n//! Type enables transmission of splitting proportion from partitioners to range objects\n/**\n * In order to make use of such facility Range objects must implement\n * splitting constructor with this type passed.\n */\nclass proportional_split : no_assign {\npublic:\n    proportional_split(size_t _left = 1, size_t _right = 1) : my_left(_left), my_right(_right) { }\n\n    size_t left() const { return my_left; }\n    size_t right() const { return my_right; }\n\n    // used when range does not support proportional split\n    explicit operator split() const { return split(); }\n\nprivate:\n    size_t my_left, my_right;\n};\n\ntemplate <typename Range, typename = void>\nstruct range_split_object_provider {\n    template <typename PartitionerSplitType>\n    static split get( PartitionerSplitType& ) { return split(); }\n};\n\ntemplate <typename Range>\nstruct range_split_object_provider<Range,\n                                   typename std::enable_if<std::is_constructible<Range, Range&, proportional_split&>::value>::type> {\n    template <typename PartitionerSplitType>\n    static PartitionerSplitType& get( PartitionerSplitType& split_obj ) { return split_obj; }\n};\n\ntemplate <typename Range, typename PartitionerSplitType>\nauto get_range_split_object( PartitionerSplitType& split_obj )\n-> decltype(range_split_object_provider<Range>::get(split_obj)) {\n    return range_split_object_provider<Range>::get(split_obj);\n}\n\ntemplate <typename Range>\nusing range_iterator_type = decltype(std::begin(std::declval<Range&>()));\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\ntemplate <typename Iterator>\nusing iterator_reference_type = typename std::iterator_traits<Iterator>::reference;\n\ntemplate <typename Range>\nusing range_reference_type = iterator_reference_type<range_iterator_type<Range>>;\n\ntemplate <typename Value>\nconcept blocked_range_value = std::copyable<Value> &&\n                              requires( const std::remove_reference_t<Value>& lhs, const std::remove_reference_t<Value>& rhs ) {\n                                  { lhs < rhs } -> relaxed_convertible_to<bool>;\n                                  { lhs - rhs } -> std::convertible_to<std::size_t>;\n                                  { lhs + (rhs - lhs) } -> std::convertible_to<Value>;\n                              };\n\ntemplate <typename T>\nconcept splittable = std::constructible_from<T, T&, tbb::detail::split>;\n\ntemplate <typename Range>\nconcept tbb_range = std::copy_constructible<Range> &&\n                    splittable<Range> &&\n                    requires( const std::remove_reference_t<Range>& range ) {\n                        { range.empty() } -> relaxed_convertible_to<bool>;\n                        { range.is_divisible() } -> relaxed_convertible_to<bool>;\n                    };\n\ntemplate <typename Iterator, typename IteratorTag>\nstruct iterator_concept_helper;\n\n// New specializations should be added in case of using container_based_sequence with\n// the new iterator tag types\ntemplate <typename Iterator>\nstruct iterator_concept_helper<Iterator, std::input_iterator_tag> {\n    static constexpr bool value = std::input_iterator<Iterator>;\n};\n\ntemplate <typename Iterator>\nstruct iterator_concept_helper<Iterator, std::random_access_iterator_tag> {\n    static constexpr bool value = std::random_access_iterator<Iterator>;\n};\n\ntemplate <typename Iterator, typename IteratorTag>\nconcept iterator_satisfies = iterator_concept_helper<Iterator, IteratorTag>::value;\n\ntemplate <typename Sequence, typename IteratorTag>\nconcept container_based_sequence = requires( Sequence& seq ) {\n    { std::begin(seq) } -> iterator_satisfies<IteratorTag>;\n    { std::end(seq) } -> iterator_satisfies<IteratorTag>;\n};\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n} // namespace d0\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_detail__range_common_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_rtm_mutex.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB__rtm_mutex_impl_H\n#define __TBB__rtm_mutex_impl_H\n\n#include \"_assert.h\"\n#include \"_utils.h\"\n#include \"../spin_mutex.h\"\n\n#include \"../profiling.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\nstruct rtm_mutex_impl;\n}\nnamespace d1 {\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    // Suppress warning: structure was padded due to alignment specifier\n    #pragma warning (push)\n    #pragma warning (disable: 4324)\n#endif\n\n/** A rtm_mutex is an speculation-enabled spin mutex.\n    It should be used for locking short critical sections where the lock is\n    contended but the data it protects are not.  If zero-initialized, the\n    mutex is considered unheld.\n    @ingroup synchronization */\nclass alignas(max_nfs_size) rtm_mutex : private spin_mutex {\nprivate:\n    enum class rtm_state {\n        rtm_none,\n        rtm_transacting,\n        rtm_real\n    };\npublic:\n    //! Constructors\n    rtm_mutex() noexcept {\n        create_itt_sync(this, \"tbb::speculative_spin_mutex\", \"\");\n    }\n\n    //! Destructor\n    ~rtm_mutex() = default;\n\n    //! Represents acquisition of a mutex.\n    class scoped_lock {\n    public:\n        friend class rtm_mutex;\n        //! Construct lock that has not acquired a mutex.\n        /** Equivalent to zero-initialization of *this. */\n        constexpr scoped_lock() : m_mutex(nullptr), m_transaction_state(rtm_state::rtm_none) {}\n\n        //! Acquire lock on given mutex.\n        scoped_lock(rtm_mutex& m) : m_mutex(nullptr), m_transaction_state(rtm_state::rtm_none) {\n            acquire(m);\n        }\n\n        //! Release lock (if lock is held).\n        ~scoped_lock() {\n            if(m_transaction_state != rtm_state::rtm_none) {\n                release();\n            }\n        }\n\n        //! No Copy\n        scoped_lock(const scoped_lock&) = delete;\n        scoped_lock& operator=(const scoped_lock&) = delete;\n\n        //! Acquire lock on given mutex.\n        void acquire(rtm_mutex& m);\n\n        //! Try acquire lock on given mutex.\n        bool try_acquire(rtm_mutex& m);\n\n        //! Release lock\n        void release();\n\n    private:\n        rtm_mutex* m_mutex;\n        rtm_state m_transaction_state;\n        friend r1::rtm_mutex_impl;\n    };\n\n    //! Mutex traits\n    static constexpr bool is_rw_mutex = false;\n    static constexpr bool is_recursive_mutex = false;\n    static constexpr bool is_fair_mutex = false;\nprivate:\n    friend r1::rtm_mutex_impl;\n}; // end of rtm_mutex\n} // namespace d1\n\nnamespace r1 {\n    //! Internal acquire lock.\n    // only_speculate == true if we're doing a try_lock, else false.\n    TBB_EXPORT void __TBB_EXPORTED_FUNC acquire(d1::rtm_mutex&, d1::rtm_mutex::scoped_lock&, bool only_speculate = false);\n    //! Internal try_acquire lock.\n    TBB_EXPORT bool __TBB_EXPORTED_FUNC try_acquire(d1::rtm_mutex&, d1::rtm_mutex::scoped_lock&);\n    //! Internal release lock.\n    TBB_EXPORT void __TBB_EXPORTED_FUNC release(d1::rtm_mutex::scoped_lock&);\n} // namespace r1\n\nnamespace d1 {\n//! Acquire lock on given mutex.\ninline void rtm_mutex::scoped_lock::acquire(rtm_mutex& m) {\n    __TBB_ASSERT(!m_mutex, \"lock is already acquired\");\n    r1::acquire(m, *this);\n}\n\n//! Try acquire lock on given mutex.\ninline bool rtm_mutex::scoped_lock::try_acquire(rtm_mutex& m) {\n    __TBB_ASSERT(!m_mutex, \"lock is already acquired\");\n    return r1::try_acquire(m, *this);\n}\n\n//! Release lock\ninline void rtm_mutex::scoped_lock::release() {\n    __TBB_ASSERT(m_mutex, \"lock is not acquired\");\n    __TBB_ASSERT(m_transaction_state != rtm_state::rtm_none, \"lock is not acquired\");\n    return r1::release(*this);\n}\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    #pragma warning (pop) // 4324 warning\n#endif\n\n#if TBB_USE_PROFILING_TOOLS\ninline void set_name(rtm_mutex& obj, const char* name) {\n    itt_set_sync_name(&obj, name);\n}\n#if (_WIN32||_WIN64)\ninline void set_name(rtm_mutex& obj, const wchar_t* name) {\n    itt_set_sync_name(&obj, name);\n}\n#endif // WIN\n#else\ninline void set_name(rtm_mutex&, const char*) {}\n#if (_WIN32||_WIN64)\ninline void set_name(rtm_mutex&, const wchar_t*) {}\n#endif // WIN\n#endif\n\n} // namespace d1\n} // namespace detail\n} // namespace tbb\n\n#endif /* __TBB__rtm_mutex_impl_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_rtm_rw_mutex.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_detail__rtm_rw_mutex_H\n#define __TBB_detail__rtm_rw_mutex_H\n\n#include \"_assert.h\"\n#include \"_utils.h\"\n#include \"../spin_rw_mutex.h\"\n\n#include <atomic>\n\nnamespace tbb {\nnamespace detail {\n\nnamespace r1 {\nstruct rtm_rw_mutex_impl;\n}\n\nnamespace d1 {\n\nconstexpr std::size_t speculation_granularity = 64;\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    // Suppress warning: structure was padded due to alignment specifier\n    #pragma warning (push)\n    #pragma warning (disable: 4324)\n#endif\n\n//! Fast, unfair, spinning speculation-enabled reader-writer lock with backoff and writer-preference\n/** @ingroup synchronization */\nclass alignas(max_nfs_size) rtm_rw_mutex : private spin_rw_mutex {\n    friend struct r1::rtm_rw_mutex_impl;\nprivate:\n    enum class rtm_type {\n        rtm_not_in_mutex,\n        rtm_transacting_reader,\n        rtm_transacting_writer,\n        rtm_real_reader,\n        rtm_real_writer\n    };\npublic:\n    //! Constructors\n    rtm_rw_mutex() noexcept : write_flag(false) {\n        create_itt_sync(this, \"tbb::speculative_spin_rw_mutex\", \"\");\n    }\n\n    //! Destructor\n    ~rtm_rw_mutex() = default;\n\n    //! Represents acquisition of a mutex.\n    class scoped_lock {\n        friend struct r1::rtm_rw_mutex_impl;\n    public:\n        //! Construct lock that has not acquired a mutex.\n        /** Equivalent to zero-initialization of *this. */\n        constexpr scoped_lock() : m_mutex(nullptr), m_transaction_state(rtm_type::rtm_not_in_mutex) {}\n\n        //! Acquire lock on given mutex.\n        scoped_lock(rtm_rw_mutex& m, bool write = true) : m_mutex(nullptr), m_transaction_state(rtm_type::rtm_not_in_mutex) {\n            acquire(m, write);\n        }\n\n        //! Release lock (if lock is held).\n        ~scoped_lock() {\n            if(m_transaction_state != rtm_type::rtm_not_in_mutex) {\n                release();\n            }\n        }\n\n        //! No Copy\n        scoped_lock(const scoped_lock&) = delete;\n        scoped_lock& operator=(const scoped_lock&) = delete;\n\n        //! Acquire lock on given mutex.\n        inline void acquire(rtm_rw_mutex& m, bool write = true);\n\n        //! Try acquire lock on given mutex.\n        inline bool try_acquire(rtm_rw_mutex& m, bool write = true);\n\n        //! Release lock\n        inline void release();\n\n        //! Upgrade reader to become a writer.\n        /** Returns whether the upgrade happened without releasing and re-acquiring the lock */\n        inline bool upgrade_to_writer();\n\n        //! Downgrade writer to become a reader.\n        inline bool downgrade_to_reader();\n\n        inline bool is_writer() const;\n    private:\n        rtm_rw_mutex* m_mutex;\n        rtm_type m_transaction_state;\n    };\n\n    //! Mutex traits\n    static constexpr bool is_rw_mutex = true;\n    static constexpr bool is_recursive_mutex = false;\n    static constexpr bool is_fair_mutex = false;\n\nprivate:\n    alignas(speculation_granularity) std::atomic<bool> write_flag;\n};\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    #pragma warning (pop) // 4324 warning\n#endif\n\n} // namespace d1\n\nnamespace r1 {\n    //! Internal acquire write lock.\n    // only_speculate == true if we're doing a try_lock, else false.\n    TBB_EXPORT void __TBB_EXPORTED_FUNC acquire_writer(d1::rtm_rw_mutex&, d1::rtm_rw_mutex::scoped_lock&, bool only_speculate = false);\n    //! Internal acquire read lock.\n    // only_speculate == true if we're doing a try_lock, else false.\n    TBB_EXPORT void __TBB_EXPORTED_FUNC acquire_reader(d1::rtm_rw_mutex&, d1::rtm_rw_mutex::scoped_lock&, bool only_speculate = false);\n    //! Internal upgrade reader to become a writer.\n    TBB_EXPORT bool __TBB_EXPORTED_FUNC upgrade(d1::rtm_rw_mutex::scoped_lock&);\n    //! Internal downgrade writer to become a reader.\n    TBB_EXPORT bool __TBB_EXPORTED_FUNC downgrade(d1::rtm_rw_mutex::scoped_lock&);\n    //! Internal try_acquire write lock.\n    TBB_EXPORT bool __TBB_EXPORTED_FUNC try_acquire_writer(d1::rtm_rw_mutex&, d1::rtm_rw_mutex::scoped_lock&);\n    //! Internal try_acquire read lock.\n    TBB_EXPORT bool __TBB_EXPORTED_FUNC try_acquire_reader(d1::rtm_rw_mutex&, d1::rtm_rw_mutex::scoped_lock&);\n    //! Internal release lock.\n    TBB_EXPORT void __TBB_EXPORTED_FUNC release(d1::rtm_rw_mutex::scoped_lock&);\n}\n\nnamespace d1 {\n//! Acquire lock on given mutex.\nvoid rtm_rw_mutex::scoped_lock::acquire(rtm_rw_mutex& m, bool write) {\n    __TBB_ASSERT(!m_mutex, \"lock is already acquired\");\n    if (write) {\n        r1::acquire_writer(m, *this);\n    } else {\n        r1::acquire_reader(m, *this);\n    }\n}\n\n//! Try acquire lock on given mutex.\nbool rtm_rw_mutex::scoped_lock::try_acquire(rtm_rw_mutex& m, bool write) {\n    __TBB_ASSERT(!m_mutex, \"lock is already acquired\");\n    if (write) {\n        return r1::try_acquire_writer(m, *this);\n    } else {\n        return r1::try_acquire_reader(m, *this);\n    }\n}\n\n//! Release lock\nvoid rtm_rw_mutex::scoped_lock::release() {\n    __TBB_ASSERT(m_mutex, \"lock is not acquired\");\n    __TBB_ASSERT(m_transaction_state != rtm_type::rtm_not_in_mutex, \"lock is not acquired\");\n    return r1::release(*this);\n}\n\n//! Upgrade reader to become a writer.\n/** Returns whether the upgrade happened without releasing and re-acquiring the lock */\nbool rtm_rw_mutex::scoped_lock::upgrade_to_writer() {\n    __TBB_ASSERT(m_mutex, \"lock is not acquired\");\n    if (m_transaction_state == rtm_type::rtm_transacting_writer || m_transaction_state == rtm_type::rtm_real_writer) {\n        return true; // Already a writer\n    }\n    return r1::upgrade(*this);\n}\n\n//! Downgrade writer to become a reader.\nbool rtm_rw_mutex::scoped_lock::downgrade_to_reader() {\n    __TBB_ASSERT(m_mutex, \"lock is not acquired\");\n    if (m_transaction_state == rtm_type::rtm_transacting_reader || m_transaction_state == rtm_type::rtm_real_reader) {\n        return true; // Already a reader\n    }\n    return r1::downgrade(*this);\n}\n\nbool rtm_rw_mutex::scoped_lock::is_writer() const {\n    __TBB_ASSERT(m_mutex, \"lock is not acquired\");\n    return m_transaction_state == rtm_type::rtm_transacting_writer || m_transaction_state == rtm_type::rtm_real_writer;\n}\n\n#if TBB_USE_PROFILING_TOOLS\ninline void set_name(rtm_rw_mutex& obj, const char* name) {\n    itt_set_sync_name(&obj, name);\n}\n#if (_WIN32||_WIN64)\ninline void set_name(rtm_rw_mutex& obj, const wchar_t* name) {\n    itt_set_sync_name(&obj, name);\n}\n#endif // WIN\n#else\ninline void set_name(rtm_rw_mutex&, const char*) {}\n#if (_WIN32||_WIN64)\ninline void set_name(rtm_rw_mutex&, const wchar_t*) {}\n#endif // WIN\n#endif\n\n} // namespace d1\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_detail__rtm_rw_mutex_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_scoped_lock.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_detail_scoped_lock_H\n#define __TBB_detail_scoped_lock_H\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n// unique_scoped_lock supposes that Mutex operations never throw\ntemplate <typename Mutex>\nclass unique_scoped_lock {\n    //! Points to currently held Mutex, or nullptr if no lock is held.\n    Mutex* m_mutex{};\n\npublic:\n    //! Construct without acquiring a Mutex.\n    constexpr unique_scoped_lock() noexcept : m_mutex(nullptr) {}\n\n    //! Construct and acquire lock on a Mutex.\n    unique_scoped_lock(Mutex& m) {\n        acquire(m);\n    }\n\n    //! No Copy\n    unique_scoped_lock(const unique_scoped_lock&) = delete;\n    unique_scoped_lock& operator=(const unique_scoped_lock&) = delete;\n\n    //! Acquire lock.\n    void acquire(Mutex& m) {\n        __TBB_ASSERT(m_mutex == nullptr, \"The mutex is already acquired\");\n        m_mutex = &m;\n        m.lock();\n    }\n\n    //! Try acquiring lock (non-blocking)\n    /** Return true if lock acquired; false otherwise. */\n    bool try_acquire(Mutex& m) {\n        __TBB_ASSERT(m_mutex == nullptr, \"The mutex is already acquired\");\n        bool succeed = m.try_lock();\n        if (succeed) {\n            m_mutex = &m;\n        }\n        return succeed;\n    }\n\n    //! Release lock\n    void release() {\n        __TBB_ASSERT(m_mutex, \"release on Mutex::unique_scoped_lock that is not holding a lock\");\n        m_mutex->unlock();\n        m_mutex = nullptr;\n    }\n\n    //! Destroy lock. If holding a lock, releases the lock first.\n    ~unique_scoped_lock() {\n        if (m_mutex) {\n            release();\n        }\n    }\n};\n\n// rw_scoped_lock supposes that Mutex operations never throw\ntemplate <typename Mutex>\nclass rw_scoped_lock {\npublic:\n    //! Construct lock that has not acquired a mutex.\n    /** Equivalent to zero-initialization of *this. */\n    constexpr rw_scoped_lock() noexcept {}\n\n    //! Acquire lock on given mutex.\n    rw_scoped_lock(Mutex& m, bool write = true) {\n        acquire(m, write);\n    }\n\n    //! Release lock (if lock is held).\n    ~rw_scoped_lock() {\n        if (m_mutex) {\n            release();\n        }\n    }\n\n    //! No Copy\n    rw_scoped_lock(const rw_scoped_lock&) = delete;\n    rw_scoped_lock& operator=(const rw_scoped_lock&) = delete;\n\n    //! Acquire lock on given mutex.\n    void acquire(Mutex& m, bool write = true) {\n        __TBB_ASSERT(m_mutex == nullptr, \"The mutex is already acquired\");\n        m_is_writer = write;\n        m_mutex = &m;\n        if (write) {\n            m_mutex->lock();\n        } else {\n            m_mutex->lock_shared();\n        }\n    }\n\n    //! Try acquire lock on given mutex.\n    bool try_acquire(Mutex& m, bool write = true) {\n        bool succeed = write ? m.try_lock() : m.try_lock_shared();\n        if (succeed) {\n            m_mutex = &m;\n            m_is_writer = write;\n        }\n        return succeed;\n    }\n\n    //! Release lock.\n    void release() {\n        __TBB_ASSERT(m_mutex != nullptr, \"The mutex is not acquired\");\n        Mutex* m = m_mutex;\n        m_mutex = nullptr;\n\n        if (m_is_writer) {\n            m->unlock();\n        } else {\n            m->unlock_shared();\n        }\n    }\n\n    //! Upgrade reader to become a writer.\n    /** Returns whether the upgrade happened without releasing and re-acquiring the lock */\n    bool upgrade_to_writer() {\n        __TBB_ASSERT(m_mutex != nullptr, \"The mutex is not acquired\");\n        if (m_is_writer) {\n            return true; // Already a writer\n        }\n        m_is_writer = true;\n        return m_mutex->upgrade();\n    }\n\n    //! Downgrade writer to become a reader.\n    bool downgrade_to_reader() {\n        __TBB_ASSERT(m_mutex != nullptr, \"The mutex is not acquired\");\n        if (m_is_writer) {\n            m_mutex->downgrade();\n            m_is_writer = false;\n        }\n        return true;\n    }\n\n    bool is_writer() const {\n        __TBB_ASSERT(m_mutex != nullptr, \"The mutex is not acquired\");\n        return m_is_writer;\n    }\n\nprotected:\n    //! The pointer to the current mutex that is held, or nullptr if no mutex is held.\n    Mutex* m_mutex {nullptr};\n\n    //! If mutex != nullptr, then is_writer is true if holding a writer lock, false if holding a reader lock.\n    /** Not defined if not holding a lock. */\n    bool m_is_writer {false};\n};\n\n} // namespace d1\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_detail_scoped_lock_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_segment_table.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_detail__segment_table_H\n#define __TBB_detail__segment_table_H\n\n#include \"_config.h\"\n#include \"_allocator_traits.h\"\n#include \"_template_helpers.h\"\n#include \"_utils.h\"\n#include \"_assert.h\"\n#include \"_exception.h\"\n#include <atomic>\n#include <type_traits>\n#include <memory>\n#include <cstring>\n\n#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n#pragma warning(push)\n#pragma warning(disable: 4127) // warning C4127: conditional expression is constant\n#endif\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\ntemplate <typename T, typename Allocator, typename DerivedType, std::size_t PointersPerEmbeddedTable>\nclass segment_table {\npublic:\n    using value_type = T;\n    using segment_type = T*;\n    using atomic_segment = std::atomic<segment_type>;\n    using segment_table_type = atomic_segment*;\n\n    using size_type = std::size_t;\n    using segment_index_type = std::size_t;\n\n    using allocator_type = Allocator;\n\n    using allocator_traits_type = tbb::detail::allocator_traits<allocator_type>;\n    using segment_table_allocator_type = typename allocator_traits_type::template rebind_alloc<atomic_segment>;\nprotected:\n    using segment_table_allocator_traits = tbb::detail::allocator_traits<segment_table_allocator_type>;\n    using derived_type = DerivedType;\n\n    static constexpr size_type pointers_per_embedded_table = PointersPerEmbeddedTable;\n    static constexpr size_type pointers_per_long_table = sizeof(size_type) * 8;\npublic:\n    segment_table( const allocator_type& alloc = allocator_type() )\n        : my_segment_table_allocator(alloc), my_segment_table(nullptr)\n        , my_first_block{}, my_size{}, my_segment_table_allocation_failed{}\n    {\n        my_segment_table.store(my_embedded_table, std::memory_order_relaxed);\n        zero_table(my_embedded_table, pointers_per_embedded_table);\n    }\n\n    segment_table( const segment_table& other )\n        : my_segment_table_allocator(segment_table_allocator_traits::\n                                     select_on_container_copy_construction(other.my_segment_table_allocator))\n        , my_segment_table(nullptr), my_first_block{}, my_size{}, my_segment_table_allocation_failed{}\n    {\n        my_segment_table.store(my_embedded_table, std::memory_order_relaxed);\n        zero_table(my_embedded_table, pointers_per_embedded_table);\n        try_call( [&] {\n            internal_transfer(other, copy_segment_body_type{*this});\n        } ).on_exception( [&] {\n            clear();\n        });\n    }\n\n    segment_table( const segment_table& other, const allocator_type& alloc )\n        : my_segment_table_allocator(alloc), my_segment_table(nullptr)\n        , my_first_block{}, my_size{}, my_segment_table_allocation_failed{}\n    {\n        my_segment_table.store(my_embedded_table, std::memory_order_relaxed);\n        zero_table(my_embedded_table, pointers_per_embedded_table);\n        try_call( [&] {\n            internal_transfer(other, copy_segment_body_type{*this});\n        } ).on_exception( [&] {\n            clear();\n        });\n    }\n\n    segment_table( segment_table&& other )\n        : my_segment_table_allocator(std::move(other.my_segment_table_allocator)), my_segment_table(nullptr)\n        , my_first_block{}, my_size{}, my_segment_table_allocation_failed{}\n    {\n        my_segment_table.store(my_embedded_table, std::memory_order_relaxed);\n        zero_table(my_embedded_table, pointers_per_embedded_table);\n        internal_move(std::move(other));\n    }\n\n    segment_table( segment_table&& other, const allocator_type& alloc )\n        : my_segment_table_allocator(alloc), my_segment_table(nullptr), my_first_block{}\n        , my_size{}, my_segment_table_allocation_failed{}\n    {\n        my_segment_table.store(my_embedded_table, std::memory_order_relaxed);\n        zero_table(my_embedded_table, pointers_per_embedded_table);\n        using is_equal_type = typename segment_table_allocator_traits::is_always_equal;\n        internal_move_construct_with_allocator(std::move(other), alloc, is_equal_type());\n    }\n\n    ~segment_table() {\n        clear();\n    }\n\n    segment_table& operator=( const segment_table& other ) {\n        if (this != &other) {\n            copy_assign_allocators(my_segment_table_allocator, other.my_segment_table_allocator);\n            internal_transfer(other, copy_segment_body_type{*this});\n        }\n        return *this;\n    }\n\n    segment_table& operator=( segment_table&& other )\n        noexcept(derived_type::is_noexcept_assignment)\n    {\n        using pocma_type = typename segment_table_allocator_traits::propagate_on_container_move_assignment;\n        using is_equal_type = typename segment_table_allocator_traits::is_always_equal;\n\n        if (this != &other) {\n            move_assign_allocators(my_segment_table_allocator, other.my_segment_table_allocator);\n            internal_move_assign(std::move(other), tbb::detail::disjunction<is_equal_type, pocma_type>());\n        }\n        return *this;\n    }\n\n    void swap( segment_table& other )\n        noexcept(derived_type::is_noexcept_swap)\n    {\n        using is_equal_type = typename segment_table_allocator_traits::is_always_equal;\n        using pocs_type = typename segment_table_allocator_traits::propagate_on_container_swap;\n\n        if (this != &other) {\n            swap_allocators(my_segment_table_allocator, other.my_segment_table_allocator);\n            internal_swap(other, tbb::detail::disjunction<is_equal_type, pocs_type>());\n        }\n    }\n\n    segment_type get_segment( segment_index_type index ) const {\n        return get_table()[index] + segment_base(index);\n    }\n\n    value_type& operator[]( size_type index ) {\n        return internal_subscript<true>(index);\n    }\n\n    const value_type& operator[]( size_type index ) const {\n        return const_cast<segment_table*>(this)->internal_subscript<true>(index);\n    }\n\n    const segment_table_allocator_type& get_allocator() const {\n        return my_segment_table_allocator;\n    }\n\n    segment_table_allocator_type& get_allocator() {\n        return my_segment_table_allocator;\n    }\n\n    void enable_segment( segment_type& segment, segment_table_type table, segment_index_type seg_index, size_type index ) {\n        // Allocate new segment\n        segment_type new_segment = self()->create_segment(table, seg_index, index);\n        if (new_segment != nullptr) {\n            // Store (new_segment - segment_base) into the segment table to allow access to the table by index via\n            // my_segment_table[segment_index_of(index)][index]\n            segment_type disabled_segment = nullptr;\n            if (!table[seg_index].compare_exchange_strong(disabled_segment, new_segment - segment_base(seg_index))) {\n                // compare_exchange failed => some other thread has already enabled this segment\n                // Deallocate the memory\n                self()->deallocate_segment(new_segment, seg_index);\n            }\n        }\n\n        segment = table[seg_index].load(std::memory_order_acquire);\n        __TBB_ASSERT(segment != nullptr, \"If create_segment returned nullptr, the element should be stored in the table\");\n    }\n\n    void delete_segment( segment_index_type seg_index ) {\n        segment_type segment_to_delete = self()->nullify_segment(get_table(), seg_index);\n        if (segment_to_delete == segment_allocation_failure_tag) {\n            return;\n        }\n\n        segment_to_delete += segment_base(seg_index);\n\n        // Deallocate the segment\n        self()->destroy_segment(segment_to_delete, seg_index);\n    }\n\n    size_type number_of_segments( segment_table_type table ) const {\n        // Check for an active table, if it is embedded table - return the number of embedded segments\n        // Otherwise - return the maximum number of segments\n        return table == my_embedded_table ? pointers_per_embedded_table : pointers_per_long_table;\n    }\n\n    size_type capacity() const noexcept {\n        segment_table_type table = get_table();\n        size_type num_segments = number_of_segments(table);\n        for (size_type seg_index = 0; seg_index < num_segments; ++seg_index) {\n            // Check if the pointer is valid (allocated)\n            if (table[seg_index].load(std::memory_order_relaxed) <= segment_allocation_failure_tag) {\n                return segment_base(seg_index);\n            }\n        }\n        return segment_base(num_segments);\n    }\n\n    size_type find_last_allocated_segment( segment_table_type table ) const noexcept {\n        size_type end = 0;\n        size_type num_segments = number_of_segments(table);\n        for (size_type seg_index = 0; seg_index < num_segments; ++seg_index) {\n            // Check if the pointer is valid (allocated)\n            if (table[seg_index].load(std::memory_order_relaxed) > segment_allocation_failure_tag) {\n                end = seg_index + 1;\n            }\n        }\n        return end;\n    }\n\n    void reserve( size_type n ) {\n        if (n > allocator_traits_type::max_size(my_segment_table_allocator)) {\n            throw_exception(exception_id::reservation_length_error);\n        }\n\n        size_type size = my_size.load(std::memory_order_relaxed);\n        segment_index_type start_seg_idx = size == 0 ? 0 : segment_index_of(size - 1) + 1;\n        for (segment_index_type seg_idx = start_seg_idx; segment_base(seg_idx) < n; ++seg_idx) {\n                size_type first_index = segment_base(seg_idx);\n                internal_subscript<true>(first_index);\n        }\n    }\n\n    void clear() {\n        clear_segments();\n        clear_table();\n        my_size.store(0, std::memory_order_relaxed);\n        my_first_block.store(0, std::memory_order_relaxed);\n    }\n\n    void clear_segments() {\n        segment_table_type current_segment_table = get_table();\n        for (size_type i = number_of_segments(current_segment_table); i != 0; --i) {\n            if (current_segment_table[i - 1].load(std::memory_order_relaxed) != nullptr) {\n                // If the segment was enabled - disable and deallocate it\n                delete_segment(i - 1);\n            }\n        }\n    }\n\n    void destroy_and_deallocate_table(segment_table_type table, size_type num_segments) {\n        auto& alloc = get_allocator();\n        for (size_type seg_idx = 0; seg_idx < num_segments; ++seg_idx) {\n            segment_table_allocator_traits::destroy(alloc, &table[seg_idx]);\n        }\n        segment_table_allocator_traits::deallocate(alloc, table, num_segments);\n    }\n\n    void clear_table() {\n        segment_table_type current_segment_table = get_table();\n        if (current_segment_table != my_embedded_table) {\n            // If the active table is not the embedded one - deallocate the active table\n            destroy_and_deallocate_table(current_segment_table, pointers_per_long_table);\n            my_segment_table.store(my_embedded_table, std::memory_order_relaxed);\n            zero_table(my_embedded_table, pointers_per_embedded_table);\n        }\n    }\n\n    void extend_table_if_necessary(segment_table_type& table, size_type start_index, size_type end_index) {\n        // Extend segment table if an active table is an embedded one and the requested index is\n        // outside it\n        if (table == my_embedded_table && end_index > embedded_table_size) {\n            if (start_index <= embedded_table_size) {\n                // More than one thread can get here: the one that has assigned the first block and\n                // is in the process of allocating it now, and the one that saw the first block has\n                // been assigned already, but not yet allocated. This latter thread decides not to\n                // wait for the first one and extend the table itself.\n                try_call([&] {\n                    segment_table_type new_table =\n                        self()->allocate_long_table(my_embedded_table, start_index);\n                    // It is possible that the table was extended by the thread that allocated first\n                    // block. In this case, the below CAS fails and re-reads the new table pointer.\n                    if (my_segment_table.compare_exchange_strong(\n                            table, new_table,\n                            /*memory order in case of a success*/std::memory_order_release,\n                            /*memory order in case of a failure*/std::memory_order_acquire))\n                    {\n                        // CAS was successful, update the local table pointer with now actual\n                        table = new_table;\n                    } else if (new_table) {\n                        // Other thread was the first to replace the segment table. Current thread's\n                        // table is not needed anymore, so destroying it.\n                        destroy_and_deallocate_table(new_table, pointers_per_long_table);\n                    }\n                }).on_exception([&] {\n                    my_segment_table_allocation_failed.store(true, std::memory_order_relaxed);\n                });\n            } else {\n                atomic_backoff backoff;\n                do {\n                    if (my_segment_table_allocation_failed.load(std::memory_order_relaxed)) {\n                        throw_exception(exception_id::bad_alloc);\n                    }\n                    backoff.pause();\n                    table = my_segment_table.load(std::memory_order_acquire);\n                } while (table == my_embedded_table);\n            }\n        }\n    }\n\n    // Return the segment where index is stored\n    static constexpr segment_index_type segment_index_of( size_type index ) {\n        return size_type(tbb::detail::log2(uintptr_t(index|1)));\n    }\n\n    // Needed to calculate the offset in segment\n    static constexpr size_type segment_base( size_type index ) {\n        return size_type(1) << index & ~size_type(1);\n    }\n\n    // Return size of the segment\n    static constexpr size_type segment_size( size_type index ) {\n        return index == 0 ? 2 : size_type(1) << index;\n    }\n\nprivate:\n\n    derived_type* self() {\n        return static_cast<derived_type*>(this);\n    }\n\n    struct copy_segment_body_type {\n        void operator()( segment_index_type index, segment_type from, segment_type to ) const {\n            my_instance.self()->copy_segment(index, from, to);\n        }\n        segment_table& my_instance;\n    };\n\n    struct move_segment_body_type {\n        void operator()( segment_index_type index, segment_type from, segment_type to ) const {\n            my_instance.self()->move_segment(index, from, to);\n        }\n        segment_table& my_instance;\n    };\n\n    // Transgers all segments from the other table\n    template <typename TransferBody>\n    void internal_transfer( const segment_table& other, TransferBody transfer_segment ) {\n        static_cast<derived_type*>(this)->destroy_elements();\n\n        assign_first_block_if_necessary(other.my_first_block.load(std::memory_order_relaxed));\n        my_size.store(other.my_size.load(std::memory_order_relaxed), std::memory_order_relaxed);\n\n        segment_table_type other_table = other.get_table();\n        size_type end_segment_size = segment_size(other.find_last_allocated_segment(other_table));\n\n        // If an exception occurred in other, then the size may be greater than the size of the end segment.\n        size_type other_size = end_segment_size < other.my_size.load(std::memory_order_relaxed) ?\n            other.my_size.load(std::memory_order_relaxed) : end_segment_size;\n        other_size = my_segment_table_allocation_failed ? embedded_table_size : other_size;\n\n        for (segment_index_type i = 0; segment_base(i) < other_size; ++i) {\n            // If the segment in other table is enabled - transfer it\n            if (other_table[i].load(std::memory_order_relaxed) == segment_allocation_failure_tag)\n            {\n                    my_size = segment_base(i);\n                    break;\n            } else if (other_table[i].load(std::memory_order_relaxed) != nullptr) {\n                internal_subscript<true>(segment_base(i));\n                transfer_segment(i, other.get_table()[i].load(std::memory_order_relaxed) + segment_base(i),\n                                get_table()[i].load(std::memory_order_relaxed) + segment_base(i));\n            }\n        }\n    }\n\n    // Moves the other segment table\n    // Only equal allocators are allowed\n    void internal_move( segment_table&& other ) {\n        // NOTE: allocators should be equal\n        clear();\n        my_first_block.store(other.my_first_block.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        my_size.store(other.my_size.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        // If an active table in other is embedded - restore all of the embedded segments\n        if (other.get_table() == other.my_embedded_table) {\n            for ( size_type i = 0; i != pointers_per_embedded_table; ++i ) {\n                segment_type other_segment = other.my_embedded_table[i].load(std::memory_order_relaxed);\n                my_embedded_table[i].store(other_segment, std::memory_order_relaxed);\n                other.my_embedded_table[i].store(nullptr, std::memory_order_relaxed);\n            }\n            my_segment_table.store(my_embedded_table, std::memory_order_relaxed);\n        } else {\n            my_segment_table.store(other.my_segment_table, std::memory_order_relaxed);\n            other.my_segment_table.store(other.my_embedded_table, std::memory_order_relaxed);\n            zero_table(other.my_embedded_table, pointers_per_embedded_table);\n        }\n        other.my_size.store(0, std::memory_order_relaxed);\n    }\n\n    // Move construct the segment table with the allocator object\n    // if any instances of allocator_type are always equal\n    void internal_move_construct_with_allocator( segment_table&& other, const allocator_type&,\n                                                 /*is_always_equal = */ std::true_type ) {\n        internal_move(std::move(other));\n    }\n\n    // Move construct the segment table with the allocator object\n    // if any instances of allocator_type are always equal\n    void internal_move_construct_with_allocator( segment_table&& other, const allocator_type& alloc,\n                                                 /*is_always_equal = */ std::false_type ) {\n        if (other.my_segment_table_allocator == alloc) {\n            // If allocators are equal - restore pointers\n            internal_move(std::move(other));\n        } else {\n            // If allocators are not equal - perform per element move with reallocation\n            try_call( [&] {\n                internal_transfer(other, move_segment_body_type{*this});\n            } ).on_exception( [&] {\n                clear();\n            });\n        }\n    }\n\n    // Move assigns the segment table to other is any instances of allocator_type are always equal\n    // or propagate_on_container_move_assignment is true\n    void internal_move_assign( segment_table&& other, /*is_always_equal || POCMA = */ std::true_type ) {\n        internal_move(std::move(other));\n    }\n\n    // Move assigns the segment table to other is any instances of allocator_type are not always equal\n    // and propagate_on_container_move_assignment is false\n    void internal_move_assign( segment_table&& other, /*is_always_equal || POCMA = */ std::false_type ) {\n        if (my_segment_table_allocator == other.my_segment_table_allocator) {\n            // If allocators are equal - restore pointers\n            internal_move(std::move(other));\n        } else {\n            // If allocators are not equal - perform per element move with reallocation\n            internal_transfer(other, move_segment_body_type{*this});\n        }\n    }\n\n    // Swaps two segment tables if any instances of allocator_type are always equal\n    // or propagate_on_container_swap is true\n    void internal_swap( segment_table& other, /*is_always_equal || POCS = */ std::true_type ) {\n        internal_swap_fields(other);\n    }\n\n    // Swaps two segment tables if any instances of allocator_type are not always equal\n    // and propagate_on_container_swap is false\n    // According to the C++ standard, swapping of two containers with unequal allocators\n    // is an undefined behavior scenario\n    void internal_swap( segment_table& other, /*is_always_equal || POCS = */ std::false_type ) {\n        __TBB_ASSERT(my_segment_table_allocator == other.my_segment_table_allocator,\n                     \"Swapping with unequal allocators is not allowed\");\n        internal_swap_fields(other);\n    }\n\n    void internal_swap_fields( segment_table& other ) {\n        // If an active table in either *this segment table or other is an embedded one - swaps the embedded tables\n        if (get_table() == my_embedded_table ||\n            other.get_table() == other.my_embedded_table) {\n\n            for (size_type i = 0; i != pointers_per_embedded_table; ++i) {\n                segment_type current_segment = my_embedded_table[i].load(std::memory_order_relaxed);\n                segment_type other_segment = other.my_embedded_table[i].load(std::memory_order_relaxed);\n\n                my_embedded_table[i].store(other_segment, std::memory_order_relaxed);\n                other.my_embedded_table[i].store(current_segment, std::memory_order_relaxed);\n            }\n        }\n\n        segment_table_type current_segment_table = get_table();\n        segment_table_type other_segment_table = other.get_table();\n\n        // If an active table is an embedded one -\n        // store an active table in other to the embedded one from other\n        if (current_segment_table == my_embedded_table) {\n            other.my_segment_table.store(other.my_embedded_table, std::memory_order_relaxed);\n        } else {\n            // Otherwise - store it to the active segment table\n            other.my_segment_table.store(current_segment_table, std::memory_order_relaxed);\n        }\n\n        // If an active table in other segment table is an embedded one -\n        // store an active table in other to the embedded one from *this\n        if (other_segment_table == other.my_embedded_table) {\n            my_segment_table.store(my_embedded_table, std::memory_order_relaxed);\n        } else {\n            // Otherwise - store it to the active segment table in other\n            my_segment_table.store(other_segment_table, std::memory_order_relaxed);\n        }\n        auto first_block = other.my_first_block.load(std::memory_order_relaxed);\n        other.my_first_block.store(my_first_block.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        my_first_block.store(first_block, std::memory_order_relaxed);\n\n        auto size = other.my_size.load(std::memory_order_relaxed);\n        other.my_size.store(my_size.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        my_size.store(size, std::memory_order_relaxed);\n    }\n\nprotected:\n    // A flag indicates that an exception was throws during segment allocations\n    const segment_type segment_allocation_failure_tag = reinterpret_cast<segment_type>(1);\n    static constexpr size_type embedded_table_size = segment_size(pointers_per_embedded_table);\n\n    template <bool allow_out_of_range_access>\n    value_type& internal_subscript( size_type index ) {\n        segment_index_type seg_index = segment_index_of(index);\n        segment_table_type table = my_segment_table.load(std::memory_order_acquire);\n        segment_type segment = nullptr;\n\n        if (allow_out_of_range_access) {\n            if (derived_type::allow_table_extending) {\n                extend_table_if_necessary(table, index, index + 1);\n            }\n\n            segment = table[seg_index].load(std::memory_order_acquire);\n            // If the required segment is disabled - enable it\n            if (segment == nullptr) {\n                enable_segment(segment, table, seg_index, index);\n            }\n            // Check if an exception was thrown during segment allocation\n            if (segment == segment_allocation_failure_tag) {\n                throw_exception(exception_id::bad_alloc);\n            }\n        } else {\n            segment = table[seg_index].load(std::memory_order_acquire);\n        }\n        __TBB_ASSERT(segment != nullptr, nullptr);\n\n        return segment[index];\n    }\n\n    void assign_first_block_if_necessary(segment_index_type index) {\n        size_type zero = 0;\n        if (this->my_first_block.load(std::memory_order_relaxed) == zero) {\n            this->my_first_block.compare_exchange_strong(zero, index);\n        }\n    }\n\n    void zero_table( segment_table_type table, size_type count ) {\n        for (size_type i = 0; i != count; ++i) {\n            table[i].store(nullptr, std::memory_order_relaxed);\n        }\n    }\n\n    segment_table_type get_table() const {\n        return my_segment_table.load(std::memory_order_acquire);\n    }\n\n    segment_table_allocator_type my_segment_table_allocator;\n    std::atomic<segment_table_type> my_segment_table;\n    atomic_segment my_embedded_table[pointers_per_embedded_table];\n    // Number of segments in first block\n    std::atomic<size_type> my_first_block;\n    // Number of elements in table\n    std::atomic<size_type> my_size;\n    // Flag to indicate failed extend table\n    std::atomic<bool> my_segment_table_allocation_failed;\n}; // class segment_table\n\n} // namespace d1\n} // namespace detail\n} // namespace tbb\n\n#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n#pragma warning(pop) // warning 4127 is back\n#endif\n\n#endif // __TBB_detail__segment_table_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_small_object_pool.h",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB__small_object_pool_H\n#define __TBB__small_object_pool_H\n\n#include \"_config.h\"\n#include \"_assert.h\"\n\n#include \"../profiling.h\"\n#include <cstddef>\n#include <cstdint>\n#include <atomic>\n\nnamespace tbb {\nnamespace detail {\n\nnamespace d1 {\nclass small_object_pool {\nprotected:\n    small_object_pool() = default;\n};\nstruct execution_data;\n}\n\nnamespace r1 {\nTBB_EXPORT void* __TBB_EXPORTED_FUNC allocate(d1::small_object_pool*& pool, std::size_t number_of_bytes,\n                                    const d1::execution_data& ed);\nTBB_EXPORT void* __TBB_EXPORTED_FUNC allocate(d1::small_object_pool*& pool, std::size_t number_of_bytes);\nTBB_EXPORT void  __TBB_EXPORTED_FUNC deallocate(d1::small_object_pool& pool, void* ptr, std::size_t number_of_bytes,\n                                        const d1::execution_data& ed);\nTBB_EXPORT void  __TBB_EXPORTED_FUNC deallocate(d1::small_object_pool& pool, void* ptr, std::size_t number_of_bytes);\n}\n\nnamespace d1 {\nclass small_object_allocator {\npublic:\n    template <typename Type, typename... Args>\n    Type* new_object(execution_data& ed, Args&&... args) {\n        void* allocated_object = r1::allocate(m_pool, sizeof(Type), ed);\n\n        auto constructed_object = new(allocated_object) Type(std::forward<Args>(args)...);\n        return constructed_object;\n    }\n\n    template <typename Type, typename... Args>\n    Type* new_object(Args&&... args) {\n        void* allocated_object = r1::allocate(m_pool, sizeof(Type));\n\n        auto constructed_object = new(allocated_object) Type(std::forward<Args>(args)...);\n        return constructed_object;\n    }\n\n    template <typename Type>\n    void delete_object(Type* object, const execution_data& ed) {\n        // Copy this since it can be a member of the passed object and\n        // unintentionally destroyed when Type destructor is called below\n        small_object_allocator alloc = *this;\n        object->~Type();\n        alloc.deallocate(object, ed);\n    }\n\n    template <typename Type>\n    void delete_object(Type* object) {\n        // Copy this since it can be a member of the passed object and\n        // unintentionally destroyed when Type destructor is called below\n        small_object_allocator alloc = *this;\n        object->~Type();\n        alloc.deallocate(object);\n    }\n\n    template <typename Type>\n    void deallocate(Type* ptr, const execution_data& ed) {\n        call_itt_task_notify(destroy, ptr);\n\n        __TBB_ASSERT(m_pool != nullptr, \"Pool must be valid for deallocate call\");\n        r1::deallocate(*m_pool, ptr, sizeof(Type), ed);\n    }\n\n    template <typename Type>\n    void deallocate(Type* ptr) {\n        call_itt_task_notify(destroy, ptr);\n\n        __TBB_ASSERT(m_pool != nullptr, \"Pool must be valid for deallocate call\");\n        r1::deallocate(*m_pool, ptr, sizeof(Type));\n    }\nprivate:\n    small_object_pool* m_pool{};\n};\n\n} // namespace d1\n} // namespace detail\n} // namespace tbb\n\n#endif /* __TBB__small_object_pool_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_string_resource.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\nTBB_STRING_RESOURCE(ALGORITHM, \"tbb_algorithm\")\nTBB_STRING_RESOURCE(PARALLEL_FOR, \"tbb_parallel_for\")\nTBB_STRING_RESOURCE(PARALLEL_FOR_EACH, \"tbb_parallel_for_each\")\nTBB_STRING_RESOURCE(PARALLEL_INVOKE, \"tbb_parallel_invoke\")\nTBB_STRING_RESOURCE(PARALLEL_REDUCE, \"tbb_parallel_reduce\")\nTBB_STRING_RESOURCE(PARALLEL_SCAN, \"tbb_parallel_scan\")\nTBB_STRING_RESOURCE(PARALLEL_SORT, \"tbb_parallel_sort\")\nTBB_STRING_RESOURCE(PARALLEL_PIPELINE, \"tbb_parallel_pipeline\")\nTBB_STRING_RESOURCE(CUSTOM_CTX, \"tbb_custom\")\n\nTBB_STRING_RESOURCE(FLOW_NULL, \"null\")\nTBB_STRING_RESOURCE(FLOW_BROADCAST_NODE, \"broadcast_node\")\nTBB_STRING_RESOURCE(FLOW_BUFFER_NODE, \"buffer_node\")\nTBB_STRING_RESOURCE(FLOW_CONTINUE_NODE, \"continue_node\")\nTBB_STRING_RESOURCE(FLOW_FUNCTION_NODE, \"function_node\")\nTBB_STRING_RESOURCE(FLOW_JOIN_NODE_QUEUEING, \"join_node (queueing)\")\nTBB_STRING_RESOURCE(FLOW_JOIN_NODE_RESERVING, \"join_node (reserving)\")\nTBB_STRING_RESOURCE(FLOW_JOIN_NODE_TAG_MATCHING, \"join_node (tag_matching)\")\nTBB_STRING_RESOURCE(FLOW_LIMITER_NODE, \"limiter_node\")\nTBB_STRING_RESOURCE(FLOW_MULTIFUNCTION_NODE, \"multifunction_node\")\nTBB_STRING_RESOURCE(FLOW_OVERWRITE_NODE, \"overwrite_node\")\nTBB_STRING_RESOURCE(FLOW_PRIORITY_QUEUE_NODE, \"priority_queue_node\")\nTBB_STRING_RESOURCE(FLOW_QUEUE_NODE, \"queue_node\")\nTBB_STRING_RESOURCE(FLOW_SEQUENCER_NODE, \"sequencer_node\")\nTBB_STRING_RESOURCE(FLOW_INPUT_NODE, \"input_node\")\nTBB_STRING_RESOURCE(FLOW_SPLIT_NODE, \"split_node\")\nTBB_STRING_RESOURCE(FLOW_WRITE_ONCE_NODE, \"write_once_node\")\nTBB_STRING_RESOURCE(FLOW_INDEXER_NODE, \"indexer_node\")\nTBB_STRING_RESOURCE(FLOW_COMPOSITE_NODE, \"composite_node\")\nTBB_STRING_RESOURCE(FLOW_ASYNC_NODE, \"async_node\")\nTBB_STRING_RESOURCE(FLOW_INPUT_PORT, \"input_port\")\nTBB_STRING_RESOURCE(FLOW_INPUT_PORT_0, \"input_port_0\")\nTBB_STRING_RESOURCE(FLOW_INPUT_PORT_1, \"input_port_1\")\nTBB_STRING_RESOURCE(FLOW_INPUT_PORT_2, \"input_port_2\")\nTBB_STRING_RESOURCE(FLOW_INPUT_PORT_3, \"input_port_3\")\nTBB_STRING_RESOURCE(FLOW_INPUT_PORT_4, \"input_port_4\")\nTBB_STRING_RESOURCE(FLOW_INPUT_PORT_5, \"input_port_5\")\nTBB_STRING_RESOURCE(FLOW_INPUT_PORT_6, \"input_port_6\")\nTBB_STRING_RESOURCE(FLOW_INPUT_PORT_7, \"input_port_7\")\nTBB_STRING_RESOURCE(FLOW_INPUT_PORT_8, \"input_port_8\")\nTBB_STRING_RESOURCE(FLOW_INPUT_PORT_9, \"input_port_9\")\nTBB_STRING_RESOURCE(FLOW_OUTPUT_PORT, \"output_port\")\nTBB_STRING_RESOURCE(FLOW_OUTPUT_PORT_0, \"output_port_0\")\nTBB_STRING_RESOURCE(FLOW_OUTPUT_PORT_1, \"output_port_1\")\nTBB_STRING_RESOURCE(FLOW_OUTPUT_PORT_2, \"output_port_2\")\nTBB_STRING_RESOURCE(FLOW_OUTPUT_PORT_3, \"output_port_3\")\nTBB_STRING_RESOURCE(FLOW_OUTPUT_PORT_4, \"output_port_4\")\nTBB_STRING_RESOURCE(FLOW_OUTPUT_PORT_5, \"output_port_5\")\nTBB_STRING_RESOURCE(FLOW_OUTPUT_PORT_6, \"output_port_6\")\nTBB_STRING_RESOURCE(FLOW_OUTPUT_PORT_7, \"output_port_7\")\nTBB_STRING_RESOURCE(FLOW_OUTPUT_PORT_8, \"output_port_8\")\nTBB_STRING_RESOURCE(FLOW_OUTPUT_PORT_9, \"output_port_9\")\nTBB_STRING_RESOURCE(FLOW_OBJECT_NAME, \"object_name\")\nTBB_STRING_RESOURCE(FLOW_BODY, \"body\")\nTBB_STRING_RESOURCE(FLOW_GRAPH, \"graph\")\nTBB_STRING_RESOURCE(FLOW_NODE, \"node\")\nTBB_STRING_RESOURCE(FLOW_TASKS, \"tbb_flow_graph\")\nTBB_STRING_RESOURCE(USER_EVENT, \"user_event\")\n\n#if __TBB_FLOW_TRACE_CODEPTR\nTBB_STRING_RESOURCE(CODE_ADDRESS, \"code_address\")\n#endif\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_task.h",
    "content": "/*\n    Copyright (c) 2020-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB__task_H\n#define __TBB__task_H\n\n#include \"_config.h\"\n#include \"_assert.h\"\n#include \"_template_helpers.h\"\n#include \"_small_object_pool.h\"\n\n#include \"../profiling.h\"\n\n#include <cstddef>\n#include <cstdint>\n#include <climits>\n#include <utility>\n#include <atomic>\n#include <mutex>\n\nnamespace tbb {\nnamespace detail {\n\nnamespace d1 {\nusing slot_id = unsigned short;\nconstexpr slot_id no_slot = slot_id(~0);\nconstexpr slot_id any_slot = slot_id(~1);\n\nclass task;\nclass wait_context;\nclass task_group_context;\nstruct execution_data;\nclass wait_tree_vertex_interface;\nclass task_arena_base;\n}\n\nnamespace d2 {\nclass task_group;\nclass task_group_base;\n}\n\nnamespace r1 {\n//! Task spawn/wait entry points\nTBB_EXPORT void __TBB_EXPORTED_FUNC spawn(d1::task& t, d1::task_group_context& ctx);\nTBB_EXPORT void __TBB_EXPORTED_FUNC spawn(d1::task& t, d1::task_group_context& ctx, d1::slot_id id);\nTBB_EXPORT void __TBB_EXPORTED_FUNC execute_and_wait(d1::task& t, d1::task_group_context& t_ctx, d1::wait_context&, d1::task_group_context& w_ctx);\nTBB_EXPORT void __TBB_EXPORTED_FUNC wait(d1::wait_context&, d1::task_group_context& ctx);\nTBB_EXPORT d1::slot_id __TBB_EXPORTED_FUNC execution_slot(const d1::execution_data*);\nTBB_EXPORT d1::slot_id __TBB_EXPORTED_FUNC execution_slot(const d1::task_arena_base&);\nTBB_EXPORT d1::task_group_context* __TBB_EXPORTED_FUNC current_context();\nTBB_EXPORT d1::wait_tree_vertex_interface* get_thread_reference_vertex(d1::wait_tree_vertex_interface* wc);\n\n// Do not place under __TBB_RESUMABLE_TASKS. It is a stub for unsupported platforms.\nstruct suspend_point_type;\nusing suspend_callback_type = void(*)(void*, suspend_point_type*);\n//! The resumable tasks entry points\nTBB_EXPORT void __TBB_EXPORTED_FUNC suspend(suspend_callback_type suspend_callback, void* user_callback);\nTBB_EXPORT void __TBB_EXPORTED_FUNC resume(suspend_point_type* tag);\nTBB_EXPORT suspend_point_type* __TBB_EXPORTED_FUNC current_suspend_point();\nTBB_EXPORT void __TBB_EXPORTED_FUNC notify_waiters(std::uintptr_t wait_ctx_addr);\n\nclass thread_data;\nclass task_dispatcher;\nclass external_waiter;\nstruct task_accessor;\nstruct task_arena_impl;\n} // namespace r1\n\nnamespace d1 {\n\nclass task_arena;\nusing suspend_point = r1::suspend_point_type*;\n\n#if __TBB_RESUMABLE_TASKS\ntemplate <typename F>\nstatic void suspend_callback(void* user_callback, suspend_point sp) {\n    // Copy user function to a new stack after the context switch to avoid a race when the previous\n    // suspend point is resumed while the user_callback is being called.\n    F user_callback_copy = *static_cast<F*>(user_callback);\n    user_callback_copy(sp);\n}\n\ntemplate <typename F>\nvoid suspend(F f) {\n    r1::suspend(&suspend_callback<F>, &f);\n}\n\ninline void resume(suspend_point tag) {\n    r1::resume(tag);\n}\n#endif /* __TBB_RESUMABLE_TASKS */\n\n// TODO align wait_context on cache lane\nclass wait_context {\n    static constexpr std::uint64_t overflow_mask = ~((1LLU << 32) - 1);\n\n    std::uint64_t m_version_and_traits{1};\n    std::atomic<std::uint64_t> m_ref_count{};\n\n    void add_reference(std::int64_t delta) {\n        call_itt_task_notify(releasing, this);\n        std::uint64_t r = m_ref_count.fetch_add(static_cast<std::uint64_t>(delta)) + static_cast<std::uint64_t>(delta);\n\n        __TBB_ASSERT_EX((r & overflow_mask) == 0, \"Overflow is detected\");\n\n        if (!r) {\n            // Some external waiters or coroutine waiters sleep in wait list\n            // Should to notify them that work is done\n            std::uintptr_t wait_ctx_addr = std::uintptr_t(this);\n            r1::notify_waiters(wait_ctx_addr);\n        }\n    }\n\n    bool continue_execution() const {\n        std::uint64_t r = m_ref_count.load(std::memory_order_acquire);\n        __TBB_ASSERT_EX((r & overflow_mask) == 0, \"Overflow is detected\");\n        return r > 0;\n    }\n\n    friend class r1::thread_data;\n    friend class r1::task_dispatcher;\n    friend class r1::external_waiter;\n    friend class wait_context_vertex;\n    friend struct r1::task_arena_impl;\n    friend struct r1::suspend_point_type;\npublic:\n    // Despite the internal reference count is uin64_t we limit the user interface with uint32_t\n    // to preserve a part of the internal reference count for special needs.\n    wait_context(std::uint32_t ref_count) : m_ref_count{ref_count} { suppress_unused_warning(m_version_and_traits); }\n    wait_context(const wait_context&) = delete;\n\n    ~wait_context() {\n        __TBB_ASSERT(!continue_execution(), nullptr);\n    }\n\n    void reserve(std::uint32_t delta = 1) {\n        add_reference(delta);\n    }\n\n    void release(std::uint32_t delta = 1) {\n        add_reference(-std::int64_t(delta));\n    }\n};\n\nclass wait_tree_vertex_interface {\npublic:\n    virtual void reserve(std::uint32_t delta = 1) = 0;\n    virtual void release(std::uint32_t delta = 1) = 0;\n\nprotected:\n    virtual ~wait_tree_vertex_interface() = default;\n};\n\nclass wait_context_vertex : public wait_tree_vertex_interface {\npublic:\n    wait_context_vertex(std::uint32_t ref = 0) : m_wait(ref) {}\n\n    void reserve(std::uint32_t delta = 1) override {\n        m_wait.reserve(delta);\n    }\n\n    void release(std::uint32_t delta = 1) override {\n        m_wait.release(delta);\n    }\n\n    wait_context& get_context() {\n        return m_wait;\n    }\nprivate:\n    friend class d2::task_group;\n    friend class d2::task_group_base;\n\n    bool continue_execution() const {\n        return m_wait.continue_execution();\n    }\n\n    wait_context m_wait;\n};\n\nclass reference_vertex : public wait_tree_vertex_interface {\npublic:\n    reference_vertex(wait_tree_vertex_interface* parent, std::uint32_t ref_count) : my_parent{parent}, m_ref_count{ref_count}\n    {}\n\n    void reserve(std::uint32_t delta = 1) override {\n        if (m_ref_count.fetch_add(static_cast<std::uint64_t>(delta)) == 0) {\n            my_parent->reserve();\n        }\n    }\n\n    void release(std::uint32_t delta = 1) override {\n        auto parent = my_parent;\n        std::uint64_t ref = m_ref_count.fetch_sub(static_cast<std::uint64_t>(delta)) - static_cast<std::uint64_t>(delta);\n        if (ref == 0) {\n            parent->release();\n        }\n    }\n\n    std::uint32_t get_num_child() {\n        return static_cast<std::uint32_t>(m_ref_count.load(std::memory_order_acquire));\n    }\nprivate:\n    wait_tree_vertex_interface* my_parent;\n    std::atomic<std::uint64_t> m_ref_count;\n};\n\nstruct execution_data {\n    task_group_context* context{};\n    slot_id original_slot{};\n    slot_id affinity_slot{};\n};\n\ninline task_group_context* context(const execution_data& ed) {\n    return ed.context;\n}\n\ninline slot_id original_slot(const execution_data& ed) {\n    return ed.original_slot;\n}\n\ninline slot_id affinity_slot(const execution_data& ed) {\n    return ed.affinity_slot;\n}\n\ninline slot_id execution_slot(const execution_data& ed) {\n    return r1::execution_slot(&ed);\n}\n\ninline bool is_same_affinity(const execution_data& ed) {\n    return affinity_slot(ed) == no_slot || affinity_slot(ed) == execution_slot(ed);\n}\n\ninline bool is_stolen(const execution_data& ed) {\n    return original_slot(ed) != execution_slot(ed);\n}\n\ninline void spawn(task& t, task_group_context& ctx) {\n    call_itt_task_notify(releasing, &t);\n    r1::spawn(t, ctx);\n}\n\ninline void spawn(task& t, task_group_context& ctx, slot_id id) {\n    call_itt_task_notify(releasing, &t);\n    r1::spawn(t, ctx, id);\n}\n\ninline void execute_and_wait(task& t, task_group_context& t_ctx, wait_context& wait_ctx, task_group_context& w_ctx) {\n    r1::execute_and_wait(t, t_ctx, wait_ctx, w_ctx);\n    call_itt_task_notify(acquired, &wait_ctx);\n    call_itt_task_notify(destroy, &wait_ctx);\n}\n\ninline void wait(wait_context& wait_ctx, task_group_context& ctx) {\n    r1::wait(wait_ctx, ctx);\n    call_itt_task_notify(acquired, &wait_ctx);\n    call_itt_task_notify(destroy, &wait_ctx);\n}\n\nusing r1::current_context;\n\nclass task_traits {\n    std::uint64_t m_version_and_traits{};\n    friend struct r1::task_accessor;\n};\n\n//! Alignment for a task object\nstatic constexpr std::size_t task_alignment = 64;\n\n//! Base class for user-defined tasks.\n/** @ingroup task_scheduling */\nclass alignas(task_alignment) task : public task_traits {\nprotected:\n    virtual ~task() = default;\n\npublic:\n    virtual task* execute(execution_data&) = 0;\n    virtual task* cancel(execution_data&) = 0;\n\nprivate:\n    std::uint64_t m_reserved[6]{};\n    friend struct r1::task_accessor;\n};\nstatic_assert(sizeof(task) == task_alignment, \"task size is broken\");\n\n} // namespace d1\n} // namespace detail\n} // namespace tbb\n\n#endif /* __TBB__task_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_task_handle.h",
    "content": "/*\n    Copyright (c) 2020-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n\n#ifndef __TBB_task_handle_H\n#define __TBB_task_handle_H\n\n#include \"_config.h\"\n#include \"_task.h\"\n#include \"_small_object_pool.h\"\n#include \"_utils.h\"\n#include <memory>\n\nnamespace tbb {\nnamespace detail {\n\nnamespace d1 { class task_group_context; class wait_context; struct execution_data; }\nnamespace d2 {\n\nclass task_handle;\n\nclass task_handle_task : public d1::task {\n    std::uint64_t m_version_and_traits{};\n    d1::wait_tree_vertex_interface* m_wait_tree_vertex;\n    d1::task_group_context& m_ctx;\n    d1::small_object_allocator m_allocator;\npublic:\n    void finalize(const d1::execution_data* ed = nullptr) {\n        if (ed) {\n            m_allocator.delete_object(this, *ed);\n        } else {\n            m_allocator.delete_object(this);\n        }\n    }\n\n    task_handle_task(d1::wait_tree_vertex_interface* vertex, d1::task_group_context& ctx, d1::small_object_allocator& alloc)\n        : m_wait_tree_vertex(vertex)\n        , m_ctx(ctx)\n        , m_allocator(alloc) {\n        suppress_unused_warning(m_version_and_traits);\n        m_wait_tree_vertex->reserve();\n    }\n\n    ~task_handle_task() override {\n        m_wait_tree_vertex->release();\n    }\n\n    d1::task_group_context& ctx() const { return m_ctx; }\n};\n\n\nclass task_handle {\n    struct task_handle_task_finalizer_t{\n        void operator()(task_handle_task* p){ p->finalize(); }\n    };\n    using handle_impl_t = std::unique_ptr<task_handle_task, task_handle_task_finalizer_t>;\n\n    handle_impl_t m_handle = {nullptr};\npublic:\n    task_handle() = default;\n    task_handle(task_handle&&) = default;\n    task_handle& operator=(task_handle&&) = default;\n\n    explicit operator bool() const noexcept { return static_cast<bool>(m_handle); }\n\n    friend bool operator==(task_handle const& th, std::nullptr_t) noexcept;\n    friend bool operator==(std::nullptr_t, task_handle const& th) noexcept;\n\n    friend bool operator!=(task_handle const& th, std::nullptr_t) noexcept;\n    friend bool operator!=(std::nullptr_t, task_handle const& th) noexcept;\n\nprivate:\n    friend struct task_handle_accessor;\n\n    task_handle(task_handle_task* t) : m_handle {t}{};\n\n    d1::task* release() {\n       return m_handle.release();\n    }\n};\n\nstruct task_handle_accessor {\nstatic task_handle              construct(task_handle_task* t)  { return {t}; }\nstatic d1::task*                release(task_handle& th)        { return th.release(); }\nstatic d1::task_group_context&  ctx_of(task_handle& th)         {\n    __TBB_ASSERT(th.m_handle, \"ctx_of does not expect empty task_handle.\");\n    return th.m_handle->ctx();\n}\n};\n\ninline bool operator==(task_handle const& th, std::nullptr_t) noexcept {\n    return th.m_handle == nullptr;\n}\ninline bool operator==(std::nullptr_t, task_handle const& th) noexcept {\n    return th.m_handle == nullptr;\n}\n\ninline bool operator!=(task_handle const& th, std::nullptr_t) noexcept {\n    return th.m_handle != nullptr;\n}\n\ninline bool operator!=(std::nullptr_t, task_handle const& th) noexcept {\n    return th.m_handle != nullptr;\n}\n\n} // namespace d2\n} // namespace detail\n} // namespace tbb\n\n#endif /* __TBB_task_handle_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_template_helpers.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_detail__template_helpers_H\n#define __TBB_detail__template_helpers_H\n\n#include \"_utils.h\"\n#include \"_config.h\"\n\n#include <cstddef>\n#include <cstdint>\n#include <utility>\n#include <type_traits>\n#include <memory>\n#include <iterator>\n\nnamespace tbb {\nnamespace detail {\ninline namespace d0 {\n\n// An internal implementation of void_t, which can be used in SFINAE contexts\ntemplate <typename...>\nstruct void_impl {\n    using type = void;\n}; // struct void_impl\n\ntemplate <typename... Args>\nusing void_t = typename void_impl<Args...>::type;\n\n// Generic SFINAE helper for expression checks, based on the idea demonstrated in ISO C++ paper n4502\ntemplate <typename T, typename, template <typename> class... Checks>\nstruct supports_impl {\n    using type = std::false_type;\n};\n\ntemplate <typename T, template <typename> class... Checks>\nstruct supports_impl<T, void_t<Checks<T>...>, Checks...> {\n    using type = std::true_type;\n};\n\ntemplate <typename T, template <typename> class... Checks>\nusing supports = typename supports_impl<T, void, Checks...>::type;\n\n//! A template to select either 32-bit or 64-bit constant as compile time, depending on machine word size.\ntemplate <unsigned u, unsigned long long ull >\nstruct select_size_t_constant {\n    // Explicit cast is needed to avoid compiler warnings about possible truncation.\n    // The value of the right size,   which is selected by ?:, is anyway not truncated or promoted.\n    static const std::size_t value = static_cast<std::size_t>((sizeof(std::size_t)==sizeof(u)) ? u : ull);\n};\n\n// TODO: do we really need it?\n//! Cast between unrelated pointer types.\n/** This method should be used sparingly as a last resort for dealing with\n  situations that inherently break strict ISO C++ aliasing rules. */\n// T is a pointer type because it will be explicitly provided by the programmer as a template argument;\n// U is a referent type to enable the compiler to check that \"ptr\" is a pointer, deducing U in the process.\ntemplate<typename T, typename U>\ninline T punned_cast( U* ptr ) {\n    std::uintptr_t x = reinterpret_cast<std::uintptr_t>(ptr);\n    return reinterpret_cast<T>(x);\n}\n\ntemplate<class T, size_t S, size_t R>\nstruct padded_base : T {\n    char pad[S - R];\n};\ntemplate<class T, size_t S> struct padded_base<T, S, 0> : T {};\n\n//! Pads type T to fill out to a multiple of cache line size.\ntemplate<class T, size_t S = max_nfs_size>\nstruct padded : padded_base<T, S, sizeof(T) % S> {};\n\n#if __TBB_CPP14_INTEGER_SEQUENCE_PRESENT\n\nusing std::index_sequence;\nusing std::make_index_sequence;\n\n#else\n\ntemplate<std::size_t... S> class index_sequence {};\n\ntemplate<std::size_t N, std::size_t... S>\nstruct make_index_sequence_impl : make_index_sequence_impl < N - 1, N - 1, S... > {};\n\ntemplate<std::size_t... S>\nstruct make_index_sequence_impl <0, S...> {\n    using type = index_sequence<S...>;\n};\n\ntemplate<std::size_t N>\nusing make_index_sequence = typename make_index_sequence_impl<N>::type;\n\n#endif /* __TBB_CPP14_INTEGER_SEQUENCE_PRESENT */\n\n//! Attach an index to a type to use it with an index sequence\ntemplate<typename T, std::size_t>\nusing indexed_t = T;\n\n#if __TBB_CPP17_LOGICAL_OPERATIONS_PRESENT\nusing std::conjunction;\nusing std::disjunction;\n#else // __TBB_CPP17_LOGICAL_OPERATIONS_PRESENT\n\ntemplate <typename...>\nstruct conjunction : std::true_type {};\n\ntemplate <typename First, typename... Args>\nstruct conjunction<First, Args...>\n    : std::conditional<bool(First::value), conjunction<Args...>, First>::type {};\n\ntemplate <typename T>\nstruct conjunction<T> : T {};\n\ntemplate <typename...>\nstruct disjunction : std::false_type {};\n\ntemplate <typename First, typename... Args>\nstruct disjunction<First, Args...>\n    : std::conditional<bool(First::value), First, disjunction<Args...>>::type {};\n\ntemplate <typename T>\nstruct disjunction<T> : T {};\n\n#endif // __TBB_CPP17_LOGICAL_OPERATIONS_PRESENT\n\ntemplate <typename Iterator>\nusing iterator_value_t = typename std::iterator_traits<Iterator>::value_type;\n\ntemplate <typename Iterator>\nusing iterator_key_t = typename std::remove_const<typename iterator_value_t<Iterator>::first_type>::type;\n\ntemplate <typename Iterator>\nusing iterator_mapped_t = typename iterator_value_t<Iterator>::second_type;\n\ntemplate <typename Iterator>\nusing iterator_alloc_pair_t = std::pair<typename std::add_const<iterator_key_t<Iterator>>::type,\n                                        iterator_mapped_t<Iterator>>;\n\ntemplate <typename A> using alloc_value_type = typename A::value_type;\ntemplate <typename A> using alloc_ptr_t = typename std::allocator_traits<A>::pointer;\ntemplate <typename A> using has_allocate = decltype(std::declval<alloc_ptr_t<A>&>() = std::declval<A>().allocate(0));\ntemplate <typename A> using has_deallocate = decltype(std::declval<A>().deallocate(std::declval<alloc_ptr_t<A>>(), 0));\n\n// alloc_value_type should be checked first, because it can be used in other checks\ntemplate <typename T>\nusing is_allocator = supports<T, alloc_value_type, has_allocate, has_deallocate>;\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\ntemplate <typename T>\ninline constexpr bool is_allocator_v = is_allocator<T>::value;\n#endif\n\n// Template class in which the \"type\" determines the type of the element number N in pack Args\ntemplate <std::size_t N, typename... Args>\nstruct pack_element {\n    using type = void;\n};\n\ntemplate <std::size_t N, typename T, typename... Args>\nstruct pack_element<N, T, Args...> {\n    using type = typename pack_element<N-1, Args...>::type;\n};\n\ntemplate <typename T, typename... Args>\nstruct pack_element<0, T, Args...> {\n    using type = T;\n};\n\ntemplate <std::size_t N, typename... Args>\nusing pack_element_t = typename pack_element<N, Args...>::type;\n\ntemplate <typename Func>\nclass raii_guard {\npublic:\n    static_assert(\n        std::is_nothrow_copy_constructible<Func>::value &&\n        std::is_nothrow_move_constructible<Func>::value,\n        \"Throwing an exception during the Func copy or move construction cause an unexpected behavior.\"\n    );\n\n    raii_guard( Func f ) noexcept : my_func(f), is_active(true) {}\n\n    raii_guard( raii_guard&& g ) noexcept : my_func(std::move(g.my_func)), is_active(g.is_active) {\n        g.is_active = false;\n    }\n\n    ~raii_guard() {\n        if (is_active) {\n            my_func();\n        }\n    }\n\n    void dismiss() {\n        is_active = false;\n    }\nprivate:\n    Func my_func;\n    bool is_active;\n}; // class raii_guard\n\ntemplate <typename Func>\nraii_guard<Func> make_raii_guard( Func f ) {\n    return raii_guard<Func>(f);\n}\n\ntemplate <typename Body>\nstruct try_call_proxy {\n    try_call_proxy( Body b ) : body(b) {}\n\n    template <typename OnExceptionBody>\n    void on_exception( OnExceptionBody on_exception_body ) {\n        auto guard = make_raii_guard(on_exception_body);\n        body();\n        guard.dismiss();\n    }\n\n    template <typename OnCompletionBody>\n    void on_completion(OnCompletionBody on_completion_body) {\n        auto guard = make_raii_guard(on_completion_body);\n        body();\n    }\n\n    Body body;\n}; // struct try_call_proxy\n\n// Template helper function for API\n// try_call(lambda1).on_exception(lambda2)\n// Executes lambda1 and if it throws an exception - executes lambda2\ntemplate <typename Body>\ntry_call_proxy<Body> try_call( Body b ) {\n    return try_call_proxy<Body>(b);\n}\n\n#if __TBB_CPP17_IS_SWAPPABLE_PRESENT\nusing std::is_nothrow_swappable;\nusing std::is_swappable;\n#else // __TBB_CPP17_IS_SWAPPABLE_PRESENT\nnamespace is_swappable_detail {\nusing std::swap;\n\ntemplate <typename T>\nusing has_swap = decltype(swap(std::declval<T&>(), std::declval<T&>()));\n\n#if _MSC_VER && _MSC_VER <= 1900 && !__INTEL_COMPILER\n// Workaround for VS2015: it fails to instantiate noexcept(...) inside std::integral_constant.\ntemplate <typename T>\nstruct noexcept_wrapper {\n    static const bool value = noexcept(swap(std::declval<T&>(), std::declval<T&>()));\n};\ntemplate <typename T>\nstruct is_nothrow_swappable_impl : std::integral_constant<bool, noexcept_wrapper<T>::value> {};\n#else\ntemplate <typename T>\nstruct is_nothrow_swappable_impl : std::integral_constant<bool, noexcept(swap(std::declval<T&>(), std::declval<T&>()))> {};\n#endif\n}\n\ntemplate <typename T>\nstruct is_swappable : supports<T, is_swappable_detail::has_swap> {};\n\ntemplate <typename T>\nstruct is_nothrow_swappable\n    : conjunction<is_swappable<T>, is_swappable_detail::is_nothrow_swappable_impl<T>> {};\n#endif // __TBB_CPP17_IS_SWAPPABLE_PRESENT\n\n//! Allows to store a function parameter pack as a variable and later pass it to another function\ntemplate< typename... Types >\nstruct stored_pack;\n\ntemplate<>\nstruct stored_pack<>\n{\n    using pack_type = stored_pack<>;\n    stored_pack() {}\n\n    // Friend front-end functions\n    template< typename F, typename Pack > friend void call(F&& f, Pack&& p);\n    template< typename Ret, typename F, typename Pack > friend Ret call_and_return(F&& f, Pack&& p);\n\nprotected:\n    // Ideally, ref-qualified non-static methods would be used,\n    // but that would greatly reduce the set of compilers where it works.\n    template< typename Ret, typename F, typename... Preceding >\n    static Ret call(F&& f, const pack_type& /*pack*/, Preceding&&... params) {\n        return std::forward<F>(f)(std::forward<Preceding>(params)...);\n    }\n    template< typename Ret, typename F, typename... Preceding >\n    static Ret call(F&& f, pack_type&& /*pack*/, Preceding&&... params) {\n        return std::forward<F>(f)(std::forward<Preceding>(params)...);\n    }\n};\n\ntemplate< typename T, typename... Types >\nstruct stored_pack<T, Types...> : stored_pack<Types...>\n{\n    using pack_type = stored_pack<T, Types...>;\n    using pack_remainder = stored_pack<Types...>;\n\n    // Since lifetime of original values is out of control, copies should be made.\n    // Thus references should be stripped away from the deduced type.\n    typename std::decay<T>::type leftmost_value;\n\n    // Here rvalue references act in the same way as forwarding references,\n    // as long as class template parameters were deduced via forwarding references.\n    stored_pack(T&& t, Types&&... types)\n    : pack_remainder(std::forward<Types>(types)...), leftmost_value(std::forward<T>(t)) {}\n\n    // Friend front-end functions\n    template< typename F, typename Pack > friend void call(F&& f, Pack&& p);\n    template< typename Ret, typename F, typename Pack > friend Ret call_and_return(F&& f, Pack&& p);\n\nprotected:\n    template< typename Ret, typename F, typename... Preceding >\n    static Ret call(F&& f, pack_type& pack, Preceding&&... params) {\n        return pack_remainder::template call<Ret>(\n            std::forward<F>(f), static_cast<pack_remainder&>(pack),\n            std::forward<Preceding>(params)... , pack.leftmost_value\n        );\n    }\n\n    template< typename Ret, typename F, typename... Preceding >\n    static Ret call(F&& f, pack_type&& pack, Preceding&&... params) {\n        return pack_remainder::template call<Ret>(\n            std::forward<F>(f), static_cast<pack_remainder&&>(pack),\n            std::forward<Preceding>(params)... , std::move(pack.leftmost_value)\n        );\n    }\n};\n\n//! Calls the given function with arguments taken from a stored_pack\ntemplate< typename F, typename Pack >\nvoid call(F&& f, Pack&& p) {\n    std::decay<Pack>::type::template call<void>(std::forward<F>(f), std::forward<Pack>(p));\n}\n\ntemplate< typename Ret, typename F, typename Pack >\nRet call_and_return(F&& f, Pack&& p) {\n    return std::decay<Pack>::type::template call<Ret>(std::forward<F>(f), std::forward<Pack>(p));\n}\n\ntemplate< typename... Types >\nstored_pack<Types...> save_pack(Types&&... types) {\n    return stored_pack<Types...>(std::forward<Types>(types)...);\n}\n\n// A structure with the value which is equal to Trait::value\n// but can be used in the immediate context due to parameter T\ntemplate <typename Trait, typename T>\nstruct dependent_bool : std::integral_constant<bool, bool(Trait::value)> {};\n\ntemplate <typename Callable>\nstruct body_arg_detector;\n\ntemplate <typename Callable, typename ReturnType, typename Arg>\nstruct body_arg_detector<ReturnType(Callable::*)(Arg)> {\n    using arg_type = Arg;\n};\n\ntemplate <typename Callable, typename ReturnType, typename Arg>\nstruct body_arg_detector<ReturnType(Callable::*)(Arg) const> {\n    using arg_type = Arg;\n};\n\ntemplate <typename Callable>\nstruct argument_detector;\n\ntemplate <typename Callable>\nstruct argument_detector {\n    using type = typename body_arg_detector<decltype(&Callable::operator())>::arg_type;\n};\n\ntemplate <typename ReturnType, typename Arg>\nstruct argument_detector<ReturnType(*)(Arg)> {\n    using type = Arg;\n};\n\n// Detects the argument type of callable, works for callable with one argument.\ntemplate <typename Callable>\nusing argument_type_of = typename argument_detector<typename std::decay<Callable>::type>::type;\n\ntemplate <typename T>\nstruct type_identity {\n    using type = T;\n};\n\ntemplate <typename T>\nusing type_identity_t = typename type_identity<T>::type;\n\n} // inline namespace d0\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_detail__template_helpers_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_utils.h",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_detail__utils_H\n#define __TBB_detail__utils_H\n\n#include <type_traits>\n#include <cstdint>\n#include <atomic>\n#include <functional>\n\n#include \"_config.h\"\n#include \"_assert.h\"\n#include \"_machine.h\"\n\nnamespace tbb {\nnamespace detail {\ninline namespace d0 {\n\n//! Utility template function to prevent \"unused\" warnings by various compilers.\ntemplate<typename... T> void suppress_unused_warning(T&&...) {}\n\n//! Compile-time constant that is upper bound on cache line/sector size.\n/** It should be used only in situations where having a compile-time upper\n  bound is more useful than a run-time exact answer.\n  @ingroup memory_allocation */\nconstexpr size_t max_nfs_size = 128;\nconstexpr std::size_t max_nfs_size_exp = 7;\nstatic_assert(1 << max_nfs_size_exp == max_nfs_size, \"max_nfs_size_exp must be a log2(max_nfs_size)\");\n\n//! Class that implements exponential backoff.\nclass atomic_backoff {\n    //! Time delay, in units of \"pause\" instructions.\n    /** Should be equal to approximately the number of \"pause\" instructions\n      that take the same time as an context switch. Must be a power of two.*/\n    static constexpr std::int32_t LOOPS_BEFORE_YIELD = 16;\n    std::int32_t count;\n\npublic:\n    // In many cases, an object of this type is initialized eagerly on hot path,\n    // as in for(atomic_backoff b; ; b.pause()) { /*loop body*/ }\n    // For this reason, the construction cost must be very small!\n    atomic_backoff() : count(1) {}\n    // This constructor pauses immediately; do not use on hot paths!\n    atomic_backoff(bool) : count(1) { pause(); }\n\n    //! No Copy\n    atomic_backoff(const atomic_backoff&) = delete;\n    atomic_backoff& operator=(const atomic_backoff&) = delete;\n\n    //! Pause for a while.\n    void pause() {\n        if (count <= LOOPS_BEFORE_YIELD) {\n            machine_pause(count);\n            // Pause twice as long the next time.\n            count *= 2;\n        } else {\n            // Pause is so long that we might as well yield CPU to scheduler.\n            yield();\n        }\n    }\n\n    //! Pause for a few times and return false if saturated.\n    bool bounded_pause() {\n        machine_pause(count);\n        if (count < LOOPS_BEFORE_YIELD) {\n            // Pause twice as long the next time.\n            count *= 2;\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    void reset() {\n        count = 1;\n    }\n};\n\n//! Spin WHILE the condition is true.\n/** T and U should be comparable types. */\ntemplate <typename T, typename C>\nT spin_wait_while(const std::atomic<T>& location, C comp, std::memory_order order) {\n    atomic_backoff backoff;\n    T snapshot = location.load(order);\n    while (comp(snapshot)) {\n        backoff.pause();\n        snapshot = location.load(order);\n    }\n    return snapshot;\n}\n\n//! Spin WHILE the value of the variable is equal to a given value\n/** T and U should be comparable types. */\ntemplate <typename T, typename U>\nT spin_wait_while_eq(const std::atomic<T>& location, const U value, std::memory_order order = std::memory_order_acquire) {\n    return spin_wait_while(location, [&value](T t) { return t == value; }, order);\n}\n\n//! Spin UNTIL the value of the variable is equal to a given value\n/** T and U should be comparable types. */\ntemplate<typename T, typename U>\nT spin_wait_until_eq(const std::atomic<T>& location, const U value, std::memory_order order = std::memory_order_acquire) {\n    return spin_wait_while(location, [&value](T t) { return t != value; }, order);\n}\n\n//! Spin UNTIL the condition returns true or spinning time is up.\n/** Returns what the passed functor returned last time it was invoked. */\ntemplate <typename Condition>\nbool timed_spin_wait_until(Condition condition) {\n    // 32 pauses + 32 yields are meausered as balanced spin time before sleep.\n    bool finish = condition();\n    for (int i = 1; !finish && i < 32; finish = condition(), i *= 2) {\n        machine_pause(i);\n    }\n    for (int i = 32; !finish && i < 64; finish = condition(), ++i) {\n        yield();\n    }\n    return finish;\n}\n\ntemplate <typename T>\nT clamp(T value, T lower_bound, T upper_bound) {\n    __TBB_ASSERT(lower_bound <= upper_bound, \"Incorrect bounds\");\n    return value > lower_bound ? (value > upper_bound ? upper_bound : value) : lower_bound;\n}\n\ntemplate <typename T>\nstd::uintptr_t log2(T in) {\n    __TBB_ASSERT(in > 0, \"The logarithm of a non-positive value is undefined.\");\n    return machine_log2(in);\n}\n\ntemplate<typename T>\nT reverse_bits(T src) {\n    return machine_reverse_bits(src);\n}\n\ntemplate<typename T>\nT reverse_n_bits(T src, std::size_t n) {\n    __TBB_ASSERT(n != 0, \"Reverse for 0 bits is undefined behavior.\");\n    return reverse_bits(src) >> (number_of_bits<T>() - n);\n}\n\n// A function to check if passed integer is a power of two\ntemplate <typename IntegerType>\nconstexpr bool is_power_of_two( IntegerType arg ) {\n    static_assert(std::is_integral<IntegerType>::value,\n                  \"An argument for is_power_of_two should be integral type\");\n    return arg && (0 == (arg & (arg - 1)));\n}\n\n// A function to determine if passed integer is a power of two\n// at least as big as another power of two, i.e. for strictly positive i and j,\n// with j being a power of two, determines whether i==j<<k for some nonnegative k\ntemplate <typename ArgIntegerType, typename DivisorIntegerType>\nconstexpr bool is_power_of_two_at_least(ArgIntegerType arg, DivisorIntegerType divisor) {\n    // Divisor should be a power of two\n    static_assert(std::is_integral<ArgIntegerType>::value,\n                  \"An argument for is_power_of_two_at_least should be integral type\");\n    return 0 == (arg & (arg - divisor));\n}\n\n// A function to compute arg modulo divisor where divisor is a power of 2.\ntemplate<typename ArgIntegerType, typename DivisorIntegerType>\ninline ArgIntegerType modulo_power_of_two(ArgIntegerType arg, DivisorIntegerType divisor) {\n    __TBB_ASSERT( is_power_of_two(divisor), \"Divisor should be a power of two\" );\n    return arg & (divisor - 1);\n}\n\n//! A function to check if passed in pointer is aligned on a specific border\ntemplate<typename T>\nconstexpr bool is_aligned(T* pointer, std::uintptr_t alignment) {\n    return 0 == (reinterpret_cast<std::uintptr_t>(pointer) & (alignment - 1));\n}\n\n#if TBB_USE_ASSERT\nstatic void* const poisoned_ptr = reinterpret_cast<void*>(-1);\n\n//! Set p to invalid pointer value.\ntemplate<typename T>\ninline void poison_pointer( T* &p ) { p = reinterpret_cast<T*>(poisoned_ptr); }\n\ntemplate<typename T>\ninline void poison_pointer(std::atomic<T*>& p) { p.store(reinterpret_cast<T*>(poisoned_ptr), std::memory_order_relaxed); }\n\n/** Expected to be used in assertions only, thus no empty form is defined. **/\ntemplate<typename T>\ninline bool is_poisoned( T* p ) { return p == reinterpret_cast<T*>(poisoned_ptr); }\n\ntemplate<typename T>\ninline bool is_poisoned(const std::atomic<T*>& p) { return is_poisoned(p.load(std::memory_order_relaxed)); }\n#else\ntemplate<typename T>\ninline void poison_pointer(T&) {/*do nothing*/}\n#endif /* !TBB_USE_ASSERT */\n\ntemplate <std::size_t alignment = 0, typename T>\nbool assert_pointer_valid(T* p, const char* comment = nullptr) {\n    suppress_unused_warning(p, comment);\n    __TBB_ASSERT(p != nullptr, comment);\n    __TBB_ASSERT(!is_poisoned(p), comment);\n#if !(_MSC_VER && _MSC_VER <= 1900 && !__INTEL_COMPILER)\n    __TBB_ASSERT(is_aligned(p, alignment == 0 ? alignof(T) : alignment), comment);\n#endif\n    // Returns something to simplify assert_pointers_valid implementation.\n    return true;\n}\n\ntemplate <typename... Args>\nvoid assert_pointers_valid(Args*... p) {\n    // suppress_unused_warning is used as an evaluation context for the variadic pack.\n    suppress_unused_warning(assert_pointer_valid(p)...);\n}\n\n//! Base class for types that should not be assigned.\nclass no_assign {\npublic:\n    void operator=(const no_assign&) = delete;\n    no_assign(const no_assign&) = default;\n    no_assign() = default;\n};\n\n//! Base class for types that should not be copied or assigned.\nclass no_copy: no_assign {\npublic:\n    no_copy(const no_copy&) = delete;\n    no_copy() = default;\n};\n\ntemplate <typename T>\nvoid swap_atomics_relaxed(std::atomic<T>& lhs, std::atomic<T>& rhs){\n    T tmp = lhs.load(std::memory_order_relaxed);\n    lhs.store(rhs.load(std::memory_order_relaxed), std::memory_order_relaxed);\n    rhs.store(tmp, std::memory_order_relaxed);\n}\n\n//! One-time initialization states\nenum class do_once_state {\n    uninitialized = 0,      ///< No execution attempts have been undertaken yet\n    pending,                ///< A thread is executing associated do-once routine\n    executed,               ///< Do-once routine has been executed\n    initialized = executed  ///< Convenience alias\n};\n\n//! One-time initialization function\n/** /param initializer Pointer to function without arguments\n           The variant that returns bool is used for cases when initialization can fail\n           and it is OK to continue execution, but the state should be reset so that\n           the initialization attempt was repeated the next time.\n    /param state Shared state associated with initializer that specifies its\n            initialization state. Must be initially set to #uninitialized value\n            (e.g. by means of default static zero initialization). **/\ntemplate <typename F>\nvoid atomic_do_once( const F& initializer, std::atomic<do_once_state>& state ) {\n    // The loop in the implementation is necessary to avoid race when thread T2\n    // that arrived in the middle of initialization attempt by another thread T1\n    // has just made initialization possible.\n    // In such a case T2 has to rely on T1 to initialize, but T1 may already be past\n    // the point where it can recognize the changed conditions.\n    do_once_state expected_state;\n    while ( state.load( std::memory_order_acquire ) != do_once_state::executed ) {\n        if( state.load( std::memory_order_relaxed ) == do_once_state::uninitialized ) {\n            expected_state = do_once_state::uninitialized;\n#if defined(__INTEL_COMPILER) && __INTEL_COMPILER <= 1910\n            using enum_type = typename std::underlying_type<do_once_state>::type;\n            if( ((std::atomic<enum_type>&)state).compare_exchange_strong( (enum_type&)expected_state, (enum_type)do_once_state::pending ) ) {\n#else\n            if( state.compare_exchange_strong( expected_state, do_once_state::pending ) ) {\n#endif\n                run_initializer( initializer, state );\n                break;\n            }\n        }\n        spin_wait_while_eq( state, do_once_state::pending );\n    }\n}\n\n// Run the initializer which can not fail\ntemplate<typename Functor>\nvoid run_initializer(const Functor& f, std::atomic<do_once_state>& state ) {\n    f();\n    state.store(do_once_state::executed, std::memory_order_release);\n}\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\ntemplate <typename T>\nconcept boolean_testable_impl = std::convertible_to<T, bool>;\n\ntemplate <typename T>\nconcept boolean_testable = boolean_testable_impl<T> && requires( T&& t ) {\n                               { !std::forward<T>(t) } -> boolean_testable_impl;\n                           };\n\n#if __TBB_CPP20_COMPARISONS_PRESENT\nstruct synthesized_three_way_comparator {\n    template <typename T1, typename T2>\n    auto operator()( const T1& lhs, const T2& rhs ) const\n        requires requires {\n            { lhs < rhs } -> boolean_testable;\n            { rhs < lhs } -> boolean_testable;\n        }\n    {\n        if constexpr (std::three_way_comparable_with<T1, T2>) {\n            return lhs <=> rhs;\n        } else {\n            if (lhs < rhs) {\n                return std::weak_ordering::less;\n            }\n            if (rhs < lhs) {\n                return std::weak_ordering::greater;\n            }\n            return std::weak_ordering::equivalent;\n        }\n    }\n}; // struct synthesized_three_way_comparator\n\ntemplate <typename T1, typename T2 = T1>\nusing synthesized_three_way_result = decltype(synthesized_three_way_comparator{}(std::declval<T1&>(),\n                                                                                 std::declval<T2&>()));\n\n#endif // __TBB_CPP20_COMPARISONS_PRESENT\n\n// Check if the type T is implicitly OR explicitly convertible to U\ntemplate <typename T, typename U>\nconcept relaxed_convertible_to = std::constructible_from<U, T>;\n\ntemplate <typename T, typename U>\nconcept adaptive_same_as =\n#if __TBB_STRICT_CONSTRAINTS\n    std::same_as<T, U>;\n#else\n    std::convertible_to<T, U>;\n#endif\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n\ntemplate <typename F, typename... Args>\nauto invoke(F&& f, Args&&... args)\n#if __TBB_CPP17_INVOKE_PRESENT\n    noexcept(std::is_nothrow_invocable_v<F, Args...>)\n    -> std::invoke_result_t<F, Args...>\n{\n    return std::invoke(std::forward<F>(f), std::forward<Args>(args)...);\n}\n#else // __TBB_CPP17_INVOKE_PRESENT\n    noexcept(noexcept(std::forward<F>(f)(std::forward<Args>(args)...)))\n    -> decltype(std::forward<F>(f)(std::forward<Args>(args)...))\n{\n    return std::forward<F>(f)(std::forward<Args>(args)...);\n}\n#endif // __TBB_CPP17_INVOKE_PRESENT\n\n} // namespace d0\n\nnamespace d1 {\n\nclass delegate_base {\npublic:\n    virtual bool operator()() const = 0;\n    virtual ~delegate_base() {}\n};\n\ntemplate <typename FuncType>\nclass delegated_function : public delegate_base {\npublic:\n    delegated_function(FuncType& f) : my_func(f) {}\n\n    bool operator()() const override {\n        return my_func();\n    }\n\nprivate:\n    FuncType &my_func;\n};\n} // namespace d1\n\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_detail__utils_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/detail/_waitable_atomic.h",
    "content": "/*\n    Copyright (c) 2021-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_detail__address_waiters_H\n#define __TBB_detail__address_waiters_H\n\n#include \"_utils.h\"\n\nnamespace tbb {\nnamespace detail {\n\nnamespace r1 {\nTBB_EXPORT void __TBB_EXPORTED_FUNC wait_on_address(void* address, d1::delegate_base& wakeup_condition, std::uintptr_t context);\nTBB_EXPORT void __TBB_EXPORTED_FUNC notify_by_address(void* address, std::uintptr_t context);\nTBB_EXPORT void __TBB_EXPORTED_FUNC notify_by_address_one(void* address);\nTBB_EXPORT void __TBB_EXPORTED_FUNC notify_by_address_all(void* address);\n} // namespace r1\n\nnamespace d1 {\n\ntemplate <typename Predicate>\nvoid adaptive_wait_on_address(void* address, Predicate wakeup_condition, std::uintptr_t context) {\n    if (!timed_spin_wait_until(wakeup_condition)) {\n        d1::delegated_function<Predicate> pred(wakeup_condition);\n        r1::wait_on_address(address, pred, context);\n    }\n}\n\ntemplate <typename T>\nclass waitable_atomic {\npublic:\n    waitable_atomic() = default;\n\n    explicit waitable_atomic(T value) : my_atomic(value) {}\n\n    waitable_atomic(const waitable_atomic&) = delete;\n    waitable_atomic& operator=(const waitable_atomic&) = delete;\n\n    T load(std::memory_order order) const noexcept {\n        return my_atomic.load(order);\n    }\n\n    T exchange(T desired) noexcept {\n        return my_atomic.exchange(desired);\n    }\n\n    void wait(T old, std::uintptr_t context, std::memory_order order) {\n        auto wakeup_condition = [&] { return my_atomic.load(order) != old; };\n        if (!timed_spin_wait_until(wakeup_condition)) {\n            // We need to use while here, because notify_all() will wake up all threads\n            // But predicate for them might be false\n            d1::delegated_function<decltype(wakeup_condition)> pred(wakeup_condition);\n            do {\n                r1::wait_on_address(this, pred, context);\n            } while (!wakeup_condition());\n        }\n    }\n\n    void notify_one_relaxed() {\n        r1::notify_by_address_one(this);\n    }\n\n    // TODO: consider adding following interfaces:\n    // store(desired, memory_order)\n    // notify_all_relaxed()\n    // wait_until(T, std::uintptr_t, std::memory_order)\n    // notify_relaxed(std::uintptr_t context)\n\nprivate:\n    std::atomic<T> my_atomic{};\n};\n\n} // namespace d1\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_detail__address_waiters_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/enumerable_thread_specific.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_enumerable_thread_specific_H\n#define __TBB_enumerable_thread_specific_H\n\n#include \"detail/_config.h\"\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_assert.h\"\n#include \"detail/_template_helpers.h\"\n#include \"detail/_aligned_space.h\"\n\n#include \"concurrent_vector.h\"\n#include \"tbb_allocator.h\"\n#include \"cache_aligned_allocator.h\"\n#include \"profiling.h\"\n\n#include <atomic>\n#include <thread>\n#include <cstring> // memcpy\n#include <cstddef> // std::ptrdiff_t\n\n#include \"task.h\" // for task::suspend_point\n\n#if _WIN32 || _WIN64\n#ifndef NOMINMAX\n#define NOMINMAX\n#define __TBB_DEFINED_NOMINMAX 1\n#endif\n#include <windows.h>\n#if __TBB_DEFINED_NOMINMAX\n#undef NOMINMAX\n#undef __TBB_DEFINED_NOMINMAX\n#endif\n#else\n#include <pthread.h>\n#endif\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n//! enum for selecting between single key and key-per-instance versions\nenum ets_key_usage_type {\n    ets_key_per_instance\n    , ets_no_key\n#if __TBB_RESUMABLE_TASKS\n    , ets_suspend_aware\n#endif\n};\n\n// Forward declaration to use in internal classes\ntemplate <typename T, typename Allocator, ets_key_usage_type ETS_key_type>\nclass enumerable_thread_specific;\n\ntemplate <std::size_t ThreadIDSize>\nstruct internal_ets_key_selector {\n    using key_type = std::thread::id;\n    static key_type current_key() {\n        return std::this_thread::get_id();\n    }\n};\n\n// Intel Compiler on OSX cannot create atomics objects that instantiated from non-fundamental types\n#if __INTEL_COMPILER && __APPLE__\ntemplate<>\nstruct internal_ets_key_selector<sizeof(std::size_t)> {\n    using key_type = std::size_t;\n    static key_type current_key() {\n        auto id = std::this_thread::get_id();\n        return reinterpret_cast<key_type&>(id);\n    }\n};\n#endif\n\ntemplate <ets_key_usage_type ETS_key_type>\nstruct ets_key_selector : internal_ets_key_selector<sizeof(std::thread::id)> {};\n\n#if __TBB_RESUMABLE_TASKS\ntemplate <>\nstruct ets_key_selector<ets_suspend_aware> {\n    using key_type = suspend_point;\n    static key_type current_key() {\n        return r1::current_suspend_point();\n    }\n};\n#endif\n\ntemplate<ets_key_usage_type ETS_key_type>\nclass ets_base : detail::no_copy {\nprotected:\n    using key_type = typename ets_key_selector<ETS_key_type>::key_type;\n\npublic:\n    struct slot;\n    struct array {\n        array* next;\n        std::size_t lg_size;\n        slot& at( std::size_t k ) {\n            return (reinterpret_cast<slot*>(reinterpret_cast<void*>(this+1)))[k];\n        }\n        std::size_t size() const { return std::size_t(1) << lg_size; }\n        std::size_t mask() const { return size() - 1; }\n        std::size_t start( std::size_t h ) const {\n            return h >> (8 * sizeof(std::size_t) - lg_size);\n        }\n    };\n    struct slot {\n        std::atomic<key_type> key;\n        void* ptr;\n        bool empty() const { return key.load(std::memory_order_relaxed) == key_type(); }\n        bool match( key_type k ) const { return key.load(std::memory_order_relaxed) == k; }\n        bool claim( key_type k ) {\n            // TODO: maybe claim ptr, because key_type is not guaranteed to fit into word size\n            key_type expected = key_type();\n            return key.compare_exchange_strong(expected, k);\n        }\n    };\n\nprotected:\n    //! Root of linked list of arrays of decreasing size.\n    /** nullptr if and only if my_count==0.\n        Each array in the list is half the size of its predecessor. */\n    std::atomic<array*> my_root;\n    std::atomic<std::size_t> my_count;\n\n    virtual void* create_local() = 0;\n    virtual void* create_array(std::size_t _size) = 0;  // _size in bytes\n    virtual void free_array(void* ptr, std::size_t _size) = 0; // _size in bytes\n\n    array* allocate( std::size_t lg_size ) {\n        std::size_t n = std::size_t(1) << lg_size;\n        array* a = static_cast<array*>(create_array(sizeof(array) + n * sizeof(slot)));\n        a->lg_size = lg_size;\n        std::memset( a + 1, 0, n * sizeof(slot) );\n        return a;\n    }\n    void deallocate(array* a) {\n        std::size_t n = std::size_t(1) << (a->lg_size);\n        free_array( static_cast<void*>(a), std::size_t(sizeof(array) + n * sizeof(slot)) );\n    }\n\n    ets_base() : my_root{nullptr}, my_count{0} {}\n    virtual ~ets_base();  // g++ complains if this is not virtual\n\n    void* table_lookup( bool& exists );\n    void  table_clear();\n    // The following functions are not used in concurrent context,\n    // so we don't need synchronization and ITT annotations there.\n    template <ets_key_usage_type E2>\n    void table_elementwise_copy( const ets_base& other,\n                                 void*(*add_element)(ets_base<E2>&, void*) ) {\n        __TBB_ASSERT(!my_root.load(std::memory_order_relaxed), nullptr);\n        __TBB_ASSERT(!my_count.load(std::memory_order_relaxed), nullptr);\n        if( !other.my_root.load(std::memory_order_relaxed) ) return;\n        array* root = allocate(other.my_root.load(std::memory_order_relaxed)->lg_size);\n        my_root.store(root, std::memory_order_relaxed);\n        root->next = nullptr;\n        my_count.store(other.my_count.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        std::size_t mask = root->mask();\n        for( array* r = other.my_root.load(std::memory_order_relaxed); r; r = r->next ) {\n            for( std::size_t i = 0; i < r->size(); ++i ) {\n                slot& s1 = r->at(i);\n                if( !s1.empty() ) {\n                    for( std::size_t j = root->start(std::hash<key_type>{}(s1.key.load(std::memory_order_relaxed))); ; j = (j+1)&mask ) {\n                        slot& s2 = root->at(j);\n                        if( s2.empty() ) {\n                            s2.ptr = add_element(static_cast<ets_base<E2>&>(*this), s1.ptr);\n                            s2.key.store(s1.key.load(std::memory_order_relaxed), std::memory_order_relaxed);\n                            break;\n                        }\n                        else if( s2.match(s1.key.load(std::memory_order_relaxed)) )\n                            break;\n                    }\n                }\n            }\n        }\n    }\n    void table_swap( ets_base& other ) {\n       __TBB_ASSERT(this!=&other, \"Don't swap an instance with itself\");\n       swap_atomics_relaxed(my_root, other.my_root);\n       swap_atomics_relaxed(my_count, other.my_count);\n    }\n};\n\ntemplate<ets_key_usage_type ETS_key_type>\nets_base<ETS_key_type>::~ets_base() {\n    __TBB_ASSERT(!my_root.load(std::memory_order_relaxed), nullptr);\n}\n\ntemplate<ets_key_usage_type ETS_key_type>\nvoid ets_base<ETS_key_type>::table_clear() {\n    while ( array* r = my_root.load(std::memory_order_relaxed) ) {\n        my_root.store(r->next, std::memory_order_relaxed);\n        deallocate(r);\n    }\n    my_count.store(0, std::memory_order_relaxed);\n}\n\ntemplate<ets_key_usage_type ETS_key_type>\nvoid* ets_base<ETS_key_type>::table_lookup( bool& exists ) {\n    const key_type k = ets_key_selector<ETS_key_type>::current_key();\n\n    __TBB_ASSERT(k != key_type(), nullptr);\n    void* found;\n    std::size_t h = std::hash<key_type>{}(k);\n    for( array* r = my_root.load(std::memory_order_acquire); r; r = r->next ) {\n        call_itt_notify(acquired,r);\n        std::size_t mask=r->mask();\n        for(std::size_t i = r->start(h); ;i=(i+1)&mask) {\n            slot& s = r->at(i);\n            if( s.empty() ) break;\n            if( s.match(k) ) {\n                if( r == my_root.load(std::memory_order_acquire) ) {\n                    // Success at top level\n                    exists = true;\n                    return s.ptr;\n                } else {\n                    // Success at some other level.  Need to insert at top level.\n                    exists = true;\n                    found = s.ptr;\n                    goto insert;\n                }\n            }\n        }\n    }\n    // Key does not yet exist.  The density of slots in the table does not exceed 0.5,\n    // for if this will occur a new table is allocated with double the current table\n    // size, which is swapped in as the new root table.  So an empty slot is guaranteed.\n    exists = false;\n    found = create_local();\n    {\n        std::size_t c = ++my_count;\n        array* r = my_root.load(std::memory_order_acquire);\n        call_itt_notify(acquired,r);\n        if( !r || c > r->size()/2 ) {\n            std::size_t s = r ? r->lg_size : 2;\n            while( c > std::size_t(1)<<(s-1) ) ++s;\n            array* a = allocate(s);\n            for(;;) {\n                a->next = r;\n                call_itt_notify(releasing,a);\n                array* new_r = r;\n                if( my_root.compare_exchange_strong(new_r, a) ) break;\n                call_itt_notify(acquired, new_r);\n                __TBB_ASSERT(new_r != nullptr, nullptr);\n                if( new_r->lg_size >= s ) {\n                    // Another thread inserted an equal or  bigger array, so our array is superfluous.\n                    deallocate(a);\n                    break;\n                }\n                r = new_r;\n            }\n        }\n    }\n    insert:\n    // Whether a slot has been found in an older table, or if it has been inserted at this level,\n    // it has already been accounted for in the total.  Guaranteed to be room for it, and it is\n    // not present, so search for empty slot and use it.\n    array* ir = my_root.load(std::memory_order_acquire);\n    call_itt_notify(acquired, ir);\n    std::size_t mask = ir->mask();\n    for(std::size_t i = ir->start(h);; i = (i+1)&mask) {\n        slot& s = ir->at(i);\n        if( s.empty() ) {\n            if( s.claim(k) ) {\n                s.ptr = found;\n                return found;\n            }\n        }\n    }\n}\n\n//! Specialization that exploits native TLS\ntemplate <>\nclass ets_base<ets_key_per_instance>: public ets_base<ets_no_key> {\n    using super = ets_base<ets_no_key>;\n#if _WIN32||_WIN64\n#if __TBB_WIN8UI_SUPPORT\n    using tls_key_t = DWORD;\n    void create_key() { my_key = FlsAlloc(nullptr); }\n    void destroy_key() { FlsFree(my_key); }\n    void set_tls(void * value) { FlsSetValue(my_key, (LPVOID)value); }\n    void* get_tls() { return (void *)FlsGetValue(my_key); }\n#else\n    using tls_key_t = DWORD;\n    void create_key() { my_key = TlsAlloc(); }\n    void destroy_key() { TlsFree(my_key); }\n    void set_tls(void * value) { TlsSetValue(my_key, (LPVOID)value); }\n    void* get_tls() { return (void *)TlsGetValue(my_key); }\n#endif\n#else\n    using tls_key_t = pthread_key_t;\n    void create_key() { pthread_key_create(&my_key, nullptr); }\n    void destroy_key() { pthread_key_delete(my_key); }\n    void set_tls( void * value ) const { pthread_setspecific(my_key, value); }\n    void* get_tls() const { return pthread_getspecific(my_key); }\n#endif\n    tls_key_t my_key;\n    virtual void* create_local() override = 0;\n    virtual void* create_array(std::size_t _size) override = 0;  // _size in bytes\n    virtual void free_array(void* ptr, std::size_t _size) override = 0; // size in bytes\nprotected:\n    ets_base() {create_key();}\n    ~ets_base() {destroy_key();}\n    void* table_lookup( bool& exists ) {\n        void* found = get_tls();\n        if( found ) {\n            exists=true;\n        } else {\n            found = super::table_lookup(exists);\n            set_tls(found);\n        }\n        return found;\n    }\n    void table_clear() {\n        destroy_key();\n        create_key();\n        super::table_clear();\n    }\n    void table_swap( ets_base& other ) {\n       using std::swap;\n       __TBB_ASSERT(this!=&other, \"Don't swap an instance with itself\");\n       swap(my_key, other.my_key);\n       super::table_swap(other);\n    }\n};\n\n//! Random access iterator for traversing the thread local copies.\ntemplate< typename Container, typename Value >\nclass enumerable_thread_specific_iterator\n{\n    //! current position in the concurrent_vector\n\n    Container *my_container;\n    typename Container::size_type my_index;\n    mutable Value *my_value;\n\n    template<typename C, typename T, typename U>\n    friend bool operator==( const enumerable_thread_specific_iterator<C, T>& i,\n                     const enumerable_thread_specific_iterator<C, U>& j );\n\n    template<typename C, typename T, typename U>\n    friend bool operator<( const enumerable_thread_specific_iterator<C,T>& i,\n                           const enumerable_thread_specific_iterator<C,U>& j );\n\n    template<typename C, typename T, typename U>\n    friend std::ptrdiff_t operator-( const enumerable_thread_specific_iterator<C,T>& i,\n                                const enumerable_thread_specific_iterator<C,U>& j );\n\n    template<typename C, typename U>\n    friend class enumerable_thread_specific_iterator;\n\npublic:\n    //! STL support\n    using difference_type = std::ptrdiff_t;\n    using value_type = Value;\n    using pointer = Value*;\n    using reference = Value&;\n    using iterator_category = std::random_access_iterator_tag;\n\n    enumerable_thread_specific_iterator( const Container &container, typename Container::size_type index ) :\n        my_container(&const_cast<Container &>(container)), my_index(index), my_value(nullptr) {}\n\n    //! Default constructor\n    enumerable_thread_specific_iterator() : my_container(nullptr), my_index(0), my_value(nullptr) {}\n\n    template<typename U>\n    enumerable_thread_specific_iterator( const enumerable_thread_specific_iterator<Container, U>& other ) :\n            my_container( other.my_container ), my_index( other.my_index), my_value( const_cast<Value *>(other.my_value) ) {}\n\n    enumerable_thread_specific_iterator operator+( std::ptrdiff_t offset ) const {\n        return enumerable_thread_specific_iterator(*my_container, my_index + offset);\n    }\n\n    friend enumerable_thread_specific_iterator operator+( std::ptrdiff_t offset, enumerable_thread_specific_iterator v ) {\n        return enumerable_thread_specific_iterator(*v.my_container, v.my_index + offset);\n    }\n\n    enumerable_thread_specific_iterator &operator+=( std::ptrdiff_t offset ) {\n        my_index += offset;\n        my_value = nullptr;\n        return *this;\n    }\n\n    enumerable_thread_specific_iterator operator-( std::ptrdiff_t offset ) const {\n        return enumerable_thread_specific_iterator( *my_container, my_index-offset );\n    }\n\n    enumerable_thread_specific_iterator &operator-=( std::ptrdiff_t offset ) {\n        my_index -= offset;\n        my_value = nullptr;\n        return *this;\n    }\n\n    Value& operator*() const {\n        Value* value = my_value;\n        if( !value ) {\n            value = my_value = (*my_container)[my_index].value();\n        }\n        __TBB_ASSERT( value==(*my_container)[my_index].value(), \"corrupt cache\" );\n        return *value;\n    }\n\n    Value& operator[]( std::ptrdiff_t k ) const {\n       return *(*my_container)[my_index + k].value();\n    }\n\n    Value* operator->() const {return &operator*();}\n\n    enumerable_thread_specific_iterator& operator++() {\n        ++my_index;\n        my_value = nullptr;\n        return *this;\n    }\n\n    enumerable_thread_specific_iterator& operator--() {\n        --my_index;\n        my_value = nullptr;\n        return *this;\n    }\n\n    //! Post increment\n    enumerable_thread_specific_iterator operator++(int) {\n        enumerable_thread_specific_iterator result = *this;\n        ++my_index;\n        my_value = nullptr;\n        return result;\n    }\n\n    //! Post decrement\n    enumerable_thread_specific_iterator operator--(int) {\n        enumerable_thread_specific_iterator result = *this;\n        --my_index;\n        my_value = nullptr;\n        return result;\n    }\n};\n\ntemplate<typename Container, typename T, typename U>\nbool operator==( const enumerable_thread_specific_iterator<Container, T>& i,\n                 const enumerable_thread_specific_iterator<Container, U>& j ) {\n    return i.my_index == j.my_index && i.my_container == j.my_container;\n}\n\ntemplate<typename Container, typename T, typename U>\nbool operator!=( const enumerable_thread_specific_iterator<Container,T>& i,\n                 const enumerable_thread_specific_iterator<Container,U>& j ) {\n    return !(i==j);\n}\n\ntemplate<typename Container, typename T, typename U>\nbool operator<( const enumerable_thread_specific_iterator<Container,T>& i,\n                const enumerable_thread_specific_iterator<Container,U>& j ) {\n    return i.my_index<j.my_index;\n}\n\ntemplate<typename Container, typename T, typename U>\nbool operator>( const enumerable_thread_specific_iterator<Container,T>& i,\n                const enumerable_thread_specific_iterator<Container,U>& j ) {\n    return j<i;\n}\n\ntemplate<typename Container, typename T, typename U>\nbool operator>=( const enumerable_thread_specific_iterator<Container,T>& i,\n                 const enumerable_thread_specific_iterator<Container,U>& j ) {\n    return !(i<j);\n}\n\ntemplate<typename Container, typename T, typename U>\nbool operator<=( const enumerable_thread_specific_iterator<Container,T>& i,\n                 const enumerable_thread_specific_iterator<Container,U>& j ) {\n    return !(j<i);\n}\n\ntemplate<typename Container, typename T, typename U>\nstd::ptrdiff_t operator-( const enumerable_thread_specific_iterator<Container,T>& i,\n                     const enumerable_thread_specific_iterator<Container,U>& j ) {\n    return i.my_index-j.my_index;\n}\n\ntemplate<typename SegmentedContainer, typename Value >\nclass segmented_iterator\n{\n    template<typename C, typename T, typename U>\n    friend bool operator==(const segmented_iterator<C,T>& i, const segmented_iterator<C,U>& j);\n\n    template<typename C, typename T, typename U>\n    friend bool operator!=(const segmented_iterator<C,T>& i, const segmented_iterator<C,U>& j);\n\n    template<typename C, typename U>\n    friend class segmented_iterator;\n\npublic:\n    segmented_iterator() {my_segcont = nullptr;}\n\n    segmented_iterator( const SegmentedContainer& _segmented_container ) :\n        my_segcont(const_cast<SegmentedContainer*>(&_segmented_container)),\n        outer_iter(my_segcont->end()) { }\n\n    ~segmented_iterator() {}\n\n    using InnerContainer = typename SegmentedContainer::value_type;\n    using inner_iterator = typename InnerContainer::iterator;\n    using outer_iterator = typename SegmentedContainer::iterator;\n\n    // STL support\n    // TODO: inherit all types from segmented container?\n    using difference_type = std::ptrdiff_t;\n    using value_type = Value;\n    using size_type = typename SegmentedContainer::size_type;\n    using pointer = Value*;\n    using reference = Value&;\n    using iterator_category = std::input_iterator_tag;\n\n    // Copy Constructor\n    template<typename U>\n    segmented_iterator(const segmented_iterator<SegmentedContainer, U>& other) :\n        my_segcont(other.my_segcont),\n        outer_iter(other.outer_iter),\n        // can we assign a default-constructed iterator to inner if we're at the end?\n        inner_iter(other.inner_iter)\n    {}\n\n    // assignment\n    template<typename U>\n    segmented_iterator& operator=( const segmented_iterator<SegmentedContainer, U>& other) {\n        my_segcont = other.my_segcont;\n        outer_iter = other.outer_iter;\n        if(outer_iter != my_segcont->end()) inner_iter = other.inner_iter;\n        return *this;\n    }\n\n    // allow assignment of outer iterator to segmented iterator.  Once it is\n    // assigned, move forward until a non-empty inner container is found or\n    // the end of the outer container is reached.\n    segmented_iterator& operator=(const outer_iterator& new_outer_iter) {\n        __TBB_ASSERT(my_segcont != nullptr, nullptr);\n        // check that this iterator points to something inside the segmented container\n        for(outer_iter = new_outer_iter ;outer_iter!=my_segcont->end(); ++outer_iter) {\n            if( !outer_iter->empty() ) {\n                inner_iter = outer_iter->begin();\n                break;\n            }\n        }\n        return *this;\n    }\n\n    // pre-increment\n    segmented_iterator& operator++() {\n        advance_me();\n        return *this;\n    }\n\n    // post-increment\n    segmented_iterator operator++(int) {\n        segmented_iterator tmp = *this;\n        operator++();\n        return tmp;\n    }\n\n    bool operator==(const outer_iterator& other_outer) const {\n        __TBB_ASSERT(my_segcont != nullptr, nullptr);\n        return (outer_iter == other_outer &&\n                (outer_iter == my_segcont->end() || inner_iter == outer_iter->begin()));\n    }\n\n    bool operator!=(const outer_iterator& other_outer) const {\n        return !operator==(other_outer);\n\n    }\n\n    // (i)* RHS\n    reference operator*() const {\n        __TBB_ASSERT(my_segcont != nullptr, nullptr);\n        __TBB_ASSERT(outer_iter != my_segcont->end(), \"Dereferencing a pointer at end of container\");\n        __TBB_ASSERT(inner_iter != outer_iter->end(), nullptr); // should never happen\n        return *inner_iter;\n    }\n\n    // i->\n    pointer operator->() const { return &operator*();}\n\nprivate:\n    SegmentedContainer* my_segcont;\n    outer_iterator outer_iter;\n    inner_iterator inner_iter;\n\n    void advance_me() {\n        __TBB_ASSERT(my_segcont != nullptr, nullptr);\n        __TBB_ASSERT(outer_iter != my_segcont->end(), nullptr); // not true if there are no inner containers\n        __TBB_ASSERT(inner_iter != outer_iter->end(), nullptr); // not true if the inner containers are all empty.\n        ++inner_iter;\n        while(inner_iter == outer_iter->end() && ++outer_iter != my_segcont->end()) {\n            inner_iter = outer_iter->begin();\n        }\n    }\n};    // segmented_iterator\n\ntemplate<typename SegmentedContainer, typename T, typename U>\nbool operator==( const segmented_iterator<SegmentedContainer,T>& i,\n                 const segmented_iterator<SegmentedContainer,U>& j ) {\n    if(i.my_segcont != j.my_segcont) return false;\n    if(i.my_segcont == nullptr) return true;\n    if(i.outer_iter != j.outer_iter) return false;\n    if(i.outer_iter == i.my_segcont->end()) return true;\n    return i.inner_iter == j.inner_iter;\n}\n\n// !=\ntemplate<typename SegmentedContainer, typename T, typename U>\nbool operator!=( const segmented_iterator<SegmentedContainer,T>& i,\n                 const segmented_iterator<SegmentedContainer,U>& j ) {\n    return !(i==j);\n}\n\ntemplate<typename T>\nstruct construct_by_default: no_assign {\n    void construct(void*where) {new(where) T();} // C++ note: the () in T() ensure zero initialization.\n    construct_by_default( int ) {}\n};\n\ntemplate<typename T>\nstruct construct_by_exemplar: no_assign {\n    const T exemplar;\n    void construct(void*where) {new(where) T(exemplar);}\n    construct_by_exemplar( const T& t ) : exemplar(t) {}\n    construct_by_exemplar( T&& t ) : exemplar(std::move(t)) {}\n};\n\ntemplate<typename T, typename Finit>\nstruct construct_by_finit: no_assign {\n    Finit f;\n    void construct(void* where) {new(where) T(f());}\n    construct_by_finit( Finit&& f_ ) : f(std::move(f_)) {}\n};\n\ntemplate<typename T, typename... P>\nstruct construct_by_args: no_assign {\n    stored_pack<P...> pack;\n    void construct(void* where) {\n        call( [where](const typename std::decay<P>::type&... args ){\n           new(where) T(args...);\n        }, pack );\n    }\n    construct_by_args( P&& ... args ) : pack(std::forward<P>(args)...) {}\n};\n\n// storage for initialization function pointer\n// TODO: consider removing the template parameter T here and in callback_leaf\nclass callback_base {\npublic:\n    // Clone *this\n    virtual callback_base* clone() const = 0;\n    // Destruct and free *this\n    virtual void destroy() = 0;\n    // Need virtual destructor to satisfy GCC compiler warning\n    virtual ~callback_base() { }\n    // Construct T at where\n    virtual void construct(void* where) = 0;\n};\n\ntemplate <typename Constructor>\nclass callback_leaf: public callback_base, Constructor {\n    template<typename... P> callback_leaf( P&& ... params ) : Constructor(std::forward<P>(params)...) {}\n    // TODO: make the construction/destruction consistent (use allocator.construct/destroy)\n    using my_allocator_type = typename tbb::tbb_allocator<callback_leaf>;\n\n    callback_base* clone() const override {\n        return make(*this);\n    }\n\n    void destroy() override {\n        my_allocator_type alloc;\n        tbb::detail::allocator_traits<my_allocator_type>::destroy(alloc, this);\n        tbb::detail::allocator_traits<my_allocator_type>::deallocate(alloc, this, 1);\n    }\n\n    void construct(void* where) override {\n        Constructor::construct(where);\n    }\n\npublic:\n    template<typename... P>\n    static callback_base* make( P&& ... params ) {\n        void* where = my_allocator_type().allocate(1);\n        return new(where) callback_leaf( std::forward<P>(params)... );\n    }\n};\n\n//! Template for recording construction of objects in table\n/** All maintenance of the space will be done explicitly on push_back,\n    and all thread local copies must be destroyed before the concurrent\n    vector is deleted.\n\n    The flag is_built is initialized to false.  When the local is\n    successfully-constructed, set the flag to true or call value_committed().\n    If the constructor throws, the flag will be false.\n*/\ntemplate<typename U>\nstruct ets_element {\n    detail::aligned_space<U> my_space;\n    bool is_built;\n    ets_element() { is_built = false; }  // not currently-built\n    U* value() { return my_space.begin(); }\n    U* value_committed() { is_built = true; return my_space.begin(); }\n    ~ets_element() {\n        if(is_built) {\n            my_space.begin()->~U();\n            is_built = false;\n        }\n    }\n};\n\n// A predicate that can be used for a compile-time compatibility check of ETS instances\n// Ideally, it should have been declared inside the ETS class, but unfortunately\n// in that case VS2013 does not enable the variadic constructor.\ntemplate<typename T, typename ETS> struct is_compatible_ets : std::false_type {};\ntemplate<typename T, typename U, typename A, ets_key_usage_type C>\nstruct is_compatible_ets< T, enumerable_thread_specific<U,A,C> > : std::is_same<T, U> {};\n\n// A predicate that checks whether, for a variable 'foo' of type T, foo() is a valid expression\ntemplate <typename T> using has_empty_braces_operator = decltype(std::declval<T>()());\ntemplate <typename T> using is_callable_no_args = supports<T, has_empty_braces_operator>;\n\n//! The enumerable_thread_specific container\n/** enumerable_thread_specific has the following properties:\n    - thread-local copies are lazily created, with default, exemplar or function initialization.\n    - thread-local copies do not move (during lifetime, and excepting clear()) so the address of a copy is invariant.\n    - the contained objects need not have operator=() defined if combine is not used.\n    - enumerable_thread_specific containers may be copy-constructed or assigned.\n    - thread-local copies can be managed by hash-table, or can be accessed via TLS storage for speed.\n    - outside of parallel contexts, the contents of all thread-local copies are accessible by iterator or using combine or combine_each methods\n\n@par Segmented iterator\n    When the thread-local objects are containers with input_iterators defined, a segmented iterator may\n    be used to iterate over all the elements of all thread-local copies.\n\n@par combine and combine_each\n    - Both methods are defined for enumerable_thread_specific.\n    - combine() requires the type T have operator=() defined.\n    - neither method modifies the contents of the object (though there is no guarantee that the applied methods do not modify the object.)\n    - Both are evaluated in serial context (the methods are assumed to be non-benign.)\n\n@ingroup containers */\ntemplate <typename T, typename Allocator=cache_aligned_allocator<T>,\n          ets_key_usage_type ETS_key_type=ets_no_key >\nclass enumerable_thread_specific: ets_base<ETS_key_type> {\n\n    template<typename U, typename A, ets_key_usage_type C> friend class enumerable_thread_specific;\n\n    using padded_element = padded<ets_element<T>>;\n\n    //! A generic range, used to create range objects from the iterators\n    template<typename I>\n    class generic_range_type: public blocked_range<I> {\n    public:\n        using value_type = T;\n        using reference = T&;\n        using const_reference = const T&;\n        using iterator = I;\n        using difference_type = std::ptrdiff_t;\n\n        generic_range_type( I begin_, I end_, std::size_t grainsize_ = 1) : blocked_range<I>(begin_,end_,grainsize_) {}\n        template<typename U>\n        generic_range_type( const generic_range_type<U>& r) : blocked_range<I>(r.begin(),r.end(),r.grainsize()) {}\n        generic_range_type( generic_range_type& r, split ) : blocked_range<I>(r,split()) {}\n    };\n\n    using allocator_traits_type = tbb::detail::allocator_traits<Allocator>;\n\n    using padded_allocator_type = typename allocator_traits_type::template rebind_alloc<padded_element>;\n    using internal_collection_type = tbb::concurrent_vector< padded_element, padded_allocator_type >;\n\n    callback_base *my_construct_callback;\n\n    internal_collection_type my_locals;\n\n    // TODO: consider unifying the callback mechanism for all create_local* methods below\n    //   (likely non-compatible and requires interface version increase)\n    void* create_local() override {\n        padded_element& lref = *my_locals.grow_by(1);\n        my_construct_callback->construct(lref.value());\n        return lref.value_committed();\n    }\n\n    static void* create_local_by_copy( ets_base<ETS_key_type>& base, void* p ) {\n        enumerable_thread_specific& ets = static_cast<enumerable_thread_specific&>(base);\n        padded_element& lref = *ets.my_locals.grow_by(1);\n        new(lref.value()) T(*static_cast<T*>(p));\n        return lref.value_committed();\n    }\n\n    static void* create_local_by_move( ets_base<ETS_key_type>& base, void* p ) {\n        enumerable_thread_specific& ets = static_cast<enumerable_thread_specific&>(base);\n        padded_element& lref = *ets.my_locals.grow_by(1);\n        new(lref.value()) T(std::move(*static_cast<T*>(p)));\n        return lref.value_committed();\n    }\n\n    using array_allocator_type = typename allocator_traits_type::template rebind_alloc<uintptr_t>;\n\n    // _size is in bytes\n    void* create_array(std::size_t _size) override {\n        std::size_t nelements = (_size + sizeof(uintptr_t) -1) / sizeof(uintptr_t);\n        return array_allocator_type().allocate(nelements);\n    }\n\n    void free_array( void* _ptr, std::size_t _size) override {\n        std::size_t nelements = (_size + sizeof(uintptr_t) -1) / sizeof(uintptr_t);\n        array_allocator_type().deallocate( reinterpret_cast<uintptr_t *>(_ptr),nelements);\n    }\n\npublic:\n\n    //! Basic types\n    using value_type = T;\n    using allocator_type = Allocator;\n    using size_type = typename internal_collection_type::size_type;\n    using difference_type = typename internal_collection_type::difference_type;\n    using reference = value_type&;\n    using const_reference = const value_type&;\n\n    using pointer = typename allocator_traits_type::pointer;\n    using const_pointer = typename allocator_traits_type::const_pointer;\n\n    // Iterator types\n    using iterator = enumerable_thread_specific_iterator<internal_collection_type, value_type>;\n    using const_iterator = enumerable_thread_specific_iterator<internal_collection_type, const value_type>;\n\n    // Parallel range types\n    using range_type = generic_range_type<iterator>;\n    using const_range_type = generic_range_type<const_iterator>;\n\n    //! Default constructor.  Each local instance of T is default constructed.\n    enumerable_thread_specific() : my_construct_callback(\n        callback_leaf<construct_by_default<T> >::make(/*dummy argument*/0)\n    ){}\n\n    //! Constructor with initializer functor. Each local instance of T is constructed by T(finit()).\n    template <typename Finit , typename = typename std::enable_if<is_callable_no_args<typename std::decay<Finit>::type>::value>::type>\n    explicit enumerable_thread_specific( Finit finit ) : my_construct_callback(\n        callback_leaf<construct_by_finit<T,Finit> >::make( std::move(finit) )\n    ){}\n\n    //! Constructor with exemplar. Each local instance of T is copy-constructed from the exemplar.\n    explicit enumerable_thread_specific( const T& exemplar ) : my_construct_callback(\n        callback_leaf<construct_by_exemplar<T> >::make( exemplar )\n    ){}\n\n    explicit enumerable_thread_specific( T&& exemplar ) : my_construct_callback(\n        callback_leaf<construct_by_exemplar<T> >::make( std::move(exemplar) )\n    ){}\n\n    //! Variadic constructor with initializer arguments.  Each local instance of T is constructed by T(args...)\n    template <typename P1, typename... P,\n              typename = typename std::enable_if<!is_callable_no_args<typename std::decay<P1>::type>::value\n                                                      && !is_compatible_ets<T, typename std::decay<P1>::type>::value\n                                                      && !std::is_same<T, typename std::decay<P1>::type>::value\n                                                     >::type>\n    enumerable_thread_specific( P1&& arg1, P&& ... args ) : my_construct_callback(\n        callback_leaf<construct_by_args<T,P1,P...> >::make( std::forward<P1>(arg1), std::forward<P>(args)... )\n    ){}\n\n    //! Destructor\n    ~enumerable_thread_specific() {\n        if(my_construct_callback) my_construct_callback->destroy();\n        // Deallocate the hash table before overridden free_array() becomes inaccessible\n        this->ets_base<ETS_key_type>::table_clear();\n    }\n\n    //! returns reference to local, discarding exists\n    reference local() {\n        bool exists;\n        return local(exists);\n    }\n\n    //! Returns reference to calling thread's local copy, creating one if necessary\n    reference local(bool& exists)  {\n        void* ptr = this->table_lookup(exists);\n        return *(T*)ptr;\n    }\n\n    //! Get the number of local copies\n    size_type size() const { return my_locals.size(); }\n\n    //! true if there have been no local copies created\n    bool empty() const { return my_locals.empty(); }\n\n    //! begin iterator\n    iterator begin() { return iterator( my_locals, 0 ); }\n    //! end iterator\n    iterator end() { return iterator(my_locals, my_locals.size() ); }\n\n    //! begin const iterator\n    const_iterator begin() const { return const_iterator(my_locals, 0); }\n\n    //! end const iterator\n    const_iterator end() const { return const_iterator(my_locals, my_locals.size()); }\n\n    //! Get range for parallel algorithms\n    range_type range( std::size_t grainsize=1 ) { return range_type( begin(), end(), grainsize ); }\n\n    //! Get const range for parallel algorithms\n    const_range_type range( std::size_t grainsize=1 ) const { return const_range_type( begin(), end(), grainsize ); }\n\n    //! Destroys local copies\n    void clear() {\n        my_locals.clear();\n        this->table_clear();\n        // callback is not destroyed\n    }\n\nprivate:\n    template<typename A2, ets_key_usage_type C2>\n    void internal_copy(const enumerable_thread_specific<T, A2, C2>& other) {\n        // this tests is_compatible_ets\n        static_assert( (is_compatible_ets<T, typename std::decay<decltype(other)>::type>::value), \"is_compatible_ets fails\" );\n        // Initialize my_construct_callback first, so that it is valid even if rest of this routine throws an exception.\n        my_construct_callback = other.my_construct_callback->clone();\n        __TBB_ASSERT(my_locals.size()==0, nullptr);\n        my_locals.reserve(other.size());\n        this->table_elementwise_copy( other, create_local_by_copy );\n    }\n\n    void internal_swap(enumerable_thread_specific& other) {\n        using std::swap;\n        __TBB_ASSERT( this!=&other, nullptr);\n        swap(my_construct_callback, other.my_construct_callback);\n        // concurrent_vector::swap() preserves storage space,\n        // so addresses to the vector kept in ETS hash table remain valid.\n        swap(my_locals, other.my_locals);\n        this->ets_base<ETS_key_type>::table_swap(other);\n    }\n\n    template<typename A2, ets_key_usage_type C2>\n    void internal_move(enumerable_thread_specific<T, A2, C2>&& other) {\n        static_assert( (is_compatible_ets<T, typename std::decay<decltype(other)>::type>::value), \"is_compatible_ets fails\" );\n        my_construct_callback = other.my_construct_callback;\n        other.my_construct_callback = nullptr;\n        __TBB_ASSERT(my_locals.size()==0, nullptr);\n        my_locals.reserve(other.size());\n        this->table_elementwise_copy( other, create_local_by_move );\n    }\n\npublic:\n    enumerable_thread_specific( const enumerable_thread_specific& other )\n    : ets_base<ETS_key_type>() /* prevents GCC warnings with -Wextra */\n    {\n        internal_copy(other);\n    }\n\n    template<typename Alloc, ets_key_usage_type Cachetype>\n    enumerable_thread_specific( const enumerable_thread_specific<T, Alloc, Cachetype>& other )\n    {\n        internal_copy(other);\n    }\n\n    enumerable_thread_specific( enumerable_thread_specific&& other ) : my_construct_callback()\n    {\n        // TODO: use internal_move correctly here\n        internal_swap(other);\n    }\n\n    template<typename Alloc, ets_key_usage_type Cachetype>\n    enumerable_thread_specific( enumerable_thread_specific<T, Alloc, Cachetype>&& other ) : my_construct_callback()\n    {\n        internal_move(std::move(other));\n    }\n\n    enumerable_thread_specific& operator=( const enumerable_thread_specific& other )\n    {\n        if( this != &other ) {\n            this->clear();\n            my_construct_callback->destroy();\n            internal_copy( other );\n        }\n        return *this;\n    }\n\n    template<typename Alloc, ets_key_usage_type Cachetype>\n    enumerable_thread_specific& operator=( const enumerable_thread_specific<T, Alloc, Cachetype>& other )\n    {\n        __TBB_ASSERT( static_cast<void*>(this)!=static_cast<const void*>(&other), nullptr); // Objects of different types\n        this->clear();\n        my_construct_callback->destroy();\n        internal_copy(other);\n        return *this;\n    }\n\n    enumerable_thread_specific& operator=( enumerable_thread_specific&& other )\n    {\n        if( this != &other ) {\n            // TODO: use internal_move correctly here\n            internal_swap(other);\n        }\n        return *this;\n    }\n\n    template<typename Alloc, ets_key_usage_type Cachetype>\n    enumerable_thread_specific& operator=( enumerable_thread_specific<T, Alloc, Cachetype>&& other )\n    {\n        __TBB_ASSERT( static_cast<void*>(this)!=static_cast<const void*>(&other), nullptr); // Objects of different types\n        this->clear();\n        my_construct_callback->destroy();\n        internal_move(std::move(other));\n        return *this;\n    }\n\n    // CombineFunc has signature T(T,T) or T(const T&, const T&)\n    template <typename CombineFunc>\n    T combine(CombineFunc f_combine) {\n        if(begin() == end()) {\n            ets_element<T> location;\n            my_construct_callback->construct(location.value());\n            return *location.value_committed();\n        }\n        const_iterator ci = begin();\n        T my_result = *ci;\n        while(++ci != end())\n            my_result = f_combine( my_result, *ci );\n        return my_result;\n    }\n\n    // combine_func_t takes T by value or by [const] reference, and returns nothing\n    template <typename CombineFunc>\n    void combine_each(CombineFunc f_combine) {\n        for(iterator ci = begin(); ci != end(); ++ci) {\n            f_combine( *ci );\n        }\n    }\n\n}; // enumerable_thread_specific\n\ntemplate< typename Container >\nclass flattened2d {\n    // This intermediate typedef is to address issues with VC7.1 compilers\n    using conval_type = typename Container::value_type;\n\npublic:\n    //! Basic types\n    using size_type = typename conval_type::size_type;\n    using difference_type = typename conval_type::difference_type;\n    using allocator_type = typename conval_type::allocator_type;\n    using value_type = typename conval_type::value_type;\n    using reference = typename conval_type::reference;\n    using const_reference = typename conval_type::const_reference;\n    using pointer = typename conval_type::pointer;\n    using const_pointer = typename conval_type::const_pointer;\n\n    using iterator = segmented_iterator<Container, value_type>;\n    using const_iterator = segmented_iterator<Container, const value_type>;\n\n    flattened2d( const Container &c, typename Container::const_iterator b, typename Container::const_iterator e ) :\n        my_container(const_cast<Container*>(&c)), my_begin(b), my_end(e) { }\n\n    explicit flattened2d( const Container &c ) :\n        my_container(const_cast<Container*>(&c)), my_begin(c.begin()), my_end(c.end()) { }\n\n    iterator begin() { return iterator(*my_container) = my_begin; }\n    iterator end() { return iterator(*my_container) = my_end; }\n    const_iterator begin() const { return const_iterator(*my_container) = my_begin; }\n    const_iterator end() const { return const_iterator(*my_container) = my_end; }\n\n    size_type size() const {\n        size_type tot_size = 0;\n        for(typename Container::const_iterator i = my_begin; i != my_end; ++i) {\n            tot_size += i->size();\n        }\n        return tot_size;\n    }\n\nprivate:\n    Container *my_container;\n    typename Container::const_iterator my_begin;\n    typename Container::const_iterator my_end;\n};\n\ntemplate <typename Container>\nflattened2d<Container> flatten2d(const Container &c, const typename Container::const_iterator b, const typename Container::const_iterator e) {\n    return flattened2d<Container>(c, b, e);\n}\n\ntemplate <typename Container>\nflattened2d<Container> flatten2d(const Container &c) {\n    return flattened2d<Container>(c);\n}\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::enumerable_thread_specific;\nusing detail::d1::flattened2d;\nusing detail::d1::flatten2d;\n// ets enum keys\nusing detail::d1::ets_key_usage_type;\nusing detail::d1::ets_key_per_instance;\nusing detail::d1::ets_no_key;\n#if __TBB_RESUMABLE_TASKS\nusing detail::d1::ets_suspend_aware;\n#endif\n} // inline namespace v1\n\n} // namespace tbb\n\n#endif // __TBB_enumerable_thread_specific_H\n\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/flow_graph.h",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_flow_graph_H\n#define __TBB_flow_graph_H\n\n#include <atomic>\n#include <memory>\n#include <type_traits>\n\n#include \"detail/_config.h\"\n#include \"detail/_namespace_injection.h\"\n#include \"spin_mutex.h\"\n#include \"null_mutex.h\"\n#include \"spin_rw_mutex.h\"\n#include \"null_rw_mutex.h\"\n#include \"detail/_pipeline_filters.h\"\n#include \"detail/_task.h\"\n#include \"detail/_small_object_pool.h\"\n#include \"cache_aligned_allocator.h\"\n#include \"detail/_exception.h\"\n#include \"detail/_template_helpers.h\"\n#include \"detail/_aggregator.h\"\n#include \"detail/_allocator_traits.h\"\n#include \"detail/_utils.h\"\n#include \"profiling.h\"\n#include \"task_arena.h\"\n\n#if TBB_USE_PROFILING_TOOLS && ( __unix__ || __APPLE__ )\n   #if __INTEL_COMPILER\n       // Disabled warning \"routine is both inline and noinline\"\n       #pragma warning (push)\n       #pragma warning( disable: 2196 )\n   #endif\n   #define __TBB_NOINLINE_SYM __attribute__((noinline))\n#else\n   #define __TBB_NOINLINE_SYM\n#endif\n\n#include <tuple>\n#include <list>\n#include <forward_list>\n#include <queue>\n#if __TBB_CPP20_CONCEPTS_PRESENT\n#include <concepts>\n#endif\n\n/** @file\n  \\brief The graph related classes and functions\n\n  There are some applications that best express dependencies as messages\n  passed between nodes in a graph.  These messages may contain data or\n  simply act as signals that a predecessors has completed. The graph\n  class and its associated node classes can be used to express such\n  applications.\n*/\n\nnamespace tbb {\nnamespace detail {\n\nnamespace d2 {\n\n//! An enumeration the provides the two most common concurrency levels: unlimited and serial\nenum concurrency { unlimited = 0, serial = 1 };\n\n//! A generic null type\nstruct null_type {};\n\n//! An empty class used for messages that mean \"I'm done\"\nclass continue_msg {};\n\n} // namespace d2\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\ninline namespace d0 {\n\ntemplate <typename ReturnType, typename OutputType>\nconcept node_body_return_type = std::same_as<OutputType, tbb::detail::d2::continue_msg> ||\n                                std::convertible_to<OutputType, ReturnType>;\n\n// TODO: consider using std::invocable here\ntemplate <typename Body, typename Output>\nconcept continue_node_body = std::copy_constructible<Body> &&\n                             requires( Body& body, const tbb::detail::d2::continue_msg& v ) {\n                                 { body(v) } -> node_body_return_type<Output>;\n                             };\n\ntemplate <typename Body, typename Input, typename Output>\nconcept function_node_body = std::copy_constructible<Body> &&\n                             std::invocable<Body&, const Input&> &&\n                             node_body_return_type<std::invoke_result_t<Body&, const Input&>, Output>;\n\ntemplate <typename FunctionObject, typename Input, typename Key>\nconcept join_node_function_object = std::copy_constructible<FunctionObject> &&\n                                    std::invocable<FunctionObject&, const Input&> &&\n                                    std::convertible_to<std::invoke_result_t<FunctionObject&, const Input&>, Key>;\n\ntemplate <typename Body, typename Output>\nconcept input_node_body = std::copy_constructible<Body> &&\n                          requires( Body& body, tbb::detail::d1::flow_control& fc ) {\n                              { body(fc) } -> adaptive_same_as<Output>;\n                          };\n\ntemplate <typename Body, typename Input, typename OutputPortsType>\nconcept multifunction_node_body = std::copy_constructible<Body> &&\n                                  std::invocable<Body&, const Input&, OutputPortsType&>;\n\ntemplate <typename Sequencer, typename Value>\nconcept sequencer = std::copy_constructible<Sequencer> &&\n                    std::invocable<Sequencer&, const Value&> &&\n                    std::convertible_to<std::invoke_result_t<Sequencer&, const Value&>, std::size_t>;\n\ntemplate <typename Body, typename Input, typename GatewayType>\nconcept async_node_body = std::copy_constructible<Body> &&\n                          std::invocable<Body&, const Input&, GatewayType&>;\n\n} // inline namespace d0\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n\nnamespace d2 {\n\n//! Forward declaration section\ntemplate< typename T > class sender;\ntemplate< typename T > class receiver;\nclass continue_receiver;\n\ntemplate< typename T, typename U > class limiter_node;  // needed for resetting decrementer\n\ntemplate<typename T, typename M> class successor_cache;\ntemplate<typename T, typename M> class broadcast_cache;\ntemplate<typename T, typename M> class round_robin_cache;\ntemplate<typename T, typename M> class predecessor_cache;\ntemplate<typename T, typename M> class reservable_predecessor_cache;\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\nnamespace order {\nstruct following;\nstruct preceding;\n}\ntemplate<typename Order, typename... Args> struct node_set;\n#endif\n\n\n} // namespace d2\n} // namespace detail\n} // namespace tbb\n\n//! The graph class\n#include \"detail/_flow_graph_impl.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace d2 {\n\nstatic inline std::pair<graph_task*, graph_task*> order_tasks(graph_task* first, graph_task* second) {\n    if (second->priority > first->priority)\n        return std::make_pair(second, first);\n    return std::make_pair(first, second);\n}\n\n// submit task if necessary. Returns the non-enqueued task if there is one.\nstatic inline graph_task* combine_tasks(graph& g, graph_task* left, graph_task* right) {\n    // if no RHS task, don't change left.\n    if (right == nullptr) return left;\n    // right != nullptr\n    if (left == nullptr) return right;\n    if (left == SUCCESSFULLY_ENQUEUED) return right;\n    // left contains a task\n    if (right != SUCCESSFULLY_ENQUEUED) {\n        // both are valid tasks\n        auto tasks_pair = order_tasks(left, right);\n        spawn_in_graph_arena(g, *tasks_pair.first);\n        return tasks_pair.second;\n    }\n    return left;\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\nclass message_metainfo {\npublic:\n    using waiters_type = std::forward_list<d1::wait_context_vertex*>;\n\n    message_metainfo() = default;\n\n    message_metainfo(const waiters_type& waiters) : my_waiters(waiters) {}\n    message_metainfo(waiters_type&& waiters) : my_waiters(std::move(waiters)) {}\n\n    const waiters_type& waiters() const & { return my_waiters; }\n    waiters_type&& waiters() && { return std::move(my_waiters); }\n\n    bool empty() const { return my_waiters.empty(); }\n\n    void merge(const message_metainfo& other) {\n        // TODO: should we avoid duplications on merging\n        my_waiters.insert_after(my_waiters.before_begin(),\n                                other.waiters().begin(),\n                                other.waiters().end());\n    }\nprivate:\n    waiters_type my_waiters;\n}; // class message_metainfo\n\n#define __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo) , metainfo\n\n#else\n#define __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo)\n#endif // __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n\n//! Pure virtual template class that defines a sender of messages of type T\ntemplate< typename T >\nclass sender {\npublic:\n    virtual ~sender() {}\n\n    //! Request an item from the sender\n    virtual bool try_get( T & ) { return false; }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    virtual bool try_get( T &, message_metainfo& ) { return false; }\n#endif\n\n    //! Reserves an item in the sender\n    virtual bool try_reserve( T & ) { return false; }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    virtual bool try_reserve( T &, message_metainfo& ) { return false; }\n#endif\n\n    //! Releases the reserved item\n    virtual bool try_release( ) { return false; }\n\n    //! Consumes the reserved item\n    virtual bool try_consume( ) { return false; }\n\nprotected:\n    //! The output type of this sender\n    typedef T output_type;\n\n    //! The successor type for this node\n    typedef receiver<T> successor_type;\n\n    //! Add a new successor to this node\n    virtual bool register_successor( successor_type &r ) = 0;\n\n    //! Removes a successor from this node\n    virtual bool remove_successor( successor_type &r ) = 0;\n\n    template<typename C>\n    friend bool register_successor(sender<C>& s, receiver<C>& r);\n\n    template<typename C>\n    friend bool remove_successor  (sender<C>& s, receiver<C>& r);\n};  // class sender<T>\n\ntemplate<typename C>\nbool register_successor(sender<C>& s, receiver<C>& r) {\n    return s.register_successor(r);\n}\n\ntemplate<typename C>\nbool remove_successor(sender<C>& s, receiver<C>& r) {\n    return s.remove_successor(r);\n}\n\n//! Pure virtual template class that defines a receiver of messages of type T\ntemplate< typename T >\nclass receiver {\nprivate:\n    template <typename... TryPutTaskArgs>\n    bool internal_try_put(const T& t, TryPutTaskArgs&&... args) {\n        graph_task* res = try_put_task(t, std::forward<TryPutTaskArgs>(args)...);\n        if (!res) return false;\n        if (res != SUCCESSFULLY_ENQUEUED) spawn_in_graph_arena(graph_reference(), *res);\n        return true;\n    }\n\npublic:\n    //! Destructor\n    virtual ~receiver() {}\n\n    //! Put an item to the receiver\n    bool try_put( const T& t ) {\n        return internal_try_put(t);\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    //! Put an item to the receiver and wait for completion\n    bool try_put_and_wait( const T& t ) {\n        // Since try_put_and_wait is a blocking call, it is safe to create wait_context on stack\n        d1::wait_context_vertex msg_wait_vertex{};\n\n        bool res = internal_try_put(t, message_metainfo{message_metainfo::waiters_type{&msg_wait_vertex}});\n        if (res) {\n            __TBB_ASSERT(graph_reference().my_context != nullptr, \"No wait_context associated with the Flow Graph\");\n            d1::wait(msg_wait_vertex.get_context(), *graph_reference().my_context);\n        }\n        return res;\n    }\n#endif\n\n    //! put item to successor; return task to run the successor if possible.\nprotected:\n    //! The input type of this receiver\n    typedef T input_type;\n\n    //! The predecessor type for this node\n    typedef sender<T> predecessor_type;\n\n    template< typename R, typename B > friend class run_and_put_task;\n    template< typename X, typename Y > friend class broadcast_cache;\n    template< typename X, typename Y > friend class round_robin_cache;\n    virtual graph_task *try_put_task(const T& t) = 0;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    virtual graph_task *try_put_task(const T& t, const message_metainfo&) = 0;\n#endif\n    virtual graph& graph_reference() const = 0;\n\n    template<typename TT, typename M> friend class successor_cache;\n    virtual bool is_continue_receiver() { return false; }\n\n    // TODO revamp: reconsider the inheritance and move node priority out of receiver\n    virtual node_priority_t priority() const { return no_priority; }\n\n    //! Add a predecessor to the node\n    virtual bool register_predecessor( predecessor_type & ) { return false; }\n\n    //! Remove a predecessor from the node\n    virtual bool remove_predecessor( predecessor_type & ) { return false; }\n\n    template <typename C>\n    friend bool register_predecessor(receiver<C>& r, sender<C>& s);\n    template <typename C>\n    friend bool remove_predecessor  (receiver<C>& r, sender<C>& s);\n}; // class receiver<T>\n\ntemplate <typename C>\nbool register_predecessor(receiver<C>& r, sender<C>& s) {\n    return r.register_predecessor(s);\n}\n\ntemplate <typename C>\nbool remove_predecessor(receiver<C>& r, sender<C>& s) {\n    return r.remove_predecessor(s);\n}\n\n//! Base class for receivers of completion messages\n/** These receivers automatically reset, but cannot be explicitly waited on */\nclass continue_receiver : public receiver< continue_msg > {\nprotected:\n\n    //! Constructor\n    explicit continue_receiver( int number_of_predecessors, node_priority_t a_priority ) {\n        my_predecessor_count = my_initial_predecessor_count = number_of_predecessors;\n        my_current_count = 0;\n        my_priority = a_priority;\n    }\n\n    //! Copy constructor\n    continue_receiver( const continue_receiver& src ) : receiver<continue_msg>() {\n        my_predecessor_count = my_initial_predecessor_count = src.my_initial_predecessor_count;\n        my_current_count = 0;\n        my_priority = src.my_priority;\n    }\n\n    //! Increments the trigger threshold\n    bool register_predecessor( predecessor_type & ) override {\n        spin_mutex::scoped_lock l(my_mutex);\n        ++my_predecessor_count;\n        return true;\n    }\n\n    //! Decrements the trigger threshold\n    /** Does not check to see if the removal of the predecessor now makes the current count\n        exceed the new threshold.  So removing a predecessor while the graph is active can cause\n        unexpected results. */\n    bool remove_predecessor( predecessor_type & ) override {\n        spin_mutex::scoped_lock l(my_mutex);\n        --my_predecessor_count;\n        return true;\n    }\n\n    //! The input type\n    typedef continue_msg input_type;\n\n    //! The predecessor type for this node\n    typedef receiver<input_type>::predecessor_type predecessor_type;\n\n    template< typename R, typename B > friend class run_and_put_task;\n    template<typename X, typename Y> friend class broadcast_cache;\n    template<typename X, typename Y> friend class round_robin_cache;\n\nprivate:\n    // execute body is supposed to be too small to create a task for.\n    graph_task* try_put_task_impl( const input_type& __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo) ) {\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        message_metainfo predecessor_metainfo;\n#endif\n        {\n            spin_mutex::scoped_lock l(my_mutex);\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            // Prolong the wait and store the metainfo until receiving signals from all the predecessors\n            for (auto waiter : metainfo.waiters()) {\n                waiter->reserve(1);\n            }\n            my_current_metainfo.merge(metainfo);\n#endif\n            if ( ++my_current_count < my_predecessor_count )\n                return SUCCESSFULLY_ENQUEUED;\n            else {\n                my_current_count = 0;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n                predecessor_metainfo = my_current_metainfo;\n                my_current_metainfo = message_metainfo{};\n#endif\n            }\n        }\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        graph_task* res = execute(predecessor_metainfo);\n        for (auto waiter : predecessor_metainfo.waiters()) {\n            waiter->release(1);\n        }\n#else\n        graph_task* res = execute();\n#endif\n        return res? res : SUCCESSFULLY_ENQUEUED;\n    }\n\nprotected:\n    graph_task* try_put_task( const input_type& input ) override {\n        return try_put_task_impl(input __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo{}));\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    graph_task* try_put_task( const input_type& input, const message_metainfo& metainfo ) override {\n        return try_put_task_impl(input, metainfo);\n    }\n#endif\n\n    spin_mutex my_mutex;\n    int my_predecessor_count;\n    int my_current_count;\n    int my_initial_predecessor_count;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    message_metainfo my_current_metainfo;\n#endif\n    node_priority_t my_priority;\n    // the friend declaration in the base class did not eliminate the \"protected class\"\n    // error in gcc 4.1.2\n    template<typename U, typename V> friend class limiter_node;\n\n    virtual void reset_receiver( reset_flags f ) {\n        my_current_count = 0;\n        if (f & rf_clear_edges) {\n            my_predecessor_count = my_initial_predecessor_count;\n        }\n    }\n\n    //! Does whatever should happen when the threshold is reached\n    /** This should be very fast or else spawn a task.  This is\n        called while the sender is blocked in the try_put(). */\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    virtual graph_task* execute(const message_metainfo& metainfo) = 0;\n#else\n    virtual graph_task* execute() = 0;\n#endif\n    template<typename TT, typename M> friend class successor_cache;\n    bool is_continue_receiver() override { return true; }\n\n    node_priority_t priority() const override { return my_priority; }\n}; // class continue_receiver\n\n#if __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING\n    template <typename K, typename T>\n    K key_from_message( const T &t ) {\n        return t.key();\n    }\n#endif /* __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING */\n\n} // d1\n} // detail\n} // tbb\n\n#include \"detail/_flow_graph_trace_impl.h\"\n#include \"detail/_hash_compare.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace d2 {\n\n#include \"detail/_flow_graph_body_impl.h\"\n#include \"detail/_flow_graph_cache_impl.h\"\n#include \"detail/_flow_graph_types_impl.h\"\n\nusing namespace graph_policy_namespace;\n\ntemplate <typename C, typename N>\ngraph_iterator<C,N>::graph_iterator(C *g, bool begin) : my_graph(g), current_node(nullptr)\n{\n    if (begin) current_node = my_graph->my_nodes;\n    //else it is an end iterator by default\n}\n\ntemplate <typename C, typename N>\ntypename graph_iterator<C,N>::reference graph_iterator<C,N>::operator*() const {\n    __TBB_ASSERT(current_node, \"graph_iterator at end\");\n    return *operator->();\n}\n\ntemplate <typename C, typename N>\ntypename graph_iterator<C,N>::pointer graph_iterator<C,N>::operator->() const {\n    return current_node;\n}\n\ntemplate <typename C, typename N>\nvoid graph_iterator<C,N>::internal_forward() {\n    if (current_node) current_node = current_node->next;\n}\n\n//! Constructs a graph with isolated task_group_context\ninline graph::graph() : my_wait_context_vertex(0), my_nodes(nullptr), my_nodes_last(nullptr), my_task_arena(nullptr) {\n    prepare_task_arena();\n    own_context = true;\n    cancelled = false;\n    caught_exception = false;\n    my_context = new (r1::cache_aligned_allocate(sizeof(task_group_context))) task_group_context(FLOW_TASKS);\n    fgt_graph(this);\n    my_is_active = true;\n}\n\ninline graph::graph(task_group_context& use_this_context) :\n    my_wait_context_vertex(0), my_context(&use_this_context), my_nodes(nullptr), my_nodes_last(nullptr), my_task_arena(nullptr) {\n    prepare_task_arena();\n    own_context = false;\n    cancelled = false;\n    caught_exception = false;\n    fgt_graph(this);\n    my_is_active = true;\n}\n\ninline graph::~graph() {\n    wait_for_all();\n    if (own_context) {\n        my_context->~task_group_context();\n        r1::cache_aligned_deallocate(my_context);\n    }\n    delete my_task_arena;\n}\n\ninline void graph::reserve_wait() {\n    my_wait_context_vertex.reserve();\n    fgt_reserve_wait(this);\n}\n\ninline void graph::release_wait() {\n    fgt_release_wait(this);\n    my_wait_context_vertex.release();\n}\n\ninline void graph::register_node(graph_node *n) {\n    n->next = nullptr;\n    {\n        spin_mutex::scoped_lock lock(nodelist_mutex);\n        n->prev = my_nodes_last;\n        if (my_nodes_last) my_nodes_last->next = n;\n        my_nodes_last = n;\n        if (!my_nodes) my_nodes = n;\n    }\n}\n\ninline void graph::remove_node(graph_node *n) {\n    {\n        spin_mutex::scoped_lock lock(nodelist_mutex);\n        __TBB_ASSERT(my_nodes && my_nodes_last, \"graph::remove_node: Error: no registered nodes\");\n        if (n->prev) n->prev->next = n->next;\n        if (n->next) n->next->prev = n->prev;\n        if (my_nodes_last == n) my_nodes_last = n->prev;\n        if (my_nodes == n) my_nodes = n->next;\n    }\n    n->prev = n->next = nullptr;\n}\n\ninline void graph::reset( reset_flags f ) {\n    // reset context\n    deactivate_graph(*this);\n\n    my_context->reset();\n    cancelled = false;\n    caught_exception = false;\n    // reset all the nodes comprising the graph\n    for(iterator ii = begin(); ii != end(); ++ii) {\n        graph_node *my_p = &(*ii);\n        my_p->reset_node(f);\n    }\n    // Reattach the arena. Might be useful to run the graph in a particular task_arena\n    // while not limiting graph lifetime to a single task_arena::execute() call.\n    prepare_task_arena( /*reinit=*/true );\n    activate_graph(*this);\n}\n\ninline void graph::cancel() {\n    my_context->cancel_group_execution();\n}\n\ninline graph::iterator graph::begin() { return iterator(this, true); }\n\ninline graph::iterator graph::end() { return iterator(this, false); }\n\ninline graph::const_iterator graph::begin() const { return const_iterator(this, true); }\n\ninline graph::const_iterator graph::end() const { return const_iterator(this, false); }\n\ninline graph::const_iterator graph::cbegin() const { return const_iterator(this, true); }\n\ninline graph::const_iterator graph::cend() const { return const_iterator(this, false); }\n\ninline graph_node::graph_node(graph& g) : my_graph(g) {\n    my_graph.register_node(this);\n}\n\ninline graph_node::~graph_node() {\n    my_graph.remove_node(this);\n}\n\n#include \"detail/_flow_graph_node_impl.h\"\n\n\n//! An executable node that acts as a source, i.e. it has no predecessors\n\ntemplate < typename Output >\n    __TBB_requires(std::copyable<Output>)\nclass input_node : public graph_node, public sender< Output > {\npublic:\n    //! The type of the output message, which is complete\n    typedef Output output_type;\n\n    //! The type of successors of this node\n    typedef typename sender<output_type>::successor_type successor_type;\n\n    // Input node has no input type\n    typedef null_type input_type;\n\n    //! Constructor for a node with a successor\n    template< typename Body >\n        __TBB_requires(input_node_body<Body, Output>)\n     __TBB_NOINLINE_SYM input_node( graph &g, Body body )\n         : graph_node(g), my_active(false)\n         , my_body( new input_body_leaf< output_type, Body>(body) )\n         , my_init_body( new input_body_leaf< output_type, Body>(body) )\n         , my_successors(this), my_reserved(false), my_has_cached_item(false)\n    {\n        fgt_node_with_body(CODEPTR(), FLOW_INPUT_NODE, &this->my_graph,\n                           static_cast<sender<output_type> *>(this), this->my_body);\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename Body, typename... Successors>\n        __TBB_requires(input_node_body<Body, Output>)\n    input_node( const node_set<order::preceding, Successors...>& successors, Body body )\n        : input_node(successors.graph_reference(), body)\n    {\n        make_edges(*this, successors);\n    }\n#endif\n\n    //! Copy constructor\n    __TBB_NOINLINE_SYM input_node( const input_node& src )\n        : graph_node(src.my_graph), sender<Output>()\n        , my_active(false)\n        , my_body(src.my_init_body->clone()), my_init_body(src.my_init_body->clone())\n        , my_successors(this), my_reserved(false), my_has_cached_item(false)\n    {\n        fgt_node_with_body(CODEPTR(), FLOW_INPUT_NODE, &this->my_graph,\n                           static_cast<sender<output_type> *>(this), this->my_body);\n    }\n\n    //! The destructor\n    ~input_node() { delete my_body; delete my_init_body; }\n\n    //! Add a new successor to this node\n    bool register_successor( successor_type &r ) override {\n        spin_mutex::scoped_lock lock(my_mutex);\n        my_successors.register_successor(r);\n        if ( my_active )\n            spawn_put();\n        return true;\n    }\n\n    //! Removes a successor from this node\n    bool remove_successor( successor_type &r ) override {\n        spin_mutex::scoped_lock lock(my_mutex);\n        my_successors.remove_successor(r);\n        return true;\n    }\n\n    //! Request an item from the node\n    bool try_get( output_type &v ) override {\n        spin_mutex::scoped_lock lock(my_mutex);\n        if ( my_reserved )\n            return false;\n\n        if ( my_has_cached_item ) {\n            v = my_cached_item;\n            my_has_cached_item = false;\n            return true;\n        }\n        // we've been asked to provide an item, but we have none.  enqueue a task to\n        // provide one.\n        if ( my_active )\n            spawn_put();\n        return false;\n    }\n\n    //! Reserves an item.\n    bool try_reserve( output_type &v ) override {\n        spin_mutex::scoped_lock lock(my_mutex);\n        if ( my_reserved ) {\n            return false;\n        }\n\n        if ( my_has_cached_item ) {\n            v = my_cached_item;\n            my_reserved = true;\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\nprivate:\n    bool try_reserve( output_type& v, message_metainfo& ) override {\n        return try_reserve(v);\n    }\n\n    bool try_get( output_type& v, message_metainfo& ) override {\n        return try_get(v);\n    }\npublic:\n#endif\n\n    //! Release a reserved item.\n    /** true = item has been released and so remains in sender, dest must request or reserve future items */\n    bool try_release( ) override {\n        spin_mutex::scoped_lock lock(my_mutex);\n        __TBB_ASSERT( my_reserved && my_has_cached_item, \"releasing non-existent reservation\" );\n        my_reserved = false;\n        if(!my_successors.empty())\n            spawn_put();\n        return true;\n    }\n\n    //! Consumes a reserved item\n    bool try_consume( ) override {\n        spin_mutex::scoped_lock lock(my_mutex);\n        __TBB_ASSERT( my_reserved && my_has_cached_item, \"consuming non-existent reservation\" );\n        my_reserved = false;\n        my_has_cached_item = false;\n        if ( !my_successors.empty() ) {\n            spawn_put();\n        }\n        return true;\n    }\n\n    //! Activates a node that was created in the inactive state\n    void activate() {\n        spin_mutex::scoped_lock lock(my_mutex);\n        my_active = true;\n        if (!my_successors.empty())\n            spawn_put();\n    }\n\n    template<typename Body>\n    Body copy_function_object() {\n        input_body<output_type> &body_ref = *this->my_body;\n        return dynamic_cast< input_body_leaf<output_type, Body> & >(body_ref).get_body();\n    }\n\nprotected:\n\n    //! resets the input_node to its initial state\n    void reset_node( reset_flags f) override {\n        my_active = false;\n        my_reserved = false;\n        my_has_cached_item = false;\n\n        if(f & rf_clear_edges) my_successors.clear();\n        if(f & rf_reset_bodies) {\n            input_body<output_type> *tmp = my_init_body->clone();\n            delete my_body;\n            my_body = tmp;\n        }\n    }\n\nprivate:\n    spin_mutex my_mutex;\n    bool my_active;\n    input_body<output_type> *my_body;\n    input_body<output_type> *my_init_body;\n    broadcast_cache< output_type > my_successors;\n    bool my_reserved;\n    bool my_has_cached_item;\n    output_type my_cached_item;\n\n    // used by apply_body_bypass, can invoke body of node.\n    bool try_reserve_apply_body(output_type &v) {\n        spin_mutex::scoped_lock lock(my_mutex);\n        if ( my_reserved ) {\n            return false;\n        }\n        if ( !my_has_cached_item ) {\n            d1::flow_control control;\n\n            fgt_begin_body( my_body );\n\n            my_cached_item = (*my_body)(control);\n            my_has_cached_item = !control.is_pipeline_stopped;\n\n            fgt_end_body( my_body );\n        }\n        if ( my_has_cached_item ) {\n            v = my_cached_item;\n            my_reserved = true;\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    graph_task* create_put_task() {\n        d1::small_object_allocator allocator{};\n        typedef input_node_task_bypass< input_node<output_type> > task_type;\n        graph_task* t = allocator.new_object<task_type>(my_graph, allocator, *this);\n        return t;\n    }\n\n    //! Spawns a task that applies the body\n    void spawn_put( ) {\n        if(is_graph_active(this->my_graph)) {\n            spawn_in_graph_arena(this->my_graph, *create_put_task());\n        }\n    }\n\n    friend class input_node_task_bypass< input_node<output_type> >;\n    //! Applies the body.  Returning SUCCESSFULLY_ENQUEUED okay; forward_task_bypass will handle it.\n    graph_task* apply_body_bypass( ) {\n        output_type v;\n        if ( !try_reserve_apply_body(v) )\n            return nullptr;\n\n        graph_task *last_task = my_successors.try_put_task(v);\n        if ( last_task )\n            try_consume();\n        else\n            try_release();\n        return last_task;\n    }\n};  // class input_node\n\n//! Implements a function node that supports Input -> Output\ntemplate<typename Input, typename Output = continue_msg, typename Policy = queueing>\n    __TBB_requires(std::default_initializable<Input> &&\n                   std::copy_constructible<Input> &&\n                   std::copy_constructible<Output>)\nclass function_node\n    : public graph_node\n    , public function_input< Input, Output, Policy, cache_aligned_allocator<Input> >\n    , public function_output<Output>\n{\n    typedef cache_aligned_allocator<Input> internals_allocator;\n\npublic:\n    typedef Input input_type;\n    typedef Output output_type;\n    typedef function_input<input_type,output_type,Policy,internals_allocator> input_impl_type;\n    typedef function_input_queue<input_type, internals_allocator> input_queue_type;\n    typedef function_output<output_type> fOutput_type;\n    typedef typename input_impl_type::predecessor_type predecessor_type;\n    typedef typename fOutput_type::successor_type successor_type;\n\n    using input_impl_type::my_predecessors;\n\n    //! Constructor\n    // input_queue_type is allocated here, but destroyed in the function_input_base.\n    // TODO: pass the graph_buffer_policy to the function_input_base so it can all\n    // be done in one place.  This would be an interface-breaking change.\n    template< typename Body >\n        __TBB_requires(function_node_body<Body, Input, Output>)\n     __TBB_NOINLINE_SYM function_node( graph &g, size_t concurrency,\n                   Body body, Policy = Policy(), node_priority_t a_priority = no_priority )\n        : graph_node(g), input_impl_type(g, concurrency, body, a_priority),\n          fOutput_type(g) {\n        fgt_node_with_body( CODEPTR(), FLOW_FUNCTION_NODE, &this->my_graph,\n                static_cast<receiver<input_type> *>(this), static_cast<sender<output_type> *>(this), this->my_body );\n    }\n\n    template <typename Body>\n        __TBB_requires(function_node_body<Body, Input, Output>)\n    function_node( graph& g, size_t concurrency, Body body, node_priority_t a_priority )\n        : function_node(g, concurrency, body, Policy(), a_priority) {}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename Body, typename... Args>\n        __TBB_requires(function_node_body<Body, Input, Output>)\n    function_node( const node_set<Args...>& nodes, size_t concurrency, Body body,\n                   Policy p = Policy(), node_priority_t a_priority = no_priority )\n        : function_node(nodes.graph_reference(), concurrency, body, p, a_priority) {\n        make_edges_in_order(nodes, *this);\n    }\n\n    template <typename Body, typename... Args>\n        __TBB_requires(function_node_body<Body, Input, Output>)\n    function_node( const node_set<Args...>& nodes, size_t concurrency, Body body, node_priority_t a_priority )\n        : function_node(nodes, concurrency, body, Policy(), a_priority) {}\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n\n    //! Copy constructor\n    __TBB_NOINLINE_SYM function_node( const function_node& src ) :\n        graph_node(src.my_graph),\n        input_impl_type(src),\n        fOutput_type(src.my_graph) {\n        fgt_node_with_body( CODEPTR(), FLOW_FUNCTION_NODE, &this->my_graph,\n                static_cast<receiver<input_type> *>(this), static_cast<sender<output_type> *>(this), this->my_body );\n    }\n\nprotected:\n    template< typename R, typename B > friend class run_and_put_task;\n    template<typename X, typename Y> friend class broadcast_cache;\n    template<typename X, typename Y> friend class round_robin_cache;\n    using input_impl_type::try_put_task;\n\n    broadcast_cache<output_type> &successors () override { return fOutput_type::my_successors; }\n\n    void reset_node(reset_flags f) override {\n        input_impl_type::reset_function_input(f);\n        // TODO: use clear() instead.\n        if(f & rf_clear_edges) {\n            successors().clear();\n            my_predecessors.clear();\n        }\n        __TBB_ASSERT(!(f & rf_clear_edges) || successors().empty(), \"function_node successors not empty\");\n        __TBB_ASSERT(this->my_predecessors.empty(), \"function_node predecessors not empty\");\n    }\n\n};  // class function_node\n\n//! implements a function node that supports Input -> (set of outputs)\n// Output is a tuple of output types.\ntemplate<typename Input, typename Output, typename Policy = queueing>\n    __TBB_requires(std::default_initializable<Input> &&\n                   std::copy_constructible<Input>)\nclass multifunction_node :\n    public graph_node,\n    public multifunction_input\n    <\n        Input,\n        typename wrap_tuple_elements<\n            std::tuple_size<Output>::value,  // #elements in tuple\n            multifunction_output,  // wrap this around each element\n            Output // the tuple providing the types\n        >::type,\n        Policy,\n        cache_aligned_allocator<Input>\n    >\n{\n    typedef cache_aligned_allocator<Input> internals_allocator;\n\nprotected:\n    static const int N = std::tuple_size<Output>::value;\npublic:\n    typedef Input input_type;\n    typedef null_type output_type;\n    typedef typename wrap_tuple_elements<N,multifunction_output, Output>::type output_ports_type;\n    typedef multifunction_input<\n        input_type, output_ports_type, Policy, internals_allocator> input_impl_type;\n    typedef function_input_queue<input_type, internals_allocator> input_queue_type;\nprivate:\n    using input_impl_type::my_predecessors;\npublic:\n    template<typename Body>\n        __TBB_requires(multifunction_node_body<Body, Input, output_ports_type>)\n    __TBB_NOINLINE_SYM multifunction_node(\n        graph &g, size_t concurrency,\n        Body body, Policy = Policy(), node_priority_t a_priority = no_priority\n    ) : graph_node(g), input_impl_type(g, concurrency, body, a_priority) {\n        fgt_multioutput_node_with_body<N>(\n            CODEPTR(), FLOW_MULTIFUNCTION_NODE,\n            &this->my_graph, static_cast<receiver<input_type> *>(this),\n            this->output_ports(), this->my_body\n        );\n    }\n\n    template <typename Body>\n        __TBB_requires(multifunction_node_body<Body, Input, output_ports_type>)\n    __TBB_NOINLINE_SYM multifunction_node(graph& g, size_t concurrency, Body body, node_priority_t a_priority)\n        : multifunction_node(g, concurrency, body, Policy(), a_priority) {}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename Body, typename... Args>\n        __TBB_requires(multifunction_node_body<Body, Input, output_ports_type>)\n    __TBB_NOINLINE_SYM multifunction_node(const node_set<Args...>& nodes, size_t concurrency, Body body,\n                       Policy p = Policy(), node_priority_t a_priority = no_priority)\n        : multifunction_node(nodes.graph_reference(), concurrency, body, p, a_priority) {\n        make_edges_in_order(nodes, *this);\n    }\n\n    template <typename Body, typename... Args>\n        __TBB_requires(multifunction_node_body<Body, Input, output_ports_type>)\n    __TBB_NOINLINE_SYM multifunction_node(const node_set<Args...>& nodes, size_t concurrency, Body body, node_priority_t a_priority)\n        : multifunction_node(nodes, concurrency, body, Policy(), a_priority) {}\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n\n    __TBB_NOINLINE_SYM multifunction_node( const multifunction_node &other) :\n        graph_node(other.my_graph), input_impl_type(other) {\n        fgt_multioutput_node_with_body<N>( CODEPTR(), FLOW_MULTIFUNCTION_NODE,\n                &this->my_graph, static_cast<receiver<input_type> *>(this),\n                this->output_ports(), this->my_body );\n    }\n\n    // all the guts are in multifunction_input...\nprotected:\n    void reset_node(reset_flags f) override { input_impl_type::reset(f); }\n};  // multifunction_node\n\n//! split_node: accepts a tuple as input, forwards each element of the tuple to its\n//  successors.  The node has unlimited concurrency, so it does not reject inputs.\ntemplate<typename TupleType>\nclass split_node : public graph_node, public receiver<TupleType> {\n    static const int N = std::tuple_size<TupleType>::value;\n    typedef receiver<TupleType> base_type;\npublic:\n    typedef TupleType input_type;\n    typedef typename wrap_tuple_elements<\n            N,  // #elements in tuple\n            multifunction_output,  // wrap this around each element\n            TupleType // the tuple providing the types\n        >::type  output_ports_type;\n\n    __TBB_NOINLINE_SYM explicit split_node(graph &g)\n        : graph_node(g),\n          my_output_ports(init_output_ports<output_ports_type>::call(g, my_output_ports))\n    {\n        fgt_multioutput_node<N>(CODEPTR(), FLOW_SPLIT_NODE, &this->my_graph,\n            static_cast<receiver<input_type> *>(this), this->output_ports());\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename... Args>\n    __TBB_NOINLINE_SYM split_node(const node_set<Args...>& nodes) : split_node(nodes.graph_reference()) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    __TBB_NOINLINE_SYM split_node(const split_node& other)\n        : graph_node(other.my_graph), base_type(other),\n          my_output_ports(init_output_ports<output_ports_type>::call(other.my_graph, my_output_ports))\n    {\n        fgt_multioutput_node<N>(CODEPTR(), FLOW_SPLIT_NODE, &this->my_graph,\n            static_cast<receiver<input_type> *>(this), this->output_ports());\n    }\n\n    output_ports_type &output_ports() { return my_output_ports; }\n\nprotected:\n    graph_task *try_put_task(const TupleType& t) override {\n        // Sending split messages in parallel is not justified, as overheads would prevail.\n        // Also, we do not have successors here. So we just tell the task returned here is successful.\n        return emit_element<N>::emit_this(this->my_graph, t, output_ports());\n    }\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    graph_task* try_put_task(const TupleType& t, const message_metainfo& metainfo) override {\n        // Sending split messages in parallel is not justified, as overheads would prevail.\n        // Also, we do not have successors here. So we just tell the task returned here is successful.\n        return emit_element<N>::emit_this(this->my_graph, t, output_ports(), metainfo);\n    }\n#endif\n\n    void reset_node(reset_flags f) override {\n        if (f & rf_clear_edges)\n            clear_element<N>::clear_this(my_output_ports);\n\n        __TBB_ASSERT(!(f & rf_clear_edges) || clear_element<N>::this_empty(my_output_ports), \"split_node reset failed\");\n    }\n    graph& graph_reference() const override {\n        return my_graph;\n    }\n\nprivate:\n    output_ports_type my_output_ports;\n};\n\n//! Implements an executable node that supports continue_msg -> Output\ntemplate <typename Output, typename Policy = Policy<void> >\n    __TBB_requires(std::copy_constructible<Output>)\nclass continue_node : public graph_node, public continue_input<Output, Policy>,\n                      public function_output<Output> {\npublic:\n    typedef continue_msg input_type;\n    typedef Output output_type;\n    typedef continue_input<Output, Policy> input_impl_type;\n    typedef function_output<output_type> fOutput_type;\n    typedef typename input_impl_type::predecessor_type predecessor_type;\n    typedef typename fOutput_type::successor_type successor_type;\n\n    //! Constructor for executable node with continue_msg -> Output\n    template <typename Body >\n        __TBB_requires(continue_node_body<Body, Output>)\n    __TBB_NOINLINE_SYM continue_node(\n        graph &g,\n        Body body, Policy = Policy(), node_priority_t a_priority = no_priority\n    ) : graph_node(g), input_impl_type( g, body, a_priority ),\n        fOutput_type(g) {\n        fgt_node_with_body( CODEPTR(), FLOW_CONTINUE_NODE, &this->my_graph,\n\n                                           static_cast<receiver<input_type> *>(this),\n                                           static_cast<sender<output_type> *>(this), this->my_body );\n    }\n\n    template <typename Body>\n        __TBB_requires(continue_node_body<Body, Output>)\n    continue_node( graph& g, Body body, node_priority_t a_priority )\n        : continue_node(g, body, Policy(), a_priority) {}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename Body, typename... Args>\n        __TBB_requires(continue_node_body<Body, Output>)\n    continue_node( const node_set<Args...>& nodes, Body body,\n                   Policy p = Policy(), node_priority_t a_priority = no_priority )\n        : continue_node(nodes.graph_reference(), body, p, a_priority ) {\n        make_edges_in_order(nodes, *this);\n    }\n    template <typename Body, typename... Args>\n        __TBB_requires(continue_node_body<Body, Output>)\n    continue_node( const node_set<Args...>& nodes, Body body, node_priority_t a_priority)\n        : continue_node(nodes, body, Policy(), a_priority) {}\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n\n    //! Constructor for executable node with continue_msg -> Output\n    template <typename Body >\n        __TBB_requires(continue_node_body<Body, Output>)\n    __TBB_NOINLINE_SYM continue_node(\n        graph &g, int number_of_predecessors,\n        Body body, Policy = Policy(), node_priority_t a_priority = no_priority\n    ) : graph_node(g)\n      , input_impl_type(g, number_of_predecessors, body, a_priority),\n        fOutput_type(g) {\n        fgt_node_with_body( CODEPTR(), FLOW_CONTINUE_NODE, &this->my_graph,\n                                           static_cast<receiver<input_type> *>(this),\n                                           static_cast<sender<output_type> *>(this), this->my_body );\n    }\n\n    template <typename Body>\n        __TBB_requires(continue_node_body<Body, Output>)\n    continue_node( graph& g, int number_of_predecessors, Body body, node_priority_t a_priority)\n        : continue_node(g, number_of_predecessors, body, Policy(), a_priority) {}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename Body, typename... Args>\n        __TBB_requires(continue_node_body<Body, Output>)\n    continue_node( const node_set<Args...>& nodes, int number_of_predecessors,\n                   Body body, Policy p = Policy(), node_priority_t a_priority = no_priority )\n        : continue_node(nodes.graph_reference(), number_of_predecessors, body, p, a_priority) {\n        make_edges_in_order(nodes, *this);\n    }\n\n    template <typename Body, typename... Args>\n        __TBB_requires(continue_node_body<Body, Output>)\n    continue_node( const node_set<Args...>& nodes, int number_of_predecessors,\n                   Body body, node_priority_t a_priority )\n        : continue_node(nodes, number_of_predecessors, body, Policy(), a_priority) {}\n#endif\n\n    //! Copy constructor\n    __TBB_NOINLINE_SYM continue_node( const continue_node& src ) :\n        graph_node(src.my_graph), input_impl_type(src),\n        function_output<Output>(src.my_graph) {\n        fgt_node_with_body( CODEPTR(), FLOW_CONTINUE_NODE, &this->my_graph,\n                                           static_cast<receiver<input_type> *>(this),\n                                           static_cast<sender<output_type> *>(this), this->my_body );\n    }\n\nprotected:\n    template< typename R, typename B > friend class run_and_put_task;\n    template<typename X, typename Y> friend class broadcast_cache;\n    template<typename X, typename Y> friend class round_robin_cache;\n    using input_impl_type::try_put_task;\n    broadcast_cache<output_type> &successors () override { return fOutput_type::my_successors; }\n\n    void reset_node(reset_flags f) override {\n        input_impl_type::reset_receiver(f);\n        if(f & rf_clear_edges)successors().clear();\n        __TBB_ASSERT(!(f & rf_clear_edges) || successors().empty(), \"continue_node not reset\");\n    }\n};  // continue_node\n\n//! Forwards messages of type T to all successors\ntemplate <typename T>\nclass broadcast_node : public graph_node, public receiver<T>, public sender<T> {\npublic:\n    typedef T input_type;\n    typedef T output_type;\n    typedef typename receiver<input_type>::predecessor_type predecessor_type;\n    typedef typename sender<output_type>::successor_type successor_type;\nprivate:\n    broadcast_cache<input_type> my_successors;\npublic:\n\n    __TBB_NOINLINE_SYM explicit broadcast_node(graph& g) : graph_node(g), my_successors(this) {\n        fgt_node( CODEPTR(), FLOW_BROADCAST_NODE, &this->my_graph,\n                  static_cast<receiver<input_type> *>(this), static_cast<sender<output_type> *>(this) );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename... Args>\n    broadcast_node(const node_set<Args...>& nodes) : broadcast_node(nodes.graph_reference()) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    // Copy constructor\n    __TBB_NOINLINE_SYM broadcast_node( const broadcast_node& src ) : broadcast_node(src.my_graph) {}\n\n    //! Adds a successor\n    bool register_successor( successor_type &r ) override {\n        my_successors.register_successor( r );\n        return true;\n    }\n\n    //! Removes s as a successor\n    bool remove_successor( successor_type &r ) override {\n        my_successors.remove_successor( r );\n        return true;\n    }\n\nprivate:\n    graph_task* try_put_task_impl(const T& t __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo)) {\n        graph_task* new_task = my_successors.try_put_task(t __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n        if (!new_task) new_task = SUCCESSFULLY_ENQUEUED;\n        return new_task;\n    }\n\nprotected:\n    template< typename R, typename B > friend class run_and_put_task;\n    template<typename X, typename Y> friend class broadcast_cache;\n    template<typename X, typename Y> friend class round_robin_cache;\n    //! build a task to run the successor if possible.  Default is old behavior.\n    graph_task* try_put_task(const T& t) override {\n        return try_put_task_impl(t __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo{}));\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    graph_task* try_put_task(const T& t, const message_metainfo& metainfo) override {\n        return try_put_task_impl(t, metainfo);\n    }\n#endif\n\n    graph& graph_reference() const override {\n        return my_graph;\n    }\n\n    void reset_node(reset_flags f) override {\n        if (f&rf_clear_edges) {\n           my_successors.clear();\n        }\n        __TBB_ASSERT(!(f & rf_clear_edges) || my_successors.empty(), \"Error resetting broadcast_node\");\n    }\n};  // broadcast_node\n\n//! Forwards messages in arbitrary order\ntemplate <typename T>\nclass buffer_node\n    : public graph_node\n    , public reservable_item_buffer< T, cache_aligned_allocator<T> >\n    , public receiver<T>, public sender<T>\n{\n    typedef cache_aligned_allocator<T> internals_allocator;\n\npublic:\n    typedef T input_type;\n    typedef T output_type;\n    typedef typename receiver<input_type>::predecessor_type predecessor_type;\n    typedef typename sender<output_type>::successor_type successor_type;\n    typedef buffer_node<T> class_type;\n\nprotected:\n    typedef size_t size_type;\n    round_robin_cache< T, null_rw_mutex > my_successors;\n\n    friend class forward_task_bypass< class_type >;\n\n    enum op_type {reg_succ, rem_succ, req_item, res_item, rel_res, con_res, put_item, try_fwd_task\n    };\n\n    // implements the aggregator_operation concept\n    class buffer_operation : public d1::aggregated_operation< buffer_operation > {\n    public:\n        char type;\n        T* elem;\n        graph_task* ltask;\n        successor_type *r;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        message_metainfo* metainfo{ nullptr };\n#endif\n\n        buffer_operation(const T& e, op_type t) : type(char(t))\n                                                  , elem(const_cast<T*>(&e)) , ltask(nullptr)\n                                                  , r(nullptr)\n        {}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        buffer_operation(const T& e, op_type t, const message_metainfo& info)\n            : type(char(t)), elem(const_cast<T*>(&e)), ltask(nullptr), r(nullptr)\n            , metainfo(const_cast<message_metainfo*>(&info))\n        {}\n\n        buffer_operation(op_type t, message_metainfo& info)\n            : type(char(t)), elem(nullptr), ltask(nullptr), r(nullptr), metainfo(&info) {}\n#endif\n        buffer_operation(op_type t) : type(char(t)), elem(nullptr), ltask(nullptr), r(nullptr) {}\n    };\n\n    bool forwarder_busy;\n    typedef d1::aggregating_functor<class_type, buffer_operation> handler_type;\n    friend class d1::aggregating_functor<class_type, buffer_operation>;\n    d1::aggregator< handler_type, buffer_operation> my_aggregator;\n\n    virtual void handle_operations(buffer_operation *op_list) {\n        handle_operations_impl(op_list, this);\n    }\n\n    template<typename derived_type>\n    void handle_operations_impl(buffer_operation *op_list, derived_type* derived) {\n        __TBB_ASSERT(static_cast<class_type*>(derived) == this, \"'this' is not a base class for derived\");\n\n        buffer_operation *tmp = nullptr;\n        bool try_forwarding = false;\n        while (op_list) {\n            tmp = op_list;\n            op_list = op_list->next;\n            switch (tmp->type) {\n            case reg_succ: internal_reg_succ(tmp); try_forwarding = true; break;\n            case rem_succ: internal_rem_succ(tmp); break;\n            case req_item: internal_pop(tmp); break;\n            case res_item: internal_reserve(tmp); break;\n            case rel_res:  internal_release(tmp); try_forwarding = true; break;\n            case con_res:  internal_consume(tmp); try_forwarding = true; break;\n            case put_item: try_forwarding = internal_push(tmp); break;\n            case try_fwd_task: internal_forward_task(tmp); break;\n            }\n        }\n\n        derived->order();\n\n        if (try_forwarding && !forwarder_busy) {\n            if(is_graph_active(this->my_graph)) {\n                forwarder_busy = true;\n                typedef forward_task_bypass<class_type> task_type;\n                d1::small_object_allocator allocator{};\n                graph_task* new_task = allocator.new_object<task_type>(graph_reference(), allocator, *this);\n                // tmp should point to the last item handled by the aggregator.  This is the operation\n                // the handling thread enqueued.  So modifying that record will be okay.\n                // TODO revamp: check that the issue is still present\n                // workaround for icc bug  (at least 12.0 and 13.0)\n                // error: function \"tbb::flow::interfaceX::combine_tasks\" cannot be called with the given argument list\n                //        argument types are: (graph, graph_task *, graph_task *)\n                graph_task *z = tmp->ltask;\n                graph &g = this->my_graph;\n                tmp->ltask = combine_tasks(g, z, new_task);  // in case the op generated a task\n            }\n        }\n    }  // handle_operations\n\n    inline graph_task *grab_forwarding_task( buffer_operation &op_data) {\n        return op_data.ltask;\n    }\n\n    inline bool enqueue_forwarding_task(buffer_operation &op_data) {\n        graph_task *ft = grab_forwarding_task(op_data);\n        if(ft) {\n            spawn_in_graph_arena(graph_reference(), *ft);\n            return true;\n        }\n        return false;\n    }\n\n    //! This is executed by an enqueued task, the \"forwarder\"\n    virtual graph_task *forward_task() {\n        buffer_operation op_data(try_fwd_task);\n        graph_task *last_task = nullptr;\n        do {\n            op_data.status = WAIT;\n            op_data.ltask = nullptr;\n            my_aggregator.execute(&op_data);\n\n            // workaround for icc bug\n            graph_task *xtask = op_data.ltask;\n            graph& g = this->my_graph;\n            last_task = combine_tasks(g, last_task, xtask);\n        } while (op_data.status ==SUCCEEDED);\n        return last_task;\n    }\n\n    //! Register successor\n    virtual void internal_reg_succ(buffer_operation *op) {\n        __TBB_ASSERT(op->r, nullptr);\n        my_successors.register_successor(*(op->r));\n        op->status.store(SUCCEEDED, std::memory_order_release);\n    }\n\n    //! Remove successor\n    virtual void internal_rem_succ(buffer_operation *op) {\n        __TBB_ASSERT(op->r, nullptr);\n        my_successors.remove_successor(*(op->r));\n        op->status.store(SUCCEEDED, std::memory_order_release);\n    }\n\nprivate:\n    void order() {}\n\n    bool is_item_valid() {\n        return this->my_item_valid(this->my_tail - 1);\n    }\n\n    void try_put_and_add_task(graph_task*& last_task) {\n        graph_task* new_task = my_successors.try_put_task(this->back()\n                                                          __TBB_FLOW_GRAPH_METAINFO_ARG(this->back_metainfo()));\n        if (new_task) {\n            // workaround for icc bug\n            graph& g = this->my_graph;\n            last_task = combine_tasks(g, last_task, new_task);\n            this->destroy_back();\n        }\n    }\n\nprotected:\n    //! Tries to forward valid items to successors\n    virtual void internal_forward_task(buffer_operation *op) {\n        internal_forward_task_impl(op, this);\n    }\n\n    template<typename derived_type>\n    void internal_forward_task_impl(buffer_operation *op, derived_type* derived) {\n        __TBB_ASSERT(static_cast<class_type*>(derived) == this, \"'this' is not a base class for derived\");\n\n        if (this->my_reserved || !derived->is_item_valid()) {\n            op->status.store(FAILED, std::memory_order_release);\n            this->forwarder_busy = false;\n            return;\n        }\n        // Try forwarding, giving each successor a chance\n        graph_task* last_task = nullptr;\n        size_type counter = my_successors.size();\n        for (; counter > 0 && derived->is_item_valid(); --counter)\n            derived->try_put_and_add_task(last_task);\n\n        op->ltask = last_task;  // return task\n        if (last_task && !counter) {\n            op->status.store(SUCCEEDED, std::memory_order_release);\n        }\n        else {\n            op->status.store(FAILED, std::memory_order_release);\n            forwarder_busy = false;\n        }\n    }\n\n    virtual bool internal_push(buffer_operation *op) {\n        __TBB_ASSERT(op->elem, nullptr);\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        __TBB_ASSERT(op->metainfo, nullptr);\n        this->push_back(*(op->elem), (*op->metainfo));\n#else\n        this->push_back(*(op->elem));\n#endif\n        op->status.store(SUCCEEDED, std::memory_order_release);\n        return true;\n    }\n\n    virtual void internal_pop(buffer_operation *op) {\n        __TBB_ASSERT(op->elem, nullptr);\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        bool pop_result = op->metainfo ? this->pop_back(*(op->elem), *(op->metainfo))\n                                       : this->pop_back(*(op->elem));\n#else\n        bool pop_result = this->pop_back(*(op->elem));\n#endif\n        if (pop_result) {\n            op->status.store(SUCCEEDED, std::memory_order_release);\n        }\n        else {\n            op->status.store(FAILED, std::memory_order_release);\n        }\n    }\n\n    virtual void internal_reserve(buffer_operation *op) {\n        __TBB_ASSERT(op->elem, nullptr);\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        bool reserve_result = op->metainfo ? this->reserve_front(*(op->elem), *(op->metainfo))\n                                           : this->reserve_front(*(op->elem));\n#else\n        bool reserve_result = this->reserve_front(*(op->elem));\n#endif\n        if (reserve_result) {\n            op->status.store(SUCCEEDED, std::memory_order_release);\n        }\n        else {\n            op->status.store(FAILED, std::memory_order_release);\n        }\n    }\n\n    virtual void internal_consume(buffer_operation *op) {\n        this->consume_front();\n        op->status.store(SUCCEEDED, std::memory_order_release);\n    }\n\n    virtual void internal_release(buffer_operation *op) {\n        this->release_front();\n        op->status.store(SUCCEEDED, std::memory_order_release);\n    }\n\npublic:\n    //! Constructor\n    __TBB_NOINLINE_SYM explicit buffer_node( graph &g )\n        : graph_node(g), reservable_item_buffer<T, internals_allocator>(), receiver<T>(),\n          sender<T>(), my_successors(this), forwarder_busy(false)\n    {\n        my_aggregator.initialize_handler(handler_type(this));\n        fgt_node( CODEPTR(), FLOW_BUFFER_NODE, &this->my_graph,\n                                 static_cast<receiver<input_type> *>(this), static_cast<sender<output_type> *>(this) );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename... Args>\n    buffer_node(const node_set<Args...>& nodes) : buffer_node(nodes.graph_reference()) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    //! Copy constructor\n    __TBB_NOINLINE_SYM buffer_node( const buffer_node& src ) : buffer_node(src.my_graph) {}\n\n    //\n    // message sender implementation\n    //\n\n    //! Adds a new successor.\n    /** Adds successor r to the list of successors; may forward tasks.  */\n    bool register_successor( successor_type &r ) override {\n        buffer_operation op_data(reg_succ);\n        op_data.r = &r;\n        my_aggregator.execute(&op_data);\n        (void)enqueue_forwarding_task(op_data);\n        return true;\n    }\n\n    //! Removes a successor.\n    /** Removes successor r from the list of successors.\n        It also calls r.remove_predecessor(*this) to remove this node as a predecessor. */\n    bool remove_successor( successor_type &r ) override {\n        // TODO revamp: investigate why full qualification is necessary here\n        tbb::detail::d2::remove_predecessor(r, *this);\n        buffer_operation op_data(rem_succ);\n        op_data.r = &r;\n        my_aggregator.execute(&op_data);\n        // even though this operation does not cause a forward, if we are the handler, and\n        // a forward is scheduled, we may be the first to reach this point after the aggregator,\n        // and so should check for the task.\n        (void)enqueue_forwarding_task(op_data);\n        return true;\n    }\n\n    //! Request an item from the buffer_node\n    /**  true = v contains the returned item<BR>\n         false = no item has been returned */\n    bool try_get( T &v ) override {\n        buffer_operation op_data(req_item);\n        op_data.elem = &v;\n        my_aggregator.execute(&op_data);\n        (void)enqueue_forwarding_task(op_data);\n        return (op_data.status==SUCCEEDED);\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    bool try_get( T &v, message_metainfo& metainfo ) override {\n        buffer_operation op_data(req_item, metainfo);\n        op_data.elem = &v;\n        my_aggregator.execute(&op_data);\n        (void)enqueue_forwarding_task(op_data);\n        return (op_data.status==SUCCEEDED);\n    }\n#endif\n\n    //! Reserves an item.\n    /**  false = no item can be reserved<BR>\n         true = an item is reserved */\n    bool try_reserve( T &v ) override {\n        buffer_operation op_data(res_item);\n        op_data.elem = &v;\n        my_aggregator.execute(&op_data);\n        (void)enqueue_forwarding_task(op_data);\n        return (op_data.status==SUCCEEDED);\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    bool try_reserve( output_type& v, message_metainfo& metainfo ) override {\n        buffer_operation op_data(res_item, metainfo);\n        op_data.elem = &v;\n        my_aggregator.execute(&op_data);\n        (void)enqueue_forwarding_task(op_data);\n        return op_data.status==SUCCEEDED;\n    }\n#endif\n\n    //! Release a reserved item.\n    /**  true = item has been released and so remains in sender */\n    bool try_release() override {\n        buffer_operation op_data(rel_res);\n        my_aggregator.execute(&op_data);\n        (void)enqueue_forwarding_task(op_data);\n        return true;\n    }\n\n    //! Consumes a reserved item.\n    /** true = item is removed from sender and reservation removed */\n    bool try_consume() override {\n        buffer_operation op_data(con_res);\n        my_aggregator.execute(&op_data);\n        (void)enqueue_forwarding_task(op_data);\n        return true;\n    }\n\nprivate:\n    graph_task* try_put_task_impl(const T& t __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo)) {\n        buffer_operation op_data(t, put_item __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n        my_aggregator.execute(&op_data);\n        graph_task *ft = grab_forwarding_task(op_data);\n        // sequencer_nodes can return failure (if an item has been previously inserted)\n        // We have to spawn the returned task if our own operation fails.\n\n        if(ft && op_data.status ==FAILED) {\n            // we haven't succeeded queueing the item, but for some reason the\n            // call returned a task (if another request resulted in a successful\n            // forward this could happen.)  Queue the task and reset the pointer.\n            spawn_in_graph_arena(graph_reference(), *ft); ft = nullptr;\n        }\n        else if(!ft && op_data.status ==SUCCEEDED) {\n            ft = SUCCESSFULLY_ENQUEUED;\n        }\n        return ft;\n    }\n\nprotected:\n\n    template< typename R, typename B > friend class run_and_put_task;\n    template<typename X, typename Y> friend class broadcast_cache;\n    template<typename X, typename Y> friend class round_robin_cache;\n    //! receive an item, return a task *if possible\n    graph_task *try_put_task(const T &t) override {\n        return try_put_task_impl(t __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo{}));\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    graph_task* try_put_task(const T& t, const message_metainfo& metainfo) override {\n        return try_put_task_impl(t, metainfo);\n    }\n#endif\n\n    graph& graph_reference() const override {\n        return my_graph;\n    }\n\nprotected:\n    void reset_node( reset_flags f) override {\n        reservable_item_buffer<T, internals_allocator>::reset();\n        // TODO: just clear structures\n        if (f&rf_clear_edges) {\n            my_successors.clear();\n        }\n        forwarder_busy = false;\n    }\n};  // buffer_node\n\n//! Forwards messages in FIFO order\ntemplate <typename T>\nclass queue_node : public buffer_node<T> {\nprotected:\n    typedef buffer_node<T> base_type;\n    typedef typename base_type::size_type size_type;\n    typedef typename base_type::buffer_operation queue_operation;\n    typedef queue_node class_type;\n\nprivate:\n    template<typename> friend class buffer_node;\n\n    bool is_item_valid() {\n        return this->my_item_valid(this->my_head);\n    }\n\n    void try_put_and_add_task(graph_task*& last_task) {\n        graph_task* new_task = this->my_successors.try_put_task(this->front()\n                                                                __TBB_FLOW_GRAPH_METAINFO_ARG(this->front_metainfo()));\n\n        if (new_task) {\n            // workaround for icc bug\n            graph& graph_ref = this->graph_reference();\n            last_task = combine_tasks(graph_ref, last_task, new_task);\n            this->destroy_front();\n        }\n    }\n\nprotected:\n    void internal_forward_task(queue_operation *op) override {\n        this->internal_forward_task_impl(op, this);\n    }\n\n    void internal_pop(queue_operation *op) override {\n        if ( this->my_reserved || !this->my_item_valid(this->my_head)){\n            op->status.store(FAILED, std::memory_order_release);\n        }\n        else {\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            if (op->metainfo) {\n                this->pop_front(*(op->elem), *(op->metainfo));\n            } else\n#endif\n            {\n                this->pop_front(*(op->elem));\n            }\n            op->status.store(SUCCEEDED, std::memory_order_release);\n        }\n    }\n    void internal_reserve(queue_operation *op) override {\n        if (this->my_reserved || !this->my_item_valid(this->my_head)) {\n            op->status.store(FAILED, std::memory_order_release);\n        }\n        else {\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            if (op->metainfo) {\n                this->reserve_front(*(op->elem), *(op->metainfo));\n            }\n            else\n#endif\n            {\n                this->reserve_front(*(op->elem));\n            }\n            op->status.store(SUCCEEDED, std::memory_order_release);\n        }\n    }\n    void internal_consume(queue_operation *op) override {\n        this->consume_front();\n        op->status.store(SUCCEEDED, std::memory_order_release);\n    }\n\npublic:\n    typedef T input_type;\n    typedef T output_type;\n    typedef typename receiver<input_type>::predecessor_type predecessor_type;\n    typedef typename sender<output_type>::successor_type successor_type;\n\n    //! Constructor\n    __TBB_NOINLINE_SYM explicit queue_node( graph &g ) : base_type(g) {\n        fgt_node( CODEPTR(), FLOW_QUEUE_NODE, &(this->my_graph),\n                                 static_cast<receiver<input_type> *>(this),\n                                 static_cast<sender<output_type> *>(this) );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename... Args>\n    queue_node( const node_set<Args...>& nodes) : queue_node(nodes.graph_reference()) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    //! Copy constructor\n    __TBB_NOINLINE_SYM queue_node( const queue_node& src) : base_type(src) {\n        fgt_node( CODEPTR(), FLOW_QUEUE_NODE, &(this->my_graph),\n                                 static_cast<receiver<input_type> *>(this),\n                                 static_cast<sender<output_type> *>(this) );\n    }\n\n\nprotected:\n    void reset_node( reset_flags f) override {\n        base_type::reset_node(f);\n    }\n};  // queue_node\n\n//! Forwards messages in sequence order\ntemplate <typename T>\n    __TBB_requires(std::copyable<T>)\nclass sequencer_node : public queue_node<T> {\n    function_body< T, size_t > *my_sequencer;\n    // my_sequencer should be a benign function and must be callable\n    // from a parallel context.  Does this mean it needn't be reset?\npublic:\n    typedef T input_type;\n    typedef T output_type;\n    typedef typename receiver<input_type>::predecessor_type predecessor_type;\n    typedef typename sender<output_type>::successor_type successor_type;\n\n    //! Constructor\n    template< typename Sequencer >\n        __TBB_requires(sequencer<Sequencer, T>)\n    __TBB_NOINLINE_SYM sequencer_node( graph &g, const Sequencer& s ) : queue_node<T>(g),\n        my_sequencer(new function_body_leaf< T, size_t, Sequencer>(s) ) {\n        fgt_node( CODEPTR(), FLOW_SEQUENCER_NODE, &(this->my_graph),\n                                 static_cast<receiver<input_type> *>(this),\n                                 static_cast<sender<output_type> *>(this) );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename Sequencer, typename... Args>\n        __TBB_requires(sequencer<Sequencer, T>)\n    sequencer_node( const node_set<Args...>& nodes, const Sequencer& s)\n        : sequencer_node(nodes.graph_reference(), s) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    //! Copy constructor\n    __TBB_NOINLINE_SYM sequencer_node( const sequencer_node& src ) : queue_node<T>(src),\n        my_sequencer( src.my_sequencer->clone() ) {\n        fgt_node( CODEPTR(), FLOW_SEQUENCER_NODE, &(this->my_graph),\n                                 static_cast<receiver<input_type> *>(this),\n                                 static_cast<sender<output_type> *>(this) );\n    }\n\n    //! Destructor\n    ~sequencer_node() { delete my_sequencer; }\n\nprotected:\n    typedef typename buffer_node<T>::size_type size_type;\n    typedef typename buffer_node<T>::buffer_operation sequencer_operation;\n\nprivate:\n    bool internal_push(sequencer_operation *op) override {\n        size_type tag = (*my_sequencer)(*(op->elem));\n#if !TBB_DEPRECATED_SEQUENCER_DUPLICATES\n        if (tag < this->my_head) {\n            // have already emitted a message with this tag\n            op->status.store(FAILED, std::memory_order_release);\n            return false;\n        }\n#endif\n        // cannot modify this->my_tail now; the buffer would be inconsistent.\n        size_t new_tail = (tag+1 > this->my_tail) ? tag+1 : this->my_tail;\n\n        if (this->size(new_tail) > this->capacity()) {\n            this->grow_my_array(this->size(new_tail));\n        }\n        this->my_tail = new_tail;\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        __TBB_ASSERT(op->metainfo, nullptr);\n        bool place_item_result = this->place_item(tag, *(op->elem), *(op->metainfo));\n        const op_stat res = place_item_result ? SUCCEEDED : FAILED;\n#else\n        const op_stat res = this->place_item(tag, *(op->elem)) ? SUCCEEDED : FAILED;\n#endif\n        op->status.store(res, std::memory_order_release);\n        return res ==SUCCEEDED;\n    }\n};  // sequencer_node\n\n//! Forwards messages in priority order\ntemplate<typename T, typename Compare = std::less<T>>\nclass priority_queue_node : public buffer_node<T> {\npublic:\n    typedef T input_type;\n    typedef T output_type;\n    typedef buffer_node<T> base_type;\n    typedef priority_queue_node class_type;\n    typedef typename receiver<input_type>::predecessor_type predecessor_type;\n    typedef typename sender<output_type>::successor_type successor_type;\n\n    //! Constructor\n    __TBB_NOINLINE_SYM explicit priority_queue_node( graph &g, const Compare& comp = Compare() )\n        : buffer_node<T>(g), compare(comp), mark(0) {\n        fgt_node( CODEPTR(), FLOW_PRIORITY_QUEUE_NODE, &(this->my_graph),\n                                 static_cast<receiver<input_type> *>(this),\n                                 static_cast<sender<output_type> *>(this) );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename... Args>\n    priority_queue_node(const node_set<Args...>& nodes, const Compare& comp = Compare())\n        : priority_queue_node(nodes.graph_reference(), comp) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    //! Copy constructor\n    __TBB_NOINLINE_SYM priority_queue_node( const priority_queue_node &src )\n        : buffer_node<T>(src), mark(0)\n    {\n        fgt_node( CODEPTR(), FLOW_PRIORITY_QUEUE_NODE, &(this->my_graph),\n                                 static_cast<receiver<input_type> *>(this),\n                                 static_cast<sender<output_type> *>(this) );\n    }\n\nprotected:\n\n    void reset_node( reset_flags f) override {\n        mark = 0;\n        base_type::reset_node(f);\n    }\n\n    typedef typename buffer_node<T>::size_type size_type;\n    typedef typename buffer_node<T>::item_type item_type;\n    typedef typename buffer_node<T>::buffer_operation prio_operation;\n\n    //! Tries to forward valid items to successors\n    void internal_forward_task(prio_operation *op) override {\n        this->internal_forward_task_impl(op, this);\n    }\n\n    void handle_operations(prio_operation *op_list) override {\n        this->handle_operations_impl(op_list, this);\n    }\n\n    bool internal_push(prio_operation *op) override {\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        __TBB_ASSERT(op->metainfo, nullptr);\n        prio_push(*(op->elem), *(op->metainfo));\n#else\n        prio_push(*(op->elem));\n#endif\n        op->status.store(SUCCEEDED, std::memory_order_release);\n        return true;\n    }\n\n    void internal_pop(prio_operation *op) override {\n        // if empty or already reserved, don't pop\n        if ( this->my_reserved == true || this->my_tail == 0 ) {\n            op->status.store(FAILED, std::memory_order_release);\n            return;\n        }\n\n        *(op->elem) = prio();\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        if (op->metainfo) {\n            *(op->metainfo) = std::move(prio_metainfo());\n        }\n#endif\n        op->status.store(SUCCEEDED, std::memory_order_release);\n        prio_pop();\n\n    }\n\n    // pops the highest-priority item, saves copy\n    void internal_reserve(prio_operation *op) override {\n        if (this->my_reserved == true || this->my_tail == 0) {\n            op->status.store(FAILED, std::memory_order_release);\n            return;\n        }\n        this->my_reserved = true;\n        *(op->elem) = prio();\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        if (op->metainfo) {\n            *(op->metainfo) = std::move(prio_metainfo());\n            reserved_metainfo = *(op->metainfo);\n        }\n#endif\n        reserved_item = *(op->elem);\n        op->status.store(SUCCEEDED, std::memory_order_release);\n        prio_pop();\n    }\n\n    void internal_consume(prio_operation *op) override {\n        op->status.store(SUCCEEDED, std::memory_order_release);\n        this->my_reserved = false;\n        reserved_item = input_type();\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        for (auto waiter : reserved_metainfo.waiters()) {\n            waiter->release(1);\n        }\n\n        reserved_metainfo = message_metainfo{};\n#endif\n    }\n\n    void internal_release(prio_operation *op) override {\n        op->status.store(SUCCEEDED, std::memory_order_release);\n        prio_push(reserved_item __TBB_FLOW_GRAPH_METAINFO_ARG(reserved_metainfo));\n        this->my_reserved = false;\n        reserved_item = input_type();\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        for (auto waiter : reserved_metainfo.waiters()) {\n            waiter->release(1);\n        }\n\n        reserved_metainfo = message_metainfo{};\n#endif\n    }\n\nprivate:\n    template<typename> friend class buffer_node;\n\n    void order() {\n        if (mark < this->my_tail) heapify();\n        __TBB_ASSERT(mark == this->my_tail, \"mark unequal after heapify\");\n    }\n\n    bool is_item_valid() {\n        return this->my_tail > 0;\n    }\n\n    void try_put_and_add_task(graph_task*& last_task) {\n        graph_task* new_task = this->my_successors.try_put_task(this->prio()\n                                                                __TBB_FLOW_GRAPH_METAINFO_ARG(this->prio_metainfo()));\n        if (new_task) {\n            // workaround for icc bug\n            graph& graph_ref = this->graph_reference();\n            last_task = combine_tasks(graph_ref, last_task, new_task);\n            prio_pop();\n        }\n    }\n\nprivate:\n    Compare compare;\n    size_type mark;\n\n    input_type reserved_item;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    message_metainfo reserved_metainfo;\n#endif\n\n    // in case a reheap has not been done after a push, check if the mark item is higher than the 0'th item\n    bool prio_use_tail() {\n        __TBB_ASSERT(mark <= this->my_tail, \"mark outside bounds before test\");\n        return mark < this->my_tail && compare(this->get_my_item(0), this->get_my_item(this->my_tail - 1));\n    }\n\n    // prio_push: checks that the item will fit, expand array if necessary, put at end\n    void prio_push(const T &src __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo)) {\n        if ( this->my_tail >= this->my_array_size )\n            this->grow_my_array( this->my_tail + 1 );\n        (void) this->place_item(this->my_tail, src __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n        ++(this->my_tail);\n        __TBB_ASSERT(mark < this->my_tail, \"mark outside bounds after push\");\n    }\n\n    // prio_pop: deletes highest priority item from the array, and if it is item\n    // 0, move last item to 0 and reheap.  If end of array, just destroy and decrement tail\n    // and mark.  Assumes the array has already been tested for emptiness; no failure.\n    void prio_pop()  {\n        if (prio_use_tail()) {\n            // there are newly pushed elements; last one higher than top\n            // copy the data\n            this->destroy_item(this->my_tail-1);\n            --(this->my_tail);\n            __TBB_ASSERT(mark <= this->my_tail, \"mark outside bounds after pop\");\n            return;\n        }\n        this->destroy_item(0);\n        if(this->my_tail > 1) {\n            // push the last element down heap\n            __TBB_ASSERT(this->my_item_valid(this->my_tail - 1), nullptr);\n            this->move_item(0,this->my_tail - 1);\n        }\n        --(this->my_tail);\n        if(mark > this->my_tail) --mark;\n        if (this->my_tail > 1) // don't reheap for heap of size 1\n            reheap();\n        __TBB_ASSERT(mark <= this->my_tail, \"mark outside bounds after pop\");\n    }\n\n    const T& prio() {\n        return this->get_my_item(prio_use_tail() ? this->my_tail-1 : 0);\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    message_metainfo& prio_metainfo() {\n        return this->get_my_metainfo(prio_use_tail() ? this->my_tail-1 : 0);\n    }\n#endif\n\n    // turn array into heap\n    void heapify() {\n        if(this->my_tail == 0) {\n            mark = 0;\n            return;\n        }\n        if (!mark) mark = 1;\n        for (; mark<this->my_tail; ++mark) { // for each unheaped element\n            size_type cur_pos = mark;\n            input_type to_place;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n            message_metainfo metainfo;\n#endif\n            this->fetch_item(mark, to_place __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n            do { // push to_place up the heap\n                size_type parent = (cur_pos-1)>>1;\n                if (!compare(this->get_my_item(parent), to_place))\n                    break;\n                this->move_item(cur_pos, parent);\n                cur_pos = parent;\n            } while( cur_pos );\n            this->place_item(cur_pos, to_place __TBB_FLOW_GRAPH_METAINFO_ARG(std::move(metainfo)));\n        }\n    }\n\n    // otherwise heapified array with new root element; rearrange to heap\n    void reheap() {\n        size_type cur_pos=0, child=1;\n        while (child < mark) {\n            size_type target = child;\n            if (child+1<mark &&\n                compare(this->get_my_item(child),\n                        this->get_my_item(child+1)))\n                ++target;\n            // target now has the higher priority child\n            if (compare(this->get_my_item(target),\n                        this->get_my_item(cur_pos)))\n                break;\n            // swap\n            this->swap_items(cur_pos, target);\n            cur_pos = target;\n            child = (cur_pos<<1)+1;\n        }\n    }\n};  // priority_queue_node\n\n//! Forwards messages only if the threshold has not been reached\n/** This node forwards items until its threshold is reached.\n    It contains no buffering.  If the downstream node rejects, the\n    message is dropped. */\ntemplate< typename T, typename DecrementType=continue_msg >\nclass limiter_node : public graph_node, public receiver< T >, public sender< T > {\npublic:\n    typedef T input_type;\n    typedef T output_type;\n    typedef typename receiver<input_type>::predecessor_type predecessor_type;\n    typedef typename sender<output_type>::successor_type successor_type;\n    //TODO: There is a lack of predefined types for its controlling \"decrementer\" port. It should be fixed later.\n\nprivate:\n    size_t my_threshold;\n    size_t my_count; // number of successful puts\n    size_t my_tries; // number of active put attempts\n    size_t my_future_decrement; // number of active decrement\n    reservable_predecessor_cache< T, spin_mutex > my_predecessors;\n    spin_mutex my_mutex;\n    broadcast_cache< T > my_successors;\n\n    //! The internal receiver< DecrementType > that adjusts the count\n    threshold_regulator< limiter_node<T, DecrementType>, DecrementType > decrement;\n\n    graph_task* decrement_counter( long long delta ) {\n        if ( delta > 0 && size_t(delta) > my_threshold ) {\n            delta = my_threshold;\n        }\n\n        {\n            spin_mutex::scoped_lock lock(my_mutex);\n            if ( delta > 0 && size_t(delta) > my_count ) {\n                if( my_tries > 0 ) {\n                    my_future_decrement += (size_t(delta) - my_count);\n                }\n                my_count = 0;\n            }\n            else if ( delta < 0 && size_t(-delta) > my_threshold - my_count ) {\n                my_count = my_threshold;\n            }\n            else {\n                my_count -= size_t(delta); // absolute value of delta is sufficiently small\n            }\n            __TBB_ASSERT(my_count <= my_threshold, \"counter values are truncated to be inside the [0, threshold] interval\");\n        }\n        return forward_task();\n    }\n\n    // Let threshold_regulator call decrement_counter()\n    friend class threshold_regulator< limiter_node<T, DecrementType>, DecrementType >;\n\n    friend class forward_task_bypass< limiter_node<T,DecrementType> >;\n\n    bool check_conditions() {  // always called under lock\n        return ( my_count + my_tries < my_threshold && !my_predecessors.empty() && !my_successors.empty() );\n    }\n\n    // only returns a valid task pointer or nullptr, never SUCCESSFULLY_ENQUEUED\n    graph_task* forward_task() {\n        input_type v;\n        graph_task* rval = nullptr;\n        bool reserved = false;\n\n        {\n            spin_mutex::scoped_lock lock(my_mutex);\n            if ( check_conditions() )\n                ++my_tries;\n            else\n                return nullptr;\n        }\n\n        //SUCCESS\n        // if we can reserve and can put, we consume the reservation\n        // we increment the count and decrement the tries\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        message_metainfo metainfo;\n#endif\n        if ( (my_predecessors.try_reserve(v __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo))) == true ) {\n            reserved = true;\n            if ( (rval = my_successors.try_put_task(v __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo))) != nullptr ) {\n                {\n                    spin_mutex::scoped_lock lock(my_mutex);\n                    ++my_count;\n                    if ( my_future_decrement ) {\n                        if ( my_count > my_future_decrement ) {\n                            my_count -= my_future_decrement;\n                            my_future_decrement = 0;\n                        }\n                        else {\n                            my_future_decrement -= my_count;\n                            my_count = 0;\n                        }\n                    }\n                    --my_tries;\n                    my_predecessors.try_consume();\n                    if ( check_conditions() ) {\n                        if ( is_graph_active(this->my_graph) ) {\n                            typedef forward_task_bypass<limiter_node<T, DecrementType>> task_type;\n                            d1::small_object_allocator allocator{};\n                            graph_task* rtask = allocator.new_object<task_type>( my_graph, allocator, *this );\n                            spawn_in_graph_arena(graph_reference(), *rtask);\n                        }\n                    }\n                }\n                return rval;\n            }\n        }\n        //FAILURE\n        //if we can't reserve, we decrement the tries\n        //if we can reserve but can't put, we decrement the tries and release the reservation\n        {\n            spin_mutex::scoped_lock lock(my_mutex);\n            --my_tries;\n            if (reserved) my_predecessors.try_release();\n            if ( check_conditions() ) {\n                if ( is_graph_active(this->my_graph) ) {\n                    d1::small_object_allocator allocator{};\n                    typedef forward_task_bypass<limiter_node<T, DecrementType>> task_type;\n                    graph_task* t = allocator.new_object<task_type>(my_graph, allocator, *this);\n                    __TBB_ASSERT(!rval, \"Have two tasks to handle\");\n                    return t;\n                }\n            }\n            return rval;\n        }\n    }\n\n    void initialize() {\n        fgt_node(\n            CODEPTR(), FLOW_LIMITER_NODE, &this->my_graph,\n            static_cast<receiver<input_type> *>(this), static_cast<receiver<DecrementType> *>(&decrement),\n            static_cast<sender<output_type> *>(this)\n        );\n    }\n\npublic:\n    //! Constructor\n    limiter_node(graph &g, size_t threshold)\n        : graph_node(g), my_threshold(threshold), my_count(0), my_tries(0), my_future_decrement(0),\n        my_predecessors(this), my_successors(this), decrement(this)\n    {\n        initialize();\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename... Args>\n    limiter_node(const node_set<Args...>& nodes, size_t threshold)\n        : limiter_node(nodes.graph_reference(), threshold) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    //! Copy constructor\n    limiter_node( const limiter_node& src ) : limiter_node(src.my_graph, src.my_threshold) {}\n\n    //! The interface for accessing internal receiver< DecrementType > that adjusts the count\n    receiver<DecrementType>& decrementer() { return decrement; }\n\n    //! Replace the current successor with this new successor\n    bool register_successor( successor_type &r ) override {\n        spin_mutex::scoped_lock lock(my_mutex);\n        bool was_empty = my_successors.empty();\n        my_successors.register_successor(r);\n        //spawn a forward task if this is the only successor\n        if ( was_empty && !my_predecessors.empty() && my_count + my_tries < my_threshold ) {\n            if ( is_graph_active(this->my_graph) ) {\n                d1::small_object_allocator allocator{};\n                typedef forward_task_bypass<limiter_node<T, DecrementType>> task_type;\n                graph_task* t = allocator.new_object<task_type>(my_graph, allocator, *this);\n                spawn_in_graph_arena(graph_reference(), *t);\n            }\n        }\n        return true;\n    }\n\n    //! Removes a successor from this node\n    /** r.remove_predecessor(*this) is also called. */\n    bool remove_successor( successor_type &r ) override {\n        // TODO revamp: investigate why qualification is needed for remove_predecessor() call\n        tbb::detail::d2::remove_predecessor(r, *this);\n        my_successors.remove_successor(r);\n        return true;\n    }\n\n    //! Adds src to the list of cached predecessors.\n    bool register_predecessor( predecessor_type &src ) override {\n        spin_mutex::scoped_lock lock(my_mutex);\n        my_predecessors.add( src );\n        if ( my_count + my_tries < my_threshold && !my_successors.empty() && is_graph_active(this->my_graph) ) {\n            d1::small_object_allocator allocator{};\n            typedef forward_task_bypass<limiter_node<T, DecrementType>> task_type;\n            graph_task* t = allocator.new_object<task_type>(my_graph, allocator, *this);\n            spawn_in_graph_arena(graph_reference(), *t);\n        }\n        return true;\n    }\n\n    //! Removes src from the list of cached predecessors.\n    bool remove_predecessor( predecessor_type &src ) override {\n        my_predecessors.remove( src );\n        return true;\n    }\n\nprotected:\n\n    template< typename R, typename B > friend class run_and_put_task;\n    template<typename X, typename Y> friend class broadcast_cache;\n    template<typename X, typename Y> friend class round_robin_cache;\n\nprivate:\n    //! Puts an item to this receiver\n    graph_task* try_put_task_impl( const T &t __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo) ) {\n        {\n            spin_mutex::scoped_lock lock(my_mutex);\n            if ( my_count + my_tries >= my_threshold )\n                return nullptr;\n            else\n                ++my_tries;\n        }\n\n        graph_task* rtask = my_successors.try_put_task(t __TBB_FLOW_GRAPH_METAINFO_ARG(metainfo));\n        if ( !rtask ) {  // try_put_task failed.\n            spin_mutex::scoped_lock lock(my_mutex);\n            --my_tries;\n            if (check_conditions() && is_graph_active(this->my_graph)) {\n                d1::small_object_allocator allocator{};\n                typedef forward_task_bypass<limiter_node<T, DecrementType>> task_type;\n                rtask = allocator.new_object<task_type>(my_graph, allocator, *this);\n            }\n        }\n        else {\n            spin_mutex::scoped_lock lock(my_mutex);\n            ++my_count;\n            if ( my_future_decrement ) {\n                if ( my_count > my_future_decrement ) {\n                    my_count -= my_future_decrement;\n                    my_future_decrement = 0;\n                }\n                else {\n                    my_future_decrement -= my_count;\n                    my_count = 0;\n                }\n            }\n            --my_tries;\n        }\n        return rtask;\n    }\n\nprotected:\n    graph_task* try_put_task(const T& t) override {\n        return try_put_task_impl(t __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo{}));\n    }\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    graph_task* try_put_task(const T& t, const message_metainfo& metainfo) override {\n        return try_put_task_impl(t, metainfo);\n    }\n#endif\n\n    graph& graph_reference() const override { return my_graph; }\n\n    void reset_node( reset_flags f ) override {\n        my_count = 0;\n        if ( f & rf_clear_edges ) {\n            my_predecessors.clear();\n            my_successors.clear();\n        }\n        else {\n            my_predecessors.reset();\n        }\n        decrement.reset_receiver(f);\n    }\n};  // limiter_node\n\n#include \"detail/_flow_graph_join_impl.h\"\n\ntemplate<typename OutputTuple, typename JP=queueing> class join_node;\n\ntemplate<typename OutputTuple>\nclass join_node<OutputTuple,reserving>: public unfolded_join_node<std::tuple_size<OutputTuple>::value, reserving_port, OutputTuple, reserving> {\nprivate:\n    static const int N = std::tuple_size<OutputTuple>::value;\n    typedef unfolded_join_node<N, reserving_port, OutputTuple, reserving> unfolded_type;\npublic:\n    typedef OutputTuple output_type;\n    typedef typename unfolded_type::input_ports_type input_ports_type;\n     __TBB_NOINLINE_SYM explicit join_node(graph &g) : unfolded_type(g) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_JOIN_NODE_RESERVING, &this->my_graph,\n                                            this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename... Args>\n    __TBB_NOINLINE_SYM join_node(const node_set<Args...>& nodes, reserving = reserving()) : join_node(nodes.graph_reference()) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    __TBB_NOINLINE_SYM join_node(const join_node &other) : unfolded_type(other) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_JOIN_NODE_RESERVING, &this->my_graph,\n                                            this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n};\n\ntemplate<typename OutputTuple>\nclass join_node<OutputTuple,queueing>: public unfolded_join_node<std::tuple_size<OutputTuple>::value, queueing_port, OutputTuple, queueing> {\nprivate:\n    static const int N = std::tuple_size<OutputTuple>::value;\n    typedef unfolded_join_node<N, queueing_port, OutputTuple, queueing> unfolded_type;\npublic:\n    typedef OutputTuple output_type;\n    typedef typename unfolded_type::input_ports_type input_ports_type;\n     __TBB_NOINLINE_SYM explicit join_node(graph &g) : unfolded_type(g) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_JOIN_NODE_QUEUEING, &this->my_graph,\n                                            this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename... Args>\n    __TBB_NOINLINE_SYM join_node(const node_set<Args...>& nodes, queueing = queueing()) : join_node(nodes.graph_reference()) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    __TBB_NOINLINE_SYM join_node(const join_node &other) : unfolded_type(other) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_JOIN_NODE_QUEUEING, &this->my_graph,\n                                            this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n};\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n// Helper function which is well-formed only if all of the elements in OutputTuple\n// satisfies join_node_function_object<body[i], tuple[i], K>\ntemplate <typename OutputTuple, typename K,\n          typename... Functions, std::size_t... Idx>\nvoid join_node_function_objects_helper( std::index_sequence<Idx...> )\n    requires (std::tuple_size_v<OutputTuple> == sizeof...(Functions)) &&\n             (... && join_node_function_object<Functions, std::tuple_element_t<Idx, OutputTuple>, K>);\n\ntemplate <typename OutputTuple, typename K, typename... Functions>\nconcept join_node_functions = requires {\n    join_node_function_objects_helper<OutputTuple, K, Functions...>(std::make_index_sequence<sizeof...(Functions)>{});\n};\n\n#endif\n\n// template for key_matching join_node\n// tag_matching join_node is a specialization of key_matching, and is source-compatible.\ntemplate<typename OutputTuple, typename K, typename KHash>\nclass join_node<OutputTuple, key_matching<K, KHash> > : public unfolded_join_node<std::tuple_size<OutputTuple>::value,\n      key_matching_port, OutputTuple, key_matching<K,KHash> > {\nprivate:\n    static const int N = std::tuple_size<OutputTuple>::value;\n    typedef unfolded_join_node<N, key_matching_port, OutputTuple, key_matching<K,KHash> > unfolded_type;\npublic:\n    typedef OutputTuple output_type;\n    typedef typename unfolded_type::input_ports_type input_ports_type;\n\n#if __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING\n    join_node(graph &g) : unfolded_type(g) {}\n#endif  /* __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING */\n\n    template<typename __TBB_B0, typename __TBB_B1>\n        __TBB_requires(join_node_functions<OutputTuple, K, __TBB_B0, __TBB_B1>)\n     __TBB_NOINLINE_SYM join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1) : unfolded_type(g, b0, b1) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,\n                                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n    template<typename __TBB_B0, typename __TBB_B1, typename __TBB_B2>\n        __TBB_requires(join_node_functions<OutputTuple, K, __TBB_B0, __TBB_B1, __TBB_B2>)\n     __TBB_NOINLINE_SYM join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2) : unfolded_type(g, b0, b1, b2) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,\n                                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n    template<typename __TBB_B0, typename __TBB_B1, typename __TBB_B2, typename __TBB_B3>\n        __TBB_requires(join_node_functions<OutputTuple, K, __TBB_B0, __TBB_B1, __TBB_B2, __TBB_B3>)\n     __TBB_NOINLINE_SYM join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3) : unfolded_type(g, b0, b1, b2, b3) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,\n                                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n    template<typename __TBB_B0, typename __TBB_B1, typename __TBB_B2, typename __TBB_B3, typename __TBB_B4>\n        __TBB_requires(join_node_functions<OutputTuple, K, __TBB_B0, __TBB_B1, __TBB_B2, __TBB_B3, __TBB_B4>)\n     __TBB_NOINLINE_SYM join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4) :\n            unfolded_type(g, b0, b1, b2, b3, b4) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,\n                                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n#if __TBB_VARIADIC_MAX >= 6\n    template<typename __TBB_B0, typename __TBB_B1, typename __TBB_B2, typename __TBB_B3, typename __TBB_B4,\n        typename __TBB_B5>\n        __TBB_requires(join_node_functions<OutputTuple, K, __TBB_B0, __TBB_B1, __TBB_B2, __TBB_B3, __TBB_B4, __TBB_B5>)\n     __TBB_NOINLINE_SYM join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5) :\n            unfolded_type(g, b0, b1, b2, b3, b4, b5) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,\n                                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n#endif\n#if __TBB_VARIADIC_MAX >= 7\n    template<typename __TBB_B0, typename __TBB_B1, typename __TBB_B2, typename __TBB_B3, typename __TBB_B4,\n        typename __TBB_B5, typename __TBB_B6>\n        __TBB_requires(join_node_functions<OutputTuple, K, __TBB_B0, __TBB_B1, __TBB_B2, __TBB_B3, __TBB_B4, __TBB_B5, __TBB_B6>)\n     __TBB_NOINLINE_SYM join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6) :\n            unfolded_type(g, b0, b1, b2, b3, b4, b5, b6) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,\n                                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n#endif\n#if __TBB_VARIADIC_MAX >= 8\n    template<typename __TBB_B0, typename __TBB_B1, typename __TBB_B2, typename __TBB_B3, typename __TBB_B4,\n        typename __TBB_B5, typename __TBB_B6, typename __TBB_B7>\n        __TBB_requires(join_node_functions<OutputTuple, K, __TBB_B0, __TBB_B1, __TBB_B2, __TBB_B3, __TBB_B4, __TBB_B5, __TBB_B6, __TBB_B7>)\n     __TBB_NOINLINE_SYM join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6,\n            __TBB_B7 b7) : unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,\n                                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n#endif\n#if __TBB_VARIADIC_MAX >= 9\n    template<typename __TBB_B0, typename __TBB_B1, typename __TBB_B2, typename __TBB_B3, typename __TBB_B4,\n        typename __TBB_B5, typename __TBB_B6, typename __TBB_B7, typename __TBB_B8>\n        __TBB_requires(join_node_functions<OutputTuple, K, __TBB_B0, __TBB_B1, __TBB_B2, __TBB_B3, __TBB_B4, __TBB_B5, __TBB_B6, __TBB_B7, __TBB_B8>)\n     __TBB_NOINLINE_SYM join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6,\n            __TBB_B7 b7, __TBB_B8 b8) : unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7, b8) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,\n                                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n#endif\n#if __TBB_VARIADIC_MAX >= 10\n    template<typename __TBB_B0, typename __TBB_B1, typename __TBB_B2, typename __TBB_B3, typename __TBB_B4,\n        typename __TBB_B5, typename __TBB_B6, typename __TBB_B7, typename __TBB_B8, typename __TBB_B9>\n        __TBB_requires(join_node_functions<OutputTuple, K, __TBB_B0, __TBB_B1, __TBB_B2, __TBB_B3, __TBB_B4, __TBB_B5, __TBB_B6, __TBB_B7, __TBB_B8, __TBB_B9>)\n     __TBB_NOINLINE_SYM join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6,\n            __TBB_B7 b7, __TBB_B8 b8, __TBB_B9 b9) : unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,\n                                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n#endif\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <\n#if (__clang_major__ == 3 && __clang_minor__ == 4)\n        // clang 3.4 misdeduces 'Args...' for 'node_set' while it can cope with template template parameter.\n        template<typename...> class node_set,\n#endif\n        typename... Args, typename... Bodies\n    >\n    __TBB_requires((sizeof...(Bodies) == 0) || join_node_functions<OutputTuple, K, Bodies...>)\n    __TBB_NOINLINE_SYM join_node(const node_set<Args...>& nodes, Bodies... bodies)\n        : join_node(nodes.graph_reference(), bodies...) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n\n    __TBB_NOINLINE_SYM join_node(const join_node &other) : unfolded_type(other) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,\n                                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n};\n\n// indexer node\n#include \"detail/_flow_graph_indexer_impl.h\"\n\n// TODO: Implement interface with variadic template or tuple\ntemplate<typename T0, typename T1=null_type, typename T2=null_type, typename T3=null_type,\n                      typename T4=null_type, typename T5=null_type, typename T6=null_type,\n                      typename T7=null_type, typename T8=null_type, typename T9=null_type> class indexer_node;\n\n//indexer node specializations\ntemplate<typename T0>\nclass indexer_node<T0> : public unfolded_indexer_node<std::tuple<T0> > {\nprivate:\n    static const int N = 1;\npublic:\n    typedef std::tuple<T0> InputTuple;\n    typedef tagged_msg<size_t, T0> output_type;\n    typedef unfolded_indexer_node<InputTuple> unfolded_type;\n    __TBB_NOINLINE_SYM indexer_node(graph& g) : unfolded_type(g) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_INDEXER_NODE, &this->my_graph,\n                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename... Args>\n    indexer_node(const node_set<Args...>& nodes) : indexer_node(nodes.graph_reference()) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    // Copy constructor\n    __TBB_NOINLINE_SYM indexer_node( const indexer_node& other ) : unfolded_type(other) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_INDEXER_NODE, &this->my_graph,\n                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n};\n\ntemplate<typename T0, typename T1>\nclass indexer_node<T0, T1> : public unfolded_indexer_node<std::tuple<T0, T1> > {\nprivate:\n    static const int N = 2;\npublic:\n    typedef std::tuple<T0, T1> InputTuple;\n    typedef tagged_msg<size_t, T0, T1> output_type;\n    typedef unfolded_indexer_node<InputTuple> unfolded_type;\n    __TBB_NOINLINE_SYM indexer_node(graph& g) : unfolded_type(g) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_INDEXER_NODE, &this->my_graph,\n                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename... Args>\n    indexer_node(const node_set<Args...>& nodes) : indexer_node(nodes.graph_reference()) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    // Copy constructor\n    __TBB_NOINLINE_SYM indexer_node( const indexer_node& other ) : unfolded_type(other) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_INDEXER_NODE, &this->my_graph,\n                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n};\n\ntemplate<typename T0, typename T1, typename T2>\nclass indexer_node<T0, T1, T2> : public unfolded_indexer_node<std::tuple<T0, T1, T2> > {\nprivate:\n    static const int N = 3;\npublic:\n    typedef std::tuple<T0, T1, T2> InputTuple;\n    typedef tagged_msg<size_t, T0, T1, T2> output_type;\n    typedef unfolded_indexer_node<InputTuple> unfolded_type;\n    __TBB_NOINLINE_SYM indexer_node(graph& g) : unfolded_type(g) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_INDEXER_NODE, &this->my_graph,\n                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename... Args>\n    indexer_node(const node_set<Args...>& nodes) : indexer_node(nodes.graph_reference()) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    // Copy constructor\n    __TBB_NOINLINE_SYM indexer_node( const indexer_node& other ) : unfolded_type(other) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_INDEXER_NODE, &this->my_graph,\n                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n};\n\ntemplate<typename T0, typename T1, typename T2, typename T3>\nclass indexer_node<T0, T1, T2, T3> : public unfolded_indexer_node<std::tuple<T0, T1, T2, T3> > {\nprivate:\n    static const int N = 4;\npublic:\n    typedef std::tuple<T0, T1, T2, T3> InputTuple;\n    typedef tagged_msg<size_t, T0, T1, T2, T3> output_type;\n    typedef unfolded_indexer_node<InputTuple> unfolded_type;\n    __TBB_NOINLINE_SYM indexer_node(graph& g) : unfolded_type(g) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_INDEXER_NODE, &this->my_graph,\n                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename... Args>\n    indexer_node(const node_set<Args...>& nodes) : indexer_node(nodes.graph_reference()) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    // Copy constructor\n    __TBB_NOINLINE_SYM indexer_node( const indexer_node& other ) : unfolded_type(other) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_INDEXER_NODE, &this->my_graph,\n                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n};\n\ntemplate<typename T0, typename T1, typename T2, typename T3, typename T4>\nclass indexer_node<T0, T1, T2, T3, T4> : public unfolded_indexer_node<std::tuple<T0, T1, T2, T3, T4> > {\nprivate:\n    static const int N = 5;\npublic:\n    typedef std::tuple<T0, T1, T2, T3, T4> InputTuple;\n    typedef tagged_msg<size_t, T0, T1, T2, T3, T4> output_type;\n    typedef unfolded_indexer_node<InputTuple> unfolded_type;\n    __TBB_NOINLINE_SYM indexer_node(graph& g) : unfolded_type(g) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_INDEXER_NODE, &this->my_graph,\n                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename... Args>\n    indexer_node(const node_set<Args...>& nodes) : indexer_node(nodes.graph_reference()) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    // Copy constructor\n    __TBB_NOINLINE_SYM indexer_node( const indexer_node& other ) : unfolded_type(other) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_INDEXER_NODE, &this->my_graph,\n                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n};\n\n#if __TBB_VARIADIC_MAX >= 6\ntemplate<typename T0, typename T1, typename T2, typename T3, typename T4, typename T5>\nclass indexer_node<T0, T1, T2, T3, T4, T5> : public unfolded_indexer_node<std::tuple<T0, T1, T2, T3, T4, T5> > {\nprivate:\n    static const int N = 6;\npublic:\n    typedef std::tuple<T0, T1, T2, T3, T4, T5> InputTuple;\n    typedef tagged_msg<size_t, T0, T1, T2, T3, T4, T5> output_type;\n    typedef unfolded_indexer_node<InputTuple> unfolded_type;\n    __TBB_NOINLINE_SYM indexer_node(graph& g) : unfolded_type(g) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_INDEXER_NODE, &this->my_graph,\n                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename... Args>\n    indexer_node(const node_set<Args...>& nodes) : indexer_node(nodes.graph_reference()) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    // Copy constructor\n    __TBB_NOINLINE_SYM indexer_node( const indexer_node& other ) : unfolded_type(other) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_INDEXER_NODE, &this->my_graph,\n                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n};\n#endif //variadic max 6\n\n#if __TBB_VARIADIC_MAX >= 7\ntemplate<typename T0, typename T1, typename T2, typename T3, typename T4, typename T5,\n         typename T6>\nclass indexer_node<T0, T1, T2, T3, T4, T5, T6> : public unfolded_indexer_node<std::tuple<T0, T1, T2, T3, T4, T5, T6> > {\nprivate:\n    static const int N = 7;\npublic:\n    typedef std::tuple<T0, T1, T2, T3, T4, T5, T6> InputTuple;\n    typedef tagged_msg<size_t, T0, T1, T2, T3, T4, T5, T6> output_type;\n    typedef unfolded_indexer_node<InputTuple> unfolded_type;\n    __TBB_NOINLINE_SYM indexer_node(graph& g) : unfolded_type(g) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_INDEXER_NODE, &this->my_graph,\n                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename... Args>\n    indexer_node(const node_set<Args...>& nodes) : indexer_node(nodes.graph_reference()) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    // Copy constructor\n    __TBB_NOINLINE_SYM indexer_node( const indexer_node& other ) : unfolded_type(other) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_INDEXER_NODE, &this->my_graph,\n                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n};\n#endif //variadic max 7\n\n#if __TBB_VARIADIC_MAX >= 8\ntemplate<typename T0, typename T1, typename T2, typename T3, typename T4, typename T5,\n         typename T6, typename T7>\nclass indexer_node<T0, T1, T2, T3, T4, T5, T6, T7> : public unfolded_indexer_node<std::tuple<T0, T1, T2, T3, T4, T5, T6, T7> > {\nprivate:\n    static const int N = 8;\npublic:\n    typedef std::tuple<T0, T1, T2, T3, T4, T5, T6, T7> InputTuple;\n    typedef tagged_msg<size_t, T0, T1, T2, T3, T4, T5, T6, T7> output_type;\n    typedef unfolded_indexer_node<InputTuple> unfolded_type;\n    indexer_node(graph& g) : unfolded_type(g) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_INDEXER_NODE, &this->my_graph,\n                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename... Args>\n    indexer_node(const node_set<Args...>& nodes) : indexer_node(nodes.graph_reference()) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    // Copy constructor\n    indexer_node( const indexer_node& other ) : unfolded_type(other) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_INDEXER_NODE, &this->my_graph,\n                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n};\n#endif //variadic max 8\n\n#if __TBB_VARIADIC_MAX >= 9\ntemplate<typename T0, typename T1, typename T2, typename T3, typename T4, typename T5,\n         typename T6, typename T7, typename T8>\nclass indexer_node<T0, T1, T2, T3, T4, T5, T6, T7, T8> : public unfolded_indexer_node<std::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8> > {\nprivate:\n    static const int N = 9;\npublic:\n    typedef std::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8> InputTuple;\n    typedef tagged_msg<size_t, T0, T1, T2, T3, T4, T5, T6, T7, T8> output_type;\n    typedef unfolded_indexer_node<InputTuple> unfolded_type;\n    __TBB_NOINLINE_SYM indexer_node(graph& g) : unfolded_type(g) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_INDEXER_NODE, &this->my_graph,\n                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename... Args>\n    indexer_node(const node_set<Args...>& nodes) : indexer_node(nodes.graph_reference()) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    // Copy constructor\n    __TBB_NOINLINE_SYM indexer_node( const indexer_node& other ) : unfolded_type(other) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_INDEXER_NODE, &this->my_graph,\n                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n};\n#endif //variadic max 9\n\n#if __TBB_VARIADIC_MAX >= 10\ntemplate<typename T0, typename T1, typename T2, typename T3, typename T4, typename T5,\n         typename T6, typename T7, typename T8, typename T9>\nclass indexer_node/*default*/ : public unfolded_indexer_node<std::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> > {\nprivate:\n    static const int N = 10;\npublic:\n    typedef std::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> InputTuple;\n    typedef tagged_msg<size_t, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> output_type;\n    typedef unfolded_indexer_node<InputTuple> unfolded_type;\n    __TBB_NOINLINE_SYM indexer_node(graph& g) : unfolded_type(g) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_INDEXER_NODE, &this->my_graph,\n                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename... Args>\n    indexer_node(const node_set<Args...>& nodes) : indexer_node(nodes.graph_reference()) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    // Copy constructor\n    __TBB_NOINLINE_SYM indexer_node( const indexer_node& other ) : unfolded_type(other) {\n        fgt_multiinput_node<N>( CODEPTR(), FLOW_INDEXER_NODE, &this->my_graph,\n                                           this->input_ports(), static_cast< sender< output_type > *>(this) );\n    }\n\n};\n#endif //variadic max 10\n\ntemplate< typename T >\ninline void internal_make_edge( sender<T> &p, receiver<T> &s ) {\n    register_successor(p, s);\n    fgt_make_edge( &p, &s );\n}\n\n//! Makes an edge between a single predecessor and a single successor\ntemplate< typename T >\ninline void make_edge( sender<T> &p, receiver<T> &s ) {\n    internal_make_edge( p, s );\n}\n\n//Makes an edge from port 0 of a multi-output predecessor to port 0 of a multi-input successor.\ntemplate< typename T, typename V,\n          typename = typename T::output_ports_type, typename = typename V::input_ports_type >\ninline void make_edge( T& output, V& input) {\n    make_edge(std::get<0>(output.output_ports()), std::get<0>(input.input_ports()));\n}\n\n//Makes an edge from port 0 of a multi-output predecessor to a receiver.\ntemplate< typename T, typename R,\n          typename = typename T::output_ports_type >\ninline void make_edge( T& output, receiver<R>& input) {\n     make_edge(std::get<0>(output.output_ports()), input);\n}\n\n//Makes an edge from a sender to port 0 of a multi-input successor.\ntemplate< typename S,  typename V,\n          typename = typename V::input_ports_type >\ninline void make_edge( sender<S>& output, V& input) {\n     make_edge(output, std::get<0>(input.input_ports()));\n}\n\ntemplate< typename T >\ninline void internal_remove_edge( sender<T> &p, receiver<T> &s ) {\n    remove_successor( p, s );\n    fgt_remove_edge( &p, &s );\n}\n\n//! Removes an edge between a single predecessor and a single successor\ntemplate< typename T >\ninline void remove_edge( sender<T> &p, receiver<T> &s ) {\n    internal_remove_edge( p, s );\n}\n\n//Removes an edge between port 0 of a multi-output predecessor and port 0 of a multi-input successor.\ntemplate< typename T, typename V,\n          typename = typename T::output_ports_type, typename = typename V::input_ports_type >\ninline void remove_edge( T& output, V& input) {\n    remove_edge(std::get<0>(output.output_ports()), std::get<0>(input.input_ports()));\n}\n\n//Removes an edge between port 0 of a multi-output predecessor and a receiver.\ntemplate< typename T, typename R,\n          typename = typename T::output_ports_type >\ninline void remove_edge( T& output, receiver<R>& input) {\n     remove_edge(std::get<0>(output.output_ports()), input);\n}\n//Removes an edge between a sender and port 0 of a multi-input successor.\ntemplate< typename S,  typename V,\n          typename = typename V::input_ports_type >\ninline void remove_edge( sender<S>& output, V& input) {\n     remove_edge(output, std::get<0>(input.input_ports()));\n}\n\n//! Returns a copy of the body from a function or continue node\ntemplate< typename Body, typename Node >\nBody copy_body( Node &n ) {\n    return n.template copy_function_object<Body>();\n}\n\n//composite_node\ntemplate< typename InputTuple, typename OutputTuple > class composite_node;\n\ntemplate< typename... InputTypes, typename... OutputTypes>\nclass composite_node <std::tuple<InputTypes...>, std::tuple<OutputTypes...> > : public graph_node {\n\npublic:\n    typedef std::tuple< receiver<InputTypes>&... > input_ports_type;\n    typedef std::tuple< sender<OutputTypes>&... > output_ports_type;\n\nprivate:\n    std::unique_ptr<input_ports_type> my_input_ports;\n    std::unique_ptr<output_ports_type> my_output_ports;\n\n    static const size_t NUM_INPUTS = sizeof...(InputTypes);\n    static const size_t NUM_OUTPUTS = sizeof...(OutputTypes);\n\nprotected:\n    void reset_node(reset_flags) override {}\n\npublic:\n    composite_node( graph &g ) : graph_node(g) {\n        fgt_multiinput_multioutput_node( CODEPTR(), FLOW_COMPOSITE_NODE, this, &this->my_graph );\n    }\n\n    template<typename T1, typename T2>\n    void set_external_ports(T1&& input_ports_tuple, T2&& output_ports_tuple) {\n        static_assert(NUM_INPUTS == std::tuple_size<input_ports_type>::value, \"number of arguments does not match number of input ports\");\n        static_assert(NUM_OUTPUTS == std::tuple_size<output_ports_type>::value, \"number of arguments does not match number of output ports\");\n\n        fgt_internal_input_alias_helper<T1, NUM_INPUTS>::alias_port( this, input_ports_tuple);\n        fgt_internal_output_alias_helper<T2, NUM_OUTPUTS>::alias_port( this, output_ports_tuple);\n\n        my_input_ports.reset( new input_ports_type(std::forward<T1>(input_ports_tuple)) );\n        my_output_ports.reset( new output_ports_type(std::forward<T2>(output_ports_tuple)) );\n    }\n\n    template< typename... NodeTypes >\n    void add_visible_nodes(const NodeTypes&... n) { add_nodes_impl(this, true, n...); }\n\n    template< typename... NodeTypes >\n    void add_nodes(const NodeTypes&... n) { add_nodes_impl(this, false, n...); }\n\n\n    input_ports_type& input_ports() {\n         __TBB_ASSERT(my_input_ports, \"input ports not set, call set_external_ports to set input ports\");\n         return *my_input_ports;\n    }\n\n    output_ports_type& output_ports() {\n         __TBB_ASSERT(my_output_ports, \"output ports not set, call set_external_ports to set output ports\");\n         return *my_output_ports;\n    }\n};  // class composite_node\n\n//composite_node with only input ports\ntemplate< typename... InputTypes>\nclass composite_node <std::tuple<InputTypes...>, std::tuple<> > : public graph_node {\npublic:\n    typedef std::tuple< receiver<InputTypes>&... > input_ports_type;\n\nprivate:\n    std::unique_ptr<input_ports_type> my_input_ports;\n    static const size_t NUM_INPUTS = sizeof...(InputTypes);\n\nprotected:\n    void reset_node(reset_flags) override {}\n\npublic:\n    composite_node( graph &g ) : graph_node(g) {\n        fgt_composite( CODEPTR(), this, &g );\n    }\n\n   template<typename T>\n   void set_external_ports(T&& input_ports_tuple) {\n       static_assert(NUM_INPUTS == std::tuple_size<input_ports_type>::value, \"number of arguments does not match number of input ports\");\n\n       fgt_internal_input_alias_helper<T, NUM_INPUTS>::alias_port( this, input_ports_tuple);\n\n       my_input_ports.reset( new input_ports_type(std::forward<T>(input_ports_tuple)) );\n   }\n\n    template< typename... NodeTypes >\n    void add_visible_nodes(const NodeTypes&... n) { add_nodes_impl(this, true, n...); }\n\n    template< typename... NodeTypes >\n    void add_nodes( const NodeTypes&... n) { add_nodes_impl(this, false, n...); }\n\n\n    input_ports_type& input_ports() {\n         __TBB_ASSERT(my_input_ports, \"input ports not set, call set_external_ports to set input ports\");\n         return *my_input_ports;\n    }\n\n};  // class composite_node\n\n//composite_nodes with only output_ports\ntemplate<typename... OutputTypes>\nclass composite_node <std::tuple<>, std::tuple<OutputTypes...> > : public graph_node {\npublic:\n    typedef std::tuple< sender<OutputTypes>&... > output_ports_type;\n\nprivate:\n    std::unique_ptr<output_ports_type> my_output_ports;\n    static const size_t NUM_OUTPUTS = sizeof...(OutputTypes);\n\nprotected:\n    void reset_node(reset_flags) override {}\n\npublic:\n    __TBB_NOINLINE_SYM composite_node( graph &g ) : graph_node(g) {\n        fgt_composite( CODEPTR(), this, &g );\n    }\n\n   template<typename T>\n   void set_external_ports(T&& output_ports_tuple) {\n       static_assert(NUM_OUTPUTS == std::tuple_size<output_ports_type>::value, \"number of arguments does not match number of output ports\");\n\n       fgt_internal_output_alias_helper<T, NUM_OUTPUTS>::alias_port( this, output_ports_tuple);\n\n       my_output_ports.reset( new output_ports_type(std::forward<T>(output_ports_tuple)) );\n   }\n\n    template<typename... NodeTypes >\n    void add_visible_nodes(const NodeTypes&... n) { add_nodes_impl(this, true, n...); }\n\n    template<typename... NodeTypes >\n    void add_nodes(const NodeTypes&... n) { add_nodes_impl(this, false, n...); }\n\n\n    output_ports_type& output_ports() {\n         __TBB_ASSERT(my_output_ports, \"output ports not set, call set_external_ports to set output ports\");\n         return *my_output_ports;\n    }\n\n};  // class composite_node\n\ntemplate<typename Gateway>\nclass async_body_base: no_assign {\npublic:\n    typedef Gateway gateway_type;\n\n    async_body_base(gateway_type *gateway): my_gateway(gateway) { }\n    void set_gateway(gateway_type *gateway) {\n        my_gateway = gateway;\n    }\n\nprotected:\n    gateway_type *my_gateway;\n};\n\ntemplate<typename Input, typename Ports, typename Gateway, typename Body>\nclass async_body: public async_body_base<Gateway> {\nprivate:\n    Body my_body;\n\npublic:\n    typedef async_body_base<Gateway> base_type;\n    typedef Gateway gateway_type;\n\n    async_body(const Body &body, gateway_type *gateway)\n        : base_type(gateway), my_body(body) { }\n\n    void operator()( const Input &v, Ports & ) noexcept(noexcept(tbb::detail::invoke(my_body, v, std::declval<gateway_type&>()))) {\n        tbb::detail::invoke(my_body, v, *this->my_gateway);\n    }\n\n    Body get_body() { return my_body; }\n};\n\n//! Implements async node\ntemplate < typename Input, typename Output,\n           typename Policy = queueing_lightweight >\n    __TBB_requires(std::default_initializable<Input> && std::copy_constructible<Input>)\nclass async_node\n    : public multifunction_node< Input, std::tuple< Output >, Policy >, public sender< Output >\n{\n    typedef multifunction_node< Input, std::tuple< Output >, Policy > base_type;\n    typedef multifunction_input<\n        Input, typename base_type::output_ports_type, Policy, cache_aligned_allocator<Input>> mfn_input_type;\n\npublic:\n    typedef Input input_type;\n    typedef Output output_type;\n    typedef receiver<input_type> receiver_type;\n    typedef receiver<output_type> successor_type;\n    typedef sender<input_type> predecessor_type;\n    typedef receiver_gateway<output_type> gateway_type;\n    typedef async_body_base<gateway_type> async_body_base_type;\n    typedef typename base_type::output_ports_type output_ports_type;\n\nprivate:\n    class receiver_gateway_impl: public receiver_gateway<Output> {\n    public:\n        receiver_gateway_impl(async_node* node): my_node(node) {}\n        void reserve_wait() override {\n            fgt_async_reserve(static_cast<typename async_node::receiver_type *>(my_node), &my_node->my_graph);\n            my_node->my_graph.reserve_wait();\n        }\n\n        void release_wait() override {\n            async_node* n = my_node;\n            graph* g = &n->my_graph;\n            g->release_wait();\n            fgt_async_commit(static_cast<typename async_node::receiver_type *>(n), g);\n        }\n\n        //! Implements gateway_type::try_put for an external activity to submit a message to FG\n        bool try_put(const Output &i) override {\n            return my_node->try_put_impl(i);\n        }\n\n    private:\n        async_node* my_node;\n    } my_gateway;\n\n    //The substitute of 'this' for member construction, to prevent compiler warnings\n    async_node* self() { return this; }\n\n    //! Implements gateway_type::try_put for an external activity to submit a message to FG\n    bool try_put_impl(const Output &i) {\n        multifunction_output<Output> &port_0 = output_port<0>(*this);\n        broadcast_cache<output_type>& port_successors = port_0.successors();\n        fgt_async_try_put_begin(this, &port_0);\n        // TODO revamp: change to std::list<graph_task*>\n        graph_task_list tasks;\n        bool is_at_least_one_put_successful = port_successors.gather_successful_try_puts(i, tasks);\n        __TBB_ASSERT( is_at_least_one_put_successful || tasks.empty(),\n                      \"Return status is inconsistent with the method operation.\" );\n\n        while( !tasks.empty() ) {\n            enqueue_in_graph_arena(this->my_graph, tasks.pop_front());\n        }\n        fgt_async_try_put_end(this, &port_0);\n        return is_at_least_one_put_successful;\n    }\n\npublic:\n    template<typename Body>\n        __TBB_requires(async_node_body<Body, input_type, gateway_type>)\n    __TBB_NOINLINE_SYM async_node(\n        graph &g, size_t concurrency,\n        Body body, Policy = Policy(), node_priority_t a_priority = no_priority\n    ) : base_type(\n        g, concurrency,\n        async_body<Input, typename base_type::output_ports_type, gateway_type, Body>\n        (body, &my_gateway), a_priority ), my_gateway(self()) {\n        fgt_multioutput_node_with_body<1>(\n            CODEPTR(), FLOW_ASYNC_NODE,\n            &this->my_graph, static_cast<receiver<input_type> *>(this),\n            this->output_ports(), this->my_body\n        );\n    }\n\n    template <typename Body>\n        __TBB_requires(async_node_body<Body, input_type, gateway_type>)\n    __TBB_NOINLINE_SYM async_node(graph& g, size_t concurrency, Body body, node_priority_t a_priority)\n        : async_node(g, concurrency, body, Policy(), a_priority) {}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename Body, typename... Args>\n        __TBB_requires(async_node_body<Body, input_type, gateway_type>)\n    __TBB_NOINLINE_SYM async_node(\n        const node_set<Args...>& nodes, size_t concurrency, Body body,\n        Policy = Policy(), node_priority_t a_priority = no_priority )\n        : async_node(nodes.graph_reference(), concurrency, body, a_priority) {\n        make_edges_in_order(nodes, *this);\n    }\n\n    template <typename Body, typename... Args>\n        __TBB_requires(async_node_body<Body, input_type, gateway_type>)\n    __TBB_NOINLINE_SYM async_node(const node_set<Args...>& nodes, size_t concurrency, Body body, node_priority_t a_priority)\n        : async_node(nodes, concurrency, body, Policy(), a_priority) {}\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n\n    __TBB_NOINLINE_SYM async_node( const async_node &other ) : base_type(other), sender<Output>(), my_gateway(self()) {\n        static_cast<async_body_base_type*>(this->my_body->get_body_ptr())->set_gateway(&my_gateway);\n        static_cast<async_body_base_type*>(this->my_init_body->get_body_ptr())->set_gateway(&my_gateway);\n\n        fgt_multioutput_node_with_body<1>( CODEPTR(), FLOW_ASYNC_NODE,\n                &this->my_graph, static_cast<receiver<input_type> *>(this),\n                this->output_ports(), this->my_body );\n    }\n\n    gateway_type& gateway() {\n        return my_gateway;\n    }\n\n    // Define sender< Output >\n\n    //! Add a new successor to this node\n    bool register_successor(successor_type&) override {\n        __TBB_ASSERT(false, \"Successors must be registered only via ports\");\n        return false;\n    }\n\n    //! Removes a successor from this node\n    bool remove_successor(successor_type&) override {\n        __TBB_ASSERT(false, \"Successors must be removed only via ports\");\n        return false;\n    }\n\n    template<typename Body>\n    Body copy_function_object() {\n        typedef multifunction_body<input_type, typename base_type::output_ports_type> mfn_body_type;\n        typedef async_body<Input, typename base_type::output_ports_type, gateway_type, Body> async_body_type;\n        mfn_body_type &body_ref = *this->my_body;\n        async_body_type ab = *static_cast<async_body_type*>(dynamic_cast< multifunction_body_leaf<input_type, typename base_type::output_ports_type, async_body_type> & >(body_ref).get_body_ptr());\n        return ab.get_body();\n    }\n\nprotected:\n\n    void reset_node( reset_flags f) override {\n       base_type::reset_node(f);\n    }\n};\n\n#include \"detail/_flow_graph_node_set_impl.h\"\n\ntemplate< typename T >\nclass overwrite_node : public graph_node, public receiver<T>, public sender<T> {\npublic:\n    typedef T input_type;\n    typedef T output_type;\n    typedef typename receiver<input_type>::predecessor_type predecessor_type;\n    typedef typename sender<output_type>::successor_type successor_type;\n\n    __TBB_NOINLINE_SYM explicit overwrite_node(graph &g)\n        : graph_node(g), my_successors(this), my_buffer_is_valid(false)\n    {\n        fgt_node( CODEPTR(), FLOW_OVERWRITE_NODE, &this->my_graph,\n                  static_cast<receiver<input_type> *>(this), static_cast<sender<output_type> *>(this) );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename... Args>\n    overwrite_node(const node_set<Args...>& nodes) : overwrite_node(nodes.graph_reference()) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    //! Copy constructor; doesn't take anything from src; default won't work\n    __TBB_NOINLINE_SYM overwrite_node( const overwrite_node& src ) : overwrite_node(src.my_graph) {}\n\n    ~overwrite_node() {}\n\n    bool register_successor( successor_type &s ) override {\n        spin_mutex::scoped_lock l( my_mutex );\n        if (my_buffer_is_valid && is_graph_active( my_graph )) {\n            // We have a valid value that must be forwarded immediately.\n            bool ret = s.try_put( my_buffer );\n            if ( ret ) {\n                // We add the successor that accepted our put\n                my_successors.register_successor( s );\n            } else {\n                // In case of reservation a race between the moment of reservation and register_successor can appear,\n                // because failed reserve does not mean that register_successor is not ready to put a message immediately.\n                // We have some sort of infinite loop: reserving node tries to set pull state for the edge,\n                // but overwrite_node tries to return push state back. That is why we have to break this loop with task creation.\n                d1::small_object_allocator allocator{};\n                typedef register_predecessor_task task_type;\n                graph_task* t = allocator.new_object<task_type>(graph_reference(), allocator, *this, s);\n                spawn_in_graph_arena( my_graph, *t );\n            }\n        } else {\n            // No valid value yet, just add as successor\n            my_successors.register_successor( s );\n        }\n        return true;\n    }\n\n    bool remove_successor( successor_type &s ) override {\n        spin_mutex::scoped_lock l( my_mutex );\n        my_successors.remove_successor(s);\n        return true;\n    }\n\n    bool try_get( input_type &v ) override {\n        spin_mutex::scoped_lock l( my_mutex );\n        if ( my_buffer_is_valid ) {\n            v = my_buffer;\n            return true;\n        }\n        return false;\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    bool try_get( input_type &v, message_metainfo& metainfo ) override {\n        spin_mutex::scoped_lock l( my_mutex );\n        if (my_buffer_is_valid) {\n            v = my_buffer;\n            metainfo = my_buffered_metainfo;\n\n            // Since the successor of the node will use move semantics while wrapping the metainfo\n            // that is designed to transfer the ownership of the value from single-push buffer to the task\n            // It is required to reserve one more reference here because the value keeps in the buffer\n            // and the ownership is not transferred\n            for (auto msg_waiter : metainfo.waiters()) {\n                msg_waiter->reserve(1);\n            }\n            return true;\n        }\n        return false;\n    }\n#endif\n\n    //! Reserves an item\n    bool try_reserve( T &v ) override {\n        return try_get(v);\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\nprivate:\n    bool try_reserve(T& v, message_metainfo& metainfo) override {\n        spin_mutex::scoped_lock l( my_mutex );\n        if (my_buffer_is_valid) {\n            v = my_buffer;\n            metainfo = my_buffered_metainfo;\n            return true;\n        }\n        return false;\n    }\npublic:\n#endif\n\n    //! Releases the reserved item\n    bool try_release() override { return true; }\n\n    //! Consumes the reserved item\n    bool try_consume() override { return true; }\n\n    bool is_valid() {\n       spin_mutex::scoped_lock l( my_mutex );\n       return my_buffer_is_valid;\n    }\n\n    void clear() {\n       spin_mutex::scoped_lock l( my_mutex );\n       my_buffer_is_valid = false;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n       for (auto msg_waiter : my_buffered_metainfo.waiters()) {\n           msg_waiter->release(1);\n       }\n       my_buffered_metainfo = message_metainfo{};\n#endif\n    }\n\nprotected:\n\n    template< typename R, typename B > friend class run_and_put_task;\n    template<typename X, typename Y> friend class broadcast_cache;\n    template<typename X, typename Y> friend class round_robin_cache;\n    graph_task* try_put_task( const input_type &v ) override {\n        spin_mutex::scoped_lock l( my_mutex );\n        return try_put_task_impl(v __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo{}));\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    graph_task* try_put_task(const input_type& v, const message_metainfo& metainfo) override {\n        spin_mutex::scoped_lock l( my_mutex );\n        return try_put_task_impl(v, metainfo);\n    }\n#endif\n\n    graph_task * try_put_task_impl(const input_type &v __TBB_FLOW_GRAPH_METAINFO_ARG(const message_metainfo& metainfo)) {\n        my_buffer = v;\n        my_buffer_is_valid = true;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n        // Since the new item is pushed to the buffer - reserving the waiters\n        for (auto msg_waiter : metainfo.waiters()) {\n            msg_waiter->reserve(1);\n        }\n\n        // Since the item is taken out from the buffer - releasing the stored waiters\n        for (auto msg_waiter : my_buffered_metainfo.waiters()) {\n            msg_waiter->release(1);\n        }\n\n        my_buffered_metainfo = metainfo;\n#endif\n        graph_task* rtask = my_successors.try_put_task(v __TBB_FLOW_GRAPH_METAINFO_ARG(my_buffered_metainfo) );\n        if (!rtask) rtask = SUCCESSFULLY_ENQUEUED;\n        return rtask;\n    }\n\n    graph& graph_reference() const override {\n        return my_graph;\n    }\n\n    //! Breaks an infinite loop between the node reservation and register_successor call\n    struct register_predecessor_task : public graph_task {\n        register_predecessor_task(\n            graph& g, d1::small_object_allocator& allocator, predecessor_type& owner, successor_type& succ)\n            : graph_task(g, allocator), o(owner), s(succ) {};\n\n        d1::task* execute(d1::execution_data& ed) override {\n            // TODO revamp: investigate why qualification is needed for register_successor() call\n            using tbb::detail::d2::register_predecessor;\n            using tbb::detail::d2::register_successor;\n            if ( !register_predecessor(s, o) ) {\n                register_successor(o, s);\n            }\n            finalize<register_predecessor_task>(ed);\n            return nullptr;\n        }\n\n        d1::task* cancel(d1::execution_data& ed) override {\n            finalize<register_predecessor_task>(ed);\n            return nullptr;\n        }\n\n        predecessor_type& o;\n        successor_type& s;\n    };\n\n    spin_mutex my_mutex;\n    broadcast_cache< input_type, null_rw_mutex > my_successors;\n    input_type my_buffer;\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    message_metainfo my_buffered_metainfo;\n#endif\n    bool my_buffer_is_valid;\n\n    void reset_node( reset_flags f) override {\n        my_buffer_is_valid = false;\n       if (f&rf_clear_edges) {\n           my_successors.clear();\n       }\n    }\n};  // overwrite_node\n\ntemplate< typename T >\nclass write_once_node : public overwrite_node<T> {\npublic:\n    typedef T input_type;\n    typedef T output_type;\n    typedef overwrite_node<T> base_type;\n    typedef typename receiver<input_type>::predecessor_type predecessor_type;\n    typedef typename sender<output_type>::successor_type successor_type;\n\n    //! Constructor\n    __TBB_NOINLINE_SYM explicit write_once_node(graph& g) : base_type(g) {\n        fgt_node( CODEPTR(), FLOW_WRITE_ONCE_NODE, &(this->my_graph),\n                                 static_cast<receiver<input_type> *>(this),\n                                 static_cast<sender<output_type> *>(this) );\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    template <typename... Args>\n    write_once_node(const node_set<Args...>& nodes) : write_once_node(nodes.graph_reference()) {\n        make_edges_in_order(nodes, *this);\n    }\n#endif\n\n    //! Copy constructor: call base class copy constructor\n    __TBB_NOINLINE_SYM write_once_node( const write_once_node& src ) : base_type(src) {\n        fgt_node( CODEPTR(), FLOW_WRITE_ONCE_NODE, &(this->my_graph),\n                                 static_cast<receiver<input_type> *>(this),\n                                 static_cast<sender<output_type> *>(this) );\n    }\n\nprotected:\n    template< typename R, typename B > friend class run_and_put_task;\n    template<typename X, typename Y> friend class broadcast_cache;\n    template<typename X, typename Y> friend class round_robin_cache;\n    graph_task *try_put_task( const T &v ) override {\n        spin_mutex::scoped_lock l( this->my_mutex );\n        return this->my_buffer_is_valid ? nullptr : this->try_put_task_impl(v __TBB_FLOW_GRAPH_METAINFO_ARG(message_metainfo{}));\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    graph_task* try_put_task(const T& v, const message_metainfo& metainfo) override {\n        spin_mutex::scoped_lock l( this->my_mutex );\n        return this->my_buffer_is_valid ? nullptr : this->try_put_task_impl(v, metainfo);\n    }\n#endif\n}; // write_once_node\n\ninline void set_name(const graph& g, const char *name) {\n    fgt_graph_desc(&g, name);\n}\n\ntemplate <typename Output>\ninline void set_name(const input_node<Output>& node, const char *name) {\n    fgt_node_desc(&node, name);\n}\n\ntemplate <typename Input, typename Output, typename Policy>\ninline void set_name(const function_node<Input, Output, Policy>& node, const char *name) {\n    fgt_node_desc(&node, name);\n}\n\ntemplate <typename Output, typename Policy>\ninline void set_name(const continue_node<Output,Policy>& node, const char *name) {\n    fgt_node_desc(&node, name);\n}\n\ntemplate <typename T>\ninline void set_name(const broadcast_node<T>& node, const char *name) {\n    fgt_node_desc(&node, name);\n}\n\ntemplate <typename T>\ninline void set_name(const buffer_node<T>& node, const char *name) {\n    fgt_node_desc(&node, name);\n}\n\ntemplate <typename T>\ninline void set_name(const queue_node<T>& node, const char *name) {\n    fgt_node_desc(&node, name);\n}\n\ntemplate <typename T>\ninline void set_name(const sequencer_node<T>& node, const char *name) {\n    fgt_node_desc(&node, name);\n}\n\ntemplate <typename T, typename Compare>\ninline void set_name(const priority_queue_node<T, Compare>& node, const char *name) {\n    fgt_node_desc(&node, name);\n}\n\ntemplate <typename T, typename DecrementType>\ninline void set_name(const limiter_node<T, DecrementType>& node, const char *name) {\n    fgt_node_desc(&node, name);\n}\n\ntemplate <typename OutputTuple, typename JP>\ninline void set_name(const join_node<OutputTuple, JP>& node, const char *name) {\n    fgt_node_desc(&node, name);\n}\n\ntemplate <typename... Types>\ninline void set_name(const indexer_node<Types...>& node, const char *name) {\n    fgt_node_desc(&node, name);\n}\n\ntemplate <typename T>\ninline void set_name(const overwrite_node<T>& node, const char *name) {\n    fgt_node_desc(&node, name);\n}\n\ntemplate <typename T>\ninline void set_name(const write_once_node<T>& node, const char *name) {\n    fgt_node_desc(&node, name);\n}\n\ntemplate<typename Input, typename Output, typename Policy>\ninline void set_name(const multifunction_node<Input, Output, Policy>& node, const char *name) {\n    fgt_multioutput_node_desc(&node, name);\n}\n\ntemplate<typename TupleType>\ninline void set_name(const split_node<TupleType>& node, const char *name) {\n    fgt_multioutput_node_desc(&node, name);\n}\n\ntemplate< typename InputTuple, typename OutputTuple >\ninline void set_name(const composite_node<InputTuple, OutputTuple>& node, const char *name) {\n    fgt_multiinput_multioutput_node_desc(&node, name);\n}\n\ntemplate<typename Input, typename Output, typename Policy>\ninline void set_name(const async_node<Input, Output, Policy>& node, const char *name)\n{\n    fgt_multioutput_node_desc(&node, name);\n}\n} // d2\n} // detail\n} // tbb\n\n\n// Include deduction guides for node classes\n#include \"detail/_flow_graph_nodes_deduction.h\"\n\nnamespace tbb {\nnamespace flow {\ninline namespace v1 {\n    using detail::d2::receiver;\n    using detail::d2::sender;\n\n    using detail::d2::serial;\n    using detail::d2::unlimited;\n\n    using detail::d2::reset_flags;\n    using detail::d2::rf_reset_protocol;\n    using detail::d2::rf_reset_bodies;\n    using detail::d2::rf_clear_edges;\n\n    using detail::d2::graph;\n    using detail::d2::graph_node;\n    using detail::d2::continue_msg;\n\n    using detail::d2::input_node;\n    using detail::d2::function_node;\n    using detail::d2::multifunction_node;\n    using detail::d2::split_node;\n    using detail::d2::output_port;\n    using detail::d2::indexer_node;\n    using detail::d2::tagged_msg;\n    using detail::d2::cast_to;\n    using detail::d2::is_a;\n    using detail::d2::continue_node;\n    using detail::d2::overwrite_node;\n    using detail::d2::write_once_node;\n    using detail::d2::broadcast_node;\n    using detail::d2::buffer_node;\n    using detail::d2::queue_node;\n    using detail::d2::sequencer_node;\n    using detail::d2::priority_queue_node;\n    using detail::d2::limiter_node;\n    using namespace detail::d2::graph_policy_namespace;\n    using detail::d2::join_node;\n    using detail::d2::input_port;\n    using detail::d2::copy_body;\n    using detail::d2::make_edge;\n    using detail::d2::remove_edge;\n    using detail::d2::tag_value;\n    using detail::d2::composite_node;\n    using detail::d2::async_node;\n    using detail::d2::node_priority_t;\n    using detail::d2::no_priority;\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    using detail::d2::follows;\n    using detail::d2::precedes;\n    using detail::d2::make_node_set;\n    using detail::d2::make_edges;\n#endif\n\n} // v1\n} // flow\n\n    using detail::d1::flow_control;\n\nnamespace profiling {\n    using detail::d2::set_name;\n} // profiling\n\n} // tbb\n\n\n#if TBB_USE_PROFILING_TOOLS  && ( __unix__ || __APPLE__ )\n   // We don't do pragma pop here, since it still gives warning on the USER side\n   #undef __TBB_NOINLINE_SYM\n#endif\n\n#endif // __TBB_flow_graph_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/flow_graph_abstractions.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_flow_graph_abstractions_H\n#define __TBB_flow_graph_abstractions_H\n\nnamespace tbb {\nnamespace detail {\nnamespace d2 {\n\n//! Pure virtual template classes that define interfaces for async communication\nclass graph_proxy {\npublic:\n    //! Inform a graph that messages may come from outside, to prevent premature graph completion\n    virtual void reserve_wait() = 0;\n\n    //! Inform a graph that a previous call to reserve_wait is no longer in effect\n    virtual void release_wait() = 0;\n\n    virtual ~graph_proxy() {}\n};\n\ntemplate <typename Input>\nclass receiver_gateway : public graph_proxy {\npublic:\n    //! Type of inputing data into FG.\n    typedef Input input_type;\n\n    //! Submit signal from an asynchronous activity to FG.\n    virtual bool try_put(const input_type&) = 0;\n};\n\n} // d2\n\n\n} // detail\n} // tbb\n#endif\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/global_control.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_global_control_H\n#define __TBB_global_control_H\n\n#include \"detail/_config.h\"\n\n#include \"detail/_assert.h\"\n#include \"detail/_attach.h\"\n#include \"detail/_exception.h\"\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_template_helpers.h\"\n\n#include <cstddef>\n#include <new> // std::nothrow_t\n\nnamespace tbb {\nnamespace detail {\n\nnamespace d1 {\nclass global_control;\nclass task_scheduler_handle;\n}\n\nnamespace r1 {\nTBB_EXPORT void __TBB_EXPORTED_FUNC create(d1::global_control&);\nTBB_EXPORT void __TBB_EXPORTED_FUNC destroy(d1::global_control&);\nTBB_EXPORT std::size_t __TBB_EXPORTED_FUNC global_control_active_value(int);\nstruct global_control_impl;\nstruct control_storage_comparator;\nvoid release_impl(d1::task_scheduler_handle& handle);\nbool finalize_impl(d1::task_scheduler_handle& handle);\nTBB_EXPORT void __TBB_EXPORTED_FUNC get(d1::task_scheduler_handle&);\nTBB_EXPORT bool __TBB_EXPORTED_FUNC finalize(d1::task_scheduler_handle&, std::intptr_t mode);\n}\n\nnamespace d1 {\n\nclass global_control {\npublic:\n    enum parameter {\n        max_allowed_parallelism,\n        thread_stack_size,\n        terminate_on_exception,\n        scheduler_handle, // not a public parameter\n        parameter_max // insert new parameters above this point\n    };\n\n    global_control(parameter p, std::size_t value) :\n        my_value(value), my_reserved(), my_param(p) {\n        suppress_unused_warning(my_reserved);\n        __TBB_ASSERT(my_param < parameter_max, \"Invalid parameter\");\n#if __TBB_WIN8UI_SUPPORT && (_WIN32_WINNT < 0x0A00)\n        // For Windows 8 Store* apps it's impossible to set stack size\n        if (p==thread_stack_size)\n            return;\n#elif __TBB_x86_64 && (_WIN32 || _WIN64)\n        if (p==thread_stack_size)\n            __TBB_ASSERT_RELEASE((unsigned)value == value, \"Stack size is limited to unsigned int range\");\n#endif\n        if (my_param==max_allowed_parallelism)\n            __TBB_ASSERT_RELEASE(my_value>0, \"max_allowed_parallelism cannot be 0.\");\n        r1::create(*this);\n    }\n\n    ~global_control() {\n        __TBB_ASSERT(my_param < parameter_max, \"Invalid parameter\");\n#if __TBB_WIN8UI_SUPPORT && (_WIN32_WINNT < 0x0A00)\n        // For Windows 8 Store* apps it's impossible to set stack size\n        if (my_param==thread_stack_size)\n            return;\n#endif\n        r1::destroy(*this);\n    }\n\n    static std::size_t active_value(parameter p) {\n        __TBB_ASSERT(p < parameter_max, \"Invalid parameter\");\n        return r1::global_control_active_value((int)p);\n    }\n\nprivate:\n    std::size_t my_value;\n    std::intptr_t my_reserved; // TODO: substitution of global_control* not to break backward compatibility\n    parameter my_param;\n\n    friend struct r1::global_control_impl;\n    friend struct r1::control_storage_comparator;\n};\n\n//! Finalization options.\n//! Outside of the class to avoid extensive friendship.\nstatic constexpr std::intptr_t release_nothrowing = 0;\nstatic constexpr std::intptr_t finalize_nothrowing = 1;\nstatic constexpr std::intptr_t finalize_throwing = 2;\n\n//! User side wrapper for a task scheduler lifetime control object\nclass task_scheduler_handle {\npublic:\n    //! Creates an empty task_scheduler_handle\n    task_scheduler_handle() = default;\n\n    //! Creates an attached instance of task_scheduler_handle\n    task_scheduler_handle(attach) {\n        r1::get(*this);\n    }\n\n    //! Release a reference if any\n    ~task_scheduler_handle() {\n        release();\n    }\n\n    //! No copy\n    task_scheduler_handle(const task_scheduler_handle& other) = delete;\n    task_scheduler_handle& operator=(const task_scheduler_handle& other) = delete;\n\n    //! Move only\n    task_scheduler_handle(task_scheduler_handle&& other) noexcept {\n        std::swap(m_ctl, other.m_ctl);\n    }\n    task_scheduler_handle& operator=(task_scheduler_handle&& other) noexcept {\n        std::swap(m_ctl, other.m_ctl);\n        return *this;\n    };\n\n    //! Checks if the task_scheduler_handle is empty\n    explicit operator bool() const noexcept {\n        return m_ctl != nullptr;\n    }\n\n    //! Release the reference and deactivate handle\n    void release() {\n        if (m_ctl != nullptr) {\n            r1::finalize(*this, release_nothrowing);\n            m_ctl = nullptr;\n        }\n    }\n\nprivate:\n    friend void r1::release_impl(task_scheduler_handle& handle);\n    friend bool r1::finalize_impl(task_scheduler_handle& handle);\n    friend void __TBB_EXPORTED_FUNC r1::get(task_scheduler_handle&);\n\n    friend void finalize(task_scheduler_handle&);\n    friend bool finalize(task_scheduler_handle&, const std::nothrow_t&) noexcept;\n\n    global_control* m_ctl{nullptr};\n};\n\n#if TBB_USE_EXCEPTIONS\n//! Waits for worker threads termination. Throws exception on error.\ninline void finalize(task_scheduler_handle& handle) {\n    try_call([&] {\n        if (handle.m_ctl != nullptr) {\n            bool finalized = r1::finalize(handle, finalize_throwing);\n            __TBB_ASSERT_EX(finalized, \"r1::finalize did not respect finalize_throwing ?\");\n            \n        }\n    }).on_completion([&] {\n        __TBB_ASSERT(!handle, \"The handle should be empty after finalize\");\n    });\n}\n#endif\n//! Waits for worker threads termination. Returns false on error.\ninline bool finalize(task_scheduler_handle& handle, const std::nothrow_t&) noexcept {\n    bool finalized = true;\n    if (handle.m_ctl != nullptr) {\n        finalized = r1::finalize(handle, finalize_nothrowing);\n    }\n    __TBB_ASSERT(!handle, \"The handle should be empty after finalize\");\n    return finalized;\n}\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::global_control;\nusing detail::d1::attach;\nusing detail::d1::finalize;\nusing detail::d1::task_scheduler_handle;\nusing detail::r1::unsafe_wait;\n} // namespace v1\n\n} // namespace tbb\n\n#endif // __TBB_global_control_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/info.h",
    "content": "/*\n    Copyright (c) 2019-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_info_H\n#define __TBB_info_H\n\n#include \"detail/_config.h\"\n#include \"detail/_namespace_injection.h\"\n\n#if __TBB_ARENA_BINDING\n#include <vector>\n#include <cstdint>\n\nnamespace tbb {\nnamespace detail {\n\nnamespace d1{\n\nusing numa_node_id = int;\nusing core_type_id = int;\n\n// TODO: consider version approach to resolve backward compatibility potential issues.\nstruct constraints {\n#if !__TBB_CPP20_PRESENT\n    constraints(numa_node_id id = -1, int maximal_concurrency = -1)\n        : numa_id(id)\n        , max_concurrency(maximal_concurrency)\n    {}\n#endif /*!__TBB_CPP20_PRESENT*/\n\n    constraints& set_numa_id(numa_node_id id) {\n        numa_id = id;\n        return *this;\n    }\n    constraints& set_max_concurrency(int maximal_concurrency) {\n        max_concurrency = maximal_concurrency;\n        return *this;\n    }\n    constraints& set_core_type(core_type_id id) {\n        core_type = id;\n        return *this;\n    }\n    constraints& set_max_threads_per_core(int threads_number) {\n        max_threads_per_core = threads_number;\n        return *this;\n    }\n\n    numa_node_id numa_id = -1;\n    int max_concurrency = -1;\n    core_type_id core_type = -1;\n    int max_threads_per_core = -1;\n};\n\n} // namespace d1\n\nnamespace r1 {\nTBB_EXPORT unsigned __TBB_EXPORTED_FUNC numa_node_count();\nTBB_EXPORT void __TBB_EXPORTED_FUNC fill_numa_indices(int* index_array);\nTBB_EXPORT int __TBB_EXPORTED_FUNC numa_default_concurrency(int numa_id);\n\n// Reserved fields are required to save binary backward compatibility in case of future changes.\n// They must be defined to 0 at this moment.\nTBB_EXPORT unsigned __TBB_EXPORTED_FUNC core_type_count(intptr_t reserved = 0);\nTBB_EXPORT void __TBB_EXPORTED_FUNC fill_core_type_indices(int* index_array, intptr_t reserved = 0);\n\nTBB_EXPORT int __TBB_EXPORTED_FUNC constraints_default_concurrency(const d1::constraints& c, intptr_t reserved = 0);\nTBB_EXPORT int __TBB_EXPORTED_FUNC constraints_threads_per_core(const d1::constraints& c, intptr_t reserved = 0);\n} // namespace r1\n\nnamespace d1 {\n\ninline std::vector<numa_node_id> numa_nodes() {\n    std::vector<numa_node_id> node_indices(r1::numa_node_count());\n    r1::fill_numa_indices(node_indices.data());\n    return node_indices;\n}\n\ninline int default_concurrency(numa_node_id id = -1) {\n    return r1::numa_default_concurrency(id);\n}\n\ninline std::vector<core_type_id> core_types() {\n    std::vector<int> core_type_indexes(r1::core_type_count());\n    r1::fill_core_type_indices(core_type_indexes.data());\n    return core_type_indexes;\n}\n\ninline int default_concurrency(constraints c) {\n    if (c.max_concurrency > 0) { return c.max_concurrency; }\n    return r1::constraints_default_concurrency(c);\n}\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::numa_node_id;\nusing detail::d1::core_type_id;\n\nnamespace info {\nusing detail::d1::numa_nodes;\nusing detail::d1::core_types;\n\nusing detail::d1::default_concurrency;\n} // namespace info\n} // namespace v1\n\n} // namespace tbb\n\n#endif /*__TBB_ARENA_BINDING*/\n\n#endif /*__TBB_info_H*/\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/memory_pool.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_memory_pool_H\n#define __TBB_memory_pool_H\n\n#if !TBB_PREVIEW_MEMORY_POOL\n#error Set TBB_PREVIEW_MEMORY_POOL to include memory_pool.h\n#endif\n/** @file */\n\n#include \"scalable_allocator.h\"\n\n#include <new> // std::bad_alloc\n#include <stdexcept> // std::runtime_error, std::invalid_argument\n#include <utility> // std::forward\n\n\n#if __TBB_EXTRA_DEBUG\n#define __TBBMALLOC_ASSERT ASSERT\n#else\n#define __TBBMALLOC_ASSERT(a,b) ((void)0)\n#endif\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n//! Base of thread-safe pool allocator for variable-size requests\nclass pool_base : no_copy {\n    // Pool interface is separate from standard allocator classes because it has\n    // to maintain internal state, no copy or assignment. Move and swap are possible.\npublic:\n    //! Reset pool to reuse its memory (free all objects at once)\n    void recycle() { rml::pool_reset(my_pool); }\n\n    //! The \"malloc\" analogue to allocate block of memory of size bytes\n    void *malloc(size_t size) { return rml::pool_malloc(my_pool, size); }\n\n    //! The \"free\" analogue to discard a previously allocated piece of memory.\n    void free(void* ptr) { rml::pool_free(my_pool, ptr); }\n\n    //! The \"realloc\" analogue complementing pool_malloc.\n    // Enables some low-level optimization possibilities\n    void *realloc(void* ptr, size_t size) {\n        return rml::pool_realloc(my_pool, ptr, size);\n    }\n\nprotected:\n    //! destroy pool - must be called in a child class\n    void destroy() { rml::pool_destroy(my_pool); }\n\n    rml::MemoryPool *my_pool;\n};\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    // Workaround for erroneous \"unreferenced parameter\" warning in method destroy.\n    #pragma warning (push)\n    #pragma warning (disable: 4100)\n#endif\n\n//! Meets \"allocator\" requirements of ISO C++ Standard, Section 20.1.5\n/** @ingroup memory_allocation */\ntemplate<typename T, typename P = pool_base>\nclass memory_pool_allocator {\nprotected:\n    typedef P pool_type;\n    pool_type *my_pool;\n    template<typename U, typename R>\n    friend class memory_pool_allocator;\n    template<typename V, typename U, typename R>\n    friend bool operator==( const memory_pool_allocator<V,R>& a, const memory_pool_allocator<U,R>& b);\n    template<typename V, typename U, typename R>\n    friend bool operator!=( const memory_pool_allocator<V,R>& a, const memory_pool_allocator<U,R>& b);\npublic:\n    typedef T value_type;\n    typedef value_type* pointer;\n    typedef const value_type* const_pointer;\n    typedef value_type& reference;\n    typedef const value_type& const_reference;\n    typedef size_t size_type;\n    typedef ptrdiff_t difference_type;\n    template<typename U> struct rebind {\n        typedef memory_pool_allocator<U, P> other;\n    };\n\n    explicit memory_pool_allocator(pool_type &pool) noexcept : my_pool(&pool) {}\n    memory_pool_allocator(const memory_pool_allocator& src) noexcept : my_pool(src.my_pool) {}\n    template<typename U>\n    memory_pool_allocator(const memory_pool_allocator<U,P>& src) noexcept : my_pool(src.my_pool) {}\n\n    pointer address(reference x) const { return &x; }\n    const_pointer address(const_reference x) const { return &x; }\n\n    //! Allocate space for n objects.\n    pointer allocate( size_type n, const void* /*hint*/ = nullptr) {\n        pointer p = static_cast<pointer>( my_pool->malloc( n*sizeof(value_type) ) );\n        if (!p)\n            throw_exception(std::bad_alloc());\n        return p;\n    }\n    //! Free previously allocated block of memory.\n    void deallocate( pointer p, size_type ) {\n        my_pool->free(p);\n    }\n    //! Largest value for which method allocate might succeed.\n    size_type max_size() const noexcept {\n        size_type max = static_cast<size_type>(-1) / sizeof (value_type);\n        return (max > 0 ? max : 1);\n    }\n    //! Copy-construct value at location pointed to by p.\n\n    template<typename U, typename... Args>\n    void construct(U *p, Args&&... args)\n        { ::new((void *)p) U(std::forward<Args>(args)...); }\n\n    //! Destroy value at location pointed to by p.\n    void destroy( pointer p ) { p->~value_type(); }\n\n};\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    #pragma warning (pop)\n#endif // warning 4100 is back\n\n//! Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1\n/** @ingroup memory_allocation */\ntemplate<typename P>\nclass memory_pool_allocator<void, P> {\npublic:\n    typedef P pool_type;\n    typedef void* pointer;\n    typedef const void* const_pointer;\n    typedef void value_type;\n    template<typename U> struct rebind {\n        typedef memory_pool_allocator<U, P> other;\n    };\n\n    explicit memory_pool_allocator( pool_type &pool) noexcept : my_pool(&pool) {}\n    memory_pool_allocator( const memory_pool_allocator& src) noexcept : my_pool(src.my_pool) {}\n    template<typename U>\n    memory_pool_allocator(const memory_pool_allocator<U,P>& src) noexcept : my_pool(src.my_pool) {}\n\nprotected:\n    pool_type *my_pool;\n    template<typename U, typename R>\n    friend class memory_pool_allocator;\n    template<typename V, typename U, typename R>\n    friend bool operator==( const memory_pool_allocator<V,R>& a, const memory_pool_allocator<U,R>& b);\n    template<typename V, typename U, typename R>\n    friend bool operator!=( const memory_pool_allocator<V,R>& a, const memory_pool_allocator<U,R>& b);\n};\n\ntemplate<typename T, typename U, typename P>\ninline bool operator==( const memory_pool_allocator<T,P>& a, const memory_pool_allocator<U,P>& b) {return a.my_pool==b.my_pool;}\n\ntemplate<typename T, typename U, typename P>\ninline bool operator!=( const memory_pool_allocator<T,P>& a, const memory_pool_allocator<U,P>& b) {return a.my_pool!=b.my_pool;}\n\n//! Thread-safe growable pool allocator for variable-size requests\ntemplate <typename Alloc>\nclass memory_pool : public pool_base {\n    Alloc my_alloc; // TODO: base-class optimization\n    static void *allocate_request(intptr_t pool_id, size_t & bytes);\n    static int deallocate_request(intptr_t pool_id, void*, size_t raw_bytes);\n\npublic:\n    //! construct pool with underlying allocator\n    explicit memory_pool(const Alloc &src = Alloc());\n\n    //! destroy pool\n    ~memory_pool() { destroy(); } // call the callbacks first and destroy my_alloc latter\n};\n\nclass fixed_pool : public pool_base {\n    void *my_buffer;\n    size_t my_size;\n    inline static void *allocate_request(intptr_t pool_id, size_t & bytes);\n\npublic:\n    //! construct pool with underlying allocator\n    inline fixed_pool(void *buf, size_t size);\n    //! destroy pool\n    ~fixed_pool() { destroy(); }\n};\n\n//////////////// Implementation ///////////////\n\ntemplate <typename Alloc>\nmemory_pool<Alloc>::memory_pool(const Alloc &src) : my_alloc(src) {\n    rml::MemPoolPolicy args(allocate_request, deallocate_request,\n                            sizeof(typename Alloc::value_type));\n    rml::MemPoolError res = rml::pool_create_v1(intptr_t(this), &args, &my_pool);\n    if (res!=rml::POOL_OK)\n        throw_exception(std::runtime_error(\"Can't create pool\"));\n}\ntemplate <typename Alloc>\nvoid *memory_pool<Alloc>::allocate_request(intptr_t pool_id, size_t & bytes) {\n    memory_pool<Alloc> &self = *reinterpret_cast<memory_pool<Alloc>*>(pool_id);\n    const size_t unit_size = sizeof(typename Alloc::value_type);\n    __TBBMALLOC_ASSERT( 0 == bytes%unit_size, nullptr);\n    void *ptr;\n#if TBB_USE_EXCEPTIONS\n    try {\n#endif\n        ptr = self.my_alloc.allocate( bytes/unit_size );\n#if TBB_USE_EXCEPTIONS\n    } catch(...) {\n        return nullptr;\n    }\n#endif\n    return ptr;\n}\n#if __TBB_MSVC_UNREACHABLE_CODE_IGNORED\n    // Workaround for erroneous \"unreachable code\" warning in the template below.\n    // Specific for VC++ 17-18 compiler\n    #pragma warning (push)\n    #pragma warning (disable: 4702)\n#endif\ntemplate <typename Alloc>\nint memory_pool<Alloc>::deallocate_request(intptr_t pool_id, void* raw_ptr, size_t raw_bytes) {\n    memory_pool<Alloc> &self = *reinterpret_cast<memory_pool<Alloc>*>(pool_id);\n    const size_t unit_size = sizeof(typename Alloc::value_type);\n    __TBBMALLOC_ASSERT( 0 == raw_bytes%unit_size, nullptr);\n    self.my_alloc.deallocate( static_cast<typename Alloc::value_type*>(raw_ptr), raw_bytes/unit_size );\n    return 0;\n}\n#if __TBB_MSVC_UNREACHABLE_CODE_IGNORED\n    #pragma warning (pop)\n#endif\ninline fixed_pool::fixed_pool(void *buf, size_t size) : my_buffer(buf), my_size(size) {\n    if (!buf || !size)\n        // TODO: improve support for mode with exceptions disabled\n        throw_exception(std::invalid_argument(\"Zero in parameter is invalid\"));\n    rml::MemPoolPolicy args(allocate_request, nullptr, size, /*fixedPool=*/true);\n    rml::MemPoolError res = rml::pool_create_v1(intptr_t(this), &args, &my_pool);\n    if (res!=rml::POOL_OK)\n        throw_exception(std::runtime_error(\"Can't create pool\"));\n}\ninline void *fixed_pool::allocate_request(intptr_t pool_id, size_t & bytes) {\n    fixed_pool &self = *reinterpret_cast<fixed_pool*>(pool_id);\n    __TBBMALLOC_ASSERT(0 != self.my_size, \"The buffer must not be used twice.\");\n    bytes = self.my_size;\n    self.my_size = 0; // remember that buffer has been used\n    return self.my_buffer;\n}\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::memory_pool_allocator;\nusing detail::d1::memory_pool;\nusing detail::d1::fixed_pool;\n} // inline namepspace v1\n} // namespace tbb\n\n#undef __TBBMALLOC_ASSERT\n#endif// __TBB_memory_pool_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/mutex.h",
    "content": "/*\n    Copyright (c) 2021-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_mutex_H\n#define __TBB_mutex_H\n\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_utils.h\"\n#include \"detail/_scoped_lock.h\"\n#include \"detail/_waitable_atomic.h\"\n#include \"detail/_mutex_common.h\"\n#include \"profiling.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\nclass mutex {\npublic:\n    //! Constructors\n    mutex() {\n        create_itt_sync(this, \"tbb::mutex\", \"\");\n    };\n\n    //! Destructor\n    ~mutex() = default;\n\n    //! No Copy\n    mutex(const mutex&) = delete;\n    mutex& operator=(const mutex&) = delete;\n\n    using scoped_lock = unique_scoped_lock<mutex>;\n\n    //! Mutex traits\n    static constexpr bool is_rw_mutex = false;\n    static constexpr bool is_recursive_mutex = false;\n    static constexpr bool is_fair_mutex = false;\n\n    //! Acquire lock\n    /** Spin if the lock is taken */\n    void lock() {\n        call_itt_notify(prepare, this);\n        while (!try_lock()) {\n            my_flag.wait(true, /* context = */ 0, std::memory_order_relaxed);\n        }\n    }\n\n    //! Try acquiring lock (non-blocking)\n    /** Return true if lock acquired; false otherwise. */\n    bool try_lock() {\n        bool result = !my_flag.load(std::memory_order_relaxed) && !my_flag.exchange(true);\n        if (result) {\n            call_itt_notify(acquired, this);\n        }\n        return result;\n    }\n\n    //! Release lock\n    void unlock() {\n        call_itt_notify(releasing, this);\n        // We need Write Read memory barrier before notify that reads the waiter list.\n        // In C++ only full fence covers this type of barrier.\n        my_flag.exchange(false);\n        my_flag.notify_one_relaxed();\n    }\n\nprivate:\n    waitable_atomic<bool> my_flag{0};\n}; // class mutex\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::mutex;\n} // namespace v1\n\n} // namespace tbb\n\n#endif // __TBB_mutex_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/null_mutex.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_null_mutex_H\n#define __TBB_null_mutex_H\n\n#include \"detail/_config.h\"\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_mutex_common.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n//! A mutex which does nothing\n/** A null_mutex does no operation and simulates success.\n    @ingroup synchronization */\nclass null_mutex {\npublic:\n    //! Constructors\n    constexpr null_mutex() noexcept = default;\n\n    //! Destructor\n    ~null_mutex() = default;\n\n    //! No Copy\n    null_mutex(const null_mutex&) = delete;\n    null_mutex& operator=(const null_mutex&) = delete;\n\n    //! Represents acquisition of a mutex.\n    class scoped_lock {\n    public:\n        //! Constructors\n        constexpr scoped_lock() noexcept = default;\n        scoped_lock(null_mutex&) {}\n\n        //! Destructor\n        ~scoped_lock() = default;\n\n        //! No Copy\n        scoped_lock(const scoped_lock&) = delete;\n        scoped_lock& operator=(const scoped_lock&) = delete;\n\n        void acquire(null_mutex&) {}\n        bool try_acquire(null_mutex&) { return true; }\n        void release() {}\n    };\n\n    //! Mutex traits\n    static constexpr bool is_rw_mutex = false;\n    static constexpr bool is_recursive_mutex = true;\n    static constexpr bool is_fair_mutex = true;\n\n    void lock() {}\n    bool try_lock() { return true; }\n    void unlock() {}\n}; // class null_mutex\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::null_mutex;\n} // namespace v1\n} // namespace tbb\n\n#endif /* __TBB_null_mutex_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/null_rw_mutex.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_null_rw_mutex_H\n#define __TBB_null_rw_mutex_H\n\n#include \"detail/_config.h\"\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_mutex_common.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n//! A rw mutex which does nothing\n/** A null_rw_mutex is a rw mutex that does nothing and simulates successful operation.\n    @ingroup synchronization */\nclass null_rw_mutex {\npublic:\n    //! Constructors\n    constexpr null_rw_mutex() noexcept = default;\n\n    //! Destructor\n    ~null_rw_mutex() = default;\n\n    //! No Copy\n    null_rw_mutex(const null_rw_mutex&) = delete;\n    null_rw_mutex& operator=(const null_rw_mutex&) = delete;\n\n    //! Represents acquisition of a mutex.\n    class scoped_lock {\n    public:\n        //! Constructors\n        constexpr scoped_lock() noexcept = default;\n        scoped_lock(null_rw_mutex&, bool = true) {}\n\n        //! Destructor\n        ~scoped_lock() = default;\n\n        //! No Copy\n        scoped_lock(const scoped_lock&) = delete;\n        scoped_lock& operator=(const scoped_lock&) = delete;\n\n        void acquire(null_rw_mutex&, bool = true) {}\n        bool try_acquire(null_rw_mutex&, bool = true) { return true; }\n        void release() {}\n        bool upgrade_to_writer() { return true; }\n        bool downgrade_to_reader() { return true; }\n\n        bool is_writer() const { return true; }\n    };\n\n    //! Mutex traits\n    static constexpr bool is_rw_mutex = true;\n    static constexpr bool is_recursive_mutex = true;\n    static constexpr bool is_fair_mutex = true;\n\n    void lock() {}\n    bool try_lock() { return true; }\n    void unlock() {}\n    void lock_shared() {}\n    bool try_lock_shared() { return true; }\n    void unlock_shared() {}\n}; // class null_rw_mutex\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::null_rw_mutex;\n} // namespace v1\n} // namespace tbb\n\n#endif /* __TBB_null_rw_mutex_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/parallel_for.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_parallel_for_H\n#define __TBB_parallel_for_H\n\n#include \"detail/_config.h\"\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_exception.h\"\n#include \"detail/_task.h\"\n#include \"detail/_small_object_pool.h\"\n#include \"profiling.h\"\n\n#include \"partitioner.h\"\n#include \"blocked_range.h\"\n#include \"task_group.h\"\n\n#include <cstddef>\n#include <new>\n\nnamespace tbb {\nnamespace detail {\n#if __TBB_CPP20_CONCEPTS_PRESENT\ninline namespace d0 {\n\ntemplate <typename Body, typename Range>\nconcept parallel_for_body = std::copy_constructible<Body> && std::invocable<const std::remove_reference_t<Body>&, Range&>;\n\ntemplate <typename Index>\nconcept parallel_for_index = std::constructible_from<Index, int> &&\n                             std::copyable<Index> &&\n                             requires( const std::remove_reference_t<Index>& lhs, const std::remove_reference_t<Index>& rhs ) {\n                                 { lhs < rhs } -> adaptive_same_as<bool>;\n                                 { lhs - rhs } -> std::convertible_to<std::size_t>;\n                                 { lhs + (rhs - lhs) } -> std::convertible_to<Index>;\n                             };\n\ntemplate <typename Function, typename Index>\nconcept parallel_for_function = std::invocable<const std::remove_reference_t<Function>&, Index>;\n\n} // namespace d0\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\nnamespace d1 {\n\n//! Task type used in parallel_for\n/** @ingroup algorithms */\ntemplate<typename Range, typename Body, typename Partitioner>\nstruct start_for : public task {\n    Range my_range;\n    const Body my_body;\n    node* my_parent;\n\n    typename Partitioner::task_partition_type my_partition;\n    small_object_allocator my_allocator;\n\n    task* execute(execution_data&) override;\n    task* cancel(execution_data&) override;\n    void finalize(const execution_data&);\n\n    //! Constructor for root task.\n    start_for( const Range& range, const Body& body, Partitioner& partitioner, small_object_allocator& alloc ) :\n        my_range(range),\n        my_body(body),\n        my_parent(nullptr),\n        my_partition(partitioner),\n        my_allocator(alloc) {}\n    //! Splitting constructor used to generate children.\n    /** parent_ becomes left child.  Newly constructed object is right child. */\n    start_for( start_for& parent_, typename Partitioner::split_type& split_obj, small_object_allocator& alloc ) :\n        my_range(parent_.my_range, get_range_split_object<Range>(split_obj)),\n        my_body(parent_.my_body),\n        my_parent(nullptr),\n        my_partition(parent_.my_partition, split_obj),\n        my_allocator(alloc) {}\n    //! Construct right child from the given range as response to the demand.\n    /** parent_ remains left child.  Newly constructed object is right child. */\n    start_for( start_for& parent_, const Range& r, depth_t d, small_object_allocator& alloc ) :\n        my_range(r),\n        my_body(parent_.my_body),\n        my_parent(nullptr),\n        my_partition(parent_.my_partition, split()),\n        my_allocator(alloc)\n    {\n        my_partition.align_depth( d );\n    }\n    static void run(const Range& range, const Body& body, Partitioner& partitioner) {\n        task_group_context context(PARALLEL_FOR);\n        run(range, body, partitioner, context);\n    }\n\n    static void run(const Range& range, const Body& body, Partitioner& partitioner, task_group_context& context) {\n        if ( !range.empty() ) {\n            small_object_allocator alloc{};\n            start_for& for_task = *alloc.new_object<start_for>(range, body, partitioner, alloc);\n\n            // defer creation of the wait node until task allocation succeeds\n            wait_node wn;\n            for_task.my_parent = &wn;\n            execute_and_wait(for_task, context, wn.m_wait, context);\n        }\n    }\n    //! Run body for range, serves as callback for partitioner\n    void run_body( Range &r ) {\n        tbb::detail::invoke(my_body, r);\n    }\n\n    //! spawn right task, serves as callback for partitioner\n    void offer_work(typename Partitioner::split_type& split_obj, execution_data& ed) {\n       offer_work_impl(ed, *this, split_obj);\n    }\n\n    //! spawn right task, serves as callback for partitioner\n    void offer_work(const Range& r, depth_t d, execution_data& ed) {\n        offer_work_impl(ed, *this, r, d);\n    }\n\nprivate:\n    template <typename... Args>\n    void offer_work_impl(execution_data& ed, Args&&... constructor_args) {\n        // New right child\n        small_object_allocator alloc{};\n        start_for& right_child = *alloc.new_object<start_for>(ed, std::forward<Args>(constructor_args)..., alloc);\n\n        // New root node as a continuation and ref count. Left and right child attach to the new parent.\n        right_child.my_parent = my_parent = alloc.new_object<tree_node>(ed, my_parent, 2, alloc);\n        // Spawn the right sibling\n        right_child.spawn_self(ed);\n    }\n\n    void spawn_self(execution_data& ed) {\n        my_partition.spawn_task(*this, *context(ed));\n    }\n};\n\n//! fold the tree and deallocate the task\ntemplate<typename Range, typename Body, typename Partitioner>\nvoid start_for<Range, Body, Partitioner>::finalize(const execution_data& ed) {\n    // Get the current parent and allocator an object destruction\n    node* parent = my_parent;\n    auto allocator = my_allocator;\n    // Task execution finished - destroy it\n    this->~start_for();\n    // Unwind the tree decrementing the parent`s reference count\n\n    fold_tree<tree_node>(parent, ed);\n    allocator.deallocate(this, ed);\n\n}\n\n//! execute task for parallel_for\ntemplate<typename Range, typename Body, typename Partitioner>\ntask* start_for<Range, Body, Partitioner>::execute(execution_data& ed) {\n    if (!is_same_affinity(ed)) {\n        my_partition.note_affinity(execution_slot(ed));\n    }\n    my_partition.check_being_stolen(*this, ed);\n    my_partition.execute(*this, my_range, ed);\n    finalize(ed);\n    return nullptr;\n}\n\n//! cancel task for parallel_for\ntemplate<typename Range, typename Body, typename Partitioner>\ntask* start_for<Range, Body, Partitioner>::cancel(execution_data& ed) {\n    finalize(ed);\n    return nullptr;\n}\n\n//! Calls the function with values from range [begin, end) with a step provided\ntemplate<typename Function, typename Index>\nclass parallel_for_body_wrapper : detail::no_assign {\n    const Function &my_func;\n    const Index my_begin;\n    const Index my_step;\npublic:\n    parallel_for_body_wrapper( const Function& _func, Index& _begin, Index& _step )\n        : my_func(_func), my_begin(_begin), my_step(_step) {}\n\n    void operator()( const blocked_range<Index>& r ) const {\n        // A set of local variables to help the compiler with vectorization of the following loop.\n        Index b = r.begin();\n        Index e = r.end();\n        Index ms = my_step;\n        Index k = my_begin + b*ms;\n\n#if __INTEL_COMPILER\n#pragma ivdep\n#if __TBB_ASSERT_ON_VECTORIZATION_FAILURE\n#pragma vector always assert\n#endif\n#endif\n        for ( Index i = b; i < e; ++i, k += ms ) {\n            tbb::detail::invoke(my_func, k);\n        }\n    }\n};\n\n// Requirements on Range concept are documented in blocked_range.h\n\n/** \\page parallel_for_body_req Requirements on parallel_for body\n    Class \\c Body implementing the concept of parallel_for body must define:\n    - \\code Body::Body( const Body& ); \\endcode                 Copy constructor\n    - \\code Body::~Body(); \\endcode                             Destructor\n    - \\code void Body::operator()( Range& r ) const; \\endcode   Function call operator applying the body to range \\c r.\n**/\n\n/** \\name parallel_for\n    See also requirements on \\ref range_req \"Range\" and \\ref parallel_for_body_req \"parallel_for Body\". **/\n//@{\n\n//! Parallel iteration over range with default partitioner.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_for_body<Body, Range>)\nvoid parallel_for( const Range& range, const Body& body ) {\n    start_for<Range,Body,const __TBB_DEFAULT_PARTITIONER>::run(range,body,__TBB_DEFAULT_PARTITIONER());\n}\n\n//! Parallel iteration over range with simple partitioner.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_for_body<Body, Range>)\nvoid parallel_for( const Range& range, const Body& body, const simple_partitioner& partitioner ) {\n    start_for<Range,Body,const simple_partitioner>::run(range,body,partitioner);\n}\n\n//! Parallel iteration over range with auto_partitioner.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_for_body<Body, Range>)\nvoid parallel_for( const Range& range, const Body& body, const auto_partitioner& partitioner ) {\n    start_for<Range,Body,const auto_partitioner>::run(range,body,partitioner);\n}\n\n//! Parallel iteration over range with static_partitioner.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_for_body<Body, Range>)\nvoid parallel_for( const Range& range, const Body& body, const static_partitioner& partitioner ) {\n    start_for<Range,Body,const static_partitioner>::run(range,body,partitioner);\n}\n\n//! Parallel iteration over range with affinity_partitioner.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_for_body<Body, Range>)\nvoid parallel_for( const Range& range, const Body& body, affinity_partitioner& partitioner ) {\n    start_for<Range,Body,affinity_partitioner>::run(range,body,partitioner);\n}\n\n//! Parallel iteration over range with default partitioner and user-supplied context.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_for_body<Body, Range>)\nvoid parallel_for( const Range& range, const Body& body, task_group_context& context ) {\n    start_for<Range,Body,const __TBB_DEFAULT_PARTITIONER>::run(range, body, __TBB_DEFAULT_PARTITIONER(), context);\n}\n\n//! Parallel iteration over range with simple partitioner and user-supplied context.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_for_body<Body, Range>)\nvoid parallel_for( const Range& range, const Body& body, const simple_partitioner& partitioner, task_group_context& context ) {\n    start_for<Range,Body,const simple_partitioner>::run(range, body, partitioner, context);\n}\n\n//! Parallel iteration over range with auto_partitioner and user-supplied context.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_for_body<Body, Range>)\nvoid parallel_for( const Range& range, const Body& body, const auto_partitioner& partitioner, task_group_context& context ) {\n    start_for<Range,Body,const auto_partitioner>::run(range, body, partitioner, context);\n}\n\n//! Parallel iteration over range with static_partitioner and user-supplied context.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_for_body<Body, Range>)\nvoid parallel_for( const Range& range, const Body& body, const static_partitioner& partitioner, task_group_context& context ) {\n    start_for<Range,Body,const static_partitioner>::run(range, body, partitioner, context);\n}\n\n//! Parallel iteration over range with affinity_partitioner and user-supplied context.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_for_body<Body, Range>)\nvoid parallel_for( const Range& range, const Body& body, affinity_partitioner& partitioner, task_group_context& context ) {\n    start_for<Range,Body,affinity_partitioner>::run(range,body,partitioner, context);\n}\n\n//! Implementation of parallel iteration over stepped range of integers with explicit step and partitioner\ntemplate <typename Index, typename Function, typename Partitioner>\nvoid parallel_for_impl(Index first, Index last, Index step, const Function& f, Partitioner& partitioner) {\n    if (step <= 0 )\n        throw_exception(exception_id::nonpositive_step); // throws std::invalid_argument\n    else if (first < last) {\n        // Above \"else\" avoids \"potential divide by zero\" warning on some platforms\n        Index end = Index(last - first - 1ul) / step + Index(1);\n        blocked_range<Index> range(static_cast<Index>(0), end);\n        parallel_for_body_wrapper<Function, Index> body(f, first, step);\n        parallel_for(range, body, partitioner);\n    }\n}\n\n//! Parallel iteration over a range of integers with a step provided and default partitioner\ntemplate <typename Index, typename Function>\n    __TBB_requires(parallel_for_index<Index> && parallel_for_function<Function, Index>)\nvoid parallel_for(Index first, Index last, Index step, const Function& f) {\n    parallel_for_impl<Index,Function,const __TBB_DEFAULT_PARTITIONER>(first, last, step, f, __TBB_DEFAULT_PARTITIONER());\n}\n//! Parallel iteration over a range of integers with a step provided and simple partitioner\ntemplate <typename Index, typename Function>\n    __TBB_requires(parallel_for_index<Index> && parallel_for_function<Function, Index>)\nvoid parallel_for(Index first, Index last, Index step, const Function& f, const simple_partitioner& partitioner) {\n    parallel_for_impl<Index,Function,const simple_partitioner>(first, last, step, f, partitioner);\n}\n//! Parallel iteration over a range of integers with a step provided and auto partitioner\ntemplate <typename Index, typename Function>\n    __TBB_requires(parallel_for_index<Index> && parallel_for_function<Function, Index>)\nvoid parallel_for(Index first, Index last, Index step, const Function& f, const auto_partitioner& partitioner) {\n    parallel_for_impl<Index,Function,const auto_partitioner>(first, last, step, f, partitioner);\n}\n//! Parallel iteration over a range of integers with a step provided and static partitioner\ntemplate <typename Index, typename Function>\n    __TBB_requires(parallel_for_index<Index> && parallel_for_function<Function, Index>)\nvoid parallel_for(Index first, Index last, Index step, const Function& f, const static_partitioner& partitioner) {\n    parallel_for_impl<Index,Function,const static_partitioner>(first, last, step, f, partitioner);\n}\n//! Parallel iteration over a range of integers with a step provided and affinity partitioner\ntemplate <typename Index, typename Function>\n    __TBB_requires(parallel_for_index<Index> && parallel_for_function<Function, Index>)\nvoid parallel_for(Index first, Index last, Index step, const Function& f, affinity_partitioner& partitioner) {\n    parallel_for_impl(first, last, step, f, partitioner);\n}\n\n//! Parallel iteration over a range of integers with a default step value and default partitioner\ntemplate <typename Index, typename Function>\n    __TBB_requires(parallel_for_index<Index> && parallel_for_function<Function, Index>)\nvoid parallel_for(Index first, Index last, const Function& f) {\n    parallel_for_impl<Index,Function,const __TBB_DEFAULT_PARTITIONER>(first, last, static_cast<Index>(1), f, __TBB_DEFAULT_PARTITIONER());\n}\n//! Parallel iteration over a range of integers with a default step value and simple partitioner\ntemplate <typename Index, typename Function>\n    __TBB_requires(parallel_for_index<Index> && parallel_for_function<Function, Index>)\nvoid parallel_for(Index first, Index last, const Function& f, const simple_partitioner& partitioner) {\n    parallel_for_impl<Index,Function,const simple_partitioner>(first, last, static_cast<Index>(1), f, partitioner);\n}\n//! Parallel iteration over a range of integers with a default step value and auto partitioner\ntemplate <typename Index, typename Function>\n    __TBB_requires(parallel_for_index<Index> && parallel_for_function<Function, Index>)\nvoid parallel_for(Index first, Index last, const Function& f, const auto_partitioner& partitioner) {\n    parallel_for_impl<Index,Function,const auto_partitioner>(first, last, static_cast<Index>(1), f, partitioner);\n}\n//! Parallel iteration over a range of integers with a default step value and static partitioner\ntemplate <typename Index, typename Function>\n    __TBB_requires(parallel_for_index<Index> && parallel_for_function<Function, Index>)\nvoid parallel_for(Index first, Index last, const Function& f, const static_partitioner& partitioner) {\n    parallel_for_impl<Index,Function,const static_partitioner>(first, last, static_cast<Index>(1), f, partitioner);\n}\n//! Parallel iteration over a range of integers with a default step value and affinity partitioner\ntemplate <typename Index, typename Function>\n    __TBB_requires(parallel_for_index<Index> && parallel_for_function<Function, Index>)\nvoid parallel_for(Index first, Index last, const Function& f, affinity_partitioner& partitioner) {\n    parallel_for_impl(first, last, static_cast<Index>(1), f, partitioner);\n}\n\n//! Implementation of parallel iteration over stepped range of integers with explicit step, task group context, and partitioner\ntemplate <typename Index, typename Function, typename Partitioner>\nvoid parallel_for_impl(Index first, Index last, Index step, const Function& f, Partitioner& partitioner, task_group_context &context) {\n    if (step <= 0 )\n        throw_exception(exception_id::nonpositive_step); // throws std::invalid_argument\n    else if (first < last) {\n        // Above \"else\" avoids \"potential divide by zero\" warning on some platforms\n        Index end = (last - first - Index(1)) / step + Index(1);\n        blocked_range<Index> range(static_cast<Index>(0), end);\n        parallel_for_body_wrapper<Function, Index> body(f, first, step);\n        parallel_for(range, body, partitioner, context);\n    }\n}\n\n//! Parallel iteration over a range of integers with explicit step, task group context, and default partitioner\ntemplate <typename Index, typename Function>\n    __TBB_requires(parallel_for_index<Index> && parallel_for_function<Function, Index>)\nvoid parallel_for(Index first, Index last, Index step, const Function& f, task_group_context &context) {\n    parallel_for_impl<Index,Function,const __TBB_DEFAULT_PARTITIONER>(first, last, step, f, __TBB_DEFAULT_PARTITIONER(), context);\n}\n//! Parallel iteration over a range of integers with explicit step, task group context, and simple partitioner\ntemplate <typename Index, typename Function>\n    __TBB_requires(parallel_for_index<Index> && parallel_for_function<Function, Index>)\nvoid parallel_for(Index first, Index last, Index step, const Function& f, const simple_partitioner& partitioner, task_group_context &context) {\n    parallel_for_impl<Index,Function,const simple_partitioner>(first, last, step, f, partitioner, context);\n}\n//! Parallel iteration over a range of integers with explicit step, task group context, and auto partitioner\ntemplate <typename Index, typename Function>\n    __TBB_requires(parallel_for_index<Index> && parallel_for_function<Function, Index>)\nvoid parallel_for(Index first, Index last, Index step, const Function& f, const auto_partitioner& partitioner, task_group_context &context) {\n    parallel_for_impl<Index,Function,const auto_partitioner>(first, last, step, f, partitioner, context);\n}\n//! Parallel iteration over a range of integers with explicit step, task group context, and static partitioner\ntemplate <typename Index, typename Function>\n    __TBB_requires(parallel_for_index<Index> && parallel_for_function<Function, Index>)\nvoid parallel_for(Index first, Index last, Index step, const Function& f, const static_partitioner& partitioner, task_group_context &context) {\n    parallel_for_impl<Index,Function,const static_partitioner>(first, last, step, f, partitioner, context);\n}\n//! Parallel iteration over a range of integers with explicit step, task group context, and affinity partitioner\ntemplate <typename Index, typename Function>\n    __TBB_requires(parallel_for_index<Index> && parallel_for_function<Function, Index>)\nvoid parallel_for(Index first, Index last, Index step, const Function& f, affinity_partitioner& partitioner, task_group_context &context) {\n    parallel_for_impl(first, last, step, f, partitioner, context);\n}\n\n//! Parallel iteration over a range of integers with a default step value, explicit task group context, and default partitioner\ntemplate <typename Index, typename Function>\n    __TBB_requires(parallel_for_index<Index> && parallel_for_function<Function, Index>)\nvoid parallel_for(Index first, Index last, const Function& f, task_group_context &context) {\n    parallel_for_impl<Index,Function,const __TBB_DEFAULT_PARTITIONER>(first, last, static_cast<Index>(1), f, __TBB_DEFAULT_PARTITIONER(), context);\n}\n//! Parallel iteration over a range of integers with a default step value, explicit task group context, and simple partitioner\ntemplate <typename Index, typename Function>\n    __TBB_requires(parallel_for_index<Index> && parallel_for_function<Function, Index>)\nvoid parallel_for(Index first, Index last, const Function& f, const simple_partitioner& partitioner, task_group_context &context) {\n    parallel_for_impl<Index,Function,const simple_partitioner>(first, last, static_cast<Index>(1), f, partitioner, context);\n}\n//! Parallel iteration over a range of integers with a default step value, explicit task group context, and auto partitioner\ntemplate <typename Index, typename Function>\n    __TBB_requires(parallel_for_index<Index> && parallel_for_function<Function, Index>)\nvoid parallel_for(Index first, Index last, const Function& f, const auto_partitioner& partitioner, task_group_context &context) {\n    parallel_for_impl<Index,Function,const auto_partitioner>(first, last, static_cast<Index>(1), f, partitioner, context);\n}\n//! Parallel iteration over a range of integers with a default step value, explicit task group context, and static partitioner\ntemplate <typename Index, typename Function>\n    __TBB_requires(parallel_for_index<Index> && parallel_for_function<Function, Index>)\nvoid parallel_for(Index first, Index last, const Function& f, const static_partitioner& partitioner, task_group_context &context) {\n    parallel_for_impl<Index,Function,const static_partitioner>(first, last, static_cast<Index>(1), f, partitioner, context);\n}\n//! Parallel iteration over a range of integers with a default step value, explicit task group context, and affinity_partitioner\ntemplate <typename Index, typename Function>\n    __TBB_requires(parallel_for_index<Index> && parallel_for_function<Function, Index>)\nvoid parallel_for(Index first, Index last, const Function& f, affinity_partitioner& partitioner, task_group_context &context) {\n    parallel_for_impl(first, last, static_cast<Index>(1), f, partitioner, context);\n}\n// @}\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::parallel_for;\n// Split types\nusing detail::split;\nusing detail::proportional_split;\n} // namespace v1\n\n} // namespace tbb\n\n#endif /* __TBB_parallel_for_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/parallel_for_each.h",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_parallel_for_each_H\n#define __TBB_parallel_for_each_H\n\n#include \"detail/_config.h\"\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_exception.h\"\n#include \"detail/_task.h\"\n#include \"detail/_aligned_space.h\"\n#include \"detail/_small_object_pool.h\"\n#include \"detail/_utils.h\"\n\n#include \"parallel_for.h\"\n#include \"task_group.h\" // task_group_context\n\n#include <iterator>\n#include <type_traits>\n\nnamespace tbb {\nnamespace detail {\n#if __TBB_CPP20_CONCEPTS_PRESENT\nnamespace d1 {\ntemplate <typename Item>\nclass feeder;\n\n} // namespace d1\ninline namespace d0 {\n\ntemplate <typename Body, typename ItemType, typename FeederItemType>\nconcept parallel_for_each_body = std::invocable<const std::remove_reference_t<Body>&, ItemType&&> ||\n                                 std::invocable<const std::remove_reference_t<Body>&, ItemType&&, tbb::detail::d1::feeder<FeederItemType>&>;\n\n} // namespace d0\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\nnamespace d2 {\ntemplate<typename Body, typename Item> class feeder_impl;\n} // namespace d2\n\nnamespace d1 {\n//! Class the user supplied algorithm body uses to add new tasks\ntemplate<typename Item>\nclass feeder {\n    feeder() {}\n    feeder(const feeder&) = delete;\n    void operator=( const feeder&) = delete;\n\n    virtual ~feeder () {}\n    virtual void internal_add_copy(const Item& item) = 0;\n    virtual void internal_add_move(Item&& item) = 0;\n\n    template<typename Body_, typename Item_> friend class d2::feeder_impl;\npublic:\n    //! Add a work item to a running parallel_for_each.\n    void add(const Item& item) {internal_add_copy(item);}\n    void add(Item&& item) {internal_add_move(std::move(item));}\n};\n\n} // namespace d1\n\nnamespace d2 {\nusing namespace tbb::detail::d1;\n/** Selects one of the two possible forms of function call member operator.\n    @ingroup algorithms **/\ntemplate<class Body>\nstruct parallel_for_each_operator_selector {\npublic:\n    template<typename ItemArg, typename FeederArg>\n    static auto call(const Body& body, ItemArg&& item, FeederArg*)\n    -> decltype(tbb::detail::invoke(body, std::forward<ItemArg>(item)), void()) {\n        #if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n        // Suppression of Microsoft non-standard extension warnings\n        #pragma warning (push)\n        #pragma warning (disable: 4239)\n        #endif\n\n        tbb::detail::invoke(body, std::forward<ItemArg>(item));\n\n        #if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n        #pragma warning (pop)\n        #endif\n    }\n\n    template<typename ItemArg, typename FeederArg>\n    static auto call(const Body& body, ItemArg&& item, FeederArg* feeder)\n    -> decltype(tbb::detail::invoke(body, std::forward<ItemArg>(item), *feeder), void()) {\n        #if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n        // Suppression of Microsoft non-standard extension warnings\n        #pragma warning (push)\n        #pragma warning (disable: 4239)\n        #endif\n        __TBB_ASSERT(feeder, \"Feeder was not created but should be\");\n\n        tbb::detail::invoke(body, std::forward<ItemArg>(item), *feeder);\n\n        #if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n        #pragma warning (pop)\n        #endif\n    }\n};\n\ntemplate<typename Body, typename Item>\nstruct feeder_item_task: public task {\n    using feeder_type = feeder_impl<Body, Item>;\n\n    template <typename ItemType>\n    feeder_item_task(ItemType&& input_item, feeder_type& feeder, small_object_allocator& alloc, wait_tree_vertex_interface& wait_vertex) :\n        item(std::forward<ItemType>(input_item)),\n        my_feeder(feeder),\n        my_allocator(alloc),\n        m_wait_tree_vertex(r1::get_thread_reference_vertex(&wait_vertex))\n    {\n        m_wait_tree_vertex->reserve();\n    }\n\n    void finalize(const execution_data& ed) {\n        m_wait_tree_vertex->release();\n        my_allocator.delete_object(this, ed);\n    }\n\n    //! Hack for resolve ambiguity between calls to the body with and without moving the stored copy\n    //! Executing body with moving the copy should have higher priority\n    using first_priority = int;\n    using second_priority = double;\n\n    template <typename BodyType, typename ItemType, typename FeederType>\n    static auto call(const BodyType& call_body, ItemType& call_item, FeederType& call_feeder, first_priority)\n    -> decltype(parallel_for_each_operator_selector<Body>::call(call_body, std::move(call_item), &call_feeder), void())\n    {\n        parallel_for_each_operator_selector<Body>::call(call_body, std::move(call_item), &call_feeder);\n    }\n\n    template <typename BodyType, typename ItemType, typename FeederType>\n    static void call(const BodyType& call_body, ItemType& call_item, FeederType& call_feeder, second_priority) {\n        parallel_for_each_operator_selector<Body>::call(call_body, call_item, &call_feeder);\n    }\n\n    task* execute(execution_data& ed) override {\n        call(my_feeder.my_body, item, my_feeder, first_priority{});\n        finalize(ed);\n        return nullptr;\n    }\n\n    task* cancel(execution_data& ed) override {\n        finalize(ed);\n        return nullptr;\n    }\n\n    Item item;\n    feeder_type& my_feeder;\n    small_object_allocator my_allocator;\n    wait_tree_vertex_interface* m_wait_tree_vertex;\n}; // class feeder_item_task\n\n/** Implements new task adding procedure.\n    @ingroup algorithms **/\ntemplate<typename Body, typename Item>\nclass feeder_impl : public feeder<Item> {\n    // Avoiding use of copy constructor in a virtual method if the type does not support it\n    void internal_add_copy_impl(std::true_type, const Item& item) {\n        using feeder_task = feeder_item_task<Body, Item>;\n        small_object_allocator alloc;\n        auto task = alloc.new_object<feeder_task>(item, *this, alloc, my_wait_context);\n\n        spawn(*task, my_execution_context);\n    }\n\n    void internal_add_copy_impl(std::false_type, const Item&) {\n        __TBB_ASSERT(false, \"Overloading for r-value reference doesn't work or it's not movable and not copyable object\");\n    }\n\n    void internal_add_copy(const Item& item) override {\n        internal_add_copy_impl(typename std::is_copy_constructible<Item>::type(), item);\n    }\n\n    void internal_add_move(Item&& item) override {\n        using feeder_task = feeder_item_task<Body, Item>;\n        small_object_allocator alloc{};\n        auto task = alloc.new_object<feeder_task>(std::move(item), *this, alloc, my_wait_context);\n\n        spawn(*task, my_execution_context);\n    }\npublic:\n    feeder_impl(const Body& body, wait_context_vertex& w_context, task_group_context &context)\n      : my_body(body),\n        my_wait_context(w_context)\n      , my_execution_context(context)\n    {}\n\n    const Body& my_body;\n    wait_context_vertex& my_wait_context;\n    task_group_context& my_execution_context;\n}; // class feeder_impl\n\n/** Execute computation under one element of the range\n    @ingroup algorithms **/\ntemplate<typename Iterator, typename Body, typename Item>\nstruct for_each_iteration_task: public task {\n    using feeder_type = feeder_impl<Body, Item>;\n\n    for_each_iteration_task(Iterator input_item_ptr, const Body& body, feeder_impl<Body, Item>* feeder_ptr, wait_context& wait_context) :\n        item_ptr(input_item_ptr), my_body(body), my_feeder_ptr(feeder_ptr), parent_wait_context(wait_context)\n    {}\n\n    void finalize() {\n        parent_wait_context.release();\n    }\n\n    task* execute(execution_data&) override {\n        parallel_for_each_operator_selector<Body>::call(my_body, *item_ptr, my_feeder_ptr);\n        finalize();\n        return nullptr;\n    }\n\n    task* cancel(execution_data&) override {\n        finalize();\n        return nullptr;\n    }\n\n    Iterator item_ptr;\n    const Body& my_body;\n    feeder_impl<Body, Item>* my_feeder_ptr;\n    wait_context& parent_wait_context;\n}; // class for_each_iteration_task\n\n// Helper to get the type of the iterator to the internal sequence of copies\n// If the element can be passed to the body as an rvalue - this iterator should be move_iterator\ntemplate <typename Body, typename Item, typename = void>\nstruct input_iteration_task_iterator_helper {\n    // For input iterators we pass const lvalue reference to the body\n    // It is prohibited to take non-constant lvalue references for input iterators\n    using type = const Item*;\n};\n\ntemplate <typename Body, typename Item>\nstruct input_iteration_task_iterator_helper<Body, Item,\n    tbb::detail::void_t<decltype(parallel_for_each_operator_selector<Body>::call(std::declval<const Body&>(),\n                                                                                 std::declval<Item&&>(),\n                                                                                 std::declval<feeder_impl<Body, Item>*>()))>>\n{\n    using type = std::move_iterator<Item*>;\n};\n\n/** Split one block task to several(max_block_size) iteration tasks for input iterators\n    @ingroup algorithms **/\ntemplate <typename Body, typename Item>\nstruct input_block_handling_task : public task {\n    static constexpr size_t max_block_size = 4;\n\n    using feeder_type = feeder_impl<Body, Item>;\n    using iteration_task_iterator_type = typename input_iteration_task_iterator_helper<Body, Item>::type;\n    using iteration_task = for_each_iteration_task<iteration_task_iterator_type, Body, Item>;\n\n    input_block_handling_task(wait_context_vertex& root_wait_context, task_group_context& e_context,\n                              const Body& body, feeder_impl<Body, Item>* feeder_ptr, small_object_allocator& alloc)\n        :my_size(0), my_wait_context(0), my_root_wait_context(root_wait_context),\n         my_execution_context(e_context), my_allocator(alloc)\n    {\n        auto item_it = block_iteration_space.begin();\n        for (auto* it = task_pool.begin(); it != task_pool.end(); ++it) {\n            new (it) iteration_task(iteration_task_iterator_type(item_it++), body, feeder_ptr, my_wait_context);\n        }\n    }\n\n    void finalize(const execution_data& ed) {\n        my_root_wait_context.release();\n        my_allocator.delete_object(this, ed);\n    }\n\n    task* execute(execution_data& ed) override {\n        __TBB_ASSERT( my_size > 0, \"Negative size was passed to task\");\n        for (std::size_t counter = 1; counter < my_size; ++counter) {\n            my_wait_context.reserve();\n            spawn(*(task_pool.begin() + counter), my_execution_context);\n        }\n        my_wait_context.reserve();\n        execute_and_wait(*task_pool.begin(), my_execution_context,\n                         my_wait_context,    my_execution_context);\n\n        // deallocate current task after children execution\n        finalize(ed);\n        return nullptr;\n    }\n\n    task* cancel(execution_data& ed) override {\n        finalize(ed);\n        return nullptr;\n    }\n\n    ~input_block_handling_task() {\n        for(std::size_t counter = 0; counter < max_block_size; ++counter) {\n            (task_pool.begin() + counter)->~iteration_task();\n            if (counter < my_size) {\n                (block_iteration_space.begin() + counter)->~Item();\n            }\n        }\n    }\n\n    aligned_space<Item, max_block_size> block_iteration_space;\n    aligned_space<iteration_task, max_block_size> task_pool;\n    std::size_t my_size;\n    wait_context my_wait_context;\n    wait_context_vertex& my_root_wait_context;\n    task_group_context& my_execution_context;\n    small_object_allocator my_allocator;\n}; // class input_block_handling_task\n\n/** Split one block task to several(max_block_size) iteration tasks for forward iterators\n    @ingroup algorithms **/\ntemplate <typename Iterator, typename Body, typename Item>\nstruct forward_block_handling_task : public task {\n    static constexpr size_t max_block_size = 4;\n\n    using iteration_task = for_each_iteration_task<Iterator, Body, Item>;\n\n    forward_block_handling_task(Iterator first, std::size_t size,\n                                wait_context_vertex& w_context, task_group_context& e_context,\n                                const Body& body, feeder_impl<Body, Item>* feeder_ptr,\n                                small_object_allocator& alloc)\n        : my_size(size), my_wait_context(0), my_root_wait_context(w_context),\n          my_execution_context(e_context), my_allocator(alloc)\n    {\n        auto* task_it = task_pool.begin();\n        for (std::size_t i = 0; i < size; i++) {\n            new (task_it++) iteration_task(first, body, feeder_ptr, my_wait_context);\n            ++first;\n        }\n    }\n\n    void finalize(const execution_data& ed) {\n        my_root_wait_context.release();\n        my_allocator.delete_object(this, ed);\n    }\n\n    task* execute(execution_data& ed) override {\n        __TBB_ASSERT( my_size > 0, \"Negative size was passed to task\");\n        for(std::size_t counter = 1; counter < my_size; ++counter) {\n            my_wait_context.reserve();\n            spawn(*(task_pool.begin() + counter), my_execution_context);\n        }\n        my_wait_context.reserve();\n        execute_and_wait(*task_pool.begin(), my_execution_context,\n                         my_wait_context,    my_execution_context);\n\n        // deallocate current task after children execution\n        finalize(ed);\n        return nullptr;\n    }\n\n    task* cancel(execution_data& ed) override {\n        finalize(ed);\n        return nullptr;\n    }\n\n    ~forward_block_handling_task() {\n        for(std::size_t counter = 0; counter < my_size; ++counter) {\n            (task_pool.begin() + counter)->~iteration_task();\n        }\n    }\n\n    aligned_space<iteration_task, max_block_size> task_pool;\n    std::size_t my_size;\n    wait_context my_wait_context;\n    wait_context_vertex& my_root_wait_context;\n    task_group_context& my_execution_context;\n    small_object_allocator my_allocator;\n}; // class forward_block_handling_task\n\n/** Body for parallel_for algorithm.\n  * Allows to redirect operations under random access iterators range to the parallel_for algorithm.\n    @ingroup algorithms **/\ntemplate <typename Iterator, typename Body, typename Item>\nclass parallel_for_body_wrapper {\n    Iterator my_first;\n    const Body& my_body;\n    feeder_impl<Body, Item>* my_feeder_ptr;\npublic:\n    parallel_for_body_wrapper(Iterator first, const Body& body, feeder_impl<Body, Item>* feeder_ptr)\n        : my_first(first), my_body(body), my_feeder_ptr(feeder_ptr) {}\n\n    void operator()(tbb::blocked_range<std::size_t> range) const {\n#if __INTEL_COMPILER\n#pragma ivdep\n#endif\n        for (std::size_t count = range.begin(); count != range.end(); count++) {\n            parallel_for_each_operator_selector<Body>::call(my_body, *(my_first + count),\n                                                            my_feeder_ptr);\n        }\n    }\n}; // class parallel_for_body_wrapper\n\n\n/** Helper for getting iterators tag including inherited custom tags\n    @ingroup algorithms */\ntemplate<typename It>\nusing tag = typename std::iterator_traits<It>::iterator_category;\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\ntemplate <typename It>\nstruct move_iterator_dispatch_helper {\n    using type = It;\n};\n\n// Until C++23, std::move_iterator::iterator_concept always defines\n// to std::input_iterator_tag and hence std::forward_iterator concept\n// always evaluates to false, so std::move_iterator dispatch should be\n// made according to the base iterator type.\ntemplate <typename It>\nstruct move_iterator_dispatch_helper<std::move_iterator<It>> {\n    using type = It;\n};\n\ntemplate <typename It>\nusing iterator_tag_dispatch_impl =\n    std::conditional_t<std::random_access_iterator<It>,\n                       std::random_access_iterator_tag,\n                       std::conditional_t<std::forward_iterator<It>,\n                                          std::forward_iterator_tag,\n                                          std::input_iterator_tag>>;\n\ntemplate <typename It>\nusing iterator_tag_dispatch =\n    iterator_tag_dispatch_impl<typename move_iterator_dispatch_helper<It>::type>;\n\n#else\ntemplate<typename It>\nusing iterator_tag_dispatch = typename\n    std::conditional<\n        std::is_base_of<std::random_access_iterator_tag, tag<It>>::value,\n        std::random_access_iterator_tag,\n        typename std::conditional<\n            std::is_base_of<std::forward_iterator_tag, tag<It>>::value,\n            std::forward_iterator_tag,\n            std::input_iterator_tag\n        >::type\n    >::type;\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n\ntemplate <typename Body, typename Iterator, typename Item>\nusing feeder_is_required = tbb::detail::void_t<decltype(tbb::detail::invoke(std::declval<const Body>(),\n                                                                            std::declval<typename std::iterator_traits<Iterator>::reference>(),\n                                                                            std::declval<feeder<Item>&>()))>;\n\n// Creates feeder object only if the body can accept it\ntemplate <typename Iterator, typename Body, typename Item, typename = void>\nstruct feeder_holder {\n    feeder_holder( wait_context_vertex&, task_group_context&, const Body& ) {}\n\n    feeder_impl<Body, Item>* feeder_ptr() { return nullptr; }\n}; // class feeder_holder\n\ntemplate <typename Iterator, typename Body, typename Item>\nclass feeder_holder<Iterator, Body, Item, feeder_is_required<Body, Iterator, Item>> {\npublic:\n    feeder_holder( wait_context_vertex& w_context, task_group_context& context, const Body& body )\n        : my_feeder(body, w_context, context) {}\n\n    feeder_impl<Body, Item>* feeder_ptr() { return &my_feeder; }\nprivate:\n    feeder_impl<Body, Item> my_feeder;\n}; // class feeder_holder\n\ntemplate <typename Iterator, typename Body, typename Item>\nclass for_each_root_task_base : public task {\npublic:\n    for_each_root_task_base(Iterator first, Iterator last, const Body& body, wait_context_vertex& w_context, task_group_context& e_context)\n        : my_first(first), my_last(last), my_wait_context(w_context), my_execution_context(e_context),\n          my_body(body), my_feeder_holder(my_wait_context, my_execution_context, my_body)\n    {\n        my_wait_context.reserve();\n    }\nprivate:\n    task* cancel(execution_data&) override {\n        this->my_wait_context.release();\n        return nullptr;\n    }\nprotected:\n    Iterator my_first;\n    Iterator my_last;\n    wait_context_vertex& my_wait_context;\n    task_group_context& my_execution_context;\n    const Body& my_body;\n    feeder_holder<Iterator, Body, Item> my_feeder_holder;\n}; // class for_each_root_task_base\n\n/** parallel_for_each algorithm root task - most generic version\n  * Splits input range to blocks\n    @ingroup algorithms **/\ntemplate <typename Iterator, typename Body, typename Item, typename IteratorTag = iterator_tag_dispatch<Iterator>>\nclass for_each_root_task : public for_each_root_task_base<Iterator, Body, Item>\n{\n    using base_type = for_each_root_task_base<Iterator, Body, Item>;\npublic:\n    using base_type::base_type;\nprivate:\n    task* execute(execution_data& ed) override {\n        using block_handling_type = input_block_handling_task<Body, Item>;\n\n        if (this->my_first == this->my_last) {\n            this->my_wait_context.release();\n            return nullptr;\n        }\n\n        this->my_wait_context.reserve();\n        small_object_allocator alloc{};\n        auto block_handling_task = alloc.new_object<block_handling_type>(ed, this->my_wait_context, this->my_execution_context,\n                                                                         this->my_body, this->my_feeder_holder.feeder_ptr(),\n                                                                         alloc);\n\n        auto* block_iterator = block_handling_task->block_iteration_space.begin();\n        for (; !(this->my_first == this->my_last) && block_handling_task->my_size < block_handling_type::max_block_size; ++this->my_first) {\n            // Move semantics are automatically used when supported by the iterator\n            new (block_iterator++) Item(*this->my_first);\n            ++block_handling_task->my_size;\n        }\n\n        // Do not access this after spawn to avoid races\n        spawn(*this, this->my_execution_context);\n        return block_handling_task;\n    }\n}; // class for_each_root_task - most generic implementation\n\n/** parallel_for_each algorithm root task - forward iterator based specialization\n  * Splits input range to blocks\n    @ingroup algorithms **/\ntemplate <typename Iterator, typename Body, typename Item>\nclass for_each_root_task<Iterator, Body, Item, std::forward_iterator_tag>\n    : public for_each_root_task_base<Iterator, Body, Item>\n{\n    using base_type = for_each_root_task_base<Iterator, Body, Item>;\npublic:\n    using base_type::base_type;\nprivate:\n    task* execute(execution_data& ed) override {\n        using block_handling_type = forward_block_handling_task<Iterator, Body, Item>;\n        if (this->my_first == this->my_last) {\n            this->my_wait_context.release();\n            return nullptr;\n        }\n\n        std::size_t block_size{0};\n        Iterator first_block_element = this->my_first;\n        for (; !(this->my_first == this->my_last) && block_size < block_handling_type::max_block_size; ++this->my_first) {\n            ++block_size;\n        }\n\n        this->my_wait_context.reserve();\n        small_object_allocator alloc{};\n        auto block_handling_task = alloc.new_object<block_handling_type>(ed, first_block_element, block_size,\n                                                                         this->my_wait_context, this->my_execution_context,\n                                                                         this->my_body, this->my_feeder_holder.feeder_ptr(), alloc);\n\n        // Do not access this after spawn to avoid races\n        spawn(*this, this->my_execution_context);\n        return block_handling_task;\n    }\n}; // class for_each_root_task - forward iterator based specialization\n\n/** parallel_for_each algorithm root task - random access iterator based specialization\n  * Splits input range to blocks\n    @ingroup algorithms **/\ntemplate <typename Iterator, typename Body, typename Item>\nclass for_each_root_task<Iterator, Body, Item, std::random_access_iterator_tag>\n    : public for_each_root_task_base<Iterator, Body, Item>\n{\n    using base_type = for_each_root_task_base<Iterator, Body, Item>;\npublic:\n    using base_type::base_type;\nprivate:\n    task* execute(execution_data&) override {\n        tbb::parallel_for(\n            tbb::blocked_range<std::size_t>(0, std::distance(this->my_first, this->my_last)),\n            parallel_for_body_wrapper<Iterator, Body, Item>(this->my_first, this->my_body, this->my_feeder_holder.feeder_ptr())\n            , this->my_execution_context\n        );\n\n        this->my_wait_context.release();\n        return nullptr;\n    }\n}; // class for_each_root_task - random access iterator based specialization\n\n/** Helper for getting item type. If item type can be deduced from feeder - got it from feeder,\n    if feeder is generic - got item type from range.\n    @ingroup algorithms */\ntemplate<typename Body, typename Item, typename FeederArg>\nauto feeder_argument_parser(void (Body::*)(Item, feeder<FeederArg>&) const) -> FeederArg;\n\ntemplate<typename Body, typename>\ndecltype(feeder_argument_parser<Body>(&Body::operator())) get_item_type_impl(int); // for (T, feeder<T>)\ntemplate<typename Body, typename Item> Item get_item_type_impl(...); // stub\n\ntemplate <typename Body, typename Item>\nusing get_item_type = decltype(get_item_type_impl<Body, Item>(0));\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\ntemplate <typename Body, typename ItemType>\nusing feeder_item_type = std::remove_cvref_t<get_item_type<Body, ItemType>>;\n\ntemplate <typename Body, typename Iterator>\nconcept parallel_for_each_iterator_body =\n    parallel_for_each_body<Body, iterator_reference_type<Iterator>, feeder_item_type<Body, iterator_reference_type<Iterator>>>;\n\ntemplate <typename Body, typename Range>\nconcept parallel_for_each_range_body =\n    parallel_for_each_body<Body, range_reference_type<Range>, feeder_item_type<Body, range_reference_type<Range>>>;\n#endif\n\n/** Implements parallel iteration over a range.\n    @ingroup algorithms */\ntemplate<typename Iterator, typename Body>\nvoid run_parallel_for_each( Iterator first, Iterator last, const Body& body, task_group_context& context)\n{\n    if (!(first == last)) {\n        using ItemType = get_item_type<Body, typename std::iterator_traits<Iterator>::value_type>;\n        wait_context_vertex w_context(0);\n\n        for_each_root_task<Iterator, Body, ItemType> root_task(first, last, body, w_context, context);\n\n        execute_and_wait(root_task, context, w_context.get_context(), context);\n    }\n}\n\n/** \\page parallel_for_each_body_req Requirements on parallel_for_each body\n    Class \\c Body implementing the concept of parallel_for_each body must define:\n    - \\code\n        B::operator()(\n                cv_item_type item,\n                feeder<item_type>& feeder\n        ) const\n\n        OR\n\n        B::operator()( cv_item_type& item ) const\n      \\endcode                                               Process item.\n                                                             May be invoked concurrently  for the same \\c this but different \\c item.\n\n    - \\code item_type( const item_type& ) \\endcode\n                                                             Copy a work item.\n    - \\code ~item_type() \\endcode                            Destroy a work item\n**/\n\n/** \\name parallel_for_each\n    See also requirements on \\ref parallel_for_each_body_req \"parallel_for_each Body\". **/\n//@{\n//! Parallel iteration over a range, with optional addition of more work.\n/** @ingroup algorithms */\ntemplate<typename Iterator, typename Body>\n    __TBB_requires(std::input_iterator<Iterator> && parallel_for_each_iterator_body<Body, Iterator>)\nvoid parallel_for_each(Iterator first, Iterator last, const Body& body) {\n    task_group_context context(PARALLEL_FOR_EACH);\n    run_parallel_for_each<Iterator, Body>(first, last, body, context);\n}\n\ntemplate<typename Range, typename Body>\n    __TBB_requires(container_based_sequence<Range, std::input_iterator_tag> && parallel_for_each_range_body<Body, Range>)\nvoid parallel_for_each(Range& rng, const Body& body) {\n    parallel_for_each(std::begin(rng), std::end(rng), body);\n}\n\ntemplate<typename Range, typename Body>\n    __TBB_requires(container_based_sequence<Range, std::input_iterator_tag> && parallel_for_each_range_body<Body, Range>)\nvoid parallel_for_each(const Range& rng, const Body& body) {\n    parallel_for_each(std::begin(rng), std::end(rng), body);\n}\n\n//! Parallel iteration over a range, with optional addition of more work and user-supplied context\n/** @ingroup algorithms */\ntemplate<typename Iterator, typename Body>\n    __TBB_requires(std::input_iterator<Iterator> && parallel_for_each_iterator_body<Body, Iterator>)\nvoid parallel_for_each(Iterator first, Iterator last, const Body& body, task_group_context& context) {\n    run_parallel_for_each<Iterator, Body>(first, last, body, context);\n}\n\ntemplate<typename Range, typename Body>\n    __TBB_requires(container_based_sequence<Range, std::input_iterator_tag> && parallel_for_each_range_body<Body, Range>)\nvoid parallel_for_each(Range& rng, const Body& body, task_group_context& context) {\n    parallel_for_each(std::begin(rng), std::end(rng), body, context);\n}\n\ntemplate<typename Range, typename Body>\n    __TBB_requires(container_based_sequence<Range, std::input_iterator_tag> && parallel_for_each_range_body<Body, Range>)\nvoid parallel_for_each(const Range& rng, const Body& body, task_group_context& context) {\n    parallel_for_each(std::begin(rng), std::end(rng), body, context);\n}\n\n} // namespace d2\n} // namespace detail\n//! @endcond\n//@}\n\ninline namespace v1 {\nusing detail::d2::parallel_for_each;\nusing detail::d1::feeder;\n} // namespace v1\n\n} // namespace tbb\n\n#endif /* __TBB_parallel_for_each_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/parallel_invoke.h",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_parallel_invoke_H\n#define __TBB_parallel_invoke_H\n\n#include \"detail/_config.h\"\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_exception.h\"\n#include \"detail/_task.h\"\n#include \"detail/_template_helpers.h\"\n#include \"detail/_small_object_pool.h\"\n\n#include \"task_group.h\"\n\n#include <tuple>\n#include <atomic>\n#include <utility>\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n//! Simple task object, executing user method\ntemplate<typename Function, typename WaitObject>\nstruct function_invoker : public task {\n    function_invoker(const Function& function, WaitObject& wait_ctx) :\n        my_function(function),\n        parent_wait_ctx(wait_ctx)\n    {}\n\n    task* execute(execution_data& ed) override {\n        my_function();\n        parent_wait_ctx.release(ed);\n        call_itt_task_notify(destroy, this);\n        return nullptr;\n    }\n\n    task* cancel(execution_data& ed) override {\n        parent_wait_ctx.release(ed);\n        return nullptr;\n    }\n\n    const Function& my_function;\n    WaitObject& parent_wait_ctx;\n}; // struct function_invoker\n\n//! Task object for managing subroots in trinary task trees.\n// Endowed with additional synchronization logic (compatible with wait object interfaces) to support\n// continuation passing execution. This task spawns 2 function_invoker tasks with first and second functors\n// and then executes first functor by itself. But only the last executed functor must destruct and deallocate\n// the subroot task.\ntemplate<typename F1, typename F2, typename F3>\nstruct invoke_subroot_task : public task {\n    wait_context& root_wait_ctx;\n    std::atomic<unsigned> ref_count{0};\n    bool child_spawned = false;\n\n    const F1& self_invoked_functor;\n    function_invoker<F2, invoke_subroot_task<F1, F2, F3>> f2_invoker;\n    function_invoker<F3, invoke_subroot_task<F1, F2, F3>> f3_invoker;\n\n    task_group_context& my_execution_context;\n    small_object_allocator my_allocator;\n\n    invoke_subroot_task(const F1& f1, const F2& f2, const F3& f3, wait_context& wait_ctx, task_group_context& context,\n                 small_object_allocator& alloc) :\n        root_wait_ctx(wait_ctx),\n        self_invoked_functor(f1),\n        f2_invoker(f2, *this),\n        f3_invoker(f3, *this),\n        my_execution_context(context),\n        my_allocator(alloc)\n    {\n        root_wait_ctx.reserve();\n    }\n\n    void finalize(const execution_data& ed) {\n        root_wait_ctx.release();\n\n        my_allocator.delete_object(this, ed);\n    }\n\n    void release(const execution_data& ed) {\n        __TBB_ASSERT(ref_count > 0, nullptr);\n        call_itt_task_notify(releasing, this);\n        if( --ref_count == 0 ) {\n            call_itt_task_notify(acquired, this);\n            finalize(ed);\n        }\n    }\n\n    task* execute(execution_data& ed) override {\n        ref_count.fetch_add(3, std::memory_order_relaxed);\n        spawn(f3_invoker, my_execution_context);\n        spawn(f2_invoker, my_execution_context);\n        self_invoked_functor();\n\n        release(ed);\n        return nullptr;\n    }\n\n    task* cancel(execution_data& ed) override {\n        if( ref_count > 0 ) { // detect children spawn\n            release(ed);\n        } else {\n            finalize(ed);\n        }\n        return nullptr;\n    }\n}; // struct subroot_task\n\nclass invoke_root_task {\npublic:\n    invoke_root_task(wait_context& wc) : my_wait_context(wc) {}\n    void release(const execution_data&) {\n        my_wait_context.release();\n    }\nprivate:\n    wait_context& my_wait_context;\n};\n\ntemplate<typename F1>\nvoid invoke_recursive_separation(wait_context& root_wait_ctx, task_group_context& context, const F1& f1) {\n    root_wait_ctx.reserve(1);\n    invoke_root_task root(root_wait_ctx);\n    function_invoker<F1, invoke_root_task> invoker1(f1, root);\n\n    execute_and_wait(invoker1, context, root_wait_ctx, context);\n}\n\ntemplate<typename F1, typename F2>\nvoid invoke_recursive_separation(wait_context& root_wait_ctx, task_group_context& context, const F1& f1, const F2& f2) {\n    root_wait_ctx.reserve(2);\n    invoke_root_task root(root_wait_ctx);\n    function_invoker<F1, invoke_root_task> invoker1(f1, root);\n    function_invoker<F2, invoke_root_task> invoker2(f2, root);\n\n    spawn(invoker1, context);\n    execute_and_wait(invoker2, context, root_wait_ctx, context);\n}\n\ntemplate<typename F1, typename F2, typename F3>\nvoid invoke_recursive_separation(wait_context& root_wait_ctx, task_group_context& context, const F1& f1, const F2& f2, const F3& f3) {\n    root_wait_ctx.reserve(3);\n    invoke_root_task root(root_wait_ctx);\n    function_invoker<F1, invoke_root_task> invoker1(f1, root);\n    function_invoker<F2, invoke_root_task> invoker2(f2, root);\n    function_invoker<F3, invoke_root_task> invoker3(f3, root);\n\n    //TODO: implement sub root for two tasks (measure performance)\n    spawn(invoker1, context);\n    spawn(invoker2, context);\n    execute_and_wait(invoker3, context, root_wait_ctx, context);\n}\n\ntemplate<typename F1, typename F2, typename F3, typename... Fs>\nvoid invoke_recursive_separation(wait_context& root_wait_ctx, task_group_context& context,\n                                 const F1& f1, const F2& f2, const F3& f3, const Fs&... fs) {\n    small_object_allocator alloc{};\n    auto sub_root = alloc.new_object<invoke_subroot_task<F1, F2, F3>>(f1, f2, f3, root_wait_ctx, context, alloc);\n    spawn(*sub_root, context);\n\n    invoke_recursive_separation(root_wait_ctx, context, fs...);\n}\n\ntemplate<typename... Fs>\nvoid parallel_invoke_impl(task_group_context& context, const Fs&... fs) {\n    static_assert(sizeof...(Fs) >= 2, \"Parallel invoke may be called with at least two callable\");\n    wait_context root_wait_ctx{0};\n\n    invoke_recursive_separation(root_wait_ctx, context, fs...);\n}\n\ntemplate<typename F1, typename... Fs>\nvoid parallel_invoke_impl(const F1& f1, const Fs&... fs) {\n    static_assert(sizeof...(Fs) >= 1, \"Parallel invoke may be called with at least two callable\");\n    task_group_context context(PARALLEL_INVOKE);\n    wait_context root_wait_ctx{0};\n\n    invoke_recursive_separation(root_wait_ctx, context, fs..., f1);\n}\n\n//! Passes last argument of variadic pack as first for handling user provided task_group_context\ntemplate <typename Tuple, typename... Fs>\nstruct invoke_helper;\n\ntemplate <typename... Args, typename T, typename... Fs>\nstruct invoke_helper<std::tuple<Args...>, T, Fs...> : invoke_helper<std::tuple<Args..., T>, Fs...> {};\n\ntemplate <typename... Fs, typename T/*task_group_context or callable*/>\nstruct invoke_helper<std::tuple<Fs...>, T> {\n    void operator()(Fs&&... args, T&& t) {\n        parallel_invoke_impl(std::forward<T>(t), std::forward<Fs>(args)...);\n    }\n};\n\n//! Parallel execution of several function objects\n// We need to pass parameter pack through forwarding reference,\n// since this pack may contain task_group_context that must be passed via lvalue non-const reference\ntemplate<typename... Fs>\nvoid parallel_invoke(Fs&&... fs) {\n    invoke_helper<std::tuple<>, Fs...>()(std::forward<Fs>(fs)...);\n}\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::parallel_invoke;\n} // namespace v1\n\n} // namespace tbb\n#endif /* __TBB_parallel_invoke_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/parallel_pipeline.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_parallel_pipeline_H\n#define __TBB_parallel_pipeline_H\n\n#include \"detail/_pipeline_filters.h\"\n#include \"detail/_config.h\"\n#include \"detail/_namespace_injection.h\"\n#include \"task_group.h\"\n\n#include <cstddef>\n#include <atomic>\n#include <type_traits>\n\nnamespace tbb {\nnamespace detail {\n\nnamespace r1 {\nTBB_EXPORT void __TBB_EXPORTED_FUNC parallel_pipeline(task_group_context&, std::size_t, const d1::filter_node&);\n}\n\nnamespace d1 {\n\nenum class filter_mode : unsigned int\n{\n    //! processes multiple items in parallel and in no particular order\n    parallel = base_filter::filter_is_out_of_order,\n    //! processes items one at a time; all such filters process items in the same order\n    serial_in_order =  base_filter::filter_is_serial,\n    //! processes items one at a time and in no particular order\n    serial_out_of_order = base_filter::filter_is_serial | base_filter::filter_is_out_of_order\n};\n//! Class representing a chain of type-safe pipeline filters\n/** @ingroup algorithms */\ntemplate<typename InputType, typename OutputType>\nclass filter {\n    filter_node_ptr my_root;\n    filter( filter_node_ptr root ) : my_root(root) {}\n    friend void parallel_pipeline( size_t, const filter<void,void>&, task_group_context& );\n    template<typename T_, typename U_, typename Body>\n    friend filter<T_,U_> make_filter( filter_mode, const Body& );\n    template<typename T_, typename V_, typename U_>\n    friend filter<T_,U_> operator&( const filter<T_,V_>&, const filter<V_,U_>& );\npublic:\n    filter() = default;\n    filter( const filter& rhs ) : my_root(rhs.my_root) {}\n    filter( filter&& rhs ) : my_root(std::move(rhs.my_root)) {}\n\n    void operator=(const filter& rhs) {\n        my_root = rhs.my_root;\n    }\n    void operator=( filter&& rhs ) {\n        my_root = std::move(rhs.my_root);\n    }\n\n    template<typename Body>\n    filter( filter_mode mode, const Body& body ) :\n        my_root( new(r1::allocate_memory(sizeof(filter_node_leaf<InputType, OutputType, Body>)))\n                    filter_node_leaf<InputType, OutputType, Body>(static_cast<unsigned int>(mode), body) ) {\n    }\n\n    filter& operator&=( const filter<OutputType,OutputType>& right ) {\n        *this = *this & right;\n        return *this;\n    }\n\n    void clear() {\n        // Like operator= with filter() on right side.\n        my_root = nullptr;\n    }\n};\n\n//! Create a filter to participate in parallel_pipeline\n/** @ingroup algorithms */\ntemplate<typename InputType, typename OutputType, typename Body>\nfilter<InputType, OutputType> make_filter( filter_mode mode, const Body& body ) {\n    return filter_node_ptr( new(r1::allocate_memory(sizeof(filter_node_leaf<InputType, OutputType, Body>)))\n                                filter_node_leaf<InputType, OutputType, Body>(static_cast<unsigned int>(mode), body) );\n}\n\n//! Create a filter to participate in parallel_pipeline\n/** @ingroup algorithms */\ntemplate<typename Body>\nfilter<filter_input<Body>, filter_output<Body>> make_filter( filter_mode mode, const Body& body ) {\n    return make_filter<filter_input<Body>, filter_output<Body>>(mode, body);\n}\n\n//! Composition of filters left and right.\n/** @ingroup algorithms */\ntemplate<typename T, typename V, typename U>\nfilter<T,U> operator&( const filter<T,V>& left, const filter<V,U>& right ) {\n    __TBB_ASSERT(left.my_root,\"cannot use default-constructed filter as left argument of '&'\");\n    __TBB_ASSERT(right.my_root,\"cannot use default-constructed filter as right argument of '&'\");\n    return filter_node_ptr( new (r1::allocate_memory(sizeof(filter_node))) filter_node(left.my_root,right.my_root) );\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\ntemplate<typename Body>\nfilter(filter_mode, Body)\n->filter<filter_input<Body>, filter_output<Body>>;\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\n//! Parallel pipeline over chain of filters with user-supplied context.\n/** @ingroup algorithms **/\ninline void parallel_pipeline(size_t max_number_of_live_tokens, const filter<void,void>& filter_chain, task_group_context& context) {\n    r1::parallel_pipeline(context, max_number_of_live_tokens, *filter_chain.my_root);\n}\n\n//! Parallel pipeline over chain of filters.\n/** @ingroup algorithms **/\ninline void parallel_pipeline(size_t max_number_of_live_tokens, const filter<void,void>& filter_chain) {\n    task_group_context context;\n    parallel_pipeline(max_number_of_live_tokens, filter_chain, context);\n}\n\n//! Parallel pipeline over sequence of filters.\n/** @ingroup algorithms **/\ntemplate<typename F1, typename F2, typename... FiltersContext>\nvoid parallel_pipeline(size_t max_number_of_live_tokens,\n                              const F1& filter1,\n                              const F2& filter2,\n                              FiltersContext&&... filters) {\n    parallel_pipeline(max_number_of_live_tokens, filter1 & filter2, std::forward<FiltersContext>(filters)...);\n}\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1\n{\nusing detail::d1::parallel_pipeline;\nusing detail::d1::filter;\nusing detail::d1::make_filter;\nusing detail::d1::filter_mode;\nusing detail::d1::flow_control;\n}\n} // tbb\n\n#endif /* __TBB_parallel_pipeline_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/parallel_reduce.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_parallel_reduce_H\n#define __TBB_parallel_reduce_H\n\n#include <new>\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_task.h\"\n#include \"detail/_aligned_space.h\"\n#include \"detail/_small_object_pool.h\"\n#include \"detail/_range_common.h\"\n\n#include \"task_group.h\" // task_group_context\n#include \"partitioner.h\"\n#include \"profiling.h\"\n\nnamespace tbb {\nnamespace detail {\n#if __TBB_CPP20_CONCEPTS_PRESENT\ninline namespace d0 {\n\ntemplate <typename Body, typename Range>\nconcept parallel_reduce_body = splittable<Body> &&\n                               requires( Body& body, const Range& range, Body& rhs ) {\n                                   body(range);\n                                   body.join(rhs);\n                               };\n\ntemplate <typename Function, typename Range, typename Value>\nconcept parallel_reduce_function = std::invocable<const std::remove_reference_t<Function>&,\n                                                  const Range&, Value&&> &&\n                                   std::convertible_to<std::invoke_result_t<const std::remove_reference_t<Function>&,\n                                                                            const Range&, Value&&>,\n                                                        Value>;\n\ntemplate <typename Combine, typename Value>\nconcept parallel_reduce_combine = std::invocable<const std::remove_reference_t<Combine>&,\n                                                 Value&&, Value&&> &&\n                                  std::convertible_to<std::invoke_result_t<const std::remove_reference_t<Combine>&,\n                                                                           Value&&, Value&&>,\n                                                      Value>;\n\n} // namespace d0\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\nnamespace d1 {\n\n//! Tree node type for parallel_reduce.\n/** @ingroup algorithms */\n//TODO: consider folding tree via bypass execution(instead of manual folding)\n// for better cancellation and critical tasks handling (performance measurements required).\ntemplate<typename Body>\nstruct reduction_tree_node : public tree_node {\n    tbb::detail::aligned_space<Body> zombie_space;\n    Body& left_body;\n    bool has_right_zombie{false};\n\n    reduction_tree_node(node* parent, int ref_count, Body& input_left_body, small_object_allocator& alloc) :\n        tree_node{parent, ref_count, alloc},\n        left_body(input_left_body) /* gcc4.8 bug - braced-initialization doesn't work for class members of reference type */\n    {}\n\n    void join(task_group_context* context) {\n        if (has_right_zombie && !context->is_group_execution_cancelled())\n            left_body.join(*zombie_space.begin());\n    }\n\n    ~reduction_tree_node() {\n        if( has_right_zombie ) zombie_space.begin()->~Body();\n    }\n};\n\n//! Task type used to split the work of parallel_reduce.\n/** @ingroup algorithms */\ntemplate<typename Range, typename Body, typename Partitioner>\nstruct start_reduce : public task {\n    Range my_range;\n    Body* my_body;\n    node* my_parent;\n\n    typename Partitioner::task_partition_type my_partition;\n    small_object_allocator my_allocator;\n    bool is_right_child;\n\n    task* execute(execution_data&) override;\n    task* cancel(execution_data&) override;\n    void finalize(const execution_data&);\n\n    using tree_node_type = reduction_tree_node<Body>;\n\n    //! Constructor reduce root task.\n    start_reduce( const Range& range, Body& body, Partitioner& partitioner, small_object_allocator& alloc ) :\n        my_range(range),\n        my_body(&body),\n        my_parent(nullptr),\n        my_partition(partitioner),\n        my_allocator(alloc),\n        is_right_child(false) {}\n    //! Splitting constructor used to generate children.\n    /** parent_ becomes left child. Newly constructed object is right child. */\n    start_reduce( start_reduce& parent_, typename Partitioner::split_type& split_obj, small_object_allocator& alloc ) :\n        my_range(parent_.my_range, get_range_split_object<Range>(split_obj)),\n        my_body(parent_.my_body),\n        my_parent(nullptr),\n        my_partition(parent_.my_partition, split_obj),\n        my_allocator(alloc),\n        is_right_child(true)\n    {\n        parent_.is_right_child = false;\n    }\n    //! Construct right child from the given range as response to the demand.\n    /** parent_ remains left child. Newly constructed object is right child. */\n    start_reduce( start_reduce& parent_, const Range& r, depth_t d, small_object_allocator& alloc ) :\n        my_range(r),\n        my_body(parent_.my_body),\n        my_parent(nullptr),\n        my_partition(parent_.my_partition, split()),\n        my_allocator(alloc),\n        is_right_child(true)\n    {\n        my_partition.align_depth( d );\n        parent_.is_right_child = false;\n    }\n    static void run(const Range& range, Body& body, Partitioner& partitioner, task_group_context& context) {\n        if ( !range.empty() ) {\n            wait_node wn;\n            small_object_allocator alloc{};\n            auto reduce_task = alloc.new_object<start_reduce>(range, body, partitioner, alloc);\n            reduce_task->my_parent = &wn;\n            execute_and_wait(*reduce_task, context, wn.m_wait, context);\n        }\n    }\n    static void run(const Range& range, Body& body, Partitioner& partitioner) {\n        // Bound context prevents exceptions from body to affect nesting or sibling algorithms,\n        // and allows users to handle exceptions safely by wrapping parallel_reduce in the try-block.\n        task_group_context context(PARALLEL_REDUCE);\n        run(range, body, partitioner, context);\n    }\n    //! Run body for range, serves as callback for partitioner\n    void run_body( Range &r ) {\n        tbb::detail::invoke(*my_body, r);\n    }\n\n    //! spawn right task, serves as callback for partitioner\n    void offer_work(typename Partitioner::split_type& split_obj, execution_data& ed) {\n        offer_work_impl(ed, *this, split_obj);\n    }\n    //! spawn right task, serves as callback for partitioner\n    void offer_work(const Range& r, depth_t d, execution_data& ed) {\n        offer_work_impl(ed, *this, r, d);\n    }\n\nprivate:\n    template <typename... Args>\n    void offer_work_impl(execution_data& ed, Args&&... args) {\n        small_object_allocator alloc{};\n        // New right child\n        auto right_child = alloc.new_object<start_reduce>(ed, std::forward<Args>(args)..., alloc);\n\n        // New root node as a continuation and ref count. Left and right child attach to the new parent.\n        right_child->my_parent = my_parent = alloc.new_object<tree_node_type>(ed, my_parent, 2, *my_body, alloc);\n\n        // Spawn the right sibling\n        right_child->spawn_self(ed);\n    }\n\n    void spawn_self(execution_data& ed) {\n        my_partition.spawn_task(*this, *context(ed));\n    }\n};\n\n//! fold the tree and deallocate the task\ntemplate<typename Range, typename Body, typename Partitioner>\nvoid start_reduce<Range, Body, Partitioner>::finalize(const execution_data& ed) {\n    // Get the current parent and wait object before an object destruction\n    node* parent = my_parent;\n    auto allocator = my_allocator;\n    // Task execution finished - destroy it\n    this->~start_reduce();\n    // Unwind the tree decrementing the parent`s reference count\n    fold_tree<tree_node_type>(parent, ed);\n    allocator.deallocate(this, ed);\n}\n\n//! Execute parallel_reduce task\ntemplate<typename Range, typename Body, typename Partitioner>\ntask* start_reduce<Range,Body,Partitioner>::execute(execution_data& ed) {\n    if (!is_same_affinity(ed)) {\n        my_partition.note_affinity(execution_slot(ed));\n    }\n    my_partition.check_being_stolen(*this, ed);\n\n    // The acquire barrier synchronizes the data pointed with my_body if the left\n    // task has already finished.\n    __TBB_ASSERT(my_parent, nullptr);\n    if( is_right_child && my_parent->m_ref_count.load(std::memory_order_acquire) == 2 ) {\n        tree_node_type* parent_ptr = static_cast<tree_node_type*>(my_parent);\n        my_body = static_cast<Body*>(new( parent_ptr->zombie_space.begin() ) Body(*my_body, split()));\n        parent_ptr->has_right_zombie = true;\n    }\n    __TBB_ASSERT(my_body != nullptr, \"Incorrect body value\");\n\n    my_partition.execute(*this, my_range, ed);\n\n    finalize(ed);\n    return nullptr;\n}\n\n//! Cancel parallel_reduce task\ntemplate<typename Range, typename Body, typename Partitioner>\ntask* start_reduce<Range, Body, Partitioner>::cancel(execution_data& ed) {\n    finalize(ed);\n    return nullptr;\n}\n\n//! Tree node type for parallel_deterministic_reduce.\n/** @ingroup algorithms */\ntemplate<typename Body>\nstruct deterministic_reduction_tree_node : public tree_node {\n    Body right_body;\n    Body& left_body;\n\n    deterministic_reduction_tree_node(node* parent, int ref_count, Body& input_left_body, small_object_allocator& alloc) :\n        tree_node{parent, ref_count, alloc},\n        right_body{input_left_body, detail::split()},\n        left_body(input_left_body)\n    {}\n\n    void join(task_group_context* context) {\n        if (!context->is_group_execution_cancelled())\n            left_body.join(right_body);\n    }\n};\n\n//! Task type used to split the work of parallel_deterministic_reduce.\n/** @ingroup algorithms */\ntemplate<typename Range, typename Body, typename Partitioner>\nstruct start_deterministic_reduce : public task {\n    Range my_range;\n    Body& my_body;\n    node* my_parent;\n\n    typename Partitioner::task_partition_type my_partition;\n    small_object_allocator my_allocator;\n\n    task* execute(execution_data&) override;\n    task* cancel(execution_data&) override;\n    void finalize(const execution_data&);\n\n    using tree_node_type = deterministic_reduction_tree_node<Body>;\n\n    //! Constructor deterministic_reduce root task.\n    start_deterministic_reduce( const Range& range, Partitioner& partitioner, Body& body, small_object_allocator& alloc ) :\n        my_range(range),\n        my_body(body),\n        my_parent(nullptr),\n        my_partition(partitioner),\n        my_allocator(alloc) {}\n    //! Splitting constructor used to generate children.\n    /** parent_ becomes left child.  Newly constructed object is right child. */\n    start_deterministic_reduce( start_deterministic_reduce& parent_, typename Partitioner::split_type& split_obj, Body& body,\n                                small_object_allocator& alloc ) :\n        my_range(parent_.my_range, get_range_split_object<Range>(split_obj)),\n        my_body(body),\n        my_parent(nullptr),\n        my_partition(parent_.my_partition, split_obj),\n        my_allocator(alloc) {}\n    static void run(const Range& range, Body& body, Partitioner& partitioner, task_group_context& context) {\n        if ( !range.empty() ) {\n            wait_node wn;\n            small_object_allocator alloc{};\n            auto deterministic_reduce_task =\n                alloc.new_object<start_deterministic_reduce>(range, partitioner, body, alloc);\n            deterministic_reduce_task->my_parent = &wn;\n            execute_and_wait(*deterministic_reduce_task, context, wn.m_wait, context);\n        }\n    }\n    static void run(const Range& range, Body& body, Partitioner& partitioner) {\n        // Bound context prevents exceptions from body to affect nesting or sibling algorithms,\n        // and allows users to handle exceptions safely by wrapping parallel_deterministic_reduce\n        // in the try-block.\n        task_group_context context(PARALLEL_REDUCE);\n        run(range, body, partitioner, context);\n    }\n    //! Run body for range, serves as callback for partitioner\n    void run_body( Range &r ) {\n        tbb::detail::invoke(my_body, r);\n    }\n    //! Spawn right task, serves as callback for partitioner\n    void offer_work(typename Partitioner::split_type& split_obj, execution_data& ed) {\n        offer_work_impl(ed, *this, split_obj);\n    }\nprivate:\n    template <typename... Args>\n    void offer_work_impl(execution_data& ed, Args&&... args) {\n        small_object_allocator alloc{};\n        // New root node as a continuation and ref count. Left and right child attach to the new parent. Split the body.\n        auto new_tree_node = alloc.new_object<tree_node_type>(ed, my_parent, 2, my_body, alloc);\n\n        // New right child\n        auto right_child = alloc.new_object<start_deterministic_reduce>(ed, std::forward<Args>(args)..., new_tree_node->right_body, alloc);\n\n        right_child->my_parent = my_parent = new_tree_node;\n\n        // Spawn the right sibling\n        right_child->spawn_self(ed);\n    }\n\n    void spawn_self(execution_data& ed) {\n        my_partition.spawn_task(*this, *context(ed));\n    }\n};\n\n//! Fold the tree and deallocate the task\ntemplate<typename Range, typename Body, typename Partitioner>\nvoid start_deterministic_reduce<Range, Body, Partitioner>::finalize(const execution_data& ed) {\n    // Get the current parent and wait object before an object destruction\n    node* parent = my_parent;\n\n    auto allocator = my_allocator;\n    // Task execution finished - destroy it\n    this->~start_deterministic_reduce();\n    // Unwind the tree decrementing the parent`s reference count\n    fold_tree<tree_node_type>(parent, ed);\n    allocator.deallocate(this, ed);\n}\n\n//! Execute parallel_deterministic_reduce task\ntemplate<typename Range, typename Body, typename Partitioner>\ntask* start_deterministic_reduce<Range,Body,Partitioner>::execute(execution_data& ed) {\n    if (!is_same_affinity(ed)) {\n        my_partition.note_affinity(execution_slot(ed));\n    }\n    my_partition.check_being_stolen(*this, ed);\n\n    my_partition.execute(*this, my_range, ed);\n\n    finalize(ed);\n    return nullptr;\n}\n\n//! Cancel parallel_deterministic_reduce task\ntemplate<typename Range, typename Body, typename Partitioner>\ntask* start_deterministic_reduce<Range, Body, Partitioner>::cancel(execution_data& ed) {\n    finalize(ed);\n    return nullptr;\n}\n\n\n//! Auxiliary class for parallel_reduce; for internal use only.\n/** The adaptor class that implements \\ref parallel_reduce_body_req \"parallel_reduce Body\"\n    using given \\ref parallel_reduce_lambda_req \"anonymous function objects\".\n **/\n/** @ingroup algorithms */\ntemplate<typename Range, typename Value, typename RealBody, typename Reduction>\nclass lambda_reduce_body {\n//TODO: decide if my_real_body, my_reduction, and my_identity_element should be copied or referenced\n//       (might require some performance measurements)\n\n    const Value&     my_identity_element;\n    const RealBody&  my_real_body;\n    const Reduction& my_reduction;\n    Value            my_value;\n    lambda_reduce_body& operator= ( const lambda_reduce_body& other );\npublic:\n    lambda_reduce_body( const Value& identity, const RealBody& body, const Reduction& reduction )\n        : my_identity_element(identity)\n        , my_real_body(body)\n        , my_reduction(reduction)\n        , my_value(identity)\n    { }\n    lambda_reduce_body( const lambda_reduce_body& other ) = default;\n    lambda_reduce_body( lambda_reduce_body& other, tbb::split )\n        : my_identity_element(other.my_identity_element)\n        , my_real_body(other.my_real_body)\n        , my_reduction(other.my_reduction)\n        , my_value(other.my_identity_element)\n    { }\n    void operator()(Range& range) {\n        my_value = tbb::detail::invoke(my_real_body, range, std::move(my_value));\n    }\n\n    void join( lambda_reduce_body& rhs ) {\n        my_value = tbb::detail::invoke(my_reduction, std::move(my_value), std::move(rhs.my_value));\n    }\n\n    __TBB_nodiscard Value&& result() && noexcept {\n        return std::move(my_value);\n    }\n};\n\n\n// Requirements on Range concept are documented in blocked_range.h\n\n/** \\page parallel_reduce_body_req Requirements on parallel_reduce body\n    Class \\c Body implementing the concept of parallel_reduce body must define:\n    - \\code Body::Body( Body&, split ); \\endcode        Splitting constructor.\n                                                        Must be able to run concurrently with operator() and method \\c join\n    - \\code Body::~Body(); \\endcode                     Destructor\n    - \\code void Body::operator()( Range& r ); \\endcode Function call operator applying body to range \\c r\n                                                        and accumulating the result\n    - \\code void Body::join( Body& b ); \\endcode        Join results.\n                                                        The result in \\c b should be merged into the result of \\c this\n**/\n\n/** \\page parallel_reduce_lambda_req Requirements on parallel_reduce anonymous function objects (lambda functions)\n    TO BE DOCUMENTED\n**/\n\n/** \\name parallel_reduce\n    See also requirements on \\ref range_req \"Range\" and \\ref parallel_reduce_body_req \"parallel_reduce Body\". **/\n//@{\n\n//! Parallel iteration with reduction and default partitioner.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_body<Body, Range>)\nvoid parallel_reduce( const Range& range, Body& body ) {\n    start_reduce<Range,Body, const __TBB_DEFAULT_PARTITIONER>::run( range, body, __TBB_DEFAULT_PARTITIONER() );\n}\n\n//! Parallel iteration with reduction and simple_partitioner\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_body<Body, Range>)\nvoid parallel_reduce( const Range& range, Body& body, const simple_partitioner& partitioner ) {\n    start_reduce<Range,Body,const simple_partitioner>::run( range, body, partitioner );\n}\n\n//! Parallel iteration with reduction and auto_partitioner\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_body<Body, Range>)\nvoid parallel_reduce( const Range& range, Body& body, const auto_partitioner& partitioner ) {\n    start_reduce<Range,Body,const auto_partitioner>::run( range, body, partitioner );\n}\n\n//! Parallel iteration with reduction and static_partitioner\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_body<Body, Range>)\nvoid parallel_reduce( const Range& range, Body& body, const static_partitioner& partitioner ) {\n    start_reduce<Range,Body,const static_partitioner>::run( range, body, partitioner );\n}\n\n//! Parallel iteration with reduction and affinity_partitioner\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_body<Body, Range>)\nvoid parallel_reduce( const Range& range, Body& body, affinity_partitioner& partitioner ) {\n    start_reduce<Range,Body,affinity_partitioner>::run( range, body, partitioner );\n}\n\n//! Parallel iteration with reduction, default partitioner and user-supplied context.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_body<Body, Range>)\nvoid parallel_reduce( const Range& range, Body& body, task_group_context& context ) {\n    start_reduce<Range,Body,const __TBB_DEFAULT_PARTITIONER>::run( range, body, __TBB_DEFAULT_PARTITIONER(), context );\n}\n\n//! Parallel iteration with reduction, simple partitioner and user-supplied context.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_body<Body, Range>)\nvoid parallel_reduce( const Range& range, Body& body, const simple_partitioner& partitioner, task_group_context& context ) {\n    start_reduce<Range,Body,const simple_partitioner>::run( range, body, partitioner, context );\n}\n\n//! Parallel iteration with reduction, auto_partitioner and user-supplied context\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_body<Body, Range>)\nvoid parallel_reduce( const Range& range, Body& body, const auto_partitioner& partitioner, task_group_context& context ) {\n    start_reduce<Range,Body,const auto_partitioner>::run( range, body, partitioner, context );\n}\n\n//! Parallel iteration with reduction, static_partitioner and user-supplied context\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_body<Body, Range>)\nvoid parallel_reduce( const Range& range, Body& body, const static_partitioner& partitioner, task_group_context& context ) {\n    start_reduce<Range,Body,const static_partitioner>::run( range, body, partitioner, context );\n}\n\n//! Parallel iteration with reduction, affinity_partitioner and user-supplied context\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_body<Body, Range>)\nvoid parallel_reduce( const Range& range, Body& body, affinity_partitioner& partitioner, task_group_context& context ) {\n    start_reduce<Range,Body,affinity_partitioner>::run( range, body, partitioner, context );\n}\n/** parallel_reduce overloads that work with anonymous function objects\n    (see also \\ref parallel_reduce_lambda_req \"requirements on parallel_reduce anonymous function objects\"). **/\n\n//! Parallel iteration with reduction and default partitioner.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Value, typename RealBody, typename Reduction>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_function<RealBody, Range, Value> &&\n                   parallel_reduce_combine<Reduction, Value>)\nValue parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction ) {\n    lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);\n    start_reduce<Range,lambda_reduce_body<Range,Value,RealBody,Reduction>,const __TBB_DEFAULT_PARTITIONER>\n                          ::run(range, body, __TBB_DEFAULT_PARTITIONER() );\n    return std::move(body).result();\n}\n\n//! Parallel iteration with reduction and simple_partitioner.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Value, typename RealBody, typename Reduction>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_function<RealBody, Range, Value> &&\n                   parallel_reduce_combine<Reduction, Value>)\nValue parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction,\n                       const simple_partitioner& partitioner ) {\n    lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);\n    start_reduce<Range,lambda_reduce_body<Range,Value,RealBody,Reduction>,const simple_partitioner>\n                          ::run(range, body, partitioner );\n    return std::move(body).result();\n}\n\n//! Parallel iteration with reduction and auto_partitioner\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Value, typename RealBody, typename Reduction>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_function<RealBody, Range, Value> &&\n                   parallel_reduce_combine<Reduction, Value>)\nValue parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction,\n                       const auto_partitioner& partitioner ) {\n    lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);\n    start_reduce<Range,lambda_reduce_body<Range,Value,RealBody,Reduction>,const auto_partitioner>\n                          ::run( range, body, partitioner );\n    return std::move(body).result();\n}\n\n//! Parallel iteration with reduction and static_partitioner\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Value, typename RealBody, typename Reduction>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_function<RealBody, Range, Value> &&\n                   parallel_reduce_combine<Reduction, Value>)\nValue parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction,\n                       const static_partitioner& partitioner ) {\n    lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);\n    start_reduce<Range,lambda_reduce_body<Range,Value,RealBody,Reduction>,const static_partitioner>\n                                        ::run( range, body, partitioner );\n    return std::move(body).result();\n}\n\n//! Parallel iteration with reduction and affinity_partitioner\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Value, typename RealBody, typename Reduction>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_function<RealBody, Range, Value> &&\n                   parallel_reduce_combine<Reduction, Value>)\nValue parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction,\n                       affinity_partitioner& partitioner ) {\n    lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);\n    start_reduce<Range,lambda_reduce_body<Range,Value,RealBody,Reduction>,affinity_partitioner>\n                                        ::run( range, body, partitioner );\n    return std::move(body).result();\n}\n\n//! Parallel iteration with reduction, default partitioner and user-supplied context.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Value, typename RealBody, typename Reduction>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_function<RealBody, Range, Value> &&\n                   parallel_reduce_combine<Reduction, Value>)\nValue parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction,\n                       task_group_context& context ) {\n    lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);\n    start_reduce<Range,lambda_reduce_body<Range,Value,RealBody,Reduction>,const __TBB_DEFAULT_PARTITIONER>\n                          ::run( range, body, __TBB_DEFAULT_PARTITIONER(), context );\n    return std::move(body).result();\n}\n\n//! Parallel iteration with reduction, simple partitioner and user-supplied context.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Value, typename RealBody, typename Reduction>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_function<RealBody, Range, Value> &&\n                   parallel_reduce_combine<Reduction, Value>)\nValue parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction,\n                       const simple_partitioner& partitioner, task_group_context& context ) {\n    lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);\n    start_reduce<Range,lambda_reduce_body<Range,Value,RealBody,Reduction>,const simple_partitioner>\n                          ::run( range, body, partitioner, context );\n    return std::move(body).result();\n}\n\n//! Parallel iteration with reduction, auto_partitioner and user-supplied context\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Value, typename RealBody, typename Reduction>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_function<RealBody, Range, Value> &&\n                   parallel_reduce_combine<Reduction, Value>)\nValue parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction,\n                       const auto_partitioner& partitioner, task_group_context& context ) {\n    lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);\n    start_reduce<Range,lambda_reduce_body<Range,Value,RealBody,Reduction>,const auto_partitioner>\n                          ::run( range, body, partitioner, context );\n    return std::move(body).result();\n}\n\n//! Parallel iteration with reduction, static_partitioner and user-supplied context\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Value, typename RealBody, typename Reduction>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_function<RealBody, Range, Value> &&\n                   parallel_reduce_combine<Reduction, Value>)\nValue parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction,\n                       const static_partitioner& partitioner, task_group_context& context ) {\n    lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);\n    start_reduce<Range,lambda_reduce_body<Range,Value,RealBody,Reduction>,const static_partitioner>\n                                        ::run( range, body, partitioner, context );\n    return std::move(body).result();\n}\n\n//! Parallel iteration with reduction, affinity_partitioner and user-supplied context\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Value, typename RealBody, typename Reduction>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_function<RealBody, Range, Value> &&\n                   parallel_reduce_combine<Reduction, Value>)\nValue parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction,\n                       affinity_partitioner& partitioner, task_group_context& context ) {\n    lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);\n    start_reduce<Range,lambda_reduce_body<Range,Value,RealBody,Reduction>,affinity_partitioner>\n                                        ::run( range, body, partitioner, context );\n    return std::move(body).result();\n}\n\n//! Parallel iteration with deterministic reduction and default simple partitioner.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_body<Body, Range>)\nvoid parallel_deterministic_reduce( const Range& range, Body& body ) {\n    start_deterministic_reduce<Range, Body, const simple_partitioner>::run(range, body, simple_partitioner());\n}\n\n//! Parallel iteration with deterministic reduction and simple partitioner.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_body<Body, Range>)\nvoid parallel_deterministic_reduce( const Range& range, Body& body, const simple_partitioner& partitioner ) {\n    start_deterministic_reduce<Range, Body, const simple_partitioner>::run(range, body, partitioner);\n}\n\n//! Parallel iteration with deterministic reduction and static partitioner.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_body<Body, Range>)\nvoid parallel_deterministic_reduce( const Range& range, Body& body, const static_partitioner& partitioner ) {\n    start_deterministic_reduce<Range, Body, const static_partitioner>::run(range, body, partitioner);\n}\n\n//! Parallel iteration with deterministic reduction, default simple partitioner and user-supplied context.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_body<Body, Range>)\nvoid parallel_deterministic_reduce( const Range& range, Body& body, task_group_context& context ) {\n    start_deterministic_reduce<Range,Body, const simple_partitioner>::run( range, body, simple_partitioner(), context );\n}\n\n//! Parallel iteration with deterministic reduction, simple partitioner and user-supplied context.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_body<Body, Range>)\nvoid parallel_deterministic_reduce( const Range& range, Body& body, const simple_partitioner& partitioner, task_group_context& context ) {\n    start_deterministic_reduce<Range, Body, const simple_partitioner>::run(range, body, partitioner, context);\n}\n\n//! Parallel iteration with deterministic reduction, static partitioner and user-supplied context.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_body<Body, Range>)\nvoid parallel_deterministic_reduce( const Range& range, Body& body, const static_partitioner& partitioner, task_group_context& context ) {\n    start_deterministic_reduce<Range, Body, const static_partitioner>::run(range, body, partitioner, context);\n}\n\n/** parallel_reduce overloads that work with anonymous function objects\n    (see also \\ref parallel_reduce_lambda_req \"requirements on parallel_reduce anonymous function objects\"). **/\n\n//! Parallel iteration with deterministic reduction and default simple partitioner.\n// TODO: consider making static_partitioner the default\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Value, typename RealBody, typename Reduction>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_function<RealBody, Range, Value> &&\n                   parallel_reduce_combine<Reduction, Value>)\nValue parallel_deterministic_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction ) {\n    return parallel_deterministic_reduce(range, identity, real_body, reduction, simple_partitioner());\n}\n\n//! Parallel iteration with deterministic reduction and simple partitioner.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Value, typename RealBody, typename Reduction>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_function<RealBody, Range, Value> &&\n                   parallel_reduce_combine<Reduction, Value>)\nValue parallel_deterministic_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction, const simple_partitioner& partitioner ) {\n    lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);\n    start_deterministic_reduce<Range,lambda_reduce_body<Range,Value,RealBody,Reduction>, const simple_partitioner>\n                          ::run(range, body, partitioner);\n    return std::move(body).result();\n}\n\n//! Parallel iteration with deterministic reduction and static partitioner.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Value, typename RealBody, typename Reduction>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_function<RealBody, Range, Value> &&\n                   parallel_reduce_combine<Reduction, Value>)\nValue parallel_deterministic_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction, const static_partitioner& partitioner ) {\n    lambda_reduce_body<Range, Value, RealBody, Reduction> body(identity, real_body, reduction);\n    start_deterministic_reduce<Range, lambda_reduce_body<Range, Value, RealBody, Reduction>, const static_partitioner>\n        ::run(range, body, partitioner);\n    return std::move(body).result();\n}\n\n//! Parallel iteration with deterministic reduction, default simple partitioner and user-supplied context.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Value, typename RealBody, typename Reduction>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_function<RealBody, Range, Value> &&\n                   parallel_reduce_combine<Reduction, Value>)\nValue parallel_deterministic_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction,\n    task_group_context& context ) {\n    return parallel_deterministic_reduce(range, identity, real_body, reduction, simple_partitioner(), context);\n}\n\n//! Parallel iteration with deterministic reduction, simple partitioner and user-supplied context.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Value, typename RealBody, typename Reduction>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_function<RealBody, Range, Value> &&\n                   parallel_reduce_combine<Reduction, Value>)\nValue parallel_deterministic_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction,\n    const simple_partitioner& partitioner, task_group_context& context ) {\n    lambda_reduce_body<Range, Value, RealBody, Reduction> body(identity, real_body, reduction);\n    start_deterministic_reduce<Range, lambda_reduce_body<Range, Value, RealBody, Reduction>, const simple_partitioner>\n        ::run(range, body, partitioner, context);\n    return std::move(body).result();\n}\n\n//! Parallel iteration with deterministic reduction, static partitioner and user-supplied context.\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Value, typename RealBody, typename Reduction>\n    __TBB_requires(tbb_range<Range> && parallel_reduce_function<RealBody, Range, Value> &&\n                   parallel_reduce_combine<Reduction, Value>)\nValue parallel_deterministic_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction,\n    const static_partitioner& partitioner, task_group_context& context ) {\n    lambda_reduce_body<Range, Value, RealBody, Reduction> body(identity, real_body, reduction);\n    start_deterministic_reduce<Range, lambda_reduce_body<Range, Value, RealBody, Reduction>, const static_partitioner>\n        ::run(range, body, partitioner, context);\n    return std::move(body).result();\n}\n//@}\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::parallel_reduce;\nusing detail::d1::parallel_deterministic_reduce;\n// Split types\nusing detail::split;\nusing detail::proportional_split;\n} // namespace v1\n\n} // namespace tbb\n#endif /* __TBB_parallel_reduce_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/parallel_scan.h",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_parallel_scan_H\n#define __TBB_parallel_scan_H\n\n#include <functional>\n\n#include \"detail/_config.h\"\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_exception.h\"\n#include \"detail/_task.h\"\n\n#include \"profiling.h\"\n#include \"partitioner.h\"\n#include \"blocked_range.h\"\n#include \"task_group.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n//! Used to indicate that the initial scan is being performed.\n/** @ingroup algorithms */\nstruct pre_scan_tag {\n    static bool is_final_scan() {return false;}\n    operator bool() {return is_final_scan();}\n};\n\n//! Used to indicate that the final scan is being performed.\n/** @ingroup algorithms */\nstruct final_scan_tag {\n    static bool is_final_scan() {return true;}\n    operator bool() {return is_final_scan();}\n};\n\ntemplate<typename Range, typename Body>\nstruct sum_node;\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n} // namespace d1\ninline namespace d0 {\n\ntemplate <typename Body, typename Range>\nconcept parallel_scan_body = splittable<Body> &&\n                             requires( Body& body, const Range& range, Body& other ) {\n                                 body(range, tbb::detail::d1::pre_scan_tag{});\n                                 body(range, tbb::detail::d1::final_scan_tag{});\n                                 body.reverse_join(other);\n                                 body.assign(other);\n                             };\n\ntemplate <typename Function, typename Range, typename Value>\nconcept parallel_scan_function = std::invocable<const std::remove_reference_t<Function>&,\n                                                const Range&, const Value&, bool> &&\n                                 std::convertible_to<std::invoke_result_t<const std::remove_reference_t<Function>&,\n                                                                          const Range&, const Value&, bool>,\n                                                     Value>;\n\ntemplate <typename Combine, typename Value>\nconcept parallel_scan_combine = std::invocable<const std::remove_reference_t<Combine>&,\n                                               const Value&, const Value&> &&\n                                std::convertible_to<std::invoke_result_t<const std::remove_reference_t<Combine>&,\n                                                                         const Value&, const Value&>,\n                                                    Value>;\n\n} // namespace d0\nnamespace d1 {\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n\n//! Performs final scan for a leaf\n/** @ingroup algorithms */\ntemplate<typename Range, typename Body>\nstruct final_sum : public task {\nprivate:\n    using sum_node_type = sum_node<Range, Body>;\n    Body m_body;\n    aligned_space<Range> m_range;\n    //! Where to put result of last subrange, or nullptr if not last subrange.\n    Body* m_stuff_last;\n\n    wait_context& m_wait_context;\n    sum_node_type* m_parent = nullptr;\npublic:\n    small_object_allocator m_allocator;\n    final_sum( Body& body, wait_context& w_o, small_object_allocator& alloc ) :\n        m_body(body, split()), m_wait_context(w_o), m_allocator(alloc) {\n        poison_pointer(m_stuff_last);\n    }\n\n    final_sum( final_sum& sum, small_object_allocator& alloc ) :\n        m_body(sum.m_body, split()), m_wait_context(sum.m_wait_context), m_allocator(alloc) {\n        poison_pointer(m_stuff_last);\n    }\n\n    ~final_sum() {\n        m_range.begin()->~Range();\n    }\n    void finish_construction( sum_node_type* parent, const Range& range, Body* stuff_last ) {\n        __TBB_ASSERT( m_parent == nullptr, nullptr );\n        m_parent = parent;\n        new( m_range.begin() ) Range(range);\n        m_stuff_last = stuff_last;\n    }\nprivate:\n    sum_node_type* release_parent() {\n        call_itt_task_notify(releasing, m_parent);\n        if (m_parent) {\n            auto parent = m_parent;\n            m_parent = nullptr;\n            if (parent->ref_count.fetch_sub(1) == 1) {\n                return parent;\n            }\n        }\n        else\n            m_wait_context.release();\n        return nullptr;\n    }\n    sum_node_type* finalize(const execution_data& ed){\n        sum_node_type* next_task = release_parent();\n        m_allocator.delete_object<final_sum>(this, ed);\n        return next_task;\n    }\n\npublic:\n    task* execute(execution_data& ed) override {\n        m_body( *m_range.begin(), final_scan_tag() );\n        if( m_stuff_last )\n            m_stuff_last->assign(m_body);\n\n        return finalize(ed);\n    }\n    task* cancel(execution_data& ed) override {\n        return finalize(ed);\n    }\n    template<typename Tag>\n    void operator()( const Range& r, Tag tag ) {\n        m_body( r, tag );\n    }\n    void reverse_join( final_sum& a ) {\n        m_body.reverse_join(a.m_body);\n    }\n    void reverse_join( Body& body ) {\n        m_body.reverse_join(body);\n    }\n    void assign_to( Body& body ) {\n        body.assign(m_body);\n    }\n    void self_destroy(const execution_data& ed) {\n        m_allocator.delete_object<final_sum>(this, ed);\n    }\n};\n\n//! Split work to be done in the scan.\n/** @ingroup algorithms */\ntemplate<typename Range, typename Body>\nstruct sum_node : public task {\nprivate:\n    using final_sum_type = final_sum<Range,Body>;\npublic:\n    final_sum_type *m_incoming;\n    final_sum_type *m_body;\n    Body *m_stuff_last;\nprivate:\n    final_sum_type *m_left_sum;\n    sum_node *m_left;\n    sum_node *m_right;\n    bool m_left_is_final;\n    Range m_range;\n    wait_context& m_wait_context;\n    sum_node* m_parent;\n    small_object_allocator m_allocator;\npublic:\n    std::atomic<unsigned int> ref_count{0};\n    sum_node( const Range range, bool left_is_final_, sum_node* parent, wait_context& w_o, small_object_allocator& alloc ) :\n        m_stuff_last(nullptr),\n        m_left_sum(nullptr),\n        m_left(nullptr),\n        m_right(nullptr),\n        m_left_is_final(left_is_final_),\n        m_range(range),\n        m_wait_context(w_o),\n        m_parent(parent),\n        m_allocator(alloc)\n    {\n        if( m_parent )\n            m_parent->ref_count.fetch_add(1);\n        // Poison fields that will be set by second pass.\n        poison_pointer(m_body);\n        poison_pointer(m_incoming);\n    }\n\n    ~sum_node() {\n        if (m_parent)\n            m_parent->ref_count.fetch_sub(1);\n    }\nprivate:\n    sum_node* release_parent() {\n        call_itt_task_notify(releasing, m_parent);\n        if (m_parent) {\n            auto parent = m_parent;\n            m_parent = nullptr;\n            if (parent->ref_count.fetch_sub(1) == 1) {\n                return parent;\n            }\n        }\n        else\n            m_wait_context.release();\n        return nullptr;\n    }\n    task* create_child( const Range& range, final_sum_type& body, sum_node* child, final_sum_type* incoming, Body* stuff_last ) {\n        if( child ) {\n            __TBB_ASSERT( is_poisoned(child->m_body) && is_poisoned(child->m_incoming), nullptr );\n            child->prepare_for_execution(body, incoming, stuff_last);\n            return child;\n        } else {\n            body.finish_construction(this, range, stuff_last);\n            return &body;\n        }\n    }\n\n    sum_node* finalize(const execution_data& ed) {\n        sum_node* next_task = release_parent();\n        m_allocator.delete_object<sum_node>(this, ed);\n        return next_task;\n    }\n\npublic:\n    void prepare_for_execution(final_sum_type& body, final_sum_type* incoming, Body *stuff_last) {\n        this->m_body = &body;\n        this->m_incoming = incoming;\n        this->m_stuff_last = stuff_last;\n    }\n    task* execute(execution_data& ed) override {\n        if( m_body ) {\n            if( m_incoming )\n                m_left_sum->reverse_join( *m_incoming );\n            task* right_child = this->create_child(Range(m_range,split()), *m_left_sum, m_right, m_left_sum, m_stuff_last);\n            task* left_child = m_left_is_final ? nullptr : this->create_child(m_range, *m_body, m_left, m_incoming, nullptr);\n            ref_count = (left_child != nullptr) + (right_child != nullptr);\n            m_body = nullptr;\n            if( left_child ) {\n                spawn(*right_child, *ed.context);\n                return left_child;\n            } else {\n                return right_child;\n            }\n        } else {\n            return finalize(ed);\n        }\n    }\n    task* cancel(execution_data& ed) override {\n        return finalize(ed);\n    }\n    void self_destroy(const execution_data& ed) {\n        m_allocator.delete_object<sum_node>(this, ed);\n    }\n    template<typename range,typename body,typename partitioner>\n    friend struct start_scan;\n\n    template<typename range,typename body>\n    friend struct finish_scan;\n};\n\n//! Combine partial results\n/** @ingroup algorithms */\ntemplate<typename Range, typename Body>\nstruct finish_scan : public task {\nprivate:\n    using sum_node_type = sum_node<Range,Body>;\n    using final_sum_type = final_sum<Range,Body>;\n    final_sum_type** const m_sum_slot;\n    sum_node_type*& m_return_slot;\n    small_object_allocator m_allocator;\npublic:\n    std::atomic<final_sum_type*> m_right_zombie;\n    sum_node_type& m_result;\n    std::atomic<unsigned int> ref_count{2};\n    finish_scan*  m_parent;\n    wait_context& m_wait_context;\n    task* execute(execution_data& ed) override {\n        __TBB_ASSERT( m_result.ref_count.load() == static_cast<unsigned int>((m_result.m_left!=nullptr)+(m_result.m_right!=nullptr)), nullptr );\n        if( m_result.m_left )\n            m_result.m_left_is_final = false;\n        final_sum_type* right_zombie = m_right_zombie.load(std::memory_order_acquire);\n        if( right_zombie && m_sum_slot )\n            (*m_sum_slot)->reverse_join(*m_result.m_left_sum);\n        __TBB_ASSERT( !m_return_slot, nullptr );\n        if( right_zombie || m_result.m_right ) {\n            m_return_slot = &m_result;\n        } else {\n            m_result.self_destroy(ed);\n        }\n        if( right_zombie && !m_sum_slot && !m_result.m_right ) {\n            right_zombie->self_destroy(ed);\n            m_right_zombie.store(nullptr, std::memory_order_relaxed);\n        }\n        return finalize(ed);\n    }\n    task* cancel(execution_data& ed) override {\n        return finalize(ed);\n    }\n    finish_scan(sum_node_type*& return_slot, final_sum_type** sum, sum_node_type& result_, finish_scan* parent, wait_context& w_o, small_object_allocator& alloc) :\n        m_sum_slot(sum),\n        m_return_slot(return_slot),\n        m_allocator(alloc),\n        m_right_zombie(nullptr),\n        m_result(result_),\n        m_parent(parent),\n        m_wait_context(w_o)\n    {\n        __TBB_ASSERT( !m_return_slot, nullptr );\n    }\nprivate:\n    finish_scan* release_parent() {\n        call_itt_task_notify(releasing, m_parent);\n        if (m_parent) {\n            auto parent = m_parent;\n            m_parent = nullptr;\n            if (parent->ref_count.fetch_sub(1) == 1) {\n                return parent;\n            }\n        }\n        else\n            m_wait_context.release();\n        return nullptr;\n    }\n    finish_scan* finalize(const execution_data& ed) {\n        finish_scan* next_task = release_parent();\n        m_allocator.delete_object<finish_scan>(this, ed);\n        return next_task;\n    }\n};\n\n//! Initial task to split the work\n/** @ingroup algorithms */\ntemplate<typename Range, typename Body, typename Partitioner>\nstruct start_scan : public task {\nprivate:\n    using sum_node_type = sum_node<Range,Body>;\n    using final_sum_type = final_sum<Range,Body>;\n    using finish_pass1_type = finish_scan<Range,Body>;\n    std::reference_wrapper<sum_node_type*> m_return_slot;\n    Range m_range;\n    std::reference_wrapper<final_sum_type> m_body;\n    typename Partitioner::partition_type m_partition;\n    /** Non-null if caller is requesting total. */\n    final_sum_type** m_sum_slot;\n    bool m_is_final;\n    bool m_is_right_child;\n\n    finish_pass1_type*  m_parent;\n    small_object_allocator m_allocator;\n    wait_context& m_wait_context;\n\n    finish_pass1_type* release_parent() {\n        call_itt_task_notify(releasing, m_parent);\n        if (m_parent) {\n            auto parent = m_parent;\n            m_parent = nullptr;\n            if (parent->ref_count.fetch_sub(1) == 1) {\n                return parent;\n            }\n        }\n        else\n            m_wait_context.release();\n        return nullptr;\n    }\n\n    finish_pass1_type* finalize( const execution_data& ed ) {\n        finish_pass1_type* next_task = release_parent();\n        m_allocator.delete_object<start_scan>(this, ed);\n        return next_task;\n    }\n\npublic:\n    task* execute( execution_data& ) override;\n    task* cancel( execution_data& ed ) override {\n        return finalize(ed);\n    }\n    start_scan( sum_node_type*& return_slot, start_scan& parent, small_object_allocator& alloc ) :\n        m_return_slot(return_slot),\n        m_range(parent.m_range,split()),\n        m_body(parent.m_body),\n        m_partition(parent.m_partition,split()),\n        m_sum_slot(parent.m_sum_slot),\n        m_is_final(parent.m_is_final),\n        m_is_right_child(true),\n        m_parent(parent.m_parent),\n        m_allocator(alloc),\n        m_wait_context(parent.m_wait_context)\n    {\n        __TBB_ASSERT( !m_return_slot, nullptr );\n        parent.m_is_right_child = false;\n    }\n\n    start_scan( sum_node_type*& return_slot, const Range& range, final_sum_type& body, const Partitioner& partitioner, wait_context& w_o, small_object_allocator& alloc ) :\n        m_return_slot(return_slot),\n        m_range(range),\n        m_body(body),\n        m_partition(partitioner),\n        m_sum_slot(nullptr),\n        m_is_final(true),\n        m_is_right_child(false),\n        m_parent(nullptr),\n        m_allocator(alloc),\n        m_wait_context(w_o)\n    {\n        __TBB_ASSERT( !m_return_slot, nullptr );\n    }\n\n    static void run( const Range& range, Body& body, const Partitioner& partitioner ) {\n        if( !range.empty() ) {\n            task_group_context context(PARALLEL_SCAN);\n\n            using start_pass1_type = start_scan<Range,Body,Partitioner>;\n            sum_node_type* root = nullptr;\n            wait_context w_ctx{1};\n            small_object_allocator alloc{};\n\n            auto& temp_body = *alloc.new_object<final_sum_type>(body, w_ctx, alloc);\n            temp_body.reverse_join(body);\n\n            auto& pass1 = *alloc.new_object<start_pass1_type>(/*m_return_slot=*/root, range, temp_body, partitioner, w_ctx, alloc);\n\n            execute_and_wait(pass1, context, w_ctx, context);\n            if( root ) {\n                root->prepare_for_execution(temp_body, nullptr, &body);\n                w_ctx.reserve();\n                execute_and_wait(*root, context, w_ctx, context);\n            } else {\n                temp_body.assign_to(body);\n                temp_body.finish_construction(nullptr, range, nullptr);\n                alloc.delete_object<final_sum_type>(&temp_body);\n            }\n        }\n    }\n};\n\ntemplate<typename Range, typename Body, typename Partitioner>\ntask* start_scan<Range,Body,Partitioner>::execute( execution_data& ed ) {\n    // Inspecting m_parent->result.left_sum would ordinarily be a race condition.\n    // But we inspect it only if we are not a stolen task, in which case we\n    // know that task assigning to m_parent->result.left_sum has completed.\n    __TBB_ASSERT(!m_is_right_child || m_parent, \"right child is never an orphan\");\n    bool treat_as_stolen = m_is_right_child && (is_stolen(ed) || &m_body.get()!=m_parent->m_result.m_left_sum);\n    if( treat_as_stolen ) {\n        // Invocation is for right child that has been really stolen or needs to be virtually stolen\n        small_object_allocator alloc{};\n        final_sum_type* right_zombie = alloc.new_object<final_sum_type>(m_body, alloc);\n        m_parent->m_right_zombie.store(right_zombie, std::memory_order_release);\n        m_body = *right_zombie;\n        m_is_final = false;\n    }\n    task* next_task = nullptr;\n    if( (m_is_right_child && !treat_as_stolen) || !m_range.is_divisible() || m_partition.should_execute_range(ed) ) {\n        if( m_is_final )\n            m_body(m_range, final_scan_tag());\n        else if( m_sum_slot )\n            m_body(m_range, pre_scan_tag());\n        if( m_sum_slot )\n            *m_sum_slot = &m_body.get();\n        __TBB_ASSERT( !m_return_slot, nullptr );\n\n        next_task = finalize(ed);\n    } else {\n        small_object_allocator alloc{};\n        auto result = alloc.new_object<sum_node_type>(m_range,/*m_left_is_final=*/m_is_final, m_parent? &m_parent->m_result: nullptr, m_wait_context, alloc);\n\n        auto new_parent = alloc.new_object<finish_pass1_type>(m_return_slot, m_sum_slot, *result, m_parent, m_wait_context, alloc);\n        m_parent = new_parent;\n\n        // Split off right child\n        auto& right_child = *alloc.new_object<start_scan>(/*m_return_slot=*/result->m_right, *this, alloc);\n\n        spawn(right_child, *ed.context);\n\n        m_sum_slot = &result->m_left_sum;\n        m_return_slot = result->m_left;\n\n        __TBB_ASSERT( !m_return_slot, nullptr );\n        next_task = this;\n    }\n    return next_task;\n}\n\ntemplate<typename Range, typename Value, typename Scan, typename ReverseJoin>\nclass lambda_scan_body {\n    Value               m_sum_slot;\n    const Value&        identity_element;\n    const Scan&         m_scan;\n    const ReverseJoin&  m_reverse_join;\npublic:\n    void operator=(const lambda_scan_body&) = delete;\n    lambda_scan_body(const lambda_scan_body&) = default;\n\n    lambda_scan_body( const Value& identity, const Scan& scan, const ReverseJoin& rev_join )\n        : m_sum_slot(identity)\n        , identity_element(identity)\n        , m_scan(scan)\n        , m_reverse_join(rev_join) {}\n\n    lambda_scan_body( lambda_scan_body& b, split )\n        : m_sum_slot(b.identity_element)\n        , identity_element(b.identity_element)\n        , m_scan(b.m_scan)\n        , m_reverse_join(b.m_reverse_join) {}\n\n    template<typename Tag>\n    void operator()( const Range& r, Tag tag ) {\n        m_sum_slot = tbb::detail::invoke(m_scan, r, m_sum_slot, tag);\n    }\n\n    void reverse_join( lambda_scan_body& a ) {\n        m_sum_slot = tbb::detail::invoke(m_reverse_join, a.m_sum_slot, m_sum_slot);\n    }\n\n    void assign( lambda_scan_body& b ) {\n        m_sum_slot = b.m_sum_slot;\n    }\n\n    Value result() const {\n        return m_sum_slot;\n    }\n};\n\n// Requirements on Range concept are documented in blocked_range.h\n\n/** \\page parallel_scan_body_req Requirements on parallel_scan body\n    Class \\c Body implementing the concept of parallel_scan body must define:\n    - \\code Body::Body( Body&, split ); \\endcode    Splitting constructor.\n                                                    Split \\c b so that \\c this and \\c b can accumulate separately\n    - \\code Body::~Body(); \\endcode                 Destructor\n    - \\code void Body::operator()( const Range& r, pre_scan_tag ); \\endcode\n                                                    Preprocess iterations for range \\c r\n    - \\code void Body::operator()( const Range& r, final_scan_tag ); \\endcode\n                                                    Do final processing for iterations of range \\c r\n    - \\code void Body::reverse_join( Body& a ); \\endcode\n                                                    Merge preprocessing state of \\c a into \\c this, where \\c a was\n                                                    created earlier from \\c b by b's splitting constructor\n**/\n\n/** \\name parallel_scan\n    See also requirements on \\ref range_req \"Range\" and \\ref parallel_scan_body_req \"parallel_scan Body\". **/\n//@{\n\n//! Parallel prefix with default partitioner\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_scan_body<Body, Range>)\nvoid parallel_scan( const Range& range, Body& body ) {\n    start_scan<Range, Body, __TBB_DEFAULT_PARTITIONER>::run(range,body,__TBB_DEFAULT_PARTITIONER());\n}\n\n//! Parallel prefix with simple_partitioner\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_scan_body<Body, Range>)\nvoid parallel_scan( const Range& range, Body& body, const simple_partitioner& partitioner ) {\n    start_scan<Range, Body, simple_partitioner>::run(range, body, partitioner);\n}\n\n//! Parallel prefix with auto_partitioner\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Body>\n    __TBB_requires(tbb_range<Range> && parallel_scan_body<Body, Range>)\nvoid parallel_scan( const Range& range, Body& body, const auto_partitioner& partitioner ) {\n    start_scan<Range,Body,auto_partitioner>::run(range, body, partitioner);\n}\n\n//! Parallel prefix with default partitioner\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Value, typename Scan, typename ReverseJoin>\n    __TBB_requires(tbb_range<Range> && parallel_scan_function<Scan, Range, Value> &&\n                   parallel_scan_combine<ReverseJoin, Value>)\nValue parallel_scan( const Range& range, const Value& identity, const Scan& scan, const ReverseJoin& reverse_join ) {\n    lambda_scan_body<Range, Value, Scan, ReverseJoin> body(identity, scan, reverse_join);\n    parallel_scan(range, body, __TBB_DEFAULT_PARTITIONER());\n    return body.result();\n}\n\n//! Parallel prefix with simple_partitioner\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Value, typename Scan, typename ReverseJoin>\n    __TBB_requires(tbb_range<Range> && parallel_scan_function<Scan, Range, Value> &&\n                   parallel_scan_combine<ReverseJoin, Value>)\nValue parallel_scan( const Range& range, const Value& identity, const Scan& scan, const ReverseJoin& reverse_join,\n                     const simple_partitioner& partitioner ) {\n    lambda_scan_body<Range, Value, Scan, ReverseJoin> body(identity, scan, reverse_join);\n    parallel_scan(range, body, partitioner);\n    return body.result();\n}\n\n//! Parallel prefix with auto_partitioner\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Value, typename Scan, typename ReverseJoin>\n    __TBB_requires(tbb_range<Range> && parallel_scan_function<Scan, Range, Value> &&\n                   parallel_scan_combine<ReverseJoin, Value>)\nValue parallel_scan( const Range& range, const Value& identity, const Scan& scan, const ReverseJoin& reverse_join,\n                     const auto_partitioner& partitioner ) {\n    lambda_scan_body<Range, Value, Scan, ReverseJoin> body(identity, scan, reverse_join);\n    parallel_scan(range, body, partitioner);\n    return body.result();\n}\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\n    using detail::d1::parallel_scan;\n    using detail::d1::pre_scan_tag;\n    using detail::d1::final_scan_tag;\n} // namespace v1\n\n} // namespace tbb\n\n#endif /* __TBB_parallel_scan_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/parallel_sort.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_parallel_sort_H\n#define __TBB_parallel_sort_H\n\n#include \"detail/_namespace_injection.h\"\n#include \"parallel_for.h\"\n#include \"blocked_range.h\"\n#include \"profiling.h\"\n\n#include <algorithm>\n#include <iterator>\n#include <functional>\n#include <cstddef>\n\nnamespace tbb {\nnamespace detail {\n#if __TBB_CPP20_CONCEPTS_PRESENT\ninline namespace d0 {\n\n// TODO: consider using std::strict_weak_order concept\ntemplate <typename Compare, typename Iterator>\nconcept compare = requires( const std::remove_reference_t<Compare>& comp, typename std::iterator_traits<Iterator>::reference value ) {\n    // Forward via iterator_traits::reference\n    { comp(typename std::iterator_traits<Iterator>::reference(value),\n           typename std::iterator_traits<Iterator>::reference(value)) } -> std::convertible_to<bool>;\n};\n\n// Inspired by std::__PartiallyOrderedWith exposition only concept\ntemplate <typename T>\nconcept less_than_comparable = requires( const std::remove_reference_t<T>& lhs,\n                                         const std::remove_reference_t<T>& rhs ) {\n    { lhs < rhs } -> boolean_testable;\n};\n\n} // namespace d0\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\nnamespace d1 {\n\n//! Range used in quicksort to split elements into subranges based on a value.\n/** The split operation selects a splitter and places all elements less than or equal\n    to the value in the first range and the remaining elements in the second range.\n    @ingroup algorithms */\ntemplate<typename RandomAccessIterator, typename Compare>\nclass quick_sort_range {\n    std::size_t median_of_three( const RandomAccessIterator& array, std::size_t l, std::size_t m, std::size_t r ) const {\n        return comp(array[l], array[m]) ? ( comp(array[m], array[r]) ? m : ( comp(array[l], array[r]) ? r : l ) )\n                                        : ( comp(array[r], array[m]) ? m : ( comp(array[r], array[l]) ? r : l ) );\n    }\n\n    std::size_t pseudo_median_of_nine( const RandomAccessIterator& array, const quick_sort_range& range ) const {\n        std::size_t offset = range.size / 8u;\n        return median_of_three(array,\n                               median_of_three(array, 0 , offset, offset * 2),\n                               median_of_three(array, offset * 3, offset * 4, offset * 5),\n                               median_of_three(array, offset * 6, offset * 7, range.size - 1));\n\n    }\n\n    std::size_t split_range( quick_sort_range& range ) {\n        RandomAccessIterator array = range.begin;\n        RandomAccessIterator first_element = range.begin;\n        std::size_t m = pseudo_median_of_nine(array, range);\n        if( m != 0 ) std::iter_swap(array, array + m);\n\n        std::size_t i = 0;\n        std::size_t j = range.size;\n        // Partition interval [i + 1,j - 1] with key *first_element.\n        for(;;) {\n            __TBB_ASSERT( i < j, nullptr );\n            // Loop must terminate since array[l] == *first_element.\n            do {\n                --j;\n                __TBB_ASSERT( i <= j, \"bad ordering relation?\" );\n            } while( comp(*first_element, array[j]) );\n            do {\n                __TBB_ASSERT( i <= j, nullptr );\n                if( i == j ) goto partition;\n                ++i;\n            } while( comp(array[i], *first_element) );\n            if( i == j ) goto partition;\n            std::iter_swap(array + i, array + j);\n        }\npartition:\n        // Put the partition key were it belongs\n        std::iter_swap(array + j, first_element);\n        // array[l..j) is less or equal to key.\n        // array(j..r) is greater or equal to key.\n        // array[j] is equal to key\n        i = j + 1;\n        std::size_t new_range_size = range.size - i;\n        range.size = j;\n        return new_range_size;\n    }\n\npublic:\n    quick_sort_range() = default;\n    quick_sort_range( const quick_sort_range& ) = default;\n    void operator=( const quick_sort_range& ) = delete;\n\n    static constexpr std::size_t grainsize = 500;\n    const Compare& comp;\n    std::size_t size;\n    RandomAccessIterator begin;\n\n    quick_sort_range( RandomAccessIterator begin_, std::size_t size_, const Compare& comp_ ) :\n        comp(comp_), size(size_), begin(begin_) {}\n\n    bool empty() const { return size == 0; }\n    bool is_divisible() const { return size >= grainsize; }\n\n    quick_sort_range( quick_sort_range& range, split )\n        : comp(range.comp)\n        , size(split_range(range))\n          // +1 accounts for the pivot element, which is at its correct place\n          // already and, therefore, is not included into subranges.\n        , begin(range.begin + range.size + 1) {}\n};\n\n//! Body class used to test if elements in a range are presorted\n/** @ingroup algorithms */\ntemplate<typename RandomAccessIterator, typename Compare>\nclass quick_sort_pretest_body {\n    const Compare& comp;\n    task_group_context& context;\n\npublic:\n    quick_sort_pretest_body() = default;\n    quick_sort_pretest_body( const quick_sort_pretest_body& ) = default;\n    void operator=( const quick_sort_pretest_body& ) = delete;\n\n    quick_sort_pretest_body( const Compare& _comp, task_group_context& _context ) : comp(_comp), context(_context) {}\n\n    void operator()( const blocked_range<RandomAccessIterator>& range ) const {\n        RandomAccessIterator my_end = range.end();\n\n        int i = 0;\n        //TODO: consider using std::is_sorted() for each 64 iterations (requires performance measurements)\n        for( RandomAccessIterator k = range.begin(); k != my_end; ++k, ++i ) {\n            if( i % 64 == 0 && context.is_group_execution_cancelled() ) break;\n\n            // The k - 1 is never out-of-range because the first chunk starts at begin+serial_cutoff+1\n            if( comp(*(k), *(k - 1)) ) {\n                context.cancel_group_execution();\n                break;\n            }\n        }\n    }\n};\n\n//! Body class used to sort elements in a range that is smaller than the grainsize.\n/** @ingroup algorithms */\ntemplate<typename RandomAccessIterator, typename Compare>\nstruct quick_sort_body {\n    void operator()( const quick_sort_range<RandomAccessIterator,Compare>& range ) const {\n        std::sort(range.begin, range.begin + range.size, range.comp);\n    }\n};\n\n//! Method to perform parallel_for based quick sort.\n/** @ingroup algorithms */\ntemplate<typename RandomAccessIterator, typename Compare>\nvoid do_parallel_quick_sort( RandomAccessIterator begin, RandomAccessIterator end, const Compare& comp ) {\n    parallel_for(quick_sort_range<RandomAccessIterator,Compare>(begin, end - begin, comp),\n                 quick_sort_body<RandomAccessIterator,Compare>(),\n                 auto_partitioner());\n}\n\n//! Wrapper method to initiate the sort by calling parallel_for.\n/** @ingroup algorithms */\ntemplate<typename RandomAccessIterator, typename Compare>\nvoid parallel_quick_sort( RandomAccessIterator begin, RandomAccessIterator end, const Compare& comp ) {\n    task_group_context my_context(PARALLEL_SORT);\n    constexpr int serial_cutoff = 9;\n\n    __TBB_ASSERT( begin + serial_cutoff < end, \"min_parallel_size is smaller than serial cutoff?\" );\n    RandomAccessIterator k = begin;\n    for( ; k != begin + serial_cutoff; ++k ) {\n        if( comp(*(k + 1), *k) ) {\n            do_parallel_quick_sort(begin, end, comp);\n            return;\n        }\n    }\n\n    // Check is input range already sorted\n    parallel_for(blocked_range<RandomAccessIterator>(k + 1, end),\n                 quick_sort_pretest_body<RandomAccessIterator, Compare>(comp, my_context),\n                 auto_partitioner(),\n                 my_context);\n\n    if( my_context.is_group_execution_cancelled() )\n        do_parallel_quick_sort(begin, end, comp);\n}\n\n/** \\page parallel_sort_iter_req Requirements on iterators for parallel_sort\n    Requirements on the iterator type \\c It and its value type \\c T for \\c parallel_sort:\n\n    - \\code void iter_swap( It a, It b ) \\endcode Swaps the values of the elements the given\n    iterators \\c a and \\c b are pointing to. \\c It should be a random access iterator.\n\n    - \\code bool Compare::operator()( const T& x, const T& y ) \\endcode True if x comes before y;\n**/\n\n/** \\name parallel_sort\n    See also requirements on \\ref parallel_sort_iter_req \"iterators for parallel_sort\". **/\n//@{\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\ntemplate<typename It>\nusing iter_value_type = typename std::iterator_traits<It>::value_type;\n\ntemplate<typename Range>\nusing range_value_type = typename std::iterator_traits<range_iterator_type<Range>>::value_type;\n#endif\n\n//! Sorts the data in [begin,end) using the given comparator\n/** The compare function object is used for all comparisons between elements during sorting.\n    The compare object must define a bool operator() function.\n    @ingroup algorithms **/\ntemplate<typename RandomAccessIterator, typename Compare>\n    __TBB_requires(std::random_access_iterator<RandomAccessIterator> &&\n                   compare<Compare, RandomAccessIterator> &&\n                   std::movable<iter_value_type<RandomAccessIterator>>)\nvoid parallel_sort( RandomAccessIterator begin, RandomAccessIterator end, const Compare& comp ) {\n    constexpr int min_parallel_size = 500;\n    if( end > begin ) {\n        if( end - begin < min_parallel_size ) {\n            std::sort(begin, end, comp);\n        } else {\n            parallel_quick_sort(begin, end, comp);\n        }\n    }\n}\n\n//! Sorts the data in [begin,end) with a default comparator \\c std::less\n/** @ingroup algorithms **/\ntemplate<typename RandomAccessIterator>\n    __TBB_requires(std::random_access_iterator<RandomAccessIterator> &&\n                   less_than_comparable<iter_value_type<RandomAccessIterator>> &&\n                   std::movable<iter_value_type<RandomAccessIterator>>)\nvoid parallel_sort( RandomAccessIterator begin, RandomAccessIterator end ) {\n    parallel_sort(begin, end, std::less<typename std::iterator_traits<RandomAccessIterator>::value_type>());\n}\n\n//! Sorts the data in rng using the given comparator\n/** @ingroup algorithms **/\ntemplate<typename Range, typename Compare>\n    __TBB_requires(container_based_sequence<Range, std::random_access_iterator_tag> &&\n                   compare<Compare, range_iterator_type<Range>> &&\n                   std::movable<range_value_type<Range>>)\nvoid parallel_sort( Range&& rng, const Compare& comp ) {\n    parallel_sort(std::begin(rng), std::end(rng), comp);\n}\n\n//! Sorts the data in rng with a default comparator \\c std::less\n/** @ingroup algorithms **/\ntemplate<typename Range>\n    __TBB_requires(container_based_sequence<Range, std::random_access_iterator_tag> &&\n                   less_than_comparable<range_value_type<Range>> &&\n                   std::movable<range_value_type<Range>>)\nvoid parallel_sort( Range&& rng ) {\n    parallel_sort(std::begin(rng), std::end(rng));\n}\n//@}\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\n    using detail::d1::parallel_sort;\n} // namespace v1\n} // namespace tbb\n\n#endif /*__TBB_parallel_sort_H*/\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/partitioner.h",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_partitioner_H\n#define __TBB_partitioner_H\n\n#ifndef __TBB_INITIAL_CHUNKS\n// initial task divisions per thread\n#define __TBB_INITIAL_CHUNKS 2\n#endif\n#ifndef __TBB_RANGE_POOL_CAPACITY\n// maximum number of elements in range pool\n#define __TBB_RANGE_POOL_CAPACITY 8\n#endif\n#ifndef __TBB_INIT_DEPTH\n// initial value for depth of range pool\n#define __TBB_INIT_DEPTH 5\n#endif\n#ifndef __TBB_DEMAND_DEPTH_ADD\n// when imbalance is found range splits this value times more\n#define __TBB_DEMAND_DEPTH_ADD 1\n#endif\n\n#include \"detail/_config.h\"\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_aligned_space.h\"\n#include \"detail/_utils.h\"\n#include \"detail/_template_helpers.h\"\n#include \"detail/_range_common.h\"\n#include \"detail/_task.h\"\n#include \"detail/_small_object_pool.h\"\n\n#include \"cache_aligned_allocator.h\"\n#include \"task_group.h\" // task_group_context\n#include \"task_arena.h\"\n\n#include <algorithm>\n#include <atomic>\n#include <type_traits>\n\n#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n    // Workaround for overzealous compiler warnings\n    #pragma warning (push)\n    #pragma warning (disable: 4244)\n#endif\n\nnamespace tbb {\nnamespace detail {\n\nnamespace d1 {\nclass auto_partitioner;\nclass simple_partitioner;\nclass static_partitioner;\nclass affinity_partitioner;\nclass affinity_partition_type;\nclass affinity_partitioner_base;\n\ninline std::size_t get_initial_auto_partitioner_divisor() {\n    const std::size_t factor = 4;\n    return factor * static_cast<std::size_t>(max_concurrency());\n}\n\n//! Defines entry point for affinity partitioner into oneTBB run-time library.\nclass affinity_partitioner_base: no_copy {\n    friend class affinity_partitioner;\n    friend class affinity_partition_type;\n    //! Array that remembers affinities of tree positions to affinity_id.\n    /** nullptr if my_size==0. */\n    slot_id* my_array;\n    //! Number of elements in my_array.\n    std::size_t my_size;\n    //! Zeros the fields.\n    affinity_partitioner_base() : my_array(nullptr), my_size(0) {}\n    //! Deallocates my_array.\n    ~affinity_partitioner_base() { resize(0); }\n    //! Resize my_array.\n    /** Retains values if resulting size is the same. */\n    void resize(unsigned factor) {\n        // Check factor to avoid asking for number of workers while there might be no arena.\n        unsigned max_threads_in_arena = static_cast<unsigned>(max_concurrency());\n        std::size_t new_size = factor ? factor * max_threads_in_arena : 0;\n        if (new_size != my_size) {\n            if (my_array) {\n                r1::cache_aligned_deallocate(my_array);\n                // Following two assignments must be done here for sake of exception safety.\n                my_array = nullptr;\n                my_size = 0;\n            }\n            if (new_size) {\n                my_array = static_cast<slot_id*>(r1::cache_aligned_allocate(new_size * sizeof(slot_id)));\n                std::fill_n(my_array, new_size, no_slot);\n                my_size = new_size;\n            }\n        }\n    }\n};\n\ntemplate<typename Range, typename Body, typename Partitioner> struct start_for;\ntemplate<typename Range, typename Body, typename Partitioner> struct start_scan;\ntemplate<typename Range, typename Body, typename Partitioner> struct start_reduce;\ntemplate<typename Range, typename Body, typename Partitioner> struct start_deterministic_reduce;\n\nstruct node {\n    node* my_parent{};\n    std::atomic<int> m_ref_count{};\n\n    node() = default;\n    node(node* parent, int ref_count) :\n        my_parent{parent}, m_ref_count{ref_count} {\n        __TBB_ASSERT(ref_count > 0, \"The ref count must be positive\");\n    }\n};\n\nstruct wait_node : node {\n    wait_node() : node{ nullptr, 1 } {}\n    wait_context m_wait{1};\n};\n\n//! Join task node that contains shared flag for stealing feedback\nstruct tree_node : public node {\n    small_object_allocator m_allocator;\n    std::atomic<bool> m_child_stolen{false};\n\n    tree_node(node* parent, int ref_count, small_object_allocator& alloc)\n        : node{parent, ref_count}\n        , m_allocator{alloc} {}\n\n    void join(task_group_context*) {/*dummy, required only for reduction algorithms*/};\n\n    template <typename Task>\n    static void mark_task_stolen(Task &t) {\n        std::atomic<bool> &flag = static_cast<tree_node*>(t.my_parent)->m_child_stolen;\n#if TBB_USE_PROFILING_TOOLS\n        // Threading tools respect lock prefix but report false-positive data-race via plain store\n        flag.exchange(true);\n#else\n        flag.store(true, std::memory_order_relaxed);\n#endif // TBB_USE_PROFILING_TOOLS\n    }\n    template <typename Task>\n    static bool is_peer_stolen(Task &t) {\n        return static_cast<tree_node*>(t.my_parent)->m_child_stolen.load(std::memory_order_relaxed);\n    }\n};\n\n// Context used to check cancellation state during reduction join process\ntemplate<typename TreeNodeType>\nvoid fold_tree(node* n, const execution_data& ed) {\n    for (;;) {\n        __TBB_ASSERT(n, nullptr);\n        __TBB_ASSERT(n->m_ref_count.load(std::memory_order_relaxed) > 0, \"The refcount must be positive.\");\n        call_itt_task_notify(releasing, n);\n        if (--n->m_ref_count > 0) {\n            return;\n        }\n        node* parent = n->my_parent;\n        if (!parent) {\n            break;\n        };\n\n        call_itt_task_notify(acquired, n);\n        TreeNodeType* self = static_cast<TreeNodeType*>(n);\n        self->join(ed.context);\n        self->m_allocator.delete_object(self, ed);\n        n = parent;\n    }\n    // Finish parallel for execution when the root (last node) is reached\n    static_cast<wait_node*>(n)->m_wait.release();\n}\n\n//! Depth is a relative depth of recursive division inside a range pool. Relative depth allows\n//! infinite absolute depth of the recursion for heavily unbalanced workloads with range represented\n//! by a number that cannot fit into machine word.\ntypedef unsigned char depth_t;\n\n//! Range pool stores ranges of type T in a circular buffer with MaxCapacity\ntemplate <typename T, depth_t MaxCapacity>\nclass range_vector {\n    depth_t my_head;\n    depth_t my_tail;\n    depth_t my_size;\n    depth_t my_depth[MaxCapacity]; // relative depths of stored ranges\n    tbb::detail::aligned_space<T, MaxCapacity> my_pool;\n\npublic:\n    //! initialize via first range in pool\n    range_vector(const T& elem) : my_head(0), my_tail(0), my_size(1) {\n        my_depth[0] = 0;\n        new( static_cast<void *>(my_pool.begin()) ) T(elem);//TODO: std::move?\n    }\n    ~range_vector() {\n        while( !empty() ) pop_back();\n    }\n    bool empty() const { return my_size == 0; }\n    depth_t size() const { return my_size; }\n    //! Populates range pool via ranges up to max depth or while divisible\n    //! max_depth starts from 0, e.g. value 2 makes 3 ranges in the pool up to two 1/4 pieces\n    void split_to_fill(depth_t max_depth) {\n        while( my_size < MaxCapacity && is_divisible(max_depth) ) {\n            depth_t prev = my_head;\n            my_head = (my_head + 1) % MaxCapacity;\n            new(my_pool.begin()+my_head) T(my_pool.begin()[prev]); // copy TODO: std::move?\n            my_pool.begin()[prev].~T(); // instead of assignment\n            new(my_pool.begin()+prev) T(my_pool.begin()[my_head], detail::split()); // do 'inverse' split\n            my_depth[my_head] = ++my_depth[prev];\n            my_size++;\n        }\n    }\n    void pop_back() {\n        __TBB_ASSERT(my_size > 0, \"range_vector::pop_back() with empty size\");\n        my_pool.begin()[my_head].~T();\n        my_size--;\n        my_head = (my_head + MaxCapacity - 1) % MaxCapacity;\n    }\n    void pop_front() {\n        __TBB_ASSERT(my_size > 0, \"range_vector::pop_front() with empty size\");\n        my_pool.begin()[my_tail].~T();\n        my_size--;\n        my_tail = (my_tail + 1) % MaxCapacity;\n    }\n    T& back() {\n        __TBB_ASSERT(my_size > 0, \"range_vector::back() with empty size\");\n        return my_pool.begin()[my_head];\n    }\n    T& front() {\n        __TBB_ASSERT(my_size > 0, \"range_vector::front() with empty size\");\n        return my_pool.begin()[my_tail];\n    }\n    //! similarly to front(), returns depth of the first range in the pool\n    depth_t front_depth() {\n        __TBB_ASSERT(my_size > 0, \"range_vector::front_depth() with empty size\");\n        return my_depth[my_tail];\n    }\n    depth_t back_depth() {\n        __TBB_ASSERT(my_size > 0, \"range_vector::back_depth() with empty size\");\n        return my_depth[my_head];\n    }\n    bool is_divisible(depth_t max_depth) {\n        return back_depth() < max_depth && back().is_divisible();\n    }\n};\n\n//! Provides default methods for partition objects and common algorithm blocks.\ntemplate <typename Partition>\nstruct partition_type_base {\n    typedef detail::split split_type;\n    // decision makers\n    void note_affinity( slot_id ) {}\n    template <typename Task>\n    bool check_being_stolen(Task&, const execution_data&) { return false; } // part of old should_execute_range()\n    template <typename Range> split_type get_split() { return split(); }\n    Partition& self() { return *static_cast<Partition*>(this); } // CRTP helper\n\n    template<typename StartType, typename Range>\n    void work_balance(StartType &start, Range &range, const execution_data&) {\n        start.run_body( range ); // static partitioner goes here\n    }\n\n    template<typename StartType, typename Range>\n    void execute(StartType &start, Range &range, execution_data& ed) {\n        // The algorithm in a few words ([]-denotes calls to decision methods of partitioner):\n        // [If this task is stolen, adjust depth and divisions if necessary, set flag].\n        // If range is divisible {\n        //    Spread the work while [initial divisions left];\n        //    Create trap task [if necessary];\n        // }\n        // If not divisible or [max depth is reached], execute, else do the range pool part\n        if ( range.is_divisible() ) {\n            if ( self().is_divisible() ) {\n                do { // split until is divisible\n                    typename Partition::split_type split_obj = self().template get_split<Range>();\n                    start.offer_work( split_obj, ed );\n                } while ( range.is_divisible() && self().is_divisible() );\n            }\n        }\n        self().work_balance(start, range, ed);\n    }\n};\n\n//! Provides default splitting strategy for partition objects.\ntemplate <typename Partition>\nstruct adaptive_mode : partition_type_base<Partition> {\n    typedef Partition my_partition;\n    std::size_t my_divisor;\n    // For affinity_partitioner, my_divisor indicates the number of affinity array indices the task reserves.\n    // A task which has only one index must produce the right split without reserved index in order to avoid\n    // it to be overwritten in note_affinity() of the created (right) task.\n    // I.e. a task created deeper than the affinity array can remember must not save its affinity (LIFO order)\n    static const unsigned factor = 1;\n    adaptive_mode() : my_divisor(get_initial_auto_partitioner_divisor() / 4 * my_partition::factor) {}\n    adaptive_mode(adaptive_mode &src, split) : my_divisor(do_split(src, split())) {}\n    adaptive_mode(adaptive_mode&, const proportional_split&) : my_divisor(0)\n    {\n        // left blank as my_divisor gets overridden in the successors' constructors\n    }\n    /*! Override do_split methods in order to specify splitting strategy */\n    std::size_t do_split(adaptive_mode &src, split) {\n        return src.my_divisor /= 2u;\n    }\n};\n\n\n//! Provides proportional splitting strategy for partition objects\ntemplate <typename Partition>\nstruct proportional_mode : adaptive_mode<Partition> {\n    typedef Partition my_partition;\n    using partition_type_base<Partition>::self; // CRTP helper to get access to derived classes\n\n    proportional_mode() : adaptive_mode<Partition>() {}\n    proportional_mode(proportional_mode &src, split) : adaptive_mode<Partition>(src, split()) {}\n    proportional_mode(proportional_mode &src, const proportional_split& split_obj)\n        : adaptive_mode<Partition>(src, split_obj)\n    {\n        self().my_divisor = do_split(src, split_obj);\n    }\n    std::size_t do_split(proportional_mode &src, const proportional_split& split_obj) {\n        std::size_t portion = split_obj.right() * my_partition::factor;\n        portion = (portion + my_partition::factor/2) & (0ul - my_partition::factor);\n        src.my_divisor -= portion;\n        return portion;\n    }\n    bool is_divisible() { // part of old should_execute_range()\n        return self().my_divisor > my_partition::factor;\n    }\n    template <typename Range>\n    proportional_split get_split() {\n        // Create the proportion from partitioner internal resources (threads) that would be used:\n        // - into proportional_mode constructor to split the partitioner\n        // - if Range supports the proportional_split constructor it would use proposed proportion,\n        //   otherwise, the tbb::proportional_split object will be implicitly (for Range implementer)\n        //   casted to tbb::split\n\n        std::size_t n = self().my_divisor / my_partition::factor;\n        std::size_t right = n / 2;\n        std::size_t left  = n - right;\n        return proportional_split(left, right);\n    }\n};\n\nstatic std::size_t get_initial_partition_head() {\n    int current_index = tbb::this_task_arena::current_thread_index();\n    if (current_index == tbb::task_arena::not_initialized)\n        current_index = 0;\n    return size_t(current_index);\n}\n\n//! Provides default linear indexing of partitioner's sequence\ntemplate <typename Partition>\nstruct linear_affinity_mode : proportional_mode<Partition> {\n    std::size_t my_head;\n    std::size_t my_max_affinity;\n    using proportional_mode<Partition>::self;\n    linear_affinity_mode() : proportional_mode<Partition>(), my_head(get_initial_partition_head()),\n                             my_max_affinity(self().my_divisor) {}\n    linear_affinity_mode(linear_affinity_mode &src, split) : proportional_mode<Partition>(src, split())\n        , my_head((src.my_head + src.my_divisor) % src.my_max_affinity), my_max_affinity(src.my_max_affinity) {}\n    linear_affinity_mode(linear_affinity_mode &src, const proportional_split& split_obj) : proportional_mode<Partition>(src, split_obj)\n        , my_head((src.my_head + src.my_divisor) % src.my_max_affinity), my_max_affinity(src.my_max_affinity) {}\n    void spawn_task(task& t, task_group_context& ctx) {\n        if (self().my_divisor) {\n            spawn(t, ctx, slot_id(my_head));\n        } else {\n            spawn(t, ctx);\n        }\n    }\n};\n\nstatic bool is_stolen_task(const execution_data& ed) {\n    return execution_slot(ed) != original_slot(ed);\n}\n\n/*! Determine work-balance phase implementing splitting & stealing actions */\ntemplate<class Mode>\nstruct dynamic_grainsize_mode : Mode {\n    using Mode::self;\n    enum {\n        begin = 0,\n        run,\n        pass\n    } my_delay;\n    depth_t my_max_depth;\n    static const unsigned range_pool_size = __TBB_RANGE_POOL_CAPACITY;\n    dynamic_grainsize_mode(): Mode()\n        , my_delay(begin)\n        , my_max_depth(__TBB_INIT_DEPTH) {}\n    dynamic_grainsize_mode(dynamic_grainsize_mode& p, split)\n        : Mode(p, split())\n        , my_delay(pass)\n        , my_max_depth(p.my_max_depth) {}\n    dynamic_grainsize_mode(dynamic_grainsize_mode& p, const proportional_split& split_obj)\n        : Mode(p, split_obj)\n        , my_delay(begin)\n        , my_max_depth(p.my_max_depth) {}\n    template <typename Task>\n    bool check_being_stolen(Task &t, const execution_data& ed) { // part of old should_execute_range()\n        if( !(self().my_divisor / Mode::my_partition::factor) ) { // if not from the top P tasks of binary tree\n            self().my_divisor = 1; // TODO: replace by on-stack flag (partition_state's member)?\n            if( is_stolen_task(ed) && t.my_parent->m_ref_count >= 2 ) { // runs concurrently with the left task\n#if __TBB_USE_OPTIONAL_RTTI\n                // RTTI is available, check whether the cast is valid\n                // TODO: TBB_REVAMP_TODO __TBB_ASSERT(dynamic_cast<tree_node*>(t.m_parent), 0);\n                // correctness of the cast relies on avoiding the root task for which:\n                // - initial value of my_divisor != 0 (protected by separate assertion)\n                // - is_stolen_task() always returns false for the root task.\n#endif\n                tree_node::mark_task_stolen(t);\n                if( !my_max_depth ) my_max_depth++;\n                my_max_depth += __TBB_DEMAND_DEPTH_ADD;\n                return true;\n            }\n        }\n        return false;\n    }\n    depth_t max_depth() { return my_max_depth; }\n    void align_depth(depth_t base) {\n        __TBB_ASSERT(base <= my_max_depth, nullptr);\n        my_max_depth -= base;\n    }\n    template<typename StartType, typename Range>\n    void work_balance(StartType &start, Range &range, execution_data& ed) {\n        if( !range.is_divisible() || !self().max_depth() ) {\n            start.run_body( range );\n        }\n        else { // do range pool\n            range_vector<Range, range_pool_size> range_pool(range);\n            do {\n                range_pool.split_to_fill(self().max_depth()); // fill range pool\n                if( self().check_for_demand( start ) ) {\n                    if( range_pool.size() > 1 ) {\n                        start.offer_work( range_pool.front(), range_pool.front_depth(), ed );\n                        range_pool.pop_front();\n                        continue;\n                    }\n                    if( range_pool.is_divisible(self().max_depth()) ) // was not enough depth to fork a task\n                        continue; // note: next split_to_fill() should split range at least once\n                }\n                start.run_body( range_pool.back() );\n                range_pool.pop_back();\n            } while( !range_pool.empty() && !ed.context->is_group_execution_cancelled() );\n        }\n    }\n    template <typename Task>\n    bool check_for_demand(Task& t) {\n        if ( pass == my_delay ) {\n            if ( self().my_divisor > 1 ) // produce affinitized tasks while they have slot in array\n                return true; // do not do my_max_depth++ here, but be sure range_pool is splittable once more\n            else if ( self().my_divisor && my_max_depth ) { // make balancing task\n                self().my_divisor = 0; // once for each task; depth will be decreased in align_depth()\n                return true;\n            }\n            else if ( tree_node::is_peer_stolen(t) ) {\n                my_max_depth += __TBB_DEMAND_DEPTH_ADD;\n                return true;\n            }\n        } else if( begin == my_delay ) {\n            my_delay = pass;\n        }\n        return false;\n    }\n};\n\nclass auto_partition_type: public dynamic_grainsize_mode<adaptive_mode<auto_partition_type> > {\npublic:\n    auto_partition_type( const auto_partitioner& ) {\n        my_divisor *= __TBB_INITIAL_CHUNKS;\n    }\n    auto_partition_type( auto_partition_type& src, split)\n        : dynamic_grainsize_mode<adaptive_mode<auto_partition_type> >(src, split()) {}\n    bool is_divisible() { // part of old should_execute_range()\n        if( my_divisor > 1 ) return true;\n        if( my_divisor && my_max_depth ) { // can split the task. TODO: on-stack flag instead\n            // keep same fragmentation while splitting for the local task pool\n            my_max_depth--;\n            my_divisor = 0; // decrease max_depth once per task\n            return true;\n        } else return false;\n    }\n    template <typename Task>\n    bool check_for_demand(Task& t) {\n        if (tree_node::is_peer_stolen(t)) {\n            my_max_depth += __TBB_DEMAND_DEPTH_ADD;\n            return true;\n        } else return false;\n    }\n    void spawn_task(task& t, task_group_context& ctx) {\n        spawn(t, ctx);\n    }\n};\n\nclass simple_partition_type: public partition_type_base<simple_partition_type> {\npublic:\n    simple_partition_type( const simple_partitioner& ) {}\n    simple_partition_type( const simple_partition_type&, split ) {}\n    //! simplified algorithm\n    template<typename StartType, typename Range>\n    void execute(StartType &start, Range &range, execution_data& ed) {\n        split_type split_obj = split(); // start.offer_work accepts split_type as reference\n        while( range.is_divisible() )\n            start.offer_work( split_obj, ed );\n        start.run_body( range );\n    }\n    void spawn_task(task& t, task_group_context& ctx) {\n        spawn(t, ctx);\n    }\n};\n\nclass static_partition_type : public linear_affinity_mode<static_partition_type> {\npublic:\n    typedef detail::proportional_split split_type;\n    static_partition_type( const static_partitioner& ) {}\n    static_partition_type( static_partition_type& p, const proportional_split& split_obj )\n        : linear_affinity_mode<static_partition_type>(p, split_obj) {}\n};\n\nclass affinity_partition_type : public dynamic_grainsize_mode<linear_affinity_mode<affinity_partition_type> > {\n    static const unsigned factor_power = 4; // TODO: get a unified formula based on number of computing units\n    slot_id* my_array;\npublic:\n    static const unsigned factor = 1 << factor_power; // number of slots in affinity array per task\n    typedef detail::proportional_split split_type;\n    affinity_partition_type( affinity_partitioner_base& ap ) {\n        __TBB_ASSERT( (factor&(factor-1))==0, \"factor must be power of two\" );\n        ap.resize(factor);\n        my_array = ap.my_array;\n        my_max_depth = factor_power + 1;\n        __TBB_ASSERT( my_max_depth < __TBB_RANGE_POOL_CAPACITY, nullptr );\n    }\n    affinity_partition_type(affinity_partition_type& p, split)\n        : dynamic_grainsize_mode<linear_affinity_mode<affinity_partition_type> >(p, split())\n        , my_array(p.my_array) {}\n    affinity_partition_type(affinity_partition_type& p, const proportional_split& split_obj)\n        : dynamic_grainsize_mode<linear_affinity_mode<affinity_partition_type> >(p, split_obj)\n        , my_array(p.my_array) {}\n    void note_affinity(slot_id id) {\n        if( my_divisor )\n            my_array[my_head] = id;\n    }\n    void spawn_task(task& t, task_group_context& ctx) {\n        if (my_divisor) {\n            if (!my_array[my_head]) {\n                // TODO: consider new ideas with my_array for both affinity and static partitioner's, then code reuse\n                spawn(t, ctx, slot_id(my_head / factor));\n            } else {\n                spawn(t, ctx, my_array[my_head]);\n            }\n        } else {\n            spawn(t, ctx);\n        }\n    }\n};\n\n//! A simple partitioner\n/** Divides the range until the range is not divisible.\n    @ingroup algorithms */\nclass simple_partitioner {\npublic:\n    simple_partitioner() {}\nprivate:\n    template<typename Range, typename Body, typename Partitioner> friend struct start_for;\n    template<typename Range, typename Body, typename Partitioner> friend struct start_reduce;\n    template<typename Range, typename Body, typename Partitioner> friend struct start_deterministic_reduce;\n    template<typename Range, typename Body, typename Partitioner> friend struct start_scan;\n    // new implementation just extends existing interface\n    typedef simple_partition_type task_partition_type;\n    // TODO: consider to make split_type public\n    typedef simple_partition_type::split_type split_type;\n\n    // for parallel_scan only\n    class partition_type {\n    public:\n        bool should_execute_range(const execution_data& ) {return false;}\n        partition_type( const simple_partitioner& ) {}\n        partition_type( const partition_type&, split ) {}\n    };\n};\n\n//! An auto partitioner\n/** The range is initial divided into several large chunks.\n    Chunks are further subdivided into smaller pieces if demand detected and they are divisible.\n    @ingroup algorithms */\nclass auto_partitioner {\npublic:\n    auto_partitioner() {}\n\nprivate:\n    template<typename Range, typename Body, typename Partitioner> friend struct start_for;\n    template<typename Range, typename Body, typename Partitioner> friend struct start_reduce;\n    template<typename Range, typename Body, typename Partitioner> friend struct start_deterministic_reduce;\n    template<typename Range, typename Body, typename Partitioner> friend struct start_scan;\n    // new implementation just extends existing interface\n    typedef auto_partition_type task_partition_type;\n    // TODO: consider to make split_type public\n    typedef auto_partition_type::split_type split_type;\n\n    //! Backward-compatible partition for auto and affinity partition objects.\n    class partition_type {\n        size_t num_chunks;\n        static const size_t VICTIM_CHUNKS = 4;\n        public:\n        bool should_execute_range(const execution_data& ed) {\n            if( num_chunks<VICTIM_CHUNKS && is_stolen_task(ed) )\n                num_chunks = VICTIM_CHUNKS;\n            return num_chunks==1;\n        }\n        partition_type( const auto_partitioner& )\n            : num_chunks(get_initial_auto_partitioner_divisor()*__TBB_INITIAL_CHUNKS/4) {}\n        partition_type( partition_type& pt, split ) {\n            num_chunks = pt.num_chunks = (pt.num_chunks+1u) / 2u;\n        }\n    };\n};\n\n//! A static partitioner\nclass static_partitioner {\npublic:\n    static_partitioner() {}\nprivate:\n    template<typename Range, typename Body, typename Partitioner> friend struct start_for;\n    template<typename Range, typename Body, typename Partitioner> friend struct start_reduce;\n    template<typename Range, typename Body, typename Partitioner> friend struct start_deterministic_reduce;\n    template<typename Range, typename Body, typename Partitioner> friend struct start_scan;\n    // new implementation just extends existing interface\n    typedef static_partition_type task_partition_type;\n    // TODO: consider to make split_type public\n    typedef static_partition_type::split_type split_type;\n};\n\n//! An affinity partitioner\nclass affinity_partitioner : affinity_partitioner_base {\npublic:\n    affinity_partitioner() {}\n\nprivate:\n    template<typename Range, typename Body, typename Partitioner> friend struct start_for;\n    template<typename Range, typename Body, typename Partitioner> friend struct start_reduce;\n    template<typename Range, typename Body, typename Partitioner> friend struct start_deterministic_reduce;\n    template<typename Range, typename Body, typename Partitioner> friend struct start_scan;\n    // new implementation just extends existing interface\n    typedef affinity_partition_type task_partition_type;\n    // TODO: consider to make split_type public\n    typedef affinity_partition_type::split_type split_type;\n};\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\n// Partitioners\nusing detail::d1::auto_partitioner;\nusing detail::d1::simple_partitioner;\nusing detail::d1::static_partitioner;\nusing detail::d1::affinity_partitioner;\n// Split types\nusing detail::split;\nusing detail::proportional_split;\n} // namespace v1\n\n} // namespace tbb\n\n#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n    #pragma warning (pop)\n#endif // warning 4244 is back\n\n#undef __TBB_INITIAL_CHUNKS\n#undef __TBB_RANGE_POOL_CAPACITY\n#undef __TBB_INIT_DEPTH\n\n#endif /* __TBB_partitioner_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/profiling.h",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_profiling_H\n#define __TBB_profiling_H\n\n#include \"detail/_config.h\"\n#include <cstdint>\n\n#include <string>\n\nnamespace tbb {\nnamespace detail {\ninline namespace d0 {\n    // include list of index names\n    #define TBB_STRING_RESOURCE(index_name,str) index_name,\n    enum string_resource_index : std::uintptr_t {\n        #include \"detail/_string_resource.h\"\n        NUM_STRINGS\n    };\n    #undef TBB_STRING_RESOURCE\n\n    enum itt_relation\n    {\n    __itt_relation_is_unknown = 0,\n    __itt_relation_is_dependent_on,         /**< \"A is dependent on B\" means that A cannot start until B completes */\n    __itt_relation_is_sibling_of,           /**< \"A is sibling of B\" means that A and B were created as a group */\n    __itt_relation_is_parent_of,            /**< \"A is parent of B\" means that A created B */\n    __itt_relation_is_continuation_of,      /**< \"A is continuation of B\" means that A assumes the dependencies of B */\n    __itt_relation_is_child_of,             /**< \"A is child of B\" means that A was created by B (inverse of is_parent_of) */\n    __itt_relation_is_continued_by,         /**< \"A is continued by B\" means that B assumes the dependencies of A (inverse of is_continuation_of) */\n    __itt_relation_is_predecessor_to        /**< \"A is predecessor to B\" means that B cannot start until A completes (inverse of is_dependent_on) */\n    };\n\n//! Unicode support\n#if (_WIN32||_WIN64)\n    //! Unicode character type. Always wchar_t on Windows.\n    using tchar = wchar_t;\n#else /* !WIN */\n    using tchar = char;\n#endif /* !WIN */\n\n} // namespace d0\n} // namespace detail\n} // namespace tbb\n\n#include <atomic>\n#if _WIN32||_WIN64\n#include <stdlib.h>  /* mbstowcs_s */\n#endif\n// Need these to work regardless of tools support\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n    enum notify_type {prepare=0, cancel, acquired, releasing, destroy};\n    enum itt_domain_enum { ITT_DOMAIN_FLOW=0, ITT_DOMAIN_MAIN=1, ITT_DOMAIN_ALGO=2, ITT_NUM_DOMAINS };\n} // namespace d1\n\nnamespace r1 {\n    TBB_EXPORT void __TBB_EXPORTED_FUNC call_itt_notify(int t, void* ptr);\n    TBB_EXPORT void __TBB_EXPORTED_FUNC create_itt_sync(void* ptr, const tchar* objtype, const tchar* objname);\n    TBB_EXPORT void __TBB_EXPORTED_FUNC itt_make_task_group(d1::itt_domain_enum domain, void* group, unsigned long long group_extra,\n        void* parent, unsigned long long parent_extra, string_resource_index name_index);\n    TBB_EXPORT void __TBB_EXPORTED_FUNC itt_task_begin(d1::itt_domain_enum domain, void* task, unsigned long long task_extra,\n        void* parent, unsigned long long parent_extra, string_resource_index name_index);\n    TBB_EXPORT void __TBB_EXPORTED_FUNC itt_task_end(d1::itt_domain_enum domain);\n    TBB_EXPORT void __TBB_EXPORTED_FUNC itt_set_sync_name(void* obj, const tchar* name);\n    TBB_EXPORT void __TBB_EXPORTED_FUNC itt_metadata_str_add(d1::itt_domain_enum domain, void* addr, unsigned long long addr_extra,\n        string_resource_index key, const char* value);\n    TBB_EXPORT void __TBB_EXPORTED_FUNC itt_metadata_ptr_add(d1::itt_domain_enum domain, void* addr, unsigned long long addr_extra,\n        string_resource_index key, void* value);\n    TBB_EXPORT void __TBB_EXPORTED_FUNC itt_relation_add(d1::itt_domain_enum domain, void* addr0, unsigned long long addr0_extra,\n        itt_relation relation, void* addr1, unsigned long long addr1_extra);\n    TBB_EXPORT void __TBB_EXPORTED_FUNC itt_region_begin(d1::itt_domain_enum domain, void* region, unsigned long long region_extra,\n        void* parent, unsigned long long parent_extra, string_resource_index /* name_index */);\n    TBB_EXPORT void __TBB_EXPORTED_FUNC itt_region_end(d1::itt_domain_enum domain, void* region, unsigned long long region_extra);\n} // namespace r1\n\nnamespace d1 {\n#if TBB_USE_PROFILING_TOOLS && (_WIN32||_WIN64)\n    inline std::size_t multibyte_to_widechar(wchar_t* wcs, const char* mbs, std::size_t bufsize) {\n        std::size_t len;\n        mbstowcs_s(&len, wcs, bufsize, mbs, _TRUNCATE);\n        return len;   // mbstowcs_s counts null terminator\n    }\n#endif\n\n#if TBB_USE_PROFILING_TOOLS\n    inline void create_itt_sync(void *ptr, const char *objtype, const char *objname) {\n#if (_WIN32||_WIN64)\n        std::size_t len_type = multibyte_to_widechar(nullptr, objtype, 0);\n        wchar_t *type = new wchar_t[len_type];\n        multibyte_to_widechar(type, objtype, len_type);\n        std::size_t len_name = multibyte_to_widechar(nullptr, objname, 0);\n        wchar_t *name = new wchar_t[len_name];\n        multibyte_to_widechar(name, objname, len_name);\n#else // WIN\n        const char *type = objtype;\n        const char *name = objname;\n#endif\n        r1::create_itt_sync(ptr, type, name);\n\n#if (_WIN32||_WIN64)\n        delete[] type;\n        delete[] name;\n#endif // WIN\n    }\n\n// Distinguish notifications on task for reducing overheads\n#if TBB_USE_PROFILING_TOOLS == 2\n    inline void call_itt_task_notify(d1::notify_type t, void *ptr) {\n        r1::call_itt_notify(static_cast<int>(t), ptr);\n    }\n#else\n    inline void call_itt_task_notify(d1::notify_type, void *) {}\n#endif // TBB_USE_PROFILING_TOOLS\n\n    inline void call_itt_notify(d1::notify_type t, void *ptr) {\n        r1::call_itt_notify(static_cast<int>(t), ptr);\n    }\n\n#if (_WIN32||_WIN64) && !__MINGW32__\n    inline void itt_set_sync_name(void* obj, const wchar_t* name) {\n        r1::itt_set_sync_name(obj, name);\n    }\n    inline void itt_set_sync_name(void* obj, const char* name) {\n        std::size_t len_name = multibyte_to_widechar(nullptr, name, 0);\n        wchar_t *obj_name = new wchar_t[len_name];\n        multibyte_to_widechar(obj_name, name, len_name);\n        r1::itt_set_sync_name(obj, obj_name);\n        delete[] obj_name;\n    }\n#else\n    inline void itt_set_sync_name( void* obj, const char* name) {\n        r1::itt_set_sync_name(obj, name);\n    }\n#endif //WIN\n\n    inline void itt_make_task_group(itt_domain_enum domain, void* group, unsigned long long group_extra,\n        void* parent, unsigned long long parent_extra, string_resource_index name_index) {\n        r1::itt_make_task_group(domain, group, group_extra, parent, parent_extra, name_index);\n    }\n\n    inline void itt_metadata_str_add( itt_domain_enum domain, void *addr, unsigned long long addr_extra,\n                                        string_resource_index key, const char *value ) {\n        r1::itt_metadata_str_add( domain, addr, addr_extra, key, value );\n    }\n\n    inline void register_node_addr(itt_domain_enum domain, void *addr, unsigned long long addr_extra,\n        string_resource_index key, void *value) {\n        r1::itt_metadata_ptr_add(domain, addr, addr_extra, key, value);\n    }\n\n    inline void itt_relation_add( itt_domain_enum domain, void *addr0, unsigned long long addr0_extra,\n                                    itt_relation relation, void *addr1, unsigned long long addr1_extra ) {\n        r1::itt_relation_add( domain, addr0, addr0_extra, relation, addr1, addr1_extra );\n    }\n\n    inline void itt_task_begin( itt_domain_enum domain, void *task, unsigned long long task_extra,\n                                                    void *parent, unsigned long long parent_extra, string_resource_index name_index ) {\n        r1::itt_task_begin( domain, task, task_extra, parent, parent_extra, name_index );\n    }\n\n    inline void itt_task_end( itt_domain_enum domain ) {\n        r1::itt_task_end( domain );\n    }\n\n    inline void itt_region_begin( itt_domain_enum domain, void *region, unsigned long long region_extra,\n                                    void *parent, unsigned long long parent_extra, string_resource_index name_index ) {\n        r1::itt_region_begin( domain, region, region_extra, parent, parent_extra, name_index );\n    }\n\n    inline void itt_region_end( itt_domain_enum domain, void *region, unsigned long long region_extra  ) {\n        r1::itt_region_end( domain, region, region_extra );\n    }\n#else\n    inline void create_itt_sync(void* /*ptr*/, const char* /*objtype*/, const char* /*objname*/) {}\n\n    inline void call_itt_notify(notify_type /*t*/, void* /*ptr*/) {}\n\n    inline void call_itt_task_notify(notify_type /*t*/, void* /*ptr*/) {}\n#endif // TBB_USE_PROFILING_TOOLS\n\n#if TBB_USE_PROFILING_TOOLS && !(TBB_USE_PROFILING_TOOLS == 2)\nclass event {\n/** This class supports user event traces through itt.\n    Common use-case is tagging data flow graph tasks (data-id)\n    and visualization by Intel Advisor Flow Graph Analyzer (FGA)  **/\n//  TODO: Replace implementation by itt user event api.\n\n    const std::string my_name;\n\n    static void emit_trace(const std::string &input) {\n        itt_metadata_str_add( ITT_DOMAIN_FLOW, nullptr, FLOW_NULL, USER_EVENT, ( \"FGA::DATAID::\" + input ).c_str() );\n    }\n\npublic:\n    event(const std::string &input)\n              : my_name( input )\n    { }\n\n    void emit() {\n        emit_trace(my_name);\n    }\n\n    static void emit(const std::string &description) {\n        emit_trace(description);\n    }\n\n};\n#else // TBB_USE_PROFILING_TOOLS && !(TBB_USE_PROFILING_TOOLS == 2)\n// Using empty struct if user event tracing is disabled:\nstruct event {\n    event(const std::string &) { }\n\n    void emit() { }\n\n    static void emit(const std::string &) { }\n};\n#endif // TBB_USE_PROFILING_TOOLS && !(TBB_USE_PROFILING_TOOLS == 2)\n} // namespace d1\n} // namespace detail\n\nnamespace profiling {\n    using detail::d1::event;\n}\n} // namespace tbb\n\n\n#endif /* __TBB_profiling_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/queuing_mutex.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_queuing_mutex_H\n#define __TBB_queuing_mutex_H\n\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_assert.h\"\n#include \"detail/_utils.h\"\n#include \"detail/_mutex_common.h\"\n\n#include \"profiling.h\"\n\n#include <atomic>\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n//! Queuing mutex with local-only spinning.\n/** @ingroup synchronization */\nclass queuing_mutex {\npublic:\n    //! Construct unacquired mutex.\n    queuing_mutex() noexcept  {\n        create_itt_sync(this, \"tbb::queuing_mutex\", \"\");\n    };\n\n    queuing_mutex(const queuing_mutex&) = delete;\n    queuing_mutex& operator=(const queuing_mutex&) = delete;\n\n    //! The scoped locking pattern\n    /** It helps to avoid the common problem of forgetting to release lock.\n        It also nicely provides the \"node\" for queuing locks. */\n    class scoped_lock {\n        //! Reset fields to mean \"no lock held\".\n        void reset() {\n            m_mutex = nullptr;\n        }\n\n    public:\n        //! Construct lock that has not acquired a mutex.\n        /** Equivalent to zero-initialization of *this. */\n        scoped_lock() = default;\n\n        //! Acquire lock on given mutex.\n        scoped_lock(queuing_mutex& m) {\n            acquire(m);\n        }\n\n        //! Release lock (if lock is held).\n        ~scoped_lock() {\n            if (m_mutex) release();\n        }\n\n        //! No Copy\n        scoped_lock( const scoped_lock& ) = delete;\n        scoped_lock& operator=( const scoped_lock& ) = delete;\n\n        //! Acquire lock on given mutex.\n        void acquire( queuing_mutex& m ) {\n            __TBB_ASSERT(!m_mutex, \"scoped_lock is already holding a mutex\");\n\n            // Must set all fields before the exchange, because once the\n            // exchange executes, *this becomes accessible to other threads.\n            m_mutex = &m;\n            m_next.store(nullptr, std::memory_order_relaxed);\n            m_going.store(0U, std::memory_order_relaxed);\n\n            // x86 compare exchange operation always has a strong fence\n            // \"sending\" the fields initialized above to other processors.\n            scoped_lock* pred = m.q_tail.exchange(this);\n            if (pred) {\n                call_itt_notify(prepare, &m);\n                __TBB_ASSERT(pred->m_next.load(std::memory_order_relaxed) == nullptr, \"the predecessor has another successor!\");\n\n                pred->m_next.store(this, std::memory_order_release);\n                spin_wait_while_eq(m_going, 0U);\n            }\n            call_itt_notify(acquired, &m);\n\n        }\n\n        //! Acquire lock on given mutex if free (i.e. non-blocking)\n        bool try_acquire( queuing_mutex& m ) {\n            __TBB_ASSERT(!m_mutex, \"scoped_lock is already holding a mutex\");\n\n            // Must set all fields before the compare_exchange_strong, because once the\n            // compare_exchange_strong executes, *this becomes accessible to other threads.\n            m_next.store(nullptr, std::memory_order_relaxed);\n            m_going.store(0U, std::memory_order_relaxed);\n\n            scoped_lock* expected = nullptr;\n            // The compare_exchange_strong must have release semantics, because we are\n            // \"sending\" the fields initialized above to other processors.\n            // x86 compare exchange operation always has a strong fence\n            if (!m.q_tail.compare_exchange_strong(expected, this, std::memory_order_acq_rel))\n                return false;\n\n            m_mutex = &m;\n\n            call_itt_notify(acquired, &m);\n            return true;\n        }\n\n        //! Release lock.\n        void release()\n        {\n            __TBB_ASSERT(this->m_mutex, \"no lock acquired\");\n\n            call_itt_notify(releasing, this->m_mutex);\n\n            if (m_next.load(std::memory_order_relaxed) == nullptr) {\n                scoped_lock* expected = this;\n                if (m_mutex->q_tail.compare_exchange_strong(expected, nullptr)) {\n                    // this was the only item in the queue, and the queue is now empty.\n                    reset();\n                    return;\n                }\n                // Someone in the queue\n                spin_wait_while_eq(m_next, nullptr);\n            }\n            m_next.load(std::memory_order_acquire)->m_going.store(1U, std::memory_order_release);\n\n            reset();\n        }\n\n    private:\n        //! The pointer to the mutex owned, or nullptr if not holding a mutex.\n        queuing_mutex* m_mutex{nullptr};\n\n        //! The pointer to the next competitor for a mutex\n        std::atomic<scoped_lock*> m_next{nullptr};\n\n        //! The local spin-wait variable\n        /** Inverted (0 - blocked, 1 - acquired the mutex) for the sake of\n            zero-initialization.  Defining it as an entire word instead of\n            a byte seems to help performance slightly. */\n        std::atomic<uintptr_t> m_going{0U};\n    };\n\n    // Mutex traits\n    static constexpr bool is_rw_mutex = false;\n    static constexpr bool is_recursive_mutex = false;\n    static constexpr bool is_fair_mutex = true;\n\nprivate:\n    //! The last competitor requesting the lock\n    std::atomic<scoped_lock*> q_tail{nullptr};\n\n};\n\n#if TBB_USE_PROFILING_TOOLS\ninline void set_name(queuing_mutex& obj, const char* name) {\n    itt_set_sync_name(&obj, name);\n}\n#if (_WIN32||_WIN64)\ninline void set_name(queuing_mutex& obj, const wchar_t* name) {\n    itt_set_sync_name(&obj, name);\n}\n#endif //WIN\n#else\ninline void set_name(queuing_mutex&, const char*) {}\n#if (_WIN32||_WIN64)\ninline void set_name(queuing_mutex&, const wchar_t*) {}\n#endif //WIN\n#endif\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::queuing_mutex;\n} // namespace v1\nnamespace profiling {\n    using detail::d1::set_name;\n}\n} // namespace tbb\n\n#endif /* __TBB_queuing_mutex_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/queuing_rw_mutex.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_queuing_rw_mutex_H\n#define __TBB_queuing_rw_mutex_H\n\n#include \"detail/_config.h\"\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_assert.h\"\n#include \"detail/_mutex_common.h\"\n\n#include \"profiling.h\"\n\n#include <cstring>\n#include <atomic>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\nstruct queuing_rw_mutex_impl;\n}\nnamespace d1 {\n\n//! Queuing reader-writer mutex with local-only spinning.\n/** Adapted from Krieger, Stumm, et al. pseudocode at\n    https://www.researchgate.net/publication/221083709_A_Fair_Fast_Scalable_Reader-Writer_Lock\n    @ingroup synchronization */\nclass queuing_rw_mutex {\n    friend r1::queuing_rw_mutex_impl;\npublic:\n    //! Construct unacquired mutex.\n    queuing_rw_mutex() noexcept  {\n        create_itt_sync(this, \"tbb::queuing_rw_mutex\", \"\");\n    }\n\n    //! Destructor asserts if the mutex is acquired, i.e. q_tail is non-null\n    ~queuing_rw_mutex() {\n        __TBB_ASSERT(q_tail.load(std::memory_order_relaxed) == nullptr, \"destruction of an acquired mutex\");\n    }\n\n    //! No Copy\n    queuing_rw_mutex(const queuing_rw_mutex&) = delete;\n    queuing_rw_mutex& operator=(const queuing_rw_mutex&) = delete;\n\n    //! The scoped locking pattern\n    /** It helps to avoid the common problem of forgetting to release lock.\n        It also nicely provides the \"node\" for queuing locks. */\n    class scoped_lock {\n        friend r1::queuing_rw_mutex_impl;\n        //! Initialize fields to mean \"no lock held\".\n        void initialize() {\n            my_mutex = nullptr;\n            my_internal_lock.store(0, std::memory_order_relaxed);\n            my_going.store(0, std::memory_order_relaxed);\n#if TBB_USE_ASSERT\n            my_state = 0xFF; // Set to invalid state\n            my_next.store(reinterpret_cast<uintptr_t>(reinterpret_cast<void*>(-1)), std::memory_order_relaxed);\n            my_prev.store(reinterpret_cast<uintptr_t>(reinterpret_cast<void*>(-1)), std::memory_order_relaxed);\n#endif /* TBB_USE_ASSERT */\n        }\n\n    public:\n        //! Construct lock that has not acquired a mutex.\n        /** Equivalent to zero-initialization of *this. */\n        scoped_lock() {initialize();}\n\n        //! Acquire lock on given mutex.\n        scoped_lock( queuing_rw_mutex& m, bool write=true ) {\n            initialize();\n            acquire(m,write);\n        }\n\n        //! Release lock (if lock is held).\n        ~scoped_lock() {\n            if( my_mutex ) release();\n        }\n\n        //! No Copy\n        scoped_lock(const scoped_lock&) = delete;\n        scoped_lock& operator=(const scoped_lock&) = delete;\n\n        //! Acquire lock on given mutex.\n        void acquire( queuing_rw_mutex& m, bool write=true );\n\n        //! Acquire lock on given mutex if free (i.e. non-blocking)\n        bool try_acquire( queuing_rw_mutex& m, bool write=true );\n\n        //! Release lock.\n        void release();\n\n        //! Upgrade reader to become a writer.\n        /** Returns whether the upgrade happened without releasing and re-acquiring the lock */\n        bool upgrade_to_writer();\n\n        //! Downgrade writer to become a reader.\n        bool downgrade_to_reader();\n\n        bool is_writer() const;\n\n    private:\n        //! The pointer to the mutex owned, or nullptr if not holding a mutex.\n        queuing_rw_mutex* my_mutex;\n\n        //! The 'pointer' to the previous and next competitors for a mutex\n        std::atomic<uintptr_t> my_prev;\n        std::atomic<uintptr_t> my_next;\n\n        using state_t = unsigned char ;\n\n        //! State of the request: reader, writer, active reader, other service states\n        std::atomic<state_t> my_state;\n\n        //! The local spin-wait variable\n        /** Corresponds to \"spin\" in the pseudocode but inverted for the sake of zero-initialization */\n        std::atomic<unsigned char> my_going;\n\n        //! A tiny internal lock\n        std::atomic<unsigned char> my_internal_lock;\n    };\n\n    // Mutex traits\n    static constexpr bool is_rw_mutex = true;\n    static constexpr bool is_recursive_mutex = false;\n    static constexpr bool is_fair_mutex = true;\n\nprivate:\n    //! The last competitor requesting the lock\n    std::atomic<scoped_lock*> q_tail{nullptr};\n};\n#if TBB_USE_PROFILING_TOOLS\ninline void set_name(queuing_rw_mutex& obj, const char* name) {\n    itt_set_sync_name(&obj, name);\n}\n#if (_WIN32||_WIN64)\ninline void set_name(queuing_rw_mutex& obj, const wchar_t* name) {\n    itt_set_sync_name(&obj, name);\n}\n#endif //WIN\n#else\ninline void set_name(queuing_rw_mutex&, const char*) {}\n#if (_WIN32||_WIN64)\ninline void set_name(queuing_rw_mutex&, const wchar_t*) {}\n#endif //WIN\n#endif\n} // namespace d1\n\nnamespace r1 {\nTBB_EXPORT void acquire(d1::queuing_rw_mutex&, d1::queuing_rw_mutex::scoped_lock&, bool);\nTBB_EXPORT bool try_acquire(d1::queuing_rw_mutex&, d1::queuing_rw_mutex::scoped_lock&, bool);\nTBB_EXPORT void release(d1::queuing_rw_mutex::scoped_lock&);\nTBB_EXPORT bool upgrade_to_writer(d1::queuing_rw_mutex::scoped_lock&);\nTBB_EXPORT bool downgrade_to_reader(d1::queuing_rw_mutex::scoped_lock&);\nTBB_EXPORT bool is_writer(const d1::queuing_rw_mutex::scoped_lock&);\n} // namespace r1\n\nnamespace d1 {\n\n\ninline void queuing_rw_mutex::scoped_lock::acquire(queuing_rw_mutex& m,bool write) {\n    r1::acquire(m, *this, write);\n}\n\ninline bool queuing_rw_mutex::scoped_lock::try_acquire(queuing_rw_mutex& m, bool write) {\n    return r1::try_acquire(m, *this, write);\n}\n\ninline void queuing_rw_mutex::scoped_lock::release() {\n    r1::release(*this);\n}\n\ninline bool queuing_rw_mutex::scoped_lock::upgrade_to_writer() {\n    return r1::upgrade_to_writer(*this);\n}\n\ninline bool queuing_rw_mutex::scoped_lock::downgrade_to_reader() {\n    return r1::downgrade_to_reader(*this);\n}\n\ninline bool queuing_rw_mutex::scoped_lock::is_writer() const {\n    return r1::is_writer(*this);\n}\n} // namespace d1\n\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::queuing_rw_mutex;\n} // namespace v1\nnamespace profiling {\n    using detail::d1::set_name;\n}\n} // namespace tbb\n\n#endif /* __TBB_queuing_rw_mutex_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/rw_mutex.h",
    "content": "/*\n    Copyright (c) 2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_rw_mutex_H\n#define __TBB_rw_mutex_H\n\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_utils.h\"\n#include \"detail/_waitable_atomic.h\"\n#include \"detail/_scoped_lock.h\"\n#include \"detail/_mutex_common.h\"\n#include \"profiling.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\nclass rw_mutex {\npublic:\n    //! Constructors\n    rw_mutex() noexcept : m_state(0) {\n       create_itt_sync(this, \"tbb::rw_mutex\", \"\");\n    }\n\n    //! Destructor\n    ~rw_mutex() {\n        __TBB_ASSERT(!m_state.load(std::memory_order_relaxed), \"destruction of an acquired mutex\");\n    }\n\n    //! No Copy\n    rw_mutex(const rw_mutex&) = delete;\n    rw_mutex& operator=(const rw_mutex&) = delete;\n\n    using scoped_lock = rw_scoped_lock<rw_mutex>;\n\n    //! Mutex traits\n    static constexpr bool is_rw_mutex = true;\n    static constexpr bool is_recursive_mutex = false;\n    static constexpr bool is_fair_mutex = false;\n\n    //! Acquire lock\n    void lock() {\n        call_itt_notify(prepare, this);\n        while (!try_lock()) {\n            if (!(m_state.load(std::memory_order_relaxed) & WRITER_PENDING)) { // no pending writers\n                m_state |= WRITER_PENDING;\n            }\n\n            auto wakeup_condition = [&] { return !(m_state.load(std::memory_order_relaxed) & BUSY); };\n            adaptive_wait_on_address(this, wakeup_condition, WRITER_CONTEXT);\n        }\n\n        call_itt_notify(acquired, this);\n    }\n\n    //! Try acquiring lock (non-blocking)\n    /** Return true if lock acquired; false otherwise. */\n    bool try_lock() {\n        // for a writer: only possible to acquire if no active readers or writers\n        // Use relaxed memory fence is OK here because\n        // Acquire memory fence guaranteed by compare_exchange_strong()\n        state_type s = m_state.load(std::memory_order_relaxed);\n        if (!(s & BUSY)) { // no readers, no writers; mask is 1..1101\n            if (m_state.compare_exchange_strong(s, WRITER)) {\n                call_itt_notify(acquired, this);\n                return true; // successfully stored writer flag\n            }\n        }\n        return false;\n    }\n\n    //! Release lock\n    void unlock() {\n        call_itt_notify(releasing, this);\n        state_type curr_state = (m_state &= READERS | WRITER_PENDING); // Returns current state\n\n        if (curr_state & WRITER_PENDING) {\n            r1::notify_by_address(this, WRITER_CONTEXT);\n        } else {\n            // It's possible that WRITER sleeps without WRITER_PENDING,\n            // because other thread might clear this bit at upgrade()\n            r1::notify_by_address_all(this);\n        }\n    }\n\n    //! Lock shared ownership mutex\n    void lock_shared() {\n        call_itt_notify(prepare, this);\n        while (!try_lock_shared()) {\n            state_type has_writer = WRITER | WRITER_PENDING;\n            auto wakeup_condition = [&] { return !(m_state.load(std::memory_order_relaxed) & has_writer); };\n            adaptive_wait_on_address(this, wakeup_condition, READER_CONTEXT);\n        }\n        __TBB_ASSERT(m_state.load(std::memory_order_relaxed) & READERS, \"invalid state of a read lock: no readers\");\n    }\n\n    //! Try lock shared ownership mutex\n    bool try_lock_shared() {\n        // for a reader: acquire if no active or waiting writers\n        // Use relaxed memory fence is OK here because\n        // Acquire memory fence guaranteed by fetch_add()\n        state_type has_writer = WRITER | WRITER_PENDING;\n        if (!(m_state.load(std::memory_order_relaxed) & has_writer)) {\n            if (m_state.fetch_add(ONE_READER) & has_writer) {\n                m_state -= ONE_READER;\n                r1::notify_by_address(this, WRITER_CONTEXT);\n            } else {\n                call_itt_notify(acquired, this);\n                return true; // successfully stored increased number of readers\n            }\n        }\n        return false;\n    }\n\n    //! Unlock shared ownership mutex\n    void unlock_shared() {\n        __TBB_ASSERT(m_state.load(std::memory_order_relaxed) & READERS, \"invalid state of a read lock: no readers\");\n        call_itt_notify(releasing, this);\n\n        state_type curr_state = (m_state -= ONE_READER); // Returns current state\n\n        if (curr_state & (WRITER_PENDING)) {\n            r1::notify_by_address(this, WRITER_CONTEXT);\n        } else {\n            // It's possible that WRITER sleeps without WRITER_PENDING,\n            // because other thread might clear this bit at upgrade()\n            r1::notify_by_address_all(this);\n        }\n    }\n\nprivate:\n    /** Internal non ISO C++ standard API **/\n    //! This API is used through the scoped_lock class\n\n    //! Upgrade reader to become a writer.\n    /** Returns whether the upgrade happened without releasing and re-acquiring the lock */\n    bool upgrade() {\n        state_type s = m_state.load(std::memory_order_relaxed);\n        __TBB_ASSERT(s & READERS, \"invalid state before upgrade: no readers \");\n        // Check and set writer-pending flag.\n        // Required conditions: either no pending writers, or we are the only reader\n        // (with multiple readers and pending writer, another upgrade could have been requested)\n        while ((s & READERS) == ONE_READER || !(s & WRITER_PENDING)) {\n            if (m_state.compare_exchange_strong(s, s | WRITER | WRITER_PENDING)) {\n                auto wakeup_condition = [&] { return (m_state.load(std::memory_order_relaxed) & READERS) == ONE_READER; };\n                while ((m_state.load(std::memory_order_relaxed) & READERS) != ONE_READER) {\n                    adaptive_wait_on_address(this, wakeup_condition, WRITER_CONTEXT);\n                }\n\n                __TBB_ASSERT((m_state.load(std::memory_order_relaxed) & (WRITER_PENDING|WRITER)) == (WRITER_PENDING | WRITER),\n                             \"invalid state when upgrading to writer\");\n                // Both new readers and writers are blocked at this time\n                m_state -= (ONE_READER + WRITER_PENDING);\n                return true; // successfully upgraded\n            }\n        }\n        // Slow reacquire\n        unlock_shared();\n        lock();\n        return false;\n    }\n\n    //! Downgrade writer to a reader\n    void downgrade() {\n        __TBB_ASSERT(m_state.load(std::memory_order_relaxed) & WRITER, nullptr),\n        call_itt_notify(releasing, this);\n        m_state += (ONE_READER - WRITER);\n\n        if (!(m_state & WRITER_PENDING)) {\n            r1::notify_by_address(this, READER_CONTEXT);\n        }\n\n        __TBB_ASSERT(m_state.load(std::memory_order_relaxed) & READERS, \"invalid state after downgrade: no readers\");\n    }\n\n    using state_type = std::intptr_t;\n    static constexpr state_type WRITER = 1;\n    static constexpr state_type WRITER_PENDING = 2;\n    static constexpr state_type READERS = ~(WRITER | WRITER_PENDING);\n    static constexpr state_type ONE_READER = 4;\n    static constexpr state_type BUSY = WRITER | READERS;\n\n    using context_type = std::uintptr_t;\n    static constexpr context_type WRITER_CONTEXT = 0;\n    static constexpr context_type READER_CONTEXT = 1;\n    friend scoped_lock;\n    //! State of lock\n    /** Bit 0 = writer is holding lock\n        Bit 1 = request by a writer to acquire lock (hint to readers to wait)\n        Bit 2..N = number of readers holding lock */\n    std::atomic<state_type> m_state;\n}; // class rw_mutex\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::rw_mutex;\n} // namespace v1\n\n} // namespace tbb\n\n#endif // __TBB_rw_mutex_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/scalable_allocator.h",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_scalable_allocator_H\n#define __TBB_scalable_allocator_H\n\n#ifdef __cplusplus\n#include \"oneapi/tbb/detail/_config.h\"\n#include \"oneapi/tbb/detail/_utils.h\"\n#include \"oneapi/tbb/detail/_namespace_injection.h\"\n#include <cstdlib>\n#include <utility>\n#include <new> /* std::bad_alloc() */\n#else\n#include \"oneapi/tbb/detail/_export.h\"\n#include <stddef.h> /* Need ptrdiff_t and size_t from here. */\n#if !defined(_MSC_VER) || defined(__clang__)\n#include <stdint.h> /* Need intptr_t from here. */\n#endif\n#endif\n\n#if __TBB_CPP17_MEMORY_RESOURCE_PRESENT\n#include <memory_resource>\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n#if _MSC_VER\n    #define __TBB_EXPORTED_FUNC __cdecl\n#else\n    #define __TBB_EXPORTED_FUNC\n#endif\n\n/** The \"malloc\" analogue to allocate block of memory of size bytes.\n  * @ingroup memory_allocation */\nTBBMALLOC_EXPORT void* __TBB_EXPORTED_FUNC scalable_malloc(size_t size);\n\n/** The \"free\" analogue to discard a previously allocated piece of memory.\n    @ingroup memory_allocation */\nTBBMALLOC_EXPORT void   __TBB_EXPORTED_FUNC scalable_free(void* ptr);\n\n/** The \"realloc\" analogue complementing scalable_malloc.\n    @ingroup memory_allocation */\nTBBMALLOC_EXPORT void* __TBB_EXPORTED_FUNC scalable_realloc(void* ptr, size_t size);\n\n/** The \"calloc\" analogue complementing scalable_malloc.\n    @ingroup memory_allocation */\nTBBMALLOC_EXPORT void* __TBB_EXPORTED_FUNC scalable_calloc(size_t nobj, size_t size);\n\n/** The \"posix_memalign\" analogue.\n    @ingroup memory_allocation */\nTBBMALLOC_EXPORT int __TBB_EXPORTED_FUNC scalable_posix_memalign(void** memptr, size_t alignment, size_t size);\n\n/** The \"_aligned_malloc\" analogue.\n    @ingroup memory_allocation */\nTBBMALLOC_EXPORT void* __TBB_EXPORTED_FUNC scalable_aligned_malloc(size_t size, size_t alignment);\n\n/** The \"_aligned_realloc\" analogue.\n    @ingroup memory_allocation */\nTBBMALLOC_EXPORT void* __TBB_EXPORTED_FUNC scalable_aligned_realloc(void* ptr, size_t size, size_t alignment);\n\n/** The \"_aligned_free\" analogue.\n    @ingroup memory_allocation */\nTBBMALLOC_EXPORT void __TBB_EXPORTED_FUNC scalable_aligned_free(void* ptr);\n\n/** The analogue of _msize/malloc_size/malloc_usable_size.\n    Returns the usable size of a memory block previously allocated by scalable_*,\n    or 0 (zero) if ptr does not point to such a block.\n    @ingroup memory_allocation */\nTBBMALLOC_EXPORT size_t __TBB_EXPORTED_FUNC scalable_msize(void* ptr);\n\n/* Results for scalable_allocation_* functions */\ntypedef enum {\n    TBBMALLOC_OK,\n    TBBMALLOC_INVALID_PARAM,\n    TBBMALLOC_UNSUPPORTED,\n    TBBMALLOC_NO_MEMORY,\n    TBBMALLOC_NO_EFFECT\n} ScalableAllocationResult;\n\n/* Setting TBB_MALLOC_USE_HUGE_PAGES environment variable to 1 enables huge pages.\n   scalable_allocation_mode call has priority over environment variable. */\ntypedef enum {\n    TBBMALLOC_USE_HUGE_PAGES,  /* value turns using huge pages on and off */\n    /* deprecated, kept for backward compatibility only */\n    USE_HUGE_PAGES = TBBMALLOC_USE_HUGE_PAGES,\n    /* try to limit memory consumption value (Bytes), clean internal buffers\n       if limit is exceeded, but not prevents from requesting memory from OS */\n    TBBMALLOC_SET_SOFT_HEAP_LIMIT,\n    /* Lower bound for the size (Bytes), that is interpreted as huge\n     * and not released during regular cleanup operations. */\n    TBBMALLOC_SET_HUGE_SIZE_THRESHOLD\n} AllocationModeParam;\n\n/** Set TBB allocator-specific allocation modes.\n    @ingroup memory_allocation */\nTBBMALLOC_EXPORT int __TBB_EXPORTED_FUNC scalable_allocation_mode(int param, intptr_t value);\n\ntypedef enum {\n    /* Clean internal allocator buffers for all threads.\n       Returns TBBMALLOC_NO_EFFECT if no buffers cleaned,\n       TBBMALLOC_OK if some memory released from buffers. */\n    TBBMALLOC_CLEAN_ALL_BUFFERS,\n    /* Clean internal allocator buffer for current thread only.\n       Return values same as for TBBMALLOC_CLEAN_ALL_BUFFERS. */\n    TBBMALLOC_CLEAN_THREAD_BUFFERS\n} ScalableAllocationCmd;\n\n/** Call TBB allocator-specific commands.\n    @ingroup memory_allocation */\nTBBMALLOC_EXPORT int __TBB_EXPORTED_FUNC scalable_allocation_command(int cmd, void *param);\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif /* __cplusplus */\n\n#ifdef __cplusplus\n\n//! The namespace rml contains components of low-level memory pool interface.\nnamespace rml {\nclass MemoryPool;\n\ntypedef void *(*rawAllocType)(std::intptr_t pool_id, std::size_t &bytes);\n// returns non-zero in case of error\ntypedef int   (*rawFreeType)(std::intptr_t pool_id, void* raw_ptr, std::size_t raw_bytes);\n\nstruct MemPoolPolicy {\n    enum {\n        TBBMALLOC_POOL_VERSION = 1\n    };\n\n    rawAllocType pAlloc;\n    rawFreeType  pFree;\n                 // granularity of pAlloc allocations. 0 means default used.\n    std::size_t  granularity;\n    int          version;\n                 // all memory consumed at 1st pAlloc call and never returned,\n                 // no more pAlloc calls after 1st\n    unsigned     fixedPool : 1,\n                 // memory consumed but returned only at pool termination\n                 keepAllMemory : 1,\n                 reserved : 30;\n\n    MemPoolPolicy(rawAllocType pAlloc_, rawFreeType pFree_,\n                  std::size_t granularity_ = 0, bool fixedPool_ = false,\n                  bool keepAllMemory_ = false) :\n        pAlloc(pAlloc_), pFree(pFree_), granularity(granularity_), version(TBBMALLOC_POOL_VERSION),\n        fixedPool(fixedPool_), keepAllMemory(keepAllMemory_),\n        reserved(0) {}\n};\n\n// enums have same values as appropriate enums from ScalableAllocationResult\n// TODO: use ScalableAllocationResult in pool_create directly\nenum MemPoolError {\n    // pool created successfully\n    POOL_OK = TBBMALLOC_OK,\n    // invalid policy parameters found\n    INVALID_POLICY = TBBMALLOC_INVALID_PARAM,\n     // requested pool policy is not supported by allocator library\n    UNSUPPORTED_POLICY = TBBMALLOC_UNSUPPORTED,\n    // lack of memory during pool creation\n    NO_MEMORY = TBBMALLOC_NO_MEMORY,\n    // action takes no effect\n    NO_EFFECT = TBBMALLOC_NO_EFFECT\n};\n\nTBBMALLOC_EXPORT MemPoolError pool_create_v1(std::intptr_t pool_id, const MemPoolPolicy *policy,\n                            rml::MemoryPool **pool);\n\nTBBMALLOC_EXPORT bool  pool_destroy(MemoryPool* memPool);\nTBBMALLOC_EXPORT void *pool_malloc(MemoryPool* memPool, std::size_t size);\nTBBMALLOC_EXPORT void *pool_realloc(MemoryPool* memPool, void *object, std::size_t size);\nTBBMALLOC_EXPORT void *pool_aligned_malloc(MemoryPool* mPool, std::size_t size, std::size_t alignment);\nTBBMALLOC_EXPORT void *pool_aligned_realloc(MemoryPool* mPool, void *ptr, std::size_t size, std::size_t alignment);\nTBBMALLOC_EXPORT bool  pool_reset(MemoryPool* memPool);\nTBBMALLOC_EXPORT bool  pool_free(MemoryPool *memPool, void *object);\nTBBMALLOC_EXPORT MemoryPool *pool_identify(void *object);\nTBBMALLOC_EXPORT std::size_t pool_msize(MemoryPool *memPool, void *object);\n\n} // namespace rml\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n// keep throw in a separate function to prevent code bloat\ntemplate<typename E>\nvoid throw_exception(const E &e) {\n#if TBB_USE_EXCEPTIONS\n    throw e;\n#else\n    suppress_unused_warning(e);\n#endif\n}\n\ntemplate<typename T>\nclass scalable_allocator {\npublic:\n    using value_type = T;\n    using propagate_on_container_move_assignment = std::true_type;\n\n    //! Always defined for TBB containers\n    using is_always_equal = std::true_type;\n\n    scalable_allocator() = default;\n    template<typename U> scalable_allocator(const scalable_allocator<U>&) noexcept {}\n\n    //! Allocate space for n objects.\n    __TBB_nodiscard T* allocate(std::size_t n) {\n        T* p = static_cast<T*>(scalable_malloc(n * sizeof(value_type)));\n        if (!p) {\n            throw_exception(std::bad_alloc());\n        }\n        return p;\n    }\n\n    //! Free previously allocated block of memory\n    void deallocate(T* p, std::size_t) {\n        scalable_free(p);\n    }\n\n#if TBB_ALLOCATOR_TRAITS_BROKEN\n    using pointer = value_type*;\n    using const_pointer = const value_type*;\n    using reference = value_type&;\n    using const_reference = const value_type&;\n    using difference_type = std::ptrdiff_t;\n    using size_type = std::size_t;\n    template<typename U> struct rebind {\n        using other = scalable_allocator<U>;\n    };\n    //! Largest value for which method allocate might succeed.\n    size_type max_size() const noexcept {\n        size_type absolutemax = static_cast<size_type>(-1) / sizeof (value_type);\n        return (absolutemax > 0 ? absolutemax : 1);\n    }\n    template<typename U, typename... Args>\n    void construct(U *p, Args&&... args)\n        { ::new((void *)p) U(std::forward<Args>(args)...); }\n    void destroy(pointer p) { p->~value_type(); }\n    pointer address(reference x) const { return &x; }\n    const_pointer address(const_reference x) const { return &x; }\n#endif // TBB_ALLOCATOR_TRAITS_BROKEN\n\n};\n\n#if TBB_ALLOCATOR_TRAITS_BROKEN\n    template<>\n    class scalable_allocator<void> {\n    public:\n        using pointer = void*;\n        using const_pointer = const void*;\n        using value_type = void;\n        template<typename U> struct rebind {\n            using other = scalable_allocator<U>;\n        };\n    };\n#endif\n\ntemplate<typename T, typename U>\ninline bool operator==(const scalable_allocator<T>&, const scalable_allocator<U>&) noexcept { return true; }\n\n#if !__TBB_CPP20_COMPARISONS_PRESENT\ntemplate<typename T, typename U>\ninline bool operator!=(const scalable_allocator<T>&, const scalable_allocator<U>&) noexcept { return false; }\n#endif\n\n#if __TBB_CPP17_MEMORY_RESOURCE_PRESENT\n\n//! C++17 memory resource implementation for scalable allocator\n//! ISO C++ Section 23.12.2\nclass scalable_resource_impl : public std::pmr::memory_resource {\nprivate:\n    void* do_allocate(std::size_t bytes, std::size_t alignment) override {\n        void* p = scalable_aligned_malloc(bytes, alignment);\n        if (!p) {\n            throw_exception(std::bad_alloc());\n        }\n        return p;\n    }\n\n    void do_deallocate(void* ptr, std::size_t /*bytes*/, std::size_t /*alignment*/) override {\n        scalable_free(ptr);\n    }\n\n    //! Memory allocated by one instance of scalable_resource_impl could be deallocated by any\n    //! other instance of this class\n    bool do_is_equal(const std::pmr::memory_resource& other) const noexcept override {\n        return this == &other ||\n#if __TBB_USE_OPTIONAL_RTTI\n            dynamic_cast<const scalable_resource_impl*>(&other) != nullptr;\n#else\n            false;\n#endif\n    }\n};\n\n//! Global scalable allocator memory resource provider\ninline std::pmr::memory_resource* scalable_memory_resource() noexcept {\n    static tbb::detail::d1::scalable_resource_impl scalable_res;\n    return &scalable_res;\n}\n\n#endif // __TBB_CPP17_MEMORY_RESOURCE_PRESENT\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::scalable_allocator;\n#if __TBB_CPP17_MEMORY_RESOURCE_PRESENT\nusing detail::d1::scalable_memory_resource;\n#endif\n} // namespace v1\n\n} // namespace tbb\n\n#endif /* __cplusplus */\n\n#endif /* __TBB_scalable_allocator_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/spin_mutex.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_spin_mutex_H\n#define __TBB_spin_mutex_H\n\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_mutex_common.h\"\n\n#include \"profiling.h\"\n\n#include \"detail/_assert.h\"\n#include \"detail/_utils.h\"\n#include \"detail/_scoped_lock.h\"\n\n#include <atomic>\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n#if __TBB_TSX_INTRINSICS_PRESENT\nclass rtm_mutex;\n#endif\n\n/** A spin_mutex is a low-level synchronization primitive.\n    While locked, it causes the waiting threads to spin in a loop until the lock is released.\n    It should be used only for locking short critical sections\n    (typically less than 20 instructions) when fairness is not an issue.\n    If zero-initialized, the mutex is considered unheld.\n    @ingroup synchronization */\nclass spin_mutex {\npublic:\n    //! Constructors\n    spin_mutex() noexcept : m_flag(false) {\n        create_itt_sync(this, \"tbb::spin_mutex\", \"\");\n    };\n\n    //! Destructor\n    ~spin_mutex() = default;\n\n    //! No Copy\n    spin_mutex(const spin_mutex&) = delete;\n    spin_mutex& operator=(const spin_mutex&) = delete;\n\n    using scoped_lock = unique_scoped_lock<spin_mutex>;\n\n    //! Mutex traits\n    static constexpr bool is_rw_mutex = false;\n    static constexpr bool is_recursive_mutex = false;\n    static constexpr bool is_fair_mutex = false;\n\n    //! Acquire lock\n    /** Spin if the lock is taken */\n    void lock() {\n        atomic_backoff backoff;\n        call_itt_notify(prepare, this);\n        while (m_flag.exchange(true)) backoff.pause();\n        call_itt_notify(acquired, this);\n    }\n\n    //! Try acquiring lock (non-blocking)\n    /** Return true if lock acquired; false otherwise. */\n    bool try_lock() {\n        bool result = !m_flag.exchange(true);\n        if (result) {\n            call_itt_notify(acquired, this);\n        }\n        return result;\n    }\n\n    //! Release lock\n    void unlock() {\n        call_itt_notify(releasing, this);\n        m_flag.store(false, std::memory_order_release);\n    }\n\nprotected:\n    std::atomic<bool> m_flag;\n}; // class spin_mutex\n\n#if TBB_USE_PROFILING_TOOLS\ninline void set_name(spin_mutex& obj, const char* name) {\n    itt_set_sync_name(&obj, name);\n}\n#if (_WIN32||_WIN64)\ninline void set_name(spin_mutex& obj, const wchar_t* name) {\n    itt_set_sync_name(&obj, name);\n}\n#endif //WIN\n#else\ninline void set_name(spin_mutex&, const char*) {}\n#if (_WIN32||_WIN64)\ninline void set_name(spin_mutex&, const wchar_t*) {}\n#endif // WIN\n#endif\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::spin_mutex;\n} // namespace v1\nnamespace profiling {\n    using detail::d1::set_name;\n}\n} // namespace tbb\n\n#include \"detail/_rtm_mutex.h\"\n\nnamespace tbb {\ninline namespace v1 {\n#if __TBB_TSX_INTRINSICS_PRESENT\n    using speculative_spin_mutex = detail::d1::rtm_mutex;\n#else\n    using speculative_spin_mutex = detail::d1::spin_mutex;\n#endif\n}\n}\n\n#endif /* __TBB_spin_mutex_H */\n\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/spin_rw_mutex.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_spin_rw_mutex_H\n#define __TBB_spin_rw_mutex_H\n\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_mutex_common.h\"\n\n#include \"profiling.h\"\n\n#include \"detail/_assert.h\"\n#include \"detail/_utils.h\"\n#include \"detail/_scoped_lock.h\"\n\n#include <atomic>\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n#if __TBB_TSX_INTRINSICS_PRESENT\nclass rtm_rw_mutex;\n#endif\n\n//! Fast, unfair, spinning reader-writer lock with backoff and writer-preference\n/** @ingroup synchronization */\nclass spin_rw_mutex {\npublic:\n    //! Constructors\n    spin_rw_mutex() noexcept : m_state(0) {\n       create_itt_sync(this, \"tbb::spin_rw_mutex\", \"\");\n    }\n\n    //! Destructor\n    ~spin_rw_mutex() {\n        __TBB_ASSERT(!m_state, \"destruction of an acquired mutex\");\n    }\n\n    //! No Copy\n    spin_rw_mutex(const spin_rw_mutex&) = delete;\n    spin_rw_mutex& operator=(const spin_rw_mutex&) = delete;\n\n    using scoped_lock = rw_scoped_lock<spin_rw_mutex>;\n\n    //! Mutex traits\n    static constexpr bool is_rw_mutex = true;\n    static constexpr bool is_recursive_mutex = false;\n    static constexpr bool is_fair_mutex = false;\n\n    //! Acquire lock\n    void lock() {\n        call_itt_notify(prepare, this);\n        for (atomic_backoff backoff; ; backoff.pause()) {\n            state_type s = m_state.load(std::memory_order_relaxed);\n            if (!(s & BUSY)) { // no readers, no writers\n                if (m_state.compare_exchange_strong(s, WRITER))\n                    break; // successfully stored writer flag\n                backoff.reset(); // we could be very close to complete op.\n            } else if (!(s & WRITER_PENDING)) { // no pending writers\n                m_state |= WRITER_PENDING;\n            }\n        }\n        call_itt_notify(acquired, this);\n    }\n\n    //! Try acquiring lock (non-blocking)\n    /** Return true if lock acquired; false otherwise. */\n    bool try_lock() {\n        // for a writer: only possible to acquire if no active readers or writers\n        state_type s = m_state.load(std::memory_order_relaxed);\n        if (!(s & BUSY)) { // no readers, no writers; mask is 1..1101\n            if (m_state.compare_exchange_strong(s, WRITER)) {\n                call_itt_notify(acquired, this);\n                return true; // successfully stored writer flag\n            }\n        }\n        return false;\n    }\n\n    //! Release lock\n    void unlock() {\n        call_itt_notify(releasing, this);\n        m_state &= READERS;\n    }\n\n    //! Lock shared ownership mutex\n    void lock_shared() {\n        call_itt_notify(prepare, this);\n        for (atomic_backoff b; ; b.pause()) {\n            state_type s = m_state.load(std::memory_order_relaxed);\n            if (!(s & (WRITER | WRITER_PENDING))) { // no writer or write requests\n                state_type prev_state = m_state.fetch_add(ONE_READER);\n                if (!(prev_state & WRITER)) {\n                    break; // successfully stored increased number of readers\n                }\n                // writer got there first, undo the increment\n                m_state -= ONE_READER;\n            }\n        }\n        call_itt_notify(acquired, this);\n        __TBB_ASSERT(m_state & READERS, \"invalid state of a read lock: no readers\");\n    }\n\n    //! Try lock shared ownership mutex\n    bool try_lock_shared() {\n        // for a reader: acquire if no active or waiting writers\n        state_type s = m_state.load(std::memory_order_relaxed);\n        if (!(s & (WRITER | WRITER_PENDING))) { // no writers\n            state_type prev_state = m_state.fetch_add(ONE_READER);\n            if (!(prev_state & WRITER)) {  // got the lock\n                call_itt_notify(acquired, this);\n                return true; // successfully stored increased number of readers\n            }\n            // writer got there first, undo the increment\n            m_state -= ONE_READER;\n        }\n        return false;\n    }\n\n    //! Unlock shared ownership mutex\n    void unlock_shared() {\n        __TBB_ASSERT(m_state & READERS, \"invalid state of a read lock: no readers\");\n        call_itt_notify(releasing, this);\n        m_state -= ONE_READER;\n    }\n\nprotected:\n    /** Internal non ISO C++ standard API **/\n    //! This API is used through the scoped_lock class\n\n    //! Upgrade reader to become a writer.\n    /** Returns whether the upgrade happened without releasing and re-acquiring the lock */\n    bool upgrade() {\n        state_type s = m_state.load(std::memory_order_relaxed);\n        __TBB_ASSERT(s & READERS, \"invalid state before upgrade: no readers \");\n        // Check and set writer-pending flag.\n        // Required conditions: either no pending writers, or we are the only reader\n        // (with multiple readers and pending writer, another upgrade could have been requested)\n        while ((s & READERS) == ONE_READER || !(s & WRITER_PENDING)) {\n            if (m_state.compare_exchange_strong(s, s | WRITER | WRITER_PENDING)) {\n                atomic_backoff backoff;\n                while ((m_state.load(std::memory_order_relaxed) & READERS) != ONE_READER) backoff.pause();\n                __TBB_ASSERT((m_state & (WRITER_PENDING|WRITER)) == (WRITER_PENDING | WRITER), \"invalid state when upgrading to writer\");\n                // Both new readers and writers are blocked at this time\n                m_state -= (ONE_READER + WRITER_PENDING);\n                return true; // successfully upgraded\n            }\n        }\n        // Slow reacquire\n        unlock_shared();\n        lock();\n        return false;\n    }\n\n    //! Downgrade writer to a reader\n    void downgrade() {\n        call_itt_notify(releasing, this);\n        m_state += (ONE_READER - WRITER);\n        __TBB_ASSERT(m_state & READERS, \"invalid state after downgrade: no readers\");\n    }\n\n    using state_type = std::intptr_t;\n    static constexpr state_type WRITER = 1;\n    static constexpr state_type WRITER_PENDING = 2;\n    static constexpr state_type READERS = ~(WRITER | WRITER_PENDING);\n    static constexpr state_type ONE_READER = 4;\n    static constexpr state_type BUSY = WRITER | READERS;\n    friend scoped_lock;\n    //! State of lock\n    /** Bit 0 = writer is holding lock\n        Bit 1 = request by a writer to acquire lock (hint to readers to wait)\n        Bit 2..N = number of readers holding lock */\n    std::atomic<state_type> m_state;\n}; // class spin_rw_mutex\n\n#if TBB_USE_PROFILING_TOOLS\ninline void set_name(spin_rw_mutex& obj, const char* name) {\n    itt_set_sync_name(&obj, name);\n}\n#if (_WIN32||_WIN64)\ninline void set_name(spin_rw_mutex& obj, const wchar_t* name) {\n    itt_set_sync_name(&obj, name);\n}\n#endif // WIN\n#else\ninline void set_name(spin_rw_mutex&, const char*) {}\n#if (_WIN32||_WIN64)\ninline void set_name(spin_rw_mutex&, const wchar_t*) {}\n#endif // WIN\n#endif\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::spin_rw_mutex;\n} // namespace v1\nnamespace profiling {\n    using detail::d1::set_name;\n}\n} // namespace tbb\n\n#include \"detail/_rtm_rw_mutex.h\"\n\nnamespace tbb {\ninline namespace v1 {\n#if __TBB_TSX_INTRINSICS_PRESENT\n    using speculative_spin_rw_mutex = detail::d1::rtm_rw_mutex;\n#else\n    using speculative_spin_rw_mutex = detail::d1::spin_rw_mutex;\n#endif\n}\n}\n\n#endif /* __TBB_spin_rw_mutex_H */\n\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/task.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_task_H\n#define __TBB_task_H\n\n#include \"detail/_config.h\"\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_task.h\"\n\nnamespace tbb {\ninline namespace v1 {\nnamespace task {\n#if __TBB_RESUMABLE_TASKS\n    using detail::d1::suspend_point;\n    using detail::d1::resume;\n    using detail::d1::suspend;\n#endif /* __TBB_RESUMABLE_TASKS */\n    using detail::d1::current_context;\n} // namespace task\n} // namespace v1\n} // namespace tbb\n\n#endif /* __TBB_task_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/task_arena.h",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_task_arena_H\n#define __TBB_task_arena_H\n\n#include \"detail/_config.h\"\n\n#include \"detail/_aligned_space.h\"\n#include \"detail/_attach.h\"\n#include \"detail/_exception.h\"\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_small_object_pool.h\"\n#include \"detail/_task.h\"\n\n#include \"detail/_task_handle.h\"\n\n#if __TBB_ARENA_BINDING\n#include \"info.h\"\n#endif /*__TBB_ARENA_BINDING*/\n\nnamespace tbb {\nnamespace detail {\n\nnamespace d1 {\n\ntemplate<typename F, typename R>\nclass task_arena_function : public delegate_base {\n    F &my_func;\n    aligned_space<R> my_return_storage;\n    bool my_constructed{false};\n    // The function should be called only once.\n    bool operator()() const override {\n        new (my_return_storage.begin()) R(my_func());\n        return true;\n    }\npublic:\n    task_arena_function(F& f) : my_func(f) {}\n    // The function can be called only after operator() and only once.\n    R consume_result() {\n        my_constructed = true;\n        return std::move(*(my_return_storage.begin()));\n    }\n    ~task_arena_function() override {\n        if (my_constructed) {\n            my_return_storage.begin()->~R();\n        }\n    }\n};\n\ntemplate<typename F>\nclass task_arena_function<F,void> : public delegate_base {\n    F &my_func;\n    bool operator()() const override {\n        my_func();\n        return true;\n    }\npublic:\n    task_arena_function(F& f) : my_func(f) {}\n    void consume_result() const {}\n\n    friend class task_arena_base;\n};\n\nclass task_arena_base;\nclass task_scheduler_observer;\n} // namespace d1\n\nnamespace r1 {\nclass arena;\nstruct task_arena_impl;\n\nTBB_EXPORT void __TBB_EXPORTED_FUNC observe(d1::task_scheduler_observer&, bool);\nTBB_EXPORT void __TBB_EXPORTED_FUNC initialize(d1::task_arena_base&);\nTBB_EXPORT void __TBB_EXPORTED_FUNC terminate(d1::task_arena_base&);\nTBB_EXPORT bool __TBB_EXPORTED_FUNC attach(d1::task_arena_base&);\nTBB_EXPORT void __TBB_EXPORTED_FUNC execute(d1::task_arena_base&, d1::delegate_base&);\nTBB_EXPORT void __TBB_EXPORTED_FUNC wait(d1::task_arena_base&);\nTBB_EXPORT int  __TBB_EXPORTED_FUNC max_concurrency(const d1::task_arena_base*);\nTBB_EXPORT void __TBB_EXPORTED_FUNC isolate_within_arena(d1::delegate_base& d, std::intptr_t);\n\nTBB_EXPORT void __TBB_EXPORTED_FUNC enqueue(d1::task&, d1::task_arena_base*);\nTBB_EXPORT void __TBB_EXPORTED_FUNC enqueue(d1::task&, d1::task_group_context&, d1::task_arena_base*);\nTBB_EXPORT void __TBB_EXPORTED_FUNC submit(d1::task&, d1::task_group_context&, arena*, std::uintptr_t);\n\n#if __TBB_PREVIEW_PARALLEL_PHASE\nTBB_EXPORT void __TBB_EXPORTED_FUNC enter_parallel_phase(d1::task_arena_base*, std::uintptr_t);\nTBB_EXPORT void __TBB_EXPORTED_FUNC exit_parallel_phase(d1::task_arena_base*, std::uintptr_t);\n#endif\n} // namespace r1\n\nnamespace d2 {\ninline void enqueue_impl(task_handle&& th, d1::task_arena_base* ta) {\n    __TBB_ASSERT(th != nullptr, \"Attempt to schedule empty task_handle\");\n\n    auto& ctx = task_handle_accessor::ctx_of(th);\n\n    // Do not access th after release\n    r1::enqueue(*task_handle_accessor::release(th), ctx, ta);\n}\n} //namespace d2\n\nnamespace d1 {\n\nstatic constexpr unsigned num_priority_levels = 3;\nstatic constexpr int priority_stride = INT_MAX / (num_priority_levels + 1);\n\nclass task_arena_base {\n    friend struct r1::task_arena_impl;\n    friend void r1::observe(d1::task_scheduler_observer&, bool);\npublic:\n    enum class priority : int {\n        low    = 1 * priority_stride,\n        normal = 2 * priority_stride,\n        high   = 3 * priority_stride\n    };\n\n#if __TBB_PREVIEW_PARALLEL_PHASE\n    enum class leave_policy : int {\n        automatic = 0,\n        fast      = 1\n    };\n#endif\n\n#if __TBB_ARENA_BINDING\n    using constraints = tbb::detail::d1::constraints;\n#endif /*__TBB_ARENA_BINDING*/\nprotected:\n    //! Special settings\n    intptr_t my_version_and_traits;\n\n    std::atomic<do_once_state> my_initialization_state;\n\n    //! nullptr if not currently initialized.\n    std::atomic<r1::arena*> my_arena;\n    static_assert(sizeof(std::atomic<r1::arena*>) == sizeof(r1::arena*),\n        \"To preserve backward compatibility we need the equal size of an atomic pointer and a pointer\");\n\n    //! Concurrency level for deferred initialization\n    int my_max_concurrency;\n\n    //! Reserved slots for external threads\n    unsigned my_num_reserved_slots;\n\n    //! Arena priority\n    priority my_priority;\n\n    //! The NUMA node index to which the arena will be attached\n    numa_node_id my_numa_id;\n\n    //! The core type index to which arena will be attached\n    core_type_id my_core_type;\n\n    //! Number of threads per core\n    int my_max_threads_per_core;\n\n    // Backward compatibility checks.\n    core_type_id core_type() const {\n        return (my_version_and_traits & core_type_support_flag) == core_type_support_flag ? my_core_type : automatic;\n    }\n    int max_threads_per_core() const {\n        return (my_version_and_traits & core_type_support_flag) == core_type_support_flag ? my_max_threads_per_core : automatic;\n    }\n\n#if __TBB_PREVIEW_PARALLEL_PHASE\n    leave_policy get_leave_policy() const {\n        return (my_version_and_traits & fast_leave_policy_flag) ? leave_policy::fast : leave_policy::automatic;\n    }\n\n    int leave_policy_trait(leave_policy lp) const {\n        return lp == leave_policy::fast ? fast_leave_policy_flag : 0;\n    }\n\n    void set_leave_policy(leave_policy lp) {\n        my_version_and_traits |= leave_policy_trait(lp);\n    }\n#endif\n\n    enum {\n        default_flags               = 0,\n        core_type_support_flag      = 1,\n        fast_leave_policy_flag      = 1 << 1\n    };\n\n    task_arena_base(int max_concurrency, unsigned reserved_for_masters, priority a_priority\n#if __TBB_PREVIEW_PARALLEL_PHASE\n                    , leave_policy lp\n#endif\n    )\n        : my_version_and_traits(default_flags | core_type_support_flag\n#if __TBB_PREVIEW_PARALLEL_PHASE\n                | leave_policy_trait(lp)\n#endif\n        )\n        , my_initialization_state(do_once_state::uninitialized)\n        , my_arena(nullptr)\n        , my_max_concurrency(max_concurrency)\n        , my_num_reserved_slots(reserved_for_masters)\n        , my_priority(a_priority)\n        , my_numa_id(automatic)\n        , my_core_type(automatic)\n        , my_max_threads_per_core(automatic)\n        {}\n\n#if __TBB_ARENA_BINDING\n    task_arena_base(const constraints& constraints_, unsigned reserved_for_masters, priority a_priority\n#if __TBB_PREVIEW_PARALLEL_PHASE\n                    , leave_policy lp\n#endif\n    )\n        : my_version_and_traits(default_flags | core_type_support_flag \n#if __TBB_PREVIEW_PARALLEL_PHASE\n                | leave_policy_trait(lp)\n#endif\n                )\n        , my_initialization_state(do_once_state::uninitialized)\n        , my_arena(nullptr)\n        , my_max_concurrency(constraints_.max_concurrency)\n        , my_num_reserved_slots(reserved_for_masters)\n        , my_priority(a_priority)\n        , my_numa_id(constraints_.numa_id)\n        , my_core_type(constraints_.core_type)\n        , my_max_threads_per_core(constraints_.max_threads_per_core)\n        {}\n#endif /*__TBB_ARENA_BINDING*/\npublic:\n    //! Typedef for number of threads that is automatic.\n    static const int automatic = -1;\n    static const int not_initialized = -2;\n};\n\ntemplate<typename R, typename F>\nR isolate_impl(F& f) {\n    task_arena_function<F, R> func(f);\n    r1::isolate_within_arena(func, /*isolation*/ 0);\n    return func.consume_result();\n}\n\ntemplate <typename F>\nclass enqueue_task : public task {\n    small_object_allocator m_allocator;\n    const F m_func;\n\n    void finalize(const execution_data& ed) {\n        m_allocator.delete_object(this, ed);\n    }\n    task* execute(execution_data& ed) override {\n        m_func();\n        finalize(ed);\n        return nullptr;\n    }\n    task* cancel(execution_data&) override {\n        __TBB_ASSERT_RELEASE(false, \"Unhandled exception from enqueue task is caught\");\n        return nullptr;\n    }\npublic:\n    enqueue_task(const F& f, small_object_allocator& alloc) : m_allocator(alloc), m_func(f) {}\n    enqueue_task(F&& f, small_object_allocator& alloc) : m_allocator(alloc), m_func(std::move(f)) {}\n};\n\ntemplate<typename F>\nvoid enqueue_impl(F&& f, task_arena_base* ta) {\n    small_object_allocator alloc{};\n    r1::enqueue(*alloc.new_object<enqueue_task<typename std::decay<F>::type>>(std::forward<F>(f), alloc), ta);\n}\n/** 1-to-1 proxy representation class of scheduler's arena\n * Constructors set up settings only, real construction is deferred till the first method invocation\n * Destructor only removes one of the references to the inner arena representation.\n * Final destruction happens when all the references (and the work) are gone.\n */\nclass task_arena : public task_arena_base {\n\n    void mark_initialized() {\n        __TBB_ASSERT( my_arena.load(std::memory_order_relaxed), \"task_arena initialization is incomplete\" );\n        my_initialization_state.store(do_once_state::initialized, std::memory_order_release);\n    }\n\n    template<typename R, typename F>\n    R execute_impl(F& f) {\n        initialize();\n        task_arena_function<F, R> func(f);\n        r1::execute(*this, func);\n        return func.consume_result();\n    }\npublic:\n    //! Creates task_arena with certain concurrency limits\n    /** Sets up settings only, real construction is deferred till the first method invocation\n     *  @arg max_concurrency specifies total number of slots in arena where threads work\n     *  @arg reserved_for_masters specifies number of slots to be used by external threads only.\n     *       Value of 1 is default and reflects behavior of implicit arenas.\n     **/\n    task_arena(int max_concurrency_ = automatic, unsigned reserved_for_masters = 1,\n               priority a_priority = priority::normal\n#if __TBB_PREVIEW_PARALLEL_PHASE\n               , leave_policy lp = leave_policy::automatic\n#endif\n    )\n        : task_arena_base(max_concurrency_, reserved_for_masters, a_priority\n#if __TBB_PREVIEW_PARALLEL_PHASE\n                         , lp\n#endif\n          )\n    {}\n\n#if __TBB_ARENA_BINDING\n    //! Creates task arena pinned to certain NUMA node\n    task_arena(const constraints& constraints_, unsigned reserved_for_masters = 1,\n               priority a_priority = priority::normal\n#if __TBB_PREVIEW_PARALLEL_PHASE\n               , leave_policy lp = leave_policy::automatic\n#endif\n    )\n        : task_arena_base(constraints_, reserved_for_masters, a_priority\n#if __TBB_PREVIEW_PARALLEL_PHASE\n                         , lp\n#endif\n          )\n    {}\n\n    //! Copies settings from another task_arena\n    task_arena(const task_arena &a) // copy settings but not the reference or instance\n        : task_arena_base(\n            constraints{}\n                .set_numa_id(a.my_numa_id)\n                .set_max_concurrency(a.my_max_concurrency)\n                .set_core_type(a.my_core_type)\n                .set_max_threads_per_core(a.my_max_threads_per_core)\n            , a.my_num_reserved_slots, a.my_priority\n#if __TBB_PREVIEW_PARALLEL_PHASE\n            , a.get_leave_policy()\n#endif\n        )\n    \n    {}\n#else\n    //! Copies settings from another task_arena\n    task_arena(const task_arena& a) // copy settings but not the reference or instance\n        : task_arena_base(a.my_max_concurrency,\n                          a.my_num_reserved_slots,\n                          a.my_priority,\n#if __TBB_PREVIEW_PARALLEL_PHASE\n                          a.get_leave_policy()\n#endif\n          )\n    {}\n#endif /*__TBB_ARENA_BINDING*/\n\n    //! Tag class used to indicate the \"attaching\" constructor\n    struct attach {};\n\n    //! Creates an instance of task_arena attached to the current arena of the thread\n    explicit task_arena( attach )\n        : task_arena_base(automatic, 1, priority::normal\n#if __TBB_PREVIEW_PARALLEL_PHASE\n        , leave_policy::automatic\n#endif\n        ) // use default settings if attach fails\n    {\n        if (r1::attach(*this)) {\n            mark_initialized();\n        }\n    }\n\n    //! Creates an instance of task_arena attached to the current arena of the thread\n    explicit task_arena(d1::attach)\n        : task_arena(attach{})\n    {}\n\n    //! Forces allocation of the resources for the task_arena as specified in constructor arguments\n    void initialize() {\n        atomic_do_once([this]{ r1::initialize(*this); }, my_initialization_state);\n    }\n\n    //! Overrides concurrency level and forces initialization of internal representation\n    void initialize(int max_concurrency_, unsigned reserved_for_masters = 1,\n                    priority a_priority = priority::normal\n#if __TBB_PREVIEW_PARALLEL_PHASE\n                    , leave_policy lp = leave_policy::automatic\n#endif\n    )\n    {\n        __TBB_ASSERT(!my_arena.load(std::memory_order_relaxed), \"Impossible to modify settings of an already initialized task_arena\");\n        if( !is_active() ) {\n            my_max_concurrency = max_concurrency_;\n            my_num_reserved_slots = reserved_for_masters;\n            my_priority = a_priority;\n#if __TBB_PREVIEW_PARALLEL_PHASE\n            set_leave_policy(lp);\n#endif\n            r1::initialize(*this);\n            mark_initialized();\n        }\n    }\n\n#if __TBB_ARENA_BINDING\n    void initialize(constraints constraints_, unsigned reserved_for_masters = 1,\n                    priority a_priority = priority::normal\n#if __TBB_PREVIEW_PARALLEL_PHASE\n                    , leave_policy lp = leave_policy::automatic\n#endif\n    )\n    {\n        __TBB_ASSERT(!my_arena.load(std::memory_order_relaxed), \"Impossible to modify settings of an already initialized task_arena\");\n        if( !is_active() ) {\n            my_numa_id = constraints_.numa_id;\n            my_max_concurrency = constraints_.max_concurrency;\n            my_core_type = constraints_.core_type;\n            my_max_threads_per_core = constraints_.max_threads_per_core;\n            my_num_reserved_slots = reserved_for_masters;\n            my_priority = a_priority;\n#if __TBB_PREVIEW_PARALLEL_PHASE\n            set_leave_policy(lp);\n#endif\n            r1::initialize(*this);\n            mark_initialized();\n        }\n    }\n#endif /*__TBB_ARENA_BINDING*/\n\n    //! Attaches this instance to the current arena of the thread\n    void initialize(attach) {\n        // TODO: decide if this call must be thread-safe\n        __TBB_ASSERT(!my_arena.load(std::memory_order_relaxed), \"Impossible to modify settings of an already initialized task_arena\");\n        if( !is_active() ) {\n            if ( !r1::attach(*this) ) {\n                r1::initialize(*this);\n            }\n            mark_initialized();\n        }\n    }\n\n    //! Attaches this instance to the current arena of the thread\n    void initialize(d1::attach) {\n        initialize(attach{});\n    }\n\n    //! Removes the reference to the internal arena representation.\n    //! Not thread safe wrt concurrent invocations of other methods.\n    void terminate() {\n        if( is_active() ) {\n            r1::terminate(*this);\n            my_initialization_state.store(do_once_state::uninitialized, std::memory_order_relaxed);\n        }\n    }\n\n    //! Removes the reference to the internal arena representation, and destroys the external object.\n    //! Not thread safe wrt concurrent invocations of other methods.\n    ~task_arena() {\n        terminate();\n    }\n\n    //! Returns true if the arena is active (initialized); false otherwise.\n    //! The name was chosen to match a task_scheduler_init method with the same semantics.\n    bool is_active() const {\n        return my_initialization_state.load(std::memory_order_acquire) == do_once_state::initialized;\n    }\n\n    //! Enqueues a task into the arena to process a functor, and immediately returns.\n    //! Does not require the calling thread to join the arena\n\n    template<typename F>\n    void enqueue(F&& f) {\n        initialize();\n        enqueue_impl(std::forward<F>(f), this);\n    }\n\n    //! Enqueues a task into the arena to process a functor wrapped in task_handle, and immediately returns.\n    //! Does not require the calling thread to join the arena\n    void enqueue(d2::task_handle&& th) {\n        initialize();\n        d2::enqueue_impl(std::move(th), this);\n    }\n\n    //! Joins the arena and executes a mutable functor, then returns\n    //! If not possible to join, wraps the functor into a task, enqueues it and waits for task completion\n    //! Can decrement the arena demand for workers, causing a worker to leave and free a slot to the calling thread\n    //! Since C++11, the method returns the value returned by functor (prior to C++11 it returns void).\n    template<typename F>\n    auto execute(F&& f) -> decltype(f()) {\n        return execute_impl<decltype(f())>(f);\n    }\n\n#if __TBB_PREVIEW_PARALLEL_PHASE\n    void start_parallel_phase() {\n        initialize();\n        r1::enter_parallel_phase(this, /*reserved*/0);\n    }\n    void end_parallel_phase(bool with_fast_leave = false) {\n        __TBB_ASSERT(my_initialization_state.load(std::memory_order_relaxed) == do_once_state::initialized, nullptr);\n        // It is guaranteed by the standard that conversion of boolean to integral type will result in either 0 or 1\n        r1::exit_parallel_phase(this, static_cast<std::uintptr_t>(with_fast_leave));\n    }\n\n    class scoped_parallel_phase {\n        task_arena& arena;\n        bool one_time_fast_leave;\n    public:\n        scoped_parallel_phase(task_arena& ta, bool with_fast_leave = false)\n            : arena(ta), one_time_fast_leave(with_fast_leave)\n        {\n            arena.start_parallel_phase();\n        }\n        ~scoped_parallel_phase() {\n            arena.end_parallel_phase(one_time_fast_leave);\n        }\n    };\n#endif\n\n#if __TBB_EXTRA_DEBUG\n    //! Returns my_num_reserved_slots\n    int debug_reserved_slots() const {\n        // Handle special cases inside the library\n        return my_num_reserved_slots;\n    }\n\n    //! Returns my_max_concurrency\n    int debug_max_concurrency() const {\n        // Handle special cases inside the library\n        return my_max_concurrency;\n    }\n\n    //! Wait for all work in the arena to be completed\n    //! Even submitted by other application threads\n    //! Joins arena if/when possible (in the same way as execute())\n    void debug_wait_until_empty() {\n        initialize();\n        r1::wait(*this);\n    }\n#endif //__TBB_EXTRA_DEBUG\n\n    //! Returns the maximal number of threads that can work inside the arena\n    int max_concurrency() const {\n        // Handle special cases inside the library\n        return (my_max_concurrency > 1) ? my_max_concurrency : r1::max_concurrency(this);\n    }\n\n    friend void submit(task& t, task_arena& ta, task_group_context& ctx, bool as_critical) {\n        __TBB_ASSERT(ta.is_active(), nullptr);\n        call_itt_task_notify(releasing, &t);\n        r1::submit(t, ctx, ta.my_arena.load(std::memory_order_relaxed), as_critical ? 1 : 0);\n    }\n};\n\n//! Executes a mutable functor in isolation within the current task arena.\n//! Since C++11, the method returns the value returned by functor (prior to C++11 it returns void).\ntemplate<typename F>\ninline auto isolate(F&& f) -> decltype(f()) {\n    return isolate_impl<decltype(f())>(f);\n}\n\n//! Returns the index, aka slot number, of the calling thread in its current arena\ninline int current_thread_index() {\n    slot_id idx = r1::execution_slot(nullptr);\n    return idx == slot_id(-1) ? task_arena_base::not_initialized : int(idx);\n}\n\n#if __TBB_PREVIEW_TASK_GROUP_EXTENSIONS\ninline bool is_inside_task() {\n    return nullptr != current_context();\n}\n#endif //__TBB_PREVIEW_TASK_GROUP_EXTENSIONS\n\n//! Returns the maximal number of threads that can work inside the arena\ninline int max_concurrency() {\n    return r1::max_concurrency(nullptr);\n}\n\ninline void enqueue(d2::task_handle&& th) {\n    d2::enqueue_impl(std::move(th), nullptr);\n}\n\ntemplate<typename F>\ninline void enqueue(F&& f) {\n    enqueue_impl(std::forward<F>(f), nullptr);\n}\n\n#if __TBB_PREVIEW_PARALLEL_PHASE\ninline void start_parallel_phase() {\n    r1::enter_parallel_phase(nullptr, /*reserved*/0);\n}\n\ninline void end_parallel_phase(bool with_fast_leave) {\n    // It is guaranteed by the standard that conversion of boolean to integral type will result in either 0 or 1\n    r1::exit_parallel_phase(nullptr, static_cast<std::uintptr_t>(with_fast_leave));\n}\n#endif\n\nusing r1::submit;\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::task_arena;\nusing detail::d1::attach;\n\n#if __TBB_PREVIEW_TASK_GROUP_EXTENSIONS\nusing detail::d1::is_inside_task;\n#endif\n\nnamespace this_task_arena {\nusing detail::d1::current_thread_index;\nusing detail::d1::max_concurrency;\nusing detail::d1::isolate;\n\nusing detail::d1::enqueue;\n\n#if __TBB_PREVIEW_PARALLEL_PHASE\nusing detail::d1::start_parallel_phase;\nusing detail::d1::end_parallel_phase;\n#endif\n} // namespace this_task_arena\n\n} // inline namespace v1\n\n} // namespace tbb\n#endif /* __TBB_task_arena_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/task_group.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_task_group_H\n#define __TBB_task_group_H\n\n#include \"detail/_config.h\"\n#include \"detail/_namespace_injection.h\"\n#include \"detail/_assert.h\"\n#include \"detail/_utils.h\"\n#include \"detail/_template_helpers.h\"\n#include \"detail/_exception.h\"\n#include \"detail/_task.h\"\n#include \"detail/_small_object_pool.h\"\n#include \"detail/_intrusive_list_node.h\"\n#include \"detail/_task_handle.h\"\n\n#include \"profiling.h\"\n\n#include <type_traits>\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    // Suppress warning: structure was padded due to alignment specifier\n    #pragma warning(push)\n    #pragma warning(disable:4324)\n#endif\n\nnamespace tbb {\nnamespace detail {\n\nnamespace d1 {\nclass delegate_base;\nclass task_arena_base;\nclass task_group_context;\n}\n\nnamespace r1 {\n// Forward declarations\nclass tbb_exception_ptr;\nclass cancellation_disseminator;\nclass thread_data;\nclass task_dispatcher;\ntemplate <bool>\nclass context_guard_helper;\nstruct task_arena_impl;\nclass context_list;\n\nTBB_EXPORT void __TBB_EXPORTED_FUNC execute(d1::task_arena_base&, d1::delegate_base&);\nTBB_EXPORT void __TBB_EXPORTED_FUNC isolate_within_arena(d1::delegate_base&, std::intptr_t);\n\nTBB_EXPORT void __TBB_EXPORTED_FUNC initialize(d1::task_group_context&);\nTBB_EXPORT void __TBB_EXPORTED_FUNC destroy(d1::task_group_context&);\nTBB_EXPORT void __TBB_EXPORTED_FUNC reset(d1::task_group_context&);\nTBB_EXPORT bool __TBB_EXPORTED_FUNC cancel_group_execution(d1::task_group_context&);\nTBB_EXPORT bool __TBB_EXPORTED_FUNC is_group_execution_cancelled(d1::task_group_context&);\nTBB_EXPORT void __TBB_EXPORTED_FUNC capture_fp_settings(d1::task_group_context&);\n\nstruct task_group_context_impl;\n}\n\nnamespace d2 {\n\nnamespace {\ntemplate<typename F>\nd1::task* task_ptr_or_nullptr(F&& f);\n}\n\ntemplate<typename F>\nclass function_task : public task_handle_task  {\n    //TODO: apply empty base optimization here\n    const F m_func;\n\nprivate:\n    d1::task* execute(d1::execution_data& ed) override {\n        __TBB_ASSERT(ed.context == &this->ctx(), \"The task group context should be used for all tasks\");\n        task* res = task_ptr_or_nullptr(m_func);\n        finalize(&ed);\n        return res;\n    }\n    d1::task* cancel(d1::execution_data& ed) override {\n        finalize(&ed);\n        return nullptr;\n    }\npublic:\n    template<typename FF>\n    function_task(FF&& f, d1::wait_tree_vertex_interface* vertex, d1::task_group_context& ctx, d1::small_object_allocator& alloc)\n        : task_handle_task{vertex, ctx, alloc},\n          m_func(std::forward<FF>(f)) {}\n};\n\n#if __TBB_PREVIEW_TASK_GROUP_EXTENSIONS\nnamespace {\n    template<typename F>\n    d1::task* task_ptr_or_nullptr_impl(std::false_type, F&& f){\n        task_handle th = std::forward<F>(f)();\n        return task_handle_accessor::release(th);\n    }\n\n    template<typename F>\n    d1::task* task_ptr_or_nullptr_impl(std::true_type, F&& f){\n        std::forward<F>(f)();\n        return nullptr;\n    }\n\n    template<typename F>\n    d1::task* task_ptr_or_nullptr(F&& f){\n        using is_void_t = std::is_void<\n            decltype(std::forward<F>(f)())\n            >;\n\n        return  task_ptr_or_nullptr_impl(is_void_t{}, std::forward<F>(f));\n    }\n}\n#else\nnamespace {\n    template<typename F>\n    d1::task* task_ptr_or_nullptr(F&& f){\n        std::forward<F>(f)();\n        return nullptr;\n    }\n}  // namespace\n#endif // __TBB_PREVIEW_TASK_GROUP_EXTENSIONS\n} // namespace d2\n\nnamespace d1 {\n\n// This structure is left here for backward compatibility check\nstruct context_list_node {\n    std::atomic<context_list_node*> prev{};\n    std::atomic<context_list_node*> next{};\n};\n\n//! Used to form groups of tasks\n/** @ingroup task_scheduling\n    The context services explicit cancellation requests from user code, and unhandled\n    exceptions intercepted during tasks execution. Intercepting an exception results\n    in generating internal cancellation requests (which is processed in exactly the\n    same way as external ones).\n\n    The context is associated with one or more root tasks and defines the cancellation\n    group that includes all the descendants of the corresponding root task(s). Association\n    is established when a context object is passed as an argument to the task::allocate_root()\n    method. See task_group_context::task_group_context for more details.\n\n    The context can be bound to another one, and other contexts can be bound to it,\n    forming a tree-like structure: parent -> this -> children. Arrows here designate\n    cancellation propagation direction. If a task in a cancellation group is cancelled\n    all the other tasks in this group and groups bound to it (as children) get cancelled too.\n**/\nclass task_group_context : no_copy {\npublic:\n    enum traits_type {\n        fp_settings     = 1 << 1,\n        concurrent_wait = 1 << 2,\n        default_traits  = 0\n    };\n    enum kind_type {\n        isolated,\n        bound\n    };\nprivate:\n    //! Space for platform-specific FPU settings.\n    /** Must only be accessed inside TBB binaries, and never directly in user\n    code or inline methods. */\n    std::uint64_t my_cpu_ctl_env;\n\n    //! Specifies whether cancellation was requested for this task group.\n    std::atomic<std::uint32_t> my_cancellation_requested;\n\n    //! Versioning for run-time checks and behavioral traits of the context.\n    enum class task_group_context_version : std::uint8_t {\n        unused = 1       // ensure that new versions, if any, will not clash with previously used ones\n    };\n    task_group_context_version my_version;\n\n    //! The context traits.\n    struct context_traits {\n        bool fp_settings        : 1;\n        bool concurrent_wait    : 1;\n        bool bound              : 1;\n        bool reserved1          : 1;\n        bool reserved2          : 1;\n        bool reserved3          : 1;\n        bool reserved4          : 1;\n        bool reserved5          : 1;\n    } my_traits;\n\n    static_assert(sizeof(context_traits) == 1, \"Traits shall fit into one byte.\");\n\n    static constexpr std::uint8_t may_have_children = 1;\n    //! The context internal state (currently only may_have_children).\n    std::atomic<std::uint8_t> my_may_have_children;\n\n    enum class state : std::uint8_t {\n        created,\n        locked,\n        isolated,\n        bound,\n        dead,\n        proxy = std::uint8_t(-1) //the context is not the real one, but proxy to other one\n    };\n\n    //! The synchronization machine state to manage lifetime.\n    std::atomic<state> my_state;\n\n    union {\n        //! Pointer to the context of the parent cancellation group. nullptr for isolated contexts.\n        task_group_context* my_parent;\n\n        //! Pointer to the actual context 'this' context represents a proxy of.\n        task_group_context* my_actual_context;\n    };\n\n    //! Thread data instance that registered this context in its list.\n    r1::context_list* my_context_list;\n    static_assert(sizeof(std::atomic<r1::thread_data*>) == sizeof(r1::context_list*), \"To preserve backward compatibility these types should have the same size\");\n\n    //! Used to form the thread specific list of contexts without additional memory allocation.\n    /** A context is included into the list of the current thread when its binding to\n        its parent happens. Any context can be present in the list of one thread only. **/\n    intrusive_list_node my_node;\n    static_assert(sizeof(intrusive_list_node) == sizeof(context_list_node), \"To preserve backward compatibility these types should have the same size\");\n\n    //! Pointer to the container storing exception being propagated across this task group.\n    std::atomic<r1::tbb_exception_ptr*> my_exception;\n    static_assert(sizeof(std::atomic<r1::tbb_exception_ptr*>) == sizeof(r1::tbb_exception_ptr*),\n        \"backward compatibility check\");\n\n    //! Used to set and maintain stack stitching point for Intel Performance Tools.\n    void* my_itt_caller;\n\n    //! Description of algorithm for scheduler based instrumentation.\n    string_resource_index my_name;\n\n    char padding[max_nfs_size\n        - sizeof(std::uint64_t)                          // my_cpu_ctl_env\n        - sizeof(std::atomic<std::uint32_t>)             // my_cancellation_requested\n        - sizeof(std::uint8_t)                           // my_version\n        - sizeof(context_traits)                         // my_traits\n        - sizeof(std::atomic<std::uint8_t>)              // my_state\n        - sizeof(std::atomic<state>)                     // my_state\n        - sizeof(task_group_context*)                    // my_parent\n        - sizeof(r1::context_list*)                      // my_context_list\n        - sizeof(intrusive_list_node)                    // my_node\n        - sizeof(std::atomic<r1::tbb_exception_ptr*>)    // my_exception\n        - sizeof(void*)                                  // my_itt_caller\n        - sizeof(string_resource_index)                  // my_name\n    ];\n\n    task_group_context(context_traits t, string_resource_index name)\n        : my_version{task_group_context_version::unused}, my_name{name}\n    {\n        my_traits = t; // GCC4.8 issues warning list initialization for bitset (missing-field-initializers)\n        r1::initialize(*this);\n    }\n\n    task_group_context(task_group_context* actual_context)\n        : my_version{task_group_context_version::unused}\n        , my_state{state::proxy}\n        , my_actual_context{actual_context}\n    {\n        __TBB_ASSERT(my_actual_context, \"Passed pointer value points to nothing.\");\n        my_name = actual_context->my_name;\n\n        // no need to initialize 'this' context as it acts as a proxy for my_actual_context, which\n        // initialization is a user-side responsibility.\n    }\n\n    static context_traits make_traits(kind_type relation_with_parent, std::uintptr_t user_traits) {\n        context_traits ct;\n        ct.fp_settings = (user_traits & fp_settings) == fp_settings;\n        ct.concurrent_wait = (user_traits & concurrent_wait) == concurrent_wait;\n        ct.bound = relation_with_parent == bound;\n        ct.reserved1 = ct.reserved2 = ct.reserved3 = ct.reserved4 = ct.reserved5 = false;\n        return ct;\n    }\n\n    bool is_proxy() const {\n        return my_state.load(std::memory_order_relaxed) == state::proxy;\n    }\n\n    task_group_context& actual_context() noexcept {\n        if (is_proxy()) {\n            __TBB_ASSERT(my_actual_context, \"Actual task_group_context is not set.\");\n            return *my_actual_context;\n        }\n        return *this;\n    }\n\n    const task_group_context& actual_context() const noexcept {\n        if (is_proxy()) {\n            __TBB_ASSERT(my_actual_context, \"Actual task_group_context is not set.\");\n            return *my_actual_context;\n        }\n        return *this;\n    }\n\npublic:\n    //! Default & binding constructor.\n    /** By default a bound context is created. That is this context will be bound\n        (as child) to the context of the currently executing task . Cancellation\n        requests passed to the parent context are propagated to all the contexts\n        bound to it. Similarly priority change is propagated from the parent context\n        to its children.\n\n        If task_group_context::isolated is used as the argument, then the tasks associated\n        with this context will never be affected by events in any other context.\n\n        Creating isolated contexts involve much less overhead, but they have limited\n        utility. Normally when an exception occurs in an algorithm that has nested\n        ones running, it is desirably to have all the nested algorithms cancelled\n        as well. Such a behavior requires nested algorithms to use bound contexts.\n\n        There is one good place where using isolated algorithms is beneficial. It is\n        an external thread. That is if a particular algorithm is invoked directly from\n        the external thread (not from a TBB task), supplying it with explicitly\n        created isolated context will result in a faster algorithm startup.\n\n        VERSIONING NOTE:\n        Implementation(s) of task_group_context constructor(s) cannot be made\n        entirely out-of-line because the run-time version must be set by the user\n        code. This will become critically important for binary compatibility, if\n        we ever have to change the size of the context object. **/\n\n    task_group_context(kind_type relation_with_parent = bound,\n                       std::uintptr_t t = default_traits)\n        : task_group_context(make_traits(relation_with_parent, t), CUSTOM_CTX) {}\n\n    // Custom constructor for instrumentation of oneTBB algorithm\n    task_group_context(string_resource_index name )\n        : task_group_context(make_traits(bound, default_traits), name) {}\n\n    // Do not introduce any logic on user side since it might break state propagation assumptions\n    ~task_group_context() {\n        // When 'this' serves as a proxy, the initialization does not happen - nor should the\n        // destruction.\n        if (!is_proxy())\n        {\n            r1::destroy(*this);\n        }\n    }\n\n    //! Forcefully reinitializes the context after the task tree it was associated with is completed.\n    /** Because the method assumes that all the tasks that used to be associated with\n        this context have already finished, calling it while the context is still\n        in use somewhere in the task hierarchy leads to undefined behavior.\n\n        IMPORTANT: This method is not thread safe!\n\n        The method does not change the context's parent if it is set. **/\n    void reset() {\n        r1::reset(actual_context());\n    }\n\n    //! Initiates cancellation of all tasks in this cancellation group and its subordinate groups.\n    /** \\return false if cancellation has already been requested, true otherwise.\n\n        Note that canceling never fails. When false is returned, it just means that\n        another thread (or this one) has already sent cancellation request to this\n        context or to one of its ancestors (if this context is bound). It is guaranteed\n        that when this method is concurrently called on the same not yet cancelled\n        context, true will be returned by one and only one invocation. **/\n    bool cancel_group_execution() {\n        return r1::cancel_group_execution(actual_context());\n    }\n\n    //! Returns true if the context received cancellation request.\n    bool is_group_execution_cancelled() {\n        return r1::is_group_execution_cancelled(actual_context());\n    }\n\n#if __TBB_FP_CONTEXT\n    //! Captures the current FPU control settings to the context.\n    /** Because the method assumes that all the tasks that used to be associated with\n        this context have already finished, calling it while the context is still\n        in use somewhere in the task hierarchy leads to undefined behavior.\n\n        IMPORTANT: This method is not thread safe!\n\n        The method does not change the FPU control settings of the context's parent. **/\n    void capture_fp_settings() {\n        r1::capture_fp_settings(actual_context());\n    }\n#endif\n\n    //! Returns the user visible context trait\n    std::uintptr_t traits() const {\n        std::uintptr_t t{};\n        const task_group_context& ctx = actual_context();\n        t |= ctx.my_traits.fp_settings ? fp_settings : 0;\n        t |= ctx.my_traits.concurrent_wait ? concurrent_wait : 0;\n        return t;\n    }\nprivate:\n    //// TODO: cleanup friends\n    friend class r1::cancellation_disseminator;\n    friend class r1::thread_data;\n    friend class r1::task_dispatcher;\n    template <bool>\n    friend class r1::context_guard_helper;\n    friend struct r1::task_arena_impl;\n    friend struct r1::task_group_context_impl;\n    friend class d2::task_group_base;\n}; // class task_group_context\n\nstatic_assert(sizeof(task_group_context) == 128, \"Wrong size of task_group_context\");\n\ninline bool is_current_task_group_canceling() {\n    task_group_context* ctx = current_context();\n    return ctx ? ctx->is_group_execution_cancelled() : false;\n}\n\n} // namespace d1\n\nnamespace d2 {\n\nenum task_group_status {\n    not_complete,\n    complete,\n    canceled\n};\n\nclass task_group;\nclass structured_task_group;\n#if TBB_PREVIEW_ISOLATED_TASK_GROUP\nclass isolated_task_group;\n#endif\n\ntemplate <typename F>\nclass function_stack_task : public d1::task {\n    const F& m_func;\n    d1::wait_tree_vertex_interface* m_wait_tree_vertex;\n\n    void finalize() {\n        m_wait_tree_vertex->release();\n    }\n    task* execute(d1::execution_data&) override {\n        task* res = d2::task_ptr_or_nullptr(m_func);\n        finalize();\n        return res;\n    }\n    task* cancel(d1::execution_data&) override {\n        finalize();\n        return nullptr;\n    }\npublic:\n    function_stack_task(const F& f, d1::wait_tree_vertex_interface* vertex) : m_func(f), m_wait_tree_vertex(vertex) {\n        m_wait_tree_vertex->reserve();\n    }\n};\n\nclass task_group_base : no_copy {\nprotected:\n    d1::wait_context_vertex m_wait_vertex;\n    d1::task_group_context m_context;\n\n    template<typename F>\n    task_group_status internal_run_and_wait(const F& f) {\n        function_stack_task<F> t{ f, r1::get_thread_reference_vertex(&m_wait_vertex) };\n\n        bool cancellation_status = false;\n        try_call([&] {\n            execute_and_wait(t, context(), m_wait_vertex.get_context(), context());\n        }).on_completion([&] {\n            // TODO: the reset method is not thread-safe. Ensure the correct behavior.\n            cancellation_status = context().is_group_execution_cancelled();\n            context().reset();\n        });\n        return cancellation_status ? canceled : complete;\n    }\n\n    task_group_status internal_run_and_wait(d2::task_handle&& h) {\n        __TBB_ASSERT(h != nullptr, \"Attempt to schedule empty task_handle\");\n\n        using acs = d2::task_handle_accessor;\n        __TBB_ASSERT(&acs::ctx_of(h) == &context(), \"Attempt to schedule task_handle into different task_group\");\n\n        bool cancellation_status = false;\n        try_call([&] {\n            execute_and_wait(*acs::release(h), context(), m_wait_vertex.get_context(), context());\n        }).on_completion([&] {\n            // TODO: the reset method is not thread-safe. Ensure the correct behavior.\n            cancellation_status = context().is_group_execution_cancelled();\n            context().reset();\n        });\n        return cancellation_status ? canceled : complete;\n    }\n\n    template<typename F>\n    d1::task* prepare_task(F&& f) {\n        d1::small_object_allocator alloc{};\n        return alloc.new_object<function_task<typename std::decay<F>::type>>(std::forward<F>(f),\n            r1::get_thread_reference_vertex(&m_wait_vertex), context(), alloc);\n    }\n\n    d1::task_group_context& context() noexcept {\n        return m_context.actual_context();\n    }\n\n    template<typename F>\n    d2::task_handle prepare_task_handle(F&& f) {\n        d1::small_object_allocator alloc{};\n        using function_task_t =  d2::function_task<typename std::decay<F>::type>;\n        d2::task_handle_task* function_task_p =  alloc.new_object<function_task_t>(std::forward<F>(f),\n            r1::get_thread_reference_vertex(&m_wait_vertex), context(), alloc);\n\n        return d2::task_handle_accessor::construct(function_task_p);\n    }\n\npublic:\n    task_group_base(uintptr_t traits = 0)\n        : m_wait_vertex(0)\n        , m_context(d1::task_group_context::bound, d1::task_group_context::default_traits | traits)\n    {}\n\n    task_group_base(d1::task_group_context& ctx)\n        : m_wait_vertex(0)\n        , m_context(&ctx)\n    {}\n\n    ~task_group_base() noexcept(false) {\n        if (m_wait_vertex.continue_execution()) {\n#if __TBB_CPP17_UNCAUGHT_EXCEPTIONS_PRESENT\n            bool stack_unwinding_in_progress = std::uncaught_exceptions() > 0;\n#else\n            bool stack_unwinding_in_progress = std::uncaught_exception();\n#endif\n            // Always attempt to do proper cleanup to avoid inevitable memory corruption\n            // in case of missing wait (for the sake of better testability & debuggability)\n            if (!context().is_group_execution_cancelled())\n                cancel();\n            d1::wait(m_wait_vertex.get_context(), context());\n            if (!stack_unwinding_in_progress)\n                throw_exception(exception_id::missing_wait);\n        }\n    }\n\n    task_group_status wait() {\n        bool cancellation_status = false;\n        try_call([&] {\n            d1::wait(m_wait_vertex.get_context(), context());\n        }).on_completion([&] {\n            // TODO: the reset method is not thread-safe. Ensure the correct behavior.\n            cancellation_status = m_context.is_group_execution_cancelled();\n            context().reset();\n        });\n        return cancellation_status ? canceled : complete;\n    }\n\n    void cancel() {\n        context().cancel_group_execution();\n    }\n}; // class task_group_base\n\nclass task_group : public task_group_base {\npublic:\n    task_group() : task_group_base(d1::task_group_context::concurrent_wait) {}\n    task_group(d1::task_group_context& ctx) : task_group_base(ctx) {}\n\n    template<typename F>\n    void run(F&& f) {\n        d1::spawn(*prepare_task(std::forward<F>(f)), context());\n    }\n\n    void run(d2::task_handle&& h) {\n        __TBB_ASSERT(h != nullptr, \"Attempt to schedule empty task_handle\");\n\n        using acs = d2::task_handle_accessor;\n        __TBB_ASSERT(&acs::ctx_of(h) == &context(), \"Attempt to schedule task_handle into different task_group\");\n\n        d1::spawn(*acs::release(h), context());\n    }\n\n    template<typename F>\n    d2::task_handle defer(F&& f) {\n        return prepare_task_handle(std::forward<F>(f));\n\n    }\n\n    template<typename F>\n    task_group_status run_and_wait(const F& f) {\n        return internal_run_and_wait(f);\n    }\n\n    task_group_status run_and_wait(d2::task_handle&& h) {\n        return internal_run_and_wait(std::move(h));\n    }\n}; // class task_group\n\n#if TBB_PREVIEW_ISOLATED_TASK_GROUP\nclass spawn_delegate : public d1::delegate_base {\n    d1::task* task_to_spawn;\n    d1::task_group_context& context;\n    bool operator()() const override {\n        spawn(*task_to_spawn, context);\n        return true;\n    }\npublic:\n    spawn_delegate(d1::task* a_task, d1::task_group_context& ctx)\n        : task_to_spawn(a_task), context(ctx)\n    {}\n};\n\nclass wait_delegate : public d1::delegate_base {\n    bool operator()() const override {\n        status = tg.wait();\n        return true;\n    }\nprotected:\n    task_group& tg;\n    task_group_status& status;\npublic:\n    wait_delegate(task_group& a_group, task_group_status& tgs)\n        : tg(a_group), status(tgs) {}\n};\n\ntemplate<typename F>\nclass run_wait_delegate : public wait_delegate {\n    F& func;\n    bool operator()() const override {\n        status = tg.run_and_wait(func);\n        return true;\n    }\npublic:\n    run_wait_delegate(task_group& a_group, F& a_func, task_group_status& tgs)\n        : wait_delegate(a_group, tgs), func(a_func) {}\n};\n\nclass isolated_task_group : public task_group {\n    intptr_t this_isolation() {\n        return reinterpret_cast<intptr_t>(this);\n    }\npublic:\n    isolated_task_group() : task_group() {}\n\n    isolated_task_group(d1::task_group_context& ctx) : task_group(ctx) {}\n\n    template<typename F>\n    void run(F&& f) {\n        spawn_delegate sd(prepare_task(std::forward<F>(f)), context());\n        r1::isolate_within_arena(sd, this_isolation());\n    }\n\n    void run(d2::task_handle&& h) {\n        __TBB_ASSERT(h != nullptr, \"Attempt to schedule empty task_handle\");\n\n        using acs = d2::task_handle_accessor;\n        __TBB_ASSERT(&acs::ctx_of(h) == &context(), \"Attempt to schedule task_handle into different task_group\");\n\n        spawn_delegate sd(acs::release(h), context());\n        r1::isolate_within_arena(sd, this_isolation());\n    }\n\n    template<typename F>\n    task_group_status run_and_wait( const F& f ) {\n        task_group_status result = not_complete;\n        run_wait_delegate<const F> rwd(*this, f, result);\n        r1::isolate_within_arena(rwd, this_isolation());\n        __TBB_ASSERT(result != not_complete, \"premature exit from wait?\");\n        return result;\n    }\n\n    task_group_status wait() {\n        task_group_status result = not_complete;\n        wait_delegate wd(*this, result);\n        r1::isolate_within_arena(wd, this_isolation());\n        __TBB_ASSERT(result != not_complete, \"premature exit from wait?\");\n        return result;\n    }\n}; // class isolated_task_group\n#endif // TBB_PREVIEW_ISOLATED_TASK_GROUP\n} // namespace d2\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::task_group_context;\nusing detail::d2::task_group;\n#if TBB_PREVIEW_ISOLATED_TASK_GROUP\nusing detail::d2::isolated_task_group;\n#endif\n\nusing detail::d2::task_group_status;\nusing detail::d2::not_complete;\nusing detail::d2::complete;\nusing detail::d2::canceled;\n\nusing detail::d1::is_current_task_group_canceling;\nusing detail::r1::missing_wait;\n\nusing detail::d2::task_handle;\n}\n\n} // namespace tbb\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    #pragma warning(pop) // 4324 warning\n#endif\n\n#endif // __TBB_task_group_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/task_scheduler_observer.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_task_scheduler_observer_H\n#define __TBB_task_scheduler_observer_H\n\n#include \"detail/_namespace_injection.h\"\n#include \"task_arena.h\"\n#include <atomic>\n\nnamespace tbb {\nnamespace detail {\n\nnamespace d1 {\nclass task_scheduler_observer;\n}\n\nnamespace r1 {\nclass observer_proxy;\nclass observer_list;\n\n//! Enable or disable observation\n/** For local observers the method can be used only when the current thread\nhas the task scheduler initialized or is attached to an arena.\nRepeated calls with the same state are no-ops. **/\nTBB_EXPORT void __TBB_EXPORTED_FUNC observe(d1::task_scheduler_observer&, bool state = true);\n}\n\nnamespace d1 {\nclass task_scheduler_observer {\n    friend class r1::observer_proxy;\n    friend class r1::observer_list;\n    friend void r1::observe(d1::task_scheduler_observer&, bool);\n\n    //! Pointer to the proxy holding this observer.\n    /** Observers are proxied by the scheduler to maintain persistent lists of them. **/\n    std::atomic<r1::observer_proxy*> my_proxy{ nullptr };\n\n    //! Counter preventing the observer from being destroyed while in use by the scheduler.\n    /** Valid only when observation is on. **/\n    std::atomic<intptr_t> my_busy_count{ 0 };\n\n    //! Contains task_arena pointer\n    task_arena* my_task_arena{ nullptr };\npublic:\n    //! Returns true if observation is enabled, false otherwise.\n    bool is_observing() const { return my_proxy.load(std::memory_order_relaxed) != nullptr; }\n\n    //! Entry notification\n    /** Invoked from inside observe(true) call and whenever a worker enters the arena\n        this observer is associated with. If a thread is already in the arena when\n        the observer is activated, the entry notification is called before it\n        executes the first stolen task. **/\n    virtual void on_scheduler_entry( bool /*is_worker*/ ) {}\n\n    //! Exit notification\n    /** Invoked from inside observe(false) call and whenever a worker leaves the\n        arena this observer is associated with. **/\n    virtual void on_scheduler_exit( bool /*is_worker*/ ) {}\n\n    //! Construct local or global observer in inactive state (observation disabled).\n    /** For a local observer entry/exit notifications are invoked whenever a worker\n        thread joins/leaves the arena of the observer's owner thread. If a thread is\n        already in the arena when the observer is activated, the entry notification is\n        called before it executes the first stolen task. **/\n    explicit task_scheduler_observer() = default;\n\n    //! Construct local observer for a given arena in inactive state (observation disabled).\n    /** entry/exit notifications are invoked whenever a thread joins/leaves arena.\n        If a thread is already in the arena when the observer is activated, the entry notification\n        is called before it executes the first stolen task. **/\n    explicit task_scheduler_observer(task_arena& a) : my_task_arena(&a) {}\n\n    /** Destructor protects instance of the observer from concurrent notification.\n       It is recommended to disable observation before destructor of a derived class starts,\n       otherwise it can lead to concurrent notification callback on partly destroyed object **/\n    virtual ~task_scheduler_observer() {\n        if (my_proxy.load(std::memory_order_acquire)) {\n            observe(false);\n        }\n    }\n\n    //! Enable or disable observation\n    /** Warning: concurrent invocations of this method are not safe.\n        Repeated calls with the same state are no-ops. **/\n    void observe(bool state = true) {\n        if( state && !my_proxy.load(std::memory_order_relaxed) ) {\n            __TBB_ASSERT( my_busy_count.load(std::memory_order_relaxed) == 0, \"Inconsistent state of task_scheduler_observer instance\");\n        }\n        r1::observe(*this, state);\n    }\n};\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\n    using detail::d1::task_scheduler_observer;\n}\n} // namespace tbb\n\n\n#endif /* __TBB_task_scheduler_observer_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/tbb_allocator.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_tbb_allocator_H\n#define __TBB_tbb_allocator_H\n\n#include \"oneapi/tbb/detail/_utils.h\"\n#include \"detail/_namespace_injection.h\"\n#include <cstdlib>\n#include <utility>\n\n#if __TBB_CPP17_MEMORY_RESOURCE_PRESENT\n#include <memory_resource>\n#endif\n\nnamespace tbb {\nnamespace detail {\n\nnamespace r1 {\nTBB_EXPORT void* __TBB_EXPORTED_FUNC allocate_memory(std::size_t size);\nTBB_EXPORT void  __TBB_EXPORTED_FUNC deallocate_memory(void* p);\nTBB_EXPORT bool  __TBB_EXPORTED_FUNC is_tbbmalloc_used();\n}\n\nnamespace d1 {\n\ntemplate<typename T>\nclass tbb_allocator {\npublic:\n    using value_type = T;\n    using propagate_on_container_move_assignment = std::true_type;\n\n    //! Always defined for TBB containers (supported since C++17 for std containers)\n    using is_always_equal = std::true_type;\n\n    //! Specifies current allocator\n    enum malloc_type {\n        scalable,\n        standard\n    };\n\n    tbb_allocator() = default;\n    template<typename U> tbb_allocator(const tbb_allocator<U>&) noexcept {}\n\n    //! Allocate space for n objects.\n    __TBB_nodiscard T* allocate(std::size_t n) {\n        return static_cast<T*>(r1::allocate_memory(n * sizeof(value_type)));\n    }\n\n    //! Free previously allocated block of memory.\n    void deallocate(T* p, std::size_t) {\n        r1::deallocate_memory(p);\n    }\n\n    //! Returns current allocator\n    static malloc_type allocator_type() {\n        return r1::is_tbbmalloc_used() ? standard : scalable;\n    }\n\n#if TBB_ALLOCATOR_TRAITS_BROKEN\n    using pointer = value_type*;\n    using const_pointer = const value_type*;\n    using reference = value_type&;\n    using const_reference = const value_type&;\n    using difference_type = std::ptrdiff_t;\n    using size_type = std::size_t;\n    template<typename U> struct rebind {\n        using other = tbb_allocator<U>;\n    };\n    //! Largest value for which method allocate might succeed.\n    size_type max_size() const noexcept {\n        size_type max = ~(std::size_t(0)) / sizeof(value_type);\n        return (max > 0 ? max : 1);\n    }\n    template<typename U, typename... Args>\n    void construct(U *p, Args&&... args)\n        { ::new (p) U(std::forward<Args>(args)...); }\n    void destroy( pointer p ) { p->~value_type(); }\n    pointer address(reference x) const { return &x; }\n    const_pointer address(const_reference x) const { return &x; }\n#endif // TBB_ALLOCATOR_TRAITS_BROKEN\n};\n\n#if TBB_ALLOCATOR_TRAITS_BROKEN\n    template<>\n    class tbb_allocator<void> {\n    public:\n        using pointer = void*;\n        using const_pointer = const void*;\n        using value_type = void;\n        template<typename U> struct rebind {\n            using other = tbb_allocator<U>;\n        };\n    };\n#endif\n\ntemplate<typename T, typename U>\ninline bool operator==(const tbb_allocator<T>&, const tbb_allocator<U>&) noexcept { return true; }\n\n#if !__TBB_CPP20_COMPARISONS_PRESENT\ntemplate<typename T, typename U>\ninline bool operator!=(const tbb_allocator<T>&, const tbb_allocator<U>&) noexcept { return false; }\n#endif\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\nusing detail::d1::tbb_allocator;\n} // namespace v1\n} // namespace tbb\n\n#endif /* __TBB_tbb_allocator_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/tbbmalloc_proxy.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/*\nReplacing the standard memory allocation routines in Microsoft* C/C++ RTL\n(malloc/free, global new/delete, etc.) with the TBB memory allocator.\n\nInclude the following header to a source of any binary which is loaded during\napplication startup\n\n#include \"oneapi/tbb/tbbmalloc_proxy.h\"\n\nor add following parameters to the linker options for the binary which is\nloaded during application startup. It can be either exe-file or dll.\n\nFor win32\ntbbmalloc_proxy.lib /INCLUDE:\"___TBB_malloc_proxy\"\nwin64\ntbbmalloc_proxy.lib /INCLUDE:\"__TBB_malloc_proxy\"\n*/\n\n#ifndef __TBB_tbbmalloc_proxy_H\n#define __TBB_tbbmalloc_proxy_H\n\n#if _MSC_VER\n\n#ifdef _DEBUG\n    #pragma comment(lib, \"tbbmalloc_proxy_debug.lib\")\n#else\n    #pragma comment(lib, \"tbbmalloc_proxy.lib\")\n#endif\n\n#if defined(_WIN64)\n    #pragma comment(linker, \"/include:__TBB_malloc_proxy\")\n#else\n    #pragma comment(linker, \"/include:___TBB_malloc_proxy\")\n#endif\n\n#else\n/* Primarily to support MinGW */\n\nextern \"C\" void __TBB_malloc_proxy();\nstruct __TBB_malloc_proxy_caller {\n    __TBB_malloc_proxy_caller() { __TBB_malloc_proxy(); }\n} volatile __TBB_malloc_proxy_helper_object;\n\n#endif // _MSC_VER\n\n/* Public Windows API */\nextern \"C\" int TBB_malloc_replacement_log(char *** function_replacement_log_ptr);\n\n#endif //__TBB_tbbmalloc_proxy_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/tick_count.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_tick_count_H\n#define __TBB_tick_count_H\n\n#include <chrono>\n\n#include \"detail/_namespace_injection.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n\n//! Absolute timestamp\n/** @ingroup timing */\nclass tick_count {\npublic:\n    using clock_type = typename std::conditional<std::chrono::high_resolution_clock::is_steady,\n        std::chrono::high_resolution_clock, std::chrono::steady_clock>::type;\n\n    //! Relative time interval.\n    class interval_t : public clock_type::duration {\n    public:\n        //! Construct a time interval representing zero time duration\n        interval_t() : clock_type::duration(clock_type::duration::zero()) {}\n\n        //! Construct a time interval representing sec seconds time duration\n        explicit interval_t( double sec )\n            : clock_type::duration(std::chrono::duration_cast<clock_type::duration>(std::chrono::duration<double>(sec))) {}\n\n        //! Return the length of a time interval in seconds\n        double seconds() const {\n            return std::chrono::duration_cast<std::chrono::duration<double>>(*this).count();\n        }\n\n        //! Extract the intervals from the tick_counts and subtract them.\n        friend interval_t operator-( const tick_count& t1, const tick_count& t0 );\n\n        //! Add two intervals.\n        friend interval_t operator+( const interval_t& i, const interval_t& j ) {\n            return interval_t(std::chrono::operator+(i, j));\n        }\n\n        //! Subtract two intervals.\n        friend interval_t operator-( const interval_t& i, const interval_t& j ) {\n            return interval_t(std::chrono::operator-(i, j));\n        }\n\n    private:\n        explicit interval_t( clock_type::duration value_ ) : clock_type::duration(value_) {}\n    };\n\n    tick_count() = default;\n\n    //! Return current time.\n    static tick_count now() {\n        return clock_type::now();\n    }\n\n    //! Subtract two timestamps to get the time interval between\n    friend interval_t operator-( const tick_count& t1, const tick_count& t0 ) {\n        return tick_count::interval_t(t1.my_time_point - t0.my_time_point);\n    }\n\n    //! Return the resolution of the clock in seconds per tick.\n    static double resolution() {\n        return static_cast<double>(interval_t::period::num) / interval_t::period::den;\n    }\n\nprivate:\n    clock_type::time_point my_time_point;\n    tick_count( clock_type::time_point tp ) : my_time_point(tp) {}\n};\n\n} // namespace d1\n} // namespace detail\n\ninline namespace v1 {\n    using detail::d1::tick_count;\n} // namespace v1\n\n} // namespace tbb\n\n#endif /* __TBB_tick_count_H */\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb/version.h",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_version_H\n#define __TBB_version_H\n\n// Exclude all includes during .rc files compilation\n#ifndef RC_INVOKED\n    #include \"detail/_config.h\"\n    #include \"detail/_namespace_injection.h\"\n#else\n    #define __TBB_STRING_AUX(x) #x\n    #define __TBB_STRING(x) __TBB_STRING_AUX(x)\n#endif\n\n// Product version\n#define TBB_VERSION_MAJOR 2022\n// Update version\n#define TBB_VERSION_MINOR 1\n// \"Patch\" version for custom releases\n#define TBB_VERSION_PATCH 0\n// Suffix string\n#define __TBB_VERSION_SUFFIX \"\"\n// Full official version string\n#define TBB_VERSION_STRING              \\\n    __TBB_STRING(TBB_VERSION_MAJOR) \".\" \\\n    __TBB_STRING(TBB_VERSION_MINOR) \".\" \\\n    __TBB_STRING(TBB_VERSION_PATCH)     \\\n    __TBB_VERSION_SUFFIX\n\n// OneAPI oneTBB specification version\n#define ONETBB_SPEC_VERSION 104\n// Full interface version\n#define TBB_INTERFACE_VERSION 12150\n// Major interface version\n#define TBB_INTERFACE_VERSION_MAJOR (TBB_INTERFACE_VERSION/1000)\n// Minor interface version\n#define TBB_INTERFACE_VERSION_MINOR (TBB_INTERFACE_VERSION%1000/10)\n\n// The binary compatibility version\n// To be used in SONAME, manifests, etc.\n#define __TBB_BINARY_VERSION 12\n\n//! TBB_VERSION support\n#ifndef TBB_ENDL\n#define TBB_ENDL \"\\n\"\n#endif\n\n//TBB_REVAMP_TODO: consider enabling version_string.ver generation\n//TBB_REVAMP_TODO: #include \"version_string.ver\"\n\n#define __TBB_ONETBB_SPEC_VERSION(N) #N \": SPECIFICATION VERSION\\t\" __TBB_STRING(ONETBB_SPEC_VERSION) TBB_ENDL\n#define __TBB_VERSION_NUMBER(N) #N \": VERSION\\t\\t\" TBB_VERSION_STRING TBB_ENDL\n#define __TBB_INTERFACE_VERSION_NUMBER(N) #N \": INTERFACE VERSION\\t\" __TBB_STRING(TBB_INTERFACE_VERSION) TBB_ENDL\n\n#ifndef TBB_USE_DEBUG\n    #define __TBB_VERSION_USE_DEBUG(N) #N \": TBB_USE_DEBUG\\tundefined\" TBB_ENDL\n#elif TBB_USE_DEBUG==0\n    #define __TBB_VERSION_USE_DEBUG(N) #N \": TBB_USE_DEBUG\\t0\" TBB_ENDL\n#elif TBB_USE_DEBUG==1\n    #define __TBB_VERSION_USE_DEBUG(N) #N \": TBB_USE_DEBUG\\t1\" TBB_ENDL\n#elif TBB_USE_DEBUG==2\n    #define __TBB_VERSION_USE_DEBUG(N) #N \": TBB_USE_DEBUG\\t2\" TBB_ENDL\n#else\n    #error Unexpected value for TBB_USE_DEBUG\n#endif\n\n#ifndef TBB_USE_ASSERT\n    #define __TBB_VERSION_USE_ASSERT(N) #N \": TBB_USE_ASSERT\\tundefined\" TBB_ENDL\n#elif TBB_USE_ASSERT==0\n    #define __TBB_VERSION_USE_ASSERT(N) #N \": TBB_USE_ASSERT\\t0\" TBB_ENDL\n#elif TBB_USE_ASSERT==1\n    #define __TBB_VERSION_USE_ASSERT(N) #N \": TBB_USE_ASSERT\\t1\" TBB_ENDL\n#elif TBB_USE_ASSERT==2\n    #define __TBB_VERSION_USE_ASSERT(N) #N \": TBB_USE_ASSERT\\t2\" TBB_ENDL\n#else\n    #error Unexpected value for TBB_USE_ASSERT\n#endif\n\n#define TBB_VERSION_STRINGS_P(N)                \\\n    __TBB_ONETBB_SPEC_VERSION(N)                \\\n    __TBB_VERSION_NUMBER(N)                     \\\n    __TBB_INTERFACE_VERSION_NUMBER(N)           \\\n    __TBB_VERSION_USE_DEBUG(N)                  \\\n    __TBB_VERSION_USE_ASSERT(N)\n\n#define TBB_VERSION_STRINGS TBB_VERSION_STRINGS_P(oneTBB)\n#define TBBMALLOC_VERSION_STRINGS TBB_VERSION_STRINGS_P(TBBmalloc)\n\n//! The function returns the version string for the Intel(R) oneAPI Threading Building Blocks (oneTBB)\n//! shared library being used.\n/**\n * The returned pointer is an address of a string in the shared library.\n * It can be different than the TBB_VERSION_STRING obtained at compile time.\n */\nextern \"C\" TBB_EXPORT const char* __TBB_EXPORTED_FUNC TBB_runtime_version();\n\n//! The function returns the interface version of the oneTBB shared library being used.\n/**\n * The returned version is determined at runtime, not at compile/link time.\n * It can be different than the value of TBB_INTERFACE_VERSION obtained at compile time.\n */\nextern \"C\" TBB_EXPORT int __TBB_EXPORTED_FUNC TBB_runtime_interface_version();\n\n#endif // __TBB_version_H\n"
  },
  {
    "path": "third-party/tbb/include/oneapi/tbb.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_tbb_H\n#define __TBB_tbb_H\n\n/**\n    This header bulk-includes declarations or definitions of all the functionality\n    provided by TBB (save for tbbmalloc and 3rd party dependent headers).\n\n    If you use only a few TBB constructs, consider including specific headers only.\n    Any header listed below can be included independently of others.\n**/\n\n#include \"oneapi/tbb/blocked_range.h\"\n#include \"oneapi/tbb/blocked_range2d.h\"\n#include \"oneapi/tbb/blocked_range3d.h\"\n#include \"oneapi/tbb/blocked_nd_range.h\"\n#include \"oneapi/tbb/cache_aligned_allocator.h\"\n#include \"oneapi/tbb/combinable.h\"\n#include \"oneapi/tbb/concurrent_hash_map.h\"\n#if TBB_PREVIEW_CONCURRENT_LRU_CACHE\n#include \"tbb/concurrent_lru_cache.h\"\n#endif\n#include \"oneapi/tbb/collaborative_call_once.h\"\n#include \"oneapi/tbb/concurrent_priority_queue.h\"\n#include \"oneapi/tbb/concurrent_queue.h\"\n#include \"oneapi/tbb/concurrent_unordered_map.h\"\n#include \"oneapi/tbb/concurrent_unordered_set.h\"\n#include \"oneapi/tbb/concurrent_map.h\"\n#include \"oneapi/tbb/concurrent_set.h\"\n#include \"oneapi/tbb/concurrent_vector.h\"\n#include \"oneapi/tbb/enumerable_thread_specific.h\"\n#include \"oneapi/tbb/flow_graph.h\"\n#include \"oneapi/tbb/global_control.h\"\n#include \"oneapi/tbb/info.h\"\n#include \"oneapi/tbb/null_mutex.h\"\n#include \"oneapi/tbb/null_rw_mutex.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/parallel_for_each.h\"\n#include \"oneapi/tbb/parallel_invoke.h\"\n#include \"oneapi/tbb/parallel_pipeline.h\"\n#include \"oneapi/tbb/parallel_reduce.h\"\n#include \"oneapi/tbb/parallel_scan.h\"\n#include \"oneapi/tbb/parallel_sort.h\"\n#include \"oneapi/tbb/partitioner.h\"\n#include \"oneapi/tbb/queuing_mutex.h\"\n#include \"oneapi/tbb/queuing_rw_mutex.h\"\n#include \"oneapi/tbb/spin_mutex.h\"\n#include \"oneapi/tbb/spin_rw_mutex.h\"\n#include \"oneapi/tbb/mutex.h\"\n#include \"oneapi/tbb/rw_mutex.h\"\n#include \"oneapi/tbb/task.h\"\n#include \"oneapi/tbb/task_arena.h\"\n#include \"oneapi/tbb/task_group.h\"\n#include \"oneapi/tbb/task_scheduler_observer.h\"\n#include \"oneapi/tbb/tbb_allocator.h\"\n#include \"oneapi/tbb/tick_count.h\"\n#include \"oneapi/tbb/version.h\"\n\n#endif /* __TBB_tbb_H */\n"
  },
  {
    "path": "third-party/tbb/include/tbb/blocked_nd_range.h",
    "content": "/*\n    Copyright (c) 2017-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/blocked_nd_range.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/blocked_range.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/blocked_range.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/blocked_range2d.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/blocked_range2d.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/blocked_range3d.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/blocked_range3d.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/blocked_rangeNd.h",
    "content": "/*\n    Copyright (c) 2017-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/blocked_rangeNd.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/cache_aligned_allocator.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/cache_aligned_allocator.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/collaborative_call_once.h",
    "content": "/*\n    Copyright (c) 2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/collaborative_call_once.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/combinable.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/combinable.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/concurrent_hash_map.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/concurrent_hash_map.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/concurrent_lru_cache.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/concurrent_lru_cache.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/concurrent_map.h",
    "content": "/*\n    Copyright (c) 2019-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/concurrent_map.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/concurrent_priority_queue.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/concurrent_priority_queue.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/concurrent_queue.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/concurrent_queue.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/concurrent_set.h",
    "content": "/*\n    Copyright (c) 2019-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/concurrent_set.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/concurrent_unordered_map.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/concurrent_unordered_map.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/concurrent_unordered_set.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/concurrent_unordered_set.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/concurrent_vector.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/concurrent_vector.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/enumerable_thread_specific.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/enumerable_thread_specific.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/flow_graph.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/flow_graph.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/flow_graph_abstractions.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/flow_graph_abstractions.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/global_control.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/global_control.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/info.h",
    "content": "/*\n    Copyright (c) 2019-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/info.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/memory_pool.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/memory_pool.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/mutex.h",
    "content": "/*\n    Copyright (c) 2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/mutex.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/null_mutex.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/null_mutex.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/null_rw_mutex.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/null_rw_mutex.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/parallel_for.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/parallel_for.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/parallel_for_each.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/parallel_for_each.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/parallel_invoke.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/parallel_invoke.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/parallel_pipeline.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/parallel_pipeline.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/parallel_reduce.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/parallel_reduce.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/parallel_scan.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/parallel_scan.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/parallel_sort.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/parallel_sort.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/partitioner.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/partitioner.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/profiling.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/profiling.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/queuing_mutex.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/queuing_mutex.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/queuing_rw_mutex.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/queuing_rw_mutex.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/rw_mutex.h",
    "content": "/*\n    Copyright (c) 2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/rw_mutex.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/scalable_allocator.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/scalable_allocator.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/spin_mutex.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/spin_mutex.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/spin_rw_mutex.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/spin_rw_mutex.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/task.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/task.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/task_arena.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/task_arena.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/task_group.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/task_group.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/task_scheduler_observer.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/task_scheduler_observer.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/tbb.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/tbb_allocator.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/tbb_allocator.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/tbbmalloc_proxy.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/tbbmalloc_proxy.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/tick_count.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/tick_count.h\"\n"
  },
  {
    "path": "third-party/tbb/include/tbb/version.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"../oneapi/tbb/version.h\"\n"
  },
  {
    "path": "third-party/tbb/integration/cmake/generate_vars.cmake",
    "content": "# Copyright (c) 2020-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Reuired parameters:\n#     SOURCE_DIR       - incoming path to oneTBB source directory.\n#     BINARY_DIR       - incoming path to oneTBB build directory.\n#     BIN_PATH         - incoming path to oneTBB binaries directory.\n#     TBB_INSTALL_VARS - install vars generation trigger\n#     TBB_CMAKE_INSTALL_LIBDIR - subdir for shared object files installation path (used only in TBB_INSTALL_VARS mode)\n#     VARS_TEMPLATE    - path to the vars template file\n#     VARS_NAME        - name of the output vars script\n\nset(INPUT_FILE \"${SOURCE_DIR}/integration/${VARS_TEMPLATE}\")\nset(OUTPUT_FILE \"${BIN_PATH}/${VARS_NAME}\")\n\nfile(TO_NATIVE_PATH \"${SOURCE_DIR}\" TBBROOT_REPLACEMENT)\nfile(TO_NATIVE_PATH \"${BIN_PATH}\" LIBRARY_PATH_REPLACEMENT)\nif (WIN32)\n    file(TO_NATIVE_PATH \"${BIN_PATH}\" BINARY_PATH_REPLACEMENT)\nendif()\n\nif (NOT EXISTS ${OUTPUT_FILE})\n    configure_file(${INPUT_FILE} ${OUTPUT_FILE} @ONLY)\nendif()\n\nif (TBB_INSTALL_VARS)\n    set(OUTPUT_FILE \"${BINARY_DIR}/internal_install_vars\")\n    if (UNIX)\n        set(TBBROOT_REPLACEMENT \"$(cd $(dirname \\${BASH_SOURCE}) && pwd -P)/..\")\n        set(LIBRARY_PATH_REPLACEMENT \"$TBBROOT/${TBB_CMAKE_INSTALL_LIBDIR}/\")\n        set(CMAKE_ENVIRONMENT_SOURCING_STRING \"CMAKE_PREFIX_PATH=\\\"\\${TBBROOT}/${TBB_CMAKE_INSTALL_LIBDIR}/cmake/TBB:${CMAKE_PREFIX_PATH}\\\"; export CMAKE_PREFIX_PATH\")\n    else()\n        set(TBBROOT_REPLACEMENT \"%~d0%~p0..\")\n        set(LIBRARY_PATH_REPLACEMENT \"%TBBROOT%\\\\${TBB_CMAKE_INSTALL_LIBDIR}\")\n        set(BINARY_PATH_REPLACEMENT \"%TBBROOT%\\\\bin\")\n        set(CMAKE_ENVIRONMENT_SOURCING_STRING \"set \\\"CMAKE_PREFIX_PATH=%TBBROOT%\\\\${TBB_CMAKE_INSTALL_LIBDIR}\\\\cmake\\\\TBB;%CMAKE_PREFIX_PATH%\\\"\")\n    endif()\n\n    configure_file( ${INPUT_FILE} ${OUTPUT_FILE} @ONLY )\nendif()\n"
  },
  {
    "path": "third-party/tbb/integration/linux/env/vars.sh",
    "content": "#!/bin/sh\n# shellcheck shell=sh\n#\n# Copyright (c) 2005-2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# The script is setting up environment for oneTBB.\n# Supported arguments:\n#   intel64|ia32 - architecture, intel64 is default.\n\n# Get absolute path to script. Gets a relative path as argument and outputs an absolute path.\nget_script_path() (\n  script_path=\"$1\"\n  while [ -L \"$script_path\" ] ; do\n    script_dir=$(command dirname -- \"$script_path\")\n    script_dir=$(cd \"$script_dir\" && command pwd -P)\n    script_path=\"$(readlink \"$script_path\")\"\n    case $script_path in\n      (/*) ;;\n       (*) script_path=\"$script_dir/$script_path\" ;;\n    esac\n  done\n  script_dir=$(command dirname -- \"$script_path\")\n  script_dir=$(cd \"$script_dir\" && command pwd -P)\n  printf \"%s\" \"$script_dir\"\n)\n\n_vars_get_proc_name() {\n  if [ -n \"${ZSH_VERSION:-}\" ] ; then\n    script=\"$(ps -p \"$$\" -o comm=)\"\n  else\n    script=\"$1\"\n    while [ -L \"$script\" ] ; do\n      script=\"$(readlink \"$script\")\"\n    done\n  fi\n  basename -- \"$script\"\n}\n\n_vars_this_script_name=\"vars.sh\"\nif [ \"$_vars_this_script_name\" = \"$(_vars_get_proc_name \"$0\")\" ] ; then\n  echo \":: ERROR: Incorrect usage: this script must be sourced.\"\n  echo \"   Usage: . path/to/${_vars_this_script_name}\"\n  return 255 2>/dev/null || exit 255\nfi\n\n# Prepend path segment(s) to path-like env vars (PATH, CPATH, etc.).\n\n# prepend_path() avoids dangling \":\" that affects some env vars (PATH and CPATH)\n# PATH > https://www.gnu.org/software/libc/manual/html_node/Standard-Environment.html\n\n# Usage:\n#   env_var=$(prepend_path \"$prepend_to_var\" \"$existing_env_var\")\n#   export env_var\n#\n# Inputs:\n#   $1 == path segment to be prepended to $2\n#   $2 == value of existing path-like environment variable\n\nprepend_path() (\n  path_to_add=\"$1\"\n  path_is_now=\"$2\"\n\n  if [ \"\" = \"${path_is_now}\" ] ; then   # avoid dangling \":\"\n    printf \"%s\" \"${path_to_add}\"\n  else\n    printf \"%s\" \"${path_to_add}:${path_is_now}\"\n  fi\n)\n\n# Extract the name and location of this sourced script.\n\n# Generally, \"ps -o comm=\" is limited to a 15 character result, but it works\n# fine for this usage, because we are primarily interested in finding the name\n# of the execution shell, not the name of any calling script.\n\nvars_script_name=\"\"\nvars_script_shell=\"$(ps -p \"$$\" -o comm=)\"\n# ${var:-} needed to pass \"set -eu\" checks\nif [ -n \"${ZSH_VERSION:-}\" ] && [ -n \"${ZSH_EVAL_CONTEXT:-}\" ] ; then     # zsh 5.x and later\n  # shellcheck disable=2249\n  case $ZSH_EVAL_CONTEXT in (*:file*) vars_script_name=\"${(%):-%x}\" ;; esac ;\nelif [ -n \"${KSH_VERSION:-}\" ] ; then                                     # ksh, mksh or lksh\n  if [ \"$(set | grep -Fq \"KSH_VERSION=.sh.version\" ; echo $?)\" -eq 0 ] ; then # ksh\n    vars_script_name=\"${.sh.file}\" ;\n  else # mksh or lksh or [lm]ksh masquerading as ksh or sh\n    # force [lm]ksh to issue error msg; which contains this script's path/filename, e.g.:\n    # mksh: /home/ubuntu/intel/oneapi/vars.sh[137]: ${.sh.file}: bad substitution\n    vars_script_name=\"$( (echo \"${.sh.file}\") 2>&1 )\" || : ;\n    vars_script_name=\"$(expr \"${vars_script_name:-}\" : '^.*sh: \\(.*\\)\\[[0-9]*\\]:')\" ;\n  fi\nelif [ -n \"${BASH_VERSION:-}\" ] ; then        # bash\n  # shellcheck disable=2128\n  (return 0 2>/dev/null) && vars_script_name=\"${BASH_SOURCE}\" ;\nelif [ \"dash\" = \"$vars_script_shell\" ] ; then # dash\n  # force dash to issue error msg; which contains this script's rel/path/filename, e.g.:\n  # dash: 146: /home/ubuntu/intel/oneapi/vars.sh: Bad substitution\n  vars_script_name=\"$( (echo \"${.sh.file}\") 2>&1 )\" || : ;\n  vars_script_name=\"$(expr \"${vars_script_name:-}\" : '^.*dash: [0-9]*: \\(.*\\):')\" ;\nelif [ \"sh\" = \"$vars_script_shell\" ] ; then   # could be dash masquerading as /bin/sh\n  # force a shell error msg; which should contain this script's path/filename\n  # sample error msg shown; assume this file is named \"vars.sh\"; as required by setvars.sh\n  vars_script_name=\"$( (echo \"${.sh.file}\") 2>&1 )\" || : ;\n  if [ \"$(printf \"%s\" \"$vars_script_name\" | grep -Eq \"sh: [0-9]+: .*vars\\.sh: \" ; echo $?)\" -eq 0 ] ; then # dash as sh\n    # sh: 155: /home/ubuntu/intel/oneapi/vars.sh: Bad substitution\n    vars_script_name=\"$(expr \"${vars_script_name:-}\" : '^.*sh: [0-9]*: \\(.*\\):')\" ;\n  fi\nelse  # unrecognized shell or dash being sourced from within a user's script\n  # force a shell error msg; which should contain this script's path/filename\n  # sample error msg shown; assume this file is named \"vars.sh\"; as required by setvars.sh\n  vars_script_name=\"$( (echo \"${.sh.file}\") 2>&1 )\" || : ;\n  if [ \"$(printf \"%s\" \"$vars_script_name\" | grep -Eq \"^.+: [0-9]+: .*vars\\.sh: \" ; echo $?)\" -eq 0 ] ; then # dash\n    # .*: 164: intel/oneapi/vars.sh: Bad substitution\n    vars_script_name=\"$(expr \"${vars_script_name:-}\" : '^.*: [0-9]*: \\(.*\\):')\" ;\n  else\n    vars_script_name=\"\" ;\n  fi\nfi\n\nif [ \"\" = \"$vars_script_name\" ] ; then\n  >&2 echo \":: ERROR: Unable to proceed: possible causes listed below.\"\n  >&2 echo \"   This script must be sourced. Did you execute or source this script?\" ;\n  >&2 echo \"   Unrecognized/unsupported shell (supported: bash, zsh, ksh, m/lksh, dash).\" ;\n  >&2 echo \"   Can be caused by sourcing from ZSH version 4.x or older.\" ;\n  return 255 2>/dev/null || exit 255\nfi\n\nTBBROOT=$(get_script_path \"${vars_script_name:-}\")/..\n\nTBB_TARGET_ARCH=\"intel64\"\nTBB_ARCH_SUFFIX=\"\"\n\nif [ -n \"${SETVARS_ARGS:-}\" ]; then\n  tbb_arg_ia32=\"$(expr \"${SETVARS_ARGS:-}\" : '^.*\\(ia32\\)')\" || true\n  if [ -n \"${tbb_arg_ia32:-}\" ]; then\n    TBB_TARGET_ARCH=\"ia32\"\n  fi\nelse\n  for arg do\n    case \"$arg\" in\n    (intel64|ia32)\n      TBB_TARGET_ARCH=\"${arg}\"\n      ;;\n    (*) ;;\n    esac\n  done\nfi\n\nTBB_LIB_NAME=\"libtbb.so.12\"\n\n# Parse layout\nif [ -e \"$TBBROOT/lib/$TBB_TARGET_ARCH\" ]; then\n  TBB_LIB_DIR=\"$TBB_TARGET_ARCH/gcc4.8\"\nelse\n  if [ \"$TBB_TARGET_ARCH\" = \"ia32\" ] ; then\n    TBB_ARCH_SUFFIX=\"32\"\n  fi\n  TBB_LIB_DIR=\"\"\nfi\n\nif [ -e \"$TBBROOT/lib$TBB_ARCH_SUFFIX/$TBB_LIB_DIR/$TBB_LIB_NAME\" ]; then\n  export TBBROOT\n\n  LIBRARY_PATH=$(prepend_path \"${TBBROOT}/lib$TBB_ARCH_SUFFIX/$TBB_LIB_DIR\" \"${LIBRARY_PATH:-}\") ; export LIBRARY_PATH\n  LD_LIBRARY_PATH=$(prepend_path \"${TBBROOT}/lib$TBB_ARCH_SUFFIX/$TBB_LIB_DIR\" \"${LD_LIBRARY_PATH:-}\") ; export LD_LIBRARY_PATH\n  CPATH=$(prepend_path \"${TBBROOT}/include\" \"${CPATH:-}\") ; export CPATH\n  CMAKE_PREFIX_PATH=$(prepend_path \"${TBBROOT}\" \"${CMAKE_PREFIX_PATH:-}\") ; export CMAKE_PREFIX_PATH\n  PKG_CONFIG_PATH=$(prepend_path \"${TBBROOT}/lib$TBB_ARCH_SUFFIX/pkgconfig\" \"${PKG_CONFIG_PATH:-}\") ; export PKG_CONFIG_PATH\nelse\n  >&2 echo \"ERROR: $TBB_LIB_NAME library does not exist in $TBBROOT/lib$TBB_ARCH_SUFFIX/$TBB_LIB_DIR.\"\n  return 255 2>/dev/null || exit 255\nfi\n"
  },
  {
    "path": "third-party/tbb/integration/linux/env/vars.sh.in",
    "content": "#!/bin/sh\n#\n# Copyright (c) 2005-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nexport TBBROOT=@TBBROOT_REPLACEMENT@\n\nLD_LIBRARY_PATH=\"@LIBRARY_PATH_REPLACEMENT@:${LD_LIBRARY_PATH}\"; export LD_LIBRARY_PATH\nLIBRARY_PATH=\"@LIBRARY_PATH_REPLACEMENT@:${LIBRARY_PATH}\"; export LIBRARY_PATH\nCPATH=\"${TBBROOT}/include:${CPATH}\"; export CPATH\nPKG_CONFIG_PATH=\"@LIBRARY_PATH_REPLACEMENT@/pkgconfig:${PKG_CONFIG_PATH}\"; export PKG_CONFIG_PATH\n\n@CMAKE_ENVIRONMENT_SOURCING_STRING@\n"
  },
  {
    "path": "third-party/tbb/integration/linux/modulefiles/tbb",
    "content": "#%Module1.0###################################################################\n#\n# Copyright (c) 2020-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# This modulefile requires Environment Modules 4.1 or later.\n# Type `module --version` to determine the current installed version.\n\n##############################################################################\n\nset min_tcl_ver 8.4\nif { $tcl_version < $min_tcl_ver } {\n    puts stderr \" \"\n    puts stderr \"ERROR: This modulefile requires tcl $min_tcl_ver or greater.\"\n    puts stderr \"Your system reports that tclsh version $tcl_version is installed.\"\n    exit 1\n}\n\n# if modulefile script name is a symlink, resolve it to get the fully\n# qualified pathname that points to the actual modulefile script\n# see: https://wiki.tcl-lang.org/page/file+normalize\nset scriptpath \"${ModulesCurrentModulefile}\"\nset scriptpath \"[file dirname [file normalize \"$scriptpath/___\"]]\"\n\n# define componentroot, modulefilepath, modulefilename and modulefilever\nset modulefilename \"[file tail [file dirname \"${scriptpath}\"]]\"\nset modulefilever \"[file tail \"${scriptpath}\"]\"\nset modulefilepath \"${scriptpath}\"\nset componentroot \"[file dirname [file dirname [file dirname [file dirname \"${scriptpath}\"]]]]\"\n\n##############################################################################\n\nmodule-whatis \"Name: Intel(R) oneAPI Threading Building Blocks\"\nmodule-whatis \"Version: $modulefilename/$modulefilever\"\nmodule-whatis \"Description: Flexible threading library for adding parallelism to complex applications across accelerated architectures.\"\nmodule-whatis \"URL: https://www.intel.com/content/www/us/en/developer/tools/oneapi/onetbb.html\"\nmodule-whatis \"Dependencies: none\"\n\nproc ModulesHelp { } {\n    global modulefilename\n    global modulefilever\n    puts \"module whatis ${modulefilename}/${modulefilever}\"\n}\n\n##############################################################################\n\n# Define environment variables needed for an isolated component install.\n\nset tbbroot \"$componentroot\"\nset tbb_target_arch \"intel64\"\n\nsetenv TBBROOT \"$tbbroot\"\n\nprepend-path CPATH \"$tbbroot/include\"\nprepend-path LIBRARY_PATH \"$tbbroot/lib\"\nprepend-path LD_LIBRARY_PATH \"$tbbroot/lib\"\nprepend-path CMAKE_PREFIX_PATH \"$tbbroot\"\nprepend-path PKG_CONFIG_PATH \"$tbbroot/lib/pkgconfig\"\n"
  },
  {
    "path": "third-party/tbb/integration/linux/modulefiles/tbb32",
    "content": "#%Module1.0###################################################################\n#\n# Copyright (c) 2020-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# This modulefile requires Environment Modules 4.1 or later.\n# Type `module --version` to determine the current installed version.\n\n##############################################################################\n\nset min_tcl_ver 8.4\nif { $tcl_version < $min_tcl_ver } {\n    puts stderr \" \"\n    puts stderr \"ERROR: This modulefile requires tcl $min_tcl_ver or greater.\"\n    puts stderr \"Your system reports that tclsh version $tcl_version is installed.\"\n    exit 1\n}\n\n# if modulefile script name is a symlink, resolve it to get the fully\n# qualified pathname that points to the actual modulefile script\n# see: https://wiki.tcl-lang.org/page/file+normalize\nset scriptpath \"${ModulesCurrentModulefile}\"\nset scriptpath \"[file dirname [file normalize \"$scriptpath/___\"]]\"\n\n# define componentroot, modulefilepath, modulefilename and modulefilever\nset modulefilename \"[file tail [file dirname \"${scriptpath}\"]]\"\nset modulefilever \"[file tail \"${scriptpath}\"]\"\nset modulefilepath \"${scriptpath}\"\nset componentroot \"[file dirname [file dirname [file dirname [file dirname \"${scriptpath}\"]]]]\"\n\n##############################################################################\n\nmodule-whatis \"Name: Intel(R) oneAPI Threading Building Blocks\"\nmodule-whatis \"Version: $modulefilename/$modulefilever\"\nmodule-whatis \"Description: Flexible threading library for adding parallelism to complex applications across accelerated architectures.\"\nmodule-whatis \"URL: https://www.intel.com/content/www/us/en/developer/tools/oneapi/onetbb.html\"\nmodule-whatis \"Dependencies: none\"\n\nproc ModulesHelp { } {\n    global modulefilename\n    global modulefilever\n    puts \"module whatis ${modulefilename}/${modulefilever}\"\n}\n\n##############################################################################\n\n# Define environment variables needed for an isolated component install.\n\nset tbbroot \"$componentroot\"\nset tbb_target_arch \"ia32\"\n\nsetenv TBBROOT \"$tbbroot\"\n\nprepend-path CPATH \"$tbbroot/include32:$tbbroot/include\"\nprepend-path LIBRARY_PATH \"$tbbroot/lib32\"\nprepend-path LD_LIBRARY_PATH \"$tbbroot/lib32\"\nprepend-path CMAKE_PREFIX_PATH \"$tbbroot\"\nprepend-path PKG_CONFIG_PATH \"$tbbroot/lib32/pkgconfig\"\n"
  },
  {
    "path": "third-party/tbb/integration/linux/oneapi/vars.sh",
    "content": "#!/bin/sh\n# shellcheck shell=sh\n#\n# Copyright (c) 2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nif [ -z \"${SETVARS_CALL:-}\" ] ; then\n  >&2 echo \" \"\n  >&2 echo \":: ERROR: This script must be sourced by setvars.sh.\"\n  >&2 echo \"   Try 'source <install-dir>/setvars.sh --help' for help.\"\n  >&2 echo \" \"\n  return 255\nfi\n\nif [ -z \"${ONEAPI_ROOT:-}\" ] ; then\n  >&2 echo \" \"\n  >&2 echo \":: ERROR: This script requires that the ONEAPI_ROOT env variable is set.\"\n  >&2 echo \"   Try 'source <install-dir>\\setvars.sh --help' for help.\"\n  >&2 echo \" \"\n  return 254\nfi\n\nTBBROOT=\"${ONEAPI_ROOT}\"; export TBBROOT\n"
  },
  {
    "path": "third-party/tbb/integration/linux/sys_check/sys_check.sh",
    "content": "#!/bin/sh\n#\n# Copyright (c) 2019-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nLOC=$(realpath $(dirname \"${BASH_SOURCE[0]}\"))\nsource $LOC/../../../common.sh $@\n\nERRORSTATE=0\nreturn $ERRORSTATE\n"
  },
  {
    "path": "third-party/tbb/integration/mac/env/vars.sh",
    "content": "#!/bin/sh\n# shellcheck shell=sh\n#\n# Copyright (c) 2005-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Get absolute path to script. Gets a relative path as argument and outputs an absolute path.\nget_script_path() (\n  script_path=\"$1\"\n  while [ -L \"$script_path\" ] ; do\n    script_dir=$(command dirname -- \"$script_path\")\n    script_dir=$(cd \"$script_dir\" && command pwd -P)\n    script_path=\"$(readlink \"$script_path\")\"\n    case $script_path in\n      (/*) ;;\n       (*) script_path=\"$script_dir/$script_path\" ;;\n    esac\n  done\n  script_dir=$(command dirname -- \"$script_path\")\n  script_dir=$(cd \"$script_dir\" && command pwd -P)\n  printf \"%s\" \"$script_dir\"\n)\n\n_vars_get_proc_name() {\n  if [ -n \"${ZSH_VERSION:-}\" ] ; then\n    script=\"$(ps -p \"$$\" -o comm=)\"\n  else\n    script=\"$1\"\n    while [ -L \"$script\" ] ; do\n      script=\"$(readlink \"$script\")\"\n    done\n  fi\n  basename -- \"$script\"\n}\n\n_vars_this_script_name=\"vars.sh\"\nif [ \"$_vars_this_script_name\" = \"$(_vars_get_proc_name \"$0\")\" ] ; then\n  echo \":: ERROR: Incorrect usage: this script must be sourced.\"\n  echo \"   Usage: . path/to/${_vars_this_script_name}\"\n  return 255 2>/dev/null || exit 255\nfi\n\n# Prepend path segment(s) to path-like env vars (PATH, CPATH, etc.).\n\n# prepend_path() avoids dangling \":\" that affects some env vars (PATH and CPATH)\n# PATH > https://www.gnu.org/software/libc/manual/html_node/Standard-Environment.html\n\n# Usage:\n#   env_var=$(prepend_path \"$prepend_to_var\" \"$existing_env_var\")\n#   export env_var\n#\n# Inputs:\n#   $1 == path segment to be prepended to $2\n#   $2 == value of existing path-like environment variable\n\nprepend_path() (\n  path_to_add=\"$1\"\n  path_is_now=\"$2\"\n\n  if [ \"\" = \"${path_is_now}\" ] ; then   # avoid dangling \":\"\n    printf \"%s\" \"${path_to_add}\"\n  else\n    printf \"%s\" \"${path_to_add}:${path_is_now}\"\n  fi\n)\n\n# Extract the name and location of this sourced script.\n\n# Generally, \"ps -o comm=\" is limited to a 15 character result, but it works\n# fine for this usage, because we are primarily interested in finding the name\n# of the execution shell, not the name of any calling script.\n\nvars_script_name=\"\"\nvars_script_shell=\"$(ps -p \"$$\" -o comm=)\"\n# ${var:-} needed to pass \"set -eu\" checks\nif [ -n \"${ZSH_VERSION:-}\" ] && [ -n \"${ZSH_EVAL_CONTEXT:-}\" ] ; then     # zsh 5.x and later\n  # shellcheck disable=2249\n  case $ZSH_EVAL_CONTEXT in (*:file*) vars_script_name=\"${(%):-%x}\" ;; esac ;\nelif [ -n \"${KSH_VERSION:-}\" ] ; then                                     # ksh, mksh or lksh\n  if [ \"$(set | grep -Fq \"KSH_VERSION=.sh.version\" ; echo $?)\" -eq 0 ] ; then # ksh\n    vars_script_name=\"${.sh.file}\" ;\n  else # mksh or lksh or [lm]ksh masquerading as ksh or sh\n    # force [lm]ksh to issue error msg; which contains this script's path/filename, e.g.:\n    # mksh: /home/ubuntu/intel/oneapi/vars.sh[137]: ${.sh.file}: bad substitution\n    vars_script_name=\"$( (echo \"${.sh.file}\") 2>&1 )\" || : ;\n    vars_script_name=\"$(expr \"${vars_script_name:-}\" : '^.*sh: \\(.*\\)\\[[0-9]*\\]:')\" ;\n  fi\nelif [ -n \"${BASH_VERSION:-}\" ] ; then        # bash\n  # shellcheck disable=2128\n  (return 0 2>/dev/null) && vars_script_name=\"${BASH_SOURCE}\" ;\nelif [ \"dash\" = \"$vars_script_shell\" ] ; then # dash\n  # force dash to issue error msg; which contains this script's rel/path/filename, e.g.:\n  # dash: 146: /home/ubuntu/intel/oneapi/vars.sh: Bad substitution\n  vars_script_name=\"$( (echo \"${.sh.file}\") 2>&1 )\" || : ;\n  vars_script_name=\"$(expr \"${vars_script_name:-}\" : '^.*dash: [0-9]*: \\(.*\\):')\" ;\nelif [ \"sh\" = \"$vars_script_shell\" ] ; then   # could be dash masquerading as /bin/sh\n  # force a shell error msg; which should contain this script's path/filename\n  # sample error msg shown; assume this file is named \"vars.sh\"; as required by setvars.sh\n  vars_script_name=\"$( (echo \"${.sh.file}\") 2>&1 )\" || : ;\n  if [ \"$(printf \"%s\" \"$vars_script_name\" | grep -Eq \"sh: [0-9]+: .*vars\\.sh: \" ; echo $?)\" -eq 0 ] ; then # dash as sh\n    # sh: 155: /home/ubuntu/intel/oneapi/vars.sh: Bad substitution\n    vars_script_name=\"$(expr \"${vars_script_name:-}\" : '^.*sh: [0-9]*: \\(.*\\):')\" ;\n  fi\nelse  # unrecognized shell or dash being sourced from within a user's script\n  # force a shell error msg; which should contain this script's path/filename\n  # sample error msg shown; assume this file is named \"vars.sh\"; as required by setvars.sh\n  vars_script_name=\"$( (echo \"${.sh.file}\") 2>&1 )\" || : ;\n  if [ \"$(printf \"%s\" \"$vars_script_name\" | grep -Eq \"^.+: [0-9]+: .*vars\\.sh: \" ; echo $?)\" -eq 0 ] ; then # dash\n    # .*: 164: intel/oneapi/vars.sh: Bad substitution\n    vars_script_name=\"$(expr \"${vars_script_name:-}\" : '^.*: [0-9]*: \\(.*\\):')\" ;\n  else\n    vars_script_name=\"\" ;\n  fi\nfi\n\nif [ \"\" = \"$vars_script_name\" ] ; then\n  >&2 echo \":: ERROR: Unable to proceed: possible causes listed below.\"\n  >&2 echo \"   This script must be sourced. Did you execute or source this script?\" ;\n  >&2 echo \"   Unrecognized/unsupported shell (supported: bash, zsh, ksh, m/lksh, dash).\" ;\n  >&2 echo \"   Can be caused by sourcing from ZSH version 4.x or older.\" ;\n  return 255 2>/dev/null || exit 255\nfi\n\nTBBROOT=$(get_script_path \"${vars_script_name:-}\")/..\nLIBTBB_NAME=\"libtbb.dylib\"\n\nif [ -e \"$TBBROOT/lib/$LIBTBB_NAME\" ]; then\n    export TBBROOT\n\n    LIBRARY_PATH=$(prepend_path \"${TBBROOT}/lib\" \"${LIBRARY_PATH:-}\") ; export LIBRARY_PATH\n    DYLD_LIBRARY_PATH=$(prepend_path \"${TBBROOT}/lib\" \"${DYLD_LIBRARY_PATH:-}\") ; export DYLD_LIBRARY_PATH\n    CPATH=$(prepend_path \"${TBBROOT}/include\" \"${CPATH:-}\") ; export CPATH\n    CMAKE_PREFIX_PATH=$(prepend_path \"${TBBROOT}\" \"${CMAKE_PREFIX_PATH:-}\") ; export CMAKE_PREFIX_PATH\n    PKG_CONFIG_PATH=$(prepend_path \"${TBBROOT}/lib/pkgconfig\" \"${PKG_CONFIG_PATH:-}\") ; export PKG_CONFIG_PATH\nelse\n    >&2 echo \"ERROR: $LIBTBB_NAME library does not exist in $TBBROOT/lib.\"\n    return 255 2>/dev/null || exit 255\nfi\n"
  },
  {
    "path": "third-party/tbb/integration/mac/env/vars.sh.in",
    "content": "#!/bin/sh\n#\n# Copyright (c) 2005-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nexport TBBROOT=@TBBROOT_REPLACEMENT@\n\nDYLD_LIBRARY_PATH=\"@LIBRARY_PATH_REPLACEMENT@:${DYLD_LIBRARY_PATH}\"; export DYLD_LIBRARY_PATH\nLIBRARY_PATH=\"@LIBRARY_PATH_REPLACEMENT@:${LIBRARY_PATH}\"; export LIBRARY_PATH\nCPATH=\"${TBBROOT}/include:${CPATH}\"; export CPATH\nPKG_CONFIG_PATH=\"@LIBRARY_PATH_REPLACEMENT@/pkgconfig:${PKG_CONFIG_PATH}\"; export PKG_CONFIG_PATH\n\n@CMAKE_ENVIRONMENT_SOURCING_STRING@\n"
  },
  {
    "path": "third-party/tbb/integration/pkg-config/tbb.pc.in",
    "content": "# Copyright (c) 2021-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nprefix=@_prefix_for_pc_file@\nlibdir=@_libdir_for_pc_file@\nincludedir=@_includedir_for_pc_file@\n\nName: oneAPI Threading Building Blocks (oneTBB)\nDescription: C++ library for parallel programming on multi-core processors.\nURL: https://github.com/uxlfoundation/oneTBB\nVersion: @TBB_VERSION@\nLibs: -L${libdir} @_tbb_pc_extra_libdir@ -l@_tbb_pc_lib_name@\nCflags: -I${includedir}\n"
  },
  {
    "path": "third-party/tbb/integration/windows/env/vars.bat",
    "content": "@echo off\r\nREM\r\nREM Copyright (c) 2005-2023 Intel Corporation\r\nREM\r\nREM Licensed under the Apache License, Version 2.0 (the \"License\");\r\nREM you may not use this file except in compliance with the License.\r\nREM You may obtain a copy of the License at\r\nREM\r\nREM     http://www.apache.org/licenses/LICENSE-2.0\r\nREM\r\nREM Unless required by applicable law or agreed to in writing, software\r\nREM distributed under the License is distributed on an \"AS IS\" BASIS,\r\nREM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\nREM See the License for the specific language governing permissions and\r\nREM limitations under the License.\r\nREM\r\n\r\nREM Syntax:\r\nREM  %SCRIPT_NAME% [^<arch^>] [^<vs^>]\r\nREM    ^<arch^> should be one of the following\r\nREM        ia32         : Set up for IA-32  architecture\r\nREM        intel64      : Set up for Intel(R) 64  architecture\r\nREM    if ^<arch^> is not set Intel(R) 64 architecture will be used\r\nREM    ^<vs^> should be one of the following\r\nREM        vs2019      : Set to use with Microsoft Visual Studio 2019 runtime DLLs\r\nREM        vs2022      : Set to use with Microsoft Visual Studio 2022 runtime DLLs\r\nREM        all         : Set to use oneTBB statically linked with Microsoft Visual C++ runtime\r\nREM    if ^<vs^> is not set oneTBB dynamically linked with Microsoft Visual C++ runtime will be used.\r\n\r\nset \"SCRIPT_NAME=%~nx0\"\r\nset \"TBB_SCRIPT_DIR=%~d0%~p0\"\r\nset \"TBBROOT=%TBB_SCRIPT_DIR%..\"\r\n\r\n:: Set the default arguments\r\nset TBB_TARGET_ARCH=intel64\r\nset TBB_ARCH_SUFFIX=\r\nset TBB_TARGET_VS=vc14\r\n\r\n:ParseArgs\r\n:: Parse the incoming arguments\r\nif /i \"%1\"==\"\"             goto ParseLayout\r\nif /i \"%1\"==\"ia32\"         (set TBB_TARGET_ARCH=ia32)     & shift & goto ParseArgs\r\nif /i \"%1\"==\"intel64\"      (set TBB_TARGET_ARCH=intel64)  & shift & goto ParseArgs\r\nif /i \"%1\"==\"vs2019\"       (set TBB_TARGET_VS=vc14)       & shift & goto ParseArgs\r\nif /i \"%1\"==\"vs2022\"       (set TBB_TARGET_VS=vc14)       & shift & goto ParseArgs\r\nif /i \"%1\"==\"all\"          (set TBB_TARGET_VS=vc_mt)      & shift & goto ParseArgs\r\n\r\n:ParseLayout\r\nif exist \"%TBBROOT%\\redist\\\" (\r\n    set \"TBB_BIN_DIR=%TBBROOT%\\redist\"\r\n    set \"TBB_SUBDIR=%TBB_TARGET_ARCH%\"\r\n    goto SetEnv\r\n)\r\n\r\nif \"%TBB_TARGET_ARCH%\" == \"ia32\" (\r\n    set TBB_ARCH_SUFFIX=32\r\n)\r\nif exist \"%TBBROOT%\\bin%TBB_ARCH_SUFFIX%\" (\r\n    set \"TBB_BIN_DIR=%TBBROOT%\\bin%TBB_ARCH_SUFFIX%\"\r\n    if \"%TBB_TARGET_VS%\" == \"vc14\" (\r\n        set TBB_TARGET_VS=\r\n    )\r\n    goto SetEnv\r\n)\r\n:: Couldn't parse TBBROOT/bin, unset variable\r\nset TBB_ARCH_SUFFIX=\r\n\r\nif exist \"%TBBROOT%\\..\\redist\\\" (\r\n    set \"TBB_BIN_DIR=%TBBROOT%\\..\\redist\"\r\n    set \"TBB_SUBDIR=%TBB_TARGET_ARCH%\\tbb\"\r\n    goto SetEnv\r\n)\r\n\r\n:SetEnv\r\nif exist \"%TBB_BIN_DIR%\\%TBB_SUBDIR%\\%TBB_TARGET_VS%\\tbb12.dll\" (\r\n    set \"TBB_DLL_PATH=%TBB_BIN_DIR%\\%TBB_SUBDIR%\\%TBB_TARGET_VS%\"\r\n) else (\r\n    echo:\r\n    echo :: ERROR: tbb12.dll library does not exist in \"%TBB_BIN_DIR%\\%TBB_SUBDIR%\\%TBB_TARGET_VS%\\\"\r\n    echo:\r\n    exit /b 255\r\n)\r\n\r\nset \"PATH=%TBB_DLL_PATH%;%PATH%\"\r\n\r\nset \"LIB=%TBBROOT%\\lib%TBB_ARCH_SUFFIX%\\%TBB_SUBDIR%\\%TBB_TARGET_VS%;%LIB%\"\r\nset \"INCLUDE=%TBBROOT%\\include;%INCLUDE%\"\r\nset \"CPATH=%TBBROOT%\\include;%CPATH%\"\r\nset \"CMAKE_PREFIX_PATH=%TBBROOT%;%CMAKE_PREFIX_PATH%\"\r\nset \"PKG_CONFIG_PATH=%TBBROOT%\\lib%TBB_ARCH_SUFFIX%\\pkgconfig;%PKG_CONFIG_PATH%\"\r\n\r\n:End\r\nexit /B 0\r\n"
  },
  {
    "path": "third-party/tbb/integration/windows/env/vars.bat.in",
    "content": "@echo off\nREM\nREM Copyright (c) 2005-2021 Intel Corporation\nREM\nREM Licensed under the Apache License, Version 2.0 (the \"License\");\nREM you may not use this file except in compliance with the License.\nREM You may obtain a copy of the License at\nREM\nREM     http://www.apache.org/licenses/LICENSE-2.0\nREM\nREM Unless required by applicable law or agreed to in writing, software\nREM distributed under the License is distributed on an \"AS IS\" BASIS,\nREM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nREM See the License for the specific language governing permissions and\nREM limitations under the License.\nREM\n\n@echo off\n\nset \"TBBROOT=@TBBROOT_REPLACEMENT@\"\nset \"TBB_DLL_PATH=@BINARY_PATH_REPLACEMENT@\"\n\nset \"INCLUDE=%TBBROOT%\\include;%INCLUDE%\"\nset \"CPATH=%TBBROOT%\\include;%CPATH%\"\nset \"LIB=@LIBRARY_PATH_REPLACEMENT@;%LIB%\"\nset \"PATH=@BINARY_PATH_REPLACEMENT@;%PATH%\"\nset \"PKG_CONFIG_PATH=@LIBRARY_PATH_REPLACEMENT@\\pkgconfig;%PKG_CONFIG_PATH%\"\n\n@CMAKE_ENVIRONMENT_SOURCING_STRING@\n"
  },
  {
    "path": "third-party/tbb/integration/windows/nuget/inteltbb.devel.win.targets",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n    Copyright (c) 2019-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <!-- include files -->\n  <ItemDefinitionGroup>\n    <ClCompile>\n      <AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)..\\..\\build\\native\\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions Condition=\"'$(Configuration)' == 'Debug'\">TBB_USE_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n  </ItemDefinitionGroup>\n\n  <!-- .lib files -->\n  <ItemDefinitionGroup Condition=\"$(Configuration.ToLower().Contains('release')) AND '$(Platform)' == 'Win32'\">\n    <Link>\n      <AdditionalLibraryDirectories>$(MSBuildThisFileDirectory)..\\..\\build\\native\\win-x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n      <AdditionalDependencies>tbb12.lib;tbbmalloc.lib;tbbmalloc_proxy.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"$(Configuration.ToLower().Contains('release')) AND '$(Platform)' == 'x64'\">\n    <Link>\n      <AdditionalLibraryDirectories>$(MSBuildThisFileDirectory)..\\..\\build\\native\\win-x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n      <AdditionalDependencies>tbb12.lib;tbbmalloc.lib;tbbmalloc_proxy.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"$(Configuration.ToLower().Contains('debug')) AND '$(Platform)' == 'Win32'\">\n    <Link>\n      <AdditionalLibraryDirectories>$(MSBuildThisFileDirectory)..\\..\\build\\native\\win-x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n      <AdditionalDependencies>tbb12_debug.lib;tbbmalloc_debug.lib;tbbmalloc_proxy_debug.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"$(Configuration.ToLower().Contains('debug')) AND '$(Platform)' == 'x64'\">\n    <Link>\n      <AdditionalLibraryDirectories>$(MSBuildThisFileDirectory)..\\..\\build\\native\\win-x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n      <AdditionalDependencies>tbb12_debug.lib;tbbmalloc_debug.lib;tbbmalloc_proxy_debug.lib;%(AdditionalDependencies)</AdditionalDependencies>\n    </Link>\n  </ItemDefinitionGroup>\n\n  <!-- .dll files -->\n  <Target Name=\"TBBNuGet_CopyDebugDllsToOutDir\" Condition=\"$(Configuration.ToLower().Contains('debug'))\" BeforeTargets=\"PrepareForRun\">\n      <ItemGroup Condition=\"(Exists('packages.config') OR\n                             Exists('$(MSBuildProjectName).packages.config') OR\n                             Exists('packages.$(MSBuildProjectName).config'))\">\n        <FilesToCopy Include=\"$(MSBuildThisFileDirectory)\\..\\..\\runtimes\\win-x86\\native\\*.dll\" Condition=\"'$(Platform)' == 'Win32'\"/>\n        <FilesToCopy Include=\"$(MSBuildThisFileDirectory)\\..\\..\\runtimes\\win-x64\\native\\*.dll\" Condition=\"'$(Platform)' == 'x64'\"/>\n      </ItemGroup>\n      <Copy SourceFiles=\"@(FilesToCopy)\" SkipUnchangedFiles=\"true\" DestinationFolder=\"$(OutDir)\"/>\n  </Target>\n\n</Project>\n"
  },
  {
    "path": "third-party/tbb/integration/windows/nuget/inteltbb.redist.win.targets",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n    Copyright (c) 2019-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n\n  <Target Name=\"TBBNuGet_CopyReleaseDllsToOutDir\" BeforeTargets=\"PrepareForRun\">\n      <ItemGroup Condition=\"(Exists('packages.config') OR\n                             Exists('$(MSBuildProjectName).packages.config') OR\n                             Exists('packages.$(MSBuildProjectName).config'))\">\n        <FilesToCopy Include=\"$(MSBuildThisFileDirectory)\\..\\..\\runtimes\\win-x86\\native\\*.dll\" Condition=\"'$(Platform)' == 'Win32'\"/>\n        <FilesToCopy Include=\"$(MSBuildThisFileDirectory)\\..\\..\\runtimes\\win-x64\\native\\*.dll\" Condition=\"'$(Platform)' == 'x64'\"/>\n      </ItemGroup>\n      <Copy SourceFiles=\"@(FilesToCopy)\" SkipUnchangedFiles=\"true\" DestinationFolder=\"$(OutDir)\"/>\n  </Target>\n\n</Project>\n"
  },
  {
    "path": "third-party/tbb/integration/windows/oneapi/vars.bat",
    "content": "@echo off\r\nREM\r\nREM Copyright (c) 2023 Intel Corporation\r\nREM\r\nREM Licensed under the Apache License, Version 2.0 (the \"License\");\r\nREM you may not use this file except in compliance with the License.\r\nREM You may obtain a copy of the License at\r\nREM\r\nREM     http://www.apache.org/licenses/LICENSE-2.0\r\nREM\r\nREM Unless required by applicable law or agreed to in writing, software\r\nREM distributed under the License is distributed on an \"AS IS\" BASIS,\r\nREM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\nREM See the License for the specific language governing permissions and\r\nREM limitations under the License.\r\nREM\r\n\r\nif not defined SETVARS_CALL (\r\n    echo:\r\n    echo :: ERROR: This script must be executed by setvars.bat.\r\n    echo:   Try '[install-dir]\\setvars.bat --help' for help.\r\n    echo:\r\n    exit /b 255\r\n)\r\n\r\nif not defined ONEAPI_ROOT (\r\n    echo:\r\n    echo :: ERROR: This script requires that the ONEAPI_ROOT env variable is set.\"\r\n    echo:   Try '[install-dir]\\setvars.bat --help' for help.\r\n    echo:\r\n    exit /b 254\r\n)\r\n\r\nset \"TBBROOT=%ONEAPI_ROOT%\"\r\n\r\n:: Set the default arguments\r\nset \"TBB_TARGET_ARCH=%INTEL_TARGET_ARCH%\"\r\nset TBB_TARGET_VS=\r\nset ARCH_SUFFIX=\r\n\r\n:ParseArgs\r\n:: Parse the incoming arguments\r\nif /i \"%1\"==\"\"        goto SetEnv\r\nif /i \"%1\"==\"vs2019\"       (set TBB_TARGET_VS= )       & shift & goto ParseArgs\r\nif /i \"%1\"==\"vs2022\"       (set TBB_TARGET_VS= )       & shift & goto ParseArgs\r\nif /i \"%1\"==\"all\"          (set TBB_TARGET_VS=vc_mt)   & shift & goto ParseArgs\r\n\r\nif \"%TBB_TARGET_ARCH%\"==\"ia32\" set ARCH_SUFFIX=32  \r\n\r\n:SetEnv\r\nif exist \"%TBBROOT%\\bin%ARCH_SUFFIX%\\%TBB_TARGET_VS%\\tbb12.dll\" (\r\n    set \"TBB_DLL_PATH=%TBBROOT%\\bin%ARCH_SUFFIX%\\%TBB_TARGET_VS%\"\r\n)\r\n\r\n:End\r\nexit /B 0\r\n"
  },
  {
    "path": "third-party/tbb/integration/windows/sys_check/sys_check.bat",
    "content": "@echo off\r\nREM\r\nREM Copyright (c) 2019-2021 Intel Corporation\r\nREM\r\nREM Licensed under the Apache License, Version 2.0 (the \"License\");\r\nREM you may not use this file except in compliance with the License.\r\nREM You may obtain a copy of the License at\r\nREM\r\nREM     http://www.apache.org/licenses/LICENSE-2.0\r\nREM\r\nREM Unless required by applicable law or agreed to in writing, software\r\nREM distributed under the License is distributed on an \"AS IS\" BASIS,\r\nREM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\nREM See the License for the specific language governing permissions and\r\nREM limitations under the License.\r\nREM\r\n\r\nexit /B 0\r\n"
  },
  {
    "path": "third-party/tbb/python/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfind_package(PythonInterp 3.5 REQUIRED)\n\nset(PYTHON_BUILD_WORK_DIR python_build)\n\nadd_custom_target(\n    python_copy\n    COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/tbb ${PYTHON_BUILD_WORK_DIR}/tbb\n    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/TBB.py ${PYTHON_BUILD_WORK_DIR}\n    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/setup.py ${PYTHON_BUILD_WORK_DIR}\n)\n\n# Python build requires path to TBB headers\nget_target_property(TBB_INCLUDES tbb INTERFACE_INCLUDE_DIRECTORIES)\nforeach(dir ${TBB_INCLUDES})\n    if (${dir} MATCHES \"<BUILD_INTERFACE:\" OR TBB_FOUND)\n        set(TBB4PY_INCLUDE_STRING \"-I${dir} ${TBB4PY_INCLUDE_STRING}\")\n    endif()\nendforeach()\nstring(STRIP \"${TBB4PY_INCLUDE_STRING}\" TBB4PY_INCLUDE_STRING)\n\nadd_custom_target(\n    python_build\n    ALL\n    DEPENDS tbb python_copy\n    COMMAND\n    ${PYTHON_EXECUTABLE} ${PYTHON_BUILD_WORK_DIR}/setup.py\n        build -b${PYTHON_BUILD_WORK_DIR}\n        build_ext ${TBB4PY_INCLUDE_STRING} -L$<TARGET_FILE_DIR:TBB::tbb>\n        install --prefix build -f\n    COMMENT \"Build and install to work directory the oneTBB Python module\"\n)\n\nadd_test(NAME python_test\n         COMMAND ${CMAKE_COMMAND}\n                 -DTBB_BINARIES_PATH=$<TARGET_FILE_DIR:TBB::tbb>\n                 -DPYTHON_MODULE_BUILD_PATH=${PYTHON_BUILD_WORK_DIR}/build\n                 -P ${PROJECT_SOURCE_DIR}/cmake/python/test_launcher.cmake)\n\ninstall(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${PYTHON_BUILD_WORK_DIR}/build/\n        DESTINATION .\n        COMPONENT tbb4py)\n\nif (UNIX AND NOT APPLE)\n    add_subdirectory(rml)\n    add_dependencies(python_build irml)\nendif()\n"
  },
  {
    "path": "third-party/tbb/python/README.md",
    "content": "# Python* API for Intel&reg; oneAPI Threading Building Blocks (oneTBB) .\n\n## Overview\nIt is a preview Python* module which unlocks opportunities for additional performance in\nmulti-threaded and multiprocess Python programs by enabling threading composability\nbetween two or more thread-enabled libraries like Numpy, Scipy, Sklearn, Dask, Joblib, and etc.\n\nThe biggest improvement can be achieved when a task pool like the ThreadPool or Pool from the Python\nstandard library or libraries like Dask or Joblib (used either in multi-threading or multi-processing mode)\nexecute tasks calling compute-intensive functions of Numpy/Scipy/Sklearn/PyDAAL which in turn are\nparallelized using Intel&reg; oneAPI Math Kernel Library or/and oneTBB.\n\nThe module implements Pool class with the standard interface using oneTBB which can be used to replace Python's ThreadPool.\nThanks to the monkey-patching technique implemented in class Monkey, no source code change is needed in order to enable threading composability in Python programs.\n\nFor more information and examples, please refer to [forum discussion](https://community.intel.com/t5/Intel-Distribution-for-Python/TBB-module-Unleash-parallel-performance-of-Python-programs/m-p/1074459).\n\n## Directories\n - **rml** - The folder contains sources for building the plugin with cross-process dynamic thread scheduler implementation.\n - **tbb** - The folder contains Python module sources.\n\n## Files\n - **setup.py** - Standard Python setup script.\n - **TBB.py** - Alternative entry point for Python module.\n\n## CMake predefined targets\n - `irml` - compilation of plugin with cross-process dynamic thread scheduler implementation.\n - `python_build` - building of oneTBB module for Python.\n\n## Command-line interface\n\n - `python3 -m tbb -h` - Print documentation on command-line interface.\n - `pydoc tbb` - Read built-in documentation for Python interfaces.\n - `python3 -m tbb your_script.py` - Run your_script.py in context of `with tbb.Monkey():` when oneTBB is enabled. By default only multi-threading will be covered.\n - `python3 -m tbb --ipc your_script.py` - Run your_script.py in context of `with tbb.Monkey():` when oneTBB enabled in both multi-threading and multi-processing modes.\n - `python3 setup.py build -b<output_directory_path> -f check` - Build oneTBB module for Python. (Prerequisites: built and sourced oneTBB and IRML libraries)\n - `python3 setup.py build -b<output_directory_path> build_ext -I<path_to_tbb_includes> -L<path_to_prebuilt_libraries> install -f <additional_flags> ` - Build and install oneTBB module for Python. (Prerequisites: built oneTBB and IRML libraries)\n - `python3 -m TBB test` - run test for oneTBB module for Python.\n - `python3 -m tbb test` - run test for oneTBB module for Python.\n\n## System Requirements\n - The Python module was not tested on older versions of Python thus we require at least Python and 3.5 or higher.\n - SWIG must be of version 3.0.6 or higher.\n"
  },
  {
    "path": "third-party/tbb/python/TBB.py",
    "content": "# Copyright (c) 2016-2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\nfrom tbb import *\nfrom tbb import __all__, __doc__\n\nif __name__ == \"__main__\":\n    from tbb import _main\n    import sys\n    sys.exit(_main())\n"
  },
  {
    "path": "third-party/tbb/python/rml/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nadd_library(irml \n    ../../src/tbb/allocator.cpp\n    ../../src/tbb/dynamic_link.cpp\n    ../../src/tbb/misc.cpp\n    ../../src/tbb/misc_ex.cpp\n    ../../src/tbb/exception.cpp\n    ipc_server.cpp\n    ipc_utils.cpp\n)\nadd_library(TBB::irml ALIAS irml)\n\nset_target_properties(irml PROPERTIES VERSION 1)\n\ntarget_include_directories(irml\n    PUBLIC\n    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include>\n    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)\n\ntarget_compile_options(irml\n    PRIVATE\n    ${TBB_CXX_STD_FLAG} # TODO: consider making it PUBLIC.\n    ${TBB_MMD_FLAG}\n    ${TBB_DSE_FLAG}\n    ${TBB_WARNING_LEVEL}\n    ${TBB_LIB_COMPILE_FLAGS}\n    ${TBB_COMMON_COMPILE_FLAGS}\n)\n\ntarget_compile_definitions(irml\n                           PUBLIC\n                           $<$<CONFIG:DEBUG>:TBB_USE_DEBUG>)\n\n# Prefer using target_link_options instead of target_link_libraries to specify link options because\n# target_link_libraries may incorrectly handle some options (on Windows, for example).\nif (COMMAND target_link_options)\n    target_link_options(irml\n        PRIVATE\n        ${TBB_LIB_LINK_FLAGS}\n        ${TBB_COMMON_LINK_FLAGS}\n    )\nelse()\n    target_link_libraries(irml\n        PRIVATE\n        ${TBB_LIB_LINK_FLAGS}\n        ${TBB_COMMON_LINK_FLAGS}\n    )\nendif()\n\ntarget_link_libraries(irml\n    PRIVATE\n    Threads::Threads\n    ${TBB_LIB_LINK_LIBS}\n    ${TBB_COMMON_LINK_LIBS}\n)\n\nif (DEFINED TBB_SIGNTOOL)\n    string(REPLACE \" \" \";\" TBB_SIGNTOOL_ARGS \"${TBB_SIGNTOOL_ARGS}\")\n    add_custom_command(TARGET irml POST_BUILD COMMAND ${TBB_SIGNTOOL} $<TARGET_FILE:irml> ${TBB_SIGNTOOL_ARGS})\nendif()\n\ninstall(TARGETS irml\n    EXPORT TBBTargets\n    LIBRARY\n        DESTINATION ${CMAKE_INSTALL_LIBDIR}\n        COMPONENT tbb4py\n    RUNTIME\n        DESTINATION ${CMAKE_INSTALL_BINDIR}\n        COMPONENT tbb4py\n    ARCHIVE\n        DESTINATION ${CMAKE_INSTALL_LIBDIR}\n        COMPONENT tbb4py)\n"
  },
  {
    "path": "third-party/tbb/python/rml/ipc_server.cpp",
    "content": "/*\n    Copyright (c) 2017-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <atomic>\n#include <cstring>\n#include <cstdlib>\n\n#include \"../../src/tbb/rml_tbb.h\"\n#include \"../../src/tbb/rml_thread_monitor.h\"\n#include \"../../src/tbb/scheduler_common.h\"\n#include \"../../src/tbb/governor.h\"\n#include \"../../src/tbb/misc.h\"\n#include \"tbb/cache_aligned_allocator.h\"\n\n#include \"ipc_utils.h\"\n\n#include <fcntl.h>\n#include <stdlib.h>\n\nnamespace rml {\nnamespace internal {\n\nstatic const char* IPC_ENABLE_VAR_NAME = \"IPC_ENABLE\";\n\ntypedef versioned_object::version_type version_type;\n\nextern \"C\" factory::status_type __RML_open_factory(factory& f, version_type& /*server_version*/, version_type /*client_version*/) {\n    if( !tbb::internal::rml::get_enable_flag( IPC_ENABLE_VAR_NAME ) ) {\n        return factory::st_incompatible;\n    }\n\n    // Hack to keep this library from being closed\n    static std::atomic<bool> one_time_flag{false};\n    bool expected = false;\n\n    if( one_time_flag.compare_exchange_strong(expected, true) ) {\n        __TBB_ASSERT( (size_t)f.library_handle!=factory::c_dont_unload, nullptr );\n#if _WIN32||_WIN64\n        f.library_handle = reinterpret_cast<HMODULE>(factory::c_dont_unload);\n#else\n        f.library_handle = reinterpret_cast<void*>(factory::c_dont_unload);\n#endif\n    }\n    // End of hack\n\n    return factory::st_success;\n}\n\nextern \"C\" void __RML_close_factory(factory& /*f*/) {\n}\n\nclass ipc_thread_monitor : public tbb::detail::r1::rml::internal::thread_monitor {\npublic:\n    ipc_thread_monitor() : thread_monitor() {}\n\n#if USE_WINTHREAD\n#elif USE_PTHREAD\n    static handle_type launch(thread_routine_type thread_routine, void* arg, size_t stack_size);\n#endif\n};\n\n#if USE_WINTHREAD\n#elif USE_PTHREAD\ninline ipc_thread_monitor::handle_type ipc_thread_monitor::launch(void* (*thread_routine)(void*), void* arg, size_t stack_size) {\n    pthread_attr_t s;\n    if( pthread_attr_init( &s ) ) return 0;\n    if( stack_size>0 ) {\n        if( pthread_attr_setstacksize( &s, stack_size ) ) return 0;\n    }\n    pthread_t handle;\n    if( pthread_create( &handle, &s, thread_routine, arg ) ) return 0;\n    if( pthread_attr_destroy( &s ) ) return 0;\n    return handle;\n}\n#endif\n\n}} // rml::internal\n\nusing rml::internal::ipc_thread_monitor;\nusing tbb::internal::rml::get_shared_name;\n\nnamespace tbb {\nnamespace detail {\n\nnamespace r1 {\nbool terminate_on_exception() {\n    return false;\n}\n}\n\nnamespace rml {\n\ntypedef ipc_thread_monitor::handle_type thread_handle;\n\nclass ipc_server;\n\nstatic const char* IPC_MAX_THREADS_VAR_NAME = \"MAX_THREADS\";\nstatic const char* IPC_ACTIVE_SEM_PREFIX = \"/__IPC_active\";\nstatic const char* IPC_STOP_SEM_PREFIX = \"/__IPC_stop\";\nstatic const char* IPC_ACTIVE_SEM_VAR_NAME = \"IPC_ACTIVE_SEMAPHORE\";\nstatic const char* IPC_STOP_SEM_VAR_NAME = \"IPC_STOP_SEMAPHORE\";\nstatic const mode_t IPC_SEM_MODE = 0660;\n\nstatic std::atomic<int> my_global_thread_count;\nusing tbb_client = tbb::detail::r1::rml::tbb_client;\nusing tbb_server = tbb::detail::r1::rml::tbb_server;\nusing tbb_factory = tbb::detail::r1::rml::tbb_factory;\n\nusing tbb::detail::r1::runtime_warning;\n\nchar* get_sem_name(const char* name, const char* prefix) {\n    __TBB_ASSERT(name != nullptr, nullptr);\n    __TBB_ASSERT(prefix != nullptr, nullptr);\n    char* value = std::getenv(name);\n    std::size_t len = value == nullptr ? 0 : std::strlen(value);\n    if (len > 0) {\n        // TODO: consider returning the original string instead of the copied string.\n        char* sem_name = new char[len + 1];\n        __TBB_ASSERT(sem_name != nullptr, nullptr);\n        std::strncpy(sem_name, value, len+1);\n        __TBB_ASSERT(sem_name[len] == 0, nullptr);\n        return sem_name;\n    } else {\n        return get_shared_name(prefix);\n    }\n}\n\nchar* get_active_sem_name() {\n    return get_sem_name(IPC_ACTIVE_SEM_VAR_NAME, IPC_ACTIVE_SEM_PREFIX);\n}\n\nchar* get_stop_sem_name() {\n    return get_sem_name(IPC_STOP_SEM_VAR_NAME, IPC_STOP_SEM_PREFIX);\n}\n\nstatic void release_thread_sem(sem_t* my_sem) {\n    int old = my_global_thread_count.load(std::memory_order_relaxed);\n    do {\n        if( old<=0 ) return;\n    } while( !my_global_thread_count.compare_exchange_strong(old, old-1) );\n    if( old>0 ) {\n        sem_post( my_sem );\n    }\n}\n\nvoid set_sem_name(const char* name, const char* prefix) {\n    __TBB_ASSERT(name != nullptr, nullptr);\n    __TBB_ASSERT(prefix != nullptr, nullptr);\n    const char* postfix = \"_XXXXXX\";\n    std::size_t plen = std::strlen(prefix);\n    std::size_t xlen = std::strlen(postfix);\n    char* templ = new char[plen + xlen + 1];\n    __TBB_ASSERT(templ != nullptr, nullptr);\n    strncpy(templ, prefix, plen+1);\n    __TBB_ASSERT(templ[plen] == 0, nullptr);\n    strncat(templ, postfix, xlen + 1);\n    __TBB_ASSERT(std::strlen(templ) == plen + xlen + 1, nullptr);\n    // TODO: consider using mkstemp instead of mktemp.\n    char* sem_name = mktemp(templ);\n    if (sem_name != nullptr) {\n        int status = setenv(name, sem_name,  /*overwrite*/ 1);\n        __TBB_ASSERT_EX(status == 0, nullptr);\n    }\n    delete[] templ;\n}\n\nextern \"C\" void set_active_sem_name() {\n    set_sem_name(IPC_ACTIVE_SEM_VAR_NAME, IPC_ACTIVE_SEM_PREFIX);\n}\n\nextern \"C\" void set_stop_sem_name() {\n    set_sem_name(IPC_STOP_SEM_VAR_NAME, IPC_STOP_SEM_PREFIX);\n}\n\nextern \"C\" void release_resources() {\n    if( my_global_thread_count.load(std::memory_order_acquire)!=0 ) {\n        char* active_sem_name = get_active_sem_name();\n        sem_t* my_active_sem = sem_open( active_sem_name, O_CREAT );\n        __TBB_ASSERT( my_active_sem, \"Unable to open active threads semaphore\" );\n        delete[] active_sem_name;\n\n        do {\n            release_thread_sem( my_active_sem );\n        } while( my_global_thread_count.load(std::memory_order_acquire)!=0 );\n    }\n}\n\nextern \"C\" void release_semaphores() {\n    int status = 0;\n    char* sem_name = nullptr;\n\n    sem_name = get_active_sem_name();\n    if( sem_name==nullptr ) {\n        runtime_warning(\"Can not get RML semaphore name\");\n        return;\n    }\n    status = sem_unlink( sem_name );\n    if( status!=0 ) {\n        if( errno==ENOENT ) {\n            /* There is no semaphore with the given name, nothing to do */\n        } else {\n            runtime_warning(\"Can not release RML semaphore\");\n            return;\n        }\n    }\n    delete[] sem_name;\n\n    sem_name = get_stop_sem_name();\n    if( sem_name==nullptr ) {\n        runtime_warning( \"Can not get RML semaphore name\" );\n        return;\n    }\n    status = sem_unlink( sem_name );\n    if( status!=0 ) {\n        if( errno==ENOENT ) {\n            /* There is no semaphore with the given name, nothing to do */\n        } else {\n            runtime_warning(\"Can not release RML semaphore\");\n            return;\n        }\n    }\n    delete[] sem_name;\n}\n\nclass ipc_worker: no_copy {\nprotected:\n    //! State in finite-state machine that controls the worker.\n    /** State diagram:\n                    /----------stop---\\\n                    |           ^     |\n                    V           |     |\n        init --> starting --> normal  |\n          |         |           |     |\n          |         V           |     |\n          \\------> quit <-------/<----/\n      */\n    enum state_t {\n        //! *this is initialized\n        st_init,\n        //! *this has associated thread that is starting up.\n        st_starting,\n        //! Associated thread is doing normal life sequence.\n        st_normal,\n        //! Associated thread is stopped but can be started again.\n        st_stop,\n        //! Associated thread has ended normal life sequence and promises to never touch *this again.\n        st_quit\n    };\n    std::atomic<state_t> my_state;\n\n    //! Associated server\n    ipc_server& my_server;\n\n    //! Associated client\n    tbb_client& my_client;\n\n    //! index used for avoiding the 64K aliasing problem\n    const size_t my_index;\n\n    //! Monitor for sleeping when there is no work to do.\n    /** The invariant that holds for sleeping workers is:\n        \"my_slack<=0 && my_state==st_normal && I am on server's list of asleep threads\" */\n    ipc_thread_monitor my_thread_monitor;\n\n    //! Handle of the OS thread associated with this worker\n    thread_handle my_handle;\n\n    //! Link for list of workers that are sleeping or have no associated thread.\n    ipc_worker* my_next;\n\n    friend class ipc_server;\n\n    //! Actions executed by the associated thread\n    void run();\n\n    //! Wake up associated thread (or launch a thread if there is none)\n    bool wake_or_launch();\n\n    //! Called by a thread (usually not the associated thread) to commence termination.\n    void start_shutdown(bool join);\n\n    //! Called by a thread (usually not the associated thread) to commence stopping.\n    void start_stopping(bool join);\n\n    static __RML_DECL_THREAD_ROUTINE thread_routine(void* arg);\n\n    static void release_handle(thread_handle my_handle, bool join);\n\nprotected:\n    ipc_worker(ipc_server& server, tbb_client& client, const size_t i) :\n        my_server(server),\n        my_client(client),\n        my_index(i)\n    {\n        my_state = st_init;\n    }\n};\n\n//TODO: cannot bind to nfs_size from allocator.cpp since nfs_size is constexpr defined in another translation unit\nconstexpr static size_t cache_line_sz = 128;\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    // Suppress overzealous compiler warnings about uninstantiable class\n    #pragma warning(push)\n    #pragma warning(disable:4510 4610)\n#endif\nclass padded_ipc_worker: public ipc_worker {\n    char pad[cache_line_sz - sizeof(ipc_worker)%cache_line_sz];\npublic:\n    padded_ipc_worker(ipc_server& server, tbb_client& client, const size_t i)\n    : ipc_worker( server,client,i ) { suppress_unused_warning(pad); }\n};\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    #pragma warning(pop)\n#endif\n\nclass ipc_waker : public padded_ipc_worker {\nprivate:\n    static __RML_DECL_THREAD_ROUTINE thread_routine(void* arg);\n    void run();\n    bool wake_or_launch();\n\n    friend class ipc_server;\n\npublic:\n    ipc_waker(ipc_server& server, tbb_client& client, const size_t i)\n    : padded_ipc_worker( server, client, i ) {}\n};\n\nclass ipc_stopper : public padded_ipc_worker {\nprivate:\n    static __RML_DECL_THREAD_ROUTINE thread_routine(void* arg);\n    void run();\n    bool wake_or_launch();\n\n    friend class ipc_server;\n\npublic:\n    ipc_stopper(ipc_server& server, tbb_client& client, const size_t i)\n    : padded_ipc_worker( server, client, i ) {}\n};\n\nclass ipc_server: public tbb_server, no_copy {\nprivate:\n    tbb_client& my_client;\n    //! Maximum number of threads to be created.\n    /** Threads are created lazily, so maximum might not actually be reached. */\n    tbb_client::size_type my_n_thread;\n\n    //! Stack size for each thread. */\n    const size_t my_stack_size;\n\n    //! Number of jobs that could use their associated thread minus number of active threads.\n    /** If negative, indicates oversubscription.\n        If positive, indicates that more threads should run.\n        Can be lowered asynchronously, but must be raised only while holding my_asleep_list_mutex,\n        because raising it impacts the invariant for sleeping threads. */\n    std::atomic<int> my_slack;\n\n    //! Counter used to determine when to delete this.\n    std::atomic<int> my_ref_count;\n\n    padded_ipc_worker* my_thread_array;\n\n    //! List of workers that are asleep or committed to sleeping until notified by another thread.\n    std::atomic<ipc_worker*> my_asleep_list_root;\n\n    //! Protects my_asleep_list_root\n    typedef scheduler_mutex_type asleep_list_mutex_type;\n    asleep_list_mutex_type my_asleep_list_mutex;\n\n    //! Should server wait workers while terminate\n    const bool my_join_workers;\n\n    //! Service thread for waking of workers\n    ipc_waker* my_waker;\n\n    //! Service thread to stop threads\n    ipc_stopper* my_stopper;\n\n    //! Semaphore to account active threads\n    sem_t* my_active_sem;\n\n    //! Semaphore to account stop threads\n    sem_t* my_stop_sem;\n\n#if TBB_USE_ASSERT\n    std::atomic<int> my_net_slack_requests;\n#endif /* TBB_USE_ASSERT */\n\n    //! Wake up to two sleeping workers, if there are any sleeping.\n    /** The call is used to propagate a chain reaction where each thread wakes up two threads,\n        which in turn each wake up two threads, etc. */\n    void propagate_chain_reaction() {\n        // First test of a double-check idiom.  Second test is inside wake_some(0).\n        if( my_slack.load(std::memory_order_acquire)>0 ) {\n            int active_threads = 0;\n            if( try_get_active_thread() ) {\n                ++active_threads;\n                if( try_get_active_thread() ) {\n                    ++active_threads;\n                }\n                wake_some( 0, active_threads );\n            }\n        }\n    }\n\n    //! Try to add t to list of sleeping workers\n    bool try_insert_in_asleep_list(ipc_worker& t);\n\n    //! Try to add t to list of sleeping workers even if there is some work to do\n    bool try_insert_in_asleep_list_forced(ipc_worker& t);\n\n    //! Equivalent of adding additional_slack to my_slack and waking up to 2 threads if my_slack permits.\n    void wake_some(int additional_slack, int active_threads);\n\n    //! Equivalent of adding additional_slack to my_slack and waking up to 1 thread if my_slack permits.\n    void wake_one_forced(int additional_slack);\n\n    //! Stop one thread from asleep list\n    bool stop_one();\n\n    //! Wait for active thread\n    bool wait_active_thread();\n\n    //! Try to get active thread\n    bool try_get_active_thread();\n\n    //! Release active thread\n    void release_active_thread();\n\n    //! Wait for thread to stop\n    bool wait_stop_thread();\n\n    //! Add thread to stop list\n    void add_stop_thread();\n\n    void remove_server_ref() {\n        if( --my_ref_count==0 ) {\n            my_client.acknowledge_close_connection();\n            this->~ipc_server();\n            tbb::cache_aligned_allocator<ipc_server>().deallocate( this, 1 );\n        }\n    }\n\n    friend class ipc_worker;\n    friend class ipc_waker;\n    friend class ipc_stopper;\npublic:\n    ipc_server(tbb_client& client);\n    virtual ~ipc_server();\n\n    version_type version() const override {\n        return 0;\n    }\n\n    void request_close_connection(bool /*exiting*/) override {\n        my_waker->start_shutdown(false);\n        my_stopper->start_shutdown(false);\n        for( size_t i=0; i<my_n_thread; ++i )\n            my_thread_array[i].start_shutdown( my_join_workers );\n        remove_server_ref();\n    }\n\n    void yield() override {d0::yield();}\n\n    void independent_thread_number_changed(int) override { __TBB_ASSERT( false, nullptr ); }\n\n    unsigned default_concurrency() const override { return my_n_thread - 1; }\n\n    void adjust_job_count_estimate(int delta) override;\n\n#if _WIN32||_WIN64\n    void register_external_thread(::rml::server::execution_resource_t&) override {}\n    void unregister_external_thread(::rml::server::execution_resource_t) override {}\n#endif /* _WIN32||_WIN64 */\n};\n\n//------------------------------------------------------------------------\n// Methods of ipc_worker\n//------------------------------------------------------------------------\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    // Suppress overzealous compiler warnings about an initialized variable 'sink_for_alloca' not referenced\n    #pragma warning(push)\n    #pragma warning(disable:4189)\n#endif\n#if __MINGW32__ && __GNUC__==4 &&__GNUC_MINOR__>=2 && !__MINGW64__\n// ensure that stack is properly aligned\n__attribute__((force_align_arg_pointer))\n#endif\n__RML_DECL_THREAD_ROUTINE ipc_worker::thread_routine(void* arg) {\n    ipc_worker* self = static_cast<ipc_worker*>(arg);\n    AVOID_64K_ALIASING( self->my_index );\n    self->run();\n    return 0;\n}\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    #pragma warning(pop)\n#endif\n\nvoid ipc_worker::release_handle(thread_handle handle, bool join) {\n    if( join )\n        ipc_thread_monitor::join( handle );\n    else\n        ipc_thread_monitor::detach_thread( handle );\n}\n\nvoid ipc_worker::start_shutdown(bool join) {\n    state_t s = my_state.load(std::memory_order_relaxed);\n\n    do {\n        __TBB_ASSERT( s!=st_quit, nullptr );\n    } while( !my_state.compare_exchange_strong( s, st_quit ) );\n    if( s==st_normal || s==st_starting ) {\n        // May have invalidated invariant for sleeping, so wake up the thread.\n        // Note that the notify() here occurs without maintaining invariants for my_slack.\n        // It does not matter, because my_state==st_quit overrides checking of my_slack.\n        my_thread_monitor.notify();\n        // Do not need release handle in st_init state,\n        // because in this case the thread wasn't started yet.\n        // For st_starting release is done at launch site.\n        if( s==st_normal )\n            release_handle( my_handle, join );\n    }\n}\n\nvoid ipc_worker::start_stopping(bool join) {\n    state_t s = my_state.load(std::memory_order_relaxed);\n\n    while( !my_state.compare_exchange_strong( s, st_quit ) ) {};\n    if( s==st_normal || s==st_starting ) {\n        // May have invalidated invariant for sleeping, so wake up the thread.\n        // Note that the notify() here occurs without maintaining invariants for my_slack.\n        // It does not matter, because my_state==st_quit overrides checking of my_slack.\n        my_thread_monitor.notify();\n        // Do not need release handle in st_init state,\n        // because in this case the thread wasn't started yet.\n        // For st_starting release is done at launch site.\n        if( s==st_normal )\n            release_handle( my_handle, join );\n    }\n}\n\nvoid ipc_worker::run() {\n    my_server.propagate_chain_reaction();\n\n    // Transiting to st_normal here would require setting my_handle,\n    // which would create race with the launching thread and\n    // complications in handle management on Windows.\n\n    ::rml::job& j = *my_client.create_one_job();\n    state_t state = my_state.load(std::memory_order_acquire);\n    while( state!=st_quit && state!=st_stop ) {\n        if( my_server.my_slack>=0 ) {\n            my_client.process(j);\n        } else {\n            // Check/set the invariant for sleeping\n            state = my_state.load(std::memory_order_seq_cst);\n            if( state!=st_quit && state!=st_stop && my_server.try_insert_in_asleep_list(*this) ) {\n                if( my_server.my_n_thread > 1 ) my_server.release_active_thread();\n                my_thread_monitor.wait();\n                my_server.propagate_chain_reaction();\n            }\n        }\n        // memory_order_seq_cst to be strictly ordered after thread_monitor::wait\n        state = my_state.load(std::memory_order_seq_cst);\n    }\n    my_client.cleanup(j);\n\n    my_server.remove_server_ref();\n}\n\ninline bool ipc_worker::wake_or_launch() {\n    state_t excepted_stop = st_stop, expected_init = st_init;\n    if( ( my_state.load(std::memory_order_acquire)==st_init && my_state.compare_exchange_strong( expected_init, st_starting ) ) ||\n        ( my_state.load(std::memory_order_acquire)==st_stop && my_state.compare_exchange_strong( excepted_stop, st_starting ) ) ) {\n        // after this point, remove_server_ref() must be done by created thread\n#if USE_WINTHREAD\n        my_handle = ipc_thread_monitor::launch( thread_routine, this, my_server.my_stack_size, &this->my_index );\n#elif USE_PTHREAD\n        {\n        affinity_helper fpa;\n        fpa.protect_affinity_mask( /*restore_process_mask=*/true );\n        my_handle = ipc_thread_monitor::launch( thread_routine, this, my_server.my_stack_size );\n        if( my_handle == 0 ) {\n            // Unable to create new thread for process\n            // However, this is expected situation for the use cases of this coordination server\n            state_t s = st_starting;\n            my_state.compare_exchange_strong( s, st_init );\n            if (st_starting != s) {\n                // Do shutdown during startup. my_handle can't be released\n                // by start_shutdown, because my_handle value might be not set yet\n                // at time of transition from st_starting to st_quit.\n                __TBB_ASSERT( s==st_quit, nullptr );\n                release_handle( my_handle, my_server.my_join_workers );\n            }\n            return false;\n        } else {\n            my_server.my_ref_count++;\n        }\n        // Implicit destruction of fpa resets original affinity mask.\n        }\n#endif /* USE_PTHREAD */\n        state_t s = st_starting;\n        my_state.compare_exchange_strong( s, st_normal );\n        if( st_starting!=s ) {\n            // Do shutdown during startup. my_handle can't be released\n            // by start_shutdown, because my_handle value might be not set yet\n            // at time of transition from st_starting to st_quit.\n            __TBB_ASSERT( s==st_quit, nullptr );\n            release_handle( my_handle, my_server.my_join_workers );\n        }\n    }\n    else {\n        my_thread_monitor.notify();\n    }\n\n    return true;\n}\n\n//------------------------------------------------------------------------\n// Methods of ipc_waker\n//------------------------------------------------------------------------\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    // Suppress overzealous compiler warnings about an initialized variable 'sink_for_alloca' not referenced\n    #pragma warning(push)\n    #pragma warning(disable:4189)\n#endif\n#if __MINGW32__ && __GNUC__==4 &&__GNUC_MINOR__>=2 && !__MINGW64__\n// ensure that stack is properly aligned\n__attribute__((force_align_arg_pointer))\n#endif\n__RML_DECL_THREAD_ROUTINE ipc_waker::thread_routine(void* arg) {\n    ipc_waker* self = static_cast<ipc_waker*>(arg);\n    AVOID_64K_ALIASING( self->my_index );\n    self->run();\n    return 0;\n}\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    #pragma warning(pop)\n#endif\n\nvoid ipc_waker::run() {\n    // Transiting to st_normal here would require setting my_handle,\n    // which would create race with the launching thread and\n    // complications in handle management on Windows.\n\n    // memory_order_seq_cst to be strictly ordered after thread_monitor::wait on the next iteration\n    while( my_state.load(std::memory_order_seq_cst)!=st_quit ) {\n        bool have_to_sleep = false;\n        if( my_server.my_slack.load(std::memory_order_acquire)>0 ) {\n            if( my_server.wait_active_thread() ) {\n                if( my_server.my_slack.load(std::memory_order_acquire)>0 ) {\n                    my_server.wake_some( 0, 1 );\n                } else {\n                    my_server.release_active_thread();\n                    have_to_sleep = true;\n                }\n            }\n        } else {\n            have_to_sleep = true;\n        }\n        if( have_to_sleep ) {\n            // Check/set the invariant for sleeping\n            if( my_server.my_slack.load(std::memory_order_acquire)<0 ) {\n                my_thread_monitor.wait();\n            }\n        }\n    }\n\n    my_server.remove_server_ref();\n}\n\ninline bool ipc_waker::wake_or_launch() {\n    state_t excepted = st_init;\n    if( ( my_state.load(std::memory_order_acquire)==st_init && my_state.compare_exchange_strong( excepted, st_starting ) ) ) {\n        // after this point, remove_server_ref() must be done by created thread\n#if USE_WINTHREAD\n        my_handle = ipc_thread_monitor::launch( thread_routine, this, my_server.my_stack_size, &this->my_index );\n#elif USE_PTHREAD\n        {\n        affinity_helper fpa;\n        fpa.protect_affinity_mask( /*restore_process_mask=*/true );\n        my_handle = ipc_thread_monitor::launch( thread_routine, this, my_server.my_stack_size );\n        if( my_handle == 0 ) {\n            runtime_warning( \"Unable to create new thread for process %d\", getpid() );\n            state_t s = st_starting;\n            my_state.compare_exchange_strong(s, st_init);\n            if (st_starting != s) {\n                // Do shutdown during startup. my_handle can't be released\n                // by start_shutdown, because my_handle value might be not set yet\n                // at time of transition from st_starting to st_quit.\n                __TBB_ASSERT( s==st_quit, nullptr );\n                release_handle( my_handle, my_server.my_join_workers );\n            }\n            return false;\n        } else {\n            my_server.my_ref_count++;\n        }\n        // Implicit destruction of fpa resets original affinity mask.\n        }\n#endif /* USE_PTHREAD */\n        state_t s = st_starting;\n        my_state.compare_exchange_strong(s, st_normal);\n        if( st_starting!=s ) {\n            // Do shutdown during startup. my_handle can't be released\n            // by start_shutdown, because my_handle value might be not set yet\n            // at time of transition from st_starting to st_quit.\n            __TBB_ASSERT( s==st_quit, nullptr );\n            release_handle( my_handle, my_server.my_join_workers );\n        }\n    }\n    else {\n        my_thread_monitor.notify();\n    }\n\n    return true;\n}\n\n//------------------------------------------------------------------------\n// Methods of ipc_stopper\n//------------------------------------------------------------------------\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    // Suppress overzealous compiler warnings about an initialized variable 'sink_for_alloca' not referenced\n    #pragma warning(push)\n    #pragma warning(disable:4189)\n#endif\n#if __MINGW32__ && __GNUC__==4 &&__GNUC_MINOR__>=2 && !__MINGW64__\n// ensure that stack is properly aligned\n__attribute__((force_align_arg_pointer))\n#endif\n__RML_DECL_THREAD_ROUTINE ipc_stopper::thread_routine(void* arg) {\n    ipc_stopper* self = static_cast<ipc_stopper*>(arg);\n    AVOID_64K_ALIASING( self->my_index );\n    self->run();\n    return 0;\n}\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    #pragma warning(pop)\n#endif\n\nvoid ipc_stopper::run() {\n    // Transiting to st_normal here would require setting my_handle,\n    // which would create race with the launching thread and\n    // complications in handle management on Windows.\n\n    while( my_state.load(std::memory_order_acquire)!=st_quit ) {\n        if( my_server.wait_stop_thread() ) {\n            if( my_state.load(std::memory_order_acquire)!=st_quit ) {\n                if( !my_server.stop_one() ) {\n                    my_server.add_stop_thread();\n                    tbb::detail::r1::prolonged_pause();\n                }\n            }\n        }\n    }\n\n    my_server.remove_server_ref();\n}\n\ninline bool ipc_stopper::wake_or_launch() {\n    state_t excepted = st_init;\n    if( ( my_state.load(std::memory_order_acquire)==st_init && my_state.compare_exchange_strong( excepted, st_starting ) ) ) {\n        // after this point, remove_server_ref() must be done by created thread\n#if USE_WINTHREAD\n        my_handle = ipc_thread_monitor::launch( thread_routine, this, my_server.my_stack_size, &this->my_index );\n#elif USE_PTHREAD\n        {\n        affinity_helper fpa;\n        fpa.protect_affinity_mask( /*restore_process_mask=*/true );\n        my_handle = ipc_thread_monitor::launch( thread_routine, this, my_server.my_stack_size );\n        if( my_handle == 0 ) {\n            runtime_warning( \"Unable to create new thread for process %d\", getpid() );\n            state_t s = st_starting;\n            my_state.compare_exchange_strong(s, st_init);\n            if (st_starting != s) {\n                // Do shutdown during startup. my_handle can't be released\n                // by start_shutdown, because my_handle value might be not set yet\n                // at time of transition from st_starting to st_quit.\n                __TBB_ASSERT( s==st_quit, nullptr );\n                release_handle( my_handle, my_server.my_join_workers );\n            }\n            return false;\n        } else {\n            my_server.my_ref_count++;\n        }\n        // Implicit destruction of fpa resets original affinity mask.\n        }\n#endif /* USE_PTHREAD */\n        state_t s = st_starting;\n        my_state.compare_exchange_strong(s, st_normal);\n        if( st_starting!=s ) {\n            // Do shutdown during startup. my_handle can't be released\n            // by start_shutdown, because my_handle value might be not set yet\n            // at time of transition from st_starting to st_quit.\n            __TBB_ASSERT( s==st_quit, nullptr );\n            release_handle( my_handle, my_server.my_join_workers );\n        }\n    }\n    else {\n        my_thread_monitor.notify();\n    }\n\n    return true;\n}\n\n//------------------------------------------------------------------------\n// Methods of ipc_server\n//------------------------------------------------------------------------\nipc_server::ipc_server(tbb_client& client) :\n    my_client( client ),\n    my_stack_size( client.min_stack_size() ),\n    my_thread_array(nullptr),\n    my_join_workers(false),\n    my_waker(nullptr),\n    my_stopper(nullptr)\n{\n    my_ref_count = 1;\n    my_slack = 0;\n#if TBB_USE_ASSERT\n    my_net_slack_requests = 0;\n#endif /* TBB_USE_ASSERT */\n    my_n_thread = tbb::internal::rml::get_num_threads(IPC_MAX_THREADS_VAR_NAME);\n    if( my_n_thread==0 ) {\n        my_n_thread = tbb::detail::r1::AvailableHwConcurrency();\n        __TBB_ASSERT( my_n_thread>0, nullptr );\n    }\n\n    my_asleep_list_root = nullptr;\n    my_thread_array = tbb::cache_aligned_allocator<padded_ipc_worker>().allocate( my_n_thread );\n    for( size_t i=0; i<my_n_thread; ++i ) {\n        ipc_worker* t = new( &my_thread_array[i] ) padded_ipc_worker( *this, client, i );\n        t->my_next = my_asleep_list_root;\n        my_asleep_list_root = t;\n    }\n\n    my_waker = tbb::cache_aligned_allocator<ipc_waker>().allocate(1);\n    new( my_waker ) ipc_waker( *this, client, my_n_thread );\n\n    my_stopper = tbb::cache_aligned_allocator<ipc_stopper>().allocate(1);\n    new( my_stopper ) ipc_stopper( *this, client, my_n_thread + 1 );\n\n    char* active_sem_name = get_active_sem_name();\n    my_active_sem = sem_open( active_sem_name, O_CREAT, IPC_SEM_MODE, my_n_thread - 1 );\n    __TBB_ASSERT( my_active_sem, \"Unable to open active threads semaphore\" );\n    delete[] active_sem_name;\n\n    char* stop_sem_name = get_stop_sem_name();\n    my_stop_sem = sem_open( stop_sem_name, O_CREAT, IPC_SEM_MODE, 0 );\n    __TBB_ASSERT( my_stop_sem, \"Unable to open stop threads semaphore\" );\n    delete[] stop_sem_name;\n}\n\nipc_server::~ipc_server() {\n    __TBB_ASSERT( my_net_slack_requests.load(std::memory_order_relaxed)==0, nullptr );\n\n    for( size_t i=my_n_thread; i--; )\n        my_thread_array[i].~padded_ipc_worker();\n    tbb::cache_aligned_allocator<padded_ipc_worker>().deallocate( my_thread_array, my_n_thread );\n    tbb::detail::d0::poison_pointer( my_thread_array );\n\n    my_waker->~ipc_waker();\n    tbb::cache_aligned_allocator<ipc_waker>().deallocate( my_waker, 1 );\n    tbb::detail::d0::poison_pointer( my_waker );\n\n    my_stopper->~ipc_stopper();\n    tbb::cache_aligned_allocator<ipc_stopper>().deallocate( my_stopper, 1 );\n    tbb::detail::d0::poison_pointer( my_stopper );\n\n    sem_close( my_active_sem );\n    sem_close( my_stop_sem );\n}\n\ninline bool ipc_server::try_insert_in_asleep_list(ipc_worker& t) {\n    asleep_list_mutex_type::scoped_lock lock;\n    if( !lock.try_acquire( my_asleep_list_mutex ) )\n        return false;\n    // Contribute to slack under lock so that if another takes that unit of slack,\n    // it sees us sleeping on the list and wakes us up.\n    int k = ++my_slack;\n    if( k<=0 ) {\n        t.my_next = my_asleep_list_root.load(std::memory_order_relaxed);\n        my_asleep_list_root.store(&t, std::memory_order_relaxed);\n        return true;\n    } else {\n        --my_slack;\n        return false;\n    }\n}\n\ninline bool ipc_server::try_insert_in_asleep_list_forced(ipc_worker& t) {\n    asleep_list_mutex_type::scoped_lock lock;\n    if( !lock.try_acquire( my_asleep_list_mutex ) )\n        return false;\n    // Contribute to slack under lock so that if another takes that unit of slack,\n    // it sees us sleeping on the list and wakes us up.\n    ++my_slack;\n    t.my_next = my_asleep_list_root.load(std::memory_order_relaxed);\n    my_asleep_list_root.store(&t, std::memory_order_relaxed);\n    return true;\n}\n\ninline bool ipc_server::wait_active_thread() {\n    if( sem_wait( my_active_sem ) == 0 ) {\n        ++my_global_thread_count;\n        return true;\n    }\n    return false;\n}\n\ninline bool ipc_server::try_get_active_thread() {\n    if( sem_trywait( my_active_sem ) == 0 ) {\n        ++my_global_thread_count;\n        return true;\n    }\n    return false;\n}\n\ninline void ipc_server::release_active_thread() {\n    release_thread_sem( my_active_sem );\n}\n\ninline bool ipc_server::wait_stop_thread() {\n    struct timespec ts;\n    if( clock_gettime( CLOCK_REALTIME, &ts )==0 ) {\n        ts.tv_sec++;\n        if( sem_timedwait( my_stop_sem, &ts )==0 ) {\n            return true;\n        }\n    }\n    return false;\n}\n\ninline void ipc_server::add_stop_thread() {\n    sem_post( my_stop_sem );\n}\n\nvoid ipc_server::wake_some( int additional_slack, int active_threads ) {\n    __TBB_ASSERT( additional_slack>=0, nullptr );\n    ipc_worker* wakee[2];\n    ipc_worker **w = wakee;\n    {\n        asleep_list_mutex_type::scoped_lock lock(my_asleep_list_mutex);\n        while( active_threads>0 && my_asleep_list_root.load(std::memory_order_relaxed) && w<wakee+2 ) {\n            if( additional_slack>0 ) {\n                if( additional_slack+my_slack.load(std::memory_order_acquire)<=0 ) // additional demand does not exceed surplus supply\n                    break;\n                --additional_slack;\n            } else {\n                // Chain reaction; Try to claim unit of slack\n                int old;\n                do {\n                    old = my_slack.load(std::memory_order_relaxed);\n                    if( old<=0 ) goto done;\n                } while( !my_slack.compare_exchange_strong( old, old-1 ) );\n            }\n            // Pop sleeping worker to combine with claimed unit of slack\n            my_asleep_list_root.store(\n                (*w++ = my_asleep_list_root.load(std::memory_order_relaxed))->my_next,\n                std::memory_order_relaxed\n            );\n            --active_threads;\n        }\n        if( additional_slack ) {\n            // Contribute our unused slack to my_slack.\n            my_slack += additional_slack;\n        }\n    }\ndone:\n    while( w>wakee ) {\n        if( !(*--w)->wake_or_launch() ) {\n            add_stop_thread();\n            do {\n            } while( !try_insert_in_asleep_list_forced(**w) );\n            release_active_thread();\n        }\n    }\n    while( active_threads ) {\n        release_active_thread();\n        --active_threads;\n    }\n}\n\nvoid ipc_server::wake_one_forced( int additional_slack ) {\n    __TBB_ASSERT( additional_slack>=0, nullptr );\n    ipc_worker* wakee[1];\n    ipc_worker **w = wakee;\n    {\n        asleep_list_mutex_type::scoped_lock lock(my_asleep_list_mutex);\n        while( my_asleep_list_root.load(std::memory_order_relaxed) && w<wakee+1 ) {\n            if( additional_slack>0 ) {\n                if( additional_slack+my_slack.load(std::memory_order_acquire)<=0 ) // additional demand does not exceed surplus supply\n                    break;\n                --additional_slack;\n            } else {\n                // Chain reaction; Try to claim unit of slack\n                int old;\n                do {\n                    old = my_slack.load(std::memory_order_relaxed);\n                    if( old<=0 ) goto done;\n                } while( !my_slack.compare_exchange_strong( old, old-1 ) );\n            }\n            // Pop sleeping worker to combine with claimed unit of slack\n            my_asleep_list_root.store(\n                (*w++ = my_asleep_list_root.load(std::memory_order_relaxed))->my_next,\n                std::memory_order_relaxed);\n        }\n        if( additional_slack ) {\n            // Contribute our unused slack to my_slack.\n            my_slack += additional_slack;\n        }\n    }\ndone:\n    while( w>wakee ) {\n        if( !(*--w)->wake_or_launch() ) {\n            add_stop_thread();\n            do {\n            } while( !try_insert_in_asleep_list_forced(**w) );\n        }\n    }\n}\n\nbool ipc_server::stop_one() {\n    ipc_worker* current = nullptr;\n    ipc_worker* next = nullptr;\n    {\n        asleep_list_mutex_type::scoped_lock lock(my_asleep_list_mutex);\n        if( my_asleep_list_root.load(std::memory_order_relaxed) ) {\n            current = my_asleep_list_root.load(std::memory_order_relaxed);\n            if( current->my_state.load(std::memory_order_relaxed)==ipc_worker::st_normal ) {\n                next = current->my_next;\n                while( next!= nullptr && next->my_state.load(std::memory_order_relaxed)==ipc_worker::st_normal ) {\n                    current = next;\n                    next = current->my_next;\n                }\n                current->start_stopping( my_join_workers );\n                return true;\n            }\n        }\n    }\n    return false;\n}\n\nvoid ipc_server::adjust_job_count_estimate( int delta ) {\n#if TBB_USE_ASSERT\n    my_net_slack_requests+=delta;\n#endif /* TBB_USE_ASSERT */\n    if( my_n_thread > 1 ) {\n        if( delta<0 ) {\n            my_slack+=delta;\n        } else if( delta>0 ) {\n            int active_threads = 0;\n            if( try_get_active_thread() ) {\n                ++active_threads;\n                if( try_get_active_thread() ) {\n                    ++active_threads;\n                }\n            }\n            wake_some( delta, active_threads );\n\n            if( !my_waker->wake_or_launch() ) {\n                add_stop_thread();\n            }\n            if( !my_stopper->wake_or_launch() ) {\n                add_stop_thread();\n            }\n        }\n    } else { // Corner case when RML shouldn't provide any worker thread but client has to have at least one\n        if( delta<0 ) {\n            my_slack += delta;\n        } else {\n            wake_one_forced( delta );\n        }\n    }\n}\n\n//------------------------------------------------------------------------\n// RML factory methods\n//------------------------------------------------------------------------\n\n#if USE_PTHREAD\n\nstatic tbb_client* my_global_client = nullptr;\nstatic tbb_server* my_global_server = nullptr;\n\nvoid rml_atexit() {\n    release_resources();\n}\n\nvoid rml_atfork_child() {\n    if( my_global_server!=nullptr && my_global_client!=nullptr ) {\n        ipc_server* server = static_cast<ipc_server*>( my_global_server );\n        server->~ipc_server();\n        // memset( server, 0, sizeof(ipc_server) );\n        new( server ) ipc_server( *my_global_client );\n        pthread_atfork( nullptr, nullptr, rml_atfork_child );\n        atexit( rml_atexit );\n    }\n}\n\n#endif /* USE_PTHREAD */\n\nextern \"C\" tbb_factory::status_type __TBB_make_rml_server(tbb_factory& /*f*/, tbb_server*& server, tbb_client& client) {\n    server = new( tbb::cache_aligned_allocator<ipc_server>().allocate(1) ) ipc_server(client);\n#if USE_PTHREAD\n    my_global_client = &client;\n    my_global_server = server;\n    pthread_atfork( nullptr, nullptr, rml_atfork_child );\n    atexit( rml_atexit );\n#endif /* USE_PTHREAD */\n    if( getenv( \"RML_DEBUG\" ) ) {\n        runtime_warning(\"IPC server is started\");\n    }\n    return tbb_factory::st_success;\n}\n\nextern \"C\" void __TBB_call_with_my_server_info(::rml::server_info_callback_t /*cb*/, void* /*arg*/) {\n}\n\n} // namespace rml\n} // namespace detail\n\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/python/rml/ipc_utils.cpp",
    "content": "/*\n    Copyright (c) 2017-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"ipc_utils.h\"\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <limits.h>\n#include <string.h>\n#include <unistd.h>\n\nnamespace tbb {\nnamespace internal {\nnamespace rml {\n\n#define MAX_STR_LEN 255\n#define STARTTIME_ITEM_ID 21\n\nstatic char* get_stat_item(char* line, int item_id) {\n    int id = 0, i = 0;\n\n    while( id!=item_id ) {\n        while( line[i]!='(' && line[i]!=' ' && line[i]!='\\0' ) {\n            ++i;\n        }\n        if( line[i]==' ' ) {\n            ++id;\n            ++i;\n        } else if( line[i]=='(' ) {\n            while( line[i]!=')' && line[i]!='\\0' ) {\n               ++i;\n            }\n            if( line[i]==')' ) {\n                ++i;\n            } else {\n                return nullptr;\n            }\n        } else {\n            return nullptr;\n        }\n    }\n\n    return line + i;\n}\n\nunsigned long long get_start_time(int pid) {\n    const char* stat_file_path_template = \"/proc/%d/stat\";\n    char stat_file_path[MAX_STR_LEN + 1];\n    sprintf( stat_file_path, stat_file_path_template, pid );\n\n    FILE* stat_file = fopen( stat_file_path, \"rt\" );\n    if( stat_file==nullptr ) {\n        return 0;\n    }\n\n    char stat_line[MAX_STR_LEN + 1];\n    char* line = fgets( stat_line, MAX_STR_LEN, stat_file );\n    if( line==nullptr ) {\n        return 0;\n    }\n\n    char* starttime_str = get_stat_item( stat_line, STARTTIME_ITEM_ID );\n    if( starttime_str==nullptr ) {\n        return 0;\n    }\n\n    unsigned long long starttime = strtoull( starttime_str, nullptr, 10 );\n    if( starttime==ULLONG_MAX ) {\n        return 0;\n    }\n\n    return starttime;\n}\n\nchar* get_shared_name(const char* prefix, int pid, unsigned long long time) {\n    const char* name_template = \"%s_%d_%llu\";\n    const int digits_in_int = 10;\n    const int digits_in_long = 20;\n\n    int len = strlen( name_template ) + strlen( prefix ) + digits_in_int + digits_in_long + 1;\n    char* name = new char[len];\n    sprintf( name, name_template, prefix, pid, time );\n\n    return name;\n}\n\nchar* get_shared_name(const char* prefix) {\n    int pid = getpgrp();\n    unsigned long long time = get_start_time( pid );\n    return get_shared_name( prefix, pid, time );\n}\n\nint get_num_threads(const char* env_var) {\n    if( env_var==nullptr ) {\n        return 0;\n    }\n\n    char* value = getenv( env_var );\n    if( value==nullptr ) {\n        return 0;\n    }\n\n    int num_threads = (int)strtol( value, nullptr, 10 );\n    return num_threads;\n}\n\nbool get_enable_flag(const char* env_var) {\n    if( env_var==nullptr ) {\n        return false;\n    }\n\n    char* value = getenv( env_var );\n    if( value==nullptr ) {\n        return false;\n    }\n\n    if( strcmp( value, \"0\" ) == 0 ||\n        strcmp( value, \"false\" ) == 0 ||\n        strcmp( value, \"False\" ) == 0 ||\n        strcmp( value, \"FALSE\" ) == 0 ) {\n        return false;\n    }\n\n    return true;\n}\n\n}}} // namespace tbb::internal::rml\n"
  },
  {
    "path": "third-party/tbb/python/rml/ipc_utils.h",
    "content": "/*\n    Copyright (c) 2017-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __IPC_UTILS_H\n#define __IPC_UTILS_H\n\nnamespace tbb {\nnamespace internal {\nnamespace rml {\n\nchar* get_shared_name(const char* prefix);\nint get_num_threads(const char* env_var);\nbool get_enable_flag(const char* env_var);\n\n}}} // namespace tbb::internal::rml\n\n#endif\n"
  },
  {
    "path": "third-party/tbb/python/setup.py",
    "content": "# Copyright (c) 2016-2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\n# System imports\nimport platform\nimport os\n\nfrom distutils.core import *\nfrom distutils.command.build import build\n\nrundir = os.getcwd()\nos.chdir(os.path.abspath(os.path.dirname(__file__)))\n\nif any(i in os.environ for i in [\"CC\", \"CXX\"]):\n    if \"CC\" not in os.environ:\n        os.environ['CC'] = os.environ['CXX']\n    if \"CXX\" not in os.environ:\n        os.environ['CXX'] = os.environ['CC']\n    if platform.system() == 'Linux':\n        os.environ['LDSHARED'] = os.environ['CXX'] + \" -shared\"\n    print(\"Environment specifies CC=%s CXX=%s\"%(os.environ['CC'], os.environ['CXX']))\n\nintel_compiler = os.getenv('CC', '') in ['icl', 'icpc', 'icc']\ntry:\n    tbb_root = os.environ['TBBROOT']\n    print(\"Using TBBROOT=\", tbb_root)\nexcept:\n    tbb_root = '..'\n    if not intel_compiler:\n        print(\"Warning: TBBROOT env var is not set and Intel's compiler is not used. It might lead\\n\"\n              \"    !!!: to compile/link problems. Source tbbvars.sh/.csh file to set environment\")\nuse_compiler_tbb = intel_compiler and tbb_root == '..'\nif use_compiler_tbb:\n    print(\"Using oneTBB from Intel(R) C++ Compiler\")\nif platform.system() == 'Windows':\n    if intel_compiler:\n        os.environ['DISTUTILS_USE_SDK'] = '1'  # Enable environment settings in distutils\n        os.environ['MSSdk'] = '1'\n        print(\"Using compiler settings from environment\")\n    tbb_flag = ['/Qtbb'] if use_compiler_tbb else []\n    compile_flags = ['/Qstd=c++11'] if intel_compiler else []\n    tbb_lib_name = 'tbb12'\nelse:\n    tbb_flag = ['-tbb'] if use_compiler_tbb else []\n    compile_flags = ['-std=c++11', '-Wno-unused-variable']\n    tbb_lib_name = 'tbb'\n\n_tbb = Extension(\"tbb._api\", [\"tbb/api.i\"],\n        include_dirs=[os.path.join(tbb_root, 'include')] if not use_compiler_tbb else [],\n        swig_opts   =['-c++', '-O', '-threads'] + (  # add '-builtin' later\n              ['-I' + os.path.join(tbb_root, 'include')] if not use_compiler_tbb else []),\n        extra_compile_args=compile_flags + tbb_flag,\n        extra_link_args=tbb_flag,\n        libraries   =([tbb_lib_name] if not use_compiler_tbb else []) +\n                     (['irml'] if platform.system() == \"Linux\" else []),\n        library_dirs=[ rundir,                                              # for custom-builds\n                       os.path.join(tbb_root, 'lib', 'intel64', 'gcc4.8'),  # for Linux\n                       os.path.join(tbb_root, 'lib'),                       # for MacOS\n                       os.path.join(tbb_root, 'lib', 'intel64', 'vc_mt'),   # for Windows\n                     ] if not use_compiler_tbb else [],\n        language    ='c++',\n        )\n\n\nclass TBBBuild(build):\n    sub_commands = [  # define build order\n        ('build_ext', build.has_ext_modules),\n        ('build_py', build.has_pure_modules),\n    ]\n\n\nsetup(  name        =\"TBB\",\n        description =\"Python API for oneTBB\",\n        long_description=\"Python API to Intel(R) oneAPI Threading Building Blocks library (oneTBB) \"\n                         \"extended with standard Pool implementation and monkey-patching\",\n        url         =\"https://www.intel.com/content/www/us/en/developer/tools/oneapi/onetbb.html\",\n        author      =\"Intel Corporation\",\n        author_email=\"inteltbbdevelopers@intel.com\",\n        license     =\"Dual license: Apache or Proprietary\",\n        version     =\"0.2\",\n        classifiers =[\n            'Development Status :: 4 - Beta',\n            'Environment :: Console',\n            'Environment :: Plugins',\n            'Intended Audience :: Developers',\n            'Intended Audience :: System Administrators',\n            'Intended Audience :: Other Audience',\n            'Intended Audience :: Science/Research',\n            'License :: OSI Approved :: Apache Software License',\n            'Operating System :: MacOS :: MacOS X',\n            'Operating System :: Microsoft :: Windows',\n            'Operating System :: POSIX :: Linux',\n            'Programming Language :: Python',\n            'Programming Language :: Python :: 3',\n            'Programming Language :: C++',\n            'Topic :: System :: Hardware :: Symmetric Multi-processing',\n            'Topic :: Software Development :: Libraries',\n          ],\n        keywords='TBB multiprocessing multithreading composable parallelism',\n        ext_modules=[_tbb],\n        packages=['tbb'],\n        py_modules=['TBB'],\n        cmdclass={'build': TBBBuild}\n)\n"
  },
  {
    "path": "third-party/tbb/python/tbb/__init__.py",
    "content": "# Copyright (c) 2016-2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport multiprocessing.pool\nimport ctypes\nimport atexit\nimport sys\nimport os\n\nimport platform\n\nif \"Windows\" in platform.system():\n    import site\n    path_to_env = site.getsitepackages()[0]\n    path_to_libs = os.path.join(path_to_env, \"Library\", \"bin\")\n    if sys.version_info.minor >= 8:\n        os.add_dll_directory(path_to_libs)\n    os.environ['PATH'] += os.pathsep + path_to_libs\n\n\nfrom .api import  *\nfrom .api import __all__ as api__all\nfrom .pool import *\nfrom .pool import __all__ as pool__all\n\n__all__ = [\"Monkey\", \"is_active\"] + api__all + pool__all\n\n__doc__ = \"\"\"\nPython API for Intel(R) oneAPI Threading Building Blocks (oneTBB)\nextended with standard Python's pools implementation and monkey-patching.\n\nCommand-line interface example:\n$  python3 -m tbb $your_script.py\nRuns your_script.py in context of tbb.Monkey\n\"\"\"\n\nis_active = False\n\"\"\" Indicates whether oneTBB context is activated \"\"\"\n\nipc_enabled = False\n\"\"\" Indicates whether IPC mode is enabled \"\"\"\n\nlibirml = \"libirml.so.1\"\n\n\ndef _test(arg=None):\n    \"\"\"Some tests\"\"\"\n    import platform\n    if platform.system() == \"Linux\":\n        ctypes.CDLL(libirml)\n        assert 256 == os.system(\"ldd \"+_api.__file__+\"| grep -E 'libimf|libsvml|libintlc'\") # nosec\n    from .test import test\n    test(arg)\n    print(\"done\")\n\n\ndef tbb_process_pool_worker27(inqueue, outqueue, initializer=None, initargs=(),\n                            maxtasks=None):\n    from multiprocessing.pool import worker\n    worker(inqueue, outqueue, initializer, initargs, maxtasks)\n    if ipc_enabled:\n        try:\n            librml = ctypes.CDLL(libirml)\n            librml.release_resources()\n        except:\n            print(\"Warning: Can not load \", libirml, file=sys.stderr)\n\n\nclass TBBProcessPool27(multiprocessing.pool.Pool):\n    def _repopulate_pool(self):\n        \"\"\"Bring the number of pool processes up to the specified number,\n        for use after reaping workers which have exited.\n        \"\"\"\n        from multiprocessing.util import debug\n\n        for i in range(self._processes - len(self._pool)):\n            w = self.Process(target=tbb_process_pool_worker27,\n                             args=(self._inqueue, self._outqueue,\n                                   self._initializer,\n                                   self._initargs, self._maxtasksperchild)\n                            )\n            self._pool.append(w)\n            w.name = w.name.replace('Process', 'PoolWorker')\n            w.daemon = True\n            w.start()\n            debug('added worker')\n\n    def __del__(self):\n        self.close()\n        for p in self._pool:\n            p.join()\n\n    def __exit__(self, *args):\n        self.close()\n        for p in self._pool:\n            p.join()\n\n\ndef tbb_process_pool_worker3(inqueue, outqueue, initializer=None, initargs=(),\n                            maxtasks=None, wrap_exception=False):\n    from multiprocessing.pool import worker\n    worker(inqueue, outqueue, initializer, initargs, maxtasks, wrap_exception)\n    if ipc_enabled:\n        try:\n            librml = ctypes.CDLL(libirml)\n            librml.release_resources()\n        except:\n            print(\"Warning: Can not load \", libirml, file=sys.stderr)\n\n\nclass TBBProcessPool3(multiprocessing.pool.Pool):\n    def _repopulate_pool(self):\n        \"\"\"Bring the number of pool processes up to the specified number,\n        for use after reaping workers which have exited.\n        \"\"\"\n        from multiprocessing.util import debug\n\n        for i in range(self._processes - len(self._pool)):\n            w = self.Process(target=tbb_process_pool_worker3,\n                             args=(self._inqueue, self._outqueue,\n                                   self._initializer,\n                                   self._initargs, self._maxtasksperchild,\n                                   self._wrap_exception)\n                            )\n            self._pool.append(w)\n            w.name = w.name.replace('Process', 'PoolWorker')\n            w.daemon = True\n            w.start()\n            debug('added worker')\n\n    def __del__(self):\n        self.close()\n        for p in self._pool:\n            p.join()\n\n    def __exit__(self, *args):\n        self.close()\n        for p in self._pool:\n            p.join()\n\n\nclass Monkey:\n    \"\"\"\n    Context manager which replaces standard multiprocessing.pool\n    implementations with tbb.pool using monkey-patching. It also enables oneTBB\n    threading for Intel(R) oneAPI Math Kernel Library (oneMKL). For example:\n\n        with tbb.Monkey():\n            run_my_numpy_code()\n\n    It allows multiple parallel tasks to be executed on the same thread pool\n    and coordinate number of threads across multiple processes thus avoiding\n    overheads from oversubscription.\n    \"\"\"\n    _items   = {}\n    _modules = {}\n\n    def __init__(self, max_num_threads=None, benchmark=False):\n        \"\"\"\n        Create context manager for running under TBB scheduler.\n        :param max_num_threads: if specified, limits maximal number of threads\n        :param benchmark: if specified, blocks in initialization until requested number of threads are ready\n        \"\"\"\n        if max_num_threads:\n            self.ctl = global_control(global_control.max_allowed_parallelism, int(max_num_threads))\n        if benchmark:\n            if not max_num_threads:\n               max_num_threads = default_num_threads()\n            from .api import _concurrency_barrier\n            _concurrency_barrier(int(max_num_threads))\n\n    def _patch(self, class_name, module_name, obj):\n        m = self._modules[class_name] = __import__(module_name, globals(),\n                                                   locals(), [class_name])\n        if m == None:\n            return\n        oldattr = getattr(m, class_name, None)\n        if oldattr == None:\n            self._modules[class_name] = None\n            return\n        self._items[class_name] = oldattr\n        setattr(m, class_name, obj)\n\n    def __enter__(self):\n        global is_active\n        assert is_active == False, \"tbb.Monkey does not support nesting yet\"\n        is_active = True\n        self.env_mkl = os.getenv('MKL_THREADING_LAYER')\n        os.environ['MKL_THREADING_LAYER'] = 'TBB'\n        self.env_numba = os.getenv('NUMBA_THREADING_LAYER')\n        os.environ['NUMBA_THREADING_LAYER'] = 'TBB'\n\n        if ipc_enabled:\n            if sys.version_info.major == 2 and sys.version_info.minor >= 7:\n                self._patch(\"Pool\", \"multiprocessing.pool\", TBBProcessPool27)\n            elif sys.version_info.major == 3 and sys.version_info.minor >= 5:\n                self._patch(\"Pool\", \"multiprocessing.pool\", TBBProcessPool3)\n        self._patch(\"ThreadPool\", \"multiprocessing.pool\", Pool)\n        return self\n\n    def __exit__(self, exc_type, exc_value, traceback):\n        global is_active\n        assert is_active == True, \"modified?\"\n        is_active = False\n        if self.env_mkl is None:\n            del os.environ['MKL_THREADING_LAYER']\n        else:\n            os.environ['MKL_THREADING_LAYER'] = self.env_mkl\n        if self.env_numba is None:\n            del os.environ['NUMBA_THREADING_LAYER']\n        else:\n            os.environ['NUMBA_THREADING_LAYER'] = self.env_numba\n        for name in self._items.keys():\n            setattr(self._modules[name], name, self._items[name])\n\n\ndef init_sem_name():\n    try:\n        librml = ctypes.CDLL(libirml)\n        librml.set_active_sem_name()\n        librml.set_stop_sem_name()\n    except Exception as e:\n        print(\"Warning: Can not initialize name of shared semaphores:\", e,\n              file=sys.stderr)\n\n\ndef tbb_atexit():\n    if ipc_enabled:\n        try:\n            librml = ctypes.CDLL(libirml)\n            librml.release_semaphores()\n        except:\n            print(\"Warning: Can not release shared semaphores\",\n                  file=sys.stderr)\n\n\ndef _main():\n    # Run the module specified as the next command line argument\n    # python3 -m TBB user_app.py\n    global ipc_enabled\n\n    import platform\n    import argparse\n    parser = argparse.ArgumentParser(prog=\"python3 -m tbb\", description=\"\"\"\n                Run your Python script in context of tbb.Monkey, which\n                replaces standard Python pools and threading layer of\n                Intel(R) oneAPI Math Kernel Library (oneMKL) by implementation based on\n                Intel(R) oneAPI Threading Building Blocks (oneTBB). It enables multiple parallel\n                tasks to be executed on the same thread pool and coordinate\n                number of threads across multiple processes thus avoiding\n                overheads from oversubscription.\n             \"\"\", formatter_class=argparse.ArgumentDefaultsHelpFormatter)\n    if platform.system() == \"Linux\":\n        parser.add_argument('--ipc', action='store_true',\n                        help=\"Enable inter-process (IPC) coordination between oneTBB schedulers\")\n        parser.add_argument('-a', '--allocator', action='store_true',\n                        help=\"Enable oneTBB scalable allocator as a replacement for standard memory allocator\")\n        parser.add_argument('--allocator-huge-pages', action='store_true',\n                        help=\"Enable huge pages for oneTBB allocator (implies: -a)\")\n    parser.add_argument('-p', '--max-num-threads', default=default_num_threads(), type=int,\n                        help=\"Initialize oneTBB with P max number of threads per process\", metavar='P')\n    parser.add_argument('-b', '--benchmark', action='store_true',\n                        help=\"Block oneTBB initialization until all the threads are created before continue the script. \"\n                        \"This is necessary for performance benchmarks that want to exclude lazy scheduler initialization effects from the measurements\")\n    parser.add_argument('-v', '--verbose', action='store_true',\n                        help=\"Request verbose and version information\")\n    parser.add_argument('-m', action='store_true', dest='module',\n                        help=\"Executes following as a module\")\n    parser.add_argument('name', help=\"Script or module name\")\n    parser.add_argument('args', nargs=argparse.REMAINDER,\n                        help=\"Command line arguments\")\n    args = parser.parse_args()\n\n    if args.verbose:\n        os.environ[\"TBB_VERSION\"] = \"1\"\n    if platform.system() == \"Linux\":\n        if args.allocator_huge_pages:\n            args.allocator = True\n        if args.allocator and not os.environ.get(\"_TBB_MALLOC_PRELOAD\"):\n            libtbbmalloc_lib = 'libtbbmalloc_proxy.so.2'\n            ld_preload = 'LD_PRELOAD'\n            os.environ[\"_TBB_MALLOC_PRELOAD\"] = \"1\"\n            preload_list = filter(None, os.environ.get(ld_preload, \"\").split(':'))\n            if libtbbmalloc_lib in preload_list:\n                print('Info:', ld_preload, \"contains\", libtbbmalloc_lib, \"already\\n\")\n            else:\n                os.environ[ld_preload] = ':'.join([libtbbmalloc_lib] + list(preload_list))\n\n            if args.allocator_huge_pages:\n                assert platform.system() == \"Linux\"\n                try:\n                    with open('/proc/sys/vm/nr_hugepages', 'r') as f:\n                        pages = int(f.read())\n                    if pages == 0:\n                        print(\"oneTBB: Pre-allocated huge pages are not currently reserved in the system. To reserve, run e.g.:\\n\"\n                              \"\\tsudo sh -c 'echo 2000 > /proc/sys/vm/nr_hugepages'\")\n                    os.environ[\"TBB_MALLOC_USE_HUGE_PAGES\"] = \"1\"\n                except:\n                    print(\"oneTBB: Failed to read number of pages from /proc/sys/vm/nr_hugepages\\n\"\n                          \"\\tIs the Linux kernel configured with the huge pages feature?\")\n                    sys.exit(1)\n\n            os.execl(sys.executable, sys.executable, '-m', 'tbb', *sys.argv[1:])\n            assert False, \"Re-execution failed\"\n\n    sys.argv = [args.name] + args.args\n    ipc_enabled = platform.system() == \"Linux\" and args.ipc\n    os.environ[\"IPC_ENABLE\"] = \"1\" if ipc_enabled else \"0\"\n    if ipc_enabled:\n        atexit.register(tbb_atexit)\n        init_sem_name()\n    if not os.environ.get(\"KMP_BLOCKTIME\"): # TODO move\n        os.environ[\"KMP_BLOCKTIME\"] = \"0\"\n    if '_' + args.name in globals():\n        return globals()['_' + args.name](*args.args)\n    else:\n        import runpy\n        runf = runpy.run_module if args.module else runpy.run_path\n        with Monkey(max_num_threads=args.max_num_threads, benchmark=args.benchmark):\n            runf(args.name, run_name='__main__')\n"
  },
  {
    "path": "third-party/tbb/python/tbb/__main__.py",
    "content": "# Copyright (c) 2016-2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\nfrom . import _main\nfrom sys import exit\nexit(_main())\n"
  },
  {
    "path": "third-party/tbb/python/tbb/api.i",
    "content": "%pythonbegin %{\n#\n# Copyright (c) 2016-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\n__all__ = [\"task_arena\",\n           \"task_group\",\n           \"global_control\",\n           \"default_num_threads\",\n           \"this_task_arena_max_concurrency\",\n           \"this_task_arena_current_thread_index\",\n           \"runtime_version\",\n           \"runtime_interface_version\"]\n%}\n%begin %{\n/* Defines Python wrappers for Intel(R) oneAPI Threading Building Blocks (oneTBB) */\n%}\n%module api\n\n#if SWIG_VERSION < 0x030001\n#error SWIG version 3.0.6 or newer is required for correct functioning\n#endif\n\n%{\n#define TBB_PREVIEW_WAITING_FOR_WORKERS 1\n#include \"tbb/task_arena.h\"\n#include \"tbb/task_group.h\"\n#include \"tbb/global_control.h\"\n#include \"tbb/version.h\"\n\n#include <condition_variable>\n#include <mutex>\n#include <memory>\n\nusing namespace tbb;\n\nclass PyCaller : public swig::SwigPtr_PyObject {\npublic:\n    // icpc 2013 does not support simple using SwigPtr_PyObject::SwigPtr_PyObject;\n    PyCaller(const PyCaller& s) : SwigPtr_PyObject(s) {}\n    PyCaller(PyObject *p, bool initial = true) : SwigPtr_PyObject(p, initial) {}\n\n    void operator()() const {\n        SWIG_PYTHON_THREAD_BEGIN_BLOCK;\n        PyObject* r = PyObject_CallFunctionObjArgs((PyObject*)*this, nullptr);\n        if(r) Py_DECREF(r);\n        SWIG_PYTHON_THREAD_END_BLOCK;\n    }\n};\n\nstruct ArenaPyCaller {\n    task_arena *my_arena;\n    PyObject *my_callable;\n    ArenaPyCaller(task_arena *a, PyObject *c) : my_arena(a), my_callable(c) {\n        SWIG_PYTHON_THREAD_BEGIN_BLOCK;\n        Py_XINCREF(c);\n        SWIG_PYTHON_THREAD_END_BLOCK;\n    }\n    void operator()() const {\n        my_arena->execute(PyCaller(my_callable, false));\n    }\n};\n\nstruct barrier_data {\n    std::condition_variable event;\n    std::mutex m;\n    int worker_threads, full_threads;\n};\n\nvoid _concurrency_barrier(int threads = tbb::task_arena::automatic) {\n    if(threads == tbb::task_arena::automatic)\n        threads = tbb::this_task_arena::max_concurrency();\n    if(threads < 2)\n        return;\n    std::unique_ptr<global_control> g(\n        (global_control::active_value(global_control::max_allowed_parallelism) < unsigned(threads))?\n            new global_control(global_control::max_allowed_parallelism, threads) : nullptr);\n\n    tbb::task_group tg;\n    barrier_data b;\n    b.worker_threads = 0;\n    b.full_threads = threads-1;\n    for(int i = 0; i < b.full_threads; i++)\n        tg.run([&b]{\n            std::unique_lock<std::mutex> lock(b.m);\n            if(++b.worker_threads >= b.full_threads)\n                b.event.notify_all();\n            else while(b.worker_threads < b.full_threads)\n                b.event.wait(lock);\n        });\n    std::unique_lock<std::mutex> lock(b.m);\n    b.event.wait(lock);\n    tg.wait();\n};\n\n%}\n\nvoid _concurrency_barrier(int threads = tbb::task_arena::automatic);\n\nnamespace tbb {\n\n    class task_arena {\n    public:\n        static const int automatic = -1;\n        task_arena(int max_concurrency = automatic, unsigned reserved_for_masters = 1);\n        task_arena(const task_arena &s);\n        ~task_arena();\n        void initialize();\n        void initialize(int max_concurrency, unsigned reserved_for_masters = 1);\n        void terminate();\n        bool is_active();\n        %extend {\n        void enqueue( PyObject *c ) { $self->enqueue(PyCaller(c)); }\n        void execute( PyObject *c ) { $self->execute(PyCaller(c)); }\n        };\n    };\n\n    class task_group {\n    public:\n        task_group();\n        ~task_group();\n        void wait();\n        void cancel();\n        %extend {\n        void run( PyObject *c ) { $self->run(PyCaller(c)); }\n        void run( PyObject *c, task_arena *a ) { $self->run(ArenaPyCaller(a, c)); }\n        };\n    };\n\n    class global_control {\n    public:\n        enum parameter {\n            max_allowed_parallelism,\n            thread_stack_size,\n            parameter_max // insert new parameters above this point\n        };\n        global_control(parameter param, size_t value);\n        ~global_control();\n        static size_t active_value(parameter param);\n    };\n\n} // tbb\n\n%inline {\n    inline const char* runtime_version() { return TBB_runtime_version();}\n    inline int runtime_interface_version() { return TBB_runtime_interface_version();}\n    inline int this_task_arena_max_concurrency() { return this_task_arena::max_concurrency();}\n    inline int this_task_arena_current_thread_index() { return this_task_arena::current_thread_index();}\n};\n\n// Additional definitions for Python part of the module\n%pythoncode %{\ndefault_num_threads = this_task_arena_max_concurrency\n%}\n"
  },
  {
    "path": "third-party/tbb/python/tbb/pool.py",
    "content": "# Copyright (c) 2016-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Based on the software developed by:\n# Copyright (c) 2008,2016 david decotigny (Pool of threads)\n# Copyright (c) 2006-2008, R Oudkerk (multiprocessing.Pool)\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# 1. Redistributions of source code must retain the above copyright\n#    notice, this list of conditions and the following disclaimer.\n# 2. Redistributions in binary form must reproduce the above copyright\n#    notice, this list of conditions and the following disclaimer in the\n#    documentation and/or other materials provided with the distribution.\n# 3. Neither the name of author nor the names of any contributors may be\n#    used to endorse or promote products derived from this software\n#    without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n# SUCH DAMAGE.\n#\n\n# @brief Python Pool implementation based on TBB with monkey-patching\n#\n# See http://docs.python.org/dev/library/multiprocessing.html\n# Differences: added imap_async and imap_unordered_async, and terminate()\n# has to be called explicitly (it's not registered by atexit).\n#\n# The general idea is that we submit works to a workqueue, either as\n# single Jobs (one function to call), or JobSequences (batch of\n# Jobs). Each Job is associated with an ApplyResult object which has 2\n# states: waiting for the Job to complete, or Ready. Instead of\n# waiting for the jobs to finish, we wait for their ApplyResult object\n# to become ready: an event mechanism is used for that.\n# When we apply a function to several arguments in \"parallel\", we need\n# a way to wait for all/part of the Jobs to be processed: that's what\n# \"collectors\" are for; they group and wait for a set of ApplyResult\n# objects. Once a collector is ready to be used, we can use a\n# CollectorIterator to iterate over the result values it's collecting.\n#\n# The methods of a Pool object use all these concepts and expose\n# them to their caller in a very simple way.\n\nimport sys\nimport threading\nimport traceback\nfrom .api import *\n\n__all__ = [\"Pool\", \"TimeoutError\"]\n__doc__ = \"\"\"\nStandard Python Pool implementation based on Python API\nfor Intel(R) oneAPI Threading Building Blocks (oneTBB)\n\"\"\"\n\n\nclass TimeoutError(Exception):\n    \"\"\"Raised when a result is not available within the given timeout\"\"\"\n    pass\n\n\nclass Pool(object):\n    \"\"\"\n    The Pool class provides standard multiprocessing.Pool interface\n    which is mapped onto oneTBB tasks executing in its thread pool\n    \"\"\"\n\n    def __init__(self, nworkers=0, name=\"Pool\"):\n        \"\"\"\n        :param nworkers (integer) number of worker threads to start\n        :param name (string) prefix for the worker threads' name\n        \"\"\"\n        self._closed = False\n        self._tasks = task_group()\n        self._pool = [None,]*default_num_threads()  # Dask asks for len(_pool)\n\n    def apply(self, func, args=(), kwds=dict()):\n        \"\"\"Equivalent of the apply() builtin function. It blocks till\n        the result is ready.\"\"\"\n        return self.apply_async(func, args, kwds).get()\n\n    def map(self, func, iterable, chunksize=None):\n        \"\"\"A parallel equivalent of the map() builtin function. It\n        blocks till the result is ready.\n\n        This method chops the iterable into a number of chunks which\n        it submits to the process pool as separate tasks. The\n        (approximate) size of these chunks can be specified by setting\n        chunksize to a positive integer.\"\"\"\n        return self.map_async(func, iterable, chunksize).get()\n\n    def imap(self, func, iterable, chunksize=1):\n        \"\"\"\n        An equivalent of itertools.imap().\n\n        The chunksize argument is the same as the one used by the\n        map() method. For very long iterables using a large value for\n        chunksize can make the job complete much faster than\n        using the default value of 1.\n\n        Also if chunksize is 1 then the next() method of the iterator\n        returned by the imap() method has an optional timeout\n        parameter: next(timeout) will raise processing.TimeoutError if\n        the result cannot be returned within timeout seconds.\n        \"\"\"\n        collector = OrderedResultCollector(as_iterator=True)\n        self._create_sequences(func, iterable, chunksize, collector)\n        return iter(collector)\n\n    def imap_unordered(self, func, iterable, chunksize=1):\n        \"\"\"The same as imap() except that the ordering of the results\n        from the returned iterator should be considered\n        arbitrary. (Only when there is only one worker process is the\n        order guaranteed to be \"correct\".)\"\"\"\n        collector = UnorderedResultCollector()\n        self._create_sequences(func, iterable, chunksize, collector)\n        return iter(collector)\n\n    def apply_async(self, func, args=(), kwds=dict(), callback=None):\n        \"\"\"A variant of the apply() method which returns an\n        ApplyResult object.\n\n        If callback is specified then it should be a callable which\n        accepts a single argument. When the result becomes ready,\n        callback is applied to it (unless the call failed). callback\n        should complete immediately since otherwise the thread which\n        handles the results will get blocked.\"\"\"\n        assert not self._closed  # No lock here. We assume it's atomic...\n        apply_result = ApplyResult(callback=callback)\n        job = Job(func, args, kwds, apply_result)\n        self._tasks.run(job)\n        return apply_result\n\n    def map_async(self, func, iterable, chunksize=None, callback=None):\n        \"\"\"A variant of the map() method which returns a ApplyResult\n        object.\n\n        If callback is specified then it should be a callable which\n        accepts a single argument. When the result becomes ready\n        callback is applied to it (unless the call failed). callback\n        should complete immediately since otherwise the thread which\n        handles the results will get blocked.\"\"\"\n        apply_result = ApplyResult(callback=callback)\n        collector    = OrderedResultCollector(apply_result, as_iterator=False)\n        if not self._create_sequences(func, iterable, chunksize, collector):\n          apply_result._set_value([])\n        return apply_result\n\n    def imap_async(self, func, iterable, chunksize=None, callback=None):\n        \"\"\"A variant of the imap() method which returns an ApplyResult\n        object that provides an iterator (next method(timeout)\n        available).\n\n        If callback is specified then it should be a callable which\n        accepts a single argument. When the resulting iterator becomes\n        ready, callback is applied to it (unless the call\n        failed). callback should complete immediately since otherwise\n        the thread which handles the results will get blocked.\"\"\"\n        apply_result = ApplyResult(callback=callback)\n        collector    = OrderedResultCollector(apply_result, as_iterator=True)\n        if not self._create_sequences(func, iterable, chunksize, collector):\n          apply_result._set_value(iter([]))\n        return apply_result\n\n    def imap_unordered_async(self, func, iterable, chunksize=None,\n                             callback=None):\n        \"\"\"A variant of the imap_unordered() method which returns an\n        ApplyResult object that provides an iterator (next\n        method(timeout) available).\n\n        If callback is specified then it should be a callable which\n        accepts a single argument. When the resulting iterator becomes\n        ready, callback is applied to it (unless the call\n        failed). callback should complete immediately since otherwise\n        the thread which handles the results will get blocked.\"\"\"\n        apply_result = ApplyResult(callback=callback)\n        collector    = UnorderedResultCollector(apply_result)\n        if not self._create_sequences(func, iterable, chunksize, collector):\n          apply_result._set_value(iter([]))\n        return apply_result\n\n    def close(self):\n        \"\"\"Prevents any more tasks from being submitted to the\n        pool. Once all the tasks have been completed the worker\n        processes will exit.\"\"\"\n        # No lock here. We assume it's sufficiently atomic...\n        self._closed = True\n\n    def terminate(self):\n        \"\"\"Stops the worker processes immediately without completing\n        outstanding work. When the pool object is garbage collected\n        terminate() will be called immediately.\"\"\"\n        self.close()\n        self._tasks.cancel()\n\n    def join(self):\n        \"\"\"Wait for the worker processes to exit. One must call\n        close() or terminate() before using join().\"\"\"\n        self._tasks.wait()\n\n    def __enter__(self):\n        return self\n\n    def __exit__(self, exc_type, exc_value, traceback):\n        self.join()\n\n    def __del__(self):\n        self.terminate()\n        self.join()\n\n    def _create_sequences(self, func, iterable, chunksize, collector):\n        \"\"\"\n        Create callable objects to process and pushes them on the\n        work queue. Each work unit is meant to process a slice of\n        iterable of size chunksize. If collector is specified, then\n        the ApplyResult objects associated with the jobs will notify\n        collector when their result becomes ready.\n\n        \\return the list callable objects (basically: JobSequences)\n        pushed onto the work queue\n        \"\"\"\n        assert not self._closed  # No lock here. We assume it's atomic...\n        it_ = iter(iterable)\n        exit_loop = False\n        sequences = []\n        while not exit_loop:\n            seq = []\n            for _ in range(chunksize or 1):\n                try:\n                    arg = next(it_)\n                except StopIteration:\n                    exit_loop = True\n                    break\n                apply_result = ApplyResult(collector)\n                job = Job(func, (arg,), {}, apply_result)\n                seq.append(job)\n            if seq:\n                sequences.append(JobSequence(seq))\n        for t in sequences:\n            self._tasks.run(t)\n        return sequences\n\n\nclass Job:\n    \"\"\"A work unit that corresponds to the execution of a single function\"\"\"\n\n    def __init__(self, func, args, kwds, apply_result):\n        \"\"\"\n        :param func/args/kwds used to call the function\n        :param apply_result ApplyResult object that holds the result\n        of the function call\n        \"\"\"\n        self._func = func\n        self._args = args\n        self._kwds = kwds\n        self._result = apply_result\n\n    def __call__(self):\n        \"\"\"\n        Call the function with the args/kwds and tell the ApplyResult\n        that its result is ready. Correctly handles the exceptions\n        happening during the execution of the function\n        \"\"\"\n        try:\n            result = self._func(*self._args, **self._kwds)\n        except:\n            self._result._set_exception()\n        else:\n            self._result._set_value(result)\n\n\nclass JobSequence:\n    \"\"\"A work unit that corresponds to the processing of a continuous\n    sequence of Job objects\"\"\"\n\n    def __init__(self, jobs):\n        self._jobs = jobs\n\n    def __call__(self):\n        \"\"\"\n        Call all the Job objects that have been specified\n        \"\"\"\n        for job in self._jobs:\n            job()\n\n\nclass ApplyResult(object):\n    \"\"\"An object associated with a Job object that holds its result:\n    it's available during the whole life the Job and after, even when\n    the Job didn't process yet. It's possible to use this object to\n    wait for the result/exception of the job to be available.\n\n    The result objects returns by the Pool::*_async() methods are of\n    this type\"\"\"\n\n    def __init__(self, collector=None, callback=None):\n        \"\"\"\n        :param collector when not None, the notify_ready() method of\n        the collector will be called when the result from the Job is\n        ready\n        :param callback when not None, function to call when the\n        result becomes available (this is the parameter passed to the\n        Pool::*_async() methods.\n        \"\"\"\n        self._success = False\n        self._event = threading.Event()\n        self._data = None\n        self._collector = None\n        self._callback = callback\n\n        if collector is not None:\n            collector.register_result(self)\n            self._collector = collector\n\n    def get(self, timeout=None):\n        \"\"\"\n        Returns the result when it arrives. If timeout is not None and\n        the result does not arrive within timeout seconds then\n        TimeoutError is raised. If the remote call raised an exception\n        then that exception will be reraised by get().\n        \"\"\"\n        if not self.wait(timeout):\n            raise TimeoutError(\"Result not available within %fs\" % timeout)\n        if self._success:\n            return self._data\n        raise self._data[0](self._data[1]).with_traceback(self._data[2])\n\n    def wait(self, timeout=None):\n        \"\"\"Waits until the result is available or until timeout\n        seconds pass.\"\"\"\n        self._event.wait(timeout)\n        return self._event.isSet()\n\n    def ready(self):\n        \"\"\"Returns whether the call has completed.\"\"\"\n        return self._event.isSet()\n\n    def successful(self):\n        \"\"\"Returns whether the call completed without raising an\n        exception. Will raise AssertionError if the result is not\n        ready.\"\"\"\n        assert self.ready()\n        return self._success\n\n    def _set_value(self, value):\n        \"\"\"Called by a Job object to tell the result is ready, and\n        provides the value of this result. The object will become\n        ready and successful. The collector's notify_ready() method\n        will be called, and the callback method too\"\"\"\n        assert not self.ready()\n        self._data = value\n        self._success = True\n        self._event.set()\n        if self._collector is not None:\n            self._collector.notify_ready(self)\n        if self._callback is not None:\n            try:\n                self._callback(value)\n            except:\n                traceback.print_exc()\n\n    def _set_exception(self):\n        \"\"\"Called by a Job object to tell that an exception occurred\n        during the processing of the function. The object will become\n        ready but not successful. The collector's notify_ready()\n        method will be called, but NOT the callback method\"\"\"\n        # traceback.print_exc()\n        assert not self.ready()\n        self._data = sys.exc_info()\n        self._success = False\n        self._event.set()\n        if self._collector is not None:\n            self._collector.notify_ready(self)\n\n\nclass AbstractResultCollector(object):\n    \"\"\"ABC to define the interface of a ResultCollector object. It is\n    basically an object which knows whuich results it's waiting for,\n    and which is able to get notify when they get available. It is\n    also able to provide an iterator over the results when they are\n    available\"\"\"\n\n    def __init__(self, to_notify):\n        \"\"\"\n        :param to_notify ApplyResult object to notify when all the\n        results we're waiting for become available. Can be None.\n        \"\"\"\n        self._to_notify = to_notify\n\n    def register_result(self, apply_result):\n        \"\"\"Used to identify which results we're waiting for. Will\n        always be called BEFORE the Jobs get submitted to the work\n        queue, and BEFORE the __iter__ and _get_result() methods can\n        be called\n        :param apply_result ApplyResult object to add in our collection\n        \"\"\"\n        raise NotImplementedError(\"Children classes must implement it\")\n\n    def notify_ready(self, apply_result):\n        \"\"\"Called by the ApplyResult object (already registered via\n        register_result()) that it is now ready (ie. the Job's result\n        is available or an exception has been raised).\n        :param apply_result ApplyResult object telling us that the job\n        has been processed\n        \"\"\"\n        raise NotImplementedError(\"Children classes must implement it\")\n\n    def _get_result(self, idx, timeout=None):\n        \"\"\"Called by the CollectorIterator object to retrieve the\n        result's values one after another (order defined by the\n        implementation)\n        :param idx The index of the result we want, wrt collector's order\n        :param timeout integer telling how long to wait (in seconds)\n        for the result at index idx to be available, or None (wait\n        forever)\n        \"\"\"\n        raise NotImplementedError(\"Children classes must implement it\")\n\n    def __iter__(self):\n        \"\"\"Return a new CollectorIterator object for this collector\"\"\"\n        return CollectorIterator(self)\n\n\nclass CollectorIterator(object):\n    \"\"\"An iterator that allows to iterate over the result values\n    available in the given collector object. Equipped with an extended\n    next() method accepting a timeout argument. Created by the\n    AbstractResultCollector::__iter__() method\"\"\"\n\n    def __init__(self, collector):\n        \"\"\":param AbstractResultCollector instance\"\"\"\n        self._collector = collector\n        self._idx = 0\n\n    def __iter__(self):\n        return self\n\n    def next(self, timeout=None):\n        \"\"\"Return the next result value in the sequence. Raise\n        StopIteration at the end. Can raise the exception raised by\n        the Job\"\"\"\n        try:\n            apply_result = self._collector._get_result(self._idx, timeout)\n        except IndexError:\n            # Reset for next time\n            self._idx = 0\n            raise StopIteration\n        except:\n            self._idx = 0\n            raise\n        self._idx += 1\n        assert apply_result.ready()\n        return apply_result.get(0)\n\n    def __next__(self):\n        return self.next()\n\n\nclass UnorderedResultCollector(AbstractResultCollector):\n    \"\"\"An AbstractResultCollector implementation that collects the\n    values of the ApplyResult objects in the order they become ready. The\n    CollectorIterator object returned by __iter__() will iterate over\n    them in the order they become ready\"\"\"\n\n    def __init__(self, to_notify=None):\n        \"\"\"\n        :param to_notify ApplyResult object to notify when all the\n        results we're waiting for become available. Can be None.\n        \"\"\"\n        AbstractResultCollector.__init__(self, to_notify)\n        self._cond = threading.Condition()\n        self._collection = []\n        self._expected = 0\n\n    def register_result(self, apply_result):\n        \"\"\"Used to identify which results we're waiting for. Will\n        always be called BEFORE the Jobs get submitted to the work\n        queue, and BEFORE the __iter__ and _get_result() methods can\n        be called\n        :param apply_result ApplyResult object to add in our collection\n        \"\"\"\n        self._expected += 1\n\n    def _get_result(self, idx, timeout=None):\n        \"\"\"Called by the CollectorIterator object to retrieve the\n        result's values one after another, in the order the results have\n        become available.\n        :param idx The index of the result we want, wrt collector's order\n        :param timeout integer telling how long to wait (in seconds)\n        for the result at index idx to be available, or None (wait\n        forever)\n        \"\"\"\n        self._cond.acquire()\n        try:\n            if idx >= self._expected:\n                raise IndexError\n            elif idx < len(self._collection):\n                return self._collection[idx]\n            elif idx != len(self._collection):\n                # Violation of the sequence protocol\n                raise IndexError()\n            else:\n                self._cond.wait(timeout=timeout)\n                try:\n                    return self._collection[idx]\n                except IndexError:\n                    # Still not added !\n                    raise TimeoutError(\"Timeout while waiting for results\")\n        finally:\n            self._cond.release()\n\n    def notify_ready(self, apply_result=None):\n        \"\"\"Called by the ApplyResult object (already registered via\n        register_result()) that it is now ready (ie. the Job's result\n        is available or an exception has been raised).\n        :param apply_result ApplyResult object telling us that the job\n        has been processed\n        \"\"\"\n        first_item = False\n        self._cond.acquire()\n        try:\n            self._collection.append(apply_result)\n            first_item = (len(self._collection) == 1)\n\n            self._cond.notifyAll()\n        finally:\n            self._cond.release()\n\n        if first_item and self._to_notify is not None:\n            self._to_notify._set_value(iter(self))\n\n\nclass OrderedResultCollector(AbstractResultCollector):\n    \"\"\"An AbstractResultCollector implementation that collects the\n    values of the ApplyResult objects in the order they have been\n    submitted. The CollectorIterator object returned by __iter__()\n    will iterate over them in the order they have been submitted\"\"\"\n\n    def __init__(self, to_notify=None, as_iterator=True):\n        \"\"\"\n        :param to_notify ApplyResult object to notify when all the\n        results we're waiting for become available. Can be None.\n        :param as_iterator boolean telling whether the result value\n        set on to_notify should be an iterator (available as soon as 1\n        result arrived) or a list (available only after the last\n        result arrived)\n        \"\"\"\n        AbstractResultCollector.__init__(self, to_notify)\n        self._results = []\n        self._lock = threading.Lock()\n        self._remaining = 0\n        self._as_iterator = as_iterator\n\n    def register_result(self, apply_result):\n        \"\"\"Used to identify which results we're waiting for. Will\n        always be called BEFORE the Jobs get submitted to the work\n        queue, and BEFORE the __iter__ and _get_result() methods can\n        be called\n        :param apply_result ApplyResult object to add in our collection\n        \"\"\"\n        self._results.append(apply_result)\n        self._remaining += 1\n\n    def _get_result(self, idx, timeout=None):\n        \"\"\"Called by the CollectorIterator object to retrieve the\n        result's values one after another (order defined by the\n        implementation)\n        :param idx The index of the result we want, wrt collector's order\n        :param timeout integer telling how long to wait (in seconds)\n        for the result at index idx to be available, or None (wait\n        forever)\n        \"\"\"\n        res = self._results[idx]\n        res.wait(timeout)\n        return res\n\n    def notify_ready(self, apply_result):\n        \"\"\"Called by the ApplyResult object (already registered via\n        register_result()) that it is now ready (ie. the Job's result\n        is available or an exception has been raised).\n        :param apply_result ApplyResult object telling us that the job\n        has been processed\n        \"\"\"\n        got_first = False\n        got_last = False\n        self._lock.acquire()\n        try:\n            assert self._remaining > 0\n            got_first = (len(self._results) == self._remaining)\n            self._remaining -= 1\n            got_last = (self._remaining == 0)\n        finally:\n            self._lock.release()\n\n        if self._to_notify is not None:\n            if self._as_iterator and got_first:\n                self._to_notify._set_value(iter(self))\n            elif not self._as_iterator and got_last:\n                try:\n                    lst = [r.get(0) for r in self._results]\n                except:\n                    self._to_notify._set_exception()\n                else:\n                    self._to_notify._set_value(lst)\n"
  },
  {
    "path": "third-party/tbb/python/tbb/test.py",
    "content": "# Copyright (c) 2016-2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Based on the software developed by:\n# Copyright (c) 2008,2016 david decotigny (Pool of threads)\n# Copyright (c) 2006-2008, R Oudkerk (multiprocessing.Pool)\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# 1. Redistributions of source code must retain the above copyright\n#    notice, this list of conditions and the following disclaimer.\n# 2. Redistributions in binary form must reproduce the above copyright\n#    notice, this list of conditions and the following disclaimer in the\n#    documentation and/or other materials provided with the distribution.\n# 3. Neither the name of author nor the names of any contributors may be\n#    used to endorse or promote products derived from this software\n#    without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n# SUCH DAMAGE.\n#\n\nimport time\nimport threading\n\nfrom .api import *\nfrom .pool import *\n\n\ndef test(arg=None):\n    if arg == \"-v\":\n        def say(*x):\n            print(*x)\n    else:\n        def say(*x):\n            pass\n    say(\"Start Pool testing\")\n    print(\"oneTBB version is %s\" % runtime_version())\n    print(\"oneTBB interface version is %s\" % runtime_interface_version())\n\n    get_tid = lambda: threading.current_thread().ident\n\n    assert default_num_threads() == this_task_arena_max_concurrency()\n\n    def return42():\n        return 42\n\n    def f(x):\n        return x * x\n\n    def work(mseconds):\n        res = str(mseconds)\n        if mseconds < 0:\n            mseconds = -mseconds\n        say(\"[%d] Start to work for %fms...\" % (get_tid(), mseconds*10))\n        time.sleep(mseconds/100.)\n        say(\"[%d] Work done (%fms).\" % (get_tid(), mseconds*10))\n        return res\n\n    # special flag to to be set by thread calling async work\n    spin_flag = None\n    def timeout_work(param):\n        say(\"[%d] Spin wait work start...\" % get_tid())\n        while spin_flag:\n            time.sleep(0.0001) # yield equivalent\n        say(\"[%d] Work done.\" % get_tid())\n        return str(param) if param != None else None\n\n    def prepare_timeout_exception():\n        nonlocal spin_flag\n        spin_flag = True # lock threads in timeout_work\n\n    def check_timeout_exception(pool_object, func):\n        nonlocal spin_flag\n        try:\n            func(pool_object)\n        except TimeoutError:\n            say(\"Good. Got expected timeout exception.\")\n        else:\n            assert False, \"Expected exception !\"\n        spin_flag = False # unlock threads in timeout_work\n\n    ### Test copy/pasted from multiprocessing\n    pool = Pool(4)  # start worker threads\n\n    # edge cases\n    assert pool.map(return42, []) == []\n    assert pool.apply_async(return42, []).get() == 42\n    assert pool.apply(return42, []) == 42\n    assert list(pool.imap(return42, iter([]))) == []\n    assert list(pool.imap_unordered(return42, iter([]))) == []\n    assert pool.map_async(return42, []).get() == []\n    assert list(pool.imap_async(return42, iter([])).get()) == []\n    assert list(pool.imap_unordered_async(return42, iter([])).get()) == []\n\n    # basic tests\n    result = pool.apply_async(f, (10,))  # evaluate \"f(10)\" asynchronously\n    assert result.get(timeout=1) == 100  # ... unless slow computer\n    assert list(pool.map(f, range(10))) == list(map(f, range(10)))\n    it = pool.imap(f, range(10))\n    assert next(it) == 0\n    assert next(it) == 1\n    assert next(it) == 4\n\n    # Test apply_sync exceptions\n    prepare_timeout_exception()\n    result = pool.apply_async(timeout_work, (None,))\n    check_timeout_exception(result, lambda result : say(result.get(timeout=1)))\n    assert result.get() is None  # sleep() returns None\n\n    def cb(s):\n        say(\"Result ready: %s\" % s)\n\n    # Test imap()\n    assert list(pool.imap(work, range(10, 3, -1), chunksize=4)) == list(map(\n        str, range(10, 3, -1)))\n\n    # Test imap_unordered()\n    assert sorted(pool.imap_unordered(work, range(10, 3, -1))) == sorted(map(\n        str, range(10, 3, -1)))\n\n    # Test map_async()\n    prepare_timeout_exception()\n    result = pool.map_async(timeout_work, range(10), callback=cb)\n    check_timeout_exception(result, lambda result : result.get(timeout=0.01))\n    say(result.get())\n\n    # Test imap_async()\n    prepare_timeout_exception()\n    result = pool.imap_async(timeout_work, range(3, 10), callback=cb)\n    check_timeout_exception(result, lambda result : result.get(timeout=0.01))\n    for i in result.get():\n        say(\"Item:\", i)\n    say(\"### Loop again:\")\n    for i in result.get():\n        say(\"Item2:\", i)\n\n    # Test imap_unordered_async()\n    prepare_timeout_exception()\n    result = pool.imap_unordered_async(timeout_work, range(10, 3, -1), callback=cb)\n    check_timeout_exception(result, lambda result : result.get(timeout=0.01))\n    for i in result.get():\n        say(\"Item1:\", i)\n    for i in result.get():\n        say(\"Item2:\", i)\n    r = result.get()\n    for i in r:\n        say(\"Item3:\", i)\n    for i in r:\n        say(\"Item4:\", i)\n    for i in r:\n        say(\"Item5:\", i)\n\n    #\n    # The case for the exceptions\n    #\n\n    # Exceptions in imap_unordered_async()\n    result = pool.imap_unordered_async(work, range(2, -10, -1), callback=cb)\n    time.sleep(3)\n    try:\n        for i in result.get():\n            say(\"Got item:\", i)\n    except (IOError, ValueError):\n        say(\"Good. Got expected exception\")\n\n    # Exceptions in imap_async()\n    result = pool.imap_async(work, range(2, -10, -1), callback=cb)\n    time.sleep(3)\n    try:\n        for i in result.get():\n            say(\"Got item:\", i)\n    except (IOError, ValueError):\n        say(\"Good. Got expected exception\")\n\n    # Stop the test: need to stop the pool !!!\n    pool.terminate()\n    pool.join()\n\nif __name__ == \"__main__\":\n    test()\n"
  },
  {
    "path": "third-party/tbb/rfcs/README.md",
    "content": "# oneTBB Design Documents/RFCs\n\nThe RFC process intends to:\n\n- Communicate library-wide changes\n- Collect feedback before implementation\n- Increase transparency in decision-making \n- Align different teams involved in oneTBB development\n\nThis directory contains design documents (RFCs) approved \nor rejected for implementation in oneTBB.\n\nThe possible RFC states are:\n\n1. Initial \n2. Proposed\n3. Experimental\n4. Supported\n5. Archived\n\nMost modifications or new features will naturally start as a part of a \nGitHub issue or discussion. Small changes do not require a formal RFC. \nHowever, if the issue or discussion results in an idea for a significant \nchange or new feature that affects the library's public API or architecture, \nwe recommend opening a PR to add a new RFC to the `rfcs/proposed` directory. \nThe RFC should provide a detailed description and design of the proposed feature.\nor new feature that significantly impacts the library's public API or \narchitecture, it will be suggested that a PR be opened to add a new rfc \nto the `rfcs/proposed` directory. The RFC contains a more detailed description\nand design for the feature.\n\n## General Process\n\nA template for RFCs is available as [template.md](template.md). Place the modified\ntemplate in the subdirectory of the `rfcs/proposed` with a name\nof the form `<feature>_<extension_description>`. For example,\na proposal for a new ``my_op`` flow graph node should be put into the\n`rfcs/proposed/flow_graph_my_op_node` directory. Use [template.md](template.md) \nto create the `README.md` file in that directory. The folder can \ncontain other files referenced by the `README.md` file, such as figures.\n\nOnce two maintainers approve the PR, it is merged into the `rfcs/proposed`\ndirectory. Update the RFC document with additional information as the RFC moves \nto different states. \n\nA proposal that is subsequently implemented and released in oneTBB \nas a preview feature is moved into the `rfcs/experimental` folder. The\nRFC for a preview feature in `rfcs/experimental` should include a description\nof what is required to move from experimental to fully supported -- for \nexample, feedback from users, demonstrated performance improvements, etc.\n\nA proposal that is implemented, added to the oneTBB specification, and \nsupported as a full feature appears in the `rfcs/supported` directory. An RFC \nfor a fully supported feature in the `rfcs/supported` directory should \nhave a link to the section in the oneTBB specification with its \nformal wording.\n\nA feature that is removed or a proposal that is abandoned or rejected will \nbe moved to the `rfcs/archived` folder.\n\n## Document Style\n\nThe design documents are stored in the `rfcs` directory, and each RFC is placed \nin its subdirectory under `rfcs/proposed/<feature>_<extension_description>`. \n\n- There must be a `README.md` file that contains the main RFC itself (or \nlinks to a file that contains it in the same directory).\n  - The RFC should follow the [template.md](template.md) structure. \n  - The directory can contain other supporting files, such as images, tex \n  formulas, and sub-proposals / sub-RFCs.\n  - We highly recommend using a text-based file format like markdown for easy \n  collaboration on GitHub, but other formats like PDFs may also be acceptable.\n- For the markdown-written RFC, keep the text width within\n  100 characters, unless there is a reason to violate this rule, e.g., \n  long links or wide tables.\n- It is also recommended to read through existing RFCs to better understand the \ngeneral writing style and required elements.\n"
  },
  {
    "path": "third-party/tbb/rfcs/archived/README.md",
    "content": "# Archived Design Documents\n\nDocuments may appear in the `rfcs/archived` directory for one of \ntwo reasons:\n\n1. The document describes a feature or extension that has been deprecated and \nthen removed.\n2. The document describes a proposed feature or extension that have\nnot (ultimately) become a fully supported feature. \n\nDesign documents that appear in the `rfcs/archived` folder should describe a \nreason for archiving.  Documents may \nremain in this folder indefinitely to serve as a source of information about\nprevious proposals and features.\n"
  },
  {
    "path": "third-party/tbb/rfcs/experimental/README.md",
    "content": "# Design Documents for Experimental Features\n\nExperimental proposals describe extensions that are implemented and\nreleased as preview features in the oneTBB library. A preview\nfeature is expected to have an implementation that is of comparable quality\nto a fully supported feature. Sufficient tests are required.\n\nAn experimental feature does not yet appear as part of the oneTBB \nspecification. Therefore, the interface and design can change.\nThere is no commitment to backward compatibility for a preview\nfeature.\n\nThe documents in this directory \nshould include a list of the exit conditions that need to be met to move from\npreview to fully supported. These conditions might include demonstrated\nperformance improvements, demonstrated interest from the community,\nacceptance of the required oneTBB specification changes, etc. \n\nFor features that require oneTBB specification changes, the document might\ninclude wording for those changes or a link to any PRs that opened\nagainst the specification.\n\nProposals should not remain in the experimental directory forever.\nIt should move either to the\nsupported folder when they become fully supported or the archived \nfolder if they are not fully accepted. It should be highly unusual for \na proposal to stay in the experimental folder for longer than a year or \ntwo.\n"
  },
  {
    "path": "third-party/tbb/rfcs/experimental/blocked_nd_range_ctad/README.md",
    "content": "# Enabling CTAD for blocked_nd_range\n\n## Introduction\n\n`oneapi::tbb::blocked_nd_range` class was introduced as a representation for recursively divisible N-dimensional range for oneTBB parallel algorithms.\nThis document proposes extending its API with the deduction guides since C++17 to allow dropping the explicit template arguments specification while\ncreating the object if they can be determined using the arguments provided:\n\n```cpp\noneapi::tbb::blocked_range<int> range1(0, 100);\noneapi::tbb::blocked_range<int> range2(0, 200);\noneapi::tbb::blocked_range<int> range3(0, 300);\n\n// Since 3 ranges of type int are provided, the type of nd_range\n// can be deduced as oneapi::tbb::blocked_nd_range<int, 3>\noneapi::tbb::blocked_nd_range nd_range(range1, range2, range3);\n```\n\n## Proposal\n\n### Supported constructors\n\nThe `oneapi::tbb::blocked_nd_range` supports the following set of constructors:\n\n```cpp\ntemplate <typename T, unsigned int N>\\\nclass blocked_nd_range {\npublic:\n    using value_type;\n    using dim_range_type = blocked_range<value_type>;\n    using size_type = typename dim_range_type::size_type;\n\n    blocked_nd_range(const dim_range_type& dim0, /*exactly N arguments of type const dim_range_type&*/); // [1]\n    blocked_nd_range(const value_type (&dim_size)[N], size_type grainsize = 1);                          // [2]\n    blocked_nd_range(blocked_nd_range& r, split);                                                        // [3]\n    blocked_nd_range(blocked_nd_range& r, proportional_split proportion);                                // [4]\n};\n```\n\nThe constructor `[1]` is intended to create an n-dimensional interval by providing N one-dimensional ranges. Each element represents the\ndimension of the N-dimensional interval being constructed.\nIt also allows to construct these one-dimensional intervals in-place from braced-inclosed initializer lists:\n\n```cpp\n// Passing blocked_range objects itself\ntbb::blocked_range<int> dim_range(0, 100);\n\ntbb::blocked_nd_range<int, 2> nd_range_1(dim_range, tbb::blocked_range<int>(0, 200));\n\n// Constructing in-place from braced-init-lists\ntbb::blocked_nd_range<int, 2> nd_range_2({0, 100}, {0, 200, 5});\n\n// Combined approach\ntbb::blocked_nd_range<int, 2> nd_range_3(dim_range, {0, 200, 5});\n```\n\nThe constructor `[2]` is intended to create an interval by providing a C-array each element of which represents a size of the corresponding\ndimension of the interval being created. This constructor also allows to pass braced-init-list instead of the array from stack:\n\n```cpp\n// Passing array object itself\nint sizes[3] = {100, 200, 300};\n\n// Constructing the 3-dim range [0, 100), [0, 200), [0, 300)\ntbb::blocked_nd_range<int, 3> nd_range_1(sizes);\n\n// Using the grainsize - each dim range will have grainsize 5\ntbb::blocked_nd_range<int, 3> nd_range_2(sizes, 5);\n\n// Passing the braced-init-list\ntbb::blocked_nd_range<int, 3> nd_range_3({100, 200, 300});\n```\n\nIn case of passing the template arguments explicitly, using a braced-init-list in both constructors `[1]` and `[2]` does not introduce any \nambiguity since if the number of braced-init lists provided is always equal to the number of dimensions of the range for constructor `[1]` and\nthe number of elements in the braced-init list equal to the number of dimensions for constructor `[2]`. \n\nConstructors `[3]` and `[4]` are intended to split the range into two parts. They are part of _Range_ Named Requirements and used internally in the\nimplementation of oneTBB parallel algorithms.\n\n### Proposed deduction guides\n\nThis paper proposes to add explicit deduction guides for `blocked_nd_range` class:\n\n```cpp\n// [g1]\ntemplate <typename Value, typename... Values>\nblocked_nd_range(blocked_range<Value>, blocked_range<Values>...)\n-> blocked_nd_range<Value, 1 + sizeof...(Values)>;\n```\n\nThis deduction guide corresponds to the constructor `[1]` for the case of passing _N_ `blocked_range` objects itself.\nIt only participates in overload resolution if all of the types in `Values` are same as `Value`.\n\nTo cover the case while blocked_ranges are passed as braced-init-lists, it is proposed to add a deduction guide taking \na set of C-array objects.\n\nThere are currently two options how to define the deduction guide (or a function) taking the braced-init-list\nof any type- C-array and `std::initializer_list`. The issue with `std::initializer_list` is that it does not allow\ntracking the size in compile-time. \n\n```cpp\n// [g2]\ntemplate <typename Value, unsigned int... Ns>\nblocked_nd_range(const Value (&...)[Ns])\n-> blocked_nd_range<Value, sizeof...(Ns)>;\n```\n\nThis deduction guide only participates in overload resolution if\n1. the number of C-arrays provided is more than 1 (`sizeof...(Ns) > 1`),\n2. Each C-array has the size 2 or 3.\n\nThe first constraint is intended to disambiguate between `[1]` and `[2]`.\nSee [separate section](#ambiguity-while-passing-the-single-braced-init-list-of-size-2-or-3) for more details.\n\nThe second constraint is intended to accept only the braced-init-lists that can be used to initialize the `blocked_range` object.\nCurrently it supports the constructor with 2 parameters, taking _begin_ and _end_ of the interval, and the constructor with 3 parameters, taking\nadditional _grainsize_ parameter.\n\nThe important limitation of the deduction guide `[g2]` is that all of the elements in the braced-init-list should be of the same type. \nIt would be impossible to use this constructor for initializing the `blocked_range` objects of types that are not convertible to `size_type`\ntogether with the grainsize:\n\n```cpp\nstd::vector<int> vector;\n\n// OK, deduced as blocked_nd_range<iterator, 1>\nblocked_nd_range range1({vector.begin(), vector.end()});\n\n// FAIL, all items in braced-init-lists should be objects of the same type\n// It is impossible to provide grainsize as iterator since iterator is not convertible to size_type\nblocked_nd_range range({vector.begin(), vector.end(), /*grainsize = */5});\n```\n\nFor the constructor `[2]`, the following deduction guide is proposed:\n\n```cpp\n// [g3]\ntemplate <typename Value, unsigned int N>\nblocked_nd_range(const Value (&)[N])\n```\n\nFor service constructors `[3]` and `[4]`, the following guides are proposed:\n\n```cpp\n// [g4]\ntemplate <typename Value, unsigned int N>\nblocked_nd_range(blocked_nd_range<Value, N>, split)\n-> blocked_nd_range<Value, N>;\n\n// [g5]\ntemplate <typename Value, unsigned int N>\nblocked_nd_range(blocked_nd_range<Value, N>, proportional_split)\n-> blocked_nd_range<Value, N>;\n```\n\nFrom the specification perspective, such a deduction guides can be generated as implicit deduction guides, in the same manner as copy and move constructors.\nBut the current oneTBB implementation, these deduction guides are not generated implicitly, so the explicit guides are required.\nGuides `[g4]` and `[g5]` are not proposed to be a part of the spec, only a part of oneTBB implementation.\n\n## Open Questions\n\n### Ambiguity while passing the single braced-init-list of size 2 or 3\n\nWhile using the CTAD with `blocked_nd_range`, there is an ambiguity between two approaches while using a single braced-init-list of size 2 or 3:\n\n```cpp\nblocked_nd_range range1({10, 20});\nblocked_nd_range range2({10, 20, 5});\n```\n\nSince the template arguments for `blocked_nd_range` are not specified, there can be two possible resolutions:\n1. Be interpreted as one-dimensional range _[10, 20)_ (with grainsize 1 or 5). In this case it should be deduced as `blocked_nd_range<int, 1>` and \n   constructed using the constructor `[1]`.\n2. Be interpreted as two (or three) dimensional range _[0, 10)_, _[0, 20)_ (and _[0, 5)_). In this case it should be deduced as `blocked_nd_range<int, 3>` \n   and constructed using the constructor `[2]`. \n\nSince it is unclear which resolution should be chosen, current proposal is not to support such use-case in CTAD and require the user to either explicitly\nspecialize the template arguments, or to use array or `blocked_range` type itself to initialize the object.\n\n### Passing single C-array object of size 2 or 3\n\nAnother interesting issue that should be resolved, is passing the single C-array object of size 2 or 3 to the constructor:\n\n```cpp\nint array[2] = {100, 200};\ntbb::blocked_nd_range range(array);\n```\n\nSince the `blocked_range` is not constructible from C-array and the braced-init-list is not used, the user expects the range to be deduced as\n`blocked_nd_range<int, 2>` and the constructor `[2]` to be used.\n\nIf we add one more explicit deduction guide to support the code above, the single braced-init-list of size 2 or 3 would also match on this guide.\n\nThere are the following options how this issue can be resolved:\n* Add a new deduction guide to support the code above. The downside of this approach is that it makes the ambiguity, discussed in the\n  [previous section](#ambiguity-while-passing-the-single-braced-init-list-of-size-2-or-3) to be resolved also and always result in 2 or 3-dimensional\n  range. If the user provided the single braced-init-list to have one-dimensional range, he would face the unexpected behavior without any diagnostics.\n* Document the code above as limitation and do not support it. The downside is  that the code above is considered valid, but    \n  cannot be supported because of the implementation of CTAD and current set of constructors.\n* Support the use-case above but do not support CTAD for braced-init-lists at all. The major downside is that the user would \n  need to always specify the exact type `tbb::blocked_range` while using the braced-init-list construction.\n\n### Using the constructor `[1]` with \"mixed\" arguments\n\nThere is a limitation of the deduction guides proposed if the constructor `[1]` is used with both arguments of exact `tbb::blocked_range` type\nand the braced-init-lists:\n\n```cpp\ntbb::blocked_range<int> dim_range(0, 100);\ntbb::blocked_nd_range nd_range(dim_range, {0, 200}, {0, 300}, dim_range);\n```\n\nThese arguments would not match nether on the `[g1]` not `[g2]` and it is unclear how to define the deduction guide that covers this case.\nCurrent proposal is to keep this scenario a limitation for using the CTAD and always require using the consistent set of parameters - or \nthe set of braced-init-lists or the set of `tbb::blocked_range` objects.\n\n## Exit criteria\n\nThe following conditions need to be met to move the feature from experimental to fully supported:\n* Collecting feedback on user experience confirming the choices made on the open questions and limitations:\n  * Preference of multi-dimensional range while deducing from the C-array or braced-init-list of size 2 or 3.\n    See [separate section](#passing-single-c-array-object-of-size-2-or-3) for more details.\n  * Limitation for the deduction from the braced-init-list to accept only the lists of items of the same type.\n  * Limitation for the deduction guide `1` in case of mixing `blocked_range` objects and braced-init-lists.\n    See [separate section](#using-the-constructor-1-with-mixed-arguments) for more details.\n* The corresponding oneTBB specification update should be done backed by the user feedback provided.\n"
  },
  {
    "path": "third-party/tbb/rfcs/experimental/parallel_phase_for_task_arena/README.md",
    "content": "# Adding API for parallel phase to task_arena to warm-up/retain/release worker threads\n\n## Introduction\n\nIn oneTBB, there has never been an API that allows users to block worker threads within the arena.\nThis design choice was made to preserve the composability of the application.\nBefore PR#1352, workers moved to the thread pool to sleep once there were no arenas with active\ndemand. However, PR#1352 introduced a delayed leave behavior to the library that\nresults in blocking threads for an _implementation-defined_ duration inside an arena\nif there is no active demand arcoss all arenas. This change significantly\nimproved performance for various applications on high thread count systems.\nThe main idea is that usually, after one parallel computation ends,\nanother will start after some time. The delayed leave behavior is a heuristic to utilize this,\ncovering most cases within _implementation-defined_ duration.\n\nHowever, the new behavior is not the perfect match for all the scenarios:\n* The heuristic of delayed leave is unsuitable for the tasks that are submitted\n  in an unpredictable pattern and/or durations.\n* If oneTBB is used in composable scenarios it is not behaving as\n  a good citizen consuming CPU resources.\n  * For example, if an application runs a series of stages where oneTBB is used for one stage\n    and OpenMP is used for a subsequent stage, there is a chance that oneTBB workers will\n    interfere with OpenMP threads. This interference might result in slight oversubscription,\n    which in turn might lead to underperformance.\n\nSo there are two related problems but with different resolutions:\n* Completely disable new behavior for scenarios where the heuristic of delayed leave is unsuitable.\n* Optimize library behavior so customers can benefit from the heuristic of delayed leave but\n  make it possible to indicate that \"it is the time for the TBB arena to release threads\".\n\n## Proposal\n\nLet's tackle these problems one by one.\n\n### Completely disable new behavior\n\nLet’s consider both “Delayed leave” and “Fast leave” as 2 different states in state machine.<br>\n* The \"Delayed leave\" heuristic benefits most of the workloads. Therefore, this is the \n  default behavior for arena. \n* Workloads that has rather negative performance impact from the heuristic of delayed leave\n  can create an arena in “Fast leave” state.\n\n<img src=\"completely_disable_new_behavior.png\" width=800>\n\nThere will be a question that we need to answer:\n* Do we see any value if arena potentially can transition from one to another state?\n\nTo answer this question, the following scenarios should be considered:\n* What if different types of workloads are mixed in one application?\n* Different types of arenas can be used for different types of workloads.\n\n### When threads should leave?\n\noneTBB itself can only guess when the ideal time to release threads from the arena is.\nTherefore, it does its best effort to preserve and enhance performance without completely\nmessing up composability guarantees (that is how delayed leave is implemented).\n\nAs we already discussed, there are cases where it does not work perfectly,\ntherefore customers that want to further optimize this\naspect of oneTBB behavior should be able to do it.\n\nThis problem can be considered from another angle. Essentially, if the user can indicate\nwhere parallel computation ends, they can also indicate where it starts.\n\n<img src=\"parallel_phase_introduction.png\" width=800>\n\nWith this approach, the user not only releases threads when necessary but also specifies a\nprogrammable block where worker threads should expect new work coming regularly\nto the executing arena.\n\nLet’s add a new state to the existing state machine. To represent \"Parallel Phase\" state.\n\n> **_NOTE:_** The \"Fast leave\" state is colored Grey just for simplicity of the chart.\n              Let's assume that arena was created with the \"Delayed leave\". \n              The logic demonstrated below is applicable to the \"Fast leave\" as well.\n\n<img src=\"parallel_phase_state_initial.png\" width=800>\n\nThis state diagram leads to several questions:\n* What if there are multiple Parallel Phases?\n* If “End of Parallel Phase” leads back to “Delayed leave” how soon will threads\n  be released from arena?\n  * What if we indicated that threads should leave arena after the \"Parallel Phase\"?\n  * What if we just indicated the end of the \"Parallel Phase\"?\n\nThe extended state machine aims to answer these questions.\n* The first call to the “Start of Phase” will transition into the “Parallel Phase” state.\n* The last call to the “End of Phase” will transition back to the “Delayed leave” state\n  or into the \"One-time Fast leave\" if it is indicated that threads should leave sooner.\n* Concurrent or nested calls to the “Start of Phase” or the “End of Phase”\n  increment/decrement a reference counter.\n\n<img src=\"parallel_phase_state_final.png\" width=800>\n\nLet's consider the semantics that an API for explicit parallel phases can provide:\n* Start of a parallel phase:\n  * Indicates the point from which the scheduler can use a hint and keep threads in the arena\n    for longer.\n  * Serves as a warm-up hint to the scheduler:\n    * Allows reducing delays of computation start by initiating the wake-up of worker threads\n      in advance.\n* \"Parallel phase\" itself:\n  * Scheduler can implement different policies to retain threads in the arena.\n    * For instance, more aggressive policy might be implemented for _parallel phase_.\n      It can be beneficial in cases when the default arena leave policy is not sufficient enough.\n  * The semantics for retaining threads is a hint to the scheduler;\n    thus, no real guarantee is provided. The scheduler can ignore the hint and\n    move threads to another arena or to sleep if conditions are met.\n* End of a parallel phase:\n  * Indicates the point from which the scheduler may drop the hint and\n    no longer retain threads in the arena.\n  * Indicates that worker threads should avoid busy-waiting once there is no more work in the arena.\n    * Temporarily overrides the default arena leave policy, which will be restored when\n      new work is submitted.\n\n\n### Proposed API\n\nSummary of API changes:\n\n* Add enumeration class for the arena leave policy.\n* Add the policy as the last parameter to the arena constructor and initializer\ndefaulted to \"automatic\".\n* Add functions to start and end the parallel phase to the `task_arena` class\nand the `this_task_arena` namespace.\n* Add RAII class to map a parallel phase to a code scope.\n\n```cpp\nclass task_arena {\n    enum class leave_policy : /* unspecified type */ {\n        automatic = /* unspecifed */,\n        fast = /* unspecifed */,\n    };\n\n    task_arena(int max_concurrency = automatic, unsigned reserved_for_masters = 1,\n               priority a_priority = priority::normal,\n               leave_policy a_leave_policy = leave_policy::automatic);\n\n    task_arena(const constraints& constraints_, unsigned reserved_for_masters = 1,\n               priority a_priority = priority::normal,\n               leave_policy a_leave_policy = leave_policy::automatic);\n\n    void initialize(int max_concurrency, unsigned reserved_for_masters = 1,\n                    priority a_priority = priority::normal,\n                    leave_policy a_leave_policy = leave_policy::automatic);\n\n    void initialize(constraints a_constraints, unsigned reserved_for_masters = 1,\n                    priority a_priority = priority::normal,\n                    leave_policy a_leave_policy = leave_policy::automatic);\n\n    void start_parallel_phase();\n    void end_parallel_phase(bool with_fast_leave = false);\n\n    class scoped_parallel_phase {\n        scoped_parallel_phase(task_arena& ta, bool with_fast_leave = false);\n    };\n};\n\nnamespace this_task_arena {\n    void start_parallel_phase();\n    void end_parallel_phase(bool with_fast_leave = false);\n}\n```\nThe _parallel phase_ continues until each previous `start_parallel_phase` call\nto the same arena has a matching `end_parallel_phase` call.<br>\nLet's introduce RAII scoped object that will help to manage the contract.\n\nIf the end of the parallel phase is not indicated by the user, it will be done automatically when\nthe last public reference is removed from the arena (i.e., task_arena has been destroyed or,\nfor an implicitly created arena, the thread that owns it has completed).\nThis ensures correctness is preserved (threads will not be retained forever).\n\n### Examples\n\nFollowing code snippets show how the new API can be used.\n\n```cpp\nvoid task_arena_leave_policy_example() {\n    tbb::task_arena ta{tbb::task_arena::automatic, 1, priority::normal, leave_policy::fast};\n    ta.execute([]() {\n        // Parallel computation\n    });\n    // Different parallel runtime is used\n    // so it is preferred that worker threads won't be retained\n    // in the arena at this point.\n    #pragma omp parallel for\n    for (int i = 0; i < work_size; ++i) {\n        // Computation\n    }\n}\n\nvoid parallel_phase_example() {\n    tbb::this_task_arena::start_parallel_phase();\n    tbb::parallel_for(0, work_size, [] (int idx) {\n        // User defined body\n    });\n\n    // Some serial computation\n\n    tbb::parallel_for(0, work_size, [] (int idx) {\n        // User defined body\n    });\n    tbb::this_task_arena::end_parallel_phase(/*with_fast_leave=*/true);\n\n    // Different parallel runtime (for example, OpenMP) is used\n    // so it is preferred that worker threads won't be retained\n    // in the arena at this point.\n    #pragma omp parallel for\n    for (int i = 0; i < work_size; ++i) {\n        // Computation\n    }\n}\n\nvoid scoped_parallel_phase_example() {\n    tbb::task_arena ta{/*arena constraints*/};\n    {\n        // Start of the parallel phase\n        tbb::task_arena::scoped_parallel_phase phase{ta, /*with_fast_leave=*/true};\n        ta.execute([]() {\n            // Parallel computation\n        });\n\n        // Serial computation\n\n        ta.execute([]() {\n            // Parallel computation\n        });\n    } // End of the parallel phase\n\n    // Different parallel runtime (for example, OpenMP) is used\n    // so it is preferred that worker threads won't be retained\n    // in the arena at this point.\n    #pragma omp parallel for\n    for (int i = 0; i < work_size; ++i) {\n        // Computation\n    }\n}\n```\n\n## Considerations\n\nThe alternative approaches were also considered.<br>\nWe can express this state machine as complete graph and provide low-level interface that\nwill give control over state transition.\n\n<img src=\"alternative_proposal.png\" width=600>\n\nWe considered this approach too low-level. Plus, it leaves a question: \"How to manage concurrent changes of the state?\".\n\nThe retaining of worker threads should be implemented with care because\nit might introduce performance problems if:\n* Threads cannot migrate to another arena because they are\n  retained in the current arena.\n* Compute resources are not homogeneous, e.g., the CPU is hybrid.\n  Heavier involvement of less performant core types might result in artificial work\n  imbalance in the arena.\n\n## Technical Details\n\nTo implement the proposed feature, the following changes were made:\n* Added a new entity `thread_leave_manager` to the `r1::arena` which is responsible for\n  for managing the state of workers' arena leaving behaviour.\n* Introduced two new entry points to the library.\n  * `r1::enter_parallel_phase(d1::task_arena_base*, std::uintptr_t)` - used to communicate\n    the start of parallel phase with the library.\n  * `r1::exit_parallel_phase(d1::task_arena_base*, std::uintptr_t)` - used to communicate\n    the end of parallel phase with the library.\n\n### Thread Leave Manager\n\n`thread_leave_manager` class implements the state machine described in proposal.\nSpecifically, it controls when worker threads are allowed to be retained in the arena.\n`thread_leave_manager` is initialized with a state that determines the default\nbehavior for workers leaving the arena.\n\nTo support `start/end_parallel_phase` API, it provides functionality to override the default\nstate with a \"Parallel Phase\" state. It also keeps track of the number of active parallel phases.\n\nThe following sequence diagram illustrates the interaction between the user and\nthe `thread_leave_manager` during the execution of parallel phases. It shows how the\n`thread_leave_manager` manages the state transitions when using `start/end_parallel_phase`.\n\n<img src=\"parallel_phase_sequence_diagram.png\" width=1000>\n\n## Open Questions in Design\n\nSome open questions that remain:\n* Are the suggested APIs sufficient?\n  * In the current version of proposed API, the `scoped_parallel_phase` object can be created\n    only for already existing `task_arena`. Should it be possible for `this_task_arena` as well?\n  * What should be expected from \"Parallel Phase\" API for `this_task_arena` when a calling thread\n    doesn't yet have any associated arena?\n  * Should parallel phase API be limited only to RAII-only style?\n    * Are there any scenarios where inconvenience of handling `scoped_parallel_phase` object is\n      not acceptable?\n* Are there additional use cases that should be considered that we missed in our analysis?\n* Do we see any value if arena potentially can transition from one to another state?\n  * What if different types of workloads are mixed in one application?\n  * What if there concurrent calls to this API?\n\n## Conditions to become fully supported\n\nFollowing conditions need to be met for the feature to move from experimental to fully supported:\n* Open questions regarding API should be resolved.\n* The feature should demonstrate performance improvements in scenarios mentioned.\n* oneTBB specification needs to be updated to reflect the new feature.\n"
  },
  {
    "path": "third-party/tbb/rfcs/proposed/README.md",
    "content": "# Design Documents for Proposed Features\n\nProposed features in this directory have reached some level of consensus within the \ncommunity, indicating that they have potential and deserve further development. \nHowever, the proposed changes have not yet been released as a\npreview or fully supported feature of the library.\n\nRFCs in the `rfcs/proposed` directory should explain the motivation,\ndesign, and open questions related to the proposed extension.\n"
  },
  {
    "path": "third-party/tbb/rfcs/proposed/loading-dependencies/loading-dependencies-by-module-name.org",
    "content": "#+title: Loading Dependencies By Module Name\n\n* Introduction\nThere is a well-known attack that involves loading of a malicious dependency\ninstead of the original one without notice to the party that does this loading.\nIn the industry it is usually called /DLL injection/ or /DLL preloading attack/\nand it is mostly associated with the Windows platform as it is known to be\nparticularly vulnerable to this kind of attack [1]. One of the recommendations\nthat safeguards against this type of attack is to specify fully qualified path\nto a dependency [2].\n\nHistorically, oneTBB loads its optional dependencies during its initialization\nprocess when these dependencies are used for the first time. The way oneTBB does\nthis is by building full paths to their dependencies using the path where the\noneTBB library itself resides. It is the only sensible path which can be\nobtained by oneTBB, whose usage conditions are not known at the time of\ndevelopment. The purpose is to minimize the risk of a DLL injection attack issue\nso that only certain paths are probed by the system loader. However,\ndependencies of a dependency are still searched by their module names only [3].\nSo, the risk is minimized only for a dependency itself and not for the libraries\nit depends on, not to mention that the file of a dependency can be replaced in\nthe file system by an attacker, which breaks even that protection. Besides that,\nloading of a dependency by specifying full path represents an inconvenience to\nthe developers who want to make use of their own variant of a dependency. Not\nonly they need to place their variant of a dependency to all of the places from\nwhich it is going to be found and loaded by every client component that depends\non it, but also this makes problematic the implementation (if not impossible) of\nsome scenarios where the dependency being loaded maintains single state shared\namong all its clients. Such scenarios are hard to implement because copies of\nthe same DLL loaded from different paths are considered to be different DLLs and\nin certain cases there is no support for filesystem linking mechanism to point\nto a single file [4, 5].\n\nSo, what is the main problem due to which loading by a module name makes Windows\nmuch more vulnerable to DLL injection than Linux?\n\nBesides difference in the order of accessing paths specified in the environment,\nWindows also prioritizes searching in the directory from which the application\nis loaded and current working directory [2]. Assuming that application is loaded\nfrom a directory that requires administrative permission on write, which is\nusually the case, it is the current working directory that forms the main DLL\npreloading attack scenario [1].\n\nThere are approaches to exclude the current working directory from the search\norder. However, for a library to avoid process-wide changes to the search order\nthe only viable solution for run-time loading is to pass\n~LOAD_LIBRARY_SAFE_CURRENT_DIRS~ flag to the ~LoadLibraryEx~ Windows API [6].\n\nWith the removal of the current working directory from loader's consideration,\nthe search order on Windows starts having little difference with the search\norder on Linux. The difference includes the order in which directories specified\nin the environment and system directories are considered, and the presence of\nthe first step of looking into an application directory on Windows [2, 7].\n\nSince the system environment variables and the environment of other processes\ncannot be changed, the only vulnerable place is an application directory [8, 9].\nBecause the application can be installed in a directory that does not require\nadministrative permissions on write, it still can be started by an account\nhaving them. Unlike Linux systems, for the process started with administrative\npermissions, the paths specified in the environment and the application\ndirectory are still considered by the Windows system loader [2, 7]. Therefore,\nan attacker can update permissive installation directory with a malicious\nversion of a binary, hence making it loaded in a process with elevated\npermissions. Note that specifying fully qualified path to the dependency does\nnot help in this case.\n\nFortunately, there is a signature verification process that helps validating the\nauthenticity of a binary before loading it into process address space and\nstarting its execution. This allows making use of the established search order\nwhile checking that genuine version of the dependency is used. However, not\nloading the binary because of the failed signature verification might not be\nalways desired. Especially, during the development phase or for a software\ndistributor who does not have the signature with which to sign the binary.\nTherefore, to preserve backward compatibility of such usage models, it is\nessential to have the possibility to disable signature verification.\n\n* Proposal\nBased on the analysis in the \"Introduction\" section and to support versatile\ndistribution models of oneTBB this RFC proposes to:\n\nOn Windows only:\n1. Introduce signature verification step to the run-time dependency loading\n   process.\n2. Introduce the ~TBB_VERIFY_DEPENDENCY_SIGNATURE~ compilation option that would\n   enable signature verification, and set it ~ON~ by default.\n3. Update documentation to include information about new\n   ~TBB_VERIFY_DEPENDENCY_SIGNATURE~ flag.\n4. Pass ~LOAD_LIBRARY_SAFE_CURRENT_DIRS~ flag to the ~LoadLibraryEx~ calls so\n   that current working directory is excluded from the list of directories in\n   which the system loader looks when trying to find and resolve dependency.\n\nOn all OSes:\n- Change dependency loading approach to load by module names only.\n\n* References\n1. [[https://support.microsoft.com/en-us/topic/secure-loading-of-libraries-to-prevent-dll-preloading-attacks-d41303ec-0748-9211-f317-2edc819682e1][Microsoft, \"Secure loading of libraries to prevent DLL preloading attacks\".]]\n2. [[https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-security][Microsoft, \"Dynamic-Link Library Security\", 7 January 2021]]\n3. [[https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order#factors-that-affect-searching][Microsoft, \"Dynamic-link library search order\", 9 February 2023]].\n4. [[https://learn.microsoft.com/en-us/windows/win32/dlls/run-time-dynamic-linking][Microsoft, \"Run-Time Dynamic Linking\", 7 January 2021]]\n5. [[https://github.com/NuGet/Home/issues/10734][NuGet project issue on GitHub, \"NuGet packaging should support symlinks within packages\", 7 April 2021]]\n6. [[https://learn.microsoft.com/en-us/windows/win32/api/LibLoaderAPI/nf-libloaderapi-loadlibraryexa][Microsoft, \"LoadLibraryExA function (libloaderapi.h)\", 9 February 2023]]\n7. [[https://www.man7.org/linux/man-pages/man8/ld.so.8.html][Linux man-pages 6.9.1, \"ld.so(8) — Linux manual page\", 8 May 2024]]\n8. [[https://learn.microsoft.com/en-us/windows/win32/procthread/environment-variables][Microsoft, \"Environment Variables\", 7 January 2021]]\n9. [[https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setenvironmentvariable][Microsoft, \"SetEnvironmentVariable function (winbase.h)\", 23 September 2022]]\n"
  },
  {
    "path": "third-party/tbb/rfcs/proposed/numa_support/README.md",
    "content": "# NUMA support\n\n## Introduction\n\nIn Non-Uniform Memory Access (NUMA) systems, the cost of memory accesses depends on the\n*nearness* of the processor to the memory resource on which the accessed data resides. \nWhile oneTBB has core support that enables developers to tune for Non-Uniform Memory \nAccess (NUMA) systems, we believe this support can be simplified and improved to provide \nan improved user experience.  \n\nThis RFC acts as an umbrella for sub-proposals that address four areas for improvement:\n\n1. improved reliability of HWLOC-dependent topology and pinning support in,\n2. addition of a NUMA-aware allocation,\n3. simplified approaches to associate task distribution with data placement and \n4. where possible, improved out-of-the-box performance for high-level oneTBB features.\n\nWe expect that this draft proposal will spawn sub-proposals that will progress\nindependently based on feedback and prioritization of the suggested features.\n\nThe features for NUMA tuning already available in the oneTBB 1.3 specification include:\n\n- Functions in the `tbb::info` namespace **[info_namespace]** \n  - `std::vector<numa_node_id> numa_nodes()`\n  - `int default_concurrency(numa_node_id id = oneapi::tbb::task_arena::automatic)`\n- `tbb::task_arena::constraints` in **[scheduler.task_arena]**\n\nBelow is the example based on existing oneTBB documentation that demonstrates the use of these APIs\nto pin threads to different arenas to each of the NUMA nodes available on a system, submit work\nacross those `task_arena` objects and into associated `task_group` objects, and then wait for work\nagain using both the `task_arena` and `task_group` objects.\n\n    void constrain_for_numa_nodes() {\n      std::vector<tbb::numa_node_id> numa_nodes = tbb::info::numa_nodes();\n      std::vector<tbb::task_arena> arenas(numa_nodes.size());\n      std::vector<tbb::task_group> task_groups(numa_nodes.size());\n\n      // initialize each arena, each constrained to a different NUMA node\n      for (int i = 0; i < numa_nodes.size(); i++)\n        arenas[i].initialize(tbb::task_arena::constraints(numa_nodes[i]), 0);\n\n      // enqueue work to all but the first arena, using the task_group to track work\n      // by using defer, the task_group reference count is incremented immediately\n      for (int i = 1; i < numa_nodes.size(); i++)\n        arenas[i].enqueue(\n          task_groups[i].defer([] { \n            tbb::parallel_for(0, N, [](int j) { f(w); }); \n          })\n        );\n\n      // directly execute the work to completion in the remaining arena\n      arenas[0].execute([] {\n        tbb::parallel_for(0, N, [](int j) { f(w); });\n      });\n\n      // join the other arenas to wait on their task_groups\n      for (int i = 1; i < numa_nodes.size(); i++)\n        arenas[i].execute([&task_groups, i] { task_groups[i].wait(); });\n    }\n\n### The need for application-specific knowledge\n\nIn general when tuning a parallel application for NUMA systems, the goal is to expose sufficient\nparallelism while minimizing (or at least controlling) data access and communication costs. The \ntradeoffs involved in this tuning often rely on application-specific knowledge. \n\nIn particular, NUMA tuning typically involves:\n\n1. Understanding the overall application problem and its use of algorithms and data containers\n2. Placement/allocation of data container objects onto memory resources\n3. Distribution of tasks to hardware resources that optimize for data placement\n\nAs shown in the previous example, the oneTBB 1.3 specification only provides low-level\nsupport for NUMA optimization. The `tbb::info` namespace provides topology discovery. And the\ncombination of `task_arena`, `task_arena::constraints` and `task_group` provide a mechanism for\nplacing tasks onto specific processors. There is no high-level support for memory allocation\nor placement, or for guiding the task distribution of algorithms.\n\n### Issues that should be resolved in the oneTBB library\n\n**The behavior of existing features is not always predictable.** There is a note in \nsection **[info_namespace]** of the oneTBB specification that describes\nthe function `std::vector<numa_node_id> numa_nodes()`, \"If error occurs during system topology \nparsing, returns vector containing single element that equals to `task_arena::automatic`.\"  \n\nIn practice, the error can occurs because HWLOC is not detected on the system. While the \noneTBB documentation states in several places that HWLOC is required for NUMA support and \neven provides guidance on \n[how to check for HWLOC](https://www.intel.com/content/www/us/en/docs/onetbb/get-started-guide/2021-12/next-steps.html), \nthe inability to resolve HWLOC at runtime silently returns a default of `task_arena::automatic`. This\ndefault does not pin threads to NUMA nodes. It is too easy to write code similar to the preceding \nexample and be unaware that a HWLOC installation error (or lack of HWLOC) has undone all your effort.\n\n**Getting good performance using these tools requires notable manual coding effort by users.** As we \ncan see in the preceding example, if we want to spread work across the NUMA nodes in \na system we might need to query the topology using functions in the `tbb::info` namespace, create\none `task_arena` per NUMA node, along with one `task_group` per NUMA node, and then add an\nextra loop that iterates over these `task_arena` and `task_group` objects to execute the\nwork on the desired NUMA nodes. We also need to handle all container allocations using OS-specific\nAPIs (or behaviors, such as first-touch) to allocator or place them on the appropriate NUMA nodes.\n\n**The out-of-the-box performance of the generic TBB APIs on NUMA systems is not good enough.**\nShould the oneTBB library do anything special by default if the system is a NUMA system?  Or should \nregular random stealing distribute the work across all of the cores, regardless of which NUMA first \ntouched the data?\n\nIs it reasonable for a developer to expect that a series of loops, such as the ones that follow, will\ntry to create a NUMA-friendly distribution of tasks so that accesses to the same elements of `b` and `c`\nin the two loops are from the same NUMA nodes? Or is this too much to expect without providing hints? \n\n    tbb::parallel_for(0, N, \n      [](int i) { \n        b[i] = f(i);\n        c[i] = g(i); \n      });\n\n    tbb::parallel_for(0, N, \n      [](int i) { \n        a[i] = b[i] + c[i]; \n      });\n\n## Possible Sub-Proposals\n\n### Increased availability of NUMA support\n\nSee [sub-RFC for increased availability of NUMA API](tbbbind-link-static-hwloc.org)\n\n\n### Add NUMA-constrained arenas\n\nSee [sub-RFC for creation and use of NUMA-constrained arenas](numa-arenas-creation-and-use.org)\n\n### NUMA-aware allocation\n\nDefine allocators or other features that simplify the process of allocating or placing data onto\nspecific NUMA nodes.\n\n### Simplified approaches to associate task distribution with data placement\n\nAs discussed earlier, NUMA-aware allocation is just the first step in optimizing for NUMA architectures.\nWe also need to deliver mechanisms to guide task distribution so that tasks are executed on execution\nresources that are near to the data they access. oneTBB already provides low-level support through\n`tbb::info` and `tbb::task_arena`, but we should up-level this support into the high-level algorithms,\nflow graph and containers where appropriate.\n\n### Improved out-of-the-box performance for high-level oneTBB features.\n\nFor high-level oneTBB features that are modified to provide improved NUMA support, we can try to \nalign default behaviors for those features with user-expectations when used on NUMA systems.\n\n## Open Questions\n\n1. Do we need simplified support, or are users that want NUMA support in oneTBB\nwilling to, or perhaps even prefer, to manage the details manually?\n2. Is it reasonable to expect good out-of-the-box performance on NUMA systems \nwithout user hints or guidance.\n"
  },
  {
    "path": "third-party/tbb/rfcs/proposed/numa_support/tbbbind-link-static-hwloc.org",
    "content": "# -*- fill-column: 80; -*-\n\n#+title: Link ~tbbbind~ with Static HWLOC for NUMA API predictability\n\n*Note:* This document is a sub-RFC of the [[file:README.md][umbrella RFC about improving NUMA\nsupport]]. Specifically, the \"Increased availability of NUMA support\" section.\n\n* Introduction\noneTBB has a soft dependency on several variants of ~tbbbind~, which the library\nloads during the initialization stage. Each ~tbbbind~, in turn, has a hard\ndependency on a specific version of the HWLOC library [1, 2]. The soft\ndependency means that the library continues the execution even if the system\nloader fails to resolve the hard dependency on HWLOC for ~tbbbind~. In this\ncase, oneTBB does not discover the hardware topology. Instead, it defaults to\nviewing all CPU cores as uniform, consistent with TBB behavior when NUMA\nconstraints are not used. As a result, the following code returns the irrelevant\nvalues that do not reflect the actual topology:\n\n#+begin_src C++\nstd::vector<oneapi::tbb::numa_node_id> numa_nodes = oneapi::tbb::info::numa_nodes();\nstd::vector<oneapi::tbb::core_type_id> core_types = oneapi::tbb::info::core_types();\n#+end_src\n\nThis lack of valid HW topology, caused by the absence of a third-party library,\nis the major problem with the current oneTBB behavior. The problem lies in the\nlack of diagnostics making it difficult for developers to detect. As a result,\nthe code continues to run but fails to use NUMA as intended.\n\nDependency on a shared HWLOC library has the following benefits:\n1. Code reuse with all of the positive consequences out of this, including\n   relying on the same code that has been tested and debugged, allowing the OS\n   to share it among different processes, which consequently improves on cache\n   locality and memory footprint. That's the primary purpose of shared\n   libraries.\n2. A drop-in replacement. Users are able to use their own version of HWLOC\n   without recompilation of oneTBB. This specific version of HWLOC could include\n   a hotfix to support a particular and/or new hardware that a customer has, but\n   whose support is not yet upstreamed to HWLOC project. It is also possible\n   that such support won't be upstreamed at all if that hardware is not going to\n   be available for massive users. It could also be a development version of\n   HWLOC that someone wants to test on their systems first. Of course, they can\n   do it with the static version as well, but that's more cumbersome as it\n   requires recompilation of every dependent component.\n\nThe only disadvantage from depending on HWLOC library dynamically is that the\ndevelopers that use oneTBB's NUMA support API need to make sure the library is\navailable and can be found by oneTBB. Depending on the distribution model of a\ndeveloper's code, this is achieved either by:\n1. Asking the end user to have necessary version of a dependency pre-installed.\n2. Bundling necessary HWLOC version together with other pieces of a product\n   release.\n\nHowever, the requirement to fulfill one of the above steps for the NUMA API to\nstart paying off may be considered as an incovenience and, what is more\nimportant, it is not always obvious that one of these steps is needed.\nEspecially, due to silent behavior in case HWLOC library cannot be found in the\nenvironment.\n\nThe proposal is to reduce the effect of the disadvantage of relying on a dynamic\nHWLOC library. The improvements involve statically linking HWLOC with one of the\n~tbbbind~ libraries distributed together with oneTBB. At the same time, you\nretain the flexibility to specify different version of HWLOC library if needed.\n\nSince HWLOC 1.x is an older version and modern operating systems install HWLOC\n2.x by default, the probability of users being restricted to HWLOC 1.x is\nrelatively small. Thus, we can reuse the filename of the ~tbbbind~ library\nlinked to HWLOC 1.x for the library linked against a static HWLOC 2.x.\n\n* Proposal\n1. Replace the dynamic link of ~tbbbind~ library currently linked\n   against HWLOC 1.x with a link to a static HWLOC library version 2.x.\n2. Add loading of that ~tbbbind~ variant as the last attempt to resolve the\n   dependency on functionality provided by the ~tbbbind~ layer.\n3. Update the oneTBB documentation, including\n   [[https://uxlfoundation.github.io/oneTBB/search.html?q=tbb%3A%3Ainfo][these\n   pages]], to detail the steps for identifying which ~tbbbind~ is being used.\n\n** Advantages\n1. The proposed behavior introduces a fallback mechanism for resolving the HWLOC\n   library dependency when it is not in the environment, while still preferring\n   user-provided versions. As a result, the problematic oneTBB API usage works\n   as expected, returning an enumerated list of actual NUMA nodes and core types\n   on the system the code is running on, provided that the loaded HWLOC library\n   works on that system and that an application properly distributes all\n   binaries of oneTBB, sets the environment so that the necessary variant of\n   ~tbbbind~ library can be found and loaded.\n2. Dropping support for HWLOC 1.x, does not introduce an additional ~tbbbind~\n   variant while maintaining support for widely used versions of HWLOC.\n\n** Disadvantages\nBy default, there is still no diagnostics if you fail to correctly setup an\nenvironment with your version of HWLOC. Although, specifying the ~TBB_VERSION=1~\nenvironment variable helps identify configuration issues quickly.\n\n* Alternative Handling for Missing System Topology\nThe other behavior in case HWLOC library cannot be found is to be more explicit\nabout the problem of a missing component and to either issue a warning or to\nrefuse working requiring one of the ~tbbbind~ variant to be loaded (e.g., throw\nan exception).\n\nComparing these alternative approaches to the one proposed.\n** Common Advantages\n- Explicitly indicates that the functionality being used does not work, instead\n  of failing silently.\n- Avoids the need to distribute an additional variant of ~tbbbind~ library.\n\n** Common Disadvantages\n- Requires additional step from the user side to resolve the problem. In other\n  words, it does not provide complete solution to the problem.\n\n*** Disadvantages of Issuing a Warning\n- The warning may be unnoticed, especially if standard streams are closed.\n\n*** Disadvantages of Throwing an Exception\n- May break existing code that does not expect an exception to be thrown.\n- Requires introduction of an additional exception hierarchy.\n\n* References\n1. [[https://www.open-mpi.org/projects/hwloc/][HWLOC project main page]]\n2. [[https://github.com/open-mpi/hwloc][HWLOC project repository on GitHub]]\n"
  },
  {
    "path": "third-party/tbb/rfcs/supported/README.md",
    "content": "# Design Documents for Supported Features\n\nSupported proposals describe extensions implemented and\nreleased as fully supported features of the oneTBB library. A fully supported\nfeature has a high-quality implementation. If the proposal impacted the\npublic API of the library, it should appear in the oneTBB specification and\nhave supporting documentation in the oneTBB Reference as needed. A fully \nsupported feature is regularly tested.\n\nProposals that appear in `rfcs/supported` may be retained indefinitely to\nprovide insight into the design of existing features.\n"
  },
  {
    "path": "third-party/tbb/rfcs/template.md",
    "content": "# Descriptive Name for the Proposal\n\n## Introduction\n\nShort description of the idea proposed with explained motivation. \n\nThe motivation could be:\n- Improved users experience for API changes and extensions. Code snippets to\n  showcase the benefits would be nice here.\n- Performance improvements with the data, if available.\n- Improved engineering practices.\n\nIntroduction may also include any additional information that sheds light on\nthe proposal, such as history of the matter, links to relevant issues and\ndiscussions, etc.\n\n## Proposal\n\nA full and detailed description of the proposal with highlighted consequences.\n\nDepending on the kind of the proposal, the description should cover:\n\n- New use cases supported by the extension.\n- The expected performance benefit for a modification. \n- The interface of extensions including class definitions or function \ndeclarations.\n\nA proposal should clearly outline the alternatives that were considered, \nalong with their pros and cons. Each alternative should be clearly separated \nto make discussions easier to follow.\n\nPay close attention to the following aspects of the library:\n- API and ABI backward compatibility. The library follows semantic versioning\n  so if any of those interfaces are to be broken, the RFC needs to state that\n  explicitly.\n- Performance implications, as performance is one of the main goals of the library.\n- Changes to the build system. While the library's primary building system is\n  CMake, there are some frameworks that may build the library directly from the sources.\n- Dependencies and support matrix: does the proposal bring any new\n  dependencies or affect the supported configurations?\n\nSome other common subsections here are:\n- Discussion: some people like to list all the options first (as separate\n  subsections), and then have a dedicated section with the discussion.\n- List of the proposed API and examples of its usage.\n- Testing aspects.\n- Short explanation and links to the related sub-proposals, if any. Such\n  sub-proposals could be organized as separate standalone RFCs, but this is\n  not mandatory. If the change is insignificant or doesn't make any sense\n  without the original proposal, you can have it in the RFC.\n- Execution plan (next steps), if approved.\n\n## Open Questions\n\nFor new proposals (i.e., those in the `rfcs/proposed` directory), list any\nopen questions.\n"
  },
  {
    "path": "third-party/tbb/src/tbb/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nadd_library(tbb\n    address_waiter.cpp\n    allocator.cpp\n    arena.cpp\n    arena_slot.cpp\n    concurrent_bounded_queue.cpp\n    dynamic_link.cpp\n    exception.cpp\n    governor.cpp\n    global_control.cpp\n    itt_notify.cpp\n    main.cpp\n    market.cpp\n    tcm_adaptor.cpp\n    misc.cpp\n    misc_ex.cpp\n    observer_proxy.cpp\n    parallel_pipeline.cpp\n    private_server.cpp\n    profiling.cpp\n    rml_tbb.cpp\n    rtm_mutex.cpp\n    rtm_rw_mutex.cpp\n    semaphore.cpp\n    small_object_pool.cpp\n    task.cpp\n    task_dispatcher.cpp\n    task_group_context.cpp\n    thread_dispatcher.cpp\n    thread_request_serializer.cpp\n    threading_control.cpp\n    version.cpp\n    queuing_rw_mutex.cpp)\n\nadd_library(TBB::tbb ALIAS tbb)\n\nif (WIN32)\n    target_sources(tbb PRIVATE tbb.rc)\n    set_target_properties(tbb PROPERTIES OUTPUT_NAME \"tbb${TBB_BINARY_VERSION}\")\nendif()\n\n# TODO: Add statistics.cpp\n\ntarget_compile_definitions(tbb\n                           PUBLIC\n                           $<$<CONFIG:DEBUG>:TBB_USE_DEBUG>\n                           PRIVATE\n                           __TBB_BUILD\n                           ${TBB_RESUMABLE_TASKS_USE_THREADS}\n                           $<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:__TBB_DYNAMIC_LOAD_ENABLED=0>\n                           $<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:__TBB_SOURCE_DIRECTLY_INCLUDED=1>)\n\nif (NOT (\"${CMAKE_SYSTEM_PROCESSOR}\" MATCHES \"(armv7-a|aarch64|mips|arm64|riscv)\" OR\n         \"${CMAKE_OSX_ARCHITECTURES}\" MATCHES \"arm64\" OR\n         WINDOWS_STORE OR\n         TBB_WINDOWS_DRIVER))\n    target_compile_definitions(tbb PRIVATE __TBB_USE_ITT_NOTIFY)\nendif()\n\ntarget_include_directories(tbb\n    PUBLIC\n    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include>\n    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)\n\ntarget_compile_options(tbb\n    PRIVATE\n    ${TBB_CXX_STD_FLAG} # TODO: consider making it PUBLIC.\n    ${TBB_MMD_FLAG}\n    ${TBB_DSE_FLAG}\n    ${TBB_WARNING_LEVEL}\n    ${TBB_WARNING_SUPPRESS}\n    ${TBB_LIB_COMPILE_FLAGS}\n    ${TBB_COMMON_COMPILE_FLAGS}\n)\n\n# Avoid use of target_link_libraries here as it changes /DEF option to \\DEF on Windows.\nset_target_properties(tbb PROPERTIES\n    DEFINE_SYMBOL \"\"\n    VERSION ${TBB_BINARY_VERSION}.${TBB_BINARY_MINOR_VERSION}\n    SOVERSION ${TBB_BINARY_VERSION}\n)\n\ntbb_handle_ipo(tbb)\n\nif (TBB_DEF_FILE_PREFIX) # If there's no prefix, assume we're using export directives\n    set_target_properties(tbb PROPERTIES\n        LINK_FLAGS \"${TBB_LINK_DEF_FILE_FLAG}\\\"${CMAKE_CURRENT_SOURCE_DIR}/def/${TBB_DEF_FILE_PREFIX}-tbb.def\\\"\"\n        LINK_DEPENDS \"${CMAKE_CURRENT_SOURCE_DIR}/def/${TBB_DEF_FILE_PREFIX}-tbb.def\"\n    )\nendif()\n\n# Prefer using target_link_options instead of target_link_libraries to specify link options because\n# target_link_libraries may incorrectly handle some options (on Windows, for example).\nif (COMMAND target_link_options)\n    target_link_options(tbb\n        PRIVATE\n        ${TBB_LIB_LINK_FLAGS}\n        ${TBB_COMMON_LINK_FLAGS}\n    )\nelse()\n    target_link_libraries(tbb\n        PRIVATE\n        ${TBB_LIB_LINK_FLAGS}\n        ${TBB_COMMON_LINK_FLAGS}\n    )\nendif()\n\ntarget_link_libraries(tbb\n    PRIVATE\n    Threads::Threads\n    ${TBB_LIB_LINK_LIBS}\n    ${TBB_COMMON_LINK_LIBS}\n)\n\n# Strip debug symbols into a separate .dbg file\nif(TBB_LINUX_SEPARATE_DBG)\n    if(NOT CMAKE_BUILD_TYPE STREQUAL \"release\")\n        find_program(OBJCOPY_COMMAND objcopy)\n        if(NOT OBJCOPY_COMMAND)\n            message(WARNING \"objcopy command not found in the system\")\n        else()\n            add_custom_command(TARGET tbb POST_BUILD\n                COMMAND objcopy --only-keep-debug $<TARGET_FILE:tbb> $<TARGET_FILE:tbb>.dbg\n                COMMAND objcopy --strip-debug $<TARGET_FILE:tbb>\n                COMMAND objcopy --add-gnu-debuglink=$<TARGET_FILE:tbb>.dbg $<TARGET_FILE:tbb>\n                COMMENT \"Creating and associating .dbg file with tbb\"\n            )\n        endif()\n    else()\n        message(WARNING \" TBB_LINUX_SEPARATE_DBG flag is not used on release config\")\n    endif()\nendif()\n\nif(TBB_BUILD_APPLE_FRAMEWORKS)\n    set_target_properties(tbb PROPERTIES\n        FRAMEWORK TRUE\n        FRAMEWORK_VERSION ${TBB_BINARY_VERSION}.${TBB_BINARY_MINOR_VERSION}\n        XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER com.intel.tbb\n        MACOSX_FRAMEWORK_IDENTIFIER com.intel.tbb\n        MACOSX_FRAMEWORK_BUNDLE_VERSION ${TBB_BINARY_VERSION}.${TBB_BINARY_MINOR_VERSION}\n        MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${TBB_BINARY_VERSION})\nendif()\n\ntbb_install_target(tbb)\n\nif (TBB_INSTALL)\n    if (MSVC)\n        # Create a copy of target linker file (tbb<ver>[_debug].lib) with legacy name (tbb[_debug].lib)\n        # to support previous user experience for linkage.\n        install(FILES\n                $<TARGET_LINKER_FILE:tbb>\n                DESTINATION lib\n                CONFIGURATIONS RelWithDebInfo Release MinSizeRel\n                RENAME tbb.lib\n                COMPONENT devel\n        )\n\n        install(FILES\n                $<TARGET_LINKER_FILE:tbb>\n                DESTINATION lib\n                CONFIGURATIONS Debug\n                RENAME tbb_debug.lib\n                COMPONENT devel\n        )\n    endif()\n    if(TBB_LINUX_SEPARATE_DBG)\n        install(FILES\n                $<TARGET_FILE:tbb>.dbg\n                DESTINATION lib\n                COMPONENT devel\n        )\n    endif()\n    set(_tbb_pc_lib_name tbb)\n\n    if (WIN32)\n        set(_tbb_pc_lib_name ${_tbb_pc_lib_name}${TBB_BINARY_VERSION})\n    endif()\n\n    if (CMAKE_SIZEOF_VOID_P EQUAL 8)\n        set(TBB_PC_NAME tbb)\n    else()\n        set(TBB_PC_NAME tbb32)\n    endif()\n\n    set(_prefix_for_pc_file \"${CMAKE_INSTALL_PREFIX}\")\n\n    if (IS_ABSOLUTE \"${CMAKE_INSTALL_LIBDIR}\")\n        set(_libdir_for_pc_file \"${CMAKE_INSTALL_LIBDIR}\")\n    else()\n        set(_libdir_for_pc_file \"\\${prefix}/${CMAKE_INSTALL_LIBDIR}\")\n    endif()\n\n    if (IS_ABSOLUTE \"${CMAKE_INSTALL_INCLUDEDIR}\")\n        set(_includedir_for_pc_file \"${CMAKE_INSTALL_INCLUDEDIR}\")\n    else()\n        set(_includedir_for_pc_file \"\\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}\")\n    endif()\n\n    configure_file(${PROJECT_SOURCE_DIR}/integration/pkg-config/tbb.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${TBB_PC_NAME}.pc @ONLY)\n    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TBB_PC_NAME}.pc\n            DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/\n            COMPONENT devel)\nendif()\n\nif (COMMAND tbb_gen_vars)\n    tbb_gen_vars(tbb)\nendif()\n"
  },
  {
    "path": "third-party/tbb/src/tbb/address_waiter.cpp",
    "content": "/*\n    Copyright (c) 2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/detail/_utils.h\"\n#include \"governor.h\"\n#include \"concurrent_monitor.h\"\n#include \"oneapi/tbb/detail/_waitable_atomic.h\"\n\n#include <type_traits>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nstruct address_context {\n    address_context() = default;\n\n    address_context(void* address, std::uintptr_t context) :\n        my_address(address), my_context(context)\n    {}\n\n    void* my_address{nullptr};\n    std::uintptr_t my_context{0};\n};\n\nclass address_waiter : public concurrent_monitor_base<address_context> {\n    using base_type = concurrent_monitor_base<address_context>;\npublic:\n    using base_type::base_type;\n    /** per-thread descriptor for concurrent_monitor */\n    using thread_context = sleep_node<address_context>;\n};\n\n// 1024 is a rough estimate based on two assumptions:\n//   1) there are no more than 1000 threads in the application;\n//   2) the mutexes are optimized for short critical sections less than a couple of microseconds,\n//      which is less than 1/1000 of a time slice.\n// In the worst case, we have single mutex that is locked and its thread is preempted.\n// Therefore, the probability of a collision while taking unrelated mutex is about 1/size of a table.\nstatic constexpr std::size_t num_address_waiters = 2 << 10;\nstatic_assert(std::is_standard_layout<address_waiter>::value,\n              \"address_waiter must be with standard layout\");\nstatic address_waiter address_waiter_table[num_address_waiters];\n\nvoid clear_address_waiter_table() {\n    for (std::size_t i = 0; i < num_address_waiters; ++i) {\n        address_waiter_table[i].destroy();\n    }\n}\n\nstatic address_waiter& get_address_waiter(void* address) {\n    std::uintptr_t tag = std::uintptr_t(address);\n    return address_waiter_table[((tag >> 5) ^ tag) % num_address_waiters];\n}\n\nvoid wait_on_address(void* address, d1::delegate_base& predicate, std::uintptr_t context) {\n    address_waiter& waiter = get_address_waiter(address);\n    waiter.wait<address_waiter::thread_context>(predicate, address_context{address, context});\n}\n\nvoid notify_by_address(void* address, std::uintptr_t target_context) {\n    address_waiter& waiter = get_address_waiter(address);\n\n    auto predicate = [address, target_context] (address_context ctx) {\n        return ctx.my_address == address && ctx.my_context == target_context;\n    };\n\n    waiter.notify_relaxed(predicate);\n}\n\nvoid notify_by_address_one(void* address) {\n    address_waiter& waiter = get_address_waiter(address);\n\n    auto predicate = [address] (address_context ctx) {\n        return ctx.my_address == address;\n    };\n\n    waiter.notify_one_relaxed(predicate);\n}\n\nvoid notify_by_address_all(void* address) {\n    address_waiter& waiter = get_address_waiter(address);\n\n    auto predicate = [address] (address_context ctx) {\n        return ctx.my_address == address;\n    };\n\n    waiter.notify_relaxed(predicate);\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/allocator.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/version.h\"\n\n#include \"oneapi/tbb/detail/_exception.h\"\n#include \"oneapi/tbb/detail/_assert.h\"\n#include \"oneapi/tbb/detail/_utils.h\"\n#include \"oneapi/tbb/tbb_allocator.h\" // Is this OK?\n#include \"oneapi/tbb/cache_aligned_allocator.h\"\n\n#include \"dynamic_link.h\"\n#include \"misc.h\"\n\n#include <cstdlib>\n\n#ifdef _WIN32\n#include <windows.h>\n#else\n#include <dlfcn.h>\n#endif\n\n#if (!defined(_WIN32) && !defined(_WIN64)) || defined(__CYGWIN__)\n#include <stdlib.h> // posix_memalign, free\n// With glibc, uClibc and musl on Linux and bionic on Android it is safe to use memalign(), as the allocated memory\n// can be freed with free(). It is also better to use memalign() since posix_memalign() is just a wrapper on top of\n// memalign() and it offers nothing but overhead due to inconvenient interface. This is likely the case with other\n// standard libraries as well, and more libraries can be added to the preprocessor check below. Unfortunately, we\n// can't detect musl, so we simply enable memalign() on Linux and Android in general.\n#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__ANDROID__)\n#include <malloc.h> // memalign\n#define __TBB_USE_MEMALIGN\n#else\n#define __TBB_USE_POSIX_MEMALIGN\n#endif\n#elif defined(_MSC_VER) || defined(__MINGW32__)\n#include <malloc.h> // _aligned_malloc, _aligned_free\n#define __TBB_USE_MSVC_ALIGNED_MALLOC\n#endif\n\n#if __TBB_WEAK_SYMBOLS_PRESENT\n\n#pragma weak scalable_malloc\n#pragma weak scalable_free\n#pragma weak scalable_aligned_malloc\n#pragma weak scalable_aligned_free\n\nextern \"C\" {\n    void* scalable_malloc(std::size_t);\n    void  scalable_free(void*);\n    void* scalable_aligned_malloc(std::size_t, std::size_t);\n    void  scalable_aligned_free(void*);\n}\n\n#endif /* __TBB_WEAK_SYMBOLS_PRESENT */\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n//! Initialization routine used for first indirect call via allocate_handler.\nstatic void* initialize_allocate_handler(std::size_t size);\n\n//! Handler for memory allocation\nusing allocate_handler_type = void* (*)(std::size_t size);\nstatic std::atomic<allocate_handler_type> allocate_handler{ &initialize_allocate_handler };\nallocate_handler_type allocate_handler_unsafe = nullptr;\n\n//! Handler for memory deallocation\nstatic void  (*deallocate_handler)(void* pointer) = nullptr;\n\n//! Initialization routine used for first indirect call via cache_aligned_allocate_handler.\nstatic void* initialize_cache_aligned_allocate_handler(std::size_t n, std::size_t alignment);\n\n//! Allocates overaligned memory using standard memory allocator. It is used when scalable_allocator is not available.\nstatic void* std_cache_aligned_allocate(std::size_t n, std::size_t alignment);\n\n//! Deallocates overaligned memory using standard memory allocator. It is used when scalable_allocator is not available.\nstatic void  std_cache_aligned_deallocate(void* p);\n\n//! Handler for padded memory allocation\nusing cache_aligned_allocate_handler_type = void* (*)(std::size_t n, std::size_t alignment);\nstatic std::atomic<cache_aligned_allocate_handler_type> cache_aligned_allocate_handler{ &initialize_cache_aligned_allocate_handler };\ncache_aligned_allocate_handler_type cache_aligned_allocate_handler_unsafe = nullptr;\n\n//! Handler for padded memory deallocation\nstatic void (*cache_aligned_deallocate_handler)(void* p) = nullptr;\n\n//! Table describing how to link the handlers.\nstatic const dynamic_link_descriptor MallocLinkTable[] = {\n    DLD(scalable_malloc, allocate_handler_unsafe),\n    DLD(scalable_free, deallocate_handler),\n    DLD(scalable_aligned_malloc, cache_aligned_allocate_handler_unsafe),\n    DLD(scalable_aligned_free, cache_aligned_deallocate_handler),\n};\n\n\n#if TBB_USE_DEBUG\n#define DEBUG_SUFFIX \"_debug\"\n#else\n#define DEBUG_SUFFIX\n#endif /* TBB_USE_DEBUG */\n\n// MALLOCLIB_NAME is the name of the oneTBB memory allocator library.\n#if _WIN32||_WIN64\n#define MALLOCLIB_NAME \"tbbmalloc\" DEBUG_SUFFIX \".dll\"\n#elif __APPLE__\n#define MALLOCLIB_NAME \"libtbbmalloc\" DEBUG_SUFFIX \".2.dylib\"\n#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __sun || _AIX || __ANDROID__\n#define MALLOCLIB_NAME \"libtbbmalloc\" DEBUG_SUFFIX \".so\"\n#elif __unix__  // Note that order of these #elif's is important!\n#define MALLOCLIB_NAME \"libtbbmalloc\" DEBUG_SUFFIX \".so.2\"\n#else\n#error Unknown OS\n#endif\n\n//! Initialize the allocation/free handler pointers.\n/** Caller is responsible for ensuring this routine is called exactly once.\n    The routine attempts to dynamically link with the TBB memory allocator.\n    If that allocator is not found, it links to malloc and free. */\nvoid initialize_handler_pointers() {\n    __TBB_ASSERT(allocate_handler == &initialize_allocate_handler, nullptr);\n    bool success = dynamic_link(MALLOCLIB_NAME, MallocLinkTable, 4);\n    if(!success) {\n        // If unsuccessful, set the handlers to the default routines.\n        // This must be done now, and not before FillDynamicLinks runs, because if other\n        // threads call the handlers, we want them to go through the DoOneTimeInitializations logic,\n        // which forces them to wait.\n        allocate_handler_unsafe = &std::malloc;\n        deallocate_handler = &std::free;\n        cache_aligned_allocate_handler_unsafe = &std_cache_aligned_allocate;\n        cache_aligned_deallocate_handler = &std_cache_aligned_deallocate;\n    }\n\n    allocate_handler.store(allocate_handler_unsafe, std::memory_order_release);\n    cache_aligned_allocate_handler.store(cache_aligned_allocate_handler_unsafe, std::memory_order_release);\n\n    PrintExtraVersionInfo( \"ALLOCATOR\", success?\"scalable_malloc\":\"malloc\" );\n}\n\nstatic std::once_flag initialization_state;\nvoid initialize_cache_aligned_allocator() {\n    std::call_once(initialization_state, &initialize_handler_pointers);\n}\n\n//! Executed on very first call through allocate_handler\n/** Only one of initialize_allocate_handler() and initialize_cache_aligned_allocate_handler()\n    is called, since each one of them also initializes the other.\n\n    In the current implementation of oneTBB library initialization, cache_aligned_allocate() is\n    used, which in turn calls initialize_cache_aligned_allocate_handler(). As mentioned above,\n    that also initializes the regular allocate_handler.\n\n    Therefore, initialize_allocate_handler() is not called in the current library implementation. */\nstatic void* initialize_allocate_handler(std::size_t size) {\n    initialize_cache_aligned_allocator();\n    __TBB_ASSERT(allocate_handler != &initialize_allocate_handler, nullptr);\n    return (*allocate_handler)(size);\n}\n\n//! Executed on very first call through cache_aligned_allocate_handler\nstatic void* initialize_cache_aligned_allocate_handler(std::size_t bytes, std::size_t alignment) {\n    initialize_cache_aligned_allocator();\n    __TBB_ASSERT(cache_aligned_allocate_handler != &initialize_cache_aligned_allocate_handler, nullptr);\n    return (*cache_aligned_allocate_handler)(bytes, alignment);\n}\n\n// TODO: use CPUID to find actual line size, though consider backward compatibility\n// nfs - no false sharing\nstatic constexpr std::size_t nfs_size = 128;\n\nstd::size_t __TBB_EXPORTED_FUNC cache_line_size() {\n    return nfs_size;\n}\n\nvoid* __TBB_EXPORTED_FUNC cache_aligned_allocate(std::size_t size) {\n    const std::size_t cache_line_size = nfs_size;\n    __TBB_ASSERT(is_power_of_two(cache_line_size), \"must be power of two\");\n\n    // Check for overflow\n    if (size + cache_line_size < size) {\n        throw_exception(exception_id::bad_alloc);\n    }\n    // scalable_aligned_malloc considers zero size request an error, and returns nullptr\n    if (size == 0) size = 1;\n\n    void* result = cache_aligned_allocate_handler.load(std::memory_order_acquire)(size, cache_line_size);\n    if (!result) {\n        throw_exception(exception_id::bad_alloc);\n    }\n    __TBB_ASSERT(is_aligned(result, cache_line_size), \"The returned address isn't aligned\");\n    return result;\n}\n\nvoid __TBB_EXPORTED_FUNC cache_aligned_deallocate(void* p) {\n    __TBB_ASSERT(cache_aligned_deallocate_handler, \"Initialization has not been yet.\");\n    (*cache_aligned_deallocate_handler)(p);\n}\n\nstatic void* std_cache_aligned_allocate(std::size_t bytes, std::size_t alignment) {\n#if defined(__TBB_USE_MEMALIGN)\n    return memalign(alignment, bytes);\n#elif defined(__TBB_USE_POSIX_MEMALIGN)\n    void* p = nullptr;\n    int res = posix_memalign(&p, alignment, bytes);\n    if (res != 0)\n        p = nullptr;\n    return p;\n#elif defined(__TBB_USE_MSVC_ALIGNED_MALLOC)\n    return _aligned_malloc(bytes, alignment);\n#else\n    // TODO: make it common with cache_aligned_resource\n    std::size_t space = alignment + bytes;\n    std::uintptr_t base = reinterpret_cast<std::uintptr_t>(std::malloc(space));\n    if (!base) {\n        return nullptr;\n    }\n    std::uintptr_t result = (base + nfs_size) & ~(nfs_size - 1);\n    // Round up to the next cache line (align the base address)\n    __TBB_ASSERT((result - base) >= sizeof(std::uintptr_t), \"Cannot store a base pointer to the header\");\n    __TBB_ASSERT(space - (result - base) >= bytes, \"Not enough space for the storage\");\n\n    // Record where block actually starts.\n    (reinterpret_cast<std::uintptr_t*>(result))[-1] = base;\n    return reinterpret_cast<void*>(result);\n#endif\n}\n\nstatic void std_cache_aligned_deallocate(void* p) {\n#if defined(__TBB_USE_MEMALIGN) || defined(__TBB_USE_POSIX_MEMALIGN)\n    free(p);\n#elif defined(__TBB_USE_MSVC_ALIGNED_MALLOC)\n    _aligned_free(p);\n#else\n    if (p) {\n        __TBB_ASSERT(reinterpret_cast<std::uintptr_t>(p) >= 0x4096, \"attempt to free block not obtained from cache_aligned_allocator\");\n        // Recover where block actually starts\n        std::uintptr_t base = (reinterpret_cast<std::uintptr_t*>(p))[-1];\n        __TBB_ASSERT(((base + nfs_size) & ~(nfs_size - 1)) == reinterpret_cast<std::uintptr_t>(p), \"Incorrect alignment or not allocated by std_cache_aligned_deallocate?\");\n        std::free(reinterpret_cast<void*>(base));\n    }\n#endif\n}\n\nvoid* __TBB_EXPORTED_FUNC allocate_memory(std::size_t size) {\n    void* result = allocate_handler.load(std::memory_order_acquire)(size);\n    if (!result) {\n        throw_exception(exception_id::bad_alloc);\n    }\n    return result;\n}\n\nvoid __TBB_EXPORTED_FUNC deallocate_memory(void* p) {\n    if (p) {\n        __TBB_ASSERT(deallocate_handler, \"Initialization has not been yet.\");\n        (*deallocate_handler)(p);\n    }\n}\n\nbool __TBB_EXPORTED_FUNC is_tbbmalloc_used() {\n    auto handler_snapshot = allocate_handler.load(std::memory_order_acquire);\n    if (handler_snapshot == &initialize_allocate_handler) {\n        initialize_cache_aligned_allocator();\n    }\n    handler_snapshot = allocate_handler.load(std::memory_order_relaxed);\n    __TBB_ASSERT(handler_snapshot != &initialize_allocate_handler && deallocate_handler != nullptr, nullptr);\n    // Cast to void avoids type mismatch errors on some compilers (e.g. __IBMCPP__)\n    __TBB_ASSERT((reinterpret_cast<void*>(handler_snapshot) == reinterpret_cast<void*>(&std::malloc)) == (reinterpret_cast<void*>(deallocate_handler) == reinterpret_cast<void*>(&std::free)),\n                  \"Both shim pointers must refer to routines from the same package (either TBB or CRT)\");\n    return reinterpret_cast<void*>(handler_snapshot) == reinterpret_cast<void*>(&std::malloc);\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/arena.cpp",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"task_dispatcher.h\"\n#include \"governor.h\"\n#include \"threading_control.h\"\n#include \"arena.h\"\n#include \"itt_notify.h\"\n#include \"semaphore.h\"\n#include \"waiters.h\"\n#include \"oneapi/tbb/detail/_task.h\"\n#include \"oneapi/tbb/info.h\"\n#include \"oneapi/tbb/tbb_allocator.h\"\n\n#include <atomic>\n#include <cstring>\n#include <functional>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n#if __TBB_ARENA_BINDING\nclass numa_binding_observer : public tbb::task_scheduler_observer {\n    binding_handler* my_binding_handler;\npublic:\n    numa_binding_observer( d1::task_arena* ta, int num_slots, int numa_id, core_type_id core_type, int max_threads_per_core )\n        : task_scheduler_observer(*ta)\n        , my_binding_handler(construct_binding_handler(num_slots, numa_id, core_type, max_threads_per_core))\n    {}\n\n    void on_scheduler_entry( bool ) override {\n        apply_affinity_mask(my_binding_handler, this_task_arena::current_thread_index());\n    }\n\n    void on_scheduler_exit( bool ) override {\n        restore_affinity_mask(my_binding_handler, this_task_arena::current_thread_index());\n    }\n\n    ~numa_binding_observer() override{\n        destroy_binding_handler(my_binding_handler);\n    }\n};\n\nnuma_binding_observer* construct_binding_observer( d1::task_arena* ta, int num_slots, int numa_id, core_type_id core_type, int max_threads_per_core ) {\n    numa_binding_observer* binding_observer = nullptr;\n    if ((core_type >= 0 && core_type_count() > 1) || (numa_id >= 0 && numa_node_count() > 1) || max_threads_per_core > 0) {\n        binding_observer = new(allocate_memory(sizeof(numa_binding_observer))) numa_binding_observer(ta, num_slots, numa_id, core_type, max_threads_per_core);\n        __TBB_ASSERT(binding_observer, \"Failure during NUMA binding observer allocation and construction\");\n    }\n    return binding_observer;\n}\n\nvoid destroy_binding_observer( numa_binding_observer* binding_observer ) {\n    __TBB_ASSERT(binding_observer, \"Trying to deallocate nullptr pointer\");\n    binding_observer->observe(false);\n    binding_observer->~numa_binding_observer();\n    deallocate_memory(binding_observer);\n}\n#endif /*!__TBB_ARENA_BINDING*/\n\nvoid arena::on_thread_leaving(unsigned ref_param) {\n    //\n    // Implementation of arena destruction synchronization logic contained various\n    // bugs/flaws at the different stages of its evolution, so below is a detailed\n    // description of the issues taken into consideration in the framework of the\n    // current design.\n    //\n    // In case of using fire-and-forget tasks (scheduled via task::enqueue())\n    // external thread is allowed to leave its arena before all its work is executed,\n    // and market may temporarily revoke all workers from this arena. Since revoked\n    // workers never attempt to reset arena state to EMPTY and cancel its request\n    // to RML for threads, the arena object is destroyed only when both the last\n    // thread is leaving it and arena's state is EMPTY (that is its external thread\n    // left and it does not contain any work).\n    // Thus resetting arena to EMPTY state (as earlier TBB versions did) should not\n    // be done here (or anywhere else in the external thread to that matter); doing so\n    // can result either in arena's premature destruction (at least without\n    // additional costly checks in workers) or in unnecessary arena state changes\n    // (and ensuing workers migration).\n    //\n    // A worker that checks for work presence and transitions arena to the EMPTY\n    // state (in snapshot taking procedure arena::out_of_work()) updates\n    // arena::my_pool_state first and only then arena::my_num_workers_requested.\n    // So the check for work absence must be done against the latter field.\n    //\n    // In a time window between decrementing the active threads count and checking\n    // if there is an outstanding request for workers. New worker thread may arrive,\n    // finish remaining work, set arena state to empty, and leave decrementing its\n    // refcount and destroying. Then the current thread will destroy the arena\n    // the second time. To preclude it a local copy of the outstanding request\n    // value can be stored before decrementing active threads count.\n    //\n    // But this technique may cause two other problem. When the stored request is\n    // zero, it is possible that arena still has threads and they can generate new\n    // tasks and thus re-establish non-zero requests. Then all the threads can be\n    // revoked (as described above) leaving this thread the last one, and causing\n    // it to destroy non-empty arena.\n    //\n    // The other problem takes place when the stored request is non-zero. Another\n    // thread may complete the work, set arena state to empty, and leave without\n    // arena destruction before this thread decrements the refcount. This thread\n    // cannot destroy the arena either. Thus the arena may be \"orphaned\".\n    //\n    // In both cases we cannot dereference arena pointer after the refcount is\n    // decremented, as our arena may already be destroyed.\n    //\n    // If this is the external thread, the market is protected by refcount to it.\n    // In case of workers market's liveness is ensured by the RML connection\n    // rundown protocol, according to which the client (i.e. the market) lives\n    // until RML server notifies it about connection termination, and this\n    // notification is fired only after all workers return into RML.\n    //\n    // Thus if we decremented refcount to zero we ask the market to check arena\n    // state (including the fact if it is alive) under the lock.\n    //\n\n    __TBB_ASSERT(my_references.load(std::memory_order_relaxed) >= ref_param, \"broken arena reference counter\");\n\n    // When there is no workers someone must free arena, as\n    // without workers, no one calls out_of_work().\n    if (ref_param == ref_external && !my_mandatory_concurrency.test()) {\n        out_of_work();\n    }\n\n    threading_control* tc = my_threading_control;\n    auto tc_client_snapshot = tc->prepare_client_destruction(my_tc_client);\n    // Release our reference to sync with destroy_client\n    unsigned remaining_ref = my_references.fetch_sub(ref_param, std::memory_order_release) - ref_param;\n    // do not access `this` it might be destroyed already\n    if (remaining_ref == 0) {\n        if (tc->try_destroy_client(tc_client_snapshot)) {\n            // We are requested to destroy ourself\n            free_arena();\n        }\n    }\n}\n\nstd::size_t arena::occupy_free_slot_in_range( thread_data& tls, std::size_t lower, std::size_t upper ) {\n    if ( lower >= upper ) return out_of_arena;\n    // Start search for an empty slot from the one we occupied the last time\n    std::size_t index = tls.my_arena_index;\n    if ( index < lower || index >= upper ) index = tls.my_random.get() % (upper - lower) + lower;\n    __TBB_ASSERT( index >= lower && index < upper, nullptr);\n    // Find a free slot\n    for ( std::size_t i = index; i < upper; ++i )\n        if (my_slots[i].try_occupy()) return i;\n    for ( std::size_t i = lower; i < index; ++i )\n        if (my_slots[i].try_occupy()) return i;\n    return out_of_arena;\n}\n\ntemplate <bool as_worker>\nstd::size_t arena::occupy_free_slot(thread_data& tls) {\n    // Firstly, external threads try to occupy reserved slots\n    std::size_t index = as_worker ? out_of_arena : occupy_free_slot_in_range( tls,  0, my_num_reserved_slots );\n    if ( index == out_of_arena ) {\n        // Secondly, all threads try to occupy all non-reserved slots\n        index = occupy_free_slot_in_range(tls, my_num_reserved_slots, my_num_slots );\n        // Likely this arena is already saturated\n        if ( index == out_of_arena )\n            return out_of_arena;\n    }\n\n    atomic_update( my_limit, (unsigned)(index + 1), std::less<unsigned>() );\n    return index;\n}\n\nstd::uintptr_t arena::calculate_stealing_threshold() {\n    stack_anchor_type anchor;\n    return r1::calculate_stealing_threshold(reinterpret_cast<std::uintptr_t>(&anchor), my_threading_control->worker_stack_size());\n}\n\nvoid arena::process(thread_data& tls) {\n    governor::set_thread_data(tls); // TODO: consider moving to create_one_job.\n    __TBB_ASSERT( is_alive(my_guard), nullptr);\n    __TBB_ASSERT( my_num_slots >= 1, nullptr);\n\n    std::size_t index = occupy_free_slot</*as_worker*/true>(tls);\n    if (index == out_of_arena) {\n        on_thread_leaving(ref_worker);\n        return;\n    }\n\n    __TBB_ASSERT( index >= my_num_reserved_slots, \"Workers cannot occupy reserved slots\" );\n    tls.attach_arena(*this, index);\n    // worker thread enters the dispatch loop to look for a work\n    tls.my_inbox.set_is_idle(true);\n    if (tls.my_arena_slot->is_task_pool_published()) {\n        tls.my_inbox.set_is_idle(false);\n    }\n\n    task_dispatcher& task_disp = tls.my_arena_slot->default_task_dispatcher();\n    tls.enter_task_dispatcher(task_disp, calculate_stealing_threshold());\n    __TBB_ASSERT(task_disp.can_steal(), nullptr);\n\n    __TBB_ASSERT( !tls.my_last_observer, \"There cannot be notified local observers when entering arena\" );\n    my_observers.notify_entry_observers(tls.my_last_observer, tls.my_is_worker);\n\n    // Waiting on special object tied to this arena\n    outermost_worker_waiter waiter(*this);\n    d1::task* t = tls.my_task_dispatcher->local_wait_for_all(nullptr, waiter);\n    // For purposes of affinity support, the slot's mailbox is considered idle while no thread is\n    // attached to it.\n    tls.my_inbox.set_is_idle(true);\n\n    __TBB_ASSERT_EX(t == nullptr, \"Outermost worker must not leave dispatch loop with a task\");\n    __TBB_ASSERT(governor::is_thread_data_set(&tls), nullptr);\n    __TBB_ASSERT(tls.my_task_dispatcher == &task_disp, nullptr);\n\n    my_observers.notify_exit_observers(tls.my_last_observer, tls.my_is_worker);\n    tls.my_last_observer = nullptr;\n\n    tls.leave_task_dispatcher();\n\n    // Arena slot detach (arena may be used in market::process)\n    // TODO: Consider moving several calls below into a new method(e.g.detach_arena).\n    tls.my_arena_slot->release();\n    tls.my_arena_slot = nullptr;\n    tls.my_inbox.detach();\n    __TBB_ASSERT(tls.my_inbox.is_idle_state(true), nullptr);\n    __TBB_ASSERT(is_alive(my_guard), nullptr);\n\n    // In contrast to earlier versions of TBB (before 3.0 U5) now it is possible\n    // that arena may be temporarily left unpopulated by threads. See comments in\n    // arena::on_thread_leaving() for more details.\n    on_thread_leaving(ref_worker);\n    __TBB_ASSERT(tls.my_arena == this, \"my_arena is used as a hint when searching the arena to join\");\n}\n\narena::arena(threading_control* control, unsigned num_slots, unsigned num_reserved_slots, unsigned priority_level\n#if __TBB_PREVIEW_PARALLEL_PHASE\n             , tbb::task_arena::leave_policy lp \n#endif\n)\n{\n    __TBB_ASSERT( !my_guard, \"improperly allocated arena?\" );\n    __TBB_ASSERT( sizeof(my_slots[0]) % cache_line_size()==0, \"arena::slot size not multiple of cache line size\" );\n    __TBB_ASSERT( is_aligned(this, cache_line_size()), \"arena misaligned\" );\n    my_threading_control = control;\n    my_limit = 1;\n    // Two slots are mandatory: for the external thread, and for 1 worker (required to support starvation resistant tasks).\n    my_num_slots = num_arena_slots(num_slots, num_reserved_slots);\n    my_num_reserved_slots = num_reserved_slots;\n    my_max_num_workers = num_slots-num_reserved_slots;\n    my_priority_level = priority_level;\n    my_references = ref_external; // accounts for the external thread\n    my_observers.my_arena = this;\n    my_co_cache.init(4 * num_slots);\n    __TBB_ASSERT ( my_max_num_workers <= my_num_slots, nullptr);\n    // Initialize the default context. It should be allocated before task_dispatch construction.\n    my_default_ctx = new (cache_aligned_allocate(sizeof(d1::task_group_context)))\n        d1::task_group_context{ d1::task_group_context::isolated, d1::task_group_context::fp_settings };\n    // Construct slots. Mark internal synchronization elements for the tools.\n    task_dispatcher* base_td_pointer = reinterpret_cast<task_dispatcher*>(my_slots + my_num_slots);\n    for( unsigned i = 0; i < my_num_slots; ++i ) {\n        // __TBB_ASSERT( !my_slots[i].my_scheduler && !my_slots[i].task_pool, nullptr);\n        __TBB_ASSERT( !my_slots[i].task_pool_ptr, nullptr);\n        __TBB_ASSERT( !my_slots[i].my_task_pool_size, nullptr);\n        mailbox(i).construct();\n        my_slots[i].init_task_streams(i);\n        my_slots[i].my_default_task_dispatcher = new(base_td_pointer + i) task_dispatcher(this);\n        my_slots[i].my_is_occupied.store(false, std::memory_order_relaxed);\n    }\n    my_fifo_task_stream.initialize(my_num_slots);\n    my_resume_task_stream.initialize(my_num_slots);\n#if __TBB_PREVIEW_CRITICAL_TASKS\n    my_critical_task_stream.initialize(my_num_slots);\n#endif\n    my_mandatory_requests = 0;\n\n#if __TBB_PREVIEW_PARALLEL_PHASE\n    my_thread_leave.set_initial_state(lp);\n#endif\n}\n\narena& arena::allocate_arena(threading_control* control, unsigned num_slots, unsigned num_reserved_slots,\n                             unsigned priority_level\n#if __TBB_PREVIEW_PARALLEL_PHASE\n                             , tbb::task_arena::leave_policy lp\n#endif\n)\n{\n    __TBB_ASSERT( sizeof(base_type) + sizeof(arena_slot) == sizeof(arena), \"All arena data fields must go to arena_base\" );\n    __TBB_ASSERT( sizeof(base_type) % cache_line_size() == 0, \"arena slots area misaligned: wrong padding\" );\n    __TBB_ASSERT( sizeof(mail_outbox) == max_nfs_size, \"Mailbox padding is wrong\" );\n    std::size_t n = allocation_size(num_arena_slots(num_slots, num_reserved_slots));\n    unsigned char* storage = (unsigned char*)cache_aligned_allocate(n);\n    // Zero all slots to indicate that they are empty\n    std::memset( storage, 0, n );\n\n    return *new( storage + num_arena_slots(num_slots, num_reserved_slots) * sizeof(mail_outbox) )\n        arena(control, num_slots, num_reserved_slots, priority_level\n#if __TBB_PREVIEW_PARALLEL_PHASE\n              , lp\n#endif\n        );\n}\n\nvoid arena::free_arena () {\n    __TBB_ASSERT( is_alive(my_guard), nullptr);\n    __TBB_ASSERT( !my_references.load(std::memory_order_relaxed), \"There are threads in the dying arena\" );\n    __TBB_ASSERT( !my_total_num_workers_requested && !my_num_workers_allotted, \"Dying arena requests workers\" );\n    __TBB_ASSERT( is_empty(), \"Inconsistent state of a dying arena\" );\n#if __TBB_ARENA_BINDING\n    if (my_numa_binding_observer != nullptr) {\n        destroy_binding_observer(my_numa_binding_observer);\n        my_numa_binding_observer = nullptr;\n    }\n#endif /*__TBB_ARENA_BINDING*/\n    poison_value( my_guard );\n    for ( unsigned i = 0; i < my_num_slots; ++i ) {\n        // __TBB_ASSERT( !my_slots[i].my_scheduler, \"arena slot is not empty\" );\n        // TODO: understand the assertion and modify\n        // __TBB_ASSERT( my_slots[i].task_pool == EmptyTaskPool, nullptr);\n        __TBB_ASSERT( my_slots[i].head == my_slots[i].tail, nullptr); // TODO: replace by is_quiescent_local_task_pool_empty\n        my_slots[i].free_task_pool();\n        mailbox(i).drain();\n        my_slots[i].my_default_task_dispatcher->~task_dispatcher();\n    }\n    __TBB_ASSERT(my_fifo_task_stream.empty(), \"Not all enqueued tasks were executed\");\n    __TBB_ASSERT(my_resume_task_stream.empty(), \"Not all enqueued tasks were executed\");\n    // Cleanup coroutines/schedulers cache\n    my_co_cache.cleanup();\n    my_default_ctx->~task_group_context();\n    cache_aligned_deallocate(my_default_ctx);\n#if __TBB_PREVIEW_CRITICAL_TASKS\n    __TBB_ASSERT( my_critical_task_stream.empty(), \"Not all critical tasks were executed\");\n#endif\n    // Clear enfources synchronization with observe(false)\n    my_observers.clear();\n\n    void* storage  = &mailbox(my_num_slots-1);\n    __TBB_ASSERT( my_references.load(std::memory_order_relaxed) == 0, nullptr);\n    this->~arena();\n#if TBB_USE_ASSERT > 1\n    std::memset( storage, 0, allocation_size(my_num_slots) );\n#endif /* TBB_USE_ASSERT */\n    cache_aligned_deallocate( storage );\n}\n\nbool arena::has_enqueued_tasks() {\n    return !my_fifo_task_stream.empty();\n}\n\nvoid arena::request_workers(int mandatory_delta, int workers_delta, bool wakeup_threads) {\n    my_threading_control->adjust_demand(my_tc_client, mandatory_delta, workers_delta);\n\n    if (wakeup_threads) {\n        // Notify all sleeping threads that work has appeared in the arena.\n        get_waiting_threads_monitor().notify([&] (market_context context) {\n            return this == context.my_arena_addr;\n        });\n    }\n}\n\nbool arena::has_tasks() {\n    // TODO: rework it to return at least a hint about where a task was found; better if the task itself.\n    std::size_t n = my_limit.load(std::memory_order_acquire);\n    bool tasks_are_available = false;\n    for (std::size_t k = 0; k < n && !tasks_are_available; ++k) {\n        tasks_are_available = !my_slots[k].is_empty();\n    }\n    tasks_are_available = tasks_are_available || has_enqueued_tasks() || !my_resume_task_stream.empty();\n#if __TBB_PREVIEW_CRITICAL_TASKS\n    tasks_are_available = tasks_are_available || !my_critical_task_stream.empty();\n#endif\n    return tasks_are_available;\n}\n\nvoid arena::out_of_work() {\n    // We should try unset my_pool_state first due to keep arena invariants in consistent state\n    // Otherwise, we might have my_pool_state = false and my_mandatory_concurrency = true that is broken invariant\n    bool disable_mandatory = my_mandatory_concurrency.try_clear_if([this] { return !has_enqueued_tasks(); });\n    bool release_workers = my_pool_state.try_clear_if([this] { return !has_tasks(); });\n\n    if (disable_mandatory || release_workers) {\n        int mandatory_delta = disable_mandatory ? -1 : 0;\n        int workers_delta = release_workers ? -(int)my_max_num_workers : 0;\n\n        if (disable_mandatory && is_arena_workerless()) {\n            // We had set workers_delta to 1 when enabled mandatory concurrency, so revert it now\n            workers_delta = -1;\n        }\n        request_workers(mandatory_delta, workers_delta);\n    }\n}\n\nvoid arena::set_top_priority(bool is_top_priority) {\n    my_is_top_priority.store(is_top_priority, std::memory_order_relaxed);\n}\n\nbool arena::is_top_priority() const {\n    return my_is_top_priority.load(std::memory_order_relaxed);\n}\n\nbool arena::try_join() {\n    if (is_joinable()) {\n        my_references += arena::ref_worker;\n        return true;\n    }\n    return false;\n}\n\nvoid arena::set_allotment(unsigned allotment) {\n    if (my_num_workers_allotted.load(std::memory_order_relaxed) != allotment) {\n        my_num_workers_allotted.store(allotment, std::memory_order_relaxed);\n    }\n}\n\nint arena::update_concurrency(unsigned allotment) {\n    int delta = allotment - my_num_workers_allotted.load(std::memory_order_relaxed);\n    if (delta != 0) {\n        my_num_workers_allotted.store(allotment, std::memory_order_relaxed);\n    }\n    return delta;\n}\n\nstd::pair<int, int> arena::update_request(int mandatory_delta, int workers_delta) {\n    __TBB_ASSERT(-1 <= mandatory_delta && mandatory_delta <= 1, nullptr);\n\n    int min_workers_request = 0;\n    int max_workers_request = 0;\n\n    // Calculate min request\n    my_mandatory_requests += mandatory_delta;\n    min_workers_request = my_mandatory_requests > 0 ? 1 : 0;\n\n    // Calculate max request\n    my_total_num_workers_requested += workers_delta;\n    // Clamp worker request into interval [0, my_max_num_workers]\n    max_workers_request = clamp(my_total_num_workers_requested, 0,\n        min_workers_request > 0 && is_arena_workerless() ? 1 : (int)my_max_num_workers);\n\n    return { min_workers_request, max_workers_request };\n}\n\nthread_control_monitor& arena::get_waiting_threads_monitor() {\n    return my_threading_control->get_waiting_threads_monitor();\n}\n\nvoid arena::enqueue_task(d1::task& t, d1::task_group_context& ctx, thread_data& td) {\n    task_group_context_impl::bind_to(ctx, &td);\n    task_accessor::context(t) = &ctx;\n    task_accessor::isolation(t) = no_isolation;\n    my_fifo_task_stream.push( &t, random_lane_selector(td.my_random) );\n    advertise_new_work<work_enqueued>();\n}\n\narena &arena::create(threading_control *control, unsigned num_slots,\n                     unsigned num_reserved_slots, unsigned arena_priority_level,\n                     d1::constraints constraints\n#if __TBB_PREVIEW_PARALLEL_PHASE\n                     , tbb::task_arena::leave_policy lp \n#endif\n) {\n    __TBB_ASSERT(num_slots > 0, NULL);\n    __TBB_ASSERT(num_reserved_slots <= num_slots, NULL);\n    // Add public market reference for an external thread/task_arena (that adds an internal reference in exchange).\n    arena& a = arena::allocate_arena(control, num_slots, num_reserved_slots, arena_priority_level\n#if __TBB_PREVIEW_PARALLEL_PHASE\n                                     , lp\n#endif\n    );\n    a.my_tc_client = control->create_client(a);\n    // We should not publish arena until all fields are initialized\n    control->publish_client(a.my_tc_client, constraints);\n    return a;\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n// Enable task_arena.h\n#include \"oneapi/tbb/task_arena.h\" // task_arena_base\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n#if TBB_USE_ASSERT\nvoid assert_arena_priority_valid( tbb::task_arena::priority a_priority ) {\n    bool is_arena_priority_correct =\n        a_priority == tbb::task_arena::priority::high   ||\n        a_priority == tbb::task_arena::priority::normal ||\n        a_priority == tbb::task_arena::priority::low;\n    __TBB_ASSERT( is_arena_priority_correct,\n                  \"Task arena priority should be equal to one of the predefined values.\" );\n}\n#else\nvoid assert_arena_priority_valid( tbb::task_arena::priority ) {}\n#endif\n\nunsigned arena_priority_level( tbb::task_arena::priority a_priority ) {\n    assert_arena_priority_valid( a_priority );\n    return d1::num_priority_levels - unsigned(int(a_priority) / d1::priority_stride);\n}\n\ntbb::task_arena::priority arena_priority( unsigned priority_level ) {\n    auto priority = tbb::task_arena::priority(\n        (d1::num_priority_levels - priority_level) * d1::priority_stride\n    );\n    assert_arena_priority_valid( priority );\n    return priority;\n}\n\nstruct task_arena_impl {\n    static void initialize(d1::task_arena_base&);\n    static void terminate(d1::task_arena_base&);\n    static bool attach(d1::task_arena_base&);\n    static void execute(d1::task_arena_base&, d1::delegate_base&);\n    static void wait(d1::task_arena_base&);\n    static int max_concurrency(const d1::task_arena_base*);\n    static void enqueue(d1::task&, d1::task_group_context*, d1::task_arena_base*);\n    static d1::slot_id execution_slot(const d1::task_arena_base&);\n    static void enter_parallel_phase(d1::task_arena_base*, std::uintptr_t);\n    static void exit_parallel_phase(d1::task_arena_base*, std::uintptr_t);\n};\n\nvoid __TBB_EXPORTED_FUNC initialize(d1::task_arena_base& ta) {\n    task_arena_impl::initialize(ta);\n}\nvoid __TBB_EXPORTED_FUNC terminate(d1::task_arena_base& ta) {\n    task_arena_impl::terminate(ta);\n}\nbool __TBB_EXPORTED_FUNC attach(d1::task_arena_base& ta) {\n    return task_arena_impl::attach(ta);\n}\nvoid __TBB_EXPORTED_FUNC execute(d1::task_arena_base& ta, d1::delegate_base& d) {\n    task_arena_impl::execute(ta, d);\n}\nvoid __TBB_EXPORTED_FUNC wait(d1::task_arena_base& ta) {\n    task_arena_impl::wait(ta);\n}\n\nint __TBB_EXPORTED_FUNC max_concurrency(const d1::task_arena_base* ta) {\n    return task_arena_impl::max_concurrency(ta);\n}\n\nvoid __TBB_EXPORTED_FUNC enqueue(d1::task& t, d1::task_arena_base* ta) {\n    task_arena_impl::enqueue(t, nullptr, ta);\n}\n\nvoid __TBB_EXPORTED_FUNC enqueue(d1::task& t, d1::task_group_context& ctx, d1::task_arena_base* ta) {\n    task_arena_impl::enqueue(t, &ctx, ta);\n}\n\nd1::slot_id __TBB_EXPORTED_FUNC execution_slot(const d1::task_arena_base& arena) {\n    return task_arena_impl::execution_slot(arena);\n}\n\nvoid __TBB_EXPORTED_FUNC enter_parallel_phase(d1::task_arena_base* ta, std::uintptr_t flags) {\n    task_arena_impl::enter_parallel_phase(ta, flags);\n}\n\nvoid __TBB_EXPORTED_FUNC exit_parallel_phase(d1::task_arena_base* ta, std::uintptr_t flags) {\n    task_arena_impl::exit_parallel_phase(ta, flags);\n}\n\nvoid task_arena_impl::initialize(d1::task_arena_base& ta) {\n    // Enforce global market initialization to properly initialize soft limit\n    (void)governor::get_thread_data();\n    d1::constraints arena_constraints;\n\n#if __TBB_ARENA_BINDING\n    arena_constraints = d1::constraints{}\n        .set_core_type(ta.core_type())\n        .set_max_threads_per_core(ta.max_threads_per_core())\n        .set_numa_id(ta.my_numa_id);\n#endif /*__TBB_ARENA_BINDING*/\n\n    if (ta.my_max_concurrency < 1) {\n#if __TBB_ARENA_BINDING\n        ta.my_max_concurrency = (int)default_concurrency(arena_constraints);\n#else /*!__TBB_ARENA_BINDING*/\n        ta.my_max_concurrency = (int)governor::default_num_threads();\n#endif /*!__TBB_ARENA_BINDING*/\n    }\n\n#if __TBB_CPUBIND_PRESENT\n    numa_binding_observer* observer = construct_binding_observer(\n        static_cast<d1::task_arena*>(&ta), arena::num_arena_slots(ta.my_max_concurrency, ta.my_num_reserved_slots),\n        ta.my_numa_id, ta.core_type(), ta.max_threads_per_core());\n    if (observer) {\n        // TODO: Consider lazy initialization for internal arena so\n        // the direct calls to observer might be omitted until actual initialization.\n        observer->on_scheduler_entry(true);\n    }\n#endif /*__TBB_CPUBIND_PRESENT*/\n\n    __TBB_ASSERT(ta.my_arena.load(std::memory_order_relaxed) == nullptr, \"Arena already initialized\");\n    unsigned priority_level = arena_priority_level(ta.my_priority);\n    threading_control* thr_control = threading_control::register_public_reference();\n    arena& a = arena::create(thr_control, unsigned(ta.my_max_concurrency), ta.my_num_reserved_slots,\n                             priority_level, arena_constraints\n#if __TBB_PREVIEW_PARALLEL_PHASE\n                             , ta.get_leave_policy()\n#endif\n    );\n\n    ta.my_arena.store(&a, std::memory_order_release);\n#if __TBB_CPUBIND_PRESENT\n    a.my_numa_binding_observer = observer;\n    if (observer) {\n        observer->on_scheduler_exit(true);\n        observer->observe(true);\n    }\n#endif /*__TBB_CPUBIND_PRESENT*/\n}\n\nvoid task_arena_impl::terminate(d1::task_arena_base& ta) {\n    arena* a = ta.my_arena.load(std::memory_order_relaxed);\n    assert_pointer_valid(a);\n    threading_control::unregister_public_reference(/*blocking_terminate=*/false);\n    a->on_thread_leaving(arena::ref_external);\n    ta.my_arena.store(nullptr, std::memory_order_relaxed);\n}\n\nbool task_arena_impl::attach(d1::task_arena_base& ta) {\n    __TBB_ASSERT(!ta.my_arena.load(std::memory_order_relaxed), nullptr);\n    thread_data* td = governor::get_thread_data_if_initialized();\n    if( td && td->my_arena ) {\n        arena* a = td->my_arena;\n        // There is an active arena to attach to.\n        // It's still used by s, so won't be destroyed right away.\n        __TBB_ASSERT(a->my_references > 0, nullptr);\n        a->my_references += arena::ref_external;\n        ta.my_num_reserved_slots = a->my_num_reserved_slots;\n        ta.my_priority = arena_priority(a->my_priority_level);\n        ta.my_max_concurrency = ta.my_num_reserved_slots + a->my_max_num_workers;\n        __TBB_ASSERT(arena::num_arena_slots(ta.my_max_concurrency, ta.my_num_reserved_slots) == a->my_num_slots, nullptr);\n        ta.my_arena.store(a, std::memory_order_release);\n        // increases threading_control's ref count for task_arena\n        threading_control::register_public_reference();\n        return true;\n    }\n    return false;\n}\n\nvoid task_arena_impl::enqueue(d1::task& t, d1::task_group_context* c, d1::task_arena_base* ta) {\n    thread_data* td = governor::get_thread_data();  // thread data is only needed for FastRandom instance\n    assert_pointer_valid(td, \"thread_data pointer should not be null\");\n    arena* a = ta ?\n              ta->my_arena.load(std::memory_order_relaxed)\n            : td->my_arena\n    ;\n    assert_pointer_valid(a, \"arena pointer should not be null\");\n    auto* ctx = c ? c : a->my_default_ctx;\n    assert_pointer_valid(ctx, \"context pointer should not be null\");\n    // Is there a better place for checking the state of ctx?\n     __TBB_ASSERT(!a->my_default_ctx->is_group_execution_cancelled(),\n                  \"The task will not be executed because its task_group_context is cancelled.\");\n     a->enqueue_task(t, *ctx, *td);\n}\n\nd1::slot_id task_arena_impl::execution_slot(const d1::task_arena_base& ta) {\n    thread_data* td = governor::get_thread_data_if_initialized();\n    if (td && (td->is_attached_to(ta.my_arena.load(std::memory_order_relaxed)))) {\n        return td->my_arena_index;\n    }\n    return d1::slot_id(-1);\n}\n\nclass nested_arena_context : no_copy {\npublic:\n    nested_arena_context(thread_data& td, arena& nested_arena, std::size_t slot_index)\n        : m_orig_execute_data_ext(td.my_task_dispatcher->m_execute_data_ext)\n    {\n        if (td.my_arena != &nested_arena) {\n            m_orig_arena = td.my_arena;\n            m_orig_slot_index = td.my_arena_index;\n            m_orig_last_observer = td.my_last_observer;\n            m_orig_is_thread_registered = td.my_is_registered;\n\n            td.detach_task_dispatcher();\n            td.attach_arena(nested_arena, slot_index);\n            td.my_is_registered = false;\n            if (td.my_inbox.is_idle_state(true))\n                td.my_inbox.set_is_idle(false);\n            task_dispatcher& task_disp = td.my_arena_slot->default_task_dispatcher();\n            td.enter_task_dispatcher(task_disp, m_orig_execute_data_ext.task_disp->m_stealing_threshold);\n\n            // If the calling thread occupies the slots out of external thread reserve we need to notify the\n            // market that this arena requires one worker less.\n            if (td.my_arena_index >= td.my_arena->my_num_reserved_slots) {\n                td.my_arena->request_workers(/* mandatory_delta = */ 0, /* workers_delta = */ -1);\n            }\n\n            td.my_last_observer = nullptr;\n            // The task_arena::execute method considers each calling thread as an external thread.\n            td.my_arena->my_observers.notify_entry_observers(td.my_last_observer, /* worker*/false);\n        }\n\n        m_task_dispatcher = td.my_task_dispatcher;\n        m_orig_fifo_tasks_allowed = m_task_dispatcher->allow_fifo_task(true);\n        m_orig_critical_task_allowed = m_task_dispatcher->m_properties.critical_task_allowed;\n        m_task_dispatcher->m_properties.critical_task_allowed = true;\n\n        execution_data_ext& ed_ext = td.my_task_dispatcher->m_execute_data_ext;\n        ed_ext.context = td.my_arena->my_default_ctx;\n        ed_ext.original_slot = td.my_arena_index;\n        ed_ext.affinity_slot = d1::no_slot;\n        ed_ext.task_disp = td.my_task_dispatcher;\n        ed_ext.isolation = no_isolation;\n\n        __TBB_ASSERT(td.my_arena_slot, nullptr);\n        __TBB_ASSERT(td.my_arena_slot->is_occupied(), nullptr);\n        __TBB_ASSERT(td.my_task_dispatcher, nullptr);\n    }\n    ~nested_arena_context() {\n        thread_data& td = *m_task_dispatcher->m_thread_data;\n        __TBB_ASSERT(governor::is_thread_data_set(&td), nullptr);\n        m_task_dispatcher->allow_fifo_task(m_orig_fifo_tasks_allowed);\n        m_task_dispatcher->m_properties.critical_task_allowed = m_orig_critical_task_allowed;\n        if (m_orig_arena) {\n            td.my_arena->my_observers.notify_exit_observers(td.my_last_observer, /*worker*/ false);\n            td.my_last_observer = m_orig_last_observer;\n\n            // Notify the market that this thread releasing a one slot\n            // that can be used by a worker thread.\n            if (td.my_arena_index >= td.my_arena->my_num_reserved_slots) {\n                td.my_arena->request_workers(/* mandatory_delta = */ 0, /* workers_delta = */ 1);\n            }\n\n            td.leave_task_dispatcher();\n            td.my_arena_slot->release();\n            td.my_arena->my_exit_monitors.notify_one(); // do not relax!\n            td.my_is_registered = m_orig_is_thread_registered;\n            td.attach_arena(*m_orig_arena, m_orig_slot_index);\n            td.attach_task_dispatcher(*m_orig_execute_data_ext.task_disp);\n            __TBB_ASSERT(td.my_inbox.is_idle_state(false), nullptr);\n        }\n        td.my_task_dispatcher->m_execute_data_ext = m_orig_execute_data_ext;\n    }\n\nprivate:\n    execution_data_ext    m_orig_execute_data_ext{};\n    arena*              m_orig_arena{ nullptr };\n    observer_proxy*     m_orig_last_observer{ nullptr };\n    task_dispatcher*    m_task_dispatcher{ nullptr };\n    unsigned            m_orig_slot_index{};\n    bool                m_orig_fifo_tasks_allowed{};\n    bool                m_orig_critical_task_allowed{};\n    bool                m_orig_is_thread_registered{};\n};\n\nclass delegated_task : public d1::task {\n    d1::delegate_base&  m_delegate;\n    concurrent_monitor& m_monitor;\n    d1::wait_context&   m_wait_ctx;\n    std::atomic<bool>   m_completed;\n    d1::task* execute(d1::execution_data& ed) override {\n        const execution_data_ext& ed_ext = static_cast<const execution_data_ext&>(ed);\n        execution_data_ext orig_execute_data_ext = ed_ext.task_disp->m_execute_data_ext;\n        __TBB_ASSERT(&ed_ext.task_disp->m_execute_data_ext == &ed,\n            \"The execute data shall point to the current task dispatcher execute data\");\n        __TBB_ASSERT(ed_ext.task_disp->m_execute_data_ext.isolation == no_isolation, nullptr);\n\n        ed_ext.task_disp->m_execute_data_ext.context = ed_ext.task_disp->get_thread_data().my_arena->my_default_ctx;\n        bool fifo_task_allowed = ed_ext.task_disp->allow_fifo_task(true);\n        try_call([&] {\n            m_delegate();\n        }).on_completion([&] {\n            ed_ext.task_disp->m_execute_data_ext = orig_execute_data_ext;\n            ed_ext.task_disp->allow_fifo_task(fifo_task_allowed);\n        });\n\n        finalize();\n        return nullptr;\n    }\n    d1::task* cancel(d1::execution_data&) override {\n        finalize();\n        return nullptr;\n    }\n    void finalize() {\n        m_wait_ctx.release(); // must precede the wakeup\n        m_monitor.notify([this] (std::uintptr_t ctx) {\n            return ctx == std::uintptr_t(&m_delegate);\n        }); // do not relax, it needs a fence!\n        m_completed.store(true, std::memory_order_release);\n    }\npublic:\n    delegated_task(d1::delegate_base& d, concurrent_monitor& s, d1::wait_context& wo)\n        : m_delegate(d), m_monitor(s), m_wait_ctx(wo), m_completed{ false }{}\n    ~delegated_task() override {\n        // The destructor can be called earlier than the m_monitor is notified\n        // because the waiting thread can be released after m_wait_ctx.release_wait.\n        // To close that race we wait for the m_completed signal.\n        spin_wait_until_eq(m_completed, true);\n    }\n};\n\nvoid task_arena_impl::execute(d1::task_arena_base& ta, d1::delegate_base& d) {\n    arena* a = ta.my_arena.load(std::memory_order_relaxed);\n    __TBB_ASSERT(a != nullptr, nullptr);\n    thread_data* td = governor::get_thread_data();\n\n    bool same_arena = td->my_arena == a;\n    std::size_t index1 = td->my_arena_index;\n    if (!same_arena) {\n        index1 = a->occupy_free_slot</*as_worker */false>(*td);\n        if (index1 == arena::out_of_arena) {\n            concurrent_monitor::thread_context waiter((std::uintptr_t)&d);\n            d1::wait_context wo(1);\n            d1::task_group_context exec_context(d1::task_group_context::isolated);\n            task_group_context_impl::copy_fp_settings(exec_context, *a->my_default_ctx);\n\n            delegated_task dt(d, a->my_exit_monitors, wo);\n            a->enqueue_task( dt, exec_context, *td);\n            size_t index2 = arena::out_of_arena;\n            do {\n                a->my_exit_monitors.prepare_wait(waiter);\n                if (!wo.continue_execution()) {\n                    a->my_exit_monitors.cancel_wait(waiter);\n                    break;\n                }\n                index2 = a->occupy_free_slot</*as_worker*/false>(*td);\n                if (index2 != arena::out_of_arena) {\n                    a->my_exit_monitors.cancel_wait(waiter);\n                    nested_arena_context scope(*td, *a, index2 );\n                    r1::wait(wo, exec_context);\n                    __TBB_ASSERT(!exec_context.my_exception.load(std::memory_order_relaxed), nullptr); // exception can be thrown above, not deferred\n                    break;\n                }\n                a->my_exit_monitors.commit_wait(waiter);\n            } while (wo.continue_execution());\n            if (index2 == arena::out_of_arena) {\n                // notify a waiting thread even if this thread did not enter arena,\n                // in case it was woken by a leaving thread but did not need to enter\n                a->my_exit_monitors.notify_one(); // do not relax!\n            }\n            // process possible exception\n            auto exception = exec_context.my_exception.load(std::memory_order_acquire);\n            if (exception) {\n                __TBB_ASSERT(exec_context.is_group_execution_cancelled(), \"The task group context with an exception should be canceled.\");\n                exception->throw_self();\n            }\n            __TBB_ASSERT(governor::is_thread_data_set(td), nullptr);\n            return;\n        } // if (index1 == arena::out_of_arena)\n    } // if (!same_arena)\n\n    context_guard_helper</*report_tasks=*/false> context_guard;\n    context_guard.set_ctx(a->my_default_ctx);\n    nested_arena_context scope(*td, *a, index1);\n#if _WIN64\n    try {\n#endif\n        d();\n        __TBB_ASSERT(same_arena || governor::is_thread_data_set(td), nullptr);\n#if _WIN64\n    } catch (...) {\n        context_guard.restore_default();\n        throw;\n    }\n#endif\n}\n\nvoid task_arena_impl::wait(d1::task_arena_base& ta) {\n    arena* a = ta.my_arena.load(std::memory_order_relaxed);\n    __TBB_ASSERT(a != nullptr, nullptr);\n    thread_data* td = governor::get_thread_data();\n    __TBB_ASSERT_EX(td, \"Scheduler is not initialized\");\n    __TBB_ASSERT(td->my_arena != a || td->my_arena_index == 0, \"internal_wait is not supported within a worker context\" );\n    if (a->my_max_num_workers != 0) {\n        while (a->num_workers_active() || !a->is_empty()) {\n            yield();\n        }\n    }\n}\n\nint task_arena_impl::max_concurrency(const d1::task_arena_base *ta) {\n    arena* a = nullptr;\n    if( ta ) // for special cases of ta->max_concurrency()\n        a = ta->my_arena.load(std::memory_order_relaxed);\n    else if( thread_data* td = governor::get_thread_data_if_initialized() )\n        a = td->my_arena; // the current arena if any\n\n    if( a ) { // Get parameters from the arena\n        __TBB_ASSERT( !ta || ta->my_max_concurrency==1, nullptr);\n        int mandatory_worker = 0;\n        if (a->is_arena_workerless() && a->my_num_reserved_slots == 1) {\n            mandatory_worker = a->my_mandatory_concurrency.test() ? 1 : 0;\n        }\n        return a->my_num_reserved_slots + a->my_max_num_workers + mandatory_worker;\n    }\n\n    if (ta && ta->my_max_concurrency == 1) {\n        return 1;\n    }\n\n#if __TBB_ARENA_BINDING\n    if (ta) {\n        d1::constraints arena_constraints = d1::constraints{}\n            .set_numa_id(ta->my_numa_id)\n            .set_core_type(ta->core_type())\n            .set_max_threads_per_core(ta->max_threads_per_core());\n        return (int)default_concurrency(arena_constraints);\n    }\n#endif /*!__TBB_ARENA_BINDING*/\n\n    __TBB_ASSERT(!ta || ta->my_max_concurrency==d1::task_arena_base::automatic, nullptr);\n    return int(governor::default_num_threads());\n}\n\n#if __TBB_PREVIEW_PARALLEL_PHASE\nvoid task_arena_impl::enter_parallel_phase(d1::task_arena_base* ta, std::uintptr_t /*reserved*/) {\n    arena* a = ta ? ta->my_arena.load(std::memory_order_relaxed) : governor::get_thread_data()->my_arena;\n    __TBB_ASSERT(a, nullptr);\n    a->my_thread_leave.register_parallel_phase();\n    a->advertise_new_work<arena::work_enqueued>();\n}\n\nvoid task_arena_impl::exit_parallel_phase(d1::task_arena_base* ta, std::uintptr_t flags) {\n    arena* a = ta ? ta->my_arena.load(std::memory_order_relaxed) : governor::get_thread_data()->my_arena;\n    __TBB_ASSERT(a, nullptr);\n    a->my_thread_leave.unregister_parallel_phase(/*with_fast_leave=*/static_cast<bool>(flags));\n}\n#endif\n\nvoid isolate_within_arena(d1::delegate_base& d, std::intptr_t isolation) {\n    // TODO: Decide what to do if the scheduler is not initialized. Is there a use case for it?\n    thread_data* tls = governor::get_thread_data();\n    assert_pointers_valid(tls, tls->my_task_dispatcher);\n    task_dispatcher* dispatcher = tls->my_task_dispatcher;\n    isolation_type previous_isolation = dispatcher->m_execute_data_ext.isolation;\n    try_call([&] {\n        // We temporarily change the isolation tag of the currently running task. It will be restored in the destructor of the guard.\n        isolation_type current_isolation = isolation ? isolation : reinterpret_cast<isolation_type>(&d);\n        // Save the current isolation value and set new one\n        previous_isolation = dispatcher->set_isolation(current_isolation);\n        // Isolation within this callable\n        d();\n    }).on_completion([&] {\n        __TBB_ASSERT(governor::get_thread_data()->my_task_dispatcher == dispatcher, nullptr);\n        dispatcher->set_isolation(previous_isolation);\n    });\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/arena.h",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_arena_H\n#define _TBB_arena_H\n\n#include <atomic>\n#include <cstring>\n\n#include \"oneapi/tbb/detail/_task.h\"\n#include \"oneapi/tbb/detail/_utils.h\"\n#include \"oneapi/tbb/spin_mutex.h\"\n\n#include \"scheduler_common.h\"\n#include \"intrusive_list.h\"\n#include \"task_stream.h\"\n#include \"arena_slot.h\"\n#include \"rml_tbb.h\"\n#include \"mailbox.h\"\n#include \"governor.h\"\n#include \"concurrent_monitor.h\"\n#include \"observer_proxy.h\"\n#include \"thread_control_monitor.h\"\n#include \"threading_control_client.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nclass task_dispatcher;\nclass task_group_context;\nclass threading_control;\nclass allocate_root_with_context_proxy;\n\n#if __TBB_ARENA_BINDING\nclass numa_binding_observer;\n#endif /*__TBB_ARENA_BINDING*/\n\n//! Bounded coroutines cache LIFO ring buffer\nclass arena_co_cache {\n    //! Ring buffer storage\n    task_dispatcher** my_co_scheduler_cache;\n    //! Current cache index\n    unsigned my_head;\n    //! Cache capacity for arena\n    unsigned my_max_index;\n    //! Accessor lock for modification operations\n    tbb::spin_mutex my_co_cache_mutex;\n\n    unsigned next_index() {\n        return ( my_head == my_max_index ) ? 0 : my_head + 1;\n    }\n\n    unsigned prev_index() {\n        return ( my_head == 0 ) ? my_max_index : my_head - 1;\n    }\n\n    bool internal_empty() {\n        return my_co_scheduler_cache[prev_index()] == nullptr;\n    }\n\n    void internal_task_dispatcher_cleanup(task_dispatcher* to_cleanup) {\n        to_cleanup->~task_dispatcher();\n        cache_aligned_deallocate(to_cleanup);\n    }\n\npublic:\n    void init(unsigned cache_capacity) {\n        std::size_t alloc_size = cache_capacity * sizeof(task_dispatcher*);\n        my_co_scheduler_cache = (task_dispatcher**)cache_aligned_allocate(alloc_size);\n        std::memset( my_co_scheduler_cache, 0, alloc_size );\n        my_head = 0;\n        my_max_index = cache_capacity - 1;\n    }\n\n    void cleanup() {\n        while (task_dispatcher* to_cleanup = pop()) {\n            internal_task_dispatcher_cleanup(to_cleanup);\n        }\n        cache_aligned_deallocate(my_co_scheduler_cache);\n    }\n\n    //! Insert scheduler to the current available place.\n    //! Replace an old value, if necessary.\n    void push(task_dispatcher* s) {\n        task_dispatcher* to_cleanup = nullptr;\n        {\n            tbb::spin_mutex::scoped_lock lock(my_co_cache_mutex);\n            // Check if we are replacing some existing buffer entrance\n            if (my_co_scheduler_cache[my_head] != nullptr) {\n                to_cleanup = my_co_scheduler_cache[my_head];\n            }\n            // Store the cached value\n            my_co_scheduler_cache[my_head] = s;\n            // Move head index to the next slot\n            my_head = next_index();\n        }\n        // Cleanup replaced buffer if any\n        if (to_cleanup) {\n            internal_task_dispatcher_cleanup(to_cleanup);\n        }\n    }\n\n    //! Get a cached scheduler if any\n    task_dispatcher* pop() {\n        tbb::spin_mutex::scoped_lock lock(my_co_cache_mutex);\n        // No cached coroutine\n        if (internal_empty()) {\n            return nullptr;\n        }\n        // Move head index to the currently available value\n        my_head = prev_index();\n        // Retrieve the value from the buffer\n        task_dispatcher* to_return = my_co_scheduler_cache[my_head];\n        // Clear the previous entrance value\n        my_co_scheduler_cache[my_head] = nullptr;\n        return to_return;\n    }\n};\n\nstruct stack_anchor_type {\n    stack_anchor_type() = default;\n    stack_anchor_type(const stack_anchor_type&) = delete;\n};\n\nclass atomic_flag {\n    static const std::uintptr_t SET = 1;\n    static const std::uintptr_t UNSET = 0;\n    std::atomic<std::uintptr_t> my_state{UNSET};\npublic:\n    bool test_and_set() {\n        std::uintptr_t state = my_state.load(std::memory_order_acquire);\n        switch (state) {\n        case SET:\n            return false;\n        default: /* busy */\n            if (my_state.compare_exchange_strong(state, SET)) {\n                // We interrupted clear transaction\n                return false;\n            }\n            if (state != UNSET) {\n                // We lost our epoch\n                return false;\n            }\n            // We are too late but still in the same epoch\n            __TBB_fallthrough;\n        case UNSET:\n            return my_state.compare_exchange_strong(state, SET);\n        }\n    }\n    template <typename Pred>\n    bool try_clear_if(Pred&& pred) {\n        std::uintptr_t busy = std::uintptr_t(&busy);\n        std::uintptr_t state = my_state.load(std::memory_order_acquire);\n        if (state == SET && my_state.compare_exchange_strong(state, busy)) {\n            if (pred()) {\n                return my_state.compare_exchange_strong(busy, UNSET);\n            }\n            // The result of the next operation is discarded, always false should be returned.\n            my_state.compare_exchange_strong(busy, SET);\n        }\n        return false;\n    }\n    bool test(std::memory_order order = std::memory_order_acquire) {\n        return my_state.load(order) != UNSET;\n    }\n};\n\n#if __TBB_PREVIEW_PARALLEL_PHASE\nclass thread_leave_manager {\n    static const std::uintptr_t DELAYED_LEAVE       = 0;\n    static const std::uintptr_t FAST_LEAVE          = 1;\n    static const std::uintptr_t ONE_TIME_FAST_LEAVE = 1 << 1;\n    static const std::uintptr_t PARALLEL_PHASE      = 1 << 2;\n\n    std::atomic<std::uintptr_t> my_state{UINTPTR_MAX};\npublic:\n    // This method is not thread-safe!\n    // Required to be called after construction to set initial state of the state machine.\n    void set_initial_state(tbb::task_arena::leave_policy lp) {\n        if (lp == tbb::task_arena::leave_policy::automatic) {\n            std::uintptr_t platform_policy = governor::hybrid_cpu() ? FAST_LEAVE : DELAYED_LEAVE;\n            my_state.store(platform_policy, std::memory_order_relaxed);\n        } else {\n            __TBB_ASSERT(lp == tbb::task_arena::leave_policy::fast,\n                         \"Was the new value introduced for leave policy?\");\n            my_state.store(FAST_LEAVE, std::memory_order_relaxed);\n        }\n    }\n\n    void reset_if_needed() {\n        std::uintptr_t curr = my_state.load(std::memory_order_relaxed);\n        if (curr == ONE_TIME_FAST_LEAVE) {\n            // Potentially can override decision of the parallel phase from future epoch\n            // but it is not a problem because it does not violate the correctness\n            my_state.fetch_and(~ONE_TIME_FAST_LEAVE);\n        }\n    }\n\n    // Indicate start of parallel phase in the state machine\n    void register_parallel_phase() {\n        __TBB_ASSERT(my_state.load(std::memory_order_relaxed) != UINTPTR_MAX, \"The initial state was not set\");\n\n        std::uintptr_t prev = my_state.fetch_add(PARALLEL_PHASE);\n        __TBB_ASSERT(prev + PARALLEL_PHASE > prev, \"Overflow detected\");\n        if (prev & ONE_TIME_FAST_LEAVE) {\n            // State was previously transitioned to \"One-time Fast leave\", thus with the start\n            // of new parallel phase, it should be reset\n            my_state.fetch_and(~ONE_TIME_FAST_LEAVE);\n        }\n    }\n\n    // Indicate the end of parallel phase in the state machine\n    void unregister_parallel_phase(bool enable_fast_leave) {\n        std::uintptr_t prev = my_state.load(std::memory_order_relaxed);\n        __TBB_ASSERT(prev != UINTPTR_MAX, \"The initial state was not set\");\n\n        std::uintptr_t desired{};\n        do {\n            __TBB_ASSERT(prev - PARALLEL_PHASE < prev,\n                         \"A call to unregister without its register complement\");\n            desired = prev - PARALLEL_PHASE; // Mark the end of this phase in reference counter\n            if (enable_fast_leave && /*it was the last parallel phase*/desired == DELAYED_LEAVE) {\n                desired = ONE_TIME_FAST_LEAVE;\n            }\n        } while (!my_state.compare_exchange_strong(prev, desired));\n    }\n\n    bool is_retention_allowed() {\n        std::uintptr_t curr = my_state.load(std::memory_order_relaxed);\n        __TBB_ASSERT(curr != UINTPTR_MAX, \"The initial state was not set\");\n        return curr != FAST_LEAVE && curr != ONE_TIME_FAST_LEAVE;\n    }\n};\n#endif /* __TBB_PREVIEW_PARALLEL_PHASE */\n\n//! The structure of an arena, except the array of slots.\n/** Separated in order to simplify padding.\n    Intrusive list node base class is used by market to form a list of arenas. **/\n// TODO: Analyze arena_base cache lines placement\nstruct arena_base : padded<intrusive_list_node> {\n    //! The number of workers that have been marked out by the resource manager to service the arena.\n    std::atomic<unsigned> my_num_workers_allotted;   // heavy use in stealing loop\n\n    //! Reference counter for the arena.\n    /** Worker and external thread references are counted separately: first several bits are for references\n        from external thread threads or explicit task_arenas (see arena::ref_external_bits below);\n        the rest counts the number of workers servicing the arena. */\n    std::atomic<unsigned> my_references;     // heavy use in stealing loop\n\n    //! The maximal number of currently busy slots.\n    std::atomic<unsigned> my_limit;          // heavy use in stealing loop\n\n    //! Task pool for the tasks scheduled via task::enqueue() method.\n    /** Such scheduling guarantees eventual execution even if\n        - new tasks are constantly coming (by extracting scheduled tasks in\n          relaxed FIFO order);\n        - the enqueuing thread does not call any of wait_for_all methods. **/\n    task_stream<front_accessor> my_fifo_task_stream; // heavy use in stealing loop\n\n    //! Task pool for the tasks scheduled via tbb::resume() function.\n    task_stream<front_accessor> my_resume_task_stream; // heavy use in stealing loop\n\n#if __TBB_PREVIEW_CRITICAL_TASKS\n    //! Task pool for the tasks with critical property set.\n    /** Critical tasks are scheduled for execution ahead of other sources (including local task pool\n        and even bypassed tasks) unless the thread already executes a critical task in an outer\n        dispatch loop **/\n    // used on the hot path of the task dispatch loop\n    task_stream<back_nonnull_accessor> my_critical_task_stream;\n#endif\n\n    //! The total number of workers that are requested from the resource manager.\n    int my_total_num_workers_requested;\n\n    //! The index in the array of per priority lists of arenas this object is in.\n    /*const*/ unsigned my_priority_level;\n\n    //! The max priority level of arena in permit manager.\n    std::atomic<bool> my_is_top_priority{false};\n\n    //! Current task pool state and estimate of available tasks amount.\n    atomic_flag my_pool_state;\n\n    //! The list of local observers attached to this arena.\n    observer_list my_observers;\n\n#if __TBB_ARENA_BINDING\n    //! Pointer to internal observer that allows to bind threads in arena to certain NUMA node.\n    numa_binding_observer* my_numa_binding_observer{nullptr};\n#endif /*__TBB_ARENA_BINDING*/\n\n    // Below are rarely modified members\n\n    threading_control* my_threading_control;\n\n    //! Default task group context.\n    d1::task_group_context* my_default_ctx;\n\n    //! Waiting object for external threads that cannot join the arena.\n    concurrent_monitor my_exit_monitors;\n\n#if __TBB_PREVIEW_PARALLEL_PHASE\n    //! Manages state of thread_leave state machine\n    thread_leave_manager my_thread_leave;\n#endif\n\n    //! Coroutines (task_dispathers) cache buffer\n    arena_co_cache my_co_cache;\n\n    // arena needs an extra worker despite the arena limit\n    atomic_flag my_mandatory_concurrency;\n    // the number of local mandatory concurrency requests\n    int my_mandatory_requests;\n\n    //! The number of slots in the arena.\n    unsigned my_num_slots;\n    //! The number of reserved slots (can be occupied only by external threads).\n    unsigned my_num_reserved_slots;\n    //! The number of workers requested by the external thread owning the arena.\n    unsigned my_max_num_workers;\n\n    threading_control_client my_tc_client;\n\n#if TBB_USE_ASSERT\n    //! Used to trap accesses to the object after its destruction.\n    std::uintptr_t my_guard;\n#endif /* TBB_USE_ASSERT */\n}; // struct arena_base\n\nclass arena: public padded<arena_base>\n{\npublic:\n    using base_type = padded<arena_base>;\n\n    //! Types of work advertised by advertise_new_work()\n    enum new_work_type {\n        work_spawned,\n        wakeup,\n        work_enqueued\n    };\n\n    //! Constructor\n    arena(threading_control* control, unsigned max_num_workers, unsigned num_reserved_slots, unsigned priority_level\n#if __TBB_PREVIEW_PARALLEL_PHASE\n          , tbb::task_arena::leave_policy lp\n#endif\n    );\n\n    //! Allocate an instance of arena.\n    static arena& allocate_arena(threading_control* control, unsigned num_slots, unsigned num_reserved_slots,\n                                 unsigned priority_level\n#if __TBB_PREVIEW_PARALLEL_PHASE\n                                 , tbb::task_arena::leave_policy lp\n#endif\n    );\n\n    static arena& create(threading_control* control, unsigned num_slots, unsigned num_reserved_slots,\n                         unsigned arena_priority_level,\n                         d1::constraints constraints = d1::constraints{}\n#if __TBB_PREVIEW_PARALLEL_PHASE\n                         , tbb::task_arena::leave_policy lp = tbb::task_arena::leave_policy::automatic\n#endif\n    );\n\n    static int unsigned num_arena_slots ( unsigned num_slots, unsigned num_reserved_slots ) {\n        return num_reserved_slots == 0 ? num_slots : max(2u, num_slots);\n    }\n\n    static int allocation_size( unsigned num_slots ) {\n        return sizeof(base_type) + num_slots * (sizeof(mail_outbox) + sizeof(arena_slot) + sizeof(task_dispatcher));\n    }\n\n    //! Get reference to mailbox corresponding to given slot_id\n    mail_outbox& mailbox( d1::slot_id slot ) {\n        __TBB_ASSERT( slot != d1::no_slot, \"affinity should be specified\" );\n\n        return reinterpret_cast<mail_outbox*>(this)[-(int)(slot+1)]; // cast to 'int' is redundant but left for readability\n    }\n\n    //! Completes arena shutdown, destructs and deallocates it.\n    void free_arena();\n\n    //! The number of least significant bits for external references\n    static const unsigned ref_external_bits = 12; // up to 4095 external and 1M workers\n\n    //! Reference increment values for externals and workers\n    static const unsigned ref_external = 1;\n    static const unsigned ref_worker   = 1 << ref_external_bits;\n\n    //! The number of workers active in the arena.\n    unsigned num_workers_active() const {\n        return my_references.load(std::memory_order_acquire) >> ref_external_bits;\n    }\n\n    //! Check if the recall is requested by the market.\n    bool is_recall_requested() const {\n        return num_workers_active() > my_num_workers_allotted.load(std::memory_order_relaxed);\n    }\n\n    void request_workers(int mandatory_delta, int workers_delta, bool wakeup_threads = false);\n\n    //! If necessary, raise a flag that there is new job in arena.\n    template<arena::new_work_type work_type> void advertise_new_work();\n\n    //! Attempts to steal a task from a randomly chosen arena slot\n    d1::task* steal_task(unsigned arena_index, FastRandom& frnd, execution_data_ext& ed, isolation_type isolation);\n\n    //! Get a task from a global starvation resistant queue\n    template<task_stream_accessor_type accessor>\n    d1::task* get_stream_task(task_stream<accessor>& stream, unsigned& hint);\n\n#if __TBB_PREVIEW_CRITICAL_TASKS\n    //! Tries to find a critical task in global critical task stream\n    d1::task* get_critical_task(unsigned& hint, isolation_type isolation);\n#endif\n\n    //! Check if there is job anywhere in arena.\n    void out_of_work();\n\n    //! enqueue a task into starvation-resistance queue\n    void enqueue_task(d1::task&, d1::task_group_context&, thread_data&);\n\n    //! Registers the worker with the arena and enters TBB scheduler dispatch loop\n    void process(thread_data&);\n\n    //! Notification that the thread leaves its arena\n\n    void on_thread_leaving(unsigned ref_param);\n\n    //! Check for the presence of enqueued tasks\n    bool has_enqueued_tasks();\n\n    //! Check for the presence of any tasks\n    bool has_tasks();\n\n    bool is_empty() { return my_pool_state.test() == /* EMPTY */ false; }\n\n    thread_control_monitor& get_waiting_threads_monitor();\n\n    static const std::size_t out_of_arena = ~size_t(0);\n    //! Tries to occupy a slot in the arena. On success, returns the slot index; if no slot is available, returns out_of_arena.\n    template <bool as_worker>\n    std::size_t occupy_free_slot(thread_data&);\n    //! Tries to occupy a slot in the specified range.\n    std::size_t occupy_free_slot_in_range(thread_data& tls, std::size_t lower, std::size_t upper);\n\n    std::uintptr_t calculate_stealing_threshold();\n\n    unsigned priority_level() { return my_priority_level; }\n\n    bool has_request() { return my_total_num_workers_requested; }\n\n    unsigned references() const { return my_references.load(std::memory_order_acquire); }\n\n    bool is_arena_workerless() const { return my_max_num_workers == 0; }\n\n    void set_top_priority(bool);\n\n    bool is_top_priority() const;\n\n    bool is_joinable() const {\n        return num_workers_active() < my_num_workers_allotted.load(std::memory_order_relaxed);\n    }\n\n    bool try_join();\n\n    void set_allotment(unsigned allotment);\n\n    int update_concurrency(unsigned concurrency);\n\n    std::pair</*min workers = */ int, /*max workers = */ int> update_request(int mandatory_delta, int workers_delta);\n\n    /** Must be the last data field */\n    arena_slot my_slots[1];\n}; // class arena\n\ntemplate <arena::new_work_type work_type>\nvoid arena::advertise_new_work() {\n    bool is_mandatory_needed = false;\n    bool are_workers_needed = false;\n\n    if (work_type != work_spawned) {\n        // Local memory fence here and below is required to avoid missed wakeups; see the comment below.\n        // Starvation resistant tasks require concurrency, so missed wakeups are unacceptable.\n        atomic_fence_seq_cst();\n    }\n\n    if (work_type == work_enqueued && my_num_slots > my_num_reserved_slots) {\n        is_mandatory_needed = my_mandatory_concurrency.test_and_set();\n    }\n\n    // Double-check idiom that, in case of spawning, is deliberately sloppy about memory fences.\n    // Technically, to avoid missed wakeups, there should be a full memory fence between the point we\n    // released the task pool (i.e. spawned task) and read the arena's state.  However, adding such a\n    // fence might hurt overall performance more than it helps, because the fence would be executed\n    // on every task pool release, even when stealing does not occur.  Since TBB allows parallelism,\n    // but never promises parallelism, the missed wakeup is not a correctness problem.\n    are_workers_needed = my_pool_state.test_and_set();\n\n    if (is_mandatory_needed || are_workers_needed) {\n        int mandatory_delta = is_mandatory_needed ? 1 : 0;\n        int workers_delta = are_workers_needed ? my_max_num_workers : 0;\n\n        if (is_mandatory_needed && is_arena_workerless()) {\n            // Set workers_delta to 1 to keep arena invariants consistent\n            workers_delta = 1;\n        }\n\n#if __TBB_PREVIEW_PARALLEL_PHASE\n        my_thread_leave.reset_if_needed();\n#endif\n        request_workers(mandatory_delta, workers_delta, /* wakeup_threads = */ true);\n    }\n}\n\ninline d1::task* arena::steal_task(unsigned arena_index, FastRandom& frnd, execution_data_ext& ed, isolation_type isolation) {\n    auto slot_num_limit = my_limit.load(std::memory_order_relaxed);\n    if (slot_num_limit == 1) {\n        // No slots to steal from\n        return nullptr;\n    }\n    // Try to steal a task from a random victim.\n    std::size_t k = frnd.get() % (slot_num_limit - 1);\n    // The following condition excludes the external thread that might have\n    // already taken our previous place in the arena from the list .\n    // of potential victims. But since such a situation can take\n    // place only in case of significant oversubscription, keeping\n    // the checks simple seems to be preferable to complicating the code.\n    if (k >= arena_index) {\n        ++k; // Adjusts random distribution to exclude self\n    }\n    arena_slot* victim = &my_slots[k];\n    d1::task **pool = victim->task_pool.load(std::memory_order_relaxed);\n    d1::task *t = nullptr;\n    if (pool == EmptyTaskPool || !(t = victim->steal_task(*this, isolation, k))) {\n        return nullptr;\n    }\n    if (task_accessor::is_proxy_task(*t)) {\n        task_proxy &tp = *(task_proxy*)t;\n        d1::slot_id slot = tp.slot;\n        t = tp.extract_task<task_proxy::pool_bit>();\n        if (!t) {\n            // Proxy was empty, so it's our responsibility to free it\n            tp.allocator.delete_object(&tp, ed);\n            return nullptr;\n        }\n        // Note affinity is called for any stolen task (proxy or general)\n        ed.affinity_slot = slot;\n    } else {\n        // Note affinity is called for any stolen task (proxy or general)\n        ed.affinity_slot = d1::any_slot;\n    }\n    // Update task owner thread id to identify stealing\n    ed.original_slot = k;\n    return t;\n}\n\ntemplate<task_stream_accessor_type accessor>\ninline d1::task* arena::get_stream_task(task_stream<accessor>& stream, unsigned& hint) {\n    if (stream.empty())\n        return nullptr;\n    return stream.pop(subsequent_lane_selector(hint));\n}\n\n#if __TBB_PREVIEW_CRITICAL_TASKS\n// Retrieves critical task respecting isolation level, if provided. The rule is:\n// 1) If no outer critical task and no isolation => take any critical task\n// 2) If working on an outer critical task and no isolation => cannot take any critical task\n// 3) If no outer critical task but isolated => respect isolation\n// 4) If working on an outer critical task and isolated => respect isolation\n// Hint is used to keep some LIFO-ness, start search with the lane that was used during push operation.\ninline d1::task* arena::get_critical_task(unsigned& hint, isolation_type isolation) {\n    if (my_critical_task_stream.empty())\n        return nullptr;\n\n    if ( isolation != no_isolation ) {\n        return my_critical_task_stream.pop_specific( hint, isolation );\n    } else {\n        return my_critical_task_stream.pop(preceding_lane_selector(hint));\n    }\n}\n#endif // __TBB_PREVIEW_CRITICAL_TASKS\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /* _TBB_arena_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/arena_slot.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"arena_slot.h\"\n#include \"arena.h\"\n#include \"thread_data.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n//------------------------------------------------------------------------\n// Arena Slot\n//------------------------------------------------------------------------\nd1::task* arena_slot::get_task_impl(size_t T, execution_data_ext& ed, bool& tasks_omitted, isolation_type isolation) {\n    __TBB_ASSERT(tail.load(std::memory_order_relaxed) <= T || is_local_task_pool_quiescent(),\n            \"Is it safe to get a task at position T?\");\n\n    d1::task* result = task_pool_ptr[T];\n    __TBB_ASSERT(!is_poisoned( result ), \"The poisoned task is going to be processed\");\n\n    if (!result) {\n        return nullptr;\n    }\n    bool omit = isolation != no_isolation && isolation != task_accessor::isolation(*result);\n    if (!omit && !task_accessor::is_proxy_task(*result)) {\n        return result;\n    } else if (omit) {\n        tasks_omitted = true;\n        return nullptr;\n    }\n\n    task_proxy& tp = static_cast<task_proxy&>(*result);\n    d1::slot_id aff_id = tp.slot;\n    if ( d1::task *t = tp.extract_task<task_proxy::pool_bit>() ) {\n        ed.affinity_slot = aff_id;\n        return t;\n    }\n    // Proxy was empty, so it's our responsibility to free it\n    tp.allocator.delete_object(&tp, ed);\n\n    if ( tasks_omitted ) {\n        task_pool_ptr[T] = nullptr;\n    }\n    return nullptr;\n}\n\nd1::task* arena_slot::get_task(execution_data_ext& ed, isolation_type isolation) {\n    __TBB_ASSERT(is_task_pool_published(), nullptr);\n    // The current task position in the task pool.\n    std::size_t T0 = tail.load(std::memory_order_relaxed);\n    // The bounds of available tasks in the task pool. H0 is only used when the head bound is reached.\n    std::size_t H0 = (std::size_t)-1, T = T0;\n    d1::task* result = nullptr;\n    bool task_pool_empty = false;\n    bool tasks_omitted = false;\n    do {\n        __TBB_ASSERT( !result, nullptr );\n        // The full fence is required to sync the store of `tail` with the load of `head` (write-read barrier)\n        T = --tail;\n        // The acquire load of head is required to guarantee consistency of our task pool\n        // when a thief rolls back the head.\n        if ( (std::intptr_t)( head.load(std::memory_order_acquire) ) > (std::intptr_t)T ) {\n            acquire_task_pool();\n            H0 = head.load(std::memory_order_relaxed);\n            if ( (std::intptr_t)H0 > (std::intptr_t)T ) {\n                // The thief has not backed off - nothing to grab.\n                __TBB_ASSERT( H0 == head.load(std::memory_order_relaxed)\n                    && T == tail.load(std::memory_order_relaxed)\n                    && H0 == T + 1, \"victim/thief arbitration algorithm failure\" );\n                reset_task_pool_and_leave();\n                // No tasks in the task pool.\n                task_pool_empty = true;\n                break;\n            } else if ( H0 == T ) {\n                // There is only one task in the task pool.\n                reset_task_pool_and_leave();\n                task_pool_empty = true;\n            } else {\n                // Release task pool if there are still some tasks.\n                // After the release, the tail will be less than T, thus a thief\n                // will not attempt to get a task at position T.\n                release_task_pool();\n            }\n        }\n        result = get_task_impl( T, ed, tasks_omitted, isolation );\n        if ( result ) {\n            poison_pointer( task_pool_ptr[T] );\n            break;\n        } else if ( !tasks_omitted ) {\n            poison_pointer( task_pool_ptr[T] );\n            __TBB_ASSERT( T0 == T+1, nullptr );\n            T0 = T;\n        }\n    } while ( !result && !task_pool_empty );\n\n    if ( tasks_omitted ) {\n        if ( task_pool_empty ) {\n            // All tasks have been checked. The task pool should be  in reset state.\n            // We just restore the bounds for the available tasks.\n            // TODO: Does it have sense to move them to the beginning of the task pool?\n            __TBB_ASSERT( is_quiescent_local_task_pool_reset(), nullptr );\n            if ( result ) {\n                // If we have a task, it should be at H0 position.\n                __TBB_ASSERT( H0 == T, nullptr );\n                ++H0;\n            }\n            __TBB_ASSERT( H0 <= T0, nullptr );\n            if ( H0 < T0 ) {\n                // Restore the task pool if there are some tasks.\n                head.store(H0, std::memory_order_relaxed);\n                tail.store(T0, std::memory_order_relaxed);\n                // The release fence is used in publish_task_pool.\n                publish_task_pool();\n                // Synchronize with snapshot as we published some tasks.\n                ed.task_disp->m_thread_data->my_arena->advertise_new_work<arena::wakeup>();\n            }\n        } else {\n            // A task has been obtained. We need to make a hole in position T.\n            __TBB_ASSERT( is_task_pool_published(), nullptr );\n            __TBB_ASSERT( result, nullptr );\n            task_pool_ptr[T] = nullptr;\n            tail.store(T0, std::memory_order_release);\n            // Synchronize with snapshot as we published some tasks.\n            // TODO: consider some approach not to call wakeup for each time. E.g. check if the tail reached the head.\n            ed.task_disp->m_thread_data->my_arena->advertise_new_work<arena::wakeup>();\n        }\n    }\n\n    __TBB_ASSERT( (std::intptr_t)tail.load(std::memory_order_relaxed) >= 0, nullptr );\n    __TBB_ASSERT( result || tasks_omitted || is_quiescent_local_task_pool_reset(), nullptr );\n    return result;\n}\n\nd1::task* arena_slot::steal_task(arena& a, isolation_type isolation, std::size_t slot_index) {\n    d1::task** victim_pool = lock_task_pool();\n    if (!victim_pool) {\n        return nullptr;\n    }\n    d1::task* result = nullptr;\n    std::size_t H = head.load(std::memory_order_relaxed); // mirror\n    std::size_t H0 = H;\n    bool tasks_omitted = false;\n    do {\n        // The full fence is required to sync the store of `head` with the load of `tail` (write-read barrier)\n        H = ++head;\n        // The acquire load of tail is required to guarantee consistency of victim_pool\n        // because the owner synchronizes task spawning via tail.\n        if ((std::intptr_t)H > (std::intptr_t)(tail.load(std::memory_order_acquire))) {\n            // Stealing attempt failed, deque contents has not been changed by us\n            head.store( /*dead: H = */ H0, std::memory_order_relaxed );\n            __TBB_ASSERT( !result, nullptr );\n            goto unlock;\n        }\n        result = victim_pool[H-1];\n        __TBB_ASSERT( !is_poisoned( result ), nullptr );\n\n        if (result) {\n            if (isolation == no_isolation || isolation == task_accessor::isolation(*result)) {\n                if (!task_accessor::is_proxy_task(*result)) {\n                    break;\n                }\n                task_proxy& tp = *static_cast<task_proxy*>(result);\n                // If mailed task is likely to be grabbed by its destination thread, skip it.\n                if (!task_proxy::is_shared(tp.task_and_tag) || !tp.outbox->recipient_is_idle() || a.mailbox(slot_index).recipient_is_idle()) {\n                    break;\n                }\n            }\n            // The task cannot be executed either due to isolation or proxy constraints.\n            result = nullptr;\n            tasks_omitted = true;\n        } else if (!tasks_omitted) {\n            // Cleanup the task pool from holes until a task is skipped.\n            __TBB_ASSERT( H0 == H-1, nullptr );\n            poison_pointer( victim_pool[H0] );\n            H0 = H;\n        }\n    } while (!result);\n    __TBB_ASSERT( result, nullptr );\n\n    // emit \"task was consumed\" signal\n    poison_pointer( victim_pool[H-1] );\n    if (tasks_omitted) {\n        // Some proxies in the task pool have been omitted. Set the stolen task to nullptr.\n        victim_pool[H-1] = nullptr;\n        // The release store synchronizes the victim_pool update(the store of nullptr).\n        head.store( /*dead: H = */ H0, std::memory_order_release );\n    }\nunlock:\n    unlock_task_pool(victim_pool);\n\n#if __TBB_PREFETCHING\n    __TBB_cl_evict(&victim_slot.head);\n    __TBB_cl_evict(&victim_slot.tail);\n#endif\n    if (tasks_omitted) {\n        // Synchronize with snapshot as the head and tail can be bumped which can falsely trigger EMPTY state\n        a.advertise_new_work<arena::wakeup>();\n    }\n    return result;\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/arena_slot.h",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_arena_slot_H\n#define _TBB_arena_slot_H\n\n#include \"oneapi/tbb/detail/_config.h\"\n#include \"oneapi/tbb/detail/_utils.h\"\n#include \"oneapi/tbb/detail/_template_helpers.h\"\n#include \"oneapi/tbb/detail/_task.h\"\n\n#include \"oneapi/tbb/cache_aligned_allocator.h\"\n\n#include \"misc.h\"\n#include \"mailbox.h\"\n#include \"scheduler_common.h\"\n\n#include <atomic>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nclass arena;\nclass task_group_context;\n\n//--------------------------------------------------------------------------------------------------------\n// Arena Slot\n//--------------------------------------------------------------------------------------------------------\n\nstatic d1::task** const EmptyTaskPool  = nullptr;\nstatic d1::task** const LockedTaskPool = reinterpret_cast<d1::task**>(~std::intptr_t(0));\n\nstruct alignas(max_nfs_size) arena_slot_shared_state {\n    //! Scheduler of the thread attached to the slot\n    /** Marks the slot as busy, and is used to iterate through the schedulers belonging to this arena **/\n    std::atomic<bool> my_is_occupied;\n\n    // Synchronization of access to Task pool\n    /** Also is used to specify if the slot is empty or locked:\n         0 - empty\n        -1 - locked **/\n    std::atomic<d1::task**> task_pool;\n\n    //! Index of the first ready task in the deque.\n    /** Modified by thieves, and by the owner during compaction/reallocation **/\n    std::atomic<std::size_t> head;\n};\n\nstruct alignas(max_nfs_size) arena_slot_private_state {\n    //! Hint provided for operations with the container of starvation-resistant tasks.\n    /** Modified by the owner thread (during these operations). **/\n    unsigned hint_for_fifo_stream;\n\n#if __TBB_PREVIEW_CRITICAL_TASKS\n    //! Similar to 'hint_for_fifo_stream' but for critical tasks.\n    unsigned hint_for_critical_stream;\n#endif\n\n    //! Similar to 'hint_for_fifo_stream' but for the resume tasks.\n    unsigned hint_for_resume_stream;\n\n    //! Index of the element following the last ready task in the deque.\n    /** Modified by the owner thread. **/\n    std::atomic<std::size_t> tail;\n\n    //! Capacity of the primary task pool (number of elements - pointers to task).\n    std::size_t my_task_pool_size;\n\n    //! Task pool of the scheduler that owns this slot\n    // TODO: previously was task**__TBB_atomic, but seems like not accessed on other thread\n    d1::task** task_pool_ptr;\n};\n\nclass arena_slot : private arena_slot_shared_state, private arena_slot_private_state {\n    friend class arena;\n    friend class outermost_worker_waiter;\n    friend class task_dispatcher;\n    friend class thread_data;\n    friend class nested_arena_context;\n\n    //! The original task dispather associated with this slot\n    task_dispatcher* my_default_task_dispatcher;\n\n#if TBB_USE_ASSERT\n    void fill_with_canary_pattern ( std::size_t first, std::size_t last ) {\n        for ( std::size_t i = first; i < last; ++i )\n            poison_pointer(task_pool_ptr[i]);\n    }\n#else\n    void fill_with_canary_pattern ( size_t, std::size_t ) {}\n#endif /* TBB_USE_ASSERT */\n\n    static constexpr std::size_t min_task_pool_size = 64;\n\n    void allocate_task_pool( std::size_t n ) {\n        std::size_t byte_size = ((n * sizeof(d1::task*) + max_nfs_size - 1) / max_nfs_size) * max_nfs_size;\n        my_task_pool_size = byte_size / sizeof(d1::task*);\n        task_pool_ptr = (d1::task**)cache_aligned_allocate(byte_size);\n        // No need to clear the fresh deque since valid items are designated by the head and tail members.\n        // But fill it with a canary pattern in the high vigilance debug mode.\n        fill_with_canary_pattern( 0, my_task_pool_size );\n    }\n\npublic:\n    //! Deallocate task pool that was allocated by means of allocate_task_pool.\n    void free_task_pool( ) {\n        // TODO: understand the assertion and modify\n        // __TBB_ASSERT( !task_pool /* TODO: == EmptyTaskPool */, nullptr);\n        if( task_pool_ptr ) {\n           __TBB_ASSERT( my_task_pool_size, nullptr);\n           cache_aligned_deallocate( task_pool_ptr );\n           task_pool_ptr = nullptr;\n           my_task_pool_size = 0;\n        }\n    }\n\n    //! Get a task from the local pool.\n    /** Called only by the pool owner.\n        Returns the pointer to the task or nullptr if a suitable task is not found.\n        Resets the pool if it is empty. **/\n    d1::task* get_task(execution_data_ext&, isolation_type);\n\n    //! Steal task from slot's ready pool\n    d1::task* steal_task(arena&, isolation_type, std::size_t);\n\n    //! Some thread is now the owner of this slot\n    void occupy() {\n        __TBB_ASSERT(!my_is_occupied.load(std::memory_order_relaxed), nullptr);\n        my_is_occupied.store(true, std::memory_order_release);\n    }\n\n    //! Try to occupy the slot\n    bool try_occupy() {\n        return !is_occupied() && my_is_occupied.exchange(true) == false;\n    }\n\n    //! Some thread is now the owner of this slot\n    void release() {\n        __TBB_ASSERT(my_is_occupied.load(std::memory_order_relaxed), nullptr);\n        my_is_occupied.store(false, std::memory_order_release);\n    }\n\n    //! Spawn newly created tasks\n    void spawn(d1::task& t) {\n        std::size_t T = prepare_task_pool(1);\n        __TBB_ASSERT(is_poisoned(task_pool_ptr[T]), nullptr);\n        task_pool_ptr[T] = &t;\n        commit_spawned_tasks(T + 1);\n        if (!is_task_pool_published()) {\n            publish_task_pool();\n        }\n    }\n\n    bool is_task_pool_published() const {\n        return task_pool.load(std::memory_order_relaxed) != EmptyTaskPool;\n    }\n\n    bool is_empty() const {\n        return task_pool.load(std::memory_order_relaxed) == EmptyTaskPool ||\n               head.load(std::memory_order_relaxed) >= tail.load(std::memory_order_relaxed);\n    }\n\n    bool is_occupied() const {\n        return my_is_occupied.load(std::memory_order_relaxed);\n    }\n\n    task_dispatcher& default_task_dispatcher() {\n        __TBB_ASSERT(my_default_task_dispatcher != nullptr, nullptr);\n        return *my_default_task_dispatcher;\n    }\n\n    void init_task_streams(unsigned h) {\n        hint_for_fifo_stream = h;\n#if __TBB_RESUMABLE_TASKS\n        hint_for_resume_stream = h;\n#endif\n#if __TBB_PREVIEW_CRITICAL_TASKS\n        hint_for_critical_stream = h;\n#endif\n    }\n\n#if __TBB_PREVIEW_CRITICAL_TASKS\n    unsigned& critical_hint() {\n        return hint_for_critical_stream;\n    }\n#endif\nprivate:\n    //! Get a task from the local pool at specified location T.\n    /** Returns the pointer to the task or nullptr if the task cannot be executed,\n        e.g. proxy has been deallocated or isolation constraint is not met.\n        tasks_omitted tells if some tasks have been omitted.\n        Called only by the pool owner. The caller should guarantee that the\n        position T is not available for a thief. **/\n    d1::task* get_task_impl(size_t T, execution_data_ext& ed, bool& tasks_omitted, isolation_type isolation);\n\n    //! Makes sure that the task pool can accommodate at least n more elements\n    /** If necessary relocates existing task pointers or grows the ready task deque.\n     *  Returns (possible updated) tail index (not accounting for n). **/\n    std::size_t prepare_task_pool(std::size_t num_tasks) {\n        std::size_t T = tail.load(std::memory_order_relaxed); // mirror\n        if ( T + num_tasks <= my_task_pool_size ) {\n            return T;\n        }\n\n        std::size_t new_size = num_tasks;\n        if ( !my_task_pool_size ) {\n            __TBB_ASSERT( !is_task_pool_published() && is_quiescent_local_task_pool_reset(), nullptr);\n            __TBB_ASSERT( !task_pool_ptr, nullptr);\n            if ( num_tasks < min_task_pool_size ) new_size = min_task_pool_size;\n            allocate_task_pool( new_size );\n            return 0;\n        }\n        acquire_task_pool();\n        std::size_t H =  head.load(std::memory_order_relaxed); // mirror\n        d1::task** new_task_pool = task_pool_ptr;\n        __TBB_ASSERT( my_task_pool_size >= min_task_pool_size, nullptr);\n        // Count not skipped tasks. Consider using std::count_if.\n        for ( std::size_t i = H; i < T; ++i )\n            if ( new_task_pool[i] ) ++new_size;\n        // If the free space at the beginning of the task pool is too short, we\n        // are likely facing a pathological single-producer-multiple-consumers\n        // scenario, and thus it's better to expand the task pool\n        bool allocate = new_size > my_task_pool_size - min_task_pool_size/4;\n        if ( allocate ) {\n            // Grow task pool. As this operation is rare, and its cost is asymptotically\n            // amortizable, we can tolerate new task pool allocation done under the lock.\n            if ( new_size < 2 * my_task_pool_size )\n                new_size = 2 * my_task_pool_size;\n            allocate_task_pool( new_size ); // updates my_task_pool_size\n        }\n        // Filter out skipped tasks. Consider using std::copy_if.\n        std::size_t T1 = 0;\n        for ( std::size_t i = H; i < T; ++i ) {\n            if ( new_task_pool[i] ) {\n                task_pool_ptr[T1++] = new_task_pool[i];\n            }\n        }\n        // Deallocate the previous task pool if a new one has been allocated.\n        if ( allocate )\n            cache_aligned_deallocate( new_task_pool );\n        else\n            fill_with_canary_pattern( T1, tail );\n        // Publish the new state.\n        commit_relocated_tasks( T1 );\n        // assert_task_pool_valid();\n        return T1;\n    }\n\n    //! Makes newly spawned tasks visible to thieves\n    void commit_spawned_tasks(std::size_t new_tail) {\n        __TBB_ASSERT (new_tail <= my_task_pool_size, \"task deque end was overwritten\");\n        // emit \"task was released\" signal\n        // Release fence is necessary to make sure that previously stored task pointers\n        // are visible to thieves.\n        tail.store(new_tail, std::memory_order_release);\n    }\n\n    //! Used by workers to enter the task pool\n    /** Does not lock the task pool in case if arena slot has been successfully grabbed. **/\n    void publish_task_pool() {\n        __TBB_ASSERT ( task_pool == EmptyTaskPool, \"someone else grabbed my arena slot?\" );\n        __TBB_ASSERT ( head.load(std::memory_order_relaxed) < tail.load(std::memory_order_relaxed),\n                \"entering arena without tasks to share\" );\n        // Release signal on behalf of previously spawned tasks (when this thread was not in arena yet)\n        task_pool.store(task_pool_ptr, std::memory_order_release );\n    }\n\n    //! Locks the local task pool\n    /** Garbles task_pool for the duration of the lock. Requires correctly set task_pool_ptr.\n        ATTENTION: This method is mostly the same as generic_scheduler::lock_task_pool(), with\n        a little different logic of slot state checks (slot is either locked or points\n        to our task pool). Thus if either of them is changed, consider changing the counterpart as well. **/\n    void acquire_task_pool() {\n        if (!is_task_pool_published()) {\n            return; // we are not in arena - nothing to lock\n        }\n        bool sync_prepare_done = false;\n        for( atomic_backoff b;;b.pause() ) {\n#if TBB_USE_ASSERT\n            // Local copy of the arena slot task pool pointer is necessary for the next\n            // assertion to work correctly to exclude asynchronous state transition effect.\n            d1::task** tp = task_pool.load(std::memory_order_relaxed);\n            __TBB_ASSERT( tp == LockedTaskPool || tp == task_pool_ptr, \"slot ownership corrupt?\" );\n#endif\n            d1::task** expected = task_pool_ptr;\n            if( task_pool.load(std::memory_order_relaxed) != LockedTaskPool &&\n                task_pool.compare_exchange_strong(expected, LockedTaskPool ) ) {\n                // We acquired our own slot\n                break;\n            } else if( !sync_prepare_done ) {\n                // Start waiting\n                sync_prepare_done = true;\n            }\n            // Someone else acquired a lock, so pause and do exponential backoff.\n        }\n        __TBB_ASSERT( task_pool.load(std::memory_order_relaxed) == LockedTaskPool, \"not really acquired task pool\" );\n    }\n\n    //! Unlocks the local task pool\n    /** Restores task_pool munged by acquire_task_pool. Requires\n        correctly set task_pool_ptr. **/\n    void release_task_pool() {\n        if ( !(task_pool.load(std::memory_order_relaxed) != EmptyTaskPool) )\n            return; // we are not in arena - nothing to unlock\n        __TBB_ASSERT( task_pool.load(std::memory_order_relaxed) == LockedTaskPool, \"arena slot is not locked\" );\n        task_pool.store( task_pool_ptr, std::memory_order_release );\n    }\n\n    //! Locks victim's task pool, and returns pointer to it. The pointer can be nullptr.\n    /** Garbles victim_arena_slot->task_pool for the duration of the lock. **/\n    d1::task** lock_task_pool() {\n        d1::task** victim_task_pool;\n        for ( atomic_backoff backoff;; /*backoff pause embedded in the loop*/) {\n            victim_task_pool = task_pool.load(std::memory_order_relaxed);\n            // Microbenchmarks demonstrated that aborting stealing attempt when the\n            // victim's task pool is locked degrade performance.\n            // NOTE: Do not use comparison of head and tail indices to check for\n            // the presence of work in the victim's task pool, as they may give\n            // incorrect indication because of task pool relocations and resizes.\n            if (victim_task_pool == EmptyTaskPool) {\n                break;\n            }\n            d1::task** expected = victim_task_pool;\n            if (victim_task_pool != LockedTaskPool && task_pool.compare_exchange_strong(expected, LockedTaskPool) ) {\n                // We've locked victim's task pool\n                break;\n            } \n            // Someone else acquired a lock, so pause and do exponential backoff.\n            backoff.pause();\n        }\n        __TBB_ASSERT(victim_task_pool == EmptyTaskPool ||\n                    (task_pool.load(std::memory_order_relaxed) == LockedTaskPool &&\n                    victim_task_pool != LockedTaskPool), \"not really locked victim's task pool?\");\n        return victim_task_pool;\n    }\n\n    //! Unlocks victim's task pool\n    /** Restores victim_arena_slot->task_pool munged by lock_task_pool. **/\n    void unlock_task_pool(d1::task** victim_task_pool) {\n        __TBB_ASSERT(task_pool.load(std::memory_order_relaxed) == LockedTaskPool, \"victim arena slot is not locked\");\n        __TBB_ASSERT(victim_task_pool != LockedTaskPool, nullptr);\n        task_pool.store(victim_task_pool, std::memory_order_release);\n    }\n\n#if TBB_USE_ASSERT\n    bool is_local_task_pool_quiescent() const {\n        d1::task** tp = task_pool.load(std::memory_order_relaxed);\n        return tp == EmptyTaskPool || tp == LockedTaskPool;\n    }\n\n    bool is_quiescent_local_task_pool_empty() const {\n        __TBB_ASSERT(is_local_task_pool_quiescent(), \"Task pool is not quiescent\");\n        return head.load(std::memory_order_relaxed) == tail.load(std::memory_order_relaxed);\n    }\n\n    bool is_quiescent_local_task_pool_reset() const {\n        __TBB_ASSERT(is_local_task_pool_quiescent(), \"Task pool is not quiescent\");\n        return head.load(std::memory_order_relaxed) == 0 && tail.load(std::memory_order_relaxed) == 0;\n    }\n#endif // TBB_USE_ASSERT\n\n    //! Leave the task pool\n    /** Leaving task pool automatically releases the task pool if it is locked. **/\n    void leave_task_pool() {\n        __TBB_ASSERT(is_task_pool_published(), \"Not in arena\");\n        // Do not reset my_arena_index. It will be used to (attempt to) re-acquire the slot next time\n        __TBB_ASSERT(task_pool.load(std::memory_order_relaxed) == LockedTaskPool, \"Task pool must be locked when leaving arena\");\n        __TBB_ASSERT(is_quiescent_local_task_pool_empty(), \"Cannot leave arena when the task pool is not empty\");\n        // No release fence is necessary here as this assignment precludes external\n        // accesses to the local task pool when becomes visible. Thus it is harmless\n        // if it gets hoisted above preceding local bookkeeping manipulations.\n        task_pool.store(EmptyTaskPool, std::memory_order_relaxed);\n    }\n\n    //! Resets head and tail indices to 0, and leaves task pool\n    /** The task pool must be locked by the owner (via acquire_task_pool).**/\n    void reset_task_pool_and_leave() {\n        __TBB_ASSERT(task_pool.load(std::memory_order_relaxed) == LockedTaskPool, \"Task pool must be locked when resetting task pool\");\n        tail.store(0, std::memory_order_relaxed);\n        head.store(0, std::memory_order_relaxed);\n        leave_task_pool();\n    }\n\n    //! Makes relocated tasks visible to thieves and releases the local task pool.\n    /** Obviously, the task pool must be locked when calling this method. **/\n    void commit_relocated_tasks(std::size_t new_tail) {\n        __TBB_ASSERT(is_local_task_pool_quiescent(), \"Task pool must be locked when calling commit_relocated_tasks()\");\n        head.store(0, std::memory_order_relaxed);\n        // Tail is updated last to minimize probability of a thread making arena\n        // snapshot being misguided into thinking that this task pool is empty.\n        tail.store(new_tail, std::memory_order_release);\n        release_task_pool();\n    }\n};\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_arena_slot_H\n"
  },
  {
    "path": "third-party/tbb/src/tbb/assert_impl.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_assert_impl_H\n#define __TBB_assert_impl_H\n\n#include \"oneapi/tbb/detail/_config.h\"\n#include \"oneapi/tbb/detail/_utils.h\"\n\n#include <cstdio>\n#include <cstdlib>\n#include <cstring>\n#include <cstdarg>\n#if _MSC_VER && _DEBUG\n#include <crtdbg.h>\n#endif\n\n#include <mutex>\n\n#if __TBBMALLOC_BUILD\nnamespace rml { namespace internal {\n#else\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n#endif\n// TODO: consider extension for formatted error description string\nstatic void assertion_failure_impl(const char* location, int line, const char* expression, const char* comment) {\n\n    std::fprintf(stderr, \"Assertion %s failed (located in the %s function, line in file: %d)\\n\",\n        expression, location, line);\n\n    if (comment) {\n        std::fprintf(stderr, \"Detailed description: %s\\n\", comment);\n    }\n#if _MSC_VER && _DEBUG\n    if (1 == _CrtDbgReport(_CRT_ASSERT, location, line, \"tbb_debug.dll\", \"%s\\r\\n%s\", expression, comment?comment:\"\")) {\n        _CrtDbgBreak();\n    } else\n#endif\n    {\n        std::fflush(stderr);\n        std::abort();\n    }\n}\n\n// Do not move the definition into the assertion_failure function because it will require \"magic statics\".\n// It will bring a dependency on C++ runtime on some platforms while assert_impl.h is reused in tbbmalloc \n// that should not depend on C++ runtime\nstatic std::atomic<tbb::detail::do_once_state> assertion_state;\n\nvoid __TBB_EXPORTED_FUNC assertion_failure(const char* location, int line, const char* expression, const char* comment) {\n#if __TBB_MSVC_UNREACHABLE_CODE_IGNORED\n    // Workaround for erroneous \"unreachable code\" during assertion throwing using call_once\n    #pragma warning (push)\n    #pragma warning (disable: 4702)\n#endif\n    // We cannot use std::call_once because it brings a dependency on C++ runtime on some platforms \n    // while assert_impl.h is reused in tbbmalloc that should not depend on C++ runtime\n    atomic_do_once([&](){ assertion_failure_impl(location, line, expression, comment); }, assertion_state);\n#if __TBB_MSVC_UNREACHABLE_CODE_IGNORED\n    #pragma warning (pop)\n#endif\n}\n\n//! Report a runtime warning.\nvoid runtime_warning( const char* format, ... ) {\n    char str[1024]; std::memset(str, 0, 1024);\n    va_list args; va_start(args, format);\n    vsnprintf( str, 1024-1, format, args);\n    va_end(args);\n    fprintf(stderr, \"TBB Warning: %s\\n\", str);\n}\n\n#if __TBBMALLOC_BUILD\n}} // namespaces rml::internal\n#else\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n#endif\n\n#endif // __TBB_assert_impl_H\n\n"
  },
  {
    "path": "third-party/tbb/src/tbb/cancellation_disseminator.h",
    "content": "/*\n    Copyright (c) 2022-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_cancellation_disseminator_H\n#define _TBB_cancellation_disseminator_H\n\n#include \"oneapi/tbb/mutex.h\"\n#include \"oneapi/tbb/task_group.h\"\n\n#include \"intrusive_list.h\"\n#include \"thread_data.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nclass cancellation_disseminator {\npublic:\n    //! Finds all contexts affected by the state change and propagates the new state to them.\n    /*  The propagation is relayed to the cancellation_disseminator because tasks created by one\n        external thread can be passed to and executed by other external threads. This means\n        that context trees can span several arenas at once and thus state change\n        propagation cannot be generally localized to one arena only.\n    */\n    bool propagate_task_group_state(std::atomic<uint32_t> d1::task_group_context::*mptr_state, d1::task_group_context& src, uint32_t new_state) {\n        if (src.my_may_have_children.load(std::memory_order_relaxed) != d1::task_group_context::may_have_children) {\n            return true;\n        }\n\n        // The whole propagation algorithm is under the lock in order to ensure correctness\n        // in case of concurrent state changes at the different levels of the context tree.\n        threads_list_mutex_type::scoped_lock lock(my_threads_list_mutex);\n        // TODO: consider to use double-check idiom\n        if ((src.*mptr_state).load(std::memory_order_relaxed) != new_state) {\n            // Another thread has concurrently changed the state. Back down.\n            return false;\n        }\n\n        // Advance global state propagation epoch\n        ++the_context_state_propagation_epoch;\n        // Propagate to all workers and external threads and sync up their local epochs with the global one\n        // The whole propagation sequence is locked, thus no contention is expected\n        for (auto& thr_data : my_threads_list) {\n            thr_data.propagate_task_group_state(mptr_state, src, new_state);\n        }\n\n        return true;\n    }\n\n    void register_thread(thread_data& td) {\n        threads_list_mutex_type::scoped_lock lock(my_threads_list_mutex);\n        my_threads_list.push_front(td);\n    }\n\n    void unregister_thread(thread_data& td) {\n        threads_list_mutex_type::scoped_lock lock(my_threads_list_mutex);\n        my_threads_list.remove(td);\n    }\n\nprivate:\n    using thread_data_list_type = intrusive_list<thread_data>;\n    using threads_list_mutex_type = d1::mutex;\n\n    threads_list_mutex_type my_threads_list_mutex;\n    thread_data_list_type my_threads_list;\n};\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif // _TBB_cancellation_disseminator_H\n"
  },
  {
    "path": "third-party/tbb/src/tbb/co_context.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_co_context_H\n#define _TBB_co_context_H\n\n#include \"oneapi/tbb/detail/_config.h\"\n\n#if __TBB_RESUMABLE_TASKS\n\n#include <cstddef>\n#include <cstdint>\n\n#if __TBB_RESUMABLE_TASKS_USE_THREADS\n\n#if _WIN32 || _WIN64\n#include <windows.h>\n#else\n#include <pthread.h>\n#endif\n\n#include <condition_variable>\n#include \"governor.h\"\n\n#elif _WIN32 || _WIN64\n#include <windows.h>\n#else\n// ucontext.h API is deprecated since macOS 10.6\n#if __APPLE__\n    #if __INTEL_COMPILER\n        #pragma warning(push)\n        #pragma warning(disable:1478)\n    #elif __clang__\n        #pragma clang diagnostic push\n        #pragma clang diagnostic ignored \"-Wdeprecated-declarations\"\n    #endif\n#endif // __APPLE__\n\n#include <ucontext.h>\n#include <sys/mman.h> // mprotect\n\n#include \"governor.h\" // default_page_size()\n\n#ifndef MAP_STACK\n// macOS* does not define MAP_STACK\n#define MAP_STACK 0\n#endif\n#ifndef MAP_ANONYMOUS\n// macOS* defines MAP_ANON, which is deprecated in Linux*.\n#define MAP_ANONYMOUS MAP_ANON\n#endif\n#endif // _WIN32 || _WIN64\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n#if __TBB_RESUMABLE_TASKS_USE_THREADS\n    struct coroutine_type {\n#if _WIN32 || _WIN64\n        using handle_type = HANDLE;\n#else\n        using handle_type = pthread_t;\n#endif\n\n        handle_type my_thread;\n        std::condition_variable my_condvar;\n        std::mutex my_mutex;\n        thread_data* my_thread_data{ nullptr };\n        bool my_is_active{ true };\n    };\n#elif _WIN32 || _WIN64\n    typedef LPVOID coroutine_type;\n#else\n    struct coroutine_type {\n        coroutine_type() : my_context(), my_stack(), my_stack_size() {}\n        ucontext_t my_context;\n        void* my_stack;\n        std::size_t my_stack_size;\n    };\n#endif\n\n    // Forward declaration of the coroutine API.\n    void create_coroutine(coroutine_type& c, std::size_t stack_size, void* arg);\n    void current_coroutine(coroutine_type& c);\n    void swap_coroutine(coroutine_type& prev_coroutine, coroutine_type& new_coroutine);\n    void destroy_coroutine(coroutine_type& c);\n\nclass co_context {\n    enum co_state {\n        co_invalid,\n        co_suspended,\n        co_executing,\n        co_destroyed\n    };\n    coroutine_type      my_coroutine;\n    co_state            my_state;\n\npublic:\n    co_context(std::size_t stack_size, void* arg)\n        : my_state(stack_size ? co_suspended : co_executing)\n    {\n        if (stack_size) {\n            __TBB_ASSERT(arg != nullptr, nullptr);\n            create_coroutine(my_coroutine, stack_size, arg);\n        } else {\n            current_coroutine(my_coroutine);\n        }\n    }\n\n    ~co_context() {\n        __TBB_ASSERT(1 << my_state & (1 << co_suspended | 1 << co_executing), nullptr);\n        if (my_state == co_suspended) {\n#if __TBB_RESUMABLE_TASKS_USE_THREADS\n            my_state = co_executing;\n#endif\n            destroy_coroutine(my_coroutine);\n        }\n        my_state = co_destroyed;\n    }\n\n    void resume(co_context& target) {\n        // Do not create non-trivial objects on the stack of this function. They might never be destroyed.\n        __TBB_ASSERT(my_state == co_executing, nullptr);\n        __TBB_ASSERT(target.my_state == co_suspended, nullptr);\n\n        my_state = co_suspended;\n        target.my_state = co_executing;\n\n        // 'target' can reference an invalid object after swap_coroutine. Do not access it.\n        swap_coroutine(my_coroutine, target.my_coroutine);\n\n        __TBB_ASSERT(my_state == co_executing, nullptr);\n    }\n};\n\n#if _WIN32 || _WIN64\n/* [[noreturn]] */ void __stdcall co_local_wait_for_all(void* arg) noexcept;\n#else\n/* [[noreturn]] */ void co_local_wait_for_all(unsigned hi, unsigned lo) noexcept;\n#endif\n\n#if __TBB_RESUMABLE_TASKS_USE_THREADS\nvoid handle_perror(int error_code, const char* what);\n\ninline void check(int error_code, const char* routine) {\n    if (error_code) {\n        handle_perror(error_code, routine);\n    }\n}\n\nusing thread_data_t = std::pair<coroutine_type&, void*&>;\n\n#if _WIN32 || _WIN64\ninline unsigned WINAPI coroutine_thread_func(void* d)\n#else\ninline void* coroutine_thread_func(void* d)\n#endif\n{\n    thread_data_t& data = *static_cast<thread_data_t*>(d);\n    coroutine_type& c = data.first;\n    void* arg = data.second;\n    {\n        std::unique_lock<std::mutex> lock(c.my_mutex);\n        __TBB_ASSERT(c.my_thread_data == nullptr, nullptr);\n        c.my_is_active = false;\n\n        // We read the data notify the waiting thread\n        data.second = nullptr;\n        c.my_condvar.notify_one();\n\n        c.my_condvar.wait(lock, [&c] { return c.my_is_active == true; });\n    }\n    __TBB_ASSERT(c.my_thread_data != nullptr, nullptr);\n    governor::set_thread_data(*c.my_thread_data);\n\n#if _WIN32 || _WIN64\n    co_local_wait_for_all(arg);\n\n    return 0;\n#else\n    std::uintptr_t addr = std::uintptr_t(arg);\n    unsigned lo = unsigned(addr);\n    unsigned hi = unsigned(std::uint64_t(addr) >> 32);\n    __TBB_ASSERT(sizeof(addr) == 8 || hi == 0, nullptr);\n\n    co_local_wait_for_all(hi, lo);\n\n    return nullptr;\n#endif\n};\n\ninline void create_coroutine(coroutine_type& c, std::size_t stack_size, void* arg) {\n    thread_data_t data{ c, arg };\n\n#if _WIN32 || _WIN64\n    c.my_thread = (HANDLE)_beginthreadex(nullptr, unsigned(stack_size), coroutine_thread_func, &data, STACK_SIZE_PARAM_IS_A_RESERVATION, nullptr);\n    if (!c.my_thread) {\n        handle_perror(0, \"create_coroutine: _beginthreadex failed\\n\");\n    }\n#else\n    pthread_attr_t s;\n    check(pthread_attr_init(&s), \"pthread_attr_init has failed\");\n    if (stack_size > 0) {\n        check(pthread_attr_setstacksize(&s, stack_size), \"pthread_attr_setstack_size has failed\");\n    }\n    check(pthread_create(&c.my_thread, &s, coroutine_thread_func, &data), \"pthread_create has failed\");\n    check(pthread_attr_destroy(&s), \"pthread_attr_destroy has failed\");\n#endif\n\n    // Wait for the just created thread to read the data\n    std::unique_lock<std::mutex> lock(c.my_mutex);\n    c.my_condvar.wait(lock, [&arg] { return arg == nullptr; });\n}\n\ninline void current_coroutine(coroutine_type& c) {\n#if _WIN32 || _WIN64\n    c.my_thread = GetCurrentThread();\n#else\n    c.my_thread = pthread_self();\n#endif\n}\n\ninline void swap_coroutine(coroutine_type& prev_coroutine, coroutine_type& new_coroutine) {\n    thread_data* td = governor::get_thread_data();\n    __TBB_ASSERT(prev_coroutine.my_is_active == true, \"The current thread should be active\");\n\n    // Detach our state before notification other thread\n    // (because we might be notified just after other thread notification)\n    prev_coroutine.my_thread_data = nullptr;\n    prev_coroutine.my_is_active = false;\n    governor::clear_thread_data();\n\n    {\n        std::unique_lock<std::mutex> lock(new_coroutine.my_mutex);\n        __TBB_ASSERT(new_coroutine.my_is_active == false, \"The sleeping thread should not be active\");\n        __TBB_ASSERT(new_coroutine.my_thread_data == nullptr, \"The sleeping thread should not be active\");\n\n        new_coroutine.my_thread_data = td;\n        new_coroutine.my_is_active = true;\n        new_coroutine.my_condvar.notify_one();\n    }\n\n    std::unique_lock<std::mutex> lock(prev_coroutine.my_mutex);\n    prev_coroutine.my_condvar.wait(lock, [&prev_coroutine] { return prev_coroutine.my_is_active == true; });\n    __TBB_ASSERT(governor::get_thread_data() != nullptr, nullptr);\n    governor::set_thread_data(*prev_coroutine.my_thread_data);\n}\n\ninline void destroy_coroutine(coroutine_type& c) {\n    {\n        std::unique_lock<std::mutex> lock(c.my_mutex);\n        __TBB_ASSERT(c.my_thread_data == nullptr, \"The sleeping thread should not be active\");\n        __TBB_ASSERT(c.my_is_active == false, \"The sleeping thread should not be active\");\n        c.my_is_active = true;\n        c.my_condvar.notify_one();\n    }\n#if _WIN32 || _WIN64\n    WaitForSingleObject(c.my_thread, INFINITE);\n    CloseHandle(c.my_thread);\n#else\n    check(pthread_join(c.my_thread, nullptr), \"pthread_join has failed\");\n#endif\n}\n#elif _WIN32 || _WIN64\ninline void create_coroutine(coroutine_type& c, std::size_t stack_size, void* arg) {\n    __TBB_ASSERT(arg, nullptr);\n    c = CreateFiber(stack_size, co_local_wait_for_all, arg);\n    __TBB_ASSERT(c, nullptr);\n}\n\ninline void current_coroutine(coroutine_type& c) {\n    c = IsThreadAFiber() ? GetCurrentFiber() :\n        ConvertThreadToFiberEx(nullptr, FIBER_FLAG_FLOAT_SWITCH);\n    __TBB_ASSERT(c, nullptr);\n}\n\ninline void swap_coroutine(coroutine_type& prev_coroutine, coroutine_type& new_coroutine) {\n    if (!IsThreadAFiber()) {\n        ConvertThreadToFiberEx(nullptr, FIBER_FLAG_FLOAT_SWITCH);\n    }\n    __TBB_ASSERT(new_coroutine, nullptr);\n    prev_coroutine = GetCurrentFiber();\n    __TBB_ASSERT(prev_coroutine, nullptr);\n    SwitchToFiber(new_coroutine);\n}\n\ninline void destroy_coroutine(coroutine_type& c) {\n    __TBB_ASSERT(c, nullptr);\n    DeleteFiber(c);\n}\n#else // !(_WIN32 || _WIN64)\n\ninline void create_coroutine(coroutine_type& c, std::size_t stack_size, void* arg) {\n    const std::size_t REG_PAGE_SIZE = governor::default_page_size();\n    const std::size_t page_aligned_stack_size = (stack_size + (REG_PAGE_SIZE - 1)) & ~(REG_PAGE_SIZE - 1);\n    const std::size_t protected_stack_size = page_aligned_stack_size + 2 * REG_PAGE_SIZE;\n\n    // Allocate the stack with protection property\n    std::uintptr_t stack_ptr = (std::uintptr_t)mmap(nullptr, protected_stack_size, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK, -1, 0);\n    __TBB_ASSERT((void*)stack_ptr != MAP_FAILED, nullptr);\n\n    // Allow read write on our stack (guarded pages are still protected)\n    int err = mprotect((void*)(stack_ptr + REG_PAGE_SIZE), page_aligned_stack_size, PROT_READ | PROT_WRITE);\n    __TBB_ASSERT_EX(!err, nullptr);\n\n    // Remember the stack state\n    c.my_stack = (void*)(stack_ptr + REG_PAGE_SIZE);\n    c.my_stack_size = page_aligned_stack_size;\n\n    err = getcontext(&c.my_context);\n    __TBB_ASSERT_EX(!err, nullptr);\n\n    c.my_context.uc_link = nullptr;\n    // cast to char* to disable FreeBSD clang-3.4.1 'incompatible type' error\n    c.my_context.uc_stack.ss_sp = (char*)c.my_stack;\n    c.my_context.uc_stack.ss_size = c.my_stack_size;\n    c.my_context.uc_stack.ss_flags = 0;\n\n    typedef void(*coroutine_func_t)();\n\n    std::uintptr_t addr = std::uintptr_t(arg);\n    unsigned lo = unsigned(addr);\n    unsigned hi = unsigned(std::uint64_t(addr) >> 32);\n    __TBB_ASSERT(sizeof(addr) == 8 || hi == 0, nullptr);\n\n    makecontext(&c.my_context, (coroutine_func_t)co_local_wait_for_all, 2, hi, lo);\n}\n\ninline void current_coroutine(coroutine_type& c) {\n    int err = getcontext(&c.my_context);\n    __TBB_ASSERT_EX(!err, nullptr);\n}\n\ninline void swap_coroutine(coroutine_type& prev_coroutine, coroutine_type& new_coroutine) {\n    int err = swapcontext(&prev_coroutine.my_context, &new_coroutine.my_context);\n    __TBB_ASSERT_EX(!err, nullptr);\n}\n\ninline void destroy_coroutine(coroutine_type& c) {\n    const std::size_t REG_PAGE_SIZE = governor::default_page_size();\n    // Free stack memory with guarded pages\n    munmap((void*)((std::uintptr_t)c.my_stack - REG_PAGE_SIZE), c.my_stack_size + 2 * REG_PAGE_SIZE);\n    // Clear the stack state afterwards\n    c.my_stack = nullptr;\n    c.my_stack_size = 0;\n}\n\n#if __APPLE__\n    #if __INTEL_COMPILER\n        #pragma warning(pop) // 1478 warning\n    #elif __clang__\n        #pragma clang diagnostic pop // \"-Wdeprecated-declarations\"\n    #endif\n#endif\n\n#endif // _WIN32 || _WIN64\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /* __TBB_RESUMABLE_TASKS */\n\n#endif /* _TBB_co_context_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/concurrent_bounded_queue.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/detail/_utils.h\"\n#include \"oneapi/tbb/concurrent_queue.h\"\n#include \"oneapi/tbb/cache_aligned_allocator.h\"\n#include \"concurrent_monitor.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nstatic constexpr std::size_t monitors_number = 2;\n\nstd::uint8_t* __TBB_EXPORTED_FUNC allocate_bounded_queue_rep( std::size_t queue_rep_size )\n{\n    std::size_t monitors_mem_size = sizeof(concurrent_monitor) * monitors_number;\n    std::uint8_t* mem = static_cast<std::uint8_t*>(cache_aligned_allocate(queue_rep_size + monitors_mem_size));\n\n    concurrent_monitor* monitors = reinterpret_cast<concurrent_monitor*>(mem + queue_rep_size);\n    for (std::size_t i = 0; i < monitors_number; ++i) {\n        new (monitors + i) concurrent_monitor();\n    }\n\n    return mem;\n}\n\nvoid __TBB_EXPORTED_FUNC deallocate_bounded_queue_rep( std::uint8_t* mem, std::size_t queue_rep_size )\n{\n    concurrent_monitor* monitors = reinterpret_cast<concurrent_monitor*>(mem + queue_rep_size);\n    for (std::size_t i = 0; i < monitors_number; ++i) {\n        monitors[i].~concurrent_monitor();\n    }\n\n    cache_aligned_deallocate(mem);\n}\n\nvoid __TBB_EXPORTED_FUNC wait_bounded_queue_monitor( concurrent_monitor* monitors, std::size_t monitor_tag,\n                                                        std::ptrdiff_t target, d1::delegate_base& predicate )\n{\n    __TBB_ASSERT(monitor_tag < monitors_number, nullptr);\n    concurrent_monitor& monitor = monitors[monitor_tag];\n\n    monitor.wait<concurrent_monitor::thread_context>([&] { return !predicate(); }, std::uintptr_t(target));\n}\n\nvoid __TBB_EXPORTED_FUNC abort_bounded_queue_monitors( concurrent_monitor* monitors ) {\n    concurrent_monitor& items_avail = monitors[d2::cbq_items_avail_tag];\n    concurrent_monitor& slots_avail = monitors[d2::cbq_slots_avail_tag];\n\n    items_avail.abort_all();\n    slots_avail.abort_all();\n}\n\nstruct predicate_leq {\n    std::size_t my_ticket;\n    predicate_leq( std::size_t ticket ) : my_ticket(ticket) {}\n    bool operator() ( std::uintptr_t ticket ) const { return static_cast<std::size_t>(ticket) <= my_ticket; }\n};\n\nvoid __TBB_EXPORTED_FUNC notify_bounded_queue_monitor( concurrent_monitor* monitors,\n                                                               std::size_t monitor_tag, std::size_t ticket)\n{\n    __TBB_ASSERT(monitor_tag < monitors_number, nullptr);\n    concurrent_monitor& monitor = monitors[monitor_tag];\n    monitor.notify(predicate_leq(ticket));\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/concurrent_monitor.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_concurrent_monitor_H\n#define __TBB_concurrent_monitor_H\n\n#include \"oneapi/tbb/spin_mutex.h\"\n#include \"oneapi/tbb/detail/_exception.h\"\n#include \"oneapi/tbb/detail/_aligned_space.h\"\n#include \"concurrent_monitor_mutex.h\"\n#include \"semaphore.h\"\n\n#include <atomic>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n//! Circular doubly-linked list with sentinel\n/** head.next points to the front and head.prev points to the back */\nclass circular_doubly_linked_list_with_sentinel {\npublic:\n    struct base_node {\n        base_node* next;\n        base_node* prev;\n\n        constexpr base_node(base_node* n, base_node* p) : next(n), prev(p) {}\n        explicit base_node() : next((base_node*)(uintptr_t)0xcdcdcdcd), prev((base_node*)(uintptr_t)0xcdcdcdcd) {}\n    };\n\n    // ctor\n    constexpr circular_doubly_linked_list_with_sentinel() : count(0), head(&head, &head) {}\n\n    circular_doubly_linked_list_with_sentinel(const circular_doubly_linked_list_with_sentinel&) = delete;\n    circular_doubly_linked_list_with_sentinel& operator=(const circular_doubly_linked_list_with_sentinel&) = delete;\n\n    inline std::size_t size() const { return count.load(std::memory_order_relaxed); }\n    inline bool empty() const { return size() == 0; }\n    inline base_node* front() const { return head.next; }\n    inline base_node* last() const { return head.prev; }\n    inline const base_node* end() const { return &head; }\n\n    //! add to the back of the list\n    inline void add( base_node* n ) {\n        count.store(count.load(std::memory_order_relaxed) + 1, std::memory_order_relaxed);\n        n->prev = head.prev;\n        n->next = &head;\n        head.prev->next = n;\n        head.prev = n;\n    }\n\n    //! remove node 'n'\n    inline void remove( base_node& n ) {\n        __TBB_ASSERT(count.load(std::memory_order_relaxed) > 0, \"attempt to remove an item from an empty list\");\n        count.store(count.load( std::memory_order_relaxed ) - 1, std::memory_order_relaxed);\n        n.prev->next = n.next;\n        n.next->prev = n.prev;\n    }\n\n    //! move all elements to 'lst' and initialize the 'this' list\n    inline void flush_to( circular_doubly_linked_list_with_sentinel& lst ) {\n        const std::size_t l_count = size();\n        if (l_count > 0) {\n            lst.count.store(l_count, std::memory_order_relaxed);\n            lst.head.next = head.next;\n            lst.head.prev = head.prev;\n            head.next->prev = &lst.head;\n            head.prev->next = &lst.head;\n            clear();\n        }\n    }\n\n    void clear() {\n        head.next = &head;\n        head.prev = &head;\n        count.store(0, std::memory_order_relaxed);\n    }\nprivate:\n    std::atomic<std::size_t> count;\n    base_node head;\n};\n\nusing base_list = circular_doubly_linked_list_with_sentinel;\nusing base_node = circular_doubly_linked_list_with_sentinel::base_node;\n\ntemplate <typename Context>\nclass concurrent_monitor_base;\n\ntemplate <typename Context>\nclass wait_node : public base_node {\npublic:\n\n#if __TBB_GLIBCXX_VERSION >= 40800 && __TBB_GLIBCXX_VERSION < 40900\n    wait_node(Context ctx) : my_context(ctx), my_is_in_list(false) {}\n#else\n    wait_node(Context ctx) : my_context(ctx) {}\n#endif\n\n    virtual ~wait_node() = default;\n\n    virtual void init() {\n        __TBB_ASSERT(!my_initialized, nullptr);\n        my_initialized = true;\n    }\n\n    virtual void wait() = 0;\n\n    virtual void reset() {\n        __TBB_ASSERT(my_skipped_wakeup, nullptr);\n        my_skipped_wakeup = false;\n    }\n\n    virtual void notify() = 0;\n\nprotected:\n    friend class concurrent_monitor_base<Context>;\n    friend class thread_data;\n\n    Context my_context{};\n#if __TBB_GLIBCXX_VERSION >= 40800 && __TBB_GLIBCXX_VERSION < 40900\n    std::atomic<bool> my_is_in_list;\n#else\n    std::atomic<bool> my_is_in_list{false};\n#endif\n\n    bool my_initialized{false};\n    bool my_skipped_wakeup{false};\n    bool my_aborted{false};\n    unsigned my_epoch{0};\n};\n\ntemplate <typename Context>\nclass sleep_node : public wait_node<Context> {\n    using base_type = wait_node<Context>;\npublic:\n    using base_type::base_type;\n\n    ~sleep_node() override {\n        if (this->my_initialized) {\n            if (this->my_skipped_wakeup) semaphore().P();\n            semaphore().~binary_semaphore();\n        }\n    }\n\n    binary_semaphore& semaphore() { return *sema.begin(); }\n\n    void init() override {\n        if (!this->my_initialized) {\n            new (sema.begin()) binary_semaphore;\n            base_type::init();\n        }\n    }\n\n    void wait() override {\n        __TBB_ASSERT(this->my_initialized,\n            \"Use of commit_wait() without prior prepare_wait()\");\n        semaphore().P();\n        __TBB_ASSERT(!this->my_is_in_list.load(std::memory_order_relaxed), \"Still in the queue?\");\n        if (this->my_aborted)\n            throw_exception(exception_id::user_abort);\n    }\n\n    void reset() override {\n        base_type::reset();\n        semaphore().P();\n    }\n\n    void notify() override {\n        semaphore().V();\n    }\n\nprivate:\n    tbb::detail::aligned_space<binary_semaphore> sema;\n};\n\n//! concurrent_monitor\n/** fine-grained concurrent_monitor implementation */\ntemplate <typename Context>\nclass concurrent_monitor_base {\npublic:\n    //! ctor\n    constexpr concurrent_monitor_base() {}\n    //! dtor\n    ~concurrent_monitor_base() = default;\n\n    concurrent_monitor_base(const concurrent_monitor_base&) = delete;\n    concurrent_monitor_base& operator=(const concurrent_monitor_base&) = delete;\n\n    //! prepare wait by inserting 'thr' into the wait queue\n    void prepare_wait( wait_node<Context>& node) {\n        // TODO: consider making even more lazy instantiation of the semaphore, that is only when it is actually needed, e.g. move it in node::wait()\n        if (!node.my_initialized) {\n            node.init();\n        }\n        // this is good place to pump previous skipped wakeup\n        else if (node.my_skipped_wakeup) {\n            node.reset();\n        }\n\n        node.my_is_in_list.store(true, std::memory_order_relaxed);\n\n        {\n            concurrent_monitor_mutex::scoped_lock l(my_mutex);\n            node.my_epoch = my_epoch.load(std::memory_order_relaxed);\n            my_waitset.add(&node);\n        }\n\n        // Prepare wait guarantees Write Read memory barrier.\n        // In C++ only full fence covers this type of barrier.\n        atomic_fence_seq_cst();\n    }\n\n    //! Commit wait if event count has not changed; otherwise, cancel wait.\n    /** Returns true if committed, false if canceled. */\n    inline bool commit_wait( wait_node<Context>& node ) {\n        const bool do_it = node.my_epoch == my_epoch.load(std::memory_order_relaxed);\n        // this check is just an optimization\n        if (do_it) {\n           node.wait();\n        } else {\n            cancel_wait( node );\n        }\n        return do_it;\n    }\n\n    //! Cancel the wait. Removes the thread from the wait queue if not removed yet.\n    void cancel_wait( wait_node<Context>& node ) {\n        // possible skipped wakeup will be pumped in the following prepare_wait()\n        node.my_skipped_wakeup = true;\n        // try to remove node from waitset\n        // Cancel wait guarantees acquire memory barrier.\n        bool in_list = node.my_is_in_list.load(std::memory_order_acquire);\n        if (in_list) {\n            concurrent_monitor_mutex::scoped_lock l(my_mutex);\n            if (node.my_is_in_list.load(std::memory_order_relaxed)) {\n                my_waitset.remove(node);\n                // node is removed from waitset, so there will be no wakeup\n                node.my_is_in_list.store(false, std::memory_order_relaxed);\n                node.my_skipped_wakeup = false;\n            }\n        }\n    }\n\n    //! Wait for a condition to be satisfied with waiting-on my_context\n    template <typename NodeType, typename Pred>\n    bool wait(Pred&& pred, NodeType&& node) {\n        prepare_wait(node);\n        while (!guarded_call(std::forward<Pred>(pred), node)) {\n            if (commit_wait(node)) {\n                return true;\n            }\n\n            prepare_wait(node);\n        }\n\n        cancel_wait(node);\n        return false;\n    }\n\n    //! Notify one thread about the event\n    void notify_one() {\n        atomic_fence_seq_cst();\n        notify_one_relaxed();\n    }\n\n    //! Notify one thread about the event. Relaxed version.\n    void notify_one_relaxed() {\n        if (my_waitset.empty()) {\n            return;\n        }\n\n        base_node* n;\n        const base_node* end = my_waitset.end();\n        {\n            concurrent_monitor_mutex::scoped_lock l(my_mutex);\n            my_epoch.store(my_epoch.load(std::memory_order_relaxed) + 1, std::memory_order_relaxed);\n            n = my_waitset.front();\n            if (n != end) {\n                my_waitset.remove(*n);\n\n// GCC 12.x-14.x issues a warning here that to_wait_node(n)->my_is_in_list might have size 0, since n is\n// a base_node pointer. (This cannot happen, because only wait_node pointers are added to my_waitset.)\n#if (__TBB_GCC_VERSION >= 120100 && __TBB_GCC_VERSION < 150000 ) && !__clang__ && !__INTEL_COMPILER\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wstringop-overflow\"\n#endif\n                to_wait_node(n)->my_is_in_list.store(false, std::memory_order_relaxed);\n#if (__TBB_GCC_VERSION >= 120100 && __TBB_GCC_VERSION < 150000 ) && !__clang__ && !__INTEL_COMPILER\n#pragma GCC diagnostic pop\n#endif\n            }\n        }\n\n        if (n != end) {\n            to_wait_node(n)->notify();\n        }\n    }\n\n    //! Notify all waiting threads of the event\n    void notify_all() {\n        atomic_fence_seq_cst();\n        notify_all_relaxed();\n    }\n\n    // ! Notify all waiting threads of the event; Relaxed version\n    void notify_all_relaxed() {\n        if (my_waitset.empty()) {\n            return;\n        }\n\n        base_list temp;\n        const base_node* end;\n        {\n            concurrent_monitor_mutex::scoped_lock l(my_mutex);\n            my_epoch.store(my_epoch.load(std::memory_order_relaxed) + 1, std::memory_order_relaxed);\n            // TODO: Possible optimization, don't change node state under lock, just do flush\n            my_waitset.flush_to(temp);\n            end = temp.end();\n            for (base_node* n = temp.front(); n != end; n = n->next) {\n                to_wait_node(n)->my_is_in_list.store(false, std::memory_order_relaxed);\n            }\n        }\n\n        base_node* nxt;\n        for (base_node* n = temp.front(); n != end; n=nxt) {\n            nxt = n->next;\n            to_wait_node(n)->notify();\n        }\n#if TBB_USE_ASSERT\n        temp.clear();\n#endif\n    }\n\n    //! Notify waiting threads of the event that satisfies the given predicate\n    template <typename P>\n    void notify( const P& predicate ) {\n        atomic_fence_seq_cst();\n        notify_relaxed( predicate );\n    }\n\n    //! Notify waiting threads of the event that satisfies the given predicate;\n    //! the predicate is called under the lock. Relaxed version.\n    template<typename P>\n    void notify_relaxed( const P& predicate ) {\n        if (my_waitset.empty()) {\n            return;\n        }\n\n        base_list temp;\n        base_node* nxt;\n        const base_node* end = my_waitset.end();\n        {\n            concurrent_monitor_mutex::scoped_lock l(my_mutex);\n            my_epoch.store(my_epoch.load( std::memory_order_relaxed ) + 1, std::memory_order_relaxed);\n            for (base_node* n = my_waitset.last(); n != end; n = nxt) {\n                nxt = n->prev;\n                auto* node = static_cast<wait_node<Context>*>(n);\n                if (predicate(node->my_context)) {\n                    my_waitset.remove(*n);\n                    node->my_is_in_list.store(false, std::memory_order_relaxed);\n                    temp.add(n);\n                }\n            }\n        }\n\n        end = temp.end();\n        for (base_node* n=temp.front(); n != end; n = nxt) {\n            nxt = n->next;\n            to_wait_node(n)->notify();\n        }\n#if TBB_USE_ASSERT\n        temp.clear();\n#endif\n    }\n\n    //! Notify waiting threads of the event that satisfies the given predicate;\n    //! the predicate is called under the lock. Relaxed version.\n    template<typename P>\n    void notify_one_relaxed( const P& predicate ) {\n        if (my_waitset.empty()) {\n            return;\n        }\n\n        base_node* tmp = nullptr;\n        base_node* next{};\n        const base_node* end = my_waitset.end();\n        {\n            concurrent_monitor_mutex::scoped_lock l(my_mutex);\n            my_epoch.store(my_epoch.load( std::memory_order_relaxed ) + 1, std::memory_order_relaxed);\n            for (base_node* n = my_waitset.last(); n != end; n = next) {\n                next = n->prev;\n                auto* node = static_cast<wait_node<Context>*>(n);\n                if (predicate(node->my_context)) {\n                    my_waitset.remove(*n);\n                    node->my_is_in_list.store(false, std::memory_order_relaxed);\n                    tmp = n;\n                    break;\n                }\n            }\n        }\n\n        if (tmp) {\n            to_wait_node(tmp)->notify();\n        }\n    }\n\n    //! Abort any sleeping threads at the time of the call\n    void abort_all() {\n        atomic_fence_seq_cst();\n        abort_all_relaxed();\n    }\n\n    //! Abort any sleeping threads at the time of the call; Relaxed version\n    void abort_all_relaxed() {\n        if (my_waitset.empty()) {\n            return;\n        }\n\n        base_list temp;\n        const base_node* end;\n        {\n            concurrent_monitor_mutex::scoped_lock l(my_mutex);\n            my_epoch.store(my_epoch.load(std::memory_order_relaxed) + 1, std::memory_order_relaxed);\n            my_waitset.flush_to(temp);\n            end = temp.end();\n            for (base_node* n = temp.front(); n != end; n = n->next) {\n                to_wait_node(n)->my_is_in_list.store(false, std::memory_order_relaxed);\n            }\n        }\n\n        base_node* nxt;\n        for (base_node* n = temp.front(); n != end; n = nxt) {\n            nxt = n->next;\n            to_wait_node(n)->my_aborted = true;\n            to_wait_node(n)->notify();\n        }\n#if TBB_USE_ASSERT\n        temp.clear();\n#endif\n    }\n\n    void destroy() {\n        this->abort_all();\n        my_mutex.destroy();\n        __TBB_ASSERT(this->my_waitset.empty(), \"waitset not empty?\");\n    }\n\nprivate:\n    template <typename NodeType, typename Pred>\n    bool guarded_call(Pred&& predicate, NodeType& node) {\n        bool res = false;\n        tbb::detail::d0::try_call( [&] {\n            res = std::forward<Pred>(predicate)();\n        }).on_exception( [&] {\n            cancel_wait(node);\n        });\n\n        return res;\n    }\n\n    concurrent_monitor_mutex my_mutex{};\n    base_list my_waitset{};\n    std::atomic<unsigned> my_epoch{};\n\n    wait_node<Context>* to_wait_node( base_node* node ) { return static_cast<wait_node<Context>*>(node); }\n};\n\nclass concurrent_monitor : public concurrent_monitor_base<std::uintptr_t> {\n    using base_type = concurrent_monitor_base<std::uintptr_t>;\npublic:\n    using base_type::base_type;\n\n    ~concurrent_monitor() {\n        destroy();\n    }\n\n    /** per-thread descriptor for concurrent_monitor */\n    using thread_context = sleep_node<std::uintptr_t>;\n};\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /* __TBB_concurrent_monitor_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/concurrent_monitor_mutex.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_monitor_mutex_H\n#define __TBB_monitor_mutex_H\n\n#include \"oneapi/tbb/detail/_utils.h\"\n#include \"oneapi/tbb/detail/_aligned_space.h\"\n#include \"semaphore.h\"\n\n#include <mutex>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nclass concurrent_monitor_mutex {\npublic:\n    using scoped_lock = std::lock_guard<concurrent_monitor_mutex>;\n\n    constexpr concurrent_monitor_mutex() {}\n\n    ~concurrent_monitor_mutex() = default;\n\n    void destroy() {\n#if !__TBB_USE_FUTEX\n        if (my_init_flag.load(std::memory_order_relaxed)) {\n            get_semaphore().~semaphore();\n        }\n#endif\n    }\n\n    void lock() {\n        auto wakeup_condition = [&] {\n            return my_flag.load(std::memory_order_relaxed) == 0;\n        };\n\n        while (my_flag.exchange(1)) {\n            if (!timed_spin_wait_until(wakeup_condition)) {\n                ++my_waiters;\n                while (!wakeup_condition()) {\n                    wait();\n                }\n                --my_waiters;\n            }\n        }\n    }\n\n    void unlock() {\n        my_flag.exchange(0); // full fence, so the next load is relaxed\n        if (my_waiters.load(std::memory_order_relaxed)) {\n            wakeup();\n        }\n    }\n\nprivate:\n    void wait() {\n#if __TBB_USE_FUTEX\n        futex_wait(&my_flag, 1);\n#else\n        get_semaphore().P();\n#endif\n    }\n\n    void wakeup() {\n#if __TBB_USE_FUTEX\n        futex_wakeup_one(&my_flag);\n#else\n        get_semaphore().V();\n#endif\n    }\n\n    // The flag should be int for the futex operations\n    std::atomic<int> my_flag{0};\n    std::atomic<int> my_waiters{0};\n\n#if !__TBB_USE_FUTEX\n    semaphore& get_semaphore() {\n        if (!my_init_flag.load(std::memory_order_acquire)) {\n            std::lock_guard<std::mutex> lock(my_init_mutex);\n            if (!my_init_flag.load(std::memory_order_relaxed)) {\n                new (my_semaphore.begin()) semaphore();\n                my_init_flag.store(true, std::memory_order_release);\n            }\n        }\n\n        return *my_semaphore.begin();\n    }\n\n    static std::mutex my_init_mutex;\n    std::atomic<bool> my_init_flag{false};\n    aligned_space<semaphore> my_semaphore{};\n#endif\n};\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_monitor_mutex_H\n"
  },
  {
    "path": "third-party/tbb/src/tbb/def/lin32-tbb.def",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n{\nglobal:\n\n/* Assertions (assert.cpp) */\n_ZN3tbb6detail2r117assertion_failureEPKciS3_S3_;\n\n/* ITT (profiling.cpp) */\n_ZN3tbb6detail2r112itt_task_endENS0_2d115itt_domain_enumE;\n_ZN3tbb6detail2r114itt_region_endENS0_2d115itt_domain_enumEPvy;\n_ZN3tbb6detail2r114itt_task_beginENS0_2d115itt_domain_enumEPvyS4_yNS0_2d021string_resource_indexE;\n_ZN3tbb6detail2r115call_itt_notifyEiPv;\n_ZN3tbb6detail2r115create_itt_syncEPvPKcS4_;\n_ZN3tbb6detail2r116itt_region_beginENS0_2d115itt_domain_enumEPvyS4_yNS0_2d021string_resource_indexE;\n_ZN3tbb6detail2r116itt_relation_addENS0_2d115itt_domain_enumEPvyNS0_2d012itt_relationES4_y;\n_ZN3tbb6detail2r117itt_set_sync_nameEPvPKc;\n_ZN3tbb6detail2r119itt_make_task_groupENS0_2d115itt_domain_enumEPvyS4_yNS0_2d021string_resource_indexE;\n_ZN3tbb6detail2r120itt_metadata_str_addENS0_2d115itt_domain_enumEPvyNS0_2d021string_resource_indexEPKc;\n_ZN3tbb6detail2r120itt_metadata_ptr_addENS0_2d115itt_domain_enumEPvyNS0_2d021string_resource_indexES4_;\n\n/* Allocators (allocator.cpp) */\n_ZN3tbb6detail2r115allocate_memoryEj;\n_ZN3tbb6detail2r117deallocate_memoryEPv;\n_ZN3tbb6detail2r122cache_aligned_allocateEj;\n_ZN3tbb6detail2r124cache_aligned_deallocateEPv;\n_ZN3tbb6detail2r115cache_line_sizeEv;\n_ZN3tbb6detail2r117is_tbbmalloc_usedEv;\n\n/* Small object pool (small_object_pool.cpp) */\n_ZN3tbb6detail2r18allocateERPNS0_2d117small_object_poolEj;\n_ZN3tbb6detail2r18allocateERPNS0_2d117small_object_poolEjRKNS2_14execution_dataE;\n_ZN3tbb6detail2r110deallocateERNS0_2d117small_object_poolEPvj;\n_ZN3tbb6detail2r110deallocateERNS0_2d117small_object_poolEPvjRKNS2_14execution_dataE;\n\n/* Error handling (exception.cpp) */\n_ZN3tbb6detail2r115throw_exceptionENS0_2d012exception_idE;\n_ZTIN3tbb6detail2r114bad_last_allocE;\n_ZTVN3tbb6detail2r114bad_last_allocE;\n_ZTIN3tbb6detail2r112missing_waitE;\n_ZTVN3tbb6detail2r112missing_waitE;\n_ZTIN3tbb6detail2r110user_abortE;\n_ZTVN3tbb6detail2r110user_abortE;\n_ZTIN3tbb6detail2r111unsafe_waitE;\n_ZTVN3tbb6detail2r111unsafe_waitE;\n\n/* RTM Mutex (rtm_mutex.cpp) */\n_ZN3tbb6detail2r17acquireERNS0_2d19rtm_mutexERNS3_11scoped_lockEb;\n_ZN3tbb6detail2r17releaseERNS0_2d19rtm_mutex11scoped_lockE;\n_ZN3tbb6detail2r111try_acquireERNS0_2d19rtm_mutexERNS3_11scoped_lockE;\n\n/* RTM RW Mutex (rtm_rw_mutex.cpp) */\n_ZN3tbb6detail2r114acquire_readerERNS0_2d112rtm_rw_mutexERNS3_11scoped_lockEb;\n_ZN3tbb6detail2r114acquire_writerERNS0_2d112rtm_rw_mutexERNS3_11scoped_lockEb;\n_ZN3tbb6detail2r118try_acquire_readerERNS0_2d112rtm_rw_mutexERNS3_11scoped_lockE;\n_ZN3tbb6detail2r118try_acquire_writerERNS0_2d112rtm_rw_mutexERNS3_11scoped_lockE;\n_ZN3tbb6detail2r17releaseERNS0_2d112rtm_rw_mutex11scoped_lockE;\n_ZN3tbb6detail2r17upgradeERNS0_2d112rtm_rw_mutex11scoped_lockE;\n_ZN3tbb6detail2r19downgradeERNS0_2d112rtm_rw_mutex11scoped_lockE;\n\n/* Tasks and partitioners (task.cpp) */\n_ZN3tbb6detail2r17suspendEPFvPvPNS1_18suspend_point_typeEES2_;\n_ZN3tbb6detail2r16resumeEPNS1_18suspend_point_typeE;\n_ZN3tbb6detail2r121current_suspend_pointEv;\n_ZN3tbb6detail2r114notify_waitersEj;\n_ZN3tbb6detail2r127get_thread_reference_vertexEPNS0_2d126wait_tree_vertex_interfaceE;\n\n/* Task dispatcher (task_dispatcher.cpp) */\n_ZN3tbb6detail2r114execution_slotEPKNS0_2d114execution_dataE;\n_ZN3tbb6detail2r14waitERNS0_2d112wait_contextERNS2_18task_group_contextE;\n_ZN3tbb6detail2r15spawnERNS0_2d14taskERNS2_18task_group_contextE;\n_ZN3tbb6detail2r15spawnERNS0_2d14taskERNS2_18task_group_contextEt;\n_ZN3tbb6detail2r116execute_and_waitERNS0_2d14taskERNS2_18task_group_contextERNS2_12wait_contextES6_;\n_ZN3tbb6detail2r16submitERNS0_2d14taskERNS2_18task_group_contextEPNS1_5arenaEj;\n_ZN3tbb6detail2r115current_contextEv;\n\n/* Task group context (task_group_context.cpp) */\n_ZN3tbb6detail2r110initializeERNS0_2d118task_group_contextE;\n_ZN3tbb6detail2r122cancel_group_executionERNS0_2d118task_group_contextE;\n_ZN3tbb6detail2r128is_group_execution_cancelledERNS0_2d118task_group_contextE;\n_ZN3tbb6detail2r15resetERNS0_2d118task_group_contextE;\n_ZN3tbb6detail2r17destroyERNS0_2d118task_group_contextE;\n_ZN3tbb6detail2r119capture_fp_settingsERNS0_2d118task_group_contextE;\n\n/* Task arena (arena.cpp) */\n_ZN3tbb6detail2r115max_concurrencyEPKNS0_2d115task_arena_baseE;\n_ZN3tbb6detail2r110initializeERNS0_2d115task_arena_baseE;\n_ZN3tbb6detail2r16attachERNS0_2d115task_arena_baseE;\n_ZN3tbb6detail2r17executeERNS0_2d115task_arena_baseERNS2_13delegate_baseE;\n_ZN3tbb6detail2r19terminateERNS0_2d115task_arena_baseE;\n_ZN3tbb6detail2r120isolate_within_arenaERNS0_2d113delegate_baseEi;\n_ZN3tbb6detail2r17enqueueERNS0_2d14taskEPNS2_15task_arena_baseE;\n_ZN3tbb6detail2r17enqueueERNS0_2d14taskERNS2_18task_group_contextEPNS2_15task_arena_baseE;\n_ZN3tbb6detail2r14waitERNS0_2d115task_arena_baseE;\n_ZN3tbb6detail2r114execution_slotERKNS0_2d115task_arena_baseE;\n_ZN3tbb6detail2r119exit_parallel_phaseEPNS0_2d115task_arena_baseEj;\n_ZN3tbb6detail2r120enter_parallel_phaseEPNS0_2d115task_arena_baseEj;\n\n/* System topology parsing and threads pinning (governor.cpp) */\n_ZN3tbb6detail2r115numa_node_countEv;\n_ZN3tbb6detail2r117fill_numa_indicesEPi;\n_ZN3tbb6detail2r115core_type_countEi;\n_ZN3tbb6detail2r122fill_core_type_indicesEPii;\n_ZN3tbb6detail2r131constraints_default_concurrencyERKNS0_2d111constraintsEi;\n_ZN3tbb6detail2r128constraints_threads_per_coreERKNS0_2d111constraintsEi;\n_ZN3tbb6detail2r124numa_default_concurrencyEi;\n\n/* Observer (observer_proxy.cpp) */\n_ZN3tbb6detail2r17observeERNS0_2d123task_scheduler_observerEb;\n\n/* Queuing RW Mutex (queuing_rw_mutex.cpp) */\n_ZN3tbb6detail2r111try_acquireERNS0_2d116queuing_rw_mutexERNS3_11scoped_lockEb;\n_ZN3tbb6detail2r117upgrade_to_writerERNS0_2d116queuing_rw_mutex11scoped_lockE;\n_ZN3tbb6detail2r119downgrade_to_readerERNS0_2d116queuing_rw_mutex11scoped_lockE;\n_ZN3tbb6detail2r17acquireERNS0_2d116queuing_rw_mutexERNS3_11scoped_lockEb;\n_ZN3tbb6detail2r17releaseERNS0_2d116queuing_rw_mutex11scoped_lockE;\n_ZN3tbb6detail2r19constructERNS0_2d116queuing_rw_mutexE;\n_ZN3tbb6detail2r19is_writerERKNS0_2d116queuing_rw_mutex11scoped_lockE;\n\n/* Global control (global_control.cpp) */\n_ZN3tbb6detail2r16createERNS0_2d114global_controlE;\n_ZN3tbb6detail2r17destroyERNS0_2d114global_controlE;\n_ZN3tbb6detail2r127global_control_active_valueEi;\n_ZN3tbb6detail2r18finalizeERNS0_2d121task_scheduler_handleEi;\n_ZN3tbb6detail2r13getERNS0_2d121task_scheduler_handleE;\n\n/* Parallel pipeline (parallel_pipeline.cpp) */\n_ZN3tbb6detail2r117parallel_pipelineERNS0_2d118task_group_contextEjRKNS2_11filter_nodeE;\n_ZN3tbb6detail2r116set_end_of_inputERNS0_2d111base_filterE;\n\n/* Concurrent bounded queue (concurrent_bounded_queue.cpp) */\n_ZN3tbb6detail2r126allocate_bounded_queue_repEj;\n_ZN3tbb6detail2r126wait_bounded_queue_monitorEPNS1_18concurrent_monitorEjiRNS0_2d113delegate_baseE;\n_ZN3tbb6detail2r128abort_bounded_queue_monitorsEPNS1_18concurrent_monitorE;\n_ZN3tbb6detail2r128deallocate_bounded_queue_repEPhj;\n_ZN3tbb6detail2r128notify_bounded_queue_monitorEPNS1_18concurrent_monitorEjj;\n\n/* Concurrent monitor (address_waiter.cpp) */\n_ZN3tbb6detail2r115wait_on_addressEPvRNS0_2d113delegate_baseEj;\n_ZN3tbb6detail2r117notify_by_addressEPvj;\n_ZN3tbb6detail2r121notify_by_address_oneEPv;\n_ZN3tbb6detail2r121notify_by_address_allEPv;\n\n/* Versioning (version.cpp) */\nTBB_runtime_interface_version;\nTBB_runtime_version;\n\nlocal:\n/* TODO: fill more precisely */\n*;\n};\n"
  },
  {
    "path": "third-party/tbb/src/tbb/def/lin64-tbb.def",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n{\nglobal:\n\n/* Assertions (assert.cpp) */\n_ZN3tbb6detail2r117assertion_failureEPKciS3_S3_;\n\n/* ITT (profiling.cpp) */\n_ZN3tbb6detail2r112itt_task_endENS0_2d115itt_domain_enumE;\n_ZN3tbb6detail2r114itt_region_endENS0_2d115itt_domain_enumEPvy;\n_ZN3tbb6detail2r114itt_task_beginENS0_2d115itt_domain_enumEPvyS4_yNS0_2d021string_resource_indexE;\n_ZN3tbb6detail2r115call_itt_notifyEiPv;\n_ZN3tbb6detail2r115create_itt_syncEPvPKcS4_;\n_ZN3tbb6detail2r116itt_region_beginENS0_2d115itt_domain_enumEPvyS4_yNS0_2d021string_resource_indexE;\n_ZN3tbb6detail2r116itt_relation_addENS0_2d115itt_domain_enumEPvyNS0_2d012itt_relationES4_y;\n_ZN3tbb6detail2r117itt_set_sync_nameEPvPKc;\n_ZN3tbb6detail2r119itt_make_task_groupENS0_2d115itt_domain_enumEPvyS4_yNS0_2d021string_resource_indexE;\n_ZN3tbb6detail2r120itt_metadata_str_addENS0_2d115itt_domain_enumEPvyNS0_2d021string_resource_indexEPKc;\n_ZN3tbb6detail2r120itt_metadata_ptr_addENS0_2d115itt_domain_enumEPvyNS0_2d021string_resource_indexES4_;\n\n/* Allocators (allocator.cpp) */\n_ZN3tbb6detail2r115allocate_memoryEm;\n_ZN3tbb6detail2r117deallocate_memoryEPv;\n_ZN3tbb6detail2r122cache_aligned_allocateEm;\n_ZN3tbb6detail2r124cache_aligned_deallocateEPv;\n_ZN3tbb6detail2r115cache_line_sizeEv;\n_ZN3tbb6detail2r117is_tbbmalloc_usedEv;\n\n/* Small object pool (small_object_pool.cpp) */\n_ZN3tbb6detail2r18allocateERPNS0_2d117small_object_poolEm;\n_ZN3tbb6detail2r18allocateERPNS0_2d117small_object_poolEmRKNS2_14execution_dataE;\n_ZN3tbb6detail2r110deallocateERNS0_2d117small_object_poolEPvm;\n_ZN3tbb6detail2r110deallocateERNS0_2d117small_object_poolEPvmRKNS2_14execution_dataE;\n\n/* Error handling (exception.cpp) */\n_ZN3tbb6detail2r115throw_exceptionENS0_2d012exception_idE;\n_ZTIN3tbb6detail2r114bad_last_allocE;\n_ZTVN3tbb6detail2r114bad_last_allocE;\n_ZTIN3tbb6detail2r112missing_waitE;\n_ZTVN3tbb6detail2r112missing_waitE;\n_ZTIN3tbb6detail2r110user_abortE;\n_ZTVN3tbb6detail2r110user_abortE;\n_ZTIN3tbb6detail2r111unsafe_waitE;\n_ZTVN3tbb6detail2r111unsafe_waitE;\n\n/* RTM Mutex (rtm_mutex.cpp) */\n_ZN3tbb6detail2r17acquireERNS0_2d19rtm_mutexERNS3_11scoped_lockEb;\n_ZN3tbb6detail2r17releaseERNS0_2d19rtm_mutex11scoped_lockE;\n_ZN3tbb6detail2r111try_acquireERNS0_2d19rtm_mutexERNS3_11scoped_lockE;\n\n/* RTM RW Mutex (rtm_rw_mutex.cpp) */\n_ZN3tbb6detail2r114acquire_readerERNS0_2d112rtm_rw_mutexERNS3_11scoped_lockEb;\n_ZN3tbb6detail2r114acquire_writerERNS0_2d112rtm_rw_mutexERNS3_11scoped_lockEb;\n_ZN3tbb6detail2r118try_acquire_readerERNS0_2d112rtm_rw_mutexERNS3_11scoped_lockE;\n_ZN3tbb6detail2r118try_acquire_writerERNS0_2d112rtm_rw_mutexERNS3_11scoped_lockE;\n_ZN3tbb6detail2r17releaseERNS0_2d112rtm_rw_mutex11scoped_lockE;\n_ZN3tbb6detail2r17upgradeERNS0_2d112rtm_rw_mutex11scoped_lockE;\n_ZN3tbb6detail2r19downgradeERNS0_2d112rtm_rw_mutex11scoped_lockE;\n\n/* Tasks and partitioners (task.cpp) */\n_ZN3tbb6detail2r17suspendEPFvPvPNS1_18suspend_point_typeEES2_;\n_ZN3tbb6detail2r16resumeEPNS1_18suspend_point_typeE;\n_ZN3tbb6detail2r121current_suspend_pointEv;\n_ZN3tbb6detail2r114notify_waitersEm;\n_ZN3tbb6detail2r127get_thread_reference_vertexEPNS0_2d126wait_tree_vertex_interfaceE;\n\n/* Task dispatcher (task_dispatcher.cpp) */\n_ZN3tbb6detail2r114execution_slotEPKNS0_2d114execution_dataE;\n_ZN3tbb6detail2r14waitERNS0_2d112wait_contextERNS2_18task_group_contextE;\n_ZN3tbb6detail2r15spawnERNS0_2d14taskERNS2_18task_group_contextE;\n_ZN3tbb6detail2r15spawnERNS0_2d14taskERNS2_18task_group_contextEt;\n_ZN3tbb6detail2r116execute_and_waitERNS0_2d14taskERNS2_18task_group_contextERNS2_12wait_contextES6_;\n_ZN3tbb6detail2r16submitERNS0_2d14taskERNS2_18task_group_contextEPNS1_5arenaEm;\n_ZN3tbb6detail2r115current_contextEv;\n\n/* Task group context (task_group_context.cpp) */\n_ZN3tbb6detail2r110initializeERNS0_2d118task_group_contextE;\n_ZN3tbb6detail2r122cancel_group_executionERNS0_2d118task_group_contextE;\n_ZN3tbb6detail2r128is_group_execution_cancelledERNS0_2d118task_group_contextE;\n_ZN3tbb6detail2r15resetERNS0_2d118task_group_contextE;\n_ZN3tbb6detail2r17destroyERNS0_2d118task_group_contextE;\n_ZN3tbb6detail2r119capture_fp_settingsERNS0_2d118task_group_contextE;\n\n/* Task arena (arena.cpp) */\n_ZN3tbb6detail2r115max_concurrencyEPKNS0_2d115task_arena_baseE;\n_ZN3tbb6detail2r110initializeERNS0_2d115task_arena_baseE;\n_ZN3tbb6detail2r16attachERNS0_2d115task_arena_baseE;\n_ZN3tbb6detail2r17executeERNS0_2d115task_arena_baseERNS2_13delegate_baseE;\n_ZN3tbb6detail2r19terminateERNS0_2d115task_arena_baseE;\n_ZN3tbb6detail2r120isolate_within_arenaERNS0_2d113delegate_baseEl;\n_ZN3tbb6detail2r17enqueueERNS0_2d14taskEPNS2_15task_arena_baseE;\n_ZN3tbb6detail2r17enqueueERNS0_2d14taskERNS2_18task_group_contextEPNS2_15task_arena_baseE;\n_ZN3tbb6detail2r14waitERNS0_2d115task_arena_baseE;\n_ZN3tbb6detail2r114execution_slotERKNS0_2d115task_arena_baseE;\n_ZN3tbb6detail2r119exit_parallel_phaseEPNS0_2d115task_arena_baseEm;\n_ZN3tbb6detail2r120enter_parallel_phaseEPNS0_2d115task_arena_baseEm;\n\n/* System topology parsing and threads pinning (governor.cpp) */\n_ZN3tbb6detail2r115numa_node_countEv;\n_ZN3tbb6detail2r117fill_numa_indicesEPi;\n_ZN3tbb6detail2r115core_type_countEl;\n_ZN3tbb6detail2r122fill_core_type_indicesEPil;\n_ZN3tbb6detail2r131constraints_default_concurrencyERKNS0_2d111constraintsEl;\n_ZN3tbb6detail2r128constraints_threads_per_coreERKNS0_2d111constraintsEl;\n_ZN3tbb6detail2r124numa_default_concurrencyEi;\n\n/* Observer (observer_proxy.cpp) */\n_ZN3tbb6detail2r17observeERNS0_2d123task_scheduler_observerEb;\n\n/* Queuing RW Mutex (queuing_rw_mutex.cpp) */\n_ZN3tbb6detail2r111try_acquireERNS0_2d116queuing_rw_mutexERNS3_11scoped_lockEb;\n_ZN3tbb6detail2r117upgrade_to_writerERNS0_2d116queuing_rw_mutex11scoped_lockE;\n_ZN3tbb6detail2r119downgrade_to_readerERNS0_2d116queuing_rw_mutex11scoped_lockE;\n_ZN3tbb6detail2r17acquireERNS0_2d116queuing_rw_mutexERNS3_11scoped_lockEb;\n_ZN3tbb6detail2r17releaseERNS0_2d116queuing_rw_mutex11scoped_lockE;\n_ZN3tbb6detail2r19constructERNS0_2d116queuing_rw_mutexE;\n_ZN3tbb6detail2r19is_writerERKNS0_2d116queuing_rw_mutex11scoped_lockE;\n\n/* Global control (global_control.cpp) */\n_ZN3tbb6detail2r16createERNS0_2d114global_controlE;\n_ZN3tbb6detail2r17destroyERNS0_2d114global_controlE;\n_ZN3tbb6detail2r127global_control_active_valueEi;\n_ZN3tbb6detail2r18finalizeERNS0_2d121task_scheduler_handleEl;\n_ZN3tbb6detail2r13getERNS0_2d121task_scheduler_handleE;\n\n/* Parallel pipeline (parallel_pipeline.cpp) */\n_ZN3tbb6detail2r117parallel_pipelineERNS0_2d118task_group_contextEmRKNS2_11filter_nodeE;\n_ZN3tbb6detail2r116set_end_of_inputERNS0_2d111base_filterE;\n\n/* Concurrent bounded queue (concurrent_bounded_queue.cpp) */\n_ZN3tbb6detail2r126allocate_bounded_queue_repEm;\n_ZN3tbb6detail2r126wait_bounded_queue_monitorEPNS1_18concurrent_monitorEmlRNS0_2d113delegate_baseE;\n_ZN3tbb6detail2r128abort_bounded_queue_monitorsEPNS1_18concurrent_monitorE;\n_ZN3tbb6detail2r128deallocate_bounded_queue_repEPhm;\n_ZN3tbb6detail2r128notify_bounded_queue_monitorEPNS1_18concurrent_monitorEmm;\n\n/* Concurrent monitor (address_waiter.cpp) */\n_ZN3tbb6detail2r115wait_on_addressEPvRNS0_2d113delegate_baseEm;\n_ZN3tbb6detail2r117notify_by_addressEPvm;\n_ZN3tbb6detail2r121notify_by_address_oneEPv;\n_ZN3tbb6detail2r121notify_by_address_allEPv;\n\n/* Versioning (version.cpp) */\nTBB_runtime_interface_version;\nTBB_runtime_version;\n\nlocal:\n/* TODO: fill more precisely */\n*;\n};\n"
  },
  {
    "path": "third-party/tbb/src/tbb/def/mac64-tbb.def",
    "content": "# Copyright (c) 2005-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\n# TODO: check the legacy comment below, currently use extra leading underscore everywhere.\n# Sometimes macOS* requires leading underscore (e. g. in export list file), but sometimes not\n# (e. g. when searching symbol in a dynamic library via dlsym()). Symbols in this file SHOULD\n# be listed WITHOUT one leading underscore. __TBB_SYMBOL macro should add underscore when\n# necessary, depending on the intended usage.\n\n# Assertions (assert.cpp)\n__ZN3tbb6detail2r117assertion_failureEPKciS3_S3_\n\n# ITT (profiling.cpp)\n__ZN3tbb6detail2r112itt_task_endENS0_2d115itt_domain_enumE\n__ZN3tbb6detail2r114itt_region_endENS0_2d115itt_domain_enumEPvy\n__ZN3tbb6detail2r114itt_task_beginENS0_2d115itt_domain_enumEPvyS4_yNS0_2d021string_resource_indexE\n__ZN3tbb6detail2r115call_itt_notifyEiPv\n__ZN3tbb6detail2r115create_itt_syncEPvPKcS4_\n__ZN3tbb6detail2r116itt_region_beginENS0_2d115itt_domain_enumEPvyS4_yNS0_2d021string_resource_indexE\n__ZN3tbb6detail2r116itt_relation_addENS0_2d115itt_domain_enumEPvyNS0_2d012itt_relationES4_y\n__ZN3tbb6detail2r117itt_set_sync_nameEPvPKc\n__ZN3tbb6detail2r119itt_make_task_groupENS0_2d115itt_domain_enumEPvyS4_yNS0_2d021string_resource_indexE\n__ZN3tbb6detail2r120itt_metadata_str_addENS0_2d115itt_domain_enumEPvyNS0_2d021string_resource_indexEPKc\n__ZN3tbb6detail2r120itt_metadata_ptr_addENS0_2d115itt_domain_enumEPvyNS0_2d021string_resource_indexES4_\n\n# Allocators (allocator.cpp)\n__ZN3tbb6detail2r115allocate_memoryEm\n__ZN3tbb6detail2r117deallocate_memoryEPv\n__ZN3tbb6detail2r122cache_aligned_allocateEm\n__ZN3tbb6detail2r124cache_aligned_deallocateEPv\n__ZN3tbb6detail2r115cache_line_sizeEv\n__ZN3tbb6detail2r117is_tbbmalloc_usedEv\n\n# Small object pool (small_object_pool.cpp)\n__ZN3tbb6detail2r18allocateERPNS0_2d117small_object_poolEm\n__ZN3tbb6detail2r18allocateERPNS0_2d117small_object_poolEmRKNS2_14execution_dataE\n__ZN3tbb6detail2r110deallocateERNS0_2d117small_object_poolEPvm\n__ZN3tbb6detail2r110deallocateERNS0_2d117small_object_poolEPvmRKNS2_14execution_dataE\n\n# Error handling (exception.cpp)\n__ZN3tbb6detail2r115throw_exceptionENS0_2d012exception_idE\n__ZTIN3tbb6detail2r114bad_last_allocE\n__ZTVN3tbb6detail2r114bad_last_allocE\n__ZTIN3tbb6detail2r112missing_waitE\n__ZTVN3tbb6detail2r112missing_waitE\n__ZTIN3tbb6detail2r110user_abortE\n__ZTVN3tbb6detail2r110user_abortE\n__ZTIN3tbb6detail2r111unsafe_waitE\n__ZTVN3tbb6detail2r111unsafe_waitE\n\n# RTM Mutex (rtm_mutex.cpp)\n__ZN3tbb6detail2r17acquireERNS0_2d19rtm_mutexERNS3_11scoped_lockEb\n__ZN3tbb6detail2r17releaseERNS0_2d19rtm_mutex11scoped_lockE\n__ZN3tbb6detail2r111try_acquireERNS0_2d19rtm_mutexERNS3_11scoped_lockE\n\n# RTM RW Mutex (rtm_rw_mutex.cpp)\n__ZN3tbb6detail2r114acquire_readerERNS0_2d112rtm_rw_mutexERNS3_11scoped_lockEb\n__ZN3tbb6detail2r114acquire_writerERNS0_2d112rtm_rw_mutexERNS3_11scoped_lockEb\n__ZN3tbb6detail2r118try_acquire_readerERNS0_2d112rtm_rw_mutexERNS3_11scoped_lockE\n__ZN3tbb6detail2r118try_acquire_writerERNS0_2d112rtm_rw_mutexERNS3_11scoped_lockE\n__ZN3tbb6detail2r17releaseERNS0_2d112rtm_rw_mutex11scoped_lockE\n__ZN3tbb6detail2r17upgradeERNS0_2d112rtm_rw_mutex11scoped_lockE\n__ZN3tbb6detail2r19downgradeERNS0_2d112rtm_rw_mutex11scoped_lockE\n\n# Tasks and partitioners (task.cpp)\n__ZN3tbb6detail2r17suspendEPFvPvPNS1_18suspend_point_typeEES2_\n__ZN3tbb6detail2r16resumeEPNS1_18suspend_point_typeE\n__ZN3tbb6detail2r121current_suspend_pointEv\n__ZN3tbb6detail2r114notify_waitersEm\n__ZN3tbb6detail2r127get_thread_reference_vertexEPNS0_2d126wait_tree_vertex_interfaceE\n\n# Task dispatcher (task_dispatcher.cpp)\n__ZN3tbb6detail2r114execution_slotEPKNS0_2d114execution_dataE\n__ZN3tbb6detail2r14waitERNS0_2d112wait_contextERNS2_18task_group_contextE\n__ZN3tbb6detail2r15spawnERNS0_2d14taskERNS2_18task_group_contextE\n__ZN3tbb6detail2r15spawnERNS0_2d14taskERNS2_18task_group_contextEt\n__ZN3tbb6detail2r116execute_and_waitERNS0_2d14taskERNS2_18task_group_contextERNS2_12wait_contextES6_\n__ZN3tbb6detail2r16submitERNS0_2d14taskERNS2_18task_group_contextEPNS1_5arenaEm\n__ZN3tbb6detail2r115current_contextEv\n\n# Task group context (task_group_context.cpp)\n__ZN3tbb6detail2r110initializeERNS0_2d118task_group_contextE\n__ZN3tbb6detail2r122cancel_group_executionERNS0_2d118task_group_contextE\n__ZN3tbb6detail2r128is_group_execution_cancelledERNS0_2d118task_group_contextE\n__ZN3tbb6detail2r15resetERNS0_2d118task_group_contextE\n__ZN3tbb6detail2r17destroyERNS0_2d118task_group_contextE\n__ZN3tbb6detail2r119capture_fp_settingsERNS0_2d118task_group_contextE\n\n# Task arena (arena.cpp)\n__ZN3tbb6detail2r115max_concurrencyEPKNS0_2d115task_arena_baseE\n__ZN3tbb6detail2r110initializeERNS0_2d115task_arena_baseE\n__ZN3tbb6detail2r16attachERNS0_2d115task_arena_baseE\n__ZN3tbb6detail2r17executeERNS0_2d115task_arena_baseERNS2_13delegate_baseE\n__ZN3tbb6detail2r19terminateERNS0_2d115task_arena_baseE\n__ZN3tbb6detail2r120isolate_within_arenaERNS0_2d113delegate_baseEl\n__ZN3tbb6detail2r17enqueueERNS0_2d14taskEPNS2_15task_arena_baseE\n__ZN3tbb6detail2r17enqueueERNS0_2d14taskERNS2_18task_group_contextEPNS2_15task_arena_baseE\n__ZN3tbb6detail2r14waitERNS0_2d115task_arena_baseE\n__ZN3tbb6detail2r114execution_slotERKNS0_2d115task_arena_baseE\n__ZN3tbb6detail2r119exit_parallel_phaseEPNS0_2d115task_arena_baseEm\n__ZN3tbb6detail2r120enter_parallel_phaseEPNS0_2d115task_arena_baseEm\n\n# System topology parsing and threads pinning (governor.cpp)\n__ZN3tbb6detail2r115numa_node_countEv\n__ZN3tbb6detail2r117fill_numa_indicesEPi\n__ZN3tbb6detail2r115core_type_countEl\n__ZN3tbb6detail2r122fill_core_type_indicesEPil\n__ZN3tbb6detail2r131constraints_default_concurrencyERKNS0_2d111constraintsEl\n__ZN3tbb6detail2r128constraints_threads_per_coreERKNS0_2d111constraintsEl\n__ZN3tbb6detail2r124numa_default_concurrencyEi\n\n# Observer (observer_proxy.cpp)\n__ZN3tbb6detail2r17observeERNS0_2d123task_scheduler_observerEb\n\n# Queuing RW Mutex (queuing_rw_mutex.cpp)\n__ZN3tbb6detail2r111try_acquireERNS0_2d116queuing_rw_mutexERNS3_11scoped_lockEb\n__ZN3tbb6detail2r117upgrade_to_writerERNS0_2d116queuing_rw_mutex11scoped_lockE\n__ZN3tbb6detail2r119downgrade_to_readerERNS0_2d116queuing_rw_mutex11scoped_lockE\n__ZN3tbb6detail2r17acquireERNS0_2d116queuing_rw_mutexERNS3_11scoped_lockEb\n__ZN3tbb6detail2r17releaseERNS0_2d116queuing_rw_mutex11scoped_lockE\n__ZN3tbb6detail2r19constructERNS0_2d116queuing_rw_mutexE\n__ZN3tbb6detail2r19is_writerERKNS0_2d116queuing_rw_mutex11scoped_lockE\n\n# Global control (global_control.cpp)\n__ZN3tbb6detail2r16createERNS0_2d114global_controlE\n__ZN3tbb6detail2r17destroyERNS0_2d114global_controlE\n__ZN3tbb6detail2r127global_control_active_valueEi\n__ZN3tbb6detail2r18finalizeERNS0_2d121task_scheduler_handleEl\n__ZN3tbb6detail2r13getERNS0_2d121task_scheduler_handleE\n\n# Parallel pipeline (parallel_pipeline.cpp)\n__ZN3tbb6detail2r117parallel_pipelineERNS0_2d118task_group_contextEmRKNS2_11filter_nodeE\n__ZN3tbb6detail2r116set_end_of_inputERNS0_2d111base_filterE\n\n# Concurrent bounded queue (concurrent_bounded_queue.cpp)\n__ZN3tbb6detail2r126allocate_bounded_queue_repEm\n__ZN3tbb6detail2r126wait_bounded_queue_monitorEPNS1_18concurrent_monitorEmlRNS0_2d113delegate_baseE\n__ZN3tbb6detail2r128abort_bounded_queue_monitorsEPNS1_18concurrent_monitorE\n__ZN3tbb6detail2r128deallocate_bounded_queue_repEPhm\n__ZN3tbb6detail2r128notify_bounded_queue_monitorEPNS1_18concurrent_monitorEmm\n\n# Concurrent monitor (address_waiter.cpp)\n__ZN3tbb6detail2r115wait_on_addressEPvRNS0_2d113delegate_baseEm\n__ZN3tbb6detail2r117notify_by_addressEPvm\n__ZN3tbb6detail2r121notify_by_address_oneEPv\n__ZN3tbb6detail2r121notify_by_address_allEPv\n\n# Versioning (version.cpp)\n_TBB_runtime_interface_version\n_TBB_runtime_version\n"
  },
  {
    "path": "third-party/tbb/src/tbb/def/win32-tbb.def",
    "content": "; Copyright (c) 2005-2025 Intel Corporation\n;\n; Licensed under the Apache License, Version 2.0 (the \"License\");\n; you may not use this file except in compliance with the License.\n; You may obtain a copy of the License at\n;\n;     http://www.apache.org/licenses/LICENSE-2.0\n;\n; Unless required by applicable law or agreed to in writing, software\n; distributed under the License is distributed on an \"AS IS\" BASIS,\n; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n; See the License for the specific language governing permissions and\n; limitations under the License.\n\n; This file is organized with a section for each .cpp file.\n\nEXPORTS\n\n; Assertions (assert.cpp)\n?assertion_failure@r1@detail@tbb@@YAXPBDH00@Z\n\n; ITT (tbb_profiling.cpp)\n?call_itt_notify@r1@detail@tbb@@YAXHPAX@Z\n?create_itt_sync@r1@detail@tbb@@YAXPAXPB_W1@Z\n?itt_make_task_group@r1@detail@tbb@@YAXW4itt_domain_enum@d1@23@PAX_K12W4string_resource_index@d0@23@@Z\n?itt_task_begin@r1@detail@tbb@@YAXW4itt_domain_enum@d1@23@PAX_K12W4string_resource_index@d0@23@@Z\n?itt_task_end@r1@detail@tbb@@YAXW4itt_domain_enum@d1@23@@Z\n?itt_metadata_str_add@r1@detail@tbb@@YAXW4itt_domain_enum@d1@23@PAX_KW4string_resource_index@d0@23@PBD@Z\n?itt_relation_add@r1@detail@tbb@@YAXW4itt_domain_enum@d1@23@PAX_KW4itt_relation@d0@23@12@Z\n?itt_region_begin@r1@detail@tbb@@YAXW4itt_domain_enum@d1@23@PAX_K12W4string_resource_index@d0@23@@Z\n?itt_region_end@r1@detail@tbb@@YAXW4itt_domain_enum@d1@23@PAX_K@Z\n?itt_set_sync_name@r1@detail@tbb@@YAXPAXPB_W@Z\n?itt_metadata_ptr_add@r1@detail@tbb@@YAXW4itt_domain_enum@d1@23@PAX_KW4string_resource_index@d0@23@1@Z\n\n; Allocators (tbb_allocator.cpp)\n?cache_aligned_allocate@r1@detail@tbb@@YAPAXI@Z\n?cache_aligned_deallocate@r1@detail@tbb@@YAXPAX@Z\n?cache_line_size@r1@detail@tbb@@YAIXZ\n?allocate_memory@r1@detail@tbb@@YAPAXI@Z\n?deallocate_memory@r1@detail@tbb@@YAXPAX@Z\n?is_tbbmalloc_used@r1@detail@tbb@@YA_NXZ\n\n; Small object pool (small_object_pool.cpp)\n?allocate@r1@detail@tbb@@YAPAXAAPAVsmall_object_pool@d1@23@IABUexecution_data@523@@Z\n?allocate@r1@detail@tbb@@YAPAXAAPAVsmall_object_pool@d1@23@I@Z\n?deallocate@r1@detail@tbb@@YAXAAVsmall_object_pool@d1@23@PAXIABUexecution_data@523@@Z\n?deallocate@r1@detail@tbb@@YAXAAVsmall_object_pool@d1@23@PAXI@Z\n\n; Error handling (exception.cpp)\n?throw_exception@r1@detail@tbb@@YAXW4exception_id@d0@23@@Z\n?what@bad_last_alloc@r1@detail@tbb@@UBEPBDXZ\n?what@user_abort@r1@detail@tbb@@UBEPBDXZ\n?what@missing_wait@r1@detail@tbb@@UBEPBDXZ\n\n; RTM Mutex (rtm_mutex.cpp)\n?acquire@r1@detail@tbb@@YAXAAVrtm_mutex@d1@23@AAVscoped_lock@4523@_N@Z\n?release@r1@detail@tbb@@YAXAAVscoped_lock@rtm_mutex@d1@23@@Z\n?try_acquire@r1@detail@tbb@@YA_NAAVrtm_mutex@d1@23@AAVscoped_lock@4523@@Z\n\n; RTM RW Mutex (rtm_rw_mutex.cpp)\n?acquire_reader@r1@detail@tbb@@YAXAAVrtm_rw_mutex@d1@23@AAVscoped_lock@4523@_N@Z\n?acquire_writer@r1@detail@tbb@@YAXAAVrtm_rw_mutex@d1@23@AAVscoped_lock@4523@_N@Z\n?downgrade@r1@detail@tbb@@YA_NAAVscoped_lock@rtm_rw_mutex@d1@23@@Z\n?release@r1@detail@tbb@@YAXAAVscoped_lock@rtm_rw_mutex@d1@23@@Z\n?try_acquire_reader@r1@detail@tbb@@YA_NAAVrtm_rw_mutex@d1@23@AAVscoped_lock@4523@@Z\n?try_acquire_writer@r1@detail@tbb@@YA_NAAVrtm_rw_mutex@d1@23@AAVscoped_lock@4523@@Z\n?upgrade@r1@detail@tbb@@YA_NAAVscoped_lock@rtm_rw_mutex@d1@23@@Z\n\n; Tasks and partitioners (task.cpp)\n?current_suspend_point@r1@detail@tbb@@YAPAUsuspend_point_type@123@XZ\n?resume@r1@detail@tbb@@YAXPAUsuspend_point_type@123@@Z\n?suspend@r1@detail@tbb@@YAXP6AXPAXPAUsuspend_point_type@123@@Z0@Z\n?notify_waiters@r1@detail@tbb@@YAXI@Z\n?get_thread_reference_vertex@r1@detail@tbb@@YAPAVwait_tree_vertex_interface@d1@23@PAV4523@@Z\n\n; Task dispatcher (task_dispatcher.cpp)\n?spawn@r1@detail@tbb@@YAXAAVtask@d1@23@AAVtask_group_context@523@G@Z\n?spawn@r1@detail@tbb@@YAXAAVtask@d1@23@AAVtask_group_context@523@@Z\n?execute_and_wait@r1@detail@tbb@@YAXAAVtask@d1@23@AAVtask_group_context@523@AAVwait_context@523@1@Z\n?execution_slot@r1@detail@tbb@@YAGPBUexecution_data@d1@23@@Z\n?wait@r1@detail@tbb@@YAXAAVwait_context@d1@23@AAVtask_group_context@523@@Z\n?submit@r1@detail@tbb@@YAXAAVtask@d1@23@AAVtask_group_context@523@PAVarena@123@I@Z\n?current_context@r1@detail@tbb@@YAPAVtask_group_context@d1@23@XZ\n\n; Task group context (task_group_context.cpp)\n?cancel_group_execution@r1@detail@tbb@@YA_NAAVtask_group_context@d1@23@@Z\n?capture_fp_settings@r1@detail@tbb@@YAXAAVtask_group_context@d1@23@@Z\n?destroy@r1@detail@tbb@@YAXAAVtask_group_context@d1@23@@Z\n?initialize@r1@detail@tbb@@YAXAAVtask_group_context@d1@23@@Z\n?is_group_execution_cancelled@r1@detail@tbb@@YA_NAAVtask_group_context@d1@23@@Z\n?reset@r1@detail@tbb@@YAXAAVtask_group_context@d1@23@@Z\n\n; Task arena (arena.cpp)\n?attach@r1@detail@tbb@@YA_NAAVtask_arena_base@d1@23@@Z\n?enqueue@r1@detail@tbb@@YAXAAVtask@d1@23@PAVtask_arena_base@523@@Z\n?execute@r1@detail@tbb@@YAXAAVtask_arena_base@d1@23@AAVdelegate_base@523@@Z\n?initialize@r1@detail@tbb@@YAXAAVtask_arena_base@d1@23@@Z\n?isolate_within_arena@r1@detail@tbb@@YAXAAVdelegate_base@d1@23@H@Z\n?max_concurrency@r1@detail@tbb@@YAHPBVtask_arena_base@d1@23@@Z\n?terminate@r1@detail@tbb@@YAXAAVtask_arena_base@d1@23@@Z\n?wait@r1@detail@tbb@@YAXAAVtask_arena_base@d1@23@@Z\n?enqueue@r1@detail@tbb@@YAXAAVtask@d1@23@AAVtask_group_context@523@PAVtask_arena_base@523@@Z\n?execution_slot@r1@detail@tbb@@YAGABVtask_arena_base@d1@23@@Z\n?enter_parallel_phase@r1@detail@tbb@@YAXPAVtask_arena_base@d1@23@I@Z\n?exit_parallel_phase@r1@detail@tbb@@YAXPAVtask_arena_base@d1@23@I@Z\n\n; System topology parsing and threads pinning (governor.cpp)\n?numa_node_count@r1@detail@tbb@@YAIXZ\n?fill_numa_indices@r1@detail@tbb@@YAXPAH@Z\n?core_type_count@r1@detail@tbb@@YAIH@Z\n?fill_core_type_indices@r1@detail@tbb@@YAXPAHH@Z\n?numa_default_concurrency@r1@detail@tbb@@YAHH@Z\n?constraints_default_concurrency@r1@detail@tbb@@YAHABUconstraints@d1@23@H@Z\n?constraints_threads_per_core@r1@detail@tbb@@YAHABUconstraints@d1@23@H@Z\n\n; Observer (observer_proxy.cpp)\n?observe@r1@detail@tbb@@YAXAAVtask_scheduler_observer@d1@23@_N@Z\n\n; Queuing RW Mutex (queuing_rw_mutex.cpp)\n?acquire@r1@detail@tbb@@YAXAAVqueuing_rw_mutex@d1@23@AAVscoped_lock@4523@_N@Z\n?construct@r1@detail@tbb@@YAXAAVqueuing_rw_mutex@d1@23@@Z\n?downgrade_to_reader@r1@detail@tbb@@YA_NAAVscoped_lock@queuing_rw_mutex@d1@23@@Z\n?release@r1@detail@tbb@@YAXAAVscoped_lock@queuing_rw_mutex@d1@23@@Z\n?try_acquire@r1@detail@tbb@@YA_NAAVqueuing_rw_mutex@d1@23@AAVscoped_lock@4523@_N@Z\n?upgrade_to_writer@r1@detail@tbb@@YA_NAAVscoped_lock@queuing_rw_mutex@d1@23@@Z\n?is_writer@r1@detail@tbb@@YA_NABVscoped_lock@queuing_rw_mutex@d1@23@@Z\n\n; Global control (global_control.cpp)\n?create@r1@detail@tbb@@YAXAAVglobal_control@d1@23@@Z\n?destroy@r1@detail@tbb@@YAXAAVglobal_control@d1@23@@Z\n?global_control_active_value@r1@detail@tbb@@YAIH@Z\n?get@r1@detail@tbb@@YAXAAVtask_scheduler_handle@d1@23@@Z\n?finalize@r1@detail@tbb@@YA_NAAVtask_scheduler_handle@d1@23@H@Z\n\n; Parallel pipeline (parallel_pipeline.cpp)\n?parallel_pipeline@r1@detail@tbb@@YAXAAVtask_group_context@d1@23@IABVfilter_node@523@@Z\n?set_end_of_input@r1@detail@tbb@@YAXAAVbase_filter@d1@23@@Z\n\n; Concurrent bounded queue (concurrent_bounded_queue.cpp)\n?abort_bounded_queue_monitors@r1@detail@tbb@@YAXPAVconcurrent_monitor@123@@Z\n?allocate_bounded_queue_rep@r1@detail@tbb@@YAPAEI@Z\n?deallocate_bounded_queue_rep@r1@detail@tbb@@YAXPAEI@Z\n?notify_bounded_queue_monitor@r1@detail@tbb@@YAXPAVconcurrent_monitor@123@II@Z\n?wait_bounded_queue_monitor@r1@detail@tbb@@YAXPAVconcurrent_monitor@123@IHAAVdelegate_base@d1@23@@Z\n\n; Concurrent monitor (address_waiter.cpp)\n?wait_on_address@r1@detail@tbb@@YAXPAXAAVdelegate_base@d1@23@I@Z\n?notify_by_address@r1@detail@tbb@@YAXPAXI@Z\n?notify_by_address_one@r1@detail@tbb@@YAXPAX@Z\n?notify_by_address_all@r1@detail@tbb@@YAXPAX@Z\n\n;; Versioning (version.cpp)\nTBB_runtime_interface_version\nTBB_runtime_version\n"
  },
  {
    "path": "third-party/tbb/src/tbb/def/win64-tbb.def",
    "content": "; Copyright (c) 2005-2025 Intel Corporation\n;\n; Licensed under the Apache License, Version 2.0 (the \"License\");\n; you may not use this file except in compliance with the License.\n; You may obtain a copy of the License at\n;\n;     http://www.apache.org/licenses/LICENSE-2.0\n;\n; Unless required by applicable law or agreed to in writing, software\n; distributed under the License is distributed on an \"AS IS\" BASIS,\n; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n; See the License for the specific language governing permissions and\n; limitations under the License.\n\n; This file is organized with a section for each .cpp file.\n\nEXPORTS\n\n; Assertions (assert.cpp)\n?assertion_failure@r1@detail@tbb@@YAXPEBDH00@Z\n\n; ITT (tbb_profiling.cpp)\n?call_itt_notify@r1@detail@tbb@@YAXHPEAX@Z\n?create_itt_sync@r1@detail@tbb@@YAXPEAXPEB_W1@Z\n?itt_make_task_group@r1@detail@tbb@@YAXW4itt_domain_enum@d1@23@PEAX_K12W4string_resource_index@d0@23@@Z\n?itt_task_begin@r1@detail@tbb@@YAXW4itt_domain_enum@d1@23@PEAX_K12W4string_resource_index@d0@23@@Z\n?itt_task_end@r1@detail@tbb@@YAXW4itt_domain_enum@d1@23@@Z\n?itt_set_sync_name@r1@detail@tbb@@YAXPEAXPEB_W@Z\n?itt_metadata_str_add@r1@detail@tbb@@YAXW4itt_domain_enum@d1@23@PEAX_KW4string_resource_index@d0@23@PEBD@Z\n?itt_relation_add@r1@detail@tbb@@YAXW4itt_domain_enum@d1@23@PEAX_KW4itt_relation@d0@23@12@Z\n?itt_region_begin@r1@detail@tbb@@YAXW4itt_domain_enum@d1@23@PEAX_K12W4string_resource_index@d0@23@@Z\n?itt_region_end@r1@detail@tbb@@YAXW4itt_domain_enum@d1@23@PEAX_K@Z\n?itt_metadata_ptr_add@r1@detail@tbb@@YAXW4itt_domain_enum@d1@23@PEAX_KW4string_resource_index@d0@23@1@Z\n\n; Allocators (tbb_allocator.cpp)\n?cache_aligned_allocate@r1@detail@tbb@@YAPEAX_K@Z\n?cache_aligned_deallocate@r1@detail@tbb@@YAXPEAX@Z\n?cache_line_size@r1@detail@tbb@@YA_KXZ\n?allocate_memory@r1@detail@tbb@@YAPEAX_K@Z\n?deallocate_memory@r1@detail@tbb@@YAXPEAX@Z\n?is_tbbmalloc_used@r1@detail@tbb@@YA_NXZ\n\n; Small object pool (small_object_pool.cpp)\n?allocate@r1@detail@tbb@@YAPEAXAEAPEAVsmall_object_pool@d1@23@_KAEBUexecution_data@523@@Z\n?allocate@r1@detail@tbb@@YAPEAXAEAPEAVsmall_object_pool@d1@23@_K@Z\n?deallocate@r1@detail@tbb@@YAXAEAVsmall_object_pool@d1@23@PEAX_KAEBUexecution_data@523@@Z\n?deallocate@r1@detail@tbb@@YAXAEAVsmall_object_pool@d1@23@PEAX_K@Z\n\n; Error handling (exception.cpp)\n?throw_exception@r1@detail@tbb@@YAXW4exception_id@d0@23@@Z\n?what@bad_last_alloc@r1@detail@tbb@@UEBAPEBDXZ\n?what@user_abort@r1@detail@tbb@@UEBAPEBDXZ\n?what@missing_wait@r1@detail@tbb@@UEBAPEBDXZ\n\n; RTM Mutex (rtm_mutex.cpp)\n?try_acquire@r1@detail@tbb@@YA_NAEAVrtm_mutex@d1@23@AEAVscoped_lock@4523@@Z\n?acquire@r1@detail@tbb@@YAXAEAVrtm_mutex@d1@23@AEAVscoped_lock@4523@_N@Z\n?release@r1@detail@tbb@@YAXAEAVscoped_lock@rtm_mutex@d1@23@@Z\n\n; RTM RW Mutex (rtm_rw_mutex.cpp)\n?acquire_writer@r1@detail@tbb@@YAXAEAVrtm_rw_mutex@d1@23@AEAVscoped_lock@4523@_N@Z\n?acquire_reader@r1@detail@tbb@@YAXAEAVrtm_rw_mutex@d1@23@AEAVscoped_lock@4523@_N@Z\n?upgrade@r1@detail@tbb@@YA_NAEAVscoped_lock@rtm_rw_mutex@d1@23@@Z\n?downgrade@r1@detail@tbb@@YA_NAEAVscoped_lock@rtm_rw_mutex@d1@23@@Z\n?try_acquire_writer@r1@detail@tbb@@YA_NAEAVrtm_rw_mutex@d1@23@AEAVscoped_lock@4523@@Z\n?try_acquire_reader@r1@detail@tbb@@YA_NAEAVrtm_rw_mutex@d1@23@AEAVscoped_lock@4523@@Z\n?release@r1@detail@tbb@@YAXAEAVscoped_lock@rtm_rw_mutex@d1@23@@Z\n\n; Tasks and partitioners (task.cpp)\n?suspend@r1@detail@tbb@@YAXP6AXPEAXPEAUsuspend_point_type@123@@Z0@Z\n?resume@r1@detail@tbb@@YAXPEAUsuspend_point_type@123@@Z\n?current_suspend_point@r1@detail@tbb@@YAPEAUsuspend_point_type@123@XZ\n?notify_waiters@r1@detail@tbb@@YAX_K@Z\n?get_thread_reference_vertex@r1@detail@tbb@@YAPEAVwait_tree_vertex_interface@d1@23@PEAV4523@@Z\n\n; Task dispatcher (task_dispatcher.cpp)\n?spawn@r1@detail@tbb@@YAXAEAVtask@d1@23@AEAVtask_group_context@523@@Z\n?spawn@r1@detail@tbb@@YAXAEAVtask@d1@23@AEAVtask_group_context@523@G@Z\n?execute_and_wait@r1@detail@tbb@@YAXAEAVtask@d1@23@AEAVtask_group_context@523@AEAVwait_context@523@1@Z\n?execution_slot@r1@detail@tbb@@YAGPEBUexecution_data@d1@23@@Z\n?wait@r1@detail@tbb@@YAXAEAVwait_context@d1@23@AEAVtask_group_context@523@@Z\n?submit@r1@detail@tbb@@YAXAEAVtask@d1@23@AEAVtask_group_context@523@PEAVarena@123@_K@Z\n?current_context@r1@detail@tbb@@YAPEAVtask_group_context@d1@23@XZ\n\n; Task group context (task_group_context.cpp)\n?initialize@r1@detail@tbb@@YAXAEAVtask_group_context@d1@23@@Z\n?destroy@r1@detail@tbb@@YAXAEAVtask_group_context@d1@23@@Z\n?is_group_execution_cancelled@r1@detail@tbb@@YA_NAEAVtask_group_context@d1@23@@Z\n?reset@r1@detail@tbb@@YAXAEAVtask_group_context@d1@23@@Z\n?cancel_group_execution@r1@detail@tbb@@YA_NAEAVtask_group_context@d1@23@@Z\n?capture_fp_settings@r1@detail@tbb@@YAXAEAVtask_group_context@d1@23@@Z\n\n; Task arena (arena.cpp)\n?max_concurrency@r1@detail@tbb@@YAHPEBVtask_arena_base@d1@23@@Z\n?initialize@r1@detail@tbb@@YAXAEAVtask_arena_base@d1@23@@Z\n?terminate@r1@detail@tbb@@YAXAEAVtask_arena_base@d1@23@@Z\n?execute@r1@detail@tbb@@YAXAEAVtask_arena_base@d1@23@AEAVdelegate_base@523@@Z\n?wait@r1@detail@tbb@@YAXAEAVtask_arena_base@d1@23@@Z\n?attach@r1@detail@tbb@@YA_NAEAVtask_arena_base@d1@23@@Z\n?isolate_within_arena@r1@detail@tbb@@YAXAEAVdelegate_base@d1@23@_J@Z\n?enqueue@r1@detail@tbb@@YAXAEAVtask@d1@23@PEAVtask_arena_base@523@@Z\n?enqueue@r1@detail@tbb@@YAXAEAVtask@d1@23@AEAVtask_group_context@523@PEAVtask_arena_base@523@@Z\n?execution_slot@r1@detail@tbb@@YAGAEBVtask_arena_base@d1@23@@Z\n?enter_parallel_phase@r1@detail@tbb@@YAXPEAVtask_arena_base@d1@23@_K@Z\n?exit_parallel_phase@r1@detail@tbb@@YAXPEAVtask_arena_base@d1@23@_K@Z\n\n; System topology parsing and threads pinning (governor.cpp)\n?numa_node_count@r1@detail@tbb@@YAIXZ\n?fill_numa_indices@r1@detail@tbb@@YAXPEAH@Z\n?core_type_count@r1@detail@tbb@@YAI_J@Z\n?fill_core_type_indices@r1@detail@tbb@@YAXPEAH_J@Z\n?numa_default_concurrency@r1@detail@tbb@@YAHH@Z\n?constraints_default_concurrency@r1@detail@tbb@@YAHAEBUconstraints@d1@23@_J@Z\n?constraints_threads_per_core@r1@detail@tbb@@YAHAEBUconstraints@d1@23@_J@Z\n\n; Observer (observer_proxy.cpp)\n?observe@r1@detail@tbb@@YAXAEAVtask_scheduler_observer@d1@23@_N@Z\n\n; Queuing RW Mutex (queuing_rw_mutex.cpp)\n?construct@r1@detail@tbb@@YAXAEAVqueuing_rw_mutex@d1@23@@Z\n?try_acquire@r1@detail@tbb@@YA_NAEAVqueuing_rw_mutex@d1@23@AEAVscoped_lock@4523@_N@Z\n?acquire@r1@detail@tbb@@YAXAEAVqueuing_rw_mutex@d1@23@AEAVscoped_lock@4523@_N@Z\n?release@r1@detail@tbb@@YAXAEAVscoped_lock@queuing_rw_mutex@d1@23@@Z\n?upgrade_to_writer@r1@detail@tbb@@YA_NAEAVscoped_lock@queuing_rw_mutex@d1@23@@Z\n?downgrade_to_reader@r1@detail@tbb@@YA_NAEAVscoped_lock@queuing_rw_mutex@d1@23@@Z\n?is_writer@r1@detail@tbb@@YA_NAEBVscoped_lock@queuing_rw_mutex@d1@23@@Z\n\n; Global control (global_control.cpp)\n?global_control_active_value@r1@detail@tbb@@YA_KH@Z\n?create@r1@detail@tbb@@YAXAEAVglobal_control@d1@23@@Z\n?destroy@r1@detail@tbb@@YAXAEAVglobal_control@d1@23@@Z\n?get@r1@detail@tbb@@YAXAEAVtask_scheduler_handle@d1@23@@Z\n?finalize@r1@detail@tbb@@YA_NAEAVtask_scheduler_handle@d1@23@_J@Z\n\n; Parallel pipeline (parallel_pipeline.cpp)\n?set_end_of_input@r1@detail@tbb@@YAXAEAVbase_filter@d1@23@@Z\n?parallel_pipeline@r1@detail@tbb@@YAXAEAVtask_group_context@d1@23@_KAEBVfilter_node@523@@Z\n\n; Concurrent bounded queue (concurrent_bounded_queue.cpp)\n?allocate_bounded_queue_rep@r1@detail@tbb@@YAPEAE_K@Z\n?deallocate_bounded_queue_rep@r1@detail@tbb@@YAXPEAE_K@Z\n?wait_bounded_queue_monitor@r1@detail@tbb@@YAXPEAVconcurrent_monitor@123@_K_JAEAVdelegate_base@d1@23@@Z\n?abort_bounded_queue_monitors@r1@detail@tbb@@YAXPEAVconcurrent_monitor@123@@Z\n?notify_bounded_queue_monitor@r1@detail@tbb@@YAXPEAVconcurrent_monitor@123@_K1@Z\n\n; Concurrent monitor (address_waiter.cpp)\n?wait_on_address@r1@detail@tbb@@YAXPEAXAEAVdelegate_base@d1@23@_K@Z\n?notify_by_address@r1@detail@tbb@@YAXPEAX_K@Z\n?notify_by_address_one@r1@detail@tbb@@YAXPEAX@Z\n?notify_by_address_all@r1@detail@tbb@@YAXPEAX@Z\n\n;; Versioning (version.cpp)\nTBB_runtime_interface_version\nTBB_runtime_version\n"
  },
  {
    "path": "third-party/tbb/src/tbb/dynamic_link.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"dynamic_link.h\"\n#include \"environment.h\"\n\n#include \"oneapi/tbb/detail/_template_helpers.h\"\n#include \"oneapi/tbb/detail/_utils.h\"\n\n/*\n    This file is used by both TBB and OpenMP RTL. Do not use __TBB_ASSERT() macro\n    and runtime_warning() function because they are not available in OpenMP. Use\n    __TBB_ASSERT_EX and DYNAMIC_LINK_WARNING instead.\n*/\n\n#include <cstdarg>          // va_list etc.\n#include <cstring>          // strrchr\n#if _WIN32\n    #include <malloc.h>\n\n    // Unify system calls\n    #define dlopen( name, flags )   LoadLibrary( name )\n    #define dlsym( handle, name )   GetProcAddress( handle, name )\n    // FreeLibrary return bool value that is not used.\n    #define dlclose( handle )       (void)( ! FreeLibrary( handle ) )\n    #define dlerror()               GetLastError()\n#ifndef PATH_MAX\n    #define PATH_MAX                MAX_PATH\n#endif\n#else /* _WIN32 */\n    #include <dlfcn.h>\n    #include <unistd.h>\n\n    #include <climits>\n    #include <cstdlib>\n#endif /* _WIN32 */\n\n#if __TBB_WEAK_SYMBOLS_PRESENT && !__TBB_DYNAMIC_LOAD_ENABLED\n    //TODO: use function attribute for weak symbols instead of the pragma.\n    #pragma weak dlopen\n    #pragma weak dlsym\n    #pragma weak dlclose\n#endif /* __TBB_WEAK_SYMBOLS_PRESENT && !__TBB_DYNAMIC_LOAD_ENABLED */\n\n\n#define __USE_STATIC_DL_INIT    ( !__ANDROID__ )\n\n\n/*\ndynamic_link is a common interface for searching for required symbols in an\nexecutable and dynamic libraries.\n\ndynamic_link provides certain guarantees:\n  1. Either all or none of the requested symbols are resolved. Moreover, if\n  symbols are not resolved, the dynamic_link_descriptor table is not modified;\n  2. All returned symbols have secured lifetime: this means that none of them\n  can be invalidated until dynamic_unlink is called;\n  3. Any loaded library is loaded only via the full path. The full path is that\n  from which the runtime itself was loaded. (This is done to avoid security\n  issues caused by loading libraries from insecure paths).\n\ndynamic_link searches for the requested symbols in three stages, stopping as\nsoon as all of the symbols have been resolved.\n\n  1. Search the global scope:\n    a. On Windows: dynamic_link tries to obtain the handle of the requested\n    library and if it succeeds it resolves the symbols via that handle.\n    b. On Linux: dynamic_link tries to search for the symbols in the global\n    scope via the main program handle. If the symbols are present in the global\n    scope their lifetime is not guaranteed (since dynamic_link does not know\n    anything about the library from which they are exported). Therefore it\n    tries to \"pin\" the symbols by obtaining the library name and reopening it.\n    dlopen may fail to reopen the library in two cases:\n       i. The symbols are exported from the executable. Currently dynamic _link\n      cannot handle this situation, so it will not find these symbols in this\n      step.\n      ii. The necessary library has been unloaded and cannot be reloaded. It\n      seems there is nothing that can be done in this case. No symbols are\n      returned.\n\n  2. Dynamic load: an attempt is made to load the requested library via the\n  full path.\n    The full path used is that from which the runtime itself was loaded. If the\n    library can be loaded, then an attempt is made to resolve the requested\n    symbols in the newly loaded library.\n    If the symbols are not found the library is unloaded.\n\n  3. Weak symbols: if weak symbols are available they are returned.\n*/\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n#if __TBB_WEAK_SYMBOLS_PRESENT || __TBB_DYNAMIC_LOAD_ENABLED\n\n#if !defined(DYNAMIC_LINK_WARNING) && !__TBB_WIN8UI_SUPPORT && __TBB_DYNAMIC_LOAD_ENABLED\n    // Report runtime errors and continue.\n    #define DYNAMIC_LINK_WARNING dynamic_link_warning\n    static void dynamic_link_warning( dynamic_link_error_t code, ... ) {\n        suppress_unused_warning(code);\n    } // library_warning\n#endif /* !defined(DYNAMIC_LINK_WARNING) && !__TBB_WIN8UI_SUPPORT && __TBB_DYNAMIC_LOAD_ENABLED */\n\n    static bool resolve_symbols( dynamic_link_handle module, const dynamic_link_descriptor descriptors[], std::size_t required )\n    {\n        if ( !module )\n            return false;\n\n        #if !__TBB_DYNAMIC_LOAD_ENABLED /* only __TBB_WEAK_SYMBOLS_PRESENT is defined */\n            if ( !dlsym ) return false;\n        #endif /* !__TBB_DYNAMIC_LOAD_ENABLED */\n\n        const std::size_t n_desc=20; // Usually we don't have more than 20 descriptors per library\n        __TBB_ASSERT_EX( required <= n_desc, \"Too many descriptors is required\" );\n        if ( required > n_desc ) return false;\n        pointer_to_handler h[n_desc];\n\n        for ( std::size_t k = 0; k < required; ++k ) {\n            dynamic_link_descriptor const & desc = descriptors[k];\n            pointer_to_handler addr = (pointer_to_handler)dlsym( module, desc.name );\n            if ( !addr ) {\n                return false;\n            }\n            h[k] = addr;\n        }\n\n        // Commit the entry points.\n        // Cannot use memset here, because the writes must be atomic.\n        for( std::size_t k = 0; k < required; ++k )\n            *descriptors[k].handler = h[k];\n        return true;\n    }\n\n#if __TBB_WIN8UI_SUPPORT\n    bool dynamic_link( const char*  library, const dynamic_link_descriptor descriptors[], std::size_t required, dynamic_link_handle*, int flags ) {\n        dynamic_link_handle tmp_handle = nullptr;\n        TCHAR wlibrary[256];\n        if ( MultiByteToWideChar(CP_UTF8, 0, library, -1, wlibrary, 255) == 0 ) return false;\n        if ( flags & DYNAMIC_LINK_LOAD )\n            tmp_handle = LoadPackagedLibrary( wlibrary, 0 );\n        if (tmp_handle != nullptr){\n            return resolve_symbols(tmp_handle, descriptors, required);\n        }else{\n            return false;\n        }\n    }\n    void dynamic_unlink( dynamic_link_handle ) {}\n    void dynamic_unlink_all() {}\n#else\n#if __TBB_DYNAMIC_LOAD_ENABLED\n/*\n    There is a security issue on Windows: LoadLibrary() may load and execute malicious code.\n    See http://www.microsoft.com/technet/security/advisory/2269637.mspx for details.\n    To avoid the issue, we have to pass full path (not just library name) to LoadLibrary. This\n    function constructs full path to the specified library (it is assumed the library located\n    side-by-side with the tbb.dll.\n\n    The function constructs absolute path for given relative path. Important: Base directory is not\n    current one, it is the directory tbb.dll loaded from.\n\n    Example:\n        Let us assume \"tbb.dll\" is located in \"c:\\program files\\common\\intel\\\" directory, e.g.\n        absolute path of the library is \"c:\\program files\\common\\intel\\tbb.dll\". Absolute path for\n        \"tbbmalloc.dll\" would be \"c:\\program files\\common\\intel\\tbbmalloc.dll\". Absolute path for\n        \"malloc\\tbbmalloc.dll\" would be \"c:\\program files\\common\\intel\\malloc\\tbbmalloc.dll\".\n*/\n\n    // Struct handle_storage is used by dynamic_link routine to store handles of\n    // all loaded or pinned dynamic libraries. When TBB is shut down, it calls\n    // dynamic_unlink_all() that unloads modules referenced by handle_storage.\n    // This struct should not have any constructors since it may be used before\n    // the constructor is called.\n    #define MAX_LOADED_MODULES 8 // The number of maximum possible modules which can be loaded\n\n    using atomic_incrementer = std::atomic<std::size_t>;\n\n    static struct handles_t {\n        atomic_incrementer my_size;\n        dynamic_link_handle my_handles[MAX_LOADED_MODULES];\n\n        void add(const dynamic_link_handle &handle) {\n            const std::size_t ind = my_size++;\n            __TBB_ASSERT_EX( ind < MAX_LOADED_MODULES, \"Too many modules are loaded\" );\n            my_handles[ind] = handle;\n        }\n\n        void free() {\n            const std::size_t size = my_size;\n            for (std::size_t i=0; i<size; ++i)\n                dynamic_unlink( my_handles[i] );\n        }\n    } handles;\n\n    static std::once_flag init_dl_data_state;\n\n    static struct ap_data_t {\n        char _path[PATH_MAX+1];\n        std::size_t _len;\n    } ap_data;\n\n    static void init_ap_data() {\n    #if _WIN32\n        // Get handle of our DLL first.\n        HMODULE handle;\n        BOOL brc = GetModuleHandleEx(\n            GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,\n            (LPCSTR)( & dynamic_link ), // any function inside the library can be used for the address\n            & handle\n            );\n        if ( !brc ) { // Error occurred.\n            int err = GetLastError();\n            DYNAMIC_LINK_WARNING( dl_sys_fail, \"GetModuleHandleEx\", err );\n            return;\n        }\n        // Now get path to our DLL.\n        DWORD drc = GetModuleFileName( handle, ap_data._path, static_cast< DWORD >( PATH_MAX ) );\n        if ( drc == 0 ) { // Error occurred.\n            int err = GetLastError();\n            DYNAMIC_LINK_WARNING( dl_sys_fail, \"GetModuleFileName\", err );\n            return;\n        }\n        if ( drc >= PATH_MAX ) { // Buffer too short.\n            DYNAMIC_LINK_WARNING( dl_buff_too_small );\n            return;\n        }\n        // Find the position of the last backslash.\n        char *backslash = std::strrchr( ap_data._path, '\\\\' );\n\n        if ( !backslash ) {    // Backslash not found.\n            __TBB_ASSERT_EX( backslash != nullptr, \"Unbelievable.\");\n            return;\n        }\n        __TBB_ASSERT_EX( backslash >= ap_data._path, \"Unbelievable.\");\n        ap_data._len = (std::size_t)(backslash - ap_data._path) + 1;\n        *(backslash+1) = 0;\n    #else\n        // Get the library path\n        Dl_info dlinfo;\n        int res = dladdr( (void*)&dynamic_link, &dlinfo ); // any function inside the library can be used for the address\n        if ( !res ) {\n            char const * err = dlerror();\n            DYNAMIC_LINK_WARNING( dl_sys_fail, \"dladdr\", err );\n            return;\n        } else {\n            __TBB_ASSERT_EX( dlinfo.dli_fname!=nullptr, \"Unbelievable.\" );\n        }\n\n        char const *slash = std::strrchr( dlinfo.dli_fname, '/' );\n        std::size_t fname_len=0;\n        if ( slash ) {\n            __TBB_ASSERT_EX( slash >= dlinfo.dli_fname, \"Unbelievable.\");\n            fname_len = (std::size_t)(slash - dlinfo.dli_fname) + 1;\n        }\n\n        std::size_t rc;\n        if ( dlinfo.dli_fname[0]=='/' ) {\n            // The library path is absolute\n            rc = 0;\n            ap_data._len = 0;\n        } else {\n            // The library path is relative so get the current working directory\n            if ( !getcwd( ap_data._path, sizeof(ap_data._path)/sizeof(ap_data._path[0]) ) ) {\n                DYNAMIC_LINK_WARNING( dl_buff_too_small );\n                return;\n            }\n            ap_data._len = std::strlen( ap_data._path );\n            ap_data._path[ap_data._len++]='/';\n            rc = ap_data._len;\n        }\n\n        if ( fname_len>0 ) {\n            ap_data._len += fname_len;\n            if ( ap_data._len>PATH_MAX ) {\n                DYNAMIC_LINK_WARNING( dl_buff_too_small );\n                ap_data._len=0;\n                return;\n            }\n            std::strncpy( ap_data._path+rc, dlinfo.dli_fname, fname_len );\n            ap_data._path[ap_data._len]=0;\n        }\n    #endif /* _WIN32 */\n    }\n\n    static void init_dl_data() {\n        init_ap_data();\n    }\n\n    /*\n        The function constructs absolute path for given relative path. Important: Base directory is not\n        current one, it is the directory libtbb.so loaded from.\n\n        Arguments:\n        in  name -- Name of a file (may be with relative path; it must not be an absolute one).\n        out path -- Buffer to save result (absolute path) to.\n        in  len  -- Size of buffer.\n        ret      -- 0         -- Error occurred.\n                    > len     -- Buffer too short, required size returned.\n                    otherwise -- Ok, number of characters (incl. terminating null) written to buffer.\n    */\n    static std::size_t abs_path( char const * name, char * path, std::size_t len ) {\n        if ( ap_data._len == 0 )\n            return 0;\n\n        std::size_t name_len = std::strlen( name );\n        std::size_t full_len = name_len+ap_data._len;\n        if ( full_len < len ) {\n            __TBB_ASSERT( ap_data._path[ap_data._len] == 0, nullptr);\n            __TBB_ASSERT( std::strlen(ap_data._path) == ap_data._len, nullptr);\n            std::strncpy( path, ap_data._path, ap_data._len + 1 );\n            __TBB_ASSERT( path[ap_data._len] == 0, nullptr);\n            std::strncat( path, name, len - ap_data._len );\n            __TBB_ASSERT( std::strlen(path) == full_len, nullptr);\n        }\n        return full_len+1; // +1 for null character\n    }\n#endif  // __TBB_DYNAMIC_LOAD_ENABLED\n    void init_dynamic_link_data() {\n    #if __TBB_DYNAMIC_LOAD_ENABLED\n        std::call_once( init_dl_data_state, init_dl_data );\n    #endif\n    }\n\n    #if __USE_STATIC_DL_INIT\n    // ap_data structure is initialized with current directory on Linux.\n    // So it should be initialized as soon as possible since the current directory may be changed.\n    // static_init_ap_data object provides this initialization during library loading.\n    static struct static_init_dl_data_t {\n        static_init_dl_data_t() {\n            init_dynamic_link_data();\n        }\n    } static_init_dl_data;\n    #endif\n\n    #if __TBB_WEAK_SYMBOLS_PRESENT\n    static bool weak_symbol_link( const dynamic_link_descriptor descriptors[], std::size_t required )\n    {\n        // Check if the required entries are present in what was loaded into our process.\n        for ( std::size_t k = 0; k < required; ++k )\n            if ( !descriptors[k].ptr )\n                return false;\n        // Commit the entry points.\n        for ( std::size_t k = 0; k < required; ++k )\n            *descriptors[k].handler = (pointer_to_handler) descriptors[k].ptr;\n        return true;\n    }\n    #else\n    static bool weak_symbol_link( const dynamic_link_descriptor[], std::size_t ) {\n        return false;\n    }\n    #endif /* __TBB_WEAK_SYMBOLS_PRESENT */\n\n    void dynamic_unlink( dynamic_link_handle handle ) {\n    #if !__TBB_DYNAMIC_LOAD_ENABLED /* only __TBB_WEAK_SYMBOLS_PRESENT is defined */\n        if ( !dlclose ) return;\n    #endif\n        if ( handle ) {\n            dlclose( handle );\n        }\n    }\n\n    void dynamic_unlink_all() {\n    #if __TBB_DYNAMIC_LOAD_ENABLED\n        handles.free();\n    #endif\n    }\n\n    static dynamic_link_handle global_symbols_link( const char* library, const dynamic_link_descriptor descriptors[], std::size_t required ) {\n        dynamic_link_handle library_handle{};\n#if _WIN32\n        auto res = GetModuleHandleEx(0, library, &library_handle);\n        __TBB_ASSERT_EX((res && library_handle) || (!res && !library_handle), nullptr);\n#else /* _WIN32 */\n    #if !__TBB_DYNAMIC_LOAD_ENABLED /* only __TBB_WEAK_SYMBOLS_PRESENT is defined */\n        if ( !dlopen ) return 0;\n    #endif /* !__TBB_DYNAMIC_LOAD_ENABLED */\n        // RTLD_GLOBAL - to guarantee that old TBB will find the loaded library\n        // RTLD_NOLOAD - not to load the library without the full path\n        library_handle = dlopen(library, RTLD_LAZY | RTLD_GLOBAL | RTLD_NOLOAD);\n#endif /* _WIN32 */\n        if (library_handle) {\n            if (!resolve_symbols(library_handle, descriptors, required)) {\n                dynamic_unlink(library_handle);\n                library_handle = nullptr;\n            }\n        }\n        return library_handle;\n    }\n\n    static void save_library_handle( dynamic_link_handle src, dynamic_link_handle *dst ) {\n        __TBB_ASSERT_EX( src, \"The library handle to store must be non-zero\" );\n        if ( dst )\n            *dst = src;\n    #if __TBB_DYNAMIC_LOAD_ENABLED\n        else\n            handles.add( src );\n    #endif /* __TBB_DYNAMIC_LOAD_ENABLED */\n    }\n\n#if !_WIN32\n    int loading_flags(bool local_binding) {\n        int flags = RTLD_NOW;\n        if (local_binding) {\n            flags = flags | RTLD_LOCAL;\n#if (__linux__ && __GLIBC__) && !__TBB_USE_SANITIZERS\n            if( !GetBoolEnvironmentVariable(\"TBB_ENABLE_SANITIZERS\") ) {\n                flags = flags | RTLD_DEEPBIND;\n            }\n#endif\n        } else {\n            flags = flags | RTLD_GLOBAL;\n        }\n        return flags;\n    }\n#endif\n\n    dynamic_link_handle dynamic_load( const char* library, const dynamic_link_descriptor descriptors[], std::size_t required, bool local_binding ) {\n        ::tbb::detail::suppress_unused_warning( library, descriptors, required, local_binding );\n#if __TBB_DYNAMIC_LOAD_ENABLED\n        std::size_t const len = PATH_MAX + 1;\n        char path[ len ];\n        std::size_t rc = abs_path( library, path, len );\n        if ( 0 < rc && rc <= len ) {\n#if _WIN32\n            // Prevent Windows from displaying silly message boxes if it fails to load library\n            // (e.g. because of MS runtime problems - one of those crazy manifest related ones)\n            UINT prev_mode = SetErrorMode (SEM_FAILCRITICALERRORS);\n#endif /* _WIN32 */\n            // The second argument (loading_flags) is ignored on Windows\n            dynamic_link_handle library_handle = dlopen( path, loading_flags(local_binding) );\n#if _WIN32\n            SetErrorMode (prev_mode);\n#endif /* _WIN32 */\n            if( library_handle ) {\n                if( !resolve_symbols( library_handle, descriptors, required ) ) {\n                    // The loaded library does not contain all the expected entry points\n                    dynamic_unlink( library_handle );\n                    library_handle = nullptr;\n                }\n            } else\n                DYNAMIC_LINK_WARNING( dl_lib_not_found, path, dlerror() );\n            return library_handle;\n        } else if ( rc>len )\n                DYNAMIC_LINK_WARNING( dl_buff_too_small );\n                // rc == 0 means failing of init_ap_data so the warning has already been issued.\n\n#endif /* __TBB_DYNAMIC_LOAD_ENABLED */\n            return nullptr;\n    }\n\n    bool dynamic_link( const char* library, const dynamic_link_descriptor descriptors[], std::size_t required, dynamic_link_handle *handle, int flags ) {\n        init_dynamic_link_data();\n\n        // TODO: May global_symbols_link find weak symbols?\n        dynamic_link_handle library_handle = ( flags & DYNAMIC_LINK_GLOBAL ) ? global_symbols_link( library, descriptors, required ) : nullptr;\n\n#if defined(_MSC_VER) && _MSC_VER <= 1900\n#pragma warning (push)\n// MSVC 2015 warning: 'int': forcing value to bool 'true' or 'false'\n#pragma warning (disable: 4800)\n#endif\n        if ( !library_handle && ( flags & DYNAMIC_LINK_LOAD ) )\n            library_handle = dynamic_load( library, descriptors, required, flags & DYNAMIC_LINK_LOCAL );\n\n#if defined(_MSC_VER) && _MSC_VER <= 1900\n#pragma warning (pop)\n#endif\n        if ( !library_handle && ( flags & DYNAMIC_LINK_WEAK ) )\n            return weak_symbol_link( descriptors, required );\n\n        if ( library_handle ) {\n            save_library_handle( library_handle, handle );\n            return true;\n        }\n        return false;\n    }\n\n#endif /*__TBB_WIN8UI_SUPPORT*/\n#else /* __TBB_WEAK_SYMBOLS_PRESENT || __TBB_DYNAMIC_LOAD_ENABLED */\n    bool dynamic_link( const char*, const dynamic_link_descriptor*, std::size_t, dynamic_link_handle *handle, int ) {\n        if ( handle )\n            *handle=0;\n        return false;\n    }\n    void dynamic_unlink( dynamic_link_handle ) {}\n    void dynamic_unlink_all() {}\n#endif /* __TBB_WEAK_SYMBOLS_PRESENT || __TBB_DYNAMIC_LOAD_ENABLED */\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/dynamic_link.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_dynamic_link\n#define __TBB_dynamic_link\n\n// Support for dynamic loading entry points from other shared libraries.\n\n#include \"oneapi/tbb/detail/_config.h\"\n\n#include <atomic>\n#include <mutex>\n\n/** By default, symbols declared and defined here go into namespace tbb::internal.\n    To put them in other namespace, define macros OPEN_INTERNAL_NAMESPACE\n    and CLOSE_INTERNAL_NAMESPACE to override the following default definitions. **/\n\n#include <cstddef>\n#ifdef _WIN32\n#include <windows.h>\n#endif /* _WIN32 */\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n//! Type definition for a pointer to a void somefunc(void)\ntypedef void (*pointer_to_handler)();\n\n//! The helper to construct dynamic_link_descriptor structure\n// Double cast through the void* in DLD macro is necessary to\n// prevent warnings from some compilers (g++ 4.1)\n#if __TBB_WEAK_SYMBOLS_PRESENT\n#define DLD(s,h) {#s, (pointer_to_handler*)(void*)(&h), (pointer_to_handler)&s}\n#define DLD_NOWEAK(s,h) {#s, (pointer_to_handler*)(void*)(&h), nullptr}\n#else\n#define DLD(s,h) {#s, (pointer_to_handler*)(void*)(&h)}\n#define DLD_NOWEAK(s,h) DLD(s,h)\n#endif /* __TBB_WEAK_SYMBOLS_PRESENT */\n//! Association between a handler name and location of pointer to it.\nstruct dynamic_link_descriptor {\n    //! Name of the handler\n    const char* name;\n    //! Pointer to the handler\n    pointer_to_handler* handler;\n#if __TBB_WEAK_SYMBOLS_PRESENT\n    //! Weak symbol\n    pointer_to_handler ptr;\n#endif\n};\n\n#if _WIN32\nusing dynamic_link_handle = HMODULE;\n#else\nusing dynamic_link_handle = void*;\n#endif /* _WIN32 */\n\nconst int DYNAMIC_LINK_GLOBAL        = 0x01;\nconst int DYNAMIC_LINK_LOAD          = 0x02;\nconst int DYNAMIC_LINK_WEAK          = 0x04;\nconst int DYNAMIC_LINK_LOCAL         = 0x08;\n\nconst int DYNAMIC_LINK_LOCAL_BINDING = DYNAMIC_LINK_LOCAL | DYNAMIC_LINK_LOAD;\nconst int DYNAMIC_LINK_DEFAULT       = DYNAMIC_LINK_GLOBAL | DYNAMIC_LINK_LOAD | DYNAMIC_LINK_WEAK;\n\n//! Fill in dynamically linked handlers.\n/** 'library' is the name of the requested library. It should not contain a full\n    path since dynamic_link adds the full path (from which the runtime itself\n    was loaded) to the library name.\n    'required' is the number of the initial entries in the array descriptors[]\n    that have to be found in order for the call to succeed. If the library and\n    all the required handlers are found, then the corresponding handler\n    pointers are set, and the return value is true.  Otherwise the original\n    array of descriptors is left untouched and the return value is false.\n    'required' is limited by 20 (exceeding of this value will result in failure\n    to load the symbols and the return value will be false).\n    'handle' is the handle of the library if it is loaded. Otherwise it is left\n    untouched.\n    'flags' is the set of DYNAMIC_LINK_* flags. Each of the DYNAMIC_LINK_* flags\n    allows its corresponding linking stage.\n**/\nbool dynamic_link( const char* library,\n                   const dynamic_link_descriptor descriptors[],\n                   std::size_t required,\n                   dynamic_link_handle* handle = nullptr,\n                   int flags = DYNAMIC_LINK_DEFAULT );\n\nvoid dynamic_unlink( dynamic_link_handle handle );\n\nvoid dynamic_unlink_all();\n\nenum dynamic_link_error_t {\n    dl_success = 0,\n    dl_lib_not_found,     // char const * lib, dlerr_t err\n    dl_sym_not_found,     // char const * sym, dlerr_t err\n                          // Note: dlerr_t depends on OS: it is char const * on Linux* and macOS*, int on Windows*.\n    dl_sys_fail,          // char const * func, int err\n    dl_buff_too_small     // none\n}; // dynamic_link_error_t\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /* __TBB_dynamic_link */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/environment.h",
    "content": "/*\n    Copyright (c) 2018-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_tbb_environment_H\n#define __TBB_tbb_environment_H\n\n#include <cstdlib>\n#include <cstring>\n#include <cerrno>\n#include <cctype>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n#if __TBB_WIN8UI_SUPPORT\nstatic inline bool GetBoolEnvironmentVariable( const char * ) {\n    return false;\n}\n\nstatic inline long GetIntegralEnvironmentVariable( const char * ) {\n    return -1;\n}\n#else  /* __TBB_WIN8UI_SUPPORT */\nstatic inline bool GetBoolEnvironmentVariable( const char * name ) {\n    if ( const char* s = std::getenv(name) ) {\n        // The result is defined as true only if the environment variable contains\n        // no characters except one '1' character and an arbitrary number of spaces\n        // (including the absence of spaces).\n        size_t index = std::strspn(s, \" \");\n        if (s[index] != '1') return false;\n        index++;\n        // Memory access after incrementing is safe, since the getenv() returns a\n        // null-terminated string, and even if the character getting by index is '1',\n        // and this character is the end of string, after incrementing we will get\n        // an index of character, that contains '\\0'\n        index += std::strspn(&s[index], \" \");\n        return !s[index];\n    }\n    return false;\n}\n\nstatic inline long GetIntegralEnvironmentVariable( const char * name ) {\n    if ( const char* s = std::getenv(name) ) {\n        char* end = nullptr;\n        errno = 0;\n        long value = std::strtol(s, &end, 10);\n\n        // We have exceeded the range, value is negative or string is incovertable\n        if ( errno == ERANGE || value < 0 || end==s ) {\n            return -1;\n        }\n        for ( ; *end != '\\0'; end++ ) {\n            if ( !std::isspace(*end) ) {\n                return -1;\n            }\n        }\n        return value;\n    }\n    return -1;\n}\n#endif /* __TBB_WIN8UI_SUPPORT */\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_tbb_environment_H\n"
  },
  {
    "path": "third-party/tbb/src/tbb/exception.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/detail/_exception.h\"\n#include \"oneapi/tbb/detail/_assert.h\"\n#include \"oneapi/tbb/detail/_template_helpers.h\"\n\n#include <cstring>\n#include <cstdio>\n#include <stdexcept> // std::runtime_error\n#include <new>\n#include <stdexcept>\n\n#define __TBB_STD_RETHROW_EXCEPTION_POSSIBLY_BROKEN                             \\\n    (__GLIBCXX__ && __TBB_GLIBCXX_VERSION>=40700 && __TBB_GLIBCXX_VERSION<60000 && TBB_USE_EXCEPTIONS)\n\n#if __TBB_STD_RETHROW_EXCEPTION_POSSIBLY_BROKEN\n// GCC ABI declarations necessary for a workaround\n#include <cxxabi.h>\n#endif\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nconst char* bad_last_alloc::what() const noexcept(true) { return \"bad allocation in previous or concurrent attempt\"; }\nconst char* user_abort::what() const noexcept(true) { return \"User-initiated abort has terminated this operation\"; }\nconst char* missing_wait::what() const noexcept(true) { return \"wait() was not called on the structured_task_group\"; }\n\n#if TBB_USE_EXCEPTIONS\n    template <typename F>\n    /*[[noreturn]]*/ void do_throw_noexcept(F throw_func) noexcept {\n        throw_func();\n    }\n\n    /*[[noreturn]]*/ void do_throw_noexcept(void (*throw_func)()) noexcept {\n        throw_func();\n#if __GNUC__ == 7\n        // In release, GCC 7 loses noexcept attribute during tail call optimization.\n        // The following statement prevents tail call optimization.\n        volatile bool reach_this_point = true;\n        suppress_unused_warning(reach_this_point);\n#endif\n    }\n\n    bool terminate_on_exception(); // defined in global_control.cpp and ipc_server.cpp\n\n    template <typename F>\n    /*[[noreturn]]*/ void do_throw(F throw_func) {\n        if (terminate_on_exception()) {\n            do_throw_noexcept(throw_func);\n        }\n        throw_func();\n    }\n\n    #define DO_THROW(exc, init_args) do_throw( []{ throw exc init_args; } );\n#else /* !TBB_USE_EXCEPTIONS */\n    #define PRINT_ERROR_AND_ABORT(exc_name, msg) \\\n        std::fprintf (stderr, \"Exception %s with message %s would have been thrown, \"  \\\n            \"if exception handling had not been disabled. Aborting.\\n\", exc_name, msg); \\\n        std::fflush(stderr); \\\n        std::abort();\n    #define DO_THROW(exc, init_args) PRINT_ERROR_AND_ABORT(#exc, #init_args)\n#endif /* !TBB_USE_EXCEPTIONS */\n\nvoid throw_exception ( exception_id eid ) {\n    switch ( eid ) {\n    case exception_id::bad_alloc: DO_THROW(std::bad_alloc, ()); break;\n    case exception_id::bad_last_alloc: DO_THROW(bad_last_alloc, ()); break;\n    case exception_id::user_abort: DO_THROW( user_abort, () ); break;\n    case exception_id::nonpositive_step: DO_THROW(std::invalid_argument, (\"Step must be positive\") ); break;\n    case exception_id::out_of_range: DO_THROW(std::out_of_range, (\"Index out of requested size range\")); break;\n    case exception_id::reservation_length_error: DO_THROW(std::length_error, (\"Attempt to exceed implementation defined length limits\")); break;\n    case exception_id::missing_wait: DO_THROW(missing_wait, ()); break;\n    case exception_id::invalid_load_factor: DO_THROW(std::out_of_range, (\"Invalid hash load factor\")); break;\n    case exception_id::invalid_key: DO_THROW(std::out_of_range, (\"invalid key\")); break;\n    case exception_id::bad_tagged_msg_cast: DO_THROW(std::runtime_error, (\"Illegal tagged_msg cast\")); break;\n    case exception_id::unsafe_wait: DO_THROW(unsafe_wait, (\"Unsafe to wait further\")); break;\n    default: __TBB_ASSERT ( false, \"Unknown exception ID\" );\n    }\n    __TBB_ASSERT(false, \"Unreachable code\");\n}\n\n/* The \"what\" should be fairly short, not more than about 128 characters.\n   Because we control all the call sites to handle_perror, it is pointless\n   to bullet-proof it for very long strings.\n\n   Design note: ADR put this routine off to the side in tbb_misc.cpp instead of\n   Task.cpp because the throw generates a pathetic lot of code, and ADR wanted\n   this large chunk of code to be placed on a cold page. */\nvoid handle_perror( int error_code, const char* what ) {\n    const int BUF_SIZE = 255;\n    char buf[BUF_SIZE + 1] = { 0 };\n    std::strncat(buf, what, BUF_SIZE);\n    std::size_t buf_len = std::strlen(buf);\n    if (error_code) {\n        std::strncat(buf, \": \", BUF_SIZE - buf_len);\n        buf_len = std::strlen(buf);\n        std::strncat(buf, std::strerror(error_code), BUF_SIZE - buf_len);\n        buf_len = std::strlen(buf);\n    }\n    __TBB_ASSERT(buf_len <= BUF_SIZE && buf[buf_len] == 0, nullptr);\n#if TBB_USE_EXCEPTIONS\n    do_throw([&buf] { throw std::runtime_error(buf); });\n#else\n    PRINT_ERROR_AND_ABORT( \"runtime_error\", buf);\n#endif /* !TBB_USE_EXCEPTIONS */\n}\n\n#if __TBB_STD_RETHROW_EXCEPTION_POSSIBLY_BROKEN\n// Runtime detection and workaround for the GCC bug 62258.\n// The problem is that std::rethrow_exception() does not increment a counter\n// of active exceptions, causing std::uncaught_exception() to return a wrong value.\n// The code is created after, and roughly reflects, the workaround\n// at https://gcc.gnu.org/bugzilla/attachment.cgi?id=34683\n\nvoid fix_broken_rethrow() {\n    struct gcc_eh_data {\n        void *       caughtExceptions;\n        unsigned int uncaughtExceptions;\n    };\n    gcc_eh_data* eh_data = punned_cast<gcc_eh_data*>( abi::__cxa_get_globals() );\n    ++eh_data->uncaughtExceptions;\n}\n\nbool gcc_rethrow_exception_broken() {\n    bool is_broken;\n    __TBB_ASSERT( !std::uncaught_exception(),\n        \"gcc_rethrow_exception_broken() must not be called when an exception is active\" );\n    try {\n        // Throw, catch, and rethrow an exception\n        try {\n            throw __TBB_GLIBCXX_VERSION;\n        } catch(...) {\n            std::rethrow_exception( std::current_exception() );\n        }\n    } catch(...) {\n        // Check the bug presence\n        is_broken = std::uncaught_exception();\n    }\n    if( is_broken ) fix_broken_rethrow();\n    __TBB_ASSERT( !std::uncaught_exception(), nullptr);\n    return is_broken;\n}\n#else\nvoid fix_broken_rethrow() {}\nbool gcc_rethrow_exception_broken() { return false; }\n#endif /* __TBB_STD_RETHROW_EXCEPTION_POSSIBLY_BROKEN */\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n"
  },
  {
    "path": "third-party/tbb/src/tbb/global_control.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/detail/_config.h\"\n#include \"oneapi/tbb/detail/_template_helpers.h\"\n\n#include \"oneapi/tbb/cache_aligned_allocator.h\"\n#include \"oneapi/tbb/global_control.h\"\n#include \"oneapi/tbb/tbb_allocator.h\"\n#include \"oneapi/tbb/spin_mutex.h\"\n\n#include \"governor.h\"\n#include \"threading_control.h\"\n#include \"market.h\"\n#include \"misc.h\"\n\n#include <atomic>\n#include <set>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n//! Comparator for a set of global_control objects\nstruct control_storage_comparator {\n    bool operator()(const d1::global_control* lhs, const d1::global_control* rhs) const;\n};\n\nclass control_storage {\n    friend struct global_control_impl;\n    friend std::size_t global_control_active_value(int);\n    friend void global_control_lock();\n    friend void global_control_unlock();\n    friend std::size_t global_control_active_value_unsafe(d1::global_control::parameter);\nprotected:\n    std::size_t my_active_value{0};\n    std::set<d1::global_control*, control_storage_comparator, tbb_allocator<d1::global_control*>> my_list{};\n    spin_mutex my_list_mutex{};\npublic:\n    virtual ~control_storage() = default;\n    virtual std::size_t default_value() const = 0;\n    virtual void apply_active(std::size_t new_active) {\n        my_active_value = new_active;\n    }\n    virtual bool is_first_arg_preferred(std::size_t a, std::size_t b) const {\n        return a>b; // prefer max by default\n    }\n    virtual std::size_t active_value() {\n        spin_mutex::scoped_lock lock(my_list_mutex); // protect my_list.empty() call\n        return !my_list.empty() ? my_active_value : default_value();\n    }\n\n    std::size_t active_value_unsafe() {\n        return !my_list.empty() ? my_active_value : default_value();\n    }\n};\n\nclass alignas(max_nfs_size) allowed_parallelism_control : public control_storage {\n    std::size_t default_value() const override {\n        return max(1U, governor::default_num_threads());\n    }\n    bool is_first_arg_preferred(std::size_t a, std::size_t b) const override {\n        return a<b; // prefer min allowed parallelism\n    }\n    void apply_active(std::size_t new_active) override {\n        control_storage::apply_active(new_active);\n        __TBB_ASSERT(my_active_value >= 1, nullptr);\n        // -1 to take external thread into account\n        threading_control::set_active_num_workers(my_active_value - 1);\n    }\n    std::size_t active_value() override {\n        spin_mutex::scoped_lock lock(my_list_mutex); // protect my_list.empty() call\n        if (my_list.empty()) {\n            return default_value();\n        }\n\n        // non-zero, if market is active\n        const std::size_t workers = threading_control::max_num_workers();\n        // We can't exceed market's maximal number of workers.\n        // +1 to take external thread into account\n        return workers ? min(workers + 1, my_active_value) : my_active_value;\n    }\n};\n\nclass alignas(max_nfs_size) stack_size_control : public control_storage {\n    std::size_t default_value() const override {\n#if _WIN32_WINNT >= 0x0602 /* _WIN32_WINNT_WIN8 */\n        static auto ThreadStackSizeDefault = [] {\n            ULONG_PTR hi, lo;\n            GetCurrentThreadStackLimits(&lo, &hi);\n            return hi - lo;\n        }();\n        return ThreadStackSizeDefault;\n#elif defined(EMSCRIPTEN)\n        return __TBB_EMSCRIPTEN_STACK_SIZE;\n#else\n        return ThreadStackSize;\n#endif\n    }\n    void apply_active(std::size_t new_active) override {\n        control_storage::apply_active(new_active);\n#if __TBB_WIN8UI_SUPPORT && (_WIN32_WINNT < 0x0A00)\n        __TBB_ASSERT( false, \"For Windows 8 Store* apps we must not set stack size\" );\n#endif\n    }\n};\n\nclass alignas(max_nfs_size) terminate_on_exception_control : public control_storage {\n    std::size_t default_value() const override {\n        return 0;\n    }\n};\n\nclass alignas(max_nfs_size) lifetime_control : public control_storage {\n    bool is_first_arg_preferred(std::size_t, std::size_t) const override {\n        return false; // not interested\n    }\n    std::size_t default_value() const override {\n        return 0;\n    }\n    void apply_active(std::size_t new_active) override {\n        if (new_active == 1) {\n            // reserve the market reference\n            threading_control::register_lifetime_control();\n        } else if (new_active == 0) { // new_active == 0\n            threading_control::unregister_lifetime_control(/*blocking_terminate*/ false);\n        }\n        control_storage::apply_active(new_active);\n    }\n};\n\nstatic control_storage* controls[] = {nullptr, nullptr, nullptr, nullptr};\n\nvoid global_control_acquire() {\n    controls[0] = new (cache_aligned_allocate(sizeof(allowed_parallelism_control))) allowed_parallelism_control{};\n    controls[1] = new (cache_aligned_allocate(sizeof(stack_size_control))) stack_size_control{};\n    controls[2] = new (cache_aligned_allocate(sizeof(terminate_on_exception_control))) terminate_on_exception_control{};\n    controls[3] = new (cache_aligned_allocate(sizeof(lifetime_control))) lifetime_control{};\n}\n\nvoid global_control_release() {\n    for (auto& ptr : controls) {\n        ptr->~control_storage();\n        cache_aligned_deallocate(ptr);\n        ptr = nullptr;\n    }\n}\n\nvoid global_control_lock() {\n    for (auto& ctl : controls) {\n        ctl->my_list_mutex.lock();\n    }\n}\n\nvoid global_control_unlock() {\n    int N = std::distance(std::begin(controls), std::end(controls));\n    for (int i = N - 1; i >= 0; --i) {\n        controls[i]->my_list_mutex.unlock();\n    }\n}\n\nstd::size_t global_control_active_value_unsafe(d1::global_control::parameter param) {\n    __TBB_ASSERT_RELEASE(param < d1::global_control::parameter_max, nullptr);\n    return controls[param]->active_value_unsafe();\n}\n\n//! Comparator for a set of global_control objects\ninline bool control_storage_comparator::operator()(const d1::global_control* lhs, const d1::global_control* rhs) const {\n    __TBB_ASSERT_RELEASE(lhs->my_param < d1::global_control::parameter_max , nullptr);\n    return lhs->my_value < rhs->my_value || (lhs->my_value == rhs->my_value && lhs < rhs);\n}\n\nbool terminate_on_exception() {\n    return d1::global_control::active_value(d1::global_control::terminate_on_exception) == 1;\n}\n\nstruct global_control_impl {\nprivate:\n    static bool erase_if_present(control_storage* const c, d1::global_control& gc) {\n        auto it = c->my_list.find(&gc);\n        if (it != c->my_list.end()) {\n            c->my_list.erase(it);\n            return true;\n        }\n        return false;\n    }\n\npublic:\n\n    static void create(d1::global_control& gc) {\n        __TBB_ASSERT_RELEASE(gc.my_param < d1::global_control::parameter_max, nullptr);\n        control_storage* const c = controls[gc.my_param];\n\n        spin_mutex::scoped_lock lock(c->my_list_mutex);\n        if (c->my_list.empty() || c->is_first_arg_preferred(gc.my_value, c->my_active_value)) {\n            // to guarantee that apply_active() is called with current active value,\n            // calls it here and in internal_destroy() under my_list_mutex\n            c->apply_active(gc.my_value);\n        }\n        c->my_list.insert(&gc);\n    }\n\n    static void destroy(d1::global_control& gc) {\n        __TBB_ASSERT_RELEASE(gc.my_param < d1::global_control::parameter_max, nullptr);\n        control_storage* const c = controls[gc.my_param];\n        // Concurrent reading and changing global parameter is possible.\n        spin_mutex::scoped_lock lock(c->my_list_mutex);\n        __TBB_ASSERT(gc.my_param == d1::global_control::scheduler_handle || !c->my_list.empty(), nullptr);\n        std::size_t new_active = (std::size_t)(-1), old_active = c->my_active_value;\n\n        if (!erase_if_present(c, gc)) {\n            __TBB_ASSERT(gc.my_param == d1::global_control::scheduler_handle , nullptr);\n            return;\n        }\n        if (c->my_list.empty()) {\n            __TBB_ASSERT(new_active == (std::size_t) - 1, nullptr);\n            new_active = c->default_value();\n        } else {\n            new_active = (*c->my_list.begin())->my_value;\n        }\n        if (new_active != old_active) {\n            c->apply_active(new_active);\n        }\n    }\n\n    static bool remove_and_check_if_empty(d1::global_control& gc) {\n        __TBB_ASSERT_RELEASE(gc.my_param < d1::global_control::parameter_max, nullptr);\n        control_storage* const c = controls[gc.my_param];\n\n        spin_mutex::scoped_lock lock(c->my_list_mutex);\n        __TBB_ASSERT(!c->my_list.empty(), nullptr);\n        erase_if_present(c, gc);\n        return c->my_list.empty();\n    }\n#if TBB_USE_ASSERT\n    static bool is_present(d1::global_control& gc) {\n        __TBB_ASSERT_RELEASE(gc.my_param < d1::global_control::parameter_max, nullptr);\n        control_storage* const c = controls[gc.my_param];\n\n        spin_mutex::scoped_lock lock(c->my_list_mutex);\n        auto it = c->my_list.find(&gc);\n        if (it != c->my_list.end()) {\n            return true;\n        }\n        return false;\n    }\n#endif // TBB_USE_ASSERT\n};\n\nvoid __TBB_EXPORTED_FUNC create(d1::global_control& gc) {\n    global_control_impl::create(gc);\n}\nvoid __TBB_EXPORTED_FUNC destroy(d1::global_control& gc) {\n    global_control_impl::destroy(gc);\n}\n\nbool remove_and_check_if_empty(d1::global_control& gc) {\n    return global_control_impl::remove_and_check_if_empty(gc);\n}\n#if TBB_USE_ASSERT\nbool is_present(d1::global_control& gc) {\n    return global_control_impl::is_present(gc);\n}\n#endif // TBB_USE_ASSERT\nstd::size_t __TBB_EXPORTED_FUNC global_control_active_value(int param) {\n    __TBB_ASSERT_RELEASE(param < d1::global_control::parameter_max, nullptr);\n    return controls[param]->active_value();\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/governor.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"governor.h\"\n#include \"threading_control.h\"\n#include \"main.h\"\n#include \"thread_data.h\"\n#include \"market.h\"\n#include \"arena.h\"\n#include \"dynamic_link.h\"\n#include \"concurrent_monitor.h\"\n#include \"thread_dispatcher.h\"\n\n#include \"oneapi/tbb/task_group.h\"\n#include \"oneapi/tbb/global_control.h\"\n#include \"oneapi/tbb/tbb_allocator.h\"\n#include \"oneapi/tbb/info.h\"\n\n#include \"task_dispatcher.h\"\n\n#include <cstdio>\n#include <cstdlib>\n#include <cstring>\n#include <atomic>\n#include <algorithm>\n\n#ifdef EMSCRIPTEN\n#include <emscripten/stack.h>\n#endif\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n#if TBB_USE_ASSERT\nstd::atomic<int> the_observer_proxy_count;\n#endif /* TBB_USE_ASSERT */\n\nvoid clear_address_waiter_table();\nvoid global_control_acquire();\nvoid global_control_release();\n\n//! global_control.cpp contains definition\nbool remove_and_check_if_empty(d1::global_control& gc);\nbool is_present(d1::global_control& gc);\n\nnamespace rml {\ntbb_server* make_private_server( tbb_client& client );\n} // namespace rml\n\nnamespace system_topology {\n    void destroy();\n}\n\n//------------------------------------------------------------------------\n// governor\n//------------------------------------------------------------------------\n\nvoid governor::acquire_resources () {\n    global_control_acquire();\n#if __TBB_USE_POSIX\n    int status = theTLS.create(auto_terminate);\n#else\n    int status = theTLS.create();\n#endif\n    if( status )\n        handle_perror(status, \"TBB failed to initialize task scheduler TLS\\n\");\n    detect_cpu_features(cpu_features);\n\n    is_rethrow_broken = gcc_rethrow_exception_broken();\n}\n\nvoid governor::release_resources () {\n    theRMLServerFactory.close();\n    destroy_process_mask();\n\n    __TBB_ASSERT(!(__TBB_InitOnce::initialization_done() && theTLS.get()), \"TBB is unloaded while thread data still alive?\");\n\n    int status = theTLS.destroy();\n    if( status )\n        runtime_warning(\"failed to destroy task scheduler TLS: %s\", std::strerror(status));\n    clear_address_waiter_table();\n\n#if TBB_USE_ASSERT\n    if (the_observer_proxy_count != 0) {\n            runtime_warning(\"Leaked %ld observer_proxy objects\\n\", long(the_observer_proxy_count));\n    }\n#endif /* TBB_USE_ASSERT */\n\n    system_topology::destroy();\n    dynamic_unlink_all();\n    global_control_release();\n}\n\nrml::tbb_server* governor::create_rml_server ( rml::tbb_client& client ) {\n    rml::tbb_server* server = nullptr;\n    if( !UsePrivateRML ) {\n        ::rml::factory::status_type status = theRMLServerFactory.make_server( server, client );\n        if( status != ::rml::factory::st_success ) {\n            UsePrivateRML = true;\n            runtime_warning( \"rml::tbb_factory::make_server failed with status %x, falling back on private rml\", status );\n        }\n    }\n    if ( !server ) {\n        __TBB_ASSERT( UsePrivateRML, nullptr);\n        server = rml::make_private_server( client );\n    }\n    __TBB_ASSERT( server, \"Failed to create RML server\" );\n    return server;\n}\n\nvoid governor::one_time_init() {\n    if ( !__TBB_InitOnce::initialization_done() ) {\n        DoOneTimeInitialization();\n    }\n}\n\nbool governor::does_client_join_workers(const rml::tbb_client &client) {\n    return ((const thread_dispatcher&)client).must_join_workers();\n}\n\n/*\n    There is no portable way to get stack base address in Posix, however the modern\n    Linux versions provide pthread_attr_np API that can be used  to obtain thread's\n    stack size and base address. Unfortunately even this function does not provide\n    enough information for the main thread on IA-64 architecture (RSE spill area\n    and memory stack are allocated as two separate discontinuous chunks of memory),\n    and there is no portable way to discern the main and the secondary threads.\n    Thus for macOS* and IA-64 architecture for Linux* OS we use the TBB worker stack size for\n    all threads and use the current stack top as the stack base. This simplified\n    approach is based on the following assumptions:\n    1) If the default stack size is insufficient for the user app needs, the\n    required amount will be explicitly specified by the user at the point of the\n    TBB scheduler initialization (as an argument to tbb::task_scheduler_init\n    constructor).\n    2) When an external thread initializes the scheduler, it has enough space on its\n    stack. Here \"enough\" means \"at least as much as worker threads have\".\n    3) If the user app strives to conserve the memory by cutting stack size, it\n    should do this for TBB workers too (as in the #1).\n*/\nstatic void get_stack_attributes(std::uintptr_t& stack_base, std::size_t& stack_size, std::size_t fallback_stack_size) {\n    // Stacks are growing top-down. Highest address is called \"stack base\",\n    // and the lowest is \"stack limit\".\n    stack_size = fallback_stack_size;\n#if __TBB_USE_WINAPI\n    NT_TIB* pteb = (NT_TIB*)NtCurrentTeb();\n    __TBB_ASSERT(&pteb < pteb->StackBase && &pteb > pteb->StackLimit, \"invalid stack info in TEB\");\n    stack_base = reinterpret_cast<std::uintptr_t>(pteb->StackBase);\n#elif defined(EMSCRIPTEN)\n    stack_base = reinterpret_cast<std::uintptr_t>(emscripten_stack_get_base());\n#else\n    // There is no portable way to get stack base address in Posix, so we use\n    // non-portable method (on all modern Linux) or the simplified approach\n    // based on the common sense assumptions. The most important assumption\n    // is that the main thread's stack size is not less than that of other threads.\n\n    // Points to the lowest addressable byte of a stack.\n    void* stack_limit = nullptr;\n#if __linux__ && !__bg__\n    size_t np_stack_size = 0;\n    pthread_attr_t np_attr_stack;\n    if (0 == pthread_getattr_np(pthread_self(), &np_attr_stack)) {\n        if (0 == pthread_attr_getstack(&np_attr_stack, &stack_limit, &np_stack_size)) {\n            __TBB_ASSERT( &stack_limit > stack_limit, \"stack size must be positive\" );\n            if (np_stack_size > 0)\n                stack_size = np_stack_size;\n        }\n        pthread_attr_destroy(&np_attr_stack);\n    }\n#endif /* __linux__ */\n    if (stack_limit) {\n        stack_base = reinterpret_cast<std::uintptr_t>(stack_limit) + stack_size;\n    } else {\n        // Use an anchor as a base stack address.\n        int anchor{};\n        stack_base = reinterpret_cast<std::uintptr_t>(&anchor);\n    }\n#endif /* __TBB_USE_WINAPI */\n}\n\n#if (_WIN32||_WIN64) && !__TBB_DYNAMIC_LOAD_ENABLED\nstatic void register_external_thread_destructor() {\n    struct thread_destructor {\n        ~thread_destructor() {\n            governor::terminate_external_thread();\n        }\n    };\n    // ~thread_destructor() will be call during the calling thread termination\n    static thread_local thread_destructor thr_destructor;\n}\n#endif // (_WIN32||_WIN64) && !__TBB_DYNAMIC_LOAD_ENABLED\n\nvoid governor::init_external_thread() {\n    one_time_init();\n    // Create new scheduler instance with arena\n    int num_slots = default_num_threads();\n    // TODO_REVAMP: support an external thread without an implicit arena\n    int num_reserved_slots = 1;\n    unsigned arena_priority_level = 1; // corresponds to tbb::task_arena::priority::normal\n    std::size_t stack_size = 0;\n    threading_control* thr_control = threading_control::register_public_reference();\n    arena& a = arena::create(thr_control, num_slots, num_reserved_slots, arena_priority_level);\n    // External thread always occupies the first slot\n    thread_data& td = *new(cache_aligned_allocate(sizeof(thread_data))) thread_data(0, false);\n    td.attach_arena(a, /*slot index*/ 0);\n    __TBB_ASSERT(td.my_inbox.is_idle_state(false), nullptr);\n\n    std::uintptr_t stack_base{};\n    get_stack_attributes(stack_base, stack_size, a.my_threading_control->worker_stack_size());\n    task_dispatcher& task_disp = td.my_arena_slot->default_task_dispatcher();\n    td.enter_task_dispatcher(task_disp, calculate_stealing_threshold(stack_base, stack_size));\n\n    td.my_arena_slot->occupy();\n    thr_control->register_thread(td);\n    set_thread_data(td);\n#if (_WIN32||_WIN64) && !__TBB_DYNAMIC_LOAD_ENABLED\n    // The external thread destructor is called from dllMain but it is not available with a static build.\n    // Therefore, we need to register the current thread to call the destructor during thread termination.\n    register_external_thread_destructor();\n#endif\n}\n\nvoid governor::auto_terminate(void* tls) {\n    __TBB_ASSERT(get_thread_data_if_initialized() == nullptr ||\n        get_thread_data_if_initialized() == tls, nullptr);\n    if (tls) {\n        thread_data* td = static_cast<thread_data*>(tls);\n\n        auto clear_tls = [td] {\n            td->~thread_data();\n            cache_aligned_deallocate(td);\n            clear_thread_data();\n        };\n\n        // Only external thread can be inside an arena during termination.\n        if (td->my_arena_slot) {\n            arena* a = td->my_arena;\n            threading_control* thr_control = a->my_threading_control;\n\n            // If the TLS slot is already cleared by OS or underlying concurrency\n            // runtime, restore its value to properly clean up arena\n            if (!is_thread_data_set(td)) {\n                set_thread_data(*td);\n            }\n\n            a->my_observers.notify_exit_observers(td->my_last_observer, td->my_is_worker);\n\n            td->leave_task_dispatcher();\n            td->my_arena_slot->release();\n            // Release an arena\n            a->on_thread_leaving(arena::ref_external);\n\n            thr_control->unregister_thread(*td);\n\n            // The tls should be cleared before market::release because\n            // market can destroy the tls key if we keep the last reference\n            clear_tls();\n\n            // If there was an associated arena, it added a public market reference\n            thr_control->unregister_public_reference(/* blocking terminate =*/ false);\n        } else {\n            clear_tls();\n        }\n    }\n    __TBB_ASSERT(get_thread_data_if_initialized() == nullptr, nullptr);\n}\n\nvoid governor::initialize_rml_factory () {\n    ::rml::factory::status_type res = theRMLServerFactory.open();\n    UsePrivateRML = res != ::rml::factory::st_success;\n}\n\nvoid __TBB_EXPORTED_FUNC get(d1::task_scheduler_handle& handle) {\n    handle.m_ctl = new(allocate_memory(sizeof(global_control))) global_control(global_control::scheduler_handle, 1);\n}\n\nvoid release_impl(d1::task_scheduler_handle& handle) {\n    if (handle.m_ctl != nullptr) {\n        handle.m_ctl->~global_control();\n        deallocate_memory(handle.m_ctl);\n        handle.m_ctl = nullptr;\n    }\n}\n\nbool finalize_impl(d1::task_scheduler_handle& handle) {\n    __TBB_ASSERT_RELEASE(handle, \"trying to finalize with null handle\");\n    __TBB_ASSERT(is_present(*handle.m_ctl), \"finalize or release was already called on this object\");\n\n    bool ok = true; // ok if threading_control does not exist yet\n    if (threading_control::is_present()) {\n        thread_data* td = governor::get_thread_data_if_initialized();\n        if (td) {\n            task_dispatcher* task_disp = td->my_task_dispatcher;\n            __TBB_ASSERT(task_disp, nullptr);\n            if (task_disp->m_properties.outermost && !td->my_is_worker) { // is not inside a parallel region\n                governor::auto_terminate(td);\n            }\n        }\n\n        if (remove_and_check_if_empty(*handle.m_ctl)) {\n            ok = threading_control::unregister_lifetime_control(/*blocking_terminate*/ true);\n        } else {\n            ok = false;\n        }\n    }\n\n    return ok;\n}\n\nbool __TBB_EXPORTED_FUNC finalize(d1::task_scheduler_handle& handle, std::intptr_t mode) {\n    if (mode == d1::release_nothrowing) {\n        release_impl(handle);\n        return true;\n    } else {\n        bool ok = finalize_impl(handle);\n        // TODO: it is unsafe when finalize is called concurrently and further library unload\n        release_impl(handle);\n        if (mode == d1::finalize_throwing && !ok) {\n            throw_exception(exception_id::unsafe_wait);\n        }\n        return ok;\n    }\n}\n\n#if __TBB_ARENA_BINDING\n\n#if __TBB_WEAK_SYMBOLS_PRESENT\n#pragma weak __TBB_internal_initialize_system_topology\n#pragma weak __TBB_internal_destroy_system_topology\n#pragma weak __TBB_internal_allocate_binding_handler\n#pragma weak __TBB_internal_deallocate_binding_handler\n#pragma weak __TBB_internal_apply_affinity\n#pragma weak __TBB_internal_restore_affinity\n#pragma weak __TBB_internal_get_default_concurrency\n\nextern \"C\" {\nvoid __TBB_internal_initialize_system_topology(\n    size_t groups_num,\n    int& numa_nodes_count, int*& numa_indexes_list,\n    int& core_types_count, int*& core_types_indexes_list\n);\nvoid __TBB_internal_destroy_system_topology( );\n\n//TODO: consider renaming to `create_binding_handler` and `destroy_binding_handler`\nbinding_handler* __TBB_internal_allocate_binding_handler( int slot_num, int numa_id, int core_type_id, int max_threads_per_core );\nvoid __TBB_internal_deallocate_binding_handler( binding_handler* handler_ptr );\n\nvoid __TBB_internal_apply_affinity( binding_handler* handler_ptr, int slot_num );\nvoid __TBB_internal_restore_affinity( binding_handler* handler_ptr, int slot_num );\n\nint __TBB_internal_get_default_concurrency( int numa_id, int core_type_id, int max_threads_per_core );\n}\n#endif /* __TBB_WEAK_SYMBOLS_PRESENT */\n\n// Stubs that will be used if TBBbind library is unavailable.\nstatic void dummy_destroy_system_topology ( ) { }\nstatic binding_handler* dummy_allocate_binding_handler ( int, int, int, int ) { return nullptr; }\nstatic void dummy_deallocate_binding_handler ( binding_handler* ) { }\nstatic void dummy_apply_affinity ( binding_handler*, int ) { }\nstatic void dummy_restore_affinity ( binding_handler*, int ) { }\nstatic int dummy_get_default_concurrency( int, int, int ) { return governor::default_num_threads(); }\n\n// Handlers for communication with TBBbind\nstatic void (*initialize_system_topology_ptr)(\n    size_t groups_num,\n    int& numa_nodes_count, int*& numa_indexes_list,\n    int& core_types_count, int*& core_types_indexes_list\n) = nullptr;\nstatic void (*destroy_system_topology_ptr)( ) = dummy_destroy_system_topology;\n\nstatic binding_handler* (*allocate_binding_handler_ptr)( int slot_num, int numa_id, int core_type_id, int max_threads_per_core )\n    = dummy_allocate_binding_handler;\nstatic void (*deallocate_binding_handler_ptr)( binding_handler* handler_ptr )\n    = dummy_deallocate_binding_handler;\nstatic void (*apply_affinity_ptr)( binding_handler* handler_ptr, int slot_num )\n    = dummy_apply_affinity;\nstatic void (*restore_affinity_ptr)( binding_handler* handler_ptr, int slot_num )\n    = dummy_restore_affinity;\nint (*get_default_concurrency_ptr)( int numa_id, int core_type_id, int max_threads_per_core )\n    = dummy_get_default_concurrency;\n\n#if _WIN32 || _WIN64 || __unix__ || __APPLE__\n\n// Table describing how to link the handlers.\nstatic const dynamic_link_descriptor TbbBindLinkTable[] = {\n    DLD(__TBB_internal_initialize_system_topology, initialize_system_topology_ptr),\n    DLD(__TBB_internal_destroy_system_topology, destroy_system_topology_ptr),\n#if __TBB_CPUBIND_PRESENT\n    DLD(__TBB_internal_allocate_binding_handler, allocate_binding_handler_ptr),\n    DLD(__TBB_internal_deallocate_binding_handler, deallocate_binding_handler_ptr),\n    DLD(__TBB_internal_apply_affinity, apply_affinity_ptr),\n    DLD(__TBB_internal_restore_affinity, restore_affinity_ptr),\n#endif\n    DLD(__TBB_internal_get_default_concurrency, get_default_concurrency_ptr)\n};\n\nstatic const unsigned LinkTableSize = sizeof(TbbBindLinkTable) / sizeof(dynamic_link_descriptor);\n\n#if TBB_USE_DEBUG\n#define DEBUG_SUFFIX \"_debug\"\n#else\n#define DEBUG_SUFFIX\n#endif /* TBB_USE_DEBUG */\n\n#if _WIN32 || _WIN64\n#define LIBRARY_EXTENSION \".dll\"\n#define LIBRARY_PREFIX\n#elif __APPLE__\n#define LIBRARY_EXTENSION __TBB_STRING(.3.dylib)\n#define LIBRARY_PREFIX \"lib\"\n#elif __unix__\n#define LIBRARY_EXTENSION __TBB_STRING(.so.3)\n#define LIBRARY_PREFIX \"lib\"\n#endif /* __unix__ */\n\n#define TBBBIND_NAME LIBRARY_PREFIX \"tbbbind\" DEBUG_SUFFIX LIBRARY_EXTENSION\n#define TBBBIND_2_0_NAME LIBRARY_PREFIX \"tbbbind_2_0\" DEBUG_SUFFIX LIBRARY_EXTENSION\n\n#define TBBBIND_2_5_NAME LIBRARY_PREFIX \"tbbbind_2_5\" DEBUG_SUFFIX LIBRARY_EXTENSION\n#endif /* _WIN32 || _WIN64 || __unix__ */\n\n// Representation of system hardware topology information on the TBB side.\n// System topology may be initialized by third-party component (e.g. hwloc)\n// or just filled in with default stubs.\nnamespace system_topology {\n\nconstexpr int automatic = -1;\n\nstatic std::atomic<do_once_state> initialization_state;\n\nnamespace {\nint  numa_nodes_count = 0;\nint* numa_nodes_indexes = nullptr;\n\nint  core_types_count = 0;\nint* core_types_indexes = nullptr;\n\nconst char* load_tbbbind_shared_object() {\n#if _WIN32 || _WIN64 || __unix__ || __APPLE__\n#if _WIN32 && !_WIN64\n    // For 32-bit Windows applications, process affinity masks can only support up to 32 logical CPUs.\n    SYSTEM_INFO si;\n    GetNativeSystemInfo(&si);\n    if (si.dwNumberOfProcessors > 32) return nullptr;\n#endif /* _WIN32 && !_WIN64 */\n    for (const auto& tbbbind_version : {TBBBIND_2_5_NAME, TBBBIND_2_0_NAME, TBBBIND_NAME}) {\n        if (dynamic_link(tbbbind_version, TbbBindLinkTable, LinkTableSize, nullptr, DYNAMIC_LINK_LOCAL_BINDING)) {\n            return tbbbind_version;\n        }\n    }\n#endif /* _WIN32 || _WIN64 || __unix__ || __APPLE__ */\n    return nullptr;\n}\n\nint processor_groups_num() {\n#if _WIN32\n    return NumberOfProcessorGroups();\n#else\n    // Stub to improve code readability by reducing number of the compile-time conditions\n    return 1;\n#endif\n}\n} // internal namespace\n\n// Tries to load TBBbind library API, if success, gets NUMA topology information from it,\n// in another case, fills NUMA topology by stubs.\nvoid initialization_impl() {\n    governor::one_time_init();\n\n    if (const char* tbbbind_name = load_tbbbind_shared_object()) {\n        initialize_system_topology_ptr(\n            processor_groups_num(),\n            numa_nodes_count, numa_nodes_indexes,\n            core_types_count, core_types_indexes\n        );\n\n        PrintExtraVersionInfo(\"TBBBIND\", tbbbind_name);\n        return;\n    }\n\n    static int dummy_index = automatic;\n\n    numa_nodes_count = 1;\n    numa_nodes_indexes = &dummy_index;\n\n    core_types_count = 1;\n    core_types_indexes = &dummy_index;\n\n    PrintExtraVersionInfo(\"TBBBIND\", \"UNAVAILABLE\");\n}\n\nvoid initialize() {\n    atomic_do_once(initialization_impl, initialization_state);\n}\n\nvoid destroy() {\n    destroy_system_topology_ptr();\n}\n} // namespace system_topology\n\nbinding_handler* construct_binding_handler(int slot_num, int numa_id, int core_type_id, int max_threads_per_core) {\n    system_topology::initialize();\n    return allocate_binding_handler_ptr(slot_num, numa_id, core_type_id, max_threads_per_core);\n}\n\nvoid destroy_binding_handler(binding_handler* handler_ptr) {\n    __TBB_ASSERT(deallocate_binding_handler_ptr, \"tbbbind loading was not performed\");\n    deallocate_binding_handler_ptr(handler_ptr);\n}\n\nvoid apply_affinity_mask(binding_handler* handler_ptr, int slot_index) {\n    __TBB_ASSERT(slot_index >= 0, \"Negative thread index\");\n    __TBB_ASSERT(apply_affinity_ptr, \"tbbbind loading was not performed\");\n    apply_affinity_ptr(handler_ptr, slot_index);\n}\n\nvoid restore_affinity_mask(binding_handler* handler_ptr, int slot_index) {\n    __TBB_ASSERT(slot_index >= 0, \"Negative thread index\");\n    __TBB_ASSERT(restore_affinity_ptr, \"tbbbind loading was not performed\");\n    restore_affinity_ptr(handler_ptr, slot_index);\n}\n\nunsigned __TBB_EXPORTED_FUNC numa_node_count() {\n    system_topology::initialize();\n    return system_topology::numa_nodes_count;\n}\n\nvoid __TBB_EXPORTED_FUNC fill_numa_indices(int* index_array) {\n    system_topology::initialize();\n    std::memcpy(index_array, system_topology::numa_nodes_indexes, system_topology::numa_nodes_count * sizeof(int));\n}\n\nint __TBB_EXPORTED_FUNC numa_default_concurrency(int node_id) {\n    if (node_id >= 0) {\n        system_topology::initialize();\n        int result = get_default_concurrency_ptr(\n            node_id,\n            /*core_type*/system_topology::automatic,\n            /*threads_per_core*/system_topology::automatic\n        );\n        if (result > 0) return result;\n    }\n    return governor::default_num_threads();\n}\n\nunsigned __TBB_EXPORTED_FUNC core_type_count(intptr_t /*reserved*/) {\n    system_topology::initialize();\n    return system_topology::core_types_count;\n}\n\nvoid __TBB_EXPORTED_FUNC fill_core_type_indices(int* index_array, intptr_t /*reserved*/) {\n    system_topology::initialize();\n    std::memcpy(index_array, system_topology::core_types_indexes, system_topology::core_types_count * sizeof(int));\n}\n\nvoid constraints_assertion(d1::constraints c) {\n    bool is_topology_initialized = system_topology::initialization_state == do_once_state::initialized;\n    __TBB_ASSERT_RELEASE(c.max_threads_per_core == system_topology::automatic || c.max_threads_per_core > 0,\n        \"Wrong max_threads_per_core constraints field value.\");\n\n    auto numa_nodes_begin = system_topology::numa_nodes_indexes;\n    auto numa_nodes_end = system_topology::numa_nodes_indexes + system_topology::numa_nodes_count;\n    __TBB_ASSERT_RELEASE(\n        c.numa_id == system_topology::automatic ||\n        (is_topology_initialized && std::find(numa_nodes_begin, numa_nodes_end, c.numa_id) != numa_nodes_end),\n        \"The constraints::numa_id value is not known to the library. Use tbb::info::numa_nodes() to get the list of possible values.\");\n\n    int* core_types_begin = system_topology::core_types_indexes;\n    int* core_types_end = system_topology::core_types_indexes + system_topology::core_types_count;\n    __TBB_ASSERT_RELEASE(c.core_type == system_topology::automatic ||\n        (is_topology_initialized && std::find(core_types_begin, core_types_end, c.core_type) != core_types_end),\n        \"The constraints::core_type value is not known to the library. Use tbb::info::core_types() to get the list of possible values.\");\n}\n\nint __TBB_EXPORTED_FUNC constraints_default_concurrency(const d1::constraints& c, intptr_t /*reserved*/) {\n    constraints_assertion(c);\n\n    if (c.numa_id >= 0 || c.core_type >= 0 || c.max_threads_per_core > 0) {\n        system_topology::initialize();\n        return get_default_concurrency_ptr(c.numa_id, c.core_type, c.max_threads_per_core);\n    }\n    return governor::default_num_threads();\n}\n\nint __TBB_EXPORTED_FUNC constraints_threads_per_core(const d1::constraints&, intptr_t /*reserved*/) {\n    return system_topology::automatic;\n}\n#endif /* __TBB_ARENA_BINDING */\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/governor.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_governor_H\n#define _TBB_governor_H\n\n#include \"rml_tbb.h\"\n\n#include \"misc.h\" // for AvailableHwConcurrency\n#include \"tls.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nclass market;\nclass thread_data;\nclass __TBB_InitOnce;\n\n#if __TBB_USE_ITT_NOTIFY\n//! Defined in profiling.cpp\nextern bool ITT_Present;\n#endif\n\ntypedef std::size_t stack_size_type;\n\n//------------------------------------------------------------------------\n// Class governor\n//------------------------------------------------------------------------\n\n//! The class handles access to the single instance of market, and to TLS to keep scheduler instances.\n/** It also supports automatic on-demand initialization of the TBB scheduler.\n    The class contains only static data members and methods.*/\nclass governor {\nprivate:\n    friend class __TBB_InitOnce;\n    friend class thread_dispatcher;\n    friend class threading_control_impl;\n\n    // TODO: consider using thread_local (measure performance and side effects)\n    //! TLS for scheduler instances associated with individual threads\n    static basic_tls<thread_data*> theTLS;\n\n    // TODO (TBB_REVAMP_TODO): reconsider constant names\n    static rml::tbb_factory theRMLServerFactory;\n\n    static bool UsePrivateRML;\n\n    // Flags for runtime-specific conditions\n    static cpu_features_type cpu_features;\n    static bool is_rethrow_broken;\n\n    //! Create key for thread-local storage and initialize RML.\n    static void acquire_resources ();\n\n    //! Destroy the thread-local storage key and deinitialize RML.\n    static void release_resources ();\n\n    static rml::tbb_server* create_rml_server ( rml::tbb_client& );\n\npublic:\n    static unsigned default_num_threads () {\n        // Caches the maximal level of parallelism supported by the hardware\n        static unsigned num_threads = AvailableHwConcurrency();\n        return num_threads;\n    }\n    static std::size_t default_page_size () {\n        // Caches the size of OS regular memory page\n        static std::size_t page_size = DefaultSystemPageSize();\n        return page_size;\n    }\n    static void one_time_init();\n    //! Processes scheduler initialization request (possibly nested) in an external thread\n    /** If necessary creates new instance of arena and/or local scheduler.\n        The auto_init argument specifies if the call is due to automatic initialization. **/\n    static void init_external_thread();\n\n    //! The routine to undo automatic initialization.\n    /** The signature is written with void* so that the routine\n        can be the destructor argument to pthread_key_create. */\n    static void auto_terminate(void* tls);\n\n    //! Obtain the thread-local instance of the thread data.\n    /** If the scheduler has not been initialized yet, initialization is done automatically.\n        Note that auto-initialized scheduler instance is destroyed only when its thread terminates. **/\n    static thread_data* get_thread_data() {\n        thread_data* td = theTLS.get();\n        if (td) {\n            return td;\n        }\n        init_external_thread();\n        td = theTLS.get();\n        __TBB_ASSERT(td, nullptr);\n        return td;\n    }\n\n    static void set_thread_data(thread_data& td) {\n        theTLS.set(&td);\n    }\n\n    static void clear_thread_data() {\n        theTLS.set(nullptr);\n    }\n\n    static thread_data* get_thread_data_if_initialized () {\n        return theTLS.get();\n    }\n\n    static bool is_thread_data_set(thread_data* td) {\n        return theTLS.get() == td;\n    }\n\n    //! Undo automatic initialization if necessary; call when a thread exits.\n    static void terminate_external_thread() {\n        auto_terminate(get_thread_data_if_initialized());\n    }\n\n    static void initialize_rml_factory ();\n\n    static bool does_client_join_workers (const rml::tbb_client &client);\n\n    static bool speculation_enabled() { return cpu_features.rtm_enabled; }\n\n#if __TBB_WAITPKG_INTRINSICS_PRESENT\n    static bool wait_package_enabled() { return cpu_features.waitpkg_enabled; }\n#endif\n\n    static bool hybrid_cpu() { return cpu_features.hybrid; }\n\n    static bool rethrow_exception_broken() { return is_rethrow_broken; }\n\n    static bool is_itt_present() {\n#if __TBB_USE_ITT_NOTIFY\n        return ITT_Present;\n#else\n        return false;\n#endif\n    }\n}; // class governor\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /* _TBB_governor_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/intrusive_list.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_intrusive_list_H\n#define _TBB_intrusive_list_H\n\n#include \"oneapi/tbb/detail/_intrusive_list_node.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nusing d1::intrusive_list_node;\n\n//! List of element of type T, where T is derived from intrusive_list_node\n/** The class is not thread safe. **/\ntemplate <class List, class T>\nclass intrusive_list_base {\n    //! Pointer to the head node\n    intrusive_list_node my_head;\n\n    //! Number of list elements\n    std::size_t my_size;\n\n    static intrusive_list_node& node ( T& item ) { return List::node(item); }\n\n    static T& item ( intrusive_list_node* node ) { return List::item(node); }\n\n    static const T& item( const intrusive_list_node* node ) { return List::item(node); }\n\n    template <typename DereferenceType>\n    class iterator_impl {\n        static_assert(std::is_same<DereferenceType, T>::value ||\n                      std::is_same<DereferenceType, const T>::value,\n                      \"Incorrect DereferenceType in iterator_impl\");\n\n        using pointer_type = typename std::conditional<std::is_same<DereferenceType, T>::value,\n                                                       intrusive_list_node*,\n                                                       const intrusive_list_node*>::type;\n\n    public:\n        iterator_impl() : my_pos(nullptr) {}\n\n        iterator_impl( pointer_type pos ) : my_pos(pos) {}\n\n        iterator_impl& operator++() {\n            my_pos = my_pos->my_next_node;\n            return *this;\n        }\n\n        iterator_impl operator++( int ) {\n            iterator_impl it(*this);\n            ++*this;\n            return it;\n        }\n\n        iterator_impl& operator--() {\n            my_pos = my_pos->my_prev_node;\n            return *this;\n        }\n\n        iterator_impl operator--( int ) {\n            iterator_impl it(*this);\n            --*this;\n            return it;\n        }\n\n        bool operator==( const iterator_impl& rhs ) const {\n            return my_pos == rhs.my_pos;\n        }\n\n        bool operator!=( const iterator_impl& rhs ) const {\n            return my_pos != rhs.my_pos;\n        }\n\n        DereferenceType& operator*() const {\n            return intrusive_list_base::item(my_pos);\n        }\n\n        DereferenceType* operator->() const {\n            return &intrusive_list_base::item(my_pos);\n        }\n    private:\n        // Node the iterator points to at the moment\n        pointer_type my_pos;\n    }; // class iterator_impl\n\n    void assert_ok () const {\n        __TBB_ASSERT( (my_head.my_prev_node == &my_head && !my_size) ||\n                      (my_head.my_next_node != &my_head && my_size >0), \"intrusive_list_base corrupted\" );\n#if TBB_USE_ASSERT >= 2\n        std::size_t i = 0;\n        for ( intrusive_list_node *n = my_head.my_next_node; n != &my_head; n = n->my_next_node )\n            ++i;\n        __TBB_ASSERT( my_size == i, \"Wrong size\" );\n#endif /* TBB_USE_ASSERT >= 2 */\n    }\n\npublic:\n    using iterator = iterator_impl<T>;\n    using const_iterator = iterator_impl<const T>;\n\n    intrusive_list_base () : my_size(0) {\n        my_head.my_prev_node = &my_head;\n        my_head.my_next_node = &my_head;\n    }\n\n    bool empty () const { return my_head.my_next_node == &my_head; }\n\n    std::size_t size () const { return my_size; }\n\n    iterator begin () { return iterator(my_head.my_next_node); }\n\n    iterator end () { return iterator(&my_head); }\n\n    const_iterator begin () const { return const_iterator(my_head.my_next_node); }\n\n    const_iterator end () const { return const_iterator(&my_head); }\n\n    void push_front ( T& val ) {\n        __TBB_ASSERT( node(val).my_prev_node == &node(val) && node(val).my_next_node == &node(val),\n                    \"Object with intrusive list node can be part of only one intrusive list simultaneously\" );\n        // An object can be part of only one intrusive list at the given moment via the given node member\n        node(val).my_prev_node = &my_head;\n        node(val).my_next_node = my_head.my_next_node;\n        my_head.my_next_node->my_prev_node = &node(val);\n        my_head.my_next_node = &node(val);\n        ++my_size;\n        assert_ok();\n    }\n\n    void remove( T& val ) {\n        __TBB_ASSERT( node(val).my_prev_node != &node(val) && node(val).my_next_node != &node(val), \"Element to remove is not in the list\" );\n        __TBB_ASSERT( node(val).my_prev_node->my_next_node == &node(val) && node(val).my_next_node->my_prev_node == &node(val), \"Element to remove is not in the list\" );\n        --my_size;\n        node(val).my_next_node->my_prev_node = node(val).my_prev_node;\n        node(val).my_prev_node->my_next_node = node(val).my_next_node;\n#if TBB_USE_ASSERT\n        node(val).my_prev_node = node(val).my_next_node = &node(val);\n#endif\n        assert_ok();\n    }\n\n    iterator erase ( iterator it ) {\n        T& val = *it;\n        ++it;\n        remove( val );\n        return it;\n    }\n\n}; // intrusive_list_base\n\n#if __TBB_TODO\n// With standard compliant compilers memptr_intrusive_list could be named simply intrusive_list,\n// and inheritance based intrusive_list version would become its partial specialization.\n// Here are the corresponding declarations:\n\nstruct dummy_intrusive_list_item { intrusive_list_node my_node; };\n\ntemplate <class T, class U = dummy_intrusive_list_item, intrusive_list_node U::*NodePtr = &dummy_intrusive_list_item::my_node>\nclass intrusive_list : public intrusive_list_base<intrusive_list<T, U, NodePtr>, T>;\n\ntemplate <class T>\nclass intrusive_list<T, dummy_intrusive_list_item, &dummy_intrusive_list_item::my_node>\n    : public intrusive_list_base<intrusive_list<T>, T>;\n\n#endif /* __TBB_TODO */\n\n//! Double linked list of items of type T containing a member of type intrusive_list_node.\n/** NodePtr is a member pointer to the node data field. Class U is either T or\n    a base class of T containing the node member. Default values exist for the sake\n    of a partial specialization working with inheritance case.\n\n    The list does not have ownership of its items. Its purpose is to avoid dynamic\n    memory allocation when forming lists of existing objects.\n\n    The class is not thread safe. **/\ntemplate <class T, class U, intrusive_list_node U::*NodePtr>\nclass memptr_intrusive_list : public intrusive_list_base<memptr_intrusive_list<T, U, NodePtr>, T>\n{\n    friend class intrusive_list_base<memptr_intrusive_list<T, U, NodePtr>, T>;\n\n    static intrusive_list_node& node ( T& val ) { return val.*NodePtr; }\n\n    static T& item ( intrusive_list_node* node ) {\n        // Cannot use __TBB_offsetof (and consequently __TBB_get_object_ref) macro\n        // with *NodePtr argument because gcc refuses to interpret pasted \"->\" and \"*\"\n        // as member pointer dereferencing operator, and explicit usage of ## in\n        // __TBB_offsetof implementation breaks operations with normal member names.\n        return *reinterpret_cast<T*>((char*)node - ((ptrdiff_t)&(reinterpret_cast<T*>(0x1000)->*NodePtr) - 0x1000));\n    }\n\n    static const T& item( const intrusive_list_node* node ) {\n        return item(const_cast<intrusive_list_node*>(node));\n    }\n\n}; // intrusive_list<T, U, NodePtr>\n\n//! Double linked list of items of type T that is derived from intrusive_list_node class.\n/** The list does not have ownership of its items. Its purpose is to avoid dynamic\n    memory allocation when forming lists of existing objects.\n\n    The class is not thread safe. **/\ntemplate <class T>\nclass intrusive_list : public intrusive_list_base<intrusive_list<T>, T>\n{\n    friend class intrusive_list_base<intrusive_list<T>, T>;\n\n    static intrusive_list_node& node ( T& val ) { return val; }\n\n    static T& item ( intrusive_list_node* node ) { return *static_cast<T*>(node); }\n\n    static const T& item( const intrusive_list_node* node ) { return *static_cast<const T*>(node); }\n}; // intrusive_list<T>\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /* _TBB_intrusive_list_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/itt_notify.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __TBB_USE_ITT_NOTIFY\n\n#if _WIN32||_WIN64\n    #ifndef UNICODE\n        #define UNICODE\n    #endif\n#else\n    #pragma weak dlopen\n    #pragma weak dlsym\n    #pragma weak dlerror\n#endif /* WIN */\n\n#if __TBB_BUILD\n\nextern \"C\" void ITT_DoOneTimeInitialization();\n#define __itt_init_ittlib_name(x,y) (ITT_DoOneTimeInitialization(), true)\n\n#elif __TBBMALLOC_BUILD\n\nextern \"C\" void MallocInitializeITT();\n#define __itt_init_ittlib_name(x,y) (MallocInitializeITT(), true)\n\n#else\n#error This file is expected to be used for either TBB or TBB allocator build.\n#endif // __TBB_BUILD\n\n#include \"tools_api/ittnotify_static.c\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n/** This extra proxy method is necessary since __itt_init_lib is declared as static **/\nint __TBB_load_ittnotify() {\n#if !(_WIN32||_WIN64)\n    // tool_api crashes without dlopen, check that it's present. Common case\n    // for lack of dlopen is static binaries, i.e. ones build with -static.\n    if (dlopen == nullptr)\n        return 0;\n#endif\n    return __itt_init_ittlib(nullptr,       // groups for:\n      (__itt_group_id)(__itt_group_sync     // prepare/cancel/acquired/releasing\n                       | __itt_group_thread // name threads\n                       | __itt_group_stitch // stack stitching\n                       | __itt_group_structure\n                           ));\n}\n\n} //namespace r1\n} //namespace detail\n} // namespace tbb\n\n#endif /* __TBB_USE_ITT_NOTIFY */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/itt_notify.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_ITT_NOTIFY\n#define _TBB_ITT_NOTIFY\n\n#include \"oneapi/tbb/detail/_config.h\"\n\n#if __TBB_USE_ITT_NOTIFY\n\n#if _WIN32||_WIN64\n    #ifndef UNICODE\n        #define UNICODE\n    #endif\n#endif /* WIN */\n\n#ifndef INTEL_ITTNOTIFY_API_PRIVATE\n#define INTEL_ITTNOTIFY_API_PRIVATE\n#endif\n\n#include \"tools_api/ittnotify.h\"\n#include \"tools_api/legacy/ittnotify.h\"\nextern \"C\" void __itt_fini_ittlib(void);\nextern \"C\" void __itt_release_resources(void);\n\n#if _WIN32||_WIN64\n    #undef _T\n#endif /* WIN */\n\n#endif /* __TBB_USE_ITT_NOTIFY */\n\n#if !ITT_CALLER_NULL\n#define ITT_CALLER_NULL ((__itt_caller)0)\n#endif\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n//! Unicode support\n#if (_WIN32||_WIN64)\n    //! Unicode character type. Always wchar_t on Windows.\n    /** We do not use typedefs from Windows TCHAR family to keep consistence of TBB coding style. **/\n    using tchar = wchar_t;\n    //! Standard Windows macro to markup the string literals.\n    #define _T(string_literal) L ## string_literal\n#else /* !WIN */\n    using tchar = char;\n    //! Standard Windows style macro to markup the string literals.\n    #define _T(string_literal) string_literal\n#endif /* !WIN */\n\n//! Display names of internal synchronization types\nextern const tchar\n    *SyncType_Scheduler;\n//! Display names of internal synchronization components/scenarios\nextern const tchar\n    *SyncObj_ContextsList\n    ;\n\n#if __TBB_USE_ITT_NOTIFY\n// const_cast<void*>() is necessary to cast off volatility\n#define ITT_NOTIFY(name,obj)            __itt_##name(const_cast<void*>(static_cast<volatile void*>(obj)))\n#define ITT_THREAD_SET_NAME(name)       __itt_thread_set_name(name)\n#define ITT_FINI_ITTLIB()               __itt_fini_ittlib()\n#define ITT_RELEASE_RESOURCES()         __itt_release_resources()\n#define ITT_SYNC_CREATE(obj, type, name) __itt_sync_create((void*)(obj), type, name, 2)\n#define ITT_STACK_CREATE(obj)           obj = __itt_stack_caller_create()\n#define ITT_STACK_DESTROY(obj)          (obj!=nullptr) ? __itt_stack_caller_destroy(static_cast<__itt_caller>(obj)) : ((void)0)\n#define ITT_CALLEE_ENTER(cond, t, obj)  if(cond) {\\\n                                            __itt_stack_callee_enter(static_cast<__itt_caller>(obj));\\\n                                            __itt_sync_acquired(t);\\\n                                        }\n#define ITT_CALLEE_LEAVE(cond, obj)     (cond) ? __itt_stack_callee_leave(static_cast<__itt_caller>(obj)) : ((void)0)\n\n#define ITT_TASK_GROUP(obj,name,parent)     r1::itt_make_task_group(d1::ITT_DOMAIN_MAIN,(void*)(obj),ALGORITHM,(void*)(parent),(parent!=nullptr) ? ALGORITHM : FLOW_NULL,name)\n#define ITT_TASK_BEGIN(obj,name,id)         r1::itt_task_begin(d1::ITT_DOMAIN_MAIN,(void*)(id),ALGORITHM,(void*)(obj),ALGORITHM,name)\n#define ITT_TASK_END                        r1::itt_task_end(d1::ITT_DOMAIN_MAIN)\n\n\n#else /* !__TBB_USE_ITT_NOTIFY */\n\n#define ITT_NOTIFY(name,obj)            ((void)0)\n#define ITT_THREAD_SET_NAME(name)       ((void)0)\n#define ITT_FINI_ITTLIB()               ((void)0)\n#define ITT_RELEASE_RESOURCES()         ((void)0)\n#define ITT_SYNC_CREATE(obj, type, name) ((void)0)\n#define ITT_STACK_CREATE(obj)           ((void)0)\n#define ITT_STACK_DESTROY(obj)          ((void)0)\n#define ITT_CALLEE_ENTER(cond, t, obj)  ((void)0)\n#define ITT_CALLEE_LEAVE(cond, obj)     ((void)0)\n#define ITT_TASK_GROUP(type,name,parent)    ((void)0)\n#define ITT_TASK_BEGIN(type,name,id)        ((void)0)\n#define ITT_TASK_END                        ((void)0)\n\n#endif /* !__TBB_USE_ITT_NOTIFY */\n\nint __TBB_load_ittnotify();\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /* _TBB_ITT_NOTIFY */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/mailbox.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_mailbox_H\n#define _TBB_mailbox_H\n\n#include \"oneapi/tbb/cache_aligned_allocator.h\"\n#include \"oneapi/tbb/detail/_small_object_pool.h\"\n\n#include \"scheduler_common.h\"\n\n#include <atomic>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nstruct task_proxy : public d1::task {\n    static const intptr_t      pool_bit = 1<<0;\n    static const intptr_t   mailbox_bit = 1<<1;\n    static const intptr_t location_mask = pool_bit | mailbox_bit;\n    /* All but two low-order bits represent a (task*).\n       Two low-order bits mean:\n       1 = proxy is/was/will be in task pool\n       2 = proxy is/was/will be in mailbox */\n    std::atomic<intptr_t> task_and_tag;\n\n    //! Pointer to next task_proxy in a mailbox\n    std::atomic<task_proxy*> next_in_mailbox;\n\n    //! Mailbox to which this was mailed.\n    mail_outbox* outbox;\n\n    //! Task affinity id which is referenced\n    d1::slot_id slot;\n\n    d1::small_object_allocator allocator;\n\n    //! True if the proxy is stored both in its sender's pool and in the destination mailbox.\n    static bool is_shared ( intptr_t tat ) {\n        return (tat & location_mask) == location_mask;\n    }\n\n    //! Returns a pointer to the encapsulated task or nullptr.\n    static task* task_ptr ( intptr_t tat ) {\n        return (task*)(tat & ~location_mask);\n    }\n\n    //! Returns a pointer to the encapsulated task or nullptr, and frees proxy if necessary.\n    template<intptr_t from_bit>\n    inline task* extract_task () {\n        // __TBB_ASSERT( prefix().extra_state == es_task_proxy, \"Normal task misinterpreted as a proxy?\" );\n        intptr_t tat = task_and_tag.load(std::memory_order_acquire);\n        __TBB_ASSERT( tat == from_bit || (is_shared(tat) && task_ptr(tat)),\n            \"Proxy's tag cannot specify both locations if the proxy \"\n            \"was retrieved from one of its original locations\" );\n        if ( tat != from_bit ) {\n            const intptr_t cleaner_bit = location_mask & ~from_bit;\n            // Attempt to transition the proxy to the \"empty\" state with\n            // cleaner_bit specifying entity responsible for its eventual freeing.\n            // Explicit cast to void* is to work around a seeming ICC 11.1 bug.\n            if ( task_and_tag.compare_exchange_strong(tat, cleaner_bit) ) {\n                // Successfully grabbed the task, and left new owner with the job of freeing the proxy\n                return task_ptr(tat);\n            }\n        }\n        // Proxied task has already been claimed from another proxy location.\n        __TBB_ASSERT( task_and_tag.load(std::memory_order_relaxed) == from_bit, \"Empty proxy cannot contain non-zero task pointer\" );\n        return nullptr;\n    }\n\n    task* execute(d1::execution_data&) override {\n        __TBB_ASSERT_RELEASE(false, nullptr);\n        return nullptr;\n    }\n    task* cancel(d1::execution_data&) override {\n        __TBB_ASSERT_RELEASE(false, nullptr);\n        return nullptr;\n    }\n}; // struct task_proxy\n\n//! Internal representation of mail_outbox, without padding.\nclass unpadded_mail_outbox {\nprotected:\n    typedef std::atomic<task_proxy*> atomic_proxy_ptr;\n\n    //! Pointer to first task_proxy in mailbox, or nullptr if box is empty.\n    atomic_proxy_ptr my_first;\n\n    //! Pointer to pointer that will point to next item in the queue.  Never nullptr.\n    std::atomic<atomic_proxy_ptr*> my_last;\n\n    //! Owner of mailbox is not executing a task, and has drained its own task pool.\n    std::atomic<bool> my_is_idle;\n};\n\n// TODO: - consider moving to arena slot\n//! Class representing where mail is put.\n/** Padded to occupy a cache line. */\nclass mail_outbox : padded<unpadded_mail_outbox> {\n\n    task_proxy* internal_pop( isolation_type isolation ) {\n        task_proxy* curr = my_first.load(std::memory_order_acquire);\n        if ( !curr )\n            return nullptr;\n        atomic_proxy_ptr* prev_ptr = &my_first;\n        if ( isolation != no_isolation ) {\n            while ( task_accessor::isolation(*curr) != isolation ) {\n                prev_ptr = &curr->next_in_mailbox;\n                // The next_in_mailbox should be read with acquire to guarantee (*curr) consistency.\n                curr = curr->next_in_mailbox.load(std::memory_order_acquire);\n                if ( !curr )\n                    return nullptr;\n            }\n        }\n        // There is a first item in the mailbox.  See if there is a second.\n        // The next_in_mailbox should be read with acquire to guarantee (*second) consistency.\n        if ( task_proxy* second = curr->next_in_mailbox.load(std::memory_order_acquire) ) {\n            // There are at least two items, so first item can be popped easily.\n            prev_ptr->store(second, std::memory_order_relaxed);\n        } else {\n            // There is only one item. Some care is required to pop it.\n\n            prev_ptr->store(nullptr, std::memory_order_relaxed);\n            atomic_proxy_ptr* expected = &curr->next_in_mailbox;\n            if ( my_last.compare_exchange_strong( expected, prev_ptr ) ) {\n                // Successfully transitioned mailbox from having one item to having none.\n                __TBB_ASSERT( !curr->next_in_mailbox.load(std::memory_order_relaxed), nullptr);\n            } else {\n                // Some other thread updated my_last but has not filled in first->next_in_mailbox\n                // Wait until first item points to second item.\n                atomic_backoff backoff;\n                // The next_in_mailbox should be read with acquire to guarantee (*second) consistency.\n                while ( !(second = curr->next_in_mailbox.load(std::memory_order_acquire)) ) backoff.pause();\n                prev_ptr->store( second, std::memory_order_relaxed);\n            }\n        }\n        assert_pointer_valid(curr);\n        return curr;\n    }\npublic:\n    friend class mail_inbox;\n\n    //! Push task_proxy onto the mailbox queue of another thread.\n    /** Implementation is wait-free. */\n    void push( task_proxy* t ) {\n        assert_pointer_valid(t);\n        t->next_in_mailbox.store(nullptr, std::memory_order_relaxed);\n        atomic_proxy_ptr* const link = my_last.exchange(&t->next_in_mailbox);\n        // Logically, the release fence is not required because the exchange above provides the\n        // release-acquire semantic that guarantees that (*t) will be consistent when another thread\n        // loads the link atomic. However, C++11 memory model guarantees consistency of(*t) only\n        // when the same atomic is used for synchronization.\n        link->store(t, std::memory_order_release);\n    }\n\n    //! Return true if mailbox is empty\n    bool empty() {\n        return my_first.load(std::memory_order_relaxed) == nullptr;\n    }\n\n    //! Construct *this as a mailbox from zeroed memory.\n    /** Raise assertion if *this is not previously zeroed, or sizeof(this) is wrong.\n        This method is provided instead of a full constructor since we know the object\n        will be constructed in zeroed memory. */\n    void construct() {\n        __TBB_ASSERT( sizeof(*this)==max_nfs_size, nullptr );\n        __TBB_ASSERT( !my_first.load(std::memory_order_relaxed), nullptr );\n        __TBB_ASSERT( !my_last.load(std::memory_order_relaxed), nullptr );\n        __TBB_ASSERT( !my_is_idle.load(std::memory_order_relaxed), nullptr );\n        my_last = &my_first;\n        suppress_unused_warning(pad);\n    }\n\n    //! Drain the mailbox\n    void drain() {\n        // No fences here because other threads have already quit.\n        for( ; task_proxy* t = my_first; ) {\n            my_first.store(t->next_in_mailbox, std::memory_order_relaxed);\n            t->allocator.delete_object(t);\n        }\n    }\n\n    //! True if thread that owns this mailbox is looking for work.\n    bool recipient_is_idle() {\n        return my_is_idle.load(std::memory_order_relaxed);\n    }\n}; // class mail_outbox\n\n//! Class representing source of mail.\nclass mail_inbox {\n    //! Corresponding sink where mail that we receive will be put.\n    mail_outbox* my_putter;\npublic:\n    //! Construct unattached inbox\n    mail_inbox() : my_putter(nullptr) {}\n\n    //! Attach inbox to a corresponding outbox.\n    void attach( mail_outbox& putter ) {\n        my_putter = &putter;\n    }\n    //! Detach inbox from its outbox\n    void detach() {\n        __TBB_ASSERT(my_putter,\"not attached\");\n        my_putter = nullptr;\n    }\n    //! Get next piece of mail, or nullptr if mailbox is empty.\n    task_proxy* pop( isolation_type isolation ) {\n        return my_putter->internal_pop( isolation );\n    }\n    //! Return true if mailbox is empty\n    bool empty() {\n        return my_putter->empty();\n    }\n    //! Indicate whether thread that reads this mailbox is idle.\n    /** Raises assertion failure if mailbox is redundantly marked as not idle. */\n    void set_is_idle( bool value ) {\n        if( my_putter ) {\n            __TBB_ASSERT( my_putter->my_is_idle.load(std::memory_order_relaxed) || value, \"attempt to redundantly mark mailbox as not idle\" );\n            my_putter->my_is_idle.store(value, std::memory_order_relaxed);\n        }\n    }\n    //! Indicate whether thread that reads this mailbox is idle.\n    bool is_idle_state ( bool value ) const {\n        return !my_putter || my_putter->my_is_idle.load(std::memory_order_relaxed) == value;\n    }\n}; // class mail_inbox\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /* _TBB_mailbox_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/main.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/detail/_config.h\"\n\n#include \"main.h\"\n#include \"governor.h\"\n#include \"threading_control.h\"\n#include \"environment.h\"\n#include \"market.h\"\n#include \"tcm_adaptor.h\"\n#include \"misc.h\"\n#include \"itt_notify.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n//------------------------------------------------------------------------\n// Begin shared data layout.\n// The following global data items are mostly read-only after initialization.\n//------------------------------------------------------------------------\n\n//------------------------------------------------------------------------\n// governor data\nbasic_tls<thread_data*> governor::theTLS;\nrml::tbb_factory governor::theRMLServerFactory;\nbool governor::UsePrivateRML;\nbool governor::is_rethrow_broken;\n\n//------------------------------------------------------------------------\n// threading_control data\nthreading_control* threading_control::g_threading_control;\nthreading_control::global_mutex_type threading_control::g_threading_control_mutex;\n\n//------------------------------------------------------------------------\n// context propagation data\ncontext_state_propagation_mutex_type the_context_state_propagation_mutex;\nstd::atomic<uintptr_t> the_context_state_propagation_epoch{};\n\n//------------------------------------------------------------------------\n// One time initialization data\n\n//! Counter of references to global shared resources such as TLS.\nstd::atomic<int> __TBB_InitOnce::count{};\n\nstd::atomic_flag __TBB_InitOnce::InitializationLock = ATOMIC_FLAG_INIT;\n\n//! Flag that is set to true after one-time initializations are done.\nstd::atomic<bool> __TBB_InitOnce::InitializationDone{};\n\n#if __TBB_USE_ITT_NOTIFY\n//! Defined in profiling.cpp\nextern bool ITT_Present;\nvoid ITT_DoUnsafeOneTimeInitialization();\n#endif\n\n#if !(_WIN32||_WIN64) || __TBB_SOURCE_DIRECTLY_INCLUDED\nstatic __TBB_InitOnce __TBB_InitOnceHiddenInstance;\n#endif\n\n//------------------------------------------------------------------------\n// __TBB_InitOnce\n//------------------------------------------------------------------------\n\nvoid __TBB_InitOnce::add_ref() {\n    if (++count == 1) {\n        governor::acquire_resources();\n        tcm_adaptor::initialize();\n    }\n}\n\nvoid __TBB_InitOnce::remove_ref() {\n    int k = --count;\n    __TBB_ASSERT(k>=0,\"removed __TBB_InitOnce ref that was not added?\");\n    if( k==0 ) {\n        governor::release_resources();\n        ITT_FINI_ITTLIB();\n        ITT_RELEASE_RESOURCES();\n    }\n}\n\n//------------------------------------------------------------------------\n// One-time Initializations\n//------------------------------------------------------------------------\n\n//! Defined in cache_aligned_allocator.cpp\nvoid initialize_cache_aligned_allocator();\n\n//! Performs thread-safe lazy one-time general TBB initialization.\nvoid DoOneTimeInitialization() {\n    __TBB_InitOnce::lock();\n    // No fence required for load of InitializationDone, because we are inside a critical section.\n    if( !__TBB_InitOnce::InitializationDone ) {\n        __TBB_InitOnce::add_ref();\n        if( GetBoolEnvironmentVariable(\"TBB_VERSION\") ) {\n            PrintVersion();\n            tcm_adaptor::print_version();\n        }\n        bool itt_present = false;\n#if __TBB_USE_ITT_NOTIFY\n        ITT_DoUnsafeOneTimeInitialization();\n        itt_present = ITT_Present;\n#endif /* __TBB_USE_ITT_NOTIFY */\n        initialize_cache_aligned_allocator();\n        governor::initialize_rml_factory();\n        // Force processor groups support detection\n        governor::default_num_threads();\n        // Force OS regular page size detection\n        governor::default_page_size();\n        PrintExtraVersionInfo( \"TOOLS SUPPORT\", itt_present ? \"enabled\" : \"disabled\" );\n        __TBB_InitOnce::InitializationDone = true;\n    }\n    __TBB_InitOnce::unlock();\n}\n\n#if (_WIN32||_WIN64) && !__TBB_SOURCE_DIRECTLY_INCLUDED\n//! Windows \"DllMain\" that handles startup and shutdown of dynamic library.\nextern \"C\" bool WINAPI DllMain( HANDLE /*hinstDLL*/, DWORD reason, LPVOID lpvReserved ) {\n    switch( reason ) {\n        case DLL_PROCESS_ATTACH:\n            __TBB_InitOnce::add_ref();\n            break;\n        case DLL_PROCESS_DETACH:\n            // Since THREAD_DETACH is not called for the main thread, call auto-termination\n            // here as well - but not during process shutdown (due to risk of a deadlock).\n            if ( lpvReserved == nullptr ) { // library unload\n                governor::terminate_external_thread();\n            }\n            __TBB_InitOnce::remove_ref();\n            // It is assumed that InitializationDone is not set after DLL_PROCESS_DETACH,\n            // and thus no race on InitializationDone is possible.\n            if ( __TBB_InitOnce::initialization_done() ) {\n                // Remove reference that we added in DoOneTimeInitialization.\n                __TBB_InitOnce::remove_ref();\n            }\n            break;\n        case DLL_THREAD_DETACH:\n            governor::terminate_external_thread();\n            break;\n    }\n    return true;\n}\n#endif /* (_WIN32||_WIN64) && !__TBB_SOURCE_DIRECTLY_INCLUDED */\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/main.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_main_H\n#define _TBB_main_H\n\n#include \"governor.h\"\n\n#include <atomic>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nvoid DoOneTimeInitialization();\n\n//------------------------------------------------------------------------\n// __TBB_InitOnce\n//------------------------------------------------------------------------\n\n// TODO (TBB_REVAMP_TODO): consider better names\n//! Class that supports TBB initialization.\n/** It handles acquisition and release of global resources (e.g. TLS) during startup and shutdown,\n    as well as synchronization for DoOneTimeInitialization. */\nclass __TBB_InitOnce {\n    friend void DoOneTimeInitialization();\n    friend void ITT_DoUnsafeOneTimeInitialization();\n\n    static std::atomic<int> count;\n\n    //! Platform specific code to acquire resources.\n    static void acquire_resources();\n\n    //! Platform specific code to release resources.\n    static void release_resources();\n\n    //! Specifies if the one-time initializations has been done.\n    static std::atomic<bool> InitializationDone;\n\n    //! Global initialization lock\n    /** Scenarios are possible when tools interop has to be initialized before the\n        TBB itself. This imposes a requirement that the global initialization lock\n        has to support valid static initialization, and does not issue any tool\n        notifications in any build mode. **/\n    static std::atomic_flag InitializationLock;\n\npublic:\n    static void lock() {\n        tbb::detail::atomic_backoff backoff;\n        while( InitializationLock.test_and_set() ) backoff.pause();\n    }\n\n    static void unlock() { InitializationLock.clear(std::memory_order_release); }\n\n    static bool initialization_done() { return InitializationDone.load(std::memory_order_acquire); }\n\n    //! Add initial reference to resources.\n    /** We assume that dynamic loading of the library prevents any other threads\n        from entering the library until this constructor has finished running. **/\n    __TBB_InitOnce() { add_ref(); }\n\n    //! Remove the initial reference to resources.\n    /** This is not necessarily the last reference if other threads are still running. **/\n    ~__TBB_InitOnce() {\n        governor::terminate_external_thread(); // TLS dtor not called for the main thread\n        remove_ref();\n        // We assume that InitializationDone is not set after file-scope destructors\n        // start running, and thus no race on InitializationDone is possible.\n        if ( initialization_done() ) {\n            // Remove an extra reference that was added in DoOneTimeInitialization.\n            remove_ref();\n        }\n    }\n    //! Add reference to resources.  If first reference added, acquire the resources.\n    static void add_ref();\n\n    //! Remove reference to resources.  If last reference removed, release the resources.\n    static void remove_ref();\n\n}; // class __TBB_InitOnce\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /* _TBB_main_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/market.cpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"arena.h\"\n#include \"market.h\"\n\n#include <algorithm> // std::find\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n\nclass tbb_permit_manager_client : public pm_client {\npublic:\n    tbb_permit_manager_client(arena& a) : pm_client(a) {}\n\n    void register_thread() override {}\n\n    void unregister_thread() override {}\n\n    void set_allotment(unsigned allotment) {\n        my_arena.set_allotment(allotment);\n    }\n};\n\n//------------------------------------------------------------------------\n// market\n//------------------------------------------------------------------------\n\nmarket::market(unsigned workers_soft_limit)\n    : my_num_workers_soft_limit(workers_soft_limit)\n{}\n\npm_client* market::create_client(arena& a) {\n    return new (cache_aligned_allocate(sizeof(tbb_permit_manager_client))) tbb_permit_manager_client(a);\n}\n\nvoid market::register_client(pm_client* c, d1::constraints&) {\n    mutex_type::scoped_lock lock(my_mutex);\n    my_clients[c->priority_level()].push_back(c);\n}\n\nvoid market::unregister_and_destroy_client(pm_client& c) {\n    {\n        mutex_type::scoped_lock lock(my_mutex);\n        auto& clients = my_clients[c.priority_level()];\n        auto it = std::find(clients.begin(), clients.end(), &c);\n        __TBB_ASSERT(it != clients.end(), \"Destroying of an unregistered client\");\n        clients.erase(it);\n    }\n\n    auto client = static_cast<tbb_permit_manager_client*>(&c);\n    client->~tbb_permit_manager_client();\n    cache_aligned_deallocate(client);\n}\n\nvoid market::update_allotment() {\n    int effective_soft_limit = my_mandatory_num_requested > 0 && my_num_workers_soft_limit == 0 ? 1 : my_num_workers_soft_limit;\n    int max_workers = min(my_total_demand, effective_soft_limit);\n    __TBB_ASSERT(max_workers >= 0, nullptr);\n\n    int unassigned_workers = max_workers;\n    int assigned = 0;\n    int carry = 0;\n    unsigned max_priority_level = num_priority_levels;\n    for (unsigned list_idx = 0; list_idx < num_priority_levels; ++list_idx ) {\n        int assigned_per_priority = min(my_priority_level_demand[list_idx], unassigned_workers);\n        unassigned_workers -= assigned_per_priority;\n        // We use reverse iterator there to serve last added clients first\n        for (auto it = my_clients[list_idx].rbegin(); it != my_clients[list_idx].rend(); ++it) {\n            tbb_permit_manager_client& client = static_cast<tbb_permit_manager_client&>(**it);\n            if (client.max_workers() == 0) {\n                client.set_allotment(0);\n                continue;\n            }\n\n            if (max_priority_level == num_priority_levels) {\n                max_priority_level = list_idx;\n            }\n\n            int allotted = 0;\n            if (my_num_workers_soft_limit == 0) {\n                __TBB_ASSERT(max_workers == 0 || max_workers == 1, nullptr);\n                allotted = client.min_workers() > 0 && assigned < max_workers ? 1 : 0;\n            } else {\n                int tmp = client.max_workers() * assigned_per_priority + carry;\n                allotted = tmp / my_priority_level_demand[list_idx];\n                carry = tmp % my_priority_level_demand[list_idx];\n                __TBB_ASSERT(allotted <= client.max_workers(), nullptr);\n            }\n            client.set_allotment(allotted);\n            client.set_top_priority(list_idx == max_priority_level);\n            assigned += allotted;\n        }\n    }\n    __TBB_ASSERT(assigned == max_workers, nullptr);\n}\n\nvoid market::set_active_num_workers(int soft_limit) {\n    mutex_type::scoped_lock lock(my_mutex);\n    if (my_num_workers_soft_limit != soft_limit) {\n        my_num_workers_soft_limit = soft_limit;\n        update_allotment();\n    }\n}\n\nvoid market::adjust_demand(pm_client& c, int mandatory_delta, int workers_delta) {\n    __TBB_ASSERT(-1 <= mandatory_delta && mandatory_delta <= 1, nullptr);\n\n    int delta{};\n    {\n        mutex_type::scoped_lock lock(my_mutex);\n        // Update client's state\n        delta = c.update_request(mandatory_delta, workers_delta);\n\n        // Update market's state\n        my_total_demand += delta;\n        my_priority_level_demand[c.priority_level()] += delta;\n        my_mandatory_num_requested += mandatory_delta;\n\n        update_allotment();\n    }\n\n    notify_thread_request(delta);\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/market.h",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_market_H\n#define _TBB_market_H\n\n#include \"oneapi/tbb/rw_mutex.h\"\n#include \"oneapi/tbb/tbb_allocator.h\"\n#include \"oneapi/tbb/task_arena.h\"\n\n#include \"permit_manager.h\"\n#include \"pm_client.h\"\n\n#include <atomic>\n#include <vector>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nclass market : public permit_manager {\npublic:\n    market(unsigned soft_limit);\n\n    pm_client* create_client(arena& a) override;\n    void register_client(pm_client* client, d1::constraints&) override;\n    void unregister_and_destroy_client(pm_client& c) override;\n\n    //! Request that arena's need in workers should be adjusted.\n    void adjust_demand(pm_client&, int mandatory_delta, int workers_delta) override;\n\n    //! Set number of active workers\n    void set_active_num_workers(int soft_limit) override;\nprivate:\n    //! Recalculates the number of workers assigned to each arena in the list.\n    void update_allotment();\n\n    //! Keys for the arena map array. The lower the value the higher priority of the arena list.\n    static constexpr unsigned num_priority_levels = d1::num_priority_levels;\n\n    using mutex_type = d1::rw_mutex;\n    mutex_type my_mutex;\n\n    //! Current application-imposed limit on the number of workers\n    int my_num_workers_soft_limit;\n\n    //! Number of workers that were requested by all arenas on all priority levels\n    int my_total_demand{0};\n\n    //! Number of workers that were requested by arenas per single priority list item\n    int my_priority_level_demand[num_priority_levels] = {0};\n\n    //! How many times mandatory concurrency was requested from the market\n    int my_mandatory_num_requested{0};\n\n    //! Per priority list of registered arenas\n    using clients_container_type = std::vector<pm_client*, tbb::tbb_allocator<pm_client*>>;\n    clients_container_type my_clients[num_priority_levels];\n}; // class market\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /* _TBB_market_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/market_concurrent_monitor.h",
    "content": "/*\n    Copyright (c) 2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_market_concurrent_monitor_H\n#define __TBB_market_concurrent_monitor_H\n\n#include \"concurrent_monitor.h\"\n#include \"scheduler_common.h\"\n\n#include <atomic>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nstruct market_context {\n    market_context() = default;\n\n    market_context(std::uintptr_t first_addr, arena* a) :\n        my_uniq_addr(first_addr), my_arena_addr(a)\n    {}\n\n    std::uintptr_t my_uniq_addr{0};\n    arena* my_arena_addr{nullptr};\n};\n\n#if __TBB_RESUMABLE_TASKS\nclass resume_node : public wait_node<market_context> {\n    using base_type = wait_node<market_context>;\npublic:\n    resume_node(market_context ctx, execution_data_ext& ed_ext, task_dispatcher& target)\n        : base_type(ctx), my_curr_dispatcher(ed_ext.task_disp), my_target_dispatcher(&target)\n        , my_suspend_point(my_curr_dispatcher->get_suspend_point())\n    {}\n\n    ~resume_node() override {\n        if (this->my_skipped_wakeup) {\n            spin_wait_until_eq(this->my_notify_calls, 1);\n        }\n\n        poison_pointer(my_curr_dispatcher);\n        poison_pointer(my_target_dispatcher);\n        poison_pointer(my_suspend_point);\n    }\n\n    void init() override {\n        base_type::init();\n    }\n\n    void wait() override {\n        my_curr_dispatcher->resume(*my_target_dispatcher);\n        __TBB_ASSERT(!this->my_is_in_list.load(std::memory_order_relaxed), \"Still in the queue?\");\n    }\n\n    void reset() override {\n        base_type::reset();\n        spin_wait_until_eq(this->my_notify_calls, 1);\n        my_notify_calls.store(0, std::memory_order_relaxed);\n    }\n\n    // notify is called (perhaps, concurrently) twice from:\n    //   - concurrent_monitor::notify\n    //   - post_resume_action::register_waiter\n    // The second notify is called after thread switches the stack\n    // (Because we can not call resume while the stack is occupied)\n    // We need calling resume only when both notifications are performed.\n    void notify() override {\n        if (++my_notify_calls == 2) {\n            r1::resume(my_suspend_point);\n        }\n    }\n\nprivate:\n    friend class thread_data;\n    friend struct suspend_point_type::resume_task;\n    task_dispatcher* my_curr_dispatcher;\n    task_dispatcher* my_target_dispatcher;\n    suspend_point_type* my_suspend_point;\n    std::atomic<int> my_notify_calls{0};\n};\n#endif // __TBB_RESUMABLE_TASKS\n\nclass market_concurrent_monitor : public concurrent_monitor_base<market_context> {\n    using base_type = concurrent_monitor_base<market_context>;\npublic:\n    using base_type::base_type;\n\n    ~market_concurrent_monitor() {\n        destroy();\n    }\n\n    /** per-thread descriptor for concurrent_monitor */\n    using thread_context = sleep_node<market_context>;\n#if __TBB_RESUMABLE_TASKS\n    using resume_context = resume_node;\n#endif\n};\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_market_concurrent_monitor_H\n"
  },
  {
    "path": "third-party/tbb/src/tbb/misc.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// Source file for miscellaneous entities that are infrequently referenced by\n// an executing program.\n\n#include \"oneapi/tbb/detail/_exception.h\"\n#include \"oneapi/tbb/detail/_machine.h\"\n\n#include \"oneapi/tbb/version.h\"\n\n#include \"misc.h\"\n#include \"governor.h\"\n#include \"assert_impl.h\" // Out-of-line TBB assertion handling routines are instantiated here.\n#include \"concurrent_monitor_mutex.h\"\n\n#include <cstdio>\n#include <cstdlib>\n#include <stdexcept>\n#include <cstring>\n#include <cstdarg>\n\n#if _WIN32||_WIN64\n#include <windows.h>\n#endif\n\n#if !_WIN32\n#include <unistd.h> // sysconf(_SC_PAGESIZE)\n#endif\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n//------------------------------------------------------------------------\n// governor data\n//------------------------------------------------------------------------\ncpu_features_type governor::cpu_features;\n\n//------------------------------------------------------------------------\n// concurrent_monitor_mutex data\n//------------------------------------------------------------------------\n#if !__TBB_USE_FUTEX\nstd::mutex concurrent_monitor_mutex::my_init_mutex;\n#endif\n\n\nsize_t DefaultSystemPageSize() {\n#if _WIN32\n    SYSTEM_INFO si;\n    GetSystemInfo(&si);\n    return si.dwPageSize;\n#else\n    return sysconf(_SC_PAGESIZE);\n#endif\n}\n\n/** The leading \"\\0\" is here so that applying \"strings\" to the binary delivers a clean result. */\nstatic const char VersionString[] = \"\\0\" TBB_VERSION_STRINGS;\n\nstatic bool PrintVersionFlag = false;\n\nvoid PrintVersion() {\n    PrintVersionFlag = true;\n    std::fputs(VersionString+1,stderr);\n}\n\nvoid PrintExtraVersionInfo( const char* category, const char* format, ... ) {\n    if( PrintVersionFlag ) {\n        char str[1024]; std::memset(str, 0, 1024);\n        va_list args; va_start(args, format);\n        // Note: correct vsnprintf definition obtained from tbb_assert_impl.h\n        std::vsnprintf( str, 1024-1, format, args);\n        va_end(args);\n        std::fprintf(stderr, \"oneTBB: %s\\t%s\\n\", category, str );\n    }\n}\n\n//! check for transaction support.\n#if _MSC_VER\n#include <intrin.h> // for __cpuid\n#elif __APPLE__\n#include <sys/sysctl.h>\n#endif\n\n#if __TBB_x86_32 || __TBB_x86_64\nvoid check_cpuid(int leaf, int sub_leaf, int registers[4]) {\n#if _MSC_VER\n    __cpuidex(registers, leaf, sub_leaf);\n#else\n    int reg_eax = 0;\n    int reg_ebx = 0;\n    int reg_ecx = 0;\n    int reg_edx = 0;\n#if __TBB_x86_32 && __PIC__\n    // On 32-bit systems with position-independent code GCC fails to work around the stuff in EBX\n    // register. We help it using backup and restore.\n    __asm__(\"mov %%ebx, %%esi\\n\\t\"\n            \"cpuid\\n\\t\"\n            \"xchg %%ebx, %%esi\"\n            : \"=a\"(reg_eax), \"=S\"(reg_ebx), \"=c\"(reg_ecx), \"=d\"(reg_edx)\n            : \"0\"(leaf), \"2\"(sub_leaf) // read value from eax and ecx\n    );\n#else\n    __asm__(\"cpuid\"\n            : \"=a\"(reg_eax), \"=b\"(reg_ebx), \"=c\"(reg_ecx), \"=d\"(reg_edx)\n            : \"0\"(leaf), \"2\"(sub_leaf) // read value from eax and ecx\n    );\n#endif\n    registers[0] = reg_eax;\n    registers[1] = reg_ebx;\n    registers[2] = reg_ecx;\n    registers[3] = reg_edx;\n#endif\n}\n#endif\n\nvoid detect_cpu_features(cpu_features_type& cpu_features) {\n    suppress_unused_warning(cpu_features);\n#if __TBB_x86_32 || __TBB_x86_64\n    const int rtm_ebx_mask = 1 << 11;\n    const int waitpkg_ecx_mask = 1 << 5;\n    const int hybrid_edx_mask = 1 << 15;\n    int registers[4] = {0};\n\n    // Check RTM, WAITPKG, HYBRID\n    check_cpuid(7, 0, registers);\n    cpu_features.rtm_enabled = (registers[1] & rtm_ebx_mask) != 0;\n    cpu_features.waitpkg_enabled = (registers[2] & waitpkg_ecx_mask) != 0;\n    cpu_features.hybrid = (registers[3] & hybrid_edx_mask) != 0;\n#elif __APPLE__\n    // Check HYBRID (hw.nperflevels > 1)\n    uint64_t nperflevels = 0;\n    size_t nperflevels_size = sizeof(nperflevels);\n    if (!sysctlbyname(\"hw.nperflevels\", &nperflevels, &nperflevels_size, nullptr, 0)) {\n        cpu_features.hybrid = (nperflevels > 1);\n    }\n#endif\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/misc.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_tbb_misc_H\n#define _TBB_tbb_misc_H\n\n#include \"oneapi/tbb/detail/_config.h\"\n#include \"oneapi/tbb/detail/_assert.h\"\n#include \"oneapi/tbb/detail/_utils.h\"\n\n#if __TBB_ARENA_BINDING\n#include \"oneapi/tbb/info.h\"\n#endif /*__TBB_ARENA_BINDING*/\n\n#if __unix__\n#include <sys/param.h>  // __FreeBSD_version\n#if __FreeBSD_version >= 701000\n#include <sys/cpuset.h>\n#endif\n#endif\n\n#include <atomic>\n\n// Does the operating system have a system call to pin a thread to a set of OS processors?\n#define __TBB_OS_AFFINITY_SYSCALL_PRESENT ((__linux__ && !__ANDROID__) || (__FreeBSD_version >= 701000))\n// On IBM* Blue Gene* CNK nodes, the affinity API has restrictions that prevent its usability for TBB,\n// and also sysconf(_SC_NPROCESSORS_ONLN) already takes process affinity into account.\n#define __TBB_USE_OS_AFFINITY_SYSCALL (__TBB_OS_AFFINITY_SYSCALL_PRESENT && !__bg__)\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nvoid runtime_warning(const char* format, ... );\n\n#if __TBB_ARENA_BINDING\nclass task_arena;\nclass task_scheduler_observer;\n#endif /*__TBB_ARENA_BINDING*/\n\nconst std::size_t MByte = 1024*1024;\n\n#if __TBB_USE_WINAPI\n// The Microsoft Documentation about Thread Stack Size states that\n// \"The default stack reservation size used by the linker is 1 MB\"\nconst std::size_t ThreadStackSize = 1*MByte;\n#else\nconst std::size_t ThreadStackSize = (sizeof(uintptr_t) <= 4 ? 2 : 4 )*MByte;\n#endif\n\n#ifndef __TBB_HardwareConcurrency\n\n//! Returns maximal parallelism level supported by the current OS configuration.\nint AvailableHwConcurrency();\n\n#else\n\ninline int AvailableHwConcurrency() {\n    int n = __TBB_HardwareConcurrency();\n    return n > 0 ? n : 1; // Fail safety strap\n}\n#endif /* __TBB_HardwareConcurrency */\n\n//! Returns OS regular memory page size\nsize_t DefaultSystemPageSize();\n\n//! Returns number of processor groups in the current OS configuration.\n/** AvailableHwConcurrency must be called at least once before calling this method. **/\nint NumberOfProcessorGroups();\n\n#if _WIN32||_WIN64\n\n//! Retrieves index of processor group containing processor with the given index\nint FindProcessorGroupIndex ( int processorIndex );\n\n//! Affinitizes the thread to the specified processor group\nvoid MoveThreadIntoProcessorGroup( void* hThread, int groupIndex );\n\n#endif /* _WIN32||_WIN64 */\n\n//! Prints TBB version information on stderr\nvoid PrintVersion();\n\n//! Prints arbitrary extra TBB version information on stderr\nvoid PrintExtraVersionInfo( const char* category, const char* format, ... );\n\n//! A callback routine to print RML version information on stderr\nvoid PrintRMLVersionInfo( void* arg, const char* server_info );\n\n// For TBB compilation only; not to be used in public headers\n#if defined(min) || defined(max)\n#undef min\n#undef max\n#endif\n\n//! Utility template function returning lesser of the two values.\n/** Provided here to avoid including not strict safe <algorithm>.\\n\n    In case operands cause signed/unsigned or size mismatch warnings it is caller's\n    responsibility to do the appropriate cast before calling the function. **/\ntemplate<typename T>\nT min ( const T& val1, const T& val2 ) {\n    return val1 < val2 ? val1 : val2;\n}\n\n//! Utility template function returning greater of the two values.\n/** Provided here to avoid including not strict safe <algorithm>.\\n\n    In case operands cause signed/unsigned or size mismatch warnings it is caller's\n    responsibility to do the appropriate cast before calling the function. **/\ntemplate<typename T>\nT max ( const T& val1, const T& val2 ) {\n    return val1 < val2 ? val2 : val1;\n}\n\n//! Utility helper structure to ease overload resolution\ntemplate<int > struct int_to_type {};\n\n//------------------------------------------------------------------------\n// FastRandom\n//------------------------------------------------------------------------\n\n//! A fast random number generator.\n/** Uses linear congruential method. */\nclass FastRandom {\nprivate:\n    unsigned x, c;\n    static const unsigned a = 0x9e3779b1; // a big prime number\npublic:\n    //! Get a random number.\n    unsigned short get() {\n        return get(x);\n    }\n    //! Get a random number for the given seed; update the seed for next use.\n    unsigned short get( unsigned& seed ) {\n        unsigned short r = (unsigned short)(seed>>16);\n        __TBB_ASSERT(c&1, \"c must be odd for big rng period\");\n        seed = seed*a+c;\n        return r;\n    }\n    //! Construct a random number generator.\n    FastRandom( void* unique_ptr ) { init(uintptr_t(unique_ptr)); }\n\n    template <typename T>\n    void init( T seed ) {\n        init(seed,int_to_type<sizeof(seed)>());\n    }\n    void init( uint64_t seed , int_to_type<8> ) {\n        init(uint32_t((seed>>32)+seed), int_to_type<4>());\n    }\n    void init( uint32_t seed, int_to_type<4> ) {\n        // threads use different seeds for unique sequences\n        c = (seed|1)*0xba5703f5; // c must be odd, shuffle by a prime number\n        x = c^(seed>>1); // also shuffle x for the first get() invocation\n    }\n};\n\n//------------------------------------------------------------------------\n// Atomic extensions\n//------------------------------------------------------------------------\n\n//! Atomically replaces value of dst with newValue if they satisfy condition of compare predicate\n/** Return value semantics is the same as for CAS. **/\ntemplate<typename T1, class Pred>\nT1 atomic_update(std::atomic<T1>& dst, T1 newValue, Pred compare) {\n    T1 oldValue = dst.load(std::memory_order_acquire);\n    while ( compare(oldValue, newValue) ) {\n        if ( dst.compare_exchange_strong(oldValue, newValue) )\n            break;\n    }\n    return oldValue;\n}\n\n#if __TBB_USE_OS_AFFINITY_SYSCALL\n  #if __linux__\n    typedef cpu_set_t basic_mask_t;\n  #elif __FreeBSD_version >= 701000\n    typedef cpuset_t basic_mask_t;\n  #else\n    #error affinity_helper is not implemented in this OS\n  #endif\n    class affinity_helper : no_copy {\n        basic_mask_t* threadMask;\n        int is_changed;\n    public:\n        affinity_helper() : threadMask(nullptr), is_changed(0) {}\n        ~affinity_helper();\n        void protect_affinity_mask( bool restore_process_mask  );\n        void dismiss();\n    };\n    void destroy_process_mask();\n#else\n    class affinity_helper : no_copy {\n    public:\n        void protect_affinity_mask( bool ) {}\n    };\n    inline void destroy_process_mask(){}\n#endif /* __TBB_USE_OS_AFFINITY_SYSCALL */\n\nstruct cpu_features_type {\n    bool rtm_enabled{false};\n    bool waitpkg_enabled{false};\n    bool hybrid{false};\n};\n\nvoid detect_cpu_features(cpu_features_type& cpu_features);\n\n#if __TBB_ARENA_BINDING\nclass binding_handler;\n\nbinding_handler* construct_binding_handler(int slot_num, int numa_id, int core_type_id, int max_threads_per_core);\nvoid destroy_binding_handler(binding_handler* handler_ptr);\nvoid apply_affinity_mask(binding_handler* handler_ptr, int slot_num);\nvoid restore_affinity_mask(binding_handler* handler_ptr, int slot_num);\n\n#endif /*__TBB_ARENA_BINDING*/\n\n// RTM specific section\n// abort code for mutexes that detect a conflict with another thread.\nenum {\n    speculation_not_supported       = 0x00,\n    speculation_transaction_aborted = 0x01,\n    speculation_can_retry           = 0x02,\n    speculation_memadd_conflict     = 0x04,\n    speculation_buffer_overflow     = 0x08,\n    speculation_breakpoint_hit      = 0x10,\n    speculation_nested_abort        = 0x20,\n    speculation_xabort_mask         = 0xFF000000,\n    speculation_xabort_shift        = 24,\n    speculation_xabort_not_free     = 0xFF, // The value (0xFF) below comes from the Intel(R) 64 and IA-32 Architectures Optimization Reference Manual 12.4.5 lock not free\n    speculation_successful_begin    = 0xFFFFFFFF,\n    speculation_retry               = speculation_transaction_aborted\n                                      | speculation_can_retry\n                                      | speculation_memadd_conflict\n};\n\n// We suppose that successful transactions are sequentially ordered and\n// do not require additional memory fences around them.\n// Technically it can be achieved only if xbegin has implicit\n// acquire memory semantics an xend/xabort has release memory semantics on compiler and hardware level.\n// See the article: https://arxiv.org/pdf/1710.04839.pdf\nstatic inline unsigned int begin_transaction() {\n#if __TBB_TSX_INTRINSICS_PRESENT\n    return _xbegin();\n#else\n    return speculation_not_supported; // return unsuccessful code\n#endif\n}\n\nstatic inline void end_transaction() {\n#if __TBB_TSX_INTRINSICS_PRESENT\n    _xend();\n#endif\n}\n\nstatic inline void abort_transaction() {\n#if __TBB_TSX_INTRINSICS_PRESENT\n    _xabort(speculation_xabort_not_free);\n#endif\n}\n\n#if TBB_USE_ASSERT\nstatic inline unsigned char is_in_transaction() {\n#if __TBB_TSX_INTRINSICS_PRESENT\n    return _xtest();\n#else\n    return 0;\n#endif\n}\n#endif // TBB_USE_ASSERT\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /* _TBB_tbb_misc_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/misc_ex.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// Source file for miscellaneous entities that are infrequently referenced by\n// an executing program, and implementation of which requires dynamic linking.\n\n#include \"misc.h\"\n\n#if !defined(__TBB_HardwareConcurrency)\n\n#include \"dynamic_link.h\"\n#include <stdio.h>\n#include <limits.h>\n\n#if _WIN32||_WIN64\n#include <windows.h>\n#if __TBB_WIN8UI_SUPPORT\n#include <thread>\n#endif\n#else\n#include <unistd.h>\n#if __unix__\n#if __linux__\n#include <sys/sysinfo.h>\n#endif\n#include <cstring>\n#include <sched.h>\n#include <cerrno>\n#elif __sun\n#include <sys/sysinfo.h>\n#elif __FreeBSD__\n#include <cerrno>\n#include <cstring>\n#include <sys/param.h>  // Required by <sys/cpuset.h>\n#include <sys/cpuset.h>\n#endif\n#endif\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n#if __TBB_USE_OS_AFFINITY_SYSCALL\n\n#if __unix__\n// Handlers for interoperation with libiomp\nstatic int (*libiomp_try_restoring_original_mask)();\n// Table for mapping to libiomp entry points\nstatic const dynamic_link_descriptor iompLinkTable[] = {\n    DLD_NOWEAK( kmp_set_thread_affinity_mask_initial, libiomp_try_restoring_original_mask )\n};\n#endif\n\nstatic void set_thread_affinity_mask( std::size_t maskSize, const basic_mask_t* threadMask ) {\n#if __FreeBSD__ || __NetBSD__ || __OpenBSD__\n    if( cpuset_setaffinity( CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, maskSize, threadMask ) )\n#else /* __unix__ */\n    if( sched_setaffinity( 0, maskSize, threadMask ) )\n#endif\n        // Here and below the error severity is lowered from critical level\n        // because it may happen during TBB library unload because of not\n        // waiting for workers to complete (current RML policy, to be fixed).\n        // handle_perror( errno, \"setaffinity syscall\" );\n        runtime_warning( \"setaffinity syscall failed\" );\n}\n\nstatic void get_thread_affinity_mask( std::size_t maskSize, basic_mask_t* threadMask ) {\n#if __FreeBSD__ || __NetBSD__ || __OpenBSD__\n    if( cpuset_getaffinity( CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, maskSize, threadMask ) )\n#else /* __unix__ */\n    if( sched_getaffinity( 0, maskSize, threadMask ) )\n#endif\n    runtime_warning( \"getaffinity syscall failed\" );\n}\n\nstatic basic_mask_t* process_mask;\nstatic int num_masks;\n\nvoid destroy_process_mask() {\n    delete [] process_mask;\n    process_mask = nullptr;\n}\n\n#define curMaskSize sizeof(basic_mask_t) * num_masks\naffinity_helper::~affinity_helper() {\n    if( threadMask ) {\n        if( is_changed ) {\n            set_thread_affinity_mask( curMaskSize, threadMask );\n        }\n        delete [] threadMask;\n    }\n}\nvoid affinity_helper::protect_affinity_mask( bool restore_process_mask ) {\n    if( threadMask == nullptr && num_masks ) { // TODO: assert num_masks validity?\n        threadMask = new basic_mask_t [num_masks];\n        std::memset( threadMask, 0, curMaskSize );\n        get_thread_affinity_mask( curMaskSize, threadMask );\n        if( restore_process_mask ) {\n            __TBB_ASSERT( process_mask, \"A process mask is requested but not yet stored\" );\n            is_changed = memcmp( process_mask, threadMask, curMaskSize );\n            if( is_changed )\n                set_thread_affinity_mask( curMaskSize, process_mask );\n        } else {\n            // Assume that the mask will be changed by the caller.\n            is_changed = 1;\n        }\n    }\n}\nvoid affinity_helper::dismiss() {\n    delete [] threadMask;\n    threadMask = nullptr;\n    is_changed = 0;\n}\n#undef curMaskSize\n\nstatic std::atomic<do_once_state> hardware_concurrency_info;\n\nstatic int theNumProcs;\n\nstatic void initialize_hardware_concurrency_info () {\n    int err;\n    int availableProcs = 0;\n    int numMasks = 1;\n    int maxProcs = sysconf(_SC_NPROCESSORS_ONLN);\n    basic_mask_t* processMask;\n    const std::size_t BasicMaskSize =  sizeof(basic_mask_t);\n    for (;;) {\n        const int curMaskSize = BasicMaskSize * numMasks;\n        processMask = new basic_mask_t[numMasks];\n        std::memset( processMask, 0, curMaskSize );\n#if __FreeBSD__ || __NetBSD__ || __OpenBSD__\n        // CPU_LEVEL_WHICH - anonymous (current) mask, CPU_LEVEL_CPUSET - assigned mask\n        err = cpuset_getaffinity( CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, curMaskSize, processMask );\n        if ( !err || errno != ERANGE || curMaskSize * CHAR_BIT >= 16 * 1024 )\n            break;\n#else /* __unix__ */\n        int pid = getpid();\n        err = sched_getaffinity( pid, curMaskSize, processMask );\n        if ( !err || errno != EINVAL || curMaskSize * CHAR_BIT >= 256 * 1024 )\n             break;\n#endif\n        delete[] processMask;\n        numMasks <<= 1;\n    }\n    if ( !err ) {\n        // We have found the mask size and captured the process affinity mask into processMask.\n        num_masks = numMasks; // do here because it's needed for affinity_helper to work\n#if __unix__\n        // For better coexistence with libiomp which might have changed the mask already,\n        // check for its presence and ask it to restore the mask.\n        dynamic_link_handle libhandle;\n        if ( dynamic_link( \"libiomp5.so\", iompLinkTable, 1, &libhandle, DYNAMIC_LINK_GLOBAL ) ) {\n            // We have found the symbol provided by libiomp5 for restoring original thread affinity.\n            affinity_helper affhelp;\n            affhelp.protect_affinity_mask( /*restore_process_mask=*/false );\n            if ( libiomp_try_restoring_original_mask()==0 ) {\n                // Now we have the right mask to capture, restored by libiomp.\n                const int curMaskSize = BasicMaskSize * numMasks;\n                std::memset( processMask, 0, curMaskSize );\n                get_thread_affinity_mask( curMaskSize, processMask );\n            } else\n                affhelp.dismiss();  // thread mask has not changed\n            dynamic_unlink( libhandle );\n            // Destructor of affinity_helper restores the thread mask (unless dismissed).\n        }\n#endif\n        for ( int m = 0; availableProcs < maxProcs && m < numMasks; ++m ) {\n            for ( std::size_t i = 0; (availableProcs < maxProcs) && (i < BasicMaskSize * CHAR_BIT); ++i ) {\n                if ( CPU_ISSET( i, processMask + m ) )\n                    ++availableProcs;\n            }\n        }\n        process_mask = processMask;\n    }\n    else {\n        // Failed to get the process affinity mask; assume the whole machine can be used.\n        availableProcs = (maxProcs == INT_MAX) ? sysconf(_SC_NPROCESSORS_ONLN) : maxProcs;\n        delete[] processMask;\n    }\n    theNumProcs = availableProcs > 0 ? availableProcs : 1; // Fail safety strap\n    __TBB_ASSERT( theNumProcs <= sysconf(_SC_NPROCESSORS_ONLN), nullptr);\n}\n\nint AvailableHwConcurrency() {\n    atomic_do_once( &initialize_hardware_concurrency_info, hardware_concurrency_info );\n    return theNumProcs;\n}\n\n/* End of __TBB_USE_OS_AFFINITY_SYSCALL implementation */\n#elif __ANDROID__\n\n// Work-around for Android that reads the correct number of available CPUs since system calls are unreliable.\n// Format of \"present\" file is: ([<int>-<int>|<int>],)+\nint AvailableHwConcurrency() {\n    FILE *fp = fopen(\"/sys/devices/system/cpu/present\", \"r\");\n    if (fp == nullptr) return 1;\n    int num_args, lower, upper, num_cpus=0;\n    while ((num_args = fscanf(fp, \"%u-%u\", &lower, &upper)) != EOF) {\n        switch(num_args) {\n            case 2: num_cpus += upper - lower + 1; break;\n            case 1: num_cpus += 1; break;\n        }\n        fscanf(fp, \",\");\n    }\n    fclose(fp);\n    return (num_cpus > 0) ? num_cpus : 1;\n}\n\n#elif defined(_SC_NPROCESSORS_ONLN)\n\nint AvailableHwConcurrency() {\n    int n = sysconf(_SC_NPROCESSORS_ONLN);\n    return (n > 0) ? n : 1;\n}\n\n#elif _WIN32||_WIN64\n\nstatic std::atomic<do_once_state> hardware_concurrency_info;\n\nstatic const WORD TBB_ALL_PROCESSOR_GROUPS = 0xffff;\n\n// Statically allocate an array for processor group information.\n// Windows 7 supports maximum 4 groups, but let's look ahead a little.\nstatic const WORD MaxProcessorGroups = 64;\n\nstruct ProcessorGroupInfo {\n    DWORD_PTR   mask;                   ///< Affinity mask covering the whole group\n    int         numProcs;               ///< Number of processors in the group\n    int         numProcsRunningTotal;   ///< Subtotal of processors in this and preceding groups\n\n    //! Total number of processor groups in the system\n    static int NumGroups;\n\n    //! Index of the group with a slot reserved for the first external thread\n    /** In the context of multiple processor groups support current implementation\n        defines \"the first external thread\" as the first thread to invoke\n        AvailableHwConcurrency().\n\n        TODO:   Implement a dynamic scheme remapping workers depending on the pending\n                external threads affinity. **/\n    static int HoleIndex;\n};\n\nint ProcessorGroupInfo::NumGroups = 1;\nint ProcessorGroupInfo::HoleIndex = 0;\n\nProcessorGroupInfo theProcessorGroups[MaxProcessorGroups];\nint calculate_numa[MaxProcessorGroups];  //Array needed for FindProcessorGroupIndex to calculate Processor Group when number of threads > number of cores to distribute threads evenly between processor groups\nint numaSum;\nstruct TBB_GROUP_AFFINITY {\n    DWORD_PTR Mask;\n    WORD   Group;\n    WORD   Reserved[3];\n};\n\nstatic DWORD (WINAPI *TBB_GetActiveProcessorCount)( WORD groupIndex ) = nullptr;\nstatic WORD (WINAPI *TBB_GetActiveProcessorGroupCount)() = nullptr;\nstatic BOOL (WINAPI *TBB_SetThreadGroupAffinity)( HANDLE hThread,\n                        const TBB_GROUP_AFFINITY* newAff, TBB_GROUP_AFFINITY *prevAff );\nstatic BOOL (WINAPI *TBB_GetThreadGroupAffinity)( HANDLE hThread, TBB_GROUP_AFFINITY* );\n\nstatic const dynamic_link_descriptor ProcessorGroupsApiLinkTable[] = {\n      DLD(GetActiveProcessorCount, TBB_GetActiveProcessorCount)\n    , DLD(GetActiveProcessorGroupCount, TBB_GetActiveProcessorGroupCount)\n    , DLD(SetThreadGroupAffinity, TBB_SetThreadGroupAffinity)\n    , DLD(GetThreadGroupAffinity, TBB_GetThreadGroupAffinity)\n};\n\nstatic void initialize_hardware_concurrency_info () {\n    suppress_unused_warning(TBB_ALL_PROCESSOR_GROUPS);\n#if __TBB_WIN8UI_SUPPORT\n    // For these applications processor groups info is unavailable\n    // Setting up a number of processors for one processor group\n    theProcessorGroups[0].numProcs = theProcessorGroups[0].numProcsRunningTotal = std::thread::hardware_concurrency();\n#else /* __TBB_WIN8UI_SUPPORT */\n    dynamic_link( \"Kernel32.dll\", ProcessorGroupsApiLinkTable,\n                  sizeof(ProcessorGroupsApiLinkTable)/sizeof(dynamic_link_descriptor) );\n    SYSTEM_INFO si;\n    GetNativeSystemInfo(&si);\n    DWORD_PTR pam, sam, m = 1;\n    GetProcessAffinityMask( GetCurrentProcess(), &pam, &sam );\n    int nproc = 0;\n    for ( std::size_t i = 0; i < sizeof(DWORD_PTR) * CHAR_BIT; ++i, m <<= 1 ) {\n        if ( pam & m )\n            ++nproc;\n    }\n    int number_of_processors = (int)si.dwNumberOfProcessors;\n    if (nproc > number_of_processors && TBB_GetThreadGroupAffinity) {\n        // Sometimes on systems with multiple processor groups GetNativeSystemInfo\n        // reports mask and processor count from the parent process\n        TBB_GROUP_AFFINITY ga;\n        if (TBB_GetThreadGroupAffinity(GetCurrentThread(), &ga)) {\n            number_of_processors = (int)TBB_GetActiveProcessorCount(ga.Group);\n        }\n    }\n\n    __TBB_ASSERT( nproc <= number_of_processors, nullptr);\n    // By default setting up a number of processors for one processor group\n    theProcessorGroups[0].numProcs = theProcessorGroups[0].numProcsRunningTotal = nproc;\n    // Setting up processor groups in case the process does not restrict affinity mask and more than one processor group is present\n    if ( nproc == number_of_processors && TBB_GetActiveProcessorCount ) {\n        // The process does not have restricting affinity mask and multiple processor groups are possible\n        ProcessorGroupInfo::NumGroups = (int)TBB_GetActiveProcessorGroupCount();\n        __TBB_ASSERT( ProcessorGroupInfo::NumGroups <= MaxProcessorGroups, nullptr);\n        // Fail safety bootstrap. Release versions will limit available concurrency\n        // level, while debug ones would assert.\n        if ( ProcessorGroupInfo::NumGroups > MaxProcessorGroups )\n            ProcessorGroupInfo::NumGroups = MaxProcessorGroups;\n        if ( ProcessorGroupInfo::NumGroups > 1 ) {\n            TBB_GROUP_AFFINITY ga;\n            if ( TBB_GetThreadGroupAffinity( GetCurrentThread(), &ga ) )\n                ProcessorGroupInfo::HoleIndex = ga.Group;\n            int nprocs = 0;\n            int min_procs = INT_MAX;\n            for ( WORD i = 0; i < ProcessorGroupInfo::NumGroups; ++i ) {\n                ProcessorGroupInfo  &pgi = theProcessorGroups[i];\n                pgi.numProcs = (int)TBB_GetActiveProcessorCount(i);\n                if (pgi.numProcs < min_procs) min_procs = pgi.numProcs;  //Finding the minimum number of processors in the Processor Groups\n                calculate_numa[i] = pgi.numProcs;\n                __TBB_ASSERT( pgi.numProcs <= (int)sizeof(DWORD_PTR) * CHAR_BIT, nullptr);\n                pgi.mask = pgi.numProcs == sizeof(DWORD_PTR) * CHAR_BIT ? ~(DWORD_PTR)0 : (DWORD_PTR(1) << pgi.numProcs) - 1;\n                pgi.numProcsRunningTotal = nprocs += pgi.numProcs;\n            }\n            __TBB_ASSERT( nprocs == (int)TBB_GetActiveProcessorCount( TBB_ALL_PROCESSOR_GROUPS ), nullptr);\n\n            calculate_numa[0] = (calculate_numa[0] / min_procs)-1;\n            for (WORD i = 1; i < ProcessorGroupInfo::NumGroups; ++i) {\n                calculate_numa[i] = calculate_numa[i-1] + (calculate_numa[i] / min_procs);\n            }\n\n            numaSum = calculate_numa[ProcessorGroupInfo::NumGroups - 1];\n\n        }\n\n    }\n#endif /* __TBB_WIN8UI_SUPPORT */\n\n    PrintExtraVersionInfo(\"Processor groups\", \"%d\", ProcessorGroupInfo::NumGroups);\n    if (ProcessorGroupInfo::NumGroups>1)\n        for (int i=0; i<ProcessorGroupInfo::NumGroups; ++i)\n            PrintExtraVersionInfo( \"----- Group\", \"%d: size %d\", i, theProcessorGroups[i].numProcs);\n}\n\nint NumberOfProcessorGroups() {\n    __TBB_ASSERT( hardware_concurrency_info == do_once_state::initialized, \"NumberOfProcessorGroups is used before AvailableHwConcurrency\" );\n    return ProcessorGroupInfo::NumGroups;\n}\n\nint FindProcessorGroupIndex ( int procIdx ) {\n    int current_grp_idx = ProcessorGroupInfo::HoleIndex;\n    if (procIdx >= theProcessorGroups[current_grp_idx].numProcs  && procIdx < theProcessorGroups[ProcessorGroupInfo::NumGroups - 1].numProcsRunningTotal) {\n        procIdx = procIdx - theProcessorGroups[current_grp_idx].numProcs;\n        do {\n            current_grp_idx = (current_grp_idx + 1) % (ProcessorGroupInfo::NumGroups);\n            procIdx = procIdx - theProcessorGroups[current_grp_idx].numProcs;\n\n        } while (procIdx >= 0);\n    }\n    else if (procIdx >= theProcessorGroups[ProcessorGroupInfo::NumGroups - 1].numProcsRunningTotal) {\n        int temp_grp_index = 0;\n        procIdx = procIdx - theProcessorGroups[ProcessorGroupInfo::NumGroups - 1].numProcsRunningTotal; \n        procIdx = procIdx % (numaSum+1);  //ProcIdx to stay between 0 and numaSum\n\n        while (procIdx - calculate_numa[temp_grp_index] > 0) {\n            temp_grp_index = (temp_grp_index + 1) % ProcessorGroupInfo::NumGroups;\n        }\n        current_grp_idx = temp_grp_index;\n    }\n    __TBB_ASSERT(current_grp_idx < ProcessorGroupInfo::NumGroups, nullptr);\n\n    return current_grp_idx;\n}\n\nvoid MoveThreadIntoProcessorGroup( void* hThread, int groupIndex ) {\n    __TBB_ASSERT( hardware_concurrency_info == do_once_state::initialized, \"MoveThreadIntoProcessorGroup is used before AvailableHwConcurrency\" );\n    if ( !TBB_SetThreadGroupAffinity )\n        return;\n    TBB_GROUP_AFFINITY ga = { theProcessorGroups[groupIndex].mask, (WORD)groupIndex, {0,0,0} };\n    TBB_SetThreadGroupAffinity( hThread, &ga, nullptr);\n}\n\nint AvailableHwConcurrency() {\n    atomic_do_once( &initialize_hardware_concurrency_info, hardware_concurrency_info );\n    return theProcessorGroups[ProcessorGroupInfo::NumGroups - 1].numProcsRunningTotal;\n}\n\n/* End of _WIN32||_WIN64 implementation */\n#else\n    #error AvailableHwConcurrency is not implemented for this OS\n#endif\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /* !__TBB_HardwareConcurrency */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/observer_proxy.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/detail/_config.h\"\n#include \"oneapi/tbb/detail/_utils.h\"\n\n#include \"observer_proxy.h\"\n#include \"arena.h\"\n#include \"main.h\"\n#include \"thread_data.h\"\n\n#include <atomic>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n#if TBB_USE_ASSERT\nextern std::atomic<int> the_observer_proxy_count;\n#endif /* TBB_USE_ASSERT */\n\nobserver_proxy::observer_proxy( d1::task_scheduler_observer& tso )\n    : my_ref_count(1), my_list(nullptr), my_next(nullptr), my_prev(nullptr), my_observer(&tso)\n{\n#if TBB_USE_ASSERT\n    ++the_observer_proxy_count;\n#endif /* TBB_USE_ASSERT */\n}\n\nobserver_proxy::~observer_proxy() {\n    __TBB_ASSERT( !my_ref_count, \"Attempt to destroy proxy still in use\" );\n    poison_value(my_ref_count);\n    poison_pointer(my_prev);\n    poison_pointer(my_next);\n#if TBB_USE_ASSERT\n    --the_observer_proxy_count;\n#endif /* TBB_USE_ASSERT */\n}\n\nvoid observer_list::clear() {\n    {\n        scoped_lock lock(mutex(), /*is_writer=*/true);\n        observer_proxy *next = my_head.load(std::memory_order_relaxed);\n        while ( observer_proxy *p = next ) {\n            next = p->my_next;\n            // Both proxy p and observer p->my_observer (if non-null) are guaranteed\n            // to be alive while the list is locked.\n            d1::task_scheduler_observer *obs = p->my_observer;\n            // Make sure that possible concurrent observer destruction does not\n            // conflict with the proxy list cleanup.\n            if (!obs || !(p = obs->my_proxy.exchange(nullptr))) {\n                continue;\n            }\n            // accessing 'obs' after detaching of obs->my_proxy leads to the race with observer destruction\n            __TBB_ASSERT(!next || p == next->my_prev, nullptr);\n            __TBB_ASSERT(is_alive(p->my_ref_count), \"Observer's proxy died prematurely\");\n            __TBB_ASSERT(p->my_ref_count.load(std::memory_order_relaxed) == 1, \"Reference for observer is missing\");\n            poison_pointer(p->my_observer);\n            remove(p);\n            --p->my_ref_count;\n            delete p;\n        }\n    }\n\n    // If observe(false) is called concurrently with the destruction of the arena,\n    // need to wait until all proxies are removed.\n    for (atomic_backoff backoff; ; backoff.pause()) {\n        scoped_lock lock(mutex(), /*is_writer=*/false);\n        if (my_head.load(std::memory_order_relaxed) == nullptr) {\n            break;\n        }\n    }\n\n    __TBB_ASSERT(my_head.load(std::memory_order_relaxed) == nullptr && my_tail.load(std::memory_order_relaxed) == nullptr, nullptr);\n}\n\nvoid observer_list::insert( observer_proxy* p ) {\n    scoped_lock lock(mutex(), /*is_writer=*/true);\n    if (my_head.load(std::memory_order_relaxed)) {\n        p->my_prev = my_tail.load(std::memory_order_relaxed);\n        my_tail.load(std::memory_order_relaxed)->my_next = p;\n    } else {\n        my_head.store(p, std::memory_order_relaxed);\n    }\n    my_tail.store(p, std::memory_order_relaxed);\n}\n\nvoid observer_list::remove(observer_proxy* p) {\n    __TBB_ASSERT(my_head.load(std::memory_order_relaxed), \"Attempt to remove an item from an empty list\");\n    __TBB_ASSERT(!my_tail.load(std::memory_order_relaxed)->my_next, \"Last item's my_next must be nullptr\");\n    if (p == my_tail.load(std::memory_order_relaxed)) {\n        __TBB_ASSERT(!p->my_next, nullptr);\n        my_tail.store(p->my_prev, std::memory_order_relaxed);\n    } else {\n        __TBB_ASSERT(p->my_next, nullptr);\n        p->my_next->my_prev = p->my_prev;\n    }\n    if (p == my_head.load(std::memory_order_relaxed)) {\n        __TBB_ASSERT(!p->my_prev, nullptr);\n        my_head.store(p->my_next, std::memory_order_relaxed);\n    } else {\n        __TBB_ASSERT(p->my_prev, nullptr);\n        p->my_prev->my_next = p->my_next;\n    }\n    __TBB_ASSERT((my_head.load(std::memory_order_relaxed) && my_tail.load(std::memory_order_relaxed)) ||\n        (!my_head.load(std::memory_order_relaxed) && !my_tail.load(std::memory_order_relaxed)), nullptr);\n}\n\nvoid observer_list::remove_ref(observer_proxy* p) {\n    std::uintptr_t r = p->my_ref_count.load(std::memory_order_acquire);\n    __TBB_ASSERT(is_alive(r), nullptr);\n    while (r > 1) {\n        if (p->my_ref_count.compare_exchange_strong(r, r - 1)) {\n            return;\n        }\n    }\n    __TBB_ASSERT(r == 1, nullptr);\n    // Reference count might go to zero\n    {\n        // Use lock to avoid resurrection by a thread concurrently walking the list\n        observer_list::scoped_lock lock(mutex(), /*is_writer=*/true);\n        r = --p->my_ref_count;\n        if (!r) {\n            remove(p);\n        }\n    }\n    __TBB_ASSERT(r || !p->my_ref_count, nullptr);\n    if (!r) {\n        delete p;\n    }\n}\n\nvoid observer_list::do_notify_entry_observers(observer_proxy*& last, bool worker) {\n    // Pointer p marches though the list from last (exclusively) to the end.\n    observer_proxy* p = last, * prev = p;\n    for (;;) {\n        d1::task_scheduler_observer* tso = nullptr;\n        // Hold lock on list only long enough to advance to the next proxy in the list.\n        {\n            scoped_lock lock(mutex(), /*is_writer=*/false);\n            do {\n                if (p) {\n                    // We were already processing the list.\n                    if (observer_proxy* q = p->my_next) {\n                        if (p == prev) {\n                            remove_ref_fast(prev); // sets prev to nullptr if successful\n                        }\n                        p = q;\n                    } else {\n                        // Reached the end of the list.\n                        if (p == prev) {\n                            // Keep the reference as we store the 'last' pointer in scheduler\n                            __TBB_ASSERT(int(p->my_ref_count.load(std::memory_order_relaxed)) >= 1 + (p->my_observer ? 1 : 0), nullptr);\n                        } else {\n                            // The last few proxies were empty\n                            __TBB_ASSERT(int(p->my_ref_count.load(std::memory_order_relaxed)), nullptr);\n                            ++p->my_ref_count;\n                            if (prev) {\n                                lock.release();\n                                remove_ref(prev);\n                            }\n                        }\n                        last = p;\n                        return;\n                    }\n                } else {\n                    // Starting pass through the list\n                    p = my_head.load(std::memory_order_relaxed);\n                    if (!p) {\n                        return;\n                    }\n                }\n                tso = p->my_observer;\n            } while (!tso);\n            ++p->my_ref_count;\n            ++tso->my_busy_count;\n        }\n        __TBB_ASSERT(!prev || p != prev, nullptr);\n        // Release the proxy pinned before p\n        if (prev) {\n            remove_ref(prev);\n        }\n        // Do not hold any locks on the list while calling user's code.\n        // Do not intercept any exceptions that may escape the callback so that\n        // they are either handled by the TBB scheduler or passed to the debugger.\n        tso->on_scheduler_entry(worker);\n        __TBB_ASSERT(p->my_ref_count.load(std::memory_order_relaxed), nullptr);\n        intptr_t bc = --tso->my_busy_count;\n        __TBB_ASSERT_EX(bc >= 0, \"my_busy_count underflowed\");\n        prev = p;\n    }\n}\n\nvoid observer_list::do_notify_exit_observers(observer_proxy* last, bool worker) {\n    // Pointer p marches though the list from the beginning to last (inclusively).\n    observer_proxy* p = nullptr, * prev = nullptr;\n    for (;;) {\n        d1::task_scheduler_observer* tso = nullptr;\n        // Hold lock on list only long enough to advance to the next proxy in the list.\n        {\n            scoped_lock lock(mutex(), /*is_writer=*/false);\n            do {\n                if (p) {\n                    // We were already processing the list.\n                    if (p != last) {\n                        __TBB_ASSERT(p->my_next, \"List items before 'last' must have valid my_next pointer\");\n                        if (p == prev)\n                            remove_ref_fast(prev); // sets prev to nullptr if successful\n                        p = p->my_next;\n                    } else {\n                        // remove the reference from the last item\n                        remove_ref_fast(p);\n                        if (p) {\n                            lock.release();\n                            if (p != prev && prev) {\n                                remove_ref(prev);\n                            }\n                            remove_ref(p);\n                        }\n                        return;\n                    }\n                } else {\n                    // Starting pass through the list\n                    p = my_head.load(std::memory_order_relaxed);\n                    __TBB_ASSERT(p, \"Nonzero 'last' must guarantee that the global list is non-empty\");\n                }\n                tso = p->my_observer;\n            } while (!tso);\n            // The item is already refcounted\n            if (p != last) // the last is already referenced since entry notification\n                ++p->my_ref_count;\n            ++tso->my_busy_count;\n        }\n        __TBB_ASSERT(!prev || p != prev, nullptr);\n        if (prev)\n            remove_ref(prev);\n        // Do not hold any locks on the list while calling user's code.\n        // Do not intercept any exceptions that may escape the callback so that\n        // they are either handled by the TBB scheduler or passed to the debugger.\n        tso->on_scheduler_exit(worker);\n        __TBB_ASSERT(p->my_ref_count || p == last, nullptr);\n        intptr_t bc = --tso->my_busy_count;\n        __TBB_ASSERT_EX(bc >= 0, \"my_busy_count underflowed\");\n        prev = p;\n    }\n}\n\nvoid __TBB_EXPORTED_FUNC observe(d1::task_scheduler_observer &tso, bool enable) {\n    if( enable ) {\n        if( !tso.my_proxy.load(std::memory_order_relaxed) ) {\n            observer_proxy* p = new observer_proxy(tso);\n            tso.my_proxy.store(p, std::memory_order_relaxed);\n            tso.my_busy_count.store(0, std::memory_order_relaxed);\n\n            thread_data* td = governor::get_thread_data_if_initialized();\n            if (p->my_observer->my_task_arena == nullptr) {\n                if (!(td && td->my_arena)) {\n                    td = governor::get_thread_data();\n                }\n                __TBB_ASSERT(__TBB_InitOnce::initialization_done(), nullptr);\n                __TBB_ASSERT(td && td->my_arena, nullptr);\n                p->my_list = &td->my_arena->my_observers;\n            } else {\n                d1::task_arena* ta = p->my_observer->my_task_arena;\n                arena* a = ta->my_arena.load(std::memory_order_acquire);\n                if (a == nullptr) { // Avoid recursion during arena initialization\n                    ta->initialize();\n                    a = ta->my_arena.load(std::memory_order_relaxed);\n                }\n                __TBB_ASSERT(a != nullptr, nullptr);\n                p->my_list = &a->my_observers;\n            }\n            p->my_list->insert(p);\n            // Notify newly activated observer and other pending ones if it belongs to current arena\n            if (td && td->my_arena && &td->my_arena->my_observers == p->my_list) {\n                p->my_list->notify_entry_observers(td->my_last_observer, td->my_is_worker);\n            }\n        }\n    } else {\n        // Make sure that possible concurrent proxy list cleanup does not conflict\n        // with the observer destruction here.\n        if ( observer_proxy* proxy = tso.my_proxy.exchange(nullptr) ) {\n            // List destruction should not touch this proxy after we've won the above interlocked exchange.\n            __TBB_ASSERT( proxy->my_observer == &tso, nullptr);\n            __TBB_ASSERT( is_alive(proxy->my_ref_count.load(std::memory_order_relaxed)), \"Observer's proxy died prematurely\" );\n            __TBB_ASSERT( proxy->my_ref_count.load(std::memory_order_relaxed) >= 1, \"reference for observer missing\" );\n            observer_list &list = *proxy->my_list;\n            {\n                // Ensure that none of the list walkers relies on observer pointer validity\n                observer_list::scoped_lock lock(list.mutex(), /*is_writer=*/true);\n                proxy->my_observer = nullptr;\n                // Proxy may still be held by other threads (to track the last notified observer)\n                if( !--proxy->my_ref_count ) {// nobody can increase it under exclusive lock\n                    list.remove(proxy);\n                    __TBB_ASSERT( !proxy->my_ref_count, nullptr);\n                    delete proxy;\n                }\n            }\n            spin_wait_until_eq(tso.my_busy_count, 0); // other threads are still accessing the callback\n        }\n    }\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/observer_proxy.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_observer_proxy_H\n#define __TBB_observer_proxy_H\n\n#include \"oneapi/tbb/detail/_config.h\"\n#include \"oneapi/tbb/detail/_aligned_space.h\"\n\n#include \"oneapi/tbb/task_scheduler_observer.h\"\n#include \"oneapi/tbb/spin_rw_mutex.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nclass observer_list {\n    friend class arena;\n\n    // Mutex is wrapped with aligned_space to shut up warnings when its destructor\n    // is called while threads are still using it.\n    typedef aligned_space<spin_rw_mutex>  my_mutex_type;\n\n    //! Pointer to the head of this list.\n    std::atomic<observer_proxy*> my_head{nullptr};\n\n    //! Pointer to the tail of this list.\n    std::atomic<observer_proxy*> my_tail{nullptr};\n\n    //! Mutex protecting this list.\n    my_mutex_type my_mutex;\n\n    //! Back-pointer to the arena this list belongs to.\n    arena* my_arena;\n\n    //! Decrement refcount of the proxy p if there are other outstanding references.\n    /** In case of success sets p to nullptr. Must be invoked from under the list lock. **/\n    inline static void remove_ref_fast( observer_proxy*& p );\n\n    //! Implements notify_entry_observers functionality.\n    void do_notify_entry_observers( observer_proxy*& last, bool worker );\n\n    //! Implements notify_exit_observers functionality.\n    void do_notify_exit_observers( observer_proxy* last, bool worker );\n\npublic:\n    observer_list () = default;\n\n    //! Removes and destroys all observer proxies from the list.\n    /** Cannot be used concurrently with other methods. **/\n    void clear ();\n\n    //! Add observer proxy to the tail of the list.\n    void insert ( observer_proxy* p );\n\n    //! Remove observer proxy from the list.\n    void remove ( observer_proxy* p );\n\n    //! Decrement refcount of the proxy and destroy it if necessary.\n    /** When refcount reaches zero removes the proxy from the list and destructs it. **/\n    void remove_ref( observer_proxy* p );\n\n    //! Type of the scoped lock for the reader-writer mutex associated with the list.\n    typedef spin_rw_mutex::scoped_lock scoped_lock;\n\n    //! Accessor to the reader-writer mutex associated with the list.\n    spin_rw_mutex& mutex () { return my_mutex.begin()[0]; }\n\n    //! Call entry notifications on observers added after last was notified.\n    /** Updates last to become the last notified observer proxy (in the global list)\n        or leaves it to be nullptr. The proxy has its refcount incremented. **/\n    inline void notify_entry_observers( observer_proxy*& last, bool worker );\n\n    //! Call exit notifications on last and observers added before it.\n    inline void notify_exit_observers( observer_proxy*& last, bool worker );\n}; // class observer_list\n\n//! Wrapper for an observer object\n/** To maintain shared lists of observers the scheduler first wraps each observer\n    object into a proxy so that a list item remained valid even after the corresponding\n    proxy object is destroyed by the user code. **/\nclass observer_proxy {\n    friend class d1::task_scheduler_observer;\n    friend class observer_list;\n    friend void observe(d1::task_scheduler_observer&, bool);\n    //! Reference count used for garbage collection.\n    /** 1 for reference from my task_scheduler_observer.\n        1 for each task dispatcher's last observer pointer.\n        No accounting for neighbors in the shared list. */\n    std::atomic<std::uintptr_t> my_ref_count;\n    //! Reference to the list this observer belongs to.\n    observer_list* my_list;\n    //! Pointer to next observer in the list specified by my_head.\n    /** nullptr for the last item in the list. **/\n    observer_proxy* my_next;\n    //! Pointer to the previous observer in the list specified by my_head.\n    /** For the head of the list points to the last item. **/\n    observer_proxy* my_prev;\n    //! Associated observer\n    d1::task_scheduler_observer* my_observer;\n\n    //! Constructs proxy for the given observer and adds it to the specified list.\n    observer_proxy( d1::task_scheduler_observer& );\n\n    ~observer_proxy();\n}; // class observer_proxy\n\nvoid observer_list::remove_ref_fast( observer_proxy*& p ) {\n    if( p->my_observer ) {\n        // Can decrement refcount quickly, as it cannot drop to zero while under the lock.\n        std::uintptr_t r = --p->my_ref_count;\n        __TBB_ASSERT_EX( r, nullptr);\n        p = nullptr;\n    } else {\n        // Use slow form of refcount decrementing, after the lock is released.\n    }\n}\n\nvoid observer_list::notify_entry_observers(observer_proxy*& last, bool worker) {\n    if (last == my_tail.load(std::memory_order_relaxed))\n        return;\n    do_notify_entry_observers(last, worker);\n}\n\nvoid observer_list::notify_exit_observers( observer_proxy*& last, bool worker ) {\n    if (last == nullptr) {\n        return;\n    }\n    __TBB_ASSERT(!is_poisoned(last), nullptr);\n    do_notify_exit_observers( last, worker );\n    __TBB_ASSERT(last != nullptr, nullptr);\n    poison_pointer(last);\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /* __TBB_observer_proxy_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/parallel_pipeline.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/parallel_pipeline.h\"\n#include \"oneapi/tbb/spin_mutex.h\"\n#include \"oneapi/tbb/tbb_allocator.h\"\n#include \"oneapi/tbb/cache_aligned_allocator.h\"\n#include \"itt_notify.h\"\n#include \"tls.h\"\n#include \"oneapi/tbb/detail/_exception.h\"\n#include \"oneapi/tbb/detail/_small_object_pool.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nvoid handle_perror(int error_code, const char* aux_info);\n\nusing Token = unsigned long;\n\n//! A processing pipeline that applies filters to items.\n/** @ingroup algorithms */\nclass pipeline {\n    friend void parallel_pipeline(d1::task_group_context&, std::size_t, const d1::filter_node&);\npublic:\n\n    //! Construct empty pipeline.\n    pipeline(d1::task_group_context& cxt, std::size_t max_token) :\n        my_context(cxt),\n        first_filter(nullptr),\n        last_filter(nullptr),\n        input_tokens(Token(max_token)),\n        end_of_input(false),\n        wait_ctx(0) {\n            __TBB_ASSERT( max_token>0, \"pipeline::run must have at least one token\" );\n        }\n\n    ~pipeline();\n\n    //! Add filter to end of pipeline.\n    void add_filter( d1::base_filter& );\n\n    //! Traverse tree of fitler-node in-order and add filter for each leaf\n    void fill_pipeline(const d1::filter_node& root) {\n        if( root.left && root.right ) {\n            fill_pipeline(*root.left);\n            fill_pipeline(*root.right);\n        }\n        else {\n            __TBB_ASSERT(!root.left && !root.right, \"tree should be full\");\n            add_filter(*root.create_filter());\n        }\n    }\n\nprivate:\n    friend class stage_task;\n    friend class base_filter;\n    friend void set_end_of_input(d1::base_filter& bf);\n\n    task_group_context& my_context;\n\n    //! Pointer to first filter in the pipeline.\n    d1::base_filter* first_filter;\n\n    //! Pointer to last filter in the pipeline.\n    d1::base_filter* last_filter;\n\n    //! Number of idle tokens waiting for input stage.\n    std::atomic<Token> input_tokens;\n\n    //! False until flow_control::stop() is called.\n    std::atomic<bool> end_of_input;\n\n    d1::wait_context wait_ctx;\n};\n\n//! This structure is used to store task information in an input buffer\nstruct task_info {\n    void* my_object = nullptr;\n    //! Invalid unless a task went through an ordered stage.\n    Token my_token = 0;\n    //! False until my_token is set.\n    bool my_token_ready  = false;\n    //! True if my_object is valid.\n    bool is_valid = false;\n    //! Set to initial state (no object, no token)\n    void reset() {\n        my_object = nullptr;\n        my_token = 0;\n        my_token_ready = false;\n        is_valid = false;\n    }\n};\n\n//! A buffer of input items for a filter.\n/** Each item is a task_info, inserted into a position in the buffer corresponding to a Token. */\nclass input_buffer {\n    friend class base_filter;\n    friend class stage_task;\n    friend class pipeline;\n    friend void set_end_of_input(d1::base_filter& bf);\n\n    using size_type = Token;\n\n    //! Array of deferred tasks that cannot yet start executing.\n    task_info* array;\n\n    //! Size of array\n    /** Always 0 or a power of 2 */\n    size_type array_size;\n\n    //! Lowest token that can start executing.\n    /** All prior Token have already been seen. */\n    Token low_token;\n\n    //! Serializes updates.\n    spin_mutex array_mutex;\n\n    //! Resize \"array\".\n    /** Caller is responsible to acquiring a lock on \"array_mutex\". */\n    void grow( size_type minimum_size );\n\n    //! Initial size for \"array\"\n    /** Must be a power of 2 */\n    static const size_type initial_buffer_size = 4;\n\n    //! Used for out of order buffer, and for assigning my_token if is_ordered and my_token not already assigned\n    Token high_token;\n\n    //! True for ordered filter, false otherwise.\n    const bool is_ordered;\n\n    //! for parallel filters that accepts nullptrs, thread-local flag for reaching end_of_input\n    using end_of_input_tls_t = basic_tls<input_buffer*>;\n    end_of_input_tls_t end_of_input_tls;\n    bool end_of_input_tls_allocated; // no way to test pthread creation of TLS\n\npublic:\n    input_buffer(const input_buffer&) = delete;\n    input_buffer& operator=(const input_buffer&) = delete;\n\n    //! Construct empty buffer.\n    input_buffer( bool ordered) :\n            array(nullptr),\n            array_size(0),\n            low_token(0),\n            high_token(0),\n            is_ordered(ordered),\n            end_of_input_tls(),\n            end_of_input_tls_allocated(false) {\n        grow(initial_buffer_size);\n        __TBB_ASSERT( array, nullptr );\n    }\n\n    //! Destroy the buffer.\n    ~input_buffer() {\n        __TBB_ASSERT( array, nullptr );\n        cache_aligned_allocator<task_info>().deallocate(array,array_size);\n        poison_pointer( array );\n        if( end_of_input_tls_allocated ) {\n            destroy_my_tls();\n        }\n    }\n\n    //! Define order when the first filter is serial_in_order.\n    Token get_ordered_token(){\n        return high_token++;\n    }\n\n    //! Put a token into the buffer.\n    /** If task information was placed into buffer, returns true;\n        otherwise returns false, informing the caller to create and spawn a task.\n    */\n    bool try_put_token( task_info& info ) {\n        info.is_valid = true;\n        spin_mutex::scoped_lock lock( array_mutex );\n        Token token;\n        if( is_ordered ) {\n            if( !info.my_token_ready ) {\n                info.my_token = high_token++;\n                info.my_token_ready = true;\n            }\n            token = info.my_token;\n        } else\n            token = high_token++;\n        __TBB_ASSERT( (long)(token-low_token)>=0, nullptr );\n        if( token!=low_token ) {\n            // Trying to put token that is beyond low_token.\n            // Need to wait until low_token catches up before dispatching.\n            if( token-low_token>=array_size )\n                grow( token-low_token+1 );\n            ITT_NOTIFY( sync_releasing, this );\n            array[token&(array_size-1)] = info;\n            return true;\n        }\n        return false;\n    }\n\n    //! Note that processing of a token is finished.\n    /** Fires up processing of the next token, if processing was deferred. */\n    // Uses template to avoid explicit dependency on stage_task.\n    template<typename StageTask>\n    void try_to_spawn_task_for_next_token(StageTask& spawner, d1::execution_data& ed) {\n        task_info wakee;\n        {\n            spin_mutex::scoped_lock lock( array_mutex );\n            // Wake the next task\n            task_info& item = array[++low_token & (array_size-1)];\n            ITT_NOTIFY( sync_acquired, this );\n            wakee = item;\n            item.is_valid = false;\n        }\n        if( wakee.is_valid )\n            spawner.spawn_stage_task(wakee, ed);\n    }\n\n    // end_of_input signal for parallel_pipeline, parallel input filters with 0 tokens allowed.\n    void create_my_tls() {\n        int status = end_of_input_tls.create();\n        if(status)\n            handle_perror(status, \"TLS not allocated for filter\");\n        end_of_input_tls_allocated = true;\n    }\n    void destroy_my_tls() {\n        int status = end_of_input_tls.destroy();\n        if(status)\n            handle_perror(status, \"Failed to destroy filter TLS\");\n    }\n    bool my_tls_end_of_input() {\n        return end_of_input_tls.get() != nullptr;\n    }\n    void set_my_tls_end_of_input() {\n        end_of_input_tls.set(this);\n    }\n};\n\nvoid input_buffer::grow( size_type minimum_size ) {\n    size_type old_size = array_size;\n    size_type new_size = old_size ? 2*old_size : initial_buffer_size;\n    while( new_size<minimum_size )\n        new_size*=2;\n    task_info* new_array = cache_aligned_allocator<task_info>().allocate(new_size);\n    task_info* old_array = array;\n    for( size_type i=0; i<new_size; ++i )\n        new_array[i].is_valid = false;\n    Token t=low_token;\n    for( size_type i=0; i<old_size; ++i, ++t )\n        new_array[t&(new_size-1)] = old_array[t&(old_size-1)];\n    array = new_array;\n    array_size = new_size;\n    if( old_array )\n        cache_aligned_allocator<task_info>().deallocate(old_array,old_size);\n}\n\nclass stage_task : public d1::task, public task_info {\nprivate:\n    friend class pipeline;\n    pipeline& my_pipeline;\n    d1::base_filter* my_filter;\n    d1::small_object_allocator m_allocator;\n    //! True if this task has not yet read the input.\n    bool my_at_start;\n\n    //! True if this can be executed again.\n    bool execute_filter(d1::execution_data& ed);\n\n    //! Spawn task if token is available.\n    void try_spawn_stage_task(d1::execution_data& ed) {\n        ITT_NOTIFY( sync_releasing, &my_pipeline.input_tokens );\n        if( (my_pipeline.input_tokens.fetch_sub(1, std::memory_order_release)) > 1 ) {\n            d1::small_object_allocator alloc{};\n            r1::spawn( *alloc.new_object<stage_task>(ed, my_pipeline, alloc ), my_pipeline.my_context );\n        }\n    }\n\npublic:\n\n    //! Construct stage_task for first stage in a pipeline.\n    /** Such a stage has not read any input yet. */\n    stage_task(pipeline& pipeline, d1::small_object_allocator& alloc ) :\n        my_pipeline(pipeline),\n        my_filter(pipeline.first_filter),\n        m_allocator(alloc),\n        my_at_start(true)\n    {\n        task_info::reset();\n        my_pipeline.wait_ctx.reserve();\n    }\n    //! Construct stage_task for a subsequent stage in a pipeline.\n    stage_task(pipeline& pipeline, d1::base_filter* filter, const task_info& info, d1::small_object_allocator& alloc) :\n        task_info(info),\n        my_pipeline(pipeline),\n        my_filter(filter),\n        m_allocator(alloc),\n        my_at_start(false)\n    {\n        my_pipeline.wait_ctx.reserve();\n    }\n    //! Roughly equivalent to the constructor of input stage task\n    void reset() {\n        task_info::reset();\n        my_filter = my_pipeline.first_filter;\n        my_at_start = true;\n    }\n    void finalize(d1::execution_data& ed) {\n        m_allocator.delete_object(this, ed);\n    }\n    //! The virtual task execution method\n    task* execute(d1::execution_data& ed) override {\n        if(!execute_filter(ed)) {\n            finalize(ed);\n            return nullptr;\n        }\n        return this;\n    }\n    task* cancel(d1::execution_data& ed) override {\n        finalize(ed);\n        return nullptr;\n    }\n\n    ~stage_task() override {\n        if ( my_filter && my_object ) {\n            my_filter->finalize(my_object);\n            my_object = nullptr;\n        }\n        my_pipeline.wait_ctx.release();\n    }\n    //! Creates and spawns stage_task from task_info\n    void spawn_stage_task(const task_info& info, d1::execution_data& ed) {\n        d1::small_object_allocator alloc{};\n        stage_task* clone = alloc.new_object<stage_task>(ed, my_pipeline, my_filter, info, alloc);\n        r1::spawn(*clone, my_pipeline.my_context);\n    }\n};\n\nbool stage_task::execute_filter(d1::execution_data& ed) {\n    __TBB_ASSERT( !my_at_start || !my_object, \"invalid state of task\" );\n    if( my_at_start ) {\n        if( my_filter->is_serial() ) {\n            my_object = (*my_filter)(my_object);\n            if( my_object || ( my_filter->object_may_be_null() && !my_pipeline.end_of_input.load(std::memory_order_relaxed)) ) {\n                if( my_filter->is_ordered() ) {\n                    my_token = my_filter->my_input_buffer->get_ordered_token();\n                    my_token_ready = true;\n                }\n                if( !my_filter->next_filter_in_pipeline ) { // we're only filter in pipeline\n                    reset();\n                    return true;\n                } else {\n                    try_spawn_stage_task(ed);\n                }\n            } else {\n                my_pipeline.end_of_input.store(true, std::memory_order_relaxed);\n                return false;\n            }\n        } else /*not is_serial*/ {\n            if ( my_pipeline.end_of_input.load(std::memory_order_relaxed) ) {\n                return false;\n            }\n\n            try_spawn_stage_task(ed);\n\n            my_object = (*my_filter)(my_object);\n            if( !my_object && (!my_filter->object_may_be_null() || my_filter->my_input_buffer->my_tls_end_of_input()) ){\n                my_pipeline.end_of_input.store(true, std::memory_order_relaxed);\n                return false;\n            }\n        }\n        my_at_start = false;\n    } else {\n        my_object = (*my_filter)(my_object);\n        if( my_filter->is_serial() )\n            my_filter->my_input_buffer->try_to_spawn_task_for_next_token(*this, ed);\n    }\n    my_filter = my_filter->next_filter_in_pipeline;\n    if( my_filter ) {\n        // There is another filter to execute.\n        if( my_filter->is_serial() ) {\n            // The next filter must execute tokens when they are available (in order for serial_in_order)\n            if( my_filter->my_input_buffer->try_put_token(*this) ){\n                my_filter = nullptr; // To prevent deleting my_object twice if exception occurs\n                return false;\n            }\n        }\n    } else {\n        // Reached end of the pipe.\n        std::size_t ntokens_avail = my_pipeline.input_tokens.fetch_add(1, std::memory_order_acquire);\n\n        if( ntokens_avail>0  // Only recycle if there is one available token\n                || my_pipeline.end_of_input.load(std::memory_order_relaxed) ) {\n            return false; // No need to recycle for new input\n        }\n        ITT_NOTIFY( sync_acquired, &my_pipeline.input_tokens );\n        // Recycle as an input stage task.\n        reset();\n    }\n    return true;\n}\n\npipeline::~pipeline() {\n    while( first_filter ) {\n        d1::base_filter* f = first_filter;\n        if( input_buffer* b = f->my_input_buffer ) {\n            b->~input_buffer();\n            deallocate_memory(b);\n        }\n        first_filter = f->next_filter_in_pipeline;\n        f->~base_filter();\n        deallocate_memory(f);\n    }\n}\n\nvoid pipeline::add_filter( d1::base_filter& new_fitler ) {\n    __TBB_ASSERT( new_fitler.next_filter_in_pipeline==d1::base_filter::not_in_pipeline(), \"filter already part of pipeline?\" );\n    new_fitler.my_pipeline = this;\n    if ( first_filter == nullptr )\n        first_filter = &new_fitler;\n    else\n        last_filter->next_filter_in_pipeline = &new_fitler;\n    new_fitler.next_filter_in_pipeline = nullptr;\n    last_filter = &new_fitler;\n    if( new_fitler.is_serial() ) {\n        new_fitler.my_input_buffer = new (allocate_memory(sizeof(input_buffer))) input_buffer( new_fitler.is_ordered() );\n    } else {\n        if( first_filter == &new_fitler && new_fitler.object_may_be_null() ) {\n            //TODO: buffer only needed to hold TLS; could improve\n            new_fitler.my_input_buffer = new (allocate_memory(sizeof(input_buffer))) input_buffer( /*is_ordered*/false );\n            new_fitler.my_input_buffer->create_my_tls();\n        }\n    }\n}\n\nvoid __TBB_EXPORTED_FUNC parallel_pipeline(d1::task_group_context& cxt, std::size_t max_token, const d1::filter_node& fn) {\n    pipeline pipe(cxt, max_token);\n\n    pipe.fill_pipeline(fn);\n\n    d1::small_object_allocator alloc{};\n    stage_task& st = *alloc.new_object<stage_task>(pipe, alloc);\n\n    // Start execution of tasks\n    r1::execute_and_wait(st, cxt, pipe.wait_ctx, cxt);\n}\n\nvoid __TBB_EXPORTED_FUNC set_end_of_input(d1::base_filter& bf) {\n    __TBB_ASSERT(bf.my_input_buffer, nullptr);\n    __TBB_ASSERT(bf.object_may_be_null(), nullptr);\n    if(bf.is_serial() ) {\n        bf.my_pipeline->end_of_input.store(true, std::memory_order_relaxed);\n    } else {\n        __TBB_ASSERT(bf.my_input_buffer->end_of_input_tls_allocated, nullptr);\n        bf.my_input_buffer->set_my_tls_end_of_input();\n    }\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/permit_manager.h",
    "content": "/*\n    Copyright (c) 2022-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_permit_manager_H\n#define _TBB_permit_manager_H\n\n#include \"oneapi/tbb/info.h\"\n#include \"oneapi/tbb/detail/_utils.h\"\n#include \"thread_request_serializer.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nclass arena;\nclass pm_client;\n\nclass permit_manager : no_copy {\npublic:\n    virtual ~permit_manager() {}\n    virtual pm_client* create_client(arena& a) = 0;\n    virtual void register_client(pm_client* client, d1::constraints& constraints) = 0;\n    virtual void unregister_and_destroy_client(pm_client& c) = 0;\n\n    virtual void set_active_num_workers(int soft_limit) = 0;\n    virtual void adjust_demand(pm_client&, int mandatory_delta, int workers_delta) = 0;\n\n    void set_thread_request_observer(thread_request_observer& tr_observer) {\n        __TBB_ASSERT(!my_thread_request_observer, \"set_thread_request_observer was called already?\");\n        my_thread_request_observer = &tr_observer;\n    }\nprotected:\n    void notify_thread_request(int delta) {\n        __TBB_ASSERT(my_thread_request_observer, \"set_thread_request_observer was not called?\");\n        if (delta) {\n            my_thread_request_observer->update(delta);\n        }\n    }\nprivate:\n    thread_request_observer* my_thread_request_observer{nullptr};\n};\n\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif // _TBB_permit_manager_H\n"
  },
  {
    "path": "third-party/tbb/src/tbb/pm_client.h",
    "content": "/*\n    Copyright (c) 2022-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_pm_client_H\n#define _TBB_pm_client_H\n\n#include \"arena.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nclass pm_client {\npublic:\n    pm_client(arena& a) : my_arena(a) {}\n    virtual ~pm_client() {}\n\n    unsigned priority_level() {\n        return my_arena.priority_level();\n    }\n\n    void set_top_priority(bool b) {\n        my_arena.set_top_priority(b);\n    }\n\n    int min_workers() const {\n        return my_min_workers;\n    }\n\n    int max_workers() const {\n        return my_max_workers;\n    }\n\n    int update_request(int mandatory_delta, int workers_delta) {\n        auto min_max_workers = my_arena.update_request(mandatory_delta, workers_delta);\n        int delta = min_max_workers.second - my_max_workers;\n        set_workers(min_max_workers.first, min_max_workers.second);\n        return delta;\n    }\n\n    virtual void register_thread() = 0;\n\n    virtual void unregister_thread() = 0;\n\n\nprotected:\n    void set_workers(int mn_w, int mx_w) {\n        __TBB_ASSERT(mn_w >= 0, nullptr);\n        __TBB_ASSERT(mx_w >= 0, nullptr);\n        my_min_workers = mn_w;\n        my_max_workers = mx_w;\n    }\n\n    arena& my_arena;\n    int my_min_workers{0};\n    int my_max_workers{0};\n};\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif // _TBB_pm_client_H\n"
  },
  {
    "path": "third-party/tbb/src/tbb/private_server.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/cache_aligned_allocator.h\"\n#include \"oneapi/tbb/mutex.h\"\n\n#include \"rml_tbb.h\"\n#include \"rml_thread_monitor.h\"\n\n#include \"scheduler_common.h\"\n#include \"governor.h\"\n#include \"misc.h\"\n\n#include <atomic>\n\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\nnamespace rml {\n\nusing rml::internal::thread_monitor;\ntypedef thread_monitor::handle_type thread_handle;\n\nclass private_server;\n\nclass private_worker: no_copy {\nprivate:\n    //! State in finite-state machine that controls the worker.\n    /** State diagram:\n        init --> starting --> normal\n          |         |           |\n          |         V           |\n          \\------> quit <------/\n      */\n    enum state_t {\n        //! *this is initialized\n        st_init,\n        //! *this has associated thread that is starting up.\n        st_starting,\n        //! Associated thread is doing normal life sequence.\n        st_normal,\n        //! Associated thread has ended normal life sequence and promises to never touch *this again.\n        st_quit\n    };\n    std::atomic<state_t> my_state;\n\n    //! Associated server\n    private_server& my_server;\n\n    //! Associated client\n    tbb_client& my_client;\n\n    //! index used for avoiding the 64K aliasing problem\n    const std::size_t my_index;\n\n    //! Monitor for sleeping when there is no work to do.\n    /** The invariant that holds for sleeping workers is:\n        \"my_slack<=0 && my_state==st_normal && I am on server's list of asleep threads\" */\n    thread_monitor my_thread_monitor;\n\n    //! Handle of the OS thread associated with this worker\n    thread_handle my_handle;\n\n    //! Link for list of workers that are sleeping or have no associated thread.\n    private_worker* my_next;\n\n    friend class private_server;\n\n    //! Actions executed by the associated thread\n    void run() noexcept;\n\n    //! Wake up associated thread (or launch a thread if there is none)\n    void wake_or_launch();\n\n    //! Called by a thread (usually not the associated thread) to commence termination.\n    void start_shutdown();\n\n    static __RML_DECL_THREAD_ROUTINE thread_routine( void* arg );\n\n    static void release_handle(thread_handle my_handle, bool join);\n\nprotected:\n    private_worker( private_server& server, tbb_client& client, const std::size_t i ) :\n        my_state(st_init), my_server(server), my_client(client), my_index(i),\n        my_handle(), my_next()\n    {}\n};\n\nstatic const std::size_t cache_line_size = tbb::detail::max_nfs_size;\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    // Suppress overzealous compiler warnings about uninstantiable class\n    #pragma warning(push)\n    #pragma warning(disable:4510 4610)\n#endif\nclass padded_private_worker: public private_worker {\n    char pad[cache_line_size - sizeof(private_worker)%cache_line_size];\npublic:\n    padded_private_worker( private_server& server, tbb_client& client, const std::size_t i )\n    : private_worker(server,client,i) { suppress_unused_warning(pad); }\n};\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    #pragma warning(pop)\n#endif\n\nclass private_server: public tbb_server, no_copy {\nprivate:\n    tbb_client& my_client;\n    //! Maximum number of threads to be created.\n    /** Threads are created lazily, so maximum might not actually be reached. */\n    const tbb_client::size_type my_n_thread;\n\n    //! Stack size for each thread. */\n    const std::size_t my_stack_size;\n\n    //! Number of jobs that could use their associated thread minus number of active threads.\n    /** If negative, indicates oversubscription.\n        If positive, indicates that more threads should run.\n        Can be lowered asynchronously, but must be raised only while holding my_asleep_list_mutex,\n        because raising it impacts the invariant for sleeping threads. */\n    std::atomic<int> my_slack;\n\n    //! Counter used to determine when to delete this.\n    std::atomic<int> my_ref_count;\n\n    padded_private_worker* my_thread_array;\n\n    //! List of workers that are asleep or committed to sleeping until notified by another thread.\n    std::atomic<private_worker*> my_asleep_list_root;\n\n    //! Protects my_asleep_list_root\n    typedef mutex asleep_list_mutex_type;\n    asleep_list_mutex_type my_asleep_list_mutex;\n\n#if TBB_USE_ASSERT\n    std::atomic<int> my_net_slack_requests;\n#endif /* TBB_USE_ASSERT */\n\n    //! Wake up to two sleeping workers, if there are any sleeping.\n    /** The call is used to propagate a chain reaction where each thread wakes up two threads,\n        which in turn each wake up two threads, etc. */\n    void propagate_chain_reaction() {\n        // First test of a double-check idiom.  Second test is inside wake_some(0).\n        if( my_asleep_list_root.load(std::memory_order_relaxed) )\n            wake_some(0);\n    }\n\n    //! Try to add t to list of sleeping workers\n    bool try_insert_in_asleep_list( private_worker& t );\n\n    //! Equivalent of adding additional_slack to my_slack and waking up to 2 threads if my_slack permits.\n    void wake_some( int additional_slack );\n\n    ~private_server() override;\n\n    void remove_server_ref() {\n        if( --my_ref_count==0 ) {\n            my_client.acknowledge_close_connection();\n            this->~private_server();\n            tbb::cache_aligned_allocator<private_server>().deallocate( this, 1 );\n        }\n    }\n\n    friend class private_worker;\npublic:\n    private_server( tbb_client& client );\n\n    version_type version() const override {\n        return 0;\n    }\n\n    void request_close_connection( bool /*exiting*/ ) override {\n        for( std::size_t i=0; i<my_n_thread; ++i )\n            my_thread_array[i].start_shutdown();\n        remove_server_ref();\n    }\n\n    void yield() override { d0::yield(); }\n\n    void independent_thread_number_changed( int ) override {__TBB_ASSERT(false, nullptr);}\n\n    unsigned default_concurrency() const override { return governor::default_num_threads() - 1; }\n\n    void adjust_job_count_estimate( int delta ) override;\n\n#if _WIN32 || _WIN64\n    void register_external_thread ( ::rml::server::execution_resource_t& ) override {}\n    void unregister_external_thread ( ::rml::server::execution_resource_t ) override {}\n#endif /* _WIN32||_WIN64 */\n};\n\n//------------------------------------------------------------------------\n// Methods of private_worker\n//------------------------------------------------------------------------\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    // Suppress overzealous compiler warnings about an initialized variable 'sink_for_alloca' not referenced\n    #pragma warning(push)\n    #pragma warning(disable:4189)\n#endif\n#if __MINGW32__ && __GNUC__==4 &&__GNUC_MINOR__>=2 && !__MINGW64__\n// ensure that stack is properly aligned for TBB threads\n__attribute__((force_align_arg_pointer))\n#endif\n__RML_DECL_THREAD_ROUTINE private_worker::thread_routine( void* arg ) {\n    private_worker* self = static_cast<private_worker*>(arg);\n    AVOID_64K_ALIASING( self->my_index );\n    self->run();\n    // return 0 instead of nullptr due to the difference in the type __RML_DECL_THREAD_ROUTINE on various OSs\n    return 0;\n}\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    #pragma warning(pop)\n#endif\n\nvoid private_worker::release_handle(thread_handle handle, bool join) {\n    if (join)\n        thread_monitor::join(handle);\n    else\n        thread_monitor::detach_thread(handle);\n}\n\nvoid private_worker::start_shutdown() {\n    __TBB_ASSERT(my_state.load(std::memory_order_relaxed) != st_quit, \"The quit state is expected to be set only once\");\n\n    // `acq` to acquire my_handle\n    // `rel` to release market state\n    state_t prev_state = my_state.exchange(st_quit, std::memory_order_acq_rel);\n\n    if (prev_state == st_init) {\n        // Perform action that otherwise would be performed by associated thread when it quits.\n        my_server.remove_server_ref();\n    } else {\n        __TBB_ASSERT(prev_state == st_normal || prev_state == st_starting, nullptr);\n        // May have invalidated invariant for sleeping, so wake up the thread.\n        // Note that the notify() here occurs without maintaining invariants for my_slack.\n        // It does not matter, because my_state==st_quit overrides checking of my_slack.\n        my_thread_monitor.notify();\n        // Do not need release handle in st_init state,\n        // because in this case the thread wasn't started yet.\n        // For st_starting release is done at launch site.\n        if (prev_state == st_normal)\n            release_handle(my_handle, governor::does_client_join_workers(my_client));\n    }\n}\n\nvoid private_worker::run() noexcept {\n    my_server.propagate_chain_reaction();\n\n    // Transiting to st_normal here would require setting my_handle,\n    // which would create race with the launching thread and\n    // complications in handle management on Windows.\n\n    ::rml::job& j = *my_client.create_one_job();\n    // memory_order_seq_cst to be strictly ordered after thread_monitor::wait on the next iteration\n    while( my_state.load(std::memory_order_seq_cst)!=st_quit ) {\n        if( my_server.my_slack.load(std::memory_order_acquire)>=0 ) {\n            my_client.process(j);\n        } else if( my_server.try_insert_in_asleep_list(*this) ) {\n            my_thread_monitor.wait();\n            __TBB_ASSERT(my_state.load(std::memory_order_relaxed) == st_quit || !my_next, \"Thread monitor missed a spurious wakeup?\" );\n            my_server.propagate_chain_reaction();\n        }\n    }\n    my_client.cleanup(j);\n\n    ++my_server.my_slack;\n    my_server.remove_server_ref();\n}\n\ninline void private_worker::wake_or_launch() {\n    state_t state = my_state.load(std::memory_order_relaxed);\n\n    switch (state) {\n    case st_starting:\n        __TBB_fallthrough;\n    case st_normal:\n        __TBB_ASSERT(!my_next, \"Should not wake a thread while it's still in asleep list\");\n        my_thread_monitor.notify();\n        break;\n    case st_init:\n        if (my_state.compare_exchange_strong(state, st_starting)) {\n            // after this point, remove_server_ref() must be done by created thread\n#if __TBB_USE_WINAPI\n            // Win thread_monitor::launch is designed on the assumption that the workers thread id go from 1 to Hard limit set by TBB market::global_market\n            const std::size_t worker_idx = my_server.my_n_thread - this->my_index; \n            my_handle = thread_monitor::launch(thread_routine, this, my_server.my_stack_size, &worker_idx);\n#elif __TBB_USE_POSIX\n            {\n                affinity_helper fpa;\n                fpa.protect_affinity_mask( /*restore_process_mask=*/true);\n                my_handle = thread_monitor::launch(thread_routine, this, my_server.my_stack_size);\n                // Implicit destruction of fpa resets original affinity mask.\n            }\n#endif /* __TBB_USE_POSIX */\n            state = st_starting;\n            if (!my_state.compare_exchange_strong(state, st_normal)) {\n                // Do shutdown during startup. my_handle can't be released\n                // by start_shutdown, because my_handle value might be not set yet\n                // at time of transition from st_starting to st_quit.\n                __TBB_ASSERT(state == st_quit, nullptr);\n                release_handle(my_handle, governor::does_client_join_workers(my_client));\n            }\n        }\n        break;\n    default:\n        __TBB_ASSERT(state == st_quit, nullptr);\n    }\n}\n\n//------------------------------------------------------------------------\n// Methods of private_server\n//------------------------------------------------------------------------\nprivate_server::private_server( tbb_client& client ) :\n    my_client(client),\n    my_n_thread(client.max_job_count()),\n    my_stack_size(client.min_stack_size()),\n    my_slack(0),\n    my_ref_count(my_n_thread+1),\n    my_thread_array(nullptr),\n    my_asleep_list_root(nullptr)\n#if TBB_USE_ASSERT\n    , my_net_slack_requests(0)\n#endif /* TBB_USE_ASSERT */\n{\n    my_thread_array = tbb::cache_aligned_allocator<padded_private_worker>().allocate( my_n_thread );\n    for( std::size_t i=0; i<my_n_thread; ++i ) {\n        private_worker* t = new( &my_thread_array[i] ) padded_private_worker( *this, client, i );\n        t->my_next = my_asleep_list_root.load(std::memory_order_relaxed);\n        my_asleep_list_root.store(t, std::memory_order_relaxed);\n    }\n}\n\nprivate_server::~private_server() {\n    __TBB_ASSERT( my_net_slack_requests==0, nullptr);\n    for( std::size_t i=my_n_thread; i--; )\n        my_thread_array[i].~padded_private_worker();\n    tbb::cache_aligned_allocator<padded_private_worker>().deallocate( my_thread_array, my_n_thread );\n    tbb::detail::poison_pointer( my_thread_array );\n}\n\ninline bool private_server::try_insert_in_asleep_list( private_worker& t ) {\n    asleep_list_mutex_type::scoped_lock lock;\n    if( !lock.try_acquire(my_asleep_list_mutex) )\n        return false;\n    // Contribute to slack under lock so that if another takes that unit of slack,\n    // it sees us sleeping on the list and wakes us up.\n    auto expected = my_slack.load(std::memory_order_relaxed);\n    while (expected < 0) {\n        if (my_slack.compare_exchange_strong(expected, expected + 1)) {\n            t.my_next = my_asleep_list_root.load(std::memory_order_relaxed);\n            my_asleep_list_root.store(&t, std::memory_order_relaxed);\n            return true;\n        }\n    }\n\n    return false;\n}\n\nvoid private_server::wake_some( int additional_slack ) {\n    __TBB_ASSERT( additional_slack>=0, nullptr );\n    private_worker* wakee[2];\n    private_worker**w = wakee;\n\n    if (additional_slack) {\n        // Contribute our unused slack to my_slack.\n        my_slack += additional_slack;\n    }\n\n    int allotted_slack = 0;\n    while (allotted_slack < 2) {\n        // Chain reaction; Try to claim unit of slack\n        int old = my_slack.load(std::memory_order_relaxed);\n        do {\n            if (old <= 0) goto done;\n        } while (!my_slack.compare_exchange_strong(old, old - 1));\n        ++allotted_slack;\n    }\ndone:\n\n    if (allotted_slack) {\n        asleep_list_mutex_type::scoped_lock lock(my_asleep_list_mutex);\n        auto root = my_asleep_list_root.load(std::memory_order_relaxed);\n        while( root && w<wakee+2 && allotted_slack) {\n            --allotted_slack;\n            // Pop sleeping worker to combine with claimed unit of slack\n            *w++ = root;\n            root = root->my_next;\n        }\n        my_asleep_list_root.store(root, std::memory_order_relaxed);\n        if(allotted_slack) {\n            // Contribute our unused slack to my_slack.\n            my_slack += allotted_slack;\n        }\n    }\n    while( w>wakee ) {\n        private_worker* ww = *--w;\n        ww->my_next = nullptr;\n        ww->wake_or_launch();\n    }\n}\n\nvoid private_server::adjust_job_count_estimate( int delta ) {\n#if TBB_USE_ASSERT\n    my_net_slack_requests+=delta;\n#endif /* TBB_USE_ASSERT */\n    if( delta<0 ) {\n        my_slack+=delta;\n    } else if( delta>0 ) {\n        wake_some( delta );\n    }\n}\n\n//! Factory method called from task.cpp to create a private_server.\ntbb_server* make_private_server( tbb_client& client ) {\n    return new( tbb::cache_aligned_allocator<private_server>().allocate(1) ) private_server(client);\n}\n\n} // namespace rml\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n"
  },
  {
    "path": "third-party/tbb/src/tbb/profiling.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/detail/_config.h\"\n#include \"oneapi/tbb/detail/_template_helpers.h\"\n\n#include \"main.h\"\n#include \"itt_notify.h\"\n\n#include \"oneapi/tbb/profiling.h\"\n\n#include <string.h>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n#if __TBB_USE_ITT_NOTIFY\nbool ITT_Present;\nstatic std::atomic<bool> ITT_InitializationDone;\n\nstatic __itt_domain *tbb_domains[d1::ITT_NUM_DOMAINS] = {};\n\nstruct resource_string {\n    const char *str;\n    __itt_string_handle *itt_str_handle;\n};\n\n//\n// populate resource strings\n//\n#define TBB_STRING_RESOURCE( index_name, str ) { str, nullptr },\nstatic resource_string strings_for_itt[] = {\n    #include \"oneapi/tbb/detail/_string_resource.h\"\n    { \"num_resource_strings\", nullptr }\n};\n#undef TBB_STRING_RESOURCE\n\nstatic __itt_string_handle* ITT_get_string_handle(std::uintptr_t idx) {\n    __TBB_ASSERT(idx < NUM_STRINGS, \"string handle out of valid range\");\n    return idx < NUM_STRINGS ? strings_for_itt[idx].itt_str_handle : nullptr;\n}\n\nstatic void ITT_init_domains() {\n    tbb_domains[d1::ITT_DOMAIN_MAIN] = __itt_domain_create( _T(\"tbb\") );\n    tbb_domains[d1::ITT_DOMAIN_MAIN]->flags = 1;\n    tbb_domains[d1::ITT_DOMAIN_FLOW] = __itt_domain_create( _T(\"tbb.flow\") );\n    tbb_domains[d1::ITT_DOMAIN_FLOW]->flags = 1;\n    tbb_domains[d1::ITT_DOMAIN_ALGO] = __itt_domain_create( _T(\"tbb.algorithm\") );\n    tbb_domains[d1::ITT_DOMAIN_ALGO]->flags = 1;\n}\n\nstatic void ITT_init_strings() {\n    for ( std::uintptr_t i = 0; i < NUM_STRINGS; ++i ) {\n#if _WIN32||_WIN64\n        strings_for_itt[i].itt_str_handle = __itt_string_handle_createA( strings_for_itt[i].str );\n#else\n        strings_for_itt[i].itt_str_handle = __itt_string_handle_create( strings_for_itt[i].str );\n#endif\n    }\n}\n\nstatic void ITT_init() {\n    ITT_init_domains();\n    ITT_init_strings();\n}\n\n/** Thread-unsafe lazy one-time initialization of tools interop.\n    Used by both dummy handlers and general TBB one-time initialization routine. **/\nvoid ITT_DoUnsafeOneTimeInitialization () {\n    // Double check ITT_InitializationDone is necessary because the first check\n    // in ITT_DoOneTimeInitialization is not guarded with the __TBB_InitOnce lock.\n    if ( !ITT_InitializationDone ) {\n        ITT_Present = (__TBB_load_ittnotify()!=0);\n        if (ITT_Present) ITT_init();\n        ITT_InitializationDone = true;\n    }\n}\n\n/** Thread-safe lazy one-time initialization of tools interop.\n    Used by dummy handlers only. **/\nextern \"C\"\nvoid ITT_DoOneTimeInitialization() {\n    if ( !ITT_InitializationDone ) {\n        __TBB_InitOnce::lock();\n        ITT_DoUnsafeOneTimeInitialization();\n        __TBB_InitOnce::unlock();\n    }\n}\n\nvoid create_itt_sync(void* ptr, const tchar* objtype, const tchar* objname) {\n        ITT_SYNC_CREATE(ptr, objtype, objname);\n}\n\nvoid call_itt_notify(int t, void *ptr) {\n    switch (t) {\n    case 0: ITT_NOTIFY(sync_prepare, ptr); break;\n    case 1: ITT_NOTIFY(sync_cancel, ptr); break;\n    case 2: ITT_NOTIFY(sync_acquired, ptr); break;\n    case 3: ITT_NOTIFY(sync_releasing, ptr); break;\n    case 4: ITT_NOTIFY(sync_destroy, ptr); break;\n    }\n}\n\nvoid itt_set_sync_name(void* obj, const tchar* name) {\n    __itt_sync_rename(obj, name);\n}\n\nconst __itt_id itt_null_id = { 0, 0, 0 };\n\nstatic inline __itt_domain* get_itt_domain(d1::itt_domain_enum idx) {\n    if (tbb_domains[idx] == nullptr) {\n        ITT_DoOneTimeInitialization();\n    }\n    return tbb_domains[idx];\n}\n\nstatic inline void itt_id_make(__itt_id* id, void* addr, unsigned long long extra) {\n    *id = __itt_id_make(addr, extra);\n}\n\nstatic inline void itt_id_create(const __itt_domain* domain, __itt_id id) {\n    __itt_id_create(domain, id);\n}\n\nvoid itt_make_task_group(d1::itt_domain_enum domain, void* group, unsigned long long group_extra,\n                         void* parent, unsigned long long parent_extra, string_resource_index name_index) {\n    if (__itt_domain* d = get_itt_domain(domain)) {\n        __itt_id group_id = itt_null_id;\n        __itt_id parent_id = itt_null_id;\n        itt_id_make(&group_id, group, group_extra);\n        itt_id_create(d, group_id);\n        if (parent) {\n            itt_id_make(&parent_id, parent, parent_extra);\n        }\n        __itt_string_handle* n = ITT_get_string_handle(name_index);\n        __itt_task_group(d, group_id, parent_id, n);\n    }\n}\n\nvoid __TBB_EXPORTED_FUNC itt_metadata_str_add(d1::itt_domain_enum domain, void *addr, unsigned long long addr_extra,\n                                              string_resource_index key, const char *value ) {\n    if ( __itt_domain *d = get_itt_domain( domain ) ) {\n        __itt_id id = itt_null_id;\n        itt_id_make( &id, addr, addr_extra );\n        __itt_string_handle *k = ITT_get_string_handle(key);\n        size_t value_length = strlen( value );\n#if _WIN32||_WIN64\n        __itt_metadata_str_addA(d, id, k, value, value_length);\n#else\n        __itt_metadata_str_add(d, id, k, value, value_length);\n#endif\n    }\n}\n\nvoid __TBB_EXPORTED_FUNC itt_metadata_ptr_add(d1::itt_domain_enum domain, void *addr, unsigned long long addr_extra,\n                                              string_resource_index key, void *value ) {\n    if ( __itt_domain *d = get_itt_domain( domain ) ) {\n        __itt_id id = itt_null_id;\n        itt_id_make( &id, addr, addr_extra );\n        __itt_string_handle *k = ITT_get_string_handle(key);\n#if __TBB_x86_32\n        __itt_metadata_add(d, id, k, __itt_metadata_u32, 1, value);\n#else\n        __itt_metadata_add(d, id, k, __itt_metadata_u64, 1, value);\n#endif\n    }\n}\n\nvoid __TBB_EXPORTED_FUNC itt_relation_add(d1::itt_domain_enum domain, void *addr0, unsigned long long addr0_extra,\n                                          itt_relation relation, void *addr1, unsigned long long addr1_extra ) {\n    if ( __itt_domain *d = get_itt_domain( domain ) ) {\n        __itt_id id0 = itt_null_id;\n        __itt_id id1 = itt_null_id;\n        itt_id_make( &id0, addr0, addr0_extra );\n        itt_id_make( &id1, addr1, addr1_extra );\n         __itt_relation_add( d, id0, (__itt_relation)relation, id1 );\n    }\n}\n\nvoid __TBB_EXPORTED_FUNC itt_task_begin(d1::itt_domain_enum domain, void* task, unsigned long long task_extra,\n                    void* parent, unsigned long long parent_extra, string_resource_index name_index) {\n    if (__itt_domain* d = get_itt_domain(domain)) {\n        __itt_id task_id = itt_null_id;\n        __itt_id parent_id = itt_null_id;\n        if (task) {\n            itt_id_make(&task_id, task, task_extra);\n        }\n        if (parent) {\n            itt_id_make(&parent_id, parent, parent_extra);\n        }\n        __itt_string_handle* n = ITT_get_string_handle(name_index);\n        __itt_task_begin(d, task_id, parent_id, n);\n    }\n}\n\nvoid __TBB_EXPORTED_FUNC itt_task_end(d1::itt_domain_enum domain) {\n    if (__itt_domain* d = get_itt_domain(domain)) {\n        __itt_task_end(d);\n    }\n}\n\nvoid __TBB_EXPORTED_FUNC itt_region_begin(d1::itt_domain_enum domain, void *region, unsigned long long region_extra,\n                      void *parent, unsigned long long parent_extra, string_resource_index /* name_index */ ) {\n    if ( __itt_domain *d = get_itt_domain( domain ) ) {\n        __itt_id region_id = itt_null_id;\n        __itt_id parent_id = itt_null_id;\n        itt_id_make( &region_id, region, region_extra );\n        if ( parent ) {\n            itt_id_make( &parent_id, parent, parent_extra );\n        }\n         __itt_region_begin( d, region_id, parent_id, nullptr );\n    }\n}\n\nvoid __TBB_EXPORTED_FUNC itt_region_end(d1::itt_domain_enum domain, void *region, unsigned long long region_extra ) {\n    if ( __itt_domain *d = get_itt_domain( domain ) ) {\n        __itt_id region_id = itt_null_id;\n        itt_id_make( &region_id, region, region_extra );\n         __itt_region_end( d, region_id );\n    }\n}\n\n#else\nvoid create_itt_sync(void* /*ptr*/, const tchar* /*objtype*/, const tchar* /*objname*/) {}\nvoid call_itt_notify(int /*t*/, void* /*ptr*/) {}\nvoid itt_set_sync_name(void* /*obj*/, const tchar* /*name*/) {}\nvoid itt_make_task_group(d1::itt_domain_enum /*domain*/, void* /*group*/, unsigned long long /*group_extra*/,\n                         void* /*parent*/, unsigned long long /*parent_extra*/, string_resource_index /*name_index*/) {}\nvoid itt_metadata_str_add(d1::itt_domain_enum /*domain*/, void* /*addr*/, unsigned long long /*addr_extra*/,\n                          string_resource_index /*key*/, const char* /*value*/ ) { }\nvoid itt_metadata_ptr_add(d1::itt_domain_enum /*domain*/, void * /*addr*/, unsigned long long /*addr_extra*/,\n                          string_resource_index /*key*/, void * /*value*/ ) {}\nvoid itt_relation_add(d1::itt_domain_enum /*domain*/, void* /*addr0*/, unsigned long long /*addr0_extra*/,\n                      itt_relation /*relation*/, void* /*addr1*/, unsigned long long /*addr1_extra*/ ) { }\nvoid itt_task_begin(d1::itt_domain_enum /*domain*/, void* /*task*/, unsigned long long /*task_extra*/,\n                        void* /*parent*/, unsigned long long /*parent_extra*/, string_resource_index /*name_index*/ ) { }\nvoid itt_task_end(d1::itt_domain_enum /*domain*/ ) { }\nvoid itt_region_begin(d1::itt_domain_enum /*domain*/, void* /*region*/, unsigned long long /*region_extra*/,\n                          void* /*parent*/, unsigned long long /*parent_extra*/, string_resource_index /*name_index*/ ) { }\nvoid itt_region_end(d1::itt_domain_enum /*domain*/, void* /*region*/, unsigned long long /*region_extra*/ ) { }\n#endif /* __TBB_USE_ITT_NOTIFY */\n\nconst tchar\n    *SyncType_Scheduler = _T(\"%Constant\")\n    ;\nconst tchar\n    *SyncObj_ContextsList = _T(\"TBB Scheduler\")\n    ;\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/queuing_rw_mutex.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/** Before making any changes in the implementation, please emulate algorithmic changes\n    with SPIN tool using <TBB directory>/tools/spin_models/ReaderWriterMutex.pml.\n    There could be some code looking as \"can be restructured\" but its structure does matter! */\n\n#include \"oneapi/tbb/queuing_rw_mutex.h\"\n#include \"oneapi/tbb/detail/_assert.h\"\n#include \"oneapi/tbb/detail/_utils.h\"\n#include \"itt_notify.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n    // Workaround for overzealous compiler warnings\n    #pragma warning (push)\n    #pragma warning (disable: 4311 4312)\n#endif\n\n//! A view of a T* with additional functionality for twiddling low-order bits.\ntemplate<typename T>\nclass tricky_atomic_pointer {\npublic:\n    using word = uintptr_t;\n\n    static T* fetch_add( std::atomic<word>& location, word addend, std::memory_order memory_order ) {\n        return reinterpret_cast<T*>(location.fetch_add(addend, memory_order));\n    }\n\n    static T* exchange( std::atomic<word>& location, T* value, std::memory_order memory_order ) {\n        return reinterpret_cast<T*>(location.exchange(reinterpret_cast<word>(value), memory_order));\n    }\n\n    static T* compare_exchange_strong( std::atomic<word>& obj, const T* expected, const T* desired, std::memory_order memory_order ) {\n        word expd = reinterpret_cast<word>(expected);\n        obj.compare_exchange_strong(expd, reinterpret_cast<word>(desired), memory_order);\n        return reinterpret_cast<T*>(expd);\n    }\n\n    static void store( std::atomic<word>& location, const T* value, std::memory_order memory_order ) {\n        location.store(reinterpret_cast<word>(value), memory_order);\n    }\n\n    static T* load( std::atomic<word>& location, std::memory_order memory_order ) {\n        return reinterpret_cast<T*>(location.load(memory_order));\n    }\n\n    static void spin_wait_while_eq(const std::atomic<word>& location, const T* value) {\n        tbb::detail::d0::spin_wait_while_eq(location, reinterpret_cast<word>(value) );\n    }\n\n    T* & ref;\n    tricky_atomic_pointer( T*& original ) : ref(original) {};\n    tricky_atomic_pointer(const tricky_atomic_pointer&) = delete;\n    tricky_atomic_pointer& operator=(const tricky_atomic_pointer&) = delete;\n    T* operator&( const word operand2 ) const {\n        return reinterpret_cast<T*>( reinterpret_cast<word>(ref) & operand2 );\n    }\n    T* operator|( const word operand2 ) const {\n        return reinterpret_cast<T*>( reinterpret_cast<word>(ref) | operand2 );\n    }\n};\n\nusing tricky_pointer = tricky_atomic_pointer<queuing_rw_mutex::scoped_lock>;\n\n#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n    // Workaround for overzealous compiler warnings\n    #pragma warning (pop)\n#endif\n\n//! Flag bits in a state_t that specify information about a locking request.\nenum state_t_flags : unsigned char {\n    STATE_NONE                   = 0,\n    STATE_WRITER                 = 1<<0,\n    STATE_READER                 = 1<<1,\n    STATE_READER_UNBLOCKNEXT     = 1<<2,\n    STATE_ACTIVEREADER           = 1<<3,\n    STATE_UPGRADE_REQUESTED      = 1<<4,\n    STATE_UPGRADE_WAITING        = 1<<5,\n    STATE_UPGRADE_LOSER          = 1<<6,\n    STATE_COMBINED_WAITINGREADER = STATE_READER | STATE_READER_UNBLOCKNEXT,\n    STATE_COMBINED_READER        = STATE_COMBINED_WAITINGREADER | STATE_ACTIVEREADER,\n    STATE_COMBINED_UPGRADING     = STATE_UPGRADE_WAITING | STATE_UPGRADE_LOSER\n};\n\nstatic const unsigned char RELEASED = 0;\nstatic const unsigned char ACQUIRED = 1;\n\nstruct queuing_rw_mutex_impl {\n    //! Try to acquire the internal lock\n    /** Returns true if lock was successfully acquired. */\n    static bool try_acquire_internal_lock(d1::queuing_rw_mutex::scoped_lock& s)\n    {\n        auto expected = RELEASED;\n        return s.my_internal_lock.compare_exchange_strong(expected, ACQUIRED);\n    }\n\n    //! Acquire the internal lock\n    static void acquire_internal_lock(d1::queuing_rw_mutex::scoped_lock& s)\n    {\n        // Usually, we would use the test-test-and-set idiom here, with exponential backoff.\n        // But so far, experiments indicate there is no value in doing so here.\n        while( !try_acquire_internal_lock(s) ) {\n            machine_pause(1);\n        }\n    }\n\n    //! Release the internal lock\n    static void release_internal_lock(d1::queuing_rw_mutex::scoped_lock& s)\n    {\n        s.my_internal_lock.store(RELEASED, std::memory_order_release);\n    }\n\n    //! Wait for internal lock to be released\n    static void wait_for_release_of_internal_lock(d1::queuing_rw_mutex::scoped_lock& s)\n    {\n        spin_wait_until_eq(s.my_internal_lock, RELEASED);\n    }\n\n    //! A helper function\n    static void unblock_or_wait_on_internal_lock(d1::queuing_rw_mutex::scoped_lock& s, uintptr_t flag ) {\n        if( flag ) {\n            wait_for_release_of_internal_lock(s);\n        }\n        else {\n            release_internal_lock(s);\n        }\n    }\n\n    //! Mask for low order bit of a pointer.\n    static const tricky_pointer::word FLAG = 0x1;\n\n    static uintptr_t get_flag( d1::queuing_rw_mutex::scoped_lock* ptr ) {\n        return reinterpret_cast<uintptr_t>(ptr) & FLAG;\n    }\n\n    //------------------------------------------------------------------------\n    // Methods of queuing_rw_mutex::scoped_lock\n    //------------------------------------------------------------------------\n\n    //! A method to acquire queuing_rw_mutex lock\n    static void acquire(d1::queuing_rw_mutex& m, d1::queuing_rw_mutex::scoped_lock& s, bool write)\n    {\n        __TBB_ASSERT( !s.my_mutex, \"scoped_lock is already holding a mutex\");\n\n        // Must set all fields before the exchange, because once the\n        // exchange executes, *this becomes accessible to other threads.\n        s.my_mutex = &m;\n        s.my_prev.store(0U, std::memory_order_relaxed);\n        s.my_next.store(0U, std::memory_order_relaxed);\n        s.my_going.store(0U, std::memory_order_relaxed);\n        s.my_state.store(d1::queuing_rw_mutex::scoped_lock::state_t(write ? STATE_WRITER : STATE_READER), std::memory_order_relaxed);\n        s.my_internal_lock.store(RELEASED, std::memory_order_relaxed);\n\n\n        // The CAS must have release semantics, because we are\n        // \"sending\" the fields initialized above to other actors.\n        // We need acquire semantics, because we are acquiring the predecessor (or mutex if no predecessor)\n        queuing_rw_mutex::scoped_lock* predecessor = m.q_tail.exchange(&s, std::memory_order_acq_rel);\n\n        if( write ) {       // Acquiring for write\n\n            if( predecessor ) {\n                ITT_NOTIFY(sync_prepare, s.my_mutex);\n                predecessor = tricky_pointer(predecessor) & ~FLAG;\n                __TBB_ASSERT( !predecessor->my_next, \"the predecessor has another successor!\");\n                tricky_pointer::store(predecessor->my_next, &s, std::memory_order_release);\n                // We are acquiring the mutex\n                spin_wait_until_eq(s.my_going, 1U, std::memory_order_acquire);\n            }\n\n        } else {            // Acquiring for read\n    #if __TBB_USE_ITT_NOTIFY\n            bool sync_prepare_done = false;\n    #endif\n            if( predecessor ) {\n                unsigned char pred_state{};\n                __TBB_ASSERT( !s.my_prev.load(std::memory_order_relaxed), \"the predecessor is already set\" );\n                if( tricky_pointer(predecessor) & FLAG ) {\n                    /* this is only possible if predecessor is an upgrading reader and it signals us to wait */\n                    pred_state = STATE_UPGRADE_WAITING;\n                    predecessor = tricky_pointer(predecessor) & ~FLAG;\n                } else {\n                    // Load predecessor->my_state now, because once predecessor->my_next becomes\n                    // non-null, we must assume that *predecessor might be destroyed.\n                    pred_state = predecessor->my_state.load(std::memory_order_relaxed);\n                    if (pred_state == STATE_READER) {\n                        // Notify the previous reader to unblock us.\n                        predecessor->my_state.compare_exchange_strong(pred_state, STATE_READER_UNBLOCKNEXT, std::memory_order_relaxed);\n                    }\n                    if (pred_state == STATE_ACTIVEREADER)  { // either we initially read it or CAS failed\n                        // Active reader means that the predecessor already acquired the mutex and cannot notify us.\n                        // Therefore, we need to acquire the mutex ourselves by re-reading predecessor state.\n                        (void)predecessor->my_state.load(std::memory_order_acquire);\n                    }\n                }\n                tricky_pointer::store(s.my_prev, predecessor, std::memory_order_relaxed);\n                __TBB_ASSERT( !( tricky_pointer(predecessor) & FLAG ), \"use of corrupted pointer!\" );\n                __TBB_ASSERT( !predecessor->my_next.load(std::memory_order_relaxed), \"the predecessor has another successor!\");\n                tricky_pointer::store(predecessor->my_next, &s, std::memory_order_release);\n                if( pred_state != STATE_ACTIVEREADER ) {\n    #if __TBB_USE_ITT_NOTIFY\n                    sync_prepare_done = true;\n                    ITT_NOTIFY(sync_prepare, s.my_mutex);\n    #endif\n                    // We are acquiring the mutex\n                    spin_wait_until_eq(s.my_going, 1U, std::memory_order_acquire);\n                }\n            }\n\n            // The protected state must have been acquired here before it can be further released to any other reader(s):\n            unsigned char old_state = STATE_READER;\n            // When this reader is signaled by previous actor it acquires the mutex.\n            // We need to build happens-before relation with all other coming readers that will read our ACTIVEREADER\n            // without blocking on my_going. Therefore, we need to publish ACTIVEREADER with release semantics.\n            // On fail it is relaxed, because we will build happens-before on my_going.\n            s.my_state.compare_exchange_strong(old_state, STATE_ACTIVEREADER, std::memory_order_release, std::memory_order_relaxed);\n            if( old_state!=STATE_READER ) {\n#if __TBB_USE_ITT_NOTIFY\n                if( !sync_prepare_done )\n                    ITT_NOTIFY(sync_prepare, s.my_mutex);\n#endif\n                // Failed to become active reader -> need to unblock the next waiting reader first\n                __TBB_ASSERT( s.my_state.load(std::memory_order_relaxed)==STATE_READER_UNBLOCKNEXT, \"unexpected state\" );\n                spin_wait_while_eq(s.my_next, 0U, std::memory_order_acquire);\n                /* my_state should be changed before unblocking the next otherwise it might finish\n                   and another thread can get our old state and left blocked */\n                s.my_state.store(STATE_ACTIVEREADER, std::memory_order_relaxed);\n                tricky_pointer::load(s.my_next, std::memory_order_relaxed)->my_going.store(1U, std::memory_order_release);\n            }\n            __TBB_ASSERT(s.my_state.load(std::memory_order_relaxed) == STATE_ACTIVEREADER, \"unlocked reader is active reader\");\n        }\n\n        ITT_NOTIFY(sync_acquired, s.my_mutex);\n    }\n\n    //! A method to acquire queuing_rw_mutex if it is free\n    static bool try_acquire(d1::queuing_rw_mutex& m, d1::queuing_rw_mutex::scoped_lock& s, bool write)\n    {\n        __TBB_ASSERT( !s.my_mutex, \"scoped_lock is already holding a mutex\");\n\n        if( m.q_tail.load(std::memory_order_relaxed) )\n            return false; // Someone already took the lock\n\n        // Must set all fields before the exchange, because once the\n        // exchange executes, *this becomes accessible to other threads.\n        s.my_prev.store(0U, std::memory_order_relaxed);\n        s.my_next.store(0U, std::memory_order_relaxed);\n        s.my_going.store(0U, std::memory_order_relaxed); // TODO: remove dead assignment?\n        s.my_state.store(d1::queuing_rw_mutex::scoped_lock::state_t(write ? STATE_WRITER : STATE_ACTIVEREADER), std::memory_order_relaxed);\n        s.my_internal_lock.store(RELEASED, std::memory_order_relaxed);\n\n        // The CAS must have release semantics, because we are\n        // \"sending\" the fields initialized above to other actors.\n        // We need acquire semantics, because we are acquiring the mutex\n        d1::queuing_rw_mutex::scoped_lock* expected = nullptr;\n        if (!m.q_tail.compare_exchange_strong(expected, &s, std::memory_order_acq_rel))\n            return false; // Someone already took the lock\n        s.my_mutex = &m;\n        ITT_NOTIFY(sync_acquired, s.my_mutex);\n        return true;\n    }\n\n    //! A method to release queuing_rw_mutex lock\n    static void release(d1::queuing_rw_mutex::scoped_lock& s) {\n        __TBB_ASSERT(s.my_mutex!=nullptr, \"no lock acquired\");\n\n        ITT_NOTIFY(sync_releasing, s.my_mutex);\n\n        if( s.my_state.load(std::memory_order_relaxed) == STATE_WRITER ) { // Acquired for write\n\n            // The logic below is the same as \"writerUnlock\", but elides\n            // \"return\" from the middle of the routine.\n            // In the statement below, acquire semantics of reading my_next is required\n            // so that following operations with fields of my_next are safe.\n            d1::queuing_rw_mutex::scoped_lock* next = tricky_pointer::load(s.my_next, std::memory_order_acquire);\n            if( !next ) {\n                d1::queuing_rw_mutex::scoped_lock* expected = &s;\n                // Release mutex on success otherwise wait for successor publication\n                if( s.my_mutex->q_tail.compare_exchange_strong(expected, nullptr,\n                    std::memory_order_release, std::memory_order_relaxed) )\n                {\n                    // this was the only item in the queue, and the queue is now empty.\n                    goto done;\n                }\n                spin_wait_while_eq(s.my_next, 0U, std::memory_order_relaxed);\n                next = tricky_pointer::load(s.my_next, std::memory_order_acquire);\n            }\n            next->my_going.store(2U, std::memory_order_relaxed); // protect next queue node from being destroyed too early\n            // If the next is STATE_UPGRADE_WAITING, it is expected to acquire all other released readers via release\n            // sequence in next->my_state. In that case, we need to preserve release sequence in next->my_state\n            // contributed by other reader. So, there are two approaches not to break the release sequence:\n            //   1. Use read-modify-write (exchange) operation to store with release the UPGRADE_LOSER state;\n            //   2. Acquire the release sequence and store the sequence and UPGRADE_LOSER state.\n            // The second approach seems better on x86 because it does not involve interlocked operations.\n            // Therefore, we read next->my_state with acquire while it is not required for else branch to get the \n            // release sequence.\n            if( next->my_state.load(std::memory_order_acquire)==STATE_UPGRADE_WAITING ) {\n                // the next waiting for upgrade means this writer was upgraded before.\n                acquire_internal_lock(s);\n                // Responsibility transition, the one who reads uncorrupted my_prev will do release.\n                // Guarantee that above store of 2 into next->my_going happens-before resetting of next->my_prev\n                d1::queuing_rw_mutex::scoped_lock* tmp = tricky_pointer::exchange(next->my_prev, nullptr, std::memory_order_release);\n                // Pass the release sequence that we acquired with the above load of next->my_state.\n                next->my_state.store(STATE_UPGRADE_LOSER, std::memory_order_release);\n                // We are releasing the mutex\n                next->my_going.store(1U, std::memory_order_release);\n                unblock_or_wait_on_internal_lock(s, get_flag(tmp));\n            } else {\n                // next->state cannot be STATE_UPGRADE_REQUESTED\n                __TBB_ASSERT( next->my_state.load(std::memory_order_relaxed) & (STATE_COMBINED_WAITINGREADER | STATE_WRITER), \"unexpected state\" );\n                __TBB_ASSERT( !( next->my_prev.load(std::memory_order_relaxed) & FLAG ), \"use of corrupted pointer!\" );\n                // Guarantee that above store of 2 into next->my_going happens-before resetting of next->my_prev\n                tricky_pointer::store(next->my_prev, nullptr, std::memory_order_release);\n                // We are releasing the mutex\n                next->my_going.store(1U, std::memory_order_release);\n            }\n\n        } else { // Acquired for read\n            // The basic idea it to build happens-before relation with left and right readers via prev and next. In addition,\n            // the first reader should acquire the left (prev) signal and propagate to right (next). To simplify, we always\n            // build happens-before relation between left and right (left is happened before right).\n            queuing_rw_mutex::scoped_lock *tmp = nullptr;\n    retry:\n            // Addition to the original paper: Mark my_prev as in use\n            queuing_rw_mutex::scoped_lock *predecessor = tricky_pointer::fetch_add(s.my_prev, FLAG, std::memory_order_acquire);\n\n            if( predecessor ) {\n                if( !(try_acquire_internal_lock(*predecessor)) )\n                {\n                    // Failed to acquire the lock on predecessor. The predecessor either unlinks or upgrades.\n                    // In the second case, it could or could not know my \"in use\" flag - need to check\n                    // Responsibility transition, the one who reads uncorrupted my_prev will do release.\n                    tmp = tricky_pointer::compare_exchange_strong(s.my_prev, tricky_pointer(predecessor) | FLAG, predecessor, std::memory_order_acquire);\n                    if( !(tricky_pointer(tmp) & FLAG) ) {\n                        __TBB_ASSERT(tricky_pointer::load(s.my_prev, std::memory_order_relaxed) != (tricky_pointer(predecessor) | FLAG), nullptr);\n                        // Now owner of predecessor is waiting for _us_ to release its lock\n                        release_internal_lock(*predecessor);\n                    }\n                    // else the \"in use\" flag is back -> the predecessor didn't get it and will release itself; nothing to do\n\n                    tmp = nullptr;\n                    goto retry;\n                }\n                __TBB_ASSERT(predecessor && predecessor->my_internal_lock.load(std::memory_order_relaxed)==ACQUIRED, \"predecessor's lock is not acquired\");\n                tricky_pointer::store(s.my_prev, predecessor, std::memory_order_relaxed);\n                acquire_internal_lock(s);\n\n                tricky_pointer::store(predecessor->my_next, nullptr, std::memory_order_release);\n\n                d1::queuing_rw_mutex::scoped_lock* expected = &s;\n                if( !tricky_pointer::load(s.my_next, std::memory_order_acquire) && !s.my_mutex->q_tail.compare_exchange_strong(expected, predecessor, std::memory_order_release) ) {\n                    spin_wait_while_eq( s.my_next, 0U, std::memory_order_acquire );\n                }\n                __TBB_ASSERT( !(s.my_next.load(std::memory_order_relaxed) & FLAG), \"use of corrupted pointer\" );\n\n                // my_next is acquired either with load or spin_wait.\n                if(d1::queuing_rw_mutex::scoped_lock *const l_next = tricky_pointer::load(s.my_next, std::memory_order_relaxed) ) { // I->next != nil, TODO: rename to next after clearing up and adapting the n in the comment two lines below\n                    // Equivalent to I->next->prev = I->prev but protected against (prev[n]&FLAG)!=0\n                    tmp = tricky_pointer::exchange(l_next->my_prev, predecessor, std::memory_order_release);\n                    // I->prev->next = I->next;\n                    __TBB_ASSERT(tricky_pointer::load(s.my_prev, std::memory_order_relaxed)==predecessor, nullptr);\n                    predecessor->my_next.store(s.my_next.load(std::memory_order_relaxed), std::memory_order_release);\n                }\n                // Safe to release in the order opposite to acquiring which makes the code simpler\n                release_internal_lock(*predecessor);\n\n            } else { // No predecessor when we looked\n                acquire_internal_lock(s);  // \"exclusiveLock(&I->EL)\"\n                d1::queuing_rw_mutex::scoped_lock* next = tricky_pointer::load(s.my_next, std::memory_order_acquire);\n                if( !next ) {\n                    d1::queuing_rw_mutex::scoped_lock* expected = &s;\n                    // Release mutex on success otherwise wait for successor publication\n                    if( !s.my_mutex->q_tail.compare_exchange_strong(expected, nullptr,\n                        std::memory_order_release, std::memory_order_relaxed) )\n                    {\n                        spin_wait_while_eq( s.my_next, 0U, std::memory_order_relaxed );\n                        next = tricky_pointer::load(s.my_next, std::memory_order_acquire);\n                    } else {\n                        goto unlock_self;\n                    }\n                }\n                next->my_going.store(2U, std::memory_order_relaxed);\n                // Responsibility transition, the one who reads uncorrupted my_prev will do release.\n                tmp = tricky_pointer::exchange(next->my_prev, nullptr, std::memory_order_release);\n                next->my_going.store(1U, std::memory_order_release);\n            }\n    unlock_self:\n            unblock_or_wait_on_internal_lock(s, get_flag(tmp));\n        }\n    done:\n        // Lifetime synchronization, no need to build happens-before relation\n        spin_wait_while_eq( s.my_going, 2U, std::memory_order_relaxed );\n\n        s.initialize();\n    }\n\n    static bool downgrade_to_reader(d1::queuing_rw_mutex::scoped_lock& s) {\n        if ( s.my_state.load(std::memory_order_relaxed) == STATE_ACTIVEREADER ) return true; // Already a reader\n\n        ITT_NOTIFY(sync_releasing, s.my_mutex);\n        d1::queuing_rw_mutex::scoped_lock* next = tricky_pointer::load(s.my_next, std::memory_order_acquire);\n        if( !next ) {\n            s.my_state.store(STATE_READER, std::memory_order_seq_cst);\n            // the following load of q_tail must not be reordered with setting STATE_READER above\n            if( &s == s.my_mutex->q_tail.load(std::memory_order_seq_cst) ) {\n                unsigned char old_state = STATE_READER;\n                // When this reader is signaled by previous actor it acquires the mutex.\n                // We need to build happens-before relation with all other coming readers that will read our ACTIVEREADER\n                // without blocking on my_going. Therefore, we need to publish ACTIVEREADER with release semantics.\n                // On fail it is relaxed, because we will build happens-before on my_going.\n                s.my_state.compare_exchange_strong(old_state, STATE_ACTIVEREADER, std::memory_order_release, std::memory_order_relaxed);\n                if( old_state==STATE_READER )\n                    return true; // Downgrade completed\n            }\n            /* wait for the next to register */\n            spin_wait_while_eq(s.my_next, 0U, std::memory_order_relaxed);\n            next = tricky_pointer::load(s.my_next, std::memory_order_acquire);\n        }\n\n        __TBB_ASSERT( next, \"still no successor at this point!\" );\n        if( next->my_state.load(std::memory_order_relaxed) & STATE_COMBINED_WAITINGREADER )\n            next->my_going.store(1U, std::memory_order_release);\n        // If the next is STATE_UPGRADE_WAITING, it is expected to acquire all other released readers via release\n        // sequence in next->my_state. In that case, we need to preserve release sequence in next->my_state\n        // contributed by other reader. So, there are two approaches not to break the release sequence:\n        //   1. Use read-modify-write (exchange) operation to store with release the UPGRADE_LOSER state;\n        //   2. Acquire the release sequence and store the sequence and UPGRADE_LOSER state.\n        // The second approach seems better on x86 because it does not involve interlocked operations.\n        // Therefore, we read next->my_state with acquire while it is not required for else branch to get the \n        // release sequence.\n        else if( next->my_state.load(std::memory_order_acquire)==STATE_UPGRADE_WAITING )\n            // the next waiting for upgrade means this writer was upgraded before.\n            // To safe release sequence on next->my_state read it with acquire\n            next->my_state.store(STATE_UPGRADE_LOSER, std::memory_order_release);\n        s.my_state.store(STATE_ACTIVEREADER, std::memory_order_release);\n        return true;\n    }\n\n    static bool upgrade_to_writer(d1::queuing_rw_mutex::scoped_lock& s) {\n        if (s.my_state.load(std::memory_order_relaxed) == STATE_WRITER) {\n            // Already a writer\n            return true;\n        }\n\n        __TBB_ASSERT(s.my_state.load(std::memory_order_relaxed) == STATE_ACTIVEREADER, \"only active reader can be updated\");\n\n        queuing_rw_mutex::scoped_lock* tmp{};\n        queuing_rw_mutex::scoped_lock* me = &s;\n\n        ITT_NOTIFY(sync_releasing, s.my_mutex);\n        // Publish ourselves into my_state that other UPGRADE_WAITING actors can acquire our state.\n        s.my_state.store(STATE_UPGRADE_REQUESTED, std::memory_order_release);\n    requested:\n        __TBB_ASSERT( !(s.my_next.load(std::memory_order_relaxed) & FLAG), \"use of corrupted pointer!\" );\n        acquire_internal_lock(s);\n        d1::queuing_rw_mutex::scoped_lock* expected = &s;\n        if( !s.my_mutex->q_tail.compare_exchange_strong(expected, tricky_pointer(me)|FLAG, std::memory_order_acq_rel) ) {\n            spin_wait_while_eq( s.my_next, 0U, std::memory_order_relaxed );\n            queuing_rw_mutex::scoped_lock * next;\n            next = tricky_pointer::fetch_add(s.my_next, FLAG, std::memory_order_acquire);\n            // While we were READER the next READER might reach STATE_UPGRADE_WAITING state.\n            // Therefore, it did not build happens before relation with us and we need to acquire the \n            // next->my_state to build the happens before relation ourselves\n            unsigned short n_state = next->my_state.load(std::memory_order_acquire);\n            /* the next reader can be blocked by our state. the best thing to do is to unblock it */\n            if( n_state & STATE_COMBINED_WAITINGREADER )\n                next->my_going.store(1U, std::memory_order_release);\n            // Responsibility transition, the one who reads uncorrupted my_prev will do release.\n            tmp = tricky_pointer::exchange(next->my_prev, &s, std::memory_order_release);\n            unblock_or_wait_on_internal_lock(s, get_flag(tmp));\n            if( n_state & (STATE_COMBINED_READER | STATE_UPGRADE_REQUESTED) ) {\n                // save next|FLAG for simplicity of following comparisons\n                tmp = tricky_pointer(next)|FLAG;\n                for( atomic_backoff b; tricky_pointer::load(s.my_next, std::memory_order_relaxed)==tmp; b.pause() ) {\n                    if( s.my_state.load(std::memory_order_acquire) & STATE_COMBINED_UPGRADING ) {\n                        if( tricky_pointer::load(s.my_next, std::memory_order_acquire)==tmp )\n                            tricky_pointer::store(s.my_next, next, std::memory_order_relaxed);\n                        goto waiting;\n                    }\n                }\n                __TBB_ASSERT(tricky_pointer::load(s.my_next, std::memory_order_relaxed) != (tricky_pointer(next)|FLAG), nullptr);\n                goto requested;\n            } else {\n                __TBB_ASSERT( n_state & (STATE_WRITER | STATE_UPGRADE_WAITING), \"unexpected state\");\n                __TBB_ASSERT( (tricky_pointer(next)|FLAG) == tricky_pointer::load(s.my_next, std::memory_order_relaxed), nullptr);\n                tricky_pointer::store(s.my_next, next, std::memory_order_relaxed);\n            }\n        } else {\n            /* We are in the tail; whoever comes next is blocked by q_tail&FLAG */\n            release_internal_lock(s);\n        } // if( this != my_mutex->q_tail... )\n        {\n            unsigned char old_state = STATE_UPGRADE_REQUESTED;\n            // If we reach STATE_UPGRADE_WAITING state we do not build happens-before relation with READER on\n            // left. We delegate this responsibility to READER on left when it try upgrading. Therefore, we are releasing\n            // on success.\n            // Otherwise, on fail, we already acquired the next->my_state.\n            s.my_state.compare_exchange_strong(old_state, STATE_UPGRADE_WAITING, std::memory_order_release, std::memory_order_relaxed);\n        }\n    waiting:\n        __TBB_ASSERT( !( s.my_next.load(std::memory_order_relaxed) & FLAG ), \"use of corrupted pointer!\" );\n        __TBB_ASSERT( s.my_state & STATE_COMBINED_UPGRADING, \"wrong state at upgrade waiting_retry\" );\n        __TBB_ASSERT( me==&s, nullptr );\n        ITT_NOTIFY(sync_prepare, s.my_mutex);\n        /* if no one was blocked by the \"corrupted\" q_tail, turn it back */\n        expected = tricky_pointer(me)|FLAG;\n        s.my_mutex->q_tail.compare_exchange_strong(expected, &s, std::memory_order_release);\n        queuing_rw_mutex::scoped_lock * predecessor;\n        // Mark my_prev as 'in use' to prevent predecessor from releasing\n        predecessor = tricky_pointer::fetch_add(s.my_prev, FLAG, std::memory_order_acquire);\n        if( predecessor ) {\n            bool success = try_acquire_internal_lock(*predecessor);\n            {\n                // While the predecessor pointer (my_prev) is in use (FLAG is set), we can safely update the node`s state.\n                // Corrupted pointer transitions responsibility to release the predecessor`s node on us.\n                unsigned char old_state = STATE_UPGRADE_REQUESTED;\n                // Try to build happens before with the upgrading READER on left. If fail, the predecessor state is not\n                // important for us because it will acquire our state.\n                predecessor->my_state.compare_exchange_strong(old_state, STATE_UPGRADE_WAITING, std::memory_order_release,\n                    std::memory_order_relaxed);\n            }\n            if( !success ) {\n                // Responsibility transition, the one who reads uncorrupted my_prev will do release.\n                tmp = tricky_pointer::compare_exchange_strong(s.my_prev, tricky_pointer(predecessor)|FLAG, predecessor, std::memory_order_acquire);\n                if( tricky_pointer(tmp) & FLAG ) {\n                    tricky_pointer::spin_wait_while_eq(s.my_prev, predecessor);\n                    predecessor = tricky_pointer::load(s.my_prev, std::memory_order_relaxed);\n                } else {\n                    // TODO: spin_wait condition seems never reachable\n                    tricky_pointer::spin_wait_while_eq(s.my_prev, tricky_pointer(predecessor)|FLAG);\n                    release_internal_lock(*predecessor);\n                }\n            } else {\n                tricky_pointer::store(s.my_prev, predecessor, std::memory_order_relaxed);\n                release_internal_lock(*predecessor);\n                tricky_pointer::spin_wait_while_eq(s.my_prev, predecessor);\n                predecessor = tricky_pointer::load(s.my_prev, std::memory_order_relaxed);\n            }\n            if( predecessor )\n                goto waiting;\n        } else {\n            tricky_pointer::store(s.my_prev, nullptr, std::memory_order_relaxed);\n        }\n        __TBB_ASSERT( !predecessor && !s.my_prev, nullptr );\n\n        // additional lifetime issue prevention checks\n        // wait for the successor to finish working with my fields\n        wait_for_release_of_internal_lock(s);\n        // now wait for the predecessor to finish working with my fields\n        spin_wait_while_eq( s.my_going, 2U );\n\n        bool result = ( s.my_state != STATE_UPGRADE_LOSER );\n        s.my_state.store(STATE_WRITER, std::memory_order_relaxed);\n        s.my_going.store(1U, std::memory_order_relaxed);\n\n        ITT_NOTIFY(sync_acquired, s.my_mutex);\n        return result;\n    }\n\n    static bool is_writer(const d1::queuing_rw_mutex::scoped_lock& m) {\n        return m.my_state.load(std::memory_order_relaxed) == STATE_WRITER;\n    }\n\n    static void construct(d1::queuing_rw_mutex& m) {\n        suppress_unused_warning(m);\n        ITT_SYNC_CREATE(&m, _T(\"tbb::queuing_rw_mutex\"), _T(\"\"));\n    }\n};\n\nvoid __TBB_EXPORTED_FUNC acquire(d1::queuing_rw_mutex& m, d1::queuing_rw_mutex::scoped_lock& s, bool write) {\n    queuing_rw_mutex_impl::acquire(m, s, write);\n}\n\nbool __TBB_EXPORTED_FUNC try_acquire(d1::queuing_rw_mutex& m, d1::queuing_rw_mutex::scoped_lock& s, bool write) {\n    return queuing_rw_mutex_impl::try_acquire(m, s, write);\n}\n\nvoid __TBB_EXPORTED_FUNC release(d1::queuing_rw_mutex::scoped_lock& s) {\n    queuing_rw_mutex_impl::release(s);\n}\n\nbool __TBB_EXPORTED_FUNC upgrade_to_writer(d1::queuing_rw_mutex::scoped_lock& s) {\n    return queuing_rw_mutex_impl::upgrade_to_writer(s);\n}\n\nbool __TBB_EXPORTED_FUNC is_writer(const d1::queuing_rw_mutex::scoped_lock& s) {\n    return queuing_rw_mutex_impl::is_writer(s);\n}\n\nbool __TBB_EXPORTED_FUNC downgrade_to_reader(d1::queuing_rw_mutex::scoped_lock& s) {\n    return queuing_rw_mutex_impl::downgrade_to_reader(s);\n}\n\nTBB_EXPORT void __TBB_EXPORTED_FUNC construct(d1::queuing_rw_mutex& m) {\n    queuing_rw_mutex_impl::construct(m);\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/rml_base.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// Header guard and namespace names follow rml conventions.\n\n#ifndef __RML_rml_base_H\n#define __RML_rml_base_H\n\n#include <cstddef>\n\n#if _WIN32||_WIN64\n#include <windows.h>\n#endif /* _WIN32||_WIN64 */\n\n#ifdef RML_PURE_VIRTUAL_HANDLER\n#define RML_PURE(T) {RML_PURE_VIRTUAL_HANDLER(); return (T)0;}\n#else\n#define RML_PURE(T) = 0;\n#endif\n\nnamespace rml {\n\nclass server;\n\nclass versioned_object {\npublic:\n    //! A version number\n    typedef unsigned version_type;\n\n    virtual ~versioned_object() {}\n\n    //! Get version of this object\n    /** The version number is incremented when a incompatible change is introduced.\n        The version number is invariant for the lifetime of the object. */\n    virtual version_type version() const RML_PURE(version_type)\n\n};\n\n//! Represents a client's job for an execution context.\n/** A job object is constructed by the client.\n    Not derived from versioned_object because version is same as for client. */\nclass job {\n    friend class server;\n};\n\n//! Information that client provides to server when asking for a server.\n/** The instance must endure at least until acknowledge_close_connection is called. */\nclass client: public versioned_object {\npublic:\n    //! Typedef for convenience of derived classes in other namespaces.\n    typedef ::rml::job job;\n\n    //! Index of a job in a job pool\n    typedef unsigned size_type;\n\n    //! Maximum number of threads that client can exploit profitably if nothing else is running on the machine.\n    /** The returned value should remain invariant for the lifetime of the connection.  [idempotent] */\n    virtual size_type max_job_count() const RML_PURE(size_type)\n\n    //! Minimum stack size for each job.  0 means to use default stack size. [idempotent]\n    virtual std::size_t min_stack_size() const RML_PURE(std::size_t)\n\n    //! Server calls this routine when it needs client to create a job object.\n    virtual job* create_one_job() RML_PURE(job*)\n\n    //! Acknowledge that all jobs have been cleaned up.\n    /** Called by server in response to request_close_connection\n        after cleanup(job) has been called for each job. */\n    virtual void acknowledge_close_connection() RML_PURE(void)\n\n    //! Inform client that server is done with *this.\n    /** Client should destroy the job.\n        Not necessarily called by execution context represented by *this.\n        Never called while any other thread is working on the job. */\n    virtual void cleanup( job& ) RML_PURE(void)\n\n    // In general, we should not add new virtual methods, because that would\n    // break derived classes.  Think about reserving some vtable slots.\n};\n\n// Information that server provides to client.\n// Virtual functions are routines provided by the server for the client to call.\nclass server: public versioned_object {\npublic:\n    //! Typedef for convenience of derived classes.\n    typedef ::rml::job job;\n\n#if _WIN32||_WIN64\n    typedef void* execution_resource_t;\n#endif\n\n    //! Request that connection to server be closed.\n    /** Causes each job associated with the client to have its cleanup method called,\n        possibly by a thread different than the thread that created the job.\n        This method can return before all cleanup methods return.\n        Actions that have to wait after all cleanup methods return should be part of\n        client::acknowledge_close_connection.\n        Pass true as exiting if request_close_connection() is called because exit() is\n        called. In that case, it is the client's responsibility to make sure all threads\n        are terminated. In all other cases, pass false.  */\n    virtual void request_close_connection( bool exiting = false ) = 0;\n\n    //! Called by client thread when it reaches a point where it cannot make progress until other threads do.\n    virtual void yield() = 0;\n\n    //! Called by client to indicate a change in the number of non-RML threads that are running.\n    /** This is a performance hint to the RML to adjust how many threads it should let run\n        concurrently.  The delta is the change in the number of non-RML threads that are running.\n        For example, a value of 1 means the client has started running another thread, and a value\n        of -1 indicates that the client has blocked or terminated one of its threads. */\n    virtual void independent_thread_number_changed( int delta ) = 0;\n\n    //! Default level of concurrency for which RML strives when there are no non-RML threads running.\n    /** Normally, the value is the hardware concurrency minus one.\n        The \"minus one\" accounts for the thread created by main(). */\n    virtual unsigned default_concurrency() const = 0;\n};\n\nclass factory {\npublic:\n    //! status results\n    enum status_type {\n        st_success=0,\n        st_connection_exists,\n        st_not_found,\n        st_incompatible\n    };\n\nprotected:\n    //! Pointer to routine that waits for server to indicate when client can close itself.\n    status_type (*my_wait_to_close_routine)( factory& );\n\npublic:\n    //! Library handle for use by RML.\n#if _WIN32||_WIN64\n    HMODULE library_handle;\n#else\n    void* library_handle;\n#endif /* _WIN32||_WIN64 */\n\n    //! Special marker to keep dll from being unloaded prematurely\n    static const std::size_t c_dont_unload = 1;\n};\n\n//! Typedef for callback functions to print server info\ntypedef void (*server_info_callback_t)( void* arg, const char* server_info );\n\n} // namespace rml\n\n#endif /* __RML_rml_base_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/rml_tbb.cpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/detail/_assert.h\"\n\n#include \"rml_tbb.h\"\n#include \"dynamic_link.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\nnamespace rml {\n\n#define MAKE_SERVER(x) DLD(__TBB_make_rml_server,x)\n#define GET_INFO(x) DLD(__TBB_call_with_my_server_info,x)\n#define SERVER tbb_server\n#define CLIENT tbb_client\n#define FACTORY tbb_factory\n\n#if __TBB_WEAK_SYMBOLS_PRESENT\n    #pragma weak __TBB_make_rml_server\n    #pragma weak __TBB_call_with_my_server_info\n    extern \"C\" {\n        ::rml::factory::status_type __TBB_make_rml_server( rml::tbb_factory& f, rml::tbb_server*& server, rml::tbb_client& client );\n        void __TBB_call_with_my_server_info( ::rml::server_info_callback_t cb, void* arg );\n    }\n#endif /* __TBB_WEAK_SYMBOLS_PRESENT */\n\n#if TBB_USE_DEBUG\n#define DEBUG_SUFFIX \"_debug\"\n#else\n#define DEBUG_SUFFIX\n#endif /* TBB_USE_DEBUG */\n\n// RML_SERVER_NAME is the name of the RML server library.\n#if _WIN32 || _WIN64\n#define RML_SERVER_NAME \"irml\" DEBUG_SUFFIX \".dll\"\n#elif __APPLE__\n#define RML_SERVER_NAME \"libirml\" DEBUG_SUFFIX \".1.dylib\"\n#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __sun || _AIX\n#define RML_SERVER_NAME \"libirml\" DEBUG_SUFFIX \".so\"\n#elif __unix__\n#define RML_SERVER_NAME \"libirml\" DEBUG_SUFFIX \".so.1\"\n#else\n#error Unknown OS\n#endif\n\nconst ::rml::versioned_object::version_type CLIENT_VERSION = 2;\n\n#if __TBB_WEAK_SYMBOLS_PRESENT\n    #pragma weak __RML_open_factory\n    #pragma weak __RML_close_factory\n    extern \"C\" {\n        ::rml::factory::status_type __RML_open_factory ( ::rml::factory&, ::rml::versioned_object::version_type&, ::rml::versioned_object::version_type );\n        void __RML_close_factory( ::rml::factory& f );\n    }\n#endif /* __TBB_WEAK_SYMBOLS_PRESENT */\n\n::rml::factory::status_type FACTORY::open() {\n    // Failure of following assertion indicates that factory is already open, or not zero-inited.\n    __TBB_ASSERT_EX( !library_handle, nullptr);\n    status_type (*open_factory_routine)( factory&, version_type&, version_type );\n    dynamic_link_descriptor server_link_table[4] = {\n        DLD(__RML_open_factory,open_factory_routine),\n        MAKE_SERVER(my_make_server_routine),\n        DLD(__RML_close_factory,my_wait_to_close_routine),\n        GET_INFO(my_call_with_server_info_routine),\n    };\n    status_type result;\n    if ( dynamic_link( RML_SERVER_NAME, server_link_table, 4, &library_handle ) ) {\n        version_type server_version;\n        result = (*open_factory_routine)( *this, server_version, CLIENT_VERSION );\n        // server_version can be checked here for incompatibility if necessary.\n    } else {\n        library_handle = nullptr;\n        result = st_not_found;\n    }\n    return result;\n}\n\nvoid FACTORY::close() {\n    if ( library_handle )\n        (*my_wait_to_close_routine)(*this);\n    if ( (size_t)library_handle>FACTORY::c_dont_unload ) {\n        dynamic_unlink(library_handle);\n        library_handle = nullptr;\n    }\n}\n\n::rml::factory::status_type FACTORY::make_server( SERVER*& s, CLIENT& c) {\n    // Failure of following assertion means that factory was not successfully opened.\n    __TBB_ASSERT_EX( my_make_server_routine, nullptr);\n    return (*my_make_server_routine)(*this,s,c);\n}\n\n} // namespace rml\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/rml_tbb.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// Header guard and namespace names follow TBB conventions.\n\n#ifndef __TBB_rml_tbb_H\n#define __TBB_rml_tbb_H\n\n#include \"oneapi/tbb/version.h\"\n#include \"rml_base.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\nnamespace rml {\n\n//------------------------------------------------------------------------\n// Classes instantiated by the server\n//------------------------------------------------------------------------\n\n//! Represents a set of oneTBB worker threads provided by the server.\nclass tbb_server: public ::rml::server {\npublic:\n    //! Inform server of adjustments in the number of workers that the client can profitably use.\n    virtual void adjust_job_count_estimate( int delta ) = 0;\n\n#if _WIN32 || _WIN64\n    //! Inform server of a oneTBB external thread.\n    virtual void register_external_thread( execution_resource_t& v ) = 0;\n\n    //! Inform server that the oneTBB external thread is done with its work.\n    virtual void unregister_external_thread( execution_resource_t v ) = 0;\n#endif /* _WIN32||_WIN64 */\n};\n\n//------------------------------------------------------------------------\n// Classes instantiated by the client\n//------------------------------------------------------------------------\n\nclass tbb_client: public ::rml::client {\npublic:\n    //! Defined by TBB to steal a task and execute it.  \n    /** Called by server when it wants an execution context to do some TBB work.\n        The method should return when it is okay for the thread to yield indefinitely. */\n    virtual void process( job& ) RML_PURE(void)\n};\n\n/** Client must ensure that instance is zero-inited, typically by being a file-scope object. */\nclass tbb_factory: public ::rml::factory {\n\n    //! Pointer to routine that creates an RML server.\n    status_type (*my_make_server_routine)( tbb_factory&, tbb_server*&, tbb_client& );\n\n    //! Pointer to routine that calls callback function with server version info.\n    void (*my_call_with_server_info_routine)( ::rml::server_info_callback_t cb, void* arg );\n\npublic:\n    typedef ::rml::versioned_object::version_type version_type;\n    typedef tbb_client client_type;\n    typedef tbb_server server_type;\n\n    //! Open factory.\n    /** Dynamically links against RML library. \n        Returns st_success, st_incompatible, or st_not_found. */\n    status_type open();\n\n    //! Factory method to be called by client to create a server object.\n    /** Factory must be open. \n        Returns st_success, or st_incompatible . */\n    status_type make_server( server_type*&, client_type& );\n\n    //! Close factory\n    void close();\n};\n\n} // namespace rml\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /*__TBB_rml_tbb_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/rml_thread_monitor.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// All platform-specific threading support is encapsulated here. */\n\n#ifndef __RML_thread_monitor_H\n#define __RML_thread_monitor_H\n\n#if __TBB_USE_WINAPI\n#include <windows.h>\n#include <process.h>\n#include <malloc.h> //_alloca\n#include \"misc.h\" // support for processor groups\n#if __TBB_WIN8UI_SUPPORT && (_WIN32_WINNT < 0x0A00)\n#include <thread>\n#endif\n#elif __TBB_USE_POSIX\n#include <pthread.h>\n#include <cstring>\n#include <cstdlib>\n#include <time.h>\n#else\n#error Unsupported platform\n#endif\n#include <cstdio>\n\n#include \"oneapi/tbb/detail/_template_helpers.h\"\n\n#include \"itt_notify.h\"\n#include \"semaphore.h\"\n\n// All platform-specific threading support is in this header.\n\n#if (_WIN32||_WIN64)&&!__TBB_ipf\n// Deal with 64K aliasing.  The formula for \"offset\" is a Fibonacci hash function,\n// which has the desirable feature of spreading out the offsets fairly evenly\n// without knowing the total number of offsets, and furthermore unlikely to\n// accidentally cancel out other 64K aliasing schemes that Microsoft might implement later.\n// See Knuth Vol 3. \"Theorem S\" for details on Fibonacci hashing.\n// The second statement is really does need \"volatile\", otherwise the compiler might remove the _alloca.\n#define AVOID_64K_ALIASING(idx)                       \\\n    std::size_t offset = (idx+1) * 40503U % (1U<<16);      \\\n    void* volatile sink_for_alloca = _alloca(offset); \\\n    __TBB_ASSERT_EX(sink_for_alloca, \"_alloca failed\");\n#else\n// Linux thread allocators avoid 64K aliasing.\n#define AVOID_64K_ALIASING(idx) tbb::detail::suppress_unused_warning(idx)\n#endif /* _WIN32||_WIN64 */\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n// Forward declaration: throws std::runtime_error with what() returning error_code description prefixed with aux_info\nvoid handle_perror(int error_code, const char* aux_info);\n\nnamespace rml {\nnamespace internal {\n\n#if __TBB_USE_ITT_NOTIFY\nstatic const ::tbb::detail::r1::tchar *SyncType_RML = _T(\"%Constant\");\nstatic const ::tbb::detail::r1::tchar *SyncObj_ThreadMonitor = _T(\"RML Thr Monitor\");\n#endif /* __TBB_USE_ITT_NOTIFY */\n\n//! Monitor with limited two-phase commit form of wait.\n/** At most one thread should wait on an instance at a time. */\nclass thread_monitor {\npublic:\n    thread_monitor() {\n        ITT_SYNC_CREATE(&my_sema, SyncType_RML, SyncObj_ThreadMonitor);\n    }\n    ~thread_monitor() {}\n\n    //! Notify waiting thread\n    /** Can be called by any thread. */\n    void notify();\n\n    //! Wait for notification\n    void wait();\n\n#if __TBB_USE_WINAPI\n    typedef HANDLE handle_type;\n\n    #define __RML_DECL_THREAD_ROUTINE unsigned WINAPI\n    typedef unsigned (WINAPI *thread_routine_type)(void*);\n\n    //! Launch a thread\n    static handle_type launch( thread_routine_type thread_routine, void* arg, std::size_t stack_size, const size_t* worker_index = nullptr );\n\n#elif __TBB_USE_POSIX\n    typedef pthread_t handle_type;\n\n    #define __RML_DECL_THREAD_ROUTINE void*\n    typedef void*(*thread_routine_type)(void*);\n\n    //! Launch a thread\n    static handle_type launch( thread_routine_type thread_routine, void* arg, std::size_t stack_size );\n#endif /* __TBB_USE_POSIX */\n\n    //! Join thread\n    static void join(handle_type handle);\n\n    //! Detach thread\n    static void detach_thread(handle_type handle);\nprivate:\n    // The protection from double notification of the binary semaphore\n    std::atomic<bool> my_notified{ false };\n    binary_semaphore my_sema;\n#if __TBB_USE_POSIX\n    static void check( int error_code, const char* routine );\n#endif\n};\n\n#if __TBB_USE_WINAPI\n\n#ifndef STACK_SIZE_PARAM_IS_A_RESERVATION\n#define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000\n#endif\n\n// _beginthreadex API is not available in Windows 8 Store* applications, so use std::thread instead\n#if __TBB_WIN8UI_SUPPORT && (_WIN32_WINNT < 0x0A00)\ninline thread_monitor::handle_type thread_monitor::launch( thread_routine_type thread_function, void* arg, std::size_t, const std::size_t*) {\n//TODO: check that exception thrown from std::thread is not swallowed silently\n    std::thread* thread_tmp=new std::thread(thread_function, arg);\n    return thread_tmp->native_handle();\n}\n#else\ninline thread_monitor::handle_type thread_monitor::launch( thread_routine_type thread_routine, void* arg, std::size_t stack_size, const std::size_t* worker_index ) {\n    unsigned thread_id;\n    int number_of_processor_groups = ( worker_index ) ? NumberOfProcessorGroups() : 0;\n    unsigned create_flags = ( number_of_processor_groups > 1 ) ? CREATE_SUSPENDED : 0;\n    HANDLE h = (HANDLE)_beginthreadex( nullptr, unsigned(stack_size), thread_routine, arg, STACK_SIZE_PARAM_IS_A_RESERVATION | create_flags, &thread_id );\n    if( !h ) {\n        handle_perror(0, \"thread_monitor::launch: _beginthreadex failed\\n\");\n    }\n    if ( number_of_processor_groups > 1 ) {\n        MoveThreadIntoProcessorGroup( h, FindProcessorGroupIndex( static_cast<int>(*worker_index) ) );\n        ResumeThread( h );\n    }\n    return h;\n}\n#endif //__TBB_WIN8UI_SUPPORT && (_WIN32_WINNT < 0x0A00)\n\nvoid thread_monitor::join(handle_type handle) {\n#if TBB_USE_ASSERT\n    DWORD res =\n#endif\n        WaitForSingleObjectEx(handle, INFINITE, FALSE);\n    __TBB_ASSERT( res==WAIT_OBJECT_0, nullptr);\n#if TBB_USE_ASSERT\n    BOOL val =\n#endif\n        CloseHandle(handle);\n    __TBB_ASSERT( val, nullptr);\n}\n\nvoid thread_monitor::detach_thread(handle_type handle) {\n#if TBB_USE_ASSERT\n    BOOL val =\n#endif\n        CloseHandle(handle);\n    __TBB_ASSERT( val, nullptr);\n}\n\n#endif /* __TBB_USE_WINAPI */\n\n#if __TBB_USE_POSIX\ninline void thread_monitor::check( int error_code, const char* routine ) {\n    if( error_code ) {\n        handle_perror(error_code, routine);\n    }\n}\n\ninline thread_monitor::handle_type thread_monitor::launch( void* (*thread_routine)(void*), void* arg, std::size_t stack_size ) {\n    // FIXME - consider more graceful recovery than just exiting if a thread cannot be launched.\n    // Note that there are some tricky situations to deal with, such that the thread is already\n    // grabbed as part of an OpenMP team.\n    pthread_attr_t s;\n    check(pthread_attr_init( &s ), \"pthread_attr_init has failed\");\n    if( stack_size>0 )\n        check(pthread_attr_setstacksize( &s, stack_size ), \"pthread_attr_setstack_size has failed\" );\n\n    // pthread_create(2) can spuriously fail with EAGAIN. We retry\n    // max_num_tries times with progressively longer wait times.\n    pthread_t handle;\n    const int max_num_tries = 20;\n    int error = EAGAIN;\n\n    for (int i = 0; i < max_num_tries && error == EAGAIN; i++) {\n      if (i != 0) {\n        // Wait i milliseconds\n        struct timespec ts = {0, i * 1000 * 1000};\n        nanosleep(&ts, NULL);\n      }\n      error = pthread_create(&handle, &s, thread_routine, arg);\n    }\n\n    if (error)\n      handle_perror(error, \"pthread_create has failed\");\n\n    check( pthread_attr_destroy( &s ), \"pthread_attr_destroy has failed\" );\n    return handle;\n}\n\nvoid thread_monitor::join(handle_type handle) {\n    check(pthread_join(handle, nullptr), \"pthread_join has failed\");\n}\n\nvoid thread_monitor::detach_thread(handle_type handle) {\n    check(pthread_detach(handle), \"pthread_detach has failed\");\n}\n#endif /* __TBB_USE_POSIX */\n\ninline void thread_monitor::notify() {\n    // Check that the semaphore is not notified twice\n    if (!my_notified.exchange(true, std::memory_order_release)) {\n        my_sema.V();\n    }\n}\n\ninline void thread_monitor::wait() {\n    my_sema.P();\n    // memory_order_seq_cst is required here to be ordered with\n    // further load checking shutdown state\n    my_notified.store(false, std::memory_order_seq_cst);\n}\n\n} // namespace internal\n} // namespace rml\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /* __RML_thread_monitor_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/rtm_mutex.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/detail/_assert.h\"\n#include \"oneapi/tbb/detail/_rtm_mutex.h\"\n#include \"itt_notify.h\"\n#include \"governor.h\"\n#include \"misc.h\"\n\n#include <atomic>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n\nstruct rtm_mutex_impl {\n    // maximum number of times to retry\n    // TODO: experiment on retry values.\n    static constexpr int retry_threshold = 10;\n    using transaction_result_type = decltype(begin_transaction());\n\n    //! Release speculative mutex\n    static void release(d1::rtm_mutex::scoped_lock& s) {\n        switch(s.m_transaction_state) {\n        case d1::rtm_mutex::rtm_state::rtm_transacting:\n            __TBB_ASSERT(is_in_transaction(), \"m_transaction_state && not speculating\");\n            end_transaction();\n            s.m_mutex = nullptr;\n            break;\n        case d1::rtm_mutex::rtm_state::rtm_real:\n            s.m_mutex->unlock();\n            s.m_mutex = nullptr;\n            break;\n        case d1::rtm_mutex::rtm_state::rtm_none:\n            __TBB_ASSERT(false, \"mutex is not locked, but in release\");\n            break;\n        default:\n            __TBB_ASSERT(false, \"invalid m_transaction_state\");\n        }\n        s.m_transaction_state = d1::rtm_mutex::rtm_state::rtm_none;\n    }\n\n    //! Acquire lock on the given mutex.\n    static void acquire(d1::rtm_mutex& m, d1::rtm_mutex::scoped_lock& s, bool only_speculate) {\n        __TBB_ASSERT(s.m_transaction_state == d1::rtm_mutex::rtm_state::rtm_none, \"scoped_lock already in transaction\");\n        if(governor::speculation_enabled()) {\n            int num_retries = 0;\n            transaction_result_type abort_code = 0;\n            do {\n                if(m.m_flag.load(std::memory_order_acquire)) {\n                    if(only_speculate) return;\n                    spin_wait_while_eq(m.m_flag, true);\n                }\n                // _xbegin returns -1 on success or the abort code, so capture it\n                if((abort_code = begin_transaction()) == transaction_result_type(speculation_successful_begin))\n                {\n                    // started speculation\n                    if(m.m_flag.load(std::memory_order_relaxed)) {\n                        abort_transaction();\n                    }\n                    s.m_transaction_state = d1::rtm_mutex::rtm_state::rtm_transacting;\n                    // Don not wrap the following assignment to a function,\n                    // because it can abort the transaction in debug. Need mutex for release().\n                    s.m_mutex = &m;\n                    return;  // successfully started speculation\n                }\n                ++num_retries;\n            } while((abort_code & speculation_retry) != 0 && (num_retries < retry_threshold));\n        }\n\n        if(only_speculate) return;\n        s.m_mutex = &m;\n        s.m_mutex->lock();\n        s.m_transaction_state = d1::rtm_mutex::rtm_state::rtm_real;\n    }\n\n    //! Try to acquire lock on the given mutex.\n    static bool try_acquire(d1::rtm_mutex& m, d1::rtm_mutex::scoped_lock& s) {\n        acquire(m, s, /*only_speculate=*/true);\n        if (s.m_transaction_state == d1::rtm_mutex::rtm_state::rtm_transacting) {\n            return true;\n        }\n        __TBB_ASSERT(s.m_transaction_state == d1::rtm_mutex::rtm_state::rtm_none, nullptr);\n        // transacting acquire failed. try_lock the real mutex\n        if (m.try_lock()) {\n            s.m_mutex = &m;\n            s.m_transaction_state = d1::rtm_mutex::rtm_state::rtm_real;\n            return true;\n        }\n        return false;\n    }\n};\n\nvoid __TBB_EXPORTED_FUNC acquire(d1::rtm_mutex& m, d1::rtm_mutex::scoped_lock& s, bool only_speculate) {\n    rtm_mutex_impl::acquire(m, s, only_speculate);\n}\nbool __TBB_EXPORTED_FUNC try_acquire(d1::rtm_mutex& m, d1::rtm_mutex::scoped_lock& s) {\n    return rtm_mutex_impl::try_acquire(m, s);\n}\nvoid __TBB_EXPORTED_FUNC release(d1::rtm_mutex::scoped_lock& s) {\n    rtm_mutex_impl::release(s);\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n"
  },
  {
    "path": "third-party/tbb/src/tbb/rtm_rw_mutex.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/detail/_assert.h\"\n#include \"oneapi/tbb/detail/_rtm_rw_mutex.h\"\n#include \"itt_notify.h\"\n#include \"governor.h\"\n#include \"misc.h\"\n\n#include <atomic>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nstruct rtm_rw_mutex_impl {\n    // maximum number of times to retry\n    // TODO: experiment on retry values.\n    static constexpr int retry_threshold_read = 10;\n    static constexpr int retry_threshold_write = 10;\n    using transaction_result_type = decltype(begin_transaction());\n\n    //! Release speculative mutex\n    static void release(d1::rtm_rw_mutex::scoped_lock& s) {\n        switch(s.m_transaction_state) {\n        case d1::rtm_rw_mutex::rtm_type::rtm_transacting_writer:\n        case d1::rtm_rw_mutex::rtm_type::rtm_transacting_reader:\n            __TBB_ASSERT(is_in_transaction(), \"m_transaction_state && not speculating\");\n            end_transaction();\n            s.m_mutex = nullptr;\n            break;\n        case d1::rtm_rw_mutex::rtm_type::rtm_real_reader:\n            __TBB_ASSERT(!s.m_mutex->write_flag.load(std::memory_order_relaxed), \"write_flag set but read lock acquired\");\n            s.m_mutex->unlock_shared();\n            s.m_mutex = nullptr;\n            break;\n        case d1::rtm_rw_mutex::rtm_type::rtm_real_writer:\n            __TBB_ASSERT(s.m_mutex->write_flag.load(std::memory_order_relaxed), \"write_flag unset but write lock acquired\");\n            s.m_mutex->write_flag.store(false, std::memory_order_relaxed);\n            s.m_mutex->unlock();\n            s.m_mutex = nullptr;\n            break;\n        case d1::rtm_rw_mutex::rtm_type::rtm_not_in_mutex:\n            __TBB_ASSERT(false, \"rtm_not_in_mutex, but in release\");\n            break;\n        default:\n            __TBB_ASSERT(false, \"invalid m_transaction_state\");\n        }\n        s.m_transaction_state = d1::rtm_rw_mutex::rtm_type::rtm_not_in_mutex;\n    }\n\n    //! Acquire write lock on the given mutex.\n    static void acquire_writer(d1::rtm_rw_mutex& m, d1::rtm_rw_mutex::scoped_lock& s, bool only_speculate) {\n        __TBB_ASSERT(s.m_transaction_state == d1::rtm_rw_mutex::rtm_type::rtm_not_in_mutex, \"scoped_lock already in transaction\");\n        if(governor::speculation_enabled()) {\n            int num_retries = 0;\n            transaction_result_type abort_code = 0;\n            do {\n                if(m.m_state.load(std::memory_order_acquire)) {\n                    if(only_speculate) return;\n                    spin_wait_until_eq(m.m_state, d1::rtm_rw_mutex::state_type(0));\n                }\n                // _xbegin returns -1 on success or the abort code, so capture it\n                if((abort_code = begin_transaction()) == transaction_result_type(speculation_successful_begin))\n                {\n                    // started speculation\n                    if(m.m_state.load(std::memory_order_relaxed)) {  // add spin_rw_mutex to read-set.\n                        // reader or writer grabbed the lock, so abort.\n                        abort_transaction();\n                    }\n                    s.m_transaction_state = d1::rtm_rw_mutex::rtm_type::rtm_transacting_writer;\n                    // Don not wrap the following assignment to a function,\n                    // because it can abort the transaction in debug. Need mutex for release().\n                    s.m_mutex = &m;\n                    return;  // successfully started speculation\n                }\n                ++num_retries;\n            } while((abort_code & speculation_retry) != 0 && (num_retries < retry_threshold_write));\n        }\n\n        if(only_speculate) return;\n        s.m_mutex = &m;                                                          // should apply a real try_lock...\n        s.m_mutex->lock();                                                       // kill transactional writers\n        __TBB_ASSERT(!m.write_flag.load(std::memory_order_relaxed), \"After acquire for write, write_flag already true\");\n        m.write_flag.store(true, std::memory_order_relaxed);                       // kill transactional readers\n        s.m_transaction_state = d1::rtm_rw_mutex::rtm_type::rtm_real_writer;\n    }\n\n    //! Acquire read lock on given mutex.\n    //  only_speculate : true if we are doing a try_acquire.  If true and we fail to speculate, don't\n    //     really acquire the lock, return and do a try_acquire on the contained spin_rw_mutex.  If\n    //     the lock is already held by a writer, just return.\n    static void acquire_reader(d1::rtm_rw_mutex& m, d1::rtm_rw_mutex::scoped_lock& s, bool only_speculate) {\n        __TBB_ASSERT(s.m_transaction_state == d1::rtm_rw_mutex::rtm_type::rtm_not_in_mutex, \"scoped_lock already in transaction\");\n        if(governor::speculation_enabled()) {\n            int num_retries = 0;\n            transaction_result_type abort_code = 0;\n            do {\n                // if in try_acquire, and lock is held as writer, don't attempt to speculate.\n                if(m.write_flag.load(std::memory_order_acquire)) {\n                    if(only_speculate) return;\n                    spin_wait_while_eq(m.write_flag, true);\n                }\n                // _xbegin returns -1 on success or the abort code, so capture it\n                if((abort_code = begin_transaction()) == transaction_result_type(speculation_successful_begin))\n                {\n                    // started speculation\n                    if(m.write_flag.load(std::memory_order_relaxed)) {  // add write_flag to read-set.\n                        abort_transaction();  // writer grabbed the lock, so abort.\n                    }\n                    s.m_transaction_state = d1::rtm_rw_mutex::rtm_type::rtm_transacting_reader;\n                    // Don not wrap the following assignment to a function,\n                    // because it can abort the transaction in debug. Need mutex for release().\n                    s.m_mutex = &m;\n                    return;  // successfully started speculation\n                }\n                // fallback path\n                // retry only if there is any hope of getting into a transaction soon\n                // Retry in the following cases (from Section 8.3.5 of\n                // Intel(R) Architecture Instruction Set Extensions Programming Reference):\n                // 1. abort caused by XABORT instruction (bit 0 of EAX register is set)\n                // 2. the transaction may succeed on a retry (bit 1 of EAX register is set)\n                // 3. if another logical processor conflicted with a memory address\n                //    that was part of the transaction that aborted (bit 2 of EAX register is set)\n                // That is, retry if (abort_code & 0x7) is non-zero\n                ++num_retries;\n            } while((abort_code & speculation_retry) != 0 && (num_retries < retry_threshold_read));\n        }\n\n        if(only_speculate) return;\n        s.m_mutex = &m;\n        s.m_mutex->lock_shared();\n        s.m_transaction_state = d1::rtm_rw_mutex::rtm_type::rtm_real_reader;\n    }\n\n    //! Upgrade reader to become a writer.\n    /** Returns whether the upgrade happened without releasing and re-acquiring the lock */\n    static bool upgrade(d1::rtm_rw_mutex::scoped_lock& s) {\n        switch(s.m_transaction_state) {\n        case d1::rtm_rw_mutex::rtm_type::rtm_real_reader: {\n            s.m_transaction_state = d1::rtm_rw_mutex::rtm_type::rtm_real_writer;\n            bool no_release = s.m_mutex->upgrade();\n            __TBB_ASSERT(!s.m_mutex->write_flag.load(std::memory_order_relaxed), \"After upgrade, write_flag already true\");\n            s.m_mutex->write_flag.store(true, std::memory_order_relaxed);\n            return no_release;\n        }\n        case d1::rtm_rw_mutex::rtm_type::rtm_transacting_reader: {\n            d1::rtm_rw_mutex& m = *s.m_mutex;\n            if(m.m_state.load(std::memory_order_acquire)) {  // add spin_rw_mutex to read-set.\n                // Real reader or writer holds the lock; so commit the read and re-acquire for write.\n                release(s);\n                acquire_writer(m, s, false);\n                return false;\n            } else\n            {\n                s.m_transaction_state = d1::rtm_rw_mutex::rtm_type::rtm_transacting_writer;\n                return true;\n            }\n        }\n        default:\n            __TBB_ASSERT(false, \"Invalid state for upgrade\");\n            return false;\n        }\n    }\n\n    //! Downgrade writer to a reader.\n    static bool downgrade(d1::rtm_rw_mutex::scoped_lock& s) {\n        switch (s.m_transaction_state) {\n        case d1::rtm_rw_mutex::rtm_type::rtm_real_writer:\n            s.m_transaction_state = d1::rtm_rw_mutex::rtm_type::rtm_real_reader;\n            __TBB_ASSERT(s.m_mutex->write_flag.load(std::memory_order_relaxed), \"Before downgrade write_flag not true\");\n            s.m_mutex->write_flag.store(false, std::memory_order_relaxed);\n            s.m_mutex->downgrade();\n            return true;\n        case d1::rtm_rw_mutex::rtm_type::rtm_transacting_writer:\n            s.m_transaction_state = d1::rtm_rw_mutex::rtm_type::rtm_transacting_reader;\n            return true;\n        default:\n            __TBB_ASSERT(false, \"Invalid state for downgrade\");\n            return false;\n        }\n    }\n\n    //! Try to acquire write lock on the given mutex.\n    //  There may be reader(s) which acquired the spin_rw_mutex, as well as possibly\n    //  transactional reader(s).  If this is the case, the acquire will fail, and assigning\n    //  write_flag will kill the transactors.  So we only assign write_flag if we have successfully\n    //  acquired the lock.\n    static bool try_acquire_writer(d1::rtm_rw_mutex& m, d1::rtm_rw_mutex::scoped_lock& s) {\n        acquire_writer(m, s, /*only_speculate=*/true);\n        if (s.m_transaction_state == d1::rtm_rw_mutex::rtm_type::rtm_transacting_writer) {\n            return true;\n        }\n        __TBB_ASSERT(s.m_transaction_state == d1::rtm_rw_mutex::rtm_type::rtm_not_in_mutex, nullptr);\n        // transacting write acquire failed. try_lock the real mutex\n        if (m.try_lock()) {\n            s.m_mutex = &m;\n            // only shoot down readers if we're not transacting ourselves\n            __TBB_ASSERT(!m.write_flag.load(std::memory_order_relaxed), \"After try_acquire_writer, write_flag already true\");\n            m.write_flag.store(true, std::memory_order_relaxed);\n            s.m_transaction_state = d1::rtm_rw_mutex::rtm_type::rtm_real_writer;\n            return true;\n        }\n        return false;\n    }\n\n    //! Try to acquire read lock on the given mutex.\n    static bool try_acquire_reader(d1::rtm_rw_mutex& m, d1::rtm_rw_mutex::scoped_lock& s) {\n        // speculatively acquire the lock. If this fails, do try_lock_shared on the spin_rw_mutex.\n        acquire_reader(m, s, /*only_speculate=*/true);\n        if (s.m_transaction_state == d1::rtm_rw_mutex::rtm_type::rtm_transacting_reader) {\n            return true;\n        }\n        __TBB_ASSERT(s.m_transaction_state == d1::rtm_rw_mutex::rtm_type::rtm_not_in_mutex, nullptr);\n        // transacting read acquire failed. try_lock_shared the real mutex\n        if (m.try_lock_shared()) {\n            s.m_mutex = &m;\n            s.m_transaction_state = d1::rtm_rw_mutex::rtm_type::rtm_real_reader;\n            return true;\n        }\n        return false;\n    }\n};\n\nvoid __TBB_EXPORTED_FUNC acquire_writer(d1::rtm_rw_mutex& m, d1::rtm_rw_mutex::scoped_lock& s, bool only_speculate) {\n    rtm_rw_mutex_impl::acquire_writer(m, s, only_speculate);\n}\n//! Internal acquire read lock.\n// only_speculate == true if we're doing a try_lock, else false.\nvoid __TBB_EXPORTED_FUNC acquire_reader(d1::rtm_rw_mutex& m, d1::rtm_rw_mutex::scoped_lock& s, bool only_speculate) {\n    rtm_rw_mutex_impl::acquire_reader(m, s, only_speculate);\n}\n//! Internal upgrade reader to become a writer.\nbool __TBB_EXPORTED_FUNC upgrade(d1::rtm_rw_mutex::scoped_lock& s) {\n    return rtm_rw_mutex_impl::upgrade(s);\n}\n//! Internal downgrade writer to become a reader.\nbool __TBB_EXPORTED_FUNC downgrade(d1::rtm_rw_mutex::scoped_lock& s) {\n    return rtm_rw_mutex_impl::downgrade(s);\n}\n//! Internal try_acquire write lock.\nbool __TBB_EXPORTED_FUNC try_acquire_writer(d1::rtm_rw_mutex& m, d1::rtm_rw_mutex::scoped_lock& s) {\n    return rtm_rw_mutex_impl::try_acquire_writer(m, s);\n}\n//! Internal try_acquire read lock.\nbool __TBB_EXPORTED_FUNC try_acquire_reader(d1::rtm_rw_mutex& m, d1::rtm_rw_mutex::scoped_lock& s) {\n    return rtm_rw_mutex_impl::try_acquire_reader(m, s);\n}\n//! Internal release lock.\nvoid __TBB_EXPORTED_FUNC release(d1::rtm_rw_mutex::scoped_lock& s) {\n    rtm_rw_mutex_impl::release(s);\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n\n"
  },
  {
    "path": "third-party/tbb/src/tbb/scheduler_common.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_scheduler_common_H\n#define _TBB_scheduler_common_H\n\n#include \"oneapi/tbb/detail/_utils.h\"\n#include \"oneapi/tbb/detail/_template_helpers.h\"\n#include \"oneapi/tbb/detail/_task.h\"\n#include \"oneapi/tbb/detail/_machine.h\"\n#include \"oneapi/tbb/task_group.h\"\n#include \"oneapi/tbb/cache_aligned_allocator.h\"\n#include \"oneapi/tbb/tbb_allocator.h\"\n#include \"itt_notify.h\"\n#include \"co_context.h\"\n#include \"misc.h\"\n#include \"governor.h\"\n\n#ifndef __TBB_SCHEDULER_MUTEX_TYPE\n#define __TBB_SCHEDULER_MUTEX_TYPE tbb::spin_mutex\n#endif\n// TODO: add conditional inclusion based on specified type\n#include \"oneapi/tbb/spin_mutex.h\"\n#include \"oneapi/tbb/mutex.h\"\n\n#if TBB_USE_ASSERT\n#include <atomic>\n#endif\n\n#include <cstdint>\n#include <exception>\n#include <memory> // unique_ptr\n#include <unordered_map>\n\n//! Mutex type for global locks in the scheduler\nusing scheduler_mutex_type = __TBB_SCHEDULER_MUTEX_TYPE;\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    // Workaround for overzealous compiler warnings\n    // These particular warnings are so ubiquitous that no attempt is made to narrow\n    // the scope of the warnings.\n    #pragma warning (disable: 4100 4127 4312 4244 4267 4706)\n#endif\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nclass arena;\nclass mail_inbox;\nclass mail_outbox;\nclass market;\nclass observer_proxy;\n\nenum task_stream_accessor_type { front_accessor = 0, back_nonnull_accessor };\ntemplate<task_stream_accessor_type> class task_stream;\n\nusing isolation_type = std::intptr_t;\nconstexpr isolation_type no_isolation = 0;\n\nstruct cache_aligned_deleter {\n    template <typename T>\n    void operator() (T* ptr) const {\n        ptr->~T();\n        cache_aligned_deallocate(ptr);\n    }\n};\n\ntemplate <typename T>\nusing cache_aligned_unique_ptr = std::unique_ptr<T, cache_aligned_deleter>;\n\ntemplate <typename T, typename ...Args>\ncache_aligned_unique_ptr<T> make_cache_aligned_unique(Args&& ...args) {\n    return cache_aligned_unique_ptr<T>(new (cache_aligned_allocate(sizeof(T))) T(std::forward<Args>(args)...));\n}\n\n//------------------------------------------------------------------------\n// Extended execute data\n//------------------------------------------------------------------------\n\n//! Execute data used on a task dispatcher side, reflects a current execution state\nstruct execution_data_ext : d1::execution_data {\n    task_dispatcher* task_disp{};\n    isolation_type isolation{};\n    d1::wait_context* wait_ctx{};\n};\n\n//------------------------------------------------------------------------\n// Task accessor\n//------------------------------------------------------------------------\n\n//! Interpretation of reserved task fields inside a task dispatcher\nstruct task_accessor {\n    static constexpr std::uint64_t proxy_task_trait = 1;\n    static constexpr std::uint64_t resume_task_trait = 2;\n    static d1::task_group_context*& context(d1::task& t) {\n        task_group_context** tgc = reinterpret_cast<task_group_context**>(&t.m_reserved[0]);\n        return *tgc;\n    }\n    static isolation_type& isolation(d1::task& t) {\n        isolation_type* tag = reinterpret_cast<isolation_type*>(&t.m_reserved[2]);\n        return *tag;\n    }\n    static void set_proxy_trait(d1::task& t) {\n        // TODO: refactor proxy tasks not to work on uninitialized memory.\n        //__TBB_ASSERT((t.m_version_and_traits & proxy_task_trait) == 0, nullptr);\n        t.m_version_and_traits |= proxy_task_trait;\n    }\n    static bool is_proxy_task(d1::task& t) {\n        return (t.m_version_and_traits & proxy_task_trait) != 0;\n    }\n    static void set_resume_trait(d1::task& t) {\n        __TBB_ASSERT((t.m_version_and_traits & resume_task_trait) == 0, nullptr);\n        t.m_version_and_traits |= resume_task_trait;\n    }\n    static bool is_resume_task(d1::task& t) {\n        return (t.m_version_and_traits & resume_task_trait) != 0;\n    }\n};\n\n//------------------------------------------------------------------------\n//! Extended variant of the standard offsetof macro\n/** The standard offsetof macro is not sufficient for TBB as it can be used for\n    POD-types only. The constant 0x1000 (not nullptr) is necessary to appease GCC. **/\n#define __TBB_offsetof(class_name, member_name) \\\n    ((ptrdiff_t)&(reinterpret_cast<class_name*>(0x1000)->member_name) - 0x1000)\n\n//! Returns address of the object containing a member with the given name and address\n#define __TBB_get_object_ref(class_name, member_name, member_addr) \\\n    (*reinterpret_cast<class_name*>((char*)member_addr - __TBB_offsetof(class_name, member_name)))\n\n//! Helper class for tracking floating point context and task group context switches\n/** Assuming presence of an itt collector, in addition to keeping track of floating\n    point context, this class emits itt events to indicate begin and end of task group\n    context execution **/\ntemplate <bool report_tasks>\nclass context_guard_helper {\n    const d1::task_group_context* curr_ctx;\n    d1::cpu_ctl_env guard_cpu_ctl_env;\n    d1::cpu_ctl_env curr_cpu_ctl_env;\npublic:\n    context_guard_helper() : curr_ctx(nullptr) {\n        guard_cpu_ctl_env.get_env();\n        curr_cpu_ctl_env = guard_cpu_ctl_env;\n    }\n    ~context_guard_helper() {\n        if (curr_cpu_ctl_env != guard_cpu_ctl_env)\n            guard_cpu_ctl_env.set_env();\n        if (report_tasks && curr_ctx)\n            ITT_TASK_END;\n    }\n    // The function is called from bypass dispatch loop on the hot path.\n    // Consider performance issues when refactoring.\n    void set_ctx(const d1::task_group_context* ctx) {\n        if (!ctx)\n            return;\n        const d1::cpu_ctl_env* ctl = reinterpret_cast<const d1::cpu_ctl_env*>(&ctx->my_cpu_ctl_env);\n        // Compare the FPU settings directly because the context can be reused between parallel algorithms.\n        if (*ctl != curr_cpu_ctl_env) {\n            curr_cpu_ctl_env = *ctl;\n            curr_cpu_ctl_env.set_env();\n        }\n        if (report_tasks && ctx != curr_ctx) {\n            // if task group context was active, report end of current execution frame.\n            if (curr_ctx)\n                ITT_TASK_END;\n            // reporting begin of new task group context execution frame.\n            // using address of task group context object to group tasks (parent).\n            // id of task execution frame is nullptr and reserved for future use.\n            ITT_TASK_BEGIN(ctx, ctx->my_name, nullptr);\n            curr_ctx = ctx;\n        }\n    }\n#if _WIN64\n    void restore_default() {\n        if (curr_cpu_ctl_env != guard_cpu_ctl_env) {\n            guard_cpu_ctl_env.set_env();\n            curr_cpu_ctl_env = guard_cpu_ctl_env;\n        }\n    }\n#endif // _WIN64\n};\n\n#if (_WIN32 || _WIN64 || __unix__ || __APPLE__) && (__TBB_x86_32 || __TBB_x86_64)\n#if _MSC_VER\n#pragma intrinsic(__rdtsc)\n#endif\ninline std::uint64_t machine_time_stamp() {\n#if __INTEL_COMPILER\n    return _rdtsc();\n#elif _MSC_VER\n    return __rdtsc();\n#else\n    std::uint32_t hi, lo;\n    __asm__ __volatile__(\"rdtsc\" : \"=d\"(hi), \"=a\"(lo));\n    return (std::uint64_t(hi) << 32) | lo;\n#endif\n}\n\ninline void prolonged_pause_impl() {\n    // Assumption based on practice: 1000-2000 ticks seems to be a suitable invariant for the\n    // majority of platforms. Currently, skip platforms that define __TBB_STEALING_PAUSE\n    // because these platforms require very careful tuning.\n    std::uint64_t prev = machine_time_stamp();\n    const std::uint64_t finish = prev + 1000;\n    atomic_backoff backoff;\n    do {\n        backoff.bounded_pause();\n        std::uint64_t curr = machine_time_stamp();\n        if (curr <= prev)\n            // Possibly, the current logical thread is moved to another hardware thread or overflow is occurred.\n            break;\n        prev = curr;\n    } while (prev < finish);\n}\n#else\ninline void prolonged_pause_impl() {\n#ifdef __TBB_ipf\n    static const long PauseTime = 1500;\n#else\n    static const long PauseTime = 80;\n#endif\n    // TODO IDEA: Update PauseTime adaptively?\n    machine_pause(PauseTime);\n}\n#endif\n\ninline void prolonged_pause() {\n#if __TBB_WAITPKG_INTRINSICS_PRESENT\n    if (governor::wait_package_enabled()) {\n        std::uint64_t time_stamp = machine_time_stamp();\n        // _tpause function directs the processor to enter an implementation-dependent optimized state\n        // until the Time Stamp Counter reaches or exceeds the value specified in second parameter.\n        // Constant \"1000\" is ticks to wait for.\n        // TODO : Modify this parameter based on empirical study of benchmarks.\n        // First parameter 0 selects between a lower power (cleared) or faster wakeup (set) optimized state.\n        _tpause(0, time_stamp + 1000);\n    }\n    else\n#endif\n    prolonged_pause_impl();\n}\n\n// TODO: investigate possibility to work with number of CPU cycles\n// because for different configurations this number of pauses + yields\n// will be calculated in different amount of CPU cycles\n// for example use rdtsc for it\nclass stealing_loop_backoff {\n    const int my_pause_threshold;\n    const int my_yield_threshold;\n    int my_pause_count;\n    int my_yield_count;\npublic:\n    // my_yield_threshold = 100 is an experimental value. Ideally, once we start calling __TBB_Yield(),\n    // the time spent spinning before calling out_of_work() should be approximately\n    // the time it takes for a thread to be woken up. Doing so would guarantee that we do\n    // no worse than 2x the optimal spin time. Or perhaps a time-slice quantum is the right amount.\n    stealing_loop_backoff(int num_workers, int yields_multiplier)\n        : my_pause_threshold{ 2 * (num_workers + 1) }\n        , my_yield_threshold{100 * yields_multiplier}\n        , my_pause_count{}\n        , my_yield_count{}\n    {}\n    bool pause() {\n        prolonged_pause();\n        if (my_pause_count++ >= my_pause_threshold) {\n            my_pause_count = my_pause_threshold;\n            d0::yield();\n            if (my_yield_count++ >= my_yield_threshold) {\n                my_yield_count = my_yield_threshold;\n                return true;\n            }\n        }\n        return false;\n    }\n    void reset_wait() {\n        my_pause_count = my_yield_count = 0;\n    }\n};\n\n//------------------------------------------------------------------------\n// Exception support\n//------------------------------------------------------------------------\n//! Task group state change propagation global epoch\n/** Together with generic_scheduler::my_context_state_propagation_epoch forms\n    cross-thread signaling mechanism that allows to avoid locking at the hot path\n    of normal execution flow.\n\n    When a descendant task group context is registered or unregistered, the global\n    and local epochs are compared. If they differ, a state change is being propagated,\n    and thus registration/deregistration routines take slower branch that may block\n    (at most one thread of the pool can be blocked at any moment). Otherwise the\n    control path is lock-free and fast. **/\nextern std::atomic<std::uintptr_t> the_context_state_propagation_epoch;\n\n//! Mutex guarding state change propagation across task groups forest.\n/** Also protects modification of related data structures. **/\ntypedef scheduler_mutex_type context_state_propagation_mutex_type;\nextern context_state_propagation_mutex_type the_context_state_propagation_mutex;\n\nclass tbb_exception_ptr {\n    std::exception_ptr my_ptr;\npublic:\n    static tbb_exception_ptr* allocate() noexcept;\n\n    //! Destroys this objects\n    /** Note that objects of this type can be created only by the allocate() method. **/\n    void destroy() noexcept;\n\n    //! Throws the contained exception .\n    void throw_self();\n\nprivate:\n    tbb_exception_ptr(const std::exception_ptr& src) : my_ptr(src) {}\n}; // class tbb_exception_ptr\n\n//------------------------------------------------------------------------\n// Debugging support\n//------------------------------------------------------------------------\n\n#if TBB_USE_ASSERT\nstatic const std::uintptr_t venom = tbb::detail::select_size_t_constant<0xDEADBEEFU, 0xDDEEAADDDEADBEEFULL>::value;\n\ninline void poison_value(std::uintptr_t& val) { val = venom; }\n\ninline void poison_value(std::atomic<std::uintptr_t>& val) { val.store(venom, std::memory_order_relaxed); }\n\n/** Expected to be used in assertions only, thus no empty form is defined. **/\ninline bool is_alive(std::uintptr_t v) { return v != venom; }\n\n/** Logically, this method should be a member of class task.\n    But we do not want to publish it, so it is here instead. */\ninline void assert_task_valid(const d1::task* t) {\n    assert_pointer_valid(t);\n}\n#else /* !TBB_USE_ASSERT */\n\n/** In contrast to debug version poison_value() is a macro here because\n    the variable used as its argument may be undefined in release builds. **/\n#define poison_value(g) ((void)0)\n\ninline void assert_task_valid(const d1::task*) {}\n\n#endif /* !TBB_USE_ASSERT */\n\nstruct suspend_point_type {\n#if __TBB_RESUMABLE_TASKS\n    //! The arena related to this task_dispatcher\n    arena* m_arena{ nullptr };\n    //! The random for the resume task\n    FastRandom m_random;\n    //! The flag is raised when the original owner should return to this task dispatcher.\n    std::atomic<bool> m_is_owner_recalled{ false };\n    //! Inicates if the resume task should be placed to the critical task stream.\n    bool m_is_critical{ false };\n    //! Associated coroutine\n    co_context m_co_context;\n    //! Supend point before resume\n    suspend_point_type* m_prev_suspend_point{nullptr};\n\n    // Possible state transitions:\n    // A -> S -> N -> A\n    // A -> N -> S -> N -> A\n    enum class stack_state {\n        active, // some thread is working with this stack\n        suspended, // no thread is working with this stack\n        notified // some thread tried to resume this stack\n    };\n\n    //! The flag required to protect suspend finish and resume call\n    std::atomic<stack_state> m_stack_state{stack_state::active};\n\n    void resume(suspend_point_type* sp) {\n        __TBB_ASSERT(m_stack_state.load(std::memory_order_relaxed) != stack_state::suspended, \"The stack is expected to be active\");\n\n        sp->m_prev_suspend_point = this;\n\n        // Do not access sp after resume\n        m_co_context.resume(sp->m_co_context);\n        __TBB_ASSERT(m_stack_state.load(std::memory_order_relaxed) != stack_state::active, nullptr);\n\n        finilize_resume();\n    }\n\n    void finilize_resume() {\n        m_stack_state.store(stack_state::active, std::memory_order_relaxed);\n        // Set the suspended state for the stack that we left. If the state is already notified, it means that\n        // someone already tried to resume our previous stack but failed. So, we need to resume it.\n        // m_prev_suspend_point might be nullptr when destroying co_context based on threads\n        if (m_prev_suspend_point && m_prev_suspend_point->m_stack_state.exchange(stack_state::suspended) == stack_state::notified) {\n            r1::resume(m_prev_suspend_point);\n        }\n        m_prev_suspend_point = nullptr;\n    }\n\n    bool try_notify_resume() {\n        // Check that stack is already suspended. Return false if not yet.\n        return m_stack_state.exchange(stack_state::notified) == stack_state::suspended;\n    }\n\n    void recall_owner() {\n        __TBB_ASSERT(m_stack_state.load(std::memory_order_relaxed) == stack_state::suspended, nullptr);\n        m_stack_state.store(stack_state::notified, std::memory_order_relaxed);\n        m_is_owner_recalled.store(true, std::memory_order_release);\n    }\n\n    struct resume_task final : public d1::task {\n        task_dispatcher& m_target;\n        explicit resume_task(task_dispatcher& target) : m_target(target) {\n            task_accessor::set_resume_trait(*this);\n        }\n        d1::task* execute(d1::execution_data& ed) override;\n        d1::task* cancel(d1::execution_data&) override {\n            __TBB_ASSERT(false, \"The resume task cannot be canceled\");\n            return nullptr;\n        }\n    } m_resume_task;\n\n    suspend_point_type(arena* a, std::size_t stack_size, task_dispatcher& target);\n#endif /*__TBB_RESUMABLE_TASKS */\n};\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n// structure was padded due to alignment specifier\n#pragma warning( push )\n#pragma warning( disable: 4324 )\n#endif\n\nclass alignas (max_nfs_size) task_dispatcher {\npublic:\n    // TODO: reconsider low level design to better organize dependencies and files.\n    friend class thread_data;\n    friend class arena_slot;\n    friend class nested_arena_context;\n    friend class delegated_task;\n    friend struct base_waiter;\n\n    //! The list of possible post resume actions.\n    enum class post_resume_action {\n        invalid,\n        register_waiter,\n        cleanup,\n        notify,\n        none\n    };\n\n    //! The data of the current thread attached to this task_dispatcher\n    thread_data* m_thread_data{ nullptr };\n\n    //! The current execution data\n    execution_data_ext m_execute_data_ext;\n\n    //! Properties\n    struct properties {\n        bool outermost{ true };\n        bool fifo_tasks_allowed{ true };\n        bool critical_task_allowed{ true };\n    } m_properties;\n\n    //! Position in the call stack when stealing is still allowed.\n    std::uintptr_t m_stealing_threshold{};\n\n    //! Suspend point (null if this task dispatcher has been never suspended)\n    suspend_point_type* m_suspend_point{ nullptr };\n\n    //! Used to improve scalability of d1::wait_context by using per thread reference_counter\n    std::unordered_map<d1::wait_tree_vertex_interface*, d1::reference_vertex*,\n                       std::hash<d1::wait_tree_vertex_interface*>, std::equal_to<d1::wait_tree_vertex_interface*>,\n                       tbb_allocator<std::pair<d1::wait_tree_vertex_interface* const, d1::reference_vertex*>>\n                      >\n        m_reference_vertex_map;\n\n    //! Attempt to get a task from the mailbox.\n    /** Gets a task only if it has not been executed by its sender or a thief\n        that has stolen it from the sender's task pool. Otherwise returns nullptr.\n        This method is intended to be used only by the thread extracting the proxy\n        from its mailbox. (In contrast to local task pool, mailbox can be read only\n        by its owner). **/\n    d1::task* get_mailbox_task(mail_inbox& my_inbox, execution_data_ext& ed, isolation_type isolation);\n\n    d1::task* get_critical_task(d1::task*, execution_data_ext&, isolation_type, bool);\n\n    template <bool ITTPossible, typename Waiter>\n    d1::task* receive_or_steal_task(thread_data& tls, execution_data_ext& ed, Waiter& waiter,\n                                isolation_type isolation, bool outermost, bool criticality_absence);\n\n    template <bool ITTPossible, typename Waiter>\n    d1::task* local_wait_for_all(d1::task * t, Waiter& waiter);\n\n    task_dispatcher(const task_dispatcher&) = delete;\n\n    bool can_steal();\npublic:\n    task_dispatcher(arena* a);\n\n    ~task_dispatcher() {\n        if (m_suspend_point) {\n            m_suspend_point->~suspend_point_type();\n            cache_aligned_deallocate(m_suspend_point);\n        }\n\n        for (auto& elem : m_reference_vertex_map) {\n            d1::reference_vertex*& node = elem.second;\n            node->~reference_vertex();\n            cache_aligned_deallocate(node);\n            poison_pointer(node);\n        }\n\n        poison_pointer(m_thread_data);\n        poison_pointer(m_suspend_point);\n    }\n\n    template <typename Waiter>\n    d1::task* local_wait_for_all(d1::task* t, Waiter& waiter);\n\n    bool allow_fifo_task(bool new_state) {\n        bool old_state = m_properties.fifo_tasks_allowed;\n        m_properties.fifo_tasks_allowed = new_state;\n        return old_state;\n    }\n\n    isolation_type set_isolation(isolation_type isolation) {\n        isolation_type prev = m_execute_data_ext.isolation;\n        m_execute_data_ext.isolation = isolation;\n        return prev;\n    }\n\n    thread_data& get_thread_data() {\n        __TBB_ASSERT(m_thread_data, nullptr);\n        return *m_thread_data;\n    }\n\n    static void execute_and_wait(d1::task* t, d1::wait_context& wait_ctx, d1::task_group_context& w_ctx);\n\n    void set_stealing_threshold(std::uintptr_t stealing_threshold) {\n        bool assert_condition = (stealing_threshold == 0 && m_stealing_threshold != 0) ||\n                                (stealing_threshold != 0 && m_stealing_threshold == 0);\n        __TBB_ASSERT_EX( assert_condition, nullptr );\n        m_stealing_threshold = stealing_threshold;\n    }\n\n    d1::task* get_inbox_or_critical_task(execution_data_ext&, mail_inbox&, isolation_type, bool);\n    d1::task* get_stream_or_critical_task(execution_data_ext&, arena&, task_stream<front_accessor>&,\n                                      unsigned& /*hint_for_stream*/, isolation_type,\n                                      bool /*critical_allowed*/);\n    d1::task* steal_or_get_critical(execution_data_ext&, arena&, unsigned /*arena_index*/, FastRandom&,\n                                isolation_type, bool /*critical_allowed*/);\n\n#if __TBB_RESUMABLE_TASKS\n    /* [[noreturn]] */ void co_local_wait_for_all() noexcept;\n    void suspend(suspend_callback_type suspend_callback, void* user_callback);\n    void internal_suspend();\n    void do_post_resume_action();\n\n    bool resume(task_dispatcher& target);\n    suspend_point_type* get_suspend_point();\n    void init_suspend_point(arena* a, std::size_t stack_size);\n    friend void internal_resume(suspend_point_type*);\n    void recall_point();\n#endif /* __TBB_RESUMABLE_TASKS */\n};\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n#pragma warning( pop )\n#endif\n\ninline std::uintptr_t calculate_stealing_threshold(std::uintptr_t base, std::size_t stack_size) {\n    __TBB_ASSERT(stack_size != 0, \"Stack size cannot be zero\");\n    __TBB_ASSERT(base > stack_size / 2, \"Stack anchor calculation overflow\");\n    return base - stack_size / 2;\n}\n\nstruct task_group_context_impl {\n    static void destroy(d1::task_group_context&);\n    static void initialize(d1::task_group_context&);\n    static void register_with(d1::task_group_context&, thread_data*);\n    static void bind_to_impl(d1::task_group_context&, thread_data*);\n    static void bind_to(d1::task_group_context&, thread_data*);\n    static void propagate_task_group_state(d1::task_group_context&, std::atomic<uint32_t> d1::task_group_context::*, d1::task_group_context&, uint32_t);\n    static bool cancel_group_execution(d1::task_group_context&);\n    static bool is_group_execution_cancelled(const d1::task_group_context&);\n    static void reset(d1::task_group_context&);\n    static void capture_fp_settings(d1::task_group_context&);\n    static void copy_fp_settings(d1::task_group_context& ctx, const d1::task_group_context& src);\n};\n\n\n//! Forward declaration for scheduler entities\nbool gcc_rethrow_exception_broken();\nvoid fix_broken_rethrow();\n//! Forward declaration: throws std::runtime_error with what() returning error_code description prefixed with aux_info\nvoid handle_perror(int error_code, const char* aux_info);\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /* _TBB_scheduler_common_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/semaphore.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"semaphore.h\"\n#if __TBB_USE_SRWLOCK\n#include \"dynamic_link.h\" // Refers to src/tbb, not include/tbb\n#include \"tbb_misc.h\"\n#endif\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n// TODO: For new win UI port, we can use SRWLock API without dynamic_link etc.\n#if __TBB_USE_SRWLOCK\n\nstatic std::atomic<do_once_state> concmon_module_inited;\n\nvoid WINAPI init_binsem_using_event( SRWLOCK* h_ )\n{\n    srwl_or_handle* shptr = (srwl_or_handle*) h_;\n    shptr->h = CreateEventEx( nullptr, nullptr, 0, EVENT_ALL_ACCESS|SEMAPHORE_ALL_ACCESS );\n}\n\nvoid WINAPI acquire_binsem_using_event( SRWLOCK* h_ )\n{\n    srwl_or_handle* shptr = (srwl_or_handle*) h_;\n    WaitForSingleObjectEx( shptr->h, INFINITE, FALSE );\n}\n\nvoid WINAPI release_binsem_using_event( SRWLOCK* h_ )\n{\n    srwl_or_handle* shptr = (srwl_or_handle*) h_;\n    SetEvent( shptr->h );\n}\n\nstatic void (WINAPI *__TBB_init_binsem)( SRWLOCK* ) = (void (WINAPI *)(SRWLOCK*))&init_binsem_using_event;\nstatic void (WINAPI *__TBB_acquire_binsem)( SRWLOCK* ) = (void (WINAPI *)(SRWLOCK*))&acquire_binsem_using_event;\nstatic void (WINAPI *__TBB_release_binsem)( SRWLOCK* ) = (void (WINAPI *)(SRWLOCK*))&release_binsem_using_event;\n\n//! Table describing the how to link the handlers.\nstatic const dynamic_link_descriptor SRWLLinkTable[] = {\n    DLD(InitializeSRWLock,       __TBB_init_binsem),\n    DLD(AcquireSRWLockExclusive, __TBB_acquire_binsem),\n    DLD(ReleaseSRWLockExclusive, __TBB_release_binsem)\n};\n\ninline void init_concmon_module()\n{\n    __TBB_ASSERT( (uintptr_t)__TBB_init_binsem==(uintptr_t)&init_binsem_using_event, nullptr);\n    if( dynamic_link( \"Kernel32.dll\", SRWLLinkTable, sizeof(SRWLLinkTable)/sizeof(dynamic_link_descriptor) ) ) {\n        __TBB_ASSERT( (uintptr_t)__TBB_init_binsem!=(uintptr_t)&init_binsem_using_event, nullptr);\n        __TBB_ASSERT( (uintptr_t)__TBB_acquire_binsem!=(uintptr_t)&acquire_binsem_using_event, nullptr);\n        __TBB_ASSERT( (uintptr_t)__TBB_release_binsem!=(uintptr_t)&release_binsem_using_event, nullptr);\n    }\n}\n\nbinary_semaphore::binary_semaphore() {\n    atomic_do_once( &init_concmon_module, concmon_module_inited );\n\n    __TBB_init_binsem( &my_sem.lock );\n    if( (uintptr_t)__TBB_init_binsem!=(uintptr_t)&init_binsem_using_event )\n        P();\n}\n\nbinary_semaphore::~binary_semaphore() {\n    if( (uintptr_t)__TBB_init_binsem==(uintptr_t)&init_binsem_using_event )\n        CloseHandle( my_sem.h );\n}\n\nvoid binary_semaphore::P() { __TBB_acquire_binsem( &my_sem.lock ); }\n\nvoid binary_semaphore::V() { __TBB_release_binsem( &my_sem.lock ); }\n\n#endif /* __TBB_USE_SRWLOCK */\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/semaphore.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_semaphore_H\n#define __TBB_semaphore_H\n\n#include \"oneapi/tbb/detail/_utils.h\"\n\n#if _WIN32||_WIN64\n#include <windows.h>\n#elif __APPLE__\n#include <dispatch/dispatch.h>\n#else\n#include <semaphore.h>\n#ifdef TBB_USE_DEBUG\n#include <cerrno>\n#endif\n#endif /*_WIN32||_WIN64*/\n\n#include <atomic>\n\n#if __unix__\n#if defined(__has_include)\n#define __TBB_has_include __has_include\n#else\n#define __TBB_has_include(x) 0\n#endif\n\n/* Futex definitions */\n#include <unistd.h>\n#if defined(__linux__) || __TBB_has_include(<sys/syscall.h>)\n#include <sys/syscall.h>\n#endif\n\n#if defined(SYS_futex)\n\n/* This section is included for Linux and some other systems that may support futexes.*/\n\n#define __TBB_USE_FUTEX 1\n\n/*\nIf available, use typical headers where futex API is defined. While Linux and OpenBSD\nare known to provide such headers, other systems might have them as well.\n*/\n#if defined(__linux__) || __TBB_has_include(<linux/futex.h>)\n#include <linux/futex.h>\n#elif defined(__OpenBSD__) || __TBB_has_include(<sys/futex.h>)\n#include <sys/futex.h>\n#endif\n\n#include <climits>\n#include <cerrno>\n\n/*\nSome systems might not define the macros or use different names. In such case we expect\nthe actual parameter values to match Linux: 0 for wait, 1 for wake.\n*/\n#if defined(FUTEX_WAIT_PRIVATE)\n#define __TBB_FUTEX_WAIT FUTEX_WAIT_PRIVATE\n#elif defined(FUTEX_WAIT)\n#define __TBB_FUTEX_WAIT FUTEX_WAIT\n#else\n#define __TBB_FUTEX_WAIT 0\n#endif\n\n#if defined(FUTEX_WAKE_PRIVATE)\n#define __TBB_FUTEX_WAKE FUTEX_WAKE_PRIVATE\n#elif defined(FUTEX_WAKE)\n#define __TBB_FUTEX_WAKE FUTEX_WAKE\n#else\n#define __TBB_FUTEX_WAKE 1\n#endif\n\n#endif // SYS_futex\n#endif // __unix__\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n////////////////////////////////////////////////////////////////////////////////////////////////////\n// Futex implementation\n////////////////////////////////////////////////////////////////////////////////////////////////////\n\n#if __TBB_USE_FUTEX\n\nstatic inline int futex_wait( void *futex, int comparand ) {\n#ifdef __OpenBSD__\n    int r = ::futex((volatile uint32_t *)futex, __TBB_FUTEX_WAIT, comparand, nullptr, nullptr);\n#else\n    int r = ::syscall(SYS_futex, futex, __TBB_FUTEX_WAIT, comparand, nullptr, nullptr, 0);\n#endif\n#if TBB_USE_ASSERT\n    int e = errno;\n    __TBB_ASSERT(r == 0 || r == EWOULDBLOCK || (r == -1 && (e == EAGAIN || e == EINTR)), \"futex_wait failed.\");\n#endif /* TBB_USE_ASSERT */\n    return r;\n}\n\nstatic inline int futex_wakeup_one( void *futex ) {\n#ifdef __OpenBSD__\n    int r = ::futex((volatile uint32_t *)futex, __TBB_FUTEX_WAKE, 1 , nullptr, nullptr);\n#else\n    int r = ::syscall(SYS_futex, futex, __TBB_FUTEX_WAKE, 1, nullptr, nullptr, 0);\n#endif\n    __TBB_ASSERT(r == 0 || r == 1, \"futex_wakeup_one: more than one thread woken up?\");\n    return r;\n}\n\n// Additional possible methods that are not required right now\n// static inline int futex_wakeup_all( void *futex ) {\n//     int r = ::syscall( SYS_futex,futex,__TBB_FUTEX_WAKE,INT_MAX,nullptr,nullptr,0 );\n//     __TBB_ASSERT( r>=0, \"futex_wakeup_all: error in waking up threads\" );\n//     return r;\n// }\n\n#endif // __TBB_USE_FUTEX\n\n////////////////////////////////////////////////////////////////////////////////////////////////////\n#if _WIN32||_WIN64\ntypedef LONG sem_count_t;\n//! Edsger Dijkstra's counting semaphore\nclass semaphore : no_copy {\n    static const int max_semaphore_cnt = MAXLONG;\npublic:\n    //! ctor\n    semaphore(size_t start_cnt_ = 0) {init_semaphore(start_cnt_);}\n    //! dtor\n    ~semaphore() {CloseHandle( sem );}\n    //! wait/acquire\n    void P() {WaitForSingleObjectEx( sem, INFINITE, FALSE );}\n    //! post/release\n    void V() {ReleaseSemaphore( sem, 1, nullptr);}\nprivate:\n    HANDLE sem;\n    void init_semaphore(size_t start_cnt_) {\n        sem = CreateSemaphoreEx( nullptr, LONG(start_cnt_), max_semaphore_cnt, nullptr, 0, SEMAPHORE_ALL_ACCESS );\n    }\n};\n#elif __APPLE__\n//! Edsger Dijkstra's counting semaphore\nclass semaphore : no_copy {\npublic:\n    //! ctor\n    semaphore(int start_cnt_ = 0) { my_sem = dispatch_semaphore_create(start_cnt_); }\n    //! dtor\n    ~semaphore() { dispatch_release(my_sem); }\n    //! wait/acquire\n    void P() {\n        std::intptr_t ret = dispatch_semaphore_wait(my_sem, DISPATCH_TIME_FOREVER);\n        __TBB_ASSERT_EX(ret == 0, \"dispatch_semaphore_wait() failed\");\n    }\n    //! post/release\n    void V() { dispatch_semaphore_signal(my_sem); }\nprivate:\n    dispatch_semaphore_t my_sem;\n};\n#else /* Linux/Unix */\ntypedef uint32_t sem_count_t;\n//! Edsger Dijkstra's counting semaphore\nclass semaphore : no_copy {\npublic:\n    //! ctor\n    semaphore(int start_cnt_ = 0 ) { init_semaphore( start_cnt_ ); }\n\n    //! dtor\n    ~semaphore() {\n        int ret = sem_destroy( &sem );\n        __TBB_ASSERT_EX( !ret, nullptr);\n    }\n    //! wait/acquire\n    void P() {\n        while( sem_wait( &sem )!=0 )\n            __TBB_ASSERT( errno==EINTR, nullptr);\n    }\n    //! post/release\n    void V() { sem_post( &sem ); }\nprivate:\n    sem_t sem;\n    void init_semaphore(int start_cnt_) {\n        int ret = sem_init( &sem, /*shared among threads*/ 0, start_cnt_ );\n        __TBB_ASSERT_EX( !ret, nullptr);\n    }\n};\n#endif /* _WIN32||_WIN64 */\n\n\n//! for performance reasons, we want specialized binary_semaphore\n#if _WIN32||_WIN64\n#if !__TBB_USE_SRWLOCK\n//! binary_semaphore for concurrent_monitor\nclass binary_semaphore : no_copy {\npublic:\n    //! ctor\n    binary_semaphore() { my_sem = CreateEventEx( nullptr, nullptr, 0, EVENT_ALL_ACCESS );  }\n    //! dtor\n    ~binary_semaphore() { CloseHandle( my_sem ); }\n    //! wait/acquire\n    void P() { WaitForSingleObjectEx( my_sem, INFINITE, FALSE ); }\n    //! post/release\n    void V() { SetEvent( my_sem ); }\nprivate:\n    HANDLE my_sem;\n};\n#else /* __TBB_USE_SRWLOCK */\n\nunion srwl_or_handle {\n    SRWLOCK lock;\n    HANDLE  h;\n};\n\n//! binary_semaphore for concurrent_monitor\nclass binary_semaphore : no_copy {\npublic:\n    //! ctor\n    binary_semaphore();\n    //! dtor\n    ~binary_semaphore();\n    //! wait/acquire\n    void P();\n    //! post/release\n    void V();\nprivate:\n    srwl_or_handle my_sem;\n};\n#endif /* !__TBB_USE_SRWLOCK */\n#elif __APPLE__\n//! binary_semaphore for concurrent monitor\nusing binary_semaphore = semaphore;\n#else /* Linux/Unix */\n\n#if __TBB_USE_FUTEX\nclass binary_semaphore : no_copy {\n// The implementation is equivalent to the \"Mutex, Take 3\" one\n// in the paper \"Futexes Are Tricky\" by Ulrich Drepper\npublic:\n    //! ctor\n    binary_semaphore() { my_sem = 1; }\n    //! dtor\n    ~binary_semaphore() {}\n    //! wait/acquire\n    void P() {\n        int s = 0;\n        if( !my_sem.compare_exchange_strong( s, 1 ) ) {\n            if( s!=2 )\n                s = my_sem.exchange( 2 );\n            while( s!=0 ) { // This loop deals with spurious wakeup\n                futex_wait( &my_sem, 2 );\n                s = my_sem.exchange( 2 );\n            }\n        }\n    }\n    //! post/release\n    void V() {\n        __TBB_ASSERT( my_sem.load(std::memory_order_relaxed)>=1, \"multiple V()'s in a row?\" );\n        if( my_sem.exchange( 0 )==2 )\n            futex_wakeup_one( &my_sem );\n    }\nprivate:\n    std::atomic<int> my_sem; // 0 - open; 1 - closed, no waits; 2 - closed, possible waits\n};\n#else\ntypedef uint32_t sem_count_t;\n//! binary_semaphore for concurrent monitor\nclass binary_semaphore : no_copy {\npublic:\n    //! ctor\n    binary_semaphore() {\n        int ret = sem_init( &my_sem, /*shared among threads*/ 0, 0 );\n        __TBB_ASSERT_EX( !ret, nullptr);\n    }\n    //! dtor\n    ~binary_semaphore() {\n        int ret = sem_destroy( &my_sem );\n        __TBB_ASSERT_EX( !ret, nullptr);\n    }\n    //! wait/acquire\n    void P() {\n        while( sem_wait( &my_sem )!=0 )\n            __TBB_ASSERT( errno==EINTR, nullptr);\n    }\n    //! post/release\n    void V() { sem_post( &my_sem ); }\nprivate:\n    sem_t my_sem;\n};\n#endif /* __TBB_USE_FUTEX */\n#endif /* _WIN32||_WIN64 */\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /* __TBB_semaphore_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/small_object_pool.cpp",
    "content": "/*\n    Copyright (c) 2020-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/cache_aligned_allocator.h\"\n#include \"oneapi/tbb/detail/_small_object_pool.h\"\n#include \"oneapi/tbb/detail/_task.h\"\n#include \"governor.h\"\n#include \"thread_data.h\"\n#include \"task_dispatcher.h\"\n\n#include <cstddef>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nsmall_object_pool_impl::small_object* const small_object_pool_impl::dead_public_list =\n                reinterpret_cast<small_object_pool_impl::small_object*>(1);\n\nvoid* __TBB_EXPORTED_FUNC allocate(d1::small_object_pool*& allocator, std::size_t number_of_bytes, const d1::execution_data& ed) {\n    auto& tls = static_cast<const execution_data_ext&>(ed).task_disp->get_thread_data();\n    auto pool = tls.my_small_object_pool;\n    return pool->allocate_impl(allocator, number_of_bytes);\n}\n\nvoid* __TBB_EXPORTED_FUNC allocate(d1::small_object_pool*& allocator, std::size_t number_of_bytes) {\n    // TODO: optimize if the allocator contains a valid pool.\n    auto tls = governor::get_thread_data();\n    auto pool = tls->my_small_object_pool;\n    return pool->allocate_impl(allocator, number_of_bytes);\n}\n\nvoid* small_object_pool_impl::allocate_impl(d1::small_object_pool*& allocator, std::size_t number_of_bytes)\n{\n    __TBB_ASSERT(allocator == nullptr || allocator == this,\n                 \"An attempt was made to allocate using another thread's small memory pool\");\n    small_object* obj{nullptr};\n\n    if (number_of_bytes <= small_object_size) {\n        if (m_private_list) {\n            obj = m_private_list;\n            m_private_list = m_private_list->next;\n        } else if (m_public_list.load(std::memory_order_relaxed)) {\n            // No fence required for read of my_public_list above, because std::atomic::exchange() has a fence.\n            obj = m_public_list.exchange(nullptr);\n            __TBB_ASSERT( obj, \"another thread emptied the my_public_list\" );\n            m_private_list = obj->next;\n        } else {\n            obj = new (cache_aligned_allocate(small_object_size)) small_object{nullptr};\n            ++m_private_counter;\n        }\n    } else {\n        obj = new (cache_aligned_allocate(number_of_bytes)) small_object{nullptr};\n    }\n    allocator = this;\n\n    // Return uninitialized memory for further construction on user side.\n    obj->~small_object();\n    return obj;\n}\n\nvoid __TBB_EXPORTED_FUNC deallocate(d1::small_object_pool& allocator, void* ptr, std::size_t number_of_bytes) {\n    auto pool = static_cast<small_object_pool_impl*>(&allocator);\n    auto tls = governor::get_thread_data();\n    pool->deallocate_impl(ptr, number_of_bytes, *tls);\n}\n\nvoid __TBB_EXPORTED_FUNC deallocate(d1::small_object_pool& allocator, void* ptr, std::size_t number_of_bytes, const d1::execution_data& ed) {\n    auto& tls = static_cast<const execution_data_ext&>(ed).task_disp->get_thread_data();\n    auto pool = static_cast<small_object_pool_impl*>(&allocator);\n    pool->deallocate_impl(ptr, number_of_bytes, tls);\n}\n\nvoid small_object_pool_impl::deallocate_impl(void* ptr, std::size_t number_of_bytes, thread_data& td) {\n    __TBB_ASSERT(ptr != nullptr, \"pointer to deallocate should not be null\");\n    __TBB_ASSERT(number_of_bytes >= sizeof(small_object), \"number of bytes should be at least sizeof(small_object)\");\n\n    if (number_of_bytes <= small_object_size) {\n        auto obj = new (ptr) small_object{nullptr};\n        if (td.my_small_object_pool == this) {\n            obj->next = m_private_list;\n            m_private_list = obj;\n        } else {\n            auto old_public_list = m_public_list.load(std::memory_order_relaxed);\n\n            for (;;) {\n                if (old_public_list == dead_public_list) {\n                    obj->~small_object();\n                    cache_aligned_deallocate(obj);\n                    if (++m_public_counter == 0)\n                    {\n                        this->~small_object_pool_impl();\n                        cache_aligned_deallocate(this);\n                    }\n                    break;\n                }\n                obj->next = old_public_list;\n                if (m_public_list.compare_exchange_strong(old_public_list, obj)) {\n                    break;\n                }\n            }\n        }\n    } else {\n        cache_aligned_deallocate(ptr);\n    }\n}\n\nstd::int64_t small_object_pool_impl::cleanup_list(small_object* list)\n{\n    std::int64_t removed_count{};\n\n    while (list) {\n        small_object* current = list;\n        list = list->next;\n        current->~small_object();\n        cache_aligned_deallocate(current);\n        ++removed_count;\n    }\n    return removed_count;\n}\n\nvoid small_object_pool_impl::destroy()\n{\n    // clean up private list and subtract the removed count from private counter\n    m_private_counter -= cleanup_list(m_private_list);\n    // Grab public list and place dead mark\n    small_object* public_list = m_public_list.exchange(dead_public_list);\n    // clean up public list and subtract from private (intentionally) counter\n    m_private_counter -= cleanup_list(public_list);\n    __TBB_ASSERT(m_private_counter >= 0, \"Private counter may not be less than 0\");\n    // Equivalent to fetch_sub(m_private_counter) - m_private_counter. But we need to do it\n    // atomically with operator-= not to access m_private_counter after the subtraction.\n    auto new_value = m_public_counter -= m_private_counter;\n    // check if this method is responsible to clean up the resources\n    if (new_value == 0) {\n        this->~small_object_pool_impl();\n        cache_aligned_deallocate(this);\n    }\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/small_object_pool_impl.h",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_small_object_pool_impl_H\n#define __TBB_small_object_pool_impl_H\n\n#include \"oneapi/tbb/detail/_small_object_pool.h\"\n#include \"oneapi/tbb/detail/_utils.h\"\n\n#include <cstddef>\n#include <cstdint>\n#include <atomic>\n\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nclass thread_data;\n\nclass small_object_pool_impl : public d1::small_object_pool\n{\n    static constexpr std::size_t small_object_size = 256;\n    struct small_object {\n        small_object* next;\n    };\n    static small_object* const dead_public_list;\npublic:\n    void* allocate_impl(small_object_pool*& allocator, std::size_t number_of_bytes);\n    void deallocate_impl(void* ptr, std::size_t number_of_bytes, thread_data& td);\n    void destroy();\nprivate:\n    static std::int64_t cleanup_list(small_object* list);\n    ~small_object_pool_impl() = default;\nprivate:\n    alignas(max_nfs_size) small_object* m_private_list;\n    std::int64_t m_private_counter{};\n    alignas(max_nfs_size) std::atomic<small_object*> m_public_list;\n    std::atomic<std::int64_t> m_public_counter{};\n};\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /* __TBB_small_object_pool_impl_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/task.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// Do not include task.h directly. Use scheduler_common.h instead\n#include \"scheduler_common.h\"\n#include \"governor.h\"\n#include \"arena.h\"\n#include \"thread_data.h\"\n#include \"task_dispatcher.h\"\n#include \"waiters.h\"\n#include \"itt_notify.h\"\n\n#include \"oneapi/tbb/detail/_task.h\"\n#include \"oneapi/tbb/partitioner.h\"\n#include \"oneapi/tbb/task.h\"\n\n#include <cstring>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n//------------------------------------------------------------------------\n// resumable tasks\n//------------------------------------------------------------------------\n#if __TBB_RESUMABLE_TASKS\n\nvoid suspend(suspend_callback_type suspend_callback, void* user_callback) {\n    thread_data& td = *governor::get_thread_data();\n    td.my_task_dispatcher->suspend(suspend_callback, user_callback);\n    // Do not access td after suspend.\n}\n\nvoid resume(suspend_point_type* sp) {\n    assert_pointers_valid(sp, sp->m_arena);\n    task_dispatcher& task_disp = sp->m_resume_task.m_target;\n\n    if (sp->try_notify_resume()) {\n        // TODO: remove this work-around\n        // Prolong the arena's lifetime while all coroutines are alive\n        // (otherwise the arena can be destroyed while some tasks are suspended).\n        arena& a = *sp->m_arena;\n        a.my_references += arena::ref_worker;\n\n        if (task_disp.m_properties.critical_task_allowed) {\n            // The target is not in the process of executing critical task, so the resume task is not critical.\n            a.my_resume_task_stream.push(&sp->m_resume_task, random_lane_selector(sp->m_random));\n        } else {\n    #if __TBB_PREVIEW_CRITICAL_TASKS\n            // The target is in the process of executing critical task, so the resume task is critical.\n            a.my_critical_task_stream.push(&sp->m_resume_task, random_lane_selector(sp->m_random));\n    #endif\n        }\n        // Do not access target after that point.\n        a.advertise_new_work<arena::wakeup>();\n        // Release our reference to my_arena.\n        a.on_thread_leaving(arena::ref_worker);\n    }\n\n}\n\nsuspend_point_type* current_suspend_point() {\n    thread_data& td = *governor::get_thread_data();\n    return td.my_task_dispatcher->get_suspend_point();\n}\n\ntask_dispatcher& create_coroutine(thread_data& td) {\n    // We may have some task dispatchers cached\n    task_dispatcher* task_disp = td.my_arena->my_co_cache.pop();\n    if (!task_disp) {\n        void* ptr = cache_aligned_allocate(sizeof(task_dispatcher));\n        task_disp = new(ptr) task_dispatcher(td.my_arena);\n        task_disp->init_suspend_point(td.my_arena, td.my_arena->my_threading_control->worker_stack_size());\n    }\n    // Prolong the arena's lifetime until all coroutines is alive\n    // (otherwise the arena can be destroyed while some tasks are suspended).\n    // TODO: consider behavior if there are more than 4K external references.\n    td.my_arena->my_references += arena::ref_external;\n    return *task_disp;\n}\n\nvoid task_dispatcher::internal_suspend() {\n    __TBB_ASSERT(m_thread_data != nullptr, nullptr);\n\n    arena_slot* slot = m_thread_data->my_arena_slot;\n    __TBB_ASSERT(slot != nullptr, nullptr);\n\n    task_dispatcher& default_task_disp = slot->default_task_dispatcher();\n    // TODO: simplify the next line, e.g. is_task_dispatcher_recalled( task_dispatcher& )\n    bool is_recalled = default_task_disp.get_suspend_point()->m_is_owner_recalled.load(std::memory_order_acquire);\n    task_dispatcher& target = is_recalled ? default_task_disp : create_coroutine(*m_thread_data);\n\n    resume(target);\n\n    if (m_properties.outermost) {\n        recall_point();\n    }\n}\n\nvoid task_dispatcher::suspend(suspend_callback_type suspend_callback, void* user_callback) {\n    __TBB_ASSERT(suspend_callback != nullptr, nullptr);\n    __TBB_ASSERT(user_callback != nullptr, nullptr);\n    suspend_callback(user_callback, get_suspend_point());\n\n    __TBB_ASSERT(m_thread_data != nullptr, nullptr);\n    __TBB_ASSERT(m_thread_data->my_post_resume_action == post_resume_action::none, nullptr);\n    __TBB_ASSERT(m_thread_data->my_post_resume_arg == nullptr, nullptr);\n    internal_suspend();\n}\n\nbool task_dispatcher::resume(task_dispatcher& target) {\n    // Do not create non-trivial objects on the stack of this function. They might never be destroyed\n    {\n        thread_data* td = m_thread_data;\n        __TBB_ASSERT(&target != this, \"We cannot resume to ourself\");\n        __TBB_ASSERT(td != nullptr, \"This task dispatcher must be attach to a thread data\");\n        __TBB_ASSERT(td->my_task_dispatcher == this, \"Thread data must be attached to this task dispatcher\");\n\n        // Change the task dispatcher\n        td->detach_task_dispatcher();\n        td->attach_task_dispatcher(target);\n    }\n    __TBB_ASSERT(m_suspend_point != nullptr, \"Suspend point must be created\");\n    __TBB_ASSERT(target.m_suspend_point != nullptr, \"Suspend point must be created\");\n    // Swap to the target coroutine.\n\n    m_suspend_point->resume(target.m_suspend_point);\n    // Pay attention that m_thread_data can be changed after resume\n    if (m_thread_data) {\n        thread_data* td = m_thread_data;\n        __TBB_ASSERT(td != nullptr, \"This task dispatcher must be attach to a thread data\");\n        __TBB_ASSERT(td->my_task_dispatcher == this, \"Thread data must be attached to this task dispatcher\");\n        do_post_resume_action();\n\n        // Remove the recall flag if the thread in its original task dispatcher\n        arena_slot* slot = td->my_arena_slot;\n        __TBB_ASSERT(slot != nullptr, nullptr);\n        if (this == slot->my_default_task_dispatcher) {\n            __TBB_ASSERT(m_suspend_point != nullptr, nullptr);\n            m_suspend_point->m_is_owner_recalled.store(false, std::memory_order_relaxed);\n        }\n        return true;\n    }\n    return false;\n}\n\nvoid task_dispatcher::do_post_resume_action() {\n    thread_data* td = m_thread_data;\n    switch (td->my_post_resume_action) {\n    case post_resume_action::register_waiter:\n    {\n        __TBB_ASSERT(td->my_post_resume_arg, \"The post resume action must have an argument\");\n        static_cast<thread_control_monitor::resume_context*>(td->my_post_resume_arg)->notify();\n        break;\n    }\n    case post_resume_action::cleanup:\n    {\n        __TBB_ASSERT(td->my_post_resume_arg, \"The post resume action must have an argument\");\n        task_dispatcher* to_cleanup = static_cast<task_dispatcher*>(td->my_post_resume_arg);\n        // Release coroutine's reference to my_arena\n        td->my_arena->on_thread_leaving(arena::ref_external);\n        // Cache the coroutine for possible later re-usage\n        td->my_arena->my_co_cache.push(to_cleanup);\n        break;\n    }\n    case post_resume_action::notify:\n    {\n        __TBB_ASSERT(td->my_post_resume_arg, \"The post resume action must have an argument\");\n        suspend_point_type* sp = static_cast<suspend_point_type*>(td->my_post_resume_arg);\n        sp->recall_owner();\n        // Do not access sp because it can be destroyed after recall\n\n        auto is_our_suspend_point = [sp] (market_context ctx) {\n            return std::uintptr_t(sp) == ctx.my_uniq_addr;\n        };\n        td->my_arena->get_waiting_threads_monitor().notify(is_our_suspend_point);\n        break;\n    }\n    default:\n        __TBB_ASSERT(td->my_post_resume_action == post_resume_action::none, \"Unknown post resume action\");\n        __TBB_ASSERT(td->my_post_resume_arg == nullptr, \"The post resume argument should not be set\");\n    }\n    td->clear_post_resume_action();\n}\n\n#else\n\nvoid suspend(suspend_callback_type, void*) {\n    __TBB_ASSERT_RELEASE(false, \"Resumable tasks are unsupported on this platform\");\n}\n\nvoid resume(suspend_point_type*) {\n    __TBB_ASSERT_RELEASE(false, \"Resumable tasks are unsupported on this platform\");\n}\n\nsuspend_point_type* current_suspend_point() {\n    __TBB_ASSERT_RELEASE(false, \"Resumable tasks are unsupported on this platform\");\n    return nullptr;\n}\n\n#endif /* __TBB_RESUMABLE_TASKS */\n\nvoid notify_waiters(std::uintptr_t wait_ctx_addr) {\n    auto is_related_wait_ctx = [&] (market_context context) {\n        return wait_ctx_addr == context.my_uniq_addr;\n    };\n\n    governor::get_thread_data()->my_arena->get_waiting_threads_monitor().notify(is_related_wait_ctx);\n}\n\nd1::wait_tree_vertex_interface* get_thread_reference_vertex(d1::wait_tree_vertex_interface* top_wait_context) {\n    __TBB_ASSERT(top_wait_context, nullptr);\n    auto& dispatcher = *governor::get_thread_data()->my_task_dispatcher;\n\n    d1::reference_vertex* ref_counter{nullptr};\n    auto& reference_map = dispatcher.m_reference_vertex_map;\n    auto pos = reference_map.find(top_wait_context);\n    if (pos != reference_map.end()) {\n        ref_counter = pos->second;\n    } else {\n        constexpr std::size_t max_reference_vertex_map_size = 1000;\n        if (reference_map.size() > max_reference_vertex_map_size) {\n            // TODO: Research the possibility of using better approach for a clean-up\n            for (auto it = reference_map.begin(); it != reference_map.end();) {\n                if (it->second->get_num_child() == 0) {\n                    it->second->~reference_vertex();\n                    cache_aligned_deallocate(it->second);\n                    it = reference_map.erase(it);\n                } else {\n                    ++it;\n                }\n            }\n        }\n\n        reference_map[top_wait_context] = ref_counter =\n            new (cache_aligned_allocate(sizeof(d1::reference_vertex))) d1::reference_vertex(top_wait_context, 0);\n    }\n\n    return ref_counter;\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/task_dispatcher.cpp",
    "content": "/*\n    Copyright (c) 2020-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"task_dispatcher.h\"\n#include \"waiters.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nstatic inline void spawn_and_notify(d1::task& t, arena_slot* slot, arena* a) {\n    slot->spawn(t);\n    a->advertise_new_work<arena::work_spawned>();\n    // TODO: TBB_REVAMP_TODO slot->assert_task_pool_valid();\n}\n\nvoid __TBB_EXPORTED_FUNC spawn(d1::task& t, d1::task_group_context& ctx) {\n    thread_data* tls = governor::get_thread_data();\n    task_group_context_impl::bind_to(ctx, tls);\n    arena* a = tls->my_arena;\n    arena_slot* slot = tls->my_arena_slot;\n    // Capture current context\n    task_accessor::context(t) = &ctx;\n    // Mark isolation\n    task_accessor::isolation(t) = tls->my_task_dispatcher->m_execute_data_ext.isolation;\n    spawn_and_notify(t, slot, a);\n}\n\nvoid __TBB_EXPORTED_FUNC spawn(d1::task& t, d1::task_group_context& ctx, d1::slot_id id) {\n    thread_data* tls = governor::get_thread_data();\n    task_group_context_impl::bind_to(ctx, tls);\n    arena* a = tls->my_arena;\n    arena_slot* slot = tls->my_arena_slot;\n    execution_data_ext& ed = tls->my_task_dispatcher->m_execute_data_ext;\n\n    // Capture context\n    task_accessor::context(t) = &ctx;\n    // Mark isolation\n    task_accessor::isolation(t) = ed.isolation;\n\n    if ( id != d1::no_slot && id != tls->my_arena_index && id < a->my_num_slots) {\n        // Allocate proxy task\n        d1::small_object_allocator alloc{};\n        auto proxy = alloc.new_object<task_proxy>(static_cast<d1::execution_data&>(ed));\n        // Mark as a proxy\n        task_accessor::set_proxy_trait(*proxy);\n        // Mark isolation for the proxy task\n        task_accessor::isolation(*proxy) = ed.isolation;\n        // Deallocation hint (tls) from the task allocator\n        proxy->allocator = alloc;\n        proxy->slot = id;\n        proxy->outbox = &a->mailbox(id);\n        // Mark proxy as present in both locations (sender's task pool and destination mailbox)\n        proxy->task_and_tag = intptr_t(&t) | task_proxy::location_mask;\n        // Mail the proxy - after this point t may be destroyed by another thread at any moment.\n        proxy->outbox->push(proxy);\n        // Spawn proxy to the local task pool\n        spawn_and_notify(*proxy, slot, a);\n    } else {\n        spawn_and_notify(t, slot, a);\n    }\n}\n\nvoid __TBB_EXPORTED_FUNC submit(d1::task& t, d1::task_group_context& ctx, arena* a, std::uintptr_t as_critical) {\n    suppress_unused_warning(as_critical);\n    assert_pointer_valid(a);\n    thread_data& tls = *governor::get_thread_data();\n\n    // TODO revamp: for each use case investigate neccesity to make this call\n    task_group_context_impl::bind_to(ctx, &tls);\n    task_accessor::context(t) = &ctx;\n    // TODO revamp: consider respecting task isolation if this call is being made by external thread\n    task_accessor::isolation(t) = tls.my_task_dispatcher->m_execute_data_ext.isolation;\n\n    // TODO: consider code refactoring when lane selection mechanism is unified.\n\n    if ( tls.is_attached_to(a) ) {\n        arena_slot* slot = tls.my_arena_slot;\n#if __TBB_PREVIEW_CRITICAL_TASKS\n        if( as_critical ) {\n            a->my_critical_task_stream.push( &t, subsequent_lane_selector(slot->critical_hint()) );\n        } else\n#endif\n        {\n            slot->spawn(t);\n        }\n    } else {\n        random_lane_selector lane_selector{tls.my_random};\n#if !__TBB_PREVIEW_CRITICAL_TASKS\n        suppress_unused_warning(as_critical);\n#else\n        if ( as_critical ) {\n            a->my_critical_task_stream.push( &t, lane_selector );\n        } else\n#endif\n        {\n            // Avoid joining the arena the thread is not currently in.\n            a->my_fifo_task_stream.push( &t, lane_selector );\n        }\n    }\n    // It is assumed that some thread will explicitly wait in the arena the task is submitted\n    // into. Therefore, no need to utilize mandatory concurrency here.\n    a->advertise_new_work<arena::work_spawned>();\n}\n\nvoid __TBB_EXPORTED_FUNC execute_and_wait(d1::task& t, d1::task_group_context& t_ctx, d1::wait_context& wait_ctx, d1::task_group_context& w_ctx) {\n    task_accessor::context(t) = &t_ctx;\n    task_dispatcher::execute_and_wait(&t, wait_ctx, w_ctx);\n}\n\nvoid __TBB_EXPORTED_FUNC wait(d1::wait_context& wait_ctx, d1::task_group_context& w_ctx) {\n    // Enter the task dispatch loop without a task\n    task_dispatcher::execute_and_wait(nullptr, wait_ctx, w_ctx);\n}\n\nd1::slot_id __TBB_EXPORTED_FUNC execution_slot(const d1::execution_data* ed) {\n    if (ed) {\n        const execution_data_ext* ed_ext = static_cast<const execution_data_ext*>(ed);\n        assert_pointers_valid(ed_ext->task_disp, ed_ext->task_disp->m_thread_data);\n        return ed_ext->task_disp->m_thread_data->my_arena_index;\n    } else {\n        thread_data* td = governor::get_thread_data_if_initialized();\n        return td ? td->my_arena_index : d1::slot_id(-1);\n    }\n}\n\nd1::task_group_context* __TBB_EXPORTED_FUNC current_context() {\n    thread_data* td = governor::get_thread_data();\n    assert_pointers_valid(td, td->my_task_dispatcher);\n\n    task_dispatcher* task_disp = td->my_task_dispatcher;\n    if (task_disp->m_properties.outermost) {\n        // No one task is executed, so no execute_data.\n        return nullptr;\n    } else {\n        return td->my_task_dispatcher->m_execute_data_ext.context;\n    }\n}\n\nvoid task_dispatcher::execute_and_wait(d1::task* t, d1::wait_context& wait_ctx, d1::task_group_context& w_ctx) {\n    // Get an associated task dispatcher\n    thread_data* tls = governor::get_thread_data();\n    __TBB_ASSERT(tls->my_task_dispatcher != nullptr, nullptr);\n    task_dispatcher& local_td = *tls->my_task_dispatcher;\n\n    // TODO: factor out the binding to execute_and_wait_impl\n    if (t) {\n        task_group_context_impl::bind_to(*task_accessor::context(*t), tls);\n        // Propagate the isolation to the task executed without spawn.\n        task_accessor::isolation(*t) = tls->my_task_dispatcher->m_execute_data_ext.isolation;\n    }\n\n    // Waiting on special object tied to a waiting thread.\n    external_waiter waiter{ *tls->my_arena, wait_ctx };\n    t = local_td.local_wait_for_all(t, waiter);\n    __TBB_ASSERT_EX(t == nullptr, \"External waiter must not leave dispatch loop with a task\");\n\n    // The external thread couldn't exit the dispatch loop in an idle state\n    if (local_td.m_thread_data->my_inbox.is_idle_state(true)) {\n        local_td.m_thread_data->my_inbox.set_is_idle(false);\n    }\n\n    auto exception = w_ctx.my_exception.load(std::memory_order_acquire);\n    if (exception) {\n        __TBB_ASSERT(w_ctx.is_group_execution_cancelled(), \"The task group context with an exception should be canceled.\");\n        exception->throw_self();\n    }\n}\n\n#if __TBB_RESUMABLE_TASKS\n\n#if _WIN32\n/* [[noreturn]] */ void __stdcall co_local_wait_for_all(void* addr) noexcept\n#else\n/* [[noreturn]] */ void co_local_wait_for_all(unsigned hi, unsigned lo) noexcept\n#endif\n{\n#if !_WIN32\n    std::uintptr_t addr = lo;\n    __TBB_ASSERT(sizeof(addr) == 8 || hi == 0, nullptr);\n    addr += std::uintptr_t(std::uint64_t(hi) << 32);\n#endif\n    task_dispatcher& task_disp = *reinterpret_cast<task_dispatcher*>(addr);\n    assert_pointers_valid(task_disp.m_thread_data, task_disp.m_thread_data->my_arena);\n    task_disp.set_stealing_threshold(task_disp.m_thread_data->my_arena->calculate_stealing_threshold());\n    __TBB_ASSERT(task_disp.can_steal(), nullptr);\n    task_disp.co_local_wait_for_all();\n    // This code is unreachable\n}\n\n/* [[noreturn]] */ void task_dispatcher::co_local_wait_for_all() noexcept {\n    // Do not create non-trivial objects on the stack of this function. They will never be destroyed.\n    assert_pointer_valid(m_thread_data);\n\n    m_suspend_point->finilize_resume();\n    // Basically calls the user callback passed to the tbb::task::suspend function\n    do_post_resume_action();\n\n    // Endless loop here because coroutine could be reused\n    d1::task* resume_task{};\n    do {\n        arena* a = m_thread_data->my_arena;\n        coroutine_waiter waiter(*a);\n        resume_task = local_wait_for_all(nullptr, waiter);\n        assert_task_valid(resume_task);\n        __TBB_ASSERT(this == m_thread_data->my_task_dispatcher, nullptr);\n\n        m_thread_data->set_post_resume_action(post_resume_action::cleanup, this);\n\n    } while (resume(static_cast<suspend_point_type::resume_task*>(resume_task)->m_target));\n    // This code might be unreachable\n}\n\nd1::suspend_point task_dispatcher::get_suspend_point() {\n    if (m_suspend_point == nullptr) {\n        assert_pointer_valid(m_thread_data);\n        // 0 means that we attach this task dispatcher to the current stack\n        init_suspend_point(m_thread_data->my_arena, 0);\n    }\n    assert_pointer_valid(m_suspend_point);\n    return m_suspend_point;\n}\nvoid task_dispatcher::init_suspend_point(arena* a, std::size_t stack_size) {\n    __TBB_ASSERT(m_suspend_point == nullptr, nullptr);\n    m_suspend_point = new(cache_aligned_allocate(sizeof(suspend_point_type)))\n        suspend_point_type(a, stack_size, *this);\n}\n#endif /* __TBB_RESUMABLE_TASKS */\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/task_dispatcher.h",
    "content": "/*\n    Copyright (c) 2020-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_task_dispatcher_H\n#define _TBB_task_dispatcher_H\n\n#include \"oneapi/tbb/detail/_utils.h\"\n#include \"oneapi/tbb/detail/_task.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include \"scheduler_common.h\"\n#include \"waiters.h\"\n#include \"arena_slot.h\"\n#include \"arena.h\"\n#include \"thread_data.h\"\n#include \"mailbox.h\"\n#include \"itt_notify.h\"\n#include \"concurrent_monitor.h\"\n#include \"threading_control.h\"\n\n#include <atomic>\n\n#if !__TBB_CPU_CTL_ENV_PRESENT\n#include <fenv.h> //\n#endif\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\ninline d1::task* get_self_recall_task(arena_slot& slot) {\n    suppress_unused_warning(slot);\n    d1::task* t = nullptr;\n#if __TBB_RESUMABLE_TASKS\n    suspend_point_type* sp = slot.default_task_dispatcher().m_suspend_point;\n    if (sp && sp->m_is_owner_recalled.load(std::memory_order_acquire)) {\n        t = &sp->m_resume_task;\n        __TBB_ASSERT(sp->m_resume_task.m_target.m_thread_data == nullptr, nullptr);\n    }\n#endif /* __TBB_RESUMABLE_TASKS */\n    return t;\n}\n\n// Defined in exception.cpp\n/*[[noreturn]]*/void do_throw_noexcept(void (*throw_exception)()) noexcept;\n\n//------------------------------------------------------------------------\n// Suspend point\n//------------------------------------------------------------------------\n#if __TBB_RESUMABLE_TASKS\n\ninline d1::task* suspend_point_type::resume_task::execute(d1::execution_data& ed) {\n    execution_data_ext& ed_ext = static_cast<execution_data_ext&>(ed);\n\n    if (ed_ext.wait_ctx) {\n        thread_control_monitor::resume_context monitor_node{{std::uintptr_t(ed_ext.wait_ctx), nullptr}, ed_ext, m_target};\n        // The wait_ctx is present only in external_waiter. In that case we leave the current stack\n        // in the abandoned state to resume when waiting completes.\n        thread_data* td = ed_ext.task_disp->m_thread_data;\n        td->set_post_resume_action(task_dispatcher::post_resume_action::register_waiter, &monitor_node);\n\n        thread_control_monitor& wait_list = td->my_arena->get_waiting_threads_monitor();\n\n        if (wait_list.wait([&] { return !ed_ext.wait_ctx->continue_execution(); }, monitor_node)) {\n            return nullptr;\n        }\n\n        td->clear_post_resume_action();\n        r1::resume(ed_ext.task_disp->get_suspend_point());\n    } else {\n        // If wait_ctx is null, it can be only a worker thread on outermost level because\n        // coroutine_waiter interrupts bypass loop before the resume_task execution.\n        ed_ext.task_disp->m_thread_data->set_post_resume_action(task_dispatcher::post_resume_action::notify,\n            ed_ext.task_disp->get_suspend_point());\n    }\n    // Do not access this task because it might be destroyed\n    ed_ext.task_disp->resume(m_target);\n    return nullptr;\n}\n\ninline suspend_point_type::suspend_point_type(arena* a, size_t stack_size, task_dispatcher& task_disp)\n    : m_arena(a)\n    , m_random(this)\n    , m_co_context(stack_size, &task_disp)\n    , m_resume_task(task_disp)\n{\n    assert_pointer_valid(m_arena);\n    assert_pointer_valid(m_arena->my_default_ctx);\n    task_accessor::context(m_resume_task) = m_arena->my_default_ctx;\n    task_accessor::isolation(m_resume_task) = no_isolation;\n    // Initialize the itt_caller for the context of the resume task.\n    // It will be bound to the stack of the first suspend call.\n    task_group_context_impl::bind_to(*task_accessor::context(m_resume_task), task_disp.m_thread_data);\n}\n\n#endif /* __TBB_RESUMABLE_TASKS */\n\n//------------------------------------------------------------------------\n// Task Dispatcher\n//------------------------------------------------------------------------\ninline task_dispatcher::task_dispatcher(arena* a) {\n    m_execute_data_ext.context = a->my_default_ctx;\n    m_execute_data_ext.task_disp = this;\n}\n\ninline bool task_dispatcher::can_steal() {\n    __TBB_ASSERT(m_stealing_threshold != 0, nullptr);\n    stack_anchor_type anchor{};\n    return reinterpret_cast<std::uintptr_t>(&anchor) > m_stealing_threshold;\n}\n\ninline d1::task* task_dispatcher::get_inbox_or_critical_task(\n    execution_data_ext& ed, mail_inbox& inbox, isolation_type isolation, bool critical_allowed)\n{\n    if (inbox.empty())\n        return nullptr;\n    d1::task* result = get_critical_task(nullptr, ed, isolation, critical_allowed);\n    if (result)\n        return result;\n    // Check if there are tasks mailed to this thread via task-to-thread affinity mechanism.\n    result = get_mailbox_task(inbox, ed, isolation);\n    // There is a race with a thread adding a new task (possibly with suitable isolation)\n    // to our mailbox, so the below conditions might result in a false positive.\n    // Then set_is_idle(false) allows that task to be stolen; it's OK.\n    if (isolation != no_isolation && !result && !inbox.empty() && inbox.is_idle_state(true)) {\n        // We have proxy tasks in our mailbox but the isolation blocks their execution.\n        // So publish the proxy tasks in mailbox to be available for stealing from owner's task pool.\n        inbox.set_is_idle( false );\n    }\n    return result;\n}\n\ninline d1::task* task_dispatcher::get_stream_or_critical_task(\n    execution_data_ext& ed, arena& a, task_stream<front_accessor>& stream, unsigned& hint,\n    isolation_type isolation, bool critical_allowed)\n{\n    if (stream.empty())\n        return nullptr;\n    d1::task* result = get_critical_task(nullptr, ed, isolation, critical_allowed);\n    if (result)\n        return result;\n    return a.get_stream_task(stream, hint);\n}\n\ninline d1::task* task_dispatcher::steal_or_get_critical(\n    execution_data_ext& ed, arena& a, unsigned arena_index, FastRandom& random,\n    isolation_type isolation, bool critical_allowed)\n{\n    if (d1::task* t = a.steal_task(arena_index, random, ed, isolation)) {\n        ed.context = task_accessor::context(*t);\n        ed.isolation = task_accessor::isolation(*t);\n        return get_critical_task(t, ed, isolation, critical_allowed);\n    }\n    return nullptr;\n}\n\ntemplate <bool ITTPossible, typename Waiter>\nd1::task* task_dispatcher::receive_or_steal_task(\n    thread_data& tls, execution_data_ext& ed, Waiter& waiter, isolation_type isolation,\n    bool fifo_allowed, bool critical_allowed)\n{\n    __TBB_ASSERT(governor::is_thread_data_set(&tls), nullptr);\n    // Task to return\n    d1::task* t = nullptr;\n    // Get tls data (again)\n    arena& a = *tls.my_arena;\n    arena_slot& slot = *tls.my_arena_slot;\n    unsigned arena_index = tls.my_arena_index;\n    mail_inbox& inbox = tls.my_inbox;\n    task_stream<front_accessor>& resume_stream = a.my_resume_task_stream;\n    unsigned& resume_hint = slot.hint_for_resume_stream;\n    task_stream<front_accessor>& fifo_stream = a.my_fifo_task_stream;\n    unsigned& fifo_hint = slot.hint_for_fifo_stream;\n\n    waiter.reset_wait();\n    // Thread is in idle state now\n    inbox.set_is_idle(true);\n\n    bool stealing_is_allowed = can_steal();\n\n    // Stealing loop mailbox/enqueue/other_slots\n    for (;;) {\n        __TBB_ASSERT(t == nullptr, nullptr);\n        // Check if the resource manager requires our arena to relinquish some threads\n        // For the external thread restore idle state to true after dispatch loop\n        if (!waiter.continue_execution(slot, t)) {\n            __TBB_ASSERT(t == nullptr, nullptr);\n            break;\n        }\n        // Start searching\n        if (t != nullptr) {\n            // continue_execution returned a task\n        }\n        else if ((t = get_inbox_or_critical_task(ed, inbox, isolation, critical_allowed))) {\n            // Successfully got the task from mailbox or critical task\n        }\n        else if ((t = get_stream_or_critical_task(ed, a, resume_stream, resume_hint, isolation, critical_allowed))) {\n            // Successfully got the resume or critical task\n        }\n        else if (fifo_allowed && isolation == no_isolation\n                 && (t = get_stream_or_critical_task(ed, a, fifo_stream, fifo_hint, isolation, critical_allowed))) {\n            // Checked if there are tasks in starvation-resistant stream. Only allowed at the outermost dispatch level without isolation.\n        }\n        else if (stealing_is_allowed\n                 && (t = steal_or_get_critical(ed, a, arena_index, tls.my_random, isolation, critical_allowed))) {\n            // Stole a task from a random arena slot\n        }\n        else {\n            t = get_critical_task(t, ed, isolation, critical_allowed);\n        }\n\n        if (t != nullptr) {\n            ed.context = task_accessor::context(*t);\n            ed.isolation = task_accessor::isolation(*t);\n            a.my_observers.notify_entry_observers(tls.my_last_observer, tls.my_is_worker);\n            break; // Stealing success, end of stealing attempt\n        }\n        // Nothing to do, pause a little.\n        waiter.pause(slot);\n    } // end of nonlocal task retrieval loop\n\n    __TBB_ASSERT(is_alive(a.my_guard), nullptr);\n    if (inbox.is_idle_state(true)) {\n        inbox.set_is_idle(false);\n    }\n    return t;\n}\n\ntemplate <bool ITTPossible, typename Waiter>\nd1::task* task_dispatcher::local_wait_for_all(d1::task* t, Waiter& waiter ) {\n    assert_pointer_valid(m_thread_data);\n    __TBB_ASSERT(m_thread_data->my_task_dispatcher == this, nullptr);\n\n    // Guard an outer/default execution state\n    struct dispatch_loop_guard {\n        task_dispatcher& task_disp;\n        execution_data_ext old_execute_data_ext;\n        properties old_properties;\n        bool is_initially_registered;\n\n        ~dispatch_loop_guard() {\n            task_disp.m_execute_data_ext = old_execute_data_ext;\n            task_disp.m_properties = old_properties;\n\n            if (!is_initially_registered) {\n                task_disp.m_thread_data->my_arena->my_tc_client.get_pm_client()->unregister_thread();\n                task_disp.m_thread_data->my_is_registered = false;\n            }\n\n            __TBB_ASSERT(task_disp.m_thread_data && governor::is_thread_data_set(task_disp.m_thread_data), nullptr);\n            __TBB_ASSERT(task_disp.m_thread_data->my_task_dispatcher == &task_disp, nullptr);\n        }\n    } dl_guard{ *this, m_execute_data_ext, m_properties, m_thread_data->my_is_registered };\n\n    // The context guard to track fp setting and itt tasks.\n    context_guard_helper</*report_tasks=*/ITTPossible> context_guard;\n\n    // Current isolation context\n    const isolation_type isolation = dl_guard.old_execute_data_ext.isolation;\n\n    // Critical work inflection point. Once turned false current execution context has taken\n    // critical task on the previous stack frame and cannot take more until that critical path is\n    // finished.\n    bool critical_allowed = dl_guard.old_properties.critical_task_allowed;\n\n    // Extended execution data that is used for dispatching.\n    // Base version is passed to the task::execute method.\n    execution_data_ext& ed = m_execute_data_ext;\n    ed.context = t ? task_accessor::context(*t) : nullptr;\n    ed.original_slot = m_thread_data->my_arena_index;\n    ed.affinity_slot = d1::no_slot;\n    ed.task_disp = this;\n    ed.wait_ctx = waiter.wait_ctx();\n\n    m_properties.outermost = false;\n    m_properties.fifo_tasks_allowed = false;\n\n    if (!dl_guard.is_initially_registered) {\n        m_thread_data->my_arena->my_tc_client.get_pm_client()->register_thread();\n        m_thread_data->my_is_registered = true;\n    }\n\n    t = get_critical_task(t, ed, isolation, critical_allowed);\n    if (t && m_thread_data->my_inbox.is_idle_state(true)) {\n        // The thread has a work to do. Therefore, marking its inbox as not idle so that\n        // affinitized tasks can be stolen from it.\n        m_thread_data->my_inbox.set_is_idle(false);\n    }\n\n    // Infinite exception loop\n    for (;;) {\n        try {\n            // Main execution loop\n            do {\n                // We assume that bypass tasks are from the same task group.\n                context_guard.set_ctx(ed.context);\n                // Inner level evaluates tasks coming from nesting loops and those returned\n                // by just executed tasks (bypassing spawn or enqueue calls).\n                while (t != nullptr) {\n                    assert_task_valid(t);\n                    assert_pointer_valid</*alignment = */alignof(void*)>(ed.context);\n                    __TBB_ASSERT(ed.context->my_state == d1::task_group_context::state::bound ||\n                        ed.context->my_state == d1::task_group_context::state::isolated, nullptr);\n                    __TBB_ASSERT(m_thread_data->my_inbox.is_idle_state(false), nullptr);\n                    __TBB_ASSERT(task_accessor::is_resume_task(*t) || isolation == no_isolation || isolation == ed.isolation, nullptr);\n                    // Check premature leave\n                    if (Waiter::postpone_execution(*t)) {\n                        __TBB_ASSERT(task_accessor::is_resume_task(*t) && dl_guard.old_properties.outermost,\n                            \"Currently, the bypass loop can be interrupted only for resume task on outermost level\");\n                        return t;\n                    }\n                    // Copy itt_caller to a stack because the context might be destroyed after t->execute.\n                    void* itt_caller = ed.context->my_itt_caller;\n                    suppress_unused_warning(itt_caller);\n\n                    ITT_CALLEE_ENTER(ITTPossible, t, itt_caller);\n\n                    if (ed.context->is_group_execution_cancelled()) {\n                        t = t->cancel(ed);\n                    } else {\n                        t = t->execute(ed);\n                    }\n\n                    ITT_CALLEE_LEAVE(ITTPossible, itt_caller);\n\n                    // The task affinity in execution data is set for affinitized tasks.\n                    // So drop it after the task execution.\n                    ed.affinity_slot = d1::no_slot;\n                    // Reset task owner id for bypassed task\n                    ed.original_slot = m_thread_data->my_arena_index;\n                    t = get_critical_task(t, ed, isolation, critical_allowed);\n                }\n                __TBB_ASSERT(m_thread_data && governor::is_thread_data_set(m_thread_data), nullptr);\n                __TBB_ASSERT(m_thread_data->my_task_dispatcher == this, nullptr);\n                // When refactoring, pay attention that m_thread_data can be changed after t->execute()\n                __TBB_ASSERT(m_thread_data->my_arena_slot != nullptr, nullptr);\n                arena_slot& slot = *m_thread_data->my_arena_slot;\n                if (!waiter.continue_execution(slot, t)) {\n                    break;\n                }\n                // Retrieve the task from local task pool\n                if (t || (slot.is_task_pool_published() && (t = slot.get_task(ed, isolation)))) {\n                    __TBB_ASSERT(ed.original_slot == m_thread_data->my_arena_index, nullptr);\n                    ed.context = task_accessor::context(*t);\n                    ed.isolation = task_accessor::isolation(*t);\n                    continue;\n                }\n                // Retrieve the task from global sources\n                t = receive_or_steal_task<ITTPossible>(\n                    *m_thread_data, ed, waiter, isolation, dl_guard.old_properties.fifo_tasks_allowed,\n                    critical_allowed\n                );\n            } while (t != nullptr); // main dispatch loop\n            break; // Exit exception loop;\n        } catch (...) {\n            if (global_control::active_value(global_control::terminate_on_exception) == 1) {\n                do_throw_noexcept([] { throw; });\n            }\n            if (ed.context->cancel_group_execution()) {\n                /* We are the first to signal cancellation, so store the exception that caused it. */\n                ed.context->my_exception.store(tbb_exception_ptr::allocate(), std::memory_order_release);\n            }\n        }\n    } // Infinite exception loop\n    __TBB_ASSERT(t == nullptr, nullptr);\n\n\n#if __TBB_RESUMABLE_TASKS\n    if (dl_guard.old_properties.outermost) {\n        recall_point();\n    }\n#endif /* __TBB_RESUMABLE_TASKS */\n\n    return nullptr;\n}\n\n#if __TBB_RESUMABLE_TASKS\ninline void task_dispatcher::recall_point() {\n    if (this != &m_thread_data->my_arena_slot->default_task_dispatcher()) {\n        __TBB_ASSERT(m_suspend_point != nullptr, nullptr);\n        __TBB_ASSERT(m_suspend_point->m_is_owner_recalled.load(std::memory_order_relaxed) == false, nullptr);\n\n        m_thread_data->set_post_resume_action(post_resume_action::notify, get_suspend_point());\n        internal_suspend();\n\n        if (m_thread_data->my_inbox.is_idle_state(true)) {\n            m_thread_data->my_inbox.set_is_idle(false);\n        }\n    }\n}\n#endif /* __TBB_RESUMABLE_TASKS */\n\n#if __TBB_PREVIEW_CRITICAL_TASKS\ninline d1::task* task_dispatcher::get_critical_task(d1::task* t, execution_data_ext& ed, isolation_type isolation, bool critical_allowed) {\n    __TBB_ASSERT( critical_allowed || !m_properties.critical_task_allowed, nullptr );\n\n    if (!critical_allowed) {\n        // The stack is already in the process of critical path execution. Cannot take another\n        // critical work until finish with the current one.\n        __TBB_ASSERT(!m_properties.critical_task_allowed, nullptr);\n        return t;\n    }\n\n    assert_pointers_valid(m_thread_data, m_thread_data->my_arena, m_thread_data->my_arena_slot);\n    thread_data& td = *m_thread_data;\n    arena& a = *td.my_arena;\n    arena_slot& slot = *td.my_arena_slot;\n\n    d1::task* crit_t = a.get_critical_task(slot.hint_for_critical_stream, isolation);\n    if (crit_t != nullptr) {\n        assert_task_valid(crit_t);\n        if (t != nullptr) {\n            assert_pointer_valid</*alignment = */alignof(void*)>(ed.context);\n            r1::spawn(*t, *ed.context);\n        }\n        ed.context = task_accessor::context(*crit_t);\n        ed.isolation = task_accessor::isolation(*crit_t);\n\n        // We cannot execute more than one critical task on the same stack.\n        // In other words, we prevent nested critical tasks.\n        m_properties.critical_task_allowed = false;\n\n        // TODO: add a test that the observer is called when critical task is taken.\n        a.my_observers.notify_entry_observers(td.my_last_observer, td.my_is_worker);\n        t = crit_t;\n    } else {\n        // Was unable to find critical work in the queue. Allow inspecting the queue in nested\n        // invocations. Handles the case when critical task has been just completed.\n        m_properties.critical_task_allowed = true;\n    }\n    return t;\n}\n#else\ninline d1::task* task_dispatcher::get_critical_task(d1::task* t, execution_data_ext&, isolation_type, bool /*critical_allowed*/) {\n    return t;\n}\n#endif\n\ninline d1::task* task_dispatcher::get_mailbox_task(mail_inbox& my_inbox, execution_data_ext& ed, isolation_type isolation) {\n    while (task_proxy* const tp = my_inbox.pop(isolation)) {\n        if (d1::task* result = tp->extract_task<task_proxy::mailbox_bit>()) {\n            ed.original_slot = (unsigned short)(-2);\n            ed.affinity_slot = ed.task_disp->m_thread_data->my_arena_index;\n            return result;\n        }\n        // We have exclusive access to the proxy, and can destroy it.\n        tp->allocator.delete_object(tp, ed);\n    }\n    return nullptr;\n}\n\ntemplate <typename Waiter>\nd1::task* task_dispatcher::local_wait_for_all(d1::task* t, Waiter& waiter) {\n    if (governor::is_itt_present()) {\n        return local_wait_for_all</*ITTPossible = */ true>(t, waiter);\n    } else {\n        return local_wait_for_all</*ITTPossible = */ false>(t, waiter);\n    }\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif // _TBB_task_dispatcher_H\n\n"
  },
  {
    "path": "third-party/tbb/src/tbb/task_group_context.cpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/detail/_config.h\"\n#include \"oneapi/tbb/tbb_allocator.h\"\n#include \"oneapi/tbb/task_group.h\"\n#include \"governor.h\"\n#include \"thread_data.h\"\n#include \"scheduler_common.h\"\n#include \"itt_notify.h\"\n#include \"task_dispatcher.h\"\n\n#include <type_traits>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n//------------------------------------------------------------------------\n// tbb_exception_ptr\n//------------------------------------------------------------------------\ntbb_exception_ptr* tbb_exception_ptr::allocate() noexcept {\n    tbb_exception_ptr* eptr = (tbb_exception_ptr*)allocate_memory(sizeof(tbb_exception_ptr));\n    return eptr ? new (eptr) tbb_exception_ptr(std::current_exception()) : nullptr;\n}\n\nvoid tbb_exception_ptr::destroy() noexcept {\n    this->~tbb_exception_ptr();\n    deallocate_memory(this);\n}\n\nvoid tbb_exception_ptr::throw_self() {\n    if (governor::rethrow_exception_broken()) fix_broken_rethrow();\n    std::rethrow_exception(my_ptr);\n}\n\n//------------------------------------------------------------------------\n// task_group_context\n//------------------------------------------------------------------------\n\nvoid task_group_context_impl::destroy(d1::task_group_context& ctx) {\n    __TBB_ASSERT(!is_poisoned(ctx.my_context_list), nullptr);\n\n    if (ctx.my_context_list != nullptr) {\n        __TBB_ASSERT(ctx.my_state.load(std::memory_order_relaxed) == d1::task_group_context::state::bound, nullptr);\n        // The owner can be destroyed at any moment. Access the associate data with caution.\n        ctx.my_context_list->remove(ctx.my_node);\n    }\n    d1::cpu_ctl_env* ctl = reinterpret_cast<d1::cpu_ctl_env*>(&ctx.my_cpu_ctl_env);\n#if _MSC_VER && _MSC_VER <= 1900 && !__INTEL_COMPILER\n    suppress_unused_warning(ctl);\n#endif\n    ctl->~cpu_ctl_env();\n\n    auto exception = ctx.my_exception.load(std::memory_order_relaxed);\n    if (exception) {\n        exception->destroy();\n    }\n    ITT_STACK_DESTROY(ctx.my_itt_caller);\n\n    poison_pointer(ctx.my_parent);\n    poison_pointer(ctx.my_context_list);\n    poison_pointer(ctx.my_node.my_next_node);\n    poison_pointer(ctx.my_node.my_prev_node);\n    poison_pointer(ctx.my_exception);\n    poison_pointer(ctx.my_itt_caller);\n\n    ctx.my_state.store(d1::task_group_context::state::dead, std::memory_order_release);\n}\n\nvoid task_group_context_impl::initialize(d1::task_group_context& ctx) {\n    ITT_TASK_GROUP(&ctx, ctx.my_name, nullptr);\n\n    ctx.my_node.my_next_node = &ctx.my_node;\n    ctx.my_node.my_prev_node = &ctx.my_node;\n    ctx.my_cpu_ctl_env = 0;\n    ctx.my_cancellation_requested = 0;\n    ctx.my_may_have_children.store(0, std::memory_order_relaxed);\n    // Set the created state to bound at the first usage.\n    ctx.my_state.store(d1::task_group_context::state::created, std::memory_order_relaxed);\n    ctx.my_parent = nullptr;\n    ctx.my_context_list = nullptr;\n    ctx.my_exception.store(nullptr, std::memory_order_relaxed);\n    ctx.my_itt_caller = nullptr;\n\n    static_assert(sizeof(d1::cpu_ctl_env) <= sizeof(ctx.my_cpu_ctl_env), \"FPU settings storage does not fit to uint64_t\");\n    d1::cpu_ctl_env* ctl = new (&ctx.my_cpu_ctl_env) d1::cpu_ctl_env;\n    if (ctx.my_traits.fp_settings)\n        ctl->get_env();\n}\n\nvoid task_group_context_impl::register_with(d1::task_group_context& ctx, thread_data* td) {\n    __TBB_ASSERT(!is_poisoned(ctx.my_context_list), nullptr);\n    __TBB_ASSERT(td, nullptr);\n    ctx.my_context_list = td->my_context_list;\n\n    ctx.my_context_list->push_front(ctx.my_node);\n}\n\nvoid task_group_context_impl::bind_to_impl(d1::task_group_context& ctx, thread_data* td) {\n    __TBB_ASSERT(!is_poisoned(ctx.my_context_list), nullptr);\n    __TBB_ASSERT(ctx.my_state.load(std::memory_order_relaxed) == d1::task_group_context::state::locked, \"The context can be bound only under the lock.\");\n    __TBB_ASSERT(!ctx.my_parent, \"Parent is set before initial binding\");\n\n    ctx.my_parent = td->my_task_dispatcher->m_execute_data_ext.context;\n    __TBB_ASSERT(ctx.my_parent, nullptr);\n\n    // Inherit FPU settings only if the context has not captured FPU settings yet.\n    if (!ctx.my_traits.fp_settings)\n        copy_fp_settings(ctx, *ctx.my_parent);\n\n    // Condition below prevents unnecessary thrashing parent context's cache line\n    if (ctx.my_parent->my_may_have_children.load(std::memory_order_relaxed) != d1::task_group_context::may_have_children) {\n        ctx.my_parent->my_may_have_children.store(d1::task_group_context::may_have_children, std::memory_order_relaxed); // full fence is below\n    }\n    if (ctx.my_parent->my_parent) {\n        // Even if this context were made accessible for state change propagation\n        // (by placing store_with_release(td->my_context_list_state.head.my_next, &ctx.my_node)\n        // above), it still could be missed if state propagation from a grand-ancestor\n        // was underway concurrently with binding.\n        // Speculative propagation from the parent together with epoch counters\n        // detecting possibility of such a race allow to avoid taking locks when\n        // there is no contention.\n\n        // Acquire fence is necessary to prevent reordering subsequent speculative\n        // loads of parent state data out of the scope where epoch counters comparison\n        // can reliably validate it.\n        uintptr_t local_count_snapshot = ctx.my_parent->my_context_list->epoch.load(std::memory_order_acquire);\n        // Speculative propagation of parent's state. The speculation will be\n        // validated by the epoch counters check further on.\n        ctx.my_cancellation_requested.store(ctx.my_parent->my_cancellation_requested.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        register_with(ctx, td); // Issues full fence\n\n        // If no state propagation was detected by the following condition, the above\n        // full fence guarantees that the parent had correct state during speculative\n        // propagation before the fence. Otherwise the propagation from parent is\n        // repeated under the lock.\n        if (local_count_snapshot != the_context_state_propagation_epoch.load(std::memory_order_relaxed)) {\n            // Another thread may be propagating state change right now. So resort to lock.\n            context_state_propagation_mutex_type::scoped_lock lock(the_context_state_propagation_mutex);\n            ctx.my_cancellation_requested.store(ctx.my_parent->my_cancellation_requested.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        }\n    } else {\n        register_with(ctx, td); // Issues full fence\n        // As we do not have grand-ancestors, concurrent state propagation (if any)\n        // may originate only from the parent context, and thus it is safe to directly\n        // copy the state from it.\n        ctx.my_cancellation_requested.store(ctx.my_parent->my_cancellation_requested.load(std::memory_order_relaxed), std::memory_order_relaxed);\n    }\n}\n\nvoid task_group_context_impl::bind_to(d1::task_group_context& ctx, thread_data* td) {\n    d1::task_group_context::state state = ctx.my_state.load(std::memory_order_acquire);\n    if (state <= d1::task_group_context::state::locked) {\n        if (state == d1::task_group_context::state::created &&\n#if defined(__INTEL_COMPILER) && __INTEL_COMPILER <= 1910\n            ((std::atomic<typename std::underlying_type<d1::task_group_context::state>::type>&)ctx.my_state).compare_exchange_strong(\n                (typename std::underlying_type<d1::task_group_context::state>::type&)state,\n                (typename std::underlying_type<d1::task_group_context::state>::type)d1::task_group_context::state::locked)\n#else\n            ctx.my_state.compare_exchange_strong(state, d1::task_group_context::state::locked)\n#endif\n            ) {\n            // If we are in the outermost task dispatch loop of an external thread, then\n            // there is nothing to bind this context to, and we skip the binding part\n            // treating the context as isolated.\n            __TBB_ASSERT(td->my_task_dispatcher->m_execute_data_ext.context != nullptr, nullptr);\n            d1::task_group_context::state release_state{};\n            if (td->my_task_dispatcher->m_execute_data_ext.context == td->my_arena->my_default_ctx || !ctx.my_traits.bound) {\n                if (!ctx.my_traits.fp_settings) {\n                    copy_fp_settings(ctx, *td->my_arena->my_default_ctx);\n                }\n                release_state = d1::task_group_context::state::isolated;\n            } else {\n                bind_to_impl(ctx, td);\n                release_state = d1::task_group_context::state::bound;\n            }\n            ITT_STACK_CREATE(ctx.my_itt_caller);\n            ctx.my_state.store(release_state, std::memory_order_release);\n        }\n        spin_wait_while_eq(ctx.my_state, d1::task_group_context::state::locked);\n    }\n    __TBB_ASSERT(ctx.my_state.load(std::memory_order_relaxed) != d1::task_group_context::state::created, nullptr);\n    __TBB_ASSERT(ctx.my_state.load(std::memory_order_relaxed) != d1::task_group_context::state::locked, nullptr);\n}\n\nvoid task_group_context_impl::propagate_task_group_state(d1::task_group_context& ctx, std::atomic<std::uint32_t> d1::task_group_context::* mptr_state, d1::task_group_context& src, std::uint32_t new_state) {\n    __TBB_ASSERT(!is_poisoned(ctx.my_context_list), nullptr);\n    /*  1. if ((ctx.*mptr_state).load(std::memory_order_relaxed) == new_state):\n            Nothing to do, whether descending from \"src\" or not, so no need to scan.\n            Hopefully this happens often thanks to earlier invocations.\n            This optimization is enabled by LIFO order in the context lists:\n                - new contexts are bound to the beginning of lists;\n                - descendants are newer than ancestors;\n                - earlier invocations are therefore likely to \"paint\" long chains.\n        2. if (&ctx != &src):\n            This clause is disjunct from the traversal below, which skips src entirely.\n            Note that src.*mptr_state is not necessarily still equal to new_state (another thread may have changed it again).\n            Such interference is probably not frequent enough to aim for optimisation by writing new_state again (to make the other thread back down).\n            Letting the other thread prevail may also be fairer.\n    */\n    if ((ctx.*mptr_state).load(std::memory_order_relaxed) != new_state && &ctx != &src) {\n        for (d1::task_group_context* ancestor = ctx.my_parent; ancestor != nullptr; ancestor = ancestor->my_parent) {\n            if (ancestor == &src) {\n                for (d1::task_group_context* c = &ctx; c != ancestor; c = c->my_parent)\n                    (c->*mptr_state).store(new_state, std::memory_order_relaxed);\n                break;\n            }\n        }\n    }\n}\n\nbool task_group_context_impl::cancel_group_execution(d1::task_group_context& ctx) {\n    __TBB_ASSERT(!is_poisoned(ctx.my_context_list), nullptr);\n    __TBB_ASSERT(ctx.my_cancellation_requested.load(std::memory_order_relaxed) <= 1, \"The cancellation state can be either 0 or 1\");\n    if (ctx.my_cancellation_requested.load(std::memory_order_relaxed) || ctx.my_cancellation_requested.exchange(1)) {\n        // This task group and any descendants have already been canceled.\n        // (A newly added descendant would inherit its parent's ctx.my_cancellation_requested,\n        // not missing out on any cancellation still being propagated, and a context cannot be uncanceled.)\n        return false;\n    }\n    governor::get_thread_data()->my_arena->my_threading_control->propagate_task_group_state(&d1::task_group_context::my_cancellation_requested, ctx, uint32_t(1));\n    return true;\n}\n\nbool task_group_context_impl::is_group_execution_cancelled(const d1::task_group_context& ctx) {\n    return ctx.my_cancellation_requested.load(std::memory_order_relaxed) != 0;\n}\n\n// IMPORTANT: It is assumed that this method is not used concurrently!\nvoid task_group_context_impl::reset(d1::task_group_context& ctx) {\n    __TBB_ASSERT(!is_poisoned(ctx.my_context_list), nullptr);\n    //! TODO: Add assertion that this context does not have children\n    // No fences are necessary since this context can be accessed from another thread\n    // only after stealing happened (which means necessary fences were used).\n\n    auto exception = ctx.my_exception.load(std::memory_order_relaxed);\n    if (exception) {\n        exception->destroy();\n        ctx.my_exception.store(nullptr, std::memory_order_relaxed);\n    }\n    ctx.my_cancellation_requested = 0;\n}\n\n// IMPORTANT: It is assumed that this method is not used concurrently!\nvoid task_group_context_impl::capture_fp_settings(d1::task_group_context& ctx) {\n    __TBB_ASSERT(!is_poisoned(ctx.my_context_list), nullptr);\n    //! TODO: Add assertion that this context does not have children\n    // No fences are necessary since this context can be accessed from another thread\n    // only after stealing happened (which means necessary fences were used).\n    d1::cpu_ctl_env* ctl = reinterpret_cast<d1::cpu_ctl_env*>(&ctx.my_cpu_ctl_env);\n    if (!ctx.my_traits.fp_settings) {\n        ctl = new (&ctx.my_cpu_ctl_env) d1::cpu_ctl_env;\n        ctx.my_traits.fp_settings = true;\n    }\n    ctl->get_env();\n}\n\nvoid task_group_context_impl::copy_fp_settings(d1::task_group_context& ctx, const d1::task_group_context& src) {\n    __TBB_ASSERT(!is_poisoned(ctx.my_context_list), nullptr);\n    __TBB_ASSERT(!ctx.my_traits.fp_settings, \"The context already has FPU settings.\");\n    __TBB_ASSERT(src.my_traits.fp_settings, \"The source context does not have FPU settings.\");\n\n    const d1::cpu_ctl_env* src_ctl = reinterpret_cast<const d1::cpu_ctl_env*>(&src.my_cpu_ctl_env);\n    new (&ctx.my_cpu_ctl_env) d1::cpu_ctl_env(*src_ctl);\n    ctx.my_traits.fp_settings = true;\n}\n\n/*\n    Comments:\n\n1.  The premise of the cancellation support implementation is that cancellations are\n    not part of the hot path of the program execution. Therefore all changes in its\n    implementation in order to reduce the overhead of the cancellation control flow\n    should be done only in ways that do not increase overhead of the normal execution.\n\n    In general, contexts are used by all threads and their descendants are created in\n    different threads as well. In order to minimize impact of the cross-thread tree\n    maintenance (first of all because of the synchronization), the tree of contexts\n    is split into pieces, each of which is handled by a single thread. Such pieces\n    are represented as lists of contexts, members of which are contexts that were\n    bound to their parents in the given thread.\n\n    The context tree maintenance and cancellation propagation algorithms are designed\n    in such a manner that cross-thread access to a context list will take place only\n    when cancellation signal is sent (by user or when an exception happens), and\n    synchronization is necessary only then. Thus the normal execution flow (without\n    exceptions and cancellation) remains free from any synchronization done on\n    behalf of exception handling and cancellation support.\n\n2.  Consider parallel cancellations at the different levels of the context tree:\n\n        Ctx1 <- Cancelled by Thread1            |- Thread2 started processing\n         |                                      |\n        Ctx2                                    |- Thread1 started processing\n         |                                   T1 |- Thread2 finishes and syncs up local counters\n        Ctx3 <- Cancelled by Thread2            |\n         |                                      |- Ctx5 is bound to Ctx2\n        Ctx4                                    |\n                                             T2 |- Thread1 reaches Ctx2\n\n    Thread-propagator of each cancellation increments global counter. However the thread\n    propagating the cancellation from the outermost context (Thread1) may be the last\n    to finish. Which means that the local counters may be synchronized earlier (by Thread2,\n    at Time1) than it propagated cancellation into Ctx2 (at time Time2). If a new context\n    (Ctx5) is created and bound to Ctx2 between Time1 and Time2, checking its parent only\n    (Ctx2) may result in cancellation request being lost.\n\n    This issue is solved by doing the whole propagation under the lock.\n\n    If we need more concurrency while processing parallel cancellations, we could try\n    the following modification of the propagation algorithm:\n\n    advance global counter and remember it\n    for each thread:\n        scan thread's list of contexts\n    for each thread:\n        sync up its local counter only if the global counter has not been changed\n\n    However this version of the algorithm requires more analysis and verification.\n*/\n\nvoid __TBB_EXPORTED_FUNC initialize(d1::task_group_context& ctx) {\n    task_group_context_impl::initialize(ctx);\n}\nvoid __TBB_EXPORTED_FUNC destroy(d1::task_group_context& ctx) {\n    task_group_context_impl::destroy(ctx);\n}\nvoid __TBB_EXPORTED_FUNC reset(d1::task_group_context& ctx) {\n    task_group_context_impl::reset(ctx);\n}\nbool __TBB_EXPORTED_FUNC cancel_group_execution(d1::task_group_context& ctx) {\n    return task_group_context_impl::cancel_group_execution(ctx);\n}\nbool __TBB_EXPORTED_FUNC is_group_execution_cancelled(d1::task_group_context& ctx) {\n    return task_group_context_impl::is_group_execution_cancelled(ctx);\n}\nvoid __TBB_EXPORTED_FUNC capture_fp_settings(d1::task_group_context& ctx) {\n    task_group_context_impl::capture_fp_settings(ctx);\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n"
  },
  {
    "path": "third-party/tbb/src/tbb/task_stream.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_task_stream_H\n#define _TBB_task_stream_H\n\n//! This file is a possible future replacement for the task_stream class implemented in\n//! task_stream.h. It refactors the code and extends task_stream capabilities by moving lane\n//! management during operations on caller side. Despite the fact that new implementation should not\n//! affect performance of the original task stream, analysis on this subject was not made at the\n//! time it was developed. In addition, it is not clearly seen at the moment that this container\n//! would be suitable for critical tasks due to linear time complexity on its operations.\n\n#include \"oneapi/tbb/detail/_utils.h\"\n#include \"oneapi/tbb/cache_aligned_allocator.h\"\n#include \"oneapi/tbb/mutex.h\"\n\n#include \"scheduler_common.h\"\n#include \"misc.h\" // for FastRandom\n\n#include <deque>\n#include <climits>\n#include <atomic>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n//! Essentially, this is just a pair of a queue and a mutex to protect the queue.\n/** The reason std::pair is not used is that the code would look less clean\n    if field names were replaced with 'first' and 'second'. **/\ntemplate< typename T, typename mutex_t >\nstruct alignas(max_nfs_size) queue_and_mutex {\n    typedef std::deque< T, cache_aligned_allocator<T> > queue_base_t;\n\n    queue_base_t my_queue{};\n    mutex_t      my_mutex{};\n};\n\nusing population_t = uintptr_t;\nconst population_t one = 1;\n\ninline void set_one_bit( std::atomic<population_t>& dest, int pos ) {\n    __TBB_ASSERT( pos>=0, nullptr);\n    __TBB_ASSERT( pos<int(sizeof(population_t)*CHAR_BIT), nullptr);\n    dest.fetch_or( one<<pos );\n}\n\ninline void clear_one_bit( std::atomic<population_t>& dest, int pos ) {\n    __TBB_ASSERT( pos>=0, nullptr);\n    __TBB_ASSERT( pos<int(sizeof(population_t)*CHAR_BIT), nullptr);\n    dest.fetch_and( ~(one<<pos) );\n}\n\ninline bool is_bit_set( population_t val, int pos ) {\n    __TBB_ASSERT( pos>=0, nullptr);\n    __TBB_ASSERT( pos<int(sizeof(population_t)*CHAR_BIT), nullptr);\n    return (val & (one<<pos)) != 0;\n}\n\nstruct random_lane_selector :\n#if __INTEL_COMPILER == 1110 || __INTEL_COMPILER == 1500\n        no_assign\n#else\n        no_copy\n#endif\n{\n    random_lane_selector( FastRandom& random ) : my_random( random ) {}\n    unsigned operator()( unsigned out_of ) const {\n        __TBB_ASSERT( ((out_of-1) & out_of) == 0, \"number of lanes is not power of two.\" );\n        return my_random.get() & (out_of-1);\n    }\nprivate:\n    FastRandom& my_random;\n};\n\nstruct lane_selector_base :\n#if __INTEL_COMPILER == 1110 || __INTEL_COMPILER == 1500\n        no_assign\n#else\n        no_copy\n#endif\n{\n    unsigned& my_previous;\n    lane_selector_base( unsigned& previous ) : my_previous( previous ) {}\n};\n\nstruct subsequent_lane_selector : lane_selector_base {\n    subsequent_lane_selector( unsigned& previous ) : lane_selector_base( previous ) {}\n    unsigned operator()( unsigned out_of ) const {\n        __TBB_ASSERT( ((out_of-1) & out_of) == 0, \"number of lanes is not power of two.\" );\n        return (++my_previous &= out_of-1);\n    }\n};\n\nstruct preceding_lane_selector : lane_selector_base {\n    preceding_lane_selector( unsigned& previous ) : lane_selector_base( previous ) {}\n    unsigned operator()( unsigned out_of ) const {\n        __TBB_ASSERT( ((out_of-1) & out_of) == 0, \"number of lanes is not power of two.\" );\n        return (--my_previous &= (out_of-1));\n    }\n};\n\n//! Specializes from which side of the underlying container elements are retrieved. Method must be\n//! called under corresponding mutex locked.\ntemplate<task_stream_accessor_type accessor>\nclass task_stream_accessor : no_copy {\nprotected:\n    using lane_t = queue_and_mutex <d1::task*, mutex>;\n    d1::task* get_item( lane_t::queue_base_t& queue ) {\n        d1::task* result = queue.front();\n        queue.pop_front();\n        return result;\n    }\n};\n\ntemplate<>\nclass task_stream_accessor< back_nonnull_accessor > : no_copy {\nprotected:\n    using lane_t = queue_and_mutex <d1::task*, mutex>;\n    d1::task* get_item( lane_t::queue_base_t& queue ) {\n        d1::task* result = nullptr;\n        __TBB_ASSERT(!queue.empty(), nullptr);\n        // Isolated task can put zeros in queue see look_specific\n        do {\n            result = queue.back();\n            queue.pop_back();\n        } while ( !result && !queue.empty() );\n        return result;\n    }\n};\n\n//! The container for \"fairness-oriented\" aka \"enqueued\" tasks.\ntemplate<task_stream_accessor_type accessor>\nclass task_stream : public task_stream_accessor< accessor > {\n    using lane_t = typename task_stream_accessor<accessor>::lane_t;\n    std::atomic<population_t> population{};\n    lane_t* lanes{nullptr};\n    unsigned N{};\n\npublic:\n    task_stream() = default;\n\n    void initialize( unsigned n_lanes ) {\n        const unsigned max_lanes = sizeof(population_t) * CHAR_BIT;\n\n        N = n_lanes >= max_lanes ? max_lanes : n_lanes > 2 ? 1 << (tbb::detail::log2(n_lanes - 1) + 1) : 2;\n        __TBB_ASSERT( N == max_lanes || (N >= n_lanes && ((N - 1) & N) == 0), \"number of lanes miscalculated\" );\n        __TBB_ASSERT( N <= sizeof(population_t) * CHAR_BIT, nullptr);\n        lanes = static_cast<lane_t*>(cache_aligned_allocate(sizeof(lane_t) * N));\n        for (unsigned i = 0; i < N; ++i) {\n            new (lanes + i) lane_t;\n        }\n        __TBB_ASSERT( !population.load(std::memory_order_relaxed), nullptr);\n    }\n\n    ~task_stream() {\n        if (lanes) {\n            for (unsigned i = 0; i < N; ++i) {\n                lanes[i].~lane_t();\n            }\n            cache_aligned_deallocate(lanes);\n        }\n    }\n\n    //! Push a task into a lane. Lane selection is performed by passed functor.\n    template<typename lane_selector_t>\n    void push(d1::task* source, const lane_selector_t& next_lane ) {\n        bool succeed = false;\n        unsigned lane = 0;\n        do {\n            lane = next_lane( /*out_of=*/N );\n            __TBB_ASSERT( lane < N, \"Incorrect lane index.\" );\n        } while( ! (succeed = try_push( source, lane )) );\n    }\n\n    //! Try finding and popping a task using passed functor for lane selection. Last used lane is\n    //! updated inside lane selector.\n    template<typename lane_selector_t>\n    d1::task* pop( const lane_selector_t& next_lane ) {\n        d1::task* popped = nullptr;\n        unsigned lane = 0;\n        for (atomic_backoff b; !empty() && !popped; b.pause()) {\n            lane = next_lane( /*out_of=*/N);\n            __TBB_ASSERT(lane < N, \"Incorrect lane index.\");\n            popped = try_pop(lane);\n        }\n        return popped;\n    }\n\n    //! Try finding and popping a related task.\n    d1::task* pop_specific( unsigned& last_used_lane, isolation_type isolation ) {\n        d1::task* result = nullptr;\n        // Lane selection is round-robin in backward direction.\n        unsigned idx = last_used_lane & (N-1);\n        do {\n            if( is_bit_set( population.load(std::memory_order_relaxed), idx ) ) {\n                lane_t& lane = lanes[idx];\n                mutex::scoped_lock lock;\n                if( lock.try_acquire(lane.my_mutex) && !lane.my_queue.empty() ) {\n                    result = look_specific( lane.my_queue, isolation );\n                    if( lane.my_queue.empty() )\n                        clear_one_bit( population, idx );\n                    if( result )\n                        break;\n                }\n            }\n            idx=(idx-1)&(N-1);\n        } while( !empty() && idx != last_used_lane );\n        last_used_lane = idx;\n        return result;\n    }\n\n    //! Checks existence of a task.\n    bool empty() {\n        return !population.load(std::memory_order_relaxed);\n    }\n\nprivate:\n    //! Returns true on successful push, otherwise - false.\n    bool try_push(d1::task* source, unsigned lane_idx ) {\n        mutex::scoped_lock lock;\n        if( lock.try_acquire( lanes[lane_idx].my_mutex ) ) {\n            lanes[lane_idx].my_queue.push_back( source );\n            set_one_bit( population, lane_idx ); // TODO: avoid atomic op if the bit is already set\n            return true;\n        }\n        return false;\n    }\n\n    //! Returns pointer to task on successful pop, otherwise - nullptr.\n    d1::task* try_pop( unsigned lane_idx ) {\n        if( !is_bit_set( population.load(std::memory_order_relaxed), lane_idx ) )\n            return nullptr;\n        d1::task* result = nullptr;\n        lane_t& lane = lanes[lane_idx];\n        mutex::scoped_lock lock;\n        if( lock.try_acquire( lane.my_mutex ) && !lane.my_queue.empty() ) {\n            result = this->get_item( lane.my_queue );\n            if( lane.my_queue.empty() )\n                clear_one_bit( population, lane_idx );\n        }\n        return result;\n    }\n\n    // TODO: unify '*_specific' logic with 'pop' methods above\n    d1::task* look_specific( typename lane_t::queue_base_t& queue, isolation_type isolation ) {\n        __TBB_ASSERT( !queue.empty(), nullptr);\n        // TODO: add a worst-case performance test and consider an alternative container with better\n        // performance for isolation search.\n        typename lane_t::queue_base_t::iterator curr = queue.end();\n        do {\n            // TODO: consider logic from get_task to simplify the code.\n            d1::task* result = *--curr;\n            if( result && task_accessor::isolation(*result) == isolation ) {\n                if( queue.end() - curr == 1 )\n                    queue.pop_back(); // a little of housekeeping along the way\n                else\n                    *curr = nullptr;      // grabbing task with the same isolation\n                // TODO: move one of the container's ends instead if the task has been found there\n                return result;\n            }\n        } while( curr != queue.begin() );\n        return nullptr;\n    }\n\n}; // task_stream\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /* _TBB_task_stream_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/tbb.rc",
    "content": "// Copyright (c) 2005-2025 Intel Corporation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Includes\n//\n#include <winresrc.h>\n#include \"../../include/oneapi/tbb/version.h\"\n\n/////////////////////////////////////////////////////////////////////////////\n// Neutral resources\n\n#ifdef _WIN32\nLANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL\n#pragma code_page(1252)\n#endif //_WIN32\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Version\n//\n#define TBB_VERNUMBERS TBB_VERSION_MAJOR,TBB_VERSION_MINOR,TBB_VERSION_PATCH\n#define TBB_VERSION TBB_VERSION_STRING\n\nVS_VERSION_INFO VERSIONINFO\n FILEVERSION TBB_VERNUMBERS\n PRODUCTVERSION TBB_VERNUMBERS\n FILEFLAGSMASK 0x17L\n#ifdef _DEBUG\n FILEFLAGS 0x1L\n#else\n FILEFLAGS 0x0L\n#endif\n FILEOS 0x40004L\n FILETYPE 0x2L\n FILESUBTYPE 0x0L\nBEGIN\n    BLOCK \"StringFileInfo\"\n    BEGIN\n        BLOCK \"000004b0\"\n        BEGIN\n            VALUE \"CompanyName\", \"Intel Corporation\\0\"\n            VALUE \"FileDescription\", \"oneAPI Threading Building Blocks (oneTBB) library\\0\"\n            VALUE \"FileVersion\", TBB_VERSION \"\\0\"\n            VALUE \"LegalCopyright\", \"Copyright 2005-2025 Intel Corporation.  All Rights Reserved.\\0\"\n            VALUE \"LegalTrademarks\", \"\\0\"\n#ifndef TBB_USE_DEBUG\n            VALUE \"OriginalFilename\", \"tbb12.dll\\0\"\n#else\n            VALUE \"OriginalFilename\", \"tbb12_debug.dll\\0\"\n#endif\n            VALUE \"ProductName\", \"oneAPI Threading Building Blocks (oneTBB)\\0\"\n            VALUE \"ProductVersion\", TBB_VERSION \"\\0\"\n            VALUE \"PrivateBuild\", \"\\0\"\n            VALUE \"SpecialBuild\", \"\\0\"\n        END\n    END\n    BLOCK \"VarFileInfo\"\n    BEGIN\n        VALUE \"Translation\", 0x0, 1200\n    END\nEND\n"
  },
  {
    "path": "third-party/tbb/src/tbb/tcm.h",
    "content": "/*\n    Copyright (c) 2023-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_tcm_H\n#define _TBB_tcm_H\n\n#include <stdint.h>\n#include <stdbool.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// Support for the TCM API return value\n\ntypedef enum _tcm_result_t {\n  TCM_RESULT_SUCCESS = 0x0,\n  TCM_RESULT_ERROR_INVALID_ARGUMENT = 0x78000004,\n  TCM_RESULT_ERROR_UNKNOWN = 0x7ffffffe\n} tcm_result_t;\n\n// Support for permit states\n\nenum tcm_permit_states_t {\n  TCM_PERMIT_STATE_VOID,\n  TCM_PERMIT_STATE_INACTIVE,\n  TCM_PERMIT_STATE_PENDING,\n  TCM_PERMIT_STATE_IDLE,\n  TCM_PERMIT_STATE_ACTIVE\n};\n\ntypedef uint8_t tcm_permit_state_t;\n\n// Support for permit flags\n\ntypedef struct _tcm_permit_flags_t {\n  uint32_t stale : 1;\n  uint32_t rigid_concurrency : 1;\n  uint32_t exclusive : 1;\n  uint32_t request_as_inactive : 1;\n  uint32_t reserved : 28;\n} tcm_permit_flags_t;\n\ntypedef struct _tcm_callback_flags_t {\n  uint32_t new_concurrency : 1;\n  uint32_t new_state : 1;\n  uint32_t reserved : 30;\n} tcm_callback_flags_t;\n\n// Support for cpu masks\n\nstruct hwloc_bitmap_s;\ntypedef struct hwloc_bitmap_s* hwloc_bitmap_t;\ntypedef hwloc_bitmap_t tcm_cpu_mask_t;\n\n// Support for ids\n\ntypedef uint64_t tcm_client_id_t;\n\n// Support for permits\n\ntypedef struct _tcm_permit_t {\n  uint32_t* concurrencies;\n  tcm_cpu_mask_t* cpu_masks;\n  uint32_t size;\n  tcm_permit_state_t state;\n  tcm_permit_flags_t flags;\n} tcm_permit_t;\n\n// Support for permit handle\n\ntypedef struct tcm_permit_rep_t* tcm_permit_handle_t;\n\n// Support for constraints\n\ntypedef int32_t tcm_numa_node_t;\ntypedef int32_t tcm_core_type_t;\n\nconst int8_t tcm_automatic = -1;\nconst int8_t tcm_any = -2;\n\n#define TCM_PERMIT_REQUEST_CONSTRAINTS_INITIALIZER {tcm_automatic, tcm_automatic, NULL, \\\n                                                     tcm_automatic, tcm_automatic, tcm_automatic}\n\ntypedef struct _tcm_cpu_constraints_t {\n  int32_t min_concurrency;\n  int32_t max_concurrency;\n  tcm_cpu_mask_t mask;\n  tcm_numa_node_t numa_id;\n  tcm_core_type_t core_type_id;\n  int32_t threads_per_core;\n} tcm_cpu_constraints_t;\n\n// Support for priorities\n\nenum tcm_request_priorities_t {\n  TCM_REQUEST_PRIORITY_LOW    = (INT32_MAX / 4) * 1,\n  TCM_REQUEST_PRIORITY_NORMAL = (INT32_MAX / 4) * 2,\n  TCM_REQUEST_PRIORITY_HIGH   = (INT32_MAX / 4) * 3\n};\n\ntypedef int32_t tcm_request_priority_t;\n\n// Support for requests\n\n#define TCM_PERMIT_REQUEST_INITIALIZER {tcm_automatic, tcm_automatic, \\\n                                         NULL, 0, TCM_REQUEST_PRIORITY_NORMAL, {}, {}}\n\ntypedef struct _tcm_permit_request_t {\n  int32_t min_sw_threads;\n  int32_t max_sw_threads;\n  tcm_cpu_constraints_t* cpu_constraints;\n  uint32_t constraints_size;\n  tcm_request_priority_t priority;\n  tcm_permit_flags_t flags;\n  char reserved[4];\n} tcm_permit_request_t;\n\n// Support for client callback\n\ntypedef tcm_result_t (*tcm_callback_t)(tcm_permit_handle_t p, void* callback_arg, tcm_callback_flags_t);\n\n#if _WIN32\n  #define __TCM_EXPORT __declspec(dllexport)\n#else\n  #define __TCM_EXPORT\n#endif\n\n\n__TCM_EXPORT tcm_result_t tcmConnect(tcm_callback_t callback,\n                                     tcm_client_id_t *client_id);\n__TCM_EXPORT tcm_result_t tcmDisconnect(tcm_client_id_t client_id);\n\n__TCM_EXPORT tcm_result_t tcmRequestPermit(tcm_client_id_t client_id,\n                                           tcm_permit_request_t request,\n                                           void* callback_arg,\n                                           tcm_permit_handle_t* permit_handle,\n                                           tcm_permit_t* permit);\n\n__TCM_EXPORT tcm_result_t tcmGetPermitData(tcm_permit_handle_t permit_handle,\n                                           tcm_permit_t* permit);\n\n__TCM_EXPORT tcm_result_t tcmReleasePermit(tcm_permit_handle_t permit);\n\n__TCM_EXPORT tcm_result_t tcmIdlePermit(tcm_permit_handle_t permit_handle);\n\n__TCM_EXPORT tcm_result_t tcmDeactivatePermit(tcm_permit_handle_t permit_handle);\n\n__TCM_EXPORT tcm_result_t tcmActivatePermit(tcm_permit_handle_t permit_handle);\n\n__TCM_EXPORT tcm_result_t tcmRegisterThread(tcm_permit_handle_t permit_handle);\n\n__TCM_EXPORT tcm_result_t tcmUnregisterThread();\n\n__TCM_EXPORT tcm_result_t tcmGetVersionInfo(char* buffer, uint32_t buffer_size);\n\n#ifdef __cplusplus\n} // extern \"C\"\n#endif\n\n#endif /* _TBB_tcm_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/tcm_adaptor.cpp",
    "content": "/*\n    Copyright (c) 2023-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/detail/_intrusive_list_node.h\"\n#include \"oneapi/tbb/detail/_template_helpers.h\"\n#include \"oneapi/tbb/task_arena.h\"\n\n#include \"pm_client.h\"\n#include \"dynamic_link.h\"\n#include \"misc.h\"\n#include \"tcm.h\"\n#include \"tcm_adaptor.h\"\n\n#include <iostream>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nnamespace {\n#if __TBB_WEAK_SYMBOLS_PRESENT\n#pragma weak tcmConnect\n#pragma weak tcmDisconnect\n#pragma weak tcmRequestPermit\n#pragma weak tcmGetPermitData\n#pragma weak tcmReleasePermit\n#pragma weak tcmIdlePermit\n#pragma weak tcmDeactivatePermit\n#pragma weak tcmActivatePermit\n#pragma weak tcmRegisterThread\n#pragma weak tcmUnregisterThread\n#pragma weak tcmGetVersionInfo\n#endif /* __TBB_WEAK_SYMBOLS_PRESENT */\n\ntcm_result_t(*tcm_connect)(tcm_callback_t callback, tcm_client_id_t* client_id){nullptr};\ntcm_result_t(*tcm_disconnect)(tcm_client_id_t client_id){ nullptr };\ntcm_result_t(*tcm_request_permit)(tcm_client_id_t client_id, tcm_permit_request_t request,\n    void* callback_arg, tcm_permit_handle_t* permit_handle, tcm_permit_t* permit){nullptr};\ntcm_result_t(*tcm_get_permit_data)(tcm_permit_handle_t permit_handle, tcm_permit_t* permit){nullptr};\ntcm_result_t(*tcm_release_permit)(tcm_permit_handle_t permit){nullptr};\ntcm_result_t(*tcm_idle_permit)(tcm_permit_handle_t permit_handle){nullptr};\ntcm_result_t(*tcm_deactivate_permit)(tcm_permit_handle_t permit_handle){nullptr};\ntcm_result_t(*tcm_activate_permit)(tcm_permit_handle_t permit_handle){nullptr};\ntcm_result_t(*tcm_register_thread)(tcm_permit_handle_t permit_handle){nullptr};\ntcm_result_t(*tcm_unregister_thread)(){nullptr};\ntcm_result_t (*tcm_get_version_info)(char* buffer, uint32_t buffer_size){nullptr};\n\nstatic const dynamic_link_descriptor tcm_link_table[] = {\n    DLD(tcmConnect, tcm_connect),\n    DLD(tcmDisconnect, tcm_disconnect),\n    DLD(tcmRequestPermit, tcm_request_permit),\n    DLD(tcmGetPermitData, tcm_get_permit_data),\n    DLD(tcmReleasePermit, tcm_release_permit),\n    DLD(tcmIdlePermit, tcm_idle_permit),\n    DLD(tcmDeactivatePermit, tcm_deactivate_permit),\n    DLD(tcmActivatePermit, tcm_activate_permit),\n    DLD(tcmRegisterThread, tcm_register_thread),\n    DLD(tcmUnregisterThread, tcm_unregister_thread),\n    DLD(tcmGetVersionInfo, tcm_get_version_info)\n};\n\n#if TBB_USE_DEBUG\n#define DEBUG_SUFFIX \"_debug\"\n#else\n#define DEBUG_SUFFIX\n#endif /* TBB_USE_DEBUG */\n\n#if _WIN32 || _WIN64\n#define LIBRARY_EXTENSION \".dll\"\n#define LIBRARY_PREFIX\n#elif __unix__\n#define LIBRARY_EXTENSION \".so.1\"\n#define LIBRARY_PREFIX \"lib\"\n#else\n#define LIBRARY_EXTENSION\n#define LIBRARY_PREFIX\n#endif /* __unix__ */\n\n#define TCMLIB_NAME LIBRARY_PREFIX \"tcm\" DEBUG_SUFFIX LIBRARY_EXTENSION\n\nstatic bool tcm_functions_loaded{ false };\n}\n\nclass tcm_client : public pm_client {\n    using tcm_client_mutex_type = d1::mutex;\npublic:\n    tcm_client(tcm_adaptor& adaptor, arena& a) : pm_client(a), my_tcm_adaptor(adaptor) {}\n\n    ~tcm_client() {\n        if (my_permit_handle) {\n            __TBB_ASSERT(tcm_release_permit, nullptr);\n            auto res = tcm_release_permit(my_permit_handle);\n            __TBB_ASSERT_EX(res == TCM_RESULT_SUCCESS, nullptr);\n        }\n    }\n\n    int update_concurrency(uint32_t concurrency) {\n        return my_arena.update_concurrency(concurrency);\n    }\n\n    unsigned priority_level() {\n        return my_arena.priority_level();\n    }\n\n    tcm_permit_request_t& permit_request() {\n        return my_permit_request;\n    }\n\n    tcm_permit_handle_t& permit_handle() {\n        return my_permit_handle;\n    }\n\n    void actualize_permit() {\n        __TBB_ASSERT(tcm_get_permit_data, nullptr);\n        int delta{};\n        {\n            tcm_client_mutex_type::scoped_lock lock(my_permit_mutex);\n\n            uint32_t new_concurrency{};\n            tcm_permit_t new_permit{ &new_concurrency, nullptr, 1, TCM_PERMIT_STATE_VOID, {} };\n            auto res = tcm_get_permit_data(my_permit_handle, &new_permit);\n            __TBB_ASSERT_EX(res == TCM_RESULT_SUCCESS, nullptr);\n\n            // The permit has changed during the reading, so the callback will be invoked soon one more time and\n            // we can just skip this renegotiation iteration.\n            if (!new_permit.flags.stale) {\n                // If there is no other demand in TCM, the permit may still have granted concurrency but\n                // be in the deactivated state thus we enforce 0 allotment to preserve arena invariants.\n                delta = update_concurrency(new_permit.state != TCM_PERMIT_STATE_INACTIVE ? new_concurrency : 0);\n            }\n        }\n        if (delta) {\n            my_tcm_adaptor.notify_thread_request(delta);\n        }\n    }\n\n    void request_permit(tcm_client_id_t client_id) {\n        __TBB_ASSERT(tcm_request_permit, nullptr);\n\n        my_permit_request.max_sw_threads = max_workers();\n        my_permit_request.min_sw_threads = my_permit_request.max_sw_threads == 0 ? 0 : min_workers();\n\n        if (my_permit_request.constraints_size > 0) {\n            my_permit_request.cpu_constraints->min_concurrency = my_permit_request.min_sw_threads;\n            my_permit_request.cpu_constraints->max_concurrency = my_permit_request.max_sw_threads;\n        }\n\n        __TBB_ASSERT(my_permit_request.max_sw_threads >= my_permit_request.min_sw_threads, nullptr);\n\n        tcm_result_t res = tcm_request_permit(client_id, my_permit_request, this, &my_permit_handle, nullptr);\n        __TBB_ASSERT_EX(res == TCM_RESULT_SUCCESS, nullptr);\n    }\n\n    void deactivate_permit() {\n         __TBB_ASSERT(tcm_deactivate_permit, nullptr);\n        tcm_result_t res = tcm_deactivate_permit(my_permit_handle);\n        __TBB_ASSERT_EX(res == TCM_RESULT_SUCCESS, nullptr);\n    }\n\n    void init(tcm_client_id_t client_id, d1::constraints& constraints) {\n        __TBB_ASSERT(tcm_request_permit, nullptr);\n        __TBB_ASSERT(tcm_deactivate_permit, nullptr);\n\n        if (constraints.core_type            != d1::task_arena::automatic ||\n            constraints.numa_id              != d1::task_arena::automatic ||\n            constraints.max_threads_per_core != d1::task_arena::automatic)\n        {\n            my_permit_constraints.max_concurrency = constraints.max_concurrency;\n            my_permit_constraints.min_concurrency = 0;\n            my_permit_constraints.core_type_id = constraints.core_type;\n            my_permit_constraints.numa_id = constraints.numa_id;\n            my_permit_constraints.threads_per_core = constraints.max_threads_per_core;\n\n            my_permit_request.cpu_constraints = &my_permit_constraints;\n            my_permit_request.constraints_size = 1;\n        }\n\n        my_permit_request.min_sw_threads = 0;\n        my_permit_request.max_sw_threads = 0;\n        my_permit_request.flags.request_as_inactive = 1;\n\n        tcm_result_t res = tcm_request_permit(client_id, my_permit_request, this, &my_permit_handle, nullptr);\n        __TBB_ASSERT_EX(res == TCM_RESULT_SUCCESS, nullptr);\n\n        my_permit_request.flags.request_as_inactive = 0;\n    }\n\n    void register_thread() override {\n        __TBB_ASSERT(tcm_register_thread, nullptr);\n        auto return_code = tcm_register_thread(my_permit_handle);\n        __TBB_ASSERT_EX(return_code == TCM_RESULT_SUCCESS, nullptr);\n    }\n\n    void unregister_thread() override {\n        __TBB_ASSERT(tcm_unregister_thread, nullptr);\n        auto return_code = tcm_unregister_thread();\n        __TBB_ASSERT_EX(return_code == TCM_RESULT_SUCCESS, nullptr);\n    }\n\nprivate:\n    tcm_cpu_constraints_t my_permit_constraints = TCM_PERMIT_REQUEST_CONSTRAINTS_INITIALIZER;\n    tcm_permit_request_t my_permit_request = TCM_PERMIT_REQUEST_INITIALIZER;\n    tcm_permit_handle_t my_permit_handle{};\n    tcm_client_mutex_type my_permit_mutex;\n    tcm_adaptor& my_tcm_adaptor;\n};\n\n//------------------------------------------------------------------------\n// tcm_adaptor_impl\n//------------------------------------------------------------------------\n\nstruct tcm_adaptor_impl {\n    using demand_mutex_type = d1::mutex;\n    demand_mutex_type my_demand_mutex;\n    tcm_client_id_t client_id{};\n\n    tcm_adaptor_impl(tcm_client_id_t id) : client_id(id)\n    {}\n};\n\n//------------------------------------------------------------------------\n// tcm_adaptor\n//------------------------------------------------------------------------\n\ntcm_result_t renegotiation_callback(tcm_permit_handle_t, void* client_ptr, tcm_callback_flags_t) {\n    __TBB_ASSERT(client_ptr, nullptr);\n    static_cast<tcm_client*>(client_ptr)->actualize_permit();\n    return TCM_RESULT_SUCCESS;\n}\n\nvoid tcm_adaptor::initialize() {\n    tcm_functions_loaded = dynamic_link(TCMLIB_NAME, tcm_link_table, /* tcm_link_table size = */ 11);\n}\n\nbool tcm_adaptor::is_initialized() {\n    return tcm_functions_loaded;\n}\n\nvoid tcm_adaptor::print_version() {\n    if (is_initialized()) {\n        __TBB_ASSERT(tcm_get_version_info, nullptr);\n        char buffer[1024];\n        tcm_get_version_info(buffer, 1024);\n        std::fprintf(stderr, \"%.*s\", 1024, buffer);\n    }\n}\n\ntcm_adaptor::tcm_adaptor() {\n    __TBB_ASSERT(tcm_connect, nullptr);\n    tcm_client_id_t client_id{};\n    auto return_code = tcm_connect(renegotiation_callback, &client_id);\n    if (return_code == TCM_RESULT_SUCCESS) {\n        my_impl = make_cache_aligned_unique<tcm_adaptor_impl>(client_id);\n    }\n}\n\ntcm_adaptor::~tcm_adaptor() {\n    if (my_impl) {\n        __TBB_ASSERT(tcm_disconnect, nullptr);\n        auto return_code = tcm_disconnect(my_impl->client_id);\n        __TBB_ASSERT_EX(return_code == TCM_RESULT_SUCCESS, nullptr);\n        my_impl = nullptr;\n    }\n}\n\nbool tcm_adaptor::is_connected() {\n    return my_impl != nullptr;\n}\n\npm_client* tcm_adaptor::create_client(arena& a) {\n    return new (cache_aligned_allocate(sizeof(tcm_client))) tcm_client(*this, a);\n}\n\nvoid tcm_adaptor::register_client(pm_client* c, d1::constraints& constraints) {\n    static_cast<tcm_client*>(c)->init(my_impl->client_id, constraints);\n}\n\nvoid tcm_adaptor::unregister_and_destroy_client(pm_client& c) {\n    auto& client = static_cast<tcm_client&>(c);\n\n    {\n        tcm_adaptor_impl::demand_mutex_type::scoped_lock lock(my_impl->my_demand_mutex);\n        client.~tcm_client();\n    }\n    cache_aligned_deallocate(&client);\n}\n\nvoid tcm_adaptor::set_active_num_workers(int) {}\n\n\nvoid tcm_adaptor::adjust_demand(pm_client& c, int mandatory_delta, int workers_delta) {\n    __TBB_ASSERT(-1 <= mandatory_delta && mandatory_delta <= 1, nullptr);\n\n    auto& client = static_cast<tcm_client&>(c);\n    {\n        tcm_adaptor_impl::demand_mutex_type::scoped_lock lock(my_impl->my_demand_mutex);\n\n        // Update client's state\n        workers_delta = client.update_request(mandatory_delta, workers_delta);\n        if (workers_delta == 0) return;\n\n        if (client.max_workers() == 0) {\n            client.deactivate_permit();\n        } else {\n            client.request_permit(my_impl->client_id);\n        }\n    }\n\n    client.actualize_permit();\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/tcm_adaptor.h",
    "content": "/*\n    Copyright (c) 2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_tcm_adaptor_H\n#define _TBB_tcm_adaptor_H\n\n#include \"scheduler_common.h\"\n\n#include \"permit_manager.h\"\n#include \"pm_client.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nstruct tcm_adaptor_impl;\n\n//------------------------------------------------------------------------\n// Class tcm_adaptor\n//------------------------------------------------------------------------\n\nclass tcm_adaptor : public permit_manager {\npublic:\n    tcm_adaptor();\n    ~tcm_adaptor();\n\n    pm_client* create_client(arena& a) override;\n    void register_client(pm_client* client, d1::constraints& constraints) override;\n    void unregister_and_destroy_client(pm_client& c) override;\n\n    void set_active_num_workers(int soft_limit) override;\n\n    void adjust_demand(pm_client& c, int mandatory_delta, int workers_delta)  override;\n\n    bool is_connected();\n\n    static void initialize();\n    static bool is_initialized();\n    static void print_version();\nprivate:\n    cache_aligned_unique_ptr<tcm_adaptor_impl> my_impl;\n\n    friend class tcm_client;\n}; // class tcm_adaptor\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /* _TBB_tcm_adaptor_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/thread_control_monitor.h",
    "content": "/*\n    Copyright (c) 2021-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_thread_control_monitor_H\n#define __TBB_thread_control_monitor_H\n\n#include \"concurrent_monitor.h\"\n#include \"scheduler_common.h\"\n\n#include <atomic>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nstruct market_context {\n    market_context() = default;\n\n    market_context(std::uintptr_t first_addr, arena* a) :\n        my_uniq_addr(first_addr), my_arena_addr(a)\n    {}\n\n    std::uintptr_t my_uniq_addr{0};\n    arena* my_arena_addr{nullptr};\n};\n\n#if __TBB_RESUMABLE_TASKS\nclass resume_node : public wait_node<market_context> {\n    using base_type = wait_node<market_context>;\npublic:\n    resume_node(market_context ctx, execution_data_ext& ed_ext, task_dispatcher& target)\n        : base_type(ctx), my_curr_dispatcher(ed_ext.task_disp), my_target_dispatcher(&target)\n        , my_suspend_point(my_curr_dispatcher->get_suspend_point())\n    {}\n\n    ~resume_node() override {\n        if (this->my_skipped_wakeup) {\n            spin_wait_until_eq(this->my_notify_calls, 1);\n        }\n\n        poison_pointer(my_curr_dispatcher);\n        poison_pointer(my_target_dispatcher);\n        poison_pointer(my_suspend_point);\n    }\n\n    void init() override {\n        base_type::init();\n    }\n\n    void wait() override {\n        my_curr_dispatcher->resume(*my_target_dispatcher);\n        __TBB_ASSERT(!this->my_is_in_list.load(std::memory_order_relaxed), \"Still in the queue?\");\n    }\n\n    void reset() override {\n        base_type::reset();\n        spin_wait_until_eq(this->my_notify_calls, 1);\n        my_notify_calls.store(0, std::memory_order_relaxed);\n    }\n\n    // notify is called (perhaps, concurrently) twice from:\n    //   - concurrent_monitor::notify\n    //   - post_resume_action::register_waiter\n    // The second notify is called after thread switches the stack\n    // (Because we can not call resume while the stack is occupied)\n    // We need calling resume only when both notifications are performed.\n    void notify() override {\n        if (++my_notify_calls == 2) {\n            r1::resume(my_suspend_point);\n        }\n    }\n\nprivate:\n    friend class thread_data;\n    friend struct suspend_point_type::resume_task;\n    task_dispatcher* my_curr_dispatcher;\n    task_dispatcher* my_target_dispatcher;\n    suspend_point_type* my_suspend_point;\n    std::atomic<int> my_notify_calls{0};\n};\n#endif // __TBB_RESUMABLE_TASKS\n\nclass thread_control_monitor : public concurrent_monitor_base<market_context> {\n    using base_type = concurrent_monitor_base<market_context>;\npublic:\n    using base_type::base_type;\n\n    ~thread_control_monitor() {\n        destroy();\n    }\n\n    /** per-thread descriptor for concurrent_monitor */\n    using thread_context = sleep_node<market_context>;\n#if __TBB_RESUMABLE_TASKS\n    using resume_context = resume_node;\n#endif\n};\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_thread_control_monitor_H\n"
  },
  {
    "path": "third-party/tbb/src/tbb/thread_data.h",
    "content": "/*\n    Copyright (c) 2020-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_thread_data_H\n#define __TBB_thread_data_H\n\n#include \"oneapi/tbb/detail/_task.h\"\n#include \"oneapi/tbb/task.h\"\n\n#include \"rml_base.h\" // rml::job\n\n#include \"scheduler_common.h\"\n#include \"arena.h\"\n#include \"concurrent_monitor.h\"\n#include \"mailbox.h\"\n#include \"misc.h\" // FastRandom\n#include \"small_object_pool_impl.h\"\n#include \"intrusive_list.h\"\n\n#include <atomic>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nclass task;\nclass arena_slot;\nclass task_group_context;\nclass task_dispatcher;\nclass thread_dispatcher_client;\n\nclass context_list : public intrusive_list<d1::intrusive_list_node> {\npublic:\n    bool orphaned{false};\n\n    //! Last state propagation epoch known to this thread\n    /** Together with the_context_state_propagation_epoch constitute synchronization protocol\n    that keeps hot path of task group context construction destruction mostly\n    lock-free.\n    When local epoch equals the global one, the state of task group contexts\n    registered with this thread is consistent with that of the task group trees\n    they belong to. **/\n    std::atomic<std::uintptr_t> epoch{};\n\n    //! Mutex protecting access to the list of task group contexts.\n    d1::mutex m_mutex{};\n\n    void destroy() {\n        this->~context_list();\n        cache_aligned_deallocate(this);\n    }\n\n    void remove(d1::intrusive_list_node& val) {\n        mutex::scoped_lock lock(m_mutex);\n\n        intrusive_list<d1::intrusive_list_node>::remove(val);\n\n        if (orphaned && empty()) {\n            lock.release();\n            destroy();\n        }\n    }\n\n    void push_front(d1::intrusive_list_node& val) {\n        mutex::scoped_lock lock(m_mutex);\n\n        intrusive_list<d1::intrusive_list_node>::push_front(val);\n    }\n\n    void orphan() {\n        mutex::scoped_lock lock(m_mutex);\n\n        orphaned = true;\n        if (empty()) {\n            lock.release();\n            destroy();\n        }\n    }\n};\n\n//------------------------------------------------------------------------\n// Thread Data\n//------------------------------------------------------------------------\nclass thread_data : public ::rml::job\n                  , public d1::intrusive_list_node\n                  , no_copy {\npublic:\n    thread_data(unsigned short index, bool is_worker)\n        : my_arena_index{ index }\n        , my_is_worker{ is_worker }\n        , my_is_registered { false }\n        , my_task_dispatcher{ nullptr }\n        , my_arena{ nullptr }\n        , my_last_client{ nullptr }\n        , my_arena_slot{}\n        , my_random{ this }\n        , my_last_observer{ nullptr }\n        , my_small_object_pool{new (cache_aligned_allocate(sizeof(small_object_pool_impl))) small_object_pool_impl{}}\n        , my_context_list(new (cache_aligned_allocate(sizeof(context_list))) context_list{})\n#if __TBB_RESUMABLE_TASKS\n        , my_post_resume_action{ task_dispatcher::post_resume_action::none }\n        , my_post_resume_arg{nullptr}\n#endif /* __TBB_RESUMABLE_TASKS */\n    {\n        ITT_SYNC_CREATE(&my_context_list->m_mutex, SyncType_Scheduler, SyncObj_ContextsList);\n    }\n\n    ~thread_data() {\n        my_context_list->orphan();\n        my_small_object_pool->destroy();\n        poison_pointer(my_task_dispatcher);\n        poison_pointer(my_arena);\n        poison_pointer(my_arena_slot);\n        poison_pointer(my_last_observer);\n        poison_pointer(my_small_object_pool);\n        poison_pointer(my_context_list);\n#if __TBB_RESUMABLE_TASKS\n        poison_pointer(my_post_resume_arg);\n#endif /* __TBB_RESUMABLE_TASKS */\n    }\n\n    void attach_arena(arena& a, std::size_t index);\n    bool is_attached_to(arena*);\n    void attach_task_dispatcher(task_dispatcher&);\n    void detach_task_dispatcher();\n    void enter_task_dispatcher(task_dispatcher& task_disp, std::uintptr_t stealing_threshold);\n    void leave_task_dispatcher();\n    void propagate_task_group_state(std::atomic<uint32_t> d1::task_group_context::* mptr_state, d1::task_group_context& src, uint32_t new_state);\n\n    //! Index of the arena slot the scheduler occupies now, or occupied last time\n    unsigned short my_arena_index;\n\n    //! Indicates if the thread is created by RML\n    const bool my_is_worker;\n\n    bool my_is_registered;\n\n    //! The current task dipsatcher\n    task_dispatcher* my_task_dispatcher;\n\n    //! The arena that I own (if external thread) or am servicing at the moment (if worker)\n    arena* my_arena;\n\n    thread_dispatcher_client* my_last_client;\n\n    //! Pointer to the slot in the arena we own at the moment\n    arena_slot* my_arena_slot;\n\n    //! The mailbox (affinity mechanism) the current thread attached to\n    mail_inbox my_inbox;\n\n    //! The random generator\n    FastRandom my_random;\n\n    //! Last observer in the observers list processed on this slot\n    observer_proxy* my_last_observer;\n\n    //! Pool of small object for fast task allocation\n    small_object_pool_impl* my_small_object_pool;\n\n    context_list* my_context_list;\n#if __TBB_RESUMABLE_TASKS\n    //! Suspends the current coroutine (task_dispatcher).\n    void suspend(void* suspend_callback, void* user_callback);\n\n    //! Resumes the target task_dispatcher.\n    void resume(task_dispatcher& target);\n\n    //! Set post resume action to perform after resume.\n    void set_post_resume_action(task_dispatcher::post_resume_action pra, void* arg) {\n        __TBB_ASSERT(my_post_resume_action == task_dispatcher::post_resume_action::none, \"The Post resume action must not be set\");\n        __TBB_ASSERT(!my_post_resume_arg, \"The post resume action must not have an argument\");\n        my_post_resume_action = pra;\n        my_post_resume_arg = arg;\n    }\n\n    void clear_post_resume_action() {\n        my_post_resume_action = task_dispatcher::post_resume_action::none;\n        my_post_resume_arg = nullptr;\n    }\n\n    //! The post resume action requested after the swap contexts.\n    task_dispatcher::post_resume_action my_post_resume_action;\n\n    //! The post resume action argument.\n    void* my_post_resume_arg;\n#endif /* __TBB_RESUMABLE_TASKS */\n\n    //! The default context\n    // TODO: consider using common default context because it is used only to simplify\n    // cancellation check.\n    d1::task_group_context my_default_context;\n};\n\ninline void thread_data::attach_arena(arena& a, std::size_t index) {\n    my_arena = &a;\n    my_arena_index = static_cast<unsigned short>(index);\n    my_arena_slot = a.my_slots + index;\n    // Read the current slot mail_outbox and attach it to the mail_inbox (remove inbox later maybe)\n    my_inbox.attach(my_arena->mailbox(index));\n}\n\ninline bool thread_data::is_attached_to(arena* a) { return my_arena == a; }\n\ninline void thread_data::attach_task_dispatcher(task_dispatcher& task_disp) {\n    __TBB_ASSERT(my_task_dispatcher == nullptr, nullptr);\n    __TBB_ASSERT(task_disp.m_thread_data == nullptr, nullptr);\n    task_disp.m_thread_data = this;\n    my_task_dispatcher = &task_disp;\n}\n\ninline void thread_data::detach_task_dispatcher() {\n    __TBB_ASSERT(my_task_dispatcher != nullptr, nullptr);\n    __TBB_ASSERT(my_task_dispatcher->m_thread_data == this, nullptr);\n    my_task_dispatcher->m_thread_data = nullptr;\n    my_task_dispatcher = nullptr;\n}\n\ninline void thread_data::enter_task_dispatcher(task_dispatcher& task_disp, std::uintptr_t stealing_threshold) {\n    task_disp.set_stealing_threshold(stealing_threshold);\n    attach_task_dispatcher(task_disp);\n}\n\ninline void thread_data::leave_task_dispatcher() {\n    my_task_dispatcher->set_stealing_threshold(0);\n    detach_task_dispatcher();\n}\n\ninline void thread_data::propagate_task_group_state(std::atomic<std::uint32_t> d1::task_group_context::* mptr_state, d1::task_group_context& src, std::uint32_t new_state) {\n    mutex::scoped_lock lock(my_context_list->m_mutex);\n    // Acquire fence is necessary to ensure that the subsequent node->my_next load\n    // returned the correct value in case it was just inserted in another thread.\n    // The fence also ensures visibility of the correct ctx.my_parent value.\n    for (context_list::iterator it = my_context_list->begin(); it != my_context_list->end(); ++it) {\n        d1::task_group_context& ctx = __TBB_get_object_ref(d1::task_group_context, my_node, &(*it));\n        if ((ctx.*mptr_state).load(std::memory_order_relaxed) != new_state)\n            task_group_context_impl::propagate_task_group_state(ctx, mptr_state, src, new_state);\n    }\n    // Sync up local propagation epoch with the global one. Release fence prevents\n    // reordering of possible store to *mptr_state after the sync point.\n    my_context_list->epoch.store(the_context_state_propagation_epoch.load(std::memory_order_relaxed), std::memory_order_release);\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif // __TBB_thread_data_H\n\n"
  },
  {
    "path": "third-party/tbb/src/tbb/thread_dispatcher.cpp",
    "content": "/*\n    Copyright (c) 2022-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"thread_dispatcher.h\"\n#include \"threading_control.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nthread_dispatcher::thread_dispatcher(threading_control& tc, unsigned hard_limit, std::size_t stack_size)\n    : my_threading_control(tc)\n    , my_num_workers_hard_limit(hard_limit)\n    , my_stack_size(stack_size)\n{\n    my_server = governor::create_rml_server( *this );\n    __TBB_ASSERT( my_server, \"Failed to create RML server\" );\n}\n\nthread_dispatcher::~thread_dispatcher() {\n    poison_pointer(my_server);\n}\n\nthread_dispatcher_client* thread_dispatcher::select_next_client(thread_dispatcher_client* hint) {\n    unsigned next_client_priority_level = num_priority_levels;\n    if (hint) {\n        next_client_priority_level = hint->priority_level();\n    }\n\n    for (unsigned idx = 0; idx < next_client_priority_level; ++idx) {\n        if (!my_client_list[idx].empty()) {\n            return &*my_client_list[idx].begin();\n        }\n    }\n\n    return hint;\n}\n\nthread_dispatcher_client* thread_dispatcher::create_client(arena& a) {\n    return new (cache_aligned_allocate(sizeof(thread_dispatcher_client))) thread_dispatcher_client(a, my_clients_aba_epoch);\n}\n\n\nvoid thread_dispatcher::register_client(thread_dispatcher_client* client) {\n    client_list_mutex_type::scoped_lock lock(my_list_mutex);\n    insert_client(*client);\n}\n\nbool thread_dispatcher::try_unregister_client(thread_dispatcher_client* client, std::uint64_t aba_epoch, unsigned priority) {\n    __TBB_ASSERT(client, nullptr);\n    // we hold reference to the server, so market cannot be destroyed at any moment here\n    __TBB_ASSERT(!is_poisoned(my_server), nullptr);\n    my_list_mutex.lock();\n    for (auto& it : my_client_list[priority]) {\n        if (client == &it) {\n            if (it.get_aba_epoch() == aba_epoch) {\n                // Client is alive\n                // Acquire my_references to sync with threads that just left the arena\n                // Pay attention that references should be read before workers_requested because\n                // if references is no zero some other thread might call adjust_demand and lead to\n                // a race over workers_requested\n                if (!client->references() && !client->has_request()) {\n                    // Client is abandoned. Destroy it.\n                    remove_client(*client);\n                    ++my_clients_aba_epoch;\n\n                    my_list_mutex.unlock();\n                    destroy_client(client);\n\n                    return true;\n                }\n            }\n            break;\n        }\n    }\n    my_list_mutex.unlock();\n    return false;\n}\n\nvoid thread_dispatcher::destroy_client(thread_dispatcher_client* client) {\n    client->~thread_dispatcher_client();\n    cache_aligned_deallocate(client);\n}\n\n// Should be called under lock\nvoid thread_dispatcher::insert_client(thread_dispatcher_client& client) {\n    __TBB_ASSERT(client.priority_level() < num_priority_levels, nullptr);\n    my_client_list[client.priority_level()].push_front(client);\n\n    __TBB_ASSERT(!my_next_client || my_next_client->priority_level() < num_priority_levels, nullptr);\n    my_next_client = select_next_client(my_next_client);\n}\n\n// Should be called under lock\nvoid thread_dispatcher::remove_client(thread_dispatcher_client& client) {\n    __TBB_ASSERT(client.priority_level() < num_priority_levels, nullptr);\n    my_client_list[client.priority_level()].remove(client);\n\n    if (my_next_client == &client) {\n        my_next_client = nullptr;\n    }\n    my_next_client = select_next_client(my_next_client);\n}\n\nbool thread_dispatcher::is_client_alive(thread_dispatcher_client* client) {\n    if (!client) {\n        return false;\n    }\n\n    // Still cannot access internals of the client since the object itself might be destroyed.\n    for (auto& priority_list : my_client_list) {\n        for (auto& c : priority_list) {\n            if (client == &c) {\n                return true;\n            }\n        }\n    }\n    return false;\n}\n\nthread_dispatcher_client* thread_dispatcher::client_in_need(client_list_type* clients, thread_dispatcher_client* hint) {\n    // TODO: make sure client with higher priority returned only if there are available slots in it.\n    hint = select_next_client(hint);\n    if (!hint) {\n        return nullptr;\n    }\n\n    client_list_type::iterator it = hint;\n    unsigned curr_priority_level = hint->priority_level();\n    __TBB_ASSERT(it != clients[curr_priority_level].end(), nullptr);\n    do {\n        thread_dispatcher_client& t = *it;\n        if (++it == clients[curr_priority_level].end()) {\n            do {\n                ++curr_priority_level %= num_priority_levels;\n            } while (clients[curr_priority_level].empty());\n            it = clients[curr_priority_level].begin();\n        }\n        if (t.try_join()) {\n            return &t;\n        }\n    } while (it != hint);\n    return nullptr;\n}\n\nthread_dispatcher_client* thread_dispatcher::client_in_need(thread_dispatcher_client* prev) {\n    client_list_mutex_type::scoped_lock lock(my_list_mutex, /*is_writer=*/false);\n    if (is_client_alive(prev)) {\n        return client_in_need(my_client_list, prev);\n    }\n    return client_in_need(my_client_list, my_next_client);\n}\n\nbool thread_dispatcher::is_any_client_in_need() {\n    client_list_mutex_type::scoped_lock lock(my_list_mutex, /*is_writer=*/false);\n    for (auto& priority_list : my_client_list) {\n        for (auto& client : priority_list) {\n            if (client.is_joinable()) {\n                return true;\n            }\n        }\n    }\n    return false;\n}\n\nvoid thread_dispatcher::adjust_job_count_estimate(int delta) {\n    my_server->adjust_job_count_estimate(delta);\n}\n\nvoid thread_dispatcher::release(bool blocking_terminate) {\n    my_join_workers = blocking_terminate;\n    my_server->request_close_connection();\n}\n\nvoid thread_dispatcher::process(job& j) {\n    thread_data& td = static_cast<thread_data&>(j);\n    // td.my_last_client can be dead. Don't access it until client_in_need is called\n    thread_dispatcher_client* client = td.my_last_client;\n    for (int i = 0; i < 2; ++i) {\n        while ((client = client_in_need(client)) ) {\n            td.my_last_client = client;\n            client->process(td);\n        }\n        // Workers leave thread_dispatcher because there is no client in need. It can happen earlier than\n        // adjust_job_count_estimate() decreases my_slack and RML can put this thread to sleep.\n        // It might result in a busy-loop checking for my_slack<0 and calling this method instantly.\n        // the yield refines this spinning.\n        if ( !i ) {\n            yield();\n        }\n    }\n}\n\n\n//! Used when RML asks for join mode during workers termination.\nbool thread_dispatcher::must_join_workers() const { return my_join_workers; }\n\n//! Returns the requested stack size of worker threads.\nstd::size_t thread_dispatcher::worker_stack_size() const { return my_stack_size; }\n\nvoid thread_dispatcher::acknowledge_close_connection() {\n    my_threading_control.destroy();\n}\n\n::rml::job* thread_dispatcher::create_one_job() {\n    unsigned short index = ++my_first_unused_worker_idx;\n    __TBB_ASSERT(index > 0, nullptr);\n    ITT_THREAD_SET_NAME(_T(\"TBB Worker Thread\"));\n    // index serves as a hint decreasing conflicts between workers when they migrate between arenas\n    thread_data* td = new (cache_aligned_allocate(sizeof(thread_data))) thread_data{ index, true };\n    __TBB_ASSERT(index <= my_num_workers_hard_limit, nullptr);\n    my_threading_control.register_thread(*td);\n    return td;\n}\n\nvoid thread_dispatcher::cleanup(job& j) {\n    my_threading_control.unregister_thread(static_cast<thread_data&>(j));\n    governor::auto_terminate(&j);\n}\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/thread_dispatcher.h",
    "content": "/*\n    Copyright (c) 2022-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_thread_dispatcher_H\n#define _TBB_thread_dispatcher_H\n\n#include \"oneapi/tbb/detail/_config.h\"\n#include \"oneapi/tbb/detail/_utils.h\"\n#include \"oneapi/tbb/rw_mutex.h\"\n#include \"oneapi/tbb/task_arena.h\"\n\n#include \"arena.h\"\n#include \"governor.h\"\n#include \"thread_data.h\"\n#include \"rml_tbb.h\"\n#include \"thread_dispatcher_client.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nclass threading_control_impl;\n\nclass thread_dispatcher : no_copy, rml::tbb_client {\n    using client_list_type = intrusive_list<thread_dispatcher_client>;\n    using client_list_mutex_type = d1::rw_mutex;\npublic:\n    thread_dispatcher(threading_control& tc, unsigned hard_limit, std::size_t stack_size);\n    ~thread_dispatcher();\n\n    thread_dispatcher_client* create_client(arena& a);\n    void register_client(thread_dispatcher_client* client);\n    bool try_unregister_client(thread_dispatcher_client* client, std::uint64_t aba_epoch, unsigned priority);\n    bool is_any_client_in_need();\n\n    void adjust_job_count_estimate(int delta);\n    void release(bool blocking_terminate);\n    void process(job& j) override;\n    //! Used when RML asks for join mode during workers termination.\n    bool must_join_workers() const;\n    //! Returns the requested stack size of worker threads.\n    std::size_t worker_stack_size() const;\n\nprivate:\n    version_type version () const override { return 0; }\n    unsigned max_job_count () const override { return my_num_workers_hard_limit; }\n    std::size_t min_stack_size () const override { return worker_stack_size(); }\n    void cleanup(job& j) override;\n    void acknowledge_close_connection() override;\n    ::rml::job* create_one_job() override;\n\n    thread_dispatcher_client* select_next_client(thread_dispatcher_client* hint);\n    void destroy_client(thread_dispatcher_client* client);\n    void insert_client(thread_dispatcher_client& client);\n    void remove_client(thread_dispatcher_client& client);\n    bool is_client_alive(thread_dispatcher_client* client);\n    thread_dispatcher_client* client_in_need(client_list_type* clients, thread_dispatcher_client* hint);\n    thread_dispatcher_client* client_in_need(thread_dispatcher_client* prev);\n\n    friend class threading_control_impl;\n    static constexpr unsigned num_priority_levels = d1::num_priority_levels;\n    client_list_mutex_type my_list_mutex;\n    client_list_type my_client_list[num_priority_levels];\n\n    thread_dispatcher_client* my_next_client{nullptr};\n\n    //! Shutdown mode\n    bool my_join_workers{false};\n\n    threading_control& my_threading_control;\n\n    //! ABA prevention marker to assign to newly created clients\n    std::atomic<std::uint64_t> my_clients_aba_epoch{0};\n\n    //! Maximal number of workers allowed for use by the underlying resource manager\n    /** It can't be changed after thread_dispatcher creation. **/\n    unsigned my_num_workers_hard_limit{0};\n\n    //! Stack size of worker threads\n    std::size_t my_stack_size{0};\n\n    //! First unused index of worker\n    /** Used to assign indices to the new workers coming from RML **/\n    std::atomic<unsigned> my_first_unused_worker_idx{0};\n\n    //! Pointer to the RML server object that services this TBB instance.\n    rml::tbb_server* my_server{nullptr};\n};\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif // _TBB_thread_dispatcher_H\n"
  },
  {
    "path": "third-party/tbb/src/tbb/thread_dispatcher_client.h",
    "content": "/*\n    Copyright (c) 2022-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_thread_dispatcher_client_H\n#define _TBB_thread_dispatcher_client_H\n\n#include \"oneapi/tbb/detail/_intrusive_list_node.h\"\n#include \"arena.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nclass thread_dispatcher_client : public d1::intrusive_list_node /* Need for list in thread pool */ {\npublic:\n    thread_dispatcher_client(arena& a, std::uint64_t aba_epoch) : my_arena(a), my_aba_epoch(aba_epoch) {}\n\n    // Interface of communication with thread pool\n    bool try_join() {\n        return my_arena.try_join();\n    }\n\n    bool is_joinable() {\n        return my_arena.is_joinable();\n    }\n\n    void process(thread_data& td) {\n        my_arena.process(td);\n    }\n\n    unsigned priority_level() {\n        return my_arena.priority_level();\n    }\n\n    std::uint64_t get_aba_epoch() {\n        return my_aba_epoch;\n    }\n\n    unsigned references() {\n        return my_arena.references();\n    }\n\n    bool has_request() {\n        return my_arena.has_request();\n    }\n\nprivate:\n    arena& my_arena;\n    std::uint64_t my_aba_epoch;\n};\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif // _TBB_thread_dispatcher_client_H\n"
  },
  {
    "path": "third-party/tbb/src/tbb/thread_request_serializer.cpp",
    "content": "/*\n    Copyright (c) 2022-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"misc.h\"\n#include \"thread_request_serializer.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nthread_request_serializer::thread_request_serializer(thread_dispatcher& td, int soft_limit)\n    : my_thread_dispatcher(td)\n    , my_soft_limit(soft_limit)\n{}\n\nvoid thread_request_serializer::update(int delta) {\n    constexpr std::uint64_t delta_mask = (pending_delta_base << 1) - 1;\n    constexpr std::uint64_t counter_value = delta_mask + 1;\n\n    int prev_pending_delta = my_pending_delta.fetch_add(counter_value + delta);\n\n    // There is a pseudo request aggregator, so only thread that see pending_delta_base in my_pending_delta\n    // Will enter to critical section and call adjust_job_count_estimate\n    if (prev_pending_delta == pending_delta_base) {\n        delta = int(my_pending_delta.exchange(pending_delta_base) & delta_mask) - int(pending_delta_base);\n        mutex_type::scoped_lock lock(my_mutex);\n        my_total_request.store(my_total_request.load(std::memory_order_relaxed) + delta, std::memory_order_relaxed);\n        delta = limit_delta(delta, my_soft_limit, my_total_request.load(std::memory_order_relaxed));\n        my_thread_dispatcher.adjust_job_count_estimate(delta);\n    }\n}\n\nvoid thread_request_serializer::set_active_num_workers(int soft_limit) {\n    mutex_type::scoped_lock lock(my_mutex);\n    int delta = soft_limit - my_soft_limit;\n    delta = limit_delta(delta, my_total_request.load(std::memory_order_relaxed), soft_limit);\n    my_thread_dispatcher.adjust_job_count_estimate(delta);\n    my_soft_limit = soft_limit;\n}\n\nint thread_request_serializer::limit_delta(int delta, int limit, int new_value) {\n    // This method can be described with such pseudocode:\n    // bool above_limit = prev_value >= limit && new_value >= limit;\n    // bool below_limit = prev_value <= limit && new_value <= limit;\n    // enum request_type { ABOVE_LIMIT, CROSS_LIMIT, BELOW_LIMIT };\n    // request = above_limit ? ABOVE_LIMIT : below_limit ? BELOW_LIMIT : CROSS_LIMIT;\n\n    // switch (request) {\n    // case ABOVE_LIMIT:\n    //     delta = 0;\n    // case CROSS_LIMIT:\n    //     delta = delta > 0 ? limit - prev_value : new_value - limit;\n    // case BELOW_LIMIT:\n    //     // No changes to delta\n    // }\n\n   int prev_value = new_value - delta;\n\n    // actual new_value and prev_value cannot exceed the limit\n    new_value = min(limit, new_value);\n    prev_value = min(limit, prev_value);\n    return new_value - prev_value;\n}\n\n\nthread_request_serializer_proxy::thread_request_serializer_proxy(thread_dispatcher& td, int soft_limit) : my_serializer(td, soft_limit)\n{}\n\nvoid thread_request_serializer_proxy::register_mandatory_request(int mandatory_delta) {\n    if (mandatory_delta != 0) {\n        mutex_type::scoped_lock lock(my_mutex, /* is_write = */ false);\n        int prev_value = my_num_mandatory_requests.fetch_add(mandatory_delta);\n\n        const bool should_try_enable = mandatory_delta > 0 && prev_value == 0;\n        const bool should_try_disable = mandatory_delta < 0 && prev_value == 1;\n\n        if (should_try_enable) {\n            enable_mandatory_concurrency(lock);\n        } else if (should_try_disable) {\n            disable_mandatory_concurrency(lock);\n        }\n    }\n}\n\nvoid thread_request_serializer_proxy::set_active_num_workers(int soft_limit) {\n    mutex_type::scoped_lock lock(my_mutex, /* is_write = */ true);\n\n    if (soft_limit != 0) {\n        my_is_mandatory_concurrency_enabled = false;\n    } else if (my_num_mandatory_requests > 0) {\n        my_is_mandatory_concurrency_enabled = true;\n        soft_limit = 1;\n    }\n\n    my_serializer.set_active_num_workers(soft_limit);\n}\n\nint thread_request_serializer_proxy::num_workers_requested() { return my_serializer.num_workers_requested(); }\n\nvoid thread_request_serializer_proxy::update(int delta) { my_serializer.update(delta); }\n\nvoid thread_request_serializer_proxy::enable_mandatory_concurrency(mutex_type::scoped_lock& lock) {\n    lock.upgrade_to_writer();\n    bool still_should_enable = my_num_mandatory_requests.load(std::memory_order_relaxed) > 0 &&\n            !my_is_mandatory_concurrency_enabled && my_serializer.is_no_workers_avaliable();\n\n    if (still_should_enable) {\n        my_is_mandatory_concurrency_enabled = true;\n        my_serializer.set_active_num_workers(1);\n    }\n}\n\nvoid thread_request_serializer_proxy::disable_mandatory_concurrency(mutex_type::scoped_lock& lock) {\n    lock.upgrade_to_writer();\n    bool still_should_disable = my_num_mandatory_requests.load(std::memory_order_relaxed) <= 0 &&\n            my_is_mandatory_concurrency_enabled && !my_serializer.is_no_workers_avaliable();\n\n    if (still_should_disable) {\n        my_is_mandatory_concurrency_enabled = false;\n        my_serializer.set_active_num_workers(0);\n    }\n}\n\n} // r1\n} // detail\n} // tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/thread_request_serializer.h",
    "content": "/*\n    Copyright (c) 2022-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_thread_serializer_handlers_H\n#define _TBB_thread_serializer_handlers_H\n\n#include \"oneapi/tbb/mutex.h\"\n#include \"oneapi/tbb/rw_mutex.h\"\n\n#include \"thread_dispatcher.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nclass thread_request_observer {\nprotected:\n    virtual ~thread_request_observer() {}\npublic:\n    virtual void update(int delta) = 0;\n};\n\n\nclass thread_request_serializer : public thread_request_observer {\n    using mutex_type = d1::mutex;\npublic:\n    thread_request_serializer(thread_dispatcher& td, int soft_limit);\n    void set_active_num_workers(int soft_limit);\n    int num_workers_requested() { return my_total_request.load(std::memory_order_relaxed); }\n    bool is_no_workers_avaliable() { return my_soft_limit == 0; }\n\nprivate:\n    friend class thread_request_serializer_proxy;\n    void update(int delta) override;\n    static int limit_delta(int delta, int limit, int new_value);\n\n    thread_dispatcher& my_thread_dispatcher;\n    int my_soft_limit{ 0 };\n    std::atomic<int> my_total_request{ 0 };\n    // my_pending_delta is set to pending_delta_base to have ability to hold negative values\n    // consider increase base since thead number will be bigger than 1 << 15\n    static constexpr std::uint64_t pending_delta_base = 1 << 15;\n    std::atomic<std::uint64_t> my_pending_delta{ pending_delta_base };\n    mutex_type my_mutex;\n};\n\n// Handles mandatory concurrency i.e. enables worker threads for enqueue tasks\nclass thread_request_serializer_proxy : public thread_request_observer {\n    using mutex_type = d1::rw_mutex;\npublic:\n    thread_request_serializer_proxy(thread_dispatcher& td, int soft_limit);\n    void register_mandatory_request(int mandatory_delta);\n    void set_active_num_workers(int soft_limit);\n    int num_workers_requested();\n\nprivate:\n    void update(int delta) override;\n    void enable_mandatory_concurrency(mutex_type::scoped_lock& lock);\n    void disable_mandatory_concurrency(mutex_type::scoped_lock& lock);\n\n    std::atomic<int> my_num_mandatory_requests{0};\n    bool my_is_mandatory_concurrency_enabled{false};\n    thread_request_serializer my_serializer;\n    mutex_type my_mutex;\n};\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif // _TBB_thread_serializer_handlers_H\n"
  },
  {
    "path": "third-party/tbb/src/tbb/threading_control.cpp",
    "content": "/*\n    Copyright (c) 2022-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"threading_control.h\"\n#include \"permit_manager.h\"\n#include \"market.h\"\n#include \"tcm_adaptor.h\"\n#include \"thread_dispatcher.h\"\n#include \"governor.h\"\n#include \"thread_dispatcher_client.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n// ---------------------------------------- threading_control_impl --------------------------------------------------------------\n\nstd::size_t global_control_active_value_unsafe(d1::global_control::parameter);\n\nstd::pair<unsigned, unsigned> threading_control_impl::calculate_workers_limits() {\n    // Expecting that 4P is suitable for most applications.\n    // Limit to 2P for large thread number.\n    // TODO: ask RML for max concurrency and possibly correct hard_limit\n    unsigned factor = governor::default_num_threads() <= 128 ? 4 : 2;\n\n    // The requested number of threads is intentionally not considered in\n    // computation of the hard limit, in order to separate responsibilities\n    // and avoid complicated interactions between global_control and task_scheduler_init.\n    // The threading control guarantees that at least 256 threads might be created.\n    unsigned workers_app_limit = global_control_active_value_unsafe(global_control::max_allowed_parallelism);\n    unsigned workers_hard_limit = max(max(factor * governor::default_num_threads(), 256u), workers_app_limit);\n    unsigned workers_soft_limit = calc_workers_soft_limit(workers_hard_limit);\n    \n    return std::make_pair(workers_soft_limit, workers_hard_limit);\n}\n\nunsigned threading_control_impl::calc_workers_soft_limit(unsigned workers_hard_limit) {\n    unsigned workers_soft_limit{};\n    unsigned soft_limit = global_control_active_value_unsafe(global_control::max_allowed_parallelism);\n\n    // if user set no limits (yet), use default value\n    workers_soft_limit = soft_limit != 0 ? soft_limit - 1 : governor::default_num_threads() - 1;\n\n    if (workers_soft_limit >= workers_hard_limit) {\n        workers_soft_limit = workers_hard_limit - 1;\n    }\n\n    return workers_soft_limit;\n}\n\ncache_aligned_unique_ptr<permit_manager> threading_control_impl::make_permit_manager(unsigned workers_soft_limit) {\n     if (tcm_adaptor::is_initialized()) {\n        auto tcm = make_cache_aligned_unique<tcm_adaptor>();\n        if (tcm->is_connected()) {\n            return tcm;\n        }\n    }\n    return make_cache_aligned_unique<market>(workers_soft_limit);\n}\n\ncache_aligned_unique_ptr<thread_dispatcher> threading_control_impl::make_thread_dispatcher(threading_control& tc,\n                                                                                           unsigned workers_soft_limit,\n                                                                                           unsigned workers_hard_limit)\n{\n    stack_size_type stack_size = global_control_active_value_unsafe(global_control::thread_stack_size);\n\n    cache_aligned_unique_ptr<thread_dispatcher> td =\n        make_cache_aligned_unique<thread_dispatcher>(tc, workers_hard_limit, stack_size);\n    // This check relies on the fact that for shared RML default_concurrency == max_concurrency\n    if (!governor::UsePrivateRML && td->my_server->default_concurrency() < workers_soft_limit) {\n        runtime_warning(\"RML might limit the number of workers to %u while %u is requested.\\n\",\n            td->my_server->default_concurrency(), workers_soft_limit);\n    }\n\n    return td;\n}\n\nthreading_control_impl::threading_control_impl(threading_control* tc) {\n    unsigned workers_soft_limit{}, workers_hard_limit{};\n    std::tie(workers_soft_limit, workers_hard_limit) = calculate_workers_limits();\n\n    my_permit_manager = make_permit_manager(workers_soft_limit);\n    my_thread_dispatcher = make_thread_dispatcher(*tc, workers_soft_limit, workers_hard_limit);\n    my_thread_request_serializer =\n        make_cache_aligned_unique<thread_request_serializer_proxy>(*my_thread_dispatcher, workers_soft_limit);\n    my_permit_manager->set_thread_request_observer(*my_thread_request_serializer);\n\n    my_cancellation_disseminator = make_cache_aligned_unique<cancellation_disseminator>();\n    my_waiting_threads_monitor = make_cache_aligned_unique<thread_control_monitor>();\n}\n\nvoid threading_control_impl::release(bool blocking_terminate) {\n    my_thread_dispatcher->release(blocking_terminate);\n}\n\nvoid threading_control_impl::set_active_num_workers(unsigned soft_limit) {\n    __TBB_ASSERT(soft_limit <= my_thread_dispatcher->my_num_workers_hard_limit, nullptr);\n    my_thread_request_serializer->set_active_num_workers(soft_limit);\n    my_permit_manager->set_active_num_workers(soft_limit);\n}\n\nthreading_control_client threading_control_impl::create_client(arena& a) {\n    pm_client* pm_client = my_permit_manager->create_client(a);\n    thread_dispatcher_client* td_client = my_thread_dispatcher->create_client(a);\n\n    return threading_control_client{pm_client, td_client};\n}\n\nthreading_control_impl::client_snapshot threading_control_impl::prepare_client_destruction(threading_control_client client) {\n    auto td_client = client.get_thread_dispatcher_client();\n    return {td_client->get_aba_epoch(), td_client->priority_level(), td_client, client.get_pm_client()};\n}\n\nbool threading_control_impl::try_destroy_client(threading_control_impl::client_snapshot snapshot) {\n    if (my_thread_dispatcher->try_unregister_client(snapshot.my_td_client, snapshot.aba_epoch, snapshot.priority_level)) {\n        my_permit_manager->unregister_and_destroy_client(*snapshot.my_pm_client);\n        return true;\n    }\n    return false;\n}\n\nvoid threading_control_impl::publish_client(threading_control_client tc_client, d1::constraints& constraints) {\n    my_permit_manager->register_client(tc_client.get_pm_client(), constraints);\n    my_thread_dispatcher->register_client(tc_client.get_thread_dispatcher_client());\n}\n\nvoid threading_control_impl::register_thread(thread_data& td) {\n    my_cancellation_disseminator->register_thread(td);\n}\nvoid threading_control_impl::unregister_thread(thread_data& td) {\n    my_cancellation_disseminator->unregister_thread(td);\n}\n\nvoid threading_control_impl::propagate_task_group_state(std::atomic<uint32_t> d1::task_group_context::*mptr_state,\n                                                        d1::task_group_context& src, uint32_t new_state)\n{\n    my_cancellation_disseminator->propagate_task_group_state(mptr_state, src, new_state);\n}\n\nstd::size_t threading_control_impl::worker_stack_size() {\n    return my_thread_dispatcher->worker_stack_size();\n}\n\nunsigned threading_control_impl::max_num_workers() {\n    return my_thread_dispatcher->my_num_workers_hard_limit;\n}\n\nvoid threading_control_impl::adjust_demand(threading_control_client tc_client, int mandatory_delta, int workers_delta) {\n    auto& c = *tc_client.get_pm_client();\n    my_thread_request_serializer->register_mandatory_request(mandatory_delta);\n    my_permit_manager->adjust_demand(c, mandatory_delta, workers_delta);\n}\n\nbool threading_control_impl::is_any_other_client_active() {\n    return my_thread_request_serializer->num_workers_requested() > 0 ? my_thread_dispatcher->is_any_client_in_need() : false;\n}\n\nthread_control_monitor& threading_control_impl::get_waiting_threads_monitor() {\n    return *my_waiting_threads_monitor;\n}\n\n// ---------------------------------------- threading_control -------------------------------------------------------------------\n\n// Defined in global_control.cpp\nvoid global_control_lock();\nvoid global_control_unlock();\n\nvoid threading_control::add_ref(bool is_public) {\n    ++my_ref_count;\n    if (is_public) {\n        my_public_ref_count++;\n    }\n}\n\nbool threading_control::remove_ref(bool is_public) {\n    if (is_public) {\n        __TBB_ASSERT(g_threading_control == this, \"Global threading control instance was destroyed prematurely?\");\n        __TBB_ASSERT(my_public_ref_count.load(std::memory_order_relaxed), nullptr);\n        --my_public_ref_count;\n    }\n\n    bool is_last_ref = --my_ref_count == 0;\n    if (is_last_ref) {\n        __TBB_ASSERT(!my_public_ref_count.load(std::memory_order_relaxed), nullptr);\n        g_threading_control = nullptr;\n    }\n\n    return is_last_ref;\n}\n\nthreading_control* threading_control::get_threading_control(bool is_public) {\n    threading_control* control = g_threading_control;\n    if (control) {\n        control->add_ref(is_public);\n    }\n\n    return control;\n}\n\nthreading_control* threading_control::create_threading_control() {\n    // Global control should be locked before threading_control_impl\n    global_control_lock();\n\n    threading_control* thr_control{ nullptr };\n    try_call([&] {\n        global_mutex_type::scoped_lock lock(g_threading_control_mutex);\n\n        thr_control = get_threading_control(/*public = */ true);\n        if (thr_control == nullptr) {\n            thr_control =  new (cache_aligned_allocate(sizeof(threading_control))) threading_control(/*public_ref = */ 1, /*private_ref = */ 1);\n            thr_control->my_pimpl = make_cache_aligned_unique<threading_control_impl>(thr_control);\n\n            __TBB_InitOnce::add_ref();\n\n            if (global_control_active_value_unsafe(global_control::scheduler_handle)) {\n                ++thr_control->my_public_ref_count;\n                ++thr_control->my_ref_count;\n            }\n\n            g_threading_control = thr_control;\n        }\n    }).on_exception([&] {\n        global_control_unlock();\n\n        cache_aligned_deleter deleter{};\n        deleter(thr_control);\n    });\n\n    global_control_unlock();\n    return thr_control;\n}\n\nvoid threading_control::destroy () {\n    cache_aligned_deleter deleter;\n    deleter(this);\n    __TBB_InitOnce::remove_ref();\n}\n\nvoid threading_control::wait_last_reference(global_mutex_type::scoped_lock& lock) {\n    while (my_public_ref_count.load(std::memory_order_relaxed) == 1 && my_ref_count.load(std::memory_order_relaxed) > 1) {\n        lock.release();\n        // To guarantee that request_close_connection() is called by the last external thread, we need to wait till all\n        // references are released. Re-read my_public_ref_count to limit waiting if new external threads are created.\n        // Theoretically, new private references to the threading control can be added during waiting making it potentially\n        // endless.\n        // TODO: revise why the weak scheduler needs threading control's pointer and try to remove this wait.\n        // Note that the threading control should know about its schedulers for cancellation/exception/priority propagation,\n        // see e.g. task_group_context::cancel_group_execution()\n        while (my_public_ref_count.load(std::memory_order_acquire) == 1 && my_ref_count.load(std::memory_order_acquire) > 1) {\n            yield();\n        }\n        lock.acquire(g_threading_control_mutex);\n    }\n}\n\nbool threading_control::release(bool is_public, bool blocking_terminate) {\n    bool do_release = false;\n    {\n        global_mutex_type::scoped_lock lock(g_threading_control_mutex);\n        if (blocking_terminate) {\n            __TBB_ASSERT(is_public, \"Only an object with a public reference can request the blocking terminate\");\n            wait_last_reference(lock);\n        }\n        do_release = remove_ref(is_public);\n    }\n\n    if (do_release) {\n        __TBB_ASSERT(!my_public_ref_count.load(std::memory_order_relaxed), \"No public references must remain if we remove the threading control.\");\n        // inform RML that blocking termination is required\n        my_pimpl->release(blocking_terminate);\n        return blocking_terminate;\n    }\n    return false;\n}\n\nthreading_control::threading_control(unsigned public_ref, unsigned ref) : my_public_ref_count(public_ref), my_ref_count(ref)\n{}\n\nthreading_control* threading_control::register_public_reference() {\n    threading_control* control{nullptr};\n    global_mutex_type::scoped_lock lock(g_threading_control_mutex);\n    control = get_threading_control(/*public = */ true);\n    if (!control) {\n        // We are going to create threading_control_impl, we should acquire mutexes in right order\n        lock.release();\n        control = create_threading_control();\n    }\n\n    return control;\n}\n\nbool threading_control::unregister_public_reference(bool blocking_terminate) {\n    __TBB_ASSERT(g_threading_control, \"Threading control should exist until last public reference\");\n    __TBB_ASSERT(g_threading_control->my_public_ref_count.load(std::memory_order_relaxed), nullptr);\n    return g_threading_control->release(/*public = */ true, /*blocking_terminate = */ blocking_terminate);\n}\n\nthreading_control_client threading_control::create_client(arena& a) {\n    {\n        global_mutex_type::scoped_lock lock(g_threading_control_mutex);\n        add_ref(/*public = */ false);\n    }\n\n    return my_pimpl->create_client(a);\n}\n\nvoid threading_control::publish_client(threading_control_client client, d1::constraints& constraints) {\n    return my_pimpl->publish_client(client, constraints);\n}\n\nthreading_control::client_snapshot threading_control::prepare_client_destruction(threading_control_client client) {\n    return my_pimpl->prepare_client_destruction(client);\n}\n\nbool threading_control::try_destroy_client(threading_control::client_snapshot deleter) {\n    bool res = my_pimpl->try_destroy_client(deleter);\n    if (res) {\n        release(/*public = */ false, /*blocking_terminate = */ false);\n    }\n    return res;\n}\n\nvoid threading_control::set_active_num_workers(unsigned soft_limit) {\n    threading_control* thr_control{nullptr};\n    {\n        global_mutex_type::scoped_lock lock(g_threading_control_mutex);\n        thr_control = get_threading_control(/*public = */ false);\n    }\n\n    if (thr_control != nullptr) {\n        thr_control->my_pimpl->set_active_num_workers(soft_limit);\n        thr_control->release(/*is_public=*/false, /*blocking_terminate=*/false);\n    }\n}\n\nbool threading_control::is_present() {\n    global_mutex_type::scoped_lock lock(g_threading_control_mutex);\n    return g_threading_control != nullptr;\n}\n\nbool threading_control::register_lifetime_control() {\n    global_mutex_type::scoped_lock lock(g_threading_control_mutex);\n    return get_threading_control(/*public = */ true) != nullptr;\n}\n\nbool threading_control::unregister_lifetime_control(bool blocking_terminate) {\n    threading_control* thr_control{nullptr};\n    {\n        global_mutex_type::scoped_lock lock(g_threading_control_mutex);\n        thr_control = g_threading_control;\n    }\n\n    bool released{true};\n    if (thr_control) {\n        released = thr_control->release(/*public = */ true, /*blocking_terminate = */ blocking_terminate);\n    }\n\n    return released;\n}\n\nvoid threading_control::register_thread(thread_data& td) {\n    my_pimpl->register_thread(td);\n}\n\nvoid threading_control::unregister_thread(thread_data& td) {\n    my_pimpl->unregister_thread(td);\n}\n\nvoid threading_control::propagate_task_group_state(std::atomic<uint32_t> d1::task_group_context::*mptr_state,\n                                                   d1::task_group_context& src, uint32_t new_state)\n{\n    my_pimpl->propagate_task_group_state(mptr_state, src, new_state);\n}\n\nstd::size_t threading_control::worker_stack_size() {\n    return my_pimpl->worker_stack_size();\n}\n\nunsigned threading_control::max_num_workers() {\n    global_mutex_type::scoped_lock lock(g_threading_control_mutex);\n    return g_threading_control ? g_threading_control->my_pimpl->max_num_workers() : 0;\n}\n\nvoid threading_control::adjust_demand(threading_control_client client, int mandatory_delta, int workers_delta) {\n    my_pimpl->adjust_demand(client, mandatory_delta, workers_delta);\n}\n\nbool threading_control::is_any_other_client_active() {\n    return my_pimpl->is_any_other_client_active();\n}\n\nthread_control_monitor& threading_control::get_waiting_threads_monitor() {\n    return my_pimpl->get_waiting_threads_monitor();\n}\n\n} // r1\n} // detail\n} // tbb\n"
  },
  {
    "path": "third-party/tbb/src/tbb/threading_control.h",
    "content": "/*\n    Copyright (c) 2022-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_threading_control_H\n#define _TBB_threading_control_H\n\n#include \"oneapi/tbb/mutex.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include \"threading_control_client.h\"\n#include \"intrusive_list.h\"\n#include \"main.h\"\n#include \"permit_manager.h\"\n#include \"pm_client.h\"\n#include \"thread_dispatcher.h\"\n#include \"cancellation_disseminator.h\"\n#include \"thread_request_serializer.h\"\n#include \"scheduler_common.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nclass arena;\nclass thread_data;\n\nclass threading_control;\n\nclass threading_control_impl {\npublic:\n    threading_control_impl(threading_control*);\n\npublic:\n    void release(bool blocking_terminate);\n\n    threading_control_client create_client(arena& a);\n    void publish_client(threading_control_client client, d1::constraints& constraints);\n\n    struct client_snapshot {\n        std::uint64_t aba_epoch;\n        unsigned priority_level;\n        thread_dispatcher_client* my_td_client;\n        pm_client* my_pm_client;\n    };\n\n    client_snapshot prepare_client_destruction(threading_control_client client);\n    bool try_destroy_client(client_snapshot deleter);\n\n    void register_thread(thread_data& td);\n    void unregister_thread(thread_data& td);\n    void propagate_task_group_state(std::atomic<uint32_t> d1::task_group_context::*mptr_state,\n                                    d1::task_group_context& src, uint32_t new_state);\n\n    void set_active_num_workers(unsigned soft_limit);\n    std::size_t worker_stack_size();\n    unsigned max_num_workers();\n\n    void adjust_demand(threading_control_client, int mandatory_delta, int workers_delta);\n    bool is_any_other_client_active();\n\n    thread_control_monitor& get_waiting_threads_monitor();\n\nprivate:\n    static unsigned calc_workers_soft_limit(unsigned workers_hard_limit);\n    static std::pair<unsigned, unsigned> calculate_workers_limits();\n    static cache_aligned_unique_ptr<permit_manager> make_permit_manager(unsigned workers_soft_limit);\n    static cache_aligned_unique_ptr<thread_dispatcher> make_thread_dispatcher(threading_control& control,\n                                                                              unsigned workers_soft_limit,\n                                                                              unsigned workers_hard_limit);\n\n    // TODO: Consider allocation one chunk of memory and construct objects on it\n    cache_aligned_unique_ptr<permit_manager> my_permit_manager{nullptr};\n    cache_aligned_unique_ptr<thread_dispatcher> my_thread_dispatcher{nullptr};\n    cache_aligned_unique_ptr<thread_request_serializer_proxy> my_thread_request_serializer{nullptr};\n    cache_aligned_unique_ptr<cancellation_disseminator> my_cancellation_disseminator{nullptr};\n    cache_aligned_unique_ptr<thread_control_monitor> my_waiting_threads_monitor{nullptr};\n};\n\n\nclass threading_control {\n    using global_mutex_type = d1::mutex;\npublic:\n    using client_snapshot = threading_control_impl::client_snapshot;\n\n    static threading_control* register_public_reference();\n    static bool unregister_public_reference(bool blocking_terminate);\n\n    static bool is_present();\n    static void set_active_num_workers(unsigned soft_limit);\n    static bool register_lifetime_control();\n    static bool unregister_lifetime_control(bool blocking_terminate);\n\n    threading_control_client create_client(arena& a);\n    void publish_client(threading_control_client client, d1::constraints& constraints);\n    client_snapshot prepare_client_destruction(threading_control_client client);\n    bool try_destroy_client(client_snapshot deleter);\n\n    void register_thread(thread_data& td);\n    void unregister_thread(thread_data& td);\n    void propagate_task_group_state(std::atomic<uint32_t> d1::task_group_context::*mptr_state,\n                                    d1::task_group_context& src, uint32_t new_state);\n\n    std::size_t worker_stack_size();\n    static unsigned max_num_workers();\n\n    void adjust_demand(threading_control_client client, int mandatory_delta, int workers_delta);\n    bool is_any_other_client_active();\n\n    thread_control_monitor& get_waiting_threads_monitor();\n\nprivate:\n    threading_control(unsigned public_ref, unsigned ref);\n    void add_ref(bool is_public);\n    bool remove_ref(bool is_public);\n\n    static threading_control* get_threading_control(bool is_public);\n    static threading_control* create_threading_control();\n\n    bool release(bool is_public, bool blocking_terminate);\n    void wait_last_reference(global_mutex_type::scoped_lock& lock);\n    void destroy();\n\n    friend class thread_dispatcher;\n\n    static threading_control* g_threading_control;\n    //! Mutex guarding creation/destruction of g_threading_control, insertions/deletions in my_arenas, and cancellation propagation\n    static global_mutex_type g_threading_control_mutex;\n\n    cache_aligned_unique_ptr<threading_control_impl> my_pimpl{nullptr};\n    //! Count of external threads attached\n    std::atomic<unsigned> my_public_ref_count{0};\n    //! Reference count controlling threading_control object lifetime\n    std::atomic<unsigned> my_ref_count{0};\n};\n\n} // r1\n} // detail\n} // tbb\n\n\n#endif // _TBB_threading_control_H\n"
  },
  {
    "path": "third-party/tbb/src/tbb/threading_control_client.h",
    "content": "/*\n    Copyright (c) 2022-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_threading_control_client_H\n#define _TBB_threading_control_client_H\n\n#include \"oneapi/tbb/detail/_assert.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\nclass pm_client;\nclass thread_dispatcher_client;\n\nclass threading_control_client {\npublic:\n    threading_control_client() = default;\n    threading_control_client(const threading_control_client&) = default;\n    threading_control_client& operator=(const threading_control_client&) = default;\n\n    threading_control_client(pm_client* p, thread_dispatcher_client* t) : my_pm_client(p), my_thread_dispatcher_client(t) {\n        __TBB_ASSERT(my_pm_client, nullptr);\n        __TBB_ASSERT(my_thread_dispatcher_client, nullptr);\n    }\n\n    pm_client* get_pm_client() {\n        return my_pm_client;\n    }\n\n    thread_dispatcher_client* get_thread_dispatcher_client() {\n        return my_thread_dispatcher_client;\n    }\n\nprivate:\n    pm_client* my_pm_client{nullptr};\n    thread_dispatcher_client* my_thread_dispatcher_client{nullptr};\n};\n\n\n}\n}\n}\n\n#endif // _TBB_threading_control_client_H\n"
  },
  {
    "path": "third-party/tbb/src/tbb/tls.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_tls_H\n#define _TBB_tls_H\n\n#include \"oneapi/tbb/detail/_config.h\"\n\n#if __TBB_USE_POSIX\n#include <pthread.h>\n#else /* assume __TBB_USE_WINAPI */\n#include <windows.h>\n#endif\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\ntypedef void (*tls_dtor_t)(void*);\n\n//! Basic cross-platform wrapper class for TLS operations.\ntemplate <typename T>\nclass basic_tls {\n#if __TBB_USE_POSIX\n    typedef pthread_key_t tls_key_t;\npublic:\n    int  create( tls_dtor_t dtor = nullptr ) {\n        return pthread_key_create(&my_key, dtor);\n    }\n    int  destroy()      { return pthread_key_delete(my_key); }\n    void set( T value ) { pthread_setspecific(my_key, (void*)value); }\n    T    get()          { return (T)pthread_getspecific(my_key); }\n#else /* __TBB_USE_WINAPI */\n    typedef DWORD tls_key_t;\npublic:\n#if !__TBB_WIN8UI_SUPPORT\n    int create() {\n        tls_key_t tmp = TlsAlloc();\n        if( tmp==TLS_OUT_OF_INDEXES )\n            return TLS_OUT_OF_INDEXES;\n        my_key = tmp;\n        return 0;\n    }\n    int  destroy()      { TlsFree(my_key); my_key=0; return 0; }\n    void set( T value ) { TlsSetValue(my_key, (LPVOID)value); }\n    T    get()          { return (T)TlsGetValue(my_key); }\n#else /*!__TBB_WIN8UI_SUPPORT*/\n    int create() {\n        tls_key_t tmp = FlsAlloc(nullptr);\n        if( tmp== (DWORD)0xFFFFFFFF )\n            return (DWORD)0xFFFFFFFF;\n        my_key = tmp;\n        return 0;\n    }\n    int  destroy()      { FlsFree(my_key); my_key=0; return 0; }\n    void set( T value ) { FlsSetValue(my_key, (LPVOID)value); }\n    T    get()          { return (T)FlsGetValue(my_key); }\n#endif /* !__TBB_WIN8UI_SUPPORT */\n#endif /* __TBB_USE_WINAPI */\nprivate:\n    tls_key_t my_key;\n};\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif /* _TBB_tls_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/tools_api/disable_warnings.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"ittnotify_config.h\"\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n\n#if defined _MSC_VER\n\n#pragma warning (disable: 593)   /* parameter \"XXXX\" was set but never used                 */\n#pragma warning (disable: 344)   /* typedef name has already been declared (with same type) */\n#pragma warning (disable: 174)   /* expression has no effect                                */\n#pragma warning (disable: 4127)  /* conditional expression is constant                      */\n#pragma warning (disable: 4306)  /* conversion from '?' to '?' of greater size              */\n\n#endif\n\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n#if defined __INTEL_COMPILER\n\n#pragma warning (disable: 869)  /* parameter \"XXXXX\" was never referenced                  */\n#pragma warning (disable: 1418) /* external function definition with no prior declaration  */\n#pragma warning (disable: 1419) /* external declaration in primary source file             */\n\n#endif /* __INTEL_COMPILER */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/tools_api/ittnotify.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _ITTNOTIFY_H_\n#define _ITTNOTIFY_H_\n\n/**\n@file\n@brief Public User API functions and types\n@mainpage\n\nThe Instrumentation and Tracing Technology API (ITT API) is used to\nannotate a user's program with additional information\nthat can be used by correctness and performance tools. The user inserts\ncalls in their program. Those calls generate information that is collected\nat runtime, and used by Intel(R) Threading Tools.\n\n@section API Concepts\nThe following general concepts are used throughout the API.\n\n@subsection Unicode Support\nMany API functions take character string arguments. On Windows, there\nare two versions of each such function. The function name is suffixed\nby W if Unicode support is enabled, and by A otherwise. Any API function\nthat takes a character string argument adheres to this convention.\n\n@subsection Conditional Compilation\nMany users prefer having an option to modify ITT API code when linking it\ninside their runtimes. ITT API header file provides a mechanism to replace\nITT API function names inside your code with empty strings. To do this,\ndefine the macros INTEL_NO_ITTNOTIFY_API during compilation and remove the\nstatic library from the linker script.\n\n@subsection Domains\n[see domains]\nDomains provide a way to separate notification for different modules or\nlibraries in a program. Domains are specified by dotted character strings,\ne.g. TBB.Internal.Control.\n\nA mechanism (to be specified) is provided to enable and disable\ndomains. By default, all domains are enabled.\n@subsection Named Entities and Instances\nNamed entities (frames, regions, tasks, and markers) communicate\ninformation about the program to the analysis tools. A named entity often\nrefers to a section of program code, or to some set of logical concepts\nthat the programmer wants to group together.\n\nNamed entities relate to the programmer's static view of the program. When\nthe program actually executes, many instances of a given named entity\nmay be created.\n\nThe API annotations denote instances of named entities. The actual\nnamed entities are displayed using the analysis tools. In other words,\nthe named entities come into existence when instances are created.\n\nInstances of named entities may have instance identifiers (IDs). Some\nAPI calls use instance identifiers to create relationships between\ndifferent instances of named entities. Other API calls associate data\nwith instances of named entities.\n\nSome named entities must always have instance IDs. In particular, regions\nand frames always have IDs. Task and markers need IDs only if the ID is\nneeded in another API call (such as adding a relation or metadata).\n\nThe lifetime of instance IDs is distinct from the lifetime of\ninstances. This allows various relationships to be specified separate\nfrom the actual execution of instances. This flexibility comes at the\nexpense of extra API calls.\n\nThe same ID may not be reused for different instances, unless a previous\n[ref] __itt_id_destroy call for that ID has been issued.\n*/\n\n/** @cond exclude_from_documentation */\n#ifndef ITT_OS_WIN\n#  define ITT_OS_WIN   1\n#endif /* ITT_OS_WIN */\n\n#ifndef ITT_OS_LINUX\n#  define ITT_OS_LINUX 2\n#endif /* ITT_OS_LINUX */\n\n#ifndef ITT_OS_MAC\n#  define ITT_OS_MAC   3\n#endif /* ITT_OS_MAC */\n\n#ifndef ITT_OS_FREEBSD\n#  define ITT_OS_FREEBSD   4\n#endif /* ITT_OS_FREEBSD */\n\n#ifndef ITT_OS_OPENBSD\n#  define ITT_OS_OPENBSD 5\n#endif /* ITT_OS_OPENBSD */\n\n\n#ifndef ITT_OS\n#  if defined WIN32 || defined _WIN32\n#    define ITT_OS ITT_OS_WIN\n#  elif defined( __APPLE__ ) && defined( __MACH__ )\n#    define ITT_OS ITT_OS_MAC\n#  elif defined( __FreeBSD__ )\n#    define ITT_OS ITT_OS_FREEBSD\n#  elif defined( __OpenBSD__ )\n#    define ITT_OS ITT_OS_OPENBSD\n#  else\n#    define ITT_OS ITT_OS_LINUX\n#  endif\n#endif /* ITT_OS */\n\n#ifndef ITT_PLATFORM_WIN\n#  define ITT_PLATFORM_WIN 1\n#endif /* ITT_PLATFORM_WIN */\n\n#ifndef ITT_PLATFORM_POSIX\n#  define ITT_PLATFORM_POSIX 2\n#endif /* ITT_PLATFORM_POSIX */\n\n#ifndef ITT_PLATFORM_MAC\n#  define ITT_PLATFORM_MAC 3\n#endif /* ITT_PLATFORM_MAC */\n\n#ifndef ITT_PLATFORM_FREEBSD\n#  define ITT_PLATFORM_FREEBSD 4\n#endif /* ITT_PLATFORM_FREEBSD */\n\n#ifndef ITT_PLATFORM_OPENBSD\n#  define ITT_PLATFORM_OPENBSD 5\n#endif /* ITT_PLATFORM_OPENBSD */\n\n#ifndef ITT_PLATFORM\n#  if ITT_OS==ITT_OS_WIN\n#    define ITT_PLATFORM ITT_PLATFORM_WIN\n#  elif ITT_OS==ITT_OS_MAC\n#    define ITT_PLATFORM ITT_PLATFORM_MAC\n#  elif ITT_OS==ITT_OS_FREEBSD\n#    define ITT_PLATFORM ITT_PLATFORM_FREEBSD\n#  elif ITT_OS==ITT_OS_OPENBSD\n#    define ITT_PLATFORM ITT_PLATFORM_OPENBSD\n#  else\n#    define ITT_PLATFORM ITT_PLATFORM_POSIX\n#  endif\n#endif /* ITT_PLATFORM */\n\n#if defined(_UNICODE) && !defined(UNICODE)\n#define UNICODE\n#endif\n\n#include <stddef.h>\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#include <tchar.h>\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#include <stdint.h>\n#if defined(UNICODE) || defined(_UNICODE)\n#include <wchar.h>\n#endif /* UNICODE || _UNICODE */\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n#ifndef ITTAPI_CDECL\n#  if ITT_PLATFORM==ITT_PLATFORM_WIN\n#    define ITTAPI_CDECL __cdecl\n#  else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#    if defined _M_IX86 || defined __i386__\n#      define ITTAPI_CDECL __attribute__ ((cdecl))\n#    else  /* _M_IX86 || __i386__ */\n#      define ITTAPI_CDECL /* actual only on x86 platform */\n#    endif /* _M_IX86 || __i386__ */\n#  endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* ITTAPI_CDECL */\n\n#ifndef STDCALL\n#  if ITT_PLATFORM==ITT_PLATFORM_WIN\n#    define STDCALL __stdcall\n#  else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#    if defined _M_IX86 || defined __i386__\n#      define STDCALL __attribute__ ((stdcall))\n#    else  /* _M_IX86 || __i386__ */\n#      define STDCALL /* supported only on x86 platform */\n#    endif /* _M_IX86 || __i386__ */\n#  endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* STDCALL */\n\n#define ITTAPI    ITTAPI_CDECL\n#define LIBITTAPI ITTAPI_CDECL\n\n/* TODO: Temporary for compatibility! */\n#define ITTAPI_CALL    ITTAPI_CDECL\n#define LIBITTAPI_CALL ITTAPI_CDECL\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n/* use __forceinline (VC++ specific) */\n#if defined(__MINGW32__) && !defined(__cplusplus)\n#define ITT_INLINE           static __inline__ __attribute__((__always_inline__,__gnu_inline__))\n#else\n#define ITT_INLINE           static __forceinline\n#endif /* __MINGW32__ */\n\n#define ITT_INLINE_ATTRIBUTE /* nothing */\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n/*\n * Generally, functions are not inlined unless optimization is specified.\n * For functions declared inline, this attribute inlines the function even\n * if no optimization level was specified.\n */\n#ifdef __STRICT_ANSI__\n#define ITT_INLINE           static\n#define ITT_INLINE_ATTRIBUTE __attribute__((unused))\n#else  /* __STRICT_ANSI__ */\n#define ITT_INLINE           static inline\n#define ITT_INLINE_ATTRIBUTE __attribute__((always_inline, unused))\n#endif /* __STRICT_ANSI__ */\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n/** @endcond */\n\n#ifdef INTEL_ITTNOTIFY_ENABLE_LEGACY\n#  if ITT_PLATFORM==ITT_PLATFORM_WIN\n#    pragma message(\"WARNING!!! Deprecated API is used. Please undefine INTEL_ITTNOTIFY_ENABLE_LEGACY macro\")\n#  else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#    warning \"Deprecated API is used. Please undefine INTEL_ITTNOTIFY_ENABLE_LEGACY macro\"\n#  endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#  include \"legacy/ittnotify.h\"\n#endif /* INTEL_ITTNOTIFY_ENABLE_LEGACY */\n\n/** @cond exclude_from_documentation */\n/* Helper macro for joining tokens */\n#define ITT_JOIN_AUX(p,n) p##n\n#define ITT_JOIN(p,n)     ITT_JOIN_AUX(p,n)\n\n#ifdef ITT_MAJOR\n#undef ITT_MAJOR\n#endif\n#ifdef ITT_MINOR\n#undef ITT_MINOR\n#endif\n#define ITT_MAJOR     3\n#define ITT_MINOR     0\n\n/* Standard versioning of a token with major and minor version numbers */\n#define ITT_VERSIONIZE(x)    \\\n    ITT_JOIN(x,              \\\n    ITT_JOIN(_,              \\\n    ITT_JOIN(ITT_MAJOR,      \\\n    ITT_JOIN(_, ITT_MINOR))))\n\n#ifndef INTEL_ITTNOTIFY_PREFIX\n#  define INTEL_ITTNOTIFY_PREFIX __itt_\n#endif /* INTEL_ITTNOTIFY_PREFIX */\n#ifndef INTEL_ITTNOTIFY_POSTFIX\n#  define INTEL_ITTNOTIFY_POSTFIX _ptr_\n#endif /* INTEL_ITTNOTIFY_POSTFIX */\n\n#define ITTNOTIFY_NAME_AUX(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n)\n#define ITTNOTIFY_NAME(n)     ITT_VERSIONIZE(ITTNOTIFY_NAME_AUX(ITT_JOIN(n,INTEL_ITTNOTIFY_POSTFIX)))\n\n#define ITTNOTIFY_VOID(n) (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)\n#define ITTNOTIFY_DATA(n) (!ITTNOTIFY_NAME(n)) ?       0 : ITTNOTIFY_NAME(n)\n\n#define ITTNOTIFY_VOID_D0(n,d)       (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d)\n#define ITTNOTIFY_VOID_D1(n,d,x)     (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x)\n#define ITTNOTIFY_VOID_D2(n,d,x,y)   (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y)\n#define ITTNOTIFY_VOID_D3(n,d,x,y,z) (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z)\n#define ITTNOTIFY_VOID_D4(n,d,x,y,z,a)     (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a)\n#define ITTNOTIFY_VOID_D5(n,d,x,y,z,a,b)   (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b)\n#define ITTNOTIFY_VOID_D6(n,d,x,y,z,a,b,c) (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c)\n#define ITTNOTIFY_DATA_D0(n,d)       (d == NULL) ? 0 : (!(d)->flags) ?       0 : (!ITTNOTIFY_NAME(n)) ?       0 : ITTNOTIFY_NAME(n)(d)\n#define ITTNOTIFY_DATA_D1(n,d,x)     (d == NULL) ? 0 : (!(d)->flags) ?       0 : (!ITTNOTIFY_NAME(n)) ?       0 : ITTNOTIFY_NAME(n)(d,x)\n#define ITTNOTIFY_DATA_D2(n,d,x,y)   (d == NULL) ? 0 : (!(d)->flags) ?       0 : (!ITTNOTIFY_NAME(n)) ?       0 : ITTNOTIFY_NAME(n)(d,x,y)\n#define ITTNOTIFY_DATA_D3(n,d,x,y,z) (d == NULL) ? 0 : (!(d)->flags) ?       0 : (!ITTNOTIFY_NAME(n)) ?       0 : ITTNOTIFY_NAME(n)(d,x,y,z)\n#define ITTNOTIFY_DATA_D4(n,d,x,y,z,a)     (d == NULL) ? 0 : (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ?       0 : ITTNOTIFY_NAME(n)(d,x,y,z,a)\n#define ITTNOTIFY_DATA_D5(n,d,x,y,z,a,b)   (d == NULL) ? 0 : (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ?       0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b)\n#define ITTNOTIFY_DATA_D6(n,d,x,y,z,a,b,c) (d == NULL) ? 0 : (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ?       0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c)\n\n#ifdef ITT_STUB\n#undef ITT_STUB\n#endif\n#ifdef ITT_STUBV\n#undef ITT_STUBV\n#endif\n#define ITT_STUBV(api,type,name,args)                             \\\n    typedef type (api* ITT_JOIN(ITTNOTIFY_NAME(name),_t)) args;   \\\n    extern ITT_JOIN(ITTNOTIFY_NAME(name),_t) ITTNOTIFY_NAME(name);\n#define ITT_STUB ITT_STUBV\n/** @endcond */\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/** @cond exclude_from_gpa_documentation */\n/**\n * @defgroup public Public API\n * @{\n * @}\n */\n\n/**\n * @defgroup control Collection Control\n * @ingroup public\n * General behavior: application continues to run, but no profiling information is being collected\n *\n * Pausing occurs not only for the current thread but for all process as well as spawned processes\n * - Intel(R) Parallel Inspector and Intel(R) Inspector XE:\n *   - Does not analyze or report errors that involve memory access.\n *   - Other errors are reported as usual. Pausing data collection in\n *     Intel(R) Parallel Inspector and Intel(R) Inspector XE\n *     only pauses tracing and analyzing memory access.\n *     It does not pause tracing or analyzing threading APIs.\n *   .\n * Intel(R) VTune(TM) Profiler:\n *   - Does continue to record when new threads are started.\n *   .\n * - Other effects:\n *   - Possible reduction of runtime overhead.\n *   .\n * @{\n */\n/** @brief Pause collection */\nvoid ITTAPI __itt_pause(void);\n/** @brief Resume collection */\nvoid ITTAPI __itt_resume(void);\n/** @brief Detach collection */\nvoid ITTAPI __itt_detach(void);\n\n/**\n * @enum __itt_collection_scope\n * @brief Enumerator for collection scopes\n */\ntypedef enum {\n    __itt_collection_scope_host    = 1 << 0,\n    __itt_collection_scope_offload = 1 << 1,\n    __itt_collection_scope_all     = 0x7FFFFFFF\n} __itt_collection_scope;\n\n/** @brief Pause scoped collection */\nvoid ITTAPI __itt_pause_scoped(__itt_collection_scope);\n/** @brief Resume scoped collection */\nvoid ITTAPI __itt_resume_scoped(__itt_collection_scope);\n  \n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, pause,         (void))\nITT_STUBV(ITTAPI, void, pause_scoped,  (__itt_collection_scope))\nITT_STUBV(ITTAPI, void, resume,        (void))\nITT_STUBV(ITTAPI, void, resume_scoped, (__itt_collection_scope))\nITT_STUBV(ITTAPI, void, detach,        (void))\n#define __itt_pause             ITTNOTIFY_VOID(pause)\n#define __itt_pause_ptr         ITTNOTIFY_NAME(pause)\n#define __itt_pause_scoped      ITTNOTIFY_VOID(pause_scoped)\n#define __itt_pause_scoped_ptr  ITTNOTIFY_NAME(pause_scoped)\n#define __itt_resume            ITTNOTIFY_VOID(resume)\n#define __itt_resume_ptr        ITTNOTIFY_NAME(resume)\n#define __itt_resume_scoped     ITTNOTIFY_VOID(resume_scoped)\n#define __itt_resume_scoped_ptr ITTNOTIFY_NAME(resume_scoped)\n#define __itt_detach            ITTNOTIFY_VOID(detach)\n#define __itt_detach_ptr        ITTNOTIFY_NAME(detach)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_pause()\n#define __itt_pause_ptr           0\n#define __itt_pause_scoped(scope)\n#define __itt_pause_scoped_ptr    0\n#define __itt_resume()\n#define __itt_resume_ptr          0\n#define __itt_resume_scoped(scope)\n#define __itt_resume_scoped_ptr   0\n#define __itt_detach()\n#define __itt_detach_ptr          0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_pause_ptr           0\n#define __itt_pause_scoped_ptr    0\n#define __itt_resume_ptr          0\n#define __itt_resume_scoped_ptr   0\n#define __itt_detach_ptr          0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} control group */\n/** @endcond */\n\n/**\n * @defgroup Intel Processor Trace control\n * API from this group provides control over collection and analysis of Intel Processor Trace (Intel PT) data\n * Information about Intel Processor Trace technology can be found here (Volume 3 chapter 35):\n * https://github.com/tpn/pdfs/blob/master/Intel%2064%20and%20IA-32%20Architectures%20Software%20Developer's%20Manual%20-%20Combined%20Volumes%201-4%20-%20May%202018%20(325462-sdm-vol-1-2abcd-3abcd).pdf\n * Use this API to mark particular code regions for loading detailed performance statistics.\n * This mode makes your analysis faster and more accurate.\n * @{\n*/\ntypedef unsigned char __itt_pt_region;\n\n/**\n * @brief function saves a region name marked with Intel PT API and returns a region id.\n * Only 7 names can be registered. Attempts to register more names will be ignored and a region id with auto names will be returned.\n * For automatic naming of regions pass NULL as function parameter\n*/\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n__itt_pt_region ITTAPI __itt_pt_region_createA(const char    *name);\n__itt_pt_region ITTAPI __itt_pt_region_createW(const wchar_t *name);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_pt_region_create __itt_pt_region_createW\n#else /* UNICODE */\n#  define __itt_pt_region_create __itt_pt_region_createA\n#endif /* UNICODE */\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n__itt_pt_region ITTAPI __itt_pt_region_create(const char *name);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, __itt_pt_region, pt_region_createA, (const char    *name))\nITT_STUB(ITTAPI, __itt_pt_region, pt_region_createW, (const wchar_t *name))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, __itt_pt_region, pt_region_create,  (const char    *name))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_pt_region_createA     ITTNOTIFY_DATA(pt_region_createA)\n#define __itt_pt_region_createA_ptr ITTNOTIFY_NAME(pt_region_createA)\n#define __itt_pt_region_createW     ITTNOTIFY_DATA(pt_region_createW)\n#define __itt_pt_region_createW_ptr ITTNOTIFY_NAME(pt_region_createW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_pt_region_create     ITTNOTIFY_DATA(pt_region_create)\n#define __itt_pt_region_create_ptr ITTNOTIFY_NAME(pt_region_create)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_pt_region_createA(name) (__itt_pt_region)0\n#define __itt_pt_region_createA_ptr 0\n#define __itt_pt_region_createW(name) (__itt_pt_region)0\n#define __itt_pt_region_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_pt_region_create(name)  (__itt_pt_region)0\n#define __itt_pt_region_create_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_pt_region_createA_ptr 0\n#define __itt_pt_region_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_pt_region_create_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief function contains a special code pattern identified on the post-processing stage and\n * marks the beginning of a code region targeted for Intel PT analysis\n * @param[in] region - region id, 0 <= region < 8\n*/\nvoid __itt_mark_pt_region_begin(__itt_pt_region region);\n/**\n * @brief function contains a special code pattern identified on the post-processing stage and\n * marks the end of a code region targeted for Intel PT analysis\n * @param[in] region - region id, 0 <= region < 8\n*/\nvoid __itt_mark_pt_region_end(__itt_pt_region region);\n/** @} Intel PT control group*/\n\n/**\n * @defgroup threads Threads\n * @ingroup public\n * Give names to threads\n * @{\n */\n/**\n * @brief Sets thread name of calling thread\n * @param[in] name - name of thread\n */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nvoid ITTAPI __itt_thread_set_nameA(const char    *name);\nvoid ITTAPI __itt_thread_set_nameW(const wchar_t *name);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_thread_set_name     __itt_thread_set_nameW\n#  define __itt_thread_set_name_ptr __itt_thread_set_nameW_ptr\n#else /* UNICODE */\n#  define __itt_thread_set_name     __itt_thread_set_nameA\n#  define __itt_thread_set_name_ptr __itt_thread_set_nameA_ptr\n#endif /* UNICODE */\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nvoid ITTAPI __itt_thread_set_name(const char *name);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUBV(ITTAPI, void, thread_set_nameA, (const char    *name))\nITT_STUBV(ITTAPI, void, thread_set_nameW, (const wchar_t *name))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUBV(ITTAPI, void, thread_set_name,  (const char    *name))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_thread_set_nameA     ITTNOTIFY_VOID(thread_set_nameA)\n#define __itt_thread_set_nameA_ptr ITTNOTIFY_NAME(thread_set_nameA)\n#define __itt_thread_set_nameW     ITTNOTIFY_VOID(thread_set_nameW)\n#define __itt_thread_set_nameW_ptr ITTNOTIFY_NAME(thread_set_nameW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_thread_set_name     ITTNOTIFY_VOID(thread_set_name)\n#define __itt_thread_set_name_ptr ITTNOTIFY_NAME(thread_set_name)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_thread_set_nameA(name)\n#define __itt_thread_set_nameA_ptr 0\n#define __itt_thread_set_nameW(name)\n#define __itt_thread_set_nameW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_thread_set_name(name)\n#define __itt_thread_set_name_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_thread_set_nameA_ptr 0\n#define __itt_thread_set_nameW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_thread_set_name_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/** @cond exclude_from_gpa_documentation */\n\n/**\n * @brief Mark current thread as ignored from this point on, for the duration of its existence.\n */\nvoid ITTAPI __itt_thread_ignore(void);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, thread_ignore, (void))\n#define __itt_thread_ignore     ITTNOTIFY_VOID(thread_ignore)\n#define __itt_thread_ignore_ptr ITTNOTIFY_NAME(thread_ignore)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_thread_ignore()\n#define __itt_thread_ignore_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_thread_ignore_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} threads group */\n\n/**\n * @defgroup suppress Error suppression\n * @ingroup public\n * General behavior: application continues to run, but errors are suppressed\n *\n * @{\n */\n\n/*****************************************************************//**\n * @name group of functions used for error suppression in correctness tools\n *********************************************************************/\n/** @{ */\n/**\n * @hideinitializer\n * @brief possible value for suppression mask\n */\n#define __itt_suppress_all_errors 0x7fffffff\n\n/**\n * @hideinitializer\n * @brief possible value for suppression mask (suppresses errors from threading analysis)\n */\n#define __itt_suppress_threading_errors 0x000000ff\n\n/**\n * @hideinitializer\n * @brief possible value for suppression mask (suppresses errors from memory analysis)\n */\n#define __itt_suppress_memory_errors 0x0000ff00\n\n/**\n * @brief Start suppressing errors identified in mask on this thread\n */\nvoid ITTAPI __itt_suppress_push(unsigned int mask);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, suppress_push, (unsigned int mask))\n#define __itt_suppress_push     ITTNOTIFY_VOID(suppress_push)\n#define __itt_suppress_push_ptr ITTNOTIFY_NAME(suppress_push)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_suppress_push(mask)\n#define __itt_suppress_push_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_suppress_push_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Undo the effects of the matching call to __itt_suppress_push\n */\nvoid ITTAPI __itt_suppress_pop(void);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, suppress_pop, (void))\n#define __itt_suppress_pop     ITTNOTIFY_VOID(suppress_pop)\n#define __itt_suppress_pop_ptr ITTNOTIFY_NAME(suppress_pop)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_suppress_pop()\n#define __itt_suppress_pop_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_suppress_pop_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @enum __itt_suppress_mode\n * @brief Enumerator for the suppressing modes\n */\ntypedef enum __itt_suppress_mode {\n    __itt_unsuppress_range,\n    __itt_suppress_range\n} __itt_suppress_mode_t;\n\n/**\n * @enum __itt_collection_state\n * @brief Enumerator for collection state.\n */\ntypedef enum {\n    __itt_collection_uninitialized = 0, /* uninitialized */\n    __itt_collection_init_fail = 1, /* failed to init */\n    __itt_collection_collector_absent = 2, /* non work state collector is absent */\n    __itt_collection_collector_exists = 3, /* work state collector exists */\n    __itt_collection_init_successful = 4 /* success to init */\n} __itt_collection_state;\n\n/**\n * @brief Mark a range of memory for error suppression or unsuppression for error types included in mask\n */\nvoid ITTAPI __itt_suppress_mark_range(__itt_suppress_mode_t mode, unsigned int mask, void * address, size_t size);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, suppress_mark_range, (__itt_suppress_mode_t mode, unsigned int mask, void * address, size_t size))\n#define __itt_suppress_mark_range     ITTNOTIFY_VOID(suppress_mark_range)\n#define __itt_suppress_mark_range_ptr ITTNOTIFY_NAME(suppress_mark_range)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_suppress_mark_range(mask)\n#define __itt_suppress_mark_range_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_suppress_mark_range_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Undo the effect of a matching call to __itt_suppress_mark_range.   If not matching\n *        call is found, nothing is changed.\n */\nvoid ITTAPI __itt_suppress_clear_range(__itt_suppress_mode_t mode, unsigned int mask, void * address, size_t size);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, suppress_clear_range, (__itt_suppress_mode_t mode, unsigned int mask, void * address, size_t size))\n#define __itt_suppress_clear_range     ITTNOTIFY_VOID(suppress_clear_range)\n#define __itt_suppress_clear_range_ptr ITTNOTIFY_NAME(suppress_clear_range)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_suppress_clear_range(mask)\n#define __itt_suppress_clear_range_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_suppress_clear_range_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} */\n/** @} suppress group */\n\n/**\n * @defgroup sync Synchronization\n * @ingroup public\n * Indicate user-written synchronization code\n * @{\n */\n/**\n * @hideinitializer\n * @brief possible value of attribute argument for sync object type\n */\n#define __itt_attr_barrier 1\n\n/**\n * @hideinitializer\n * @brief possible value of attribute argument for sync object type\n */\n#define __itt_attr_mutex   2\n\n/**\n@brief Name a synchronization object\n@param[in] addr       Handle for the synchronization object. You should\nuse a real address to uniquely identify the synchronization object.\n@param[in] objtype    null-terminated object type string. If NULL is\npassed, the name will be \"User Synchronization\".\n@param[in] objname    null-terminated object name string. If NULL,\nno name will be assigned to the object.\n@param[in] attribute  one of [#__itt_attr_barrier, #__itt_attr_mutex]\n */\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nvoid ITTAPI __itt_sync_createA(void *addr, const char    *objtype, const char    *objname, int attribute);\nvoid ITTAPI __itt_sync_createW(void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_sync_create     __itt_sync_createW\n#  define __itt_sync_create_ptr __itt_sync_createW_ptr\n#else /* UNICODE */\n#  define __itt_sync_create     __itt_sync_createA\n#  define __itt_sync_create_ptr __itt_sync_createA_ptr\n#endif /* UNICODE */\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nvoid ITTAPI __itt_sync_create (void *addr, const char *objtype, const char *objname, int attribute);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUBV(ITTAPI, void, sync_createA, (void *addr, const char    *objtype, const char    *objname, int attribute))\nITT_STUBV(ITTAPI, void, sync_createW, (void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUBV(ITTAPI, void, sync_create,  (void *addr, const char*    objtype, const char*    objname, int attribute))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_sync_createA     ITTNOTIFY_VOID(sync_createA)\n#define __itt_sync_createA_ptr ITTNOTIFY_NAME(sync_createA)\n#define __itt_sync_createW     ITTNOTIFY_VOID(sync_createW)\n#define __itt_sync_createW_ptr ITTNOTIFY_NAME(sync_createW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_sync_create     ITTNOTIFY_VOID(sync_create)\n#define __itt_sync_create_ptr ITTNOTIFY_NAME(sync_create)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_sync_createA(addr, objtype, objname, attribute)\n#define __itt_sync_createA_ptr 0\n#define __itt_sync_createW(addr, objtype, objname, attribute)\n#define __itt_sync_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_sync_create(addr, objtype, objname, attribute)\n#define __itt_sync_create_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_sync_createA_ptr 0\n#define __itt_sync_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_sync_create_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n@brief Rename a synchronization object\n\nYou can use the rename call to assign or reassign a name to a given\nsynchronization object.\n@param[in] addr  handle for the synchronization object.\n@param[in] name  null-terminated object name string.\n*/\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nvoid ITTAPI __itt_sync_renameA(void *addr, const char    *name);\nvoid ITTAPI __itt_sync_renameW(void *addr, const wchar_t *name);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_sync_rename     __itt_sync_renameW\n#  define __itt_sync_rename_ptr __itt_sync_renameW_ptr\n#else /* UNICODE */\n#  define __itt_sync_rename     __itt_sync_renameA\n#  define __itt_sync_rename_ptr __itt_sync_renameA_ptr\n#endif /* UNICODE */\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nvoid ITTAPI __itt_sync_rename(void *addr, const char *name);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUBV(ITTAPI, void, sync_renameA, (void *addr, const char    *name))\nITT_STUBV(ITTAPI, void, sync_renameW, (void *addr, const wchar_t *name))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUBV(ITTAPI, void, sync_rename,  (void *addr, const char    *name))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_sync_renameA     ITTNOTIFY_VOID(sync_renameA)\n#define __itt_sync_renameA_ptr ITTNOTIFY_NAME(sync_renameA)\n#define __itt_sync_renameW     ITTNOTIFY_VOID(sync_renameW)\n#define __itt_sync_renameW_ptr ITTNOTIFY_NAME(sync_renameW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_sync_rename     ITTNOTIFY_VOID(sync_rename)\n#define __itt_sync_rename_ptr ITTNOTIFY_NAME(sync_rename)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_sync_renameA(addr, name)\n#define __itt_sync_renameA_ptr 0\n#define __itt_sync_renameW(addr, name)\n#define __itt_sync_renameW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_sync_rename(addr, name)\n#define __itt_sync_rename_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_sync_renameA_ptr 0\n#define __itt_sync_renameW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_sync_rename_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n @brief Destroy a synchronization object.\n @param addr Handle for the synchronization object.\n */\nvoid ITTAPI __itt_sync_destroy(void *addr);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, sync_destroy, (void *addr))\n#define __itt_sync_destroy     ITTNOTIFY_VOID(sync_destroy)\n#define __itt_sync_destroy_ptr ITTNOTIFY_NAME(sync_destroy)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_sync_destroy(addr)\n#define __itt_sync_destroy_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_sync_destroy_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/*****************************************************************//**\n * @name group of functions is used for performance measurement tools\n *********************************************************************/\n/** @{ */\n/**\n * @brief Enter spin loop on user-defined sync object\n */\nvoid ITTAPI __itt_sync_prepare(void* addr);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, sync_prepare, (void *addr))\n#define __itt_sync_prepare     ITTNOTIFY_VOID(sync_prepare)\n#define __itt_sync_prepare_ptr ITTNOTIFY_NAME(sync_prepare)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_sync_prepare(addr)\n#define __itt_sync_prepare_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_sync_prepare_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Quit spin loop without acquiring spin object\n */\nvoid ITTAPI __itt_sync_cancel(void *addr);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, sync_cancel, (void *addr))\n#define __itt_sync_cancel     ITTNOTIFY_VOID(sync_cancel)\n#define __itt_sync_cancel_ptr ITTNOTIFY_NAME(sync_cancel)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_sync_cancel(addr)\n#define __itt_sync_cancel_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_sync_cancel_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Successful spin loop completion (sync object acquired)\n */\nvoid ITTAPI __itt_sync_acquired(void *addr);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, sync_acquired, (void *addr))\n#define __itt_sync_acquired     ITTNOTIFY_VOID(sync_acquired)\n#define __itt_sync_acquired_ptr ITTNOTIFY_NAME(sync_acquired)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_sync_acquired(addr)\n#define __itt_sync_acquired_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_sync_acquired_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Start sync object releasing code. Is called before the lock release call.\n */\nvoid ITTAPI __itt_sync_releasing(void* addr);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, sync_releasing, (void *addr))\n#define __itt_sync_releasing     ITTNOTIFY_VOID(sync_releasing)\n#define __itt_sync_releasing_ptr ITTNOTIFY_NAME(sync_releasing)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_sync_releasing(addr)\n#define __itt_sync_releasing_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_sync_releasing_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} */\n\n/** @} sync group */\n\n/**************************************************************//**\n * @name group of functions is used for correctness checking tools\n ******************************************************************/\n/** @{ */\n/**\n * @ingroup legacy\n * @deprecated Legacy API\n * @brief Fast synchronization which does no require spinning.\n * - This special function is to be used by TBB and OpenMP libraries only when they know\n *   there is no spin but they need to suppress TC warnings about shared variable modifications.\n * - It only has corresponding pointers in static library and does not have corresponding function\n *   in dynamic library.\n * @see void __itt_sync_prepare(void* addr);\n */\nvoid ITTAPI __itt_fsync_prepare(void* addr);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, fsync_prepare, (void *addr))\n#define __itt_fsync_prepare     ITTNOTIFY_VOID(fsync_prepare)\n#define __itt_fsync_prepare_ptr ITTNOTIFY_NAME(fsync_prepare)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_fsync_prepare(addr)\n#define __itt_fsync_prepare_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_fsync_prepare_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @ingroup legacy\n * @deprecated Legacy API\n * @brief Fast synchronization which does no require spinning.\n * - This special function is to be used by TBB and OpenMP libraries only when they know\n *   there is no spin but they need to suppress TC warnings about shared variable modifications.\n * - It only has corresponding pointers in static library and does not have corresponding function\n *   in dynamic library.\n * @see void __itt_sync_cancel(void *addr);\n */\nvoid ITTAPI __itt_fsync_cancel(void *addr);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, fsync_cancel, (void *addr))\n#define __itt_fsync_cancel     ITTNOTIFY_VOID(fsync_cancel)\n#define __itt_fsync_cancel_ptr ITTNOTIFY_NAME(fsync_cancel)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_fsync_cancel(addr)\n#define __itt_fsync_cancel_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_fsync_cancel_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @ingroup legacy\n * @deprecated Legacy API\n * @brief Fast synchronization which does no require spinning.\n * - This special function is to be used by TBB and OpenMP libraries only when they know\n *   there is no spin but they need to suppress TC warnings about shared variable modifications.\n * - It only has corresponding pointers in static library and does not have corresponding function\n *   in dynamic library.\n * @see void __itt_sync_acquired(void *addr);\n */\nvoid ITTAPI __itt_fsync_acquired(void *addr);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, fsync_acquired, (void *addr))\n#define __itt_fsync_acquired     ITTNOTIFY_VOID(fsync_acquired)\n#define __itt_fsync_acquired_ptr ITTNOTIFY_NAME(fsync_acquired)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_fsync_acquired(addr)\n#define __itt_fsync_acquired_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_fsync_acquired_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @ingroup legacy\n * @deprecated Legacy API\n * @brief Fast synchronization which does no require spinning.\n * - This special function is to be used by TBB and OpenMP libraries only when they know\n *   there is no spin but they need to suppress TC warnings about shared variable modifications.\n * - It only has corresponding pointers in static library and does not have corresponding function\n *   in dynamic library.\n * @see void __itt_sync_releasing(void* addr);\n */\nvoid ITTAPI __itt_fsync_releasing(void* addr);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, fsync_releasing, (void *addr))\n#define __itt_fsync_releasing     ITTNOTIFY_VOID(fsync_releasing)\n#define __itt_fsync_releasing_ptr ITTNOTIFY_NAME(fsync_releasing)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_fsync_releasing(addr)\n#define __itt_fsync_releasing_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_fsync_releasing_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} */\n\n/**\n * @defgroup model Modeling by Intel(R) Parallel Advisor\n * @ingroup public\n * This is the subset of itt used for modeling by Intel(R) Parallel Advisor.\n * This API is called ONLY using annotate.h, by \"Annotation\" macros\n * the user places in their sources during the parallelism modeling steps.\n *\n * site_begin/end and task_begin/end take the address of handle variables,\n * which are writeable by the API.  Handles must be 0 initialized prior\n * to the first call to begin, or may cause a run-time failure.\n * The handles are initialized in a multi-thread safe way by the API if\n * the handle is 0.  The commonly expected idiom is one static handle to\n * identify a site or task.  If a site or task of the same name has already\n * been started during this collection, the same handle MAY be returned,\n * but is not required to be - it is unspecified if data merging is done\n * based on name.  These routines also take an instance variable.  Like\n * the lexical instance, these must be 0 initialized.  Unlike the lexical\n * instance, this is used to track a single dynamic instance.\n *\n * API used by the Intel(R) Parallel Advisor to describe potential concurrency\n * and related activities. User-added source annotations expand to calls\n * to these procedures to enable modeling of a hypothetical concurrent\n * execution serially.\n * @{\n */\n#if !defined(_ADVISOR_ANNOTATE_H_) || defined(ANNOTATE_EXPAND_NULL)\n\ntypedef void* __itt_model_site;             /*!< @brief handle for lexical site     */\ntypedef void* __itt_model_site_instance;    /*!< @brief handle for dynamic instance */\ntypedef void* __itt_model_task;             /*!< @brief handle for lexical site     */\ntypedef void* __itt_model_task_instance;    /*!< @brief handle for dynamic instance */\n\n/**\n * @enum __itt_model_disable\n * @brief Enumerator for the disable methods\n */\ntypedef enum {\n    __itt_model_disable_observation,\n    __itt_model_disable_collection\n} __itt_model_disable;\n\n#endif /* !_ADVISOR_ANNOTATE_H_ || ANNOTATE_EXPAND_NULL */\n\n/**\n * @brief ANNOTATE_SITE_BEGIN/ANNOTATE_SITE_END support.\n *\n * site_begin/end model a potential concurrency site.\n * site instances may be recursively nested with themselves.\n * site_end exits the most recently started but unended site for the current\n * thread.  The handle passed to end may be used to validate structure.\n * Instances of a site encountered on different threads concurrently\n * are considered completely distinct. If the site name for two different\n * lexical sites match, it is unspecified whether they are treated as the\n * same or different for data presentation.\n */\nvoid ITTAPI __itt_model_site_begin(__itt_model_site *site, __itt_model_site_instance *instance, const char *name);\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nvoid ITTAPI __itt_model_site_beginW(const wchar_t *name);\n#endif\nvoid ITTAPI __itt_model_site_beginA(const char *name);\nvoid ITTAPI __itt_model_site_beginAL(const char *name, size_t siteNameLen);\nvoid ITTAPI __itt_model_site_end  (__itt_model_site *site, __itt_model_site_instance *instance);\nvoid ITTAPI __itt_model_site_end_2(void);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, model_site_begin,  (__itt_model_site *site, __itt_model_site_instance *instance, const char *name))\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUBV(ITTAPI, void, model_site_beginW,  (const wchar_t *name))\n#endif\nITT_STUBV(ITTAPI, void, model_site_beginA,  (const char *name))\nITT_STUBV(ITTAPI, void, model_site_beginAL,  (const char *name, size_t siteNameLen))\nITT_STUBV(ITTAPI, void, model_site_end,    (__itt_model_site *site, __itt_model_site_instance *instance))\nITT_STUBV(ITTAPI, void, model_site_end_2,  (void))\n#define __itt_model_site_begin      ITTNOTIFY_VOID(model_site_begin)\n#define __itt_model_site_begin_ptr  ITTNOTIFY_NAME(model_site_begin)\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_model_site_beginW      ITTNOTIFY_VOID(model_site_beginW)\n#define __itt_model_site_beginW_ptr  ITTNOTIFY_NAME(model_site_beginW)\n#endif\n#define __itt_model_site_beginA      ITTNOTIFY_VOID(model_site_beginA)\n#define __itt_model_site_beginA_ptr  ITTNOTIFY_NAME(model_site_beginA)\n#define __itt_model_site_beginAL      ITTNOTIFY_VOID(model_site_beginAL)\n#define __itt_model_site_beginAL_ptr  ITTNOTIFY_NAME(model_site_beginAL)\n#define __itt_model_site_end        ITTNOTIFY_VOID(model_site_end)\n#define __itt_model_site_end_ptr    ITTNOTIFY_NAME(model_site_end)\n#define __itt_model_site_end_2        ITTNOTIFY_VOID(model_site_end_2)\n#define __itt_model_site_end_2_ptr    ITTNOTIFY_NAME(model_site_end_2)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_model_site_begin(site, instance, name)\n#define __itt_model_site_begin_ptr  0\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_model_site_beginW(name)\n#define __itt_model_site_beginW_ptr  0\n#endif\n#define __itt_model_site_beginA(name)\n#define __itt_model_site_beginA_ptr  0\n#define __itt_model_site_beginAL(name, siteNameLen)\n#define __itt_model_site_beginAL_ptr  0\n#define __itt_model_site_end(site, instance)\n#define __itt_model_site_end_ptr    0\n#define __itt_model_site_end_2()\n#define __itt_model_site_end_2_ptr    0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_model_site_begin_ptr  0\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_model_site_beginW_ptr  0\n#endif\n#define __itt_model_site_beginA_ptr  0\n#define __itt_model_site_beginAL_ptr  0\n#define __itt_model_site_end_ptr    0\n#define __itt_model_site_end_2_ptr    0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief ANNOTATE_TASK_BEGIN/ANNOTATE_TASK_END support\n *\n * task_begin/end model a potential task, which is contained within the most\n * closely enclosing dynamic site.  task_end exits the most recently started\n * but unended task.  The handle passed to end may be used to validate\n * structure.  It is unspecified if bad dynamic nesting is detected.  If it\n * is, it should be encoded in the resulting data collection.  The collector\n * should not fail due to construct nesting issues, nor attempt to directly\n * indicate the problem.\n */\nvoid ITTAPI __itt_model_task_begin(__itt_model_task *task, __itt_model_task_instance *instance, const char *name);\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nvoid ITTAPI __itt_model_task_beginW(const wchar_t *name);\nvoid ITTAPI __itt_model_iteration_taskW(const wchar_t *name);\n#endif\nvoid ITTAPI __itt_model_task_beginA(const char *name);\nvoid ITTAPI __itt_model_task_beginAL(const char *name, size_t taskNameLen);\nvoid ITTAPI __itt_model_iteration_taskA(const char *name);\nvoid ITTAPI __itt_model_iteration_taskAL(const char *name, size_t taskNameLen);\nvoid ITTAPI __itt_model_task_end  (__itt_model_task *task, __itt_model_task_instance *instance);\nvoid ITTAPI __itt_model_task_end_2(void);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, model_task_begin,  (__itt_model_task *task, __itt_model_task_instance *instance, const char *name))\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUBV(ITTAPI, void, model_task_beginW,  (const wchar_t *name))\nITT_STUBV(ITTAPI, void, model_iteration_taskW, (const wchar_t *name))\n#endif\nITT_STUBV(ITTAPI, void, model_task_beginA,  (const char *name))\nITT_STUBV(ITTAPI, void, model_task_beginAL,  (const char *name, size_t taskNameLen))\nITT_STUBV(ITTAPI, void, model_iteration_taskA,  (const char *name))\nITT_STUBV(ITTAPI, void, model_iteration_taskAL,  (const char *name, size_t taskNameLen))\nITT_STUBV(ITTAPI, void, model_task_end,    (__itt_model_task *task, __itt_model_task_instance *instance))\nITT_STUBV(ITTAPI, void, model_task_end_2,  (void))\n#define __itt_model_task_begin      ITTNOTIFY_VOID(model_task_begin)\n#define __itt_model_task_begin_ptr  ITTNOTIFY_NAME(model_task_begin)\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_model_task_beginW     ITTNOTIFY_VOID(model_task_beginW)\n#define __itt_model_task_beginW_ptr ITTNOTIFY_NAME(model_task_beginW)\n#define __itt_model_iteration_taskW     ITTNOTIFY_VOID(model_iteration_taskW)\n#define __itt_model_iteration_taskW_ptr ITTNOTIFY_NAME(model_iteration_taskW)\n#endif\n#define __itt_model_task_beginA    ITTNOTIFY_VOID(model_task_beginA)\n#define __itt_model_task_beginA_ptr ITTNOTIFY_NAME(model_task_beginA)\n#define __itt_model_task_beginAL    ITTNOTIFY_VOID(model_task_beginAL)\n#define __itt_model_task_beginAL_ptr ITTNOTIFY_NAME(model_task_beginAL)\n#define __itt_model_iteration_taskA    ITTNOTIFY_VOID(model_iteration_taskA)\n#define __itt_model_iteration_taskA_ptr ITTNOTIFY_NAME(model_iteration_taskA)\n#define __itt_model_iteration_taskAL    ITTNOTIFY_VOID(model_iteration_taskAL)\n#define __itt_model_iteration_taskAL_ptr ITTNOTIFY_NAME(model_iteration_taskAL)\n#define __itt_model_task_end        ITTNOTIFY_VOID(model_task_end)\n#define __itt_model_task_end_ptr    ITTNOTIFY_NAME(model_task_end)\n#define __itt_model_task_end_2        ITTNOTIFY_VOID(model_task_end_2)\n#define __itt_model_task_end_2_ptr    ITTNOTIFY_NAME(model_task_end_2)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_model_task_begin(task, instance, name)\n#define __itt_model_task_begin_ptr  0\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_model_task_beginW(name)\n#define __itt_model_task_beginW_ptr  0\n#endif\n#define __itt_model_task_beginA(name)\n#define __itt_model_task_beginA_ptr  0\n#define __itt_model_task_beginAL(name, siteNameLen)\n#define __itt_model_task_beginAL_ptr  0\n#define __itt_model_iteration_taskA(name)\n#define __itt_model_iteration_taskA_ptr  0\n#define __itt_model_iteration_taskAL(name, siteNameLen)\n#define __itt_model_iteration_taskAL_ptr  0\n#define __itt_model_task_end(task, instance)\n#define __itt_model_task_end_ptr    0\n#define __itt_model_task_end_2()\n#define __itt_model_task_end_2_ptr    0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_model_task_begin_ptr  0\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_model_task_beginW_ptr 0\n#endif\n#define __itt_model_task_beginA_ptr  0\n#define __itt_model_task_beginAL_ptr  0\n#define __itt_model_iteration_taskA_ptr    0\n#define __itt_model_iteration_taskAL_ptr    0\n#define __itt_model_task_end_ptr    0\n#define __itt_model_task_end_2_ptr    0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief ANNOTATE_LOCK_ACQUIRE/ANNOTATE_LOCK_RELEASE support\n *\n * lock_acquire/release model a potential lock for both lockset and\n * performance modeling.  Each unique address is modeled as a separate\n * lock, with invalid addresses being valid lock IDs.  Specifically:\n * no storage is accessed by the API at the specified address - it is only\n * used for lock identification.  Lock acquires may be self-nested and are\n * unlocked by a corresponding number of releases.\n * (These closely correspond to __itt_sync_acquired/__itt_sync_releasing,\n * but may not have identical semantics.)\n */\nvoid ITTAPI __itt_model_lock_acquire(void *lock);\nvoid ITTAPI __itt_model_lock_acquire_2(void *lock);\nvoid ITTAPI __itt_model_lock_release(void *lock);\nvoid ITTAPI __itt_model_lock_release_2(void *lock);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, model_lock_acquire, (void *lock))\nITT_STUBV(ITTAPI, void, model_lock_acquire_2, (void *lock))\nITT_STUBV(ITTAPI, void, model_lock_release, (void *lock))\nITT_STUBV(ITTAPI, void, model_lock_release_2, (void *lock))\n#define __itt_model_lock_acquire     ITTNOTIFY_VOID(model_lock_acquire)\n#define __itt_model_lock_acquire_ptr ITTNOTIFY_NAME(model_lock_acquire)\n#define __itt_model_lock_acquire_2     ITTNOTIFY_VOID(model_lock_acquire_2)\n#define __itt_model_lock_acquire_2_ptr ITTNOTIFY_NAME(model_lock_acquire_2)\n#define __itt_model_lock_release     ITTNOTIFY_VOID(model_lock_release)\n#define __itt_model_lock_release_ptr ITTNOTIFY_NAME(model_lock_release)\n#define __itt_model_lock_release_2     ITTNOTIFY_VOID(model_lock_release_2)\n#define __itt_model_lock_release_2_ptr ITTNOTIFY_NAME(model_lock_release_2)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_model_lock_acquire(lock)\n#define __itt_model_lock_acquire_ptr 0\n#define __itt_model_lock_acquire_2(lock)\n#define __itt_model_lock_acquire_2_ptr 0\n#define __itt_model_lock_release(lock)\n#define __itt_model_lock_release_ptr 0\n#define __itt_model_lock_release_2(lock)\n#define __itt_model_lock_release_2_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_model_lock_acquire_ptr 0\n#define __itt_model_lock_acquire_2_ptr 0\n#define __itt_model_lock_release_ptr 0\n#define __itt_model_lock_release_2_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief ANNOTATE_RECORD_ALLOCATION/ANNOTATE_RECORD_DEALLOCATION support\n *\n * record_allocation/deallocation describe user-defined memory allocator\n * behavior, which may be required for correctness modeling to understand\n * when storage is not expected to be actually reused across threads.\n */\nvoid ITTAPI __itt_model_record_allocation  (void *addr, size_t size);\nvoid ITTAPI __itt_model_record_deallocation(void *addr);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, model_record_allocation,   (void *addr, size_t size))\nITT_STUBV(ITTAPI, void, model_record_deallocation, (void *addr))\n#define __itt_model_record_allocation       ITTNOTIFY_VOID(model_record_allocation)\n#define __itt_model_record_allocation_ptr   ITTNOTIFY_NAME(model_record_allocation)\n#define __itt_model_record_deallocation     ITTNOTIFY_VOID(model_record_deallocation)\n#define __itt_model_record_deallocation_ptr ITTNOTIFY_NAME(model_record_deallocation)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_model_record_allocation(addr, size)\n#define __itt_model_record_allocation_ptr   0\n#define __itt_model_record_deallocation(addr)\n#define __itt_model_record_deallocation_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_model_record_allocation_ptr   0\n#define __itt_model_record_deallocation_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief ANNOTATE_INDUCTION_USES support\n *\n * Note particular storage is inductive through the end of the current site\n */\nvoid ITTAPI __itt_model_induction_uses(void* addr, size_t size);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, model_induction_uses, (void *addr, size_t size))\n#define __itt_model_induction_uses     ITTNOTIFY_VOID(model_induction_uses)\n#define __itt_model_induction_uses_ptr ITTNOTIFY_NAME(model_induction_uses)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_model_induction_uses(addr, size)\n#define __itt_model_induction_uses_ptr   0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_model_induction_uses_ptr   0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief ANNOTATE_REDUCTION_USES support\n *\n * Note particular storage is used for reduction through the end\n * of the current site\n */\nvoid ITTAPI __itt_model_reduction_uses(void* addr, size_t size);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, model_reduction_uses, (void *addr, size_t size))\n#define __itt_model_reduction_uses     ITTNOTIFY_VOID(model_reduction_uses)\n#define __itt_model_reduction_uses_ptr ITTNOTIFY_NAME(model_reduction_uses)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_model_reduction_uses(addr, size)\n#define __itt_model_reduction_uses_ptr   0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_model_reduction_uses_ptr   0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief ANNOTATE_OBSERVE_USES support\n *\n * Have correctness modeling record observations about uses of storage\n * through the end of the current site\n */\nvoid ITTAPI __itt_model_observe_uses(void* addr, size_t size);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, model_observe_uses, (void *addr, size_t size))\n#define __itt_model_observe_uses     ITTNOTIFY_VOID(model_observe_uses)\n#define __itt_model_observe_uses_ptr ITTNOTIFY_NAME(model_observe_uses)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_model_observe_uses(addr, size)\n#define __itt_model_observe_uses_ptr   0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_model_observe_uses_ptr   0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief ANNOTATE_CLEAR_USES support\n *\n * Clear the special handling of a piece of storage related to induction,\n * reduction or observe_uses\n */\nvoid ITTAPI __itt_model_clear_uses(void* addr);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, model_clear_uses, (void *addr))\n#define __itt_model_clear_uses     ITTNOTIFY_VOID(model_clear_uses)\n#define __itt_model_clear_uses_ptr ITTNOTIFY_NAME(model_clear_uses)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_model_clear_uses(addr)\n#define __itt_model_clear_uses_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_model_clear_uses_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief ANNOTATE_DISABLE_*_PUSH/ANNOTATE_DISABLE_*_POP support\n *\n * disable_push/disable_pop push and pop disabling based on a parameter.\n * Disabling observations stops processing of memory references during\n * correctness modeling, and all annotations that occur in the disabled\n * region.  This allows description of code that is expected to be handled\n * specially during conversion to parallelism or that is not recognized\n * by tools (e.g. some kinds of synchronization operations.)\n * This mechanism causes all annotations in the disabled region, other\n * than disable_push and disable_pop, to be ignored.  (For example, this\n * might validly be used to disable an entire parallel site and the contained\n * tasks and locking in it for data collection purposes.)\n * The disable for collection is a more expensive operation, but reduces\n * collector overhead significantly.  This applies to BOTH correctness data\n * collection and performance data collection.  For example, a site\n * containing a task might only enable data collection for the first 10\n * iterations.  Both performance and correctness data should reflect this,\n * and the program should run as close to full speed as possible when\n * collection is disabled.\n */\nvoid ITTAPI __itt_model_disable_push(__itt_model_disable x);\nvoid ITTAPI __itt_model_disable_pop(void);\nvoid ITTAPI __itt_model_aggregate_task(size_t x);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, model_disable_push, (__itt_model_disable x))\nITT_STUBV(ITTAPI, void, model_disable_pop,  (void))\nITT_STUBV(ITTAPI, void, model_aggregate_task, (size_t x))\n#define __itt_model_disable_push     ITTNOTIFY_VOID(model_disable_push)\n#define __itt_model_disable_push_ptr ITTNOTIFY_NAME(model_disable_push)\n#define __itt_model_disable_pop      ITTNOTIFY_VOID(model_disable_pop)\n#define __itt_model_disable_pop_ptr  ITTNOTIFY_NAME(model_disable_pop)\n#define __itt_model_aggregate_task      ITTNOTIFY_VOID(model_aggregate_task)\n#define __itt_model_aggregate_task_ptr  ITTNOTIFY_NAME(model_aggregate_task)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_model_disable_push(x)\n#define __itt_model_disable_push_ptr 0\n#define __itt_model_disable_pop()\n#define __itt_model_disable_pop_ptr 0\n#define __itt_model_aggregate_task(x)\n#define __itt_model_aggregate_task_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_model_disable_push_ptr 0\n#define __itt_model_disable_pop_ptr 0\n#define __itt_model_aggregate_task_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} model group */\n\n/**\n * @defgroup heap Heap\n * @ingroup public\n * Heap group\n * @{\n */\n\ntypedef void* __itt_heap_function;\n\n/**\n * @brief Create an identification for heap function\n * @return non-zero identifier or NULL\n */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n__itt_heap_function ITTAPI __itt_heap_function_createA(const char*    name, const char*    domain);\n__itt_heap_function ITTAPI __itt_heap_function_createW(const wchar_t* name, const wchar_t* domain);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_heap_function_create     __itt_heap_function_createW\n#  define __itt_heap_function_create_ptr __itt_heap_function_createW_ptr\n#else\n#  define __itt_heap_function_create     __itt_heap_function_createA\n#  define __itt_heap_function_create_ptr __itt_heap_function_createA_ptr\n#endif /* UNICODE */\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n__itt_heap_function ITTAPI __itt_heap_function_create(const char* name, const char* domain);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, __itt_heap_function, heap_function_createA, (const char*    name, const char*    domain))\nITT_STUB(ITTAPI, __itt_heap_function, heap_function_createW, (const wchar_t* name, const wchar_t* domain))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, __itt_heap_function, heap_function_create,  (const char*    name, const char*    domain))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_heap_function_createA     ITTNOTIFY_DATA(heap_function_createA)\n#define __itt_heap_function_createA_ptr ITTNOTIFY_NAME(heap_function_createA)\n#define __itt_heap_function_createW     ITTNOTIFY_DATA(heap_function_createW)\n#define __itt_heap_function_createW_ptr ITTNOTIFY_NAME(heap_function_createW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_heap_function_create      ITTNOTIFY_DATA(heap_function_create)\n#define __itt_heap_function_create_ptr  ITTNOTIFY_NAME(heap_function_create)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_heap_function_createA(name, domain) (__itt_heap_function)0\n#define __itt_heap_function_createA_ptr 0\n#define __itt_heap_function_createW(name, domain) (__itt_heap_function)0\n#define __itt_heap_function_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_heap_function_create(name, domain)  (__itt_heap_function)0\n#define __itt_heap_function_create_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_heap_function_createA_ptr 0\n#define __itt_heap_function_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_heap_function_create_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Record an allocation begin occurrence.\n */\nvoid ITTAPI __itt_heap_allocate_begin(__itt_heap_function h, size_t size, int initialized);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, heap_allocate_begin, (__itt_heap_function h, size_t size, int initialized))\n#define __itt_heap_allocate_begin     ITTNOTIFY_VOID(heap_allocate_begin)\n#define __itt_heap_allocate_begin_ptr ITTNOTIFY_NAME(heap_allocate_begin)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_heap_allocate_begin(h, size, initialized)\n#define __itt_heap_allocate_begin_ptr   0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_heap_allocate_begin_ptr   0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Record an allocation end occurrence.\n */\nvoid ITTAPI __itt_heap_allocate_end(__itt_heap_function h, void** addr, size_t size, int initialized);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, heap_allocate_end, (__itt_heap_function h, void** addr, size_t size, int initialized))\n#define __itt_heap_allocate_end     ITTNOTIFY_VOID(heap_allocate_end)\n#define __itt_heap_allocate_end_ptr ITTNOTIFY_NAME(heap_allocate_end)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_heap_allocate_end(h, addr, size, initialized)\n#define __itt_heap_allocate_end_ptr   0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_heap_allocate_end_ptr   0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Record a free begin occurrence.\n */\nvoid ITTAPI __itt_heap_free_begin(__itt_heap_function h, void* addr);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, heap_free_begin, (__itt_heap_function h, void* addr))\n#define __itt_heap_free_begin     ITTNOTIFY_VOID(heap_free_begin)\n#define __itt_heap_free_begin_ptr ITTNOTIFY_NAME(heap_free_begin)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_heap_free_begin(h, addr)\n#define __itt_heap_free_begin_ptr   0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_heap_free_begin_ptr   0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Record a free end occurrence.\n */\nvoid ITTAPI __itt_heap_free_end(__itt_heap_function h, void* addr);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, heap_free_end, (__itt_heap_function h, void* addr))\n#define __itt_heap_free_end     ITTNOTIFY_VOID(heap_free_end)\n#define __itt_heap_free_end_ptr ITTNOTIFY_NAME(heap_free_end)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_heap_free_end(h, addr)\n#define __itt_heap_free_end_ptr   0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_heap_free_end_ptr   0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Record a reallocation begin occurrence.\n */\nvoid ITTAPI __itt_heap_reallocate_begin(__itt_heap_function h, void* addr, size_t new_size, int initialized);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, heap_reallocate_begin, (__itt_heap_function h, void* addr, size_t new_size, int initialized))\n#define __itt_heap_reallocate_begin     ITTNOTIFY_VOID(heap_reallocate_begin)\n#define __itt_heap_reallocate_begin_ptr ITTNOTIFY_NAME(heap_reallocate_begin)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_heap_reallocate_begin(h, addr, new_size, initialized)\n#define __itt_heap_reallocate_begin_ptr   0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_heap_reallocate_begin_ptr   0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Record a reallocation end occurrence.\n */\nvoid ITTAPI __itt_heap_reallocate_end(__itt_heap_function h, void* addr, void** new_addr, size_t new_size, int initialized);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, heap_reallocate_end, (__itt_heap_function h, void* addr, void** new_addr, size_t new_size, int initialized))\n#define __itt_heap_reallocate_end     ITTNOTIFY_VOID(heap_reallocate_end)\n#define __itt_heap_reallocate_end_ptr ITTNOTIFY_NAME(heap_reallocate_end)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_heap_reallocate_end(h, addr, new_addr, new_size, initialized)\n#define __itt_heap_reallocate_end_ptr   0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_heap_reallocate_end_ptr   0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/** @brief internal access begin */\nvoid ITTAPI __itt_heap_internal_access_begin(void);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, heap_internal_access_begin,  (void))\n#define __itt_heap_internal_access_begin      ITTNOTIFY_VOID(heap_internal_access_begin)\n#define __itt_heap_internal_access_begin_ptr  ITTNOTIFY_NAME(heap_internal_access_begin)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_heap_internal_access_begin()\n#define __itt_heap_internal_access_begin_ptr  0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_heap_internal_access_begin_ptr  0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/** @brief internal access end */\nvoid ITTAPI __itt_heap_internal_access_end(void);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, heap_internal_access_end, (void))\n#define __itt_heap_internal_access_end     ITTNOTIFY_VOID(heap_internal_access_end)\n#define __itt_heap_internal_access_end_ptr ITTNOTIFY_NAME(heap_internal_access_end)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_heap_internal_access_end()\n#define __itt_heap_internal_access_end_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_heap_internal_access_end_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/** @brief record memory growth begin */\nvoid ITTAPI __itt_heap_record_memory_growth_begin(void);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, heap_record_memory_growth_begin,  (void))\n#define __itt_heap_record_memory_growth_begin      ITTNOTIFY_VOID(heap_record_memory_growth_begin)\n#define __itt_heap_record_memory_growth_begin_ptr  ITTNOTIFY_NAME(heap_record_memory_growth_begin)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_heap_record_memory_growth_begin()\n#define __itt_heap_record_memory_growth_begin_ptr  0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_heap_record_memory_growth_begin_ptr  0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/** @brief record memory growth end */\nvoid ITTAPI __itt_heap_record_memory_growth_end(void);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, heap_record_memory_growth_end, (void))\n#define __itt_heap_record_memory_growth_end     ITTNOTIFY_VOID(heap_record_memory_growth_end)\n#define __itt_heap_record_memory_growth_end_ptr ITTNOTIFY_NAME(heap_record_memory_growth_end)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_heap_record_memory_growth_end()\n#define __itt_heap_record_memory_growth_end_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_heap_record_memory_growth_end_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Specify the type of heap detection/reporting to modify.\n */\n/**\n * @hideinitializer\n * @brief Report on memory leaks.\n */\n#define __itt_heap_leaks 0x00000001\n\n/**\n * @hideinitializer\n * @brief Report on memory growth.\n */\n#define __itt_heap_growth 0x00000002\n\n\n/** @brief heap reset detection */\nvoid ITTAPI __itt_heap_reset_detection(unsigned int reset_mask);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, heap_reset_detection,  (unsigned int reset_mask))\n#define __itt_heap_reset_detection      ITTNOTIFY_VOID(heap_reset_detection)\n#define __itt_heap_reset_detection_ptr  ITTNOTIFY_NAME(heap_reset_detection)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_heap_reset_detection()\n#define __itt_heap_reset_detection_ptr  0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_heap_reset_detection_ptr  0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/** @brief report */\nvoid ITTAPI __itt_heap_record(unsigned int record_mask);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, heap_record, (unsigned int record_mask))\n#define __itt_heap_record     ITTNOTIFY_VOID(heap_record)\n#define __itt_heap_record_ptr ITTNOTIFY_NAME(heap_record)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_heap_record()\n#define __itt_heap_record_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_heap_record_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/** @} heap group */\n/** @endcond */\n/* ========================================================================== */\n\n/**\n * @defgroup domains Domains\n * @ingroup public\n * Domains group\n * @{\n */\n\n/** @cond exclude_from_documentation */\n#pragma pack(push, 8)\n\ntypedef struct ___itt_domain\n{\n    volatile int flags; /*!< Zero if disabled, non-zero if enabled. The meaning of different non-zero values is reserved to the runtime */\n    const char* nameA;  /*!< Copy of original name in ASCII. */\n#if defined(UNICODE) || defined(_UNICODE)\n    const wchar_t* nameW; /*!< Copy of original name in UNICODE. */\n#else  /* UNICODE || _UNICODE */\n    void* nameW;\n#endif /* UNICODE || _UNICODE */\n    int   extra1; /*!< Reserved to the runtime */\n    void* extra2; /*!< Reserved to the runtime */\n    struct ___itt_domain* next;\n} __itt_domain;\n\n#pragma pack(pop)\n/** @endcond */\n\n/**\n * @ingroup domains\n * @brief Create a domain.\n * Create domain using some domain name: the URI naming style is recommended.\n * Because the set of domains is expected to be static over the application's\n * execution time, there is no mechanism to destroy a domain.\n * Any domain can be accessed by any thread in the process, regardless of\n * which thread created the domain. This call is thread-safe.\n * @param[in] name name of domain\n */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n__itt_domain* ITTAPI __itt_domain_createA(const char    *name);\n__itt_domain* ITTAPI __itt_domain_createW(const wchar_t *name);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_domain_create     __itt_domain_createW\n#  define __itt_domain_create_ptr __itt_domain_createW_ptr\n#else /* UNICODE */\n#  define __itt_domain_create     __itt_domain_createA\n#  define __itt_domain_create_ptr __itt_domain_createA_ptr\n#endif /* UNICODE */\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n__itt_domain* ITTAPI __itt_domain_create(const char *name);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, __itt_domain*, domain_createA, (const char    *name))\nITT_STUB(ITTAPI, __itt_domain*, domain_createW, (const wchar_t *name))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, __itt_domain*, domain_create,  (const char    *name))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_domain_createA     ITTNOTIFY_DATA(domain_createA)\n#define __itt_domain_createA_ptr ITTNOTIFY_NAME(domain_createA)\n#define __itt_domain_createW     ITTNOTIFY_DATA(domain_createW)\n#define __itt_domain_createW_ptr ITTNOTIFY_NAME(domain_createW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_domain_create     ITTNOTIFY_DATA(domain_create)\n#define __itt_domain_create_ptr ITTNOTIFY_NAME(domain_create)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_domain_createA(name) (__itt_domain*)0\n#define __itt_domain_createA_ptr 0\n#define __itt_domain_createW(name) (__itt_domain*)0\n#define __itt_domain_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_domain_create(name)  (__itt_domain*)0\n#define __itt_domain_create_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_domain_createA_ptr 0\n#define __itt_domain_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_domain_create_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} domains group */\n\n/**\n * @defgroup ids IDs\n * @ingroup public\n * IDs group\n * @{\n */\n\n/** @cond exclude_from_documentation */\n#pragma pack(push, 8)\n\ntypedef struct ___itt_id\n{\n    unsigned long long d1, d2, d3;\n} __itt_id;\n\n#pragma pack(pop)\n/** @endcond */\n\nstatic const __itt_id __itt_null = { 0, 0, 0 };\n\n/**\n * @ingroup ids\n * @brief A convenience function is provided to create an ID without domain control.\n * @brief This is a convenience function to initialize an __itt_id structure. This function\n * does not affect the collector runtime in any way. After you make the ID with this\n * function, you still must create it with the __itt_id_create function before using the ID\n * to identify a named entity.\n * @param[in] addr The address of object; high QWORD of the ID value.\n * @param[in] extra The extra data to unique identify object; low QWORD of the ID value.\n */\n\nITT_INLINE __itt_id ITTAPI __itt_id_make(void* addr, unsigned long long extra) ITT_INLINE_ATTRIBUTE;\nITT_INLINE __itt_id ITTAPI __itt_id_make(void* addr, unsigned long long extra)\n{\n    __itt_id id = __itt_null;\n    id.d1 = (unsigned long long)((uintptr_t)addr);\n    id.d2 = (unsigned long long)extra;\n    id.d3 = (unsigned long long)0; /* Reserved. Must be zero */\n    return id;\n}\n\n/**\n * @ingroup ids\n * @brief Create an instance of identifier.\n * This establishes the beginning of the lifetime of an instance of\n * the given ID in the trace. Once this lifetime starts, the ID\n * can be used to tag named entity instances in calls such as\n * __itt_task_begin, and to specify relationships among\n * identified named entity instances, using the \\ref relations APIs.\n * Instance IDs are not domain specific!\n * @param[in] domain The domain controlling the execution of this call.\n * @param[in] id The ID to create.\n */\nvoid ITTAPI __itt_id_create(const __itt_domain *domain, __itt_id id);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, id_create, (const __itt_domain *domain, __itt_id id))\n#define __itt_id_create(d,x) ITTNOTIFY_VOID_D1(id_create,d,x)\n#define __itt_id_create_ptr  ITTNOTIFY_NAME(id_create)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_id_create(domain,id)\n#define __itt_id_create_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_id_create_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @ingroup ids\n * @brief Destroy an instance of identifier.\n * This ends the lifetime of the current instance of the given ID value in the trace.\n * Any relationships that are established after this lifetime ends are invalid.\n * This call must be performed before the given ID value can be reused for a different\n * named entity instance.\n * @param[in] domain The domain controlling the execution of this call.\n * @param[in] id The ID to destroy.\n */\nvoid ITTAPI __itt_id_destroy(const __itt_domain *domain, __itt_id id);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, id_destroy, (const __itt_domain *domain, __itt_id id))\n#define __itt_id_destroy(d,x) ITTNOTIFY_VOID_D1(id_destroy,d,x)\n#define __itt_id_destroy_ptr  ITTNOTIFY_NAME(id_destroy)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_id_destroy(domain,id)\n#define __itt_id_destroy_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_id_destroy_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} ids group */\n\n/**\n * @defgroup handless String Handles\n * @ingroup public\n * String Handles group\n * @{\n */\n\n/** @cond exclude_from_documentation */\n#pragma pack(push, 8)\n\ntypedef struct ___itt_string_handle\n{\n    const char* strA; /*!< Copy of original string in ASCII. */\n#if defined(UNICODE) || defined(_UNICODE)\n    const wchar_t* strW; /*!< Copy of original string in UNICODE. */\n#else  /* UNICODE || _UNICODE */\n    void* strW;\n#endif /* UNICODE || _UNICODE */\n    int   extra1; /*!< Reserved. Must be zero   */\n    void* extra2; /*!< Reserved. Must be zero   */\n    struct ___itt_string_handle* next;\n} __itt_string_handle;\n\n#pragma pack(pop)\n/** @endcond */\n\n/**\n * @ingroup handles\n * @brief Create a string handle.\n * Create and return handle value that can be associated with a string.\n * Consecutive calls to __itt_string_handle_create with the same name\n * return the same value. Because the set of string handles is expected to remain\n * static during the application's execution time, there is no mechanism to destroy a string handle.\n * Any string handle can be accessed by any thread in the process, regardless of which thread created\n * the string handle. This call is thread-safe.\n * @param[in] name The input string\n */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n__itt_string_handle* ITTAPI __itt_string_handle_createA(const char    *name);\n__itt_string_handle* ITTAPI __itt_string_handle_createW(const wchar_t *name);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_string_handle_create     __itt_string_handle_createW\n#  define __itt_string_handle_create_ptr __itt_string_handle_createW_ptr\n#else /* UNICODE */\n#  define __itt_string_handle_create     __itt_string_handle_createA\n#  define __itt_string_handle_create_ptr __itt_string_handle_createA_ptr\n#endif /* UNICODE */\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n__itt_string_handle* ITTAPI __itt_string_handle_create(const char *name);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, __itt_string_handle*, string_handle_createA, (const char    *name))\nITT_STUB(ITTAPI, __itt_string_handle*, string_handle_createW, (const wchar_t *name))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, __itt_string_handle*, string_handle_create,  (const char    *name))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_string_handle_createA     ITTNOTIFY_DATA(string_handle_createA)\n#define __itt_string_handle_createA_ptr ITTNOTIFY_NAME(string_handle_createA)\n#define __itt_string_handle_createW     ITTNOTIFY_DATA(string_handle_createW)\n#define __itt_string_handle_createW_ptr ITTNOTIFY_NAME(string_handle_createW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_string_handle_create     ITTNOTIFY_DATA(string_handle_create)\n#define __itt_string_handle_create_ptr ITTNOTIFY_NAME(string_handle_create)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_string_handle_createA(name) (__itt_string_handle*)0\n#define __itt_string_handle_createA_ptr 0\n#define __itt_string_handle_createW(name) (__itt_string_handle*)0\n#define __itt_string_handle_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_string_handle_create(name)  (__itt_string_handle*)0\n#define __itt_string_handle_create_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_string_handle_createA_ptr 0\n#define __itt_string_handle_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_string_handle_create_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} handles group */\n\n/** @cond exclude_from_documentation */\ntypedef unsigned long long __itt_timestamp;\n/** @endcond */\n\n#define __itt_timestamp_none ((__itt_timestamp)-1LL)\n\n/** @cond exclude_from_gpa_documentation */\n\n/**\n * @ingroup timestamps\n * @brief Return timestamp corresponding to the current moment.\n * This returns the timestamp in the format that is the most relevant for the current\n * host or platform (RDTSC, QPC, and others). You can use the \"<\" operator to\n * compare __itt_timestamp values.\n */\n__itt_timestamp ITTAPI __itt_get_timestamp(void);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUB(ITTAPI, __itt_timestamp, get_timestamp, (void))\n#define __itt_get_timestamp      ITTNOTIFY_DATA(get_timestamp)\n#define __itt_get_timestamp_ptr  ITTNOTIFY_NAME(get_timestamp)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_get_timestamp()\n#define __itt_get_timestamp_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_get_timestamp_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} timestamps */\n/** @endcond */\n\n/** @cond exclude_from_gpa_documentation */\n\n/**\n * @defgroup regions Regions\n * @ingroup public\n * Regions group\n * @{\n */\n/**\n * @ingroup regions\n * @brief Begin of region instance.\n * Successive calls to __itt_region_begin with the same ID are ignored\n * until a call to __itt_region_end with the same ID\n * @param[in] domain The domain for this region instance\n * @param[in] id The instance ID for this region instance. Must not be __itt_null\n * @param[in] parentid The instance ID for the parent of this region instance, or __itt_null\n * @param[in] name The name of this region\n */\nvoid ITTAPI __itt_region_begin(const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name);\n\n/**\n * @ingroup regions\n * @brief End of region instance.\n * The first call to __itt_region_end with a given ID ends the\n * region. Successive calls with the same ID are ignored, as are\n * calls that do not have a matching __itt_region_begin call.\n * @param[in] domain The domain for this region instance\n * @param[in] id The instance ID for this region instance\n */\nvoid ITTAPI __itt_region_end(const __itt_domain *domain, __itt_id id);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, region_begin, (const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name))\nITT_STUBV(ITTAPI, void, region_end,   (const __itt_domain *domain, __itt_id id))\n#define __itt_region_begin(d,x,y,z) ITTNOTIFY_VOID_D3(region_begin,d,x,y,z)\n#define __itt_region_begin_ptr      ITTNOTIFY_NAME(region_begin)\n#define __itt_region_end(d,x)       ITTNOTIFY_VOID_D1(region_end,d,x)\n#define __itt_region_end_ptr        ITTNOTIFY_NAME(region_end)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_region_begin(d,x,y,z)\n#define __itt_region_begin_ptr 0\n#define __itt_region_end(d,x)\n#define __itt_region_end_ptr   0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_region_begin_ptr 0\n#define __itt_region_end_ptr   0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} regions group */\n\n/**\n * @defgroup frames Frames\n * @ingroup public\n * Frames are similar to regions, but are intended to be easier to use and to implement.\n * In particular:\n * - Frames always represent periods of elapsed time\n * - By default, frames have no nesting relationships\n * @{\n */\n\n/**\n * @ingroup frames\n * @brief Begin a frame instance.\n * Successive calls to __itt_frame_begin with the\n * same ID are ignored until a call to __itt_frame_end with the same ID.\n * @param[in] domain The domain for this frame instance\n * @param[in] id The instance ID for this frame instance or NULL\n */\nvoid ITTAPI __itt_frame_begin_v3(const __itt_domain *domain, __itt_id *id);\n\n/**\n * @ingroup frames\n * @brief End a frame instance.\n * The first call to __itt_frame_end with a given ID\n * ends the frame. Successive calls with the same ID are ignored, as are\n * calls that do not have a matching __itt_frame_begin call.\n * @param[in] domain The domain for this frame instance\n * @param[in] id The instance ID for this frame instance or NULL for current\n */\nvoid ITTAPI __itt_frame_end_v3(const __itt_domain *domain, __itt_id *id);\n\n/**\n * @ingroup frames\n * @brief Submits a frame instance.\n * Successive calls to __itt_frame_begin or __itt_frame_submit with the\n * same ID are ignored until a call to __itt_frame_end or __itt_frame_submit\n * with the same ID.\n * Passing special __itt_timestamp_none value as \"end\" argument means\n * take the current timestamp as the end timestamp.\n * @param[in] domain The domain for this frame instance\n * @param[in] id The instance ID for this frame instance or NULL\n * @param[in] begin Timestamp of the beginning of the frame\n * @param[in] end Timestamp of the end of the frame\n */\nvoid ITTAPI __itt_frame_submit_v3(const __itt_domain *domain, __itt_id *id,\n    __itt_timestamp begin, __itt_timestamp end);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, frame_begin_v3,  (const __itt_domain *domain, __itt_id *id))\nITT_STUBV(ITTAPI, void, frame_end_v3,    (const __itt_domain *domain, __itt_id *id))\nITT_STUBV(ITTAPI, void, frame_submit_v3, (const __itt_domain *domain, __itt_id *id, __itt_timestamp begin, __itt_timestamp end))\n#define __itt_frame_begin_v3(d,x)      ITTNOTIFY_VOID_D1(frame_begin_v3,d,x)\n#define __itt_frame_begin_v3_ptr       ITTNOTIFY_NAME(frame_begin_v3)\n#define __itt_frame_end_v3(d,x)        ITTNOTIFY_VOID_D1(frame_end_v3,d,x)\n#define __itt_frame_end_v3_ptr         ITTNOTIFY_NAME(frame_end_v3)\n#define __itt_frame_submit_v3(d,x,b,e) ITTNOTIFY_VOID_D3(frame_submit_v3,d,x,b,e)\n#define __itt_frame_submit_v3_ptr      ITTNOTIFY_NAME(frame_submit_v3)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_frame_begin_v3(domain,id)\n#define __itt_frame_begin_v3_ptr 0\n#define __itt_frame_end_v3(domain,id)\n#define __itt_frame_end_v3_ptr   0\n#define __itt_frame_submit_v3(domain,id,begin,end)\n#define __itt_frame_submit_v3_ptr   0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_frame_begin_v3_ptr 0\n#define __itt_frame_end_v3_ptr   0\n#define __itt_frame_submit_v3_ptr   0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} frames group */\n/** @endcond */\n\n/**\n * @defgroup taskgroup Task Group\n * @ingroup public\n * Task Group\n * @{\n */\n/**\n * @ingroup task_groups\n * @brief Denotes a task_group instance.\n * Successive calls to __itt_task_group with the same ID are ignored.\n * @param[in] domain The domain for this task_group instance\n * @param[in] id The instance ID for this task_group instance. Must not be __itt_null.\n * @param[in] parentid The instance ID for the parent of this task_group instance, or __itt_null.\n * @param[in] name The name of this task_group\n */\nvoid ITTAPI __itt_task_group(const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, task_group, (const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name))\n#define __itt_task_group(d,x,y,z) ITTNOTIFY_VOID_D3(task_group,d,x,y,z)\n#define __itt_task_group_ptr      ITTNOTIFY_NAME(task_group)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_task_group(d,x,y,z)\n#define __itt_task_group_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_task_group_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} taskgroup group */\n\n/**\n * @defgroup tasks Tasks\n * @ingroup public\n * A task instance represents a piece of work performed by a particular\n * thread for a period of time. A call to __itt_task_begin creates a\n * task instance. This becomes the current instance for that task on that\n * thread. A following call to __itt_task_end on the same thread ends the\n * instance. There may be multiple simultaneous instances of tasks with the\n * same name on different threads. If an ID is specified, the task instance\n * receives that ID. Nested tasks are allowed.\n *\n * Note: The task is defined by the bracketing of __itt_task_begin and\n * __itt_task_end on the same thread. If some scheduling mechanism causes\n * task switching (the thread executes a different user task) or task\n * switching (the user task switches to a different thread) then this breaks\n * the notion of  current instance. Additional API calls are required to\n * deal with that possibility.\n * @{\n */\n\n/**\n * @ingroup tasks\n * @brief Begin a task instance.\n * @param[in] domain The domain for this task\n * @param[in] taskid The instance ID for this task instance, or __itt_null\n * @param[in] parentid The parent instance to which this task instance belongs, or __itt_null\n * @param[in] name The name of this task\n */\nvoid ITTAPI __itt_task_begin(const __itt_domain *domain, __itt_id taskid, __itt_id parentid, __itt_string_handle *name);\n\n/**\n * @ingroup tasks\n * @brief Begin a task instance.\n * @param[in] domain The domain for this task\n * @param[in] taskid The identifier for this task instance (may be 0)\n * @param[in] parentid The parent of this task (may be 0)\n * @param[in] fn The pointer to the function you are tracing\n */\nvoid ITTAPI __itt_task_begin_fn(const __itt_domain *domain, __itt_id taskid, __itt_id parentid, void* fn);\n\n/**\n * @ingroup tasks\n * @brief End the current task instance.\n * @param[in] domain The domain for this task\n */\nvoid ITTAPI __itt_task_end(const __itt_domain *domain);\n\n/**\n * @ingroup tasks\n * @brief Begin an overlapped task instance.\n * @param[in] domain The domain for this task.\n * @param[in] taskid The identifier for this task instance, *cannot* be __itt_null.\n * @param[in] parentid The parent of this task, or __itt_null.\n * @param[in] name The name of this task.\n */\nvoid ITTAPI __itt_task_begin_overlapped(const __itt_domain* domain, __itt_id taskid, __itt_id parentid, __itt_string_handle* name);\n\n/**\n * @ingroup tasks\n * @brief End an overlapped task instance.\n * @param[in] domain The domain for this task\n * @param[in] taskid Explicit ID of finished task\n */\nvoid ITTAPI __itt_task_end_overlapped(const __itt_domain *domain, __itt_id taskid);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, task_begin,    (const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name))\nITT_STUBV(ITTAPI, void, task_begin_fn, (const __itt_domain *domain, __itt_id id, __itt_id parentid, void* fn))\nITT_STUBV(ITTAPI, void, task_end,      (const __itt_domain *domain))\nITT_STUBV(ITTAPI, void, task_begin_overlapped, (const __itt_domain *domain, __itt_id taskid, __itt_id parentid, __itt_string_handle *name))\nITT_STUBV(ITTAPI, void, task_end_overlapped,   (const __itt_domain *domain, __itt_id taskid))\n#define __itt_task_begin(d,x,y,z)    ITTNOTIFY_VOID_D3(task_begin,d,x,y,z)\n#define __itt_task_begin_ptr         ITTNOTIFY_NAME(task_begin)\n#define __itt_task_begin_fn(d,x,y,z) ITTNOTIFY_VOID_D3(task_begin_fn,d,x,y,z)\n#define __itt_task_begin_fn_ptr      ITTNOTIFY_NAME(task_begin_fn)\n#define __itt_task_end(d)            ITTNOTIFY_VOID_D0(task_end,d)\n#define __itt_task_end_ptr           ITTNOTIFY_NAME(task_end)\n#define __itt_task_begin_overlapped(d,x,y,z) ITTNOTIFY_VOID_D3(task_begin_overlapped,d,x,y,z)\n#define __itt_task_begin_overlapped_ptr      ITTNOTIFY_NAME(task_begin_overlapped)\n#define __itt_task_end_overlapped(d,x)       ITTNOTIFY_VOID_D1(task_end_overlapped,d,x)\n#define __itt_task_end_overlapped_ptr        ITTNOTIFY_NAME(task_end_overlapped)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_task_begin(domain,id,parentid,name)\n#define __itt_task_begin_ptr    0\n#define __itt_task_begin_fn(domain,id,parentid,fn)\n#define __itt_task_begin_fn_ptr 0\n#define __itt_task_end(domain)\n#define __itt_task_end_ptr      0\n#define __itt_task_begin_overlapped(domain,taskid,parentid,name)\n#define __itt_task_begin_overlapped_ptr         0\n#define __itt_task_end_overlapped(domain,taskid)\n#define __itt_task_end_overlapped_ptr           0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_task_begin_ptr    0\n#define __itt_task_begin_fn_ptr 0\n#define __itt_task_end_ptr      0\n#define __itt_task_begin_overlapped_ptr 0\n#define __itt_task_end_overlapped_ptr   0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} tasks group */\n\n\n/**\n * @defgroup markers Markers\n * Markers represent a single discrete event in time. Markers have a scope,\n * described by an enumerated type __itt_scope. Markers are created by\n * the API call __itt_marker. A marker instance can be given an ID for use in\n * adding metadata.\n * @{\n */\n\n/**\n * @brief Describes the scope of an event object in the trace.\n */\ntypedef enum\n{\n    __itt_scope_unknown = 0,\n    __itt_scope_global,\n    __itt_scope_track_group,\n    __itt_scope_track,\n    __itt_scope_task,\n    __itt_scope_marker\n} __itt_scope;\n\n/** @cond exclude_from_documentation */\n#define __itt_marker_scope_unknown  __itt_scope_unknown\n#define __itt_marker_scope_global   __itt_scope_global\n#define __itt_marker_scope_process  __itt_scope_track_group\n#define __itt_marker_scope_thread   __itt_scope_track\n#define __itt_marker_scope_task     __itt_scope_task\n/** @endcond */\n\n/**\n * @ingroup markers\n * @brief Create a marker instance\n * @param[in] domain The domain for this marker\n * @param[in] id The instance ID for this marker or __itt_null\n * @param[in] name The name for this marker\n * @param[in] scope The scope for this marker\n */\nvoid ITTAPI __itt_marker(const __itt_domain *domain, __itt_id id, __itt_string_handle *name, __itt_scope scope);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, marker, (const __itt_domain *domain, __itt_id id, __itt_string_handle *name, __itt_scope scope))\n#define __itt_marker(d,x,y,z) ITTNOTIFY_VOID_D3(marker,d,x,y,z)\n#define __itt_marker_ptr      ITTNOTIFY_NAME(marker)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_marker(domain,id,name,scope)\n#define __itt_marker_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_marker_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} markers group */\n\n/**\n * @defgroup metadata Metadata\n * The metadata API is used to attach extra information to named\n * entities. Metadata can be attached to an identified named entity by ID,\n * or to the current entity (which is always a task).\n *\n * Conceptually metadata has a type (what kind of metadata), a key (the\n * name of the metadata), and a value (the actual data). The encoding of\n * the value depends on the type of the metadata.\n *\n * The type of metadata is specified by an enumerated type __itt_metdata_type.\n * @{\n */\n\n/**\n * @ingroup parameters\n * @brief describes the type of metadata\n */\ntypedef enum {\n    __itt_metadata_unknown = 0,\n    __itt_metadata_u64,     /**< Unsigned 64-bit integer */\n    __itt_metadata_s64,     /**< Signed 64-bit integer */\n    __itt_metadata_u32,     /**< Unsigned 32-bit integer */\n    __itt_metadata_s32,     /**< Signed 32-bit integer */\n    __itt_metadata_u16,     /**< Unsigned 16-bit integer */\n    __itt_metadata_s16,     /**< Signed 16-bit integer */\n    __itt_metadata_float,   /**< Signed 32-bit floating-point */\n    __itt_metadata_double   /**< SIgned 64-bit floating-point */\n} __itt_metadata_type;\n\n/**\n * @ingroup parameters\n * @brief Add metadata to an instance of a named entity.\n * @param[in] domain The domain controlling the call\n * @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task\n * @param[in] key The name of the metadata\n * @param[in] type The type of the metadata\n * @param[in] count The number of elements of the given type. If count == 0, no metadata will be added.\n * @param[in] data The metadata itself\n*/\nvoid ITTAPI __itt_metadata_add(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, metadata_add, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data))\n#define __itt_metadata_add(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(metadata_add,d,x,y,z,a,b)\n#define __itt_metadata_add_ptr          ITTNOTIFY_NAME(metadata_add)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_metadata_add(d,x,y,z,a,b)\n#define __itt_metadata_add_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_metadata_add_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @ingroup parameters\n * @brief Add string metadata to an instance of a named entity.\n * @param[in] domain The domain controlling the call\n * @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task\n * @param[in] key The name of the metadata\n * @param[in] data The metadata itself\n * @param[in] length The number of characters in the string, or -1 if the length is unknown but the string is null-terminated\n*/\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nvoid ITTAPI __itt_metadata_str_addA(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length);\nvoid ITTAPI __itt_metadata_str_addW(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const wchar_t *data, size_t length);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_metadata_str_add     __itt_metadata_str_addW\n#  define __itt_metadata_str_add_ptr __itt_metadata_str_addW_ptr\n#else /* UNICODE */\n#  define __itt_metadata_str_add     __itt_metadata_str_addA\n#  define __itt_metadata_str_add_ptr __itt_metadata_str_addA_ptr\n#endif /* UNICODE */\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nvoid ITTAPI __itt_metadata_str_add(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length);\n#endif\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUBV(ITTAPI, void, metadata_str_addA, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length))\nITT_STUBV(ITTAPI, void, metadata_str_addW, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const wchar_t *data, size_t length))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUBV(ITTAPI, void, metadata_str_add, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_metadata_str_addA(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_addA,d,x,y,z,a)\n#define __itt_metadata_str_addA_ptr        ITTNOTIFY_NAME(metadata_str_addA)\n#define __itt_metadata_str_addW(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_addW,d,x,y,z,a)\n#define __itt_metadata_str_addW_ptr        ITTNOTIFY_NAME(metadata_str_addW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_metadata_str_add(d,x,y,z,a)  ITTNOTIFY_VOID_D4(metadata_str_add,d,x,y,z,a)\n#define __itt_metadata_str_add_ptr         ITTNOTIFY_NAME(metadata_str_add)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_metadata_str_addA(d,x,y,z,a)\n#define __itt_metadata_str_addA_ptr 0\n#define __itt_metadata_str_addW(d,x,y,z,a)\n#define __itt_metadata_str_addW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_metadata_str_add(d,x,y,z,a)\n#define __itt_metadata_str_add_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_metadata_str_addA_ptr 0\n#define __itt_metadata_str_addW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_metadata_str_add_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @ingroup parameters\n * @brief Add metadata to an instance of a named entity.\n * @param[in] domain The domain controlling the call\n * @param[in] scope The scope of the instance to which the metadata is to be added\n\n * @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task\n\n * @param[in] key The name of the metadata\n * @param[in] type The type of the metadata\n * @param[in] count The number of elements of the given type. If count == 0, no metadata will be added.\n * @param[in] data The metadata itself\n*/\nvoid ITTAPI __itt_metadata_add_with_scope(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, metadata_add_with_scope, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data))\n#define __itt_metadata_add_with_scope(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(metadata_add_with_scope,d,x,y,z,a,b)\n#define __itt_metadata_add_with_scope_ptr          ITTNOTIFY_NAME(metadata_add_with_scope)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_metadata_add_with_scope(d,x,y,z,a,b)\n#define __itt_metadata_add_with_scope_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_metadata_add_with_scope_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @ingroup parameters\n * @brief Add string metadata to an instance of a named entity.\n * @param[in] domain The domain controlling the call\n * @param[in] scope The scope of the instance to which the metadata is to be added\n\n * @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task\n\n * @param[in] key The name of the metadata\n * @param[in] data The metadata itself\n * @param[in] length The number of characters in the string, or -1 if the length is unknown but the string is null-terminated\n*/\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nvoid ITTAPI __itt_metadata_str_add_with_scopeA(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length);\nvoid ITTAPI __itt_metadata_str_add_with_scopeW(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const wchar_t *data, size_t length);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_metadata_str_add_with_scope     __itt_metadata_str_add_with_scopeW\n#  define __itt_metadata_str_add_with_scope_ptr __itt_metadata_str_add_with_scopeW_ptr\n#else /* UNICODE */\n#  define __itt_metadata_str_add_with_scope     __itt_metadata_str_add_with_scopeA\n#  define __itt_metadata_str_add_with_scope_ptr __itt_metadata_str_add_with_scopeA_ptr\n#endif /* UNICODE */\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nvoid ITTAPI __itt_metadata_str_add_with_scope(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length);\n#endif\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUBV(ITTAPI, void, metadata_str_add_with_scopeA, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length))\nITT_STUBV(ITTAPI, void, metadata_str_add_with_scopeW, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const wchar_t *data, size_t length))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUBV(ITTAPI, void, metadata_str_add_with_scope, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_metadata_str_add_with_scopeA(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_add_with_scopeA,d,x,y,z,a)\n#define __itt_metadata_str_add_with_scopeA_ptr        ITTNOTIFY_NAME(metadata_str_add_with_scopeA)\n#define __itt_metadata_str_add_with_scopeW(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_add_with_scopeW,d,x,y,z,a)\n#define __itt_metadata_str_add_with_scopeW_ptr        ITTNOTIFY_NAME(metadata_str_add_with_scopeW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_metadata_str_add_with_scope(d,x,y,z,a)  ITTNOTIFY_VOID_D4(metadata_str_add_with_scope,d,x,y,z,a)\n#define __itt_metadata_str_add_with_scope_ptr         ITTNOTIFY_NAME(metadata_str_add_with_scope)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_metadata_str_add_with_scopeA(d,x,y,z,a)\n#define __itt_metadata_str_add_with_scopeA_ptr  0\n#define __itt_metadata_str_add_with_scopeW(d,x,y,z,a)\n#define __itt_metadata_str_add_with_scopeW_ptr  0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_metadata_str_add_with_scope(d,x,y,z,a)\n#define __itt_metadata_str_add_with_scope_ptr   0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_metadata_str_add_with_scopeA_ptr  0\n#define __itt_metadata_str_add_with_scopeW_ptr  0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_metadata_str_add_with_scope_ptr   0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/** @} metadata group */\n\n/**\n * @defgroup relations Relations\n * Instances of named entities can be explicitly associated with other\n * instances using instance IDs and the relationship API calls.\n *\n * @{\n */\n\n/**\n * @ingroup relations\n * @brief The kind of relation between two instances is specified by the enumerated type __itt_relation.\n * Relations between instances can be added with an API call. The relation\n * API uses instance IDs. Relations can be added before or after the actual\n * instances are created and persist independently of the instances. This\n * is the motivation for having different lifetimes for instance IDs and\n * the actual instances.\n */\ntypedef enum\n{\n    __itt_relation_is_unknown = 0,\n    __itt_relation_is_dependent_on,         /**< \"A is dependent on B\" means that A cannot start until B completes */\n    __itt_relation_is_sibling_of,           /**< \"A is sibling of B\" means that A and B were created as a group */\n    __itt_relation_is_parent_of,            /**< \"A is parent of B\" means that A created B */\n    __itt_relation_is_continuation_of,      /**< \"A is continuation of B\" means that A assumes the dependencies of B */\n    __itt_relation_is_child_of,             /**< \"A is child of B\" means that A was created by B (inverse of is_parent_of) */\n    __itt_relation_is_continued_by,         /**< \"A is continued by B\" means that B assumes the dependencies of A (inverse of is_continuation_of) */\n    __itt_relation_is_predecessor_to        /**< \"A is predecessor to B\" means that B cannot start until A completes (inverse of is_dependent_on) */\n} __itt_relation;\n\n/**\n * @ingroup relations\n * @brief Add a relation to the current task instance.\n * The current task instance is the head of the relation.\n * @param[in] domain The domain controlling this call\n * @param[in] relation The kind of relation\n * @param[in] tail The ID for the tail of the relation\n */\nvoid ITTAPI __itt_relation_add_to_current(const __itt_domain *domain, __itt_relation relation, __itt_id tail);\n\n/**\n * @ingroup relations\n * @brief Add a relation between two instance identifiers.\n * @param[in] domain The domain controlling this call\n * @param[in] head The ID for the head of the relation\n * @param[in] relation The kind of relation\n * @param[in] tail The ID for the tail of the relation\n */\nvoid ITTAPI __itt_relation_add(const __itt_domain *domain, __itt_id head, __itt_relation relation, __itt_id tail);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, relation_add_to_current, (const __itt_domain *domain, __itt_relation relation, __itt_id tail))\nITT_STUBV(ITTAPI, void, relation_add,            (const __itt_domain *domain, __itt_id head, __itt_relation relation, __itt_id tail))\n#define __itt_relation_add_to_current(d,x,y) ITTNOTIFY_VOID_D2(relation_add_to_current,d,x,y)\n#define __itt_relation_add_to_current_ptr    ITTNOTIFY_NAME(relation_add_to_current)\n#define __itt_relation_add(d,x,y,z)          ITTNOTIFY_VOID_D3(relation_add,d,x,y,z)\n#define __itt_relation_add_ptr               ITTNOTIFY_NAME(relation_add)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_relation_add_to_current(d,x,y)\n#define __itt_relation_add_to_current_ptr 0\n#define __itt_relation_add(d,x,y,z)\n#define __itt_relation_add_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_relation_add_to_current_ptr 0\n#define __itt_relation_add_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} relations group */\n\n/** @cond exclude_from_documentation */\n#pragma pack(push, 8)\n\ntypedef struct ___itt_clock_info\n{\n    unsigned long long clock_freq; /*!< Clock domain frequency */\n    unsigned long long clock_base; /*!< Clock domain base timestamp */\n} __itt_clock_info;\n\n#pragma pack(pop)\n/** @endcond */\n\n/** @cond exclude_from_documentation */\ntypedef void (ITTAPI *__itt_get_clock_info_fn)(__itt_clock_info* clock_info, void* data);\n/** @endcond */\n\n/** @cond exclude_from_documentation */\n#pragma pack(push, 8)\n\ntypedef struct ___itt_clock_domain\n{\n    __itt_clock_info info;      /*!< Most recent clock domain info */\n    __itt_get_clock_info_fn fn; /*!< Callback function pointer */\n    void* fn_data;              /*!< Input argument for the callback function */\n    int   extra1;               /*!< Reserved. Must be zero */\n    void* extra2;               /*!< Reserved. Must be zero */\n    struct ___itt_clock_domain* next;\n} __itt_clock_domain;\n\n#pragma pack(pop)\n/** @endcond */\n\n/**\n * @ingroup clockdomains\n * @brief Create a clock domain.\n * Certain applications require the capability to trace their application using\n * a clock domain different than the CPU, for instance the instrumentation of events\n * that occur on a GPU.\n * Because the set of domains is expected to be static over the application's execution time,\n * there is no mechanism to destroy a domain.\n * Any domain can be accessed by any thread in the process, regardless of which thread created\n * the domain. This call is thread-safe.\n * @param[in] fn A pointer to a callback function which retrieves alternative CPU timestamps\n * @param[in] fn_data Argument for a callback function; may be NULL\n */\n__itt_clock_domain* ITTAPI __itt_clock_domain_create(__itt_get_clock_info_fn fn, void* fn_data);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUB(ITTAPI, __itt_clock_domain*, clock_domain_create, (__itt_get_clock_info_fn fn, void* fn_data))\n#define __itt_clock_domain_create     ITTNOTIFY_DATA(clock_domain_create)\n#define __itt_clock_domain_create_ptr ITTNOTIFY_NAME(clock_domain_create)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_clock_domain_create(fn,fn_data) (__itt_clock_domain*)0\n#define __itt_clock_domain_create_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_clock_domain_create_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @ingroup clockdomains\n * @brief Recalculate clock domains frequencies and clock base timestamps.\n */\nvoid ITTAPI __itt_clock_domain_reset(void);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, clock_domain_reset, (void))\n#define __itt_clock_domain_reset     ITTNOTIFY_VOID(clock_domain_reset)\n#define __itt_clock_domain_reset_ptr ITTNOTIFY_NAME(clock_domain_reset)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_clock_domain_reset()\n#define __itt_clock_domain_reset_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_clock_domain_reset_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @ingroup clockdomain\n * @brief Create an instance of identifier. This establishes the beginning of the lifetime of\n * an instance of the given ID in the trace. Once this lifetime starts, the ID can be used to\n * tag named entity instances in calls such as __itt_task_begin, and to specify relationships among\n * identified named entity instances, using the \\ref relations APIs.\n * @param[in] domain The domain controlling the execution of this call.\n * @param[in] clock_domain The clock domain controlling the execution of this call.\n * @param[in] timestamp The user defined timestamp.\n * @param[in] id The ID to create.\n */\nvoid ITTAPI __itt_id_create_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id);\n\n/**\n * @ingroup clockdomain\n * @brief Destroy an instance of identifier. This ends the lifetime of the current instance of the\n * given ID value in the trace. Any relationships that are established after this lifetime ends are\n * invalid. This call must be performed before the given ID value can be reused for a different\n * named entity instance.\n * @param[in] domain The domain controlling the execution of this call.\n * @param[in] clock_domain The clock domain controlling the execution of this call.\n * @param[in] timestamp The user defined timestamp.\n * @param[in] id The ID to destroy.\n */\nvoid ITTAPI __itt_id_destroy_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, id_create_ex,  (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id))\nITT_STUBV(ITTAPI, void, id_destroy_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id))\n#define __itt_id_create_ex(d,x,y,z)  ITTNOTIFY_VOID_D3(id_create_ex,d,x,y,z)\n#define __itt_id_create_ex_ptr       ITTNOTIFY_NAME(id_create_ex)\n#define __itt_id_destroy_ex(d,x,y,z) ITTNOTIFY_VOID_D3(id_destroy_ex,d,x,y,z)\n#define __itt_id_destroy_ex_ptr      ITTNOTIFY_NAME(id_destroy_ex)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_id_create_ex(domain,clock_domain,timestamp,id)\n#define __itt_id_create_ex_ptr    0\n#define __itt_id_destroy_ex(domain,clock_domain,timestamp,id)\n#define __itt_id_destroy_ex_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_id_create_ex_ptr    0\n#define __itt_id_destroy_ex_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @ingroup clockdomain\n * @brief Begin a task instance.\n * @param[in] domain The domain for this task\n * @param[in] clock_domain The clock domain controlling the execution of this call.\n * @param[in] timestamp The user defined timestamp.\n * @param[in] taskid The instance ID for this task instance, or __itt_null\n * @param[in] parentid The parent instance to which this task instance belongs, or __itt_null\n * @param[in] name The name of this task\n */\nvoid ITTAPI __itt_task_begin_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, __itt_string_handle* name);\n\n/**\n * @ingroup clockdomain\n * @brief Begin a task instance.\n * @param[in] domain The domain for this task\n * @param[in] clock_domain The clock domain controlling the execution of this call.\n * @param[in] timestamp The user defined timestamp.\n * @param[in] taskid The identifier for this task instance, or __itt_null\n * @param[in] parentid The parent of this task, or __itt_null\n * @param[in] fn The pointer to the function you are tracing\n */\nvoid ITTAPI __itt_task_begin_fn_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, void* fn);\n\n/**\n * @ingroup clockdomain\n * @brief End the current task instance.\n * @param[in] domain The domain for this task\n * @param[in] clock_domain The clock domain controlling the execution of this call.\n * @param[in] timestamp The user defined timestamp.\n */\nvoid ITTAPI __itt_task_end_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, task_begin_ex,        (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_id parentid, __itt_string_handle *name))\nITT_STUBV(ITTAPI, void, task_begin_fn_ex,     (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_id parentid, void* fn))\nITT_STUBV(ITTAPI, void, task_end_ex,          (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp))\n#define __itt_task_begin_ex(d,x,y,z,a,b)      ITTNOTIFY_VOID_D5(task_begin_ex,d,x,y,z,a,b)\n#define __itt_task_begin_ex_ptr               ITTNOTIFY_NAME(task_begin_ex)\n#define __itt_task_begin_fn_ex(d,x,y,z,a,b)   ITTNOTIFY_VOID_D5(task_begin_fn_ex,d,x,y,z,a,b)\n#define __itt_task_begin_fn_ex_ptr            ITTNOTIFY_NAME(task_begin_fn_ex)\n#define __itt_task_end_ex(d,x,y)              ITTNOTIFY_VOID_D2(task_end_ex,d,x,y)\n#define __itt_task_end_ex_ptr                 ITTNOTIFY_NAME(task_end_ex)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_task_begin_ex(domain,clock_domain,timestamp,id,parentid,name)\n#define __itt_task_begin_ex_ptr          0\n#define __itt_task_begin_fn_ex(domain,clock_domain,timestamp,id,parentid,fn)\n#define __itt_task_begin_fn_ex_ptr       0\n#define __itt_task_end_ex(domain,clock_domain,timestamp)\n#define __itt_task_end_ex_ptr            0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_task_begin_ex_ptr          0\n#define __itt_task_begin_fn_ex_ptr       0\n#define __itt_task_end_ex_ptr            0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @defgroup counters Counters\n * @ingroup public\n * Counters are user-defined objects with a monotonically increasing\n * value. Counter values are 64-bit unsigned integers.\n * Counters have names that can be displayed in\n * the tools.\n * @{\n */\n\n/**\n * @brief opaque structure for counter identification\n */\n/** @cond exclude_from_documentation */\n\ntypedef struct ___itt_counter* __itt_counter;\n\n/**\n * @brief Create an unsigned 64 bits integer counter with given name/domain\n *\n * After __itt_counter_create() is called, __itt_counter_inc(id), __itt_counter_inc_delta(id, delta),\n * __itt_counter_set_value(id, value_ptr) or __itt_counter_set_value_ex(id, clock_domain, timestamp, value_ptr)\n * can be used to change the value of the counter, where value_ptr is a pointer to an unsigned 64 bits integer\n *\n * The call is equal to __itt_counter_create_typed(name, domain, __itt_metadata_u64)\n */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n__itt_counter ITTAPI __itt_counter_createA(const char    *name, const char    *domain);\n__itt_counter ITTAPI __itt_counter_createW(const wchar_t *name, const wchar_t *domain);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_counter_create     __itt_counter_createW\n#  define __itt_counter_create_ptr __itt_counter_createW_ptr\n#else /* UNICODE */\n#  define __itt_counter_create     __itt_counter_createA\n#  define __itt_counter_create_ptr __itt_counter_createA_ptr\n#endif /* UNICODE */\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n__itt_counter ITTAPI __itt_counter_create(const char *name, const char *domain);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, __itt_counter, counter_createA, (const char    *name, const char    *domain))\nITT_STUB(ITTAPI, __itt_counter, counter_createW, (const wchar_t *name, const wchar_t *domain))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, __itt_counter, counter_create,  (const char *name, const char *domain))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_counter_createA     ITTNOTIFY_DATA(counter_createA)\n#define __itt_counter_createA_ptr ITTNOTIFY_NAME(counter_createA)\n#define __itt_counter_createW     ITTNOTIFY_DATA(counter_createW)\n#define __itt_counter_createW_ptr ITTNOTIFY_NAME(counter_createW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_counter_create     ITTNOTIFY_DATA(counter_create)\n#define __itt_counter_create_ptr ITTNOTIFY_NAME(counter_create)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_counter_createA(name, domain)\n#define __itt_counter_createA_ptr 0\n#define __itt_counter_createW(name, domain)\n#define __itt_counter_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_counter_create(name, domain)\n#define __itt_counter_create_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_counter_createA_ptr 0\n#define __itt_counter_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_counter_create_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Increment the unsigned 64 bits integer counter value\n *\n * Calling this function to non-unsigned 64 bits integer counters has no effect\n */\nvoid ITTAPI __itt_counter_inc(__itt_counter id);\n\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, counter_inc, (__itt_counter id))\n#define __itt_counter_inc     ITTNOTIFY_VOID(counter_inc)\n#define __itt_counter_inc_ptr ITTNOTIFY_NAME(counter_inc)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_counter_inc(id)\n#define __itt_counter_inc_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_counter_inc_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/**\n * @brief Increment the unsigned 64 bits integer counter value with x\n *\n * Calling this function to non-unsigned 64 bits integer counters has no effect\n */\nvoid ITTAPI __itt_counter_inc_delta(__itt_counter id, unsigned long long value);\n\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, counter_inc_delta, (__itt_counter id, unsigned long long value))\n#define __itt_counter_inc_delta     ITTNOTIFY_VOID(counter_inc_delta)\n#define __itt_counter_inc_delta_ptr ITTNOTIFY_NAME(counter_inc_delta)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_counter_inc_delta(id, value)\n#define __itt_counter_inc_delta_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_counter_inc_delta_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Decrement the unsigned 64 bits integer counter value\n *\n * Calling this function to non-unsigned 64 bits integer counters has no effect\n */\nvoid ITTAPI __itt_counter_dec(__itt_counter id);\n\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, counter_dec, (__itt_counter id))\n#define __itt_counter_dec     ITTNOTIFY_VOID(counter_dec)\n#define __itt_counter_dec_ptr ITTNOTIFY_NAME(counter_dec)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_counter_dec(id)\n#define __itt_counter_dec_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_counter_dec_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/**\n * @brief Decrement the unsigned 64 bits integer counter value with x\n *\n * Calling this function to non-unsigned 64 bits integer counters has no effect\n */\nvoid ITTAPI __itt_counter_dec_delta(__itt_counter id, unsigned long long value);\n\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, counter_dec_delta, (__itt_counter id, unsigned long long value))\n#define __itt_counter_dec_delta     ITTNOTIFY_VOID(counter_dec_delta)\n#define __itt_counter_dec_delta_ptr ITTNOTIFY_NAME(counter_dec_delta)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_counter_dec_delta(id, value)\n#define __itt_counter_dec_delta_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_counter_dec_delta_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @ingroup counters\n * @brief Increment a counter by one.\n * The first call with a given name creates a counter by that name and sets its\n * value to zero. Successive calls increment the counter value.\n * @param[in] domain The domain controlling the call. Counter names are not domain specific.\n *            The domain argument is used only to enable or disable the API calls.\n * @param[in] name The name of the counter\n */\nvoid ITTAPI __itt_counter_inc_v3(const __itt_domain *domain, __itt_string_handle *name);\n\n/**\n * @ingroup counters\n * @brief Increment a counter by the value specified in delta.\n * @param[in] domain The domain controlling the call. Counter names are not domain specific.\n *            The domain argument is used only to enable or disable the API calls.\n * @param[in] name The name of the counter\n * @param[in] delta The amount by which to increment the counter\n */\nvoid ITTAPI __itt_counter_inc_delta_v3(const __itt_domain *domain, __itt_string_handle *name, unsigned long long delta);\n\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, counter_inc_v3,       (const __itt_domain *domain, __itt_string_handle *name))\nITT_STUBV(ITTAPI, void, counter_inc_delta_v3, (const __itt_domain *domain, __itt_string_handle *name, unsigned long long delta))\n#define __itt_counter_inc_v3(d,x)         ITTNOTIFY_VOID_D1(counter_inc_v3,d,x)\n#define __itt_counter_inc_v3_ptr          ITTNOTIFY_NAME(counter_inc_v3)\n#define __itt_counter_inc_delta_v3(d,x,y) ITTNOTIFY_VOID_D2(counter_inc_delta_v3,d,x,y)\n#define __itt_counter_inc_delta_v3_ptr    ITTNOTIFY_NAME(counter_inc_delta_v3)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_counter_inc_v3(domain,name)\n#define __itt_counter_inc_v3_ptr       0\n#define __itt_counter_inc_delta_v3(domain,name,delta)\n#define __itt_counter_inc_delta_v3_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_counter_inc_v3_ptr       0\n#define __itt_counter_inc_delta_v3_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n\n/**\n * @ingroup counters\n * @brief Decrement a counter by one.\n * The first call with a given name creates a counter by that name and sets its\n * value to zero. Successive calls decrement the counter value.\n * @param[in] domain The domain controlling the call. Counter names are not domain specific.\n *            The domain argument is used only to enable or disable the API calls.\n * @param[in] name The name of the counter\n */\nvoid ITTAPI __itt_counter_dec_v3(const __itt_domain *domain, __itt_string_handle *name);\n\n/**\n * @ingroup counters\n * @brief Decrement a counter by the value specified in delta.\n * @param[in] domain The domain controlling the call. Counter names are not domain specific.\n *            The domain argument is used only to enable or disable the API calls.\n * @param[in] name The name of the counter\n * @param[in] delta The amount by which to decrement the counter\n */\nvoid ITTAPI __itt_counter_dec_delta_v3(const __itt_domain *domain, __itt_string_handle *name, unsigned long long delta);\n\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, counter_dec_v3,       (const __itt_domain *domain, __itt_string_handle *name))\nITT_STUBV(ITTAPI, void, counter_dec_delta_v3, (const __itt_domain *domain, __itt_string_handle *name, unsigned long long delta))\n#define __itt_counter_dec_v3(d,x)         ITTNOTIFY_VOID_D1(counter_dec_v3,d,x)\n#define __itt_counter_dec_v3_ptr          ITTNOTIFY_NAME(counter_dec_v3)\n#define __itt_counter_dec_delta_v3(d,x,y) ITTNOTIFY_VOID_D2(counter_dec_delta_v3,d,x,y)\n#define __itt_counter_dec_delta_v3_ptr    ITTNOTIFY_NAME(counter_dec_delta_v3)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_counter_dec_v3(domain,name)\n#define __itt_counter_dec_v3_ptr       0\n#define __itt_counter_dec_delta_v3(domain,name,delta)\n#define __itt_counter_dec_delta_v3_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_counter_dec_v3_ptr       0\n#define __itt_counter_dec_delta_v3_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/** @} counters group */\n\n\n/**\n * @brief Set the counter value\n */\nvoid ITTAPI __itt_counter_set_value(__itt_counter id, void *value_ptr);\n\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, counter_set_value, (__itt_counter id, void *value_ptr))\n#define __itt_counter_set_value     ITTNOTIFY_VOID(counter_set_value)\n#define __itt_counter_set_value_ptr ITTNOTIFY_NAME(counter_set_value)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_counter_set_value(id, value_ptr)\n#define __itt_counter_set_value_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_counter_set_value_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Set the counter value\n */\nvoid ITTAPI __itt_counter_set_value_ex(__itt_counter id, __itt_clock_domain *clock_domain, unsigned long long timestamp, void *value_ptr);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, counter_set_value_ex, (__itt_counter id, __itt_clock_domain *clock_domain, unsigned long long timestamp, void *value_ptr))\n#define __itt_counter_set_value_ex     ITTNOTIFY_VOID(counter_set_value_ex)\n#define __itt_counter_set_value_ex_ptr ITTNOTIFY_NAME(counter_set_value_ex)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_counter_set_value_ex(id, clock_domain, timestamp, value_ptr)\n#define __itt_counter_set_value_ex_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_counter_set_value_ex_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Create a typed counter with given name/domain\n *\n * After __itt_counter_create_typed() is called, __itt_counter_inc(id), __itt_counter_inc_delta(id, delta),\n * __itt_counter_set_value(id, value_ptr) or __itt_counter_set_value_ex(id, clock_domain, timestamp, value_ptr)\n * can be used to change the value of the counter\n */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n__itt_counter ITTAPI __itt_counter_create_typedA(const char    *name, const char    *domain, __itt_metadata_type type);\n__itt_counter ITTAPI __itt_counter_create_typedW(const wchar_t *name, const wchar_t *domain, __itt_metadata_type type);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_counter_create_typed     __itt_counter_create_typedW\n#  define __itt_counter_create_typed_ptr __itt_counter_create_typedW_ptr\n#else /* UNICODE */\n#  define __itt_counter_create_typed     __itt_counter_create_typedA\n#  define __itt_counter_create_typed_ptr __itt_counter_create_typedA_ptr\n#endif /* UNICODE */\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n__itt_counter ITTAPI __itt_counter_create_typed(const char *name, const char *domain, __itt_metadata_type type);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, __itt_counter, counter_create_typedA, (const char    *name, const char    *domain, __itt_metadata_type type))\nITT_STUB(ITTAPI, __itt_counter, counter_create_typedW, (const wchar_t *name, const wchar_t *domain, __itt_metadata_type type))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, __itt_counter, counter_create_typed,  (const char *name, const char *domain, __itt_metadata_type type))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_counter_create_typedA     ITTNOTIFY_DATA(counter_create_typedA)\n#define __itt_counter_create_typedA_ptr ITTNOTIFY_NAME(counter_create_typedA)\n#define __itt_counter_create_typedW     ITTNOTIFY_DATA(counter_create_typedW)\n#define __itt_counter_create_typedW_ptr ITTNOTIFY_NAME(counter_create_typedW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_counter_create_typed     ITTNOTIFY_DATA(counter_create_typed)\n#define __itt_counter_create_typed_ptr ITTNOTIFY_NAME(counter_create_typed)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_counter_create_typedA(name, domain, type)\n#define __itt_counter_create_typedA_ptr 0\n#define __itt_counter_create_typedW(name, domain, type)\n#define __itt_counter_create_typedW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_counter_create_typed(name, domain, type)\n#define __itt_counter_create_typed_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_counter_create_typedA_ptr 0\n#define __itt_counter_create_typedW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_counter_create_typed_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Destroy the counter identified by the pointer previously returned by __itt_counter_create() or\n * __itt_counter_create_typed()\n */\nvoid ITTAPI __itt_counter_destroy(__itt_counter id);\n\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, counter_destroy, (__itt_counter id))\n#define __itt_counter_destroy     ITTNOTIFY_VOID(counter_destroy)\n#define __itt_counter_destroy_ptr ITTNOTIFY_NAME(counter_destroy)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_counter_destroy(id)\n#define __itt_counter_destroy_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_counter_destroy_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} counters group */\n\n/**\n * @ingroup markers\n * @brief Create a marker instance.\n * @param[in] domain The domain for this marker\n * @param[in] clock_domain The clock domain controlling the execution of this call.\n * @param[in] timestamp The user defined timestamp.\n * @param[in] id The instance ID for this marker, or __itt_null\n * @param[in] name The name for this marker\n * @param[in] scope The scope for this marker\n */\nvoid ITTAPI __itt_marker_ex(const __itt_domain *domain,  __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_string_handle *name, __itt_scope scope);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, marker_ex,    (const __itt_domain *domain,  __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_string_handle *name, __itt_scope scope))\n#define __itt_marker_ex(d,x,y,z,a,b)    ITTNOTIFY_VOID_D5(marker_ex,d,x,y,z,a,b)\n#define __itt_marker_ex_ptr             ITTNOTIFY_NAME(marker_ex)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_marker_ex(domain,clock_domain,timestamp,id,name,scope)\n#define __itt_marker_ex_ptr    0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_marker_ex_ptr    0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @ingroup clockdomain\n * @brief Add a relation to the current task instance.\n * The current task instance is the head of the relation.\n * @param[in] domain The domain controlling this call\n * @param[in] clock_domain The clock domain controlling the execution of this call.\n * @param[in] timestamp The user defined timestamp.\n * @param[in] relation The kind of relation\n * @param[in] tail The ID for the tail of the relation\n */\nvoid ITTAPI __itt_relation_add_to_current_ex(const __itt_domain *domain,  __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_relation relation, __itt_id tail);\n\n/**\n * @ingroup clockdomain\n * @brief Add a relation between two instance identifiers.\n * @param[in] domain The domain controlling this call\n * @param[in] clock_domain The clock domain controlling the execution of this call.\n * @param[in] timestamp The user defined timestamp.\n * @param[in] head The ID for the head of the relation\n * @param[in] relation The kind of relation\n * @param[in] tail The ID for the tail of the relation\n */\nvoid ITTAPI __itt_relation_add_ex(const __itt_domain *domain,  __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id head, __itt_relation relation, __itt_id tail);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, relation_add_to_current_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_relation relation, __itt_id tail))\nITT_STUBV(ITTAPI, void, relation_add_ex,            (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id head, __itt_relation relation, __itt_id tail))\n#define __itt_relation_add_to_current_ex(d,x,y,z,a) ITTNOTIFY_VOID_D4(relation_add_to_current_ex,d,x,y,z,a)\n#define __itt_relation_add_to_current_ex_ptr        ITTNOTIFY_NAME(relation_add_to_current_ex)\n#define __itt_relation_add_ex(d,x,y,z,a,b)          ITTNOTIFY_VOID_D5(relation_add_ex,d,x,y,z,a,b)\n#define __itt_relation_add_ex_ptr                   ITTNOTIFY_NAME(relation_add_ex)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_relation_add_to_current_ex(domain,clock_domain,timestame,relation,tail)\n#define __itt_relation_add_to_current_ex_ptr 0\n#define __itt_relation_add_ex(domain,clock_domain,timestamp,head,relation,tail)\n#define __itt_relation_add_ex_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_relation_add_to_current_ex_ptr 0\n#define __itt_relation_add_ex_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/** @cond exclude_from_documentation */\ntypedef enum ___itt_track_group_type\n{\n    __itt_track_group_type_normal = 0\n} __itt_track_group_type;\n/** @endcond */\n\n/** @cond exclude_from_documentation */\n#pragma pack(push, 8)\n\ntypedef struct ___itt_track_group\n{\n    __itt_string_handle* name;     /*!< Name of the track group */\n    struct ___itt_track* track;    /*!< List of child tracks    */\n    __itt_track_group_type tgtype; /*!< Type of the track group */\n    int   extra1;                  /*!< Reserved. Must be zero  */\n    void* extra2;                  /*!< Reserved. Must be zero  */\n    struct ___itt_track_group* next;\n} __itt_track_group;\n\n#pragma pack(pop)\n/** @endcond */\n\n/**\n * @brief Placeholder for custom track types. Currently, \"normal\" custom track\n * is the only available track type.\n */\ntypedef enum ___itt_track_type\n{\n    __itt_track_type_normal = 0\n#ifdef INTEL_ITTNOTIFY_API_PRIVATE\n    , __itt_track_type_queue\n#endif /* INTEL_ITTNOTIFY_API_PRIVATE */\n} __itt_track_type;\n\n/** @cond exclude_from_documentation */\n#pragma pack(push, 8)\n\ntypedef struct ___itt_track\n{\n    __itt_string_handle* name; /*!< Name of the track group */\n    __itt_track_group* group;  /*!< Parent group to a track */\n    __itt_track_type ttype;    /*!< Type of the track       */\n    int   extra1;              /*!< Reserved. Must be zero  */\n    void* extra2;              /*!< Reserved. Must be zero  */\n    struct ___itt_track* next;\n} __itt_track;\n\n#pragma pack(pop)\n/** @endcond */\n\n/**\n * @brief Create logical track group.\n */\n__itt_track_group* ITTAPI __itt_track_group_create(__itt_string_handle* name, __itt_track_group_type track_group_type);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUB(ITTAPI, __itt_track_group*, track_group_create, (__itt_string_handle* name, __itt_track_group_type track_group_type))\n#define __itt_track_group_create     ITTNOTIFY_DATA(track_group_create)\n#define __itt_track_group_create_ptr ITTNOTIFY_NAME(track_group_create)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_track_group_create(name)  (__itt_track_group*)0\n#define __itt_track_group_create_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_track_group_create_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Create logical track.\n */\n__itt_track* ITTAPI __itt_track_create(__itt_track_group* track_group, __itt_string_handle* name, __itt_track_type track_type);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUB(ITTAPI, __itt_track*, track_create, (__itt_track_group* track_group,__itt_string_handle* name, __itt_track_type track_type))\n#define __itt_track_create     ITTNOTIFY_DATA(track_create)\n#define __itt_track_create_ptr ITTNOTIFY_NAME(track_create)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_track_create(track_group,name,track_type)  (__itt_track*)0\n#define __itt_track_create_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_track_create_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Set the logical track.\n */\nvoid ITTAPI __itt_set_track(__itt_track* track);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, set_track, (__itt_track *track))\n#define __itt_set_track     ITTNOTIFY_VOID(set_track)\n#define __itt_set_track_ptr ITTNOTIFY_NAME(set_track)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_set_track(track)\n#define __itt_set_track_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_set_track_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/* ========================================================================== */\n/** @cond exclude_from_gpa_documentation */\n/**\n * @defgroup events Events\n * @ingroup public\n * Events group\n * @{\n */\n/** @brief user event type */\ntypedef int __itt_event;\n\n/**\n * @brief Create an event notification\n * @note name or namelen being null/name and namelen not matching, user event feature not enabled\n * @return non-zero event identifier upon success and __itt_err otherwise\n */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n__itt_event LIBITTAPI __itt_event_createA(const char    *name, int namelen);\n__itt_event LIBITTAPI __itt_event_createW(const wchar_t *name, int namelen);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_event_create     __itt_event_createW\n#  define __itt_event_create_ptr __itt_event_createW_ptr\n#else\n#  define __itt_event_create     __itt_event_createA\n#  define __itt_event_create_ptr __itt_event_createA_ptr\n#endif /* UNICODE */\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n__itt_event LIBITTAPI __itt_event_create(const char *name, int namelen);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(LIBITTAPI, __itt_event, event_createA, (const char    *name, int namelen))\nITT_STUB(LIBITTAPI, __itt_event, event_createW, (const wchar_t *name, int namelen))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(LIBITTAPI, __itt_event, event_create,  (const char    *name, int namelen))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_event_createA     ITTNOTIFY_DATA(event_createA)\n#define __itt_event_createA_ptr ITTNOTIFY_NAME(event_createA)\n#define __itt_event_createW     ITTNOTIFY_DATA(event_createW)\n#define __itt_event_createW_ptr ITTNOTIFY_NAME(event_createW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_event_create      ITTNOTIFY_DATA(event_create)\n#define __itt_event_create_ptr  ITTNOTIFY_NAME(event_create)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_event_createA(name, namelen) (__itt_event)0\n#define __itt_event_createA_ptr 0\n#define __itt_event_createW(name, namelen) (__itt_event)0\n#define __itt_event_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_event_create(name, namelen)  (__itt_event)0\n#define __itt_event_create_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_event_createA_ptr 0\n#define __itt_event_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_event_create_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Record an event occurrence.\n * @return __itt_err upon failure (invalid event id/user event feature not enabled)\n */\nint LIBITTAPI __itt_event_start(__itt_event event);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUB(LIBITTAPI, int, event_start, (__itt_event event))\n#define __itt_event_start     ITTNOTIFY_DATA(event_start)\n#define __itt_event_start_ptr ITTNOTIFY_NAME(event_start)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_event_start(event) (int)0\n#define __itt_event_start_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_event_start_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Record an event end occurrence.\n * @note It is optional if events do not have durations.\n * @return __itt_err upon failure (invalid event id/user event feature not enabled)\n */\nint LIBITTAPI __itt_event_end(__itt_event event);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUB(LIBITTAPI, int, event_end, (__itt_event event))\n#define __itt_event_end     ITTNOTIFY_DATA(event_end)\n#define __itt_event_end_ptr ITTNOTIFY_NAME(event_end)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_event_end(event) (int)0\n#define __itt_event_end_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_event_end_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} events group */\n\n\n/**\n * @defgroup arrays Arrays Visualizer\n * @ingroup public\n * Visualize arrays\n * @{\n */\n\n/**\n * @enum __itt_av_data_type\n * @brief Defines types of arrays data (for C/C++ intrinsic types)\n */\ntypedef enum\n{\n    __itt_e_first = 0,\n    __itt_e_char = 0,  /* 1-byte integer */\n    __itt_e_uchar,     /* 1-byte unsigned integer */\n    __itt_e_int16,     /* 2-byte integer */\n    __itt_e_uint16,    /* 2-byte unsigned integer  */\n    __itt_e_int32,     /* 4-byte integer */\n    __itt_e_uint32,    /* 4-byte unsigned integer */\n    __itt_e_int64,     /* 8-byte integer */\n    __itt_e_uint64,    /* 8-byte unsigned integer */\n    __itt_e_float,     /* 4-byte floating */\n    __itt_e_double,    /* 8-byte floating */\n    __itt_e_last = __itt_e_double\n} __itt_av_data_type;\n\n/**\n * @brief Save an array data to a file.\n * Output format is defined by the file extension. The csv and bmp formats are supported (bmp - for 2-dimensional array only).\n * @param[in] data - pointer to the array data\n * @param[in] rank - the rank of the array\n * @param[in] dimensions - pointer to an array of integers, which specifies the array dimensions.\n * The size of dimensions must be equal to the rank\n * @param[in] type - the type of the array, specified as one of the __itt_av_data_type values (for intrinsic types)\n * @param[in] filePath - the file path; the output format is defined by the file extension\n * @param[in] columnOrder - defines how the array is stored in the linear memory.\n * It should be 1 for column-major order (e.g. in FORTRAN) or 0 - for row-major order (e.g. in C).\n */\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nint ITTAPI __itt_av_saveA(void *data, int rank, const int *dimensions, int type, const char *filePath, int columnOrder);\nint ITTAPI __itt_av_saveW(void *data, int rank, const int *dimensions, int type, const wchar_t *filePath, int columnOrder);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_av_save     __itt_av_saveW\n#  define __itt_av_save_ptr __itt_av_saveW_ptr\n#else /* UNICODE */\n#  define __itt_av_save     __itt_av_saveA\n#  define __itt_av_save_ptr __itt_av_saveA_ptr\n#endif /* UNICODE */\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nint ITTAPI __itt_av_save(void *data, int rank, const int *dimensions, int type, const char *filePath, int columnOrder);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, int, av_saveA, (void *data, int rank, const int *dimensions, int type, const char *filePath, int columnOrder))\nITT_STUB(ITTAPI, int, av_saveW, (void *data, int rank, const int *dimensions, int type, const wchar_t *filePath, int columnOrder))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, int, av_save,  (void *data, int rank, const int *dimensions, int type, const char *filePath, int columnOrder))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_av_saveA     ITTNOTIFY_DATA(av_saveA)\n#define __itt_av_saveA_ptr ITTNOTIFY_NAME(av_saveA)\n#define __itt_av_saveW     ITTNOTIFY_DATA(av_saveW)\n#define __itt_av_saveW_ptr ITTNOTIFY_NAME(av_saveW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_av_save     ITTNOTIFY_DATA(av_save)\n#define __itt_av_save_ptr ITTNOTIFY_NAME(av_save)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_av_saveA(name)\n#define __itt_av_saveA_ptr 0\n#define __itt_av_saveW(name)\n#define __itt_av_saveW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_av_save(name)\n#define __itt_av_save_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_av_saveA_ptr 0\n#define __itt_av_saveW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_av_save_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\nvoid ITTAPI __itt_enable_attach(void);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, enable_attach, (void))\n#define __itt_enable_attach     ITTNOTIFY_VOID(enable_attach)\n#define __itt_enable_attach_ptr ITTNOTIFY_NAME(enable_attach)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_enable_attach()\n#define __itt_enable_attach_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_enable_attach_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/** @cond exclude_from_gpa_documentation */\n\n/** @} arrays group */\n\n/** @endcond */\n\n/**\n * @brief Module load notification\n * This API is used to report necessary information in case of bypassing default system loader.\n * Notification should be done immediately after this module is loaded to process memory.\n * @param[in] start_addr - module start address\n * @param[in] end_addr - module end address\n * @param[in] path - file system full path to the module\n */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nvoid ITTAPI __itt_module_loadA(void *start_addr, void *end_addr, const char *path);\nvoid ITTAPI __itt_module_loadW(void *start_addr, void *end_addr, const wchar_t *path);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_module_load     __itt_module_loadW\n#  define __itt_module_load_ptr __itt_module_loadW_ptr\n#else /* UNICODE */\n#  define __itt_module_load     __itt_module_loadA\n#  define __itt_module_load_ptr __itt_module_loadA_ptr\n#endif /* UNICODE */\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nvoid ITTAPI __itt_module_load(void *start_addr, void *end_addr, const char *path);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, void, module_loadA, (void *start_addr, void *end_addr, const char *path))\nITT_STUB(ITTAPI, void, module_loadW, (void *start_addr, void *end_addr, const wchar_t *path))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, void, module_load,  (void *start_addr, void *end_addr, const char *path))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_module_loadA     ITTNOTIFY_VOID(module_loadA)\n#define __itt_module_loadA_ptr ITTNOTIFY_NAME(module_loadA)\n#define __itt_module_loadW     ITTNOTIFY_VOID(module_loadW)\n#define __itt_module_loadW_ptr ITTNOTIFY_NAME(module_loadW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_module_load     ITTNOTIFY_VOID(module_load)\n#define __itt_module_load_ptr ITTNOTIFY_NAME(module_load)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_module_loadA(start_addr, end_addr, path)\n#define __itt_module_loadA_ptr 0\n#define __itt_module_loadW(start_addr, end_addr, path)\n#define __itt_module_loadW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_module_load(start_addr, end_addr, path)\n#define __itt_module_load_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_module_loadA_ptr 0\n#define __itt_module_loadW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_module_load_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Report module unload\n * This API is used to report necessary information in case of bypassing default system loader.\n * Notification should be done just before the module is unloaded from process memory.\n * @param[in] addr - base address of loaded module\n */\nvoid ITTAPI __itt_module_unload(void *addr);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, module_unload, (void *addr))\n#define __itt_module_unload     ITTNOTIFY_VOID(module_unload)\n#define __itt_module_unload_ptr ITTNOTIFY_NAME(module_unload)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_module_unload(addr)\n#define __itt_module_unload_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_module_unload_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/** @cond exclude_from_documentation */\ntypedef enum\n{\n    __itt_module_type_unknown = 0,\n    __itt_module_type_elf,\n    __itt_module_type_coff\n} __itt_module_type;\n/** @endcond */\n\n/** @cond exclude_from_documentation */\ntypedef enum\n{\n    itt_section_type_unknown,\n    itt_section_type_bss,        /* notifies that the section contains uninitialized data. These are the relevant section types and the modules that contain them:\n                                  * ELF module:  SHT_NOBITS section type\n                                  * COFF module: IMAGE_SCN_CNT_UNINITIALIZED_DATA section type\n                                  */\n    itt_section_type_data,       /* notifies that section contains initialized data. These are the relevant section types and the modules that contain them:\n                                  * ELF module:  SHT_PROGBITS section type\n                                  * COFF module: IMAGE_SCN_CNT_INITIALIZED_DATA section type\n                                  */\n    itt_section_type_text        /* notifies that the section contains executable code. These are the relevant section types and the modules that contain them:\n                                  * ELF module:  SHT_PROGBITS section type\n                                  * COFF module: IMAGE_SCN_CNT_CODE section type\n                                  */\n} __itt_section_type;\n/** @endcond */\n\n/**\n * @hideinitializer\n * @brief bit-mask, detects a section attribute that indicates whether a section can be executed as code:\n * These are the relevant section attributes and the modules that contain them:\n * ELF module:  PF_X section attribute\n * COFF module: IMAGE_SCN_MEM_EXECUTE attribute\n */\n#define __itt_section_exec 0x20000000\n\n/**\n * @hideinitializer\n * @brief bit-mask, detects a section attribute that indicates whether a section can be read.\n * These are the relevant section attributes and the modules that contain them:\n * ELF module:  PF_R attribute\n * COFF module: IMAGE_SCN_MEM_READ attribute\n */\n#define __itt_section_read 0x40000000\n\n/**\n * @hideinitializer\n * @brief bit-mask, detects a section attribute that indicates whether a section can be written to.\n * These are the relevant section attributes and the modules that contain them:\n * ELF module:  PF_W attribute\n * COFF module: IMAGE_SCN_MEM_WRITE attribute\n */\n#define __itt_section_write 0x80000000\n\n/** @cond exclude_from_documentation */\n#pragma pack(push, 8)\n\ntypedef struct ___itt_section_info\n{\n    const char* name;                 /*!< Section name in UTF8 */\n    __itt_section_type type;          /*!< Section content and semantics description */\n    size_t flags;                     /*!< Section bit flags that describe attributes using bit mask\n                                       * Zero if disabled, non-zero if enabled\n                                       */\n    void* start_addr;                 /*!< Section load(relocated) start address */\n    size_t size;                      /*!< Section file offset */\n    size_t file_offset;               /*!< Section size */\n} __itt_section_info;\n\n#pragma pack(pop)\n/** @endcond */\n\n/** @cond exclude_from_documentation */\n#pragma pack(push, 8)\n\ntypedef struct ___itt_module_object\n{\n    unsigned int version;                 /*!< API version*/\n    __itt_id module_id;                   /*!< Unique identifier. This is unchanged for sections that belong to the same module */\n    __itt_module_type module_type;        /*!< Binary module format */\n    const char* module_name;              /*!< Unique module name or path to module in UTF8\n                                           * Contains module name when module_bufer and module_size exist\n                                           * Contains module path when module_bufer and module_size absent\n                                           * module_name remains the same for the certain module_id\n                                           */\n    void* module_buffer;                  /*!< Module buffer content */\n    size_t module_size;                   /*!< Module buffer size */\n                                          /*!< If module_buffer and module_size exist, the binary module is dumped onto the system.\n                                           * If module_buffer and module_size do not exist,\n                                           * the binary module exists on the system already.\n                                           * The module_name parameter contains the path to the module.\n                                           */\n    __itt_section_info* section_array;    /*!< Reference to section information */\n    size_t section_number;\n} __itt_module_object;\n\n#pragma pack(pop)\n/** @endcond */\n\n/**\n * @brief Load module content and its loaded(relocated) sections.\n * This API is useful to save a module, or specify its location on the system and report information about loaded sections.\n * The target module is saved on the system if module buffer content and size are available.\n * If module buffer content and size are unavailable, the module name contains the path to the existing binary module.\n * @param[in] module_obj - provides module and section information, along with unique module identifiers (name,module ID)\n * which bind the binary module to particular sections.\n */\nvoid ITTAPI __itt_module_load_with_sections(__itt_module_object* module_obj);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, module_load_with_sections,  (__itt_module_object* module_obj))\n#define __itt_module_load_with_sections     ITTNOTIFY_VOID(module_load_with_sections)\n#define __itt_module_load_with_sections_ptr ITTNOTIFY_NAME(module_load_with_sections)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_module_load_with_sections(module_obj)\n#define __itt_module_load_with_sections_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_module_load_with_sections_ptr  0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Unload a module and its loaded(relocated) sections.\n * This API notifies that the module and its sections were unloaded.\n * @param[in] module_obj - provides module and sections information, along with unique module identifiers (name,module ID)\n * which bind the binary module to particular sections.\n */\nvoid ITTAPI __itt_module_unload_with_sections(__itt_module_object* module_obj);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, module_unload_with_sections,  (__itt_module_object* module_obj))\n#define __itt_module_unload_with_sections     ITTNOTIFY_VOID(module_unload_with_sections)\n#define __itt_module_unload_with_sections_ptr ITTNOTIFY_NAME(module_unload_with_sections)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_module_unload_with_sections(module_obj)\n#define __itt_module_unload_with_sections_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_module_unload_with_sections_ptr  0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/** @cond exclude_from_documentation */\n#pragma pack(push, 8)\n\ntypedef struct ___itt_histogram\n{\n    const __itt_domain* domain;      /*!< Domain of the histogram*/\n    const char* nameA;               /*!< Name of the histogram */\n#if defined(UNICODE) || defined(_UNICODE)\n    const wchar_t* nameW;\n#else  /* UNICODE || _UNICODE */\n    void* nameW;\n#endif /* UNICODE || _UNICODE */\n    __itt_metadata_type x_type;     /*!< Type of the histogram X axis */\n    __itt_metadata_type y_type;     /*!< Type of the histogram Y axis */\n    int   extra1;                   /*!< Reserved to the runtime */\n    void* extra2;                   /*!< Reserved to the runtime */\n    struct ___itt_histogram* next;\n}  __itt_histogram;\n\n#pragma pack(pop)\n/** @endcond */\n\n/**\n * @brief Create a typed histogram instance with given name/domain.\n * @param[in] domain The domain controlling the call.\n * @param[in] name   The name of the histogram.\n * @param[in] x_type The type of the X axis in histogram (may be 0 to calculate batch statistics).\n * @param[in] y_type The type of the Y axis in histogram.\n*/\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n__itt_histogram* ITTAPI __itt_histogram_createA(const __itt_domain* domain, const char* name, __itt_metadata_type x_type, __itt_metadata_type y_type);\n__itt_histogram* ITTAPI __itt_histogram_createW(const __itt_domain* domain, const wchar_t* name, __itt_metadata_type x_type, __itt_metadata_type y_type);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_histogram_create     __itt_histogram_createW\n#  define __itt_histogram_create_ptr __itt_histogram_createW_ptr\n#else /* UNICODE */\n#  define __itt_histogram_create     __itt_histogram_createA\n#  define __itt_histogram_create_ptr __itt_histogram_createA_ptr\n#endif /* UNICODE */\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n__itt_histogram* ITTAPI __itt_histogram_create(const __itt_domain* domain, const char* name, __itt_metadata_type x_type, __itt_metadata_type y_type);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, __itt_histogram*, histogram_createA, (const __itt_domain* domain, const char* name, __itt_metadata_type x_type, __itt_metadata_type y_type))\nITT_STUB(ITTAPI, __itt_histogram*, histogram_createW, (const __itt_domain* domain, const wchar_t* name, __itt_metadata_type x_type, __itt_metadata_type y_type))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, __itt_histogram*, histogram_create, (const __itt_domain* domain, const char* name, __itt_metadata_type x_type, __itt_metadata_type y_type))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_histogram_createA     ITTNOTIFY_DATA(histogram_createA)\n#define __itt_histogram_createA_ptr ITTNOTIFY_NAME(histogram_createA)\n#define __itt_histogram_createW     ITTNOTIFY_DATA(histogram_createW)\n#define __itt_histogram_createW_ptr ITTNOTIFY_NAME(histogram_createW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_histogram_create     ITTNOTIFY_DATA(histogram_create)\n#define __itt_histogram_create_ptr ITTNOTIFY_NAME(histogram_create)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_histogram_createA(domain, name, x_type, y_type) (__itt_histogram*)0\n#define __itt_histogram_createA_ptr 0\n#define __itt_histogram_createW(domain, name, x_type, y_type) (__itt_histogram*)0\n#define __itt_histogram_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_histogram_create(domain, name, x_type, y_type) (__itt_histogram*)0\n#define __itt_histogram_create_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_histogram_createA_ptr 0\n#define __itt_histogram_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_histogram_create_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Submit statistics for a histogram instance.\n * @param[in] histogram    Pointer to the histogram instance to which the histogram statistic is to be dumped.\n * @param[in] length  The number of elements in dumped axis data array.\n * @param[in] x_data  The X axis dumped data itself (may be NULL to calculate batch statistics).\n * @param[in] y_data  The Y axis dumped data itself.\n*/\nvoid ITTAPI __itt_histogram_submit(__itt_histogram* histogram, size_t length, void* x_data, void* y_data);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, histogram_submit, (__itt_histogram* histogram, size_t length, void* x_data, void* y_data))\n#define __itt_histogram_submit     ITTNOTIFY_VOID(histogram_submit)\n#define __itt_histogram_submit_ptr ITTNOTIFY_NAME(histogram_submit)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_histogram_submit(histogram, length, x_data, y_data)\n#define __itt_histogram_submit_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_histogram_submit_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n\n/**\n* @brief function allows to obtain the current collection state at the moment\n* @return collection state as a enum __itt_collection_state\n*/\n__itt_collection_state __itt_get_collection_state(void);\n\n/**\n* @brief function releases resources allocated by ITT API static part\n* this API should be called from the library destructor\n* @return void\n*/\nvoid __itt_release_resources(void);\n/** @endcond */\n\n/**\n * @brief Create a typed counter with given domain pointer, string name and counter type\n*/\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n__itt_counter ITTAPI __itt_counter_createA_v3(const __itt_domain* domain, const char* name, __itt_metadata_type type);\n__itt_counter ITTAPI __itt_counter_createW_v3(const __itt_domain* domain, const wchar_t* name, __itt_metadata_type type);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_counter_create_v3     __itt_counter_createW_v3\n#  define __itt_counter_create_v3_ptr __itt_counter_createW_v3_ptr\n#else /* UNICODE */\n#  define __itt_counter_create_v3     __itt_counter_createA_v3\n#  define __itt_counter_create_v3_ptr __itt_counter_createA_v3_ptr\n#endif /* UNICODE */\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n__itt_counter ITTAPI __itt_counter_create_v3(const __itt_domain* domain, const char* name, __itt_metadata_type type);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, __itt_counter, counter_createA_v3, (const __itt_domain* domain, const char* name, __itt_metadata_type type))\nITT_STUB(ITTAPI, __itt_counter, counter_createW_v3, (const __itt_domain* domain, const wchar_t* name, __itt_metadata_type type))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, __itt_counter, counter_create_v3,  (const __itt_domain* domain, const char* name, __itt_metadata_type type))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_counter_createA_v3     ITTNOTIFY_DATA(counter_createA_v3)\n#define __itt_counter_createA_v3_ptr ITTNOTIFY_NAME(counter_createA_v3)\n#define __itt_counter_createW_v3     ITTNOTIFY_DATA(counter_createW_v3)\n#define __itt_counter_createW_v3_ptr ITTNOTIFY_NAME(counter_createW_v3)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_counter_create_v3     ITTNOTIFY_DATA(counter_create_v3)\n#define __itt_counter_create_v3_ptr ITTNOTIFY_NAME(counter_create_v3)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_counter_createA_v3(domain, name, type) (__itt_counter)0\n#define __itt_counter_createA_v3_ptr 0\n#define __itt_counter_createW_v3(domain, name, type) (__itt_counter)0\n#define __itt_counter_create_typedW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_counter_create_v3(domain, name, type) (__itt_counter)0\n#define __itt_counter_create_v3_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_counter_createA_v3_ptr 0\n#define __itt_counter_createW_v3_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_counter_create_v3_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Set the counter value api\n */\nvoid ITTAPI __itt_counter_set_value_v3(__itt_counter counter, void *value_ptr);\n\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, counter_set_value_v3, (__itt_counter counter, void *value_ptr))\n#define __itt_counter_set_value_v3     ITTNOTIFY_VOID(counter_set_value_v3)\n#define __itt_counter_set_value_v3_ptr ITTNOTIFY_NAME(counter_set_value_v3)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_counter_set_value_v3(counter, value_ptr)\n#define __itt_counter_set_value_v3_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_counter_set_value_v3_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief describes the type of context metadata\n*/\ntypedef enum {\n    __itt_context_unknown = 0,              /*!< Undefined type */\n    __itt_context_nameA,                    /*!< ASCII string char* type */\n    __itt_context_nameW,                    /*!< Unicode string wchar_t* type */\n    __itt_context_deviceA,                  /*!< ASCII string char* type */\n    __itt_context_deviceW,                  /*!< Unicode string wchar_t* type */\n    __itt_context_unitsA,                   /*!< ASCII string char* type */\n    __itt_context_unitsW,                   /*!< Unicode string wchar_t* type */\n    __itt_context_pci_addrA,                /*!< ASCII string char* type */\n    __itt_context_pci_addrW,                /*!< Unicode string wchar_t* type */\n    __itt_context_tid,                      /*!< Unsigned 64-bit integer type */\n    __itt_context_max_val,                  /*!< Unsigned 64-bit integer type */\n    __itt_context_bandwidth_flag,           /*!< Unsigned 64-bit integer type */\n    __itt_context_latency_flag,             /*!< Unsigned 64-bit integer type */\n    __itt_context_occupancy_flag,           /*!< Unsigned 64-bit integer type */\n    __itt_context_on_thread_flag,           /*!< Unsigned 64-bit integer type */\n    __itt_context_is_abs_val_flag,          /*!< Unsigned 64-bit integer type */\n    __itt_context_cpu_instructions_flag,    /*!< Unsigned 64-bit integer type */\n    __itt_context_cpu_cycles_flag           /*!< Unsigned 64-bit integer type */\n} __itt_context_type;\n\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_context_name __itt_context_nameW\n#  define __itt_context_device __itt_context_deviceW\n#  define __itt_context_units __itt_context_unitsW\n#  define __itt_context_pci_addr __itt_context_pci_addrW\n#else  /* UNICODE || _UNICODE */\n#  define __itt_context_name __itt_context_nameA\n#  define __itt_context_device __itt_context_deviceA\n#  define __itt_context_units __itt_context_unitsA\n#  define __itt_context_pci_addr __itt_context_pci_addrA\n#endif /* UNICODE || _UNICODE */\n\n/** @cond exclude_from_documentation */\n#pragma pack(push, 8)\n\ntypedef struct ___itt_context_metadata\n{\n    __itt_context_type type;    /*!< Type of the context metadata value */\n    void* value;                /*!< Pointer to context metadata value itself */\n}  __itt_context_metadata;\n\n#pragma pack(pop)\n/** @endcond */\n\n/** @cond exclude_from_documentation */\n#pragma pack(push, 8)\n\ntypedef struct ___itt_counter_metadata\n{\n    __itt_counter counter;              /*!< Associated context metadata counter */\n    __itt_context_type type;            /*!< Type of the context metadata value */\n    const char* str_valueA;             /*!< String context metadata value */\n#if defined(UNICODE) || defined(_UNICODE)\n    const wchar_t* str_valueW;\n#else  /* UNICODE || _UNICODE */\n    void* str_valueW;\n#endif /* UNICODE || _UNICODE */\n    unsigned long long value;           /*!< Numeric context metadata value */\n    int   extra1;                       /*!< Reserved to the runtime */\n    void* extra2;                       /*!< Reserved to the runtime */\n    struct ___itt_counter_metadata* next;\n}  __itt_counter_metadata;\n\n#pragma pack(pop)\n/** @endcond */\n\n/**\n * @brief Bind context metadata to counter instance\n * @param[in] counter   Pointer to the counter instance to which the context metadata is to be associated.\n * @param[in] length    The number of elements in context metadata array.\n * @param[in] metadata  The context metadata itself.\n*/\nvoid ITTAPI __itt_bind_context_metadata_to_counter(__itt_counter counter, size_t length, __itt_context_metadata* metadata);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, bind_context_metadata_to_counter, (__itt_counter counter, size_t length, __itt_context_metadata* metadata))\n#define __itt_bind_context_metadata_to_counter     ITTNOTIFY_VOID(bind_context_metadata_to_counter)\n#define __itt_bind_context_metadata_to_counter_ptr ITTNOTIFY_NAME(bind_context_metadata_to_counter)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_bind_context_metadata_to_counter(counter, length, metadata)\n#define __itt_bind_context_metadata_to_counter_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_bind_context_metadata_to_counter_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n#endif /* _ITTNOTIFY_H_ */\n\n#ifdef INTEL_ITTNOTIFY_API_PRIVATE\n\n#ifndef _ITTNOTIFY_PRIVATE_\n#define _ITTNOTIFY_PRIVATE_\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @ingroup clockdomain\n * @brief Begin an overlapped task instance.\n * @param[in] domain The domain for this task\n * @param[in] clock_domain The clock domain controlling the execution of this call.\n * @param[in] timestamp The user defined timestamp.\n * @param[in] taskid The identifier for this task instance, *cannot* be __itt_null.\n * @param[in] parentid The parent of this task, or __itt_null.\n * @param[in] name The name of this task.\n */\nvoid ITTAPI __itt_task_begin_overlapped_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, __itt_string_handle* name);\n\n/**\n * @ingroup clockdomain\n * @brief End an overlapped task instance.\n * @param[in] domain The domain for this task\n * @param[in] clock_domain The clock domain controlling the execution of this call.\n * @param[in] timestamp The user defined timestamp.\n * @param[in] taskid Explicit ID of finished task\n */\nvoid ITTAPI __itt_task_end_overlapped_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, task_begin_overlapped_ex,       (const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, __itt_string_handle* name))\nITT_STUBV(ITTAPI, void, task_end_overlapped_ex,         (const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid))\n#define __itt_task_begin_overlapped_ex(d,x,y,z,a,b)     ITTNOTIFY_VOID_D5(task_begin_overlapped_ex,d,x,y,z,a,b)\n#define __itt_task_begin_overlapped_ex_ptr              ITTNOTIFY_NAME(task_begin_overlapped_ex)\n#define __itt_task_end_overlapped_ex(d,x,y,z)           ITTNOTIFY_VOID_D3(task_end_overlapped_ex,d,x,y,z)\n#define __itt_task_end_overlapped_ex_ptr                ITTNOTIFY_NAME(task_end_overlapped_ex)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_task_begin_overlapped_ex(domain,clock_domain,timestamp,taskid,parentid,name)\n#define __itt_task_begin_overlapped_ex_ptr      0\n#define __itt_task_end_overlapped_ex(domain,clock_domain,timestamp,taskid)\n#define __itt_task_end_overlapped_ex_ptr        0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_task_begin_overlapped_ex_ptr      0\n#define __itt_task_end_overlapped_ptr           0\n#define __itt_task_end_overlapped_ex_ptr        0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @defgroup makrs_internal Marks\n * @ingroup internal\n * Marks group\n * @warning Internal API:\n *   - It is not shipped to outside of Intel\n *   - It is delivered to internal Intel teams using e-mail or SVN access only\n * @{\n */\n/** @brief user mark type */\ntypedef int __itt_mark_type;\n\n/**\n * @brief Creates a user mark type with the specified name using char or Unicode string.\n * @param[in] name - name of mark to create\n * @return Returns a handle to the mark type\n */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n__itt_mark_type ITTAPI __itt_mark_createA(const char    *name);\n__itt_mark_type ITTAPI __itt_mark_createW(const wchar_t *name);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_mark_create     __itt_mark_createW\n#  define __itt_mark_create_ptr __itt_mark_createW_ptr\n#else /* UNICODE */\n#  define __itt_mark_create     __itt_mark_createA\n#  define __itt_mark_create_ptr __itt_mark_createA_ptr\n#endif /* UNICODE */\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n__itt_mark_type ITTAPI __itt_mark_create(const char *name);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, __itt_mark_type, mark_createA, (const char    *name))\nITT_STUB(ITTAPI, __itt_mark_type, mark_createW, (const wchar_t *name))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, __itt_mark_type, mark_create,  (const char *name))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_mark_createA     ITTNOTIFY_DATA(mark_createA)\n#define __itt_mark_createA_ptr ITTNOTIFY_NAME(mark_createA)\n#define __itt_mark_createW     ITTNOTIFY_DATA(mark_createW)\n#define __itt_mark_createW_ptr ITTNOTIFY_NAME(mark_createW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_mark_create      ITTNOTIFY_DATA(mark_create)\n#define __itt_mark_create_ptr  ITTNOTIFY_NAME(mark_create)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_mark_createA(name) (__itt_mark_type)0\n#define __itt_mark_createA_ptr 0\n#define __itt_mark_createW(name) (__itt_mark_type)0\n#define __itt_mark_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_mark_create(name)  (__itt_mark_type)0\n#define __itt_mark_create_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_mark_createA_ptr 0\n#define __itt_mark_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_mark_create_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Creates a \"discrete\" user mark type of the specified type and an optional parameter using char or Unicode string.\n *\n * - The mark of \"discrete\" type is placed to collection results in case of success. It appears in overtime view(s) as a special tick sign.\n * - The call is \"synchronous\" - function returns after mark is actually added to results.\n * - This function is useful, for example, to mark different phases of application\n *   (beginning of the next mark automatically meand end of current region).\n * - Can be used together with \"continuous\" marks (see below) at the same collection session\n * @param[in] mt - mark, created by __itt_mark_create(const char* name) function\n * @param[in] parameter - string parameter of mark\n * @return Returns zero value in case of success, non-zero value otherwise.\n */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nint ITTAPI __itt_markA(__itt_mark_type mt, const char    *parameter);\nint ITTAPI __itt_markW(__itt_mark_type mt, const wchar_t *parameter);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_mark     __itt_markW\n#  define __itt_mark_ptr __itt_markW_ptr\n#else /* UNICODE  */\n#  define __itt_mark     __itt_markA\n#  define __itt_mark_ptr __itt_markA_ptr\n#endif /* UNICODE */\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nint ITTAPI __itt_mark(__itt_mark_type mt, const char *parameter);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, int, markA, (__itt_mark_type mt, const char    *parameter))\nITT_STUB(ITTAPI, int, markW, (__itt_mark_type mt, const wchar_t *parameter))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, int, mark,  (__itt_mark_type mt, const char *parameter))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_markA     ITTNOTIFY_DATA(markA)\n#define __itt_markA_ptr ITTNOTIFY_NAME(markA)\n#define __itt_markW     ITTNOTIFY_DATA(markW)\n#define __itt_markW_ptr ITTNOTIFY_NAME(markW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_mark      ITTNOTIFY_DATA(mark)\n#define __itt_mark_ptr  ITTNOTIFY_NAME(mark)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_markA(mt, parameter) (int)0\n#define __itt_markA_ptr 0\n#define __itt_markW(mt, parameter) (int)0\n#define __itt_markW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_mark(mt, parameter)  (int)0\n#define __itt_mark_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_markA_ptr 0\n#define __itt_markW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_mark_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Use this if necessary to create a \"discrete\" user event type (mark) for process\n * rather then for one thread\n * @see int __itt_mark(__itt_mark_type mt, const char* parameter);\n */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nint ITTAPI __itt_mark_globalA(__itt_mark_type mt, const char    *parameter);\nint ITTAPI __itt_mark_globalW(__itt_mark_type mt, const wchar_t *parameter);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_mark_global     __itt_mark_globalW\n#  define __itt_mark_global_ptr __itt_mark_globalW_ptr\n#else /* UNICODE  */\n#  define __itt_mark_global     __itt_mark_globalA\n#  define __itt_mark_global_ptr __itt_mark_globalA_ptr\n#endif /* UNICODE */\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nint ITTAPI __itt_mark_global(__itt_mark_type mt, const char *parameter);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, int, mark_globalA, (__itt_mark_type mt, const char    *parameter))\nITT_STUB(ITTAPI, int, mark_globalW, (__itt_mark_type mt, const wchar_t *parameter))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, int, mark_global,  (__itt_mark_type mt, const char *parameter))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_mark_globalA     ITTNOTIFY_DATA(mark_globalA)\n#define __itt_mark_globalA_ptr ITTNOTIFY_NAME(mark_globalA)\n#define __itt_mark_globalW     ITTNOTIFY_DATA(mark_globalW)\n#define __itt_mark_globalW_ptr ITTNOTIFY_NAME(mark_globalW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_mark_global      ITTNOTIFY_DATA(mark_global)\n#define __itt_mark_global_ptr  ITTNOTIFY_NAME(mark_global)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_mark_globalA(mt, parameter) (int)0\n#define __itt_mark_globalA_ptr 0\n#define __itt_mark_globalW(mt, parameter) (int)0\n#define __itt_mark_globalW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_mark_global(mt, parameter)  (int)0\n#define __itt_mark_global_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_mark_globalA_ptr 0\n#define __itt_mark_globalW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_mark_global_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Creates an \"end\" point for \"continuous\" mark with specified name.\n *\n * - Returns zero value in case of success, non-zero value otherwise.\n *   Also returns non-zero value when preceding \"begin\" point for the\n *   mark with the same name failed to be created or not created.\n * - The mark of \"continuous\" type is placed to collection results in\n *   case of success. It appears in overtime view(s) as a special tick\n *   sign (different from \"discrete\" mark) together with line from\n *   corresponding \"begin\" mark to \"end\" mark.\n * @note Continuous marks can overlap and be nested inside each other.\n * Discrete mark can be nested inside marked region\n * @param[in] mt - mark, created by __itt_mark_create(const char* name) function\n * @return Returns zero value in case of success, non-zero value otherwise.\n */\nint ITTAPI __itt_mark_off(__itt_mark_type mt);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUB(ITTAPI, int, mark_off, (__itt_mark_type mt))\n#define __itt_mark_off     ITTNOTIFY_DATA(mark_off)\n#define __itt_mark_off_ptr ITTNOTIFY_NAME(mark_off)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_mark_off(mt) (int)0\n#define __itt_mark_off_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_mark_off_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Use this if necessary to create an \"end\" point for mark of process\n * @see int __itt_mark_off(__itt_mark_type mt);\n */\nint ITTAPI __itt_mark_global_off(__itt_mark_type mt);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUB(ITTAPI, int, mark_global_off, (__itt_mark_type mt))\n#define __itt_mark_global_off     ITTNOTIFY_DATA(mark_global_off)\n#define __itt_mark_global_off_ptr ITTNOTIFY_NAME(mark_global_off)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_mark_global_off(mt) (int)0\n#define __itt_mark_global_off_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_mark_global_off_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} marks group */\n\n/**\n * @defgroup counters_internal Counters\n * @ingroup internal\n * Counters group\n * @{\n */\n\n\n/**\n * @defgroup stitch Stack Stitching\n * @ingroup internal\n * Stack Stitching group\n * @{\n */\n/**\n * @brief opaque structure for counter identification\n */\ntypedef struct ___itt_caller *__itt_caller;\n\n/**\n * @brief Create the stitch point e.g. a point in call stack where other stacks should be stitched to.\n * The function returns a unique identifier which is used to match the cut points with corresponding stitch points.\n */\n__itt_caller ITTAPI __itt_stack_caller_create(void);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUB(ITTAPI, __itt_caller, stack_caller_create, (void))\n#define __itt_stack_caller_create     ITTNOTIFY_DATA(stack_caller_create)\n#define __itt_stack_caller_create_ptr ITTNOTIFY_NAME(stack_caller_create)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_stack_caller_create() (__itt_caller)0\n#define __itt_stack_caller_create_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_stack_caller_create_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Destroy the information about stitch point identified by the pointer previously returned by __itt_stack_caller_create()\n */\nvoid ITTAPI __itt_stack_caller_destroy(__itt_caller id);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, stack_caller_destroy, (__itt_caller id))\n#define __itt_stack_caller_destroy     ITTNOTIFY_VOID(stack_caller_destroy)\n#define __itt_stack_caller_destroy_ptr ITTNOTIFY_NAME(stack_caller_destroy)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_stack_caller_destroy(id)\n#define __itt_stack_caller_destroy_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_stack_caller_destroy_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Sets the cut point. Stack from each event which occurs after this call will be cut\n * at the same stack level the function was called and stitched to the corresponding stitch point.\n */\nvoid ITTAPI __itt_stack_callee_enter(__itt_caller id);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, stack_callee_enter, (__itt_caller id))\n#define __itt_stack_callee_enter     ITTNOTIFY_VOID(stack_callee_enter)\n#define __itt_stack_callee_enter_ptr ITTNOTIFY_NAME(stack_callee_enter)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_stack_callee_enter(id)\n#define __itt_stack_callee_enter_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_stack_callee_enter_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief This function eliminates the cut point which was set by latest __itt_stack_callee_enter().\n */\nvoid ITTAPI __itt_stack_callee_leave(__itt_caller id);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, stack_callee_leave, (__itt_caller id))\n#define __itt_stack_callee_leave     ITTNOTIFY_VOID(stack_callee_leave)\n#define __itt_stack_callee_leave_ptr ITTNOTIFY_NAME(stack_callee_leave)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_stack_callee_leave(id)\n#define __itt_stack_callee_leave_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_stack_callee_leave_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/** @} stitch group */\n\n/* ***************************************************************************************************************************** */\n\n#include <stdarg.h>\n\n/** @cond exclude_from_documentation */\ntypedef enum __itt_error_code\n{\n    __itt_error_success       = 0, /*!< no error */\n    __itt_error_no_module     = 1, /*!< module can't be loaded */\n    /* %1$s -- library name; win: %2$d -- system error code; unix: %2$s -- system error message. */\n    __itt_error_no_symbol     = 2, /*!< symbol not found */\n    /* %1$s -- library name, %2$s -- symbol name. */\n    __itt_error_unknown_group = 3, /*!< unknown group specified */\n    /* %1$s -- env var name, %2$s -- group name. */\n    __itt_error_cant_read_env = 4, /*!< GetEnvironmentVariable() failed */\n    /* %1$s -- env var name, %2$d -- system error. */\n    __itt_error_env_too_long  = 5, /*!< variable value too long */\n    /* %1$s -- env var name, %2$d -- actual length of the var, %3$d -- max allowed length. */\n    __itt_error_system        = 6  /*!< pthread_mutexattr_init or pthread_mutex_init failed */\n    /* %1$s -- function name, %2$d -- errno. */\n} __itt_error_code;\n\ntypedef void (__itt_error_handler_t)(__itt_error_code code, va_list);\n__itt_error_handler_t* __itt_set_error_handler(__itt_error_handler_t*);\n\nconst char* ITTAPI __itt_api_version(void);\n/** @endcond */\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#define __itt_error_handler ITT_JOIN(INTEL_ITTNOTIFY_PREFIX, error_handler)\nvoid __itt_error_handler(__itt_error_code code, va_list args);\nextern const int ITTNOTIFY_NAME(err);\n#define __itt_err ITTNOTIFY_NAME(err)\nITT_STUB(ITTAPI, const char*, api_version, (void))\n#define __itt_api_version     ITTNOTIFY_DATA(api_version)\n#define __itt_api_version_ptr ITTNOTIFY_NAME(api_version)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_api_version()   (const char*)0\n#define __itt_api_version_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_api_version_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n#endif /* _ITTNOTIFY_PRIVATE_ */\n\n#endif /* INTEL_ITTNOTIFY_API_PRIVATE */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/tools_api/ittnotify_config.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _ITTNOTIFY_CONFIG_H_\n#define _ITTNOTIFY_CONFIG_H_\n\n/** @cond exclude_from_documentation */\n#ifndef ITT_OS_WIN\n#  define ITT_OS_WIN   1\n#endif /* ITT_OS_WIN */\n\n#ifndef ITT_OS_LINUX\n#  define ITT_OS_LINUX 2\n#endif /* ITT_OS_LINUX */\n\n#ifndef ITT_OS_MAC\n#  define ITT_OS_MAC   3\n#endif /* ITT_OS_MAC */\n\n#ifndef ITT_OS_FREEBSD\n#  define ITT_OS_FREEBSD   4\n#endif /* ITT_OS_FREEBSD */\n\n#ifndef ITT_OS_OPENBSD\n#  define ITT_OS_OPENBSD   5\n#endif /* ITT_OS_OPENBSD */\n\n#ifndef ITT_OS\n#  if defined WIN32 || defined _WIN32\n#    define ITT_OS ITT_OS_WIN\n#  elif defined( __APPLE__ ) && defined( __MACH__ )\n#    define ITT_OS ITT_OS_MAC\n#  elif defined( __FreeBSD__ )\n#    define ITT_OS ITT_OS_FREEBSD\n#  elif defined( __OpenBSD__ )\n#    define ITT_OS ITT_OS_OPENBSD\n#  else\n#    define ITT_OS ITT_OS_LINUX\n#  endif\n#endif /* ITT_OS */\n\n#ifndef ITT_PLATFORM_WIN\n#  define ITT_PLATFORM_WIN 1\n#endif /* ITT_PLATFORM_WIN */\n\n#ifndef ITT_PLATFORM_POSIX\n#  define ITT_PLATFORM_POSIX 2\n#endif /* ITT_PLATFORM_POSIX */\n\n#ifndef ITT_PLATFORM_MAC\n#  define ITT_PLATFORM_MAC 3\n#endif /* ITT_PLATFORM_MAC */\n\n#ifndef ITT_PLATFORM_FREEBSD\n#  define ITT_PLATFORM_FREEBSD 4\n#endif /* ITT_PLATFORM_FREEBSD */\n\n#ifndef ITT_PLATFORM_OPENBSD\n#  define ITT_PLATFORM_OPENBSD 5\n#endif /* ITT_PLATFORM_OPENBSD */\n\n#ifndef ITT_PLATFORM\n#  if ITT_OS==ITT_OS_WIN\n#    define ITT_PLATFORM ITT_PLATFORM_WIN\n#  elif ITT_OS==ITT_OS_MAC\n#    define ITT_PLATFORM ITT_PLATFORM_MAC\n#  elif ITT_OS==ITT_OS_FREEBSD\n#    define ITT_PLATFORM ITT_PLATFORM_FREEBSD\n#  elif ITT_OS==ITT_OS_OPENBSD\n#    define ITT_PLATFORM ITT_PLATFORM_OPENBSD\n#  else\n#    define ITT_PLATFORM ITT_PLATFORM_POSIX\n#  endif\n#endif /* ITT_PLATFORM */\n\n#if defined(_UNICODE) && !defined(UNICODE)\n#define UNICODE\n#endif\n\n#include <stddef.h>\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#include <tchar.h>\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#include <stdint.h>\n#if defined(UNICODE) || defined(_UNICODE)\n#include <wchar.h>\n#endif /* UNICODE || _UNICODE */\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n#ifndef ITTAPI_CDECL\n#  if ITT_PLATFORM==ITT_PLATFORM_WIN\n#    define ITTAPI_CDECL __cdecl\n#  else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#    if defined _M_IX86 || defined __i386__\n#      define ITTAPI_CDECL __attribute__ ((cdecl))\n#    else  /* _M_IX86 || __i386__ */\n#      define ITTAPI_CDECL /* actual only on x86 platform */\n#    endif /* _M_IX86 || __i386__ */\n#  endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* ITTAPI_CDECL */\n\n#ifndef STDCALL\n#  if ITT_PLATFORM==ITT_PLATFORM_WIN\n#    define STDCALL __stdcall\n#  else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#    if defined _M_IX86 || defined __i386__\n#      define STDCALL __attribute__ ((stdcall))\n#    else  /* _M_IX86 || __i386__ */\n#      define STDCALL /* supported only on x86 platform */\n#    endif /* _M_IX86 || __i386__ */\n#  endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* STDCALL */\n\n#define ITTAPI    ITTAPI_CDECL\n#define LIBITTAPI ITTAPI_CDECL\n\n/* TODO: Temporary for compatibility! */\n#define ITTAPI_CALL    ITTAPI_CDECL\n#define LIBITTAPI_CALL ITTAPI_CDECL\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n/* use __forceinline (VC++ specific) */\n#if defined(__MINGW32__) && !defined(__cplusplus)\n#define ITT_INLINE           static __inline__ __attribute__((__always_inline__,__gnu_inline__))\n#else\n#define ITT_INLINE           static __forceinline\n#endif /* __MINGW32__ */\n\n#define ITT_INLINE_ATTRIBUTE /* nothing */\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n/*\n * Generally, functions are not inlined unless optimization is specified.\n * For functions declared inline, this attribute inlines the function even\n * if no optimization level was specified.\n */\n#ifdef __STRICT_ANSI__\n#define ITT_INLINE           static\n#define ITT_INLINE_ATTRIBUTE __attribute__((unused))\n#else  /* __STRICT_ANSI__ */\n#define ITT_INLINE           static inline\n#define ITT_INLINE_ATTRIBUTE __attribute__((always_inline, unused))\n#endif /* __STRICT_ANSI__ */\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n/** @endcond */\n\n#ifndef ITT_ARCH_IA32\n#  define ITT_ARCH_IA32  1\n#endif /* ITT_ARCH_IA32 */\n\n#ifndef ITT_ARCH_IA32E\n#  define ITT_ARCH_IA32E 2\n#endif /* ITT_ARCH_IA32E */\n\n#ifndef ITT_ARCH_IA64\n#  define ITT_ARCH_IA64 3\n#endif /* ITT_ARCH_IA64 */\n\n#ifndef ITT_ARCH_ARM\n#  define ITT_ARCH_ARM  4\n#endif /* ITT_ARCH_ARM */\n\n#ifndef ITT_ARCH_PPC64\n#  define ITT_ARCH_PPC64  5\n#endif /* ITT_ARCH_PPC64 */\n\n#ifndef ITT_ARCH_ARM64\n#  define ITT_ARCH_ARM64  6\n#endif /* ITT_ARCH_ARM64 */\n\n#ifndef ITT_ARCH_LOONGARCH64\n#  define ITT_ARCH_LOONGARCH64  7\n#endif /* ITT_ARCH_LOONGARCH64 */\n\n#ifndef ITT_ARCH_S390X\n#  define ITT_ARCH_S390X  8\n#endif /* ITT_ARCH_S390X */\n\n#ifndef ITT_ARCH_HPPA\n#  define ITT_ARCH_HPPA  9\n#endif /* ITT_ARCH_HPPA */\n\n#ifndef ITT_ARCH_RISCV64\n#  define ITT_ARCH_RISCV64  10\n#endif /* ITT_ARCH_RISCV64 */\n\n#ifndef ITT_ARCH\n#  if defined _M_IX86 || defined __i386__\n#    define ITT_ARCH ITT_ARCH_IA32\n#  elif defined _M_X64 || defined _M_AMD64 || defined __x86_64__\n#    define ITT_ARCH ITT_ARCH_IA32E\n#  elif defined _M_IA64 || defined __ia64__\n#    define ITT_ARCH ITT_ARCH_IA64\n#  elif defined _M_ARM || defined __arm__\n#    define ITT_ARCH ITT_ARCH_ARM\n#  elif defined __aarch64__\n#    define ITT_ARCH ITT_ARCH_ARM64\n#  elif defined __powerpc64__\n#    define ITT_ARCH ITT_ARCH_PPC64\n#  elif defined __loongarch__\n#    define ITT_ARCH ITT_ARCH_LOONGARCH64\n#  elif defined __s390__ || defined __s390x__\n#    define ITT_ARCH ITT_ARCH_S390X\n#  elif defined __hppa__\n#    define ITT_ARCH ITT_ARCH_HPPA\n#  elif defined __riscv && __riscv_xlen == 64\n#    define ITT_ARCH ITT_ARCH_RISCV64\n#  endif\n\n#endif\n\n#ifdef __cplusplus\n#  define ITT_EXTERN_C extern \"C\"\n#  define ITT_EXTERN_C_BEGIN extern \"C\" {\n#  define ITT_EXTERN_C_END }\n#else\n#  define ITT_EXTERN_C /* nothing */\n#  define ITT_EXTERN_C_BEGIN /* nothing */\n#  define ITT_EXTERN_C_END /* nothing */\n#endif /* __cplusplus */\n\n#define ITT_TO_STR_AUX(x) #x\n#define ITT_TO_STR(x)     ITT_TO_STR_AUX(x)\n\n#define __ITT_BUILD_ASSERT(expr, suffix) do { \\\n    static char __itt_build_check_##suffix[(expr) ? 1 : -1]; \\\n    __itt_build_check_##suffix[0] = 0; \\\n} while(0)\n#define _ITT_BUILD_ASSERT(expr, suffix)  __ITT_BUILD_ASSERT((expr), suffix)\n#define ITT_BUILD_ASSERT(expr)           _ITT_BUILD_ASSERT((expr), __LINE__)\n\n#define ITT_MAGIC { 0xED, 0xAB, 0xAB, 0xEC, 0x0D, 0xEE, 0xDA, 0x30 }\n\n/* Replace with snapshot date YYYYMMDD for promotion build. */\n#define API_VERSION_BUILD    20230630\n\n#ifndef API_VERSION_NUM\n#define API_VERSION_NUM 3.24.4\n#endif /* API_VERSION_NUM */\n\n#define API_VERSION \"ITT-API-Version \" ITT_TO_STR(API_VERSION_NUM) \\\n                                \" (\" ITT_TO_STR(API_VERSION_BUILD) \")\"\n\n/* OS communication functions */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#include <windows.h>\ntypedef HMODULE           lib_t;\ntypedef DWORD             TIDT;\ntypedef CRITICAL_SECTION  mutex_t;\n#ifdef __cplusplus\n#define MUTEX_INITIALIZER {}\n#else\n#define MUTEX_INITIALIZER { 0 }\n#endif\n#define strong_alias(name, aliasname) /* empty for Windows */\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#include <dlfcn.h>\n#if defined(UNICODE) || defined(_UNICODE)\n#include <wchar.h>\n#endif /* UNICODE */\n#ifndef _GNU_SOURCE\n#define _GNU_SOURCE 1 /* need for PTHREAD_MUTEX_RECURSIVE */\n#endif /* _GNU_SOURCE */\n#ifndef __USE_UNIX98\n#define __USE_UNIX98 1 /* need for PTHREAD_MUTEX_RECURSIVE, on SLES11.1 with gcc 4.3.4 wherein pthread.h missing dependency on __USE_XOPEN2K8 */\n#endif /*__USE_UNIX98*/\n#include <pthread.h>\ntypedef void*             lib_t;\ntypedef pthread_t         TIDT;\ntypedef pthread_mutex_t   mutex_t;\n#define MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER\n#define _strong_alias(name, aliasname) \\\n            extern __typeof (name) aliasname __attribute__ ((alias (#name)));\n#define strong_alias(name, aliasname) _strong_alias(name, aliasname)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_get_proc(lib, name) GetProcAddress(lib, name)\n#define __itt_mutex_init(mutex)   InitializeCriticalSection(mutex)\n#define __itt_mutex_lock(mutex)   EnterCriticalSection(mutex)\n#define __itt_mutex_unlock(mutex) LeaveCriticalSection(mutex)\n#define __itt_mutex_destroy(mutex) DeleteCriticalSection(mutex)\n#define __itt_load_lib(name)      LoadLibraryA(name)\n#define __itt_unload_lib(handle)  FreeLibrary(handle)\n#define __itt_system_error()      (int)GetLastError()\n#define __itt_fstrcmp(s1, s2)     lstrcmpA(s1, s2)\n#define __itt_fstrnlen(s, l)      strnlen_s(s, l)\n#define __itt_fstrcpyn(s1, b, s2, l) strncpy_s(s1, b, s2, l)\n#define __itt_thread_id()         GetCurrentThreadId()\n#define __itt_thread_yield()      SwitchToThread()\n#ifndef ITT_SIMPLE_INIT\nITT_INLINE long\n__itt_interlocked_increment(volatile long* ptr) ITT_INLINE_ATTRIBUTE;\nITT_INLINE long __itt_interlocked_increment(volatile long* ptr)\n{\n    return InterlockedIncrement(ptr);\n}\nITT_INLINE long\n__itt_interlocked_compare_exchange(volatile long* ptr, long exchange, long comperand) ITT_INLINE_ATTRIBUTE;\nITT_INLINE long\n__itt_interlocked_compare_exchange(volatile long* ptr, long exchange, long comperand)\n{\n    return InterlockedCompareExchange(ptr, exchange, comperand);\n}\n#endif /* ITT_SIMPLE_INIT */\n\n#define DL_SYMBOLS (1)\n#define PTHREAD_SYMBOLS (1)\n\n#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\n#define __itt_get_proc(lib, name) dlsym(lib, name)\n#define __itt_mutex_init(mutex)   {\\\n    pthread_mutexattr_t mutex_attr;                                         \\\n    int error_code = pthread_mutexattr_init(&mutex_attr);                   \\\n    if (error_code)                                                         \\\n        __itt_report_error(__itt_error_system, \"pthread_mutexattr_init\",    \\\n                           error_code);                                     \\\n    error_code = pthread_mutexattr_settype(&mutex_attr,                     \\\n                                           PTHREAD_MUTEX_RECURSIVE);        \\\n    if (error_code)                                                         \\\n        __itt_report_error(__itt_error_system, \"pthread_mutexattr_settype\", \\\n                           error_code);                                     \\\n    error_code = pthread_mutex_init(mutex, &mutex_attr);                    \\\n    if (error_code)                                                         \\\n        __itt_report_error(__itt_error_system, \"pthread_mutex_init\",        \\\n                           error_code);                                     \\\n    error_code = pthread_mutexattr_destroy(&mutex_attr);                    \\\n    if (error_code)                                                         \\\n        __itt_report_error(__itt_error_system, \"pthread_mutexattr_destroy\", \\\n                           error_code);                                     \\\n}\n#define __itt_mutex_lock(mutex)   pthread_mutex_lock(mutex)\n#define __itt_mutex_unlock(mutex) pthread_mutex_unlock(mutex)\n#define __itt_mutex_destroy(mutex) pthread_mutex_destroy(mutex)\n#define __itt_load_lib(name)      dlopen(name, RTLD_LAZY)\n#define __itt_unload_lib(handle)  dlclose(handle)\n#define __itt_system_error()      errno\n#define __itt_fstrcmp(s1, s2)     strcmp(s1, s2)\n\n/* makes customer code define safe APIs for SDL_STRNLEN_S and SDL_STRNCPY_S */\n#ifdef SDL_STRNLEN_S\n#define __itt_fstrnlen(s, l)      SDL_STRNLEN_S(s, l)\n#else\n#define __itt_fstrnlen(s, l)      strlen(s)\n#endif /* SDL_STRNLEN_S */\n#ifdef SDL_STRNCPY_S\n#define __itt_fstrcpyn(s1, b, s2, l) SDL_STRNCPY_S(s1, b, s2, l)\n#else\n#define __itt_fstrcpyn(s1, b, s2, l) {                                      \\\n    if (b > 0) {                                                            \\\n        /* 'volatile' is used to suppress the warning that a destination */ \\\n        /*  bound depends on the length of the source.                   */ \\\n        volatile size_t num_to_copy = (size_t)(b - 1) < (size_t)(l) ?       \\\n                (size_t)(b - 1) : (size_t)(l);                              \\\n        strncpy(s1, s2, num_to_copy);                                       \\\n        s1[num_to_copy] = 0;                                                \\\n    }                                                                       \\\n}\n#endif /* SDL_STRNCPY_S */\n\n#define __itt_thread_id()         pthread_self()\n#define __itt_thread_yield()      sched_yield()\n#if ITT_ARCH==ITT_ARCH_IA64\n#ifdef __INTEL_COMPILER\n#define __TBB_machine_fetchadd4(addr, val) __fetchadd4_acq((void *)addr, val)\n#else  /* __INTEL_COMPILER */\n#define __TBB_machine_fetchadd4(addr, val) __sync_fetch_and_add(addr, val)\n#endif /* __INTEL_COMPILER */\n#elif ITT_ARCH==ITT_ARCH_IA32 || ITT_ARCH==ITT_ARCH_IA32E /* ITT_ARCH!=ITT_ARCH_IA64 */\nITT_INLINE long\n__TBB_machine_fetchadd4(volatile void* ptr, long addend) ITT_INLINE_ATTRIBUTE;\nITT_INLINE long __TBB_machine_fetchadd4(volatile void* ptr, long addend)\n{\n    long result;\n    __asm__ __volatile__(\"lock\\nxadd %0,%1\"\n                          : \"=r\"(result),\"=m\"(*(volatile int*)ptr)\n                          : \"0\"(addend), \"m\"(*(volatile int*)ptr)\n                          : \"memory\");\n    return result;\n}\n#else\n#define __TBB_machine_fetchadd4(addr, val) __sync_fetch_and_add(addr, val)\n#endif /* ITT_ARCH==ITT_ARCH_IA64 */\n#ifndef ITT_SIMPLE_INIT\nITT_INLINE long\n__itt_interlocked_increment(volatile long* ptr) ITT_INLINE_ATTRIBUTE;\nITT_INLINE long __itt_interlocked_increment(volatile long* ptr)\n{\n    return __TBB_machine_fetchadd4(ptr, 1) + 1L;\n}\nITT_INLINE long\n__itt_interlocked_compare_exchange(volatile long* ptr, long exchange, long comperand) ITT_INLINE_ATTRIBUTE;\nITT_INLINE long\n__itt_interlocked_compare_exchange(volatile long* ptr, long exchange, long comperand)\n{\n    return __sync_val_compare_and_swap(ptr, exchange, comperand);\n}\n#endif /* ITT_SIMPLE_INIT */\n\nvoid* dlopen(const char*, int) __attribute__((weak));\nvoid* dlsym(void*, const char*) __attribute__((weak));\nint dlclose(void*) __attribute__((weak));\n#define DL_SYMBOLS (dlopen && dlsym && dlclose)\n\nint pthread_mutex_init(pthread_mutex_t*, const pthread_mutexattr_t*) __attribute__((weak));\nint pthread_mutex_lock(pthread_mutex_t*) __attribute__((weak));\nint pthread_mutex_unlock(pthread_mutex_t*) __attribute__((weak));\nint pthread_mutex_destroy(pthread_mutex_t*) __attribute__((weak));\nint pthread_mutexattr_init(pthread_mutexattr_t*) __attribute__((weak));\nint pthread_mutexattr_settype(pthread_mutexattr_t*, int) __attribute__((weak));\nint pthread_mutexattr_destroy(pthread_mutexattr_t*) __attribute__((weak));\npthread_t pthread_self(void) __attribute__((weak));\n#define PTHREAD_SYMBOLS (pthread_mutex_init && pthread_mutex_lock && pthread_mutex_unlock && pthread_mutex_destroy && pthread_mutexattr_init && pthread_mutexattr_settype && pthread_mutexattr_destroy && pthread_self)\n\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/* strdup() is not included into C99 which results in a compiler warning about\n * implicitly declared symbol. To avoid the issue strdup is implemented\n * manually.\n */\n#define ITT_STRDUP_MAX_STRING_SIZE 4096\n#define __itt_fstrdup(s, new_s) do {                                        \\\n    if (s != NULL) {                                                        \\\n        size_t s_len = __itt_fstrnlen(s, ITT_STRDUP_MAX_STRING_SIZE);       \\\n        new_s = (char *)malloc(s_len + 1);                                  \\\n        if (new_s != NULL) {                                                \\\n            __itt_fstrcpyn(new_s, s_len + 1, s, s_len);                     \\\n        }                                                                   \\\n    }                                                                       \\\n} while(0)\n\ntypedef enum {\n    __itt_thread_normal  = 0,\n    __itt_thread_ignored = 1\n} __itt_thread_state;\n\n#pragma pack(push, 8)\n\ntypedef struct ___itt_thread_info\n{\n    const char* nameA; /*!< Copy of original name in ASCII. */\n#if defined(UNICODE) || defined(_UNICODE)\n    const wchar_t* nameW; /*!< Copy of original name in UNICODE. */\n#else  /* UNICODE || _UNICODE */\n    void* nameW;\n#endif /* UNICODE || _UNICODE */\n    TIDT               tid;\n    __itt_thread_state state;   /*!< Thread state (paused or normal) */\n    int                extra1;  /*!< Reserved to the runtime */\n    void*              extra2;  /*!< Reserved to the runtime */\n    struct ___itt_thread_info* next;\n} __itt_thread_info;\n\n#include \"ittnotify_types.h\" /* For __itt_group_id definition */\n\ntypedef struct ___itt_api_info_20101001\n{\n    const char*    name;\n    void**         func_ptr;\n    void*          init_func;\n    __itt_group_id group;\n}  __itt_api_info_20101001;\n\ntypedef struct ___itt_api_info\n{\n    const char*    name;\n    void**         func_ptr;\n    void*          init_func;\n    void*          null_func;\n    __itt_group_id group;\n}  __itt_api_info;\n\ntypedef struct __itt_counter_info\n{\n    const char* nameA;  /*!< Copy of original name in ASCII. */\n#if defined(UNICODE) || defined(_UNICODE)\n    const wchar_t* nameW; /*!< Copy of original name in UNICODE. */\n#else  /* UNICODE || _UNICODE */\n    void* nameW;\n#endif /* UNICODE || _UNICODE */\n    const char* domainA;  /*!< Copy of original name in ASCII. */\n#if defined(UNICODE) || defined(_UNICODE)\n    const wchar_t* domainW; /*!< Copy of original name in UNICODE. */\n#else  /* UNICODE || _UNICODE */\n    void* domainW;\n#endif /* UNICODE || _UNICODE */\n    int type;\n    long index;\n    int   extra1; /*!< Reserved to the runtime */\n    void* extra2; /*!< Reserved to the runtime */\n    struct __itt_counter_info* next;\n}  __itt_counter_info_t;\n\nstruct ___itt_domain;\nstruct ___itt_string_handle;\nstruct ___itt_histogram;\nstruct ___itt_counter_metadata;\n\n#include \"ittnotify.h\"\n\ntypedef struct ___itt_global\n{\n    unsigned char          magic[8];\n    unsigned long          version_major;\n    unsigned long          version_minor;\n    unsigned long          version_build;\n    volatile long          api_initialized;\n    volatile long          mutex_initialized;\n    volatile long          atomic_counter;\n    mutex_t                mutex;\n    lib_t                  lib;\n    void*                  error_handler;\n    const char**           dll_path_ptr;\n    __itt_api_info*        api_list_ptr;\n    struct ___itt_global*  next;\n    /* Joinable structures below */\n    __itt_thread_info*     thread_list;\n    struct ___itt_domain*  domain_list;\n    struct ___itt_string_handle* string_list;\n    __itt_collection_state state;\n    __itt_counter_info_t*  counter_list;\n    unsigned int           ipt_collect_events;\n    struct ___itt_histogram* histogram_list;\n    struct ___itt_counter_metadata* counter_metadata_list;\n} __itt_global;\n\n#pragma pack(pop)\n\n#define NEW_THREAD_INFO_W(gptr,h,h_tail,t,s,n) { \\\n    h = (__itt_thread_info*)malloc(sizeof(__itt_thread_info)); \\\n    if (h != NULL) { \\\n        h->tid    = t; \\\n        h->nameA  = NULL; \\\n        h->nameW  = n ? _wcsdup(n) : NULL; \\\n        h->state  = s; \\\n        h->extra1 = 0;    /* reserved */ \\\n        h->extra2 = NULL; /* reserved */ \\\n        h->next   = NULL; \\\n        if (h_tail == NULL) \\\n            (gptr)->thread_list = h; \\\n        else \\\n            h_tail->next = h; \\\n    } \\\n}\n\n#define NEW_THREAD_INFO_A(gptr,h,h_tail,t,s,n) { \\\n    h = (__itt_thread_info*)malloc(sizeof(__itt_thread_info)); \\\n    if (h != NULL) { \\\n        h->tid    = t; \\\n        char *n_copy = NULL; \\\n        __itt_fstrdup(n, n_copy); \\\n        h->nameA  = n_copy; \\\n        h->nameW  = NULL; \\\n        h->state  = s; \\\n        h->extra1 = 0;    /* reserved */ \\\n        h->extra2 = NULL; /* reserved */ \\\n        h->next   = NULL; \\\n        if (h_tail == NULL) \\\n            (gptr)->thread_list = h; \\\n        else \\\n            h_tail->next = h; \\\n    } \\\n}\n\n#define NEW_DOMAIN_W(gptr,h,h_tail,name) { \\\n    h = (__itt_domain*)malloc(sizeof(__itt_domain)); \\\n    if (h != NULL) { \\\n        h->flags  = 1;    /* domain is enabled by default */ \\\n        h->nameA  = NULL; \\\n        h->nameW  = name ? _wcsdup(name) : NULL; \\\n        h->extra1 = 0;    /* reserved */ \\\n        h->extra2 = NULL; /* reserved */ \\\n        h->next   = NULL; \\\n        if (h_tail == NULL) \\\n            (gptr)->domain_list = h; \\\n        else \\\n            h_tail->next = h; \\\n    } \\\n}\n\n#define NEW_DOMAIN_A(gptr,h,h_tail,name) { \\\n    h = (__itt_domain*)malloc(sizeof(__itt_domain)); \\\n    if (h != NULL) { \\\n        h->flags  = 1;    /* domain is enabled by default */ \\\n        char *name_copy = NULL; \\\n        __itt_fstrdup(name, name_copy); \\\n        h->nameA  = name_copy; \\\n        h->nameW  = NULL; \\\n        h->extra1 = 0;    /* reserved */ \\\n        h->extra2 = NULL; /* reserved */ \\\n        h->next   = NULL; \\\n        if (h_tail == NULL) \\\n            (gptr)->domain_list = h; \\\n        else \\\n            h_tail->next = h; \\\n    } \\\n}\n\n#define NEW_STRING_HANDLE_W(gptr,h,h_tail,name) { \\\n    h = (__itt_string_handle*)malloc(sizeof(__itt_string_handle)); \\\n    if (h != NULL) { \\\n        h->strA   = NULL; \\\n        h->strW   = name ? _wcsdup(name) : NULL; \\\n        h->extra1 = 0;    /* reserved */ \\\n        h->extra2 = NULL; /* reserved */ \\\n        h->next   = NULL; \\\n        if (h_tail == NULL) \\\n            (gptr)->string_list = h; \\\n        else \\\n            h_tail->next = h; \\\n    } \\\n}\n\n#define NEW_STRING_HANDLE_A(gptr,h,h_tail,name) { \\\n    h = (__itt_string_handle*)malloc(sizeof(__itt_string_handle)); \\\n    if (h != NULL) { \\\n        char *name_copy = NULL; \\\n        __itt_fstrdup(name, name_copy); \\\n        h->strA  = name_copy; \\\n        h->strW   = NULL; \\\n        h->extra1 = 0;    /* reserved */ \\\n        h->extra2 = NULL; /* reserved */ \\\n        h->next   = NULL; \\\n        if (h_tail == NULL) \\\n            (gptr)->string_list = h; \\\n        else \\\n            h_tail->next = h; \\\n    } \\\n}\n\n#define NEW_COUNTER_W(gptr,h,h_tail,name,domain,type) { \\\n    h = (__itt_counter_info_t*)malloc(sizeof(__itt_counter_info_t)); \\\n    if (h != NULL) { \\\n        h->nameA   = NULL; \\\n        h->nameW   = name ? _wcsdup(name) : NULL; \\\n        h->domainA   = NULL; \\\n        h->domainW   = domain ? _wcsdup(domain) : NULL; \\\n        h->type = type; \\\n        h->index = 0; \\\n        h->next   = NULL; \\\n        if (h_tail == NULL) \\\n            (gptr)->counter_list = h; \\\n        else \\\n            h_tail->next = h; \\\n    } \\\n}\n\n#define NEW_COUNTER_A(gptr,h,h_tail,name,domain,type) { \\\n    h = (__itt_counter_info_t*)malloc(sizeof(__itt_counter_info_t)); \\\n    if (h != NULL) { \\\n        char *name_copy = NULL; \\\n        __itt_fstrdup(name, name_copy); \\\n        h->nameA  = name_copy; \\\n        h->nameW   = NULL; \\\n        char *domain_copy = NULL; \\\n        __itt_fstrdup(domain, domain_copy); \\\n        h->domainA  = domain_copy; \\\n        h->domainW   = NULL; \\\n        h->type = type; \\\n        h->index = 0; \\\n        h->next   = NULL; \\\n        if (h_tail == NULL) \\\n            (gptr)->counter_list = h; \\\n        else \\\n            h_tail->next = h; \\\n    } \\\n}\n\n#define NEW_HISTOGRAM_W(gptr,h,h_tail,domain,name,x_type,y_type) { \\\n    h = (__itt_histogram*)malloc(sizeof(__itt_histogram)); \\\n    if (h != NULL) { \\\n        h->domain = domain; \\\n        h->nameA  = NULL; \\\n        h->nameW  = name ? _wcsdup(name) : NULL; \\\n        h->x_type = x_type; \\\n        h->y_type = y_type; \\\n        h->extra1 = 0; \\\n        h->extra2 = NULL; \\\n\th->next = NULL; \\\n        if (h_tail == NULL) \\\n            (gptr)->histogram_list = h; \\\n        else \\\n            h_tail->next = h; \\\n    } \\\n}\n\n#define NEW_HISTOGRAM_A(gptr,h,h_tail,domain,name,x_type,y_type) { \\\n    h = (__itt_histogram*)malloc(sizeof(__itt_histogram)); \\\n    if (h != NULL) { \\\n        h->domain = domain; \\\n        char *name_copy = NULL; \\\n        __itt_fstrdup(name, name_copy); \\\n        h->nameA  = name_copy; \\\n        h->nameW  = NULL; \\\n        h->x_type = x_type; \\\n        h->y_type = y_type; \\\n        h->extra1 = 0; \\\n        h->extra2 = NULL; \\\n\th->next = NULL; \\\n        if (h_tail == NULL) \\\n            (gptr)->histogram_list = h; \\\n        else \\\n            h_tail->next = h; \\\n    } \\\n}\n\n#define NEW_COUNTER_METADATA_NUM(gptr,h,h_tail,counter,type,value) { \\\n    h = (__itt_counter_metadata*)malloc(sizeof(__itt_counter_metadata)); \\\n    if (h != NULL) { \\\n        h->counter = counter; \\\n        h->type = type; \\\n        h->str_valueA = NULL; \\\n        h->str_valueW = NULL; \\\n        h->value = value; \\\n        h->extra1 = 0; \\\n        h->extra2 = NULL; \\\n        h->next   = NULL; \\\n        if (h_tail == NULL) \\\n            (gptr)->counter_metadata_list = h; \\\n        else \\\n            h_tail->next = h; \\\n    } \\\n}\n\n#define NEW_COUNTER_METADATA_STR_A(gptr,h,h_tail,counter,type,str_valueA) { \\\n    h = (__itt_counter_metadata*)malloc(sizeof(__itt_counter_metadata)); \\\n    if (h != NULL) { \\\n        h->counter = counter; \\\n        h->type = type; \\\n        char *str_value_copy = NULL; \\\n        __itt_fstrdup(str_valueA, str_value_copy); \\\n        h->str_valueA = str_value_copy; \\\n        h->str_valueW = NULL; \\\n        h->value = 0; \\\n        h->extra1 = 0; \\\n        h->extra2 = NULL; \\\n        h->next   = NULL; \\\n        if (h_tail == NULL) \\\n            (gptr)->counter_metadata_list = h; \\\n        else \\\n            h_tail->next = h; \\\n    } \\\n}\n\n#define NEW_COUNTER_METADATA_STR_W(gptr,h,h_tail,counter,type,str_valueW) { \\\n    h = (__itt_counter_metadata*)malloc(sizeof(__itt_counter_metadata)); \\\n    if (h != NULL) { \\\n        h->counter = counter; \\\n        h->type = type; \\\n        h->str_valueA = NULL; \\\n        h->str_valueW = str_valueW ? _wcsdup(str_valueW) : NULL; \\\n        h->value = 0; \\\n        h->extra1 = 0; \\\n        h->extra2 = NULL; \\\n        h->next   = NULL; \\\n        if (h_tail == NULL) \\\n            (gptr)->counter_metadata_list = h; \\\n        else \\\n            h_tail->next = h; \\\n    } \\\n}\n\n#endif /* _ITTNOTIFY_CONFIG_H_ */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/tools_api/ittnotify_static.c",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#define INTEL_NO_MACRO_BODY\n#define INTEL_ITTNOTIFY_API_PRIVATE\n#include \"ittnotify_config.h\"\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#if !defined(PATH_MAX)\n#define PATH_MAX 512\n#endif\n#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\n#include <limits.h>\n#include <dlfcn.h>\n#include <errno.h>\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdarg.h>\n#include <string.h>\n\n#include \"ittnotify.h\"\n#include \"legacy/ittnotify.h\"\n\n#include \"disable_warnings.h\"\n\nstatic const char api_version[] = API_VERSION \"\\0\\n@(#) $Revision$\\n\";\n\n#define _N_(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n)\n\n#ifndef HAS_CPP_ATTR\n#if defined(__cplusplus) && defined(__has_cpp_attribute)\n#define HAS_CPP_ATTR(X) __has_cpp_attribute(X)\n#else\n#define HAS_CPP_ATTR(X) 0\n#endif\n#endif\n\n#ifndef HAS_C_ATTR\n#if defined(__STDC__) && defined(__has_c_attribute)\n#define HAS_C_ATTR(X) __has_c_attribute(X)\n#else\n#define HAS_C_ATTR(X) 0\n#endif\n#endif\n\n#ifndef HAS_GNU_ATTR\n#if defined(__has_attribute)\n#define HAS_GNU_ATTR(X) __has_attribute(X)\n#else\n#define HAS_GNU_ATTR(X) 0\n#endif\n#endif\n\n#ifndef ITT_ATTRIBUTE_FALLTHROUGH\n#if (HAS_CPP_ATTR(fallthrough) || HAS_C_ATTR(fallthrough)) && (__cplusplus >= 201703L || _MSVC_LANG >= 201703L)\n#define ITT_ATTRIBUTE_FALLTHROUGH [[fallthrough]]\n#elif HAS_CPP_ATTR(gnu::fallthrough)\n#define ITT_ATTRIBUTE_FALLTHROUGH [[gnu::fallthrough]]\n#elif HAS_CPP_ATTR(clang::fallthrough)\n#define ITT_ATTRIBUTE_FALLTHROUGH [[clang::fallthrough]]\n#elif HAS_GNU_ATTR(fallthrough) && !__INTEL_COMPILER\n#define ITT_ATTRIBUTE_FALLTHROUGH __attribute__((fallthrough))\n#else\n#define ITT_ATTRIBUTE_FALLTHROUGH\n#endif\n#endif\n\n#if ITT_OS==ITT_OS_WIN\nstatic const char* ittnotify_lib_name = \"libittnotify.dll\";\n#elif ITT_OS==ITT_OS_LINUX || ITT_OS==ITT_OS_FREEBSD|| ITT_OS==ITT_OS_OPENBSD\nstatic const char* ittnotify_lib_name = \"libittnotify.so\";\n#elif ITT_OS==ITT_OS_MAC\nstatic const char* ittnotify_lib_name = \"libittnotify.dylib\";\n#else\n#error Unsupported or unknown OS.\n#endif\n\n#ifdef __ANDROID__\n#include <android/log.h>\n#include <stdio.h>\n#include <unistd.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <fcntl.h>\n#include <linux/limits.h>\n\n#ifdef ITT_ANDROID_LOG\n    #define ITT_ANDROID_LOG_TAG   \"INTEL_VTUNE_USERAPI\"\n    #define ITT_ANDROID_LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, ITT_ANDROID_LOG_TAG, __VA_ARGS__))\n    #define ITT_ANDROID_LOGW(...) ((void)__android_log_print(ANDROID_LOG_WARN, ITT_ANDROID_LOG_TAG, __VA_ARGS__))\n    #define ITT_ANDROID_LOGE(...) ((void)__android_log_print(ANDROID_LOG_ERROR,ITT_ANDROID_LOG_TAG, __VA_ARGS__))\n    #define ITT_ANDROID_LOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG,ITT_ANDROID_LOG_TAG, __VA_ARGS__))\n#else\n    #define ITT_ANDROID_LOGI(...)\n    #define ITT_ANDROID_LOGW(...)\n    #define ITT_ANDROID_LOGE(...)\n    #define ITT_ANDROID_LOGD(...)\n#endif\n\n/* default location of userapi collector on Android */\n#define ANDROID_ITTNOTIFY_DEFAULT_PATH_MASK(x)  \"/data/data/com.intel.vtune/perfrun/lib\" \\\n                                                #x \"/runtime/libittnotify.so\"\n\n#if ITT_ARCH==ITT_ARCH_IA32 || ITT_ARCH==ITT_ARCH_ARM\n#define ANDROID_ITTNOTIFY_DEFAULT_PATH  ANDROID_ITTNOTIFY_DEFAULT_PATH_MASK(32)\n#else\n#define ANDROID_ITTNOTIFY_DEFAULT_PATH  ANDROID_ITTNOTIFY_DEFAULT_PATH_MASK(64)\n#endif\n\n#endif\n\n\n#ifndef LIB_VAR_NAME\n#if ITT_ARCH==ITT_ARCH_IA32 || ITT_ARCH==ITT_ARCH_ARM\n#define LIB_VAR_NAME INTEL_LIBITTNOTIFY32\n#else\n#define LIB_VAR_NAME INTEL_LIBITTNOTIFY64\n#endif\n#endif /* LIB_VAR_NAME */\n\n#define ITT_MUTEX_INIT_AND_LOCK(p) {                                 \\\n    if (PTHREAD_SYMBOLS)                                             \\\n    {                                                                \\\n        if (!p.mutex_initialized)                                    \\\n        {                                                            \\\n            if (__itt_interlocked_compare_exchange(&p.atomic_counter, 1, 0) == 0) \\\n            {                                                        \\\n                __itt_mutex_init(&p.mutex);                          \\\n                p.mutex_initialized = 1;                             \\\n            }                                                        \\\n            else                                                     \\\n                while (!p.mutex_initialized)                         \\\n                    __itt_thread_yield();                            \\\n        }                                                            \\\n        __itt_mutex_lock(&p.mutex);                                  \\\n    }                                                                \\\n}\n\n#define ITT_MUTEX_DESTROY(p) {                                       \\\n    if (PTHREAD_SYMBOLS)                                             \\\n    {                                                                \\\n        if (p.mutex_initialized)                                     \\\n        {                                                            \\\n            if (__itt_interlocked_compare_exchange(&p.atomic_counter, 0, 1) == 1) \\\n            {                                                        \\\n                __itt_mutex_destroy(&p.mutex);                       \\\n                p.mutex_initialized = 0;                             \\\n            }                                                        \\\n        }                                                            \\\n    }                                                                \\\n}\n\n#define ITT_MODULE_OBJECT_VERSION 1\n\ntypedef int (__itt_init_ittlib_t)(const char*, __itt_group_id);\n\n/* this define used to control initialization function name. */\n#ifndef __itt_init_ittlib_name\nITT_EXTERN_C int _N_(init_ittlib)(const char*, __itt_group_id);\nstatic __itt_init_ittlib_t* __itt_init_ittlib_ptr = _N_(init_ittlib);\n#define __itt_init_ittlib_name __itt_init_ittlib_ptr\n#endif /* __itt_init_ittlib_name */\n\ntypedef void (__itt_fini_ittlib_t)(void);\n\n/* this define used to control finalization function name. */\n#ifndef __itt_fini_ittlib_name\nITT_EXTERN_C void _N_(fini_ittlib)(void);\nstatic __itt_fini_ittlib_t* __itt_fini_ittlib_ptr = _N_(fini_ittlib);\n#define __itt_fini_ittlib_name __itt_fini_ittlib_ptr\n#endif /* __itt_fini_ittlib_name */\n\nextern __itt_global _N_(_ittapi_global);\n\n/* building pointers to imported funcs */\n#undef ITT_STUBV\n#undef ITT_STUB\n#define ITT_STUB(api,type,name,args,params,ptr,group,format)   \\\nstatic type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args;\\\ntypedef type api ITT_JOIN(_N_(name),_t) args;                  \\\nITT_EXTERN_C_BEGIN ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); ITT_EXTERN_C_END \\\nstatic type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args \\\n{                                                              \\\n    if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL) \\\n        __itt_init_ittlib_name(NULL, __itt_group_all);         \\\n    if (ITTNOTIFY_NAME(name) && ITTNOTIFY_NAME(name) != ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init))) \\\n        return ITTNOTIFY_NAME(name) params;                    \\\n    else                                                       \\\n        return (type)0;                                        \\\n}\n\n#define ITT_STUBV(api,type,name,args,params,ptr,group,format)  \\\nstatic type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args;\\\ntypedef type api ITT_JOIN(_N_(name),_t) args;                  \\\nITT_EXTERN_C_BEGIN ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); ITT_EXTERN_C_END \\\nstatic type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args \\\n{                                                              \\\n    if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL) \\\n        __itt_init_ittlib_name(NULL, __itt_group_all);         \\\n    if (ITTNOTIFY_NAME(name) && ITTNOTIFY_NAME(name) != ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init))) \\\n        ITTNOTIFY_NAME(name) params;                           \\\n    else                                                       \\\n        return;                                                \\\n}\n\n#undef __ITT_INTERNAL_INIT\n#include \"ittnotify_static.h\"\n\n#undef ITT_STUB\n#undef ITT_STUBV\n#define ITT_STUB(api,type,name,args,params,ptr,group,format)   \\\nstatic type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args;\\\ntypedef type api ITT_JOIN(_N_(name),_t) args;                  \\\nITT_EXTERN_C_BEGIN ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); ITT_EXTERN_C_END\n\n#define ITT_STUBV(api,type,name,args,params,ptr,group,format)  \\\nstatic type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args;\\\ntypedef type api ITT_JOIN(_N_(name),_t) args;                  \\\nITT_EXTERN_C_BEGIN ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); ITT_EXTERN_C_END\n\n#define __ITT_INTERNAL_INIT\n#include \"ittnotify_static.h\"\n#undef __ITT_INTERNAL_INIT\n\nITT_GROUP_LIST(group_list);\n\n#pragma pack(push, 8)\n\ntypedef struct ___itt_group_alias\n{\n    const char*    env_var;\n    __itt_group_id groups;\n} __itt_group_alias;\n\nstatic __itt_group_alias group_alias[] = {\n    { \"KMP_FOR_TPROFILE\", (__itt_group_id)(__itt_group_control | __itt_group_thread | __itt_group_sync  | __itt_group_mark) },\n    { \"KMP_FOR_TCHECK\",   (__itt_group_id)(__itt_group_control | __itt_group_thread | __itt_group_sync  | __itt_group_fsync | __itt_group_mark | __itt_group_suppress) },\n    { NULL,               (__itt_group_none) },\n    { api_version,        (__itt_group_none) } /* !!! Just to avoid unused code elimination !!! */\n};\n\n#pragma pack(pop)\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#if _MSC_VER\n#pragma warning(push)\n#pragma warning(disable: 4054) /* warning C4054: 'type cast' : from function pointer 'XXX' to data pointer 'void *' */\n#endif\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\nstatic __itt_api_info api_list[] = {\n/* Define functions with static implementation */\n#undef ITT_STUB\n#undef ITT_STUBV\n#define ITT_STUB(api,type,name,args,params,nameindll,group,format) { ITT_TO_STR(ITT_JOIN(__itt_,nameindll)), (void**)(void*)&ITTNOTIFY_NAME(name), (void*)(size_t)&ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)), (void*)(size_t)&ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)), (__itt_group_id)(group)},\n#define ITT_STUBV ITT_STUB\n#define __ITT_INTERNAL_INIT\n#include \"ittnotify_static.h\"\n#undef __ITT_INTERNAL_INIT\n/* Define functions without static implementation */\n#undef ITT_STUB\n#undef ITT_STUBV\n#define ITT_STUB(api,type,name,args,params,nameindll,group,format) {ITT_TO_STR(ITT_JOIN(__itt_,nameindll)), (void**)(void*)&ITTNOTIFY_NAME(name), (void*)(size_t)&ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)), NULL, (__itt_group_id)(group)},\n#define ITT_STUBV ITT_STUB\n#include \"ittnotify_static.h\"\n    {NULL, NULL, NULL, NULL, __itt_group_none}\n};\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#if _MSC_VER\n#pragma warning(pop)\n#endif\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/* static part descriptor which handles. all notification api attributes. */\n__itt_global _N_(_ittapi_global) = {\n    ITT_MAGIC,                                     /* identification info */\n    ITT_MAJOR, ITT_MINOR, API_VERSION_BUILD,       /* version info */\n    0,                                             /* api_initialized */\n    0,                                             /* mutex_initialized */\n    0,                                             /* atomic_counter */\n    MUTEX_INITIALIZER,                             /* mutex */\n    NULL,                                          /* dynamic library handle */\n    NULL,                                          /* error_handler */\n    NULL,                                          /* dll_path_ptr */\n    (__itt_api_info*)&api_list,                    /* api_list_ptr */\n    NULL,                                          /* next __itt_global */\n    NULL,                                          /* thread_list */\n    NULL,                                          /* domain_list */\n    NULL,                                          /* string_list */\n    __itt_collection_uninitialized,                /* collection state */\n    NULL,                                          /* counter_list */\n    0,                                             /* ipt_collect_events */\n    NULL,                                          /* histogram_list */\n    NULL                                           /* counter_metadata_list */\n};\n\ntypedef void (__itt_api_init_t)(__itt_global*, __itt_group_id);\ntypedef void (__itt_api_fini_t)(__itt_global*);\n\nstatic __itt_domain dummy_domain;\n/* ========================================================================= */\n\n#ifdef ITT_NOTIFY_EXT_REPORT\nITT_EXTERN_C void _N_(error_handler)(__itt_error_code, va_list args);\n#endif /* ITT_NOTIFY_EXT_REPORT */\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#if _MSC_VER\n#pragma warning(push)\n#pragma warning(disable: 4055) /* warning C4055: 'type cast' : from data pointer 'void *' to function pointer 'XXX' */\n#endif\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\nstatic void __itt_report_error(int code, ...)\n{\n    va_list args;\n    va_start(args, code);\n    if (_N_(_ittapi_global).error_handler != NULL)\n    {\n        __itt_error_handler_t* handler = (__itt_error_handler_t*)(size_t)_N_(_ittapi_global).error_handler;\n        handler((__itt_error_code)code, args);\n    }\n#ifdef ITT_NOTIFY_EXT_REPORT\n    _N_(error_handler)((__itt_error_code)code, args);\n#endif /* ITT_NOTIFY_EXT_REPORT */\n    va_end(args);\n}\n\nstatic int __itt_is_collector_available(void);\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#if _MSC_VER\n#pragma warning(pop)\n#endif\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nstatic __itt_domain* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createW),_init))(const wchar_t* name)\n{\n    __itt_domain *h_tail = NULL, *h = NULL;\n\n    if (name == NULL)\n    {\n        return NULL;\n    }\n\n    ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));\n    if (_N_(_ittapi_global).api_initialized)\n    {\n        if (ITTNOTIFY_NAME(domain_createW) && ITTNOTIFY_NAME(domain_createW) != ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createW),_init)))\n        {\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return ITTNOTIFY_NAME(domain_createW)(name);\n        }\n        else\n        {\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return &dummy_domain;\n        }\n    }\n    if (__itt_is_collector_available())\n    {\n        for (h_tail = NULL, h = _N_(_ittapi_global).domain_list; h != NULL; h_tail = h, h = h->next)\n        {\n            if (h->nameW != NULL && !wcscmp(h->nameW, name)) break;\n        }\n        if (h == NULL)\n        {\n            NEW_DOMAIN_W(&_N_(_ittapi_global), h, h_tail, name);\n        }\n    }\n    if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n    return h;\n}\n\nstatic __itt_domain* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createA),_init))(const char* name)\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nstatic __itt_domain* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(domain_create),_init))(const char* name)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n{\n    __itt_domain *h_tail = NULL, *h = NULL;\n\n    if (name == NULL)\n    {\n        return NULL;\n    }\n\n    ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));\n    if (_N_(_ittapi_global).api_initialized)\n    {\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n        if (ITTNOTIFY_NAME(domain_createA) && ITTNOTIFY_NAME(domain_createA) != ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createA),_init)))\n        {\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return ITTNOTIFY_NAME(domain_createA)(name);\n        }\n#else\n        if (ITTNOTIFY_NAME(domain_create) && ITTNOTIFY_NAME(domain_create) != ITT_VERSIONIZE(ITT_JOIN(_N_(domain_create),_init)))\n        {\n            if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return ITTNOTIFY_NAME(domain_create)(name);\n        }\n#endif\n        else\n        {\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n#else\n            if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n#endif\n            return &dummy_domain;\n        }\n    }\n    if (__itt_is_collector_available())\n    {\n        for (h_tail = NULL, h = _N_(_ittapi_global).domain_list; h != NULL; h_tail = h, h = h->next)\n        {\n            if (h->nameA != NULL && !__itt_fstrcmp(h->nameA, name)) break;\n        }\n        if (h == NULL)\n        {\n            NEW_DOMAIN_A(&_N_(_ittapi_global), h, h_tail, name);\n        }\n    }\n    if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n    return h;\n}\n\nstatic void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(module_load_with_sections),_init))(__itt_module_object* module_obj)\n{\n    if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)\n    {\n        __itt_init_ittlib_name(NULL, __itt_group_all);\n    }\n    if (ITTNOTIFY_NAME(module_load_with_sections) && ITTNOTIFY_NAME(module_load_with_sections) != ITT_VERSIONIZE(ITT_JOIN(_N_(module_load_with_sections),_init)))\n    {\n        if(module_obj != NULL)\n        {\n            module_obj->version = ITT_MODULE_OBJECT_VERSION;\n            ITTNOTIFY_NAME(module_load_with_sections)(module_obj);\n        }\n    }\n}\n\nstatic void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(module_unload_with_sections),_init))(__itt_module_object* module_obj)\n{\n    if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)\n    {\n        __itt_init_ittlib_name(NULL, __itt_group_all);\n    }\n    if (ITTNOTIFY_NAME(module_unload_with_sections) && ITTNOTIFY_NAME(module_unload_with_sections) != ITT_VERSIONIZE(ITT_JOIN(_N_(module_unload_with_sections),_init)))\n    {\n        if(module_obj != NULL)\n        {\n            module_obj->version = ITT_MODULE_OBJECT_VERSION;\n            ITTNOTIFY_NAME(module_unload_with_sections)(module_obj);\n        }\n    }\n}\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nstatic __itt_string_handle* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_createW),_init))(const wchar_t* name)\n{\n    __itt_string_handle *h_tail = NULL, *h = NULL;\n\n    if (name == NULL)\n    {\n        return NULL;\n    }\n\n    ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));\n    if (_N_(_ittapi_global).api_initialized)\n    {\n        if (ITTNOTIFY_NAME(string_handle_createW) && ITTNOTIFY_NAME(string_handle_createW) != ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_createW),_init)))\n        {\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return ITTNOTIFY_NAME(string_handle_createW)(name);\n        }\n        else\n        {\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return NULL;\n        }\n    }\n    if (__itt_is_collector_available())\n    {\n        for (h_tail = NULL, h = _N_(_ittapi_global).string_list; h != NULL; h_tail = h, h = h->next)\n        {\n            if (h->strW != NULL && !wcscmp(h->strW, name)) break;\n        }\n        if (h == NULL)\n        {\n            NEW_STRING_HANDLE_W(&_N_(_ittapi_global), h, h_tail, name);\n        }\n    }\n    __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n    return h;\n}\n\nstatic __itt_string_handle* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_createA),_init))(const char* name)\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nstatic __itt_string_handle* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_create),_init))(const char* name)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n{\n    __itt_string_handle *h_tail = NULL, *h = NULL;\n\n    if (name == NULL)\n    {\n        return NULL;\n    }\n\n    ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));\n    if (_N_(_ittapi_global).api_initialized)\n    {\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n        if (ITTNOTIFY_NAME(string_handle_createA) && ITTNOTIFY_NAME(string_handle_createA) != ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_createA),_init)))\n        {\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return ITTNOTIFY_NAME(string_handle_createA)(name);\n        }\n#else\n        if (ITTNOTIFY_NAME(string_handle_create) && ITTNOTIFY_NAME(string_handle_create) != ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_create),_init)))\n        {\n            if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return ITTNOTIFY_NAME(string_handle_create)(name);\n        }\n#endif\n        else\n        {\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n#else\n            if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n#endif\n            return NULL;\n        }\n    }\n    if (__itt_is_collector_available())\n    {\n        for (h_tail = NULL, h = _N_(_ittapi_global).string_list; h != NULL; h_tail = h, h = h->next)\n        {\n            if (h->strA != NULL && !__itt_fstrcmp(h->strA, name)) break;\n        }\n        if (h == NULL)\n        {\n            NEW_STRING_HANDLE_A(&_N_(_ittapi_global), h, h_tail, name);\n        }\n    }\n    if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n    return h;\n}\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nstatic __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_createW),_init))(const wchar_t *name, const wchar_t *domain)\n{\n    __itt_counter_info_t *h_tail = NULL, *h = NULL;\n    __itt_metadata_type type = __itt_metadata_u64;\n\n    if (name == NULL)\n    {\n        return NULL;\n    }\n\n    ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));\n    if (_N_(_ittapi_global).api_initialized)\n    {\n        if (ITTNOTIFY_NAME(counter_createW) && ITTNOTIFY_NAME(counter_createW) != ITT_VERSIONIZE(ITT_JOIN(_N_(counter_createW),_init)))\n        {\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return ITTNOTIFY_NAME(counter_createW)(name, domain);\n        }\n        else\n        {\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return NULL;\n        }\n    }\n    if (__itt_is_collector_available())\n    {\n        for (h_tail = NULL, h = _N_(_ittapi_global).counter_list; h != NULL; h_tail = h, h = h->next)\n        {\n            if (h->nameW != NULL && h->type == (int)type && !wcscmp(h->nameW, name) && ((h->domainW == NULL && domain == NULL) ||\n                (h->domainW != NULL && domain != NULL && !wcscmp(h->domainW, domain)))) break;\n\n        }\n        if (h == NULL)\n        {\n            NEW_COUNTER_W(&_N_(_ittapi_global), h, h_tail, name, domain, type);\n        }\n    }\n    __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n    return (__itt_counter)h;\n}\n\nstatic __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_createA),_init))(const char *name, const char *domain)\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nstatic __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create),_init))(const char *name, const char *domain)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n{\n    __itt_counter_info_t *h_tail = NULL, *h = NULL;\n    __itt_metadata_type type = __itt_metadata_u64;\n\n    if (name == NULL)\n    {\n        return NULL;\n    }\n\n    ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));\n    if (_N_(_ittapi_global).api_initialized)\n    {\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n        if (ITTNOTIFY_NAME(counter_createA) && ITTNOTIFY_NAME(counter_createA) != ITT_VERSIONIZE(ITT_JOIN(_N_(counter_createA),_init)))\n        {\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return ITTNOTIFY_NAME(counter_createA)(name, domain);\n        }\n#else\n        if (ITTNOTIFY_NAME(counter_create) && ITTNOTIFY_NAME(counter_create) != ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create),_init)))\n        {\n            if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return ITTNOTIFY_NAME(counter_create)(name, domain);\n        }\n#endif\n        else\n        {\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n#else\n            if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n#endif\n            return NULL;\n        }\n    }\n    if (__itt_is_collector_available())\n    {\n        for (h_tail = NULL, h = _N_(_ittapi_global).counter_list; h != NULL; h_tail = h, h = h->next)\n        {\n            if (h->nameA != NULL && h->type == (int)type && !__itt_fstrcmp(h->nameA, name) && ((h->domainA == NULL && domain == NULL) ||\n                (h->domainA != NULL && domain != NULL && !__itt_fstrcmp(h->domainA, domain)))) break;\n        }\n        if (h == NULL)\n        {\n            NEW_COUNTER_A(&_N_(_ittapi_global), h, h_tail, name, domain, type);\n        }\n    }\n    if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n    return (__itt_counter)h;\n}\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nstatic __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create_typedW),_init))(const wchar_t *name, const wchar_t *domain, __itt_metadata_type type)\n{\n    __itt_counter_info_t *h_tail = NULL, *h = NULL;\n\n    if (name == NULL)\n    {\n        return NULL;\n    }\n\n    ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));\n    if (_N_(_ittapi_global).api_initialized)\n    {\n        if (ITTNOTIFY_NAME(counter_create_typedW) && ITTNOTIFY_NAME(counter_create_typedW) != ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create_typedW),_init)))\n        {\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return ITTNOTIFY_NAME(counter_create_typedW)(name, domain, type);\n        }\n        else\n        {\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return NULL;\n        }\n    }\n    if (__itt_is_collector_available())\n    {\n        for (h_tail = NULL, h = _N_(_ittapi_global).counter_list; h != NULL; h_tail = h, h = h->next)\n        {\n            if (h->nameW != NULL && h->type == (int)type && !wcscmp(h->nameW, name) && ((h->domainW == NULL && domain == NULL) ||\n                (h->domainW != NULL && domain != NULL && !wcscmp(h->domainW, domain)))) break;\n\n        }\n        if (h == NULL)\n        {\n            NEW_COUNTER_W(&_N_(_ittapi_global), h, h_tail, name, domain, type);\n        }\n    }\n    __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n    return (__itt_counter)h;\n}\n\nstatic __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create_typedA),_init))(const char *name, const char *domain, __itt_metadata_type type)\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nstatic __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create_typed),_init))(const char *name, const char *domain, __itt_metadata_type type)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n{\n    __itt_counter_info_t *h_tail = NULL, *h = NULL;\n\n    if (name == NULL)\n    {\n        return NULL;\n    }\n\n    ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));\n    if (_N_(_ittapi_global).api_initialized)\n    {\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n        if (ITTNOTIFY_NAME(counter_create_typedA) && ITTNOTIFY_NAME(counter_create_typedA) != ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create_typedA),_init)))\n        {\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return ITTNOTIFY_NAME(counter_create_typedA)(name, domain, type);\n        }\n#else\n        if (ITTNOTIFY_NAME(counter_create_typed) && ITTNOTIFY_NAME(counter_create_typed) != ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create_typed),_init)))\n        {\n            if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return ITTNOTIFY_NAME(counter_create_typed)(name, domain, type);\n        }\n#endif\n        else\n        {\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n#else\n            if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n#endif\n            return NULL;\n        }\n    }\n    if (__itt_is_collector_available())\n    {\n        for (h_tail = NULL, h = _N_(_ittapi_global).counter_list; h != NULL; h_tail = h, h = h->next)\n        {\n            if (h->nameA != NULL && h->type == (int)type && !__itt_fstrcmp(h->nameA, name) && ((h->domainA == NULL && domain == NULL) ||\n                (h->domainA != NULL && domain != NULL && !__itt_fstrcmp(h->domainA, domain)))) break;\n        }\n        if (h == NULL)\n        {\n            NEW_COUNTER_A(&_N_(_ittapi_global), h, h_tail, name, domain, type);\n        }\n    }\n    if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n    return (__itt_counter)h;\n}\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nstatic __itt_histogram* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(histogram_createW),_init))(const __itt_domain* domain, const wchar_t* name, __itt_metadata_type x_type, __itt_metadata_type y_type)\n{\n    __itt_histogram *h_tail = NULL, *h = NULL;\n\n    if (domain == NULL || name == NULL)\n    {\n        return NULL;\n    }\n\n    ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));\n    if (_N_(_ittapi_global).api_initialized)\n    {\n        if (ITTNOTIFY_NAME(histogram_createW) && ITTNOTIFY_NAME(histogram_createW) != ITT_VERSIONIZE(ITT_JOIN(_N_(histogram_createW),_init)))\n        {\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return ITTNOTIFY_NAME(histogram_createW)(domain, name, x_type, y_type);\n        }\n        else\n        {\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return NULL;\n        }\n    }\n    if (__itt_is_collector_available())\n    {\n        for (h_tail = NULL, h = _N_(_ittapi_global).histogram_list; h != NULL; h_tail = h, h = h->next)\n        {\n            if (h->domain == NULL) continue;\n            else if (h->domain == domain && h->nameW != NULL && !wcscmp(h->nameW, name)) break;\n        }\n        if (h == NULL)\n        {\n            NEW_HISTOGRAM_W(&_N_(_ittapi_global), h, h_tail, domain, name, x_type, y_type);\n        }\n    }\n    __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n    return (__itt_histogram*)h;\n}\n\nstatic __itt_histogram* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(histogram_createA),_init))(const __itt_domain* domain, const char* name, __itt_metadata_type x_type, __itt_metadata_type y_type)\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nstatic __itt_histogram* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(histogram_create),_init))(const __itt_domain* domain, const char* name, __itt_metadata_type x_type, __itt_metadata_type y_type)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n{\n    __itt_histogram *h_tail = NULL, *h = NULL;\n\n    if (domain == NULL || name == NULL)\n    {\n        return NULL;\n    }\n\n    ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));\n    if (_N_(_ittapi_global).api_initialized)\n    {\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n        if (ITTNOTIFY_NAME(histogram_createA) && ITTNOTIFY_NAME(histogram_createA) != ITT_VERSIONIZE(ITT_JOIN(_N_(histogram_createA),_init)))\n        {\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return ITTNOTIFY_NAME(histogram_createA)(domain, name, x_type, y_type);\n        }\n#else\n        if (ITTNOTIFY_NAME(histogram_create) && ITTNOTIFY_NAME(histogram_create) != ITT_VERSIONIZE(ITT_JOIN(_N_(histogram_create),_init)))\n        {\n            if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return ITTNOTIFY_NAME(histogram_create)(domain, name, x_type, y_type);\n        }\n#endif\n        else\n        {\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n#else\n            if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n#endif\n            return NULL;\n        }\n    }\n    if (__itt_is_collector_available())\n    {\n        for (h_tail = NULL, h = _N_(_ittapi_global).histogram_list; h != NULL; h_tail = h, h = h->next)\n        {\n            if (h->domain == NULL) continue;\n            else if (h->domain == domain && h->nameA != NULL && !__itt_fstrcmp(h->nameA, name)) break;\n        }\n        if (h == NULL)\n        {\n            NEW_HISTOGRAM_A(&_N_(_ittapi_global), h, h_tail, domain, name, x_type, y_type);\n        }\n    }\n    if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n    return (__itt_histogram*)h;\n}\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nstatic __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_createW_v3),_init))(const __itt_domain* domain, const wchar_t* name, __itt_metadata_type type)\n{\n    __itt_counter_info_t *h_tail = NULL, *h = NULL;\n\n    if (name == NULL || domain == NULL)\n    {\n        return NULL;\n    }\n\n    ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));\n    if (_N_(_ittapi_global).api_initialized)\n    {\n        if (ITTNOTIFY_NAME(counter_createW_v3) && ITTNOTIFY_NAME(counter_createW_v3) != ITT_VERSIONIZE(ITT_JOIN(_N_(counter_createW_v3),_init)))\n        {\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return ITTNOTIFY_NAME(counter_createW_v3)(domain, name, type);\n        }\n        else\n        {\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return NULL;\n        }\n    }\n    if (__itt_is_collector_available())\n    {\n        for (h_tail = NULL, h = _N_(_ittapi_global).counter_list; h != NULL; h_tail = h, h = h->next)\n        {\n            if (h->nameW != NULL  && h->type == (int)type && !wcscmp(h->nameW, name) && ((h->domainW == NULL && domain->nameW == NULL) ||\n                (h->domainW != NULL && domain->nameW != NULL && !wcscmp(h->domainW, domain->nameW)))) break;\n\n        }\n        if (h == NULL)\n        {\n            NEW_COUNTER_W(&_N_(_ittapi_global),h,h_tail,name,domain->nameW,type);\n        }\n    }\n    __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n    return (__itt_counter)h;\n}\n\nstatic __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_createA_v3),_init))(const __itt_domain* domain, const char* name, __itt_metadata_type type)\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nstatic __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create_v3),_init))(const __itt_domain* domain, const char* name, __itt_metadata_type type)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n{\n    __itt_counter_info_t *h_tail = NULL, *h = NULL;\n\n    if (name == NULL || domain == NULL)\n    {\n        return NULL;\n    }\n\n    ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));\n    if (_N_(_ittapi_global).api_initialized)\n    {\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n        if (ITTNOTIFY_NAME(counter_createA_v3) && ITTNOTIFY_NAME(counter_createA_v3) != ITT_VERSIONIZE(ITT_JOIN(_N_(counter_createA_v3),_init)))\n        {\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return ITTNOTIFY_NAME(counter_createA_v3)(domain, name, type);\n        }\n#else\n        if (ITTNOTIFY_NAME(counter_create_v3) && ITTNOTIFY_NAME(counter_create_v3) != ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create_v3),_init)))\n        {\n            if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            return ITTNOTIFY_NAME(counter_create_v3)(domain, name, type);\n        }\n#endif\n        else\n        {\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n#else\n            if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n#endif\n            return NULL;\n        }\n    }\n    if (__itt_is_collector_available())\n    {\n        for (h_tail = NULL, h = _N_(_ittapi_global).counter_list; h != NULL; h_tail = h, h = h->next)\n        {\n            if (h->nameA != NULL  && h->type == (int)type && !__itt_fstrcmp(h->nameA, name) && ((h->domainA == NULL && domain->nameA == NULL) ||\n                (h->domainA != NULL && domain->nameA != NULL && !__itt_fstrcmp(h->domainA, domain->nameA)))) break;\n        }\n        if (h == NULL)\n        {\n            NEW_COUNTER_A(&_N_(_ittapi_global),h,h_tail,name,domain->nameA,type);\n        }\n    }\n    if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n    return (__itt_counter)h;\n}\n\nstatic void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(bind_context_metadata_to_counter),_init))(__itt_counter counter, size_t length, __itt_context_metadata* metadata)\n{\n    __itt_counter_metadata *h_tail = NULL, *h = NULL;\n\n    if (counter == NULL || length == 0 || metadata == NULL)\n    {\n        return;\n    }\n\n    ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));\n    if (_N_(_ittapi_global).api_initialized)\n    {\n        if (ITTNOTIFY_NAME(bind_context_metadata_to_counter) && ITTNOTIFY_NAME(bind_context_metadata_to_counter) != ITT_VERSIONIZE(ITT_JOIN(_N_(bind_context_metadata_to_counter),_init)))\n        {\n            if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n            ITTNOTIFY_NAME(bind_context_metadata_to_counter)(counter, length, metadata);\n        }\n        else\n        {\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n            __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n#else\n            if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n#endif\n            return;\n        }\n    }\n    if (__itt_is_collector_available())\n    {\n        size_t item;\n        char* str_valueA = NULL;\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n        wchar_t* str_valueW = NULL;\n#endif\n        unsigned long long value = 0;\n        __itt_context_type type = __itt_context_unknown;\n\n        for (item = 0; item < length; item++)\n        {\n            type = metadata[item].type;\n            for (h_tail = NULL, h = _N_(_ittapi_global).counter_metadata_list; h != NULL; h_tail = h, h = h->next)\n            {\n                if (h->counter != NULL && h->counter == counter && h->type == type) break;\n            }\n            if (h == NULL && counter != NULL && type != __itt_context_unknown)\n            {\n                if (type == __itt_context_nameA || type == __itt_context_deviceA || type == __itt_context_unitsA || type == __itt_context_pci_addrA)\n                {\n                    str_valueA = (char*)(metadata[item].value);\n                    NEW_COUNTER_METADATA_STR_A(&_N_(_ittapi_global),h,h_tail,counter,type,str_valueA);\n                }\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n                else if (type == __itt_context_nameW || type == __itt_context_deviceW || type == __itt_context_unitsW || type == __itt_context_pci_addrW)\n                {\n                    str_valueW = (wchar_t*)(metadata[item].value);\n                    NEW_COUNTER_METADATA_STR_W(&_N_(_ittapi_global),h,h_tail,counter,type,str_valueW);\n                }\n#endif\n                else if (type >= __itt_context_tid && type <= __itt_context_cpu_cycles_flag)\n                {\n                    value = *(unsigned long long*)(metadata[item].value);\n                    NEW_COUNTER_METADATA_NUM(&_N_(_ittapi_global),h,h_tail,counter,type,value);\n                }\n            }\n        }\n    }\n    if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n}\n/* -------------------------------------------------------------------------- */\n\nstatic void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(pause),_init))(void)\n{\n    if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)\n    {\n        __itt_init_ittlib_name(NULL, __itt_group_all);\n    }\n    if (ITTNOTIFY_NAME(pause) && ITTNOTIFY_NAME(pause) != ITT_VERSIONIZE(ITT_JOIN(_N_(pause),_init)))\n    {\n        ITTNOTIFY_NAME(pause)();\n    }\n}\n\nstatic void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(resume),_init))(void)\n{\n    if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)\n    {\n        __itt_init_ittlib_name(NULL, __itt_group_all);\n    }\n    if (ITTNOTIFY_NAME(resume) && ITTNOTIFY_NAME(resume) != ITT_VERSIONIZE(ITT_JOIN(_N_(resume),_init)))\n    {\n        ITTNOTIFY_NAME(resume)();\n    }\n}\n\nstatic void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(pause_scoped),_init))(__itt_collection_scope scope)\n{\n    if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)\n    {\n        __itt_init_ittlib_name(NULL, __itt_group_all);\n    }\n    if (ITTNOTIFY_NAME(pause_scoped) && ITTNOTIFY_NAME(pause_scoped) != ITT_VERSIONIZE(ITT_JOIN(_N_(pause_scoped),_init)))\n    {\n        ITTNOTIFY_NAME(pause_scoped)(scope);\n    }\n}\n\nstatic void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(resume_scoped),_init))(__itt_collection_scope scope)\n{\n    if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)\n    {\n        __itt_init_ittlib_name(NULL, __itt_group_all);\n    }\n    if (ITTNOTIFY_NAME(resume_scoped) && ITTNOTIFY_NAME(resume_scoped) != ITT_VERSIONIZE(ITT_JOIN(_N_(resume_scoped),_init)))\n    {\n        ITTNOTIFY_NAME(resume_scoped)(scope);\n    }\n}\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nstatic void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameW),_init))(const wchar_t* name)\n{\n    if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)\n    {\n        __itt_init_ittlib_name(NULL, __itt_group_all);\n    }\n    if (ITTNOTIFY_NAME(thread_set_nameW) && ITTNOTIFY_NAME(thread_set_nameW) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameW),_init)))\n    {\n        ITTNOTIFY_NAME(thread_set_nameW)(name);\n    }\n}\n\nstatic int ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_name_setW),_init))(const wchar_t* name, int namelen)\n{\n    (void)namelen;\n    ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameW),_init))(name);\n    return 0;\n}\n\nstatic void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameA),_init))(const char* name)\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nstatic void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_name),_init))(const char* name)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n{\n    if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)\n    {\n        __itt_init_ittlib_name(NULL, __itt_group_all);\n    }\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n    if (ITTNOTIFY_NAME(thread_set_nameA) && ITTNOTIFY_NAME(thread_set_nameA) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameA),_init)))\n    {\n        ITTNOTIFY_NAME(thread_set_nameA)(name);\n    }\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n    if (ITTNOTIFY_NAME(thread_set_name) && ITTNOTIFY_NAME(thread_set_name) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_name),_init)))\n    {\n        ITTNOTIFY_NAME(thread_set_name)(name);\n    }\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n}\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nstatic int ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_name_setA),_init))(const char* name, int namelen)\n{\n    (void)namelen;\n    ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameA),_init))(name);\n    return 0;\n}\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nstatic int ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_name_set),_init))(const char* name, int namelen)\n{\n    (void)namelen;\n    ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_name),_init))(name);\n    return 0;\n}\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\nstatic void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thread_ignore),_init))(void)\n{\n    if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)\n    {\n        __itt_init_ittlib_name(NULL, __itt_group_all);\n    }\n    if (ITTNOTIFY_NAME(thread_ignore) && ITTNOTIFY_NAME(thread_ignore) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_ignore),_init)))\n    {\n        ITTNOTIFY_NAME(thread_ignore)();\n    }\n}\n\nstatic void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_ignore),_init))(void)\n{\n    ITT_VERSIONIZE(ITT_JOIN(_N_(thread_ignore),_init))();\n}\n\nstatic void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(enable_attach),_init))(void)\n{\n#ifdef __ANDROID__\n    /*\n     * if LIB_VAR_NAME env variable were set before then stay previous value\n     * else set default path\n    */\n    setenv(ITT_TO_STR(LIB_VAR_NAME), ANDROID_ITTNOTIFY_DEFAULT_PATH, 0);\n#endif\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic const char* __itt_fsplit(const char* s, const char* sep, const char** out, int* len)\n{\n    int i;\n    int j;\n\n    if (!s || !sep || !out || !len)\n        return NULL;\n\n    for (i = 0; s[i]; i++)\n    {\n        int b = 0;\n        for (j = 0; sep[j]; j++)\n            if (s[i] == sep[j])\n            {\n                b = 1;\n                break;\n            }\n        if (!b)\n            break;\n    }\n\n    if (!s[i])\n        return NULL;\n\n    *len = 0;\n    *out = &s[i];\n\n    for (; s[i]; i++, (*len)++)\n    {\n        int b = 0;\n        for (j = 0; sep[j]; j++)\n            if (s[i] == sep[j])\n            {\n                b = 1;\n                break;\n            }\n        if (b)\n            break;\n    }\n\n    for (; s[i]; i++)\n    {\n        int b = 0;\n        for (j = 0; sep[j]; j++)\n            if (s[i] == sep[j])\n            {\n                b = 1;\n                break;\n            }\n        if (!b)\n            break;\n    }\n\n    return &s[i];\n}\n\n/* This function return value of env variable that placed into static buffer.\n * !!! The same static buffer is used for subsequent calls. !!!\n * This was done to avoid dynamic allocation for few calls.\n * Actually we need this function only four times.\n */\nstatic const char* __itt_get_env_var(const char* name)\n{\n#define MAX_ENV_VALUE_SIZE 4086\n    static char  env_buff[MAX_ENV_VALUE_SIZE];\n    static char* env_value = (char*)env_buff;\n\n    if (name != NULL)\n    {\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n        size_t max_len = MAX_ENV_VALUE_SIZE - (size_t)(env_value - env_buff);\n        DWORD rc = GetEnvironmentVariableA(name, env_value, (DWORD)max_len);\n        if (rc >= max_len)\n            __itt_report_error(__itt_error_env_too_long, name, (size_t)rc - 1, (size_t)(max_len - 1));\n        else if (rc > 0)\n        {\n            const char* ret = (const char*)env_value;\n            env_value += rc + 1;\n            return ret;\n        }\n        else\n        {\n            /* If environment variable is empty, GetEnvironmentVariables()\n             * returns zero (number of characters (not including terminating null),\n             * and GetLastError() returns ERROR_SUCCESS. */\n            DWORD err = GetLastError();\n            if (err == ERROR_SUCCESS)\n                return env_value;\n\n            if (err != ERROR_ENVVAR_NOT_FOUND)\n                __itt_report_error(__itt_error_cant_read_env, name, (int)err);\n        }\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\n        char* env = getenv(name);\n        if (env != NULL)\n        {\n            size_t len = __itt_fstrnlen(env, MAX_ENV_VALUE_SIZE);\n            size_t max_len = MAX_ENV_VALUE_SIZE - (size_t)(env_value - env_buff);\n            if (len < max_len)\n            {\n                const char* ret = (const char*)env_value;\n                __itt_fstrcpyn(env_value, max_len, env, len + 1);\n                env_value += len + 1;\n                return ret;\n            } else\n                __itt_report_error(__itt_error_env_too_long, name, (size_t)len, (size_t)(max_len - 1));\n        }\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n    }\n    return NULL;\n}\n\nstatic const char* __itt_get_lib_name(void)\n{\n    const char* lib_name = __itt_get_env_var(ITT_TO_STR(LIB_VAR_NAME));\n\n#ifdef __ANDROID__\n    if (lib_name == NULL)\n    {\n\n#if ITT_ARCH==ITT_ARCH_IA32 || ITT_ARCH==ITT_ARCH_ARM\n        const char* const marker_filename = \"com.intel.itt.collector_lib_32\";\n#else\n        const char* const marker_filename = \"com.intel.itt.collector_lib_64\";\n#endif\n\n        char system_wide_marker_filename[PATH_MAX] = {0};\n        int itt_marker_file_fd = -1;\n        ssize_t res = 0;\n\n        res = snprintf(system_wide_marker_filename, PATH_MAX - 1, \"%s%s\", \"/data/local/tmp/\", marker_filename);\n        if (res < 0)\n        {\n            ITT_ANDROID_LOGE(\"Unable to concatenate marker file string.\");\n            return lib_name;\n        }\n        itt_marker_file_fd = open(system_wide_marker_filename, O_RDONLY);\n\n        if (itt_marker_file_fd == -1)\n        {\n            const pid_t my_pid = getpid();\n            char cmdline_path[PATH_MAX] = {0};\n            char package_name[PATH_MAX] = {0};\n            char app_sandbox_file[PATH_MAX] = {0};\n            int cmdline_fd = 0;\n\n            ITT_ANDROID_LOGI(\"Unable to open system-wide marker file.\");\n            res = snprintf(cmdline_path, PATH_MAX - 1, \"/proc/%d/cmdline\", my_pid);\n            if (res < 0)\n            {\n                ITT_ANDROID_LOGE(\"Unable to get cmdline path string.\");\n                return lib_name;\n            }\n\n            ITT_ANDROID_LOGI(\"CMD file: %s\\n\", cmdline_path);\n            cmdline_fd = open(cmdline_path, O_RDONLY);\n            if (cmdline_fd == -1)\n            {\n                ITT_ANDROID_LOGE(\"Unable to open %s file!\", cmdline_path);\n                return lib_name;\n            }\n            res = read(cmdline_fd, package_name, PATH_MAX - 1);\n            if (res == -1)\n            {\n                ITT_ANDROID_LOGE(\"Unable to read %s file!\", cmdline_path);\n                res = close(cmdline_fd);\n                if (res == -1)\n                {\n                    ITT_ANDROID_LOGE(\"Unable to close %s file!\", cmdline_path);\n                }\n                return lib_name;\n            }\n            res = close(cmdline_fd);\n            if (res == -1)\n            {\n                ITT_ANDROID_LOGE(\"Unable to close %s file!\", cmdline_path);\n                return lib_name;\n            }\n            ITT_ANDROID_LOGI(\"Package name: %s\\n\", package_name);\n            res = snprintf(app_sandbox_file, PATH_MAX - 1, \"/data/data/%s/%s\", package_name, marker_filename);\n            if (res < 0)\n            {\n                ITT_ANDROID_LOGE(\"Unable to concatenate marker file string.\");\n                return lib_name;\n            }\n\n            ITT_ANDROID_LOGI(\"Lib marker file name: %s\\n\", app_sandbox_file);\n            itt_marker_file_fd = open(app_sandbox_file, O_RDONLY);\n            if (itt_marker_file_fd == -1)\n            {\n                ITT_ANDROID_LOGE(\"Unable to open app marker file!\");\n                return lib_name;\n            }\n        }\n\n        {\n            char itt_lib_name[PATH_MAX] = {0};\n\n            res = read(itt_marker_file_fd, itt_lib_name, PATH_MAX - 1);\n            if (res == -1)\n            {\n                ITT_ANDROID_LOGE(\"Unable to read %s file!\", itt_marker_file_fd);\n                res = close(itt_marker_file_fd);\n                if (res == -1)\n                {\n                    ITT_ANDROID_LOGE(\"Unable to close %s file!\", itt_marker_file_fd);\n                }\n                return lib_name;\n            }\n            ITT_ANDROID_LOGI(\"ITT Lib path: %s\", itt_lib_name);\n            res = close(itt_marker_file_fd);\n            if (res == -1)\n            {\n                ITT_ANDROID_LOGE(\"Unable to close %s file!\", itt_marker_file_fd);\n                return lib_name;\n            }\n            ITT_ANDROID_LOGI(\"Set env %s to %s\", ITT_TO_STR(LIB_VAR_NAME), itt_lib_name);\n            res = setenv(ITT_TO_STR(LIB_VAR_NAME), itt_lib_name, 0);\n            if (res == -1)\n            {\n                ITT_ANDROID_LOGE(\"Unable to set env var!\");\n                return lib_name;\n            }\n            lib_name = __itt_get_env_var(ITT_TO_STR(LIB_VAR_NAME));\n            ITT_ANDROID_LOGI(\"ITT Lib path from env: %s\", lib_name);\n        }\n    }\n#endif\n\n    return lib_name;\n}\n\n/* Avoid clashes with std::min */\n#define __itt_min(a,b) ((a) < (b) ? (a) : (b))\n\nstatic __itt_group_id __itt_get_groups(void)\n{\n    int i;\n    __itt_group_id res = __itt_group_none;\n    const char* var_name  = \"INTEL_ITTNOTIFY_GROUPS\";\n    const char* group_str = __itt_get_env_var(var_name);\n\n    if (group_str != NULL)\n    {\n        int len;\n        char gr[255];\n        const char* chunk;\n        while ((group_str = __itt_fsplit(group_str, \",; \", &chunk, &len)) != NULL)\n        {\n            int min_len = __itt_min(len, (int)(sizeof(gr) - 1));\n            __itt_fstrcpyn(gr, sizeof(gr) - 1, chunk,  min_len);\n            gr[min_len] = 0;\n\n            for (i = 0; group_list[i].name != NULL; i++)\n            {\n                if (!__itt_fstrcmp(gr, group_list[i].name))\n                {\n                    res = (__itt_group_id)(res | group_list[i].id);\n                    break;\n                }\n            }\n        }\n        /* TODO: !!! Workaround for bug with warning for unknown group !!!\n         * Should be fixed in new initialization scheme.\n         * Now the following groups should be set always. */\n        for (i = 0; group_list[i].id != __itt_group_none; i++)\n            if (group_list[i].id != __itt_group_all &&\n                group_list[i].id > __itt_group_splitter_min &&\n                group_list[i].id < __itt_group_splitter_max)\n                res = (__itt_group_id)(res | group_list[i].id);\n        return res;\n    }\n    else\n    {\n        for (i = 0; group_alias[i].env_var != NULL; i++)\n            if (__itt_get_env_var(group_alias[i].env_var) != NULL)\n                return group_alias[i].groups;\n    }\n\n    return res;\n}\n\n#undef __itt_min\n\nstatic int __itt_lib_version(lib_t lib)\n{\n    if (lib == NULL)\n        return 0;\n    if (__itt_get_proc(lib, \"__itt_api_init\"))\n        return 2;\n    if (__itt_get_proc(lib, \"__itt_api_version\"))\n        return 1;\n    return 0;\n}\n\n/* It's not used right now! Comment it out to avoid warnings.\nstatic void __itt_reinit_all_pointers(void)\n{\n    register int i;\n    // Fill all pointers with initial stubs\n    for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++)\n        *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].init_func;\n}\n*/\n\nstatic void __itt_nullify_all_pointers(void)\n{\n    int i;\n    /* Nulify all pointers except domain_create, string_handle_create  and counter_create */\n    for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++)\n        *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].null_func;\n}\n\nstatic int __itt_is_collector_available(void)\n{\n    int is_available;\n\n    ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));\n    if (_N_(_ittapi_global).state == __itt_collection_uninitialized)\n    {\n        _N_(_ittapi_global).state = (NULL == __itt_get_lib_name()) ? __itt_collection_collector_absent : __itt_collection_collector_exists;\n    }\n    is_available = (_N_(_ittapi_global).state == __itt_collection_collector_exists ||\n        _N_(_ittapi_global).state == __itt_collection_init_successful);\n    __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n    return is_available;\n}\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#if _MSC_VER\n#pragma warning(push)\n#pragma warning(disable: 4054) /* warning C4054: 'type cast' : from function pointer 'XXX' to data pointer 'void *' */\n#pragma warning(disable: 4055) /* warning C4055: 'type cast' : from data pointer 'void *' to function pointer 'XXX' */\n#endif\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\nITT_EXTERN_C void _N_(fini_ittlib)(void)\n{\n    __itt_api_fini_t* __itt_api_fini_ptr = NULL;\n    static volatile TIDT current_thread = 0;\n\n    if (_N_(_ittapi_global).api_initialized)\n    {\n        ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));\n        if (_N_(_ittapi_global).api_initialized)\n        {\n            if (current_thread == 0)\n            {\n                if (PTHREAD_SYMBOLS) current_thread = __itt_thread_id();\n                if (_N_(_ittapi_global).lib != NULL)\n                {\n                    __itt_api_fini_ptr = (__itt_api_fini_t*)(size_t)__itt_get_proc(_N_(_ittapi_global).lib, \"__itt_api_fini\");\n                }\n                if (__itt_api_fini_ptr)\n                {\n                    __itt_api_fini_ptr(&_N_(_ittapi_global));\n                }\n\n                __itt_nullify_all_pointers();\n\n /* TODO: !!! not safe !!! don't support unload so far.\n  *             if (_N_(_ittapi_global).lib != NULL)\n  *                 __itt_unload_lib(_N_(_ittapi_global).lib);\n  *             _N_(_ittapi_global).lib = NULL;\n  */\n                _N_(_ittapi_global).api_initialized = 0;\n                current_thread = 0;\n            }\n        }\n        if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n    }\n}\n\n/* !!! this function should be called under mutex lock !!! */\nstatic void __itt_free_allocated_resources(void)\n{\n    __itt_string_handle* current_string = _N_(_ittapi_global).string_list;\n    while (current_string != NULL)\n    {\n        __itt_string_handle* tmp = current_string->next;\n        free((char*)current_string->strA);\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n        free((wchar_t*)current_string->strW);\n#endif\n        free(current_string);\n        current_string = tmp;\n    }\n    _N_(_ittapi_global).string_list = NULL;\n\n    __itt_domain* current_domain = _N_(_ittapi_global).domain_list;\n    while (current_domain != NULL)\n    {\n        __itt_domain* tmp = current_domain->next;\n        free((char*)current_domain->nameA);\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n        free((wchar_t*)current_domain->nameW);\n#endif\n        free(current_domain);\n        current_domain = tmp;\n    }\n    _N_(_ittapi_global).domain_list = NULL;\n\n    __itt_counter_info_t* current_couter = _N_(_ittapi_global).counter_list;\n    while (current_couter != NULL)\n    {\n        __itt_counter_info_t* tmp = current_couter->next;\n        free((char*)current_couter->nameA);\n        free((char*)current_couter->domainA);\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n        free((wchar_t*)current_couter->nameW);\n        free((wchar_t*)current_couter->domainW);\n#endif\n        free(current_couter);\n        current_couter = tmp;\n    }\n    _N_(_ittapi_global).counter_list = NULL;\n\n    __itt_histogram* current_histogram = _N_(_ittapi_global).histogram_list;\n    while (current_histogram != NULL)\n    {\n        __itt_histogram* tmp = current_histogram->next;\n        free((char*)current_histogram->nameA);\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n        free((wchar_t*)current_histogram->nameW);\n#endif\n        free(current_histogram);\n        current_histogram = tmp;\n    }\n    _N_(_ittapi_global).histogram_list = NULL;\n\n    \n    __itt_counter_metadata* current_counter_metadata = _N_(_ittapi_global).counter_metadata_list;\n    while (current_counter_metadata != NULL)\n    {\n        __itt_counter_metadata* tmp = current_counter_metadata->next;\n        free((char*)current_counter_metadata->str_valueA);\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n        free((wchar_t*)current_counter_metadata->str_valueW);\n#endif\n        free(current_counter_metadata);\n        current_counter_metadata = tmp;\n    }\n    _N_(_ittapi_global).counter_metadata_list = NULL;\n}\n\nITT_EXTERN_C int _N_(init_ittlib)(const char* lib_name, __itt_group_id init_groups)\n{\n    int i;\n    __itt_group_id groups;\n#ifdef ITT_COMPLETE_GROUP\n    __itt_group_id zero_group = __itt_group_none;\n#endif /* ITT_COMPLETE_GROUP */\n    static volatile TIDT current_thread = 0;\n\n    if (!_N_(_ittapi_global).api_initialized)\n    {\n#ifndef ITT_SIMPLE_INIT\n        ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));\n#endif /* ITT_SIMPLE_INIT */\n\n        if (!_N_(_ittapi_global).api_initialized)\n        {\n            if (current_thread == 0)\n            {\n                if (PTHREAD_SYMBOLS) current_thread = __itt_thread_id();\n                if (lib_name == NULL)\n                {\n                    lib_name = __itt_get_lib_name();\n                }\n                groups = __itt_get_groups();\n                if (DL_SYMBOLS && (groups != __itt_group_none || lib_name != NULL))\n                {\n                    _N_(_ittapi_global).lib = __itt_load_lib((lib_name == NULL) ? ittnotify_lib_name : lib_name);\n\n                    if (_N_(_ittapi_global).lib != NULL)\n                    {\n                        _N_(_ittapi_global).state = __itt_collection_init_successful;\n                        __itt_api_init_t* __itt_api_init_ptr;\n                        int lib_version = __itt_lib_version(_N_(_ittapi_global).lib);\n\n                        switch (lib_version)\n                        {\n                        case 0:\n                            groups = __itt_group_legacy;\n                            ITT_ATTRIBUTE_FALLTHROUGH;\n                        case 1:\n                            /* Fill all pointers from dynamic library */\n                            for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++)\n                            {\n                                if (_N_(_ittapi_global).api_list_ptr[i].group & groups & init_groups)\n                                {\n                                    *_N_(_ittapi_global).api_list_ptr[i].func_ptr = (void*)__itt_get_proc(_N_(_ittapi_global).lib, _N_(_ittapi_global).api_list_ptr[i].name);\n                                    if (*_N_(_ittapi_global).api_list_ptr[i].func_ptr == NULL)\n                                    {\n                                        /* Restore pointers for function with static implementation */\n                                        *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].null_func;\n                                        __itt_report_error(__itt_error_no_symbol, lib_name, _N_(_ittapi_global).api_list_ptr[i].name);\n#ifdef ITT_COMPLETE_GROUP\n                                        zero_group = (__itt_group_id)(zero_group | _N_(_ittapi_global).api_list_ptr[i].group);\n#endif /* ITT_COMPLETE_GROUP */\n                                    }\n                                }\n                                else\n                                    *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].null_func;\n                            }\n\n                            if (groups == __itt_group_legacy)\n                            {\n                                /* Compatibility with legacy tools */\n                                ITTNOTIFY_NAME(thread_ignore)  = ITTNOTIFY_NAME(thr_ignore);\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n                                ITTNOTIFY_NAME(sync_createA)   = ITTNOTIFY_NAME(sync_set_nameA);\n                                ITTNOTIFY_NAME(sync_createW)   = ITTNOTIFY_NAME(sync_set_nameW);\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\n                                ITTNOTIFY_NAME(sync_create)    = ITTNOTIFY_NAME(sync_set_name);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n                                ITTNOTIFY_NAME(sync_prepare)   = ITTNOTIFY_NAME(notify_sync_prepare);\n                                ITTNOTIFY_NAME(sync_cancel)    = ITTNOTIFY_NAME(notify_sync_cancel);\n                                ITTNOTIFY_NAME(sync_acquired)  = ITTNOTIFY_NAME(notify_sync_acquired);\n                                ITTNOTIFY_NAME(sync_releasing) = ITTNOTIFY_NAME(notify_sync_releasing);\n                            }\n\n#ifdef ITT_COMPLETE_GROUP\n                            for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++)\n                                if (_N_(_ittapi_global).api_list_ptr[i].group & zero_group)\n                                    *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].null_func;\n#endif /* ITT_COMPLETE_GROUP */\n                            break;\n                        case 2:\n                            __itt_api_init_ptr = (__itt_api_init_t*)(size_t)__itt_get_proc(_N_(_ittapi_global).lib, \"__itt_api_init\");\n                            if (__itt_api_init_ptr)\n                                __itt_api_init_ptr(&_N_(_ittapi_global), init_groups);\n                            break;\n                        }\n                    }\n                    else\n                    {\n                        _N_(_ittapi_global).state = __itt_collection_init_fail;\n                        __itt_free_allocated_resources();\n                        __itt_nullify_all_pointers();\n\n                        __itt_report_error(__itt_error_no_module, lib_name,\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n                            __itt_system_error()\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n                            dlerror()\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n                        );\n                    }\n                }\n                else\n                {\n                    _N_(_ittapi_global).state = __itt_collection_collector_absent;\n                    __itt_nullify_all_pointers();\n                }\n                _N_(_ittapi_global).api_initialized = 1;\n                current_thread = 0;\n                /* !!! Just to avoid unused code elimination !!! */\n                if (__itt_fini_ittlib_ptr == _N_(fini_ittlib)) current_thread = 0;\n            }\n        }\n\n#ifndef ITT_SIMPLE_INIT\n        if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n#endif /* ITT_SIMPLE_INIT */\n    }\n\n    /* Evaluating if any function ptr is non empty and it's in init_groups */\n    for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++)\n    {\n        if (*_N_(_ittapi_global).api_list_ptr[i].func_ptr != _N_(_ittapi_global).api_list_ptr[i].null_func &&\n            _N_(_ittapi_global).api_list_ptr[i].group & init_groups)\n        {\n            return 1;\n        }\n    }\n    return 0;\n}\n\nITT_EXTERN_C __itt_error_handler_t* _N_(set_error_handler)(__itt_error_handler_t* handler)\n{\n    __itt_error_handler_t* prev = (__itt_error_handler_t*)(size_t)_N_(_ittapi_global).error_handler;\n    _N_(_ittapi_global).error_handler = (void*)(size_t)handler;\n    return prev;\n}\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#if _MSC_VER\n#pragma warning(pop)\n#endif\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/** __itt_mark_pt_region functions marks region of interest\n * region parameter defines different regions.\n * 0 <= region < 8 */\n\n#if defined(ITT_API_IPT_SUPPORT) && (ITT_PLATFORM==ITT_PLATFORM_WIN || ITT_PLATFORM==ITT_PLATFORM_POSIX) && !defined(__ANDROID__)\nvoid __itt_pt_mark(__itt_pt_region region);\nvoid __itt_pt_mark_event(__itt_pt_region region);\n#endif\n\nITT_EXTERN_C void _N_(mark_pt_region_begin)(__itt_pt_region region)\n{\n#if defined(ITT_API_IPT_SUPPORT) && (ITT_PLATFORM==ITT_PLATFORM_WIN || ITT_PLATFORM==ITT_PLATFORM_POSIX) && !defined(__ANDROID__)\n    if (_N_(_ittapi_global).ipt_collect_events == 1)\n    {\n        __itt_pt_mark_event(2*region);\n    }\n    else\n    {\n        __itt_pt_mark(2*region);\n    }\n#else\n    (void)region;\n#endif\n}\n\nITT_EXTERN_C void _N_(mark_pt_region_end)(__itt_pt_region region)\n{\n#if defined(ITT_API_IPT_SUPPORT) && (ITT_PLATFORM==ITT_PLATFORM_WIN || ITT_PLATFORM==ITT_PLATFORM_POSIX) && !defined(__ANDROID__)\n    if (_N_(_ittapi_global).ipt_collect_events == 1)\n    {\n        __itt_pt_mark_event(2*region + 1);\n    }\n    else\n    {\n        __itt_pt_mark(2*region + 1);\n    }\n#else\n     (void)region;\n#endif\n}\n\nITT_EXTERN_C __itt_collection_state (_N_(get_collection_state))(void)\n{\n    if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)\n    {\n        __itt_init_ittlib_name(NULL, __itt_group_all);\n    }\n    return _N_(_ittapi_global).state;\n}\n\n/* !!! should be called from the library destructor !!!\n * this function destroys the mutex and frees resources\n * allocated by ITT API static part\n */\nITT_EXTERN_C void (_N_(release_resources))(void)\n{\n    ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));\n    __itt_free_allocated_resources();\n    if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);\n    ITT_MUTEX_DESTROY(_N_(_ittapi_global));\n}\n"
  },
  {
    "path": "third-party/tbb/src/tbb/tools_api/ittnotify_static.h",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"ittnotify_config.h\"\n\n#ifndef ITT_FORMAT_DEFINED\n#  ifndef ITT_FORMAT\n#    define ITT_FORMAT\n#  endif /* ITT_FORMAT */\n#  ifndef ITT_NO_PARAMS\n#    define ITT_NO_PARAMS\n#  endif /* ITT_NO_PARAMS */\n#endif /* ITT_FORMAT_DEFINED */\n\n/*\n * parameters for macro expected:\n * ITT_STUB(api, type, func_name, arguments, params, func_name_in_dll, group, printf_fmt)\n */\n#ifdef __ITT_INTERNAL_INIT\n\n#ifndef __ITT_INTERNAL_BODY\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, __itt_domain*, domain_createA, (const char    *name), (ITT_FORMAT name), domain_createA, __itt_group_structure, \"\\\"%s\\\"\")\nITT_STUB(ITTAPI, __itt_domain*, domain_createW, (const wchar_t *name), (ITT_FORMAT name), domain_createW, __itt_group_structure, \"\\\"%S\\\"\")\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, __itt_domain*, domain_create,  (const char    *name), (ITT_FORMAT name), domain_create,  __itt_group_structure, \"\\\"%s\\\"\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\nITT_STUBV(ITTAPI, void, module_load_with_sections, (__itt_module_object* module_obj), (ITT_FORMAT module_obj), module_load_with_sections, __itt_group_module, \"%p\")\nITT_STUBV(ITTAPI, void, module_unload_with_sections, (__itt_module_object* module_obj), (ITT_FORMAT module_obj), module_unload_with_sections, __itt_group_module, \"%p\")\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, __itt_string_handle*, string_handle_createA, (const char    *name), (ITT_FORMAT name), string_handle_createA, __itt_group_structure, \"\\\"%s\\\"\")\nITT_STUB(ITTAPI, __itt_string_handle*, string_handle_createW, (const wchar_t *name), (ITT_FORMAT name), string_handle_createW, __itt_group_structure, \"\\\"%S\\\"\")\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, __itt_string_handle*, string_handle_create,  (const char    *name), (ITT_FORMAT name), string_handle_create,  __itt_group_structure, \"\\\"%s\\\"\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, __itt_counter, counter_createA, (const char    *name, const char    *domain), (ITT_FORMAT name, domain), counter_createA, __itt_group_counter, \"\\\"%s\\\", \\\"%s\\\"\")\nITT_STUB(ITTAPI, __itt_counter, counter_createW, (const wchar_t *name, const wchar_t *domain), (ITT_FORMAT name, domain), counter_createW, __itt_group_counter, \"\\\"%s\\\", \\\"%s\\\"\")\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, __itt_counter, counter_create,  (const char    *name, const char    *domain), (ITT_FORMAT name, domain), counter_create,  __itt_group_counter, \"\\\"%s\\\", \\\"%s\\\"\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, __itt_counter, counter_create_typedA, (const char    *name, const char    *domain, __itt_metadata_type type), (ITT_FORMAT name, domain, type), counter_create_typedA, __itt_group_counter, \"\\\"%s\\\", \\\"%s\\\", %d\")\nITT_STUB(ITTAPI, __itt_counter, counter_create_typedW, (const wchar_t *name, const wchar_t *domain, __itt_metadata_type type), (ITT_FORMAT name, domain, type), counter_create_typedW, __itt_group_counter, \"\\\"%s\\\", \\\"%s\\\", %d\")\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, __itt_counter, counter_create_typed,  (const char    *name, const char    *domain, __itt_metadata_type type), (ITT_FORMAT name, domain, type), counter_create_typed,  __itt_group_counter, \"\\\"%s\\\", \\\"%s\\\", %d\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n\nITT_STUBV(ITTAPI, void, pause,  (void), (ITT_NO_PARAMS), pause,  __itt_group_control | __itt_group_legacy, \"no args\")\nITT_STUBV(ITTAPI, void, resume, (void), (ITT_NO_PARAMS), resume, __itt_group_control | __itt_group_legacy, \"no args\")\nITT_STUBV(ITTAPI, void, pause_scoped,  (__itt_collection_scope scope), (ITT_FORMAT scope), pause_scoped,  __itt_group_control, \"%d\")\nITT_STUBV(ITTAPI, void, resume_scoped, (__itt_collection_scope scope), (ITT_FORMAT scope), resume_scoped, __itt_group_control, \"%d\")\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUBV(ITTAPI, void, thread_set_nameA, (const char    *name), (ITT_FORMAT name), thread_set_nameA, __itt_group_thread, \"\\\"%s\\\"\")\nITT_STUBV(ITTAPI, void, thread_set_nameW, (const wchar_t *name), (ITT_FORMAT name), thread_set_nameW, __itt_group_thread, \"\\\"%S\\\"\")\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nITT_STUBV(ITTAPI, void, thread_set_name,  (const char    *name), (ITT_FORMAT name), thread_set_name,  __itt_group_thread, \"\\\"%s\\\"\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUBV(ITTAPI, void, thread_ignore, (void), (ITT_NO_PARAMS), thread_ignore, __itt_group_thread, \"no args\")\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(LIBITTAPI, int,  thr_name_setA, (const char    *name, int namelen), (ITT_FORMAT name, namelen), thr_name_setA, __itt_group_thread | __itt_group_legacy, \"\\\"%s\\\", %d\")\nITT_STUB(LIBITTAPI, int,  thr_name_setW, (const wchar_t *name, int namelen), (ITT_FORMAT name, namelen), thr_name_setW, __itt_group_thread | __itt_group_legacy, \"\\\"%S\\\", %d\")\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nITT_STUB(LIBITTAPI, int,  thr_name_set,  (const char    *name, int namelen), (ITT_FORMAT name, namelen), thr_name_set,  __itt_group_thread | __itt_group_legacy, \"\\\"%s\\\", %d\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUBV(LIBITTAPI, void, thr_ignore,   (void),                             (ITT_NO_PARAMS),            thr_ignore,    __itt_group_thread | __itt_group_legacy, \"no args\")\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, __itt_histogram*, histogram_createA, (const __itt_domain* domain, const char* name, __itt_metadata_type x_type, __itt_metadata_type y_type), (ITT_FORMAT domain, name, x_type, y_type), histogram_createA, __itt_group_structure, \"%p, \\\"%s\\\", %d, %d\")\nITT_STUB(ITTAPI, __itt_histogram*, histogram_createW, (const __itt_domain* domain, const wchar_t* name, __itt_metadata_type x_type, __itt_metadata_type y_type), (ITT_FORMAT domain, name, x_type, y_type), histogram_createW, __itt_group_structure, \"%p, \\\"%s\\\", %d, %d\")\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, __itt_histogram*, histogram_create, (const __itt_domain* domain, const char* name, __itt_metadata_type x_type, __itt_metadata_type y_type), (ITT_FORMAT domain, name, x_type, y_type), histogram_create, __itt_group_structure, \"%p, \\\"%s\\\", %d, %d\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n  #if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, __itt_counter, counter_createA_v3, (const __itt_domain* domain, const char    *name, __itt_metadata_type type), (ITT_FORMAT domain, name, type), counter_createA_v3, __itt_group_counter, \"%p, \\\"%s\\\", %d\")\nITT_STUB(ITTAPI, __itt_counter, counter_createW_v3, (const __itt_domain* domain, const wchar_t *name, __itt_metadata_type type), (ITT_FORMAT domain, name, type), counter_createW_v3, __itt_group_counter, \"%p, \\\"%s\\\", %d\")\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, __itt_counter, counter_create_v3,  (const __itt_domain* domain, const char    *name, __itt_metadata_type type), (ITT_FORMAT domain, name, type), counter_create_v3,  __itt_group_counter, \"%p, \\\"%s\\\", %d\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\nITT_STUBV(ITTAPI, void, bind_context_metadata_to_counter, (__itt_counter counter, size_t length, __itt_context_metadata* metadata), (ITT_FORMAT counter, length, metadata), bind_context_metadata_to_counter, __itt_group_structure, \"%p, %lu, %p\")\n  \n#endif /* __ITT_INTERNAL_BODY */\n\nITT_STUBV(ITTAPI, void, enable_attach, (void), (ITT_NO_PARAMS), enable_attach, __itt_group_all, \"no args\")\n\n#else  /* __ITT_INTERNAL_INIT */\n\nITT_STUBV(ITTAPI, void, detach, (void), (ITT_NO_PARAMS), detach, __itt_group_control | __itt_group_legacy, \"no args\")\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUBV(ITTAPI, void, sync_createA, (void *addr, const char    *objtype, const char    *objname, int attribute), (ITT_FORMAT addr, objtype, objname, attribute), sync_createA, __itt_group_sync | __itt_group_fsync, \"%p, \\\"%s\\\", \\\"%s\\\", %x\")\nITT_STUBV(ITTAPI, void, sync_createW, (void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute), (ITT_FORMAT addr, objtype, objname, attribute), sync_createW, __itt_group_sync | __itt_group_fsync, \"%p, \\\"%S\\\", \\\"%S\\\", %x\")\nITT_STUBV(ITTAPI, void, sync_renameA, (void *addr, const char    *name), (ITT_FORMAT addr, name), sync_renameA, __itt_group_sync | __itt_group_fsync, \"%p, \\\"%s\\\"\")\nITT_STUBV(ITTAPI, void, sync_renameW, (void *addr, const wchar_t *name), (ITT_FORMAT addr, name), sync_renameW, __itt_group_sync | __itt_group_fsync, \"%p, \\\"%S\\\"\")\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nITT_STUBV(ITTAPI, void, sync_create,  (void *addr, const char    *objtype, const char    *objname, int attribute), (ITT_FORMAT addr, objtype, objname, attribute), sync_create,  __itt_group_sync | __itt_group_fsync, \"%p, \\\"%s\\\", \\\"%s\\\", %x\")\nITT_STUBV(ITTAPI, void, sync_rename,  (void *addr, const char    *name), (ITT_FORMAT addr, name), sync_rename,  __itt_group_sync | __itt_group_fsync, \"%p, \\\"%s\\\"\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUBV(ITTAPI, void, sync_destroy,    (void *addr), (ITT_FORMAT addr), sync_destroy,   __itt_group_sync | __itt_group_fsync, \"%p\")\n\nITT_STUBV(ITTAPI, void, sync_prepare,    (void* addr), (ITT_FORMAT addr), sync_prepare,   __itt_group_sync,  \"%p\")\nITT_STUBV(ITTAPI, void, sync_cancel,     (void *addr), (ITT_FORMAT addr), sync_cancel,    __itt_group_sync,  \"%p\")\nITT_STUBV(ITTAPI, void, sync_acquired,   (void *addr), (ITT_FORMAT addr), sync_acquired,  __itt_group_sync,  \"%p\")\nITT_STUBV(ITTAPI, void, sync_releasing,  (void* addr), (ITT_FORMAT addr), sync_releasing, __itt_group_sync,  \"%p\")\n\nITT_STUBV(ITTAPI, void, suppress_push,       (unsigned int mask),                             (ITT_FORMAT mask), suppress_push,  __itt_group_suppress,  \"%p\")\nITT_STUBV(ITTAPI, void, suppress_pop,        (void),                                          (ITT_NO_PARAMS),   suppress_pop,   __itt_group_suppress,  \"no args\")\nITT_STUBV(ITTAPI, void, suppress_mark_range, (__itt_suppress_mode_t mode, unsigned int mask, void * address, size_t size),(ITT_FORMAT mode, mask, address, size), suppress_mark_range, __itt_group_suppress, \"%d, %p, %p, %d\")\nITT_STUBV(ITTAPI, void, suppress_clear_range,(__itt_suppress_mode_t mode, unsigned int mask, void * address, size_t size),(ITT_FORMAT mode, mask, address, size), suppress_clear_range,__itt_group_suppress, \"%d, %p, %p, %d\")\n\nITT_STUBV(ITTAPI, void, fsync_prepare,   (void* addr), (ITT_FORMAT addr), sync_prepare,   __itt_group_fsync, \"%p\")\nITT_STUBV(ITTAPI, void, fsync_cancel,    (void *addr), (ITT_FORMAT addr), sync_cancel,    __itt_group_fsync, \"%p\")\nITT_STUBV(ITTAPI, void, fsync_acquired,  (void *addr), (ITT_FORMAT addr), sync_acquired,  __itt_group_fsync, \"%p\")\nITT_STUBV(ITTAPI, void, fsync_releasing, (void* addr), (ITT_FORMAT addr), sync_releasing, __itt_group_fsync, \"%p\")\n\nITT_STUBV(ITTAPI, void, model_site_begin,          (__itt_model_site *site, __itt_model_site_instance *instance, const char *name), (ITT_FORMAT site, instance, name), model_site_begin, __itt_group_model, \"%p, %p, \\\"%s\\\"\")\nITT_STUBV(ITTAPI, void, model_site_end,            (__itt_model_site *site, __itt_model_site_instance *instance),                   (ITT_FORMAT site, instance),       model_site_end,   __itt_group_model, \"%p, %p\")\nITT_STUBV(ITTAPI, void, model_task_begin,          (__itt_model_task *task, __itt_model_task_instance *instance, const char *name), (ITT_FORMAT task, instance, name), model_task_begin, __itt_group_model, \"%p, %p, \\\"%s\\\"\")\nITT_STUBV(ITTAPI, void, model_task_end,            (__itt_model_task *task, __itt_model_task_instance *instance),                   (ITT_FORMAT task, instance),       model_task_end,   __itt_group_model, \"%p, %p\")\nITT_STUBV(ITTAPI, void, model_lock_acquire,        (void *lock), (ITT_FORMAT lock), model_lock_acquire, __itt_group_model, \"%p\")\nITT_STUBV(ITTAPI, void, model_lock_release,        (void *lock), (ITT_FORMAT lock), model_lock_release, __itt_group_model, \"%p\")\nITT_STUBV(ITTAPI, void, model_record_allocation,   (void *addr, size_t size), (ITT_FORMAT addr, size), model_record_allocation,   __itt_group_model, \"%p, %d\")\nITT_STUBV(ITTAPI, void, model_record_deallocation, (void *addr),              (ITT_FORMAT addr),       model_record_deallocation, __itt_group_model, \"%p\")\nITT_STUBV(ITTAPI, void, model_induction_uses,      (void* addr, size_t size), (ITT_FORMAT addr, size), model_induction_uses,      __itt_group_model, \"%p, %d\")\nITT_STUBV(ITTAPI, void, model_reduction_uses,      (void* addr, size_t size), (ITT_FORMAT addr, size), model_reduction_uses,      __itt_group_model, \"%p, %d\")\nITT_STUBV(ITTAPI, void, model_observe_uses,        (void* addr, size_t size), (ITT_FORMAT addr, size), model_observe_uses,        __itt_group_model, \"%p, %d\")\nITT_STUBV(ITTAPI, void, model_clear_uses,          (void* addr),              (ITT_FORMAT addr),       model_clear_uses,          __itt_group_model, \"%p\")\n\n#ifndef __ITT_INTERNAL_BODY\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUBV(ITTAPI, void, model_site_beginW,         (const wchar_t *name),     (ITT_FORMAT name),       model_site_beginW,         __itt_group_model, \"\\\"%s\\\"\")\nITT_STUBV(ITTAPI, void, model_task_beginW,         (const wchar_t *name),     (ITT_FORMAT name),       model_task_beginW,         __itt_group_model, \"\\\"%s\\\"\")\nITT_STUBV(ITTAPI, void, model_iteration_taskW,     (const wchar_t *name),     (ITT_FORMAT name),       model_iteration_taskW,     __itt_group_model, \"\\\"%s\\\"\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUBV(ITTAPI, void, model_site_beginA,         (const char *name),        (ITT_FORMAT name),       model_site_beginA,         __itt_group_model, \"\\\"%s\\\"\")\nITT_STUBV(ITTAPI, void, model_site_beginAL,        (const char *name, size_t len), (ITT_FORMAT name, len), model_site_beginAL,    __itt_group_model, \"\\\"%s\\\", %d\")\nITT_STUBV(ITTAPI, void, model_task_beginA,         (const char *name),        (ITT_FORMAT name),       model_task_beginA,         __itt_group_model, \"\\\"%s\\\"\")\nITT_STUBV(ITTAPI, void, model_task_beginAL,        (const char *name, size_t len), (ITT_FORMAT name, len), model_task_beginAL,    __itt_group_model, \"\\\"%s\\\", %d\")\nITT_STUBV(ITTAPI, void, model_iteration_taskA,     (const char *name),        (ITT_FORMAT name),       model_iteration_taskA,     __itt_group_model, \"\\\"%s\\\"\")\nITT_STUBV(ITTAPI, void, model_iteration_taskAL,    (const char *name, size_t len), (ITT_FORMAT name, len), model_iteration_taskAL, __itt_group_model, \"\\\"%s\\\", %d\")\nITT_STUBV(ITTAPI, void, model_site_end_2,          (void),                    (ITT_NO_PARAMS),         model_site_end_2,          __itt_group_model, \"no args\")\nITT_STUBV(ITTAPI, void, model_task_end_2,          (void),                    (ITT_NO_PARAMS),         model_task_end_2,          __itt_group_model, \"no args\")\nITT_STUBV(ITTAPI, void, model_lock_acquire_2,      (void *lock),              (ITT_FORMAT lock),       model_lock_acquire_2,      __itt_group_model, \"%p\")\nITT_STUBV(ITTAPI, void, model_lock_release_2,      (void *lock),              (ITT_FORMAT lock),       model_lock_release_2,      __itt_group_model, \"%p\")\nITT_STUBV(ITTAPI, void, model_aggregate_task,      (size_t count),            (ITT_FORMAT count),      model_aggregate_task,      __itt_group_model, \"%d\")\nITT_STUBV(ITTAPI, void, model_disable_push,        (__itt_model_disable x),   (ITT_FORMAT x),          model_disable_push,        __itt_group_model, \"%p\")\nITT_STUBV(ITTAPI, void, model_disable_pop,         (void),                    (ITT_NO_PARAMS),         model_disable_pop,         __itt_group_model, \"no args\")\n#endif /* __ITT_INTERNAL_BODY */\n\n#ifndef __ITT_INTERNAL_BODY\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, __itt_heap_function, heap_function_createA, (const char    *name, const char    *domain), (ITT_FORMAT name, domain), heap_function_createA, __itt_group_heap, \"\\\"%s\\\", \\\"%s\\\"\")\nITT_STUB(ITTAPI, __itt_heap_function, heap_function_createW, (const wchar_t *name, const wchar_t *domain), (ITT_FORMAT name, domain), heap_function_createW, __itt_group_heap, \"\\\"%s\\\", \\\"%s\\\"\")\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, __itt_heap_function, heap_function_create,  (const char    *name, const char    *domain), (ITT_FORMAT name, domain), heap_function_create,  __itt_group_heap, \"\\\"%s\\\", \\\"%s\\\"\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* __ITT_INTERNAL_BODY */\nITT_STUBV(ITTAPI, void, heap_allocate_begin,   (__itt_heap_function h, size_t size, int initialized),             (ITT_FORMAT h, size, initialized),       heap_allocate_begin, __itt_group_heap, \"%p, %lu, %d\")\nITT_STUBV(ITTAPI, void, heap_allocate_end,     (__itt_heap_function h, void** addr, size_t size, int initialized), (ITT_FORMAT h, addr, size, initialized), heap_allocate_end,   __itt_group_heap, \"%p, %p, %lu, %d\")\nITT_STUBV(ITTAPI, void, heap_free_begin,       (__itt_heap_function h, void*  addr), (ITT_FORMAT h, addr), heap_free_begin, __itt_group_heap, \"%p, %p\")\nITT_STUBV(ITTAPI, void, heap_free_end,         (__itt_heap_function h, void*  addr), (ITT_FORMAT h, addr), heap_free_end,   __itt_group_heap, \"%p, %p\")\nITT_STUBV(ITTAPI, void, heap_reallocate_begin, (__itt_heap_function h, void*  addr, size_t new_size, int initialized),                  (ITT_FORMAT h, addr, new_size, initialized),           heap_reallocate_begin, __itt_group_heap, \"%p, %p, %lu, %d\")\nITT_STUBV(ITTAPI, void, heap_reallocate_end,   (__itt_heap_function h, void*  addr, void** new_addr, size_t new_size, int initialized), (ITT_FORMAT h, addr, new_addr, new_size, initialized), heap_reallocate_end,   __itt_group_heap, \"%p, %p, %p, %lu, %d\")\nITT_STUBV(ITTAPI, void, heap_internal_access_begin, (void), (ITT_NO_PARAMS), heap_internal_access_begin, __itt_group_heap, \"no args\")\nITT_STUBV(ITTAPI, void, heap_internal_access_end,   (void), (ITT_NO_PARAMS), heap_internal_access_end,   __itt_group_heap, \"no args\")\nITT_STUBV(ITTAPI, void, heap_record_memory_growth_begin, (void), (ITT_NO_PARAMS), heap_record_memory_growth_begin, __itt_group_heap, \"no args\")\nITT_STUBV(ITTAPI, void, heap_record_memory_growth_end,   (void), (ITT_NO_PARAMS), heap_record_memory_growth_end,   __itt_group_heap, \"no args\")\nITT_STUBV(ITTAPI, void, heap_reset_detection, (unsigned int reset_mask),  (ITT_FORMAT reset_mask), heap_reset_detection, __itt_group_heap, \"%u\")\nITT_STUBV(ITTAPI, void, heap_record,          (unsigned int record_mask), (ITT_FORMAT record_mask),  heap_record,        __itt_group_heap, \"%u\")\n\nITT_STUBV(ITTAPI, void, id_create,  (const __itt_domain *domain, __itt_id id), (ITT_FORMAT domain, id), id_create,  __itt_group_structure, \"%p, %lu\")\nITT_STUBV(ITTAPI, void, id_destroy, (const __itt_domain *domain, __itt_id id), (ITT_FORMAT domain, id), id_destroy, __itt_group_structure, \"%p, %lu\")\n\nITT_STUB(ITTAPI, __itt_timestamp, get_timestamp, (void), (ITT_NO_PARAMS), get_timestamp,  __itt_group_structure, \"no args\")\n\nITT_STUBV(ITTAPI, void, region_begin, (const __itt_domain *domain, __itt_id id, __itt_id parent, __itt_string_handle *name), (ITT_FORMAT domain, id, parent, name), region_begin, __itt_group_structure, \"%p, %lu, %lu, %p\")\nITT_STUBV(ITTAPI, void, region_end,   (const __itt_domain *domain, __itt_id id),                                             (ITT_FORMAT domain, id),               region_end,   __itt_group_structure, \"%p, %lu\")\n\n#ifndef __ITT_INTERNAL_BODY\nITT_STUBV(ITTAPI, void, frame_begin_v3,  (const __itt_domain *domain, __itt_id *id),                                             (ITT_FORMAT domain, id),             frame_begin_v3,  __itt_group_structure, \"%p, %p\")\nITT_STUBV(ITTAPI, void, frame_end_v3,    (const __itt_domain *domain, __itt_id *id),                                             (ITT_FORMAT domain, id),             frame_end_v3,    __itt_group_structure, \"%p, %p\")\nITT_STUBV(ITTAPI, void, frame_submit_v3, (const __itt_domain *domain, __itt_id *id, __itt_timestamp begin, __itt_timestamp end), (ITT_FORMAT domain, id, begin, end), frame_submit_v3, __itt_group_structure, \"%p, %p, %lu, %lu\")\n#endif /* __ITT_INTERNAL_BODY */\n\nITT_STUBV(ITTAPI, void, task_group,   (const __itt_domain *domain, __itt_id id, __itt_id parent, __itt_string_handle *name), (ITT_FORMAT domain, id, parent, name), task_group,  __itt_group_structure, \"%p, %lu, %lu, %p\")\n\nITT_STUBV(ITTAPI, void, task_begin,    (const __itt_domain *domain, __itt_id id, __itt_id parent, __itt_string_handle *name), (ITT_FORMAT domain, id, parent, name), task_begin,    __itt_group_structure, \"%p, %lu, %lu, %p\")\nITT_STUBV(ITTAPI, void, task_begin_fn, (const __itt_domain *domain, __itt_id id, __itt_id parent, void* fn),                  (ITT_FORMAT domain, id, parent, fn),   task_begin_fn, __itt_group_structure, \"%p, %lu, %lu, %p\")\nITT_STUBV(ITTAPI, void, task_end,      (const __itt_domain *domain),                                                          (ITT_FORMAT domain),                   task_end,      __itt_group_structure, \"%p\")\n\nITT_STUBV(ITTAPI, void, counter_inc_v3,       (const __itt_domain *domain, __itt_string_handle *name),                           (ITT_FORMAT domain, name),        counter_inc_v3,       __itt_group_structure, \"%p, %p\")\nITT_STUBV(ITTAPI, void, counter_inc_delta_v3, (const __itt_domain *domain, __itt_string_handle *name, unsigned long long value), (ITT_FORMAT domain, name, value), counter_inc_delta_v3, __itt_group_structure, \"%p, %p, %lu\")\nITT_STUBV(ITTAPI, void, counter_dec_v3,       (const __itt_domain *domain, __itt_string_handle *name),                           (ITT_FORMAT domain, name),        counter_dec_v3,       __itt_group_structure, \"%p, %p\")\nITT_STUBV(ITTAPI, void, counter_dec_delta_v3, (const __itt_domain *domain, __itt_string_handle *name, unsigned long long value), (ITT_FORMAT domain, name, value), counter_dec_delta_v3, __itt_group_structure, \"%p, %p, %lu\")\n\nITT_STUBV(ITTAPI, void, marker, (const __itt_domain *domain, __itt_id id, __itt_string_handle *name, __itt_scope scope), (ITT_FORMAT domain, id, name, scope), marker, __itt_group_structure, \"%p, %lu, %p, %d\")\n\nITT_STUBV(ITTAPI, void, metadata_add,      (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data), (ITT_FORMAT domain, id, key, type, count, data), metadata_add, __itt_group_structure, \"%p, %lu, %p, %d, %lu, %p\")\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUBV(ITTAPI, void, metadata_str_addA, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char* data, size_t length),    (ITT_FORMAT domain, id, key, data, length), metadata_str_addA, __itt_group_structure, \"%p, %lu, %p, %p, %lu\")\nITT_STUBV(ITTAPI, void, metadata_str_addW, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const wchar_t* data, size_t length), (ITT_FORMAT domain, id, key, data, length), metadata_str_addW, __itt_group_structure, \"%p, %lu, %p, %p, %lu\")\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nITT_STUBV(ITTAPI, void, metadata_str_add,  (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char* data, size_t length),    (ITT_FORMAT domain, id, key, data, length), metadata_str_add,  __itt_group_structure, \"%p, %lu, %p, %p, %lu\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\nITT_STUBV(ITTAPI, void, relation_add_to_current, (const __itt_domain *domain, __itt_relation relation, __itt_id tail),                (ITT_FORMAT domain, relation, tail),       relation_add_to_current, __itt_group_structure, \"%p, %lu, %p\")\nITT_STUBV(ITTAPI, void, relation_add,            (const __itt_domain *domain, __itt_id head, __itt_relation relation, __itt_id tail), (ITT_FORMAT domain, head, relation, tail), relation_add,            __itt_group_structure, \"%p, %p, %lu, %p\")\n\n#ifndef __ITT_INTERNAL_BODY\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(LIBITTAPI, __itt_event, event_createA, (const char    *name, int namelen), (ITT_FORMAT name, namelen), event_createA, __itt_group_mark | __itt_group_legacy, \"\\\"%s\\\", %d\")\nITT_STUB(LIBITTAPI, __itt_event, event_createW, (const wchar_t *name, int namelen), (ITT_FORMAT name, namelen), event_createW, __itt_group_mark | __itt_group_legacy, \"\\\"%S\\\", %d\")\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nITT_STUB(LIBITTAPI, __itt_event, event_create,  (const char    *name, int namelen), (ITT_FORMAT name, namelen), event_create,  __itt_group_mark | __itt_group_legacy, \"\\\"%s\\\", %d\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(LIBITTAPI, int,  event_start,          (__itt_event event),                (ITT_FORMAT event),         event_start,   __itt_group_mark | __itt_group_legacy, \"%d\")\nITT_STUB(LIBITTAPI, int,  event_end,            (__itt_event event),                (ITT_FORMAT event),         event_end,     __itt_group_mark | __itt_group_legacy, \"%d\")\n#endif /* __ITT_INTERNAL_BODY */\n\n#ifndef __ITT_INTERNAL_BODY\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUBV(ITTAPI, void, sync_set_nameA, (void *addr, const char    *objtype, const char    *objname, int attribute), (ITT_FORMAT addr, objtype, objname, attribute), sync_set_nameA, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, \"%p, \\\"%s\\\", \\\"%s\\\", %x\")\nITT_STUBV(ITTAPI, void, sync_set_nameW, (void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute), (ITT_FORMAT addr, objtype, objname, attribute), sync_set_nameW, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, \"%p, \\\"%S\\\", \\\"%S\\\", %x\")\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nITT_STUBV(ITTAPI, void, sync_set_name,  (void *addr, const char    *objtype, const char    *objname, int attribute), (ITT_FORMAT addr, objtype, objname, attribute), sync_set_name,  __itt_group_sync | __itt_group_fsync | __itt_group_legacy, \"p, \\\"%s\\\", \\\"%s\\\", %x\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(LIBITTAPI, int, notify_sync_nameA, (void *p, const char    *objtype, int typelen, const char    *objname, int namelen, int attribute), (ITT_FORMAT p, objtype, typelen, objname, namelen, attribute), notify_sync_nameA, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, \"%p, \\\"%s\\\", %d, \\\"%s\\\", %d, %x\")\nITT_STUB(LIBITTAPI, int, notify_sync_nameW, (void *p, const wchar_t *objtype, int typelen, const wchar_t *objname, int namelen, int attribute), (ITT_FORMAT p, objtype, typelen, objname, namelen, attribute), notify_sync_nameW, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, \"%p, \\\"%S\\\", %d, \\\"%S\\\", %d, %x\")\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nITT_STUB(LIBITTAPI, int, notify_sync_name,  (void *p, const char    *objtype, int typelen, const char    *objname, int namelen, int attribute), (ITT_FORMAT p, objtype, typelen, objname, namelen, attribute), notify_sync_name,  __itt_group_sync | __itt_group_fsync | __itt_group_legacy, \"%p, \\\"%s\\\", %d, \\\"%s\\\", %d, %x\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\nITT_STUBV(LIBITTAPI, void, notify_sync_prepare,   (void *p), (ITT_FORMAT p), notify_sync_prepare,   __itt_group_sync | __itt_group_fsync | __itt_group_legacy, \"%p\")\nITT_STUBV(LIBITTAPI, void, notify_sync_cancel,    (void *p), (ITT_FORMAT p), notify_sync_cancel,    __itt_group_sync | __itt_group_fsync | __itt_group_legacy, \"%p\")\nITT_STUBV(LIBITTAPI, void, notify_sync_acquired,  (void *p), (ITT_FORMAT p), notify_sync_acquired,  __itt_group_sync | __itt_group_fsync | __itt_group_legacy, \"%p\")\nITT_STUBV(LIBITTAPI, void, notify_sync_releasing, (void *p), (ITT_FORMAT p), notify_sync_releasing, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, \"%p\")\n#endif /* __ITT_INTERNAL_BODY */\n\nITT_STUBV(LIBITTAPI, void, memory_read,   (void *addr, size_t size), (ITT_FORMAT addr, size), memory_read,   __itt_group_legacy, \"%p, %lu\")\nITT_STUBV(LIBITTAPI, void, memory_write,  (void *addr, size_t size), (ITT_FORMAT addr, size), memory_write,  __itt_group_legacy, \"%p, %lu\")\nITT_STUBV(LIBITTAPI, void, memory_update, (void *addr, size_t size), (ITT_FORMAT addr, size), memory_update, __itt_group_legacy, \"%p, %lu\")\n\nITT_STUB(LIBITTAPI, __itt_state_t,     state_get,    (void),                                    (ITT_NO_PARAMS),   state_get,    __itt_group_legacy, \"no args\")\nITT_STUB(LIBITTAPI, __itt_state_t,     state_set,    (__itt_state_t s),                         (ITT_FORMAT s),    state_set,    __itt_group_legacy, \"%d\")\nITT_STUB(LIBITTAPI, __itt_obj_state_t, obj_mode_set, (__itt_obj_prop_t p, __itt_obj_state_t s), (ITT_FORMAT p, s), obj_mode_set, __itt_group_legacy, \"%d, %d\")\nITT_STUB(LIBITTAPI, __itt_thr_state_t, thr_mode_set, (__itt_thr_prop_t p, __itt_thr_state_t s), (ITT_FORMAT p, s), thr_mode_set, __itt_group_legacy, \"%d, %d\")\n\n#ifndef __ITT_INTERNAL_BODY\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, __itt_frame, frame_createA, (const char    *domain), (ITT_FORMAT domain), frame_createA, __itt_group_frame, \"\\\"%s\\\"\")\nITT_STUB(ITTAPI, __itt_frame, frame_createW, (const wchar_t *domain), (ITT_FORMAT domain), frame_createW, __itt_group_frame, \"\\\"%s\\\"\")\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, __itt_frame, frame_create,  (const char    *domain), (ITT_FORMAT domain), frame_create,  __itt_group_frame, \"\\\"%s\\\"\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, __itt_pt_region, pt_region_createA, (const char    *name), (ITT_FORMAT name), pt_region_createA, __itt_group_structure, \"\\\"%s\\\"\")\nITT_STUB(ITTAPI, __itt_pt_region, pt_region_createW, (const wchar_t *name), (ITT_FORMAT name), pt_region_createW, __itt_group_structure, \"\\\"%S\\\"\")\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, __itt_pt_region, pt_region_create,  (const char    *name), (ITT_FORMAT name), pt_region_create,  __itt_group_structure, \"\\\"%s\\\"\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* __ITT_INTERNAL_BODY */\nITT_STUBV(ITTAPI, void, frame_begin,         (__itt_frame frame),     (ITT_FORMAT frame),  frame_begin,   __itt_group_frame, \"%p\")\nITT_STUBV(ITTAPI, void, frame_end,           (__itt_frame frame),     (ITT_FORMAT frame),  frame_end,     __itt_group_frame, \"%p\")\n\nITT_STUBV(ITTAPI, void, counter_destroy,      (__itt_counter id),                                                                                  (ITT_FORMAT id),        counter_destroy,   __itt_group_counter, \"%p\")\nITT_STUBV(ITTAPI, void, counter_inc,          (__itt_counter id),                                                                                  (ITT_FORMAT id),        counter_inc,       __itt_group_counter, \"%p\")\nITT_STUBV(ITTAPI, void, counter_inc_delta,    (__itt_counter id, unsigned long long value),                                                        (ITT_FORMAT id, value), counter_inc_delta, __itt_group_counter, \"%p, %lu\")\nITT_STUBV(ITTAPI, void, counter_dec,          (__itt_counter id),                                                                                  (ITT_FORMAT id),        counter_dec,       __itt_group_counter, \"%p\")\nITT_STUBV(ITTAPI, void, counter_dec_delta,    (__itt_counter id, unsigned long long value),                                                        (ITT_FORMAT id, value), counter_dec_delta, __itt_group_counter, \"%p, %lu\")\nITT_STUBV(ITTAPI, void, counter_set_value,    (__itt_counter id, void *value_ptr),                                                                 (ITT_FORMAT id, value_ptr),                          counter_set_value,    __itt_group_counter, \"%p, %p\")\nITT_STUBV(ITTAPI, void, counter_set_value_ex, (__itt_counter id, __itt_clock_domain *clock_domain, unsigned long long timestamp, void *value_ptr), (ITT_FORMAT id, clock_domain, timestamp, value_ptr), counter_set_value_ex, __itt_group_counter, \"%p, %p, %llu, %p\")\n\n#ifndef __ITT_INTERNAL_BODY\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, __itt_mark_type, mark_createA, (const char    *name), (ITT_FORMAT name), mark_createA, __itt_group_mark, \"\\\"%s\\\"\")\nITT_STUB(ITTAPI, __itt_mark_type, mark_createW, (const wchar_t *name), (ITT_FORMAT name), mark_createW, __itt_group_mark, \"\\\"%S\\\"\")\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, __itt_mark_type, mark_create,  (const char    *name), (ITT_FORMAT name), mark_create,  __itt_group_mark, \"\\\"%s\\\"\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* __ITT_INTERNAL_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, int,  markA,        (__itt_mark_type mt, const char    *parameter), (ITT_FORMAT mt, parameter), markA, __itt_group_mark, \"%d, \\\"%s\\\"\")\nITT_STUB(ITTAPI, int,  markW,        (__itt_mark_type mt, const wchar_t *parameter), (ITT_FORMAT mt, parameter), markW, __itt_group_mark, \"%d, \\\"%S\\\"\")\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, int,  mark,         (__itt_mark_type mt, const char    *parameter), (ITT_FORMAT mt, parameter), mark,  __itt_group_mark, \"%d, \\\"%s\\\"\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, int,  mark_off, (__itt_mark_type mt), (ITT_FORMAT mt), mark_off, __itt_group_mark, \"%d\")\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, int,  mark_globalA, (__itt_mark_type mt, const char    *parameter), (ITT_FORMAT mt, parameter), mark_globalA, __itt_group_mark, \"%d, \\\"%s\\\"\")\nITT_STUB(ITTAPI, int,  mark_globalW, (__itt_mark_type mt, const wchar_t *parameter), (ITT_FORMAT mt, parameter), mark_globalW, __itt_group_mark, \"%d, \\\"%S\\\"\")\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, int,  mark_global,  (__itt_mark_type mt, const char    *parameter), (ITT_FORMAT mt, parameter), mark_global,  __itt_group_mark, \"%d, \\\"%S\\\"\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, int,  mark_global_off, (__itt_mark_type mt),                        (ITT_FORMAT mt),            mark_global_off, __itt_group_mark, \"%d\")\n\n#ifndef __ITT_INTERNAL_BODY\nITT_STUB(ITTAPI, __itt_caller, stack_caller_create, (void), (ITT_NO_PARAMS), stack_caller_create,  __itt_group_stitch, \"no args\")\n#endif /* __ITT_INTERNAL_BODY */\nITT_STUBV(ITTAPI, void, stack_caller_destroy, (__itt_caller id), (ITT_FORMAT id), stack_caller_destroy, __itt_group_stitch, \"%p\")\nITT_STUBV(ITTAPI, void, stack_callee_enter,   (__itt_caller id), (ITT_FORMAT id), stack_callee_enter,   __itt_group_stitch, \"%p\")\nITT_STUBV(ITTAPI, void, stack_callee_leave,   (__itt_caller id), (ITT_FORMAT id), stack_callee_leave,   __itt_group_stitch, \"%p\")\n\nITT_STUB(ITTAPI,  __itt_clock_domain*, clock_domain_create, (__itt_get_clock_info_fn fn, void* fn_data), (ITT_FORMAT fn, fn_data), clock_domain_create, __itt_group_structure, \"%p, %p\")\nITT_STUBV(ITTAPI, void,                clock_domain_reset,  (void),                                      (ITT_NO_PARAMS),          clock_domain_reset,  __itt_group_structure, \"no args\")\nITT_STUBV(ITTAPI, void, id_create_ex,  (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id), (ITT_FORMAT domain, clock_domain, timestamp, id), id_create_ex,  __itt_group_structure, \"%p, %p, %lu, %lu\")\nITT_STUBV(ITTAPI, void, id_destroy_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id), (ITT_FORMAT domain, clock_domain, timestamp, id), id_destroy_ex, __itt_group_structure, \"%p, %p, %lu, %lu\")\nITT_STUBV(ITTAPI, void, task_begin_ex,    (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_id parentid, __itt_string_handle *name), (ITT_FORMAT domain, clock_domain, timestamp, id, parentid, name), task_begin_ex, __itt_group_structure, \"%p, %p, %lu, %lu, %lu, %p\")\nITT_STUBV(ITTAPI, void, task_begin_fn_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_id parentid, void* fn),                  (ITT_FORMAT domain, clock_domain, timestamp, id, parentid, fn), task_begin_fn_ex, __itt_group_structure, \"%p, %p, %lu, %lu, %lu, %p\")\nITT_STUBV(ITTAPI, void, task_end_ex,      (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp),                                                            (ITT_FORMAT domain, clock_domain, timestamp), task_end_ex, __itt_group_structure, \"%p, %p, %lu\")\nITT_STUBV(ITTAPI, void, task_begin_overlapped,       (const __itt_domain *domain, __itt_id id, __itt_id parent, __itt_string_handle *name),                                                                   (ITT_FORMAT domain, id, parent, name), task_begin_overlapped, __itt_group_structure, \"%p, %lu, %lu, %p\")\nITT_STUBV(ITTAPI, void, task_begin_overlapped_ex,    (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_id parentid, __itt_string_handle *name), (ITT_FORMAT domain, clock_domain, timestamp, id, parentid, name), task_begin_overlapped_ex, __itt_group_structure, \"%p, %p, %lu, %lu, %lu, %p\")\nITT_STUBV(ITTAPI, void, task_end_overlapped, (const __itt_domain *domain, __itt_id id),                                                                                                                       (ITT_FORMAT domain, id), task_end_overlapped, __itt_group_structure, \"%p, %lu\")\nITT_STUBV(ITTAPI, void, task_end_overlapped_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id),                                                    (ITT_FORMAT domain, clock_domain, timestamp, id), task_end_overlapped_ex, __itt_group_structure, \"%p, %p, %lu, %lu\")\nITT_STUBV(ITTAPI, void, marker_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_string_handle *name, __itt_scope scope), (ITT_FORMAT domain, clock_domain, timestamp, id, name, scope), marker_ex, __itt_group_structure, \"%p, %p, %lu, %lu, %p, %d\")\nITT_STUBV(ITTAPI, void, metadata_add_with_scope, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data), (ITT_FORMAT domain, scope, key, type, count, data), metadata_add_with_scope, __itt_group_structure, \"%p, %d, %p, %d, %lu, %p\")\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUBV(ITTAPI, void, metadata_str_add_with_scopeA, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length),    (ITT_FORMAT domain, scope, key, data, length), metadata_str_add_with_scopeA, __itt_group_structure, \"%p, %d, %p, %p, %lu\")\nITT_STUBV(ITTAPI, void, metadata_str_add_with_scopeW, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const wchar_t *data, size_t length), (ITT_FORMAT domain, scope, key, data, length), metadata_str_add_with_scopeW, __itt_group_structure, \"%p, %d, %p, %p, %lu\")\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nITT_STUBV(ITTAPI, void, metadata_str_add_with_scope,  (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length),    (ITT_FORMAT domain, scope, key, data, length), metadata_str_add_with_scope,  __itt_group_structure, \"%p, %d, %p, %p, %lu\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUBV(ITTAPI, void, relation_add_to_current_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_relation relation, __itt_id tail),                (ITT_FORMAT domain, clock_domain, timestamp, relation, tail),       relation_add_to_current_ex, __itt_group_structure, \"%p, %p, %lu, %d, %lu\")\nITT_STUBV(ITTAPI, void, relation_add_ex,            (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id head, __itt_relation relation, __itt_id tail), (ITT_FORMAT domain, clock_domain, timestamp, head, relation, tail), relation_add_ex,            __itt_group_structure, \"%p, %p, %lu, %lu, %d, %lu\")\nITT_STUB(ITTAPI,  __itt_track_group*, track_group_create, (__itt_string_handle* name, __itt_track_group_type track_group_type),                    (ITT_FORMAT name, track_group_type),        track_group_create, __itt_group_structure, \"%p, %d\")\nITT_STUB(ITTAPI,  __itt_track*,       track_create,       (__itt_track_group* track_group,__itt_string_handle* name, __itt_track_type track_type), (ITT_FORMAT track_group, name, track_type), track_create,       __itt_group_structure, \"%p, %p, %d\")\nITT_STUBV(ITTAPI, void,               set_track,          (__itt_track *track),                                                                    (ITT_FORMAT track),                         set_track,          __itt_group_structure, \"%p\")\n\n#ifndef __ITT_INTERNAL_BODY\nITT_STUB(ITTAPI, const char*, api_version, (void), (ITT_NO_PARAMS), api_version, __itt_group_all & ~__itt_group_legacy, \"no args\")\n#endif /* __ITT_INTERNAL_BODY */\n\n#ifndef __ITT_INTERNAL_BODY\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, int, av_saveA, (void *data, int rank, const int *dimensions, int type, const char *filePath, int columnOrder), (ITT_FORMAT data, rank, dimensions, type, filePath, columnOrder), av_saveA, __itt_group_arrays, \"%p, %d, %p, %d, \\\"%s\\\", %d\")\nITT_STUB(ITTAPI, int, av_saveW, (void *data, int rank, const int *dimensions, int type, const wchar_t *filePath, int columnOrder), (ITT_FORMAT data, rank, dimensions, type, filePath, columnOrder), av_saveW, __itt_group_arrays, \"%p, %d, %p, %d, \\\"%S\\\", %d\")\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, int, av_save,  (void *data, int rank, const int *dimensions, int type, const char *filePath, int columnOrder), (ITT_FORMAT data, rank, dimensions, type, filePath, columnOrder), av_save,  __itt_group_arrays, \"%p, %d, %p, %d, \\\"%s\\\", %d\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* __ITT_INTERNAL_BODY */\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUBV(ITTAPI, void, module_loadA, (void *start_addr, void* end_addr, const char *path), (ITT_FORMAT start_addr, end_addr, path), module_loadA, __itt_group_module, \"%p, %p, %p\")\nITT_STUBV(ITTAPI, void, module_loadW, (void *start_addr, void* end_addr, const wchar_t *path), (ITT_FORMAT start_addr, end_addr, path), module_loadW, __itt_group_module, \"%p, %p, %p\")\n#else  /* ITT_PLATFORM!=ITT_PLATFORM_WIN */\nITT_STUBV(ITTAPI, void, module_load, (void *start_addr, void *end_addr, const char *path), (ITT_FORMAT start_addr, end_addr, path), module_load, __itt_group_module, \"%p, %p, %p\")\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUBV(ITTAPI, void, module_unload, (void *start_addr), (ITT_FORMAT start_addr), module_unload, __itt_group_module, \"%p\")\n\nITT_STUBV(ITTAPI, void, histogram_submit, (__itt_histogram* histogram, size_t length, void* x_data, void* y_data), (ITT_FORMAT histogram, length, x_data, y_data), histogram_submit, __itt_group_structure, \"%p, %lu, %p, %p\")\n\nITT_STUBV(ITTAPI, void, counter_set_value_v3, (__itt_counter counter, void *value_ptr), (ITT_FORMAT counter, value_ptr), counter_set_value_v3, __itt_group_counter, \"%p, %p\")\n  \n#endif /* __ITT_INTERNAL_INIT */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/tools_api/ittnotify_types.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _ITTNOTIFY_TYPES_H_\n#define _ITTNOTIFY_TYPES_H_\n\ntypedef enum ___itt_group_id\n{\n    __itt_group_none      \t\t= 0,\n    __itt_group_legacy    \t\t= 1<<0,\n    __itt_group_control   \t\t= 1<<1,\n    __itt_group_thread    \t\t= 1<<2,\n    __itt_group_mark      \t\t= 1<<3,\n    __itt_group_sync      \t\t= 1<<4,\n    __itt_group_fsync     \t\t= 1<<5,\n    __itt_group_jit       \t\t= 1<<6,\n    __itt_group_model     \t\t= 1<<7,\n    __itt_group_splitter_min \t= 1<<7,\n    __itt_group_counter   \t\t= 1<<8,\n    __itt_group_frame     \t\t= 1<<9,\n    __itt_group_stitch    \t\t= 1<<10,\n    __itt_group_heap      \t\t= 1<<11,\n    __itt_group_splitter_max \t= 1<<12,\n    __itt_group_structure \t\t= 1<<12,\n    __itt_group_suppress \t\t= 1<<13,\n    __itt_group_arrays    \t\t= 1<<14,\n    __itt_group_module    \t\t= 1<<15,\n    __itt_group_all       \t\t= -1\n} __itt_group_id;\n\n#pragma pack(push, 8)\n\ntypedef struct ___itt_group_list\n{\n    __itt_group_id id;\n    const char*    name;\n} __itt_group_list;\n\n#pragma pack(pop)\n\n#define ITT_GROUP_LIST(varname) \\\n    static __itt_group_list varname[] = {       \\\n        { __itt_group_all,       \"all\"       }, \\\n        { __itt_group_control,   \"control\"   }, \\\n        { __itt_group_thread,    \"thread\"    }, \\\n        { __itt_group_mark,      \"mark\"      }, \\\n        { __itt_group_sync,      \"sync\"      }, \\\n        { __itt_group_fsync,     \"fsync\"     }, \\\n        { __itt_group_jit,       \"jit\"       }, \\\n        { __itt_group_model,     \"model\"     }, \\\n        { __itt_group_counter,   \"counter\"   }, \\\n        { __itt_group_frame,     \"frame\"     }, \\\n        { __itt_group_stitch,    \"stitch\"    }, \\\n        { __itt_group_heap,      \"heap\"      }, \\\n        { __itt_group_structure, \"structure\" }, \\\n        { __itt_group_suppress,  \"suppress\"  }, \\\n        { __itt_group_arrays,    \"arrays\"    }, \\\n\t\t{ __itt_group_module,    \"module\"    }, \\\n        { __itt_group_none,      NULL        }  \\\n    }\n\n#endif /* _ITTNOTIFY_TYPES_H_ */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/tools_api/legacy/ittnotify.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _LEGACY_ITTNOTIFY_H_\n#define _LEGACY_ITTNOTIFY_H_\n\n/**\n * @file\n * @brief Legacy User API functions and types\n */\n\n/** @cond exclude_from_documentation */\n#ifndef ITT_OS_WIN\n#  define ITT_OS_WIN   1\n#endif /* ITT_OS_WIN */\n\n#ifndef ITT_OS_LINUX\n#  define ITT_OS_LINUX 2\n#endif /* ITT_OS_LINUX */\n\n#ifndef ITT_OS_MAC\n#  define ITT_OS_MAC   3\n#endif /* ITT_OS_MAC */\n\n#ifndef ITT_OS_FREEBSD\n#  define ITT_OS_FREEBSD   4\n#endif /* ITT_OS_FREEBSD */\n\n#ifndef ITT_OS_OPENBSD\n#  define ITT_OS_OPENBSD   5\n#endif /* ITT_OS_OPENBSD */\n\n#ifndef ITT_OS\n#  if defined WIN32 || defined _WIN32\n#    define ITT_OS ITT_OS_WIN\n#  elif defined( __APPLE__ ) && defined( __MACH__ )\n#    define ITT_OS ITT_OS_MAC\n#  elif defined( __FreeBSD__ )\n#    define ITT_OS ITT_OS_FREEBSD\n#  elif defined( __OpenBSD__ )\n#    define ITT_OS ITT_OS_OPENBSD\n#  else\n#    define ITT_OS ITT_OS_LINUX\n#  endif\n#endif /* ITT_OS */\n\n#ifndef ITT_PLATFORM_WIN\n#  define ITT_PLATFORM_WIN 1\n#endif /* ITT_PLATFORM_WIN */\n\n#ifndef ITT_PLATFORM_POSIX\n#  define ITT_PLATFORM_POSIX 2\n#endif /* ITT_PLATFORM_POSIX */\n\n#ifndef ITT_PLATFORM_MAC\n#  define ITT_PLATFORM_MAC 3\n#endif /* ITT_PLATFORM_MAC */\n\n#ifndef ITT_PLATFORM_FREEBSD\n#  define ITT_PLATFORM_FREEBSD 4\n#endif /* ITT_PLATFORM_FREEBSD */\n\n#ifndef ITT_PLATFORM_OPENBSD\n#  define ITT_PLATFORM_OPENBSD 5\n#endif /* ITT_PLATFORM_OPENBSD */\n\n#ifndef ITT_PLATFORM\n#  if ITT_OS==ITT_OS_WIN\n#    define ITT_PLATFORM ITT_PLATFORM_WIN\n#  elif ITT_OS==ITT_OS_MAC\n#    define ITT_PLATFORM ITT_PLATFORM_MAC\n#  elif ITT_OS==ITT_OS_FREEBSD\n#    define ITT_PLATFORM ITT_PLATFORM_FREEBSD\n#  elif ITT_OS==ITT_OS_OPENBSD\n#    define ITT_PLATFORM ITT_PLATFORM_OPENBSD\n#  else\n#    define ITT_PLATFORM ITT_PLATFORM_POSIX\n#  endif\n#endif /* ITT_PLATFORM */\n\n#if defined(_UNICODE) && !defined(UNICODE)\n#define UNICODE\n#endif\n\n#include <stddef.h>\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#include <tchar.h>\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#include <stdint.h>\n#if defined(UNICODE) || defined(_UNICODE)\n#include <wchar.h>\n#endif /* UNICODE || _UNICODE */\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n#ifndef ITTAPI_CDECL\n#  if ITT_PLATFORM==ITT_PLATFORM_WIN\n#    define ITTAPI_CDECL __cdecl\n#  else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#    if defined _M_IX86 || defined __i386__\n#      define ITTAPI_CDECL __attribute__ ((cdecl))\n#    else  /* _M_IX86 || __i386__ */\n#      define ITTAPI_CDECL /* actual only on x86 platform */\n#    endif /* _M_IX86 || __i386__ */\n#  endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* ITTAPI_CDECL */\n\n#ifndef STDCALL\n#  if ITT_PLATFORM==ITT_PLATFORM_WIN\n#    define STDCALL __stdcall\n#  else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#    if defined _M_IX86 || defined __i386__\n#      define STDCALL __attribute__ ((stdcall))\n#    else  /* _M_IX86 || __i386__ */\n#      define STDCALL /* supported only on x86 platform */\n#    endif /* _M_IX86 || __i386__ */\n#  endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* STDCALL */\n\n#define ITTAPI    ITTAPI_CDECL\n#define LIBITTAPI ITTAPI_CDECL\n\n/* TODO: Temporary for compatibility! */\n#define ITTAPI_CALL    ITTAPI_CDECL\n#define LIBITTAPI_CALL ITTAPI_CDECL\n\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n/* use __forceinline (VC++ specific) */\n#if defined(__MINGW32__) && !defined(__cplusplus)\n#define ITT_INLINE           static __inline__ __attribute__((__always_inline__,__gnu_inline__))\n#else\n#define ITT_INLINE           static __forceinline\n#endif /* __MINGW32__ */\n\n#define ITT_INLINE_ATTRIBUTE /* nothing */\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n/*\n * Generally, functions are not inlined unless optimization is specified.\n * For functions declared inline, this attribute inlines the function even\n * if no optimization level was specified.\n */\n#ifdef __STRICT_ANSI__\n#define ITT_INLINE           static\n#define ITT_INLINE_ATTRIBUTE __attribute__((unused))\n#else  /* __STRICT_ANSI__ */\n#define ITT_INLINE           static inline\n#define ITT_INLINE_ATTRIBUTE __attribute__((always_inline, unused))\n#endif /* __STRICT_ANSI__ */\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n/** @endcond */\n\n/** @cond exclude_from_documentation */\n/* Helper macro for joining tokens */\n#define ITT_JOIN_AUX(p,n) p##n\n#define ITT_JOIN(p,n)     ITT_JOIN_AUX(p,n)\n\n#ifdef ITT_MAJOR\n#undef ITT_MAJOR\n#endif\n#ifdef ITT_MINOR\n#undef ITT_MINOR\n#endif\n#define ITT_MAJOR     3\n#define ITT_MINOR     0\n\n/* Standard versioning of a token with major and minor version numbers */\n#define ITT_VERSIONIZE(x)    \\\n    ITT_JOIN(x,              \\\n    ITT_JOIN(_,              \\\n    ITT_JOIN(ITT_MAJOR,      \\\n    ITT_JOIN(_, ITT_MINOR))))\n\n#ifndef INTEL_ITTNOTIFY_PREFIX\n#  define INTEL_ITTNOTIFY_PREFIX __itt_\n#endif /* INTEL_ITTNOTIFY_PREFIX */\n#ifndef INTEL_ITTNOTIFY_POSTFIX\n#  define INTEL_ITTNOTIFY_POSTFIX _ptr_\n#endif /* INTEL_ITTNOTIFY_POSTFIX */\n\n#define ITTNOTIFY_NAME_AUX(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n)\n#define ITTNOTIFY_NAME(n)     ITT_VERSIONIZE(ITTNOTIFY_NAME_AUX(ITT_JOIN(n,INTEL_ITTNOTIFY_POSTFIX)))\n\n#define ITTNOTIFY_VOID(n) (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)\n#define ITTNOTIFY_DATA(n) (!ITTNOTIFY_NAME(n)) ?       0 : ITTNOTIFY_NAME(n)\n\n#define ITTNOTIFY_VOID_D0(n,d)       (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d)\n#define ITTNOTIFY_VOID_D1(n,d,x)     (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x)\n#define ITTNOTIFY_VOID_D2(n,d,x,y)   (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y)\n#define ITTNOTIFY_VOID_D3(n,d,x,y,z) (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z)\n#define ITTNOTIFY_VOID_D4(n,d,x,y,z,a)     (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a)\n#define ITTNOTIFY_VOID_D5(n,d,x,y,z,a,b)   (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b)\n#define ITTNOTIFY_VOID_D6(n,d,x,y,z,a,b,c) (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c)\n#define ITTNOTIFY_DATA_D0(n,d)       (d == NULL) ? 0 : (!(d)->flags) ?       0 : (!ITTNOTIFY_NAME(n)) ?       0 : ITTNOTIFY_NAME(n)(d)\n#define ITTNOTIFY_DATA_D1(n,d,x)     (d == NULL) ? 0 : (!(d)->flags) ?       0 : (!ITTNOTIFY_NAME(n)) ?       0 : ITTNOTIFY_NAME(n)(d,x)\n#define ITTNOTIFY_DATA_D2(n,d,x,y)   (d == NULL) ? 0 : (!(d)->flags) ?       0 : (!ITTNOTIFY_NAME(n)) ?       0 : ITTNOTIFY_NAME(n)(d,x,y)\n#define ITTNOTIFY_DATA_D3(n,d,x,y,z) (d == NULL) ? 0 : (!(d)->flags) ?       0 : (!ITTNOTIFY_NAME(n)) ?       0 : ITTNOTIFY_NAME(n)(d,x,y,z)\n#define ITTNOTIFY_DATA_D4(n,d,x,y,z,a)     (d == NULL) ? 0 : (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ?       0 : ITTNOTIFY_NAME(n)(d,x,y,z,a)\n#define ITTNOTIFY_DATA_D5(n,d,x,y,z,a,b)   (d == NULL) ? 0 : (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ?       0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b)\n#define ITTNOTIFY_DATA_D6(n,d,x,y,z,a,b,c) (d == NULL) ? 0 : (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ?       0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c)\n\n#ifdef ITT_STUB\n#undef ITT_STUB\n#endif\n#ifdef ITT_STUBV\n#undef ITT_STUBV\n#endif\n#define ITT_STUBV(api,type,name,args)                             \\\n    typedef type (api* ITT_JOIN(ITTNOTIFY_NAME(name),_t)) args;   \\\n    extern ITT_JOIN(ITTNOTIFY_NAME(name),_t) ITTNOTIFY_NAME(name);\n#define ITT_STUB ITT_STUBV\n/** @endcond */\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup legacy Legacy API\n * @{\n * @}\n */\n\n/**\n * @defgroup legacy_control Collection Control\n * @ingroup legacy\n * General behavior: application continues to run, but no profiling information is being collected\n *\n * Pausing occurs not only for the current thread but for all process as well as spawned processes\n * - Intel(R) Parallel Inspector and Intel(R) Inspector XE:\n *   - Does not analyze or report errors that involve memory access.\n *   - Other errors are reported as usual. Pausing data collection in\n *     Intel(R) Parallel Inspector and Intel(R) Inspector XE\n *     only pauses tracing and analyzing memory access.\n *     It does not pause tracing or analyzing threading APIs.\n *   .\n * - Intel(R) VTune(TM) Profiler:\n *   - Does continue to record when new threads are started.\n *   .\n * - Other effects:\n *   - Possible reduction of runtime overhead.\n *   .\n * @{\n */\n#ifndef _ITTNOTIFY_H_\n/** @brief Pause collection */\nvoid ITTAPI __itt_pause(void);\n/** @brief Resume collection */\nvoid ITTAPI __itt_resume(void);\n/** @brief Detach collection */\nvoid ITTAPI __itt_detach(void);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, pause,   (void))\nITT_STUBV(ITTAPI, void, resume,  (void))\nITT_STUBV(ITTAPI, void, detach,  (void))\n#define __itt_pause      ITTNOTIFY_VOID(pause)\n#define __itt_pause_ptr  ITTNOTIFY_NAME(pause)\n#define __itt_resume     ITTNOTIFY_VOID(resume)\n#define __itt_resume_ptr ITTNOTIFY_NAME(resume)\n#define __itt_detach     ITTNOTIFY_VOID(detach)\n#define __itt_detach_ptr ITTNOTIFY_NAME(detach)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_pause()\n#define __itt_pause_ptr  0\n#define __itt_resume()\n#define __itt_resume_ptr 0\n#define __itt_detach()\n#define __itt_detach_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_pause_ptr  0\n#define __itt_resume_ptr 0\n#define __itt_detach_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n#endif /* _ITTNOTIFY_H_ */\n/** @} legacy_control group */\n\n/**\n * @defgroup legacy_threads Threads\n * @ingroup legacy\n * Threads group\n * @warning Legacy API\n * @{\n */\n/**\n * @deprecated Legacy API\n * @brief Set name to be associated with thread in analysis GUI.\n * @return __itt_err upon failure (name or namelen being null,name and namelen mismatched)\n */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nint LIBITTAPI __itt_thr_name_setA(const char    *name, int namelen);\nint LIBITTAPI __itt_thr_name_setW(const wchar_t *name, int namelen);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_thr_name_set     __itt_thr_name_setW\n#  define __itt_thr_name_set_ptr __itt_thr_name_setW_ptr\n#else\n#  define __itt_thr_name_set     __itt_thr_name_setA\n#  define __itt_thr_name_set_ptr __itt_thr_name_setA_ptr\n#endif /* UNICODE */\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nint LIBITTAPI __itt_thr_name_set(const char *name, int namelen);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(LIBITTAPI, int, thr_name_setA, (const char    *name, int namelen))\nITT_STUB(LIBITTAPI, int, thr_name_setW, (const wchar_t *name, int namelen))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(LIBITTAPI, int, thr_name_set,  (const char    *name, int namelen))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_thr_name_setA     ITTNOTIFY_DATA(thr_name_setA)\n#define __itt_thr_name_setA_ptr ITTNOTIFY_NAME(thr_name_setA)\n#define __itt_thr_name_setW     ITTNOTIFY_DATA(thr_name_setW)\n#define __itt_thr_name_setW_ptr ITTNOTIFY_NAME(thr_name_setW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_thr_name_set     ITTNOTIFY_DATA(thr_name_set)\n#define __itt_thr_name_set_ptr ITTNOTIFY_NAME(thr_name_set)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_thr_name_setA(name, namelen)\n#define __itt_thr_name_setA_ptr 0\n#define __itt_thr_name_setW(name, namelen)\n#define __itt_thr_name_setW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_thr_name_set(name, namelen)\n#define __itt_thr_name_set_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_thr_name_setA_ptr 0\n#define __itt_thr_name_setW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_thr_name_set_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @deprecated Legacy API\n * @brief Mark current thread as ignored from this point on, for the duration of its existence.\n */\nvoid LIBITTAPI __itt_thr_ignore(void);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(LIBITTAPI, void, thr_ignore, (void))\n#define __itt_thr_ignore     ITTNOTIFY_VOID(thr_ignore)\n#define __itt_thr_ignore_ptr ITTNOTIFY_NAME(thr_ignore)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_thr_ignore()\n#define __itt_thr_ignore_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_thr_ignore_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} legacy_threads group */\n\n/**\n * @defgroup legacy_sync Synchronization\n * @ingroup legacy\n * Synchronization group\n * @warning Legacy API\n * @{\n */\n/**\n * @hideinitializer\n * @brief possible value of attribute argument for sync object type\n */\n#define __itt_attr_barrier 1\n\n/**\n * @hideinitializer\n * @brief possible value of attribute argument for sync object type\n */\n#define __itt_attr_mutex   2\n\n/**\n * @deprecated Legacy API\n * @brief Assign a name to a sync object using char or Unicode string\n * @param[in] addr    - pointer to the sync object. You should use a real pointer to your object\n *                      to make sure that the values don't clash with other object addresses\n * @param[in] objtype - null-terminated object type string. If NULL is passed, the object will\n *                      be assumed to be of generic \"User Synchronization\" type\n * @param[in] objname - null-terminated object name string. If NULL, no name will be assigned\n *                      to the object -- you can use the __itt_sync_rename call later to assign\n *                      the name\n * @param[in] attribute - one of [#__itt_attr_barrier, #__itt_attr_mutex] values which defines the\n *                      exact semantics of how prepare/acquired/releasing calls work.\n */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nvoid ITTAPI __itt_sync_set_nameA(void *addr, const char    *objtype, const char    *objname, int attribute);\nvoid ITTAPI __itt_sync_set_nameW(void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_sync_set_name     __itt_sync_set_nameW\n#  define __itt_sync_set_name_ptr __itt_sync_set_nameW_ptr\n#else /* UNICODE */\n#  define __itt_sync_set_name     __itt_sync_set_nameA\n#  define __itt_sync_set_name_ptr __itt_sync_set_nameA_ptr\n#endif /* UNICODE */\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nvoid ITTAPI __itt_sync_set_name(void *addr, const char* objtype, const char* objname, int attribute);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUBV(ITTAPI, void, sync_set_nameA, (void *addr, const char    *objtype, const char    *objname, int attribute))\nITT_STUBV(ITTAPI, void, sync_set_nameW, (void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUBV(ITTAPI, void, sync_set_name,  (void *addr, const char    *objtype, const char    *objname, int attribute))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_sync_set_nameA     ITTNOTIFY_VOID(sync_set_nameA)\n#define __itt_sync_set_nameA_ptr ITTNOTIFY_NAME(sync_set_nameA)\n#define __itt_sync_set_nameW     ITTNOTIFY_VOID(sync_set_nameW)\n#define __itt_sync_set_nameW_ptr ITTNOTIFY_NAME(sync_set_nameW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_sync_set_name     ITTNOTIFY_VOID(sync_set_name)\n#define __itt_sync_set_name_ptr ITTNOTIFY_NAME(sync_set_name)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_sync_set_nameA(addr, objtype, objname, attribute)\n#define __itt_sync_set_nameA_ptr 0\n#define __itt_sync_set_nameW(addr, objtype, objname, attribute)\n#define __itt_sync_set_nameW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_sync_set_name(addr, objtype, objname, attribute)\n#define __itt_sync_set_name_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_sync_set_nameA_ptr 0\n#define __itt_sync_set_nameW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_sync_set_name_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @deprecated Legacy API\n * @brief Assign a name and type to a sync object using char or Unicode string\n * @param[in] addr -      pointer to the sync object. You should use a real pointer to your object\n *                        to make sure that the values don't clash with other object addresses\n * @param[in] objtype -   null-terminated object type string. If NULL is passed, the object will\n *                        be assumed to be of generic \"User Synchronization\" type\n * @param[in] objname -   null-terminated object name string. If NULL, no name will be assigned\n *                        to the object -- you can use the __itt_sync_rename call later to assign\n *                        the name\n * @param[in] typelen, namelen -   a length of string for appropriate objtype and objname parameter\n * @param[in] attribute - one of [#__itt_attr_barrier, #__itt_attr_mutex] values which defines the\n *                        exact semantics of how prepare/acquired/releasing calls work.\n * @return __itt_err upon failure (name or namelen being null,name and namelen mismatched)\n */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nint LIBITTAPI __itt_notify_sync_nameA(void *addr, const char    *objtype, int typelen, const char    *objname, int namelen, int attribute);\nint LIBITTAPI __itt_notify_sync_nameW(void *addr, const wchar_t *objtype, int typelen, const wchar_t *objname, int namelen, int attribute);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_notify_sync_name __itt_notify_sync_nameW\n#else\n#  define __itt_notify_sync_name __itt_notify_sync_nameA\n#endif\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nint LIBITTAPI __itt_notify_sync_name(void *addr, const char *objtype, int typelen, const char *objname, int namelen, int attribute);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(LIBITTAPI, int, notify_sync_nameA, (void *addr, const char    *objtype, int typelen, const char    *objname, int namelen, int attribute))\nITT_STUB(LIBITTAPI, int, notify_sync_nameW, (void *addr, const wchar_t *objtype, int typelen, const wchar_t *objname, int namelen, int attribute))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(LIBITTAPI, int, notify_sync_name,  (void *addr, const char    *objtype, int typelen, const char    *objname, int namelen, int attribute))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_notify_sync_nameA     ITTNOTIFY_DATA(notify_sync_nameA)\n#define __itt_notify_sync_nameA_ptr ITTNOTIFY_NAME(notify_sync_nameA)\n#define __itt_notify_sync_nameW     ITTNOTIFY_DATA(notify_sync_nameW)\n#define __itt_notify_sync_nameW_ptr ITTNOTIFY_NAME(notify_sync_nameW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_notify_sync_name     ITTNOTIFY_DATA(notify_sync_name)\n#define __itt_notify_sync_name_ptr ITTNOTIFY_NAME(notify_sync_name)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_notify_sync_nameA(addr, objtype, typelen, objname, namelen, attribute)\n#define __itt_notify_sync_nameA_ptr 0\n#define __itt_notify_sync_nameW(addr, objtype, typelen, objname, namelen, attribute)\n#define __itt_notify_sync_nameW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_notify_sync_name(addr, objtype, typelen, objname, namelen, attribute)\n#define __itt_notify_sync_name_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_notify_sync_nameA_ptr 0\n#define __itt_notify_sync_nameW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_notify_sync_name_ptr 0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @deprecated Legacy API\n * @brief Enter spin loop on user-defined sync object\n */\nvoid LIBITTAPI __itt_notify_sync_prepare(void* addr);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(LIBITTAPI, void, notify_sync_prepare, (void *addr))\n#define __itt_notify_sync_prepare     ITTNOTIFY_VOID(notify_sync_prepare)\n#define __itt_notify_sync_prepare_ptr ITTNOTIFY_NAME(notify_sync_prepare)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_notify_sync_prepare(addr)\n#define __itt_notify_sync_prepare_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_notify_sync_prepare_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @deprecated Legacy API\n * @brief Quit spin loop without acquiring spin object\n */\nvoid LIBITTAPI __itt_notify_sync_cancel(void *addr);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(LIBITTAPI, void, notify_sync_cancel, (void *addr))\n#define __itt_notify_sync_cancel     ITTNOTIFY_VOID(notify_sync_cancel)\n#define __itt_notify_sync_cancel_ptr ITTNOTIFY_NAME(notify_sync_cancel)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_notify_sync_cancel(addr)\n#define __itt_notify_sync_cancel_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_notify_sync_cancel_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @deprecated Legacy API\n * @brief Successful spin loop completion (sync object acquired)\n */\nvoid LIBITTAPI __itt_notify_sync_acquired(void *addr);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(LIBITTAPI, void, notify_sync_acquired, (void *addr))\n#define __itt_notify_sync_acquired     ITTNOTIFY_VOID(notify_sync_acquired)\n#define __itt_notify_sync_acquired_ptr ITTNOTIFY_NAME(notify_sync_acquired)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_notify_sync_acquired(addr)\n#define __itt_notify_sync_acquired_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_notify_sync_acquired_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @deprecated Legacy API\n * @brief Start sync object releasing code. Is called before the lock release call.\n */\nvoid LIBITTAPI __itt_notify_sync_releasing(void* addr);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(LIBITTAPI, void, notify_sync_releasing, (void *addr))\n#define __itt_notify_sync_releasing     ITTNOTIFY_VOID(notify_sync_releasing)\n#define __itt_notify_sync_releasing_ptr ITTNOTIFY_NAME(notify_sync_releasing)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_notify_sync_releasing(addr)\n#define __itt_notify_sync_releasing_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_notify_sync_releasing_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} legacy_sync group */\n\n#ifndef _ITTNOTIFY_H_\n/**\n * @defgroup legacy_events Events\n * @ingroup legacy\n * Events group\n * @{\n */\n\n/** @brief user event type */\ntypedef int __itt_event;\n\n/**\n * @brief Create an event notification\n * @note name or namelen being null/name and namelen not matching, user event feature not enabled\n * @return non-zero event identifier upon success and __itt_err otherwise\n */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n__itt_event LIBITTAPI __itt_event_createA(const char    *name, int namelen);\n__itt_event LIBITTAPI __itt_event_createW(const wchar_t *name, int namelen);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_event_create     __itt_event_createW\n#  define __itt_event_create_ptr __itt_event_createW_ptr\n#else\n#  define __itt_event_create     __itt_event_createA\n#  define __itt_event_create_ptr __itt_event_createA_ptr\n#endif /* UNICODE */\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n__itt_event LIBITTAPI __itt_event_create(const char *name, int namelen);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(LIBITTAPI, __itt_event, event_createA, (const char    *name, int namelen))\nITT_STUB(LIBITTAPI, __itt_event, event_createW, (const wchar_t *name, int namelen))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(LIBITTAPI, __itt_event, event_create,  (const char *name, int namelen))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_event_createA     ITTNOTIFY_DATA(event_createA)\n#define __itt_event_createA_ptr ITTNOTIFY_NAME(event_createA)\n#define __itt_event_createW     ITTNOTIFY_DATA(event_createW)\n#define __itt_event_createW_ptr ITTNOTIFY_NAME(event_createW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_event_create      ITTNOTIFY_DATA(event_create)\n#define __itt_event_create_ptr  ITTNOTIFY_NAME(event_create)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_event_createA(name, namelen) (__itt_event)0\n#define __itt_event_createA_ptr 0\n#define __itt_event_createW(name, namelen) (__itt_event)0\n#define __itt_event_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_event_create(name, namelen)  (__itt_event)0\n#define __itt_event_create_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_event_createA_ptr 0\n#define __itt_event_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_event_create_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Record an event occurrence.\n * @return __itt_err upon failure (invalid event id/user event feature not enabled)\n */\nint LIBITTAPI __itt_event_start(__itt_event event);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUB(LIBITTAPI, int, event_start, (__itt_event event))\n#define __itt_event_start     ITTNOTIFY_DATA(event_start)\n#define __itt_event_start_ptr ITTNOTIFY_NAME(event_start)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_event_start(event) (int)0\n#define __itt_event_start_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_event_start_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @brief Record an event end occurrence.\n * @note It is optional if events do not have durations.\n * @return __itt_err upon failure (invalid event id/user event feature not enabled)\n */\nint LIBITTAPI __itt_event_end(__itt_event event);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUB(LIBITTAPI, int, event_end, (__itt_event event))\n#define __itt_event_end     ITTNOTIFY_DATA(event_end)\n#define __itt_event_end_ptr ITTNOTIFY_NAME(event_end)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_event_end(event) (int)0\n#define __itt_event_end_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_event_end_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} legacy_events group */\n#endif /* _ITTNOTIFY_H_ */\n\n/**\n * @defgroup legacy_memory Memory Accesses\n * @ingroup legacy\n */\n\n/**\n * @deprecated Legacy API\n * @brief Inform the tool of memory accesses on reading\n */\nvoid LIBITTAPI __itt_memory_read(void *addr, size_t size);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(LIBITTAPI, void, memory_read, (void *addr, size_t size))\n#define __itt_memory_read     ITTNOTIFY_VOID(memory_read)\n#define __itt_memory_read_ptr ITTNOTIFY_NAME(memory_read)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_memory_read(addr, size)\n#define __itt_memory_read_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_memory_read_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @deprecated Legacy API\n * @brief Inform the tool of memory accesses on writing\n */\nvoid LIBITTAPI __itt_memory_write(void *addr, size_t size);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(LIBITTAPI, void, memory_write, (void *addr, size_t size))\n#define __itt_memory_write     ITTNOTIFY_VOID(memory_write)\n#define __itt_memory_write_ptr ITTNOTIFY_NAME(memory_write)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_memory_write(addr, size)\n#define __itt_memory_write_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_memory_write_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @deprecated Legacy API\n * @brief Inform the tool of memory accesses on updating\n */\nvoid LIBITTAPI __itt_memory_update(void *address, size_t size);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(LIBITTAPI, void, memory_update, (void *addr, size_t size))\n#define __itt_memory_update     ITTNOTIFY_VOID(memory_update)\n#define __itt_memory_update_ptr ITTNOTIFY_NAME(memory_update)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_memory_update(addr, size)\n#define __itt_memory_update_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_memory_update_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} legacy_memory group */\n\n/**\n * @defgroup legacy_state Thread and Object States\n * @ingroup legacy\n */\n\n/** @brief state type */\ntypedef int __itt_state_t;\n\n/** @cond exclude_from_documentation */\ntypedef enum __itt_obj_state {\n    __itt_obj_state_err = 0,\n    __itt_obj_state_clr = 1,\n    __itt_obj_state_set = 2,\n    __itt_obj_state_use = 3\n} __itt_obj_state_t;\n\ntypedef enum __itt_thr_state {\n    __itt_thr_state_err = 0,\n    __itt_thr_state_clr = 1,\n    __itt_thr_state_set = 2\n} __itt_thr_state_t;\n\ntypedef enum __itt_obj_prop {\n    __itt_obj_prop_watch    = 1,\n    __itt_obj_prop_ignore   = 2,\n    __itt_obj_prop_sharable = 3\n} __itt_obj_prop_t;\n\ntypedef enum __itt_thr_prop {\n    __itt_thr_prop_quiet = 1\n} __itt_thr_prop_t;\n/** @endcond */\n\n/**\n * @deprecated Legacy API\n * @brief managing thread and object states\n */\n__itt_state_t LIBITTAPI __itt_state_get(void);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUB(ITTAPI, __itt_state_t, state_get, (void))\n#define __itt_state_get     ITTNOTIFY_DATA(state_get)\n#define __itt_state_get_ptr ITTNOTIFY_NAME(state_get)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_state_get(void) (__itt_state_t)0\n#define __itt_state_get_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_state_get_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @deprecated Legacy API\n * @brief managing thread and object states\n */\n__itt_state_t LIBITTAPI __itt_state_set(__itt_state_t s);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUB(ITTAPI, __itt_state_t, state_set, (__itt_state_t s))\n#define __itt_state_set     ITTNOTIFY_DATA(state_set)\n#define __itt_state_set_ptr ITTNOTIFY_NAME(state_set)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_state_set(s) (__itt_state_t)0\n#define __itt_state_set_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_state_set_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @deprecated Legacy API\n * @brief managing thread and object modes\n */\n__itt_thr_state_t LIBITTAPI __itt_thr_mode_set(__itt_thr_prop_t p, __itt_thr_state_t s);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUB(ITTAPI, __itt_thr_state_t, thr_mode_set, (__itt_thr_prop_t p, __itt_thr_state_t s))\n#define __itt_thr_mode_set     ITTNOTIFY_DATA(thr_mode_set)\n#define __itt_thr_mode_set_ptr ITTNOTIFY_NAME(thr_mode_set)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_thr_mode_set(p, s) (__itt_thr_state_t)0\n#define __itt_thr_mode_set_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_thr_mode_set_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/**\n * @deprecated Legacy API\n * @brief managing thread and object modes\n */\n__itt_obj_state_t LIBITTAPI __itt_obj_mode_set(__itt_obj_prop_t p, __itt_obj_state_t s);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUB(ITTAPI, __itt_obj_state_t, obj_mode_set, (__itt_obj_prop_t p, __itt_obj_state_t s))\n#define __itt_obj_mode_set     ITTNOTIFY_DATA(obj_mode_set)\n#define __itt_obj_mode_set_ptr ITTNOTIFY_NAME(obj_mode_set)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_obj_mode_set(p, s) (__itt_obj_state_t)0\n#define __itt_obj_mode_set_ptr 0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_obj_mode_set_ptr 0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} legacy_state group */\n\n/**\n * @defgroup frames Frames\n * @ingroup legacy\n * Frames group\n * @{\n */\n/**\n * @brief opaque structure for frame identification\n */\ntypedef struct __itt_frame_t *__itt_frame;\n\n/**\n * @brief Create a global frame with given domain\n */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n__itt_frame ITTAPI __itt_frame_createA(const char    *domain);\n__itt_frame ITTAPI __itt_frame_createW(const wchar_t *domain);\n#if defined(UNICODE) || defined(_UNICODE)\n#  define __itt_frame_create     __itt_frame_createW\n#  define __itt_frame_create_ptr __itt_frame_createW_ptr\n#else /* UNICODE */\n#  define __itt_frame_create     __itt_frame_createA\n#  define __itt_frame_create_ptr __itt_frame_createA_ptr\n#endif /* UNICODE */\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n__itt_frame ITTAPI __itt_frame_create(const char *domain);\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\nITT_STUB(ITTAPI, __itt_frame, frame_createA, (const char    *domain))\nITT_STUB(ITTAPI, __itt_frame, frame_createW, (const wchar_t *domain))\n#else  /* ITT_PLATFORM==ITT_PLATFORM_WIN */\nITT_STUB(ITTAPI, __itt_frame, frame_create,  (const char *domain))\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_frame_createA     ITTNOTIFY_DATA(frame_createA)\n#define __itt_frame_createA_ptr ITTNOTIFY_NAME(frame_createA)\n#define __itt_frame_createW     ITTNOTIFY_DATA(frame_createW)\n#define __itt_frame_createW_ptr ITTNOTIFY_NAME(frame_createW)\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_frame_create     ITTNOTIFY_DATA(frame_create)\n#define __itt_frame_create_ptr ITTNOTIFY_NAME(frame_create)\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_frame_createA(domain)\n#define __itt_frame_createA_ptr 0\n#define __itt_frame_createW(domain)\n#define __itt_frame_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_frame_create(domain)\n#define __itt_frame_create_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#if ITT_PLATFORM==ITT_PLATFORM_WIN\n#define __itt_frame_createA_ptr 0\n#define __itt_frame_createW_ptr 0\n#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#define __itt_frame_create_ptr  0\n#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n\n/** @brief Record a frame begin occurrence. */\nvoid ITTAPI __itt_frame_begin(__itt_frame frame);\n/** @brief Record a frame end occurrence. */\nvoid ITTAPI __itt_frame_end  (__itt_frame frame);\n\n/** @cond exclude_from_documentation */\n#ifndef INTEL_NO_MACRO_BODY\n#ifndef INTEL_NO_ITTNOTIFY_API\nITT_STUBV(ITTAPI, void, frame_begin, (__itt_frame frame))\nITT_STUBV(ITTAPI, void, frame_end,   (__itt_frame frame))\n#define __itt_frame_begin     ITTNOTIFY_VOID(frame_begin)\n#define __itt_frame_begin_ptr ITTNOTIFY_NAME(frame_begin)\n#define __itt_frame_end       ITTNOTIFY_VOID(frame_end)\n#define __itt_frame_end_ptr   ITTNOTIFY_NAME(frame_end)\n#else  /* INTEL_NO_ITTNOTIFY_API */\n#define __itt_frame_begin(frame)\n#define __itt_frame_begin_ptr 0\n#define __itt_frame_end(frame)\n#define __itt_frame_end_ptr   0\n#endif /* INTEL_NO_ITTNOTIFY_API */\n#else  /* INTEL_NO_MACRO_BODY */\n#define __itt_frame_begin_ptr 0\n#define __itt_frame_end_ptr   0\n#endif /* INTEL_NO_MACRO_BODY */\n/** @endcond */\n/** @} frames group */\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n#endif /* _LEGACY_ITTNOTIFY_H_ */\n"
  },
  {
    "path": "third-party/tbb/src/tbb/version.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/version.h\"\n\nextern \"C\" int TBB_runtime_interface_version() {\n    return TBB_INTERFACE_VERSION;\n}\n\nextern \"C\" const char* TBB_runtime_version() {\n    static const char version_str[] = TBB_VERSION_STRING;\n    return version_str;\n}\n"
  },
  {
    "path": "third-party/tbb/src/tbb/waiters.h",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_waiters_H\n#define _TBB_waiters_H\n\n#include \"oneapi/tbb/detail/_task.h\"\n#include \"scheduler_common.h\"\n#include \"arena.h\"\n#include \"threading_control.h\"\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\ninline d1::task* get_self_recall_task(arena_slot& slot);\n\nclass waiter_base {\npublic:\n    waiter_base(arena& a, int yields_multiplier = 1) : my_arena(a), my_backoff(int(a.my_num_slots), yields_multiplier) {}\n\n    bool pause() {\n        if (my_backoff.pause()) {\n            my_arena.out_of_work();\n            return true;\n        }\n\n        return false;\n    }\n\n    void reset_wait() {\n        my_backoff.reset_wait();\n    }\n\nprotected:\n    arena& my_arena;\n    stealing_loop_backoff my_backoff;\n};\n\nclass outermost_worker_waiter : public waiter_base {\npublic:\n    using waiter_base::waiter_base;\n\n    bool continue_execution(arena_slot& slot, d1::task*& t) {\n        __TBB_ASSERT(t == nullptr, nullptr);\n\n        if (is_worker_should_leave(slot)) {\n            if (is_delayed_leave_enabled()) {\n                static constexpr std::chrono::microseconds worker_wait_leave_duration(1000);\n                static_assert(worker_wait_leave_duration > std::chrono::steady_clock::duration(1),\n                              \"Clock resolution is not enough for measured interval.\");\n\n                for (auto t1 = std::chrono::steady_clock::now(), t2 = t1;\n                    std::chrono::duration_cast<std::chrono::microseconds>(t2 - t1) < worker_wait_leave_duration;\n                    t2 = std::chrono::steady_clock::now())\n                {\n                    if (!my_arena.is_empty() && !my_arena.is_recall_requested()) {\n                        return true;\n                    }\n\n                    if (!my_arena.my_thread_leave.is_retention_allowed() ||\n                        my_arena.my_threading_control->is_any_other_client_active())\n                    {\n                        break;\n                    }\n                    d0::yield();\n                }\n            }\n            // Leave dispatch loop\n            return false;\n        }\n\n        t = get_self_recall_task(slot);\n        return true;\n    }\n\n    void pause(arena_slot&) {\n        waiter_base::pause();\n    }\n\n\n    d1::wait_context* wait_ctx() {\n        return nullptr;\n    }\n\n    static bool postpone_execution(d1::task&) {\n        return false;\n    }\n\nprivate:\n    using base_type = waiter_base;\n\n    bool is_delayed_leave_enabled() {\n#if __TBB_PREVIEW_PARALLEL_PHASE\n       return my_arena.my_thread_leave.is_retention_allowed();\n#else\n       return !governor::hybrid_cpu();\n#endif   \n    }\n\n    bool is_worker_should_leave(arena_slot& slot) const {\n        bool is_top_priority_arena = my_arena.is_top_priority();\n        bool is_task_pool_empty = slot.task_pool.load(std::memory_order_relaxed) == EmptyTaskPool;\n\n        if (is_top_priority_arena) {\n            // Worker in most priority arena do not leave arena, until all work in task_pool is done\n            if (is_task_pool_empty && my_arena.is_recall_requested()) {\n                return true;\n            }\n        } else {\n            if (my_arena.is_recall_requested()) {\n                // If worker has work in task pool, we must notify other threads,\n                // because can appear missed wake up of other threads\n                if (!is_task_pool_empty) {\n                    my_arena.advertise_new_work<arena::wakeup>();\n                }\n                return true;\n            }\n        }\n\n        return false;\n    }\n};\n\nclass sleep_waiter : public waiter_base {\nprotected:\n    using waiter_base::waiter_base;\n\n    template <typename Pred>\n    void sleep(std::uintptr_t uniq_tag, Pred wakeup_condition) {\n        my_arena.get_waiting_threads_monitor().wait<thread_control_monitor::thread_context>(wakeup_condition,\n            market_context{uniq_tag, &my_arena});\n        reset_wait();\n    }\n};\n\nclass external_waiter : public sleep_waiter {\npublic:\n    external_waiter(arena& a, d1::wait_context& wo)\n        : sleep_waiter(a, /*yields_multiplier*/10), my_wait_ctx(wo)\n        {}\n\n    bool continue_execution(arena_slot& slot, d1::task*& t) const {\n        __TBB_ASSERT(t == nullptr, nullptr);\n        if (!my_wait_ctx.continue_execution())\n            return false;\n        t = get_self_recall_task(slot);\n        return true;\n    }\n\n    void pause(arena_slot&) {\n        if (!sleep_waiter::pause()) {\n            return;\n        }\n\n        auto wakeup_condition = [&] { return !my_arena.is_empty() || !my_wait_ctx.continue_execution(); };\n\n        sleep(std::uintptr_t(&my_wait_ctx), wakeup_condition);\n    }\n\n    d1::wait_context* wait_ctx() {\n        return &my_wait_ctx;\n    }\n\n    static bool postpone_execution(d1::task&) {\n        return false;\n    }\n\nprivate:\n    d1::wait_context& my_wait_ctx;\n};\n\n#if __TBB_RESUMABLE_TASKS\n\nclass coroutine_waiter : public sleep_waiter {\npublic:\n    using sleep_waiter::sleep_waiter;\n\n    bool continue_execution(arena_slot& slot, d1::task*& t) const {\n        __TBB_ASSERT(t == nullptr, nullptr);\n        t = get_self_recall_task(slot);\n        return true;\n    }\n\n    void pause(arena_slot& slot) {\n        if (!sleep_waiter::pause()) {\n            return;\n        }\n\n        suspend_point_type* sp = slot.default_task_dispatcher().m_suspend_point;\n\n        auto wakeup_condition = [&] { return !my_arena.is_empty() || sp->m_is_owner_recalled.load(std::memory_order_relaxed); };\n\n        sleep(std::uintptr_t(sp), wakeup_condition);\n    }\n\n    d1::wait_context* wait_ctx() {\n        return nullptr;\n    }\n\n    static bool postpone_execution(d1::task& t) {\n        return task_accessor::is_resume_task(t);\n    }\n};\n\n#endif // __TBB_RESUMABLE_TASKS\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#endif // _TBB_waiters_H\n"
  },
  {
    "path": "third-party/tbb/src/tbbbind/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset(CMAKE_SKIP_BUILD_RPATH TRUE)\n\nfunction(tbbbind_build TBBBIND_NAME REQUIRED_HWLOC_TARGET)\n    if (NOT TARGET ${REQUIRED_HWLOC_TARGET})\n        message(STATUS \"HWLOC target ${REQUIRED_HWLOC_TARGET} doesn't exist.\"\n                       \" The ${TBBBIND_NAME} target cannot be created\")\n        return()\n    endif()\n    add_library(${TBBBIND_NAME} tbb_bind.cpp)\n\n    if (WIN32)\n        target_sources(${TBBBIND_NAME} PRIVATE tbb_bind.rc)\n    endif()\n\n    add_library(TBB::${TBBBIND_NAME} ALIAS ${TBBBIND_NAME})\n\n    target_compile_definitions(${TBBBIND_NAME}\n                               PUBLIC\n                               $<$<CONFIG:DEBUG>:TBB_USE_DEBUG>\n                               PRIVATE\n                               __TBBBIND_BUILD)\n    target_include_directories(${TBBBIND_NAME}\n        PUBLIC\n        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include>\n        $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>\n        ${HWLOC_INCLUDE_DIRS} # pkg-config defined\n    )\n\n    target_compile_options(${TBBBIND_NAME}\n        PRIVATE\n        ${TBB_CXX_STD_FLAG} # TODO: consider making it PUBLIC.\n        ${TBB_MMD_FLAG}\n        ${TBB_DSE_FLAG}\n        ${TBB_WARNING_LEVEL}\n        ${TBB_LIB_COMPILE_FLAGS}\n        ${TBB_COMMON_COMPILE_FLAGS}\n    )\n\n    # Avoid use of target_link_libraries here as it changes /DEF option to \\DEF on Windows.\n    set_target_properties(${TBBBIND_NAME} PROPERTIES\n        DEFINE_SYMBOL \"\"\n        VERSION ${TBBBIND_BINARY_VERSION}.${TBB_BINARY_MINOR_VERSION}\n        SOVERSION ${TBBBIND_BINARY_VERSION}\n    )\n\n    tbb_handle_ipo(${TBBBIND_NAME})\n\n    if (TBB_DEF_FILE_PREFIX) # If there's no prefix, assume we're using export directives\n        set_target_properties(${TBBBIND_NAME} PROPERTIES\n            LINK_FLAGS \"${TBB_LINK_DEF_FILE_FLAG}\\\"${CMAKE_CURRENT_SOURCE_DIR}/def/${TBB_DEF_FILE_PREFIX}-tbbbind.def\\\"\"\n            LINK_DEPENDS \"${CMAKE_CURRENT_SOURCE_DIR}/def/${TBB_DEF_FILE_PREFIX}-tbbbind.def\"\n        )\n    endif()\n\n    # Prefer using target_link_options instead of target_link_libraries to specify link options because\n    # target_link_libraries may incorrectly handle some options (on Windows, for example).\n    if (COMMAND target_link_options)\n        target_link_options(${TBBBIND_NAME}\n            PRIVATE\n            ${TBB_LIB_LINK_FLAGS}\n            ${TBB_COMMON_LINK_FLAGS}\n        )\n    else()\n        target_link_libraries(${TBBBIND_NAME}\n            PRIVATE\n            ${TBB_LIB_LINK_FLAGS}\n            ${TBB_COMMON_LINK_FLAGS}\n        )\n    endif()\n\n    target_link_libraries(${TBBBIND_NAME}\n        PUBLIC\n        ${REQUIRED_HWLOC_TARGET}\n        PRIVATE\n        ${TBB_LIB_LINK_LIBS}\n        ${TBB_COMMON_LINK_LIBS}\n    )\n\n    tbb_install_target(${TBBBIND_NAME})\n\nendfunction()\n\nif (NOT DEFINED HWLOC_TARGET_EXPLICITLY_DEFINED AND TARGET PkgConfig::HWLOC)\n    message(STATUS \"The ${TBBBIND_LIBRARY_NAME} target will be configured using the HWLOC ${HWLOC_VERSION}\")\n    tbbbind_build(${TBBBIND_LIBRARY_NAME} PkgConfig::HWLOC)\nelse()\n    tbbbind_build(tbbbind     HWLOC::hwloc_1_11)\n    tbbbind_build(tbbbind_2_0 HWLOC::hwloc_2   )\n    tbbbind_build(tbbbind_2_5 HWLOC::hwloc_2_5 )\nendif()\n\n"
  },
  {
    "path": "third-party/tbb/src/tbbbind/def/lin32-tbbbind.def",
    "content": "/*\n    Copyright (c) 2019-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n{\nglobal:\n__TBB_internal_initialize_system_topology;\n__TBB_internal_apply_affinity;\n__TBB_internal_restore_affinity;\n__TBB_internal_allocate_binding_handler;\n__TBB_internal_deallocate_binding_handler;\n__TBB_internal_get_default_concurrency;\n__TBB_internal_destroy_system_topology;\n};\n"
  },
  {
    "path": "third-party/tbb/src/tbbbind/def/lin64-tbbbind.def",
    "content": "/*\n    Copyright (c) 2019-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n{\nglobal:\n__TBB_internal_initialize_system_topology;\n__TBB_internal_apply_affinity;\n__TBB_internal_restore_affinity;\n__TBB_internal_allocate_binding_handler;\n__TBB_internal_deallocate_binding_handler;\n__TBB_internal_get_default_concurrency;\n__TBB_internal_destroy_system_topology;\n};\n"
  },
  {
    "path": "third-party/tbb/src/tbbbind/def/mac64-tbbbind.def",
    "content": "# Copyright (c) 2023 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n___TBB_internal_initialize_system_topology\n___TBB_internal_get_default_concurrency\n___TBB_internal_destroy_system_topology\n\n"
  },
  {
    "path": "third-party/tbb/src/tbbbind/def/win32-tbbbind.def",
    "content": "; Copyright (c) 2019-2021 Intel Corporation\n;\n; Licensed under the Apache License, Version 2.0 (the \"License\");\n; you may not use this file except in compliance with the License.\n; You may obtain a copy of the License at\n;\n;     http://www.apache.org/licenses/LICENSE-2.0\n;\n; Unless required by applicable law or agreed to in writing, software\n; distributed under the License is distributed on an \"AS IS\" BASIS,\n; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n; See the License for the specific language governing permissions and\n; limitations under the License.\n\nEXPORTS\n\n__TBB_internal_initialize_system_topology\n__TBB_internal_apply_affinity\n__TBB_internal_restore_affinity\n__TBB_internal_allocate_binding_handler\n__TBB_internal_deallocate_binding_handler\n__TBB_internal_get_default_concurrency\n__TBB_internal_destroy_system_topology\n"
  },
  {
    "path": "third-party/tbb/src/tbbbind/def/win64-tbbbind.def",
    "content": "; Copyright (c) 2019-2021 Intel Corporation\n;\n; Licensed under the Apache License, Version 2.0 (the \"License\");\n; you may not use this file except in compliance with the License.\n; You may obtain a copy of the License at\n;\n;     http://www.apache.org/licenses/LICENSE-2.0\n;\n; Unless required by applicable law or agreed to in writing, software\n; distributed under the License is distributed on an \"AS IS\" BASIS,\n; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n; See the License for the specific language governing permissions and\n; limitations under the License.\n\nEXPORTS\n\n__TBB_internal_initialize_system_topology\n__TBB_internal_apply_affinity\n__TBB_internal_restore_affinity\n__TBB_internal_allocate_binding_handler\n__TBB_internal_deallocate_binding_handler\n__TBB_internal_get_default_concurrency\n__TBB_internal_destroy_system_topology\n"
  },
  {
    "path": "third-party/tbb/src/tbbbind/tbb_bind.cpp",
    "content": "/*\n    Copyright (c) 2019-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <vector>\n#include <mutex>\n\n#include \"../tbb/assert_impl.h\" // Out-of-line TBB assertion handling routines are instantiated here.\n#include \"oneapi/tbb/detail/_assert.h\"\n#include \"oneapi/tbb/detail/_config.h\"\n\n#if _MSC_VER && !__INTEL_COMPILER && !__clang__\n#pragma warning( push )\n#pragma warning( disable : 4100 )\n#elif _MSC_VER && __clang__\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wunused-parameter\"\n#endif\n#include <hwloc.h>\n#if _MSC_VER && !__INTEL_COMPILER && !__clang__\n#pragma warning( pop )\n#elif _MSC_VER && __clang__\n#pragma GCC diagnostic pop\n#endif\n\n#define __TBBBIND_HWLOC_HYBRID_CPUS_INTERFACES_PRESENT (HWLOC_API_VERSION >= 0x20400)\n#define __TBBBIND_HWLOC_TOPOLOGY_FLAG_RESTRICT_TO_CPUBINDING_PRESENT (HWLOC_API_VERSION >= 0x20500)\n#define __TBBBIND_HWLOC_WINDOWS_API_AVAILABLE (_WIN32 && HWLOC_API_VERSION >= 0x20500)\n#if __TBBBIND_HWLOC_WINDOWS_API_AVAILABLE\n    #include <hwloc/windows.h>\n#endif\n\n// Most of hwloc calls returns negative exit code on error.\n// This macro tracks error codes that are returned from the hwloc interfaces.\n#define assertion_hwloc_wrapper(command, ...) \\\n        __TBB_ASSERT_EX( (command(__VA_ARGS__)) >= 0, \"Error occurred during call to hwloc API.\");\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\n\n//------------------------------------------------------------------------\n// Information about the machine's hardware TBB is happen to work on\n//------------------------------------------------------------------------\nclass system_topology {\n    friend class binding_handler;\n\n    // Common topology members\n    hwloc_topology_t topology{nullptr};\n    hwloc_cpuset_t   process_cpu_affinity_mask{nullptr};\n    hwloc_nodeset_t  process_node_affinity_mask{nullptr};\n    std::size_t number_of_processors_groups{1};\n    std::vector<hwloc_cpuset_t> processor_groups_affinity_masks_list{};\n\n    // NUMA API related topology members\n    std::vector<hwloc_cpuset_t> numa_affinity_masks_list{};\n    std::vector<int> numa_indexes_list{};\n    int numa_nodes_count{0};\n\n    // Hybrid CPUs API related topology members\n    std::vector<hwloc_cpuset_t> core_types_affinity_masks_list{};\n    std::vector<int> core_types_indexes_list{};\n\n    enum init_stages { uninitialized,\n                       started,\n                       topology_allocated,\n                       topology_loaded,\n                       topology_parsed } initialization_state;\n\n    // Binding threads that locate in another Windows Processor groups\n    // is allowed only if machine topology contains several Windows Processors groups\n    // and process affinity mask wasn't limited manually (affinity mask cannot violate\n    // processors group boundaries).\n    bool intergroup_binding_allowed(std::size_t groups_num) { return groups_num > 1; }\n\nprivate:\n    void topology_initialization(std::size_t groups_num) {\n        initialization_state = started;\n\n        // Parse topology\n        if ( hwloc_topology_init( &topology ) == 0 ) {\n            initialization_state = topology_allocated;\n#if __TBBBIND_HWLOC_TOPOLOGY_FLAG_RESTRICT_TO_CPUBINDING_PRESENT\n            unsigned long flags = 0;\n            if (groups_num > 1) {\n                // HWLOC x86 backend might interfere with process affinity mask on\n                // Windows systems with multiple processor groups.\n                flags = HWLOC_TOPOLOGY_FLAG_DONT_CHANGE_BINDING;\n            } else {\n                flags = HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM | HWLOC_TOPOLOGY_FLAG_RESTRICT_TO_CPUBINDING;\n            }\n            if (hwloc_topology_set_flags(topology, flags) != 0) {\n                return;\n            }\n#endif\n            if ( hwloc_topology_load( topology ) == 0 ) {\n                initialization_state = topology_loaded;\n            }\n        }\n        if ( initialization_state != topology_loaded )\n            return;\n\n#if __TBB_CPUBIND_PRESENT\n        // Getting process affinity mask\n        if ( intergroup_binding_allowed(groups_num) ) {\n            process_cpu_affinity_mask  = hwloc_bitmap_dup(hwloc_topology_get_complete_cpuset (topology));\n            process_node_affinity_mask = hwloc_bitmap_dup(hwloc_topology_get_complete_nodeset(topology));\n        } else {\n            process_cpu_affinity_mask  = hwloc_bitmap_alloc();\n            process_node_affinity_mask = hwloc_bitmap_alloc();\n\n            assertion_hwloc_wrapper(hwloc_get_cpubind, topology, process_cpu_affinity_mask, 0);\n            hwloc_cpuset_to_nodeset(topology, process_cpu_affinity_mask, process_node_affinity_mask);\n        }\n#else\n        process_cpu_affinity_mask  = hwloc_bitmap_dup(hwloc_topology_get_complete_cpuset (topology));\n        process_node_affinity_mask = hwloc_bitmap_dup(hwloc_topology_get_complete_nodeset(topology));\n#endif\n\n        number_of_processors_groups = groups_num;\n    }\n\n    void numa_topology_parsing() {\n        // Fill parameters with stubs if topology parsing is broken.\n        if ( initialization_state != topology_loaded ) {\n            numa_nodes_count = 1;\n            numa_indexes_list.push_back(-1);\n            return;\n        }\n\n        // If system contains no NUMA nodes, HWLOC 1.11 returns an infinitely filled bitmap.\n        // hwloc_bitmap_weight() returns negative value for such bitmaps, so we use this check\n        // to change way of topology initialization.\n        numa_nodes_count = hwloc_bitmap_weight(process_node_affinity_mask);\n        if (numa_nodes_count <= 0) {\n            // numa_nodes_count may be empty if the process affinity mask is empty too (invalid case)\n            // or if some internal HWLOC error occurred.\n            // So we place -1 as index in this case.\n            numa_indexes_list.push_back(numa_nodes_count == 0 ? -1 : 0);\n            numa_nodes_count = 1;\n\n            numa_affinity_masks_list.push_back(hwloc_bitmap_dup(process_cpu_affinity_mask));\n        } else {\n            // Get NUMA logical indexes list\n            unsigned counter = 0;\n            int i = 0;\n            int max_numa_index = -1;\n            numa_indexes_list.resize(numa_nodes_count);\n            hwloc_obj_t node_buffer;\n            hwloc_bitmap_foreach_begin(i, process_node_affinity_mask) {\n                node_buffer = hwloc_get_numanode_obj_by_os_index(topology, i);\n                numa_indexes_list[counter] = static_cast<int>(node_buffer->logical_index);\n\n                if ( numa_indexes_list[counter] > max_numa_index ) {\n                    max_numa_index = numa_indexes_list[counter];\n                }\n\n                counter++;\n            } hwloc_bitmap_foreach_end();\n            __TBB_ASSERT(max_numa_index >= 0, \"Maximal NUMA index must not be negative\");\n\n            // Fill concurrency and affinity masks lists\n            numa_affinity_masks_list.resize(max_numa_index + 1);\n            int index = 0;\n            hwloc_bitmap_foreach_begin(i, process_node_affinity_mask) {\n                node_buffer = hwloc_get_numanode_obj_by_os_index(topology, i);\n                index = static_cast<int>(node_buffer->logical_index);\n\n                hwloc_cpuset_t& current_mask = numa_affinity_masks_list[index];\n                current_mask = hwloc_bitmap_dup(node_buffer->cpuset);\n\n                hwloc_bitmap_and(current_mask, current_mask, process_cpu_affinity_mask);\n                __TBB_ASSERT(!hwloc_bitmap_iszero(current_mask), \"hwloc detected unavailable NUMA node\");\n            } hwloc_bitmap_foreach_end();\n        }\n    }\n\n    void core_types_topology_parsing() {\n        // Fill parameters with stubs if topology parsing is broken.\n        if ( initialization_state != topology_loaded ) {\n            core_types_indexes_list.push_back(-1);\n            return;\n        }\n#if __TBBBIND_HWLOC_HYBRID_CPUS_INTERFACES_PRESENT\n        __TBB_ASSERT(hwloc_get_api_version() >= 0x20400, \"Hybrid CPUs support interfaces required HWLOC >= 2.4\");\n        // Parsing the hybrid CPU topology\n        int core_types_number = hwloc_cpukinds_get_nr(topology, 0);\n        bool core_types_parsing_broken = core_types_number <= 0;\n        if (!core_types_parsing_broken) {\n            core_types_affinity_masks_list.resize(core_types_number);\n            int efficiency{-1};\n\n            for (int core_type = 0; core_type < core_types_number; ++core_type) {\n                hwloc_cpuset_t& current_mask = core_types_affinity_masks_list[core_type];\n                current_mask = hwloc_bitmap_alloc();\n\n                if (!hwloc_cpukinds_get_info(topology, core_type, current_mask, &efficiency, nullptr, nullptr, 0)\n                    && efficiency >= 0\n                ) {\n                    hwloc_bitmap_and(current_mask, current_mask, process_cpu_affinity_mask);\n\n                    if (hwloc_bitmap_weight(current_mask) > 0) {\n                        core_types_indexes_list.push_back(core_type);\n                    }\n                    __TBB_ASSERT(hwloc_bitmap_weight(current_mask) >= 0, \"Infinivitely filled core type mask\");\n                } else {\n                    core_types_parsing_broken = true;\n                    break;\n                }\n            }\n        }\n#else /*!__TBBBIND_HWLOC_HYBRID_CPUS_INTERFACES_PRESENT*/\n        bool core_types_parsing_broken{true};\n#endif /*__TBBBIND_HWLOC_HYBRID_CPUS_INTERFACES_PRESENT*/\n\n        if (core_types_parsing_broken) {\n            for (auto& core_type_mask : core_types_affinity_masks_list) {\n                hwloc_bitmap_free(core_type_mask);\n            }\n            core_types_affinity_masks_list.resize(1);\n            core_types_indexes_list.resize(1);\n\n            core_types_affinity_masks_list[0] = hwloc_bitmap_dup(process_cpu_affinity_mask);\n            core_types_indexes_list[0] = -1;\n        }\n    }\n\n#if __TBBBIND_HWLOC_WINDOWS_API_AVAILABLE\n    void processor_groups_topology_parsing() {\n        __TBB_ASSERT(number_of_processors_groups > 1, nullptr);\n        processor_groups_affinity_masks_list.resize(number_of_processors_groups);\n        for (unsigned group = 0; group < number_of_processors_groups; ++group) {\n            processor_groups_affinity_masks_list[group] = hwloc_bitmap_alloc();\n            assertion_hwloc_wrapper(hwloc_windows_get_processor_group_cpuset, topology, group,\n                                    processor_groups_affinity_masks_list[group], /*flags*/0);\n        }\n\n#if TBB_USE_ASSERT\n        affinity_mask tmp = hwloc_bitmap_alloc();\n        for (auto proc_group_mask : processor_groups_affinity_masks_list) {\n            __TBB_ASSERT(!hwloc_bitmap_intersects(tmp, proc_group_mask), \"Masks of processor groups intersect.\");\n            hwloc_bitmap_or(tmp, tmp, proc_group_mask);\n        }\n        hwloc_bitmap_free(tmp);\n#endif\n    }\n#endif\n\n    void enforce_hwloc_2_5_runtime_linkage() {\n        // Without the call of this function HWLOC 2.4 can be successfully loaded during the tbbbind_2_5 loading.\n        // It is possible since tbbbind_2_5 don't use any new entry points that were introduced in HWLOC 2.5\n        // But tbbbind_2_5 compiles with HWLOC 2.5 header, therefore such situation requires binary forward compatibility\n        // which are not guaranteed by the HWLOC library. To enforce linkage tbbbind_2_5 only with HWLOC >= 2.5 version\n        // this function calls the interface that is available in the HWLOC 2.5 only.\n#if HWLOC_API_VERSION >= 0x20500\n        auto some_core = hwloc_get_next_obj_by_type(topology, HWLOC_OBJ_CORE, nullptr);\n        hwloc_get_obj_with_same_locality(topology, some_core, HWLOC_OBJ_CORE, nullptr, nullptr, 0);\n#endif\n    }\n\n\n    void initialize( std::size_t groups_num ) {\n        if ( initialization_state != uninitialized )\n            return;\n\n        topology_initialization(groups_num);\n        numa_topology_parsing();\n        core_types_topology_parsing();\n#if __TBBBIND_HWLOC_WINDOWS_API_AVAILABLE\n        if (intergroup_binding_allowed(groups_num)) {\n           processor_groups_topology_parsing();\n        }\n#endif\n\n        enforce_hwloc_2_5_runtime_linkage();\n\n        if (initialization_state == topology_loaded)\n            initialization_state = topology_parsed;\n    }\n\n    static system_topology* instance_ptr;\npublic:\n    typedef hwloc_cpuset_t             affinity_mask;\n    typedef hwloc_const_cpuset_t const_affinity_mask;\n\n    bool is_topology_parsed() { return initialization_state == topology_parsed; }\n\n    static void construct( std::size_t groups_num ) {\n        if (instance_ptr == nullptr) {\n            instance_ptr = new system_topology();\n            instance_ptr->initialize(groups_num);\n        }\n    }\n\n    static system_topology& instance() {\n        __TBB_ASSERT(instance_ptr != nullptr, \"Getting instance of non-constructed topology\");\n        return *instance_ptr;\n    }\n\n    static void destroy() {\n        __TBB_ASSERT(instance_ptr != nullptr, \"Destroying non-constructed topology\");\n        delete instance_ptr;\n    }\n\n    ~system_topology() {\n        if ( is_topology_parsed() ) {\n            for (auto& numa_node_mask : numa_affinity_masks_list) {\n                hwloc_bitmap_free(numa_node_mask);\n            }\n\n            for (auto& core_type_mask : core_types_affinity_masks_list) {\n                hwloc_bitmap_free(core_type_mask);\n            }\n\n            for (auto& processor_group : processor_groups_affinity_masks_list) {\n                hwloc_bitmap_free(processor_group);\n            }\n\n            hwloc_bitmap_free(process_node_affinity_mask);\n            hwloc_bitmap_free(process_cpu_affinity_mask);\n        }\n\n        if ( initialization_state >= topology_allocated ) {\n            hwloc_topology_destroy(topology);\n        }\n\n        initialization_state = uninitialized;\n    }\n\n    void fill_topology_information(\n        int& _numa_nodes_count, int*& _numa_indexes_list,\n        int& _core_types_count, int*& _core_types_indexes_list\n    ) {\n        __TBB_ASSERT(is_topology_parsed(), \"Trying to get access to uninitialized system_topology\");\n        _numa_nodes_count = numa_nodes_count;\n        _numa_indexes_list = numa_indexes_list.data();\n\n        _core_types_count = (int)core_types_indexes_list.size();\n        _core_types_indexes_list = core_types_indexes_list.data();\n    }\n\n    void fill_constraints_affinity_mask(affinity_mask input_mask, int numa_node_index, int core_type_index, int max_threads_per_core) {\n        __TBB_ASSERT(is_topology_parsed(), \"Trying to get access to uninitialized system_topology\");\n        __TBB_ASSERT(numa_node_index < (int)numa_affinity_masks_list.size(), \"Wrong NUMA node id\");\n        __TBB_ASSERT(core_type_index < (int)core_types_affinity_masks_list.size(), \"Wrong core type id\");\n        __TBB_ASSERT(max_threads_per_core == -1 || max_threads_per_core > 0, \"Wrong max_threads_per_core\");\n\n        hwloc_cpuset_t constraints_mask = hwloc_bitmap_alloc();\n        hwloc_cpuset_t core_mask = hwloc_bitmap_alloc();\n\n        hwloc_bitmap_copy(constraints_mask, process_cpu_affinity_mask);\n        if (numa_node_index >= 0) {\n            hwloc_bitmap_and(constraints_mask, constraints_mask, numa_affinity_masks_list[numa_node_index]);\n        }\n        if (core_type_index >= 0) {\n            hwloc_bitmap_and(constraints_mask, constraints_mask, core_types_affinity_masks_list[core_type_index]);\n        }\n        if (max_threads_per_core > 0) {\n            // clear input mask\n            hwloc_bitmap_zero(input_mask);\n\n            hwloc_obj_t current_core = nullptr;\n            while ((current_core = hwloc_get_next_obj_by_type(topology, HWLOC_OBJ_CORE, current_core)) != nullptr) {\n                hwloc_bitmap_and(core_mask, constraints_mask, current_core->cpuset);\n\n                // fit the core mask to required bits number\n                int current_threads_per_core = 0;\n                for (int id = hwloc_bitmap_first(core_mask); id != -1; id = hwloc_bitmap_next(core_mask, id)) {\n                    if (++current_threads_per_core > max_threads_per_core) {\n                        hwloc_bitmap_clr(core_mask, id);\n                    }\n                }\n\n                hwloc_bitmap_or(input_mask, input_mask, core_mask);\n            }\n        } else {\n            hwloc_bitmap_copy(input_mask, constraints_mask);\n        }\n\n        hwloc_bitmap_free(core_mask);\n        hwloc_bitmap_free(constraints_mask);\n    }\n\n    void fit_num_threads_per_core(affinity_mask result_mask, affinity_mask current_mask, affinity_mask constraints_mask) {\n        hwloc_bitmap_zero(result_mask);\n        hwloc_obj_t current_core = nullptr;\n        while ((current_core = hwloc_get_next_obj_by_type(topology, HWLOC_OBJ_CORE, current_core)) != nullptr) {\n            if (hwloc_bitmap_intersects(current_mask, current_core->cpuset)) {\n                hwloc_bitmap_or(result_mask, result_mask, current_core->cpuset);\n            }\n        }\n        hwloc_bitmap_and(result_mask, result_mask, constraints_mask);\n    }\n\n    /**\n     * Finds processor group for the passed slot number, which are from 0 to max concurrency - 1, by\n     * traversing masks of processor groups one by one, intersecting them with the constrained mask.\n     * Once total weight of processor groups united mask is greater than the slot number, the mask\n     * of the last traversed processor group is returned, denoting the mask to apply to the thread\n     * occupying given slot number.\n     */\n    void fit_to_processor_group(affinity_mask result_mask, affinity_mask constraints_mask, std::size_t slot_num) {\n        __TBB_ASSERT(number_of_processors_groups > 1, nullptr);\n        hwloc_bitmap_zero(result_mask);\n        int constraints_mask_weight = hwloc_bitmap_weight(constraints_mask);\n        // Map slot number to a number within constraints mask if\n        // max concurrency is greater than weight of the mask.\n        slot_num %= constraints_mask_weight;\n        std::size_t total_weight = 0;\n        for (auto& processor_group : processor_groups_affinity_masks_list) {\n            if (hwloc_bitmap_intersects(constraints_mask, processor_group)) {\n                hwloc_bitmap_and(result_mask, processor_group, constraints_mask);\n                total_weight += hwloc_bitmap_weight(result_mask);\n                if (slot_num < total_weight) {\n                    return;     // Corresponding processor group where to bind the thread is found\n                }\n            }\n        }\n    }\n\n    int get_default_concurrency(int numa_node_index, int core_type_index, int max_threads_per_core) {\n        __TBB_ASSERT(is_topology_parsed(), \"Trying to get access to uninitialized system_topology\");\n\n        hwloc_cpuset_t constraints_mask = hwloc_bitmap_alloc();\n        fill_constraints_affinity_mask(constraints_mask, numa_node_index, core_type_index, max_threads_per_core);\n\n        int default_concurrency = hwloc_bitmap_weight(constraints_mask);\n        hwloc_bitmap_free(constraints_mask);\n        return default_concurrency;\n    }\n\n    affinity_mask allocate_process_affinity_mask() {\n        __TBB_ASSERT(is_topology_parsed(), \"Trying to get access to uninitialized system_topology\");\n        return hwloc_bitmap_dup(process_cpu_affinity_mask);\n    }\n\n    void free_affinity_mask( affinity_mask mask_to_free ) {\n        hwloc_bitmap_free(mask_to_free); // If bitmap is nullptr, no operation is performed.\n    }\n\n    void store_current_affinity_mask( affinity_mask current_mask ) {\n        assertion_hwloc_wrapper(hwloc_get_cpubind, topology, current_mask, HWLOC_CPUBIND_THREAD);\n\n        hwloc_bitmap_and(current_mask, current_mask, process_cpu_affinity_mask);\n        __TBB_ASSERT(!hwloc_bitmap_iszero(current_mask),\n            \"Current affinity mask must intersects with process affinity mask\");\n    }\n\n    void set_affinity_mask( const_affinity_mask mask ) {\n        if (hwloc_bitmap_weight(mask) > 0) {\n            assertion_hwloc_wrapper(hwloc_set_cpubind, topology, mask, HWLOC_CPUBIND_THREAD);\n        }\n    }\n};\n\nsystem_topology* system_topology::instance_ptr{nullptr};\n\nclass binding_handler {\n    // Following vector saves thread affinity mask on scheduler entry to return it to this thread\n    // on scheduler exit.\n    typedef std::vector<system_topology::affinity_mask> affinity_masks_container;\n    affinity_masks_container affinity_backup;\n    system_topology::affinity_mask handler_affinity_mask;\n\n#ifdef _WIN32\n    affinity_masks_container affinity_buffer;\n    int my_numa_node_id;\n    int my_core_type_id;\n    int my_max_threads_per_core;\n#endif\n\npublic:\n    binding_handler( std::size_t size, int numa_node_id, int core_type_id, int max_threads_per_core )\n        : affinity_backup(size)\n#ifdef _WIN32\n        , affinity_buffer(size)\n        , my_numa_node_id(numa_node_id)\n        , my_core_type_id(core_type_id)\n        , my_max_threads_per_core(max_threads_per_core)\n#endif\n    {\n        for (std::size_t i = 0; i < size; ++i) {\n            affinity_backup[i] = system_topology::instance().allocate_process_affinity_mask();\n#ifdef _WIN32\n            affinity_buffer[i] = system_topology::instance().allocate_process_affinity_mask();\n#endif\n        }\n        handler_affinity_mask = system_topology::instance().allocate_process_affinity_mask();\n        system_topology::instance().fill_constraints_affinity_mask\n            (handler_affinity_mask, numa_node_id, core_type_id, max_threads_per_core);\n    }\n\n    ~binding_handler() {\n        for (std::size_t i = 0; i < affinity_backup.size(); ++i) {\n            system_topology::instance().free_affinity_mask(affinity_backup[i]);\n#ifdef _WIN32\n            system_topology::instance().free_affinity_mask(affinity_buffer[i]);\n#endif\n        }\n        system_topology::instance().free_affinity_mask(handler_affinity_mask);\n    }\n\n    void apply_affinity( unsigned slot_num ) {\n        auto& topology = system_topology::instance();\n        __TBB_ASSERT(slot_num < affinity_backup.size(),\n            \"The slot number is greater than the number of slots in the arena\");\n        __TBB_ASSERT(topology.is_topology_parsed(),\n            \"Trying to get access to uninitialized system_topology\");\n\n        topology.store_current_affinity_mask(affinity_backup[slot_num]);\n        system_topology::affinity_mask thread_affinity = handler_affinity_mask;\n#ifdef _WIN32\n        // If we have a constraint based only on the max_threads_per_core setting, then the\n        // constraints affinity mask may cross the border between several processor groups\n        // on systems with more then 64 logical processors. That is why we need to use the special\n        // function, which regulates the number of threads in the current threads mask.\n        bool is_default_numa = my_numa_node_id == -1 || topology.numa_indexes_list.size() == 1;\n        bool is_default_core_type = my_core_type_id == -1 || topology.core_types_indexes_list.size() == 1;\n        if (topology.number_of_processors_groups > 1 && my_max_threads_per_core != -1 &&\n            is_default_numa && is_default_core_type\n        ) {\n            topology.fit_num_threads_per_core(affinity_buffer[slot_num], affinity_backup[slot_num], handler_affinity_mask);\n            thread_affinity = affinity_buffer[slot_num];\n        }\n    #if __TBBBIND_HWLOC_WINDOWS_API_AVAILABLE\n        else if (topology.number_of_processors_groups > 1) {\n            topology.fit_to_processor_group(affinity_buffer[slot_num], handler_affinity_mask, slot_num);\n            thread_affinity = affinity_buffer[slot_num];\n        }\n    #endif\n#endif\n        topology.set_affinity_mask(thread_affinity);\n    }\n\n    void restore_previous_affinity_mask( unsigned slot_num ) {\n        auto& topology = system_topology::instance();\n        __TBB_ASSERT(topology.is_topology_parsed(),\n            \"Trying to get access to uninitialized system_topology\");\n        topology.set_affinity_mask(affinity_backup[slot_num]);\n    };\n\n};\n\nextern \"C\" { // exported to TBB interfaces\n\nTBBBIND_EXPORT void __TBB_internal_initialize_system_topology(\n    std::size_t groups_num,\n    int& numa_nodes_count, int*& numa_indexes_list,\n    int& core_types_count, int*& core_types_indexes_list\n) {\n    system_topology::construct(groups_num);\n    system_topology::instance().fill_topology_information(\n        numa_nodes_count, numa_indexes_list,\n        core_types_count, core_types_indexes_list\n    );\n}\n\nTBBBIND_EXPORT binding_handler* __TBB_internal_allocate_binding_handler(int number_of_slots, int numa_id, int core_type_id, int max_threads_per_core) {\n    __TBB_ASSERT(number_of_slots > 0, \"Trying to create numa handler for 0 threads.\");\n    return new binding_handler(number_of_slots, numa_id, core_type_id, max_threads_per_core);\n}\n\nTBBBIND_EXPORT void __TBB_internal_deallocate_binding_handler(binding_handler* handler_ptr) {\n    __TBB_ASSERT(handler_ptr != nullptr, \"Trying to deallocate nullptr pointer.\");\n    delete handler_ptr;\n}\n\nTBBBIND_EXPORT void __TBB_internal_apply_affinity(binding_handler* handler_ptr, int slot_num) {\n    __TBB_ASSERT(handler_ptr != nullptr, \"Trying to get access to uninitialized metadata.\");\n    handler_ptr->apply_affinity(slot_num);\n}\n\nTBBBIND_EXPORT void __TBB_internal_restore_affinity(binding_handler* handler_ptr, int slot_num) {\n    __TBB_ASSERT(handler_ptr != nullptr, \"Trying to get access to uninitialized metadata.\");\n    handler_ptr->restore_previous_affinity_mask(slot_num);\n}\n\nTBBBIND_EXPORT int __TBB_internal_get_default_concurrency(int numa_id, int core_type_id, int max_threads_per_core) {\n    return system_topology::instance().get_default_concurrency(numa_id, core_type_id, max_threads_per_core);\n}\n\nTBBBIND_EXPORT void __TBB_internal_destroy_system_topology() {\n    return system_topology::destroy();\n}\n\n} // extern \"C\"\n\n} // namespace r1\n} // namespace detail\n} // namespace tbb\n\n#undef assertion_hwloc_wrapper\n"
  },
  {
    "path": "third-party/tbb/src/tbbbind/tbb_bind.rc",
    "content": "// Copyright (c) 2005-2025 Intel Corporation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Includes\n//\n#include <winresrc.h>\n#include \"../../include/oneapi/tbb/version.h\"\n\n/////////////////////////////////////////////////////////////////////////////\n// Neutral resources\n\n#ifdef _WIN32\nLANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL\n#pragma code_page(1252)\n#endif //_WIN32\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Version\n//\n#define TBB_VERNUMBERS TBB_VERSION_MAJOR,TBB_VERSION_MINOR,TBB_VERSION_PATCH\n#define TBB_VERSION TBB_VERSION_STRING\n\nVS_VERSION_INFO VERSIONINFO\n FILEVERSION TBB_VERNUMBERS\n PRODUCTVERSION TBB_VERNUMBERS\n FILEFLAGSMASK 0x17L\n#ifdef _DEBUG\n FILEFLAGS 0x1L\n#else\n FILEFLAGS 0x0L\n#endif\n FILEOS 0x40004L\n FILETYPE 0x2L\n FILESUBTYPE 0x0L\nBEGIN\n    BLOCK \"StringFileInfo\"\n    BEGIN\n        BLOCK \"000004b0\"\n        BEGIN\n            VALUE \"CompanyName\", \"Intel Corporation\\0\"\n            VALUE \"FileDescription\", \"oneAPI Threading Building Blocks (oneTBB) library\\0\"\n            VALUE \"FileVersion\", TBB_VERSION \"\\0\"\n            VALUE \"LegalCopyright\", \"Copyright 2005-2025 Intel Corporation.  All Rights Reserved.\\0\"\n            VALUE \"LegalTrademarks\", \"\\0\"\n#ifndef TBB_USE_DEBUG\n            VALUE \"OriginalFilename\", \"tbbbind.dll\\0\"\n#else\n            VALUE \"OriginalFilename\", \"tbbbind_debug.dll\\0\"\n#endif\n            VALUE \"ProductName\", \"oneAPI Threading Building Blocks (oneTBB)\\0\"\n            VALUE \"ProductVersion\", TBB_VERSION \"\\0\"\n            VALUE \"PrivateBuild\", \"\\0\"\n            VALUE \"SpecialBuild\", \"\\0\"\n        END\n    END\n    BLOCK \"VarFileInfo\"\n    BEGIN\n        VALUE \"Translation\", 0x0, 1200\n    END\nEND\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nadd_library(tbbmalloc \n    backend.cpp\n    backref.cpp\n    frontend.cpp\n    large_objects.cpp\n    tbbmalloc.cpp\n    ../tbb/itt_notify.cpp)\n    \nif (WIN32)\n    target_sources(tbbmalloc PRIVATE tbbmalloc.rc)\nendif()\n\nadd_library(TBB::tbbmalloc ALIAS tbbmalloc)\n\ntarget_compile_definitions(tbbmalloc\n                           PUBLIC\n                           $<$<CONFIG:DEBUG>:TBB_USE_DEBUG>\n                           PRIVATE\n                           __TBBMALLOC_BUILD\n                           $<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:__TBB_DYNAMIC_LOAD_ENABLED=0>\n                           $<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:__TBB_SOURCE_DIRECTLY_INCLUDED=1>)\n\nif (NOT (\"${CMAKE_SYSTEM_PROCESSOR}\" MATCHES \"(armv7-a|aarch64|mips|arm64|riscv)\" OR\n         \"${CMAKE_OSX_ARCHITECTURES}\" MATCHES \"arm64\" OR\n         WINDOWS_STORE OR\n         TBB_WINDOWS_DRIVER OR\n         TBB_SANITIZE MATCHES \"thread\"))\n    target_compile_definitions(tbbmalloc PRIVATE __TBB_USE_ITT_NOTIFY)\nendif()\n\ntarget_include_directories(tbbmalloc\n    PUBLIC\n    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include>\n    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)\n\n# TODO: fix warnings\nif (MSVC)\n    # signed unsigned mismatch, declaration hides class member\n    set(TBB_WARNING_SUPPRESS ${TBB_WARNING_SUPPRESS} /wd4267 /wd4244 /wd4245 /wd4458)\nendif()\n\ntarget_compile_options(tbbmalloc\n    PRIVATE\n    ${TBB_CXX_STD_FLAG} # TODO: consider making it PUBLIC.\n    ${TBB_MMD_FLAG}\n    ${TBB_DSE_FLAG}\n    ${TBB_WARNING_LEVEL}\n    ${TBB_WARNING_SUPPRESS}\n    ${TBB_LIB_COMPILE_FLAGS}\n    ${TBBMALLOC_LIB_COMPILE_FLAGS}\n    ${TBB_COMMON_COMPILE_FLAGS}\n)\n\nenable_language(C)\n\n# Avoid use of target_link_libraries here as it changes /DEF option to \\DEF on Windows.\nset_target_properties(tbbmalloc PROPERTIES\n    DEFINE_SYMBOL \"\"\n    VERSION ${TBBMALLOC_BINARY_VERSION}.${TBB_BINARY_MINOR_VERSION}\n    SOVERSION ${TBBMALLOC_BINARY_VERSION}\n    LINKER_LANGUAGE C\n)\n\ntbb_handle_ipo(tbbmalloc)\n\nif (TBB_DEF_FILE_PREFIX) # If there's no prefix, assume we're using export directives\n    set_target_properties(tbbmalloc PROPERTIES\n        LINK_FLAGS \"${TBB_LINK_DEF_FILE_FLAG}\\\"${CMAKE_CURRENT_SOURCE_DIR}/def/${TBB_DEF_FILE_PREFIX}-tbbmalloc.def\\\"\"\n        LINK_DEPENDS \"${CMAKE_CURRENT_SOURCE_DIR}/def/${TBB_DEF_FILE_PREFIX}-tbbmalloc.def\"\n    )\nendif()\n\nset(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES \"\")\n\n# Prefer using target_link_options instead of target_link_libraries to specify link options because\n# target_link_libraries may incorrectly handle some options (on Windows, for example).\nif (COMMAND target_link_options)\n    target_link_options(tbbmalloc\n        PRIVATE\n        ${TBB_LIB_LINK_FLAGS}\n        ${TBB_COMMON_LINK_FLAGS}\n    )\nelse()\n    target_link_libraries(tbbmalloc\n        PRIVATE\n        ${TBB_LIB_LINK_FLAGS}\n        ${TBB_COMMON_LINK_FLAGS}\n    )\nendif()\n\ntarget_link_libraries(tbbmalloc\n    PRIVATE\n    Threads::Threads\n    ${TBB_LIB_LINK_LIBS}\n    ${TBB_COMMON_LINK_LIBS}\n)\n\nif(TBB_BUILD_APPLE_FRAMEWORKS)\n    set_target_properties(tbbmalloc PROPERTIES \n        FRAMEWORK TRUE\n        FRAMEWORK_VERSION ${TBBMALLOC_BINARY_VERSION}.${TBB_BINARY_MINOR_VERSION}\n        XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER com.intel.tbbmalloc\n        MACOSX_FRAMEWORK_IDENTIFIER com.intel.tbbmalloc\n        MACOSX_FRAMEWORK_BUNDLE_VERSION ${TBBMALLOC_BINARY_VERSION}.${TBB_BINARY_MINOR_VERSION}\n        MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${TBBMALLOC_BINARY_VERSION}\n    )\nendif()\n\ntbb_install_target(tbbmalloc)\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/Customize.h",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_malloc_Customize_H_\n#define _TBB_malloc_Customize_H_\n\n// customizing MALLOC_ASSERT macro\n#define MALLOC_ASSERT(assertion, message) __TBB_ASSERT(assertion, message)\n#define MALLOC_ASSERT_EX(assertion, message) __TBB_ASSERT_EX(assertion, message)\n\n#ifndef MALLOC_DEBUG\n#define MALLOC_DEBUG TBB_USE_DEBUG\n#endif\n\n#include \"oneapi/tbb/detail/_utils.h\"\n#include \"oneapi/tbb/detail/_assert.h\"\n\n#include \"Synchronize.h\"\n\n#if __TBB_USE_ITT_NOTIFY\n#include \"../tbb/itt_notify.h\"\n#define MALLOC_ITT_SYNC_PREPARE(pointer) ITT_NOTIFY(sync_prepare, (pointer))\n#define MALLOC_ITT_SYNC_ACQUIRED(pointer) ITT_NOTIFY(sync_acquired, (pointer))\n#define MALLOC_ITT_SYNC_RELEASING(pointer) ITT_NOTIFY(sync_releasing, (pointer))\n#define MALLOC_ITT_SYNC_CANCEL(pointer) ITT_NOTIFY(sync_cancel, (pointer))\n#define MALLOC_ITT_FINI_ITTLIB()        ITT_FINI_ITTLIB()\n#define MALLOC_ITT_RELEASE_RESOURCES()  ITT_RELEASE_RESOURCES()\n#else\n#define MALLOC_ITT_SYNC_PREPARE(pointer) ((void)0)\n#define MALLOC_ITT_SYNC_ACQUIRED(pointer) ((void)0)\n#define MALLOC_ITT_SYNC_RELEASING(pointer) ((void)0)\n#define MALLOC_ITT_SYNC_CANCEL(pointer) ((void)0)\n#define MALLOC_ITT_FINI_ITTLIB()        ((void)0)\n#define MALLOC_ITT_RELEASE_RESOURCES()  ((void)0)\n#endif\n\ninline intptr_t BitScanRev(uintptr_t x) {\n    return x == 0 ? -1 : static_cast<intptr_t>(tbb::detail::log2(x));\n}\n\ntemplate<typename T>\nstatic inline bool isAligned(T* arg, uintptr_t alignment) {\n    return tbb::detail::is_aligned(arg,alignment);\n}\n\nstatic inline bool isPowerOfTwo(uintptr_t arg) {\n    return tbb::detail::is_power_of_two(arg);\n}\nstatic inline bool isPowerOfTwoAtLeast(uintptr_t arg, uintptr_t power2) {\n    return arg && tbb::detail::is_power_of_two_at_least(arg,power2);\n}\n\ninline void do_yield() {\n    tbb::detail::yield();\n}\n\n#define USE_DEFAULT_MEMORY_MAPPING 1\n\n// To support malloc replacement\n#include \"../tbbmalloc_proxy/proxy.h\"\n\n#if MALLOC_UNIXLIKE_OVERLOAD_ENABLED\n#define malloc_proxy __TBB_malloc_proxy\nextern \"C\" void * __TBB_malloc_proxy(size_t)  __attribute__ ((weak));\n#elif MALLOC_ZONE_OVERLOAD_ENABLED\n// as there is no significant overhead, always suppose that proxy can be present\nconst bool malloc_proxy = true;\n#else\nconst bool malloc_proxy = false;\n#endif\n\nnamespace rml {\nnamespace internal {\n    void init_tbbmalloc();\n} } // namespaces\n\n#define MALLOC_EXTRA_INITIALIZATION rml::internal::init_tbbmalloc()\n\n// Need these to work regardless of tools support.\nnamespace tbb {\nnamespace detail {\nnamespace d1 {\n\n    enum notify_type {prepare=0, cancel, acquired, releasing};\n\n#if TBB_USE_PROFILING_TOOLS\n    inline void call_itt_notify(notify_type t, void *ptr) {\n        // unreferenced formal parameter warning\n        detail::suppress_unused_warning(ptr);\n        switch ( t ) {\n        case prepare:\n            MALLOC_ITT_SYNC_PREPARE( ptr );\n            break;\n        case cancel:\n            MALLOC_ITT_SYNC_CANCEL( ptr );\n            break;\n        case acquired:\n            MALLOC_ITT_SYNC_ACQUIRED( ptr );\n            break;\n        case releasing:\n            MALLOC_ITT_SYNC_RELEASING( ptr );\n            break;\n        }\n    }\n#else\n    inline void call_itt_notify(notify_type /*t*/, void * /*ptr*/) {}\n#endif // TBB_USE_PROFILING_TOOLS\n\n} // namespace d1\n} // namespace detail\n} // namespace tbb\n\n#include \"oneapi/tbb/detail/_aggregator.h\"\n\ntemplate <typename OperationType>\nstruct MallocAggregator {\n    typedef tbb::detail::d1::aggregator_generic<OperationType> type;\n};\n\n//! aggregated_operation base class\ntemplate <typename Derived>\nstruct MallocAggregatedOperation {\n    typedef tbb::detail::d1::aggregated_operation<Derived> type;\n};\n\n#endif /* _TBB_malloc_Customize_H_ */\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/MapMemory.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _itt_shared_malloc_MapMemory_H\n#define _itt_shared_malloc_MapMemory_H\n\n#include <stdlib.h>\n\n#if __unix__ || __APPLE__ || __sun || __FreeBSD__\n\n#if __sun && !defined(_XPG4_2)\n // To have void* as mmap's 1st argument\n #define _XPG4_2 1\n #define XPG4_WAS_DEFINED 1\n#endif\n\n#include <sys/mman.h>\n#if __unix__\n/* __TBB_MAP_HUGETLB is MAP_HUGETLB from system header linux/mman.h.\n   The header is not included here, as on some Linux flavors inclusion of\n   linux/mman.h leads to compilation error,\n   while changing of MAP_HUGETLB is highly unexpected.\n*/\n#define __TBB_MAP_HUGETLB 0x40000\n#else\n#define __TBB_MAP_HUGETLB 0\n#endif\n\n#if XPG4_WAS_DEFINED\n #undef _XPG4_2\n #undef XPG4_WAS_DEFINED\n#endif\n\ninline void* mmap_impl(size_t map_size, void* map_hint = nullptr, int map_flags = 0) {\n#ifndef MAP_ANONYMOUS\n// macOS* defines MAP_ANON, which is deprecated in Linux*.\n#define MAP_ANONYMOUS MAP_ANON\n#endif /* MAP_ANONYMOUS */\n    return mmap(map_hint, map_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | map_flags, -1, 0);\n}\n\ninline void* mmapTHP(size_t bytes) {\n    // Initializes in zero-initialized data section\n    static void* hint;\n\n    // Optimistically try to use a last huge page aligned region end\n    // as a hint for mmap.\n    hint = hint ? (void*)((uintptr_t)hint - bytes) : hint;\n    void* result = mmap_impl(bytes, hint);\n\n    // Something went wrong\n    if (result == MAP_FAILED) {\n        hint = nullptr;\n        return MAP_FAILED;\n    }\n\n    // Otherwise, fall back to the slow path - map oversized region\n    // and trim excess parts.\n    if (!isAligned(result, HUGE_PAGE_SIZE)) {\n        // Undo previous try\n        munmap(result, bytes);\n\n        // Map oversized on huge page size region\n        result = mmap_impl(bytes + HUGE_PAGE_SIZE);\n\n        // Something went wrong\n        if (result == MAP_FAILED) {\n            hint = nullptr;\n            return MAP_FAILED;\n        }\n\n        // Misalignment offset\n        uintptr_t offset = 0;\n\n        if (!isAligned(result, HUGE_PAGE_SIZE)) {\n            // Trim excess head of a region if it is no aligned\n            offset = HUGE_PAGE_SIZE - ((uintptr_t)result & (HUGE_PAGE_SIZE - 1));\n            munmap(result, offset);\n\n            // New region beginning\n            result = (void*)((uintptr_t)result + offset);\n        }\n\n        // Trim excess tail of a region\n        munmap((void*)((uintptr_t)result + bytes), HUGE_PAGE_SIZE - offset);\n    }\n\n    // Assume, that mmap virtual addresses grow down by default\n    // So, set a hint as a result of a last successful allocation\n    // and then use it minus requested size as a new mapping point.\n    // TODO: Atomic store is meant here, fence not needed, but\n    // currently we don't have such function.\n    hint = result;\n\n    MALLOC_ASSERT(isAligned(result, HUGE_PAGE_SIZE), \"Mapped address is not aligned on huge page size.\");\n\n    return result;\n}\n\n#define MEMORY_MAPPING_USES_MALLOC 0\nvoid* MapMemory (size_t bytes, PageType pageType)\n{\n    void* result = nullptr;\n    int prevErrno = errno;\n\n    switch (pageType) {\n        case REGULAR:\n        {\n            result = mmap_impl(bytes);\n            break;\n        }\n        case PREALLOCATED_HUGE_PAGE:\n        {\n            MALLOC_ASSERT((bytes % HUGE_PAGE_SIZE) == 0, \"Mapping size should be divisible by huge page size\");\n            result = mmap_impl(bytes, nullptr, __TBB_MAP_HUGETLB);\n            break;\n        }\n        case TRANSPARENT_HUGE_PAGE:\n        {\n            MALLOC_ASSERT((bytes % HUGE_PAGE_SIZE) == 0, \"Mapping size should be divisible by huge page size\");\n            result = mmapTHP(bytes);\n            break;\n        }\n        default:\n        {\n            MALLOC_ASSERT(false, \"Unknown page type\");\n        }\n    }\n\n    if (result == MAP_FAILED) {\n        errno = prevErrno;\n        return nullptr;\n    }\n\n    return result;\n}\n\nint UnmapMemory(void *area, size_t bytes)\n{\n    int prevErrno = errno;\n    int ret = munmap(area, bytes);\n    if (-1 == ret)\n        errno = prevErrno;\n    return ret;\n}\n\n#elif (_WIN32 || _WIN64) && !__TBB_WIN8UI_SUPPORT\n#include <windows.h>\n\n#define MEMORY_MAPPING_USES_MALLOC 0\nvoid* MapMemory (size_t bytes, PageType)\n{\n    /* Is VirtualAlloc thread safe? */\n    return VirtualAlloc(nullptr, bytes, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);\n}\n\nint UnmapMemory(void *area, size_t /*bytes*/)\n{\n    BOOL result = VirtualFree(area, 0, MEM_RELEASE);\n    return !result;\n}\n\n#else\n\nvoid *ErrnoPreservingMalloc(size_t bytes)\n{\n    int prevErrno = errno;\n    void *ret = malloc( bytes );\n    if (!ret)\n        errno = prevErrno;\n    return ret;\n}\n\n#define MEMORY_MAPPING_USES_MALLOC 1\nvoid* MapMemory (size_t bytes, PageType)\n{\n    return ErrnoPreservingMalloc( bytes );\n}\n\nint UnmapMemory(void *area, size_t /*bytes*/)\n{\n    free( area );\n    return 0;\n}\n\n#endif /* OS dependent */\n\n#if MALLOC_CHECK_RECURSION && MEMORY_MAPPING_USES_MALLOC\n#error Impossible to protect against malloc recursion when memory mapping uses malloc.\n#endif\n\n#endif /* _itt_shared_malloc_MapMemory_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/Statistics.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#define MAX_THREADS 1024\n#define NUM_OF_BINS 30\n#define ThreadCommonCounters NUM_OF_BINS\n\nenum counter_type {\n    allocBlockNew = 0,\n    allocBlockPublic,\n    allocBumpPtrUsed,\n    allocFreeListUsed,\n    allocPrivatized,\n    examineEmptyEnough,\n    examineNotEmpty,\n    freeRestoreBumpPtr,\n    freeByOtherThread,\n    freeToActiveBlock,\n    freeToInactiveBlock,\n    freeBlockPublic,\n    freeBlockBack,\n    MaxCounters\n};\nenum common_counter_type {\n    allocNewLargeObj = 0,\n    allocCachedLargeObj,\n    cacheLargeObj,\n    freeLargeObj,\n    lockPublicFreeList,\n    freeToOtherThread\n};\n\n#if COLLECT_STATISTICS\n/* Statistics reporting callback registered via a static object dtor\n   on Posix or DLL_PROCESS_DETACH on Windows.\n */\n\nstatic bool reportAllocationStatistics;\n\nstruct bin_counters {\n    int counter[MaxCounters];\n};\n\nstatic bin_counters statistic[MAX_THREADS][NUM_OF_BINS+1]; //zero-initialized;\n\nstatic inline int STAT_increment(int thread, int bin, int ctr)\n{\n    return reportAllocationStatistics && thread < MAX_THREADS ? ++(statistic[thread][bin].counter[ctr]) : 0;\n}\n\nstatic inline void initStatisticsCollection() {\n#if defined(MALLOCENV_COLLECT_STATISTICS)\n    if (nullptr != getenv(MALLOCENV_COLLECT_STATISTICS))\n        reportAllocationStatistics = true;\n#endif\n}\n\n#else\n#define STAT_increment(a,b,c) ((void)0)\n#endif /* COLLECT_STATISTICS */\n\n#if COLLECT_STATISTICS\nstatic inline void STAT_print(int thread)\n{\n    if (!reportAllocationStatistics)\n        return;\n\n    char filename[100];\n#if USE_PTHREAD\n    sprintf(filename, \"stat_ScalableMalloc_proc%04d_thr%04d.log\", getpid(), thread);\n#else\n    sprintf(filename, \"stat_ScalableMalloc_thr%04d.log\", thread);\n#endif\n    FILE* outfile = fopen(filename, \"w\");\n    for(int i=0; i<NUM_OF_BINS; ++i)\n    {\n        bin_counters& ctrs = statistic[thread][i];\n        fprintf(outfile, \"Thr%04d Bin%02d\", thread, i);\n        fprintf(outfile, \": allocNewBlocks %5d\", ctrs.counter[allocBlockNew]);\n        fprintf(outfile, \", allocPublicBlocks %5d\", ctrs.counter[allocBlockPublic]);\n        fprintf(outfile, \", restoreBumpPtr %5d\", ctrs.counter[freeRestoreBumpPtr]);\n        fprintf(outfile, \", privatizeCalled %10d\", ctrs.counter[allocPrivatized]);\n        fprintf(outfile, \", emptyEnough %10d\", ctrs.counter[examineEmptyEnough]);\n        fprintf(outfile, \", notEmptyEnough %10d\", ctrs.counter[examineNotEmpty]);\n        fprintf(outfile, \", freeBlocksPublic %5d\", ctrs.counter[freeBlockPublic]);\n        fprintf(outfile, \", freeBlocksBack %5d\", ctrs.counter[freeBlockBack]);\n        fprintf(outfile, \"\\n\");\n    }\n    for(int i=0; i<NUM_OF_BINS; ++i)\n    {\n        bin_counters& ctrs = statistic[thread][i];\n        fprintf(outfile, \"Thr%04d Bin%02d\", thread, i);\n        fprintf(outfile, \": allocBumpPtr %10d\", ctrs.counter[allocBumpPtrUsed]);\n        fprintf(outfile, \", allocFreeList %10d\", ctrs.counter[allocFreeListUsed]);\n        fprintf(outfile, \", freeToActiveBlk %10d\", ctrs.counter[freeToActiveBlock]);\n        fprintf(outfile, \", freeToInactive  %10d\", ctrs.counter[freeToInactiveBlock]);\n        fprintf(outfile, \", freedByOther %10d\", ctrs.counter[freeByOtherThread]);\n        fprintf(outfile, \"\\n\");\n    }\n    bin_counters& ctrs = statistic[thread][ThreadCommonCounters];\n    fprintf(outfile, \"Thr%04d common counters\", thread);\n    fprintf(outfile, \": allocNewLargeObject %5d\", ctrs.counter[allocNewLargeObj]);\n    fprintf(outfile, \": allocCachedLargeObject %5d\", ctrs.counter[allocCachedLargeObj]);\n    fprintf(outfile, \", cacheLargeObject %5d\", ctrs.counter[cacheLargeObj]);\n    fprintf(outfile, \", freeLargeObject %5d\", ctrs.counter[freeLargeObj]);\n    fprintf(outfile, \", lockPublicFreeList %5d\", ctrs.counter[lockPublicFreeList]);\n    fprintf(outfile, \", freeToOtherThread %10d\", ctrs.counter[freeToOtherThread]);\n    fprintf(outfile, \"\\n\");\n\n    fclose(outfile);\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/Synchronize.h",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_malloc_Synchronize_H_\n#define __TBB_malloc_Synchronize_H_\n\n#include \"oneapi/tbb/detail/_utils.h\"\n\n#include <atomic>\n\n//! Stripped down version of spin_mutex.\n/** Instances of MallocMutex must be declared in memory that is zero-initialized.\n    There are no constructors.  This is a feature that lets it be\n    used in situations where the mutex might be used while file-scope constructors\n    are running.\n\n    There are no methods \"acquire\" or \"release\".  The scoped_lock must be used\n    in a strict block-scoped locking pattern.  Omitting these methods permitted\n    further simplification. */\nclass MallocMutex : tbb::detail::no_copy {\n    std::atomic_flag m_flag = ATOMIC_FLAG_INIT;\n\n    void lock() {\n        tbb::detail::atomic_backoff backoff;\n        while (m_flag.test_and_set()) backoff.pause();\n    }\n    bool try_lock() {\n        return !m_flag.test_and_set();\n    }\n    void unlock() {\n        m_flag.clear(std::memory_order_release);\n    }\n\npublic:\n    class scoped_lock : tbb::detail::no_copy {\n        MallocMutex& m_mutex;\n        bool m_taken;\n\n    public:\n        scoped_lock(MallocMutex& m) : m_mutex(m), m_taken(true) {\n            m.lock();\n        }\n        scoped_lock(MallocMutex& m, bool block, bool *locked) : m_mutex(m), m_taken(false) {\n            if (block) {\n                m.lock();\n                m_taken = true;\n            } else {\n                m_taken = m.try_lock();\n            }\n            if (locked) *locked = m_taken;\n        }\n\n        scoped_lock(scoped_lock& other) = delete;\n        scoped_lock& operator=(scoped_lock&) = delete;\n\n        ~scoped_lock() {\n            if (m_taken) {\n                m_mutex.unlock();\n            }\n        }\n    };\n    friend class scoped_lock;\n};\n\ninline void SpinWaitWhileEq(const std::atomic<intptr_t>& location, const intptr_t value) {\n    tbb::detail::spin_wait_while_eq(location, value);\n}\n\n#if USE_PTHREAD && __TBB_SOURCE_DIRECTLY_INCLUDED\n\ninline void SpinWaitUntilEq(const std::atomic<intptr_t>& location, const intptr_t value) {\n    tbb::detail::spin_wait_until_eq(location, value);\n}\n\n#endif\n\nclass AtomicBackoff {\n    tbb::detail::atomic_backoff backoff;\npublic:\n    AtomicBackoff() {}\n    void pause() { backoff.pause(); }\n};\n\n#endif /* __TBB_malloc_Synchronize_H_ */\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/TypeDefinitions.h",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _itt_shared_malloc_TypeDefinitions_H_\n#define _itt_shared_malloc_TypeDefinitions_H_\n\n// Define preprocessor symbols used to determine architecture\n#if _WIN32||_WIN64\n#   if defined(_M_X64)||defined(__x86_64__)  // the latter for MinGW support\n#       define __ARCH_x86_64 1\n#   elif defined(_M_IA64)\n#       define __ARCH_ipf 1\n#   elif defined(_M_IX86)||defined(__i386__) // the latter for MinGW support\n#       define __ARCH_x86_32 1\n#   elif defined(_M_ARM) || defined(_M_ARM64) || defined(__aarch64__) // the latter for MinGW support\n#       define __ARCH_other 1\n#   else\n#       error Unknown processor architecture for Windows\n#   endif\n#   define USE_WINTHREAD 1\n#else /* Assume generic Unix */\n#   if __x86_64__\n#       define __ARCH_x86_64 1\n#   elif __ia64__\n#       define __ARCH_ipf 1\n#   elif __i386__ || __i386\n#       define __ARCH_x86_32 1\n#   else\n#       define __ARCH_other 1\n#   endif\n#   define USE_PTHREAD 1\n#endif\n\n// According to C99 standard INTPTR_MIN defined for C++\n// iff __STDC_LIMIT_MACROS pre-defined\n#ifndef __STDC_LIMIT_MACROS\n#define __STDC_LIMIT_MACROS 1\n#endif\n\n//! PROVIDE YOUR OWN Customize.h IF YOU FEEL NECESSARY\n#include \"Customize.h\"\n\n#include \"shared_utils.h\"\n\n#endif /* _itt_shared_malloc_TypeDefinitions_H_ */\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/backend.cpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <string.h>   /* for memset */\n#include <errno.h>\n#include \"tbbmalloc_internal.h\"\n\nnamespace rml {\nnamespace internal {\n\n/*********** Code to acquire memory from the OS or other executive ****************/\n\n/*\n  syscall/malloc can set non-zero errno in case of failure,\n  but later allocator might be able to find memory to fulfill the request.\n  And we do not want changing of errno by successful scalable_malloc call.\n  To support this, restore old errno in (get|free)RawMemory, and set errno\n  in frontend just before returning to user code.\n  Please note: every syscall/libc call used inside scalable_malloc that\n  sets errno must be protected this way, not just memory allocation per se.\n*/\n\n#if USE_DEFAULT_MEMORY_MAPPING\n#include \"MapMemory.h\"\n#else\n/* assume MapMemory and UnmapMemory are customized */\n#endif\n\nvoid* getRawMemory (size_t size, PageType pageType) {\n    return MapMemory(size, pageType);\n}\n\nint freeRawMemory (void *object, size_t size) {\n    return UnmapMemory(object, size);\n}\n\n#if CHECK_ALLOCATION_RANGE\n\nvoid Backend::UsedAddressRange::registerAlloc(uintptr_t left, uintptr_t right)\n{\n    MallocMutex::scoped_lock lock(mutex);\n    if (left < leftBound.load(std::memory_order_relaxed))\n        leftBound.store(left, std::memory_order_relaxed);\n    if (right > rightBound.load(std::memory_order_relaxed))\n        rightBound.store(right, std::memory_order_relaxed);\n    MALLOC_ASSERT(leftBound.load(std::memory_order_relaxed), ASSERT_TEXT);\n    MALLOC_ASSERT(leftBound.load(std::memory_order_relaxed) < rightBound.load(std::memory_order_relaxed), ASSERT_TEXT);\n    MALLOC_ASSERT(leftBound.load(std::memory_order_relaxed) <= left && right <= rightBound.load(std::memory_order_relaxed), ASSERT_TEXT);\n}\n\nvoid Backend::UsedAddressRange::registerFree(uintptr_t left, uintptr_t right)\n{\n    MallocMutex::scoped_lock lock(mutex);\n    if (leftBound.load(std::memory_order_relaxed) == left) {\n        if (rightBound.load(std::memory_order_relaxed) == right) {\n            leftBound.store(ADDRESS_UPPER_BOUND, std::memory_order_relaxed);\n            rightBound.store(0, std::memory_order_relaxed);\n        } else\n            leftBound.store(right, std::memory_order_relaxed);\n    } else if (rightBound.load(std::memory_order_relaxed) == right)\n        rightBound.store(left, std::memory_order_relaxed);\n    MALLOC_ASSERT((!rightBound.load(std::memory_order_relaxed) && leftBound.load(std::memory_order_relaxed) == ADDRESS_UPPER_BOUND)\n                  || leftBound.load(std::memory_order_relaxed) < rightBound.load(std::memory_order_relaxed), ASSERT_TEXT);\n}\n#endif // CHECK_ALLOCATION_RANGE\n\n// Initialized in frontend inside defaultMemPool\nextern HugePagesStatus hugePages;\n\nvoid *Backend::allocRawMem(size_t &size)\n{\n    void *res = nullptr;\n    size_t allocSize = 0;\n\n    if (extMemPool->userPool()) {\n        if (extMemPool->fixedPool && bootsrapMemDone == bootsrapMemStatus.load(std::memory_order_acquire))\n            return nullptr;\n        MALLOC_ASSERT(bootsrapMemStatus != bootsrapMemNotDone,\n                      \"Backend::allocRawMem() called prematurely?\");\n        // TODO: support for raw mem not aligned at sizeof(uintptr_t)\n        // memory from fixed pool is asked once and only once\n        allocSize = alignUpGeneric(size, extMemPool->granularity);\n        res = (*extMemPool->rawAlloc)(extMemPool->poolId, allocSize);\n    } else {\n        // Align allocation on page size\n        size_t pageSize = hugePages.isEnabled ? hugePages.getGranularity() : extMemPool->granularity;\n        MALLOC_ASSERT(pageSize, \"Page size cannot be zero.\");\n        allocSize = alignUpGeneric(size, pageSize);\n\n        // If user requested huge pages and they are available, try to use preallocated ones firstly.\n        // If there are none, lets check transparent huge pages support and use them instead.\n        if (hugePages.isEnabled) {\n            if (hugePages.isHPAvailable) {\n                res = getRawMemory(allocSize, PREALLOCATED_HUGE_PAGE);\n            }\n            if (!res && hugePages.isTHPAvailable) {\n                res = getRawMemory(allocSize, TRANSPARENT_HUGE_PAGE);\n            }\n        }\n\n        if (!res) {\n            res = getRawMemory(allocSize, REGULAR);\n        }\n    }\n\n    if (res) {\n        MALLOC_ASSERT(allocSize > 0, \"Invalid size of an allocated region.\");\n        size = allocSize;\n        if (!extMemPool->userPool())\n            usedAddrRange.registerAlloc((uintptr_t)res, (uintptr_t)res+size);\n#if MALLOC_DEBUG\n        volatile size_t curTotalSize = totalMemSize; // to read global value once\n        MALLOC_ASSERT(curTotalSize+size > curTotalSize, \"Overflow allocation size.\");\n#endif\n        totalMemSize.fetch_add(size);\n    }\n\n    return res;\n}\n\nbool Backend::freeRawMem(void *object, size_t size)\n{\n    bool fail;\n#if MALLOC_DEBUG\n    volatile size_t curTotalSize = totalMemSize; // to read global value once\n    MALLOC_ASSERT(curTotalSize-size < curTotalSize, \"Negative allocation size.\");\n#endif\n    totalMemSize.fetch_sub(size);\n    if (extMemPool->userPool()) {\n        MALLOC_ASSERT(!extMemPool->fixedPool, \"No free for fixed-size pools.\");\n        fail = (*extMemPool->rawFree)(extMemPool->poolId, object, size);\n    } else {\n        usedAddrRange.registerFree((uintptr_t)object, (uintptr_t)object + size);\n        fail = freeRawMemory(object, size);\n    }\n    // TODO: use result in all freeRawMem() callers\n    return !fail;\n}\n\n/********* End memory acquisition code ********************************/\n\n// Protected object size. After successful locking returns size of locked block,\n// and releasing requires setting block size.\nclass GuardedSize : tbb::detail::no_copy {\n    std::atomic<uintptr_t> value;\npublic:\n    enum State {\n        LOCKED,\n        COAL_BLOCK,        // block is coalescing now\n        MAX_LOCKED_VAL = COAL_BLOCK,\n        LAST_REGION_BLOCK, // used to mark last block in region\n        // values after this are \"normal\" block sizes\n        MAX_SPEC_VAL = LAST_REGION_BLOCK\n    };\n\n    void initLocked() { value.store(LOCKED, std::memory_order_release); } // TBB_REVAMP_TODO: was relaxed\n    void makeCoalscing() {\n        MALLOC_ASSERT(value.load(std::memory_order_relaxed) == LOCKED, ASSERT_TEXT);\n        value.store(COAL_BLOCK, std::memory_order_release); // TBB_REVAMP_TODO: was relaxed\n    }\n    size_t tryLock(State state) {\n        MALLOC_ASSERT(state <= MAX_LOCKED_VAL, ASSERT_TEXT);\n        size_t sz = value.load(std::memory_order_acquire);\n        for (;;) {\n            if (sz <= MAX_LOCKED_VAL) {\n                break;\n            }\n            if (value.compare_exchange_strong(sz, state)) {\n                break;\n            }\n        }\n        return sz;\n    }\n    void unlock(size_t size) {\n        MALLOC_ASSERT(value.load(std::memory_order_relaxed) <= MAX_LOCKED_VAL, \"The lock is not locked\");\n        MALLOC_ASSERT(size > MAX_LOCKED_VAL, ASSERT_TEXT);\n        value.store(size, std::memory_order_release);\n    }\n    bool isLastRegionBlock() const { return value.load(std::memory_order_relaxed) == LAST_REGION_BLOCK; }\n    friend void Backend::IndexedBins::verify();\n};\n\nstruct MemRegion {\n    MemRegion *next,      // keep all regions in any pool to release all them on\n              *prev;      // pool destroying, 2-linked list to release individual\n                          // regions.\n    size_t     allocSz,   // got from pool callback\n               blockSz;   // initial and maximal inner block size\n    MemRegionType type;\n};\n\n// this data must be unmodified while block is in use, so separate it\nclass BlockMutexes {\nprotected:\n    GuardedSize myL,   // lock for me\n                leftL; // lock for left neighbor\n};\n\nclass FreeBlock : BlockMutexes {\npublic:\n    static const size_t minBlockSize;\n    friend void Backend::IndexedBins::verify();\n\n    FreeBlock    *prev,       // in 2-linked list related to bin\n                 *next,\n                 *nextToFree; // used to form a queue during coalescing\n    // valid only when block is in processing, i.e. one is not free and not\n    size_t        sizeTmp;    // used outside of backend\n    int           myBin;      // bin that is owner of the block\n    bool          slabAligned;\n    bool          blockInBin; // this block in myBin already\n\n    FreeBlock *rightNeig(size_t sz) const {\n        MALLOC_ASSERT(sz, ASSERT_TEXT);\n        return (FreeBlock*)((uintptr_t)this+sz);\n    }\n    FreeBlock *leftNeig(size_t sz) const {\n        MALLOC_ASSERT(sz, ASSERT_TEXT);\n        return (FreeBlock*)((uintptr_t)this - sz);\n    }\n\n    void initHeader() { myL.initLocked(); leftL.initLocked(); }\n    void setMeFree(size_t size) { myL.unlock(size); }\n    size_t trySetMeUsed(GuardedSize::State s) { return myL.tryLock(s); }\n    bool isLastRegionBlock() const { return myL.isLastRegionBlock(); }\n\n    void setLeftFree(size_t sz) { leftL.unlock(sz); }\n    size_t trySetLeftUsed(GuardedSize::State s) { return leftL.tryLock(s); }\n\n    size_t tryLockBlock() {\n        size_t rSz, sz = trySetMeUsed(GuardedSize::LOCKED);\n\n        if (sz <= GuardedSize::MAX_LOCKED_VAL)\n            return false;\n        rSz = rightNeig(sz)->trySetLeftUsed(GuardedSize::LOCKED);\n        if (rSz <= GuardedSize::MAX_LOCKED_VAL) {\n            setMeFree(sz);\n            return false;\n        }\n        MALLOC_ASSERT(rSz == sz, ASSERT_TEXT);\n        return sz;\n    }\n    void markCoalescing(size_t blockSz) {\n        myL.makeCoalscing();\n        rightNeig(blockSz)->leftL.makeCoalscing();\n        sizeTmp = blockSz;\n        nextToFree = nullptr;\n    }\n    void markUsed() {\n        myL.initLocked();\n        rightNeig(sizeTmp)->leftL.initLocked();\n        nextToFree = nullptr;\n    }\n    static void markBlocks(FreeBlock *fBlock, int num, size_t size) {\n        for (int i=1; i<num; i++) {\n            fBlock = (FreeBlock*)((uintptr_t)fBlock + size);\n            fBlock->initHeader();\n        }\n    }\n};\n\n// Last block in any region. Its \"size\" field is GuardedSize::LAST_REGION_BLOCK,\n// This kind of blocks used to find region header\n// and have a possibility to return region back to OS\nstruct LastFreeBlock : public FreeBlock {\n    MemRegion *memRegion;\n};\n\nconst size_t FreeBlock::minBlockSize = sizeof(FreeBlock);\n\ninline bool BackendSync::waitTillBlockReleased(intptr_t startModifiedCnt)\n{\n    AtomicBackoff backoff;\n#if __TBB_MALLOC_BACKEND_STAT\n    class ITT_Guard {\n        void *ptr;\n    public:\n        ITT_Guard(void *p) : ptr(p) {\n            MALLOC_ITT_SYNC_PREPARE(ptr);\n        }\n        ~ITT_Guard() {\n            MALLOC_ITT_SYNC_ACQUIRED(ptr);\n        }\n    };\n    ITT_Guard ittGuard(&inFlyBlocks);\n#endif\n    intptr_t myBinsInFlyBlocks = inFlyBlocks.load(std::memory_order_acquire);\n    intptr_t myCoalescQInFlyBlocks = backend->blocksInCoalescing();\n    while (true) {\n        MALLOC_ASSERT(myBinsInFlyBlocks>=0 && myCoalescQInFlyBlocks>=0, nullptr);\n\n        intptr_t currBinsInFlyBlocks = inFlyBlocks.load(std::memory_order_acquire);\n        intptr_t currCoalescQInFlyBlocks = backend->blocksInCoalescing();\n        WhiteboxTestingYield();\n        // Stop waiting iff:\n\n        // 1) blocks were removed from processing, not added\n        if (myBinsInFlyBlocks > currBinsInFlyBlocks\n        // 2) released during delayed coalescing queue\n            || myCoalescQInFlyBlocks > currCoalescQInFlyBlocks)\n            break;\n        // 3) if there are blocks in coalescing, and no progress in its processing,\n        // try to scan coalescing queue and stop waiting, if changes were made\n        // (if there are no changes and in-fly blocks exist, we continue\n        //  waiting to not increase load on coalescQ)\n        if (currCoalescQInFlyBlocks > 0 && backend->scanCoalescQ(/*forceCoalescQDrop=*/false))\n            break;\n        // 4) when there are no blocks\n        if (!currBinsInFlyBlocks && !currCoalescQInFlyBlocks) {\n            // re-scan make sense only if bins were modified since scanned\n            auto pool = backend->extMemPool;\n            if (pool->hardCachesCleanupInProgress.load(std::memory_order_acquire) ||\n                pool->softCachesCleanupInProgress.load(std::memory_order_acquire)) {\n                backoff.pause();\n                continue;\n            }\n\n            return startModifiedCnt != getNumOfMods();\n        }\n        myBinsInFlyBlocks = currBinsInFlyBlocks;\n        myCoalescQInFlyBlocks = currCoalescQInFlyBlocks;\n        backoff.pause();\n    }\n    return true;\n}\n\nvoid CoalRequestQ::putBlock(FreeBlock *fBlock)\n{\n    MALLOC_ASSERT(fBlock->sizeTmp >= FreeBlock::minBlockSize, ASSERT_TEXT);\n    fBlock->markUsed();\n    // the block is in the queue, do not forget that it's here\n    inFlyBlocks++;\n\n    FreeBlock *myBlToFree = blocksToFree.load(std::memory_order_acquire);\n    for (;;) {\n        fBlock->nextToFree = myBlToFree;\n        if (blocksToFree.compare_exchange_strong(myBlToFree, fBlock)) {\n            return;\n        }\n    }\n}\n\nFreeBlock *CoalRequestQ::getAll()\n{\n    for (;;) {\n        FreeBlock *myBlToFree = blocksToFree.load(std::memory_order_acquire);\n\n        if (!myBlToFree) {\n            return nullptr;\n        } else {\n            if (blocksToFree.compare_exchange_strong(myBlToFree, nullptr)) {\n                return myBlToFree;\n            } else {\n                continue;\n            }\n        }\n    }\n}\n\ninline void CoalRequestQ::blockWasProcessed()\n{\n    bkndSync->binsModified();\n    int prev = inFlyBlocks.fetch_sub(1);\n    tbb::detail::suppress_unused_warning(prev);\n    MALLOC_ASSERT(prev > 0, ASSERT_TEXT);\n}\n\n// Try to get a block from a bin.\n// If the remaining free space would stay in the same bin,\n//     split the block without removing it.\n// If the free space should go to other bin(s), remove the block.\n// alignedBin is true, if all blocks in the bin have slab-aligned right side.\nFreeBlock *Backend::IndexedBins::getFromBin(int binIdx, BackendSync *sync, size_t size,\n        bool needAlignedRes, bool alignedBin,  bool wait, int *binLocked)\n{\n    Bin *b = &freeBins[binIdx];\ntry_next:\n    FreeBlock *fBlock = nullptr;\n    if (!b->empty()) {\n        bool locked = false;\n        MallocMutex::scoped_lock scopedLock(b->tLock, wait, &locked);\n\n        if (!locked) {\n            if (binLocked) (*binLocked)++;\n            return nullptr;\n        }\n\n        for (FreeBlock *curr = b->head.load(std::memory_order_relaxed); curr; curr = curr->next) {\n            size_t szBlock = curr->tryLockBlock();\n            if (!szBlock) {\n                // block is locked, re-do bin lock, as there is no place to spin\n                // while block coalescing\n                goto try_next;\n            }\n\n            // GENERAL CASE\n            if (alignedBin || !needAlignedRes) {\n                size_t splitSz = szBlock - size;\n                // If we got a block as split result, it must have a room for control structures.\n                if (szBlock >= size && (splitSz >= FreeBlock::minBlockSize || !splitSz))\n                    fBlock = curr;\n            } else {\n                // SPECIAL CASE, to get aligned block from unaligned bin we have to cut the middle of a block\n                // and return remaining left and right part. Possible only in fixed pool scenario, assert for this\n                // is set inside splitBlock() function.\n\n                void *newB = alignUp(curr, slabSize);\n                uintptr_t rightNew = (uintptr_t)newB + size;\n                uintptr_t rightCurr = (uintptr_t)curr + szBlock;\n                // Check if the block size is sufficient,\n                // and also left and right split results are either big enough or non-existent\n                if (rightNew <= rightCurr\n                        && (newB == curr || ((uintptr_t)newB - (uintptr_t)curr) >= FreeBlock::minBlockSize)\n                        && (rightNew == rightCurr || (rightCurr - rightNew) >= FreeBlock::minBlockSize))\n                    fBlock = curr;\n            }\n\n            if (fBlock) {\n                // consume must be called before result of removing from a bin is visible externally.\n                sync->blockConsumed();\n                // TODO: think about cases when block stays in the same bin\n                b->removeBlock(fBlock);\n                if (freeBins[binIdx].empty())\n                    bitMask.set(binIdx, false);\n                fBlock->sizeTmp = szBlock;\n                break;\n            } else { // block size is not valid, search for next block in the bin\n                curr->setMeFree(szBlock);\n                curr->rightNeig(szBlock)->setLeftFree(szBlock);\n            }\n        }\n    }\n    return fBlock;\n}\n\nbool Backend::IndexedBins::tryReleaseRegions(int binIdx, Backend *backend)\n{\n    Bin *b = &freeBins[binIdx];\n    FreeBlock *fBlockList = nullptr;\n\n    // got all blocks from the bin and re-do coalesce on them\n    // to release single-block regions\ntry_next:\n    if (!b->empty()) {\n        MallocMutex::scoped_lock binLock(b->tLock);\n        for (FreeBlock *curr = b->head.load(std::memory_order_relaxed); curr; ) {\n            size_t szBlock = curr->tryLockBlock();\n            if (!szBlock)\n                goto try_next;\n\n            FreeBlock *next = curr->next;\n\n            b->removeBlock(curr);\n            curr->sizeTmp = szBlock;\n            curr->nextToFree = fBlockList;\n            fBlockList = curr;\n            curr = next;\n        }\n    }\n    return backend->coalescAndPutList(fBlockList, /*forceCoalescQDrop=*/true,\n                                      /*reportBlocksProcessed=*/false);\n}\n\nvoid Backend::Bin::removeBlock(FreeBlock *fBlock)\n{\n    MALLOC_ASSERT(fBlock->next||fBlock->prev||fBlock== head.load(std::memory_order_relaxed),\n                  \"Detected that a block is not in the bin.\");\n    if (head.load(std::memory_order_relaxed) == fBlock)\n        head.store(fBlock->next, std::memory_order_relaxed);\n    if (tail == fBlock)\n        tail = fBlock->prev;\n    if (fBlock->prev)\n        fBlock->prev->next = fBlock->next;\n    if (fBlock->next)\n        fBlock->next->prev = fBlock->prev;\n}\n\nvoid Backend::IndexedBins::addBlock(int binIdx, FreeBlock *fBlock, size_t /* blockSz */, bool addToTail)\n{\n    Bin *b = &freeBins[binIdx];\n    fBlock->myBin = binIdx;\n    fBlock->next = fBlock->prev = nullptr;\n    {\n        MallocMutex::scoped_lock scopedLock(b->tLock);\n        if (addToTail) {\n            fBlock->prev = b->tail;\n            b->tail = fBlock;\n            if (fBlock->prev)\n                fBlock->prev->next = fBlock;\n            if (!b->head.load(std::memory_order_relaxed))\n                b->head.store(fBlock, std::memory_order_relaxed);\n        } else {\n            fBlock->next = b->head.load(std::memory_order_relaxed);\n            b->head.store(fBlock, std::memory_order_relaxed);\n            if (fBlock->next)\n                fBlock->next->prev = fBlock;\n            if (!b->tail)\n                b->tail = fBlock;\n        }\n    }\n    bitMask.set(binIdx, true);\n}\n\nbool Backend::IndexedBins::tryAddBlock(int binIdx, FreeBlock *fBlock, bool addToTail)\n{\n    bool locked = false;\n    Bin *b = &freeBins[binIdx];\n    fBlock->myBin = binIdx;\n    if (addToTail) {\n        fBlock->next = nullptr;\n        {\n            MallocMutex::scoped_lock scopedLock(b->tLock, /*wait=*/false, &locked);\n            if (!locked)\n                return false;\n            fBlock->prev = b->tail;\n            b->tail = fBlock;\n            if (fBlock->prev)\n                fBlock->prev->next = fBlock;\n            if (!b->head.load(std::memory_order_relaxed))\n                b->head.store(fBlock, std::memory_order_relaxed);\n        }\n    } else {\n        fBlock->prev = nullptr;\n        {\n            MallocMutex::scoped_lock scopedLock(b->tLock, /*wait=*/false, &locked);\n            if (!locked)\n                return false;\n            fBlock->next = b->head.load(std::memory_order_relaxed);\n            b->head.store(fBlock, std::memory_order_relaxed);\n            if (fBlock->next)\n                fBlock->next->prev = fBlock;\n            if (!b->tail)\n                b->tail = fBlock;\n        }\n    }\n    bitMask.set(binIdx, true);\n    return true;\n}\n\nvoid Backend::IndexedBins::reset()\n{\n    for (unsigned i=0; i<Backend::freeBinsNum; i++)\n        freeBins[i].reset();\n    bitMask.reset();\n}\n\nvoid Backend::IndexedBins::lockRemoveBlock(int binIdx, FreeBlock *fBlock)\n{\n    MallocMutex::scoped_lock scopedLock(freeBins[binIdx].tLock);\n    freeBins[binIdx].removeBlock(fBlock);\n    if (freeBins[binIdx].empty())\n        bitMask.set(binIdx, false);\n}\n\nbool ExtMemoryPool::regionsAreReleaseable() const\n{\n    return !keepAllMemory && !delayRegsReleasing;\n}\n\nFreeBlock *Backend::splitBlock(FreeBlock *fBlock, int num, size_t size, bool blockIsAligned, bool needAlignedBlock)\n{\n    const size_t totalSize = num * size;\n\n    // SPECIAL CASE, for unaligned block we have to cut the middle of a block\n    // and return remaining left and right part. Possible only in a fixed pool scenario.\n    if (needAlignedBlock && !blockIsAligned) {\n        MALLOC_ASSERT(extMemPool->fixedPool,\n                \"Aligned block request from unaligned bin possible only in fixed pool scenario.\");\n\n        // Space to use is in the middle\n        FreeBlock *newBlock = alignUp(fBlock, slabSize);\n        FreeBlock *rightPart = (FreeBlock*)((uintptr_t)newBlock + totalSize);\n        uintptr_t fBlockEnd = (uintptr_t)fBlock + fBlock->sizeTmp;\n\n        // Return free right part\n        if ((uintptr_t)rightPart != fBlockEnd) {\n            rightPart->initHeader();  // to prevent coalescing rightPart with fBlock\n            size_t rightSize = fBlockEnd - (uintptr_t)rightPart;\n            coalescAndPut(rightPart, rightSize, toAlignedBin(rightPart, rightSize));\n        }\n        // And free left part\n        if (newBlock != fBlock) {\n            newBlock->initHeader(); // to prevent coalescing fBlock with newB\n            size_t leftSize = (uintptr_t)newBlock - (uintptr_t)fBlock;\n            coalescAndPut(fBlock, leftSize, toAlignedBin(fBlock, leftSize));\n        }\n        fBlock = newBlock;\n    } else if (size_t splitSize = fBlock->sizeTmp - totalSize) { // need to split the block\n        // GENERAL CASE, cut the left or right part of the block\n        FreeBlock *splitBlock = nullptr;\n        if (needAlignedBlock) {\n            // For slab aligned blocks cut the right side of the block\n            // and return it to a requester, original block returns to backend\n            splitBlock = fBlock;\n            fBlock = (FreeBlock*)((uintptr_t)splitBlock + splitSize);\n            fBlock->initHeader();\n        } else {\n            // For large object blocks cut original block and put free right part to backend\n            splitBlock = (FreeBlock*)((uintptr_t)fBlock + totalSize);\n            splitBlock->initHeader();\n        }\n        // Mark free block as it`s parent only when the requested type (needAlignedBlock)\n        // and returned from Bins/OS block (isAligned) are equal (XOR operation used)\n        bool markAligned = (blockIsAligned ^ needAlignedBlock) ? toAlignedBin(splitBlock, splitSize) : blockIsAligned;\n        coalescAndPut(splitBlock, splitSize, markAligned);\n    }\n    MALLOC_ASSERT(!needAlignedBlock || isAligned(fBlock, slabSize), \"Expect to get aligned block, if one was requested.\");\n    FreeBlock::markBlocks(fBlock, num, size);\n    return fBlock;\n}\n\nsize_t Backend::getMaxBinnedSize() const\n{\n    return hugePages.isEnabled && !inUserPool() ?\n        maxBinned_HugePage : maxBinned_SmallPage;\n}\n\ninline bool Backend::MaxRequestComparator::operator()(size_t oldMaxReq, size_t requestSize) const\n{\n    return requestSize > oldMaxReq && requestSize < backend->getMaxBinnedSize();\n}\n\n// last chance to get memory\nFreeBlock *Backend::releaseMemInCaches(intptr_t startModifiedCnt,\n                                    int *lockedBinsThreshold, int numOfLockedBins)\n{\n    // something released from caches\n    if (extMemPool->hardCachesCleanup(false))\n        return (FreeBlock*)VALID_BLOCK_IN_BIN;\n\n    if (bkndSync.waitTillBlockReleased(startModifiedCnt))\n        return (FreeBlock*)VALID_BLOCK_IN_BIN;\n\n    // OS can't give us more memory, but we have some in locked bins\n    if (*lockedBinsThreshold && numOfLockedBins) {\n        *lockedBinsThreshold = 0;\n        return (FreeBlock*)VALID_BLOCK_IN_BIN;\n    }\n    return nullptr; // nothing found, give up\n}\n\nFreeBlock *Backend::askMemFromOS(size_t blockSize, intptr_t startModifiedCnt,\n                                 int *lockedBinsThreshold, int numOfLockedBins,\n                                 bool *splittableRet, bool needSlabRegion)\n{\n    FreeBlock *block;\n    // The block sizes can be divided into 3 groups:\n    //   1. \"quite small\": popular object size, we are in bootstarp or something\n    //      like; request several regions.\n    //   2. \"quite large\": we want to have several such blocks in the region\n    //      but not want several pre-allocated regions.\n    //   3. \"huge\": exact fit, we allocate only one block and do not allow\n    //       any other allocations to placed in a region.\n    // Dividing the block sizes in these groups we are trying to balance between\n    // too small regions (that leads to fragmentation) and too large ones (that\n    // leads to excessive address space consumption). If a region is \"too\n    // large\", allocate only one, to prevent fragmentation. It supposedly\n    // doesn't hurt performance, because the object requested by user is large.\n    // Bounds for the groups are:\n    const size_t maxBinned = getMaxBinnedSize();\n    const size_t quiteSmall = maxBinned / 8;\n    const size_t quiteLarge = maxBinned;\n\n    if (blockSize >= quiteLarge) {\n        // Do not interact with other threads via semaphores, as for exact fit\n        // we can't share regions with them, memory requesting is individual.\n        block = addNewRegion(blockSize, MEMREG_ONE_BLOCK, /*addToBin=*/false);\n        if (!block)\n            return releaseMemInCaches(startModifiedCnt, lockedBinsThreshold, numOfLockedBins);\n        *splittableRet = false;\n    } else {\n        const size_t regSz_sizeBased = alignUp(4*maxRequestedSize, 1024*1024);\n        // Another thread is modifying backend while we can't get the block.\n        // Wait while it leaves and re-do the scan\n        // before trying other ways to extend the backend.\n        if (bkndSync.waitTillBlockReleased(startModifiedCnt)\n            // semaphore is protecting adding more more memory from OS\n            || memExtendingSema.wait())\n            return (FreeBlock*)VALID_BLOCK_IN_BIN;\n\n        if (startModifiedCnt != bkndSync.getNumOfMods()) {\n            memExtendingSema.signal();\n            return (FreeBlock*)VALID_BLOCK_IN_BIN;\n        }\n\n        if (blockSize < quiteSmall) {\n            // For this size of blocks, add NUM_OF_REG \"advance\" regions in bin,\n            // and return one as a result.\n            // TODO: add to bin first, because other threads can use them right away.\n            // This must be done carefully, because blocks in bins can be released\n            // in releaseCachesToLimit().\n            const unsigned NUM_OF_REG = 3;\n            MemRegionType regType = needSlabRegion ? MEMREG_SLAB_BLOCKS : MEMREG_LARGE_BLOCKS;\n            block = addNewRegion(regSz_sizeBased, regType, /*addToBin=*/false);\n            if (block)\n                for (unsigned idx=0; idx<NUM_OF_REG; idx++)\n                    if (! addNewRegion(regSz_sizeBased, regType, /*addToBin=*/true))\n                        break;\n        } else {\n            block = addNewRegion(regSz_sizeBased, MEMREG_LARGE_BLOCKS, /*addToBin=*/false);\n        }\n        memExtendingSema.signal();\n\n        // no regions found, try to clean cache\n        if (!block || block == (FreeBlock*)VALID_BLOCK_IN_BIN)\n            return releaseMemInCaches(startModifiedCnt, lockedBinsThreshold, numOfLockedBins);\n        // Since a region can hold more than one block it can be split.\n        *splittableRet = true;\n    }\n    // after asking memory from OS, release caches if we above the memory limits\n    releaseCachesToLimit();\n\n    return block;\n}\n\nvoid Backend::releaseCachesToLimit()\n{\n    if (!memSoftLimit.load(std::memory_order_relaxed)\n            || totalMemSize.load(std::memory_order_relaxed) <= memSoftLimit.load(std::memory_order_relaxed)) {\n        return;\n    }\n    size_t locTotalMemSize, locMemSoftLimit;\n\n    scanCoalescQ(/*forceCoalescQDrop=*/false);\n    if (extMemPool->softCachesCleanup() &&\n        (locTotalMemSize = totalMemSize.load(std::memory_order_acquire)) <=\n        (locMemSoftLimit = memSoftLimit.load(std::memory_order_acquire)))\n        return;\n    // clean global large-object cache, if this is not enough, clean local caches\n    // do this in several tries, because backend fragmentation can prevent\n    // region from releasing\n    for (int cleanLocal = 0; cleanLocal<2; cleanLocal++)\n        while (cleanLocal ?\n                 extMemPool->allLocalCaches.cleanup(/*cleanOnlyUnused=*/true) :\n                 extMemPool->loc.decreasingCleanup())\n            if ((locTotalMemSize = totalMemSize.load(std::memory_order_acquire)) <=\n                (locMemSoftLimit = memSoftLimit.load(std::memory_order_acquire)))\n                return;\n    // last chance to match memSoftLimit\n    extMemPool->hardCachesCleanup(true);\n}\n\nint Backend::IndexedBins::getMinNonemptyBin(unsigned startBin) const\n{\n    int p = bitMask.getMinTrue(startBin);\n    return p == -1 ? Backend::freeBinsNum : p;\n}\n\nFreeBlock *Backend::IndexedBins::findBlock(int nativeBin, BackendSync *sync, size_t size,\n        bool needAlignedBlock, bool alignedBin, int *numOfLockedBins)\n{\n    for (int i=getMinNonemptyBin(nativeBin); i<(int)freeBinsNum; i=getMinNonemptyBin(i+1))\n        if (FreeBlock *block = getFromBin(i, sync, size, needAlignedBlock, alignedBin, /*wait=*/false, numOfLockedBins))\n            return block;\n\n    return nullptr;\n}\n\nvoid Backend::requestBootstrapMem()\n{\n    if (bootsrapMemDone == bootsrapMemStatus.load(std::memory_order_acquire))\n        return;\n    MallocMutex::scoped_lock lock( bootsrapMemStatusMutex );\n    if (bootsrapMemDone == bootsrapMemStatus)\n        return;\n    MALLOC_ASSERT(bootsrapMemNotDone == bootsrapMemStatus, ASSERT_TEXT);\n    bootsrapMemStatus = bootsrapMemInitializing;\n    // request some rather big region during bootstrap in advance\n    // ok to get nullptr here, as later we re-do a request with more modest size\n    addNewRegion(2*1024*1024, MEMREG_SLAB_BLOCKS, /*addToBin=*/true);\n    bootsrapMemStatus = bootsrapMemDone;\n}\n\n// try to allocate size Byte block in available bins\n// needAlignedRes is true if result must be slab-aligned\nFreeBlock *Backend::genericGetBlock(int num, size_t size, bool needAlignedBlock)\n{\n    FreeBlock *block = nullptr;\n    const size_t totalReqSize = num*size;\n    // no splitting after requesting new region, asks exact size\n    const int nativeBin = sizeToBin(totalReqSize);\n\n    requestBootstrapMem();\n    // If we found 2 or less locked bins, it's time to ask more memory from OS.\n    // But nothing can be asked from fixed pool. And we prefer wait, not ask\n    // for more memory, if block is quite large.\n    int lockedBinsThreshold = extMemPool->fixedPool || size>=maxBinned_SmallPage? 0 : 2;\n\n    // Find maximal requested size limited by getMaxBinnedSize()\n    AtomicUpdate(maxRequestedSize, totalReqSize, MaxRequestComparator(this));\n    scanCoalescQ(/*forceCoalescQDrop=*/false);\n\n    bool splittable = true;\n    for (;;) {\n        const intptr_t startModifiedCnt = bkndSync.getNumOfMods();\n        int numOfLockedBins;\n        intptr_t cleanCnt;\n        do {\n            cleanCnt = backendCleanCnt.load(std::memory_order_acquire);\n            numOfLockedBins = 0;\n            if (needAlignedBlock) {\n                block = freeSlabAlignedBins.findBlock(nativeBin, &bkndSync, num*size, needAlignedBlock,\n                                                        /*alignedBin=*/true, &numOfLockedBins);\n                if (!block && extMemPool->fixedPool)\n                    block = freeLargeBlockBins.findBlock(nativeBin, &bkndSync, num*size, needAlignedBlock,\n                                                        /*alignedBin=*/false, &numOfLockedBins);\n            } else {\n                block = freeLargeBlockBins.findBlock(nativeBin, &bkndSync, num*size, needAlignedBlock,\n                                                        /*alignedBin=*/false, &numOfLockedBins);\n                if (!block && extMemPool->fixedPool)\n                    block = freeSlabAlignedBins.findBlock(nativeBin, &bkndSync, num*size, needAlignedBlock,\n                                                        /*alignedBin=*/true, &numOfLockedBins);\n            }\n        } while (!block && (numOfLockedBins>lockedBinsThreshold || cleanCnt % 2 == 1 ||\n                            cleanCnt != backendCleanCnt.load(std::memory_order_acquire)));\n\n        if (block)\n            break;\n\n        bool retScanCoalescQ = scanCoalescQ(/*forceCoalescQDrop=*/true);\n        bool retSoftCachesCleanup = extMemPool->softCachesCleanup();\n        if (!(retScanCoalescQ || retSoftCachesCleanup)) {\n            // bins are not updated,\n            // only remaining possibility is to ask for more memory\n            block = askMemFromOS(totalReqSize, startModifiedCnt, &lockedBinsThreshold,\n                        numOfLockedBins, &splittable, needAlignedBlock);\n            if (!block)\n                return nullptr;\n            if (block != (FreeBlock*)VALID_BLOCK_IN_BIN) {\n                // size can be increased in askMemFromOS, that's why >=\n                MALLOC_ASSERT(block->sizeTmp >= size, ASSERT_TEXT);\n                break;\n            }\n            // valid block somewhere in bins, let's find it\n            block = nullptr;\n        }\n    }\n    MALLOC_ASSERT(block, ASSERT_TEXT);\n    if (splittable) {\n        // At this point we have to be sure that slabAligned attribute describes the right block state\n        block = splitBlock(block, num, size, block->slabAligned, needAlignedBlock);\n    }\n    // matched blockConsumed() from startUseBlock()\n    bkndSync.blockReleased();\n\n    return block;\n}\n\nLargeMemoryBlock *Backend::getLargeBlock(size_t size)\n{\n    LargeMemoryBlock *lmb =\n        (LargeMemoryBlock*)genericGetBlock(1, size, /*needAlignedRes=*/false);\n    if (lmb) {\n        lmb->unalignedSize = size;\n        if (extMemPool->userPool())\n            extMemPool->lmbList.add(lmb);\n    }\n    return lmb;\n}\n\nBlockI *Backend::getSlabBlock(int num) {\n    BlockI *b = (BlockI*)genericGetBlock(num, slabSize, /*slabAligned=*/true);\n    MALLOC_ASSERT(isAligned(b, slabSize), ASSERT_TEXT);\n    return b;\n}\n\nvoid Backend::putSlabBlock(BlockI *block) {\n    genericPutBlock((FreeBlock *)block, slabSize, /*slabAligned=*/true);\n}\n\nvoid *Backend::getBackRefSpace(size_t size, bool *rawMemUsed)\n{\n    // This block is released only at shutdown, so it can prevent\n    // a entire region releasing when it's received from the backend,\n    // so prefer getRawMemory using.\n    if (void *ret = getRawMemory(size, REGULAR)) {\n        *rawMemUsed = true;\n        return ret;\n    }\n    void *ret = genericGetBlock(1, size, /*needAlignedRes=*/false);\n    if (ret) *rawMemUsed = false;\n    return ret;\n}\n\nvoid Backend::putBackRefSpace(void *b, size_t size, bool rawMemUsed)\n{\n    if (rawMemUsed)\n        freeRawMemory(b, size);\n    // ignore not raw mem, as it released on region releasing\n}\n\nvoid Backend::removeBlockFromBin(FreeBlock *fBlock)\n{\n    if (fBlock->myBin != Backend::NO_BIN) {\n        if (fBlock->slabAligned)\n            freeSlabAlignedBins.lockRemoveBlock(fBlock->myBin, fBlock);\n        else\n            freeLargeBlockBins.lockRemoveBlock(fBlock->myBin, fBlock);\n    }\n}\n\nvoid Backend::genericPutBlock(FreeBlock *fBlock, size_t blockSz, bool slabAligned)\n{\n    bkndSync.blockConsumed();\n    coalescAndPut(fBlock, blockSz, slabAligned);\n    bkndSync.blockReleased();\n}\n\nvoid AllLargeBlocksList::add(LargeMemoryBlock *lmb)\n{\n    MallocMutex::scoped_lock scoped_cs(largeObjLock);\n    lmb->gPrev = nullptr;\n    lmb->gNext = loHead;\n    if (lmb->gNext)\n        lmb->gNext->gPrev = lmb;\n    loHead = lmb;\n}\n\nvoid AllLargeBlocksList::remove(LargeMemoryBlock *lmb)\n{\n    MallocMutex::scoped_lock scoped_cs(largeObjLock);\n    if (loHead == lmb)\n        loHead = lmb->gNext;\n    if (lmb->gNext)\n        lmb->gNext->gPrev = lmb->gPrev;\n    if (lmb->gPrev)\n        lmb->gPrev->gNext = lmb->gNext;\n}\n\nvoid Backend::putLargeBlock(LargeMemoryBlock *lmb)\n{\n    if (extMemPool->userPool())\n        extMemPool->lmbList.remove(lmb);\n    genericPutBlock((FreeBlock *)lmb, lmb->unalignedSize, false);\n}\n\nvoid Backend::returnLargeObject(LargeMemoryBlock *lmb)\n{\n    removeBackRef(lmb->backRefIdx);\n    putLargeBlock(lmb);\n    STAT_increment(getThreadId(), ThreadCommonCounters, freeLargeObj);\n}\n\n#if BACKEND_HAS_MREMAP\nvoid *Backend::remap(void *ptr, size_t oldSize, size_t newSize, size_t alignment)\n{\n    // no remap for user pools and for object too small that living in bins\n    if (inUserPool() || min(oldSize, newSize)<maxBinned_SmallPage\n        // during remap, can't guarantee alignment more strict than current or\n        // more strict than page alignment\n        || !isAligned(ptr, alignment) || alignment>extMemPool->granularity)\n        return nullptr;\n    const LargeMemoryBlock* lmbOld = ((LargeObjectHdr *)ptr - 1)->memoryBlock;\n    const size_t oldUnalignedSize = lmbOld->unalignedSize;\n    FreeBlock *oldFBlock = (FreeBlock *)lmbOld;\n    FreeBlock *right = oldFBlock->rightNeig(oldUnalignedSize);\n    // in every region only one block can have LAST_REGION_BLOCK on right,\n    // so don't need no synchronization\n    if (!right->isLastRegionBlock())\n        return nullptr;\n\n    MemRegion *oldRegion = static_cast<LastFreeBlock*>(right)->memRegion;\n    MALLOC_ASSERT( oldRegion < ptr, ASSERT_TEXT );\n    const size_t oldRegionSize = oldRegion->allocSz;\n    if (oldRegion->type != MEMREG_ONE_BLOCK)\n        return nullptr;  // we are not single in the region\n    const size_t userOffset = (uintptr_t)ptr - (uintptr_t)oldRegion;\n    const size_t alignedSize = LargeObjectCache::alignToBin(newSize + userOffset);\n    const size_t requestSize =\n        alignUp(sizeof(MemRegion) + alignedSize + sizeof(LastFreeBlock), extMemPool->granularity);\n    if (requestSize < alignedSize) // is wrapped around?\n        return nullptr;\n    regionList.remove(oldRegion);\n\n    // The deallocation should be registered in address range before mremap to\n    // prevent a race condition with allocation on another thread.\n    // (OS can reuse the memory and registerAlloc will be missed on another thread)\n    usedAddrRange.registerFree((uintptr_t)oldRegion, (uintptr_t)oldRegion + oldRegionSize);\n\n    void *ret = mremap(oldRegion, oldRegion->allocSz, requestSize, MREMAP_MAYMOVE);\n    if (MAP_FAILED == ret) { // can't remap, revert and leave\n        regionList.add(oldRegion);\n        usedAddrRange.registerAlloc((uintptr_t)oldRegion, (uintptr_t)oldRegion + oldRegionSize);\n        return nullptr;\n    }\n    MemRegion *region = (MemRegion*)ret;\n    MALLOC_ASSERT(region->type == MEMREG_ONE_BLOCK, ASSERT_TEXT);\n    region->allocSz = requestSize;\n    region->blockSz = alignedSize;\n\n    FreeBlock *fBlock = (FreeBlock *)alignUp((uintptr_t)region + sizeof(MemRegion),\n                                             largeObjectAlignment);\n\n    regionList.add(region);\n    startUseBlock(region, fBlock, /*addToBin=*/false);\n    MALLOC_ASSERT(fBlock->sizeTmp == region->blockSz, ASSERT_TEXT);\n    // matched blockConsumed() in startUseBlock().\n    // TODO: get rid of useless pair blockConsumed()/blockReleased()\n    bkndSync.blockReleased();\n\n    // object must start at same offset from region's start\n    void *object = (void*)((uintptr_t)region + userOffset);\n    MALLOC_ASSERT(isAligned(object, alignment), ASSERT_TEXT);\n    LargeObjectHdr *header = (LargeObjectHdr*)object - 1;\n    setBackRef(header->backRefIdx, header);\n\n    LargeMemoryBlock *lmb = (LargeMemoryBlock*)fBlock;\n    lmb->unalignedSize = region->blockSz;\n    lmb->objectSize = newSize;\n    lmb->backRefIdx = header->backRefIdx;\n    header->memoryBlock = lmb;\n    MALLOC_ASSERT((uintptr_t)lmb + lmb->unalignedSize >=\n                  (uintptr_t)object + lmb->objectSize, \"An object must fit to the block.\");\n\n    usedAddrRange.registerAlloc((uintptr_t)region, (uintptr_t)region + requestSize);\n    totalMemSize.fetch_add(region->allocSz - oldRegionSize);\n\n    return object;\n}\n#endif /* BACKEND_HAS_MREMAP */\n\nvoid Backend::releaseRegion(MemRegion *memRegion)\n{\n    regionList.remove(memRegion);\n    freeRawMem(memRegion, memRegion->allocSz);\n}\n\n// coalesce fBlock with its neighborhood\nFreeBlock *Backend::doCoalesc(FreeBlock *fBlock, MemRegion **mRegion)\n{\n    FreeBlock *resBlock = fBlock;\n    size_t resSize = fBlock->sizeTmp;\n    MemRegion *memRegion = nullptr;\n\n    fBlock->markCoalescing(resSize);\n    resBlock->blockInBin = false;\n\n    // coalescing with left neighbor\n    size_t leftSz = fBlock->trySetLeftUsed(GuardedSize::COAL_BLOCK);\n    if (leftSz != GuardedSize::LOCKED) {\n        if (leftSz == GuardedSize::COAL_BLOCK) {\n            coalescQ.putBlock(fBlock);\n            return nullptr;\n        } else {\n            FreeBlock *left = fBlock->leftNeig(leftSz);\n            size_t lSz = left->trySetMeUsed(GuardedSize::COAL_BLOCK);\n            if (lSz <= GuardedSize::MAX_LOCKED_VAL) {\n                fBlock->setLeftFree(leftSz); // rollback\n                coalescQ.putBlock(fBlock);\n                return nullptr;\n            } else {\n                MALLOC_ASSERT(lSz == leftSz, \"Invalid header\");\n                left->blockInBin = true;\n                resBlock = left;\n                resSize += leftSz;\n                resBlock->sizeTmp = resSize;\n            }\n        }\n    }\n    // coalescing with right neighbor\n    FreeBlock *right = fBlock->rightNeig(fBlock->sizeTmp);\n    size_t rightSz = right->trySetMeUsed(GuardedSize::COAL_BLOCK);\n    if (rightSz != GuardedSize::LOCKED) {\n        // LastFreeBlock is on the right side\n        if (GuardedSize::LAST_REGION_BLOCK == rightSz) {\n            right->setMeFree(GuardedSize::LAST_REGION_BLOCK);\n            memRegion = static_cast<LastFreeBlock*>(right)->memRegion;\n        } else if (GuardedSize::COAL_BLOCK == rightSz) {\n            if (resBlock->blockInBin) {\n                resBlock->blockInBin = false;\n                removeBlockFromBin(resBlock);\n            }\n            coalescQ.putBlock(resBlock);\n            return nullptr;\n        } else {\n            size_t rSz = right->rightNeig(rightSz)->\n                trySetLeftUsed(GuardedSize::COAL_BLOCK);\n            if (rSz <= GuardedSize::MAX_LOCKED_VAL) {\n                right->setMeFree(rightSz);  // rollback\n                if (resBlock->blockInBin) {\n                    resBlock->blockInBin = false;\n                    removeBlockFromBin(resBlock);\n                }\n                coalescQ.putBlock(resBlock);\n                return nullptr;\n            } else {\n                MALLOC_ASSERT(rSz == rightSz, \"Invalid header\");\n                removeBlockFromBin(right);\n                resSize += rightSz;\n\n                // Is LastFreeBlock on the right side of right?\n                FreeBlock *nextRight = right->rightNeig(rightSz);\n                size_t nextRightSz = nextRight->\n                    trySetMeUsed(GuardedSize::COAL_BLOCK);\n                if (nextRightSz > GuardedSize::MAX_LOCKED_VAL) {\n                    if (nextRightSz == GuardedSize::LAST_REGION_BLOCK)\n                        memRegion = static_cast<LastFreeBlock*>(nextRight)->memRegion;\n\n                    nextRight->setMeFree(nextRightSz);\n                }\n            }\n        }\n    }\n    if (memRegion) {\n        MALLOC_ASSERT((uintptr_t)memRegion + memRegion->allocSz >=\n                      (uintptr_t)right + sizeof(LastFreeBlock), ASSERT_TEXT);\n        MALLOC_ASSERT((uintptr_t)memRegion < (uintptr_t)resBlock, ASSERT_TEXT);\n        *mRegion = memRegion;\n    } else\n        *mRegion = nullptr;\n    resBlock->sizeTmp = resSize;\n    return resBlock;\n}\n\nbool Backend::coalescAndPutList(FreeBlock *list, bool forceCoalescQDrop, bool reportBlocksProcessed)\n{\n    bool regionReleased = false;\n\n    for (FreeBlock *helper; list;\n         list = helper,\n             // matches block enqueue in CoalRequestQ::putBlock()\n             reportBlocksProcessed? coalescQ.blockWasProcessed() : (void)0) {\n        MemRegion *memRegion;\n        bool addToTail = false;\n\n        helper = list->nextToFree;\n        FreeBlock *toRet = doCoalesc(list, &memRegion);\n        if (!toRet)\n            continue;\n\n        if (memRegion && memRegion->blockSz == toRet->sizeTmp\n            && !extMemPool->fixedPool) {\n            if (extMemPool->regionsAreReleaseable()) {\n                // release the region, because there is no used blocks in it\n                if (toRet->blockInBin)\n                    removeBlockFromBin(toRet);\n                releaseRegion(memRegion);\n                regionReleased = true;\n                continue;\n            } else // add block from empty region to end of bin,\n                addToTail = true; // preserving for exact fit\n        }\n        size_t currSz = toRet->sizeTmp;\n        int bin = sizeToBin(currSz);\n        bool toAligned = extMemPool->fixedPool ? toAlignedBin(toRet, currSz) : toRet->slabAligned;\n        bool needAddToBin = true;\n\n        if (toRet->blockInBin) {\n            // Does it stay in same bin?\n            if (toRet->myBin == bin && toRet->slabAligned == toAligned)\n                needAddToBin = false;\n            else {\n                toRet->blockInBin = false;\n                removeBlockFromBin(toRet);\n            }\n        }\n\n        // Does not stay in same bin, or bin-less; add it\n        if (needAddToBin) {\n            toRet->prev = toRet->next = toRet->nextToFree = nullptr;\n            toRet->myBin = NO_BIN;\n            toRet->slabAligned = toAligned;\n\n            // If the block is too small to fit in any bin, keep it bin-less.\n            // It's not a leak because the block later can be coalesced.\n            if (currSz >= minBinnedSize) {\n                toRet->sizeTmp = currSz;\n                IndexedBins *target = toRet->slabAligned ? &freeSlabAlignedBins : &freeLargeBlockBins;\n                if (forceCoalescQDrop) {\n                    target->addBlock(bin, toRet, toRet->sizeTmp, addToTail);\n                } else if (!target->tryAddBlock(bin, toRet, addToTail)) {\n                    coalescQ.putBlock(toRet);\n                    continue;\n                }\n            }\n            toRet->sizeTmp = 0;\n        }\n        // Free (possibly coalesced) free block.\n        // Adding to bin must be done before this point,\n        // because after a block is free it can be coalesced, and\n        // using its pointer became unsafe.\n        // Remember that coalescing is not done under any global lock.\n        toRet->setMeFree(currSz);\n        toRet->rightNeig(currSz)->setLeftFree(currSz);\n    }\n    return regionReleased;\n}\n\n// Coalesce fBlock and add it back to a bin;\n// processing delayed coalescing requests.\nvoid Backend::coalescAndPut(FreeBlock *fBlock, size_t blockSz, bool slabAligned)\n{\n    fBlock->sizeTmp = blockSz;\n    fBlock->nextToFree = nullptr;\n    fBlock->slabAligned = slabAligned;\n\n    coalescAndPutList(fBlock, /*forceCoalescQDrop=*/false, /*reportBlocksProcessed=*/false);\n}\n\nbool Backend::scanCoalescQ(bool forceCoalescQDrop)\n{\n    FreeBlock *currCoalescList = coalescQ.getAll();\n\n    if (currCoalescList)\n        // reportBlocksProcessed=true informs that the blocks leave coalescQ,\n        // matches blockConsumed() from CoalRequestQ::putBlock()\n        coalescAndPutList(currCoalescList, forceCoalescQDrop,\n                          /*reportBlocksProcessed=*/true);\n    // returns status of coalescQ.getAll(), as an indication of possible changes in backend\n    // TODO: coalescAndPutList() may report is some new free blocks became available or not\n    return currCoalescList;\n}\n\nFreeBlock *Backend::findBlockInRegion(MemRegion *region, size_t exactBlockSize)\n{\n    FreeBlock *fBlock;\n    size_t blockSz;\n    uintptr_t fBlockEnd,\n        lastFreeBlock = (uintptr_t)region + region->allocSz - sizeof(LastFreeBlock);\n\n    static_assert(sizeof(LastFreeBlock) % sizeof(uintptr_t) == 0,\n        \"Atomic applied on LastFreeBlock, and we put it at the end of region, that\"\n        \" is uintptr_t-aligned, so no unaligned atomic operations are possible.\");\n     // right bound is slab-aligned, keep LastFreeBlock after it\n    if (region->type == MEMREG_SLAB_BLOCKS) {\n        fBlock = (FreeBlock *)alignUp((uintptr_t)region + sizeof(MemRegion), sizeof(uintptr_t));\n        fBlockEnd = alignDown(lastFreeBlock, slabSize);\n    } else {\n        fBlock = (FreeBlock *)alignUp((uintptr_t)region + sizeof(MemRegion), largeObjectAlignment);\n        fBlockEnd = (uintptr_t)fBlock + exactBlockSize;\n        MALLOC_ASSERT(fBlockEnd <= lastFreeBlock, ASSERT_TEXT);\n    }\n    if (fBlockEnd <= (uintptr_t)fBlock)\n        return nullptr; // allocSz is too small\n    blockSz = fBlockEnd - (uintptr_t)fBlock;\n    // TODO: extend getSlabBlock to support degradation, i.e. getting less blocks\n    // then requested, and then relax this check\n    // (now all or nothing is implemented, check according to this)\n    if (blockSz < numOfSlabAllocOnMiss*slabSize)\n        return nullptr;\n\n    region->blockSz = blockSz;\n    return fBlock;\n}\n\n// startUseBlock may add the free block to a bin, the block can be used and\n// even released after this, so the region must be added to regionList already\nvoid Backend::startUseBlock(MemRegion *region, FreeBlock *fBlock, bool addToBin)\n{\n    size_t blockSz = region->blockSz;\n    fBlock->initHeader();\n    fBlock->setMeFree(blockSz);\n\n    LastFreeBlock *lastBl = static_cast<LastFreeBlock*>(fBlock->rightNeig(blockSz));\n    // to not get unaligned atomics during LastFreeBlock access\n    MALLOC_ASSERT(isAligned(lastBl, sizeof(uintptr_t)), nullptr);\n    lastBl->initHeader();\n    lastBl->setMeFree(GuardedSize::LAST_REGION_BLOCK);\n    lastBl->setLeftFree(blockSz);\n    lastBl->myBin = NO_BIN;\n    lastBl->memRegion = region;\n\n    if (addToBin) {\n        unsigned targetBin = sizeToBin(blockSz);\n        // during adding advance regions, register bin for a largest block in region\n        advRegBins.registerBin(targetBin);\n        if (region->type == MEMREG_SLAB_BLOCKS) {\n            fBlock->slabAligned = true;\n            freeSlabAlignedBins.addBlock(targetBin, fBlock, blockSz, /*addToTail=*/false);\n        } else {\n            fBlock->slabAligned = false;\n            freeLargeBlockBins.addBlock(targetBin, fBlock, blockSz, /*addToTail=*/false);\n        }\n    } else {\n        // to match with blockReleased() in genericGetBlock\n        bkndSync.blockConsumed();\n        // Understand our alignment for correct splitBlock operation\n        fBlock->slabAligned = region->type == MEMREG_SLAB_BLOCKS ? true : false;\n        fBlock->sizeTmp = fBlock->tryLockBlock();\n        MALLOC_ASSERT(fBlock->sizeTmp >= FreeBlock::minBlockSize, \"Locking must be successful\");\n    }\n}\n\nvoid MemRegionList::add(MemRegion *r)\n{\n    r->prev = nullptr;\n    MallocMutex::scoped_lock lock(regionListLock);\n    r->next = head;\n    head = r;\n    if (head->next)\n        head->next->prev = head;\n}\n\nvoid MemRegionList::remove(MemRegion *r)\n{\n    MallocMutex::scoped_lock lock(regionListLock);\n    if (head == r)\n        head = head->next;\n    if (r->next)\n        r->next->prev = r->prev;\n    if (r->prev)\n        r->prev->next = r->next;\n}\n\n#if __TBB_MALLOC_BACKEND_STAT\nint MemRegionList::reportStat(FILE *f)\n{\n    int regNum = 0;\n    MallocMutex::scoped_lock lock(regionListLock);\n    for (MemRegion *curr = head; curr; curr = curr->next) {\n        fprintf(f, \"%p: max block %lu B, \", curr, curr->blockSz);\n        regNum++;\n    }\n    return regNum;\n}\n#endif\n\nFreeBlock *Backend::addNewRegion(size_t size, MemRegionType memRegType, bool addToBin)\n{\n    static_assert(sizeof(BlockMutexes) <= sizeof(BlockI), \"Header must be not overwritten in used blocks\");\n    MALLOC_ASSERT(FreeBlock::minBlockSize > GuardedSize::MAX_SPEC_VAL,\n          \"Block length must not conflict with special values of GuardedSize\");\n    // If the region is not \"for slabs\" we should reserve some space for\n    // a region header, the worst case alignment and the last block mark.\n    const size_t requestSize = memRegType == MEMREG_SLAB_BLOCKS ? size :\n        size + sizeof(MemRegion) + largeObjectAlignment\n             +  FreeBlock::minBlockSize + sizeof(LastFreeBlock);\n\n    size_t rawSize = requestSize;\n    MemRegion *region = (MemRegion*)allocRawMem(rawSize);\n    if (!region) {\n        MALLOC_ASSERT(rawSize==requestSize, \"getRawMem has not allocated memory but changed the allocated size.\");\n        return nullptr;\n    }\n    if (rawSize < sizeof(MemRegion)) {\n        if (!extMemPool->fixedPool)\n            freeRawMem(region, rawSize);\n        return nullptr;\n    }\n\n    region->type = memRegType;\n    region->allocSz = rawSize;\n    FreeBlock *fBlock = findBlockInRegion(region, size);\n    if (!fBlock) {\n        if (!extMemPool->fixedPool)\n            freeRawMem(region, rawSize);\n        return nullptr;\n    }\n    regionList.add(region);\n    startUseBlock(region, fBlock, addToBin);\n    bkndSync.binsModified();\n    return addToBin? (FreeBlock*)VALID_BLOCK_IN_BIN : fBlock;\n}\n\nvoid Backend::init(ExtMemoryPool *extMemoryPool)\n{\n    extMemPool = extMemoryPool;\n    usedAddrRange.init();\n    coalescQ.init(&bkndSync);\n    bkndSync.init(this);\n}\n\nvoid Backend::reset()\n{\n    MALLOC_ASSERT(extMemPool->userPool(), \"Only user pool can be reset.\");\n    // no active threads are allowed in backend while reset() called\n    verify();\n\n    freeLargeBlockBins.reset();\n    freeSlabAlignedBins.reset();\n    advRegBins.reset();\n\n    for (MemRegion *curr = regionList.head; curr; curr = curr->next) {\n        FreeBlock *fBlock = findBlockInRegion(curr, curr->blockSz);\n        MALLOC_ASSERT(fBlock, \"A memory region unexpectedly got smaller\");\n        startUseBlock(curr, fBlock, /*addToBin=*/true);\n    }\n}\n\nbool Backend::destroy()\n{\n    bool noError = true;\n    // no active threads are allowed in backend while destroy() called\n    verify();\n    if (!inUserPool()) {\n        freeLargeBlockBins.reset();\n        freeSlabAlignedBins.reset();\n    }\n    while (regionList.head) {\n        MemRegion *helper = regionList.head->next;\n        noError &= freeRawMem(regionList.head, regionList.head->allocSz);\n        regionList.head = helper;\n    }\n    return noError;\n}\n\nbool Backend::clean()\n{\n    scanCoalescQ(/*forceCoalescQDrop=*/false);\n    // Backend::clean is always called under synchronization so only one thread can\n    // enter to this method at once.\n    // backendCleanCnt%2== 1 means that clean operation is in progress\n    backendCleanCnt.fetch_add(1, std::memory_order_acq_rel);\n    bool res = false;\n    // We can have several blocks occupying a whole region,\n    // because such regions are added in advance (see askMemFromOS() and reset()),\n    // and never used. Release them all.\n    for (int i = advRegBins.getMinUsedBin(0); i != -1; i = advRegBins.getMinUsedBin(i+1)) {\n        if (i == freeSlabAlignedBins.getMinNonemptyBin(i))\n            res |= freeSlabAlignedBins.tryReleaseRegions(i, this);\n        if (i == freeLargeBlockBins.getMinNonemptyBin(i))\n            res |= freeLargeBlockBins.tryReleaseRegions(i, this);\n    }\n    backendCleanCnt.fetch_add(1, std::memory_order_acq_rel);\n    return res;\n}\n\nvoid Backend::IndexedBins::verify()\n{\n#if MALLOC_DEBUG\n    for (int i=0; i<(int)freeBinsNum; i++) {\n        for (FreeBlock *fb = freeBins[i].head.load(std::memory_order_relaxed); fb; fb=fb->next) {\n            uintptr_t mySz = fb->myL.value;\n            MALLOC_ASSERT(mySz>GuardedSize::MAX_SPEC_VAL, ASSERT_TEXT);\n            FreeBlock *right = (FreeBlock*)((uintptr_t)fb + mySz);\n            suppress_unused_warning(right);\n            MALLOC_ASSERT(right->myL.value<=GuardedSize::MAX_SPEC_VAL, ASSERT_TEXT);\n            MALLOC_ASSERT(right->leftL.value==mySz, ASSERT_TEXT);\n            MALLOC_ASSERT(fb->leftL.value<=GuardedSize::MAX_SPEC_VAL, ASSERT_TEXT);\n        }\n    }\n#endif\n}\n\n// For correct operation, it must be called when no other threads\n// is changing backend.\nvoid Backend::verify()\n{\n#if MALLOC_DEBUG\n    scanCoalescQ(/*forceCoalescQDrop=*/false);\n#endif // MALLOC_DEBUG\n\n    freeLargeBlockBins.verify();\n    freeSlabAlignedBins.verify();\n}\n\n#if __TBB_MALLOC_BACKEND_STAT\nsize_t Backend::Bin::countFreeBlocks()\n{\n    size_t cnt = 0;\n    {\n        MallocMutex::scoped_lock lock(tLock);\n        for (FreeBlock *fb = head; fb; fb = fb->next)\n            cnt++;\n    }\n    return cnt;\n}\n\nsize_t Backend::Bin::reportFreeBlocks(FILE *f)\n{\n    size_t totalSz = 0;\n    MallocMutex::scoped_lock lock(tLock);\n    for (FreeBlock *fb = head; fb; fb = fb->next) {\n        size_t sz = fb->tryLockBlock();\n        fb->setMeFree(sz);\n        fb->rightNeig(sz)->setLeftFree(sz);\n        fprintf(f, \" [%p;%p]\", fb, (void*)((uintptr_t)fb+sz));\n        totalSz += sz;\n    }\n    return totalSz;\n}\n\nvoid Backend::IndexedBins::reportStat(FILE *f)\n{\n    size_t totalSize = 0;\n\n    for (int i=0; i<Backend::freeBinsNum; i++)\n        if (size_t cnt = freeBins[i].countFreeBlocks()) {\n            totalSize += freeBins[i].reportFreeBlocks(f);\n            fprintf(f, \" %d:%lu, \", i, cnt);\n        }\n    fprintf(f, \"\\ttotal size %lu KB\", totalSize/1024);\n}\n\nvoid Backend::reportStat(FILE *f)\n{\n    scanCoalescQ(/*forceCoalescQDrop=*/false);\n\n    fprintf(f, \"\\n  regions:\\n\");\n    int regNum = regionList.reportStat(f);\n    fprintf(f, \"\\n%d regions, %lu KB in all regions\\n  free bins:\\nlarge bins: \",\n            regNum, totalMemSize/1024);\n    freeLargeBlockBins.reportStat(f);\n    fprintf(f, \"\\naligned bins: \");\n    freeSlabAlignedBins.reportStat(f);\n    fprintf(f, \"\\n\");\n}\n#endif // __TBB_MALLOC_BACKEND_STAT\n\n} } // namespaces\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/backend.h",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_tbbmalloc_internal_H\n    #error tbbmalloc_internal.h must be included at this point\n#endif\n\n#ifndef __TBB_backend_H\n#define __TBB_backend_H\n\n// Included from namespace rml::internal\n\n// global state of blocks currently in processing\nclass BackendSync {\n    // Class instances should reside in zero-initialized memory!\n    // The number of blocks currently removed from a bin and not returned back\n    std::atomic<intptr_t> inFlyBlocks;        // to another\n    std::atomic<intptr_t> binsModifications;  // incremented on every bin modification\n    Backend *backend;\npublic:\n    void init(Backend *b) { backend = b; }\n    void blockConsumed() { inFlyBlocks++; }\n    void binsModified() { binsModifications++; }\n    void blockReleased() {\n#if __TBB_MALLOC_BACKEND_STAT\n        MALLOC_ITT_SYNC_RELEASING(&inFlyBlocks);\n#endif\n        binsModifications++;\n        intptr_t prev = inFlyBlocks.fetch_sub(1);\n        MALLOC_ASSERT(prev > 0, ASSERT_TEXT);\n        suppress_unused_warning(prev);\n    }\n    intptr_t getNumOfMods() const { return binsModifications.load(std::memory_order_acquire); }\n    // return true if need re-do the blocks search\n    inline bool waitTillBlockReleased(intptr_t startModifiedCnt);\n};\n\nclass CoalRequestQ { // queue of free blocks that coalescing was delayed\nprivate:\n    std::atomic<FreeBlock*> blocksToFree;\n    BackendSync *bkndSync;\n    // counted blocks in blocksToFree and that are leaved blocksToFree\n    // and still in active coalescing\n    std::atomic<intptr_t> inFlyBlocks;\npublic:\n    void init(BackendSync *bSync) { bkndSync = bSync; }\n    FreeBlock *getAll(); // return current list of blocks and make queue empty\n    void putBlock(FreeBlock *fBlock);\n    inline void blockWasProcessed();\n    intptr_t blocksInFly() const { return inFlyBlocks.load(std::memory_order_acquire); }\n};\n\nclass MemExtendingSema {\n    std::atomic<intptr_t>    active;\npublic:\n    bool wait() {\n        bool rescanBins = false;\n        // up to 3 threads can add more memory from OS simultaneously,\n        // rest of threads have to wait\n        intptr_t prevCnt = active.load(std::memory_order_acquire);\n        for (;;) {\n            if (prevCnt < 3) {\n                if (active.compare_exchange_strong(prevCnt, prevCnt + 1)) {\n                    break;\n                }\n            } else {\n                SpinWaitWhileEq(active, prevCnt);\n                rescanBins = true;\n                break;\n            }\n        }\n        return rescanBins;\n    }\n    void signal() { active.fetch_sub(1); }\n};\n\nenum MemRegionType {\n    // The region holds only slabs\n    MEMREG_SLAB_BLOCKS = 0,\n    // The region can hold several large object blocks\n    MEMREG_LARGE_BLOCKS,\n    // The region holds only one block with a requested size\n    MEMREG_ONE_BLOCK\n};\n\nclass MemRegionList {\n    MallocMutex regionListLock;\npublic:\n    MemRegion  *head;\n    void add(MemRegion *r);\n    void remove(MemRegion *r);\n    int reportStat(FILE *f);\n};\n\nclass Backend {\nprivate:\n/* Blocks in range [minBinnedSize; getMaxBinnedSize()] are kept in bins,\n   one region can contains several blocks. Larger blocks are allocated directly\n   and one region always contains one block.\n*/\n    enum {\n        minBinnedSize = 8*1024UL,\n        /*   If huge pages are available, maxBinned_HugePage used.\n             If not, maxBinned_SmallPage is the threshold.\n             TODO: use pool's granularity for upper bound setting.*/\n        maxBinned_SmallPage = 1024*1024UL,\n        // TODO: support other page sizes\n        maxBinned_HugePage = 4*1024*1024UL\n    };\n    enum {\n        VALID_BLOCK_IN_BIN = 1 // valid block added to bin, not returned as result\n    };\npublic:\n    // Backend bins step is the same as CacheStep for large object cache\n    static const size_t   freeBinsStep = LargeObjectCache::LargeBSProps::CacheStep;\n    static const unsigned freeBinsNum = (maxBinned_HugePage-minBinnedSize)/freeBinsStep + 1;\n\n    // if previous access missed per-thread slabs pool,\n    // allocate numOfSlabAllocOnMiss blocks in advance\n    static const int numOfSlabAllocOnMiss = 2;\n\n    enum {\n        NO_BIN = -1,\n        // special bin for blocks >= maxBinned_HugePage, blocks go to this bin\n        // when pool is created with keepAllMemory policy\n        // TODO: currently this bin is scanned using \"1st fit\", as it accumulates\n        // blocks of different sizes, \"best fit\" is preferred in terms of fragmentation\n        HUGE_BIN = freeBinsNum-1\n    };\n\n    // Bin keeps 2-linked list of free blocks. It must be 2-linked\n    // because during coalescing a block it's removed from a middle of the list.\n    struct Bin {\n        std::atomic<FreeBlock*> head;\n        FreeBlock*              tail;\n        MallocMutex             tLock;\n\n        void removeBlock(FreeBlock *fBlock);\n        void reset() {\n            head.store(nullptr, std::memory_order_relaxed);\n            tail = nullptr;\n        }\n        bool empty() const { return !head.load(std::memory_order_relaxed); }\n\n        size_t countFreeBlocks();\n        size_t reportFreeBlocks(FILE *f);\n        void reportStat(FILE *f);\n    };\n\n    typedef BitMaskMin<Backend::freeBinsNum> BitMaskBins;\n\n    // array of bins supplemented with bitmask for fast finding of non-empty bins\n    class IndexedBins {\n        BitMaskBins bitMask;\n        Bin         freeBins[Backend::freeBinsNum];\n        FreeBlock *getFromBin(int binIdx, BackendSync *sync, size_t size,\n                bool needAlignedBlock, bool alignedBin, bool wait, int *resLocked);\n    public:\n        FreeBlock *findBlock(int nativeBin, BackendSync *sync, size_t size,\n                bool needAlignedBlock, bool alignedBin,int *numOfLockedBins);\n        bool tryReleaseRegions(int binIdx, Backend *backend);\n        void lockRemoveBlock(int binIdx, FreeBlock *fBlock);\n        void addBlock(int binIdx, FreeBlock *fBlock, size_t blockSz, bool addToTail);\n        bool tryAddBlock(int binIdx, FreeBlock *fBlock, bool addToTail);\n        int  getMinNonemptyBin(unsigned startBin) const;\n        void verify();\n        void reset();\n        void reportStat(FILE *f);\n    };\n\nprivate:\n    class AdvRegionsBins {\n        BitMaskBins bins;\n    public:\n        void registerBin(int regBin) { bins.set(regBin, 1); }\n        int getMinUsedBin(int start) const { return bins.getMinTrue(start); }\n        void reset() { bins.reset(); }\n    };\n    // auxiliary class to atomic maximum request finding\n    class MaxRequestComparator {\n        const Backend *backend;\n    public:\n        MaxRequestComparator(const Backend *be) : backend(be) {}\n        inline bool operator()(size_t oldMaxReq, size_t requestSize) const;\n    };\n\n#if CHECK_ALLOCATION_RANGE\n    // Keep min and max of all addresses requested from OS,\n    // use it for checking memory possibly allocated by replaced allocators\n    // and for debugging purposes. Valid only for default memory pool.\n    class UsedAddressRange {\n        static const uintptr_t ADDRESS_UPPER_BOUND = UINTPTR_MAX;\n\n        std::atomic<uintptr_t> leftBound,\n                               rightBound;\n        MallocMutex mutex;\n    public:\n        // rightBound is zero-initialized\n        void init() { leftBound.store(ADDRESS_UPPER_BOUND, std::memory_order_relaxed); }\n        void registerAlloc(uintptr_t left, uintptr_t right);\n        void registerFree(uintptr_t left, uintptr_t right);\n        // as only left and right bounds are kept, we can return true\n        // for pointer not allocated by us, if more than single region\n        // was requested from OS\n        bool inRange(void *ptr) const {\n            const uintptr_t p = (uintptr_t)ptr;\n            return leftBound.load(std::memory_order_relaxed)<=p &&\n                   p<=rightBound.load(std::memory_order_relaxed);\n        }\n    };\n#else\n    class UsedAddressRange {\n    public:\n        void init() { }\n        void registerAlloc(uintptr_t, uintptr_t) {}\n        void registerFree(uintptr_t, uintptr_t) {}\n        bool inRange(void *) const { return true; }\n    };\n#endif\n\n    ExtMemoryPool   *extMemPool;\n    // used for release every region on pool destroying\n    MemRegionList    regionList;\n\n    CoalRequestQ     coalescQ; // queue of coalescing requests\n    BackendSync      bkndSync;\n    // semaphore protecting adding more more memory from OS\n    MemExtendingSema memExtendingSema;\n    //size_t           totalMemSize,\n    //                 memSoftLimit;\n    std::atomic<size_t> totalMemSize;\n    std::atomic<size_t> memSoftLimit;\n    UsedAddressRange usedAddrRange;\n    // to keep 1st allocation large than requested, keep bootstrapping status\n    enum {\n        bootsrapMemNotDone = 0,\n        bootsrapMemInitializing,\n        bootsrapMemDone\n    };\n    std::atomic<intptr_t> bootsrapMemStatus;\n    MallocMutex      bootsrapMemStatusMutex;\n\n    // Using of maximal observed requested size allows decrease\n    // memory consumption for small requests and decrease fragmentation\n    // for workloads when small and large allocation requests are mixed.\n    // TODO: decrease, not only increase it\n    std::atomic<size_t> maxRequestedSize;\n\n    // register bins related to advance regions\n    AdvRegionsBins advRegBins;\n    // Storage for split FreeBlocks\n    IndexedBins freeLargeBlockBins,\n                freeSlabAlignedBins;\n\n    std::atomic<intptr_t> backendCleanCnt;\n    // Our friends\n    friend class BackendSync;\n\n    /******************************** Backend methods ******************************/\n\n    /*--------------------------- Coalescing functions ----------------------------*/\n    void coalescAndPut(FreeBlock *fBlock, size_t blockSz, bool slabAligned);\n    bool coalescAndPutList(FreeBlock *head, bool forceCoalescQDrop, bool reportBlocksProcessed);\n\n    // Main coalescing operation\n    FreeBlock *doCoalesc(FreeBlock *fBlock, MemRegion **memRegion);\n\n    // Queue for conflicted blocks during coalescing\n    bool scanCoalescQ(bool forceCoalescQDrop);\n    intptr_t blocksInCoalescing() const { return coalescQ.blocksInFly(); }\n\n    /*--------------------- FreeBlock backend accessors ---------------------------*/\n    FreeBlock *genericGetBlock(int num, size_t size, bool slabAligned);\n    void genericPutBlock(FreeBlock *fBlock, size_t blockSz, bool slabAligned);\n\n    // Split the block and return remaining parts to backend if possible\n    FreeBlock *splitBlock(FreeBlock *fBlock, int num, size_t size, bool isAligned, bool needAlignedBlock);\n\n    void removeBlockFromBin(FreeBlock *fBlock);\n\n    // TODO: combine with returnLargeObject\n    void putLargeBlock(LargeMemoryBlock *lmb);\n\n    /*------------------- Starting point for OS allocation ------------------------*/\n    void requestBootstrapMem();\n    FreeBlock *askMemFromOS(size_t totalReqSize, intptr_t startModifiedCnt,\n                            int *lockedBinsThreshold, int numOfLockedBins,\n                            bool *splittable, bool needSlabRegion);\n\n    /*---------------------- Memory regions allocation ----------------------------*/\n    FreeBlock *addNewRegion(size_t size, MemRegionType type, bool addToBin);\n    void releaseRegion(MemRegion *region);\n\n    // TODO: combine in one initMemoryRegion function\n    FreeBlock *findBlockInRegion(MemRegion *region, size_t exactBlockSize);\n    void startUseBlock(MemRegion *region, FreeBlock *fBlock, bool addToBin);\n\n    /*------------------------- Raw memory accessors ------------------------------*/\n    void *allocRawMem(size_t &size);\n    bool freeRawMem(void *object, size_t size);\n\n    /*------------------------------ Cleanup functions ----------------------------*/\n    // Clean all memory from all caches (extMemPool hard cleanup)\n    FreeBlock *releaseMemInCaches(intptr_t startModifiedCnt, int *lockedBinsThreshold, int numOfLockedBins);\n    // Soft heap limit (regular cleanup, then maybe hard cleanup)\n    void releaseCachesToLimit();\n\n    /*---------------------------------- Utility ----------------------------------*/\n    // TODO: move inside IndexedBins class\n    static int sizeToBin(size_t size) {\n        if (size >= maxBinned_HugePage)\n            return HUGE_BIN;\n        else if (size < minBinnedSize)\n            return NO_BIN;\n\n        int bin = (size - minBinnedSize)/freeBinsStep;\n\n        MALLOC_ASSERT(bin < HUGE_BIN, \"Invalid size.\");\n        return bin;\n    }\n    static bool toAlignedBin(FreeBlock *block, size_t size) {\n        return isAligned((char*)block + size, slabSize) && size >= slabSize;\n    }\n\npublic:\n    /*--------------------- Init, reset, destroy, verify  -------------------------*/\n    void init(ExtMemoryPool *extMemoryPool);\n    bool destroy();\n\n    void verify();\n    void reset();\n    bool clean(); // clean on caches cleanup\n\n    /*------------------------- Slab block request --------------------------------*/\n    BlockI *getSlabBlock(int num);\n    void putSlabBlock(BlockI *block);\n\n    /*-------------------------- Large object request -----------------------------*/\n    LargeMemoryBlock *getLargeBlock(size_t size);\n    // TODO: make consistent with getLargeBlock\n    void returnLargeObject(LargeMemoryBlock *lmb);\n\n    /*-------------------------- Backreference memory request ----------------------*/\n    void *getBackRefSpace(size_t size, bool *rawMemUsed);\n    void putBackRefSpace(void *b, size_t size, bool rawMemUsed);\n\n    /*----------------------------- Remap object ----------------------------------*/\n    void *remap(void *ptr, size_t oldSize, size_t newSize, size_t alignment);\n\n    /*---------------------------- Validation -------------------------------------*/\n    bool inUserPool() const;\n    bool ptrCanBeValid(void *ptr) const { return usedAddrRange.inRange(ptr); }\n\n    /*-------------------------- Configuration API --------------------------------*/\n    // Soft heap limit\n    void setRecommendedMaxSize(size_t softLimit) {\n        memSoftLimit = softLimit;\n        releaseCachesToLimit();\n    }\n\n    /*------------------------------- Info ----------------------------------------*/\n    size_t getMaxBinnedSize() const;\n\n    /*-------------------------- Testing, statistics ------------------------------*/\n#if __TBB_MALLOC_WHITEBOX_TEST\n    size_t getTotalMemSize() const { return totalMemSize.load(std::memory_order_relaxed); }\n#endif\n#if __TBB_MALLOC_BACKEND_STAT\n    void reportStat(FILE *f);\nprivate:\n    static size_t binToSize(int bin) {\n        MALLOC_ASSERT(bin <= HUGE_BIN, \"Invalid bin.\");\n\n        return bin*freeBinsStep + minBinnedSize;\n    }\n#endif\n};\n\n#endif // __TBB_backend_H\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/backref.cpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"tbbmalloc_internal.h\"\n#include <new>        /* for placement new */\n\nnamespace rml {\nnamespace internal {\n\n\n/********* backreferences ***********************/\n/* Each slab block and each large memory object header contains BackRefIdx\n * that points out in some BackRefBlock which points back to this block or header.\n */\nstruct BackRefBlock : public BlockI {\n    BackRefBlock *nextForUse;     // the next in the chain of blocks with free items\n    FreeObject   *bumpPtr;        // bump pointer moves from the end to the beginning of the block\n    FreeObject   *freeList;\n    // list of all blocks that were allocated from raw mem (i.e., not from backend)\n    BackRefBlock *nextRawMemBlock;\n    std::atomic<int> allocatedCount; // the number of objects allocated\n    BackRefIdx::main_t myNum;   // the index in the main\n    MallocMutex   blockMutex;\n    // true if this block has been added to the listForUse chain,\n    // modifications protected by mainMutex\n    std::atomic<bool> addedToForUse;\n\n    BackRefBlock(const BackRefBlock *blockToUse, intptr_t num) :\n        nextForUse(nullptr), bumpPtr((FreeObject*)((uintptr_t)blockToUse + slabSize - sizeof(void*))),\n        freeList(nullptr), nextRawMemBlock(nullptr), allocatedCount(0), myNum(num),\n        addedToForUse(false) {\n        memset(static_cast<void*>(&blockMutex), 0, sizeof(MallocMutex));\n\n        MALLOC_ASSERT(!(num >> CHAR_BIT*sizeof(BackRefIdx::main_t)),\n                      \"index in BackRefMain must fit to BackRefIdx::main\");\n    }\n    // clean all but header\n    void zeroSet() { memset(static_cast<void*>(this+1), 0, BackRefBlock::bytes-sizeof(BackRefBlock)); }\n    static const int bytes = slabSize;\n};\n\n// max number of backreference pointers in slab block\nstatic const int BR_MAX_CNT = (BackRefBlock::bytes-sizeof(BackRefBlock))/sizeof(void*);\n\nstruct BackRefMain {\n/* On 64-bit systems a slab block can hold up to ~2K back pointers to slab blocks\n * or large objects, so it can address at least 32MB. The main array of 256KB\n * holds 32K pointers to such blocks, addressing ~1 TB.\n * On 32-bit systems there is ~4K back pointers in a slab block, so ~64MB can be addressed.\n * The main array of 8KB holds 2K pointers to leaves, so ~128 GB can addressed.\n */\n    static const size_t bytes = sizeof(uintptr_t)>4? 256*1024 : 8*1024;\n    static const int dataSz;\n/* space is reserved for main table and 4 leaves\n   taking into account VirtualAlloc allocation granularity */\n    static const int leaves = 4;\n    static const size_t mainSize = BackRefMain::bytes+leaves*BackRefBlock::bytes;\n    // The size of memory request for a few more leaf blocks;\n    // selected to match VirtualAlloc granularity\n    static const size_t blockSpaceSize = 64*1024;\n\n    Backend       *backend;\n    std::atomic<BackRefBlock*> active;         // if defined, use it for allocations\n    std::atomic<BackRefBlock*> listForUse;     // the chain of data blocks with free items\n    BackRefBlock  *allRawMemBlocks;\n    std::atomic <intptr_t> lastUsed; // index of the last used block\n    bool           rawMemUsed;\n    MallocMutex    requestNewSpaceMutex;\n    BackRefBlock  *backRefBl[1];   // the real size of the array is dataSz\n\n    BackRefBlock *findFreeBlock();\n    void          addToForUseList(BackRefBlock *bl);\n    void          initEmptyBackRefBlock(BackRefBlock *newBl);\n    bool          requestNewSpace();\n};\n\nconst int BackRefMain::dataSz\n    = 1+(BackRefMain::bytes-sizeof(BackRefMain))/sizeof(BackRefBlock*);\n\nstatic MallocMutex mainMutex;\nstatic std::atomic<BackRefMain*> backRefMain;\n\nbool initBackRefMain(Backend *backend)\n{\n    bool rawMemUsed;\n    BackRefMain *main =\n        (BackRefMain*)backend->getBackRefSpace(BackRefMain::mainSize,\n                                                 &rawMemUsed);\n    if (! main)\n        return false;\n    main->backend = backend;\n    main->listForUse.store(nullptr, std::memory_order_relaxed);\n    main->allRawMemBlocks = nullptr;\n    main->rawMemUsed = rawMemUsed;\n    main->lastUsed = -1;\n    memset(static_cast<void*>(&main->requestNewSpaceMutex), 0, sizeof(MallocMutex));\n    for (int i=0; i<BackRefMain::leaves; i++) {\n        BackRefBlock *bl = (BackRefBlock*)((uintptr_t)main + BackRefMain::bytes + i*BackRefBlock::bytes);\n        bl->zeroSet();\n        main->initEmptyBackRefBlock(bl);\n        if (i)\n            main->addToForUseList(bl);\n        else // active leaf is not needed in listForUse\n            main->active.store(bl, std::memory_order_relaxed);\n    }\n    // backRefMain is read in getBackRef, so publish it in consistent state\n    backRefMain.store(main, std::memory_order_release);\n    return true;\n}\n\n#if __TBB_SOURCE_DIRECTLY_INCLUDED\nvoid destroyBackRefMain(Backend *backend)\n{\n    if (backRefMain.load(std::memory_order_acquire)) { // Is initBackRefMain() called?\n        for (BackRefBlock *curr = backRefMain.load(std::memory_order_relaxed)->allRawMemBlocks; curr; ) {\n            BackRefBlock *next = curr->nextRawMemBlock;\n            // allRawMemBlocks list is only for raw mem blocks\n            backend->putBackRefSpace(curr, BackRefMain::blockSpaceSize,\n                                     /*rawMemUsed=*/true);\n            curr = next;\n        }\n        backend->putBackRefSpace(backRefMain.load(std::memory_order_relaxed), BackRefMain::mainSize,\n                                 backRefMain.load(std::memory_order_relaxed)->rawMemUsed);\n    }\n}\n#endif\n\nvoid BackRefMain::addToForUseList(BackRefBlock *bl)\n{\n    bl->nextForUse = listForUse.load(std::memory_order_relaxed);\n    listForUse.store(bl, std::memory_order_relaxed);\n    bl->addedToForUse.store(true, std::memory_order_relaxed);\n}\n\nvoid BackRefMain::initEmptyBackRefBlock(BackRefBlock *newBl)\n{\n    intptr_t nextLU = lastUsed+1;\n    new (newBl) BackRefBlock(newBl, nextLU);\n    MALLOC_ASSERT(nextLU < dataSz, nullptr);\n    backRefBl[nextLU] = newBl;\n    // lastUsed is read in getBackRef, and access to backRefBl[lastUsed]\n    // is possible only after checking backref against current lastUsed\n    lastUsed.store(nextLU, std::memory_order_release);\n}\n\nbool BackRefMain::requestNewSpace()\n{\n    bool isRawMemUsed;\n    static_assert(!(blockSpaceSize % BackRefBlock::bytes),\n                         \"Must request space for whole number of blocks.\");\n\n    if (BackRefMain::dataSz <= lastUsed + 1) // no space in main\n        return false;\n\n    // only one thread at a time may add blocks\n    MallocMutex::scoped_lock newSpaceLock(requestNewSpaceMutex);\n\n    if (listForUse.load(std::memory_order_relaxed)) // double check that only one block is available\n        return true;\n    BackRefBlock *newBl = (BackRefBlock*)backend->getBackRefSpace(blockSpaceSize, &isRawMemUsed);\n    if (!newBl) return false;\n\n    // touch a page for the 1st time without taking mainMutex ...\n    for (BackRefBlock *bl = newBl; (uintptr_t)bl < (uintptr_t)newBl + blockSpaceSize;\n         bl = (BackRefBlock*)((uintptr_t)bl + BackRefBlock::bytes)) {\n        bl->zeroSet();\n    }\n\n    MallocMutex::scoped_lock lock(mainMutex); // ... and share under lock\n\n    const size_t numOfUnusedIdxs = BackRefMain::dataSz - lastUsed - 1;\n    if (numOfUnusedIdxs <= 0) { // no space in main under lock, roll back\n        backend->putBackRefSpace(newBl, blockSpaceSize, isRawMemUsed);\n        return false;\n    }\n    // It's possible that only part of newBl is used, due to lack of indices in main.\n    // This is OK as such underutilization is possible only once for backreferneces table.\n    int blocksToUse = min(numOfUnusedIdxs, blockSpaceSize / BackRefBlock::bytes);\n\n    // use the first block in the batch to maintain the list of \"raw\" memory\n    // to be released at shutdown\n    if (isRawMemUsed) {\n        newBl->nextRawMemBlock = backRefMain.load(std::memory_order_relaxed)->allRawMemBlocks;\n        backRefMain.load(std::memory_order_relaxed)->allRawMemBlocks = newBl;\n    }\n    for (BackRefBlock *bl = newBl; blocksToUse>0; bl = (BackRefBlock*)((uintptr_t)bl + BackRefBlock::bytes), blocksToUse--) {\n        initEmptyBackRefBlock(bl);\n        if (active.load(std::memory_order_relaxed)->allocatedCount.load(std::memory_order_relaxed) == BR_MAX_CNT) {\n            active.store(bl, std::memory_order_release); // active leaf is not needed in listForUse\n        } else {\n            addToForUseList(bl);\n        }\n    }\n    return true;\n}\n\nBackRefBlock *BackRefMain::findFreeBlock()\n{\n    BackRefBlock* active_block = active.load(std::memory_order_acquire);\n    MALLOC_ASSERT(active_block, ASSERT_TEXT);\n\n    if (active_block->allocatedCount.load(std::memory_order_relaxed) < BR_MAX_CNT)\n        return active_block;\n\n    if (listForUse.load(std::memory_order_relaxed)) { // use released list\n        MallocMutex::scoped_lock lock(mainMutex);\n\n        if (active_block->allocatedCount.load(std::memory_order_relaxed) == BR_MAX_CNT) {\n            active_block = listForUse.load(std::memory_order_relaxed);\n            if (active_block) {\n                active.store(active_block, std::memory_order_release);\n                listForUse.store(active_block->nextForUse, std::memory_order_relaxed);\n                MALLOC_ASSERT(active_block->addedToForUse.load(std::memory_order_relaxed), ASSERT_TEXT);\n                active_block->addedToForUse.store(false, std::memory_order_relaxed);\n            }\n        }\n    } else // allocate new data node\n        if (!requestNewSpace())\n            return nullptr;\n    return active.load(std::memory_order_acquire); // reread because of requestNewSpace\n}\n\nvoid *getBackRef(BackRefIdx backRefIdx)\n{\n    // !backRefMain means no initialization done, so it can't be valid memory\n    // see addEmptyBackRefBlock for fences around lastUsed\n    if (!(backRefMain.load(std::memory_order_acquire))\n        || backRefIdx.getMain() > (backRefMain.load(std::memory_order_relaxed)->lastUsed.load(std::memory_order_acquire))\n        || backRefIdx.getOffset() >= BR_MAX_CNT)\n    {\n        return nullptr;\n    }\n    std::atomic<void*>& backRefEntry = *(std::atomic<void*>*)(\n            (uintptr_t)backRefMain.load(std::memory_order_relaxed)->backRefBl[backRefIdx.getMain()]\n            + sizeof(BackRefBlock) + backRefIdx.getOffset() * sizeof(std::atomic<void*>)\n        );\n    return backRefEntry.load(std::memory_order_relaxed);\n}\n\nvoid setBackRef(BackRefIdx backRefIdx, void *newPtr)\n{\n    MALLOC_ASSERT(backRefIdx.getMain()<=backRefMain.load(std::memory_order_relaxed)->lastUsed.load(std::memory_order_relaxed)\n                                 && backRefIdx.getOffset()<BR_MAX_CNT, ASSERT_TEXT);\n    ((std::atomic<void*>*)((uintptr_t)backRefMain.load(std::memory_order_relaxed)->backRefBl[backRefIdx.getMain()]\n        + sizeof(BackRefBlock) + backRefIdx.getOffset() * sizeof(void*)))->store(newPtr, std::memory_order_relaxed);\n}\n\nBackRefIdx BackRefIdx::newBackRef(bool largeObj)\n{\n    BackRefBlock *blockToUse;\n    void **toUse;\n    BackRefIdx res;\n    bool lastBlockFirstUsed = false;\n\n    do {\n        MALLOC_ASSERT(backRefMain.load(std::memory_order_relaxed), ASSERT_TEXT);\n        blockToUse = backRefMain.load(std::memory_order_relaxed)->findFreeBlock();\n        if (!blockToUse)\n            return BackRefIdx();\n        toUse = nullptr;\n        { // the block is locked to find a reference\n            MallocMutex::scoped_lock lock(blockToUse->blockMutex);\n\n            if (blockToUse->freeList) {\n                toUse = (void**)blockToUse->freeList;\n                blockToUse->freeList = blockToUse->freeList->next;\n                MALLOC_ASSERT(!blockToUse->freeList ||\n                              ((uintptr_t)blockToUse->freeList>=(uintptr_t)blockToUse\n                               && (uintptr_t)blockToUse->freeList <\n                               (uintptr_t)blockToUse + slabSize), ASSERT_TEXT);\n            } else if (blockToUse->allocatedCount.load(std::memory_order_relaxed) < BR_MAX_CNT) {\n                toUse = (void**)blockToUse->bumpPtr;\n                blockToUse->bumpPtr =\n                    (FreeObject*)((uintptr_t)blockToUse->bumpPtr - sizeof(void*));\n                if (blockToUse->allocatedCount.load(std::memory_order_relaxed) == BR_MAX_CNT-1) {\n                    MALLOC_ASSERT((uintptr_t)blockToUse->bumpPtr\n                                  < (uintptr_t)blockToUse+sizeof(BackRefBlock),\n                                  ASSERT_TEXT);\n                    blockToUse->bumpPtr = nullptr;\n                }\n            }\n            if (toUse) {\n                if (!blockToUse->allocatedCount.load(std::memory_order_relaxed) &&\n                    !backRefMain.load(std::memory_order_relaxed)->listForUse.load(std::memory_order_relaxed)) {\n                    lastBlockFirstUsed = true;\n                }\n                blockToUse->allocatedCount.store(blockToUse->allocatedCount.load(std::memory_order_relaxed) + 1, std::memory_order_relaxed);\n            }\n        } // end of lock scope\n    } while (!toUse);\n    // The first thread that uses the last block requests new space in advance;\n    // possible failures are ignored.\n    if (lastBlockFirstUsed)\n        backRefMain.load(std::memory_order_relaxed)->requestNewSpace();\n\n    res.main = blockToUse->myNum;\n    uintptr_t offset =\n        ((uintptr_t)toUse - ((uintptr_t)blockToUse + sizeof(BackRefBlock)))/sizeof(void*);\n    // Is offset too big?\n    MALLOC_ASSERT(!(offset >> 15), ASSERT_TEXT);\n    res.offset = offset;\n    if (largeObj) res.largeObj = largeObj;\n\n    return res;\n}\n\nvoid removeBackRef(BackRefIdx backRefIdx)\n{\n    MALLOC_ASSERT(!backRefIdx.isInvalid(), ASSERT_TEXT);\n    MALLOC_ASSERT(backRefIdx.getMain()<=backRefMain.load(std::memory_order_relaxed)->lastUsed.load(std::memory_order_relaxed)\n                  && backRefIdx.getOffset()<BR_MAX_CNT, ASSERT_TEXT);\n    BackRefBlock *currBlock = backRefMain.load(std::memory_order_relaxed)->backRefBl[backRefIdx.getMain()];\n    std::atomic<void*>& backRefEntry = *(std::atomic<void*>*)((uintptr_t)currBlock + sizeof(BackRefBlock)\n                                        + backRefIdx.getOffset()*sizeof(std::atomic<void*>));\n    MALLOC_ASSERT(((uintptr_t)&backRefEntry >(uintptr_t)currBlock &&\n                   (uintptr_t)&backRefEntry <(uintptr_t)currBlock + slabSize), ASSERT_TEXT);\n    {\n        MallocMutex::scoped_lock lock(currBlock->blockMutex);\n\n        backRefEntry.store(currBlock->freeList, std::memory_order_relaxed);\n#if MALLOC_DEBUG\n        uintptr_t backRefEntryValue = (uintptr_t)backRefEntry.load(std::memory_order_relaxed);\n        MALLOC_ASSERT(!backRefEntryValue ||\n                      (backRefEntryValue > (uintptr_t)currBlock\n                       && backRefEntryValue < (uintptr_t)currBlock + slabSize), ASSERT_TEXT);\n#endif\n        currBlock->freeList = (FreeObject*)&backRefEntry;\n        currBlock->allocatedCount.store(currBlock->allocatedCount.load(std::memory_order_relaxed)-1, std::memory_order_relaxed);\n    }\n    // TODO: do we need double-check here?\n    if (!currBlock->addedToForUse.load(std::memory_order_relaxed) &&\n        currBlock!=backRefMain.load(std::memory_order_relaxed)->active.load(std::memory_order_relaxed)) {\n        MallocMutex::scoped_lock lock(mainMutex);\n\n        if (!currBlock->addedToForUse.load(std::memory_order_relaxed) &&\n            currBlock!=backRefMain.load(std::memory_order_relaxed)->active.load(std::memory_order_relaxed))\n            backRefMain.load(std::memory_order_relaxed)->addToForUseList(currBlock);\n    }\n}\n\n/********* End of backreferences ***********************/\n\n} // namespace internal\n} // namespace rml\n\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/def/lin32-tbbmalloc.def",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n{\nglobal:\n\nscalable_calloc;\nscalable_free;\nscalable_malloc;\nscalable_realloc;\nscalable_posix_memalign;\nscalable_aligned_malloc;\nscalable_aligned_realloc;\nscalable_aligned_free;\nscalable_msize;\nscalable_allocation_mode;\nscalable_allocation_command;\n__TBB_malloc_safer_aligned_msize;\n__TBB_malloc_safer_aligned_realloc;\n__TBB_malloc_safer_free;\n__TBB_malloc_safer_msize;\n__TBB_malloc_safer_realloc;\n\n/* memory pool stuff */\n_ZN3rml10pool_resetEPNS_10MemoryPoolE;\n_ZN3rml11pool_createEiPKNS_13MemPoolPolicyE;\n_ZN3rml14pool_create_v1EiPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE;\n_ZN3rml11pool_mallocEPNS_10MemoryPoolEj;\n_ZN3rml12pool_destroyEPNS_10MemoryPoolE;\n_ZN3rml9pool_freeEPNS_10MemoryPoolEPv;\n_ZN3rml12pool_reallocEPNS_10MemoryPoolEPvj;\n_ZN3rml20pool_aligned_reallocEPNS_10MemoryPoolEPvjj;\n_ZN3rml19pool_aligned_mallocEPNS_10MemoryPoolEjj;\n_ZN3rml13pool_identifyEPv;\n_ZN3rml10pool_msizeEPNS_10MemoryPoolEPv;\n\nlocal:\n\n/* TBB symbols */\n*3rml*;\n*3tbb*;\n*__TBB*;\n__itt_*;\nITT_DoOneTimeInitialization;\nTBB_runtime_interface_version;\n\n/* Intel Compiler (libirc) symbols */\n__intel_*;\n_intel_*;\nget_memcpy_largest_cachelinesize;\nget_memcpy_largest_cache_size;\nget_mem_ops_method;\ninit_mem_ops_method;\nirc__get_msg;\nirc__print;\noverride_mem_ops_method;\nset_memcpy_largest_cachelinesize;\nset_memcpy_largest_cache_size;\n\n};\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/def/lin64-tbbmalloc.def",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n{\nglobal:\n\nscalable_calloc;\nscalable_free;\nscalable_malloc;\nscalable_realloc;\nscalable_posix_memalign;\nscalable_aligned_malloc;\nscalable_aligned_realloc;\nscalable_aligned_free;\nscalable_msize;\nscalable_allocation_mode;\nscalable_allocation_command;\n__TBB_malloc_safer_aligned_msize;\n__TBB_malloc_safer_aligned_realloc;\n__TBB_malloc_safer_free;\n__TBB_malloc_safer_msize;\n__TBB_malloc_safer_realloc;\n\n/* memory pool stuff */\n_ZN3rml11pool_createElPKNS_13MemPoolPolicyE;\n_ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE;\n_ZN3rml10pool_resetEPNS_10MemoryPoolE;\n_ZN3rml11pool_mallocEPNS_10MemoryPoolEm;\n_ZN3rml12pool_destroyEPNS_10MemoryPoolE;\n_ZN3rml9pool_freeEPNS_10MemoryPoolEPv;\n_ZN3rml12pool_reallocEPNS_10MemoryPoolEPvm;\n_ZN3rml20pool_aligned_reallocEPNS_10MemoryPoolEPvmm;\n_ZN3rml19pool_aligned_mallocEPNS_10MemoryPoolEmm;\n_ZN3rml13pool_identifyEPv;\n_ZN3rml10pool_msizeEPNS_10MemoryPoolEPv;\n\nlocal:\n\n/* TBB symbols */\n*3rml*;\n*3tbb*;\n*__TBB*;\n__itt_*;\nITT_DoOneTimeInitialization;\nTBB_runtime_interface_version;\n\n/* Intel Compiler (libirc) symbols */\n__intel_*;\n_intel_*;\nget_memcpy_largest_cachelinesize;\nget_memcpy_largest_cache_size;\nget_mem_ops_method;\ninit_mem_ops_method;\nirc__get_msg;\nirc__print;\noverride_mem_ops_method;\nset_memcpy_largest_cachelinesize;\nset_memcpy_largest_cache_size;\n\n};\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/def/mac64-tbbmalloc.def",
    "content": "# Copyright (c) 2005-2021 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n_scalable_calloc\n_scalable_free\n_scalable_malloc\n_scalable_realloc\n_scalable_posix_memalign\n_scalable_aligned_malloc\n_scalable_aligned_realloc\n_scalable_aligned_free\n_scalable_msize\n_scalable_allocation_mode\n_scalable_allocation_command\n___TBB_malloc_safer_aligned_msize\n___TBB_malloc_safer_aligned_realloc\n___TBB_malloc_safer_free\n___TBB_malloc_safer_msize\n___TBB_malloc_safer_realloc\n___TBB_malloc_free_definite_size\n/* memory pool stuff */\n__ZN3rml11pool_createElPKNS_13MemPoolPolicyE\n__ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE\n__ZN3rml10pool_resetEPNS_10MemoryPoolE\n__ZN3rml12pool_destroyEPNS_10MemoryPoolE\n__ZN3rml11pool_mallocEPNS_10MemoryPoolEm\n__ZN3rml9pool_freeEPNS_10MemoryPoolEPv\n__ZN3rml12pool_reallocEPNS_10MemoryPoolEPvm\n__ZN3rml20pool_aligned_reallocEPNS_10MemoryPoolEPvmm\n__ZN3rml19pool_aligned_mallocEPNS_10MemoryPoolEmm\n__ZN3rml13pool_identifyEPv\n__ZN3rml10pool_msizeEPNS_10MemoryPoolEPv\n\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/def/win32-tbbmalloc.def",
    "content": "; Copyright (c) 2005-2021 Intel Corporation\n;\n; Licensed under the Apache License, Version 2.0 (the \"License\");\n; you may not use this file except in compliance with the License.\n; You may obtain a copy of the License at\n;\n;     http://www.apache.org/licenses/LICENSE-2.0\n;\n; Unless required by applicable law or agreed to in writing, software\n; distributed under the License is distributed on an \"AS IS\" BASIS,\n; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n; See the License for the specific language governing permissions and\n; limitations under the License.\n\nEXPORTS\n\n; frontend.cpp\nscalable_calloc\nscalable_free\nscalable_malloc\nscalable_realloc\nscalable_posix_memalign\nscalable_aligned_malloc\nscalable_aligned_realloc\nscalable_aligned_free\nscalable_msize\nscalable_allocation_mode\nscalable_allocation_command\n__TBB_malloc_safer_free\n__TBB_malloc_safer_realloc\n__TBB_malloc_safer_msize\n__TBB_malloc_safer_aligned_msize\n__TBB_malloc_safer_aligned_realloc\n\n; memory pool stuff\n?pool_create@rml@@YAPAVMemoryPool@1@HPBUMemPoolPolicy@1@@Z\n?pool_create_v1@rml@@YA?AW4MemPoolError@1@HPBUMemPoolPolicy@1@PAPAVMemoryPool@1@@Z\n?pool_destroy@rml@@YA_NPAVMemoryPool@1@@Z\n?pool_malloc@rml@@YAPAXPAVMemoryPool@1@I@Z\n?pool_free@rml@@YA_NPAVMemoryPool@1@PAX@Z\n?pool_reset@rml@@YA_NPAVMemoryPool@1@@Z\n?pool_realloc@rml@@YAPAXPAVMemoryPool@1@PAXI@Z\n?pool_aligned_realloc@rml@@YAPAXPAVMemoryPool@1@PAXII@Z\n?pool_aligned_malloc@rml@@YAPAXPAVMemoryPool@1@II@Z\n?pool_identify@rml@@YAPAVMemoryPool@1@PAX@Z\n?pool_msize@rml@@YAIPAVMemoryPool@1@PAX@Z\n\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/def/win64-tbbmalloc.def",
    "content": "; Copyright (c) 2005-2021 Intel Corporation\n;\n; Licensed under the Apache License, Version 2.0 (the \"License\");\n; you may not use this file except in compliance with the License.\n; You may obtain a copy of the License at\n;\n;     http://www.apache.org/licenses/LICENSE-2.0\n;\n; Unless required by applicable law or agreed to in writing, software\n; distributed under the License is distributed on an \"AS IS\" BASIS,\n; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n; See the License for the specific language governing permissions and\n; limitations under the License.\n\nEXPORTS\n\n; frontend.cpp\nscalable_calloc\nscalable_free\nscalable_malloc\nscalable_realloc\nscalable_posix_memalign\nscalable_aligned_malloc\nscalable_aligned_realloc\nscalable_aligned_free\nscalable_msize\nscalable_allocation_mode\nscalable_allocation_command\n__TBB_malloc_safer_free\n__TBB_malloc_safer_realloc\n__TBB_malloc_safer_msize\n__TBB_malloc_safer_aligned_msize\n__TBB_malloc_safer_aligned_realloc\n\n; memory pool stuff\n?pool_create@rml@@YAPEAVMemoryPool@1@_JPEBUMemPoolPolicy@1@@Z\n?pool_create_v1@rml@@YA?AW4MemPoolError@1@_JPEBUMemPoolPolicy@1@PEAPEAVMemoryPool@1@@Z\n?pool_destroy@rml@@YA_NPEAVMemoryPool@1@@Z\n?pool_malloc@rml@@YAPEAXPEAVMemoryPool@1@_K@Z\n?pool_free@rml@@YA_NPEAVMemoryPool@1@PEAX@Z\n?pool_reset@rml@@YA_NPEAVMemoryPool@1@@Z\n?pool_realloc@rml@@YAPEAXPEAVMemoryPool@1@PEAX_K@Z\n?pool_aligned_realloc@rml@@YAPEAXPEAVMemoryPool@1@PEAX_K2@Z\n?pool_aligned_malloc@rml@@YAPEAXPEAVMemoryPool@1@_K1@Z\n?pool_identify@rml@@YAPEAVMemoryPool@1@PEAX@Z\n?pool_msize@rml@@YA_KPEAVMemoryPool@1@PEAX@Z\n\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/frontend.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"tbbmalloc_internal.h\"\n#include <errno.h>\n#include <new>        /* for placement new */\n#include <string.h>   /* for memset */\n\n#include \"oneapi/tbb/version.h\"\n#include \"../tbb/environment.h\"\n#include \"../tbb/itt_notify.h\" // for __TBB_load_ittnotify()\n\n#if USE_PTHREAD\n    #define TlsSetValue_func pthread_setspecific\n    #define TlsGetValue_func pthread_getspecific\n    #define GetMyTID() pthread_self()\n    #include <sched.h>\n    extern \"C\" { static void mallocThreadShutdownNotification(void*); }\n    #if __sun || __SUNPRO_CC\n    #define __asm__ asm\n    #endif\n    #include <unistd.h> // sysconf(_SC_PAGESIZE)\n#elif USE_WINTHREAD\n    #define GetMyTID() GetCurrentThreadId()\n#if __TBB_WIN8UI_SUPPORT\n    #include<thread>\n    #define TlsSetValue_func FlsSetValue\n    #define TlsGetValue_func FlsGetValue\n    #define TlsAlloc() FlsAlloc(nullptr)\n    #define TLS_ALLOC_FAILURE FLS_OUT_OF_INDEXES\n    #define TlsFree FlsFree\n#else\n    #define TlsSetValue_func TlsSetValue\n    #define TlsGetValue_func TlsGetValue\n    #define TLS_ALLOC_FAILURE TLS_OUT_OF_INDEXES\n#endif\n#else\n    #error Must define USE_PTHREAD or USE_WINTHREAD\n#endif\n\n#define FREELIST_NONBLOCKING 1\n\nnamespace rml {\nclass MemoryPool;\nnamespace internal {\n\nclass Block;\nclass MemoryPool;\n\n#if MALLOC_CHECK_RECURSION\n\ninline bool isMallocInitialized();\n\n#endif // MALLOC_CHECK_RECURSION\n\n/** Support for handling the special UNUSABLE pointer state **/\nconst intptr_t UNUSABLE = 0x1;\ninline bool isSolidPtr( void* ptr ) {\n    return (UNUSABLE|(intptr_t)ptr)!=UNUSABLE;\n}\ninline bool isNotForUse( void* ptr ) {\n    return (intptr_t)ptr==UNUSABLE;\n}\n\n/*\n * Block::objectSize value used to mark blocks allocated by startupAlloc\n */\nconst uint16_t startupAllocObjSizeMark = ~(uint16_t)0;\n\n/*\n * The following constant is used to define the size of struct Block, the block header.\n * The intent is to have the size of a Block multiple of the cache line size, this allows us to\n * get good alignment at the cost of some overhead equal to the amount of padding included in the Block.\n */\nconst int blockHeaderAlignment = estimatedCacheLineSize;\n\n/********* The data structures and global objects        **************/\n\n/*\n * The malloc routines themselves need to be able to occasionally malloc some space,\n * in order to set up the structures used by the thread local structures. This\n * routine performs that functions.\n */\nclass BootStrapBlocks {\n    MallocMutex bootStrapLock;\n    Block      *bootStrapBlock;\n    Block      *bootStrapBlockUsed;\n    FreeObject *bootStrapObjectList;\npublic:\n    void *allocate(MemoryPool *memPool, size_t size);\n    void free(void* ptr);\n    void reset();\n};\n\n#if USE_INTERNAL_TID\nclass ThreadId {\n    static tls_key_t Tid_key;\n    std::atomic<intptr_t> ThreadCount;\n\n    unsigned int id;\n\n    static unsigned int tlsNumber() {\n        unsigned int result = reinterpret_cast<intptr_t>(TlsGetValue_func(Tid_key));\n        if( !result ) {\n            RecursiveMallocCallProtector scoped;\n            // Thread-local value is zero -> first call from this thread,\n            // need to initialize with next ID value (IDs start from 1)\n            result = ++ThreadCount; // returned new value!\n            TlsSetValue_func( Tid_key, reinterpret_cast<void*>(result) );\n        }\n        return result;\n    }\npublic:\n    static bool init() {\n#if USE_WINTHREAD\n        Tid_key = TlsAlloc();\n        if (Tid_key == TLS_ALLOC_FAILURE)\n            return false;\n#else\n        int status = pthread_key_create( &Tid_key, nullptr );\n        if ( status ) {\n            fprintf (stderr, \"The memory manager cannot create tls key during initialization\\n\");\n            return false;\n        }\n#endif /* USE_WINTHREAD */\n        return true;\n    }\n#if __TBB_SOURCE_DIRECTLY_INCLUDED\n    static void destroy() {\n        if( Tid_key ) {\n#if USE_WINTHREAD\n            BOOL status = !(TlsFree( Tid_key ));  // fail is zero\n#else\n            int status = pthread_key_delete( Tid_key );\n#endif /* USE_WINTHREAD */\n            if ( status )\n                fprintf (stderr, \"The memory manager cannot delete tls key\\n\");\n            Tid_key = 0;\n        }\n    }\n#endif\n\n    ThreadId() : id(ThreadId::tlsNumber()) {}\n    bool isCurrentThreadId() const { return id == ThreadId::tlsNumber(); }\n\n#if COLLECT_STATISTICS || MALLOC_TRACE\n    friend unsigned int getThreadId() { return ThreadId::tlsNumber(); }\n#endif\n#if COLLECT_STATISTICS\n    static unsigned getMaxThreadId() { return ThreadCount.load(std::memory_order_relaxed); }\n\n    friend int STAT_increment(ThreadId tid, int bin, int ctr);\n#endif\n};\n\ntls_key_t ThreadId::Tid_key;\nintptr_t ThreadId::ThreadCount;\n\n#if COLLECT_STATISTICS\nint STAT_increment(ThreadId tid, int bin, int ctr)\n{\n    return ::STAT_increment(tid.id, bin, ctr);\n}\n#endif\n\n#else // USE_INTERNAL_TID\n\nclass ThreadId {\n#if USE_PTHREAD\n    std::atomic<pthread_t> tid;\n#else\n    std::atomic<DWORD>     tid;\n#endif\npublic:\n    ThreadId() : tid(GetMyTID()) {}\n    ThreadId(ThreadId &other) = delete;\n    ~ThreadId() = default;\n\n#if USE_PTHREAD\n    bool isCurrentThreadId() const { return pthread_equal(pthread_self(), tid.load(std::memory_order_relaxed)); }\n#else\n    bool isCurrentThreadId() const { return GetCurrentThreadId() == tid.load(std::memory_order_relaxed); }\n#endif\n    ThreadId& operator=(const ThreadId& other) {\n        tid.store(other.tid.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        return *this;\n    }\n    static bool init() { return true; }\n#if __TBB_SOURCE_DIRECTLY_INCLUDED\n    static void destroy() {}\n#endif\n};\n\n#endif // USE_INTERNAL_TID\n\n/*********** Code to provide thread ID and a thread-local void pointer **********/\n\nbool TLSKey::init()\n{\n#if USE_WINTHREAD\n    TLS_pointer_key = TlsAlloc();\n    if (TLS_pointer_key == TLS_ALLOC_FAILURE)\n        return false;\n#else\n    int status = pthread_key_create( &TLS_pointer_key, mallocThreadShutdownNotification );\n    if ( status )\n        return false;\n#endif /* USE_WINTHREAD */\n    return true;\n}\n\nbool TLSKey::destroy()\n{\n#if USE_WINTHREAD\n    BOOL status1 = !(TlsFree(TLS_pointer_key)); // fail is zero\n#else\n    int status1 = pthread_key_delete(TLS_pointer_key);\n#endif /* USE_WINTHREAD */\n    MALLOC_ASSERT(!status1, \"The memory manager cannot delete tls key.\");\n    return status1==0;\n}\n\ninline TLSData* TLSKey::getThreadMallocTLS() const\n{\n    return (TLSData *)TlsGetValue_func( TLS_pointer_key );\n}\n\ninline void TLSKey::setThreadMallocTLS( TLSData * newvalue ) {\n    RecursiveMallocCallProtector scoped;\n    TlsSetValue_func( TLS_pointer_key, newvalue );\n}\n\n/* The 'next' field in the block header has to maintain some invariants:\n *   it needs to be on a 16K boundary and the first field in the block.\n *   Any value stored there needs to have the lower 14 bits set to 0\n *   so that various assert work. This means that if you want to smash this memory\n *   for debugging purposes you will need to obey this invariant.\n * The total size of the header needs to be a power of 2 to simplify\n * the alignment requirements. For now it is a 128 byte structure.\n * To avoid false sharing, the fields changed only locally are separated\n * from the fields changed by foreign threads.\n * Changing the size of the block header would require to change\n * some bin allocation sizes, in particular \"fitting\" sizes (see above).\n */\nclass Bin;\nclass StartupBlock;\n\nclass MemoryPool {\n    // if no explicit grainsize, expect to see malloc in user's pAlloc\n    // and set reasonable low granularity\n    static const size_t defaultGranularity = estimatedCacheLineSize;\n\n    MemoryPool() = delete;                  // deny\npublic:\n    static MallocMutex  memPoolListLock;\n\n    // list of all active pools is used to release\n    // all TLS data on thread termination or library unload\n    MemoryPool    *next,\n                  *prev;\n    ExtMemoryPool  extMemPool;\n    BootStrapBlocks bootStrapBlocks;\n\n    static void initDefaultPool();\n\n    bool init(intptr_t poolId, const MemPoolPolicy* memPoolPolicy);\n    bool reset();\n    bool destroy();\n    void onThreadShutdown(TLSData *tlsData);\n\n    inline TLSData *getTLS(bool create);\n    void clearTLS() { extMemPool.tlsPointerKey.setThreadMallocTLS(nullptr); }\n\n    Block *getEmptyBlock(size_t size);\n    void returnEmptyBlock(Block *block, bool poolTheBlock);\n\n    // get/put large object to/from local large object cache\n    void *getFromLLOCache(TLSData *tls, size_t size, size_t alignment);\n    void putToLLOCache(TLSData *tls, void *object);\n};\n\nstatic intptr_t defaultMemPool_space[sizeof(MemoryPool)/sizeof(intptr_t) +\n                                     (sizeof(MemoryPool)%sizeof(intptr_t)? 1 : 0)];\nstatic MemoryPool *defaultMemPool = (MemoryPool*)defaultMemPool_space;\nconst size_t MemoryPool::defaultGranularity;\n// zero-initialized\nMallocMutex  MemoryPool::memPoolListLock;\n// TODO: move huge page status to default pool, because that's its states\nHugePagesStatus hugePages;\nstatic bool usedBySrcIncluded = false;\n\n// Padding helpers\ntemplate<size_t padd>\nstruct PaddingImpl {\n    size_t       __padding[padd];\n};\n\ntemplate<>\nstruct PaddingImpl<0> {};\n\ntemplate<int N>\nstruct Padding : PaddingImpl<N/sizeof(size_t)> {};\n\n// Slab block is 16KB-aligned. To prevent false sharing, separate locally-accessed\n// fields and fields commonly accessed by not owner threads.\nclass GlobalBlockFields : public BlockI {\nprotected:\n    std::atomic<FreeObject*> publicFreeList;\n    std::atomic<Block*> nextPrivatizable;\n    MemoryPool  *poolPtr;\n};\n\nclass LocalBlockFields : public GlobalBlockFields, Padding<blockHeaderAlignment - sizeof(GlobalBlockFields)>  {\nprotected:\n    Block       *next;\n    Block       *previous;        /* Use double linked list to speed up removal */\n    FreeObject  *bumpPtr;         /* Bump pointer moves from the end to the beginning of a block */\n    FreeObject  *freeList;\n    /* Pointer to local data for the owner thread. Used for fast finding tls\n       when releasing object from a block that current thread owned.\n       nullptr for orphaned blocks. */\n    std::atomic<TLSData*> tlsPtr;\n    ThreadId     ownerTid;        /* the ID of the thread that owns or last owned the block */\n    BackRefIdx   backRefIdx;\n    uint16_t     allocatedCount;  /* Number of objects allocated (obviously by the owning thread) */\n    uint16_t     objectSize;\n    bool         isFull;\n\n    friend class FreeBlockPool;\n    friend class StartupBlock;\n    friend class LifoList;\n    friend void *BootStrapBlocks::allocate(MemoryPool *, size_t);\n    friend bool OrphanedBlocks::cleanup(Backend*);\n    friend Block *MemoryPool::getEmptyBlock(size_t);\n};\n\n// Use inheritance to guarantee that a user data start on next cache line.\n// Can't use member for it, because when LocalBlockFields already on cache line,\n// we must have no additional memory consumption for all compilers.\nclass Block : public LocalBlockFields,\n              Padding<2*blockHeaderAlignment - sizeof(LocalBlockFields)> {\npublic:\n    bool empty() const {\n        if (allocatedCount > 0) return false;\n        MALLOC_ASSERT(!isSolidPtr(publicFreeList.load(std::memory_order_relaxed)), ASSERT_TEXT);\n        return true;\n    }\n    inline FreeObject* allocate();\n    inline FreeObject *allocateFromFreeList();\n\n    inline bool adjustFullness();\n    void adjustPositionInBin(Bin* bin = nullptr);\n#if MALLOC_DEBUG\n    bool freeListNonNull() { return freeList; }\n#endif\n    void freePublicObject(FreeObject *objectToFree);\n    inline void freeOwnObject(void *object);\n    void reset();\n    void privatizePublicFreeList( bool reset = true );\n    void restoreBumpPtr();\n    void privatizeOrphaned(TLSData *tls, unsigned index);\n    bool readyToShare();\n    void shareOrphaned(intptr_t binTag, unsigned index);\n    unsigned int getSize() const {\n        MALLOC_ASSERT(isStartupAllocObject() || objectSize<minLargeObjectSize,\n                      \"Invalid object size\");\n        return isStartupAllocObject()? 0 : objectSize;\n    }\n    const BackRefIdx *getBackRefIdx() const { return &backRefIdx; }\n    inline bool isOwnedByCurrentThread() const;\n    bool isStartupAllocObject() const { return objectSize == startupAllocObjSizeMark; }\n    inline FreeObject *findObjectToFree(const void *object) const;\n    void checkFreePrecond(const void *object) const {\n#if MALLOC_DEBUG\n        const char *msg = \"Possible double free or heap corruption.\";\n        // small objects are always at least sizeof(size_t) Byte aligned,\n        // try to check this before this dereference as for invalid objects\n        // this may be unreadable\n        MALLOC_ASSERT(isAligned(object, sizeof(size_t)), \"Try to free invalid small object\");\n#if !__TBB_USE_THREAD_SANITIZER\n        // releasing to free slab\n        MALLOC_ASSERT(allocatedCount>0, msg);\n#endif\n        // must not point to slab's header\n        MALLOC_ASSERT((uintptr_t)object - (uintptr_t)this >= sizeof(Block), msg);\n        if (startupAllocObjSizeMark == objectSize) // startup block\n            MALLOC_ASSERT(object<=bumpPtr, msg);\n        else {\n            // non-startup objects are 8 Byte aligned\n            MALLOC_ASSERT(isAligned(object, 8), \"Try to free invalid small object\");\n            FreeObject *toFree = findObjectToFree(object);\n#if !__TBB_USE_THREAD_SANITIZER\n            MALLOC_ASSERT(allocatedCount <= (slabSize-sizeof(Block))/objectSize\n                          && (!bumpPtr || object>bumpPtr), msg);\n            // check against head of freeList, as this is mostly\n            // expected after double free\n            MALLOC_ASSERT(toFree != freeList, msg);\n#endif\n            // check against head of publicFreeList, to detect double free\n            // involving foreign thread\n            MALLOC_ASSERT(toFree != publicFreeList.load(std::memory_order_relaxed), msg);\n        }\n#else\n        suppress_unused_warning(object);\n#endif\n    }\n    void initEmptyBlock(TLSData *tls, size_t size);\n    size_t findObjectSize(void *object) const;\n    MemoryPool *getMemPool() const { return poolPtr; } // do not use on the hot path!\n\nprotected:\n    void cleanBlockHeader();\n\nprivate:\n    static const float emptyEnoughRatio; /* Threshold on free space needed to \"reactivate\" a block */\n\n    inline FreeObject *allocateFromBumpPtr();\n    inline FreeObject *findAllocatedObject(const void *address) const;\n#if MALLOC_DEBUG\n    inline bool isProperlyPlaced(const void *object) const;\n#endif\n    inline void markOwned(TLSData *tls) {\n        MALLOC_ASSERT(!tlsPtr.load(std::memory_order_relaxed), ASSERT_TEXT);\n        ownerTid = ThreadId(); /* save the ID of the current thread */\n        tlsPtr.store(tls, std::memory_order_relaxed);\n    }\n    inline void markOrphaned() {\n        MALLOC_ASSERT(tlsPtr.load(std::memory_order_relaxed), ASSERT_TEXT);\n        tlsPtr.store(nullptr, std::memory_order_relaxed);\n    }\n\n    friend class Bin;\n    friend class TLSData;\n    friend bool MemoryPool::destroy();\n};\n\nconst float Block::emptyEnoughRatio = 1.0 / 4.0;\n\nstatic_assert(sizeof(Block) <= 2*estimatedCacheLineSize,\n    \"The class Block does not fit into 2 cache lines on this platform. \"\n    \"Defining USE_INTERNAL_TID may help to fix it.\");\n\nclass Bin {\nprivate:\npublic:\n    Block *activeBlk;\n    std::atomic<Block*> mailbox;\n    MallocMutex mailLock;\n\npublic:\n    inline Block* getActiveBlock() const { return activeBlk; }\n    void resetActiveBlock() { activeBlk = nullptr; }\n    inline void setActiveBlock(Block *block);\n    inline Block* setPreviousBlockActive();\n    Block* getPrivatizedFreeListBlock();\n    void moveBlockToFront(Block *block);\n    bool cleanPublicFreeLists();\n    void processEmptyBlock(Block *block, bool poolTheBlock);\n    void addPublicFreeListBlock(Block* block);\n\n    void outofTLSBin(Block* block);\n    void verifyTLSBin(size_t size) const;\n    void pushTLSBin(Block* block);\n\n#if MALLOC_DEBUG\n    void verifyInitState() const {\n        MALLOC_ASSERT( !activeBlk, ASSERT_TEXT );\n        MALLOC_ASSERT( !mailbox.load(std::memory_order_relaxed), ASSERT_TEXT );\n    }\n#endif\n\n    friend void Block::freePublicObject (FreeObject *objectToFree);\n};\n\n/********* End of the data structures                    **************/\n\n/*\n * There are bins for all 8 byte aligned objects less than this segregated size; 8 bins in total\n */\nconst uint32_t minSmallObjectIndex = 0;\nconst uint32_t numSmallObjectBins = 8;\nconst uint32_t maxSmallObjectSize = 64;\n\n/*\n * There are 4 bins between each couple of powers of 2 [64-128-256-...]\n * from maxSmallObjectSize till this size; 16 bins in total\n */\nconst uint32_t minSegregatedObjectIndex = minSmallObjectIndex+numSmallObjectBins;\nconst uint32_t numSegregatedObjectBins = 16;\nconst uint32_t maxSegregatedObjectSize = 1024;\n\n/*\n * And there are 5 bins with allocation sizes that are multiples of estimatedCacheLineSize\n * and selected to fit 9, 6, 4, 3, and 2 allocations in a block.\n */\nconst uint32_t minFittingIndex = minSegregatedObjectIndex+numSegregatedObjectBins;\nconst uint32_t numFittingBins = 5;\n\nconst uint32_t fittingAlignment = estimatedCacheLineSize;\n\n#define SET_FITTING_SIZE(N) ( (slabSize-sizeof(Block))/N ) & ~(fittingAlignment-1)\n// For blockSize=16*1024, sizeof(Block)=2*estimatedCacheLineSize and fittingAlignment=estimatedCacheLineSize,\n// the comments show the fitting sizes and the amounts left unused for estimatedCacheLineSize=64/128:\nconst uint32_t fittingSize1 = SET_FITTING_SIZE(9); // 1792/1792 128/000\nconst uint32_t fittingSize2 = SET_FITTING_SIZE(6); // 2688/2688 128/000\nconst uint32_t fittingSize3 = SET_FITTING_SIZE(4); // 4032/3968 128/256\nconst uint32_t fittingSize4 = SET_FITTING_SIZE(3); // 5376/5376 128/000\nconst uint32_t fittingSize5 = SET_FITTING_SIZE(2); // 8128/8064 000/000\n#undef SET_FITTING_SIZE\n\n/*\n * The total number of thread-specific Block-based bins\n */\nconst uint32_t numBlockBins = minFittingIndex+numFittingBins;\n\n/*\n * Objects of this size and larger are considered large objects.\n */\nconst uint32_t minLargeObjectSize = fittingSize5 + 1;\n\n/*\n * Per-thread pool of slab blocks. Idea behind it is to not share with other\n * threads memory that are likely in local cache(s) of our CPU.\n */\nclass FreeBlockPool {\nprivate:\n    std::atomic<Block*> head;\n    int         size;\n    Backend    *backend;\npublic:\n    static const int POOL_HIGH_MARK = 32;\n    static const int POOL_LOW_MARK  = 8;\n\n    class ResOfGet {\n        ResOfGet() = delete;\n    public:\n        Block* block;\n        bool   lastAccMiss;\n        ResOfGet(Block *b, bool lastMiss) : block(b), lastAccMiss(lastMiss) {}\n    };\n\n    // allocated in zero-initialized memory\n    FreeBlockPool(Backend *bknd) : backend(bknd) {}\n    ResOfGet getBlock();\n    void returnBlock(Block *block);\n    bool externalCleanup(); // can be called by another thread\n};\n\ntemplate<int LOW_MARK, int HIGH_MARK>\nclass LocalLOCImpl {\nprivate:\n    static const size_t MAX_TOTAL_SIZE = 4*1024*1024;\n    // TODO: can single-linked list be faster here?\n    LargeMemoryBlock *tail; // need it when do releasing on overflow\n    std::atomic<LargeMemoryBlock*> head;\n    size_t            totalSize;\n    int               numOfBlocks;\npublic:\n    bool put(LargeMemoryBlock *object, ExtMemoryPool *extMemPool);\n    LargeMemoryBlock *get(size_t size);\n    bool externalCleanup(ExtMemoryPool *extMemPool);\n#if __TBB_MALLOC_WHITEBOX_TEST\n    LocalLOCImpl() : tail(nullptr), head(nullptr), totalSize(0), numOfBlocks(0) {}\n    static size_t getMaxSize() { return MAX_TOTAL_SIZE; }\n    static const int LOC_HIGH_MARK = HIGH_MARK;\n#else\n    // no ctor, object must be created in zero-initialized memory\n#endif\n};\n\ntypedef LocalLOCImpl<8,32> LocalLOC; // set production code parameters\n\nclass TLSData : public TLSRemote {\n    MemoryPool   *memPool;\npublic:\n    Bin           bin[numBlockBinLimit];\n    FreeBlockPool freeSlabBlocks;\n    LocalLOC      lloc;\n    unsigned      currCacheIdx;\nprivate:\n    std::atomic<bool> unused;\npublic:\n    TLSData(MemoryPool *mPool, Backend *bknd) : memPool(mPool), freeSlabBlocks(bknd), currCacheIdx(0) {}\n    MemoryPool *getMemPool() const { return memPool; }\n    Bin* getAllocationBin(size_t size);\n    void release();\n    bool externalCleanup(bool cleanOnlyUnused, bool cleanBins) {\n        if (!unused.load(std::memory_order_relaxed) && cleanOnlyUnused) return false;\n        // Heavy operation in terms of synchronization complexity,\n        // should be called only for the current thread\n        bool released = cleanBins ? cleanupBlockBins() : false;\n        // both cleanups to be called, and the order is not important\n        bool lloc_cleaned = lloc.externalCleanup(&memPool->extMemPool);\n        bool free_slab_blocks_cleaned = freeSlabBlocks.externalCleanup();\n        return released || lloc_cleaned || free_slab_blocks_cleaned;\n    }\n    bool cleanupBlockBins();\n    void markUsed() { unused.store(false, std::memory_order_relaxed); } // called by owner when TLS touched\n    void markUnused() { unused.store(true, std::memory_order_relaxed); } // can be called by not owner thread\n};\n\nTLSData *TLSKey::createTLS(MemoryPool *memPool, Backend *backend)\n{\n    MALLOC_ASSERT( sizeof(TLSData) >= sizeof(Bin) * numBlockBins + sizeof(FreeBlockPool), ASSERT_TEXT );\n    TLSData* tls = (TLSData*) memPool->bootStrapBlocks.allocate(memPool, sizeof(TLSData));\n    if ( !tls )\n        return nullptr;\n    new(tls) TLSData(memPool, backend);\n    /* the block contains zeroes after bootStrapMalloc, so bins are initialized */\n#if MALLOC_DEBUG\n    for (uint32_t i = 0; i < numBlockBinLimit; i++)\n        tls->bin[i].verifyInitState();\n#endif\n    setThreadMallocTLS(tls);\n    memPool->extMemPool.allLocalCaches.registerThread(tls);\n    return tls;\n}\n\nbool TLSData::cleanupBlockBins()\n{\n    bool released = false;\n    for (uint32_t i = 0; i < numBlockBinLimit; i++) {\n        released |= bin[i].cleanPublicFreeLists();\n        // After cleaning public free lists, only the active block might be empty.\n        // Do not use processEmptyBlock because it will just restore bumpPtr.\n        Block *block = bin[i].getActiveBlock();\n        if (block && block->empty()) {\n            bin[i].outofTLSBin(block);\n            memPool->returnEmptyBlock(block, /*poolTheBlock=*/false);\n            released = true;\n        }\n    }\n    return released;\n}\n\nbool ExtMemoryPool::releaseAllLocalCaches()\n{\n    // Iterate all registered TLS data and clean LLOC and Slab pools\n    bool released = allLocalCaches.cleanup(/*cleanOnlyUnused=*/false);\n\n    // Bins privatization is done only for the current thread\n    if (TLSData *tlsData = tlsPointerKey.getThreadMallocTLS())\n        released |= tlsData->cleanupBlockBins();\n\n    return released;\n}\n\nvoid AllLocalCaches::registerThread(TLSRemote *tls)\n{\n    tls->prev = nullptr;\n    MallocMutex::scoped_lock lock(listLock);\n    MALLOC_ASSERT(head!=tls, ASSERT_TEXT);\n    tls->next = head;\n    if (head)\n        head->prev = tls;\n    head = tls;\n    MALLOC_ASSERT(head->next!=head, ASSERT_TEXT);\n}\n\nvoid AllLocalCaches::unregisterThread(TLSRemote *tls)\n{\n    MallocMutex::scoped_lock lock(listLock);\n    MALLOC_ASSERT(head, \"Can't unregister thread: no threads are registered.\");\n    if (head == tls)\n        head = tls->next;\n    if (tls->next)\n        tls->next->prev = tls->prev;\n    if (tls->prev)\n        tls->prev->next = tls->next;\n    MALLOC_ASSERT(!tls->next || tls->next->next!=tls->next, ASSERT_TEXT);\n}\n\nbool AllLocalCaches::cleanup(bool cleanOnlyUnused)\n{\n    bool released = false;\n    {\n        MallocMutex::scoped_lock lock(listLock);\n        for (TLSRemote *curr=head; curr; curr=curr->next)\n            released |= static_cast<TLSData*>(curr)->externalCleanup(cleanOnlyUnused, /*cleanBins=*/false);\n    }\n    return released;\n}\n\nvoid AllLocalCaches::markUnused()\n{\n    bool locked = false;\n    MallocMutex::scoped_lock lock(listLock, /*block=*/false, &locked);\n    if (!locked) // not wait for marking if someone doing something with it\n        return;\n\n    for (TLSRemote *curr=head; curr; curr=curr->next)\n        static_cast<TLSData*>(curr)->markUnused();\n}\n\n#if MALLOC_CHECK_RECURSION\nMallocMutex RecursiveMallocCallProtector::rmc_mutex;\nstd::atomic<pthread_t> RecursiveMallocCallProtector::owner_thread;\nstd::atomic<void*> RecursiveMallocCallProtector::autoObjPtr;\nbool        RecursiveMallocCallProtector::mallocRecursionDetected;\n#if __FreeBSD__\nbool        RecursiveMallocCallProtector::canUsePthread;\n#endif\n\n#endif\n\n/*********** End code to provide thread ID and a TLS pointer **********/\n\n// Parameter for isLargeObject, keeps our expectations on memory origin.\n// Assertions must use unknownMem to reliably report object invalidity.\nenum MemoryOrigin {\n    ourMem,    // allocated by TBB allocator\n    unknownMem // can be allocated by system allocator or TBB allocator\n};\n\ntemplate<MemoryOrigin>\n#if __TBB_USE_THREAD_SANITIZER\n// We have a real race when accessing the large object header for\n// non large objects (e.g. small or foreign objects).\n// Therefore, we need to hide this access from the thread sanitizer\n__attribute__((no_sanitize(\"thread\")))\n#endif\nbool isLargeObject(void *object);\nstatic void *internalMalloc(size_t size);\nstatic void internalFree(void *object);\nstatic void *internalPoolMalloc(MemoryPool* mPool, size_t size);\nstatic bool internalPoolFree(MemoryPool *mPool, void *object, size_t size);\n\n#if !MALLOC_DEBUG\n#if __INTEL_COMPILER || _MSC_VER\n#define NOINLINE(decl) __declspec(noinline) decl\n#define ALWAYSINLINE(decl) __forceinline decl\n#elif __GNUC__\n#define NOINLINE(decl) decl __attribute__ ((noinline))\n#define ALWAYSINLINE(decl) decl __attribute__ ((always_inline))\n#else\n#define NOINLINE(decl) decl\n#define ALWAYSINLINE(decl) decl\n#endif\n\nstatic NOINLINE( bool doInitialization() );\nALWAYSINLINE( bool isMallocInitialized() );\n\n#undef ALWAYSINLINE\n#undef NOINLINE\n#endif /* !MALLOC_DEBUG */\n\n\n/********* Now some rough utility code to deal with indexing the size bins. **************/\n\n/*\n * Given a number return the highest non-zero bit in it. It is intended to work with 32-bit values only.\n * Moreover, on some platforms, for sake of simplicity and performance, it is narrowed to only serve for 64 to 1023.\n * This is enough for current algorithm of distribution of sizes among bins.\n * __TBB_Log2 is not used here to minimize dependencies on TBB specific sources.\n */\n#if _WIN64 && _MSC_VER>=1400 && !__INTEL_COMPILER\nextern \"C\" unsigned char _BitScanReverse( unsigned long* i, unsigned long w );\n#pragma intrinsic(_BitScanReverse)\n#endif\nstatic inline unsigned int highestBitPos(unsigned int n)\n{\n    MALLOC_ASSERT( n>=64 && n<1024, ASSERT_TEXT ); // only needed for bsr array lookup, but always true\n    unsigned int pos;\n#if __ARCH_x86_32||__ARCH_x86_64\n\n# if __unix__||__APPLE__||__MINGW32__\n    __asm__ (\"bsr %1,%0\" : \"=r\"(pos) : \"r\"(n));\n# elif (_WIN32 && (!_WIN64 || __INTEL_COMPILER))\n    __asm\n    {\n        bsr eax, n\n        mov pos, eax\n    }\n# elif _WIN64 && _MSC_VER>=1400\n    _BitScanReverse((unsigned long*)&pos, (unsigned long)n);\n# else\n#   error highestBitPos() not implemented for this platform\n# endif\n#elif __arm__\n    __asm__ __volatile__\n    (\n       \"clz %0, %1\\n\"\n       \"rsb %0, %0, %2\\n\"\n       :\"=r\" (pos) :\"r\" (n), \"I\" (31)\n    );\n#else\n    static unsigned int bsr[16] = {0/*N/A*/,6,7,7,8,8,8,8,9,9,9,9,9,9,9,9};\n    pos = bsr[ n>>6 ];\n#endif /* __ARCH_* */\n    return pos;\n}\n\nunsigned int getSmallObjectIndex(unsigned int size)\n{\n    unsigned int result = (size-1)>>3;\n    constexpr bool is_64bit = (8 == sizeof(void*));\n    if (is_64bit) {\n        // For 64-bit malloc, 16 byte alignment is needed except for bin 0.\n        if (result) result |= 1; // 0,1,3,5,7; bins 2,4,6 are not aligned to 16 bytes\n    }\n    return result;\n}\n\n/*\n * Depending on indexRequest, for a given size return either the index into the bin\n * for objects of this size, or the actual size of objects in this bin.\n * TODO: Change return type to unsigned short.\n */\ntemplate<bool indexRequest>\nstatic unsigned int getIndexOrObjectSize (unsigned int size)\n{\n    if (size <= maxSmallObjectSize) { // selection from 8/16/24/32/40/48/56/64\n        unsigned int index = getSmallObjectIndex( size );\n         /* Bin 0 is for 8 bytes, bin 1 is for 16, and so forth */\n        return indexRequest ? index : (index+1)<<3;\n    }\n    else if (size <= maxSegregatedObjectSize ) { // 80/96/112/128 / 160/192/224/256 / 320/384/448/512 / 640/768/896/1024\n        unsigned int order = highestBitPos(size-1); // which group of bin sizes?\n        MALLOC_ASSERT( 6<=order && order<=9, ASSERT_TEXT );\n        if (indexRequest)\n            return minSegregatedObjectIndex - (4*6) - 4 + (4*order) + ((size-1)>>(order-2));\n        else {\n            unsigned int alignment = 128 >> (9-order); // alignment in the group\n            MALLOC_ASSERT( alignment==16 || alignment==32 || alignment==64 || alignment==128, ASSERT_TEXT );\n            return alignUp(size,alignment);\n        }\n    }\n    else {\n        if( size <= fittingSize3 ) {\n            if( size <= fittingSize2 ) {\n                if( size <= fittingSize1 )\n                    return indexRequest ? minFittingIndex : fittingSize1;\n                else\n                    return indexRequest ? minFittingIndex+1 : fittingSize2;\n            } else\n                return indexRequest ? minFittingIndex+2 : fittingSize3;\n        } else {\n            if( size <= fittingSize5 ) {\n                if( size <= fittingSize4 )\n                    return indexRequest ? minFittingIndex+3 : fittingSize4;\n                else\n                    return indexRequest ? minFittingIndex+4 : fittingSize5;\n            } else {\n                MALLOC_ASSERT( 0,ASSERT_TEXT ); // this should not happen\n                return ~0U;\n            }\n        }\n    }\n}\n\nstatic unsigned int getIndex (unsigned int size)\n{\n    return getIndexOrObjectSize</*indexRequest=*/true>(size);\n}\n\nstatic unsigned int getObjectSize (unsigned int size)\n{\n    return getIndexOrObjectSize</*indexRequest=*/false>(size);\n}\n\n\nvoid *BootStrapBlocks::allocate(MemoryPool *memPool, size_t size)\n{\n    FreeObject *result;\n\n    MALLOC_ASSERT( size == sizeof(TLSData), ASSERT_TEXT );\n\n    { // Lock with acquire\n        MallocMutex::scoped_lock scoped_cs(bootStrapLock);\n\n        if( bootStrapObjectList) {\n            result = bootStrapObjectList;\n            bootStrapObjectList = bootStrapObjectList->next;\n        } else {\n            if (!bootStrapBlock) {\n                bootStrapBlock = memPool->getEmptyBlock(size);\n                if (!bootStrapBlock) return nullptr;\n            }\n            result = bootStrapBlock->bumpPtr;\n            bootStrapBlock->bumpPtr = (FreeObject *)((uintptr_t)bootStrapBlock->bumpPtr - bootStrapBlock->objectSize);\n            if ((uintptr_t)bootStrapBlock->bumpPtr < (uintptr_t)bootStrapBlock+sizeof(Block)) {\n                bootStrapBlock->bumpPtr = nullptr;\n                bootStrapBlock->next = bootStrapBlockUsed;\n                bootStrapBlockUsed = bootStrapBlock;\n                bootStrapBlock = nullptr;\n            }\n        }\n    } // Unlock with release\n    memset (result, 0, size);\n    return (void*)result;\n}\n\nvoid BootStrapBlocks::free(void* ptr)\n{\n    MALLOC_ASSERT( ptr, ASSERT_TEXT );\n    { // Lock with acquire\n        MallocMutex::scoped_lock scoped_cs(bootStrapLock);\n        ((FreeObject*)ptr)->next = bootStrapObjectList;\n        bootStrapObjectList = (FreeObject*)ptr;\n    } // Unlock with release\n}\n\nvoid BootStrapBlocks::reset()\n{\n    bootStrapBlock = bootStrapBlockUsed = nullptr;\n    bootStrapObjectList = nullptr;\n}\n\n#if !(FREELIST_NONBLOCKING)\nstatic MallocMutex publicFreeListLock; // lock for changes of publicFreeList\n#endif\n\n/********* End rough utility code  **************/\n\n/* LifoList assumes zero initialization so a vector of it can be created\n * by just allocating some space with no call to constructor.\n * On Linux, it seems to be necessary to avoid linking with C++ libraries.\n *\n * By usage convention there is no race on the initialization. */\nLifoList::LifoList( ) : top(nullptr)\n{\n    // MallocMutex assumes zero initialization\n    memset(static_cast<void*>(&lock), 0, sizeof(MallocMutex));\n}\n\nvoid LifoList::push(Block *block)\n{\n    MallocMutex::scoped_lock scoped_cs(lock);\n    block->next = top.load(std::memory_order_relaxed);\n    top.store(block, std::memory_order_relaxed);\n}\n\nBlock *LifoList::pop()\n{\n    Block* block = nullptr;\n    if (top.load(std::memory_order_relaxed)) {\n        MallocMutex::scoped_lock scoped_cs(lock);\n        block = top.load(std::memory_order_relaxed);\n        if (block) {\n            top.store(block->next, std::memory_order_relaxed);\n        }\n    }\n    return block;\n}\n\nBlock *LifoList::grab()\n{\n    Block *block = nullptr;\n    if (top.load(std::memory_order_relaxed)) {\n        MallocMutex::scoped_lock scoped_cs(lock);\n        block = top.load(std::memory_order_relaxed);\n        top.store(nullptr, std::memory_order_relaxed);\n    }\n    return block;\n}\n\n/********* Thread and block related code      *************/\n\ntemplate<bool poolDestroy> void AllLargeBlocksList::releaseAll(Backend *backend) {\n     LargeMemoryBlock *next, *lmb = loHead;\n     loHead = nullptr;\n\n     for (; lmb; lmb = next) {\n         next = lmb->gNext;\n         if (poolDestroy) {\n             // as it's pool destruction, no need to return object to backend,\n             // only remove backrefs, as they are global\n             removeBackRef(lmb->backRefIdx);\n         } else {\n             // clean g(Next|Prev) to prevent removing lmb\n             // from AllLargeBlocksList inside returnLargeObject\n             lmb->gNext = lmb->gPrev = nullptr;\n             backend->returnLargeObject(lmb);\n         }\n     }\n}\n\nTLSData* MemoryPool::getTLS(bool create)\n{\n    TLSData* tls = extMemPool.tlsPointerKey.getThreadMallocTLS();\n    if (create && !tls)\n        tls = extMemPool.tlsPointerKey.createTLS(this, &extMemPool.backend);\n    return tls;\n}\n\n/*\n * Return the bin for the given size.\n */\ninline Bin* TLSData::getAllocationBin(size_t size)\n{\n    return bin + getIndex(size);\n}\n\n/* Return an empty uninitialized block in a non-blocking fashion. */\nBlock *MemoryPool::getEmptyBlock(size_t size)\n{\n    TLSData* tls = getTLS(/*create=*/false);\n    // try to use per-thread cache, if TLS available\n    FreeBlockPool::ResOfGet resOfGet = tls?\n        tls->freeSlabBlocks.getBlock() : FreeBlockPool::ResOfGet(nullptr, false);\n    Block *result = resOfGet.block;\n\n    if (!result) { // not found in local cache, asks backend for slabs\n        int num = resOfGet.lastAccMiss? Backend::numOfSlabAllocOnMiss : 1;\n        BackRefIdx backRefIdx[Backend::numOfSlabAllocOnMiss];\n\n        result = static_cast<Block*>(extMemPool.backend.getSlabBlock(num));\n        if (!result) return nullptr;\n\n        if (!extMemPool.userPool())\n            for (int i=0; i<num; i++) {\n                backRefIdx[i] = BackRefIdx::newBackRef(/*largeObj=*/false);\n                if (backRefIdx[i].isInvalid()) {\n                    // roll back resource allocation\n                    for (int j=0; j<i; j++)\n                        removeBackRef(backRefIdx[j]);\n                    Block *b = result;\n                    for (int j=0; j<num; b=(Block*)((uintptr_t)b+slabSize), j++)\n                        extMemPool.backend.putSlabBlock(b);\n                    return nullptr;\n                }\n            }\n        // resources were allocated, register blocks\n        Block *b = result;\n        for (int i=0; i<num; b=(Block*)((uintptr_t)b+slabSize), i++) {\n            // slab block in user's pool must have invalid backRefIdx\n            if (extMemPool.userPool()) {\n                new (&b->backRefIdx) BackRefIdx();\n            } else {\n                setBackRef(backRefIdx[i], b);\n                b->backRefIdx = backRefIdx[i];\n            }\n            b->tlsPtr.store(tls, std::memory_order_relaxed);\n            b->poolPtr = this;\n            // all but first one go to per-thread pool\n            if (i > 0) {\n                MALLOC_ASSERT(tls, ASSERT_TEXT);\n                tls->freeSlabBlocks.returnBlock(b);\n            }\n        }\n    }\n    MALLOC_ASSERT(result, ASSERT_TEXT);\n    result->initEmptyBlock(tls, size);\n    STAT_increment(getThreadId(), getIndex(result->objectSize), allocBlockNew);\n    return result;\n}\n\nvoid MemoryPool::returnEmptyBlock(Block *block, bool poolTheBlock)\n{\n    block->reset();\n    if (poolTheBlock) {\n        getTLS(/*create=*/false)->freeSlabBlocks.returnBlock(block);\n    } else {\n        // slab blocks in user's pools do not have valid backRefIdx\n        if (!extMemPool.userPool())\n            removeBackRef(*(block->getBackRefIdx()));\n        extMemPool.backend.putSlabBlock(block);\n    }\n}\n\nbool ExtMemoryPool::init(intptr_t poolId, rawAllocType rawAlloc,\n                         rawFreeType rawFree, size_t granularity,\n                         bool keepAllMemory, bool fixedPool)\n{\n    this->poolId = poolId;\n    this->rawAlloc = rawAlloc;\n    this->rawFree = rawFree;\n    this->granularity = granularity;\n    this->keepAllMemory = keepAllMemory;\n    this->fixedPool = fixedPool;\n    this->delayRegsReleasing = false;\n    if (!initTLS())\n        return false;\n    loc.init(this);\n    backend.init(this);\n    MALLOC_ASSERT(isPoolValid(), nullptr);\n    return true;\n}\n\nbool ExtMemoryPool::initTLS() { return tlsPointerKey.init(); }\n\nbool MemoryPool::init(intptr_t poolId, const MemPoolPolicy *policy)\n{\n    if (!extMemPool.init(poolId, policy->pAlloc, policy->pFree,\n               policy->granularity? policy->granularity : defaultGranularity,\n               policy->keepAllMemory, policy->fixedPool))\n        return false;\n    {\n        MallocMutex::scoped_lock lock(memPoolListLock);\n        next = defaultMemPool->next;\n        defaultMemPool->next = this;\n        prev = defaultMemPool;\n        if (next)\n            next->prev = this;\n    }\n    return true;\n}\n\nbool MemoryPool::reset()\n{\n    MALLOC_ASSERT(extMemPool.userPool(), \"No reset for the system pool.\");\n    // memory is not releasing during pool reset\n    // TODO: mark regions to release unused on next reset()\n    extMemPool.delayRegionsReleasing(true);\n\n    bootStrapBlocks.reset();\n    extMemPool.lmbList.releaseAll</*poolDestroy=*/false>(&extMemPool.backend);\n    if (!extMemPool.reset())\n        return false;\n\n    if (!extMemPool.initTLS())\n        return false;\n    extMemPool.delayRegionsReleasing(false);\n    return true;\n}\n\nbool MemoryPool::destroy()\n{\n#if __TBB_MALLOC_LOCACHE_STAT\n    extMemPool.loc.reportStat(stdout);\n#endif\n#if __TBB_MALLOC_BACKEND_STAT\n    extMemPool.backend.reportStat(stdout);\n#endif\n    {\n        MallocMutex::scoped_lock lock(memPoolListLock);\n        // remove itself from global pool list\n        if (prev)\n            prev->next = next;\n        if (next)\n            next->prev = prev;\n    }\n    // slab blocks in non-default pool do not have backreferences,\n    // only large objects do\n    if (extMemPool.userPool())\n        extMemPool.lmbList.releaseAll</*poolDestroy=*/true>(&extMemPool.backend);\n    else {\n        // only one non-userPool() is supported now\n        MALLOC_ASSERT(this==defaultMemPool, nullptr);\n        // There and below in extMemPool.destroy(), do not restore initial state\n        // for user pool, because it's just about to be released. But for system\n        // pool restoring, we do not want to do zeroing of it on subsequent reload.\n        bootStrapBlocks.reset();\n        extMemPool.orphanedBlocks.reset();\n    }\n    return extMemPool.destroy();\n}\n\nvoid MemoryPool::onThreadShutdown(TLSData *tlsData)\n{\n    if (tlsData) { // might be called for \"empty\" TLS\n        tlsData->release();\n        bootStrapBlocks.free(tlsData);\n        clearTLS();\n    }\n}\n\n#if MALLOC_DEBUG\nvoid Bin::verifyTLSBin (size_t size) const\n{\n/* The debug version verifies the TLSBin as needed */\n    uint32_t objSize = getObjectSize(size);\n\n    if (activeBlk) {\n        MALLOC_ASSERT( activeBlk->isOwnedByCurrentThread(), ASSERT_TEXT );\n        MALLOC_ASSERT( activeBlk->objectSize == objSize, ASSERT_TEXT );\n#if MALLOC_DEBUG>1\n        for (Block* temp = activeBlk->next; temp; temp=temp->next) {\n            MALLOC_ASSERT( temp!=activeBlk, ASSERT_TEXT );\n            MALLOC_ASSERT( temp->isOwnedByCurrentThread(), ASSERT_TEXT );\n            MALLOC_ASSERT( temp->objectSize == objSize, ASSERT_TEXT );\n            MALLOC_ASSERT( temp->previous->next == temp, ASSERT_TEXT );\n            if (temp->next) {\n                MALLOC_ASSERT( temp->next->previous == temp, ASSERT_TEXT );\n            }\n        }\n        for (Block* temp = activeBlk->previous; temp; temp=temp->previous) {\n            MALLOC_ASSERT( temp!=activeBlk, ASSERT_TEXT );\n            MALLOC_ASSERT( temp->isOwnedByCurrentThread(), ASSERT_TEXT );\n            MALLOC_ASSERT( temp->objectSize == objSize, ASSERT_TEXT );\n            MALLOC_ASSERT( temp->next->previous == temp, ASSERT_TEXT );\n            if (temp->previous) {\n                MALLOC_ASSERT( temp->previous->next == temp, ASSERT_TEXT );\n            }\n        }\n#endif /* MALLOC_DEBUG>1 */\n    }\n}\n#else /* MALLOC_DEBUG */\ninline void Bin::verifyTLSBin (size_t) const { }\n#endif /* MALLOC_DEBUG */\n\n/*\n * Add a block to the start of this tls bin list.\n */\nvoid Bin::pushTLSBin(Block* block)\n{\n    /* The objectSize should be defined and not a parameter\n       because the function is applied to partially filled blocks as well */\n    unsigned int size = block->objectSize;\n\n    MALLOC_ASSERT( block->isOwnedByCurrentThread(), ASSERT_TEXT );\n    MALLOC_ASSERT( block->objectSize != 0, ASSERT_TEXT );\n    MALLOC_ASSERT( block->next == nullptr, ASSERT_TEXT );\n    MALLOC_ASSERT( block->previous == nullptr, ASSERT_TEXT );\n\n    MALLOC_ASSERT( this, ASSERT_TEXT );\n    verifyTLSBin(size);\n\n    block->next = activeBlk;\n    if( activeBlk ) {\n        block->previous = activeBlk->previous;\n        activeBlk->previous = block;\n        if( block->previous )\n            block->previous->next = block;\n    } else {\n        activeBlk = block;\n    }\n\n    verifyTLSBin(size);\n}\n\n/*\n * Take a block out of its tls bin (e.g. before removal).\n */\nvoid Bin::outofTLSBin(Block* block)\n{\n    unsigned int size = block->objectSize;\n\n    MALLOC_ASSERT( block->isOwnedByCurrentThread(), ASSERT_TEXT );\n    MALLOC_ASSERT( block->objectSize != 0, ASSERT_TEXT );\n\n    MALLOC_ASSERT( this, ASSERT_TEXT );\n    verifyTLSBin(size);\n\n    if (block == activeBlk) {\n        activeBlk = block->previous? block->previous : block->next;\n    }\n    /* Unlink the block */\n    if (block->previous) {\n        MALLOC_ASSERT( block->previous->next == block, ASSERT_TEXT );\n        block->previous->next = block->next;\n    }\n    if (block->next) {\n        MALLOC_ASSERT( block->next->previous == block, ASSERT_TEXT );\n        block->next->previous = block->previous;\n    }\n    block->next = nullptr;\n    block->previous = nullptr;\n\n    verifyTLSBin(size);\n}\n\nBlock* Bin::getPrivatizedFreeListBlock()\n{\n    Block* block;\n    MALLOC_ASSERT( this, ASSERT_TEXT );\n    // if this method is called, active block usage must be unsuccessful\n    MALLOC_ASSERT( (!activeBlk && !mailbox.load(std::memory_order_relaxed)) || (activeBlk && activeBlk->isFull), ASSERT_TEXT );\n\n// the counter should be changed    STAT_increment(getThreadId(), ThreadCommonCounters, lockPublicFreeList);\n    if (!mailbox.load(std::memory_order_acquire)) // hotpath is empty mailbox\n        return nullptr;\n    else { // mailbox is not empty, take lock and inspect it\n        MallocMutex::scoped_lock scoped_cs(mailLock);\n        block = mailbox.load(std::memory_order_relaxed);\n        if( block ) {\n            MALLOC_ASSERT( block->isOwnedByCurrentThread(), ASSERT_TEXT );\n            MALLOC_ASSERT( !isNotForUse(block->nextPrivatizable.load(std::memory_order_relaxed)), ASSERT_TEXT );\n            mailbox.store(block->nextPrivatizable.load(std::memory_order_relaxed), std::memory_order_relaxed);\n            block->nextPrivatizable.store((Block*)this, std::memory_order_relaxed);\n        }\n    }\n    if( block ) {\n        MALLOC_ASSERT( isSolidPtr(block->publicFreeList.load(std::memory_order_relaxed)), ASSERT_TEXT );\n        block->privatizePublicFreeList();\n        block->adjustPositionInBin(this);\n    }\n    return block;\n}\n\nvoid Bin::addPublicFreeListBlock(Block* block)\n{\n    MallocMutex::scoped_lock scoped_cs(mailLock);\n    block->nextPrivatizable.store(mailbox.load(std::memory_order_relaxed), std::memory_order_relaxed);\n    mailbox.store(block, std::memory_order_relaxed);\n}\n\n// Process publicly freed objects in all blocks and return empty blocks\n// to the backend in order to reduce overall footprint.\nbool Bin::cleanPublicFreeLists()\n{\n    Block* block;\n    if (!mailbox.load(std::memory_order_acquire))\n        return false;\n    else {\n        // Grab all the blocks in the mailbox\n        MallocMutex::scoped_lock scoped_cs(mailLock);\n        block = mailbox.load(std::memory_order_relaxed);\n        mailbox.store(nullptr, std::memory_order_relaxed);\n    }\n    bool released = false;\n    while (block) {\n        MALLOC_ASSERT( block->isOwnedByCurrentThread(), ASSERT_TEXT );\n        Block* tmp = block->nextPrivatizable.load(std::memory_order_relaxed);\n        block->nextPrivatizable.store((Block*)this, std::memory_order_relaxed);\n        block->privatizePublicFreeList();\n        if (block->empty()) {\n            processEmptyBlock(block, /*poolTheBlock=*/false);\n            released = true;\n        } else\n            block->adjustPositionInBin(this);\n        block = tmp;\n    }\n    return released;\n}\n\nbool Block::adjustFullness()\n{\n    if (bumpPtr) {\n        /* If we are still using a bump ptr for this block it is empty enough to use. */\n        STAT_increment(getThreadId(), getIndex(objectSize), examineEmptyEnough);\n        isFull = false;\n    } else {\n        const float threshold = (slabSize - sizeof(Block)) * (1 - emptyEnoughRatio);\n        /* allocatedCount shows how many objects in the block are in use; however it still counts\n         * blocks freed by other threads; so prior call to privatizePublicFreeList() is recommended */\n        isFull = (allocatedCount*objectSize > threshold) ? true : false;\n#if COLLECT_STATISTICS\n        if (isFull)\n            STAT_increment(getThreadId(), getIndex(objectSize), examineNotEmpty);\n        else\n            STAT_increment(getThreadId(), getIndex(objectSize), examineEmptyEnough);\n#endif\n    }\n    return isFull;\n}\n\n// This method resides in class Block, and not in class Bin, in order to avoid\n// calling getAllocationBin on a reasonably hot path in Block::freeOwnObject\nvoid Block::adjustPositionInBin(Bin* bin/*=nullptr*/)\n{\n    // If the block were full, but became empty enough to use,\n    // move it to the front of the list\n    if (isFull && !adjustFullness()) {\n        if (!bin)\n            bin = tlsPtr.load(std::memory_order_relaxed)->getAllocationBin(objectSize);\n        bin->moveBlockToFront(this);\n    }\n}\n\n/* Restore the bump pointer for an empty block that is planned to use */\nvoid Block::restoreBumpPtr()\n{\n    MALLOC_ASSERT( allocatedCount == 0, ASSERT_TEXT );\n    MALLOC_ASSERT( !isSolidPtr(publicFreeList.load(std::memory_order_relaxed)), ASSERT_TEXT );\n    STAT_increment(getThreadId(), getIndex(objectSize), freeRestoreBumpPtr);\n    bumpPtr = (FreeObject *)((uintptr_t)this + slabSize - objectSize);\n    freeList = nullptr;\n    isFull = false;\n}\n\nvoid Block::freeOwnObject(void *object)\n{\n    tlsPtr.load(std::memory_order_relaxed)->markUsed();\n    allocatedCount--;\n    MALLOC_ASSERT( allocatedCount < (slabSize-sizeof(Block))/objectSize, ASSERT_TEXT );\n#if COLLECT_STATISTICS\n    // Note that getAllocationBin is not called on the hottest path with statistics off.\n    if (tlsPtr.load(std::memory_order_relaxed)->getAllocationBin(objectSize)->getActiveBlock() != this)\n        STAT_increment(getThreadId(), getIndex(objectSize), freeToInactiveBlock);\n    else\n        STAT_increment(getThreadId(), getIndex(objectSize), freeToActiveBlock);\n#endif\n    if (empty()) {\n        // If the last object of a slab is freed, the slab cannot be marked full\n        MALLOC_ASSERT(!isFull, ASSERT_TEXT);\n        tlsPtr.load(std::memory_order_relaxed)->getAllocationBin(objectSize)->processEmptyBlock(this, /*poolTheBlock=*/true);\n    } else { // hot path\n        FreeObject *objectToFree = findObjectToFree(object);\n        objectToFree->next = freeList;\n        freeList = objectToFree;\n        adjustPositionInBin();\n    }\n}\n\nvoid Block::freePublicObject (FreeObject *objectToFree)\n{\n    FreeObject* localPublicFreeList{};\n\n    MALLOC_ITT_SYNC_RELEASING(&publicFreeList);\n#if FREELIST_NONBLOCKING\n    // TBB_REVAMP_TODO: make it non atomic in non-blocking scenario\n    localPublicFreeList = publicFreeList.load(std::memory_order_relaxed);\n    do {\n        objectToFree->next = localPublicFreeList;\n        // no backoff necessary because trying to make change, not waiting for a change\n    } while( !publicFreeList.compare_exchange_strong(localPublicFreeList, objectToFree) );\n#else\n    STAT_increment(getThreadId(), ThreadCommonCounters, lockPublicFreeList);\n    {\n        MallocMutex::scoped_lock scoped_cs(publicFreeListLock);\n        localPublicFreeList = objectToFree->next = publicFreeList;\n        publicFreeList = objectToFree;\n    }\n#endif\n\n    if( localPublicFreeList==nullptr ) {\n        // if the block is abandoned, its nextPrivatizable pointer should be UNUSABLE\n        // otherwise, it should point to the bin the block belongs to.\n        // reading nextPrivatizable is thread-safe below, because:\n        // 1) the executing thread atomically got publicFreeList==nullptr and changed it to non-nullptr;\n        // 2) only owning thread can change it back to nullptr,\n        // 3) but it can not be done until the block is put to the mailbox\n        // So the executing thread is now the only one that can change nextPrivatizable\n        Block* next = nextPrivatizable.load(std::memory_order_acquire);\n        if( !isNotForUse(next) ) {\n            MALLOC_ASSERT( next!=nullptr, ASSERT_TEXT );\n            Bin* theBin = (Bin*) next;\n#if MALLOC_DEBUG && TBB_REVAMP_TODO\n            // FIXME: The thread that returns the block is not the block's owner.\n            // The below assertion compares 'theBin' against the caller's local bin, thus, it always fails.\n            // Need to find a way to get the correct remote bin for comparison.\n            { // check that nextPrivatizable points to the bin the block belongs to\n                uint32_t index = getIndex( objectSize );\n                TLSData* tls = getThreadMallocTLS();\n                MALLOC_ASSERT( theBin==tls->bin+index, ASSERT_TEXT );\n            }\n#endif // MALLOC_DEBUG\n            theBin->addPublicFreeListBlock(this);\n        }\n    }\n    STAT_increment(getThreadId(), ThreadCommonCounters, freeToOtherThread);\n    STAT_increment(ownerTid.load(std::memory_order_relaxed), getIndex(objectSize), freeByOtherThread);\n}\n\n// Make objects freed by other threads available for use again\nvoid Block::privatizePublicFreeList( bool reset )\n{\n    FreeObject *localPublicFreeList;\n    // If reset is false, publicFreeList should not be zeroed but set to UNUSABLE\n    // to properly synchronize with other threads freeing objects to this slab.\n    const intptr_t endMarker = reset ? 0 : UNUSABLE;\n\n    // Only the owner thread may reset the pointer to nullptr\n    MALLOC_ASSERT( isOwnedByCurrentThread() || !reset, ASSERT_TEXT );\n#if FREELIST_NONBLOCKING\n    localPublicFreeList = publicFreeList.exchange((FreeObject*)endMarker);\n#else\n    STAT_increment(getThreadId(), ThreadCommonCounters, lockPublicFreeList);\n    {\n        MallocMutex::scoped_lock scoped_cs(publicFreeListLock);\n        localPublicFreeList = publicFreeList;\n        publicFreeList = endMarker;\n    }\n#endif\n    MALLOC_ITT_SYNC_ACQUIRED(&publicFreeList);\n    MALLOC_ASSERT( !(reset && isNotForUse(publicFreeList)), ASSERT_TEXT );\n\n    // publicFreeList must have been UNUSABLE or valid, but not nullptr\n    MALLOC_ASSERT( localPublicFreeList!=nullptr, ASSERT_TEXT );\n    if( isSolidPtr(localPublicFreeList) ) {\n        MALLOC_ASSERT( allocatedCount <= (slabSize-sizeof(Block))/objectSize, ASSERT_TEXT );\n        /* other threads did not change the counter freeing our blocks */\n        allocatedCount--;\n        FreeObject *temp = localPublicFreeList;\n        while( isSolidPtr(temp->next) ){ // the list will end with either nullptr or UNUSABLE\n            temp = temp->next;\n            allocatedCount--;\n            MALLOC_ASSERT( allocatedCount < (slabSize-sizeof(Block))/objectSize, ASSERT_TEXT );\n        }\n        /* merge with local freeList */\n        temp->next = freeList;\n        freeList = localPublicFreeList;\n        STAT_increment(getThreadId(), getIndex(objectSize), allocPrivatized);\n    }\n}\n\nvoid Block::privatizeOrphaned(TLSData *tls, unsigned index)\n{\n    Bin* bin = tls->bin + index;\n    STAT_increment(getThreadId(), index, allocBlockPublic);\n    next = nullptr;\n    previous = nullptr;\n    MALLOC_ASSERT( publicFreeList.load(std::memory_order_relaxed) != nullptr, ASSERT_TEXT );\n    /* There is not a race here since no other thread owns this block */\n    markOwned(tls);\n    // It is safe to change nextPrivatizable, as publicFreeList is not null\n    MALLOC_ASSERT( isNotForUse(nextPrivatizable.load(std::memory_order_relaxed)), ASSERT_TEXT );\n    nextPrivatizable.store((Block*)bin, std::memory_order_relaxed);\n    // the next call is required to change publicFreeList to 0\n    privatizePublicFreeList();\n    if( empty() ) {\n        restoreBumpPtr();\n    } else {\n        adjustFullness(); // check the block fullness and set isFull\n    }\n    MALLOC_ASSERT( !isNotForUse(publicFreeList.load(std::memory_order_relaxed)), ASSERT_TEXT );\n}\n\n\nbool Block::readyToShare()\n{\n    FreeObject* oldVal = nullptr;\n#if FREELIST_NONBLOCKING\n    publicFreeList.compare_exchange_strong(oldVal, (FreeObject*)UNUSABLE);\n#else\n    STAT_increment(getThreadId(), ThreadCommonCounters, lockPublicFreeList);\n    {\n        MallocMutex::scoped_lock scoped_cs(publicFreeListLock);\n        if ( (oldVal=publicFreeList)==nullptr )\n            publicFreeList = reinterpret_cast<FreeObject *>(UNUSABLE);\n    }\n#endif\n    return oldVal==nullptr;\n}\n\nvoid Block::shareOrphaned(intptr_t binTag, unsigned index)\n{\n    MALLOC_ASSERT( binTag, ASSERT_TEXT );\n    // unreferenced formal parameter warning\n    tbb::detail::suppress_unused_warning(index);\n    STAT_increment(getThreadId(), index, freeBlockPublic);\n    markOrphaned();\n    if ((intptr_t)nextPrivatizable.load(std::memory_order_relaxed) == binTag) {\n        // First check passed: the block is not in mailbox yet.\n        // Need to set publicFreeList to non-zero, so other threads\n        // will not change nextPrivatizable and it can be zeroed.\n        if ( !readyToShare() ) {\n            // another thread freed an object; we need to wait until it finishes.\n            // There is no need for exponential backoff, as the wait here is not for a lock;\n            // but need to yield, so the thread we wait has a chance to run.\n            // TODO: add a pause to also be friendly to hyperthreads\n            int count = 256;\n            while ((intptr_t)nextPrivatizable.load(std::memory_order_relaxed) == binTag) {\n                if (--count==0) {\n                    do_yield();\n                    count = 256;\n                }\n            }\n        }\n    }\n    MALLOC_ASSERT( publicFreeList.load(std::memory_order_relaxed) !=nullptr, ASSERT_TEXT );\n    // now it is safe to change our data\n    previous = nullptr;\n    // it is caller responsibility to ensure that the list of blocks\n    // formed by nextPrivatizable pointers is kept consistent if required.\n    // if only called from thread shutdown code, it does not matter.\n    nextPrivatizable.store((Block*)UNUSABLE, std::memory_order_relaxed);\n}\n\nvoid Block::cleanBlockHeader()\n{\n    next = nullptr;\n    previous = nullptr;\n    freeList = nullptr;\n    allocatedCount = 0;\n    isFull = false;\n    tlsPtr.store(nullptr, std::memory_order_relaxed);\n\n    publicFreeList.store(nullptr, std::memory_order_relaxed);\n}\n\nvoid Block::initEmptyBlock(TLSData *tls, size_t size)\n{\n    // Having getIndex and getObjectSize called next to each other\n    // allows better compiler optimization as they basically share the code.\n    unsigned int index = getIndex(size);\n    unsigned int objSz = getObjectSize(size);\n\n    cleanBlockHeader();\n    MALLOC_ASSERT(objSz <= USHRT_MAX, \"objSz must not be less 2^16-1\");\n    objectSize = objSz;\n    markOwned(tls);\n    // bump pointer should be prepared for first allocation - thus mode it down to objectSize\n    bumpPtr = (FreeObject *)((uintptr_t)this + slabSize - objectSize);\n\n    // each block should have the address where the head of the list of \"privatizable\" blocks is kept\n    // the only exception is a block for boot strap which is initialized when TLS is yet nullptr\n    nextPrivatizable.store( tls? (Block*)(tls->bin + index) : nullptr, std::memory_order_relaxed);\n    TRACEF(( \"[ScalableMalloc trace] Empty block %p is initialized, owner is %ld, objectSize is %d, bumpPtr is %p\\n\",\n             this, tlsPtr.load(std::memory_order_relaxed) ? getThreadId() : -1, objectSize, bumpPtr ));\n}\n\nBlock *OrphanedBlocks::get(TLSData *tls, unsigned int size)\n{\n    // TODO: try to use index from getAllocationBin\n    unsigned int index = getIndex(size);\n    Block *block = bins[index].pop();\n    if (block) {\n        MALLOC_ITT_SYNC_ACQUIRED(bins+index);\n        block->privatizeOrphaned(tls, index);\n    }\n    return block;\n}\n\nvoid OrphanedBlocks::put(intptr_t binTag, Block *block)\n{\n    unsigned int index = getIndex(block->getSize());\n    block->shareOrphaned(binTag, index);\n    MALLOC_ITT_SYNC_RELEASING(bins+index);\n    bins[index].push(block);\n}\n\nvoid OrphanedBlocks::reset()\n{\n    for (uint32_t i=0; i<numBlockBinLimit; i++)\n        new (bins+i) LifoList();\n}\n\nbool OrphanedBlocks::cleanup(Backend* backend)\n{\n    bool released = false;\n    for (uint32_t i=0; i<numBlockBinLimit; i++) {\n        Block* block = bins[i].grab();\n        MALLOC_ITT_SYNC_ACQUIRED(bins+i);\n        while (block) {\n            Block* next = block->next;\n            block->privatizePublicFreeList( /*reset=*/false ); // do not set publicFreeList to nullptr\n            if (block->empty()) {\n                block->reset();\n                // slab blocks in user's pools do not have valid backRefIdx\n                if (!backend->inUserPool())\n                    removeBackRef(*(block->getBackRefIdx()));\n                backend->putSlabBlock(block);\n                released = true;\n            } else {\n                MALLOC_ITT_SYNC_RELEASING(bins+i);\n                bins[i].push(block);\n            }\n            block = next;\n        }\n    }\n    return released;\n}\n\nFreeBlockPool::ResOfGet FreeBlockPool::getBlock()\n{\n    Block *b = head.exchange(nullptr);\n    bool lastAccessMiss;\n\n    if (b) {\n        size--;\n        Block *newHead = b->next;\n        lastAccessMiss = false;\n        head.store(newHead, std::memory_order_release);\n    } else {\n        lastAccessMiss = true;\n    }\n    return ResOfGet(b, lastAccessMiss);\n}\n\nvoid FreeBlockPool::returnBlock(Block *block)\n{\n    MALLOC_ASSERT( size <= POOL_HIGH_MARK, ASSERT_TEXT );\n    Block *localHead = head.exchange(nullptr);\n\n    if (!localHead) {\n        size = 0; // head was stolen by externalClean, correct size accordingly\n    } else if (size == POOL_HIGH_MARK) {\n        // release cold blocks and add hot one,\n        // so keep POOL_LOW_MARK-1 blocks and add new block to head\n        Block *headToFree = localHead, *helper;\n        for (int i=0; i<POOL_LOW_MARK-2; i++)\n            headToFree = headToFree->next;\n        Block *last = headToFree;\n        headToFree = headToFree->next;\n        last->next = nullptr;\n        size = POOL_LOW_MARK-1;\n        for (Block *currBl = headToFree; currBl; currBl = helper) {\n            helper = currBl->next;\n            // slab blocks in user's pools do not have valid backRefIdx\n            if (!backend->inUserPool())\n                removeBackRef(currBl->backRefIdx);\n            backend->putSlabBlock(currBl);\n        }\n    }\n    size++;\n    block->next = localHead;\n    head.store(block, std::memory_order_release);\n}\n\nbool FreeBlockPool::externalCleanup()\n{\n    Block *helper;\n    bool released = false;\n\n    for (Block *currBl=head.exchange(nullptr); currBl; currBl=helper) {\n        helper = currBl->next;\n        // slab blocks in user's pools do not have valid backRefIdx\n        if (!backend->inUserPool())\n            removeBackRef(currBl->backRefIdx);\n        backend->putSlabBlock(currBl);\n        released = true;\n    }\n    return released;\n}\n\n/* Prepare the block for returning to FreeBlockPool */\nvoid Block::reset()\n{\n    // it is caller's responsibility to ensure no data is lost before calling this\n    MALLOC_ASSERT( allocatedCount==0, ASSERT_TEXT );\n    MALLOC_ASSERT( !isSolidPtr(publicFreeList.load(std::memory_order_relaxed)), ASSERT_TEXT );\n    if (!isStartupAllocObject())\n        STAT_increment(getThreadId(), getIndex(objectSize), freeBlockBack);\n\n    cleanBlockHeader();\n\n    nextPrivatizable.store(nullptr, std::memory_order_relaxed);\n\n    objectSize = 0;\n    // for an empty block, bump pointer should point right after the end of the block\n    bumpPtr = (FreeObject *)((uintptr_t)this + slabSize);\n}\n\ninline void Bin::setActiveBlock (Block *block)\n{\n//    MALLOC_ASSERT( bin, ASSERT_TEXT );\n    MALLOC_ASSERT( block->isOwnedByCurrentThread(), ASSERT_TEXT );\n    // it is the caller responsibility to keep bin consistence (i.e. ensure this block is in the bin list)\n    activeBlk = block;\n}\n\ninline Block* Bin::setPreviousBlockActive()\n{\n    MALLOC_ASSERT( activeBlk, ASSERT_TEXT );\n    Block* temp = activeBlk->previous;\n    if( temp ) {\n        MALLOC_ASSERT( !(temp->isFull), ASSERT_TEXT );\n        activeBlk = temp;\n    }\n    return temp;\n}\n\ninline bool Block::isOwnedByCurrentThread() const {\n    return tlsPtr.load(std::memory_order_relaxed) && ownerTid.isCurrentThreadId();\n}\n\nFreeObject *Block::findObjectToFree(const void *object) const\n{\n    FreeObject *objectToFree;\n    // Due to aligned allocations, a pointer passed to scalable_free\n    // might differ from the address of internally allocated object.\n    // Small objects however should always be fine.\n    if (objectSize <= maxSegregatedObjectSize)\n        objectToFree = (FreeObject*)object;\n    // \"Fitting size\" allocations are suspicious if aligned higher than naturally\n    else {\n        if ( ! isAligned(object,2*fittingAlignment) )\n            // TODO: the above check is questionable - it gives false negatives in ~50% cases,\n            //       so might even be slower in average than unconditional use of findAllocatedObject.\n            // here it should be a \"real\" object\n            objectToFree = (FreeObject*)object;\n        else\n            // here object can be an aligned address, so applying additional checks\n            objectToFree = findAllocatedObject(object);\n        MALLOC_ASSERT( isAligned(objectToFree,fittingAlignment), ASSERT_TEXT );\n    }\n    MALLOC_ASSERT( isProperlyPlaced(objectToFree), ASSERT_TEXT );\n\n    return objectToFree;\n}\n\nvoid TLSData::release()\n{\n    memPool->extMemPool.allLocalCaches.unregisterThread(this);\n    externalCleanup(/*cleanOnlyUnused=*/false, /*cleanBins=*/false);\n\n    for (unsigned index = 0; index < numBlockBins; index++) {\n        Block *activeBlk = bin[index].getActiveBlock();\n        if (!activeBlk)\n            continue;\n        Block *threadlessBlock = activeBlk->previous;\n        bool syncOnMailbox = false;\n        while (threadlessBlock) {\n            Block *threadBlock = threadlessBlock->previous;\n            if (threadlessBlock->empty()) {\n                /* we destroy the thread, so not use its block pool */\n                memPool->returnEmptyBlock(threadlessBlock, /*poolTheBlock=*/false);\n            } else {\n                memPool->extMemPool.orphanedBlocks.put(intptr_t(bin+index), threadlessBlock);\n                syncOnMailbox = true;\n            }\n            threadlessBlock = threadBlock;\n        }\n        threadlessBlock = activeBlk;\n        while (threadlessBlock) {\n            Block *threadBlock = threadlessBlock->next;\n            if (threadlessBlock->empty()) {\n                /* we destroy the thread, so not use its block pool */\n                memPool->returnEmptyBlock(threadlessBlock, /*poolTheBlock=*/false);\n            } else {\n                memPool->extMemPool.orphanedBlocks.put(intptr_t(bin+index), threadlessBlock);\n                syncOnMailbox = true;\n            }\n            threadlessBlock = threadBlock;\n        }\n        bin[index].resetActiveBlock();\n\n        if (syncOnMailbox) {\n            // Although, we synchronized on nextPrivatizable inside a block, we still need to\n            // synchronize on the bin lifetime because the thread releasing an object into the public\n            // free list is touching the bin (mailbox and mailLock)\n            MallocMutex::scoped_lock scoped_cs(bin[index].mailLock);\n        }\n    }\n}\n\n\n#if MALLOC_CHECK_RECURSION\n// TODO: Use dedicated heap for this\n\n/*\n * It's a special kind of allocation that can be used when malloc is\n * not available (either during startup or when malloc was already called and\n * we are, say, inside pthread_setspecific's call).\n * Block can contain objects of different sizes,\n * allocations are performed by moving bump pointer and increasing of object counter,\n * releasing is done via counter of objects allocated in the block\n * or moving bump pointer if releasing object is on a bound.\n * TODO: make bump pointer to grow to the same backward direction as all the others.\n */\n\nclass StartupBlock : public Block {\n    size_t availableSize() const {\n        return slabSize - ((uintptr_t)bumpPtr - (uintptr_t)this);\n    }\n    static StartupBlock *getBlock();\npublic:\n    static FreeObject *allocate(size_t size);\n    static size_t msize(void *ptr) { return *((size_t*)ptr - 1); }\n    void free(void *ptr);\n};\n\nstatic MallocMutex startupMallocLock;\nstatic StartupBlock *firstStartupBlock;\n\nStartupBlock *StartupBlock::getBlock()\n{\n    BackRefIdx backRefIdx = BackRefIdx::newBackRef(/*largeObj=*/false);\n    if (backRefIdx.isInvalid()) return nullptr;\n\n    StartupBlock *block = static_cast<StartupBlock*>(\n        defaultMemPool->extMemPool.backend.getSlabBlock(1));\n    if (!block) return nullptr;\n\n    block->cleanBlockHeader();\n    setBackRef(backRefIdx, block);\n    block->backRefIdx = backRefIdx;\n    // use startupAllocObjSizeMark to mark objects from startup block marker\n    block->objectSize = startupAllocObjSizeMark;\n    block->bumpPtr = (FreeObject *)((uintptr_t)block + sizeof(StartupBlock));\n    return block;\n}\n\nFreeObject *StartupBlock::allocate(size_t size)\n{\n    FreeObject *result;\n    StartupBlock *newBlock = nullptr;\n\n    /* Objects must be aligned on their natural bounds,\n       and objects bigger than word on word's bound. */\n    size = alignUp(size, sizeof(size_t));\n    // We need size of an object to implement msize.\n    size_t reqSize = size + sizeof(size_t);\n    {\n        MallocMutex::scoped_lock scoped_cs(startupMallocLock);\n        // Re-check whether we need a new block (conditions might have changed)\n        if (!firstStartupBlock || firstStartupBlock->availableSize() < reqSize) {\n            if (!newBlock) {\n                newBlock = StartupBlock::getBlock();\n                if (!newBlock) return nullptr;\n            }\n            newBlock->next = (Block*)firstStartupBlock;\n            if (firstStartupBlock)\n                firstStartupBlock->previous = (Block*)newBlock;\n            firstStartupBlock = newBlock;\n        }\n        result = firstStartupBlock->bumpPtr;\n        firstStartupBlock->allocatedCount++;\n        firstStartupBlock->bumpPtr =\n            (FreeObject *)((uintptr_t)firstStartupBlock->bumpPtr + reqSize);\n    }\n\n    // keep object size at the negative offset\n    *((size_t*)result) = size;\n    return (FreeObject*)((size_t*)result+1);\n}\n\nvoid StartupBlock::free(void *ptr)\n{\n    Block* blockToRelease = nullptr;\n    {\n        MallocMutex::scoped_lock scoped_cs(startupMallocLock);\n\n        MALLOC_ASSERT(firstStartupBlock, ASSERT_TEXT);\n        MALLOC_ASSERT(startupAllocObjSizeMark==objectSize\n                      && allocatedCount>0, ASSERT_TEXT);\n        MALLOC_ASSERT((uintptr_t)ptr>=(uintptr_t)this+sizeof(StartupBlock)\n                      && (uintptr_t)ptr+StartupBlock::msize(ptr)<=(uintptr_t)this+slabSize,\n                      ASSERT_TEXT);\n        if (0 == --allocatedCount) {\n            if (this == firstStartupBlock)\n                firstStartupBlock = (StartupBlock*)firstStartupBlock->next;\n            if (previous)\n                previous->next = next;\n            if (next)\n                next->previous = previous;\n            blockToRelease = this;\n        } else if ((uintptr_t)ptr + StartupBlock::msize(ptr) == (uintptr_t)bumpPtr) {\n            // last object in the block released\n            FreeObject *newBump = (FreeObject*)((size_t*)ptr - 1);\n            MALLOC_ASSERT((uintptr_t)newBump>(uintptr_t)this+sizeof(StartupBlock),\n                          ASSERT_TEXT);\n            bumpPtr = newBump;\n        }\n    }\n    if (blockToRelease) {\n        blockToRelease->previous = blockToRelease->next = nullptr;\n        defaultMemPool->returnEmptyBlock(blockToRelease, /*poolTheBlock=*/false);\n    }\n}\n\n#endif /* MALLOC_CHECK_RECURSION */\n\n/********* End thread related code  *************/\n\n/********* Library initialization *************/\n\n//! Value indicating the state of initialization.\n/* 0 = initialization not started.\n * 1 = initialization started but not finished.\n * 2 = initialization finished.\n * In theory, we only need values 0 and 2. But value 1 is nonetheless\n * useful for detecting errors in the double-check pattern.\n */\nstatic std::atomic<intptr_t> mallocInitialized{0};   // implicitly initialized to 0\nstatic MallocMutex initMutex;\n\n/** The leading \"\\0\" is here so that applying \"strings\" to the binary\n    delivers a clean result. */\nstatic char VersionString[] = \"\\0\" TBBMALLOC_VERSION_STRINGS;\n\n#if USE_PTHREAD && __TBB_SOURCE_DIRECTLY_INCLUDED\n\n/* Decrease race interval between dynamic library unloading and pthread key\n   destructor. Protect only Pthreads with supported unloading. */\nclass ShutdownSync {\n/* flag is the number of threads in pthread key dtor body\n   (i.e., between threadDtorStart() and threadDtorDone())\n   or the signal to skip dtor, if flag < 0 */\n    std::atomic<intptr_t> flag;\n    static const intptr_t skipDtor = INTPTR_MIN/2;\npublic:\n    void init() { flag.store(0, std::memory_order_release); }\n/* Suppose that 2*abs(skipDtor) or more threads never call threadDtorStart()\n   simultaneously, so flag never becomes negative because of that. */\n    bool threadDtorStart() {\n        if (flag.load(std::memory_order_acquire) < 0)\n            return false;\n        if (++flag <= 0) { // note that new value returned\n            flag.fetch_sub(1); // flag is spoiled by us, restore it\n            return false;\n        }\n        return true;\n    }\n    void threadDtorDone() {\n        flag.fetch_sub(1);\n    }\n    void processExit() {\n        if (flag.fetch_add(skipDtor) != 0) {\n            SpinWaitUntilEq(flag, skipDtor);\n        }\n    }\n};\n\n#else\n\nclass ShutdownSync {\npublic:\n    void init() { }\n    bool threadDtorStart() { return true; }\n    void threadDtorDone() { }\n    void processExit() { }\n};\n\n#endif // USE_PTHREAD && __TBB_SOURCE_DIRECTLY_INCLUDED\n\nstatic ShutdownSync shutdownSync;\n\ninline bool isMallocInitialized() {\n    // Load must have acquire fence; otherwise thread taking \"initialized\" path\n    // might perform textually later loads *before* mallocInitialized becomes 2.\n    return 2 == mallocInitialized.load(std::memory_order_acquire);\n}\n\n/* Caller is responsible for ensuring this routine is called exactly once. */\nextern \"C\" void MallocInitializeITT() {\n#if __TBB_USE_ITT_NOTIFY\n    if (!usedBySrcIncluded)\n        tbb::detail::r1::__TBB_load_ittnotify();\n#endif\n}\n\nvoid MemoryPool::initDefaultPool() {\n    hugePages.init();\n}\n\n/*\n * Allocator initialization routine;\n * it is called lazily on the very first scalable_malloc call.\n */\nstatic bool initMemoryManager()\n{\n    TRACEF(( \"[ScalableMalloc trace] sizeof(Block) is %d (expected 128); sizeof(uintptr_t) is %d\\n\",\n             sizeof(Block), sizeof(uintptr_t) ));\n    MALLOC_ASSERT( 2*blockHeaderAlignment == sizeof(Block), ASSERT_TEXT );\n    MALLOC_ASSERT( sizeof(FreeObject) == sizeof(void*), ASSERT_TEXT );\n    MALLOC_ASSERT( isAligned(defaultMemPool, sizeof(intptr_t)),\n                   \"Memory pool must be void*-aligned for atomic to work over aligned arguments.\");\n\n#if USE_WINTHREAD\n    const size_t granularity = 64*1024; // granulatity of VirtualAlloc\n#else\n    // POSIX.1-2001-compliant way to get page size\n    const size_t granularity = sysconf(_SC_PAGESIZE);\n#endif\n    if (!defaultMemPool) {\n        // Do not rely on static constructors and do the assignment in case\n        // of library static section not initialized at this call yet.\n        defaultMemPool = (MemoryPool*)defaultMemPool_space;\n    }\n    bool initOk = defaultMemPool->\n        extMemPool.init(0, nullptr, nullptr, granularity,\n                        /*keepAllMemory=*/false, /*fixedPool=*/false);\n// TODO: extMemPool.init() to not allocate memory\n    if (!initOk || !initBackRefMain(&defaultMemPool->extMemPool.backend) || !ThreadId::init())\n        return false;\n    MemoryPool::initDefaultPool();\n    // init() is required iff initMemoryManager() is called\n    // after mallocProcessShutdownNotification()\n    shutdownSync.init();\n#if COLLECT_STATISTICS\n    initStatisticsCollection();\n#endif\n    return true;\n}\n\nstatic bool GetBoolEnvironmentVariable(const char* name) {\n    return tbb::detail::r1::GetBoolEnvironmentVariable(name);\n}\n\n//! Ensures that initMemoryManager() is called once and only once.\n/** Does not return until initMemoryManager() has been completed by a thread.\n    There is no need to call this routine if mallocInitialized==2 . */\nstatic bool doInitialization()\n{\n    MallocMutex::scoped_lock lock( initMutex );\n    if (mallocInitialized.load(std::memory_order_relaxed)!=2) {\n        MALLOC_ASSERT( mallocInitialized.load(std::memory_order_relaxed)==0, ASSERT_TEXT );\n        mallocInitialized.store(1, std::memory_order_relaxed);\n        RecursiveMallocCallProtector scoped;\n        if (!initMemoryManager()) {\n            mallocInitialized.store(0, std::memory_order_relaxed); // restore and out\n            return false;\n        }\n#ifdef  MALLOC_EXTRA_INITIALIZATION\n        MALLOC_EXTRA_INITIALIZATION;\n#endif\n#if MALLOC_CHECK_RECURSION\n        RecursiveMallocCallProtector::detectNaiveOverload();\n#endif\n        MALLOC_ASSERT( mallocInitialized.load(std::memory_order_relaxed)==1, ASSERT_TEXT );\n        // Store must have release fence, otherwise mallocInitialized==2\n        // might become remotely visible before side effects of\n        // initMemoryManager() become remotely visible.\n        mallocInitialized.store(2, std::memory_order_release);\n        if( GetBoolEnvironmentVariable(\"TBB_VERSION\") ) {\n            fputs(VersionString+1,stderr);\n            hugePages.printStatus();\n        }\n    }\n    /* It can't be 0 or I would have initialized it */\n    MALLOC_ASSERT( mallocInitialized.load(std::memory_order_relaxed)==2, ASSERT_TEXT );\n    return true;\n}\n\n/********* End library initialization *************/\n\n/********* The malloc show begins     *************/\n\n\nFreeObject *Block::allocateFromFreeList()\n{\n    FreeObject *result;\n\n    if (!freeList) return nullptr;\n\n    result = freeList;\n    MALLOC_ASSERT( result, ASSERT_TEXT );\n\n    freeList = result->next;\n    MALLOC_ASSERT( allocatedCount < (slabSize-sizeof(Block))/objectSize, ASSERT_TEXT );\n    allocatedCount++;\n    STAT_increment(getThreadId(), getIndex(objectSize), allocFreeListUsed);\n\n    return result;\n}\n\nFreeObject *Block::allocateFromBumpPtr()\n{\n    FreeObject *result = bumpPtr;\n    if (result) {\n        bumpPtr = (FreeObject *) ((uintptr_t) bumpPtr - objectSize);\n        if ( (uintptr_t)bumpPtr < (uintptr_t)this+sizeof(Block) ) {\n            bumpPtr = nullptr;\n        }\n        MALLOC_ASSERT( allocatedCount < (slabSize-sizeof(Block))/objectSize, ASSERT_TEXT );\n        allocatedCount++;\n        STAT_increment(getThreadId(), getIndex(objectSize), allocBumpPtrUsed);\n    }\n    return result;\n}\n\ninline FreeObject* Block::allocate()\n{\n    MALLOC_ASSERT( isOwnedByCurrentThread(), ASSERT_TEXT );\n\n    /* for better cache locality, first looking in the free list. */\n    if ( FreeObject *result = allocateFromFreeList() ) {\n        return result;\n    }\n    MALLOC_ASSERT( !freeList, ASSERT_TEXT );\n\n    /* if free list is empty, try thread local bump pointer allocation. */\n    if ( FreeObject *result = allocateFromBumpPtr() ) {\n        return result;\n    }\n    MALLOC_ASSERT( !bumpPtr, ASSERT_TEXT );\n\n    /* the block is considered full. */\n    isFull = true;\n    return nullptr;\n}\n\nsize_t Block::findObjectSize(void *object) const\n{\n    size_t blSize = getSize();\n#if MALLOC_CHECK_RECURSION\n    // Currently, there is no aligned allocations from startup blocks,\n    // so we can return just StartupBlock::msize().\n    // TODO: This must be extended if we add aligned allocation from startup blocks.\n    if (!blSize)\n        return StartupBlock::msize(object);\n#endif\n    // object can be aligned, so real size can be less than block's\n    size_t size =\n        blSize - ((uintptr_t)object - (uintptr_t)findObjectToFree(object));\n    MALLOC_ASSERT(size>0 && size<minLargeObjectSize, ASSERT_TEXT);\n    return size;\n}\n\nvoid Bin::moveBlockToFront(Block *block)\n{\n    /* move the block to the front of the bin */\n    if (block == activeBlk) return;\n    outofTLSBin(block);\n    pushTLSBin(block);\n}\n\nvoid Bin::processEmptyBlock(Block *block, bool poolTheBlock)\n{\n    if (block != activeBlk) {\n        /* We are not using this block; return it to the pool */\n        outofTLSBin(block);\n        block->getMemPool()->returnEmptyBlock(block, poolTheBlock);\n    } else {\n        /* all objects are free - let's restore the bump pointer */\n        block->restoreBumpPtr();\n    }\n}\n\ntemplate<int LOW_MARK, int HIGH_MARK>\nbool LocalLOCImpl<LOW_MARK, HIGH_MARK>::put(LargeMemoryBlock *object, ExtMemoryPool *extMemPool)\n{\n    const size_t size = object->unalignedSize;\n    // not spoil cache with too large object, that can cause its total cleanup\n    if (size > MAX_TOTAL_SIZE)\n        return false;\n    LargeMemoryBlock *localHead = head.exchange(nullptr);\n\n    object->prev = nullptr;\n    object->next = localHead;\n    if (localHead)\n        localHead->prev = object;\n    else {\n        // those might not be cleaned during local cache stealing, correct them\n        totalSize = 0;\n        numOfBlocks = 0;\n        tail = object;\n    }\n    localHead = object;\n    totalSize += size;\n    numOfBlocks++;\n    // must meet both size and number of cached objects constrains\n    if (totalSize > MAX_TOTAL_SIZE || numOfBlocks >= HIGH_MARK) {\n        // scanning from tail until meet conditions\n        while (totalSize > MAX_TOTAL_SIZE || numOfBlocks > LOW_MARK) {\n            totalSize -= tail->unalignedSize;\n            numOfBlocks--;\n            tail = tail->prev;\n        }\n        LargeMemoryBlock *headToRelease = tail->next;\n        tail->next = nullptr;\n\n        extMemPool->freeLargeObjectList(headToRelease);\n    }\n\n    head.store(localHead, std::memory_order_release);\n    return true;\n}\n\ntemplate<int LOW_MARK, int HIGH_MARK>\nLargeMemoryBlock *LocalLOCImpl<LOW_MARK, HIGH_MARK>::get(size_t size)\n{\n    LargeMemoryBlock *localHead, *res = nullptr;\n\n    if (size > MAX_TOTAL_SIZE)\n        return nullptr;\n\n    // TBB_REVAMP_TODO: review this line\n    if (!head.load(std::memory_order_acquire) || (localHead = head.exchange(nullptr)) == nullptr) {\n        // do not restore totalSize, numOfBlocks and tail at this point,\n        // as they are used only in put(), where they must be restored\n        return nullptr;\n    }\n\n    for (LargeMemoryBlock *curr = localHead; curr; curr=curr->next) {\n        if (curr->unalignedSize == size) {\n            res = curr;\n            if (curr->next)\n                curr->next->prev = curr->prev;\n            else\n                tail = curr->prev;\n            if (curr != localHead)\n                curr->prev->next = curr->next;\n            else\n                localHead = curr->next;\n            totalSize -= size;\n            numOfBlocks--;\n            break;\n        }\n    }\n\n    head.store(localHead, std::memory_order_release);\n    return res;\n}\n\ntemplate<int LOW_MARK, int HIGH_MARK>\nbool LocalLOCImpl<LOW_MARK, HIGH_MARK>::externalCleanup(ExtMemoryPool *extMemPool)\n{\n    if (LargeMemoryBlock *localHead = head.exchange(nullptr)) {\n        extMemPool->freeLargeObjectList(localHead);\n        return true;\n    }\n    return false;\n}\n\nvoid *MemoryPool::getFromLLOCache(TLSData* tls, size_t size, size_t alignment)\n{\n    LargeMemoryBlock *lmb = nullptr;\n\n    size_t headersSize = sizeof(LargeMemoryBlock)+sizeof(LargeObjectHdr);\n    size_t allocationSize = LargeObjectCache::alignToBin(size+headersSize+alignment);\n    if (allocationSize < size) // allocationSize is wrapped around after alignToBin\n        return nullptr;\n    MALLOC_ASSERT(allocationSize >= alignment, \"Overflow must be checked before.\");\n\n    if (tls) {\n        tls->markUsed();\n        lmb = tls->lloc.get(allocationSize);\n    }\n    if (!lmb)\n        lmb = extMemPool.mallocLargeObject(this, allocationSize);\n\n    if (lmb) {\n        // doing shuffle we suppose that alignment offset guarantees\n        // that different cache lines are in use\n        MALLOC_ASSERT(alignment >= estimatedCacheLineSize, ASSERT_TEXT);\n\n        void *alignedArea = (void*)alignUp((uintptr_t)lmb+headersSize, alignment);\n        uintptr_t alignedRight =\n            alignDown((uintptr_t)lmb+lmb->unalignedSize - size, alignment);\n        // Has some room to shuffle object between cache lines?\n        // Note that alignedRight and alignedArea are aligned at alignment.\n        unsigned ptrDelta = alignedRight - (uintptr_t)alignedArea;\n        if (ptrDelta && tls) { // !tls is cold path\n            // for the hot path of alignment==estimatedCacheLineSize,\n            // allow compilers to use shift for division\n            // (since estimatedCacheLineSize is a power-of-2 constant)\n            unsigned numOfPossibleOffsets = alignment == estimatedCacheLineSize?\n                  ptrDelta / estimatedCacheLineSize :\n                  ptrDelta / alignment;\n            unsigned myCacheIdx = ++tls->currCacheIdx;\n            unsigned offset = myCacheIdx % numOfPossibleOffsets;\n\n            // Move object to a cache line with an offset that is different from\n            // previous allocation. This supposedly allows us to use cache\n            // associativity more efficiently.\n            alignedArea = (void*)((uintptr_t)alignedArea + offset*alignment);\n        }\n        MALLOC_ASSERT((uintptr_t)lmb+lmb->unalignedSize >=\n                      (uintptr_t)alignedArea+size, \"Object doesn't fit the block.\");\n        LargeObjectHdr *header = (LargeObjectHdr*)alignedArea-1;\n        header->memoryBlock = lmb;\n        header->backRefIdx = lmb->backRefIdx;\n        setBackRef(header->backRefIdx, header);\n\n        lmb->objectSize = size;\n\n        MALLOC_ASSERT( isLargeObject<unknownMem>(alignedArea), ASSERT_TEXT );\n        MALLOC_ASSERT( isAligned(alignedArea, alignment), ASSERT_TEXT );\n\n        return alignedArea;\n    }\n    return nullptr;\n}\n\nvoid MemoryPool::putToLLOCache(TLSData *tls, void *object)\n{\n    LargeObjectHdr *header = (LargeObjectHdr*)object - 1;\n    // overwrite backRefIdx to simplify double free detection\n    header->backRefIdx = BackRefIdx();\n\n    if (tls) {\n        tls->markUsed();\n        if (tls->lloc.put(header->memoryBlock, &extMemPool))\n            return;\n    }\n    extMemPool.freeLargeObject(header->memoryBlock);\n}\n\n/*\n * All aligned allocations fall into one of the following categories:\n *  1. if both request size and alignment are <= maxSegregatedObjectSize,\n *       we just align the size up, and request this amount, because for every size\n *       aligned to some power of 2, the allocated object is at least that aligned.\n * 2. for size<minLargeObjectSize, check if already guaranteed fittingAlignment is enough.\n * 3. if size+alignment<minLargeObjectSize, we take an object of fittingSizeN and align\n *       its address up; given such pointer, scalable_free could find the real object.\n *       Wrapping of size+alignment is impossible because maximal allowed\n *       alignment plus minLargeObjectSize can't lead to wrapping.\n * 4. otherwise, aligned large object is allocated.\n */\nstatic void *allocateAligned(MemoryPool *memPool, size_t size, size_t alignment)\n{\n    MALLOC_ASSERT( isPowerOfTwo(alignment), ASSERT_TEXT );\n\n    if (!isMallocInitialized())\n        if (!doInitialization())\n            return nullptr;\n\n    void *result;\n    if (size<=maxSegregatedObjectSize && alignment<=maxSegregatedObjectSize)\n        result = internalPoolMalloc(memPool, alignUp(size? size: sizeof(size_t), alignment));\n    else if (size<minLargeObjectSize) {\n        if (alignment<=fittingAlignment)\n            result = internalPoolMalloc(memPool, size);\n        else if (size+alignment < minLargeObjectSize) {\n            void *unaligned = internalPoolMalloc(memPool, size+alignment);\n            if (!unaligned) return nullptr;\n            result = alignUp(unaligned, alignment);\n        } else\n            goto LargeObjAlloc;\n    } else {\n    LargeObjAlloc:\n        TLSData *tls = memPool->getTLS(/*create=*/true);\n        // take into account only alignment that are higher then natural\n        result =\n            memPool->getFromLLOCache(tls, size, largeObjectAlignment>alignment?\n                                               largeObjectAlignment: alignment);\n    }\n\n    MALLOC_ASSERT( isAligned(result, alignment), ASSERT_TEXT );\n    return result;\n}\n\nstatic void *reallocAligned(MemoryPool *memPool, void *ptr,\n                            size_t newSize, size_t alignment = 0)\n{\n    void *result;\n    size_t copySize;\n\n    if (isLargeObject<ourMem>(ptr)) {\n        LargeMemoryBlock* lmb = ((LargeObjectHdr *)ptr - 1)->memoryBlock;\n        copySize = lmb->unalignedSize-((uintptr_t)ptr-(uintptr_t)lmb);\n\n        // Apply different strategies if size decreases\n        if (newSize <= copySize && (0 == alignment || isAligned(ptr, alignment))) {\n\n            // For huge objects (that do not fit in backend cache), keep the same space unless\n            // the new size is at least twice smaller\n            bool isMemoryBlockHuge = copySize > memPool->extMemPool.backend.getMaxBinnedSize();\n            size_t threshold = isMemoryBlockHuge ? copySize / 2 : 0;\n            if (newSize > threshold) {\n                lmb->objectSize = newSize;\n                return ptr;\n            }\n            // TODO: For large objects suitable for the backend cache,\n            // split out the excessive part and put it to the backend.\n        }\n        // Reallocate for real\n        copySize = lmb->objectSize;\n#if BACKEND_HAS_MREMAP\n        if (void *r = memPool->extMemPool.remap(ptr, copySize, newSize,\n                          alignment < largeObjectAlignment ? largeObjectAlignment : alignment))\n            return r;\n#endif\n        result = alignment ? allocateAligned(memPool, newSize, alignment) :\n            internalPoolMalloc(memPool, newSize);\n\n    } else {\n        Block* block = (Block *)alignDown(ptr, slabSize);\n        copySize = block->findObjectSize(ptr);\n\n        // TODO: Move object to another bin if size decreases and the current bin is \"empty enough\".\n        // Currently, in case of size decreasing, old pointer is returned\n        if (newSize <= copySize && (0==alignment || isAligned(ptr, alignment))) {\n            return ptr;\n        } else {\n            result = alignment ? allocateAligned(memPool, newSize, alignment) :\n                internalPoolMalloc(memPool, newSize);\n        }\n    }\n    if (result) {\n        memcpy(result, ptr, copySize < newSize ? copySize : newSize);\n        internalPoolFree(memPool, ptr, 0);\n    }\n    return result;\n}\n\n#if MALLOC_DEBUG\n/* A predicate checks if an object is properly placed inside its block */\ninline bool Block::isProperlyPlaced(const void *object) const\n{\n    return 0 == ((uintptr_t)this + slabSize - (uintptr_t)object) % objectSize;\n}\n#endif\n\n/* Finds the real object inside the block */\nFreeObject *Block::findAllocatedObject(const void *address) const\n{\n    // calculate offset from the end of the block space\n    uint16_t offset = (uintptr_t)this + slabSize - (uintptr_t)address;\n    MALLOC_ASSERT( offset<=slabSize-sizeof(Block), ASSERT_TEXT );\n    // find offset difference from a multiple of allocation size\n    offset %= objectSize;\n    // and move the address down to where the real object starts.\n    return (FreeObject*)((uintptr_t)address - (offset? objectSize-offset: 0));\n}\n\n/*\n * Bad dereference caused by a foreign pointer is possible only here, not earlier in call chain.\n * Separate function isolates SEH code, as it has bad influence on compiler optimization.\n */\nstatic inline BackRefIdx safer_dereference (const BackRefIdx *ptr)\n{\n    BackRefIdx id;\n#if _MSC_VER\n    __try {\n#endif\n        id = dereference(ptr);\n#if _MSC_VER\n    } __except( GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION?\n                EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH ) {\n        id = BackRefIdx();\n    }\n#endif\n    return id;\n}\n\ntemplate<MemoryOrigin memOrigin>\nbool isLargeObject(void *object)\n{\n    if (!isAligned(object, largeObjectAlignment))\n        return false;\n    LargeObjectHdr *header = (LargeObjectHdr*)object - 1;\n    BackRefIdx idx = (memOrigin == unknownMem) ?\n        safer_dereference(&header->backRefIdx) : dereference(&header->backRefIdx);\n\n    return idx.isLargeObject()\n        // in valid LargeObjectHdr memoryBlock is not nullptr\n        && header->memoryBlock\n        // in valid LargeObjectHdr memoryBlock points somewhere before header\n        // TODO: more strict check\n        && (uintptr_t)header->memoryBlock < (uintptr_t)header\n        && getBackRef(idx) == header;\n}\n\nstatic inline bool isSmallObject (void *ptr)\n{\n    Block* expectedBlock = (Block*)alignDown(ptr, slabSize);\n    const BackRefIdx* idx = expectedBlock->getBackRefIdx();\n\n    bool isSmall = expectedBlock == getBackRef(safer_dereference(idx));\n    if (isSmall)\n        expectedBlock->checkFreePrecond(ptr);\n    return isSmall;\n}\n\n/**** Check if an object was allocated by scalable_malloc ****/\nstatic inline bool isRecognized (void* ptr)\n{\n    return defaultMemPool->extMemPool.backend.ptrCanBeValid(ptr) &&\n        (isLargeObject<unknownMem>(ptr) || isSmallObject(ptr));\n}\n\nstatic inline void freeSmallObject(void *object)\n{\n    /* mask low bits to get the block */\n    Block *block = (Block *)alignDown(object, slabSize);\n    block->checkFreePrecond(object);\n\n#if MALLOC_CHECK_RECURSION\n    if (block->isStartupAllocObject()) {\n        ((StartupBlock *)block)->free(object);\n        return;\n    }\n#endif\n    if (block->isOwnedByCurrentThread()) {\n        block->freeOwnObject(object);\n    } else { /* Slower path to add to the shared list, the allocatedCount is updated by the owner thread in malloc. */\n        FreeObject *objectToFree = block->findObjectToFree(object);\n        block->freePublicObject(objectToFree);\n    }\n}\n\nstatic void *internalPoolMalloc(MemoryPool* memPool, size_t size)\n{\n    Bin* bin;\n    Block * mallocBlock;\n\n    if (!memPool) return nullptr;\n\n    if (!size) size = sizeof(size_t);\n\n    TLSData *tls = memPool->getTLS(/*create=*/true);\n\n    /* Allocate a large object */\n    if (size >= minLargeObjectSize)\n        return memPool->getFromLLOCache(tls, size, largeObjectAlignment);\n\n    if (!tls) return nullptr;\n\n    tls->markUsed();\n    /*\n     * Get an element in thread-local array corresponding to the given size;\n     * It keeps ptr to the active block for allocations of this size\n     */\n    bin = tls->getAllocationBin(size);\n    if ( !bin ) return nullptr;\n\n    /* Get a block to try to allocate in. */\n    for( mallocBlock = bin->getActiveBlock(); mallocBlock;\n         mallocBlock = bin->setPreviousBlockActive() ) // the previous block should be empty enough\n    {\n        if( FreeObject *result = mallocBlock->allocate() )\n            return result;\n    }\n\n    /*\n     * else privatize publicly freed objects in some block and allocate from it\n     */\n    mallocBlock = bin->getPrivatizedFreeListBlock();\n    if (mallocBlock) {\n        MALLOC_ASSERT( mallocBlock->freeListNonNull(), ASSERT_TEXT );\n        if ( FreeObject *result = mallocBlock->allocateFromFreeList() )\n            return result;\n        /* Else something strange happened, need to retry from the beginning; */\n        TRACEF(( \"[ScalableMalloc trace] Something is wrong: no objects in public free list; reentering.\\n\" ));\n        return internalPoolMalloc(memPool, size);\n    }\n\n    /*\n     * no suitable own blocks, try to get a partial block that some other thread has discarded.\n     */\n    mallocBlock = memPool->extMemPool.orphanedBlocks.get(tls, size);\n    while (mallocBlock) {\n        bin->pushTLSBin(mallocBlock);\n        bin->setActiveBlock(mallocBlock); // TODO: move under the below condition?\n        if( FreeObject *result = mallocBlock->allocate() )\n            return result;\n        mallocBlock = memPool->extMemPool.orphanedBlocks.get(tls, size);\n    }\n\n    /*\n     * else try to get a new empty block\n     */\n    mallocBlock = memPool->getEmptyBlock(size);\n    if (mallocBlock) {\n        bin->pushTLSBin(mallocBlock);\n        bin->setActiveBlock(mallocBlock);\n        if( FreeObject *result = mallocBlock->allocate() )\n            return result;\n        /* Else something strange happened, need to retry from the beginning; */\n        TRACEF(( \"[ScalableMalloc trace] Something is wrong: no objects in empty block; reentering.\\n\" ));\n        return internalPoolMalloc(memPool, size);\n    }\n    /*\n     * else nothing works so return nullptr\n     */\n    TRACEF(( \"[ScalableMalloc trace] No memory found, returning nullptr.\\n\" ));\n    return nullptr;\n}\n\n// When size==0 (i.e. unknown), detect here whether the object is large.\n// For size is known and < minLargeObjectSize, we still need to check\n// if the actual object is large, because large objects might be used\n// for aligned small allocations.\nstatic bool internalPoolFree(MemoryPool *memPool, void *object, size_t size)\n{\n    if (!memPool || !object) return false;\n\n    // The library is initialized at allocation call, so releasing while\n    // not initialized means foreign object is releasing.\n    MALLOC_ASSERT(isMallocInitialized(), ASSERT_TEXT);\n    MALLOC_ASSERT(memPool->extMemPool.userPool() || isRecognized(object),\n                  \"Invalid pointer during object releasing is detected.\");\n\n    if (size >= minLargeObjectSize || isLargeObject<ourMem>(object))\n        memPool->putToLLOCache(memPool->getTLS(/*create=*/false), object);\n    else\n        freeSmallObject(object);\n    return true;\n}\n\nstatic void *internalMalloc(size_t size)\n{\n    if (!size) size = sizeof(size_t);\n\n#if MALLOC_CHECK_RECURSION\n    if (RecursiveMallocCallProtector::sameThreadActive())\n        return size<minLargeObjectSize? StartupBlock::allocate(size) :\n            // nested allocation, so skip tls\n            (FreeObject*)defaultMemPool->getFromLLOCache(nullptr, size, slabSize);\n#endif\n\n    if (!isMallocInitialized())\n        if (!doInitialization())\n            return nullptr;\n    return internalPoolMalloc(defaultMemPool, size);\n}\n\nstatic void internalFree(void *object)\n{\n    internalPoolFree(defaultMemPool, object, 0);\n}\n\nstatic size_t internalMsize(void* ptr)\n{\n    MALLOC_ASSERT(ptr, \"Invalid pointer passed to internalMsize\");\n    if (isLargeObject<ourMem>(ptr)) {\n        // TODO: return the maximum memory size, that can be written to this object\n        LargeMemoryBlock* lmb = ((LargeObjectHdr*)ptr - 1)->memoryBlock;\n        return lmb->objectSize;\n    } else {\n        Block *block = (Block*)alignDown(ptr, slabSize);\n        return block->findObjectSize(ptr);\n    }\n}\n\n} // namespace internal\n\nusing namespace rml::internal;\n\n// legacy entry point saved for compatibility with binaries complied\n// with pre-6003 versions of TBB\nTBBMALLOC_EXPORT rml::MemoryPool *pool_create(intptr_t pool_id, const MemPoolPolicy *policy)\n{\n    rml::MemoryPool *pool;\n    MemPoolPolicy pol(policy->pAlloc, policy->pFree, policy->granularity);\n\n    pool_create_v1(pool_id, &pol, &pool);\n    return pool;\n}\n\nrml::MemPoolError pool_create_v1(intptr_t pool_id, const MemPoolPolicy *policy,\n                                 rml::MemoryPool **pool)\n{\n    if ( !policy->pAlloc || policy->version<MemPoolPolicy::TBBMALLOC_POOL_VERSION\n         // empty pFree allowed only for fixed pools\n         || !(policy->fixedPool || policy->pFree)) {\n        *pool = nullptr;\n        return INVALID_POLICY;\n    }\n    if ( policy->version>MemPoolPolicy::TBBMALLOC_POOL_VERSION // future versions are not supported\n         // new flags can be added in place of reserved, but default\n         // behaviour must be supported by this version\n         || policy->reserved ) {\n        *pool = nullptr;\n        return UNSUPPORTED_POLICY;\n    }\n    if (!isMallocInitialized())\n        if (!doInitialization()) {\n            *pool = nullptr;\n            return NO_MEMORY;\n        }\n    rml::internal::MemoryPool *memPool =\n        (rml::internal::MemoryPool*)internalMalloc((sizeof(rml::internal::MemoryPool)));\n    if (!memPool) {\n        *pool = nullptr;\n        return NO_MEMORY;\n    }\n    memset(static_cast<void*>(memPool), 0, sizeof(rml::internal::MemoryPool));\n    if (!memPool->init(pool_id, policy)) {\n        internalFree(memPool);\n        *pool = nullptr;\n        return NO_MEMORY;\n    }\n\n    *pool = (rml::MemoryPool*)memPool;\n    return POOL_OK;\n}\n\nbool pool_destroy(rml::MemoryPool* memPool)\n{\n    if (!memPool) return false;\n    bool ret = ((rml::internal::MemoryPool*)memPool)->destroy();\n    internalFree(memPool);\n\n    return ret;\n}\n\nbool pool_reset(rml::MemoryPool* memPool)\n{\n    if (!memPool) return false;\n\n    return ((rml::internal::MemoryPool*)memPool)->reset();\n}\n\nvoid *pool_malloc(rml::MemoryPool* mPool, size_t size)\n{\n    return internalPoolMalloc((rml::internal::MemoryPool*)mPool, size);\n}\n\nvoid *pool_realloc(rml::MemoryPool* mPool, void *object, size_t size)\n{\n    if (!object)\n        return internalPoolMalloc((rml::internal::MemoryPool*)mPool, size);\n    if (!size) {\n        internalPoolFree((rml::internal::MemoryPool*)mPool, object, 0);\n        return nullptr;\n    }\n    return reallocAligned((rml::internal::MemoryPool*)mPool, object, size, 0);\n}\n\nvoid *pool_aligned_malloc(rml::MemoryPool* mPool, size_t size, size_t alignment)\n{\n    if (!isPowerOfTwo(alignment) || 0==size)\n        return nullptr;\n\n    return allocateAligned((rml::internal::MemoryPool*)mPool, size, alignment);\n}\n\nvoid *pool_aligned_realloc(rml::MemoryPool* memPool, void *ptr, size_t size, size_t alignment)\n{\n    if (!isPowerOfTwo(alignment))\n        return nullptr;\n    rml::internal::MemoryPool *mPool = (rml::internal::MemoryPool*)memPool;\n    void *tmp;\n\n    if (!ptr)\n        tmp = allocateAligned(mPool, size, alignment);\n    else if (!size) {\n        internalPoolFree(mPool, ptr, 0);\n        return nullptr;\n    } else\n        tmp = reallocAligned(mPool, ptr, size, alignment);\n\n    return tmp;\n}\n\nbool pool_free(rml::MemoryPool *mPool, void *object)\n{\n    return internalPoolFree((rml::internal::MemoryPool*)mPool, object, 0);\n}\n\nrml::MemoryPool *pool_identify(void *object)\n{\n    rml::internal::MemoryPool *pool;\n    if (isLargeObject<ourMem>(object)) {\n        LargeObjectHdr *header = (LargeObjectHdr*)object - 1;\n        pool = header->memoryBlock->pool;\n    } else {\n        Block *block = (Block*)alignDown(object, slabSize);\n        pool = block->getMemPool();\n    }\n    // do not return defaultMemPool, as it can't be used in pool_free() etc\n    __TBB_ASSERT_RELEASE(pool!=defaultMemPool,\n        \"rml::pool_identify() can't be used for scalable_malloc() etc results.\");\n    return (rml::MemoryPool*)pool;\n}\n\nsize_t pool_msize(rml::MemoryPool *mPool, void* object)\n{\n    if (object) {\n        // No assert for object recognition, cause objects allocated from non-default\n        // memory pool do not participate in range checking and do not have valid backreferences for\n        // small objects. Instead, check that an object belong to the certain memory pool.\n        MALLOC_ASSERT_EX(mPool == pool_identify(object), \"Object does not belong to the specified pool\");\n        return internalMsize(object);\n    }\n    errno = EINVAL;\n    // Unlike _msize, return 0 in case of parameter error.\n    // Returning size_t(-1) looks more like the way to troubles.\n    return 0;\n}\n\n} // namespace rml\n\nusing namespace rml::internal;\n\n#if MALLOC_TRACE\nstatic unsigned int threadGoingDownCount = 0;\n#endif\n\n/*\n * When a thread is shutting down this routine should be called to remove all the thread ids\n * from the malloc blocks and replace them with a nullptr thread id.\n *\n * For pthreads, the function is set as a callback in pthread_key_create for TLS bin.\n * It will be automatically called at thread exit with the key value as the argument,\n * unless that value is nullptr.\n * For Windows, it is called from DllMain( DLL_THREAD_DETACH ).\n *\n * However neither of the above is called for the main process thread, so the routine\n * also needs to be called during the process shutdown.\n *\n*/\n// TODO: Consider making this function part of class MemoryPool.\nvoid doThreadShutdownNotification(TLSData* tls, bool main_thread)\n{\n    TRACEF(( \"[ScalableMalloc trace] Thread id %d blocks return start %d\\n\",\n             getThreadId(),  threadGoingDownCount++ ));\n\n#if USE_PTHREAD\n    if (tls) {\n        if (!shutdownSync.threadDtorStart()) return;\n        tls->getMemPool()->onThreadShutdown(tls);\n        shutdownSync.threadDtorDone();\n    } else\n#endif\n    {\n        suppress_unused_warning(tls); // not used on Windows\n        // The default pool is safe to use at this point:\n        //   on Linux, only the main thread can go here before destroying defaultMemPool;\n        //   on Windows, shutdown is synchronized via loader lock and isMallocInitialized().\n        // See also __TBB_mallocProcessShutdownNotification()\n        defaultMemPool->onThreadShutdown(defaultMemPool->getTLS(/*create=*/false));\n        // Take lock to walk through other pools; but waiting might be dangerous at this point\n        // (e.g. on Windows the main thread might deadlock)\n        bool locked = false;\n        MallocMutex::scoped_lock lock(MemoryPool::memPoolListLock, /*wait=*/!main_thread, &locked);\n        if (locked) { // the list is safe to process\n            for (MemoryPool *memPool = defaultMemPool->next; memPool; memPool = memPool->next)\n                memPool->onThreadShutdown(memPool->getTLS(/*create=*/false));\n        }\n    }\n\n    TRACEF(( \"[ScalableMalloc trace] Thread id %d blocks return end\\n\", getThreadId() ));\n}\n\n#if USE_PTHREAD\nvoid mallocThreadShutdownNotification(void* arg)\n{\n    // The routine is called for each pool (as TLS dtor) on each thread, except for the main thread\n    if (!isMallocInitialized()) return;\n    doThreadShutdownNotification((TLSData*)arg, false);\n}\n#else\nextern \"C\" void __TBB_mallocThreadShutdownNotification()\n{\n    // The routine is called once per thread on Windows\n    if (!isMallocInitialized()) return;\n    doThreadShutdownNotification(nullptr, false);\n}\n#endif\n\nextern \"C\" void __TBB_mallocProcessShutdownNotification(bool windows_process_dying)\n{\n    if (!isMallocInitialized()) return;\n\n    // Don't clean allocator internals if the entire process is exiting\n    if (!windows_process_dying) {\n        doThreadShutdownNotification(nullptr, /*main_thread=*/true);\n    }\n#if  __TBB_MALLOC_LOCACHE_STAT\n    printf(\"cache hit ratio %f, size hit %f\\n\",\n           1.*cacheHits/mallocCalls, 1.*memHitKB/memAllocKB);\n    defaultMemPool->extMemPool.loc.reportStat(stdout);\n#endif\n\n    shutdownSync.processExit();\n#if __TBB_SOURCE_DIRECTLY_INCLUDED\n/* Pthread keys must be deleted as soon as possible to not call key dtor\n   on thread termination when then the tbbmalloc code can be already unloaded.\n*/\n    defaultMemPool->destroy();\n    destroyBackRefMain(&defaultMemPool->extMemPool.backend);\n    ThreadId::destroy();      // Delete key for thread id\n    hugePages.reset();\n    // new total malloc initialization is possible after this point\n    mallocInitialized.store(0, std::memory_order_release);\n#endif // __TBB_SOURCE_DIRECTLY_INCLUDED\n\n#if COLLECT_STATISTICS\n    unsigned nThreads = ThreadId::getMaxThreadId();\n    for( int i=1; i<=nThreads && i<MAX_THREADS; ++i )\n        STAT_print(i);\n#endif\n    if (!usedBySrcIncluded) {\n        MALLOC_ITT_FINI_ITTLIB();\n        MALLOC_ITT_RELEASE_RESOURCES();\n    }\n}\n\nextern \"C\" void * scalable_malloc(size_t size)\n{\n    void *ptr = internalMalloc(size);\n    if (!ptr) errno = ENOMEM;\n    return ptr;\n}\n\nextern \"C\" void scalable_free(void *object)\n{\n    internalFree(object);\n}\n\n#if MALLOC_ZONE_OVERLOAD_ENABLED\nextern \"C\" TBBMALLOC_EXPORT void __TBB_malloc_free_definite_size(void *object, size_t size)\n{\n    internalPoolFree(defaultMemPool, object, size);\n}\n#endif\n\n/*\n * A variant that provides additional memory safety, by checking whether the given address\n * was obtained with this allocator, and if not redirecting to the provided alternative call.\n */\nextern \"C\" TBBMALLOC_EXPORT void __TBB_malloc_safer_free(void *object, void (*original_free)(void*))\n{\n    if (!object)\n        return;\n\n    // tbbmalloc can allocate object only when tbbmalloc has been initialized\n    if (mallocInitialized.load(std::memory_order_acquire) && defaultMemPool->extMemPool.backend.ptrCanBeValid(object)) {\n        if (isLargeObject<unknownMem>(object)) {\n            // must check 1st for large object, because small object check touches 4 pages on left,\n            // and it can be inaccessible\n            TLSData *tls = defaultMemPool->getTLS(/*create=*/false);\n\n            defaultMemPool->putToLLOCache(tls, object);\n            return;\n        } else if (isSmallObject(object)) {\n            freeSmallObject(object);\n            return;\n        }\n    }\n    if (original_free)\n        original_free(object);\n}\n\n/********* End the free code        *************/\n\n/********* Code for scalable_realloc       ***********/\n\n/*\n * From K&R\n * \"realloc changes the size of the object pointed to by p to size. The contents will\n * be unchanged up to the minimum of the old and the new sizes. If the new size is larger,\n * the new space is uninitialized. realloc returns a pointer to the new space, or\n * nullptr if the request cannot be satisfied, in which case *p is unchanged.\"\n *\n */\nextern \"C\" void* scalable_realloc(void* ptr, size_t size)\n{\n    void *tmp;\n\n    if (!ptr)\n        tmp = internalMalloc(size);\n    else if (!size) {\n        internalFree(ptr);\n        return nullptr;\n    } else\n        tmp = reallocAligned(defaultMemPool, ptr, size, 0);\n\n    if (!tmp) errno = ENOMEM;\n    return tmp;\n}\n\n/*\n * A variant that provides additional memory safety, by checking whether the given address\n * was obtained with this allocator, and if not redirecting to the provided alternative call.\n */\nextern \"C\" TBBMALLOC_EXPORT void* __TBB_malloc_safer_realloc(void* ptr, size_t sz, void* original_realloc)\n{\n    void *tmp; // TODO: fix warnings about uninitialized use of tmp\n\n    if (!ptr) {\n        tmp = internalMalloc(sz);\n    } else if (mallocInitialized.load(std::memory_order_acquire) && isRecognized(ptr)) {\n        if (!sz) {\n            internalFree(ptr);\n            return nullptr;\n        } else {\n            tmp = reallocAligned(defaultMemPool, ptr, sz, 0);\n        }\n    }\n#if USE_WINTHREAD\n    else if (original_realloc && sz) {\n        orig_ptrs *original_ptrs = static_cast<orig_ptrs*>(original_realloc);\n        if ( original_ptrs->msize ){\n            size_t oldSize = original_ptrs->msize(ptr);\n            tmp = internalMalloc(sz);\n            if (tmp) {\n                memcpy(tmp, ptr, sz<oldSize? sz : oldSize);\n                if ( original_ptrs->free ){\n                    original_ptrs->free( ptr );\n                }\n            }\n        } else\n            tmp = nullptr;\n    }\n#else\n    else if (original_realloc) {\n        typedef void* (*realloc_ptr_t)(void*,size_t);\n        realloc_ptr_t original_realloc_ptr;\n        (void *&)original_realloc_ptr = original_realloc;\n        tmp = original_realloc_ptr(ptr,sz);\n    }\n#endif\n    else tmp = nullptr;\n\n    if (!tmp) errno = ENOMEM;\n    return tmp;\n}\n\n/********* End code for scalable_realloc   ***********/\n\n/********* Code for scalable_calloc   ***********/\n\n/*\n * From K&R\n * calloc returns a pointer to space for an array of nobj objects,\n * each of size size, or nullptr if the request cannot be satisfied.\n * The space is initialized to zero bytes.\n *\n */\n\nextern \"C\" void * scalable_calloc(size_t nobj, size_t size)\n{\n    // it's square root of maximal size_t value\n    const size_t mult_not_overflow = size_t(1) << (sizeof(size_t)*CHAR_BIT/2);\n    const size_t arraySize = nobj * size;\n\n    // check for overflow during multiplication:\n    if (nobj>=mult_not_overflow || size>=mult_not_overflow) // 1) heuristic check\n        if (nobj && arraySize / nobj != size) {             // 2) exact check\n            errno = ENOMEM;\n            return nullptr;\n        }\n    void* result = internalMalloc(arraySize);\n    if (result)\n        memset(result, 0, arraySize);\n    else\n        errno = ENOMEM;\n    return result;\n}\n\n/********* End code for scalable_calloc   ***********/\n\n/********* Code for aligned allocation API **********/\n\nextern \"C\" int scalable_posix_memalign(void **memptr, size_t alignment, size_t size)\n{\n    if ( !isPowerOfTwoAtLeast(alignment, sizeof(void*)) )\n        return EINVAL;\n    void *result = allocateAligned(defaultMemPool, size, alignment);\n    if (!result)\n        return ENOMEM;\n    *memptr = result;\n    return 0;\n}\n\nextern \"C\" void * scalable_aligned_malloc(size_t size, size_t alignment)\n{\n    if (!isPowerOfTwo(alignment) || 0==size) {\n        errno = EINVAL;\n        return nullptr;\n    }\n    void *tmp = allocateAligned(defaultMemPool, size, alignment);\n    if (!tmp) errno = ENOMEM;\n    return tmp;\n}\n\nextern \"C\" void * scalable_aligned_realloc(void *ptr, size_t size, size_t alignment)\n{\n    if (!isPowerOfTwo(alignment)) {\n        errno = EINVAL;\n        return nullptr;\n    }\n    void *tmp;\n\n    if (!ptr)\n        tmp = allocateAligned(defaultMemPool, size, alignment);\n    else if (!size) {\n        scalable_free(ptr);\n        return nullptr;\n    } else\n        tmp = reallocAligned(defaultMemPool, ptr, size, alignment);\n\n    if (!tmp) errno = ENOMEM;\n    return tmp;\n}\n\nextern \"C\" TBBMALLOC_EXPORT void * __TBB_malloc_safer_aligned_realloc(void *ptr, size_t size, size_t alignment, void* orig_function)\n{\n    /* corner cases left out of reallocAligned to not deal with errno there */\n    if (!isPowerOfTwo(alignment)) {\n        errno = EINVAL;\n        return nullptr;\n    }\n    void *tmp = nullptr;\n\n    if (!ptr) {\n        tmp = allocateAligned(defaultMemPool, size, alignment);\n    } else if (mallocInitialized.load(std::memory_order_acquire) && isRecognized(ptr)) {\n        if (!size) {\n            internalFree(ptr);\n            return nullptr;\n        } else {\n            tmp = reallocAligned(defaultMemPool, ptr, size, alignment);\n        }\n    }\n#if USE_WINTHREAD\n    else {\n        orig_aligned_ptrs *original_ptrs = static_cast<orig_aligned_ptrs*>(orig_function);\n        if (size) {\n            // Without orig_msize, we can't do anything with this.\n            // Just keeping old pointer.\n            if ( original_ptrs->aligned_msize ){\n                // set alignment and offset to have possibly correct oldSize\n                size_t oldSize = original_ptrs->aligned_msize(ptr, sizeof(void*), 0);\n                tmp = allocateAligned(defaultMemPool, size, alignment);\n                if (tmp) {\n                    memcpy(tmp, ptr, size<oldSize? size : oldSize);\n                    if ( original_ptrs->aligned_free ){\n                        original_ptrs->aligned_free( ptr );\n                    }\n                }\n            }\n        } else {\n            if ( original_ptrs->aligned_free ){\n                original_ptrs->aligned_free( ptr );\n            }\n            return nullptr;\n        }\n    }\n#else\n    // As original_realloc can't align result, and there is no way to find\n    // size of reallocating object, we are giving up.\n    suppress_unused_warning(orig_function);\n#endif\n    if (!tmp) errno = ENOMEM;\n    return tmp;\n}\n\nextern \"C\" void scalable_aligned_free(void *ptr)\n{\n    internalFree(ptr);\n}\n\n/********* end code for aligned allocation API **********/\n\n/********* Code for scalable_msize       ***********/\n\n/*\n * Returns the size of a memory block allocated in the heap.\n */\nextern \"C\" size_t scalable_msize(void* ptr)\n{\n    if (ptr) {\n        MALLOC_ASSERT(isRecognized(ptr), \"Invalid pointer in scalable_msize detected.\");\n        return internalMsize(ptr);\n    }\n    errno = EINVAL;\n    // Unlike _msize, return 0 in case of parameter error.\n    // Returning size_t(-1) looks more like the way to troubles.\n    return 0;\n}\n\n/*\n * A variant that provides additional memory safety, by checking whether the given address\n * was obtained with this allocator, and if not redirecting to the provided alternative call.\n */\nextern \"C\" TBBMALLOC_EXPORT size_t __TBB_malloc_safer_msize(void *object, size_t (*original_msize)(void*))\n{\n    if (object) {\n        // Check if the memory was allocated by scalable_malloc\n        if (mallocInitialized.load(std::memory_order_acquire) && isRecognized(object))\n            return internalMsize(object);\n        else if (original_msize)\n            return original_msize(object);\n    }\n    // object is nullptr or unknown, or foreign and no original_msize\n#if USE_WINTHREAD\n    errno = EINVAL; // errno expected to be set only on this platform\n#endif\n    return 0;\n}\n\n/*\n * The same as above but for _aligned_msize case\n */\nextern \"C\" TBBMALLOC_EXPORT size_t __TBB_malloc_safer_aligned_msize(void *object, size_t alignment, size_t offset, size_t (*orig_aligned_msize)(void*,size_t,size_t))\n{\n    if (object) {\n        // Check if the memory was allocated by scalable_malloc\n        if (mallocInitialized.load(std::memory_order_acquire) && isRecognized(object))\n            return internalMsize(object);\n        else if (orig_aligned_msize)\n            return orig_aligned_msize(object,alignment,offset);\n    }\n    // object is nullptr or unknown\n    errno = EINVAL;\n    return 0;\n}\n\n/********* End code for scalable_msize   ***********/\n\nextern \"C\" int scalable_allocation_mode(int param, intptr_t value)\n{\n    if (param == TBBMALLOC_SET_SOFT_HEAP_LIMIT) {\n        defaultMemPool->extMemPool.backend.setRecommendedMaxSize((size_t)value);\n        return TBBMALLOC_OK;\n    } else if (param == USE_HUGE_PAGES) {\n#if __unix__\n        switch (value) {\n        case 0:\n        case 1:\n            hugePages.setMode(value);\n            return TBBMALLOC_OK;\n        default:\n            return TBBMALLOC_INVALID_PARAM;\n        }\n#else\n        return TBBMALLOC_NO_EFFECT;\n#endif\n#if __TBB_SOURCE_DIRECTLY_INCLUDED\n    } else if (param == TBBMALLOC_INTERNAL_SOURCE_INCLUDED) {\n        switch (value) {\n        case 0: // used by dynamic library\n        case 1: // used by static library or directly included sources\n            usedBySrcIncluded = value;\n            return TBBMALLOC_OK;\n        default:\n            return TBBMALLOC_INVALID_PARAM;\n        }\n#endif\n    } else if (param == TBBMALLOC_SET_HUGE_SIZE_THRESHOLD) {\n        defaultMemPool->extMemPool.loc.setHugeSizeThreshold((size_t)value);\n        return TBBMALLOC_OK;\n    }\n    return TBBMALLOC_INVALID_PARAM;\n}\n\nextern \"C\" int scalable_allocation_command(int cmd, void *param)\n{\n    if (param)\n        return TBBMALLOC_INVALID_PARAM;\n\n    bool released = false;\n    switch(cmd) {\n    case TBBMALLOC_CLEAN_THREAD_BUFFERS:\n        if (TLSData *tls = defaultMemPool->getTLS(/*create=*/false))\n            released = tls->externalCleanup(/*cleanOnlyUnused*/false, /*cleanBins=*/true);\n        break;\n    case TBBMALLOC_CLEAN_ALL_BUFFERS:\n        released = defaultMemPool->extMemPool.hardCachesCleanup(true);\n        break;\n    default:\n        return TBBMALLOC_INVALID_PARAM;\n    }\n    return released ? TBBMALLOC_OK : TBBMALLOC_NO_EFFECT;\n}\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/large_objects.cpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"tbbmalloc_internal.h\"\n#include \"../src/tbb/environment.h\"\n\n#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n    // Suppress warning: unary minus operator applied to unsigned type, result still unsigned\n    // TBB_REVAMP_TODO: review this warning\n    #pragma warning(push)\n    #pragma warning(disable:4146)\n#endif\n\n/******************************* Allocation of large objects *********************************************/\n\nnamespace rml {\nnamespace internal {\n\n/* ---------------------------- Large Object cache init section ---------------------------------------- */\n\nvoid LargeObjectCache::init(ExtMemoryPool *memPool)\n{\n    extMemPool = memPool;\n    // scalable_allocation_mode can be called before allocator initialization, respect this manual request\n    if (hugeSizeThreshold == 0) {\n        // Huge size threshold initialization if environment variable was set\n        long requestedThreshold = tbb::detail::r1::GetIntegralEnvironmentVariable(\"TBB_MALLOC_SET_HUGE_SIZE_THRESHOLD\");\n        // Read valid env or initialize by default with max possible values\n        if (requestedThreshold != -1) {\n            setHugeSizeThreshold(requestedThreshold);\n        } else {\n            setHugeSizeThreshold(maxHugeSize);\n        }\n    }\n}\n\n/* ----------------------------- Huge size threshold settings ----------------------------------------- */\n\nvoid LargeObjectCache::setHugeSizeThreshold(size_t value)\n{\n    // Valid in the huge cache range: [MaxLargeSize, MaxHugeSize].\n    if (value <= maxHugeSize) {\n        hugeSizeThreshold = value >= maxLargeSize ? alignToBin(value) : maxLargeSize;\n\n        // Calculate local indexes for the global threshold size (for fast search inside a regular cleanup)\n        largeCache.hugeSizeThresholdIdx = LargeCacheType::numBins;\n        hugeCache.hugeSizeThresholdIdx = HugeCacheType::sizeToIdx(hugeSizeThreshold);\n    }\n}\n\nbool LargeObjectCache::sizeInCacheRange(size_t size)\n{\n    return size < maxHugeSize && (size <= defaultMaxHugeSize || size >= hugeSizeThreshold);\n}\n\n/* ----------------------------------------------------------------------------------------------------- */\n\n/* The functor called by the aggregator for the operation list */\ntemplate<typename Props>\nclass CacheBinFunctor {\n    typename LargeObjectCacheImpl<Props>::CacheBin *const bin;\n    ExtMemoryPool *const extMemPool;\n    typename LargeObjectCacheImpl<Props>::BinBitMask *const bitMask;\n    const int idx;\n\n    LargeMemoryBlock *toRelease;\n    bool needCleanup;\n    uintptr_t currTime;\n\n    /* Do preprocessing under the operation list. */\n    /* All the OP_PUT_LIST operations are merged in the one operation.\n       All OP_GET operations are merged with the OP_PUT_LIST operations but\n       it demands the update of the moving average value in the bin.\n       Only the last OP_CLEAN_TO_THRESHOLD operation has sense.\n       The OP_CLEAN_ALL operation also should be performed only once.\n       Moreover it cancels the OP_CLEAN_TO_THRESHOLD operation. */\n    class OperationPreprocessor {\n        // TODO: remove the dependency on CacheBin.\n        typename LargeObjectCacheImpl<Props>::CacheBin *const  bin;\n\n        /* Contains the relative time in the operation list.\n           It counts in the reverse order since the aggregator also\n           provides operations in the reverse order. */\n        uintptr_t lclTime;\n\n        /* opGet contains only OP_GET operations which cannot be merge with OP_PUT operations\n           opClean contains all OP_CLEAN_TO_THRESHOLD and OP_CLEAN_ALL operations. */\n        CacheBinOperation *opGet, *opClean;\n        /* The time of the last OP_CLEAN_TO_THRESHOLD operations */\n        uintptr_t cleanTime;\n\n        /* lastGetOpTime - the time of the last OP_GET operation.\n           lastGet - the same meaning as CacheBin::lastGet */\n        uintptr_t lastGetOpTime, lastGet;\n\n        /* The total sum of all usedSize changes requested with CBOP_UPDATE_USED_SIZE operations. */\n        size_t updateUsedSize;\n\n        /* The list of blocks for the OP_PUT_LIST operation. */\n        LargeMemoryBlock *head, *tail;\n        int putListNum;\n\n        /* if the OP_CLEAN_ALL is requested. */\n        bool isCleanAll;\n\n        inline void commitOperation(CacheBinOperation *op) const;\n        inline void addOpToOpList(CacheBinOperation *op, CacheBinOperation **opList) const;\n        bool getFromPutList(CacheBinOperation* opGet, uintptr_t currTime);\n        void addToPutList( LargeMemoryBlock *head, LargeMemoryBlock *tail, int num );\n\n    public:\n        OperationPreprocessor(typename LargeObjectCacheImpl<Props>::CacheBin *bin) :\n            bin(bin), lclTime(0), opGet(nullptr), opClean(nullptr), cleanTime(0),\n            lastGetOpTime(0), lastGet(0), updateUsedSize(0), head(nullptr), tail(nullptr), putListNum(0), isCleanAll(false)  {}\n        void operator()(CacheBinOperation* opList);\n        uintptr_t getTimeRange() const { return -lclTime; }\n\n        friend class CacheBinFunctor;\n    };\n\npublic:\n    CacheBinFunctor(typename LargeObjectCacheImpl<Props>::CacheBin *bin, ExtMemoryPool *extMemPool,\n                    typename LargeObjectCacheImpl<Props>::BinBitMask *bitMask, int idx) :\n        bin(bin), extMemPool(extMemPool), bitMask(bitMask), idx(idx), toRelease(nullptr), needCleanup(false), currTime(0) {}\n    void operator()(CacheBinOperation* opList);\n\n    bool isCleanupNeeded() const { return needCleanup; }\n    LargeMemoryBlock *getToRelease() const { return toRelease; }\n    uintptr_t getCurrTime() const { return currTime; }\n};\n\n/* ---------------- Cache Bin Aggregator Operation Helpers ---------------- */\n\n// The list of structures which describe the operation data\nstruct OpGet {\n    static const CacheBinOperationType type = CBOP_GET;\n    LargeMemoryBlock **res;\n    size_t size;\n    uintptr_t currTime;\n};\n\nstruct OpPutList {\n    static const CacheBinOperationType type = CBOP_PUT_LIST;\n    LargeMemoryBlock *head;\n};\n\nstruct OpCleanToThreshold {\n    static const CacheBinOperationType type = CBOP_CLEAN_TO_THRESHOLD;\n    LargeMemoryBlock **res;\n    uintptr_t currTime;\n};\n\nstruct OpCleanAll {\n    static const CacheBinOperationType type = CBOP_CLEAN_ALL;\n    LargeMemoryBlock **res;\n};\n\nstruct OpUpdateUsedSize {\n    static const CacheBinOperationType type = CBOP_UPDATE_USED_SIZE;\n    size_t size;\n};\n\nunion CacheBinOperationData {\nprivate:\n    OpGet opGet;\n    OpPutList opPutList;\n    OpCleanToThreshold opCleanToThreshold;\n    OpCleanAll opCleanAll;\n    OpUpdateUsedSize opUpdateUsedSize;\n};\n\n// Forward declarations\ntemplate <typename OpTypeData> OpTypeData& opCast(CacheBinOperation &op);\n\n// Describes the aggregator operation\nstruct CacheBinOperation : public MallocAggregatedOperation<CacheBinOperation>::type {\n    CacheBinOperationType type;\n\n    template <typename OpTypeData>\n    CacheBinOperation(OpTypeData &d, CacheBinOperationStatus st = CBST_WAIT) {\n        opCast<OpTypeData>(*this) = d;\n        type = OpTypeData::type;\n        MallocAggregatedOperation<CacheBinOperation>::type::status = st;\n    }\nprivate:\n    CacheBinOperationData data;\n\n    template <typename OpTypeData>\n    friend OpTypeData& opCast(CacheBinOperation &op);\n};\n\n// The opCast function can be the member of CacheBinOperation but it will have\n// small stylistic ambiguity: it will look like a getter (with a cast) for the\n// CacheBinOperation::data data member but it should return a reference to\n// simplify the code from a lot of getter/setter calls. So the global cast in\n// the style of static_cast (or reinterpret_cast) seems to be more readable and\n// have more explicit semantic.\ntemplate <typename OpTypeData>\nOpTypeData& opCast(CacheBinOperation &op) {\n    return *reinterpret_cast<OpTypeData*>(&op.data);\n}\n\n/* ------------------------------------------------------------------------ */\n\n#if __TBB_MALLOC_LOCACHE_STAT\n//intptr_t mallocCalls, cacheHits;\nstd::atomic<intptr_t> mallocCalls, cacheHits;\n//intptr_t memAllocKB, memHitKB;\nstd::atomic<intptr_t> memAllocKB, memHitKB;\n#endif\n\n#if MALLOC_DEBUG\ninline bool lessThanWithOverflow(intptr_t a, intptr_t b)\n{\n    return (a < b && (b - a < static_cast<intptr_t>(UINTPTR_MAX/2))) ||\n           (a > b && (a - b > static_cast<intptr_t>(UINTPTR_MAX/2)));\n}\n#endif\n\n/* ----------------------------------- Operation processing methods ------------------------------------ */\n\ntemplate<typename Props> void CacheBinFunctor<Props>::\n    OperationPreprocessor::commitOperation(CacheBinOperation *op) const\n{\n    // FencedStore( (intptr_t&)(op->status), CBST_DONE );\n    op->status.store(CBST_DONE, std::memory_order_release);\n}\n\ntemplate<typename Props> void CacheBinFunctor<Props>::\n    OperationPreprocessor::addOpToOpList(CacheBinOperation *op, CacheBinOperation **opList) const\n{\n    op->next = *opList;\n    *opList = op;\n}\n\ntemplate<typename Props> bool CacheBinFunctor<Props>::\n    OperationPreprocessor::getFromPutList(CacheBinOperation *opGet, uintptr_t currTime)\n{\n    if ( head ) {\n        uintptr_t age = head->age;\n        LargeMemoryBlock *next = head->next;\n        *opCast<OpGet>(*opGet).res = head;\n        commitOperation( opGet );\n        head = next;\n        putListNum--;\n        MALLOC_ASSERT( putListNum>=0, ASSERT_TEXT );\n\n        // use moving average with current hit interval\n        bin->updateMeanHitRange( currTime - age );\n        return true;\n    }\n    return false;\n}\n\ntemplate<typename Props> void CacheBinFunctor<Props>::\n    OperationPreprocessor::addToPutList(LargeMemoryBlock *h, LargeMemoryBlock *t, int num)\n{\n    if ( head ) {\n        MALLOC_ASSERT( tail, ASSERT_TEXT );\n        tail->next = h;\n        h->prev = tail;\n        tail = t;\n        putListNum += num;\n    } else {\n        head = h;\n        tail = t;\n        putListNum = num;\n    }\n}\n\ntemplate<typename Props> void CacheBinFunctor<Props>::\n    OperationPreprocessor::operator()(CacheBinOperation* opList)\n{\n    for ( CacheBinOperation *op = opList, *opNext; op; op = opNext ) {\n        opNext = op->next;\n        switch ( op->type ) {\n        case CBOP_GET:\n            {\n                lclTime--;\n                if ( !lastGetOpTime ) {\n                    lastGetOpTime = lclTime;\n                    lastGet = 0;\n                } else if ( !lastGet ) lastGet = lclTime;\n\n                if ( !getFromPutList(op,lclTime) ) {\n                    opCast<OpGet>(*op).currTime = lclTime;\n                    addOpToOpList( op, &opGet );\n                }\n            }\n            break;\n\n        case CBOP_PUT_LIST:\n            {\n                LargeMemoryBlock *head = opCast<OpPutList>(*op).head;\n                LargeMemoryBlock *curr = head, *prev = nullptr;\n\n                int num = 0;\n                do {\n                    // we do not kept prev pointers during assigning blocks to bins, set them now\n                    curr->prev = prev;\n\n                    // Save the local times to the memory blocks. Local times are necessary\n                    // for the getFromPutList function which updates the hit range value in\n                    // CacheBin when OP_GET and OP_PUT_LIST operations are merged successfully.\n                    // The age will be updated to the correct global time after preprocessing\n                    // when global cache time is updated.\n                    curr->age = --lclTime;\n\n                    prev = curr;\n                    num += 1;\n\n                    STAT_increment(getThreadId(), ThreadCommonCounters, cacheLargeObj);\n                } while ((curr = curr->next) != nullptr);\n\n                LargeMemoryBlock *tail = prev;\n                addToPutList(head, tail, num);\n\n                while ( opGet ) {\n                    CacheBinOperation *next = opGet->next;\n                    if ( !getFromPutList(opGet, opCast<OpGet>(*opGet).currTime) )\n                        break;\n                    opGet = next;\n                }\n            }\n            break;\n\n        case CBOP_UPDATE_USED_SIZE:\n            updateUsedSize += opCast<OpUpdateUsedSize>(*op).size;\n            commitOperation( op );\n            break;\n\n        case CBOP_CLEAN_ALL:\n            isCleanAll = true;\n            addOpToOpList( op, &opClean );\n            break;\n\n        case CBOP_CLEAN_TO_THRESHOLD:\n            {\n                uintptr_t currTime = opCast<OpCleanToThreshold>(*op).currTime;\n                // We don't worry about currTime overflow since it is a rare\n                // occurrence and doesn't affect correctness\n                cleanTime = cleanTime < currTime ? currTime : cleanTime;\n                addOpToOpList( op, &opClean );\n            }\n            break;\n\n        default:\n            MALLOC_ASSERT( false, \"Unknown operation.\" );\n        }\n    }\n    MALLOC_ASSERT( !( opGet && head ), \"Not all put/get pairs are processed!\" );\n}\n\ntemplate<typename Props> void CacheBinFunctor<Props>::operator()(CacheBinOperation* opList)\n{\n    MALLOC_ASSERT( opList, \"Empty operation list is passed into operation handler.\" );\n\n    OperationPreprocessor prep(bin);\n    prep(opList);\n\n    if ( uintptr_t timeRange = prep.getTimeRange() ) {\n        uintptr_t startTime = extMemPool->loc.getCurrTimeRange(timeRange);\n        // endTime is used as the current (base) time since the local time is negative.\n        uintptr_t endTime = startTime + timeRange;\n\n        if ( prep.lastGetOpTime && prep.lastGet ) bin->setLastGet(prep.lastGet+endTime);\n\n        if ( CacheBinOperation *opGet = prep.opGet ) {\n            bool isEmpty = false;\n            do {\n#if __TBB_MALLOC_WHITEBOX_TEST\n                tbbmalloc_whitebox::locGetProcessed++;\n#endif\n                const OpGet &opGetData = opCast<OpGet>(*opGet);\n                if ( !isEmpty ) {\n                    if ( LargeMemoryBlock *res = bin->get() ) {\n                        uintptr_t getTime = opGetData.currTime + endTime;\n                        // use moving average with current hit interval\n                        bin->updateMeanHitRange( getTime - res->age);\n                        bin->updateCachedSize( -opGetData.size );\n                        *opGetData.res = res;\n                    } else {\n                        isEmpty = true;\n                        uintptr_t lastGetOpTime = prep.lastGetOpTime+endTime;\n                        bin->forgetOutdatedState(lastGetOpTime);\n                        bin->updateAgeThreshold(lastGetOpTime);\n                    }\n                }\n\n                CacheBinOperation *opNext = opGet->next;\n                bin->updateUsedSize( opGetData.size, bitMask, idx );\n                prep.commitOperation( opGet );\n                opGet = opNext;\n            } while ( opGet );\n            if ( prep.lastGetOpTime )\n                bin->setLastGet( prep.lastGetOpTime + endTime );\n        } else if ( LargeMemoryBlock *curr = prep.head ) {\n            curr->prev = nullptr;\n            while ( curr ) {\n                // Update local times to global times\n                curr->age += endTime;\n                curr=curr->next;\n            }\n#if __TBB_MALLOC_WHITEBOX_TEST\n            tbbmalloc_whitebox::locPutProcessed+=prep.putListNum;\n#endif\n            toRelease = bin->putList(prep.head, prep.tail, bitMask, idx, prep.putListNum, extMemPool->loc.hugeSizeThreshold);\n        }\n        needCleanup = extMemPool->loc.isCleanupNeededOnRange(timeRange, startTime);\n        currTime = endTime - 1;\n    }\n\n    if ( CacheBinOperation *opClean = prep.opClean ) {\n        if ( prep.isCleanAll )\n            *opCast<OpCleanAll>(*opClean).res = bin->cleanAll(bitMask, idx);\n        else\n            *opCast<OpCleanToThreshold>(*opClean).res = bin->cleanToThreshold(prep.cleanTime, bitMask, idx);\n\n        CacheBinOperation *opNext = opClean->next;\n        prep.commitOperation( opClean );\n\n        while ((opClean = opNext) != nullptr) {\n            opNext = opClean->next;\n            prep.commitOperation(opClean);\n        }\n    }\n\n    if ( size_t size = prep.updateUsedSize )\n        bin->updateUsedSize(size, bitMask, idx);\n}\n/* ----------------------------------------------------------------------------------------------------- */\n/* --------------------------- Methods for creating and executing operations --------------------------- */\ntemplate<typename Props> void LargeObjectCacheImpl<Props>::\n    CacheBin::ExecuteOperation(CacheBinOperation *op, ExtMemoryPool *extMemPool, BinBitMask *bitMask, int idx, bool longLifeTime)\n{\n    CacheBinFunctor<Props> func( this, extMemPool, bitMask, idx );\n    aggregator.execute( op, func, longLifeTime );\n\n    if ( LargeMemoryBlock *toRelease = func.getToRelease()) {\n        extMemPool->backend.returnLargeObject(toRelease);\n    }\n\n    if ( func.isCleanupNeeded() ) {\n        extMemPool->loc.doCleanup( func.getCurrTime(), /*doThreshDecr=*/false);\n    }\n}\n\ntemplate<typename Props> LargeMemoryBlock *LargeObjectCacheImpl<Props>::\n    CacheBin::get(ExtMemoryPool *extMemPool, size_t size, BinBitMask *bitMask, int idx)\n{\n    LargeMemoryBlock *lmb=nullptr;\n    OpGet data = {&lmb, size, static_cast<uintptr_t>(0)};\n    CacheBinOperation op(data);\n    ExecuteOperation( &op, extMemPool, bitMask, idx );\n    return lmb;\n}\n\ntemplate<typename Props> void LargeObjectCacheImpl<Props>::\n    CacheBin::putList(ExtMemoryPool *extMemPool, LargeMemoryBlock *head, BinBitMask *bitMask, int idx)\n{\n    MALLOC_ASSERT(sizeof(LargeMemoryBlock)+sizeof(CacheBinOperation)<=head->unalignedSize, \"CacheBinOperation is too large to be placed in LargeMemoryBlock!\");\n\n    OpPutList data = {head};\n    CacheBinOperation *op = new (head+1) CacheBinOperation(data, CBST_NOWAIT);\n    ExecuteOperation( op, extMemPool, bitMask, idx, false );\n}\n\ntemplate<typename Props> bool LargeObjectCacheImpl<Props>::\n    CacheBin::cleanToThreshold(ExtMemoryPool *extMemPool, BinBitMask *bitMask, uintptr_t currTime, int idx)\n{\n    LargeMemoryBlock *toRelease = nullptr;\n\n    /* oldest may be more recent then age, that's why cast to signed type\n       was used. age overflow is also processed correctly. */\n    if (last.load(std::memory_order_relaxed) &&\n        (intptr_t)(currTime - oldest.load(std::memory_order_relaxed)) > ageThreshold.load(std::memory_order_relaxed)) {\n        OpCleanToThreshold data = {&toRelease, currTime};\n        CacheBinOperation op(data);\n        ExecuteOperation( &op, extMemPool, bitMask, idx );\n    }\n    bool released = toRelease;\n\n    Backend *backend = &extMemPool->backend;\n    while ( toRelease ) {\n        LargeMemoryBlock *helper = toRelease->next;\n        backend->returnLargeObject(toRelease);\n        toRelease = helper;\n    }\n    return released;\n}\n\ntemplate<typename Props> bool LargeObjectCacheImpl<Props>::\n    CacheBin::releaseAllToBackend(ExtMemoryPool *extMemPool, BinBitMask *bitMask, int idx)\n{\n    LargeMemoryBlock *toRelease = nullptr;\n\n    if (last.load(std::memory_order_relaxed)) {\n        OpCleanAll data = {&toRelease};\n        CacheBinOperation op(data);\n        ExecuteOperation(&op, extMemPool, bitMask, idx);\n    }\n    bool released = toRelease;\n\n    Backend *backend = &extMemPool->backend;\n    while ( toRelease ) {\n        LargeMemoryBlock *helper = toRelease->next;\n        MALLOC_ASSERT(!helper || lessThanWithOverflow(helper->age, toRelease->age),\n                      ASSERT_TEXT);\n        backend->returnLargeObject(toRelease);\n        toRelease = helper;\n    }\n    return released;\n}\n\ntemplate<typename Props> void LargeObjectCacheImpl<Props>::\n    CacheBin::updateUsedSize(ExtMemoryPool *extMemPool, size_t size, BinBitMask *bitMask, int idx)\n{\n    OpUpdateUsedSize data = {size};\n    CacheBinOperation op(data);\n    ExecuteOperation( &op, extMemPool, bitMask, idx );\n}\n\n/* ------------------------------ Unsafe methods used with the aggregator ------------------------------ */\n\ntemplate<typename Props> LargeMemoryBlock *LargeObjectCacheImpl<Props>::\n    CacheBin::putList(LargeMemoryBlock *head, LargeMemoryBlock *tail, BinBitMask *bitMask, int idx, int num, size_t hugeSizeThreshold)\n{\n    size_t size = head->unalignedSize;\n    usedSize.store(usedSize.load(std::memory_order_relaxed) - num * size, std::memory_order_relaxed);\n    MALLOC_ASSERT( !last.load(std::memory_order_relaxed) ||\n        (last.load(std::memory_order_relaxed)->age != 0 && last.load(std::memory_order_relaxed)->age != -1U), ASSERT_TEXT );\n    MALLOC_ASSERT( (tail==head && num==1) || (tail!=head && num>1), ASSERT_TEXT );\n    MALLOC_ASSERT( tail, ASSERT_TEXT );\n    LargeMemoryBlock *toRelease = nullptr;\n    if (size < hugeSizeThreshold && !lastCleanedAge) {\n        // 1st object of such size was released.\n        // Not cache it, and remember when this occurs\n        // to take into account during cache miss.\n        lastCleanedAge = tail->age;\n        toRelease = tail;\n        tail = tail->prev;\n        if (tail)\n            tail->next = nullptr;\n        else\n            head = nullptr;\n        num--;\n    }\n    if (num) {\n        // add [head;tail] list to cache\n        tail->next = first;\n        if (first)\n            first->prev = tail;\n        first = head;\n        if (!last.load(std::memory_order_relaxed)) {\n            MALLOC_ASSERT(0 == oldest.load(std::memory_order_relaxed), ASSERT_TEXT);\n            oldest.store(tail->age, std::memory_order_relaxed);\n            last.store(tail, std::memory_order_relaxed);\n        }\n\n        cachedSize.store(cachedSize.load(std::memory_order_relaxed) + num * size, std::memory_order_relaxed);\n    }\n\n    // No used object, and nothing in the bin, mark the bin as empty\n    if (!usedSize.load(std::memory_order_relaxed) && !first)\n        bitMask->set(idx, false);\n\n    return toRelease;\n}\n\ntemplate<typename Props> LargeMemoryBlock *LargeObjectCacheImpl<Props>::\n    CacheBin::get()\n{\n    LargeMemoryBlock *result=first;\n    if (result) {\n        first = result->next;\n        if (first)\n            first->prev = nullptr;\n        else {\n            last.store(nullptr, std::memory_order_relaxed);\n            oldest.store(0, std::memory_order_relaxed);\n        }\n    }\n\n    return result;\n}\n\ntemplate<typename Props> void LargeObjectCacheImpl<Props>::\n    CacheBin::forgetOutdatedState(uintptr_t currTime)\n{\n    // If the time since the last get is LongWaitFactor times more than ageThreshold\n    // for the bin, treat the bin as rarely-used and forget everything we know\n    // about it.\n    // If LongWaitFactor is too small, we forget too early and\n    // so prevents good caching, while if too high, caching blocks\n    // with unrelated usage pattern occurs.\n    const uintptr_t sinceLastGet = currTime - lastGet;\n    bool doCleanup = false;\n\n    intptr_t threshold = ageThreshold.load(std::memory_order_relaxed);\n    if (threshold)\n        doCleanup = sinceLastGet > static_cast<uintptr_t>(Props::LongWaitFactor * threshold);\n    else if (lastCleanedAge)\n        doCleanup = sinceLastGet > static_cast<uintptr_t>(Props::LongWaitFactor * (lastCleanedAge - lastGet));\n\n    if (doCleanup) {\n        lastCleanedAge = 0;\n        ageThreshold.store(0, std::memory_order_relaxed);\n    }\n\n}\n\ntemplate<typename Props> LargeMemoryBlock *LargeObjectCacheImpl<Props>::\n    CacheBin::cleanToThreshold(uintptr_t currTime, BinBitMask *bitMask, int idx)\n{\n    /* oldest may be more recent then age, that's why cast to signed type\n    was used. age overflow is also processed correctly. */\n    if ( !last.load(std::memory_order_relaxed) ||\n        (intptr_t)(currTime - last.load(std::memory_order_relaxed)->age) < ageThreshold.load(std::memory_order_relaxed) )\n        return nullptr;\n\n#if MALLOC_DEBUG\n    uintptr_t nextAge = 0;\n#endif\n    do {\n#if MALLOC_DEBUG\n        // check that list ordered\n        MALLOC_ASSERT(!nextAge || lessThanWithOverflow(nextAge, last.load(std::memory_order_relaxed)->age),\n            ASSERT_TEXT);\n        nextAge = last.load(std::memory_order_relaxed)->age;\n#endif\n        cachedSize.store(cachedSize.load(std::memory_order_relaxed) - last.load(std::memory_order_relaxed)->unalignedSize, std::memory_order_relaxed);\n        last.store(last.load(std::memory_order_relaxed)->prev, std::memory_order_relaxed);\n    } while (last.load(std::memory_order_relaxed) &&\n        (intptr_t)(currTime - last.load(std::memory_order_relaxed)->age) > ageThreshold.load(std::memory_order_relaxed));\n\n    LargeMemoryBlock *toRelease = nullptr;\n    if (last.load(std::memory_order_relaxed)) {\n        toRelease = last.load(std::memory_order_relaxed)->next;\n        oldest.store(last.load(std::memory_order_relaxed)->age, std::memory_order_relaxed);\n        last.load(std::memory_order_relaxed)->next = nullptr;\n    } else {\n        toRelease = first;\n        first = nullptr;\n        oldest.store(0, std::memory_order_relaxed);\n        if (!usedSize.load(std::memory_order_relaxed))\n            bitMask->set(idx, false);\n    }\n    MALLOC_ASSERT( toRelease, ASSERT_TEXT );\n    lastCleanedAge = toRelease->age;\n\n    return toRelease;\n}\n\ntemplate<typename Props> LargeMemoryBlock *LargeObjectCacheImpl<Props>::\n    CacheBin::cleanAll(BinBitMask *bitMask, int idx)\n{\n    if (!last.load(std::memory_order_relaxed)) return nullptr;\n\n    LargeMemoryBlock *toRelease = first;\n    last.store(nullptr, std::memory_order_relaxed);\n    first = nullptr;\n    oldest.store(0, std::memory_order_relaxed);\n    cachedSize.store(0, std::memory_order_relaxed);\n    if (!usedSize.load(std::memory_order_relaxed))\n        bitMask->set(idx, false);\n\n    return toRelease;\n}\n\n/* ----------------------------------------------------------------------------------------------------- */\n\n#if __TBB_MALLOC_BACKEND_STAT\ntemplate<typename Props> size_t LargeObjectCacheImpl<Props>::\n    CacheBin::reportStat(int num, FILE *f)\n{\n#if __TBB_MALLOC_LOCACHE_STAT\n    if (first)\n        printf(\"%d(%lu): total %lu KB thr %ld lastCln %lu oldest %lu\\n\",\n               num, num*Props::CacheStep+Props::MinSize,\n               cachedSize.load(std::memory_order_relaxed)/1024, ageThresholdageThreshold.load(std::memory_order_relaxed), lastCleanedAge, oldest.load(std::memory_order_relaxed));\n#else\n    suppress_unused_warning(num);\n    suppress_unused_warning(f);\n#endif\n    return cachedSize.load(std::memory_order_relaxed);\n}\n#endif\n\n// Release objects from cache blocks that are older than ageThreshold\ntemplate<typename Props>\nbool LargeObjectCacheImpl<Props>::regularCleanup(ExtMemoryPool *extMemPool, uintptr_t currTime, bool doThreshDecr)\n{\n    bool released = false;\n    BinsSummary binsSummary;\n\n    // Threshold settings is below this cache or starts from zero index\n    if (hugeSizeThresholdIdx == 0) return false;\n\n    // Starting searching for bin that is less than huge size threshold (can be cleaned-up)\n    int startSearchIdx = hugeSizeThresholdIdx - 1;\n\n    for (int i = bitMask.getMaxTrue(startSearchIdx); i >= 0; i = bitMask.getMaxTrue(i-1)) {\n        bin[i].updateBinsSummary(&binsSummary);\n        if (!doThreshDecr && tooLargeLOC.load(std::memory_order_relaxed) > 2 && binsSummary.isLOCTooLarge()) {\n            // if LOC is too large for quite long time, decrease the threshold\n            // based on bin hit statistics.\n            // For this, redo cleanup from the beginning.\n            // Note: on this iteration total usedSz can be not too large\n            // in comparison to total cachedSz, as we calculated it only\n            // partially. We are ok with it.\n            i = bitMask.getMaxTrue(startSearchIdx)+1;\n            doThreshDecr = true;\n            binsSummary.reset();\n            continue;\n        }\n        if (doThreshDecr)\n            bin[i].decreaseThreshold();\n\n        if (bin[i].cleanToThreshold(extMemPool, &bitMask, currTime, i)) {\n            released = true;\n        }\n    }\n    // We want to find if LOC was too large for some time continuously,\n    // so OK with races between incrementing and zeroing, but incrementing\n    // must be atomic.\n    if (binsSummary.isLOCTooLarge()) {\n        tooLargeLOC++;\n    } else {\n        tooLargeLOC.store(0, std::memory_order_relaxed);\n    }\n    return released;\n}\n\ntemplate<typename Props>\nbool LargeObjectCacheImpl<Props>::cleanAll(ExtMemoryPool *extMemPool)\n{\n    bool released = false;\n    for (int i = numBins-1; i >= 0; i--) {\n        released |= bin[i].releaseAllToBackend(extMemPool, &bitMask, i);\n    }\n    return released;\n}\n\ntemplate<typename Props>\nvoid LargeObjectCacheImpl<Props>::reset() {\n    tooLargeLOC.store(0, std::memory_order_relaxed);\n    for (int i = numBins-1; i >= 0; i--)\n        bin[i].init();\n    bitMask.reset();\n}\n\n#if __TBB_MALLOC_WHITEBOX_TEST\ntemplate<typename Props>\nsize_t LargeObjectCacheImpl<Props>::getLOCSize() const\n{\n    size_t size = 0;\n    for (int i = numBins-1; i >= 0; i--)\n        size += bin[i].getSize();\n    return size;\n}\n\nsize_t LargeObjectCache::getLOCSize() const\n{\n    return largeCache.getLOCSize() + hugeCache.getLOCSize();\n}\n\ntemplate<typename Props>\nsize_t LargeObjectCacheImpl<Props>::getUsedSize() const\n{\n    size_t size = 0;\n    for (int i = numBins-1; i >= 0; i--)\n        size += bin[i].getUsedSize();\n    return size;\n}\n\nsize_t LargeObjectCache::getUsedSize() const\n{\n    return largeCache.getUsedSize() + hugeCache.getUsedSize();\n}\n#endif // __TBB_MALLOC_WHITEBOX_TEST\n\ninline bool LargeObjectCache::isCleanupNeededOnRange(uintptr_t range, uintptr_t currTime)\n{\n    return range >= cacheCleanupFreq\n        || currTime+range < currTime-1 // overflow, 0 is power of 2, do cleanup\n        // (prev;prev+range] contains n*cacheCleanupFreq\n        || alignUp(currTime, cacheCleanupFreq)<currTime+range;\n}\n\nbool LargeObjectCache::doCleanup(uintptr_t currTime, bool doThreshDecr)\n{\n    if (!doThreshDecr)\n        extMemPool->allLocalCaches.markUnused();\n\n    bool large_cache_cleaned = largeCache.regularCleanup(extMemPool, currTime, doThreshDecr);\n    bool huge_cache_cleaned = hugeCache.regularCleanup(extMemPool, currTime, doThreshDecr);\n    return large_cache_cleaned || huge_cache_cleaned;\n}\n\nbool LargeObjectCache::decreasingCleanup()\n{\n    return doCleanup(cacheCurrTime.load(std::memory_order_acquire), /*doThreshDecr=*/true);\n}\n\nbool LargeObjectCache::regularCleanup()\n{\n    return doCleanup(cacheCurrTime.load(std::memory_order_acquire), /*doThreshDecr=*/false);\n}\n\nbool LargeObjectCache::cleanAll()\n{\n    bool large_cache_cleaned = largeCache.cleanAll(extMemPool);\n    bool huge_cache_cleaned = hugeCache.cleanAll(extMemPool);\n    return large_cache_cleaned || huge_cache_cleaned;\n}\n\nvoid LargeObjectCache::reset()\n{\n    largeCache.reset();\n    hugeCache.reset();\n}\n\ntemplate<typename Props>\nLargeMemoryBlock *LargeObjectCacheImpl<Props>::get(ExtMemoryPool *extMemoryPool, size_t size)\n{\n    int idx = Props::sizeToIdx(size);\n\n    LargeMemoryBlock *lmb = bin[idx].get(extMemoryPool, size, &bitMask, idx);\n\n    if (lmb) {\n        MALLOC_ITT_SYNC_ACQUIRED(bin+idx);\n        STAT_increment(getThreadId(), ThreadCommonCounters, allocCachedLargeObj);\n    }\n    return lmb;\n}\n\ntemplate<typename Props>\nvoid LargeObjectCacheImpl<Props>::updateCacheState(ExtMemoryPool *extMemPool, DecreaseOrIncrease op, size_t size)\n{\n    int idx = Props::sizeToIdx(size);\n    MALLOC_ASSERT(idx < static_cast<int>(numBins), ASSERT_TEXT);\n    bin[idx].updateUsedSize(extMemPool, op==decrease? -size : size, &bitMask, idx);\n}\n\n#if __TBB_MALLOC_LOCACHE_STAT\ntemplate<typename Props>\nvoid LargeObjectCacheImpl<Props>::reportStat(FILE *f)\n{\n    size_t cachedSize = 0;\n    for (int i=0; i<numBins; i++)\n        cachedSize += bin[i].reportStat(i, f);\n    fprintf(f, \"total LOC size %lu MB\\n\", cachedSize/1024/1024);\n}\n\nvoid LargeObjectCache::reportStat(FILE *f)\n{\n    largeCache.reportStat(f);\n    hugeCache.reportStat(f);\n    fprintf(f, \"cache time %lu\\n\", cacheCurrTime.load(std::memory_order_relaxed));\n}\n#endif\n\ntemplate<typename Props>\nvoid LargeObjectCacheImpl<Props>::putList(ExtMemoryPool *extMemPool, LargeMemoryBlock *toCache)\n{\n    int toBinIdx = Props::sizeToIdx(toCache->unalignedSize);\n\n    MALLOC_ITT_SYNC_RELEASING(bin+toBinIdx);\n    bin[toBinIdx].putList(extMemPool, toCache, &bitMask, toBinIdx);\n}\n\nvoid LargeObjectCache::updateCacheState(DecreaseOrIncrease op, size_t size)\n{\n    if (size < maxLargeSize)\n        largeCache.updateCacheState(extMemPool, op, size);\n    else if (size < maxHugeSize)\n        hugeCache.updateCacheState(extMemPool, op, size);\n}\n\n\nuintptr_t LargeObjectCache::getCurrTimeRange(uintptr_t range)\n{\n    return (cacheCurrTime.fetch_add(range) + 1);\n}\n\nvoid LargeObjectCache::registerRealloc(size_t oldSize, size_t newSize)\n{\n    updateCacheState(decrease, oldSize);\n    updateCacheState(increase, alignToBin(newSize));\n}\n\nsize_t LargeObjectCache::alignToBin(size_t size) {\n    return size < maxLargeSize ? LargeCacheType::alignToBin(size) : HugeCacheType::alignToBin(size);\n}\n\n// Used for internal purpose\nint LargeObjectCache::sizeToIdx(size_t size)\n{\n    MALLOC_ASSERT(size <= maxHugeSize, ASSERT_TEXT);\n    return size < maxLargeSize ?\n        LargeCacheType::sizeToIdx(size) :\n        LargeCacheType::numBins + HugeCacheType::sizeToIdx(size);\n}\n\nvoid LargeObjectCache::putList(LargeMemoryBlock *list)\n{\n    LargeMemoryBlock *toProcess, *n;\n\n    for (LargeMemoryBlock *curr = list; curr; curr = toProcess) {\n        LargeMemoryBlock *tail = curr;\n        toProcess = curr->next;\n        if (!sizeInCacheRange(curr->unalignedSize)) {\n            extMemPool->backend.returnLargeObject(curr);\n            continue;\n        }\n        int currIdx = sizeToIdx(curr->unalignedSize);\n\n        // Find all blocks fitting to same bin. Not use more efficient sorting\n        // algorithm because list is short (commonly,\n        // LocalLOC's HIGH_MARK-LOW_MARK, i.e. 24 items).\n        for (LargeMemoryBlock *b = toProcess; b; b = n) {\n            n = b->next;\n            if (sizeToIdx(b->unalignedSize) == currIdx) {\n                tail->next = b;\n                tail = b;\n                if (toProcess == b)\n                    toProcess = toProcess->next;\n                else {\n                    b->prev->next = b->next;\n                    if (b->next)\n                        b->next->prev = b->prev;\n                }\n            }\n        }\n        tail->next = nullptr;\n        if (curr->unalignedSize < maxLargeSize)\n            largeCache.putList(extMemPool, curr);\n        else\n            hugeCache.putList(extMemPool, curr);\n    }\n}\n\nvoid LargeObjectCache::put(LargeMemoryBlock *largeBlock)\n{\n    size_t blockSize = largeBlock->unalignedSize;\n    if (sizeInCacheRange(blockSize)) {\n        largeBlock->next = nullptr;\n        if (blockSize < maxLargeSize)\n            largeCache.putList(extMemPool, largeBlock);\n        else\n            hugeCache.putList(extMemPool, largeBlock);\n    } else {\n        extMemPool->backend.returnLargeObject(largeBlock);\n    }\n}\n\nLargeMemoryBlock *LargeObjectCache::get(size_t size)\n{\n    MALLOC_ASSERT( size >= minLargeSize, ASSERT_TEXT );\n    if (sizeInCacheRange(size)) {\n        return size < maxLargeSize ?\n            largeCache.get(extMemPool, size) : hugeCache.get(extMemPool, size);\n    }\n    return nullptr;\n}\n\nLargeMemoryBlock *ExtMemoryPool::mallocLargeObject(MemoryPool *pool, size_t allocationSize)\n{\n#if __TBB_MALLOC_LOCACHE_STAT\n    mallocCalls++;\n    memAllocKB.fetch_add(allocationSize/1024);\n#endif\n    LargeMemoryBlock* lmb = loc.get(allocationSize);\n    if (!lmb) {\n        BackRefIdx backRefIdx = BackRefIdx::newBackRef(/*largeObj=*/true);\n        if (backRefIdx.isInvalid())\n            return nullptr;\n\n        // unalignedSize is set in getLargeBlock\n        lmb = backend.getLargeBlock(allocationSize);\n        if (!lmb) {\n            removeBackRef(backRefIdx);\n            loc.updateCacheState(decrease, allocationSize);\n            return nullptr;\n        }\n        lmb->backRefIdx = backRefIdx;\n        lmb->pool = pool;\n        STAT_increment(getThreadId(), ThreadCommonCounters, allocNewLargeObj);\n    } else {\n#if __TBB_MALLOC_LOCACHE_STAT\n        cacheHits++;\n        memHitKB.fetch_add(allocationSize/1024);\n#endif\n    }\n    return lmb;\n}\n\nvoid ExtMemoryPool::freeLargeObject(LargeMemoryBlock *mBlock)\n{\n    loc.put(mBlock);\n}\n\nvoid ExtMemoryPool::freeLargeObjectList(LargeMemoryBlock *head)\n{\n    loc.putList(head);\n}\n\nbool ExtMemoryPool::softCachesCleanup()\n{\n    bool ret = false;\n    if (!softCachesCleanupInProgress.exchange(1, std::memory_order_acq_rel)) {\n        ret = loc.regularCleanup();\n        softCachesCleanupInProgress.store(0, std::memory_order_release);\n    }\n    return ret;\n}\n\nbool ExtMemoryPool::hardCachesCleanup(bool wait)\n{\n    if (hardCachesCleanupInProgress.exchange(1, std::memory_order_acq_rel)) {\n        if (!wait)\n            return false;\n\n        AtomicBackoff backoff;\n        while (hardCachesCleanupInProgress.exchange(1, std::memory_order_acq_rel))\n            backoff.pause();\n    }\n\n    // thread-local caches must be cleaned before LOC,\n    // because object from thread-local cache can be released to LOC\n    bool ret = releaseAllLocalCaches();\n    ret |= orphanedBlocks.cleanup(&backend);\n    ret |= loc.cleanAll();\n    ret |= backend.clean();\n\n    hardCachesCleanupInProgress.store(0, std::memory_order_release);\n    return ret;\n}\n\n#if BACKEND_HAS_MREMAP\nvoid *ExtMemoryPool::remap(void *ptr, size_t oldSize, size_t newSize, size_t alignment)\n{\n    const size_t oldUnalignedSize = ((LargeObjectHdr*)ptr - 1)->memoryBlock->unalignedSize;\n    void *o = backend.remap(ptr, oldSize, newSize, alignment);\n    if (o) {\n        LargeMemoryBlock *lmb = ((LargeObjectHdr*)o - 1)->memoryBlock;\n        loc.registerRealloc(oldUnalignedSize, lmb->unalignedSize);\n    }\n    return o;\n}\n#endif /* BACKEND_HAS_MREMAP */\n\n/*********** End allocation of large objects **********/\n\n} // namespace internal\n} // namespace rml\n\n#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n    #pragma warning(pop)\n#endif\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/large_objects.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_tbbmalloc_internal_H\n    #error tbbmalloc_internal.h must be included at this point\n#endif\n\n#ifndef __TBB_large_objects_H\n#define __TBB_large_objects_H\n\n//! The list of possible Cache Bin Aggregator operations.\n/*  Declared here to avoid Solaris Studio* 12.2 \"multiple definitions\" error */\nenum CacheBinOperationType {\n    CBOP_INVALID = 0,\n    CBOP_GET,\n    CBOP_PUT_LIST,\n    CBOP_CLEAN_TO_THRESHOLD,\n    CBOP_CLEAN_ALL,\n    CBOP_UPDATE_USED_SIZE\n};\n\n// The Cache Bin Aggregator operation status list.\n// CBST_NOWAIT can be specified for non-blocking operations.\nenum CacheBinOperationStatus {\n    CBST_WAIT = 0,\n    CBST_NOWAIT,\n    CBST_DONE\n};\n\n/*\n * Bins that grow with arithmetic step\n */\ntemplate<size_t MIN_SIZE, size_t MAX_SIZE>\nstruct LargeBinStructureProps {\npublic:\n    static const size_t   MinSize = MIN_SIZE, MaxSize = MAX_SIZE;\n    static const size_t   CacheStep = 8 * 1024;\n    static const unsigned NumBins = (MaxSize - MinSize) / CacheStep;\n\n    static size_t alignToBin(size_t size) {\n        return alignUp(size, CacheStep);\n    }\n\n    static int sizeToIdx(size_t size) {\n        MALLOC_ASSERT(MinSize <= size && size < MaxSize, ASSERT_TEXT);\n        MALLOC_ASSERT(size % CacheStep == 0, ASSERT_TEXT);\n        return (size - MinSize) / CacheStep;\n    }\n};\n\n/*\n * Bins that grow with special geometric progression.\n */\ntemplate<size_t MIN_SIZE, size_t MAX_SIZE>\nstruct HugeBinStructureProps {\n\nprivate:\n    // Sizes grow with the following formula: Size = MinSize * (2 ^ (Index / StepFactor))\n    // There are StepFactor bins (8 be default) between each power of 2 bin\n    static const int MaxSizeExp    = Log2<MAX_SIZE>::value;\n    static const int MinSizeExp    = Log2<MIN_SIZE>::value;\n    static const int StepFactor    = 8;\n    static const int StepFactorExp = Log2<StepFactor>::value;\n\npublic:\n    static const size_t   MinSize = MIN_SIZE, MaxSize = MAX_SIZE;\n    static const unsigned NumBins = (MaxSizeExp - MinSizeExp) * StepFactor;\n\n    static size_t alignToBin(size_t size) {\n        MALLOC_ASSERT(size >= StepFactor, \"Size must not be less than the StepFactor\");\n\n        int sizeExp = (int)BitScanRev(size);\n        MALLOC_ASSERT(sizeExp >= 0, \"BitScanRev() cannot return -1, as size >= stepfactor > 0\");\n        MALLOC_ASSERT(sizeExp >= StepFactorExp, \"sizeExp >= StepFactorExp, because size >= stepFactor\");\n        int minorStepExp = sizeExp - StepFactorExp;\n\n        return alignUp(size, 1ULL << minorStepExp);\n    }\n\n    // Sizes between the power of 2 values are approximated to StepFactor.\n    static int sizeToIdx(size_t size) {\n        MALLOC_ASSERT(MinSize <= size && size <= MaxSize, ASSERT_TEXT);\n\n        int sizeExp = (int)BitScanRev(size); // same as __TBB_Log2\n        MALLOC_ASSERT(sizeExp >= 0, \"BitScanRev() cannot return -1, as size >= stepfactor > 0\");\n        MALLOC_ASSERT(sizeExp >= StepFactorExp, \"sizeExp >= StepFactorExp, because size >= stepFactor\");\n        int minorStepExp = sizeExp - StepFactorExp;\n\n        size_t majorStepSize = 1ULL << sizeExp;\n        int minorIdx = (size - majorStepSize) >> minorStepExp;\n        MALLOC_ASSERT(size == majorStepSize + ((size_t)minorIdx << minorStepExp),\n            \"Size is not aligned on the bin\");\n        return StepFactor * (sizeExp - MinSizeExp) + minorIdx;\n    }\n};\n\n/*\n * Cache properties accessor\n *\n * TooLargeFactor -- when cache size treated \"too large\" in comparison to user data size\n * OnMissFactor -- If cache miss occurred and cache was cleaned,\n *                 set ageThreshold to OnMissFactor * the difference\n *                 between current time and last time cache was cleaned.\n * LongWaitFactor -- to detect rarely-used bins and forget about their usage history\n */\ntemplate<typename StructureProps, int TOO_LARGE, int ON_MISS, int LONG_WAIT>\nstruct LargeObjectCacheProps : public StructureProps {\n    static const int TooLargeFactor = TOO_LARGE, OnMissFactor = ON_MISS, LongWaitFactor = LONG_WAIT;\n};\n\ntemplate<typename Props>\nclass LargeObjectCacheImpl {\nprivate:\n\n    // Current sizes of used and cached objects. It's calculated while we are\n    // traversing bins, and used for isLOCTooLarge() check at the same time.\n    class BinsSummary {\n        size_t usedSz;\n        size_t cachedSz;\n    public:\n        BinsSummary() : usedSz(0), cachedSz(0) {}\n        // \"too large\" criteria\n        bool isLOCTooLarge() const { return cachedSz > Props::TooLargeFactor * usedSz; }\n        void update(size_t usedSize, size_t cachedSize) {\n            usedSz += usedSize;\n            cachedSz += cachedSize;\n        }\n        void reset() { usedSz = cachedSz = 0; }\n    };\n\npublic:\n    // The number of bins to cache large/huge objects.\n    static const uint32_t numBins = Props::NumBins;\n\n    typedef BitMaskMax<numBins> BinBitMask;\n\n    // 2-linked list of same-size cached blocks ordered by age (oldest on top)\n    // TODO: are we really want the list to be 2-linked? This allows us\n    // reduce memory consumption and do less operations under lock.\n    // TODO: try to switch to 32-bit logical time to save space in CacheBin\n    // and move bins to different cache lines.\n    class CacheBin {\n    private:\n        LargeMemoryBlock* first;\n        std::atomic<LargeMemoryBlock*> last;\n        /* age of an oldest block in the list; equal to last->age, if last defined,\n            used for quick checking it without acquiring the lock. */\n        std::atomic<uintptr_t> oldest;\n        /* currAge when something was excluded out of list because of the age,\n         not because of cache hit */\n        uintptr_t         lastCleanedAge;\n        /* Current threshold value for the blocks of a particular size.\n         Set on cache miss. */\n        std::atomic<intptr_t> ageThreshold;\n\n        /* total size of all objects corresponding to the bin and allocated by user */\n        std::atomic<size_t> usedSize;\n        /* total size of all objects cached in the bin */\n        std::atomic<size_t> cachedSize;\n        /* mean time of presence of block in the bin before successful reuse */\n        std::atomic<intptr_t> meanHitRange;\n        /* time of last get called for the bin */\n        uintptr_t         lastGet;\n\n        typename MallocAggregator<CacheBinOperation>::type aggregator;\n\n        void ExecuteOperation(CacheBinOperation *op, ExtMemoryPool *extMemPool, BinBitMask *bitMask, int idx, bool longLifeTime = true);\n\n        /* should be placed in zero-initialized memory, ctor not needed. */\n        CacheBin();\n\n    public:\n        void init() {\n            memset(static_cast<void*>(this), 0, sizeof(CacheBin));\n        }\n\n        /* ---------- Cache accessors ---------- */\n        void putList(ExtMemoryPool *extMemPool, LargeMemoryBlock *head, BinBitMask *bitMask, int idx);\n        LargeMemoryBlock *get(ExtMemoryPool *extMemPool, size_t size, BinBitMask *bitMask, int idx);\n\n        /* ---------- Cleanup functions -------- */\n        bool cleanToThreshold(ExtMemoryPool *extMemPool, BinBitMask *bitMask, uintptr_t currTime, int idx);\n        bool releaseAllToBackend(ExtMemoryPool *extMemPool, BinBitMask *bitMask, int idx);\n        /* ------------------------------------- */\n\n        void updateUsedSize(ExtMemoryPool *extMemPool, size_t size, BinBitMask *bitMask, int idx);\n        void decreaseThreshold() {\n            intptr_t threshold = ageThreshold.load(std::memory_order_relaxed);\n            if (threshold)\n                ageThreshold.store((threshold + meanHitRange.load(std::memory_order_relaxed)) / 2, std::memory_order_relaxed);\n        }\n        void updateBinsSummary(BinsSummary *binsSummary) const {\n            binsSummary->update(usedSize.load(std::memory_order_relaxed), cachedSize.load(std::memory_order_relaxed));\n        }\n        size_t getSize() const { return cachedSize.load(std::memory_order_relaxed); }\n        size_t getUsedSize() const { return usedSize.load(std::memory_order_relaxed); }\n        size_t reportStat(int num, FILE *f);\n\n        /* --------- Unsafe methods used with the aggregator ------- */\n        void forgetOutdatedState(uintptr_t currTime);\n        LargeMemoryBlock *putList(LargeMemoryBlock *head, LargeMemoryBlock *tail, BinBitMask *bitMask,\n                int idx, int num, size_t hugeObjectThreshold);\n        LargeMemoryBlock *get();\n        LargeMemoryBlock *cleanToThreshold(uintptr_t currTime, BinBitMask *bitMask, int idx);\n        LargeMemoryBlock *cleanAll(BinBitMask *bitMask, int idx);\n        void updateUsedSize(size_t size, BinBitMask *bitMask, int idx) {\n            if (!usedSize.load(std::memory_order_relaxed)) bitMask->set(idx, true);\n            usedSize.store(usedSize.load(std::memory_order_relaxed) + size, std::memory_order_relaxed);\n            if (!usedSize.load(std::memory_order_relaxed) && !first) bitMask->set(idx, false);\n        }\n        void updateMeanHitRange( intptr_t hitRange ) {\n            hitRange = hitRange >= 0 ? hitRange : 0;\n            intptr_t mean = meanHitRange.load(std::memory_order_relaxed);\n            mean = mean ? (mean + hitRange) / 2 : hitRange;\n            meanHitRange.store(mean, std::memory_order_relaxed);\n        }\n        void updateAgeThreshold( uintptr_t currTime ) {\n            if (lastCleanedAge)\n                ageThreshold.store(Props::OnMissFactor * (currTime - lastCleanedAge), std::memory_order_relaxed);\n        }\n        void updateCachedSize(size_t size) {\n            cachedSize.store(cachedSize.load(std::memory_order_relaxed) + size, std::memory_order_relaxed);\n        }\n        void setLastGet( uintptr_t newLastGet ) {\n            lastGet = newLastGet;\n        }\n        /* -------------------------------------------------------- */\n    };\n\n    // Huge bins index for fast regular cleanup searching in case of\n    // the \"huge size threshold\" setting defined\n    intptr_t     hugeSizeThresholdIdx;\n\nprivate:\n    // How many times LOC was \"too large\"\n    std::atomic<intptr_t> tooLargeLOC;\n    // for fast finding of used bins and bins with non-zero usedSize;\n    // indexed from the end, as we need largest 1st\n    BinBitMask   bitMask;\n    // bins with lists of recently freed large blocks cached for reuse\n    CacheBin bin[numBins];\n\npublic:\n    /* ------------ CacheBin structure dependent stuff ------------ */\n    static size_t alignToBin(size_t size) {\n        return Props::alignToBin(size);\n    }\n    static int sizeToIdx(size_t size) {\n        return Props::sizeToIdx(size);\n    }\n\n    /* --------- Main cache functions (put, get object) ------------ */\n    void putList(ExtMemoryPool *extMemPool, LargeMemoryBlock *largeBlock);\n    LargeMemoryBlock *get(ExtMemoryPool *extMemPool, size_t size);\n\n    /* ------------------------ Cleanup ---------------------------- */\n    bool regularCleanup(ExtMemoryPool *extMemPool, uintptr_t currAge, bool doThreshDecr);\n    bool cleanAll(ExtMemoryPool *extMemPool);\n\n    /* -------------------------- Other ---------------------------- */\n    void updateCacheState(ExtMemoryPool *extMemPool, DecreaseOrIncrease op, size_t size);\n\n    void reset();\n    void reportStat(FILE *f);\n#if __TBB_MALLOC_WHITEBOX_TEST\n    size_t getLOCSize() const;\n    size_t getUsedSize() const;\n#endif\n};\n\nclass LargeObjectCache {\nprivate:\n    // Large bins [minLargeSize, maxLargeSize)\n    // Huge bins [maxLargeSize, maxHugeSize)\n    static const size_t minLargeSize = 8 * 1024,\n                        maxLargeSize = 8 * 1024 * 1024,\n                        // Cache memory up to 1TB (or 2GB for 32-bit arch), but sieve objects from the special threshold\n                        maxHugeSize = tbb::detail::select_size_t_constant<2147483648U, 1099511627776ULL>::value;\n\npublic:\n    // Upper bound threshold for caching size. After that size all objects sieve through cache\n    // By default - 64MB, previous value was 129MB (needed by some Intel(R) Math Kernel Library (Intel(R) MKL) benchmarks)\n    static const size_t defaultMaxHugeSize = 64UL * 1024UL * 1024UL;\n    // After that size large object interpreted as huge and does not participate in regular cleanup.\n    // Can be changed during the program execution.\n    size_t hugeSizeThreshold;\n\nprivate:\n    // Large objects cache properties\n    typedef LargeBinStructureProps<minLargeSize, maxLargeSize> LargeBSProps;\n    typedef LargeObjectCacheProps<LargeBSProps, 2, 2, 16> LargeCacheTypeProps;\n\n    // Huge objects cache properties\n    typedef HugeBinStructureProps<maxLargeSize, maxHugeSize> HugeBSProps;\n    typedef LargeObjectCacheProps<HugeBSProps, 1, 1, 4> HugeCacheTypeProps;\n\n    // Cache implementation type with properties\n    typedef LargeObjectCacheImpl< LargeCacheTypeProps > LargeCacheType;\n    typedef LargeObjectCacheImpl< HugeCacheTypeProps > HugeCacheType;\n\n    // Beginning of largeCache is more actively used and smaller than hugeCache,\n    // so put hugeCache first to prevent false sharing\n    // with LargeObjectCache's predecessor\n    HugeCacheType hugeCache;\n    LargeCacheType largeCache;\n\n    /* logical time, incremented on each put/get operation\n       To prevent starvation between pools, keep separately for each pool.\n       Overflow is OK, as we only want difference between\n       its current value and some recent.\n\n       Both malloc and free should increment logical time, as in\n       a different case multiple cached blocks would have same age,\n       and accuracy of predictors suffers.\n    */\n    std::atomic<uintptr_t> cacheCurrTime;\n\n    // Memory pool that owns this LargeObjectCache.\n    // strict 1:1 relation, never changed\n    ExtMemoryPool *extMemPool;\n\n    // Returns artificial bin index,\n    // it's used only during sorting and never saved\n    static int sizeToIdx(size_t size);\n\n    // Our friends\n    friend class Backend;\n\npublic:\n    void init(ExtMemoryPool *memPool);\n\n    // Item accessors\n    void put(LargeMemoryBlock *largeBlock);\n    void putList(LargeMemoryBlock *head);\n    LargeMemoryBlock *get(size_t size);\n\n    void updateCacheState(DecreaseOrIncrease op, size_t size);\n    bool isCleanupNeededOnRange(uintptr_t range, uintptr_t currTime);\n\n    // Cleanup operations\n    bool doCleanup(uintptr_t currTime, bool doThreshDecr);\n    bool decreasingCleanup();\n    bool regularCleanup();\n    bool cleanAll();\n    void reset();\n\n    void reportStat(FILE *f);\n#if __TBB_MALLOC_WHITEBOX_TEST\n    size_t getLOCSize() const;\n    size_t getUsedSize() const;\n#endif\n\n    // Cache deals with exact-fit sizes, so need to align each size\n    // to the specific bin when put object to cache\n    static size_t alignToBin(size_t size);\n\n    void setHugeSizeThreshold(size_t value);\n\n    // Check if we should cache or sieve this size\n    bool sizeInCacheRange(size_t size);\n\n    uintptr_t getCurrTimeRange(uintptr_t range);\n    void registerRealloc(size_t oldSize, size_t newSize);\n};\n\n#endif // __TBB_large_objects_H\n\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/shared_utils.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_shared_utils_H\n#define __TBB_shared_utils_H\n\n// Include files containing declarations of intptr_t and uintptr_t\n#include <stddef.h>  // size_t\n#if _MSC_VER\ntypedef unsigned __int16 uint16_t;\ntypedef unsigned __int32 uint32_t;\ntypedef unsigned __int64 uint64_t;\n #if !UINTPTR_MAX\n  #define UINTPTR_MAX SIZE_MAX\n #endif\n#else // _MSC_VER\n#include <stdint.h>\n#endif\n\n/*\n * Functions to align an integer down or up to the given power of two,\n * and test for such an alignment, and for power of two.\n */\ntemplate<typename T>\nstatic inline T alignDown(T arg, uintptr_t alignment) {\n    return T( (uintptr_t)arg                & ~(alignment-1));\n}\ntemplate<typename T>\nstatic inline T alignUp  (T arg, uintptr_t alignment) {\n    return T(((uintptr_t)arg+(alignment-1)) & ~(alignment-1));\n    // /*is this better?*/ return (((uintptr_t)arg-1) | (alignment-1)) + 1;\n}\ntemplate<typename T> // works for not power-of-2 alignments\nstatic inline T alignUpGeneric(T arg, uintptr_t alignment) {\n    if (size_t rem = arg % alignment) {\n        arg += alignment - rem;\n    }\n    return arg;\n}\n\n/*\n * Compile time Log2 calculation\n */\ntemplate <size_t NUM>\nstruct Log2 { static const int value = 1 + Log2<(NUM >> 1)>::value; };\ntemplate <>\nstruct Log2<1> { static const int value = 0; };\n\n#if defined(min)\n#undef min\n#endif\n\ntemplate<typename T>\nT min ( const T& val1, const T& val2 ) {\n    return val1 < val2 ? val1 : val2;\n}\n\n/*\n * Functions to parse files information (system files for example)\n */\n\n#include <stdio.h>\n\n#if defined(_MSC_VER) && (_MSC_VER<1900) && !defined(__INTEL_COMPILER)\n    // Suppress overzealous compiler warnings that default ctor and assignment\n    // operator cannot be generated and object 'class' can never be instantiated.\n    #pragma warning(push)\n    #pragma warning(disable:4510 4512 4610)\n#endif\n\n#if __SUNPRO_CC\n    // Suppress overzealous compiler warnings that a class with a reference member\n    // lacks a user-defined constructor, which can lead to errors\n    #pragma error_messages (off, refmemnoconstr)\n#endif\n\n// TODO: add a constructor to remove warnings suppression\nstruct parseFileItem {\n    const char* format;\n    long long& value;\n};\n\n#if defined(_MSC_VER) && (_MSC_VER<1900) && !defined(__INTEL_COMPILER)\n    #pragma warning(pop)\n#endif\n\n#if __SUNPRO_CC\n    #pragma error_messages (on, refmemnoconstr)\n#endif\n\ntemplate <int BUF_LINE_SIZE, int N>\nvoid parseFile(const char* file, const parseFileItem (&items)[N]) {\n    // Tries to find all items in each line\n    int found[N] = { 0 };\n    // If all items found, stop forward file reading\n    int numFound = 0;\n    // Line storage\n    char buf[BUF_LINE_SIZE];\n\n    if (FILE *f = fopen(file, \"r\")) {\n        while (numFound < N && fgets(buf, BUF_LINE_SIZE, f)) {\n            for (int i = 0; i < N; ++i) {\n                if (!found[i] && 1 == sscanf(buf, items[i].format, &items[i].value)) {\n                    ++numFound;\n                    found[i] = 1;\n                }\n            }\n        }\n        fclose(f);\n    }\n}\n\nnamespace rml {\nnamespace internal {\n\n/*\n * Best estimate of cache line size, for the purpose of avoiding false sharing.\n * Too high causes memory overhead, too low causes false-sharing overhead.\n * Because, e.g., 32-bit code might run on a 64-bit system with a larger cache line size,\n * it would probably be better to probe at runtime where possible and/or allow for an environment variable override,\n * but currently this is still used for compile-time layout of class Block, so the change is not entirely trivial.\n */\n#if __powerpc64__ || __ppc64__ || __bgp__\nconst uint32_t estimatedCacheLineSize = 128;\n#else\nconst uint32_t estimatedCacheLineSize =  64;\n#endif\n\n} // namespace internal\n} // namespace rml\n\n#endif /* __TBB_shared_utils_H */\n\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/tbbmalloc.cpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"TypeDefinitions.h\" // Customize.h and proxy.h get included\n#include \"tbbmalloc_internal_api.h\"\n\n#include \"../tbb/assert_impl.h\" // Out-of-line TBB assertion handling routines are instantiated here.\n#include \"oneapi/tbb/version.h\"\n#include \"oneapi/tbb/scalable_allocator.h\"\n\n#undef UNICODE\n\n#if USE_PTHREAD\n#include <dlfcn.h> // dlopen\n#elif USE_WINTHREAD\n#include <windows.h>\n#endif\n\nnamespace rml {\nnamespace internal {\n\n#if TBB_USE_DEBUG\n#define DEBUG_SUFFIX \"_debug\"\n#else\n#define DEBUG_SUFFIX\n#endif /* TBB_USE_DEBUG */\n\n// MALLOCLIB_NAME is the name of the oneTBB memory allocator library.\n#if _WIN32||_WIN64\n#define MALLOCLIB_NAME \"tbbmalloc\" DEBUG_SUFFIX \".dll\"\n#elif __APPLE__\n#define MALLOCLIB_NAME \"libtbbmalloc\" DEBUG_SUFFIX \".2.dylib\"\n#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __sun || _AIX || __ANDROID__\n#define MALLOCLIB_NAME \"libtbbmalloc\" DEBUG_SUFFIX \".so\"\n#elif __unix__\n#define MALLOCLIB_NAME \"libtbbmalloc\" DEBUG_SUFFIX  __TBB_STRING(.so.2)\n#else\n#error Unknown OS\n#endif\n\nvoid init_tbbmalloc() {\n#if __TBB_USE_ITT_NOTIFY\n    MallocInitializeITT();\n#endif\n\n/* Preventing TBB allocator library from unloading to prevent\n   resource leak, as memory is not released on the library unload.\n*/\n#if USE_WINTHREAD && !__TBB_SOURCE_DIRECTLY_INCLUDED && !__TBB_WIN8UI_SUPPORT\n    // Prevent Windows from displaying message boxes if it fails to load library\n    UINT prev_mode = SetErrorMode (SEM_FAILCRITICALERRORS);\n    HMODULE lib;\n    BOOL ret = GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS\n                                 |GET_MODULE_HANDLE_EX_FLAG_PIN,\n                                 (LPCTSTR)&scalable_malloc, &lib);\n    MALLOC_ASSERT(lib && ret, \"Allocator can't find itself.\");\n    tbb::detail::suppress_unused_warning(ret);\n    SetErrorMode (prev_mode);\n#endif /* USE_PTHREAD && !__TBB_SOURCE_DIRECTLY_INCLUDED */\n}\n\n#if !__TBB_SOURCE_DIRECTLY_INCLUDED\n#if USE_WINTHREAD\nextern \"C\" BOOL WINAPI DllMain( HINSTANCE /*hInst*/, DWORD callReason, LPVOID lpvReserved)\n{\n    if (callReason==DLL_THREAD_DETACH)\n    {\n        __TBB_mallocThreadShutdownNotification();\n    }\n    else if (callReason==DLL_PROCESS_DETACH)\n    {\n        __TBB_mallocProcessShutdownNotification(lpvReserved != nullptr);\n    }\n    return TRUE;\n}\n#else /* !USE_WINTHREAD */\nstruct RegisterProcessShutdownNotification {\n// Work around non-reentrancy in dlopen() on Android\n    RegisterProcessShutdownNotification() {\n        // prevents unloading, POSIX case\n\n        // We need better support for the library pinning\n        // when dlopen can't find TBBmalloc library.\n        // for example: void *ret = dlopen(MALLOCLIB_NAME, RTLD_NOW);\n        // MALLOC_ASSERT(ret, \"Allocator can't load itself.\");\n        dlopen(MALLOCLIB_NAME, RTLD_NOW);\n    }\n\n    RegisterProcessShutdownNotification(RegisterProcessShutdownNotification&) = delete;\n    RegisterProcessShutdownNotification& operator=(const RegisterProcessShutdownNotification&) = delete;\n\n    ~RegisterProcessShutdownNotification() {\n        __TBB_mallocProcessShutdownNotification(false);\n    }\n};\n\nstatic RegisterProcessShutdownNotification reg;\n#endif /* !USE_WINTHREAD */\n#endif /* !__TBB_SOURCE_DIRECTLY_INCLUDED */\n\n} } // namespaces\n\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/tbbmalloc.rc",
    "content": "// Copyright (c) 2005-2025 Intel Corporation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Includes\n//\n#include <winresrc.h>\n#include \"../../include/oneapi/tbb/version.h\"\n\n/////////////////////////////////////////////////////////////////////////////\n// Neutral resources\n\n#ifdef _WIN32\nLANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL\n#pragma code_page(1252)\n#endif //_WIN32\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Version\n//\n#define TBB_VERNUMBERS TBB_VERSION_MAJOR,TBB_VERSION_MINOR,TBB_VERSION_PATCH\n#define TBB_VERSION TBB_VERSION_STRING\n\nVS_VERSION_INFO VERSIONINFO\n FILEVERSION TBB_VERNUMBERS\n PRODUCTVERSION TBB_VERNUMBERS\n FILEFLAGSMASK 0x17L\n#ifdef _DEBUG\n FILEFLAGS 0x1L\n#else\n FILEFLAGS 0x0L\n#endif\n FILEOS 0x40004L\n FILETYPE 0x2L\n FILESUBTYPE 0x0L\nBEGIN\n    BLOCK \"StringFileInfo\"\n    BEGIN\n        BLOCK \"000004b0\"\n        BEGIN\n            VALUE \"CompanyName\", \"Intel Corporation\\0\"\n            VALUE \"FileDescription\", \"oneAPI Threading Building Blocks (oneTBB) library\\0\"\n            VALUE \"FileVersion\", TBB_VERSION \"\\0\"\n            VALUE \"LegalCopyright\", \"Copyright 2005-2025 Intel Corporation.  All Rights Reserved.\\0\"\n            VALUE \"LegalTrademarks\", \"\\0\"\n#ifndef TBB_USE_DEBUG\n            VALUE \"OriginalFilename\", \"tbbmalloc.dll\\0\"\n#else\n            VALUE \"OriginalFilename\", \"tbbmalloc_debug.dll\\0\"\n#endif\n            VALUE \"ProductName\", \"oneAPI Threading Building Blocks (oneTBB)\\0\"\n            VALUE \"ProductVersion\", TBB_VERSION \"\\0\"\n            VALUE \"PrivateBuild\", \"\\0\"\n            VALUE \"SpecialBuild\", \"\\0\"\n        END\n    END\n    BLOCK \"VarFileInfo\"\n    BEGIN\n        VALUE \"Translation\", 0x0, 1200\n    END\nEND\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/tbbmalloc_internal.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_tbbmalloc_internal_H\n#define __TBB_tbbmalloc_internal_H\n\n#include \"TypeDefinitions.h\" /* Also includes customization layer Customize.h */\n\n#if USE_PTHREAD\n    // Some pthreads documentation says that <pthreads.h> must be first header.\n    #include <pthread.h>\n    typedef pthread_key_t tls_key_t;\n#elif USE_WINTHREAD\n    #include <windows.h>\n    typedef DWORD tls_key_t;\n#else\n    #error Must define USE_PTHREAD or USE_WINTHREAD\n#endif\n\n#include <atomic>\n\n// TODO: *BSD also has it\n#define BACKEND_HAS_MREMAP __linux__\n#define CHECK_ALLOCATION_RANGE MALLOC_DEBUG || MALLOC_ZONE_OVERLOAD_ENABLED || MALLOC_UNIXLIKE_OVERLOAD_ENABLED\n\n#include \"oneapi/tbb/detail/_config.h\" // for __TBB_LIBSTDCPP_EXCEPTION_HEADERS_BROKEN\n#include \"oneapi/tbb/detail/_template_helpers.h\"\n#if __TBB_LIBSTDCPP_EXCEPTION_HEADERS_BROKEN\n  #define _EXCEPTION_PTR_H /* prevents exception_ptr.h inclusion */\n  #define _GLIBCXX_NESTED_EXCEPTION_H /* prevents nested_exception.h inclusion */\n#endif\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <limits.h> // for CHAR_BIT\n#include <string.h> // for memset\n#if MALLOC_CHECK_RECURSION\n#include <new>        /* for placement new */\n#endif\n#include \"oneapi/tbb/scalable_allocator.h\"\n#include \"tbbmalloc_internal_api.h\"\n\n/********* Various compile-time options        **************/\n\n#if !__TBB_DEFINE_MIC && __TBB_MIC_NATIVE\n #error Intel(R) Many Integrated Core Compiler does not define __MIC__ anymore.\n#endif\n\n#define MALLOC_TRACE 0\n\n#if MALLOC_TRACE\n#define TRACEF(x) printf x\n#else\n#define TRACEF(x) ((void)0)\n#endif /* MALLOC_TRACE */\n\n#define ASSERT_TEXT nullptr\n\n#define COLLECT_STATISTICS ( MALLOC_DEBUG && MALLOCENV_COLLECT_STATISTICS )\n#ifndef USE_INTERNAL_TID\n#define USE_INTERNAL_TID COLLECT_STATISTICS || MALLOC_TRACE\n#endif\n\n#include \"Statistics.h\"\n\n// call yield for whitebox testing, skip in real library\n#ifndef WhiteboxTestingYield\n#define WhiteboxTestingYield() ((void)0)\n#endif\n\n\n/********* End compile-time options        **************/\n\nnamespace rml {\n\nnamespace internal {\n\n#if __TBB_MALLOC_LOCACHE_STAT\nextern intptr_t mallocCalls, cacheHits;\nextern intptr_t memAllocKB, memHitKB;\n#endif\n\n//! Utility template function to prevent \"unused\" warnings by various compilers.\ntemplate<typename T>\nvoid suppress_unused_warning( const T& ) {}\n\n/********** Various global default constants ********/\n\n/*\n * Default huge page size\n */\n#if defined __loongarch64\nstatic const size_t HUGE_PAGE_SIZE = 32 * 1024 * 1024;\n#else\nstatic const size_t HUGE_PAGE_SIZE = 2 * 1024 * 1024;\n#endif\n\n/********** End of global default constants *********/\n\n/********** Various numeric parameters controlling allocations ********/\n\n/*\n * slabSize - the size of a block for allocation of small objects,\n * it must be larger than maxSegregatedObjectSize.\n */\nconst uintptr_t slabSize = 16*1024;\n\n/*\n * Large blocks cache cleanup frequency.\n * It should be power of 2 for the fast checking.\n */\nconst unsigned cacheCleanupFreq = 256;\n\n/*\n * Alignment of large (>= minLargeObjectSize) objects.\n */\nconst size_t largeObjectAlignment = estimatedCacheLineSize;\n\n/*\n * This number of bins in the TLS that leads to blocks that we can allocate in.\n */\nconst uint32_t numBlockBinLimit = 31;\n\n/********** End of numeric parameters controlling allocations *********/\n\nclass BlockI;\nclass Block;\nstruct LargeMemoryBlock;\nstruct ExtMemoryPool;\nstruct MemRegion;\nclass FreeBlock;\nclass TLSData;\nclass Backend;\nclass MemoryPool;\nstruct CacheBinOperation;\nextern const uint32_t minLargeObjectSize;\n\nenum DecreaseOrIncrease {\n    decrease, increase\n};\n\nclass TLSKey {\n    tls_key_t TLS_pointer_key;\npublic:\n    bool init();\n    bool destroy();\n    TLSData* getThreadMallocTLS() const;\n    void setThreadMallocTLS( TLSData * newvalue );\n    TLSData* createTLS(MemoryPool *memPool, Backend *backend);\n};\n\ntemplate<typename Arg, typename Compare>\ninline void AtomicUpdate(std::atomic<Arg>& location, Arg newVal, const Compare &cmp)\n{\n    static_assert(sizeof(Arg) == sizeof(intptr_t), \"Type of argument must match AtomicCompareExchange type.\");\n    Arg old = location.load(std::memory_order_acquire);\n    for (; cmp(old, newVal); ) {\n        if (location.compare_exchange_strong(old, newVal))\n            break;\n        // TODO: do we need backoff after unsuccessful CAS?\n        //old = val;\n    }\n}\n\n// TODO: make BitMaskBasic more general\n// TODO: check that BitMaskBasic is not used for synchronization\n// (currently, it fits BitMaskMin well, but not as suitable for BitMaskMax)\ntemplate<unsigned NUM>\nclass BitMaskBasic {\n    static const unsigned SZ = (NUM-1)/(CHAR_BIT*sizeof(uintptr_t))+1;\n    static const unsigned WORD_LEN = CHAR_BIT*sizeof(uintptr_t);\n\n    std::atomic<uintptr_t> mask[SZ];\n\nprotected:\n    void set(size_t idx, bool val) {\n        MALLOC_ASSERT(idx<NUM, ASSERT_TEXT);\n\n        size_t i = idx / WORD_LEN;\n        int pos = WORD_LEN - idx % WORD_LEN - 1;\n        if (val) {\n            mask[i].fetch_or(1ULL << pos);\n        } else {\n            mask[i].fetch_and(~(1ULL << pos));\n        }\n    }\n    int getMinTrue(unsigned startIdx) const {\n        unsigned idx = startIdx / WORD_LEN;\n        int pos;\n\n        if (startIdx % WORD_LEN) {\n            // only interested in part of a word, clear bits before startIdx\n            pos = WORD_LEN - startIdx % WORD_LEN;\n            uintptr_t actualMask = mask[idx].load(std::memory_order_relaxed) & (((uintptr_t)1<<pos) - 1);\n            idx++;\n            if (-1 != (pos = BitScanRev(actualMask)))\n                return idx*WORD_LEN - pos - 1;\n        }\n\n        while (idx<SZ)\n            if (-1 != (pos = BitScanRev(mask[idx++].load(std::memory_order_relaxed))))\n                return idx*WORD_LEN - pos - 1;\n        return -1;\n    }\npublic:\n    void reset() { for (unsigned i=0; i<SZ; i++) mask[i].store(0, std::memory_order_relaxed); }\n};\n\ntemplate<unsigned NUM>\nclass BitMaskMin : public BitMaskBasic<NUM> {\npublic:\n    void set(size_t idx, bool val) { BitMaskBasic<NUM>::set(idx, val); }\n    int getMinTrue(unsigned startIdx) const {\n        return BitMaskBasic<NUM>::getMinTrue(startIdx);\n    }\n};\n\ntemplate<unsigned NUM>\nclass BitMaskMax : public BitMaskBasic<NUM> {\npublic:\n    void set(size_t idx, bool val) {\n        MALLOC_ASSERT(NUM >= idx + 1, ASSERT_TEXT);\n\n        BitMaskBasic<NUM>::set(NUM - 1 - idx, val);\n    }\n    int getMaxTrue(unsigned startIdx) const {\n        MALLOC_ASSERT(NUM >= startIdx + 1, ASSERT_TEXT);\n\n        int p = BitMaskBasic<NUM>::getMinTrue(NUM-startIdx-1);\n        return -1==p? -1 : (int)NUM - 1 - p;\n    }\n};\n\n\n// The part of thread-specific data that can be modified by other threads.\n// Such modifications must be protected by AllLocalCaches::listLock.\nstruct TLSRemote {\n    TLSRemote *next,\n              *prev;\n};\n\n// The list of all thread-local data; supporting cleanup of thread caches\nclass AllLocalCaches {\n    TLSRemote  *head;\n    MallocMutex listLock; // protects operations in the list\npublic:\n    void registerThread(TLSRemote *tls);\n    void unregisterThread(TLSRemote *tls);\n    bool cleanup(bool cleanOnlyUnused);\n    void markUnused();\n    void reset() { head = nullptr; }\n};\n\nclass LifoList {\npublic:\n    inline LifoList();\n    inline void push(Block *block);\n    inline Block *pop();\n    inline Block *grab();\n\nprivate:\n    std::atomic<Block*> top;\n    MallocMutex lock;\n};\n\n/*\n * When a block that is not completely free is returned for reuse by other threads\n * this is where the block goes.\n *\n * LifoList assumes zero initialization; so below its constructors are omitted,\n * to avoid linking with C++ libraries on Linux.\n */\n\nclass OrphanedBlocks {\n    LifoList bins[numBlockBinLimit];\npublic:\n    Block *get(TLSData *tls, unsigned int size);\n    void put(intptr_t binTag, Block *block);\n    void reset();\n    bool cleanup(Backend* backend);\n};\n\n/* Large objects entities */\n#include \"large_objects.h\"\n\n// select index size for BackRefMain based on word size: default is uint32_t,\n// uint16_t for 32-bit platforms\ntemplate<bool>\nstruct MainIndexSelect {\n    typedef uint32_t main_type;\n};\n\ntemplate<>\nstruct MainIndexSelect<false> {\n    typedef uint16_t main_type;\n};\n\nclass BackRefIdx { // composite index to backreference array\npublic:\n    typedef MainIndexSelect<4 < sizeof(uintptr_t)>::main_type main_t;\nprivate:\n    static const main_t invalid = ~main_t(0);\n    main_t main;      // index in BackRefMain\n    uint16_t largeObj:1;  // is this object \"large\"?\n    uint16_t offset  :15; // offset from beginning of BackRefBlock\npublic:\n    BackRefIdx() : main(invalid), largeObj(0), offset(0) {}\n    bool isInvalid() const { return main == invalid; }\n    bool isLargeObject() const { return largeObj; }\n    main_t getMain() const { return main; }\n    uint16_t getOffset() const { return offset; }\n\n#if __TBB_USE_THREAD_SANITIZER\n    friend\n    __attribute__((no_sanitize(\"thread\")))\n     BackRefIdx dereference(const BackRefIdx* ptr) {\n        BackRefIdx idx;\n        idx.main = ptr->main;\n        idx.largeObj = ptr->largeObj;\n        idx.offset = ptr->offset;\n        return idx;\n    }\n#else\n    friend\n    BackRefIdx dereference(const BackRefIdx* ptr) {\n        return *ptr;\n    }\n#endif\n\n    // only newBackRef can modify BackRefIdx\n    static BackRefIdx newBackRef(bool largeObj);\n};\n\n// Block header is used during block coalescing\n// and must be preserved in used blocks.\nclass BlockI {\n#if __clang__ && !__INTEL_COMPILER\n    #pragma clang diagnostic push\n    #pragma clang diagnostic ignored \"-Wunused-private-field\"\n#endif\n    intptr_t     blockState[2];\n#if __clang__ && !__INTEL_COMPILER\n    #pragma clang diagnostic pop // \"-Wunused-private-field\"\n#endif\n};\n\nstruct LargeMemoryBlock : public BlockI {\n    MemoryPool       *pool;          // owner pool\n    LargeMemoryBlock *next,          // ptrs in list of cached blocks\n                     *prev,\n    // 2-linked list of pool's large objects\n    // Used to destroy backrefs on pool destroy (backrefs are global)\n    // and for object releasing during pool reset.\n                     *gPrev,\n                     *gNext;\n    uintptr_t         age;           // age of block while in cache\n    size_t            objectSize;    // the size requested by a client\n    size_t            unalignedSize; // the size requested from backend\n    BackRefIdx        backRefIdx;    // cached here, used copy is in LargeObjectHdr\n};\n\n// Classes and methods for backend.cpp\n#include \"backend.h\"\n\n// An TBB allocator mode that can be controlled by user\n// via API/environment variable. Must be placed in zero-initialized memory.\n// External synchronization assumed.\n// TODO: TBB_VERSION support\nclass AllocControlledMode {\n    intptr_t val;\n    bool     setDone;\n\npublic:\n    intptr_t get() const {\n        MALLOC_ASSERT(setDone, ASSERT_TEXT);\n        return val;\n    }\n\n    // Note: set() can be called before init()\n    void set(intptr_t newVal) {\n        val = newVal;\n        setDone = true;\n    }\n\n    bool ready() const {\n        return setDone;\n    }\n\n    // envName - environment variable to get controlled mode\n    void initReadEnv(const char *envName, intptr_t defaultVal) {\n        if (!setDone) {\n            // unreferenced formal parameter warning\n            tbb::detail::suppress_unused_warning(envName);\n#if !__TBB_WIN8UI_SUPPORT\n        // TODO: use strtol to get the actual value of the envirable\n            const char *envVal = getenv(envName);\n            if (envVal && !strcmp(envVal, \"1\"))\n                val = 1;\n            else\n#endif\n                val = defaultVal;\n            setDone = true;\n        }\n    }\n};\n\n// Page type to be used inside MapMemory.\n// Regular (4KB aligned), Huge and Transparent Huge Pages (2MB aligned).\nenum PageType {\n    REGULAR = 0,\n    PREALLOCATED_HUGE_PAGE,\n    TRANSPARENT_HUGE_PAGE\n};\n\n// init() and printStatus() is called only under global initialization lock.\n// Race is possible between registerAllocation() and registerReleasing(),\n// harm is that up to single huge page releasing is missed (because failure\n// to get huge page is registered only 1st time), that is negligible.\n// setMode is also can be called concurrently.\n// Object must reside in zero-initialized memory\n// TODO: can we check for huge page presence during every 10th mmap() call\n// in case huge page is released by another process?\nclass HugePagesStatus {\nprivate:\n    AllocControlledMode requestedMode; // changed only by user\n                                       // to keep enabled and requestedMode consistent\n    MallocMutex setModeLock;\n    size_t      pageSize;\n    std::atomic<intptr_t> needActualStatusPrint;\n\n    static void doPrintStatus(bool state, const char *stateName) {\n        // Under macOS* fprintf/snprintf acquires an internal lock, so when\n        // 1st allocation is done under the lock, we got a deadlock.\n        // Do not use fprintf etc during initialization.\n        fputs(\"TBBmalloc: huge pages\\t\", stderr);\n        if (!state)\n            fputs(\"not \", stderr);\n        fputs(stateName, stderr);\n        fputs(\"\\n\", stderr);\n    }\n\n    void parseSystemMemInfo() {\n        bool hpAvailable  = false;\n        bool thpAvailable = false;\n        long long hugePageSize = -1;\n\n#if __unix__\n        // Check huge pages existence\n        long long meminfoHugePagesTotal = 0;\n\n        parseFileItem meminfoItems[] = {\n            // Parse system huge page size\n            { \"Hugepagesize: %lld kB\", hugePageSize },\n            // Check if there are preallocated huge pages on the system\n            // https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt\n            { \"HugePages_Total: %lld\", meminfoHugePagesTotal } };\n\n        parseFile</*BUFF_SIZE=*/100>(\"/proc/meminfo\", meminfoItems);\n\n        // Double check another system information regarding preallocated\n        // huge pages if there are no information in /proc/meminfo\n        long long vmHugePagesTotal = 0;\n\n        parseFileItem vmItem[] = { { \"%lld\", vmHugePagesTotal } };\n\n        // We parse a counter number, it can't be huge\n        parseFile</*BUFF_SIZE=*/100>(\"/proc/sys/vm/nr_hugepages\", vmItem);\n\n        if (hugePageSize > -1 && (meminfoHugePagesTotal > 0 || vmHugePagesTotal > 0)) {\n            MALLOC_ASSERT(hugePageSize != 0, \"Huge Page size can't be zero if we found preallocated.\");\n\n            // Any non zero value clearly states that there are preallocated\n            // huge pages on the system\n            hpAvailable = true;\n        }\n\n        // Check if there is transparent huge pages support on the system\n        long long thpPresent = 'n';\n        parseFileItem thpItem[] = { { \"[alwa%cs] madvise never\\n\", thpPresent } };\n        parseFile</*BUFF_SIZE=*/100>(\"/sys/kernel/mm/transparent_hugepage/enabled\", thpItem);\n\n        if (hugePageSize > -1 && thpPresent == 'y') {\n            MALLOC_ASSERT(hugePageSize != 0, \"Huge Page size can't be zero if we found thp existence.\");\n            thpAvailable = true;\n        }\n#endif\n        MALLOC_ASSERT(!pageSize, \"Huge page size can't be set twice. Double initialization.\");\n\n        // Initialize object variables\n        if (hugePageSize > -1) {\n            pageSize = hugePageSize * 1024; // was read in KB from meminfo\n        } else {\n            pageSize = 0;\n        }\n        isHPAvailable  = hpAvailable;\n        isTHPAvailable = thpAvailable;\n    }\n\npublic:\n\n    // System information\n    bool isHPAvailable;\n    bool isTHPAvailable;\n\n    // User defined value\n    bool isEnabled;\n\n    void init() {\n        parseSystemMemInfo();\n        MallocMutex::scoped_lock lock(setModeLock);\n        requestedMode.initReadEnv(\"TBB_MALLOC_USE_HUGE_PAGES\", 0);\n        isEnabled = (isHPAvailable || isTHPAvailable) && requestedMode.get();\n    }\n\n    // Could be set from user code at any place.\n    // If we didn't call init() at this place, isEnabled will be false\n    void setMode(intptr_t newVal) {\n        MallocMutex::scoped_lock lock(setModeLock);\n        requestedMode.set(newVal);\n        isEnabled = (isHPAvailable || isTHPAvailable) && newVal;\n    }\n\n    void reset() {\n        needActualStatusPrint.store(0, std::memory_order_relaxed);\n        pageSize = 0;\n        isEnabled = isHPAvailable = isTHPAvailable = false;\n    }\n\n    // If memory mapping size is a multiple of huge page size, some OS kernels\n    // can use huge pages transparently. Use this when huge pages are requested.\n    size_t getGranularity() const {\n        if (requestedMode.ready())\n            return requestedMode.get() ? pageSize : 0;\n        else\n            return HUGE_PAGE_SIZE; // the mode is not yet known; assume typical 2MB huge pages\n    }\n\n    void printStatus() {\n        doPrintStatus(requestedMode.get(), \"requested\");\n        if (requestedMode.get()) { // report actual status iff requested\n            if (pageSize)\n                needActualStatusPrint.store(1, std::memory_order_release);\n            else\n                doPrintStatus(/*state=*/false, \"available\");\n        }\n    }\n};\n\nclass AllLargeBlocksList {\n    MallocMutex       largeObjLock;\n    LargeMemoryBlock *loHead;\npublic:\n    void add(LargeMemoryBlock *lmb);\n    void remove(LargeMemoryBlock *lmb);\n    template<bool poolDestroy> void releaseAll(Backend *backend);\n};\n\nstruct ExtMemoryPool {\n    Backend           backend;\n    LargeObjectCache  loc;\n    AllLocalCaches    allLocalCaches;\n    OrphanedBlocks    orphanedBlocks;\n\n    intptr_t          poolId;\n    // To find all large objects. Used during user pool destruction,\n    // to release all backreferences in large blocks (slab blocks do not have them).\n    AllLargeBlocksList lmbList;\n    // Callbacks to be used instead of MapMemory/UnmapMemory.\n    rawAllocType      rawAlloc;\n    rawFreeType       rawFree;\n    size_t            granularity;\n    bool              keepAllMemory,\n                      delayRegsReleasing,\n    // TODO: implements fixedPool with calling rawFree on destruction\n                      fixedPool;\n    TLSKey            tlsPointerKey;  // per-pool TLS key\n\n    std::atomic<int> softCachesCleanupInProgress;\n    std::atomic<int> hardCachesCleanupInProgress;\n\n    bool init(intptr_t poolId, rawAllocType rawAlloc, rawFreeType rawFree,\n              size_t granularity, bool keepAllMemory, bool fixedPool);\n    bool initTLS();\n\n    // i.e., not system default pool for scalable_malloc/scalable_free\n    bool userPool() const { return rawAlloc; }\n\n     // true if something has been released\n    bool softCachesCleanup();\n    bool releaseAllLocalCaches();\n    bool hardCachesCleanup(bool wait);\n    void *remap(void *ptr, size_t oldSize, size_t newSize, size_t alignment);\n    bool reset() {\n        loc.reset();\n        allLocalCaches.reset();\n        orphanedBlocks.reset();\n        bool ret = tlsPointerKey.destroy();\n        backend.reset();\n        return ret;\n    }\n    bool destroy() {\n        MALLOC_ASSERT(isPoolValid(),\n                      \"Possible double pool_destroy or heap corruption\");\n        if (!userPool()) {\n            loc.reset();\n            allLocalCaches.reset();\n        }\n        // pthread_key_dtors must be disabled before memory unmapping\n        // TODO: race-free solution\n        bool ret = tlsPointerKey.destroy();\n        if (rawFree || !userPool())\n            ret &= backend.destroy();\n        // pool is not valid after this point\n        granularity = 0;\n        return ret;\n    }\n    void delayRegionsReleasing(bool mode) { delayRegsReleasing = mode; }\n    inline bool regionsAreReleaseable() const;\n\n    LargeMemoryBlock *mallocLargeObject(MemoryPool *pool, size_t allocationSize);\n    void freeLargeObject(LargeMemoryBlock *lmb);\n    void freeLargeObjectList(LargeMemoryBlock *head);\n#if MALLOC_DEBUG\n    // use granulatity as marker for pool validity\n    bool isPoolValid() const { return granularity; }\n#endif\n};\n\ninline bool Backend::inUserPool() const { return extMemPool->userPool(); }\n\nstruct LargeObjectHdr {\n    LargeMemoryBlock *memoryBlock;\n    /* Backreference points to LargeObjectHdr.\n       Duplicated in LargeMemoryBlock to reuse in subsequent allocations. */\n    BackRefIdx       backRefIdx;\n};\n\nstruct FreeObject {\n    FreeObject  *next;\n};\n\n\n/******* A helper class to support overriding malloc with scalable_malloc *******/\n#if MALLOC_CHECK_RECURSION\n\nclass RecursiveMallocCallProtector {\n    // pointer to an automatic data of holding thread\n    static std::atomic<void*> autoObjPtr;\n    static MallocMutex rmc_mutex;\n    static std::atomic<pthread_t> owner_thread;\n/* Under FreeBSD 8.0 1st call to any pthread function including pthread_self\n   leads to pthread initialization, that causes malloc calls. As 1st usage of\n   RecursiveMallocCallProtector can be before pthread initialized, pthread calls\n   can't be used in 1st instance of RecursiveMallocCallProtector.\n   RecursiveMallocCallProtector is used 1st time in checkInitialization(),\n   so there is a guarantee that on 2nd usage pthread is initialized.\n   No such situation observed with other supported OSes.\n */\n#if __FreeBSD__\n    static bool        canUsePthread;\n#else\n    static const bool  canUsePthread = true;\n#endif\n/*\n  The variable modified in checkInitialization,\n  so can be read without memory barriers.\n */\n    static bool mallocRecursionDetected;\n\n    MallocMutex::scoped_lock* lock_acquired;\n    char scoped_lock_space[sizeof(MallocMutex::scoped_lock)+1];\n    \npublic:\n    RecursiveMallocCallProtector() : lock_acquired(nullptr) {\n        lock_acquired = new (scoped_lock_space) MallocMutex::scoped_lock( rmc_mutex );\n        if (canUsePthread)\n            owner_thread.store(pthread_self(), std::memory_order_relaxed);\n        autoObjPtr.store(&scoped_lock_space, std::memory_order_relaxed);\n    }\n\n    RecursiveMallocCallProtector(RecursiveMallocCallProtector&) = delete;\n    RecursiveMallocCallProtector& operator=(RecursiveMallocCallProtector) = delete;\n\n    ~RecursiveMallocCallProtector() {\n        if (lock_acquired) {\n            autoObjPtr.store(nullptr, std::memory_order_relaxed);\n            lock_acquired->~scoped_lock();\n        }\n    }\n    static bool sameThreadActive() {\n        if (!autoObjPtr.load(std::memory_order_relaxed)) // fast path\n            return false;\n        // Some thread has an active recursive call protector; check if the current one.\n        // Exact pthread_self based test\n        if (canUsePthread) {\n            if (pthread_equal( owner_thread.load(std::memory_order_relaxed), pthread_self() )) {\n                mallocRecursionDetected = true;\n                return true;\n            } else\n                return false;\n        }\n        // inexact stack size based test\n        const uintptr_t threadStackSz = 2*1024*1024;\n        int dummy;\n\n        uintptr_t xi = (uintptr_t)autoObjPtr.load(std::memory_order_relaxed), yi = (uintptr_t)&dummy;\n        uintptr_t diffPtr = xi > yi ? xi - yi : yi - xi;\n\n        return diffPtr < threadStackSz;\n    }\n\n/* The function is called on 1st scalable_malloc call to check if malloc calls\n   scalable_malloc (nested call must set mallocRecursionDetected). */\n    static void detectNaiveOverload() {\n        if (!malloc_proxy) {\n#if __FreeBSD__\n/* If !canUsePthread, we can't call pthread_self() before, but now pthread\n   is already on, so can do it. */\n            if (!canUsePthread) {\n                canUsePthread = true;\n                owner_thread.store(pthread_self(), std::memory_order_relaxed);\n            }\n#endif\n            free(malloc(1));\n        }\n    }\n};\n\n#else\n\nclass RecursiveMallocCallProtector {\npublic:\n    RecursiveMallocCallProtector() {}\n    ~RecursiveMallocCallProtector() {}\n};\n\n#endif  /* MALLOC_CHECK_RECURSION */\n\nunsigned int getThreadId();\n\nbool initBackRefMain(Backend *backend);\nvoid destroyBackRefMain(Backend *backend);\nvoid removeBackRef(BackRefIdx backRefIdx);\nvoid setBackRef(BackRefIdx backRefIdx, void *newPtr);\nvoid *getBackRef(BackRefIdx backRefIdx);\n\n} // namespace internal\n} // namespace rml\n\n#endif // __TBB_tbbmalloc_internal_H\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc/tbbmalloc_internal_api.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_tbbmalloc_internal_api_H\n#define __TBB_tbbmalloc_internal_api_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\ntypedef enum {\n    /* Tune usage of source included allocator. Selected value is large enough\n       to not intercept with constants from AllocationModeParam. */\n    TBBMALLOC_INTERNAL_SOURCE_INCLUDED = 65536\n} AllocationModeInternalParam;\n\nvoid MallocInitializeITT();\nvoid __TBB_mallocProcessShutdownNotification(bool);\n#if _WIN32||_WIN64\nvoid __TBB_mallocThreadShutdownNotification();\n#endif\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif /* __cplusplus */\n\n#endif /* __TBB_tbbmalloc_internal_api_H */\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc_proxy/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2024 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nif (NOT BUILD_SHARED_LIBS)\n    return()\nendif()\n\nadd_library(tbbmalloc_proxy \n    function_replacement.cpp\n    proxy.cpp)\n\nif (WIN32)\n    target_sources(tbbmalloc_proxy PRIVATE tbbmalloc_proxy.rc)\nendif()\n\nadd_library(TBB::tbbmalloc_proxy ALIAS tbbmalloc_proxy)\n\ntarget_compile_definitions(tbbmalloc_proxy\n                           PUBLIC\n                           $<$<CONFIG:DEBUG>:TBB_USE_DEBUG>\n                           PRIVATE\n                           __TBBMALLOCPROXY_BUILD)\n\ntarget_include_directories(tbbmalloc_proxy\n    PUBLIC\n    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include>\n    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)\n\nif (NOT APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL \"GNU\")\n    # gcc 5.0 and later have -Wno-sized-deallocation options\n    set(TBB_WARNING_SUPPRESS ${TBB_WARNING_SUPPRESS}\n                             $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},5.0>>:-Wno-sized-deallocation>)\nendif()\n\ntarget_compile_options(tbbmalloc_proxy\n    PRIVATE\n    ${TBB_CXX_STD_FLAG} # TODO: consider making it PUBLIC.\n    ${TBB_MMD_FLAG}\n    ${TBB_DSE_FLAG}\n    ${TBB_WARNING_LEVEL}\n    ${TBB_WARNING_SUPPRESS}\n    ${TBB_LIB_COMPILE_FLAGS}\n    ${TBB_COMMON_COMPILE_FLAGS}\n)\n\nset_target_properties(tbbmalloc_proxy PROPERTIES\n    VERSION ${TBBMALLOC_BINARY_VERSION}.${TBB_BINARY_MINOR_VERSION}\n    SOVERSION ${TBBMALLOC_BINARY_VERSION})\n\nif (UNIX AND NOT APPLE)\n    # Avoid use of target_link_libraries here as it changes /DEF option to \\DEF on Windows.\n    set_target_properties(tbbmalloc_proxy PROPERTIES\n        LINK_FLAGS \"${TBB_LINK_DEF_FILE_FLAG}\\\"${CMAKE_CURRENT_SOURCE_DIR}/def/${TBB_DEF_FILE_PREFIX}-proxy.def\\\"\"\n        LINK_DEPENDS \"${CMAKE_CURRENT_SOURCE_DIR}/def/${TBB_DEF_FILE_PREFIX}-proxy.def\"\n        DEFINE_SYMBOL \"\")\nendif()\n\n# Prefer using target_link_options instead of target_link_libraries to specify link options because\n# target_link_libraries may incorrectly handle some options (on Windows, for example).\nif (COMMAND target_link_options)\n    target_link_options(tbbmalloc_proxy\n        PRIVATE\n        ${TBB_LIB_LINK_FLAGS}\n        ${TBB_COMMON_LINK_FLAGS}\n    )\nelse()\n    target_link_libraries(tbbmalloc_proxy\n        PRIVATE\n        ${TBB_LIB_LINK_FLAGS}\n        ${TBB_COMMON_LINK_FLAGS}\n    )\nendif()\n\ntarget_link_libraries(tbbmalloc_proxy\n    PRIVATE\n    TBB::tbbmalloc\n    Threads::Threads\n    ${TBB_LIB_LINK_LIBS}\n    ${TBB_COMMON_LINK_LIBS}\n)\n\nif(TBB_BUILD_APPLE_FRAMEWORKS)\n    set_target_properties(tbbmalloc_proxy PROPERTIES \n        FRAMEWORK TRUE\n        FRAMEWORK_VERSION ${TBBMALLOC_BINARY_VERSION}.${TBB_BINARY_MINOR_VERSION}\n        XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER com.intel.tbbmalloc-proxy\n        MACOSX_FRAMEWORK_IDENTIFIER com.intel.tbbmalloc-proxy\n        MACOSX_FRAMEWORK_BUNDLE_VERSION ${TBBMALLOC_BINARY_VERSION}.${TBB_BINARY_MINOR_VERSION}\n        MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${TBBMALLOC_BINARY_VERSION})\nendif()\n\ntbb_install_target(tbbmalloc_proxy)\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc_proxy/def/lin32-proxy.def",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n{\nglobal:\ncalloc;\nfree;\nmalloc;\nrealloc;\nposix_memalign;\nmemalign;\naligned_alloc;\nvalloc;\npvalloc;\nmallinfo;\nmallopt;\nmalloc_usable_size;\n__libc_malloc;\n__libc_realloc;\n__libc_calloc;\n__libc_free;\n__libc_memalign;\n__libc_pvalloc;\n__libc_valloc;\n__TBB_malloc_proxy;\n_ZdaPv; /* next ones are new/delete */\n_ZdaPvRKSt9nothrow_t;\n_ZdlPv;\n_ZdlPvRKSt9nothrow_t;\n_Znaj;\n_ZnajRKSt9nothrow_t;\n_Znwj;\n_ZnwjRKSt9nothrow_t;\n\nlocal:\n\n/* TBB symbols */\n*3rml8internal*;\n*3tbb*;\n*__TBB*;\n\n};\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc_proxy/def/lin64-proxy.def",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n{\nglobal:\ncalloc;\nfree;\nmalloc;\nrealloc;\nposix_memalign;\nmemalign;\naligned_alloc;\nvalloc;\npvalloc;\nmallinfo;\nmallopt;\nmalloc_usable_size;\n__libc_malloc;\n__libc_realloc;\n__libc_calloc;\n__libc_free;\n__libc_memalign;\n__libc_pvalloc;\n__libc_valloc;\n__TBB_malloc_proxy;\n_ZdaPv;  /* next ones are new/delete */\n_ZdaPvRKSt9nothrow_t;\n_ZdlPv;\n_ZdlPvRKSt9nothrow_t;\n_Znam;\n_ZnamRKSt9nothrow_t;\n_Znwm;\n_ZnwmRKSt9nothrow_t;\n\nlocal:\n\n/* TBB symbols */\n*3rml8internal*;\n*3tbb*;\n*__TBB*;\n\n};\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc_proxy/function_replacement.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/detail/_config.h\"\n#include \"oneapi/tbb/detail/_assert.h\"\n#include \"../tbb/assert_impl.h\"\n\n#if !__TBB_WIN8UI_SUPPORT && defined(_WIN32)\n\n#ifndef _CRT_SECURE_NO_DEPRECATE\n#define _CRT_SECURE_NO_DEPRECATE 1\n#endif\n\n// no standard-conforming implementation of snprintf prior to VS 2015\n#if !defined(_MSC_VER) || _MSC_VER>=1900\n#define LOG_PRINT(s, n, format, ...) snprintf(s, n, format, __VA_ARGS__)\n#else\n#define LOG_PRINT(s, n, format, ...) _snprintf_s(s, n, _TRUNCATE, format, __VA_ARGS__)\n#endif\n\n#include <windows.h>\n#include <new>\n#include <stdio.h>\n#include <string.h>\n\n#include \"function_replacement.h\"\n\n// The information about a standard memory allocation function for the replacement log\nstruct FunctionInfo {\n    const char* funcName;\n    const char* dllName;\n};\n\n// Namespace that processes and manages the output of records to the Log journal\n// that will be provided to user by TBB_malloc_replacement_log()\nnamespace Log {\n    // Value of RECORDS_COUNT is set due to the fact that we maximally\n    // scan 8 modules, and in every module we can swap 6 opcodes. (rounded to 8)\n    static const unsigned RECORDS_COUNT = 8 * 8;\n    static const unsigned RECORD_LENGTH = MAX_PATH;\n\n    // Need to add 1 to count of records, because last record must be always nullptr\n    static char *records[RECORDS_COUNT + 1];\n    static bool replacement_status = true;\n\n    // Internal counter that contains number of next string for record\n    static unsigned record_number = 0;\n\n    // Function that writes info about (not)found opcodes to the Log journal\n    // functionInfo - information about a standard memory allocation function for the replacement log\n    // opcodeString - string, that contain byte code of this function\n    // status - information about function replacement status\n    static void record(FunctionInfo functionInfo, const char * opcodeString, bool status) {\n        __TBB_ASSERT(functionInfo.dllName, \"Empty DLL name value\");\n        __TBB_ASSERT(functionInfo.funcName, \"Empty function name value\");\n        __TBB_ASSERT(opcodeString, \"Empty opcode\");\n        __TBB_ASSERT(record_number <= RECORDS_COUNT, \"Incorrect record number\");\n\n        //If some replacement failed -> set status to false\n        replacement_status &= status;\n\n        // If we reach the end of the log, write this message to the last line\n        if (record_number == RECORDS_COUNT) {\n            // %s - workaround to fix empty variable argument parsing behavior in GCC\n            LOG_PRINT(records[RECORDS_COUNT - 1], RECORD_LENGTH, \"%s\", \"Log was truncated.\");\n            return;\n        }\n\n        char* entry = (char*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, RECORD_LENGTH);\n        __TBB_ASSERT(entry, \"Invalid memory was returned\");\n\n        LOG_PRINT(entry, RECORD_LENGTH, \"%s: %s (%s), byte pattern: <%s>\",\n            status ? \"Success\" : \"Fail\", functionInfo.funcName, functionInfo.dllName, opcodeString);\n\n        records[record_number++] = entry;\n    }\n};\n\ninline UINT_PTR Ptr2Addrint(LPVOID ptr)\n{\n    Int2Ptr i2p;\n    i2p.lpv = ptr;\n    return i2p.uip;\n}\n\ninline LPVOID Addrint2Ptr(UINT_PTR ptr)\n{\n    Int2Ptr i2p;\n    i2p.uip = ptr;\n    return i2p.lpv;\n}\n\n// Is the distance between addr1 and addr2 smaller than dist\ninline bool IsInDistance(UINT_PTR addr1, UINT_PTR addr2, __int64 dist)\n{\n    __int64 diff = addr1>addr2 ? addr1-addr2 : addr2-addr1;\n    return diff<dist;\n}\n\n/*\n * When inserting a probe in 64 bits process the distance between the insertion\n * point and the target may be bigger than 2^32. In this case we are using\n * indirect jump through memory where the offset to this memory location\n * is smaller than 2^32 and it contains the absolute address (8 bytes).\n *\n * This class is used to hold the pages used for the above trampolines.\n * Since this utility will be used to replace malloc functions this implementation\n * doesn't allocate memory dynamically.\n *\n * The struct MemoryBuffer holds the data about a page in the memory used for\n * replacing functions in 64-bit code where the target is too far to be replaced\n * with a short jump. All the calculations of m_base and m_next are in a multiple\n * of SIZE_OF_ADDRESS (which is 8 in Win64).\n */\nclass MemoryProvider {\nprivate:\n    struct MemoryBuffer {\n        UINT_PTR m_base;    // base address of the buffer\n        UINT_PTR m_next;    // next free location in the buffer\n        DWORD    m_size;    // size of buffer\n\n        // Default constructor\n        MemoryBuffer() : m_base(0), m_next(0), m_size(0) {}\n\n        // Constructor\n        MemoryBuffer(void *base, DWORD size)\n        {\n            m_base = Ptr2Addrint(base);\n            m_next = m_base;\n            m_size = size;\n        }\n    };\n\nMemoryBuffer *CreateBuffer(UINT_PTR addr)\n    {\n        // No more room in the pages database\n        if (m_lastBuffer - m_pages == MAX_NUM_BUFFERS)\n            return 0;\n\n        void *newAddr = Addrint2Ptr(addr);\n        // Get information for the region which the given address belongs to\n        MEMORY_BASIC_INFORMATION memInfo;\n        if (VirtualQuery(newAddr, &memInfo, sizeof(memInfo)) != sizeof(memInfo))\n            return 0;\n\n        for(;;) {\n            // The new address to check is beyond the current region and aligned to allocation size\n            newAddr = Addrint2Ptr( (Ptr2Addrint(memInfo.BaseAddress) + memInfo.RegionSize + m_allocSize) & ~(UINT_PTR)(m_allocSize-1) );\n\n            // Check that the address is in the right distance.\n            // VirtualAlloc can only round the address down; so it will remain in the right distance\n            if (!IsInDistance(addr, Ptr2Addrint(newAddr), MAX_DISTANCE))\n                break;\n\n            if (VirtualQuery(newAddr, &memInfo, sizeof(memInfo)) != sizeof(memInfo))\n                break;\n\n            if (memInfo.State == MEM_FREE && memInfo.RegionSize >= m_allocSize)\n            {\n                // Found a free region, try to allocate a page in this region\n                void *newPage = VirtualAlloc(newAddr, m_allocSize, MEM_COMMIT|MEM_RESERVE, PAGE_READWRITE);\n                if (!newPage)\n                    break;\n\n                // Add the new page to the pages database\n                MemoryBuffer *pBuff = new (m_lastBuffer) MemoryBuffer(newPage, m_allocSize);\n                ++m_lastBuffer;\n                return pBuff;\n            }\n        }\n\n        // Failed to find a buffer in the distance\n        return 0;\n    }\n\npublic:\n    MemoryProvider()\n    {\n        SYSTEM_INFO sysInfo;\n        GetSystemInfo(&sysInfo);\n        m_allocSize = sysInfo.dwAllocationGranularity;\n        m_lastBuffer = &m_pages[0];\n    }\n\n    // We can't free the pages in the destructor because the trampolines\n    // are using these memory locations and a replaced function might be called\n    // after the destructor was called.\n    ~MemoryProvider()\n    {\n    }\n\n    // Return a memory location in distance less than 2^31 from input address\n    UINT_PTR GetLocation(UINT_PTR addr)\n    {\n        MemoryBuffer *pBuff = m_pages;\n        for (; pBuff<m_lastBuffer && IsInDistance(pBuff->m_next, addr, MAX_DISTANCE); ++pBuff)\n        {\n            if (pBuff->m_next < pBuff->m_base + pBuff->m_size)\n            {\n                UINT_PTR loc = pBuff->m_next;\n                pBuff->m_next += MAX_PROBE_SIZE;\n                return loc;\n            }\n        }\n\n        pBuff = CreateBuffer(addr);\n        if(!pBuff)\n            return 0;\n\n        UINT_PTR loc = pBuff->m_next;\n        pBuff->m_next += MAX_PROBE_SIZE;\n        return loc;\n    }\n\nprivate:\n    MemoryBuffer m_pages[MAX_NUM_BUFFERS];\n    MemoryBuffer *m_lastBuffer;\n    DWORD m_allocSize;\n};\n\nstatic MemoryProvider memProvider;\n\n// Compare opcodes from dictionary (str1) and opcodes from code (str2)\n// str1 might contain '*' to mask addresses\n// RETURN: 0 if opcodes did not match, 1 on success\nsize_t compareStrings( const char *str1, const char *str2 )\n{\n   for (size_t i=0; str1[i]!=0; i++){\n       if( str1[i]!='*' && str1[i]!='#' && str1[i]!=str2[i] ) return 0;\n   }\n   return 1;\n}\n\n// Check function prologue with known prologues from the dictionary\n// opcodes - dictionary\n// inpAddr - pointer to function prologue\n// Dictionary contains opcodes for several full asm instructions\n// + one opcode byte for the next asm instruction for safe address processing\n// RETURN: 1 + the index of the matched pattern, or 0 if no match found.\nstatic UINT CheckOpcodes( const char ** opcodes, void *inpAddr, bool abortOnError, const FunctionInfo* functionInfo = nullptr)\n{\n    static size_t opcodesStringsCount = 0;\n    static size_t maxOpcodesLength = 0;\n    static size_t opcodes_pointer = (size_t)opcodes;\n    char opcodeString[2*MAX_PATTERN_SIZE+1];\n    size_t i;\n    size_t result = 0;\n\n    // Get the values for static variables\n    // max length and number of patterns\n    if( !opcodesStringsCount || opcodes_pointer != (size_t)opcodes ){\n        while( *(opcodes + opcodesStringsCount)!= nullptr ){\n            if( (i=strlen(*(opcodes + opcodesStringsCount))) > maxOpcodesLength )\n                maxOpcodesLength = i;\n            opcodesStringsCount++;\n        }\n        opcodes_pointer = (size_t)opcodes;\n        __TBB_ASSERT( maxOpcodesLength/2 <= MAX_PATTERN_SIZE, \"Pattern exceeded the limit of 28 opcodes/56 symbols\" );\n    }\n\n    // Translate prologue opcodes to string format to compare\n    for( i=0; i<maxOpcodesLength/2 && i<MAX_PATTERN_SIZE; ++i ){\n        sprintf( opcodeString + 2*i, \"%.2X\", *((unsigned char*)inpAddr+i) );\n    }\n    opcodeString[2*i] = 0;\n\n    // Compare translated opcodes with patterns\n    for( UINT idx=0; idx<opcodesStringsCount; ++idx ){\n        result = compareStrings( opcodes[idx],opcodeString );\n        if( result ) {\n            if (functionInfo) {\n                Log::record(*functionInfo, opcodeString, /*status*/ true);\n            }\n            return idx + 1; // avoid 0 which indicates a failure\n        }\n    }\n    if (functionInfo) {\n        Log::record(*functionInfo, opcodeString, /*status*/ false);\n    }\n    if (abortOnError) {\n        // Impossibility to find opcodes in the dictionary is a serious issue,\n        // as if we unable to call original function, leak or crash is expected result.\n        __TBB_ASSERT_RELEASE( false, \"CheckOpcodes failed\" );\n    }\n    return 0;\n}\n\n// Modify offsets in original code after moving it to a trampoline.\n// We do not have more than one offset to correct in existing opcode patterns.\nstatic void CorrectOffset( UINT_PTR address, const char* pattern, UINT distance )\n{\n    const char* pos = strstr(pattern, \"#*******\");\n    if( pos ) {\n        address += (pos - pattern)/2; // compute the offset position\n        UINT value;\n        // UINT assignment is not used to avoid potential alignment issues\n        memcpy(&value, Addrint2Ptr(address), sizeof(value));\n        value += distance;\n        memcpy(Addrint2Ptr(address), &value, sizeof(value));\n    }\n}\n\n// Insert jump relative instruction to the input address\n// RETURN: the size of the trampoline or 0 on failure\nstatic DWORD InsertTrampoline32(void *inpAddr, void *targetAddr, const char* pattern, void** storedAddr)\n{\n    size_t bytesToMove = SIZE_OF_RELJUMP;\n    UINT_PTR srcAddr = Ptr2Addrint(inpAddr);\n    UINT_PTR tgtAddr = Ptr2Addrint(targetAddr);\n    // Check that the target fits in 32 bits\n    if (!IsInDistance(srcAddr, tgtAddr, MAX_DISTANCE))\n        return 0;\n\n    UINT_PTR offset;\n    UINT offset32;\n    UCHAR *codePtr = (UCHAR *)inpAddr;\n\n    if ( storedAddr ){ // If requested, store original function code\n        bytesToMove = strlen(pattern)/2-1; // The last byte matching the pattern must not be copied\n        __TBB_ASSERT_RELEASE( bytesToMove >= SIZE_OF_RELJUMP, \"Incorrect bytecode pattern?\" );\n        UINT_PTR trampAddr = memProvider.GetLocation(srcAddr);\n        if (!trampAddr)\n            return 0;\n        *storedAddr = Addrint2Ptr(trampAddr);\n        // Set 'executable' flag for original instructions in the new place\n        DWORD pageFlags = PAGE_EXECUTE_READWRITE;\n        if (!VirtualProtect(*storedAddr, MAX_PROBE_SIZE, pageFlags, &pageFlags)) return 0;\n        // Copy original instructions to the new place\n        memcpy(*storedAddr, codePtr, bytesToMove);\n        offset = srcAddr - trampAddr;\n        offset32 = (UINT)(offset & 0xFFFFFFFF);\n        CorrectOffset( trampAddr, pattern, offset32 );\n        // Set jump to the code after replacement\n        offset32 -= SIZE_OF_RELJUMP;\n        *(UCHAR*)(trampAddr+bytesToMove) = 0xE9;\n        memcpy((UCHAR*)(trampAddr+bytesToMove+1), &offset32, sizeof(offset32));\n    }\n\n    // The following will work correctly even if srcAddr>tgtAddr, as long as\n    // address difference is less than 2^31, which is guaranteed by IsInDistance.\n    offset = tgtAddr - srcAddr - SIZE_OF_RELJUMP;\n    offset32 = (UINT)(offset & 0xFFFFFFFF);\n    // Insert the jump to the new code\n    *codePtr = 0xE9;\n    memcpy(codePtr+1, &offset32, sizeof(offset32));\n\n    // Fill the rest with NOPs to correctly see disassembler of old code in debugger.\n    for( unsigned i=SIZE_OF_RELJUMP; i<bytesToMove; i++ ){\n        *(codePtr+i) = 0x90;\n    }\n\n    return SIZE_OF_RELJUMP;\n}\n\n// This function is called when the offset doesn't fit in 32 bits\n// 1  Find and allocate a page in the small distance (<2^31) from input address\n// 2  Put jump RIP relative indirect through the address in the close page\n// 3  Put the absolute address of the target in the allocated location\n// RETURN: the size of the trampoline or 0 on failure\nstatic DWORD InsertTrampoline64(void *inpAddr, void *targetAddr, const char* pattern, void** storedAddr)\n{\n    size_t bytesToMove = SIZE_OF_INDJUMP;\n\n    UINT_PTR srcAddr = Ptr2Addrint(inpAddr);\n    UINT_PTR tgtAddr = Ptr2Addrint(targetAddr);\n\n    // Get a location close to the source address\n    UINT_PTR location = memProvider.GetLocation(srcAddr);\n    if (!location)\n        return 0;\n\n    UINT_PTR offset;\n    UINT offset32;\n    UCHAR *codePtr = (UCHAR *)inpAddr;\n\n    // Fill the location\n    UINT_PTR *locPtr = (UINT_PTR *)Addrint2Ptr(location);\n    *locPtr = tgtAddr;\n\n    if ( storedAddr ){ // If requested, store original function code\n        bytesToMove = strlen(pattern)/2-1; // The last byte matching the pattern must not be copied\n        __TBB_ASSERT_RELEASE( bytesToMove >= SIZE_OF_INDJUMP, \"Incorrect bytecode pattern?\" );\n        UINT_PTR trampAddr = memProvider.GetLocation(srcAddr);\n        if (!trampAddr)\n            return 0;\n        *storedAddr = Addrint2Ptr(trampAddr);\n        // Set 'executable' flag for original instructions in the new place\n        DWORD pageFlags = PAGE_EXECUTE_READWRITE;\n        if (!VirtualProtect(*storedAddr, MAX_PROBE_SIZE, pageFlags, &pageFlags)) return 0;\n        // Copy original instructions to the new place\n        memcpy(*storedAddr, codePtr, bytesToMove);\n        offset = srcAddr - trampAddr;\n        offset32 = (UINT)(offset & 0xFFFFFFFF);\n        CorrectOffset( trampAddr, pattern, offset32 );\n        // Set jump to the code after replacement. It is within the distance of relative jump!\n        offset32 -= SIZE_OF_RELJUMP;\n        *(UCHAR*)(trampAddr+bytesToMove) = 0xE9;\n        memcpy((UCHAR*)(trampAddr+bytesToMove+1), &offset32, sizeof(offset32));\n    }\n\n    // Fill the buffer\n    offset = location - srcAddr - SIZE_OF_INDJUMP;\n    offset32 = (UINT)(offset & 0xFFFFFFFF);\n    *(codePtr) = 0xFF;\n    *(codePtr+1) = 0x25;\n    memcpy(codePtr+2, &offset32, sizeof(offset32));\n\n    // Fill the rest with NOPs to correctly see disassembler of old code in debugger.\n    for( unsigned i=SIZE_OF_INDJUMP; i<bytesToMove; i++ ){\n        *(codePtr+i) = 0x90;\n    }\n\n    return SIZE_OF_INDJUMP;\n}\n\n// Insert a jump instruction in the inpAddr to the targetAddr\n// 1. Get the memory protection of the page containing the input address\n// 2. Change the memory protection to writable\n// 3. Call InsertTrampoline32 or InsertTrampoline64\n// 4. Restore memory protection\n// RETURN: FALSE on failure, TRUE on success\nstatic bool InsertTrampoline(void *inpAddr, void *targetAddr, const char ** opcodes, void** origFunc)\n{\n    DWORD probeSize;\n    // Change page protection to EXECUTE+WRITE\n    DWORD origProt = 0;\n    if (!VirtualProtect(inpAddr, MAX_PROBE_SIZE, PAGE_EXECUTE_WRITECOPY, &origProt))\n        return FALSE;\n\n    const char* pattern = nullptr;\n    if ( origFunc ){ // Need to store original function code\n        UCHAR * const codePtr = (UCHAR *)inpAddr;\n        if ( *codePtr == 0xE9 ){ // JMP relative instruction\n            // For the special case when a system function consists of a single near jump,\n            // instead of moving it somewhere we use the target of the jump as the original function.\n            unsigned offsetInJmp = *(unsigned*)(codePtr + 1);\n            *origFunc = (void*)(Ptr2Addrint(inpAddr) + offsetInJmp + SIZE_OF_RELJUMP);\n            origFunc = nullptr; // now it must be ignored by InsertTrampoline32/64\n        } else {\n            // find the right opcode pattern\n            UINT opcodeIdx = CheckOpcodes( opcodes, inpAddr, /*abortOnError=*/true );\n            __TBB_ASSERT( opcodeIdx > 0, \"abortOnError ignored in CheckOpcodes?\" );\n            pattern = opcodes[opcodeIdx-1];  // -1 compensates for +1 in CheckOpcodes\n        }\n    }\n\n    probeSize = InsertTrampoline32(inpAddr, targetAddr, pattern, origFunc);\n    if (!probeSize)\n        probeSize = InsertTrampoline64(inpAddr, targetAddr, pattern, origFunc);\n\n    // Restore original protection\n    VirtualProtect(inpAddr, MAX_PROBE_SIZE, origProt, &origProt);\n\n    if (!probeSize)\n        return FALSE;\n\n    FlushInstructionCache(GetCurrentProcess(), inpAddr, probeSize);\n    FlushInstructionCache(GetCurrentProcess(), origFunc, probeSize);\n\n    return TRUE;\n}\n\n// Routine to replace the functions\n// TODO: replace opcodesNumber with opcodes and opcodes number to check if we replace right code.\nFRR_TYPE ReplaceFunctionA(const char *dllName, const char *funcName, FUNCPTR newFunc, const char ** opcodes, FUNCPTR* origFunc)\n{\n    // Cache the results of the last search for the module\n    // Assume that there was no DLL unload between\n    static char cachedName[MAX_PATH+1];\n    static HMODULE cachedHM = 0;\n\n    if (!dllName || !*dllName)\n        return FRR_NODLL;\n\n    if (!cachedHM || strncmp(dllName, cachedName, MAX_PATH) != 0)\n    {\n        // Find the module handle for the input dll\n        HMODULE hModule = GetModuleHandleA(dllName);\n        if (hModule == 0)\n        {\n            // Couldn't find the module with the input name\n            cachedHM = 0;\n            return FRR_NODLL;\n        }\n\n        cachedHM = hModule;\n        strncpy(cachedName, dllName, MAX_PATH);\n    }\n\n    FARPROC inpFunc = GetProcAddress(cachedHM, funcName);\n    if (inpFunc == 0)\n    {\n        // Function was not found\n        return FRR_NOFUNC;\n    }\n\n    if (!InsertTrampoline((void*)inpFunc, (void*)newFunc, opcodes, (void**)origFunc)){\n        // Failed to insert the trampoline to the target address\n        return FRR_FAILED;\n    }\n\n    return FRR_OK;\n}\n\nFRR_TYPE ReplaceFunctionW(const wchar_t *dllName, const char *funcName, FUNCPTR newFunc, const char ** opcodes, FUNCPTR* origFunc)\n{\n    // Cache the results of the last search for the module\n    // Assume that there was no DLL unload between\n    static wchar_t cachedName[MAX_PATH+1];\n    static HMODULE cachedHM = 0;\n\n    if (!dllName || !*dllName)\n        return FRR_NODLL;\n\n    if (!cachedHM || wcsncmp(dllName, cachedName, MAX_PATH) != 0)\n    {\n        // Find the module handle for the input dll\n        HMODULE hModule = GetModuleHandleW(dllName);\n        if (hModule == 0)\n        {\n            // Couldn't find the module with the input name\n            cachedHM = 0;\n            return FRR_NODLL;\n        }\n\n        cachedHM = hModule;\n        wcsncpy(cachedName, dllName, MAX_PATH);\n    }\n\n    FARPROC inpFunc = GetProcAddress(cachedHM, funcName);\n    if (inpFunc == 0)\n    {\n        // Function was not found\n        return FRR_NOFUNC;\n    }\n\n    if (!InsertTrampoline((void*)inpFunc, (void*)newFunc, opcodes, (void**)origFunc)){\n        // Failed to insert the trampoline to the target address\n        return FRR_FAILED;\n    }\n\n    return FRR_OK;\n}\n\nbool IsPrologueKnown(const char* dllName, const char *funcName, const char **opcodes, HMODULE module)\n{\n    FARPROC inpFunc = GetProcAddress(module, funcName);\n    FunctionInfo functionInfo = { funcName, dllName };\n\n    if (!inpFunc) {\n        Log::record(functionInfo, \"unknown\", /*status*/ false);\n        return false;\n    }\n\n    return CheckOpcodes( opcodes, (void*)inpFunc, /*abortOnError=*/false, &functionInfo) != 0;\n}\n\n// Public Windows API\nextern \"C\" __declspec(dllexport) int TBB_malloc_replacement_log(char *** function_replacement_log_ptr)\n{\n    if (function_replacement_log_ptr != nullptr) {\n        *function_replacement_log_ptr = Log::records;\n    }\n\n    // If we have no logs -> return false status\n    return Log::replacement_status && Log::records[0] != nullptr ? 0 : -1;\n}\n\n#endif /* !__TBB_WIN8UI_SUPPORT && defined(_WIN32) */\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc_proxy/function_replacement.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_function_replacement_H\n#define __TBB_function_replacement_H\n\n#include <stddef.h> //for ptrdiff_t\ntypedef enum {\n    FRR_OK,     /* Succeeded in replacing the function */\n    FRR_NODLL,  /* The requested DLL was not found */\n    FRR_NOFUNC, /* The requested function was not found */\n    FRR_FAILED, /* The function replacement request failed */\n} FRR_TYPE;\n\ntypedef enum {\n    FRR_FAIL,     /* Required function */\n    FRR_IGNORE,   /* optional function */\n} FRR_ON_ERROR;\n\ntypedef void (*FUNCPTR)();\n\n#ifndef UNICODE\n#define ReplaceFunction ReplaceFunctionA\n#else\n#define ReplaceFunction ReplaceFunctionW\n#endif //UNICODE\n\nFRR_TYPE ReplaceFunctionA(const char *dllName, const char *funcName, FUNCPTR newFunc, const char ** opcodes, FUNCPTR* origFunc=nullptr);\nFRR_TYPE ReplaceFunctionW(const wchar_t *dllName, const char *funcName, FUNCPTR newFunc, const char ** opcodes, FUNCPTR* origFunc=nullptr);\n\nbool IsPrologueKnown(const char* dllName, const char *funcName, const char **opcodes, HMODULE module);\n\n// Utilities to convert between ADDRESS and LPVOID\nunion Int2Ptr {\n    UINT_PTR uip;\n    LPVOID lpv;\n};\n\ninline UINT_PTR Ptr2Addrint(LPVOID ptr);\ninline LPVOID Addrint2Ptr(UINT_PTR ptr);\n\n// The size of a trampoline region\nconst unsigned MAX_PROBE_SIZE = 32;\n\n// The size of a jump relative instruction \"e9 00 00 00 00\"\nconst unsigned SIZE_OF_RELJUMP = 5;\n\n// The size of jump RIP relative indirect \"ff 25 00 00 00 00\"\nconst unsigned SIZE_OF_INDJUMP = 6;\n\n// The size of address we put in the location (in Intel64)\nconst unsigned SIZE_OF_ADDRESS = 8;\n\n// The size limit (in bytes) for an opcode pattern to fit into a trampoline\n// There should be enough space left for a relative jump; +1 is for the extra pattern byte.\nconst unsigned MAX_PATTERN_SIZE = MAX_PROBE_SIZE - SIZE_OF_RELJUMP + 1;\n\n// The max distance covered in 32 bits: 2^31 - 1 - C\n// where C should not be smaller than the size of a probe.\n// The latter is important to correctly handle \"backward\" jumps.\nconst __int64 MAX_DISTANCE = (((__int64)1 << 31) - 1) - MAX_PROBE_SIZE;\n\n// The maximum number of distinct buffers in memory\nconst ptrdiff_t MAX_NUM_BUFFERS = 256;\n\n#endif //__TBB_function_replacement_H\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc_proxy/proxy.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __unix__ && !__ANDROID__\n// include <bits/c++config.h> indirectly so that <cstdlib> is not included\n#include <cstddef>\n// include <features.h> indirectly so that <stdlib.h> is not included\n#include <unistd.h>\n// Working around compiler issue with Anaconda's gcc 7.3 compiler package.\n// New gcc ported for old libc may provide their inline implementation\n// of aligned_alloc as required by new C++ standard, this makes it hard to\n// redefine aligned_alloc here. However, running on systems with new libc\n// version, it still needs it to be redefined, thus tricking system headers\n#if defined(__GLIBC_PREREQ)\n#if !__GLIBC_PREREQ(2, 16) && _GLIBCXX_HAVE_ALIGNED_ALLOC\n// tell <cstdlib> that there is no aligned_alloc\n#undef _GLIBCXX_HAVE_ALIGNED_ALLOC\n// trick <stdlib.h> to define another symbol instead\n#define aligned_alloc __hidden_redefined_aligned_alloc\n// Fix the state and undefine the trick\n#include <cstdlib>\n#undef aligned_alloc\n#endif // !__GLIBC_PREREQ(2, 16) && _GLIBCXX_HAVE_ALIGNED_ALLOC\n#endif // defined(__GLIBC_PREREQ)\n#include <cstdlib>\n#endif // __unix__ && !__ANDROID__\n\n#include \"proxy.h\"\n\n#include \"oneapi/tbb/detail/_config.h\"\n#include \"oneapi/tbb/scalable_allocator.h\"\n#include \"../tbb/environment.h\"\n\n#if !defined(__EXCEPTIONS) && !defined(_CPPUNWIND) && !defined(__SUNPRO_CC)\n    #if TBB_USE_EXCEPTIONS\n        #error Compilation settings do not support exception handling. Please do not set TBB_USE_EXCEPTIONS macro or set it to 0.\n    #elif !defined(TBB_USE_EXCEPTIONS)\n        #define TBB_USE_EXCEPTIONS 0\n    #endif\n#elif !defined(TBB_USE_EXCEPTIONS)\n    #define TBB_USE_EXCEPTIONS 1\n#endif\n\n#if MALLOC_UNIXLIKE_OVERLOAD_ENABLED || _WIN32 && !__TBB_WIN8UI_SUPPORT\n/*** internal global operator new implementation (Linux, Windows) ***/\n#include <new>\n\n// Synchronization primitives to protect original library pointers and new_handler\n#include \"../tbbmalloc/Synchronize.h\"\n// Use MallocMutex implementation\ntypedef MallocMutex ProxyMutex;\n\n// Adds aliasing and copy attributes to function if available\n#if defined(__has_attribute)\n    #if __has_attribute(__copy__)\n        #define __TBB_ALIAS_ATTR_COPY(name) __attribute__((alias (#name), __copy__(name)))\n    #endif\n#endif\n\n#ifndef __TBB_ALIAS_ATTR_COPY\n    #define __TBB_ALIAS_ATTR_COPY(name) __attribute__((alias (#name)))\n#endif\n\n// In case there is no std::get_new_handler function\n// which provides synchronized access to std::new_handler\n#if !__TBB_CPP11_GET_NEW_HANDLER_PRESENT\nstatic ProxyMutex new_lock;\n#endif\n\nstatic inline void* InternalOperatorNew(size_t sz) {\n    void* res = scalable_malloc(sz);\n#if TBB_USE_EXCEPTIONS\n    while (!res) {\n        std::new_handler handler;\n#if __TBB_CPP11_GET_NEW_HANDLER_PRESENT\n        handler = std::get_new_handler();\n#else\n        {\n            ProxyMutex::scoped_lock lock(new_lock);\n            handler = std::set_new_handler(0);\n            std::set_new_handler(handler);\n        }\n#endif\n        if (handler) {\n            (*handler)();\n        } else {\n            throw std::bad_alloc();\n        }\n        res = scalable_malloc(sz);\n}\n#endif /* TBB_USE_EXCEPTIONS */\n    return res;\n}\n/*** end of internal global operator new implementation ***/\n#endif // MALLOC_UNIXLIKE_OVERLOAD_ENABLED || _WIN32 && !__TBB_WIN8UI_SUPPORT\n\n#if MALLOC_UNIXLIKE_OVERLOAD_ENABLED || MALLOC_ZONE_OVERLOAD_ENABLED\n\n#ifndef __THROW\n#define __THROW\n#endif\n\n/*** service functions and variables ***/\n#include <string.h> // for memset\n#include <unistd.h> // for sysconf\n\nstatic long memoryPageSize;\n\nstatic inline void initPageSize()\n{\n    memoryPageSize = sysconf(_SC_PAGESIZE);\n}\n\n#if MALLOC_UNIXLIKE_OVERLOAD_ENABLED\n#include <dlfcn.h>\n#include <malloc.h>    // mallinfo\n\n/* __TBB_malloc_proxy used as a weak symbol by libtbbmalloc for:\n   1) detection that the proxy library is loaded\n   2) check that dlsym(\"malloc\") found something different from our replacement malloc\n*/\n\nextern \"C\" TBBMALLOCPROXY_EXPORT void *__TBB_malloc_proxy(size_t) __TBB_ALIAS_ATTR_COPY(malloc);\n\nstatic void *orig_msize;\n\n#elif MALLOC_ZONE_OVERLOAD_ENABLED\n\n#include \"proxy_overload_osx.h\"\n\n#endif // MALLOC_ZONE_OVERLOAD_ENABLED\n\n// Original (i.e., replaced) functions,\n// they are never changed for MALLOC_ZONE_OVERLOAD_ENABLED.\nstatic void *orig_free,\n    *orig_realloc;\n\n#if MALLOC_UNIXLIKE_OVERLOAD_ENABLED\n#define ZONE_ARG\n#define PREFIX(name) name\n\nstatic void *orig_libc_free,\n    *orig_libc_realloc;\n\n// We already tried to find ptr to original functions.\nstatic std::atomic<bool> origFuncSearched{false};\n\ninline void InitOrigPointers()\n{\n    // race is OK here, as different threads found same functions\n    if (!origFuncSearched.load(std::memory_order_acquire)) {\n        orig_free = dlsym(RTLD_NEXT, \"free\");\n        orig_realloc = dlsym(RTLD_NEXT, \"realloc\");\n        orig_msize = dlsym(RTLD_NEXT, \"malloc_usable_size\");\n        orig_libc_free = dlsym(RTLD_NEXT, \"__libc_free\");\n        orig_libc_realloc = dlsym(RTLD_NEXT, \"__libc_realloc\");\n\n        origFuncSearched.store(true, std::memory_order_release);\n    }\n}\n\n/*** replacements for malloc and the family ***/\nextern \"C\" {\n#elif MALLOC_ZONE_OVERLOAD_ENABLED\n\n// each impl_* function has such 1st argument, it's unused\n#define ZONE_ARG struct _malloc_zone_t *,\n#define PREFIX(name) impl_##name\n// not interested in original functions for zone overload\ninline void InitOrigPointers() {}\n\n#endif // MALLOC_UNIXLIKE_OVERLOAD_ENABLED and MALLOC_ZONE_OVERLOAD_ENABLED\n\nTBBMALLOCPROXY_EXPORT void *PREFIX(malloc)(ZONE_ARG size_t size) __THROW\n{\n    return scalable_malloc(size);\n}\n\nTBBMALLOCPROXY_EXPORT void *PREFIX(calloc)(ZONE_ARG size_t num, size_t size) __THROW\n{\n    return scalable_calloc(num, size);\n}\n\nTBBMALLOCPROXY_EXPORT void PREFIX(free)(ZONE_ARG void *object) __THROW\n{\n    InitOrigPointers();\n    __TBB_malloc_safer_free(object, (void (*)(void*))orig_free);\n}\n\nTBBMALLOCPROXY_EXPORT void *PREFIX(realloc)(ZONE_ARG void* ptr, size_t sz) __THROW\n{\n    InitOrigPointers();\n    return __TBB_malloc_safer_realloc(ptr, sz, orig_realloc);\n}\n\n/* The older *NIX interface for aligned allocations;\n   it's formally substituted by posix_memalign and deprecated,\n   so we do not expect it to cause cyclic dependency with C RTL. */\nTBBMALLOCPROXY_EXPORT void *PREFIX(memalign)(ZONE_ARG size_t alignment, size_t size) __THROW\n{\n    return scalable_aligned_malloc(size, alignment);\n}\n\n/* valloc allocates memory aligned on a page boundary */\nTBBMALLOCPROXY_EXPORT void *PREFIX(valloc)(ZONE_ARG size_t size) __THROW\n{\n    if (! memoryPageSize) initPageSize();\n\n    return scalable_aligned_malloc(size, memoryPageSize);\n}\n\n#undef ZONE_ARG\n#undef PREFIX\n\n#if MALLOC_UNIXLIKE_OVERLOAD_ENABLED\n\n// match prototype from system headers\n#if __ANDROID__\nTBBMALLOCPROXY_EXPORT size_t malloc_usable_size(const void *ptr) __THROW\n#else\nTBBMALLOCPROXY_EXPORT size_t malloc_usable_size(void *ptr) __THROW\n#endif\n{\n    InitOrigPointers();\n    return __TBB_malloc_safer_msize(const_cast<void*>(ptr), (size_t (*)(void*))orig_msize);\n}\n\nTBBMALLOCPROXY_EXPORT int posix_memalign(void **memptr, size_t alignment, size_t size) __THROW\n{\n    return scalable_posix_memalign(memptr, alignment, size);\n}\n\n/* pvalloc allocates smallest set of complete pages which can hold\n   the requested number of bytes. Result is aligned on page boundary. */\nTBBMALLOCPROXY_EXPORT void *pvalloc(size_t size) __THROW\n{\n    if (! memoryPageSize) initPageSize();\n    // align size up to the page size,\n    // pvalloc(0) returns 1 page, see man libmpatrol\n    size = size? ((size-1) | (memoryPageSize-1)) + 1 : memoryPageSize;\n\n    return scalable_aligned_malloc(size, memoryPageSize);\n}\n\nTBBMALLOCPROXY_EXPORT int mallopt(int /*param*/, int /*value*/) __THROW\n{\n    return 1;\n}\n\n#if defined(__GLIBC__) || defined(__ANDROID__)\nTBBMALLOCPROXY_EXPORT struct mallinfo mallinfo() __THROW\n{\n    struct mallinfo m;\n    memset(&m, 0, sizeof(struct mallinfo));\n\n    return m;\n}\n#endif\n\n#if __ANDROID__\n// Android doesn't have malloc_usable_size, provide it to be compatible\n// with Linux, in addition overload dlmalloc_usable_size() that presented\n// under Android.\nTBBMALLOCPROXY_EXPORT size_t dlmalloc_usable_size(const void *ptr) __TBB_ALIAS_ATTR_COPY(malloc_usable_size);\n#else // __ANDROID__\n// TODO: consider using __typeof__ to guarantee the correct declaration types\n// C11 function, supported starting GLIBC 2.16\nTBBMALLOCPROXY_EXPORT void *aligned_alloc(size_t alignment, size_t size) __TBB_ALIAS_ATTR_COPY(memalign);\n// Those non-standard functions are exported by GLIBC, and might be used\n// in conjunction with standard malloc/free, so we must overload them.\n// Bionic doesn't have them. Not removing from the linker scripts,\n// as absent entry points are ignored by the linker.\n\nTBBMALLOCPROXY_EXPORT void *__libc_malloc(size_t size) __TBB_ALIAS_ATTR_COPY(malloc);\nTBBMALLOCPROXY_EXPORT void *__libc_calloc(size_t num, size_t size) __TBB_ALIAS_ATTR_COPY(calloc);\nTBBMALLOCPROXY_EXPORT void *__libc_memalign(size_t alignment, size_t size) __TBB_ALIAS_ATTR_COPY(memalign);\nTBBMALLOCPROXY_EXPORT void *__libc_pvalloc(size_t size) __TBB_ALIAS_ATTR_COPY(pvalloc);\nTBBMALLOCPROXY_EXPORT void *__libc_valloc(size_t size) __TBB_ALIAS_ATTR_COPY(valloc);\n\n// call original __libc_* to support naive replacement of free via __libc_free etc\nTBBMALLOCPROXY_EXPORT void __libc_free(void *ptr)\n{\n    InitOrigPointers();\n    __TBB_malloc_safer_free(ptr, (void (*)(void*))orig_libc_free);\n}\n\nTBBMALLOCPROXY_EXPORT void *__libc_realloc(void *ptr, size_t size)\n{\n    InitOrigPointers();\n    return __TBB_malloc_safer_realloc(ptr, size, orig_libc_realloc);\n}\n#endif // !__ANDROID__\n\n} /* extern \"C\" */\n\n/*** replacements for global operators new and delete ***/\n\nTBBMALLOCPROXY_EXPORT void* operator new(size_t sz) {\n    return InternalOperatorNew(sz);\n}\nTBBMALLOCPROXY_EXPORT void* operator new[](size_t sz) {\n    return InternalOperatorNew(sz);\n}\nTBBMALLOCPROXY_EXPORT void operator delete(void* ptr) noexcept {\n    InitOrigPointers();\n    __TBB_malloc_safer_free(ptr, (void (*)(void*))orig_free);\n}\nTBBMALLOCPROXY_EXPORT void operator delete[](void* ptr) noexcept {\n    InitOrigPointers();\n    __TBB_malloc_safer_free(ptr, (void (*)(void*))orig_free);\n}\nTBBMALLOCPROXY_EXPORT void* operator new(size_t sz, const std::nothrow_t&) noexcept {\n    return scalable_malloc(sz);\n}\nTBBMALLOCPROXY_EXPORT void* operator new[](std::size_t sz, const std::nothrow_t&) noexcept {\n    return scalable_malloc(sz);\n}\nTBBMALLOCPROXY_EXPORT void operator delete(void* ptr, const std::nothrow_t&) noexcept {\n    InitOrigPointers();\n    __TBB_malloc_safer_free(ptr, (void (*)(void*))orig_free);\n}\nTBBMALLOCPROXY_EXPORT void operator delete[](void* ptr, const std::nothrow_t&) noexcept {\n    InitOrigPointers();\n    __TBB_malloc_safer_free(ptr, (void (*)(void*))orig_free);\n}\n\n#endif /* MALLOC_UNIXLIKE_OVERLOAD_ENABLED */\n#endif /* MALLOC_UNIXLIKE_OVERLOAD_ENABLED || MALLOC_ZONE_OVERLOAD_ENABLED */\n\n#ifdef _WIN32\n#include <windows.h>\n\n#if !__TBB_WIN8UI_SUPPORT\n\n#include <stdio.h>\n\n#include \"function_replacement.h\"\n\ntemplate<typename T, size_t N> // generic function to find length of array\ninline size_t arrayLength(const T(&)[N]) {\n    return N;\n}\n\nvoid __TBB_malloc_safer_delete( void *ptr)\n{\n    __TBB_malloc_safer_free( ptr, nullptr );\n}\n\nvoid* safer_aligned_malloc( size_t size, size_t alignment )\n{\n    // workaround for \"is power of 2 pow N\" bug that accepts zeros\n    return scalable_aligned_malloc( size, alignment>sizeof(size_t*)?alignment:sizeof(size_t*) );\n}\n\n// we do not support _expand();\nvoid* safer_expand( void *, size_t )\n{\n    return nullptr;\n}\n\n#define __TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(CRTLIB)                                             \\\nvoid (*orig_free_##CRTLIB)(void*);                                                                   \\\nvoid __TBB_malloc_safer_free_##CRTLIB(void *ptr)                                                     \\\n{                                                                                                    \\\n    __TBB_malloc_safer_free( ptr, orig_free_##CRTLIB );                                              \\\n}                                                                                                    \\\n                                                                                                     \\\nvoid (*orig__aligned_free_##CRTLIB)(void*);                                                          \\\nvoid __TBB_malloc_safer__aligned_free_##CRTLIB(void *ptr)                                            \\\n{                                                                                                    \\\n    __TBB_malloc_safer_free( ptr, orig__aligned_free_##CRTLIB );                                     \\\n}                                                                                                    \\\n                                                                                                     \\\nsize_t (*orig__msize_##CRTLIB)(void*);                                                               \\\nsize_t __TBB_malloc_safer__msize_##CRTLIB(void *ptr)                                                 \\\n{                                                                                                    \\\n    return __TBB_malloc_safer_msize( ptr, orig__msize_##CRTLIB );                                    \\\n}                                                                                                    \\\n                                                                                                     \\\nsize_t (*orig__aligned_msize_##CRTLIB)(void*, size_t, size_t);                                       \\\nsize_t __TBB_malloc_safer__aligned_msize_##CRTLIB( void *ptr, size_t alignment, size_t offset)       \\\n{                                                                                                    \\\n    return __TBB_malloc_safer_aligned_msize( ptr, alignment, offset, orig__aligned_msize_##CRTLIB ); \\\n}                                                                                                    \\\n                                                                                                     \\\nvoid* __TBB_malloc_safer_realloc_##CRTLIB( void *ptr, size_t size )                                  \\\n{                                                                                                    \\\n    orig_ptrs func_ptrs = {orig_free_##CRTLIB, orig__msize_##CRTLIB};                                \\\n    return __TBB_malloc_safer_realloc( ptr, size, &func_ptrs );                                      \\\n}                                                                                                    \\\n                                                                                                     \\\nvoid* __TBB_malloc_safer__aligned_realloc_##CRTLIB( void *ptr, size_t size, size_t alignment )       \\\n{                                                                                                    \\\n    orig_aligned_ptrs func_ptrs = {orig__aligned_free_##CRTLIB, orig__aligned_msize_##CRTLIB};       \\\n    return __TBB_malloc_safer_aligned_realloc( ptr, size, alignment, &func_ptrs );                   \\\n}\n\n// Only for ucrtbase: substitution for _o_free\nvoid (*orig__o_free)(void*);\nvoid __TBB_malloc__o_free(void *ptr)\n{\n    __TBB_malloc_safer_free( ptr, orig__o_free );\n}\n// Only for ucrtbase: substitution for _free_base\nvoid(*orig__free_base)(void*);\nvoid __TBB_malloc__free_base(void *ptr)\n{\n    __TBB_malloc_safer_free(ptr, orig__free_base);\n}\n\n// Size limit is MAX_PATTERN_SIZE (28) byte codes / 56 symbols per line.\n// * can be used to match any digit in byte codes.\n// # followed by several * indicate a relative address that needs to be corrected.\n// Purpose of the pattern is to mark an instruction bound; it should consist of several\n// full instructions plus one extra byte code. It's not required for the patterns\n// to be unique (i.e., it's OK to have same pattern for unrelated functions).\n// TODO: use hot patch prologues if exist\nconst char* known_bytecodes[] = {\n#if _WIN64\n//  \"========================================================\" - 56 symbols\n    \"E9********CCCC\",         // multiple - jmp(0xE9) with address followed by empty space (0xCC - INT 3)\n    \"4883EC284885C974\",       // release free()\n    \"4883EC284885C975\",       // release _msize()\n    \"4885C974375348\",         // release free() 8.0.50727.42, 10.0\n    \"C7442410000000008B\",     // release free() ucrtbase.dll 10.0.14393.33\n    \"48895C24085748\",         // release _aligned_msize() ucrtbase.dll 10.0.14393.33\n    \"48894C24084883EC28BA\",   // debug prologue\n    \"4C894424184889542410\",   // debug _aligned_msize() 10.0\n    \"48894C24084883EC2848\",   // debug _aligned_free 10.0\n    \"488BD1488D0D#*******E9\", // _o_free(), ucrtbase.dll\n #if __TBB_OVERLOAD_OLD_MSVCR\n    \"48895C2408574883EC3049\", // release _aligned_msize 9.0\n    \"4883EC384885C975\",       // release _msize() 9.0\n    \"4C8BC1488B0DA6E4040033\", // an old win64 SDK\n #endif\n#else // _WIN32\n//  \"========================================================\" - 56 symbols\n    \"8BFF558BEC8B\",           // multiple\n    \"8BFF558BEC83\",           // release free() & _msize() 10.0.40219.325, _msize() ucrtbase.dll\n    \"8BFF558BECFF\",           // release _aligned_msize ucrtbase.dll\n    \"8BFF558BEC51\",           // release free() & _msize() ucrtbase.dll 10.0.14393.33\n    \"558BEC8B450885C074\",     // release _aligned_free 11.0\n    \"558BEC837D08000F\",       // release _msize() 11.0.51106.1\n    \"558BEC837D08007419FF\",   // release free() 11.0.50727.1\n    \"558BEC8B450885C075\",     // release _aligned_msize() 11.0.50727.1\n    \"558BEC6A018B\",           // debug free() & _msize() 11.0\n    \"558BEC8B451050\",         // debug _aligned_msize() 11.0\n    \"558BEC8B450850\",         // debug _aligned_free 11.0\n    \"8BFF558BEC6A\",           // debug free() & _msize() 10.0.40219.325\n #if __TBB_OVERLOAD_OLD_MSVCR\n    \"6A1868********E8\",       // release free() 8.0.50727.4053, 9.0\n    \"6A1C68********E8\",       // release _msize() 8.0.50727.4053, 9.0\n #endif\n#endif // _WIN64/_WIN32\n    nullptr\n    };\n\n#define __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL_ENTRY(CRT_VER,function_name,dbgsuffix) \\\n    ReplaceFunctionWithStore( #CRT_VER #dbgsuffix \".dll\", #function_name, \\\n      (FUNCPTR)__TBB_malloc_safer_##function_name##_##CRT_VER##dbgsuffix, \\\n      known_bytecodes, (FUNCPTR*)&orig_##function_name##_##CRT_VER##dbgsuffix );\n\n#define __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL_ENTRY_NO_FALLBACK(CRT_VER,function_name,dbgsuffix) \\\n    ReplaceFunctionWithStore( #CRT_VER #dbgsuffix \".dll\", #function_name, \\\n      (FUNCPTR)__TBB_malloc_safer_##function_name##_##CRT_VER##dbgsuffix, 0, nullptr );\n\n#define __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL_ENTRY_REDIRECT(CRT_VER,function_name,dest_func,dbgsuffix) \\\n    ReplaceFunctionWithStore( #CRT_VER #dbgsuffix \".dll\", #function_name, \\\n      (FUNCPTR)__TBB_malloc_safer_##dest_func##_##CRT_VER##dbgsuffix, 0, nullptr );\n\n#define __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL_IMPL(CRT_VER,dbgsuffix)                             \\\n    if (BytecodesAreKnown(#CRT_VER #dbgsuffix \".dll\")) {                                          \\\n      __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL_ENTRY(CRT_VER,free,dbgsuffix)                         \\\n      __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL_ENTRY(CRT_VER,_msize,dbgsuffix)                       \\\n      __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL_ENTRY_NO_FALLBACK(CRT_VER,realloc,dbgsuffix)          \\\n      __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL_ENTRY(CRT_VER,_aligned_free,dbgsuffix)                \\\n      __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL_ENTRY(CRT_VER,_aligned_msize,dbgsuffix)               \\\n      __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL_ENTRY_NO_FALLBACK(CRT_VER,_aligned_realloc,dbgsuffix) \\\n    } else                                                                                        \\\n        SkipReplacement(#CRT_VER #dbgsuffix \".dll\");\n\n#define __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL_RELEASE(CRT_VER) __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL_IMPL(CRT_VER,)\n#define __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL_DEBUG(CRT_VER) __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL_IMPL(CRT_VER,d)\n\n#define __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(CRT_VER)     \\\n    __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL_RELEASE(CRT_VER) \\\n    __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL_DEBUG(CRT_VER)\n\n#if __TBB_OVERLOAD_OLD_MSVCR\n__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr70d);\n__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr70);\n__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr71d);\n__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr71);\n__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr80d);\n__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr80);\n__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr90d);\n__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr90);\n#endif\n__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr100d);\n__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr100);\n__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr110d);\n__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr110);\n__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr120d);\n__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr120);\n__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(ucrtbase);\n\n/*** replacements for global operators new and delete ***/\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n#pragma warning( push )\n#pragma warning( disable : 4290 )\n#endif\n\n/*** operator new overloads internals (Linux, Windows) ***/\n\nvoid* operator_new(size_t sz) {\n    return InternalOperatorNew(sz);\n}\nvoid* operator_new_arr(size_t sz) {\n    return InternalOperatorNew(sz);\n}\nvoid operator_delete(void* ptr) noexcept {\n    __TBB_malloc_safer_delete(ptr);\n}\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n#pragma warning( pop )\n#endif\n\nvoid operator_delete_arr(void* ptr) noexcept {\n    __TBB_malloc_safer_delete(ptr);\n}\nvoid* operator_new_t(size_t sz, const std::nothrow_t&) noexcept {\n    return scalable_malloc(sz);\n}\nvoid* operator_new_arr_t(std::size_t sz, const std::nothrow_t&) noexcept {\n    return scalable_malloc(sz);\n}\nvoid operator_delete_t(void* ptr, const std::nothrow_t&) noexcept {\n    __TBB_malloc_safer_delete(ptr);\n}\nvoid operator_delete_arr_t(void* ptr, const std::nothrow_t&) noexcept {\n    __TBB_malloc_safer_delete(ptr);\n}\n\nstruct Module {\n    const char *name;\n    bool        doFuncReplacement; // do replacement in the DLL\n};\n\nModule modules_to_replace[] = {\n    {\"msvcr100d.dll\", true},\n    {\"msvcr100.dll\", true},\n    {\"msvcr110d.dll\", true},\n    {\"msvcr110.dll\", true},\n    {\"msvcr120d.dll\", true},\n    {\"msvcr120.dll\", true},\n    {\"ucrtbase.dll\", true},\n//    \"ucrtbased.dll\" is not supported because of problems with _dbg functions\n#if __TBB_OVERLOAD_OLD_MSVCR\n    {\"msvcr90d.dll\", true},\n    {\"msvcr90.dll\", true},\n    {\"msvcr80d.dll\", true},\n    {\"msvcr80.dll\", true},\n    {\"msvcr70d.dll\", true},\n    {\"msvcr70.dll\", true},\n    {\"msvcr71d.dll\", true},\n    {\"msvcr71.dll\", true},\n#endif\n#if __TBB_TODO\n    // TODO: Try enabling replacement for non-versioned system binaries below\n    {\"msvcrtd.dll\", true},\n    {\"msvcrt.dll\", true},\n#endif\n    };\n\n/*\nWe need to replace following functions:\nmalloc\ncalloc\n_aligned_malloc\n_expand (by dummy implementation)\n??2@YAPAXI@Z      operator new                         (ia32)\n??_U@YAPAXI@Z     void * operator new[] (size_t size)  (ia32)\n??3@YAXPAX@Z      operator delete                      (ia32)\n??_V@YAXPAX@Z     operator delete[]                    (ia32)\n??2@YAPEAX_K@Z    void * operator new(unsigned __int64)   (intel64)\n??_V@YAXPEAX@Z    void * operator new[](unsigned __int64) (intel64)\n??3@YAXPEAX@Z     operator delete                         (intel64)\n??_V@YAXPEAX@Z    operator delete[]                       (intel64)\n??2@YAPAXIABUnothrow_t@std@@@Z      void * operator new (size_t sz, const std::nothrow_t&) noexcept  (optional)\n??_U@YAPAXIABUnothrow_t@std@@@Z     void * operator new[] (size_t sz, const std::nothrow_t&) noexcept (optional)\n\nand these functions have runtime-specific replacement:\nrealloc\nfree\n_msize\n_aligned_realloc\n_aligned_free\n_aligned_msize\n*/\n\ntypedef struct FRData_t {\n    //char *_module;\n    const char *_func;\n    FUNCPTR _fptr;\n    FRR_ON_ERROR _on_error;\n} FRDATA;\n\nFRDATA c_routines_to_replace[] = {\n    { \"malloc\",  (FUNCPTR)scalable_malloc, FRR_FAIL },\n    { \"calloc\",  (FUNCPTR)scalable_calloc, FRR_FAIL },\n    { \"_aligned_malloc\",  (FUNCPTR)safer_aligned_malloc, FRR_FAIL },\n    { \"_expand\",  (FUNCPTR)safer_expand, FRR_IGNORE },\n};\n\nFRDATA cxx_routines_to_replace[] = {\n#if _WIN64\n    { \"??2@YAPEAX_K@Z\", (FUNCPTR)operator_new, FRR_FAIL },\n    { \"??_U@YAPEAX_K@Z\", (FUNCPTR)operator_new_arr, FRR_FAIL },\n    { \"??3@YAXPEAX@Z\", (FUNCPTR)operator_delete, FRR_FAIL },\n    { \"??_V@YAXPEAX@Z\", (FUNCPTR)operator_delete_arr, FRR_FAIL },\n#else\n    { \"??2@YAPAXI@Z\", (FUNCPTR)operator_new, FRR_FAIL },\n    { \"??_U@YAPAXI@Z\", (FUNCPTR)operator_new_arr, FRR_FAIL },\n    { \"??3@YAXPAX@Z\", (FUNCPTR)operator_delete, FRR_FAIL },\n    { \"??_V@YAXPAX@Z\", (FUNCPTR)operator_delete_arr, FRR_FAIL },\n#endif\n    { \"??2@YAPAXIABUnothrow_t@std@@@Z\", (FUNCPTR)operator_new_t, FRR_IGNORE },\n    { \"??_U@YAPAXIABUnothrow_t@std@@@Z\", (FUNCPTR)operator_new_arr_t, FRR_IGNORE }\n};\n\n#ifndef UNICODE\ntypedef char unicode_char_t;\n#define WCHAR_SPEC \"%s\"\n#else\ntypedef wchar_t unicode_char_t;\n#define WCHAR_SPEC \"%ls\"\n#endif\n\n// Check that we recognize bytecodes that should be replaced by trampolines.\n// If some functions have unknown prologue patterns, replacement should not be done.\nbool BytecodesAreKnown(const unicode_char_t *dllName)\n{\n    const char *funcName[] = {\"free\", \"_msize\", \"_aligned_free\", \"_aligned_msize\", 0};\n    HMODULE module = GetModuleHandle(dllName);\n\n    if (!module)\n        return false;\n    for (int i=0; funcName[i]; i++)\n        if (! IsPrologueKnown(dllName, funcName[i], known_bytecodes, module)) {\n            fprintf(stderr, \"TBBmalloc: skip allocation functions replacement in \" WCHAR_SPEC\n                    \": unknown prologue for function \" WCHAR_SPEC \"\\n\", dllName, funcName[i]);\n            return false;\n        }\n    return true;\n}\n\nvoid SkipReplacement(const unicode_char_t *dllName)\n{\n#ifndef UNICODE\n    const char *dllStr = dllName;\n#else\n    const size_t sz = 128; // all DLL name must fit\n\n    char buffer[sz];\n    size_t real_sz;\n    char *dllStr = buffer;\n\n    errno_t ret = wcstombs_s(&real_sz, dllStr, sz, dllName, sz-1);\n    __TBB_ASSERT(!ret, \"Dll name conversion failed\");\n#endif\n\n    for (size_t i=0; i<arrayLength(modules_to_replace); i++)\n        if (!strcmp(modules_to_replace[i].name, dllStr)) {\n            modules_to_replace[i].doFuncReplacement = false;\n            break;\n        }\n}\n\nvoid ReplaceFunctionWithStore( const unicode_char_t *dllName, const char *funcName, FUNCPTR newFunc, const char ** opcodes, FUNCPTR* origFunc,  FRR_ON_ERROR on_error = FRR_FAIL )\n{\n    FRR_TYPE res = ReplaceFunction( dllName, funcName, newFunc, opcodes, origFunc );\n\n    if (res == FRR_OK || res == FRR_NODLL || (res == FRR_NOFUNC && on_error == FRR_IGNORE))\n        return;\n\n    fprintf(stderr, \"Failed to %s function %s in module %s\\n\",\n            res==FRR_NOFUNC? \"find\" : \"replace\", funcName, dllName);\n\n    // Unable to replace a required function\n    // Aborting because incomplete replacement of memory management functions\n    // may leave the program in an invalid state\n    abort();\n}\n\nvoid doMallocReplacement()\n{\n    // Replace functions and keep backup of original code (separate for each runtime)\n#if __TBB_OVERLOAD_OLD_MSVCR\n    __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(msvcr70)\n    __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(msvcr71)\n    __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(msvcr80)\n    __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(msvcr90)\n#endif\n    __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(msvcr100)\n    __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(msvcr110)\n    __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(msvcr120)\n    __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL_RELEASE(ucrtbase)\n\n    // Replace functions without storing original code\n    for (size_t j = 0; j < arrayLength(modules_to_replace); j++) {\n        if (!modules_to_replace[j].doFuncReplacement)\n            continue;\n        for (size_t i = 0; i < arrayLength(c_routines_to_replace); i++)\n        {\n            ReplaceFunctionWithStore( modules_to_replace[j].name, c_routines_to_replace[i]._func, c_routines_to_replace[i]._fptr, nullptr, nullptr,  c_routines_to_replace[i]._on_error );\n        }\n        if ( strcmp(modules_to_replace[j].name, \"ucrtbase.dll\") == 0 ) {\n            HMODULE ucrtbase_handle = GetModuleHandle(\"ucrtbase.dll\");\n            if (!ucrtbase_handle)\n                continue;\n            // If _o_free function is present and patchable, redirect it to tbbmalloc as well\n            // This prevents issues with other _o_* functions which might allocate memory with malloc\n            if ( IsPrologueKnown(\"ucrtbase.dll\", \"_o_free\", known_bytecodes, ucrtbase_handle)) {\n                ReplaceFunctionWithStore( \"ucrtbase.dll\", \"_o_free\", (FUNCPTR)__TBB_malloc__o_free, known_bytecodes, (FUNCPTR*)&orig__o_free,  FRR_FAIL );\n            }\n            // Similarly for _free_base\n            if (IsPrologueKnown(\"ucrtbase.dll\", \"_free_base\", known_bytecodes, ucrtbase_handle)) {\n                ReplaceFunctionWithStore(\"ucrtbase.dll\", \"_free_base\", (FUNCPTR)__TBB_malloc__free_base, known_bytecodes, (FUNCPTR*)&orig__free_base, FRR_FAIL);\n            }\n            // ucrtbase.dll does not export operator new/delete, so skip the rest of the loop.\n            continue;\n        }\n\n        for (size_t i = 0; i < arrayLength(cxx_routines_to_replace); i++)\n        {\n#if !_WIN64\n            // in Microsoft* Visual Studio* 2012 and 2013 32-bit operator delete consists of 2 bytes only: short jump to free(ptr);\n            // replacement should be skipped for this particular case.\n            if ( ((strcmp(modules_to_replace[j].name, \"msvcr110.dll\") == 0) || (strcmp(modules_to_replace[j].name, \"msvcr120.dll\") == 0)) && (strcmp(cxx_routines_to_replace[i]._func, \"??3@YAXPAX@Z\") == 0) ) continue;\n            // in Microsoft* Visual Studio* 2013 32-bit operator delete[] consists of 2 bytes only: short jump to free(ptr);\n            // replacement should be skipped for this particular case.\n            if ( (strcmp(modules_to_replace[j].name, \"msvcr120.dll\") == 0) && (strcmp(cxx_routines_to_replace[i]._func, \"??_V@YAXPAX@Z\") == 0) ) continue;\n#endif\n            ReplaceFunctionWithStore( modules_to_replace[j].name, cxx_routines_to_replace[i]._func, cxx_routines_to_replace[i]._fptr, nullptr, nullptr,  cxx_routines_to_replace[i]._on_error );\n        }\n    }\n}\n\n#endif // !__TBB_WIN8UI_SUPPORT\n\n#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n    // Suppress warning for UWP build ('main' signature found without threading model)\n    #pragma warning(push)\n    #pragma warning(disable:4447)\n#endif\n\nextern \"C\" BOOL WINAPI DllMain( HINSTANCE hInst, DWORD callReason, LPVOID reserved )\n{\n\n    if ( callReason==DLL_PROCESS_ATTACH && reserved && hInst ) {\n#if !__TBB_WIN8UI_SUPPORT\n        if (!tbb::detail::r1::GetBoolEnvironmentVariable(\"TBB_MALLOC_DISABLE_REPLACEMENT\"))\n        {\n            doMallocReplacement();\n        }\n#endif // !__TBB_WIN8UI_SUPPORT\n    }\n\n    return TRUE;\n}\n\n#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)\n    #pragma warning(pop)\n#endif\n\n// Just to make the linker happy and link the DLL to the application\nextern \"C\" __declspec(dllexport) void __TBB_malloc_proxy()\n{\n\n}\n\n#endif //_WIN32\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc_proxy/proxy.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef _TBB_malloc_proxy_H_\n#define _TBB_malloc_proxy_H_\n\n#define MALLOC_UNIXLIKE_OVERLOAD_ENABLED __linux__\n#define MALLOC_ZONE_OVERLOAD_ENABLED __APPLE__\n\n// MALLOC_UNIXLIKE_OVERLOAD_ENABLED depends on MALLOC_CHECK_RECURSION stuff\n// TODO: limit MALLOC_CHECK_RECURSION to *_OVERLOAD_ENABLED only\n#if __unix__ || __APPLE__ || MALLOC_UNIXLIKE_OVERLOAD_ENABLED\n#define MALLOC_CHECK_RECURSION 1\n#endif\n\n#include \"oneapi/tbb/detail/_config.h\"\n#include <stddef.h>\n\nextern \"C\" {\n    TBBMALLOC_EXPORT void   __TBB_malloc_safer_free( void *ptr, void (*original_free)(void*));\n    TBBMALLOC_EXPORT void * __TBB_malloc_safer_realloc( void *ptr, size_t, void* );\n    TBBMALLOC_EXPORT void * __TBB_malloc_safer_aligned_realloc( void *ptr, size_t, size_t, void* );\n    TBBMALLOC_EXPORT size_t __TBB_malloc_safer_msize( void *ptr, size_t (*orig_msize_crt80d)(void*));\n    TBBMALLOC_EXPORT size_t __TBB_malloc_safer_aligned_msize( void *ptr, size_t, size_t, size_t (*orig_msize_crt80d)(void*,size_t,size_t));\n\n#if MALLOC_ZONE_OVERLOAD_ENABLED\n    TBBMALLOC_EXPORT void   __TBB_malloc_free_definite_size(void *object, size_t size);\n#endif\n} // extern \"C\"\n\n// Struct with original free() and _msize() pointers\nstruct orig_ptrs {\n    void   (*free) (void*);\n    size_t (*msize)(void*);\n};\n\nstruct orig_aligned_ptrs {\n    void   (*aligned_free) (void*);\n    size_t (*aligned_msize)(void*,size_t,size_t);\n};\n\n#endif /* _TBB_malloc_proxy_H_ */\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc_proxy/proxy_overload_osx.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// The original source for this code is\n// Copyright (c) 2011, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#include <AvailabilityMacros.h>\n#include <malloc/malloc.h>\n#include <mach/mach.h>\n#include <stdlib.h>\n\nstatic kern_return_t enumerator(task_t, void *, unsigned, vm_address_t,\n                                memory_reader_t, vm_range_recorder_t)\n{\n    return KERN_FAILURE;\n}\n\nstatic size_t good_size(malloc_zone_t *, size_t size)\n{\n    return size;\n}\n\nstatic boolean_t zone_check(malloc_zone_t *) /* Consistency checker */\n{\n    return true;\n}\n\nstatic void zone_print(malloc_zone_t *, boolean_t) { }\nstatic void zone_log(malloc_zone_t *, void *) {}\nstatic void zone_force_lock(malloc_zone_t *) {}\nstatic void zone_force_unlock(malloc_zone_t *) {}\n\nstatic void zone_statistics(malloc_zone_t *, malloc_statistics_t *s)\n{\n    s->blocks_in_use = 0;\n    s->size_in_use = s->max_size_in_use = s->size_allocated = 0;\n}\n\nstatic boolean_t zone_locked(malloc_zone_t *)\n{\n    return false;\n}\n\nstatic boolean_t impl_zone_enable_discharge_checking(malloc_zone_t *)\n{\n    return false;\n}\n\nstatic void impl_zone_disable_discharge_checking(malloc_zone_t *) {}\nstatic void impl_zone_discharge(malloc_zone_t *, void *) {}\nstatic void impl_zone_destroy(struct _malloc_zone_t *) {}\n\n/* note: impl_malloc_usable_size() is called for each free() call, so it must be fast */\nstatic size_t impl_malloc_usable_size(struct _malloc_zone_t *, const void *ptr)\n{\n    // malloc_usable_size() is used by macOS* to recognize which memory manager\n    // allocated the address, so our wrapper must not redirect to the original function.\n    return __TBB_malloc_safer_msize(const_cast<void*>(ptr), nullptr);\n}\n\nstatic void *impl_malloc(struct _malloc_zone_t *, size_t size);\nstatic void *impl_calloc(struct _malloc_zone_t *, size_t num_items, size_t size);\nstatic void *impl_valloc(struct _malloc_zone_t *, size_t size);\nstatic void impl_free(struct _malloc_zone_t *, void *ptr);\nstatic void *impl_realloc(struct _malloc_zone_t *, void *ptr, size_t size);\nstatic void *impl_memalign(struct _malloc_zone_t *, size_t alignment, size_t size);\n\n/* ptr is in zone and have reported size */\nstatic void impl_free_definite_size(struct _malloc_zone_t*, void *ptr, size_t size)\n{\n    __TBB_malloc_free_definite_size(ptr, size);\n}\n\n/* Empty out caches in the face of memory pressure. */\nstatic size_t impl_pressure_relief(struct _malloc_zone_t *, size_t  /* goal */)\n{\n    return 0;\n}\n\nstatic malloc_zone_t *system_zone = nullptr;\n\nstruct DoMallocReplacement {\n    DoMallocReplacement() {\n        static malloc_introspection_t introspect;\n        memset(&introspect, 0, sizeof(malloc_introspection_t));\n        static malloc_zone_t zone;\n        memset(&zone, 0, sizeof(malloc_zone_t));\n\n        introspect.enumerator = &enumerator;\n        introspect.good_size = &good_size;\n        introspect.check = &zone_check;\n        introspect.print = &zone_print;\n        introspect.log = zone_log;\n        introspect.force_lock = &zone_force_lock;\n        introspect.force_unlock = &zone_force_unlock;\n        introspect.statistics = zone_statistics;\n        introspect.zone_locked = &zone_locked;\n        introspect.enable_discharge_checking = &impl_zone_enable_discharge_checking;\n        introspect.disable_discharge_checking = &impl_zone_disable_discharge_checking;\n        introspect.discharge = &impl_zone_discharge;\n\n        zone.size = &impl_malloc_usable_size;\n        zone.malloc = &impl_malloc;\n        zone.calloc = &impl_calloc;\n        zone.valloc = &impl_valloc;\n        zone.free = &impl_free;\n        zone.realloc = &impl_realloc;\n        zone.destroy = &impl_zone_destroy;\n        zone.zone_name = \"tbbmalloc\";\n        zone.introspect = &introspect;\n        zone.version = 8;\n        zone.memalign = impl_memalign;\n        zone.free_definite_size = &impl_free_definite_size;\n        zone.pressure_relief = &impl_pressure_relief;\n\n        // make sure that default purgeable zone is initialized\n        malloc_default_purgeable_zone();\n        void* ptr = malloc(1);\n        // get all registered memory zones\n        unsigned zcount = 0;\n        malloc_zone_t** zone_array = nullptr;\n        kern_return_t errorcode = malloc_get_all_zones(mach_task_self(),nullptr,(vm_address_t**)&zone_array,&zcount);\n        if (!errorcode && zone_array && zcount>0) {\n            // find the zone that allocated ptr\n            for (unsigned i=0; i<zcount; ++i) {\n                malloc_zone_t* z = zone_array[i];\n                if (z && z->size(z,ptr)>0) { // the right one is found\n                    system_zone = z;\n                    break;\n                }\n            }\n        }\n        free(ptr);\n\n        malloc_zone_register(&zone);\n        if (system_zone) {\n            // after unregistration of the system zone, the last registered (i.e. our) zone becomes the default\n            malloc_zone_unregister(system_zone);\n            // register the system zone back\n            malloc_zone_register(system_zone);\n        }\n    }\n};\n\nstatic DoMallocReplacement doMallocReplacement;\n\n"
  },
  {
    "path": "third-party/tbb/src/tbbmalloc_proxy/tbbmalloc_proxy.rc",
    "content": "// Copyright (c) 2005-2025 Intel Corporation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Includes\n//\n#include <winresrc.h>\n#include \"../../include/oneapi/tbb/version.h\"\n\n/////////////////////////////////////////////////////////////////////////////\n// Neutral resources\n\n#ifdef _WIN32\nLANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL\n#pragma code_page(1252)\n#endif //_WIN32\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Version\n//\n#define TBB_VERNUMBERS TBB_VERSION_MAJOR,TBB_VERSION_MINOR,TBB_VERSION_PATCH\n#define TBB_VERSION TBB_VERSION_STRING\n\nVS_VERSION_INFO VERSIONINFO\n FILEVERSION TBB_VERNUMBERS\n PRODUCTVERSION TBB_VERNUMBERS\n FILEFLAGSMASK 0x17L\n#ifdef _DEBUG\n FILEFLAGS 0x1L\n#else\n FILEFLAGS 0x0L\n#endif\n FILEOS 0x40004L\n FILETYPE 0x2L\n FILESUBTYPE 0x0L\nBEGIN\n    BLOCK \"StringFileInfo\"\n    BEGIN\n        BLOCK \"000004b0\"\n        BEGIN\n            VALUE \"CompanyName\", \"Intel Corporation\\0\"\n            VALUE \"FileDescription\", \"oneAPI Threading Building Blocks (oneTBB) library\\0\"\n            VALUE \"FileVersion\", TBB_VERSION \"\\0\"\n            VALUE \"LegalCopyright\", \"Copyright 2005-2025 Intel Corporation.  All Rights Reserved.\\0\"\n            VALUE \"LegalTrademarks\", \"\\0\"\n#ifndef TBB_USE_DEBUG\n            VALUE \"OriginalFilename\", \"tbbmalloc_proxy.dll\\0\"\n#else\n            VALUE \"OriginalFilename\", \"tbbmalloc_proxy_debug.dll\\0\"\n#endif\n            VALUE \"ProductName\", \"oneAPI Threading Building Blocks (oneTBB)\\0\"\n            VALUE \"ProductVersion\", TBB_VERSION \"\\0\"\n            VALUE \"PrivateBuild\", \"\\0\"\n            VALUE \"SpecialBuild\", \"\\0\"\n        END\n    END\n    BLOCK \"VarFileInfo\"\n    BEGIN\n        VALUE \"Translation\", 0x0, 1200\n    END\nEND\n"
  },
  {
    "path": "third-party/tbb/test/CMakeLists.txt",
    "content": "# Copyright (c) 2020-2025 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ninclude(ProcessorCount)\n\n# General function for test target generation\nfunction(tbb_add_test)\n    set(oneValueArgs SUBDIR NAME SUFFIX)\n    set(multiValueArgs DEPENDENCIES)\n    cmake_parse_arguments(_tbb_test \"${options}\" \"${oneValueArgs}\" \"${multiValueArgs}\" ${ARGN})\n\n    set(_tbb_test_TARGET_NAME ${_tbb_test_NAME})\n    if (_tbb_test_SUFFIX)\n        set(_tbb_test_TARGET_NAME ${_tbb_test_NAME}_${_tbb_test_SUFFIX})\n    endif()\n\n    # Define the target for test\n    add_executable(${_tbb_test_TARGET_NAME} ${_tbb_test_SUBDIR}/${_tbb_test_NAME}.cpp)\n    target_include_directories(${_tbb_test_TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR})\n\n    # cmake>=3.4 no longer adds flags to export symbols from executables (CMP0065)\n    set_property(TARGET ${_tbb_test_TARGET_NAME} PROPERTY ENABLE_EXPORTS TRUE)\n\n    target_compile_options(${_tbb_test_TARGET_NAME}\n        PRIVATE\n        ${TBB_CXX_STD_FLAG}\n        ${TBB_WARNING_LEVEL}\n        # Warning suppression C4324: structure was padded due to alignment specifier\n        $<$<STREQUAL:${MSVC_CXX_ARCHITECTURE_ID},ARM64>:/wd4324>\n        ${TBB_TEST_WARNING_FLAGS}\n        ${TBB_TEST_COMPILE_FLAGS}\n        ${TBB_COMMON_COMPILE_FLAGS}\n    )\n\n    if (TBB_BUILD_APPLE_FRAMEWORKS)\n        add_compile_definitions(TBB_USE_APPLE_FRAMEWORKS)\n    endif()\n\n    if (ANDROID_PLATFORM)\n        # Expand the linker rpath by the CMAKE_LIBRARY_OUTPUT_DIRECTORY path since clang compiler from Android SDK\n        # doesn't respect the -L flag.\n        target_link_libraries(${_tbb_test_TARGET_NAME} PRIVATE \"-Wl,--rpath-link,${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\")\n        add_test(NAME ${_tbb_test_TARGET_NAME}\n                 COMMAND ${CMAKE_COMMAND}\n                         -DBINARIES_PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\n                         -DTEST_NAME=${_tbb_test_TARGET_NAME}\n                         -P ${PROJECT_SOURCE_DIR}/cmake/android/test_launcher.cmake)\n    else()\n        add_test(NAME ${_tbb_test_TARGET_NAME} COMMAND ${_tbb_test_TARGET_NAME} --force-colors=1 WORKING_DIRECTORY ${TBB_TEST_WORKING_DIRECTORY})\n        # Additional testing scenarios if Intel(R) Software Development Emulator is found\n        if (UNIX AND \";test_mutex;conformance_mutex;\" MATCHES \";${_tbb_test_TARGET_NAME};\" AND SDE_EXE)\n            add_test(NAME ${_tbb_test_TARGET_NAME}_SDE COMMAND ${SDE_EXE} -nhm -rtm_mode disabled -- ./${_tbb_test_TARGET_NAME} --force-colors=1 WORKING_DIRECTORY ${TBB_TEST_WORKING_DIRECTORY})\n            set_property(TEST ${_tbb_test_TARGET_NAME}_SDE PROPERTY ENVIRONMENT ${TBB_TESTS_ENVIRONMENT} APPEND)\n        endif()\n    endif()\n\n    set_property(TEST ${_tbb_test_TARGET_NAME} PROPERTY ENVIRONMENT ${TBB_TESTS_ENVIRONMENT} APPEND)\n    set_property(TEST ${_tbb_test_TARGET_NAME} PROPERTY RUN_SERIAL TRUE)\n\n    # Prefer using target_link_options instead of target_link_libraries to specify link options because\n    # target_link_libraries may incorrectly handle some options (on Windows, for example).\n    if (COMMAND target_link_options)\n        target_link_options(${_tbb_test_TARGET_NAME} PRIVATE ${TBB_COMMON_LINK_FLAGS} ${TBB_TEST_LINK_FLAGS})\n    else()\n        target_link_libraries(${_tbb_test_TARGET_NAME} PRIVATE ${TBB_COMMON_LINK_FLAGS} ${TBB_TEST_LINK_FLAGS})\n    endif()\n\n    target_compile_definitions(${_tbb_test_TARGET_NAME} PRIVATE\n        $<$<CONFIG:DEBUG>:TBB_USE_DEBUG>\n        $<$<BOOL:${TBB_CPF}>:__TBB_CPF_BUILD=1>\n        $<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:__TBB_DYNAMIC_LOAD_ENABLED=0>\n        $<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:__TBB_SOURCE_DIRECTLY_INCLUDED=1>\n        $<$<BOOL:${TBB_TCM_TESTING}>:__TBB_TCM_TESTING_ENABLED=1>)\n\n    target_link_libraries(${_tbb_test_TARGET_NAME} PRIVATE ${_tbb_test_DEPENDENCIES} Threads::Threads ${TBB_COMMON_LINK_LIBS})\n\n    if (COMMAND _tbb_run_memcheck)\n        _tbb_run_memcheck(${_tbb_test_NAME} ${_tbb_test_SUBDIR})\n    endif()\nendfunction()\n\n# Function for C test target generation\nfunction(tbb_add_c_test)\n    set(oneValueArgs SUBDIR NAME)\n    set(multiValueArgs DEPENDENCIES)\n    cmake_parse_arguments(_tbb_test \"${options}\" \"${oneValueArgs}\" \"${multiValueArgs}\" ${ARGN})\n\n    # Define the target for test\n\n    add_executable(${_tbb_test_NAME} ${_tbb_test_SUBDIR}/${_tbb_test_NAME}.c)\n    target_include_directories(${_tbb_test_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR})\n\n    if (ANDROID_PLATFORM)\n        add_test(NAME ${_tbb_test_NAME}\n                COMMAND ${CMAKE_COMMAND}\n                        -DBINARIES_PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\n                        -DTEST_NAME=${_tbb_test_NAME}\n                        -P ${PROJECT_SOURCE_DIR}/cmake/android/test_launcher.cmake)\n    else()\n        add_test(NAME ${_tbb_test_NAME} COMMAND ${_tbb_test_NAME} --force-colors=1 WORKING_DIRECTORY ${TBB_TEST_WORKING_DIRECTORY})\n    endif()\n\n    set_property(TEST ${_tbb_test_NAME} PROPERTY ENVIRONMENT ${TBB_TESTS_ENVIRONMENT} APPEND)\n    set_property(TEST ${_tbb_test_NAME} PROPERTY RUN_SERIAL TRUE)\n\n    target_compile_definitions(${_tbb_test_NAME} PRIVATE\n        $<$<CONFIG:DEBUG>:TBB_USE_DEBUG>\n        $<$<BOOL:${TBB_CPF}>:__TBB_CPF_BUILD=1>)\n\n    target_link_libraries(${_tbb_test_NAME} PRIVATE ${_tbb_test_DEPENDENCIES} Threads::Threads)\nendfunction()\n\n# Function for lib test target generation\nfunction(tbb_add_lib_test)\n    set(oneValueArgs SUBDIR NAME)\n    set(multiValueArgs DEPENDENCIES)\n    cmake_parse_arguments(_tbb_test \"${options}\" \"${oneValueArgs}\" \"${multiValueArgs}\" ${ARGN})\n\n    add_library(_${_tbb_test_NAME} ${_tbb_test_SUBDIR}/${_tbb_test_NAME}.cpp)\n\n    target_include_directories(_${_tbb_test_NAME}\n        PUBLIC\n        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>\n        $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>\n        PRIVATE\n        ${CMAKE_CURRENT_SOURCE_DIR}/..\n        ${CMAKE_CURRENT_SOURCE_DIR})\n\n    # TODO: fix warnings\n    if (MSVC)\n        # signed unsigned mismatch, declaration hides class member\n        set(TBB_WARNING_SUPPRESS ${TBB_WARNING_SUPPRESS} /wd4267 /wd4244 /wd4245 /wd4018 /wd4458)\n    endif()\n\n    set(TEST_LIB_COMPILE_FLAGS -D_USRDLL)\n    # TODO: add ${TBB_WARNING_LEVEL} and fix problems\n    target_compile_options(_${_tbb_test_NAME}\n        PRIVATE\n        ${TBB_CXX_STD_FLAG} # TODO: consider making it PUBLIC.\n        ${TBB_MMD_FLAG}\n        ${TBB_DSE_FLAG}\n        ${TBB_LIB_COMPILE_FLAGS}\n        ${TBBMALLOC_LIB_COMPILE_FLAGS}\n        ${TBB_COMMON_COMPILE_FLAGS}\n        ${TEST_LIB_COMPILE_FLAGS}\n    )\n\n    target_compile_definitions(_${_tbb_test_NAME} PRIVATE\n        $<$<CONFIG:DEBUG>:TBB_USE_DEBUG>\n        $<$<BOOL:${TBB_CPF}>:__TBB_CPF_BUILD=1>\n        $<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:__TBB_DYNAMIC_LOAD_ENABLED=0>\n        $<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:__TBB_SOURCE_DIRECTLY_INCLUDED=1>)\n\n\n    # Prefer using target_link_options instead of target_link_libraries to specify link options because\n    # target_link_libraries may incorrectly handle some options (on Windows, for example).\n    if (COMMAND target_link_options)\n        target_link_options(_${_tbb_test_NAME}\n            PRIVATE\n            ${TBB_LIB_LINK_FLAGS}\n            ${TBB_COMMON_LINK_FLAGS}\n        )\n    else()\n        target_link_libraries(_${_tbb_test_NAME}\n            PRIVATE\n            ${TBB_LIB_LINK_FLAGS}\n            ${TBB_COMMON_LINK_FLAGS}\n        )\n    endif()\n\n    target_link_libraries(_${_tbb_test_NAME}\n        PRIVATE\n        Threads::Threads\n        ${_tbb_test_DEPENDENCIES}\n        ${TBB_LIB_LINK_LIBS}\n        ${TBB_COMMON_LINK_LIBS}\n    )\nendfunction()\n\nfunction(_tbb_get_hwloc_runtime_vars)\n    set(oneValueArgs ENV_EXTENSION_VARIABLE)\n    set(multiValueArgs HWLOC_VERSION_LIST)\n    cmake_parse_arguments(_runtime_vars \"${options}\" \"${oneValueArgs}\" \"${multiValueArgs}\" ${ARGN})\n\n    foreach(HWLOC_VERSION ${_runtime_vars_HWLOC_VERSION_LIST})\n        get_target_property(HWLOC_LOCATION HWLOC::${HWLOC_VERSION} IMPORTED_LOCATION)\n        get_filename_component(HWLOC_LOCATION_PATH ${HWLOC_LOCATION} DIRECTORY)\n        list(APPEND LIBRARIES_PATH ${HWLOC_LOCATION_PATH})\n    endforeach()\n\n    if (WIN32)\n        string(REPLACE \";\" \"\\;\" LIBRARIES_PATH \"${LIBRARIES_PATH}\\;$ENV{PATH}\")\n        string(REPLACE \"/\" \"\\\\\" LIBRARIES_PATH \"${LIBRARIES_PATH}\")\n        set(${_runtime_vars_ENV_EXTENSION_VARIABLE} \"PATH=${LIBRARIES_PATH}\" PARENT_SCOPE)\n    else()\n        string(REPLACE \";\" \":\" LIBRARIES_PATH \"${LIBRARIES_PATH}:$ENV{LD_LIBRARY_PATH}\")\n        set(${_runtime_vars_ENV_EXTENSION_VARIABLE} \"LD_LIBRARY_PATH=${LIBRARIES_PATH}\" PARENT_SCOPE)\n    endif()\nendfunction()\n\nfunction(tbb_configure_hwloc_dependent_test)\n    set(oneValueArgs SUBDIR NAME SUFFIX TBBBIND_VERSION)\n    set(multiValueArgs HWLOC_REQUIRED_VERSION_LIST)\n    cmake_parse_arguments(_hwloc_test \"${options}\" \"${oneValueArgs}\" \"${multiValueArgs}\" ${ARGN})\n\n    set(HWLOC_REQUIREMENTS_SATISFIED TRUE)\n    foreach(HWLOC_TARGET ${_hwloc_test_HWLOC_REQUIRED_VERSION_LIST})\n        if (NOT TARGET HWLOC::${HWLOC_TARGET})\n            set(HWLOC_REQUIREMENTS_SATISFIED FALSE)\n        endif()\n    endforeach()\n    if (NOT HWLOC_REQUIREMENTS_SATISFIED)\n        return()\n    endif()\n\n    list(GET _hwloc_test_HWLOC_REQUIRED_VERSION_LIST 0 TEST_HWLOC_VERSION)\n    tbb_add_test(\n        SUBDIR ${_hwloc_test_SUBDIR}\n        NAME ${_hwloc_test_NAME}\n        SUFFIX ${_hwloc_test_SUFFIX}\n        DEPENDENCIES TBB::tbb HWLOC::${TEST_HWLOC_VERSION}\n    )\n\n    _tbb_get_hwloc_runtime_vars(\n        ENV_EXTENSION_VARIABLE HWLOC_RUNTIME_VARS\n        HWLOC_VERSION_LIST ${_hwloc_test_HWLOC_REQUIRED_VERSION_LIST}\n    )\n\n    set_property(TEST ${_hwloc_test_NAME}_${_hwloc_test_SUFFIX} PROPERTY ENVIRONMENT \"${HWLOC_RUNTIME_VARS}\" TBB_VERSION=1 APPEND)\n    set_tests_properties(${_hwloc_test_NAME}_${_hwloc_test_SUFFIX} PROPERTIES\n        PASS_REGULAR_EXPRESSION \"oneTBB: TBBBIND.*${_hwloc_test_TBBBIND_VERSION}\"\n        FAIL_REGULAR_EXPRESSION \"Status:.*FAILURE\"\n    )\n\n    # The tbbbind isn't loading on 32-bit Windows systems with more then 32 available hardware threads\n    if (WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 4 AND SYSTEM_CONCURRENCY GREATER 32)\n        set_tests_properties(${_hwloc_test_NAME}_${_hwloc_test_SUFFIX} PROPERTIES\n            PASS_REGULAR_EXPRESSION \"oneTBB: TBBBIND.*UNAVAILABLE\"\n            FAIL_REGULAR_EXPRESSION \"Status:.*FAILURE\"\n        )\n    else()\n        target_compile_definitions(${_hwloc_test_NAME}_${_hwloc_test_SUFFIX} PRIVATE __TBB_HWLOC_VALID_ENVIRONMENT)\n    endif()\n\n    add_dependencies(test_suite_arena_constraints ${_hwloc_test_NAME}_${_hwloc_test_SUFFIX})\nendfunction()\n\nfunction(tbb_add_tbbbind_test)\n    set(oneValueArgs SUBDIR NAME)\n    cmake_parse_arguments(_tbbbind_test \"${options}\" \"${oneValueArgs}\" \"${multiValueArgs}\" ${ARGN})\n\n    tbb_add_test(SUBDIR ${_tbbbind_test_SUBDIR} NAME ${_tbbbind_test_NAME} DEPENDENCIES TBB::tbb)\n    add_dependencies(test_suite_arena_constraints ${_tbbbind_test_NAME})\n\n    set_property(TEST ${_tbbbind_test_NAME} PROPERTY ENVIRONMENT TBB_VERSION=1 APPEND)\n\n    # Handle the case when HWLOC was found using pkg-config\n    if (NOT DEFINED HWLOC_TARGET_EXPLICITLY_DEFINED AND TARGET PkgConfig::HWLOC)\n        set_tests_properties(${_tbbbind_test_NAME} PROPERTIES\n            PASS_REGULAR_EXPRESSION \"oneTBB: TBBBIND.*${TBBBIND_LIBRARY_NAME}\"\n            FAIL_REGULAR_EXPRESSION \"Status: FAILURE!\"\n        )\n        target_link_libraries(${_tbbbind_test_NAME} PRIVATE PkgConfig::HWLOC)\n        target_compile_definitions(${_tbbbind_test_NAME} PRIVATE __TBB_HWLOC_VALID_ENVIRONMENT)\n        return()\n    endif()\n\n    # Disable all HWLOC dependent tests in case of unsupported environment.\n    if (TBB_WINDOWS_DRIVER OR ANDROID_PLATFORM OR APPLE OR NOT BUILD_SHARED_LIBS)\n        return()\n    endif()\n    ProcessorCount(SYSTEM_CONCURRENCY)\n\n    # Make sure fake HWLOC is found before system one\n    if (UNIX AND NOT TARGET HWLOC::hwloc_stub AND NOT TBB_TCM_TESTING)\n        # The idea is to produce fake HWLOC library and link it with the test\n        # to ensure that TBBBind won't be loaded in order to simulate the case\n        # when real HWLOC is not present in the system.\n        file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/stubhwloc.cpp \"void hwloc_stub(){}\")\n        add_library(hwloc_stub SHARED ${CMAKE_CURRENT_BINARY_DIR}/stubhwloc.cpp)\n        add_library(HWLOC::hwloc_stub ALIAS hwloc_stub)\n\n        set_target_properties(hwloc_stub PROPERTIES\n            OUTPUT_NAME \"hwloc\" SOVERSION 15\n        )\n    endif()\n\n    set_tests_properties(${_tbbbind_test_NAME} PROPERTIES\n        PASS_REGULAR_EXPRESSION \"oneTBB: TBBBIND.*UNAVAILABLE\"\n        FAIL_REGULAR_EXPRESSION \"Status:.*FAILURE\"\n    )\n\n    if (TARGET HWLOC::hwloc_stub)\n        _tbb_get_hwloc_runtime_vars(\n            ENV_EXTENSION_VARIABLE HWLOC_RUNTIME_VARS\n            HWLOC_VERSION_LIST \"hwloc_stub\"\n        )\n        target_link_libraries(${_tbbbind_test_NAME} PRIVATE HWLOC::hwloc_stub)\n\n        set_property(TEST ${_tbbbind_test_NAME} PROPERTY ENVIRONMENT \"${HWLOC_RUNTIME_VARS}\" APPEND)\n    endif()\n\n    if (TARGET HWLOC::hwloc_2_5 AND NOT HWLOC_2_5_TESTS_STATUS_SHOWN)\n        message(STATUS \"HWLOC 2.5 dependent tests were enabled.\")\n        set(HWLOC_2_5_TESTS_STATUS_SHOWN TRUE PARENT_SCOPE)\n    endif()\n\n    if (TARGET HWLOC::hwloc_2 AND NOT HWLOC_2_TESTS_STATUS_SHOWN)\n        message(STATUS \"HWLOC 2 dependent tests were enabled.\")\n        set(HWLOC_2_TESTS_STATUS_SHOWN TRUE PARENT_SCOPE)\n    endif()\n\n    if (TARGET HWLOC::hwloc_1_11 AND NOT HWLOC_1_11_TESTS_STATUS_SHOWN)\n        message(STATUS \"HWLOC 1.11 dependent tests were enabled.\")\n        set(HWLOC_1_11_TESTS_STATUS_SHOWN TRUE PARENT_SCOPE)\n    endif()\n\n    list(APPEND HWLOC_TEST_CASES\n        hwloc_2_5\n        hwloc_2\n        hwloc_1_11\n        hwloc_2_5_hwloc_2\n        hwloc_2_5_hwloc_1_11\n        hwloc_2_hwloc_1_11\n        hwloc_2_5_hwloc_2_hwloc_1_11\n        incompatible_hwlocs_1_11_vs_2_5\n        incompatible_hwlocs_1_11_vs_2\n    )\n\n    list(APPEND HWLOC_TEST_CASE_0_VARS tbbbind_2_5 \"hwloc_2_5\")\n    list(APPEND HWLOC_TEST_CASE_1_VARS tbbbind_2   \"hwloc_2\")\n    list(APPEND HWLOC_TEST_CASE_2_VARS tbbbind     \"hwloc_1_11\")\n    list(APPEND HWLOC_TEST_CASE_3_VARS tbbbind_2_5 \"hwloc_2_5,hwloc_2\")\n    list(APPEND HWLOC_TEST_CASE_4_VARS tbbbind_2_5 \"hwloc_2_5,hwloc_1_11\")\n    list(APPEND HWLOC_TEST_CASE_5_VARS tbbbind_2   \"hwloc_2,hwloc_1_11\")\n    list(APPEND HWLOC_TEST_CASE_6_VARS tbbbind_2_5 \"hwloc_2_5,hwloc_2,hwloc_1_11\")\n    list(APPEND HWLOC_TEST_CASE_7_VARS tbbbind_2_5 \"hwloc_1_11,hwloc_2_5\")\n    list(APPEND HWLOC_TEST_CASE_8_VARS tbbbind_2   \"hwloc_1_11,hwloc_2\")\n\n    foreach(TEST_CASE ${HWLOC_TEST_CASES})\n        list(FIND HWLOC_TEST_CASES ${TEST_CASE} TEST_CASE_INDEX)\n        list(GET HWLOC_TEST_CASE_${TEST_CASE_INDEX}_VARS 0 TEST_CASE_TBBBIND_EXPECTED_VERSION)\n        list(GET HWLOC_TEST_CASE_${TEST_CASE_INDEX}_VARS 1 TEST_CASE_TBBBIND_HWLOC_REQUIRED_VERSIONS)\n        string(REPLACE \",\" \";\" TEST_CASE_TBBBIND_HWLOC_REQUIRED_VERSIONS \"${TEST_CASE_TBBBIND_HWLOC_REQUIRED_VERSIONS}\")\n\n        tbb_configure_hwloc_dependent_test(\n            SUBDIR ${_tbbbind_test_SUBDIR}\n            NAME ${_tbbbind_test_NAME}\n            SUFFIX ${TEST_CASE}\n            TBBBIND_VERSION ${TEST_CASE_TBBBIND_EXPECTED_VERSION}\n            HWLOC_REQUIRED_VERSION_LIST ${TEST_CASE_TBBBIND_HWLOC_REQUIRED_VERSIONS}\n        )\n    endforeach()\nendfunction()\n\n# Copy libraries to test folder to make it visible during tests execution if external TBB is tested.\n# TODO: check and update for multi-config generators.\nif (TBB_FOUND)\n    list(APPEND _tbb_test_components tbb tbbmalloc tbbmalloc_proxy tbbbind tbbbind_2_0 tbbbind_2_5)\n    foreach(_component ${_tbb_test_components})\n        if (TARGET TBB::${_component})\n            get_property(${_component}_lib_file_location TARGET TBB::${_component} PROPERTY LOCATION)\n            file(COPY ${${_component}_lib_file_location} DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})\n            unset(${_component}_lib_file_location CACHE)\n        endif()\n    endforeach()\n    unset(_tbb_test_components)\nendif()\n\n# Find Intel(R) Software Development Emulator to run test_mutex and conformance_mutex for coverage\nset(_sde_find_name sde)\n\nif (UNIX AND TBB_ARCH EQUAL 64)\n    set(_sde_find_name sde64)\nendif()\n\nfind_program(SDE_EXE\n    NAMES ${_sde_find_name}\n    PATHS ENV PATH\n    PATH_SUFFIXES bin)\n\nunset(_sde_find_name)\n\n# Common target for the tbbbind related tests\nadd_custom_target(test_suite_arena_constraints)\n\n# Check support for --no-as-needed linker option\nif (MINGW OR NOT WIN32)\n    include(CheckCXXSourceCompiles)\n    set(CMAKE_REQUIRED_LIBRARIES \"-Wl,--no-as-needed\")\n    check_cxx_source_compiles(\"int main(int, char*[]) { return 0; }\" LINKER_HAS_NO_AS_NEEDED)\n    unset(CMAKE_REQUIRED_LIBRARIES)\nendif()\n\nif (TARGET TBB::tbb)\n    # Define the tests\n    tbb_add_test(SUBDIR tbb NAME test_tick_count DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_allocators DEPENDENCIES TBB::tbb)\n    if (NOT TBB_TCM_TESTING)\n        tbb_add_test(SUBDIR tbb NAME test_arena_priorities DEPENDENCIES TBB::tbb)\n    endif()\n    tbb_add_test(SUBDIR tbb NAME test_dynamic_link DEPENDENCIES TBB::tbb)\n    if (LINKER_HAS_NO_AS_NEEDED)\n        # The linker may not detect a dependency on pthread in static variable constructors.\n        target_link_libraries(test_dynamic_link PRIVATE \"-Wl,--no-as-needed\")\n    endif()\n    if (APPLE OR ANDROID_PLATFORM)\n        target_link_libraries(test_dynamic_link PRIVATE -rdynamic)\n    endif()\n    if (WIN32 AND NOT TBB_TCM_TESTING)\n        tbb_add_test(SUBDIR tbb NAME test_numa_dist DEPENDENCIES TBB::tbb)\n    endif()\n    tbb_add_test(SUBDIR tbb NAME test_collaborative_call_once DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_concurrent_lru_cache DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_concurrent_unordered_map DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_concurrent_unordered_set DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_concurrent_map DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_concurrent_set DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_concurrent_priority_queue DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_partitioner DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_parallel_for DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_parallel_for_each DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_parallel_reduce DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_parallel_sort DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_parallel_invoke DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_parallel_scan DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_parallel_pipeline DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_eh_algorithms DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_blocked_range DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_concurrent_vector DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_task_group DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_concurrent_hash_map DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_task_arena DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_parallel_phase DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_enumerable_thread_specific DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_concurrent_queue DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_resumable_tasks DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_mutex DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_function_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_multifunction_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_broadcast_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_buffer_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_composite_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_continue_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_eh_flow_graph DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_flow_graph DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_flow_graph_priorities DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_flow_graph_whitebox DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_indexer_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_join_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_join_node_key_matching DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_join_node_key_matching_n_args DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_join_node_msg_key_matching DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_join_node_msg_key_matching_n_args DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_join_node_preview DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_limiter_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_priority_queue_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_queue_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_sequencer_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_split_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_tagged_msg DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_overwrite_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_write_once_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_async_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_input_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_profiling DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_concurrent_queue_whitebox DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_intrusive_list DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_semaphore DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_environment_whitebox DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_hw_concurrency DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_eh_thread DEPENDENCIES TBB::tbb)\n    if (NOT TBB_TCM_TESTING)\n        tbb_add_test(SUBDIR tbb NAME test_global_control DEPENDENCIES TBB::tbb)\n    endif()\n    tbb_add_test(SUBDIR tbb NAME test_task DEPENDENCIES TBB::tbb)\n    if (TBB_TCM_TESTING AND NOT WINDOWS_STORE AND NOT TBB_WINDOWS_DRIVER)\n        add_test(NAME test_tcm_enabled COMMAND test_task --force-colors=1 WORKING_DIRECTORY ${TBB_TEST_WORKING_DIRECTORY})\n        set_tests_properties(test_tcm_enabled PROPERTIES\n            ENVIRONMENT \"TBB_VERSION=1;TCM_ENABLE=1\"\n            PASS_REGULAR_EXPRESSION \"TCM: VERSION.*\"\n            FAIL_REGULAR_EXPRESSION \"TCM: TCM *disabled\"\n        )\n        add_test(NAME test_tcm_disabled COMMAND test_task --force-colors=1 WORKING_DIRECTORY ${TBB_TEST_WORKING_DIRECTORY})\n        set_tests_properties(test_tcm_disabled PROPERTIES\n            ENVIRONMENT \"TBB_VERSION=1;TCM_ENABLE=0\"\n            PASS_REGULAR_EXPRESSION \"TCM: TCM *disabled\"\n        )\n    endif()\n\n    if (TBB_FUZZ_TESTING AND NOT WIN32)\n        if (NOT ((CMAKE_CXX_COMPILER_ID STREQUAL Clang) OR (CMAKE_CXX_COMPILER_ID STREQUAL IntelLLVM)))\n            message(FATAL_ERROR \"Fuzzing requires Clang or IntelLLVM compiler.\")\n        endif()\n        tbb_add_test(SUBDIR tbb NAME test_fuzzing)\n        add_dependencies(test_fuzzing test_task)\n        target_compile_definitions(test_fuzzing PRIVATE CMD=\"$<TARGET_FILE:test_task> >/dev/null 2>&1\")\n        target_link_options(test_fuzzing PRIVATE -fsanitize=fuzzer)\n    endif()\n\n    tbb_add_test(SUBDIR tbb NAME test_concurrent_monitor DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR tbb NAME test_scheduler_mix DEPENDENCIES TBB::tbb)\n\n    # test_handle_perror\n    tbb_add_test(SUBDIR tbb NAME test_handle_perror)\n    target_include_directories(test_handle_perror PRIVATE\n        $<TARGET_PROPERTY:TBB::tbb,INTERFACE_INCLUDE_DIRECTORIES>\n    )\n\n    # HWLOC related test\n    if (NOT TBB_EMSCRIPTEN)\n        tbb_add_tbbbind_test(SUBDIR tbb NAME test_arena_constraints)\n    endif()\n\n    if ((NOT \"${CMAKE_SYSTEM_PROCESSOR}\" MATCHES \"mips\") AND (NOT TBB_EMSCRIPTEN))\n        # TODO: Fix for MIPS\n        tbb_add_test(SUBDIR tbb NAME test_tbb_fork DEPENDENCIES TBB::tbb)\n    endif()\n\n    tbb_add_test(SUBDIR tbb NAME test_tbb_header DEPENDENCIES TBB::tbb)\n    target_sources(test_tbb_header PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/tbb/test_tbb_header_secondary.cpp)\n    if (TBB_OPENMP_FLAG AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES \"(mips)\")\n        tbb_add_test(SUBDIR tbb NAME test_openmp DEPENDENCIES TBB::tbb)\n\n        set_target_properties(test_openmp PROPERTIES COMPILE_FLAGS ${TBB_OPENMP_FLAG})\n\n        if (NOT TBB_OPENMP_NO_LINK_FLAG)\n            set_target_properties(test_openmp PROPERTIES LINK_FLAGS ${TBB_OPENMP_FLAG})\n        endif()\n    endif()\n\n    # Define the conformance tests\n    tbb_add_test(SUBDIR conformance NAME conformance_tick_count DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_allocators DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_mutex DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_task_group DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_task_group_context DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_task_arena DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_collaborative_call_once DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_concurrent_lru_cache DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_concurrent_unordered_map DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_concurrent_unordered_set DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_concurrent_map DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_concurrent_set DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_concurrent_priority_queue DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_parallel_for DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_parallel_for_each DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_parallel_reduce DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_parallel_scan DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_parallel_sort DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_parallel_pipeline DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_parallel_invoke DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_blocked_range DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_blocked_range2d DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_blocked_range3d DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_blocked_nd_range DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_concurrent_vector DEPENDENCIES TBB::tbb)\n    if (NOT TBB_TCM_TESTING)\n        tbb_add_test(SUBDIR conformance NAME conformance_global_control DEPENDENCIES TBB::tbb)\n    endif()\n    tbb_add_test(SUBDIR conformance NAME conformance_concurrent_hash_map DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_enumerable_thread_specific DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_combinable DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_concurrent_queue DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_resumable_tasks DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_version DEPENDENCIES TBB::tbb)\n    # functional nodes conformance\n    tbb_add_test(SUBDIR conformance NAME conformance_function_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_multifunction_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_input_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_continue_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_async_node DEPENDENCIES TBB::tbb)\n    # buffering nodes conformance\n    tbb_add_test(SUBDIR conformance NAME conformance_overwrite_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_write_once_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_buffer_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_queue_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_priority_queue_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_sequencer_node DEPENDENCIES TBB::tbb)\n    # service nodes conformance\n    tbb_add_test(SUBDIR conformance NAME conformance_limiter_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_broadcast_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_composite_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_indexer_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_split_node DEPENDENCIES TBB::tbb)\n    tbb_add_test(SUBDIR conformance NAME conformance_join_node DEPENDENCIES TBB::tbb)\n    # flowraph auxiliary conformance\n    # TODO: add conformance tests for graph_node, continue_msg, tagged_msg, copy_body, input_port, output_port, make_edge, remove_edge\n    tbb_add_test(SUBDIR conformance NAME conformance_graph DEPENDENCIES TBB::tbb)\n\n    # HWLOC related conformance\n    if (NOT TBB_EMSCRIPTEN)\n        tbb_add_tbbbind_test(SUBDIR conformance NAME conformance_arena_constraints)\n    endif()\n\n    if (MSVC AND BUILD_SHARED_LIBS AND CMAKE_VERSION VERSION_GREATER 3.13) # LINK_OPTIONS property first appeared in 3.13\n                                                    # version of the CMake\n        tbb_add_test(SUBDIR tbb NAME test_implicit_linkage_on_windows)\n        # TODO: consider setting environment instead of passing additional\n        #       compiler and linker options\n        target_include_directories(test_implicit_linkage_on_windows PRIVATE\n        $<TARGET_PROPERTY:TBB::tbb,INTERFACE_INCLUDE_DIRECTORIES>)\n        set_target_properties(test_implicit_linkage_on_windows PROPERTIES\n        LINK_OPTIONS LINKER:/LIBPATH:$<TARGET_LINKER_FILE_DIR:TBB::tbb>)\n        add_dependencies(test_implicit_linkage_on_windows TBB::tbb)\n    endif()\nendif()\n\nif (TARGET TBB::tbbmalloc)\n    # TBB allocator tests\n    if (NOT \"${CMAKE_SYSTEM_PROCESSOR}\" MATCHES \"mips\")\n        if (NOT TBB_EMSCRIPTEN)\n            # Define TBB malloc tests\n\t    tbb_add_test(SUBDIR tbbmalloc NAME test_scalable_allocator DEPENDENCIES TBB::tbbmalloc)\n            tbb_add_test(SUBDIR tbbmalloc NAME test_malloc_pools DEPENDENCIES TBB::tbbmalloc)\n            tbb_add_test(SUBDIR tbbmalloc NAME test_malloc_init_shutdown DEPENDENCIES TBB::tbbmalloc)\n            tbb_add_test(SUBDIR tbbmalloc NAME test_malloc_regression DEPENDENCIES TBB::tbbmalloc)\n            if (TARGET TBB::tbb)\n                tbb_add_test(SUBDIR tbbmalloc NAME test_malloc_shutdown_hang DEPENDENCIES TBB::tbb TBB::tbbmalloc)\n            endif()\n\n            if (NOT (WINDOWS_STORE OR TBB_WINDOWS_DRIVER))\n                # TODO: Consider adding following tests on WINDOWS_STORE and TBB_WINDOWS_DRIVER platforms\n                tbb_add_test(SUBDIR tbbmalloc NAME test_malloc_compliance DEPENDENCIES TBB::tbbmalloc)\n                tbb_add_lib_test(SUBDIR tbbmalloc NAME test_malloc_used_by_lib DEPENDENCIES TBB::tbbmalloc)\n                tbb_add_test(SUBDIR tbbmalloc NAME test_malloc_used_by_lib DEPENDENCIES _test_malloc_used_by_lib)\n                tbb_add_lib_test(SUBDIR tbbmalloc NAME test_malloc_lib_unload)\n                tbb_add_test(SUBDIR tbbmalloc NAME test_malloc_lib_unload DEPENDENCIES _test_malloc_lib_unload)\n            endif()\n\n            enable_language(C)\n            tbb_add_c_test(SUBDIR tbbmalloc NAME test_malloc_pure_c DEPENDENCIES TBB::tbbmalloc)\n        endif()\n        # ----------------------------------------------------------------------------------------\n        # Whitebox testing\n        if (NOT TBB_EMSCRIPTEN)\n\t    add_executable(test_malloc_whitebox tbbmalloc/test_malloc_whitebox.cpp)\n\n            target_include_directories(test_malloc_whitebox\n                PRIVATE\n                ${CMAKE_CURRENT_SOURCE_DIR}/../include\n                ${CMAKE_CURRENT_SOURCE_DIR}/..\n                ${CMAKE_CURRENT_SOURCE_DIR})\n            target_compile_definitions(test_malloc_whitebox PRIVATE __TBBMALLOC_BUILD)\n            target_compile_options(test_malloc_whitebox\n                PRIVATE\n                ${TBB_CXX_STD_FLAG}\n                ${TBB_WARNING_SUPPRESS}\n                ${TBB_TEST_COMPILE_FLAGS}\n                ${TBB_COMMON_COMPILE_FLAGS}\n                ${TBBMALLOC_LIB_COMPILE_FLAGS}\n            )\n            if (ANDROID_PLATFORM)\n                add_test(NAME test_malloc_whitebox\n                        COMMAND ${CMAKE_COMMAND}\n                                -DBINARIES_PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\n                                -DTEST_NAME=test_malloc_whitebox\n                                -P ${PROJECT_SOURCE_DIR}/cmake/android/test_launcher.cmake)\n            else()\n                add_test(NAME test_malloc_whitebox COMMAND test_malloc_whitebox --force-colors=1)\n            endif()\n            if (COMMAND target_link_options)\n                target_link_options(test_malloc_whitebox PRIVATE ${TBB_COMMON_LINK_FLAGS})\n            else()\n                target_link_libraries(test_malloc_whitebox PRIVATE ${TBB_COMMON_LINK_FLAGS})\n            endif()\n            target_link_libraries(test_malloc_whitebox PRIVATE Threads::Threads ${TBB_COMMON_LINK_LIBS})\n        endif()\n        # ------------------------------------------------------------------------------------------\n\n        # Define TBB malloc conformance tests\n        # tbbmalloc_add_test(conformance conformance_scalable_allocator)\n\n        if (\"${CMAKE_MSVC_RUNTIME_LIBRARY}\" STREQUAL MultiThreaded OR \"${CMAKE_MSVC_RUNTIME_LIBRARY}\" STREQUAL MultiThreadedDebug)\n            if (\"${CMAKE_MSVC_RUNTIME_LIBRARY}\" STREQUAL MultiThreaded)\n                set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreadedDLL)\n            else()\n                set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreadedDebugDLL)\n            endif()\n        endif()\n\n        # Thread Sanitizer overloads memory management routines that conflicts with tbbmalloc_proxy.\n        if (BUILD_SHARED_LIBS AND NOT TBB_SANITIZE MATCHES \"thread\" AND TBBMALLOC_PROXY_BUILD AND NOT MSVC_CXX_ARCHITECTURE_ID MATCHES \"ARM64\")\n            # Define TBB malloc proxy tests\n            tbb_add_lib_test(SUBDIR tbbmalloc NAME test_malloc_atexit DEPENDENCIES TBB::tbbmalloc_proxy TBB::tbbmalloc)\n\t    if (NOT TBB_EMSCRIPTEN)\n\t        tbb_add_test(SUBDIR tbbmalloc NAME test_malloc_atexit DEPENDENCIES TBB::tbbmalloc_proxy TBB::tbbmalloc _test_malloc_atexit)\n\t    endif()\n            tbb_add_test(SUBDIR tbbmalloc NAME test_malloc_overload DEPENDENCIES TBB::tbbmalloc_proxy)\n            tbb_add_test(SUBDIR tbbmalloc NAME test_malloc_overload_disable DEPENDENCIES TBB::tbbmalloc_proxy TBB::tbbmalloc) # safer_msize call need to be available\n            tbb_add_test(SUBDIR tbbmalloc NAME test_malloc_new_handler DEPENDENCIES TBB::tbbmalloc_proxy)\n        endif()\n    endif()\nendif()\n\nunset(HWLOC_2_5_TESTS_STATUS_SHOWN)\nunset(HWLOC_2_TESTS_STATUS_SHOWN)\nunset(HWLOC_1_11_TESTS_STATUS_SHOWN)\n"
  },
  {
    "path": "third-party/tbb/test/common/allocator_overload.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef tbb_test_harness_allocator_overload_H\n#define tbb_test_harness_allocator_overload_H\n\n#include \"config.h\"\n\n#include \"../src/tbbmalloc_proxy/proxy.h\" // for MALLOC_UNIXLIKE_OVERLOAD_ENABLED, MALLOC_ZONE_OVERLOAD_ENABLED\n#include \"oneapi/tbb/detail/_config.h\" // for __TBB_WIN8UI_SUPPORT\n\n// Skip configurations with unsupported system malloc overload:\n// skip unsupported MSVCs, WIN8UI and MINGW (it doesn't define _MSC_VER),\n// no support for MSVC 2015 and greater in debug for now,\n// don't use defined(_MSC_VER), because result of using defined() in macro expansion is undefined\n#define MALLOC_WINDOWS_OVERLOAD_ENABLED ((_WIN32||_WIN64) && !__TBB_WIN8UI_SUPPORT && _MSC_VER >= 1500 && !(_MSC_VER >= 1900 && _DEBUG))\n\n// Skip configurations with unsupported system malloc overload:\n// * overload via linking with -lmalloc_proxy is broken in offload,\n// as the library is loaded too late in that mode,\n// * LD_PRELOAD mechanism is broken in offload\n#define HARNESS_SKIP_TEST (!MALLOC_WINDOWS_OVERLOAD_ENABLED && !MALLOC_UNIXLIKE_OVERLOAD_ENABLED && !MALLOC_ZONE_OVERLOAD_ENABLED)\n\n#endif // tbb_test_harness_allocator_overload_H\n"
  },
  {
    "path": "third-party/tbb/test/common/allocator_stl_test_common.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// Tests for compatibility with the host's STL.\n\n#ifndef __TBB_test_common_allocator_stl_test_H_\n#define __TBB_test_common_allocator_stl_test_H_\n\n#include \"common/test.h\"\n\ntemplate<typename Container>\nvoid TestSequence(const typename Container::allocator_type &a) {\n    constexpr auto iter_count = 1000;\n    Container c(a);\n    for(int i = 0; i < iter_count; ++i){\n        c.push_back(i * i);\n    }\n    typename Container::const_iterator p = c.begin();\n    for(int i = 0; i < iter_count; ++i) {\n        REQUIRE(*p == i*i);\n        ++p;\n    }\n    // regression test against compilation error for GCC 4.6.2\n    c.resize(1000);\n}\n\ntemplate<typename Set>\nvoid TestSet(const typename Set::allocator_type &a) {\n    Set s(typename Set::key_compare(), a);\n    using value_type = typename Set::value_type;\n    for(int i = 0; i < 100; ++i)\n        s.insert(value_type(3 * i));\n    for( int i = 0; i < 300; ++i ) {\n        REQUIRE(s.erase(i) == size_t(i % 3 == 0));\n    }\n}\n\ntemplate<typename Map>\nvoid TestMap(const typename Map::allocator_type &a) {\n    Map m(typename Map::key_compare(), a);\n    using value_type = typename Map::value_type;\n    for(int i = 0; i < 100; ++i)\n        m.insert(value_type(i,i*i));\n    for(int i=0; i < 100; ++i)\n        REQUIRE(m.find(i)->second == i * i);\n}\n\n#include <deque>\n#include <list>\n#include <map>\n#include <set>\n#include <vector>\n\nstruct MoveOperationTracker {\n    int my_value;\n\n    MoveOperationTracker(int value = 0) : my_value(value) {}\n    MoveOperationTracker(const MoveOperationTracker&) {\n        REQUIRE_MESSAGE(false, \"Copy constructor is called\");\n    }\n    MoveOperationTracker(MoveOperationTracker&& m) noexcept : my_value( m.my_value ) {\n    }\n    MoveOperationTracker& operator=(MoveOperationTracker const&) {\n        REQUIRE_MESSAGE(false, \"Copy assignment operator is called\");\n        return *this;\n    }\n    MoveOperationTracker& operator=(MoveOperationTracker&& m) noexcept {\n        my_value = m.my_value;\n        return *this;\n    }\n\n    bool operator==(int value) const {\n        return my_value == value;\n    }\n\n    bool operator==(const MoveOperationTracker& m) const {\n        return my_value == m.my_value;\n    }\n};\n\ntemplate<typename Allocator>\nvoid TestAllocatorWithSTL(const Allocator &a = Allocator()) {\n\n// Allocator type conversion section\n    using Ai = typename std::allocator_traits<Allocator>::template rebind_alloc<int>;\n    using Acii = typename std::allocator_traits<Allocator>::template rebind_alloc<std::pair<const int, int> >;\n#if _MSC_VER && _CPPLIB_VER < 650\n    using Aci = typename std::allocator_traits<Allocator>::template rebind_alloc<const int>;\n    using Aii = typename std::allocator_traits<Allocator>::template rebind_alloc<std::pair<int, int> >;\n#endif // _MSC_VER\n\n    // Sequenced containers\n    TestSequence<std::deque <int,Ai> >(a);\n    TestSequence<std::list  <int,Ai> >(a);\n    TestSequence<std::vector<int,Ai> >(a);\n\n    using Amot = typename std::allocator_traits<Allocator>::template rebind_alloc<MoveOperationTracker>;\n    TestSequence<std::deque <MoveOperationTracker, Amot> >(a);\n    TestSequence<std::list  <MoveOperationTracker, Amot> >(a);\n    TestSequence<std::vector<MoveOperationTracker, Amot> >(a);\n\n    // Associative containers\n    TestSet<std::set     <int, std::less<int>, Ai> >(a);\n    TestSet<std::multiset<int, std::less<int>, Ai> >(a);\n    TestMap<std::map     <int, int, std::less<int>, Acii> >(a);\n    TestMap<std::multimap<int, int, std::less<int>, Acii> >(a);\n\n#if _MSC_VER && _CPPLIB_VER < 650\n    // Test compatibility with Microsoft's implementation of std::allocator for some cases that\n    // are undefined according to the ISO standard but permitted by Microsoft.\n    TestSequence<std::deque <const int,Aci> >(a);\n#if _CPPLIB_VER>=500\n    TestSequence<std::list  <const int,Aci> >(a);\n#endif\n    TestSequence<std::vector<const int,Aci> >(a);\n    TestSet<std::set<const int, std::less<int>, Aci> >(a);\n    TestMap<std::map<int, int, std::less<int>, Aii> >(a);\n    TestMap<std::map<const int, int, std::less<int>, Acii> >(a);\n    TestMap<std::multimap<int, int, std::less<int>, Aii> >(a);\n    TestMap<std::multimap<const int, int, std::less<int>, Acii> >(a);\n#endif /* _MSC_VER */\n}\n#endif // __TBB_test_common_allocator_stl_test_H_\n"
  },
  {
    "path": "third-party/tbb/test/common/allocator_test_common.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// Basic testing of an allocator\n// Tests against requirements in 20.1.5 of ISO C++ Standard (1998).\n// Does not check for thread safety or false sharing issues.\n//\n// Tests for compatibility with the host's STL are in\n// test_Allocator_STL.h.  Those tests are in a separate file\n// because they bring in lots of STL headers, and the tests here\n// are supposed to work in the abscense of STL.\n\n#ifndef __TBB_test_common_allocator_test_common_H_\n#define __TBB_test_common_allocator_test_common_H_\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include <utility> //for std::pair\n#include <cstring>\n\n//! Compile-time error if x and y have different types\ntemplate<typename T>\nvoid AssertSameType( const T& /*x*/, const T& /*y*/ ) {}\n\n//! The function to zero-initialize arrays; useful to avoid warnings\ntemplate <typename T>\nvoid zero_fill(void* array, size_t n) {\n    memset(array, 0, sizeof(T)*n);\n}\n\ntemplate<typename A>\nstruct is_zero_filling {\n    static const bool value = false;\n};\n\nint NumberOfFoo;\n\ntemplate<typename T, size_t N>\nstruct Foo {\n    T foo_array[N];\n    Foo() {\n        zero_fill<T>(foo_array, N);\n        ++NumberOfFoo;\n    }\n    Foo( const Foo& x ) {\n        *this = x;\n        //Internal call of assignment\n    }\n    Foo& operator=( const Foo& x ) {\n        for (size_t i = 0; i < N; i++)\n            foo_array[i] = x.foo_array[i];\n        ++NumberOfFoo;\n        return *this;\n    }\n\n    ~Foo() {\n        --NumberOfFoo;\n    }\n};\n\ninline char PseudoRandomValue( size_t j, size_t k ) {\n    return char(j*3 ^ j>>4 ^ k);\n}\n\n#if __APPLE__\n#include <fcntl.h>\n#include <unistd.h>\n\n// A RAII class to disable stderr in a certain scope. It's not thread-safe.\nclass DisableStderr {\n    int stderrCopy;\n    static void dupToStderrAndClose(int fd) {\n        int ret = dup2(fd, STDERR_FILENO); // close current stderr\n        REQUIRE(ret != -1);\n        ret = close(fd);\n        REQUIRE(ret != -1);\n    }\npublic:\n    DisableStderr() {\n        int devNull = open(\"/dev/null\", O_WRONLY);\n        REQUIRE(devNull != -1);\n        stderrCopy = dup(STDERR_FILENO);\n        REQUIRE(stderrCopy != -1);\n        dupToStderrAndClose(devNull);\n    }\n    ~DisableStderr() {\n        dupToStderrAndClose(stderrCopy);\n    }\n};\n#endif\n\n//! T is type and A is allocator for that type\ntemplate<typename T, typename A>\nvoid TestBrokenAllocator(A& a) {\n    T x;\n    const T cx = T();\n    // See Table 32 in ISO ++ Standard\n    typename A::pointer px = &x;\n    typename A::const_pointer pcx = &cx;\n\n    typename A::reference rx = x;\n    REQUIRE(&rx == &x);\n\n    typename A::const_reference rcx = cx;\n    REQUIRE(&rcx==&cx);\n\n    typename A::value_type v = x;\n\n    typename A::size_type size;\n    size = 0;\n    --size;\n    REQUIRE_MESSAGE(size > 0, \"not an unsigned integral type?\");\n\n    typename A::difference_type difference;\n    difference = 0;\n    --difference;\n    REQUIRE_MESSAGE(difference<0, \"not an signed integral type?\");\n\n    // \"rebind\" tested by our caller\n\n    REQUIRE(a.address(rx) == px);\n\n    REQUIRE(a.address(rcx) == pcx);\n\n    // Test \"a.max_size()\"\n    AssertSameType(a.max_size(), typename A::size_type(0));\n    // Following assertion catches case where max_size() is so large that computation of\n    // number of bytes for such an allocation would overflow size_type.\n    REQUIRE_MESSAGE((a.max_size() * typename A::size_type(sizeof(T)) >= a.max_size()), \"max_size larger than reasonable\");\n\n    // Test \"a.construct(p,t)\"\n    int n = NumberOfFoo;\n    typename A::pointer p = a.allocate(1);\n    a.construct(p, cx);\n    REQUIRE_MESSAGE(NumberOfFoo == n + 1, \"constructor for Foo not called?\");\n\n    // Test \"a.destroy(p)\"\n    a.destroy(p);\n    REQUIRE_MESSAGE(NumberOfFoo == n, \"destructor for Foo not called?\");\n    a.deallocate(p, 1);\n\n    {\n        typedef typename A::template rebind<std::pair<typename A::value_type, typename A::value_type> >::other pair_allocator_type;\n        pair_allocator_type pair_allocator(a);\n        int NumberOfFooBeforeConstruct = NumberOfFoo;\n        typename pair_allocator_type::pointer pair_pointer = pair_allocator.allocate(1);\n        pair_allocator.construct(pair_pointer, cx, cx);\n        REQUIRE_MESSAGE(NumberOfFoo == NumberOfFooBeforeConstruct+2, \"constructor for Foo not called appropriate number of times?\");\n\n        pair_allocator.destroy(pair_pointer);\n        REQUIRE_MESSAGE(NumberOfFoo == NumberOfFooBeforeConstruct, \"destructor for Foo not called appropriate number of times?\");\n        pair_allocator.deallocate(pair_pointer, 1);\n    }\n}\n\n//! T is type and A is allocator for that type\ntemplate<typename T, typename A>\nvoid TestAllocatorConcept(A& a) {\n    // Test \"a.allocate(p,n)\n    typename std::allocator_traits<A>::pointer array[100];\n    std::size_t sizeof_T = sizeof(T);\n    for(std::size_t k = 0; k < 100; ++k) {\n        array[k] = a.allocate(k);\n        char* s = reinterpret_cast<char*>(reinterpret_cast<void*>(array[k]));\n        for(std::size_t j=0; j < k * sizeof_T; ++j)\n            s[j] = PseudoRandomValue(j, k);\n    }\n\n    // Test \"a.deallocate(p,n)\n    for(std::size_t k = 0; k < 100; ++k) {\n        char* s = reinterpret_cast<char*>(reinterpret_cast<void*>(array[k]));\n        for(std::size_t j = 0; j < k * sizeof_T; ++j)\n            REQUIRE(s[j] == PseudoRandomValue(j, k));\n        a.deallocate(array[k], k);\n    }\n}\n\n//! T is type and A is allocator for that type\ntemplate<typename T, typename A>\nvoid TestAllocatorExceptions(A& a) {\n#if TBB_USE_EXCEPTIONS\n    volatile size_t too_big = (~std::size_t(0) - 1024 * 1024) / sizeof(T);\n    bool exception_caught = false;\n    typename std::allocator_traits<A>::pointer p1 = nullptr;\n    try {\n#if __APPLE__\n        // On macOS*, failure to map memory results in messages to stderr;\n        // suppress them.\n        DisableStderr disableStderr;\n#endif\n        p1 = a.allocate(too_big);\n    } catch (std::bad_alloc&) {\n        exception_caught = true;\n    }\n    REQUIRE_MESSAGE(exception_caught, \"allocate expected to throw bad_alloc\");\n    a.deallocate(p1, too_big);\n#endif // TBB_USE_EXCEPTIONS\n    utils::suppress_unused_warning(a);\n}\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    // Workaround for erroneous \"conditional expression is constant\" warning in method check_allocate.\n    #pragma warning (disable: 4127)\n#endif\n\n// A is an allocator for some type\ntemplate<typename A>\nstruct Body: utils::NoAssign {\n    using pointer_type = typename std::allocator_traits<A>::pointer;\n    using value_type = typename std::allocator_traits<A>::value_type;\n    // For the int types and above this test runs too long\n    static const std::size_t max_k = sizeof(value_type) < sizeof(int) ? 100000 : 5000;\n    A &a;\n    Body(A &a_) : a(a_) {}\n    void check_allocate(pointer_type array[], std::size_t i, std::size_t t) const\n    {\n        REQUIRE(array[i] == nullptr);\n        std::size_t size = i * (i & 3);\n        array[i] = a.allocate(size);\n        REQUIRE_MESSAGE(array[i] != nullptr, \"allocator returned null\");\n        char* s = reinterpret_cast<char*>(reinterpret_cast<void*>(array[i]));\n        for(std::size_t j = 0; j < size * sizeof(value_type); ++j) {\n            if(is_zero_filling<typename std::allocator_traits<A>::template rebind_alloc<void>>::value)\n                REQUIRE(!s[j]);\n            s[j] = PseudoRandomValue(i, t);\n        }\n    }\n\n    void check_deallocate(pointer_type array[], std::size_t i, std::size_t t) const\n    {\n        REQUIRE(array[i] != nullptr);\n        size_t size = i * (i & 3);\n        char* s = reinterpret_cast<char*>(reinterpret_cast<void*>(array[i]));\n        for(std::size_t j=0; j < size * sizeof(value_type); ++j)\n            REQUIRE_MESSAGE(s[j] == PseudoRandomValue(i, t), \"Thread safety test failed\");\n        a.deallocate(array[i], size);\n        array[i] = nullptr;\n    }\n\n    void operator()(std::size_t thread_id) const {\n        pointer_type array[256];\n\n        for(std::size_t k = 0; k < 256; ++k)\n            array[k] = nullptr;\n        for(std::size_t k = 0; k < max_k; ++k) {\n            std::size_t i = static_cast<unsigned char>(PseudoRandomValue(k, thread_id));\n            if(!array[i]) check_allocate(array, i, thread_id);\n            else check_deallocate(array, i, thread_id);\n        }\n        for(std::size_t k = 0; k < 256; ++k)\n            if(array[k])\n                check_deallocate(array, k, thread_id);\n    }\n};\n\ntemplate<typename A>\nvoid TestThreadSafety(A &a) {\n    utils::NativeParallelFor(4, Body<A>(a));\n}\n\nenum TestName { Concept, Broken, Exceptions, ThreadSafety, Comparison };\n\ntemplate<typename Allocator>\nvoid TestAllocator(TestName name, const Allocator &a = Allocator()) {\n\n    using FooChar = Foo<char, 1>;\n    using FooDouble = Foo<double, 1>;\n    using FooInt = Foo<int, 17>;\n    using FooFloat = Foo<float, 23>;\n    #if TBB_ALLOCATOR_TRAITS_BROKEN\n        using AllocatorFooChar = typename Allocator::template rebind<FooChar>::other;\n        using AllocatorFooDouble = typename Allocator::template rebind<FooDouble>::other;\n        using AllocatorFooInt = typename AllocatorFooChar::template rebind<FooInt>::other;\n        using AllocatorFooFloat = typename AllocatorFooDouble::template rebind<FooFloat>::other;\n    #else\n        using AllocatorFooChar = typename std::allocator_traits<Allocator>::template rebind_alloc<FooChar>;\n        using AllocatorFooDouble = typename std::allocator_traits<Allocator>::template rebind_alloc<FooDouble>;\n        using AllocatorFooInt = typename std::allocator_traits<AllocatorFooChar>::template rebind_alloc<FooInt>;\n        using AllocatorFooFloat = typename std::allocator_traits<AllocatorFooDouble>::template rebind_alloc<FooFloat>;\n    #endif\n\n    NumberOfFoo = 0;\n    Allocator a_cpy(a);\n    AllocatorFooChar a1(a);\n    AllocatorFooDouble a2(a);\n    AllocatorFooInt b1(a1);\n    AllocatorFooFloat b2(a2);\n\n    switch(name) {\n    case Comparison:\n        REQUIRE(a_cpy == a);\n        REQUIRE(a1 == b1);\n        REQUIRE(!(a2 != b2));\n        break;\n    case Concept:\n        TestAllocatorConcept<FooInt>(b1);\n        TestAllocatorConcept<typename AllocatorFooChar::value_type>(a1);\n        TestAllocatorConcept<FooFloat>(b2);\n        TestAllocatorConcept<typename AllocatorFooDouble::value_type>(a2);\n        break;\n    case Broken:\n    #if TBB_ALLOCATOR_TRAITS_BROKEN\n        TestBrokenAllocator<FooInt>(b1);\n        TestBrokenAllocator<typename AllocatorFooChar::value_type>(a1);\n        TestBrokenAllocator<FooFloat>(b2);\n        TestBrokenAllocator<typename AllocatorFooDouble::value_type>(a2);\n    #endif\n        break;\n    case Exceptions:\n        TestAllocatorExceptions<FooInt>(b1);\n        TestAllocatorExceptions<typename AllocatorFooChar::value_type>(a1);\n        TestAllocatorExceptions<FooFloat>(b2);\n        TestAllocatorExceptions<typename AllocatorFooDouble::value_type>(a2);\n        break;\n    case ThreadSafety:\n        TestThreadSafety(a1);\n        TestThreadSafety(a2);\n        break;\n    }\n    REQUIRE_MESSAGE(NumberOfFoo == 0, \"Allocate/deallocate count mismatched\");\n}\n#endif // __TBB_test_common_allocator_test_common_H_\n"
  },
  {
    "path": "third-party/tbb/test/common/checktype.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_checktype_H\n#define __TBB_test_common_checktype_H\n\n#include \"config.h\"\n\n#include <atomic>\n\n// Type that checks that there are no operations with the destroyed object\nclass DestroyedTracker {\nprotected:\n    enum StateType {\n        LIVE = 0x56781234,\n        DEAD = 0xDEADBEEF\n    };\n    StateType my_state;\npublic:\n    DestroyedTracker() : my_state(LIVE) {}\n    DestroyedTracker( const DestroyedTracker& src ) : my_state(LIVE) {\n        CHECK_FAST_MESSAGE(src.is_alive(), \"Constructing from the dead source\");\n    }\n\n    ~DestroyedTracker() {\n        CHECK_FAST_MESSAGE(is_alive(), \"Destructing the dead object\");\n        my_state = DEAD;\n    }\n\n    DestroyedTracker& operator=( const DestroyedTracker& src ) {\n        CHECK_FAST_MESSAGE(is_alive(), \"Assignment to the dead object\");\n        CHECK_FAST_MESSAGE(src.is_alive(), \"Assignment from the dead source\");\n        return *this;\n    }\n\n    bool is_alive() const {\n        return my_state == LIVE;\n    }\n}; // class DestroyedTracker\n\n// Type that checks construction and destruction\ntemplate <typename Counter>\nclass CheckType : DestroyedTracker {\npublic:\n    static std::atomic<int> check_type_counter;\n\n    CheckType( Counter n = 0 ) : my_id(n), am_ready(false) {\n        ++check_type_counter;\n    }\n\n    CheckType( const CheckType& other ) : DestroyedTracker(other) {\n        CHECK_FAST(is_alive());\n        CHECK_FAST(other.is_alive());\n        my_id = other.my_id;\n        am_ready = other.am_ready;\n        ++check_type_counter;\n    }\n\n    operator int() const { return int(my_id); }\n    CheckType& operator++() {\n        ++my_id;\n        return *this;\n    }\n\n    CheckType& operator=( const CheckType& other ) {\n        CHECK_FAST(is_alive());\n        CHECK_FAST(other.is_alive());\n        my_id = other.my_id;\n        am_ready = other.am_ready;\n        return *this;\n    }\n\n    ~CheckType() {\n        CHECK_FAST(is_alive());\n        --check_type_counter;\n        CHECK_FAST_MESSAGE(check_type_counter >= 0, \"Too many destructions\");\n    }\n\n    Counter id() const {\n        CHECK_FAST(is_alive());\n        return my_id;\n    }\n\n    bool is_ready() {\n        CHECK_FAST(is_alive());\n        return am_ready;\n    }\n\n    void get_ready() {\n        CHECK_FAST(is_alive());\n        if (my_id == Counter(0)) {\n            my_id = Counter(1);\n            am_ready = true;\n        }\n    }\n\nprivate:\n    Counter my_id;\n    bool am_ready;\n}; // class CheckType\n\nnamespace std {\ntemplate <typename Counter>\nstruct hash<CheckType<Counter>> {\n    std::size_t operator()( const CheckType<Counter>& obj ) const {\n        return std::size_t(obj.id());\n    }\n};\n\n}\n\ntemplate <typename Counter>\nstd::atomic<int> CheckType<Counter>::check_type_counter;\n\n// A dummy class\ntemplate <typename T>\nstruct Checker {\n    Checker() {} // do nothing\n    ~Checker() {} // do nothing\n};\n\n// A specialization for CheckType that initialize a counter on creation\n// and checks that the constructions and destructions of CheckType match\ntemplate <typename Counter>\nstruct Checker<CheckType<Counter>> {\n    Checker() { CheckType<Counter>::check_type_counter = 0; }\n    ~Checker() {\n        CHECK_MESSAGE(CheckType<Counter>::check_type_counter == 0,\n                        \"CheckType constructions and destructions don't match\");\n    }\n}; // struct Checker\n\n#endif // __TBB_test_common_checktype_H\n"
  },
  {
    "path": "third-party/tbb/test/common/common_arena_constraints.h",
    "content": "/*\n    Copyright (c) 2019-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_arena_constraints_H_\n#define __TBB_test_common_arena_constraints_H_\n\n#if _WIN32 || _WIN64\n#define _CRT_SECURE_NO_WARNINGS\n#endif\n\n#include \"common/test.h\"\n#include \"common/spin_barrier.h\"\n#include \"common/utils.h\"\n#include \"common/memory_usage.h\"\n#include \"common/utils_concurrency_limit.h\"\n\n#include \"oneapi/tbb/task_arena.h\"\n#include \"oneapi/tbb/spin_mutex.h\"\n\n#include <vector>\n#include <unordered_set>\n\n#if (_WIN32 || _WIN64) && __TBB_HWLOC_VALID_ENVIRONMENT\n#include <windows.h>\nint get_processors_group_count() {\n    SYSTEM_INFO si;\n    GetNativeSystemInfo(&si);\n    DWORD_PTR pam, sam, m = 1;\n    GetProcessAffinityMask( GetCurrentProcess(), &pam, &sam );\n    int nproc = 0;\n    for ( std::size_t i = 0; i < sizeof(DWORD_PTR) * CHAR_BIT; ++i, m <<= 1 ) {\n        if ( pam & m )\n            ++nproc;\n    }\n    // Setting up processor groups in case the process does not restrict affinity mask and more than one processor group is present\n    if ( nproc == (int)si.dwNumberOfProcessors  ) {\n        // The process does not have restricting affinity mask and multiple processor groups are possible\n        return (int)GetActiveProcessorGroupCount();\n    } else {\n        return 1;\n    }\n}\n#else\nint get_processors_group_count() { return 1; }\n#endif\n\n//TODO: Write a test that checks for memory leaks during dynamic link/unlink of TBBbind.\n#if __TBB_HWLOC_VALID_ENVIRONMENT\n#include \"oneapi/tbb/concurrent_unordered_set.h\"\n\n#include <atomic>\n#include <algorithm>\n\n#if _MSC_VER\n#if __clang__\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wunused-parameter\"\n#else\n#pragma warning( push )\n#pragma warning( disable : 4100 )\n#endif\n#endif\n#include <hwloc.h>\n#if _MSC_VER\n#if __clang__\n#pragma GCC diagnostic pop\n#else\n#pragma warning( pop )\n#endif\n#endif\n\n#define __HWLOC_HYBRID_CPUS_INTERFACES_PRESENT (HWLOC_API_VERSION >= 0x20400)\n#define __HWLOC_TOPOLOGY_FLAG_RESTRICT_TO_CPUBINDING_PRESENT (HWLOC_API_VERSION >= 0x20500)\n// At this moment the hybrid CPUs HWLOC interfaces returns unexpected results on some Windows machines\n// in the 32-bit arch mode.\n#define __HWLOC_HYBRID_CPUS_INTERFACES_VALID (!_WIN32 || _WIN64)\n\n#define __HYBRID_CPUS_TESTING __HWLOC_HYBRID_CPUS_INTERFACES_PRESENT && __HWLOC_HYBRID_CPUS_INTERFACES_VALID\n#define __HWLOC_CPUBIND_PRESENT (!__APPLE__)\n\n// Macro to check hwloc interfaces return codes\n#define hwloc_require_ex(command, ...)                                          \\\n        REQUIRE_MESSAGE(command(__VA_ARGS__) >= 0, \"Error occurred inside hwloc call.\");\n\nstruct index_info {\n    int index{-1};\n    int concurrency{-1};\n    hwloc_bitmap_t cpuset{nullptr};\n\n    index_info() = default;\n    index_info(const index_info& src)\n        : index{src.index}\n        , concurrency{src.concurrency}\n        , cpuset{hwloc_bitmap_dup(src.cpuset)}\n    {}\n\n    index_info& operator=(index_info src) {\n        index = src.index;\n        concurrency = src.concurrency;\n        std::swap(cpuset, src.cpuset);\n        return *this;\n    }\n\n    ~index_info() {\n        hwloc_bitmap_free(cpuset);\n    }\n};\n\nstruct core_info {\n    hwloc_bitmap_t cpuset{nullptr};\n\n    core_info() = default;\n    core_info(hwloc_bitmap_t _cpuset)\n        : cpuset{hwloc_bitmap_dup(_cpuset)}\n    {}\n    core_info(const core_info& src)\n        : cpuset{hwloc_bitmap_dup(src.cpuset)}\n    {}\n\n    core_info& operator=(core_info src) {\n        std::swap(cpuset, src.cpuset);\n        return *this;\n    }\n\n    ~core_info() {\n        hwloc_bitmap_free(cpuset);\n    }\n};\n\nclass system_info {\n    hwloc_topology_t topology;\n    hwloc_cpuset_t process_cpuset{nullptr};\n\n    std::vector<index_info> numa_node_infos{};\n    std::vector<index_info> cpu_kind_infos{};\n    std::vector<core_info> core_infos{};\n\n    // hwloc_cpuset_t and hwloc_nodeset_t (inherited from hwloc_bitmap_t ) is pointers,\n    // so we must manage memory allocation and deallocation\n    using memory_handler_t = tbb::concurrent_unordered_set<hwloc_bitmap_t>;\n    memory_handler_t memory_handler{};\n\n    static system_info* system_info_ptr;\n\npublic:\n    static void initialize() {\n        static system_info topology_instance;\n        system_info_ptr = &topology_instance;\n    }\n\nprivate:\n    static system_info& instance() {\n        REQUIRE_MESSAGE(system_info_ptr, \"Get access to the uninitialize system info.(reference)\");\n        return *system_info_ptr;\n    }\n\n    system_info() {\n        hwloc_require_ex(hwloc_topology_init, &topology);\n#if __HWLOC_TOPOLOGY_FLAG_RESTRICT_TO_CPUBINDING_PRESENT\n        if ( get_processors_group_count() == 1 ) {\n            REQUIRE(\n                hwloc_topology_set_flags(topology,\n                    HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM |\n                    HWLOC_TOPOLOGY_FLAG_RESTRICT_TO_CPUBINDING) == 0\n            );\n        }\n#endif\n        hwloc_require_ex(hwloc_topology_load, topology);\n\n#if __HWLOC_CPUBIND_PRESENT\n        if ( get_processors_group_count() > 1 ) {\n            process_cpuset = hwloc_bitmap_dup(hwloc_topology_get_complete_cpuset(topology));\n        } else {\n            process_cpuset = hwloc_bitmap_alloc();\n            hwloc_require_ex(hwloc_get_cpubind, topology, process_cpuset, 0);\n        }\n#else\n        process_cpuset = hwloc_bitmap_dup(hwloc_topology_get_complete_cpuset(topology));\n#endif\n\n        hwloc_obj_t current_numa_node = nullptr;\n        index_info current_node_info{};\n        while ((current_numa_node = hwloc_get_next_obj_by_type(topology,\n                                                               HWLOC_OBJ_NUMANODE,\n                                                               current_numa_node)) != nullptr) {\n            current_node_info.index = static_cast<int>(current_numa_node->logical_index);\n            current_node_info.cpuset = hwloc_bitmap_dup(current_numa_node->cpuset);\n            hwloc_bitmap_and(current_node_info.cpuset, current_node_info.cpuset, process_cpuset);\n            current_node_info.concurrency = hwloc_bitmap_weight(current_node_info.cpuset);\n            if(current_node_info.concurrency) {\n                numa_node_infos.push_back(current_node_info);\n            }\n        }\n\n        if (numa_node_infos.empty()) {\n            current_node_info.index = 0;\n            current_node_info.cpuset = hwloc_bitmap_dup(process_cpuset);\n            current_node_info.concurrency = hwloc_bitmap_weight(process_cpuset);\n            numa_node_infos.push_back(current_node_info);\n        }\n\n        std::sort(numa_node_infos.begin(), numa_node_infos.end(), \n            [](const index_info& a, const index_info& b) {\n                return a.index < b.index;\n            }\n        );\n\n        bool core_types_parsing_broken = true;\n#if __HYBRID_CPUS_TESTING\n        // Getting CPU kinds info\n        auto num_cpu_kinds = hwloc_cpukinds_get_nr(topology, 0);\n        REQUIRE_MESSAGE(num_cpu_kinds >= 0,\n            \"HWLOC cannot detect the number of cpukinds.(reference)\");\n\n        core_types_parsing_broken = num_cpu_kinds == 0;\n        int current_efficiency = -1;\n        cpu_kind_infos.resize(num_cpu_kinds);\n        for (auto kind_index = 0; kind_index < num_cpu_kinds; ++kind_index) {\n            auto& cki = cpu_kind_infos[kind_index];\n\n            cki.cpuset = hwloc_bitmap_alloc();\n            CHECK_MESSAGE(\n                cki.cpuset,\n                \"HWLOC was unable to allocate bitmap. Following checks might fail.(reference)\"\n            );\n\n            hwloc_require_ex(\n                hwloc_cpukinds_get_info, topology, kind_index, cki.cpuset, &current_efficiency,\n                /*nr_infos*/nullptr, /*infos*/nullptr, /*flags*/0\n            );\n            if (current_efficiency < 0) {\n                core_types_parsing_broken = true;\n                break;\n            }\n            hwloc_bitmap_and(cki.cpuset, cki.cpuset, process_cpuset);\n\n            cki.index = hwloc_cpukinds_get_by_cpuset(topology, cki.cpuset, /*flags*/0);\n            REQUIRE_MESSAGE(cki.index >= 0,\n                \"hwloc failed obtaining kind index via cpuset.(reference)\");\n\n            cki.concurrency = hwloc_bitmap_weight(cki.cpuset);\n        }\n#endif /*__HYBRID_CPUS_TESTING*/\n\n        if (core_types_parsing_broken) {\n            cpu_kind_infos.resize(1);\n            cpu_kind_infos[0].index = -1;\n            cpu_kind_infos[0].cpuset = hwloc_bitmap_dup(process_cpuset);\n            cpu_kind_infos[0].concurrency = hwloc_bitmap_weight(process_cpuset);\n        }\n\n        hwloc_bitmap_t core_affinity = hwloc_bitmap_alloc();\n        hwloc_obj_t current_core = nullptr;\n        while ((current_core = hwloc_get_next_obj_by_type(topology, HWLOC_OBJ_CORE, current_core)) != nullptr) {\n            hwloc_bitmap_and(core_affinity, process_cpuset, current_core->cpuset);\n            if (hwloc_bitmap_weight(core_affinity) > 0) {\n                core_infos.emplace_back(core_affinity);\n            }\n        }\n        hwloc_bitmap_free(core_affinity);\n\n        testing_reference_topology_parsing_validation();\n    }\n\n    ~system_info() {\n        for (auto& allocated_mask: memory_handler) {\n            hwloc_bitmap_free(allocated_mask);\n        }\n        hwloc_topology_destroy(topology);\n\n        hwloc_bitmap_free(process_cpuset);\n    }\n\n    void testing_reference_topology_parsing_validation() {\n        hwloc_cpuset_t buffer_cpu_set = hwloc_bitmap_alloc();\n\n        REQUIRE_MESSAGE(numa_node_infos.size() > 0, \"Negative NUMA nodes count.(reference)\");\n        REQUIRE_MESSAGE(cpu_kind_infos.size() > 0, \"Negative core types count.(reference)\");\n        REQUIRE_MESSAGE(core_infos.size() > 0, \"Negative available cores count.(reference)\");\n#if NUMA_NODES_NUMBER\n        REQUIRE_MESSAGE(numa_node_infos.size() == NUMA_NODES_NUMBER,\n            \"Manual NUMA nodes count validation fails.(reference)\");\n#endif /*NUMA_NODES_NUMBER*/\n#if CORE_TYPES_NUMBER\n        REQUIRE_MESSAGE(cpu_kind_infos.size() == CORE_TYPES_NUMBER,\n            \"Manual core types count validation fails.(reference)\");\n#endif /*CORE_TYPES_NUMBER*/\n\n        // NUMA topology verification\n        hwloc_bitmap_zero(buffer_cpu_set);\n        for (const auto& numa_node_info: numa_node_infos) {\n            REQUIRE_MESSAGE(!hwloc_bitmap_intersects(buffer_cpu_set, numa_node_info.cpuset),\n                \"NUMA nodes related CPUset have the same bits. \"\n                \"It seems like error during HWLOC topology parsing.(reference)\");\n            hwloc_bitmap_or(buffer_cpu_set, buffer_cpu_set, numa_node_info.cpuset);\n        }\n        REQUIRE_MESSAGE( hwloc_bitmap_isequal(buffer_cpu_set, process_cpuset),\n            \"Intersected NUMA nodes masks should be equal to process affinity.(reference)\");\n\n        // Core types topology verification\n        hwloc_bitmap_zero(buffer_cpu_set);\n        for (const auto& cpu_kind_info: cpu_kind_infos) {\n            REQUIRE_FALSE_MESSAGE(hwloc_bitmap_intersects(buffer_cpu_set, cpu_kind_info.cpuset),\n                \"core types related CPUset have the same bits. \"\n                \"It seems like error during HWLOC topology parsing.(reference)\");\n            hwloc_bitmap_or(buffer_cpu_set, buffer_cpu_set, cpu_kind_info.cpuset);\n        }\n        REQUIRE_MESSAGE(hwloc_bitmap_isequal(buffer_cpu_set, process_cpuset),\n            \"Intersected core type masks should be equal to process affinity.(reference)\");\n\n        hwloc_bitmap_free(buffer_cpu_set);\n    }\n\npublic:\n    typedef hwloc_bitmap_t affinity_mask;\n    typedef hwloc_const_bitmap_t const_affinity_mask;\n\n    static hwloc_const_bitmap_t get_process_affinity_mask() {\n        return instance().process_cpuset;\n    }\n\n    static std::size_t get_maximal_threads_per_core() {\n        auto max_threads_it =\n            std::max_element(\n                std::begin(instance().core_infos), std::end(instance().core_infos),\n                [](const core_info& first, const core_info& second) {\n                    return hwloc_bitmap_weight(first.cpuset) < hwloc_bitmap_weight(second.cpuset);\n                }\n            );\n        __TBB_ASSERT(hwloc_bitmap_weight(max_threads_it->cpuset) > 0,\n            \"Not positive maximal threads per core value.(reference)\");\n        return hwloc_bitmap_weight(max_threads_it->cpuset);\n    }\n\n    static affinity_mask allocate_empty_affinity_mask() {\n        affinity_mask result = hwloc_bitmap_alloc();\n        instance().memory_handler.insert(result);\n        return result;\n    }\n\n    static affinity_mask allocate_current_affinity_mask() {\n        affinity_mask result = hwloc_bitmap_alloc();\n        instance().memory_handler.insert(result);\n#if __HWLOC_CPUBIND_PRESENT\n        hwloc_require_ex(hwloc_get_cpubind, instance().topology, result, HWLOC_CPUBIND_THREAD);\n#else\n        hwloc_bitmap_copy(result, hwloc_topology_get_complete_cpuset(instance().topology));\n#endif\n        REQUIRE_MESSAGE(!hwloc_bitmap_iszero(result), \"Empty current affinity mask.\");\n        return result;\n    }\n\n    static std::vector<index_info> get_cpu_kinds_info() {\n        return instance().cpu_kind_infos;\n    }\n\n    static std::vector<index_info> get_numa_nodes_info() {\n        return instance().numa_node_infos;\n    }\n\n    static std::vector<core_info> get_cores_info() {\n        return instance().core_infos;\n    }\n\n    static std::vector<int> get_available_max_threads_values() {\n        std::vector<int> result{};\n        for (int value = -1; value <= (int)get_maximal_threads_per_core(); ++value) {\n            if (value != 0) {\n                result.push_back(value);\n            }\n        }\n        return result;\n    }\n}; // class system_info\n\nsystem_info* system_info::system_info_ptr{nullptr};\n\nsystem_info::affinity_mask prepare_reference_affinity_mask(const tbb::task_arena::constraints& c) {\n    auto reference_affinity = system_info::allocate_empty_affinity_mask();\n    hwloc_bitmap_copy(reference_affinity, system_info::get_process_affinity_mask());\n\n    if (c.numa_id != tbb::task_arena::automatic) {\n        const auto& numa_nodes_info = system_info::get_numa_nodes_info();\n        auto required_info = std::find_if(numa_nodes_info.begin(), numa_nodes_info.end(),\n            [&](const index_info& info) { return info.index == c.numa_id; }\n        );\n\n        REQUIRE_MESSAGE(required_info != numa_nodes_info.end(), \"Constraints instance has wrong NUMA index.\");\n        hwloc_bitmap_and(reference_affinity, reference_affinity, required_info->cpuset);\n    }\n\n    if (c.core_type != tbb::task_arena::automatic) {\n        const auto& core_types_info = system_info::get_cpu_kinds_info();\n        auto required_info = std::find_if(core_types_info.begin(), core_types_info.end(),\n            [&](index_info info) { return info.index == c.core_type; }\n        );\n        REQUIRE_MESSAGE(required_info != core_types_info.end(), \"Constraints instance has wrong core type index.\");\n        hwloc_bitmap_and(reference_affinity, reference_affinity, required_info->cpuset);\n    }\n\n    return reference_affinity;\n}\n\nvoid test_constraints_affinity_and_concurrency(tbb::task_arena::constraints constraints,\n                                               system_info::affinity_mask arena_affinity) {\n    int default_concurrency = tbb::info::default_concurrency(constraints);\n    system_info::affinity_mask reference_affinity = prepare_reference_affinity_mask(constraints);\n    int max_threads_per_core = static_cast<int>(system_info::get_maximal_threads_per_core());\n\n    if (constraints.max_threads_per_core == tbb::task_arena::automatic || constraints.max_threads_per_core == max_threads_per_core) {\n        REQUIRE_MESSAGE(hwloc_bitmap_isequal(reference_affinity, arena_affinity),\n            \"Wrong affinity mask was applied for the constraints instance.\");\n        REQUIRE_MESSAGE(hwloc_bitmap_weight(reference_affinity) == default_concurrency,\n            \"Wrong default_concurrency was returned for the constraints instance.\");\n    } else {\n        REQUIRE_MESSAGE(constraints.max_threads_per_core < max_threads_per_core,\n            \"Constraints instance has wrong max_threads_per_core value.\");\n        REQUIRE_MESSAGE(hwloc_bitmap_isincluded(arena_affinity, reference_affinity),\n            \"If custom threads per core value is applied then the applied affinity\"\n            \"should be a sub-set of the affinity applied to constraints without such restriction.\");\n\n        system_info::affinity_mask core_affinity = system_info::allocate_empty_affinity_mask();\n        int threads_per_current_core = 0, valid_concurrency = 0;\n        for (const auto& current_core : system_info::get_cores_info()) {\n            hwloc_bitmap_and(core_affinity, reference_affinity, current_core.cpuset);\n            threads_per_current_core = hwloc_bitmap_weight(core_affinity);\n            if (threads_per_current_core > 0) { // current core should exist in the valid affinity mask\n                hwloc_bitmap_and(core_affinity, arena_affinity, current_core.cpuset);\n                threads_per_current_core = std::min(threads_per_current_core, constraints.max_threads_per_core);\n                valid_concurrency += threads_per_current_core;\n                REQUIRE_MESSAGE(hwloc_bitmap_weight(core_affinity) == threads_per_current_core ,\n                    \"Wrong number of threads may be scheduled to some core.\");\n            }\n        }\n        REQUIRE_MESSAGE(valid_concurrency == default_concurrency,\n            \"Wrong default_concurrency was returned for the constraints instance.\");\n        REQUIRE_MESSAGE(valid_concurrency == hwloc_bitmap_weight(arena_affinity),\n            \"Wrong number of bits inside the affinity mask.\");\n    }\n}\n\nsystem_info::affinity_mask get_arena_affinity(tbb::task_arena& ta) {\n    system_info::affinity_mask arena_affinity;\n    ta.execute([&]{\n        arena_affinity = system_info::allocate_current_affinity_mask();\n    });\n\n    utils::SpinBarrier exit_barrier(ta.max_concurrency());\n    tbb::spin_mutex affinity_mutex{};\n    for (int i = 0; i < ta.max_concurrency() - 1; ++i) {\n        ta.enqueue([&] {\n            {\n                tbb::spin_mutex::scoped_lock lock(affinity_mutex);\n                system_info::affinity_mask thread_affinity = system_info::allocate_current_affinity_mask();\n                if (get_processors_group_count() == 1) {\n                    REQUIRE_MESSAGE(hwloc_bitmap_isequal(thread_affinity, arena_affinity),\n                        \"Threads have different masks on machine without several processors groups.\");\n                }\n                hwloc_bitmap_or(arena_affinity, arena_affinity, thread_affinity);\n            }\n            exit_barrier.wait();\n        });\n    }\n    exit_barrier.wait();\n    return arena_affinity;\n}\n\n#else /*__TBB_HWLOC_VALID_ENVIRONMENT*/\n\nnamespace system_info {\n    // The values that seems meaningful for the most systems that exists at this moment\n    // Should be used when we cannot parse the system topology\n    std::vector<int> get_available_max_threads_values() { return {tbb::task_arena::automatic, 1, 2}; }\n}\n\n#endif /*!__TBB_HWLOC_VALID_ENVIRONMENT*/\n\nstruct constraints_hash {\n    std::size_t operator()(const tbb::task_arena::constraints& c) const {\n      return (std::hash<int>{}(c.numa_id) ^ std::hash<int>{}(c.core_type) ^ std::hash<int>{}(c.max_threads_per_core));\n    }\n};\n\nstruct constraints_equal {\n    bool operator()(const tbb::task_arena::constraints& c1, const tbb::task_arena::constraints& c2) const {\n        return (c1.numa_id == c2.numa_id &&\n                c1.core_type == c2.core_type &&\n                c1.max_threads_per_core == c2.max_threads_per_core);\n  }\n};\n\nusing constraints_container = std::unordered_set<tbb::task_arena::constraints, constraints_hash, constraints_equal>;\n\n// Using unordered_set to get rid of duplicated elements\nconstraints_container generate_constraints_variety() {\n    static constraints_container constraints_variety = [](){\n        using constraints = tbb::task_arena::constraints;\n        constraints_container results{};\n\n        std::vector<tbb::numa_node_id> numa_nodes = tbb::info::numa_nodes();\n        numa_nodes.push_back((tbb::numa_node_id)tbb::task_arena::automatic);\n\n#if __HYBRID_CPUS_TESTING\n        std::vector<tbb::core_type_id> core_types = tbb::info::core_types();\n        core_types.push_back((tbb::core_type_id)tbb::task_arena::automatic);\n#endif\n\n        results.insert(constraints{});\n        for (const auto& numa_node : numa_nodes) {\n            results.insert(constraints{}.set_numa_id(numa_node));\n#if __HYBRID_CPUS_TESTING\n            for (const auto& core_type : core_types) {\n                results.insert(constraints{}.set_core_type(core_type));\n\n                results.insert(\n                    constraints{}\n                        .set_numa_id(numa_node)\n                        .set_core_type(core_type)\n                );\n\n                for (const auto& max_threads_per_core: system_info::get_available_max_threads_values()) {\n                    results.insert(\n                        constraints{}\n                            .set_max_threads_per_core(max_threads_per_core)\n                    );\n\n                    results.insert(\n                        constraints{}\n                            .set_numa_id(numa_node)\n                            .set_max_threads_per_core(max_threads_per_core)\n                    );\n\n                    results.insert(\n                        constraints{}\n                            .set_core_type(core_type)\n                            .set_max_threads_per_core(max_threads_per_core)\n                    );\n\n                    results.insert(\n                        constraints{}\n                            .set_numa_id(numa_node)\n                            .set_core_type(core_type)\n                            .set_max_threads_per_core(max_threads_per_core)\n                    );\n                }\n            }\n#endif /*__HYBRID_CPUS_TESTING*/\n        }\n\n        int max_threads_per_core = system_info::get_available_max_threads_values().back();\n        // Some constraints may cause unexpected behavior, which would be fixed later.\n        if (get_processors_group_count() > 1) {\n            for(auto it = results.begin(); it != results.end();) {\n                if (it->max_threads_per_core != max_threads_per_core\n                   && (it->numa_id == tbb::task_arena::automatic || tbb::info::numa_nodes().size() == 1)\n#if __HYBRID_CPUS_TESTING\n                   && (it->core_type == tbb::task_arena::automatic || tbb::info::core_types().size() == 1)\n#endif /*__HYBRID_CPUS_TESTING*/\n                ) {\n                    it = results.erase(it);\n                } else {\n                    ++it;\n                }\n            }\n        }\n        return results;\n    }();\n\n    return constraints_variety;\n}\n#endif // __TBB_test_common_arena_constraints_H_\n"
  },
  {
    "path": "third-party/tbb/test/common/concepts_common.h",
    "content": "/*\n    Copyright (c) 2021-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_concepts_common_H\n#define __TBB_test_common_concepts_common_H\n#include \"tbb/parallel_pipeline.h\"\n#include \"tbb/parallel_for_each.h\"\n#include \"tbb/flow_graph.h\"\n#include \"tbb/parallel_scan.h\"\n#include \"iterator.h\"\n#include <vector>\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n\nnamespace test_concepts {\n\nstruct Dummy {};\n\nenum class State {\n    correct,\n    incorrect_first_input,\n    incorrect_second_input,\n    incorrect_third_input,\n    incorrect_return_type,\n    incorrect_constness,\n    not_defined,\n    incorrect,\n    non_constant_expression\n};\n\nstruct Copyable { Copyable( const Copyable& ) = default; };\nstruct NonCopyable { NonCopyable( const NonCopyable& ) = delete; };\nstruct CopyAssignable { CopyAssignable& operator=( const CopyAssignable& ) = default; };\nstruct NonCopyAssignable { NonCopyAssignable& operator=( const NonCopyAssignable& ) = delete; };\n\nstruct DefaultInitializable { DefaultInitializable() = default; };\nstruct NonDefaultInitializable { NonDefaultInitializable() = delete; };\n\nnamespace blocked_range_value {\n\ntemplate <bool EnableCopyCtor, bool EnableCopyAssignment, bool EnableDtor,\n          State EnableOperatorLess, State EnableOperatorMinus, State EnableOperatorPlusSizeT>\nstruct BlockedRangeValue {\n    BlockedRangeValue( const BlockedRangeValue& ) requires EnableCopyCtor = default;\n\n    BlockedRangeValue& operator=( const BlockedRangeValue& ) requires EnableCopyAssignment = default;\n\n    // Prospective destructors\n    ~BlockedRangeValue() requires EnableDtor = default;\n    ~BlockedRangeValue() = delete;\n\n    bool operator<( const BlockedRangeValue& ) const requires (EnableOperatorLess == State::correct) { return true; }\n    bool operator<( Dummy ) const requires (EnableOperatorLess == State::incorrect_first_input) { return true; }\n    Dummy operator<( const BlockedRangeValue& ) const requires (EnableOperatorLess == State::incorrect_return_type) { return Dummy{}; }\n    bool operator<( const BlockedRangeValue& ) requires (EnableOperatorLess == State::incorrect_constness) { return true; }\n\n    std::size_t operator-( const BlockedRangeValue& ) const requires (EnableOperatorMinus == State::correct) { return 0; }\n    std::size_t operator-( Dummy ) const requires (EnableOperatorMinus == State::incorrect_first_input) { return 0; }\n    Dummy operator-( const BlockedRangeValue& ) const requires (EnableOperatorMinus == State::incorrect_return_type) { return Dummy{}; }\n    std::size_t operator-( const BlockedRangeValue& ) requires (EnableOperatorMinus == State::incorrect_constness) { return 0; }\n\n    BlockedRangeValue operator+( std::size_t ) const requires (EnableOperatorPlusSizeT == State::correct) { return *this; }\n    BlockedRangeValue operator+( Dummy ) const requires (EnableOperatorPlusSizeT == State::incorrect_first_input) { return *this; }\n    Dummy operator+( std::size_t ) const requires (EnableOperatorPlusSizeT == State::incorrect_return_type) { return Dummy{}; }\n    BlockedRangeValue operator+( std::size_t ) requires (EnableOperatorPlusSizeT == State::incorrect_constness) { return *this; }\n};\n\nusing Correct = BlockedRangeValue</*CopyCtor = */true, /*CopyAssignment = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::correct, /*PlusSizeT = */State::correct>;\nusing NonCopyable = BlockedRangeValue</*CopyCtor = */false, /*CopyAssignment = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::correct, /*PlusSizeT = */State::correct>;\nusing NonCopyAssignable = BlockedRangeValue</*CopyCtor = */true, /*CopyAssignment = */false, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::correct, /*PlusSizeT = */State::correct>;\nusing NonDestructible = BlockedRangeValue</*CopyCtor = */true, /*CopyAssignment = */true, /*Dtor = */false, /*Less = */State::correct, /*Minus = */State::correct, /*PlusSizeT = */State::correct>;\nusing NoOperatorLess = BlockedRangeValue</*CopyCtor = */true, /*CopyAssignment = */true, /*Dtor = */true, /*Less = */State::not_defined, /*Minus = */State::correct, /*PlusSizeT = */State::correct>;\nusing OperatorLessNonConst = BlockedRangeValue</*CopyCtor = */true, /*CopyAssignment = */true, /*Dtor = */true, /*Less = */State::incorrect_constness, /*Minus = */State::correct, /*PlusSizeT = */State::correct>;\nusing WrongInputOperatorLess = BlockedRangeValue</*CopyCtor = */true, /*CopyAssignment = */true, /*Dtor = */true, /*Less = */State::incorrect_first_input, /*Minus = */State::correct, /*PlusSizeT = */State::correct>;\nusing WrongReturnOperatorLess = BlockedRangeValue</*CopyCtor = */true, /*CopyAssignment = */true, /*Dtor = */true, /*Less = */State::incorrect_return_type, /*Minus = */State::correct, /*PlusSizeT = */State::correct>;\nusing NoOperatorMinus = BlockedRangeValue</*CopyCtor = */true, /*CopyAssignment = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::not_defined, /*PlusSizeT = */State::correct>;\nusing OperatorMinusNonConst = BlockedRangeValue</*CopyCtor = */true, /*CopyAssignment = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::incorrect_constness, /*PlusSizeT = */State::correct>;\nusing WrongInputOperatorMinus = BlockedRangeValue</*CopyCtor = */true, /*CopyAssignment = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::incorrect_first_input, /*PlusSizeT = */State::correct>;\nusing WrongReturnOperatorMinus = BlockedRangeValue</*CopyCtor = */true, /*CopyAssignment = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::incorrect_return_type, /*PlusSizeT = */State::correct>;\nusing NoOperatorPlus = BlockedRangeValue</*CopyCtor = */true, /*CopyAssignment = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::correct, /*PlusSizeT = */State::not_defined>;\nusing OperatorPlusNonConst = BlockedRangeValue</*CopyCtor = */true, /*CopyAssignment = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::correct, /*PlusSizeT = */State::incorrect_constness>;\nusing WrongInputOperatorPlus = BlockedRangeValue</*CopyCtor = */true, /*CopyAssignment = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::correct, /*PlusSizeT = */State::incorrect_first_input>;\nusing WrongReturnOperatorPlus = BlockedRangeValue</*CopyCtor = */true, /*CopyAssignment = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::correct, /*PlusSizeT = */State::incorrect_return_type>;\n\n} // namespace blocked_range_value\nnamespace range {\n\ntemplate <bool EnableCopyCtor, bool EnableSplitCtor, bool EnableDtor, State EnableEmpty, State EnableIsDivisible>\nstruct Range {\n    Range( Range&, tbb::split ) requires EnableSplitCtor {}\n    Range( const Range& ) requires EnableCopyCtor = default;\n    // Prospective destructors\n    ~Range() requires EnableDtor = default;\n    ~Range() = delete;\n\n    bool empty() const requires (EnableEmpty == State::correct) { return true; }\n    bool empty() requires (EnableEmpty == State::incorrect_constness) { return true; }\n    Dummy empty() const requires (EnableEmpty == State::incorrect_return_type) { return Dummy{}; }\n\n    bool is_divisible() const requires (EnableIsDivisible == State::correct) { return true; }\n    bool is_divisible() requires (EnableIsDivisible == State::incorrect_constness) { return true; }\n    Dummy is_divisible() const requires (EnableIsDivisible == State::incorrect_return_type) { return Dummy{}; }\n};\n\nusing Correct = Range</*CopyCtor = */true, /*SplitCtor = */true, /*Dtor = */true, /*Empty = */State::correct, /*IsDivisible = */State::correct>;\nusing NonCopyable = Range</*CopyCtor = */false, /*SplitCtor = */true, /*Dtor = */true, /*Empty = */State::correct, /*IsDivisible = */State::correct>;\nusing NonSplittable = Range</*CopyCtor = */true, /*SplitCtor = */false, /*Dtor = */true, /*Empty = */State::correct, /*IsDivisible = */State::correct>;\nusing NonDestructible = Range</*CopyCtor = */true, /*SplitCtor = */true, /*Dtor = */false, /*Empty = */State::correct, /*IsDivisible = */State::correct>;\nusing NoEmpty = Range</*CopyCtor = */true, /*SplitCtor = */true, /*Dtor = */true, /*Empty = */State::not_defined, /*IsDivisible = */State::correct>;\nusing EmptyNonConst = Range</*CopyCtor = */true, /*SplitCtor = */true, /*Dtor = */true, /*Empty = */State::incorrect_constness, /*IsDivisible = */State::correct>;\nusing WrongReturnEmpty = Range</*CopyCtor = */true, /*SplitCtor = */true, /*Dtor = */true, /*Empty = */State::incorrect_return_type, /*IsDivisible = */State::correct>;\nusing NoIsDivisible = Range</*CopyCtor = */true, /*SplitCtor = */true, /*Dtor = */true, /*Empty = */State::correct, /*IsDivisible = */State::not_defined>;\nusing IsDivisibleNonConst = Range</*CopyCtor = */true, /*SplitCtor = */true, /*Dtor = */true, /*Empty = */State::correct, /*IsDivisible = */State::incorrect_constness>;\nusing WrongReturnIsDivisible = Range</*CopyCtor = */true, /*SplitCtor = */true, /*Dtor = */true, /*Empty = */State::correct, /*IsDivisible = */State::incorrect_return_type>;\n\n} // namespace range\nnamespace parallel_for_body {\n\ntemplate <typename Range, bool EnableCopyCtor, bool EnableDtor, State EnableFunctionCallOperator>\nstruct ParallelForBody {\n    ParallelForBody( const ParallelForBody& ) requires EnableCopyCtor = default;\n    // Prospective destructors\n    ~ParallelForBody() requires EnableDtor = default;\n    ~ParallelForBody() = delete;\n\n    void operator()( Range& ) const requires (EnableFunctionCallOperator == State::correct) {}\n    void operator()( Range& ) requires (EnableFunctionCallOperator == State::incorrect_constness) {}\n    void operator()( Dummy ) const requires (EnableFunctionCallOperator == State::incorrect_first_input) {}\n};\n\ntemplate <typename R> using Correct = ParallelForBody<R, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::correct>;\ntemplate <typename R> using NonCopyable = ParallelForBody<R, /*CopyCtor = */false, /*Dtor = */true, /*() = */State::correct>;\ntemplate <typename R> using NonDestructible = ParallelForBody<R, /*CopyCtor = */true, /*Dtor = */false, /*() = */State::correct>;\ntemplate <typename R> using NoOperatorRoundBrackets = ParallelForBody<R, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::not_defined>;\ntemplate <typename R> using OperatorRoundBracketsNonConst = ParallelForBody<R, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::incorrect_constness>;\ntemplate <typename R> using WrongInputOperatorRoundBrackets = ParallelForBody<R, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::incorrect_first_input>;\n} // namespace parallel_for_body\nnamespace parallel_for_function {\n\ntemplate <typename Index, State EnableFunctionCallOperator>\nstruct ParallelForFunc {\n    void operator()( Index ) const requires (EnableFunctionCallOperator == State::correct) {}\n    void operator()( Index ) requires (EnableFunctionCallOperator == State::incorrect_constness) {}\n    void operator()( Dummy ) const requires (EnableFunctionCallOperator == State::incorrect_first_input) {}\n};\n\ntemplate <typename I> using Correct = ParallelForFunc<I, /*() = */State::correct>;\ntemplate <typename I> using NoOperatorRoundBrackets = ParallelForFunc<I, /*() = */State::not_defined>;\ntemplate <typename I> using OperatorRoundBracketsNonConst = ParallelForFunc<I, /*() = */State::incorrect_constness>;\ntemplate <typename I> using WrongInputOperatorRoundBrackets = ParallelForFunc<I, /*() = */State::incorrect_first_input>;\n} // namespace parallel_for_function\nnamespace parallel_for_index {\ntemplate <bool EnableIntCtor, bool EnableCopyCtor, bool EnableCopyAssign, bool EnableDtor,\n          State EnableLess, State EnableMinus, State EnablePlus>\nstruct ParallelForIndex {\n    ParallelForIndex(int) requires EnableIntCtor {}\n    ParallelForIndex( const ParallelForIndex& ) requires EnableCopyCtor = default;\n    ParallelForIndex& operator=( const ParallelForIndex& ) requires EnableCopyAssign = default;\n    // Prospective destructors\n    ~ParallelForIndex() requires EnableDtor = default;\n    ~ParallelForIndex() = delete;\n\n    bool operator<( const ParallelForIndex& ) const requires (EnableLess == State::correct) { return true; }\n    bool operator<( const ParallelForIndex& ) requires (EnableLess == State::incorrect_constness) { return true; }\n    bool operator<( Dummy ) const requires (EnableLess == State::incorrect_first_input) { return true; }\n    Dummy operator<( const ParallelForIndex& ) const requires (EnableLess == State::incorrect_return_type) { return Dummy{}; }\n\n    std::size_t operator-( const ParallelForIndex& ) const requires (EnableMinus == State::correct) { return 0; }\n    std::size_t operator-( const ParallelForIndex& ) requires (EnableMinus == State::incorrect_constness) { return 0; }\n    std::size_t operator-( Dummy ) const requires (EnableMinus == State::incorrect_first_input) { return 0; }\n    Dummy operator-( const ParallelForIndex& ) const requires (EnableMinus == State::incorrect_return_type) { return Dummy{}; }\n\n    ParallelForIndex operator+( std::size_t ) const requires (EnablePlus == State::correct) { return *this; }\n    ParallelForIndex operator+( std::size_t ) requires (EnablePlus == State::incorrect_constness) { return *this; }\n    ParallelForIndex operator+( Dummy ) const requires (EnablePlus == State::incorrect_first_input) { return *this; }\n    Dummy operator+( std::size_t ) const requires (EnablePlus == State::incorrect_return_type) { return Dummy{}; }\n};\n\nusing Correct = ParallelForIndex</*IntCtor = */true, /*CopyCtor = */true, /*CopyAssign = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::correct, /*Plus = */State::correct>;\nusing NoIntCtor = ParallelForIndex</*IntCtor = */false, /*CopyCtor = */true, /*CopyAssign = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::correct, /*Plus = */State::correct>;\nusing NonCopyable = ParallelForIndex</*IntCtor = */true, /*CopyCtor = */false, /*CopyAssign = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::correct, /*Plus = */State::correct>;\nusing NonCopyAssignable = ParallelForIndex</*IntCtor = */true, /*CopyCtor = */true, /*CopyAssign = */false, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::correct, /*Plus = */State::correct>;\nusing NonDestructible = ParallelForIndex</*IntCtor = */true, /*CopyCtor = */true, /*CopyAssign = */true, /*Dtor = */false, /*Less = */State::correct, /*Minus = */State::correct, /*Plus = */State::correct>;\nusing NoOperatorLess = ParallelForIndex</*IntCtor = */true, /*CopyCtor = */true, /*CopyAssign = */true, /*Dtor = */true, /*Less = */State::not_defined, /*Minus = */State::correct, /*Plus = */State::correct>;\nusing OperatorLessNonConst = ParallelForIndex</*IntCtor = */true, /*CopyCtor = */true, /*CopyAssign = */true, /*Dtor = */true, /*Less = */State::incorrect_constness, /*Minus = */State::correct, /*Plus = */State::correct>;\nusing WrongInputOperatorLess = ParallelForIndex</*IntCtor = */true, /*CopyCtor = */true, /*CopyAssign = */true, /*Dtor = */true, /*Less = */State::incorrect_first_input, /*Minus = */State::correct, /*Plus = */State::correct>;\nusing WrongReturnOperatorLess = ParallelForIndex</*IntCtor = */true, /*CopyCtor = */true, /*CopyAssign = */true, /*Dtor = */true, /*Less = */State::incorrect_return_type, /*Minus = */State::correct, /*Plus = */State::correct>;\nusing NoOperatorMinus = ParallelForIndex</*IntCtor = */true, /*CopyCtor = */true, /*CopyAssign = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::not_defined, /*Plus = */State::correct>;\nusing OperatorMinusNonConst = ParallelForIndex</*IntCtor = */true, /*CopyCtor = */true, /*CopyAssign = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::incorrect_constness, /*Plus = */State::correct>;\nusing WrongInputOperatorMinus = ParallelForIndex</*IntCtor = */true, /*CopyCtor = */true, /*CopyAssign = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::incorrect_first_input, /*Plus = */State::correct>;\nusing WrongReturnOperatorMinus = ParallelForIndex</*IntCtor = */true, /*CopyCtor = */true, /*CopyAssign = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::incorrect_return_type, /*Plus = */State::correct>;\nusing NoOperatorPlus = ParallelForIndex</*IntCtor = */true, /*CopyCtor = */true, /*CopyAssign = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::correct, /*Plus = */State::not_defined>;\nusing OperatorPlusNonConst = ParallelForIndex</*IntCtor = */true, /*CopyCtor = */true, /*CopyAssign = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::correct, /*Plus = */State::incorrect_constness>;\nusing WrongInputOperatorPlus = ParallelForIndex</*IntCtor = */true, /*CopyCtor = */true, /*CopyAssign = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::correct, /*Plus = */State::incorrect_first_input>;\nusing WrongReturnOperatorPlus = ParallelForIndex</*IntCtor = */true, /*CopyCtor = */true, /*CopyAssign = */true, /*Dtor = */true, /*Less = */State::correct, /*Minus = */State::correct, /*Plus = */State::incorrect_return_type>;\n} // namespace parallel_for_index\nnamespace parallel_for_each_body {\n\ntemplate <typename T, State EnableFunctionCallOperator>\nstruct ParallelForEachBody {\n    void operator()( const T& ) const requires (EnableFunctionCallOperator == State::correct) {}\n    void operator()( const T& ) requires (EnableFunctionCallOperator == State::incorrect_constness) {}\n    void operator()( Dummy ) const requires (EnableFunctionCallOperator == State::incorrect_first_input) {}\n};\n\ntemplate <typename T, typename FeederT, State EnableFunctionCallOperator>\nstruct ParallelForEachFeederBody {\n    void operator()( const T&, tbb::feeder<FeederT>& ) const requires (EnableFunctionCallOperator == State::correct) {}\n    void operator()( const T&, tbb::feeder<FeederT>& ) requires (EnableFunctionCallOperator == State::incorrect_constness) {}\n    void operator()( Dummy, tbb::feeder<FeederT>& ) const requires (EnableFunctionCallOperator == State::incorrect_first_input) {}\n    void operator()( const T&, Dummy ) const requires (EnableFunctionCallOperator == State::incorrect_second_input) {}\n};\n\ntemplate <typename T> using Correct = ParallelForEachBody<T, /*() = */State::correct>;\ntemplate <typename T> using NoOperatorRoundBrackets = ParallelForEachBody<T, /*() = */State::not_defined>;\ntemplate <typename T> using OperatorRoundBracketsNonConst = ParallelForEachBody<T, /*() = */State::incorrect_constness>;\ntemplate <typename T> using WrongInputOperatorRoundBrackets = ParallelForEachBody<T, /*() = */State::incorrect_first_input>;\n\ntemplate <typename T, typename F = T> using WithFeeder = ParallelForEachFeederBody<T, F, /*() = */State::correct>;\ntemplate <typename T, typename F = T> using WithFeederNoOperatorRoundBrackets = ParallelForEachFeederBody<T, F, /*() = */State::not_defined>;\ntemplate <typename T, typename F = T> using WithFeederOperatorRoundBracketsNonConst = ParallelForEachFeederBody<T, F, /*() = */State::incorrect_constness>;\ntemplate <typename T, typename F = T> using WithFeederWrongFirstInputOperatorRoundBrackets = ParallelForEachFeederBody<T, F, /*() = */State::incorrect_first_input>;\ntemplate <typename T, typename F = T> using WithFeederWrongSecondInputOperatorRoundBrackets = ParallelForEachFeederBody<T, F, /*() = */State::incorrect_second_input>;\n} // namespace parallel_for_each_body\nnamespace parallel_sort_value {\ntemplate<bool MovableV, bool MoveAssignableV, bool ComparableV>\nstruct ParallelSortValue\n{\n    ParallelSortValue(ParallelSortValue&&) requires MovableV = default;\n    ParallelSortValue& operator=(ParallelSortValue&&) requires MoveAssignableV = default;\n\n    friend bool operator<(const ParallelSortValue&, const ParallelSortValue&) requires ComparableV { return true; }\n};\n\nusing CorrectValue = ParallelSortValue</*MovableV = */true, /*MoveAssignableV = */true, /*ComparableV = */true>;\nusing NonMovableValue = ParallelSortValue</*MovableV = */false, /*MoveAssignableV = */true, /*ComparableV = */true>;\nusing NonMoveAssignableValue = ParallelSortValue</*MovableV = */true, /*MoveAssignableV = */false, /*ComparableV = */true>;\nusing NonComparableValue = ParallelSortValue</*MovableV = */true, /*MoveAssignableV = */true, /*ComparableV = */false>;\n} // namespace parallel_sort_value\ntemplate <typename T>\nclass ConstantIT {\n    T data{};\n    const T& operator* () const { return data; }\n};\nnamespace container_based_sequence {\n\ntemplate <bool EnableBegin, bool EnableEnd, typename T = int>\nstruct ContainerBasedSequence {\n    using iterator = T*;\n    T* begin() requires EnableBegin { return nullptr; }\n    T* end() requires EnableEnd { return nullptr; }\n};\n\nusing Correct = ContainerBasedSequence</*Begin = */true, /*End = */true>;\nusing NoBegin = ContainerBasedSequence</*Begin = */false, /*End = */true>;\nusing NoEnd = ContainerBasedSequence</*Begin = */true, /*End = */false>;\n\ntemplate <typename T>\nusing CustomValueCBS = ContainerBasedSequence</*Begin = */true, /*End = */true, T>;\n\nstruct ConstantCBS {\n    ConstantIT<int> begin() const { return ConstantIT<int>{}; }\n    ConstantIT<int> end() const { return ConstantIT<int>{}; }\n};\n\nstruct ForwardIteratorCBS {\n    utils::ForwardIterator<int> begin() { return utils::ForwardIterator<int>{}; }\n    utils::ForwardIterator<int> end() { return begin(); }\n};\n\n} // namespace container_based_sequence\nnamespace parallel_reduce_body {\n\ntemplate <typename Range, bool EnableSplitCtor, bool EnableDtor, State EnableFunctionCallOperator, State EnableJoin>\nstruct ParallelReduceBody {\n    ParallelReduceBody( ParallelReduceBody&, tbb::split ) requires EnableSplitCtor {}\n    // Prospective destructors\n    ~ParallelReduceBody() requires EnableDtor = default;\n    ~ParallelReduceBody() = delete;\n\n    void operator()( const Range& ) requires (EnableFunctionCallOperator == State::correct) {}\n    void operator()( Dummy ) requires (EnableFunctionCallOperator == State::incorrect_first_input) {}\n\n    void join( ParallelReduceBody& ) requires (EnableJoin == State::correct) {}\n    void join( Dummy ) requires (EnableJoin == State::incorrect_first_input) {}\n};\n\ntemplate <typename R> using Correct = ParallelReduceBody<R, /*SplitCtor = */true, /*Dtor = */true, /*() = */State::correct, /*Join = */State::correct>;\ntemplate <typename R> using NonSplittable = ParallelReduceBody<R, /*SplitCtor = */false, /*Dtor = */true, /*() = */State::correct, /*Join = */State::correct>;\ntemplate <typename R> using NonDestructible = ParallelReduceBody<R, /*SplitCtor = */true, /*Dtor = */false, /*() = */State::correct, /*Join = */State::correct>;\ntemplate <typename R> using NoOperatorRoundBrackets = ParallelReduceBody<R, /*SplitCtor = */true, /*Dtor = */true, /*() = */State::not_defined, /*Join = */State::correct>;\ntemplate <typename R> using WrongInputOperatorRoundBrackets = ParallelReduceBody<R, /*SplitCtor = */true, /*Dtor = */true, /*() = */State::incorrect_first_input, /*Join = */State::correct>;\ntemplate <typename R> using NoJoin = ParallelReduceBody<R, /*SplitCtor = */true, /*Dtor = */true, /*() = */State::correct, /*Join = */State::not_defined>;\ntemplate <typename R> using WrongInputJoin = ParallelReduceBody<R, /*SplitCtor = */true, /*Dtor = */true, /*() = */State::correct, /*Join = */State::incorrect_first_input>;\n} // namespace parallel_reduce_body\nnamespace parallel_reduce_function {\n\ntemplate <typename Range, State EnableFunctionCallOperator>\nstruct ParallelReduceFunction {\n    int operator()( const Range&, const int& ) const requires (EnableFunctionCallOperator == State::correct) { return 0; }\n    int operator()( const Range&, const int& ) requires (EnableFunctionCallOperator == State::incorrect_constness) { return 0; }\n    int operator()( Dummy, const int& ) const requires (EnableFunctionCallOperator == State::incorrect_first_input) { return 0; }\n    int operator()( const Range&, Dummy ) const requires (EnableFunctionCallOperator == State::incorrect_second_input) { return 0; }\n    Dummy operator()( const Range&, const int& ) const requires (EnableFunctionCallOperator == State::incorrect_return_type) { return Dummy{}; }\n};\n\ntemplate <typename R> using Correct = ParallelReduceFunction<R, /*() = */State::correct>;\ntemplate <typename R> using NoOperatorRoundBrackets = ParallelReduceFunction<R, /*() = */State::not_defined>;\ntemplate <typename R> using OperatorRoundBracketsNonConst = ParallelReduceFunction<R, /*() = */State::incorrect_constness>;\ntemplate <typename R> using WrongFirstInputOperatorRoundBrackets = ParallelReduceFunction<R, /*() = */State::incorrect_first_input>;\ntemplate <typename R> using WrongSecondInputOperatorRoundBrackets = ParallelReduceFunction<R, /*() = */State::incorrect_second_input>;\ntemplate <typename R> using WrongReturnOperatorRoundBrackets = ParallelReduceFunction<R, /*() = */State::incorrect_return_type>;\n} // namespace parallel_reduce_function\nnamespace parallel_reduce_combine {\n\ntemplate <typename T, State EnableFunctionCallOperator>\nstruct ParallelReduceCombine {\n    T operator()( const T& a, const T& ) const requires (EnableFunctionCallOperator == State::correct) { return a; }\n    T operator()( const T& a, const T& ) requires (EnableFunctionCallOperator == State::incorrect_constness) { return a; }\n    T operator()( Dummy, const T& a ) const requires (EnableFunctionCallOperator == State::incorrect_first_input) { return a; }\n    T operator()( const T& a, Dummy ) const requires (EnableFunctionCallOperator == State::incorrect_second_input) { return a; }\n    Dummy operator()( const T&, const T& ) const requires (EnableFunctionCallOperator == State::incorrect_return_type) { return Dummy{}; }\n};\n\ntemplate <typename T> using Correct = ParallelReduceCombine<T, /*() = */State::correct>;\ntemplate <typename T> using NoOperatorRoundBrackets = ParallelReduceCombine<T, /*() = */State::not_defined>;\ntemplate <typename T> using OperatorRoundBracketsNonConst = ParallelReduceCombine<T, /*() = */State::incorrect_constness>;\ntemplate <typename T> using WrongFirstInputOperatorRoundBrackets = ParallelReduceCombine<T, /*() = */State::incorrect_first_input>;\ntemplate <typename T> using WrongSecondInputOperatorRoundBrackets = ParallelReduceCombine<T, /*() = */State::incorrect_second_input>;\ntemplate <typename T> using WrongReturnOperatorRoundBrackets = ParallelReduceCombine<T, /*() = */State::incorrect_return_type>;\n} // namespace parallel_reduce_reduction\nnamespace parallel_scan_body {\n\ntemplate <typename Range, bool EnableSplitCtor, State EnableReverseJoin, State EnableAssign, State EnablePreScanRoundBrackets, State EnableFinalScanRoundBrackets>\nstruct ParallelScanBody {\n    ParallelScanBody( ParallelScanBody&, tbb::split ) requires EnableSplitCtor {}\n\n    void reverse_join( ParallelScanBody& ) requires (EnableReverseJoin == State::correct) {}\n    void reverse_join( Dummy ) requires (EnableReverseJoin == State::incorrect_first_input) {}\n\n    void assign( ParallelScanBody& ) requires (EnableAssign == State::correct) {}\n    void assign( Dummy ) requires (EnableAssign == State::incorrect_first_input) {}\n\n    void operator()( const Range&, tbb::pre_scan_tag ) requires (EnablePreScanRoundBrackets == State::correct) {}\n    void operator()( Dummy, tbb::pre_scan_tag ) requires (EnablePreScanRoundBrackets == State::incorrect_first_input) {}\n    void operator()( const Range&, Dummy ) requires (EnablePreScanRoundBrackets == State::incorrect_second_input) {}\n\n    void operator()( const Range&, tbb::final_scan_tag ) requires (EnableFinalScanRoundBrackets == State::correct) {}\n    void operator()( Dummy, tbb::final_scan_tag ) requires (EnableFinalScanRoundBrackets == State::incorrect_first_input) {}\n    void operator()( const Range&, Dummy ) requires (EnableFinalScanRoundBrackets == State::incorrect_second_input) {}\n};\n\ntemplate <typename R> using Correct = ParallelScanBody<R, /*SplitCtor = */true, /*ReverseJoin = */State::correct, /*Assign = */State::correct, /*PreScan = */State::correct, /*FinalScan = */State::correct>;\ntemplate <typename R> using NonSplittable = ParallelScanBody<R, /*SplitCtor = */false, /*ReverseJoin = */State::correct, /*Assign = */State::correct, /*PreScan = */State::correct, /*FinalScan = */State::correct>;\ntemplate <typename R> using NoReverseJoin = ParallelScanBody<R, /*SplitCtor = */true, /*ReverseJoin = */State::not_defined, /*Assign = */State::correct, /*PreScan = */State::correct, /*FinalScan = */State::correct>;\ntemplate <typename R> using WrongInputReverseJoin = ParallelScanBody<R, /*SplitCtor = */true, /*ReverseJoin = */State::incorrect_first_input, /*Assign = */State::correct, /*PreScan = */State::correct, /*FinalScan = */State::correct>;\ntemplate <typename R> using NoAssign = ParallelScanBody<R, /*SplitCtor = */true, /*ReverseJoin = */State::correct, /*Assign = */State::not_defined, /*PreScan = */State::correct, /*FinalScan = */State::correct>;\ntemplate <typename R> using WrongInputAssign = ParallelScanBody<R, /*SplitCtor = */true, /*ReverseJoin = */State::correct, /*Assign = */State::incorrect_first_input, /*PreScan = */State::correct, /*FinalScan = */State::correct>;\ntemplate <typename R> using NoPreScanOperatorRoundBrackets = ParallelScanBody<R, /*SplitCtor = */true, /*ReverseJoin = */State::correct, /*Assign = */State::correct, /*PreScan = */State::not_defined, /*FinalScan = */State::correct>;\ntemplate <typename R> using WrongFirstInputPreScanOperatorRoundBrackets = ParallelScanBody<R, /*SplitCtor = */true, /*ReverseJoin = */State::correct, /*Assign = */State::correct, /*PreScan = */State::incorrect_first_input, /*FinalScan = */State::correct>;\ntemplate <typename R> using WrongSecondInputPreScanOperatorRoundBrackets = ParallelScanBody<R, /*SplitCtor = */true, /*ReverseJoin = */State::correct, /*Assign = */State::correct, /*PreScan = */State::incorrect_second_input, /*FinalScan = */State::correct>;\ntemplate <typename R> using NoFinalScanOperatorRoundBrackets = ParallelScanBody<R, /*SplitCtor = */true, /*ReverseJoin = */State::correct, /*Assign = */State::correct, /*PreScan = */State::correct, /*FinalScan = */State::not_defined>;\ntemplate <typename R> using WrongFirstInputFinalScanOperatorRoundBrackets = ParallelScanBody<R, /*SplitCtor = */true, /*ReverseJoin = */State::correct, /*Assign = */State::correct, /*PreScan = */State::correct, /*FinalScan = */State::incorrect_first_input>;\ntemplate <typename R> using WrongSecondInputFinalScanOperatorRoundBrackets = ParallelScanBody<R, /*SplitCtor = */true, /*ReverseJoin = */State::correct, /*Assign = */State::correct, /*PreScan = */State::correct, /*FinalScan = */State::incorrect_second_input>;\n} // namespace parallel_scan_body\nnamespace parallel_scan_function {\n\ntemplate <typename Range, typename T, State EnableFunctionCallOperator>\nstruct ParallelScanFunction {\n    T operator()( const Range&, const T& a, bool ) const requires (EnableFunctionCallOperator == State::correct) { return a; }\n    T operator()( const Range&, const T& a, bool ) requires (EnableFunctionCallOperator == State::incorrect_constness) { return a; }\n    T operator()( Dummy, const T& a, bool ) const requires (EnableFunctionCallOperator == State::incorrect_first_input) { return a; }\n    T operator()( const Range&, Dummy, bool ) const requires (EnableFunctionCallOperator == State::incorrect_second_input) { return T{}; }\n    T operator()( const Range&, const T& a, Dummy ) const requires (EnableFunctionCallOperator == State::incorrect_third_input) { return a; }\n    Dummy operator()( const Range&, const T&, bool ) const requires (EnableFunctionCallOperator == State::incorrect_return_type) { return Dummy{}; }\n};\n\ntemplate <typename R, typename T> using Correct = ParallelScanFunction<R, T, /*() = */State::correct>;\ntemplate <typename R, typename T> using NoOperatorRoundBrackets = ParallelScanFunction<R, T, /*() = */State::not_defined>;\ntemplate <typename R, typename T> using OperatorRoundBracketsNonConst = ParallelScanFunction<R, T, /*() = */State::incorrect_constness>;\ntemplate <typename R, typename T> using WrongFirstInputOperatorRoundBrackets = ParallelScanFunction<R, T, /*() = */State::incorrect_first_input>;\ntemplate <typename R, typename T> using WrongSecondInputOperatorRoundBrackets = ParallelScanFunction<R, T, /*() = */State::incorrect_second_input>;\ntemplate <typename R, typename T> using WrongThirdInputOperatorRoundBrackets = ParallelScanFunction<R, T, /*() = */State::incorrect_third_input>;\ntemplate <typename R, typename T> using WrongReturnOperatorRoundBrackets = ParallelScanFunction<R, T, /*() = */State::incorrect_return_type>;\n} // namespace parallel_scan_function\nnamespace parallel_scan_combine {\nusing namespace parallel_reduce_combine;\n} // namespace parallel_scan_combine\nnamespace compare {\n\ntemplate <typename T, State EnableFunctionCallOperator>\nstruct Compare {\n    bool operator()( const T&, const T& ) const requires (EnableFunctionCallOperator == State::correct) { return true; }\n    bool operator()( Dummy, const T& ) const requires (EnableFunctionCallOperator == State::incorrect_first_input) { return true; }\n    bool operator()( const T&, Dummy ) const requires (EnableFunctionCallOperator == State::incorrect_second_input) { return true; }\n    Dummy operator()( const T&, const T& ) const requires (EnableFunctionCallOperator == State::incorrect_return_type) { return Dummy{}; }\n};\n\ntemplate <typename T> using Correct = Compare<T, /*() = */State::correct>;\ntemplate <typename T> using NoOperatorRoundBrackets = Compare<T, /*() = */State::not_defined>;\ntemplate <typename T> using WrongFirstInputOperatorRoundBrackets = Compare<T, /*() = */State::incorrect_first_input>;\ntemplate <typename T> using WrongSecondInputOperatorRoundBrackets = Compare<T, /*() = */State::incorrect_second_input>;\ntemplate <typename T> using WrongReturnOperatorRoundBrackets = Compare<T, /*() = */State::incorrect_return_type>;\n} // namespace compare\n\nnamespace hash_compare {\n\ntemplate <typename Key, bool EnableCopyCtor, bool EnableDtor, State EnableHash, State EnableEqual>\nstruct HashCompare {\n    HashCompare( const HashCompare& ) requires EnableCopyCtor = default;\n    // Prospective destructors\n    ~HashCompare() requires EnableDtor = default;\n    ~HashCompare() = delete;\n\n    std::size_t hash( const Key& ) const requires (EnableHash == State::correct) { return 0; }\n    std::size_t hash( const Key& ) requires (EnableHash == State::incorrect_constness) { return 0; }\n    std::size_t hash( Dummy ) const requires (EnableHash == State::incorrect_first_input) { return 0; }\n    Dummy hash( const Key& ) const requires (EnableHash == State::incorrect_return_type) { return Dummy{}; }\n\n    bool equal( const Key&, const Key& ) const requires (EnableEqual == State::correct) { return true; }\n    bool equal( const Key&, const Key& ) requires (EnableEqual == State::incorrect_constness) { return true; }\n    bool equal( Dummy, const Key& ) const requires (EnableEqual == State::incorrect_first_input) { return true; }\n    bool equal( const Key&, Dummy ) const requires (EnableEqual == State::incorrect_second_input) { return true; }\n    Dummy equal( const Key&, const Key& ) const requires (EnableEqual == State::incorrect_return_type) { return Dummy{}; }\n};\n\ntemplate <typename K> using Correct = HashCompare<K, /*CopyCtor = */true, /*Dtor = */true, /*Hash = */State::correct, /*Equal = */State::correct>;\ntemplate <typename K> using NonCopyable = HashCompare<K, /*CopyCtor = */false, /*Dtor = */true, /*Hash = */State::correct, /*Equal = */State::correct>;\ntemplate <typename K> using NonDestructible = HashCompare<K, /*CopyCtor = */true, /*Dtor = */false, /*Hash = */State::correct, /*Equal = */State::correct>;\ntemplate <typename K> using NoHash = HashCompare<K, /*CopyCtor = */true, /*Dtor = */true, /*Hash = */State::not_defined, /*Equal = */State::correct>;\ntemplate <typename K> using HashNonConst = HashCompare<K, /*CopyCtor = */true, /*Dtor = */true, /*Hash = */State::incorrect_constness, /*Equal = */State::correct>;\ntemplate <typename K> using WrongInputHash = HashCompare<K, /*CopyCtor = */true, /*Dtor = */true, /*Hash = */State::incorrect_first_input, /*Equal = */State::correct>;\ntemplate <typename K> using WrongReturnHash = HashCompare<K, /*CopyCtor = */true, /*Dtor = */true, /*Hash = */State::incorrect_return_type, /*Equal = */State::correct>;\ntemplate <typename K> using NoEqual = HashCompare<K, /*CopyCtor = */true, /*Dtor = */true, /*Hash = */State::correct, /*Equal = */State::not_defined>;\ntemplate <typename K> using EqualNonConst = HashCompare<K, /*CopyCtor = */true, /*Dtor = */true, /*Hash = */State::correct, /*Equal = */State::incorrect_constness>;\ntemplate <typename K> using WrongFirstInputEqual = HashCompare<K, /*CopyCtor = */true, /*Dtor = */true, /*Hash = */State::correct, /*Equal = */State::incorrect_first_input>;\ntemplate <typename K> using WrongSecondInputEqual = HashCompare<K, /*CopyCtor = */true, /*Dtor = */true, /*Hash = */State::correct, /*Equal = */State::incorrect_second_input>;\ntemplate <typename K> using WrongReturnEqual = HashCompare<K, /*CopyCtor = */true, /*Dtor = */true, /*Hash = */State::correct, /*Equal = */State::incorrect_return_type>;\n\n} // namespace hash_compare\nnamespace rw_mutex {\n\ntemplate <typename RwMutex, bool EnableSLDefaultCtor, bool EnableSLMutexCtor, bool EnableSLDtor, State EnableSLAcquire, State EnableSLTryAcquire, bool EnableSLRelease, State EnableSLUpgrade, State EnableSLDowngrade, State EnableIsWriter>\nstruct DefineRWScopedLock {\n    struct scoped_lock {\n        scoped_lock() requires EnableSLDefaultCtor = default;\n        scoped_lock( RwMutex&, bool = true ) requires EnableSLMutexCtor {}\n        // Prospective destructors\n        ~scoped_lock() requires EnableSLDtor = default;\n        ~scoped_lock() = delete;\n\n        void acquire( RwMutex&, bool = true ) requires (EnableSLAcquire == State::correct) {}\n        void acquire( Dummy, bool = true ) requires (EnableSLAcquire == State::incorrect_first_input) {}\n        void acquire( RwMutex&, Dummy = Dummy{} ) requires (EnableSLAcquire == State::incorrect_second_input) {}\n\n        bool try_acquire( RwMutex&, bool = true ) requires (EnableSLTryAcquire == State::correct) { return true; }\n        bool try_acquire( Dummy, bool = true ) requires (EnableSLTryAcquire == State::incorrect_first_input) { return true; }\n        bool try_acquire( RwMutex&, Dummy = Dummy{} ) requires (EnableSLTryAcquire == State::incorrect_second_input) { return true; }\n        Dummy try_acquire( RwMutex&, bool = true ) requires (EnableSLTryAcquire == State::incorrect_return_type) { return Dummy{}; }\n\n        void release() requires (EnableSLRelease) {}\n\n        bool upgrade_to_writer() requires (EnableSLUpgrade == State::correct) { return true; }\n        Dummy upgrade_to_writer() requires (EnableSLUpgrade == State::incorrect_return_type) { return Dummy{}; }\n\n        bool downgrade_to_reader() requires (EnableSLDowngrade == State::correct) { return true; }\n        Dummy downgrade_to_reader() requires (EnableSLDowngrade == State::incorrect_return_type) { return Dummy{}; }\n\n        bool is_writer() const requires (EnableIsWriter == State::correct) { return true; }\n        Dummy is_writer() const requires (EnableIsWriter == State::incorrect_return_type) { return Dummy{}; }\n        bool is_writer() requires (EnableIsWriter == State::incorrect_constness) { return true; }\n    };\n};\n\ntemplate <State S>\ninline const bool mutex_trait_impl = true;\n\ntemplate <>\ninline const int mutex_trait_impl<State::incorrect> = 0;\n\ntemplate <>\ninline bool mutex_trait_impl<State::non_constant_expression> = true;\n\ntemplate <bool EnableScopedLock, bool EnableSLDefaultCtor, bool EnableSLMutexCtor, bool EnableSLDtor, State EnableSLAcquire, State EnableSLTryAcquire,\n          bool EnableSLRelease, State EnableSLUpgrade, State EnableSLDowngrade, State EnableSLIsWriter>\nstruct RWMutex\n    : std::conditional_t<EnableScopedLock, DefineRWScopedLock<RWMutex<EnableScopedLock, EnableSLDefaultCtor, EnableSLMutexCtor, EnableSLDtor, EnableSLAcquire, EnableSLTryAcquire, EnableSLRelease, EnableSLUpgrade, EnableSLDowngrade, EnableSLIsWriter>,\n                                                                      EnableSLDefaultCtor, EnableSLMutexCtor, EnableSLDtor, EnableSLAcquire, EnableSLTryAcquire, EnableSLRelease, EnableSLUpgrade, EnableSLDowngrade, EnableSLIsWriter>,\n                                           Dummy>\n{};\n\nusing Correct = RWMutex</*ScopedLock = */true, /*DefaultCtor = */true, /*MutexCtor = */true, /*Dtor = */true, /*Acquire = */State::correct,\n                        /*try_acquire = */State::correct, /*release = */true, /*upgrade = */State::correct, /*downgrade = */State::correct, /*is_writer = */State::correct>;\nusing NoScopedLock = RWMutex</*ScopedLock = */false, /*DefaultCtor = */true, /*MutexCtor = */true, /*Dtor = */true, /*Acquire = */State::correct,\n                             /*try_acquire = */State::correct, /*release = */true, /*upgrade = */State::correct, /*downgrade = */State::correct, /*is_writer = */State::correct>;\nusing ScopedLockNoDefaultCtor = RWMutex</*ScopedLock = */true, /*DefaultCtor = */false, /*MutexCtor = */true, /*Dtor = */true, /*Acquire = */State::correct,\n                                        /*try_acquire = */State::correct, /*release = */true, /*upgrade = */State::correct, /*downgrade = */State::correct, /*is_writer = */State::correct>;\nusing ScopedLockNoMutexCtor = RWMutex</*ScopedLock = */true, /*DefaultCtor = */true, /*MutexCtor = */false, /*Dtor = */true, /*Acquire = */State::correct,\n                                      /*try_acquire = */State::correct, /*release = */true, /*upgrade = */State::correct, /*downgrade = */State::correct, /*is_writer = */State::correct>;\nusing ScopedLockNoDtor = RWMutex</*ScopedLock = */true, /*DefaultCtor = */true, /*MutexCtor = */true, /*Dtor = */false, /*Acquire = */State::correct,\n                                 /*try_acquire = */State::correct, /*release = */true, /*upgrade = */State::correct, /*downgrade = */State::correct, /*is_writer = */State::correct>;\nusing ScopedLockNoAcquire = RWMutex</*ScopedLock = */true, /*DefaultCtor = */true, /*MutexCtor = */true, /*Dtor = */true, /*Acquire = */State::not_defined,\n                                    /*try_acquire = */State::correct, /*release = */true, /*upgrade = */State::correct, /*downgrade = */State::correct, /*is_writer = */State::correct>;\nusing ScopedLockWrongFirstInputAcquire = RWMutex</*ScopedLock = */true, /*DefaultCtor = */true, /*MutexCtor = */true, /*Dtor = */true, /*Acquire = */State::incorrect_first_input,\n                                                 /*try_acquire = */State::correct, /*release = */true, /*upgrade = */State::correct, /*downgrade = */State::correct, /*is_writer = */State::correct>;\nusing ScopedLockWrongSecondInputAcquire = RWMutex</*ScopedLock = */true, /*DefaultCtor = */true, /*MutexCtor = */true, /*Dtor = */true, /*Acquire = */State::incorrect_second_input,\n                                                  /*try_acquire = */State::correct, /*release = */true, /*upgrade = */State::correct, /*downgrade = */State::correct, /*is_writer = */State::correct>;\nusing ScopedLockNoTryAcquire = RWMutex</*ScopedLock = */true, /*DefaultCtor = */true, /*MutexCtor = */true, /*Dtor = */true, /*Acquire = */State::correct,\n                                       /*try_acquire = */State::not_defined, /*release = */true, /*upgrade = */State::correct, /*downgrade = */State::correct, /*is_writer = */State::correct>;\nusing ScopedLockWrongFirstInputTryAcquire = RWMutex</*ScopedLock = */true, /*DefaultCtor = */true, /*MutexCtor = */true, /*Dtor = */true, /*Acquire = */State::correct,\n                                                    /*try_acquire = */State::incorrect_first_input, /*release = */true, /*upgrade = */State::correct, /*downgrade = */State::correct, /*is_writer = */State::correct>;\nusing ScopedLockWrongSecondInputTryAcquire = RWMutex</*ScopedLock = */true, /*DefaultCtor = */true, /*MutexCtor = */true, /*Dtor = */true, /*Acquire = */State::correct,\n                                                     /*try_acquire = */State::incorrect_second_input, /*release = */true, /*upgrade = */State::correct, /*downgrade = */State::correct, /*is_writer = */State::correct>;\nusing ScopedLockWrongReturnTryAcquire = RWMutex</*ScopedLock = */true, /*DefaultCtor = */true, /*MutexCtor = */true, /*Dtor = */true, /*Acquire = */State::correct,\n                                                /*try_acquire = */State::incorrect_return_type, /*release = */true, /*upgrade = */State::correct, /*downgrade = */State::correct, /*is_writer = */State::correct>;\nusing ScopedLockNoRelease = RWMutex</*ScopedLock = */true, /*DefaultCtor = */true, /*MutexCtor = */true, /*Dtor = */true, /*Acquire = */State::correct,\n                                    /*try_acquire = */State::correct, /*release = */false, /*upgrade = */State::correct, /*downgrade = */State::correct, /*is_writer = */State::correct>;\nusing ScopedLockNoUpgrade = RWMutex</*ScopedLock = */true, /*DefaultCtor = */true, /*MutexCtor = */true, /*Dtor = */true, /*Acquire = */State::correct,\n                                    /*try_acquire = */State::correct, /*release = */true, /*upgrade = */State::not_defined, /*downgrade = */State::correct, /*is_writer = */State::correct>;\nusing ScopedLockWrongReturnUpgrade = RWMutex</*ScopedLock = */true, /*DefaultCtor = */true, /*MutexCtor = */true, /*Dtor = */true, /*Acquire = */State::correct,\n                                             /*try_acquire = */State::correct, /*release = */true, /*upgrade = */State::incorrect_return_type, /*downgrade = */State::correct, /*is_writer = */State::correct>;\nusing ScopedLockNoDowngrade = RWMutex</*ScopedLock = */true, /*DefaultCtor = */true, /*MutexCtor = */true, /*Dtor = */true, /*Acquire = */State::correct,\n                                      /*try_acquire = */State::correct, /*release = */true, /*upgrade = */State::correct, /*downgrade = */State::not_defined, /*is_writer = */State::correct>;\nusing ScopedLockWrongReturnDowngrade = RWMutex</*ScopedLock = */true, /*DefaultCtor = */true, /*MutexCtor = */true, /*Dtor = */true, /*Acquire = */State::correct,\n                                               /*try_acquire = */State::correct, /*release = */true, /*upgrade = */State::correct, /*downgrade = */State::incorrect_return_type, /*is_writer = */State::correct>;\nusing ScopedLockNoIsWriter = RWMutex</*ScopedLock = */true, /*DefaultCtor = */true, /*MutexCtor = */true, /*Dtor = */true, /*Acquire = */State::correct,\n                                     /*try_acquire = */State::correct, /*release = */true, /*upgrade = */State::correct, /*downgrade = */State::correct, /*is_writer = */State::not_defined>;\nusing ScopedLockIsWriterNonConst = RWMutex</*ScopedLock = */true, /*DefaultCtor = */true, /*MutexCtor = */true, /*Dtor = */true, /*Acquire = */State::correct,\n                                           /*try_acquire = */State::correct, /*release = */true, /*upgrade = */State::correct, /*downgrade = */State::correct, /*is_writer = */State::incorrect_constness>;\nusing ScopedLockWrongReturnIsWriter = RWMutex</*ScopedLock = */true, /*DefaultCtor = */true, /*MutexCtor = */true, /*Dtor = */true, /*Acquire = */State::correct,\n                                              /*try_acquire = */State::correct, /*release = */true, /*upgrade = */State::correct, /*downgrade = */State::correct, /*is_writer = */State::incorrect_return_type>;\n} // namespace rw_mutex\n\n// Flow Graph testing infrastructure below\nnamespace input_node_body {\n\ntemplate <typename Output, bool EnableCopyCtor, bool EnableDtor, State EnableFunctionCallOperator>\nstruct InputNodeBody {\n    InputNodeBody( const InputNodeBody& ) requires EnableCopyCtor = default;\n    // Prospective destructors\n    ~InputNodeBody() requires EnableDtor = default;\n    ~InputNodeBody() = delete;\n\n    Output operator()( tbb::flow_control& ) requires (EnableFunctionCallOperator == State::correct) { return Output{}; }\n    Output operator()( Dummy ) requires (EnableFunctionCallOperator == State::incorrect_first_input) { return Output{}; }\n    Dummy operator()( tbb::flow_control& ) requires (EnableFunctionCallOperator == State::incorrect_return_type) { return Dummy{}; }\n};\n\ntemplate <typename O> using Correct = InputNodeBody<O, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::correct>;\ntemplate <typename O> using NonCopyable = InputNodeBody<O, /*CopyCtor = */false, /*Dtor = */true, /*() = */State::correct>;\ntemplate <typename O> using NonDestructible = InputNodeBody<O, /*CopyCtor = */true, /*Dtor = */false, /*() = */State::correct>;\ntemplate <typename O> using NoOperatorRoundBrackets = InputNodeBody<O, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::not_defined>;\ntemplate <typename O> using WrongInputOperatorRoundBrackets = InputNodeBody<O, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::incorrect_first_input>;\ntemplate <typename O> using WrongReturnOperatorRoundBrackets = InputNodeBody<O, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::incorrect_return_type>;\n} // namespace input_node_body\nnamespace function_node_body {\n\ntemplate <typename Input, typename Output, bool EnableCopyCtor, bool EnableDtor, State EnableFunctionCallOperator>\nstruct FunctionNodeBody {\n    FunctionNodeBody( const FunctionNodeBody& ) requires EnableCopyCtor = default;\n    // Prospective destructors\n    ~FunctionNodeBody() requires EnableDtor = default;\n    ~FunctionNodeBody() = delete;\n\n    Output operator()( const Input& ) requires (EnableFunctionCallOperator == State::correct) { return Output{}; }\n    Output operator()( Dummy ) requires (EnableFunctionCallOperator == State::incorrect_first_input) { return Dummy{}; }\n    Dummy operator()( const Input& ) requires (EnableFunctionCallOperator == State::incorrect_return_type) { return Output{}; }\n};\n\ntemplate <typename I, typename O> using Correct = FunctionNodeBody<I, O, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::correct>;\ntemplate <typename I, typename O> using NonCopyable = FunctionNodeBody<I, O, /*CopyCtor = */false, /*Dtor = */true, /*() = */State::correct>;\ntemplate <typename I, typename O> using NonDestructible = FunctionNodeBody<I, O, /*CopyCtor = */true, /*Dtor = */false, /*() = */State::correct>;\ntemplate <typename I, typename O> using NoOperatorRoundBrackets = FunctionNodeBody<I, O, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::not_defined>;\ntemplate <typename I, typename O> using WrongInputRoundBrackets = FunctionNodeBody<I, O, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::incorrect_first_input>;\ntemplate <typename I, typename O> using WrongReturnRoundBrackets = FunctionNodeBody<I, O, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::incorrect_return_type>;\n} // namespace function_node_body\nnamespace mf_async_node_body {\n\ntemplate <typename Input, typename Output, typename PortsType, bool EnableCopyCtor, bool EnableDtor, State EnableFunctionCallOperator>\nstruct PortsNodeBody {\n    PortsNodeBody( const PortsNodeBody& ) requires EnableCopyCtor = default;\n    // Prospective destructors\n    ~PortsNodeBody() requires EnableDtor = default;\n    ~PortsNodeBody() = delete;\n\n    void operator()( const Input&, PortsType& ) requires (EnableFunctionCallOperator == State::correct) {}\n    void operator()( Dummy, PortsType& ) requires (EnableFunctionCallOperator == State::incorrect_first_input) {}\n    void operator()( const Input&, Dummy ) requires (EnableFunctionCallOperator == State::incorrect_second_input) {}\n};\n\n} // namespace mf_async_node_body\nnamespace multifunction_node_body {\n\ntemplate <typename Input, typename Output>\nusing output_ports_type = typename tbb::flow::multifunction_node<Input, Output>::output_ports_type;\n\nusing mf_async_node_body::PortsNodeBody;\n\ntemplate <typename I, typename O> using Correct = PortsNodeBody<I, O, output_ports_type<I, O>, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::correct>;\ntemplate <typename I, typename O> using NonCopyable = PortsNodeBody<I, O, output_ports_type<I, O>, /*CopyCtor = */false, /*Dtor = */true, /*() = */State::correct>;\ntemplate <typename I, typename O> using NonDestructible = PortsNodeBody<I, O, output_ports_type<I, O>, /*CopyCtor = */true, /*Dtor = */false, /*() = */State::correct>;\ntemplate <typename I, typename O> using NoOperatorRoundBrackets = PortsNodeBody<I, O, output_ports_type<I, O>, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::not_defined>;\ntemplate <typename I, typename O> using WrongFirstInputOperatorRoundBrackets = PortsNodeBody<I, O, output_ports_type<I, O>, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::incorrect_first_input>;\ntemplate <typename I, typename O> using WrongSecondInputOperatorRoundBrackets = PortsNodeBody<I, O, output_ports_type<I, O>, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::incorrect_second_input>;\n} // namespace multifunction_node_body\nnamespace async_node_body {\n\ntemplate <typename Input, typename Output>\nusing gateway_type = typename tbb::flow::async_node<Input, Output>::gateway_type;\n\nusing mf_async_node_body::PortsNodeBody;\n\ntemplate <typename I, typename O> using Correct = PortsNodeBody<I, O, gateway_type<I, O>, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::correct>;\ntemplate <typename I, typename O> using NonCopyable = PortsNodeBody<I, O, gateway_type<I, O>, /*CopyCtor = */false, /*Dtor = */true, /*() = */State::correct>;\ntemplate <typename I, typename O> using NonDestructible = PortsNodeBody<I, O, gateway_type<I, O>, /*CopyCtor = */true, /*Dtor = */false, /*() = */State::correct>;\ntemplate <typename I, typename O> using NoOperatorRoundBrackets = PortsNodeBody<I, O, gateway_type<I, O>, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::not_defined>;\ntemplate <typename I, typename O> using WrongFirstInputOperatorRoundBrackets = PortsNodeBody<I, O, gateway_type<I, O>, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::incorrect_first_input>;\ntemplate <typename I, typename O> using WrongSecondInputOperatorRoundBrackets = PortsNodeBody<I, O, gateway_type<I, O>, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::incorrect_second_input>;\n} // namespace async_node_body\nnamespace continue_node_body {\n\ntemplate <typename Output, bool EnableCopyCtor, bool EnableDtor, State EnableFunctionCallOperator>\nstruct ContinueNodeBody {\n    ContinueNodeBody( const ContinueNodeBody& ) requires EnableCopyCtor = default;\n    // Prospective destructors\n    ~ContinueNodeBody() requires EnableDtor = default;\n    ~ContinueNodeBody() = delete;\n\n    Output operator()( tbb::flow::continue_msg ) requires (EnableFunctionCallOperator == State::correct) { return Output{}; }\n    Output operator()( Dummy ) requires (EnableFunctionCallOperator == State::incorrect_first_input) { return Output{}; }\n    Dummy operator()( tbb::flow::continue_msg ) requires (EnableFunctionCallOperator == State::incorrect_return_type) { return Dummy{}; }\n};\n\ntemplate <typename O> using Correct = ContinueNodeBody<O, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::correct>;\ntemplate <typename O> using NonCopyable = ContinueNodeBody<O, /*CopyCtor = */false, /*Dtor = */true, /*() = */State::correct>;\ntemplate <typename O> using NonDestructible = ContinueNodeBody<O, /*CopyCtor = */true, /*Dtor = */false, /*() = */State::correct>;\ntemplate <typename O> using NoOperatorRoundBrackets = ContinueNodeBody<O, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::not_defined>;\ntemplate <typename O> using WrongInputOperatorRoundBrackets = ContinueNodeBody<O, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::incorrect_first_input>;\ntemplate <typename O> using WrongReturnOperatorRoundBrackets = ContinueNodeBody<O, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::incorrect_return_type>;\n} // namespace continue_node_body\nnamespace sequencer {\n\ntemplate <typename T, bool EnableCopyCtor, bool EnableDtor, State EnableFunctionCallOperator>\nstruct Sequencer {\n    Sequencer( const Sequencer& ) requires EnableCopyCtor = default;\n    // Prospective destructors\n    ~Sequencer() requires EnableDtor = default;\n    ~Sequencer() = delete;\n\n    std::size_t operator()( const T& ) requires (EnableFunctionCallOperator == State::correct) { return 0; }\n    std::size_t operator()( Dummy ) requires (EnableFunctionCallOperator == State::incorrect_first_input) { return 0; }\n    Dummy operator()( const T& ) requires (EnableFunctionCallOperator == State::incorrect_return_type) { return Dummy{}; }\n};\n\ntemplate <typename T> using Correct = Sequencer<T, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::correct>;\ntemplate <typename T> using NonCopyable = Sequencer<T, /*CopyCtor = */false, /*Dtor = */true, /*() = */State::correct>;\ntemplate <typename T> using NonDestructible = Sequencer<T, /*CopyCtor = */true, /*Dtor = */false, /*() = */State::correct>;\ntemplate <typename T> using NoOperatorRoundBrackets = Sequencer<T, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::not_defined>;\ntemplate <typename T> using WrongInputOperatorRoundBrackets = Sequencer<T, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::incorrect_first_input>;\ntemplate <typename T> using WrongReturnOperatorRoundBrackets = Sequencer<T, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::incorrect_return_type>;\n} // namespace sequencer\nnamespace join_node_function_object {\n\ntemplate <typename Input, typename Key, bool EnableCopyCtor, bool EnableDtor, State EnableFunctionCallOperator>\nstruct JoinNodeFunctionObject {\n    JoinNodeFunctionObject( const JoinNodeFunctionObject& ) requires EnableCopyCtor = default;\n    // Prospective destructors\n    ~JoinNodeFunctionObject() requires EnableDtor = default;\n    ~JoinNodeFunctionObject() = delete;\n\n    Key operator()( const Input& ) requires (EnableFunctionCallOperator == State::correct) { return Key{}; }\n    Key operator()( Dummy ) requires (EnableFunctionCallOperator == State::incorrect_first_input) { return Key{}; }\n    Dummy operator()( const Input& ) requires (EnableFunctionCallOperator == State::incorrect_return_type) { return Dummy{}; }\n};\n\ntemplate <typename I, typename K> using Correct = JoinNodeFunctionObject<I, K, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::correct>;\ntemplate <typename I, typename K> using NonCopyable = JoinNodeFunctionObject<I, K, /*CopyCtor = */false, /*Dtor = */true, /*() = */State::correct>;\ntemplate <typename I, typename K> using NonDestructible = JoinNodeFunctionObject<I, K, /*CopyCtor = */true, /*Dtor = */false, /*() = */State::correct>;\ntemplate <typename I, typename K> using NoOperatorRoundBrackets = JoinNodeFunctionObject<I, K, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::not_defined>;\ntemplate <typename I, typename K> using WrongInputOperatorRoundBrackets = JoinNodeFunctionObject<I, K, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::incorrect_first_input>;\ntemplate <typename I, typename K> using WrongReturnOperatorRoundBrackets = JoinNodeFunctionObject<I, K, /*CopyCtor = */true, /*Dtor = */true, /*() = */State::incorrect_return_type>;\n\n} // namespace join_node_function_object\n\ntemplate <typename T>\nconcept container_range = tbb::detail::tbb_range<T> &&\n                          std::input_iterator<typename T::iterator> &&\n                          requires(T& range) {\n                              typename T::value_type;\n                              typename T::reference;\n                              typename T::size_type;\n                              typename T::difference_type;\n                              { range.begin() } -> std::same_as<typename T::iterator>;\n                              { range.end() } -> std::same_as<typename T::iterator>;\n                              { std::as_const(range).grainsize() } -> std::same_as<typename T::size_type>;\n                          };\n} // namespace test_concepts\n\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n#endif // __TBB_test_common_concepts_common_H\n"
  },
  {
    "path": "third-party/tbb/test/common/concurrency_tracker.h",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_concurrency_tracker_H\n#define __TBB_test_common_concurrency_tracker_H\n\n#include \"common/test.h\"\n#include \"utils.h\"\n#include \"spin_barrier.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n\n#include <mutex>\n\nnamespace utils {\n\nstatic std::atomic<unsigned>        ctInstantParallelism;\nstatic std::atomic<unsigned>        ctPeakParallelism;\nstatic thread_local std::uintptr_t  ctNested;\n\nclass ConcurrencyTracker {\n    bool    m_Outer;\n\n    static void Started () {\n        unsigned p = ++ctInstantParallelism;\n        unsigned q = ctPeakParallelism;\n        while( q<p ) {\n            ctPeakParallelism.compare_exchange_strong(q, p);\n        }\n    }\n\n    static void Stopped () {\n        //CHECK_MESSAGE ( ctInstantParallelism > 0, \"Mismatched call to ConcurrencyTracker::Stopped()\" );\n        --ctInstantParallelism;\n    }\npublic:\n    ConcurrencyTracker() : m_Outer(false) {\n        std::uintptr_t nested = ctNested;\n        CHECK_FAST(nested <= 1);\n        if ( !ctNested ) {\n            Started();\n            m_Outer = true;\n            ctNested = 1;\n        }\n    }\n    ~ConcurrencyTracker() {\n        if ( m_Outer ) {\n            Stopped();\n#if __GNUC__\n            // Some GCC versions tries to optimize out this write operation. So we need to perform this cast.\n            static_cast<volatile std::uintptr_t&>(ctNested) = 0;\n#else\n            ctNested = 0;\n#endif\n        }\n    }\n\n    static unsigned PeakParallelism() { return ctPeakParallelism; }\n    static unsigned InstantParallelism() { return ctInstantParallelism; }\n\n    static void Reset() {\n        CHECK_MESSAGE(ctInstantParallelism == 0, \"Reset cannot be called when concurrency tracking is underway\");\n        ctInstantParallelism = ctPeakParallelism = 0;\n    }\n}; // ConcurrencyTracker\n\n\nstruct ExactConcurrencyLevel : NoCopy {\nprivate:\n    SpinBarrier                 *myBarrier;\n\n    // count unique worker threads\n    mutable std::atomic<int>    myUniqueThreadsCnt;\n    static thread_local int     myUniqueThreads;\n    static std::atomic<int>     myEpoch;\n\n    mutable std::atomic<size_t> myActiveBodyCnt;\n    // output parameter for parallel_for body to report that max is reached\n    mutable std::atomic<bool>   myReachedMax;\n    // zero timeout means no barrier is used during concurrency level detection\n    const double                myTimeout;\n    const size_t                myConcLevel;\n\n    static std::mutex global_mutex;\n\n    ExactConcurrencyLevel(double timeout, size_t concLevel) :\n        myBarrier(nullptr),\n        myUniqueThreadsCnt(0), myReachedMax(false),\n        myTimeout(timeout), myConcLevel(concLevel) {\n        myActiveBodyCnt = 0;\n    }\n    bool run() {\n        const int LOOP_ITERS = 100;\n        SpinBarrier barrier((unsigned)myConcLevel, /*throwaway=*/true);\n        if (myTimeout != 0.)\n            myBarrier = &barrier;\n        tbb::parallel_for((size_t)0, myConcLevel*LOOP_ITERS, *this, tbb::simple_partitioner());\n        return myReachedMax;\n    }\npublic:\n    void operator()(size_t) const {\n        size_t v = ++myActiveBodyCnt;\n        REQUIRE_MESSAGE(v <= myConcLevel, \"Number of active bodies is too high.\");\n        if (v == myConcLevel) // record that the max expected concurrency was observed\n            myReachedMax = true;\n        // try to get barrier when 1st time in the thread\n        if (myBarrier) {\n            myBarrier->wait();\n        }\n\n        if (myUniqueThreads != myEpoch) {\n            ++myUniqueThreadsCnt;\n            myUniqueThreads = myEpoch;\n        }\n        for (int i=0; i<100; i++)\n            tbb::detail::machine_pause(1);\n        --myActiveBodyCnt;\n    }\n\n    enum Mode {\n        None,\n        // When multiple blocking checks are performed, there might be not enough\n        // concurrency for all of them. Serialize check() calls.\n        Serialize\n    };\n\n    // check that we have never got more than concLevel threads,\n    // and that in some moment we saw exactly concLevel threads\n    static void check(size_t concLevel, Mode m = None) {\n        ExactConcurrencyLevel o(30., concLevel);\n\n        bool ok = false;\n        if (m == Serialize) {\n            std::lock_guard<std::mutex> lock(global_mutex);\n            ok = o.run();\n        } else {\n            ok = o.run();\n        }\n        CHECK(ok);\n    }\n\n    static bool isEqual(size_t concLevel) {\n        ExactConcurrencyLevel o(3., concLevel);\n        return o.run();\n    }\n\n    static void checkLessOrEqual(size_t concLevel) {\n        ++ExactConcurrencyLevel::myEpoch;\n        ExactConcurrencyLevel o(0., concLevel);\n\n        o.run(); // ignore result, as without a barrier it is not reliable\n        CHECK_MESSAGE(o.myUniqueThreadsCnt<=concLevel, \"Too many workers observed.\");\n    }\n};\n\nstd::mutex ExactConcurrencyLevel::global_mutex;\nthread_local int ExactConcurrencyLevel::myUniqueThreads;\nstd::atomic<int> ExactConcurrencyLevel::myEpoch;\n\n} // namespace Harness\n\n#endif /* __TBB_test_common_concurrency_tracker_H */\n"
  },
  {
    "path": "third-party/tbb/test/common/concurrent_associative_common.h",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_concurrent_associative_common_H\n#define __TBB_test_common_concurrent_associative_common_H\n\n#include \"config.h\"\n\n#include \"custom_allocators.h\"\n#include \"utils.h\"\n#include \"utils_concurrency_limit.h\"\n#include \"container_move_support.h\"\n#include \"checktype.h\"\n#include \"range_based_for_support.h\"\n#include \"initializer_list_support.h\"\n#include \"node_handling_support.h\"\n#include \"containers_common.h\"\n#include \"test_comparisons.h\"\n#include \"concepts_common.h\"\n#include <list>\n#include <cstring>\n\n#include \"oneapi/tbb/parallel_for.h\"\n\n// This structure should be specialized for multimap and multiset classes\ntemplate <typename T>\nstruct AllowMultimapping : std::false_type {};\n\ntemplate<typename Table>\ninline void CheckAllocator(typename Table::allocator_type& a, size_t expected_allocs, size_t expected_frees,\n                           bool exact = true) {\n    if(exact) {\n        REQUIRE( a.allocations == expected_allocs);\n        REQUIRE( a.frees == expected_frees);\n    } else {\n        REQUIRE( a.allocations >= expected_allocs);\n        REQUIRE( a.frees >= expected_frees);\n        REQUIRE( a.allocations - a.frees == expected_allocs - expected_frees );\n    }\n}\n\n// value generator for maps\ntemplate <typename Key, typename Value = std::pair<const Key, Key>>\nstruct ValueFactoryBase {\n    using strip_key = typename std::remove_const<Key>::type;\n    static Value make( const Key& key ) { return Value(key, key); }\n    static Value make( const Key& key, const Key& mapped ) { return Value(key, mapped); }\n    static strip_key key( const Value& value ) { return value.first; }\n    static strip_key get( const Value& value ) { return strip_key(value.second); }\n    template <typename U>\n    static U convert( const Value& value ) { return U(value.second); }\n};\n\ntemplate <typename T>\nstruct SpecialTests {\n    static void Test() {}\n};\n\n// value generator for sets\ntemplate <typename Key>\nstruct ValueFactoryBase<Key, Key> {\n    static Key make( const Key& key ) { return key; }\n    static Key make( const Key& key, const Key& ) { return key; }\n    static Key key( const Key& value ) { return value; }\n    static Key get( const Key& value ) { return value; }\n    template <typename U>\n    static U convert( const Key& value ) { return U(value); }\n};\n\ntemplate <typename Container>\nstruct Value : ValueFactoryBase<typename Container::key_type, typename Container::value_type> {\n    template <typename U>\n    static bool compare( const typename Container::iterator& it, U val ) {\n        return (Value::template convert<U>(*it) == val);\n    }\n};\n\ntemplate <typename Map>\nvoid SpecialMapTests(){\n    Map cont;\n    const Map &ccont( cont );\n\n    // mapped_type& operator[](const key_type& k);\n    cont[1] = 2;\n\n    // bool empty() const;\n    REQUIRE_MESSAGE( !ccont.empty( ), \"Concurrent container empty after adding an element\" );\n\n    // size_type size() const;\n    REQUIRE_MESSAGE( ccont.size( ) == 1, \"Concurrent container size incorrect\" );\n    REQUIRE_MESSAGE( cont[1] == 2, \"Concurrent container value incorrect\" );\n\n    // mapped_type& at( const key_type& k );\n    // const mapped_type& at(const key_type& k) const;\n    REQUIRE_MESSAGE( cont.at( 1 ) == 2, \"Concurrent container value incorrect\" );\n    REQUIRE_MESSAGE( ccont.at( 1 ) == 2, \"Concurrent container value incorrect\" );\n\n    // iterator find(const key_type& k);\n    typename Map::iterator it = cont.find( 1 );\n    REQUIRE_MESSAGE((it != cont.end( ) && Value<Map>::get( *(it) ) == 2), \"Element with key 1 not properly found\" );\n    cont.unsafe_erase( it );\n\n    it = cont.find( 1 );\n    REQUIRE_MESSAGE( it == cont.end( ), \"Element with key 1 not properly erased\" );\n}\n\ntemplate <typename MultiMap>\nvoid CheckMultiMap(MultiMap &m, int *targets, int tcount, int key) {\n    std::vector<bool> vfound(tcount,false);\n    std::pair<typename MultiMap::iterator, typename MultiMap::iterator> range = m.equal_range( key );\n    for(typename MultiMap::iterator it = range.first; it != range.second; ++it) {\n        bool found = false;\n        for( int i = 0; i < tcount; ++i) {\n            if((*it).second == targets[i]) {\n                if(!vfound[i])  { // we can insert duplicate values\n                    vfound[i] = found = true;\n                    break;\n                }\n            }\n        }\n        // just in case an extra value in equal_range...\n        REQUIRE_MESSAGE(found, \"extra value from equal range\");\n    }\n    for(int i = 0; i < tcount; ++i) REQUIRE_MESSAGE(vfound[i], \"missing value\");\n}\n\ntemplate <typename MultiMap>\nvoid MultiMapEraseTests(){\n    MultiMap cont1, cont2;\n\n    // Assignment to begin to avoid maybe-uninitialized warning\n    typename MultiMap::iterator erased_it = cont1.begin();\n    for (int i = 0; i < 10; ++i) {\n        if ( i != 1 ) {\n            cont1.insert(std::make_pair(1, i));\n            cont2.insert(std::make_pair(1, i));\n        } else {\n            erased_it = cont1.insert(std::make_pair(1, i)).first;\n        }\n    }\n\n    cont1.unsafe_erase(erased_it);\n\n    REQUIRE_MESSAGE(cont1.size() == cont2.size(), \"Incorrect count of elements was erased\");\n    typename MultiMap::iterator it1 = cont1.begin();\n    typename MultiMap::iterator it2 = cont2.begin();\n\n    for (typename MultiMap::size_type i = 0; i < cont2.size(); ++i) {\n        REQUIRE_MESSAGE((*(it1++) == *(it2++)), \"Multimap repetitive key was not erased properly\");\n    }\n}\n\ntemplate <typename MultiMap>\nvoid SpecialMultiMapTests(){\n    int one_values[] = { 7, 2, 13, 23, 13 };\n    int zero_values[] = { 4, 9, 13, 29, 42, 111};\n    int n_zero_values = sizeof(zero_values) / sizeof(int);\n    int n_one_values = sizeof(one_values) / sizeof(int);\n    MultiMap cont;\n    const MultiMap &ccont( cont );\n    // mapped_type& operator[](const key_type& k);\n    cont.insert( std::make_pair( 1, one_values[0] ) );\n\n    // bool empty() const;\n    REQUIRE_MESSAGE( !ccont.empty( ), \"Concurrent container empty after adding an element\" );\n\n    // size_type size() const;\n    REQUIRE_MESSAGE( ccont.size( ) == 1, \"Concurrent container size incorrect\" );\n    REQUIRE_MESSAGE( (*(cont.begin( ))).second == one_values[0], \"Concurrent container value incorrect\" );\n    REQUIRE_MESSAGE( (*(cont.equal_range( 1 )).first).second == one_values[0], \"Improper value from equal_range\" );\n    REQUIRE_MESSAGE( ((cont.equal_range( 1 )).second == cont.end( )), \"Improper iterator from equal_range\" );\n\n    cont.insert( std::make_pair( 1, one_values[1] ) );\n\n    // bool empty() const;\n    REQUIRE_MESSAGE( !ccont.empty( ), \"Concurrent container empty after adding an element\" );\n\n    // size_type size() const;\n    REQUIRE_MESSAGE( ccont.size( ) == 2, \"Concurrent container size incorrect\" );\n    CheckMultiMap(cont, one_values, 2, 1);\n\n    // insert the other {1,x} values\n    for( int i = 2; i < n_one_values; ++i ) {\n        cont.insert( std::make_pair( 1, one_values[i] ) );\n    }\n\n    CheckMultiMap(cont, one_values, n_one_values, 1);\n    REQUIRE_MESSAGE( (cont.equal_range( 1 )).second == cont.end( ), \"Improper iterator from equal_range\" );\n\n    cont.insert( std::make_pair( 0, zero_values[0] ) );\n\n    // bool empty() const;\n    REQUIRE_MESSAGE( !ccont.empty( ), \"Concurrent container empty after adding an element\" );\n\n    // size_type size() const;\n    REQUIRE_MESSAGE( ccont.size( ) == (size_t)(n_one_values+1), \"Concurrent container size incorrect\" );\n    CheckMultiMap(cont, one_values, n_one_values, 1);\n    CheckMultiMap(cont, zero_values, 1, 0);\n    REQUIRE_MESSAGE( (*cont.find(0)).second == zero_values[0], \"Concurrent container value incorrect\");\n    // insert the rest of the zero values\n    for( int i = 1; i < n_zero_values; ++i) {\n        cont.insert( std::make_pair( 0, zero_values[i] ) );\n    }\n    CheckMultiMap(cont, one_values, n_one_values, 1);\n    CheckMultiMap(cont, zero_values, n_zero_values, 0);\n\n    // clear, reinsert interleaved\n    cont.clear();\n    int bigger_num = ( n_one_values > n_zero_values ) ? n_one_values : n_zero_values;\n    for( int i = 0; i < bigger_num; ++i ) {\n        if(i < n_one_values) cont.insert( std::make_pair( 1, one_values[i] ) );\n        if(i < n_zero_values) cont.insert( std::make_pair( 0, zero_values[i] ) );\n    }\n    CheckMultiMap(cont, one_values, n_one_values, 1);\n    CheckMultiMap(cont, zero_values, n_zero_values, 0);\n\n    MultiMapEraseTests<MultiMap>();\n\n}\n\ntemplate <StateTrackableBase::StateValue desired_state, typename T>\nvoid check_value_state( const T& t, std::true_type ) {\n    REQUIRE_MESSAGE(is_state_predicate<desired_state>{}(t), \"Unexpected value state\");\n}\n\ntemplate <StateTrackableBase::StateValue desired_state, typename T>\nvoid check_value_state(const T&, std::false_type) {}\n\ntemplate <typename Container, typename CheckElementState, typename Key>\nvoid test_rvalue_insert( Key k1, Key k2 ) {\n    Container cont;\n\n    std::pair<typename Container::iterator, bool> ins = cont.insert(Value<Container>::make(k1));\n    REQUIRE_MESSAGE(ins.second, \"Element 1 has not been inserted\");\n    REQUIRE_MESSAGE(Value<Container>::get(*ins.first) == k1, \"Element 1 has not been inserted\");\n    check_value_state<StateTrackableBase::MoveInitialized>(*ins.first, CheckElementState{});\n\n    typename Container::iterator it2 = cont.insert(ins.first, Value<Container>::make(k2));\n    REQUIRE_MESSAGE(Value<Container>::get(*it2) == k2, \"Element 2 has not been inserted\");\n    check_value_state<StateTrackableBase::MoveInitialized>(*it2, CheckElementState{});\n\n}\n\nnamespace emplace_helpers {\n\ntemplate <typename Container, typename Arg, typename Value>\nstd::pair<typename Container::iterator, bool> call_emplace_impl( Container& c, Arg&& k, Value* ) {\n    // Call emplace implementation for sets\n    return c.emplace(std::forward<Arg>(k));\n}\n\ntemplate <typename Container, typename Arg, typename FirstType, typename SecondType>\nstd::pair<typename Container::iterator, bool> call_emplace_impl( Container& c, Arg&& k, std::pair<FirstType, SecondType>* ) {\n    // Call emplace implementation for maps\n    return c.emplace(k, std::forward<Arg>(k));\n}\n\ntemplate <typename Container, typename Arg, typename Value>\ntypename Container::iterator call_emplace_hint_impl( Container& c, typename Container::const_iterator hint,\n                                                     Arg&& k, Value* )\n{\n    // Call emplace_hint implementation for sets\n    return c.emplace_hint(hint, std::forward<Arg>(k));\n}\n\ntemplate <typename Container, typename Arg, typename FirstType, typename SecondType>\ntypename Container::iterator call_emplace_hint_impl( Container& c, typename Container::const_iterator hint,\n                                                     Arg&& k, std::pair<FirstType, SecondType>* )\n{\n    // Call emplace_hint implementation for maps\n    return c.emplace_hint(hint, k, std::forward<Arg>(k));\n}\n\ntemplate <typename Container, typename Arg>\nstd::pair<typename Container::iterator, bool> call_emplace( Container& c, Arg&& k ) {\n    typename Container::value_type* selector = nullptr;\n    return call_emplace_impl(c, std::forward<Arg>(k), selector);\n}\n\ntemplate <typename Container, typename Arg>\ntypename Container::iterator call_emplace_hint( Container& c, typename Container::const_iterator hint, Arg&& k ) {\n    typename Container::value_type* selector = nullptr;\n    return call_emplace_hint_impl(c, hint, std::forward<Arg>(k), selector);\n}\n\n} // namespace emplace_helpers\n\ntemplate <typename Container, typename CheckElementState, typename Key>\nvoid test_emplace_insert( Key key1, Key key2 ) {\n    Container cont;\n\n    std::pair<typename Container::iterator, bool> ins = emplace_helpers::call_emplace(cont, key1);\n    REQUIRE_MESSAGE(ins.second, \"Element 1 has not been inserted\");\n    REQUIRE_MESSAGE(Value<Container>::compare(ins.first, key1), \"Element 1 has not been inserted\");\n    check_value_state<StateTrackableBase::DirectInitialized>(*ins.first, CheckElementState{});\n\n     //if (!AllowMultimapping<Container>::value) {\n     //  std::pair<typename Container::iterator, bool> rep_ins = emplace_helpers::call_emplace(cont, key1);\n     //  REQUIRE_MESSAGE(!rep_ins.second, \"Element 1 has been emplaced twice into the container with unique keys\");\n     //  REQUIRE(Value<Container>::compare(rep_ins.first, key1));\n     //}\n\n    typename Container::iterator it2 = emplace_helpers::call_emplace_hint(cont, ins.first, key2);\n    REQUIRE_MESSAGE(Value<Container>::compare(it2, key2), \"Element 2 has not been inserted\");\n    check_value_state<StateTrackableBase::DirectInitialized>(*it2, CheckElementState{});\n}\n\ntemplate <typename Container, typename Iterator, typename Range>\nstd::pair<intptr_t, intptr_t> CheckRecursiveRange( Range range ) {\n    std::pair<intptr_t, intptr_t> sum(0, 0); // count, sum\n\n    for (Iterator i = range.begin(); i != range.end(); ++i) {\n        ++sum.first;\n        sum.second += Value<Container>::get(*i);\n    }\n\n    if (range.is_divisible()) {\n        Range range2(range, tbb::split{});\n\n        auto sum1 = CheckRecursiveRange<Container, Iterator>(range);\n        auto sum2 = CheckRecursiveRange<Container, Iterator>(range2);\n        sum1.first += sum2.first; sum1.second += sum2.second;\n        REQUIRE_MESSAGE(sum == sum1, \"Mismatched ranges afted division\");\n    }\n    return sum;\n}\n\nusing atomic_byte_type = std::atomic<unsigned char>;\n\nvoid CheckRange( atomic_byte_type array[], int n, bool allow_multimapping, int odd_count ) {\n    if (allow_multimapping) {\n        for (int k = 0; k < n; ++k) {\n            if (k % 2) {\n                REQUIRE(array[k] == odd_count);\n            } else {\n                REQUIRE(array[k] == 2);\n            }\n        }\n    } else {\n        for (int k = 0; k < n; ++k) {\n            REQUIRE(array[k] == 1);\n        }\n    }\n}\n\ntemplate <typename T>\nvoid check_equal( const T& cont1, const T& cont2 ) {\n    REQUIRE_MESSAGE(cont1 == cont2, \"Containers should be equal\");\n    REQUIRE_MESSAGE(cont2 == cont1, \"Containers should be equal\");\n    REQUIRE_MESSAGE(!(cont1 != cont2), \"Containers should not be unequal\");\n    REQUIRE_MESSAGE(!(cont2 != cont1), \"Containers should not be unequal\");\n}\n\ntemplate <typename T>\nvoid check_unequal( const T& cont1, const T& cont2 ) {\n    REQUIRE_MESSAGE(cont1 != cont2, \"Containers should be unequal\");\n    REQUIRE_MESSAGE(cont2 != cont1, \"Containers should be unequal\");\n    REQUIRE_MESSAGE(!(cont1 == cont2), \"Containers should not be equal\");\n    REQUIRE_MESSAGE(!(cont2 == cont1), \"Containers should not be equal\");\n}\n\n// Break value for maps\ntemplate <typename First, typename Second>\nvoid break_value( std::pair<First, Second>& value ) {\n    ++value.second;\n}\n\ntemplate <typename First>\nvoid break_value( std::pair<First, move_support_tests::FooWithAssign>& value ) {\n    ++value.second.bar();\n}\n\n// Break value for sets\ntemplate <typename T>\nvoid break_value( T& value ) {\n    ++value;\n}\n\nvoid break_value( move_support_tests::FooWithAssign& value ) {\n    ++value.bar();\n}\n\ntemplate <typename T>\nvoid test_comparison_operators() {\n    T cont;\n    check_equal(cont, cont);\n\n    cont.insert(Value<T>::make(1));\n    cont.insert(Value<T>::make(2));\n\n    T cont2 = cont;\n    check_equal(cont, cont2);\n\n    T cont3;\n    check_unequal(cont, cont3);\n\n    T cont4;\n    cont4.insert(Value<T>::make(1));\n    cont4.insert(Value<T>::make(2));\n    check_equal(cont, cont4);\n\n    T cont5;\n    cont5.insert(Value<T>::make(1));\n    cont5.insert(Value<T>::make(3));\n    check_unequal(cont, cont5);\n\n    T cont6;\n    cont6.insert(Value<T>::make(1));\n    auto value2 = Value<T>::make(2);\n    break_value(value2);\n    cont6.insert(value2);\n    check_unequal(cont, cont6);\n}\n\ntemplate <typename Range, typename Container>\nvoid test_empty_container_range(Container&& cont) {\n    REQUIRE(cont.empty());\n    Range r = cont.range();\n    REQUIRE_MESSAGE(r.empty(), \"Empty container range should be empty\");\n    REQUIRE_MESSAGE(!r.is_divisible(), \"Empty container range should not be divisible\");\n    REQUIRE_MESSAGE(r.begin() == r.end(), \"Incorrect iterators on empty range\");\n    REQUIRE_MESSAGE(r.begin() == cont.begin(), \"Incorrect iterators on empty range\");\n}\n\ntemplate<typename T, typename CheckElementState>\nvoid test_basic_common()\n{\n    T cont;\n    const T &ccont(cont);\n    CheckNoAllocations(cont);\n    // bool empty() const;\n    REQUIRE_MESSAGE(ccont.empty(), \"Concurrent container is not empty after construction\");\n\n    // size_type size() const;\n    REQUIRE_MESSAGE(ccont.size() == 0, \"Concurrent container is not empty after construction\");\n\n    // size_type max_size() const;\n    REQUIRE_MESSAGE(ccont.max_size() > 0, \"Concurrent container max size is invalid\");\n\n    //iterator begin();\n    //iterator end();\n    REQUIRE_MESSAGE(cont.begin() == cont.end(), \"Concurrent container iterators are invalid after construction\");\n    REQUIRE_MESSAGE(ccont.begin() == ccont.end(), \"Concurrent container iterators are invalid after construction\");\n    REQUIRE_MESSAGE(cont.cbegin() == cont.cend(), \"Concurrent container iterators are invalid after construction\");\n\n    // Test range for empty container\n    using range_type = typename T::range_type;\n    using const_range_type = typename T::const_range_type;\n    test_empty_container_range<range_type>(cont);\n    test_empty_container_range<const_range_type>(cont);\n    test_empty_container_range<const_range_type>(ccont);\n\n    T empty_cont;\n    const T& empty_ccont = empty_cont;\n\n    for (int i = 0; i < 1000; ++i) {\n        empty_cont.insert(Value<T>::make(i));\n    }\n    empty_cont.clear();\n\n    test_empty_container_range<range_type>(empty_cont);\n    test_empty_container_range<const_range_type>(empty_cont);\n    test_empty_container_range<const_range_type>(empty_ccont);\n\n    //std::pair<iterator, bool> insert(const value_type& obj);\n    std::pair<typename T::iterator, bool> ins = cont.insert(Value<T>::make(1));\n    REQUIRE_MESSAGE((ins.second == true && Value<T>::get(*(ins.first)) == 1), \"Element 1 has not been inserted properly\");\n\n    test_rvalue_insert<T,CheckElementState>(1,2);\n    test_emplace_insert<T,CheckElementState>(1,2);\n\n    // bool empty() const;\n    REQUIRE_MESSAGE(!ccont.empty(), \"Concurrent container is empty after adding an element\");\n\n    // size_type size() const;\n    REQUIRE_MESSAGE(ccont.size() == 1, \"Concurrent container size is incorrect\");\n\n    std::pair<typename T::iterator, bool> ins2 = cont.insert(Value<T>::make(1));\n\n    if (AllowMultimapping<T>::value)\n    {\n        // std::pair<iterator, bool> insert(const value_type& obj);\n        REQUIRE_MESSAGE((ins2.second == true && Value<T>::get(*(ins2.first)) == 1), \"Element 1 has not been inserted properly\");\n\n        // size_type size() const;\n        REQUIRE_MESSAGE(ccont.size() == 2, \"Concurrent container size is incorrect\");\n\n        // size_type count(const key_type& k) const;\n        REQUIRE_MESSAGE(ccont.count(1) == 2, \"Concurrent container count(1) is incorrect\");\n        // std::pair<iterator, iterator> equal_range(const key_type& k);\n        std::pair<typename T::iterator, typename T::iterator> range = cont.equal_range(1);\n        typename T::iterator it;\n        it = range.first;\n        REQUIRE_MESSAGE((it != cont.end() && Value<T>::get(*it) == 1), \"Element 1 has not been found properly\");\n        unsigned int count = 0;\n        for (; it != range.second; it++)\n        {\n            count++;\n            REQUIRE_MESSAGE((Value<T>::get(*it) == 1), \"Element 1 has not been found properly\");\n        }\n\n        REQUIRE_MESSAGE(count == 2, \"Range doesn't have the right number of elements\");\n    }\n    else\n    {\n        // std::pair<iterator, bool> insert(const value_type& obj);\n        REQUIRE_MESSAGE((ins2.second == false && ins2.first == ins.first), \"Element 1 should not be re-inserted\");\n\n        // size_type size() const;\n        REQUIRE_MESSAGE(ccont.size() == 1, \"Concurrent container size is incorrect\");\n\n        // size_type count(const key_type& k) const;\n        REQUIRE_MESSAGE(ccont.count(1) == 1, \"Concurrent container count(1) is incorrect\");\n\n        // std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const;\n        // std::pair<iterator, iterator> equal_range(const key_type& k);\n        std::pair<typename T::iterator, typename T::iterator> range = cont.equal_range(1);\n        typename T::iterator it = range.first;\n        REQUIRE_MESSAGE((it != cont.end() && Value<T>::get(*it) == 1), \"Element 1 has not been found properly\");\n        REQUIRE_MESSAGE((++it == range.second), \"Range doesn't have the right number of elements\");\n    }\n\n    // const_iterator find(const key_type& k) const;\n    // iterator find(const key_type& k);\n    typename T::iterator it = cont.find(1);\n    REQUIRE_MESSAGE((it != cont.end() && Value<T>::get(*(it)) == 1), \"Element 1 has not been found properly\");\n    REQUIRE_MESSAGE(ccont.find(1) == it, \"Element 1 has not been found properly\");\n\n    //bool contains(const key_type&k) const\n    REQUIRE_MESSAGE(cont.contains(1), \"contains() cannot detect existing element\");\n    REQUIRE_MESSAGE(!cont.contains(0), \"contains() detect not existing element\");\n\n    // iterator insert(const_iterator hint, const value_type& obj);\n    typename T::iterator it2 = cont.insert(ins.first, Value<T>::make(2));\n    REQUIRE_MESSAGE((Value<T>::get(*it2) == 2), \"Element 2 has not been inserted properly\");\n\n    // T(const T& _Umap)\n    T newcont = ccont;\n\n    REQUIRE_MESSAGE((AllowMultimapping<T>{} ? (newcont.size() == 3) : (newcont.size() == 2)), \"Copy construction has not copied the elements properly\");\n\n    // size_type unsafe_erase(const key_type& k);\n    typename T::size_type size;\n#if _MSC_VER && __INTEL_COMPILER == 1900\n    // The compiler optimizes the next line too aggressively.\n#pragma noinline\n#endif\n    size = cont.unsafe_erase(1);\n\n    REQUIRE_MESSAGE((AllowMultimapping<T>{} ? (size == 2) : (size == 1)), \"Erase has not removed the right number of elements\");\n\n    // iterator unsafe_erase(iterator position);\n    typename T::iterator it4 = cont.unsafe_erase(cont.find(2));\n\n    REQUIRE_MESSAGE((it4 == cont.end() && cont.size() == 0), \"Erase has not removed the last element properly\");\n\n    // iterator unsafe_erase(const_iterator position);\n    cont.insert(Value<T>::make(3));\n    typename T::iterator it5 = cont.unsafe_erase(cont.cbegin());\n    REQUIRE_MESSAGE((it5 == cont.end() && cont.size() == 0), \"Erase has not removed the last element properly\");\n\n    // template<class InputIterator> void insert(InputIterator first, InputIterator last);\n\n    cont.insert(newcont.begin(), newcont.end());\n\n    REQUIRE_MESSAGE((AllowMultimapping<T>{} ? (cont.size() == 3) : (cont.size() == 2)), \"Range insert has not copied the elements properly\");\n\n    // iterator unsafe_erase(const_iterator first, const_iterator last);\n    std::pair<typename T::iterator, typename T::iterator> range2 = newcont.equal_range(1);\n\n    newcont.unsafe_erase(range2.first, range2.second);\n    REQUIRE_MESSAGE(newcont.size() == 1, \"Range erase has not erased the elements properly\");\n\n    // void clear();\n    newcont.clear();\n    REQUIRE_MESSAGE((newcont.begin() == newcont.end() && newcont.size() == 0), \"Clear has not cleared the container\");\n\n    // void insert(std::initializer_list<value_type> &il);\n    newcont.insert( { Value<T>::make( 1 ), Value<T>::make( 2 ), Value<T>::make( 1 ) } );\n    if (AllowMultimapping<T>::value) {\n\n        REQUIRE_MESSAGE(newcont.size() == 3, \"Concurrent container size is incorrect\");\n        REQUIRE_MESSAGE(newcont.count(1) == 2, \"Concurrent container count(1) is incorrect\");\n        REQUIRE_MESSAGE(newcont.count(2) == 1, \"Concurrent container count(2) is incorrect\");\n        std::pair<typename T::iterator, typename T::iterator> range = cont.equal_range(1);\n        it = range.first;\n        // REQUIRE_MESSAGE((it != newcont.end() && Value<T>::get(*it) == 1), \"Element 1 has not been found properly\");\n        REQUIRE_MESSAGE((it != newcont.end()), \"iterator\" );\n        REQUIRE_MESSAGE((Value<T>::get(*it) == 1), \"value\");\n        unsigned int count = 0;\n        for (; it != range.second; it++) {\n            count++;\n            REQUIRE_MESSAGE(Value<T>::get(*it) == 1, \"Element 1 has not been found properly\");\n        }\n        REQUIRE_MESSAGE(count == 2, \"Range doesn't have the right number of elements\");\n        range = newcont.equal_range(2); it = range.first;\n        REQUIRE_MESSAGE((it != newcont.end() && Value<T>::get(*it) == 2), \"Element 2 has not been found properly\");\n        count = 0;\n        for (; it != range.second; it++) {\n            count++;\n            REQUIRE_MESSAGE(Value<T>::get(*it) == 2, \"Element 2 has not been found properly\");\n        }\n        REQUIRE_MESSAGE(count == 1, \"Range doesn't have the right number of elements\");\n    } else {\n        REQUIRE_MESSAGE(newcont.size() == 2, \"Concurrent container size is incorrect\");\n        REQUIRE_MESSAGE(newcont.count(1) == 1, \"Concurrent container count(1) is incorrect\");\n        REQUIRE_MESSAGE(newcont.count(2) == 1, \"Concurrent container count(2) is incorrect\");\n        std::pair<typename T::iterator, typename T::iterator> range = newcont.equal_range(1);\n        it = range.first;\n        REQUIRE_MESSAGE((it != newcont.end() && Value<T>::get(*it) == 1), \"Element 1 has not been found properly\");\n        REQUIRE_MESSAGE((++it == range.second), \"Range doesn't have the right number of elements\");\n        range = newcont.equal_range(2);\n        it = range.first;\n        REQUIRE_MESSAGE((it != newcont.end() && Value<T>::get(*it) == 2), \"Element 2 has not been found properly\");\n        REQUIRE_MESSAGE((++it == range.second), \"Range doesn't have the right number of elements\");\n    }\n\n    // T& operator=(const T& _Umap)\n    newcont = ccont;\n    REQUIRE_MESSAGE((AllowMultimapping<T>{} ? (newcont.size() == 3) : (newcont.size() == 2)), \"Assignment operator has not copied the elements properly\");\n\n\n    cont.clear();\n    CheckNoAllocations(cont);\n    for (int i = 0; i < 256; i++)\n    {\n        std::pair<typename T::iterator, bool> ins3 = cont.insert(Value<T>::make(i));\n        REQUIRE_MESSAGE((ins3.second == true && Value<T>::get(*(ins3.first)) == i), \"Element 1 has not been inserted properly\");\n    }\n    REQUIRE_MESSAGE(cont.size() == 256, \"Wrong number of elements have been inserted\");\n    REQUIRE(!cont.range().empty());\n    REQUIRE(!ccont.range().empty());\n    REQUIRE((256 == CheckRecursiveRange<T,typename T::iterator>(cont.range()).first));\n    REQUIRE((256 == CheckRecursiveRange<T,typename T::const_iterator>(ccont.range()).first));\n    REQUIRE(cont.range().grainsize() > 0);\n    REQUIRE(ccont.range().grainsize() > 0);\n\n    // void swap(T&);\n    cont.swap(newcont);\n    REQUIRE_MESSAGE(newcont.size() == 256, \"Wrong number of elements after swap\");\n    REQUIRE_MESSAGE(newcont.count(200) == 1, \"Element with key 200 is not present after swap\");\n    REQUIRE_MESSAGE(newcont.count(16) == 1, \"Element with key 16 is not present after swap\");\n    REQUIRE_MESSAGE(newcont.count(99) == 1, \"Element with key 99 is not present after swap\");\n    REQUIRE_MESSAGE((AllowMultimapping<T>{} ? (cont.size() == 3) : (cont.size() == 2)), \"Assignment operator has not copied the elements properly\");\n\n    T newcont_bkp = newcont;\n    newcont.swap(newcont);\n    REQUIRE_MESSAGE(newcont == newcont_bkp, \"Unexpected swap-with-itself behavior\");\n\n    test_comparison_operators<T>();\n\n    SpecialTests<T>::Test();\n}\n\ntemplate <typename Container>\nclass FillTable {\n    Container& my_table;\n    const int my_items;\n    bool my_asymptotic;\n\n    using pair_ib = std::pair<typename Container::iterator, bool>;\npublic:\n    FillTable(Container& table, int items, bool asymptotic)\n        : my_table(table), my_items(items), my_asymptotic(asymptotic)\n    {\n        REQUIRE((!(items&1) && items > 100));\n    }\n\n    void operator()( int thread_index ) const {\n        if (thread_index == 0) { // Fill even keys forward (single thread)\n            bool last_inserted = true;\n\n            for (int i = 0; i < my_items; i += 2) {\n                int val = my_asymptotic ? 1 : i;\n                pair_ib pib = my_table.insert(Value<Container>::make(val));\n                REQUIRE_MESSAGE((Value<Container>::get(*(pib.first)) == val),\n                                \"Element not properly inserted\");\n                REQUIRE_MESSAGE((last_inserted || !pib.second),\n                                \"Previous key was not inserted but current key is inserted\");\n                last_inserted = pib.second;\n            }\n        } else if (thread_index == 1) { // Fill even keys backward (single thread)\n            bool last_inserted = true;\n\n            for (int i = my_items - 2; i >= 0; i -= 2) {\n                int val = my_asymptotic ? 1 : i;\n                pair_ib pib = my_table.insert(Value<Container>::make(val));\n                REQUIRE_MESSAGE((Value<Container>::get(*(pib.first)) == val),\n                                \"Element not properly inserted\");\n                REQUIRE_MESSAGE((last_inserted || !pib.second),\n                                \"Previous key was not inserted but current key is inserted\");\n                last_inserted = pib.second;\n            }\n        } else if (!(thread_index & 1)) { // Fill odd keys forward (multiple threads)\n            for (int i = 1; i < my_items; i += 2) {\n                if (i % 32 == 1 && i + 6 < my_items) {\n                    if (my_asymptotic) {\n                        auto init = { Value<Container>::make(1), Value<Container>::make(1), Value<Container>::make(1) };\n                        my_table.insert(init);\n                        REQUIRE_MESSAGE(Value<Container>::get(*my_table.find(1)) == 1, \"Element not properly inserted\");\n                    } else {\n                        auto init = { Value<Container>::make(i), Value<Container>::make(i + 2),\n                                      Value<Container>::make(i + 4) };\n                        my_table.insert(init);\n                        REQUIRE_MESSAGE(Value<Container>::get(*my_table.find(i)) == i, \"Element i not properly inserted\");\n                        REQUIRE_MESSAGE(Value<Container>::get(*my_table.find(i + 2)) == i + 2, \"Element i + 2 not properly inserted\");\n                        REQUIRE_MESSAGE(Value<Container>::get(*my_table.find(i + 4)) == i + 4, \"Element i + 4 not properly inserted\");\n                    }\n                    i += 4;\n                } else {\n                    pair_ib pib = my_table.insert(Value<Container>::make(my_asymptotic ? 1 : i));\n                    REQUIRE_MESSAGE(Value<Container>::get(*(pib.first)) == (my_asymptotic ? 1 : i), \"Element not properly inserted\");\n                }\n            }\n        } else { // Check odd keys backward (multiple threads)\n            if (!my_asymptotic) {\n                bool last_found = false;\n                for (int i = my_items - 1; i >= 0; i -= 2) {\n                    typename Container::iterator it = my_table.find(i);\n\n                    if (it != my_table.end()) { // found\n                        REQUIRE_MESSAGE(Value<Container>::get(*it) == i, \"Element not properly inserted\");\n                        last_found = true;\n                    } else {\n                        REQUIRE_MESSAGE(!last_found, \"Previous key was found, but current was not found\");\n                    }\n                }\n            }\n        }\n    }\n}; // class FillTable\n\ntemplate <typename Container, typename Range>\nstruct ParallelTraverseBody {\n    const int n;\n    atomic_byte_type* const array;\n\n    ParallelTraverseBody( atomic_byte_type arr[], int num )\n        : n(num), array(arr) {}\n\n    void operator()( const Range& range ) const {\n        for (auto i = range.begin(); i != range.end(); ++i) {\n            int k = static_cast<int>(Value<Container>::key(*i));\n            REQUIRE(k == Value<Container>::get(*i));\n            REQUIRE(0 <= k);\n            REQUIRE(k < n);\n            ++array[k];\n        }\n    }\n}; // struct ParallelTraverseBody\n\ntemplate<typename T>\nclass CheckTable : utils::NoAssign {\n    T& table;\npublic:\n    CheckTable(T& t) : NoAssign(), table(t) {}\n    void operator()(int i) const {\n        int c = (int)table.count(i);\n        CHECK_MESSAGE(c, \"must exist\");\n    }\n};\n\ntemplate <typename Container>\nvoid test_concurrent_common( bool asymptotic = false ) {\n#if __TBB_USE_ASSERT\n    int items = 2000;\n#else\n    int items = 20000;\n#endif\n    int items_inserted = 0;\n    int num_threads = 16;\n\n    Container table;\n\n    if (AllowMultimapping<Container>::value) {\n        // TODO: comment\n        items = 4 * items / (num_threads + 2);\n        items_inserted = items + (num_threads - 2) * items / 4;\n    } else {\n        items_inserted = items;\n    }\n\n    utils::NativeParallelFor(num_threads, FillTable<Container>(table, items, asymptotic));\n\n    REQUIRE(int(table.size()) == items_inserted);\n\n    if (!asymptotic) {\n        atomic_byte_type* array = new atomic_byte_type[items];\n        std::memset(static_cast<void*>(array), 0, items * sizeof(atomic_byte_type));\n\n        typename Container::range_type r = table.range();\n\n        auto p = CheckRecursiveRange<Container, typename Container::iterator>(r);\n        REQUIRE(items_inserted == p.first);\n\n        tbb::parallel_for(r, ParallelTraverseBody<Container, typename Container::range_type>(array, items));\n        CheckRange(array, items, AllowMultimapping<Container>::value, (num_threads - 1)/2);\n\n        const Container& const_table = table;\n        std::memset(static_cast<void*>(array), 0, items * sizeof(atomic_byte_type));\n        typename Container::const_range_type cr = const_table.range();\n\n        p = CheckRecursiveRange<Container, typename Container::const_iterator>(cr);\n        REQUIRE(items_inserted == p.first);\n\n        tbb::parallel_for(cr, ParallelTraverseBody<Container, typename Container::const_range_type>(array, items));\n        CheckRange(array, items, AllowMultimapping<Container>::value, (num_threads - 1) / 2);\n        delete[] array;\n\n        tbb::parallel_for(0, items, CheckTable<Container>(table));\n    }\n\n    table.clear();\n    // TODO: add check for container allocator counters\n}\n\ntemplate <typename ContainerTraits>\nvoid test_rvalue_ref_support() {\n    using namespace move_support_tests;\n    test_move_constructor<ContainerTraits>();\n    test_move_assignment<ContainerTraits>();\n#if TBB_USE_EXCEPTIONS\n    test_ex_move_constructor<ContainerTraits>();\n#endif\n}\n\ntemplate <typename Container>\nvoid test_range_based_for_support() {\n    using namespace range_based_for_support_tests;\n\n    Container cont;\n    const int sequence_length = 100;\n\n    for (int i = 1; i <= sequence_length; ++i) {\n        cont.insert(Value<Container>::make(i));\n    }\n\n    auto range_based_for_result = range_based_for_accumulate(cont, UnifiedSummer{}, 0);\n    auto reference_result = gauss_summ_of_int_sequence(sequence_length);\n    REQUIRE_MESSAGE(range_based_for_result == reference_result,\n                    \"Incorrect accumulated value generated via range based for\");\n}\n\ntemplate <typename Container>\nvoid test_initializer_list_support( std::initializer_list<typename Container::value_type> init ) {\n    using namespace initializer_list_support_tests;\n\n    test_initializer_list_support_without_assign<Container, TestInsertMethod>(init);\n    test_initializer_list_support_without_assign<Container, TestInsertMethod>({});\n}\n\ntemplate <typename Checker>\nvoid test_set_specific_types() {\n    // TODO: add tests for atomics\n    Checker check_types;\n    const int num = 10;\n\n    // Test int\n    std::list<int> arr_int;\n    for (int i = 0; i != num; ++i) {\n        arr_int.emplace_back(i);\n    }\n    check_types.template check</*DefCtorPresent = */true>(arr_int);\n\n    // Test reference_wrapper\n    std::list<std::reference_wrapper<int>> arr_ref;\n    for (auto it = arr_int.begin(); it != arr_int.end(); ++it) {\n        arr_ref.emplace_back(*it);\n    }\n    check_types.template check</*DefCtorPresent = */false>(arr_ref);\n\n    // Test share_ptr\n    std::list<std::shared_ptr<int>> arr_shr;\n    for (int i = 0; i != num; ++i) {\n        arr_shr.emplace_back(std::make_shared<int>(i));\n    }\n    check_types.template check</*DefCtorPresent = */true>(arr_shr);\n\n    // Test weak_ptr\n    std::list<std::weak_ptr<int>> arr_weak;\n    std::copy(arr_shr.begin(), arr_shr.end(), std::back_inserter(arr_weak));\n    check_types.template check</*DefCtorPresent = */true>(arr_weak);\n\n    // Test std::pair\n    std::list<std::pair<int, int>> arr_pairs;\n    for (int i = 0; i != num; ++i) {\n        arr_pairs.emplace_back(i, i);\n    }\n    check_types.template check</*DefCtorPresent = */true>(arr_pairs);\n\n    // Test std::basic_string\n    std::list<std::basic_string<char, std::char_traits<char>, tbb::tbb_allocator<char>>> arr_strings;\n    for (int i = 0; i != num; ++i) {\n        arr_strings.emplace_back(i, char(i));\n    }\n    check_types.template check</*DefCtorPresent = */true>(arr_strings);\n}\n\ntemplate <typename Checker>\nvoid test_map_specific_types() {\n    // TODO: add tests for int-atomic pairs\n    Checker check_types;\n    const int num = 10;\n\n    // Test int-int pairs\n    std::list<std::pair<const int, int>> arr_int_int_pairs;\n    for (int i = 0; i != num; ++i) {\n        arr_int_int_pairs.emplace_back(i, num - i);\n    }\n    check_types.template check</*DefCtorPresent = */true>(arr_int_int_pairs);\n\n    // Test reference_wrapper-int pairs\n    std::list<std::pair<const std::reference_wrapper<const int>, int>> arr_ref_int_pairs;\n    for (auto& item : arr_int_int_pairs) {\n        arr_ref_int_pairs.emplace_back(item.first, item.second);\n    }\n    check_types.template check</*DefCtorPresent = */true>(arr_ref_int_pairs);\n\n    // Test int-reference_wrapper pairs\n    std::list<std::pair<const int, std::reference_wrapper<int>>> arr_int_ref_pairs;\n    for (auto& item : arr_int_int_pairs) {\n        arr_int_ref_pairs.emplace_back(item.first, item.second);\n    }\n    check_types.template check</*DefCtorPresent = */false>(arr_int_ref_pairs);\n\n    // Test shared_ptr\n    std::list<std::pair<const std::shared_ptr<int>, std::shared_ptr<int>>> arr_shared_pairs;\n    for (int i = 0; i != num; ++i) {\n        const int num_minus_i = num - i;\n        arr_shared_pairs.emplace_back(std::make_shared<int>(i), std::make_shared<int>(num_minus_i));\n    }\n    check_types.template check</*DefCtorPresent = */true>(arr_shared_pairs);\n\n    // Test weak_ptr\n    std::list<std::pair<const std::weak_ptr<int>, std::weak_ptr<int>>> arr_wick_pairs;\n    std::copy(arr_shared_pairs.begin(), arr_shared_pairs.end(), std::back_inserter(arr_wick_pairs));\n    check_types.template check</*DefCtorPresent = */true>(arr_wick_pairs);\n\n    // Test std::pair\n    using pair_key_type = std::pair<int, int>;\n    std::list<std::pair<const pair_key_type, int>> arr_pair_int_pairs;\n    for (int i = 0; i != num; ++i) {\n        arr_pair_int_pairs.emplace_back(pair_key_type{i, i}, i);\n    }\n    check_types.template check</*DefCtorPresent = */true>(arr_pair_int_pairs);\n\n    // Test std::basic_string\n    using tbb_string_key_type = std::basic_string<char, std::char_traits<char>, tbb::tbb_allocator<char>>;\n    std::list<std::pair<const tbb_string_key_type, int>> arr_tbb_string_pairs;\n    for (int i = 0; i != num; ++i) {\n        tbb_string_key_type key(i, char(i));\n        arr_tbb_string_pairs.emplace_back(key, i);\n    }\n    check_types.template check</*DefCtorPresent = */true>(arr_tbb_string_pairs);\n}\n\nnamespace test {\n\n// For the sake of simplified testing, make std::unique_ptr implicitly convertible to/from the pointer\ntemplate <typename T>\nclass unique_ptr : public std::unique_ptr<T> {\npublic:\n    using pointer = typename std::unique_ptr<T>::pointer;\n\n    unique_ptr( pointer p ) : std::unique_ptr<T>(p) {}\n    operator pointer() const { return this->get(); }\n}; // class unique_ptr\n\n} // namespace test\n\nnamespace std {\ntemplate <typename T>\nstruct hash<test::unique_ptr<T>> {\n    std::size_t operator()(const test::unique_ptr<T>& ptr) const {\n        return std::hash<std::unique_ptr<T>>{}(ptr);\n    }\n};\n}\n\ntemplate <bool Condition>\nstruct CallIf {\n    template <typename Func>\n    void operator()( Func func ) const { func(); }\n};\n\ntemplate <>\nstruct CallIf<false> {\n    template <typename Func>\n    void operator()( Func ) const {}\n};\n\ntemplate <typename Table>\nclass TestOperatorSquareBrackets {\n    using value_type = typename Table::value_type;\n    Table& my_c;\n    const value_type& my_value;\npublic:\n    TestOperatorSquareBrackets( Table& c, const value_type& value )\n        : my_c(c), my_value(value) {}\n\n    void operator()() const {\n        utils::IsEqual equal;\n        REQUIRE(equal(my_c[my_value.first], my_value.second));\n        typename Table::key_type temp_key = my_value.first;\n        REQUIRE(equal(my_c[std::move(temp_key)], my_value.second));\n    }\n}; // class TestOperatorSquareBrackets\n\ntemplate <bool DefCtorPresent, typename Table, typename Value>\nvoid TestSquareBracketsAndAt( Table&, const Value&, /*multimap = */std::true_type ) {\n    // operator [] and at are not presented in the multimap\n}\n\ntemplate <bool DefCtorPresent, typename Table, typename Value>\nvoid TestSquareBracketsAndAt( Table& c, const Value& value, /*multimap = */std::false_type ) {\n    CallIf<DefCtorPresent>()(TestOperatorSquareBrackets<Table>(c, value));\n    utils::IsEqual equal;\n    REQUIRE(equal(c.at(value.first), value.second));\n    // TODO: add test for at exceptions\n    const Table& constC = c;\n    REQUIRE(equal(constC.at(value.first), value.second));\n}\n\ntemplate <bool DefCtorPresent, typename Table, typename Value>\nvoid TestMapSpecificMethods( Table&, const Value& ) {}\n\ntemplate <bool DefCtorPresent, typename Table>\nvoid TestMapSpecificMethods( Table& c, const std::pair<const typename Table::key_type,\n                                                       typename Table::mapped_type>& value )\n{\n    TestSquareBracketsAndAt<DefCtorPresent>(c, value, std::integral_constant<bool, AllowMultimapping<Table>::value>{});\n}\n\ntemplate <bool DefCtorPresent, typename Table>\nclass CheckValue {\n    Table& my_c;\npublic:\n    CheckValue( Table& c ) : my_c(c) {}\n    void operator()( const typename Table::value_type& value ) {\n        using iterator = typename Table::iterator;\n        using const_iterator = typename Table::const_iterator;\n        const Table& constC = my_c;\n        // count\n        REQUIRE(my_c.count(Value<Table>::key(value)) == 1);\n        // find\n        utils::IsEqual equal;\n        REQUIRE(equal(*my_c.find(Value<Table>::key(value)), value));\n        REQUIRE(equal(*constC.find(Value<Table>::key(value)), value));\n        // erase\n        REQUIRE(my_c.unsafe_erase(Value<Table>::key(value)) != 0);\n        REQUIRE(my_c.unsafe_erase(Value<Table>::key(value)) == 0);\n        // insert\n        std::pair<iterator, bool> res = my_c.insert(value);\n        REQUIRE(equal(*res.first, value));\n        REQUIRE(res.second);\n        // erase\n        iterator it = res.first;\n        ++it;\n        REQUIRE(my_c.unsafe_erase(res.first) == it);\n        // insert\n        REQUIRE(equal(*my_c.insert(my_c.begin(), value), value));\n        // equal_range\n        std::pair<iterator, iterator> r1 = my_c.equal_range(Value<Table>::key(value));\n        REQUIRE((equal(*r1.first, value) && ++r1.first == r1.second));\n        std::pair<const_iterator, const_iterator> r2 = constC.equal_range(Value<Table>::key(value));\n        REQUIRE((equal(*r2.first, value) && ++r2.first == r2.second));\n\n        TestMapSpecificMethods<DefCtorPresent>(my_c, value);\n    }\n}; // class CheckValue\n\nnamespace detail {\n\n#if (__INTEL_COMPILER || __clang__ ) && __TBB_GLIBCXX_VERSION && __TBB_GLIBCXX_VERSION < 40900\ntemplate <typename T>\nstruct assignable_atomic : std::atomic<T> {\n    using std::atomic<T>::operator=;\n    assignable_atomic& operator=(const assignable_atomic& a) {\n        store(a.load(std::memory_order_relaxed), std::memory_order_relaxed);\n    }\n};\n\ntemplate <typename T>\nusing atomic_type = assignable_atomic<T>;\n#else\ntemplate <typename T>\nusing atomic_type = std::atomic<T>;\n#endif\n}\n\ntemplate <typename Value>\nclass TestRange {\n    const std::list<Value>& my_lst;\n    std::vector<detail::atomic_type<bool>>& my_marks;\npublic:\n    TestRange( const std::list<Value>& lst, std::vector<detail::atomic_type<bool>>& marks )\n        : my_lst(lst), my_marks(marks)\n    {\n        std::fill(my_marks.begin(), my_marks.end(), false);\n    }\n\n    template <typename Range>\n    void operator()( const Range& r ) const {\n        do_test_range(r.begin(), r.end());\n    }\n\n    template <typename Iterator>\n    void do_test_range( Iterator i, Iterator j ) const {\n        for (Iterator it = i; it != j;) {\n            Iterator prev_it = it++;\n            auto it2 = std::search(my_lst.begin(), my_lst.end(), prev_it, it, utils::IsEqual());\n            REQUIRE(it2 != my_lst.end());\n            auto dist = std::distance(my_lst.begin(), it2);\n            REQUIRE(!my_marks[dist]);\n            my_marks[dist] = true;\n        }\n    }\n}; // class TestRange\n\ntemplate <bool DefCtorPresent, typename Table>\nvoid CommonExamine( Table c, const std::list<typename Table::value_type>& lst ) {\n    using value_type = typename Table::value_type;\n\n    if (!(!c.empty() && c.size() == lst.size() && c.max_size() >= c.size())) {\n        std::cout << std::boolalpha;\n        std::cout << \"Empty? \" << c.empty() << std::endl;\n        std::cout << \"sizes equal? \" << (c.size() == lst.size()) << std::endl;\n        std::cout << \"\\t\" << c.size() << std::endl;\n        std::cout << \"\\t\" << lst.size() << std::endl;\n        std::cout << \"Max size greater? \" << (c.max_size() >= c.size()) << std::endl;\n    }\n    REQUIRE((!c.empty() && c.size() == lst.size() && c.max_size() >= c.size()));\n\n    std::for_each(lst.begin(), lst.end(), CheckValue<DefCtorPresent, Table>(c));\n\n    std::vector<detail::atomic_type<bool>> marks(lst.size());\n\n    TestRange<value_type>(lst, marks).do_test_range(c.begin(), c.end());\n    REQUIRE(std::find(marks.begin(), marks.end(), false) == marks.end());\n\n    const Table constC = c;\n    REQUIRE(c.size() == constC.size());\n\n    TestRange<value_type>(lst, marks).do_test_range(c.begin(), c.end());\n    REQUIRE(std::find(marks.begin(), marks.end(), false) == marks.end());\n\n    tbb::parallel_for(c.range(), TestRange<value_type>(lst, marks));\n    REQUIRE(std::find(marks.begin(), marks.end(), false) == marks.end());\n\n    tbb::parallel_for(constC.range(), TestRange<value_type>(lst, marks));\n    REQUIRE(std::find(marks.begin(), marks.end(), false) == marks.end());\n\n    Table c2;\n    auto begin5 = lst.begin();\n    std::advance(begin5, 5);\n    c2.insert(lst.begin(), begin5);\n    std::for_each(lst.begin(), begin5, CheckValue<DefCtorPresent, Table>(c2));\n\n    c2.swap(c);\n    REQUIRE(c2.size() == lst.size());\n    REQUIRE(c.size() == 5);\n\n    std::for_each(lst.begin(), lst.end(), CheckValue<DefCtorPresent, Table>(c2));\n\n    c2.clear();\n    REQUIRE(c2.size() == 0);\n\n    auto alloc = c.get_allocator();\n    value_type* ptr = alloc.allocate(1);\n    REQUIRE(ptr != nullptr);\n    alloc.deallocate(ptr, 1);\n}\n\ntemplate <typename ContainerTraits>\nvoid test_scoped_allocator() {\n    using allocator_data_type = AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int>>>;\n    using basic_allocator_type = std::scoped_allocator_adaptor<std::allocator<allocator_data_type>>;\n    using container_value_type = typename ContainerTraits::template container_value_type<allocator_data_type>;\n    using allocator_type = typename std::allocator_traits<basic_allocator_type>::template rebind_alloc<container_value_type>;\n    using container_type = typename ContainerTraits::template container_type<allocator_data_type, allocator_type>;\n\n    allocator_type allocator;\n    allocator_data_type key1(1, allocator);\n    allocator_data_type key2(2, allocator);\n\n    container_value_type value1 = Value<container_type>::make(key1);\n    container_value_type value2 = Value<container_type>::make(key2);\n\n    auto init_list = { value1, value2 };\n\n    container_type c1(allocator);\n    container_type c2(allocator);\n\n    allocator_data_type::activate();\n\n    emplace_helpers::call_emplace(c1, key1);\n    emplace_helpers::call_emplace(c2, std::move(key2));\n\n    c1.clear();\n    c2.clear();\n\n    c1.insert(value1);\n    c2.insert(std::move(value2));\n\n    c1.clear();\n    c2.clear();\n\n    c1.insert(init_list);\n    c2.insert(value1);\n\n    c1 = c2;\n    c2 = std::move(c1);\n\n    allocator_data_type::deactivate();\n}\n\n\nstruct int_key {\n    int my_item;\n    int_key(int i) : my_item(i) {}\n};\n\nbool operator==(const int_key& ik, int i) { return ik.my_item == i; }\nbool operator==(int i, const int_key& ik) { return i == ik.my_item; }\nbool operator==(const int_key& ik1, const int_key& ik2) { return ik1.my_item == ik2.my_item; }\n\nbool operator<( const int_key& ik, int i ) { return ik.my_item < i; }\nbool operator<( int i, const int_key& ik ) { return i < ik.my_item; }\nbool operator<( const int_key& ik1, const int_key& ik2 ) { return ik1.my_item < ik2.my_item; }\n\nstruct char_key {\n    const char* my_item;\n    char_key(const char* c) : my_item(c) {}\n\n    const char& operator[] (std::size_t pos) const {\n        return my_item[pos];\n    }\n\n    std::size_t size() const {\n        return std::strlen(my_item);\n    }\n};\n\nbool operator==(const char_key& ck, std::string c) {\n    std::size_t i = 0;\n    while (ck[i] != '\\0' && i < c.size() && ck[i] == c[i]) { ++i;}\n    return c.size() == i && ck[i] == '\\0';\n}\nbool operator==(std::string c, const char_key& ck) {\n    return ck == c;\n}\nbool operator==(const char_key& ck1, const char_key& ck2) {\n    std::size_t i = 0;\n    while (ck1[i] != '\\0' && ck2[i] != '\\0' && ck1[i] == ck2[i]) { ++i;}\n    return ck1[i] == ck2[i];\n}\n\nbool operator<( const char_key& ck, std::string c ) {\n    return std::lexicographical_compare(ck.my_item, ck.my_item + ck.size(), c.begin(), c.end());\n}\n\nbool operator<(std::string c, const char_key& ck) {\n    return std::lexicographical_compare(c.begin(), c.end(), ck.my_item, ck.my_item + ck.size());\n}\n\nbool operator<( const char_key& ck1, const char_key& ck2 ) {\n    return std::lexicographical_compare(ck1.my_item, ck1.my_item + ck1.size(), ck2.my_item, ck2.my_item + ck2.size());\n}\n\nstruct equal_to {\n    using is_transparent = int;\n    template <typename T, typename W>\n    bool operator()(const T &lhs, const W &rhs) const {\n        return lhs == rhs;\n    }\n};\n\nstruct hash_with_transparent_key_equal {\n    template <typename T>\n    size_t operator()(const T& key) const { return hash(key); }\n    using transparent_key_equal = equal_to;\n    int prime = 433494437;\n    int first_factor = 41241245;\n    int second_factor = 2523422;\n\n    size_t hash(const int& key) const { return (first_factor * key + second_factor) % prime; }\n\n    size_t hash(const int_key& key) const { return (first_factor * key.my_item + second_factor) % prime; }\n\n    size_t hash(const std::string& key) const {\n        int sum = 0;\n        for (auto it = key.begin(); it != key.end(); ++it) {\n            sum += first_factor * (*it) + second_factor;\n        }\n        return sum % prime;\n    }\n\n    size_t hash(const char_key& key) const {\n        int sum = 0;\n        int i = 0;\n        while (key[i] != '\\0') {\n            sum += first_factor * key[i++] + second_factor;\n        }\n        return sum % prime;\n    }\n\n};\n\ntemplate <typename Container>\nvoid check_heterogeneous_functions_key_int_impl() {\n    static_assert(std::is_same<typename Container::key_type, int>::value,\n                  \"incorrect key_type for heterogeneous lookup test\");\n    // Initialization\n    Container c;\n    int size = 10;\n    for (int i = 0; i < size; i++) {\n        c.insert(Value<Container>::make(i));\n    }\n    // Insert first duplicated element for multicontainers\n    if (AllowMultimapping<Container>::value) {\n        c.insert(Value<Container>::make(0));\n    }\n\n    // Look up testing\n    for (int i = 0; i < size; i++) {\n        int_key k(i);\n        int key = i;\n        REQUIRE_MESSAGE(c.find(k) == c.find(key), \"Incorrect heterogeneous find return value\");\n        REQUIRE_MESSAGE(c.count(k) == c.count(key), \"Incorrect heterogeneous count return value\");\n    }\n\n    // unsafe_extract testing\n    for (int i = 0; i < size; i++) {\n        Container extract_c = c;\n        int_key int_k(i);\n        auto int_key_extract = extract_c.unsafe_extract(int_k);\n        if (!AllowMultimapping<Container>::value) {\n            REQUIRE_MESSAGE(extract_c.find(int_k) == extract_c.end(), \"Key exists after extract\");\n        }\n        REQUIRE_MESSAGE(!int_key_extract.empty(), \"Empty node with exists key\");\n        REQUIRE_MESSAGE(node_handling_tests::compare_handle_getters(int_key_extract, Value<Container>::make(i)), \"Incorrect node\");\n    }\n\n    // unsafe_extract not exists key\n    auto not_exists = c.unsafe_extract(int_key(100));\n    REQUIRE_MESSAGE(not_exists.empty(), \"Not empty node with not exists key\");\n\n    // multimap unsafe_extract testing\n    if (AllowMultimapping<Container>::value) {\n        Container extract_m;\n        for (int i = 0; i < size; i++) {\n            extract_m.insert(Value<Container>::make(i));\n            extract_m.insert(Value<Container>::make(i, i + 1));\n        }\n        for (int i = 0; i < size; i++) {\n            int_key int_k(i);\n            auto int_key_extract = extract_m.unsafe_extract(int_k);\n            REQUIRE_MESSAGE(!int_key_extract.empty(), \"Empty node with exists key\");\n            REQUIRE_MESSAGE((node_handling_tests::compare_handle_getters(int_key_extract, Value<Container>::make(i, i)) ||\n                    node_handling_tests::compare_handle_getters(int_key_extract, Value<Container>::make(i, i + 1))), \"Incorrect node\");\n            REQUIRE_MESSAGE(extract_m.find(int_k) != extract_m.end(), \"All nodes for key deleted\");\n        }\n    }\n\n    // Erase testing\n    for (int i = 0; i < size; i++) {\n        auto count_before_erase = c.count(i);\n        auto result = c.unsafe_erase(int_key(i));\n        REQUIRE_MESSAGE(count_before_erase == result,\"Incorrect erased elements count\");\n        REQUIRE_MESSAGE(c.count(i) == 0, \"Some elements was not erased\");\n    }\n\n}\n\ntemplate <typename Container>\nvoid check_heterogeneous_functions_key_string_impl() {\n    static_assert(std::is_same<typename Container::key_type, std::string>::value,\n                  \"incorrect key_type for heterogeneous lookup test\");\n    // Initialization\n    std::vector<const char*> keys{\"key1\", \"key2\", \"key3\", \"key4\",\n        \"key5\", \"key6\", \"key7\", \"key8\", \"key9\", \"key10\"};\n    std::vector<const char*> values{\"value1\", \"value2\", \"value3\", \"value4\",\n        \"value5\", \"value6\", \"value7\", \"value8\", \"value9\", \"value10\", \"value11\"};\n    Container c;\n    for (auto it = keys.begin(); it != keys.end(); ++it) {\n        c.insert(Value<Container>::make(*it));\n    }\n    // Insert first duplicated element for multicontainers\n    if (AllowMultimapping<Container>::value) {\n        c.insert(Value<Container>::make(*keys.begin()));\n    }\n\n    // Look up testing\n    for (auto it = keys.begin(); it != keys.end(); ++it) {\n        std::string key = *it;\n        char_key k{*it};\n        REQUIRE_MESSAGE(c.find(k) == c.find(key), \"Incorrect heterogeneous find return value\");\n        REQUIRE_MESSAGE(c.count(k) == c.count(key), \"Incorrect heterogeneous count return value\");\n    }\n\n    // unsafe_extract testing\n    for (auto it = keys.begin(); it != keys.end(); ++it) {\n        Container extract_c = c;\n        char_key k{*it};\n        auto char_key_extract = extract_c.unsafe_extract(k);\n        REQUIRE_MESSAGE(!char_key_extract.empty(), \"Empty node with exists key\");\n        REQUIRE_MESSAGE(node_handling_tests::compare_handle_getters(char_key_extract, Value<Container>::make(*it)), \"Incorrect node\");\n    }\n\n    // unsafe_extract not exists key\n    auto not_exists = c.unsafe_extract(char_key(\"not exists\"));\n    REQUIRE_MESSAGE(not_exists.empty(), \"Not empty node with not exists key\");\n\n    // multimap unsafe_extract testing\n    if (AllowMultimapping<Container>::value){\n        Container extract_m;\n        for (std::size_t i = 0; i < keys.size(); i++) {\n            extract_m.insert(Value<Container>::make(keys[i], values[i]));\n            extract_m.insert(Value<Container>::make(keys[i], values[i + 1]));\n        }\n        for (std::size_t i = 0; i < keys.size(); i++) {\n            char_key char_k(keys[i]);\n            auto char_key_extract = extract_m.unsafe_extract(char_k);\n            REQUIRE_MESSAGE(!char_key_extract.empty(), \"Empty node with exists key\");\n            REQUIRE_MESSAGE((node_handling_tests::compare_handle_getters(char_key_extract, Value<Container>::make(keys[i], values[i])) ||\n                    node_handling_tests::compare_handle_getters(char_key_extract, Value<Container>::make(keys[i], values[i + 1]))), \"Incorrect node\");\n            REQUIRE_MESSAGE(extract_m.find(char_k) != extract_m.end(), \"All nodes for key deleted\");\n        }\n    }\n\n    // Erase testing\n    for (auto it = keys.begin(); it != keys.end(); ++it) {\n        std::string key = *it;\n        char_key k{*it};\n        auto count_before_erase = c.count(key);\n        auto result = c.unsafe_erase(k);\n        REQUIRE_MESSAGE(count_before_erase==result,\"Incorrect erased elements count\");\n        REQUIRE_MESSAGE(c.count(key)==0, \"Some elements was not erased\");\n    }\n}\n\nstruct CountingKey {\n    static std::size_t counter;\n\n    CountingKey() { ++counter; }\n    CountingKey( const CountingKey& ) { ++counter; }\n    ~CountingKey() {}\n    CountingKey& operator=( const CountingKey& ) { return *this; }\n\n    static void reset() { counter = 0; }\n};\n\nstd::size_t CountingKey::counter;\n\nnamespace std {\ntemplate <>\nstruct hash<CountingKey> {\n    std::size_t operator()( const CountingKey& ) const { return 0; }\n};\n}\n\nbool operator==( const CountingKey&, const CountingKey& ) { return true; }\n\nbool operator<( const CountingKey&, const CountingKey& ) { return true; }\n\nstruct int_constructible_object {\n    int_constructible_object(int k) : key(k) {}\n    int key;\n}; // struct int_constructible_object\n\nbool operator==( const int_constructible_object& lhs, const int_constructible_object rhs ) {\n    return lhs.key == rhs.key;\n}\n\n// A test for\n// template <typename P> insert(P&&) in maps\ntemplate <template <typename...> class Container>\nvoid test_insert_by_generic_pair() {\n    using value_type = std::pair<const int, int_constructible_object>;\n    using generic_pair_type = std::pair<int, int>;\n\n    static_assert(std::is_constructible<value_type, generic_pair_type>::value,\n                  \"Incorrect test setup\");\n\n    Container<int, int_constructible_object> cont1, cont2;\n    using iterator = typename Container<int, int_constructible_object>::iterator;\n\n    for (int i = 0; i != 10; ++i) {\n        std::pair<iterator, bool> res_generic_insert = cont1.insert(generic_pair_type(1, i));\n        std::pair<iterator, bool> res_value_insert = cont2.insert(value_type(1, int_constructible_object(i)));\n\n        REQUIRE_MESSAGE(*res_generic_insert.first == *res_value_insert.first, \"Insert by generic pair returned wrong iterator\");\n        REQUIRE_MESSAGE(res_generic_insert.second == res_value_insert.second, \"Insert by generic pair returned wrong insertion value\");\n    }\n\n    for (int i = 0; i != 10; ++i) {\n        iterator res_generic_insert_hint = cont1.insert(cont1.cbegin(), generic_pair_type(2, i));\n        iterator res_value_insert_hint = cont2.insert(cont2.cbegin(), value_type(2, int_constructible_object(i)));\n\n        REQUIRE_MESSAGE(*res_generic_insert_hint == *res_value_insert_hint, \"Hinted insert by generic pair returned wrong iterator\");\n    }\n\n    Container<CountingKey, int_constructible_object> counting_cont;\n    using counting_generic_pair = std::pair<CountingKey, int>;\n\n    static_assert(std::is_constructible<typename decltype(counting_cont)::value_type, counting_generic_pair>::value,\n                  \"Incorrect test setup\");\n\n    counting_generic_pair counting_pair(CountingKey{}, 1);\n    CountingKey::reset();\n\n    counting_cont.insert(counting_pair);\n    REQUIRE_MESSAGE(CountingKey::counter == 1, \"Only one element should be constructed in-place during the generic pair insertion\");\n\n    CountingKey::reset();\n}\n\ntemplate <typename Container>\nvoid test_swap_not_always_equal_allocator() {\n    static_assert(std::is_same<typename Container::allocator_type, NotAlwaysEqualAllocator<typename Container::value_type>>::value,\n                  \"Incorrect allocator in not always equal test\");\n    Container c1{};\n    Container c2{Value<Container>::make(1), Value<Container>::make(2)};\n\n    Container c1_copy = c1;\n    Container c2_copy = c2;\n\n    c1.swap(c2);\n\n    REQUIRE_MESSAGE(c1 == c2_copy, \"Incorrect swap with not always equal allocator\");\n    REQUIRE_MESSAGE(c2 == c1_copy, \"Incorrect swap with not always equal allocator\");\n}\n\n#if TBB_USE_EXCEPTIONS\ntemplate <typename Container>\nvoid test_exception_on_copy_ctor() {\n    Container c1;\n    c1.emplace(Value<Container>::make(ThrowOnCopy{}));\n\n    using container_allocator_type = std::allocator<Container>;\n    using alloc_traits = std::allocator_traits<container_allocator_type>;\n    container_allocator_type container_allocator;\n    Container* c2_ptr = alloc_traits::allocate(container_allocator, 1);\n\n    ThrowOnCopy::activate();\n    // Test copy ctor\n    try {\n        alloc_traits::construct(container_allocator, c2_ptr, c1);\n    } catch ( int error_code ) {\n        REQUIRE_MESSAGE(error_code == ThrowOnCopy::error_code(), \"Incorrect code was thrown\");\n    }\n\n    REQUIRE_MESSAGE(c2_ptr->empty(), \"Incorrect container state after throwing copy constructor\");\n\n    alloc_traits::deallocate(container_allocator, c2_ptr, 1);\n    c2_ptr = alloc_traits::allocate(container_allocator, 1);\n\n    // Test copy ctor with allocator\n    try {\n        auto value_allocator = c1.get_allocator();\n        alloc_traits::construct(container_allocator, c2_ptr, c1, value_allocator);\n    } catch( int error_code ) {\n        REQUIRE_MESSAGE(error_code == ThrowOnCopy::error_code(), \"Incorrect code was thrown\");\n    }\n\n    REQUIRE_MESSAGE(c2_ptr->empty(), \"Incorrect container state after throwing copy ctor with allocator\");\n    alloc_traits::deallocate(container_allocator, c2_ptr, 1);\n    ThrowOnCopy::deactivate();\n}\n#endif // TBB_USE_EXCEPTIONS\n\n#endif // __TBB_test_common_concurrent_associative_common_H\n"
  },
  {
    "path": "third-party/tbb/test/common/concurrent_lru_cache_common.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_concurrent_lru_cache_common\n#define __TBB_test_common_concurrent_lru_cache_common\n\n\n#include \"test.h\"\n#include \"utils.h\"\n#include <tbb/concurrent_lru_cache.h>\n\n//-----------------------------------------------------------------------------\n// Concurrent LRU Cache Tests: Cache Helpers\n//-----------------------------------------------------------------------------\n\nnamespace concurrent_lru_cache_helpers {\n\n    // call counter\n\n    template<std::size_t id>\n    struct tag{};\n\n    template<typename Tag, typename Type>\n    struct call_counter {\n        static int calls;\n\n        static Type call(Type t) {\n            ++calls;\n            return t;\n        }\n    };\n\n    template<typename Tag, typename Type>\n    int call_counter<Tag, Type>::calls = 0;\n\n    // cloner\n\n    template<typename ValueType>\n    struct cloner {\n        ValueType& my_ref_to_original;\n\n        cloner(ValueType& ref_to_original) : my_ref_to_original(ref_to_original) {}\n\n        template<typename KeyType>\n        ValueType operator()(KeyType) const { return my_ref_to_original; }\n    };\n\n    // map searcher\n\n    template <typename KeyType, typename ValueType>\n    struct map_searcher {\n        using map_type = std::map<KeyType, ValueType>;\n        using map_iter = typename map_type::iterator;\n\n        map_type& my_map_ref;\n\n        map_searcher(map_type& map_ref) : my_map_ref(map_ref) {}\n\n        ValueType& operator()(KeyType k) {\n            map_iter it = my_map_ref.find(k);\n            if (it == my_map_ref.end())\n                it = my_map_ref.insert(it, std::make_pair(k, ValueType()));\n\n            return it->second;\n        }\n    };\n\n    // array searcher\n\n    template<typename key_type, typename value_type, std::size_t array_size>\n    struct array_searcher {\n        using array_type = value_type[array_size];\n\n        array_type const& my_array_ref;\n\n        array_searcher(array_type const& array_ref) : my_array_ref(array_ref) {}\n\n        const value_type& operator()(key_type k) const {\n            std::size_t index = k;\n            REQUIRE_MESSAGE(k < array_size, \"incorrect test setup\");\n            return my_array_ref[index];\n        }\n    };\n\n    // instance counter\n\n    template<typename CounterType = std::size_t>\n    struct instance_counter {\n        CounterType* my_p_count;\n\n        instance_counter() : my_p_count(new CounterType) {\n            *my_p_count = 1;\n        }\n\n        instance_counter(instance_counter const& other) : my_p_count(other.my_p_count) {\n            ++(*my_p_count);\n        }\n\n        instance_counter& operator=(instance_counter other) {\n            std::swap(this->my_p_count, other.my_p_count);\n            return *this;\n        }\n\n        ~instance_counter() {\n            bool is_last = ! --(*my_p_count);\n#if __GNUC__ == 12\n        // GCC 12 warns about using my_p_count after delete.\n        // The test was investigated and no problems were detected\n        // The following statement silence the warning\n        static bool unused_is_last = is_last;\n        utils::suppress_unused_warning(unused_is_last);\n#endif\n            if (is_last)\n                delete(my_p_count);\n        }\n        std::size_t instances_count() const { return *my_p_count; }\n    };\n\n    using instance_serial_counter = instance_counter<>;\n    using instance_concurrent_counter = instance_counter<std::atomic<std::size_t>>;\n};\n\n//-----------------------------------------------------------------------------\n// Concurrent LRU Cache Tests: Cache Presets\n//-----------------------------------------------------------------------------\n\nnamespace concurrent_lru_cache_presets {\n\n    namespace helpers = concurrent_lru_cache_helpers;\n\n    // base preset with common typedefs and fields\n\n    template<typename... CacheTypes>\n    struct preset_base {\n        using cache_type = tbb::concurrent_lru_cache<CacheTypes...>;\n        using handle_type = typename cache_type::handle;\n\n        preset_base() {}\n        preset_base(const preset_base&) = delete;\n        preset_base(preset_base&&) = delete;\n        preset_base& operator=(const preset_base&) = delete;\n        preset_base& operator=(preset_base&&) = delete;\n    };\n\n    // default preset\n\n    template<typename Key, typename Value>\n    struct preset_default : preset_base<Key, Value> {\n        using cache_type = typename preset_base<Key, Value>::cache_type;\n        using handle_type = typename cache_type::handle;\n        using callback_type = typename cache_type::value_function_type;\n\n        const std::size_t number_of_lru_history_items;\n        cache_type cache;\n\n        preset_default(callback_type callback, std::size_t history_items) :\n            number_of_lru_history_items(history_items),\n            cache(callback, number_of_lru_history_items) {};\n    };\n\n    // preset1\n\n    struct preset1 : preset_base<std::string, std::string> {\n        const std::size_t number_of_lru_history_items;\n        cache_type cache;\n        handle_type default_ctor_check;\n\n        static std::string callback(std::string key) { return key; }\n\n        preset1() :\n            number_of_lru_history_items(1),\n            cache(&callback, number_of_lru_history_items) {};\n    };\n\n    // preset for call counting\n\n    template<std::size_t tag_id>\n    struct preset_call_count : preset_base<int, int> {\n        using cache_miss_tag = helpers::tag<tag_id>;\n        using counter_type = helpers::call_counter<cache_miss_tag, int>;\n\n        const std::size_t number_of_lru_history_items;\n        cache_type cache;\n\n        preset_call_count() :\n            number_of_lru_history_items(8),\n            cache(&counter_type::call, number_of_lru_history_items) {}\n    };\n\n    // preset for instance counting\n\n    struct preset_instance_count : preset_base<\n        std::size_t, helpers::instance_serial_counter,\n        helpers::cloner<helpers::instance_serial_counter>> {\n\n        using cloner_type = helpers::cloner<helpers::instance_serial_counter>;\n\n        helpers::instance_serial_counter source;\n        cloner_type cloner;\n        const std::size_t number_of_lru_history_items;\n        cache_type cache;\n\n        preset_instance_count() :\n            cloner(source),\n            number_of_lru_history_items(8),\n            cache(cloner, number_of_lru_history_items) {}\n    };\n\n    // preset for instance counting with external map\n\n    struct preset_map_instance_count : preset_base<\n        std::size_t, helpers::instance_serial_counter,\n        helpers::map_searcher<std::size_t, helpers::instance_serial_counter>> {\n\n        using map_searcher_type = helpers::map_searcher<std::size_t, helpers::instance_serial_counter>;\n        using objects_map_type = map_searcher_type::map_type;\n\n        static const std::size_t number_of_lru_history_items;\n        map_searcher_type::map_type objects_map;\n        cache_type cache;\n\n        preset_map_instance_count() :\n            cache(map_searcher_type(objects_map), number_of_lru_history_items) {}\n\n        bool is_evicted(std::size_t key) {\n            objects_map_type::iterator it = objects_map.find(key);\n\n            REQUIRE_MESSAGE(\n                it != objects_map.end(),\n                \"no value for key - error in test logic ?\");\n\n            return it->second.instances_count() == 1;\n        }\n\n        void fill_up_cache(std::size_t lower_bound, std::size_t upper_bound) {\n            for (std::size_t i = lower_bound; i < upper_bound; ++i)\n                cache[i];\n        }\n    };\n\n    const std::size_t preset_map_instance_count::number_of_lru_history_items = 8;\n};\n\n#endif // __TBB_test_common_concurrent_lru_cache_common\n"
  },
  {
    "path": "third-party/tbb/test/common/concurrent_ordered_common.h",
    "content": "/*\n    Copyright (c) 2019-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_concurrent_ordered_common_H\n#define __TBB_test_common_concurrent_ordered_common_H\n\n#define __TBB_TEST_CPP20_COMPARISONS __TBB_CPP20_COMPARISONS_PRESENT && __TBB_CPP20_CONCEPTS_PRESENT\n\n#include \"config.h\"\n\n#include \"common/concurrent_associative_common.h\"\n#include \"test_comparisons.h\"\n\ntemplate<typename MyTable>\ninline void CheckContainerAllocator(MyTable &table, size_t expected_allocs, size_t expected_frees, bool exact) {\n    typename MyTable::allocator_type a = table.get_allocator();\n    CheckAllocator<MyTable>(a, expected_allocs, expected_frees, exact);\n}\n\ntemplate<typename Container>\ninline void CheckNoAllocations(Container&) {\n    // TODO: enable\n    // CheckContainerAllocator(cont, 0, 0, false);\n}\n\ntemplate <typename Container>\nstruct OrderChecker {\n    typename Container::value_compare& val_comp;\n    typename Container::key_compare& key_comp;\n\n    OrderChecker(typename Container::value_compare& v_comp, typename Container::key_compare& k_comp)\n        : val_comp(v_comp), key_comp(k_comp) {}\n\n    bool operator()(const typename Container::value_type& lhs, const typename Container::value_type& rhs) {\n        if (AllowMultimapping<Container>::value)\n            // We need to use not greater comparator for multicontainer\n            return !val_comp(rhs, lhs) && !key_comp(Value<Container>::key(rhs), Value<Container>::key(lhs));\n        return val_comp(lhs, rhs) && key_comp(Value<Container>::key(lhs), Value<Container>::key(rhs));\n    }\n}; // struct OrderChecker\n\ntemplate <typename Container>\nvoid check_container_order( const Container& cont ) {\n    if (!cont.empty()) {\n        typename Container::key_compare key_comp = cont.key_comp();\n        typename Container::value_compare value_comp = cont.value_comp();\n        OrderChecker<Container> check_order(value_comp, key_comp);\n\n        for (auto it = cont.begin(); std::next(it) != cont.end();) {\n            auto pr_it = it++;\n            REQUIRE_MESSAGE(check_order(*pr_it, *it), \"The order of the elements is broken\");\n        }\n    }\n}\n\ntemplate <typename Container>\nvoid test_ordered_methods() {\n    Container cont;\n    const Container& ccont = cont;\n\n    int r, random_threshold = 10, uncontained_key = random_threshold / 2;\n    for (int i = 0; i < 100; ++i) {\n        r = std::rand() % random_threshold;\n        if (r != uncontained_key) {\n            cont.insert(Value<Container>::make(r));\n        }\n    }\n\n    check_container_order(cont);\n\n    typename Container::value_compare val_comp = cont.value_comp();\n    typename Container::iterator l_bound_check, u_bound_check;\n    for (int key = -1; key < random_threshold + 1; ++key) {\n        auto eq_range = cont.equal_range(key);\n        // Check equal_range content\n        for (auto it = eq_range.first; it != eq_range.second; ++it)\n            REQUIRE_MESSAGE(*it == Value<Container>::make(key), \"equal_range contains wrong value\");\n\n        // Manual search of upper and lower bounds\n        l_bound_check = cont.end();\n        u_bound_check = cont.end();\n        for (auto it = cont.begin(); it != cont.end(); ++it){\n            if (!val_comp(*it, Value<Container>::make(key)) && l_bound_check == cont.end()) {\n                l_bound_check = it;\n            }\n            if (val_comp(Value<Container>::make(key), *it) && u_bound_check == cont.end()) {\n                u_bound_check = it;\n                break;\n            }\n        }\n\n        typename Container::range_type cont_range = cont.range();\n        typename Container::const_range_type ccont_range = ccont.range();\n        REQUIRE_MESSAGE(cont_range.size() == ccont_range.size(), \"Incorrect ordered container range size\");\n        REQUIRE_MESSAGE(cont_range.size() == cont.size(), \"Incorrect ordered container range size\");\n\n        typename Container::iterator l_bound = cont.lower_bound(key);\n        typename Container::iterator u_bound = cont.upper_bound(key);\n\n        REQUIRE_MESSAGE(l_bound == l_bound_check, \"lower_bound() returned wrong iterator\");\n        REQUIRE_MESSAGE(u_bound == u_bound_check, \"upper_bound() returned wrong iterator\");\n\n        using const_iterator = typename Container::const_iterator;\n        const_iterator cl_bound = ccont.lower_bound(key);\n        const_iterator cu_bound = ccont.upper_bound(key);\n\n        REQUIRE_MESSAGE(cl_bound == const_iterator(l_bound), \"lower_bound() const returned wrong iterator\");\n        REQUIRE_MESSAGE(cu_bound == const_iterator(u_bound), \"upper_bound() const returned wrong iterator\");\n\n        REQUIRE((l_bound == eq_range.first && u_bound == eq_range.second));\n    }\n}\n\ntemplate <typename Container, typename CheckElementState = std::false_type>\nvoid test_basic() {\n    test_basic_common<Container, CheckElementState>();\n    test_ordered_methods<Container>();\n}\n\ntemplate <typename Container>\nvoid test_concurrent_order() {\n    // TODO: MinThread - MaxThread loop\n    auto num_threads = utils::get_platform_max_threads();\n    Container cont;\n    int items = 1000;\n    utils::NativeParallelFor(num_threads, [&](std::size_t index) {\n        int step = index % 4 + 1;\n        bool reverse = (step % 2 == 0);\n        if (reverse) {\n            for (int i = 0; i < items; i += step) {\n                cont.insert(Value<Container>::make(i));\n            }\n        } else {\n            for (int i = items; i > 0; i -= step) {\n                cont.insert(Value<Container>::make(i));\n            }\n        }\n    });\n\n    check_container_order(cont);\n}\n\ntemplate <typename Container>\nvoid test_concurrent(bool asymptotic = false) {\n    test_concurrent_common<Container>(asymptotic);\n    test_concurrent_order<Container>();\n}\n\nstruct OrderedMoveTraitsBase {\n    static constexpr std::size_t expected_number_of_items_to_allocate_for_steal_move = 584; // TODO: remove allocation of dummy_node\n\n    template <typename OrderedType, typename Iterator>\n    static OrderedType& construct_container( typename std::aligned_storage<sizeof(OrderedType)>::type& storage,\n                                             Iterator begin, Iterator end )\n    {\n        OrderedType* ptr = reinterpret_cast<OrderedType*>(&storage);\n        new (ptr) OrderedType(begin, end);\n        return *ptr;\n    }\n\n    template <typename OrderedType, typename Iterator, typename Allocator>\n    static OrderedType& construct_container( typename std::aligned_storage<sizeof(OrderedType)>::type& storage,\n                                             Iterator begin, Iterator end, const Allocator& alloc )\n    {\n        OrderedType* ptr = reinterpret_cast<OrderedType*>(&storage);\n        new (ptr) OrderedType(begin, end, typename OrderedType::key_compare(), alloc);\n        return *ptr;\n    }\n\n    template <typename OrderedType, typename Iterator>\n    static bool equal( const OrderedType& c, Iterator begin, Iterator end ) {\n        bool equal_sizes = std::size_t(std::distance(begin, end)) == c.size();\n        if (!equal_sizes) return false;\n        for (Iterator it = begin; it != end; ++it) {\n            if (!c.contains(Value<OrderedType>::key((*it)))) return false;\n        }\n        return true;\n    }\n};\n\nnamespace std {\ntemplate <>\nstruct less<std::weak_ptr<int>> {\n    bool operator()( const std::weak_ptr<int>& lhs, const std::weak_ptr<int>& rhs ) const {\n        return *lhs.lock() < *rhs.lock();\n    }\n};\n\ntemplate <>\nstruct less<const std::weak_ptr<int>> : less<std::weak_ptr<int>> {};\n}\n\ntemplate <bool DefCtorPresent, typename Table>\nvoid Examine(Table c, const std::list<typename Table::value_type>& lst) {\n    CommonExamine<DefCtorPresent>(c, lst);\n}\n\ntemplate <bool DefCtorPresent, typename Table>\nvoid TypeTester( const std::list<typename Table::value_type>& lst ) {\n    REQUIRE_MESSAGE(lst.size() >= 5, \"Array should have at least 5 elements\");\n    REQUIRE_MESSAGE(lst.size() <= 100, \"The test has O(n^2) complexity so a big number of elements can lead long execution time\");\n\n    // Construct an empty table\n    Table c1;\n    c1.insert(lst.begin(), lst.end());\n    Examine<DefCtorPresent>(c1, lst);\n\n    typename Table::key_compare compare;\n    typename Table::allocator_type allocator;\n\n    auto it = lst.begin();\n    auto init = {*it++, *it++, *it++};\n\n    // Constructor from an std::initializer_list\n    Table c2(init);\n    c2.insert(it, lst.end());\n    Examine<DefCtorPresent>(c2, lst);\n\n    // Constructor from an std::initializer_list, default comparator and non-default allocator\n    Table c2_alloc(init, allocator);\n    c2_alloc.insert(it, lst.end());\n    Examine<DefCtorPresent>(c2_alloc, lst);\n\n    // Constructor from an std::initializer_list, non-default comparator and allocator\n    Table c2_comp_alloc(init, compare, allocator);\n    c2_comp_alloc.insert(it, lst.end());\n    Examine<DefCtorPresent>(c2_comp_alloc, lst);\n\n    // Copying constructor\n    Table c3(c1);\n    Examine<DefCtorPresent>(c3, lst);\n\n    // Copying constructor with the allocator\n    Table c3_alloc(c1, allocator);\n    Examine<DefCtorPresent>(c3_alloc, lst);\n\n    // Constructor with non-default compare\n    Table c4(compare);\n    c4.insert(lst.begin(), lst.end());\n    Examine<DefCtorPresent>(c4, lst);\n\n    // Constructor with non-default allocator\n    Table c5(allocator);\n    c5.insert(lst.begin(), lst.end());\n    Examine<DefCtorPresent>(c5, lst);\n\n    // Constructor with non-default compare and non-default allocator\n    Table c6(compare, allocator);\n    c6.insert(lst.begin(), lst.end());\n    Examine<DefCtorPresent>(c6, lst);\n\n    // Constructor from an iteration range\n    Table c7(c1.begin(), c1.end());\n    Examine<DefCtorPresent>(c7, lst);\n\n    // Constructor from an iteration range, default compare and non-default allocator\n    Table c8(c1.begin(), c1.end(), allocator);\n    Examine<DefCtorPresent>(c8, lst);\n\n    // Constructor from an iteration range, non-default compare and non-default allocator\n    Table c9(c1.begin(), c1.end(), compare, allocator);\n    Examine<DefCtorPresent>(c9, lst);\n}\n\nstruct TransparentLess {\n    template <typename T, typename U>\n    auto operator()( T&& lhs, U&& rhs ) const\n    -> decltype(std::forward<T>(lhs) < std::forward<U>(rhs)) {\n        return lhs < rhs;\n    }\n\n    using is_transparent = void;\n};\n\ntemplate <template <typename...> class Container, typename... Args>\nvoid check_heterogeneous_functions_key_int() {\n    check_heterogeneous_functions_key_int_impl<Container<Args..., TransparentLess>>();\n}\n\ntemplate <template <typename...> class Container, typename... Args>\nvoid check_heterogeneous_functions_key_string() {\n    check_heterogeneous_functions_key_string_impl<Container<Args..., TransparentLess>>();\n}\n\ntemplate <typename Container>\nvoid check_heterogeneous_bound_functions() {\n    static_assert(std::is_same<typename Container::key_type, int>::value,\n                  \"incorrect key_type for heterogeneous bounds test\");\n    // Initialization\n    Container c;\n    const Container& cc = c;\n\n    int size = 10;\n    for (int i = 0; i < size; ++i) {\n        c.insert(Value<Container>::make(i));\n    }\n    // Insert first duplicated element for multicontainers\n    if (AllowMultimapping<Container>::value) {\n        c.insert(Value<Container>::make(0));\n    }\n\n    // Upper and lower bound testing\n    for (int i = 0; i < size; ++i) {\n        int_key k(i);\n        int key = i;\n\n        REQUIRE_MESSAGE(c.lower_bound(k) == c.lower_bound(key), \"Incorrect heterogeneous lower_bound return value\");\n        REQUIRE_MESSAGE(c.upper_bound(k) == c.upper_bound(key), \"Incorrect heterogeneous upper_bound return value\");\n        REQUIRE_MESSAGE(cc.lower_bound(k) == cc.lower_bound(key), \"Incorrect const heterogeneous lower_bound return value\");\n        REQUIRE_MESSAGE(cc.upper_bound(k) == cc.upper_bound(key), \"Incorrect const heterogeneous upper_bound return value\");\n    }\n}\n\ntemplate <typename Container>\nvoid test_comparisons_basic() {\n    using comparisons_testing::testEqualityAndLessComparisons;\n    Container c1, c2;\n    testEqualityAndLessComparisons</*ExpectEqual = */true, /*ExpectLess = */false>(c1, c2);\n\n    c1.insert(Value<Container>::make(1));\n    testEqualityAndLessComparisons</*ExpectEqual = */false, /*ExpectLess = */false>(c1, c2);\n\n    c2.insert(Value<Container>::make(1));\n    testEqualityAndLessComparisons</*ExpectEqual = */true, /*ExpectLess = */false>(c1, c2);\n\n    c2.insert(Value<Container>::make(2));\n    testEqualityAndLessComparisons</*ExpectEqual = */false, /*ExpectLess = */true>(c1, c2);\n\n    c1.clear();\n    c2.clear();\n\n    testEqualityAndLessComparisons</*ExpectEqual = */true, /*ExpectLess = */false>(c1, c2);\n}\n\ntemplate <typename TwoWayComparableContainerType>\nvoid test_two_way_comparable_container() {\n    TwoWayComparableContainerType c1, c2;\n    c1.insert(Value<TwoWayComparableContainerType>::make(1));\n    c2.insert(Value<TwoWayComparableContainerType>::make(1));\n    comparisons_testing::TwoWayComparable::reset();\n    REQUIRE_MESSAGE(!(c1 < c2), \"Incorrect operator < result\");\n    comparisons_testing::check_two_way_comparison();\n    REQUIRE_MESSAGE(!(c1 > c2), \"Incorrect operator > result\");\n    comparisons_testing::check_two_way_comparison();\n    REQUIRE_MESSAGE(c1 <= c2, \"Incorrect operator <= result\");\n    comparisons_testing::check_two_way_comparison();\n    REQUIRE_MESSAGE(c1 >= c2, \"Incorrect operator >= result\");\n    comparisons_testing::check_two_way_comparison();\n}\n\n#if __TBB_TEST_CPP20_COMPARISONS\ntemplate <typename ThreeWayComparableContainerType>\nvoid test_three_way_comparable_container() {\n    ThreeWayComparableContainerType c1, c2;\n    c1.insert(Value<ThreeWayComparableContainerType>::make(1));\n    c2.insert(Value<ThreeWayComparableContainerType>::make(1));\n    comparisons_testing::ThreeWayComparable::reset();\n    REQUIRE_MESSAGE(!(c1 <=> c2 < 0), \"Incorrect operator<=> result\");\n    comparisons_testing::check_three_way_comparison();\n\n    REQUIRE_MESSAGE(!(c1 < c2), \"Incorrect operator< result\");\n    comparisons_testing::check_three_way_comparison();\n\n    REQUIRE_MESSAGE(!(c1 > c2), \"Incorrect operator> result\");\n    comparisons_testing::check_three_way_comparison();\n\n    REQUIRE_MESSAGE(c1 <= c2, \"Incorrect operator>= result\");\n    comparisons_testing::check_three_way_comparison();\n\n    REQUIRE_MESSAGE(c1 >= c2, \"Incorrect operator>= result\");\n    comparisons_testing::check_three_way_comparison();\n}\n#endif\n\ntemplate <template <typename...> class ContainerType>\nvoid test_map_comparisons() {\n    using integral_container = ContainerType<int, int>;\n    using two_way_comparable_container = ContainerType<comparisons_testing::TwoWayComparable,\n                                                       comparisons_testing::TwoWayComparable>;\n    test_comparisons_basic<integral_container>();\n    test_comparisons_basic<two_way_comparable_container>();\n    test_two_way_comparable_container<two_way_comparable_container>();\n\n#if __TBB_TEST_CPP20_COMPARISONS\n    using two_way_less_only_container = ContainerType<comparisons_testing::LessComparableOnly,\n                                                      comparisons_testing::LessComparableOnly>;\n\n    using three_way_only_container = ContainerType<comparisons_testing::ThreeWayComparableOnly,\n                                                   comparisons_testing::ThreeWayComparableOnly>;\n\n    using three_way_comparable_container = ContainerType<comparisons_testing::ThreeWayComparable,\n                                                         comparisons_testing::ThreeWayComparable>;\n\n    test_comparisons_basic<two_way_less_only_container>();\n    test_comparisons_basic<three_way_only_container>();\n    test_comparisons_basic<three_way_comparable_container>();\n    test_three_way_comparable_container<three_way_comparable_container>();\n#endif // __TBB_TEST_CPP20_COMPARISONS\n}\n\ntemplate <template <typename...> class ContainerType>\nvoid test_set_comparisons() {\n    using integral_container = ContainerType<int>;\n    using two_way_comparable_container = ContainerType<comparisons_testing::TwoWayComparable>;\n\n    test_comparisons_basic<integral_container>();\n    test_comparisons_basic<two_way_comparable_container>();\n    test_two_way_comparable_container<two_way_comparable_container>();\n\n#if __TBB_TEST_CPP20_COMPARISONS\n    using two_way_less_only_container = ContainerType<comparisons_testing::LessComparableOnly>;\n    using three_way_only_container = ContainerType<comparisons_testing::ThreeWayComparableOnly>;\n    using three_way_comparable_container = ContainerType<comparisons_testing::ThreeWayComparable>;\n\n    test_comparisons_basic<two_way_less_only_container>();\n    test_comparisons_basic<three_way_only_container>();\n    test_comparisons_basic<three_way_comparable_container>();\n    test_three_way_comparable_container<three_way_comparable_container>();\n#endif // __TBB_TEST_CPP20_COMPARISONS\n}\n\n#endif // __TBB_test_common_concurrent_ordered_common_H\n"
  },
  {
    "path": "third-party/tbb/test/common/concurrent_priority_queue_common.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_concurrent_priority_queue_common_H\n#define __TBB_test_common_concurrent_priority_queue_common_H\n\n// We need to skip allocator_traits::is_always_equal tests for C++11 and C++14\n#define __TBB_TEST_SKIP_IS_ALWAYS_EQUAL_CHECK (__cplusplus < 201703L)\n#include <common/test.h>\n#include <common/utils.h>\n#include <oneapi/tbb/concurrent_priority_queue.h>\n#include <oneapi/tbb/blocked_range.h>\n#include <vector>\n\nnamespace equality_comparison_helpers {\n\ntemplate <typename ElementType, typename Compare, typename Allocator>\nstd::vector<ElementType> toVector( const tbb::concurrent_priority_queue<ElementType, Compare, Allocator>& source ) {\n    auto cpq = source;\n    std::vector<ElementType> v;\n    v.reserve(cpq.size());\n\n    ElementType element;\n    while(cpq.try_pop(element)) {\n        v.emplace_back(element);\n    }\n    std::reverse(v.begin(), v.end());\n    return v;\n}\n\n}; // namespace equality_comparison_helpers\n\ntemplate <bool HasCopyCtor>\nstruct QueuePushHelper {\n    template <typename Q, typename T>\n    static void push(Q& q, T&& t) {\n        q.push(std::forward<T>(t));\n    }\n};\n\ntemplate<>\ntemplate <typename Q, typename T>\nvoid QueuePushHelper<false>::push( Q& q, T&& t ) {\n    q.push(std::move(t));\n}\n\ntemplate <bool HasCopyCtor, typename QueueType>\nvoid examine( QueueType& q1, QueueType& q2, const std::vector<typename QueueType::value_type>& vec_sorted ) {\n    using value_type = typename QueueType::value_type;\n\n    REQUIRE((!q1.empty() && q1.size() == vec_sorted.size()));\n    value_type elem;\n\n    q2.clear();\n    REQUIRE((q2.empty() && !q2.size() && !q2.try_pop(elem)));\n\n    typename std::vector<value_type>::const_reverse_iterator it1;\n    for (it1 = vec_sorted.rbegin(); q1.try_pop(elem); ++it1) {\n        REQUIRE(utils::IsEqual{}(elem, *it1));\n        if (std::distance(vec_sorted.rbegin(), it1) % 2) {\n            QueuePushHelper<HasCopyCtor>::push(q2, elem);\n        } else {\n            QueuePushHelper<HasCopyCtor>::push(q2, std::move(elem));\n        }\n    }\n    REQUIRE(it1 == vec_sorted.rend());\n    REQUIRE((q1.empty() && !q1.size()));\n    REQUIRE((!q2.empty() && q2.size() == vec_sorted.size()));\n\n    q1.swap(q2);\n    REQUIRE((q2.empty() && !q2.size()));\n    REQUIRE((!q1.empty() && q1.size() == vec_sorted.size()));\n    for (it1 = vec_sorted.rbegin(); q1.try_pop(elem); ++it1)\n        REQUIRE(utils::IsEqual{}(elem, *it1));\n    REQUIRE(it1 == vec_sorted.rend());\n};\n\ntemplate <typename QueueType>\nvoid examine( const QueueType& q, const std::vector<typename QueueType::value_type>& vec_sorted ) {\n    QueueType q1(q), q2(q);\n    examine</*HasCopyCtor=*/true>(q1, q2, vec_sorted);\n}\n\n// TODO: consider wrapping each constructor test into separate TEST_CASE\ntemplate <typename ValueType, typename Compare>\nvoid type_tester( const std::vector<ValueType>& vec, Compare comp ) {\n    using queue_type = tbb::concurrent_priority_queue<ValueType, Compare>;\n    REQUIRE_MESSAGE(vec.size() >= 5, \"Array should have at least 5 elements\");\n\n    std::vector<ValueType> vec_sorted(vec);\n    std::sort(vec_sorted.begin(), vec_sorted.end(), comp);\n\n    // Construct an empty queue\n    queue_type q1;\n    q1.assign(vec.begin(), vec.end());\n    examine(q1, vec_sorted);\n\n    // Constructor from std::initializer_list\n    queue_type q2({vec[0], vec[1], vec[2]});\n    for (auto it = vec.begin() + 3; it != vec.end(); ++it)\n        q2.push(*it);\n    examine(q2, vec_sorted);\n\n    // Assignment operator with std::initializer_list\n    queue_type q3;\n    q3 = {vec[0], vec[1], vec[2]};\n    for (auto it = vec.begin() + 3; it != vec.end(); ++it)\n        q3.push(*it);\n    examine(q3, vec_sorted);\n\n    // Copy ctor\n    queue_type q4(q1);\n    examine(q4, vec_sorted);\n\n    // Copy ctor with allocator\n    auto alloc = q1.get_allocator();\n    queue_type q4_alloc(q1, alloc);\n    examine(q4_alloc, vec_sorted);\n\n    // Constructor from the half-open interval\n    queue_type q5(vec.begin(), vec.end());\n    examine(q5, vec_sorted);\n\n    // Constructor from the allocator object\n    queue_type q6(alloc);\n    q6.assign(vec.begin(), vec.end());\n    examine(q6, vec_sorted);\n\n    // Constructor from the comparator and allocator object\n    queue_type q7(comp);\n    q7.assign(vec.begin(), vec.end());\n    examine(q7, vec_sorted);\n\n    queue_type q8(comp, alloc);\n    q8.assign(vec.begin(), vec.end());\n    examine(q8, vec_sorted);\n\n    // Constructor from the initial capacity, comparator and allocator\n    queue_type q9(100);\n    q9.assign(vec.begin(), vec.end());\n    examine(q9, vec_sorted);\n\n    queue_type q10(100, comp);\n    q10.assign(vec.begin(), vec.end());\n    examine(q10, vec_sorted);\n\n    queue_type q11(100, alloc);\n    q11.assign(vec.begin(), vec.end());\n    examine(q11, vec_sorted);\n\n    // Constructor from the half-open interval, compare and allocator object\n    queue_type q12(vec.begin(), vec.end(), comp);\n    examine(q12, vec_sorted);\n\n    queue_type q13(vec.begin(), vec.end(), alloc);\n    examine(q13, vec_sorted);\n\n    // Constructor from the std::initializer_list from the half-open interval, compare and allocator object\n    queue_type q14({vec[0], vec[1], vec[2]}, comp);\n    for (auto it = vec.begin() + 3; it != vec.end(); ++it)\n        q14.push(*it);\n    examine(q14, vec_sorted);\n\n    queue_type q15({vec[0], vec[1], vec[2]}, alloc);\n    for (auto it = vec.begin() + 3; it != vec.end(); ++it)\n        q15.push(*it);\n    examine(q15, vec_sorted);\n}\n\ntemplate <typename ValueType>\nvoid type_tester( const std::vector<ValueType>& vec ) {\n    type_tester(vec, std::less<ValueType>{});\n}\n\nstruct LessForSmartPointers {\n    template <typename T>\n    bool operator()( const T& t1, const T& t2 ) {\n        return *t1 < *t2;\n    }\n\n    template <typename T>\n    bool operator()( const std::weak_ptr<T>& t1, const std::weak_ptr<T>& t2 ) {\n        return *t1.lock().get() < *t2.lock().get();\n    }\n}; // struct LessForSmartPointers\n\ntemplate <typename T>\nvoid type_tester_unique_ptr( const std::vector<T>& vec ) {\n    REQUIRE_MESSAGE(vec.size() >= 5, \"Array should have at least 5 elements\");\n\n    using value_type = std::unique_ptr<T>;\n    using queue_type = tbb::concurrent_priority_queue<value_type, LessForSmartPointers>;\n\n    std::vector<value_type> vec_sorted;\n    for (auto& item : vec) {\n        vec_sorted.push_back(value_type(new T(item)));\n    }\n    std::sort(vec_sorted.begin(), vec_sorted.end(), LessForSmartPointers{});\n\n    queue_type q1, q1_copy;\n    for (auto& item : vec) {\n        q1.push(value_type(new T(item)));\n        q1_copy.push(value_type(new T(item)));\n    }\n    examine</*HasCopyCtor=*/false>(q1, q1_copy, vec_sorted);\n\n    queue_type q3_copy;\n    q1.clear();\n\n    for (auto& item : vec) {\n        q1.emplace(new T(item));\n    }\n\n    queue_type q3(std::move(q1));\n    examine</*HasCopyCtor=*/false>(q3, q3_copy, vec_sorted);\n}\n\nconst std::size_t MAX_ITER = 10000;\nconst std::size_t push_selector_variants = 3; // push, push rvalue and emplace\n\ntemplate <typename Q, typename E>\nvoid push_selector(Q& q, E e, std::size_t i) {\n    switch(i % push_selector_variants) {\n    case 0: q.push(e); break;\n    case 1: q.push(std::move(e)); break;\n    case 2: q.emplace(e); break;\n    }\n}\n\nstatic std::atomic<std::size_t> counter;\n\ntemplate <typename T, typename C>\nclass FillBody {\n    std::size_t n_thread;\n    T my_min, my_max;\n    tbb::concurrent_priority_queue<T, C>* q;\npublic:\n    FillBody( const FillBody& ) = delete;\n    FillBody& operator=( const FillBody& ) = delete;\n\n    FillBody( std::size_t n, T max, T min, tbb::concurrent_priority_queue<T, C>* cpq )\n        : n_thread(n), my_min(min), my_max(max), q(cpq) {}\n\n    void operator()( const std::size_t thread_id ) const {\n        T elem = my_min + T(int(thread_id));\n        for (std::size_t i = 0; i < MAX_ITER; ++i) {\n            // do some pushes\n            push_selector(*q, elem, i);\n            if (elem == my_max) elem = my_min;\n            elem = elem + T(int(n_thread));\n        }\n    }\n}; // class FillBody\n\ntemplate <typename T, typename C>\nstruct EmptyBody {\n    T my_max;\n    tbb::concurrent_priority_queue<T, C>* q;\n    C less_than;\npublic:\n    EmptyBody( const EmptyBody& ) = delete;\n    EmptyBody& operator=( const EmptyBody& ) = delete;\n\n    EmptyBody( T max, tbb::concurrent_priority_queue<T, C>* cpq )\n        : my_max(max), q(cpq) {}\n\n    void operator()( const std::size_t ) const {\n        T elem(my_max), last;\n        if (q->try_pop(last)) {\n            ++counter;\n            while(q->try_pop(elem)) {\n                REQUIRE_MESSAGE(!less_than(last, elem), \"Failed pop/priority test in EmptyBody\");\n                last = elem;\n                elem = my_max;\n                ++counter;\n            }\n        }\n    }\n}; // struct EmptyBody\n\ntemplate <typename T, typename C>\nclass FloggerBody {\n    tbb::concurrent_priority_queue<T, C>* q;\npublic:\n    FloggerBody( const FloggerBody& ) = delete;\n    FloggerBody& operator=( const FloggerBody& ) = delete;\n\n    FloggerBody( tbb::concurrent_priority_queue<T, C>* cpq )\n        : q(cpq) {}\n\n    void operator()( const std::size_t thread_id ) const {\n        T elem = T(int(thread_id + 1));\n        for (std::size_t i = 0; i < MAX_ITER; ++i) {\n            push_selector(*q, elem, i);\n            q->try_pop(elem);\n        }\n    }\n}; // class FloggerBody\n\ntemplate <typename C, typename T>\nvoid test_parallel_push_pop( std::size_t n, T t_max, T t_min ) {\n    std::size_t qsize;\n\n    tbb::concurrent_priority_queue<T, C> q(0);\n    FillBody<T, C> filler(n, t_max, t_min, &q);\n    EmptyBody<T, C> emptier(t_max, &q);\n\n    counter = 0;\n    utils::NativeParallelFor(n, filler);\n\n    qsize = q.size();\n    REQUIRE_MESSAGE(q.size() == n * MAX_ITER, \"Failed concurrent push size test\");\n    REQUIRE_MESSAGE(!q.empty(), \"Failed concurrent push empty test\");\n\n    utils::NativeParallelFor(n, emptier);\n    REQUIRE_MESSAGE(counter == qsize, \"Failed pop size test\");\n    REQUIRE_MESSAGE(q.size() == 0, \"Failed pop empty test\");\n}\n\ntemplate <typename C, typename T>\nvoid test_flogger( std::size_t n ) {\n    tbb::concurrent_priority_queue<T, C> q(0);\n    utils::NativeParallelFor(n, FloggerBody<T, C>{&q});\n    REQUIRE_MESSAGE(q.empty(), \"Failed flogger empty test\");\n    REQUIRE_MESSAGE(!q.size(), \"Failed flogger size test\");\n}\n\n#endif // __TBB_test_common_concurrent_priority_queue_common_H\n"
  },
  {
    "path": "third-party/tbb/test/common/concurrent_unordered_common.h",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_concurrent_unordered_common\n#define __TBB_test_common_concurrent_unordered_common\n\n#define __TBB_UNORDERED_TEST 1\n\n#include \"test.h\"\n#include <memory>\n#include \"concurrent_associative_common.h\"\n#include \"test_comparisons.h\"\n\ntemplate<typename MyTable>\ninline void CheckContainerAllocator(MyTable &table, size_t expected_allocs, size_t expected_frees, bool exact) {\n    typename MyTable::allocator_type a = table.get_allocator();\n    REQUIRE( a.items_allocated == a.allocations);\n    REQUIRE( a.items_freed == a.frees);\n    REQUIRE( a.items_allocated == a.items_freed );\n    CheckAllocator<MyTable>(a, expected_allocs, expected_frees, exact);\n}\n\ntemplate<typename Container>\ninline void CheckNoAllocations(Container &cont){\n    CheckContainerAllocator(cont, 0, 0, false);\n}\n\ntemplate<typename T>\nstruct degenerate_hash {\n    size_t operator()(const T& /*a*/) const {\n        return 1;\n    }\n};\n\ntemplate <typename T>\nvoid test_unordered_methods(){\n    T cont;\n    cont.insert(Value<T>::make(1));\n    cont.insert(Value<T>::make(2));\n    // unordered_specific\n    // void rehash(size_type n);\n    cont.rehash(16);\n\n    // float load_factor() const;\n    // float max_load_factor() const;\n    REQUIRE_MESSAGE(cont.load_factor() <= cont.max_load_factor(), \"Load factor is invalid\");\n\n    // void max_load_factor(float z);\n    cont.max_load_factor(16.0f);\n    REQUIRE_MESSAGE(cont.max_load_factor() == 16.0f, \"Max load factor has not been changed properly\");\n\n    // hasher hash_function() const;\n    cont.hash_function();\n\n    // key_equal key_eq() const;\n    cont.key_eq();\n\n    cont.clear();\n    CheckNoAllocations(cont);\n    for (int i = 0; i < 256; i++)\n    {\n        std::pair<typename T::iterator, bool> ins3 = cont.insert(Value<T>::make(i));\n        REQUIRE_MESSAGE((ins3.second == true && Value<T>::get(*(ins3.first)) == i), \"Element 1 has not been inserted properly\");\n    }\n    REQUIRE_MESSAGE(cont.size() == 256, \"Wrong number of elements have been inserted\");\n    // size_type unsafe_bucket_count() const;\n    REQUIRE_MESSAGE(cont.unsafe_bucket_count() == 16, \"Wrong number of buckets\");\n\n    // size_type unsafe_max_bucket_count() const;\n    //REQUIRE_MESSAGE(cont.unsafe_max_bucket_count() > 65536, \"Wrong max number of buckets\");\n\n    for (unsigned int i = 0; i < 256; i++)\n    {\n        typename T::size_type buck = cont.unsafe_bucket(i);\n\n        // size_type unsafe_bucket(const key_type& k) const;\n        REQUIRE_MESSAGE(buck < 16, \"Wrong bucket mapping\");\n    }\n\n    typename T::size_type bucketSizeSum = 0;\n    typename T::size_type iteratorSizeSum = 0;\n\n    for (unsigned int i = 0; i < 16; i++)\n    {\n        bucketSizeSum += cont.unsafe_bucket_size(i);\n        for (typename T::iterator bit = cont.unsafe_begin(i); bit != cont.unsafe_end(i); bit++) iteratorSizeSum++;\n    }\n    REQUIRE_MESSAGE(bucketSizeSum == 256, \"sum of bucket counts incorrect\");\n    REQUIRE_MESSAGE(iteratorSizeSum == 256, \"sum of iterator counts incorrect\");\n}\n\ntemplate<typename Container, typename CheckElementState = std::false_type>\nvoid test_basic(){\n    test_basic_common<Container, CheckElementState>();\n    test_unordered_methods<Container>();\n}\n\ntemplate <typename Container>\nvoid test_concurrent( bool asymptotic = false ) {\n    test_concurrent_common<Container>(asymptotic);\n}\n\nstruct UnorderedMoveTraitsBase {\n    static constexpr std::size_t expected_number_of_items_to_allocate_for_steal_move = 3; // TODO: check\n\n    template <typename UnorderedType, typename Iterator>\n    static UnorderedType& construct_container( typename std::aligned_storage<sizeof(UnorderedType)>::type& storage,\n                                               Iterator begin, Iterator end )\n    {\n        UnorderedType* ptr = reinterpret_cast<UnorderedType*>(&storage);\n        new (ptr) UnorderedType(begin, end);\n        return *ptr;\n    }\n\n    template <typename UnorderedType, typename Iterator, typename Allocator>\n    static UnorderedType& construct_container( typename std::aligned_storage<sizeof(UnorderedType)>::type& storage,\n                                                Iterator begin, Iterator end, const Allocator& alloc )\n    {\n        UnorderedType* ptr = reinterpret_cast<UnorderedType*>(&storage);\n        new (ptr) UnorderedType(begin, end, /*bucket_count = */4, alloc);\n        return *ptr;\n    }\n\n    template <typename UnorderedType, typename Iterator>\n    static bool equal( const UnorderedType& c, Iterator begin, Iterator end ) {\n        if (std::size_t(std::distance(begin, end)) != c.size()) {\n            return false;\n        }\n\n        for (Iterator it = begin; it != end; ++it) {\n            if (!c.contains(Value<UnorderedType>::key(*it))) {\n                return false;\n            }\n        }\n        return true;\n    }\n}; // struct UnorderedMoveTraitsBase\n\ntemplate <bool DefCtorPresent, typename Table>\nvoid CustomExamine( Table c, const std::list<typename Table::value_type>& lst ) {\n    using size_type = typename Table::size_type;\n    const Table constC = c;\n\n    const size_type bucket_count = c.unsafe_bucket_count();\n    REQUIRE(c.unsafe_max_bucket_count() >= bucket_count);\n\n    size_type counter = 0;\n    for (size_type i = 0; i < bucket_count; ++i) {\n        const size_type size = c.unsafe_bucket_size(i);\n        using diff_type = typename Table::difference_type;\n\n        REQUIRE(std::distance(c.unsafe_begin(i), c.unsafe_end(i)) == diff_type(size));\n        REQUIRE(std::distance(c.unsafe_cbegin(i), c.unsafe_cend(i)) == diff_type(size));\n        REQUIRE(std::distance(constC.unsafe_begin(i), constC.unsafe_end(i)) == diff_type(size));\n        REQUIRE(std::distance(constC.unsafe_cbegin(i), constC.unsafe_cend(i)) == diff_type(size));\n        counter += size;\n    }\n\n    REQUIRE(counter == lst.size());\n\n    for (auto it = lst.begin(); it != lst.end();) {\n        const size_type index = c.unsafe_bucket(Value<Table>::key(*it));\n        auto prev_it = it++;\n        REQUIRE(std::search(c.unsafe_begin(index), c.unsafe_end(index), prev_it, it, utils::IsEqual()) != c.unsafe_end(index));\n    }\n\n    c.rehash(2*bucket_count);\n    REQUIRE(c.unsafe_bucket_count() > bucket_count);\n\n    auto count = 2 * c.max_load_factor() * c.unsafe_bucket_count();\n    c.reserve(size_type(count));\n    REQUIRE(c.max_load_factor() * c.unsafe_bucket_count() >= count);\n\n    REQUIRE(c.load_factor() <= c.max_load_factor());\n    c.max_load_factor(1.0f);\n    c.hash_function();\n    c.key_eq();\n}\n\ntemplate <bool DefCtorPresent, typename Table>\nvoid Examine( Table c, const std::list<typename Table::value_type>& lst ) {\n    CommonExamine<DefCtorPresent>(c, lst);\n    CustomExamine<DefCtorPresent>(c, lst);\n}\n\n// Necessary to avoid warnings about explicit copy assignment to itself\ntemplate <typename T>\nT& self( T& obj ) {\n    return obj;\n}\n\ntemplate <bool DefCtorPresent, typename Table>\nvoid TypeTester( const std::list<typename Table::value_type>& lst ) {\n    REQUIRE_MESSAGE(lst.size() >= 5, \"Array should have at least 5 elements\");\n    REQUIRE_MESSAGE(lst.size() <= 100, \"The test hash O(n^2) complexity so a big number of elements can lead long execution time\");\n\n    Table c1;\n    c1.insert(lst.begin(), lst.end());\n\n    Examine<DefCtorPresent>(c1, lst);\n\n    typename Table::size_type initial_bucket_number = 8;\n    typename Table::allocator_type allocator;\n    typename Table::hasher hasher;\n\n    auto it = lst.begin();\n    Table c2({*it++, *it++, *it++});\n    c2.insert(it, lst.end());\n    Examine<DefCtorPresent>(c2, lst);\n\n    it = lst.begin();\n    // Constructor from an std::initializer_list, default hasher and key_equal and non-default allocator\n    Table c2_alloc({*it++, *it++, *it++}, initial_bucket_number, allocator);\n    c2_alloc.insert(it, lst.end());\n    Examine<DefCtorPresent>(c2_alloc, lst);\n\n    it = lst.begin();\n    // Constructor from an std::initializer_list, default key_equal and non-default hasher and allocator\n    Table c2_hash_alloc({*it++, *it++, *it++}, initial_bucket_number, hasher, allocator);\n    c2_hash_alloc.insert(it, lst.end());\n    Examine<DefCtorPresent>(c2_hash_alloc, lst);\n\n    // Copy ctor\n    Table c3(c1);\n    Examine<DefCtorPresent>(c3, lst);\n\n    // Copy ctor with the allocator\n    Table c3_alloc(c1, allocator);\n    Examine<DefCtorPresent>(c3_alloc, lst);\n\n    // Construct an empty table with n preallocated buckets\n    Table c4(lst.size());\n    c4.insert(lst.begin(), lst.end());\n    Examine<DefCtorPresent>(c4, lst);\n\n    // Construct an empty table with n preallocated buckets, default hasher and key_equal and non-default allocator\n    Table c4_alloc(lst.size(), allocator);\n    c4_alloc.insert(lst.begin(), lst.end());\n    Examine<DefCtorPresent>(c4_alloc, lst);\n\n    // Construct an empty table with n preallocated buckets, default key_equal and non-default hasher and allocator\n    Table c4_hash_alloc(lst.size(), hasher, allocator);\n    c4_hash_alloc.insert(lst.begin(), lst.end());\n    Examine<DefCtorPresent>(c4_hash_alloc, lst);\n\n    // Construction from the iteration range\n    Table c5(c1.begin(), c1.end());\n    Examine<DefCtorPresent>(c5, lst);\n\n    // Construction from the iteration range, default hasher and key_equal and non-default allocator\n    Table c5_alloc(c1.begin(), c2.end(), initial_bucket_number, allocator);\n    Examine<DefCtorPresent>(c5_alloc, lst);\n\n    // Construction from the iteration range, default key_equal and non-default hasher and allocator\n    Table c5_hash_alloc(c1.begin(), c2.end(), initial_bucket_number, hasher, allocator);\n    Examine<DefCtorPresent>(c5_hash_alloc, lst);\n\n    // Copy assignment\n    Table c6;\n    c6 = c1;\n    Examine<DefCtorPresent>(c6, lst);\n\n    // Copy assignment to itself\n    c6 = self(c6);\n    Examine<DefCtorPresent>(c6, lst);\n\n    // Move assignment\n    Table c7;\n    c7 = std::move(c6);\n    Examine<DefCtorPresent>(c7, lst);\n\n    // Move assignment to itself\n    c7 = std::move(self(c7));\n    Examine<DefCtorPresent>(c7, lst);\n\n    // Assignment to the std::initializer_list\n    Table c8;\n    it = lst.begin();\n    c8 = {*it++, *it++, *it++};\n    c8.insert(it, lst.end());\n    Examine<DefCtorPresent>(c8, lst);\n}\n\nstruct transparent_key_equality {\ntemplate <typename T>\n    bool operator()(const T&, const T&) const {\n        return true;\n    }\n    using is_transparent = void;\n};\n\nstruct hasher_with_transparent_key_equal {\ntemplate <typename T>\n    std::size_t operator()(const T&) {\n        return 0;\n    }\n    using transparent_key_equal = transparent_key_equality;\n};\n\ntemplate <template <typename...> class Container, typename... Args>\nvoid check_heterogeneous_functions_key_int() {\n    check_heterogeneous_functions_key_int_impl<Container<Args..., hash_with_transparent_key_equal>>();\n}\n\ntemplate <template <typename...> class Container, typename... Args>\nvoid check_heterogeneous_functions_key_string() {\n    check_heterogeneous_functions_key_string_impl<Container<Args..., hash_with_transparent_key_equal>>();\n}\n\ntemplate <typename Container>\nvoid test_comparisons_basic() {\n    using comparisons_testing::testEqualityComparisons;\n    Container c1, c2;\n    testEqualityComparisons</*ExpectEqual = */true>(c1, c2);\n\n    c1.insert(Value<Container>::make(1));\n    testEqualityComparisons</*ExpectEqual = */false>(c1, c2);\n\n    c2.insert(Value<Container>::make(1));\n    testEqualityComparisons</*ExpectEqual = */true>(c1, c2);\n\n    c2.insert(Value<Container>::make(2));\n    testEqualityComparisons</*ExpectEqual = */false>(c1, c2);\n\n    c1.clear();\n    c2.clear();\n    testEqualityComparisons</*ExpectEqual = */true>(c1, c2);\n}\n\ntemplate <typename TwoWayComparableContainerType>\nvoid test_two_way_comparable_container() {\n    TwoWayComparableContainerType c1, c2;\n    c1.insert(Value<TwoWayComparableContainerType>::make(1));\n    c2.insert(Value<TwoWayComparableContainerType>::make(1));\n    comparisons_testing::TwoWayComparable::reset();\n    REQUIRE_MESSAGE(c1 == c2, \"Incorrect operator == result\");\n    comparisons_testing::check_equality_comparison();\n    REQUIRE_MESSAGE(!(c1 != c2), \"Incorrect operator != result\");\n    comparisons_testing::check_equality_comparison();\n}\n\ntemplate <template <typename...> class ContainerType>\nvoid test_map_comparisons() {\n    using integral_container = ContainerType<int, int>;\n    using two_way_comparable_container = ContainerType<comparisons_testing::TwoWayComparable,\n                                                       comparisons_testing::TwoWayComparable>;\n    test_comparisons_basic<integral_container>();\n    test_comparisons_basic<two_way_comparable_container>();\n    test_two_way_comparable_container<two_way_comparable_container>();\n}\n\ntemplate <template <typename...> class ContainerType>\nvoid test_set_comparisons() {\n    using integral_container = ContainerType<int>;\n    using two_way_comparable_container = ContainerType<comparisons_testing::TwoWayComparable>;\n\n    test_comparisons_basic<integral_container>();\n    test_comparisons_basic<two_way_comparable_container>();\n    test_two_way_comparable_container<two_way_comparable_container>();\n}\n\ntemplate <typename Container>\nvoid test_reserve_regression() {\n    Container container;\n\n    float lf = container.max_load_factor();\n    std::size_t buckets = container.unsafe_bucket_count();\n    std::size_t capacity = std::size_t(buckets * lf);\n\n    for (std::size_t elements = 0; elements < capacity; ++elements) {\n        container.reserve(elements);\n        REQUIRE_MESSAGE(container.unsafe_bucket_count() == buckets,\n                        \"reserve() should not increase bucket count if the capacity is not reached\");\n    }\n\n    container.reserve(capacity * 2);\n    REQUIRE_MESSAGE(container.unsafe_bucket_count() > buckets, \"reserve() should increase bucket count if the capacity is reached\");\n}\n\n#endif // __TBB_test_common_concurrent_unordered_common\n"
  },
  {
    "path": "third-party/tbb/test/common/config.h",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_config_H\n#define __TBB_test_common_config_H\n\n#if __TBB_CPF_BUILD\n#ifndef  TBB_PREVIEW_FLOW_GRAPH_FEATURES\n#define TBB_PREVIEW_FLOW_GRAPH_FEATURES 1\n#endif\n#ifndef TBB_PREVIEW_ALGORITHM_TRACE\n#define TBB_PREVIEW_ALGORITHM_TRACE 1\n#endif\n#ifndef TBB_DEPRECATED_LIMITER_NODE_CONSTRUCTOR\n#define TBB_DEPRECATED_LIMITER_NODE_CONSTRUCTOR 1\n#endif\n#ifndef TBB_PREVIEW_TASK_GROUP_EXTENSIONS\n#define TBB_PREVIEW_TASK_GROUP_EXTENSIONS 1\n#endif\n#ifndef TBB_PREVIEW_CONCURRENT_LRU_CACHE\n#define TBB_PREVIEW_CONCURRENT_LRU_CACHE 1\n#endif\n#ifndef TBB_PREVIEW_VARIADIC_PARALLEL_INVOKE\n#define TBB_PREVIEW_VARIADIC_PARALLEL_INVOKE 1\n#endif\n#ifndef TBB_PREVIEW_ISOLATED_TASK_GROUP\n#define TBB_PREVIEW_ISOLATED_TASK_GROUP 1\n#endif\n#ifndef TBB_PREVIEW_PARALLEL_PHASE\n#define TBB_PREVIEW_PARALLEL_PHASE 1\n#endif\n#ifndef TBB_PREVIEW_BLOCKED_ND_RANGE_DEDUCTION_GUIDES\n#define TBB_PREVIEW_BLOCKED_ND_RANGE_DEDUCTION_GUIDES 1\n#endif\n#endif\n\n#include \"oneapi/tbb/detail/_config.h\"\n#if __FreeBSD__\n#include <sys/param.h>  // for __FreeBSD_version\n#endif\n\n#if __INTEL_COMPILER\n  #define __TBB_CPP14_GENERIC_LAMBDAS_PRESENT (__cplusplus >= 201402L)\n#elif __clang__\n  #define __TBB_CPP14_GENERIC_LAMBDAS_PRESENT (__has_feature(cxx_generic_lambdas))\n#elif __GNUC__\n  #define __TBB_CPP14_GENERIC_LAMBDAS_PRESENT           (__cplusplus >= 201402L)\n  #define __TBB_GCC_WARNING_IGNORED_ATTRIBUTES_PRESENT  (__TBB_GCC_VERSION >= 60100)\n#elif _MSC_VER\n  #define __TBB_CPP14_GENERIC_LAMBDAS_PRESENT (_MSC_VER >= 1922)\n#endif\n\n// The tuple-based tests with more inputs take a long time to compile.  If changes\n// are made to the tuple implementation or any switch that controls it, or if testing\n// with a new platform implementation of std::tuple, the test should be compiled with\n// MAX_TUPLE_TEST_SIZE >= 10 (or the largest number of elements supported) to ensure\n// all tuple sizes are tested.  Expect a very long compile time.\n#ifndef MAX_TUPLE_TEST_SIZE\n    #define MAX_TUPLE_TEST_SIZE 10\n#endif\n\n#if MAX_TUPLE_TEST_SIZE > __TBB_VARIADIC_MAX\n    #undef MAX_TUPLE_TEST_SIZE\n    #define MAX_TUPLE_TEST_SIZE __TBB_VARIADIC_MAX\n#endif\n\nconst unsigned MByte = 1024*1024;\n\n#if (_WIN32 && !__TBB_WIN8UI_SUPPORT) || (__linux__ && !__ANDROID__ && !__bg__) || __FreeBSD_version >= 701000\n#define __TBB_TEST_SKIP_AFFINITY 0\n#else\n#define __TBB_TEST_SKIP_AFFINITY 1\n#endif\n\n#endif /* __TBB_test_common_config_H */\n"
  },
  {
    "path": "third-party/tbb/test/common/container_move_support.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_container_move_support_H\n#define __TBB_test_common_container_move_support_H\n\n#include \"config.h\"\n\n#include <vector>\n#include <memory>\n#include <type_traits>\n#include <algorithm>\n#include \"custom_allocators.h\"\n#include \"state_trackable.h\"\n\nnamespace move_support_tests {\n\nstd::atomic<std::size_t> foo_count;\nstd::size_t max_foo_count = 0;\nstatic constexpr intptr_t initial_bar = 42;\nstatic constexpr std::size_t serial_dead_state = std::size_t(-1);\n\nstruct limit_foo_count_in_scope {\n    std::size_t previous_state;\n    bool active;\n    limit_foo_count_in_scope(std::size_t new_limit, bool an_active = true): previous_state(max_foo_count), active(an_active) {\n        if (active){\n            max_foo_count = new_limit;\n        }\n    }\n    ~limit_foo_count_in_scope(){\n        if (active) {\n            max_foo_count = previous_state;\n        }\n    }\n};\n\ntemplate<typename static_counter_allocator_type>\nstruct limit_allocated_items_in_scope {\n    std::size_t previous_state;\n    bool active;\n    limit_allocated_items_in_scope(std::size_t new_limit, bool an_active = true) : previous_state(static_counter_allocator_type::max_items), active(an_active)  {\n        if (active){\n            static_counter_allocator_type::set_limits(new_limit);\n        }\n    }\n    ~limit_allocated_items_in_scope(){\n        if (active) {\n            static_counter_allocator_type::set_limits(previous_state);\n        }\n    }\n};\n\ntemplate<int line_n>\nstruct track_foo_count {\n    bool active;\n    std::size_t previous_state;\n    track_foo_count(): active(true), previous_state(foo_count) { }\n    ~track_foo_count(){\n        if (active){\n            this->verify_no_undestroyed_foo_left_and_dismiss();\n        }\n    }\n\n    //TODO: ideally in most places this check should be replaced with \"no foo created or destroyed\"\n    //TODO: deactivation of the check seems like a hack\n    void verify_no_undestroyed_foo_left_and_dismiss() {\n        REQUIRE_MESSAGE( foo_count == previous_state, \"Some instances of Foo were not destroyed ?\" );\n        active = false;\n    }\n};\n\ntemplate<typename static_counter_allocator_type>\nstruct track_allocator_memory {\n    using counters_type = typename static_counter_allocator_type::counters_type;\n\n    counters_type previous_state;\n    track_allocator_memory() { static_counter_allocator_type::init_counters(); }\n    ~track_allocator_memory(){verify_no_allocator_memory_leaks();}\n\n    void verify_no_allocator_memory_leaks() const{\n        REQUIRE_MESSAGE( static_counter_allocator_type::items_allocated == static_counter_allocator_type::items_freed, \"memory leak?\" );\n        REQUIRE_MESSAGE( static_counter_allocator_type::allocations == static_counter_allocator_type::frees, \"memory leak?\" );\n    }\n    void save_allocator_counters(){ previous_state = static_counter_allocator_type::counters(); }\n    void verify_no_more_than_x_memory_items_allocated(std::size_t  expected_number_of_items_to_allocate){\n        counters_type now = static_counter_allocator_type::counters();\n        REQUIRE_MESSAGE( (now.items_allocated - previous_state.items_allocated) <= expected_number_of_items_to_allocate, \"More then excepted memory allocated ?\" );\n    }\n};\n#if TBB_USE_EXCEPTIONS\nstruct FooException : std::bad_alloc {\n    virtual const char* what() const noexcept override { return \"out of Foo limit\"; }\n    virtual ~FooException() {}\n};\n#endif\n\nstruct FooLimit {\n    FooLimit() {\n        if (max_foo_count && foo_count >= max_foo_count) {\n            TBB_TEST_THROW(FooException{});\n        }\n    }\n};\n\n// TODO: consider better naming\nclass Foo : FooLimit, public StateTrackable</*allow_zero_initialized = */true> {\nprotected:\n    using state_trackable_type = StateTrackable<true>;\n    intptr_t my_bar;\n    std::size_t my_serial{};\n    std::size_t my_thread_id{};\npublic:\n\n    bool is_valid_or_zero() const {\n        return is_valid() || (state == ZeroInitialized && !my_bar);\n    }\n\n    intptr_t& zero_bar() {\n        CHECK_FAST(is_valid_or_zero());\n        return my_bar;\n    }\n\n    intptr_t zero_bar() const {\n        CHECK_FAST(is_valid_or_zero());\n        return my_bar;\n    }\n\n    intptr_t& bar() {\n        CHECK_FAST(is_valid());\n        return my_bar;\n    }\n\n    intptr_t bar() const {\n        CHECK_FAST(is_valid());\n        return my_bar;\n    }\n\n    void set_serial( std::size_t s ) {\n        my_serial = s;\n    }\n\n    std::size_t get_serial() const {\n        return my_serial;\n    }\n\n    void set_thread_id( std::size_t t ) {\n        my_thread_id = t;\n    }\n\n    std::size_t get_thread_id() const {\n        return my_thread_id;\n    }\n\n    operator intptr_t() const { return bar(); }\n\n    Foo( intptr_t br ) : state_trackable_type(0) {\n        my_bar = br;\n        ++foo_count;\n    }\n\n    Foo() {\n        my_bar = initial_bar;\n        ++foo_count;\n    }\n\n    Foo( const Foo& foo ) : state_trackable_type(foo) {\n        my_bar = foo.my_bar;\n        ++foo_count;\n        my_serial = foo.my_serial;\n        my_thread_id = foo.my_thread_id;\n    }\n\n    Foo( Foo&& foo ) : state_trackable_type(std::move(foo)) {\n        my_bar = foo.my_bar;\n        my_serial = foo.my_serial;\n        my_thread_id = foo.my_thread_id;\n        ++foo_count;\n    }\n\n    ~Foo() {\n        my_bar = ~initial_bar;\n        my_serial = serial_dead_state;\n        my_thread_id = serial_dead_state;\n        if (state != ZeroInitialized) {\n            --foo_count;\n        }\n    }\n\n    Foo& operator=( const Foo& x ) {\n        state_trackable_type::operator=(x);\n        my_bar = x.my_bar;\n        my_serial = x.my_serial;\n        my_thread_id = x.my_thread_id;\n        return *this;\n    }\n\n    Foo& operator=( Foo&& x ) {\n        state_trackable_type::operator=(std::move(x));\n        my_bar = x.my_bar;\n        my_serial = x.my_serial;\n        my_thread_id = x.my_thread_id;\n        x.my_serial = serial_dead_state;\n        x.my_thread_id = serial_dead_state;\n        x.my_bar = -1;\n        return *this;\n    }\n\n    friend bool operator==( const int& lhs, const Foo& rhs ) {\n        CHECK_FAST_MESSAGE(rhs.is_valid_or_zero(), \"Comparing invalid objects\");\n        return lhs == rhs.my_bar;\n    }\n\n    friend bool operator==( const Foo& lhs, const int& rhs ) {\n        CHECK_FAST_MESSAGE(lhs.is_valid_or_zero(), \"Comparing invalid objects\");\n        return lhs.my_bar == rhs;\n    }\n\n    friend bool operator==( const Foo& lhs, const Foo& rhs ) {\n        CHECK_FAST_MESSAGE(lhs.is_valid_or_zero(), \"Comparing invalid objects\");\n        CHECK_FAST_MESSAGE(rhs.is_valid_or_zero(), \"Comparing invalid objects\");\n        return lhs.my_bar == rhs.my_bar;\n    }\n\n    friend bool operator<( const Foo& lhs, const Foo& rhs ) {\n        CHECK_FAST_MESSAGE(lhs.is_valid_or_zero(), \"Comparing invalid objects\");\n        CHECK_FAST_MESSAGE(rhs.is_valid_or_zero(), \"Comparing invalid objects\");\n        return lhs.my_bar < rhs.my_bar;\n    }\n\n    bool is_const() const { return true; }\n    bool is_const() { return false; }\n\nprotected:\n    char reserve[1];\n}; // struct Foo\n\nstruct FooWithAssign : Foo {\n    FooWithAssign() = default;\n    FooWithAssign( intptr_t b ) : Foo(b) {}\n    FooWithAssign( const FooWithAssign& ) = default;\n    FooWithAssign( FooWithAssign&& ) = default;\n\n    FooWithAssign& operator=( const FooWithAssign& f ) {\n        return static_cast<FooWithAssign&>(Foo::operator=(f));\n    }\n\n    FooWithAssign& operator=( FooWithAssign&& f ) {\n        return static_cast<FooWithAssign&>(Foo::operator=(std::move(f)));\n    }\n}; // struct FooWithAssign\n\ntemplate <typename FooIteratorType>\nclass FooIteratorBase {\nprotected:\n    intptr_t x_bar;\nprivate:\n    FooIteratorType& as_derived() { return *static_cast<FooIteratorType*>(this); }\npublic:\n    FooIteratorBase( intptr_t x ) : x_bar(x) {}\n\n    FooIteratorType& operator++() {\n        ++x_bar;\n        return as_derived();\n    }\n\n    FooIteratorType operator++(int) {\n        FooIteratorType tmp(as_derived());\n        ++x_bar;\n        return tmp;\n    }\n\n    friend bool operator==( const FooIteratorType& lhs, const FooIteratorType& rhs ) {\n        return lhs.x_bar == rhs.x_bar;\n    }\n\n    friend bool operator!=( const FooIteratorType& lhs, const FooIteratorType& rhs ) {\n        return !(lhs == rhs);\n    }\n}; // class FooIteratorBase\n\nclass FooIterator : public FooIteratorBase<FooIterator> {\n    using base_type = FooIteratorBase<FooIterator>;\npublic:\n    using iterator_category = std::input_iterator_tag;\n    using value_type = FooWithAssign;\n    using difference_type = std::ptrdiff_t;\n    using pointer = value_type*;\n    using reference = value_type&;\n\n    using base_type::base_type;\n\n    value_type operator*() {\n        return value_type(x_bar);\n    }\n}; // class FooIterator\n\nclass FooPairIterator : public FooIteratorBase<FooPairIterator> {\n    using base_type = FooIteratorBase<FooPairIterator>;\npublic:\n    using iterator_category = std::input_iterator_tag;\n    using value_type = std::pair<FooWithAssign, FooWithAssign>;\n    using difference_type = std::ptrdiff_t;\n    using pointer = value_type*;\n    using reference = value_type&;\n\n    using base_type::base_type;\n\n    value_type operator*() {\n        FooWithAssign foo;\n        foo.bar() = x_bar;\n        return std::make_pair(foo, foo);\n    }\n}; // class FooPairIterator\n\nstruct MemoryLocations {\n    std::vector<const void*> locations;\n\n    template <typename ContainerType>\n    MemoryLocations( const ContainerType& source ) : locations(source.size()) {\n        for (auto it = source.begin(); it != source.end(); ++it) {\n            locations[std::distance(source.begin(), it)] = &*it;\n        }\n    }\n\n    template <typename ContainerType>\n    bool content_location_unchanged( const ContainerType& dst ) {\n        auto is_same_location = []( const typename ContainerType::value_type& v, const void* location ) {\n            return &v == location;\n        };\n\n        return std::equal(dst.begin(), dst.end(), locations.begin(), is_same_location);\n    }\n\n    template <typename ContainerType>\n    bool content_location_changed( const ContainerType& dst ) {\n        auto is_not_same_location = []( const typename ContainerType::value_type& v, const void* location ) {\n            return &v != location;\n        };\n        return std::equal(dst.begin(), dst.end(), locations.begin(), is_not_same_location);\n    }\n}; // struct MemoryLocations\n\ntemplate <typename T, typename POCMA = std::false_type>\nstruct ArenaAllocatorFixture {\n    using allocator_type = ArenaAllocator<T, POCMA>;\n    using arena_data_type = typename allocator_type::arena_data_type;\n\n    std::vector<typename std::aligned_storage<sizeof(T)>::type> storage;\n    arena_data_type arena_data;\n    allocator_type allocator;\n\n    ArenaAllocatorFixture( std::size_t size_to_allocate )\n        : storage(size_to_allocate),\n          arena_data(reinterpret_cast<T*>(&storage.front()), storage.size()),\n          allocator(arena_data) {}\n\n    ArenaAllocatorFixture( const ArenaAllocatorFixture& ) = delete;\n}; // struct ArenaAllocatorFixture\n\ntemplate <typename T, typename POCMA = std::false_type>\nstruct TwoMemoryArenasFixture {\n    using arena_fixture_type = ArenaAllocatorFixture<T, POCMA>;\n    using allocator_type = typename arena_fixture_type::allocator_type;\n\n    arena_fixture_type source_arena_fixture;\n    arena_fixture_type dst_arena_fixture;\n\n    allocator_type& source_allocator;\n    allocator_type& dst_allocator;\n\n    TwoMemoryArenasFixture( std::size_t size_to_allocate )\n        : source_arena_fixture(size_to_allocate),\n          dst_arena_fixture(size_to_allocate),\n          source_allocator(source_arena_fixture.allocator),\n          dst_allocator(dst_arena_fixture.allocator)\n    {\n        REQUIRE_MESSAGE(&(*source_arena_fixture.storage.begin()) != &(*dst_arena_fixture.storage.begin()),\n                        \"source and destination arena instances should use difference memory regions\");\n        REQUIRE_MESSAGE(source_allocator != dst_allocator, \"arenas using difference memory regions should not compare equal\");\n        using Traits_POCMA = typename tbb::detail::allocator_traits<allocator_type>::propagate_on_container_move_assignment;\n        REQUIRE_MESSAGE(POCMA::value == Traits_POCMA::value,\n                        \"POCMA::value should be the same as in allocator_traits\");\n\n        allocator_type source_allocator_copy(source_allocator);\n        allocator_type dst_allocator_copy(dst_allocator);\n        allocator_type source_previous_state(source_allocator);\n\n        REQUIRE_MESSAGE(source_previous_state == source_allocator,\n                        \"Copy of the allocator should compare equal with it's source\");\n        dst_allocator_copy = std::move(source_allocator_copy);\n        REQUIRE_MESSAGE(dst_allocator_copy == source_previous_state,\n                        \"Move initialized allocator should compare equal with it's source before movement\");\n    }\n\n    TwoMemoryArenasFixture( const TwoMemoryArenasFixture& ) = delete;\n\n    void verify_allocator_was_moved( const allocator_type& result_allocator ) {\n        // TODO: add assert that move ctor/assignment was called\n        REQUIRE_MESSAGE(result_allocator == source_allocator, \"allocator was not moved\");\n        REQUIRE_MESSAGE(result_allocator != dst_allocator, \"allocator_was_not_moved\");\n    }\n\n}; // struct TwoMemoryArenasFixture\n\ntemplate <typename ContainerTraits, typename Allocator>\nstruct MoveFixture {\n    using element_type = typename Allocator::value_type;\n    using container_value_type = typename ContainerTraits::template container_value_type<element_type>;\n    using allocator_type = typename tbb::detail::allocator_traits<Allocator>::template rebind_alloc<container_value_type>;\n    using container_type = typename ContainerTraits::template container_type<element_type, allocator_type>;\n    using init_iterator_type = typename ContainerTraits::init_iterator_type;\n\n    static constexpr std::size_t default_container_size = 100;\n    const std::size_t container_size;\n\n    typename std::aligned_storage<sizeof(container_type)>::type source_storage;\n    container_type& source;\n\n    MemoryLocations locations;\n\n    MoveFixture( std::size_t cont_size = default_container_size )\n        : container_size(cont_size),\n          source(ContainerTraits::template construct_container<container_type>(source_storage,\n                                                                               init_iterator_type(0), init_iterator_type(cont_size))),\n          locations(source)\n    {\n        init();\n    }\n\n    MoveFixture( const Allocator& a, std::size_t cont_size = default_container_size )\n        : container_size(cont_size),\n          source(ContainerTraits::template construct_container<container_type>(source_storage, init_iterator_type(0),\n                                                                               init_iterator_type(cont_size), a)),\n          locations(source)\n    {\n        init();\n    }\n\n    MoveFixture( const MoveFixture& ) = delete;\n\n    ~MoveFixture() {\n        reinterpret_cast<container_type*>(&source)->~container_type();\n    }\n\n    void init() {\n        verify_size(source);\n        verify_content_equal_to_source(source);\n        verify_size(locations.locations);\n    }\n\n    bool content_location_unchanged( const container_type& dst ) {\n        return locations.content_location_unchanged(dst);\n    }\n\n    bool content_location_changed( const container_type& dst ) {\n        return locations.content_location_changed(dst);\n    }\n\n    template <typename ContainerType>\n    void verify_size( const ContainerType& dst ) {\n        REQUIRE(container_size == dst.size());\n    }\n\n    void verify_content_equal_to_source( const container_type& dst ) {\n        REQUIRE(ContainerTraits::equal(dst, init_iterator_type(0), init_iterator_type(container_size)));\n    }\n\n    void verify_content_equal_to_source( const container_type& dst, std::size_t number_of_constructed_items ) {\n        REQUIRE(number_of_constructed_items <= dst.size());\n        REQUIRE(std::equal(dst.begin(), dst.begin() + number_of_constructed_items, init_iterator_type(0)));\n    }\n\n    void verify_content_shallow_moved( const container_type& dst ) {\n        verify_size(dst);\n        REQUIRE_MESSAGE(content_location_unchanged(dst), \"Container move ctor actually changed element locations, while should not\");\n        REQUIRE_MESSAGE(source.empty(), \"Moved from container should not contain any elements\");\n        verify_content_equal_to_source(dst);\n    }\n\n    void verify_content_deep_moved( const container_type& dst ) {\n        verify_size(dst);\n        REQUIRE_MESSAGE(content_location_changed(dst), \"Container did not changed element locations for unequal allocators\");\n        REQUIRE_MESSAGE(std::all_of(dst.begin(), dst.end(), is_state_predicate<Foo::MoveInitialized>()),\n                        \"Container did not move construct some elements\");\n        REQUIRE_MESSAGE(std::all_of(source.begin(), source.end(), is_state_predicate<Foo::MovedFrom>()),\n                        \"Container did not move all the elements\");\n        verify_content_equal_to_source(dst);\n    }\n\n    void verify_part_of_content_deep_moved(container_type const& dst, std::size_t number_of_constructed_items){\n        REQUIRE_MESSAGE(content_location_changed(dst), \"Vector actually did not changed element locations for unequal allocators, while should\");\n        REQUIRE_MESSAGE(std::all_of(dst.begin(), dst.begin() + number_of_constructed_items, is_state_predicate<Foo::MoveInitialized>{}), \"Vector did not move construct some elements?\");\n        if (dst.size() != number_of_constructed_items) {\n            REQUIRE_MESSAGE(std::all_of(dst.begin() + number_of_constructed_items, dst.end(), is_state_predicate<Foo::ZeroInitialized>{}), \"Failed to zero-initialize items left not constructed after the exception?\" );\n        }\n        verify_content_equal_to_source(dst, number_of_constructed_items);\n\n        REQUIRE_MESSAGE(std::all_of(source.begin(), source.begin() + number_of_constructed_items, is_state_predicate<Foo::MovedFrom>{}),  \"Vector did not move all the elements?\");\n        REQUIRE_MESSAGE(std::all_of(source.begin() + number_of_constructed_items, source.end(), is_not_state_predicate<Foo::MovedFrom>{}),  \"Vector changed elements in source after exception point?\");\n    }\n}; // struct MoveFixture\n\ntemplate <typename StaticCountingAllocatorType>\nstruct TrackAllocatorMemory {\n    using counters_type = typename StaticCountingAllocatorType::counters_type;\n\n    counters_type previous_state;\n\n    TrackAllocatorMemory() {\n        StaticCountingAllocatorType::init_counters();\n    }\n\n    TrackAllocatorMemory( const TrackAllocatorMemory& ) = delete;\n\n    ~TrackAllocatorMemory() {\n        verify_no_allocator_memory_leaks();\n    }\n\n    void verify_no_allocator_memory_leaks() const {\n        REQUIRE_MESSAGE(StaticCountingAllocatorType::items_allocated == StaticCountingAllocatorType::items_freed, \"Memory leak\");\n        REQUIRE_MESSAGE(StaticCountingAllocatorType::allocations == StaticCountingAllocatorType::frees, \"Memory leak\");\n        REQUIRE_MESSAGE(StaticCountingAllocatorType::items_constructed == StaticCountingAllocatorType::items_destroyed,\n                        \"The number of constructed items is not equal to the number of destroyed items\");\n    }\n\n    void save_allocator_counters() { previous_state = StaticCountingAllocatorType::counters(); }\n\n    void verify_no_more_than_x_memory_items_allocated( std::size_t expected ) {\n        counters_type now = StaticCountingAllocatorType::counters();\n        REQUIRE_MESSAGE((now.items_allocated - previous_state.items_allocated) <= expected,\n                        \"More then expected memory allocated\");\n    }\n}; // struct TrackAllocatorMemory\n\nstruct TrackFooCount {\n    TrackFooCount() : active(true), previous_state(foo_count) {}\n\n    TrackFooCount( const TrackFooCount& ) = delete;\n\n    ~TrackFooCount() {\n        if (active) {\n            verify_no_undestroyed_foo_left_and_dismiss();\n        }\n    }\n\n    void verify_no_undestroyed_foo_left_and_dismiss() {\n        REQUIRE_MESSAGE(foo_count == previous_state, \"Some instances of Foo were not destroyed\");\n        active = false;\n    }\n\n    bool active;\n    std::size_t previous_state;\n}; // struct TrackFooCount\n\ntemplate <typename ContainerTraits, typename POCMA = std::false_type, typename T = FooWithAssign>\nstruct DefaultStatefulFixtureHelper {\n    using allocator_fixture_type = TwoMemoryArenasFixture<T, POCMA>;\n    using allocator_type = StaticSharedCountingAllocator<typename allocator_fixture_type::allocator_type>;\n\n    using move_fixture_type = MoveFixture<ContainerTraits, allocator_type>;\n\n    using leaks_tracker_type = TrackAllocatorMemory<allocator_type>;\n    using foo_leaks_in_test_tracker_type = TrackFooCount;\n\n    struct DefaultStatefulFixture\n        : leaks_tracker_type,\n          allocator_fixture_type,\n          move_fixture_type,\n          foo_leaks_in_test_tracker_type\n    {\n        //TODO: calculate needed size for allocator_fixture_type more accurately\n        //allocate twice more storage to handle case when copy constructor called instead of move one\n        DefaultStatefulFixture()\n            : leaks_tracker_type(),\n              allocator_fixture_type(2 * 4 * move_fixture_type::default_container_size),\n              move_fixture_type(allocator_fixture_type::source_allocator),\n              foo_leaks_in_test_tracker_type()\n        {\n            leaks_tracker_type::save_allocator_counters();\n        }\n\n        void verify_no_more_than_x_memory_items_allocated() {\n            auto n = ContainerTraits::expected_number_of_items_to_allocate_for_steal_move;\n            leaks_tracker_type::verify_no_more_than_x_memory_items_allocated(n);\n        }\n\n        using allocator_type = typename move_fixture_type::container_type::allocator_type;\n    }; // struct DefaultStatefulFixture\n\n    using type = DefaultStatefulFixture;\n}; // struct DefaultStatefulFixtureHelper\n\ntemplate <typename StaticCountingAllocatorType>\nstruct LimitAllocatedItemsInScope {\n    LimitAllocatedItemsInScope( std::size_t limit, bool act = true )\n        : previous_state(StaticCountingAllocatorType::max_items), active(act)\n    {\n        if (active) {\n            StaticCountingAllocatorType::set_limits(limit);\n        }\n    }\n\n    LimitAllocatedItemsInScope( const LimitAllocatedItemsInScope& ) = delete;\n\n    ~LimitAllocatedItemsInScope() {\n        if (active) {\n            StaticCountingAllocatorType::set_limits(previous_state);\n        }\n    }\n\n    std::size_t previous_state;\n    bool active;\n}; // struct LimitAllocatedItemsInScope\n\nstruct LimitFooCountInScope {\n    LimitFooCountInScope( std::size_t limit, bool act = true )\n        : previous_state(max_foo_count), active(act)\n    {\n        if (active) {\n            max_foo_count = limit;\n        }\n    }\n\n    LimitFooCountInScope( const LimitFooCountInScope& ) = delete;\n\n    ~LimitFooCountInScope() {\n        if (active) {\n            max_foo_count = previous_state;\n        }\n    }\n\n    std::size_t previous_state;\n    bool active;\n}; // struct LimitFooCountInScope\n\ntemplate <typename ContainerTraits>\nvoid test_move_ctor_single_argument() {\n    using fixture_type = typename DefaultStatefulFixtureHelper<ContainerTraits>::type;\n    using container_type = typename fixture_type::container_type;\n\n    fixture_type fixture;\n\n    container_type dst(std::move(fixture.source));\n\n    fixture.verify_content_shallow_moved(dst);\n    fixture.verify_allocator_was_moved(dst.get_allocator());\n    fixture.verify_no_more_than_x_memory_items_allocated();\n    fixture.verify_no_undestroyed_foo_left_and_dismiss();\n}\n\ntemplate <typename ContainerTraits>\nvoid test_move_ctor_with_equal_allocator() {\n    using fixture_type = typename DefaultStatefulFixtureHelper<ContainerTraits>::type;\n    using container_type = typename fixture_type::container_type;\n\n    fixture_type fixture;\n\n    container_type dst(std::move(fixture.source), fixture.source.get_allocator());\n\n    fixture.verify_content_shallow_moved(dst);\n    fixture.verify_no_more_than_x_memory_items_allocated();\n    fixture.verify_no_undestroyed_foo_left_and_dismiss();\n}\n\ntemplate <typename ContainerTraits>\nvoid test_move_ctor_with_unequal_allocator() {\n    using fixture_type = typename DefaultStatefulFixtureHelper<ContainerTraits>::type;\n    using container_type = typename fixture_type::container_type;\n\n    fixture_type fixture;\n\n    typename container_type::allocator_type alloc(fixture.dst_allocator);\n    container_type dst(std::move(fixture.source), alloc);\n\n    fixture.verify_content_deep_moved(dst);\n}\n\ntemplate <typename ContainerTraits>\nvoid test_move_assignment_POCMA_true_stateful_allocator() {\n    using fixture_type = typename DefaultStatefulFixtureHelper<ContainerTraits, /*POCMA = */std::true_type>::type;\n    using container_type = typename fixture_type::container_type;\n\n    fixture_type fixture;\n\n    container_type dst(fixture.dst_allocator);\n    dst = std::move(fixture.source);\n\n    fixture.verify_content_shallow_moved(dst);\n    fixture.verify_allocator_was_moved(dst.get_allocator());\n    fixture.verify_no_more_than_x_memory_items_allocated();\n    fixture.verify_no_undestroyed_foo_left_and_dismiss();\n}\n\ntemplate <typename ContainerTraits>\nvoid test_move_assignment_POCMA_true_stateless_allocator() {\n    // POCMA is true for std::allocator since C++14, is_always_equal is true since C++17\n    // Behavior can be unexpected, TODO: consider another allocator type\n    using allocator_type = std::allocator<FooWithAssign>;\n    using fixture_type = MoveFixture<ContainerTraits, allocator_type>;\n    using container_type = typename fixture_type::container_type;\n\n    fixture_type fixture;\n\n    REQUIRE_MESSAGE(fixture.source.get_allocator() == allocator_type(), \"Incorrect test setup: allocator is stateful\");\n\n    container_type dst;\n    dst = std::move(fixture.source);\n\n    fixture.verify_content_shallow_moved(dst);\n}\n\ntemplate <typename ContainerTraits>\nvoid test_move_assignment_POCMA_false_equal_allocator() {\n    using fixture_type = typename DefaultStatefulFixtureHelper<ContainerTraits, /*POCMA = */std::false_type>::type;\n    using container_type = typename fixture_type::container_type;\n\n    fixture_type fixture;\n    container_type dst(fixture.source_allocator);\n    REQUIRE_MESSAGE(fixture.source.get_allocator() == dst.get_allocator(), \"Incorrect test setup: allocators should be equal\");\n\n    fixture.save_allocator_counters();\n\n    dst = std::move(fixture.source);\n\n    fixture.verify_content_shallow_moved(dst);\n    fixture.verify_no_more_than_x_memory_items_allocated();\n    fixture.verify_no_undestroyed_foo_left_and_dismiss();\n}\n\ntemplate <typename ContainerTraits>\nvoid test_move_assignment_POCMA_false_unequal_allocator() {\n    using fixture_type = typename DefaultStatefulFixtureHelper<ContainerTraits, /*POCMA = */std::false_type>::type;\n    using container_type = typename fixture_type::container_type;\n\n    fixture_type fixture;\n\n    container_type dst(fixture.dst_allocator);\n    dst = std::move(fixture.source);\n\n    fixture.verify_content_deep_moved(dst);\n}\n\n#define REQUIRE_THROW_EXCEPTION(expr, exception_type)            \\\n        try {                                                    \\\n            expr;                                                \\\n            REQUIRE_MESSAGE(false, \"Exception should be thrown\");\\\n        } catch (exception_type&) {                              \\\n        } catch (...) {                                          \\\n            REQUIRE_MESSAGE(false, \"Unexpected exception\");      \\\n        }                                                        \\\n\n#if TBB_USE_EXCEPTIONS\ntemplate <typename ContainerTraits>\nvoid test_ex_move_ctor_unequal_allocator_memory_failure() {\n    using fixture_type = typename DefaultStatefulFixtureHelper<ContainerTraits>::type;\n    using container_type = typename fixture_type::container_type;\n    using allocator_type = typename container_type::allocator_type;\n\n    fixture_type fixture;\n\n    std::size_t limit = allocator_type::items_allocated + fixture.container_size / 4;\n    LimitAllocatedItemsInScope<allocator_type> alloc_limit(limit);\n\n    REQUIRE_THROW_EXCEPTION(container_type dst(std::move(fixture.source), fixture.dst_allocator), std::bad_alloc);\n}\n\ntemplate <typename ContainerTraits>\nvoid test_ex_move_ctor_unequal_allocator_element_ctor_failure() {\n    using fixture_type = typename DefaultStatefulFixtureHelper<ContainerTraits>::type;\n    using container_type = typename fixture_type::container_type;\n\n    fixture_type fixture;\n\n    std::size_t limit = foo_count + fixture.container_size / 4;\n    LimitFooCountInScope foo_limit(limit);\n    REQUIRE_THROW_EXCEPTION(container_type dst(std::move(fixture.source), fixture.dst_allocator), FooException);\n}\n\ntemplate <typename ContainerTraits>\nvoid test_ex_move_constructor() {\n    test_ex_move_ctor_unequal_allocator_memory_failure<ContainerTraits>();\n    test_ex_move_ctor_unequal_allocator_element_ctor_failure<ContainerTraits>();\n    // TODO: add test for move assignment exceptions\n}\n#endif\n\ntemplate <typename ContainerTraits>\nvoid test_move_constructor() {\n    test_move_ctor_single_argument<ContainerTraits>();\n    test_move_ctor_with_equal_allocator<ContainerTraits>();\n    test_move_ctor_with_unequal_allocator<ContainerTraits>();\n}\n\ntemplate <typename ContainerTraits>\nvoid test_move_assignment() {\n    test_move_assignment_POCMA_true_stateful_allocator<ContainerTraits>();\n    test_move_assignment_POCMA_true_stateless_allocator<ContainerTraits>();\n    test_move_assignment_POCMA_false_equal_allocator<ContainerTraits>();\n    test_move_assignment_POCMA_false_unequal_allocator<ContainerTraits>();\n}\n\ntemplate<typename container_traits>\nvoid test_constructor_with_move_iterators(){\n    using fixture_type = typename move_support_tests::DefaultStatefulFixtureHelper<container_traits>::type;\n    using container_type = typename fixture_type::container_type;\n\n    fixture_type fixture;\n\n    container_type dst(std::make_move_iterator(fixture.source.begin()), std::make_move_iterator(fixture.source.end()), fixture.dst_allocator);\n\n    fixture.verify_content_deep_moved(dst);\n}\n\ntemplate<typename container_traits>\nvoid test_assign_with_move_iterators(){\n    using fixture_type = typename move_support_tests::DefaultStatefulFixtureHelper<container_traits>::type;\n    using container_type = typename fixture_type::container_type;\n\n    fixture_type fixture;\n\n    container_type dst(fixture.dst_allocator);\n    dst.assign(std::make_move_iterator(fixture.source.begin()), std::make_move_iterator(fixture.source.end()));\n\n    fixture.verify_content_deep_moved(dst);\n}\n\n} // namespace move_support_tests\n\nnamespace std {\ntemplate <>\nstruct hash<move_support_tests::Foo> {\n    std::size_t operator()( const move_support_tests::Foo& f ) const {\n        return std::size_t(f.bar());\n    }\n};\n\ntemplate <>\nstruct hash<move_support_tests::FooWithAssign> {\n    std::size_t operator()( const move_support_tests::FooWithAssign& f ) const {\n        return std::hash<move_support_tests::Foo>{}(f);\n    }\n};\n}\n\n#endif // __TBB_test_common_container_move_support_H\n"
  },
  {
    "path": "third-party/tbb/test/common/containers_common.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_containers_common_H\n#define __TBB_test_common_containers_common_H\n\n#include \"config.h\"\n#include \"custom_allocators.h\"\n\ntemplate <typename ContainerType>\nvoid test_allocator_traits() {\n    using allocator_type = typename ContainerType::allocator_type;\n    using allocator_traits_type = std::allocator_traits<allocator_type>;\n    using pocca_type = typename allocator_traits_type::propagate_on_container_copy_assignment;\n    using pocma_type = typename allocator_traits_type::propagate_on_container_move_assignment;\n    using pocs_type = typename allocator_traits_type::propagate_on_container_swap;\n\n    bool propagated_on_copy = false;\n    bool propagated_on_move = false;\n    bool propagated_on_swap = false;\n    bool selected_on_copy = false;\n\n    allocator_type alloc(propagated_on_copy, propagated_on_move, propagated_on_swap, selected_on_copy);\n\n    ContainerType c1(alloc), c2(c1);\n    REQUIRE_MESSAGE(selected_on_copy, \"select_on_container_copy_construction function was not called\");\n\n    c1 = c2;\n    REQUIRE_MESSAGE(propagated_on_copy == pocca_type::value, \"Unexpected allocator propagation on copy assignment\");\n\n    c2 = std::move(c1);\n    REQUIRE_MESSAGE(propagated_on_move == pocma_type::value, \"Unexpected allocator propagation on move assignment\");\n\n    c1.swap(c2);\n    REQUIRE_MESSAGE(propagated_on_swap == pocs_type::value, \"Unexpected allocator propagation on swap\");\n\n    propagated_on_move = false;\n    propagated_on_swap = false;\n    using std::swap;\n    swap(c1, c2);\n    REQUIRE_MESSAGE(propagated_on_move == false, \"Unexpected allocator propagation on non-member swap\");\n    REQUIRE_MESSAGE(propagated_on_swap == pocs_type::value, \"Unexpected allocator propagation on non-member swap\");\n}\n\nstruct NonMovableObject {\n    NonMovableObject() = default;\n    NonMovableObject( const NonMovableObject& ) = delete;\n    NonMovableObject( NonMovableObject&& ) = delete;\n    NonMovableObject& operator=( const NonMovableObject& ) = delete;\n    NonMovableObject& operator=( NonMovableObject&& ) = delete;\n};\n\nnamespace std {\ntemplate <>\nstruct hash<NonMovableObject> {\n    std::size_t operator()( const NonMovableObject& ) { return 1; }\n};\n}\n\ntemplate <typename ContainerType>\nvoid test_allocator_traits_with_non_movable_value_type() {\n    // Check that if pocma is true, container allows move assignment without per-element move\n    using allocator_type = typename ContainerType::allocator_type;\n    using allocator_traits_type = std::allocator_traits<allocator_type>;\n    using pocma_type = typename allocator_traits_type::propagate_on_container_move_assignment;\n    REQUIRE_MESSAGE(pocma_type::value, \"Allocator POCMA should be true for this test\");\n    allocator_type alloc;\n    ContainerType container1(alloc), container2(alloc);\n    container1 = std::move(container2);\n}\n\ntemplate <typename ContainerType>\nvoid test_is_always_equal() {\n    using allocator_type = typename ContainerType::allocator_type;\n    allocator_type alloc;\n\n    ContainerType container1(alloc), container2(std::move(container1), alloc);\n\n    container1 = std::move(container2);\n\n    container1.swap(container2);\n\n    using std::swap;\n    swap(container1, container2);\n}\n\ntemplate <typename ContainerTraits>\nvoid test_allocator_traits_support() {\n    using container_value_type = typename ContainerTraits::template container_value_type<int>;\n\n    using always_propagating_allocator_type = AlwaysPropagatingAllocator<container_value_type>;\n    using never_propagating_allocator_type = NeverPropagatingAllocator<container_value_type>;\n    using pocma_allocator_type = PocmaAllocator<container_value_type>;\n    using pocca_allocator_type = PoccaAllocator<container_value_type>;\n    using pocs_allocator_type = PocsAllocator<container_value_type>;\n    using always_equal_allocator_type = AlwaysEqualAllocator<container_value_type>;\n\n    using always_container_type = typename ContainerTraits::template container_type<int, always_propagating_allocator_type>;\n    using never_container_type = typename ContainerTraits::template container_type<int, never_propagating_allocator_type>;\n    using pocma_container_type = typename ContainerTraits::template container_type<int, pocma_allocator_type>;\n    using pocca_container_type = typename ContainerTraits::template container_type<int, pocca_allocator_type>;\n    using pocs_container_type = typename ContainerTraits::template container_type<int, pocs_allocator_type>;\n    using always_equal_container_type = typename ContainerTraits::template container_type<int, always_equal_allocator_type>;\n\n    test_allocator_traits<always_container_type>();\n    test_allocator_traits<never_container_type>();\n    test_allocator_traits<pocma_container_type>();\n    test_allocator_traits<pocca_container_type>();\n    test_allocator_traits<pocs_container_type>();\n\n    using container_non_movable_value_type = typename ContainerTraits::template container_value_type<NonMovableObject>;\n    using pocma_allocator_non_movable_value_type = PocmaAllocator<container_non_movable_value_type>;\n    using pocma_container_non_movable_value_type = typename ContainerTraits::template\n                                                   container_type<NonMovableObject, pocma_allocator_non_movable_value_type>;\n    test_allocator_traits_with_non_movable_value_type<pocma_container_non_movable_value_type>();\n    test_is_always_equal<always_equal_container_type>();\n}\n\n#if TBB_USE_EXCEPTIONS\nstruct ThrowOnCopy {\n    static int error_code() { return 8; };\n    static bool is_active;\n    ThrowOnCopy() = default;\n    ThrowOnCopy( const ThrowOnCopy& ) {\n        if (is_active) {\n            throw error_code();\n        }\n    }\n    static void activate() { is_active = true; }\n    static void deactivate() { is_active = false; }\n\n    bool operator<( const ThrowOnCopy& ) const { return true; }\n    bool operator==( const ThrowOnCopy& ) const { return true; }\n}; // struct ThrowOnCopy\n\nbool ThrowOnCopy::is_active = false;\n\n#endif\n\nnamespace std {\ntemplate <typename T>\nstruct hash<std::reference_wrapper<T>> {\n    std::size_t operator()( const std::reference_wrapper<T>& wr ) const {\n        using type = typename std::remove_const<typename std::remove_const<T>::type>::type;\n        return std::hash<type>()(wr.get());\n    }\n};\n\ntemplate <typename T>\nstruct hash<std::weak_ptr<T>> {\n    std::size_t operator()( const std::weak_ptr<T>& wr ) const {\n        return std::hash<T>()(*wr.lock().get());\n    }\n};\n\n#if TBB_USE_EXCEPTIONS\ntemplate <>\nstruct hash<ThrowOnCopy> {\n    std::size_t operator()( const ThrowOnCopy& ) const {\n        return 1;\n    }\n};\n#endif\n\ntemplate <typename T>\nstruct equal_to<std::weak_ptr<T>> {\n    std::size_t operator()( const std::weak_ptr<T>& rhs, const std::weak_ptr<T>& lhs ) const {\n        return *rhs.lock().get() == *lhs.lock().get();\n    }\n};\n\n} // namespace std\n\n#endif // __TBB_test_common_containers_common_H\n"
  },
  {
    "path": "third-party/tbb/test/common/cpu_usertime.h",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_cpu_usertime_H_\n#define __TBB_test_common_cpu_usertime_H_\n\n#include \"config.h\"\n\n#include \"utils_report.h\"\n#include \"utils.h\"\n\n#include \"oneapi/tbb/tick_count.h\"\n\n#include <cstdio>\n\n#if _WIN32\n#include <windows.h>\n#else\n#include <sys/time.h>\n#include <sys/resource.h>\n#endif\n\n//! Return time (in seconds) spent by the current process in user mode.\n/*  Returns 0 if not implemented on platform. */\ninline double GetCPUUserTime() {\n#if __TBB_WIN8UI_SUPPORT\n    return 0;\n#elif _WIN32\n    FILETIME my_times[4];\n    bool status = GetProcessTimes(GetCurrentProcess(), my_times, my_times+1, my_times+2, my_times+3)!=0;\n    CHECK_FAST(status);\n    LARGE_INTEGER usrtime;\n    usrtime.LowPart = my_times[3].dwLowDateTime;\n    usrtime.HighPart = my_times[3].dwHighDateTime;\n    return double(usrtime.QuadPart)*1E-7;\n#else\n    // Generic UNIX, including __APPLE__\n\n    // On Linux, there is no good way to get CPU usage info for the current process:\n    //   getrusage(RUSAGE_SELF, ...) that is used now only returns info for the calling thread;\n    //   getrusage(RUSAGE_CHILDREN, ...) only counts for finished children threads;\n    //   tms_utime and tms_cutime got with times(struct tms*) are equivalent to the above items;\n    //   finally, /proc/self/task/<task_id>/stat doesn't exist on older kernels\n    //      and it isn't quite convenient to read it for every task_id.\n\n    struct rusage resources;\n    bool status = getrusage(RUSAGE_SELF, &resources)==0;\n    CHECK( status );\n    return (double(resources.ru_utime.tv_sec)*1E6 + double(resources.ru_utime.tv_usec))*1E-6;\n#endif\n}\n\n// The resolution of GetCPUUserTime is 10-15 ms or so; waittime should be a few times bigger.\nconst double WAITTIME = 0.1; // in seconds, i.e. 100 ms\nconst double THRESHOLD = WAITTIME/100;\n\ninline void TestCPUUserTime( std::size_t nthreads, std::size_t nactive = 1 ) {\n    // The test will always pass on Linux; read the comments in GetCPUUserTime for details\n    // Also it will not detect spinning issues on systems with only one processing core.\n\n    std::size_t nworkers = nthreads-nactive;\n    if( !nworkers ) return;\n    double lastusrtime = GetCPUUserTime();\n    if( !lastusrtime ) return;\n\n    static double minimal_waittime = WAITTIME,\n                  maximal_waittime = WAITTIME * 10;\n    double usrtime_delta;\n    double waittime_delta;\n    tbb::tick_count stamp = tbb::tick_count::now();\n    // wait for GetCPUUserTime update\n    while ( (usrtime_delta=GetCPUUserTime()-lastusrtime) < THRESHOLD ) {\n        utils::doDummyWork(1000); // do fake work without which user time can stall\n        if ( (waittime_delta = (tbb::tick_count::now()-stamp).seconds()) > maximal_waittime ) {\n            REPORT( \"Warning: %.2f sec elapsed but user mode time is still below its threshold (%g < %g)\\n\",\n                    waittime_delta, usrtime_delta, THRESHOLD );\n            break;\n        }\n    }\n    lastusrtime += usrtime_delta;\n\n    // Wait for workers to go sleep\n    stamp = tbb::tick_count::now();\n    while ( ((waittime_delta=(tbb::tick_count::now()-stamp).seconds()) < minimal_waittime)\n            || ((usrtime_delta=GetCPUUserTime()-lastusrtime) < THRESHOLD) )\n    {\n        utils::doDummyWork(1000); // do fake work without which user time can stall\n        if ( waittime_delta > maximal_waittime ) {\n            REPORT(\"Warning: %.2f sec elapsed but GetCPUUserTime reported only %g sec\\n\", waittime_delta, usrtime_delta );\n            break;\n        }\n    }\n\n    // Test that all workers sleep when no work.\n    while ( nactive>1 && usrtime_delta-nactive*waittime_delta<0 ) {\n        // probably the number of active threads was mispredicted\n        --nactive; ++nworkers;\n    }\n    double avg_worker_usrtime = (usrtime_delta-nactive*waittime_delta)/nworkers;\n\n    if ( avg_worker_usrtime > waittime_delta/2 )\n        CHECK_MESSAGE( false, \"ERROR: \" << nworkers << \" worker threads are spinning; waittime: \" <<  waittime_delta << \"; usrtime: \" << usrtime_delta << \"; avg worker usrtime: \" << avg_worker_usrtime);\n    else {\n        INFO(\"worker threads \" << nworkers << \" ; waittime: \" << waittime_delta << \"; usrtime: \" << usrtime_delta << \" ; avg worker usrtime: \" << avg_worker_usrtime);\n    }\n}\n#endif // __TBB_test_common_cpu_usertime_H_\n"
  },
  {
    "path": "third-party/tbb/test/common/custom_allocators.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_custom_allocators_H\n#define __TBB_test_common_custom_allocators_H\n\n#include \"test.h\"\n#include <oneapi/tbb/detail/_allocator_traits.h>\n#include <memory>\n#include <atomic>\n#include <scoped_allocator>\n\ntemplate <typename CounterType>\nstruct ArenaData {\n    char* const my_buffer;\n    const std::size_t my_size;\n    CounterType my_allocated; // in bytes\n\n    template <typename T>\n    ArenaData( T* buf, std::size_t sz ) noexcept\n        : my_buffer(reinterpret_cast<char*>(buf)),\n          my_size(sz * sizeof(T))\n    {\n        my_allocated = 0;\n    }\n\n    ArenaData& operator=( const ArenaData& ) = delete;\n}; // struct ArenaData\n\ntemplate <typename T, typename POCMA = std::false_type, typename CounterType = std::size_t>\nstruct ArenaAllocator {\n    using arena_data_type = ArenaData<CounterType>;\n\n    arena_data_type* my_data;\n\n    using value_type = T;\n    using propagate_on_container_move_assignment = POCMA;\n\n    template <typename U>\n    struct rebind {\n        using other = ArenaAllocator<U, POCMA, CounterType>;\n    };\n\n    ArenaAllocator() = default;\n    ArenaAllocator( arena_data_type& data ) noexcept : my_data(&data) {}\n\n    template <typename U, typename POCMA2>\n    ArenaAllocator( const ArenaAllocator<U, POCMA2, CounterType>& other ) noexcept\n        : my_data(other.my_data) {}\n\n    friend void swap( ArenaAllocator& lhs, ArenaAllocator& rhs ) {\n        using std::swap;\n        swap(lhs.my_data, rhs.my_data);\n    }\n\n    value_type* address( value_type& x ) const { return &x; }\n    const value_type* address( const value_type& x ) const { return &x; }\n\n    value_type* allocate( std::size_t n ) {\n        std::size_t new_size = (my_data->my_allocated += n * sizeof(T));\n        REQUIRE_MESSAGE(my_data->my_allocated <= my_data->my_size, \"Trying to allocate more than was reserved\");\n        char* result = &(my_data->my_buffer[new_size - n * sizeof(T)]);\n        return reinterpret_cast<value_type*>(result);\n    }\n\n    void deallocate( value_type* ptr, std::size_t n ) {\n        char* p = reinterpret_cast<char*>(ptr);\n        REQUIRE_MESSAGE((p >= my_data->my_buffer && p <= my_data->my_buffer + my_data->my_size),\n                        \"Trying to deallocate pointer not from arena\");\n        REQUIRE_MESSAGE((p + n * sizeof(T) <= my_data->my_buffer + my_data->my_size),\n                        \"Trying to deallocate pointer not from arena\");\n        // utils::suppress_unused_warning(p, n);\n    }\n\n    std::size_t max_size() const noexcept {\n        return my_data->my_size / sizeof(T);\n    }\n}; // class ArenaAllocator\n\ntemplate <typename T, typename U, typename POCMA, typename C>\nbool operator==( const ArenaAllocator<T, POCMA, C>& lhs, const ArenaAllocator<U, POCMA, C>& rhs ) {\n    return lhs.my_data == rhs.my_data;\n}\n\ntemplate <typename T, typename U, typename POCMA, typename C>\nbool operator!=( const ArenaAllocator<T, POCMA, C>& lhs, const ArenaAllocator<U, POCMA, C>& rhs ) {\n    return !(lhs == rhs);\n}\n\ntemplate <typename BaseAllocatorType>\nclass LocalCountingAllocator : public BaseAllocatorType {\n    using base_type = BaseAllocatorType;\n    using base_traits = tbb::detail::allocator_traits<base_type>;\n    using counter_type = std::atomic<std::size_t>;\npublic:\n    using value_type = typename base_type::value_type;\n\n    std::size_t max_items;\n    counter_type items_allocated;\n    counter_type items_freed;\n    counter_type items_constructed;\n    counter_type items_destroyed;\n    counter_type allocations;\n    counter_type frees;\n\n    void set_counters( std::size_t it_allocated, std::size_t it_freed,\n                       std::size_t it_constructed, std::size_t it_destroyed,\n                       std::size_t allocs, std::size_t fres ) {\n        items_allocated = it_allocated; // TODO: may be store\n        items_freed = it_freed;\n        items_constructed = it_constructed;\n        items_destroyed = it_destroyed;\n        allocations = allocs;\n        frees = fres;\n    }\n\n    template <typename Allocator>\n    void set_counters( const Allocator& alloc ) {\n        set_counters(alloc.items_allocated, alloc.items_freed, alloc.items_constructed,\n                     alloc.items_destroyed, alloc.allocations, alloc.frees);\n    }\n\n    void clear_counters() {\n        set_counters(0, 0, 0, 0, 0, 0);\n    }\n\n    template <typename U>\n    struct rebind {\n        using other = LocalCountingAllocator<typename base_traits::template rebind_alloc<U>>;\n    };\n\n    LocalCountingAllocator() : max_items{0} { clear_counters(); }\n\n    LocalCountingAllocator( const LocalCountingAllocator& other )\n        : base_type(other), max_items{other.max_items} { set_counters(other); }\n\n    template <typename U>\n    LocalCountingAllocator( const LocalCountingAllocator<U>& other )\n        : base_type(other), max_items{other.max_items} { set_counters(other); }\n\n    LocalCountingAllocator& operator=( const LocalCountingAllocator& other ) {\n        base_type::operator=(other);\n        max_items = other.max_items;\n        set_counters(other);\n        return *this;\n    }\n\n    value_type* allocate( std::size_t n ) {\n        if (max_items != 0 && items_allocated + n >= max_items) {\n            TBB_TEST_THROW(std::bad_alloc());\n        }\n        value_type* ptr = static_cast<base_type*>(this)->allocate(n);\n        ++allocations;\n        items_allocated += n;\n        return ptr;\n    }\n\n    void deallocate( value_type* ptr, std::size_t n ) {\n        ++frees;\n        items_freed += n;\n        static_cast<base_type*>(this)->deallocate(ptr, n);\n    }\n\n    template <typename U, typename... Args>\n    void construct( U* ptr, Args&&... args ) {\n        base_traits::construct(*this, ptr, std::forward<Args>(args)...);\n        ++items_constructed;\n    }\n\n    template <typename U>\n    void destroy( U* ptr ) {\n        base_traits::destroy(*this, ptr);\n        ++items_destroyed;\n    }\n\n    void set_limits( std::size_t max ) {\n        max_items = max;\n    }\n}; // class LocalCountingAllocator\n\nstruct AllocatorCounters {\n    using counter_type = std::atomic<std::size_t>;\n\n    counter_type items_allocated;\n    counter_type items_freed;\n    counter_type items_constructed;\n    counter_type items_destroyed;\n    counter_type allocations;\n    counter_type frees;\n\n    AllocatorCounters() = default;\n\n    AllocatorCounters( std::size_t it_allocated, std::size_t it_freed, std::size_t it_constructed,\n                       std::size_t it_destroyed, std::size_t allocs, std::size_t fres )\n        : items_allocated(it_allocated), items_freed(it_freed),\n          items_constructed(it_constructed), items_destroyed(it_destroyed),\n          allocations(allocs), frees(fres) {}\n\n    AllocatorCounters( const AllocatorCounters& other )\n        : items_allocated(other.items_allocated.load()),\n          items_freed(other.items_allocated.load()),\n          items_constructed(other.items_constructed.load()),\n          items_destroyed(other.items_destroyed.load()),\n          allocations(other.allocations.load()),\n          frees(other.allocations.load()) {}\n\n    AllocatorCounters& operator=( const AllocatorCounters& other ) {\n        items_allocated.store(other.items_allocated.load());\n        items_freed.store(other.items_freed.load());\n        items_constructed.store(other.items_constructed.load());\n        items_destroyed.store(other.items_destroyed.load());\n        allocations.store(other.allocations.load());\n        frees.store(other.frees.load());\n        return *this;\n    }\n\n    friend bool operator==( const AllocatorCounters& lhs, const AllocatorCounters& rhs ) {\n        return lhs.items_allocated == rhs.items_allocated &&\n               lhs.items_freed == rhs.items_freed &&\n               lhs.items_constructed == rhs.items_constructed &&\n               lhs.items_destroyed == rhs.items_destroyed &&\n               lhs.allocations == rhs.allocations &&\n               lhs.frees == rhs.frees;\n    }\n}; // struct AllocatorCounters\n\ntemplate <typename BaseAllocatorType>\nclass StaticCountingAllocator : public BaseAllocatorType {\n    using base_type = BaseAllocatorType;\n    using base_traits = tbb::detail::allocator_traits<BaseAllocatorType>;\n    using counter_type = std::atomic<std::size_t>;\npublic:\n    using value_type = typename base_type::value_type;\n    using pointer = value_type*;\n    using counters_type = AllocatorCounters;\n\n    static std::size_t max_items;\n    static counter_type items_allocated;\n    static counter_type items_freed;\n    static counter_type items_constructed;\n    static counter_type items_destroyed;\n    static counter_type allocations;\n    static counter_type frees;\n    static bool throwing;\n\n    template <typename U>\n    struct rebind {\n        using other = StaticCountingAllocator<typename base_traits::template rebind_alloc<U>>;\n    };\n\n    StaticCountingAllocator() = default;\n\n    template <typename U>\n    StaticCountingAllocator( const StaticCountingAllocator<U>& other ) : base_type(other) {}\n\n    value_type* allocate( std::size_t n ) {\n        if (max_items != 0 && items_allocated + n >= max_items) {\n            if (throwing) {\n                TBB_TEST_THROW(std::bad_alloc{});\n            }\n            return nullptr;\n        }\n        value_type* ptr = static_cast<base_type*>(this)->allocate(n);\n        ++allocations;\n        items_allocated += n;\n        return ptr;\n    }\n\n    void deallocate(const pointer ptr, const std::size_t n){\n        ++frees;\n        items_freed += n;\n        static_cast<base_type*>(this)->deallocate(ptr, n);\n    }\n\n    template <typename U, typename... Args>\n    void construct( U* ptr, Args&&... args ) {\n        ++items_constructed;\n        base_traits::construct(*this, ptr, std::forward<Args>(args)...);\n    }\n\n    template <typename U>\n    void destroy( U* ptr ) {\n        ++items_destroyed;\n        base_traits::destroy(*this, ptr);\n    }\n\n    static AllocatorCounters counters() {\n        return {items_allocated, items_freed, items_constructed, items_destroyed, allocations, frees};\n    }\n\n    static void init_counters() {\n        items_allocated = 0;\n        items_freed = 0;\n        items_constructed = 0;\n        items_destroyed = 0;\n        allocations = 0;\n        frees = 0;\n    }\n\n    static void set_limits( std::size_t max = 0, bool do_throw = true ) {\n        max_items = max;\n        throwing = do_throw;\n    }\n}; // class StaticCountingAllocator\n\ntemplate <typename T>\nstd::size_t StaticCountingAllocator<T>::max_items;\ntemplate <typename T>\nstd::atomic<std::size_t> StaticCountingAllocator<T>::items_allocated;\ntemplate <typename T>\nstd::atomic<std::size_t> StaticCountingAllocator<T>::items_freed;\ntemplate <typename T>\nstd::atomic<std::size_t> StaticCountingAllocator<T>::items_constructed;\ntemplate <typename T>\nstd::atomic<std::size_t> StaticCountingAllocator<T>::items_destroyed;\ntemplate <typename T>\nstd::atomic<std::size_t> StaticCountingAllocator<T>::allocations;\ntemplate <typename T>\nstd::atomic<std::size_t> StaticCountingAllocator<T>::frees;\ntemplate <typename T>\nbool StaticCountingAllocator<T>::throwing;\n\nstruct StaticSharedCountingAllocatorBase {\n    using counter_type = std::atomic<std::size_t>;\n    using counters_type = AllocatorCounters;\n    static std::size_t max_items;\n    static counter_type items_allocated;\n    static counter_type items_freed;\n    static counter_type items_constructed;\n    static counter_type items_destroyed;\n    static counter_type allocations;\n    static counter_type frees;\n    static bool throwing;\n\n    static counters_type counters() {\n        return { items_allocated.load(), items_freed.load(), items_constructed.load(),\n                 items_destroyed.load(), allocations.load(), frees.load() };\n    }\n\n    static void init_counters() {\n        items_allocated = 0;\n        items_freed = 0;\n        items_constructed = 0;\n        items_destroyed = 0;\n        allocations = 0;\n        frees = 0;\n    }\n\n    static void set_limits( std::size_t max = 0, bool do_throw = true ) {\n        max_items = max;\n        throwing = do_throw;\n    }\n}; // class StaticSharedCountingAllocatorBase\n\nstd::size_t StaticSharedCountingAllocatorBase::max_items;\nstd::atomic<std::size_t> StaticSharedCountingAllocatorBase::items_constructed;\nstd::atomic<std::size_t> StaticSharedCountingAllocatorBase::items_destroyed;\nstd::atomic<std::size_t> StaticSharedCountingAllocatorBase::items_allocated;\nstd::atomic<std::size_t> StaticSharedCountingAllocatorBase::items_freed;\nstd::atomic<std::size_t> StaticSharedCountingAllocatorBase::allocations;\nstd::atomic<std::size_t> StaticSharedCountingAllocatorBase::frees;\nbool StaticSharedCountingAllocatorBase::throwing;\n\ntemplate <typename BaseAllocatorType>\nclass StaticSharedCountingAllocator\n    : public StaticSharedCountingAllocatorBase, public BaseAllocatorType\n{\n    using base_type = StaticSharedCountingAllocatorBase;\n    using alloc_base_type = BaseAllocatorType;\n    using base_traits = tbb::detail::allocator_traits<BaseAllocatorType>;\npublic:\n    using value_type = typename alloc_base_type::value_type;\n    using counters_type = AllocatorCounters;\n\n    template <typename U>\n    struct rebind {\n        using other = StaticSharedCountingAllocator<typename base_traits::template rebind_alloc<U>>;\n    };\n\n    StaticSharedCountingAllocator() = default;\n    StaticSharedCountingAllocator( const StaticSharedCountingAllocator& ) = default;\n    StaticSharedCountingAllocator& operator=( const StaticSharedCountingAllocator& ) = default;\n\n    template <typename U>\n    StaticSharedCountingAllocator( const StaticSharedCountingAllocator<U>& other) : alloc_base_type(other) {}\n\n    // Constructor from the base allocator with any type\n    template <typename Alloc>\n    StaticSharedCountingAllocator( const Alloc& src ) noexcept\n        : alloc_base_type(src) {}\n\n    value_type* allocate( std::size_t n ) {\n        if (base_type::max_items != 0 &&\n            base_type::items_allocated + n >= base_type::max_items) {\n            if (base_type::throwing) {\n                TBB_TEST_THROW(std::bad_alloc());\n            }\n            return nullptr;\n        }\n        ++base_type::allocations;\n        base_type::items_allocated += n;\n        return static_cast<alloc_base_type*>(this)->allocate(n);\n    }\n\n    void deallocate( value_type* ptr, std::size_t n ) {\n        ++base_type::frees;\n        base_type::items_freed += n;\n        static_cast<alloc_base_type*>(this)->deallocate(ptr, n);\n    }\n\n    template <typename U, typename... Args>\n    void construct( U* ptr, Args&&... args ) {\n        base_traits::construct(*this, ptr, std::forward<Args>(args)...);\n        ++base_type::items_constructed;\n    }\n\n    template <typename U>\n    void destroy( U* ptr ) {\n        base_traits::destroy(*this, ptr);\n        ++base_type::items_destroyed;\n    }\n}; // class StaticSharedCountingAllocator\n\ntemplate <typename Allocator>\nclass AllocatorAwareData {\npublic:\n    static bool assert_on_constructions;\n    using allocator_type = Allocator;\n\n    AllocatorAwareData( const allocator_type& allocator = allocator_type() )\n        : my_allocator(allocator), my_value(0) {}\n\n    AllocatorAwareData( int v, const allocator_type& allocator = allocator_type() )\n        : my_allocator(allocator), my_value(v) {}\n\n    AllocatorAwareData( const AllocatorAwareData& rhs )\n        : my_allocator(rhs.my_allocator), my_value(rhs.my_value)\n    {\n        REQUIRE_MESSAGE(!assert_on_constructions, \"Allocator should propagate to the data during copy construction\");\n    }\n\n    AllocatorAwareData( AllocatorAwareData&& rhs)\n        : my_allocator(rhs.my_allocator), my_value(rhs.my_value)\n    {\n        REQUIRE_MESSAGE(!assert_on_constructions, \"Allocator should propagate to the data during move construction\");\n    }\n\n    AllocatorAwareData( const AllocatorAwareData& rhs, const allocator_type& allocator )\n        : my_allocator(allocator), my_value(rhs.my_value) {}\n\n    AllocatorAwareData( AllocatorAwareData&& rhs, const allocator_type& allocator )\n        : my_allocator(allocator), my_value(rhs.my_value) {}\n\n    AllocatorAwareData& operator=( const AllocatorAwareData& other ) {\n        my_value = other.my_value;\n        return *this;\n    }\n\n    int value() const { return my_value; }\n\n    static void activate() { assert_on_constructions = true; }\n    static void deactivate() { assert_on_constructions = false; }\nprivate:\n    allocator_type my_allocator;\n    int my_value;\n}; // class AllocatorAwareData\n\ntemplate <typename Allocator>\nbool AllocatorAwareData<Allocator>::assert_on_constructions = false;\n\ntemplate <typename Allocator>\nbool operator==( const AllocatorAwareData<Allocator>& lhs, const AllocatorAwareData<Allocator>& rhs ) {\n    return lhs.value() == rhs.value();\n}\n\ntemplate <typename Allocator>\nbool operator<( const AllocatorAwareData<Allocator>& lhs, const AllocatorAwareData<Allocator>& rhs ) {\n    return lhs.value() < rhs.value();\n}\n\nnamespace std {\ntemplate <typename Allocator>\nstruct hash<AllocatorAwareData<Allocator>> {\n    std::size_t operator()(const AllocatorAwareData<Allocator>& obj) const {\n        return std::hash<int>()(obj.value());\n    }\n};\n}\n\ntemplate <typename Allocator, typename POCMA = std::false_type, typename POCCA = std::false_type,\n          typename POCS = std::false_type>\nstruct PropagatingAllocator : Allocator {\n    using base_allocator_traits = std::allocator_traits<Allocator>;\n    using propagate_on_container_copy_assignment = POCCA;\n    using propagate_on_container_move_assignment = POCMA;\n    using propagate_on_container_swap = POCS;\n    bool* propagated_on_copy_assignment;\n    bool* propagated_on_move_assignment;\n    bool* propagated_on_swap;\n    bool* selected_on_copy_construction;\n\n    template <typename U>\n    struct rebind {\n        using other = PropagatingAllocator<typename base_allocator_traits::template rebind_alloc<U>,\n                                           POCMA, POCCA, POCS>;\n    };\n\n    PropagatingAllocator()\n        : propagated_on_copy_assignment(nullptr),\n          propagated_on_move_assignment(nullptr),\n          propagated_on_swap(nullptr),\n          selected_on_copy_construction(nullptr) {}\n\n    PropagatingAllocator( bool& poca, bool& poma, bool& pos, bool& soc )\n        : propagated_on_copy_assignment(&poca),\n          propagated_on_move_assignment(&poma),\n          propagated_on_swap(&pos),\n          selected_on_copy_construction(&soc) {}\n\n    PropagatingAllocator( const PropagatingAllocator& other )\n        : Allocator(other),\n          propagated_on_copy_assignment(other.propagated_on_copy_assignment),\n          propagated_on_move_assignment(other.propagated_on_move_assignment),\n          propagated_on_swap(other.propagated_on_swap),\n          selected_on_copy_construction(other.selected_on_copy_construction) {}\n\n    template <typename Allocator2>\n    PropagatingAllocator( const PropagatingAllocator<Allocator2, POCMA, POCCA, POCS>& other )\n        : Allocator(other),\n          propagated_on_copy_assignment(other.propagated_on_copy_assignment),\n          propagated_on_move_assignment(other.propagated_on_move_assignment),\n          propagated_on_swap(other.propagated_on_swap),\n          selected_on_copy_construction(other.selected_on_copy_construction) {}\n\n    PropagatingAllocator& operator=( const PropagatingAllocator& ) {\n        REQUIRE_MESSAGE(POCCA::value, \"Allocator should not copy assign if POCCA is false\");\n        if (propagated_on_copy_assignment)\n            *propagated_on_copy_assignment = true;\n        return *this;\n    }\n\n    PropagatingAllocator& operator=( PropagatingAllocator&& ) {\n        REQUIRE_MESSAGE(POCMA::value, \"Allocator should not move assign if POCMA is false\");\n        if (propagated_on_move_assignment)\n            *propagated_on_move_assignment = true;\n        return *this;\n    }\n\n    PropagatingAllocator select_on_container_copy_construction() const {\n        if (selected_on_copy_construction)\n            *selected_on_copy_construction = true;\n        return *this;\n    }\n}; // struct PropagatingAllocator\n\ntemplate <typename Allocator, typename POCMA, typename POCCA, typename POCS>\nvoid swap( PropagatingAllocator<Allocator, POCMA, POCCA, POCS>& lhs,\n           PropagatingAllocator<Allocator, POCMA, POCCA, POCS>& )\n{\n    REQUIRE_MESSAGE(POCS::value, \"Allocator should not swap if POCS is false\");\n    if (lhs.propagated_on_swap)\n        *lhs.propagated_on_swap = true;\n}\n\ntemplate <typename T>\nusing AlwaysPropagatingAllocator = PropagatingAllocator<std::allocator<T>, /*POCMA = */std::true_type,\n                                                        /*POCCA = */std::true_type, /*POCS = */std::true_type>;\ntemplate <typename T>\nusing NeverPropagatingAllocator = PropagatingAllocator<std::allocator<T>>;\ntemplate <typename T>\nusing PocmaAllocator = PropagatingAllocator<std::allocator<T>, /*POCMA = */std::true_type>;\ntemplate <typename T>\nusing PoccaAllocator = PropagatingAllocator<std::allocator<T>, /*POCMA = */std::false_type, /*POCCA = */std::true_type>;\ntemplate <typename T>\nusing PocsAllocator = PropagatingAllocator<std::allocator<T>, /*POCMA = */std::false_type, /*POCCA = */std::false_type,\n                                           /*POCS = */std::true_type>;\n\ntemplate <typename T>\nclass AlwaysEqualAllocator : public std::allocator<T> {\n    using base_allocator = std::allocator<T>;\npublic:\n    using is_always_equal = std::true_type;\n    using value_type = typename base_allocator::value_type;\n    using propagate_on_container_move_assignment = std::false_type;\n\n    template <typename U>\n    struct rebind {\n        using other = AlwaysEqualAllocator<U>;\n    };\n\n    AlwaysEqualAllocator() = default;\n\n    AlwaysEqualAllocator( const AlwaysEqualAllocator& ) = default;\n\n    template <typename U>\n    AlwaysEqualAllocator( const AlwaysEqualAllocator<U>& other )\n        : base_allocator(other) {}\n}; // class AlwaysEqualAllocator\n\ntemplate <typename T>\nclass NotAlwaysEqualAllocator : public std::allocator<T> {\n    using base_allocator = std::allocator<T>;\npublic:\n    using is_always_equal = std::false_type;\n    using value_type = typename base_allocator::value_type;\n    using propagate_on_container_swap = std::false_type;\n\n    template <typename U>\n    struct rebind {\n        using other = NotAlwaysEqualAllocator<U>;\n    };\n\n    NotAlwaysEqualAllocator() = default;\n\n    NotAlwaysEqualAllocator( const NotAlwaysEqualAllocator& ) = default;\n\n    template <typename U>\n    NotAlwaysEqualAllocator( const NotAlwaysEqualAllocator<U>& other )\n        : base_allocator(other) {}\n};\n\ntemplate <typename T>\nbool operator==( const AlwaysEqualAllocator<T>&, const AlwaysEqualAllocator<T>& ) {\n#ifndef __TBB_TEST_SKIP_IS_ALWAYS_EQUAL_CHECK\n    REQUIRE_MESSAGE(false, \"operator== should not be called if is_always_equal is true\");\n#endif\n    return true;\n}\n\n#endif // __TBB_test_common_custom_allocators_H\n"
  },
  {
    "path": "third-party/tbb/test/common/doctest.h",
    "content": "/*\n    Modifications Copyright (c) 2020-2023 Intel Corporation\n    Modifications Licensed under the Apache License, Version 2.0;\n    You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n*/\n\n// ====================================================================== lgtm [cpp/missing-header-guard]\n// == DO NOT MODIFY THIS FILE BY HAND - IT IS AUTO GENERATED BY CMAKE! ==\n// ======================================================================\n//\n// doctest.h - the lightest feature-rich C++ single-header testing framework for unit tests and TDD\n//\n// Copyright (c) 2016-2023 Viktor Kirilov\n//\n// Distributed under the MIT Software License\n// See accompanying file LICENSE.txt or copy at\n// https://opensource.org/licenses/MIT\n//\n// The documentation can be found at the library's page:\n// https://github.com/doctest/doctest/blob/master/doc/markdown/readme.md\n//\n// =================================================================================================\n// =================================================================================================\n// =================================================================================================\n//\n// The library is heavily influenced by Catch - https://github.com/catchorg/Catch2\n// which uses the Boost Software License - Version 1.0\n// see here - https://github.com/catchorg/Catch2/blob/master/LICENSE.txt\n//\n// The concept of subcases (sections in Catch) and expression decomposition are from there.\n// Some parts of the code are taken directly:\n// - stringification - the detection of \"ostream& operator<<(ostream&, const T&)\" and StringMaker<>\n// - the Approx() helper class for floating point comparison\n// - colors in the console\n// - breaking into a debugger\n// - signal / SEH handling\n// - timer\n// - XmlWriter class - thanks to Phil Nash for allowing the direct reuse (AKA copy/paste)\n//\n// The expression decomposing templates are taken from lest - https://github.com/martinmoene/lest\n// which uses the Boost Software License - Version 1.0\n// see here - https://github.com/martinmoene/lest/blob/master/LICENSE.txt\n//\n// =================================================================================================\n// =================================================================================================\n// =================================================================================================\n\n#ifndef DOCTEST_LIBRARY_INCLUDED\n#define DOCTEST_LIBRARY_INCLUDED\n\n// =================================================================================================\n// == VERSION ======================================================================================\n// =================================================================================================\n\n#define DOCTEST_VERSION_MAJOR 2\n#define DOCTEST_VERSION_MINOR 4\n#define DOCTEST_VERSION_PATCH 11\n\n// util we need here\n#define DOCTEST_TOSTR_IMPL(x) #x\n#define DOCTEST_TOSTR(x) DOCTEST_TOSTR_IMPL(x)\n\n#define DOCTEST_VERSION_STR                                                                        \\\n    DOCTEST_TOSTR(DOCTEST_VERSION_MAJOR) \".\"                                                       \\\n    DOCTEST_TOSTR(DOCTEST_VERSION_MINOR) \".\"                                                       \\\n    DOCTEST_TOSTR(DOCTEST_VERSION_PATCH)\n\n#define DOCTEST_VERSION                                                                            \\\n    (DOCTEST_VERSION_MAJOR * 10000 + DOCTEST_VERSION_MINOR * 100 + DOCTEST_VERSION_PATCH)\n\n// =================================================================================================\n// == COMPILER VERSION =============================================================================\n// =================================================================================================\n\n// ideas for the version stuff are taken from here: https://github.com/cxxstuff/cxx_detect\n\n#ifdef _MSC_VER\n#define DOCTEST_CPLUSPLUS _MSVC_LANG\n#else\n#define DOCTEST_CPLUSPLUS __cplusplus\n#endif\n\n#define DOCTEST_COMPILER(MAJOR, MINOR, PATCH) ((MAJOR)*10000000 + (MINOR)*100000 + (PATCH))\n\n// GCC/Clang and GCC/MSVC are mutually exclusive, but Clang/MSVC are not because of clang-cl...\n#if defined(_MSC_VER) && defined(_MSC_FULL_VER)\n#if _MSC_VER == _MSC_FULL_VER / 10000\n#define DOCTEST_MSVC DOCTEST_COMPILER(_MSC_VER / 100, _MSC_VER % 100, _MSC_FULL_VER % 10000)\n#else // MSVC\n#define DOCTEST_MSVC                                                                               \\\n    DOCTEST_COMPILER(_MSC_VER / 100, (_MSC_FULL_VER / 100000) % 100, _MSC_FULL_VER % 100000)\n#endif // MSVC\n#endif // MSVC\n#if defined(__clang__) && defined(__clang_minor__) && defined(__clang_patchlevel__)\n#define DOCTEST_CLANG DOCTEST_COMPILER(__clang_major__, __clang_minor__, __clang_patchlevel__)\n#elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) &&              \\\n        !defined(__INTEL_COMPILER)\n#define DOCTEST_GCC DOCTEST_COMPILER(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)\n#endif // GCC\n#if defined(__INTEL_COMPILER)\n#define DOCTEST_ICC DOCTEST_COMPILER(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0)\n#endif // ICC\n\n#ifndef DOCTEST_MSVC\n#define DOCTEST_MSVC 0\n#endif // DOCTEST_MSVC\n#ifndef DOCTEST_CLANG\n#define DOCTEST_CLANG 0\n#endif // DOCTEST_CLANG\n#ifndef DOCTEST_GCC\n#define DOCTEST_GCC 0\n#endif // DOCTEST_GCC\n#ifndef DOCTEST_ICC\n#define DOCTEST_ICC 0\n#endif // DOCTEST_ICC\n\n// =================================================================================================\n// == COMPILER WARNINGS HELPERS ====================================================================\n// =================================================================================================\n\n#if DOCTEST_CLANG && !DOCTEST_ICC\n#define DOCTEST_PRAGMA_TO_STR(x) _Pragma(#x)\n#define DOCTEST_CLANG_SUPPRESS_WARNING_PUSH _Pragma(\"clang diagnostic push\")\n#define DOCTEST_CLANG_SUPPRESS_WARNING(w) DOCTEST_PRAGMA_TO_STR(clang diagnostic ignored w)\n#define DOCTEST_CLANG_SUPPRESS_WARNING_POP _Pragma(\"clang diagnostic pop\")\n#define DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(w)                                                \\\n    DOCTEST_CLANG_SUPPRESS_WARNING_PUSH DOCTEST_CLANG_SUPPRESS_WARNING(w)\n#else // DOCTEST_CLANG\n#define DOCTEST_CLANG_SUPPRESS_WARNING_PUSH\n#define DOCTEST_CLANG_SUPPRESS_WARNING(w)\n#define DOCTEST_CLANG_SUPPRESS_WARNING_POP\n#define DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(w)\n#endif // DOCTEST_CLANG\n\n#if DOCTEST_GCC\n#define DOCTEST_PRAGMA_TO_STR(x) _Pragma(#x)\n#define DOCTEST_GCC_SUPPRESS_WARNING_PUSH _Pragma(\"GCC diagnostic push\")\n#define DOCTEST_GCC_SUPPRESS_WARNING(w) DOCTEST_PRAGMA_TO_STR(GCC diagnostic ignored w)\n#define DOCTEST_GCC_SUPPRESS_WARNING_POP _Pragma(\"GCC diagnostic pop\")\n#define DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(w)                                                  \\\n    DOCTEST_GCC_SUPPRESS_WARNING_PUSH DOCTEST_GCC_SUPPRESS_WARNING(w)\n#else // DOCTEST_GCC\n#define DOCTEST_GCC_SUPPRESS_WARNING_PUSH\n#define DOCTEST_GCC_SUPPRESS_WARNING(w)\n#define DOCTEST_GCC_SUPPRESS_WARNING_POP\n#define DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(w)\n#endif // DOCTEST_GCC\n\n#if DOCTEST_MSVC\n#define DOCTEST_MSVC_SUPPRESS_WARNING_PUSH __pragma(warning(push))\n#define DOCTEST_MSVC_SUPPRESS_WARNING(w) __pragma(warning(disable : w))\n#define DOCTEST_MSVC_SUPPRESS_WARNING_POP __pragma(warning(pop))\n#define DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(w)                                                 \\\n    DOCTEST_MSVC_SUPPRESS_WARNING_PUSH DOCTEST_MSVC_SUPPRESS_WARNING(w)\n#else // DOCTEST_MSVC\n#define DOCTEST_MSVC_SUPPRESS_WARNING_PUSH\n#define DOCTEST_MSVC_SUPPRESS_WARNING(w)\n#define DOCTEST_MSVC_SUPPRESS_WARNING_POP\n#define DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(w)\n#endif // DOCTEST_MSVC\n\n// =================================================================================================\n// == COMPILER WARNINGS ============================================================================\n// =================================================================================================\n\n// both the header and the implementation suppress all of these,\n// so it only makes sense to aggregate them like so\n#define DOCTEST_SUPPRESS_COMMON_WARNINGS_PUSH                                                      \\\n    DOCTEST_CLANG_SUPPRESS_WARNING_PUSH                                                            \\\n    DOCTEST_CLANG_SUPPRESS_WARNING(\"-Wunknown-pragmas\")                                            \\\n    DOCTEST_CLANG_SUPPRESS_WARNING(\"-Wweak-vtables\")                                               \\\n    DOCTEST_CLANG_SUPPRESS_WARNING(\"-Wpadded\")                                                     \\\n    DOCTEST_CLANG_SUPPRESS_WARNING(\"-Wmissing-prototypes\")                                         \\\n    DOCTEST_CLANG_SUPPRESS_WARNING(\"-Wc++98-compat\")                                               \\\n    DOCTEST_CLANG_SUPPRESS_WARNING(\"-Wc++98-compat-pedantic\")                                      \\\n                                                                                                   \\\n    DOCTEST_GCC_SUPPRESS_WARNING_PUSH                                                              \\\n    DOCTEST_GCC_SUPPRESS_WARNING(\"-Wunknown-pragmas\")                                              \\\n    DOCTEST_GCC_SUPPRESS_WARNING(\"-Wpragmas\")                                                      \\\n    DOCTEST_GCC_SUPPRESS_WARNING(\"-Weffc++\")                                                       \\\n    DOCTEST_GCC_SUPPRESS_WARNING(\"-Wstrict-overflow\")                                              \\\n    DOCTEST_GCC_SUPPRESS_WARNING(\"-Wstrict-aliasing\")                                              \\\n    DOCTEST_GCC_SUPPRESS_WARNING(\"-Wmissing-declarations\")                                         \\\n    DOCTEST_GCC_SUPPRESS_WARNING(\"-Wuseless-cast\")                                                 \\\n    DOCTEST_GCC_SUPPRESS_WARNING(\"-Wnoexcept\")                                                     \\\n                                                                                                   \\\n    DOCTEST_MSVC_SUPPRESS_WARNING_PUSH                                                             \\\n    /* these 4 also disabled globally via cmake: */                                                \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4514) /* unreferenced inline function has been removed */        \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4571) /* SEH related */                                          \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4710) /* function not inlined */                                 \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4711) /* function selected for inline expansion*/                \\\n    /* common ones */                                                                              \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4616) /* invalid compiler warning */                             \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4619) /* invalid compiler warning */                             \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4996) /* The compiler encountered a deprecated declaration */    \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4706) /* assignment within conditional expression */             \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4512) /* 'class' : assignment operator could not be generated */ \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4127) /* conditional expression is constant */                   \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4820) /* padding */                                              \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4625) /* copy constructor was implicitly deleted */              \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4626) /* assignment operator was implicitly deleted */           \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(5027) /* move assignment operator implicitly deleted */          \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(5026) /* move constructor was implicitly deleted */              \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4640) /* construction of local static object not thread-safe */  \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(5045) /* Spectre mitigation for memory load */                   \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(5264) /* 'variable-name': 'const' variable is not used */        \\\n    /* static analysis */                                                                          \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(26439) /* Function may not throw. Declare it 'noexcept' */       \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(26495) /* Always initialize a member variable */                 \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(26451) /* Arithmetic overflow ... */                             \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(26444) /* Avoid unnamed objects with custom ctor and dtor... */  \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(26812) /* Prefer 'enum class' over 'enum' */\n\n#define DOCTEST_SUPPRESS_COMMON_WARNINGS_POP                                                       \\\n    DOCTEST_CLANG_SUPPRESS_WARNING_POP                                                             \\\n    DOCTEST_GCC_SUPPRESS_WARNING_POP                                                               \\\n    DOCTEST_MSVC_SUPPRESS_WARNING_POP\n\nDOCTEST_SUPPRESS_COMMON_WARNINGS_PUSH\n\nDOCTEST_CLANG_SUPPRESS_WARNING_PUSH\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wnon-virtual-dtor\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wdeprecated\")\n\nDOCTEST_GCC_SUPPRESS_WARNING_PUSH\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wctor-dtor-privacy\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wnon-virtual-dtor\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wsign-promo\")\n\nDOCTEST_MSVC_SUPPRESS_WARNING_PUSH\nDOCTEST_MSVC_SUPPRESS_WARNING(4623) // default constructor was implicitly defined as deleted\n\n#define DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN                                 \\\n    DOCTEST_MSVC_SUPPRESS_WARNING_PUSH                                                             \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4548) /* before comma no effect; expected side - effect */       \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4265) /* virtual functions, but destructor is not virtual */     \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4986) /* exception specification does not match previous */      \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4350) /* 'member1' called instead of 'member2' */                \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4668) /* not defined as a preprocessor macro */                  \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4365) /* signed/unsigned mismatch */                             \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4774) /* format string not a string literal */                   \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4820) /* padding */                                              \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4625) /* copy constructor was implicitly deleted */              \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4626) /* assignment operator was implicitly deleted */           \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(5027) /* move assignment operator implicitly deleted */          \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(5026) /* move constructor was implicitly deleted */              \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4623) /* default constructor was implicitly deleted */           \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(5039) /* pointer to pot. throwing function passed to extern C */ \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(5045) /* Spectre mitigation for memory load */                   \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(5105) /* macro producing 'defined' has undefined behavior */     \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4738) /* storing float result in memory, loss of performance */  \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(5262) /* implicit fall-through */\n\n#define DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END DOCTEST_MSVC_SUPPRESS_WARNING_POP\n\n// =================================================================================================\n// == FEATURE DETECTION ============================================================================\n// =================================================================================================\n\n// general compiler feature support table: https://en.cppreference.com/w/cpp/compiler_support\n// MSVC C++11 feature support table: https://msdn.microsoft.com/en-us/library/hh567368.aspx\n// GCC C++11 feature support table: https://gcc.gnu.org/projects/cxx-status.html\n// MSVC version table:\n// https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#Internal_version_numbering\n// MSVC++ 14.3 (17) _MSC_VER == 1930 (Visual Studio 2022)\n// MSVC++ 14.2 (16) _MSC_VER == 1920 (Visual Studio 2019)\n// MSVC++ 14.1 (15) _MSC_VER == 1910 (Visual Studio 2017)\n// MSVC++ 14.0      _MSC_VER == 1900 (Visual Studio 2015)\n// MSVC++ 12.0      _MSC_VER == 1800 (Visual Studio 2013)\n// MSVC++ 11.0      _MSC_VER == 1700 (Visual Studio 2012)\n// MSVC++ 10.0      _MSC_VER == 1600 (Visual Studio 2010)\n// MSVC++ 9.0       _MSC_VER == 1500 (Visual Studio 2008)\n// MSVC++ 8.0       _MSC_VER == 1400 (Visual Studio 2005)\n\n// Universal Windows Platform support\n#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)\n#define DOCTEST_CONFIG_NO_WINDOWS_SEH\n#endif // WINAPI_FAMILY\n#if DOCTEST_MSVC && !defined(DOCTEST_CONFIG_WINDOWS_SEH)\n#define DOCTEST_CONFIG_WINDOWS_SEH\n#endif // MSVC\n#if defined(DOCTEST_CONFIG_NO_WINDOWS_SEH) && defined(DOCTEST_CONFIG_WINDOWS_SEH)\n#undef DOCTEST_CONFIG_WINDOWS_SEH\n#endif // DOCTEST_CONFIG_NO_WINDOWS_SEH\n\n#if !defined(_WIN32) && !defined(__QNX__) && !defined(DOCTEST_CONFIG_POSIX_SIGNALS) &&             \\\n        !defined(__EMSCRIPTEN__) && !defined(__wasi__)\n#define DOCTEST_CONFIG_POSIX_SIGNALS\n#endif // _WIN32\n#if defined(DOCTEST_CONFIG_NO_POSIX_SIGNALS) && defined(DOCTEST_CONFIG_POSIX_SIGNALS)\n#undef DOCTEST_CONFIG_POSIX_SIGNALS\n#endif // DOCTEST_CONFIG_NO_POSIX_SIGNALS\n\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n#if !defined(__cpp_exceptions) && !defined(__EXCEPTIONS) && !defined(_CPPUNWIND)                   \\\n        || defined(__wasi__)\n#define DOCTEST_CONFIG_NO_EXCEPTIONS\n#endif // no exceptions\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n\n#ifdef DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n#define DOCTEST_CONFIG_NO_EXCEPTIONS\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS\n\n#if defined(DOCTEST_CONFIG_NO_EXCEPTIONS) && !defined(DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS)\n#define DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS && !DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS\n\n#ifdef __wasi__\n#define DOCTEST_CONFIG_NO_MULTITHREADING\n#endif\n\n#if defined(DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN) && !defined(DOCTEST_CONFIG_IMPLEMENT)\n#define DOCTEST_CONFIG_IMPLEMENT\n#endif // DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN\n\n#if defined(_WIN32) || defined(__CYGWIN__)\n#if DOCTEST_MSVC\n#define DOCTEST_SYMBOL_EXPORT __declspec(dllexport)\n#define DOCTEST_SYMBOL_IMPORT __declspec(dllimport)\n#else // MSVC\n#define DOCTEST_SYMBOL_EXPORT __attribute__((dllexport))\n#define DOCTEST_SYMBOL_IMPORT __attribute__((dllimport))\n#endif // MSVC\n#else  // _WIN32\n#define DOCTEST_SYMBOL_EXPORT __attribute__((visibility(\"default\")))\n#define DOCTEST_SYMBOL_IMPORT\n#endif // _WIN32\n\n#ifdef DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL\n#ifdef DOCTEST_CONFIG_IMPLEMENT\n#define DOCTEST_INTERFACE DOCTEST_SYMBOL_EXPORT\n#else // DOCTEST_CONFIG_IMPLEMENT\n#define DOCTEST_INTERFACE DOCTEST_SYMBOL_IMPORT\n#endif // DOCTEST_CONFIG_IMPLEMENT\n#else  // DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL\n#define DOCTEST_INTERFACE\n#endif // DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL\n\n// needed for extern template instantiations\n// see https://github.com/fmtlib/fmt/issues/2228\n#if DOCTEST_MSVC\n#define DOCTEST_INTERFACE_DECL\n#define DOCTEST_INTERFACE_DEF DOCTEST_INTERFACE\n#else // DOCTEST_MSVC\n#define DOCTEST_INTERFACE_DECL DOCTEST_INTERFACE\n#define DOCTEST_INTERFACE_DEF\n#endif // DOCTEST_MSVC\n\n#define DOCTEST_EMPTY\n\n#if DOCTEST_MSVC\n#define DOCTEST_NOINLINE __declspec(noinline)\n#define DOCTEST_UNUSED\n#define DOCTEST_ALIGNMENT(x)\n#elif DOCTEST_CLANG && DOCTEST_CLANG < DOCTEST_COMPILER(3, 5, 0)\n#define DOCTEST_NOINLINE\n#define DOCTEST_UNUSED\n#define DOCTEST_ALIGNMENT(x)\n#else\n#define DOCTEST_NOINLINE __attribute__((noinline))\n#define DOCTEST_UNUSED __attribute__((unused))\n#define DOCTEST_ALIGNMENT(x) __attribute__((aligned(x)))\n#endif\n\n// TODO: upstream the change to doctest : Work-around for the warning: 'routine is both \"inline\" and \"noinline\"'\n#if DOCTEST_ICC\n#undef DOCTEST_NOINLINE\n#define DOCTEST_NOINLINE\n#endif // ICC\n\n#ifdef DOCTEST_CONFIG_NO_CONTRADICTING_INLINE\n#define DOCTEST_INLINE_NOINLINE inline\n#else\n#define DOCTEST_INLINE_NOINLINE inline DOCTEST_NOINLINE\n#endif\n\n#ifndef DOCTEST_NORETURN\n#if DOCTEST_MSVC && (DOCTEST_MSVC < DOCTEST_COMPILER(19, 0, 0))\n#define DOCTEST_NORETURN\n#else // DOCTEST_MSVC\n#define DOCTEST_NORETURN [[noreturn]]\n#endif // DOCTEST_MSVC\n#endif // DOCTEST_NORETURN\n\n#ifndef DOCTEST_NOEXCEPT\n#if DOCTEST_MSVC && (DOCTEST_MSVC < DOCTEST_COMPILER(19, 0, 0))\n#define DOCTEST_NOEXCEPT\n#else // DOCTEST_MSVC\n#define DOCTEST_NOEXCEPT noexcept\n#endif // DOCTEST_MSVC\n#endif // DOCTEST_NOEXCEPT\n\n#ifndef DOCTEST_CONSTEXPR\n#if DOCTEST_MSVC && (DOCTEST_MSVC < DOCTEST_COMPILER(19, 0, 0))\n#define DOCTEST_CONSTEXPR const\n#define DOCTEST_CONSTEXPR_FUNC inline\n#else // DOCTEST_MSVC\n#define DOCTEST_CONSTEXPR constexpr\n#define DOCTEST_CONSTEXPR_FUNC constexpr\n#endif // DOCTEST_MSVC\n#endif // DOCTEST_CONSTEXPR\n\n#ifndef DOCTEST_NO_SANITIZE_INTEGER\n// TODO: upstream the change to doctest : Work-around for the error on macOS with icpc: error #1292: unknown attribute \"no_sanitize\"\n#if DOCTEST_CLANG >= DOCTEST_COMPILER(3, 7, 0) && !DOCTEST_ICC\n#define DOCTEST_NO_SANITIZE_INTEGER __attribute__((no_sanitize(\"integer\")))\n#else\n#define DOCTEST_NO_SANITIZE_INTEGER\n#endif\n#endif // DOCTEST_NO_SANITIZE_INTEGER\n\n// =================================================================================================\n// == FEATURE DETECTION END ========================================================================\n// =================================================================================================\n\n#define DOCTEST_DECLARE_INTERFACE(name)                                                            \\\n    virtual ~name();                                                                               \\\n    name() = default;                                                                              \\\n    name(const name&) = delete;                                                                    \\\n    name(name&&) = delete;                                                                         \\\n    name& operator=(const name&) = delete;                                                         \\\n    name& operator=(name&&) = delete;\n\n#define DOCTEST_DEFINE_INTERFACE(name)                                                             \\\n    name::~name() = default;\n\n// internal macros for string concatenation and anonymous variable name generation\n#define DOCTEST_CAT_IMPL(s1, s2) s1##s2\n#define DOCTEST_CAT(s1, s2) DOCTEST_CAT_IMPL(s1, s2)\n#ifdef __COUNTER__ // not standard and may be missing for some compilers\n#define DOCTEST_ANONYMOUS(x) DOCTEST_CAT(x, __COUNTER__)\n#else // __COUNTER__\n#define DOCTEST_ANONYMOUS(x) DOCTEST_CAT(x, __LINE__)\n#endif // __COUNTER__\n\n#ifndef DOCTEST_CONFIG_ASSERTION_PARAMETERS_BY_VALUE\n#define DOCTEST_REF_WRAP(x) x&\n#else // DOCTEST_CONFIG_ASSERTION_PARAMETERS_BY_VALUE\n#define DOCTEST_REF_WRAP(x) x\n#endif // DOCTEST_CONFIG_ASSERTION_PARAMETERS_BY_VALUE\n\n// not using __APPLE__ because... this is how Catch does it\n#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED\n#define DOCTEST_PLATFORM_MAC\n#elif defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n#define DOCTEST_PLATFORM_IPHONE\n#elif defined(_WIN32)\n#define DOCTEST_PLATFORM_WINDOWS\n#elif defined(__wasi__)\n#define DOCTEST_PLATFORM_WASI\n#else // DOCTEST_PLATFORM\n#define DOCTEST_PLATFORM_LINUX\n#endif // DOCTEST_PLATFORM\n\nnamespace doctest { namespace detail {\n    static DOCTEST_CONSTEXPR int consume(const int*, int) noexcept { return 0; }\n}}\n\n#define DOCTEST_GLOBAL_NO_WARNINGS(var, ...)                                                         \\\n    DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Wglobal-constructors\")                                \\\n    static const int var = doctest::detail::consume(&var, __VA_ARGS__);                              \\\n    DOCTEST_CLANG_SUPPRESS_WARNING_POP\n\n#ifndef DOCTEST_BREAK_INTO_DEBUGGER\n// should probably take a look at https://github.com/scottt/debugbreak\n#ifdef DOCTEST_PLATFORM_LINUX\n#if defined(__GNUC__) && (defined(__i386) || defined(__x86_64))\n// Break at the location of the failing check if possible\n#define DOCTEST_BREAK_INTO_DEBUGGER() __asm__(\"int $3\\n\" : :) // NOLINT(hicpp-no-assembler)\n#else\n#include <signal.h>\n#define DOCTEST_BREAK_INTO_DEBUGGER() raise(SIGTRAP)\n#endif\n#elif defined(DOCTEST_PLATFORM_MAC)\n#if defined(__x86_64) || defined(__x86_64__) || defined(__amd64__) || defined(__i386)\n#define DOCTEST_BREAK_INTO_DEBUGGER() __asm__(\"int $3\\n\" : :) // NOLINT(hicpp-no-assembler)\n#elif defined(__ppc__) || defined(__ppc64__)\n// https://www.cocoawithlove.com/2008/03/break-into-debugger.html\n#define DOCTEST_BREAK_INTO_DEBUGGER() __asm__(\"li r0, 20\\nsc\\nnop\\nli r0, 37\\nli r4, 2\\nsc\\nnop\\n\": : : \"memory\",\"r0\",\"r3\",\"r4\") // NOLINT(hicpp-no-assembler)\n#else\n#define DOCTEST_BREAK_INTO_DEBUGGER() __asm__(\"brk #0\"); // NOLINT(hicpp-no-assembler)\n#endif\n#elif DOCTEST_MSVC\n#define DOCTEST_BREAK_INTO_DEBUGGER() __debugbreak()\n#elif defined(__MINGW32__)\nDOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(\"-Wredundant-decls\")\nextern \"C\" __declspec(dllimport) void __stdcall DebugBreak();\nDOCTEST_GCC_SUPPRESS_WARNING_POP\n#define DOCTEST_BREAK_INTO_DEBUGGER() ::DebugBreak()\n#else // linux\n#define DOCTEST_BREAK_INTO_DEBUGGER() (static_cast<void>(0))\n#endif // linux\n#endif // DOCTEST_BREAK_INTO_DEBUGGER\n\n// this is kept here for backwards compatibility since the config option was changed\n#ifdef DOCTEST_CONFIG_USE_IOSFWD\n#ifndef DOCTEST_CONFIG_USE_STD_HEADERS\n#define DOCTEST_CONFIG_USE_STD_HEADERS\n#endif\n#endif // DOCTEST_CONFIG_USE_IOSFWD\n\n// for clang - always include ciso646 (which drags some std stuff) because\n// we want to check if we are using libc++ with the _LIBCPP_VERSION macro in\n// which case we don't want to forward declare stuff from std - for reference:\n// https://github.com/doctest/doctest/issues/126\n// https://github.com/doctest/doctest/issues/356\n#if DOCTEST_CLANG\n#include <ciso646>\n#endif // clang\n\n#ifdef _LIBCPP_VERSION\n#ifndef DOCTEST_CONFIG_USE_STD_HEADERS\n#define DOCTEST_CONFIG_USE_STD_HEADERS\n#endif\n#endif // _LIBCPP_VERSION\n\n#ifdef DOCTEST_CONFIG_USE_STD_HEADERS\n#ifndef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n#define DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\nDOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN\n#include <cstddef>\n#include <ostream>\n#include <istream>\nDOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END\n#else // DOCTEST_CONFIG_USE_STD_HEADERS\n\n// Forward declaring 'X' in namespace std is not permitted by the C++ Standard.\nDOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4643)\n\nnamespace std { // NOLINT(cert-dcl58-cpp)\ntypedef decltype(nullptr) nullptr_t; // NOLINT(modernize-use-using)\ntypedef decltype(sizeof(void*)) size_t; // NOLINT(modernize-use-using)\ntemplate <class charT>\nstruct char_traits;\ntemplate <>\nstruct char_traits<char>;\ntemplate <class charT, class traits>\nclass basic_ostream; // NOLINT(fuchsia-virtual-inheritance)\ntypedef basic_ostream<char, char_traits<char>> ostream; // NOLINT(modernize-use-using)\ntemplate<class traits>\n// NOLINTNEXTLINE\nbasic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, const char*);\ntemplate <class charT, class traits>\nclass basic_istream;\ntypedef basic_istream<char, char_traits<char>> istream; // NOLINT(modernize-use-using)\ntemplate <class... Types>\nclass tuple;\n#if DOCTEST_MSVC >= DOCTEST_COMPILER(19, 20, 0)\n// see this issue on why this is needed: https://github.com/doctest/doctest/issues/183\ntemplate <class Ty>\nclass allocator;\ntemplate <class Elem, class Traits, class Alloc>\nclass basic_string;\nusing string = basic_string<char, char_traits<char>, allocator<char>>;\n#endif // VS 2019\n} // namespace std\n\nDOCTEST_MSVC_SUPPRESS_WARNING_POP\n\n#endif // DOCTEST_CONFIG_USE_STD_HEADERS\n\n#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n#include <type_traits>\n#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n\nnamespace doctest {\n\nusing std::size_t;\n\nDOCTEST_INTERFACE extern bool is_running_in_test;\n\n#ifndef DOCTEST_CONFIG_STRING_SIZE_TYPE\n#define DOCTEST_CONFIG_STRING_SIZE_TYPE unsigned\n#endif\n\n#if DOCTEST_MSVC\n// TODO: upstream the change to doctest :\n// Due to race between exiting the process and starting of a new detached thread in Windows, thread\n// local variables, which constructors or destructors have calls to runtime functions (e.g. free()\n// function) can cause access violation since TBB along with runtime library may have been unloaded\n// by the time these variables are constructed or destroyed. The workaround is do not call constructors\n// and/or destructors for such variables if they are not used.\ntemplate <typename T>\nstruct doctest_thread_local_wrapper {\n    doctest_thread_local_wrapper() {\n        // Default definition is ill-formed in case of non-trivial type T.\n    }\n    T& get() {\n        if( !initialized ) {\n            new(&value) T;\n            initialized = true;\n        }\n        return value;\n    }\n    ~doctest_thread_local_wrapper() {\n        if( initialized )\n            value.~T();\n    }\nprivate:\n    union { T value; };\n    bool initialized = false;\n};\n#else  // DOCTEST_MSVC\ntemplate <typename T>\nstruct doctest_thread_local_wrapper {\n    T& get() { return value; }\nprivate:\n    T value{};\n};\n#endif // DOCTEST_MSVC\n\n// A 24 byte string class (can be as small as 17 for x64 and 13 for x86) that can hold strings with length\n// of up to 23 chars on the stack before going on the heap - the last byte of the buffer is used for:\n// - \"is small\" bit - the highest bit - if \"0\" then it is small - otherwise its \"1\" (128)\n// - if small - capacity left before going on the heap - using the lowest 5 bits\n// - if small - 2 bits are left unused - the second and third highest ones\n// - if small - acts as a null terminator if strlen() is 23 (24 including the null terminator)\n//              and the \"is small\" bit remains \"0\" (\"as well as the capacity left\") so its OK\n// Idea taken from this lecture about the string implementation of facebook/folly - fbstring\n// https://www.youtube.com/watch?v=kPR8h4-qZdk\n// TODO:\n// - optimizations - like not deleting memory unnecessarily in operator= and etc.\n// - resize/reserve/clear\n// - replace\n// - back/front\n// - iterator stuff\n// - find & friends\n// - push_back/pop_back\n// - assign/insert/erase\n// - relational operators as free functions - taking const char* as one of the params\nclass DOCTEST_INTERFACE String\n{\npublic:\n    using size_type = DOCTEST_CONFIG_STRING_SIZE_TYPE;\n\nprivate:\n    static DOCTEST_CONSTEXPR size_type len  = 24;      //!OCLINT avoid private static members\n    static DOCTEST_CONSTEXPR size_type last = len - 1; //!OCLINT avoid private static members\n\n    struct view // len should be more than sizeof(view) - because of the final byte for flags\n    {\n        char*    ptr;\n        size_type size;\n        size_type capacity;\n    };\n\n    union\n    {\n        char buf[len]; // NOLINT(*-avoid-c-arrays)\n        view data;\n    };\n\n    char* allocate(size_type sz);\n\n    bool isOnStack() const noexcept { return (buf[last] & 128) == 0; }\n    void setOnHeap() noexcept;\n    void setLast(size_type in = last) noexcept;\n    void setSize(size_type sz) noexcept;\n\n    void copy(const String& other);\n\npublic:\n    static DOCTEST_CONSTEXPR size_type npos = static_cast<size_type>(-1);\n\n    String() noexcept;\n    ~String();\n\n    // cppcheck-suppress noExplicitConstructor\n    String(const char* in);\n    String(const char* in, size_type in_size);\n\n    String(std::istream& in, size_type in_size);\n\n    String(const String& other);\n    String& operator=(const String& other);\n\n    String& operator+=(const String& other);\n\n    String(String&& other) noexcept;\n    String& operator=(String&& other) noexcept;\n\n    char  operator[](size_type i) const;\n    char& operator[](size_type i);\n\n    // the only functions I'm willing to leave in the interface - available for inlining\n    const char* c_str() const { return const_cast<String*>(this)->c_str(); } // NOLINT\n    char*       c_str() {\n        if (isOnStack()) {\n            return reinterpret_cast<char*>(buf);\n        }\n        return data.ptr;\n    }\n\n    size_type size() const;\n    size_type capacity() const;\n\n    String substr(size_type pos, size_type cnt = npos) &&;\n    String substr(size_type pos, size_type cnt = npos) const &;\n\n    size_type find(char ch, size_type pos = 0) const;\n    size_type rfind(char ch, size_type pos = npos) const;\n\n    int compare(const char* other, bool no_case = false) const;\n    int compare(const String& other, bool no_case = false) const;\n\nfriend DOCTEST_INTERFACE std::ostream& operator<<(std::ostream& s, const String& in);\n};\n\nDOCTEST_INTERFACE String operator+(const String& lhs, const String& rhs);\n\nDOCTEST_INTERFACE bool operator==(const String& lhs, const String& rhs);\nDOCTEST_INTERFACE bool operator!=(const String& lhs, const String& rhs);\nDOCTEST_INTERFACE bool operator<(const String& lhs, const String& rhs);\nDOCTEST_INTERFACE bool operator>(const String& lhs, const String& rhs);\nDOCTEST_INTERFACE bool operator<=(const String& lhs, const String& rhs);\nDOCTEST_INTERFACE bool operator>=(const String& lhs, const String& rhs);\n\nclass DOCTEST_INTERFACE Contains {\npublic:\n    explicit Contains(const String& string);\n\n    bool checkWith(const String& other) const;\n\n    String string;\n};\n\nDOCTEST_INTERFACE String toString(const Contains& in);\n\nDOCTEST_INTERFACE bool operator==(const String& lhs, const Contains& rhs);\nDOCTEST_INTERFACE bool operator==(const Contains& lhs, const String& rhs);\nDOCTEST_INTERFACE bool operator!=(const String& lhs, const Contains& rhs);\nDOCTEST_INTERFACE bool operator!=(const Contains& lhs, const String& rhs);\n\nnamespace Color {\n    enum Enum\n    {\n        None = 0,\n        White,\n        Red,\n        Green,\n        Blue,\n        Cyan,\n        Yellow,\n        Grey,\n\n        Bright = 0x10,\n\n        BrightRed   = Bright | Red,\n        BrightGreen = Bright | Green,\n        LightGrey   = Bright | Grey,\n        BrightWhite = Bright | White\n    };\n\n    DOCTEST_INTERFACE std::ostream& operator<<(std::ostream& s, Color::Enum code);\n} // namespace Color\n\nnamespace assertType {\n    enum Enum\n    {\n        // macro traits\n\n        is_warn    = 1,\n        is_check   = 2 * is_warn,\n        is_require = 2 * is_check,\n\n        is_normal      = 2 * is_require,\n        is_throws      = 2 * is_normal,\n        is_throws_as   = 2 * is_throws,\n        is_throws_with = 2 * is_throws_as,\n        is_nothrow     = 2 * is_throws_with,\n\n        is_false = 2 * is_nothrow,\n        is_unary = 2 * is_false, // not checked anywhere - used just to distinguish the types\n\n        is_eq = 2 * is_unary,\n        is_ne = 2 * is_eq,\n\n        is_lt = 2 * is_ne,\n        is_gt = 2 * is_lt,\n\n        is_ge = 2 * is_gt,\n        is_le = 2 * is_ge,\n\n        // macro types\n\n        DT_WARN    = is_normal | is_warn,\n        DT_CHECK   = is_normal | is_check,\n        DT_REQUIRE = is_normal | is_require,\n\n        DT_WARN_FALSE    = is_normal | is_false | is_warn,\n        DT_CHECK_FALSE   = is_normal | is_false | is_check,\n        DT_REQUIRE_FALSE = is_normal | is_false | is_require,\n\n        DT_WARN_THROWS    = is_throws | is_warn,\n        DT_CHECK_THROWS   = is_throws | is_check,\n        DT_REQUIRE_THROWS = is_throws | is_require,\n\n        DT_WARN_THROWS_AS    = is_throws_as | is_warn,\n        DT_CHECK_THROWS_AS   = is_throws_as | is_check,\n        DT_REQUIRE_THROWS_AS = is_throws_as | is_require,\n\n        DT_WARN_THROWS_WITH    = is_throws_with | is_warn,\n        DT_CHECK_THROWS_WITH   = is_throws_with | is_check,\n        DT_REQUIRE_THROWS_WITH = is_throws_with | is_require,\n\n        DT_WARN_THROWS_WITH_AS    = is_throws_with | is_throws_as | is_warn,\n        DT_CHECK_THROWS_WITH_AS   = is_throws_with | is_throws_as | is_check,\n        DT_REQUIRE_THROWS_WITH_AS = is_throws_with | is_throws_as | is_require,\n\n        DT_WARN_NOTHROW    = is_nothrow | is_warn,\n        DT_CHECK_NOTHROW   = is_nothrow | is_check,\n        DT_REQUIRE_NOTHROW = is_nothrow | is_require,\n\n        DT_WARN_EQ    = is_normal | is_eq | is_warn,\n        DT_CHECK_EQ   = is_normal | is_eq | is_check,\n        DT_REQUIRE_EQ = is_normal | is_eq | is_require,\n\n        DT_WARN_NE    = is_normal | is_ne | is_warn,\n        DT_CHECK_NE   = is_normal | is_ne | is_check,\n        DT_REQUIRE_NE = is_normal | is_ne | is_require,\n\n        DT_WARN_GT    = is_normal | is_gt | is_warn,\n        DT_CHECK_GT   = is_normal | is_gt | is_check,\n        DT_REQUIRE_GT = is_normal | is_gt | is_require,\n\n        DT_WARN_LT    = is_normal | is_lt | is_warn,\n        DT_CHECK_LT   = is_normal | is_lt | is_check,\n        DT_REQUIRE_LT = is_normal | is_lt | is_require,\n\n        DT_WARN_GE    = is_normal | is_ge | is_warn,\n        DT_CHECK_GE   = is_normal | is_ge | is_check,\n        DT_REQUIRE_GE = is_normal | is_ge | is_require,\n\n        DT_WARN_LE    = is_normal | is_le | is_warn,\n        DT_CHECK_LE   = is_normal | is_le | is_check,\n        DT_REQUIRE_LE = is_normal | is_le | is_require,\n\n        DT_WARN_UNARY    = is_normal | is_unary | is_warn,\n        DT_CHECK_UNARY   = is_normal | is_unary | is_check,\n        DT_REQUIRE_UNARY = is_normal | is_unary | is_require,\n\n        DT_WARN_UNARY_FALSE    = is_normal | is_false | is_unary | is_warn,\n        DT_CHECK_UNARY_FALSE   = is_normal | is_false | is_unary | is_check,\n        DT_REQUIRE_UNARY_FALSE = is_normal | is_false | is_unary | is_require,\n    };\n} // namespace assertType\n\nDOCTEST_INTERFACE const char* assertString(assertType::Enum at);\nDOCTEST_INTERFACE const char* failureString(assertType::Enum at);\nDOCTEST_INTERFACE const char* skipPathFromFilename(const char* file);\n\nstruct DOCTEST_INTERFACE TestCaseData\n{\n    String      m_file;       // the file in which the test was registered (using String - see #350)\n    unsigned    m_line;       // the line where the test was registered\n    const char* m_name;       // name of the test case\n    const char* m_test_suite; // the test suite in which the test was added\n    const char* m_description;\n    bool        m_skip;\n    bool        m_no_breaks;\n    bool        m_no_output;\n    bool        m_may_fail;\n    bool        m_should_fail;\n    int         m_expected_failures;\n    double      m_timeout;\n};\n\nstruct DOCTEST_INTERFACE AssertData\n{\n    // common - for all asserts\n    const TestCaseData* m_test_case;\n    assertType::Enum    m_at;\n    const char*         m_file;\n    int                 m_line;\n    const char*         m_expr;\n    bool                m_failed;\n\n    // exception-related - for all asserts\n    bool   m_threw;\n    String m_exception;\n\n    // for normal asserts\n    String m_decomp;\n\n    // for specific exception-related asserts\n    bool           m_threw_as;\n    const char*    m_exception_type;\n\n    class DOCTEST_INTERFACE StringContains {\n        private:\n            Contains content;\n            bool isContains;\n\n        public:\n            StringContains(const String& str) : content(str), isContains(false) { }\n            StringContains(Contains cntn) : content(static_cast<Contains&&>(cntn)), isContains(true) { }\n\n            bool check(const String& str) { return isContains ? (content == str) : (content.string == str); }\n\n            operator const String&() const { return content.string; }\n\n            const char* c_str() const { return content.string.c_str(); }\n    } m_exception_string;\n\n    AssertData(assertType::Enum at, const char* file, int line, const char* expr,\n        const char* exception_type, const StringContains& exception_string);\n};\n\nstruct DOCTEST_INTERFACE MessageData\n{\n    String           m_string;\n    const char*      m_file;\n    int              m_line;\n    assertType::Enum m_severity;\n};\n\nstruct DOCTEST_INTERFACE SubcaseSignature\n{\n    String      m_name;\n    const char* m_file;\n    int         m_line;\n\n    bool operator==(const SubcaseSignature& other) const;\n    bool operator<(const SubcaseSignature& other) const;\n};\n\nstruct DOCTEST_INTERFACE IContextScope\n{\n    DOCTEST_DECLARE_INTERFACE(IContextScope)\n    virtual void stringify(std::ostream*) const = 0;\n};\n\nnamespace detail {\n    struct DOCTEST_INTERFACE TestCase;\n} // namespace detail\n\nstruct ContextOptions //!OCLINT too many fields\n{\n    std::ostream* cout = nullptr; // stdout stream\n    String        binary_name;    // the test binary name\n\n    const detail::TestCase* currentTest = nullptr;\n\n    // == parameters from the command line\n    String   out;       // output filename\n    String   order_by;  // how tests should be ordered\n    unsigned rand_seed; // the seed for rand ordering\n\n    unsigned first; // the first (matching) test to be executed\n    unsigned last;  // the last (matching) test to be executed\n\n    int abort_after;           // stop tests after this many failed assertions\n    int subcase_filter_levels; // apply the subcase filters for the first N levels\n\n    bool success;              // include successful assertions in output\n    bool case_sensitive;       // if filtering should be case sensitive\n    bool exit;                 // if the program should be exited after the tests are ran/whatever\n    bool duration;             // print the time duration of each test case\n    bool minimal;              // minimal console output (only test failures)\n    bool quiet;                // no console output\n    bool no_throw;             // to skip exceptions-related assertion macros\n    bool no_exitcode;          // if the framework should return 0 as the exitcode\n    bool no_run;               // to not run the tests at all (can be done with an \"*\" exclude)\n    bool no_intro;             // to not print the intro of the framework\n    bool no_version;           // to not print the version of the framework\n    bool no_colors;            // if output to the console should be colorized\n    bool force_colors;         // forces the use of colors even when a tty cannot be detected\n    bool no_breaks;            // to not break into the debugger\n    bool no_skip;              // don't skip test cases which are marked to be skipped\n    bool gnu_file_line;        // if line numbers should be surrounded with :x: and not (x):\n    bool no_path_in_filenames; // if the path to files should be removed from the output\n    bool no_line_numbers;      // if source code line numbers should be omitted from the output\n    bool no_debug_output;      // no output in the debug console when a debugger is attached\n    bool no_skipped_summary;   // don't print \"skipped\" in the summary !!! UNDOCUMENTED !!!\n    bool no_time_in_output;    // omit any time/timestamps from output !!! UNDOCUMENTED !!!\n\n    bool help;             // to print the help\n    bool version;          // to print the version\n    bool count;            // if only the count of matching tests is to be retrieved\n    bool list_test_cases;  // to list all tests matching the filters\n    bool list_test_suites; // to list all suites matching the filters\n    bool list_reporters;   // lists all registered reporters\n};\n\nnamespace detail {\n    namespace types {\n#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n        using namespace std;\n#else\n        template <bool COND, typename T = void>\n        struct enable_if { };\n\n        template <typename T>\n        struct enable_if<true, T> { using type = T; };\n\n        struct true_type { static DOCTEST_CONSTEXPR bool value = true; };\n        struct false_type { static DOCTEST_CONSTEXPR bool value = false; };\n\n        template <typename T> struct remove_reference { using type = T; };\n        template <typename T> struct remove_reference<T&> { using type = T; };\n        template <typename T> struct remove_reference<T&&> { using type = T; };\n\n        template <typename T> struct is_rvalue_reference : false_type { };\n        template <typename T> struct is_rvalue_reference<T&&> : true_type { };\n\n        template<typename T> struct remove_const { using type = T; };\n        template <typename T> struct remove_const<const T> { using type = T; };\n\n        // Compiler intrinsics\n        template <typename T> struct is_enum { static DOCTEST_CONSTEXPR bool value = __is_enum(T); };\n        template <typename T> struct underlying_type { using type = __underlying_type(T); };\n\n        template <typename T> struct is_pointer : false_type { };\n        template <typename T> struct is_pointer<T*> : true_type { };\n\n        template <typename T> struct is_array : false_type { };\n        // NOLINTNEXTLINE(*-avoid-c-arrays)\n        template <typename T, size_t SIZE> struct is_array<T[SIZE]> : true_type { };\n#endif\n    }\n\n    // <utility>\n    template <typename T>\n    T&& declval();\n\n    template <class T>\n    DOCTEST_CONSTEXPR_FUNC T&& forward(typename types::remove_reference<T>::type& t) DOCTEST_NOEXCEPT {\n        return static_cast<T&&>(t);\n    }\n\n    template <class T>\n    DOCTEST_CONSTEXPR_FUNC T&& forward(typename types::remove_reference<T>::type&& t) DOCTEST_NOEXCEPT {\n        return static_cast<T&&>(t);\n    }\n\n    template <typename T>\n    struct deferred_false : types::false_type { };\n\n// MSVS 2015 :(\n#if !DOCTEST_CLANG && defined(_MSC_VER) && _MSC_VER <= 1900\n    template <typename T, typename = void>\n    struct has_global_insertion_operator : types::false_type { };\n\n    template <typename T>\n    struct has_global_insertion_operator<T, decltype(::operator<<(declval<std::ostream&>(), declval<const T&>()), void())> : types::true_type { };\n\n    template <typename T, typename = void>\n    struct has_insertion_operator { static DOCTEST_CONSTEXPR bool value = has_global_insertion_operator<T>::value; };\n\n    template <typename T, bool global>\n    struct insert_hack;\n\n    template <typename T>\n    struct insert_hack<T, true> {\n        static void insert(std::ostream& os, const T& t) { ::operator<<(os, t); }\n    };\n\n    template <typename T>\n    struct insert_hack<T, false> {\n        static void insert(std::ostream& os, const T& t) { operator<<(os, t); }\n    };\n\n    template <typename T>\n    using insert_hack_t = insert_hack<T, has_global_insertion_operator<T>::value>;\n#else\n    template <typename T, typename = void>\n    struct has_insertion_operator : types::false_type { };\n#endif\n\n    template <typename T>\n    struct has_insertion_operator<T, decltype(operator<<(declval<std::ostream&>(), declval<const T&>()), void())> : types::true_type { };\n\n    template <typename T>\n    struct should_stringify_as_underlying_type {\n        static DOCTEST_CONSTEXPR bool value = detail::types::is_enum<T>::value && !doctest::detail::has_insertion_operator<T>::value;\n    };\n\n    DOCTEST_INTERFACE std::ostream* tlssPush();\n    DOCTEST_INTERFACE String tlssPop();\n\n    template <bool C>\n    struct StringMakerBase {\n        template <typename T>\n        static String convert(const DOCTEST_REF_WRAP(T)) {\n#ifdef DOCTEST_CONFIG_REQUIRE_STRINGIFICATION_FOR_ALL_USED_TYPES\n            static_assert(deferred_false<T>::value, \"No stringification detected for type T. See string conversion manual\");\n#endif\n            return \"{?}\";\n        }\n    };\n\n    template <typename T>\n    struct filldata;\n\n    template <typename T>\n    void filloss(std::ostream* stream, const T& in) {\n        filldata<T>::fill(stream, in);\n    }\n\n    template <typename T, size_t N>\n    void filloss(std::ostream* stream, const T (&in)[N]) { // NOLINT(*-avoid-c-arrays)\n        // T[N], T(&)[N], T(&&)[N] have same behaviour.\n        // Hence remove reference.\n        filloss<typename types::remove_reference<decltype(in)>::type>(stream, in);\n    }\n\n    template <typename T>\n    String toStream(const T& in) {\n        std::ostream* stream = tlssPush();\n        filloss(stream, in);\n        return tlssPop();\n    }\n\n    template <>\n    struct StringMakerBase<true> {\n        template <typename T>\n        static String convert(const DOCTEST_REF_WRAP(T) in) {\n            return toStream(in);\n        }\n    };\n} // namespace detail\n\ntemplate <typename T>\nstruct StringMaker : public detail::StringMakerBase<\n    detail::has_insertion_operator<T>::value || detail::types::is_pointer<T>::value || detail::types::is_array<T>::value>\n{};\n\n#ifndef DOCTEST_STRINGIFY\n#ifdef DOCTEST_CONFIG_DOUBLE_STRINGIFY\n#define DOCTEST_STRINGIFY(...) toString(toString(__VA_ARGS__))\n#else\n#define DOCTEST_STRINGIFY(...) toString(__VA_ARGS__)\n#endif\n#endif\n\ntemplate <typename T>\nString toString() {\n#if DOCTEST_CLANG == 0 && DOCTEST_GCC == 0 && DOCTEST_ICC == 0\n    String ret = __FUNCSIG__; // class doctest::String __cdecl doctest::toString<TYPE>(void)\n    String::size_type beginPos = ret.find('<');\n    return ret.substr(beginPos + 1, ret.size() - beginPos - static_cast<String::size_type>(sizeof(\">(void)\")));\n#else\n    String ret = __PRETTY_FUNCTION__; // doctest::String toString() [with T = TYPE]\n    String::size_type begin = ret.find('=') + 2;\n    return ret.substr(begin, ret.size() - begin - 1);\n#endif\n}\n\ntemplate <typename T, typename detail::types::enable_if<!detail::should_stringify_as_underlying_type<T>::value, bool>::type = true>\nString toString(const DOCTEST_REF_WRAP(T) value) {\n    return StringMaker<T>::convert(value);\n}\n\n#ifdef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\nDOCTEST_INTERFACE String toString(const char* in);\n#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n\n#if DOCTEST_MSVC >= DOCTEST_COMPILER(19, 20, 0)\n// see this issue on why this is needed: https://github.com/doctest/doctest/issues/183\nDOCTEST_INTERFACE String toString(const std::string& in);\n#endif // VS 2019\n\nDOCTEST_INTERFACE String toString(String in);\n\nDOCTEST_INTERFACE String toString(std::nullptr_t);\n\nDOCTEST_INTERFACE String toString(bool in);\n\nDOCTEST_INTERFACE String toString(float in);\nDOCTEST_INTERFACE String toString(double in);\nDOCTEST_INTERFACE String toString(double long in);\n\nDOCTEST_INTERFACE String toString(char in);\nDOCTEST_INTERFACE String toString(char signed in);\nDOCTEST_INTERFACE String toString(char unsigned in);\nDOCTEST_INTERFACE String toString(short in);\nDOCTEST_INTERFACE String toString(short unsigned in);\nDOCTEST_INTERFACE String toString(signed in);\nDOCTEST_INTERFACE String toString(unsigned in);\nDOCTEST_INTERFACE String toString(long in);\nDOCTEST_INTERFACE String toString(long unsigned in);\nDOCTEST_INTERFACE String toString(long long in);\nDOCTEST_INTERFACE String toString(long long unsigned in);\n\ntemplate <typename T, typename detail::types::enable_if<detail::should_stringify_as_underlying_type<T>::value, bool>::type = true>\nString toString(const DOCTEST_REF_WRAP(T) value) {\n    using UT = typename detail::types::underlying_type<T>::type;\n    return (DOCTEST_STRINGIFY(static_cast<UT>(value)));\n}\n\nnamespace detail {\n    template <typename T>\n    struct filldata\n    {\n        static void fill(std::ostream* stream, const T& in) {\n#if defined(_MSC_VER) && _MSC_VER <= 1900\n        insert_hack_t<T>::insert(*stream, in);\n#else\n        operator<<(*stream, in);\n#endif\n        }\n    };\n\nDOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4866)\n// NOLINTBEGIN(*-avoid-c-arrays)\n    template <typename T, size_t N>\n    struct filldata<T[N]> {\n        static void fill(std::ostream* stream, const T(&in)[N]) {\n            *stream << \"[\";\n            for (size_t i = 0; i < N; i++) {\n                if (i != 0) { *stream << \", \"; }\n                *stream << (DOCTEST_STRINGIFY(in[i]));\n            }\n            *stream << \"]\";\n        }\n    };\n// NOLINTEND(*-avoid-c-arrays)\nDOCTEST_MSVC_SUPPRESS_WARNING_POP\n\n    // Specialized since we don't want the terminating null byte!\n// NOLINTBEGIN(*-avoid-c-arrays)\n    template <size_t N>\n    struct filldata<const char[N]> {\n        static void fill(std::ostream* stream, const char (&in)[N]) {\n            *stream << String(in, in[N - 1] ? N : N - 1);\n        } // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)\n    };\n// NOLINTEND(*-avoid-c-arrays)\n\n    template <>\n    struct filldata<const void*> {\n        static void fill(std::ostream* stream, const void* in);\n    };\n\n    template <typename T>\n    struct filldata<T*> {\nDOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4180)\n        static void fill(std::ostream* stream, const T* in) {\nDOCTEST_MSVC_SUPPRESS_WARNING_POP\nDOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Wmicrosoft-cast\")\n            filldata<const void*>::fill(stream,\n#if DOCTEST_GCC == 0 || DOCTEST_GCC >= DOCTEST_COMPILER(4, 9, 0)\n                reinterpret_cast<const void*>(in)\n#else\n                *reinterpret_cast<const void* const*>(&in)\n#endif\n            );\nDOCTEST_CLANG_SUPPRESS_WARNING_POP\n        }\n    };\n}\n\nstruct DOCTEST_INTERFACE Approx\n{\n    Approx(double value);\n\n    Approx operator()(double value) const;\n\n#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n    template <typename T>\n    explicit Approx(const T& value,\n                    typename detail::types::enable_if<std::is_constructible<double, T>::value>::type* =\n                            static_cast<T*>(nullptr)) {\n        *this = static_cast<double>(value);\n    }\n#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n\n    Approx& epsilon(double newEpsilon);\n\n#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n    template <typename T>\n    typename std::enable_if<std::is_constructible<double, T>::value, Approx&>::type epsilon(\n            const T& newEpsilon) {\n        m_epsilon = static_cast<double>(newEpsilon);\n        return *this;\n    }\n#endif //  DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n\n    Approx& scale(double newScale);\n\n#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n    template <typename T>\n    typename std::enable_if<std::is_constructible<double, T>::value, Approx&>::type scale(\n            const T& newScale) {\n        m_scale = static_cast<double>(newScale);\n        return *this;\n    }\n#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n\n    // clang-format off\n    DOCTEST_INTERFACE friend bool operator==(double lhs, const Approx & rhs);\n    DOCTEST_INTERFACE friend bool operator==(const Approx & lhs, double rhs);\n    DOCTEST_INTERFACE friend bool operator!=(double lhs, const Approx & rhs);\n    DOCTEST_INTERFACE friend bool operator!=(const Approx & lhs, double rhs);\n    DOCTEST_INTERFACE friend bool operator<=(double lhs, const Approx & rhs);\n    DOCTEST_INTERFACE friend bool operator<=(const Approx & lhs, double rhs);\n    DOCTEST_INTERFACE friend bool operator>=(double lhs, const Approx & rhs);\n    DOCTEST_INTERFACE friend bool operator>=(const Approx & lhs, double rhs);\n    DOCTEST_INTERFACE friend bool operator< (double lhs, const Approx & rhs);\n    DOCTEST_INTERFACE friend bool operator< (const Approx & lhs, double rhs);\n    DOCTEST_INTERFACE friend bool operator> (double lhs, const Approx & rhs);\n    DOCTEST_INTERFACE friend bool operator> (const Approx & lhs, double rhs);\n\n#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n#define DOCTEST_APPROX_PREFIX \\\n    template <typename T> friend typename std::enable_if<std::is_constructible<double, T>::value, bool>::type\n\n    DOCTEST_APPROX_PREFIX operator==(const T& lhs, const Approx& rhs) { return operator==(static_cast<double>(lhs), rhs); }\n    DOCTEST_APPROX_PREFIX operator==(const Approx& lhs, const T& rhs) { return operator==(rhs, lhs); }\n    DOCTEST_APPROX_PREFIX operator!=(const T& lhs, const Approx& rhs) { return !operator==(lhs, rhs); }\n    DOCTEST_APPROX_PREFIX operator!=(const Approx& lhs, const T& rhs) { return !operator==(rhs, lhs); }\n    DOCTEST_APPROX_PREFIX operator<=(const T& lhs, const Approx& rhs) { return static_cast<double>(lhs) < rhs.m_value || lhs == rhs; }\n    DOCTEST_APPROX_PREFIX operator<=(const Approx& lhs, const T& rhs) { return lhs.m_value < static_cast<double>(rhs) || lhs == rhs; }\n    DOCTEST_APPROX_PREFIX operator>=(const T& lhs, const Approx& rhs) { return static_cast<double>(lhs) > rhs.m_value || lhs == rhs; }\n    DOCTEST_APPROX_PREFIX operator>=(const Approx& lhs, const T& rhs) { return lhs.m_value > static_cast<double>(rhs) || lhs == rhs; }\n    DOCTEST_APPROX_PREFIX operator< (const T& lhs, const Approx& rhs) { return static_cast<double>(lhs) < rhs.m_value && lhs != rhs; }\n    DOCTEST_APPROX_PREFIX operator< (const Approx& lhs, const T& rhs) { return lhs.m_value < static_cast<double>(rhs) && lhs != rhs; }\n    DOCTEST_APPROX_PREFIX operator> (const T& lhs, const Approx& rhs) { return static_cast<double>(lhs) > rhs.m_value && lhs != rhs; }\n    DOCTEST_APPROX_PREFIX operator> (const Approx& lhs, const T& rhs) { return lhs.m_value > static_cast<double>(rhs) && lhs != rhs; }\n#undef DOCTEST_APPROX_PREFIX\n#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n\n    // clang-format on\n\n    double m_epsilon;\n    double m_scale;\n    double m_value;\n};\n\nDOCTEST_INTERFACE String toString(const Approx& in);\n\nDOCTEST_INTERFACE const ContextOptions* getContextOptions();\n\ntemplate <typename F>\nstruct DOCTEST_INTERFACE_DECL IsNaN\n{\n    F value; bool flipped;\n    IsNaN(F f, bool flip = false) : value(f), flipped(flip) { }\n    IsNaN<F> operator!() const { return { value, !flipped }; }\n    operator bool() const;\n};\n#ifndef __MINGW32__\nextern template struct DOCTEST_INTERFACE_DECL IsNaN<float>;\nextern template struct DOCTEST_INTERFACE_DECL IsNaN<double>;\nextern template struct DOCTEST_INTERFACE_DECL IsNaN<long double>;\n#endif\nDOCTEST_INTERFACE String toString(IsNaN<float> in);\nDOCTEST_INTERFACE String toString(IsNaN<double> in);\nDOCTEST_INTERFACE String toString(IsNaN<double long> in);\n\n#ifndef DOCTEST_CONFIG_DISABLE\n\nnamespace detail {\n    // clang-format off\n#ifdef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n    template<class T>               struct decay_array       { using type = T; };\n    template<class T, unsigned N>   struct decay_array<T[N]> { using type = T*; };\n    template<class T>               struct decay_array<T[]>  { using type = T*; };\n\n    template<class T>   struct not_char_pointer              { static DOCTEST_CONSTEXPR int value = 1; };\n    template<>          struct not_char_pointer<char*>       { static DOCTEST_CONSTEXPR int value = 0; };\n    template<>          struct not_char_pointer<const char*> { static DOCTEST_CONSTEXPR int value = 0; };\n\n    template<class T> struct can_use_op : public not_char_pointer<typename decay_array<T>::type> {};\n#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n    // clang-format on\n\n    struct DOCTEST_INTERFACE TestFailureException\n    {\n    };\n\n    DOCTEST_INTERFACE bool checkIfShouldThrow(assertType::Enum at);\n\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n    DOCTEST_NORETURN\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n    DOCTEST_INTERFACE void throwException();\n\n    struct DOCTEST_INTERFACE Subcase\n    {\n        SubcaseSignature m_signature;\n        bool             m_entered = false;\n\n        Subcase(const String& name, const char* file, int line);\n        Subcase(const Subcase&) = delete;\n        Subcase(Subcase&&) = delete;\n        Subcase& operator=(const Subcase&) = delete;\n        Subcase& operator=(Subcase&&) = delete;\n        ~Subcase();\n\n        operator bool() const;\n\n        private:\n            bool checkFilters();\n    };\n\n    template <typename L, typename R>\n    String stringifyBinaryExpr(const DOCTEST_REF_WRAP(L) lhs, const char* op,\n                               const DOCTEST_REF_WRAP(R) rhs) {\n        return (DOCTEST_STRINGIFY(lhs)) + op + (DOCTEST_STRINGIFY(rhs));\n    }\n\n#if DOCTEST_CLANG && DOCTEST_CLANG < DOCTEST_COMPILER(3, 6, 0)\nDOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Wunused-comparison\")\n#endif\n\n// This will check if there is any way it could find a operator like member or friend and uses it.\n// If not it doesn't find the operator or if the operator at global scope is defined after\n// this template, the template won't be instantiated due to SFINAE. Once the template is not\n// instantiated it can look for global operator using normal conversions.\n#ifdef __NVCC__\n#define SFINAE_OP(ret,op) ret\n#else\n#define SFINAE_OP(ret,op) decltype((void)(doctest::detail::declval<L>() op doctest::detail::declval<R>()),ret{})\n#endif\n\n#define DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(op, op_str, op_macro)                              \\\n    template <typename R>                                                                          \\\n    DOCTEST_NOINLINE SFINAE_OP(Result,op) operator op(R&& rhs) {                                   \\\n    bool res = op_macro(doctest::detail::forward<const L>(lhs), doctest::detail::forward<R>(rhs)); \\\n        if(m_at & assertType::is_false)                                                            \\\n            res = !res;                                                                            \\\n        if(!res || doctest::getContextOptions()->success)                                          \\\n            return Result(res, stringifyBinaryExpr(lhs, op_str, rhs));                             \\\n        return Result(res);                                                                        \\\n    }\n\n    // more checks could be added - like in Catch:\n    // https://github.com/catchorg/Catch2/pull/1480/files\n    // https://github.com/catchorg/Catch2/pull/1481/files\n#define DOCTEST_FORBIT_EXPRESSION(rt, op)                                                          \\\n    template <typename R>                                                                          \\\n    rt& operator op(const R&) {                                                                    \\\n        static_assert(deferred_false<R>::value,                                                    \\\n                      \"Expression Too Complex Please Rewrite As Binary Comparison!\");              \\\n        return *this;                                                                              \\\n    }\n\n    struct DOCTEST_INTERFACE Result // NOLINT(*-member-init)\n    {\n        bool   m_passed;\n        String m_decomp;\n\n        Result() = default; // TODO: Why do we need this? (To remove NOLINT)\n        Result(bool passed, const String& decomposition = String());\n\n        // forbidding some expressions based on this table: https://en.cppreference.com/w/cpp/language/operator_precedence\n        DOCTEST_FORBIT_EXPRESSION(Result, &)\n        DOCTEST_FORBIT_EXPRESSION(Result, ^)\n        DOCTEST_FORBIT_EXPRESSION(Result, |)\n        DOCTEST_FORBIT_EXPRESSION(Result, &&)\n        DOCTEST_FORBIT_EXPRESSION(Result, ||)\n        DOCTEST_FORBIT_EXPRESSION(Result, ==)\n        DOCTEST_FORBIT_EXPRESSION(Result, !=)\n        DOCTEST_FORBIT_EXPRESSION(Result, <)\n        DOCTEST_FORBIT_EXPRESSION(Result, >)\n        DOCTEST_FORBIT_EXPRESSION(Result, <=)\n        DOCTEST_FORBIT_EXPRESSION(Result, >=)\n        DOCTEST_FORBIT_EXPRESSION(Result, =)\n        DOCTEST_FORBIT_EXPRESSION(Result, +=)\n        DOCTEST_FORBIT_EXPRESSION(Result, -=)\n        DOCTEST_FORBIT_EXPRESSION(Result, *=)\n        DOCTEST_FORBIT_EXPRESSION(Result, /=)\n        DOCTEST_FORBIT_EXPRESSION(Result, %=)\n        DOCTEST_FORBIT_EXPRESSION(Result, <<=)\n        DOCTEST_FORBIT_EXPRESSION(Result, >>=)\n        DOCTEST_FORBIT_EXPRESSION(Result, &=)\n        DOCTEST_FORBIT_EXPRESSION(Result, ^=)\n        DOCTEST_FORBIT_EXPRESSION(Result, |=)\n    };\n\n#ifndef DOCTEST_CONFIG_NO_COMPARISON_WARNING_SUPPRESSION\n\n    DOCTEST_CLANG_SUPPRESS_WARNING_PUSH\n    DOCTEST_CLANG_SUPPRESS_WARNING(\"-Wsign-conversion\")\n    DOCTEST_CLANG_SUPPRESS_WARNING(\"-Wsign-compare\")\n    //DOCTEST_CLANG_SUPPRESS_WARNING(\"-Wdouble-promotion\")\n    //DOCTEST_CLANG_SUPPRESS_WARNING(\"-Wconversion\")\n    //DOCTEST_CLANG_SUPPRESS_WARNING(\"-Wfloat-equal\")\n\n    DOCTEST_GCC_SUPPRESS_WARNING_PUSH\n    DOCTEST_GCC_SUPPRESS_WARNING(\"-Wsign-conversion\")\n    DOCTEST_GCC_SUPPRESS_WARNING(\"-Wsign-compare\")\n    //DOCTEST_GCC_SUPPRESS_WARNING(\"-Wdouble-promotion\")\n    //DOCTEST_GCC_SUPPRESS_WARNING(\"-Wconversion\")\n    //DOCTEST_GCC_SUPPRESS_WARNING(\"-Wfloat-equal\")\n\n    DOCTEST_MSVC_SUPPRESS_WARNING_PUSH\n    // https://stackoverflow.com/questions/39479163 what's the difference between 4018 and 4389\n    DOCTEST_MSVC_SUPPRESS_WARNING(4388) // signed/unsigned mismatch\n    DOCTEST_MSVC_SUPPRESS_WARNING(4389) // 'operator' : signed/unsigned mismatch\n    DOCTEST_MSVC_SUPPRESS_WARNING(4018) // 'expression' : signed/unsigned mismatch\n    //DOCTEST_MSVC_SUPPRESS_WARNING(4805) // 'operation' : unsafe mix of type 'type' and type 'type' in operation\n\n#endif // DOCTEST_CONFIG_NO_COMPARISON_WARNING_SUPPRESSION\n\n    // clang-format off\n#ifndef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n#define DOCTEST_COMPARISON_RETURN_TYPE bool\n#else // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n#define DOCTEST_COMPARISON_RETURN_TYPE typename types::enable_if<can_use_op<L>::value || can_use_op<R>::value, bool>::type\n    inline bool eq(const char* lhs, const char* rhs) { return String(lhs) == String(rhs); }\n    inline bool ne(const char* lhs, const char* rhs) { return String(lhs) != String(rhs); }\n    inline bool lt(const char* lhs, const char* rhs) { return String(lhs) <  String(rhs); }\n    inline bool gt(const char* lhs, const char* rhs) { return String(lhs) >  String(rhs); }\n    inline bool le(const char* lhs, const char* rhs) { return String(lhs) <= String(rhs); }\n    inline bool ge(const char* lhs, const char* rhs) { return String(lhs) >= String(rhs); }\n#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n    // clang-format on\n\n#define DOCTEST_RELATIONAL_OP(name, op)                                                            \\\n    template <typename L, typename R>                                                              \\\n    DOCTEST_COMPARISON_RETURN_TYPE name(const DOCTEST_REF_WRAP(L) lhs,                             \\\n                                        const DOCTEST_REF_WRAP(R) rhs) {                           \\\n        return lhs op rhs;                                                                         \\\n    }\n\n    DOCTEST_RELATIONAL_OP(eq, ==)\n    DOCTEST_RELATIONAL_OP(ne, !=)\n    DOCTEST_RELATIONAL_OP(lt, <)\n    DOCTEST_RELATIONAL_OP(gt, >)\n    DOCTEST_RELATIONAL_OP(le, <=)\n    DOCTEST_RELATIONAL_OP(ge, >=)\n\n#ifndef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n#define DOCTEST_CMP_EQ(l, r) l == r\n#define DOCTEST_CMP_NE(l, r) l != r\n#define DOCTEST_CMP_GT(l, r) l > r\n#define DOCTEST_CMP_LT(l, r) l < r\n#define DOCTEST_CMP_GE(l, r) l >= r\n#define DOCTEST_CMP_LE(l, r) l <= r\n#else // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n#define DOCTEST_CMP_EQ(l, r) eq(l, r)\n#define DOCTEST_CMP_NE(l, r) ne(l, r)\n#define DOCTEST_CMP_GT(l, r) gt(l, r)\n#define DOCTEST_CMP_LT(l, r) lt(l, r)\n#define DOCTEST_CMP_GE(l, r) ge(l, r)\n#define DOCTEST_CMP_LE(l, r) le(l, r)\n#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n\n    template <typename L>\n    // cppcheck-suppress copyCtorAndEqOperator\n    struct Expression_lhs\n    {\n        L                lhs;\n        assertType::Enum m_at;\n\n        explicit Expression_lhs(L&& in, assertType::Enum at)\n                : lhs(static_cast<L&&>(in))\n                , m_at(at) {}\n\n        DOCTEST_NOINLINE operator Result() {\n// TODO: upstream the change to doctest : Work-around for the warning: 'address will never be NULL'\nDOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(\"-Waddress\")\n// this is needed only for MSVC 2015\nDOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4800) // 'int': forcing value to bool\n            bool res = static_cast<bool>(lhs);\nDOCTEST_MSVC_SUPPRESS_WARNING_POP\nDOCTEST_GCC_SUPPRESS_WARNING_POP\n            if(m_at & assertType::is_false) { //!OCLINT bitwise operator in conditional\n                res = !res;\n            }\n\n            if(!res || getContextOptions()->success) {\n                return { res, (DOCTEST_STRINGIFY(lhs)) };\n            }\n            return { res };\n        }\n\n        /* This is required for user-defined conversions from Expression_lhs to L */\n        operator L() const { return lhs; }\n\n        // clang-format off\n        DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(==, \" == \", DOCTEST_CMP_EQ) //!OCLINT bitwise operator in conditional\n        DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(!=, \" != \", DOCTEST_CMP_NE) //!OCLINT bitwise operator in conditional\n        DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(>,  \" >  \", DOCTEST_CMP_GT) //!OCLINT bitwise operator in conditional\n        DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(<,  \" <  \", DOCTEST_CMP_LT) //!OCLINT bitwise operator in conditional\n        DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(>=, \" >= \", DOCTEST_CMP_GE) //!OCLINT bitwise operator in conditional\n        DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(<=, \" <= \", DOCTEST_CMP_LE) //!OCLINT bitwise operator in conditional\n        // clang-format on\n\n        // forbidding some expressions based on this table: https://en.cppreference.com/w/cpp/language/operator_precedence\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, &)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, ^)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, |)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, &&)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, ||)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, =)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, +=)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, -=)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, *=)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, /=)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, %=)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, <<=)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, >>=)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, &=)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, ^=)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, |=)\n        // these 2 are unfortunate because they should be allowed - they have higher precedence over the comparisons, but the\n        // ExpressionDecomposer class uses the left shift operator to capture the left operand of the binary expression...\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, <<)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, >>)\n    };\n\n#ifndef DOCTEST_CONFIG_NO_COMPARISON_WARNING_SUPPRESSION\n\n    DOCTEST_CLANG_SUPPRESS_WARNING_POP\n    DOCTEST_MSVC_SUPPRESS_WARNING_POP\n    DOCTEST_GCC_SUPPRESS_WARNING_POP\n\n#endif // DOCTEST_CONFIG_NO_COMPARISON_WARNING_SUPPRESSION\n\n#if DOCTEST_CLANG && DOCTEST_CLANG < DOCTEST_COMPILER(3, 6, 0)\nDOCTEST_CLANG_SUPPRESS_WARNING_POP\n#endif\n\n    struct DOCTEST_INTERFACE ExpressionDecomposer\n    {\n        assertType::Enum m_at;\n\n        ExpressionDecomposer(assertType::Enum at);\n\n        // The right operator for capturing expressions is \"<=\" instead of \"<<\" (based on the operator precedence table)\n        // but then there will be warnings from GCC about \"-Wparentheses\" and since \"_Pragma()\" is problematic this will stay for now...\n        // https://github.com/catchorg/Catch2/issues/870\n        // https://github.com/catchorg/Catch2/issues/565\n        template <typename L>\n        Expression_lhs<L> operator<<(L&& operand) {\n            return Expression_lhs<L>(static_cast<L&&>(operand), m_at);\n        }\n\n        template <typename L,typename types::enable_if<!doctest::detail::types::is_rvalue_reference<L>::value,void >::type* = nullptr>\n        Expression_lhs<const L&> operator<<(const L &operand) {\n            return Expression_lhs<const L&>(operand, m_at);\n        }\n    };\n\n    struct DOCTEST_INTERFACE TestSuite\n    {\n        const char* m_test_suite = nullptr;\n        const char* m_description = nullptr;\n        bool        m_skip = false;\n        bool        m_no_breaks = false;\n        bool        m_no_output = false;\n        bool        m_may_fail = false;\n        bool        m_should_fail = false;\n        int         m_expected_failures = 0;\n        double      m_timeout = 0;\n\n        TestSuite& operator*(const char* in);\n\n        template <typename T>\n        TestSuite& operator*(const T& in) {\n            in.fill(*this);\n            return *this;\n        }\n    };\n\n    using funcType = void (*)();\n\n    struct DOCTEST_INTERFACE TestCase : public TestCaseData\n    {\n        funcType m_test; // a function pointer to the test case\n\n        String m_type; // for templated test cases - gets appended to the real name\n        int m_template_id; // an ID used to distinguish between the different versions of a templated test case\n        String m_full_name; // contains the name (only for templated test cases!) + the template type\n\n        TestCase(funcType test, const char* file, unsigned line, const TestSuite& test_suite,\n                 const String& type = String(), int template_id = -1);\n\n        TestCase(const TestCase& other);\n        TestCase(TestCase&&) = delete;\n\n        DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(26434) // hides a non-virtual function\n        TestCase& operator=(const TestCase& other);\n        DOCTEST_MSVC_SUPPRESS_WARNING_POP\n\n        TestCase& operator=(TestCase&&) = delete;\n\n        TestCase& operator*(const char* in);\n\n        template <typename T>\n        TestCase& operator*(const T& in) {\n            in.fill(*this);\n            return *this;\n        }\n\n        bool operator<(const TestCase& other) const;\n\n        ~TestCase() = default;\n    };\n\n    // forward declarations of functions used by the macros\n    DOCTEST_INTERFACE int  regTest(const TestCase& tc);\n    DOCTEST_INTERFACE int  setTestSuite(const TestSuite& ts);\n    DOCTEST_INTERFACE bool isDebuggerActive();\n\n    template<typename T>\n    int instantiationHelper(const T&) { return 0; }\n\n    namespace binaryAssertComparison {\n        enum Enum\n        {\n            eq = 0,\n            ne,\n            gt,\n            lt,\n            ge,\n            le\n        };\n    } // namespace binaryAssertComparison\n\n    // clang-format off\n    template <int, class L, class R> struct RelationalComparator     { bool operator()(const DOCTEST_REF_WRAP(L),     const DOCTEST_REF_WRAP(R)    ) const { return false;        } };\n\n#define DOCTEST_BINARY_RELATIONAL_OP(n, op) \\\n    template <class L, class R> struct RelationalComparator<n, L, R> { bool operator()(const DOCTEST_REF_WRAP(L) lhs, const DOCTEST_REF_WRAP(R) rhs) const { return op(lhs, rhs); } };\n    // clang-format on\n\n    DOCTEST_BINARY_RELATIONAL_OP(0, doctest::detail::eq)\n    DOCTEST_BINARY_RELATIONAL_OP(1, doctest::detail::ne)\n    DOCTEST_BINARY_RELATIONAL_OP(2, doctest::detail::gt)\n    DOCTEST_BINARY_RELATIONAL_OP(3, doctest::detail::lt)\n    DOCTEST_BINARY_RELATIONAL_OP(4, doctest::detail::ge)\n    DOCTEST_BINARY_RELATIONAL_OP(5, doctest::detail::le)\n\n    struct DOCTEST_INTERFACE ResultBuilder : public AssertData\n    {\n        ResultBuilder(assertType::Enum at, const char* file, int line, const char* expr,\n                      const char* exception_type = \"\", const String& exception_string = \"\");\n\n        ResultBuilder(assertType::Enum at, const char* file, int line, const char* expr,\n                      const char* exception_type, const Contains& exception_string);\n\n        void setResult(const Result& res);\n\n        template <int comparison, typename L, typename R>\n        DOCTEST_NOINLINE bool binary_assert(const DOCTEST_REF_WRAP(L) lhs,\n                                            const DOCTEST_REF_WRAP(R) rhs) {\n            m_failed = !RelationalComparator<comparison, L, R>()(lhs, rhs);\n            if (m_failed || getContextOptions()->success) {\n                m_decomp = stringifyBinaryExpr(lhs, \", \", rhs);\n            }\n            return !m_failed;\n        }\n\n        template <typename L>\n        DOCTEST_NOINLINE bool unary_assert(const DOCTEST_REF_WRAP(L) val) {\n            m_failed = !val;\n\n            if (m_at & assertType::is_false) { //!OCLINT bitwise operator in conditional\n                m_failed = !m_failed;\n            }\n\n            if (m_failed || getContextOptions()->success) {\n                m_decomp = (DOCTEST_STRINGIFY(val));\n            }\n\n            return !m_failed;\n        }\n\n        void translateException();\n\n        bool log();\n        void react() const;\n    };\n\n    namespace assertAction {\n        enum Enum\n        {\n            nothing     = 0,\n            dbgbreak    = 1,\n            shouldthrow = 2\n        };\n    } // namespace assertAction\n\n    DOCTEST_INTERFACE void failed_out_of_a_testing_context(const AssertData& ad);\n\n    DOCTEST_INTERFACE bool decomp_assert(assertType::Enum at, const char* file, int line,\n                                         const char* expr, const Result& result);\n\n#define DOCTEST_ASSERT_OUT_OF_TESTS(decomp)                                                        \\\n    do {                                                                                           \\\n        if(!is_running_in_test) {                                                                  \\\n            if(failed) {                                                                           \\\n                ResultBuilder rb(at, file, line, expr);                                            \\\n                rb.m_failed = failed;                                                              \\\n                rb.m_decomp = decomp;                                                              \\\n                failed_out_of_a_testing_context(rb);                                               \\\n                if(isDebuggerActive() && !getContextOptions()->no_breaks)                          \\\n                    DOCTEST_BREAK_INTO_DEBUGGER();                                                 \\\n                if(checkIfShouldThrow(at))                                                         \\\n                    throwException();                                                              \\\n            }                                                                                      \\\n            return !failed;                                                                        \\\n        }                                                                                          \\\n    } while(false)\n\n#define DOCTEST_ASSERT_IN_TESTS(decomp)                                                            \\\n    ResultBuilder rb(at, file, line, expr);                                                        \\\n    rb.m_failed = failed;                                                                          \\\n    if(rb.m_failed || getContextOptions()->success)                                                \\\n        rb.m_decomp = decomp;                                                                      \\\n    if(rb.log())                                                                                   \\\n        DOCTEST_BREAK_INTO_DEBUGGER();                                                             \\\n    if(rb.m_failed && checkIfShouldThrow(at))                                                      \\\n    throwException()\n\n    template <int comparison, typename L, typename R>\n    DOCTEST_NOINLINE bool binary_assert(assertType::Enum at, const char* file, int line,\n                                        const char* expr, const DOCTEST_REF_WRAP(L) lhs,\n                                        const DOCTEST_REF_WRAP(R) rhs) {\n        bool failed = !RelationalComparator<comparison, L, R>()(lhs, rhs);\n\n        // ###################################################################################\n        // IF THE DEBUGGER BREAKS HERE - GO 1 LEVEL UP IN THE CALLSTACK FOR THE FAILING ASSERT\n        // THIS IS THE EFFECT OF HAVING 'DOCTEST_CONFIG_SUPER_FAST_ASSERTS' DEFINED\n        // ###################################################################################\n        DOCTEST_ASSERT_OUT_OF_TESTS(stringifyBinaryExpr(lhs, \", \", rhs));\n        DOCTEST_ASSERT_IN_TESTS(stringifyBinaryExpr(lhs, \", \", rhs));\n        return !failed;\n    }\n\n    template <typename L>\n    DOCTEST_NOINLINE bool unary_assert(assertType::Enum at, const char* file, int line,\n                                       const char* expr, const DOCTEST_REF_WRAP(L) val) {\n        bool failed = !val;\n\n        if(at & assertType::is_false) //!OCLINT bitwise operator in conditional\n            failed = !failed;\n\n        // ###################################################################################\n        // IF THE DEBUGGER BREAKS HERE - GO 1 LEVEL UP IN THE CALLSTACK FOR THE FAILING ASSERT\n        // THIS IS THE EFFECT OF HAVING 'DOCTEST_CONFIG_SUPER_FAST_ASSERTS' DEFINED\n        // ###################################################################################\n        DOCTEST_ASSERT_OUT_OF_TESTS((DOCTEST_STRINGIFY(val)));\n        DOCTEST_ASSERT_IN_TESTS((DOCTEST_STRINGIFY(val)));\n        return !failed;\n    }\n\n    struct DOCTEST_INTERFACE IExceptionTranslator\n    {\n        DOCTEST_DECLARE_INTERFACE(IExceptionTranslator)\n        virtual bool translate(String&) const = 0;\n    };\n\n    template <typename T>\n    class ExceptionTranslator : public IExceptionTranslator //!OCLINT destructor of virtual class\n    {\n    public:\n        explicit ExceptionTranslator(String (*translateFunction)(T))\n                : m_translateFunction(translateFunction) {}\n\n        bool translate(String& res) const override {\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n            try {\n                throw; // lgtm [cpp/rethrow-no-exception]\n                // cppcheck-suppress catchExceptionByValue\n            } catch(const T& ex) {\n                res = m_translateFunction(ex); //!OCLINT parameter reassignment\n                return true;\n            } catch(...) {}         //!OCLINT -  empty catch statement\n#endif                              // DOCTEST_CONFIG_NO_EXCEPTIONS\n            static_cast<void>(res); // to silence -Wunused-parameter\n            return false;\n        }\n\n    private:\n        String (*m_translateFunction)(T);\n    };\n\n    DOCTEST_INTERFACE void registerExceptionTranslatorImpl(const IExceptionTranslator* et);\n\n    // ContextScope base class used to allow implementing methods of ContextScope\n    // that don't depend on the template parameter in doctest.cpp.\n    struct DOCTEST_INTERFACE ContextScopeBase : public IContextScope {\n        ContextScopeBase(const ContextScopeBase&) = delete;\n\n        ContextScopeBase& operator=(const ContextScopeBase&) = delete;\n        ContextScopeBase& operator=(ContextScopeBase&&) = delete;\n\n        ~ContextScopeBase() override = default;\n\n    protected:\n        ContextScopeBase();\n        ContextScopeBase(ContextScopeBase&& other) noexcept;\n\n        void destroy();\n        bool need_to_destroy{true};\n    };\n\n    template <typename L> class ContextScope : public ContextScopeBase\n    {\n        L lambda_;\n\n    public:\n        explicit ContextScope(const L &lambda) : lambda_(lambda) {}\n        explicit ContextScope(L&& lambda) : lambda_(static_cast<L&&>(lambda)) { }\n\n        ContextScope(const ContextScope&) = delete;\n        ContextScope(ContextScope&&) noexcept = default;\n\n        ContextScope& operator=(const ContextScope&) = delete;\n        ContextScope& operator=(ContextScope&&) = delete;\n\n        void stringify(std::ostream* s) const override { lambda_(s); }\n\n        ~ContextScope() override {\n            if (need_to_destroy) {\n                destroy();\n            }\n        }\n    };\n\n    struct DOCTEST_INTERFACE MessageBuilder : public MessageData\n    {\n        std::ostream* m_stream;\n        bool          logged = false;\n\n        MessageBuilder(const char* file, int line, assertType::Enum severity);\n\n        MessageBuilder(const MessageBuilder&) = delete;\n        MessageBuilder(MessageBuilder&&) = delete;\n\n        MessageBuilder& operator=(const MessageBuilder&) = delete;\n        MessageBuilder& operator=(MessageBuilder&&) = delete;\n\n        ~MessageBuilder();\n\n        // the preferred way of chaining parameters for stringification\nDOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4866)\n        template <typename T>\n        MessageBuilder& operator,(const T& in) {\n            *m_stream << (DOCTEST_STRINGIFY(in));\n            return *this;\n        }\nDOCTEST_MSVC_SUPPRESS_WARNING_POP\n\n        // kept here just for backwards-compatibility - the comma operator should be preferred now\n        template <typename T>\n        MessageBuilder& operator<<(const T& in) { return this->operator,(in); }\n\n        // the `,` operator has the lowest operator precedence - if `<<` is used by the user then\n        // the `,` operator will be called last which is not what we want and thus the `*` operator\n        // is used first (has higher operator precedence compared to `<<`) so that we guarantee that\n        // an operator of the MessageBuilder class is called first before the rest of the parameters\n        template <typename T>\n        MessageBuilder& operator*(const T& in) { return this->operator,(in); }\n\n        bool log();\n        void react();\n    };\n\n    template <typename L>\n    ContextScope<L> MakeContextScope(const L &lambda) {\n        return ContextScope<L>(lambda);\n    }\n} // namespace detail\n\n#define DOCTEST_DEFINE_DECORATOR(name, type, def)                                                  \\\n    struct name                                                                                    \\\n    {                                                                                              \\\n        type data;                                                                                 \\\n        name(type in = def)                                                                        \\\n                : data(in) {}                                                                      \\\n        void fill(detail::TestCase& state) const { state.DOCTEST_CAT(m_, name) = data; }           \\\n        void fill(detail::TestSuite& state) const { state.DOCTEST_CAT(m_, name) = data; }          \\\n    }\n\nDOCTEST_DEFINE_DECORATOR(test_suite, const char*, \"\");\nDOCTEST_DEFINE_DECORATOR(description, const char*, \"\");\nDOCTEST_DEFINE_DECORATOR(skip, bool, true);\nDOCTEST_DEFINE_DECORATOR(no_breaks, bool, true);\nDOCTEST_DEFINE_DECORATOR(no_output, bool, true);\nDOCTEST_DEFINE_DECORATOR(timeout, double, 0);\nDOCTEST_DEFINE_DECORATOR(may_fail, bool, true);\nDOCTEST_DEFINE_DECORATOR(should_fail, bool, true);\nDOCTEST_DEFINE_DECORATOR(expected_failures, int, 0);\n\ntemplate <typename T>\nint registerExceptionTranslator(String (*translateFunction)(T)) {\n    DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Wexit-time-destructors\")\n    static detail::ExceptionTranslator<T> exceptionTranslator(translateFunction);\n    DOCTEST_CLANG_SUPPRESS_WARNING_POP\n    detail::registerExceptionTranslatorImpl(&exceptionTranslator);\n    return 0;\n}\n\n} // namespace doctest\n\n// in a separate namespace outside of doctest because the DOCTEST_TEST_SUITE macro\n// introduces an anonymous namespace in which getCurrentTestSuite gets overridden\nnamespace doctest_detail_test_suite_ns {\nDOCTEST_INTERFACE doctest::detail::TestSuite& getCurrentTestSuite();\n} // namespace doctest_detail_test_suite_ns\n\nnamespace doctest {\n#else  // DOCTEST_CONFIG_DISABLE\ntemplate <typename T>\nint registerExceptionTranslator(String (*)(T)) {\n    return 0;\n}\n#endif // DOCTEST_CONFIG_DISABLE\n\nnamespace detail {\n    using assert_handler = void (*)(const AssertData&);\n    struct ContextState;\n} // namespace detail\n\nclass DOCTEST_INTERFACE Context\n{\n    detail::ContextState* p;\n\n    void parseArgs(int argc, const char* const* argv, bool withDefaults = false);\n\npublic:\n    explicit Context(int argc = 0, const char* const* argv = nullptr);\n\n    Context(const Context&) = delete;\n    Context(Context&&) = delete;\n\n    Context& operator=(const Context&) = delete;\n    Context& operator=(Context&&) = delete;\n\n    ~Context(); // NOLINT(performance-trivially-destructible)\n\n    void applyCommandLine(int argc, const char* const* argv);\n\n    void addFilter(const char* filter, const char* value);\n    void clearFilters();\n    void setOption(const char* option, bool value);\n    void setOption(const char* option, int value);\n    void setOption(const char* option, const char* value);\n\n    bool shouldExit();\n\n    void setAsDefaultForAssertsOutOfTestCases();\n\n    void setAssertHandler(detail::assert_handler ah);\n\n    void setCout(std::ostream* out);\n\n    int run();\n};\n\nnamespace TestCaseFailureReason {\n    enum Enum\n    {\n        None                     = 0,\n        AssertFailure            = 1,   // an assertion has failed in the test case\n        Exception                = 2,   // test case threw an exception\n        Crash                    = 4,   // a crash...\n        TooManyFailedAsserts     = 8,   // the abort-after option\n        Timeout                  = 16,  // see the timeout decorator\n        ShouldHaveFailedButDidnt = 32,  // see the should_fail decorator\n        ShouldHaveFailedAndDid   = 64,  // see the should_fail decorator\n        DidntFailExactlyNumTimes = 128, // see the expected_failures decorator\n        FailedExactlyNumTimes    = 256, // see the expected_failures decorator\n        CouldHaveFailedAndDid    = 512  // see the may_fail decorator\n    };\n} // namespace TestCaseFailureReason\n\nstruct DOCTEST_INTERFACE CurrentTestCaseStats\n{\n    int    numAssertsCurrentTest;\n    int    numAssertsFailedCurrentTest;\n    double seconds;\n    int    failure_flags; // use TestCaseFailureReason::Enum\n    bool   testCaseSuccess;\n};\n\nstruct DOCTEST_INTERFACE TestCaseException\n{\n    String error_string;\n    bool   is_crash;\n};\n\nstruct DOCTEST_INTERFACE TestRunStats\n{\n    unsigned numTestCases;\n    unsigned numTestCasesPassingFilters;\n    unsigned numTestSuitesPassingFilters;\n    unsigned numTestCasesFailed;\n    int      numAsserts;\n    int      numAssertsFailed;\n};\n\nstruct QueryData\n{\n    const TestRunStats*  run_stats = nullptr;\n    const TestCaseData** data      = nullptr;\n    unsigned             num_data  = 0;\n};\n\nstruct DOCTEST_INTERFACE IReporter\n{\n    // The constructor has to accept \"const ContextOptions&\" as a single argument\n    // which has most of the options for the run + a pointer to the stdout stream\n    // Reporter(const ContextOptions& in)\n\n    // called when a query should be reported (listing test cases, printing the version, etc.)\n    virtual void report_query(const QueryData&) = 0;\n\n    // called when the whole test run starts\n    virtual void test_run_start() = 0;\n    // called when the whole test run ends (caching a pointer to the input doesn't make sense here)\n    virtual void test_run_end(const TestRunStats&) = 0;\n\n    // called when a test case is started (safe to cache a pointer to the input)\n    virtual void test_case_start(const TestCaseData&) = 0;\n    // called when a test case is reentered because of unfinished subcases (safe to cache a pointer to the input)\n    virtual void test_case_reenter(const TestCaseData&) = 0;\n    // called when a test case has ended\n    virtual void test_case_end(const CurrentTestCaseStats&) = 0;\n\n    // called when an exception is thrown from the test case (or it crashes)\n    virtual void test_case_exception(const TestCaseException&) = 0;\n\n    // called whenever a subcase is entered (don't cache pointers to the input)\n    virtual void subcase_start(const SubcaseSignature&) = 0;\n    // called whenever a subcase is exited (don't cache pointers to the input)\n    virtual void subcase_end() = 0;\n\n    // called for each assert (don't cache pointers to the input)\n    virtual void log_assert(const AssertData&) = 0;\n    // called for each message (don't cache pointers to the input)\n    virtual void log_message(const MessageData&) = 0;\n\n    // called when a test case is skipped either because it doesn't pass the filters, has a skip decorator\n    // or isn't in the execution range (between first and last) (safe to cache a pointer to the input)\n    virtual void test_case_skipped(const TestCaseData&) = 0;\n\n    DOCTEST_DECLARE_INTERFACE(IReporter)\n\n    // can obtain all currently active contexts and stringify them if one wishes to do so\n    static int                         get_num_active_contexts();\n    static const IContextScope* const* get_active_contexts();\n\n    // can iterate through contexts which have been stringified automatically in their destructors when an exception has been thrown\n    static int           get_num_stringified_contexts();\n    static const String* get_stringified_contexts();\n};\n\nnamespace detail {\n    using reporterCreatorFunc =  IReporter* (*)(const ContextOptions&);\n\n    DOCTEST_INTERFACE void registerReporterImpl(const char* name, int prio, reporterCreatorFunc c, bool isReporter);\n\n    template <typename Reporter>\n    IReporter* reporterCreator(const ContextOptions& o) {\n        return new Reporter(o);\n    }\n} // namespace detail\n\ntemplate <typename Reporter>\nint registerReporter(const char* name, int priority, bool isReporter) {\n    detail::registerReporterImpl(name, priority, detail::reporterCreator<Reporter>, isReporter);\n    return 0;\n}\n} // namespace doctest\n\n#ifdef DOCTEST_CONFIG_ASSERTS_RETURN_VALUES\n#define DOCTEST_FUNC_EMPTY [] { return false; }()\n#else\n#define DOCTEST_FUNC_EMPTY (void)0\n#endif\n\n// if registering is not disabled\n#ifndef DOCTEST_CONFIG_DISABLE\n\n#ifdef DOCTEST_CONFIG_ASSERTS_RETURN_VALUES\n#define DOCTEST_FUNC_SCOPE_BEGIN [&]\n#define DOCTEST_FUNC_SCOPE_END ()\n#define DOCTEST_FUNC_SCOPE_RET(v) return v\n#else\n#define DOCTEST_FUNC_SCOPE_BEGIN do\n#define DOCTEST_FUNC_SCOPE_END while(false)\n#define DOCTEST_FUNC_SCOPE_RET(v) (void)0\n#endif\n\n// common code in asserts - for convenience\n#define DOCTEST_ASSERT_LOG_REACT_RETURN(b)                                                         \\\n    if(b.log()) DOCTEST_BREAK_INTO_DEBUGGER();                                                     \\\n    b.react();                                                                                     \\\n    DOCTEST_FUNC_SCOPE_RET(!b.m_failed)\n\n#ifdef DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS\n#define DOCTEST_WRAP_IN_TRY(x) x;\n#else // DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS\n#define DOCTEST_WRAP_IN_TRY(x)                                                                     \\\n    try {                                                                                          \\\n        x;                                                                                         \\\n    } catch(...) { DOCTEST_RB.translateException(); }\n#endif // DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS\n\n#ifdef DOCTEST_CONFIG_VOID_CAST_EXPRESSIONS\n#define DOCTEST_CAST_TO_VOID(...)                                                                  \\\n    DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(\"-Wuseless-cast\")                                       \\\n    static_cast<void>(__VA_ARGS__);                                                                \\\n    DOCTEST_GCC_SUPPRESS_WARNING_POP\n#else // DOCTEST_CONFIG_VOID_CAST_EXPRESSIONS\n#define DOCTEST_CAST_TO_VOID(...) __VA_ARGS__;\n#endif // DOCTEST_CONFIG_VOID_CAST_EXPRESSIONS\n\n// registers the test by initializing a dummy var with a function\n#define DOCTEST_REGISTER_FUNCTION(global_prefix, f, decorators)                                    \\\n    global_prefix DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(DOCTEST_ANON_VAR_), /* NOLINT */    \\\n            doctest::detail::regTest(                                                              \\\n                    doctest::detail::TestCase(                                                     \\\n                            f, __FILE__, __LINE__,                                                 \\\n                            doctest_detail_test_suite_ns::getCurrentTestSuite()) *                 \\\n                    decorators))\n\n#define DOCTEST_IMPLEMENT_FIXTURE(der, base, func, decorators)                                     \\\n    namespace { /* NOLINT */                                                                       \\\n        struct der : public base                                                                   \\\n        {                                                                                          \\\n            void f();                                                                              \\\n        };                                                                                         \\\n        static DOCTEST_INLINE_NOINLINE void func() {                                               \\\n            der v;                                                                                 \\\n            v.f();                                                                                 \\\n        }                                                                                          \\\n        DOCTEST_REGISTER_FUNCTION(DOCTEST_EMPTY, func, decorators)                                 \\\n    }                                                                                              \\\n    DOCTEST_INLINE_NOINLINE void der::f() // NOLINT(misc-definitions-in-headers)\n\n#define DOCTEST_CREATE_AND_REGISTER_FUNCTION(f, decorators)                                        \\\n    static void f();                                                                               \\\n    DOCTEST_REGISTER_FUNCTION(DOCTEST_EMPTY, f, decorators)                                        \\\n    static void f()\n\n#define DOCTEST_CREATE_AND_REGISTER_FUNCTION_IN_CLASS(f, proxy, decorators)                        \\\n    static doctest::detail::funcType proxy() { return f; }                                         \\\n    DOCTEST_REGISTER_FUNCTION(inline, proxy(), decorators)                                         \\\n    static void f()\n\n// for registering tests\n#define DOCTEST_TEST_CASE(decorators)                                                              \\\n    DOCTEST_CREATE_AND_REGISTER_FUNCTION(DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), decorators)\n\n// for registering tests in classes - requires C++17 for inline variables!\n#if DOCTEST_CPLUSPLUS >= 201703L\n#define DOCTEST_TEST_CASE_CLASS(decorators)                                                        \\\n    DOCTEST_CREATE_AND_REGISTER_FUNCTION_IN_CLASS(DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_),           \\\n                                                  DOCTEST_ANONYMOUS(DOCTEST_ANON_PROXY_),          \\\n                                                  decorators)\n#else // DOCTEST_TEST_CASE_CLASS\n#define DOCTEST_TEST_CASE_CLASS(...)                                                               \\\n    TEST_CASES_CAN_BE_REGISTERED_IN_CLASSES_ONLY_IN_CPP17_MODE_OR_WITH_VS_2017_OR_NEWER\n#endif // DOCTEST_TEST_CASE_CLASS\n\n// for registering tests with a fixture\n#define DOCTEST_TEST_CASE_FIXTURE(c, decorators)                                                   \\\n    DOCTEST_IMPLEMENT_FIXTURE(DOCTEST_ANONYMOUS(DOCTEST_ANON_CLASS_), c,                           \\\n                              DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), decorators)\n\n// for converting types to strings without the <typeinfo> header and demangling\n#define DOCTEST_TYPE_TO_STRING_AS(str, ...)                                                        \\\n    namespace doctest {                                                                            \\\n        template <>                                                                                \\\n        inline String toString<__VA_ARGS__>() {                                                    \\\n            return str;                                                                            \\\n        }                                                                                          \\\n    }                                                                                              \\\n    static_assert(true, \"\")\n\n#define DOCTEST_TYPE_TO_STRING(...) DOCTEST_TYPE_TO_STRING_AS(#__VA_ARGS__, __VA_ARGS__)\n\n#define DOCTEST_TEST_CASE_TEMPLATE_DEFINE_IMPL(dec, T, iter, func)                                 \\\n    template <typename T>                                                                          \\\n    static void func();                                                                            \\\n    namespace { /* NOLINT */                                                                       \\\n        template <typename Tuple>                                                                  \\\n        struct iter;                                                                               \\\n        template <typename Type, typename... Rest>                                                 \\\n        struct iter<std::tuple<Type, Rest...>>                                                     \\\n        {                                                                                          \\\n            iter(const char* file, unsigned line, int index) {                                     \\\n                doctest::detail::regTest(doctest::detail::TestCase(func<Type>, file, line,         \\\n                                            doctest_detail_test_suite_ns::getCurrentTestSuite(),   \\\n                                            doctest::toString<Type>(),                             \\\n                                            int(line) * 1000 + index)                              \\\n                                         * dec);                                                   \\\n                iter<std::tuple<Rest...>>(file, line, index + 1);                                  \\\n            }                                                                                      \\\n        };                                                                                         \\\n        template <>                                                                                \\\n        struct iter<std::tuple<>>                                                                  \\\n        {                                                                                          \\\n            iter(const char*, unsigned, int) {}                                                    \\\n        };                                                                                         \\\n    }                                                                                              \\\n    template <typename T>                                                                          \\\n    static void func()\n\n#define DOCTEST_TEST_CASE_TEMPLATE_DEFINE(dec, T, id)                                              \\\n    DOCTEST_TEST_CASE_TEMPLATE_DEFINE_IMPL(dec, T, DOCTEST_CAT(id, ITERATOR),                      \\\n                                           DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_))\n\n#define DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL(id, anon, ...)                                 \\\n    DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_CAT(anon, DUMMY), /* NOLINT(cert-err58-cpp, fuchsia-statically-constructed-objects) */ \\\n        doctest::detail::instantiationHelper(                                                      \\\n            DOCTEST_CAT(id, ITERATOR)<__VA_ARGS__>(__FILE__, __LINE__, 0)))\n\n#define DOCTEST_TEST_CASE_TEMPLATE_INVOKE(id, ...)                                                 \\\n    DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL(id, DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_), std::tuple<__VA_ARGS__>) \\\n    static_assert(true, \"\")\n\n#define DOCTEST_TEST_CASE_TEMPLATE_APPLY(id, ...)                                                  \\\n    DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL(id, DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_), __VA_ARGS__) \\\n    static_assert(true, \"\")\n\n#define DOCTEST_TEST_CASE_TEMPLATE_IMPL(dec, T, anon, ...)                                         \\\n    DOCTEST_TEST_CASE_TEMPLATE_DEFINE_IMPL(dec, T, DOCTEST_CAT(anon, ITERATOR), anon);             \\\n    DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL(anon, anon, std::tuple<__VA_ARGS__>)               \\\n    template <typename T>                                                                          \\\n    static void anon()\n\n#define DOCTEST_TEST_CASE_TEMPLATE(dec, T, ...)                                                    \\\n    DOCTEST_TEST_CASE_TEMPLATE_IMPL(dec, T, DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_), __VA_ARGS__)\n\n// for subcases\n#define DOCTEST_SUBCASE(name)                                                                      \\\n    if(const doctest::detail::Subcase & DOCTEST_ANONYMOUS(DOCTEST_ANON_SUBCASE_) DOCTEST_UNUSED =  \\\n               doctest::detail::Subcase(name, __FILE__, __LINE__))\n\n// for grouping tests in test suites by using code blocks\n#define DOCTEST_TEST_SUITE_IMPL(decorators, ns_name)                                               \\\n    namespace ns_name { namespace doctest_detail_test_suite_ns {                                   \\\n            static DOCTEST_NOINLINE doctest::detail::TestSuite& getCurrentTestSuite() noexcept {   \\\n                DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4640)                                      \\\n                DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Wexit-time-destructors\")                \\\n                DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(\"-Wmissing-field-initializers\")             \\\n                static doctest::detail::TestSuite data{};                                          \\\n                static bool                       inited = false;                                  \\\n                DOCTEST_MSVC_SUPPRESS_WARNING_POP                                                  \\\n                DOCTEST_CLANG_SUPPRESS_WARNING_POP                                                 \\\n                DOCTEST_GCC_SUPPRESS_WARNING_POP                                                   \\\n                if(!inited) {                                                                      \\\n                    data* decorators;                                                              \\\n                    inited = true;                                                                 \\\n                }                                                                                  \\\n                return data;                                                                       \\\n            }                                                                                      \\\n        }                                                                                          \\\n    }                                                                                              \\\n    namespace ns_name\n\n#define DOCTEST_TEST_SUITE(decorators)                                                             \\\n    DOCTEST_TEST_SUITE_IMPL(decorators, DOCTEST_ANONYMOUS(DOCTEST_ANON_SUITE_))\n\n// for starting a testsuite block\n#define DOCTEST_TEST_SUITE_BEGIN(decorators)                                                       \\\n    DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(DOCTEST_ANON_VAR_), /* NOLINT(cert-err58-cpp) */  \\\n            doctest::detail::setTestSuite(doctest::detail::TestSuite() * decorators))              \\\n    static_assert(true, \"\")\n\n// for ending a testsuite block\n#define DOCTEST_TEST_SUITE_END                                                                     \\\n    DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(DOCTEST_ANON_VAR_), /* NOLINT(cert-err58-cpp) */  \\\n            doctest::detail::setTestSuite(doctest::detail::TestSuite() * \"\"))                      \\\n    using DOCTEST_ANONYMOUS(DOCTEST_ANON_FOR_SEMICOLON_) = int\n\n// for registering exception translators\n#define DOCTEST_REGISTER_EXCEPTION_TRANSLATOR_IMPL(translatorName, signature)                      \\\n    inline doctest::String translatorName(signature);                                              \\\n    DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(DOCTEST_ANON_TRANSLATOR_), /* NOLINT(cert-err58-cpp) */ \\\n            doctest::registerExceptionTranslator(translatorName))                                  \\\n    doctest::String translatorName(signature)\n\n#define DOCTEST_REGISTER_EXCEPTION_TRANSLATOR(signature)                                           \\\n    DOCTEST_REGISTER_EXCEPTION_TRANSLATOR_IMPL(DOCTEST_ANONYMOUS(DOCTEST_ANON_TRANSLATOR_),        \\\n                                               signature)\n\n// for registering reporters\n#define DOCTEST_REGISTER_REPORTER(name, priority, reporter)                                        \\\n    DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(DOCTEST_ANON_REPORTER_), /* NOLINT(cert-err58-cpp) */ \\\n            doctest::registerReporter<reporter>(name, priority, true))                             \\\n    static_assert(true, \"\")\n\n// for registering listeners\n#define DOCTEST_REGISTER_LISTENER(name, priority, reporter)                                        \\\n    DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(DOCTEST_ANON_REPORTER_), /* NOLINT(cert-err58-cpp) */ \\\n            doctest::registerReporter<reporter>(name, priority, false))                            \\\n    static_assert(true, \"\")\n\n// clang-format off\n// for logging - disabling formatting because it's important to have these on 2 separate lines - see PR #557\n#define DOCTEST_INFO(...)                                                                          \\\n    DOCTEST_INFO_IMPL(DOCTEST_ANONYMOUS(DOCTEST_CAPTURE_),                                         \\\n                      DOCTEST_ANONYMOUS(DOCTEST_CAPTURE_OTHER_),                                   \\\n                      __VA_ARGS__)\n// clang-format on\n\n#define DOCTEST_INFO_IMPL(mb_name, s_name, ...)                                       \\\n    auto DOCTEST_ANONYMOUS(DOCTEST_CAPTURE_) = doctest::detail::MakeContextScope(                  \\\n        [&](std::ostream* s_name) {                                                                \\\n        doctest::detail::MessageBuilder mb_name(__FILE__, __LINE__, doctest::assertType::is_warn); \\\n        mb_name.m_stream = s_name;                                                                 \\\n        mb_name * __VA_ARGS__;                                                                     \\\n    })\n\n#define DOCTEST_CAPTURE(x) DOCTEST_INFO(#x \" := \", x)\n\n#define DOCTEST_ADD_AT_IMPL(type, file, line, mb, ...)                                             \\\n    DOCTEST_FUNC_SCOPE_BEGIN {                                                                     \\\n        doctest::detail::MessageBuilder mb(file, line, doctest::assertType::type);                 \\\n        mb * __VA_ARGS__;                                                                          \\\n        if(mb.log())                                                                               \\\n            DOCTEST_BREAK_INTO_DEBUGGER();                                                         \\\n        mb.react();                                                                                \\\n    } DOCTEST_FUNC_SCOPE_END\n\n// clang-format off\n#define DOCTEST_ADD_MESSAGE_AT(file, line, ...) DOCTEST_ADD_AT_IMPL(is_warn, file, line, DOCTEST_ANONYMOUS(DOCTEST_MESSAGE_), __VA_ARGS__)\n#define DOCTEST_ADD_FAIL_CHECK_AT(file, line, ...) DOCTEST_ADD_AT_IMPL(is_check, file, line, DOCTEST_ANONYMOUS(DOCTEST_MESSAGE_), __VA_ARGS__)\n#define DOCTEST_ADD_FAIL_AT(file, line, ...) DOCTEST_ADD_AT_IMPL(is_require, file, line, DOCTEST_ANONYMOUS(DOCTEST_MESSAGE_), __VA_ARGS__)\n// clang-format on\n\n#define DOCTEST_MESSAGE(...) DOCTEST_ADD_MESSAGE_AT(__FILE__, __LINE__, __VA_ARGS__)\n#define DOCTEST_FAIL_CHECK(...) DOCTEST_ADD_FAIL_CHECK_AT(__FILE__, __LINE__, __VA_ARGS__)\n#define DOCTEST_FAIL(...) DOCTEST_ADD_FAIL_AT(__FILE__, __LINE__, __VA_ARGS__)\n\n#define DOCTEST_TO_LVALUE(...) __VA_ARGS__ // Not removed to keep backwards compatibility.\n\n#ifndef DOCTEST_CONFIG_SUPER_FAST_ASSERTS\n\n#define DOCTEST_ASSERT_IMPLEMENT_2(assert_type, ...)                                               \\\n    DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Woverloaded-shift-op-parentheses\")                  \\\n    /* NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) */                                  \\\n    doctest::detail::ResultBuilder DOCTEST_RB(doctest::assertType::assert_type, __FILE__,          \\\n                                               __LINE__, #__VA_ARGS__);                            \\\n    DOCTEST_WRAP_IN_TRY(DOCTEST_RB.setResult(                                                      \\\n            doctest::detail::ExpressionDecomposer(doctest::assertType::assert_type)                \\\n            << __VA_ARGS__)) /* NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) */         \\\n    DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB)                                                    \\\n    DOCTEST_CLANG_SUPPRESS_WARNING_POP\n\n#define DOCTEST_ASSERT_IMPLEMENT_1(assert_type, ...)                                               \\\n    DOCTEST_FUNC_SCOPE_BEGIN {                                                                     \\\n        DOCTEST_ASSERT_IMPLEMENT_2(assert_type, __VA_ARGS__);                                      \\\n    } DOCTEST_FUNC_SCOPE_END // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)\n\n#define DOCTEST_BINARY_ASSERT(assert_type, comp, ...)                                              \\\n    DOCTEST_FUNC_SCOPE_BEGIN {                                                                     \\\n        doctest::detail::ResultBuilder DOCTEST_RB(doctest::assertType::assert_type, __FILE__,      \\\n                                                   __LINE__, #__VA_ARGS__);                        \\\n        DOCTEST_WRAP_IN_TRY(                                                                       \\\n                DOCTEST_RB.binary_assert<doctest::detail::binaryAssertComparison::comp>(           \\\n                        __VA_ARGS__))                                                              \\\n        DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB);                                               \\\n    } DOCTEST_FUNC_SCOPE_END\n\n#define DOCTEST_UNARY_ASSERT(assert_type, ...)                                                     \\\n    DOCTEST_FUNC_SCOPE_BEGIN {                                                                     \\\n        doctest::detail::ResultBuilder DOCTEST_RB(doctest::assertType::assert_type, __FILE__,      \\\n                                                   __LINE__, #__VA_ARGS__);                        \\\n        DOCTEST_WRAP_IN_TRY(DOCTEST_RB.unary_assert(__VA_ARGS__))                                  \\\n        DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB);                                               \\\n    } DOCTEST_FUNC_SCOPE_END\n\n#else // DOCTEST_CONFIG_SUPER_FAST_ASSERTS\n\n// necessary for <ASSERT>_MESSAGE\n#define DOCTEST_ASSERT_IMPLEMENT_2 DOCTEST_ASSERT_IMPLEMENT_1\n\n#define DOCTEST_ASSERT_IMPLEMENT_1(assert_type, ...)                                               \\\n    DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Woverloaded-shift-op-parentheses\")                  \\\n    doctest::detail::decomp_assert(                                                                \\\n            doctest::assertType::assert_type, __FILE__, __LINE__, #__VA_ARGS__,                    \\\n            doctest::detail::ExpressionDecomposer(doctest::assertType::assert_type)                \\\n                    << __VA_ARGS__) DOCTEST_CLANG_SUPPRESS_WARNING_POP\n\n#define DOCTEST_BINARY_ASSERT(assert_type, comparison, ...)                                        \\\n    doctest::detail::binary_assert<doctest::detail::binaryAssertComparison::comparison>(           \\\n            doctest::assertType::assert_type, __FILE__, __LINE__, #__VA_ARGS__, __VA_ARGS__)\n\n#define DOCTEST_UNARY_ASSERT(assert_type, ...)                                                     \\\n    doctest::detail::unary_assert(doctest::assertType::assert_type, __FILE__, __LINE__,            \\\n                                  #__VA_ARGS__, __VA_ARGS__)\n\n#endif // DOCTEST_CONFIG_SUPER_FAST_ASSERTS\n\n#define DOCTEST_WARN(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_WARN, __VA_ARGS__)\n#define DOCTEST_CHECK(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_CHECK, __VA_ARGS__)\n#define DOCTEST_REQUIRE(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_REQUIRE, __VA_ARGS__)\n#define DOCTEST_WARN_FALSE(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_WARN_FALSE, __VA_ARGS__)\n#define DOCTEST_CHECK_FALSE(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_CHECK_FALSE, __VA_ARGS__)\n#define DOCTEST_REQUIRE_FALSE(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_REQUIRE_FALSE, __VA_ARGS__)\n\n// clang-format off\n#define DOCTEST_WARN_MESSAGE(cond, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_WARN, cond); } DOCTEST_FUNC_SCOPE_END\n#define DOCTEST_CHECK_MESSAGE(cond, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_CHECK, cond); } DOCTEST_FUNC_SCOPE_END\n#define DOCTEST_REQUIRE_MESSAGE(cond, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_REQUIRE, cond); } DOCTEST_FUNC_SCOPE_END\n#define DOCTEST_WARN_FALSE_MESSAGE(cond, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_WARN_FALSE, cond); } DOCTEST_FUNC_SCOPE_END\n#define DOCTEST_CHECK_FALSE_MESSAGE(cond, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_CHECK_FALSE, cond); } DOCTEST_FUNC_SCOPE_END\n#define DOCTEST_REQUIRE_FALSE_MESSAGE(cond, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_REQUIRE_FALSE, cond); } DOCTEST_FUNC_SCOPE_END\n// clang-format on\n\n#define DOCTEST_WARN_EQ(...) DOCTEST_BINARY_ASSERT(DT_WARN_EQ, eq, __VA_ARGS__)\n#define DOCTEST_CHECK_EQ(...) DOCTEST_BINARY_ASSERT(DT_CHECK_EQ, eq, __VA_ARGS__)\n#define DOCTEST_REQUIRE_EQ(...) DOCTEST_BINARY_ASSERT(DT_REQUIRE_EQ, eq, __VA_ARGS__)\n#define DOCTEST_WARN_NE(...) DOCTEST_BINARY_ASSERT(DT_WARN_NE, ne, __VA_ARGS__)\n#define DOCTEST_CHECK_NE(...) DOCTEST_BINARY_ASSERT(DT_CHECK_NE, ne, __VA_ARGS__)\n#define DOCTEST_REQUIRE_NE(...) DOCTEST_BINARY_ASSERT(DT_REQUIRE_NE, ne, __VA_ARGS__)\n#define DOCTEST_WARN_GT(...) DOCTEST_BINARY_ASSERT(DT_WARN_GT, gt, __VA_ARGS__)\n#define DOCTEST_CHECK_GT(...) DOCTEST_BINARY_ASSERT(DT_CHECK_GT, gt, __VA_ARGS__)\n#define DOCTEST_REQUIRE_GT(...) DOCTEST_BINARY_ASSERT(DT_REQUIRE_GT, gt, __VA_ARGS__)\n#define DOCTEST_WARN_LT(...) DOCTEST_BINARY_ASSERT(DT_WARN_LT, lt, __VA_ARGS__)\n#define DOCTEST_CHECK_LT(...) DOCTEST_BINARY_ASSERT(DT_CHECK_LT, lt, __VA_ARGS__)\n#define DOCTEST_REQUIRE_LT(...) DOCTEST_BINARY_ASSERT(DT_REQUIRE_LT, lt, __VA_ARGS__)\n#define DOCTEST_WARN_GE(...) DOCTEST_BINARY_ASSERT(DT_WARN_GE, ge, __VA_ARGS__)\n#define DOCTEST_CHECK_GE(...) DOCTEST_BINARY_ASSERT(DT_CHECK_GE, ge, __VA_ARGS__)\n#define DOCTEST_REQUIRE_GE(...) DOCTEST_BINARY_ASSERT(DT_REQUIRE_GE, ge, __VA_ARGS__)\n#define DOCTEST_WARN_LE(...) DOCTEST_BINARY_ASSERT(DT_WARN_LE, le, __VA_ARGS__)\n#define DOCTEST_CHECK_LE(...) DOCTEST_BINARY_ASSERT(DT_CHECK_LE, le, __VA_ARGS__)\n#define DOCTEST_REQUIRE_LE(...) DOCTEST_BINARY_ASSERT(DT_REQUIRE_LE, le, __VA_ARGS__)\n\n#define DOCTEST_WARN_UNARY(...) DOCTEST_UNARY_ASSERT(DT_WARN_UNARY, __VA_ARGS__)\n#define DOCTEST_CHECK_UNARY(...) DOCTEST_UNARY_ASSERT(DT_CHECK_UNARY, __VA_ARGS__)\n#define DOCTEST_REQUIRE_UNARY(...) DOCTEST_UNARY_ASSERT(DT_REQUIRE_UNARY, __VA_ARGS__)\n#define DOCTEST_WARN_UNARY_FALSE(...) DOCTEST_UNARY_ASSERT(DT_WARN_UNARY_FALSE, __VA_ARGS__)\n#define DOCTEST_CHECK_UNARY_FALSE(...) DOCTEST_UNARY_ASSERT(DT_CHECK_UNARY_FALSE, __VA_ARGS__)\n#define DOCTEST_REQUIRE_UNARY_FALSE(...) DOCTEST_UNARY_ASSERT(DT_REQUIRE_UNARY_FALSE, __VA_ARGS__)\n\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n\n#define DOCTEST_ASSERT_THROWS_AS(expr, assert_type, message, ...)                                  \\\n    DOCTEST_FUNC_SCOPE_BEGIN {                                                                     \\\n        if(!doctest::getContextOptions()->no_throw) {                                              \\\n            doctest::detail::ResultBuilder DOCTEST_RB(doctest::assertType::assert_type, __FILE__,  \\\n                                                       __LINE__, #expr, #__VA_ARGS__, message);    \\\n            try {                                                                                  \\\n                DOCTEST_CAST_TO_VOID(expr)                                                         \\\n            } catch(const typename doctest::detail::types::remove_const<                           \\\n                    typename doctest::detail::types::remove_reference<__VA_ARGS__>::type>::type&) {\\\n                DOCTEST_RB.translateException();                                                   \\\n                DOCTEST_RB.m_threw_as = true;                                                      \\\n            } catch(...) { DOCTEST_RB.translateException(); }                                      \\\n            DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB);                                           \\\n        } else { /* NOLINT(*-else-after-return) */                                                 \\\n            DOCTEST_FUNC_SCOPE_RET(false);                                                         \\\n        }                                                                                          \\\n    } DOCTEST_FUNC_SCOPE_END\n\n#define DOCTEST_ASSERT_THROWS_WITH(expr, expr_str, assert_type, ...)                               \\\n    DOCTEST_FUNC_SCOPE_BEGIN {                                                                     \\\n        if(!doctest::getContextOptions()->no_throw) {                                              \\\n            doctest::detail::ResultBuilder DOCTEST_RB(doctest::assertType::assert_type, __FILE__,  \\\n                                                       __LINE__, expr_str, \"\", __VA_ARGS__);       \\\n            try {                                                                                  \\\n                DOCTEST_CAST_TO_VOID(expr)                                                         \\\n            } catch(...) { DOCTEST_RB.translateException(); }                                      \\\n            DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB);                                           \\\n        } else { /* NOLINT(*-else-after-return) */                                                 \\\n           DOCTEST_FUNC_SCOPE_RET(false);                                                          \\\n        }                                                                                          \\\n    } DOCTEST_FUNC_SCOPE_END\n\n#define DOCTEST_ASSERT_NOTHROW(assert_type, ...)                                                   \\\n    DOCTEST_FUNC_SCOPE_BEGIN {                                                                     \\\n        doctest::detail::ResultBuilder DOCTEST_RB(doctest::assertType::assert_type, __FILE__,      \\\n                                                   __LINE__, #__VA_ARGS__);                        \\\n        try {                                                                                      \\\n            DOCTEST_CAST_TO_VOID(__VA_ARGS__)                                                      \\\n        } catch(...) { DOCTEST_RB.translateException(); }                                          \\\n        DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB);                                               \\\n    } DOCTEST_FUNC_SCOPE_END\n\n// clang-format off\n#define DOCTEST_WARN_THROWS(...) DOCTEST_ASSERT_THROWS_WITH((__VA_ARGS__), #__VA_ARGS__, DT_WARN_THROWS, \"\")\n#define DOCTEST_CHECK_THROWS(...) DOCTEST_ASSERT_THROWS_WITH((__VA_ARGS__), #__VA_ARGS__, DT_CHECK_THROWS, \"\")\n#define DOCTEST_REQUIRE_THROWS(...) DOCTEST_ASSERT_THROWS_WITH((__VA_ARGS__), #__VA_ARGS__, DT_REQUIRE_THROWS, \"\")\n\n#define DOCTEST_WARN_THROWS_AS(expr, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_WARN_THROWS_AS, \"\", __VA_ARGS__)\n#define DOCTEST_CHECK_THROWS_AS(expr, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_CHECK_THROWS_AS, \"\", __VA_ARGS__)\n#define DOCTEST_REQUIRE_THROWS_AS(expr, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_REQUIRE_THROWS_AS, \"\", __VA_ARGS__)\n\n#define DOCTEST_WARN_THROWS_WITH(expr, ...) DOCTEST_ASSERT_THROWS_WITH(expr, #expr, DT_WARN_THROWS_WITH, __VA_ARGS__)\n#define DOCTEST_CHECK_THROWS_WITH(expr, ...) DOCTEST_ASSERT_THROWS_WITH(expr, #expr, DT_CHECK_THROWS_WITH, __VA_ARGS__)\n#define DOCTEST_REQUIRE_THROWS_WITH(expr, ...) DOCTEST_ASSERT_THROWS_WITH(expr, #expr, DT_REQUIRE_THROWS_WITH, __VA_ARGS__)\n\n#define DOCTEST_WARN_THROWS_WITH_AS(expr, message, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_WARN_THROWS_WITH_AS, message, __VA_ARGS__)\n#define DOCTEST_CHECK_THROWS_WITH_AS(expr, message, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_CHECK_THROWS_WITH_AS, message, __VA_ARGS__)\n#define DOCTEST_REQUIRE_THROWS_WITH_AS(expr, message, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_REQUIRE_THROWS_WITH_AS, message, __VA_ARGS__)\n\n#define DOCTEST_WARN_NOTHROW(...) DOCTEST_ASSERT_NOTHROW(DT_WARN_NOTHROW, __VA_ARGS__)\n#define DOCTEST_CHECK_NOTHROW(...) DOCTEST_ASSERT_NOTHROW(DT_CHECK_NOTHROW, __VA_ARGS__)\n#define DOCTEST_REQUIRE_NOTHROW(...) DOCTEST_ASSERT_NOTHROW(DT_REQUIRE_NOTHROW, __VA_ARGS__)\n\n#define DOCTEST_WARN_THROWS_MESSAGE(expr, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_THROWS(expr); } DOCTEST_FUNC_SCOPE_END\n#define DOCTEST_CHECK_THROWS_MESSAGE(expr, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_THROWS(expr); } DOCTEST_FUNC_SCOPE_END\n#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_THROWS(expr); } DOCTEST_FUNC_SCOPE_END\n#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_THROWS_AS(expr, ex); } DOCTEST_FUNC_SCOPE_END\n#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_THROWS_AS(expr, ex); } DOCTEST_FUNC_SCOPE_END\n#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_THROWS_AS(expr, ex); } DOCTEST_FUNC_SCOPE_END\n#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_THROWS_WITH(expr, with); } DOCTEST_FUNC_SCOPE_END\n#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_THROWS_WITH(expr, with); } DOCTEST_FUNC_SCOPE_END\n#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_THROWS_WITH(expr, with); } DOCTEST_FUNC_SCOPE_END\n#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_THROWS_WITH_AS(expr, with, ex); } DOCTEST_FUNC_SCOPE_END\n#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ex); } DOCTEST_FUNC_SCOPE_END\n#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ex); } DOCTEST_FUNC_SCOPE_END\n#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_NOTHROW(expr); } DOCTEST_FUNC_SCOPE_END\n#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_NOTHROW(expr); } DOCTEST_FUNC_SCOPE_END\n#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_NOTHROW(expr); } DOCTEST_FUNC_SCOPE_END\n// clang-format on\n\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n\n// =================================================================================================\n// == WHAT FOLLOWS IS VERSIONS OF THE MACROS THAT DO NOT DO ANY REGISTERING!                      ==\n// == THIS CAN BE ENABLED BY DEFINING DOCTEST_CONFIG_DISABLE GLOBALLY!                            ==\n// =================================================================================================\n#else // DOCTEST_CONFIG_DISABLE\n\n#define DOCTEST_IMPLEMENT_FIXTURE(der, base, func, name)                                           \\\n    namespace /* NOLINT */ {                                                                       \\\n        template <typename DOCTEST_UNUSED_TEMPLATE_TYPE>                                           \\\n        struct der : public base                                                                   \\\n        { void f(); };                                                                             \\\n    }                                                                                              \\\n    template <typename DOCTEST_UNUSED_TEMPLATE_TYPE>                                               \\\n    inline void der<DOCTEST_UNUSED_TEMPLATE_TYPE>::f()\n\n#define DOCTEST_CREATE_AND_REGISTER_FUNCTION(f, name)                                              \\\n    template <typename DOCTEST_UNUSED_TEMPLATE_TYPE>                                               \\\n    static inline void f()\n\n// for registering tests\n#define DOCTEST_TEST_CASE(name)                                                                    \\\n    DOCTEST_CREATE_AND_REGISTER_FUNCTION(DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), name)\n\n// for registering tests in classes\n#define DOCTEST_TEST_CASE_CLASS(name)                                                              \\\n    DOCTEST_CREATE_AND_REGISTER_FUNCTION(DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), name)\n\n// for registering tests with a fixture\n#define DOCTEST_TEST_CASE_FIXTURE(x, name)                                                         \\\n    DOCTEST_IMPLEMENT_FIXTURE(DOCTEST_ANONYMOUS(DOCTEST_ANON_CLASS_), x,                           \\\n                              DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), name)\n\n// for converting types to strings without the <typeinfo> header and demangling\n#define DOCTEST_TYPE_TO_STRING_AS(str, ...) static_assert(true, \"\")\n#define DOCTEST_TYPE_TO_STRING(...) static_assert(true, \"\")\n\n// for typed tests\n#define DOCTEST_TEST_CASE_TEMPLATE(name, type, ...)                                                \\\n    template <typename type>                                                                       \\\n    inline void DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_)()\n\n#define DOCTEST_TEST_CASE_TEMPLATE_DEFINE(name, type, id)                                          \\\n    template <typename type>                                                                       \\\n    inline void DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_)()\n\n#define DOCTEST_TEST_CASE_TEMPLATE_INVOKE(id, ...) static_assert(true, \"\")\n#define DOCTEST_TEST_CASE_TEMPLATE_APPLY(id, ...) static_assert(true, \"\")\n\n// for subcases\n#define DOCTEST_SUBCASE(name)\n\n// for a testsuite block\n#define DOCTEST_TEST_SUITE(name) namespace // NOLINT\n\n// for starting a testsuite block\n#define DOCTEST_TEST_SUITE_BEGIN(name) static_assert(true, \"\")\n\n// for ending a testsuite block\n#define DOCTEST_TEST_SUITE_END using DOCTEST_ANONYMOUS(DOCTEST_ANON_FOR_SEMICOLON_) = int\n\n#define DOCTEST_REGISTER_EXCEPTION_TRANSLATOR(signature)                                           \\\n    template <typename DOCTEST_UNUSED_TEMPLATE_TYPE>                                               \\\n    static inline doctest::String DOCTEST_ANONYMOUS(DOCTEST_ANON_TRANSLATOR_)(signature)\n\n#define DOCTEST_REGISTER_REPORTER(name, priority, reporter)\n#define DOCTEST_REGISTER_LISTENER(name, priority, reporter)\n\n#define DOCTEST_INFO(...) (static_cast<void>(0))\n#define DOCTEST_CAPTURE(x) (static_cast<void>(0))\n#define DOCTEST_ADD_MESSAGE_AT(file, line, ...) (static_cast<void>(0))\n#define DOCTEST_ADD_FAIL_CHECK_AT(file, line, ...) (static_cast<void>(0))\n#define DOCTEST_ADD_FAIL_AT(file, line, ...) (static_cast<void>(0))\n#define DOCTEST_MESSAGE(...) (static_cast<void>(0))\n#define DOCTEST_FAIL_CHECK(...) (static_cast<void>(0))\n#define DOCTEST_FAIL(...) (static_cast<void>(0))\n\n#if defined(DOCTEST_CONFIG_EVALUATE_ASSERTS_EVEN_WHEN_DISABLED)                                    \\\n && defined(DOCTEST_CONFIG_ASSERTS_RETURN_VALUES)\n\n#define DOCTEST_WARN(...) [&] { return __VA_ARGS__; }()\n#define DOCTEST_CHECK(...) [&] { return __VA_ARGS__; }()\n#define DOCTEST_REQUIRE(...) [&] { return __VA_ARGS__; }()\n#define DOCTEST_WARN_FALSE(...) [&] { return !(__VA_ARGS__); }()\n#define DOCTEST_CHECK_FALSE(...) [&] { return !(__VA_ARGS__); }()\n#define DOCTEST_REQUIRE_FALSE(...) [&] { return !(__VA_ARGS__); }()\n\n#define DOCTEST_WARN_MESSAGE(cond, ...) [&] { return cond; }()\n#define DOCTEST_CHECK_MESSAGE(cond, ...) [&] { return cond; }()\n#define DOCTEST_REQUIRE_MESSAGE(cond, ...) [&] { return cond; }()\n#define DOCTEST_WARN_FALSE_MESSAGE(cond, ...) [&] { return !(cond); }()\n#define DOCTEST_CHECK_FALSE_MESSAGE(cond, ...) [&] { return !(cond); }()\n#define DOCTEST_REQUIRE_FALSE_MESSAGE(cond, ...) [&] { return !(cond); }()\n\nnamespace doctest {\nnamespace detail {\n#define DOCTEST_RELATIONAL_OP(name, op)                                                            \\\n    template <typename L, typename R>                                                              \\\n    bool name(const DOCTEST_REF_WRAP(L) lhs, const DOCTEST_REF_WRAP(R) rhs) { return lhs op rhs; }\n\n    DOCTEST_RELATIONAL_OP(eq, ==)\n    DOCTEST_RELATIONAL_OP(ne, !=)\n    DOCTEST_RELATIONAL_OP(lt, <)\n    DOCTEST_RELATIONAL_OP(gt, >)\n    DOCTEST_RELATIONAL_OP(le, <=)\n    DOCTEST_RELATIONAL_OP(ge, >=)\n} // namespace detail\n} // namespace doctest\n\n#define DOCTEST_WARN_EQ(...) [&] { return doctest::detail::eq(__VA_ARGS__); }()\n#define DOCTEST_CHECK_EQ(...) [&] { return doctest::detail::eq(__VA_ARGS__); }()\n#define DOCTEST_REQUIRE_EQ(...) [&] { return doctest::detail::eq(__VA_ARGS__); }()\n#define DOCTEST_WARN_NE(...) [&] { return doctest::detail::ne(__VA_ARGS__); }()\n#define DOCTEST_CHECK_NE(...) [&] { return doctest::detail::ne(__VA_ARGS__); }()\n#define DOCTEST_REQUIRE_NE(...) [&] { return doctest::detail::ne(__VA_ARGS__); }()\n#define DOCTEST_WARN_LT(...) [&] { return doctest::detail::lt(__VA_ARGS__); }()\n#define DOCTEST_CHECK_LT(...) [&] { return doctest::detail::lt(__VA_ARGS__); }()\n#define DOCTEST_REQUIRE_LT(...) [&] { return doctest::detail::lt(__VA_ARGS__); }()\n#define DOCTEST_WARN_GT(...) [&] { return doctest::detail::gt(__VA_ARGS__); }()\n#define DOCTEST_CHECK_GT(...) [&] { return doctest::detail::gt(__VA_ARGS__); }()\n#define DOCTEST_REQUIRE_GT(...) [&] { return doctest::detail::gt(__VA_ARGS__); }()\n#define DOCTEST_WARN_LE(...) [&] { return doctest::detail::le(__VA_ARGS__); }()\n#define DOCTEST_CHECK_LE(...) [&] { return doctest::detail::le(__VA_ARGS__); }()\n#define DOCTEST_REQUIRE_LE(...) [&] { return doctest::detail::le(__VA_ARGS__); }()\n#define DOCTEST_WARN_GE(...) [&] { return doctest::detail::ge(__VA_ARGS__); }()\n#define DOCTEST_CHECK_GE(...) [&] { return doctest::detail::ge(__VA_ARGS__); }()\n#define DOCTEST_REQUIRE_GE(...) [&] { return doctest::detail::ge(__VA_ARGS__); }()\n#define DOCTEST_WARN_UNARY(...) [&] { return __VA_ARGS__; }()\n#define DOCTEST_CHECK_UNARY(...) [&] { return __VA_ARGS__; }()\n#define DOCTEST_REQUIRE_UNARY(...) [&] { return __VA_ARGS__; }()\n#define DOCTEST_WARN_UNARY_FALSE(...) [&] { return !(__VA_ARGS__); }()\n#define DOCTEST_CHECK_UNARY_FALSE(...) [&] { return !(__VA_ARGS__); }()\n#define DOCTEST_REQUIRE_UNARY_FALSE(...) [&] { return !(__VA_ARGS__); }()\n\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n\n#define DOCTEST_WARN_THROWS_WITH(expr, with, ...) [] { static_assert(false, \"Exception translation is not available when doctest is disabled.\"); return false; }()\n#define DOCTEST_CHECK_THROWS_WITH(expr, with, ...) DOCTEST_WARN_THROWS_WITH(,,)\n#define DOCTEST_REQUIRE_THROWS_WITH(expr, with, ...) DOCTEST_WARN_THROWS_WITH(,,)\n#define DOCTEST_WARN_THROWS_WITH_AS(expr, with, ex, ...) DOCTEST_WARN_THROWS_WITH(,,)\n#define DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ex, ...) DOCTEST_WARN_THROWS_WITH(,,)\n#define DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ex, ...) DOCTEST_WARN_THROWS_WITH(,,)\n\n#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_WARN_THROWS_WITH(,,)\n#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_WARN_THROWS_WITH(,,)\n#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_WARN_THROWS_WITH(,,)\n#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_WARN_THROWS_WITH(,,)\n#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_WARN_THROWS_WITH(,,)\n#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_WARN_THROWS_WITH(,,)\n\n#define DOCTEST_WARN_THROWS(...) [&] { try { __VA_ARGS__; return false; } catch (...) { return true; } }()\n#define DOCTEST_CHECK_THROWS(...) [&] { try { __VA_ARGS__; return false; } catch (...) { return true; } }()\n#define DOCTEST_REQUIRE_THROWS(...) [&] { try { __VA_ARGS__; return false; } catch (...) { return true; } }()\n#define DOCTEST_WARN_THROWS_AS(expr, ...) [&] { try { expr; } catch (__VA_ARGS__) { return true; } catch (...) { } return false; }()\n#define DOCTEST_CHECK_THROWS_AS(expr, ...) [&] { try { expr; } catch (__VA_ARGS__) { return true; } catch (...) { } return false; }()\n#define DOCTEST_REQUIRE_THROWS_AS(expr, ...) [&] { try { expr; } catch (__VA_ARGS__) { return true; } catch (...) { } return false; }()\n#define DOCTEST_WARN_NOTHROW(...) [&] { try { __VA_ARGS__; return true; } catch (...) { return false; } }()\n#define DOCTEST_CHECK_NOTHROW(...) [&] { try { __VA_ARGS__; return true; } catch (...) { return false; } }()\n#define DOCTEST_REQUIRE_NOTHROW(...) [&] { try { __VA_ARGS__; return true; } catch (...) { return false; } }()\n\n#define DOCTEST_WARN_THROWS_MESSAGE(expr, ...) [&] { try { __VA_ARGS__; return false; } catch (...) { return true; } }()\n#define DOCTEST_CHECK_THROWS_MESSAGE(expr, ...) [&] { try { __VA_ARGS__; return false; } catch (...) { return true; } }()\n#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, ...) [&] { try { __VA_ARGS__; return false; } catch (...) { return true; } }()\n#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, ...) [&] { try { expr; } catch (__VA_ARGS__) { return true; } catch (...) { } return false; }()\n#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, ...) [&] { try { expr; } catch (__VA_ARGS__) { return true; } catch (...) { } return false; }()\n#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) [&] { try { expr; } catch (__VA_ARGS__) { return true; } catch (...) { } return false; }()\n#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, ...) [&] { try { __VA_ARGS__; return true; } catch (...) { return false; } }()\n#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, ...) [&] { try { __VA_ARGS__; return true; } catch (...) { return false; } }()\n#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, ...) [&] { try { __VA_ARGS__; return true; } catch (...) { return false; } }()\n\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n\n#else // DOCTEST_CONFIG_EVALUATE_ASSERTS_EVEN_WHEN_DISABLED\n\n#define DOCTEST_WARN(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_WARN_FALSE(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_FALSE(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_FALSE(...) DOCTEST_FUNC_EMPTY\n\n#define DOCTEST_WARN_MESSAGE(cond, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_MESSAGE(cond, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_MESSAGE(cond, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_WARN_FALSE_MESSAGE(cond, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_FALSE_MESSAGE(cond, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_FALSE_MESSAGE(cond, ...) DOCTEST_FUNC_EMPTY\n\n#define DOCTEST_WARN_EQ(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_EQ(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_EQ(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_WARN_NE(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_NE(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_NE(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_WARN_GT(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_GT(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_GT(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_WARN_LT(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_LT(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_LT(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_WARN_GE(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_GE(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_GE(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_WARN_LE(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_LE(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_LE(...) DOCTEST_FUNC_EMPTY\n\n#define DOCTEST_WARN_UNARY(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_UNARY(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_UNARY(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_WARN_UNARY_FALSE(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_UNARY_FALSE(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_UNARY_FALSE(...) DOCTEST_FUNC_EMPTY\n\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n\n#define DOCTEST_WARN_THROWS(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_THROWS(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_THROWS(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_WARN_THROWS_AS(expr, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_THROWS_AS(expr, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_THROWS_AS(expr, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_WARN_THROWS_WITH(expr, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_THROWS_WITH(expr, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_THROWS_WITH(expr, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_WARN_THROWS_WITH_AS(expr, with, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_WARN_NOTHROW(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_NOTHROW(...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_NOTHROW(...) DOCTEST_FUNC_EMPTY\n\n#define DOCTEST_WARN_THROWS_MESSAGE(expr, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_THROWS_MESSAGE(expr, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, ...) DOCTEST_FUNC_EMPTY\n#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, ...) DOCTEST_FUNC_EMPTY\n\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n\n#endif // DOCTEST_CONFIG_EVALUATE_ASSERTS_EVEN_WHEN_DISABLED\n\n#endif // DOCTEST_CONFIG_DISABLE\n\n#ifdef DOCTEST_CONFIG_NO_EXCEPTIONS\n\n#ifdef DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS\n#define DOCTEST_EXCEPTION_EMPTY_FUNC DOCTEST_FUNC_EMPTY\n#else // DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS\n#define DOCTEST_EXCEPTION_EMPTY_FUNC [] { static_assert(false, \"Exceptions are disabled! \" \\\n    \"Use DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS if you want to compile with exceptions disabled.\"); return false; }()\n\n#undef DOCTEST_REQUIRE\n#undef DOCTEST_REQUIRE_FALSE\n#undef DOCTEST_REQUIRE_MESSAGE\n#undef DOCTEST_REQUIRE_FALSE_MESSAGE\n#undef DOCTEST_REQUIRE_EQ\n#undef DOCTEST_REQUIRE_NE\n#undef DOCTEST_REQUIRE_GT\n#undef DOCTEST_REQUIRE_LT\n#undef DOCTEST_REQUIRE_GE\n#undef DOCTEST_REQUIRE_LE\n#undef DOCTEST_REQUIRE_UNARY\n#undef DOCTEST_REQUIRE_UNARY_FALSE\n\n#define DOCTEST_REQUIRE DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_FALSE DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_MESSAGE DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_FALSE_MESSAGE DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_EQ DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_NE DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_GT DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_LT DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_GE DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_LE DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_UNARY DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_UNARY_FALSE DOCTEST_EXCEPTION_EMPTY_FUNC\n\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS\n\n#define DOCTEST_WARN_THROWS(...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_CHECK_THROWS(...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_THROWS(...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_WARN_THROWS_AS(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_CHECK_THROWS_AS(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_THROWS_AS(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_WARN_THROWS_WITH(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_CHECK_THROWS_WITH(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_THROWS_WITH(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_WARN_THROWS_WITH_AS(expr, with, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_WARN_NOTHROW(...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_CHECK_NOTHROW(...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_NOTHROW(...) DOCTEST_EXCEPTION_EMPTY_FUNC\n\n#define DOCTEST_WARN_THROWS_MESSAGE(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_CHECK_THROWS_MESSAGE(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC\n\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n\n// clang-format off\n// KEPT FOR BACKWARDS COMPATIBILITY - FORWARDING TO THE RIGHT MACROS\n#define DOCTEST_FAST_WARN_EQ             DOCTEST_WARN_EQ\n#define DOCTEST_FAST_CHECK_EQ            DOCTEST_CHECK_EQ\n#define DOCTEST_FAST_REQUIRE_EQ          DOCTEST_REQUIRE_EQ\n#define DOCTEST_FAST_WARN_NE             DOCTEST_WARN_NE\n#define DOCTEST_FAST_CHECK_NE            DOCTEST_CHECK_NE\n#define DOCTEST_FAST_REQUIRE_NE          DOCTEST_REQUIRE_NE\n#define DOCTEST_FAST_WARN_GT             DOCTEST_WARN_GT\n#define DOCTEST_FAST_CHECK_GT            DOCTEST_CHECK_GT\n#define DOCTEST_FAST_REQUIRE_GT          DOCTEST_REQUIRE_GT\n#define DOCTEST_FAST_WARN_LT             DOCTEST_WARN_LT\n#define DOCTEST_FAST_CHECK_LT            DOCTEST_CHECK_LT\n#define DOCTEST_FAST_REQUIRE_LT          DOCTEST_REQUIRE_LT\n#define DOCTEST_FAST_WARN_GE             DOCTEST_WARN_GE\n#define DOCTEST_FAST_CHECK_GE            DOCTEST_CHECK_GE\n#define DOCTEST_FAST_REQUIRE_GE          DOCTEST_REQUIRE_GE\n#define DOCTEST_FAST_WARN_LE             DOCTEST_WARN_LE\n#define DOCTEST_FAST_CHECK_LE            DOCTEST_CHECK_LE\n#define DOCTEST_FAST_REQUIRE_LE          DOCTEST_REQUIRE_LE\n\n#define DOCTEST_FAST_WARN_UNARY          DOCTEST_WARN_UNARY\n#define DOCTEST_FAST_CHECK_UNARY         DOCTEST_CHECK_UNARY\n#define DOCTEST_FAST_REQUIRE_UNARY       DOCTEST_REQUIRE_UNARY\n#define DOCTEST_FAST_WARN_UNARY_FALSE    DOCTEST_WARN_UNARY_FALSE\n#define DOCTEST_FAST_CHECK_UNARY_FALSE   DOCTEST_CHECK_UNARY_FALSE\n#define DOCTEST_FAST_REQUIRE_UNARY_FALSE DOCTEST_REQUIRE_UNARY_FALSE\n\n#define DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE(id, ...) DOCTEST_TEST_CASE_TEMPLATE_INVOKE(id,__VA_ARGS__)\n// clang-format on\n\n// BDD style macros\n// clang-format off\n#define DOCTEST_SCENARIO(name) DOCTEST_TEST_CASE(\"  Scenario: \" name)\n#define DOCTEST_SCENARIO_CLASS(name) DOCTEST_TEST_CASE_CLASS(\"  Scenario: \" name)\n#define DOCTEST_SCENARIO_TEMPLATE(name, T, ...)  DOCTEST_TEST_CASE_TEMPLATE(\"  Scenario: \" name, T, __VA_ARGS__)\n#define DOCTEST_SCENARIO_TEMPLATE_DEFINE(name, T, id) DOCTEST_TEST_CASE_TEMPLATE_DEFINE(\"  Scenario: \" name, T, id)\n\n#define DOCTEST_GIVEN(name)     DOCTEST_SUBCASE(\"   Given: \" name)\n#define DOCTEST_WHEN(name)      DOCTEST_SUBCASE(\"    When: \" name)\n#define DOCTEST_AND_WHEN(name)  DOCTEST_SUBCASE(\"And when: \" name)\n#define DOCTEST_THEN(name)      DOCTEST_SUBCASE(\"    Then: \" name)\n#define DOCTEST_AND_THEN(name)  DOCTEST_SUBCASE(\"     And: \" name)\n// clang-format on\n\n// == SHORT VERSIONS OF THE MACROS\n#ifndef DOCTEST_CONFIG_NO_SHORT_MACRO_NAMES\n\n#define TEST_CASE(name) DOCTEST_TEST_CASE(name)\n#define TEST_CASE_CLASS(name) DOCTEST_TEST_CASE_CLASS(name)\n#define TEST_CASE_FIXTURE(x, name) DOCTEST_TEST_CASE_FIXTURE(x, name)\n#define TYPE_TO_STRING_AS(str, ...) DOCTEST_TYPE_TO_STRING_AS(str, __VA_ARGS__)\n#define TYPE_TO_STRING(...) DOCTEST_TYPE_TO_STRING(__VA_ARGS__)\n#define TEST_CASE_TEMPLATE(name, T, ...) DOCTEST_TEST_CASE_TEMPLATE(name, T, __VA_ARGS__)\n#define TEST_CASE_TEMPLATE_DEFINE(name, T, id) DOCTEST_TEST_CASE_TEMPLATE_DEFINE(name, T, id)\n#define TEST_CASE_TEMPLATE_INVOKE(id, ...) DOCTEST_TEST_CASE_TEMPLATE_INVOKE(id, __VA_ARGS__)\n#define TEST_CASE_TEMPLATE_APPLY(id, ...) DOCTEST_TEST_CASE_TEMPLATE_APPLY(id, __VA_ARGS__)\n#define SUBCASE(name) DOCTEST_SUBCASE(name)\n#define TEST_SUITE(decorators) DOCTEST_TEST_SUITE(decorators)\n#define TEST_SUITE_BEGIN(name) DOCTEST_TEST_SUITE_BEGIN(name)\n#define TEST_SUITE_END DOCTEST_TEST_SUITE_END\n#define REGISTER_EXCEPTION_TRANSLATOR(signature) DOCTEST_REGISTER_EXCEPTION_TRANSLATOR(signature)\n#define REGISTER_REPORTER(name, priority, reporter) DOCTEST_REGISTER_REPORTER(name, priority, reporter)\n#define REGISTER_LISTENER(name, priority, reporter) DOCTEST_REGISTER_LISTENER(name, priority, reporter)\n#define INFO(...) DOCTEST_INFO(__VA_ARGS__)\n#define CAPTURE(x) DOCTEST_CAPTURE(x)\n#define ADD_MESSAGE_AT(file, line, ...) DOCTEST_ADD_MESSAGE_AT(file, line, __VA_ARGS__)\n#define ADD_FAIL_CHECK_AT(file, line, ...) DOCTEST_ADD_FAIL_CHECK_AT(file, line, __VA_ARGS__)\n#define ADD_FAIL_AT(file, line, ...) DOCTEST_ADD_FAIL_AT(file, line, __VA_ARGS__)\n#define MESSAGE(...) DOCTEST_MESSAGE(__VA_ARGS__)\n#define FAIL_CHECK(...) DOCTEST_FAIL_CHECK(__VA_ARGS__)\n#define FAIL(...) DOCTEST_FAIL(__VA_ARGS__)\n#define TO_LVALUE(...) DOCTEST_TO_LVALUE(__VA_ARGS__)\n\n#define WARN(...) DOCTEST_WARN(__VA_ARGS__)\n#define WARN_FALSE(...) DOCTEST_WARN_FALSE(__VA_ARGS__)\n#define WARN_THROWS(...) DOCTEST_WARN_THROWS(__VA_ARGS__)\n#define WARN_THROWS_AS(expr, ...) DOCTEST_WARN_THROWS_AS(expr, __VA_ARGS__)\n#define WARN_THROWS_WITH(expr, ...) DOCTEST_WARN_THROWS_WITH(expr, __VA_ARGS__)\n#define WARN_THROWS_WITH_AS(expr, with, ...) DOCTEST_WARN_THROWS_WITH_AS(expr, with, __VA_ARGS__)\n#define WARN_NOTHROW(...) DOCTEST_WARN_NOTHROW(__VA_ARGS__)\n#define CHECK(...) DOCTEST_CHECK(__VA_ARGS__)\n#define CHECK_FALSE(...) DOCTEST_CHECK_FALSE(__VA_ARGS__)\n#define CHECK_THROWS(...) DOCTEST_CHECK_THROWS(__VA_ARGS__)\n#define CHECK_THROWS_AS(expr, ...) DOCTEST_CHECK_THROWS_AS(expr, __VA_ARGS__)\n#define CHECK_THROWS_WITH(expr, ...) DOCTEST_CHECK_THROWS_WITH(expr, __VA_ARGS__)\n#define CHECK_THROWS_WITH_AS(expr, with, ...) DOCTEST_CHECK_THROWS_WITH_AS(expr, with, __VA_ARGS__)\n#define CHECK_NOTHROW(...) DOCTEST_CHECK_NOTHROW(__VA_ARGS__)\n#define REQUIRE(...) DOCTEST_REQUIRE(__VA_ARGS__)\n#define REQUIRE_FALSE(...) DOCTEST_REQUIRE_FALSE(__VA_ARGS__)\n#define REQUIRE_THROWS(...) DOCTEST_REQUIRE_THROWS(__VA_ARGS__)\n#define REQUIRE_THROWS_AS(expr, ...) DOCTEST_REQUIRE_THROWS_AS(expr, __VA_ARGS__)\n#define REQUIRE_THROWS_WITH(expr, ...) DOCTEST_REQUIRE_THROWS_WITH(expr, __VA_ARGS__)\n#define REQUIRE_THROWS_WITH_AS(expr, with, ...) DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, __VA_ARGS__)\n#define REQUIRE_NOTHROW(...) DOCTEST_REQUIRE_NOTHROW(__VA_ARGS__)\n\n#define WARN_MESSAGE(cond, ...) DOCTEST_WARN_MESSAGE(cond, __VA_ARGS__)\n#define WARN_FALSE_MESSAGE(cond, ...) DOCTEST_WARN_FALSE_MESSAGE(cond, __VA_ARGS__)\n#define WARN_THROWS_MESSAGE(expr, ...) DOCTEST_WARN_THROWS_MESSAGE(expr, __VA_ARGS__)\n#define WARN_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, __VA_ARGS__)\n#define WARN_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, __VA_ARGS__)\n#define WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, __VA_ARGS__)\n#define WARN_NOTHROW_MESSAGE(expr, ...) DOCTEST_WARN_NOTHROW_MESSAGE(expr, __VA_ARGS__)\n#define CHECK_MESSAGE(cond, ...) DOCTEST_CHECK_MESSAGE(cond, __VA_ARGS__)\n#define CHECK_FALSE_MESSAGE(cond, ...) DOCTEST_CHECK_FALSE_MESSAGE(cond, __VA_ARGS__)\n#define CHECK_THROWS_MESSAGE(expr, ...) DOCTEST_CHECK_THROWS_MESSAGE(expr, __VA_ARGS__)\n#define CHECK_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, __VA_ARGS__)\n#define CHECK_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, __VA_ARGS__)\n#define CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, __VA_ARGS__)\n#define CHECK_NOTHROW_MESSAGE(expr, ...) DOCTEST_CHECK_NOTHROW_MESSAGE(expr, __VA_ARGS__)\n#define REQUIRE_MESSAGE(cond, ...) DOCTEST_REQUIRE_MESSAGE(cond, __VA_ARGS__)\n#define REQUIRE_FALSE_MESSAGE(cond, ...) DOCTEST_REQUIRE_FALSE_MESSAGE(cond, __VA_ARGS__)\n#define REQUIRE_THROWS_MESSAGE(expr, ...) DOCTEST_REQUIRE_THROWS_MESSAGE(expr, __VA_ARGS__)\n#define REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, __VA_ARGS__)\n#define REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, __VA_ARGS__)\n#define REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, __VA_ARGS__)\n#define REQUIRE_NOTHROW_MESSAGE(expr, ...) DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, __VA_ARGS__)\n\n#define SCENARIO(name) DOCTEST_SCENARIO(name)\n#define SCENARIO_CLASS(name) DOCTEST_SCENARIO_CLASS(name)\n#define SCENARIO_TEMPLATE(name, T, ...) DOCTEST_SCENARIO_TEMPLATE(name, T, __VA_ARGS__)\n#define SCENARIO_TEMPLATE_DEFINE(name, T, id) DOCTEST_SCENARIO_TEMPLATE_DEFINE(name, T, id)\n#define GIVEN(name) DOCTEST_GIVEN(name)\n#define WHEN(name) DOCTEST_WHEN(name)\n#define AND_WHEN(name) DOCTEST_AND_WHEN(name)\n#define THEN(name) DOCTEST_THEN(name)\n#define AND_THEN(name) DOCTEST_AND_THEN(name)\n\n#define WARN_EQ(...) DOCTEST_WARN_EQ(__VA_ARGS__)\n#define CHECK_EQ(...) DOCTEST_CHECK_EQ(__VA_ARGS__)\n#define REQUIRE_EQ(...) DOCTEST_REQUIRE_EQ(__VA_ARGS__)\n#define WARN_NE(...) DOCTEST_WARN_NE(__VA_ARGS__)\n#define CHECK_NE(...) DOCTEST_CHECK_NE(__VA_ARGS__)\n#define REQUIRE_NE(...) DOCTEST_REQUIRE_NE(__VA_ARGS__)\n#define WARN_GT(...) DOCTEST_WARN_GT(__VA_ARGS__)\n#define CHECK_GT(...) DOCTEST_CHECK_GT(__VA_ARGS__)\n#define REQUIRE_GT(...) DOCTEST_REQUIRE_GT(__VA_ARGS__)\n#define WARN_LT(...) DOCTEST_WARN_LT(__VA_ARGS__)\n#define CHECK_LT(...) DOCTEST_CHECK_LT(__VA_ARGS__)\n#define REQUIRE_LT(...) DOCTEST_REQUIRE_LT(__VA_ARGS__)\n#define WARN_GE(...) DOCTEST_WARN_GE(__VA_ARGS__)\n#define CHECK_GE(...) DOCTEST_CHECK_GE(__VA_ARGS__)\n#define REQUIRE_GE(...) DOCTEST_REQUIRE_GE(__VA_ARGS__)\n#define WARN_LE(...) DOCTEST_WARN_LE(__VA_ARGS__)\n#define CHECK_LE(...) DOCTEST_CHECK_LE(__VA_ARGS__)\n#define REQUIRE_LE(...) DOCTEST_REQUIRE_LE(__VA_ARGS__)\n#define WARN_UNARY(...) DOCTEST_WARN_UNARY(__VA_ARGS__)\n#define CHECK_UNARY(...) DOCTEST_CHECK_UNARY(__VA_ARGS__)\n#define REQUIRE_UNARY(...) DOCTEST_REQUIRE_UNARY(__VA_ARGS__)\n#define WARN_UNARY_FALSE(...) DOCTEST_WARN_UNARY_FALSE(__VA_ARGS__)\n#define CHECK_UNARY_FALSE(...) DOCTEST_CHECK_UNARY_FALSE(__VA_ARGS__)\n#define REQUIRE_UNARY_FALSE(...) DOCTEST_REQUIRE_UNARY_FALSE(__VA_ARGS__)\n\n// KEPT FOR BACKWARDS COMPATIBILITY\n#define FAST_WARN_EQ(...) DOCTEST_FAST_WARN_EQ(__VA_ARGS__)\n#define FAST_CHECK_EQ(...) DOCTEST_FAST_CHECK_EQ(__VA_ARGS__)\n#define FAST_REQUIRE_EQ(...) DOCTEST_FAST_REQUIRE_EQ(__VA_ARGS__)\n#define FAST_WARN_NE(...) DOCTEST_FAST_WARN_NE(__VA_ARGS__)\n#define FAST_CHECK_NE(...) DOCTEST_FAST_CHECK_NE(__VA_ARGS__)\n#define FAST_REQUIRE_NE(...) DOCTEST_FAST_REQUIRE_NE(__VA_ARGS__)\n#define FAST_WARN_GT(...) DOCTEST_FAST_WARN_GT(__VA_ARGS__)\n#define FAST_CHECK_GT(...) DOCTEST_FAST_CHECK_GT(__VA_ARGS__)\n#define FAST_REQUIRE_GT(...) DOCTEST_FAST_REQUIRE_GT(__VA_ARGS__)\n#define FAST_WARN_LT(...) DOCTEST_FAST_WARN_LT(__VA_ARGS__)\n#define FAST_CHECK_LT(...) DOCTEST_FAST_CHECK_LT(__VA_ARGS__)\n#define FAST_REQUIRE_LT(...) DOCTEST_FAST_REQUIRE_LT(__VA_ARGS__)\n#define FAST_WARN_GE(...) DOCTEST_FAST_WARN_GE(__VA_ARGS__)\n#define FAST_CHECK_GE(...) DOCTEST_FAST_CHECK_GE(__VA_ARGS__)\n#define FAST_REQUIRE_GE(...) DOCTEST_FAST_REQUIRE_GE(__VA_ARGS__)\n#define FAST_WARN_LE(...) DOCTEST_FAST_WARN_LE(__VA_ARGS__)\n#define FAST_CHECK_LE(...) DOCTEST_FAST_CHECK_LE(__VA_ARGS__)\n#define FAST_REQUIRE_LE(...) DOCTEST_FAST_REQUIRE_LE(__VA_ARGS__)\n\n#define FAST_WARN_UNARY(...) DOCTEST_FAST_WARN_UNARY(__VA_ARGS__)\n#define FAST_CHECK_UNARY(...) DOCTEST_FAST_CHECK_UNARY(__VA_ARGS__)\n#define FAST_REQUIRE_UNARY(...) DOCTEST_FAST_REQUIRE_UNARY(__VA_ARGS__)\n#define FAST_WARN_UNARY_FALSE(...) DOCTEST_FAST_WARN_UNARY_FALSE(__VA_ARGS__)\n#define FAST_CHECK_UNARY_FALSE(...) DOCTEST_FAST_CHECK_UNARY_FALSE(__VA_ARGS__)\n#define FAST_REQUIRE_UNARY_FALSE(...) DOCTEST_FAST_REQUIRE_UNARY_FALSE(__VA_ARGS__)\n\n#define TEST_CASE_TEMPLATE_INSTANTIATE(id, ...) DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE(id, __VA_ARGS__)\n\n#endif // DOCTEST_CONFIG_NO_SHORT_MACRO_NAMES\n\n#ifndef DOCTEST_CONFIG_DISABLE\n\n// this is here to clear the 'current test suite' for the current translation unit - at the top\nDOCTEST_TEST_SUITE_END();\n\n#endif // DOCTEST_CONFIG_DISABLE\n\nDOCTEST_CLANG_SUPPRESS_WARNING_POP\nDOCTEST_MSVC_SUPPRESS_WARNING_POP\nDOCTEST_GCC_SUPPRESS_WARNING_POP\n\nDOCTEST_SUPPRESS_COMMON_WARNINGS_POP\n\n#endif // DOCTEST_LIBRARY_INCLUDED\n\n#ifndef DOCTEST_SINGLE_HEADER\n#define DOCTEST_SINGLE_HEADER\n#endif // DOCTEST_SINGLE_HEADER\n\n#if defined(DOCTEST_CONFIG_IMPLEMENT) || !defined(DOCTEST_SINGLE_HEADER)\n\n#ifndef DOCTEST_SINGLE_HEADER\n#include \"doctest_fwd.h\"\n#endif // DOCTEST_SINGLE_HEADER\n\nDOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Wunused-macros\")\n\n#ifndef DOCTEST_LIBRARY_IMPLEMENTATION\n#define DOCTEST_LIBRARY_IMPLEMENTATION\n\nDOCTEST_CLANG_SUPPRESS_WARNING_POP\n\nDOCTEST_SUPPRESS_COMMON_WARNINGS_PUSH\n\nDOCTEST_CLANG_SUPPRESS_WARNING_PUSH\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wglobal-constructors\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wexit-time-destructors\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wsign-conversion\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wshorten-64-to-32\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wmissing-variable-declarations\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wswitch\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wswitch-enum\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wcovered-switch-default\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wmissing-noreturn\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wdisabled-macro-expansion\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wmissing-braces\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wmissing-field-initializers\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wunused-member-function\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wnonportable-system-include-path\")\n\nDOCTEST_GCC_SUPPRESS_WARNING_PUSH\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wconversion\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wsign-conversion\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wmissing-field-initializers\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wmissing-braces\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wswitch\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wswitch-enum\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wswitch-default\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wunsafe-loop-optimizations\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wold-style-cast\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wunused-function\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wmultiple-inheritance\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wsuggest-attribute\")\n\nDOCTEST_MSVC_SUPPRESS_WARNING_PUSH\nDOCTEST_MSVC_SUPPRESS_WARNING(4267) // 'var' : conversion from 'x' to 'y', possible loss of data\nDOCTEST_MSVC_SUPPRESS_WARNING(4530) // C++ exception handler used, but unwind semantics not enabled\nDOCTEST_MSVC_SUPPRESS_WARNING(4577) // 'noexcept' used with no exception handling mode specified\nDOCTEST_MSVC_SUPPRESS_WARNING(4774) // format string expected in argument is not a string literal\nDOCTEST_MSVC_SUPPRESS_WARNING(4365) // conversion from 'int' to 'unsigned', signed/unsigned mismatch\nDOCTEST_MSVC_SUPPRESS_WARNING(5039) // pointer to potentially throwing function passed to extern C\nDOCTEST_MSVC_SUPPRESS_WARNING(4800) // forcing value to bool 'true' or 'false' (performance warning)\nDOCTEST_MSVC_SUPPRESS_WARNING(5245) // unreferenced function with internal linkage has been removed\n\nDOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN\n\n// required includes - will go only in one translation unit!\n#include <ctime>\n#include <cmath>\n#include <climits>\n// borland (Embarcadero) compiler requires math.h and not cmath - https://github.com/doctest/doctest/pull/37\n#ifdef __BORLANDC__\n#include <math.h>\n#endif // __BORLANDC__\n#include <new>\n#include <cstdio>\n#include <cstdlib>\n#include <cstring>\n#include <limits>\n#include <utility>\n#include <fstream>\n#include <sstream>\n#ifndef DOCTEST_CONFIG_NO_INCLUDE_IOSTREAM\n#include <iostream>\n#endif // DOCTEST_CONFIG_NO_INCLUDE_IOSTREAM\n#include <algorithm>\n#include <iomanip>\n#include <vector>\n#ifndef DOCTEST_CONFIG_NO_MULTITHREADING\n#include <atomic>\n#include <mutex>\n#define DOCTEST_DECLARE_MUTEX(name) std::mutex name;\n#define DOCTEST_DECLARE_STATIC_MUTEX(name) static DOCTEST_DECLARE_MUTEX(name)\n#define DOCTEST_LOCK_MUTEX(name) std::lock_guard<std::mutex> DOCTEST_ANONYMOUS(DOCTEST_ANON_LOCK_)(name);\n#else // DOCTEST_CONFIG_NO_MULTITHREADING\n#define DOCTEST_DECLARE_MUTEX(name)\n#define DOCTEST_DECLARE_STATIC_MUTEX(name)\n#define DOCTEST_LOCK_MUTEX(name)\n#endif // DOCTEST_CONFIG_NO_MULTITHREADING\n#include <set>\n#include <map>\n#include <unordered_set>\n#include <exception>\n#include <stdexcept>\n#include <csignal>\n#include <cfloat>\n#include <cctype>\n#include <cstdint>\n#include <string>\n\n#ifdef DOCTEST_PLATFORM_MAC\n#include <sys/types.h>\n#include <unistd.h>\n#include <sys/sysctl.h>\n#endif // DOCTEST_PLATFORM_MAC\n\n#ifdef DOCTEST_PLATFORM_WINDOWS\n\n// defines for a leaner windows.h\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#define DOCTEST_UNDEF_WIN32_LEAN_AND_MEAN\n#endif // WIN32_LEAN_AND_MEAN\n#ifndef NOMINMAX\n#define NOMINMAX\n#define DOCTEST_UNDEF_NOMINMAX\n#endif // NOMINMAX\n\n// not sure what AfxWin.h is for - here I do what Catch does\n#ifdef __AFXDLL\n#include <AfxWin.h>\n#else\n#include <windows.h>\n#endif\n#include <io.h>\n\n#else // DOCTEST_PLATFORM_WINDOWS\n\n#include <sys/time.h>\n#include <unistd.h>\n\n#endif // DOCTEST_PLATFORM_WINDOWS\n\n// this is a fix for https://github.com/doctest/doctest/issues/348\n// https://mail.gnome.org/archives/xml/2012-January/msg00000.html\n#if !defined(HAVE_UNISTD_H) && !defined(STDOUT_FILENO)\n#define STDOUT_FILENO fileno(stdout)\n#endif // HAVE_UNISTD_H\n\nDOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END\n\n// counts the number of elements in a C array\n#define DOCTEST_COUNTOF(x) (sizeof(x) / sizeof(x[0]))\n\n#ifdef DOCTEST_CONFIG_DISABLE\n#define DOCTEST_BRANCH_ON_DISABLED(if_disabled, if_not_disabled) if_disabled\n#else // DOCTEST_CONFIG_DISABLE\n#define DOCTEST_BRANCH_ON_DISABLED(if_disabled, if_not_disabled) if_not_disabled\n#endif // DOCTEST_CONFIG_DISABLE\n\n#ifndef DOCTEST_CONFIG_OPTIONS_PREFIX\n#define DOCTEST_CONFIG_OPTIONS_PREFIX \"dt-\"\n#endif\n\n#ifndef DOCTEST_THREAD_LOCAL\n#if defined(DOCTEST_CONFIG_NO_MULTITHREADING) || DOCTEST_MSVC && (DOCTEST_MSVC < DOCTEST_COMPILER(19, 0, 0))\n#define DOCTEST_THREAD_LOCAL\n#else // DOCTEST_MSVC\n#define DOCTEST_THREAD_LOCAL thread_local\n#endif // DOCTEST_MSVC\n#endif // DOCTEST_THREAD_LOCAL\n\n#ifndef DOCTEST_MULTI_LANE_ATOMICS_THREAD_LANES\n#define DOCTEST_MULTI_LANE_ATOMICS_THREAD_LANES 32\n#endif\n\n#ifndef DOCTEST_MULTI_LANE_ATOMICS_CACHE_LINE_SIZE\n#define DOCTEST_MULTI_LANE_ATOMICS_CACHE_LINE_SIZE 64\n#endif\n\n#ifdef DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS\n#define DOCTEST_OPTIONS_PREFIX_DISPLAY DOCTEST_CONFIG_OPTIONS_PREFIX\n#else\n#define DOCTEST_OPTIONS_PREFIX_DISPLAY \"\"\n#endif\n\n#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)\n#define DOCTEST_CONFIG_NO_MULTI_LANE_ATOMICS\n#endif\n\n#ifndef DOCTEST_CDECL\n#define DOCTEST_CDECL __cdecl\n#endif\n\nnamespace doctest {\n\nbool is_running_in_test = false;\n\nnamespace {\n    using namespace detail;\n\n    template <typename Ex>\n    DOCTEST_NORETURN void throw_exception(Ex const& e) {\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n        throw e;\n#else  // DOCTEST_CONFIG_NO_EXCEPTIONS\n#ifdef DOCTEST_CONFIG_HANDLE_EXCEPTION\n        DOCTEST_CONFIG_HANDLE_EXCEPTION(e);\n#else // DOCTEST_CONFIG_HANDLE_EXCEPTION\n#ifndef DOCTEST_CONFIG_NO_INCLUDE_IOSTREAM\n        std::cerr << \"doctest will terminate because it needed to throw an exception.\\n\"\n                  << \"The message was: \" << e.what() << '\\n';\n#endif // DOCTEST_CONFIG_NO_INCLUDE_IOSTREAM\n#endif // DOCTEST_CONFIG_HANDLE_EXCEPTION\n        std::terminate();\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n    }\n\n#ifndef DOCTEST_INTERNAL_ERROR\n#define DOCTEST_INTERNAL_ERROR(msg)                                                                \\\n    throw_exception(std::logic_error(                                                              \\\n            __FILE__ \":\" DOCTEST_TOSTR(__LINE__) \": Internal doctest error: \" msg))\n#endif // DOCTEST_INTERNAL_ERROR\n\n    // case insensitive strcmp\n    int stricmp(const char* a, const char* b) {\n        for(;; a++, b++) {\n            const int d = tolower(*a) - tolower(*b);\n            if(d != 0 || !*a)\n                return d;\n        }\n    }\n\n    struct Endianness\n    {\n        enum Arch\n        {\n            Big,\n            Little\n        };\n\n        static Arch which() {\n            int x = 1;\n            // casting any data pointer to char* is allowed\n            auto ptr = reinterpret_cast<char*>(&x);\n            if(*ptr)\n                return Little;\n            return Big;\n        }\n    };\n} // namespace\n\nnamespace detail {\n    class os_ostream {\n        std::vector<std::streampos> stack;\n        std::stringstream           ss;\n\n    public:\n        std::ostream* push() {\n            stack.push_back(ss.tellp());\n            return &ss;\n        }\n\n        String pop() {\n            if (stack.empty())\n                DOCTEST_INTERNAL_ERROR(\"TLSS was empty when trying to pop!\");\n\n            std::streampos pos = stack.back();\n            stack.pop_back();\n            unsigned sz = static_cast<unsigned>(ss.tellp() - pos);\n            ss.rdbuf()->pubseekpos(pos, std::ios::in | std::ios::out);\n            return String(ss, sz);\n        }\n    };\n\n    DOCTEST_THREAD_LOCAL doctest_thread_local_wrapper<os_ostream> wrapped_g_oss;\n\n    std::ostream* tlssPush() {\n        return wrapped_g_oss.get().push();\n    }\n\n    String tlssPop() {\n        return wrapped_g_oss.get().pop();\n    }\n\n#ifndef DOCTEST_CONFIG_DISABLE\n\nnamespace timer_large_integer\n{\n\n#if defined(DOCTEST_PLATFORM_WINDOWS)\n    using type = ULONGLONG;\n#else // DOCTEST_PLATFORM_WINDOWS\n    using type = std::uint64_t;\n#endif // DOCTEST_PLATFORM_WINDOWS\n}\n\nusing ticks_t = timer_large_integer::type;\n\n#ifdef DOCTEST_CONFIG_GETCURRENTTICKS\n    ticks_t getCurrentTicks() { return DOCTEST_CONFIG_GETCURRENTTICKS(); }\n#elif defined(DOCTEST_PLATFORM_WINDOWS)\n    ticks_t getCurrentTicks() {\n        static LARGE_INTEGER hz = { {0} }, hzo = { {0} };\n        if(!hz.QuadPart) {\n            QueryPerformanceFrequency(&hz);\n            QueryPerformanceCounter(&hzo);\n        }\n        LARGE_INTEGER t;\n        QueryPerformanceCounter(&t);\n        return ((t.QuadPart - hzo.QuadPart) * LONGLONG(1000000)) / hz.QuadPart;\n    }\n#else  // DOCTEST_PLATFORM_WINDOWS\n    ticks_t getCurrentTicks() {\n        timeval t;\n        gettimeofday(&t, nullptr);\n        return static_cast<ticks_t>(t.tv_sec) * 1000000 + static_cast<ticks_t>(t.tv_usec);\n    }\n#endif // DOCTEST_PLATFORM_WINDOWS\n\n    struct Timer\n    {\n        void         start() { m_ticks = getCurrentTicks(); }\n        unsigned int getElapsedMicroseconds() const {\n            return static_cast<unsigned int>(getCurrentTicks() - m_ticks);\n        }\n        //unsigned int getElapsedMilliseconds() const {\n        //    return static_cast<unsigned int>(getElapsedMicroseconds() / 1000);\n        //}\n        double getElapsedSeconds() const { return static_cast<double>(getCurrentTicks() - m_ticks) / 1000000.0; }\n\n    private:\n        ticks_t m_ticks = 0;\n    };\n\n#ifdef DOCTEST_CONFIG_NO_MULTITHREADING\n    template <typename T>\n    using Atomic = T;\n#else // DOCTEST_CONFIG_NO_MULTITHREADING\n    template <typename T>\n    using Atomic = std::atomic<T>;\n#endif // DOCTEST_CONFIG_NO_MULTITHREADING\n\n#if defined(DOCTEST_CONFIG_NO_MULTI_LANE_ATOMICS) || defined(DOCTEST_CONFIG_NO_MULTITHREADING)\n    template <typename T>\n    using MultiLaneAtomic = Atomic<T>;\n#else // DOCTEST_CONFIG_NO_MULTI_LANE_ATOMICS\n    // Provides a multilane implementation of an atomic variable that supports add, sub, load,\n    // store. Instead of using a single atomic variable, this splits up into multiple ones,\n    // each sitting on a separate cache line. The goal is to provide a speedup when most\n    // operations are modifying. It achieves this with two properties:\n    //\n    // * Multiple atomics are used, so chance of congestion from the same atomic is reduced.\n    // * Each atomic sits on a separate cache line, so false sharing is reduced.\n    //\n    // The disadvantage is that there is a small overhead due to the use of TLS, and load/store\n    // is slower because all atomics have to be accessed.\n    template <typename T>\n    class MultiLaneAtomic\n    {\n        struct CacheLineAlignedAtomic\n        {\n            Atomic<T> atomic{};\n            char padding[DOCTEST_MULTI_LANE_ATOMICS_CACHE_LINE_SIZE - sizeof(Atomic<T>)];\n        };\n        CacheLineAlignedAtomic m_atomics[DOCTEST_MULTI_LANE_ATOMICS_THREAD_LANES];\n\n        static_assert(sizeof(CacheLineAlignedAtomic) == DOCTEST_MULTI_LANE_ATOMICS_CACHE_LINE_SIZE,\n                      \"guarantee one atomic takes exactly one cache line\");\n\n    public:\n        T operator++() DOCTEST_NOEXCEPT { return fetch_add(1) + 1; }\n\n        T operator++(int) DOCTEST_NOEXCEPT { return fetch_add(1); }\n\n        T fetch_add(T arg, std::memory_order order = std::memory_order_seq_cst) DOCTEST_NOEXCEPT {\n            return myAtomic().fetch_add(arg, order);\n        }\n\n        T fetch_sub(T arg, std::memory_order order = std::memory_order_seq_cst) DOCTEST_NOEXCEPT {\n            return myAtomic().fetch_sub(arg, order);\n        }\n\n        operator T() const DOCTEST_NOEXCEPT { return load(); }\n\n        T load(std::memory_order order = std::memory_order_seq_cst) const DOCTEST_NOEXCEPT {\n            auto result = T();\n            for(auto const& c : m_atomics) {\n                result += c.atomic.load(order);\n            }\n            return result;\n        }\n\n        T operator=(T desired) DOCTEST_NOEXCEPT { // lgtm [cpp/assignment-does-not-return-this]\n            store(desired);\n            return desired;\n        }\n\n        void store(T desired, std::memory_order order = std::memory_order_seq_cst) DOCTEST_NOEXCEPT {\n            // first value becomes desired\", all others become 0.\n            for(auto& c : m_atomics) {\n                c.atomic.store(desired, order);\n                desired = {};\n            }\n        }\n\n    private:\n        // Each thread has a different atomic that it operates on. If more than NumLanes threads\n        // use this, some will use the same atomic. So performance will degrade a bit, but still\n        // everything will work.\n        //\n        // The logic here is a bit tricky. The call should be as fast as possible, so that there\n        // is minimal to no overhead in determining the correct atomic for the current thread.\n        //\n        // 1. A global static counter laneCounter counts continuously up.\n        // 2. Each successive thread will use modulo operation of that counter so it gets an atomic\n        //    assigned in a round-robin fashion.\n        // 3. This tlsLaneIdx is stored in the thread local data, so it is directly available with\n        //    little overhead.\n        Atomic<T>& myAtomic() DOCTEST_NOEXCEPT {\n            static Atomic<size_t> laneCounter;\n            DOCTEST_THREAD_LOCAL size_t tlsLaneIdx =\n                    laneCounter++ % DOCTEST_MULTI_LANE_ATOMICS_THREAD_LANES;\n\n            return m_atomics[tlsLaneIdx].atomic;\n        }\n    };\n#endif // DOCTEST_CONFIG_NO_MULTI_LANE_ATOMICS\n\n    // this holds both parameters from the command line and runtime data for tests\n    struct ContextState : ContextOptions, TestRunStats, CurrentTestCaseStats\n    {\n        MultiLaneAtomic<int> numAssertsCurrentTest_atomic;\n        MultiLaneAtomic<int> numAssertsFailedCurrentTest_atomic;\n\n        std::vector<std::vector<String>> filters = decltype(filters)(9); // 9 different filters\n\n        std::vector<IReporter*> reporters_currently_used;\n\n        assert_handler ah = nullptr;\n\n        Timer timer;\n\n        std::vector<String> stringifiedContexts; // logging from INFO() due to an exception\n\n        // stuff for subcases\n        bool reachedLeaf;\n        std::vector<SubcaseSignature> subcaseStack;\n        std::vector<SubcaseSignature> nextSubcaseStack;\n        std::unordered_set<unsigned long long> fullyTraversedSubcases;\n        size_t currentSubcaseDepth;\n        Atomic<bool> shouldLogCurrentException;\n\n        void resetRunData() {\n            numTestCases                = 0;\n            numTestCasesPassingFilters  = 0;\n            numTestSuitesPassingFilters = 0;\n            numTestCasesFailed          = 0;\n            numAsserts                  = 0;\n            numAssertsFailed            = 0;\n            numAssertsCurrentTest       = 0;\n            numAssertsFailedCurrentTest = 0;\n        }\n\n        void finalizeTestCaseData() {\n            seconds = timer.getElapsedSeconds();\n\n            // update the non-atomic counters\n            numAsserts += numAssertsCurrentTest_atomic;\n            numAssertsFailed += numAssertsFailedCurrentTest_atomic;\n            numAssertsCurrentTest       = numAssertsCurrentTest_atomic;\n            numAssertsFailedCurrentTest = numAssertsFailedCurrentTest_atomic;\n\n            if(numAssertsFailedCurrentTest)\n                failure_flags |= TestCaseFailureReason::AssertFailure;\n\n            if(Approx(currentTest->m_timeout).epsilon(DBL_EPSILON) != 0 &&\n               Approx(seconds).epsilon(DBL_EPSILON) > currentTest->m_timeout)\n                failure_flags |= TestCaseFailureReason::Timeout;\n\n            if(currentTest->m_should_fail) {\n                if(failure_flags) {\n                    failure_flags |= TestCaseFailureReason::ShouldHaveFailedAndDid;\n                } else {\n                    failure_flags |= TestCaseFailureReason::ShouldHaveFailedButDidnt;\n                }\n            } else if(failure_flags && currentTest->m_may_fail) {\n                failure_flags |= TestCaseFailureReason::CouldHaveFailedAndDid;\n            } else if(currentTest->m_expected_failures > 0) {\n                if(numAssertsFailedCurrentTest == currentTest->m_expected_failures) {\n                    failure_flags |= TestCaseFailureReason::FailedExactlyNumTimes;\n                } else {\n                    failure_flags |= TestCaseFailureReason::DidntFailExactlyNumTimes;\n                }\n            }\n\n            bool ok_to_fail = (TestCaseFailureReason::ShouldHaveFailedAndDid & failure_flags) ||\n                              (TestCaseFailureReason::CouldHaveFailedAndDid & failure_flags) ||\n                              (TestCaseFailureReason::FailedExactlyNumTimes & failure_flags);\n\n            // if any subcase has failed - the whole test case has failed\n            testCaseSuccess = !(failure_flags && !ok_to_fail);\n            if(!testCaseSuccess)\n                numTestCasesFailed++;\n        }\n    };\n\n    ContextState* g_cs = nullptr;\n\n    // used to avoid locks for the debug output\n    // TODO: figure out if this is indeed necessary/correct - seems like either there still\n    // could be a race or that there wouldn't be a race even if using the context directly\n    DOCTEST_THREAD_LOCAL bool g_no_colors;\n\n#endif // DOCTEST_CONFIG_DISABLE\n} // namespace detail\n\nchar* String::allocate(size_type sz) {\n    if (sz <= last) {\n        buf[sz] = '\\0';\n        setLast(last - sz);\n        return buf;\n    } else {\n        setOnHeap();\n        data.size = sz;\n        data.capacity = data.size + 1;\n        data.ptr = new char[data.capacity];\n        data.ptr[sz] = '\\0';\n        return data.ptr;\n    }\n}\n\nvoid String::setOnHeap() noexcept { *reinterpret_cast<unsigned char*>(&buf[last]) = 128; }\nvoid String::setLast(size_type in) noexcept { buf[last] = char(in); }\nvoid String::setSize(size_type sz) noexcept {\n    if (isOnStack()) { buf[sz] = '\\0'; setLast(last - sz); }\n    else { data.ptr[sz] = '\\0'; data.size = sz; }\n}\n\nvoid String::copy(const String& other) {\n    if(other.isOnStack()) {\n        memcpy(buf, other.buf, len);\n    } else {\n        memcpy(allocate(other.data.size), other.data.ptr, other.data.size);\n    }\n}\n\nString::String() noexcept {\n    buf[0] = '\\0';\n    setLast();\n}\n\nString::~String() {\n    if(!isOnStack())\n        delete[] data.ptr;\n} // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)\n\nString::String(const char* in)\n        : String(in, strlen(in)) {}\n\nString::String(const char* in, size_type in_size) {\n    memcpy(allocate(in_size), in, in_size);\n}\n\nString::String(std::istream& in, size_type in_size) {\n    in.read(allocate(in_size), in_size);\n}\n\nString::String(const String& other) { copy(other); }\n\nString& String::operator=(const String& other) {\n    if(this != &other) {\n        if(!isOnStack())\n            delete[] data.ptr;\n\n        copy(other);\n    }\n\n    return *this;\n}\n\nString& String::operator+=(const String& other) {\n    const size_type my_old_size = size();\n    const size_type other_size  = other.size();\n    const size_type total_size  = my_old_size + other_size;\n    if(isOnStack()) {\n        if(total_size < len) {\n            // append to the current stack space\n            memcpy(buf + my_old_size, other.c_str(), other_size + 1);\n            // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks)\n            setLast(last - total_size);\n        } else {\n            // alloc new chunk\n            char* temp = new char[total_size + 1];\n            // copy current data to new location before writing in the union\n            memcpy(temp, buf, my_old_size); // skip the +1 ('\\0') for speed\n            // update data in union\n            setOnHeap();\n            data.size     = total_size;\n            data.capacity = data.size + 1;\n            data.ptr      = temp;\n            // transfer the rest of the data\n            memcpy(data.ptr + my_old_size, other.c_str(), other_size + 1);\n        }\n    } else {\n        if(data.capacity > total_size) {\n            // append to the current heap block\n            data.size = total_size;\n            memcpy(data.ptr + my_old_size, other.c_str(), other_size + 1);\n        } else {\n            // resize\n            data.capacity *= 2;\n            if(data.capacity <= total_size)\n                data.capacity = total_size + 1;\n            // alloc new chunk\n            char* temp = new char[data.capacity];\n            // copy current data to new location before releasing it\n            memcpy(temp, data.ptr, my_old_size); // skip the +1 ('\\0') for speed\n            // release old chunk\n            delete[] data.ptr;\n            // update the rest of the union members\n            data.size = total_size;\n            data.ptr  = temp;\n            // transfer the rest of the data\n            memcpy(data.ptr + my_old_size, other.c_str(), other_size + 1);\n        }\n    }\n\n    return *this;\n}\n\nString::String(String&& other) noexcept {\n    memcpy(buf, other.buf, len);\n    other.buf[0] = '\\0';\n    other.setLast();\n}\n\nString& String::operator=(String&& other) noexcept {\n    if(this != &other) {\n        if(!isOnStack())\n            delete[] data.ptr;\n        memcpy(buf, other.buf, len);\n        other.buf[0] = '\\0';\n        other.setLast();\n    }\n    return *this;\n}\n\nchar String::operator[](size_type i) const {\n    return const_cast<String*>(this)->operator[](i);\n}\n\nchar& String::operator[](size_type i) {\n    if(isOnStack())\n        return reinterpret_cast<char*>(buf)[i];\n    return data.ptr[i];\n}\n\nDOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(\"-Wmaybe-uninitialized\")\nString::size_type String::size() const {\n    if(isOnStack())\n        return last - (size_type(buf[last]) & 31); // using \"last\" would work only if \"len\" is 32\n    return data.size;\n}\nDOCTEST_GCC_SUPPRESS_WARNING_POP\n\nString::size_type String::capacity() const {\n    if(isOnStack())\n        return len;\n    return data.capacity;\n}\n\nString String::substr(size_type pos, size_type cnt) && {\n    cnt = std::min(cnt, size() - 1 - pos);\n    char* cptr = c_str();\n    memmove(cptr, cptr + pos, cnt);\n    setSize(cnt);\n    return std::move(*this);\n}\n\nString String::substr(size_type pos, size_type cnt) const & {\n    cnt = std::min(cnt, size() - 1 - pos);\n    return String{ c_str() + pos, cnt };\n}\n\nString::size_type String::find(char ch, size_type pos) const {\n    const char* begin = c_str();\n    const char* end = begin + size();\n    const char* it = begin + pos;\n    for (; it < end && *it != ch; it++);\n    if (it < end) { return static_cast<size_type>(it - begin); }\n    else { return npos; }\n}\n\nString::size_type String::rfind(char ch, size_type pos) const {\n    const char* begin = c_str();\n    const char* it = begin + std::min(pos, size() - 1);\n    for (; it >= begin && *it != ch; it--);\n    if (it >= begin) { return static_cast<size_type>(it - begin); }\n    else { return npos; }\n}\n\nint String::compare(const char* other, bool no_case) const {\n    if(no_case)\n        return doctest::stricmp(c_str(), other);\n    return std::strcmp(c_str(), other);\n}\n\nint String::compare(const String& other, bool no_case) const {\n    return compare(other.c_str(), no_case);\n}\n\nString operator+(const String& lhs, const String& rhs) { return  String(lhs) += rhs; }\n\nbool operator==(const String& lhs, const String& rhs) { return lhs.compare(rhs) == 0; }\nbool operator!=(const String& lhs, const String& rhs) { return lhs.compare(rhs) != 0; }\nbool operator< (const String& lhs, const String& rhs) { return lhs.compare(rhs) < 0; }\nbool operator> (const String& lhs, const String& rhs) { return lhs.compare(rhs) > 0; }\nbool operator<=(const String& lhs, const String& rhs) { return (lhs != rhs) ? lhs.compare(rhs) < 0 : true; }\nbool operator>=(const String& lhs, const String& rhs) { return (lhs != rhs) ? lhs.compare(rhs) > 0 : true; }\n\nstd::ostream& operator<<(std::ostream& s, const String& in) { return s << in.c_str(); }\n\nContains::Contains(const String& str) : string(str) { }\n\nbool Contains::checkWith(const String& other) const {\n    return strstr(other.c_str(), string.c_str()) != nullptr;\n}\n\nString toString(const Contains& in) {\n    return \"Contains( \" + in.string + \" )\";\n}\n\nbool operator==(const String& lhs, const Contains& rhs) { return rhs.checkWith(lhs); }\nbool operator==(const Contains& lhs, const String& rhs) { return lhs.checkWith(rhs); }\nbool operator!=(const String& lhs, const Contains& rhs) { return !rhs.checkWith(lhs); }\nbool operator!=(const Contains& lhs, const String& rhs) { return !lhs.checkWith(rhs); }\n\nnamespace {\n    void color_to_stream(std::ostream&, Color::Enum) DOCTEST_BRANCH_ON_DISABLED({}, ;)\n} // namespace\n\nnamespace Color {\n    std::ostream& operator<<(std::ostream& s, Color::Enum code) {\n        color_to_stream(s, code);\n        return s;\n    }\n} // namespace Color\n\n// clang-format off\nconst char* assertString(assertType::Enum at) {\n    DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4061) // enum 'x' in switch of enum 'y' is not explicitly handled\n    #define DOCTEST_GENERATE_ASSERT_TYPE_CASE(assert_type) case assertType::DT_ ## assert_type: return #assert_type\n    #define DOCTEST_GENERATE_ASSERT_TYPE_CASES(assert_type) \\\n        DOCTEST_GENERATE_ASSERT_TYPE_CASE(WARN_ ## assert_type); \\\n        DOCTEST_GENERATE_ASSERT_TYPE_CASE(CHECK_ ## assert_type); \\\n        DOCTEST_GENERATE_ASSERT_TYPE_CASE(REQUIRE_ ## assert_type)\n    switch(at) {\n        DOCTEST_GENERATE_ASSERT_TYPE_CASE(WARN);\n        DOCTEST_GENERATE_ASSERT_TYPE_CASE(CHECK);\n        DOCTEST_GENERATE_ASSERT_TYPE_CASE(REQUIRE);\n\n        DOCTEST_GENERATE_ASSERT_TYPE_CASES(FALSE);\n\n        DOCTEST_GENERATE_ASSERT_TYPE_CASES(THROWS);\n\n        DOCTEST_GENERATE_ASSERT_TYPE_CASES(THROWS_AS);\n\n        DOCTEST_GENERATE_ASSERT_TYPE_CASES(THROWS_WITH);\n\n        DOCTEST_GENERATE_ASSERT_TYPE_CASES(THROWS_WITH_AS);\n\n        DOCTEST_GENERATE_ASSERT_TYPE_CASES(NOTHROW);\n\n        DOCTEST_GENERATE_ASSERT_TYPE_CASES(EQ);\n        DOCTEST_GENERATE_ASSERT_TYPE_CASES(NE);\n        DOCTEST_GENERATE_ASSERT_TYPE_CASES(GT);\n        DOCTEST_GENERATE_ASSERT_TYPE_CASES(LT);\n        DOCTEST_GENERATE_ASSERT_TYPE_CASES(GE);\n        DOCTEST_GENERATE_ASSERT_TYPE_CASES(LE);\n\n        DOCTEST_GENERATE_ASSERT_TYPE_CASES(UNARY);\n        DOCTEST_GENERATE_ASSERT_TYPE_CASES(UNARY_FALSE);\n\n        default: DOCTEST_INTERNAL_ERROR(\"Tried stringifying invalid assert type!\");\n    }\n    DOCTEST_MSVC_SUPPRESS_WARNING_POP\n}\n// clang-format on\n\nconst char* failureString(assertType::Enum at) {\n    if(at & assertType::is_warn) //!OCLINT bitwise operator in conditional\n        return \"WARNING\";\n    if(at & assertType::is_check) //!OCLINT bitwise operator in conditional\n        return \"ERROR\";\n    if(at & assertType::is_require) //!OCLINT bitwise operator in conditional\n        return \"FATAL ERROR\";\n    return \"\";\n}\n\nDOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Wnull-dereference\")\nDOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(\"-Wnull-dereference\")\n// depending on the current options this will remove the path of filenames\nconst char* skipPathFromFilename(const char* file) {\n#ifndef DOCTEST_CONFIG_DISABLE\n    if(getContextOptions()->no_path_in_filenames) {\n        auto back    = std::strrchr(file, '\\\\');\n        auto forward = std::strrchr(file, '/');\n        if(back || forward) {\n            if(back > forward)\n                forward = back;\n            return forward + 1;\n        }\n    }\n#endif // DOCTEST_CONFIG_DISABLE\n    return file;\n}\nDOCTEST_CLANG_SUPPRESS_WARNING_POP\nDOCTEST_GCC_SUPPRESS_WARNING_POP\n\nbool SubcaseSignature::operator==(const SubcaseSignature& other) const {\n    return m_line == other.m_line\n        && std::strcmp(m_file, other.m_file) == 0\n        && m_name == other.m_name;\n}\n\nbool SubcaseSignature::operator<(const SubcaseSignature& other) const {\n    if(m_line != other.m_line)\n        return m_line < other.m_line;\n    if(std::strcmp(m_file, other.m_file) != 0)\n        return std::strcmp(m_file, other.m_file) < 0;\n    return m_name.compare(other.m_name) < 0;\n}\n\nDOCTEST_DEFINE_INTERFACE(IContextScope)\n\nnamespace detail {\n    void filldata<const void*>::fill(std::ostream* stream, const void* in) {\n        if (in) { *stream << in; }\n        else { *stream << \"nullptr\"; }\n    }\n\n    template <typename T>\n    String toStreamLit(T t) {\n        std::ostream* os = tlssPush();\n        os->operator<<(t);\n        return tlssPop();\n    }\n}\n\n#ifdef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\nString toString(const char* in) { return String(\"\\\"\") + (in ? in : \"{null string}\") + \"\\\"\"; }\n#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n\n#if DOCTEST_MSVC >= DOCTEST_COMPILER(19, 20, 0)\n// see this issue on why this is needed: https://github.com/doctest/doctest/issues/183\nString toString(const std::string& in) { return in.c_str(); }\n#endif // VS 2019\n\nString toString(String in) { return in; }\n\nString toString(std::nullptr_t) { return \"nullptr\"; }\n\nString toString(bool in) { return in ? \"true\" : \"false\"; }\n\nString toString(float in) { return toStreamLit(in); }\nString toString(double in) { return toStreamLit(in); }\nString toString(double long in) { return toStreamLit(in); }\n\nString toString(char in) { return toStreamLit(static_cast<signed>(in)); }\nString toString(char signed in) { return toStreamLit(static_cast<signed>(in)); }\nString toString(char unsigned in) { return toStreamLit(static_cast<unsigned>(in)); }\nString toString(short in) { return toStreamLit(in); }\nString toString(short unsigned in) { return toStreamLit(in); }\nString toString(signed in) { return toStreamLit(in); }\nString toString(unsigned in) { return toStreamLit(in); }\nString toString(long in) { return toStreamLit(in); }\nString toString(long unsigned in) { return toStreamLit(in); }\nString toString(long long in) { return toStreamLit(in); }\nString toString(long long unsigned in) { return toStreamLit(in); }\n\nApprox::Approx(double value)\n        : m_epsilon(static_cast<double>(std::numeric_limits<float>::epsilon()) * 100)\n        , m_scale(1.0)\n        , m_value(value) {}\n\nApprox Approx::operator()(double value) const {\n    Approx approx(value);\n    approx.epsilon(m_epsilon);\n    approx.scale(m_scale);\n    return approx;\n}\n\nApprox& Approx::epsilon(double newEpsilon) {\n    m_epsilon = newEpsilon;\n    return *this;\n}\nApprox& Approx::scale(double newScale) {\n    m_scale = newScale;\n    return *this;\n}\n\nbool operator==(double lhs, const Approx& rhs) {\n    // Thanks to Richard Harris for his help refining this formula\n    return std::fabs(lhs - rhs.m_value) <\n           rhs.m_epsilon * (rhs.m_scale + std::max<double>(std::fabs(lhs), std::fabs(rhs.m_value)));\n}\nbool operator==(const Approx& lhs, double rhs) { return operator==(rhs, lhs); }\nbool operator!=(double lhs, const Approx& rhs) { return !operator==(lhs, rhs); }\nbool operator!=(const Approx& lhs, double rhs) { return !operator==(rhs, lhs); }\nbool operator<=(double lhs, const Approx& rhs) { return lhs < rhs.m_value || lhs == rhs; }\nbool operator<=(const Approx& lhs, double rhs) { return lhs.m_value < rhs || lhs == rhs; }\nbool operator>=(double lhs, const Approx& rhs) { return lhs > rhs.m_value || lhs == rhs; }\nbool operator>=(const Approx& lhs, double rhs) { return lhs.m_value > rhs || lhs == rhs; }\nbool operator<(double lhs, const Approx& rhs) { return lhs < rhs.m_value && lhs != rhs; }\nbool operator<(const Approx& lhs, double rhs) { return lhs.m_value < rhs && lhs != rhs; }\nbool operator>(double lhs, const Approx& rhs) { return lhs > rhs.m_value && lhs != rhs; }\nbool operator>(const Approx& lhs, double rhs) { return lhs.m_value > rhs && lhs != rhs; }\n\nString toString(const Approx& in) {\n    return \"Approx( \" + doctest::toString(in.m_value) + \" )\";\n}\nconst ContextOptions* getContextOptions() { return DOCTEST_BRANCH_ON_DISABLED(nullptr, g_cs); }\n\nDOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4738)\ntemplate <typename F>\nIsNaN<F>::operator bool() const {\n    return std::isnan(value) ^ flipped;\n}\nDOCTEST_MSVC_SUPPRESS_WARNING_POP\ntemplate struct DOCTEST_INTERFACE_DEF IsNaN<float>;\ntemplate struct DOCTEST_INTERFACE_DEF IsNaN<double>;\ntemplate struct DOCTEST_INTERFACE_DEF IsNaN<long double>;\ntemplate <typename F>\nString toString(IsNaN<F> in) { return String(in.flipped ? \"! \" : \"\") + \"IsNaN( \" + doctest::toString(in.value) + \" )\"; }\nString toString(IsNaN<float> in) { return toString<float>(in); }\nString toString(IsNaN<double> in) { return toString<double>(in); }\nString toString(IsNaN<double long> in) { return toString<double long>(in); }\n\n} // namespace doctest\n\n#ifdef DOCTEST_CONFIG_DISABLE\nnamespace doctest {\nContext::Context(int, const char* const*) {}\nContext::~Context() = default;\nvoid Context::applyCommandLine(int, const char* const*) {}\nvoid Context::addFilter(const char*, const char*) {}\nvoid Context::clearFilters() {}\nvoid Context::setOption(const char*, bool) {}\nvoid Context::setOption(const char*, int) {}\nvoid Context::setOption(const char*, const char*) {}\nbool Context::shouldExit() { return false; }\nvoid Context::setAsDefaultForAssertsOutOfTestCases() {}\nvoid Context::setAssertHandler(detail::assert_handler) {}\nvoid Context::setCout(std::ostream*) {}\nint  Context::run() { return 0; }\n\nint                         IReporter::get_num_active_contexts() { return 0; }\nconst IContextScope* const* IReporter::get_active_contexts() { return nullptr; }\nint                         IReporter::get_num_stringified_contexts() { return 0; }\nconst String*               IReporter::get_stringified_contexts() { return nullptr; }\n\nint registerReporter(const char*, int, IReporter*) { return 0; }\n\n} // namespace doctest\n#else // DOCTEST_CONFIG_DISABLE\n\n#if !defined(DOCTEST_CONFIG_COLORS_NONE)\n#if !defined(DOCTEST_CONFIG_COLORS_WINDOWS) && !defined(DOCTEST_CONFIG_COLORS_ANSI)\n#ifdef DOCTEST_PLATFORM_WINDOWS\n#define DOCTEST_CONFIG_COLORS_WINDOWS\n#else // linux\n#define DOCTEST_CONFIG_COLORS_ANSI\n#endif // platform\n#endif // DOCTEST_CONFIG_COLORS_WINDOWS && DOCTEST_CONFIG_COLORS_ANSI\n#endif // DOCTEST_CONFIG_COLORS_NONE\n\nnamespace doctest_detail_test_suite_ns {\n// holds the current test suite\ndoctest::detail::TestSuite& getCurrentTestSuite() {\n    static doctest::detail::TestSuite data{};\n    return data;\n}\n} // namespace doctest_detail_test_suite_ns\n\nnamespace doctest {\nnamespace {\n    // the int (priority) is part of the key for automatic sorting - sadly one can register a\n    // reporter with a duplicate name and a different priority but hopefully that won't happen often :|\n    using reporterMap = std::map<std::pair<int, String>, reporterCreatorFunc>;\n\n    reporterMap& getReporters() {\n        static reporterMap data;\n        return data;\n    }\n    reporterMap& getListeners() {\n        static reporterMap data;\n        return data;\n    }\n} // namespace\nnamespace detail {\n#define DOCTEST_ITERATE_THROUGH_REPORTERS(function, ...)                                           \\\n    for(auto& curr_rep : g_cs->reporters_currently_used)                                           \\\n    curr_rep->function(__VA_ARGS__)\n\n    bool checkIfShouldThrow(assertType::Enum at) {\n        if(at & assertType::is_require) //!OCLINT bitwise operator in conditional\n            return true;\n\n        if((at & assertType::is_check) //!OCLINT bitwise operator in conditional\n           && getContextOptions()->abort_after > 0 &&\n           (g_cs->numAssertsFailed + g_cs->numAssertsFailedCurrentTest_atomic) >=\n                   getContextOptions()->abort_after)\n            return true;\n\n        return false;\n    }\n\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n    DOCTEST_NORETURN void throwException() {\n        g_cs->shouldLogCurrentException = false;\n        throw TestFailureException(); // NOLINT(hicpp-exception-baseclass)\n    }\n#else // DOCTEST_CONFIG_NO_EXCEPTIONS\n    void throwException() {}\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n} // namespace detail\n\nnamespace {\n    using namespace detail;\n    // matching of a string against a wildcard mask (case sensitivity configurable) taken from\n    // https://www.codeproject.com/Articles/1088/Wildcard-string-compare-globbing\n    int wildcmp(const char* str, const char* wild, bool caseSensitive) {\n        const char* cp = str;\n        const char* mp = wild;\n\n        while((*str) && (*wild != '*')) {\n            if((caseSensitive ? (*wild != *str) : (tolower(*wild) != tolower(*str))) &&\n               (*wild != '?')) {\n                return 0;\n            }\n            wild++;\n            str++;\n        }\n\n        while(*str) {\n            if(*wild == '*') {\n                if(!*++wild) {\n                    return 1;\n                }\n                mp = wild;\n                cp = str + 1;\n            } else if((caseSensitive ? (*wild == *str) : (tolower(*wild) == tolower(*str))) ||\n                      (*wild == '?')) {\n                wild++;\n                str++;\n            } else {\n                wild = mp;   //!OCLINT parameter reassignment\n                str  = cp++; //!OCLINT parameter reassignment\n            }\n        }\n\n        while(*wild == '*') {\n            wild++;\n        }\n        return !*wild;\n    }\n\n    // checks if the name matches any of the filters (and can be configured what to do when empty)\n    bool matchesAny(const char* name, const std::vector<String>& filters, bool matchEmpty,\n        bool caseSensitive) {\n        if (filters.empty() && matchEmpty)\n            return true;\n        for (auto& curr : filters)\n            if (wildcmp(name, curr.c_str(), caseSensitive))\n                return true;\n        return false;\n    }\n\n    DOCTEST_NO_SANITIZE_INTEGER\n    unsigned long long hash(unsigned long long a, unsigned long long b) {\n        return (a << 5) + b;\n    }\n\n    // C string hash function (djb2) - taken from http://www.cse.yorku.ca/~oz/hash.html\n    DOCTEST_NO_SANITIZE_INTEGER\n    unsigned long long hash(const char* str) {\n        unsigned long long hash = 5381;\n        char c;\n        while ((c = *str++))\n            hash = ((hash << 5) + hash) + c; // hash * 33 + c\n        return hash;\n    }\n\n    unsigned long long hash(const SubcaseSignature& sig) {\n        return hash(hash(hash(sig.m_file), hash(sig.m_name.c_str())), sig.m_line);\n    }\n\n    unsigned long long hash(const std::vector<SubcaseSignature>& sigs, size_t count) {\n        unsigned long long running = 0;\n        auto end = sigs.begin() + count;\n        for (auto it = sigs.begin(); it != end; it++) {\n            running = hash(running, hash(*it));\n        }\n        return running;\n    }\n\n    unsigned long long hash(const std::vector<SubcaseSignature>& sigs) {\n        unsigned long long running = 0;\n        for (const SubcaseSignature& sig : sigs) {\n            running = hash(running, hash(sig));\n        }\n        return running;\n    }\n} // namespace\nnamespace detail {\n    bool Subcase::checkFilters() {\n        if (g_cs->subcaseStack.size() < size_t(g_cs->subcase_filter_levels)) {\n            if (!matchesAny(m_signature.m_name.c_str(), g_cs->filters[6], true, g_cs->case_sensitive))\n                return true;\n            if (matchesAny(m_signature.m_name.c_str(), g_cs->filters[7], false, g_cs->case_sensitive))\n                return true;\n        }\n        return false;\n    }\n\n    Subcase::Subcase(const String& name, const char* file, int line)\n            : m_signature({name, file, line}) {\n        if (!g_cs->reachedLeaf) {\n            if (g_cs->nextSubcaseStack.size() <= g_cs->subcaseStack.size()\n                || g_cs->nextSubcaseStack[g_cs->subcaseStack.size()] == m_signature) {\n                // Going down.\n                if (checkFilters()) { return; }\n\n                g_cs->subcaseStack.push_back(m_signature);\n                g_cs->currentSubcaseDepth++;\n                m_entered = true;\n                DOCTEST_ITERATE_THROUGH_REPORTERS(subcase_start, m_signature);\n            }\n        } else {\n            if (g_cs->subcaseStack[g_cs->currentSubcaseDepth] == m_signature) {\n                // This subcase is reentered via control flow.\n                g_cs->currentSubcaseDepth++;\n                m_entered = true;\n                DOCTEST_ITERATE_THROUGH_REPORTERS(subcase_start, m_signature);\n            } else if (g_cs->nextSubcaseStack.size() <= g_cs->currentSubcaseDepth\n                    && g_cs->fullyTraversedSubcases.find(hash(hash(g_cs->subcaseStack, g_cs->currentSubcaseDepth), hash(m_signature)))\n                    == g_cs->fullyTraversedSubcases.end()) {\n                if (checkFilters()) { return; }\n                // This subcase is part of the one to be executed next.\n                g_cs->nextSubcaseStack.clear();\n                g_cs->nextSubcaseStack.insert(g_cs->nextSubcaseStack.end(),\n                    g_cs->subcaseStack.begin(), g_cs->subcaseStack.begin() + g_cs->currentSubcaseDepth);\n                g_cs->nextSubcaseStack.push_back(m_signature);\n            }\n        }\n    }\n\n    DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4996) // std::uncaught_exception is deprecated in C++17\n    DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(\"-Wdeprecated-declarations\")\n    DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Wdeprecated-declarations\")\n\n    Subcase::~Subcase() {\n        if (m_entered) {\n            g_cs->currentSubcaseDepth--;\n\n            if (!g_cs->reachedLeaf) {\n                // Leaf.\n                g_cs->fullyTraversedSubcases.insert(hash(g_cs->subcaseStack));\n                g_cs->nextSubcaseStack.clear();\n                g_cs->reachedLeaf = true;\n            } else if (g_cs->nextSubcaseStack.empty()) {\n                // All children are finished.\n                g_cs->fullyTraversedSubcases.insert(hash(g_cs->subcaseStack));\n            }\n\n#if defined(__cpp_lib_uncaught_exceptions) && __cpp_lib_uncaught_exceptions >= 201411L && (!defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)\n            if(std::uncaught_exceptions() > 0\n#else\n            if(std::uncaught_exception()\n#endif\n                && g_cs->shouldLogCurrentException) {\n                DOCTEST_ITERATE_THROUGH_REPORTERS(\n                        test_case_exception, {\"exception thrown in subcase - will translate later \"\n                                                \"when the whole test case has been exited (cannot \"\n                                                \"translate while there is an active exception)\",\n                                                false});\n                g_cs->shouldLogCurrentException = false;\n            }\n\n            DOCTEST_ITERATE_THROUGH_REPORTERS(subcase_end, DOCTEST_EMPTY);\n        }\n    }\n\n    DOCTEST_CLANG_SUPPRESS_WARNING_POP\n    DOCTEST_GCC_SUPPRESS_WARNING_POP\n    DOCTEST_MSVC_SUPPRESS_WARNING_POP\n\n    Subcase::operator bool() const { return m_entered; }\n\n    Result::Result(bool passed, const String& decomposition)\n            : m_passed(passed)\n            , m_decomp(decomposition) {}\n\n    ExpressionDecomposer::ExpressionDecomposer(assertType::Enum at)\n            : m_at(at) {}\n\n    TestSuite& TestSuite::operator*(const char* in) {\n        m_test_suite = in;\n        return *this;\n    }\n\n    TestCase::TestCase(funcType test, const char* file, unsigned line, const TestSuite& test_suite,\n                       const String& type, int template_id) {\n        m_file              = file;\n        m_line              = line;\n        m_name              = nullptr; // will be later overridden in operator*\n        m_test_suite        = test_suite.m_test_suite;\n        m_description       = test_suite.m_description;\n        m_skip              = test_suite.m_skip;\n        m_no_breaks         = test_suite.m_no_breaks;\n        m_no_output         = test_suite.m_no_output;\n        m_may_fail          = test_suite.m_may_fail;\n        m_should_fail       = test_suite.m_should_fail;\n        m_expected_failures = test_suite.m_expected_failures;\n        m_timeout           = test_suite.m_timeout;\n\n        m_test        = test;\n        m_type        = type;\n        m_template_id = template_id;\n    }\n\n    TestCase::TestCase(const TestCase& other)\n            : TestCaseData() {\n        *this = other;\n    }\n\n    DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(26434) // hides a non-virtual function\n    TestCase& TestCase::operator=(const TestCase& other) {\n        TestCaseData::operator=(other);\n        m_test        = other.m_test;\n        m_type        = other.m_type;\n        m_template_id = other.m_template_id;\n        m_full_name   = other.m_full_name;\n\n        if(m_template_id != -1)\n            m_name = m_full_name.c_str();\n        return *this;\n    }\n    DOCTEST_MSVC_SUPPRESS_WARNING_POP\n\n    TestCase& TestCase::operator*(const char* in) {\n        m_name = in;\n        // make a new name with an appended type for templated test case\n        if(m_template_id != -1) {\n            m_full_name = String(m_name) + \"<\" + m_type + \">\";\n            // redirect the name to point to the newly constructed full name\n            m_name = m_full_name.c_str();\n        }\n        return *this;\n    }\n\n    bool TestCase::operator<(const TestCase& other) const {\n        // this will be used only to differentiate between test cases - not relevant for sorting\n        if(m_line != other.m_line)\n            return m_line < other.m_line;\n        const int name_cmp = strcmp(m_name, other.m_name);\n        if(name_cmp != 0)\n            return name_cmp < 0;\n        const int file_cmp = m_file.compare(other.m_file);\n        if(file_cmp != 0)\n            return file_cmp < 0;\n        return m_template_id < other.m_template_id;\n    }\n\n    // all the registered tests\n    std::set<TestCase>& getRegisteredTests() {\n        static std::set<TestCase> data;\n        return data;\n    }\n} // namespace detail\nnamespace {\n    using namespace detail;\n    // for sorting tests by file/line\n    bool fileOrderComparator(const TestCase* lhs, const TestCase* rhs) {\n        // this is needed because MSVC gives different case for drive letters\n        // for __FILE__ when evaluated in a header and a source file\n        const int res = lhs->m_file.compare(rhs->m_file, bool(DOCTEST_MSVC));\n        if(res != 0)\n            return res < 0;\n        if(lhs->m_line != rhs->m_line)\n            return lhs->m_line < rhs->m_line;\n        return lhs->m_template_id < rhs->m_template_id;\n    }\n\n    // for sorting tests by suite/file/line\n    bool suiteOrderComparator(const TestCase* lhs, const TestCase* rhs) {\n        const int res = std::strcmp(lhs->m_test_suite, rhs->m_test_suite);\n        if(res != 0)\n            return res < 0;\n        return fileOrderComparator(lhs, rhs);\n    }\n\n    // for sorting tests by name/suite/file/line\n    bool nameOrderComparator(const TestCase* lhs, const TestCase* rhs) {\n        const int res = std::strcmp(lhs->m_name, rhs->m_name);\n        if(res != 0)\n            return res < 0;\n        return suiteOrderComparator(lhs, rhs);\n    }\n\n    DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Wdeprecated-declarations\")\n    void color_to_stream(std::ostream& s, Color::Enum code) {\n        static_cast<void>(s);    // for DOCTEST_CONFIG_COLORS_NONE or DOCTEST_CONFIG_COLORS_WINDOWS\n        static_cast<void>(code); // for DOCTEST_CONFIG_COLORS_NONE\n#ifdef DOCTEST_CONFIG_COLORS_ANSI\n        if(g_no_colors ||\n           (isatty(STDOUT_FILENO) == false && getContextOptions()->force_colors == false))\n            return;\n\n        auto col = \"\";\n        // clang-format off\n            switch(code) { //!OCLINT missing break in switch statement / unnecessary default statement in covered switch statement\n                case Color::Red:         col = \"[0;31m\"; break;\n                case Color::Green:       col = \"[0;32m\"; break;\n                case Color::Blue:        col = \"[0;34m\"; break;\n                case Color::Cyan:        col = \"[0;36m\"; break;\n                case Color::Yellow:      col = \"[0;33m\"; break;\n                case Color::Grey:        col = \"[1;30m\"; break;\n                case Color::LightGrey:   col = \"[0;37m\"; break;\n                case Color::BrightRed:   col = \"[1;31m\"; break;\n                case Color::BrightGreen: col = \"[1;32m\"; break;\n                case Color::BrightWhite: col = \"[1;37m\"; break;\n                case Color::Bright: // invalid\n                case Color::None:\n                case Color::White:\n                default:                 col = \"[0m\";\n            }\n        // clang-format on\n        s << \"\\033\" << col;\n#endif // DOCTEST_CONFIG_COLORS_ANSI\n\n#ifdef DOCTEST_CONFIG_COLORS_WINDOWS\n        if(g_no_colors ||\n           (_isatty(_fileno(stdout)) == false && getContextOptions()->force_colors == false))\n            return;\n\n        static struct ConsoleHelper {\n            HANDLE stdoutHandle;\n            WORD   origFgAttrs;\n            WORD   origBgAttrs;\n\n            ConsoleHelper() {\n                stdoutHandle = GetStdHandle(STD_OUTPUT_HANDLE);\n                CONSOLE_SCREEN_BUFFER_INFO csbiInfo;\n                GetConsoleScreenBufferInfo(stdoutHandle, &csbiInfo);\n                origFgAttrs = csbiInfo.wAttributes & ~(BACKGROUND_GREEN | BACKGROUND_RED |\n                    BACKGROUND_BLUE | BACKGROUND_INTENSITY);\n                origBgAttrs = csbiInfo.wAttributes & ~(FOREGROUND_GREEN | FOREGROUND_RED |\n                    FOREGROUND_BLUE | FOREGROUND_INTENSITY);\n            }\n        } ch;\n\n#define DOCTEST_SET_ATTR(x) SetConsoleTextAttribute(ch.stdoutHandle, x | ch.origBgAttrs)\n\n        // clang-format off\n        switch (code) {\n            case Color::White:       DOCTEST_SET_ATTR(FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE); break;\n            case Color::Red:         DOCTEST_SET_ATTR(FOREGROUND_RED);                                      break;\n            case Color::Green:       DOCTEST_SET_ATTR(FOREGROUND_GREEN);                                    break;\n            case Color::Blue:        DOCTEST_SET_ATTR(FOREGROUND_BLUE);                                     break;\n            case Color::Cyan:        DOCTEST_SET_ATTR(FOREGROUND_BLUE | FOREGROUND_GREEN);                  break;\n            case Color::Yellow:      DOCTEST_SET_ATTR(FOREGROUND_RED | FOREGROUND_GREEN);                   break;\n            case Color::Grey:        DOCTEST_SET_ATTR(0);                                                   break;\n            case Color::LightGrey:   DOCTEST_SET_ATTR(FOREGROUND_INTENSITY);                                break;\n            case Color::BrightRed:   DOCTEST_SET_ATTR(FOREGROUND_INTENSITY | FOREGROUND_RED);               break;\n            case Color::BrightGreen: DOCTEST_SET_ATTR(FOREGROUND_INTENSITY | FOREGROUND_GREEN);             break;\n            case Color::BrightWhite: DOCTEST_SET_ATTR(FOREGROUND_INTENSITY | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE); break;\n            case Color::None:\n            case Color::Bright: // invalid\n            default:                 DOCTEST_SET_ATTR(ch.origFgAttrs);\n        }\n            // clang-format on\n#endif // DOCTEST_CONFIG_COLORS_WINDOWS\n    }\n    DOCTEST_CLANG_SUPPRESS_WARNING_POP\n\n    std::vector<const IExceptionTranslator*>& getExceptionTranslators() {\n        static std::vector<const IExceptionTranslator*> data;\n        return data;\n    }\n\n    String translateActiveException() {\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n        String res;\n        auto&  translators = getExceptionTranslators();\n        for(auto& curr : translators)\n            if(curr->translate(res))\n                return res;\n        // clang-format off\n        DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(\"-Wcatch-value\")\n        try {\n            throw;\n        } catch(std::exception& ex) {\n            return ex.what();\n        } catch(std::string& msg) {\n            return msg.c_str();\n        } catch(const char* msg) {\n            return msg;\n        } catch(...) {\n            return \"unknown exception\";\n        }\n        DOCTEST_GCC_SUPPRESS_WARNING_POP\n// clang-format on\n#else  // DOCTEST_CONFIG_NO_EXCEPTIONS\n        return \"\";\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n    }\n} // namespace\n\nnamespace detail {\n    // used by the macros for registering tests\n    int regTest(const TestCase& tc) {\n        getRegisteredTests().insert(tc);\n        return 0;\n    }\n\n    // sets the current test suite\n    int setTestSuite(const TestSuite& ts) {\n        doctest_detail_test_suite_ns::getCurrentTestSuite() = ts;\n        return 0;\n    }\n\n#ifdef DOCTEST_IS_DEBUGGER_ACTIVE\n    bool isDebuggerActive() { return DOCTEST_IS_DEBUGGER_ACTIVE(); }\n#else // DOCTEST_IS_DEBUGGER_ACTIVE\n#ifdef DOCTEST_PLATFORM_LINUX\n    class ErrnoGuard {\n    public:\n        ErrnoGuard() : m_oldErrno(errno) {}\n        ~ErrnoGuard() { errno = m_oldErrno; }\n    private:\n        int m_oldErrno;\n    };\n    // See the comments in Catch2 for the reasoning behind this implementation:\n    // https://github.com/catchorg/Catch2/blob/v2.13.1/include/internal/catch_debugger.cpp#L79-L102\n    bool isDebuggerActive() {\n        ErrnoGuard guard;\n        std::ifstream in(\"/proc/self/status\");\n        for(std::string line; std::getline(in, line);) {\n            static const int PREFIX_LEN = 11;\n            if(line.compare(0, PREFIX_LEN, \"TracerPid:\\t\") == 0) {\n                return line.length() > PREFIX_LEN && line[PREFIX_LEN] != '0';\n            }\n        }\n        return false;\n    }\n#elif defined(DOCTEST_PLATFORM_MAC)\n    // The following function is taken directly from the following technical note:\n    // https://developer.apple.com/library/archive/qa/qa1361/_index.html\n    // Returns true if the current process is being debugged (either\n    // running under the debugger or has a debugger attached post facto).\n    bool isDebuggerActive() {\n        int        mib[4];\n        kinfo_proc info;\n        size_t     size;\n        // Initialize the flags so that, if sysctl fails for some bizarre\n        // reason, we get a predictable result.\n        info.kp_proc.p_flag = 0;\n        // Initialize mib, which tells sysctl the info we want, in this case\n        // we're looking for information about a specific process ID.\n        mib[0] = CTL_KERN;\n        mib[1] = KERN_PROC;\n        mib[2] = KERN_PROC_PID;\n        mib[3] = getpid();\n        // Call sysctl.\n        size = sizeof(info);\n        if(sysctl(mib, DOCTEST_COUNTOF(mib), &info, &size, 0, 0) != 0) {\n            std::cerr << \"\\nCall to sysctl failed - unable to determine if debugger is active **\\n\";\n            return false;\n        }\n        // We're being debugged if the P_TRACED flag is set.\n        return ((info.kp_proc.p_flag & P_TRACED) != 0);\n    }\n#elif DOCTEST_MSVC || defined(__MINGW32__) || defined(__MINGW64__)\n    bool isDebuggerActive() { return ::IsDebuggerPresent() != 0; }\n#else\n    bool isDebuggerActive() { return false; }\n#endif // Platform\n#endif // DOCTEST_IS_DEBUGGER_ACTIVE\n\n    void registerExceptionTranslatorImpl(const IExceptionTranslator* et) {\n        if(std::find(getExceptionTranslators().begin(), getExceptionTranslators().end(), et) ==\n           getExceptionTranslators().end())\n            getExceptionTranslators().push_back(et);\n    }\n\n    DOCTEST_THREAD_LOCAL doctest_thread_local_wrapper<std::vector<IContextScope*>> wrapped_g_infoContexts; // for logging with INFO()\n\n    ContextScopeBase::ContextScopeBase() {\n        wrapped_g_infoContexts.get().push_back(this);\n    }\n\n    ContextScopeBase::ContextScopeBase(ContextScopeBase&& other) noexcept {\n        if (other.need_to_destroy) {\n            other.destroy();\n        }\n        other.need_to_destroy = false;\n        wrapped_g_infoContexts.get().push_back(this);\n    }\n\n    DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4996) // std::uncaught_exception is deprecated in C++17\n    DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(\"-Wdeprecated-declarations\")\n    DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Wdeprecated-declarations\")\n\n    // destroy cannot be inlined into the destructor because that would mean calling stringify after\n    // ContextScope has been destroyed (base class destructors run after derived class destructors).\n    // Instead, ContextScope calls this method directly from its destructor.\n    void ContextScopeBase::destroy() {\n#if defined(__cpp_lib_uncaught_exceptions) && __cpp_lib_uncaught_exceptions >= 201411L && (!defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)\n        if(std::uncaught_exceptions() > 0) {\n#else\n        if(std::uncaught_exception()) {\n#endif\n            std::ostringstream s;\n            this->stringify(&s);\n            g_cs->stringifiedContexts.push_back(s.str().c_str());\n        }\n        wrapped_g_infoContexts.get().pop_back();\n    }\n\n    DOCTEST_CLANG_SUPPRESS_WARNING_POP\n    DOCTEST_GCC_SUPPRESS_WARNING_POP\n    DOCTEST_MSVC_SUPPRESS_WARNING_POP\n} // namespace detail\nnamespace {\n    using namespace detail;\n\n#if !defined(DOCTEST_CONFIG_POSIX_SIGNALS) && !defined(DOCTEST_CONFIG_WINDOWS_SEH)\n    struct FatalConditionHandler\n    {\n        static void reset() {}\n        static void allocateAltStackMem() {}\n        static void freeAltStackMem() {}\n    };\n#else // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH\n\n    void reportFatal(const std::string&);\n\n#ifdef DOCTEST_PLATFORM_WINDOWS\n\n    struct SignalDefs\n    {\n        DWORD id;\n        const char* name;\n    };\n    // There is no 1-1 mapping between signals and windows exceptions.\n    // Windows can easily distinguish between SO and SigSegV,\n    // but SigInt, SigTerm, etc are handled differently.\n    SignalDefs signalDefs[] = {\n            {static_cast<DWORD>(EXCEPTION_ILLEGAL_INSTRUCTION),\n             \"SIGILL - Illegal instruction signal\"},\n            {static_cast<DWORD>(EXCEPTION_STACK_OVERFLOW), \"SIGSEGV - Stack overflow\"},\n            {static_cast<DWORD>(EXCEPTION_ACCESS_VIOLATION),\n             \"SIGSEGV - Segmentation violation signal\"},\n            {static_cast<DWORD>(EXCEPTION_INT_DIVIDE_BY_ZERO), \"Divide by zero error\"},\n    };\n\n    struct FatalConditionHandler\n    {\n        static LONG CALLBACK handleException(PEXCEPTION_POINTERS ExceptionInfo) {\n            // Multiple threads may enter this filter/handler at once. We want the error message to be printed on the\n            // console just once no matter how many threads have crashed.\n            DOCTEST_DECLARE_STATIC_MUTEX(mutex)\n            static bool execute = true;\n            {\n                DOCTEST_LOCK_MUTEX(mutex)\n                if(execute) {\n                    bool reported = false;\n                    for(size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) {\n                        if(ExceptionInfo->ExceptionRecord->ExceptionCode == signalDefs[i].id) {\n                            reportFatal(signalDefs[i].name);\n                            reported = true;\n                            break;\n                        }\n                    }\n                    if(reported == false)\n                        reportFatal(\"Unhandled SEH exception caught\");\n                    if(isDebuggerActive() && !g_cs->no_breaks)\n                        DOCTEST_BREAK_INTO_DEBUGGER();\n                }\n                execute = false;\n            }\n            std::exit(EXIT_FAILURE);\n        }\n\n        static void allocateAltStackMem() {}\n        static void freeAltStackMem() {}\n\n        FatalConditionHandler() {\n            isSet = true;\n            // 32k seems enough for doctest to handle stack overflow,\n            // but the value was found experimentally, so there is no strong guarantee\n            guaranteeSize = 32 * 1024;\n            // Register an unhandled exception filter\n            previousTop = SetUnhandledExceptionFilter(handleException);\n            // Pass in guarantee size to be filled\n            SetThreadStackGuarantee(&guaranteeSize);\n\n            // On Windows uncaught exceptions from another thread, exceptions from\n            // destructors, or calls to std::terminate are not a SEH exception\n\n            // The terminal handler gets called when:\n            // - std::terminate is called FROM THE TEST RUNNER THREAD\n            // - an exception is thrown from a destructor FROM THE TEST RUNNER THREAD\n            original_terminate_handler = std::get_terminate();\n            std::set_terminate([]() DOCTEST_NOEXCEPT {\n                reportFatal(\"Terminate handler called\");\n                if(isDebuggerActive() && !g_cs->no_breaks)\n                    DOCTEST_BREAK_INTO_DEBUGGER();\n                std::exit(EXIT_FAILURE); // explicitly exit - otherwise the SIGABRT handler may be called as well\n            });\n\n            // SIGABRT is raised when:\n            // - std::terminate is called FROM A DIFFERENT THREAD\n            // - an exception is thrown from a destructor FROM A DIFFERENT THREAD\n            // - an uncaught exception is thrown FROM A DIFFERENT THREAD\n            prev_sigabrt_handler = std::signal(SIGABRT, [](int signal) DOCTEST_NOEXCEPT {\n                if(signal == SIGABRT) {\n                    reportFatal(\"SIGABRT - Abort (abnormal termination) signal\");\n                    if(isDebuggerActive() && !g_cs->no_breaks)\n                        DOCTEST_BREAK_INTO_DEBUGGER();\n                    std::exit(EXIT_FAILURE);\n                }\n            });\n\n            // The following settings are taken from google test, and more\n            // specifically from UnitTest::Run() inside of gtest.cc\n\n            // the user does not want to see pop-up dialogs about crashes\n            prev_error_mode_1 = SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT |\n                                             SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);\n            // This forces the abort message to go to stderr in all circumstances.\n            prev_error_mode_2 = _set_error_mode(_OUT_TO_STDERR);\n            // In the debug version, Visual Studio pops up a separate dialog\n            // offering a choice to debug the aborted program - we want to disable that.\n            prev_abort_behavior = _set_abort_behavior(0x0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);\n            // In debug mode, the Windows CRT can crash with an assertion over invalid\n            // input (e.g. passing an invalid file descriptor). The default handling\n            // for these assertions is to pop up a dialog and wait for user input.\n            // Instead ask the CRT to dump such assertions to stderr non-interactively.\n            prev_report_mode = _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);\n            prev_report_file = _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);\n        }\n\n        static void reset() {\n            if(isSet) {\n                // Unregister handler and restore the old guarantee\n                SetUnhandledExceptionFilter(previousTop);\n                SetThreadStackGuarantee(&guaranteeSize);\n                std::set_terminate(original_terminate_handler);\n                std::signal(SIGABRT, prev_sigabrt_handler);\n                SetErrorMode(prev_error_mode_1);\n                _set_error_mode(prev_error_mode_2);\n                _set_abort_behavior(prev_abort_behavior, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);\n                static_cast<void>(_CrtSetReportMode(_CRT_ASSERT, prev_report_mode));\n                static_cast<void>(_CrtSetReportFile(_CRT_ASSERT, prev_report_file));\n                isSet = false;\n            }\n        }\n\n        ~FatalConditionHandler() { reset(); }\n\n    private:\n        static UINT         prev_error_mode_1;\n        static int          prev_error_mode_2;\n        static unsigned int prev_abort_behavior;\n        static int          prev_report_mode;\n        static _HFILE       prev_report_file;\n        static void (DOCTEST_CDECL *prev_sigabrt_handler)(int);\n        static std::terminate_handler original_terminate_handler;\n        static bool isSet;\n        static ULONG guaranteeSize;\n        static LPTOP_LEVEL_EXCEPTION_FILTER previousTop;\n    };\n\n    UINT         FatalConditionHandler::prev_error_mode_1;\n    int          FatalConditionHandler::prev_error_mode_2;\n    unsigned int FatalConditionHandler::prev_abort_behavior;\n    int          FatalConditionHandler::prev_report_mode;\n    _HFILE       FatalConditionHandler::prev_report_file;\n    void (DOCTEST_CDECL *FatalConditionHandler::prev_sigabrt_handler)(int);\n    std::terminate_handler FatalConditionHandler::original_terminate_handler;\n    bool FatalConditionHandler::isSet = false;\n    ULONG FatalConditionHandler::guaranteeSize = 0;\n    LPTOP_LEVEL_EXCEPTION_FILTER FatalConditionHandler::previousTop = nullptr;\n\n#else // DOCTEST_PLATFORM_WINDOWS\n\n    struct SignalDefs\n    {\n        int         id;\n        const char* name;\n    };\n    SignalDefs signalDefs[] = {{SIGINT, \"SIGINT - Terminal interrupt signal\"},\n                               {SIGILL, \"SIGILL - Illegal instruction signal\"},\n                               {SIGFPE, \"SIGFPE - Floating point error signal\"},\n                               {SIGSEGV, \"SIGSEGV - Segmentation violation signal\"},\n                               {SIGTERM, \"SIGTERM - Termination request signal\"},\n                               {SIGABRT, \"SIGABRT - Abort (abnormal termination) signal\"}};\n\n    struct FatalConditionHandler\n    {\n        static bool             isSet;\n        static struct sigaction oldSigActions[DOCTEST_COUNTOF(signalDefs)];\n        static stack_t          oldSigStack;\n        static size_t           altStackSize;\n        static char*            altStackMem;\n\n        static void handleSignal(int sig) {\n            const char* name = \"<unknown signal>\";\n            for(std::size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) {\n                SignalDefs& def = signalDefs[i];\n                if(sig == def.id) {\n                    name = def.name;\n                    break;\n                }\n            }\n            reset();\n            reportFatal(name);\n            raise(sig);\n        }\n\n        static void allocateAltStackMem() {\n            altStackMem = new char[altStackSize];\n        }\n\n        static void freeAltStackMem() {\n            delete[] altStackMem;\n        }\n\n        FatalConditionHandler() {\n            isSet = true;\n            stack_t sigStack;\n            sigStack.ss_sp    = altStackMem;\n            sigStack.ss_size  = altStackSize;\n            sigStack.ss_flags = 0;\n            sigaltstack(&sigStack, &oldSigStack);\n            struct sigaction sa = {};\n            sa.sa_handler       = handleSignal;\n            sa.sa_flags         = SA_ONSTACK;\n            for(std::size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) {\n                sigaction(signalDefs[i].id, &sa, &oldSigActions[i]);\n            }\n        }\n\n        ~FatalConditionHandler() { reset(); }\n        static void reset() {\n            if(isSet) {\n                // Set signals back to previous values -- hopefully nobody overwrote them in the meantime\n                for(std::size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) {\n                    sigaction(signalDefs[i].id, &oldSigActions[i], nullptr);\n                }\n                // Return the old stack\n                sigaltstack(&oldSigStack, nullptr);\n                isSet = false;\n            }\n        }\n    };\n\n    bool             FatalConditionHandler::isSet = false;\n    struct sigaction FatalConditionHandler::oldSigActions[DOCTEST_COUNTOF(signalDefs)] = {};\n    stack_t          FatalConditionHandler::oldSigStack = {};\n    size_t           FatalConditionHandler::altStackSize = 4 * SIGSTKSZ;\n    char*            FatalConditionHandler::altStackMem = nullptr;\n\n#endif // DOCTEST_PLATFORM_WINDOWS\n#endif // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH\n\n} // namespace\n\nnamespace {\n    using namespace detail;\n\n#ifdef DOCTEST_PLATFORM_WINDOWS\n#define DOCTEST_OUTPUT_DEBUG_STRING(text) ::OutputDebugStringA(text)\n#else\n    // TODO: integration with XCode and other IDEs\n#define DOCTEST_OUTPUT_DEBUG_STRING(text)\n#endif // Platform\n\n    void addAssert(assertType::Enum at) {\n        if((at & assertType::is_warn) == 0) //!OCLINT bitwise operator in conditional\n            g_cs->numAssertsCurrentTest_atomic++;\n    }\n\n    void addFailedAssert(assertType::Enum at) {\n        if((at & assertType::is_warn) == 0) //!OCLINT bitwise operator in conditional\n            g_cs->numAssertsFailedCurrentTest_atomic++;\n    }\n\n#if defined(DOCTEST_CONFIG_POSIX_SIGNALS) || defined(DOCTEST_CONFIG_WINDOWS_SEH)\n    void reportFatal(const std::string& message) {\n        g_cs->failure_flags |= TestCaseFailureReason::Crash;\n\n        DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_exception, {message.c_str(), true});\n\n        while (g_cs->subcaseStack.size()) {\n            g_cs->subcaseStack.pop_back();\n            DOCTEST_ITERATE_THROUGH_REPORTERS(subcase_end, DOCTEST_EMPTY);\n        }\n\n        g_cs->finalizeTestCaseData();\n\n        DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_end, *g_cs);\n\n        DOCTEST_ITERATE_THROUGH_REPORTERS(test_run_end, *g_cs);\n    }\n#endif // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH\n} // namespace\n\nAssertData::AssertData(assertType::Enum at, const char* file, int line, const char* expr,\n    const char* exception_type, const StringContains& exception_string)\n    : m_test_case(g_cs->currentTest), m_at(at), m_file(file), m_line(line), m_expr(expr),\n    m_failed(true), m_threw(false), m_threw_as(false), m_exception_type(exception_type),\n    m_exception_string(exception_string) {\n#if DOCTEST_MSVC\n    if (m_expr[0] == ' ') // this happens when variadic macros are disabled under MSVC\n        ++m_expr;\n#endif // MSVC\n}\n\nnamespace detail {\n    ResultBuilder::ResultBuilder(assertType::Enum at, const char* file, int line, const char* expr,\n                                 const char* exception_type, const String& exception_string)\n        : AssertData(at, file, line, expr, exception_type, exception_string) { }\n\n    ResultBuilder::ResultBuilder(assertType::Enum at, const char* file, int line, const char* expr,\n        const char* exception_type, const Contains& exception_string)\n        : AssertData(at, file, line, expr, exception_type, exception_string) { }\n\n    void ResultBuilder::setResult(const Result& res) {\n        m_decomp = res.m_decomp;\n        m_failed = !res.m_passed;\n    }\n\n    void ResultBuilder::translateException() {\n        m_threw     = true;\n        m_exception = translateActiveException();\n    }\n\n    bool ResultBuilder::log() {\n        if(m_at & assertType::is_throws) { //!OCLINT bitwise operator in conditional\n            m_failed = !m_threw;\n        } else if((m_at & assertType::is_throws_as) && (m_at & assertType::is_throws_with)) { //!OCLINT\n            m_failed = !m_threw_as || !m_exception_string.check(m_exception);\n        } else if(m_at & assertType::is_throws_as) { //!OCLINT bitwise operator in conditional\n            m_failed = !m_threw_as;\n        } else if(m_at & assertType::is_throws_with) { //!OCLINT bitwise operator in conditional\n            m_failed = !m_exception_string.check(m_exception);\n        } else if(m_at & assertType::is_nothrow) { //!OCLINT bitwise operator in conditional\n            m_failed = m_threw;\n        }\n\n        if(m_exception.size())\n            m_exception = \"\\\"\" + m_exception + \"\\\"\";\n\n        if(is_running_in_test) {\n            addAssert(m_at);\n            DOCTEST_ITERATE_THROUGH_REPORTERS(log_assert, *this);\n\n            if(m_failed)\n                addFailedAssert(m_at);\n        } else if(m_failed) {\n            failed_out_of_a_testing_context(*this);\n        }\n\n        return m_failed && isDebuggerActive() && !getContextOptions()->no_breaks &&\n            (g_cs->currentTest == nullptr || !g_cs->currentTest->m_no_breaks); // break into debugger\n    }\n\n    void ResultBuilder::react() const {\n        if(m_failed && checkIfShouldThrow(m_at))\n            throwException();\n    }\n\n    void failed_out_of_a_testing_context(const AssertData& ad) {\n        if(g_cs->ah)\n            g_cs->ah(ad);\n        else\n            std::abort();\n    }\n\n    bool decomp_assert(assertType::Enum at, const char* file, int line, const char* expr,\n                       const Result& result) {\n        bool failed = !result.m_passed;\n\n        // ###################################################################################\n        // IF THE DEBUGGER BREAKS HERE - GO 1 LEVEL UP IN THE CALLSTACK FOR THE FAILING ASSERT\n        // THIS IS THE EFFECT OF HAVING 'DOCTEST_CONFIG_SUPER_FAST_ASSERTS' DEFINED\n        // ###################################################################################\n        DOCTEST_ASSERT_OUT_OF_TESTS(result.m_decomp);\n        DOCTEST_ASSERT_IN_TESTS(result.m_decomp);\n        return !failed;\n    }\n\n    MessageBuilder::MessageBuilder(const char* file, int line, assertType::Enum severity) {\n        m_stream   = tlssPush();\n        m_file     = file;\n        m_line     = line;\n        m_severity = severity;\n    }\n\n    MessageBuilder::~MessageBuilder() {\n        if (!logged)\n            tlssPop();\n    }\n\n    DOCTEST_DEFINE_INTERFACE(IExceptionTranslator)\n\n    bool MessageBuilder::log() {\n        if (!logged) {\n            m_string = tlssPop();\n            logged = true;\n        }\n\n        DOCTEST_ITERATE_THROUGH_REPORTERS(log_message, *this);\n\n        const bool isWarn = m_severity & assertType::is_warn;\n\n        // warn is just a message in this context so we don't treat it as an assert\n        if(!isWarn) {\n            addAssert(m_severity);\n            addFailedAssert(m_severity);\n        }\n\n        return isDebuggerActive() && !getContextOptions()->no_breaks && !isWarn &&\n            (g_cs->currentTest == nullptr || !g_cs->currentTest->m_no_breaks); // break into debugger\n    }\n\n    void MessageBuilder::react() {\n        if(m_severity & assertType::is_require) //!OCLINT bitwise operator in conditional\n            throwException();\n    }\n} // namespace detail\nnamespace {\n    using namespace detail;\n\n    // clang-format off\n\n// =================================================================================================\n// The following code has been taken verbatim from Catch2/include/internal/catch_xmlwriter.h/cpp\n// This is done so cherry-picking bug fixes is trivial - even the style/formatting is untouched.\n// =================================================================================================\n\n    class XmlEncode {\n    public:\n        enum ForWhat { ForTextNodes, ForAttributes };\n\n        XmlEncode( std::string const& str, ForWhat forWhat = ForTextNodes );\n\n        void encodeTo( std::ostream& os ) const;\n\n        friend std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode );\n\n    private:\n        std::string m_str;\n        ForWhat m_forWhat;\n    };\n\n    class XmlWriter {\n    public:\n\n        class ScopedElement {\n        public:\n            ScopedElement( XmlWriter* writer );\n\n            ScopedElement( ScopedElement&& other ) DOCTEST_NOEXCEPT;\n            ScopedElement& operator=( ScopedElement&& other ) DOCTEST_NOEXCEPT;\n\n            ~ScopedElement();\n\n            ScopedElement& writeText( std::string const& text, bool indent = true );\n\n            template<typename T>\n            ScopedElement& writeAttribute( std::string const& name, T const& attribute ) {\n                m_writer->writeAttribute( name, attribute );\n                return *this;\n            }\n\n        private:\n            mutable XmlWriter* m_writer = nullptr;\n        };\n\n#ifndef DOCTEST_CONFIG_NO_INCLUDE_IOSTREAM\n        XmlWriter( std::ostream& os = std::cout );\n#else // DOCTEST_CONFIG_NO_INCLUDE_IOSTREAM\n        XmlWriter( std::ostream& os );\n#endif // DOCTEST_CONFIG_NO_INCLUDE_IOSTREAM\n        ~XmlWriter();\n\n        XmlWriter( XmlWriter const& ) = delete;\n        XmlWriter& operator=( XmlWriter const& ) = delete;\n\n        XmlWriter& startElement( std::string const& name );\n\n        ScopedElement scopedElement( std::string const& name );\n\n        XmlWriter& endElement();\n\n        XmlWriter& writeAttribute( std::string const& name, std::string const& attribute );\n\n        XmlWriter& writeAttribute( std::string const& name, const char* attribute );\n\n        XmlWriter& writeAttribute( std::string const& name, bool attribute );\n\n        template<typename T>\n        XmlWriter& writeAttribute( std::string const& name, T const& attribute ) {\n        std::stringstream rss;\n            rss << attribute;\n            return writeAttribute( name, rss.str() );\n        }\n\n        XmlWriter& writeText( std::string const& text, bool indent = true );\n\n        //XmlWriter& writeComment( std::string const& text );\n\n        //void writeStylesheetRef( std::string const& url );\n\n        //XmlWriter& writeBlankLine();\n\n        void ensureTagClosed();\n\n        void writeDeclaration();\n\n    private:\n\n        void newlineIfNecessary();\n\n        bool m_tagIsOpen = false;\n        bool m_needsNewline = false;\n        std::vector<std::string> m_tags;\n        std::string m_indent;\n        std::ostream& m_os;\n    };\n\n// =================================================================================================\n// The following code has been taken verbatim from Catch2/include/internal/catch_xmlwriter.h/cpp\n// This is done so cherry-picking bug fixes is trivial - even the style/formatting is untouched.\n// =================================================================================================\n\nusing uchar = unsigned char;\n\nnamespace {\n\n    size_t trailingBytes(unsigned char c) {\n        if ((c & 0xE0) == 0xC0) {\n            return 2;\n        }\n        if ((c & 0xF0) == 0xE0) {\n            return 3;\n        }\n        if ((c & 0xF8) == 0xF0) {\n            return 4;\n        }\n        DOCTEST_INTERNAL_ERROR(\"Invalid multibyte utf-8 start byte encountered\");\n    }\n\n    uint32_t headerValue(unsigned char c) {\n        if ((c & 0xE0) == 0xC0) {\n            return c & 0x1F;\n        }\n        if ((c & 0xF0) == 0xE0) {\n            return c & 0x0F;\n        }\n        if ((c & 0xF8) == 0xF0) {\n            return c & 0x07;\n        }\n        DOCTEST_INTERNAL_ERROR(\"Invalid multibyte utf-8 start byte encountered\");\n    }\n\n    void hexEscapeChar(std::ostream& os, unsigned char c) {\n        std::ios_base::fmtflags f(os.flags());\n        os << \"\\\\x\"\n            << std::uppercase << std::hex << std::setfill('0') << std::setw(2)\n            << static_cast<int>(c);\n        os.flags(f);\n    }\n\n} // anonymous namespace\n\n    XmlEncode::XmlEncode( std::string const& str, ForWhat forWhat )\n    :   m_str( str ),\n        m_forWhat( forWhat )\n    {}\n\n    void XmlEncode::encodeTo( std::ostream& os ) const {\n        // Apostrophe escaping not necessary if we always use \" to write attributes\n        // (see: https://www.w3.org/TR/xml/#syntax)\n\n        for( std::size_t idx = 0; idx < m_str.size(); ++ idx ) {\n            uchar c = m_str[idx];\n            switch (c) {\n            case '<':   os << \"&lt;\"; break;\n            case '&':   os << \"&amp;\"; break;\n\n            case '>':\n                // See: https://www.w3.org/TR/xml/#syntax\n                if (idx > 2 && m_str[idx - 1] == ']' && m_str[idx - 2] == ']')\n                    os << \"&gt;\";\n                else\n                    os << c;\n                break;\n\n            case '\\\"':\n                if (m_forWhat == ForAttributes)\n                    os << \"&quot;\";\n                else\n                    os << c;\n                break;\n\n            default:\n                // Check for control characters and invalid utf-8\n\n                // Escape control characters in standard ascii\n                // see https://stackoverflow.com/questions/404107/why-are-control-characters-illegal-in-xml-1-0\n                if (c < 0x09 || (c > 0x0D && c < 0x20) || c == 0x7F) {\n                    hexEscapeChar(os, c);\n                    break;\n                }\n\n                // Plain ASCII: Write it to stream\n                if (c < 0x7F) {\n                    os << c;\n                    break;\n                }\n\n                // UTF-8 territory\n                // Check if the encoding is valid and if it is not, hex escape bytes.\n                // Important: We do not check the exact decoded values for validity, only the encoding format\n                // First check that this bytes is a valid lead byte:\n                // This means that it is not encoded as 1111 1XXX\n                // Or as 10XX XXXX\n                if (c <  0xC0 ||\n                    c >= 0xF8) {\n                    hexEscapeChar(os, c);\n                    break;\n                }\n\n                auto encBytes = trailingBytes(c);\n                // Are there enough bytes left to avoid accessing out-of-bounds memory?\n                if (idx + encBytes - 1 >= m_str.size()) {\n                    hexEscapeChar(os, c);\n                    break;\n                }\n                // The header is valid, check data\n                // The next encBytes bytes must together be a valid utf-8\n                // This means: bitpattern 10XX XXXX and the extracted value is sane (ish)\n                bool valid = true;\n                uint32_t value = headerValue(c);\n                for (std::size_t n = 1; n < encBytes; ++n) {\n                    uchar nc = m_str[idx + n];\n                    valid &= ((nc & 0xC0) == 0x80);\n                    value = (value << 6) | (nc & 0x3F);\n                }\n\n                if (\n                    // Wrong bit pattern of following bytes\n                    (!valid) ||\n                    // Overlong encodings\n                    (value < 0x80) ||\n                    (                 value < 0x800   && encBytes > 2) || // removed \"0x80 <= value &&\" because redundant\n                    (0x800 < value && value < 0x10000 && encBytes > 3) ||\n                    // Encoded value out of range\n                    (value >= 0x110000)\n                    ) {\n                    hexEscapeChar(os, c);\n                    break;\n                }\n\n                // If we got here, this is in fact a valid(ish) utf-8 sequence\n                for (std::size_t n = 0; n < encBytes; ++n) {\n                    os << m_str[idx + n];\n                }\n                idx += encBytes - 1;\n                break;\n            }\n        }\n    }\n\n    std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode ) {\n        xmlEncode.encodeTo( os );\n        return os;\n    }\n\n    XmlWriter::ScopedElement::ScopedElement( XmlWriter* writer )\n    :   m_writer( writer )\n    {}\n\n    XmlWriter::ScopedElement::ScopedElement( ScopedElement&& other ) DOCTEST_NOEXCEPT\n    :   m_writer( other.m_writer ){\n        other.m_writer = nullptr;\n    }\n    XmlWriter::ScopedElement& XmlWriter::ScopedElement::operator=( ScopedElement&& other ) DOCTEST_NOEXCEPT {\n        if ( m_writer ) {\n            m_writer->endElement();\n        }\n        m_writer = other.m_writer;\n        other.m_writer = nullptr;\n        return *this;\n    }\n\n\n    XmlWriter::ScopedElement::~ScopedElement() {\n        if( m_writer )\n            m_writer->endElement();\n    }\n\n    XmlWriter::ScopedElement& XmlWriter::ScopedElement::writeText( std::string const& text, bool indent ) {\n        m_writer->writeText( text, indent );\n        return *this;\n    }\n\n    XmlWriter::XmlWriter( std::ostream& os ) : m_os( os )\n    {\n        // writeDeclaration(); // called explicitly by the reporters that use the writer class - see issue #627\n    }\n\n    XmlWriter::~XmlWriter() {\n        while( !m_tags.empty() )\n            endElement();\n    }\n\n    XmlWriter& XmlWriter::startElement( std::string const& name ) {\n        ensureTagClosed();\n        newlineIfNecessary();\n        m_os << m_indent << '<' << name;\n        m_tags.push_back( name );\n        m_indent += \"  \";\n        m_tagIsOpen = true;\n        return *this;\n    }\n\n    XmlWriter::ScopedElement XmlWriter::scopedElement( std::string const& name ) {\n        ScopedElement scoped( this );\n        startElement( name );\n        return scoped;\n    }\n\n    XmlWriter& XmlWriter::endElement() {\n        newlineIfNecessary();\n        m_indent = m_indent.substr( 0, m_indent.size()-2 );\n        if( m_tagIsOpen ) {\n            m_os << \"/>\";\n            m_tagIsOpen = false;\n        }\n        else {\n            m_os << m_indent << \"</\" << m_tags.back() << \">\";\n        }\n        m_os << std::endl;\n        m_tags.pop_back();\n        return *this;\n    }\n\n    XmlWriter& XmlWriter::writeAttribute( std::string const& name, std::string const& attribute ) {\n        if( !name.empty() && !attribute.empty() )\n            m_os << ' ' << name << \"=\\\"\" << XmlEncode( attribute, XmlEncode::ForAttributes ) << '\"';\n        return *this;\n    }\n\n    XmlWriter& XmlWriter::writeAttribute( std::string const& name, const char* attribute ) {\n        if( !name.empty() && attribute && attribute[0] != '\\0' )\n            m_os << ' ' << name << \"=\\\"\" << XmlEncode( attribute, XmlEncode::ForAttributes ) << '\"';\n        return *this;\n    }\n\n    XmlWriter& XmlWriter::writeAttribute( std::string const& name, bool attribute ) {\n        m_os << ' ' << name << \"=\\\"\" << ( attribute ? \"true\" : \"false\" ) << '\"';\n        return *this;\n    }\n\n    XmlWriter& XmlWriter::writeText( std::string const& text, bool indent ) {\n        if( !text.empty() ){\n            bool tagWasOpen = m_tagIsOpen;\n            ensureTagClosed();\n            if( tagWasOpen && indent )\n                m_os << m_indent;\n            m_os << XmlEncode( text );\n            m_needsNewline = true;\n        }\n        return *this;\n    }\n\n    //XmlWriter& XmlWriter::writeComment( std::string const& text ) {\n    //    ensureTagClosed();\n    //    m_os << m_indent << \"<!--\" << text << \"-->\";\n    //    m_needsNewline = true;\n    //    return *this;\n    //}\n\n    //void XmlWriter::writeStylesheetRef( std::string const& url ) {\n    //    m_os << \"<?xml-stylesheet type=\\\"text/xsl\\\" href=\\\"\" << url << \"\\\"?>\\n\";\n    //}\n\n    //XmlWriter& XmlWriter::writeBlankLine() {\n    //    ensureTagClosed();\n    //    m_os << '\\n';\n    //    return *this;\n    //}\n\n    void XmlWriter::ensureTagClosed() {\n        if( m_tagIsOpen ) {\n            m_os << \">\" << std::endl;\n            m_tagIsOpen = false;\n        }\n    }\n\n    void XmlWriter::writeDeclaration() {\n        m_os << \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\";\n    }\n\n    void XmlWriter::newlineIfNecessary() {\n        if( m_needsNewline ) {\n            m_os << std::endl;\n            m_needsNewline = false;\n        }\n    }\n\n// =================================================================================================\n// End of copy-pasted code from Catch\n// =================================================================================================\n\n    // clang-format on\n\n    struct XmlReporter : public IReporter\n    {\n        XmlWriter xml;\n        DOCTEST_DECLARE_MUTEX(mutex)\n\n        // caching pointers/references to objects of these types - safe to do\n        const ContextOptions& opt;\n        const TestCaseData*   tc = nullptr;\n\n        XmlReporter(const ContextOptions& co)\n                : xml(*co.cout)\n                , opt(co) {}\n\n        void log_contexts() {\n            int num_contexts = get_num_active_contexts();\n            if(num_contexts) {\n                auto              contexts = get_active_contexts();\n                std::stringstream ss;\n                for(int i = 0; i < num_contexts; ++i) {\n                    contexts[i]->stringify(&ss);\n                    xml.scopedElement(\"Info\").writeText(ss.str());\n                    ss.str(\"\");\n                }\n            }\n        }\n\n        unsigned line(unsigned l) const { return opt.no_line_numbers ? 0 : l; }\n\n        void test_case_start_impl(const TestCaseData& in) {\n            bool open_ts_tag = false;\n            if(tc != nullptr) { // we have already opened a test suite\n                if(std::strcmp(tc->m_test_suite, in.m_test_suite) != 0) {\n                    xml.endElement();\n                    open_ts_tag = true;\n                }\n            }\n            else {\n                open_ts_tag = true; // first test case ==> first test suite\n            }\n\n            if(open_ts_tag) {\n                xml.startElement(\"TestSuite\");\n                xml.writeAttribute(\"name\", in.m_test_suite);\n            }\n\n            tc = &in;\n            xml.startElement(\"TestCase\")\n                    .writeAttribute(\"name\", in.m_name)\n                    .writeAttribute(\"filename\", skipPathFromFilename(in.m_file.c_str()))\n                    .writeAttribute(\"line\", line(in.m_line))\n                    .writeAttribute(\"description\", in.m_description);\n\n            if(Approx(in.m_timeout) != 0)\n                xml.writeAttribute(\"timeout\", in.m_timeout);\n            if(in.m_may_fail)\n                xml.writeAttribute(\"may_fail\", true);\n            if(in.m_should_fail)\n                xml.writeAttribute(\"should_fail\", true);\n        }\n\n        // =========================================================================================\n        // WHAT FOLLOWS ARE OVERRIDES OF THE VIRTUAL METHODS OF THE REPORTER INTERFACE\n        // =========================================================================================\n\n        void report_query(const QueryData& in) override {\n            test_run_start();\n            if(opt.list_reporters) {\n                for(auto& curr : getListeners())\n                    xml.scopedElement(\"Listener\")\n                            .writeAttribute(\"priority\", curr.first.first)\n                            .writeAttribute(\"name\", curr.first.second);\n                for(auto& curr : getReporters())\n                    xml.scopedElement(\"Reporter\")\n                            .writeAttribute(\"priority\", curr.first.first)\n                            .writeAttribute(\"name\", curr.first.second);\n            } else if(opt.count || opt.list_test_cases) {\n                for(unsigned i = 0; i < in.num_data; ++i) {\n                    xml.scopedElement(\"TestCase\").writeAttribute(\"name\", in.data[i]->m_name)\n                        .writeAttribute(\"testsuite\", in.data[i]->m_test_suite)\n                        .writeAttribute(\"filename\", skipPathFromFilename(in.data[i]->m_file.c_str()))\n                        .writeAttribute(\"line\", line(in.data[i]->m_line))\n                        .writeAttribute(\"skipped\", in.data[i]->m_skip);\n                }\n                xml.scopedElement(\"OverallResultsTestCases\")\n                        .writeAttribute(\"unskipped\", in.run_stats->numTestCasesPassingFilters);\n            } else if(opt.list_test_suites) {\n                for(unsigned i = 0; i < in.num_data; ++i)\n                    xml.scopedElement(\"TestSuite\").writeAttribute(\"name\", in.data[i]->m_test_suite);\n                xml.scopedElement(\"OverallResultsTestCases\")\n                        .writeAttribute(\"unskipped\", in.run_stats->numTestCasesPassingFilters);\n                xml.scopedElement(\"OverallResultsTestSuites\")\n                        .writeAttribute(\"unskipped\", in.run_stats->numTestSuitesPassingFilters);\n            }\n            xml.endElement();\n        }\n\n        void test_run_start() override {\n            xml.writeDeclaration();\n\n            // remove .exe extension - mainly to have the same output on UNIX and Windows\n            std::string binary_name = skipPathFromFilename(opt.binary_name.c_str());\n#ifdef DOCTEST_PLATFORM_WINDOWS\n            if(binary_name.rfind(\".exe\") != std::string::npos)\n                binary_name = binary_name.substr(0, binary_name.length() - 4);\n#endif // DOCTEST_PLATFORM_WINDOWS\n\n            xml.startElement(\"doctest\").writeAttribute(\"binary\", binary_name);\n            if(opt.no_version == false)\n                xml.writeAttribute(\"version\", DOCTEST_VERSION_STR);\n\n            // only the consequential ones (TODO: filters)\n            xml.scopedElement(\"Options\")\n                    .writeAttribute(\"order_by\", opt.order_by.c_str())\n                    .writeAttribute(\"rand_seed\", opt.rand_seed)\n                    .writeAttribute(\"first\", opt.first)\n                    .writeAttribute(\"last\", opt.last)\n                    .writeAttribute(\"abort_after\", opt.abort_after)\n                    .writeAttribute(\"subcase_filter_levels\", opt.subcase_filter_levels)\n                    .writeAttribute(\"case_sensitive\", opt.case_sensitive)\n                    .writeAttribute(\"no_throw\", opt.no_throw)\n                    .writeAttribute(\"no_skip\", opt.no_skip);\n        }\n\n        void test_run_end(const TestRunStats& p) override {\n            if(tc) // the TestSuite tag - only if there has been at least 1 test case\n                xml.endElement();\n\n            xml.scopedElement(\"OverallResultsAsserts\")\n                    .writeAttribute(\"successes\", p.numAsserts - p.numAssertsFailed)\n                    .writeAttribute(\"failures\", p.numAssertsFailed);\n\n            xml.startElement(\"OverallResultsTestCases\")\n                    .writeAttribute(\"successes\",\n                                    p.numTestCasesPassingFilters - p.numTestCasesFailed)\n                    .writeAttribute(\"failures\", p.numTestCasesFailed);\n            if(opt.no_skipped_summary == false)\n                xml.writeAttribute(\"skipped\", p.numTestCases - p.numTestCasesPassingFilters);\n            xml.endElement();\n\n            xml.endElement();\n        }\n\n        void test_case_start(const TestCaseData& in) override {\n            test_case_start_impl(in);\n            xml.ensureTagClosed();\n        }\n\n        void test_case_reenter(const TestCaseData&) override {}\n\n        void test_case_end(const CurrentTestCaseStats& st) override {\n            xml.startElement(\"OverallResultsAsserts\")\n                    .writeAttribute(\"successes\",\n                                    st.numAssertsCurrentTest - st.numAssertsFailedCurrentTest)\n                    .writeAttribute(\"failures\", st.numAssertsFailedCurrentTest)\n                    .writeAttribute(\"test_case_success\", st.testCaseSuccess);\n            if(opt.duration)\n                xml.writeAttribute(\"duration\", st.seconds);\n            if(tc->m_expected_failures)\n                xml.writeAttribute(\"expected_failures\", tc->m_expected_failures);\n            xml.endElement();\n\n            xml.endElement();\n        }\n\n        void test_case_exception(const TestCaseException& e) override {\n            DOCTEST_LOCK_MUTEX(mutex)\n\n            xml.scopedElement(\"Exception\")\n                    .writeAttribute(\"crash\", e.is_crash)\n                    .writeText(e.error_string.c_str());\n        }\n\n        void subcase_start(const SubcaseSignature& in) override {\n            xml.startElement(\"SubCase\")\n                    .writeAttribute(\"name\", in.m_name)\n                    .writeAttribute(\"filename\", skipPathFromFilename(in.m_file))\n                    .writeAttribute(\"line\", line(in.m_line));\n            xml.ensureTagClosed();\n        }\n\n        void subcase_end() override { xml.endElement(); }\n\n        void log_assert(const AssertData& rb) override {\n            if(!rb.m_failed && !opt.success)\n                return;\n\n            DOCTEST_LOCK_MUTEX(mutex)\n\n            xml.startElement(\"Expression\")\n                    .writeAttribute(\"success\", !rb.m_failed)\n                    .writeAttribute(\"type\", assertString(rb.m_at))\n                    .writeAttribute(\"filename\", skipPathFromFilename(rb.m_file))\n                    .writeAttribute(\"line\", line(rb.m_line));\n\n            xml.scopedElement(\"Original\").writeText(rb.m_expr);\n\n            if(rb.m_threw)\n                xml.scopedElement(\"Exception\").writeText(rb.m_exception.c_str());\n\n            if(rb.m_at & assertType::is_throws_as)\n                xml.scopedElement(\"ExpectedException\").writeText(rb.m_exception_type);\n            if(rb.m_at & assertType::is_throws_with)\n                xml.scopedElement(\"ExpectedExceptionString\").writeText(rb.m_exception_string.c_str());\n            if((rb.m_at & assertType::is_normal) && !rb.m_threw)\n                xml.scopedElement(\"Expanded\").writeText(rb.m_decomp.c_str());\n\n            log_contexts();\n\n            xml.endElement();\n        }\n\n        void log_message(const MessageData& mb) override {\n            DOCTEST_LOCK_MUTEX(mutex)\n\n            xml.startElement(\"Message\")\n                    .writeAttribute(\"type\", failureString(mb.m_severity))\n                    .writeAttribute(\"filename\", skipPathFromFilename(mb.m_file))\n                    .writeAttribute(\"line\", line(mb.m_line));\n\n            xml.scopedElement(\"Text\").writeText(mb.m_string.c_str());\n\n            log_contexts();\n\n            xml.endElement();\n        }\n\n        void test_case_skipped(const TestCaseData& in) override {\n            if(opt.no_skipped_summary == false) {\n                test_case_start_impl(in);\n                xml.writeAttribute(\"skipped\", \"true\");\n                xml.endElement();\n            }\n        }\n    };\n\n    DOCTEST_REGISTER_REPORTER(\"xml\", 0, XmlReporter);\n\n    void fulltext_log_assert_to_stream(std::ostream& s, const AssertData& rb) {\n        if((rb.m_at & (assertType::is_throws_as | assertType::is_throws_with)) ==\n            0) //!OCLINT bitwise operator in conditional\n            s << Color::Cyan << assertString(rb.m_at) << \"( \" << rb.m_expr << \" ) \"\n                << Color::None;\n\n        if(rb.m_at & assertType::is_throws) { //!OCLINT bitwise operator in conditional\n            s << (rb.m_threw ? \"threw as expected!\" : \"did NOT throw at all!\") << \"\\n\";\n        } else if((rb.m_at & assertType::is_throws_as) &&\n                    (rb.m_at & assertType::is_throws_with)) { //!OCLINT\n            s << Color::Cyan << assertString(rb.m_at) << \"( \" << rb.m_expr << \", \\\"\"\n                << rb.m_exception_string.c_str()\n                << \"\\\", \" << rb.m_exception_type << \" ) \" << Color::None;\n            if(rb.m_threw) {\n                if(!rb.m_failed) {\n                    s << \"threw as expected!\\n\";\n                } else {\n                    s << \"threw a DIFFERENT exception! (contents: \" << rb.m_exception << \")\\n\";\n                }\n            } else {\n                s << \"did NOT throw at all!\\n\";\n            }\n        } else if(rb.m_at &\n                    assertType::is_throws_as) { //!OCLINT bitwise operator in conditional\n            s << Color::Cyan << assertString(rb.m_at) << \"( \" << rb.m_expr << \", \"\n                << rb.m_exception_type << \" ) \" << Color::None\n                << (rb.m_threw ? (rb.m_threw_as ? \"threw as expected!\" :\n                                                \"threw a DIFFERENT exception: \") :\n                                \"did NOT throw at all!\")\n                << Color::Cyan << rb.m_exception << \"\\n\";\n        } else if(rb.m_at &\n                    assertType::is_throws_with) { //!OCLINT bitwise operator in conditional\n            s << Color::Cyan << assertString(rb.m_at) << \"( \" << rb.m_expr << \", \\\"\"\n                << rb.m_exception_string.c_str()\n                << \"\\\" ) \" << Color::None\n                << (rb.m_threw ? (!rb.m_failed ? \"threw as expected!\" :\n                                                \"threw a DIFFERENT exception: \") :\n                                \"did NOT throw at all!\")\n                << Color::Cyan << rb.m_exception << \"\\n\";\n        } else if(rb.m_at & assertType::is_nothrow) { //!OCLINT bitwise operator in conditional\n            s << (rb.m_threw ? \"THREW exception: \" : \"didn't throw!\") << Color::Cyan\n                << rb.m_exception << \"\\n\";\n        } else {\n            s << (rb.m_threw ? \"THREW exception: \" :\n                                (!rb.m_failed ? \"is correct!\\n\" : \"is NOT correct!\\n\"));\n            if(rb.m_threw)\n                s << rb.m_exception << \"\\n\";\n            else\n                s << \"  values: \" << assertString(rb.m_at) << \"( \" << rb.m_decomp << \" )\\n\";\n        }\n    }\n\n    // TODO:\n    // - log_message()\n    // - respond to queries\n    // - honor remaining options\n    // - more attributes in tags\n    struct JUnitReporter : public IReporter\n    {\n        XmlWriter xml;\n        DOCTEST_DECLARE_MUTEX(mutex)\n        Timer timer;\n        std::vector<String> deepestSubcaseStackNames;\n\n        struct JUnitTestCaseData\n        {\n            static std::string getCurrentTimestamp() {\n                // Beware, this is not reentrant because of backward compatibility issues\n                // Also, UTC only, again because of backward compatibility (%z is C++11)\n                time_t rawtime;\n                std::time(&rawtime);\n                auto const timeStampSize = sizeof(\"2017-01-16T17:06:45Z\");\n\n                std::tm timeInfo;\n#ifdef DOCTEST_PLATFORM_WINDOWS\n                gmtime_s(&timeInfo, &rawtime);\n#else // DOCTEST_PLATFORM_WINDOWS\n                gmtime_r(&rawtime, &timeInfo);\n#endif // DOCTEST_PLATFORM_WINDOWS\n\n                char timeStamp[timeStampSize];\n                const char* const fmt = \"%Y-%m-%dT%H:%M:%SZ\";\n\n                std::strftime(timeStamp, timeStampSize, fmt, &timeInfo);\n                return std::string(timeStamp);\n            }\n\n            struct JUnitTestMessage\n            {\n                JUnitTestMessage(const std::string& _message, const std::string& _type, const std::string& _details)\n                    : message(_message), type(_type), details(_details) {}\n\n                JUnitTestMessage(const std::string& _message, const std::string& _details)\n                    : message(_message), type(), details(_details) {}\n\n                std::string message, type, details;\n            };\n\n            struct JUnitTestCase\n            {\n                JUnitTestCase(const std::string& _classname, const std::string& _name)\n                    : classname(_classname), name(_name), time(0), failures() {}\n\n                std::string classname, name;\n                double time;\n                std::vector<JUnitTestMessage> failures, errors;\n            };\n\n            void add(const std::string& classname, const std::string& name) {\n                testcases.emplace_back(classname, name);\n            }\n\n            void appendSubcaseNamesToLastTestcase(std::vector<String> nameStack) {\n                for(auto& curr: nameStack)\n                    if(curr.size())\n                        testcases.back().name += std::string(\"/\") + curr.c_str();\n            }\n\n            void addTime(double time) {\n                if(time < 1e-4)\n                    time = 0;\n                testcases.back().time = time;\n                totalSeconds += time;\n            }\n\n            void addFailure(const std::string& message, const std::string& type, const std::string& details) {\n                testcases.back().failures.emplace_back(message, type, details);\n                ++totalFailures;\n            }\n\n            void addError(const std::string& message, const std::string& details) {\n                testcases.back().errors.emplace_back(message, details);\n                ++totalErrors;\n            }\n\n            std::vector<JUnitTestCase> testcases;\n            double totalSeconds = 0;\n            int totalErrors = 0, totalFailures = 0;\n        };\n\n        JUnitTestCaseData testCaseData;\n\n        // caching pointers/references to objects of these types - safe to do\n        const ContextOptions& opt;\n        const TestCaseData*   tc = nullptr;\n\n        JUnitReporter(const ContextOptions& co)\n                : xml(*co.cout)\n                , opt(co) {}\n\n        unsigned line(unsigned l) const { return opt.no_line_numbers ? 0 : l; }\n\n        // =========================================================================================\n        // WHAT FOLLOWS ARE OVERRIDES OF THE VIRTUAL METHODS OF THE REPORTER INTERFACE\n        // =========================================================================================\n\n        void report_query(const QueryData&) override {\n            xml.writeDeclaration();\n        }\n\n        void test_run_start() override {\n            xml.writeDeclaration();\n        }\n\n        void test_run_end(const TestRunStats& p) override {\n            // remove .exe extension - mainly to have the same output on UNIX and Windows\n            std::string binary_name = skipPathFromFilename(opt.binary_name.c_str());\n#ifdef DOCTEST_PLATFORM_WINDOWS\n            if(binary_name.rfind(\".exe\") != std::string::npos)\n                binary_name = binary_name.substr(0, binary_name.length() - 4);\n#endif // DOCTEST_PLATFORM_WINDOWS\n            xml.startElement(\"testsuites\");\n            xml.startElement(\"testsuite\").writeAttribute(\"name\", binary_name)\n                    .writeAttribute(\"errors\", testCaseData.totalErrors)\n                    .writeAttribute(\"failures\", testCaseData.totalFailures)\n                    .writeAttribute(\"tests\", p.numAsserts);\n            if(opt.no_time_in_output == false) {\n                xml.writeAttribute(\"time\", testCaseData.totalSeconds);\n                xml.writeAttribute(\"timestamp\", JUnitTestCaseData::getCurrentTimestamp());\n            }\n            if(opt.no_version == false)\n                xml.writeAttribute(\"doctest_version\", DOCTEST_VERSION_STR);\n\n            for(const auto& testCase : testCaseData.testcases) {\n                xml.startElement(\"testcase\")\n                    .writeAttribute(\"classname\", testCase.classname)\n                    .writeAttribute(\"name\", testCase.name);\n                if(opt.no_time_in_output == false)\n                    xml.writeAttribute(\"time\", testCase.time);\n                // This is not ideal, but it should be enough to mimic gtest's junit output.\n                xml.writeAttribute(\"status\", \"run\");\n\n                for(const auto& failure : testCase.failures) {\n                    xml.scopedElement(\"failure\")\n                        .writeAttribute(\"message\", failure.message)\n                        .writeAttribute(\"type\", failure.type)\n                        .writeText(failure.details, false);\n                }\n\n                for(const auto& error : testCase.errors) {\n                    xml.scopedElement(\"error\")\n                        .writeAttribute(\"message\", error.message)\n                        .writeText(error.details);\n                }\n\n                xml.endElement();\n            }\n            xml.endElement();\n            xml.endElement();\n        }\n\n        void test_case_start(const TestCaseData& in) override {\n            testCaseData.add(skipPathFromFilename(in.m_file.c_str()), in.m_name);\n            timer.start();\n        }\n\n        void test_case_reenter(const TestCaseData& in) override {\n            testCaseData.addTime(timer.getElapsedSeconds());\n            testCaseData.appendSubcaseNamesToLastTestcase(deepestSubcaseStackNames);\n            deepestSubcaseStackNames.clear();\n\n            timer.start();\n            testCaseData.add(skipPathFromFilename(in.m_file.c_str()), in.m_name);\n        }\n\n        void test_case_end(const CurrentTestCaseStats&) override {\n            testCaseData.addTime(timer.getElapsedSeconds());\n            testCaseData.appendSubcaseNamesToLastTestcase(deepestSubcaseStackNames);\n            deepestSubcaseStackNames.clear();\n        }\n\n        void test_case_exception(const TestCaseException& e) override {\n            DOCTEST_LOCK_MUTEX(mutex)\n            testCaseData.addError(\"exception\", e.error_string.c_str());\n        }\n\n        void subcase_start(const SubcaseSignature& in) override {\n            deepestSubcaseStackNames.push_back(in.m_name);\n        }\n\n        void subcase_end() override {}\n\n        void log_assert(const AssertData& rb) override {\n            if(!rb.m_failed) // report only failures & ignore the `success` option\n                return;\n\n            DOCTEST_LOCK_MUTEX(mutex)\n\n            std::ostringstream os;\n            os << skipPathFromFilename(rb.m_file) << (opt.gnu_file_line ? \":\" : \"(\")\n              << line(rb.m_line) << (opt.gnu_file_line ? \":\" : \"):\") << std::endl;\n\n            fulltext_log_assert_to_stream(os, rb);\n            log_contexts(os);\n            testCaseData.addFailure(rb.m_decomp.c_str(), assertString(rb.m_at), os.str());\n        }\n\n        void log_message(const MessageData& mb) override {\n            if(mb.m_severity & assertType::is_warn) // report only failures\n                return;\n\n            DOCTEST_LOCK_MUTEX(mutex)\n\n            std::ostringstream os;\n            os << skipPathFromFilename(mb.m_file) << (opt.gnu_file_line ? \":\" : \"(\")\n              << line(mb.m_line) << (opt.gnu_file_line ? \":\" : \"):\") << std::endl;\n\n            os << mb.m_string.c_str() << \"\\n\";\n            log_contexts(os);\n\n            testCaseData.addFailure(mb.m_string.c_str(),\n                mb.m_severity & assertType::is_check ? \"FAIL_CHECK\" : \"FAIL\", os.str());\n        }\n\n        void test_case_skipped(const TestCaseData&) override {}\n\n        void log_contexts(std::ostringstream& s) {\n            int num_contexts = get_num_active_contexts();\n            if(num_contexts) {\n                auto contexts = get_active_contexts();\n\n                s << \"  logged: \";\n                for(int i = 0; i < num_contexts; ++i) {\n                    s << (i == 0 ? \"\" : \"          \");\n                    contexts[i]->stringify(&s);\n                    s << std::endl;\n                }\n            }\n        }\n    };\n\n    DOCTEST_REGISTER_REPORTER(\"junit\", 0, JUnitReporter);\n\n    struct Whitespace\n    {\n        int nrSpaces;\n        explicit Whitespace(int nr)\n                : nrSpaces(nr) {}\n    };\n\n    std::ostream& operator<<(std::ostream& out, const Whitespace& ws) {\n        if(ws.nrSpaces != 0)\n            out << std::setw(ws.nrSpaces) << ' ';\n        return out;\n    }\n\n    struct ConsoleReporter : public IReporter\n    {\n        std::ostream&                 s;\n        bool                          hasLoggedCurrentTestStart;\n        std::vector<SubcaseSignature> subcasesStack;\n        size_t                        currentSubcaseLevel;\n        DOCTEST_DECLARE_MUTEX(mutex)\n\n        // caching pointers/references to objects of these types - safe to do\n        const ContextOptions& opt;\n        const TestCaseData*   tc;\n\n        ConsoleReporter(const ContextOptions& co)\n                : s(*co.cout)\n                , opt(co) {}\n\n        ConsoleReporter(const ContextOptions& co, std::ostream& ostr)\n                : s(ostr)\n                , opt(co) {}\n\n        // =========================================================================================\n        // WHAT FOLLOWS ARE HELPERS USED BY THE OVERRIDES OF THE VIRTUAL METHODS OF THE INTERFACE\n        // =========================================================================================\n\n        void separator_to_stream() {\n            s << Color::Yellow\n              << \"===============================================================================\"\n                 \"\\n\";\n        }\n\n        const char* getSuccessOrFailString(bool success, assertType::Enum at,\n                                           const char* success_str) {\n            if(success)\n                return success_str;\n            return failureString(at);\n        }\n\n        Color::Enum getSuccessOrFailColor(bool success, assertType::Enum at) {\n            return success ? Color::BrightGreen :\n                             (at & assertType::is_warn) ? Color::Yellow : Color::Red;\n        }\n\n        void successOrFailColoredStringToStream(bool success, assertType::Enum at,\n                                                const char* success_str = \"SUCCESS\") {\n            s << getSuccessOrFailColor(success, at)\n              << getSuccessOrFailString(success, at, success_str) << \": \";\n        }\n\n        void log_contexts() {\n            int num_contexts = get_num_active_contexts();\n            if(num_contexts) {\n                auto contexts = get_active_contexts();\n\n                s << Color::None << \"  logged: \";\n                for(int i = 0; i < num_contexts; ++i) {\n                    s << (i == 0 ? \"\" : \"          \");\n                    contexts[i]->stringify(&s);\n                    s << \"\\n\";\n                }\n            }\n\n            s << \"\\n\";\n        }\n\n        // this was requested to be made virtual so users could override it\n        virtual void file_line_to_stream(const char* file, int line,\n                                        const char* tail = \"\") {\n            s << Color::LightGrey << skipPathFromFilename(file) << (opt.gnu_file_line ? \":\" : \"(\")\n            << (opt.no_line_numbers ? 0 : line) // 0 or the real num depending on the option\n            << (opt.gnu_file_line ? \":\" : \"):\") << tail;\n        }\n\n        void logTestStart() {\n            if(hasLoggedCurrentTestStart)\n                return;\n\n            separator_to_stream();\n            file_line_to_stream(tc->m_file.c_str(), tc->m_line, \"\\n\");\n            if(tc->m_description)\n                s << Color::Yellow << \"DESCRIPTION: \" << Color::None << tc->m_description << \"\\n\";\n            if(tc->m_test_suite && tc->m_test_suite[0] != '\\0')\n                s << Color::Yellow << \"TEST SUITE: \" << Color::None << tc->m_test_suite << \"\\n\";\n            if(strncmp(tc->m_name, \"  Scenario:\", 11) != 0)\n                s << Color::Yellow << \"TEST CASE:  \";\n            s << Color::None << tc->m_name << \"\\n\";\n\n            for(size_t i = 0; i < currentSubcaseLevel; ++i) {\n                if(subcasesStack[i].m_name[0] != '\\0')\n                    s << \"  \" << subcasesStack[i].m_name << \"\\n\";\n            }\n\n            if(currentSubcaseLevel != subcasesStack.size()) {\n                s << Color::Yellow << \"\\nDEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE):\\n\" << Color::None;\n                for(size_t i = 0; i < subcasesStack.size(); ++i) {\n                    if(subcasesStack[i].m_name[0] != '\\0')\n                        s << \"  \" << subcasesStack[i].m_name << \"\\n\";\n                }\n            }\n\n            s << \"\\n\";\n\n            hasLoggedCurrentTestStart = true;\n        }\n\n        void printVersion() {\n            if(opt.no_version == false)\n                s << Color::Cyan << \"[doctest] \" << Color::None << \"doctest version is \\\"\"\n                  << DOCTEST_VERSION_STR << \"\\\"\\n\";\n        }\n\n        void printIntro() {\n            if(opt.no_intro == false) {\n                printVersion();\n                s << Color::Cyan << \"[doctest] \" << Color::None\n                  << \"run with \\\"--\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"help\\\" for options\\n\";\n            }\n        }\n\n        void printHelp() {\n            int sizePrefixDisplay = static_cast<int>(strlen(DOCTEST_OPTIONS_PREFIX_DISPLAY));\n            printVersion();\n            // clang-format off\n            s << Color::Cyan << \"[doctest]\\n\" << Color::None;\n            s << Color::Cyan << \"[doctest] \" << Color::None;\n            s << \"boolean values: \\\"1/on/yes/true\\\" or \\\"0/off/no/false\\\"\\n\";\n            s << Color::Cyan << \"[doctest] \" << Color::None;\n            s << \"filter  values: \\\"str1,str2,str3\\\" (comma separated strings)\\n\";\n            s << Color::Cyan << \"[doctest]\\n\" << Color::None;\n            s << Color::Cyan << \"[doctest] \" << Color::None;\n            s << \"filters use wildcards for matching strings\\n\";\n            s << Color::Cyan << \"[doctest] \" << Color::None;\n            s << \"something passes a filter if any of the strings in a filter matches\\n\";\n#ifndef DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS\n            s << Color::Cyan << \"[doctest]\\n\" << Color::None;\n            s << Color::Cyan << \"[doctest] \" << Color::None;\n            s << \"ALL FLAGS, OPTIONS AND FILTERS ALSO AVAILABLE WITH A \\\"\" DOCTEST_CONFIG_OPTIONS_PREFIX \"\\\" PREFIX!!!\\n\";\n#endif\n            s << Color::Cyan << \"[doctest]\\n\" << Color::None;\n            s << Color::Cyan << \"[doctest] \" << Color::None;\n            s << \"Query flags - the program quits after them. Available:\\n\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"?,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"help, -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"h                      \"\n              << Whitespace(sizePrefixDisplay*0) <<  \"prints this message\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"v,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"version                       \"\n              << Whitespace(sizePrefixDisplay*1) << \"prints the version\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"c,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"count                         \"\n              << Whitespace(sizePrefixDisplay*1) << \"prints the number of matching tests\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"ltc, --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"list-test-cases               \"\n              << Whitespace(sizePrefixDisplay*1) << \"lists all matching tests by name\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"lts, --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"list-test-suites              \"\n              << Whitespace(sizePrefixDisplay*1) << \"lists all matching test suites\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"lr,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"list-reporters                \"\n              << Whitespace(sizePrefixDisplay*1) << \"lists all registered reporters\\n\\n\";\n            // ================================================================================== << 79\n            s << Color::Cyan << \"[doctest] \" << Color::None;\n            s << \"The available <int>/<string> options/filters are:\\n\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"tc,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"test-case=<filters>           \"\n              << Whitespace(sizePrefixDisplay*1) << \"filters     tests by their name\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"tce, --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"test-case-exclude=<filters>   \"\n              << Whitespace(sizePrefixDisplay*1) << \"filters OUT tests by their name\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"sf,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"source-file=<filters>         \"\n              << Whitespace(sizePrefixDisplay*1) << \"filters     tests by their file\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"sfe, --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"source-file-exclude=<filters> \"\n              << Whitespace(sizePrefixDisplay*1) << \"filters OUT tests by their file\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"ts,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"test-suite=<filters>          \"\n              << Whitespace(sizePrefixDisplay*1) << \"filters     tests by their test suite\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"tse, --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"test-suite-exclude=<filters>  \"\n              << Whitespace(sizePrefixDisplay*1) << \"filters OUT tests by their test suite\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"sc,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"subcase=<filters>             \"\n              << Whitespace(sizePrefixDisplay*1) << \"filters     subcases by their name\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"sce, --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"subcase-exclude=<filters>     \"\n              << Whitespace(sizePrefixDisplay*1) << \"filters OUT subcases by their name\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"r,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"reporters=<filters>           \"\n              << Whitespace(sizePrefixDisplay*1) << \"reporters to use (console is default)\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"o,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"out=<string>                  \"\n              << Whitespace(sizePrefixDisplay*1) << \"output filename\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"ob,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"order-by=<string>             \"\n              << Whitespace(sizePrefixDisplay*1) << \"how the tests should be ordered\\n\";\n            s << Whitespace(sizePrefixDisplay*3) << \"                                       <string> - [file/suite/name/rand/none]\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"rs,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"rand-seed=<int>               \"\n              << Whitespace(sizePrefixDisplay*1) << \"seed for random ordering\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"f,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"first=<int>                   \"\n              << Whitespace(sizePrefixDisplay*1) << \"the first test passing the filters to\\n\";\n            s << Whitespace(sizePrefixDisplay*3) << \"                                       execute - for range-based execution\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"l,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"last=<int>                    \"\n              << Whitespace(sizePrefixDisplay*1) << \"the last test passing the filters to\\n\";\n            s << Whitespace(sizePrefixDisplay*3) << \"                                       execute - for range-based execution\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"aa,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"abort-after=<int>             \"\n              << Whitespace(sizePrefixDisplay*1) << \"stop after <int> failed assertions\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"scfl,--\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"subcase-filter-levels=<int>   \"\n              << Whitespace(sizePrefixDisplay*1) << \"apply filters for the first <int> levels\\n\";\n            s << Color::Cyan << \"\\n[doctest] \" << Color::None;\n            s << \"Bool options - can be used like flags and true is assumed. Available:\\n\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"s,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"success=<bool>                \"\n              << Whitespace(sizePrefixDisplay*1) << \"include successful assertions in output\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"cs,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"case-sensitive=<bool>         \"\n              << Whitespace(sizePrefixDisplay*1) << \"filters being treated as case sensitive\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"e,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"exit=<bool>                   \"\n              << Whitespace(sizePrefixDisplay*1) << \"exits after the tests finish\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"d,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"duration=<bool>               \"\n              << Whitespace(sizePrefixDisplay*1) << \"prints the time duration of each test\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"m,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"minimal=<bool>                \"\n              << Whitespace(sizePrefixDisplay*1) << \"minimal console output (only failures)\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"q,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"quiet=<bool>                  \"\n              << Whitespace(sizePrefixDisplay*1) << \"no console output\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"nt,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"no-throw=<bool>               \"\n              << Whitespace(sizePrefixDisplay*1) << \"skips exceptions-related assert checks\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"ne,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"no-exitcode=<bool>            \"\n              << Whitespace(sizePrefixDisplay*1) << \"returns (or exits) always with success\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"nr,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"no-run=<bool>                 \"\n              << Whitespace(sizePrefixDisplay*1) << \"skips all runtime doctest operations\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"ni,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"no-intro=<bool>               \"\n              << Whitespace(sizePrefixDisplay*1) << \"omit the framework intro in the output\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"nv,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"no-version=<bool>             \"\n              << Whitespace(sizePrefixDisplay*1) << \"omit the framework version in the output\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"nc,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"no-colors=<bool>              \"\n              << Whitespace(sizePrefixDisplay*1) << \"disables colors in output\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"fc,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"force-colors=<bool>           \"\n              << Whitespace(sizePrefixDisplay*1) << \"use colors even when not in a tty\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"nb,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"no-breaks=<bool>              \"\n              << Whitespace(sizePrefixDisplay*1) << \"disables breakpoints in debuggers\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"ns,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"no-skip=<bool>                \"\n              << Whitespace(sizePrefixDisplay*1) << \"don't skip test cases marked as skip\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"gfl, --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"gnu-file-line=<bool>          \"\n              << Whitespace(sizePrefixDisplay*1) << \":n: vs (n): for line numbers in output\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"npf, --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"no-path-filenames=<bool>      \"\n              << Whitespace(sizePrefixDisplay*1) << \"only filenames and no paths in output\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"nln, --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"no-line-numbers=<bool>        \"\n              << Whitespace(sizePrefixDisplay*1) << \"0 instead of real line numbers in output\\n\";\n            // ================================================================================== << 79\n            // clang-format on\n\n            s << Color::Cyan << \"\\n[doctest] \" << Color::None;\n            s << \"for more information visit the project documentation\\n\\n\";\n        }\n\n        void printRegisteredReporters() {\n            printVersion();\n            auto printReporters = [this] (const reporterMap& reporters, const char* type) {\n                if(reporters.size()) {\n                    s << Color::Cyan << \"[doctest] \" << Color::None << \"listing all registered \" << type << \"\\n\";\n                    for(auto& curr : reporters)\n                        s << \"priority: \" << std::setw(5) << curr.first.first\n                          << \" name: \" << curr.first.second << \"\\n\";\n                }\n            };\n            printReporters(getListeners(), \"listeners\");\n            printReporters(getReporters(), \"reporters\");\n        }\n\n        // =========================================================================================\n        // WHAT FOLLOWS ARE OVERRIDES OF THE VIRTUAL METHODS OF THE REPORTER INTERFACE\n        // =========================================================================================\n\n        void report_query(const QueryData& in) override {\n            if(opt.version) {\n                printVersion();\n            } else if(opt.help) {\n                printHelp();\n            } else if(opt.list_reporters) {\n                printRegisteredReporters();\n            } else if(opt.count || opt.list_test_cases) {\n                if(opt.list_test_cases) {\n                    s << Color::Cyan << \"[doctest] \" << Color::None\n                      << \"listing all test case names\\n\";\n                    separator_to_stream();\n                }\n\n                for(unsigned i = 0; i < in.num_data; ++i)\n                    s << Color::None << in.data[i]->m_name << \"\\n\";\n\n                separator_to_stream();\n\n                s << Color::Cyan << \"[doctest] \" << Color::None\n                  << \"unskipped test cases passing the current filters: \"\n                  << g_cs->numTestCasesPassingFilters << \"\\n\";\n\n            } else if(opt.list_test_suites) {\n                s << Color::Cyan << \"[doctest] \" << Color::None << \"listing all test suites\\n\";\n                separator_to_stream();\n\n                for(unsigned i = 0; i < in.num_data; ++i)\n                    s << Color::None << in.data[i]->m_test_suite << \"\\n\";\n\n                separator_to_stream();\n\n                s << Color::Cyan << \"[doctest] \" << Color::None\n                  << \"unskipped test cases passing the current filters: \"\n                  << g_cs->numTestCasesPassingFilters << \"\\n\";\n                s << Color::Cyan << \"[doctest] \" << Color::None\n                  << \"test suites with unskipped test cases passing the current filters: \"\n                  << g_cs->numTestSuitesPassingFilters << \"\\n\";\n            }\n        }\n\n        void test_run_start() override {\n            if(!opt.minimal)\n                printIntro();\n        }\n\n        void test_run_end(const TestRunStats& p) override {\n            if(opt.minimal && p.numTestCasesFailed == 0)\n                return;\n\n            separator_to_stream();\n            s << std::dec;\n\n            auto totwidth = int(std::ceil(log10(static_cast<double>(std::max(p.numTestCasesPassingFilters, static_cast<unsigned>(p.numAsserts))) + 1)));\n            auto passwidth = int(std::ceil(log10(static_cast<double>(std::max(p.numTestCasesPassingFilters - p.numTestCasesFailed, static_cast<unsigned>(p.numAsserts - p.numAssertsFailed))) + 1)));\n            auto failwidth = int(std::ceil(log10(static_cast<double>(std::max(p.numTestCasesFailed, static_cast<unsigned>(p.numAssertsFailed))) + 1)));\n            const bool anythingFailed = p.numTestCasesFailed > 0 || p.numAssertsFailed > 0;\n            s << Color::Cyan << \"[doctest] \" << Color::None << \"test cases: \" << std::setw(totwidth)\n              << p.numTestCasesPassingFilters << \" | \"\n              << ((p.numTestCasesPassingFilters == 0 || anythingFailed) ? Color::None :\n                                                                          Color::Green)\n              << std::setw(passwidth) << p.numTestCasesPassingFilters - p.numTestCasesFailed << \" passed\"\n              << Color::None << \" | \" << (p.numTestCasesFailed > 0 ? Color::Red : Color::None)\n              << std::setw(failwidth) << p.numTestCasesFailed << \" failed\" << Color::None << \" |\";\n            if(opt.no_skipped_summary == false) {\n                const int numSkipped = p.numTestCases - p.numTestCasesPassingFilters;\n                s << \" \" << (numSkipped == 0 ? Color::None : Color::Yellow) << numSkipped\n                  << \" skipped\" << Color::None;\n            }\n            s << \"\\n\";\n            s << Color::Cyan << \"[doctest] \" << Color::None << \"assertions: \" << std::setw(totwidth)\n              << p.numAsserts << \" | \"\n              << ((p.numAsserts == 0 || anythingFailed) ? Color::None : Color::Green)\n              << std::setw(passwidth) << (p.numAsserts - p.numAssertsFailed) << \" passed\" << Color::None\n              << \" | \" << (p.numAssertsFailed > 0 ? Color::Red : Color::None) << std::setw(failwidth)\n              << p.numAssertsFailed << \" failed\" << Color::None << \" |\\n\";\n            s << Color::Cyan << \"[doctest] \" << Color::None\n              << \"Status: \" << (p.numTestCasesFailed > 0 ? Color::Red : Color::Green)\n              << ((p.numTestCasesFailed > 0) ? \"FAILURE!\" : \"SUCCESS!\") << Color::None << std::endl;\n        }\n\n        void test_case_start(const TestCaseData& in) override {\n            hasLoggedCurrentTestStart = false;\n            tc                        = &in;\n            subcasesStack.clear();\n            currentSubcaseLevel = 0;\n        }\n\n        void test_case_reenter(const TestCaseData&) override {\n            subcasesStack.clear();\n        }\n\n        void test_case_end(const CurrentTestCaseStats& st) override {\n            if(tc->m_no_output)\n                return;\n\n            // log the preamble of the test case only if there is something\n            // else to print - something other than that an assert has failed\n            if(opt.duration ||\n               (st.failure_flags && st.failure_flags != static_cast<int>(TestCaseFailureReason::AssertFailure)))\n                logTestStart();\n\n            if(opt.duration)\n                s << Color::None << std::setprecision(6) << std::fixed << st.seconds\n                  << \" s: \" << tc->m_name << \"\\n\";\n\n            if(st.failure_flags & TestCaseFailureReason::Timeout)\n                s << Color::Red << \"Test case exceeded time limit of \" << std::setprecision(6)\n                  << std::fixed << tc->m_timeout << \"!\\n\";\n\n            if(st.failure_flags & TestCaseFailureReason::ShouldHaveFailedButDidnt) {\n                s << Color::Red << \"Should have failed but didn't! Marking it as failed!\\n\";\n            } else if(st.failure_flags & TestCaseFailureReason::ShouldHaveFailedAndDid) {\n                s << Color::Yellow << \"Failed as expected so marking it as not failed\\n\";\n            } else if(st.failure_flags & TestCaseFailureReason::CouldHaveFailedAndDid) {\n                s << Color::Yellow << \"Allowed to fail so marking it as not failed\\n\";\n            } else if(st.failure_flags & TestCaseFailureReason::DidntFailExactlyNumTimes) {\n                s << Color::Red << \"Didn't fail exactly \" << tc->m_expected_failures\n                  << \" times so marking it as failed!\\n\";\n            } else if(st.failure_flags & TestCaseFailureReason::FailedExactlyNumTimes) {\n                s << Color::Yellow << \"Failed exactly \" << tc->m_expected_failures\n                  << \" times as expected so marking it as not failed!\\n\";\n            }\n            if(st.failure_flags & TestCaseFailureReason::TooManyFailedAsserts) {\n                s << Color::Red << \"Aborting - too many failed asserts!\\n\";\n            }\n            s << Color::None; // lgtm [cpp/useless-expression]\n        }\n\n        void test_case_exception(const TestCaseException& e) override {\n            DOCTEST_LOCK_MUTEX(mutex)\n            if(tc->m_no_output)\n                return;\n\n            logTestStart();\n\n            file_line_to_stream(tc->m_file.c_str(), tc->m_line, \" \");\n            successOrFailColoredStringToStream(false, e.is_crash ? assertType::is_require :\n                                                                   assertType::is_check);\n            s << Color::Red << (e.is_crash ? \"test case CRASHED: \" : \"test case THREW exception: \")\n              << Color::Cyan << e.error_string << \"\\n\";\n\n            int num_stringified_contexts = get_num_stringified_contexts();\n            if(num_stringified_contexts) {\n                auto stringified_contexts = get_stringified_contexts();\n                s << Color::None << \"  logged: \";\n                for(int i = num_stringified_contexts; i > 0; --i) {\n                    s << (i == num_stringified_contexts ? \"\" : \"          \")\n                      << stringified_contexts[i - 1] << \"\\n\";\n                }\n            }\n            s << \"\\n\" << Color::None;\n        }\n\n        void subcase_start(const SubcaseSignature& subc) override {\n            subcasesStack.push_back(subc);\n            ++currentSubcaseLevel;\n            hasLoggedCurrentTestStart = false;\n        }\n\n        void subcase_end() override {\n            --currentSubcaseLevel;\n            hasLoggedCurrentTestStart = false;\n        }\n\n        void log_assert(const AssertData& rb) override {\n            if((!rb.m_failed && !opt.success) || tc->m_no_output)\n                return;\n\n            DOCTEST_LOCK_MUTEX(mutex)\n\n            logTestStart();\n\n            file_line_to_stream(rb.m_file, rb.m_line, \" \");\n            successOrFailColoredStringToStream(!rb.m_failed, rb.m_at);\n\n            fulltext_log_assert_to_stream(s, rb);\n\n            log_contexts();\n        }\n\n        void log_message(const MessageData& mb) override {\n            if(tc->m_no_output)\n                return;\n\n            DOCTEST_LOCK_MUTEX(mutex)\n\n            logTestStart();\n\n            file_line_to_stream(mb.m_file, mb.m_line, \" \");\n            s << getSuccessOrFailColor(false, mb.m_severity)\n              << getSuccessOrFailString(mb.m_severity & assertType::is_warn, mb.m_severity,\n                                        \"MESSAGE\") << \": \";\n            s << Color::None << mb.m_string << \"\\n\";\n            log_contexts();\n        }\n\n        void test_case_skipped(const TestCaseData&) override {}\n    };\n\n    DOCTEST_REGISTER_REPORTER(\"console\", 0, ConsoleReporter);\n\n#ifdef DOCTEST_PLATFORM_WINDOWS\n    struct DebugOutputWindowReporter : public ConsoleReporter\n    {\n        DOCTEST_THREAD_LOCAL static doctest_thread_local_wrapper<std::ostringstream> wrapped_oss;\n\n        DebugOutputWindowReporter(const ContextOptions& co)\n                : ConsoleReporter(co, wrapped_oss.get()) {}\n\n#define DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(func, type, arg)                                    \\\n    void func(type arg) override {                                                                 \\\n        bool with_col = g_no_colors;                                                               \\\n        g_no_colors   = false;                                                                     \\\n        ConsoleReporter::func(arg);                                                                \\\n        if(wrapped_oss.get().tellp() != std::streampos{}) {                                        \\\n            DOCTEST_OUTPUT_DEBUG_STRING(wrapped_oss.get().str().c_str());                          \\\n            wrapped_oss.get().str(\"\");                                                             \\\n        }                                                                                          \\\n        g_no_colors = with_col;                                                                    \\\n    }\n\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_run_start, DOCTEST_EMPTY, DOCTEST_EMPTY)\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_run_end, const TestRunStats&, in)\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_start, const TestCaseData&, in)\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_reenter, const TestCaseData&, in)\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_end, const CurrentTestCaseStats&, in)\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_exception, const TestCaseException&, in)\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(subcase_start, const SubcaseSignature&, in)\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(subcase_end, DOCTEST_EMPTY, DOCTEST_EMPTY)\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(log_assert, const AssertData&, in)\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(log_message, const MessageData&, in)\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_skipped, const TestCaseData&, in)\n    };\n\n    DOCTEST_THREAD_LOCAL doctest_thread_local_wrapper<std::ostringstream> DebugOutputWindowReporter::wrapped_oss;\n#endif // DOCTEST_PLATFORM_WINDOWS\n\n    // the implementation of parseOption()\n    bool parseOptionImpl(int argc, const char* const* argv, const char* pattern, String* value) {\n        // going from the end to the beginning and stopping on the first occurrence from the end\n        for(int i = argc; i > 0; --i) {\n            auto index = i - 1;\n            auto temp = std::strstr(argv[index], pattern);\n            if(temp && (value || strlen(temp) == strlen(pattern))) { //!OCLINT prefer early exits and continue\n                // eliminate matches in which the chars before the option are not '-'\n                bool noBadCharsFound = true;\n                auto curr            = argv[index];\n                while(curr != temp) {\n                    if(*curr++ != '-') {\n                        noBadCharsFound = false;\n                        break;\n                    }\n                }\n                if(noBadCharsFound && argv[index][0] == '-') {\n                    if(value) {\n                        // parsing the value of an option\n                        temp += strlen(pattern);\n                        const unsigned len = strlen(temp);\n                        if(len) {\n                            *value = temp;\n                            return true;\n                        }\n                    } else {\n                        // just a flag - no value\n                        return true;\n                    }\n                }\n            }\n        }\n        return false;\n    }\n\n    // parses an option and returns the string after the '=' character\n    bool parseOption(int argc, const char* const* argv, const char* pattern, String* value = nullptr,\n                     const String& defaultVal = String()) {\n        if(value)\n            *value = defaultVal;\n#ifndef DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS\n        // offset (normally 3 for \"dt-\") to skip prefix\n        if(parseOptionImpl(argc, argv, pattern + strlen(DOCTEST_CONFIG_OPTIONS_PREFIX), value))\n            return true;\n#endif // DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS\n        return parseOptionImpl(argc, argv, pattern, value);\n    }\n\n    // locates a flag on the command line\n    bool parseFlag(int argc, const char* const* argv, const char* pattern) {\n        return parseOption(argc, argv, pattern);\n    }\n\n    // parses a comma separated list of words after a pattern in one of the arguments in argv\n    bool parseCommaSepArgs(int argc, const char* const* argv, const char* pattern,\n                           std::vector<String>& res) {\n        String filtersString;\n        if(parseOption(argc, argv, pattern, &filtersString)) {\n            // tokenize with \",\" as a separator, unless escaped with backslash\n            std::ostringstream s;\n            auto flush = [&s, &res]() {\n                auto string = s.str();\n                if(string.size() > 0) {\n                    res.push_back(string.c_str());\n                }\n                s.str(\"\");\n            };\n\n            bool seenBackslash = false;\n            const char* current = filtersString.c_str();\n            const char* end = current + strlen(current);\n            while(current != end) {\n                char character = *current++;\n                if(seenBackslash) {\n                    seenBackslash = false;\n                    if(character == ',' || character == '\\\\') {\n                        s.put(character);\n                        continue;\n                    }\n                    s.put('\\\\');\n                }\n                if(character == '\\\\') {\n                    seenBackslash = true;\n                } else if(character == ',') {\n                    flush();\n                } else {\n                    s.put(character);\n                }\n            }\n\n            if(seenBackslash) {\n                s.put('\\\\');\n            }\n            flush();\n            return true;\n        }\n        return false;\n    }\n\n    enum optionType\n    {\n        option_bool,\n        option_int\n    };\n\n    // parses an int/bool option from the command line\n    bool parseIntOption(int argc, const char* const* argv, const char* pattern, optionType type,\n                        int& res) {\n        String parsedValue;\n        if(!parseOption(argc, argv, pattern, &parsedValue))\n            return false;\n\n        if(type) {\n            // integer\n            // TODO: change this to use std::stoi or something else! currently it uses undefined behavior - assumes '0' on failed parse...\n            int theInt = std::atoi(parsedValue.c_str());\n            if (theInt != 0) {\n                res = theInt; //!OCLINT parameter reassignment\n                return true;\n            }\n        } else {\n            // boolean\n            const char positive[][5] = { \"1\", \"true\", \"on\", \"yes\" };  // 5 - strlen(\"true\") + 1\n            const char negative[][6] = { \"0\", \"false\", \"off\", \"no\" }; // 6 - strlen(\"false\") + 1\n\n            // if the value matches any of the positive/negative possibilities\n            for (unsigned i = 0; i < 4; i++) {\n                if (parsedValue.compare(positive[i], true) == 0) {\n                    res = 1; //!OCLINT parameter reassignment\n                    return true;\n                }\n                if (parsedValue.compare(negative[i], true) == 0) {\n                    res = 0; //!OCLINT parameter reassignment\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n} // namespace\n\nContext::Context(int argc, const char* const* argv)\n        : p(new detail::ContextState) {\n    parseArgs(argc, argv, true);\n    if(argc)\n        p->binary_name = argv[0];\n}\n\nContext::~Context() {\n    if(g_cs == p)\n        g_cs = nullptr;\n    delete p;\n}\n\nvoid Context::applyCommandLine(int argc, const char* const* argv) {\n    parseArgs(argc, argv);\n    if(argc)\n        p->binary_name = argv[0];\n}\n\n// parses args\nvoid Context::parseArgs(int argc, const char* const* argv, bool withDefaults) {\n    using namespace detail;\n\n    // clang-format off\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"source-file=\",        p->filters[0]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"sf=\",                 p->filters[0]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"source-file-exclude=\",p->filters[1]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"sfe=\",                p->filters[1]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"test-suite=\",         p->filters[2]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"ts=\",                 p->filters[2]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"test-suite-exclude=\", p->filters[3]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"tse=\",                p->filters[3]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"test-case=\",          p->filters[4]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"tc=\",                 p->filters[4]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"test-case-exclude=\",  p->filters[5]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"tce=\",                p->filters[5]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"subcase=\",            p->filters[6]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"sc=\",                 p->filters[6]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"subcase-exclude=\",    p->filters[7]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"sce=\",                p->filters[7]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"reporters=\",          p->filters[8]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"r=\",                  p->filters[8]);\n    // clang-format on\n\n    int    intRes = 0;\n    String strRes;\n\n#define DOCTEST_PARSE_AS_BOOL_OR_FLAG(name, sname, var, default)                                   \\\n    if(parseIntOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX name \"=\", option_bool, intRes) ||  \\\n       parseIntOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX sname \"=\", option_bool, intRes))   \\\n        p->var = static_cast<bool>(intRes);                                                        \\\n    else if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX name) ||                           \\\n            parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX sname))                            \\\n        p->var = true;                                                                             \\\n    else if(withDefaults)                                                                          \\\n    p->var = default\n\n#define DOCTEST_PARSE_INT_OPTION(name, sname, var, default)                                        \\\n    if(parseIntOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX name \"=\", option_int, intRes) ||   \\\n       parseIntOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX sname \"=\", option_int, intRes))    \\\n        p->var = intRes;                                                                           \\\n    else if(withDefaults)                                                                          \\\n    p->var = default\n\n#define DOCTEST_PARSE_STR_OPTION(name, sname, var, default)                                        \\\n    if(parseOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX name \"=\", &strRes, default) ||        \\\n       parseOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX sname \"=\", &strRes, default) ||       \\\n       withDefaults)                                                                               \\\n    p->var = strRes\n\n    // clang-format off\n    DOCTEST_PARSE_STR_OPTION(\"out\", \"o\", out, \"\");\n    DOCTEST_PARSE_STR_OPTION(\"order-by\", \"ob\", order_by, \"file\");\n    DOCTEST_PARSE_INT_OPTION(\"rand-seed\", \"rs\", rand_seed, 0);\n\n    DOCTEST_PARSE_INT_OPTION(\"first\", \"f\", first, 0);\n    DOCTEST_PARSE_INT_OPTION(\"last\", \"l\", last, UINT_MAX);\n\n    DOCTEST_PARSE_INT_OPTION(\"abort-after\", \"aa\", abort_after, 0);\n    DOCTEST_PARSE_INT_OPTION(\"subcase-filter-levels\", \"scfl\", subcase_filter_levels, INT_MAX);\n\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"success\", \"s\", success, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"case-sensitive\", \"cs\", case_sensitive, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"exit\", \"e\", exit, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"duration\", \"d\", duration, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"minimal\", \"m\", minimal, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"quiet\", \"q\", quiet, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-throw\", \"nt\", no_throw, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-exitcode\", \"ne\", no_exitcode, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-run\", \"nr\", no_run, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-intro\", \"ni\", no_intro, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-version\", \"nv\", no_version, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-colors\", \"nc\", no_colors, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"force-colors\", \"fc\", force_colors, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-breaks\", \"nb\", no_breaks, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-skip\", \"ns\", no_skip, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"gnu-file-line\", \"gfl\", gnu_file_line, !bool(DOCTEST_MSVC));\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-path-filenames\", \"npf\", no_path_in_filenames, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-line-numbers\", \"nln\", no_line_numbers, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-debug-output\", \"ndo\", no_debug_output, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-skipped-summary\", \"nss\", no_skipped_summary, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-time-in-output\", \"ntio\", no_time_in_output, false);\n    // clang-format on\n\n    if(withDefaults) {\n        p->help             = false;\n        p->version          = false;\n        p->count            = false;\n        p->list_test_cases  = false;\n        p->list_test_suites = false;\n        p->list_reporters   = false;\n    }\n    if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"help\") ||\n       parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"h\") ||\n       parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"?\")) {\n        p->help = true;\n        p->exit = true;\n    }\n    if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"version\") ||\n       parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"v\")) {\n        p->version = true;\n        p->exit    = true;\n    }\n    if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"count\") ||\n       parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"c\")) {\n        p->count = true;\n        p->exit  = true;\n    }\n    if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"list-test-cases\") ||\n       parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"ltc\")) {\n        p->list_test_cases = true;\n        p->exit            = true;\n    }\n    if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"list-test-suites\") ||\n       parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"lts\")) {\n        p->list_test_suites = true;\n        p->exit             = true;\n    }\n    if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"list-reporters\") ||\n       parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"lr\")) {\n        p->list_reporters = true;\n        p->exit           = true;\n    }\n}\n\n// allows the user to add procedurally to the filters from the command line\nvoid Context::addFilter(const char* filter, const char* value) { setOption(filter, value); }\n\n// allows the user to clear all filters from the command line\nvoid Context::clearFilters() {\n    for(auto& curr : p->filters)\n        curr.clear();\n}\n\n// allows the user to override procedurally the bool options from the command line\nvoid Context::setOption(const char* option, bool value) {\n    setOption(option, value ? \"true\" : \"false\");\n}\n\n// allows the user to override procedurally the int options from the command line\nvoid Context::setOption(const char* option, int value) {\n    setOption(option, toString(value).c_str());\n}\n\n// allows the user to override procedurally the string options from the command line\nvoid Context::setOption(const char* option, const char* value) {\n    auto argv   = String(\"-\") + option + \"=\" + value;\n    auto lvalue = argv.c_str();\n    parseArgs(1, &lvalue);\n}\n\n// users should query this in their main() and exit the program if true\nbool Context::shouldExit() { return p->exit; }\n\nvoid Context::setAsDefaultForAssertsOutOfTestCases() { g_cs = p; }\n\nvoid Context::setAssertHandler(detail::assert_handler ah) { p->ah = ah; }\n\nvoid Context::setCout(std::ostream* out) { p->cout = out; }\n\nstatic class DiscardOStream : public std::ostream\n{\nprivate:\n    class : public std::streambuf\n    {\n    private:\n        // allowing some buffering decreases the amount of calls to overflow\n        char buf[1024];\n\n    protected:\n        std::streamsize xsputn(const char_type*, std::streamsize count) override { return count; }\n\n        int_type overflow(int_type ch) override {\n            setp(std::begin(buf), std::end(buf));\n            return traits_type::not_eof(ch);\n        }\n    } discardBuf;\n\npublic:\n    DiscardOStream()\n            : std::ostream(&discardBuf) {}\n} discardOut;\n\n// the main function that does all the filtering and test running\nint Context::run() {\n    using namespace detail;\n\n    // save the old context state in case such was setup - for using asserts out of a testing context\n    auto old_cs = g_cs;\n    // this is the current contest\n    g_cs               = p;\n    is_running_in_test = true;\n\n    g_no_colors = p->no_colors;\n    p->resetRunData();\n\n    std::fstream fstr;\n    if(p->cout == nullptr) {\n        if(p->quiet) {\n            p->cout = &discardOut;\n        } else if(p->out.size()) {\n            // to a file if specified\n            fstr.open(p->out.c_str(), std::fstream::out);\n            p->cout = &fstr;\n        } else {\n#ifndef DOCTEST_CONFIG_NO_INCLUDE_IOSTREAM\n            // stdout by default\n            p->cout = &std::cout;\n#else // DOCTEST_CONFIG_NO_INCLUDE_IOSTREAM\n            return EXIT_FAILURE;\n#endif // DOCTEST_CONFIG_NO_INCLUDE_IOSTREAM\n        }\n    }\n\n    FatalConditionHandler::allocateAltStackMem();\n\n    auto cleanup_and_return = [&]() {\n        FatalConditionHandler::freeAltStackMem();\n\n        if(fstr.is_open())\n            fstr.close();\n\n        // restore context\n        g_cs               = old_cs;\n        is_running_in_test = false;\n\n        // we have to free the reporters which were allocated when the run started\n        for(auto& curr : p->reporters_currently_used)\n            delete curr;\n        p->reporters_currently_used.clear();\n\n        if(p->numTestCasesFailed && !p->no_exitcode)\n            return EXIT_FAILURE;\n        return EXIT_SUCCESS;\n    };\n\n    // setup default reporter if none is given through the command line\n    if(p->filters[8].empty())\n        p->filters[8].push_back(\"console\");\n\n    // check to see if any of the registered reporters has been selected\n    for(auto& curr : getReporters()) {\n        if(matchesAny(curr.first.second.c_str(), p->filters[8], false, p->case_sensitive))\n            p->reporters_currently_used.push_back(curr.second(*g_cs));\n    }\n\n    // TODO: check if there is nothing in reporters_currently_used\n\n    // prepend all listeners\n    for(auto& curr : getListeners())\n        p->reporters_currently_used.insert(p->reporters_currently_used.begin(), curr.second(*g_cs));\n\n#ifdef DOCTEST_PLATFORM_WINDOWS\n    if(isDebuggerActive() && p->no_debug_output == false)\n        p->reporters_currently_used.push_back(new DebugOutputWindowReporter(*g_cs));\n#endif // DOCTEST_PLATFORM_WINDOWS\n\n    // handle version, help and no_run\n    if(p->no_run || p->version || p->help || p->list_reporters) {\n        DOCTEST_ITERATE_THROUGH_REPORTERS(report_query, QueryData());\n\n        return cleanup_and_return();\n    }\n\n    std::vector<const TestCase*> testArray;\n    for(auto& curr : getRegisteredTests())\n        testArray.push_back(&curr);\n    p->numTestCases = testArray.size();\n\n    // sort the collected records\n    if(!testArray.empty()) {\n        if(p->order_by.compare(\"file\", true) == 0) {\n            std::sort(testArray.begin(), testArray.end(), fileOrderComparator);\n        } else if(p->order_by.compare(\"suite\", true) == 0) {\n            std::sort(testArray.begin(), testArray.end(), suiteOrderComparator);\n        } else if(p->order_by.compare(\"name\", true) == 0) {\n            std::sort(testArray.begin(), testArray.end(), nameOrderComparator);\n        } else if(p->order_by.compare(\"rand\", true) == 0) {\n            std::srand(p->rand_seed);\n\n            // random_shuffle implementation\n            const auto first = &testArray[0];\n            for(size_t i = testArray.size() - 1; i > 0; --i) {\n                int idxToSwap = std::rand() % (i + 1);\n\n                const auto temp = first[i];\n\n                first[i]         = first[idxToSwap];\n                first[idxToSwap] = temp;\n            }\n        } else if(p->order_by.compare(\"none\", true) == 0) {\n            // means no sorting - beneficial for death tests which call into the executable\n            // with a specific test case in mind - we don't want to slow down the startup times\n        }\n    }\n\n    std::set<String> testSuitesPassingFilt;\n\n    bool                             query_mode = p->count || p->list_test_cases || p->list_test_suites;\n    std::vector<const TestCaseData*> queryResults;\n\n    if(!query_mode)\n        DOCTEST_ITERATE_THROUGH_REPORTERS(test_run_start, DOCTEST_EMPTY);\n\n    // invoke the registered functions if they match the filter criteria (or just count them)\n    for(auto& curr : testArray) {\n        const auto& tc = *curr;\n\n        bool skip_me = false;\n        if(tc.m_skip && !p->no_skip)\n            skip_me = true;\n\n        if(!matchesAny(tc.m_file.c_str(), p->filters[0], true, p->case_sensitive))\n            skip_me = true;\n        if(matchesAny(tc.m_file.c_str(), p->filters[1], false, p->case_sensitive))\n            skip_me = true;\n        if(!matchesAny(tc.m_test_suite, p->filters[2], true, p->case_sensitive))\n            skip_me = true;\n        if(matchesAny(tc.m_test_suite, p->filters[3], false, p->case_sensitive))\n            skip_me = true;\n        if(!matchesAny(tc.m_name, p->filters[4], true, p->case_sensitive))\n            skip_me = true;\n        if(matchesAny(tc.m_name, p->filters[5], false, p->case_sensitive))\n            skip_me = true;\n\n        if(!skip_me)\n            p->numTestCasesPassingFilters++;\n\n        // skip the test if it is not in the execution range\n        if((p->last < p->numTestCasesPassingFilters && p->first <= p->last) ||\n           (p->first > p->numTestCasesPassingFilters))\n            skip_me = true;\n\n        if(skip_me) {\n            if(!query_mode)\n                DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_skipped, tc);\n            continue;\n        }\n\n        // do not execute the test if we are to only count the number of filter passing tests\n        if(p->count)\n            continue;\n\n        // print the name of the test and don't execute it\n        if(p->list_test_cases) {\n            queryResults.push_back(&tc);\n            continue;\n        }\n\n        // print the name of the test suite if not done already and don't execute it\n        if(p->list_test_suites) {\n            if((testSuitesPassingFilt.count(tc.m_test_suite) == 0) && tc.m_test_suite[0] != '\\0') {\n                queryResults.push_back(&tc);\n                testSuitesPassingFilt.insert(tc.m_test_suite);\n                p->numTestSuitesPassingFilters++;\n            }\n            continue;\n        }\n\n        // execute the test if it passes all the filtering\n        {\n            p->currentTest = &tc;\n\n            p->failure_flags = TestCaseFailureReason::None;\n            p->seconds       = 0;\n\n            // reset atomic counters\n            p->numAssertsFailedCurrentTest_atomic = 0;\n            p->numAssertsCurrentTest_atomic       = 0;\n\n            p->fullyTraversedSubcases.clear();\n\n            DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_start, tc);\n\n            p->timer.start();\n\n            bool run_test = true;\n\n            do {\n                // reset some of the fields for subcases (except for the set of fully passed ones)\n                p->reachedLeaf = false;\n                // May not be empty if previous subcase exited via exception.\n                p->subcaseStack.clear();\n                p->currentSubcaseDepth = 0;\n\n                p->shouldLogCurrentException = true;\n\n                // reset stuff for logging with INFO()\n                p->stringifiedContexts.clear();\n\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n                try {\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n// MSVC 2015 diagnoses fatalConditionHandler as unused (because reset() is a static method)\nDOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4101) // unreferenced local variable\n                    FatalConditionHandler fatalConditionHandler; // Handle signals\n                    // execute the test\n                    tc.m_test();\n                    fatalConditionHandler.reset();\nDOCTEST_MSVC_SUPPRESS_WARNING_POP\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n                } catch(const TestFailureException&) {\n                    p->failure_flags |= TestCaseFailureReason::AssertFailure;\n                } catch(...) {\n                    DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_exception,\n                                                      {translateActiveException(), false});\n                    p->failure_flags |= TestCaseFailureReason::Exception;\n                }\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n\n                // exit this loop if enough assertions have failed - even if there are more subcases\n                if(p->abort_after > 0 &&\n                   p->numAssertsFailed + p->numAssertsFailedCurrentTest_atomic >= p->abort_after) {\n                    run_test = false;\n                    p->failure_flags |= TestCaseFailureReason::TooManyFailedAsserts;\n                }\n\n                if(!p->nextSubcaseStack.empty() && run_test)\n                    DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_reenter, tc);\n                if(p->nextSubcaseStack.empty())\n                    run_test = false;\n            } while(run_test);\n\n            p->finalizeTestCaseData();\n\n            DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_end, *g_cs);\n\n            p->currentTest = nullptr;\n\n            // stop executing tests if enough assertions have failed\n            if(p->abort_after > 0 && p->numAssertsFailed >= p->abort_after)\n                break;\n        }\n    }\n\n    if(!query_mode) {\n        DOCTEST_ITERATE_THROUGH_REPORTERS(test_run_end, *g_cs);\n    } else {\n        QueryData qdata;\n        qdata.run_stats = g_cs;\n        qdata.data      = queryResults.data();\n        qdata.num_data  = unsigned(queryResults.size());\n        DOCTEST_ITERATE_THROUGH_REPORTERS(report_query, qdata);\n    }\n\n    return cleanup_and_return();\n}\n\nDOCTEST_DEFINE_INTERFACE(IReporter)\n\nint IReporter::get_num_active_contexts() { return detail::wrapped_g_infoContexts.get().size(); }\nconst IContextScope* const* IReporter::get_active_contexts() {\n    return get_num_active_contexts() ? &detail::wrapped_g_infoContexts.get()[0] : nullptr;\n}\n\nint IReporter::get_num_stringified_contexts() { return detail::g_cs->stringifiedContexts.size(); }\nconst String* IReporter::get_stringified_contexts() {\n    return get_num_stringified_contexts() ? &detail::g_cs->stringifiedContexts[0] : nullptr;\n}\n\nnamespace detail {\n    void registerReporterImpl(const char* name, int priority, reporterCreatorFunc c, bool isReporter) {\n        if(isReporter)\n            getReporters().insert(reporterMap::value_type(reporterMap::key_type(priority, name), c));\n        else\n            getListeners().insert(reporterMap::value_type(reporterMap::key_type(priority, name), c));\n    }\n} // namespace detail\n\n} // namespace doctest\n\n#endif // DOCTEST_CONFIG_DISABLE\n\n#ifdef DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN\nDOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4007) // 'function' : must be 'attribute' - see issue #182\nint main(int argc, char** argv) { return doctest::Context(argc, argv).run(); }\nDOCTEST_MSVC_SUPPRESS_WARNING_POP\n#endif // DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN\n\nDOCTEST_CLANG_SUPPRESS_WARNING_POP\nDOCTEST_MSVC_SUPPRESS_WARNING_POP\nDOCTEST_GCC_SUPPRESS_WARNING_POP\n\nDOCTEST_SUPPRESS_COMMON_WARNINGS_POP\n\n#endif // DOCTEST_LIBRARY_IMPLEMENTATION\n#endif // DOCTEST_CONFIG_IMPLEMENT\n\n#ifdef DOCTEST_UNDEF_WIN32_LEAN_AND_MEAN\n#undef WIN32_LEAN_AND_MEAN\n#undef DOCTEST_UNDEF_WIN32_LEAN_AND_MEAN\n#endif // DOCTEST_UNDEF_WIN32_LEAN_AND_MEAN\n\n#ifdef DOCTEST_UNDEF_NOMINMAX\n#undef NOMINMAX\n#undef DOCTEST_UNDEF_NOMINMAX\n#endif // DOCTEST_UNDEF_NOMINMAX\n"
  },
  {
    "path": "third-party/tbb/test/common/dummy_body.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_dummy_body_H\n#define __TBB_test_common_dummy_body_H\n\n#include \"config.h\"\n#include <cstddef>\n\nnamespace utils {\nstatic void doDummyWork(std::size_t N) {\n    for (volatile std::size_t i = 0; i < N; ) { i = i + 1; }\n}\n\n//! Functor with N dummy iterations in it`s body\nclass DummyBody {\n    int m_numIters;\npublic:\n    explicit DummyBody( int iters = 0 ) : m_numIters( iters ) {}\n    void operator()( int ) const {\n        doDummyWork(m_numIters);\n    }\n    void operator()() const {\n        doDummyWork(m_numIters);\n    }\n};\n\n} // namespace utils\n\n#endif // __TBB_test_common_dummy_body_H\n"
  },
  {
    "path": "third-party/tbb/test/common/exception_handling.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_exception_handling_H\n#define __TBB_test_common_exception_handling_H\n\n#include \"config.h\"\n\n#include <typeinfo>\n#include <thread>\n\n#include \"oneapi/tbb/task_scheduler_observer.h\"\n\n#include \"concurrency_tracker.h\"\n\nint g_NumThreads = 0;\nstd::thread::id g_Master = std::this_thread::get_id();\nconst char * g_Orig_Wakeup_Msg = \"Missed wakeup or machine is overloaded?\";\nconst char * g_Wakeup_Msg = g_Orig_Wakeup_Msg;\n\nstd::atomic<intptr_t> g_CurExecuted,\n                      g_ExecutedAtLastCatch,\n                      g_ExecutedAtFirstCatch,\n                      g_ExceptionsThrown,\n                      g_MasterExecutedThrow,     // number of times external thread entered exception code\n                      g_NonMasterExecutedThrow,  // number of times non-external thread entered exception code\n                      g_PipelinesStarted;\nstd::atomic<bool>   g_ExceptionCaught{ false },\n                    g_UnknownException{ false };\n\nstd::atomic<intptr_t> g_ActualMaxThreads;\nstd::atomic<intptr_t> g_ActualCurrentThreads;\n\nstd::atomic<bool>   g_ThrowException{ true },\n                    // g_Flog is true for nested construct tests with catches (exceptions are not allowed to\n                    // propagate to the construct itself.)\n                    g_Flog{ false },\n                    g_MasterExecuted{ false },\n                    g_NonMasterExecuted{ false };\n\nbool    g_ExceptionInMaster = false;\nbool    g_SolitaryException = false;\nbool    g_NestedPipelines   = false;\n\n//! Number of exceptions propagated into the user code (i.e. intercepted by the tests)\nstd::atomic<intptr_t> g_NumExceptionsCaught;\n\n//-----------------------------------------------------------\n\nclass eh_test_observer : public tbb::task_scheduler_observer {\npublic:\n    void on_scheduler_entry(bool is_worker) override {\n        if(is_worker) {  // we've already counted the external thread\n            intptr_t p = ++g_ActualCurrentThreads;\n            intptr_t q = g_ActualMaxThreads;\n            while(q < p) {\n                g_ActualMaxThreads.compare_exchange_strong(q, p);\n            }\n        }\n    }\n    void on_scheduler_exit(bool is_worker) override {\n        if(is_worker) {\n            --g_ActualCurrentThreads;\n        }\n    }\n};\n//-----------------------------------------------------------\n\ninline void ResetEhGlobals ( bool throwException = true, bool flog = false ) {\n    utils::ConcurrencyTracker::Reset();\n    g_CurExecuted = g_ExecutedAtLastCatch = g_ExecutedAtFirstCatch = 0;\n    g_ExceptionCaught = false;\n    g_UnknownException = false;\n    g_NestedPipelines = false;\n    g_ThrowException = throwException;\n    g_MasterExecutedThrow = 0;\n    g_NonMasterExecutedThrow = 0;\n    g_Flog = flog;\n    g_MasterExecuted = false;\n    g_NonMasterExecuted = false;\n    g_ActualMaxThreads = 1;  // count external thread\n    g_ActualCurrentThreads = 1;  // count external thread\n    g_ExceptionsThrown = g_NumExceptionsCaught = g_PipelinesStarted = 0;\n}\n\n#if TBB_USE_EXCEPTIONS\nclass test_exception : public std::exception {\n    const char* my_description;\npublic:\n    test_exception ( const char* description ) : my_description(description) {}\n\n    const char* what() const noexcept override { return my_description; }\n};\n\nclass solitary_test_exception : public test_exception {\npublic:\n    solitary_test_exception ( const char* description ) : test_exception(description) {}\n};\n\nusing PropagatedException = test_exception;\n#define EXCEPTION_NAME(e) typeid(e).name()\n\n#define EXCEPTION_DESCR \"Test exception\"\n\n#if UTILS_EXCEPTION_HANDLING_SIMPLE_MODE\n\ninline void ThrowTestException () {\n    ++g_ExceptionsThrown;\n    throw test_exception(EXCEPTION_DESCR);\n}\n\n#else /* !UTILS_EXCEPTION_HANDLING_SIMPLE_MODE */\n\nconstexpr std::intptr_t Existed = INT_MAX;\n\ninline void ThrowTestException ( intptr_t threshold ) {\n    bool inMaster = (std::this_thread::get_id() == g_Master);\n    if ( !g_ThrowException ||   // if we're not supposed to throw\n            (!g_Flog &&         // if we're not catching throw in bodies and\n             (g_ExceptionInMaster ^ inMaster)) ) { // we're the external thread and not expected to throw\n              // or are the external thread not the one to throw (??)\n        return;\n    }\n    while ( Existed < threshold )\n        utils::yield();\n    if ( !g_SolitaryException ) {\n        ++g_ExceptionsThrown;\n        if(inMaster) ++g_MasterExecutedThrow; else ++g_NonMasterExecutedThrow;\n        throw test_exception(EXCEPTION_DESCR);\n    }\n    // g_SolitaryException == true\n    if(g_NestedPipelines) {\n        // only throw exception if we have started at least two inner pipelines\n        // else return\n        if(g_PipelinesStarted >= 3) {\n            intptr_t expected = 0;\n            if ( g_ExceptionsThrown.compare_exchange_strong(expected, 1) )  {\n                if(inMaster) ++g_MasterExecutedThrow; else ++g_NonMasterExecutedThrow;\n                throw solitary_test_exception(EXCEPTION_DESCR);\n            }\n        }\n    }\n    else {\n        intptr_t expected = 0;\n        if ( g_ExceptionsThrown.compare_exchange_strong(expected, 1) )  {\n            if(inMaster) ++g_MasterExecutedThrow; else ++g_NonMasterExecutedThrow;\n            throw solitary_test_exception(EXCEPTION_DESCR);\n        }\n    }\n}\n#endif /* !HARNESS_EH_SIMPLE_MODE */\n\n#define UPDATE_COUNTS()     \\\n    { \\\n        ++g_CurExecuted; \\\n        if(g_Master == std::this_thread::get_id()) g_MasterExecuted = true; \\\n        else g_NonMasterExecuted = true; \\\n        if( tbb::is_current_task_group_canceling() ) ++g_TGCCancelled; \\\n    }\n\n#define CATCH()     \\\n    } catch ( PropagatedException& e ) { \\\n        intptr_t expected = 0;\\\n        g_ExecutedAtFirstCatch.compare_exchange_strong(expected , g_CurExecuted); \\\n        intptr_t curExecuted = g_CurExecuted.load(); \\\n        expected = g_ExecutedAtLastCatch.load();\\\n        while (expected < curExecuted) g_ExecutedAtLastCatch.compare_exchange_strong(expected, curExecuted); \\\n        REQUIRE_MESSAGE(e.what(), \"Empty what() string\" );  \\\n        REQUIRE_MESSAGE((strcmp(EXCEPTION_NAME(e), (g_SolitaryException ? typeid(solitary_test_exception) : typeid(test_exception)).name() ) == 0), \"Unexpected original exception name\"); \\\n        REQUIRE_MESSAGE((strcmp(e.what(), EXCEPTION_DESCR) == 0), \"Unexpected original exception info\"); \\\n        g_ExceptionCaught = l_ExceptionCaughtAtCurrentLevel = true; \\\n        ++g_NumExceptionsCaught; \\\n    } catch ( std::exception& ) { \\\n        REQUIRE_MESSAGE (false, \"Unexpected std::exception\" ); \\\n    } catch ( ... ) { \\\n        g_ExceptionCaught = l_ExceptionCaughtAtCurrentLevel = true; \\\n        g_UnknownException = unknownException = true; \\\n    } \\\n    if ( !g_SolitaryException ) \\\n        WARN_MESSAGE (true, \"Multiple exceptions mode\");\n\n#define ASSERT_EXCEPTION() \\\n    { \\\n        REQUIRE_MESSAGE ((!g_ExceptionsThrown || g_ExceptionCaught), \"throw without catch\"); \\\n        REQUIRE_MESSAGE ((!g_ExceptionCaught  || g_ExceptionsThrown), \"catch without throw\"); \\\n        REQUIRE_MESSAGE ((g_ExceptionCaught || (g_ExceptionInMaster && !g_MasterExecutedThrow) || (!g_ExceptionInMaster && !g_NonMasterExecutedThrow)), \"no exception occurred\"); \\\n        REQUIRE_MESSAGE (!g_UnknownException, \"unknown exception was caught\"); \\\n    }\n\n#define CATCH_AND_ASSERT() \\\n    CATCH() \\\n    ASSERT_EXCEPTION()\n\n#else /* !TBB_USE_EXCEPTIONS */\n\ninline void ThrowTestException ( intptr_t ) {}\n\n#endif /* !TBB_USE_EXCEPTIONS */\n\n#if TBB_USE_EXCEPTIONS\n#define TRY()   \\\n    bool l_ExceptionCaughtAtCurrentLevel = false, unknownException = false;    \\\n    try {\n\n// \"l_ExceptionCaughtAtCurrentLevel || unknownException\" is used only to \"touch\" otherwise unused local variables\n#define CATCH_AND_FAIL() } catch(...) { \\\n        REQUIRE_MESSAGE (false, \"Cancelling tasks must not cause any exceptions\");    \\\n        (void)(l_ExceptionCaughtAtCurrentLevel && unknownException);                        \\\n    }\n#else\n#define TRY() {\n#define CATCH_AND_FAIL() }\n#endif\n\nconst int c_Timeout = 1000000;\n\n#include \"oneapi/tbb/task_arena.h\"\n\nvoid WaitUntilConcurrencyPeaks ( int expected_peak ) {\n    tbb::task_group tg;\n    if ( g_Flog )\n        return;\n    int n = 0;\nretry:\n    while ( ++n < c_Timeout && (int)utils::ConcurrencyTracker::PeakParallelism() < expected_peak )\n        utils::yield();\n#if USE_TASK_SCHEDULER_OBSERVER\n    DOCTEST_WARN_MESSAGE( g_NumThreads == g_ActualMaxThreads, \"Library did not provide sufficient threads\");\n#endif\n    DOCTEST_WARN_MESSAGE(n < c_Timeout, g_Wakeup_Msg);\n    // Workaround in case a missed wakeup takes place\n    if ( n == c_Timeout ) {\n        tg.run([]{});\n        n = 0;\n        goto retry;\n    }\n\n    TRY();\n        tg.wait();\n    CATCH_AND_FAIL();\n}\n\ninline void WaitUntilConcurrencyPeaks () { WaitUntilConcurrencyPeaks(g_NumThreads); }\n\ninline bool IsMaster() {\n    return std::this_thread::get_id() == g_Master;\n}\n\ninline bool IsThrowingThread() {\n    return g_ExceptionInMaster ^ IsMaster() ? true : false;\n}\n\nstruct Cancellator {\n    static std::atomic<bool> s_Ready;\n    tbb::task_group_context &m_groupToCancel;\n    intptr_t m_cancellationThreshold;\n\n    void operator()() const {\n        utils::ConcurrencyTracker ct;\n        s_Ready = true;\n        while ( g_CurExecuted < m_cancellationThreshold )\n            utils::yield();\n        m_groupToCancel.cancel_group_execution();\n        g_ExecutedAtLastCatch = g_CurExecuted.load();\n    }\n\n    Cancellator( tbb::task_group_context& ctx, intptr_t threshold )\n        : m_groupToCancel(ctx), m_cancellationThreshold(threshold)\n    {\n        s_Ready = false;\n    }\n\n    static void Reset () { s_Ready = false; }\n\n    static bool WaitUntilReady () {\n        const intptr_t limit = 10000000;\n        intptr_t n = 0;\n        do {\n            utils::yield();\n        } while( !s_Ready && ++n < limit );\n        // should yield once, then continue if Cancellator is ready.\n        REQUIRE( (s_Ready || n == limit) );\n        return s_Ready;\n    }\n};\n\nstd::atomic<bool> Cancellator::s_Ready{ false };\n\ntemplate<class LauncherT, class CancellatorT>\nvoid RunCancellationTest ( intptr_t threshold = 1 )\n{\n    tbb::task_group_context  ctx;\n    tbb::task_group tg;\n\n    CancellatorT cancellator(ctx, threshold);\n    LauncherT launcher(ctx);\n\n    tg.run(launcher);\n    tg.run(cancellator);\n\n    TRY();\n        tg.wait();\n    CATCH_AND_FAIL();\n}\n\n#endif // __TBB_test_common_exception_handling_H\n"
  },
  {
    "path": "third-party/tbb/test/common/fp_control.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_fp_control_H_\n#define __TBB_test_common_fp_control_H_\n\n#include \"common/test.h\"\n#include \"oneapi/tbb/detail/_machine.h\"\n\n#if ( __TBB_x86_32 || __TBB_x86_64 )\n\nconst int \n#if _WIN32 || _WIN64\n            FE_TONEAREST = _RC_NEAR,\n            FE_DOWNWARD = _RC_DOWN,\n            FE_UPWARD = _RC_UP,\n            FE_TOWARDZERO = _RC_CHOP,\n            SSE_SHIFT = 5,\n#else\n            FE_TONEAREST = 0x0000,\n            FE_DOWNWARD = 0x0400,\n            FE_UPWARD = 0x0800,\n            FE_TOWARDZERO = 0x0c00,\n            SSE_SHIFT = 3,\n#endif\n            FE_RND_MODE_MASK = FE_TOWARDZERO,\n            SSE_RND_MODE_MASK = FE_RND_MODE_MASK << SSE_SHIFT,\n            SSE_DAZ = 0x0040,\n            SSE_FTZ = 0x8000,\n            SSE_MODE_MASK = SSE_DAZ | SSE_FTZ,\n            SSE_STATUS_MASK = 0x3F;\n\nconst int NumSseModes = 4;\nconst int SseModes[NumSseModes] = { 0, SSE_DAZ, SSE_FTZ, SSE_DAZ | SSE_FTZ };\n\ninline int GetRoundingMode ( bool checkConsistency = true ) {\n    tbb::detail::d1::cpu_ctl_env ctl;\n    ctl.get_env();\n    if (checkConsistency) {\n        auto sse_rnd_mode = (ctl.mxcsr & SSE_RND_MODE_MASK) >> SSE_SHIFT;\n        auto x87_rnd_mode = (ctl.x87cw & FE_RND_MODE_MASK);\n        CHECK(sse_rnd_mode == x87_rnd_mode);\n    }\n    return ctl.x87cw & FE_RND_MODE_MASK;\n}\n\ninline void SetRoundingMode ( int mode ) {\n    tbb::detail::d1::cpu_ctl_env ctl;\n    ctl.get_env();\n    ctl.mxcsr = (ctl.mxcsr & ~SSE_RND_MODE_MASK) | (mode & FE_RND_MODE_MASK) << SSE_SHIFT;\n    ctl.x87cw = ((ctl.x87cw & ~FE_RND_MODE_MASK) | (mode & FE_RND_MODE_MASK));\n\n    if (true) {\n        auto sse_rnd_mode = (ctl.mxcsr & SSE_RND_MODE_MASK) >> SSE_SHIFT;\n        auto x87_rnd_mode = (ctl.x87cw & FE_RND_MODE_MASK);\n        CHECK(sse_rnd_mode == x87_rnd_mode);\n    }\n\n    ctl.set_env();\n}\n\ninline int GetSseMode () {\n    tbb::detail::d1::cpu_ctl_env ctl;\n    ctl.get_env();\n    return ctl.mxcsr & SSE_MODE_MASK;\n}\n\ninline void SetSseMode ( int mode ) {\n    tbb::detail::d1::cpu_ctl_env ctl;\n    ctl.get_env();\n    ctl.mxcsr = (ctl.mxcsr & ~SSE_MODE_MASK) | (mode & SSE_MODE_MASK);\n    ctl.set_env();\n}\n\n#elif defined(_M_ARM)\nconst int NumSseModes = 1;\nconst int SseModes[NumSseModes] = { 0 };\n\ninline int GetSseMode () { return 0; }\ninline void SetSseMode ( int ) {}\n\nconst int FE_TONEAREST = _RC_NEAR,\n          FE_DOWNWARD = _RC_DOWN,\n          FE_UPWARD = _RC_UP,\n          FE_TOWARDZERO = _RC_CHOP;\n\ninline int GetRoundingMode ( bool = true ) {\n    tbb::detail::d1::cpu_ctl_env ctl;\n    ctl.get_env();\n    return ctl.my_ctl;\n}\ninline void SetRoundingMode ( int mode ) {\n    tbb::detail::d1::cpu_ctl_env ctl;\n    ctl.my_ctl = mode;\n    ctl.set_env();\n}\n\n#else /* Other archs */\n\n#include <fenv.h>\n\nconst int RND_MODE_MASK = FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO;\n\nconst int NumSseModes = 1;\nconst int SseModes[NumSseModes] = { 0 };\n\ninline int GetRoundingMode ( bool = true ) { return fegetround(); }\ninline void SetRoundingMode ( int rnd ) { fesetround(rnd); }\n\ninline int GetSseMode () { return 0; }\ninline void SetSseMode ( int ) {}\n\n#endif /* Other archs */\n\nconst int NumRoundingModes = 4;\nconst int RoundingModes[NumRoundingModes] = { FE_TONEAREST, FE_DOWNWARD, FE_UPWARD, FE_TOWARDZERO };\nconst int numFPModes = NumRoundingModes*NumSseModes;\n\ninline void SetFPMode( int mode ) {\n    SetRoundingMode( RoundingModes[mode/NumSseModes%NumRoundingModes] );\n    SetSseMode( SseModes[mode%NumSseModes] );\n}\n\n#define AssertFPMode( mode ) { \\\n    CHECK_MESSAGE( GetRoundingMode() == RoundingModes[mode/NumSseModes%NumRoundingModes], \"FPU control state has not been set correctly.\" ); \\\n    CHECK_MESSAGE( GetSseMode() == SseModes[mode%NumSseModes], \"SSE control state has not been set correctly.\" ); \\\n}\n\ninline int SetNextFPMode( int mode, int step = 1 ) {\n    const int nextMode = (mode+step)%numFPModes;\n    SetFPMode( nextMode );\n    return nextMode;\n}\n\nclass FPModeContext {\n    int origSse, origRounding;\n    int currentMode;\npublic:\n    FPModeContext(int newMode) {\n        origSse = GetSseMode();\n        origRounding = GetRoundingMode();\n        SetFPMode(currentMode = newMode);\n    }\n    ~FPModeContext() {\n        assertFPMode();\n        SetRoundingMode(origRounding);\n        SetSseMode(origSse);\n    }\n    int setNextFPMode() {\n        assertFPMode();\n        return currentMode = SetNextFPMode(currentMode);\n    }\n    void assertFPMode() {\n        AssertFPMode(currentMode);\n    }\n};\n#endif // __TBB_test_common_memory_usagae_H_\n"
  },
  {
    "path": "third-party/tbb/test/common/graph_utils.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/** @file harness_graph.cpp\n    This contains common helper classes and functions for testing graph nodes\n**/\n\n#ifndef __TBB_harness_graph_H\n#define __TBB_harness_graph_H\n\n#include \"config.h\"\n\n#include \"oneapi/tbb/flow_graph.h\"\n#include \"oneapi/tbb/task.h\"\n#include \"oneapi/tbb/null_rw_mutex.h\"\n#include \"oneapi/tbb/concurrent_unordered_set.h\"\n\n#include <atomic>\n#include <thread>\n#include <mutex>\n#include <condition_variable>\n\n#include \"common/spin_barrier.h\"\n\nusing tbb::detail::d2::SUCCESSFULLY_ENQUEUED;\n\n// Needed conversion to and from continue_msg, but didn't want to add\n// conversion operators to the class, since we don't want it in general,\n// only in these tests.\ntemplate<typename InputType, typename OutputType>\nstruct converter {\n    static OutputType convert_value(const InputType &i) {\n        return OutputType(i);\n    }\n};\n\ntemplate<typename InputType>\nstruct converter<InputType,tbb::flow::continue_msg> {\n    static tbb::flow::continue_msg convert_value(const InputType &/*i*/) {\n        return tbb::flow::continue_msg();\n    }\n};\n\ntemplate<typename OutputType>\nstruct converter<tbb::flow::continue_msg,OutputType> {\n    static OutputType convert_value(const tbb::flow::continue_msg &/*i*/) {\n        return OutputType();\n    }\n};\n\n// helper for multifunction_node tests.\ntemplate<size_t N>\nstruct mof_helper {\n    template<typename InputType, typename ports_type>\n    static inline void output_converted_value(const InputType &i, ports_type &p) {\n        (void)std::get<N-1>(p).try_put(converter<InputType,typename std::tuple_element<N-1,ports_type>::type::output_type>::convert_value(i));\n        output_converted_value<N-1>(i, p);\n    }\n};\n\ntemplate<>\nstruct mof_helper<1> {\n    template<typename InputType, typename ports_type>\n    static inline void output_converted_value(const InputType &i, ports_type &p) {\n        // just emit a default-constructed object\n        (void)std::get<0>(p).try_put(converter<InputType,typename std::tuple_element<0,ports_type>::type::output_type>::convert_value(i));\n    }\n};\n\ntemplate< typename InputType, typename OutputType >\nstruct harness_graph_default_functor {\n    static OutputType construct( InputType v ) {\n        return OutputType(v);\n    }\n};\n\ntemplate< typename OutputType >\nstruct harness_graph_default_functor< tbb::flow::continue_msg, OutputType > {\n    static OutputType construct( tbb::flow::continue_msg ) {\n        return OutputType();\n    }\n};\n\ntemplate< typename InputType >\nstruct harness_graph_default_functor< InputType, tbb::flow::continue_msg > {\n    static tbb::flow::continue_msg construct( InputType ) {\n        return tbb::flow::continue_msg();\n    }\n};\n\ntemplate< >\nstruct harness_graph_default_functor< tbb::flow::continue_msg, tbb::flow::continue_msg > {\n    static tbb::flow::continue_msg construct( tbb::flow::continue_msg ) {\n        return tbb::flow::continue_msg();\n    }\n};\n\ntemplate<typename InputType, typename OutputSet>\nstruct harness_graph_default_multifunction_functor {\n    static const int N = std::tuple_size<OutputSet>::value;\n    typedef typename tbb::flow::multifunction_node<InputType,OutputSet>::output_ports_type ports_type;\n    static void construct(const InputType &i, ports_type &p) {\n        mof_helper<N>::output_converted_value(i, p);\n    }\n};\n\n//! An executor that accepts InputType and generates OutputType\ntemplate< typename InputType, typename OutputType >\nstruct harness_graph_executor {\n\n    typedef OutputType (*function_ptr_type)( InputType v );\n\n    template<typename RW>\n    struct mutex_holder { static RW mutex; };\n\n    static function_ptr_type fptr;\n    static std::atomic<size_t> execute_count;\n    static std::atomic<size_t> current_executors;\n    static size_t max_executors;\n\n    static inline OutputType func( InputType v ) {\n        size_t c; // Declaration separate from initialization to avoid ICC internal error on IA-64 architecture\n        c = current_executors++;\n        if (max_executors != 0) {\n            CHECK(c <= max_executors);\n        }\n        ++execute_count;\n        OutputType v2 = (*fptr)(v);\n        --current_executors;\n        return v2;\n    }\n\n    template< typename RW >\n    static inline OutputType tfunc( InputType v ) {\n        // Invocations allowed to be concurrent, the lock is acquired in shared (\"read\") mode.\n        // A test can take it exclusively, thus creating a barrier for invocations.\n        typename RW::scoped_lock l( mutex_holder<RW>::mutex, /*write=*/false );\n        return func(v);\n    }\n\n    template< typename RW >\n    struct tfunctor {\n        std::atomic<size_t> my_execute_count;\n        tfunctor() { my_execute_count = 0; }\n        tfunctor( const tfunctor &f ) { my_execute_count = static_cast<size_t>(f.my_execute_count); }\n        OutputType operator()( InputType i ) {\n           typename RW::scoped_lock l( harness_graph_executor::mutex_holder<RW>::mutex, /*write=*/false );\n           ++my_execute_count;\n           return harness_graph_executor::func(i);\n        }\n    };\n    typedef tfunctor<tbb::null_rw_mutex> functor;\n\n};\n\n//! A multifunction executor that accepts InputType and has only one Output of OutputType.\ntemplate< typename InputType, typename OutputTuple >\nstruct harness_graph_multifunction_executor {\n    typedef typename tbb::flow::multifunction_node<InputType,OutputTuple>::output_ports_type ports_type;\n    typedef typename std::tuple_element<0,OutputTuple>::type OutputType;\n\n    typedef void (*mfunction_ptr_type)( const InputType& v, ports_type &p );\n\n    template<typename RW>\n    struct mutex_holder { static RW mutex; };\n\n    static mfunction_ptr_type fptr;\n    static std::atomic<size_t> execute_count;\n    static std::atomic<size_t> current_executors;\n    static size_t max_executors;\n\n    static inline void empty_func( const InputType&, ports_type& ) {\n    }\n\n    static inline void func( const InputType &v, ports_type &p ) {\n        size_t c; // Declaration separate from initialization to avoid ICC internal error on IA-64 architecture\n        c = current_executors++;\n        CHECK( (max_executors == 0 || c <= max_executors) );\n        CHECK( (std::tuple_size<OutputTuple>::value == 1) );\n        ++execute_count;\n        (*fptr)(v,p);\n        --current_executors;\n    }\n\n    template< typename RW >\n    static inline void tfunc( const InputType& v, ports_type &p ) {\n        // Shared lock in invocations, exclusive in a test; see a comment in harness_graph_executor.\n        typename RW::scoped_lock l( mutex_holder<RW>::mutex, /*write=*/false );\n        func(v,p);\n    }\n\n    template< typename RW >\n    struct tfunctor {\n        std::atomic<size_t> my_execute_count;\n        tfunctor() { my_execute_count = 0; }\n        tfunctor( const tfunctor &f ) { my_execute_count = static_cast<size_t>(f.my_execute_count); }\n        void operator()( const InputType &i, ports_type &p ) {\n           typename RW::scoped_lock l( harness_graph_multifunction_executor::mutex_holder<RW>::mutex, /*write=*/false );\n           ++my_execute_count;\n           harness_graph_multifunction_executor::func(i,p);\n        }\n    };\n    typedef tfunctor<tbb::null_rw_mutex> functor;\n\n};\n\n// static vars for function_node tests\ntemplate< typename InputType, typename OutputType >\ntemplate< typename RW >\nRW harness_graph_executor<InputType, OutputType>::mutex_holder<RW>::mutex;\n\ntemplate< typename InputType, typename OutputType >\nstd::atomic<size_t> harness_graph_executor<InputType, OutputType>::execute_count;\n\ntemplate< typename InputType, typename OutputType >\ntypename harness_graph_executor<InputType, OutputType>::function_ptr_type harness_graph_executor<InputType, OutputType>::fptr\n    = harness_graph_default_functor< InputType, OutputType >::construct;\n\ntemplate< typename InputType, typename OutputType >\nstd::atomic<size_t> harness_graph_executor<InputType, OutputType>::current_executors;\n\ntemplate< typename InputType, typename OutputType >\nsize_t harness_graph_executor<InputType, OutputType>::max_executors = 0;\n\n// static vars for multifunction_node tests\ntemplate< typename InputType, typename OutputTuple >\ntemplate< typename RW >\nRW harness_graph_multifunction_executor<InputType, OutputTuple>::mutex_holder<RW>::mutex;\n\ntemplate< typename InputType, typename OutputTuple >\nstd::atomic<size_t> harness_graph_multifunction_executor<InputType, OutputTuple>::execute_count;\n\ntemplate< typename InputType, typename OutputTuple >\ntypename harness_graph_multifunction_executor<InputType, OutputTuple>::mfunction_ptr_type harness_graph_multifunction_executor<InputType, OutputTuple>::fptr\n    = harness_graph_default_multifunction_functor< InputType, OutputTuple >::construct;\n\ntemplate< typename InputType, typename OutputTuple >\nstd::atomic<size_t> harness_graph_multifunction_executor<InputType, OutputTuple>::current_executors;\n\ntemplate< typename InputType, typename OutputTuple >\nsize_t harness_graph_multifunction_executor<InputType, OutputTuple>::max_executors = 0;\n\n//! Counts the number of puts received\ntemplate< typename T >\nstruct harness_counting_receiver : public tbb::flow::receiver<T> {\n    harness_counting_receiver& operator=(const harness_counting_receiver&) = delete;\n\n    std::atomic< size_t > my_count;\n    T max_value;\n    size_t num_copies;\n    tbb::flow::graph& my_graph;\n\n    harness_counting_receiver(tbb::flow::graph& g) : num_copies(1), my_graph(g) {\n       my_count = 0;\n    }\n\n    void initialize_map( const T& m, size_t c ) {\n       my_count = 0;\n       max_value = m;\n       num_copies = c;\n    }\n\n    tbb::flow::graph& graph_reference() const override {\n        return my_graph;\n    }\n\n    tbb::detail::d2::graph_task *try_put_task( const T & ) override {\n      ++my_count;\n      return const_cast<tbb::detail::d2::graph_task*>(SUCCESSFULLY_ENQUEUED);\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    tbb::detail::d2::graph_task *try_put_task( const T &t, const tbb::detail::d2::message_metainfo& ) override {\n      return try_put_task(t);\n    }\n#endif\n\n    void validate() {\n        size_t n = my_count;\n        CHECK( n == num_copies*max_value );\n    }\n };\n\n//! Counts the number of puts received\ntemplate< typename T >\nstruct harness_mapped_receiver : public tbb::flow::receiver<T> {\n    harness_mapped_receiver(const harness_mapped_receiver&) = delete;\n    harness_mapped_receiver& operator=(const harness_mapped_receiver&) = delete;\n\n    std::atomic< size_t > my_count;\n    T max_value;\n    size_t num_copies;\n    typedef tbb::concurrent_unordered_multiset<T> multiset_type;\n    multiset_type *my_multiset;\n    tbb::flow::graph& my_graph;\n\n    harness_mapped_receiver(tbb::flow::graph& g) : my_multiset(nullptr), my_graph(g) {\n       my_count = 0;\n    }\n\n#if __INTEL_COMPILER <= 2021\n    // Suppress superfluous diagnostic about virtual keyword absence in a destructor of an inherited\n    // class while the parent class has the virtual keyword for the destrocutor.\n    virtual\n#endif\n    ~harness_mapped_receiver() {\n        delete my_multiset;\n        my_multiset = nullptr;\n    }\n\n    void initialize_map( const T& m, size_t c ) {\n       my_count = 0;\n       max_value = m;\n       num_copies = c;\n       delete my_multiset;\n       my_multiset = new multiset_type;\n    }\n\n    tbb::detail::d2::graph_task* try_put_task( const T &t ) override {\n      if ( my_multiset ) {\n          (*my_multiset).emplace( t );\n      } else {\n          ++my_count;\n      }\n      return const_cast<tbb::detail::d2::graph_task*>(SUCCESSFULLY_ENQUEUED);\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    tbb::detail::d2::graph_task *try_put_task( const T &t, const tbb::detail::d2::message_metainfo& ) override {\n      return try_put_task(t);\n    }\n#endif\n\n    tbb::flow::graph& graph_reference() const override {\n        return my_graph;\n    }\n\n    void validate() {\n        if ( my_multiset ) {\n            for ( size_t i = 0; i < (size_t)max_value; ++i ) {\n                auto it = (*my_multiset).find((int)i);\n                CHECK_MESSAGE( it != my_multiset->end(), \"Expected element in the map.\" );\n                size_t n = (*my_multiset).count(int(i));\n                CHECK( n == num_copies );\n            }\n        } else {\n            size_t n = my_count;\n            CHECK( n == num_copies*max_value );\n        }\n    }\n\n    void reset_receiver(tbb::flow::reset_flags /*f*/) {\n        my_count = 0;\n        if(my_multiset) delete my_multiset;\n        my_multiset = new multiset_type;\n    }\n\n};\n\n//! Counts the number of puts received\ntemplate< typename T >\nstruct harness_counting_sender : public tbb::flow::sender<T> {\n    harness_counting_sender(const harness_counting_sender&) = delete;\n    harness_counting_sender& operator=(const harness_counting_sender&) = delete;\n\n    typedef typename tbb::flow::sender<T>::successor_type successor_type;\n    std::atomic< successor_type * > my_receiver;\n    std::atomic< size_t > my_count;\n    std::atomic< size_t > my_received;\n    size_t my_limit;\n\n    harness_counting_sender( ) : my_limit(~size_t(0)) {\n       my_receiver = nullptr;\n       my_count = 0;\n       my_received = 0;\n    }\n\n    harness_counting_sender( size_t limit ) : my_limit(limit) {\n       my_receiver = nullptr;\n       my_count = 0;\n       my_received = 0;\n    }\n\n    bool register_successor( successor_type &r ) override {\n        my_receiver = &r;\n        return true;\n    }\n\n    bool remove_successor( successor_type &r ) override {\n        successor_type *s = my_receiver.exchange( nullptr );\n        CHECK( s == &r );\n        return true;\n    }\n\n    bool try_get( T & v ) override {\n        size_t i = my_count++;\n        if ( i < my_limit ) {\n           v = T( i );\n           ++my_received;\n           return true;\n        } else {\n           return false;\n        }\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    bool try_get( T & v, tbb::detail::d2::message_metainfo& ) override {\n        return try_get(v);\n    }\n#endif\n\n    bool try_put_once() {\n        successor_type *s = my_receiver;\n        size_t i = my_count++;\n        if ( s->try_put( T(i) ) ) {\n            ++my_received;\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    void try_put_until_false() {\n        successor_type *s = my_receiver;\n        size_t i = my_count++;\n\n        while ( s->try_put( T(i) ) ) {\n            ++my_received;\n            i = my_count++;\n        }\n    }\n\n    void try_put_until_limit() {\n        successor_type *s = my_receiver;\n\n        for ( int i = 0; i < (int)my_limit; ++i ) {\n            CHECK( s->try_put( T(i) ) );\n            ++my_received;\n        }\n        CHECK( my_received == my_limit );\n    }\n\n};\n\ntemplate< typename InputType >\nstruct parallel_put_until_limit {\n    parallel_put_until_limit& operator=(const parallel_put_until_limit&) = delete;\n\n    typedef std::vector< std::shared_ptr<harness_counting_sender<InputType>> > senders_t;\n\n    senders_t& my_senders;\n\n    parallel_put_until_limit( senders_t& senders ) : my_senders(senders) {}\n\n    void operator()( int i ) const  { my_senders[i]->try_put_until_limit(); }\n};\n\n// test for resets of buffer-type nodes.\nstd::atomic<int> serial_fn_state0;\nstd::atomic<int> serial_fn_state1;\nstd::atomic<int> serial_continue_state0;\n\ntemplate<typename T>\nstruct serial_fn_body {\n    std::atomic<int>& my_flag;\n    serial_fn_body(std::atomic<int>& flag) : my_flag(flag) { }\n    T operator()(const T& in) {\n        if (my_flag == 0) {\n            my_flag = 1;\n\n            // wait until we are released\n            utils::SpinWaitWhileEq(my_flag, 1);\n        }\n        return in;\n    }\n};\n\ntemplate<typename T>\nstruct serial_continue_body {\n    std::atomic<int>& my_flag;\n    serial_continue_body(std::atomic<int> &flag) : my_flag(flag) {}\n    T operator()(const tbb::flow::continue_msg& /*in*/) {\n        // signal we have received a value\n        my_flag = 1;\n        // wait until we are released\n        utils::SpinWaitWhileEq(my_flag, 1);\n        return (T)1;\n    }\n};\n\ntemplate<typename T, typename BufferType>\nvoid test_resets() {\n    const int NN = 3;\n    bool nFound[NN];\n    tbb::task_arena arena{4};\n    arena.execute(\n        [&] {\n            tbb::task_group_context   tgc;\n            tbb::flow::graph          g(tgc);\n            BufferType                b0(g);\n            tbb::flow::queue_node<T>  q0(g);\n            T j{};\n\n            // reset empties buffer\n            for(T i = 0; i < NN; ++i) {\n                b0.try_put(i);\n                nFound[(int)i] = false;\n            }\n            g.wait_for_all();\n            g.reset();\n            CHECK_MESSAGE(!b0.try_get(j), \"reset did not empty buffer\");\n\n            // reset doesn't delete edge\n\n            tbb::flow::make_edge(b0,q0);\n            g.wait_for_all(); // TODO: invesigate why make_edge to buffer_node always creates a forwarding task\n            g.reset();\n            for(T i = 0; i < NN; ++i) {\n                b0.try_put(i);\n            }\n\n            g.wait_for_all();\n            for( T i = 0; i < NN; ++i) {\n                CHECK_MESSAGE(q0.try_get(j), \"Missing value from buffer\");\n                CHECK_MESSAGE(!nFound[(int)j], \"Duplicate value found\");\n                nFound[(int)j] = true;\n            }\n\n            for(int ii = 0; ii < NN; ++ii) {\n                CHECK_MESSAGE(nFound[ii], \"missing value\");\n            }\n            CHECK_MESSAGE(!q0.try_get(j), \"Extra values in output\");\n\n            // reset reverses a reversed edge.\n            // we will use a serial rejecting node to get the edge to reverse.\n            tbb::flow::function_node<T, T, tbb::flow::rejecting> sfn(g, tbb::flow::serial, serial_fn_body<T>(serial_fn_state0));\n            tbb::flow::queue_node<T> outq(g);\n            tbb::flow::remove_edge(b0,q0);\n            tbb::flow::make_edge(b0, sfn);\n            tbb::flow::make_edge(sfn,outq);\n            g.wait_for_all();  // wait for all the tasks started by building the graph are done.\n            serial_fn_state0 = 0;\n\n            // b0 ------> sfn ------> outq\n            for(int icnt = 0; icnt < 2; ++icnt) {\n                g.wait_for_all();\n                serial_fn_state0 = 0;\n                std::thread t([&] {\n                    b0.try_put((T)0);  // will start sfn\n                    g.wait_for_all();  // wait for all the tasks to complete.\n                });\n                // wait until function_node starts\n                utils::SpinWaitWhileEq(serial_fn_state0, 0);\n                // now the function_node is executing.\n                // this will start a task to forward the second item\n                // to the serial function node\n                b0.try_put((T)1);  // first item will be consumed by task completing the execution\n                b0.try_put((T)2);  // second item will remain after cancellation\n                // now wait for the task that attempts to forward the buffer item to\n                // complete.\n                // now cancel the graph.\n                CHECK_MESSAGE(tgc.cancel_group_execution(), \"task group already cancelled\");\n                serial_fn_state0 = 0;  // release the function_node.\n                t.join();\n                // check that at most one output reached the queue_node\n                T outt;\n                T outt2;\n                bool got_item1 = outq.try_get(outt);\n                bool got_item2 = outq.try_get(outt2);\n                // either the output queue was empty (if the function_node tested for cancellation before putting the\n                // result to the queue) or there was one element in the queue (the 0).\n                bool is_successful_operation = got_item1 && (int)outt == 0 && !got_item2;\n                CHECK_MESSAGE( is_successful_operation, \"incorrect output from function_node\");\n                // the edge between the buffer and the function_node should be reversed, and the last\n                // message we put in the buffer should still be there.  We can't directly test for the\n                // edge reversal.\n                got_item1 = b0.try_get(outt);\n                CHECK_MESSAGE(got_item1, \" buffer lost a message\");\n                is_successful_operation = (2 == (int)outt || 1 == (int)outt);\n                CHECK_MESSAGE(is_successful_operation, \" buffer had incorrect message\");  // the one not consumed by the node.\n                CHECK_MESSAGE(g.is_cancelled(), \"Graph was not cancelled\");\n                g.reset();\n            }  // icnt\n\n            // reset with remove_edge removes edge.  (icnt ==0 => forward edge, 1 => reversed edge\n            for(int icnt = 0; icnt < 2; ++icnt) {\n                if(icnt == 1) {\n                    // set up reversed edge\n                    tbb::flow::make_edge(b0, sfn);\n                    tbb::flow::make_edge(sfn,outq);\n                    serial_fn_state0 = 0;\n                    std::thread t([&] {\n                        b0.try_put((T)0);  // starts up the function node\n                        b0.try_put((T)1);  // should reverse the edge\n                        g.wait_for_all();  // wait for all the tasks to complete.\n                    });\n                    utils::SpinWaitWhileEq(serial_fn_state0, 0); // waiting for edge reversal\n                    CHECK_MESSAGE(tgc.cancel_group_execution(), \"task group already cancelled\");\n                    serial_fn_state0 = 0;  // release the function_node.\n                    t.join();\n                }\n                g.reset(tbb::flow::rf_clear_edges);\n                // test that no one is a successor to the buffer now.\n                serial_fn_state0 = 1;  // let the function_node go if it gets an input message\n                b0.try_put((T)23);\n                g.wait_for_all();\n                CHECK_MESSAGE((int)serial_fn_state0 == 1, \"function_node executed when it shouldn't\");\n                T outt;\n                bool is_successful_operation = b0.try_get(outt) && (T)23 == outt && !outq.try_get(outt);\n                CHECK_MESSAGE(is_successful_operation, \"node lost its input\");\n            }\n        }\n    );                          // arena.execute()\n}\n\ntemplate<typename NodeType>\nvoid test_input_ports_return_ref(NodeType& mip_node) {\n    typename NodeType::input_ports_type& input_ports1 = mip_node.input_ports();\n    typename NodeType::input_ports_type& input_ports2 = mip_node.input_ports();\n    CHECK_MESSAGE(&input_ports1 == &input_ports2, \"input_ports() should return reference\");\n}\n\ntemplate<typename NodeType>\nvoid test_output_ports_return_ref(NodeType& mop_node) {\n    typename NodeType::output_ports_type& output_ports1 = mop_node.output_ports();\n    typename NodeType::output_ports_type& output_ports2 = mop_node.output_ports();\n    CHECK_MESSAGE(&output_ports1 == &output_ports2, \"output_ports() should return reference\");\n}\n\ntemplate< template <typename> class ReservingNodeType, typename DataType, bool DoClear >\nclass harness_reserving_body {\n    harness_reserving_body& operator=(const harness_reserving_body&) = delete;\n    ReservingNodeType<DataType> &my_reserving_node;\n    tbb::flow::buffer_node<DataType> &my_buffer_node;\npublic:\n    harness_reserving_body(ReservingNodeType<DataType> &reserving_node, tbb::flow::buffer_node<DataType> &bn) : my_reserving_node(reserving_node), my_buffer_node(bn) {}\n    void operator()(DataType i) const {\n        my_reserving_node.try_put(i);\n#if _MSC_VER && !__INTEL_COMPILER\n#pragma warning (push)\n#pragma warning (disable: 4127)  /* suppress conditional expression is constant */\n#endif\n        if (DoClear) {\n#if _MSC_VER && !__INTEL_COMPILER\n#pragma warning (pop)\n#endif\n            my_reserving_node.clear();\n        }\n        my_buffer_node.try_put(i);\n        my_reserving_node.try_put(i);\n    }\n};\n\ntemplate< template <typename> class ReservingNodeType, typename DataType >\nvoid test_reserving_nodes() {\n#if TBB_TEST_LOW_WORKLOAD\n    const int N = 30;\n#else\n    const int N = 300;\n#endif\n\n    tbb::flow::graph g;\n\n    ReservingNodeType<DataType> reserving_n(g);\n\n    tbb::flow::buffer_node<DataType> buffering_n(g);\n    tbb::flow::join_node< std::tuple<DataType, DataType>, tbb::flow::reserving > join_n(g);\n    harness_counting_receiver< std::tuple<DataType, DataType> > end_receiver(g);\n\n    tbb::flow::make_edge(reserving_n, tbb::flow::input_port<0>(join_n));\n    tbb::flow::make_edge(buffering_n, tbb::flow::input_port<1>(join_n));\n    tbb::flow::make_edge(join_n, end_receiver);\n\n    utils::NativeParallelFor(N, harness_reserving_body<ReservingNodeType, DataType, false>(reserving_n, buffering_n));\n    g.wait_for_all();\n\n    CHECK(end_receiver.my_count == N);\n\n    // Should not hang\n    utils::NativeParallelFor(N, harness_reserving_body<ReservingNodeType, DataType, true>(reserving_n, buffering_n));\n    g.wait_for_all();\n\n    CHECK(end_receiver.my_count == 2 * N);\n}\n\nnamespace lightweight_testing {\n\ntypedef std::tuple<int, int> output_tuple_type;\n\ntemplate<typename NodeType>\nclass native_loop_body {\n    native_loop_body& operator=(const native_loop_body&) = delete;\n    NodeType& my_node;\npublic:\n    native_loop_body(NodeType& node) : my_node(node) {}\n\n    void operator()(int) const noexcept {\n        std::thread::id this_id = std::this_thread::get_id();\n        my_node.try_put(this_id);\n    }\n};\n\nstd::atomic<unsigned> g_body_count;\n\nclass concurrency_checker_body {\npublic:\n    concurrency_checker_body() { g_body_count = 0; }\n\n    template<typename gateway_type>\n    void operator()(const std::thread::id& input, gateway_type&) noexcept { increase_and_check(input); }\n\n    output_tuple_type operator()(const std::thread::id& input) noexcept {\n        increase_and_check(input);\n        return output_tuple_type();\n    }\n\nprivate:\n    void increase_and_check(const std::thread::id& input) {\n        ++g_body_count;\n        std::thread::id body_thread_id = std::this_thread::get_id();\n        CHECK_MESSAGE(input == body_thread_id, \"Body executed as not lightweight\");\n    }\n};\n\ntemplate<typename NodeType>\nvoid test_unlimited_lightweight_execution(unsigned N) {\n    tbb::flow::graph g;\n    NodeType node(g, tbb::flow::unlimited, concurrency_checker_body());\n\n    utils::NativeParallelFor(N, native_loop_body<NodeType>(node));\n    g.wait_for_all();\n\n    CHECK_MESSAGE(g_body_count == N, \"Body needs to be executed N times\");\n}\n\nstd::mutex m;\nstd::condition_variable lightweight_condition;\nstd::atomic<bool> work_submitted;\nstd::atomic<bool> lightweight_work_processed;\n\ntemplate<typename NodeType>\nclass native_loop_limited_body {\n    native_loop_limited_body& operator=(const native_loop_limited_body&) = delete;\n    NodeType& my_node;\n    utils::SpinBarrier& my_barrier;\npublic:\n    native_loop_limited_body(NodeType& node, utils::SpinBarrier& barrier):\n        my_node(node), my_barrier(barrier) {}\n    void operator()(int) const noexcept {\n        std::thread::id this_id = std::this_thread::get_id();\n        my_node.try_put(this_id);\n        if(!lightweight_work_processed) {\n            my_barrier.wait();\n            work_submitted = true;\n            lightweight_condition.notify_all();\n        }\n    }\n};\n\nstruct condition_predicate {\n    bool operator()() {\n        return work_submitted;\n    }\n};\n\nstd::atomic<unsigned> g_lightweight_count;\nstd::atomic<unsigned> g_task_count;\n\ntemplate <bool NoExcept>\nclass limited_lightweight_checker_body {\npublic:\n    limited_lightweight_checker_body() {\n        g_body_count = 0;\n        g_lightweight_count = 0;\n        g_task_count = 0;\n    }\nprivate:\n    void increase_and_check(const std::thread::id& /*input*/) {\n        ++g_body_count;\n\n        bool is_inside_task = oneapi::tbb::task::current_context() != nullptr;\n\n        if(is_inside_task) {\n            ++g_task_count;\n        } else {\n            std::unique_lock<std::mutex> lock(m);\n            lightweight_condition.wait(lock, condition_predicate());\n            ++g_lightweight_count;\n            lightweight_work_processed = true;\n        }\n    }\npublic:\n    template<typename gateway_type>\n    void operator()(const std::thread::id& input, gateway_type&) noexcept(NoExcept) {\n        increase_and_check(input);\n    }\n    output_tuple_type operator()(const std::thread::id& input) noexcept(NoExcept) {\n        increase_and_check(input);\n        return output_tuple_type();\n    }\n};\n\ntemplate<typename NodeType>\nvoid test_limited_lightweight_execution(unsigned N, unsigned concurrency) {\n    CHECK_MESSAGE(concurrency != tbb::flow::unlimited,\n                  \"Test for limited concurrency cannot be called with unlimited concurrency argument\");\n    tbb::flow::graph g;\n    NodeType node(g, concurrency, limited_lightweight_checker_body</*NoExcept*/true>());\n    // Execute first body as lightweight, then wait for all other threads to fill internal buffer.\n    // Then unblock the lightweight thread and check if other body executions are inside oneTBB task.\n    utils::SpinBarrier barrier(N - concurrency);\n    utils::NativeParallelFor(N, native_loop_limited_body<NodeType>(node, barrier));\n    g.wait_for_all();\n    CHECK_MESSAGE(g_body_count == N, \"Body needs to be executed N times\");\n    CHECK_MESSAGE(g_lightweight_count == concurrency, \"Body needs to be executed as lightweight once\");\n    CHECK_MESSAGE(g_task_count == N - concurrency, \"Body needs to be executed as not lightweight N - 1 times\");\n    work_submitted = false;\n    lightweight_work_processed = false;\n}\n\ntemplate<typename NodeType>\nvoid test_limited_lightweight_execution_with_throwing_body(unsigned N, unsigned concurrency) {\n    CHECK_MESSAGE(concurrency != tbb::flow::unlimited,\n                  \"Test for limited concurrency cannot be called with unlimited concurrency argument\");\n    tbb::flow::graph g;\n    NodeType node(g, concurrency, limited_lightweight_checker_body</*NoExcept*/false>());\n    // Body is no noexcept, in this case it must be executed as tasks, instead of lightweight execution\n    utils::SpinBarrier barrier(N);\n    utils::NativeParallelFor(N, native_loop_limited_body<NodeType>(node, barrier));\n    g.wait_for_all();\n    CHECK_MESSAGE(g_body_count == N, \"Body needs to be executed N times\");\n    CHECK_MESSAGE(g_lightweight_count == 0, \"Body needs to be executed with queueing policy\");\n    CHECK_MESSAGE(g_task_count == N, \"Body needs to be executed as task N times\");\n    work_submitted = false;\n    lightweight_work_processed = false;\n}\n\ntemplate <int Threshold>\nstruct throwing_body{\n    std::atomic<int>& my_counter;\n\n    throwing_body(std::atomic<int>& counter) : my_counter(counter) {}\n\n    template<typename input_type, typename gateway_type>\n    void operator()(const input_type&, gateway_type&) {\n        ++my_counter;\n        if(my_counter == Threshold)\n            throw Threshold;\n    }\n\n    template<typename input_type>\n    output_tuple_type operator()(const input_type&) {\n        ++my_counter;\n        if(my_counter == Threshold)\n            throw Threshold;\n        return output_tuple_type();\n    }\n};\n\n#if TBB_USE_EXCEPTIONS\n//! Test excesption thrown in node with lightweight policy was rethrown by graph\ntemplate<template<typename, typename, typename> class NodeType>\nvoid test_exception_ligthweight_policy(){\n    std::atomic<int> counter {0};\n    constexpr int threshold = 10;\n\n    using IndexerNodeType = oneapi::tbb::flow::indexer_node<int, int>;\n    using FuncNodeType = NodeType<IndexerNodeType::output_type, output_tuple_type, tbb::flow::lightweight>;\n    oneapi::tbb::flow::graph g;\n\n    IndexerNodeType indexer(g);\n    FuncNodeType tested_node(g, oneapi::tbb::flow::serial, throwing_body<threshold>(counter));\n    oneapi::tbb::flow::make_edge(indexer, tested_node);\n\n    utils::NativeParallelFor( threshold * 2, [&](int i){\n        if(i % 2)\n            std::get<1>(indexer.input_ports()).try_put(1);\n        else\n            std::get<0>(indexer.input_ports()).try_put(0);\n    });\n\n    bool catchException = false;\n    try\n    {\n        g.wait_for_all();\n    }\n    catch (const int& exc)\n    {\n        catchException = true;\n        CHECK_MESSAGE( exc == threshold, \"graph.wait_for_all() rethrow current exception\" );\n    }\n    CHECK_MESSAGE( catchException, \"The exception must be thrown from graph.wait_for_all()\" );\n    CHECK_MESSAGE( counter == threshold, \"Graph must cancel all tasks after exception\" );\n}\n#endif /* TBB_USE_EXCEPTIONS */\n\ntemplate<typename NodeType>\nvoid test_lightweight(unsigned N) {\n    test_unlimited_lightweight_execution<NodeType>(N);\n    test_limited_lightweight_execution<NodeType>(N, tbb::flow::serial);\n    test_limited_lightweight_execution<NodeType>(N, (std::min)(std::thread::hardware_concurrency() / 2, N/2));\n\n    test_limited_lightweight_execution_with_throwing_body<NodeType>(N, tbb::flow::serial);\n}\n\ntemplate<template<typename, typename, typename> class NodeType>\nvoid test(unsigned N) {\n    typedef std::thread::id input_type;\n    typedef NodeType<input_type, output_tuple_type, tbb::flow::queueing_lightweight> node_type;\n    test_lightweight<node_type>(N);\n\n#if TBB_USE_EXCEPTIONS\n    test_exception_ligthweight_policy<NodeType>();\n#endif /* TBB_USE_EXCEPTIONS */\n}\n\n} // namespace lightweight_testing\n\n#endif  // __TBB_harness_graph_H\n"
  },
  {
    "path": "third-party/tbb/test/common/initializer_list_support.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_initializer_list_support_H\n#define __TBB_test_common_initializer_list_support_H\n\n#include \"config.h\"\n\n#include <initializer_list>\n#include <vector>\n#include <type_traits>\n\nnamespace initializer_list_support_tests {\n\ntemplate <typename ContainerType, typename ElementType>\nvoid test_ctor( std::initializer_list<ElementType> init, const ContainerType& expected ) {\n    ContainerType cont(init);\n    REQUIRE_MESSAGE(cont == expected, \"Initialization via initializer_list failed\");\n}\n\ntemplate <typename ContainerType, typename ElementType>\nvoid test_assignment_operator( std::initializer_list<ElementType> init, const ContainerType& expected ) {\n    ContainerType cont;\n    static_assert(std::is_same< decltype(cont = init), ContainerType& >::value == true,\n        \"ContainerType::operator=(std::intializer_list) must return ContainerType&\");\n\n    cont = init;\n    REQUIRE_MESSAGE(cont == expected, \"Assignment from the initializer_list failed\");\n}\n\nstruct SkippedTest {\n    template <typename ContainerType, typename ElementType>\n    static void test( std::initializer_list<ElementType>, const ContainerType& ) {}\n}; // struct SkippedTest\n\nstruct TestAssignMethod {\n    template <typename ContainerType, typename ElementType>\n    static void test( std::initializer_list<ElementType> init, const ContainerType& expected) {\n        ContainerType cont;\n        cont.assign(init);\n        REQUIRE_MESSAGE(cont == expected, \"assign method with the initializer list argument failed\");\n    }\n}; // struct TestAssign\n\nstruct TestInsertMethod {\n    template <typename ContainerType, typename ElementType>\n    static void test( std::initializer_list<ElementType> init, const ContainerType& expected) {\n        ContainerType cont;\n        cont.insert(init);\n        REQUIRE_MESSAGE(cont == expected, \"insert method with the initializer list argument failed\");\n    }\n}; // struct TestInsertMethod\n\ntemplate <typename ContainerType, typename TestAssign, typename TestSpecial>\nvoid test_initializer_list_support( std::initializer_list<typename ContainerType::value_type> init ) {\n    using element_type = typename ContainerType::value_type;\n    std::vector<element_type> test_seq(init);\n    ContainerType expected(test_seq.begin(), test_seq.end());\n\n    test_ctor(init, expected);\n    test_assignment_operator(init, expected);\n    TestAssign::test(init, expected);\n    TestSpecial::test(init, expected);\n}\n\ntemplate <typename ContainerType, typename TestSpecial = SkippedTest>\nvoid test_initializer_list_support( std::initializer_list<typename ContainerType::value_type> init ) {\n    test_initializer_list_support<ContainerType, TestAssignMethod, TestSpecial>(init);\n}\n\ntemplate <typename ContainerType, typename TestSpecial = SkippedTest>\nvoid test_initializer_list_support_without_assign( std::initializer_list<typename ContainerType::value_type> init ) {\n    test_initializer_list_support<ContainerType, SkippedTest, TestSpecial>(init);\n}\n\n} // namespace initializer_list_support_tests\n\n#endif // __TBB_test_common_initializer_list_support_H\n"
  },
  {
    "path": "third-party/tbb/test/common/inject_scheduler.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_inject_scheduler_H\n#define __TBB_test_common_inject_scheduler_H\n\n#if __TBB_TEST_DEFINE_PRIVATE_PUBLIC\n// Include STL headers first to avoid errors\n#include <string>\n#include <algorithm>\n#define private public\n#define protected public\n#endif // __TBB_TEST_DEFINE_PRIVATE_PUBLIC\n\n// #define __TBB_NO_IMPLICIT_LINKAGE 1 // TODO: check if we need this macro in Malloc or TBB\n\n#define __TBB_BUILD 1\n\n#define __TBB_SOURCE_DIRECTLY_INCLUDED 1\n// TODO: uncomment scheduler source files and fix linkage errors\n// #include \"../../src/tbb/main.cpp\"\n#include \"../../src/tbb/dynamic_link.cpp\"\n// #include \"../../src/tbb/misc_ex.cpp\"\n\n// Tasking subsystem files\n// #include \"../../src/tbb/governor.cpp\"\n// #include \"../../src/tbb/market.cpp\"\n// #include \"../../src/tbb/arena.cpp\"\n// #include \"../../src/tbb/observer_proxy.cpp\"\n// #include \"../../src/tbb/task.cpp\"\n// #include \"../../src/tbb/task_group_context.cpp\"\n\n// Other dependencies\n// #include \"../../src/tbb/private_server.cpp\"\n#include \"../../src/tbb/concurrent_monitor.h\"\n#if _WIN32 || _WIN64\n#include \"../../src/tbb/semaphore.cpp\"\n#endif\n#include \"../../src/tbb/rml_tbb.cpp\"\n\n#if __TBB_TEST_DEFINE_PRIVATE_PUBLIC\n#undef protected\n#undef private\n#endif\n\n#endif // __TBB_test_common_inject_scheduler_H\n"
  },
  {
    "path": "third-party/tbb/test/common/iterator.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_iterator_H\n#define __TBB_test_common_iterator_H\n\n#include \"config.h\"\n\n#include <iterator>\n#include <memory>\n#include <atomic>\n#include \"utils_assert.h\"\n\nnamespace utils {\n\ntemplate <typename T>\nclass InputIterator {\n    typedef std::allocator<T> allocator_type;\n    typedef std::allocator_traits<allocator_type> allocator_traits_type;\npublic:\n    typedef std::input_iterator_tag iterator_category;\n    typedef T value_type;\n    typedef typename allocator_traits_type::difference_type difference_type;\n    typedef typename allocator_traits_type::pointer pointer;\n    typedef typename allocator_traits_type::value_type& reference;\n\n    InputIterator() : my_ptr(nullptr) {}\n    explicit InputIterator ( T * ptr ) : my_ptr(ptr), my_shared_epoch(new Epoch), my_current_epoch(0) {}\n\n    InputIterator( const InputIterator& it ) {\n        REQUIRE_MESSAGE(it.my_current_epoch == it.my_shared_epoch->epoch, \"Copying an invalidated iterator\");\n        my_ptr = it.my_ptr;\n        my_shared_epoch = it.my_shared_epoch;\n        my_current_epoch = it.my_current_epoch;\n        ++my_shared_epoch->refcounter;\n    }\n\n    InputIterator& operator= ( const InputIterator& it ) {\n        REQUIRE_MESSAGE(it.my_current_epoch == it.my_shared_epoch->epoch, \"Assigning an invalidated iterator\");\n        my_ptr = it.my_ptr;\n        my_current_epoch = it.my_current_epoch;\n        if(my_shared_epoch == it.my_shared_epoch)\n            return *this;\n        destroy();\n        my_shared_epoch = it.my_shared_epoch;\n        ++my_shared_epoch->refcounter;\n        return *this;\n    }\n\n    T& operator* () const {\n        REQUIRE_MESSAGE(my_shared_epoch->epoch == my_current_epoch, \"Dereferencing an invalidated input iterator\");\n        return *my_ptr;\n    }\n\n    InputIterator& operator++ () {\n        REQUIRE_MESSAGE(my_shared_epoch->epoch == my_current_epoch, \"Incrementing an invalidated input iterator\");\n        ++my_ptr;\n        ++my_current_epoch;\n        ++my_shared_epoch->epoch;\n        return *this;\n    }\n\n    InputIterator operator++( int ) {\n        InputIterator it = *this;\n        ++*this;\n        return it;\n    }\n\n    bool operator== ( const InputIterator& it ) const {\n        REQUIRE_MESSAGE(my_shared_epoch->epoch == my_current_epoch, \"Comparing an invalidated input iterator\");\n        REQUIRE_MESSAGE(it.my_shared_epoch->epoch == it.my_current_epoch, \"Comparing with an invalidated input iterator\");\n        return my_ptr == it.my_ptr;\n    }\n\n    ~InputIterator() {\n        destroy();\n    }\nprivate:\n    void destroy() {\n        if(0 == --my_shared_epoch->refcounter) {\n            delete my_shared_epoch;\n        }\n    }\n    struct Epoch {\n        typedef std::atomic<size_t> Counter;\n        Epoch() { epoch = 0; refcounter = 1; }\n        Counter epoch;\n        Counter refcounter;\n    };\n\n    T * my_ptr;\n    Epoch *my_shared_epoch;\n    size_t my_current_epoch;\n};\n\ntemplate <typename T>\nclass ForwardIterator {\n    T * my_ptr;\n    typedef std::allocator<T> allocator_type;\n    typedef std::allocator_traits<allocator_type> allocator_traits_type;\npublic:\n    typedef std::forward_iterator_tag iterator_category;\n    typedef T value_type;\n    typedef typename allocator_traits_type::difference_type difference_type;\n    typedef typename allocator_traits_type::pointer pointer;\n    typedef typename allocator_traits_type::value_type& reference;\n\n    ForwardIterator() : my_ptr(nullptr) {}\n    explicit ForwardIterator ( T * ptr ) : my_ptr(ptr){}\n\n    ForwardIterator ( const ForwardIterator& r ) : my_ptr(r.my_ptr){}\n    T& operator* () const { return *my_ptr; }\n    ForwardIterator& operator++ () { ++my_ptr; return *this; }\n    ForwardIterator operator++(int) {\n        ForwardIterator result = *this;\n        ++*this;\n        return result;\n    }\n\n    bool operator== ( const ForwardIterator& r ) const { return my_ptr == r.my_ptr; }\n};\n\ntemplate <typename T>\nclass RandomIterator {\n    T * my_ptr;\n    typedef std::allocator<T> allocator_type;\n    typedef std::allocator_traits<allocator_type> allocator_traits_type;\npublic:\n    typedef std::random_access_iterator_tag iterator_category;\n    typedef T value_type;\n    typedef typename allocator_traits_type::pointer pointer;\n    typedef typename allocator_traits_type::value_type& reference;\n    typedef typename allocator_traits_type::difference_type difference_type;\n\n    RandomIterator() : my_ptr(nullptr) {}\n    explicit RandomIterator ( T * ptr ) : my_ptr(ptr){}\n    RandomIterator ( const RandomIterator& r ) : my_ptr(r.my_ptr){}\n    T& operator* () const { return *my_ptr; }\n    RandomIterator& operator++ () { ++my_ptr; return *this; }\n    RandomIterator operator++(int) {\n        RandomIterator result = *this;\n        ++*this;\n        return result;\n    }\n    RandomIterator& operator--() { --my_ptr; return *this; }\n    RandomIterator operator--(int) {\n        RandomIterator result = *this;\n        --*this;\n        return result;\n    }\n\n    bool operator== ( const RandomIterator& r ) const { return my_ptr == r.my_ptr; }\n    bool operator!= ( const RandomIterator& r ) const { return my_ptr != r.my_ptr; }\n    difference_type operator- (const RandomIterator &r) const {return my_ptr - r.my_ptr;}\n    RandomIterator operator+ (difference_type n) const {return RandomIterator(my_ptr + n);}\n    bool operator< (const RandomIterator &r) const {return my_ptr < r.my_ptr;}\n    bool operator> (const RandomIterator &r) const {return my_ptr > r.my_ptr;}\n    bool operator<=(const RandomIterator &r) const {return my_ptr <= r.my_ptr;}\n    bool operator>=(const RandomIterator &r) const {return my_ptr >= r.my_ptr;}\n\n    RandomIterator& operator+=( difference_type n ) {\n        my_ptr += n;\n        return *this;\n    }\n    RandomIterator& operator-=( difference_type n ) {\n        my_ptr -= n;\n        return *this;\n    }\n\n    friend RandomIterator operator+( difference_type n, RandomIterator it ) {\n        return RandomIterator(it.my_ptr + n);\n    }\n    RandomIterator operator-( difference_type n ) const {\n        return RandomIterator(my_ptr - n);\n    }\n    reference operator[]( difference_type n ) const {\n        return my_ptr[n];\n    }\n};\n\ntemplate <typename T>\nclass ConstRandomIterator {\n    const T * my_ptr;\n    typedef std::allocator<T> allocator_type;\n    typedef std::allocator_traits<allocator_type> allocator_traits_type;\npublic:\n    typedef std::random_access_iterator_tag iterator_category;\n    typedef const T value_type;\n    typedef typename allocator_traits_type::const_pointer pointer;\n    typedef const typename allocator_traits_type::value_type& reference;\n    typedef typename allocator_traits_type::difference_type difference_type;\n\n    ConstRandomIterator() : my_ptr(nullptr) {}\n    explicit ConstRandomIterator ( const T * ptr ) : my_ptr(ptr){}\n    ConstRandomIterator ( const ConstRandomIterator& r ) : my_ptr(r.my_ptr){}\n    const T& operator* () const { return *my_ptr; }\n    ConstRandomIterator& operator++ () { ++my_ptr; return *this; }\n    ConstRandomIterator operator++(int) {\n        ConstRandomIterator result = *this;\n        ++*this;\n        return result;\n    }\n    ConstRandomIterator& operator--() { --my_ptr; return *this; }\n    ConstRandomIterator operator--(int) {\n        ConstRandomIterator result = *this;\n        --*this;\n        return result;\n    }\n\n    bool operator== ( const ConstRandomIterator& r ) const { return my_ptr == r.my_ptr; }\n    bool operator!= ( const ConstRandomIterator& r ) const { return my_ptr != r.my_ptr; }\n    difference_type operator- (const ConstRandomIterator &r) const {return my_ptr - r.my_ptr;}\n    ConstRandomIterator operator+ (difference_type n) const {return ConstRandomIterator(my_ptr + n);}\n    bool operator< (const ConstRandomIterator &r) const {return my_ptr < r.my_ptr;}\n    bool operator> (const ConstRandomIterator &r) const {return my_ptr > r.my_ptr;}\n    bool operator<=(const ConstRandomIterator &r) const {return my_ptr <= r.my_ptr;}\n    bool operator>=(const ConstRandomIterator &r) const {return my_ptr >= r.my_ptr;}\n\n\n    ConstRandomIterator& operator+=( difference_type n ) {\n        my_ptr += n;\n        return *this;\n    }\n    ConstRandomIterator& operator-=( difference_type n ) {\n        my_ptr -= n;\n        return *this;\n    }\n\n    friend ConstRandomIterator operator+( difference_type n, ConstRandomIterator it ) {\n        return ConstRandomIterator(it.my_ptr + n);\n    }\n    ConstRandomIterator operator-( difference_type n ) const {\n        return ConstRandomIterator(my_ptr - n);\n    }\n    reference operator[]( difference_type n ) const {\n        return my_ptr[n];\n    }\n};\n\n} // namespace utils\n\n#endif // __TBB_test_common_iterator_H\n"
  },
  {
    "path": "third-party/tbb/test/common/memory_usage.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// Declarations for simple estimate of the memory being used by a program.\n// Not yet implemented for macOS*.\n// This header is an optional part of the test harness.\n// It assumes that \"harness_assert.h\" has already been included.\n\n#ifndef __TBB_test_common_memory_usage_H_\n#define __TBB_test_common_memory_usage_H_\n\n#include \"common/test.h\"\n#include \"utils.h\"\n#include \"utils_assert.h\"\n\n#if __unix__ || __sun\n#include <sys/resource.h>\n#include <unistd.h>\n#include <sys/utsname.h> /* for uname */\n#include <errno.h>       /* for use in LinuxKernelVersion() */\n\n// Parse file utility for THP info\n#include \"src/tbbmalloc/shared_utils.h\"\n\n#elif __APPLE__ && !__ARM_ARCH\n#include <unistd.h>\n#include <mach/mach.h>\n#include <AvailabilityMacros.h>\n#if MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_6 || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0\n#include <mach/shared_region.h>\n#else\n#include <mach/shared_memory_server.h>\n#endif\n#if SHARED_TEXT_REGION_SIZE || SHARED_DATA_REGION_SIZE\nconst size_t shared_size = SHARED_TEXT_REGION_SIZE+SHARED_DATA_REGION_SIZE;\n#else\nconst size_t shared_size = 0;\n#endif\n\n#elif _WIN32 && !__TBB_WIN8UI_SUPPORT\n#include <windows.h>\n#include <psapi.h>\n#if _MSC_VER\n#pragma comment(lib, \"psapi\")\n#endif\n\n#endif /* OS selection */\n\nnamespace utils {\n\n    enum MemoryStatType {\n        currentUsage,\n        peakUsage\n    };\n\n#if __unix__\n    inline unsigned LinuxKernelVersion()\n    {\n        unsigned digit1, digit2, digit3;\n        struct utsname utsnameBuf;\n\n        if (-1 == uname(&utsnameBuf)) {\n            CHECK_MESSAGE(false, \"Can't call uname: errno = \" << errno);\n        }\n        if (3 != sscanf(utsnameBuf.release, \"%u.%u.%u\", &digit1, &digit2, &digit3)) {\n            CHECK_MESSAGE(false, \"Unable to parse OS release: \" << utsnameBuf.release);\n        }\n        return 1000000 * digit1 + 1000 * digit2 + digit3;\n    }\n#endif\n\n    //! Return estimate of number of bytes of memory that this program is currently using.\n    /* Returns 0 if not implemented on platform. */\n    std::size_t GetMemoryUsage(MemoryStatType stat = currentUsage) {\n        utils::suppress_unused_warning(stat);\n#if __TBB_WIN8UI_SUPPORT || defined(WINAPI_FAMILY)\n        return 0;\n#elif _WIN32\n        PROCESS_MEMORY_COUNTERS mem;\n        bool status = GetProcessMemoryInfo(GetCurrentProcess(), &mem, sizeof(mem)) != 0;\n        ASSERT(status, nullptr);\n        return stat == currentUsage ? mem.PagefileUsage : mem.PeakPagefileUsage;\n#elif __unix__\n        long unsigned size = 0;\n        FILE* fst = fopen(\"/proc/self/status\", \"r\");\n        ASSERT(fst != nullptr, nullptr);\n        const int BUF_SZ = 200;\n        char buf_stat[BUF_SZ];\n        const char* pattern = stat == peakUsage ? \"VmPeak: %lu\" : \"VmSize: %lu\";\n        while (nullptr != fgets(buf_stat, BUF_SZ, fst)) {\n            if (1 == sscanf(buf_stat, pattern, &size)) {\n                ASSERT(size, \"Invalid value of memory consumption.\");\n                break;\n            }\n        }\n        // VmPeak is available in kernels staring 2.6.15\n        if (stat != peakUsage || LinuxKernelVersion() >= 2006015)\n            ASSERT(size, \"Invalid /proc/self/status format, pattern not found.\");\n        fclose(fst);\n        return size * 1024;\n#elif __APPLE__ && !__ARM_ARCH\n        // TODO: find how detect peak virtual memory size under macOS\n        if (stat == peakUsage)\n            return 0;\n        kern_return_t status;\n        task_basic_info info;\n        mach_msg_type_number_t msg_type = TASK_BASIC_INFO_COUNT;\n        status = task_info(mach_task_self(), TASK_BASIC_INFO, reinterpret_cast<task_info_t>(&info), &msg_type);\n        ASSERT(status == KERN_SUCCESS, nullptr);\n        return info.virtual_size - shared_size;\n#else\n        return 0;\n#endif\n    }\n\n    //! Use approximately a specified amount of stack space.\n    /** Recursion is used here instead of alloca because some implementations of alloca do not use the stack. */\n    void UseStackSpace(size_t amount, char* top = nullptr) {\n        char x[1000];\n        memset(x, -1, sizeof(x));\n        if (!top)\n            top = x;\n        CHECK_MESSAGE(x <= top, \"test assumes that stacks grow downwards\");\n        if (size_t(top - x) < amount)\n            UseStackSpace(amount, top);\n    }\n\n#if __unix__\n\n    inline bool isTHPEnabledOnMachine() {\n        long long thpPresent = 'n';\n        long long hugePageSize = -1;\n\n        parseFileItem thpItem[] = { { \"[alwa%cs] madvise never\\n\", thpPresent } };\n        parseFileItem hpSizeItem[] = { { \"Hugepagesize: %lld kB\", hugePageSize } };\n\n        parseFile</*BUFF_SIZE=*/100>(\"/sys/kernel/mm/transparent_hugepage/enabled\", thpItem);\n        parseFile</*BUFF_SIZE=*/100>(\"/proc/meminfo\", hpSizeItem);\n\n        if (hugePageSize > -1 && thpPresent == 'y') {\n            return true;\n        } else {\n            return false;\n        }\n    }\n    inline long long getSystemTHPAllocatedSize() {\n        long long anonHugePagesSize = 0;\n        parseFileItem meminfoItems[] = {\n            { \"AnonHugePages: %lld kB\", anonHugePagesSize } };\n        parseFile</*BUFF_SIZE=*/100>(\"/proc/meminfo\", meminfoItems);\n        return anonHugePagesSize;\n    }\n    inline long long getSystemTHPCount() {\n        long long anonHugePages = 0;\n        parseFileItem vmstatItems[] = {\n            { \"nr_anon_transparent_hugepages %lld\", anonHugePages } };\n        parseFile</*BUFF_SIZE=*/100>(\"/proc/vmstat\", vmstatItems);\n        return anonHugePages;\n    }\n\n#endif // __unix__\n\n} // namespace utils\n#endif // __TBB_test_common_memory_usage_H_\n"
  },
  {
    "path": "third-party/tbb/test/common/node_handling_support.h",
    "content": "/*\n    Copyright (c) 2019-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_node_handling_support_H\n#define __TBB_test_common_node_handling_support_H\n\n#include \"common/test.h\"\n#include <utility>\n\ntemplate <typename T>\nstruct AllowMultimapping;\n\ntemplate <typename Container>\nstruct Value;\n\nnamespace node_handling_tests {\n\ntemplate <typename Handle>\nbool compare_handle_getters( const Handle& node, const std::pair<typename Handle::key_type, typename Handle::mapped_type>& value  ) {\n    return node.key() == value.first && node.mapped() == value.second;\n}\n\ntemplate <typename Handle>\nbool compare_handle_getters( const Handle& node, const typename Handle::value_type& value ) {\n    return node.value() == value;\n}\n\ntemplate <typename Handle>\nvoid set_node_handle_value( Handle& node, const std::pair<typename Handle::key_type, typename Handle::mapped_type>& value ) {\n    node.key() = value.first;\n    node.mapped() = value.second;\n}\n\ntemplate <typename Handle>\nvoid set_node_handle_value( Handle& node, const typename Handle::value_type& value ) {\n    node.value() = value;\n}\n\ntemplate <typename NodeType>\nvoid test_node_handle_traits() {\n    REQUIRE_MESSAGE(!std::is_copy_constructible<NodeType>::value,\n                    \"Node handle: handle should not be copy constructible\");\n    REQUIRE_MESSAGE(!std::is_copy_assignable<NodeType>::value,\n                    \"Node handle: handle should not be copy assignable\");\n    REQUIRE_MESSAGE(std::is_move_constructible<NodeType>::value,\n                    \"Node handle: handle should be move constructible\");\n    REQUIRE_MESSAGE(std::is_move_assignable<NodeType>::value,\n                    \"Node handle: handle should be move assignable\");\n    REQUIRE_MESSAGE(std::is_default_constructible<NodeType>::value,\n                    \"Node handle: handle should be default constructible\");\n    REQUIRE_MESSAGE(std::is_destructible<NodeType>::value,\n                    \"Node handle: handle should be destructible\");\n}\n\ntemplate <typename Container>\nvoid test_node_handle( Container test_table ) {\n    REQUIRE_MESSAGE(test_table.size() > 1, \"Node handle: Container must contain 2 or more elements\");\n    // Initialization\n    using node_type = typename Container::node_type;\n\n    test_node_handle_traits<node_type>();\n\n    // Default ctor and empty initialization\n    node_type nh;\n    REQUIRE_MESSAGE(nh.empty(), \"Node handle: node_type object is not empty after default ctor\");\n\n    // Move assignment\n    // key/mapped/value function\n    auto expected_value = *test_table.begin();\n\n    nh = test_table.unsafe_extract(test_table.begin());\n    REQUIRE_MESSAGE(!nh.empty(), \"Node handle: node_type object is empty after valid move assignment\");\n    REQUIRE_MESSAGE(nh.get_allocator() == test_table.get_allocator(), \"Node handle: node_type object allocator is incorrect\");\n    REQUIRE_MESSAGE(compare_handle_getters(nh, expected_value),\n                    \"Node handle: node_type object does not contains expected value after valid move assignment\");\n\n    // Move ctor\n    node_type nh2(std::move(nh));\n    REQUIRE_MESSAGE(nh.empty(), \"Node handle: moved-from node_type object is not empty\");\n    REQUIRE_MESSAGE(!nh2.empty(), \"Node handle: node_type object is empty after valid move construction\");\n    REQUIRE_MESSAGE(compare_handle_getters(nh2, expected_value),\n            \"Node handle: node_type object does not contains expected value after valid move ctor\");\n\n    // bool conversion\n    REQUIRE_MESSAGE(nh2, \"Node handle: Wrong node handle bool conversion\");\n\n    auto expected_value2 = *test_table.begin();\n    set_node_handle_value(nh2, expected_value2);\n    REQUIRE_MESSAGE(compare_handle_getters(nh2, expected_value2),\n                    \"Node handle: Wrond node handle key/mapped/value change behaviour\");\n\n    // Member and non-member swap check\n    node_type empty_node;\n    // Extract an element for nh2 and nh3 difference\n    test_table.unsafe_extract(test_table.begin());\n    auto expected_value3 = *test_table.begin();\n    node_type nh3(test_table.unsafe_extract(test_table.begin()));\n\n    // Both of node handles are not empty\n    nh3.swap(nh2);\n    REQUIRE_MESSAGE(!nh2.empty(), \"Node handle: Wrong node handle swap behavior\");\n    REQUIRE_MESSAGE(!nh3.empty(), \"Node handle: Wrong node handle swap behavior\");\n    REQUIRE_MESSAGE(compare_handle_getters(nh3, expected_value2),\n                    \"Node handle: Wrong node handle swap behavior\");\n    REQUIRE_MESSAGE(compare_handle_getters(nh2, expected_value3),\n                    \"Node handle: Wrong node handle swap behavior\");\n\n    using std::swap;\n    swap(nh2, nh3);\n    REQUIRE_MESSAGE(!nh2.empty(), \"Node handle: Wrong node handle swap behavior\");\n    REQUIRE_MESSAGE(!nh3.empty(), \"Node handle: Wrong node handle swap behavior\");\n    REQUIRE_MESSAGE(compare_handle_getters(nh3, expected_value3),\n                    \"Node handle: Wrong node handle swap behavior\");\n    REQUIRE_MESSAGE(compare_handle_getters(nh2, expected_value2),\n                    \"Node handle: Wrong node handle swap behavior\");\n\n    // One of the handles is empty\n    nh3.swap(empty_node);\n    REQUIRE_MESSAGE(nh3.empty(), \"Node handle: Wrong node handle swap behavior\");\n    REQUIRE_MESSAGE(compare_handle_getters(empty_node, expected_value3),\n                    \"Node handle: Wrong node handle swap behavior\");\n\n    swap(empty_node, nh3);\n    REQUIRE_MESSAGE(empty_node.empty(), \"Node handle: Wrong node handle swap behavior\");\n    REQUIRE_MESSAGE(compare_handle_getters(nh3, expected_value3),\n                    \"Node handle: Wrong node handle swap behavior\");\n\n    empty_node.swap(nh3);\n    REQUIRE_MESSAGE(nh3.empty(), \"Node handle: Wrong node handle swap behavior\");\n    REQUIRE_MESSAGE(compare_handle_getters(empty_node, expected_value3),\n                    \"Node handle: Wrong node handle swap behavior\");\n}\n\ntemplate <typename Container>\ntypename Container::node_type generate_node_handle( const typename Container::value_type& value ) {\n    Container table;\n    table.insert(value);\n    return table.unsafe_extract(table.begin());\n}\n\ntemplate <typename Container>\nvoid check_insert( const Container& table,\n                   typename Container::iterator result,\n                   const typename Container::value_type* node_value = nullptr )\n{\n    if (node_value == nullptr) {\n        REQUIRE_MESSAGE(result == table.end(),\n                        \"Insert: Result iterator does not point to the end after empty node insertion\");\n    } else {\n        if (AllowMultimapping<Container>::value) {\n            REQUIRE_MESSAGE(*result == *node_value,\n                    \"Insert: Result iterator points to the wrong element after successful insertion\");\n\n            for (auto it = table.begin(); it != table.end(); ++it) {\n                if (it == result) return;\n            }\n            REQUIRE_MESSAGE(false, \"Insert: iterator does not point to the element in the container\");\n        } else {\n            REQUIRE_MESSAGE((result == table.find(Value<Container>::key(*node_value)) &&\n                             result != table.end()),\n                             \"Insert: Iterator does not point to the equal element in the container\");\n        }\n    }\n}\n\n// Overload for sets\ntemplate <typename Container>\nvoid check_insert( const Container& table,\n                   typename Container::iterator result,\n                   bool,\n                   const typename Container::value_type* node_value = nullptr )\n{\n    check_insert(table, result, node_value);\n}\n\n// Overload for maps\ntemplate <typename Container>\nvoid check_insert( const Container& table,\n                   const std::pair<typename Container::iterator, bool>& result,\n                   bool successful,\n                   const typename Container::value_type* node_value = nullptr )\n{\n    check_insert(table, result.first, node_value);\n    REQUIRE_MESSAGE((result.second == successful || AllowMultimapping<Container>::value),\n                    \"Insert: Wrong bool returned after node insertion\");\n}\n\n// Can't delete reference from table_to_insert argument because hint must point to the element in the table\ntemplate <typename Container, typename... Hint>\nvoid test_insert_overloads(Container& table_to_insert, const typename Container::value_type& value, const Hint&... hint) {\n    // Insert an empty element\n    typename Container::node_type nh;\n\n    auto table_size = table_to_insert.size();\n    auto result = table_to_insert.insert(hint..., std::move(nh));\n    check_insert(table_to_insert, result, /*successful = */false);\n\n    REQUIRE_MESSAGE(table_to_insert.size() == table_size,\n                    \"Insert: Container size changed after the insertion of the empty node handle\");\n\n    // Standard insertion\n    nh = generate_node_handle<Container>(value);\n\n    result = table_to_insert.insert(hint..., std::move(nh));\n    REQUIRE_MESSAGE(nh.empty(), \"Insert: Not empty node handle after successful insertion\");\n    check_insert(table_to_insert, result, /*successful = */true, &value);\n\n    // Insert existing node\n    nh = generate_node_handle<Container>(value);\n    result = table_to_insert.insert(hint..., std::move(nh));\n\n    check_insert(table_to_insert, result, /*successful = */false, &value);\n\n    if (AllowMultimapping<Container>::value) {\n        REQUIRE_MESSAGE(nh.empty(), \"Insert: Failed insertion to multitable\");\n    } else {\n        REQUIRE_MESSAGE(!nh.empty(), \"Insert: Empty node handle after failed insertion\");\n        REQUIRE_MESSAGE(compare_handle_getters(nh, value),\n                        \"Insert: Existing data does not equal to the one being inserted\");\n    }\n}\n\ntemplate <typename Container>\nvoid test_insert( Container table, const typename Container::value_type& value ) {\n    REQUIRE_MESSAGE(!table.empty(), \"Insert: container should contains 1 or more elements\");\n    Container table_backup(table);\n    test_insert_overloads(table, value); // test insert\n    test_insert_overloads(table_backup, value, table_backup.begin()); // test insert with the hint\n}\n\ntemplate <typename Container>\nvoid test_extract( Container table_for_extract, typename Container::key_type new_key ) {\n    REQUIRE_MESSAGE(table_for_extract.size() > 1, \"Extract: container must contain 2 or more elements\");\n    REQUIRE_MESSAGE(!table_for_extract.contains(new_key), \"Extract: container must not contain new element\");\n\n    // Extract new_element\n    auto nh = table_for_extract.unsafe_extract(new_key);\n    REQUIRE_MESSAGE(nh.empty(), \"Extract: node handle is not empty after extraction of key which is not is the container\");\n\n    // Valid key extraction\n    auto expected_value = *table_for_extract.begin();\n    auto key = Value<Container>::key(expected_value);\n    auto count = table_for_extract.count(key);\n\n    nh = table_for_extract.unsafe_extract(key);\n    REQUIRE_MESSAGE(!nh.empty(), \"Extract: node handle is empty after successful extraction\");\n    REQUIRE_MESSAGE(compare_handle_getters(nh, expected_value), \"Extract: node handle contains wrong node after successful extraction\");\n    REQUIRE_MESSAGE(table_for_extract.count(key) == count -1, \"Extract: more than one elements were extracted\");\n\n    // Valid iterator extraction\n    auto expected_value2 = *table_for_extract.begin();\n    auto key2 = Value<Container>::key(expected_value2);\n    auto count2 = table_for_extract.count(key2);\n\n    nh = table_for_extract.unsafe_extract(table_for_extract.cbegin());\n    REQUIRE_MESSAGE(!nh.empty(), \"Extract: node handle is empty after successful extraction\");\n    REQUIRE_MESSAGE(compare_handle_getters(nh, expected_value2), \"Extract: node handle contains wrong node after successful extraction\");\n    REQUIRE_MESSAGE(table_for_extract.count(key2) == count2 -1, \"Extract: more than one elements were extracted\");\n}\n\ntemplate <typename Container>\nvoid test_node_handling( const Container& container, const typename Container::value_type& new_value ) {\n    test_node_handle(container);\n    test_insert(container, new_value);\n    test_extract(container, Value<Container>::key(new_value));\n}\n\ntemplate <typename Container>\nvoid test_node_handling_support() {\n    Container cont;\n\n    for (int i = 1; i < 5; ++i) {\n        cont.insert(Value<Container>::make(i));\n    }\n\n    if (AllowMultimapping<Container>::value) {\n        cont.insert(Value<Container>::make(4));\n    }\n\n    test_node_handling(cont, Value<Container>::make(5));\n}\n\ntemplate <typename Container1, typename Container2>\nvoid test_merge_basic( Container1 table1, Container2&& table2 ) {\n    using container2_pure_type = typename std::decay<Container2>::type;\n\n    // Initialization\n    Container1 table1_backup = table1;\n    container2_pure_type table2_backup = table2;\n\n    table1.merge(std::forward<Container2>(table2));\n    for (auto it : table2) {\n        REQUIRE_MESSAGE(table1.contains(Value<container2_pure_type>::key(it)),\n                        \"Merge: Some key was not merged\");\n    }\n\n    // After the following step table1 will contains only merged elements from table2\n    for (auto it : table1_backup) {\n        table1.unsafe_extract(Value<Container1>::key(it));\n    }\n    // After the following step table2_backup will contains only merged elements from table2\n    for (auto it : table2) {\n        table2_backup.unsafe_extract(Value<container2_pure_type>::key(it));\n    }\n\n    REQUIRE_MESSAGE(table1.size() == table2_backup.size(), \"Merge: Sizes of tables are not equal\");\n    for (auto it : table2_backup) {\n        REQUIRE_MESSAGE(table1.contains(Value<container2_pure_type>::key(it)),\n                        \"Merge: Wrong merge behavior\");\n    }\n}\n\ntemplate <typename Container1, typename Container2>\nvoid test_merge_overloads( const Container1& table1, Container2 table2 ) {\n    Container2 table_backup(table2);\n    test_merge_basic(table1, table2);\n    test_merge_basic(table1, std::move(table_backup));\n}\n\ntemplate <typename UniqueContainer, typename MultiContainer>\nvoid test_merge_transposition( UniqueContainer table1, UniqueContainer table2,\n                               MultiContainer multitable1, MultiContainer multitable2 ) {\n    UniqueContainer empty_table;\n    MultiContainer empty_multitable;\n\n    // Unique table transpositions\n    test_merge_overloads(table1, table2);\n    test_merge_overloads(table1, empty_table);\n    test_merge_overloads(empty_table, table2);\n\n    // Multi table transpositions\n    test_merge_overloads(multitable1, multitable2);\n    test_merge_overloads(multitable1, empty_multitable);\n    test_merge_overloads(empty_multitable, multitable2);\n\n    // Unique/Multi tables transpositions\n    test_merge_overloads(table1, multitable1);\n    test_merge_overloads(multitable2, table2);\n}\n\ntemplate <typename SrcTableType, typename DstTableType>\nvoid check_concurrent_merge( SrcTableType& start_data, DstTableType& dst_table,\n                             std::vector<SrcTableType>& src_tables, std::true_type )\n{\n    REQUIRE_MESSAGE(dst_table.size() == start_data.size() * src_tables.size(),\n                    \"Merge: Incorrect merge for some elements\");\n\n    for (auto it : start_data) {\n        REQUIRE_MESSAGE(dst_table.count(Value<DstTableType>::key(it)) ==\n                        start_data.count(Value<SrcTableType>::key(it)) * src_tables.size(),\n                        \"Merge: Incorrect merge for some elements\");\n    }\n\n    for (size_t i = 0; i < src_tables.size(); ++i) {\n        REQUIRE_MESSAGE(src_tables[i].empty(), \"Merge: Some elements were not merged\");\n    }\n}\n\ntemplate <typename SrcTableType, typename DstTableType>\nvoid check_concurrent_merge( SrcTableType& start_data, DstTableType& dst_table,\n                             std::vector<SrcTableType>& src_tables, std::false_type )\n{\n    SrcTableType expected_result;\n    for (auto table : src_tables) {\n        for (auto it : start_data) {\n            // If we cannot find some element in some table, then it has been moved\n            if (!table.contains(Value<SrcTableType>::key(it))) {\n                bool result = expected_result.insert(it).second;\n                REQUIRE_MESSAGE(result,\n                                \"Merge: Some element was merged twice or was not returned to his owner after unsuccessful merge\");\n            }\n        }\n    }\n\n    REQUIRE_MESSAGE((expected_result.size() == dst_table.size() && start_data.size() == dst_table.size()),\n                    \"Merge: wrong size of result table\");\n\n    for (auto it : expected_result) {\n        if (dst_table.contains(Value<SrcTableType>::key(it)) &&\n            start_data.contains(Value<DstTableType>::key(it)))\n        {\n            dst_table.unsafe_extract(Value<SrcTableType>::key(it));\n            start_data.unsafe_extract(Value<DstTableType>::key(it));\n        } else {\n            REQUIRE_MESSAGE(false, \"Merge: Incorrect merge for some element\");\n        }\n    }\n\n    REQUIRE_MESSAGE((dst_table.empty() && start_data.empty()), \"Merge: Some elements were not merged\");\n}\n\ntemplate <typename SrcTableType, typename DstTableType>\nvoid test_concurrent_merge( SrcTableType table_data ) {\n    for (std::size_t num_threads = utils::MinThread; num_threads <= utils::MaxThread; ++num_threads) {\n        std::vector<SrcTableType> src_tables;\n        DstTableType dst_table;\n\n        for (std::size_t j = 0; j < num_threads; ++j) {\n            src_tables.push_back(table_data);\n        }\n\n        utils::NativeParallelFor(num_threads, [&](std::size_t index) { dst_table.merge(src_tables[index]); } );\n\n        check_concurrent_merge(table_data, dst_table, src_tables,\n                            AllowMultimapping<DstTableType>{});\n    }\n}\n\ntemplate <typename Container1, typename Container2>\nvoid test_merge( int size ) {\n    Container1 table1_1;\n    Container1 table1_2;\n    int i = 1;\n\n    for (; i < 5; ++i) {\n        table1_1.insert(Value<Container1>::make(i));\n        table1_2.insert(Value<Container1>::make(i * i));\n    }\n    if (AllowMultimapping<Container1>::value) {\n        table1_1.insert(Value<Container1>::make(i));\n        table1_2.insert(Value<Container1>::make(i * i));\n    }\n\n    Container2 table2_1;\n    Container2 table2_2;\n\n    for (i = 3; i < 7; ++i) {\n        table2_1.insert(Value<Container2>::make(i));\n        table2_2.insert(Value<Container2>::make(i * i));\n    }\n    if (AllowMultimapping<Container2>::value) {\n        table2_1.insert(Value<Container2>::make(i));\n        table2_2.insert(Value<Container2>::make(i * i));\n    }\n\n    test_merge_transposition(table1_1, table1_2, table2_1, table2_2);\n\n    Container1 table1_3;\n    Container2 table2_3;\n    for (i = 0; i < size; ++i) {\n        table1_3.insert(Value<Container1>::make(i));\n        table2_3.insert(Value<Container2>::make(i));\n    }\n\n    test_concurrent_merge<Container1, Container2>(table1_3);\n    test_concurrent_merge<Container2, Container1>(table2_3);\n}\n\n} // namespace node_handling tests\n\n#endif // __TBB_test_common_node_handling_support_H\n"
  },
  {
    "path": "third-party/tbb/test/common/parallel_for_each_common.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_parallel_for_each_common_H\n#define __TBB_test_common_parallel_for_each_common_H\n\n#include \"config.h\"\n\n#include \"oneapi/tbb/parallel_for_each.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include \"test.h\"\n#include \"config.h\"\n#include \"utils.h\"\n#include \"utils_report.h\"\n#include \"utils_concurrency_limit.h\"\n#include \"iterator.h\"\n#include \"cpu_usertime.h\"\n\n#include <vector>\n#include <forward_list>\n\nconstexpr std::size_t depths_nubmer = 20;\nstatic std::atomic<int> g_values_counter;\n\nclass value_t : public utils::NoAfterlife {\n    size_t x;\n    value_t& operator=(const value_t&);\npublic:\n    value_t(size_t xx) : x(xx) { ++g_values_counter; }\n    value_t(const value_t& v) : utils::NoAfterlife(v), x(v.x) { ++g_values_counter; }\n    value_t(value_t&& v) : x(v.x) { ++g_values_counter; }\n    ~value_t() { --g_values_counter; }\n    size_t value() const volatile { return x; }\n};\n\nstatic size_t g_tasks_expected = 0;\nstatic std::atomic<size_t> g_tasks_observed;\n\nsize_t FindNumOfTasks(size_t max_depth) {\n    if( max_depth == 0 )\n        return 1;\n    return  max_depth * FindNumOfTasks( max_depth - 1 ) + 1;\n}\n\n//! Simplest form of the parallel_for_each functor object.\nstruct FakeTaskGeneratorBody {\n    //! The simplest form of the function call operator\n    /** It does not allow adding new tasks during its execution. **/\n    void operator()(value_t depth) const {\n        g_tasks_observed += FindNumOfTasks(depth.value());\n    }\n};\n\n/** Work item is passed by reference here. **/\nstruct FakeTaskGeneratorBody_RefVersion {\n    void operator()(value_t& depth) const {\n        g_tasks_observed += FindNumOfTasks(depth.value());\n    }\n};\n\n/** Work item is passed by reference to const here. **/\nstruct FakeTaskGeneratorBody_ConstRefVersion {\n    void operator()(const value_t& depth) const {\n        g_tasks_observed += FindNumOfTasks(depth.value());\n    }\n};\n\n/** Work item is passed by reference to volatile here. **/\nstruct FakeTaskGeneratorBody_VolatileRefVersion {\n    void operator()(volatile value_t& depth, tbb::feeder<value_t>&) const {\n        g_tasks_observed += FindNumOfTasks(depth.value());\n    }\n};\n\n/** Work item is passed by rvalue reference here. **/\nstruct FakeTaskGeneratorBody_RvalueRefVersion {\n    void operator()(value_t&& depth ) const {\n        g_tasks_observed += FindNumOfTasks(depth.value());\n    }\n};\n\nvoid do_work(const value_t& depth, tbb::feeder<value_t>& feeder) {\n    ++g_tasks_observed;\n    value_t new_value(depth.value()-1);\n    for(size_t i = 0; i < depth.value(); ++i) {\n        if (i%2) feeder.add( new_value );                // pass lvalue\n        else     feeder.add( value_t(depth.value()-1) ); // pass rvalue\n    }\n}\n\n//! Standard form of the parallel_for_each functor object.\n/** Allows adding new work items on the fly. **/\nstruct TaskGeneratorBody {\n    //! This form of the function call operator can be used when the body needs to add more work during the processing\n    void operator()(value_t depth, tbb::feeder<value_t>& feeder) const {\n        do_work(depth, feeder);\n    }\nprivate:\n    // Assert that parallel_for_each does not ever access body constructors\n    TaskGeneratorBody () {}\n    TaskGeneratorBody (const TaskGeneratorBody&);\n    // These functions need access to the default constructor\n    template<class Body, class Iterator> friend void TestBody(size_t);\n    template<class Body, class Iterator> friend void TestBodyMove(size_t);\n    template<class Body, class Iterator> friend void TestBodyWithMove(size_t);\n};\n\n/** Work item is passed by reference here. **/\nstruct TaskGeneratorBody_RefVersion {\n    void operator()(value_t& depth, tbb::feeder<value_t>& feeder) const {\n        do_work(depth, feeder);\n    }\n};\n\n/** Work item is passed as const here. Compilers must ignore the const qualifier. **/\nstruct TaskGeneratorBody_ConstVersion {\n    void operator()(const value_t depth, tbb::feeder<value_t>& feeder) const {\n        do_work(depth, feeder);\n    }\n};\n\n/** Work item is passed by reference to const here. **/\nstruct TaskGeneratorBody_ConstRefVersion {\n    void operator()(const value_t& depth, tbb::feeder<value_t>& feeder) const {\n        do_work(depth, feeder);\n    }\n};\n\n/** Work item is passed by reference to volatile here. **/\nstruct TaskGeneratorBody_VolatileRefVersion {\n    void operator()(volatile value_t& depth, tbb::feeder<value_t>& feeder) const {\n        do_work(const_cast<value_t&>(depth), feeder);\n    }\n};\n\n/** Work item is passed by reference to const volatile here. **/\nstruct TaskGeneratorBody_ConstVolatileRefVersion {\n    void operator()(const volatile value_t& depth, tbb::feeder<value_t>& feeder) const {\n        do_work(const_cast<value_t&>(depth), feeder);\n    }\n};\n\n/** Work item is passed by rvalue reference here. **/\nstruct TaskGeneratorBody_RvalueRefVersion {\n    void operator()(value_t&& depth, tbb::feeder<value_t>& feeder) const {\n        do_work(depth, feeder);\n    }\n};\n\nstatic value_t g_depths[depths_nubmer] = {0, 1, 2, 3, 4, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2};\n\ntemplate<class Body, class Iterator>\nvoid TestBodyMove(size_t depth) {\n    typedef typename std::iterator_traits<Iterator>::value_type value_type;\n    value_type a_depths[depths_nubmer] = {0, 1, 2, 3, 4, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2};\n    Body body;\n    typedef std::move_iterator<Iterator> MoveIterator;\n    MoveIterator mbegin(Iterator{a_depths});\n    MoveIterator mend(Iterator{a_depths + depth});\n    g_tasks_observed = 0;\n    tbb::parallel_for_each(mbegin, mend, body);\n    REQUIRE (g_tasks_observed == g_tasks_expected);\n}\n\ntemplate<class Body, class Iterator>\nvoid TestBody(size_t depth) {\n    typedef typename std::iterator_traits<Iterator>::value_type value_type;\n    value_type a_depths[depths_nubmer] = {0, 1, 2, 3, 4, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2};\n    Body body;\n    Iterator begin(a_depths);\n    Iterator end(a_depths + depth);\n    g_tasks_observed = 0;\n    tbb::parallel_for_each(begin, end, body);\n    REQUIRE (g_tasks_observed == g_tasks_expected);\n}\n\ntemplate<class Body, class Iterator>\nvoid TestBodyWithMove(size_t depth) {\n    TestBody<Body, Iterator>(depth);\n    TestBodyMove<Body, Iterator>(depth);\n}\n\ntemplate<class Iterator>\nvoid TestIterator_Common(size_t depth) {\n    TestBodyWithMove<FakeTaskGeneratorBody, Iterator>(depth);\n    TestBodyWithMove<FakeTaskGeneratorBody_ConstRefVersion, Iterator>(depth);\n    TestBodyWithMove<TaskGeneratorBody, Iterator>(depth);\n    TestBodyWithMove<TaskGeneratorBody_ConstVersion, Iterator>(depth);\n    TestBodyWithMove<TaskGeneratorBody_ConstRefVersion, Iterator>(depth);\n}\n\ntemplate<class Iterator>\nvoid TestIterator_Const(size_t depth) {\n    TestIterator_Common<Iterator>(depth);\n    TestBody<TaskGeneratorBody_ConstVolatileRefVersion, Iterator>(depth);\n}\n\n#if __TBB_CPP14_GENERIC_LAMBDAS_PRESENT\ntemplate<class Iterator, class GenericBody>\nvoid TestGenericLambda(size_t depth, GenericBody body) {\n    typedef typename std::iterator_traits<Iterator>::value_type value_type;\n    value_type a_depths[depths_nubmer] = {0, 1, 2, 3, 4, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2};\n\n    Iterator begin(a_depths);\n    Iterator end(a_depths + depth);\n    g_tasks_observed = 0;\n    tbb::parallel_for_each(begin, end, body);\n    REQUIRE (g_tasks_observed == g_tasks_expected);\n}\n\ntemplate <class Iterator, class GenericBody>\nvoid TestGenericLambdaMove(size_t depth, GenericBody body) {\n    typedef typename std::iterator_traits<Iterator>::value_type value_type;\n    value_type a_depths[depths_nubmer] = {0, 1, 2, 3, 4, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2};\n\n    typedef std::move_iterator<Iterator> MoveIterator;\n    Iterator begin(a_depths);\n    Iterator end(a_depths + depth);\n    MoveIterator mbegin = std::make_move_iterator(begin);\n    MoveIterator mend = std::make_move_iterator(end);\n    g_tasks_observed = 0;\n    tbb::parallel_for_each(mbegin, mend, body);\n    REQUIRE (g_tasks_observed == g_tasks_expected);\n}\n\ntemplate <class Iterator, class GenericBody>\nvoid TestGenericLambdaWithMove(size_t depth, GenericBody body) {\n    TestGenericLambda<Iterator>(depth, body);\n    TestGenericLambdaMove<Iterator>(depth, body);\n}\n\ntemplate<class Iterator>\nvoid TestGenericLambdasCommon(size_t depth) {\n    TestGenericLambdaWithMove<Iterator>(depth, [](auto item){g_tasks_observed += FindNumOfTasks(item.value());});\n    TestGenericLambdaWithMove<Iterator>(depth, [](const auto item){g_tasks_observed += FindNumOfTasks(item.value());});\n    TestGenericLambda<Iterator>(depth, [](volatile auto& item){g_tasks_observed += FindNumOfTasks(item.value());});\n    TestGenericLambda<Iterator>(depth, [](const volatile auto& item){g_tasks_observed += FindNumOfTasks(item.value());});\n    TestGenericLambda<Iterator>(depth, [](auto& item){g_tasks_observed += FindNumOfTasks(item.value());});\n    TestGenericLambdaWithMove<Iterator>(depth, [](const auto& item){g_tasks_observed += FindNumOfTasks(item.value());});\n    TestGenericLambdaWithMove<Iterator>(depth, [](auto&& item){g_tasks_observed += FindNumOfTasks(item.value());});\n\n    TestGenericLambdaWithMove<Iterator>(depth, [](auto item, auto& feeder){do_work(item, feeder);});\n    TestGenericLambdaWithMove<Iterator>(depth, [](const auto item, auto& feeder){do_work(item, feeder);});\n    TestGenericLambda<Iterator>(depth, [](volatile auto& item, auto& feeder){do_work(const_cast<value_t&>(item), feeder);});\n    TestGenericLambda<Iterator>(depth, [](const volatile auto& item, auto& feeder){do_work(const_cast<value_t&>(item), feeder);});\n    TestGenericLambda<Iterator>(depth, [](auto& item, auto& feeder){do_work(item, feeder);});\n    TestGenericLambdaWithMove<Iterator>(depth, [](const auto& item, auto& feeder){do_work(item, feeder);});\n    TestGenericLambdaWithMove<Iterator>(depth, [](auto&& item, auto& feeder){do_work(item, feeder);});\n}\n#endif /*__TBB_CPP14_GENERIC_LAMBDAS_PRESENT*/\n\ntemplate<class Iterator>\nvoid TestIterator_Move(size_t depth) {\n    TestBodyMove<FakeTaskGeneratorBody_RvalueRefVersion, Iterator>(depth);\n    TestBodyMove<TaskGeneratorBody_RvalueRefVersion, Iterator>(depth);\n}\n\ntemplate<class Iterator>\nvoid TestIterator_Modifiable(size_t depth) {\n    TestIterator_Const<Iterator>(depth);\n    TestIterator_Move<Iterator>(depth);\n    TestBody<FakeTaskGeneratorBody_RefVersion, Iterator>(depth);\n    TestBody<FakeTaskGeneratorBody_VolatileRefVersion, Iterator>(depth);\n    TestBody<TaskGeneratorBody_RefVersion, Iterator>(depth);\n    TestBody<TaskGeneratorBody_VolatileRefVersion, Iterator>(depth);\n#if __TBB_CPP14_GENERIC_LAMBDAS_PRESENT\n    TestGenericLambdasCommon<Iterator>(depth);\n#endif\n}\n\nstd::atomic<std::size_t> task_counter{0};\n\ntemplate<template <typename> class IteratorModifier>\nstruct generic_iterator_container {\n    using value_type = std::size_t;\n    using container_type = std::vector<value_type>;\n    using iterator_type = IteratorModifier<value_type>;\n\n    static constexpr std::size_t default_size = 100;\n    container_type my_vec;\n    iterator_type my_begin, my_end;\n\n    generic_iterator_container():\n        my_vec   (default_size),\n        my_begin {my_vec.data()},\n        my_end   {my_vec.data() + my_vec.size()}\n    {}\n\n    iterator_type begin() const { return my_begin; }\n    iterator_type end()   const { return my_end;   }\n\n    void validation(std::size_t expected_value) {\n        for (std::size_t i = 0; i < my_vec.size(); i++)\n            REQUIRE_MESSAGE(my_vec[i] == expected_value, \"Some element was not produced\");\n\n        REQUIRE_MESSAGE(task_counter == my_vec.size(), \"Not all elements were produced\");\n        task_counter = 0;\n    }\n};\n\nstruct incremental_functor {\n    void operator()(std::size_t& in) const { ++in; ++task_counter;}\n};\n\nstruct incremental_functor_const {\n    void operator()(const std::size_t&) const { ++task_counter; }\n};\n\ntemplate< template<typename> class IteratorModifier, typename Functor = incremental_functor>\nvoid container_based_overload_test_case(std::size_t expected_value) {\n    generic_iterator_container<IteratorModifier> container;\n    tbb::parallel_for_each(container, Functor{});\n    container.validation(expected_value);\n}\n\nnamespace TestMoveSem {\n    struct MovePreferable : utils::Movable {\n        MovePreferable() : Movable(), addtofeed(true) {}\n        MovePreferable(bool addtofeed_) : Movable(), addtofeed(addtofeed_) {}\n        MovePreferable(MovePreferable&& other) : Movable(std::move(other)),\n                                                 addtofeed(other.addtofeed) {};\n        // base class is explicitly initialized in the copy ctor to avoid -Wextra warnings\n        MovePreferable(const MovePreferable& other) : Movable(other) {\n            REPORT(\"Error: copy ctor preferred.\\n\");\n        };\n        MovePreferable& operator=(const MovePreferable&) {\n            REPORT(\"Error: copy assign operator preferred.\\n\"); return *this;\n        }\n        bool addtofeed;\n    };\n    struct MoveOnly : MovePreferable {\n        MoveOnly( const MoveOnly& ) = delete;\n        MoveOnly() : MovePreferable() {}\n        MoveOnly(bool addtofeed_) : MovePreferable(addtofeed_) {}\n        MoveOnly(MoveOnly&& other) : MovePreferable(std::move(other)) {};\n    };\n}\n\ntemplate<typename T>\nvoid RecordAndAdd(const T& in, tbb::feeder<T>& feeder) {\n    REQUIRE_MESSAGE(in.alive, \"Got dead object in body\");\n    size_t i = ++g_tasks_observed;\n    if (in.addtofeed) {\n        if (i%2) feeder.add(T(false));\n        else {\n            T a(false);\n            feeder.add(std::move(a));\n        }\n    }\n}\n\n// Take an item by rvalue reference\ntemplate<typename T>\nstruct TestMoveIteratorBody {\n    void operator() (T&& in, tbb::feeder<T>& feeder) const { RecordAndAdd(in, feeder); }\n};\n\n// Take an item by value\ntemplate<typename T>\nstruct TestMoveIteratorBodyByValue {\n    void operator() (T in, tbb::feeder<T>& feeder) const { RecordAndAdd(in, feeder); }\n};\n\ntemplate<typename Iterator, typename Body>\nvoid TestMoveIterator() {\n    typedef typename std::iterator_traits<Iterator>::value_type value_type;\n\n    Body body;\n    const size_t size = 65;\n    g_tasks_observed = 0;\n    value_type a[size];\n    tbb::parallel_for_each(std::make_move_iterator(Iterator(a)), std::make_move_iterator(Iterator(a+size)), body);\n    REQUIRE(size * 2  == g_tasks_observed);\n}\n\ntemplate<typename T>\nvoid DoTestMoveSemantics() {\n    TestMoveIterator<utils::InputIterator<T>, TestMoveIteratorBody<T>>();\n    TestMoveIterator<utils::ForwardIterator<T>, TestMoveIteratorBody<T>>();\n    TestMoveIterator<utils::RandomIterator<T>, TestMoveIteratorBody<T>>();\n\n    TestMoveIterator<utils::InputIterator<T>, TestMoveIteratorBodyByValue<T>>();\n    TestMoveIterator<utils::ForwardIterator<T>, TestMoveIteratorBodyByValue<T>>();\n    TestMoveIterator<utils::RandomIterator<T>, TestMoveIteratorBodyByValue<T>>();\n}\n\n#endif // __TBB_test_common_parallel_for_each_common_H\n"
  },
  {
    "path": "third-party/tbb/test/common/parallel_invoke_common.h",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_parallel_invoke_common_H\n#define __TBB_test_common_parallel_invoke_common_H\n\n#include \"config.h\"\n\n#include <cstddef>\n#include <tuple>\n\n#include \"oneapi/tbb/parallel_invoke.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include \"dummy_body.h\"\n\n// Helps generate a tuple of functional objects\ntemplate<std::size_t Counter, template <std::size_t> class Functor, class Generator, typename... Fs>\nstruct generate_tuple_impl :\n    public generate_tuple_impl<Counter - 1, Functor, Generator, typename Generator::template type<Functor, Counter - 1>, Fs...> {};\n\ntemplate<template <std::size_t> class Functor, class Generator, typename... Fs>\nstruct generate_tuple_impl <0, Functor, Generator, Fs...> {\n    using type = std::tuple<Fs...>;\n};\n\ntemplate<std::size_t Size, template <std::size_t> class Functor, class Generator>\nusing generate_tuple = typename generate_tuple_impl<Size, Functor, Generator>::type;\n\n// Defines how generate_tuple should propagate Counter to the tuple members\nstruct generator {\n    template <template <std::size_t> class Functor, std::size_t NonTypeArg>\n    using type = Functor<NonTypeArg>;\n};\n\ntemplate <std::size_t Fixed>\nstruct fixed_generator {\n    template <template <std::size_t> class Functor, std::size_t NonTypeArg>\n    using type = Functor<Fixed>;\n};\n\ntemplate<std::size_t LevelTaskCount, std::size_t MaxDepth, std::size_t WorkSize>\nstruct invoke_tree {\n    struct invoke_tree_leaf {\n        static constexpr std::size_t size = WorkSize;\n        void operator()() const { utils::doDummyWork(size); }\n    };\n\n    // Make invoke_tree_leaf composable with generate_tuple interface\n    template <std::size_t NonTypeArg>\n    using generating_leaf_functor = invoke_tree_leaf;\n\n    template<std::size_t CurrentDepth>\n    struct invoke_tree_node {\n        template<typename... Fs>\n        void invoker(const std::tuple<Fs...>&) const {\n            tbb::parallel_invoke(Fs()...);\n        }\n\n        // Template alias to workaround the strange Visual Studio issue\n        template<std::size_t Depth>\n        using generating_node_functor = invoke_tree_node<Depth>;\n\n        void create_level(/*is_final_level*/std::false_type) const {\n            invoker(generate_tuple<LevelTaskCount, generating_node_functor, fixed_generator<CurrentDepth + 1>>{});\n        }\n\n        void create_level(/*is_final_level*/std::true_type) const {\n            invoker(generate_tuple<LevelTaskCount, generating_leaf_functor, generator>());\n        }\n\n        void operator()() const {\n            create_level(/*is_final_level*/std::integral_constant<bool, CurrentDepth == MaxDepth>());\n        }\n    };\n\n    static void generate_and_run() {\n        invoke_tree_node<1> tree_root;\n        tree_root();\n    }\n};\n\ntemplate<std::size_t TaskCount, template<std::size_t> class Functor>\nclass parallel_invoke_call {\n    template<typename... Fs>\n    static void invoke_tuple_args(tbb::task_group_context* context_ptr, const std::tuple<Fs...>&) {\n        if (context_ptr != nullptr) {\n            tbb::parallel_invoke(Fs()..., *context_ptr);\n        } else {\n            tbb::parallel_invoke(Fs()...);\n        }\n    }\n\npublic:\n    static void perform(tbb::task_group_context* context_ptr = nullptr) {\n        invoke_tuple_args(context_ptr, generate_tuple<TaskCount, Functor, generator>{});\n    }\n};\n\n#endif // __TBB_test_common_parallel_invoke_common_H\n"
  },
  {
    "path": "third-party/tbb/test/common/parallel_reduce_common.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_parallel_reduce_common_H\n#define __TBB_test_common_parallel_reduce_common_H\n\n#include \"test.h\"\n#include \"utils.h\"\n#include \"utils_report.h\"\n#include \"utils_concurrency_limit.h\"\n\n#include \"oneapi/tbb/parallel_reduce.h\"\n#include \"oneapi/tbb/blocked_range.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n//! Type-tag for testing algorithm with default partitioner\nstruct utils_default_partitioner {};\n\ntemplate <typename Range, typename Body, typename Partitioner>\nvoid reduce_invoker(const Range& range, Body& body, Partitioner& partiotioner) {\n    tbb::parallel_reduce( range, body, partiotioner );\n}\n\ntemplate <typename Range, typename Body>\nvoid reduce_invoker(const Range& range, Body& body, utils_default_partitioner&) {\n    tbb::parallel_reduce( range, body );\n}\n\ntemplate <typename ResultType, typename Range, typename Func, typename Reduction, typename Partitioner>\nResultType reduce_invoker(const Range& range, const Func& func, const Reduction& reduction, Partitioner& partiotioner) {\n    return tbb::parallel_reduce( range, ResultType(), func, reduction, partiotioner );\n}\n\ntemplate <typename ResultType, typename Range, typename Func, typename Reduction>\nResultType reduce_invoker(const Range& range, const Func& func, const Reduction& reduction, utils_default_partitioner&) {\n    return tbb::parallel_reduce( range, ResultType(), func, reduction );\n}\n\ntemplate <typename Range, typename Body, typename Partitioner>\nvoid deterministic_reduce_invoker(const Range& range, Body& body, const Partitioner& partiotioner) {\n    tbb::parallel_deterministic_reduce( range, body, partiotioner );\n}\n\ntemplate <typename Range, typename Body>\nvoid deterministic_reduce_invoker(const Range& range, Body& body, const utils_default_partitioner&) {\n    tbb::parallel_deterministic_reduce( range, body );\n}\n\ntemplate <typename ResultType, typename Range, typename Func, typename Reduction, typename Partitioner>\nResultType deterministic_reduce_invoker(const Range& range, const Func& func, \n                                        const Reduction& reduction, const Partitioner& partiotioner) {\n    return tbb::parallel_deterministic_reduce( range, ResultType(), func, reduction, partiotioner );\n}\n\ntemplate <typename ResultType, typename Range, typename Func, typename Reduction>\nResultType deterministic_reduce_invoker(const Range& range, const Func& func, \n                                        const Reduction& reduction, const utils_default_partitioner&) {\n    return tbb::parallel_deterministic_reduce( range, ResultType(), func, reduction );\n}\n\n#endif // __TBB_test_common_parallel_reduce_common_H\n"
  },
  {
    "path": "third-party/tbb/test/common/range_based_for_support.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_range_based_for_support_H\n#define __TBB_test_common_range_based_for_support_H\n\n#include \"config.h\"\n\n#include <utility>\n\nnamespace range_based_for_support_tests {\n\ntemplate <typename ValueType, typename Container, typename BinaryAccumulator, typename InitValueType>\ninline InitValueType range_based_for_accumulate( const Container& c, BinaryAccumulator accumulator, InitValueType init ) {\n    InitValueType range_based_for_accumulated = init;\n\n    for (ValueType x : c) {\n        range_based_for_accumulated = accumulator(range_based_for_accumulated, x);\n    }\n    return range_based_for_accumulated;\n}\n\ntemplate <typename Container, typename BinaryAccumulator, typename InitValueType>\ninline InitValueType range_based_for_accumulate( const Container& c, BinaryAccumulator accumulator, InitValueType init ) {\n    return range_based_for_accumulate<typename Container::value_type>(c, accumulator, init);\n}\n\ntemplate <typename IntegralType>\nIntegralType gauss_summ_of_int_sequence( IntegralType sequence_length ) {\n    return (sequence_length + 1) * sequence_length / 2;\n}\n\nstruct UnifiedSummer {\n    template <typename T>\n    T operator()( const T& lhs, const T& rhs ) {\n        return lhs + rhs;\n    }\n\n    template <typename T, typename U>\n    U operator()( const U& lhs, const std::pair<T, U>& rhs ) {\n        return lhs + rhs.second;\n    }\n}; // struct UnifiedSummer\n\nstruct pair_second_summer{\n    template <typename first_type, typename second_type>\n    second_type operator() (second_type const& lhs, std::pair<first_type, second_type> const& rhs) const\n    {\n        return lhs + rhs.second;\n    }\n};\n\n} // namespace range_based_for_support_tests\n\n#endif // __TBB_test_common_range_based_for_support_H\n"
  },
  {
    "path": "third-party/tbb/test/common/rwm_upgrade_downgrade.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_rwm_upgrade_downgrade_H\n#define __TBB_test_common_rwm_upgrade_downgrade_H\n\n#include \"test.h\"\n#include \"utils.h\"\n#include <atomic>\n\nstatic std::atomic<std::size_t> Count;\n\n// A body object for NativeParallelFor\ntemplate <typename RWMutex>\nstruct Hammer : utils::NoAssign {\n    RWMutex& mutex_protecting_count;\n    mutable volatile int dummy;\n\n    Hammer( RWMutex& m ) : mutex_protecting_count(m) {}\n\n    void operator()( std::size_t ) const {\n        for (int j = 0; j < 10000; ++j) {\n            // Acquire for reading\n            typename RWMutex::scoped_lock lock(mutex_protecting_count, false);\n\n            std::size_t c = Count;\n            utils::doDummyWork(10);\n            if (lock.upgrade_to_writer()) {\n                REQUIRE_MESSAGE(c == Count, \"Another thread modified Count while holding read lock\");\n            } else {\n                c = Count;\n            }\n\n            for (int k = 0; k < 10; ++k) {\n                ++Count;\n            }\n            lock.downgrade_to_reader();\n            utils::doDummyWork(10);\n        }\n    }\n}; // struct Hammer\n\ntemplate <typename RWMutex>\nvoid test_rwm_upgrade_downgrade() {\n    RWMutex rw_mutex;\n    for (auto p = utils::MinThread; p <= utils::MaxThread; ++p) {\n        Count = 0;\n        utils::NativeParallelFor(p, Hammer<RWMutex>(rw_mutex));\n    }\n}\n\n#endif // __TBB_test_common_rwm_upgrade_downgrade_H\n"
  },
  {
    "path": "third-party/tbb/test/common/spin_barrier.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_spin_barrier_H\n#define __TBB_test_common_spin_barrier_H\n\n#include \"config.h\"\n\n// Do not replace this include by doctest.h\n// This headers includes inside benchmark.h and used for benchmarking based on Celero\n// Using of both DocTest and Celero frameworks caused unexpected compilation errors.\n#include \"utils_assert.h\"\n#include \"utils_yield.h\"\n\n#include \"oneapi/tbb/detail/_machine.h\"\n#include \"oneapi/tbb/detail/_utils.h\"\n#include \"oneapi/tbb/tick_count.h\"\n\n#include <atomic>\n#include <thread>\n\nnamespace utils {\n\n//! Spin WHILE predicate returns true\ntemplate <typename Predicate>\nvoid SpinWaitWhile(Predicate pred) {\n    int count = 0;\n    while (pred()) {\n        if (count < 100) {\n            tbb::detail::machine_pause(10);\n            ++count;\n        } else if (count < 200) {\n            utils::yield();\n            ++count;\n        } else {\n            std::this_thread::sleep_for(std::chrono::microseconds(count/100));\n            if (count < 10000) {\n                count += 100;\n            }\n        }\n    }\n}\n\n//! Spin WHILE the condition is true.\ntemplate <typename T, typename C>\nvoid SpinWaitWhileCondition(const std::atomic<T>& location, C comp) {\n    SpinWaitWhile([&] { return comp(location.load(std::memory_order_acquire)); });\n}\n\n//! Spin WHILE the value of the variable is equal to a given value\n/** T and U should be comparable types. */\ntemplate <typename T, typename U>\nvoid SpinWaitWhileEq(const std::atomic<T>& location, const U value) {\n    SpinWaitWhileCondition(location, [&value](T t) { return t == value; });\n}\n\n//! Spin UNTIL the value of the variable is equal to a given value\n/** T and U should be comparable types. */\ntemplate<typename T, typename U>\nvoid SpinWaitUntilEq(const std::atomic<T>& location, const U value) {\n    SpinWaitWhileCondition(location, [&value](T t) { return t != value; });\n}\n\nclass WaitWhileEq {\npublic:\n    //! Assignment not allowed\n    void operator=( const WaitWhileEq& ) = delete;\n\n    template<typename T, typename U>\n    void operator()( const std::atomic<T>& location, U value ) const {\n        SpinWaitWhileEq(location, value);\n    }\n};\n\nclass SpinBarrier {\npublic:\n    using size_type = std::size_t;\nprivate:\n    size_type myNumThreads;\n    std::atomic<size_type> myNumThreadsFinished; // reached the barrier in this epoch\n    // the number of times the barrier was opened\n    std::atomic<size_type> myEpoch;\n    std::atomic<size_type> myLifeTimeGuard;\n    // a throwaway barrier can be used only once, then wait() becomes a no-op\n    bool myThrowaway;\n\n    struct DummyCallback {\n        void operator() () const {}\n        template<typename T, typename U>\n        void operator()( const T&, U) const {}\n    };\n\npublic:\n    SpinBarrier( const SpinBarrier& ) = delete;    // no copy ctor\n    SpinBarrier& operator=( const SpinBarrier& ) = delete; // no assignment\n\n    ~SpinBarrier() {\n        while (myLifeTimeGuard.load(std::memory_order_acquire)) {}\n    }\n\n    SpinBarrier( size_type nthreads = 0, bool throwaway = false ) {\n        initialize(nthreads, throwaway);\n    }\n\n    void initialize( size_type nthreads, bool throwaway = false ) {\n        myNumThreads = nthreads;\n        myNumThreadsFinished = 0;\n        myEpoch = 0;\n        myThrowaway = throwaway;\n        myLifeTimeGuard = 0;\n    }\n\n    // Returns whether this thread was the last to reach the barrier.\n    // onWaitCallback is called by a thread for waiting;\n    // onOpenBarrierCallback is called by the last thread before unblocking other threads.\n    template<typename WaitEq, typename Callback>\n    bool customWait( const WaitEq& onWaitCallback, const Callback& onOpenBarrierCallback ) {\n        if (myThrowaway && myEpoch) {\n            return false;\n        }\n\n        size_type epoch = myEpoch.load(std::memory_order_relaxed);\n        int threadsLeft = static_cast<int>(myNumThreads - myNumThreadsFinished.fetch_add(1, std::memory_order_release) - 1);\n        ASSERT(threadsLeft >= 0,\"Broken barrier\");\n        if (threadsLeft > 0) {\n            /* this thread is not the last; wait until the epoch changes & return false */\n            onWaitCallback(myEpoch, epoch); // acquire myEpoch\n            myLifeTimeGuard.fetch_sub(1, std::memory_order_release);\n            return false;\n        }\n        /* reset the barrier, increment the epoch, and return true */\n        threadsLeft = static_cast<int>(myNumThreadsFinished.fetch_sub(myNumThreads, std::memory_order_acquire) - myNumThreads);\n        ASSERT(threadsLeft == 0,\"Broken barrier\");\n        /* This thread is the last one at the barrier in this epoch */\n        onOpenBarrierCallback();\n        /* wakes up threads waiting to exit in this epoch */\n        myLifeTimeGuard.fetch_add(myNumThreads - 1, std::memory_order_relaxed);\n        epoch -= myEpoch.fetch_add(1, std::memory_order_release);\n        ASSERT(epoch == 0,\"Broken barrier\");\n        return true;\n    }\n\n    // onOpenBarrierCallback is called by the last thread before unblocking other threads.\n    template<typename Callback>\n    bool wait( const Callback& onOpenBarrierCallback ) {\n        return customWait(WaitWhileEq(), onOpenBarrierCallback);\n    }\n\n    bool wait() {\n        return wait(DummyCallback());\n    }\n\n    // Signal to the barrier, rather a semaphore functionality.\n    bool signalNoWait() {\n        return customWait(DummyCallback(), DummyCallback());\n    }\n};\n\n} // utils\n\n#endif // __TBB_test_common_spin_barrier_H\n"
  },
  {
    "path": "third-party/tbb/test/common/state_trackable.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_state_trackable_H\n#define __TBB_test_common_state_trackable_H\n\n#include \"common/test.h\"\n#include <map>\n#include <atomic>\n\n// Declarations for a class that can track operations applied to its objects.\n\nstruct StateTrackableBase {\n    enum StateValue {\n        ZeroInitialized     = 0,\n        DefaultInitialized  = 0xDEFAUL,\n        DirectInitialized   = 0xD1111,\n        CopyInitialized     = 0xC0314,\n        MoveInitialized     = 0xAAAAA,\n        CopyAssigned        = 0x11AED,\n        MoveAssigned        = 0x22AED,\n        MovedFrom           = 0xFFFFF,\n        Destroyed           = 0xDEADF00,\n        Unspecified         = 0xEEEEE\n    };\n\n    class State {\n    public:\n        State() noexcept : state(Unspecified) {}\n\n        State( const State& s ) : state(Unspecified) {\n            assign_new_state(s.state);\n        }\n\n        State( StateValue s ) noexcept : state(Unspecified) {\n            assign_new_state(s);\n        }\n\n        State& operator=( const State& st ) noexcept {\n            assign_new_state(st.state);\n            return *this;\n        }\n\n        State& operator=( StateValue s ) noexcept {\n            assign_new_state(s);\n            return *this;\n        }\n\n        operator StateValue() const noexcept { return state; }\n    private:\n        void assign_new_state( StateValue s ) noexcept;\n        StateValue state;\n    }; // class State\n}; // struct StateTrackableBase\n\nstruct StateTrackableCounters {\n    static void reset() {\n        counters[StateTrackableBase::ZeroInitialized] = counters[StateTrackableBase::DefaultInitialized] =\n        counters[StateTrackableBase::DirectInitialized] = counters[StateTrackableBase::CopyInitialized] =\n        counters[StateTrackableBase::MoveInitialized] = counters[StateTrackableBase::CopyAssigned] =\n        counters[StateTrackableBase::MoveAssigned] = counters[StateTrackableBase::MovedFrom] =\n        counters[StateTrackableBase::Destroyed] = counters[StateTrackableBase::Unspecified] = 0;\n    }\n\n    static bool initialize() {\n        reset();\n        return true;\n    }\n\n    using counters_type = std::map<StateTrackableBase::StateValue, std::atomic<std::size_t>>;\n    static counters_type counters;\n}; // struct StateTrackableCounters\n\nStateTrackableCounters::counters_type StateTrackableCounters::counters;\nstatic const bool state_initialized = StateTrackableCounters::initialize();\n\nvoid StateTrackableBase::State::assign_new_state( StateValue s ) noexcept {\n    CHECK_FAST_MESSAGE(state_initialized, \"State trackable counters are not initialized\");\n    CHECK_FAST_MESSAGE((s == StateTrackableBase::Unspecified ||\n                     StateTrackableCounters::counters.find(s) != StateTrackableCounters::counters.end()),\n                     \"Current state value is unknown\");\n    CHECK_FAST_MESSAGE((state == StateTrackableBase::Unspecified ||\n                     StateTrackableCounters::counters.find(state) != StateTrackableCounters::counters.end()),\n                     \"New state value is unknown\");\n    state = s;\n    ++StateTrackableCounters::counters[state];\n}\n\ntemplate <bool AllowZeroInitialized = false>\nstruct StateTrackable : StateTrackableBase {\n    static constexpr bool allow_zero_initialized = AllowZeroInitialized;\n\n    bool is_valid() const {\n        return state == DefaultInitialized || state == DirectInitialized || state == CopyInitialized ||\n               state == MoveInitialized || state == CopyAssigned || state == MoveAssigned || state == MovedFrom ||\n               (allow_zero_initialized && state == ZeroInitialized);\n    }\n\n    StateTrackable( intptr_t ) noexcept : state(DirectInitialized) {}\n    StateTrackable() noexcept : state(DefaultInitialized) {}\n\n    StateTrackable( const StateTrackable& src ) noexcept : state(CopyInitialized) {\n        CHECK_FAST_MESSAGE(src.is_valid(), \"Bad source for copy ctor\");\n    }\n\n    StateTrackable( StateTrackable&& src ) noexcept : state(MoveInitialized) {\n        CHECK_FAST_MESSAGE(src.is_valid(), \"Bad source for move ctor\");\n        src.state = MovedFrom;\n    }\n\n    StateTrackable& operator=( const StateTrackable& src ) noexcept {\n        CHECK_FAST_MESSAGE(is_valid(), \"Copy assignment to invalid instance\");\n        CHECK_FAST_MESSAGE(src.is_valid(), \"Bad source for copy assignment\");\n        state = CopyAssigned;\n        return *this;\n    }\n\n    StateTrackable& operator=( StateTrackable&& src ) noexcept {\n        CHECK_FAST_MESSAGE(is_valid(), \"Move assignment to invalid instance\");\n        CHECK_FAST_MESSAGE(src.is_valid(), \"Bad source for move assignment\");\n        state = MoveAssigned;\n        src.state = MovedFrom;\n        return *this;\n    }\n\n    ~StateTrackable() noexcept {\n        CHECK_FAST_MESSAGE(is_valid(), \"Calling destructor on invalid instance. (May be twice)\");\n        state = Destroyed;\n    }\n\n    State state;\n}; // struct StateTrackable\n\ntemplate <StateTrackableBase::StateValue desired_state, bool allow_zero_initialized>\nbool is_state( const StateTrackable<allow_zero_initialized>& f ) {\n    return f.state == desired_state;\n}\n\ntemplate <StateTrackableBase::StateValue desired_state>\nstruct is_not_state_predicate {\n    template <bool allow_zero_initialized>\n    bool operator()( const StateTrackable<allow_zero_initialized>& f ) {\n        return !is_state<desired_state>(f);\n    }\n\n    // To operate with the associative containers\n    template <typename T, typename U>\n    bool operator()( const std::pair<T, U>& p ) {\n        return !is_state<desired_state>(p.second);\n    }\n};\n\ntemplate <StateTrackableBase::StateValue desired_state>\nstruct is_state_predicate {\n    template <bool allow_zero_initialized>\n    bool operator()( const StateTrackable<allow_zero_initialized>& f ) {\n        return is_state<desired_state>(f);\n    }\n\n    template <typename T, typename U>\n    bool operator()( const std::pair<T, U>& p ) {\n        return is_state<desired_state>(p.second);\n    }\n};\n\n#endif // __TBB_test_common_state_trackable_H\n"
  },
  {
    "path": "third-party/tbb/test/common/test.h",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_test_H\n#define __TBB_test_common_test_H\n\n#include \"config.h\"\n\n#if !defined(DOCTEST_CONFIG_IMPLEMENT)\n#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN\n#endif\n#if TBB_USE_EXCEPTIONS\n#define TBB_TEST_THROW(x) throw x\n#else\n#define DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS\n#define TBB_TEST_THROW(x) FAIL(\"Exceptions are disabled\")\n#endif\n\n#include \"doctest.h\"\n\n#define CHECK_FAST(x) do { if (!(x)) { CHECK(false); } } while((void)0, 0)\n#define CHECK_FAST_MESSAGE(x, y) do { if (!(x)) { CHECK_MESSAGE(false, y); } } while((void)0, 0)\n\n#endif // __TBB_test_common_test_H\n"
  },
  {
    "path": "third-party/tbb/test/common/test_comparisons.h",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_test_comparisons_H\n#define __TBB_test_common_test_comparisons_H\n\n#include \"test.h\"\n\n#ifndef __TBB_TEST_CPP20_COMPARISONS\n#define __TBB_TEST_CPP20_COMPARISONS __TBB_CPP20_COMPARISONS_PRESENT\n#endif\n\n#if __TBB_TEST_CPP20_COMPARISONS\n#include <compare>\n#endif\n\nnamespace comparisons_testing {\n\ntemplate <bool ExpectEqual, bool ExpectLess, typename T>\nvoid testTwoWayComparisons( const T& lhs, const T& rhs ) {\n    REQUIRE_MESSAGE(((lhs < rhs) == ExpectLess),\n                    \"Incorrect 2-way comparison result for less operation\");\n    REQUIRE_MESSAGE(((lhs <= rhs) == (ExpectLess || ExpectEqual)),\n                    \"Incorrect 2-way comparison result for less or equal operation\");\n    bool ExpectGreater = ExpectEqual ? false : !ExpectLess;\n    REQUIRE_MESSAGE(((lhs > rhs) == ExpectGreater),\n                    \"Incorrect 2-way comparison result for greater operation\");\n    REQUIRE_MESSAGE(((lhs >= rhs) == (ExpectGreater || ExpectEqual)),\n                    \"Incorrect 2-way comparison result for greater or equal operation\");\n}\n\ntemplate <bool ExpectEqual, typename T>\nvoid testEqualityComparisons( const T& lhs, const T& rhs ) {\n    REQUIRE_MESSAGE((lhs == rhs) == ExpectEqual,\n                    \"Incorrect 2-way comparison result for equal operation\");\n    REQUIRE_MESSAGE((lhs != rhs) == !ExpectEqual,\n                    \"Incorrect 2-way comparison result for unequal operation\");\n}\n\n#if __TBB_TEST_CPP20_COMPARISONS\ntemplate <bool ExpectEqual, bool ExpectLess, typename T>\nvoid testThreeWayComparisons( const T& lhs, const T& rhs ) {\n    auto three_way_result = lhs <=> rhs;\n    REQUIRE_MESSAGE((three_way_result < 0) == ExpectLess,\n                    \"Incorrect 3-way comparison result for less operation\");\n    REQUIRE_MESSAGE((lhs <=> rhs <= 0) == (ExpectLess || ExpectEqual),\n                    \"Incorrect 3-way comparison result for less or equal operation\");\n    bool ExpectGreater = ExpectEqual ? false : !ExpectLess;\n    REQUIRE_MESSAGE((lhs <=> rhs > 0) == ExpectGreater,\n                    \"Incorrect 3-way comparison result for greater operation\");\n    REQUIRE_MESSAGE((lhs <=> rhs >= 0) == (ExpectGreater || ExpectEqual),\n                    \"Incorrect 3-way comparison result for greater or equal operation\");\n    REQUIRE_MESSAGE((lhs <=> rhs == 0) == ExpectEqual,\n                    \"Incorrect 3-way comparison result for equal operation\");\n    REQUIRE_MESSAGE((lhs <=> rhs != 0) == !ExpectEqual,\n                    \"Incorrect 3-way comparison result for unequal operation\");\n}\n\n#endif // __TBB_TEST_CPP20_COMPARISONS\n\ntemplate <bool ExpectEqual, bool ExpectLess, typename T>\nvoid testEqualityAndLessComparisons( const T& lhs, const T& rhs ) {\n    testEqualityComparisons<ExpectEqual>(lhs, rhs);\n    testTwoWayComparisons<ExpectEqual, ExpectLess>(lhs, rhs);\n#if __TBB_TEST_CPP20_COMPARISONS\n    testThreeWayComparisons<ExpectEqual, ExpectLess>(lhs, rhs);\n#endif\n}\n\nclass TwoWayComparable {\npublic:\n    TwoWayComparable() : n(0) {\n        reset();\n    }\n\n    TwoWayComparable( std::size_t num ) : n(num) {\n        reset();\n    }\n\n    static void reset() {\n        equal_called = false;\n        unequal_called = false;\n        less_called = false;\n        greater_called = false;\n        less_or_equal_called = false;\n        greater_or_equal_called = false;\n    }\n\n    static bool equal_called;\n    static bool unequal_called;\n    static bool less_called;\n    static bool greater_called;\n    static bool less_or_equal_called;\n    static bool greater_or_equal_called;\n\n    friend bool operator==( const TwoWayComparable& lhs, const TwoWayComparable& rhs ) {\n        equal_called = true;\n        return lhs.n == rhs.n;\n    }\n\n    friend bool operator!=( const TwoWayComparable& lhs, const TwoWayComparable& rhs ) {\n        unequal_called = true;\n        return lhs.n != rhs.n;\n    }\n\n    friend bool operator<( const TwoWayComparable& lhs, const TwoWayComparable& rhs ) {\n        less_called = true;\n        return lhs.n < rhs.n;\n    }\n\n    friend bool operator>( const TwoWayComparable& lhs, const TwoWayComparable& rhs ) {\n        greater_called = true;\n        return lhs.n > rhs.n;\n    }\n\n    friend bool operator<=( const TwoWayComparable& lhs, const TwoWayComparable& rhs ) {\n        less_or_equal_called = true;\n        return lhs.n <= rhs.n;\n    }\n\n    friend bool operator>=( const TwoWayComparable& lhs, const TwoWayComparable& rhs ) {\n        greater_or_equal_called = true;\n        return lhs.n >= rhs.n;\n    }\n\nprotected:\n    std::size_t n;\n\n    friend struct std::hash<TwoWayComparable>;\n}; // struct TwoWayComparable\n\nbool TwoWayComparable::equal_called = false;\nbool TwoWayComparable::unequal_called = false;\nbool TwoWayComparable::less_called = false;\nbool TwoWayComparable::greater_called = false;\nbool TwoWayComparable::less_or_equal_called = false;\nbool TwoWayComparable::greater_or_equal_called = false;\n\n// This function should be executed after comparing two objects, containing TwoWayComparables\n// using one of the comparison operators (<=>, <, >, <=, >=)\nvoid check_two_way_comparison() {\n    REQUIRE_MESSAGE(TwoWayComparable::less_called,\n                    \"operator < was not called during the comparison\");\n    REQUIRE_MESSAGE(!TwoWayComparable::greater_called,\n                    \"operator > was called during the comparison\");\n    REQUIRE_MESSAGE(!TwoWayComparable::less_or_equal_called,\n                    \"operator <= was called during the comparison\");\n    REQUIRE_MESSAGE(!TwoWayComparable::greater_or_equal_called,\n                    \"operator >= was called during the comparison\");\n    REQUIRE_MESSAGE(!(TwoWayComparable::equal_called),\n                    \"operator == was called during the comparison\");\n    REQUIRE_MESSAGE(!(TwoWayComparable::unequal_called),\n                    \"operator == was called during the comparison\");\n    TwoWayComparable::reset();\n}\n\n// This function should be executed after comparing two objects, containing TwoWayComparables\n// using operator == or !=\nvoid check_equality_comparison() {\n    REQUIRE_MESSAGE(TwoWayComparable::equal_called,\n                    \"operator == was not called during the comparison\");\n    REQUIRE_MESSAGE(!(TwoWayComparable::unequal_called),\n                    \"operator != was called during the comparison\");\n    TwoWayComparable::reset();\n}\n\n#if __TBB_TEST_CPP20_COMPARISONS\nclass ThreeWayComparable : public TwoWayComparable {\npublic:\n    ThreeWayComparable() : TwoWayComparable() { reset(); }\n\n    ThreeWayComparable( std::size_t num ) : TwoWayComparable(num) { reset(); }\n\n    static void reset() {\n        TwoWayComparable::reset();\n        three_way_called = false;\n    }\n\n    static bool three_way_called;\n\n    friend auto operator<=>( const ThreeWayComparable& lhs, const ThreeWayComparable& rhs ) {\n        three_way_called = true;\n        return lhs.n <=> rhs.n;\n    }\n\n    friend bool operator==( const ThreeWayComparable&, const ThreeWayComparable& ) = default;\n}; // class ThreeWayComparable\n\nbool ThreeWayComparable::three_way_called = false;\n\n// This function should be executed after comparing objects, containing ThreeWayComparables\n// using one of the comparison operators (<=>, <, >, <=, >=)\nvoid check_three_way_comparison() {\n    REQUIRE_MESSAGE(ThreeWayComparable::three_way_called, \"operator <=> was not called during the comparison\");\n    REQUIRE_MESSAGE(!ThreeWayComparable::less_called, \"operator < was called during the comparison\");\n    REQUIRE_MESSAGE(!ThreeWayComparable::greater_called, \"operator > was called during the comparison\");\n    REQUIRE_MESSAGE(!ThreeWayComparable::less_or_equal_called, \"operator <= was called during the comparison\");\n    REQUIRE_MESSAGE(!ThreeWayComparable::greater_or_equal_called, \"operator >= was called during the comparison\");\n    ThreeWayComparable::reset();\n}\n\n// Required for testing synthesized_three_way_comparison\nclass ThreeWayComparableOnly {\npublic:\n    ThreeWayComparableOnly() : n(0) {}\n    ThreeWayComparableOnly( std::size_t num ) : n(num) {}\n\n    friend auto operator<=>( const ThreeWayComparableOnly& lhs, const ThreeWayComparableOnly& rhs ) {\n        return lhs.n <=> rhs.n;\n    }\n    friend bool operator==( const ThreeWayComparableOnly& lhs, const ThreeWayComparableOnly& rhs ) {\n        return lhs.n == rhs.n;\n    }\nprivate:\n    std::size_t n;\n}; // class ThreeWayComparableOnly\n\n// Required for testing synthesized_three_way_comparison\nclass LessComparableOnly {\npublic:\n    LessComparableOnly() : n(0) {}\n    LessComparableOnly( std::size_t num ) : n(num) {}\n\n    friend bool operator<( const LessComparableOnly& lhs, const LessComparableOnly& rhs ) {\n        return lhs.n < rhs.n;\n    }\n    friend bool operator==( const LessComparableOnly& lhs, const LessComparableOnly& rhs ) {\n        return lhs.n == rhs.n;\n    }\nprivate:\n    std::size_t n;\n}; // class LessComparableOnly\n\n#endif // __TBB_TEST_CPP20_COMPARISONS\n} // namespace comparisons_testing\n\nnamespace std {\n\ntemplate <>\nstruct hash<comparisons_testing::TwoWayComparable> {\n    std::size_t operator()( const comparisons_testing::TwoWayComparable& val ) const {\n        return std::hash<std::size_t>{}(val.n);\n    }\n};\n\n} // namespace std\n\n#endif // __TBB_test_common_test_comparisons_H\n"
  },
  {
    "path": "third-party/tbb/test/common/test_follows_and_precedes_api.h",
    "content": "/*\n    Copyright (c) 2019-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_test_follows_and_precedes_api_H_\n#define __TBB_test_common_test_follows_and_precedes_api_H_\n\n#include \"config.h\"\n#include \"oneapi/tbb/flow_graph.h\"\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n#include <array>\n#include <vector>\n#include <type_traits>\n\nnamespace follows_and_precedes_testing{\n\ntemplate <typename NodeType>\nstruct testing_method_follows: std::integral_constant<int, 0> {};\n\ntemplate <typename... Args>\nstruct testing_method_follows<tbb::flow::join_node<Args...>> : std::integral_constant<int, 1> {};\ntemplate <typename... Args>\nstruct testing_method_follows<tbb::flow::continue_node<Args...>> : std::integral_constant<int, 1> {};\n\ntemplate <typename... Args>\nstruct testing_method_follows<tbb::flow::overwrite_node<Args...>> : std::integral_constant<int, 2> {};\ntemplate <typename... Args>\nstruct testing_method_follows<tbb::flow::write_once_node<Args...>> : std::integral_constant<int, 2> {};\n\ntemplate <typename... Args>\nstruct testing_method_follows<tbb::flow::multifunction_node<Args...>> : std::integral_constant<int, 3> {};\n\ntemplate <typename MessageType, typename NodeType, typename PredecessorType>\nclass edge_checker_follows {\npublic:\n    static void check(tbb::flow::graph& g,\n                      NodeType& node,\n                      std::array<PredecessorType, 3>& preds,\n                      std::array<MessageType, 3>& messages) {\n        check_impl(g, node, preds, messages, typename testing_method_follows<NodeType>::type());\n    }\nprivate:\n    // Test is applicable for: function_node, buffer_node, queue_node, priority_queue_node, limiter_node,\n    //                         broadcast_node, sequencer_node\n    static void check_impl(tbb::flow::graph& g,\n                           NodeType& node,\n                           std::array<PredecessorType, 3>& preds,\n                           std::array<MessageType, 3>& messages,\n                           std::integral_constant<int, 0>) {\n        tbb::flow::buffer_node<typename NodeType::output_type> buffer(g);\n        tbb::flow::make_edge(node, buffer);\n\n        for(size_t i = 0; i < 3; ++i) {\n            preds[i].try_put(messages[i]);\n            g.wait_for_all();\n\n            typename NodeType::output_type storage;\n            CHECK_MESSAGE((buffer.try_get(storage) && !buffer.try_get(storage)), \"Not exact edge quantity was made\");\n        }\n    }\n    // Test is applicable for: continue_node, join_node\n    static void check_impl(tbb::flow::graph& g,\n                           NodeType& node,\n                           std::array<PredecessorType, 3>& preds,\n                           std::array<MessageType, 3>& messages,\n                           std::integral_constant<int, 1>) {\n        tbb::flow::buffer_node<typename NodeType::output_type> buffer(g);\n        tbb::flow::make_edge(node, buffer);\n\n        for(size_t i = 0; i < 3; ++i) {\n            preds[i].try_put(messages[i]);\n            g.wait_for_all();\n        }\n\n        typename NodeType::output_type storage;\n        CHECK_MESSAGE((buffer.try_get(storage) && !buffer.try_get(storage)), \"Not exact edge quantity was made\");\n    }\n    // Test is applicable for: overwrite_node, write_once_node\n    static void check_impl(tbb::flow::graph& g,\n                           NodeType& node,\n                           std::array<PredecessorType, 3>& preds,\n                           std::array<MessageType, 3>& messages,\n                           std::integral_constant<int, 2>) {\n        for(size_t i = 0; i < 3; ++i) {\n            node.clear();\n            preds[i].try_put(messages[i]);\n            g.wait_for_all();\n\n            typename NodeType::output_type storage;\n            CHECK_MESSAGE((node.try_get(storage)), \"Not exact edge quantity was made\");\n        }\n   }\n    // Test is applicable for: multifunction_node\n    static void check_impl(tbb::flow::graph& g,\n                           NodeType& node,\n                           std::array<PredecessorType, 3>& preds,\n                           std::array<MessageType, 3>& messages,\n                           std::integral_constant<int, 3>) {\n        typedef typename std::remove_reference<decltype(tbb::flow::output_port<0>(node))>::type multioutput;\n        tbb::flow::buffer_node<typename multioutput::output_type> buf(tbb::flow::follows(tbb::flow::output_port<0>(node)));\n\n        for(size_t i = 0; i < 3; ++i) {\n            preds[i].try_put(messages[i]);\n            g.wait_for_all();\n\n            typename multioutput::output_type storage;\n            CHECK_MESSAGE((buf.try_get(storage) && ! buf.try_get(storage)), \"Not exact edge quantity was made\");\n        }\n   }\n};\n\ntemplate <typename NodeType>\nstruct testing_method_precedes: std::integral_constant<int, 0> {};\n\ntemplate <typename... Args>\nstruct testing_method_precedes<tbb::flow::buffer_node<Args...>> : std::integral_constant<int, 1> {};\ntemplate <typename... Args>\nstruct testing_method_precedes<tbb::flow::queue_node<Args...>> : std::integral_constant<int, 1> {};\ntemplate <typename... Args>\nstruct testing_method_precedes<tbb::flow::priority_queue_node<Args...>> : std::integral_constant<int, 1> {};\ntemplate <typename... Args>\nstruct testing_method_precedes<tbb::flow::sequencer_node<Args...>> : std::integral_constant<int, 1> {};\n\ntemplate <typename... Args>\nstruct testing_method_precedes<tbb::flow::join_node<Args...>> : std::integral_constant<int, 2> {};\n\ntemplate <typename MessageType, typename NodeType>\nclass edge_checker_precedes {\n    using NodeOutputType = typename NodeType::output_type;\n    using SuccessorOutputType = typename tbb::flow::buffer_node<NodeOutputType>::output_type;\npublic:\n    static void check(tbb::flow::graph& g,\n                      NodeType& node,\n                      std::array<tbb::flow::buffer_node<NodeOutputType>, 3>& successors,\n                      std::vector<MessageType>& messages) {\n        check_impl(g, node, successors, messages, typename testing_method_precedes<NodeType>::type());\n    }\nprivate:\n    // Testing is applicable for: continue_node, function_node, overwrite_node, buffer_node,\n    //                            broadcast_node, write_once_node, limiter_node\n    static void check_impl(tbb::flow::graph& g,\n                           NodeType& node,\n                           std::array<tbb::flow::buffer_node<NodeOutputType>, 3>& successors,\n                           std::vector<MessageType>& messages,\n                           std::integral_constant<int, 0>) {\n        CHECK_MESSAGE((messages.size() == 1),\n               \"messages.size() has to be 1 to test nodes what broadcast message to all the successors\");\n\n        node.try_put(messages[0]);\n        g.wait_for_all();\n\n        SuccessorOutputType storage;\n        for(auto& successor: successors) {\n            CHECK_MESSAGE((successor.try_get(storage) && !successor.try_get(storage)),\n                    \"Not exact edge quantity was made\");\n        }\n    }\n    // Testing is applicable for: buffer_node, queue_node, priority_queue_node, sequencer_node\n    static void check_impl(tbb::flow::graph& g,\n                           NodeType& node,\n                           std::array<tbb::flow::buffer_node<typename NodeType::output_type>, 3>& successors,\n                           std::vector<MessageType>& messages,\n                           std::integral_constant<int, 1>) {\n        CHECK_MESSAGE((messages.size() == 3),\n               \"messages.size() has to be 3 to test nodes what send a message to the first available successor\");\n\n        tbb::flow::write_once_node<SuccessorOutputType>\n            buffer(tbb::flow::follows(successors[0], successors[1], successors[2]));\n\n        for(size_t i = 0; i < 3; ++i) {\n            node.try_put(messages[i]);\n            g.wait_for_all();\n\n            SuccessorOutputType storage;\n            CHECK_MESSAGE((buffer.try_get(storage)), \"Not exact edge quantity was made\");\n\n            buffer.clear();\n        }\n    }\n    // Testing is applicable for: join_node\n    static void check_impl(tbb::flow::graph& g,\n                           NodeType& node,\n                           std::array<tbb::flow::buffer_node<typename NodeType::output_type>, 3>& successors,\n                           std::vector<MessageType>& messages,\n                           std::integral_constant<int, 2>) {\n        CHECK_MESSAGE((messages.size() == 3),\n               \"messages.size() has to be 3 to test nodes what send a message to the first available successor\");\n        std::array<tbb::flow::buffer_node<MessageType>, 3> preds = {\n\t  {\n\t    tbb::flow::buffer_node<MessageType>(g), \n\t    tbb::flow::buffer_node<MessageType>(g), \n\t    tbb::flow::buffer_node<MessageType>(g)\n\t  }\n\t};\n\n        make_edge(preds[0], tbb::flow::input_port<0>(node));\n        make_edge(preds[1], tbb::flow::input_port<1>(node));\n        make_edge(preds[2], tbb::flow::input_port<2>(node));\n\n        for(size_t i = 0; i < 3; ++i) {\n            preds[i].try_put(messages[i]);\n            g.wait_for_all();\n        }\n\n        typename NodeType::output_type storage;\n        for(auto& successor: successors) {\n            CHECK_MESSAGE((successor.try_get(storage) && !successor.try_get(storage)),\n            \"Not exact edge quantity was made\");\n        }\n    }\n};\n\ntemplate<typename MessageType,\n         typename NodeType,\n         typename PredecessorType=tbb::flow::broadcast_node<MessageType>,\n         typename... ConstructorArgs>\nvoid test_follows(std::array<MessageType, 3>& messages, ConstructorArgs&&... args) {\n    using namespace tbb::flow;\n\n    graph g;\n    std::array<PredecessorType, 3> preds = {\n        {\n            PredecessorType(g),\n            PredecessorType(g),\n            PredecessorType(g)\n        }\n    };\n\n    NodeType node(follows(preds[0], preds[1], preds[2]), std::forward<ConstructorArgs>(args)...);\n\n    edge_checker_follows<MessageType, NodeType, PredecessorType>::check(g, node, preds, messages);\n}\n\ntemplate<typename MessageType,\n         typename NodeType,\n         typename... ConstructorArgs>\nvoid test_precedes(std::vector<MessageType>& messages, ConstructorArgs&&... args) {\n    using namespace tbb::flow;\n\n    using SuccessorType = buffer_node<typename NodeType::output_type>;\n\n    graph g;\n\n    std::array<SuccessorType, 3> successors = { {SuccessorType(g), SuccessorType(g), SuccessorType(g)} };\n\n    NodeType node(precedes(successors[0], successors[1], successors[2]), std::forward<ConstructorArgs>(args)...);\n\n    edge_checker_precedes<MessageType, NodeType>::check(g, node, successors, messages);\n}\n\n} // follows_and_precedes_testing\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n#endif // __TBB_test_common_test_follows_and_precedes_api_H_\n"
  },
  {
    "path": "third-party/tbb/test/common/test_invoke.h",
    "content": "/*\n    Copyright (c) 2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_test_invoke_H\n#define __TBB_test_common_test_invoke_H\n\n#include \"test.h\"\n#include \"oneapi/tbb/flow_graph.h\"\n#include \"oneapi/tbb/blocked_range.h\"\n\n#if __TBB_CPP17_INVOKE_PRESENT\nnamespace test_invoke {\n\n// Can be customized\ntemplate <typename T>\nstd::size_t get_real_index(const T& obj) {\n    return obj;\n}\n\ntemplate <typename Value>\nclass SmartRange : public oneapi::tbb::blocked_range<Value> {\n    using base_range = oneapi::tbb::blocked_range<Value>;\npublic:\n    SmartRange(const Value& first, const Value& last) : base_range(first, last), change_vector(nullptr) {}\n    SmartRange(const Value& first, const Value& last, std::vector<std::size_t>& cv)\n        : base_range(first, last), change_vector(&cv) {}\n\n    SmartRange(const SmartRange&) = default;\n    SmartRange(SmartRange& other, oneapi::tbb::split)\n        : base_range(other, oneapi::tbb::split{}), change_vector(other.change_vector) {}\n\n    void increase() const {\n        CHECK_MESSAGE(change_vector, \"Attempt to operate with no associated vector\");\n        for (std::size_t index = get_real_index(this->begin()); index != get_real_index(this->end()); ++index) {\n            ++(*change_vector)[index];\n        }\n    }\n\n    Value reduction(const Value& idx) const {\n        Value result = idx;\n        for (std::size_t index = get_real_index(this->begin()); index != get_real_index(this->end()); ++index) {\n            result = result + Value(index);\n        }\n        return Value(result);\n    }\n\n    Value scan(const Value& idx, bool is_final_scan) const {\n        CHECK_MESSAGE(change_vector, \"Attempt to operate with no associated vector\");\n        Value result = idx;\n        for (std::size_t index = get_real_index(this->begin()); index != get_real_index(this->end()); ++index) {\n            result = result + Value(index);\n            if (is_final_scan) (*change_vector)[index] = get_real_index(result);\n        }\n        return result;\n    }\nprivate:\n    std::vector<std::size_t>* change_vector;\n};\n\ntemplate <typename IDType>\nclass SmartID {\npublic:\n    SmartID() : id(999), operate_signal_point(nullptr) {}\n    SmartID(std::size_t* sp) : id(999), operate_signal_point(sp) {}\n\n    SmartID(const IDType& n) : id(n), operate_signal_point(nullptr) {}\n    SmartID(const IDType& n, std::size_t* sp) : id(n), operate_signal_point(sp) {}\n\n    IDType get_id() const { return id; }\n    const IDType& get_id_ref() const { return id; }\n\nprivate:\n    template <typename TupleOfPorts, std::size_t... Is>\n    void send_id_impl(TupleOfPorts& ports, std::index_sequence<Is...>) const {\n        (std::get<Is>(ports).try_put(id) , ...);\n    }\npublic:\n    template <typename TupleOfPorts>\n    void send_id(TupleOfPorts& ports) const {\n        send_id_impl(ports, std::make_index_sequence<std::tuple_size<TupleOfPorts>::value>());\n    }\n\n    template <typename GatewayType>\n    void send_id_to_gateway(GatewayType& gateway) const {\n        gateway.reserve_wait();\n        gateway.try_put(id);\n        gateway.release_wait();\n    }\n\n    void operate() const {\n        CHECK_MESSAGE(operate_signal_point, \"incorrect test setup\");\n        ++(*operate_signal_point);\n    }\n\n    IDType id;\nprivate:\n    std::size_t* operate_signal_point;\n};\n\nclass SmartValue {\npublic:\n    SmartValue(std::size_t rv) : real_value(rv) {}\n    SmartValue(const SmartValue&) = default;\n    SmartValue& operator=(const SmartValue&) = default;\n\n    SmartValue operator+(const SmartValue& other) const {\n        return SmartValue{real_value + other.real_value};\n    }\n    std::size_t operator-(const SmartValue& other) const {\n        return real_value - other.real_value;\n    }\n\n    std::size_t get() const { return real_value; }\n\n    bool operator<(const SmartValue& other) const {\n        return real_value < other.real_value;\n    }\n\n    SmartValue& operator++() { ++real_value; return *this; }\nprivate:\n    std::size_t real_value;\n};\n\nstd::size_t get_real_index(const SmartValue& value) {\n    return value.get();\n}\n\n\n} // namespace test_invoke\n\n#endif // __TBB_CPP17_INVOKE_PRESENT\n#endif // __TBB_test_common_test_invoke_H\n"
  },
  {
    "path": "third-party/tbb/test/common/test_join_node_multiple_predecessors.h",
    "content": "/*\n    Copyright (c) 2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_test_join_node_multiple_predecessors_H_\n#define __TBB_test_common_test_join_node_multiple_predecessors_H_\n\n#include \"config.h\"\n#include \"oneapi/tbb/flow_graph.h\"\n\nnamespace multiple_predecessors {\n\nusing namespace tbb::flow;\n\nusing join_node_t = join_node<std::tuple<continue_msg, continue_msg, continue_msg>, reserving>;\nusing queue_node_t = queue_node<std::tuple<continue_msg, continue_msg, continue_msg>>;\n\nvoid twist_join_connections(\n    buffer_node<continue_msg>& bn1, buffer_node<continue_msg>& bn2, buffer_node<continue_msg>& bn3,\n    join_node_t& jn)\n{\n    // order, in which edges are created/destroyed, is important\n    make_edge(bn1, input_port<0>(jn));\n    make_edge(bn2, input_port<0>(jn));\n    make_edge(bn3, input_port<0>(jn));\n\n    remove_edge(bn3, input_port<0>(jn));\n    make_edge  (bn3, input_port<2>(jn));\n\n    remove_edge(bn2, input_port<0>(jn));\n    make_edge  (bn2, input_port<1>(jn));\n}\n\nstd::unique_ptr<join_node_t> connect_join_via_make_edge(\n    graph& g, buffer_node<continue_msg>& bn1, buffer_node<continue_msg>& bn2,\n    buffer_node<continue_msg>& bn3, queue_node_t& qn)\n{\n    std::unique_ptr<join_node_t> jn( new join_node_t(g) );\n    twist_join_connections( bn1, bn2, bn3, *jn );\n    make_edge(*jn, qn);\n    return jn;\n}\n\n#if TBB_PREVIEW_FLOW_GRAPH_FEATURES\nstd::unique_ptr<join_node_t> connect_join_via_follows(\n    graph&, buffer_node<continue_msg>& bn1, buffer_node<continue_msg>& bn2,\n    buffer_node<continue_msg>& bn3, queue_node_t& qn)\n{\n    auto bn_set = make_node_set(bn1, bn2, bn3);\n    std::unique_ptr<join_node_t> jn( new join_node_t(follows(bn_set)) );\n    make_edge(*jn, qn);\n    return jn;\n}\n\nstd::unique_ptr<join_node_t> connect_join_via_precedes(\n    graph&, buffer_node<continue_msg>& bn1, buffer_node<continue_msg>& bn2,\n    buffer_node<continue_msg>& bn3, queue_node_t& qn)\n{\n    auto qn_set = make_node_set(qn);\n    auto qn_copy_set = qn_set;\n    std::unique_ptr<join_node_t> jn( new join_node_t(precedes(qn_copy_set)) );\n    twist_join_connections( bn1, bn2, bn3, *jn );\n    return jn;\n}\n#endif // TBB_PREVIEW_FLOW_GRAPH_FEATURES\n\nvoid run_and_check(\n    graph& g, buffer_node<continue_msg>& bn1, buffer_node<continue_msg>& bn2,\n    buffer_node<continue_msg>& bn3, queue_node_t& qn, bool expected)\n{\n    std::tuple<continue_msg, continue_msg, continue_msg> msg;\n\n    bn1.try_put(continue_msg());\n    bn2.try_put(continue_msg());\n    bn3.try_put(continue_msg());\n    g.wait_for_all();\n\n    CHECK_MESSAGE(\n        (qn.try_get(msg) == expected),\n        \"Unexpected message absence/existence at the end of the graph.\"\n    );\n}\n\ntemplate<typename ConnectJoinNodeFunc>\nvoid test(ConnectJoinNodeFunc&& connect_join_node) {\n    graph g;\n    buffer_node<continue_msg> bn1(g);\n    buffer_node<continue_msg> bn2(g);\n    buffer_node<continue_msg> bn3(g);\n    queue_node_t qn(g);\n\n    auto jn = connect_join_node(g, bn1, bn2, bn3, qn);\n\n    run_and_check(g, bn1, bn2, bn3, qn, /*expected=*/true);\n\n    remove_edge(bn3, input_port<2>(*jn));\n    remove_edge(bn2, input_port<1>(*jn));\n    remove_edge(bn1, *jn); //Removes an edge between a sender and port 0 of a multi-input successor.\n    remove_edge(*jn, qn);\n\n    run_and_check(g, bn1, bn2, bn3, qn, /*expected=*/false);\n}\n} // namespace multiple_predecessors\n\n#endif // __TBB_test_common_test_join_node_multiple_predecessors_H_\n"
  },
  {
    "path": "third-party/tbb/test/common/tls_limit.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_tls_limit_H_\n#define __TBB_test_common_tls_limit_H_\n\n#include \"config.h\"\n\nclass LimitTLSKeysTo {\n#if _WIN32 || _WIN64\n    #if __TBB_WIN8UI_SUPPORT && !defined(TLS_OUT_OF_INDEXES)\n        // for SDKs for Windows*8 Store Apps that did not redirect TLS to FLS\n        #define TlsAlloc() FlsAlloc(nullptr)\n        #define TlsFree FlsFree\n        #define TLS_OUT_OF_INDEXES FLS_OUT_OF_INDEXES\n    #endif\n    typedef DWORD handle;\n#else // _WIN32 || _WIN64\n    typedef pthread_key_t handle;\n#endif\n    // for platforms that not limit number of TLS keys, set artificial limit\n    static const int LIMIT = 16*1024;\n    handle handles[LIMIT];\n    int    lastUsedIdx;\npublic:\n    LimitTLSKeysTo(int keep_keys) {\n        for (lastUsedIdx=0; lastUsedIdx<LIMIT; lastUsedIdx++) {\n#if _WIN32 || _WIN64\n            handle h = TlsAlloc();\n            if (h==TLS_OUT_OF_INDEXES)\n#else\n            int setspecific_dummy=10;\n            if (pthread_key_create(&handles[lastUsedIdx], nullptr)!=0)\n#endif\n            {\n                break;\n            }\n#if _WIN32 || _WIN64\n            handles[lastUsedIdx] = h;\n#else\n            pthread_setspecific(handles[lastUsedIdx], &setspecific_dummy);\n#endif\n        }\n        lastUsedIdx--;\n        REQUIRE_MESSAGE(lastUsedIdx >= keep_keys-1, \"Less TLS keys are available than requested\");\n        for (; keep_keys>0; keep_keys--, lastUsedIdx--) {\n#if _WIN32 || _WIN64\n            TlsFree(handles[lastUsedIdx]);\n#else\n            int ret = pthread_key_delete(handles[lastUsedIdx]);\n            REQUIRE_MESSAGE(!ret, \"Can't delete a key\");\n#endif\n        }\n        // REMARK(\"%d thread local objects allocated in advance\\n\", lastUsedIdx+1);\n    }\n    ~LimitTLSKeysTo() {\n        for (int i=0; i<=lastUsedIdx; i++) {\n#if _WIN32 || _WIN64\n            TlsFree(handles[i]);\n#else\n            int ret = pthread_key_delete(handles[i]);\n            REQUIRE_MESSAGE(!ret, \"Can't delete a key\");\n#endif\n        }\n        lastUsedIdx = 0;\n    }\n};\n#endif // __TBB_test_common_tls_limit_H_\n"
  },
  {
    "path": "third-party/tbb/test/common/utils.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_utils_H\n#define __TBB_test_common_utils_H\n\n#include \"config.h\"\n\n#include <oneapi/tbb/detail/_template_helpers.h>\n#include <oneapi/tbb/detail/_config.h>\n#include <oneapi/tbb/blocked_range.h>\n#include <thread>\n#include <type_traits>\n#include <memory>\n#include <array>\n#include <cstdint>\n#include <vector>\n#include <limits>\n#include <algorithm>\n#include <cstring>\n#include <chrono>\n#include <unordered_set>\n\n#if HARNESS_TBBMALLOC_THREAD_SHUTDOWN && __TBB_SOURCE_DIRECTLY_INCLUDED && (_WIN32 || _WIN64)\n#include \"../../src/tbbmalloc/tbbmalloc_internal_api.h\"\n#endif\n\n#include \"dummy_body.h\"\n#include \"utils_yield.h\"\n#include \"utils_assert.h\"\n\nnamespace utils {\n\n#define utils_fallthrough __TBB_fallthrough\n\nusing tbb::detail::try_call;\n\ntemplate<typename It>\ntypename std::iterator_traits<It>::value_type median(It first, It last) {\n    std::sort(first, last);\n    typename std::iterator_traits<It>::difference_type distance = std::distance(first, last);\n    std::advance(first, distance / 2 - 1);\n    if (distance % 2 == 0) {\n        // Wrote iterators in variables because of warning: <sequence-point>\n        auto curr_element = first;\n        auto next_element = ++first;\n        return typename std::iterator_traits<It>::value_type((*curr_element + *(++next_element)) / 2);\n    } else {\n        return typename std::iterator_traits<It>::value_type(*first);\n    }\n}\n\nstatic constexpr std::uint8_t MinThread = 1;\nstatic constexpr std::uint8_t MaxThread = 4;\n\n//! Simple native parallel loop where each iteration is executed in a different thread\ntemplate <typename Index, typename Body>\nvoid NativeParallelFor( Index Number, const Body& body ) {\n    std::vector<std::thread> thread_pool;\n    for (Index idx = 0; idx < Number; ++idx) {\n        thread_pool.emplace_back([&body, idx] {\n            body(idx);\n#if HARNESS_TBBMALLOC_THREAD_SHUTDOWN && __TBB_SOURCE_DIRECTLY_INCLUDED && (_WIN32 || _WIN64)\n            // in those cases can't release per-thread cache automatically, so do it manually\n            // TODO: investigate less-intrusive way to do it, for example via FLS keys\n            __TBB_mallocThreadShutdownNotification();\n#endif\n        });\n    }\n\n    for (auto& thread : thread_pool) {\n        thread.join();\n    }\n}\n\n//! Native parallel loop with grainsize (like tbb::blocked_range)\ntemplate <typename Index, typename Body>\nvoid NativeParallelFor( Index Number, Index block_size, const Body& body ) {\n    NativeParallelFor(Number / block_size, [block_size, &body] (Index idx) {\n        for (Index i = idx * block_size; i < (idx + 1) * block_size; ++i) {\n            body(i);\n        }\n    });\n}\n\n//! Utility template function to prevent \"unused\" warnings by various compilers.\ntemplate<typename... T> void suppress_unused_warning(T&&...) {}\n\nnamespace detail {\n\n    template <std::size_t size>\n    struct fixed_width_uint;\n\n    template <> struct fixed_width_uint<1>{ using type = uint8_t;  };\n    template <> struct fixed_width_uint<2>{ using type = uint16_t; };\n    template <> struct fixed_width_uint<4>{ using type = uint32_t; };\n    template <> struct fixed_width_uint<8>{ using type = uint64_t; };\n\n    template <typename In>\n    typename fixed_width_uint<sizeof(In)>::type fixed_width_cast(In in) {\n        return static_cast<typename fixed_width_uint<sizeof(In)>::type>(in);\n    }\n\n\n    static constexpr std::array<uint64_t, 64> Primes = {{\n        0x9e3779b13346320e, 0xffe6cc5974101cb7, 0x2109f6dd6aaac9c9, 0x43977ab5f3dbca42,\n        0xba5703f59405b746, 0xb495a877a86fb54e, 0xe1626741ae21caf5, 0x79695e6bc8febd31,\n        0xbc98c09f76a304e0, 0xd5bee2b3513a491d, 0x287488f9933e6cb9, 0x3af18231269a8b29,\n        0x9677cd4ddbc9d5b1, 0xbe3a6929ddd2a556, 0xadc6a877a2f30f00, 0xdcf0674bb6968d97,\n        0xbe4d6fe991c0538d, 0x5f15e201c9cc571e, 0x99afc3fd0f27f767, 0xf3f16801361d4489,\n        0xe222cfffee1eec74, 0x24ba5fdb21098d07, 0x0620452d45401c7f, 0x79f149e30a92241f,\n        0xc8b93f49e4fe3077, 0x972702cd3aac3d56, 0xb07dd827a9126d73, 0x6c97d5ed60811c65,\n        0x085a3d61d2e858f8, 0x46eb5ea7ce433ba1, 0x3d9910edfc8bb30a, 0x2e687b5b6226023c,\n        0x296092277d3fd038, 0x6eb081f199767dbe, 0x0954c4e114d147dd, 0x9d114db92a2a629a,\n        0x542acfa9232adfb9, 0xb3e6bd7bddd0e31e, 0x0742d917c18e24dc, 0xe9f3ffa78ba59fab,\n        0x54581edb3717eaf7, 0xf2480f45494a28c9, 0x0bb9288ff4884f1b, 0xef1affc7bb0a5916,\n        0x85fa0ca7da978b79, 0x3ccc14db2137131b, 0xe6baf34b9bb9ade8, 0x343377f7e00c0852,\n        0x5ca190311bef1612, 0xe6d9293bc4c93e07, 0xf0a9f391680e1894, 0x5d2e980bb090bd62,\n        0xfc41107323c82d43, 0xc3749363812d28e8, 0xb892d829b0357953, 0x3549366b9e23bb94,\n        0x629750ad007fd05c, 0xb98294e53416fada, 0x892d9483bb3deae3, 0xc235baf386c925e4,\n        0x3d2402a37346a4b0, 0x6bdef3c95be05f43, 0xbec333cd1928a169, 0x40c9520f59e003fa\n    }};\n}\n\n//! A fast random number generator.\n/* Uses linear congruential method. */\ntemplate <std::size_t size = 2>\nclass FastRandom {\npublic:\n    using result_type = typename ::utils::detail::fixed_width_uint<size>::type;\n\n    //! Construct a random number generator.\n    explicit FastRandom( uint64_t seed )\n      : my_seed(seed),\n        my_prime(detail::Primes[my_seed % detail::Primes.size()]) {}\n\n    static constexpr result_type max() {\n        return my_max;\n    }\n\n    static constexpr result_type min() {\n        return my_min;\n    }\n    //! Get a random number for the given seed; update the seed for next use.\n    result_type get( uint64_t seed ) {\n        result_type random_number = static_cast<result_type>(my_seed >> (64 - size * CHAR_BIT));\n        my_seed = seed * my_prime + 1;\n        return random_number;\n    }\n\n    //! Get a random number\n    result_type get( ) { return get(my_seed); }\n\n    result_type operator() () {\n        return static_cast<result_type>(my_seed >> (64 - size * CHAR_BIT)) % my_max;\n    }\n\nprivate:\n    uint64_t my_seed, my_prime;\n    static constexpr result_type my_max = std::numeric_limits<result_type>::max();\n    static constexpr result_type my_min = std::numeric_limits<result_type>::min();\n};\n\nnamespace iterator_type_traits {\n\ntemplate <typename T> using iterator_traits_value_type = typename std::iterator_traits<T>::value_type;\ntemplate <typename T> using iterator_traits_difference_type = typename std::iterator_traits<T>::difference_type;\ntemplate <typename T> using iterator_traits_pointer = typename std::iterator_traits<T>::pointer;\ntemplate <typename T> using iterator_traits_iterator_category = typename std::iterator_traits<T>::iterator_category;\n\nusing std::swap;\ntemplate <typename T> using is_swappable = decltype(swap(std::declval<T&>(), std::declval<T&>()));\n\ntemplate <typename T> using is_dereferenceable_by_asterisk = decltype(*std::declval<T>());\ntemplate <typename T> using is_dereferenceable_by_arrow = decltype(std::declval<T>().operator->());\ntemplate <typename T> using is_preincrementable = decltype(++std::declval<T>());\ntemplate <typename T> using is_postincrementable = decltype(std::declval<T>()++);\n\ntemplate <typename T> using is_equality_comparable = decltype(std::declval<T>() == std::declval<T>());\ntemplate <typename T> using is_unequality_comparable = decltype(std::declval<T>() != std::declval<T>());\n\ntemplate <typename T> using is_predecrementable = decltype(--std::declval<T>());\ntemplate <typename T> using is_postdecrementable = decltype(std::declval<T>()--);\n\ntemplate <typename T> using is_add_assignable = decltype(std::declval<T>() += std::declval<typename T::difference_type>());\ntemplate <typename T> using is_sub_assignable = decltype(std::declval<T>() -= std::declval<typename T::difference_type>());\n\ntemplate <typename T> using have_operator_plus = decltype(std::declval<T>() + std::declval<typename T::difference_type>());\ntemplate <typename T> using have_operator_minus = decltype(std::declval<T>() + std::declval<typename T::difference_type>());\n\ntemplate <typename T> using have_operator_access = decltype(std::declval<T>()[std::declval<typename T::difference_type>()]);\n\ntemplate <typename T> using have_operator_less = decltype(std::declval<T>() < std::declval<T>());\ntemplate <typename T> using have_operator_great = decltype(std::declval<T>() > std::declval<T>());\ntemplate <typename T> using have_operator_not_less = decltype(std::declval<T>() <= std::declval<T>());\ntemplate <typename T> using have_operator_not_great = decltype(std::declval<T>() >= std::declval<T>());\n\ntemplate <typename T>\nusing supports_iterator = tbb::detail::supports<T, iterator_traits_value_type,\n                                                   iterator_traits_difference_type,\n                                                   iterator_traits_pointer,\n                                                   iterator_traits_iterator_category,\n                                                   is_swappable,\n                                                   is_dereferenceable_by_asterisk,\n                                                   is_preincrementable>;\n\ntemplate <typename T>\nusing supports_input_iterator = tbb::detail::supports<T, is_equality_comparable,\n                                                         is_unequality_comparable,\n                                                         is_dereferenceable_by_arrow,\n                                                         is_postincrementable>;\ntemplate <typename T>\nusing supports_bidirectional_iterator = tbb::detail::supports<T, is_predecrementable,\n                                                                 is_postdecrementable>;\n\ntemplate <typename T>\nusing supports_random_access_iterator = tbb::detail::supports<T, is_add_assignable,\n                                                                 is_sub_assignable,\n                                                                 have_operator_plus,\n                                                                 have_operator_minus,\n                                                                 have_operator_access,\n                                                                 have_operator_less,\n                                                                 have_operator_great,\n                                                                 have_operator_not_less,\n                                                                 have_operator_not_great>;\n} // namespace iterator_type_traits\n\ntemplate <typename T>\nstruct is_iterator : std::integral_constant<bool,\n                                            std::is_copy_constructible<T>::value &&\n                                            std::is_copy_assignable<T>::value &&\n                                            std::is_destructible<T>::value &&\n                                            iterator_type_traits::supports_iterator<T>::value> {};\n\ntemplate <typename T>\nstruct is_input_iterator : std::integral_constant<bool,\n                                                  is_iterator<T>::value &&\n                                                  iterator_type_traits::supports_input_iterator<T>::value> {};\n\ntemplate <typename T>\nstruct is_forward_iterator : std::integral_constant<bool,\n                                                    is_input_iterator<T>::value &&\n                                                    std::is_default_constructible<T>::value> {};\n\ntemplate <typename T>\nstruct is_bidirectional_iterator : std::integral_constant<bool,\n                                                    is_forward_iterator<T>::value &&\n                                                    iterator_type_traits::supports_bidirectional_iterator<T>::value> {};\n\ntemplate <typename T>\nstruct is_random_access_iterator : std::integral_constant<bool,\n                                                    is_bidirectional_iterator<T>::value &&\n                                                    iterator_type_traits::supports_random_access_iterator<T>::value> {};\n// The function to zero-initialize arrays; useful to avoid warnings\ntemplate <typename T>\nvoid zero_fill( void* array, std::size_t n ) {\n    std::memset(array, 0, sizeof(T) * n);\n}\n\n//! Base class that asserts that no operations are made with the object after its destruction.\nclass NoAfterlife {\nprotected:\n    enum state_t {\n        LIVE = 0x56781234,\n        DEAD = 0xDEADBEEF\n    } m_state;\n\npublic:\n    NoAfterlife() : m_state(LIVE) {}\n    NoAfterlife(const NoAfterlife& src) : m_state(LIVE) {\n        CHECK_FAST_MESSAGE(src.IsLive(), \"Constructing from the dead source\");\n    }\n    ~NoAfterlife() {\n        CHECK_FAST_MESSAGE(IsLive(), \"Repeated destructor call\");\n        m_state = DEAD;\n    }\n    const NoAfterlife& operator=(const NoAfterlife& src) {\n        CHECK_FAST(IsLive());\n        CHECK_FAST(src.IsLive());\n        return *this;\n    }\n    void AssertLive() const {\n        CHECK_FAST_MESSAGE(IsLive(), \"Already dead\");\n    }\n    bool IsLive() const {\n        return m_state == LIVE;\n    }\n}; // NoAfterlife\n\n//! Base class for types that should not be assigned.\nclass NoAssign {\npublic:\n    NoAssign& operator=(const NoAssign&) = delete;\n    NoAssign(const NoAssign&) = default;\n    NoAssign() = default;\n};\n\n//! Base class for types that should not be copied or assigned.\nclass NoCopy : NoAssign {\npublic:\n    NoCopy(const NoCopy&) = delete;\n    NoCopy() = default;\n};\n\n//! Base class for objects which support move ctors\nclass Movable {\npublic:\n    Movable() : alive(true) {}\n    void Reset() { alive = true; }\n    Movable(Movable&& other) {\n        CHECK_MESSAGE(other.alive, \"Moving from a dead object\");\n        alive = true;\n        other.alive = false;\n    }\n    Movable& operator=(Movable&& other) {\n        CHECK_MESSAGE(alive, \"Assignment to a dead object\");\n        CHECK_MESSAGE(other.alive, \"Assignment of a dead object\");\n        other.alive = false;\n        return *this;\n    }\n    Movable& operator=(const Movable& other) {\n        CHECK_MESSAGE(alive, \"Assignment to a dead object\");\n        CHECK_MESSAGE(other.alive, \"Assignment of a dead object\");\n        return *this;\n    }\n    Movable(const Movable& other) {\n        CHECK_MESSAGE(other.alive, \"Const reference to a dead object\");\n        alive = true;\n    }\n    ~Movable() { alive = false; }\n    volatile bool alive;\n};\n\nclass MoveOnly : Movable, NoCopy {\npublic:\n    MoveOnly() : Movable() {}\n    MoveOnly(MoveOnly&& other) : Movable(std::move(other)) {}\n};\n\nvoid Sleep ( int ms ) {\n    std::chrono::milliseconds sleep_time( ms );\n    std::this_thread::sleep_for( sleep_time );\n}\n\ntemplate<typename T, typename U>\nauto max(const T& left, const U& right) -> decltype(left > right ? left : right)\n{\n    return left > right ? left : right;\n}\ntemplate<typename T, typename U>\nauto min(const T& left, const U& right) -> decltype(left < right ? left : right)\n{\n    return left < right ? left : right;\n}\n\ntemplate<typename T, std::size_t N>\ninline std::size_t array_length(const T(&)[N]) {\n    return N;\n}\n\n// TODO: consider adding a common comparator with member functions is_equal, is_less, is_greater, etc.\nstruct IsEqual {\n        template <typename T>\n        static bool compare( const std::weak_ptr<T> &t1, const std::weak_ptr<T> &t2 ) {\n            // Compare real pointers.\n            return t1.lock().get() == t2.lock().get();\n        }\n\n        template <typename T>\n        static bool compare( const std::unique_ptr<T> &t1, const std::unique_ptr<T> &t2 ) {\n            // Compare real values.\n            return *t1 == *t2;\n        }\n        template <typename T1, typename T2>\n        static bool compare( const std::pair< const std::weak_ptr<T1>, std::weak_ptr<T2> > &t1,\n                const std::pair< const std::weak_ptr<T1>, std::weak_ptr<T2> > &t2 ) {\n            // Compare real pointers.\n            return t1.first.lock().get() == t2.first.lock().get() &&\n                t1.second.lock().get() == t2.second.lock().get();\n        }\n        template <typename T1, typename T2>\n        static bool compare( const T1 &t1, const T2 &t2 ) {\n            return t1 == t2;\n        }\n        template <typename T1, typename T2>\n        bool operator()( T1 &t1, T2 &t2) const {\n            return compare( (const T1&)t1, (const T2&)t2 );\n        }\n}; // struct IsEqual\n\ntemplate <typename T, std::size_t N>\ntbb::blocked_range<T*> make_blocked_range( T(& array)[N] ) {\n    return tbb::blocked_range<T*>(array, array + N);\n}\n\ntemplate <typename T>\nvoid check_range_bounds_after_splitting( const tbb::blocked_range<T>& original, const tbb::blocked_range<T>& first,\n                                         const tbb::blocked_range<T>& second, const T& expected_first_end )\n{\n    REQUIRE(first.begin() == original.begin());\n    REQUIRE(first.end() == expected_first_end);\n    REQUIRE(second.begin() == expected_first_end);\n    REQUIRE(second.end() == original.end());\n    REQUIRE(first.size() + second.size() == original.size());\n}\n\ntemplate<typename M>\nstruct Counter {\n    using mutex_type = M;\n    M mutex;\n    volatile long value;\n};\n\ntemplate<typename M>\nstruct AtomicCounter {\n    using mutex_type = M;\n    M mutex;\n    std::atomic<long> value;\n};\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\ntemplate <template <typename...> class Template, typename... Types>\nconcept well_formed_instantiation = requires {\n    typename Template<Types...>;\n};\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n\nclass LifeTrackableObject {\n    using set_type = std::unordered_set<const LifeTrackableObject*>;\n    static set_type alive_objects;\npublic:\n    LifeTrackableObject() {\n        alive_objects.insert(this);\n    }\n\n    LifeTrackableObject(const LifeTrackableObject&) {\n        alive_objects.insert(this);\n    }\n\n    LifeTrackableObject(LifeTrackableObject&&) {\n        alive_objects.insert(this);\n    }\n\n    LifeTrackableObject& operator=(const LifeTrackableObject&) = default;\n    LifeTrackableObject& operator=(LifeTrackableObject&&) = default;\n\n    ~LifeTrackableObject() {\n        alive_objects.erase(this);\n    }\n\n    static bool is_alive(const LifeTrackableObject& object) {\n        return is_alive(&object);\n    }\n\n    static bool is_alive(const LifeTrackableObject* object) {\n        return alive_objects.find(object) != alive_objects.end();\n    }\n\n    static const set_type& set() {\n        return alive_objects;\n    }\n};\nstd::unordered_set<const LifeTrackableObject*> LifeTrackableObject::alive_objects{};\n\n} // namespace utils\n\n#endif // __TBB_test_common_utils_H\n"
  },
  {
    "path": "third-party/tbb/test/common/utils_assert.h",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_utils_assert_H\n#define __TBB_test_common_utils_assert_H\n\n#include \"config.h\"\n#include \"utils_report.h\"\n\n#include <cstdlib>\n\n#define REPORT_FATAL_ERROR REPORT\n\nnamespace utils {\n\nvoid ReportError( const char* filename, int line, const char* expression, const char * message ) {\n    print_call_stack();\n    REPORT_FATAL_ERROR(\"%s:%d, assertion %s: %s\\n\", filename, line, expression, message ? message : \"failed\" );\n\n    fflush(stdout); fflush(stderr);\n\n#if _MSC_VER && _DEBUG\n    if(1 == _CrtDbgReport(_CRT_ASSERT, filename, line, nullptr, \"%s\\r\\n%s\", expression, message?message:\"\"))\n        _CrtDbgBreak();\n#else\n    abort();\n#endif\n}\n\n//! Compile-time error if x and y have different types\ntemplate<typename T>\nvoid AssertSameType( const T& /*x*/, const T& /*y*/ ) {}\n\n} // utils\n\n#define ASSERT_CUSTOM(p,message,file,line)  ((p)?(void)0:utils::ReportError(file,line,#p,message))\n#define ASSERT(p,message)                   ASSERT_CUSTOM(p,message,__FILE__,__LINE__)\n\n#endif // __TBB_test_common_utils_assert_H\n"
  },
  {
    "path": "third-party/tbb/test/common/utils_concurrency_limit.h",
    "content": "/*\n    Copyright (c) 2020-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_utils_concurrency_limit_H\n#define __TBB_test_common_utils_concurrency_limit_H\n\n#include \"config.h\"\n#include \"utils_assert.h\"\n#include \"utils_report.h\"\n#include \"oneapi/tbb/task_arena.h\"\n#include \"oneapi/tbb/task_scheduler_observer.h\"\n#include \"oneapi/tbb/enumerable_thread_specific.h\"\n\n#include <cstddef>\n#include <vector>\n#include <algorithm>\n\n#if _WIN32 || _WIN64\n#include <windows.h>\n#elif __unix__\n#include <unistd.h>\n#if __linux__\n#include <sys/sysinfo.h>\n#endif\n#include <string.h>\n#include <sched.h>\n#if __FreeBSD__\n#include <errno.h>\n#include <sys/param.h>\n#include <sys/cpuset.h>\n#endif\n#endif\n#include <thread>\n\nnamespace utils {\nusing thread_num_type = std::size_t;\n\ninline thread_num_type get_platform_max_threads() {\n    static thread_num_type platform_max_threads = tbb::this_task_arena::max_concurrency();\n    return platform_max_threads;\n}\n\ninline std::vector<thread_num_type> concurrency_range(thread_num_type max_threads) {\n    std::vector<thread_num_type> threads_range;\n    thread_num_type step = 1;\n    for(thread_num_type thread_num = 1; thread_num <= max_threads; thread_num += step++)\n        threads_range.push_back(thread_num);\n    if(threads_range.back() != max_threads)\n        threads_range.push_back(max_threads);\n    // rotate in order to make threads_range non-monotonic\n    std::rotate(threads_range.begin(), threads_range.begin() + threads_range.size()/2, threads_range.end());\n    return threads_range;\n}\n\ninline std::vector<thread_num_type> concurrency_range() {\n    static std::vector<thread_num_type> threads_range = concurrency_range(get_platform_max_threads());\n    return threads_range;\n}\n\n#if !__TBB_TEST_SKIP_AFFINITY\n\nstatic int maxProcs = 0;\n\nstatic int get_max_procs() {\n    if (!maxProcs) {\n#if _WIN32||_WIN64\n        DWORD_PTR pam, sam, m = 1;\n        GetProcessAffinityMask( GetCurrentProcess(), &pam, &sam );\n        int nproc = 0;\n        for ( std::size_t i = 0; i < sizeof(DWORD_PTR) * CHAR_BIT; ++i, m <<= 1 ) {\n            if ( pam & m )\n                ++nproc;\n        }\n        maxProcs = nproc;\n#elif __linux__\n        cpu_set_t mask;\n        int result = 0;\n        sched_getaffinity(0, sizeof(cpu_set_t), &mask);\n        int nproc = sysconf(_SC_NPROCESSORS_ONLN);\n        for (int i = 0; i < nproc; ++i) {\n            if (CPU_ISSET(i, &mask)) ++result;\n        }\n        maxProcs = result;\n#else // FreeBSD\n        maxProcs = sysconf(_SC_NPROCESSORS_ONLN);\n#endif\n    }\n    return maxProcs;\n}\n\nint get_start_affinity_process() {\n#if __linux__\n    cpu_set_t mask;\n    sched_getaffinity(0, sizeof(cpu_set_t), &mask);\n\n    int result = -1;\n\n    int nproc = sysconf(_SC_NPROCESSORS_ONLN);\n    for (int i = 0; i < nproc; ++i) {\n        if (CPU_ISSET(i, &mask)) {\n            result = i;\n            break;\n        }\n    }\n    ASSERT(result != -1, nullptr);\n    return result;\n#else\n    // TODO: add affinity support for Windows and FreeBSD\n    return 0;\n#endif\n}\n\nint limit_number_of_threads( int max_threads ) {\n    ASSERT(max_threads >= 1,\"The limited number of threads should be positive\");\n    maxProcs = get_max_procs();\n    if (maxProcs < max_threads) {\n        // Suppose that process mask is not set so the number of available threads equals maxProcs\n        return maxProcs;\n    }\n#if _WIN32 || _WIN64\n    ASSERT(max_threads <= 64, \"LimitNumberOfThreads doesn't support max_threads to be more than 64 on Windows\");\n    DWORD_PTR mask = 1;\n    for (int i = 1; i < max_threads; ++i) {\n        mask |= mask << 1;\n    }\n    bool err = !SetProcessAffinityMask(GetCurrentProcess(), mask);\n#else\n#if __linux__\n    using mask_t = cpu_set_t;\n#define setaffinity(mask) sched_setaffinity(getpid(), sizeof(mask_t), &mask)\n#else /*__FreeBSD*/\n    using mask_t = cpuset_t;\n#define setaffinity(mask) cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, sizeof(mask_t), &mask)\n#endif\n\n    mask_t new_mask;\n    CPU_ZERO(&new_mask);\n\n    int mask_size = int(sizeof(mask_t) * CHAR_BIT);\n    if ( mask_size < maxProcs ) {\n        REPORT(\"The mask size doesn't seem to be big enough to call setaffinity. The call may return an error.\");\n    }\n\n    ASSERT(max_threads <= int(sizeof(mask_t) * CHAR_BIT), \"The mask size is not enough to set the requested number of threads.\");\n    int st = get_start_affinity_process();\n    for (int i = st; i < st + max_threads; ++i) {\n        CPU_SET(i, &new_mask);\n    }\n    int err = setaffinity(new_mask);\n#endif\n    ASSERT(!err, \"Setting process affinity failed\");\n    return max_threads;\n}\n\n#endif // __TBB_TEST_SKIP_AFFINITY\n\n// TODO: consider using cpuset_setaffinity/sched_getaffinity on FreeBSD to enable the functionality\n#define OS_AFFINITY_SYSCALL_PRESENT (__linux__ && !__ANDROID__)\n\n#if OS_AFFINITY_SYSCALL_PRESENT\nvoid get_thread_affinity_mask(std::size_t& ncpus, std::vector<int>& free_indexes) {\n    cpu_set_t* mask = nullptr;\n    ncpus = sizeof(cpu_set_t) * CHAR_BIT;\n    do {\n        mask = CPU_ALLOC(ncpus);\n        if (!mask) break;\n        const size_t size = CPU_ALLOC_SIZE(ncpus);\n        CPU_ZERO_S(size, mask);\n        const int err = sched_getaffinity(0, size, mask);\n        if (!err) break;\n\n        CPU_FREE(mask);\n        mask = nullptr;\n        if (errno != EINVAL) break;\n        ncpus <<= 1;\n    } while (ncpus < 16 * 1024 /* some reasonable limit */ );\n    ASSERT(mask, \"Failed to obtain process affinity mask.\");\n\n    const size_t size = CPU_ALLOC_SIZE(ncpus);\n    const int num_cpus = CPU_COUNT_S(size, mask);\n    for (int i = 0; i < num_cpus; ++i) {\n        if (CPU_ISSET_S(i, size, mask)) {\n            free_indexes.push_back(i);\n        }\n    }\n\n    CPU_FREE(mask);\n}\n\nvoid pin_thread_imp(std::size_t ncpus, std::vector<int>& free_indexes, std::atomic<int>& curr_idx) {\n    const size_t size = CPU_ALLOC_SIZE(ncpus);\n\n    ASSERT(free_indexes.size() > 0, nullptr);\n    int mapped_idx = free_indexes[curr_idx++ % free_indexes.size()];\n\n    cpu_set_t *target_mask = CPU_ALLOC(ncpus);\n    ASSERT(target_mask, nullptr);\n    CPU_ZERO_S(size, target_mask);\n    CPU_SET_S(mapped_idx, size, target_mask);\n    const int err = sched_setaffinity(0, size, target_mask);\n    ASSERT(err == 0, \"Failed to set thread affinity\");\n\n    CPU_FREE(target_mask);\n}\n#endif\n\nclass thread_pinner {\npublic:\n    thread_pinner() {\n        tbb::detail::suppress_unused_warning(thread_index);\n#if OS_AFFINITY_SYSCALL_PRESENT\n        get_thread_affinity_mask(ncpus, free_indexes);\n#endif\n    }\n\n    void pin_thread() {\n#if OS_AFFINITY_SYSCALL_PRESENT\n        pin_thread_imp(ncpus, free_indexes, thread_index);\n#endif\n    }\n\nprivate:\n#if OS_AFFINITY_SYSCALL_PRESENT\n    std::size_t ncpus;\n    std::vector<int> free_indexes{};\n#endif\n    std::atomic<int> thread_index{};\n};\n\nclass pinning_observer : public tbb::task_scheduler_observer {\n    thread_pinner pinner;\n    tbb::enumerable_thread_specific<bool> register_threads;\npublic:\n    pinning_observer(tbb::task_arena& arena) : tbb::task_scheduler_observer(arena), pinner() {\n        observe(true);\n    }\n\n    void on_scheduler_entry( bool ) override {\n        bool& is_pinned = register_threads.local();\n        if (is_pinned) return;\n\n        pinner.pin_thread();\n\n        is_pinned = true;\n    }\n\n    ~pinning_observer() {\n        observe(false);\n    }\n};\n\n#if __unix__\n#include <sched.h>\n#endif\n\nbool can_change_thread_priority() {\n#if __unix__\n    pthread_t this_thread = pthread_self();\n    sched_param old_params;\n    int old_policy;\n    int err = pthread_getschedparam(this_thread, &old_policy, &old_params);\n    ASSERT(err == 0, nullptr);\n\n    sched_param params;\n    params.sched_priority = sched_get_priority_max(SCHED_FIFO);\n    ASSERT(params.sched_priority != -1, nullptr);\n    err = pthread_setschedparam(this_thread, SCHED_FIFO, &params);\n    if (err == 0) {\n        err = pthread_setschedparam(this_thread, old_policy, &old_params);\n        ASSERT(err == 0, nullptr);\n    }\n    return err == 0;\n#endif\n    return false;\n}\n\n#if __unix__\nclass increased_priority_guard {\npublic:\n    increased_priority_guard() : m_backup(get_current_schedparam()) {\n        increase_thread_priority();\n    }\n\n    ~increased_priority_guard() {\n        // restore priority on destruction\n        pthread_t this_thread = pthread_self();\n        int err = pthread_setschedparam(this_thread, \n            /*policy*/ m_backup.first, /*sched_param*/ &m_backup.second);\n        ASSERT(err == 0, nullptr);\n    }\nprivate:\n    std::pair<int, sched_param> get_current_schedparam() {\n        pthread_t this_thread = pthread_self();\n        sched_param params;\n        int policy = 0;\n        int err = pthread_getschedparam(this_thread, &policy, &params);\n        ASSERT(err == 0, nullptr);\n        return std::make_pair(policy, params);\n    }\n\n    void increase_thread_priority() {\n        pthread_t this_thread = pthread_self();\n        sched_param params;\n        params.sched_priority = sched_get_priority_max(SCHED_FIFO);\n        ASSERT(params.sched_priority != -1, nullptr);\n        int err = pthread_setschedparam(this_thread, SCHED_FIFO, &params);\n        ASSERT(err == 0, \"Can not change thread priority.\");\n    }\n\n    std::pair<int, sched_param> m_backup;\n};\n#else\n    class increased_priority_guard{};\n#endif\n\n} // namespace utils\n\n#endif // __TBB_test_common_utils_concurrency_limit_H\n"
  },
  {
    "path": "third-party/tbb/test/common/utils_dynamic_libs.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_utils_dynamic_libs_H_\n#define __TBB_test_common_utils_dynamic_libs_H_\n\n#include \"common/test.h\"\n#include \"oneapi/tbb/version.h\"\n\n#if __TBB_DYNAMIC_LOAD_ENABLED\n\n#ifdef _WIN32\n#include <windows.h>\n#else\n#include <dlfcn.h>\n#endif\n\nnamespace utils {\n\n#if TBB_USE_DEBUG\n#define SUFFIX1 \"_debug\"\n#define SUFFIX2\n#else\n#define SUFFIX1\n#define SUFFIX2 \"_debug\"\n#endif /* TBB_USE_DEBUG */\n\n#if (_WIN32||_WIN64)\n#if __MINGW32__\n    #define PREFIX \"lib\"\n#else\n    #define PREFIX\n#endif\n#define EXT \".dll\"\n#else\n#if TBB_USE_APPLE_FRAMEWORKS\n#define PREFIX // When built as Apple* Framework, the binary has no lib prefix\n#else\n#define PREFIX \"lib\"\n#endif\n#if __APPLE__\n#if TBB_USE_APPLE_FRAMEWORKS\n#define EXT // When built as Apple* Framework, the binary has no extension\n#else\n#define EXT \".dylib\"\n#endif\n// Android SDK build system does not support .so file name versioning\n#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __sun || _AIX || __ANDROID__\n#define EXT \".so\"\n#elif __unix__  // Order of these elif's matters!\n#define EXT __TBB_STRING(.so.2)\n#else\n#error Unknown OS\n#endif\n#endif\n#if TBB_USE_APPLE_FRAMEWORKS\n#define MALLOCFRAMEWORK \"tbbmalloc.framework/\"\n#else\n#define MALLOCFRAMEWORK\n#endif\n\n// Form the names of the TBB memory allocator binaries.\n#define MALLOCLIB_NAME1 MALLOCFRAMEWORK PREFIX \"tbbmalloc\" SUFFIX1 EXT\n#define MALLOCLIB_NAME2 MALLOCFRAMEWORK PREFIX \"tbbmalloc\" SUFFIX2 EXT\n\n#if _WIN32 || _WIN64\nusing LIBRARY_HANDLE = HMODULE;\n#else\nusing LIBRARY_HANDLE = void*;\n#endif\n\n#if _WIN32 || _WIN64\n#define TEST_LIBRARY_NAME(base) PREFIX base SUFFIX1 \".dll\"\n#elif __APPLE__\n#define TEST_LIBRARY_NAME(base) PREFIX base SUFFIX1 \".dylib\"\n#else\n#define TEST_LIBRARY_NAME(base) PREFIX base SUFFIX1 \".so\"\n#endif\n\nLIBRARY_HANDLE OpenLibrary(const char *name)\n{\n#if _WIN32 || _WIN64\n#if __TBB_WIN8UI_SUPPORT\n    TCHAR wlibrary[MAX_PATH];\n    if (MultiByteToWideChar(CP_UTF8, 0, name, -1, wlibrary, MAX_PATH) == 0) return false;\n    return ::LoadPackagedLibrary(wlibrary, 0);\n#else\n    return ::LoadLibrary(name);\n#endif\n#else\n    return dlopen(name, RTLD_NOW|RTLD_GLOBAL);\n#endif\n}\n\nvoid CloseLibrary(LIBRARY_HANDLE lib)\n{\n#if _WIN32 || _WIN64\n    BOOL ret = FreeLibrary(lib);\n    REQUIRE_MESSAGE(ret, \"FreeLibrary must be successful\");\n#else\n    int ret = dlclose(lib);\n    REQUIRE_MESSAGE(ret == 0, \"dlclose must be successful\");\n#endif\n}\n\ntypedef void (*FunctionAddress)();\n\ntemplate <typename FunctionPointer>\nvoid GetAddress(utils::LIBRARY_HANDLE lib, const char *name, FunctionPointer& func)\n{\n#if _WIN32 || _WIN64\n    func = (FunctionPointer)(void*)GetProcAddress(lib, name);\n#else\n    func = (FunctionPointer)dlsym(lib, name);\n#endif\n    REQUIRE_MESSAGE(func, \"Can't find required symbol in dynamic library\");\n}\n\nFunctionAddress GetAddress(utils::LIBRARY_HANDLE lib, const char *name)\n{\n    FunctionAddress func;\n    GetAddress(lib, name, func);\n    return func;\n}\n\n}  // namespace utils\n\n#endif // __TBB_DYNAMIC_LOAD_ENABLED\n#endif // __TBB_test_common_utils_dynamic_libs_H_\n"
  },
  {
    "path": "third-party/tbb/test/common/utils_env.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_utils_env_H\n#define __TBB_test_common_utils_env_H\n\n#include \"test.h\"\n\n#include <cstdlib> // getenv/setenv\n\nnamespace utils {\n\nint SetEnv( const char *envname, const char *envval ) {\n    CHECK_MESSAGE( (envname && envval), \"Harness::SetEnv() requires two valid C strings\" );\n#if __TBB_WIN8UI_SUPPORT\n    CHECK_MESSAGE( false, \"Harness::SetEnv() should not be called in code built for win8ui\" );\n    return -1;\n#elif !(_MSC_VER || __MINGW32__ || __MINGW64__)\n    // On POSIX systems use setenv\n    return setenv(envname, envval, /*overwrite=*/1);\n#elif __STDC_SECURE_LIB__>=200411\n    // this macro is set in VC & MinGW if secure API functions are present\n    return _putenv_s(envname, envval);\n#else\n    // If no secure API on Windows, use _putenv\n    size_t namelen = strlen(envname), valuelen = strlen(envval);\n    char* buf = new char[namelen+valuelen+2];\n    strncpy(buf, envname, namelen);\n    buf[namelen] = '=';\n    strncpy(buf+namelen+1, envval, valuelen);\n    buf[namelen+1+valuelen] = char(0);\n    int status = _putenv(buf);\n    delete[] buf;\n    return status;\n#endif\n}\n\nchar* GetEnv(const char *envname) {\n    CHECK_MESSAGE(envname, \"Harness::GetEnv() requires a valid C string\");\n#if __TBB_WIN8UI_SUPPORT\n    return nullptr;\n#else\n    return std::getenv(envname);\n#endif\n}\n\n} // namespace utils\n\n#endif // __TBB_test_common_utils_env_H\n\n"
  },
  {
    "path": "third-party/tbb/test/common/utils_report.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_utils_report_H\n#define __TBB_test_common_utils_report_H\n\n#include \"config.h\"\n\n#include <mutex>\n#include <cstdarg>\n\n#if __SUNPRO_CC\n#include <stdio.h>\n#else\n#include <cstdio>\n#endif\n\n#if defined(MAX_TRACE_SIZE) && MAX_TRACE_SIZE < 1024\n    #undef MAX_TRACE_SIZE\n#endif\n#ifndef MAX_TRACE_SIZE\n    #define MAX_TRACE_SIZE  1024\n#endif\n\n\n#if __GLIBC__>2 || ( __GLIBC__==2 && __GLIBC_MINOR__ >= 1) || __APPLE__\n    #include <execinfo.h> /*backtrace*/\n    #define BACKTRACE_FUNCTION_AVAILABLE 1\n#endif\n\n#if defined(_MSC_VER)  &&  _MSC_VER >= 1300  ||  defined(__GNUC__)  ||  defined(__GNUG__)\n    #define TRACE_ORIG_INFO __FILE__, __LINE__, __FUNCTION__\n#else\n    #define TRACE_ORIG_INFO __FILE__, __LINE__, \"\"\n    #define __FUNCTION__ \"\"\n#endif\n\n#if defined(_WIN32) || defined(_WIN64)\n    #if (_WIN32_WINNT > 0x0501 && defined(_MSC_VER) && !defined(_M_ARM))\n        // Suppress \"typedef ignored ... when no variable is declared\" warning by vc14\n        #pragma warning (push)\n        #pragma warning (disable: 4091)\n        #ifndef NOMINMAX\n            #define NOMINMAX\n        #endif\n        #include <windows.h>\n        #include <dbghelp.h>\n        #pragma warning (pop)\n        #pragma comment (lib, \"dbghelp.lib\")\n    #endif\n#endif\n\n//! printf style tracing macro without automatic new line character adding\n#define TRACENL utils::internal::tracer.set_trace_info(0, TRACE_ORIG_INFO)->trace\n\n//! printf style reporting macro\n/** On heterogeneous platforms redirects its output to the host side. **/\n#define REPORT TRACENL\n\nnamespace utils {\nnamespace internal {\n\n#ifndef TBBReporter\nstruct TBBReporter {\n    void Report ( const char* msg ) {\n        printf( \"%s\", msg );\n        fflush(stdout);\n#ifdef _WINDOWS_\n        OutputDebugStringA(msg);\n#endif\n    }\n};\n#endif \n\nclass Tracer {\n    int m_flags;\n    const char *m_file;\n    const char *m_func;\n    std::size_t m_line;\n\n    TBBReporter m_reporter;\n\npublic:\n    enum {\n        prefix = 1,\n        need_lf = 2\n    };\n\n    Tracer(): m_flags(0), m_file(nullptr), m_func(nullptr), m_line(0) {}\n\n    Tracer* set_trace_info( int flags, const char *file, std::size_t line, const char *func ) {\n        m_flags = flags;\n        m_line = line;\n        m_file = file;\n        m_func = func;\n        return  this;\n    }\n\n    void trace( const char* fmt, ... ) {\n        char msg[MAX_TRACE_SIZE];\n        char msg_fmt_buf[MAX_TRACE_SIZE];\n        const char  *msg_fmt = fmt;\n        if (m_flags & prefix) {\n            snprintf (msg_fmt_buf, MAX_TRACE_SIZE, \"[%s] %s\", m_func, fmt);\n            msg_fmt = msg_fmt_buf;\n        }\n        std::va_list argptr;\n        va_start(argptr, fmt);\n        int len = vsnprintf(msg, MAX_TRACE_SIZE, msg_fmt, argptr);\n        va_end(argptr);\n        if (m_flags & need_lf && len < MAX_TRACE_SIZE - 1  &&  msg_fmt[len-1] != '\\n') {\n            msg[len] = '\\n';\n            msg[len + 1] = 0;\n        }\n        m_reporter.Report(msg);\n    }\n}; // class Tracer\n\nstatic Tracer tracer;\n\ntemplate<int>\nbool not_the_first_call () {\n    static bool first_call = false;\n    bool res = first_call;\n    first_call = true;\n    return res;\n}\n\n} // internal\n\ninline void print_call_stack() {\n    static std::mutex mutex;\n    std::lock_guard<std::mutex> lock(mutex);\n\n    fflush(stdout); fflush(stderr);\n    #if BACKTRACE_FUNCTION_AVAILABLE\n        const int sz = 100; // max number of frames to capture\n        void *buff[sz];\n        int n = backtrace(buff, sz);\n        REPORT(\"Call stack info (%d):\\n\", n);\n        backtrace_symbols_fd(buff, n, fileno(stdout));\n    #elif __SUNPRO_CC\n        REPORT(\"Call stack info:\\n\");\n        printstack(fileno(stdout));\n    #elif _WIN32_WINNT > 0x0501 && _MSC_VER>=1500 && !__TBB_WIN8UI_SUPPORT && !defined(WINAPI_FAMILY)\n        const int sz = 62; // XP limitation for number of frames\n        void *buff[sz];\n        int n = CaptureStackBackTrace(0, sz, buff, nullptr);\n        REPORT(\"Call stack info (%d):\\n\", n);\n        static LONG once = 0;\n        if( !InterlockedExchange(&once, 1) )\n            SymInitialize(GetCurrentProcess(), nullptr, TRUE);\n        const int len = 255; // just some reasonable string buffer size\n        union { SYMBOL_INFO sym; char pad[sizeof(SYMBOL_INFO)+len]; };\n        sym.MaxNameLen = len;\n        sym.SizeOfStruct = sizeof( SYMBOL_INFO );\n        DWORD64 offset;\n        for(int i = 1; i < n; i++) { // skip current frame\n            if(!SymFromAddr( GetCurrentProcess(), DWORD64(buff[i]), &offset, &sym )) {\n                sym.Address = ULONG64(buff[i]); offset = 0; sym.Name[0] = 0;\n            }\n            REPORT(\"[%d] %016I64X+%04I64X: %s\\n\", i, sym.Address, offset, sym.Name);\n        }\n    #endif\n}\n\n} // util\n\n#endif // __TBB_test_common_utils_report_H\n"
  },
  {
    "path": "third-party/tbb/test/common/utils_yield.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_common_utils_yield_H\n#define __TBB_test_common_utils_yield_H\n\n#include \"config.h\"\n#include <oneapi/tbb/detail/_machine.h>\n\nnamespace utils {\n#if __TBB_GLIBCXX_THIS_THREAD_YIELD_BROKEN\n    static inline void yield() {\n        sched_yield();\n    }\n#else\n    using std::this_thread::yield;\n#endif\n}\n\n#endif // __TBB_test_common_utils_yield_H\n"
  },
  {
    "path": "third-party/tbb/test/common/vector_types.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// Header that sets HAVE_m128/HAVE_m256 if vector types (__m128/__m256) are available\n\n//! Class for testing safety of using vector types.\n/** Uses circuitous logic forces compiler to put __m128/__m256 objects on stack while\n    executing various methods, and thus tempt it to use aligned loads and stores\n    on the stack. */\n//  Do not create file-scope objects of the class, because MinGW (as of May 2010)\n//  did not always provide proper stack alignment in destructors of such objects.\n\n#ifndef __TBB_test_common_vector_types_H_\n#define __TBB_test_common_vector_types_H_\n\n#include \"config.h\"\n\n#if (_MSC_VER>=1600)\n//TODO: handle /arch:AVX in the right way.\n#pragma warning (push)\n#pragma warning (disable: 4752)\n#endif\n\n#if __TBB_GCC_WARNING_IGNORED_ATTRIBUTES_PRESENT\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wignored-attributes\"\n#endif\n\ntemplate <typename Mvec>\nclass ClassWithVectorType {\n    static constexpr int n = 16;\n    static constexpr int F = sizeof(Mvec)/sizeof(float);\n    Mvec field[n];\n\n    void init( int );\npublic:\n    ClassWithVectorType() { init(-n); }\n    ClassWithVectorType( int i ) { init(i); }\n    ClassWithVectorType( const ClassWithVectorType& src ) {\n        for (int i = 0; i < n; ++i) {\n            field[i] = src.field[i];\n        }\n    }\n\n    ClassWithVectorType& operator=( const ClassWithVectorType& src ) {\n        Mvec stack[n];\n        for (int i = 0; i < n; ++i) {\n            stack[i^5] = src.field[i];\n        }\n        for (int i = 0; i < n; ++i) {\n            field[i^5] = stack[i];\n        }\n        return *this;\n    }\n\n    ~ClassWithVectorType() { init(-2 * n); }\n\n    friend bool operator==( const ClassWithVectorType& x, const ClassWithVectorType& y ) {\n        for( int i = 0; i < F*n; ++i ) {\n            if( ((const float*)x.field)[i] != ((const float*)y.field)[i] )\n                return false;\n        }\n        return true;\n    }\n\n    friend bool operator!=( const ClassWithVectorType& x, const ClassWithVectorType& y ) {\n        return !(x == y);\n    }\n}; // class ClassWithVectorType\n\ntemplate <typename Mvec>\nvoid ClassWithVectorType<Mvec>::init( int start ) {\n   Mvec stack[n];\n    for( int i = 0; i < n; ++i ) {\n        // Declaring value as a one-element array instead of a scalar quites\n        // gratuitous warnings about possible use of \"value\" before it was set.\n        Mvec value[1];\n        for( int j = 0; j < F; ++j )\n            ((float*)value)[j] = float(n*start+F*i+j);\n        stack[i^5] = value[0];\n    }\n    for( int i = 0; i < n; ++i )\n        field[i^5] = stack[i];\n}\n\n#if (defined(__AVX__) || (_MSC_VER >= 1600 && defined(_M_X64))) && !defined(__sun)\n#include <immintrin.h>\n#if __clang__\n#include <avxintrin.h>\n#endif\n#define HAVE_m256 1\nusing ClassWithAVX = ClassWithVectorType<__m256>;\n#if _MSC_VER\n#include <intrin.h> // for __cpuid\n#endif\nbool have_AVX() {\n    bool result = false;\n    const int avx_mask = 1 << 28;\n#if _MSC_VER || defined(__INTEL_COMPILER)\n    int info[4] = {0, 0, 0, 0};\n    const int ECX = 2;\n    __cpuid(info, 1);\n    result = (info[ECX] & avx_mask) != 0;\n#elif defined(__GNUC__)\n    int ECX;\n    __asm__( \"cpuid\"\n             : \"=c\"(ECX)\n             : \"a\" (1)\n             : \"ebx\", \"edx\" );\n    result = (ECX & avx_mask);\n#endif\n    return result;\n}\n#endif // __AVX__ etc\n\n#if (defined(__SSE__) || defined(_M_IX86_FP) || defined(_M_X64)) && !defined(__sun)\n#include <xmmintrin.h>\n#define HAVE_m128 1\nusing ClassWithSSE = ClassWithVectorType<__m128>;\n#endif\n\n#if __TBB_GCC_WARNING_IGNORED_ATTRIBUTES_PRESENT\n#pragma GCC diagnostic pop\n#endif\n\n#if (_MSC_VER>=1600)\n#pragma warning (pop)\n#endif\n#endif // __TBB_test_common_vector_types_H_\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_allocators.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/cache_aligned_allocator.h\"\n#include \"oneapi/tbb/tbb_allocator.h\"\n\n// the real body of the test is there:\n#include \"common/allocator_test_common.h\"\n#include \"common/allocator_stl_test_common.h\"\n\n//! \\file conformance_allocators.cpp\n//! \\brief Test for [memory_allocation.cache_aligned_allocator memory_allocation.tbb_allocator memory_allocation.cache_aligned_resource] specifications\n\n//! Testing ISO C++ allocator requirements\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Allocator concept\") {\n    // allocate/deallocate\n    TestAllocator<oneapi::tbb::cache_aligned_allocator<void>>(Concept);\n    TestAllocator<oneapi::tbb::tbb_allocator<void>>(Concept);\n\n    // max_size case for cache_aligned allocator\n    using Allocator = oneapi::tbb::cache_aligned_allocator<int>;\n    Allocator allocator;\n    AssertSameType(allocator.max_size(), typename std::allocator_traits<Allocator>::size_type(0));\n    // Following assertion catches case where max_size() is so large that computation of\n    // number of bytes for such an allocation would overflow size_type.\n    REQUIRE_MESSAGE((allocator.max_size() * typename std::allocator_traits<Allocator>::size_type(sizeof(int)) >= allocator.max_size()), \"max_size larger than reasonable\");\n\n    // operator==\n    TestAllocator<oneapi::tbb::cache_aligned_allocator<void>>(Comparison);\n    TestAllocator<oneapi::tbb::tbb_allocator<void>>(Comparison);\n}\n\n#if TBB_USE_EXCEPTIONS\n//! Testing exception guarantees\n//! \\brief \\ref requirement\nTEST_CASE(\"Exceptions\") {\n    TestAllocator<oneapi::tbb::cache_aligned_allocator<void>>(Exceptions);\n    TestAllocator<oneapi::tbb::tbb_allocator<void>>(Exceptions);\n}\n#endif /* TBB_USE_EXCEPTIONS */\n\n//! Testing allocators thread safety (should not introduce data races)\n//! \\brief \\ref requirement\nTEST_CASE(\"Thread safety\") {\n    TestAllocator<oneapi::tbb::cache_aligned_allocator<void>>(ThreadSafety);\n    TestAllocator<oneapi::tbb::tbb_allocator<void>>(ThreadSafety);\n    oneapi::tbb::tbb_allocator<int> tbb_alloc;\n#if _MSC_VER && _MSC_VER <= 1900 && !__INTEL_COMPILER\n    utils::suppress_unused_warning(tbb_alloc);\n#endif\n    tbb_alloc.allocator_type();\n}\n\n//! Testing tbb_allocator to return the type of allocation library used\n//! \\brief \\ref requirement\nTEST_CASE(\"tbb_allocator allocator type\") {\n    using Allocator = oneapi::tbb::tbb_allocator<int>; Allocator tbb_alloc;\n#if _MSC_VER && _MSC_VER <= 1900 && !__INTEL_COMPILER\n    utils::suppress_unused_warning(tbb_alloc);\n#endif\n    Allocator::malloc_type a_type = tbb_alloc.allocator_type();\n    bool is_available_type = (a_type == Allocator::malloc_type::scalable) || (a_type == Allocator::standard);\n    REQUIRE(is_available_type);\n}\n\n#if __TBB_CPP17_MEMORY_RESOURCE_PRESENT\n//! Testing memory resources compatibility with STL containers through the\n//! std::pmr::polymorphic_allocator\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"polymorphic_allocator test\") {\n    oneapi::tbb::cache_aligned_resource aligned_resource;\n    TestAllocator<std::pmr::polymorphic_allocator<void>>(Concept, std::pmr::polymorphic_allocator<void>(&aligned_resource));\n}\n#endif\n\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_arena_constraints.cpp",
    "content": "/*\n    Copyright (c) 2019-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file conformance_arena_constraints.cpp\n//! \\brief Test for [info_namespace scheduler.task_arena] specifications\n\n#include \"common/common_arena_constraints.h\"\n\n#if __TBB_HWLOC_VALID_ENVIRONMENT\n\n//! Testing all NUMA aware arenas can successfully execute tasks\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"NUMA aware arenas task execution test\") {\n    system_info::initialize();\n    for(auto& numa_index: oneapi::tbb::info::numa_nodes()) {\n        oneapi::tbb::task_arena arena(oneapi::tbb::task_arena::constraints{numa_index});\n\n        std::atomic<bool> task_done{false};\n        arena.execute([&]{ task_done = true; });\n        REQUIRE_MESSAGE(task_done, \"Execute was performed but task was not executed.\");\n\n        task_done = false;\n        arena.enqueue([&]{ task_done = true; });\n        while(!task_done) { utils::yield(); }\n    }\n}\n\n//! Testing NUMA topology traversal correctness\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Test NUMA topology traversal correctness\") {\n    system_info::initialize();\n    std::vector<index_info> numa_nodes_info = system_info::get_numa_nodes_info();\n\n    std::vector<oneapi::tbb::numa_node_id> numa_indexes = oneapi::tbb::info::numa_nodes();\n    for (const auto& numa_id: numa_indexes) {\n        auto pos = std::find_if(numa_nodes_info.begin(), numa_nodes_info.end(),\n            [&](const index_info& numa_info){ return numa_info.index == numa_id; }\n        );\n\n        REQUIRE_MESSAGE(pos != numa_nodes_info.end(), \"Wrong, extra or repeated NUMA node index detected.\");\n        numa_nodes_info.erase(pos);\n    }\n\n    REQUIRE_MESSAGE(numa_nodes_info.empty(), \"Some available NUMA nodes indexes were not detected.\");\n}\n\n#if __HYBRID_CPUS_TESTING\n//! Testing NUMA topology traversal correctness\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Test core types topology traversal correctness\") {\n    system_info::initialize();\n    std::vector<index_info> core_types_info = system_info::get_cpu_kinds_info();\n    std::vector<tbb::core_type_id> core_types = tbb::info::core_types();\n\n    REQUIRE_MESSAGE(core_types_info.size() == core_types.size(), \"Wrong core types number detected.\");\n    for (unsigned i = 0; i < core_types.size(); ++i) {\n        REQUIRE_MESSAGE(core_types[i] == core_types_info[i].index, \"Wrong core type index detected.\");\n    }\n}\n#endif /*__HYBRID_CPUS_TESTING*/\n\n#else /*!__TBB_HWLOC_VALID_ENVIRONMENT*/\n\n//! Testing NUMA support interfaces validity when HWLOC is not presented on system\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Test validity of NUMA interfaces when HWLOC is not present on the system\") {\n    std::vector<oneapi::tbb::numa_node_id> numa_indexes = oneapi::tbb::info::numa_nodes();\n\n    REQUIRE_MESSAGE(numa_indexes.size() == 1,\n        \"Number of NUMA nodes must be pinned to 1, if we have no HWLOC on the system.\");\n    REQUIRE_MESSAGE(numa_indexes[0] == -1,\n        \"Index of NUMA node must be pinned to -1, if we have no HWLOC on the system.\");\n    REQUIRE_MESSAGE(oneapi::tbb::info::default_concurrency(numa_indexes[0]) == utils::get_platform_max_threads(),\n        \"Concurrency for NUMA node must be equal to default_num_threads(), if we have no HWLOC on the system.\");\n}\n\n#endif /*__TBB_HWLOC_VALID_ENVIRONMENT*/\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_async_node.cpp",
    "content": "/*\n    Copyright (c) 2020-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"conformance_flowgraph.h\"\n#include \"common/test_invoke.h\"\n\n//! \\file conformance_async_node.cpp\n//! \\brief Test for [flow_graph.async_node] specification\n\nusing input_msg = conformance::message</*default_ctor*/true, /*copy_ctor*/true, /*copy_assign*/false>;\nusing output_msg = conformance::message</*default_ctor*/false, /*copy_ctor*/false, /*copy_assign*/false>;\n\n//! Test async_node constructors\n//! \\brief \\ref requirement\nTEST_CASE(\"async_node constructors\"){\n    using namespace oneapi::tbb::flow;\n    graph g;\n\n    conformance::dummy_functor<int> fun;\n\n    async_node<int, int> fn1(g, unlimited, fun);\n    async_node<int, int> fn2(g, unlimited, fun, oneapi::tbb::flow::node_priority_t(1));\n\n    async_node<int, int, lightweight> lw_node1(g, serial, fun, lightweight());\n    async_node<int, int, lightweight> lw_node2(g, serial, fun, lightweight(), oneapi::tbb::flow::node_priority_t(1));\n}\n\n//! Test buffering property\n//! \\brief \\ref requirement\nTEST_CASE(\"async_node buffering\") {\n    conformance::dummy_functor<int> fun;\n    conformance::test_buffering<oneapi::tbb::flow::async_node<input_msg, int>, input_msg>(oneapi::tbb::flow::unlimited, fun);\n}\n\n//! Test priorities work in single-threaded configuration\n//! \\brief \\ref requirement\nTEST_CASE(\"async_node priority support\"){\n    conformance::test_priority<oneapi::tbb::flow::async_node<input_msg, int>, input_msg>(oneapi::tbb::flow::unlimited);\n}\n\n//! The node that is constructed has a reference to the same graph object as src, has a copy of the initial body used by src, and has the same concurrency threshold as src.\n//! The predecessors and successors of src are not copied.\n//! \\brief \\ref requirement\nTEST_CASE(\"async_node copy constructor\"){\n    conformance::test_copy_ctor<oneapi::tbb::flow::async_node<int, int>>();\n}\n\n//! Test calling async body\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Test async_node body\") {\n    conformance::test_body_exec<oneapi::tbb::flow::async_node<input_msg, output_msg>, input_msg, output_msg>(oneapi::tbb::flow::unlimited);\n}\n\n//! Test async_node inheritance relations\n//! \\brief \\ref interface\nTEST_CASE(\"async_node superclasses\"){\n    conformance::test_inheritance<oneapi::tbb::flow::async_node<int, int>, int, int>();\n    conformance::test_inheritance<oneapi::tbb::flow::async_node<void*, float>, void*, float>();\n    conformance::test_inheritance<oneapi::tbb::flow::async_node<input_msg, output_msg>, input_msg, output_msg>();\n}\n\n//! Test node broadcast messages to successors\n//! \\brief \\ref requirement\nTEST_CASE(\"async_node broadcast\"){\n    conformance::counting_functor<int> fun(conformance::expected);\n    conformance::test_forwarding<oneapi::tbb::flow::async_node<input_msg, int>, input_msg, int>(1, oneapi::tbb::flow::unlimited, fun);\n}\n\n//! Test async_node has a user-settable concurrency limit. It can be set to one of predefined values.\n//! The user can also provide a value of type std::size_t to limit concurrency.\n//! Test that not more than limited threads works in parallel.\n//! \\brief \\ref requirement\nTEST_CASE(\"concurrency follows set limits\"){\n    conformance::test_concurrency<oneapi::tbb::flow::async_node<int, int>>();\n}\n\n//! Test body copying and copy_body logic\n//! Test the body object passed to a node is copied\n//! \\brief \\ref interface\nTEST_CASE(\"async_node body copying\"){\n    conformance::test_copy_body_function<oneapi::tbb::flow::async_node<int, int>, conformance::copy_counting_object<int>>(oneapi::tbb::flow::unlimited);\n}\n\n//! Test node reject the incoming message if the concurrency limit achieved.\n//! \\brief \\ref interface\nTEST_CASE(\"async_node with rejecting policy\"){\n    conformance::test_rejecting<oneapi::tbb::flow::async_node<int, int, oneapi::tbb::flow::rejecting>>();\n}\n\n//! Test node Input class meet the DefaultConstructible and CopyConstructible requirements and Output class meet the CopyConstructible requirements.\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Test async_node Output and Input class\") {\n    using Body = conformance::copy_counting_object<int>;\n    conformance::test_output_input_class<oneapi::tbb::flow::async_node<Body, Body>, Body>();\n}\n\n//! Test the body of assync_node typically submits the messages to an external activity for processing outside of the graph.\n//! \\brief \\ref interface\nTEST_CASE(\"async_node with rejecting policy\"){\n    using async_node_type = tbb::flow::async_node<int, int>;\n    using gateway_type = async_node_type::gateway_type;\n\n    oneapi::tbb::flow::graph g;\n    std::atomic<bool> flag{false};\n    std::thread thr;\n    async_node_type testing_node{\n      g, tbb::flow::unlimited,\n      [&](const int& input, gateway_type& gateway) {\n          gateway.reserve_wait();\n          thr = std::thread{[&]{\n              flag = true;\n              gateway.try_put(input);\n              gateway.release_wait();\n          }};\n      }\n    };\n\n    testing_node.try_put(1);\n    g.wait_for_all();\n    CHECK_MESSAGE((flag.load()), \"The body of assync_node must submits the messages to an external activity for processing outside of the graph\");\n    thr.join();\n}\n\n#if __TBB_CPP17_INVOKE_PRESENT\n//! Test that async_node uses std::invoke to run the body\n//! \\brief \\ref requirement\nTEST_CASE(\"async_node and std::invoke\") {\n    using namespace oneapi::tbb::flow;\n\n    using start_node_type = function_node<std::size_t, test_invoke::SmartID<std::size_t>>;\n    using async_node_type = async_node<test_invoke::SmartID<std::size_t>, std::size_t>;\n\n    auto async_body = &test_invoke::SmartID<std::size_t>::template send_id_to_gateway<typename async_node_type::gateway_type>;\n\n    graph g;\n    start_node_type starter(g, serial, [](std::size_t i) -> test_invoke::SmartID<std::size_t> { return {i}; });\n    async_node_type activity_submitter(g, serial, async_body);\n    buffer_node<std::size_t> buf(g);\n\n    make_edge(starter, activity_submitter);\n    make_edge(activity_submitter, buf);\n\n    starter.try_put(1);\n\n    g.wait_for_all();\n    std::size_t result = 0;\n    CHECK(buf.try_get(result));\n    CHECK(result == 1);\n    CHECK(!buf.try_get(result));\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_blocked_nd_range.cpp",
    "content": "/*\n    Copyright (c) 2017-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_assert.h\"\n#include \"common/utils_concurrency_limit.h\"\n\n//! \\file conformance_blocked_nd_range.cpp\n//! \\brief Test for [algorithms.blocked_nd_range] specification\n\n#include \"oneapi/tbb/blocked_nd_range.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include <algorithm> // std::for_each\n#include <array>\n\n// AbstractValueType class represents Value concept's requirements in the most abstract way\nclass AbstractValueType {\n    int value;\n    AbstractValueType() {}\npublic:\n    friend AbstractValueType MakeAbstractValue(int i);\n    friend int GetValueOf(const AbstractValueType& v);\n};\n\nint GetValueOf(const AbstractValueType& v) { return v.value; }\n\nAbstractValueType MakeAbstractValue(int i) {\n    AbstractValueType x;\n    x.value = i;\n    return x;\n}\n\n// operator- returns amount of elements of AbstractValueType between u and v\nstd::size_t operator-(const AbstractValueType& u, const AbstractValueType& v) {\n    return GetValueOf(u) - GetValueOf(v);\n}\n\nbool operator<(const AbstractValueType& u, const AbstractValueType& v) {\n    return GetValueOf(u) < GetValueOf(v);\n}\n\nAbstractValueType operator+(const AbstractValueType& u, std::size_t offset) {\n    return MakeAbstractValue(GetValueOf(u) + int(offset));\n}\n\ntemplate<typename range_t, unsigned int N>\nstruct range_utils {\n    using val_t = typename range_t::value_type;\n\n    template<typename EntityType, std::size_t DimSize>\n    using data_type = std::array<typename range_utils<range_t, N - 1>::template data_type<EntityType, DimSize>, DimSize>;\n\n    template<typename EntityType, std::size_t DimSize>\n    static void init_data(data_type<EntityType, DimSize>& data) {\n        std::for_each(data.begin(), data.end(), range_utils<range_t, N - 1>::template init_data<EntityType, DimSize>);\n    }\n\n    template<typename EntityType, std::size_t DimSize>\n    static void increment_data(const range_t& range, data_type<EntityType, DimSize>& data) {\n        auto begin = data.begin() + range.dim(N - 1).begin();\n        // same as \"auto end = out.begin() + range.dim(N - 1).end();\"\n        auto end = begin + range.dim(N - 1).size();\n        for (auto i = begin; i != end; ++i) {\n            range_utils<range_t, N - 1>::template increment_data<EntityType, DimSize>(range, *i);\n        }\n    }\n\n    template<typename EntityType, std::size_t DimSize>\n    static void check_data(const range_t& range, data_type<EntityType, DimSize>& data) {\n        auto begin = data.begin() + range.dim(N - 1).begin();\n        // same as \"auto end = out.begin() + range.dim(N - 1).end();\"\n        auto end = begin + range.dim(N - 1).size();\n        for (auto i = begin; i != end; ++i) {\n            range_utils<range_t, N - 1>::template check_data<EntityType, DimSize>(range, *i);\n        }\n    }\n\n// BullseyeCoverage Compile C++ with GCC 5.4 warning suppression\n// Sequence points error in braced initializer list\n#if __GNUC__ && !defined(__clang__) && !defined(__INTEL_COMPILER)\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wsequence-point\"\n#endif\n    template<typename input_t, std::size_t... Is>\n    static range_t make_range(std::size_t shift, bool negative, val_t(*gen)(input_t), oneapi::tbb::detail::index_sequence<Is...>) {\n        return range_t( { { gen(negative ? -input_t(Is + shift) : 0), gen(input_t(Is + shift)), Is + 1} ... } );\n    }\n#if __GNUC__ && !defined(__clang__) && !defined(__INTEL_COMPILER)\n#pragma GCC diagnostic pop\n#endif\n\n    static bool is_empty(const range_t& range) {\n        if (range.dim(N - 1).empty()) { return true; }\n        return range_utils<range_t, N - 1>::is_empty(range);\n    }\n\n    static bool is_divisible(const range_t& range) {\n        if (range.dim(N - 1).is_divisible()) { return true; }\n        return range_utils<range_t, N - 1>::is_divisible(range);\n    }\n\n    static void check_splitting(const range_t& range_split, const range_t& range_new, int(*get)(const val_t&), bool split_checker = false) {\n        if (get(range_split.dim(N - 1).begin()) == get(range_new.dim(N - 1).begin())) {\n            REQUIRE(get(range_split.dim(N - 1).end()) == get(range_new.dim(N - 1).end()));\n        }\n        else {\n            REQUIRE((get(range_split.dim(N - 1).end()) == get(range_new.dim(N - 1).begin()) && !split_checker));\n            split_checker = true;\n        }\n        range_utils<range_t, N - 1>::check_splitting(range_split, range_new, get, split_checker);\n    }\n\n};\n\ntemplate<typename range_t>\nstruct range_utils<range_t, 0> {\n    using val_t = typename range_t::value_type;\n\n    template<typename EntityType, std::size_t DimSize>\n    using data_type = EntityType;\n\n    template<typename EntityType, std::size_t DimSize>\n    static void init_data(data_type<EntityType, DimSize>& data) { data = 0; }\n\n    template<typename EntityType, std::size_t DimSize>\n    static void increment_data(const range_t&, data_type<EntityType, DimSize>& data) { ++data; }\n\n    template<typename EntityType, std::size_t DimSize>\n    static void check_data(const range_t&, data_type<EntityType, DimSize>& data) {\n        REQUIRE(data == 1);\n    }\n\n    static bool is_empty(const range_t&) { return false; }\n\n    static bool is_divisible(const range_t&) { return false; }\n\n    static void check_splitting(const range_t&, const range_t&, int(*)(const val_t&), bool) {}\n};\n\n// We need MakeInt function to pass it into make_range as factory function\n// because of matching make_range with AbstractValueType and other types too\nint MakeInt(int i) { return i; }\n\ntemplate<unsigned int DimAmount>\nvoid SerialTest() {\n    static_assert((oneapi::tbb::blocked_nd_range<int, DimAmount>::dim_count() == oneapi::tbb::blocked_nd_range<AbstractValueType, DimAmount>::dim_count()),\n                         \"different amount of dimensions\");\n\n    using range_t = oneapi::tbb::blocked_nd_range<AbstractValueType, DimAmount>;\n    using utils_t = range_utils<range_t, DimAmount>;\n\n    // Generate empty range\n    range_t r = utils_t::make_range(0, true, &MakeAbstractValue, oneapi::tbb::detail::make_index_sequence<DimAmount>());\n\n    utils::AssertSameType(r.is_divisible(), bool());\n    utils::AssertSameType(r.empty(), bool());\n    utils::AssertSameType(range_t::dim_count(), 0U);\n\n    REQUIRE((r.empty() == utils_t::is_empty(r) && r.empty()));\n    REQUIRE(r.is_divisible() == utils_t::is_divisible(r));\n\n    // Generate not-empty range divisible range\n    r = utils_t::make_range(1, true, &MakeAbstractValue, oneapi::tbb::detail::make_index_sequence<DimAmount>());\n    REQUIRE((r.empty() == utils_t::is_empty(r) && !r.empty()));\n    REQUIRE((r.is_divisible() == utils_t::is_divisible(r) && r.is_divisible()));\n\n    range_t r_new(r, oneapi::tbb::split());\n    utils_t::check_splitting(r, r_new, &GetValueOf);\n\n    SerialTest<DimAmount - 1>();\n}\ntemplate<> void SerialTest<0>() {}\n\ntemplate<unsigned int DimAmount>\nvoid ParallelTest() {\n    using range_t = oneapi::tbb::blocked_nd_range<int, DimAmount>;\n    using utils_t = range_utils<range_t, DimAmount>;\n\n    // Max size is                                 1 << 20 - 1 bytes\n    // Thus size of one dimension's elements is    1 << (20 / DimAmount - 1) bytes\n    typename utils_t::template data_type<unsigned char, 1 << (20 / DimAmount - 1)> data;\n    utils_t::init_data(data);\n\n    range_t r = utils_t::make_range((1 << (20 / DimAmount - 1)) - DimAmount, false, &MakeInt, oneapi::tbb::detail::make_index_sequence<DimAmount>());\n\n    oneapi::tbb::parallel_for(r, [&data](const range_t& range) {\n        utils_t::increment_data(range, data);\n    });\n\n    utils_t::check_data(r, data);\n\n    ParallelTest<DimAmount - 1>();\n}\ntemplate<> void ParallelTest<0>() {}\n\n//! Testing blocked_nd_range construction\n//! \\brief \\ref interface\nTEST_CASE(\"Construction\") {\n    oneapi::tbb::blocked_nd_range<int, 1>{ { 0,13,3 } };\n\n    oneapi::tbb::blocked_nd_range<int, 1>{ oneapi::tbb::blocked_range<int>{ 0,13,3 } };\n\n    oneapi::tbb::blocked_nd_range<int, 2>(oneapi::tbb::blocked_range<int>(-8923, 8884, 13), oneapi::tbb::blocked_range<int>(-8923, 5, 13));\n\n    oneapi::tbb::blocked_nd_range<int, 2>({ -8923, 8884, 13 }, { -8923, 8884, 13 });\n\n    oneapi::tbb::blocked_range<int> r1(0, 13);\n\n    oneapi::tbb::blocked_range<int> r2(-12, 23);\n\n    oneapi::tbb::blocked_nd_range<int, 2>({ { -8923, 8884, 13 }, r1});\n\n    oneapi::tbb::blocked_nd_range<int, 2>({ r2, r1 });\n\n    oneapi::tbb::blocked_nd_range<int, 2>(r1, r2);\n\n    int sizes[] = {174, 39, 2481, 93};\n    oneapi::tbb::blocked_nd_range<int, 4> rNd_1(sizes, /*grainsize*/7);\n\n    oneapi::tbb::blocked_nd_range<int, 4> rNd_2({174, 39, 2481, 93}, /*grainsize*/11);\n\n    for (unsigned i = 0; i < rNd_1.dim_count(); ++i) {\n        oneapi::tbb::blocked_nd_range<int, 4>::dim_range_type dim1 = rNd_1.dim(i);\n        oneapi::tbb::blocked_nd_range<int, 4>::dim_range_type dim2 = rNd_2.dim(i);\n        REQUIRE(dim1.begin()==0);\n        REQUIRE(dim2.begin()==0);\n        unsigned int szi = sizes[i]; // to compare with unsigned integrals without warnings\n        REQUIRE(dim1.size()==szi);\n        REQUIRE(dim2.size()==szi);\n        REQUIRE(dim1.grainsize()==7);\n        REQUIRE(dim2.grainsize()==11);\n    }\n\n    oneapi::tbb::blocked_nd_range<AbstractValueType, 4>({ MakeAbstractValue(-3), MakeAbstractValue(13), 8 },\n                                               { MakeAbstractValue(-53), MakeAbstractValue(23), 2 },\n                                               { MakeAbstractValue(-23), MakeAbstractValue(33), 1 },\n                                               { MakeAbstractValue(-13), MakeAbstractValue(43), 7 });\n}\n\nstatic const std::size_t N = 4;\n\n//! Testing blocked_nd_range interface\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Serial test\") {\n    SerialTest<N>();\n}\n\n#if !EMSCRIPTEN\n//! Testing blocked_nd_range interface with parallel_for\n//! \\brief \\ref requirement\nTEST_CASE(\"Parallel test\") {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        oneapi::tbb::global_control control(oneapi::tbb::global_control::max_allowed_parallelism, concurrency_level);\n        ParallelTest<N>();\n    }\n}\n#endif\n\n//! Testing blocked_nd_range with proportional splitting\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"blocked_nd_range proportional splitting\") {\n    oneapi::tbb::blocked_nd_range<int, 2> original{{0, 100}, {0, 100}};\n    oneapi::tbb::blocked_nd_range<int, 2> first(original);\n    oneapi::tbb::proportional_split ps(3, 1);\n    oneapi::tbb::blocked_nd_range<int, 2> second(first, ps);\n\n    int expected_first_end = static_cast<int>(\n        original.dim(0).begin() + ps.left() * (original.dim(0).end() - original.dim(0).begin()) / (ps.left() + ps.right())\n    );\n    if (first.dim(0).size() == second.dim(0).size()) {\n        // Splitting was made by cols\n        utils::check_range_bounds_after_splitting(original.dim(1), first.dim(1), second.dim(1), expected_first_end);\n    } else {\n        // Splitting was made by rows\n        utils::check_range_bounds_after_splitting(original.dim(0), first.dim(0), second.dim(0), expected_first_end);\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_blocked_range.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_assert.h\"\n#include \"common/utils_concurrency_limit.h\"\n\n#include \"oneapi/tbb/blocked_range.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include <vector>\n\n//! \\file conformance_blocked_range.cpp\n//! \\brief Test for [algorithms.blocked_range] specification\n\nclass AbstractValueType {\n    AbstractValueType() {}\n    int value;\npublic:\n    friend AbstractValueType MakeAbstractValueType( int i );\n    friend int GetValueOf( const AbstractValueType& v ) {return v.value;}\n};\n\nAbstractValueType MakeAbstractValueType( int i ) {\n    AbstractValueType x;\n    x.value = i;\n    return x;\n}\n\nstd::size_t operator-( const AbstractValueType& u, const AbstractValueType& v ) {\n    return GetValueOf(u) - GetValueOf(v);\n}\n\nbool operator<( const AbstractValueType& u, const AbstractValueType& v ) {\n    return GetValueOf(u) < GetValueOf(v);\n}\n\nAbstractValueType operator+( const AbstractValueType& u, std::size_t offset ) {\n    return MakeAbstractValueType(GetValueOf(u) + int(offset));\n}\n\nstatic void SerialTest() {\n    for( int x=-10; x<10; ++x ) {\n        for( int y=-10; y<10; ++y ) {\n            AbstractValueType i = MakeAbstractValueType(x);\n            AbstractValueType j = MakeAbstractValueType(y);\n            for( std::size_t k=1; k<10; ++k ) {\n                typedef oneapi::tbb::blocked_range<AbstractValueType> range_type;\n                range_type r( i, j, k );\n                utils::AssertSameType( r.empty(), true );\n                utils::AssertSameType( range_type::size_type(), std::size_t() );\n                utils::AssertSameType( static_cast<range_type::const_iterator*>(nullptr), static_cast<AbstractValueType*>(nullptr) );\n                utils::AssertSameType( r.begin(), MakeAbstractValueType(0) );\n                utils::AssertSameType( r.end(), MakeAbstractValueType(0) );\n                CHECK( r.empty()==(y<=x));\n                CHECK( r.grainsize()==k);\n                if( x<=y ) {\n                    utils::AssertSameType( r.is_divisible(), true );\n                    CHECK( r.is_divisible()==(std::size_t(y-x)>k) );\n                    CHECK( r.size()==std::size_t(y-x) );\n                    if( r.is_divisible() ) {\n                        oneapi::tbb::blocked_range<AbstractValueType> r2(r,oneapi::tbb::split());\n                        CHECK( GetValueOf(r.begin())==x );\n                        CHECK( GetValueOf(r.end())==GetValueOf(r2.begin()) );\n                        CHECK( GetValueOf(r2.end())==y );\n                        CHECK( r.grainsize()==k );\n                        CHECK( r2.grainsize()==k );\n                    }\n                }\n            }\n        }\n    }\n}\n\nconst int N = 1<<22;\nunsigned char Array[N];\n\nstruct Striker {\n    void operator()( const oneapi::tbb::blocked_range<int>& r ) const {\n        for( oneapi::tbb::blocked_range<int>::const_iterator i=r.begin(); i!=r.end(); ++i )\n            ++Array[i];\n    }\n};\n\nvoid ParallelTest() {\n    for (int i=0; i<N; i=i<3 ? i+1 : i*3) {\n        const oneapi::tbb::blocked_range<int> r( 0, i, 10 );\n        oneapi::tbb::parallel_for( r, Striker() );\n        for (int k=0; k<N; ++k) {\n            if (Array[k] != (k<i)) CHECK(false);\n            Array[k] = 0;\n        }\n    }\n}\n\n//! Testing blocked_range interface\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Basic serial\") {\n    SerialTest();\n}\n\n//! Testing blocked_range interface with parallel_for\n//! \\brief \\ref requirement\nTEST_CASE(\"Basic parallel\") {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        oneapi::tbb::global_control control(oneapi::tbb::global_control::max_allowed_parallelism, concurrency_level);\n        ParallelTest();\n    }\n}\n\n//! Testing blocked_range with proportional splitting\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"blocked_range proportional splitting\") {\n    oneapi::tbb::blocked_range<int> original(0, 100);\n    oneapi::tbb::blocked_range<int> first(original);\n    oneapi::tbb::proportional_split ps(3, 1);\n    oneapi::tbb::blocked_range<int> second(first, ps);\n\n    // Test proportional_split -> split conversion\n    oneapi::tbb::blocked_range<int> copy(original);\n    oneapi::tbb::split s = oneapi::tbb::split(ps);\n    oneapi::tbb::blocked_range<int> splitted_copy(copy, s);\n    CHECK(copy.size() == original.size() / 2);\n    CHECK(splitted_copy.size() == copy.size());\n\n\n    int expected_first_end = static_cast<int>(\n        original.begin() + ps.left() * (original.end() - original.begin()) / (ps.left() + ps.right())\n    );\n    utils::check_range_bounds_after_splitting(original, first, second, expected_first_end);\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Testing blocked_range deduction guides\n//! \\brief \\ref interface\nTEST_CASE(\"Deduction guides\") {\n    std::vector<const int *> v;\n\n    // check blocked_range(Value, Value, size_t)\n    oneapi::tbb::blocked_range r1(v.begin(), v.end());\n    static_assert(std::is_same<decltype(r1), oneapi::tbb::blocked_range<decltype(v)::iterator>>::value);\n\n    // check blocked_range(blocked_range &)\n    oneapi::tbb::blocked_range r2(r1);\n    static_assert(std::is_same<decltype(r2), decltype(r1)>::value);\n\n    // check blocked_range(blocked_range &&)\n    oneapi::tbb::blocked_range r3(std::move(r1));\n    static_assert(std::is_same<decltype(r3), decltype(r1)>::value);\n}\n#endif\n\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_blocked_range2d.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_assert.h\"\n#include \"common/utils_concurrency_limit.h\"\n\n#include \"oneapi/tbb/blocked_range2d.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n//! \\file conformance_blocked_range2d.cpp\n//! \\brief Test for [algorithms.blocked_range2d] specification\n\ntemplate<typename Tag>\nclass AbstractValueType {\n    AbstractValueType() {}\n    int value;\npublic:\n    template<typename OtherTag>\n    friend AbstractValueType<OtherTag> MakeAbstractValueType( int i );\n\n    template<typename OtherTag>\n    friend int GetValueOf( const AbstractValueType<OtherTag>& v ) ;\n};\n\ntemplate<typename Tag>\nAbstractValueType<Tag> MakeAbstractValueType( int i ) {\n    AbstractValueType<Tag> x;\n    x.value = i;\n    return x;\n}\n\ntemplate<typename Tag>\nint GetValueOf( const AbstractValueType<Tag>& v ) {return v.value;}\n\ntemplate<typename Tag>\nbool operator<( const AbstractValueType<Tag>& u, const AbstractValueType<Tag>& v ) {\n    return GetValueOf(u)<GetValueOf(v);\n}\n\ntemplate<typename Tag>\nstd::size_t operator-( const AbstractValueType<Tag>& u, const AbstractValueType<Tag>& v ) {\n    return GetValueOf(u)-GetValueOf(v);\n}\n\ntemplate<typename Tag>\nAbstractValueType<Tag> operator+( const AbstractValueType<Tag>& u, std::size_t offset ) {\n    return MakeAbstractValueType<Tag>(GetValueOf(u)+int(offset));\n}\n\nstruct RowTag {};\nstruct ColTag {};\n\nstatic void SerialTest() {\n    typedef AbstractValueType<RowTag> row_type;\n    typedef AbstractValueType<ColTag> col_type;\n    typedef oneapi::tbb::blocked_range2d<row_type,col_type> range_type;\n    for( int row_x=-10; row_x<10; ++row_x ) {\n        for( int row_y=row_x; row_y<10; ++row_y ) {\n            row_type row_i = MakeAbstractValueType<RowTag>(row_x);\n            row_type row_j = MakeAbstractValueType<RowTag>(row_y);\n            for( int row_grain=1; row_grain<10; ++row_grain ) {\n                for( int col_x=-10; col_x<10; ++col_x ) {\n                    for( int col_y=col_x; col_y<10; ++col_y ) {\n                        col_type col_i = MakeAbstractValueType<ColTag>(col_x);\n                        col_type col_j = MakeAbstractValueType<ColTag>(col_y);\n                        for( int col_grain=1; col_grain<10; ++col_grain ) {\n                            range_type r( row_i, row_j, row_grain, col_i, col_j, col_grain );\n                            utils::AssertSameType( r.is_divisible(), true );\n                            utils::AssertSameType( r.empty(), true );\n                            utils::AssertSameType( static_cast<range_type::row_range_type::const_iterator*>(nullptr), static_cast<row_type*>(nullptr) );\n                            utils::AssertSameType( static_cast<range_type::col_range_type::const_iterator*>(nullptr), static_cast<col_type*>(nullptr) );\n                            utils::AssertSameType( r.rows(), oneapi::tbb::blocked_range<row_type>( row_i, row_j, 1 ));\n                            utils::AssertSameType( r.cols(), oneapi::tbb::blocked_range<col_type>( col_i, col_j, 1 ));\n                            REQUIRE( r.empty()==(row_x==row_y||col_x==col_y) );\n                            REQUIRE( r.is_divisible()==(row_y-row_x>row_grain||col_y-col_x>col_grain) );\n                            if( r.is_divisible() ) {\n                                range_type r2(r,oneapi::tbb::split());\n                                if( GetValueOf(r2.rows().begin())==GetValueOf(r.rows().begin()) ) {\n                                    REQUIRE( GetValueOf(r2.rows().end())==GetValueOf(r.rows().end()) );\n                                    REQUIRE( GetValueOf(r2.cols().begin())==GetValueOf(r.cols().end()) );\n                                } else {\n                                    REQUIRE( GetValueOf(r2.cols().end())==GetValueOf(r.cols().end()) );\n                                    REQUIRE( GetValueOf(r2.rows().begin())==GetValueOf(r.rows().end()) );\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        }\n    }\n}\n\nconst int N = 1<<10;\n\nunsigned char Array[N][N];\n\nstruct Striker {\n   // Note: we use <int> here instead of <long> in order to test for problems similar to Quad 407676\n    void operator()( const oneapi::tbb::blocked_range2d<int>& r ) const {\n        for( oneapi::tbb::blocked_range<int>::const_iterator i=r.rows().begin(); i!=r.rows().end(); ++i )\n            for( oneapi::tbb::blocked_range<int>::const_iterator j=r.cols().begin(); j!=r.cols().end(); ++j )\n                ++Array[i][j];\n    }\n};\n\nvoid ParallelTest() {\n    for( int i=0; i<N; i=i<3 ? i+1 : i*3 ) {\n        for( int j=0; j<N; j=j<3 ? j+1 : j*3 ) {\n            const oneapi::tbb::blocked_range2d<int> r( 0, i, 7, 0, j, 5 );\n            oneapi::tbb::parallel_for( r, Striker() );\n            for( int k=0; k<N; ++k ) {\n                for( int l=0; l<N; ++l ) {\n                    if( Array[k][l] != (k<i && l<j) ) REQUIRE(false);\n                    Array[k][l] = 0;\n                }\n            }\n        }\n    }\n}\n\n//! Testing blocked_range2d interface\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Serial test\") {\n    SerialTest();\n}\n\n//! Testing blocked_range2d interface with parallel_for\n//! \\brief \\ref requirement\nTEST_CASE(\"Parallel test\") {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        oneapi::tbb::global_control control(oneapi::tbb::global_control::max_allowed_parallelism, concurrency_level);\n        ParallelTest();\n    }\n}\n\n//! Testing blocked_range2d with proportional splitting\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"blocked_range2d proportional splitting\") {\n    oneapi::tbb::blocked_range2d<int> original(0, 100, 0, 100);\n    oneapi::tbb::blocked_range2d<int> first(original);\n    oneapi::tbb::proportional_split ps(3, 1);\n    oneapi::tbb::blocked_range2d<int> second(first, ps);\n\n    int expected_first_end = static_cast<int>(\n        original.rows().begin() + ps.left() * (original.rows().end() - original.rows().begin()) / (ps.left() + ps.right())\n    );\n    if (first.rows().size() == second.rows().size()) {\n        // Splitting was made by cols\n        utils::check_range_bounds_after_splitting(original.cols(), first.cols(), second.cols(), expected_first_end);\n    } else {\n        // Splitting was made by rows\n        utils::check_range_bounds_after_splitting(original.rows(), first.rows(), second.rows(), expected_first_end);\n    }\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Testing blocked_range2d deduction guides\n//! \\brief \\ref interface\nTEST_CASE(\"Deduction guides\") {\n    std::vector<const unsigned long *> v;\n    std::vector<double> v2;\n\n    // check blocked_range2d(RowValue, RowValue, size_t, ColValue, ColValue, size_t)\n    oneapi::tbb::blocked_range2d r1(v.begin(), v.end(), 2, v2.begin(), v2.end(), 2);\n    static_assert(std::is_same<decltype(r1), oneapi::tbb::blocked_range2d<decltype(v)::iterator, decltype(v2)::iterator>>::value);\n\n    // check blocked_range2d(blocked_range2d &)\n    oneapi::tbb::blocked_range2d r2(r1);\n    static_assert(std::is_same<decltype(r2), decltype(r1)>::value);\n\n    // check blocked_range2d(blocked_range2d &&)\n    oneapi::tbb::blocked_range2d r3(std::move(r1));\n    static_assert(std::is_same<decltype(r3), decltype(r1)>::value);\n}\n#endif\n\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_blocked_range3d.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_assert.h\"\n#include \"common/utils_concurrency_limit.h\"\n\n#include \"oneapi/tbb/blocked_range3d.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include <vector>\n\n//! \\file conformance_blocked_range3d.cpp\n//! \\brief Test for [algorithms.blocked_range3d] specification\n\ntemplate<typename Tag>\nclass AbstractValueType {\n    AbstractValueType() {}\n    int value;\npublic:\n    template<typename OtherTag>\n    friend AbstractValueType<OtherTag> MakeAbstractValueType( int i );\n\n    template<typename OtherTag>\n    friend int GetValueOf( const AbstractValueType<OtherTag>& v ) ;\n};\n\ntemplate<typename Tag>\nAbstractValueType<Tag> MakeAbstractValueType( int i ) {\n    AbstractValueType<Tag> x;\n    x.value = i;\n    return x;\n}\n\ntemplate<typename Tag>\nint GetValueOf( const AbstractValueType<Tag>& v ) {return v.value;}\n\ntemplate<typename Tag>\nbool operator<( const AbstractValueType<Tag>& u, const AbstractValueType<Tag>& v ) {\n    return GetValueOf(u)<GetValueOf(v);\n}\n\ntemplate<typename Tag>\nstd::size_t operator-( const AbstractValueType<Tag>& u, const AbstractValueType<Tag>& v ) {\n    return GetValueOf(u)-GetValueOf(v);\n}\n\ntemplate<typename Tag>\nAbstractValueType<Tag> operator+( const AbstractValueType<Tag>& u, std::size_t offset ) {\n    return MakeAbstractValueType<Tag>(GetValueOf(u)+int(offset));\n}\n\nstruct PageTag {};\nstruct RowTag {};\nstruct ColTag {};\n\nstatic void SerialTest() {\n    typedef AbstractValueType<PageTag> page_type;\n    typedef AbstractValueType<RowTag> row_type;\n    typedef AbstractValueType<ColTag> col_type;\n    typedef oneapi::tbb::blocked_range3d<page_type,row_type,col_type> range_type;\n    for( int page_x=-4; page_x<4; ++page_x ) {\n        for( int page_y=page_x; page_y<4; ++page_y ) {\n            page_type page_i = MakeAbstractValueType<PageTag>(page_x);\n            page_type page_j = MakeAbstractValueType<PageTag>(page_y);\n            for( int page_grain=1; page_grain<4; ++page_grain ) {\n                for( int row_x=-4; row_x<4; ++row_x ) {\n                    for( int row_y=row_x; row_y<4; ++row_y ) {\n                        row_type row_i = MakeAbstractValueType<RowTag>(row_x);\n                        row_type row_j = MakeAbstractValueType<RowTag>(row_y);\n                        for( int row_grain=1; row_grain<4; ++row_grain ) {\n                            for( int col_x=-4; col_x<4; ++col_x ) {\n                                for( int col_y=col_x; col_y<4; ++col_y ) {\n                                    col_type col_i = MakeAbstractValueType<ColTag>(col_x);\n                                    col_type col_j = MakeAbstractValueType<ColTag>(col_y);\n                                    for( int col_grain=1; col_grain<4; ++col_grain ) {\n                                        range_type r( page_i, page_j, page_grain, row_i, row_j, row_grain, col_i, col_j, col_grain );\n                                        utils::AssertSameType( r.is_divisible(), true );\n\n                                        utils::AssertSameType( r.empty(), true );\n\n                                        utils::AssertSameType( static_cast<range_type::page_range_type::const_iterator*>(nullptr), static_cast<page_type*>(nullptr) );\n                                        utils::AssertSameType( static_cast<range_type::row_range_type::const_iterator*>(nullptr), static_cast<row_type*>(nullptr) );\n                                        utils::AssertSameType( static_cast<range_type::col_range_type::const_iterator*>(nullptr), static_cast<col_type*>(nullptr) );\n\n                                        utils::AssertSameType( r.pages(), oneapi::tbb::blocked_range<page_type>( page_i, page_j, 1 ));\n                                        utils::AssertSameType( r.rows(), oneapi::tbb::blocked_range<row_type>( row_i, row_j, 1 ));\n                                        utils::AssertSameType( r.cols(), oneapi::tbb::blocked_range<col_type>( col_i, col_j, 1 ));\n\n                                        REQUIRE( r.empty()==(page_x==page_y||row_x==row_y||col_x==col_y) );\n\n                                        REQUIRE( r.is_divisible()==(page_y-page_x>page_grain||row_y-row_x>row_grain||col_y-col_x>col_grain) );\n\n                                        if( r.is_divisible() ) {\n                                            range_type r2(r,oneapi::tbb::split());\n                                            if( (GetValueOf(r2.pages().begin())==GetValueOf(r.pages().begin())) && (GetValueOf(r2.rows().begin())==GetValueOf(r.rows().begin())) ) {\n                                                REQUIRE( GetValueOf(r2.pages().end())==GetValueOf(r.pages().end()) );\n                                                REQUIRE( GetValueOf(r2.rows().end())==GetValueOf(r.rows().end()) );\n                                                REQUIRE( GetValueOf(r2.cols().begin())==GetValueOf(r.cols().end()) );\n                                            } else {\n                                                if ( (GetValueOf(r2.pages().begin())==GetValueOf(r.pages().begin())) && (GetValueOf(r2.cols().begin())==GetValueOf(r.cols().begin())) ) {\n                                                    REQUIRE( GetValueOf(r2.pages().end())==GetValueOf(r.pages().end()) );\n                                                    REQUIRE( GetValueOf(r2.cols().end())==GetValueOf(r.cols().end()) );\n                                                    REQUIRE( GetValueOf(r2.rows().begin())==GetValueOf(r.rows().end()) );\n                                                } else {\n                                                    REQUIRE( GetValueOf(r2.rows().end())==GetValueOf(r.rows().end()) );\n                                                    REQUIRE( GetValueOf(r2.cols().end())==GetValueOf(r.cols().end()) );\n                                                    REQUIRE( GetValueOf(r2.pages().begin())==GetValueOf(r.pages().end()) );\n                                                }\n                                            }\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        }\n    }\n}\n\nconst int N = 1<<5;\n\nunsigned char Array[N][N][N];\n\nstruct Striker {\n   // Note: we use <int> here instead of <long> in order to test for problems similar to Quad 407676\n    void operator()( const oneapi::tbb::blocked_range3d<int>& r ) const {\n        for( oneapi::tbb::blocked_range<int>::const_iterator i=r.pages().begin(); i!=r.pages().end(); ++i )\n            for( oneapi::tbb::blocked_range<int>::const_iterator j=r.rows().begin(); j!=r.rows().end(); ++j )\n                for( oneapi::tbb::blocked_range<int>::const_iterator k=r.cols().begin(); k!=r.cols().end(); ++k )\n                    ++Array[i][j][k];\n    }\n};\n\nvoid ParallelTest() {\n    for( int i=0; i<N; i=i<3 ? i+1 : i*3 ) {\n        for( int j=0; j<N; j=j<3 ? j+1 : j*3 ) {\n            for( int k=0; k<N; k=k<3 ? k+1 : k*3 ) {\n                const oneapi::tbb::blocked_range3d<int> r( 0, i, 5, 0, j, 3, 0, k, 1 );\n                oneapi::tbb::parallel_for( r, Striker() );\n                for( int l=0; l<N; ++l ) {\n                    for( int m=0; m<N; ++m ) {\n                        for( int n=0; n<N; ++n ) {\n                             if( Array[l][m][n] != (l<i && m<j && n<k) ) REQUIRE(false);\n                             Array[l][m][n] = 0;\n                        }\n                    }\n                }\n            }\n        }\n    }\n}\n\n//! Testing blocked_range3d interface\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Serial test\") {\n    SerialTest();\n}\n\n//! Testing blocked_range3d interface with parallel_for\n//! \\brief \\ref requirement\nTEST_CASE(\"Parallel test\") {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        oneapi::tbb::global_control control(oneapi::tbb::global_control::max_allowed_parallelism, concurrency_level);\n        ParallelTest();\n    }\n}\n\n//! Testing blocked_range3d with proportional splitting\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"blocked_range3d proportional splitting\") {\n    oneapi::tbb::blocked_range3d<int> original(0, 100, 0, 100, 0, 100);\n    oneapi::tbb::blocked_range3d<int> first(original);\n    oneapi::tbb::proportional_split ps(3, 1);\n    oneapi::tbb::blocked_range3d<int> second(first, ps);\n\n    int expected_first_end = static_cast<int>(\n        original.rows().begin() + ps.left() * (original.rows().end() - original.rows().begin()) / (ps.left() + ps.right())\n    );\n    if (first.rows().size() == second.rows().size()) {\n        if (first.cols().size() == second.cols().size()) {\n            // Splitting was made by pages\n            utils::check_range_bounds_after_splitting(original.pages(), first.pages(), second.pages(), expected_first_end);\n        } else {\n            // Splitting was made by cols\n            utils::check_range_bounds_after_splitting(original.cols(), first.cols(), second.cols(), expected_first_end);\n        }\n    } else {\n        // Splitting was made by rows\n        utils::check_range_bounds_after_splitting(original.rows(), first.rows(), second.rows(), expected_first_end);\n    }\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Testing blocked_range3d deduction guides\n//! \\brief \\ref interface\nTEST_CASE(\"Deduction guides\") {\n    std::vector<const unsigned long *> v;\n    std::vector<double> v2;\n    std::vector<std::vector<int>> v3;\n\n    // check blocked_range2d(PageValue, PageValue, size_t, RowValue, RowValue, size_t, ColValue, ColValue, size_t)\n    oneapi::tbb::blocked_range3d r1(v.begin(), v.end(), 2, v2.begin(), v2.end(), 2, v3.begin(), v3.end(), 6);\n    static_assert(std::is_same<decltype(r1),\n        oneapi::tbb::blocked_range3d<decltype(v)::iterator, decltype(v2)::iterator, decltype(v3)::iterator>>::value);\n\n    // check blocked_range2d(blocked_range3d &)\n    oneapi::tbb::blocked_range3d r2(r1);\n    static_assert(std::is_same<decltype(r2), decltype(r1)>::value);\n\n    // check blocked_range2d(blocked_range3d &&)\n    oneapi::tbb::blocked_range3d r3(std::move(r1));\n    static_assert(std::is_same<decltype(r3), decltype(r1)>::value);\n}\n#endif\n\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_blocked_rangeNd.cpp",
    "content": "/*\n    Copyright (c) 2017-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_assert.h\"\n#include \"common/utils_concurrency_limit.h\"\n\n//! \\file conformance_blocked_rangeNd.cpp\n//! \\brief Test for [preview] functionality\n\n#define TBB_PREVIEW_BLOCKED_RANGE_ND 1\n#include \"oneapi/tbb/blocked_rangeNd.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include <algorithm> // std::for_each\n#include <array>\n\n// AbstractValueType class represents Value concept's requirements in the most abstract way\nclass AbstractValueType {\n    int value;\n    AbstractValueType() {}\npublic:\n    friend AbstractValueType MakeAbstractValue(int i);\n    friend int GetValueOf(const AbstractValueType& v);\n};\n\nint GetValueOf(const AbstractValueType& v) { return v.value; }\n\nAbstractValueType MakeAbstractValue(int i) {\n    AbstractValueType x;\n    x.value = i;\n    return x;\n}\n\n// operator- returns amount of elements of AbstractValueType between u and v\nstd::size_t operator-(const AbstractValueType& u, const AbstractValueType& v) {\n    return GetValueOf(u) - GetValueOf(v);\n}\n\nbool operator<(const AbstractValueType& u, const AbstractValueType& v) {\n    return GetValueOf(u) < GetValueOf(v);\n}\n\nAbstractValueType operator+(const AbstractValueType& u, std::size_t offset) {\n    return MakeAbstractValue(GetValueOf(u) + int(offset));\n}\n\ntemplate<typename range_t, unsigned int N>\nstruct range_utils {\n    using val_t = typename range_t::value_type;\n\n    template<typename EntityType, std::size_t DimSize>\n    using data_type = std::array<typename range_utils<range_t, N - 1>::template data_type<EntityType, DimSize>, DimSize>;\n\n    template<typename EntityType, std::size_t DimSize>\n    static void init_data(data_type<EntityType, DimSize>& data) {\n        std::for_each(data.begin(), data.end(), range_utils<range_t, N - 1>::template init_data<EntityType, DimSize>);\n    }\n\n    template<typename EntityType, std::size_t DimSize>\n    static void increment_data(const range_t& range, data_type<EntityType, DimSize>& data) {\n        auto begin = data.begin() + range.dim(N - 1).begin();\n        // same as \"auto end = out.begin() + range.dim(N - 1).end();\"\n        auto end = begin + range.dim(N - 1).size();\n        for (auto i = begin; i != end; ++i) {\n            range_utils<range_t, N - 1>::template increment_data<EntityType, DimSize>(range, *i);\n        }\n    }\n\n    template<typename EntityType, std::size_t DimSize>\n    static void check_data(const range_t& range, data_type<EntityType, DimSize>& data) {\n        auto begin = data.begin() + range.dim(N - 1).begin();\n        // same as \"auto end = out.begin() + range.dim(N - 1).end();\"\n        auto end = begin + range.dim(N - 1).size();\n        for (auto i = begin; i != end; ++i) {\n            range_utils<range_t, N - 1>::template check_data<EntityType, DimSize>(range, *i);\n        }\n    }\n\n// BullseyeCoverage Compile C++ with GCC 5.4 warning suppression\n// Sequence points error in braced initializer list\n#if __GNUC__ && !defined(__clang__) && !defined(__INTEL_COMPILER)\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wsequence-point\"\n#endif\n    template<typename input_t, std::size_t... Is>\n    static range_t make_range(std::size_t shift, bool negative, val_t(*gen)(input_t), oneapi::tbb::detail::index_sequence<Is...>) {\n        return range_t( { { gen(negative ? -input_t(Is + shift) : 0), gen(input_t(Is + shift)), Is + 1} ... } );\n    }\n#if __GNUC__ && !defined(__clang__) && !defined(__INTEL_COMPILER)\n#pragma GCC diagnostic pop\n#endif\n\n    static bool is_empty(const range_t& range) {\n        if (range.dim(N - 1).empty()) { return true; }\n        return range_utils<range_t, N - 1>::is_empty(range);\n    }\n\n    static bool is_divisible(const range_t& range) {\n        if (range.dim(N - 1).is_divisible()) { return true; }\n        return range_utils<range_t, N - 1>::is_divisible(range);\n    }\n\n    static void check_splitting(const range_t& range_split, const range_t& range_new, int(*get)(const val_t&), bool split_checker = false) {\n        if (get(range_split.dim(N - 1).begin()) == get(range_new.dim(N - 1).begin())) {\n            REQUIRE(get(range_split.dim(N - 1).end()) == get(range_new.dim(N - 1).end()));\n        }\n        else {\n            REQUIRE((get(range_split.dim(N - 1).end()) == get(range_new.dim(N - 1).begin()) && !split_checker));\n            split_checker = true;\n        }\n        range_utils<range_t, N - 1>::check_splitting(range_split, range_new, get, split_checker);\n    }\n\n};\n\ntemplate<typename range_t>\nstruct range_utils<range_t, 0> {\n    using val_t = typename range_t::value_type;\n\n    template<typename EntityType, std::size_t DimSize>\n    using data_type = EntityType;\n\n    template<typename EntityType, std::size_t DimSize>\n    static void init_data(data_type<EntityType, DimSize>& data) { data = 0; }\n\n    template<typename EntityType, std::size_t DimSize>\n    static void increment_data(const range_t&, data_type<EntityType, DimSize>& data) { ++data; }\n\n    template<typename EntityType, std::size_t DimSize>\n    static void check_data(const range_t&, data_type<EntityType, DimSize>& data) {\n        REQUIRE(data == 1);\n    }\n\n    static bool is_empty(const range_t&) { return false; }\n\n    static bool is_divisible(const range_t&) { return false; }\n\n    static void check_splitting(const range_t&, const range_t&, int(*)(const val_t&), bool) {}\n};\n\n// We need MakeInt function to pass it into make_range as factory function\n// because of matching make_range with AbstractValueType and other types too\nint MakeInt(int i) { return i; }\n\ntemplate<unsigned int DimAmount>\nvoid SerialTest() {\n    static_assert((oneapi::tbb::blocked_rangeNd<int, DimAmount>::ndims() == oneapi::tbb::blocked_rangeNd<AbstractValueType, DimAmount>::ndims()),\n                         \"different amount of dimensions\");\n\n    using range_t = oneapi::tbb::blocked_rangeNd<AbstractValueType, DimAmount>;\n    using utils_t = range_utils<range_t, DimAmount>;\n\n    // Generate empty range\n    range_t r = utils_t::make_range(0, true, &MakeAbstractValue, oneapi::tbb::detail::make_index_sequence<DimAmount>());\n\n    utils::AssertSameType(r.is_divisible(), bool());\n    utils::AssertSameType(r.empty(), bool());\n    utils::AssertSameType(range_t::ndims(), 0U);\n\n    REQUIRE((r.empty() == utils_t::is_empty(r) && r.empty()));\n    REQUIRE(r.is_divisible() == utils_t::is_divisible(r));\n\n    // Generate not-empty range divisible range\n    r = utils_t::make_range(1, true, &MakeAbstractValue, oneapi::tbb::detail::make_index_sequence<DimAmount>());\n    REQUIRE((r.empty() == utils_t::is_empty(r) && !r.empty()));\n    REQUIRE((r.is_divisible() == utils_t::is_divisible(r) && r.is_divisible()));\n\n    range_t r_new(r, oneapi::tbb::split());\n    utils_t::check_splitting(r, r_new, &GetValueOf);\n\n    SerialTest<DimAmount - 1>();\n}\ntemplate<> void SerialTest<0>() {}\n\ntemplate<unsigned int DimAmount>\nvoid ParallelTest() {\n    using range_t = oneapi::tbb::blocked_rangeNd<int, DimAmount>;\n    using utils_t = range_utils<range_t, DimAmount>;\n\n    // Max size is                                 1 << 20 - 1 bytes\n    // Thus size of one dimension's elements is    1 << (20 / DimAmount - 1) bytes\n    typename utils_t::template data_type<unsigned char, 1 << (20 / DimAmount - 1)> data;\n    utils_t::init_data(data);\n\n    range_t r = utils_t::make_range((1 << (20 / DimAmount - 1)) - DimAmount, false, &MakeInt, oneapi::tbb::detail::make_index_sequence<DimAmount>());\n\n    oneapi::tbb::parallel_for(r, [&data](const range_t& range) {\n        utils_t::increment_data(range, data);\n    });\n\n    utils_t::check_data(r, data);\n\n    ParallelTest<DimAmount - 1>();\n}\ntemplate<> void ParallelTest<0>() {}\n\n//! Testing blocked_rangeNd construction\n//! \\brief \\ref interface\nTEST_CASE(\"Construction\") {\n    oneapi::tbb::blocked_rangeNd<int, 1>{ { 0,13,3 } };\n\n    oneapi::tbb::blocked_rangeNd<int, 1>{ oneapi::tbb::blocked_range<int>{ 0,13,3 } };\n\n    oneapi::tbb::blocked_rangeNd<int, 2>(oneapi::tbb::blocked_range<int>(-8923, 8884, 13), oneapi::tbb::blocked_range<int>(-8923, 5, 13));\n\n    oneapi::tbb::blocked_rangeNd<int, 2>({ -8923, 8884, 13 }, { -8923, 8884, 13 });\n\n    oneapi::tbb::blocked_range<int> r1(0, 13);\n\n    oneapi::tbb::blocked_range<int> r2(-12, 23);\n\n    oneapi::tbb::blocked_rangeNd<int, 2>({ { -8923, 8884, 13 }, r1});\n\n    oneapi::tbb::blocked_rangeNd<int, 2>({ r2, r1 });\n\n    oneapi::tbb::blocked_rangeNd<int, 2>(r1, r2);\n\n    oneapi::tbb::blocked_rangeNd<AbstractValueType, 4>({ MakeAbstractValue(-3), MakeAbstractValue(13), 8 },\n                                               { MakeAbstractValue(-53), MakeAbstractValue(23), 2 },\n                                               { MakeAbstractValue(-23), MakeAbstractValue(33), 1 },\n                                               { MakeAbstractValue(-13), MakeAbstractValue(43), 7 });\n}\n\nstatic const std::size_t N = 4;\n\n//! Testing blocked_rangeNd interface\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Serial test\") {\n    SerialTest<N>();\n}\n\n#if !EMSCRIPTEN\n//! Testing blocked_rangeNd interface with parallel_for\n//! \\brief \\ref requirement\nTEST_CASE(\"Parallel test\") {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        oneapi::tbb::global_control control(oneapi::tbb::global_control::max_allowed_parallelism, concurrency_level);\n        ParallelTest<N>();\n    }\n}\n#endif\n\n//! Testing blocked_rangeNd with proportional splitting\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"blocked_rangeNd proportional splitting\") {\n    oneapi::tbb::blocked_rangeNd<int, 2> original{{0, 100}, {0, 100}};\n    oneapi::tbb::blocked_rangeNd<int, 2> first(original);\n    oneapi::tbb::proportional_split ps(3, 1);\n    oneapi::tbb::blocked_rangeNd<int, 2> second(first, ps);\n\n    int expected_first_end = static_cast<int>(\n        original.dim(0).begin() + ps.left() * (original.dim(0).end() - original.dim(0).begin()) / (ps.left() + ps.right())\n    );\n    if (first.dim(0).size() == second.dim(0).size()) {\n        // Splitting was made by cols\n        utils::check_range_bounds_after_splitting(original.dim(1), first.dim(1), second.dim(1), expected_first_end);\n    } else {\n        // Splitting was made by rows\n        utils::check_range_bounds_after_splitting(original.dim(0), first.dim(0), second.dim(0), expected_first_end);\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_broadcast_node.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"conformance_flowgraph.h\"\n\n//! \\file conformance_broadcast_node.cpp\n//! \\brief Test for [flow_graph.broadcast_node] specification\n\nusing input_msg = conformance::message</*default_ctor*/false, /*copy_ctor*/true/*enable for queue_node successor*/, /*copy_assign*/true/*enable for queue_node successor*/>;\n\n//! Test function_node broadcast\n//! \\brief \\ref requirement\nTEST_CASE(\"broadcast_node broadcasts\"){\n    conformance::test_forwarding<oneapi::tbb::flow::broadcast_node<int>, int>(1);\n    conformance::test_forwarding<oneapi::tbb::flow::broadcast_node<input_msg>, input_msg>(1);\n}\n\n//! Test broadcast_node buffering\n//! \\brief \\ref requirement\nTEST_CASE(\"broadcast_node buffering\"){\n    conformance::test_buffering<oneapi::tbb::flow::broadcast_node<int>, int>();\n}\n\n//! Test inheritance relations\n//! \\brief \\ref interface\nTEST_CASE(\"broadcast_node superclasses\"){\n    conformance::test_inheritance<oneapi::tbb::flow::broadcast_node<int>, int, int>();\n    conformance::test_inheritance<oneapi::tbb::flow::broadcast_node<float>, float, float>();\n    conformance::test_inheritance<oneapi::tbb::flow::broadcast_node<input_msg>, input_msg, input_msg>();\n}\n\n//! The node that is constructed has a reference to the same graph object as src.\n//! The predecessors and successors of src are not copied.\n//! \\brief \\ref interface\nTEST_CASE(\"broadcast_node copy constructor\"){\n    using namespace oneapi::tbb::flow;\n    graph g;\n\n    broadcast_node<int> node0(g);\n    broadcast_node<int> node1(g);\n    conformance::test_push_receiver<int> node2(g);\n    conformance::test_push_receiver<int> node3(g);\n\n    oneapi::tbb::flow::make_edge(node0, node1);\n    oneapi::tbb::flow::make_edge(node1, node2);\n\n    broadcast_node<int> node_copy(node1);\n\n    oneapi::tbb::flow::make_edge(node_copy, node3);\n\n    node_copy.try_put(1);\n    g.wait_for_all();\n\n    CHECK_MESSAGE((conformance::get_values(node2).size() == 0 && conformance::get_values(node3).size() == 1), \"Copied node doesn`t copy successor\");\n\n    node0.try_put(1);\n    g.wait_for_all();\n\n    CHECK_MESSAGE((conformance::get_values(node2).size() == 1 && conformance::get_values(node3).size() == 0), \"Copied node doesn`t copy predecessor\");\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_buffer_node.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#define CONFORMANCE_BUFFERING_NODES\n\n#include \"conformance_flowgraph.h\"\n\n//! \\file conformance_buffer_node.cpp\n//! \\brief Test for [flow_graph.buffer_node] specification\n\n//! Test buffer_node broadcast\n//! \\brief \\ref requirement\nTEST_CASE(\"buffer_node single_push\"){\n    conformance::test_forwarding_single_push<oneapi::tbb::flow::buffer_node<int>>();\n}\n\n//! Test function_node buffering\n//! \\brief \\ref requirement\nTEST_CASE(\"buffer_node buffering\"){\n    conformance::test_buffering<oneapi::tbb::flow::buffer_node<int>, int>();\n}\n\n//! Constructs an empty buffer_node that belongs to the same graph g as src.\n//! Any intermediate state of src, including its links to predecessors and successors, is not copied.\n//! \\brief \\ref requirement\nTEST_CASE(\"buffer_node copy constructor\"){\n    conformance::test_copy_ctor_for_buffering_nodes<oneapi::tbb::flow::buffer_node<int>>();\n}\n\n//! Test inheritance relations\n//! \\brief \\ref interface\nTEST_CASE(\"buffer_node superclasses\"){\n    conformance::test_inheritance<oneapi::tbb::flow::buffer_node<int>, int, int>();\n    conformance::test_inheritance<oneapi::tbb::flow::buffer_node<void*>, void*, void*>();\n}\n\n//! Test buffer_node node `try_put()` and `try_get()`\n//! \\brief \\ref requirement\nTEST_CASE(\"buffer_node methods\"){\n    oneapi::tbb::flow::graph g;\n    oneapi::tbb::flow::buffer_node<int> testing_node(g);\n\n    int tmp1 = -1;\n    int tmp2 = -1;\n\n    CHECK_MESSAGE((!testing_node.try_get(tmp1) && tmp1 == -1), \"`try_get` must returns false if there is no non-reserved item currently in the node.\");\n\n    testing_node.try_put(1);\n    testing_node.try_put(2);\n\n    g.wait_for_all();\n    testing_node.try_get(tmp1);\n    CHECK_MESSAGE((tmp1 == 1 || tmp1 == 2), \"Messages must be an arbitrary order\");\n\n    testing_node.try_get(tmp2);\n    CHECK_MESSAGE((tmp2 != -1 && tmp2 != tmp1), \"Additional `try_get()' does not receive the same value as previous\");\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_collaborative_call_once.cpp",
    "content": "/*\n    Copyright (c) 2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    // unreachable code\n    #pragma warning( push )\n    #pragma warning( disable: 4702 )\n#endif\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"common/test.h\"\n#include \"oneapi/tbb/collaborative_call_once.h\"\n\n#include \"common/utils.h\"\n#include \"common/utils_concurrency_limit.h\"\n#include \"common/spin_barrier.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/task_group.h\"\n\n#include <type_traits>\n#include <exception>\n\n//! \\file conformance_collaborative_call_once.cpp\n//! \\brief Test for [algorithms.collaborative_call_once] specification\n\n//! Test for collaborative_once_flag member functions to be matched with spec\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"collaborative_once_flag member functions match\") {\n    REQUIRE_MESSAGE(std::is_default_constructible<oneapi::tbb::collaborative_once_flag>::value == true, \n        \"collaborative_once_flag must be default constructible\");\n    REQUIRE_MESSAGE(std::is_copy_constructible<oneapi::tbb::collaborative_once_flag>::value == false, \n        \"collaborative_once_flag must not be copy constructible\");\n    REQUIRE_MESSAGE(std::is_copy_assignable<oneapi::tbb::collaborative_once_flag>::value == false, \n        \"collaborative_once_flag must not be copy assignable\");\n    REQUIRE_MESSAGE(std::is_move_constructible<oneapi::tbb::collaborative_once_flag>::value == false, \n        \"collaborative_once_flag must not be move constructible\");\n    REQUIRE_MESSAGE(std::is_move_assignable<oneapi::tbb::collaborative_once_flag>::value == false, \n        \"collaborative_once_flag must not be move assignable\");\n}\n\n//! Test for collaborative_call_once to execute function exactly once\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"collaborative_call_once executes function exactly once\") {\n    oneapi::tbb::collaborative_once_flag once_flag;\n\n    for (int iter = 0; iter < 100; ++iter) {\n        oneapi::tbb::collaborative_call_once(once_flag, [](int number) {\n            // Will be executed only on first iteration\n            REQUIRE(number == 0);\n        }, iter);\n    }\n\n    // concurrent call\n    std::size_t num_threads = utils::get_platform_max_threads();\n    utils::SpinBarrier barrier{num_threads};\n\n    int flag = 0;\n    auto func = [&flag] { flag++; };\n\n    oneapi::tbb::collaborative_once_flag once_flag_concurrent;\n    utils::NativeParallelFor(num_threads, [&](std::size_t) {\n        barrier.wait();\n        oneapi::tbb::collaborative_call_once(once_flag_concurrent, func);\n    });\n    REQUIRE(flag == 1);\n}\n\n\n#if TBB_USE_EXCEPTIONS\n\n//! Exception is received only by winner thread\n//! \\brief \\ref error_guessing \\ref requirement\nTEST_CASE(\"Exception is received only by winner thread\") {\n    int num_threads = static_cast<int>(utils::get_platform_max_threads());\n    utils::SpinBarrier barrier(num_threads);\n\n    oneapi::tbb::task_group tg;\n    oneapi::tbb::collaborative_once_flag flag;\n\n    for (int i = 0; i < num_threads-1; ++i) {\n        tg.run([&flag, &barrier] {\n            barrier.wait();\n            try {\n                oneapi::tbb::collaborative_call_once(flag, [] { });\n            } catch(...) {\n                REQUIRE_MESSAGE(false, \"Unreachable code\");\n            }\n        });\n    };\n\n    bool exception_happened{false};\n    try {\n        oneapi::tbb::collaborative_call_once(flag, [&barrier] {\n            barrier.wait();\n            throw std::exception{};\n        });\n    } catch (std::exception&) {\n        exception_happened = true;\n    }\n\n    REQUIRE_MESSAGE(exception_happened == true, \"Exception hasn't been received from the winner thread\");\n    tg.wait();\n}\n\n#endif\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    #pragma warning( pop )\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_combinable.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_report.h\"\n#include \"common/spin_barrier.h\"\n#include \"common/checktype.h\"\n\n#include \"common/container_move_support.h\"\n\n#include \"oneapi/tbb/combinable.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/blocked_range.h\"\n#include \"oneapi/tbb/global_control.h\"\n#include \"oneapi/tbb/tbb_allocator.h\"\n// INFO: #include \"oneapi/tbb/tick_count.h\"\n\n#include <cstring>\n#include <vector>\n#include <utility>\n\n//! \\file conformance_combinable.cpp\n//! \\brief Test for [tls.combinable] specification\n\n//! Minimum number of threads\nconst int MinThread = 1;\n\n//! Maximum number of threads\nconst int MaxThread = 4;\n\nstatic std::atomic<int> construction_counter;\nstatic std::atomic<int> destruction_counter;\n\nconst int REPETITIONS = 10;\nconst int N = 100000;\nconst double EXPECTED_SUM = (REPETITIONS + 1) * N;\n\n//\n// A minimal class\n// Define: default and copy constructor, and allow implicit operator&\n// also operator=\n//\n\nclass minimalCombinable {\nprivate:\n    int my_value;\npublic:\n    minimalCombinable(int val=0) : my_value(val) { ++construction_counter; }\n    minimalCombinable( const minimalCombinable&m ) : my_value(m.my_value) { ++construction_counter; }\n    minimalCombinable& operator=(const minimalCombinable& other) { my_value = other.my_value; return *this; }\n    minimalCombinable& operator+=(const minimalCombinable& other) { my_value += other.my_value; return *this; }\n    operator int() const { return my_value; }\n    ~minimalCombinable() { ++destruction_counter; }\n    void set_value( const int i ) { my_value = i; }\n    int value( ) const { return my_value; }\n};\n\n//// functors for initialization and combine\n\ntemplate <typename T>\nstruct FunctorAddFinit {\n    T operator()() { return 0; }\n};\n\ntemplate <typename T>\nstruct FunctorAddFinit7 {\n    T operator()() { return 7; }\n};\n\ntemplate <typename T>\nstruct FunctorAddCombine {\n    T operator()(T left, T right ) const {\n        return left + right;\n    }\n};\n\ntemplate <typename T>\nstruct FunctorAddCombineRef {\n    T operator()(const T& left, const T& right ) const {\n        return left + right;\n    }\n};\n\ntemplate <typename T>\nT my_combine( T left, T right) { return left + right; }\n\ntemplate <typename T>\nT my_combine_ref( const T &left, const T &right) { return left + right; }\n\ntemplate <typename T>\nclass CombineEachHelper {\npublic:\n    CombineEachHelper(T& _result) : my_result(_result) {}\n    void operator()(const T& new_bit) { my_result +=  new_bit; }\nprivate:\n    T& my_result;\n};\n\ntemplate <typename T>\nclass CombineEachHelperCnt {\npublic:\n    CombineEachHelperCnt(T& _result, int& _nbuckets) : my_result(_result), nBuckets(_nbuckets) {}\n    void operator()(const T& new_bit) { my_result +=  new_bit; ++nBuckets; }\nprivate:\n    T& my_result;\n    int& nBuckets;\n};\n\ntemplate <typename T>\nclass CombineEachVectorHelper {\npublic:\n    typedef std::vector<T, oneapi::tbb::tbb_allocator<T> > ContainerType;\n    CombineEachVectorHelper(T& _result) : my_result(_result) { }\n    void operator()(const ContainerType& new_bit) {\n        for(typename ContainerType::const_iterator ci = new_bit.begin(); ci != new_bit.end(); ++ci) {\n            my_result +=  *ci;\n        }\n    }\n\nprivate:\n    T& my_result;\n};\n\n//// end functors\n\n// parallel body with a test for first access\ntemplate <typename T>\nclass ParallelScalarBody: utils::NoAssign {\n\n    oneapi::tbb::combinable<T> &sums;\n\npublic:\n\n    ParallelScalarBody ( oneapi::tbb::combinable<T> &_sums ) : sums(_sums) { }\n\n    void operator()( const oneapi::tbb::blocked_range<int> &r ) const {\n        for (int i = r.begin(); i != r.end(); ++i) {\n            bool was_there;\n            T& my_local = sums.local(was_there);\n            if(!was_there) my_local = 0;\n             my_local +=  1 ;\n        }\n    }\n\n};\n\n// parallel body with no test for first access\ntemplate <typename T>\nclass ParallelScalarBodyNoInit: utils::NoAssign {\n\n    oneapi::tbb::combinable<T> &sums;\n\npublic:\n\n    ParallelScalarBodyNoInit ( oneapi::tbb::combinable<T> &_sums ) : sums(_sums) { }\n\n    void operator()( const oneapi::tbb::blocked_range<int> &r ) const {\n        for (int i = r.begin(); i != r.end(); ++i) {\n             sums.local() +=  1 ;\n        }\n    }\n\n};\n\ntemplate< typename T >\nvoid RunParallelScalarTests(const char* /* test_name */) {\n    for (int p = MinThread; p <= MaxThread; ++p) {\n\n        if (p == 0) continue;\n        // REMARK(\"  Testing parallel %s on %d thread(s)...\\n\", test_name, p);\n        oneapi::tbb::global_control gc(oneapi::tbb::global_control::max_allowed_parallelism, p);\n\n        // INFO: oneapi::tbb::tick_count t0;\n        T combine_sum(0);\n        T combine_ref_sum(0);\n        T combine_finit_sum(0);\n        T combine_each_sum(0);\n        T copy_construct_sum(0);\n        T copy_assign_sum(0);\n        T move_construct_sum(0);\n        T move_assign_sum(0);\n\n        for (int t = -1; t < REPETITIONS; ++t) {\n            // INFO: if (Verbose && t == 0) t0 = oneapi::tbb::tick_count::now();\n\n            // test uninitialized parallel combinable\n            oneapi::tbb::combinable<T> sums;\n            oneapi::tbb::parallel_for( oneapi::tbb::blocked_range<int>( 0, N, 10000 ), ParallelScalarBody<T>( sums ) );\n            combine_sum += sums.combine(my_combine<T>);\n            combine_ref_sum += sums.combine(my_combine_ref<T>);\n\n            // test combinable::clear()\n            oneapi::tbb::combinable<T> sums_to_clear;\n            oneapi::tbb::parallel_for( oneapi::tbb::blocked_range<int>(0, N, 10000), ParallelScalarBody<T>(sums_to_clear) );\n            sums_to_clear.clear();\n            CHECK_MESSAGE(sums_to_clear.combine(my_combine<T>) == 0, \"Failed combinable::clear test\");\n\n            // test parallel combinable preinitialized with a functor that returns 0\n            FunctorAddFinit<T> my_finit_decl;\n            oneapi::tbb::combinable<T> finit_combinable(my_finit_decl);\n            oneapi::tbb::parallel_for( oneapi::tbb::blocked_range<int>( 0, N, 10000 ), ParallelScalarBodyNoInit<T>( finit_combinable ) );\n            combine_finit_sum += finit_combinable.combine(my_combine<T>);\n\n            // test another way of combining the elements using CombineEachHelper<T> functor\n            CombineEachHelper<T> my_helper(combine_each_sum);\n            sums.combine_each(my_helper);\n\n            // test copy constructor for parallel combinable\n            oneapi::tbb::combinable<T> copy_constructed(sums);\n            copy_construct_sum += copy_constructed.combine(my_combine<T>);\n\n            // test copy assignment for uninitialized parallel combinable\n            oneapi::tbb::combinable<T> assigned;\n            assigned = sums;\n            copy_assign_sum += assigned.combine(my_combine<T>);\n\n            // test move constructor for parallel combinable\n            oneapi::tbb::combinable<T> moved1(std::move(sums));\n            move_construct_sum += moved1.combine(my_combine<T>);\n\n            // test move assignment for uninitialized parallel combinable\n            oneapi::tbb::combinable<T> moved2;\n            moved2=std::move(finit_combinable);\n            move_assign_sum += moved2.combine(my_combine<T>);\n        }\n        // Here and below comparison for equality of float numbers succeeds\n        // as the rounding error doesn't accumulate and doesn't affect the comparison\n        REQUIRE( EXPECTED_SUM == combine_sum );\n        REQUIRE( EXPECTED_SUM == combine_ref_sum );\n        REQUIRE( EXPECTED_SUM == combine_finit_sum );\n        REQUIRE( EXPECTED_SUM == combine_each_sum );\n        REQUIRE( EXPECTED_SUM == copy_construct_sum );\n        REQUIRE( EXPECTED_SUM == copy_assign_sum );\n        REQUIRE( EXPECTED_SUM == move_construct_sum );\n        REQUIRE( EXPECTED_SUM == move_assign_sum );\n        // REMARK(\"  done parallel %s, %d, %g, %g\\n\", test_name, p, static_cast<double>(combine_sum), ( oneapi::tbb::tick_count::now() - t0).seconds());\n    }\n}\n\ntemplate <typename T>\nclass ParallelVectorForBody: utils::NoAssign {\n\n    oneapi::tbb::combinable< std::vector<T, oneapi::tbb::tbb_allocator<T> > > &locals;\n\npublic:\n\n    ParallelVectorForBody ( oneapi::tbb::combinable< std::vector<T, oneapi::tbb::tbb_allocator<T> > > &_locals ) : locals(_locals) { }\n\n    void operator()( const oneapi::tbb::blocked_range<int> &r ) const {\n        T one = 1;\n\n        for (int i = r.begin(); i < r.end(); ++i) {\n            locals.local().push_back( one );\n        }\n    }\n\n};\n\ntemplate< typename T >\nvoid RunParallelVectorTests(const char* /* test_name */) {\n    typedef std::vector<T, oneapi::tbb::tbb_allocator<T> > ContainerType;\n\n    for (int p = MinThread; p <= MaxThread; ++p) {\n\n        if (p == 0) continue;\n        // REMARK(\"  Testing parallel %s on %d thread(s)... \\n\", test_name, p);\n        oneapi::tbb::global_control gc(oneapi::tbb::global_control::max_allowed_parallelism, p);\n\n        // INFO: oneapi::tbb::tick_count t0;\n        T defaultConstructed_sum(0);\n        T copyConstructed_sum(0);\n        T copyAssigned_sum(0);\n        T moveConstructed_sum(0);\n        T moveAssigned_sum(0);\n\n        for (int t = -1; t < REPETITIONS; ++t) {\n            // if (Verbose && t == 0) t0 = oneapi::tbb::tick_count::now();\n\n            typedef typename oneapi::tbb::combinable< ContainerType > CombinableType;\n\n            // test uninitialized parallel combinable\n            CombinableType vs;\n            oneapi::tbb::parallel_for( oneapi::tbb::blocked_range<int> (0, N, 10000), ParallelVectorForBody<T>( vs ) );\n            CombineEachVectorHelper<T> MyCombineEach(defaultConstructed_sum);\n            vs.combine_each(MyCombineEach); // combine_each sums all elements of each vector into the result\n\n            // test copy constructor for parallel combinable with vectors\n            CombinableType vs2(vs);\n            CombineEachVectorHelper<T> MyCombineEach2(copyConstructed_sum);\n            vs2.combine_each(MyCombineEach2);\n\n            // test copy assignment for uninitialized parallel combinable with vectors\n            CombinableType vs3;\n            vs3 = vs;\n            CombineEachVectorHelper<T> MyCombineEach3(copyAssigned_sum);\n            vs3.combine_each(MyCombineEach3);\n\n            // test move constructor for parallel combinable with vectors\n            CombinableType vs4(std::move(vs2));\n            CombineEachVectorHelper<T> MyCombineEach4(moveConstructed_sum);\n            vs4.combine_each(MyCombineEach4);\n\n            // test move assignment for uninitialized parallel combinable with vectors\n            vs4=std::move(vs3);\n            CombineEachVectorHelper<T> MyCombineEach5(moveAssigned_sum);\n            vs4.combine_each(MyCombineEach5);\n        }\n\n        double ResultValue = defaultConstructed_sum;\n        REQUIRE( EXPECTED_SUM == ResultValue );\n        ResultValue = copyConstructed_sum;\n        REQUIRE( EXPECTED_SUM == ResultValue );\n        ResultValue = copyAssigned_sum;\n        REQUIRE( EXPECTED_SUM == ResultValue );\n        ResultValue = moveConstructed_sum;\n        REQUIRE( EXPECTED_SUM == ResultValue );\n        ResultValue = moveAssigned_sum;\n        REQUIRE( EXPECTED_SUM == ResultValue );\n\n        // REMARK(\"  done parallel %s, %d, %g, %g\\n\", test_name, p, ResultValue, ( oneapi::tbb::tick_count::now() - t0).seconds());\n    }\n}\n\nvoid\nRunParallelTests() {\n    // REMARK(\"Running RunParallelTests\\n\");\n    RunParallelScalarTests<int>(\"int\");\n    RunParallelScalarTests<double>(\"double\");\n    RunParallelScalarTests<minimalCombinable>(\"minimalCombinable\");\n    RunParallelVectorTests<int>(\"std::vector<int, oneapi::tbb::tbb_allocator<int> >\");\n    RunParallelVectorTests<double>(\"std::vector<double, oneapi::tbb::tbb_allocator<double> >\");\n}\n\ntemplate <typename T>\nvoid\nRunAssignmentAndCopyConstructorTest(const char* /* test_name */) {\n    // REMARK(\"  Testing assignment and copy construction for combinable<%s>...\\n\", test_name);\n\n    // test creation with finit function (combine returns finit return value if no threads have created locals)\n    FunctorAddFinit7<T> my_finit7_decl;\n    oneapi::tbb::combinable<T> create1(my_finit7_decl);\n    REQUIRE_MESSAGE(7 == create1.combine(my_combine<T>), \"Unexpected combine result for combinable object preinitialized with functor\");\n\n    // test copy construction with function initializer\n    oneapi::tbb::combinable<T> copy1(create1);\n    REQUIRE_MESSAGE(7 == copy1.combine(my_combine<T>), \"Unexpected combine result for copy-constructed combinable object\");\n\n    // test copy assignment with function initializer\n    FunctorAddFinit<T> my_finit_decl;\n    oneapi::tbb::combinable<T> assign1(my_finit_decl);\n    assign1 = create1;\n    REQUIRE_MESSAGE(7 == assign1.combine(my_combine<T>), \"Unexpected combine result for copy-assigned combinable object\");\n\n    // test move construction with function initializer\n    oneapi::tbb::combinable<T> move1(std::move(create1));\n    REQUIRE_MESSAGE(7 == move1.combine(my_combine<T>), \"Unexpected combine result for move-constructed combinable object\");\n\n    // test move assignment with function initializer\n    oneapi::tbb::combinable<T> move2;\n    move2=std::move(copy1);\n    REQUIRE_MESSAGE(7 == move2.combine(my_combine<T>), \"Unexpected combine result for move-assigned combinable object\");\n\n    // REMARK(\"  done\\n\");\n\n}\n\nvoid RunAssignmentAndCopyConstructorTests() {\n    // REMARK(\"Running assignment and copy constructor tests:\\n\");\n    RunAssignmentAndCopyConstructorTest<int>(\"int\");\n    RunAssignmentAndCopyConstructorTest<double>(\"double\");\n    RunAssignmentAndCopyConstructorTest<minimalCombinable>(\"minimalCombinable\");\n}\n\nvoid RunMoveSemanticsForStateTrackableObjectTest() {\n    // REMARK(\"Testing move assignment and move construction for combinable<Harness::StateTrackable>...\\n\");\n\n    oneapi::tbb::combinable< StateTrackable<true> > create1;\n    REQUIRE_MESSAGE(create1.local().state == StateTrackable<true>::DefaultInitialized,\n           \"Unexpected value in default combinable object\");\n\n    // Copy constructing of the new combinable causes copying of stored values\n    oneapi::tbb::combinable< StateTrackable<true> > copy1(create1);\n    REQUIRE_MESSAGE(copy1.local().state == StateTrackable<true>::CopyInitialized,\n           \"Unexpected value in copy-constructed combinable object\");\n\n    // Copy assignment also causes copying of stored values\n    oneapi::tbb::combinable< StateTrackable<true> > copy2;\n    REQUIRE_MESSAGE(copy2.local().state == StateTrackable<true>::DefaultInitialized,\n           \"Unexpected value in default combinable object\");\n    copy2=create1;\n    REQUIRE_MESSAGE(copy2.local().state == StateTrackable<true>::CopyInitialized,\n           \"Unexpected value in copy-assigned combinable object\");\n\n    // Store some marked values in the initial combinable object\n    create1.local().state = StateTrackableBase::Unspecified;\n\n    // Move constructing of the new combinable must not cause copying of stored values\n    oneapi::tbb::combinable< StateTrackable<true> > move1(std::move(create1));\n    REQUIRE_MESSAGE(move1.local().state == StateTrackableBase::Unspecified, \"Unexpected value in move-constructed combinable object\");\n\n    // Move assignment must not cause copying of stored values\n    copy1=std::move(move1);\n    REQUIRE_MESSAGE(copy1.local().state == StateTrackableBase::Unspecified, \"Unexpected value in move-assigned combinable object\");\n\n    // Make the stored values valid again in order to delete StateTrackable object correctly\n    copy1.local().state = StateTrackable<true>::MoveAssigned;\n\n    // REMARK(\"done\\n\");\n}\n\nutils::SpinBarrier sBarrier;\n\nstruct Body : utils::NoAssign {\n    oneapi::tbb::combinable<int>* locals;\n    const int nthread;\n    const int nIters;\n    Body( int nthread_, int niters_ ) : nthread(nthread_), nIters(niters_) { sBarrier.initialize(nthread_); }\n\n    void operator()(int thread_id ) const {\n        bool existed;\n        sBarrier.wait();\n        for(int i = 0; i < nIters; ++i ) {\n            existed = thread_id & 1;\n            int oldval = locals->local(existed);\n            REQUIRE_MESSAGE(existed == (i > 0), \"Error on first reference\");\n            REQUIRE_MESSAGE((!existed || (oldval == thread_id)), \"Error on fetched value\");\n            existed = thread_id & 1;\n            locals->local(existed) = thread_id;\n            REQUIRE_MESSAGE(existed, \"Error on assignment\");\n        }\n    }\n};\n\nvoid TestLocalAllocations( int nthread ) {\n    REQUIRE_MESSAGE(nthread > 0, \"nthread must be positive\");\n#define NITERATIONS 1000\n    Body myBody(nthread, NITERATIONS);\n    oneapi::tbb::combinable<int> myCombinable;\n    myBody.locals = &myCombinable;\n\n    NativeParallelFor( nthread, myBody );\n\n    int mySum = 0;\n    int mySlots = 0;\n    CombineEachHelperCnt<int> myCountCombine(mySum, mySlots);\n    myCombinable.combine_each(myCountCombine);\n\n    REQUIRE_MESSAGE(nthread == mySlots, \"Incorrect number of slots\");\n    REQUIRE_MESSAGE(mySum == (nthread - 1) * nthread / 2, \"Incorrect values in result\");\n}\n\nvoid RunLocalAllocationsTests() {\n    // REMARK(\"Testing local() allocations\\n\");\n    for(int i = 1 <= MinThread ? MinThread : 1; i <= MaxThread; ++i) {\n        // REMARK(\"  Testing local() allocation with nthreads=%d...\\n\", i);\n        for(int j = 0; j < 100; ++j) {\n            TestLocalAllocations(i);\n        }\n        // REMARK(\"  done\\n\");\n    }\n}\n\n//! Test combinable in parallel algorithms\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Parallel scenario\") {\n    RunParallelTests();\n    RunLocalAllocationsTests();\n}\n\n//! Test assignment and copy construction\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Assignment and copy constructor test\") {\n    RunAssignmentAndCopyConstructorTests();\n}\n\n//! Test move support\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Move semantics\") {\n    RunMoveSemanticsForStateTrackableObjectTest();\n}\n\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_composite_node.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"conformance_flowgraph.h\"\n\n//! \\file conformance_composite_node.cpp\n//! \\brief Test for [flow_graph.composite_node] specification\n\nclass adder : public oneapi::tbb::flow::composite_node<std::tuple<int, int>, std::tuple<int>> {\n    oneapi::tbb::flow::join_node<std::tuple<int,int>, oneapi::tbb::flow::queueing> j;\n    oneapi::tbb::flow::function_node<std::tuple<int,int>, int> f;\n    oneapi::tbb::flow::queue_node<int> qn;\n    using base_type = oneapi::tbb::flow::composite_node<std::tuple<int,int>, std::tuple<int>>;\n\n    struct f_body {\n        int operator()(const std::tuple<int,int> &t) {\n            int sum = std::get<0>(t) + std::get<1>(t);\n            return  sum;\n        }\n    };\n\npublic:\n    adder(oneapi::tbb::flow::graph &g) : base_type(g), j(g), f(g, oneapi::tbb::flow::unlimited, f_body()), qn(g) {\n        make_edge(j, f);\n        make_edge(f, qn);\n\n        base_type::input_ports_type input_tuple(oneapi::tbb::flow::input_port<0>(j), oneapi::tbb::flow::input_port<1>(j));\n        base_type::output_ports_type output_tuple(qn);\n        base_type::set_external_ports(input_tuple, output_tuple);\n    }\n};\n\ntemplate<int N, typename T1, typename T2>\nstruct compare {\n    static void compare_refs(T1 tuple1, T2 tuple2) {\n    CHECK_MESSAGE(( &std::get<N>(tuple1) == &std::get<N>(tuple2)), \"ports not set correctly\");\n    compare<N-1, T1, T2>::compare_refs(tuple1, tuple2);\n    }\n};\n\ntemplate<typename T1, typename T2>\nstruct compare<1, T1, T2> {\n    static void compare_refs(T1 tuple1, T2 tuple2) {\n    CHECK_MESSAGE((&std::get<0>(tuple1) == &std::get<0>(tuple2)), \"port 0 not correctly set\");\n    }\n};\n\n//! Test inheritance relations\n//! \\brief \\ref interface\nTEST_CASE(\"composite_node superclasses\"){\n    CHECK_MESSAGE((std::is_base_of<oneapi::tbb::flow::graph_node, adder>::value), \"composite_node should be derived from graph_node\");\n}\n\n//! Test composite_node ports\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"composite_node ports\"){\n    oneapi::tbb::flow::graph g;\n\n    using InputTupleType = std::tuple<tbb::flow::continue_msg, std::tuple<int, int>, int, int, int, int,\n                             int, int, int, int, int, int, int, int>;\n\n    using OutputTupleType = std::tuple<tbb::flow::continue_msg, std::tuple<int, int>, oneapi::tbb::flow::tagged_msg<size_t, int, float>,\n                             int, int, int, int, int, int, int, int, int, int, int, int>;\n\n    using EmptyTupleType= std::tuple<>;\n\n    using input_output_type = oneapi::tbb::flow::composite_node<InputTupleType, OutputTupleType>;\n    using input_only_type = oneapi::tbb::flow::composite_node<InputTupleType, EmptyTupleType>;\n    using output_only_type = oneapi::tbb::flow::composite_node<EmptyTupleType, OutputTupleType>;\n\n    const size_t NUM_INPUTS = std::tuple_size<InputTupleType>::value;\n    const size_t NUM_OUTPUTS = std::tuple_size<OutputTupleType>::value;\n\n    using body = conformance::dummy_functor<int>;\n\n    //node types\n    oneapi::tbb::flow::continue_node<tbb::flow::continue_msg> ct(g, body());\n    oneapi::tbb::flow::split_node< std::tuple<int, int> > s(g);\n    oneapi::tbb::flow::input_node<int> src(g, body());\n    oneapi::tbb::flow::function_node<int, int> fxn(g, oneapi::tbb::flow::unlimited, body());\n    oneapi::tbb::flow::multifunction_node<int, std::tuple<int, int> > m_fxn(g, oneapi::tbb::flow::unlimited, body());\n    oneapi::tbb::flow::broadcast_node<int> bc(g);\n    oneapi::tbb::flow::limiter_node<int> lim(g, 2);\n    oneapi::tbb::flow::indexer_node<int, float> ind(g);\n    oneapi::tbb::flow::join_node< std::tuple< int, int >, oneapi::tbb::flow::queueing > j(g);\n    oneapi::tbb::flow::queue_node<int> q(g);\n    oneapi::tbb::flow::buffer_node<int> bf(g);\n    oneapi::tbb::flow::priority_queue_node<int> pq(g);\n    oneapi::tbb::flow::write_once_node<int> wo(g);\n    oneapi::tbb::flow::overwrite_node<int> ovw(g);\n    oneapi::tbb::flow::sequencer_node<int> seq(g, conformance::sequencer_functor<int>());\n\n    auto input_tuple = std::tie(ct, s, m_fxn, fxn, bc, oneapi::tbb::flow::input_port<0>(j), lim, q, oneapi::tbb::flow::input_port<0>(ind),\n                                pq, ovw, wo, bf, seq);\n    auto output_tuple = std::tie(ct,j, ind, fxn, src, bc, oneapi::tbb::flow::output_port<0>(s), lim, oneapi::tbb::flow::output_port<0>(m_fxn),\n                                 q, pq, ovw, wo, bf, seq);\n\n    //composite_node with both input_ports and output_ports\n    input_output_type a_node(g);\n    a_node.set_external_ports(input_tuple, output_tuple);\n\n    a_node.add_visible_nodes(src, fxn, m_fxn, bc, lim, ind, s, ct, j, q, bf, pq, wo, ovw, seq);\n    a_node.add_nodes(src, fxn, m_fxn, bc, lim, ind, s, ct, j, q, bf, pq, wo, ovw, seq);\n\n    auto a_node_input_ports_ptr = a_node.input_ports();\n    compare<NUM_INPUTS-1, decltype(a_node_input_ports_ptr), decltype(input_tuple)>::compare_refs(a_node_input_ports_ptr, input_tuple);\n    CHECK_MESSAGE(NUM_INPUTS == std::tuple_size<decltype(a_node_input_ports_ptr)>::value, \"not all declared input ports were bound to nodes\");\n\n    auto a_node_output_ports_ptr = a_node.output_ports();\n    compare<NUM_OUTPUTS-1, decltype(a_node_output_ports_ptr), decltype(output_tuple)>::compare_refs(a_node_output_ports_ptr, output_tuple);\n    CHECK_MESSAGE((NUM_OUTPUTS == std::tuple_size<decltype(a_node_output_ports_ptr)>::value), \"not all declared output ports were bound to nodes\");\n\n    //composite_node with only input_ports\n    input_only_type b_node(g);\n    b_node.set_external_ports(input_tuple);\n\n    b_node.add_visible_nodes(src, fxn, m_fxn, bc, lim, ind, s, ct, j, q, bf, pq, wo, ovw, seq);\n    b_node.add_nodes(src, fxn, m_fxn, bc, lim, ind, s, ct, j, q, bf, pq, wo, ovw, seq);\n\n    auto b_node_input_ports_ptr = b_node.input_ports();\n    compare<NUM_INPUTS-1, decltype(b_node_input_ports_ptr), decltype(input_tuple)>::compare_refs(b_node_input_ports_ptr, input_tuple);\n    CHECK_MESSAGE(NUM_INPUTS == std::tuple_size<decltype(b_node_input_ports_ptr)>::value, \"not all declared input ports were bound to nodes\");\n\n    //composite_node with only output_ports\n    output_only_type c_node(g);\n    c_node.set_external_ports(output_tuple);\n\n    // Reset is not suppose to do anything. Check that it can be called.\n    g.reset();\n\n    c_node.add_visible_nodes(src, fxn, m_fxn, bc, lim, ind, s, ct, j, q, bf, pq, wo, ovw, seq);\n\n    c_node.add_nodes(src, fxn, m_fxn, bc, lim, ind, s, ct, j, q, bf, pq, wo, ovw, seq);\n\n    auto c_node_output_ports_ptr = c_node.output_ports();\n    compare<NUM_OUTPUTS-1, decltype(c_node_output_ports_ptr), decltype(output_tuple)>::compare_refs(c_node_output_ports_ptr, output_tuple);\n    CHECK_MESSAGE(NUM_OUTPUTS == std::tuple_size<decltype(c_node_output_ports_ptr)>::value, \"not all declared input ports were bound to nodes\");\n}\n\n//! Test composite_node construction and message passing\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"composite_node construction and message test\"){\n    using namespace oneapi::tbb::flow;\n    graph g;\n    split_node<std::tuple<int, int, int, int>> s(g);\n    adder a0(g);\n    adder a1(g);\n    adder a2(g);\n\n    make_edge(output_port<0>(s), input_port<0>(a0));\n    make_edge(output_port<1>(s), input_port<1>(a0));\n\n    make_edge(output_port<0>(a0),input_port<0>(a1));\n    make_edge(output_port<2>(s), input_port<1>(a1));\n\n    make_edge(output_port<0>(a1), input_port<0>(a2));\n    make_edge(output_port<3>(s), input_port<1>(a2));\n\n    s.try_put(std::make_tuple(1,3,5,7));\n    g.wait_for_all();\n\n    int tmp = -1;\n    CHECK_MESSAGE((output_port<0>(a2).try_get(tmp) == true), \"Composite node should produce a value\");\n    CHECK_MESSAGE((tmp == 1+3+5+7), \"Composite node should produce correct sum\");\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_concurrent_hash_map.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <common/test.h>\n#include <common/utils.h>\n#include \"common/utils_report.h\"\n#include <common/spin_barrier.h>\n#include <common/state_trackable.h>\n#include <common/container_move_support.h>\n#include <common/containers_common.h>\n#include <common/initializer_list_support.h>\n#include <common/vector_types.h>\n#include <common/test_comparisons.h>\n#include \"oneapi/tbb/concurrent_hash_map.h\"\n#include \"oneapi/tbb/global_control.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n\n//! \\file conformance_concurrent_hash_map.cpp\n//! \\brief Test for [containers.concurrent_hash_map containers.tbb_hash_compare] specification\n\n/** Has tightly controlled interface so that we can verify\n    that concurrent_hash_map uses only the required interface. */\nclass MyException : public std::bad_alloc {\npublic:\n    virtual const char *what() const noexcept override { return \"out of items limit\"; }\n    virtual ~MyException() noexcept {}\n};\n\n/** Has tightly controlled interface so that we can verify\n    that concurrent_hash_map uses only the required interface. */\nclass MyKey {\nprivate:\n    int key;\n    friend class MyHashCompare;\n    friend class YourHashCompare;\npublic:\n    MyKey() = default;\n    MyKey( const MyKey& ) = default;\n    void operator=( const MyKey&  ) = delete;\n    static MyKey make( int i ) {\n        MyKey result;\n        result.key = i;\n        return result;\n    }\n\n    int value_of() const { return key; }\n};\n\nstd::atomic<long> MyDataCount;\nlong MyDataCountLimit = 0;\n\nclass MyData {\nprotected:\n    friend class MyData2;\n    int data;\n    enum state_t {\n        LIVE=0x1234,\n        DEAD=0x5678\n    } my_state;\n    void operator=( const MyData& );    // Deny access\npublic:\n    MyData(int i = 0) {\n        my_state = LIVE;\n        data = i;\n        if (MyDataCountLimit && MyDataCount + 1 >= MyDataCountLimit) {\n            TBB_TEST_THROW(MyException{});\n        }\n        ++MyDataCount;\n    }\n\n    MyData( const MyData& other ) {\n        CHECK_FAST(other.my_state==LIVE);\n        my_state = LIVE;\n        data = other.data;\n        if(MyDataCountLimit && MyDataCount + 1 >= MyDataCountLimit) {\n            TBB_TEST_THROW(MyException{});\n        }\n        ++MyDataCount;\n    }\n\n    ~MyData() {\n        --MyDataCount;\n        my_state = DEAD;\n    }\n\n    static MyData make( int i ) {\n        MyData result;\n        result.data = i;\n        return result;\n    }\n\n    int value_of() const {\n        CHECK_FAST(my_state==LIVE);\n        return data;\n    }\n\n    void set_value( int i ) {\n        CHECK_FAST(my_state==LIVE);\n        data = i;\n    }\n\n    bool operator==( const MyData& other ) const {\n        CHECK_FAST(other.my_state==LIVE);\n        CHECK_FAST(my_state==LIVE);\n        return data == other.data;\n    }\n};\n\nclass MyData2 : public MyData {\npublic:\n    MyData2( ) {}\n\n    MyData2( const MyData2& other ) : MyData() {\n        CHECK_FAST(other.my_state==LIVE);\n        CHECK_FAST(my_state==LIVE);\n        data = other.data;\n    }\n\n    MyData2( const MyData& other ) {\n        CHECK_FAST(other.my_state==LIVE);\n        CHECK_FAST(my_state==LIVE);\n        data = other.data;\n    }\n\n    void operator=( const MyData& other ) {\n        CHECK_FAST(other.my_state==LIVE);\n        CHECK_FAST(my_state==LIVE);\n        data = other.data;\n    }\n\n    void operator=( const MyData2& other ) {\n        CHECK_FAST(other.my_state==LIVE);\n        CHECK_FAST(my_state==LIVE);\n        data = other.data;\n    }\n\n    bool operator==( const MyData2& other ) const {\n        CHECK_FAST(other.my_state==LIVE);\n        CHECK_FAST(my_state==LIVE);\n        return data == other.data;\n    }\n};\n\nclass MyHashCompare {\npublic:\n    bool equal( const MyKey& j, const MyKey& k ) const {\n        return j.key==k.key;\n    }\n\n    std::size_t hash( const MyKey& k ) const {\n        return k.key;\n    }\n};\n\nclass YourHashCompare {\npublic:\n    bool equal( const MyKey& j, const MyKey& k ) const {\n        return j.key==k.key;\n    }\n\n    std::size_t hash( const MyKey& ) const {\n        return 1;\n    }\n};\n\nusing test_allocator_type = StaticSharedCountingAllocator<std::allocator<std::pair<const MyKey, MyData>>>;\nusing test_table_type = oneapi::tbb::concurrent_hash_map<MyKey, MyData, MyHashCompare, test_allocator_type>;\nusing other_test_table_type = oneapi::tbb::concurrent_hash_map<MyKey, MyData2, MyHashCompare>;\n\ntemplate <template <typename...> class ContainerType>\nvoid test_member_types() {\n    using container_type = ContainerType<int, int>;\n    static_assert(std::is_same<typename container_type::allocator_type, oneapi::tbb::tbb_allocator<std::pair<const int, int>>>::value,\n                  \"Incorrect default template allocator\");\n\n    static_assert(std::is_same<typename container_type::key_type, int>::value,\n                  \"Incorrect container key_type member type\");\n    static_assert(std::is_same<typename container_type::value_type, std::pair<const int, int>>::value,\n                  \"Incorrect container value_type member type\");\n\n    static_assert(std::is_unsigned<typename container_type::size_type>::value,\n                  \"Incorrect container size_type member type\");\n    static_assert(std::is_signed<typename container_type::difference_type>::value,\n                  \"Incorrect container difference_type member type\");\n\n    using value_type = typename container_type::value_type;\n    static_assert(std::is_same<typename container_type::reference, value_type&>::value,\n                  \"Incorrect container reference member type\");\n    static_assert(std::is_same<typename container_type::const_reference, const value_type&>::value,\n                  \"Incorrect container const_reference member type\");\n    using allocator_type = typename container_type::allocator_type;\n    static_assert(std::is_same<typename container_type::pointer, typename std::allocator_traits<allocator_type>::pointer>::value,\n                  \"Incorrect container pointer member type\");\n    static_assert(std::is_same<typename container_type::const_pointer, typename std::allocator_traits<allocator_type>::const_pointer>::value,\n                  \"Incorrect container const_pointer member type\");\n\n    static_assert(utils::is_forward_iterator<typename container_type::iterator>::value,\n                  \"Incorrect container iterator member type\");\n    static_assert(!std::is_const<typename container_type::iterator::value_type>::value,\n                  \"Incorrect container iterator member type\");\n    static_assert(utils::is_forward_iterator<typename container_type::const_iterator>::value,\n                  \"Incorrect container const_iterator member type\");\n    static_assert(std::is_const<typename container_type::const_iterator::value_type>::value,\n                  \"Incorrect container iterator member type\");\n}\n\ntemplate<typename test_table_type>\nvoid FillTable( test_table_type& x, int n ) {\n    for( int i=1; i<=n; ++i ) {\n        MyKey key( MyKey::make(-i) ); // hash values must not be specified in direct order\n        typename test_table_type::accessor a;\n        bool b = x.insert(a,key);\n        CHECK_FAST(b);\n        a->second.set_value( i*i );\n    }\n}\n\ntemplate<typename test_table_type>\nstatic void CheckTable( const test_table_type& x, int n ) {\n    REQUIRE_MESSAGE( x.size()==size_t(n), \"table is different size than expected\" );\n    CHECK(x.empty()==(n==0));\n    CHECK(x.size()<=x.max_size());\n    for( int i=1; i<=n; ++i ) {\n        MyKey key( MyKey::make(-i) );\n        typename test_table_type::const_accessor a;\n        bool b = x.find(a,key);\n        CHECK_FAST(b);\n        CHECK_FAST(a->second.value_of()==i*i);\n    }\n    int count = 0;\n    int key_sum = 0;\n    for( typename test_table_type::const_iterator i(x.begin()); i!=x.end(); ++i ) {\n        ++count;\n        key_sum += -i->first.value_of();\n    }\n    CHECK(count==n);\n    CHECK(key_sum==n*(n+1)/2);\n}\n\nvoid TestCopy() {\n    INFO(\"testing copy\\n\");\n    test_table_type t1;\n    for( int i=0; i<10000; i=(i<100 ? i+1 : i*3) ) {\n        MyDataCount = 0;\n\n        FillTable(t1,i);\n        // Do not call CheckTable(t1,i) before copying, it enforces rehashing\n\n        test_table_type t2(t1);\n        // Check that copy constructor did not mangle source table.\n        CheckTable(t1,i);\n        swap(t1, t2);\n        CheckTable(t1,i);\n        CHECK(!(t1 != t2));\n\n        // Clear original table\n        t2.clear();\n        swap(t2, t1);\n        CheckTable(t1,0);\n\n        // Verify that copy of t1 is correct, even after t1 is cleared.\n        CheckTable(t2,i);\n        t2.clear();\n        t1.swap( t2 );\n        CheckTable(t1,0);\n        CheckTable(t2,0);\n        REQUIRE_MESSAGE( MyDataCount==0, \"data leak?\" );\n    }\n}\n\nvoid TestRehash() {\n    INFO(\"testing rehashing\\n\");\n    test_table_type w;\n    w.insert( std::make_pair(MyKey::make(-5), MyData()) );\n    w.rehash(); // without this, assertion will fail\n    test_table_type::iterator it = w.begin();\n    int i = 0; // check for non-rehashed buckets\n    for( ; it != w.end(); i++ )\n        w.count( (it++)->first );\n    CHECK(i == 1);\n    for( i=0; i<1000; i=(i<29 ? i+1 : i*2) ) {\n        for( int j=std::max(256+i, i*2); j<10000; j*=3 ) {\n            test_table_type v;\n            FillTable( v, i );\n            CHECK(int(v.size()) == i);\n            CHECK(int(v.bucket_count()) <= j);\n            v.rehash( j );\n            CHECK(int(v.bucket_count()) >= j);\n            CheckTable( v, i );\n        }\n    }\n}\n\nvoid TestAssignment() {\n    INFO(\"testing assignment\\n\");\n    oneapi::tbb::concurrent_hash_map<int, int> test_map({{1, 2}, {2, 4}});\n    test_map.operator=(test_map); // suppress self assign warning\n    CHECK(!test_map.empty());\n\n    for( int i=0; i<1000; i=(i<30 ? i+1 : i*5) ) {\n        for( int j=0; j<1000; j=(j<30 ? j+1 : j*7) ) {\n            test_table_type t1;\n            test_table_type t2;\n            FillTable(t1,i);\n            FillTable(t2,j);\n            CHECK((t1 == t2) == (i == j));\n            CheckTable(t2,j);\n\n            test_table_type& tref = t2=t1;\n            CHECK(&tref==&t2);\n            CHECK(t1 == t2);\n            CheckTable(t1,i);\n            CheckTable(t2,i);\n\n            t1.clear();\n            CheckTable(t1,0);\n            CheckTable(t2,i);\n            REQUIRE_MESSAGE( MyDataCount==i, \"data leak?\" );\n\n            t2.clear();\n            CheckTable(t1,0);\n            CheckTable(t2,0);\n            REQUIRE_MESSAGE( MyDataCount==0, \"data leak?\" );\n        }\n    }\n}\n\ntemplate<typename Iterator, typename T>\nvoid TestIteratorTraits() {\n    T x;\n    typename Iterator::reference xr = x;\n    typename Iterator::pointer xp = &x;\n    CHECK(&xr==xp);\n}\n\ntemplate<typename Iterator1, typename Iterator2>\nvoid TestIteratorAssignment( Iterator2 j ) {\n    Iterator1 i(j), k;\n    CHECK(i==j);\n    CHECK(!(i!=j));\n    k = j;\n    CHECK(k==j);\n    CHECK(!(k!=j));\n}\n\ntemplate<typename Range1, typename Range2>\nvoid TestRangeAssignment( Range2 r2 ) {\n    Range1 r1(r2); r1 = r2;\n}\n\nvoid TestIteratorsAndRanges() {\n    INFO(\"testing iterators compliance\\n\");\n    TestIteratorTraits<test_table_type::iterator,test_table_type::value_type>();\n    TestIteratorTraits<test_table_type::const_iterator,const test_table_type::value_type>();\n\n    test_table_type v;\n    CHECK(v.range().grainsize() == 1);\n    test_table_type const &u = v;\n\n    TestIteratorAssignment<test_table_type::const_iterator>( u.begin() );\n    TestIteratorAssignment<test_table_type::const_iterator>( v.begin() );\n    TestIteratorAssignment<test_table_type::iterator>( v.begin() );\n    // doesn't compile as expected: TestIteratorAssignment<typename V::iterator>( u.begin() );\n\n    // check for non-existing\n    CHECK(v.equal_range(MyKey::make(-1)) == std::make_pair(v.end(), v.end()));\n    CHECK(u.equal_range(MyKey::make(-1)) == std::make_pair(u.end(), u.end()));\n\n    INFO(\"testing ranges compliance\\n\");\n    TestRangeAssignment<test_table_type::const_range_type>( u.range() );\n    TestRangeAssignment<test_table_type::range_type>( v.range() );\n    // doesn't compile as expected: TestRangeAssignment<typename V::range_type>( u.range() );\n\n    INFO(\"testing construction and insertion from iterators range\\n\");\n    FillTable( v, 1000 );\n    other_test_table_type t(v.begin(), v.end());\n    v.rehash();\n    CheckTable(t, 1000);\n    t.insert(v.begin(), v.end()); // do nothing\n    CheckTable(t, 1000);\n    t.clear();\n    t.insert(v.begin(), v.end()); // restore\n    CheckTable(t, 1000);\n\n    INFO(\"testing comparison\\n\");\n    using test_allocator_type2 = StaticSharedCountingAllocator<std::allocator<std::pair<const MyKey, MyData2>>>;\n    using YourTable1 = oneapi::tbb::concurrent_hash_map<MyKey,MyData2,YourHashCompare, test_allocator_type2>;\n    using YourTable2 = oneapi::tbb::concurrent_hash_map<MyKey,MyData2,YourHashCompare>;\n    YourTable1 t1;\n    FillTable( t1, 10 );\n    CheckTable(t1, 10 );\n    YourTable2 t2(t1.begin(), t1.end());\n    MyKey key( MyKey::make(-5) ); MyData2 data;\n    CHECK(t2.erase(key));\n    YourTable2::accessor a;\n    CHECK(t2.insert(a, key));\n    data.set_value(0);   a->second = data;\n    CHECK(t1 != t2);\n    data.set_value(5*5); a->second = data;\n    CHECK(t1 == t2);\n}\n\nstruct test_insert {\n    template<typename container_type, typename element_type>\n    static void test( std::initializer_list<element_type> il, container_type const& expected ) {\n        container_type vd;\n        vd.insert( il );\n        REQUIRE_MESSAGE( vd == expected, \"inserting with an initializer list failed\" );\n    }\n};\n\nstruct ctor_test {\n template<typename container_type, typename element_type>\n    static void test( std::initializer_list<element_type> il, container_type const& expected ) {\n        container_type vd(il, tbb::tbb_allocator<std::pair<element_type, element_type>>{});\n        REQUIRE_MESSAGE( vd == expected, \"inserting with an initializer list failed\" );\n    }\n};\n\nvoid TestInitList(){\n    using namespace initializer_list_support_tests;\n    INFO(\"testing initializer_list methods \\n\");\n\n    using ch_map_type = oneapi::tbb::concurrent_hash_map<int,int>;\n    std::initializer_list<ch_map_type::value_type> pairs_il = {{1,1},{2,2},{3,3},{4,4},{5,5}};\n\n    test_initializer_list_support_without_assign<ch_map_type, test_insert>( pairs_il );\n    test_initializer_list_support_without_assign<ch_map_type, test_insert>( {} );\n    test_initializer_list_support_without_assign<ch_map_type, ctor_test>(pairs_il);\n}\n\ntemplate <typename base_alloc_type>\nclass only_node_counting_allocator : public StaticSharedCountingAllocator<base_alloc_type> {\n    using base_type = StaticSharedCountingAllocator<base_alloc_type>;\n    using base_traits = oneapi::tbb::detail::allocator_traits<base_alloc_type>;\npublic:\n    template<typename U>\n    struct rebind {\n        using other = only_node_counting_allocator<typename base_traits::template rebind_alloc<U>>;\n    };\n\n    only_node_counting_allocator() : base_type() {}\n    only_node_counting_allocator(const only_node_counting_allocator& a) : base_type(a) {}\n\n    template<typename U>\n    only_node_counting_allocator(const only_node_counting_allocator<U>& a) : base_type(a) {}\n\n    typename base_type::value_type* allocate(const std::size_t n) {\n        if ( n > 1) {\n            return base_alloc_type::allocate(n);\n        } else {\n            return base_type::allocate(n);\n        }\n    }\n};\n\n#if TBB_USE_EXCEPTIONS\nvoid TestExceptions() {\n    using allocator_type = only_node_counting_allocator<oneapi::tbb::tbb_allocator<std::pair<const MyKey, MyData2>>>;\n    using throwing_table = oneapi::tbb::concurrent_hash_map<MyKey, MyData2, MyHashCompare, allocator_type>;\n    enum methods {\n        zero_method = 0,\n        ctor_copy, op_assign, op_insert,\n        all_methods\n    };\n\n    INFO(\"testing exception-safety guarantees\\n\");\n    throwing_table src;\n    FillTable( src, 1000 );\n    CHECK(MyDataCount==1000);\n\n    try {\n        for(int t = 0; t < 2; t++) // exception type\n        for(int m = zero_method+1; m < all_methods; m++)\n        {\n            allocator_type a;\n            allocator_type::init_counters();\n            if(t) MyDataCountLimit = 101;\n            else a.set_limits(101);\n            throwing_table victim(a);\n            MyDataCount = 0;\n\n            try {\n                switch(m) {\n                case ctor_copy: {\n                        throwing_table acopy(src, a);\n                    } break;\n                case op_assign: {\n                        victim = src;\n                    } break;\n                case op_insert: {\n                        // Insertion in cpp11 don't make copy constructions\n                        // during the insertion, so we need to decrement limit\n                        // to throw an exception in the right place and to prevent\n                        // successful insertion of one unexpected item\n                        if (MyDataCountLimit)\n                            --MyDataCountLimit;\n                        FillTable( victim, 1000 );\n                    } break;\n                default:;\n                }\n                REQUIRE_MESSAGE(false, \"should throw an exception\");\n            } catch(std::bad_alloc &e) {\n                MyDataCountLimit = 0;\n                size_t size = victim.size();\n                switch(m) {\n                case op_assign:\n                    REQUIRE_MESSAGE( MyDataCount==100, \"data leak?\" );\n                    CHECK(size>=100);\n                    utils_fallthrough;\n                case ctor_copy:\n                    CheckTable(src, 1000);\n                    break;\n                case op_insert:\n                    CHECK(size==size_t(100-t));\n                    REQUIRE_MESSAGE( MyDataCount==100-t, \"data leak?\" );\n                    CheckTable(victim, 100-t);\n                    break;\n\n                default:; // nothing to check here\n                }\n                INFO(\"Exception \"<< m << \" : \" << e.what() << \"- ok ()\");\n            }\n            catch ( ... ) {\n                REQUIRE_MESSAGE( false, \"Unrecognized exception\" );\n            }\n        }\n    } catch(...) {\n        REQUIRE_MESSAGE(false, \"unexpected exception\");\n    }\n    src.clear(); MyDataCount = 0;\n    allocator_type::max_items = 0;\n}\n#endif\n\nstruct default_container_traits {\n    template <typename container_type, typename iterator_type>\n    static container_type& construct_container(typename std::aligned_storage<sizeof(container_type)>::type& storage, iterator_type begin, iterator_type end){\n        container_type* ptr = reinterpret_cast<container_type*>(&storage);\n        new (ptr) container_type(begin, end);\n        return *ptr;\n    }\n\n    template <typename container_type, typename iterator_type, typename allocator_type>\n    static container_type& construct_container(typename std::aligned_storage<sizeof(container_type)>::type& storage, iterator_type begin, iterator_type end, allocator_type const& a){\n        container_type* ptr = reinterpret_cast<container_type*>(&storage);\n        new (ptr) container_type(begin, end, a);\n        return *ptr;\n    }\n};\n\nstruct hash_map_traits : default_container_traits {\n    enum{ expected_number_of_items_to_allocate_for_steal_move = 0 };\n\n    template<typename T>\n    struct hash_compare {\n        bool equal( const T& lhs, const T& rhs ) const {\n            return lhs==rhs;\n        }\n        size_t hash( const T& k ) const {\n            return my_hash_func(k);\n        }\n        std::hash<T> my_hash_func;\n    };\n\n    template <typename T, typename Allocator>\n    using container_type = oneapi::tbb::concurrent_hash_map<T, T, hash_compare<T>, Allocator>;\n\n    template <typename T>\n    using container_value_type = std::pair<const T, T>;\n\n    template<typename element_type, typename allocator_type>\n    struct apply {\n        using type = oneapi::tbb::concurrent_hash_map<element_type, element_type, hash_compare<element_type>, allocator_type>;\n    };\n\n    using init_iterator_type = move_support_tests::FooPairIterator;\n    template <typename hash_map_type, typename iterator>\n    static bool equal(hash_map_type const& c, iterator begin, iterator end){\n        bool equal_sizes = ( static_cast<size_t>(std::distance(begin, end)) == c.size() );\n        if (!equal_sizes)\n            return false;\n\n        for (iterator it = begin; it != end; ++it ){\n            if (c.count( (*it).first) == 0){\n                return false;\n            }\n        }\n        return true;\n    }\n};\n\nusing DataStateTrackedTable = oneapi::tbb::concurrent_hash_map<MyKey, move_support_tests::Foo, MyHashCompare>;\n\nstruct RvalueInsert {\n    static void apply( DataStateTrackedTable& table, int i ) {\n        DataStateTrackedTable::accessor a;\n        int next = i + 1;\n        CHECK_FAST_MESSAGE((table.insert( a, std::make_pair(MyKey::make(i), move_support_tests::Foo(next)))),\n            \"already present while should not ?\" );\n        CHECK_FAST((*a).second == next);\n        CHECK_FAST((*a).second.state == StateTrackableBase::MoveInitialized);\n    }\n};\n\nstruct Emplace {\n    template <typename Accessor>\n    static void apply_impl( DataStateTrackedTable& table, int i) {\n        Accessor a;\n        CHECK_FAST_MESSAGE((table.emplace( a, MyKey::make(i), (i + 1))),\n                \"already present while should not ?\" );\n        CHECK_FAST((*a).second == i + 1);\n        CHECK_FAST((*a).second.state == StateTrackableBase::DirectInitialized);\n    }\n\n    static void apply( DataStateTrackedTable& table, int i ) {\n        // TODO: investigate ability to rewrite apply methods with use apply_imp method.\n        if (i % 2) {\n            apply_impl<DataStateTrackedTable::accessor>(table, i);\n        } else {\n            apply_impl<DataStateTrackedTable::const_accessor>(table, i);\n        }\n    }\n};\n\ntemplate<typename Op, typename test_table_type>\nclass TableOperation {\n    test_table_type& my_table;\npublic:\n    void operator()( const oneapi::tbb::blocked_range<int>& range ) const {\n        for( int i=range.begin(); i!=range.end(); ++i )\n            Op::apply(my_table,i);\n    }\n    TableOperation( test_table_type& table ) : my_table(table) {}\n};\n\nbool UseKey( size_t i ) {\n    return (i&3)!=3;\n}\n\nstruct Insert {\n    static void apply( test_table_type& table, int i ) {\n        if( UseKey(i) ) {\n            if( i&4 ) {\n                test_table_type::accessor a;\n                table.insert( a, MyKey::make(i) );\n                if( i&1 )\n                    (*a).second.set_value(i*i);\n                else\n                    a->second.set_value(i*i);\n            } else\n                if( i&1 ) {\n                    test_table_type::accessor a;\n                    table.insert( a, std::make_pair(MyKey::make(i), MyData(i*i)) );\n                    CHECK_FAST((*a).second.value_of()==i*i);\n                } else {\n                    test_table_type::const_accessor ca;\n                    table.insert( ca, std::make_pair(MyKey::make(i), MyData(i*i)) );\n                    CHECK_FAST(ca->second.value_of()==i*i);\n                }\n        }\n    }\n};\n\nstruct Find {\n    static void apply( test_table_type& table, int i ) {\n        test_table_type::accessor a;\n        const test_table_type::accessor& ca = a;\n        bool b = table.find( a, MyKey::make(i) );\n        CHECK_FAST(b==!a.empty());\n        if( b ) {\n            if( !UseKey(i) )\n                REPORT(\"Line %d: unexpected key %d present\\n\",__LINE__,i);\n            CHECK_FAST(ca->second.value_of()==i*i);\n            CHECK_FAST((*ca).second.value_of()==i*i);\n            if( i&1 )\n                ca->second.set_value( ~ca->second.value_of() );\n            else\n                (*ca).second.set_value( ~ca->second.value_of() );\n        } else {\n            if( UseKey(i) )\n                REPORT(\"Line %d: key %d missing\\n\",__LINE__,i);\n        }\n    }\n};\n\nstruct FindConst {\n    static void apply( const test_table_type& table, int i ) {\n        test_table_type::const_accessor a;\n        const test_table_type::const_accessor& ca = a;\n        bool b = table.find( a, MyKey::make(i) );\n        CHECK_FAST(b==(table.count(MyKey::make(i))>0));\n        CHECK_FAST(b==!a.empty());\n        CHECK_FAST(b==UseKey(i));\n        if( b ) {\n            CHECK_FAST(ca->second.value_of()==~(i*i));\n            CHECK_FAST((*ca).second.value_of()==~(i*i));\n        }\n    }\n};\n\nstruct InsertInitList {\n    static void apply( test_table_type& table, int i ) {\n        if ( UseKey( i ) ) {\n            // TODO: investigate why the following sequence causes an additional allocation sometimes:\n            // table.insert( test_table_type::value_type( MyKey::make( i ), i*i ) );\n            // table.insert( test_table_type::value_type( MyKey::make( i ), i*i+1 ) );\n            std::initializer_list<test_table_type::value_type> il = {\n                test_table_type::value_type( MyKey::make( i ), i*i )\n                /*, test_table_type::value_type( MyKey::make( i ), i*i+1 ) */\n                                                                    };\n            table.insert( il );\n        }\n    }\n};\n\ntemplate<typename Op, typename TableType>\nvoid DoConcurrentOperations( TableType& table, int n, const char* what, std::size_t nthread ) {\n    INFO(\"testing \" << what << \" with \" << nthread << \" threads\");\n    oneapi::tbb::parallel_for(oneapi::tbb::blocked_range<int>(0, n ,100), TableOperation<Op, TableType>(table));\n}\n\n//! Test traversing the table with an iterator.\nvoid TraverseTable( test_table_type& table, size_t n, size_t expected_size ) {\n    INFO(\"testing traversal\\n\");\n    size_t actual_size = table.size();\n    CHECK(actual_size==expected_size);\n    size_t count = 0;\n    bool* array = new bool[n];\n    memset( array, 0, n*sizeof(bool) );\n    const test_table_type& const_table = table;\n    test_table_type::const_iterator ci = const_table.begin();\n    for( test_table_type::iterator i = table.begin(); i!=table.end(); ++i ) {\n        // Check iterator\n        int k = i->first.value_of();\n        CHECK_FAST(UseKey(k));\n        CHECK_FAST((*i).first.value_of()==k);\n        CHECK_FAST_MESSAGE((0<=k && size_t(k)<n), \"out of bounds key\" );\n        CHECK_FAST_MESSAGE( !array[k], \"duplicate key\" );\n        array[k] = true;\n        ++count;\n\n        // Check lower/upper bounds\n        std::pair<test_table_type::iterator, test_table_type::iterator> er = table.equal_range(i->first);\n        std::pair<test_table_type::const_iterator, test_table_type::const_iterator> cer = const_table.equal_range(i->first);\n        CHECK_FAST((cer.first == er.first && cer.second == er.second));\n        CHECK_FAST(cer.first == i);\n        CHECK_FAST(std::distance(cer.first, cer.second) == 1);\n\n        // Check const_iterator\n        test_table_type::const_iterator cic = ci++;\n        CHECK_FAST(cic->first.value_of()==k);\n        CHECK_FAST((*cic).first.value_of()==k);\n    }\n    CHECK(ci==const_table.end());\n    delete[] array;\n    if (count != expected_size) {\n        INFO(\"Line \" << __LINE__ << \": count=\" << count << \" but should be \" << expected_size);\n    }\n}\n\nstd::atomic<int> EraseCount;\n\nstruct Erase {\n    static void apply( test_table_type& table, int i ) {\n        bool b;\n        if(i&4) {\n            if(i&8) {\n                test_table_type::const_accessor a;\n                b = table.find( a, MyKey::make(i) ) && table.erase( a );\n            } else {\n                test_table_type::accessor a;\n                b = table.find( a, MyKey::make(i) ) && table.erase( a );\n            }\n        } else\n            b = table.erase( MyKey::make(i) );\n        if( b ) ++EraseCount;\n        CHECK_FAST(table.count(MyKey::make(i)) == 0);\n    }\n};\n\nusing YourTable = oneapi::tbb::concurrent_hash_map<MyKey, MyData, YourHashCompare>;\nstatic const int IE_SIZE = 2;\nstd::atomic<YourTable::size_type> InsertEraseCount[IE_SIZE];\n\nstruct InsertErase  {\n    static void apply( YourTable& table, int i ) {\n        if ( i%3 ) {\n            int key = i%IE_SIZE;\n            if ( table.insert( std::make_pair(MyKey::make(key), MyData2()) ) )\n                ++InsertEraseCount[key];\n        } else {\n            int key = i%IE_SIZE;\n            if( i&1 ) {\n                YourTable::accessor res;\n                if(table.find( res, MyKey::make(key) ) && table.erase( res ) )\n                    --InsertEraseCount[key];\n            } else {\n                YourTable::const_accessor res;\n                if(table.find( res, MyKey::make(key) ) && table.erase( res ) )\n                    --InsertEraseCount[key];\n            }\n        }\n    }\n};\n\nstruct InnerInsert {\n    static void apply( YourTable& table, int i ) {\n        YourTable::accessor a1, a2;\n        if(i&1) utils::yield();\n        table.insert( a1, MyKey::make(1) );\n        utils::yield();\n        table.insert( a2, MyKey::make(1 + (1<<30)) ); // the same chain\n        table.erase( a2 ); // if erase by key it would lead to deadlock for single thread\n    }\n};\n\nstruct FakeExclusive {\n    utils::SpinBarrier& barrier;\n    YourTable& table;\n    FakeExclusive(utils::SpinBarrier& b, YourTable&t) : barrier(b), table(t) {}\n    void operator()( std::size_t i ) const {\n        if(i) {\n            YourTable::const_accessor real_ca;\n            // const accessor on non-const table acquired as reader (shared)\n            CHECK(table.find(real_ca,MyKey::make(1)));\n            barrier.wait(); // item can be erased\n            std::this_thread::sleep_for(std::chrono::milliseconds(10)); // let it enter the erase\n            real_ca->second.value_of(); // check the state while holding accessor\n        } else {\n            YourTable::accessor fake_ca;\n            const YourTable &const_table = table;\n            // non-const accessor on const table acquired as reader (shared)\n            CHECK(const_table.find(fake_ca,MyKey::make(1)));\n            barrier.wait(); // readers acquired\n            // can mistakenly remove the item while other readers still refers to it\n            table.erase( fake_ca );\n        }\n    }\n};\n\nusing AtomicByte = std::atomic<unsigned char>;\n\ntemplate<typename RangeType>\nstruct ParallelTraverseBody {\n    const size_t n;\n    AtomicByte* const array;\n    ParallelTraverseBody( AtomicByte array_[], size_t n_ ) :\n        n(n_),\n        array(array_)\n    {}\n    void operator()( const RangeType& range ) const {\n        for( typename RangeType::iterator i = range.begin(); i!=range.end(); ++i ) {\n            int k = i->first.value_of();\n            CHECK_FAST((0<=k && size_t(k)<n));\n            ++array[k];\n        }\n    }\n};\n\nvoid Check( AtomicByte array[], size_t n, size_t expected_size ) {\n    if( expected_size )\n        for( size_t k=0; k<n; ++k ) {\n            if( array[k] != int(UseKey(k)) ) {\n                REPORT(\"array[%d]=%d != %d=UseKey(%d)\\n\",\n                       int(k), int(array[k]), int(UseKey(k)), int(k));\n                CHECK(false);\n            }\n        }\n}\n\n//! Test traversing the table with a parallel range\nvoid ParallelTraverseTable( test_table_type& table, size_t n, size_t expected_size ) {\n    INFO(\"testing parallel traversal\\n\");\n    CHECK(table.size()==expected_size);\n    AtomicByte* array = new AtomicByte[n];\n\n    memset( static_cast<void*>(array), 0, n*sizeof(AtomicByte) );\n    test_table_type::range_type r = table.range(10);\n    oneapi::tbb::parallel_for( r, ParallelTraverseBody<test_table_type::range_type>( array, n ));\n    Check( array, n, expected_size );\n\n    const test_table_type& const_table = table;\n    memset( static_cast<void*>(array), 0, n*sizeof(AtomicByte) );\n    test_table_type::const_range_type cr = const_table.range(10);\n    oneapi::tbb::parallel_for( cr, ParallelTraverseBody<test_table_type::const_range_type>( array, n ));\n    Check( array, n, expected_size );\n\n    delete[] array;\n}\n\nvoid TestInsertFindErase( std::size_t nthread ) {\n    int n=250000;\n\n    // compute m = number of unique keys\n    int m = 0;\n    for( int i=0; i<n; ++i )\n        m += UseKey(i);\n    {\n        test_allocator_type alloc;\n        test_allocator_type::init_counters();\n        CHECK(MyDataCount==0);\n        test_table_type table(alloc);\n        TraverseTable(table,n,0);\n        ParallelTraverseTable(table,n,0);\n\n        for ( int i = 0; i < 2; ++i ) {\n            if ( i==0 )\n                DoConcurrentOperations<InsertInitList, test_table_type>( table, n, \"insert(std::initializer_list)\", nthread );\n            else\n                DoConcurrentOperations<Insert, test_table_type>( table, n, \"insert\", nthread );\n            CHECK(MyDataCount == m);\n            TraverseTable( table, n, m );\n            ParallelTraverseTable( table, n, m );\n\n            DoConcurrentOperations<Find, test_table_type>( table, n, \"find\", nthread );\n            CHECK(MyDataCount == m);\n\n            DoConcurrentOperations<FindConst, test_table_type>( table, n, \"find(const)\", nthread );\n            CHECK(MyDataCount == m);\n\n            EraseCount = 0;\n            DoConcurrentOperations<Erase, test_table_type>( table, n, \"erase\", nthread );\n            CHECK(EraseCount == m);\n            CHECK(MyDataCount == 0);\n            TraverseTable( table, n, 0 );\n\n            table.clear();\n        }\n\n        if( nthread > 1 ) {\n            YourTable ie_table;\n            for( int i=0; i<IE_SIZE; ++i )\n                InsertEraseCount[i] = 0;\n            DoConcurrentOperations<InsertErase,YourTable>(ie_table,n/2,\"insert_erase\",nthread);\n            for( int i=0; i<IE_SIZE; ++i )\n                CHECK(InsertEraseCount[i]==ie_table.count(MyKey::make(i)));\n\n            DoConcurrentOperations<InnerInsert, YourTable>(ie_table,2000,\"inner insert\",nthread);\n            utils::SpinBarrier barrier(nthread);\n            INFO(\"testing erase on fake exclusive accessor\\n\");\n            utils::NativeParallelFor( nthread, FakeExclusive(barrier, ie_table));\n        }\n    }\n    REQUIRE( test_allocator_type::items_constructed == test_allocator_type::items_destroyed );\n    REQUIRE( test_allocator_type::items_allocated == test_allocator_type::items_freed );\n    REQUIRE( test_allocator_type::allocations == test_allocator_type::frees );\n}\n\nstd::atomic<int> Counter;\n\nclass AddToTable {\n    test_table_type& my_table;\n    const std::size_t my_nthread;\n    const int my_m;\npublic:\n    AddToTable( test_table_type& table, std::size_t nthread, int m ) : my_table(table), my_nthread(nthread), my_m(m) {}\n    void operator()( std::size_t ) const {\n        for( int i=0; i<my_m; ++i ) {\n            // Busy wait to synchronize threads\n            int j = 0;\n            while( Counter<i ) {\n                if( ++j==1000000 ) {\n                    // If Counter<i after a million iterations, then we almost surely have\n                    // more logical threads than physical threads, and should yield in\n                    // order to let suspended logical threads make progress.\n                    j = 0;\n                    utils::yield();\n                }\n            }\n            // Now all threads attempt to simultaneously insert a key.\n            int k;\n            {\n                test_table_type::accessor a;\n                MyKey key = MyKey::make(i);\n                if( my_table.insert( a, key ) )\n                    a->second.set_value( 1 );\n                else\n                    a->second.set_value( a->second.value_of()+1 );\n                k = a->second.value_of();\n            }\n            if( std::size_t(k) == my_nthread )\n                Counter=i+1;\n        }\n    }\n};\n\nclass RemoveFromTable {\n    test_table_type& my_table;\n    const int my_m;\npublic:\n    RemoveFromTable( test_table_type& table, int m ) : my_table(table), my_m(m) {}\n    void operator()(std::size_t) const {\n        for( int i=0; i<my_m; ++i ) {\n            bool b;\n            if(i&4) {\n                if(i&8) {\n                    test_table_type::const_accessor a;\n                    b = my_table.find( a, MyKey::make(i) ) && my_table.erase( a );\n                } else {\n                    test_table_type::accessor a;\n                    b = my_table.find( a, MyKey::make(i) ) && my_table.erase( a );\n                }\n            } else\n                b = my_table.erase( MyKey::make(i) );\n            if( b ) ++EraseCount;\n        }\n    }\n};\n\nvoid TestConcurrency( std::size_t nthread ) {\n    INFO(\"testing multiple insertions/deletions of same key with \" << nthread << \" threads\");\n    test_allocator_type::init_counters();\n    {\n        CHECK( MyDataCount==0);\n        test_table_type table;\n        const int m = 1000;\n        Counter = 0;\n        oneapi::tbb::tick_count t0 = oneapi::tbb::tick_count::now();\n        utils::NativeParallelFor( nthread, AddToTable(table,nthread,m) );\n        REQUIRE_MESSAGE( MyDataCount==m, \"memory leak detected\" );\n\n        EraseCount = 0;\n        t0 = oneapi::tbb::tick_count::now();\n        utils::NativeParallelFor( nthread, RemoveFromTable(table,m) );\n        REQUIRE_MESSAGE(MyDataCount==0, \"memory leak detected\");\n        REQUIRE_MESSAGE(EraseCount==m, \"return value of erase() is broken\");\n\n    }\n    REQUIRE( test_allocator_type::items_constructed == test_allocator_type::items_destroyed );\n    REQUIRE( test_allocator_type::items_allocated == test_allocator_type::items_freed );\n    REQUIRE( test_allocator_type::allocations == test_allocator_type::frees );\n    REQUIRE_MESSAGE(MyDataCount==0, \"memory leak detected\");\n}\n\ntemplate<typename Key>\nstruct non_default_constructible_hash_compare : oneapi::tbb::detail::d1::tbb_hash_compare<Key> {\n    non_default_constructible_hash_compare() {\n        REQUIRE_MESSAGE(false, \"Hash compare object must not default construct during the construction of hash_map with compare argument\");\n    }\n\n    non_default_constructible_hash_compare(int) {}\n};\n\nvoid TestHashCompareConstructors() {\n    using key_type = int;\n    using map_type = oneapi::tbb::concurrent_hash_map<key_type, key_type, non_default_constructible_hash_compare<key_type>>;\n\n    non_default_constructible_hash_compare<key_type> compare(0);\n    map_type::allocator_type allocator;\n\n    map_type map1(compare);\n    map_type map2(compare, allocator);\n\n    map_type map3(1, compare);\n    map_type map4(1, compare, allocator);\n\n    std::vector<map_type::value_type> reference_vector;\n    map_type map5(reference_vector.begin(), reference_vector.end(), compare);\n    map_type map6(reference_vector.begin(), reference_vector.end(), compare, allocator);\n\n    map_type map7({}, compare);\n    map_type map8({}, compare, allocator);\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\ntemplate <typename T>\nstruct debug_hash_compare : public oneapi::tbb::detail::d1::tbb_hash_compare<T> {};\n\ntemplate <template <typename...> typename TMap>\nvoid TestDeductionGuides() {\n    using Key = int;\n    using Value = std::string;\n\n    using ComplexType = std::pair<Key, Value>;\n    using ComplexTypeConst = std::pair<const Key, Value>;\n\n    using DefaultCompare = oneapi::tbb::detail::d1::tbb_hash_compare<Key>;\n    using Compare = debug_hash_compare<Key>;\n    using DefaultAllocator = oneapi::tbb::tbb_allocator<ComplexTypeConst>;\n    using Allocator = std::allocator<ComplexTypeConst>;\n\n    std::vector<ComplexType> v;\n    auto l = { ComplexTypeConst(1, \"one\"), ComplexTypeConst(2, \"two\") };\n    Compare compare;\n    Allocator allocator;\n\n    // check TMap(InputIterator, InputIterator)\n    TMap m1(v.begin(), v.end());\n    static_assert(std::is_same<decltype(m1), TMap<Key, Value, DefaultCompare, DefaultAllocator>>::value);\n\n    // check TMap(InputIterator, InputIterator, HashCompare)\n    TMap m2(v.begin(), v.end(), compare);\n    static_assert(std::is_same<decltype(m2), TMap<Key, Value, Compare>>::value);\n\n    // check TMap(InputIterator, InputIterator, HashCompare, Allocator)\n    TMap m3(v.begin(), v.end(), compare, allocator);\n    static_assert(std::is_same<decltype(m3), TMap<Key, Value, Compare, Allocator>>::value);\n\n    // check TMap(InputIterator, InputIterator, Allocator)\n    TMap m4(v.begin(), v.end(), allocator);\n    static_assert(std::is_same<decltype(m4), TMap<Key, Value, DefaultCompare, Allocator>>::value);\n\n    // check TMap(std::initializer_list)\n    TMap m5(l);\n    static_assert(std::is_same<decltype(m5), TMap<Key, Value, DefaultCompare, DefaultAllocator>>::value);\n\n    // check TMap(std::initializer_list, HashCompare)\n    TMap m6(l, compare);\n    static_assert(std::is_same<decltype(m6), TMap<Key, Value, Compare, DefaultAllocator>>::value);\n\n    // check TMap(std::initializer_list, HashCompare, Allocator)\n    TMap m7(l, compare, allocator);\n    static_assert(std::is_same<decltype(m7), TMap<Key, Value, Compare, Allocator>>::value);\n\n    // check TMap(std::initializer_list, Allocator)\n    TMap m8(l, allocator);\n    static_assert(std::is_same<decltype(m8), TMap<Key, Value, DefaultCompare, Allocator>>::value);\n\n    // check TMap(TMap &)\n    TMap m9(m1);\n    static_assert(std::is_same<decltype(m9), decltype(m1)>::value);\n\n    // check TMap(TMap &, Allocator)\n    TMap m10(m4, allocator);\n    static_assert(std::is_same<decltype(m10), decltype(m4)>::value);\n\n    // check TMap(TMap &&)\n    TMap m11(std::move(m1));\n    static_assert(std::is_same<decltype(m11), decltype(m1)>::value);\n\n    // check TMap(TMap &&, Allocator)\n    TMap m12(std::move(m4), allocator);\n    static_assert(std::is_same<decltype(m12), decltype(m4)>::value);\n}\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate <typename CHMapType>\nvoid test_comparisons_basic() {\n    using comparisons_testing::testEqualityComparisons;\n    CHMapType c1, c2;\n    testEqualityComparisons</*ExpectEqual = */true>(c1, c2);\n\n    c1.emplace(1, 1);\n    testEqualityComparisons</*ExpectEqual = */false>(c1, c2);\n\n    c2.emplace(1, 1);\n    testEqualityComparisons</*ExpectEqual = */true>(c1, c2);\n}\n\ntemplate <typename TwoWayComparableContainerType>\nvoid test_two_way_comparable_chmap() {\n    TwoWayComparableContainerType c1, c2;\n    c1.emplace(1, 1);\n    c2.emplace(1, 1);\n    comparisons_testing::TwoWayComparable::reset();\n    REQUIRE_MESSAGE(c1 == c2, \"Incorrect operator == result\");\n    comparisons_testing::check_equality_comparison();\n    REQUIRE_MESSAGE(!(c1 != c2), \"Incorrect operator != result\");\n    comparisons_testing::check_equality_comparison();\n}\n\nvoid TestCHMapComparisons() {\n    using integral_container = oneapi::tbb::concurrent_hash_map<int, int>;\n    using two_way_comparable_container = oneapi::tbb::concurrent_hash_map<comparisons_testing::TwoWayComparable,\n                                                                          comparisons_testing::TwoWayComparable>;\n\n    test_comparisons_basic<integral_container>();\n    test_comparisons_basic<two_way_comparable_container>();\n    test_two_way_comparable_chmap<two_way_comparable_container>();\n}\n\ntemplate <typename Iterator, typename CHMapType>\nvoid TestCHMapIteratorComparisonsBasic( CHMapType& chmap ) {\n    REQUIRE_MESSAGE(!chmap.empty(), \"Incorrect test setup\");\n    using namespace comparisons_testing;\n    Iterator it1, it2;\n    testEqualityComparisons</*ExpectEqual = */true>(it1, it2);\n    it1 = chmap.begin();\n    testEqualityComparisons</*ExpectEqual = */false>(it1, it2);\n    it2 = chmap.begin();\n    testEqualityComparisons</*ExpectEqual = */true>(it1, it2);\n    it2 = chmap.end();\n    testEqualityComparisons</*ExpectEqual = */false>(it1, it2);\n}\n\nvoid TestCHMapIteratorComparisons() {\n    using chmap_type = oneapi::tbb::concurrent_hash_map<int, int>;\n    using value_type = typename chmap_type::value_type;\n    chmap_type chmap = {value_type{1, 1}, value_type{2, 2}, value_type{3, 3}};\n    TestCHMapIteratorComparisonsBasic<typename chmap_type::iterator>(chmap);\n    const chmap_type& cchmap = chmap;\n    TestCHMapIteratorComparisonsBasic<typename chmap_type::const_iterator>(cchmap);\n}\n\ntemplate <bool IsConstructible>\nclass HeterogeneousKey {\npublic:\n    static std::size_t heterogeneous_keys_count;\n\n    int integer_key() const { return my_key; }\n\n    template <bool I = IsConstructible, typename = typename std::enable_if<I>::type>\n    HeterogeneousKey(int key) : my_key(key) { ++heterogeneous_keys_count; }\n\n    HeterogeneousKey(const HeterogeneousKey&) = delete;\n    HeterogeneousKey& operator=(const HeterogeneousKey&) = delete;\n\n    static void reset() { heterogeneous_keys_count = 0; }\n\n    struct construct_flag {};\n\n    HeterogeneousKey( construct_flag, int key ) : my_key(key) {}\n\nprivate:\n    int my_key;\n}; // class HeterogeneousKey\n\ntemplate <bool IsConstructible>\nstd::size_t HeterogeneousKey<IsConstructible>::heterogeneous_keys_count = 0;\n\nstruct HeterogeneousHashCompare {\n    using is_transparent = void;\n\n    template <bool IsConstructible>\n    std::size_t hash( const HeterogeneousKey<IsConstructible>& key ) const {\n        return my_hash_object(key.integer_key());\n    }\n\n    std::size_t hash( const int& key ) const {\n        return my_hash_object(key);\n    }\n\n    bool equal( const int& key1, const int& key2 ) const {\n        return key1 == key2;\n    }\n\n    template <bool IsConstructible>\n    bool equal( const int& key1, const HeterogeneousKey<IsConstructible>& key2 ) const {\n        return key1 == key2.integer_key();\n    }\n\n    template <bool IsConstructible>\n    bool equal( const HeterogeneousKey<IsConstructible>& key1, const int& key2 ) const {\n        return key1.integer_key() == key2;\n    }\n\n    template <bool IsConstructible>\n    bool equal( const HeterogeneousKey<IsConstructible>& key1, const HeterogeneousKey<IsConstructible>& key2 ) const {\n        return key1.integer_key() == key2.integer_key();\n    }\n\n    std::hash<int> my_hash_object;\n}; // struct HeterogeneousHashCompare\n\nclass DefaultConstructibleValue {\npublic:\n    DefaultConstructibleValue() : my_i(default_value) {};\n\n    int value() const { return my_i; }\n    static constexpr int default_value = -4242;\nprivate:\n    int my_i;\n}; // class DefaultConstructibleValue\n\nconstexpr int DefaultConstructibleValue::default_value;\n\nvoid test_heterogeneous_find() {\n    using key_type = HeterogeneousKey</*IsConstructible = */false>;\n    using chmap_type = oneapi::tbb::concurrent_hash_map<key_type, int, HeterogeneousHashCompare>;\n\n    chmap_type chmap;\n    using const_accessor = typename chmap_type::const_accessor;\n    using accessor = typename chmap_type::accessor;\n    const_accessor cacc;\n    accessor acc;\n\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 0, \"Incorrect test setup\");\n\n    key_type key(key_type::construct_flag{}, 1);\n    bool regular_result = chmap.find(cacc, key);\n    bool heterogeneous_result = chmap.find(cacc, int(1));\n\n    REQUIRE(!regular_result);\n    REQUIRE_MESSAGE(regular_result == heterogeneous_result,\n                    \"Incorrect heterogeneous find result with const_accessor (no element)\");\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 0, \"Temporary key object was created during find call with const_accessor (no element)\");\n\n    regular_result = chmap.find(acc, key);\n    heterogeneous_result = chmap.find(acc, int(1));\n\n    REQUIRE(!regular_result);\n    REQUIRE_MESSAGE(regular_result == heterogeneous_result,\n                    \"Incorrect heterogeneous find result with accessor (no element)\");\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 0, \"Temporary key object was created during find call with accessor (no element)\");\n\n    bool tmp_result = chmap.emplace(cacc, std::piecewise_construct,\n                                    std::forward_as_tuple(key_type::construct_flag{}, 1), std::forward_as_tuple(100));\n    REQUIRE(tmp_result);\n\n    regular_result = chmap.find(cacc, key);\n    heterogeneous_result = chmap.find(cacc, int(1));\n\n    REQUIRE(regular_result);\n    REQUIRE_MESSAGE(regular_result == heterogeneous_result, \"Incorrect heterogeneous find result with const_accessor (element exists)\");\n    REQUIRE_MESSAGE(cacc->first.integer_key() == 1, \"Incorrect accessor returned\");\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 0, \"Temporary key object was created during find call with const_accessor (element exists)\");\n    cacc.release();\n\n    regular_result = chmap.find(acc, key);\n    heterogeneous_result = chmap.find(acc, int(1));\n\n    REQUIRE(regular_result);\n    REQUIRE_MESSAGE(regular_result == heterogeneous_result, \"Incorrect heterogeneous find result with accessor (element exists)\");\n    REQUIRE_MESSAGE(acc->first.integer_key() == 1, \"Incorrect accessor returned\");\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 0, \"Temporary key object was created during find call with accessor (element exists)\");\n    key_type::reset();\n}\n\nvoid test_heterogeneous_count() {\n    using key_type = HeterogeneousKey</*IsConstructible = */false>;\n    using chmap_type = oneapi::tbb::concurrent_hash_map<key_type, int, HeterogeneousHashCompare>;\n\n    chmap_type chmap;\n\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 0, \"Incorrect test setup\");\n    key_type key(key_type::construct_flag{}, 1);\n\n    typename chmap_type::size_type regular_count = chmap.count(key);\n    typename chmap_type::size_type heterogeneous_count = chmap.count(int(1));\n\n    REQUIRE(regular_count == 0);\n    REQUIRE_MESSAGE(regular_count == heterogeneous_count, \"Incorrect heterogeneous count result (no element)\");\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 0, \"Temporary key object was created during count call (no element)\");\n\n    chmap.emplace(std::piecewise_construct, std::forward_as_tuple(key_type::construct_flag{}, 1), std::forward_as_tuple(100));\n\n    regular_count = chmap.count(key);\n    heterogeneous_count = chmap.count(int(1));\n\n    REQUIRE(regular_count == 1);\n    REQUIRE_MESSAGE(regular_count == heterogeneous_count, \"Incorrect heterogeneous count result (element exists)\");\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 0, \"Temporary key object was created during count call (element exists)\");\n    key_type::reset();\n}\n\nvoid test_heterogeneous_equal_range() {\n    using key_type = HeterogeneousKey</*IsConstructible = */false>;\n    using chmap_type = oneapi::tbb::concurrent_hash_map<key_type, int, HeterogeneousHashCompare>;\n\n    chmap_type chmap;\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 0, \"Incorrect test setup\");\n\n    using iterator = typename chmap_type::iterator;\n    using const_iterator = typename chmap_type::const_iterator;\n    using result = std::pair<iterator, iterator>;\n    using const_result = std::pair<const_iterator, const_iterator>;\n    key_type key(key_type::construct_flag{}, 1);\n\n    result regular_result = chmap.equal_range(key);\n    result heterogeneous_result = chmap.equal_range(int(1));\n\n    REQUIRE(regular_result.first == chmap.end());\n    REQUIRE(regular_result.second == chmap.end());\n    REQUIRE_MESSAGE(regular_result == heterogeneous_result, \"Incorrect heterogeneous equal_range result (non const, no element)\");\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 0, \"Temporary key object was created during equal_range call (non const, no element)\");\n\n    const chmap_type& cchmap = chmap;\n\n    const_result regular_const_result = cchmap.equal_range(key);\n    const_result heterogeneous_const_result = cchmap.equal_range(int(1));\n\n    REQUIRE(regular_const_result.first == cchmap.end());\n    REQUIRE(regular_const_result.second == cchmap.end());\n    REQUIRE_MESSAGE(regular_const_result == heterogeneous_const_result,\n                    \"Incorrect heterogeneous equal_range result (const, no element)\");\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 0, \"Temporary key object was created during equal_range call (const, no element)\");\n\n    chmap.emplace(std::piecewise_construct, std::forward_as_tuple(key_type::construct_flag{}, 1), std::forward_as_tuple(100));\n\n    regular_result = chmap.equal_range(key);\n    heterogeneous_result = chmap.equal_range(int(1));\n\n    REQUIRE(regular_result.first != chmap.end());\n    REQUIRE(regular_result.first->first.integer_key() == 1);\n    REQUIRE(regular_result.second == chmap.end());\n    REQUIRE_MESSAGE(regular_result == heterogeneous_result, \"Incorrect heterogeneous equal_range result (non const, element exists)\");\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 0, \"Temporary key object was created during equal_range call (non const, element exists)\");\n\n    regular_const_result = cchmap.equal_range(key);\n    heterogeneous_const_result = cchmap.equal_range(int(1));\n    REQUIRE_MESSAGE(regular_const_result == heterogeneous_const_result,\n                    \"Incorrect heterogeneous equal_range result (const, element exists)\");\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 0, \"Temporary key object was created during equal_range call (const, element exists)\");\n    key_type::reset();\n}\n\nvoid test_heterogeneous_insert() {\n    using key_type = HeterogeneousKey</*IsConstructible = */true>;\n    using chmap_type = oneapi::tbb::concurrent_hash_map<key_type, DefaultConstructibleValue, HeterogeneousHashCompare>;\n\n    chmap_type chmap;\n    using const_accessor = typename chmap_type::const_accessor;\n    using accessor = typename chmap_type::accessor;\n    const_accessor cacc;\n    accessor acc;\n\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 0, \"Incorrect test setup\");\n\n    bool result = chmap.insert(cacc, int(1));\n\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 1, \"Only one heterogeneous key should be created\");\n    REQUIRE_MESSAGE(result, \"Incorrect heterogeneous insert result (const_accessor)\");\n    REQUIRE_MESSAGE(cacc->first.integer_key() == 1, \"Incorrect accessor\");\n    REQUIRE_MESSAGE(cacc->second.value() == DefaultConstructibleValue::default_value, \"Value should be default constructed\");\n\n    result = chmap.insert(cacc, int(1));\n\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 1, \"No extra keys should be created\");\n    REQUIRE_MESSAGE(!result, \"Incorrect heterogeneous insert result (const_accessor)\");\n    REQUIRE_MESSAGE(cacc->first.integer_key() == 1, \"Incorrect accessor\");\n    REQUIRE_MESSAGE(cacc->second.value() == DefaultConstructibleValue::default_value, \"Value should be default constructed\");\n\n    result = chmap.insert(acc, int(2));\n\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 2, \"Only one extra heterogeneous key should be created\");\n    REQUIRE_MESSAGE(result, \"Incorrect heterogeneous insert result (accessor)\");\n    REQUIRE_MESSAGE(acc->first.integer_key() == 2, \"Incorrect accessor\");\n    REQUIRE_MESSAGE(acc->second.value() == DefaultConstructibleValue::default_value, \"Value should be default constructed\");\n\n    result = chmap.insert(acc, int(2));\n\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 2, \"No extra keys should be created\");\n    REQUIRE_MESSAGE(!result, \"Incorrect heterogeneous insert result (accessor)\");\n    REQUIRE_MESSAGE(acc->first.integer_key() == 2, \"Incorrect accessor\");\n    REQUIRE_MESSAGE(acc->second.value() == DefaultConstructibleValue::default_value, \"Value should be default constructed\");\n\n    key_type::reset();\n}\n\nvoid test_heterogeneous_erase() {\n    using key_type = HeterogeneousKey</*IsConstructible = */false>;\n    using chmap_type = oneapi::tbb::concurrent_hash_map<key_type, int, HeterogeneousHashCompare>;\n\n    chmap_type chmap;\n\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 0, \"Incorrect test setup\");\n\n    chmap.emplace(std::piecewise_construct, std::forward_as_tuple(key_type::construct_flag{}, 1), std::forward_as_tuple(100));\n    chmap.emplace(std::piecewise_construct, std::forward_as_tuple(key_type::construct_flag{}, 2), std::forward_as_tuple(200));\n\n    typename chmap_type::const_accessor cacc;\n\n    REQUIRE(chmap.find(cacc, int(1)));\n    REQUIRE(chmap.find(cacc, int(2)));\n\n    cacc.release();\n\n    bool result = chmap.erase(int(1));\n    REQUIRE_MESSAGE(result, \"Erasure should be successful\");\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 0, \"No extra keys should be created\");\n    REQUIRE_MESSAGE(!chmap.find(cacc, int(1)), \"Element was not erased\");\n\n\n    result = chmap.erase(int(1));\n    REQUIRE_MESSAGE(!result, \"Erasure should fail\");\n    REQUIRE_MESSAGE(key_type::heterogeneous_keys_count == 0, \"No extra keys should be created\");\n    key_type::reset();\n}\n\nvoid test_heterogeneous_lookup() {\n    test_heterogeneous_find();\n    test_heterogeneous_count();\n    test_heterogeneous_equal_range();\n}\n\n//! Test construction with hash_compare\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing construction with hash_compare\") {\n    TestHashCompareConstructors();\n}\n\n//! Test concurrent_hash_map member types\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"test types\"){\n    test_member_types<oneapi::tbb::concurrent_hash_map>();\n}\n\n//! Test swap and clear operations\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"test copy operations\") {\n    TestCopy();\n}\n\n//! Test rehash operation\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"test rehash operation\") {\n    TestRehash();\n}\n\n//! Test assignment operation\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"test assignment operation\") {\n    TestAssignment();\n}\n\n//! Test iterators and ranges\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"test iterators and ranges\") {\n    TestIteratorsAndRanges();\n}\n\n//! Test work with initializer_list\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"test work with initializer_list\") {\n    TestInitList();\n}\n\n#if TBB_USE_EXCEPTIONS\n//! Test exception safety\n//! \\brief \\ref requirement\nTEST_CASE(\"test exception safety\") {\n    TestExceptions();\n}\n\n//! Test exceptions safety guarantees for move constructor\n//! \\brief \\ref requirement\nTEST_CASE(\"test move support with exceptions\") {\n    move_support_tests::test_ex_move_ctor_unequal_allocator_memory_failure<hash_map_traits>();\n    move_support_tests::test_ex_move_ctor_unequal_allocator_element_ctor_failure<hash_map_traits>();\n}\n#endif\n\n//! Test move constructor\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing move constructor\"){\n    move_support_tests::test_move_constructor<hash_map_traits>();\n}\n\n//! Test move assign operator\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing move assign operator\"){\n    move_support_tests::test_move_assignment<hash_map_traits>();\n}\n\n//! Test insert and empace\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing concurrent insert and emplace\"){\n    int n=250000;\n    {\n        DataStateTrackedTable table;\n        DoConcurrentOperations<RvalueInsert, DataStateTrackedTable>( table, n, \"rvalue ref insert\", 1 );\n    }\n    {\n        DataStateTrackedTable table;\n        DoConcurrentOperations<Emplace, DataStateTrackedTable>( table, n, \"emplace\", 1 );\n    }\n}\n\n//! Test allocator traits\n//! \\brief \\ref requirement\nTEST_CASE(\"testing allocator traits\") {\n    test_allocator_traits_support<hash_map_traits>();\n}\n\n//! Test concurrent operations\n//! \\brief \\ref requirement\nTEST_CASE(\"testing concurrency\"){\n    for (std::size_t p = 1; p <= 4; ++p) {\n        oneapi::tbb::global_control limit(oneapi::tbb::global_control::max_allowed_parallelism, p);\n        TestInsertFindErase(p);\n        TestConcurrency(p);\n    }\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Test deduction guides\n//! \\brief \\ref interface\nTEST_CASE(\"testing deduction guides\") {\n    TestDeductionGuides<oneapi::tbb::concurrent_hash_map>();\n}\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_hash_map comparisons\") {\n    TestCHMapComparisons();\n}\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_hash_map iterator comparisons\") {\n    TestCHMapIteratorComparisons();\n}\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"test concurrent_hash_map heterogeneous lookup\") {\n    test_heterogeneous_lookup();\n}\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"test concurrent_hash_map heterogeneous insert\") {\n    test_heterogeneous_insert();\n}\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"test concurrent_hash_map heterogeneous erase\") {\n    test_heterogeneous_erase();\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_concurrent_lru_cache.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#define TBB_PREVIEW_CONCURRENT_LRU_CACHE 1\n\n#include \"common/test.h\"\n#include \"oneapi/tbb/concurrent_lru_cache.h\"\n#include <common/concurrent_lru_cache_common.h>\n\n//! \\file conformance_concurrent_lru_cache.cpp\n//! \\brief Test for [preview] functionality\n\n//-----------------------------------------------------------------------------\n// Concurrent LRU Cache Tests: Cache Test Cases\n//-----------------------------------------------------------------------------\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"basic test for creation and use\") {\n    using preset = concurrent_lru_cache_presets::preset_default<int, int>;\n\n    auto callback = [](int key) -> int { return key; };\n    std::size_t number_of_lru_history_items = 8;\n\n    preset preset_object{callback, number_of_lru_history_items};\n    preset::cache_type& cache = preset_object.cache;\n\n    int dummy_key = 0;\n    preset::handle_type h = cache[dummy_key];\n    int value = h.value();\n    (void)value;\n}\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"basic test for std::move\") {\n    using preset = concurrent_lru_cache_presets::preset1;\n    preset preset_object{};\n    preset::cache_type& cache = preset_object.cache;\n\n    // retain handle object to keep an item in the cache\n    // if it is still active without aging\n    preset::handle_type sheep = cache[\"sheep\"];\n    preset::handle_type horse = cache[\"horse\"];\n    preset::handle_type bull = cache[\"bull\"];\n\n    // store handler objects in vector\n    std::vector<preset::handle_type> animals;\n    animals.reserve(5);\n    animals.emplace_back(std::move(sheep));\n    animals.emplace_back(std::move(horse));\n    animals[0] = std::move(bull);\n\n    // after resize() vec will be full of default constructed handlers\n    // with null pointers on item in cache and on cache which item belongs to\n    animals.resize(10);\n}\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"basic test for to bool conversion\") {\n    using concurrent_lru_cache_presets::preset1;\n\n    preset1 preset_instance{};\n    preset1::cache_type& cache = preset_instance.cache;\n\n\n    preset1::handle_type handle;\n    preset1::handle_type foobar = preset1::handle_type();\n\n    handle = cache[\"handle\"];\n\n    preset1::handle_type foo = cache[\"bar\"];\n\n    preset1::handle_type handle1(std::move(handle));\n\n    handle = std::move(handle1);\n\n    REQUIRE_MESSAGE(\n        !preset1::handle_type(),\n        \"user-defined to-bool conversion does not work\");\n    REQUIRE_MESSAGE(\n        handle,\n        \"user-defined to-bool conversion does not work\");\n\n    handle = preset1::handle_type();\n}\n\n//! \\brief \\ref requirement\nTEST_CASE(\"basic test for cache hit\") {\n    using preset = concurrent_lru_cache_presets::preset_call_count<__LINE__>;\n    preset preset_object{};\n    preset::cache_type& cache = preset_object.cache;\n\n    int dummy_key = 0;\n    cache[dummy_key];\n    cache[dummy_key];\n\n    REQUIRE_MESSAGE(\n        preset::counter_type::calls == 1,\n        \"value function should be called only on a cache miss\");\n}\n\n//! \\brief \\ref requirement\nTEST_CASE(\"basic test for unused objects\") {\n    using preset = concurrent_lru_cache_presets::preset_instance_count;\n    preset preset_object{};\n\n    for (std::size_t i = 0; i < preset_object.number_of_lru_history_items; ++i)\n        preset_object.cache[i];\n\n    REQUIRE_MESSAGE(\n        preset_object.source.instances_count() == preset_object.number_of_lru_history_items+1,\n        \"cache should respect number of stored unused objects to number passed in constructor\");\n}\n\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_concurrent_map.cpp",
    "content": "/*\n    Copyright (c) 2019-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#ifndef NOMINMAX\n#define NOMINMAX\n#endif\n#include \"oneapi/tbb/concurrent_map.h\"\n#include <common/test.h>\n#include <common/utils.h>\n#include <common/concurrent_ordered_common.h>\n#include <memory>\n#include <type_traits>\n\n//! \\file conformance_concurrent_map.cpp\n//! \\brief Test for [containers.concurrent_map containers.concurrent_multimap] specifications\n\ntemplate <typename... Args>\nstruct AllowMultimapping<oneapi::tbb::concurrent_multimap<Args...>> : std::true_type {};\n\ntemplate <typename Key, typename Mapped>\nusing Allocator = LocalCountingAllocator<std::allocator<std::pair<const Key, Mapped>>>;\n\nusing map_type = oneapi::tbb::concurrent_map<int, int, std::less<int>, Allocator<int, int>>;\nusing multimap_type = oneapi::tbb::concurrent_multimap<int, int, std::less<int>, Allocator<int, int>>;\n\ntemplate <>\nstruct SpecialTests<map_type> {\n    static void Test() {\n        SpecialMapTests<map_type>();\n    }\n};\n\ntemplate <>\nstruct SpecialTests<multimap_type> {\n    static void Test() {\n        SpecialMultiMapTests<multimap_type>();\n    }\n};\n\ntemplate <template <typename...> class ContainerType>\nvoid test_member_types() {\n    using default_container_type = ContainerType<int, int>;\n    static_assert(std::is_same<typename default_container_type::key_compare, std::less<int>>::value,\n                  \"Incorrect default template comparator\");\n    static_assert(std::is_same<typename default_container_type::allocator_type, oneapi::tbb::tbb_allocator<std::pair<const int, int>>>::value,\n                  \"Incorrect default template allocator\");\n\n    auto test_comparator = [](const int&, const int&)->bool { return true; };\n    using test_allocator_type = std::allocator<std::pair<const int, int>>;\n\n    using container_type = ContainerType<int, int, decltype(test_comparator), test_allocator_type>;\n\n    static_assert(std::is_same<typename container_type::key_type, int>::value,\n                  \"Incorrect container key_type member type\");\n    static_assert(std::is_same<typename container_type::mapped_type, int>::value,\n                  \"Incorrect container mapped_type member type\");\n    static_assert(std::is_same<typename container_type::value_type, std::pair<const int, int>>::value,\n                  \"Incorrect container value_type member type\");\n\n    static_assert(std::is_unsigned<typename container_type::size_type>::value,\n                  \"Incorrect container size_type member type\");\n    static_assert(std::is_signed<typename container_type::difference_type>::value,\n                  \"Incorrect container difference_type member type\");\n\n    static_assert(std::is_same<typename container_type::key_compare, decltype(test_comparator)>::value,\n                  \"Incorrect container key_compare member type\");\n    static_assert(std::is_same<typename container_type::allocator_type, test_allocator_type>::value,\n                  \"Incorrect container allocator_type member type\");\n\n    using value_type = typename container_type::value_type;\n    static_assert(std::is_same<typename container_type::reference, value_type&>::value,\n                  \"Incorrect container reference member type\");\n    static_assert(std::is_same<typename container_type::const_reference, const value_type&>::value,\n                  \"Incorrect container const_reference member type\");\n    using allocator_type = typename container_type::allocator_type;\n    static_assert(std::is_same<typename container_type::pointer, typename std::allocator_traits<allocator_type>::pointer>::value,\n                  \"Incorrect container pointer member type\");\n    static_assert(std::is_same<typename container_type::const_pointer, typename std::allocator_traits<allocator_type>::const_pointer>::value,\n                  \"Incorrect container const_pointer member type\");\n\n    static_assert(utils::is_forward_iterator<typename container_type::iterator>::value,\n                  \"Incorrect container iterator member type\");\n    static_assert(!std::is_const<typename container_type::iterator::value_type>::value,\n                  \"Incorrect container iterator member type\");\n    static_assert(utils::is_forward_iterator<typename container_type::const_iterator>::value,\n                  \"Incorrect container const_iterator member type\");\n    static_assert(std::is_const<typename container_type::const_iterator::value_type>::value,\n                  \"Incorrect container const_iterator member type\");\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\ntemplate <template <typename...> typename TMap>\nvoid test_deduction_guides() {\n    std::vector<std::pair<int, int>> v(10, {0, 0});\n    TMap map(v.begin(), v.end());\n    static_assert(std::is_same_v<decltype(map), TMap<int, int> >, \"WRONG\\n\");\n\n    std::greater<int> compare;\n    std::allocator<std::pair<const int, int>> allocator;\n    TMap map2(v.begin(), v.end(), compare);\n    static_assert(std::is_same_v<decltype(map2), TMap<int, int, decltype(compare)> >, \"WRONG\\n\");\n\n    TMap map3(v.begin(), v.end(), allocator);\n    static_assert(std::is_same_v<decltype(map3), TMap<int, int, std::less<int>, decltype(allocator)> >, \"WRONG\\n\");\n\n    TMap map4(v.begin(), v.end(), compare, allocator);\n    static_assert(std::is_same_v<decltype(map4), TMap<int, int, decltype(compare), decltype(allocator)> >, \"WRONG\\n\");\n\n    using pair_t = std::pair<const int, int>;\n    auto init = { pair_t{1, 1}, pair_t{2, 2}, pair_t{3, 3} };\n    TMap map5(init);\n    static_assert(std::is_same_v<decltype(map5), TMap<int, int> >, \"WRONG\\n\");\n\n    TMap map6(init, compare);\n    static_assert(std::is_same_v<decltype(map6), TMap<int, int, decltype(compare)> >, \"WRONG\\n\");\n\n    TMap map7(init, allocator);\n    static_assert(std::is_same_v<decltype(map7), TMap<int, int, std::less<int>, decltype(allocator)> >, \"WRONG\\n\");\n\n    TMap map8(init, compare, allocator);\n    static_assert(std::is_same_v<decltype(map8), TMap<int, int, decltype(compare), decltype(allocator)> >, \"WRONG\\n\");\n}\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate <template <typename...> class MapType>\nvoid test_heterogeneous_functions() {\n    check_heterogeneous_functions_key_int<MapType, int, int>();\n    check_heterogeneous_functions_key_string<MapType, std::string, std::string>();\n    check_heterogeneous_bound_functions<MapType<int, int, TransparentLess>>();\n}\n\nstruct COMapTraits : OrderedMoveTraitsBase {\n    template <typename T, typename Allocator>\n    using container_type = oneapi::tbb::concurrent_map<T, T, std::less<T>, Allocator>;\n\n    template <typename T>\n    using container_value_type = std::pair<const T, T>;\n\n    using init_iterator_type = move_support_tests::FooPairIterator;\n}; // struct COMapTraits\n\nstruct COMultimapTraits : OrderedMoveTraitsBase {\n    template <typename T, typename Allocator>\n    using container_type = oneapi::tbb::concurrent_multimap<T, T, std::less<T>, Allocator>;\n\n    template <typename T>\n    using container_value_type = std::pair<const T, T>;\n\n    using init_iterator_type = move_support_tests::FooPairIterator;\n}; // struct COMultimapTraits\n\n//! Testing concurrent_map member types\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_map member types\") {\n    test_member_types<oneapi::tbb::concurrent_map>();\n}\n\n//! Testing requirements of concurrent_map\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_map requirements\") {\n    test_basic<map_type>();\n}\n\n//! Testing multithreading support in concurrent_map\n//! \\brief \\ref requirement\nTEST_CASE(\"concurrent_map multithreading support\") {\n    test_concurrent<map_type>();\n}\n\n//! Testing move constructors and assignment operator in concurrent_map\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_map move semantics support\") {\n    test_rvalue_ref_support<COMapTraits>();\n}\n\n//! Testing std::initializer_list constructors and modifiers in concurrent_map\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"std::initializer_list support in concurrent_map\") {\n    test_initializer_list_support<map_type>({{1, 1}, {2, 2}, {3, 3}, {4, 4}});\n}\n\n//! Testing node handling in concurrent_map\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"node handling support in concurrent_map\") {\n    node_handling_tests::test_node_handling_support<map_type>();\n}\n\n//! Testing std::allocator_traits support in concurrent_map\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"std::allocator_traits support in concurrent_map\") {\n    test_allocator_traits_support<COMapTraits>();\n}\n\n//! Testing heterogeneous overloads in concurrent_map\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"heterogeneous overloads in concurrent_map\") {\n    test_heterogeneous_functions<oneapi::tbb::concurrent_map>();\n}\n\n//! Testing insert overloads with generic pair in concurrent_map\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"insertion by generic pair in concurrent_map\") {\n    test_insert_by_generic_pair<oneapi::tbb::concurrent_map>();\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Testing Class Template Argument Deduction in concurrent_map\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"CTAD support in concurrent_map\") {\n    test_deduction_guides<oneapi::tbb::concurrent_map>();\n}\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\n//! Testing comparisons of concurrent_map\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"test concurrent_map comparisons\") {\n    test_map_comparisons<oneapi::tbb::concurrent_map>();\n}\n\n//! Testing concurrent_multimap member types\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_multimap member types\") {\n    test_member_types<oneapi::tbb::concurrent_multimap>();\n}\n\n//! Testing requirements of concurrent_multimap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_multimap requirements\") {\n    test_basic<multimap_type>();\n}\n\n//! Testing multithreading support in concurrent_multimap\n//! \\brief \\ref requirement\nTEST_CASE(\"concurrent_multimap multithreading support\") {\n    test_concurrent<multimap_type>();\n}\n\n//! Testing move constructors and assignment operator in concurrent_multimap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_multimap multithreading support\") {\n    test_rvalue_ref_support<COMultimapTraits>();\n}\n\n//! Testing std::initializer_list constructors and modifiers in concurrent_multimap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"std::initializer_list support in concurrent_multimap\") {\n    test_initializer_list_support<multimap_type>({{1, 1}, {2, 2}, {3, 3}, {4, 4}, {4, 40}});\n}\n\n//! Testing node handling support in concurrent_multimap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"node handling support in concurrent_multimap\") {\n    node_handling_tests::test_node_handling_support<multimap_type>();\n}\n\n//! Testing std::allocator_traits support in concurrent_multimap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"std::allocator_traits support in concurrent_multimap\") {\n    test_allocator_traits_support<COMultimapTraits>();\n}\n\n//! Testing heterogeneous overloads in concurrent_multimap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"heterogeneous overloads in concurrent_multimap\") {\n    test_heterogeneous_functions<oneapi::tbb::concurrent_multimap>();\n}\n\n//! Testing insert overloads with generic pair in concurrent_multimap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"insertion by generic pair in concurrent_multimap\") {\n    test_insert_by_generic_pair<oneapi::tbb::concurrent_multimap>();\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Testing Class Template Argument Deduction in concurrent_multimap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"CTAD support in concurrent_multimap\") {\n    test_deduction_guides<oneapi::tbb::concurrent_multimap>();\n}\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\n//! Testing comparison operators in concurrent_multimap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"test concurrent_multimap comparisons\") {\n    test_map_comparisons<oneapi::tbb::concurrent_multimap>();\n}\n\n//! Testing of merge operations in concurrent_map and concurrent_multimap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"merge operations\") {\n    node_handling_tests::test_merge<map_type, multimap_type>(1000);\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_concurrent_priority_queue.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include <common/concurrent_priority_queue_common.h>\n#include <common/initializer_list_support.h>\n#include <common/container_move_support.h>\n#include <common/containers_common.h>\n#include <common/test_comparisons.h>\n#include <scoped_allocator>\n\n//! \\file conformance_concurrent_priority_queue.cpp\n//! \\brief Test for [containers.concurrent_priority_queue] specification\n\nvoid test_to_vector() {\n    using equality_comparison_helpers::toVector;\n    int array[] = {1, 5, 6, 8, 4, 7};\n    oneapi::tbb::blocked_range<int*> range = utils::make_blocked_range(array);\n    std::vector<int> source(range.begin(), range.end());\n\n    oneapi::tbb::concurrent_priority_queue<int> q(source.begin(), source.end());\n    std::vector<int> from_cpq = toVector(q);\n\n    std::sort(source.begin(), source.end());\n    REQUIRE_MESSAGE(source == from_cpq, \"equality_comparison_helpers::toVector incorrectly copied items from CPQ\");\n}\n\nvoid test_basic() {\n    const int NUMBER = 10;\n    utils::FastRandom<> rnd(1234);\n\n    std::vector<int> arrInt;\n    for (int i = 0; i < NUMBER; ++i)\n        arrInt.emplace_back(rnd.get());\n\n    type_tester(arrInt); // Test integers\n}\n\nvoid test_initializer_list() {\n    using namespace initializer_list_support_tests;\n    test_initializer_list_support<oneapi::tbb::concurrent_priority_queue<char>>({1, 2, 3, 4, 5});\n    test_initializer_list_support<oneapi::tbb::concurrent_priority_queue<int>>({});\n}\n\nstruct SpecialMemberCalls {\n    std::size_t copy_ctor_called_times;\n    std::size_t move_ctor_called_times;\n    std::size_t copy_assign_called_times;\n    std::size_t move_assign_called_times;\n}; // struct SpecialMemberCalls\n\nbool operator==( const SpecialMemberCalls& lhs, const SpecialMemberCalls& rhs ) {\n    return lhs.copy_ctor_called_times == rhs.copy_ctor_called_times &&\n           lhs.move_ctor_called_times == rhs.move_ctor_called_times &&\n           lhs.copy_assign_called_times == rhs.copy_assign_called_times &&\n           lhs.move_assign_called_times == rhs.move_assign_called_times;\n}\n\ntemplate <typename CounterType>\nstruct MoveOperationTrackerBase {\n    static CounterType copy_ctor_called_times;\n    static CounterType move_ctor_called_times;\n    static CounterType copy_assign_called_times;\n    static CounterType move_assign_called_times;\n\n    static SpecialMemberCalls special_member_calls() {\n        return SpecialMemberCalls{copy_ctor_called_times, move_ctor_called_times, copy_assign_called_times, move_assign_called_times};\n    }\n    static CounterType value_counter;\n    std::size_t value;\n\n    MoveOperationTrackerBase() : value(++value_counter) {}\n    explicit MoveOperationTrackerBase( const std::size_t val ) : value(val) {}\n    ~MoveOperationTrackerBase() { value = 0; }\n\n    MoveOperationTrackerBase( const MoveOperationTrackerBase& other ) : value(other.value) {\n        REQUIRE_MESSAGE(other.value, \"The object has been moved or destroyed\");\n        ++copy_ctor_called_times;\n    }\n\n    MoveOperationTrackerBase( MoveOperationTrackerBase&& other ) noexcept : value(other.value) {\n        REQUIRE_MESSAGE(other.value, \"The object has been moved or destroyed\");\n        other.value = 0;\n        ++move_ctor_called_times;\n    }\n\n    MoveOperationTrackerBase& operator=( const MoveOperationTrackerBase& other ) {\n        REQUIRE_MESSAGE(other.value, \"The object has been moved or destroyed\");\n        value = other.value;\n        ++copy_assign_called_times;\n        return *this;\n    }\n\n    MoveOperationTrackerBase& operator=( MoveOperationTrackerBase&& other ) noexcept {\n        REQUIRE_MESSAGE(other.value, \"The object has been moved or destroyed\");\n        value = other.value;\n        other.value = 0;\n        ++move_assign_called_times;\n        return *this;\n    }\n\n    bool operator<( const MoveOperationTrackerBase& other ) const {\n        REQUIRE_MESSAGE(value, \"The object has been moved or destroyed\");\n        REQUIRE_MESSAGE(other.value, \"The object has been moved or destroyed\");\n        return value < other.value;\n    }\n}; // struct MoveOperationTrackerBase\n\ntemplate<typename CounterType>\nbool operator==( const MoveOperationTrackerBase<CounterType>& lhs, const MoveOperationTrackerBase<CounterType>& rhs ) {\n    return !(lhs < rhs) && !(rhs < lhs);\n}\n\nusing MoveOperationTracker = MoveOperationTrackerBase<std::size_t>;\nusing MoveOperationTrackerConc = MoveOperationTrackerBase<std::atomic<std::size_t>>;\n\ntemplate <typename CounterType> CounterType MoveOperationTrackerBase<CounterType>::copy_ctor_called_times(0);\ntemplate <typename CounterType> CounterType MoveOperationTrackerBase<CounterType>::move_ctor_called_times(0);\ntemplate <typename CounterType> CounterType MoveOperationTrackerBase<CounterType>::copy_assign_called_times(0);\ntemplate <typename CounterType> CounterType MoveOperationTrackerBase<CounterType>::move_assign_called_times(0);\ntemplate <typename CounterType> CounterType MoveOperationTrackerBase<CounterType>::value_counter(0);\n\ntemplate <typename Allocator = std::allocator<MoveOperationTracker>>\nstruct CPQSrcFixture {\n    CPQSrcFixture& operator=( const CPQSrcFixture& ) = delete;\n\n    enum {default_container_size = 100};\n    using cpq_compare_type = std::less<MoveOperationTracker>;\n    using cpq_allocator_type = typename std::allocator_traits<Allocator>::template rebind_alloc<MoveOperationTracker>;\n    using cpq_type = oneapi::tbb::concurrent_priority_queue<MoveOperationTracker, cpq_compare_type, cpq_allocator_type>;\n\n    cpq_type cpq_src;\n    const std::size_t container_size;\n\n    void init() {\n        std::size_t& mcct = MoveOperationTracker::move_ctor_called_times;\n        std::size_t& ccct = MoveOperationTracker::copy_ctor_called_times;\n        std::size_t& cact = MoveOperationTracker::copy_assign_called_times;\n        std::size_t& mact = MoveOperationTracker::move_assign_called_times;\n        mcct = ccct = cact = mact = 0;\n\n        for (std::size_t i = 1; i <= container_size; ++i) {\n            cpq_src.push(MoveOperationTracker(i));\n        }\n        REQUIRE_MESSAGE(cpq_src.size() == container_size, \"Error in test setup\");\n    }\n\n    CPQSrcFixture( std::size_t size = default_container_size )\n        : CPQSrcFixture(typename cpq_type::allocator_type(), size) {}\n\n    CPQSrcFixture( const typename cpq_type::allocator_type& a, std::size_t size = default_container_size )\n        : cpq_src(a), container_size(size)\n    {\n        init();\n    }\n}; // struct CPQSrcFixture\n\nvoid test_steal_move_ctor() {\n    using fixture_type = CPQSrcFixture<>;\n    using container_type = typename fixture_type::cpq_type;\n    fixture_type fixture;\n    container_type src_copy{fixture.cpq_src};\n\n    SpecialMemberCalls previous = MoveOperationTracker::special_member_calls();\n    container_type dst{std::move(fixture.cpq_src)};\n    REQUIRE_MESSAGE(previous == MoveOperationTracker::special_member_calls(), \"Steal move ctor should not create any new elements\");\n    REQUIRE_MESSAGE(dst == src_copy, \"cpq content changed during steal move\");\n    REQUIRE_MESSAGE(!(dst != src_copy), \"cpq content changed during steal move\");\n}\n\nvoid test_steal_move_ctor_with_allocator() {\n    using arena_fixture_type = move_support_tests::TwoMemoryArenasFixture<MoveOperationTracker>;\n    using fixture_type = CPQSrcFixture<arena_fixture_type::allocator_type>;\n\n    arena_fixture_type arena_fixture(8 * fixture_type::default_container_size);\n    fixture_type fixture(arena_fixture.source_allocator);\n    fixture_type::cpq_type src_copy(fixture.cpq_src);\n\n    SpecialMemberCalls previous = MoveOperationTracker::special_member_calls();\n    fixture_type::cpq_type dst(std::move(fixture.cpq_src), arena_fixture.source_allocator);\n    REQUIRE_MESSAGE(previous == MoveOperationTracker::special_member_calls(), \"Steal move ctor should not create any new elements\");\n    REQUIRE_MESSAGE(dst == src_copy, \"cpq content changed during steal move\");\n    REQUIRE_MESSAGE(!(dst != src_copy), \"cpq content changed during steal move\");\n}\n\nvoid test_per_element_move_ctor_with_allocator() {\n    using arena_fixture_type = move_support_tests::TwoMemoryArenasFixture<MoveOperationTracker>;\n    using fixture_type = CPQSrcFixture<arena_fixture_type::allocator_type>;\n\n    arena_fixture_type arena_fixture(8 * fixture_type::default_container_size);\n    fixture_type fixture(arena_fixture.source_allocator);\n    fixture_type::cpq_type src_copy(fixture.cpq_src);\n\n    SpecialMemberCalls move_ctor_called_cpq_size_times = MoveOperationTracker::special_member_calls();\n    move_ctor_called_cpq_size_times.move_ctor_called_times += fixture.container_size;\n\n    fixture_type::cpq_type dst(std::move(fixture.cpq_src), arena_fixture.dst_allocator);\n    REQUIRE_MESSAGE(move_ctor_called_cpq_size_times == MoveOperationTracker::special_member_calls(),\n                    \"Per element move ctor should move initialize all new elements\");\n    REQUIRE_MESSAGE(dst == src_copy, \"cpq content changed during move\");\n    REQUIRE_MESSAGE(!(dst != src_copy), \"cpq content changed during move\");\n}\n\nvoid test_steal_move_assign_operator() {\n    using fixture_type = CPQSrcFixture<>;\n\n    fixture_type fixture;\n    fixture_type::cpq_type src_copy(fixture.cpq_src);\n\n    fixture_type::cpq_type dst;\n    SpecialMemberCalls previous = MoveOperationTracker::special_member_calls();\n    dst = std::move(fixture.cpq_src);\n\n    REQUIRE_MESSAGE(previous == MoveOperationTracker::special_member_calls(), \"Steal move assign operator should not create any new elements\");\n    REQUIRE_MESSAGE(dst == src_copy, \"cpq content changed during steal move assignment\");\n    REQUIRE_MESSAGE(!(dst != src_copy), \"cpq content changed during steal move assignment\");\n}\n\nvoid test_steal_move_assign_operator_with_stateful_allocator() {\n    // Use stateful allocator which is propagated on move assignment\n    using arena_fixture_type = move_support_tests::TwoMemoryArenasFixture<MoveOperationTracker, /*POCMA = */std::true_type>;\n    using fixture_type = CPQSrcFixture<arena_fixture_type::allocator_type>;\n\n    arena_fixture_type arena_fixture(8 * fixture_type::default_container_size);\n    fixture_type fixture(arena_fixture.source_allocator);\n    fixture_type::cpq_type src_copy(fixture.cpq_src);\n    fixture_type::cpq_type dst(arena_fixture.dst_allocator);\n\n    SpecialMemberCalls previous = MoveOperationTracker::special_member_calls();\n    dst = std::move(fixture.cpq_src);\n    REQUIRE_MESSAGE(previous == MoveOperationTracker::special_member_calls(), \"Steal move assign operator should not create any new elements\");\n    REQUIRE_MESSAGE(dst == src_copy, \"cpq content changed during steal move assignment\");\n    REQUIRE_MESSAGE(!(dst != src_copy), \"cpq content changed during steal move assignment\");\n}\n\nvoid test_per_element_move_assign_operator() {\n    // Use stateful allocator which is not prepagated on move assignment\n    using arena_fixture_type = move_support_tests::TwoMemoryArenasFixture<MoveOperationTracker, /*POCMA = */std::false_type>;\n    using fixture_type = CPQSrcFixture<arena_fixture_type::allocator_type>;\n\n    arena_fixture_type arena_fixture(8 * fixture_type::default_container_size);\n    fixture_type fixture(arena_fixture.source_allocator);\n    fixture_type::cpq_type src_copy(fixture.cpq_src);\n    fixture_type::cpq_type dst(arena_fixture.dst_allocator);\n\n    SpecialMemberCalls move_ctor_called_cpq_size_times = MoveOperationTracker::special_member_calls();\n    move_ctor_called_cpq_size_times.move_ctor_called_times += fixture.container_size;\n    dst = std::move(fixture.cpq_src);\n    REQUIRE_MESSAGE(move_ctor_called_cpq_size_times == MoveOperationTracker::special_member_calls(),\n                    \"Per element move assignment should move initialize all new elements\");\n    REQUIRE_MESSAGE(dst == src_copy, \"cpq content changed during per element move assignment\");\n    REQUIRE_MESSAGE(!(dst != src_copy), \"cpq content changed during per element move assignment\");\n}\n\nvoid test_cpq_move_constructor() {\n    test_steal_move_ctor();\n    test_steal_move_ctor_with_allocator();\n    test_per_element_move_ctor_with_allocator();\n}\n\nvoid test_cpq_move_assignment() {\n    test_steal_move_assign_operator();\n    test_steal_move_assign_operator_with_stateful_allocator();\n    test_per_element_move_assign_operator();\n}\n\n\nstruct NoDefaultCtorType {\n    NoDefaultCtorType() = delete;\n\n    NoDefaultCtorType( std::size_t val1, std::size_t val2 ) : value1(val1), value2(val2) {}\n    bool operator<(const NoDefaultCtorType& other) const {\n        return value1 + value2 < other.value1 + other.value2;\n    }\n\n    std::size_t value1, value2;\n}; // struct NoDefaultCtorType\n\nstruct ForwardInEmplaceTester {\n    int a;\n    static bool move_ctor_called;\n    static bool move_assign_called;\n\n    ForwardInEmplaceTester( int val ) : a(val) {}\n    ForwardInEmplaceTester( const ForwardInEmplaceTester& ) = default;\n    ForwardInEmplaceTester( ForwardInEmplaceTester&& ) = default;\n\n    ForwardInEmplaceTester( ForwardInEmplaceTester&& obj, int val ) : a(obj.a) {\n        move_ctor_called = true;\n        obj.a = val;\n    }\n\n    ForwardInEmplaceTester& operator=( const ForwardInEmplaceTester& ) = default;\n\n    ForwardInEmplaceTester& operator=( ForwardInEmplaceTester&& obj ) {\n        a = obj.a;\n        move_assign_called = true;\n        return *this;\n    }\n\n    bool operator<( const ForwardInEmplaceTester& ) const { return true; }\n}; // struct ForwardInEmplaceTester\n\nbool ForwardInEmplaceTester::move_ctor_called = false;\nbool ForwardInEmplaceTester::move_assign_called = false;\n\nvoid test_move_support_in_push_pop() {\n    std::size_t& mcct = MoveOperationTracker::move_ctor_called_times;\n    std::size_t& ccct = MoveOperationTracker::copy_ctor_called_times;\n    std::size_t& cact = MoveOperationTracker::copy_assign_called_times;\n    std::size_t& mact = MoveOperationTracker::move_assign_called_times;\n    mcct = ccct = cact = mact = 0;\n\n    oneapi::tbb::concurrent_priority_queue<MoveOperationTracker> q1;\n\n    REQUIRE_MESSAGE(mcct == 0, \"Value must be zero-initialized\");\n    REQUIRE_MESSAGE(ccct == 0, \"Value must be zero-initialized\");\n\n    q1.push(MoveOperationTracker{});\n    REQUIRE_MESSAGE(mcct > 0, \"Not working push(T&&)\");\n    REQUIRE_MESSAGE(ccct == 0, \"Copying of arg occurred during push(T&&)\");\n\n    MoveOperationTracker ob;\n    const std::size_t prev_mcct = mcct;\n    q1.push(std::move(ob));\n    REQUIRE_MESSAGE(mcct > prev_mcct, \"Not working push(T&&)\");\n    REQUIRE_MESSAGE(ccct == 0, \"Copying of arg occurred during push(T&&)\");\n\n    REQUIRE_MESSAGE(cact == 0, \"Copy assignment called during push(T&&)\");\n    const std::size_t prev_mact = mact;\n    q1.try_pop(ob);\n    REQUIRE_MESSAGE(cact == 0, \"Copy assignment called during try_pop(T&)\");\n    REQUIRE_MESSAGE(mact > prev_mact, \"Move assignment was not called during try_pop(T&)\");\n\n    oneapi::tbb::concurrent_priority_queue<NoDefaultCtorType> q2;\n    q2.emplace(15, 3);\n    q2.emplace(2, 35);\n    q2.emplace(8, 8);\n\n    NoDefaultCtorType o(0, 0);\n    q2.try_pop(o);\n    REQUIRE_MESSAGE((o.value1 == 2 && o.value2 == 35), \"Unexpected data popped; possible emplace() failure\");\n    q2.try_pop(o);\n    REQUIRE_MESSAGE((o.value1 == 15 && o.value2 == 3), \"Unexpected data popped; possible emplace() failure\");\n    q2.try_pop(o);\n    REQUIRE_MESSAGE((o.value1 == 8 && o.value2 == 8), \"Unexpected data popped; possible emplace() failure\");\n    REQUIRE_MESSAGE(!q2.try_pop(o), \"The queue should be empty\");\n\n    oneapi::tbb::concurrent_priority_queue<ForwardInEmplaceTester> q3;\n    REQUIRE(ForwardInEmplaceTester::move_ctor_called == false);\n    q3.emplace(ForwardInEmplaceTester{5}, 2);\n    REQUIRE_MESSAGE(ForwardInEmplaceTester::move_ctor_called == true, \"Not used std::forward in emplace()\");\n    ForwardInEmplaceTester obj(0);\n    q3.try_pop(obj);\n\n    REQUIRE_MESSAGE(ForwardInEmplaceTester::move_assign_called == true, \"Not used move assignment in try_pop\");\n    REQUIRE_MESSAGE(obj.a == 5, \"Not used std::forward in emplace\");\n    REQUIRE_MESSAGE(!q3.try_pop(obj), \"The queue should be empty\");\n}\n\n// Comparator with assert in default ctor\ntemplate <typename T>\nclass LessA : public std::less<T> {\npublic:\n    explicit LessA( bool no_assert = false ) {\n        REQUIRE_MESSAGE(no_assert, \"Default ctor should not be called\");\n    }\n}; // class LessA\n\n// TODO: consider use of TEST_SUITE for these tests\n// TODO: combine with the constructors test from the common part\nvoid test_ctors_dtor_accessors() {\n    std::vector<int> v;\n    std::allocator<int> a;\n\n    using cpq_type = oneapi::tbb::concurrent_priority_queue<int, std::less<int>>;\n    using cpq_with_compare_type = oneapi::tbb::concurrent_priority_queue<int, LessA<int>>;\n    using cpq_with_compare_and_allocator_type = oneapi::tbb::concurrent_priority_queue<int, LessA<int>, std::allocator<int>>;\n\n    LessA<int> l(true);\n\n    // Test default ctor\n    cpq_type cpq1;\n    REQUIRE_MESSAGE(cpq1.size() == 0, \"Failed size test for default ctor\");\n    REQUIRE_MESSAGE(cpq1.empty(), \"Failed empty test for default ctor\");\n\n    // Test capacity ctor\n    cpq_type cpq2(42);\n    REQUIRE_MESSAGE(cpq2.size() == 0, \"Failed size test for capacity ctor\");\n    REQUIRE_MESSAGE(cpq2.empty(), \"Failed empty test for capacity ctor\");\n\n    // Test compare ctor\n    cpq_with_compare_type cpq3(l);\n    REQUIRE_MESSAGE(cpq3.size() == 0, \"Failed size test for compare ctor\");\n    REQUIRE_MESSAGE(cpq3.empty(), \"Failed empty test for compare ctor\");\n\n    // Test compare+allocator ctor\n    cpq_with_compare_and_allocator_type cpq4(l, a);\n    REQUIRE_MESSAGE(cpq4.size() == 0, \"Failed size test for compare+allocator ctor\");\n    REQUIRE_MESSAGE(cpq4.empty(), \"Failed empty test for compare+allocator ctor\");\n\n    // Test capacity+compare ctor\n    cpq_with_compare_type cpq5(42, l);\n    REQUIRE_MESSAGE(cpq5.size() == 0, \"Failed size test for capacity+compare ctor\");\n    REQUIRE_MESSAGE(cpq5.empty(), \"Failed empty test for capacity+compare ctor\");\n\n    // Test capacity+compare+allocator ctor\n    cpq_with_compare_and_allocator_type cpq6(42, l, a);\n    REQUIRE_MESSAGE(cpq6.size() == 0, \"Failed size test for capacity+compare+allocator ctor\");\n    REQUIRE_MESSAGE(cpq6.empty(), \"Failed empty test for capacity+compare+allocator ctor\");\n\n    // Test half-open range ctor\n    for (int i = 0; i < 42; ++i) {\n        v.emplace_back(i);\n    }\n    using equality_comparison_helpers::toVector;\n    cpq_type cpq7(v.begin(), v.end());\n    REQUIRE_MESSAGE(cpq7.size() == 42, \"Failed size test for half-open range ctor\");\n    REQUIRE_MESSAGE(!cpq7.empty(), \"Failed empty test for half-open range test\");\n    REQUIRE_MESSAGE(v == toVector(cpq7), \"Failed equality test for half-open range ctor\");\n\n    // Test half-open range + compare ctor\n    cpq_with_compare_type cpq8(v.begin(), v.end(), l);\n    REQUIRE_MESSAGE(cpq8.size() == 42, \"Failed size test for half-open range+compare ctor\");\n    REQUIRE_MESSAGE(!cpq8.empty(), \"Failed empty test for half-open range+compare ctor\");\n    REQUIRE_MESSAGE(v == toVector(cpq8), \"Failed equality test for half-open range+compare ctor\");\n\n    // Test copy ctor\n    cpq_type cpq9(cpq7);\n    REQUIRE_MESSAGE(cpq9.size() == cpq7.size(), \"Failed size test for copy ctor\");\n    REQUIRE_MESSAGE(!cpq9.empty(), \"Failed empty test for copy ctor\");\n    REQUIRE_MESSAGE(cpq9 == cpq7, \"Failed equality test for copy ctor\");\n}\n\nvoid test_assignment_clear_swap() {\n    using equality_comparison_helpers::toVector;\n    using cpq_type = oneapi::tbb::concurrent_priority_queue<int, std::less<int>>;\n    std::vector<int> v;\n    int e;\n\n    for( int i = 0; i < 42; ++i )\n        v.emplace_back(i);\n\n    cpq_type q(v.begin(), v.end());\n    cpq_type qo;\n\n    // Test assignment\n    qo = q;\n    REQUIRE_MESSAGE(qo.size() == 42, \"Failed assignment size test\");\n    REQUIRE_MESSAGE(!qo.empty(), \"Failed assignment empty test\");\n    REQUIRE_MESSAGE(v == toVector(qo), \"Failed assignment equality test\");\n    REQUIRE_MESSAGE(qo == q, \"Failed assignment equality test\");\n    REQUIRE_MESSAGE(!(qo != q), \"Failed assignment inequality test\");\n\n    cpq_type assigned_q;\n    // Testing assign member function\n    assigned_q.assign(v.begin(), v.end());\n    REQUIRE_MESSAGE(assigned_q.size() == 42, \"Failed assign size test\");\n    REQUIRE_MESSAGE(!assigned_q.empty(), \"Failed assign empty test\");\n    REQUIRE_MESSAGE(v == toVector(assigned_q), \"Failed assign equality test\");\n\n    // Testing clear()\n    q.clear();\n    REQUIRE_MESSAGE(q.size() == 0, \"Failed clear size test\");\n    REQUIRE_MESSAGE(q.empty(), \"Failed clear empty test\");\n\n    // Test assignment again\n    for (std::size_t i = 0; i < 5; ++i)\n        qo.try_pop(e);\n\n    q = qo;\n    REQUIRE_MESSAGE(q.size() == 37, \"Failed assignment size test\");\n    REQUIRE_MESSAGE(!q.empty(), \"Failed assignment empty test\");\n\n    for (std::size_t i = 0; i < 5; ++i)\n        qo.try_pop(e);\n\n    q.swap(qo);\n\n    REQUIRE_MESSAGE(q.size() == 32, \"Failed swap size test\");\n    REQUIRE_MESSAGE(!q.empty(), \"Failed swap empty test\");\n    REQUIRE_MESSAGE(qo.size() == 37, \"Failed swap size test\");\n    REQUIRE_MESSAGE(!qo.empty(), \"Failed swap empty test\");\n}\n\nvoid test_serial_push_pop() {\n    oneapi::tbb::concurrent_priority_queue<int, std::less<int>> q(MAX_ITER);\n    int e = 42;\n    int prev = INT_MAX;\n    std::size_t count = 0;\n\n    // Test serial push\n    for (std::size_t i = 0; i < MAX_ITER; ++i) {\n        push_selector(q, e, i);\n        e = e*-1 + int(i);\n    }\n\n    REQUIRE_MESSAGE(q.size() == MAX_ITER, \"Failed push size test\");\n    REQUIRE_MESSAGE(!q.empty(), \"Failed push empty test\");\n\n    // Test serial pop\n    while(!q.empty()) {\n        REQUIRE_MESSAGE(q.try_pop(e), \"Failed pop test\");\n        REQUIRE_MESSAGE(prev >= e, \"Failed pop priority test\");\n        prev = e;\n        ++count;\n\n        REQUIRE_MESSAGE(q.size() == MAX_ITER - count, \"Failed pop size test\");\n        REQUIRE_MESSAGE((!q.empty() || count == MAX_ITER), \"Failed pop empty test\");\n    }\n    REQUIRE_MESSAGE(!q.try_pop(e), \"Failed: successful pop from the empty queue\");\n}\n\nvoid test_concurrent(std::size_t n) {\n    test_parallel_push_pop<std::less<int>>(n, INT_MAX, INT_MIN);\n    test_parallel_push_pop<std::less<int>>(n, (unsigned char)CHAR_MAX, (unsigned char)CHAR_MIN);\n\n    test_flogger<std::less<int>, int>(n);\n    test_flogger<std::less<int>, unsigned char>(n);\n\n    MoveOperationTrackerConc::copy_assign_called_times = 0;\n    test_flogger<std::less<MoveOperationTrackerConc>, MoveOperationTrackerConc>(n);\n    REQUIRE_MESSAGE(MoveOperationTrackerConc::copy_assign_called_times == 0, \"Copy assignment called during try_pop\");\n}\n\nvoid test_multithreading() {\n    for (std::size_t n = utils::MinThread; n != utils::MaxThread; ++n) {\n        test_concurrent(n);\n    }\n}\n\nstruct CPQTraits {\n    template <typename T>\n    using container_value_type = T;\n\n    template <typename T, typename Allocator>\n    using container_type = oneapi::tbb::concurrent_priority_queue<T, std::less<T>, Allocator>;\n}; // struct CPQTraits\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\ntemplate <template <typename...>typename TQueue>\nvoid TestDeductionGuides() {\n    using ComplexType = const std::string*;\n    std::string s(\"s\");\n    std::vector<ComplexType> v;\n    auto l = {ComplexType(&s), ComplexType(&s) };\n\n    // check TQueue(InputIterator, InputIterator)\n    TQueue qv(v.begin(), v.end());\n    static_assert(std::is_same<decltype(qv), TQueue<ComplexType> >::value);\n\n    // check TQueue(InputIterator, InputIterator, Allocator)\n    TQueue qva(v.begin(), v.end(), std::allocator<ComplexType>());\n    static_assert(std::is_same<decltype(qva), TQueue<ComplexType, std::less<ComplexType>,\n        std::allocator<ComplexType>>>::value);\n\n    // check TQueue(InputIterator, InputIterator, Compare)\n    TQueue qvc(v.begin(), v.end(), LessA<ComplexType>(true));\n    static_assert(std::is_same<decltype(qvc), TQueue<ComplexType, LessA<ComplexType>>>::value);\n\n    // check TQueue(InputIterator, InputIterator, Compare, Allocator)\n    TQueue qvca(v.begin(), v.end(), LessA<ComplexType>(true), std::allocator<ComplexType>());\n    static_assert(std::is_same<decltype(qvca), TQueue<ComplexType, LessA<ComplexType>,\n        std::allocator<ComplexType>>>::value);\n\n    // check TQueue(std::initializer_list)\n    TQueue ql(l);\n    static_assert(std::is_same<decltype(ql), TQueue<ComplexType>>::value);\n\n    // check TQueue(std::initializer_list, Allocator)\n    TQueue qla(l, std::allocator<ComplexType>());\n    static_assert(std::is_same<decltype(qla), TQueue<ComplexType, std::less<ComplexType>,\n        std::allocator<ComplexType>>>::value);\n\n    // check TQueue(std::initializer_list, Compare)\n    TQueue qlc(l, LessA<ComplexType>(true));\n    static_assert(std::is_same<decltype(qlc), TQueue<ComplexType, LessA<ComplexType>>>::value);\n\n    // check TQueue(std::initializer_list, Compare, Allocator)\n    TQueue qlca(l, LessA<ComplexType>(true), std::allocator<ComplexType>());\n    static_assert(std::is_same<decltype(qlca), TQueue<ComplexType, LessA<ComplexType>,\n        std::allocator<ComplexType>>>::value);\n\n    // check TQueue(TQueue &)\n    TQueue qc(qv);\n    static_assert(std::is_same<decltype(qv), decltype(qv)>::value);\n\n    // check TQueue(TQueue &, Allocator)\n    TQueue qca(qva, std::allocator<ComplexType>());\n    static_assert(std::is_same<decltype(qca), decltype(qva)>::value);\n\n    // check TQueue(TQueue &&)\n    TQueue qm(std::move(qv));\n    static_assert(std::is_same<decltype(qm), decltype(qv)>::value);\n\n    // check TQueue(TQueue &&, Allocator)\n    TQueue qma(std::move(qva), std::allocator<ComplexType>());\n    static_assert(std::is_same<decltype(qma), decltype(qva)>::value);\n}\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate <typename CPQType>\nvoid TestComparisonsBasic() {\n    using comparisons_testing::testEqualityComparisons;\n    CPQType c1, c2;\n    testEqualityComparisons</*ExpectEqual = */true>(c1, c2);\n\n    c1.emplace(1);\n    testEqualityComparisons</*ExpectEqual = */false>(c1, c2);\n\n    c2.emplace(1);\n    testEqualityComparisons</*ExpectEqual = */true>(c1, c2);\n}\n\ntemplate <typename TwoWayComparableCPQType>\nvoid TestTwoWayComparableCPQ() {\n    TwoWayComparableCPQType c1, c2;\n    c1.emplace(1);\n    c2.emplace(1);\n    comparisons_testing::TwoWayComparable::reset();\n    REQUIRE_MESSAGE(c1 == c2, \"Incorrect operator == result\");\n    comparisons_testing::check_equality_comparison();\n    REQUIRE_MESSAGE(!(c1 != c2), \"Incorrect operator != result\");\n    comparisons_testing::check_equality_comparison();\n}\n\nvoid TestCPQComparisons() {\n    using integral_container = oneapi::tbb::concurrent_priority_queue<int>;\n    using two_way_comparable_container = oneapi::tbb::concurrent_priority_queue<comparisons_testing::TwoWayComparable>;\n\n    TestComparisonsBasic<integral_container>();\n    TestComparisonsBasic<two_way_comparable_container>();\n    TestTwoWayComparableCPQ<two_way_comparable_container>();\n}\n\n// Testing basic operations with concurrent_priority_queue with integral value type\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"basic test for concurrent_priority_queue\") {\n    test_to_vector(); // Test concurrent_priority_queue helper\n    test_basic();\n}\n\n// Testing std::initializer_list interfaces in concurrent_priority_queue\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"std::initializer_list support in concurrent_priority_queue\") {\n    test_initializer_list();\n}\n\n//! Testing concurrent_priority_queue moving constructors\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_priority_queue move constructor\") {\n    test_cpq_move_constructor();\n}\n\n//! Testing concurrent_priority_queue move assignment operator with different allocator types\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_priority_queue move assignment operator\") {\n    test_cpq_move_assignment();\n}\n\n//! Testing move semantics on basic push-pop operations\n//! \\brief \\ref requirement\nTEST_CASE(\"move semantics support on push-pop operations\") {\n    test_move_support_in_push_pop();\n}\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"constructors, destructor and accessors\") {\n    test_ctors_dtor_accessors();\n}\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"assignment, clear and swap operations\") {\n    test_assignment_clear_swap();\n}\n\n//! Testing push-pop operations in concurrent_priority_queue\n//! \\brief \\ref requirement\nTEST_CASE(\"serial push-pop\") {\n    test_serial_push_pop();\n}\n\n//! Testing push-pop operations in concurrent_priority_queue with multithreading\n//! \\brief \\ref requirement\nTEST_CASE(\"multithreading support in concurrent_priority_queue\") {\n    test_multithreading();\n}\n\n#if !_MSC_VER || _MSC_VER > 1900\n// MSVC 2015 does not provide required level of allocator support for standard containers\n\n//! \\brief \\ref requirement\nTEST_CASE(\"std::allocator_traits support in concurrent_priority_queue\") {\n    test_allocator_traits_support<CPQTraits>();\n}\n#endif\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Testing Class Template Argument Deduction in concurrent_priority_queue\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"CTAD support in concurrent_priority_queue\") {\n    TestDeductionGuides<oneapi::tbb::concurrent_priority_queue>();\n}\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_priority_queue iterator comparisons\") {\n    TestCPQComparisons();\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_concurrent_queue.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <common/test.h>\n#include <common/utils.h>\n#include <common/utils_report.h>\n#include <common/custom_allocators.h>\n#include <common/container_move_support.h>\n#include <common/test_comparisons.h>\n\n#include \"oneapi/tbb/concurrent_queue.h\"\n#include \"oneapi/tbb/cache_aligned_allocator.h\"\n#include <type_traits>\n#include <atomic>\n\n//! \\file conformance_concurrent_queue.cpp\n//! \\brief Test for [containers.concurrent_queue containers.concurrent_bounded_queue] specification\n\ntemplate <typename T>\nusing test_allocator = StaticSharedCountingAllocator<oneapi::tbb::cache_aligned_allocator<T>>;\n\nstatic constexpr std::size_t MinThread = 1;\nstatic constexpr std::size_t MaxThread = 4;\n\nstatic constexpr std::size_t MAXTHREAD = 256;\n\nstatic constexpr std::size_t M = 10000;\nstatic std::atomic<long> PopKind[3];\n\nstatic int Sum[MAXTHREAD];\n\ntemplate<typename CQ, typename ValueType, typename CounterType>\nvoid push(CQ& q, ValueType v, CounterType i) {\n    switch (i % 3) {\n        case 0: q.push( v); break;\n        case 1: q.push( std::move(v)); break;\n        case 2: q.emplace( v); break;\n        default: CHECK(false); break;\n    }\n}\n\ntemplate<typename T>\nclass ConcQWithCapacity : public oneapi::tbb::concurrent_queue<T, test_allocator<T>> {\n    using base_type = oneapi::tbb::concurrent_queue<T, test_allocator<T>>;\npublic:\n    ConcQWithCapacity() : my_capacity( std::size_t(-1) / (sizeof(void*) + sizeof(T)) ) {}\n    std::size_t size() const {\n        return this->unsafe_size();\n    }\n\n    std::size_t capacity() const {\n        return my_capacity;\n    }\n\n    void set_capacity( const std::size_t n ) {\n        my_capacity = n;\n    }\n\n    bool try_push( const T& source ) {\n        base_type::push( source);\n        return source.get_serial() < my_capacity;\n    }\n\n    bool try_pop( T& dest ) {\n        base_type::try_pop( dest);\n        return dest.get_serial() < my_capacity;\n    }\n\nprivate:\n    std::size_t my_capacity;\n};\n\ntemplate<typename CQ, typename T>\nvoid TestEmptyQueue() {\n    const CQ queue;\n    CHECK(queue.size() == 0);\n    CHECK(queue.capacity()> 0);\n    CHECK(size_t(queue.capacity())>= std::size_t(-1)/(sizeof(void*)+sizeof(T)));\n}\n\nvoid TestEmptiness() {\n    TestEmptyQueue<ConcQWithCapacity<char>, char>();\n    TestEmptyQueue<ConcQWithCapacity<move_support_tests::Foo>, move_support_tests::Foo>();\n    TestEmptyQueue<oneapi::tbb::concurrent_bounded_queue<char, test_allocator<char>>, char>();\n    TestEmptyQueue<oneapi::tbb::concurrent_bounded_queue<move_support_tests::Foo,\n           test_allocator<move_support_tests::Foo>>, move_support_tests::Foo>();\n}\n\ntemplate<typename CQ, typename T>\nvoid TestFullQueue() {\n    using allocator_type = decltype(std::declval<CQ>().get_allocator());\n\n    for (std::size_t n = 0; n < 100; ++n) {\n        allocator_type::init_counters();\n        {\n            CQ queue;\n            queue.set_capacity(n);\n            for (std::size_t i = 0; i <= n; ++i) {\n                T f;\n                f.set_serial(i);\n                bool result = queue.try_push( f);\n                CHECK((result == (i < n)));\n            }\n\n            for (std::size_t i = 0; i <= n; ++i) {\n                T f;\n                bool result = queue.try_pop(f);\n                CHECK((result == (i < n)));\n                CHECK((result == 0 || f.get_serial() == i));\n            }\n        }\n        CHECK(allocator_type::items_allocated == allocator_type::items_freed);\n        CHECK(allocator_type::allocations == allocator_type::frees);\n    }\n}\n\nvoid TestFullness() {\n    TestFullQueue<ConcQWithCapacity<move_support_tests::Foo>, move_support_tests::Foo>();\n    TestFullQueue<oneapi::tbb::concurrent_bounded_queue<move_support_tests::Foo, test_allocator<move_support_tests::Foo>>, move_support_tests::Foo>();\n}\n\ntemplate<typename CQ>\nvoid TestClear() {\n    using allocator_type = decltype(std::declval<CQ>().get_allocator());\n    allocator_type::init_counters();\n    const std::size_t n = 5;\n\n    CQ queue;\n    const std::size_t q_capacity = 10;\n    queue.set_capacity(q_capacity);\n\n    for (std::size_t i = 0; i < n; ++i) {\n        move_support_tests::Foo f;\n        f.set_serial(i);\n        queue.push(f);\n    }\n\n    CHECK(queue.size() == n);\n\n    queue.clear();\n    CHECK(queue.size()==0);\n    for (std::size_t i = 0; i < n; ++i) {\n        move_support_tests::Foo f;\n        f.set_serial(i);\n        queue.push( f);\n    }\n\n    CHECK(queue.size() == n);\n    queue.clear();\n    CHECK(queue.size() == 0);\n\n    for (std::size_t i = 0; i < n; ++i) {\n        move_support_tests::Foo f;\n        f.set_serial(i);\n        queue.push(f);\n    }\n\n    CHECK(queue.size()==n);\n}\n\nvoid TestClearWorks() {\n    TestClear<ConcQWithCapacity<move_support_tests::Foo>>();\n    TestClear<oneapi::tbb::concurrent_bounded_queue<move_support_tests::Foo, test_allocator<move_support_tests::Foo>>>();\n}\n\ntemplate<typename Iterator1, typename Iterator2>\nvoid TestIteratorAux( Iterator1 i, Iterator2 j, int size ) {\n    Iterator1 old_i; // assigned at first iteration below\n    for (std::size_t k = 0; k < (std::size_t)size; ++k) {\n        CHECK_FAST(i != j);\n        CHECK_FAST(!(i == j));\n        // Test \"->\"\n        CHECK_FAST((k+1 == i->get_serial()));\n        if (k & 1) {\n            // Test post-increment\n            move_support_tests::Foo f = *old_i++;\n            CHECK_FAST((k + 1 == f.get_serial()));\n            // Test assignment\n            i = old_i;\n        } else {\n            // Test pre-increment\n            if (k < std::size_t(size - 1)) {\n                move_support_tests::Foo f = *++i;\n                CHECK_FAST((k + 2 == f.get_serial()));\n            } else ++i;\n            // Test assignment\n            old_i = i;\n        }\n    }\n    CHECK_FAST(!(i != j));\n    CHECK_FAST(i == j);\n}\n\ntemplate<typename Iterator1, typename Iterator2>\nvoid TestIteratorAssignment( Iterator2 j ) {\n    Iterator1 i(j);\n    CHECK(i == j);\n    CHECK(!(i != j));\n\n    Iterator1 k;\n    k = j;\n    CHECK(k == j);\n    CHECK(!(k != j));\n}\n\ntemplate<typename Iterator, typename T>\nvoid TestIteratorTraits() {\n    static_assert( std::is_same<typename Iterator::iterator_category, std::forward_iterator_tag>::value, \"wrong iterator category\");\n\n    T x;\n\n    typename Iterator::reference xr = x;\n    typename Iterator::pointer xp = &x;\n    CHECK((&xr == xp));\n}\n\n// Test the iterators for concurrent_queue\ntemplate <typename CQ>\nvoid TestIterator() {\n    CQ queue;\n    const CQ& const_queue = queue;\n    for (int j=0; j < 500; ++j) {\n        TestIteratorAux( queue.unsafe_begin()      , queue.unsafe_end()      , j);\n        TestIteratorAux( queue.unsafe_cbegin()      , queue.unsafe_cend()      , j);\n        TestIteratorAux( const_queue.unsafe_begin(), const_queue.unsafe_end(), j);\n        TestIteratorAux( const_queue.unsafe_begin(), queue.unsafe_end()      , j);\n        TestIteratorAux( queue.unsafe_begin()      , const_queue.unsafe_end(), j);\n        move_support_tests::Foo f;\n        f.set_serial(j+1);\n        queue.push(f);\n    }\n    TestIteratorAssignment<typename CQ::const_iterator>( const_queue.unsafe_begin());\n    TestIteratorAssignment<typename CQ::const_iterator>( queue.unsafe_begin());\n    TestIteratorAssignment<typename CQ::iterator>( queue.unsafe_begin());\n    TestIteratorTraits<typename CQ::const_iterator, const move_support_tests::Foo>();\n    TestIteratorTraits<typename CQ::iterator, move_support_tests::Foo>();\n}\n\nvoid TestQueueIteratorWorks() {\n    TestIterator<oneapi::tbb::concurrent_queue<move_support_tests::Foo, test_allocator<move_support_tests::Foo>>>();\n    TestIterator<oneapi::tbb::concurrent_bounded_queue<move_support_tests::Foo, test_allocator<move_support_tests::Foo>>>();\n}\n\n// Define wrapper classes to test oneapi::tbb::concurrent_queue<T>\ntemplate<typename T, typename A = oneapi::tbb::cache_aligned_allocator<T>>\nclass ConcQWithSizeWrapper : public oneapi::tbb::concurrent_queue<T, A> {\npublic:\n    ConcQWithSizeWrapper() {}\n    ConcQWithSizeWrapper( const ConcQWithSizeWrapper& q ) : oneapi::tbb::concurrent_queue<T, A>(q) {}\n    ConcQWithSizeWrapper( const ConcQWithSizeWrapper& q, const A& a ) : oneapi::tbb::concurrent_queue<T, A>(q, a) {}\n    ConcQWithSizeWrapper( const A& a ) : oneapi::tbb::concurrent_queue<T, A>( a ) {}\n\n    ConcQWithSizeWrapper( ConcQWithSizeWrapper&& q ) : oneapi::tbb::concurrent_queue<T>(std::move(q)) {}\n    ConcQWithSizeWrapper( ConcQWithSizeWrapper&& q, const A& a )\n        : oneapi::tbb::concurrent_queue<T, A>(std::move(q), a) { }\n\n    template<typename InputIterator>\n    ConcQWithSizeWrapper( InputIterator begin, InputIterator end, const A& a = A() )\n        : oneapi::tbb::concurrent_queue<T, A>(begin, end, a) {}\n    typename oneapi::tbb::concurrent_queue<T, A>::size_type size() const { return this->unsafe_size(); }\n};\n\nenum state_type {\n    LIVE = 0x1234,\n    DEAD = 0xDEAD\n};\n\nclass Bar {\n    state_type state;\npublic:\n    static std::size_t construction_num, destruction_num;\n    std::ptrdiff_t my_id;\n    Bar() : state(LIVE), my_id(-1)\n    {}\n\n    Bar( std::size_t _i ) : state(LIVE), my_id(_i) { construction_num++; }\n\n    Bar( const Bar& a_bar ) : state(LIVE) {\n        CHECK_FAST(a_bar.state == LIVE);\n        my_id = a_bar.my_id;\n        construction_num++;\n    }\n\n    ~Bar() {\n        CHECK_FAST(state == LIVE);\n        state = DEAD;\n        my_id = DEAD;\n        destruction_num++;\n    }\n\n    void operator=( const Bar& a_bar ) {\n        CHECK_FAST(a_bar.state == LIVE);\n        CHECK_FAST(state == LIVE);\n        my_id = a_bar.my_id;\n    }\n    friend bool operator==( const Bar& bar1, const Bar& bar2 ) ;\n};\n\nstd::size_t Bar::construction_num = 0;\nstd::size_t Bar::destruction_num = 0;\n\nbool operator==( const Bar& bar1, const Bar& bar2 ) {\n    CHECK_FAST(bar1.state == LIVE);\n    CHECK_FAST(bar2.state == LIVE);\n    return bar1.my_id == bar2.my_id;\n}\n\nclass BarIterator {\n    Bar* bar_ptr;\n    BarIterator(Bar* bp_) : bar_ptr(bp_) {}\npublic:\n    Bar& operator*() const {\n        return *bar_ptr;\n    }\n    BarIterator& operator++() {\n        ++bar_ptr;\n        return *this;\n    }\n    Bar* operator++(int) {\n        Bar* result = &operator*();\n        operator++();\n        return result;\n    }\n    friend bool operator==(const BarIterator& bia, const BarIterator& bib) ;\n    friend bool operator!=(const BarIterator& bia, const BarIterator& bib) ;\n    template<typename CQ, typename T, typename TIter, typename CQ_EX, typename T_EX>\n    friend void TestConstructors ();\n} ;\n\nbool operator==(const BarIterator& bia, const BarIterator& bib) {\n    return bia.bar_ptr==bib.bar_ptr;\n}\n\nbool operator!=(const BarIterator& bia, const BarIterator& bib) {\n    return bia.bar_ptr!=bib.bar_ptr;\n}\n\n\nclass Bar_exception : public std::bad_alloc {\npublic:\n    virtual const char *what() const noexcept override { return \"making the entry invalid\"; }\n    virtual ~Bar_exception() noexcept {}\n};\n\nclass BarEx {\n    static int count;\npublic:\n    state_type state;\n    typedef enum {\n        PREPARATION,\n        COPY_CONSTRUCT\n    } mode_type;\n    static mode_type mode;\n    std::ptrdiff_t my_id;\n    std::ptrdiff_t my_tilda_id;\n\n    static int button;\n\n    BarEx() : state(LIVE), my_id(-1), my_tilda_id(-1)\n    {}\n\n    BarEx(std::size_t _i) : state(LIVE), my_id(_i), my_tilda_id(my_id^(-1))\n    {}\n\n    BarEx( const BarEx& a_bar ) : state(LIVE) {\n        CHECK_FAST(a_bar.state == LIVE);\n        my_id = a_bar.my_id;\n        if (mode == PREPARATION)\n            if (!(++count % 100)) {\n                TBB_TEST_THROW(Bar_exception());\n            }\n        my_tilda_id = a_bar.my_tilda_id;\n    }\n\n    ~BarEx() {\n        CHECK_FAST(state == LIVE);\n        state = DEAD;\n        my_id = DEAD;\n    }\n    static void set_mode( mode_type m ) { mode = m; }\n\n    void operator=( const BarEx& a_bar ) {\n        CHECK_FAST(a_bar.state == LIVE);\n        CHECK_FAST(state == LIVE);\n        my_id = a_bar.my_id;\n        my_tilda_id = a_bar.my_tilda_id;\n    }\n\n    friend bool operator==(const BarEx& bar1, const BarEx& bar2 ) ;\n};\n\nint BarEx::count = 0;\nBarEx::mode_type BarEx::mode = BarEx::PREPARATION;\n\nbool operator==(const BarEx& bar1, const BarEx& bar2) {\n    CHECK_FAST(bar1.state == LIVE);\n    CHECK_FAST(bar2.state == LIVE);\n    CHECK_FAST((bar1.my_id ^ bar1.my_tilda_id) == -1);\n    CHECK_FAST((bar2.my_id ^ bar2.my_tilda_id) == -1);\n    return bar1.my_id == bar2.my_id && bar1.my_tilda_id == bar2.my_tilda_id;\n}\n\ntemplate<typename CQ, typename T, typename TIter, typename CQ_EX, typename T_EX>\nvoid TestConstructors () {\n    CQ src_queue;\n    typename CQ::const_iterator dqb;\n    typename CQ::const_iterator dqe;\n    typename CQ::const_iterator iter;\n    using size_type = typename CQ::size_type;\n\n    for (size_type size = 0; size < 1001; ++size) {\n        for (size_type i = 0; i < size; ++i)\n            src_queue.push(T(i + (i ^ size)));\n        typename CQ::const_iterator sqb( src_queue.unsafe_begin());\n        typename CQ::const_iterator sqe( src_queue.unsafe_end()  );\n\n        CQ dst_queue(sqb, sqe);\n        CQ copy_with_alloc(src_queue, typename CQ::allocator_type());\n\n        CHECK_FAST_MESSAGE(src_queue.size() == dst_queue.size(), \"different size\");\n        CHECK_FAST_MESSAGE(src_queue.size() == copy_with_alloc.size(), \"different size\");\n\n        src_queue.clear();\n    }\n\n    T bar_array[1001];\n    for (size_type size=0; size < 1001; ++size) {\n        for (size_type i=0; i < size; ++i) {\n            bar_array[i] = T(i+(i^size));\n        }\n\n        const TIter sab(bar_array + 0);\n        const TIter sae(bar_array + size);\n\n        CQ dst_queue2(sab, sae);\n\n        CHECK_FAST(size == dst_queue2.size());\n        CHECK_FAST(sab == TIter(bar_array+0));\n        CHECK_FAST(sae == TIter(bar_array+size));\n\n        dqb = dst_queue2.unsafe_begin();\n        dqe = dst_queue2.unsafe_end();\n        auto res = std::mismatch(dqb, dqe, bar_array);\n        CHECK_FAST_MESSAGE(res.first == dqe,  \"unexpected element\");\n        CHECK_FAST_MESSAGE(res.second == bar_array + size, \"different size?\");\n    }\n\n    src_queue.clear();\n\n    CQ dst_queue3(src_queue);\n    CHECK(src_queue.size() == dst_queue3.size());\n    CHECK(0 == dst_queue3.size());\n\n    int k = 0;\n    for (size_type i = 0; i < 1001; ++i) {\n        T tmp_bar;\n        src_queue.push(T(++k));\n        src_queue.push(T(++k));\n        src_queue.try_pop(tmp_bar);\n\n        CQ dst_queue4( src_queue);\n\n        CHECK_FAST(src_queue.size() == dst_queue4.size());\n\n        dqb = dst_queue4.unsafe_begin();\n        dqe = dst_queue4.unsafe_end();\n        iter = src_queue.unsafe_begin();\n        auto res = std::mismatch(dqb, dqe, iter);\n        CHECK_FAST_MESSAGE(res.first == dqe, \"unexpected element\");\n        CHECK_FAST_MESSAGE(res.second == src_queue.unsafe_end(), \"different size?\");\n    }\n\n    CQ dst_queue5(src_queue);\n\n    CHECK(src_queue.size() == dst_queue5.size());\n    dqb = dst_queue5.unsafe_begin();\n    dqe = dst_queue5.unsafe_end();\n    iter = src_queue.unsafe_begin();\n    REQUIRE_MESSAGE(std::equal(dqb, dqe, iter), \"unexpected element\");\n\n    for (size_type i=0; i<100; ++i) {\n        T tmp_bar;\n        src_queue.push(T(i + 1000));\n        src_queue.push(T(i + 1000));\n        src_queue.try_pop(tmp_bar);\n\n        dst_queue5.push(T(i + 1000));\n        dst_queue5.push(T(i + 1000));\n        dst_queue5.try_pop(tmp_bar);\n    }\n\n    CHECK(src_queue.size() == dst_queue5.size());\n    dqb = dst_queue5.unsafe_begin();\n    dqe = dst_queue5.unsafe_end();\n    iter = src_queue.unsafe_begin();\n    auto res = std::mismatch(dqb, dqe, iter);\n    REQUIRE_MESSAGE(res.first == dqe, \"unexpected element\");\n    REQUIRE_MESSAGE(res.second == src_queue.unsafe_end(), \"different size?\");\n\n#if TBB_USE_EXCEPTIONS\n    k = 0;\n    typename CQ_EX::size_type n_elements = 0;\n    CQ_EX src_queue_ex;\n    for (size_type size = 0; size < 1001; ++size) {\n        T_EX tmp_bar_ex;\n        typename CQ_EX::size_type n_successful_pushes = 0;\n        T_EX::set_mode(T_EX::PREPARATION);\n        try {\n            src_queue_ex.push(T_EX(k + (k ^ size)));\n            ++n_successful_pushes;\n        } catch (...) {\n        }\n        ++k;\n        try {\n            src_queue_ex.push(T_EX(k + (k ^ size)));\n            ++n_successful_pushes;\n        } catch (...) {\n        }\n        ++k;\n        src_queue_ex.try_pop(tmp_bar_ex);\n        n_elements += (n_successful_pushes - 1);\n        CHECK_FAST(src_queue_ex.size() == n_elements);\n\n        T_EX::set_mode(T_EX::COPY_CONSTRUCT);\n        CQ_EX dst_queue_ex(src_queue_ex);\n\n        CHECK_FAST(src_queue_ex.size() == dst_queue_ex.size());\n\n        typename CQ_EX::const_iterator dqb_ex = dst_queue_ex.unsafe_begin();\n        typename CQ_EX::const_iterator dqe_ex = dst_queue_ex.unsafe_end();\n        typename CQ_EX::const_iterator iter_ex = src_queue_ex.unsafe_begin();\n\n        auto res2 = std::mismatch(dqb_ex, dqe_ex, iter_ex);\n        CHECK_FAST_MESSAGE(res2.first == dqe_ex, \"unexpected element\");\n        CHECK_FAST_MESSAGE(res2.second == src_queue_ex.unsafe_end(), \"different size?\");\n    }\n#endif\n    src_queue.clear();\n\n    for (size_type size = 0; size < 1001; ++size) {\n        for (size_type i = 0; i < size; ++i) {\n            src_queue.push(T(i + (i ^ size)));\n        }\n        std::vector<const T*> locations(size);\n        typename CQ::const_iterator qit = src_queue.unsafe_begin();\n        for (size_type i = 0; i < size; ++i, ++qit) {\n            locations[i] = &(*qit);\n        }\n\n        size_type size_of_queue = src_queue.size();\n        CQ dst_queue(std::move(src_queue));\n\n        CHECK_FAST_MESSAGE((src_queue.empty() && src_queue.size() == 0), \"not working move constructor?\");\n        CHECK_FAST_MESSAGE((size == size_of_queue && size_of_queue == dst_queue.size()), \"not working move constructor?\");\n\n        CHECK_FAST_MESSAGE(\n            std::equal(locations.begin(), locations.end(), dst_queue.unsafe_begin(), [](const T* t1, const T& r2) { return t1 == &r2; }),\n            \"there was data movement during move constructor\"\n        );\n\n        for (size_type i = 0; i < size; ++i) {\n            T test(i + (i ^ size));\n            T popped;\n            bool pop_result = dst_queue.try_pop( popped);\n\n            CHECK_FAST(pop_result);\n            CHECK_FAST(test == popped);\n        }\n    }\n}\n\nvoid TestQueueConstructors() {\n    TestConstructors<ConcQWithSizeWrapper<Bar>, Bar, BarIterator, ConcQWithSizeWrapper<BarEx>, BarEx>();\n    TestConstructors<oneapi::tbb::concurrent_bounded_queue<Bar>, Bar, BarIterator, oneapi::tbb::concurrent_bounded_queue<BarEx>, BarEx>();\n}\n\ntemplate<typename T>\nstruct TestNegativeQueueBody {\n    oneapi::tbb::concurrent_bounded_queue<T>& queue;\n    const std::size_t nthread;\n    TestNegativeQueueBody( oneapi::tbb::concurrent_bounded_queue<T>& q, std::size_t n ) : queue(q), nthread(n) {}\n    void operator()( std::size_t k ) const {\n        if (k == 0) {\n            int number_of_pops = int(nthread) - 1;\n            // Wait for all pops to pend.\n            while (int(queue.size())> -number_of_pops) {\n                utils::yield();\n            }\n\n            for (int i = 0; ; ++i) {\n                CHECK(queue.size() == std::size_t(i - number_of_pops));\n                CHECK((queue.empty() == (queue.size() <= 0)));\n                if (i == number_of_pops) break;\n                // Satisfy another pop\n                queue.push(T());\n            }\n        } else {\n            // Pop item from queue\n            T item;\n            queue.pop(item);\n        }\n    }\n};\n\n//! Test a queue with a negative size.\ntemplate<typename T>\nvoid TestNegativeQueue( std::size_t nthread ) {\n    oneapi::tbb::concurrent_bounded_queue<T> queue;\n    utils::NativeParallelFor( nthread, TestNegativeQueueBody<T>(queue,nthread));\n}\n\ntemplate<typename T>\nclass ConcQPushPopWrapper : public oneapi::tbb::concurrent_queue<T, test_allocator<T>> {\npublic:\n    ConcQPushPopWrapper() : my_capacity(std::size_t(-1) / (sizeof(void*) + sizeof(T)))\n    {}\n\n    std::size_t size() const { return this->unsafe_size(); }\n    void set_capacity( const ptrdiff_t n ) { my_capacity = n; }\n    bool try_push( const T& source ) { return this->push( source); }\n    bool try_pop( T& dest ) { return this->oneapi::tbb::concurrent_queue<T, test_allocator<T>>::try_pop(dest); }\n    std::size_t my_capacity;\n};\n\ntemplate<typename CQ, typename T>\nstruct Body {\n    CQ* queue;\n    const std::size_t nthread;\n    Body( std::size_t nthread_ ) : nthread(nthread_) {}\n    void operator()( std::size_t thread_id ) const {\n        long pop_kind[3] = {0, 0, 0};\n        std::size_t serial[MAXTHREAD + 1];\n        memset(serial, 0, nthread * sizeof(std::size_t));\n        CHECK(thread_id < nthread);\n\n        long sum = 0;\n        for (std::size_t j = 0; j < M; ++j) {\n            T f;\n            f.set_thread_id(move_support_tests::serial_dead_state);\n            f.set_serial(move_support_tests::serial_dead_state);\n            bool prepopped = false;\n            if (j & 1) {\n                prepopped = queue->try_pop(f);\n                ++pop_kind[prepopped];\n            }\n            T g;\n            g.set_thread_id(thread_id);\n            g.set_serial(j + 1);\n            push(*queue, g, j);\n            if (!prepopped) {\n                while(!(queue)->try_pop(f)) utils::yield();\n                ++pop_kind[2];\n            }\n            CHECK_FAST(f.get_thread_id() <= nthread);\n            CHECK_FAST_MESSAGE((f.get_thread_id() == nthread || serial[f.get_thread_id()] < f.get_serial()), \"partial order violation\");\n            serial[f.get_thread_id()] = f.get_serial();\n            sum += int(f.get_serial() - 1);\n        }\n        Sum[thread_id] = sum;\n        for (std::size_t k = 0; k < 3; ++k)\n            PopKind[k] += pop_kind[k];\n    }\n};\n\ntemplate<typename CQ, typename T>\nvoid TestPushPop(typename CQ::size_type prefill, std::ptrdiff_t capacity, std::size_t nthread ) {\n    using allocator_type = decltype(std::declval<CQ>().get_allocator());\n    CHECK(nthread> 0);\n    std::ptrdiff_t signed_prefill = std::ptrdiff_t(prefill);\n\n    if (signed_prefill + 1>= capacity) {\n        return;\n    }\n\n    bool success = false;\n    for (std::size_t k=0; k < 3; ++k) {\n        PopKind[k] = 0;\n    }\n\n    for (std::size_t trial = 0; !success; ++trial) {\n        allocator_type::init_counters();\n        Body<CQ,T> body(nthread);\n        CQ queue;\n        queue.set_capacity(capacity);\n        body.queue = &queue;\n        for (typename CQ::size_type i = 0; i < prefill; ++i) {\n            T f;\n            f.set_thread_id(nthread);\n            f.set_serial(1 + i);\n            push(queue, f, i);\n            CHECK_FAST(queue.size() == i + 1);\n            CHECK_FAST(!queue.empty());\n        }\n\n        utils::NativeParallelFor( nthread, body);\n\n        int sum = 0;\n        for (std::size_t k = 0; k < nthread; ++k) {\n            sum += Sum[k];\n        }\n\n        int expected = int( nthread * ((M - 1) * M / 2) + ((prefill - 1) * prefill) / 2);\n        for (int i = int(prefill); --i>=0;) {\n            CHECK_FAST(!queue.empty());\n            T f;\n            bool result = queue.try_pop(f);\n            CHECK_FAST(result);\n            CHECK_FAST(int(queue.size()) == i);\n            sum += int(f.get_serial()) - 1;\n        }\n        REQUIRE_MESSAGE(queue.empty(), \"The queue should be empty\");\n        REQUIRE_MESSAGE(queue.size() == 0, \"The queue should have zero size\");\n        if (sum != expected) {\n            REPORT(\"sum=%d expected=%d\\n\",sum,expected);\n        }\n\n        success = true;\n        if (nthread> 1 && prefill == 0) {\n            // Check that pop_if_present got sufficient exercise\n            for (std::size_t k = 0; k < 2; ++k) {\n                const int min_requirement = 100;\n                const int max_trial = 20;\n\n                if (PopKind[k] < min_requirement) {\n                    if (trial>= max_trial) {\n                        REPORT(\"Warning: %d threads had only %ld pop_if_present operations %s after %d trials (expected at least %d). \"\n                            \"This problem may merely be unlucky scheduling. \"\n                            \"Investigate only if it happens repeatedly.\\n\",\n                            nthread, long(PopKind[k]), k==0?\"failed\":\"succeeded\", max_trial, min_requirement);\n                    } else {\n                        success = false;\n                    }\n               }\n            }\n        }\n    }\n}\n\nvoid TestConcurrentPushPop() {\n    for (std::size_t nthread = MinThread; nthread <= MaxThread; ++nthread) {\n        INFO(\" Testing with \"<< nthread << \" thread(s)\");\n        TestNegativeQueue<move_support_tests::Foo>(nthread);\n        for (std::size_t prefill=0; prefill < 64; prefill += (1 + prefill / 3)) {\n            TestPushPop<ConcQPushPopWrapper<move_support_tests::Foo>, move_support_tests::Foo>(prefill, std::ptrdiff_t(-1), nthread);\n            TestPushPop<ConcQPushPopWrapper<move_support_tests::Foo>, move_support_tests::Foo>(prefill, std::ptrdiff_t(1), nthread);\n            TestPushPop<ConcQPushPopWrapper<move_support_tests::Foo>, move_support_tests::Foo>(prefill, std::ptrdiff_t(2), nthread);\n            TestPushPop<ConcQPushPopWrapper<move_support_tests::Foo>, move_support_tests::Foo>(prefill, std::ptrdiff_t(10), nthread);\n            TestPushPop<ConcQPushPopWrapper<move_support_tests::Foo>, move_support_tests::Foo>(prefill, std::ptrdiff_t(100), nthread);\n        }\n        for (std::size_t prefill = 0; prefill < 64; prefill += (1 + prefill / 3) ) {\n            TestPushPop<oneapi::tbb::concurrent_bounded_queue<move_support_tests::Foo, test_allocator<move_support_tests::Foo>>,\n                move_support_tests::Foo>(prefill, std::ptrdiff_t(-1), nthread);\n            TestPushPop<oneapi::tbb::concurrent_bounded_queue<move_support_tests::Foo, test_allocator<move_support_tests::Foo>>,\n                move_support_tests::Foo>(prefill, std::ptrdiff_t(1), nthread);\n            TestPushPop<oneapi::tbb::concurrent_bounded_queue<move_support_tests::Foo, test_allocator<move_support_tests::Foo>>,\n                move_support_tests::Foo>(prefill, std::ptrdiff_t(2), nthread);\n            TestPushPop<oneapi::tbb::concurrent_bounded_queue<move_support_tests::Foo, test_allocator<move_support_tests::Foo>>,\n                move_support_tests::Foo>(prefill, std::ptrdiff_t(10), nthread);\n            TestPushPop<oneapi::tbb::concurrent_bounded_queue<move_support_tests::Foo, test_allocator<move_support_tests::Foo>>,\n                move_support_tests::Foo>(prefill, std::ptrdiff_t(100), nthread);\n        }\n    }\n}\n\nclass Foo_exception : public std::bad_alloc {\npublic:\n    virtual const char *what() const noexcept override { return \"out of Foo limit\"; }\n    virtual ~Foo_exception() noexcept {}\n};\n\n#if TBB_USE_EXCEPTIONS\nstatic std::atomic<long> FooExConstructed;\nstatic std::atomic<long> FooExDestroyed;\nstatic std::atomic<long> serial_source;\nstatic long MaxFooCount = 0;\nstatic const long Threshold = 400;\n\nclass FooEx {\n    state_type state;\npublic:\n    int serial;\n    FooEx() : state(LIVE) {\n        ++FooExConstructed;\n        serial = serial_source++;\n    }\n\n    FooEx( const FooEx& item ) : state(LIVE) {\n        CHECK(item.state == LIVE);\n        ++FooExConstructed;\n        if (MaxFooCount && (FooExConstructed - FooExDestroyed) >= MaxFooCount) { // in push()\n            throw Foo_exception();\n        }\n        serial = item.serial;\n    }\n\n    ~FooEx() {\n        CHECK(state==LIVE);\n        ++FooExDestroyed;\n        state=DEAD;\n        serial=DEAD;\n    }\n\n    void operator=( FooEx& item ) {\n        CHECK(item.state==LIVE);\n        CHECK(state==LIVE);\n        serial = item.serial;\n        if( MaxFooCount==2*Threshold && (FooExConstructed-FooExDestroyed) <= MaxFooCount/4 ) // in pop()\n            throw Foo_exception();\n    }\n\n    void operator=( FooEx&& item ) {\n        operator=( item );\n        item.serial = 0;\n    }\n\n};\n\ntemplate <template <typename, typename> class CQ, typename A1, typename A2, typename T>\nvoid TestExceptionBody() {\n    enum methods {\n        m_push = 0,\n        m_pop\n    };\n\n    const int N = 1000;     // # of bytes\n\n    MaxFooCount = 5;\n\n    try {\n        int n_pushed=0, n_popped=0;\n        for(int t = 0; t <= 1; t++)// exception type -- 0 : from allocator(), 1 : from Foo's constructor\n        {\n            CQ<T,A1> queue_test;\n            for( int m=m_push; m<=m_pop; m++ ) {\n                // concurrent_queue internally rebinds the allocator to the one for 'char'\n                A2::init_counters();\n\n                if(t) MaxFooCount = MaxFooCount + 400;\n                else A2::set_limits(N/2);\n\n                try {\n                    switch(m) {\n                    case m_push:\n                        for( int k=0; k<N; k++ ) {\n                            push( queue_test, T(), k);\n                            n_pushed++;\n                        }\n                        break;\n                    case m_pop:\n                        n_popped=0;\n                        for( int k=0; k<n_pushed; k++ ) {\n                            T elt;\n                            queue_test.try_pop( elt);\n                            n_popped++;\n                        }\n                        n_pushed = 0;\n                        A2::set_limits();\n                        break;\n                    }\n                    if( !t && m==m_push ) REQUIRE_MESSAGE(false, \"should throw an exception\");\n                } catch ( Foo_exception & ) {\n                    long tc = MaxFooCount;\n                    MaxFooCount = 0; // disable exception\n                    switch(m) {\n                    case m_push:\n                        REQUIRE_MESSAGE(ptrdiff_t(queue_test.size())==n_pushed, \"incorrect queue size\");\n                        for( int k=0; k<(int)tc; k++ ) {\n                            push( queue_test, T(), k);\n                            n_pushed++;\n                        }\n                        break;\n                    case m_pop:\n                        n_pushed -= (n_popped+1); // including one that threw the exception\n                        REQUIRE_MESSAGE(n_pushed>=0, \"n_pushed cannot be less than 0\");\n                        for( int k=0; k<1000; k++ ) {\n                            push( queue_test, T(), k);\n                            n_pushed++;\n                        }\n                        REQUIRE_MESSAGE(!queue_test.empty(), \"queue must not be empty\");\n                        REQUIRE_MESSAGE(ptrdiff_t(queue_test.size())==n_pushed, \"queue size must be equal to n pushed\");\n                        for( int k=0; k<n_pushed; k++ ) {\n                            T elt;\n                            queue_test.try_pop( elt);\n                        }\n                        REQUIRE_MESSAGE(queue_test.empty(), \"queue must be empty\");\n                        REQUIRE_MESSAGE(queue_test.size()==0, \"queue must be empty\");\n                        break;\n                    }\n                    MaxFooCount = tc;\n                } catch ( std::bad_alloc & ) {\n                    A2::set_limits(); // disable exception from allocator\n                    std::size_t size = queue_test.size();\n                    switch(m) {\n                        case m_push:\n                            REQUIRE_MESSAGE(size>0, \"incorrect queue size\");\n                            break;\n                        case m_pop:\n                            if( !t ) REQUIRE_MESSAGE(false, \"should not throw an exception\");\n                            break;\n                    }\n                }\n                INFO(\"for t= \" << t << \"and m= \" << m << \" exception test passed\");\n            }\n        }\n    } catch(...) {\n        REQUIRE_MESSAGE(false, \"unexpected exception\");\n    }\n}\n\nvoid TestExceptions() {\n    using allocator_t = StaticSharedCountingAllocator<oneapi::tbb::cache_aligned_allocator<std::size_t>>;\n    using allocator_char_t = StaticSharedCountingAllocator<oneapi::tbb::cache_aligned_allocator<char>>;\n    TestExceptionBody<ConcQWithSizeWrapper, allocator_t, allocator_char_t, FooEx>();\n    TestExceptionBody<oneapi::tbb::concurrent_bounded_queue, allocator_t, allocator_char_t, FooEx>();\n\n}\n\nstd::atomic<std::size_t> num_pushed;\nstd::atomic<std::size_t> num_popped;\nstd::atomic<std::size_t> failed_pushes;\nstd::atomic<std::size_t> failed_pops;\n\nclass SimplePushBody {\n    oneapi::tbb::concurrent_bounded_queue<int>* q;\n    std::size_t max;\npublic:\n    SimplePushBody(oneapi::tbb::concurrent_bounded_queue<int>* _q, std::size_t hi_thr) : q(_q), max(hi_thr) {}\n\n    void operator()(std::size_t thread_id) const {\n        if (thread_id == max) {\n            while ( q->size() < std::ptrdiff_t(max) ) {\n                utils::yield();\n            }\n            q->abort();\n            return;\n        }\n        try {\n            q->push(42);\n            ++num_pushed;\n        } catch (...) {\n            ++failed_pushes;\n        }\n    }\n};\n\nclass SimplePopBody {\n    oneapi::tbb::concurrent_bounded_queue<int>* q;\n    std::ptrdiff_t max;\n    std::ptrdiff_t prefill;\npublic:\n    SimplePopBody(oneapi::tbb::concurrent_bounded_queue<int>* _q, std::size_t hi_thr, std::size_t nitems)\n    : q(_q), max(hi_thr), prefill(nitems) {}\n\n    void operator()(std::size_t thread_id) const {\n        int e;\n        if (thread_id == std::size_t(max)) {\n            while (q->size()> prefill - max) {\n                utils::yield();\n            }\n\n            q->abort();\n            return;\n        }\n        try {\n            q->pop(e);\n            ++num_popped;\n        } catch ( ... ) {\n            ++failed_pops;\n        }\n    }\n};\n\nvoid TestAbort() {\n    for (std::size_t nthreads = MinThread; nthreads <= MaxThread; ++nthreads) {\n        oneapi::tbb::concurrent_bounded_queue<int> iq1;\n        iq1.set_capacity(0);\n        for (std::size_t i = 0; i < 10; ++i) {\n            num_pushed.store(0, std::memory_order_relaxed);\n            num_popped.store(0, std::memory_order_relaxed);\n            failed_pushes.store(0, std::memory_order_relaxed);\n            failed_pops.store(0, std::memory_order_relaxed);\n            SimplePushBody my_push_body1(&iq1, nthreads);\n            utils::NativeParallelFor(nthreads + 1, my_push_body1);\n            REQUIRE_MESSAGE(num_pushed == 0, \"no elements should have been pushed to zero-sized queue\");\n            REQUIRE_MESSAGE(failed_pushes == nthreads, \"All threads should have failed to push an element to zero-sized queue\");\n            // Do not test popping each time in order to test queue destruction with no previous pops\n            if (nthreads < (MaxThread + MinThread) / 2) {\n                int e;\n                bool queue_empty = !iq1.try_pop(e);\n                REQUIRE_MESSAGE(queue_empty, \"no elements should have been popped from zero-sized queue\");\n            }\n        }\n\n        oneapi::tbb::concurrent_bounded_queue<int> iq2;\n        iq2.set_capacity(2);\n        for (std::size_t i=0; i < 10; ++i) {\n            num_pushed.store(0, std::memory_order_relaxed);\n            num_popped.store(0, std::memory_order_relaxed);\n            failed_pushes.store(0, std::memory_order_relaxed);\n            failed_pops.store(0, std::memory_order_relaxed);\n            SimplePushBody my_push_body2(&iq2, nthreads);\n            utils::NativeParallelFor(nthreads + 1, my_push_body2);\n            REQUIRE_MESSAGE(num_pushed <= 2, \"at most 2 elements should have been pushed to queue of size 2\");\n            if (nthreads>= 2)\n                REQUIRE_MESSAGE(failed_pushes == nthreads - 2, \"nthreads-2 threads should have failed to push an element to queue of size 2\");\n            int e;\n            while (iq2.try_pop(e)) ;\n        }\n\n        oneapi::tbb::concurrent_bounded_queue<int> iq3;\n        iq3.set_capacity(2);\n        for (std::size_t i = 0; i < 10; ++i) {\n            num_pushed.store(0, std::memory_order_relaxed);\n            num_popped.store(0, std::memory_order_relaxed);\n            failed_pushes.store(0, std::memory_order_relaxed);\n            failed_pops.store(0, std::memory_order_relaxed);\n            iq3.push(42);\n            iq3.push(42);\n            SimplePopBody my_pop_body(&iq3, nthreads, 2);\n            utils::NativeParallelFor( nthreads+1, my_pop_body );\n            REQUIRE_MESSAGE(num_popped <= 2, \"at most 2 elements should have been popped from queue of size 2\");\n            if (nthreads>= 2)\n                REQUIRE_MESSAGE(failed_pops == nthreads - 2, \"nthreads-2 threads should have failed to pop an element from queue of size 2\");\n            else {\n                int e;\n                iq3.pop(e);\n            }\n        }\n\n        oneapi::tbb::concurrent_bounded_queue<int> iq4;\n        std::size_t cap = nthreads / 2;\n        if (!cap) cap = 1;\n        iq4.set_capacity(cap);\n        for (int i=0; i<10; ++i) {\n            num_pushed.store(0, std::memory_order_relaxed);\n            num_popped.store(0, std::memory_order_relaxed);\n            failed_pushes.store(0, std::memory_order_relaxed);\n            failed_pops.store(0, std::memory_order_relaxed);\n            SimplePushBody my_push_body2(&iq4, nthreads);\n            utils::NativeParallelFor(nthreads + 1, my_push_body2);\n            REQUIRE_MESSAGE(num_pushed <= cap, \"at most cap elements should have been pushed to queue of size cap\");\n            if (nthreads>= cap)\n                REQUIRE_MESSAGE(failed_pushes == nthreads-cap, \"nthreads-cap threads should have failed to push an element to queue of size cap\");\n            SimplePopBody my_pop_body(&iq4, nthreads, num_pushed);\n            utils::NativeParallelFor( nthreads+1, my_pop_body );\n            REQUIRE_MESSAGE((int)num_popped <= cap, \"at most cap elements should have been popped from queue of size cap\");\n            if (nthreads>= cap)\n                REQUIRE_MESSAGE(failed_pops == nthreads-cap, \"nthreads-cap threads should have failed to pop an element from queue of size cap\");\n            else {\n                int e;\n                while (iq4.try_pop(e)) ;\n            }\n        }\n    }\n}\n#endif\n\ntemplate <template <typename...> class ContainerType>\nvoid test_member_types() {\n    using container_type = ContainerType<int>;\n    static_assert(std::is_same<typename container_type::allocator_type, oneapi::tbb::cache_aligned_allocator<int>>::value,\n                  \"Incorrect default template allocator\");\n\n    static_assert(std::is_same<typename container_type::value_type, int>::value,\n                  \"Incorrect container value_type member type\");\n\n    static_assert(std::is_signed<typename container_type::difference_type>::value,\n                  \"Incorrect container difference_type member type\");\n\n    using value_type = typename container_type::value_type;\n    static_assert(std::is_same<typename container_type::reference, value_type&>::value,\n                  \"Incorrect container reference member type\");\n    static_assert(std::is_same<typename container_type::const_reference, const value_type&>::value,\n                  \"Incorrect container const_reference member type\");\n    using allocator_type = typename container_type::allocator_type;\n    static_assert(std::is_same<typename container_type::pointer, typename std::allocator_traits<allocator_type>::pointer>::value,\n                  \"Incorrect container pointer member type\");\n    static_assert(std::is_same<typename container_type::const_pointer, typename std::allocator_traits<allocator_type>::const_pointer>::value,\n                  \"Incorrect container const_pointer member type\");\n\n    static_assert(utils::is_forward_iterator<typename container_type::iterator>::value,\n                  \"Incorrect container iterator member type\");\n    static_assert(!std::is_const<typename container_type::iterator::value_type>::value,\n                  \"Incorrect container iterator member type\");\n    static_assert(utils::is_forward_iterator<typename container_type::const_iterator>::value,\n                  \"Incorrect container const_iterator member type\");\n    static_assert(std::is_const<typename container_type::const_iterator::value_type>::value,\n                  \"Incorrect container iterator member type\");\n}\n\nenum push_t { push_op, try_push_op };\n\ntemplate<push_t push_op>\nstruct pusher {\n    template<typename CQ, typename VType>\n    static bool push( CQ& queue, VType&& val ) {\n        queue.push( std::forward<VType>( val ) );\n        return true;\n    }\n};\n\ntemplate<>\nstruct pusher< try_push_op> {\n    template<typename CQ, typename VType>\n    static bool push( CQ& queue, VType&& val ) {\n        return queue.try_push( std::forward<VType>( val ) );\n    }\n};\n\nenum pop_t { pop_op, try_pop_op };\n\ntemplate<pop_t pop_op>\nstruct popper {\n    template<typename CQ, typename VType>\n    static bool pop( CQ& queue, VType&& val ) {\n        if( queue.empty() ) return false;\n        queue.pop( std::forward<VType>( val ) );\n        return true;\n    }\n};\n\ntemplate<>\nstruct popper<try_pop_op> {\n    template<typename CQ, typename VType>\n    static bool pop( CQ& queue, VType&& val ) {\n        return queue.try_pop( std::forward<VType>( val ) );\n    }\n};\n\nstruct MoveOperationTracker {\n    static std::size_t copy_constructor_called_times;\n    static std::size_t move_constructor_called_times;\n    static std::size_t copy_assignment_called_times;\n    static std::size_t move_assignment_called_times;\n\n    MoveOperationTracker() {}\n    MoveOperationTracker(const MoveOperationTracker&) {\n        ++copy_constructor_called_times;\n    }\n    MoveOperationTracker(MoveOperationTracker&&) {\n        ++move_constructor_called_times;\n    }\n    MoveOperationTracker& operator=(MoveOperationTracker const&) {\n        ++copy_assignment_called_times;\n        return *this;\n    }\n    MoveOperationTracker& operator=(MoveOperationTracker&&) {\n        ++move_assignment_called_times;\n        return *this;\n    }\n};\n\nsize_t MoveOperationTracker::copy_constructor_called_times = 0;\nsize_t MoveOperationTracker::move_constructor_called_times = 0;\nsize_t MoveOperationTracker::copy_assignment_called_times = 0;\nsize_t MoveOperationTracker::move_assignment_called_times = 0;\n\ntemplate <class CQ, push_t push_op, pop_t pop_op>\nvoid TestMoveSupport() {\n    std::size_t &mcct = MoveOperationTracker::move_constructor_called_times;\n    std::size_t &ccct = MoveOperationTracker::copy_constructor_called_times;\n    std::size_t &cact = MoveOperationTracker::copy_assignment_called_times;\n    std::size_t &mact = MoveOperationTracker::move_assignment_called_times;\n    mcct = ccct = cact = mact = 0;\n\n    CQ q;\n\n    REQUIRE_MESSAGE(mcct == 0, \"Value must be zero-initialized\");\n    REQUIRE_MESSAGE(ccct == 0, \"Value must be zero-initialized\");\n    CHECK(pusher<push_op>::push( q, MoveOperationTracker() ));\n    REQUIRE_MESSAGE(mcct == 1, \"Not working push(T&&) or try_push(T&&)?\");\n    REQUIRE_MESSAGE(ccct == 0, \"Copying of arg occurred during push(T&&) or try_push(T&&)\");\n\n    MoveOperationTracker ob;\n    CHECK(pusher<push_op>::push( q, std::move(ob) ));\n    REQUIRE_MESSAGE(mcct == 2, \"Not working push(T&&) or try_push(T&&)?\");\n    REQUIRE_MESSAGE(ccct == 0, \"Copying of arg occurred during push(T&&) or try_push(T&&)\");\n\n    REQUIRE_MESSAGE(cact == 0, \"Copy assignment called during push(T&&) or try_push(T&&)\");\n    REQUIRE_MESSAGE(mact == 0, \"Move assignment called during push(T&&) or try_push(T&&)\");\n\n    bool result = popper<pop_op>::pop( q, ob );\n    CHECK(result);\n    REQUIRE_MESSAGE(cact == 0, \"Copy assignment called during try_pop(T&&)\");\n    REQUIRE_MESSAGE(mact == 1, \"Move assignment was not called during try_pop(T&&)\");\n}\n\nvoid TestMoveSupportInPushPop() {\n    TestMoveSupport<oneapi::tbb::concurrent_queue<MoveOperationTracker>, push_op, try_pop_op>();\n    TestMoveSupport<oneapi::tbb::concurrent_bounded_queue<MoveOperationTracker>, push_op, pop_op>();\n    TestMoveSupport<oneapi::tbb::concurrent_bounded_queue<MoveOperationTracker>, try_push_op, try_pop_op>();\n}\n\ntemplate<class T>\nclass allocator: public oneapi::tbb::cache_aligned_allocator<T> {\npublic:\n    state_type state = LIVE;\n    std::size_t m_unique_id;\n\n    allocator() : m_unique_id( 0 ) {}\n    allocator(size_t unique_id) { m_unique_id = unique_id; }\n\n    ~allocator() {\n        REQUIRE_MESSAGE(state == LIVE, \"Destroyed allocator has been used.\");\n        state = DEAD;\n    }\n\n    template<typename U>\n    allocator(const allocator<U>& a) noexcept {\n        REQUIRE_MESSAGE(a.state == LIVE, \"Destroyed allocator has been used.\");\n        m_unique_id = a.m_unique_id;\n    }\n\n    template<typename U>\n    struct rebind { typedef allocator<U> other; };\n\n    friend bool operator==(const allocator& lhs, const allocator& rhs) {\n        REQUIRE_MESSAGE(lhs.state == LIVE, \"Destroyed allocator has been used.\");\n        REQUIRE_MESSAGE(rhs.state == LIVE, \"Destroyed allocator has been used.\");\n        return lhs.m_unique_id == rhs.m_unique_id;\n    }\n};\n\ntemplate <typename Queue>\nvoid AssertEquality(Queue &q, const std::vector<typename Queue::value_type> &vec) {\n    CHECK(q.size() == typename Queue::size_type(vec.size()));\n    CHECK(std::equal(q.unsafe_begin(), q.unsafe_end(), vec.begin()));\n}\n\ntemplate <typename Queue>\nvoid AssertEmptiness(Queue &q) {\n    CHECK(q.empty());\n    CHECK(!q.size());\n    typename Queue::value_type elem;\n    CHECK(!q.try_pop(elem));\n}\n\ntemplate <push_t push_op, typename Queue>\nvoid FillTest(Queue &q, const std::vector<typename Queue::value_type> &vec) {\n    for (typename std::vector<typename Queue::value_type>::const_iterator it = vec.begin(); it != vec.end(); ++it)\n        CHECK(pusher<push_op>::push(q, *it));\n    AssertEquality(q, vec);\n}\n\ntemplate <pop_t pop_op, typename Queue>\nvoid EmptyTest(Queue &q, const std::vector<typename Queue::value_type> &vec) {\n    typedef typename Queue::value_type value_type;\n\n    value_type elem;\n    typename std::vector<value_type>::const_iterator it = vec.begin();\n    while (popper<pop_op>::pop(q, elem)) {\n        CHECK(elem == *it);\n        ++it;\n    }\n    CHECK(it == vec.end());\n    AssertEmptiness(q);\n}\n\ntemplate <typename T, typename A>\nvoid bounded_queue_specific_test(oneapi::tbb::concurrent_queue<T, A> &, const std::vector<T> &) { /* do nothing */ }\n\ntemplate <typename T, typename A>\nvoid bounded_queue_specific_test(oneapi::tbb::concurrent_bounded_queue<T, A> &q, const std::vector<T> &vec) {\n    typedef typename oneapi::tbb::concurrent_bounded_queue<T, A>::size_type size_type;\n\n    FillTest<try_push_op>(q, vec);\n    oneapi::tbb::concurrent_bounded_queue<T, A> q2 = q;\n    EmptyTest<pop_op>(q, vec);\n\n    // capacity\n    q2.set_capacity(size_type(vec.size()));\n    CHECK(q2.capacity() == size_type(vec.size()));\n    CHECK(q2.size() == size_type(vec.size()));\n    CHECK(!q2.try_push(vec[0]));\n    q.abort();\n}\n\n// Checks operability of the queue the data was moved from\ntemplate<typename T, typename CQ>\nvoid TestQueueOperabilityAfterDataMove( CQ& queue ) {\n    const std::size_t size = 10;\n    std::vector<T> v(size);\n    for( std::size_t i = 0; i < size; ++i ) v[i] = T( i * i + i );\n\n    FillTest<push_op>(queue, v);\n    EmptyTest<try_pop_op>(queue, v);\n    bounded_queue_specific_test(queue, v);\n}\n\ntemplate<class CQ, class T>\nvoid TestMoveConstructors() {\n    T::construction_num = T::destruction_num = 0;\n    CQ src_queue( allocator<T>(0) );\n    const std::size_t size = 10;\n    for( std::size_t i = 0; i < size; ++i )\n        src_queue.push( T(i + (i ^ size)) );\n    CHECK(T::construction_num == 2 * size);\n    CHECK(T::destruction_num == size);\n\n    const T* locations[size];\n    typename CQ::const_iterator qit = src_queue.unsafe_begin();\n    for( std::size_t i = 0; i < size; ++i, ++qit )\n        locations[i] = &(*qit);\n\n    // Ensuring allocation operation takes place during move when allocators are different\n    T::construction_num = T::destruction_num = 0;\n    CQ dst_queue( std::move(src_queue), allocator<T>(1) );\n    CHECK(T::construction_num == size);\n    CHECK(T::destruction_num == size);\n\n    TestQueueOperabilityAfterDataMove<T>( src_queue );\n\n    qit = dst_queue.unsafe_begin();\n    for( std::size_t i = 0; i < size; ++i, ++qit ) {\n        REQUIRE_MESSAGE(locations[i] != &(*qit), \"an item should have been copied but was not\" );\n        locations[i] = &(*qit);\n    }\n\n    T::construction_num = T::destruction_num = 0;\n    // Ensuring there is no allocation operation during move with equal allocators\n    CQ dst_queue2( std::move(dst_queue), allocator<T>(1) );\n    CHECK(T::construction_num == 0);\n    CHECK(T::destruction_num == 0);\n\n    TestQueueOperabilityAfterDataMove<T>( dst_queue );\n\n    qit = dst_queue2.unsafe_begin();\n    for( std::size_t i = 0; i < size; ++i, ++qit ) {\n        REQUIRE_MESSAGE(locations[i] == &(*qit), \"an item should have been moved but was not\" );\n    }\n\n    for( std::size_t i = 0; i < size; ++i) {\n        T test(i + (i ^ size));\n        T popped;\n        bool pop_result = dst_queue2.try_pop( popped );\n        CHECK(pop_result);\n        CHECK(test == popped);\n    }\n    CHECK(dst_queue2.empty());\n    CHECK(dst_queue2.size() == 0);\n}\n\nvoid TestMoveConstruction() {\n    TestMoveConstructors<ConcQWithSizeWrapper<Bar, allocator<Bar>>, Bar>();\n    TestMoveConstructors<oneapi::tbb::concurrent_bounded_queue<Bar, allocator<Bar>>, Bar>();\n}\n\nclass NonTrivialConstructorType {\npublic:\n    NonTrivialConstructorType( int a = 0 ) : m_a( a ), m_str( \"\" ) {}\n    NonTrivialConstructorType( const std::string& str ) : m_a( 0 ), m_str( str ) {}\n    NonTrivialConstructorType( int a, const std::string& str ) : m_a( a ), m_str( str ) {}\n    int get_a() const { return m_a; }\n    std::string get_str() const { return m_str; }\nprivate:\n    int m_a;\n    std::string m_str;\n};\n\nenum emplace_t { emplace_op, try_emplace_op };\n\ntemplate<emplace_t emplace_op>\nstruct emplacer {\n    template<typename CQ, typename... Args>\n    static void emplace( CQ& queue, Args&&... val ) { queue.emplace( std::forward<Args>( val )... ); }\n};\n\ntemplate<>\nstruct emplacer <try_emplace_op> {\n    template<typename CQ, typename... Args>\n    static void emplace( CQ& queue, Args&&... val ) {\n        bool result = queue.try_emplace( std::forward<Args>( val )... );\n        REQUIRE_MESSAGE(result, \"try_emplace error\\n\");\n    }\n};\n\ntemplate<typename CQ, emplace_t emplace_op>\nvoid TestEmplaceInQueue() {\n    CQ cq;\n    std::string test_str = \"I'm being emplaced!\";\n    {\n        emplacer<emplace_op>::emplace( cq, 5 );\n        CHECK(cq.size() == 1);\n        NonTrivialConstructorType popped( -1 );\n        bool result = cq.try_pop( popped );\n        CHECK(result);\n        CHECK(popped.get_a() == 5);\n        CHECK(popped.get_str() == std::string( \"\" ));\n    }\n\n    CHECK(cq.empty());\n\n    {\n        NonTrivialConstructorType popped( -1 );\n        emplacer<emplace_op>::emplace( cq, std::string(test_str) );\n        bool result = cq.try_pop( popped );\n        CHECK(result);\n        CHECK(popped.get_a() == 0);\n        CHECK(popped.get_str() == test_str);\n    }\n\n    CHECK(cq.empty());\n\n    {\n        NonTrivialConstructorType popped( -1, \"\" );\n        emplacer<emplace_op>::emplace( cq, 5, std::string(test_str) );\n        bool result = cq.try_pop( popped );\n        CHECK(result);\n        CHECK(popped.get_a() == 5);\n        CHECK(popped.get_str() == test_str);\n    }\n}\nvoid TestEmplace() {\n    TestEmplaceInQueue<ConcQWithSizeWrapper<NonTrivialConstructorType>, emplace_op>();\n    TestEmplaceInQueue<oneapi::tbb::concurrent_bounded_queue<NonTrivialConstructorType>, emplace_op>();\n    TestEmplaceInQueue<oneapi::tbb::concurrent_bounded_queue<NonTrivialConstructorType>, try_emplace_op>();\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\ntemplate <template <typename...> typename TQueue>\nvoid TestDeductionGuides() {\n    using ComplexType = const std::string*;\n    std::vector<ComplexType> v;\n\n    // check TQueue(InputIterator, InputIterator)\n    TQueue q1(v.begin(), v.end());\n    static_assert(std::is_same<decltype(q1), TQueue<ComplexType>>::value);\n\n    // check TQueue(InputIterator, InputIterator, Allocator)\n    TQueue q2(v.begin(), v.end(), std::allocator<ComplexType>());\n    static_assert(std::is_same<decltype(q2), TQueue<ComplexType, std::allocator<ComplexType>>>::value);\n\n    // check TQueue(TQueue &)\n    TQueue q3(q1);\n    static_assert(std::is_same<decltype(q3), decltype(q1)>::value);\n\n    // check TQueue(TQueue &, Allocator)\n    TQueue q4(q2, std::allocator<ComplexType>());\n    static_assert(std::is_same<decltype(q4), decltype(q2)>::value);\n\n    // check TQueue(TQueue &&)\n    TQueue q5(std::move(q1));\n    static_assert(std::is_same<decltype(q5), decltype(q1)>::value);\n\n    // check TQueue(TQueue &&, Allocator)\n    TQueue q6(std::move(q4), std::allocator<ComplexType>());\n    static_assert(std::is_same<decltype(q6), decltype(q4)>::value);\n}\n#endif\n\ntemplate <typename Iterator, typename QueueType>\nvoid TestQueueIteratorComparisonsBasic( QueueType& q ) {\n    REQUIRE_MESSAGE(!q.empty(), \"Incorrect test setup\");\n    using namespace comparisons_testing;\n    Iterator it1, it2;\n    testEqualityComparisons</*ExpectEqual = */true>(it1, it2);\n    it1 = q.unsafe_begin();\n    testEqualityComparisons</*ExpectEqual = */false>(it1, it2);\n    it2 = q.unsafe_begin();\n    testEqualityComparisons</*ExpectEqual = */true>(it1, it2);\n    it2 = q.unsafe_end();\n    testEqualityComparisons</*ExpectEqual = */false>(it1, it2);\n}\n\ntemplate <typename QueueType>\nvoid TestQueueIteratorComparisons() {\n    QueueType q;\n    q.emplace(1);\n    q.emplace(2);\n    q.emplace(3);\n    TestQueueIteratorComparisonsBasic<typename QueueType::iterator>(q);\n    const QueueType& cq = q;\n    TestQueueIteratorComparisonsBasic<typename QueueType::const_iterator>(cq);\n}\n\n//! Test constructors\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing constructors\") {\n    TestQueueConstructors();\n}\n\n//! Test work with empty queue\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing work with empty queue\") {\n    TestEmptiness();\n}\n\n//! Test set capacity operation\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing set capacity operation\") {\n    TestFullness();\n}\n\n//! Test clean operation\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing clean operation\") {\n    TestClearWorks();\n}\n\n//! Test move constructors\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing move constructor\") {\n    TestMoveConstruction();\n}\n\n//! Test move support in push and pop\n//! \\brief \\ref requirement\nTEST_CASE(\"testing move support in push and pop\") {\n    TestMoveSupportInPushPop();\n}\n\n//! Test emplace operation\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing emplace\") {\n    TestEmplace();\n}\n\n//! Test concurrent_queues member types\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing concurrent_queues member types\"){\n    test_member_types<oneapi::tbb::concurrent_queue>();\n    test_member_types<oneapi::tbb::concurrent_bounded_queue>();\n\n    // Test size_type\n    static_assert(std::is_unsigned<typename oneapi::tbb::concurrent_queue<int>::size_type>::value,\n                  \"Incorrect oneapi::tbb::concurrent_queue::size_type member type\");\n    static_assert(std::is_signed<typename oneapi::tbb::concurrent_bounded_queue<int>::size_type>::value,\n                  \"Incorrect oneapi::tbb::concurrent_bounded_queue::size_type member type\");\n}\n\n//! Test iterators\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing iterators\") {\n    TestQueueIteratorWorks();\n}\n\n//! Test concurrent operations support\n//! \\brief \\ref requirement\nTEST_CASE(\"testing concurrent operations support\") {\n    TestConcurrentPushPop();\n}\n\n#if TBB_USE_EXCEPTIONS\n//! Test exception safety\n//! \\brief \\ref requirement\nTEST_CASE(\"testing exception safety\") {\n    TestExceptions();\n}\n\n//! Test abort operation\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing abort operation\") {\n    TestAbort();\n}\n#endif\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Test deduction guides\n//! \\brief \\ref interface\nTEST_CASE(\"testing deduction guides\") {\n    TestDeductionGuides<oneapi::tbb::concurrent_queue>();\n    TestDeductionGuides<oneapi::tbb::concurrent_bounded_queue>();\n}\n#endif\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_queue iterator comparisons\") {\n    TestQueueIteratorComparisons<oneapi::tbb::concurrent_queue<int>>();\n}\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_bounded_queue iterator comparisons\") {\n    TestQueueIteratorComparisons<oneapi::tbb::concurrent_bounded_queue<int>>();\n}\n\nclass MinimalisticObject {\npublic:\n    struct flag {};\n\n    MinimalisticObject() = delete;\n    MinimalisticObject(flag) : underlying_obj(default_obj) {}\n\n    MinimalisticObject(const MinimalisticObject&) = delete;\n    MinimalisticObject& operator=(const MinimalisticObject&) = delete;\n\n    std::size_t get_obj() const { return underlying_obj; }\n    std::size_t get_default_obj() const { return default_obj; }\n\nprotected:\n    static constexpr std::size_t default_obj = 42;\n    std::size_t underlying_obj;\n    friend struct MoveAssignableMinimalisticObject;\n};\n\nstruct MoveAssignableMinimalisticObject : MinimalisticObject {\npublic:\n    using MinimalisticObject::MinimalisticObject;\n\n    MoveAssignableMinimalisticObject& operator=(MoveAssignableMinimalisticObject&& other) {\n        if (this != &other) {\n            underlying_obj = other.underlying_obj;\n            other.underlying_obj = 0;\n        }\n        return *this;\n    }\n};\n\ntemplate <typename Container>\nvoid test_basics(Container& container, std::size_t desired_size) {\n    CHECK(!container.empty());\n\n    std::size_t counter = 0;\n    for (auto it = container.unsafe_begin(); it != container.unsafe_end(); ++it) {\n        CHECK(it->get_obj() == it->get_default_obj());\n        ++counter;\n    }\n    CHECK(counter == desired_size);\n\n    container.clear();\n    CHECK(container.empty());\n}\n\ntemplate <template <class...> class Container>\nvoid test_with_minimalistic_objects() {\n    // Test with MinimalisticObject and no pop operations\n    const std::size_t elements_count = 100;\n    {\n        Container<MinimalisticObject> default_container;\n\n        for (std::size_t i = 0; i < elements_count; ++i) {\n            default_container.emplace(MinimalisticObject::flag{});\n        }\n        test_basics(default_container, elements_count);\n    }\n    // Test with MoveAssignableMinimalisticObject with pop operation\n    {\n        Container<MoveAssignableMinimalisticObject> default_container;\n\n        for (std::size_t i = 0; i < elements_count; ++i) {\n            default_container.emplace(MinimalisticObject::flag{});\n        }\n        test_basics(default_container, elements_count);\n\n        // Refill again\n        for (std::size_t i = 0; i < elements_count; ++i) {\n            default_container.emplace(MinimalisticObject::flag{});\n        }\n\n        MoveAssignableMinimalisticObject result(MinimalisticObject::flag{});\n\n        std::size_t element_counter = 0;\n        while (!default_container.empty()) {\n            CHECK(default_container.try_pop(result));\n            ++element_counter;\n        }\n\n        CHECK(element_counter == elements_count);\n        CHECK(default_container.empty());\n    }\n}\n\n//! \\brief \\ref requirement\nTEST_CASE(\"Test with minimalistic object type\") {\n    test_with_minimalistic_objects<oneapi::tbb::concurrent_queue>();\n    test_with_minimalistic_objects<oneapi::tbb::concurrent_bounded_queue>();\n}\n\n//TODO: Once support for std::allocator_traits::propagate_on_container_* is implemented,\n//      most of the 4 test cases below can be replaced with move_support_tests::test_*.\n\ntemplate<typename CQ>\nvoid test_queue_helper() {\n    int size = 5;\n    typename CQ::value_type vec_1(size, 0), vec_2(size, 0), vec_3(size, 0), vec_4(size, 0);\n    srand(static_cast<unsigned>(time(0)));\n    generate(vec_1.begin(), vec_1.end(), rand);\n    generate(vec_2.begin(), vec_2.end(), rand);\n    generate(vec_3.begin(), vec_3.end(), rand);\n    generate(vec_4.begin(), vec_4.end(), rand);\n\n    CQ q1, q2, q3;\n    q3 = {vec_4, vec_2, vec_3};\n    CQ q4({vec_1, vec_2, vec_3});\n\n    q1 = q3;\n    q2 = std::move(q3);\n    CHECK(q3.empty());\n\n    CHECK(q1 != q4);\n    q1.swap(q4);\n    CHECK(q2 == q4);\n\n    swap(q2, q3);\n    CHECK(q2.empty());\n    CHECK(q3 == q4);\n}\n\n//! Test assignment (copy/move/initializer_list) and swapping\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing assignment and swapping\") {\n    test_queue_helper<tbb::concurrent_queue<std::vector<int>>>();\n    test_queue_helper<tbb::concurrent_bounded_queue<std::vector<int>>>();\n}\n\ntemplate <typename QueueType>\nvoid TestMoveQueue() {\n    using allocator_type = typename QueueType::allocator_type;\n\n    QueueType q1, q2;\n    move_support_tests::Foo obj;\n    size_t n1(15), n2(7);\n\n    allocator_type::init_counters();\n    for(size_t i =0; i < n1; i++)\n        q1.push(obj);\n    size_t q1_items_constructed = allocator_type::items_constructed;\n    size_t q1_items_allocated =  allocator_type::items_allocated;\n\n    allocator_type::init_counters();\n    for(size_t i =0; i < n2; i++)\n        q2.push(obj);\n    size_t q2_items_allocated =  allocator_type::items_allocated;\n\n    allocator_type::init_counters();\n    q1 = std::move(q2);\n\n    CHECK(q1_items_allocated == allocator_type::items_freed);\n    CHECK(q1_items_constructed == allocator_type::items_destroyed);\n    CHECK(q2_items_allocated >= allocator_type::items_allocated);\n}\n\n//! move assignment test for equal counting allocator\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing move assignment with equal counting allocators\") {\n    using allocator_type = StaticSharedCountingAllocator<std::allocator<move_support_tests::Foo>>;\n    TestMoveQueue<tbb::concurrent_queue<move_support_tests::Foo, allocator_type>>();\n    TestMoveQueue<tbb::concurrent_bounded_queue<move_support_tests::Foo, allocator_type>>();\n}\n\ntemplate<class T>\nstruct stateful_allocator {\n    typedef T value_type;\n    stateful_allocator() = default;\n    int state = 0;\n    template<class U>\n    constexpr stateful_allocator(const stateful_allocator<U>& src) noexcept : state(src.state) {}\n\n    T* allocate(std::size_t n) {\n        return static_cast<T*>(::operator new(n * sizeof(T)));\n    }\n\n    void deallocate(T* p, std::size_t) noexcept {\n        ::operator delete(p);\n    }\n};\n\ntemplate<class T, class U>\nbool operator==(const stateful_allocator<T>& lhs, const stateful_allocator<U>& rhs) { return lhs.state == rhs.state; }\n\ntemplate<class T, class U>\nbool operator!=(const stateful_allocator<T>& lhs, const stateful_allocator<U>& rhs) { return lhs.state != rhs.state; }\n\ntemplate <typename QueueType>\nvoid TestMoveQueueUnequal() {\n    using allocator_type = typename QueueType::allocator_type;\n    allocator_type alloc1, alloc2;\n    alloc1.state = 0;\n    alloc2.state = 1;\n\n    QueueType q1(alloc1), q2(alloc2);\n    move_support_tests::Foo obj;\n    size_t n1(15), n2(7);\n\n    allocator_type::init_counters();\n    for(size_t i =0; i < n1; i++)\n        q1.push(obj);\n\n    allocator_type::init_counters();\n    for(size_t i =0; i < n2; i++)\n        q2.push(obj);\n    size_t q2_items_allocated =  allocator_type::items_allocated;\n\n    allocator_type::init_counters();\n    q1 = std::move(q2);\n\n    REQUIRE_MESSAGE(allocator_type::items_allocated == q2_items_allocated, \"More than expected memory allocated?\");\n    REQUIRE_MESSAGE(std::all_of(q1.unsafe_begin(), q1.unsafe_end(), is_state_predicate<move_support_tests::Foo::MoveInitialized>()),\n                    \"Container did not move construct some elements\");\n    REQUIRE_MESSAGE(std::all_of(q2.unsafe_begin(), q2.unsafe_end(), is_state_predicate<move_support_tests::Foo::MovedFrom>()),\n                    \"Container did not move all the elements\");\n}\n\n//! move assignment test for unequal counting allocator\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing move assignment with unequal counting allocators\") {\n    using allocator_type = StaticSharedCountingAllocator<stateful_allocator<move_support_tests::Foo>>;\n    TestMoveQueueUnequal<tbb::concurrent_queue<move_support_tests::Foo, allocator_type>>();\n    TestMoveQueueUnequal<tbb::concurrent_bounded_queue<move_support_tests::Foo, allocator_type>>();\n}\n\ntemplate<typename Container>\nvoid test_check_move_allocator(Container& src, Container& dst, Container& cpy) {\n    REQUIRE_MESSAGE(src.empty(), \"Source didn't clear\");\n    REQUIRE_MESSAGE(std::equal(dst.unsafe_begin(), dst.unsafe_end(), cpy.unsafe_begin()), \"Elements are not equal\");\n}\n\nvoid test_move_assignment_test_equal() {\n    int n = 5;\n    std::vector<int> vect1(n, 10), vect2(n,20), vect3(n, 30);\n\n    tbb::concurrent_queue<std::vector<int>> src({vect1, vect2, vect3});\n    tbb::concurrent_queue<std::vector<int>> dst(src.get_allocator());\n    tbb::concurrent_queue<std::vector<int>> cpy(src.get_allocator());\n    REQUIRE_MESSAGE(src.get_allocator() == dst.get_allocator(), \"Incorrect test setup: allocators should be equal\");\n    cpy = src;\n    dst = std::move(src);\n\n    tbb::concurrent_bounded_queue<std::vector<int>> src_bnd({vect1, vect2, vect3});\n    tbb::concurrent_bounded_queue<std::vector<int>> dst_bnd(src_bnd.get_allocator());\n    tbb::concurrent_bounded_queue<std::vector<int>> cpy_bnd(src_bnd.get_allocator());\n    REQUIRE_MESSAGE(src_bnd.get_allocator() == dst_bnd.get_allocator(), \"Incorrect test setup: allocators should be equal\");\n    cpy_bnd = src_bnd;\n    dst_bnd = std::move(src_bnd);\n\n    test_check_move_allocator<tbb::concurrent_queue<std::vector<int>>>(src, dst, cpy);\n    REQUIRE_MESSAGE(cpy.unsafe_size() == dst.unsafe_size(), \"Queues are not equal\");\n\n    test_check_move_allocator<tbb::concurrent_bounded_queue<std::vector<int>>>(src_bnd, dst_bnd, cpy_bnd);\n    REQUIRE_MESSAGE(cpy_bnd.size() == dst_bnd.size(), \"Queues are not equal\");\n}\n\nvoid test_move_assignment_test_unequal() {\n    stateful_allocator<int> src_alloc;\n    src_alloc.state = 0;\n    std::vector<int, stateful_allocator<int>> v(8, 0, src_alloc);\n    tbb::concurrent_queue<std::vector<int, stateful_allocator<int>>, stateful_allocator<int>> src(src_alloc);\n\n    v.push_back(42);\n    v.push_back(82);\n    src.push(v);\n    src.push(v);\n\n    stateful_allocator<int> dst_alloc;\n    dst_alloc.state = 1;\n    tbb::concurrent_queue<std::vector<int, stateful_allocator<int>>, stateful_allocator<int>> dst(dst_alloc);\n    tbb::concurrent_queue<std::vector<int, stateful_allocator<int>>, stateful_allocator<int>> cpy(src_alloc);\n    REQUIRE_MESSAGE(src.get_allocator() != dst.get_allocator(), \"Incorrect test setup: allocators should be unequal\");\n    cpy = src;\n    dst = std::move(src);\n\n    tbb::concurrent_bounded_queue<std::vector<int, stateful_allocator<int>>, stateful_allocator<int>> src_bnd(src_alloc);\n    tbb::concurrent_bounded_queue<std::vector<int, stateful_allocator<int>>, stateful_allocator<int>> dst_bnd(dst_alloc);\n    tbb::concurrent_bounded_queue<std::vector<int, stateful_allocator<int>>, stateful_allocator<int>> cpy_bnd(src_alloc);\n    REQUIRE_MESSAGE(src_bnd.get_allocator() != dst_bnd.get_allocator(), \"Incorrect test setup: allocators should be unequal\");\n    src_bnd.push(v);\n    src_bnd.push(v);\n    cpy_bnd = src_bnd;\n    dst_bnd = std::move(src_bnd);\n\n    test_check_move_allocator<tbb::concurrent_queue<std::vector<int, stateful_allocator<int>>, stateful_allocator<int>>>(src, dst, cpy);\n    REQUIRE_MESSAGE(dst.unsafe_size() == cpy.unsafe_size(), \"Queues are not equal\");\n\n    test_check_move_allocator<tbb::concurrent_bounded_queue<std::vector<int, stateful_allocator<int>>, stateful_allocator<int>>>(src_bnd, dst_bnd, cpy_bnd);\n    REQUIRE_MESSAGE(dst_bnd.size() == cpy_bnd.size(), \"Queues are not equal\");\n}\n\n//! move assignment test for equal and unequal allocator\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing move assignment with equal and unequal allocators\") {\n    test_move_assignment_test_equal();\n    test_move_assignment_test_unequal();\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_concurrent_set.cpp",
    "content": "/*\n    Copyright (c) 2019-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef NOMINMAX\n#define NOMINMAX\n#endif\n#include \"oneapi/tbb/concurrent_set.h\"\n#include <common/test.h>\n#include <common/utils.h>\n#include <common/concurrent_ordered_common.h>\n#include <memory>\n#include <type_traits>\n\n//! \\file conformance_concurrent_set.cpp\n//! \\brief Test for [containers.concurrent_set containers.concurrent_multiset] specifications\n\ntemplate <typename... Args>\nstruct AllowMultimapping<oneapi::tbb::concurrent_multiset<Args...>> : std::true_type {};\n\ntemplate <typename Key>\nusing Allocator = LocalCountingAllocator<std::allocator<Key>>;\n\nusing set_type = oneapi::tbb::concurrent_set<int, std::less<int>, Allocator<int>>;\nusing multiset_type = oneapi::tbb::concurrent_multiset<int, std::less<int>, Allocator<int>>;\n\ntemplate <template <typename...> class ContainerType>\nvoid test_member_types() {\n    using default_container_type = ContainerType<int>;\n    static_assert(std::is_same<typename default_container_type::key_compare, std::less<int>>::value,\n                  \"Incorrect default template comparator\");\n    static_assert(std::is_same<typename default_container_type::allocator_type, oneapi::tbb::tbb_allocator<int>>::value,\n                  \"Incorrect default template allocator\");\n\n    auto test_comparator = [](const int&, const int&)->bool { return true; };\n    using test_allocator_type = std::allocator<int>;\n\n    using container_type = ContainerType<int, decltype(test_comparator), test_allocator_type>;\n\n    static_assert(std::is_same<typename container_type::key_type, int>::value,\n                  \"Incorrect container key_type member type\");\n    static_assert(std::is_same<typename container_type::value_type, int>::value,\n                  \"Incorrect container value_type member type\");\n\n    static_assert(std::is_unsigned<typename container_type::size_type>::value,\n                  \"Incorrect container size_type member type\");\n    static_assert(std::is_signed<typename container_type::difference_type>::value,\n                  \"Incorrect container difference_type member type\");\n\n    static_assert(std::is_same<typename container_type::key_compare, decltype(test_comparator)>::value,\n                  \"Incorrect container key_compare member type\");\n    static_assert(std::is_same<typename container_type::allocator_type, test_allocator_type>::value,\n                  \"Incorrect container allocator_type member type\");\n\n    using value_type = typename container_type::value_type;\n    static_assert(std::is_same<typename container_type::reference, value_type&>::value,\n                  \"Incorrect container reference member type\");\n    static_assert(std::is_same<typename container_type::const_reference, const value_type&>::value,\n                  \"Incorrect container const_reference member type\");\n    using allocator_type = typename container_type::allocator_type;\n    static_assert(std::is_same<typename container_type::pointer, typename std::allocator_traits<allocator_type>::pointer>::value,\n                  \"Incorrect container pointer member type\");\n    static_assert(std::is_same<typename container_type::const_pointer, typename std::allocator_traits<allocator_type>::const_pointer>::value,\n                  \"Incorrect container const_pointer member type\");\n\n    static_assert(utils::is_forward_iterator<typename container_type::iterator>::value,\n                  \"Incorrect container iterator member type\");\n    static_assert(!std::is_const<typename container_type::iterator::value_type>::value,\n                  \"Incorrect container iterator member type\");\n    static_assert(utils::is_forward_iterator<typename container_type::const_iterator>::value,\n                  \"Incorrect container const_iterator member type\");\n    static_assert(std::is_const<typename container_type::const_iterator::value_type>::value,\n                  \"Incorrect container const_iterator member type\");\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\ntemplate <template <typename ...> typename TSet>\nvoid test_deduction_guides() {\n    std::vector<int> vc({1, 2, 3});\n    TSet set(vc.begin(), vc.end());\n    static_assert(std::is_same_v<decltype(set), TSet<int>>, \"Wrong\");\n\n    std::greater<int> compare;\n    std::allocator<int> allocator;\n\n    TSet set2(vc.begin(), vc.end(), compare);\n    static_assert(std::is_same_v<decltype(set2), TSet<int, decltype(compare)>>, \"Wrong\");\n\n    TSet set3(vc.begin(), vc.end(), allocator);\n    static_assert(std::is_same_v<decltype(set3), TSet<int, std::less<int>, decltype(allocator)>>, \"Wrong\");\n\n    TSet set4(vc.begin(), vc.end(), compare, allocator);\n    static_assert(std::is_same_v<decltype(set4), TSet<int, decltype(compare), decltype(allocator)>>, \"Wrong\");\n\n    auto init_list = { int(1), int(2), int(3) };\n\n    TSet set5(init_list);\n    static_assert(std::is_same_v<decltype(set5), TSet<int>>, \"Wrong\");\n\n    TSet set6(init_list, compare);\n    static_assert(std::is_same_v<decltype(set6), TSet<int, decltype(compare)>>, \"Wrong\");\n\n    TSet set7(init_list, allocator);\n    static_assert(std::is_same_v<decltype(set7), TSet<int, std::less<int>, decltype(allocator)>>, \"Wrong\");\n\n    TSet set8(init_list, compare, allocator);\n    static_assert(std::is_same_v<decltype(set8), TSet<int, decltype(compare), decltype(allocator)>>, \"Wrong\");\n}\n#endif /*__TBB_CPP17_DEDUCTION_GUIDES_PRESENT*/\n\ntemplate <template <typename...> class SetType>\nvoid test_heterogeneous_functions() {\n    check_heterogeneous_functions_key_int<SetType, int>();\n    check_heterogeneous_functions_key_string<SetType, std::string>();\n    check_heterogeneous_bound_functions<SetType<int, TransparentLess>>();\n}\n\nstruct COSetTraits : OrderedMoveTraitsBase {\n    template <typename T, typename Allocator>\n    using container_type = oneapi::tbb::concurrent_set<T, std::less<T>, Allocator>;\n\n    template <typename T>\n    using container_value_type = T;\n\n    using init_iterator_type = move_support_tests::FooIterator;\n}; // struct COSetTraits\n\nstruct COMultisetTraits : OrderedMoveTraitsBase {\n    template <typename T, typename Allocator>\n    using container_type = oneapi::tbb::concurrent_multiset<T, std::less<T>, Allocator>;\n\n    template <typename T>\n    using container_value_type = T;\n\n    using init_iterator_type = move_support_tests::FooIterator;\n}; // struct COMultisetTraits\n\n//! Testing concurrent_set member types\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_set member types\") {\n    test_member_types<oneapi::tbb::concurrent_set>();\n}\n\n//! Testing multithreading support in concurrent_set\n//! \\brief \\ref requirement\nTEST_CASE(\"concurrent_set multithreading support\") {\n    test_concurrent<set_type>();\n}\n\n//! Testing move constructors and assignment operator in concurrent_set\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_set move semantics support\") {\n    test_rvalue_ref_support<COSetTraits>();\n}\n\n//! Testing std::initializer_list constructors and modifiers in concurrent_set\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"std::initializer_list support in concurrent_set\") {\n    test_initializer_list_support<set_type>({1, 2, 3, 4});\n}\n\n//! Testing node handling in concurrent_set\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"node handling support in concurrent_set\") {\n    node_handling_tests::test_node_handling_support<set_type>();\n}\n\n//! Testing std::allocator_traits support in concurrent_set\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"std::allocator_traits support in concurrent_set\") {\n    test_allocator_traits_support<COSetTraits>();\n}\n\n//! Testing heterogeneous overloads in concurrent_set\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"heterogeneous overloads in concurrent_set\") {\n    test_heterogeneous_functions<oneapi::tbb::concurrent_set>();\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Testing Class Template Argument Deduction in concurrent_set\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"CTAD support in concurrent_set\") {\n    test_deduction_guides<oneapi::tbb::concurrent_set>();\n}\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\n//! Testing comparison operators in concurrent_set\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"test concurrent_set comparisons\") {\n    test_set_comparisons<oneapi::tbb::concurrent_set>();\n}\n\n//! Testing concurrent_multiset member types\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_multiset member types\") {\n    test_member_types<oneapi::tbb::concurrent_multiset>();\n}\n\n//! Testing requirements of concurrent_multiset\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_multiset requirements\") {\n    test_basic<multiset_type>();\n}\n\n//! Testing multithreading support in concurrent_multiset\n//! \\brief \\ref requirement\nTEST_CASE(\"concurrent_multiset multithreading support\") {\n    test_concurrent<multiset_type>();\n}\n\n//! Testing move constructors and assignment operator in concurrent_multiset\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_multiset multithreading support\") {\n    test_rvalue_ref_support<COMultisetTraits>();\n}\n\n//! Testing std::initializer_list constructors and modifiers in concurrent_multiset\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"std::initializer_list support in concurrent_multimap\") {\n    test_initializer_list_support<multiset_type>({1, 2, 3, 4, 4});\n}\n\n//! Testing node handling support in concurrent_multiset\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"node handling support in concurrent_multiset\") {\n    node_handling_tests::test_node_handling_support<multiset_type>();\n}\n\n//! Testing std::allocator_traits support in concurrent_multiset\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"std::allocator_traits support in concurrent_multiset\") {\n    test_allocator_traits_support<COMultisetTraits>();\n}\n\n//! Testing heterogeneous overloads in concurrent_multiset\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"heterogeneous overloads in concurrent_multiset\") {\n    test_heterogeneous_functions<oneapi::tbb::concurrent_multiset>();\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Testing Class Template Argument Deduction in concurrent_multiset\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"CTAD support in concurrent_multiset\") {\n    test_deduction_guides<oneapi::tbb::concurrent_multiset>();\n}\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\n//! Testing comparison operators in concurrent_multiset\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"test concurrent_set comparisons\") {\n    test_set_comparisons<oneapi::tbb::concurrent_multiset>();\n}\n\n//! Testing of merge operations in concurrent_set and concurrent_multiset\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"merge operations\") {\n    node_handling_tests::test_merge<set_type, multiset_type>(1000);\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_concurrent_unordered_map.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"oneapi/tbb/concurrent_unordered_map.h\"\n#include <common/test.h>\n#include <common/utils.h>\n#include <common/concurrent_unordered_common.h>\n#include <memory>\n#include <type_traits>\n\n//! \\file conformance_concurrent_unordered_map.cpp\n//! \\brief Test for [containers.concurrent_unordered_map containers.concurrent_unordered_multimap] specifications\n\ntemplate <typename... Args>\nstruct AllowMultimapping<oneapi::tbb::concurrent_unordered_multimap<Args...>> : std::true_type {};\n\ntemplate <typename Key, typename Mapped>\nusing Allocator = LocalCountingAllocator<std::allocator<std::pair<const Key, Mapped>>>;\n\nusing map_type = oneapi::tbb::concurrent_unordered_map<int, int, std::hash<int>, std::equal_to<int>, Allocator<int, int>>;\nusing multimap_type = oneapi::tbb::concurrent_unordered_multimap<int, int, std::hash<int>, std::equal_to<int>, Allocator<int, int>>;\n\ntemplate <>\nstruct SpecialTests<map_type> {\n    static void Test() {\n        SpecialMapTests<map_type>();\n    }\n};\n\ntemplate <>\nstruct SpecialTests<multimap_type> {\n    static void Test() {\n        SpecialMultiMapTests<multimap_type>();\n    }\n};\n\ntemplate <template <typename... > class ContainerType>\nvoid test_member_types() {\n    using default_container_type = ContainerType<int, int>;\n    static_assert(std::is_same<typename default_container_type::hasher, std::hash<int>>::value,\n                  \"Incorrect default template hasher\");\n    static_assert(std::is_same<typename default_container_type::key_equal, std::equal_to<int>>::value,\n                  \"Incorrect default template key equality\");\n    static_assert(std::is_same<typename default_container_type::allocator_type,\n                               oneapi::tbb::tbb_allocator<std::pair<const int, int>>>::value,\n                  \"Incorrect default template allocator\");\n\n    auto test_hasher = [](const int&)->std::size_t { return 0; };\n    auto test_equality = [](const int&, const int&)->bool { return true; };\n    using test_allocator_type = std::allocator<std::pair<const int, int>>;\n\n    using container_type = ContainerType<int, int, decltype(test_hasher),\n                                         decltype(test_equality), test_allocator_type>;\n\n    static_assert(std::is_same<typename container_type::key_type, int>::value,\n                  \"Incorrect container key_type member type\");\n    static_assert(std::is_same<typename container_type::mapped_type, int>::value,\n                  \"Incorrect container mapped_type member type\");\n    static_assert(std::is_same<typename container_type::value_type, std::pair<const int, int>>::value,\n                  \"Incorrect container value_type member type\");\n\n    static_assert(std::is_unsigned<typename container_type::size_type>::value,\n                  \"Incorrect container size_type member type\");\n    static_assert(std::is_signed<typename container_type::difference_type>::value,\n                  \"Incorrect container difference_type member type\");\n\n    static_assert(std::is_same<typename container_type::hasher, decltype(test_hasher)>::value,\n                  \"Incorrect container hasher member type\");\n    static_assert(std::is_same<typename container_type::key_equal, decltype(test_equality)>::value,\n                  \"Incorrect container key_equal member type\");\n\n    using transparent_container_type = ContainerType<int, int, hasher_with_transparent_key_equal,\n                                                     std::equal_to<int>, test_allocator_type>;\n\n    static_assert(std::is_same<typename transparent_container_type::key_equal, transparent_key_equality>::value,\n                  \"Incorrect container key_equal member type\");\n    static_assert(std::is_same<typename container_type::allocator_type, test_allocator_type>::value,\n                  \"Incorrect container allocator_type member type\");\n\n    using value_type = typename container_type::value_type;\n    static_assert(std::is_same<typename container_type::reference, value_type&>::value,\n                  \"Incorrect container reference member type\");\n    static_assert(std::is_same<typename container_type::const_reference, const value_type&>::value,\n                  \"Incorrect container const_reference member type\");\n    using allocator_type = typename container_type::allocator_type;\n    static_assert(std::is_same<typename container_type::pointer, typename std::allocator_traits<allocator_type>::pointer>::value,\n                  \"Incorrect container pointer member type\");\n    static_assert(std::is_same<typename container_type::const_pointer, typename std::allocator_traits<allocator_type>::const_pointer>::value,\n                  \"Incorrect container const_pointer member type\");\n\n    static_assert(utils::is_forward_iterator<typename container_type::iterator>::value,\n                  \"Incorrect container iterator member type\");\n    static_assert(!std::is_const<typename container_type::iterator::value_type>::value,\n                  \"Incorrect container iterator member type\");\n    static_assert(utils::is_forward_iterator<typename container_type::const_iterator>::value,\n                  \"Incorrect container const_iterator member type\");\n    static_assert(std::is_const<typename container_type::const_iterator::value_type>::value,\n                  \"Incorrect container iterator member type\");\n    static_assert(utils::is_forward_iterator<typename container_type::local_iterator>::value,\n                  \"Incorrect container local_iterator member type\");\n    static_assert(!std::is_const<typename container_type::local_iterator::value_type>::value,\n                  \"Incorrect container local_iterator member type\");\n    static_assert(utils::is_forward_iterator<typename container_type::const_local_iterator>::value,\n                  \"Incorrect container const_local_iterator member type\");\n    static_assert(std::is_const<typename container_type::const_local_iterator::value_type>::value,\n                  \"Incorrect container const_local_iterator member type\");\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\ntemplate <template <typename...> typename TMap>\nvoid test_deduction_guides() {\n    using ComplexType = std::pair<int, std::string>;\n    using ComplexTypeConst = std::pair<const int, std::string>;\n    std::vector<ComplexType> v;\n    auto l = { ComplexTypeConst(1, \"one\"), ComplexTypeConst(2, \"two\")};\n    using custom_allocator_type = std::allocator<ComplexTypeConst>;\n\n    // check TMap(InputIterator, InputIterator)\n    TMap m0(v.begin(), v.end());\n    static_assert(std::is_same<decltype(m0), TMap<int, std::string>>::value);\n\n    // check TMap(InputIterator, InputIterator, size_t)\n    TMap m1(v.begin(), v.end(), 1);\n    static_assert(std::is_same<decltype(m1), TMap<int, std::string>>::value);\n\n    // check TMap(InputIterator, InputIterator, size_t, Hasher)\n    TMap m2(v.begin(), v.end(), 4, degenerate_hash<int>());\n    static_assert(std::is_same<decltype(m2), TMap<int, std::string, degenerate_hash<int>>>::value);\n\n    // check TMap(InputIterator, InputIterator, size_t, Hasher, Equality)\n    TMap m3(v.begin(), v.end(), 4, degenerate_hash<int>(), std::less<int>());\n    static_assert(std::is_same<decltype(m3), TMap<int, std::string, degenerate_hash<int>, std::less<int>>>::value);\n\n    // check TMap(InputIterator, InputIterator, size_t, Hasher, Equality, Allocator)\n    TMap m4(v.begin(), v.end(), 4, degenerate_hash<int>(), std::less<int>(), custom_allocator_type{});\n    static_assert(std::is_same<decltype(m4), TMap<int, std::string, degenerate_hash<int>,\n        std::less<int>, custom_allocator_type>>::value);\n\n    // check TMap(InputIterator, InputIterator, size_t, Allocator)\n    TMap m5(v.begin(), v.end(), 5, custom_allocator_type{});\n    static_assert(std::is_same<decltype(m5), TMap<int, std::string, std::hash<int>,\n        std::equal_to<int>, custom_allocator_type>>::value);\n\n    // check TMap(InputIterator, InputIterator, size_t, Hasher, Allocator)\n    TMap m6(v.begin(), v.end(), 4, degenerate_hash<int>(), custom_allocator_type{});\n    static_assert(std::is_same<decltype(m6), TMap<int, std::string, degenerate_hash<int>,\n        std::equal_to<int>, custom_allocator_type>>::value);\n\n    // check TMap(std::initializer_list)\n    TMap m7(l);\n    static_assert(std::is_same<decltype(m7), TMap<int, std::string>>::value);\n\n    // check TMap(std::initializer_list, size_t)\n    TMap m8(l, 1);\n    static_assert(std::is_same<decltype(m8), TMap<int, std::string>>::value);\n\n    // check TMap(std::initializer_list, size_t, Hasher)\n    TMap m9(l, 4, degenerate_hash<int>());\n    static_assert(std::is_same<decltype(m9), TMap<int, std::string, degenerate_hash<int>>>::value);\n\n    // check TMap(std::initializer_list, size_t, Hasher, Equality)\n    TMap m10(l, 4, degenerate_hash<int>(), std::less<int>());\n    static_assert(std::is_same<decltype(m10), TMap<int, std::string, degenerate_hash<int>, std::less<int>>>::value);\n\n    // check TMap(std::initializer_list, size_t, Hasher, Equality, Allocator)\n    TMap m11(l, 4, degenerate_hash<int>(), std::less<int>(), custom_allocator_type{});\n    static_assert(std::is_same<decltype(m11), TMap<int, std::string, degenerate_hash<int>,\n        std::less<int>, custom_allocator_type>>::value);\n\n    // check TMap(std::initializer_list, size_t, Allocator)\n    TMap m12(l, 4, custom_allocator_type{});\n    static_assert(std::is_same<decltype(m12), TMap<int, std::string, std::hash<int>,\n        std::equal_to<int>, custom_allocator_type>>::value);\n\n    // check TMap(std::initializer_list, size_t, Hasher, Allocator)\n    TMap m13(l, 4, degenerate_hash<int>(), custom_allocator_type{});\n    static_assert(std::is_same<decltype(m13), TMap<int, std::string, degenerate_hash<int>,\n        std::equal_to<int>, custom_allocator_type>>::value);\n\n    // check TMap(TMap &)\n    TMap m14(m1);\n    static_assert(std::is_same<decltype(m14), decltype(m1)>::value);\n\n    // check TMap(TMap &, Allocator)\n    // TODO: investigate why no implicit deduction guides generated for this ctor\n    TMap m15(m5, custom_allocator_type{});\n    static_assert(std::is_same<decltype(m15), decltype(m5)>::value);\n\n    // check TMap(TMap &&)\n    TMap m16(std::move(m1));\n    static_assert(std::is_same<decltype(m16), decltype(m1)>::value);\n\n    // check TMap(TMap &&, Allocator)\n    // TODO: investigate why no implicit deduction guides generated for this ctor\n    TMap m17(std::move(m5), custom_allocator_type{});\n    static_assert(std::is_same<decltype(m17), decltype(m5)>::value);\n}\n#endif\n\nvoid test_heterogeneous_functions() {\n    check_heterogeneous_functions_key_int<oneapi::tbb::concurrent_unordered_map, int, int>();\n    check_heterogeneous_functions_key_int<oneapi::tbb::concurrent_unordered_multimap, int, int>();\n    check_heterogeneous_functions_key_string<oneapi::tbb::concurrent_unordered_map, std::string, std::string>();\n    check_heterogeneous_functions_key_string<oneapi::tbb::concurrent_unordered_multimap, std::string, std::string>();\n}\n\nstruct CumapTraits : UnorderedMoveTraitsBase {\n    template <typename T, typename Allocator>\n    using container_type = oneapi::tbb::concurrent_unordered_map<T, T, std::hash<T>, std::equal_to<T>, Allocator>;\n\n    template <typename T>\n    using container_value_type = std::pair<const T, T>;\n\n    using init_iterator_type = move_support_tests::FooPairIterator;\n}; // struct CumapTraits\n\nstruct CumultimapTraits : UnorderedMoveTraitsBase {\n    template <typename T, typename Allocator>\n    using container_type = oneapi::tbb::concurrent_unordered_multimap<T, T, std::hash<T>, std::equal_to<T>, Allocator>;\n\n    template <typename T>\n    using container_value_type = std::pair<const T, T>;\n\n    using init_iterator_type = move_support_tests::FooPairIterator;\n}; // struct CumultimapTraits\n\n//! Testing concurrent_unordered_map member types\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_unordered_map member types\") {\n    test_member_types<oneapi::tbb::concurrent_unordered_map>();\n}\n\n//! Testing requirements of concurrent_unordered_map\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_unordered_map requirements\") {\n    test_basic<map_type>();\n}\n\n//! Testing multithreading support in concurrent_unordered_map\n//! \\brief \\ref requirement\nTEST_CASE(\"concurrent_unordered_map multithreading support\") {\n    test_concurrent<map_type>();\n}\n\n//! Testing move constructors and assignment operator in concurrent_unordered_map\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_unordered_map move semantics support\") {\n    test_rvalue_ref_support<CumapTraits>();\n}\n\n//! Testing std::initializer_list constructors and modifiers in concurrent_unordered_map\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"std::initializer_list support in concurrent_unordered_map\") {\n    test_initializer_list_support<map_type>({{1, 1}, {2, 2}, {3, 3}, {4, 4}});\n}\n\n//! Testing node handling in concurrent_unordered_map\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"node handling support in concurrent_unordered_map\") {\n    node_handling_tests::test_node_handling_support<map_type>();\n}\n\n//! Testing std::allocator_traits support in concurrent_unordered_map\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"std::allocator_traits support in concurrent_unordered_map\") {\n    test_allocator_traits_support<CumapTraits>();\n}\n\n//! Testing heterogeneous overloads in concurrent_unordered_map\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"heterogeneous overloads in concurrent_unordered_map\") {\n    check_heterogeneous_functions_key_int<oneapi::tbb::concurrent_unordered_map, int, int>();\n    check_heterogeneous_functions_key_string<oneapi::tbb::concurrent_unordered_map, std::string, std::string>();\n}\n\n//! Testing insert overloads with generic pair in concurrent_unordered_map\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"insertion by generic pair in concurrent_unordered_map\") {\n    test_insert_by_generic_pair<oneapi::tbb::concurrent_unordered_map>();\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Testing Class Template Argument Deduction in concurrent_unordered_map\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"CTAD support in concurrent_unordered_map\") {\n    test_deduction_guides<oneapi::tbb::concurrent_unordered_map>();\n}\n#endif\n\n//! Testing comparisons in concurrent_unordered_map\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_unordered_map comparisons\") {\n    test_map_comparisons<oneapi::tbb::concurrent_unordered_map>();\n}\n\n//! Testing concurrent_unordered_multimap member types\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_unordered_multimap member types\") {\n    test_member_types<oneapi::tbb::concurrent_unordered_multimap>();\n}\n\n//! Testing requirements of concurrent_unordered_multimap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_unordered_multimap requirements\") {\n    test_basic<multimap_type>();\n}\n\n//! Testing multithreading support in concurrent_unordered_multimap\n//! \\brief \\ref requirement\nTEST_CASE(\"concurrent_unordered_multimap multithreading support\") {\n    test_concurrent<multimap_type>();\n}\n\n//! Testing move constructors and assignment operator in concurrent_unordered_multimap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_unordered_multimap move semantics support\") {\n    test_rvalue_ref_support<CumultimapTraits>();\n}\n\n//! Testing std::initializer_list constructors and modifiers in concurrent_unordered_multimap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"std::initializer_list support in concurrent_unordered_multimap\") {\n    test_initializer_list_support<multimap_type>({{1, 1}, {2, 2}, {3, 3}, {4, 4}, {4, 40}});\n}\n\n//! Testing node handling support in concurrent_unordered_multimap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"node handling support in concurrent_unordered_multimap\") {\n    node_handling_tests::test_node_handling_support<multimap_type>();\n}\n\n//! Testing std::allocator_traits support in concurrent_unordered_multimap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"std::allocator_traits support in concurrent_unordered_multimap\") {\n    test_allocator_traits_support<CumultimapTraits>();\n}\n\n//! Testing heterogeneous overloads in concurrent_unordered_multimap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"heterogeneous overloads in concurrent_unordered_multimap\") {\n    check_heterogeneous_functions_key_int<oneapi::tbb::concurrent_unordered_multimap, int, int>();\n    check_heterogeneous_functions_key_string<oneapi::tbb::concurrent_unordered_multimap, std::string, std::string>();\n}\n\n//! Testing insert overloads with generic pair in concurrent_unordered_multimap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"insertion by generic pair in concurrent_unordered_multimap\") {\n    test_insert_by_generic_pair<oneapi::tbb::concurrent_unordered_multimap>();\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Testing Class Template Argument Deduction in concurrent_unordered_multimap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"CTAD support in concurrent_unordered_multimap\") {\n    test_deduction_guides<oneapi::tbb::concurrent_unordered_multimap>();\n}\n#endif\n\n//! Testing comparisons in concurrent_unordered_multimap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_unordered_multimap comparisons\") {\n    test_map_comparisons<oneapi::tbb::concurrent_unordered_multimap>();\n}\n\n//! Testing of merge operations in concurrent_unordered_map and concurrent_unordered_multimap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"merge operations\") {\n    node_handling_tests::test_merge<map_type, multimap_type>(1000);\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_concurrent_unordered_set.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n\n#include \"oneapi/tbb/concurrent_unordered_set.h\"\n#include <common/test.h>\n#include <common/utils.h>\n#include <common/concurrent_unordered_common.h>\n#include <memory>\n#include <type_traits>\n\n//! \\file conformance_concurrent_unordered_set.cpp\n//! \\brief Test for [containers.concurrent_unordered_set containers.concurrent_unordered_multiset] specifications\n\ntemplate <typename... Args>\nstruct AllowMultimapping<oneapi::tbb::concurrent_unordered_multiset<Args...>> : std::true_type {};\n\ntemplate <typename Key>\nusing Allocator = LocalCountingAllocator<std::allocator<Key>>;\n\nusing set_type = oneapi::tbb::concurrent_unordered_set<int, std::hash<int>, std::equal_to<int>, Allocator<int>>;\nusing multiset_type = oneapi::tbb::concurrent_unordered_multiset<int, std::hash<int>, std::equal_to<int>, Allocator<int>>;\n\ntemplate <template <typename...> class ContainerType>\nvoid test_member_types() {\n    using default_container_type = ContainerType<int>;\n    static_assert(std::is_same<typename default_container_type::hasher, std::hash<int>>::value,\n                  \"Incorrect default template hasher\");\n    static_assert(std::is_same<typename default_container_type::key_equal, std::equal_to<int>>::value,\n                  \"Incorrect default template key equality\");\n    static_assert(std::is_same<typename default_container_type::allocator_type, oneapi::tbb::tbb_allocator<int>>::value,\n                  \"Incorrect default template allocator\");\n\n    auto test_hasher = [](const int&)->std::size_t { return 0; };\n    auto test_equality = [](const int&, const int&)->bool { return true; };\n    using test_allocator_type = std::allocator<int>;\n\n    using container_type = ContainerType<int, decltype(test_hasher), decltype(test_equality), test_allocator_type>;\n\n    static_assert(std::is_same<typename container_type::key_type, int>::value,\n                  \"Incorrect container key_type member type\");\n    static_assert(std::is_same<typename container_type::value_type, int>::value,\n                  \"Incorrect container value_type member type\");\n\n    static_assert(std::is_unsigned<typename container_type::size_type>::value,\n                  \"Incorrect container size_type member type\");\n    static_assert(std::is_signed<typename container_type::difference_type>::value,\n                  \"Incorrect container difference_type member type\");\n\n    static_assert(std::is_same<typename container_type::hasher, decltype(test_hasher)>::value,\n                  \"Incorrect container hasher member type\");\n    static_assert(std::is_same<typename container_type::key_equal, decltype(test_equality)>::value,\n                  \"Incorrect container key_equal member type\");\n\n    using transparent_container_type = ContainerType<int, hasher_with_transparent_key_equal,\n                                                     std::equal_to<int>, test_allocator_type>;\n\n    static_assert(std::is_same<typename transparent_container_type::key_equal, transparent_key_equality>::value,\n                  \"Incorrect container key_equal member type\");\n    static_assert(std::is_same<typename container_type::allocator_type, test_allocator_type>::value,\n                  \"Incorrect container allocator_type member type\");\n\n    using value_type = typename container_type::value_type;\n    static_assert(std::is_same<typename container_type::reference, value_type&>::value,\n                  \"Incorrect container reference member type\");\n    static_assert(std::is_same<typename container_type::const_reference, const value_type&>::value,\n                  \"Incorrect container const_reference member type\");\n    using allocator_type = typename container_type::allocator_type;\n    static_assert(std::is_same<typename container_type::pointer, typename std::allocator_traits<allocator_type>::pointer>::value,\n                  \"Incorrect container pointer member type\");\n    static_assert(std::is_same<typename container_type::const_pointer, typename std::allocator_traits<allocator_type>::const_pointer>::value,\n                  \"Incorrect container const_pointer member type\");\n\n    static_assert(utils::is_forward_iterator<typename container_type::iterator>::value,\n                  \"Incorrect container iterator member type\");\n    static_assert(!std::is_const<typename container_type::iterator::value_type>::value,\n                  \"Incorrect container iterator member type\");\n    static_assert(utils::is_forward_iterator<typename container_type::const_iterator>::value,\n                  \"Incorrect container const_iterator member type\");\n    static_assert(std::is_const<typename container_type::const_iterator::value_type>::value,\n                  \"Incorrect container iterator member type\");\n    static_assert(utils::is_forward_iterator<typename container_type::local_iterator>::value,\n                  \"Incorrect container local_iterator member type\");\n    static_assert(!std::is_const<typename container_type::local_iterator::value_type>::value,\n                  \"Incorrect container local_iterator member type\");\n    static_assert(utils::is_forward_iterator<typename container_type::const_local_iterator>::value,\n                  \"Incorrect container const_local_iterator member type\");\n    static_assert(std::is_const<typename container_type::const_local_iterator::value_type>::value,\n                  \"Incorrect container const_local_iterator member type\");\n}\n\nstruct CusetTraits : UnorderedMoveTraitsBase {\n    template <typename T, typename Allocator>\n    using container_type = oneapi::tbb::concurrent_unordered_set<T, std::hash<T>, std::equal_to<T>, Allocator>;\n\n    template <typename T>\n    using container_value_type = T;\n\n    using init_iterator_type = move_support_tests::FooIterator;\n}; // struct CusetTraits\n\nstruct CumultisetTraits : UnorderedMoveTraitsBase {\n    template <typename T, typename Allocator>\n    using container_type = oneapi::tbb::concurrent_unordered_multiset<T, std::hash<T>, std::equal_to<T>, Allocator>;\n\n    template <typename T>\n    using container_value_type = T;\n\n    using init_iterator_type = move_support_tests::FooIterator;\n}; // struct CumultisetTraits\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\ntemplate <template <typename ...> typename TSet>\nvoid test_deduction_guides() {\n    using ComplexType = const std::string *;\n    std::vector<ComplexType> v;\n    std::string s = \"s\";\n    auto l = { ComplexType(&s), ComplexType(&s)};\n    using custom_allocator_type = std::allocator<ComplexType>;\n\n    // check TSet(InputIterator,InputIterator)\n    TSet s1(v.begin(), v.end());\n    static_assert(std::is_same<decltype(s1), TSet<ComplexType>>::value);\n\n    // check TSet(InputIterator,InputIterator, size_t, Hasher)\n    TSet s2(v.begin(), v.end(), 5, degenerate_hash<ComplexType>());\n    static_assert(std::is_same<decltype(s2), TSet<ComplexType, degenerate_hash<ComplexType>>>::value);\n\n    // check TSet(InputIterator,InputIterator, size_t, Hasher, Equality)\n    TSet s3(v.begin(), v.end(), 5, degenerate_hash<ComplexType>(), std::less<ComplexType>());\n    static_assert(std::is_same<decltype(s3), TSet<ComplexType, degenerate_hash<ComplexType>,\n        std::less<ComplexType>>>::value);\n\n    // check TSet(InputIterator,InputIterator, size_t, Hasher, Equality, Allocator)\n    TSet s4(v.begin(), v.end(), 5, degenerate_hash<ComplexType>(), std::less<ComplexType>(),\n            custom_allocator_type{});\n    static_assert(std::is_same<decltype(s4), TSet<ComplexType, degenerate_hash<ComplexType>,\n        std::less<ComplexType>, custom_allocator_type>>::value);\n\n    // check TSet(InputIterator,InputIterator, size_t, Allocator)\n    TSet s5(v.begin(), v.end(), 5, custom_allocator_type{});\n    static_assert(std::is_same<decltype(s5), TSet<ComplexType, std::hash<ComplexType>,\n        std::equal_to<ComplexType>, custom_allocator_type>>::value);\n\n    // check TSet(InputIterator,InputIterator, size_t, Hasher, Allocator)\n    TSet s6(v.begin(), v.end(), 5, degenerate_hash<ComplexType>(), custom_allocator_type{});\n    static_assert(std::is_same<decltype(s6), TSet<ComplexType, degenerate_hash<ComplexType>,\n        std::equal_to<ComplexType>, custom_allocator_type>>::value);\n\n    // check TSet(std::initializer_list)\n    TSet s7(l);\n    static_assert(std::is_same<decltype(s7), TSet<ComplexType>>::value);\n\n    // check TSet(std::initializer_list, size_t, Hasher)\n    TSet s8(l, 5, degenerate_hash<ComplexType>());\n    static_assert(std::is_same<decltype(s8), TSet<ComplexType, degenerate_hash<ComplexType>>>::value);\n\n    // check TSet(std::initializer_list, size_t, Hasher, Equality)\n    TSet s9(l, 5, degenerate_hash<ComplexType>(), std::less<ComplexType>());\n    static_assert(std::is_same<decltype(s9), TSet<ComplexType, degenerate_hash<ComplexType>,\n        std::less<ComplexType>>>::value);\n\n    // check TSet(std::initializer_list, size_t, Hasher, Equality, Allocator)\n    TSet s10(l, 5, degenerate_hash<ComplexType>(), std::less<ComplexType>(), custom_allocator_type{});\n    static_assert(std::is_same<decltype(s10), TSet<ComplexType, degenerate_hash<ComplexType>,\n        std::less<ComplexType>, custom_allocator_type>>::value);\n\n    // check TSet(std::initializer_list, size_t, Allocator)\n    TSet s11(l, 5, custom_allocator_type{});\n    static_assert(std::is_same<decltype(s11), TSet<ComplexType, std::hash<ComplexType>,\n        std::equal_to<ComplexType>, custom_allocator_type>>::value);\n\n    // check TSet(std::initializer_list, size_t, Hasher, Allocator)\n    TSet s12(l, 5, std::hash<ComplexType>(), custom_allocator_type{});\n    static_assert(std::is_same<decltype(s12), TSet<ComplexType, std::hash<ComplexType>,\n        std::equal_to<ComplexType>, custom_allocator_type>>::value);\n\n    // check TSet(TSet &)\n    TSet s13(s1);\n    static_assert(std::is_same<decltype(s13), decltype(s1)>::value);\n\n    // check TSet(TSet &, Allocator)\n    TSet s14(s5, custom_allocator_type{});\n    // TODO: investigate why no implicit deduction guides generated for this ctor\n    static_assert(std::is_same<decltype(s14), decltype(s5)>::value);\n\n    // check TSet(TSet &&)\n    TSet s15(std::move(s1));\n    static_assert(std::is_same<decltype(s15), decltype(s1)>::value);\n\n    // check TSet(TSet &&, Allocator)\n    TSet s16(std::move(s5), custom_allocator_type{});\n    // TODO: investigate why no implicit deduction guides generated for this ctor\n    static_assert(std::is_same<decltype(s16), decltype(s5)>::value);\n}\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\n//! Testing concurrent_unordered_set member types\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_unordered_set member types\") {\n    test_member_types<oneapi::tbb::concurrent_unordered_set>();\n}\n\n//! Testing requirements of concurrent_unordered_set\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_unordered_set requirements\") {\n    test_basic<set_type>();\n}\n\n//! Testing multithreading support in concurrent_unordered_set\n//! \\brief \\ref requirement\nTEST_CASE(\"concurrent_unordered_set multithreading support\") {\n    test_concurrent<set_type>();\n}\n\n//! Testing move constructors and assignment operator in concurrent_unordered_set\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_unordered_set move semantics support\") {\n    test_rvalue_ref_support<CusetTraits>();\n}\n\n//! Testing std::initializer_list constructors and modifiers in concurrent_unordered_set\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"std::initializer_list support in concurrent_unordered_set\") {\n    test_initializer_list_support<set_type>({1, 2, 3, 4, 5});\n}\n\n//! Testing node handling in concurrent_unordered_set\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"node handling support in concurrent_unordered_set\") {\n    node_handling_tests::test_node_handling_support<set_type>();\n}\n\n//! Testing std::allocator_traits support in concurrent_unordered_set\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"std::allocator_traits support in concurrent_unordered_set\") {\n    test_allocator_traits_support<CusetTraits>();\n}\n\n//! Testing heterogeneous overloads in concurrent_unordered_set\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"heterogeneous overloads in concurrent_unordered_set\") {\n    check_heterogeneous_functions_key_int<oneapi::tbb::concurrent_unordered_set, int>();\n    check_heterogeneous_functions_key_string<oneapi::tbb::concurrent_unordered_set, std::string>();\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Testing Class Template Argument Deduction in concurrent_unordered_set\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"CTAD support in concurrent_unordered_set\") {\n    test_deduction_guides<oneapi::tbb::concurrent_unordered_set>();\n}\n#endif\n\n//! Testing comparisons in concurrent_unordered_set\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_unordered_set comparisons\") {\n    test_set_comparisons<oneapi::tbb::concurrent_unordered_set>();\n}\n\n//! Testing concurrent_unordered_multiset member types\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_unordered_multiset member types\") {\n    test_member_types<oneapi::tbb::concurrent_unordered_multiset>();\n}\n\n//! Testing requirements of concurrent_unordered_multiset\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_unordered_multiset requirements\") {\n    test_basic<multiset_type>();\n}\n\n//! Testing move constructors and assignment operator in concurrent_unordered_multiset\n//! \\brief \\ref requirement\nTEST_CASE(\"concurrent_unordered_multiset multithreading support\") {\n    test_concurrent<multiset_type>();\n}\n\n//! Testing move constructors and assignment operator in concurrent_unordered_multiset\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_unordered_multiset move semantics support\") {\n    test_rvalue_ref_support<CumultisetTraits>();\n}\n\n//! Testing std::initializer_list constructors and modifiers in concurrent_unordered_multiset\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"std::initializer_list support in concurrent_unordered_multiset\") {\n    test_initializer_list_support<multiset_type>({1, 2, 3, 4, 5, 5});\n}\n\n//! Testing node handling support in concurrent_unordered_multiset\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"node handling support in concurrent_unordered_multiset\") {\n    node_handling_tests::test_node_handling_support<multiset_type>();\n}\n\n//! Testing std::allocator_traits support in concurrent_unordered_multiset\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"std::allocator_traits support in concurrent_unordered_multiset\") {\n    test_allocator_traits_support<CumultisetTraits>();\n}\n\n//! Testing heterogeneous overloads in concurrent_unordered_multiset\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"heterogeneous overloads in concurrent_unordered_multiset\") {\n    check_heterogeneous_functions_key_int<oneapi::tbb::concurrent_unordered_multiset, int>();\n    check_heterogeneous_functions_key_string<oneapi::tbb::concurrent_unordered_multiset, std::string>();\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Testing Class Template Argument Deduction in concurrent_unordered_multiset\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"CTAD support in concurrent_unordered_multiset\") {\n    test_deduction_guides<oneapi::tbb::concurrent_unordered_multiset>();\n}\n#endif\n\n//! Testing comparisons in concurrent_unordered_multiset\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_unordered_multiset comparisons\") {\n    test_set_comparisons<oneapi::tbb::concurrent_unordered_multiset>();\n}\n\n//! Testing of merge operation in concurrent_unordered_set and concurrent_unordered_multiset\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"merge operations\") {\n    node_handling_tests::test_merge<set_type, multiset_type>(1000);\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_concurrent_vector.cpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_report.h\"\n#include \"common/state_trackable.h\"\n#include \"common/container_move_support.h\"\n#include \"common/custom_allocators.h\"\n#include \"common/initializer_list_support.h\"\n#include \"common/containers_common.h\"\n#define __TBB_TEST_CPP20_COMPARISONS __TBB_CPP20_COMPARISONS_PRESENT && __TBB_CPP20_CONCEPTS_PRESENT\n#include \"common/test_comparisons.h\"\n#include \"oneapi/tbb/concurrent_vector.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/tick_count.h\"\n#include \"oneapi/tbb/global_control.h\"\n#include <initializer_list>\n#include <numeric>\n\n//! \\file conformance_concurrent_vector.cpp\n//! \\brief Test for [containers.concurrent_vector] specification\n\nconst size_t N = 8192;\n\ntemplate<typename Vector, typename Iterator>\nvoid CheckConstIterator( const Vector& u, int i, const Iterator& cp ) {\n    typename Vector::const_reference pref = *cp;\n    CHECK((pref.bar()==i));\n    typename Vector::difference_type delta = cp-u.begin();\n    REQUIRE( delta==i );\n    CHECK((u[i].bar()==i));\n    REQUIRE( u.begin()[i].bar()==i );\n}\n\ntemplate<typename Iterator1, typename Iterator2, typename V>\nvoid CheckIteratorComparison( V& u ) {\n    V u2 = u;\n    Iterator1 i = u.begin();\n\n    for( int i_count=0; i_count<100; ++i_count ) {\n        Iterator2 j = u.begin();\n        Iterator2 i2 = u2.begin();\n        for( int j_count=0; j_count<100; ++j_count ) {\n            REQUIRE( ((i==j)==(i_count==j_count)) );\n            REQUIRE( ((i!=j)==(i_count!=j_count)) );\n            REQUIRE( ((i-j)==(i_count-j_count)) );\n            REQUIRE( ((i<j)==(i_count<j_count)) );\n            REQUIRE( ((i>j)==(i_count>j_count)) );\n            REQUIRE( ((i<=j)==(i_count<=j_count)) );\n            REQUIRE( ((i>=j)==(i_count>=j_count)) );\n            REQUIRE( (!(i==i2)) );\n            REQUIRE( i!=i2 );\n            ++j;\n            ++i2;\n        }\n        ++i;\n    }\n}\n\ntemplate<typename Iterator1, typename Iterator2>\nvoid TestIteratorAssignment( Iterator2 j ) {\n    Iterator1 i(j);\n    REQUIRE( i==j );\n    REQUIRE( !(i!=j) );\n    Iterator1 k;\n    k = j;\n    REQUIRE( k==j );\n    REQUIRE( !(k!=j) );\n}\n\ntemplate<typename Range1, typename Range2>\nvoid TestRangeAssignment( Range2 r2 ) {\n    Range1 r1(r2); r1 = r2;\n}\n\ntemplate<typename T>\nvoid TestSequentialFor() {\n    using V = oneapi::tbb::concurrent_vector<move_support_tests::FooWithAssign>;\n    V v(N);\n    REQUIRE(v.grow_by(0) == v.grow_by(0, move_support_tests::FooWithAssign()));\n\n    // Check iterator\n    typename V::iterator p = v.begin();\n    REQUIRE( !(*p).is_const() );\n    REQUIRE( !p->is_const() );\n    for( int i=0; std::size_t(i)<v.size(); ++i, ++p ) {\n        CHECK( ((*p).state==move_support_tests::Foo::DefaultInitialized) );\n        typename V::reference pref = *p;\n        pref.bar() = i;\n        typename V::difference_type delta = p-v.begin();\n        REQUIRE( delta==i );\n        REQUIRE_MESSAGE( (-delta<=0), \"difference type not signed?\" );\n    }\n\n    // Check const_iterator going forwards\n    const V& u = v;\n    typename V::const_iterator cp = u.begin();\n    REQUIRE( cp == v.cbegin() );\n    REQUIRE( (*cp).is_const() );\n    REQUIRE( (cp->is_const()) );\n    REQUIRE( (*cp == v.front()) );\n    for( int i=0; std::size_t(i)<u.size(); ++i ) {\n        CheckConstIterator(u,i,cp);\n        V::const_iterator &cpr = ++cp;\n        REQUIRE_MESSAGE( (&cpr == &cp), \"pre-increment not returning a reference?\");\n    }\n\n    // Now go backwards\n    cp = u.end();\n    REQUIRE( cp == v.cend() );\n    for( int i=int(u.size()); i>0; ) {\n        --i;\n        V::const_iterator &cpr = --cp;\n        REQUIRE_MESSAGE( &cpr == &cp, \"pre-decrement not returning a reference?\");\n        if( i>0 ) {\n            typename V::const_iterator cp_old = cp--;\n            intptr_t here = (*cp_old).bar();\n            REQUIRE( here==u[i].bar() );\n            typename V::const_iterator cp_new = cp++;\n            intptr_t prev = (*cp_new).bar();\n            REQUIRE( prev==u[i-1].bar() );\n        }\n        CheckConstIterator(u,i,cp);\n    }\n\n    // Now go forwards and backwards\n    std::ptrdiff_t k = 0;\n    cp = u.begin();\n    for( std::size_t i=0; i<u.size(); ++i ) {\n        CheckConstIterator(u,int(k),cp);\n        typename V::difference_type delta = i*3 % u.size();\n        if( 0<=k+delta && std::size_t(k+delta)<u.size() ) {\n            V::const_iterator &cpr = (cp += delta);\n            REQUIRE_MESSAGE( (&cpr == &cp), \"+= not returning a reference?\");\n            k += delta;\n        }\n        delta = i*7 % u.size();\n        if( 0<=k-delta && std::size_t(k-delta)<u.size() ) {\n            if( i&1 ) {\n                V::const_iterator &cpr = (cp -= delta);\n                REQUIRE_MESSAGE( (&cpr == &cp), \"-= not returning a reference?\");\n            } else\n                cp = cp - delta;        // Test operator-\n            k -= delta;\n        }\n    }\n\n    for( int i=0; std::size_t(i)<u.size(); i=(i<50?i+1:i*3) )\n        for( int j=-i; std::size_t(i+j)<u.size(); j=(j<50?j+1:j*5) ) {\n            REQUIRE( ((u.begin()+i)[j].bar()==i+j) );\n            REQUIRE( ((v.begin()+i)[j].bar()==i+j) );\n            REQUIRE( ((v.cbegin()+i)[j].bar()==i+j) );\n            REQUIRE( ((i+u.begin())[j].bar()==i+j) );\n            REQUIRE( ((i+v.begin())[j].bar()==i+j) );\n            REQUIRE(((i+v.cbegin())[j].bar()==i+j) );\n        }\n\n    CheckIteratorComparison<typename V::iterator, typename V::iterator>(v);\n    CheckIteratorComparison<typename V::iterator, typename V::const_iterator>(v);\n    CheckIteratorComparison<typename V::const_iterator, typename V::iterator>(v);\n    CheckIteratorComparison<typename V::const_iterator, typename V::const_iterator>(v);\n\n    TestIteratorAssignment<typename V::const_iterator>( u.begin() );\n    TestIteratorAssignment<typename V::const_iterator>( v.begin() );\n    TestIteratorAssignment<typename V::const_iterator>( v.cbegin() );\n    TestIteratorAssignment<typename V::iterator>( v.begin() );\n    // doesn't compile as expected: TestIteratorAssignment<typename V::iterator>( u.begin() );\n\n    TestRangeAssignment<typename V::const_range_type>( u.range() );\n    TestRangeAssignment<typename V::const_range_type>( v.range() );\n    TestRangeAssignment<typename V::range_type>( v.range() );\n    // doesn't compile as expected: TestRangeAssignment<typename V::range_type>( u.range() );\n\n    // Check reverse_iterator\n    typename V::reverse_iterator rp = v.rbegin();\n    for( std::size_t i=v.size(); i>0; --i, ++rp ) {\n        typename V::reference pref = *rp;\n        REQUIRE( (std::size_t(pref.bar())==i-1) );\n        REQUIRE( (rp!=v.rend()) );\n    }\n    REQUIRE( rp==v.rend() );\n\n    // Check const_reverse_iterator\n    typename V::const_reverse_iterator crp = u.rbegin();\n    REQUIRE( crp == v.crbegin() );\n    REQUIRE( *crp == v.back() );\n    for(std::size_t i = v.size(); i>0; --i, ++crp) {\n        typename V::const_reference cpref = *crp;\n        REQUIRE( (std::size_t(cpref.bar())==i-1) );\n        REQUIRE( crp!=u.rend() );\n    }\n    REQUIRE( crp == u.rend() );\n    REQUIRE( crp == v.crend() );\n\n    TestIteratorAssignment<typename V::const_reverse_iterator>( u.rbegin() );\n    TestIteratorAssignment<typename V::reverse_iterator>( v.rbegin() );\n\n    {\n        oneapi::tbb::concurrent_vector<int> v1, v2(1ul, 100);\n        v1.assign(1, 100);\n        REQUIRE(v1 == v2);\n        REQUIRE_MESSAGE((v1.size() == 1 && v1[0] == 100), \"used integral iterators\");\n    }\n}\n\ninline void NextSize( int& s ) {\n    if( s<=32 ) ++s;\n    else s += s/10;\n}\n\n\ntemplate<typename T, std::size_t N>\ninline T* end( T(& array)[N]) {\n    return array + utils::array_length(array) ;\n}\n\ntemplate<typename vector_t>\nstatic void CheckVector( const vector_t& cv, std::size_t expected_size, std::size_t /*old_size*/ ) {\n    REQUIRE( cv.capacity()>=expected_size );\n    REQUIRE( cv.size()==expected_size );\n    REQUIRE( cv.empty()==(expected_size==0) );\n    for( int j=0; j<int(expected_size); ++j ) {\n        CHECK((cv[j].bar()==~j));\n    }\n}\n\nvoid TestResizeAndCopy() {\n    using allocator_t = StaticSharedCountingAllocator<std::allocator<move_support_tests::Foo>>;\n    using vector_t = oneapi::tbb::concurrent_vector<move_support_tests::Foo, allocator_t>;\n    allocator_t::init_counters();\n    for( int old_size=0; old_size<=0; NextSize( old_size ) ) {\n        for( int new_size=0; new_size<=8; NextSize( new_size ) ) {\n            std::size_t count = move_support_tests::foo_count;\n\n            vector_t v;\n            REQUIRE( count==move_support_tests::foo_count );\n            v.assign(old_size/2, move_support_tests::Foo() );\n            REQUIRE( ((count+old_size/2) == move_support_tests::foo_count) );\n            for( int j=0; j<old_size/2; ++j ){\n                REQUIRE( v[j].state == move_support_tests::Foo::CopyInitialized);\n            }\n\n            v.assign(move_support_tests::FooIterator(0), move_support_tests::FooIterator(old_size));\n            v.resize(new_size, move_support_tests::Foo(33) );\n            REQUIRE(count+new_size==move_support_tests::foo_count);\n            for( int j=0; j<new_size; ++j ) {\n                int expected = j<old_size ? j : 33;\n                CHECK((v[j].bar()==expected));\n            }\n            REQUIRE( v.size()==std::size_t(new_size) );\n            for( int j=0; j<new_size; ++j ) {\n                v[j].bar() = ~j;\n            }\n\n            const vector_t& cv = v;\n            // Try copy constructor\n            vector_t copy_of_v(cv);\n            CheckVector(cv,new_size,old_size);\n\n            REQUIRE( !(v != copy_of_v) );\n            v.clear();\n\n            REQUIRE( v.empty() );\n            swap(v, copy_of_v);\n            REQUIRE( copy_of_v.empty() );\n            CheckVector(v,new_size,old_size);\n        }\n    }\n    REQUIRE( allocator_t::items_constructed == allocator_t::items_destroyed );\n    REQUIRE( allocator_t::items_allocated == allocator_t::items_freed );\n    REQUIRE( allocator_t::allocations == allocator_t::frees );\n}\n\n\nvoid TestCopyAssignment() {\n    using allocator_t = StaticCountingAllocator<std::allocator<move_support_tests::FooWithAssign>>;\n    using vector_t = oneapi::tbb::concurrent_vector<move_support_tests::FooWithAssign, allocator_t>;\n    StaticCountingAllocator<std::allocator<move_support_tests::FooWithAssign>> init_alloc;\n    for( int dst_size=1; dst_size<=128; NextSize( dst_size ) ) {\n        for( int src_size=2; src_size<=128; NextSize( src_size ) ) {\n            vector_t u(move_support_tests::FooIterator(0), move_support_tests::FooIterator(src_size), init_alloc);\n            for( int i=0; i<src_size; ++i )\n                REQUIRE( u[i].bar()==i );\n            vector_t v(dst_size, move_support_tests::FooWithAssign(), init_alloc);\n            for( int i=0; i<dst_size; ++i ) {\n                REQUIRE( v[i].state==move_support_tests::Foo::CopyInitialized );\n                v[i].bar() = ~i;\n            }\n            REQUIRE( v != u );\n            v.swap(u);\n            CheckVector(u, dst_size, src_size);\n            u.swap(v);\n            // using assignment\n            v = u;\n            REQUIRE( v == u );\n            u.clear();\n            REQUIRE( u.size()==0 );\n            REQUIRE( v.size()==std::size_t(src_size) );\n            for( int i=0; i<src_size; ++i ){\n                REQUIRE( v[i].bar()==i );\n            }\n            u.shrink_to_fit(); // deallocate unused memory\n        }\n    }\n    REQUIRE( allocator_t::items_allocated == allocator_t::items_freed );\n    REQUIRE( allocator_t::allocations == allocator_t::frees );\n}\n\ntemplate<typename Vector, typename T>\nvoid TestGrowToAtLeastWithSourceParameter(T const& src){\n    static const std::size_t vector_size = 10;\n    Vector v1(vector_size,src);\n    Vector v2;\n    v2.grow_to_at_least(vector_size,src);\n    REQUIRE_MESSAGE(v1==v2,\"grow_to_at_least(vector_size,src) did not properly initialize new elements ?\");\n}\n\nvoid TestCapacity() {\n    using allocator_t = StaticCountingAllocator<std::allocator<move_support_tests::Foo> /*TODO: oneapi::tbb::cache_aligned_allocator*/>;\n    using vector_t = oneapi::tbb::concurrent_vector<move_support_tests::Foo, allocator_t>;\n    allocator_t::init_counters();\n    for( std::size_t old_size=0; old_size<=11000; old_size=(old_size<5 ? old_size+1 : 3*old_size) ) {\n        for( std::size_t new_size=0; new_size<=11000; new_size=(new_size<5 ? new_size+1 : 3*new_size) ) {\n            std::size_t count = move_support_tests::foo_count;\n            {\n                vector_t v; v.reserve(old_size);\n                REQUIRE( v.capacity()>=old_size );\n                v.reserve( new_size );\n                REQUIRE( v.capacity()>=old_size );\n                REQUIRE( v.capacity()>=new_size );\n                REQUIRE( v.empty() );\n                std::size_t fill_size = 2*new_size;\n                for (std::size_t i=0; i<fill_size; ++i) {\n                    REQUIRE( std::size_t(move_support_tests::foo_count)==count+i );\n                    std::size_t j = v.grow_by(1) - v.begin();\n                    REQUIRE( j==i );\n                    v[j].bar() = int(~j);\n                }\n                vector_t copy_of_v(v); // should allocate first segment with same size as for shrink_to_fit()\n                if(oneapi::tbb::detail::log2(/*reserved size*/old_size|1) > oneapi::tbb::detail::log2(fill_size|1) ){\n                   REQUIRE( v.capacity() != copy_of_v.capacity() );\n                }\n                v.shrink_to_fit();\n                REQUIRE( v.capacity() == copy_of_v.capacity() );\n                CheckVector(v, new_size*2, old_size); // check vector correctness\n                REQUIRE( v==copy_of_v ); // TODO: check also segments layout equality\n            }\n            REQUIRE( move_support_tests::foo_count==count );\n        }\n    }\n    REQUIRE( allocator_t::items_allocated == allocator_t::items_freed );\n    REQUIRE( allocator_t::allocations == allocator_t::frees );\n}\n\ntemplate<typename c_vector>\nstd::size_t get_early_size(c_vector & v){\n      return v.grow_by(0) - v.begin();\n}\n\nvoid verify_c_vector_size(std::size_t size, std::size_t capacity, std::size_t early_size){\n    REQUIRE( size <= capacity );\n    REQUIRE( early_size >= size );\n}\n\ntemplate<typename c_vector_t>\nvoid verify_c_vector_size(c_vector_t & c_v){\n    verify_c_vector_size(c_v.size(), c_v.capacity(), get_early_size(c_v));\n}\n\n#if TBB_USE_EXCEPTIONS\nvoid TestExceptions() {\n    using allocator_t = StaticSharedCountingAllocator<std::allocator<move_support_tests::FooWithAssign>>;\n    using vector_t = oneapi::tbb::concurrent_vector<move_support_tests::FooWithAssign, allocator_t>;\n\n    enum methods {\n        zero_method = 0,\n        ctor_copy, ctor_size, assign_nt, assign_ir, reserve, compact,\n        all_methods\n    };\n    REQUIRE( !move_support_tests::foo_count );\n\n    try {\n        vector_t src(move_support_tests::FooIterator(0), move_support_tests::FooIterator(N)); // original data\n\n        for(int t = 0; t < 2; ++t) // exception type\n        for(int m = zero_method+1; m < all_methods; ++m)\n        {\n            move_support_tests::track_foo_count<__LINE__> check_all_foo_destroyed_on_exit{};\n            move_support_tests::track_allocator_memory<allocator_t> verify_no_leak_at_exit{};\n            allocator_t::init_counters();\n            if(t) move_support_tests::max_foo_count = move_support_tests::foo_count + N/4;\n            else allocator_t::set_limits(N/4);\n            vector_t victim;\n            try {\n                switch(m) {\n                case ctor_copy: {\n                        vector_t acopy(src);\n                    } break; // auto destruction after exception is checked by ~Foo\n                case ctor_size: {\n                        vector_t sized(N);\n                    } break; // auto destruction after exception is checked by ~Foo\n                // Do not test assignment constructor due to reusing of same methods as below\n                case assign_nt: {\n                        victim.assign(N, move_support_tests::FooWithAssign());\n                    } break;\n                case assign_ir: {\n                        victim.assign(move_support_tests::FooIterator(0), move_support_tests::FooIterator(N));\n                    } break;\n                case reserve: {\n                        try {\n                            victim.reserve(victim.max_size()+1);\n                        } catch(std::length_error &) {\n                        } catch(...) {\n                            INFO(\"ERROR: unrecognized exception - known compiler issue\\n\");\n                        }\n                        victim.reserve(N);\n                    } break;\n                case compact: {\n                        if(t) move_support_tests::max_foo_count = 0; else allocator_t::set_limits(); // reset limits\n                        victim.reserve(2);\n                        victim = src; // fragmented assignment\n                        if(t) {\n                            move_support_tests::max_foo_count = move_support_tests::foo_count + 10;\n                        }\n                        else {\n                            allocator_t::set_limits(1); // block any allocation\n                        }\n                        victim.shrink_to_fit(); // should start defragmenting first segment\n                    } break;\n                default:;\n                }\n                if(!t || m != reserve) REQUIRE_MESSAGE(false, \"should throw an exception\");\n            } catch(std::bad_alloc &e) {\n                allocator_t::set_limits(); move_support_tests::max_foo_count = 0;\n                std::size_t capacity = victim.capacity();\n                std::size_t size = victim.size();\n\n                std::size_t req_size = get_early_size(victim);\n\n                verify_c_vector_size(size, capacity, req_size);\n\n                switch(m) {\n                case reserve:\n                    if(t) REQUIRE(false);\n                    utils_fallthrough;\n                case assign_nt:\n                case assign_ir:\n                    if(!t) {\n                        REQUIRE_MESSAGE(capacity < N/2, \"unexpected capacity\");\n                        REQUIRE_MESSAGE(size == 0, \"unexpected size\");\n                        break;\n                    } else {\n                        REQUIRE_MESSAGE(size == N, \"unexpected size\");\n                        REQUIRE_MESSAGE(capacity >= N, \"unexpected capacity\");\n                        int i;\n                        for(i = 1; ; ++i)\n                            if(!victim[i].zero_bar()) break;\n                            else {\n                                REQUIRE(victim[i].bar() == (m == assign_ir? i : move_support_tests::initial_bar));\n                            }\n                        for(; size_t(i) < size; ++i) {\n                            REQUIRE(!victim[i].zero_bar());\n                        }\n                        REQUIRE(size_t(i) == size);\n                        break;\n                    }\n                case compact:\n                    REQUIRE_MESSAGE(capacity > 0, \"unexpected capacity\");\n                    REQUIRE_MESSAGE(victim == src, \"shrink_to_fit() is broken\");\n                    break;\n\n                default:; // nothing to check here\n                }\n                INFO(\"Exception \" << m << \": \" << e.what() << \"\\t- ok\\n\");\n            }\n        }\n    } catch(...) {\n        REQUIRE_MESSAGE(false, \"unexpected exception\");\n    }\n}\n#endif\n\nvoid verify_c_vector_capacity_is_below(size_t capacity, size_t high){\n    REQUIRE_MESSAGE(capacity > 0, \"unexpected capacity\");\n    REQUIRE_MESSAGE(capacity < high, \"unexpected capacity\");\n}\n\ntemplate<typename allocator_t>\nvoid verify_vector_partially_copied(\n        oneapi::tbb::concurrent_vector<move_support_tests::FooWithAssign, allocator_t> const& victim, size_t planned_victim_size,\n        oneapi::tbb::concurrent_vector<move_support_tests::FooWithAssign, allocator_t> const& src,  bool is_memory_allocation_failure)\n{\n    if (is_memory_allocation_failure) { // allocator generated exception\n        using vector_t = oneapi::tbb::concurrent_vector<move_support_tests::FooWithAssign, allocator_t>;\n        REQUIRE_MESSAGE( victim == vector_t(src.begin(), src.begin() + victim.size(), src.get_allocator()), \"failed to properly copy of source ?\" );\n    }else{\n        REQUIRE_MESSAGE( std::equal(victim.begin(), victim.begin() + planned_victim_size, src.begin()), \"failed to properly copy items before the exception?\" );\n        REQUIRE_MESSAGE( (std::all_of( victim.begin() + planned_victim_size, victim.end(), is_state_predicate<move_support_tests::Foo::ZeroInitialized>()) ), \"failed to zero-initialize items left not constructed after the exception?\" );\n    }\n}\n\ntemplate<typename vector_t>\nvoid verify_last_segment_allocation_failed(vector_t const& victim){\n    utils::suppress_unused_warning(victim);\n    CHECK_THROWS_AS((victim.at(victim.size())), std::out_of_range);\n}\n\ntemplate<typename vector_t>\nvoid verify_copy_and_assign_from_produce_the_same(vector_t const& victim){\n    //TODO: remove explicit copy of allocator when full support of C++11 allocator_traits in concurrent_vector is present\n    vector_t copy_of_victim(victim, victim.get_allocator());\n    REQUIRE_MESSAGE(copy_of_victim == victim, \"copy doesn't match original\");\n    vector_t copy_of_victim2(10, victim[0], victim.get_allocator());\n    copy_of_victim2 = victim;\n    REQUIRE_MESSAGE(copy_of_victim == copy_of_victim2, \"assignment doesn't match copying\");\n}\n\ntemplate<typename vector_t>\nvoid verify_assignment_operator_throws_bad_last_alloc(vector_t & victim){\n    vector_t copy_of_victim(victim, victim.get_allocator());\n    //CHECK_THROWS_AS(victim = copy_of_victim, oneapi::tbb::bad_last_alloc); //TODO exceptions support\n}\n\n#if _MSC_VER\n#pragma warning (push)\n// Forcing value to bool 'true' or 'false'\n#pragma warning (disable: 4800)\n#endif //#if _MSC_VER\n\n//TODO: split into two separate tests\n//TODO: remove code duplication in exception safety tests\nvoid test_ex_assign_operator(){\n    //TODO: use __FUNCTION__ for test name\n    using allocator_t = StaticCountingAllocator<std::allocator<move_support_tests::FooWithAssign>>;\n    using vector_t = oneapi::tbb::concurrent_vector<move_support_tests::FooWithAssign, allocator_t>;\n\n    move_support_tests::track_foo_count<__LINE__> check_all_foo_destroyed_on_exit{};\n    move_support_tests::track_allocator_memory<allocator_t> verify_no_leak_at_exit{};\n\n    vector_t src(move_support_tests::FooIterator(0), move_support_tests::FooIterator(N)); // original data\n\n    const size_t planned_victim_size = N/4;\n\n    for(int t = 0; t < 2; ++t) { // exception type\n        vector_t victim;\n        victim.reserve(2); // get fragmented assignment\n        REQUIRE_THROWS_AS([&](){\n            move_support_tests::LimitFooCountInScope foo_limit(move_support_tests::foo_count + planned_victim_size, t);\n            move_support_tests::LimitAllocatedItemsInScope<allocator_t> allocator_limit(allocator_t::items_allocated + planned_victim_size, !t);\n\n            victim = src; // fragmented assignment\n        }(), const std::bad_alloc);\n\n        verify_c_vector_size(victim);\n\n        if(!t) {\n            verify_c_vector_capacity_is_below(victim.capacity(), N);\n        }\n\n        verify_vector_partially_copied(victim, planned_victim_size, src, !t);\n        verify_last_segment_allocation_failed(victim);\n        verify_copy_and_assign_from_produce_the_same(victim);\n        verify_assignment_operator_throws_bad_last_alloc(victim); //TODO exceptions support\n    }\n}\n\n#if _MSC_VER\n#pragma warning (pop)\n#endif\n\ntemplate<typename T>\nvoid AssertSameType( const T& /*x*/, const T& /*y*/ ) {}\n\nstruct test_grow_by {\n    template<typename container_type, typename element_type>\n    static void test( std::initializer_list<element_type> const& il, container_type const& expected ) {\n        container_type vd;\n        vd.grow_by( il );\n        REQUIRE_MESSAGE( vd == expected, \"grow_by with an initializer list failed\" );\n    }\n};\n\ntemplate<typename Iterator, typename T>\nvoid TestIteratorTraits() {\n    AssertSameType( static_cast<typename Iterator::difference_type*>(nullptr), static_cast<std::ptrdiff_t*>(nullptr) );\n    AssertSameType( static_cast<typename Iterator::value_type*>(nullptr), static_cast<T*>(nullptr) );\n    AssertSameType( static_cast<typename Iterator::pointer*>(nullptr), static_cast<T**>(nullptr) );\n    AssertSameType( static_cast<typename Iterator::iterator_category*>(nullptr), static_cast<std::random_access_iterator_tag*>(nullptr) );\n    T x;\n    typename Iterator::reference xr = x;\n    typename Iterator::pointer xp = &x;\n    REQUIRE( &xr==xp );\n}\n\nvoid TestInitList() {\n    using namespace initializer_list_support_tests;\n    test_initializer_list_support<oneapi::tbb::concurrent_vector<char>, test_grow_by>( { 1, 2, 3, 4, 5 } );\n    test_initializer_list_support<oneapi::tbb::concurrent_vector<int>, test_grow_by>( {} );\n}\n\nnamespace TestMoveInShrinkToFitHelpers {\n    struct dummy : StateTrackable<>{\n        int i;\n        dummy(int an_i) noexcept : StateTrackable<>(0), i(an_i) {}\n\n        friend bool operator== (const dummy &lhs, const dummy &rhs){ return lhs.i == rhs.i; }\n    };\n}\n\nvoid TestSerialMoveInShrinkToFit(){\n    using TestMoveInShrinkToFitHelpers::dummy;\n\n    static_assert(std::is_nothrow_move_constructible<dummy>::value,\"incorrect test setup or broken configuration?\");\n    {\n        dummy src(0);\n        REQUIRE_MESSAGE(is_state<StateTrackableBase::MoveInitialized>(dummy(std::move_if_noexcept(src))),\"broken configuration ?\");\n    }\n    static const std::size_t sequence_size = 15;\n    using c_vector_t = oneapi::tbb::concurrent_vector<dummy>;\n    std::vector<dummy> source(sequence_size, 0);\n    std::generate_n(source.begin(), source.size(), std::rand);\n\n    c_vector_t c_vector;\n    c_vector.reserve(1); //make it fragmented\n\n    c_vector.assign(source.begin(), source.end());\n    move_support_tests::MemoryLocations c_vector_before_shrink(c_vector);\n    c_vector.shrink_to_fit();\n\n    REQUIRE_MESSAGE(c_vector_before_shrink.content_location_changed(c_vector), \"incorrect test setup? shrink_to_fit should cause moving elements to other memory locations while it is not\");\n    REQUIRE_MESSAGE((std::all_of(c_vector.begin(), c_vector.end(), is_state_predicate<StateTrackableBase::MoveInitialized>())), \"container did not move construct some elements?\");\n    REQUIRE((c_vector == c_vector_t(source.begin(),source.end())));\n}\n\nstruct default_container_traits {\n    template <typename container_type, typename iterator_type>\n    static container_type& construct_container(typename std::aligned_storage<sizeof(container_type)>::type& storage, iterator_type begin, iterator_type end){\n        container_type* ptr = reinterpret_cast<container_type*>(&storage);\n        new (ptr) container_type(begin, end);\n        return *ptr;\n    }\n\n    template <typename container_type, typename iterator_type, typename allocator_type>\n    static container_type& construct_container(typename std::aligned_storage<sizeof(container_type)>::type& storage, iterator_type begin, iterator_type end, allocator_type const& a){\n        container_type* ptr = reinterpret_cast<container_type*>(&storage);\n        new (ptr) container_type(begin, end, a);\n        return *ptr;\n    }\n};\n\nstruct c_vector_type : default_container_traits {\n    template <typename T, typename Allocator>\n    using container_type = oneapi::tbb::concurrent_vector<T, Allocator>;\n\n    template <typename T>\n    using container_value_type = T;\n\n    using init_iterator_type = move_support_tests::FooIterator;\n    template<typename element_type, typename allocator_type>\n    struct apply{\n        using type = oneapi::tbb::concurrent_vector<element_type,  allocator_type >;\n    };\n\n    enum{ expected_number_of_items_to_allocate_for_steal_move = 0 };\n\n    template<typename element_type, typename allocator_type, typename iterator>\n    static bool equal(oneapi::tbb::concurrent_vector<element_type, allocator_type > const& c, iterator begin, iterator end){\n        bool equal_sizes = (std::size_t)std::distance(begin, end) == c.size();\n        return  equal_sizes && std::equal(c.begin(), c.end(), begin);\n    }\n};\n\nvoid TestSerialGrowByWithMoveIterators(){\n    using fixture_t = move_support_tests::DefaultStatefulFixtureHelper<c_vector_type>::type;\n    using vector_t = fixture_t::container_type;\n\n    fixture_t fixture;\n\n    vector_t dst(fixture.dst_allocator);\n    dst.grow_by(std::make_move_iterator(fixture.source.begin()), std::make_move_iterator(fixture.source.end()));\n\n    fixture.verify_content_deep_moved(dst);\n}\n\nnamespace test_grow_to_at_least_helpers {\n    template<typename MyVector >\n    class GrowToAtLeast {\n        using const_reference = typename MyVector::const_reference;\n\n        const bool my_use_two_args_form ;\n        MyVector& my_vector;\n        const_reference my_init_from;\n    public:\n        void operator()( const oneapi::tbb::blocked_range<std::size_t>& range ) const {\n            for( std::size_t i=range.begin(); i!=range.end(); ++i ) {\n                std::size_t n = my_vector.size();\n                std::size_t req = (i % (2*n+1))+1;\n\n                typename MyVector::iterator p;\n                move_support_tests::Foo::State desired_state;\n                if (my_use_two_args_form){\n                    p = my_vector.grow_to_at_least(req,my_init_from);\n                    desired_state = move_support_tests::Foo::CopyInitialized;\n                }else{\n                    p = my_vector.grow_to_at_least(req);\n                    desired_state = move_support_tests::Foo::DefaultInitialized;\n                }\n                if( p-my_vector.begin() < typename MyVector::difference_type(req) )\n                    CHECK((p->state == desired_state || p->state == move_support_tests::Foo::ZeroInitialized));\n                CHECK(my_vector.size() >= req);\n            }\n        }\n        GrowToAtLeast(bool use_two_args_form, MyVector& vector, const_reference init_from )\n            : my_use_two_args_form(use_two_args_form), my_vector(vector), my_init_from(init_from) {}\n    };\n}\n\ntemplate<bool use_two_arg_form>\nvoid TestConcurrentGrowToAtLeastImpl() {\n    using namespace test_grow_to_at_least_helpers;\n    using MyAllocator = StaticCountingAllocator<std::allocator<move_support_tests::Foo>>;\n    using MyVector = oneapi::tbb::concurrent_vector<move_support_tests::Foo, MyAllocator>;\n    move_support_tests::Foo copy_from;\n    MyAllocator::init_counters();\n    MyVector v(2, move_support_tests::Foo(), MyAllocator());\n    for (std::size_t s=1; s<1000; s*=10) {\n        oneapi::tbb::parallel_for(oneapi::tbb::blocked_range<std::size_t>(0, 10000*s, s), GrowToAtLeast<MyVector>(use_two_arg_form, v, copy_from), oneapi::tbb::simple_partitioner());\n    }\n\n    v.clear();\n    v.shrink_to_fit();\n    std::size_t items_allocated = v.get_allocator().items_allocated,\n           items_freed = v.get_allocator().items_freed;\n    std::size_t allocations = v.get_allocator().allocations,\n           frees = v.get_allocator().frees;\n    REQUIRE( items_allocated == items_freed );\n    REQUIRE( allocations == frees );\n}\n\nstruct AssignElement {\n    using iterator = oneapi::tbb::concurrent_vector<int>::range_type::iterator;\n    iterator base;\n    void operator()( const oneapi::tbb::concurrent_vector<int>::range_type& range ) const {\n        for (iterator i = range.begin(); i != range.end(); ++i) {\n            if (*i != 0) {\n                REPORT(\"ERROR for v[%ld]\\n\", long(i - base));\n            }\n            *i = int(i-base);\n        }\n    }\n    AssignElement( iterator base_ ) : base(base_) {}\n};\n\nstruct CheckElement {\n    using iterator = oneapi::tbb::concurrent_vector<int>::const_range_type::iterator;\n    iterator base;\n    void operator()( const oneapi::tbb::concurrent_vector<int>::const_range_type& range ) const {\n        for (iterator i = range.begin(); i != range.end(); ++i) {\n            if (*i != int(i-base)) {\n                REPORT(\"ERROR for v[%ld]\\n\", long(i-base));\n            }\n        }\n    }\n    CheckElement( iterator base_ ) : base(base_) {}\n};\n\n// Test parallel access by iterators\nvoid TestParallelFor( std::size_t nthread ) {\n    using vector_type = oneapi::tbb::concurrent_vector<int>;\n    vector_type v;\n    v.resize(N);\n    oneapi::tbb::tick_count t0 = oneapi::tbb::tick_count::now();\n    INFO(\"Calling parallel_for with \" << nthread << \" threads\");\n    oneapi::tbb::parallel_for(v.range(10000), AssignElement(v.begin()));\n    oneapi::tbb::tick_count t1 = oneapi::tbb::tick_count::now();\n    const vector_type& u = v;\n    oneapi::tbb::parallel_for(u.range(10000), CheckElement(u.begin()));\n    oneapi::tbb::tick_count t2 = oneapi::tbb::tick_count::now();\n    INFO(\"Time for parallel_for: assign time = \" << (t1 - t0).seconds() <<\n        \" , check time = \" << (t2 - t1).seconds());\n    for (int i = 0; std::size_t(i) < v.size(); ++i) {\n        if (v[i] != i) {\n            REPORT(\"ERROR for v[%ld]\\n\", i);\n        }\n    }\n}\n\n\nstruct grain_map {\n    enum grow_method_enum {\n        grow_by_range = 1,\n        grow_by_default,\n        grow_by_copy,\n        grow_by_init_list,\n        push_back,\n        push_back_move,\n        emplace_back,\n        last_method\n    };\n\n    struct range_part {\n        std::size_t number_of_parts;\n        grain_map::grow_method_enum method;\n        bool distribute;\n        move_support_tests::Foo::State expected_element_state;\n    };\n\n    const std::vector<range_part> distributed;\n    const std::vector<range_part> batched;\n    const std::size_t total_number_of_parts;\n\n    grain_map(const range_part* begin, const range_part* end)\n    : distributed(separate(begin,end, &distributed::is_not))\n    , batched(separate(begin,end, &distributed::is_yes))\n    , total_number_of_parts(std::accumulate(begin, end, (std::size_t)0, &sum_number_of_parts::sum))\n    {}\n\nprivate:\n    struct sum_number_of_parts{\n        static std::size_t sum(std::size_t accumulator, grain_map::range_part const& rp){ return accumulator + rp.number_of_parts;}\n    };\n\n    template <typename functor_t>\n    static std::vector<range_part> separate(const range_part* begin, const range_part* end, functor_t f){\n        std::vector<range_part> part;\n        part.reserve(std::distance(begin,end));\n        //copy all that false==f(*it)\n        std::remove_copy_if(begin, end, std::back_inserter(part), f);\n\n        return part;\n    }\n\n    struct distributed {\n        static bool is_not(range_part const& rp){ return !rp.distribute;}\n        static bool is_yes(range_part const& rp){ return rp.distribute;}\n    };\n};\n\n\n//! Test concurrent invocations of method concurrent_vector::grow_by\ntemplate<typename MyVector>\nclass GrowBy {\n    MyVector& my_vector;\n    const grain_map& my_grain_map;\n    std::size_t my_part_weight;\npublic:\n    void operator()( const oneapi::tbb::blocked_range<std::size_t>& range ) const {\n        CHECK(range.begin() < range.end());\n\n        std::size_t current_adding_index_in_cvector = range.begin();\n\n        for (std::size_t index = 0; index < my_grain_map.batched.size(); ++index){\n            const grain_map::range_part& batch_part = my_grain_map.batched[index];\n            const std::size_t number_of_items_to_add = batch_part.number_of_parts * my_part_weight;\n            const std::size_t end = current_adding_index_in_cvector + number_of_items_to_add;\n\n            switch(batch_part.method){\n            case grain_map::grow_by_range : {\n                    my_vector.grow_by(move_support_tests::FooIterator(current_adding_index_in_cvector), move_support_tests::FooIterator(end));\n                } break;\n            case grain_map::grow_by_default : {\n                    typename MyVector::iterator const s = my_vector.grow_by(number_of_items_to_add);\n                    for (std::size_t k = 0; k < number_of_items_to_add; ++k) {\n                        s[k].bar() = current_adding_index_in_cvector + k;\n                    }\n                } break;\n            case grain_map::grow_by_init_list : {\n                    move_support_tests::FooIterator curr(current_adding_index_in_cvector);\n                    for (std::size_t k = 0; k < number_of_items_to_add; ++k) {\n                        if (k + 4 < number_of_items_to_add) {\n                            my_vector.grow_by( { *curr++, *curr++, *curr++, *curr++, *curr++ } );\n                            k += 4;\n                        } else {\n                            my_vector.grow_by( { *curr++ } );\n                        }\n                    }\n                    CHECK(curr == move_support_tests::FooIterator(end));\n                } break;\n            default : { REQUIRE_MESSAGE(false, \"using unimplemented method of batch add in ConcurrentGrow test.\");} break;\n            };\n\n            current_adding_index_in_cvector = end;\n        }\n\n        std::vector<std::size_t> items_left_to_add(my_grain_map.distributed.size());\n        for (std::size_t i=0; i < my_grain_map.distributed.size(); ++i) {\n            items_left_to_add[i] = my_grain_map.distributed[i].number_of_parts * my_part_weight;\n        }\n\n        for (;current_adding_index_in_cvector < range.end(); ++current_adding_index_in_cvector) {\n            std::size_t method_index = current_adding_index_in_cvector % my_grain_map.distributed.size();\n\n            if (!items_left_to_add[method_index]) {\n                struct not_zero{\n                    static bool is(std::size_t items_to_add){ return items_to_add != 0;}\n                };\n                method_index = std::distance(items_left_to_add.begin(), std::find_if(items_left_to_add.begin(), items_left_to_add.end(), &not_zero::is));\n                REQUIRE_MESSAGE(method_index < my_grain_map.distributed.size(), \"incorrect test setup - wrong expected distribution: left free space but no elements to add?\");\n            };\n\n            REQUIRE_MESSAGE(items_left_to_add[method_index], \"logic error ?\");\n            const grain_map::range_part& distributed_part = my_grain_map.distributed[method_index];\n\n            typename MyVector::iterator r;\n            typename MyVector::value_type source;\n            source.bar() = current_adding_index_in_cvector;\n\n            switch(distributed_part.method){\n            case grain_map::grow_by_default : {\n                    (r = my_vector.grow_by(1))->bar() = current_adding_index_in_cvector;\n                } break;\n            case grain_map::grow_by_copy : {\n                    r = my_vector.grow_by(1, source);\n                } break;\n            case grain_map::push_back : {\n                    r = my_vector.push_back(source);\n                } break;\n            case grain_map::push_back_move : {\n                    r = my_vector.push_back(std::move(source));\n                } break;\n            case grain_map::emplace_back : {\n                    r = my_vector.emplace_back(current_adding_index_in_cvector);\n                } break;\n\n            default : { REQUIRE_MESSAGE(false, \"using unimplemented method of batch add in ConcurrentGrow test.\");} break;\n            };\n\n            CHECK(static_cast<std::size_t>(r->bar()) == current_adding_index_in_cvector);\n            }\n\n        }\n\n    GrowBy( MyVector& vector, const grain_map& m, std::size_t part_weight )\n    : my_vector(vector), my_grain_map(m), my_part_weight(part_weight)\n    {}\n};\n\n//! Test concurrent invocations of grow methods\nvoid TestConcurrentGrowBy() {\n\n    const grain_map::range_part concurrent_grow_single_range_map [] = {\n    //  number_of_parts,         method,             distribute,   expected_element_state\n            {3,           grain_map::grow_by_range,     false,   move_support_tests::Foo::MoveInitialized},\n\n            {1,           grain_map::grow_by_init_list, false,   move_support_tests::Foo::CopyInitialized},\n\n            {2,           grain_map::grow_by_default,   false,   move_support_tests::Foo::DefaultInitialized},\n            {1,           grain_map::grow_by_default,   true,    move_support_tests::Foo::DefaultInitialized},\n            {1,           grain_map::grow_by_copy,      true,    move_support_tests::Foo::CopyInitialized},\n            {1,           grain_map::push_back,         true,    move_support_tests::Foo::CopyInitialized},\n\n            {1,           grain_map::push_back_move,    true,    move_support_tests::Foo::MoveInitialized},\n\n            {1,           grain_map::emplace_back,      true,    move_support_tests::Foo::DirectInitialized},\n\n    };\n\n    using MyAllocator = StaticCountingAllocator<std::allocator<move_support_tests::Foo> >;\n    using MyVector = oneapi::tbb::concurrent_vector<move_support_tests::Foo, MyAllocator>;\n\n    MyAllocator::init_counters();\n    {\n        grain_map m(concurrent_grow_single_range_map, end(concurrent_grow_single_range_map));\n\n        static const std::size_t desired_grain_size = 100;\n\n        static const std::size_t part_weight = desired_grain_size / m.total_number_of_parts;\n        static const std::size_t grain_size = part_weight * m.total_number_of_parts;\n        static const std::size_t number_of_grains = 8; //this should be (power of two) in order to get minimal ranges equal to grain_size\n        static const std::size_t range_size = grain_size * number_of_grains;\n\n        MyAllocator a;\n        MyVector v(a);\n        oneapi::tbb::parallel_for(oneapi::tbb::blocked_range<std::size_t>(0, range_size, grain_size), GrowBy<MyVector>(v, m, part_weight), oneapi::tbb::simple_partitioner());\n\n        REQUIRE( v.size() == std::size_t(range_size) );\n\n        // Verify that v is a permutation of 0..m\n        size_t direct_inits = 0, def_inits = 0, copy_inits = 0, move_inits = 0;\n        std::vector<bool> found(range_size, 0);\n        for( std::size_t i=0; i<range_size; ++i ) {\n            if( v[i].state == move_support_tests::Foo::DefaultInitialized ) ++def_inits;\n            else if( v[i].state == move_support_tests::Foo::DirectInitialized ) ++direct_inits;\n            else if( v[i].state == move_support_tests::Foo::CopyInitialized ) ++copy_inits;\n            else if( v[i].state == move_support_tests::Foo::MoveInitialized ) ++move_inits;\n            else {\n                REQUIRE_MESSAGE( false, \"v[i] seems not initialized\");\n            }\n            intptr_t index = v[i].bar();\n            REQUIRE( !found[index] );\n            found[index] = true;\n        }\n\n        std::size_t expected_direct_inits = 0, expected_def_inits = 0, expected_copy_inits = 0, expected_move_inits = 0;\n        for (std::size_t i=0; i < utils::array_length(concurrent_grow_single_range_map); ++i){\n            const grain_map::range_part& rp =concurrent_grow_single_range_map[i];\n            switch (rp.expected_element_state){\n            case move_support_tests::Foo::DefaultInitialized: { expected_def_inits += rp.number_of_parts ; } break;\n            case move_support_tests::Foo::DirectInitialized:  { expected_direct_inits += rp.number_of_parts ;} break;\n            case move_support_tests::Foo::MoveInitialized:    { expected_move_inits += rp.number_of_parts ;} break;\n            case move_support_tests::Foo::CopyInitialized:    { expected_copy_inits += rp.number_of_parts ;} break;\n            default: {REQUIRE_MESSAGE(false, \"unexpected expected state\");}break;\n            };\n        }\n\n        expected_def_inits    *= part_weight * number_of_grains;\n        expected_move_inits   *= part_weight * number_of_grains;\n        expected_copy_inits   *= part_weight * number_of_grains;\n        expected_direct_inits *= part_weight * number_of_grains;\n\n        REQUIRE( def_inits == expected_def_inits );\n        REQUIRE( copy_inits == expected_copy_inits );\n        REQUIRE( move_inits == expected_move_inits );\n        REQUIRE( direct_inits == expected_direct_inits );\n    }\n    //TODO: factor this into separate thing, as it seems to used in big number of tests\n    std::size_t items_allocated = MyAllocator::items_allocated,\n           items_freed = MyAllocator::items_freed;\n    std::size_t allocations = MyAllocator::allocations,\n           frees = MyAllocator::frees;\n    REQUIRE(items_allocated == items_freed);\n    REQUIRE(allocations == frees);\n}\n\nvoid TestComparison() {\n    std::string str[3];\n    str[0] = \"abc\";\n    str[1].assign(\"cba\");\n    str[2].assign(\"abc\"); // same as 0th\n    oneapi::tbb::concurrent_vector<char> var[3];\n    var[0].assign(str[0].begin(), str[0].end());\n    var[1].assign(str[0].rbegin(), str[0].rend());\n    var[2].assign(var[1].rbegin(), var[1].rend()); // same as 0th\n    for (int i = 0; i < 3; ++i) {\n        for (int j = 0; j < 3; ++j) {\n            REQUIRE( (var[i] == var[j]) == (str[i] == str[j]) );\n            REQUIRE( (var[i] != var[j]) == (str[i] != str[j]) );\n            REQUIRE( (var[i] < var[j]) == (str[i] < str[j]) );\n            REQUIRE( (var[i] > var[j]) == (str[i] > str[j]) );\n            REQUIRE( (var[i] <= var[j]) == (str[i] <= str[j]) );\n            REQUIRE( (var[i] >= var[j]) == (str[i] >= str[j]) );\n        }\n    }\n}\n\n#if TBB_USE_EXCEPTIONS\nvoid test_ex_move_assignment_memory_failure() {\n    using fixture_type = move_support_tests::DefaultStatefulFixtureHelper<c_vector_type, /*POCMA = */std::false_type>::type;\n    using arena_allocator_fixture_type = move_support_tests::ArenaAllocatorFixture<move_support_tests::FooWithAssign, /*POCMA = */std::false_type>;\n    using allocator_type = fixture_type::allocator_type;\n    using vector_type = fixture_type::container_type;\n\n    fixture_type fixture;\n    arena_allocator_fixture_type arena_allocator_fixture(4 * fixture.container_size);\n\n    const std::size_t allocation_limit = fixture.container_size/4;\n\n    vector_type victim(arena_allocator_fixture.allocator);\n    victim.reserve(2); // for fragmented assignment\n\n    REQUIRE_THROWS_AS(\n        [&]() {\n            move_support_tests::LimitAllocatedItemsInScope<allocator_type> allocator_limit(allocator_type::items_allocated + allocation_limit);\n            victim = std::move(fixture.source); // fragmented assignment\n        }(),\n        std::bad_alloc\n    );\n\n    verify_c_vector_size(victim);\n    verify_c_vector_capacity_is_below(victim.capacity(), allocation_limit + 2);\n    fixture.verify_part_of_content_deep_moved(victim, victim.size());\n\n    verify_last_segment_allocation_failed(victim);\n    verify_copy_and_assign_from_produce_the_same(victim);\n    verify_assignment_operator_throws_bad_last_alloc(victim);\n}\n\nvoid test_ex_move_assignment_element_ctor_exception(){\n    using fixture_type = move_support_tests::DefaultStatefulFixtureHelper<c_vector_type, std::false_type>::type;\n    using arena_allocator_fixture_type = move_support_tests::ArenaAllocatorFixture<move_support_tests::FooWithAssign, std::false_type>;\n    using vector_type = fixture_type::container_type;\n\n    fixture_type fixture;\n    const size_t planned_victim_size = fixture.container_size/4;\n    arena_allocator_fixture_type arena_allocator_fixture(4 * fixture.container_size);\n\n    vector_type victim(arena_allocator_fixture.allocator);\n    victim.reserve(2); // get fragmented assignment\n\n    REQUIRE_THROWS_AS(\n        [&](){\n            move_support_tests::LimitFooCountInScope foo_limit(move_support_tests::foo_count + planned_victim_size);\n            victim = std::move(fixture.source); // fragmented assignment\n        }(),\n        std::bad_alloc\n    );\n\n    verify_c_vector_size(victim);\n\n    fixture.verify_part_of_content_deep_moved(victim, planned_victim_size);\n\n    verify_last_segment_allocation_failed(victim);\n    verify_copy_and_assign_from_produce_the_same(victim);\n    verify_assignment_operator_throws_bad_last_alloc(victim);\n}\n\nvoid test_ex_move_assignment() {\n    test_ex_move_assignment_memory_failure();\n    test_ex_move_assignment_element_ctor_exception();\n}\n#endif\n\ntemplate <typename Type, typename Allocator>\nclass test_grow_by_and_resize {\n    oneapi::tbb::concurrent_vector<Type, Allocator> &my_c;\npublic:\n    test_grow_by_and_resize( oneapi::tbb::concurrent_vector<Type, Allocator> &c ) : my_c(c) {}\n    void operator()() const {\n        const typename oneapi::tbb::concurrent_vector<Type, Allocator>::size_type sz = my_c.size();\n        my_c.grow_by( 5 );\n        REQUIRE( my_c.size() == sz + 5 );\n        my_c.resize( sz );\n        REQUIRE( my_c.size() == sz );\n    }\n};\n\nnamespace push_back_exception_safety_helpers {\n    //TODO: remove code duplication with emplace_helpers::wrapper_type\n    struct throwing_foo:move_support_tests::Foo {\n        int value1;\n        int value2;\n        explicit throwing_foo(int v1, int v2) : value1 (v1), value2(v2) {}\n    };\n\n    template< typename foo_t = throwing_foo>\n    struct fixture {\n        using vector_t = oneapi::tbb::concurrent_vector<foo_t, std::allocator<foo_t> >;\n        vector_t v;\n\n        void test( void(*p_test)(vector_t&)){\n            utils::suppress_unused_warning(p_test);\n            move_support_tests::track_foo_count<__LINE__> verify_no_foo_leaked_during_exception{};\n            utils::suppress_unused_warning(verify_no_foo_leaked_during_exception);\n            REQUIRE_MESSAGE(v.empty(),\"incorrect test setup?\" );\n            REQUIRE_THROWS_AS(p_test(v), move_support_tests::FooException);\n            REQUIRE_MESSAGE(is_state<move_support_tests::Foo::ZeroInitialized>(v[0]),\"incorrectly filled item during exception in emplace_back?\");\n        }\n    };\n}\n\nvoid TestPushBackMoveExceptionSafety() {\n    using fixture_t = push_back_exception_safety_helpers::fixture<move_support_tests::Foo>;\n    fixture_t t;\n\n    move_support_tests::LimitFooCountInScope foo_limit(move_support_tests::foo_count + 1);\n\n    struct test {\n        static void test_move_push_back(fixture_t::vector_t& v) {\n            move_support_tests::Foo f;\n            v.push_back(std::move(f));\n        }\n    };\n    t.test(&test::test_move_push_back);\n}\n\nvoid TestEmplaceBackExceptionSafety(){\n    using fixture_t = push_back_exception_safety_helpers::fixture<>;\n    fixture_t t;\n\n    move_support_tests::Foo dummy; //make FooCount non zero;\n    utils::suppress_unused_warning(dummy);\n    move_support_tests::LimitFooCountInScope foo_limit(move_support_tests::foo_count);\n\n    struct test {\n        static void test_emplace(fixture_t::vector_t& v) {\n            v.emplace_back(1,2);\n        }\n    };\n    t.test(&test::test_emplace);\n}\n\nnamespace move_semantics_helpers {\n    struct move_only_type {\n        const int* my_pointer;\n        move_only_type(move_only_type && other): my_pointer(other.my_pointer){other.my_pointer=nullptr;}\n        explicit move_only_type(const int* value): my_pointer(value) {}\n    };\n}\n\nvoid TestPushBackMoveOnlyContainer(){\n    using namespace move_semantics_helpers;\n    using vector_t = oneapi::tbb::concurrent_vector<move_only_type >;\n    vector_t v;\n    static const int magic_number = 7;\n    move_only_type src(&magic_number);\n    v.push_back(std::move(src));\n    REQUIRE_MESSAGE((v[0].my_pointer == &magic_number),\"item was incorrectly moved during push_back?\");\n    REQUIRE_MESSAGE(src.my_pointer == nullptr,\"item was incorrectly moved during push_back?\");\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\ntemplate <template <typename...> typename TVector>\nvoid TestDeductionGuides() {\n    using ComplexType = const std::string*;\n    std::vector<ComplexType> v;\n    std::string s = \"s\";\n    auto l = {ComplexType(&s), ComplexType(&s)};\n\n    // check TVector(InputIterator, InputIterator)\n    TVector v1(v.begin(), v.end());\n    static_assert(std::is_same<decltype(v1), TVector<ComplexType>>::value);\n\n    // check TVector(InputIterator, InputIterator, Allocator)\n    TVector v2(v.begin(), v.end(), std::allocator<ComplexType>());\n    static_assert(std::is_same<decltype(v2),\n       TVector<ComplexType, std::allocator<ComplexType>>>::value);\n\n    // check TVector(std::initializer_list<T>)\n    TVector v3(l);\n    static_assert(std::is_same<decltype(v3),\n        TVector<ComplexType>>::value);\n\n    // check TVector(std::initializer_list, Allocator)\n    TVector v4(l, std::allocator<ComplexType>());\n    static_assert(std::is_same<decltype(v4), TVector<ComplexType, std::allocator<ComplexType>>>::value);\n\n    // check TVector(TVector&)\n    TVector v5(v1);\n    static_assert(std::is_same<decltype(v5), TVector<ComplexType>>::value);\n\n    // check TVector(TVector&, Allocator)\n    TVector v6(v5, oneapi::tbb::cache_aligned_allocator<ComplexType>());\n    static_assert(std::is_same<decltype(v6), TVector<ComplexType, oneapi::tbb::cache_aligned_allocator<ComplexType>>>::value);\n\n    // check TVector(TVector&&)\n    TVector v7(std::move(v1));\n    static_assert(std::is_same<decltype(v7), decltype(v1)>::value);\n\n    // check TVector(TVector&&, Allocator)\n    TVector v8(std::move(v5), oneapi::tbb::cache_aligned_allocator<ComplexType>());\n    static_assert(std::is_same<decltype(v8), TVector<ComplexType, oneapi::tbb::cache_aligned_allocator<ComplexType>>>::value);\n\n}\n#endif\n\ntemplate <template <typename... > class ContainerType>\nvoid test_member_types() {\n    using default_container_type = ContainerType<int>;\n\n    static_assert(std::is_same<typename default_container_type::allocator_type,\n                               oneapi::tbb::cache_aligned_allocator<int>>::value,\n                  \"Incorrect default template allocator\");\n\n\n    using test_allocator_type = oneapi::tbb::cache_aligned_allocator<int>;\n    using container_type = ContainerType<int, test_allocator_type>;\n\n    static_assert(std::is_same<typename container_type::value_type, int>::value,\n                  \"Incorrect container value_type member type\");\n\n    static_assert(std::is_unsigned<typename container_type::size_type>::value,\n                  \"Incorrect container size_type member type\");\n    static_assert(std::is_signed<typename container_type::difference_type>::value,\n                  \"Incorrect container difference_type member type\");\n\n    using value_type = typename container_type::value_type;\n    static_assert(std::is_same<typename container_type::reference, value_type&>::value,\n                  \"Incorrect container reference member type\");\n    static_assert(std::is_same<typename container_type::const_reference, const value_type&>::value,\n                  \"Incorrect container const_reference member type\");\n    using allocator_type = typename container_type::allocator_type;\n    static_assert(std::is_same<typename container_type::pointer, typename std::allocator_traits<allocator_type>::pointer>::value,\n                  \"Incorrect container pointer member type\");\n    static_assert(std::is_same<typename container_type::const_pointer, typename std::allocator_traits<allocator_type>::const_pointer>::value,\n                  \"Incorrect container const_pointer member type\");\n\n    static_assert(utils::is_random_access_iterator<typename container_type::iterator>::value,\n                  \"Incorrect container iterator member type\");\n    static_assert(!std::is_const<typename container_type::iterator::value_type>::value,\n                  \"Incorrect container iterator member type\");\n    static_assert(utils::is_random_access_iterator<typename container_type::const_iterator>::value,\n                  \"Incorrect container const_iterator member type\");\n    static_assert(std::is_const<typename container_type::const_iterator::value_type>::value,\n                  \"Incorrect container iterator member type\");\n}\n\nvoid TestConcurrentGrowToAtLeast() {\n    TestConcurrentGrowToAtLeastImpl<false>();\n    TestConcurrentGrowToAtLeastImpl<true>();\n}\n\ntemplate <typename Vector>\nvoid test_comparisons_basic() {\n    using comparisons_testing::testEqualityAndLessComparisons;\n    Vector v1, v2;\n    testEqualityAndLessComparisons</*ExpectEqual = */true, /*ExpectLess = */false>(v1, v2);\n\n    v1.emplace_back(1);\n    testEqualityAndLessComparisons</*ExpectEqual = */false, /*ExpectLess = */false>(v1, v2);\n\n    v2.emplace_back(1);\n    testEqualityAndLessComparisons</*ExpectEqual = */true, /*ExpectLess = */false>(v1, v2);\n\n    v2.emplace_back(2);\n    testEqualityAndLessComparisons</*ExpectEqual = */false, /*ExpectLess = */true>(v1, v2);\n\n    v1.clear();\n    v2.clear();\n    testEqualityAndLessComparisons</*ExpectEqual = */true, /*ExpectLess = */false>(v1, v2);\n}\n\ntemplate <typename TwoWayComparableVectorType>\nvoid test_two_way_comparable_vector() {\n    TwoWayComparableVectorType v1, v2;\n    v1.emplace_back(1);\n    v2.emplace_back(1);\n    comparisons_testing::TwoWayComparable::reset();\n    REQUIRE_MESSAGE(!(v1 < v2), \"Incorrect operator < result\");\n    comparisons_testing::check_two_way_comparison();\n    REQUIRE_MESSAGE(!(v1 > v2), \"Incorrect operator > result\");\n    comparisons_testing::check_two_way_comparison();\n    REQUIRE_MESSAGE(v1 <= v2, \"Incorrect operator <= result\");\n    comparisons_testing::check_two_way_comparison();\n    REQUIRE_MESSAGE(v1 >= v2, \"Incorrect operator >= result\");\n    comparisons_testing::check_two_way_comparison();\n}\n\n#if __TBB_TEST_CPP20_COMPARISONS\ntemplate <typename ThreeWayComparableVectorType>\nvoid test_three_way_comparable_vector() {\n    ThreeWayComparableVectorType v1, v2;\n    v1.emplace_back(1);\n    v2.emplace_back(1);\n    comparisons_testing::ThreeWayComparable::reset();\n    REQUIRE_MESSAGE(!(v1 <=> v2 < 0), \"Incorrect operator<=> result\");\n    comparisons_testing::check_three_way_comparison();\n\n    REQUIRE_MESSAGE(!(v1 < v2), \"Incorrect operator< result\");\n    comparisons_testing::check_three_way_comparison();\n\n    REQUIRE_MESSAGE(!(v1 > v2), \"Incorrect operator> result\");\n    comparisons_testing::check_three_way_comparison();\n\n    REQUIRE_MESSAGE(v1 <= v2, \"Incorrect operator>= result\");\n    comparisons_testing::check_three_way_comparison();\n\n    REQUIRE_MESSAGE(v1 >= v2, \"Incorrect operator>= result\");\n    comparisons_testing::check_three_way_comparison();\n}\n#endif // __TBB_TEST_CPP20_COMPARISONS\n\nvoid TestVectorComparisons() {\n    using integral_vector = oneapi::tbb::concurrent_vector<int>;\n    using two_way_comparable_vector = oneapi::tbb::concurrent_vector<comparisons_testing::TwoWayComparable>;\n\n    test_comparisons_basic<integral_vector>();\n    test_comparisons_basic<two_way_comparable_vector>();\n    test_two_way_comparable_vector<two_way_comparable_vector>();\n\n#if __TBB_TEST_CPP20_COMPARISONS\n    using two_way_less_only_vector = oneapi::tbb::concurrent_vector<comparisons_testing::LessComparableOnly>;\n    using three_way_only_vector = oneapi::tbb::concurrent_vector<comparisons_testing::ThreeWayComparableOnly>;\n    using three_way_comparable_vector = oneapi::tbb::concurrent_vector<comparisons_testing::ThreeWayComparable>;\n\n    test_comparisons_basic<two_way_less_only_vector>();\n    test_comparisons_basic<three_way_only_vector>();\n    test_comparisons_basic<three_way_comparable_vector>();\n    test_three_way_comparable_vector<three_way_comparable_vector>();\n#endif // __TBB_CPP20_COMPARISONS_PRESENT && __TBB_CPP20_CONVEPTS_PRESENT\n}\n\ntemplate <bool ExpectEqual, bool ExpectLess, typename Iterator>\nvoid DoVectorIteratorComparisons( const Iterator& lhs, const Iterator& rhs ) {\n    // TODO: replace with testEqualityAndLessComparisons after adding <=> operator for concurrent_vector iterator\n    using namespace comparisons_testing;\n    testEqualityComparisons<ExpectEqual>(lhs, rhs);\n    testTwoWayComparisons<ExpectEqual, ExpectLess>(lhs, rhs);\n}\n\ntemplate <typename Iterator, typename VectorType>\nvoid TestVectorIteratorComparisonsBasic( VectorType& vec ) {\n    REQUIRE_MESSAGE(!vec.empty(), \"Incorrect test setup\");\n    Iterator it1, it2;\n    DoVectorIteratorComparisons</*ExpectEqual = */true, /*ExpectLess = */false>(it1, it2);\n    it1 = vec.begin();\n    it2 = vec.begin();\n    DoVectorIteratorComparisons</*ExpectEqual = */true, /*ExpectLess = */false>(it1, it2);\n    it2 = std::prev(vec.end());\n    DoVectorIteratorComparisons</*ExpectEqual = */false, /*ExpectLess = */true>(it1, it2);\n}\n\nvoid TestVectorIteratorComparisons() {\n    using vector_type = oneapi::tbb::concurrent_vector<int>;\n    vector_type vec = {1, 2, 3, 4, 5};\n    TestVectorIteratorComparisonsBasic<typename vector_type::iterator>(vec);\n    const vector_type& cvec = vec;\n    TestVectorIteratorComparisonsBasic<typename vector_type::const_iterator>(cvec);\n}\n\n//! Test type matching\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"test type matching\") {\n    test_member_types<oneapi::tbb::concurrent_vector>();\n}\n\n//! Test sequential access to elements\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing sequential for\") {\n    TestSequentialFor<move_support_tests::FooWithAssign> ();\n}\n\n//! Test of assign, grow, copying with various sizes\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing resize and copy\"){\n    TestResizeAndCopy();\n}\n\n//! Test the assignment operator and swap\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing copy assignment\"){\n    TestCopyAssignment();\n}\n\n//! Testing grow_to_at_least operations\n//! \\brief \\ref interface\nTEST_CASE(\"testing grow_to_at_least with source parameter\"){\n    TestGrowToAtLeastWithSourceParameter<oneapi::tbb::concurrent_vector<int>>(12345);\n}\n\n//! Test of capacity, reserve, and shrink_to_fit\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing capacity\"){\n   TestCapacity();\n}\n\n#if TBB_USE_EXCEPTIONS\n//! Test exceptions\n//! \\brief \\ref requirement\nTEST_CASE(\"testing exceptions\"){\n    TestExceptions();\n}\n\n//! Test of push_back move exception safety\n//! \\brief \\ref requirement\nTEST_CASE(\"testing push_back move exception safety\"){\n    TestPushBackMoveExceptionSafety();\n}\n\n//! Test of emplace back move exception safety\n//! \\brief \\ref requirement\nTEST_CASE(\"testing emplace back exception safety\"){\n    TestEmplaceBackExceptionSafety();\n}\n\n//! Test exceptions guarantees for assign operator\n//! \\brief \\ref requirement\nTEST_CASE(\"testing exception safety guaranteees for assign operator\"){\n    test_ex_assign_operator();\n}\n\n//! Test exceptions safety guarantees for concurrent_vector move constructor\n//! \\brief \\ref requirement\nTEST_CASE(\"exception safety guarantees for concurrent_vector move constructor\") {\n    move_support_tests::test_ex_move_constructor<c_vector_type>();\n}\n\n//! Test exceptions safety guarantees for concurrent_vector move assignment\n//! \\brief \\ref requirement\nTEST_CASE(\"test exception safety on concurrent_vector move assignment\") {\n    test_ex_move_assignment();\n}\n#endif\n//! Test push_back in move only container\n//! \\brief \\ref requirement\nTEST_CASE(\"testing push_back move only container\"){\n    TestPushBackMoveOnlyContainer();\n}\n\n//! Test types for std::iterator_traits in concurrent_vector::iterator\n//! \\brief \\ref requirement\nTEST_CASE(\"testing std::iterator_traits for concurrent_vector::iterator\"){\n    TestIteratorTraits<oneapi::tbb::concurrent_vector<move_support_tests::Foo>::iterator,move_support_tests::Foo>();\n}\n\n//! Test types for std::iterator_traits in concurrent_vector::const_iterator\n//! \\brief \\ref requirement\nTEST_CASE(\"testing std::iterator_traits for concurrent_vector::const_iterator\"){\n    TestIteratorTraits<oneapi::tbb::concurrent_vector<move_support_tests::Foo>::const_iterator,const move_support_tests::Foo>();\n}\n\n//! Test initializer_list support\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing initializer_list support\"){\n    TestInitList();\n}\n\n//! Test move constructor\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing move constructor\"){\n    move_support_tests::test_move_constructor<c_vector_type>();\n}\n\n//! Test move assign operator\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing move assign operator\"){\n    move_support_tests::test_move_assignment<c_vector_type>();\n}\n\n//! Test constructor with move iterators\n//! \\brief \\ref requirement\nTEST_CASE(\"testing constructor with move iterators\"){\n    move_support_tests::test_constructor_with_move_iterators<c_vector_type>();\n}\n\n//! Test assign with move iterators\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing assign with move iterators\"){\n    move_support_tests::test_assign_with_move_iterators<c_vector_type>();\n}\n\n//! Test grow_by with move iterator\n//! \\brief \\ref requirement\nTEST_CASE(\"testing serial grow_by with move iterator\"){\n    TestSerialGrowByWithMoveIterators();\n}\n\n//! Test grow_by with move iterator\n//! \\brief \\ref requirement\nTEST_CASE(\"testing serial move in shrink_to_fit\"){\n    TestSerialMoveInShrinkToFit();\n}\n\n//! Test concurrent grow\n//! \\brief \\ref requirement\nTEST_CASE(\"testing concurrency\"){\n    REQUIRE(!move_support_tests::foo_count);\n    for (std::size_t p = 1; p <= 4; ++p) {\n        oneapi::tbb::global_control limit(oneapi::tbb::global_control::max_allowed_parallelism, p);\n        TestParallelFor(p);\n        TestConcurrentGrowToAtLeast();\n        TestConcurrentGrowBy();\n    }\n\n    REQUIRE(!move_support_tests::foo_count);\n}\n\n//! Test assign operations\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing comparison on assign operations\"){\n    TestComparison();\n}\n\n//! Test allocator_traits support in concurrent_vector\n//! \\brief \\ref requirement\nTEST_CASE(\"test allocator_traits support in concurrent_vector\") {\n    test_allocator_traits_support<c_vector_type>();\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Test deduction guides\n//! \\brief \\ref requirement\nTEST_CASE(\"testing deduction guides\"){\n    TestDeductionGuides<oneapi::tbb::concurrent_vector>();\n}\n#endif\n\n//! Test concurrent_vector comparisons\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_vector comparisons\") {\n    TestVectorComparisons();\n}\n\n//! Test concurrent_vector iterators comparisons\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrent_vector iterators comparisons\") {\n    TestVectorIteratorComparisons();\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_continue_node.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#define CONFORMANCE_CONTINUE_NODE\n\n#include \"conformance_flowgraph.h\"\n\n//! \\file conformance_continue_node.cpp\n//! \\brief Test for [flow_graph.continue_node] specification\n\nusing output_msg = conformance::message</*default_ctor*/false, /*copy_ctor*/true, /*copy_assign*/true/*enable for queue_node successor*/>;\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate <typename ExpectedType, typename Body>\nvoid test_deduction_guides_common(Body body) {\n    using namespace tbb::flow;\n    graph g;\n\n    continue_node c1(g, body);\n    static_assert(std::is_same_v<decltype(c1), continue_node<ExpectedType>>);\n\n    continue_node c2(g, body, lightweight());\n    static_assert(std::is_same_v<decltype(c2), continue_node<ExpectedType, lightweight>>);\n\n    continue_node c3(g, 5, body);\n    static_assert(std::is_same_v<decltype(c3), continue_node<ExpectedType>>);\n\n    continue_node c4(g, 5, body, lightweight());\n    static_assert(std::is_same_v<decltype(c4), continue_node<ExpectedType, lightweight>>);\n\n    continue_node c5(g, body, node_priority_t(5));\n    static_assert(std::is_same_v<decltype(c5), continue_node<ExpectedType>>);\n\n    continue_node c6(g, body, lightweight(), node_priority_t(5));\n    static_assert(std::is_same_v<decltype(c6), continue_node<ExpectedType, lightweight>>);\n\n    continue_node c7(g, 5, body, node_priority_t(5));\n    static_assert(std::is_same_v<decltype(c7), continue_node<ExpectedType>>);\n\n    continue_node c8(g, 5, body, lightweight(), node_priority_t(5));\n    static_assert(std::is_same_v<decltype(c8), continue_node<ExpectedType, lightweight>>);\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    broadcast_node<continue_msg> b(g);\n\n    continue_node c9(follows(b), body);\n    static_assert(std::is_same_v<decltype(c9), continue_node<ExpectedType>>);\n\n    continue_node c10(follows(b), body, lightweight());\n    static_assert(std::is_same_v<decltype(c10), continue_node<ExpectedType, lightweight>>);\n\n    continue_node c11(follows(b), 5, body);\n    static_assert(std::is_same_v<decltype(c11), continue_node<ExpectedType>>);\n\n    continue_node c12(follows(b), 5, body, lightweight());\n    static_assert(std::is_same_v<decltype(c12), continue_node<ExpectedType, lightweight>>);\n\n    continue_node c13(follows(b), body, node_priority_t(5));\n    static_assert(std::is_same_v<decltype(c13), continue_node<ExpectedType>>);\n\n    continue_node c14(follows(b), body, lightweight(), node_priority_t(5));\n    static_assert(std::is_same_v<decltype(c14), continue_node<ExpectedType, lightweight>>);\n\n    continue_node c15(follows(b), 5, body, node_priority_t(5));\n    static_assert(std::is_same_v<decltype(c15), continue_node<ExpectedType>>);\n\n    continue_node c16(follows(b), 5, body, lightweight(), node_priority_t(5));\n    static_assert(std::is_same_v<decltype(c16), continue_node<ExpectedType, lightweight>>);\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n\n    continue_node c17(c1);\n    static_assert(std::is_same_v<decltype(c17), continue_node<ExpectedType>>);\n}\n\nint continue_body_f(const tbb::flow::continue_msg&) { return 1; }\nvoid continue_void_body_f(const tbb::flow::continue_msg&) {}\n\nvoid test_deduction_guides() {\n    using tbb::flow::continue_msg;\n    test_deduction_guides_common<int>([](const continue_msg&)->int { return 1; } );\n    test_deduction_guides_common<continue_msg>([](const continue_msg&) {});\n\n    test_deduction_guides_common<int>([](const continue_msg&) mutable ->int { return 1; });\n    test_deduction_guides_common<continue_msg>([](const continue_msg&) mutable {});\n\n    test_deduction_guides_common<int>(continue_body_f);\n    test_deduction_guides_common<continue_msg>(continue_void_body_f);\n}\n\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\n//! Test execution of node body\n//! Test node can do try_put call\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"continue body\") {\n    conformance::test_body_exec<oneapi::tbb::flow::continue_node<output_msg>, oneapi::tbb::flow::continue_msg, output_msg>();\n}\n\n//! Test continue_node is a graph_node, receiver<continue_msg>, and sender<Output>\n//! \\brief \\ref interface\nTEST_CASE(\"continue_node superclasses\"){\n    conformance::test_inheritance<oneapi::tbb::flow::continue_node<int>, oneapi::tbb::flow::continue_msg, int>();\n    conformance::test_inheritance<oneapi::tbb::flow::continue_node<void*>, oneapi::tbb::flow::continue_msg, void*>();\n    conformance::test_inheritance<oneapi::tbb::flow::continue_node<output_msg>, oneapi::tbb::flow::continue_msg, output_msg>();\n}\n\n//! Test body copying and copy_body logic\n//! Test the body object passed to a node is copied\n//! \\brief \\ref interface\nTEST_CASE(\"continue_node and body copying\"){\n    conformance::test_copy_body_function<oneapi::tbb::flow::continue_node<int>, conformance::copy_counting_object<int, oneapi::tbb::flow::continue_msg>>();\n}\n\n//! Test deduction guides\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Deduction guides\"){\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n    test_deduction_guides();\n#endif\n}\n\n//! Test node broadcast messages to successors\n//! \\brief \\ref requirement\nTEST_CASE(\"continue_node broadcast\"){\n    conformance::counting_functor<int> fun(conformance::expected);\n    conformance::test_forwarding<oneapi::tbb::flow::continue_node<int>, oneapi::tbb::flow::continue_msg, int>(1, fun);\n}\n\n//! Test node not buffered unsuccessful message, and try_get after rejection should not succeed.\n//! \\brief \\ref requirement\nTEST_CASE(\"continue_node buffering\"){\n    conformance::dummy_functor<int> fun;\n    conformance::test_buffering<oneapi::tbb::flow::continue_node<int>, oneapi::tbb::flow::continue_msg>(fun);\n}\n\n//! Test all node costructors\n//! \\brief \\ref requirement\nTEST_CASE(\"continue_node constructors\"){\n    using namespace oneapi::tbb::flow;\n    graph g;\n\n    conformance::counting_functor<int> fun;\n\n    continue_node<int> proto1(g, fun);\n    continue_node<int> proto2(g, fun, oneapi::tbb::flow::node_priority_t(1));\n    continue_node<int> proto3(g, 2, fun);\n    continue_node<int> proto4(g, 2, fun, oneapi::tbb::flow::node_priority_t(1));\n\n    continue_node<int, lightweight> lw_node1(g, fun, lightweight());\n    continue_node<int, lightweight> lw_node2(g, fun, lightweight(), oneapi::tbb::flow::node_priority_t(1));\n    continue_node<int, lightweight> lw_node3(g, 2, fun, lightweight());\n    continue_node<int, lightweight> lw_node4(g, 2, fun, lightweight(), oneapi::tbb::flow::node_priority_t(1));\n}\n\n//! The node that is constructed has a reference to the same graph object as src,\n//! has a copy of the initial body used by src, and only has a non-zero threshold if src is constructed with a non-zero threshold..\n//! The predecessors and successors of src are not copied.\n//! \\brief \\ref interface\nTEST_CASE(\"continue_node copy constructor\"){\n    using namespace oneapi::tbb::flow;\n    graph g;\n\n    conformance::dummy_functor<oneapi::tbb::flow::continue_msg> fun1;\n    using counting_body = conformance::copy_counting_object<output_msg, oneapi::tbb::flow::continue_msg>;\n    counting_body fun2;\n\n    continue_node<oneapi::tbb::flow::continue_msg> node0(g, fun1);\n    continue_node<output_msg> node1(g, 2, fun2);\n    conformance::test_push_receiver<output_msg> node2(g);\n    conformance::test_push_receiver<output_msg> node3(g);\n\n    oneapi::tbb::flow::make_edge(node0, node1);\n    oneapi::tbb::flow::make_edge(node1, node2);\n\n    continue_node<output_msg> node_copy(node1);\n\n    counting_body b2 = copy_body<counting_body, continue_node<output_msg>>(node_copy);\n\n    CHECK_MESSAGE((fun2.copy_count + 1 < b2.copy_count), \"constructor should copy bodies\");\n\n    oneapi::tbb::flow::make_edge(node_copy, node3);\n\n    node_copy.try_put(oneapi::tbb::flow::continue_msg());\n    g.wait_for_all();\n\n    CHECK_MESSAGE((conformance::get_values(node2).size() == 0 && conformance::get_values(node3).size() == 0), \"Copied node doesn`t copy successor, but copy number of predecessors\");\n\n    node_copy.try_put(oneapi::tbb::flow::continue_msg());\n    g.wait_for_all();\n\n    CHECK_MESSAGE((conformance::get_values(node2).size() == 0 && conformance::get_values(node3).size() == 1), \"Copied node doesn`t copy successor, but copy number of predecessors\");\n\n    node1.try_put(oneapi::tbb::flow::continue_msg());\n    node1.try_put(oneapi::tbb::flow::continue_msg());\n    node0.try_put(oneapi::tbb::flow::continue_msg());\n    g.wait_for_all();\n\n    CHECK_MESSAGE((conformance::get_values(node2).size() == 1 && conformance::get_values(node3).size() == 0), \"Copied node doesn`t copy predecessor, but copy number of predecessors\");\n}\n\n//! Test continue_node wait for their predecessors to complete before executing, but no explicit data is passed across the incoming edges.\n//! \\brief \\ref requirement\nTEST_CASE(\"continue_node number_of_predecessors\") {\n    oneapi::tbb::flow::graph g;\n\n    conformance::counting_functor<int> fun;\n\n    oneapi::tbb::flow::continue_node<oneapi::tbb::flow::continue_msg> node1(g, fun);\n    oneapi::tbb::flow::continue_node<oneapi::tbb::flow::continue_msg> node2(g, 1, fun);\n    oneapi::tbb::flow::continue_node<oneapi::tbb::flow::continue_msg> node3(g, 1, fun);\n    oneapi::tbb::flow::continue_node<int> node4(g, fun); \n\n    oneapi::tbb::flow::make_edge(node1, node2);\n    oneapi::tbb::flow::make_edge(node2, node4);\n    oneapi::tbb::flow::make_edge(node1, node3);\n    oneapi::tbb::flow::make_edge(node1, node3);\n    oneapi::tbb::flow::remove_edge(node1, node3);\n    oneapi::tbb::flow::make_edge(node3, node4);\n    node3.try_put(oneapi::tbb::flow::continue_msg());\n    node2.try_put(oneapi::tbb::flow::continue_msg());\n    node1.try_put(oneapi::tbb::flow::continue_msg());\n\n    g.wait_for_all();\n    CHECK_MESSAGE((fun.execute_count == 4), \"Node wait for their predecessors to complete before executing\");\n}\n\n//! Test nodes for execution with priority in single-threaded configuration\n//! \\brief \\ref requirement\nTEST_CASE(\"continue_node priority support\"){\n    conformance::test_priority<oneapi::tbb::flow::continue_node<oneapi::tbb::flow::continue_msg, int>, oneapi::tbb::flow::continue_msg>();\n}\n\n//! Test node Output class meet the CopyConstructible requirements.\n//! \\brief \\ref requirement\nTEST_CASE(\"continue_node Output class\") {\n    conformance::test_output_class<oneapi::tbb::flow::continue_node<conformance::copy_counting_object<int, oneapi::tbb::flow::continue_msg>>, conformance::copy_counting_object<int, oneapi::tbb::flow::continue_msg>>();\n}\n\n//! Test body `try_put' statement not wait for the execution of the body to complete\n//! \\brief \\ref requirement\nTEST_CASE(\"continue_node `try_put' statement not wait for the execution of the body to complete\") {\n    conformance::wait_flag_body body;\n    oneapi::tbb::flow::graph g;\n\n    oneapi::tbb::flow::continue_node<oneapi::tbb::flow::continue_msg> node1(g, body);\n    node1.try_put(oneapi::tbb::flow::continue_msg());\n    conformance::wait_flag_body::flag.store(true);\n    g.wait_for_all();\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_enumerable_thread_specific.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if _MSC_VER\n#if __INTEL_COMPILER\n    #pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#else\n    // Workaround for vs2015 and warning name was longer than the compiler limit (4096).\n    #pragma warning (disable: 4503)\n#endif\n#endif\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_report.h\"\n#include \"common/utils_concurrency_limit.h\"\n#include \"common/spin_barrier.h\"\n#include \"common/checktype.h\"\n#include \"common/test_comparisons.h\"\n\n#include \"oneapi/tbb/detail/_utils.h\"\n#include \"oneapi/tbb/enumerable_thread_specific.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/parallel_reduce.h\"\n#include \"oneapi/tbb/parallel_invoke.h\"\n#include \"oneapi/tbb/blocked_range.h\"\n#include \"oneapi/tbb/tbb_allocator.h\"\n#include \"oneapi/tbb/global_control.h\"\n#include \"oneapi/tbb/cache_aligned_allocator.h\"\n\n#include <cstring>\n#include <cstdio>\n#include <vector>\n#include <numeric>\n#include <utility>\n#include <atomic>\n\n//! \\file conformance_enumerable_thread_specific.cpp\n//! \\brief Test for [tls.enumerable_thread_specific tls.flattened2d] specification\n\n//------------------------------------------------------------------------------------------------------\n// Utility types/classes/functions\n//------------------------------------------------------------------------------------------------------\n\n//! Minimum number of threads\nstatic int MinThread = 1;\n\n//! Maximum number of threads\nstatic int MaxThread = 4;\n\nstatic std::atomic<int> construction_counter;\nstatic std::atomic<int> destruction_counter;\n\nconst int REPETITIONS = 5;\nconst int N = 25000;\nconst int RANGE_MIN = 5000;\nconst double EXPECTED_SUM = (REPETITIONS + 1) * N;\n\n//! A minimal class that occupies N bytes.\n/** Defines default and copy constructor, and allows implicit operator&. Hides operator=. */\ntemplate<size_t N = oneapi::tbb::detail::max_nfs_size>\nclass minimalNComparable: utils::NoAssign {\nprivate:\n    int my_value;\n    bool is_constructed;\n    char pad[N-sizeof(int) - sizeof(bool)];\npublic:\n    minimalNComparable() : utils::NoAssign(), my_value(0) { ++construction_counter; is_constructed = true; }\n    minimalNComparable( const minimalNComparable &m ) : utils::NoAssign(), my_value(m.my_value) { ++construction_counter; is_constructed = true; }\n    ~minimalNComparable() { ++destruction_counter; CHECK_FAST(is_constructed); is_constructed = false; }\n    void set_value( const int i ) { CHECK_FAST(is_constructed); my_value = i; }\n    int value( ) const { CHECK_FAST(is_constructed); return my_value; }\n\n    bool operator==( const minimalNComparable& other ) const { return my_value == other.my_value; }\n};\n\nstatic size_t AlignMask = 0;  // set to cache-line-size - 1\n\ntemplate<typename T>\nT& check_alignment(T& t, const char *aname) {\n    if( !oneapi::tbb::detail::is_aligned(&t, AlignMask)) {\n        // TBB_REVAMP_TODO: previously was REPORT_ONCE\n        REPORT(\"alignment error with %s allocator (%x)\\n\", aname, (int)size_t(&t) & (AlignMask-1));\n    }\n    return t;\n}\n\ntemplate<typename T>\nconst T& check_alignment(const T& t, const char *aname) {\n    if( !oneapi::tbb::detail::is_aligned(&t, AlignMask)) {\n        // TBB_REVAMP_TODO: previously was REPORT_ONCE\n        REPORT(\"alignment error with %s allocator (%x)\\n\", aname, (int)size_t(&t) & (AlignMask-1));\n    }\n    return t;\n}\n\n// Test constructors which throw.  If an ETS constructor throws before completion,\n// the already-built objects are un-constructed.  Do not call the destructor if\n// this occurs.\n\nstatic std::atomic<int> gThrowValue;\nstatic int targetThrowValue = 3;\n\nclass Thrower {\npublic:\n    Thrower() {\n#if TBB_USE_EXCEPTIONS\n        if(++gThrowValue == targetThrowValue) {\n            throw std::bad_alloc();\n        }\n#endif\n    }\n};\n\n// MyThrower field of ThrowingConstructor will throw after a certain number of\n// construction calls.  The constructor unwinder wshould unconstruct the instance\n// of check_type<int> that was constructed just before.\nclass ThrowingConstructor {\n    CheckType<int> m_checktype;\n    Thrower m_throwing_field;\npublic:\n    int m_cnt;\n    ThrowingConstructor() : m_checktype(), m_throwing_field() { m_cnt = 0;}\n\n    bool operator==( const ThrowingConstructor& other ) const { return m_cnt == other.m_cnt; }\nprivate:\n};\n\n//\n// A helper class that simplifies writing the tests since minimalNComparable does not\n// define = or + operators.\n//\n\ntemplate< typename T >\nstruct test_helper {\n   static inline void init(T &e) { e = static_cast<T>(0); }\n   static inline void sum(T &e, const int addend ) { e += static_cast<T>(addend); }\n   static inline void sum(T &e, const double addend ) { e += static_cast<T>(addend); }\n   static inline void set(T &e, const int value ) { e = static_cast<T>(value); }\n   static inline double get(const T &e ) { return static_cast<double>(e); }\n};\n\ntemplate<size_t N>\nstruct test_helper<minimalNComparable<N> > {\n   static inline void init(minimalNComparable<N> &sum) { sum.set_value( 0 ); }\n   static inline void sum(minimalNComparable<N> &sum, const int addend ) { sum.set_value( sum.value() + addend); }\n   static inline void sum(minimalNComparable<N> &sum, const double addend ) { sum.set_value( sum.value() + static_cast<int>(addend)); }\n   static inline void sum(minimalNComparable<N> &sum, const minimalNComparable<N> &addend ) { sum.set_value( sum.value() + addend.value()); }\n   static inline void set(minimalNComparable<N> &v, const int value ) { v.set_value( static_cast<int>(value) ); }\n   static inline double get(const minimalNComparable<N> &sum ) { return static_cast<double>(sum.value()); }\n};\n\ntemplate<>\nstruct test_helper<ThrowingConstructor> {\n   static inline void init(ThrowingConstructor &sum) { sum.m_cnt = 0; }\n   static inline void sum(ThrowingConstructor &sum, const int addend ) { sum.m_cnt += addend; }\n   static inline void sum(ThrowingConstructor &sum, const double addend ) { sum.m_cnt += static_cast<int>(addend); }\n   static inline void sum(ThrowingConstructor &sum, const ThrowingConstructor &addend ) { sum.m_cnt += addend.m_cnt; }\n   static inline void set(ThrowingConstructor &v, const int value ) { v.m_cnt = static_cast<int>(value); }\n   static inline double get(const ThrowingConstructor &sum ) { return static_cast<double>(sum.m_cnt); }\n};\n\n//! Tag class used to make certain constructors hard to invoke accidentally.\nstruct SecretTagType {} SecretTag;\n\n//// functors and routines for initialization and combine\n\n//! Counts instances of FunctorFinit\nstatic std::atomic<int> FinitCounter;\n\ntemplate <typename T, int Value>\nstruct FunctorFinit {\n    FunctorFinit( const FunctorFinit& ) {++FinitCounter;}\n    FunctorFinit( SecretTagType ) {++FinitCounter;}\n    ~FunctorFinit() {--FinitCounter;}\n    T operator()() { return Value; }\n};\n\ntemplate <int Value>\nstruct FunctorFinit<ThrowingConstructor,Value> {\n    FunctorFinit( const FunctorFinit& ) {++FinitCounter;}\n    FunctorFinit( SecretTagType ) {++FinitCounter;}\n    ~FunctorFinit() {--FinitCounter;}\n    ThrowingConstructor operator()() { ThrowingConstructor temp; temp.m_cnt = Value; return temp; }\n};\n\ntemplate <size_t N, int Value>\nstruct FunctorFinit<minimalNComparable<N>,Value> {\n    FunctorFinit( const FunctorFinit& ) {++FinitCounter;}\n    FunctorFinit( SecretTagType ) {++FinitCounter;}\n    ~FunctorFinit() {--FinitCounter;}\n    minimalNComparable<N> operator()() {\n        minimalNComparable<N> result;\n        result.set_value( Value );\n        return result;\n    }\n};\n\n// Addition\n\ntemplate <typename T>\nstruct FunctorAddCombineRef {\n    T operator()(const T& left, const T& right) const {\n        return left+right;\n    }\n};\n\ntemplate <size_t N>\nstruct FunctorAddCombineRef<minimalNComparable<N> > {\n    minimalNComparable<N> operator()(const minimalNComparable<N>& left, const minimalNComparable<N>& right) const {\n        minimalNComparable<N> result;\n        result.set_value( left.value() + right.value() );\n        return result;\n    }\n};\n\ntemplate <>\nstruct FunctorAddCombineRef<ThrowingConstructor> {\n    ThrowingConstructor operator()(const ThrowingConstructor& left, const ThrowingConstructor& right) const {\n        ThrowingConstructor result;\n        result.m_cnt = ( left.m_cnt + right.m_cnt );\n        return result;\n    }\n};\n\ntemplate <typename T>\nstruct FunctorAddCombine {\n    T operator()(T left, T right ) const {\n        return FunctorAddCombineRef<T>()( left, right );\n    }\n};\n\ntemplate <typename T>\nT FunctionAddByRef( const T &left, const T &right) {\n    return FunctorAddCombineRef<T>()( left, right );\n}\n\ntemplate <typename T>\nT FunctionAdd( T left, T right) { return FunctionAddByRef(left,right); }\n\ntemplate <typename T>\nclass Accumulator {\npublic:\n    Accumulator(T& result) : my_result(result) {}\n    Accumulator(const Accumulator& other) : my_result(other.my_result) {}\n    Accumulator& operator=(const Accumulator& other) {\n        test_helper<T>::set(my_result, test_helper<T>::get(other));\n        return *this;\n    }\n    void operator()(const T& new_bit) { test_helper<T>::sum(my_result, new_bit); }\nprivate:\n    T& my_result;\n};\n\ntemplate <typename T>\nclass ClearingAccumulator {\npublic:\n    ClearingAccumulator(T& result) : my_result(result) {}\n    ClearingAccumulator(const ClearingAccumulator& other) : my_result(other.my_result) {}\n    ClearingAccumulator& operator=(const ClearingAccumulator& other) {\n        test_helper<T>::set(my_result, test_helper<T>::get(other));\n        return *this;\n    }\n    void operator()(T& new_bit) {\n        test_helper<T>::sum(my_result, new_bit);\n        test_helper<T>::init(new_bit);\n    }\n    static void AssertClean(const T& thread_local_value) {\n        T zero;\n        test_helper<T>::init(zero);\n        REQUIRE_MESSAGE(test_helper<T>::get(thread_local_value)==test_helper<T>::get(zero),\n               \"combine_each does not allow to modify thread local values?\");\n    }\nprivate:\n    T& my_result;\n};\n\n//// end functors and routines\n\n//------------------------------------------------------------------------------------------------------\n// Tests for tests cases\n//------------------------------------------------------------------------------------------------------\n\ntemplate <typename T, template<class> class Allocator>\nclass parallel_scalar_body: utils::NoAssign {\n    typedef oneapi::tbb::enumerable_thread_specific<T, Allocator<T> > ets_type;\n    ets_type &sums;\n    const char* allocator_name;\n\npublic:\n\n    parallel_scalar_body ( ets_type &_sums, const char *alloc_name ) : sums(_sums), allocator_name(alloc_name) { }\n\n    void operator()( const oneapi::tbb::blocked_range<int> &r ) const {\n        for (int i = r.begin(); i != r.end(); ++i)\n            test_helper<T>::sum( check_alignment(sums.local(),allocator_name), 1 );\n    }\n\n};\n\ntemplate< typename T, template<class> class Allocator>\nvoid run_parallel_scalar_tests_nocombine(const char* /* test_name */, const char *allocator_name) {\n\n    typedef oneapi::tbb::enumerable_thread_specific<T, Allocator<T> > ets_type;\n\n    Checker<T> my_check;\n\n    gThrowValue = 0;\n    struct fail_on_exception_guard {\n        bool dismiss = false;\n        ~fail_on_exception_guard() {\n            if (!dismiss) {\n                FAIL(\"The exception is not expected\");\n            }\n        }\n    } guard;\n    T default_value{};\n    guard.dismiss = true;\n\n    gThrowValue = 0;\n    {\n        // We assume that static_sums zero-initialized or has a default constructor that zeros it.\n        ets_type static_sums = ets_type( T() );\n\n        T exemplar;\n        test_helper<T>::init(exemplar);\n\n        for (int p = std::max(MinThread, 2); p <= MaxThread; ++p) {\n            oneapi::tbb::global_control gc(oneapi::tbb::global_control::max_allowed_parallelism, p);\n\n            T iterator_sum;\n            test_helper<T>::init(iterator_sum);\n\n            T finit_ets_sum;\n            test_helper<T>::init(finit_ets_sum);\n\n            T const_iterator_sum;\n            test_helper<T>::init(const_iterator_sum);\n\n            T range_sum;\n            test_helper<T>::init(range_sum);\n\n            T const_range_sum;\n            test_helper<T>::init(const_range_sum);\n\n            T cconst_sum;\n            test_helper<T>::init(cconst_sum);\n\n            T assign_sum;\n            test_helper<T>::init(assign_sum);\n\n            T cassgn_sum;\n            test_helper<T>::init(cassgn_sum);\n            T non_cassgn_sum;\n            test_helper<T>::init(non_cassgn_sum);\n\n            T static_sum;\n            test_helper<T>::init(static_sum);\n\n            for (int t = -1; t < REPETITIONS; ++t) {\n                static_sums.clear();\n\n                ets_type sums(exemplar);\n                FunctorFinit<T,0> my_finit(SecretTag);\n                ets_type finit_ets(my_finit);\n\n                REQUIRE( sums.empty());\n                oneapi::tbb::parallel_for( oneapi::tbb::blocked_range<int>( 0, N*p, RANGE_MIN ), parallel_scalar_body<T,Allocator>( sums, allocator_name ) );\n                REQUIRE( !sums.empty());\n\n                REQUIRE( finit_ets.empty());\n                oneapi::tbb::parallel_for( oneapi::tbb::blocked_range<int>( 0, N*p, RANGE_MIN ), parallel_scalar_body<T,Allocator>( finit_ets, allocator_name ) );\n                REQUIRE( !finit_ets.empty());\n\n                REQUIRE(static_sums.empty());\n                oneapi::tbb::parallel_for( oneapi::tbb::blocked_range<int>( 0, N*p, RANGE_MIN ), parallel_scalar_body<T,Allocator>( static_sums, allocator_name ) );\n                REQUIRE( !static_sums.empty());\n\n                // use iterator\n                typename ets_type::size_type size = 0;\n                for ( typename ets_type::iterator i = sums.begin(); i != sums.end(); ++i ) {\n                     ++size;\n                     test_helper<T>::sum(iterator_sum, *i);\n                }\n                REQUIRE( sums.size() == size);\n\n                // use const_iterator\n                for ( typename ets_type::const_iterator i = sums.begin(); i != sums.end(); ++i ) {\n                     test_helper<T>::sum(const_iterator_sum, *i);\n                }\n\n                // use range_type\n                typename ets_type::range_type r = sums.range();\n                for ( typename ets_type::range_type::const_iterator i = r.begin(); i != r.end(); ++i ) {\n                     test_helper<T>::sum(range_sum, *i);\n                }\n\n                // use const_range_type\n                const ets_type& csums = sums;\n                typename ets_type::const_range_type cr = csums.range();\n                for ( typename ets_type::const_range_type::iterator i = cr.begin(); i != cr.end(); ++i ) {\n                     test_helper<T>::sum(const_range_sum, *i);\n                }\n\n                // test copy constructor, with TLS-cached locals\n                typedef typename oneapi::tbb::enumerable_thread_specific<T, Allocator<T>, oneapi::tbb::ets_key_per_instance> cached_ets_type;\n\n                cached_ets_type cconst(sums);\n                oneapi::tbb::parallel_for( oneapi::tbb::blocked_range<int>(0, N*p, RANGE_MIN), [&]( const oneapi::tbb::blocked_range<int>& ) {\n                    bool exists = false;\n                    T& ref = cconst.local(exists);\n                    CHECK( (exists || ref == default_value) );\n                } );\n                cached_ets_type cconst_to_assign1 = cconst;\n                cached_ets_type cconst_to_assign2;\n                cconst_to_assign2 = std::move(cconst_to_assign1);\n                REQUIRE(cconst_to_assign2.size() == cconst.size());\n\n                for ( typename cached_ets_type::const_iterator i = cconst.begin(); i != cconst.end(); ++i ) {\n                     test_helper<T>::sum(cconst_sum, *i);\n                }\n\n                // test assignment\n                ets_type assigned;\n                assigned = sums;\n\n                for ( typename ets_type::const_iterator i = assigned.begin(); i != assigned.end(); ++i ) {\n                     test_helper<T>::sum(assign_sum, *i);\n                }\n\n                // test assign to and from cached locals\n                cached_ets_type cassgn;\n                cassgn = sums;\n                for ( typename cached_ets_type::const_iterator i = cassgn.begin(); i != cassgn.end(); ++i ) {\n                     test_helper<T>::sum(cassgn_sum, *i);\n                }\n\n                ets_type non_cassgn;\n                non_cassgn = cassgn;\n                for ( typename ets_type::const_iterator i = non_cassgn.begin(); i != non_cassgn.end(); ++i ) {\n                     test_helper<T>::sum(non_cassgn_sum, *i);\n                }\n\n                // test finit-initialized ets\n                for(typename ets_type::const_iterator i = finit_ets.begin(); i != finit_ets.end(); ++i) {\n                    test_helper<T>::sum(finit_ets_sum, *i);\n                }\n\n                // test static ets\n                for(typename ets_type::const_iterator i = static_sums.begin(); i != static_sums.end(); ++i) {\n                    test_helper<T>::sum(static_sum, *i);\n                }\n\n            }\n\n            REQUIRE(EXPECTED_SUM*p == test_helper<T>::get(iterator_sum));\n            REQUIRE(EXPECTED_SUM*p == test_helper<T>::get(const_iterator_sum));\n            REQUIRE(EXPECTED_SUM*p == test_helper<T>::get(range_sum));\n            REQUIRE(EXPECTED_SUM*p == test_helper<T>::get(const_range_sum));\n\n            REQUIRE(EXPECTED_SUM*p == test_helper<T>::get(cconst_sum));\n            REQUIRE(EXPECTED_SUM*p == test_helper<T>::get(assign_sum));\n            REQUIRE(EXPECTED_SUM*p == test_helper<T>::get(cassgn_sum));\n            REQUIRE(EXPECTED_SUM*p == test_helper<T>::get(non_cassgn_sum));\n            REQUIRE(EXPECTED_SUM*p == test_helper<T>::get(finit_ets_sum));\n            REQUIRE(EXPECTED_SUM*p == test_helper<T>::get(static_sum));\n        }\n    }  // Checker block\n}\n\ntemplate< typename T, template<class> class Allocator>\nvoid run_parallel_scalar_tests(const char* test_name, const char* allocator_name) {\n\n    typedef oneapi::tbb::enumerable_thread_specific<T, Allocator<T> > ets_type;\n    bool exception_caught = false;\n\n    // We assume that static_sums zero-initialized or has a default constructor that zeros it.\n    ets_type static_sums = ets_type( T() );\n\n    T exemplar;\n    test_helper<T>::init(exemplar);\n\n    int test_throw_count = 10;\n    // the test will be performed repeatedly until it does not throw.  For non-throwing types\n    // this means once; for the throwing type test it may loop two or three times.  The\n    // value of targetThrowValue will determine when and if the test will throw.\n    do {\n        targetThrowValue = test_throw_count;  // keep testing until we get no exception\n        exception_caught = false;\n#if TBB_USE_EXCEPTIONS\n        try {\n#endif\n            run_parallel_scalar_tests_nocombine<T,Allocator>(test_name, allocator_name);\n#if TBB_USE_EXCEPTIONS\n        }\n        catch(...) {}\n#endif\n        for (int p = std::max(MinThread, 2); p <= MaxThread; ++p) {\n            oneapi::tbb::global_control gc(oneapi::tbb::global_control::max_allowed_parallelism, p);\n\n            gThrowValue = 0;\n\n            T combine_sum;\n            test_helper<T>::init(combine_sum);\n\n            T combine_ref_sum;\n            test_helper<T>::init(combine_ref_sum);\n\n            T accumulator_sum;\n            test_helper<T>::init(accumulator_sum);\n\n            T static_sum;\n            test_helper<T>::init(static_sum);\n\n            T clearing_accumulator_sum;\n            test_helper<T>::init(clearing_accumulator_sum);\n\n            {\n                Checker<T> my_check;\n#if TBB_USE_EXCEPTIONS\n                try\n#endif\n                {\n                    for (int t = -1; t < REPETITIONS; ++t) {\n                        static_sums.clear();\n\n                        ets_type sums(exemplar);\n\n                        REQUIRE(sums.empty());\n                        oneapi::tbb::parallel_for(oneapi::tbb::blocked_range<int>(0, N * p, RANGE_MIN),\n                            parallel_scalar_body<T, Allocator>(sums, allocator_name));\n                        REQUIRE(!sums.empty());\n\n                        REQUIRE(static_sums.empty());\n                        oneapi::tbb::parallel_for(oneapi::tbb::blocked_range<int>(0, N * p, RANGE_MIN),\n                            parallel_scalar_body<T, Allocator>(static_sums, allocator_name));\n                        REQUIRE(!static_sums.empty());\n\n                        // Use combine\n                        test_helper<T>::sum(combine_sum, sums.combine(FunctionAdd<T>));\n                        test_helper<T>::sum(combine_ref_sum, sums.combine(FunctionAddByRef<T>));\n                        test_helper<T>::sum(static_sum, static_sums.combine(FunctionAdd<T>));\n\n                        // Accumulate with combine_each\n                        sums.combine_each(Accumulator<T>(accumulator_sum));\n                        // Accumulate and clear thread-local values\n                        sums.combine_each(ClearingAccumulator<T>(clearing_accumulator_sum));\n                        // Check that the values were cleared\n                        sums.combine_each(ClearingAccumulator<T>::AssertClean);\n                    }\n                }\n#if TBB_USE_EXCEPTIONS\n                catch (...) {\n                    exception_caught = true;\n                }\n#endif\n            }\n\n            if (!exception_caught) {\n                REQUIRE(EXPECTED_SUM * p == test_helper<T>::get(combine_sum));\n                REQUIRE(EXPECTED_SUM * p == test_helper<T>::get(combine_ref_sum));\n                REQUIRE(EXPECTED_SUM * p == test_helper<T>::get(static_sum));\n                REQUIRE(EXPECTED_SUM * p == test_helper<T>::get(accumulator_sum));\n                REQUIRE(EXPECTED_SUM * p == test_helper<T>::get(clearing_accumulator_sum));\n            }\n\n        }  // MinThread .. MaxThread\n        test_throw_count += 10;  // keep testing until we don't get an exception\n    } while (exception_caught && test_throw_count < 200);\n    REQUIRE_MESSAGE(!exception_caught, \"No non-exception test completed\");\n}\n\ntemplate <typename T, template<class> class Allocator>\nclass parallel_vector_for_body: utils::NoAssign {\n    typedef std::vector<T, oneapi::tbb::tbb_allocator<T> > container_type;\n    typedef oneapi::tbb::enumerable_thread_specific< container_type, Allocator<container_type> > ets_type;\n    ets_type &locals;\n    const char *allocator_name;\n\npublic:\n\n    parallel_vector_for_body ( ets_type &_locals, const char *aname ) : locals(_locals), allocator_name(aname) { }\n\n    void operator()( const oneapi::tbb::blocked_range<int> &r ) const {\n        T one;\n        test_helper<T>::set(one, 1);\n\n        for (int i = r.begin(); i < r.end(); ++i) {\n            check_alignment(locals.local(),allocator_name).push_back( one );\n        }\n    }\n\n};\n\ntemplate <typename R, typename T>\nstruct parallel_vector_reduce_body {\n\n    T sum;\n    size_t count;\n    typedef std::vector<T, oneapi::tbb::tbb_allocator<T> > container_type;\n\n    parallel_vector_reduce_body ( ) : count(0) { test_helper<T>::init(sum); }\n    parallel_vector_reduce_body ( parallel_vector_reduce_body<R, T> &, oneapi::tbb::split ) : count(0) {  test_helper<T>::init(sum); }\n\n    void operator()( const R &r ) {\n        for (typename R::iterator ri = r.begin(); ri != r.end(); ++ri) {\n            const container_type &v = *ri;\n            ++count;\n            for (typename container_type::const_iterator vi = v.begin(); vi != v.end(); ++vi) {\n                test_helper<T>::sum(sum, *vi);\n            }\n        }\n    }\n\n    void join( const parallel_vector_reduce_body &b ) {\n        test_helper<T>::sum(sum,b.sum);\n        count += b.count;\n    }\n\n};\n\ntemplate< typename T, template<class> class Allocator>\nvoid run_parallel_vector_tests(const char* /* test_name */, const char *allocator_name) {\n    typedef std::vector<T, oneapi::tbb::tbb_allocator<T> > container_type;\n    typedef oneapi::tbb::enumerable_thread_specific< container_type, Allocator<container_type> > ets_type;\n\n    for (int p = std::max(MinThread, 2); p <= MaxThread; ++p) {\n        oneapi::tbb::global_control gc(oneapi::tbb::global_control::max_allowed_parallelism, p);\n\n        T sum;\n        test_helper<T>::init(sum);\n\n        for (int t = -1; t < REPETITIONS; ++t) {\n            ets_type vs;\n\n            REQUIRE( vs.empty() );\n            oneapi::tbb::parallel_for( oneapi::tbb::blocked_range<int> (0, N*p, RANGE_MIN),\n                               parallel_vector_for_body<T,Allocator>( vs, allocator_name ) );\n            REQUIRE( !vs.empty() );\n\n            // copy construct\n            ets_type vs2(vs); // this causes an assertion failure, related to allocators...\n\n            // assign\n            ets_type vs3;\n            vs3 = vs;\n\n            parallel_vector_reduce_body< typename ets_type::const_range_type, T > pvrb;\n            oneapi::tbb::parallel_reduce ( vs.range(1), pvrb );\n\n            test_helper<T>::sum(sum, pvrb.sum);\n\n            REQUIRE( vs.size() == pvrb.count );\n            REQUIRE( vs2.size() == pvrb.count );\n            REQUIRE( vs3.size() == pvrb.count );\n\n            oneapi::tbb::flattened2d<ets_type> fvs = flatten2d(vs);\n            size_t ccount = fvs.size();\n            REQUIRE( ccount == size_t(N*p) );\n            size_t elem_cnt = 0;\n            typename oneapi::tbb::flattened2d<ets_type>::iterator it;\n            auto it2(it);\n            it = fvs.begin();\n            REQUIRE(it != it2);\n            typename oneapi::tbb::flattened2d<ets_type>::iterator it3;\n            typename oneapi::tbb::flattened2d<ets_type>::const_iterator cit = fvs.begin();\n            it3 = cit;\n            REQUIRE(it3 == cit);\n            REQUIRE(it3.operator->() == &(*it3));\n\n            for(typename oneapi::tbb::flattened2d<ets_type>::const_iterator i = fvs.begin(); i != fvs.end(); ++i) {\n                ++elem_cnt;\n            };\n            REQUIRE( ccount == elem_cnt );\n\n            elem_cnt = 0;\n            for(typename oneapi::tbb::flattened2d<ets_type>::iterator i = fvs.begin(); i != fvs.end(); i++) {\n                ++elem_cnt;\n            };\n            REQUIRE( ccount == elem_cnt );\n\n            // Test the ETS constructor with multiple args\n            T minus_one;\n            test_helper<T>::set(minus_one, -1);\n            // Set ETS to construct \"local\" vectors pre-occupied with 25 \"minus_one\"s\n            // Cast 25 to size_type to prevent Intel Compiler SFINAE compilation issues with gcc 5.\n            ets_type vvs( typename container_type::size_type(25), minus_one, oneapi::tbb::tbb_allocator<T>() );\n            REQUIRE( vvs.empty() );\n            oneapi::tbb::parallel_for ( oneapi::tbb::blocked_range<int> (0, N*p, RANGE_MIN), parallel_vector_for_body<T,Allocator>( vvs, allocator_name ) );\n            REQUIRE( !vvs.empty() );\n\n            parallel_vector_reduce_body< typename ets_type::const_range_type, T > pvrb2;\n            oneapi::tbb::parallel_reduce ( vvs.range(1), pvrb2 );\n            REQUIRE( pvrb2.count == vvs.size() );\n            REQUIRE( test_helper<T>::get(pvrb2.sum) == N*p-pvrb2.count*25 );\n\n            oneapi::tbb::flattened2d<ets_type> fvvs = flatten2d(vvs);\n            ccount = fvvs.size();\n            REQUIRE( ccount == N*p+pvrb2.count*25 );\n        }\n\n        double result_value = test_helper<T>::get(sum);\n        REQUIRE( EXPECTED_SUM*p == result_value);\n    }\n}\n\ntemplate<typename T, template<class> class Allocator>\nvoid run_cross_type_vector_tests(const char* /* test_name */) {\n    const char* allocator_name = \"default\";\n    typedef std::vector<T, oneapi::tbb::tbb_allocator<T> > container_type;\n\n    for (int p = std::max(MinThread, 2); p <= MaxThread; ++p) {\n        oneapi::tbb::global_control gc(oneapi::tbb::global_control::max_allowed_parallelism, p);\n\n        T sum;\n        test_helper<T>::init(sum);\n\n        for (int t = -1; t < REPETITIONS; ++t) {\n            typedef typename oneapi::tbb::enumerable_thread_specific< container_type, Allocator<container_type>, oneapi::tbb::ets_no_key > ets_nokey_type;\n            typedef typename oneapi::tbb::enumerable_thread_specific< container_type, Allocator<container_type>, oneapi::tbb::ets_key_per_instance > ets_tlskey_type;\n            ets_nokey_type vs;\n\n            REQUIRE( vs.empty());\n            oneapi::tbb::parallel_for ( oneapi::tbb::blocked_range<int> (0, N*p, RANGE_MIN), parallel_vector_for_body<T, Allocator>( vs, allocator_name ) );\n            REQUIRE( !vs.empty());\n\n            // copy construct\n            ets_tlskey_type vs2(vs);\n\n            // assign\n            ets_nokey_type vs3;\n            vs3 = vs2;\n\n            parallel_vector_reduce_body< typename ets_nokey_type::const_range_type, T > pvrb;\n            oneapi::tbb::parallel_reduce ( vs3.range(1), pvrb );\n\n            test_helper<T>::sum(sum, pvrb.sum);\n\n            REQUIRE( vs3.size() == pvrb.count);\n\n            oneapi::tbb::flattened2d<ets_nokey_type> fvs = flatten2d(vs3);\n            size_t ccount = fvs.size();\n            size_t elem_cnt = 0;\n            for(typename oneapi::tbb::flattened2d<ets_nokey_type>::const_iterator i = fvs.begin(); i != fvs.end(); ++i) {\n                ++elem_cnt;\n            };\n            REQUIRE(ccount == elem_cnt);\n\n            elem_cnt = 0;\n            for(typename oneapi::tbb::flattened2d<ets_nokey_type>::iterator i = fvs.begin(); i != fvs.end(); ++i) {\n                ++elem_cnt;\n            };\n            REQUIRE(ccount == elem_cnt);\n\n            oneapi::tbb::flattened2d<ets_nokey_type> fvs2 = flatten2d(vs3, vs3.begin(), std::next(vs3.begin()));\n            REQUIRE(std::distance(fvs2.begin(), fvs2.end()) == vs3.begin()->size());\n            const oneapi::tbb::flattened2d<ets_nokey_type>& cfvs2(fvs2);\n            REQUIRE(std::distance(cfvs2.begin(), cfvs2.end()) == vs3.begin()->size());\n        }\n\n        double result_value = test_helper<T>::get(sum);\n        REQUIRE( EXPECTED_SUM*p == result_value);\n    }\n}\n\ntemplate< typename T >\nvoid run_serial_scalar_tests(const char* /* test_name */) {\n    T sum;\n    test_helper<T>::init(sum);\n\n    for (int t = -1; t < REPETITIONS; ++t) {\n        for (int i = 0; i < N; ++i) {\n            test_helper<T>::sum(sum,1);\n        }\n    }\n\n    double result_value = test_helper<T>::get(sum);\n    REQUIRE( EXPECTED_SUM == result_value);\n}\n\ntemplate< typename T >\nvoid run_serial_vector_tests(const char* /* test_name */) {\n    T sum;\n    test_helper<T>::init(sum);\n    T one;\n    test_helper<T>::set(one, 1);\n\n    for (int t = -1; t < REPETITIONS; ++t) {\n        std::vector<T, oneapi::tbb::tbb_allocator<T> > v;\n        for (int i = 0; i < N; ++i) {\n            v.push_back( one );\n        }\n        for (typename std::vector<T, oneapi::tbb::tbb_allocator<T> >::const_iterator i = v.begin(); i != v.end(); ++i)\n            test_helper<T>::sum(sum, *i);\n    }\n\n    double result_value = test_helper<T>::get(sum);\n    REQUIRE( EXPECTED_SUM == result_value);\n}\n\nconst size_t line_size = oneapi::tbb::detail::max_nfs_size;\n\nvoid run_reference_check() {\n    run_serial_scalar_tests<int>(\"int\");\n    run_serial_scalar_tests<double>(\"double\");\n    run_serial_scalar_tests<minimalNComparable<> >(\"minimalNComparable<>\");\n    run_serial_vector_tests<int>(\"std::vector<int, oneapi::tbb::tbb_allocator<int> >\");\n    run_serial_vector_tests<double>(\"std::vector<double, oneapi::tbb::tbb_allocator<double> >\");\n}\n\ntemplate<template<class>class Allocator>\nvoid run_parallel_tests(const char *allocator_name) {\n    run_parallel_scalar_tests<int, Allocator>(\"int\",allocator_name);\n    run_parallel_scalar_tests<double, Allocator>(\"double\",allocator_name);\n    run_parallel_scalar_tests_nocombine<minimalNComparable<>,Allocator>(\"minimalNComparable<>\",allocator_name);\n    run_parallel_scalar_tests<ThrowingConstructor, Allocator>(\"ThrowingConstructor\", allocator_name);\n    run_parallel_vector_tests<int, Allocator>(\"std::vector<int, oneapi::tbb::tbb_allocator<int> >\",allocator_name);\n    run_parallel_vector_tests<double, Allocator>(\"std::vector<double, oneapi::tbb::tbb_allocator<double> >\",allocator_name);\n}\n\nvoid run_cross_type_tests() {\n    // cross-type scalar tests are part of run_parallel_scalar_tests_nocombine\n    run_cross_type_vector_tests<int, oneapi::tbb::tbb_allocator>(\"std::vector<int, oneapi::tbb::tbb_allocator<int> >\");\n    run_cross_type_vector_tests<double, oneapi::tbb::tbb_allocator>(\"std::vector<double, oneapi::tbb::tbb_allocator<double> >\");\n}\n\ntemplate<typename T, template<class> class Allocator, typename Init>\noneapi::tbb::enumerable_thread_specific<T,Allocator<T> > MakeETS( Init init ) {\n    return oneapi::tbb::enumerable_thread_specific<T,Allocator<T> >(init);\n}\n// In some GCC versions, parameter packs in lambdas might cause compile errors\ntemplate<typename ETS, typename... P>\nstruct MakeETS_Functor {\n    ETS operator()( typename std::decay<P>::type&&... params ) {\n        return ETS(std::move(params)...);\n    }\n};\ntemplate<typename T, template<class> class Allocator, typename... P>\noneapi::tbb::enumerable_thread_specific<T,Allocator<T> > MakeETS( oneapi::tbb::detail::stored_pack<P...> pack ) {\n    typedef oneapi::tbb::enumerable_thread_specific<T,Allocator<T> > result_type;\n    return oneapi::tbb::detail::call_and_return< result_type >(\n        MakeETS_Functor<result_type,P...>(), std::move(pack)\n    );\n}\n\ntemplate<typename T, template<class> class Allocator, typename InitSrc, typename InitDst, typename Validator>\nvoid ets_copy_assign_test( InitSrc init1, InitDst init2, Validator check, const char *allocator_name ) {\n    typedef oneapi::tbb::enumerable_thread_specific<T, Allocator<T> > ets_type;\n\n    // Create the source instance\n    const ets_type& cref_binder = MakeETS<T, Allocator>(init1);\n    ets_type& source = const_cast<ets_type&>(cref_binder);\n    check(check_alignment(source.local(),allocator_name));\n\n    // Test copy construction\n    bool existed = false;\n    ets_type copy(source);\n    check(check_alignment(copy.local(existed),allocator_name));\n    REQUIRE_MESSAGE(existed, \"Local data not created by ETS copy constructor\");\n    copy.clear();\n    check(check_alignment(copy.local(),allocator_name));\n\n    // Test assignment\n    existed = false;\n    ets_type assign(init2);\n    assign = source;\n    check(check_alignment(assign.local(existed),allocator_name));\n    REQUIRE_MESSAGE(existed, \"Local data not created by ETS assignment\");\n    assign.clear();\n    check(check_alignment(assign.local(),allocator_name));\n\n    // Create the source instance\n    ets_type&& rvref_binder = MakeETS<T, Allocator>(init1);\n    check(check_alignment(rvref_binder.local(),allocator_name));\n\n    // Test move construction\n    existed = false;\n    ets_type moved(rvref_binder);\n    check(check_alignment(moved.local(existed),allocator_name));\n    REQUIRE_MESSAGE(existed, \"Local data not created by ETS move constructor\");\n    moved.clear();\n    check(check_alignment(moved.local(),allocator_name));\n\n    // Test assignment\n    existed = false;\n    ets_type move_assign(init2);\n    move_assign = std::move(moved);\n    check(check_alignment(move_assign.local(existed),allocator_name));\n    REQUIRE_MESSAGE(existed, \"Local data not created by ETS move assignment\");\n    move_assign.clear();\n    check(check_alignment(move_assign.local(),allocator_name));\n}\n\ntemplate<typename T, int Expected>\nstruct Validator {\n    void operator()( const T& value ) {\n        REQUIRE(test_helper<T>::get(value) == Expected);\n    }\n    void operator()( const std::pair<int,T>& value ) {\n        REQUIRE(value.first > 0);\n        REQUIRE(test_helper<T>::get(value.second) == Expected*value.first);\n    }\n};\n\ntemplate <typename T, template<class> class Allocator>\nvoid run_assign_and_copy_constructor_test(const char* /* test_name */, const char *allocator_name) {\n    #define EXPECTED 3142\n\n    // test with exemplar initializer\n    T src_init;\n    test_helper<T>::set(src_init,EXPECTED);\n    T other_init;\n    test_helper<T>::init(other_init);\n    ets_copy_assign_test<T, Allocator>(src_init, other_init, Validator<T,EXPECTED>(), allocator_name);\n\n    // test with function initializer\n    FunctorFinit<T,EXPECTED> src_finit(SecretTag);\n    FunctorFinit<T,0> other_finit(SecretTag);\n    ets_copy_assign_test<T, Allocator>(src_finit, other_finit, Validator<T,EXPECTED>(), allocator_name);\n\n    // test with multi-argument \"emplace\" initializer\n    // The arguments are wrapped into oneapi::tbb::internal::stored_pack to avoid variadic templates in ets_copy_assign_test.\n    test_helper<T>::set(src_init,EXPECTED*17);\n    ets_copy_assign_test< std::pair<int,T>, Allocator>(oneapi::tbb::detail::save_pack(17,src_init), std::make_pair(-1,T()), Validator<T,EXPECTED>(), allocator_name);\n    #undef EXPECTED\n}\n\ntemplate< template<class> class Allocator>\nvoid run_assignment_and_copy_constructor_tests(const char* allocator_name) {\n    run_assign_and_copy_constructor_test<int, Allocator>(\"int\", allocator_name);\n    run_assign_and_copy_constructor_test<double, Allocator>(\"double\", allocator_name);\n    // Try class sizes that are close to a cache line in size, in order to check padding calculations.\n    run_assign_and_copy_constructor_test<minimalNComparable<line_size-1>, Allocator >(\"minimalNComparable<line_size-1>\", allocator_name);\n    run_assign_and_copy_constructor_test<minimalNComparable<line_size>, Allocator >(\"minimalNComparable<line_size>\", allocator_name);\n    run_assign_and_copy_constructor_test<minimalNComparable<line_size+1>, Allocator >(\"minimalNComparable<line_size+1>\", allocator_name);\n    REQUIRE(FinitCounter==0);\n}\n\n// Class with no default constructor\nclass HasNoDefaultConstructor {\n    HasNoDefaultConstructor();\npublic:\n    HasNoDefaultConstructor( SecretTagType ) {}\n};\n// Initialization functor for HasNoDefaultConstructor\nstruct HasNoDefaultConstructorFinit {\n    HasNoDefaultConstructor operator()() {\n        return HasNoDefaultConstructor(SecretTag);\n    }\n};\n// Combine functor for HasNoDefaultConstructor\nstruct HasNoDefaultConstructorCombine {\n    HasNoDefaultConstructor operator()( HasNoDefaultConstructor, HasNoDefaultConstructor ) {\n        return HasNoDefaultConstructor(SecretTag);\n    }\n};\n\n// Class that only has a constructor with multiple parameters and a move constructor\nclass HasSpecialAndMoveCtor : utils::NoCopy {\n    HasSpecialAndMoveCtor();\npublic:\n    HasSpecialAndMoveCtor( SecretTagType, size_t = size_t(0), const char* = \"\" ) {}\n    HasSpecialAndMoveCtor( HasSpecialAndMoveCtor&& ) {}\n};\n\n// No-op combine-each functor\ntemplate<typename V>\nstruct EmptyCombineEach {\n    void operator()( const V& ) { }\n};\n\n//! Test situations where only default constructor or copy constructor is required.\ntemplate<template<class> class Allocator>\nvoid TestInstantiation(const char* /* allocator_name */) {\n    // Test instantiation is possible when copy constructor is not required.\n    oneapi::tbb::enumerable_thread_specific<utils::NoCopy, Allocator<utils::NoCopy> > ets1;\n    ets1.local();\n    ets1.combine_each(EmptyCombineEach<utils::NoCopy>());\n\n    // Test instantiation when default constructor is not required, because exemplar is provided.\n    HasNoDefaultConstructor x(SecretTag);\n    oneapi::tbb::enumerable_thread_specific<HasNoDefaultConstructor, Allocator<HasNoDefaultConstructor> > ets2(x);\n    ets2.local();\n    ets2.combine(HasNoDefaultConstructorCombine());\n\n    // Test instantiation when default constructor is not required, because init function is provided.\n    HasNoDefaultConstructorFinit f;\n    oneapi::tbb::enumerable_thread_specific<HasNoDefaultConstructor, Allocator<HasNoDefaultConstructor> > ets3(f);\n    ets3.local();\n    ets3.combine(HasNoDefaultConstructorCombine());\n\n    // Test instantiation with multiple arguments\n    oneapi::tbb::enumerable_thread_specific<HasSpecialAndMoveCtor, Allocator<HasSpecialAndMoveCtor> > ets4(SecretTag, 0x42, \"meaningless\");\n    ets4.local();\n    ets4.combine_each(EmptyCombineEach<HasSpecialAndMoveCtor>());\n    // Test instantiation with one argument that should however use the variadic constructor\n    oneapi::tbb::enumerable_thread_specific<HasSpecialAndMoveCtor, Allocator<HasSpecialAndMoveCtor> > ets5(SecretTag);\n    ets5.local();\n    ets5.combine_each(EmptyCombineEach<HasSpecialAndMoveCtor>());\n    // Test that move operations do not impose extra requirements\n    // Default allocator is used. If it does not match Allocator, there will be elementwise move\n    oneapi::tbb::enumerable_thread_specific<HasSpecialAndMoveCtor> ets6( std::move(ets4) );\n    ets6.combine_each(EmptyCombineEach<HasSpecialAndMoveCtor>());\n    ets6 = std::move(ets5);\n}\n\nvoid TestMemberTypes() {\n    using default_container_type = oneapi::tbb::enumerable_thread_specific<int>;\n    static_assert(std::is_same<typename default_container_type::allocator_type, oneapi::tbb::cache_aligned_allocator<int>>::value,\n            \"Incorrect default template allocator\");\n\n    using test_allocator_type = std::allocator<int>;\n    using ets_container_type = oneapi::tbb::enumerable_thread_specific<int, test_allocator_type>;\n\n    static_assert(std::is_same<typename ets_container_type::allocator_type, test_allocator_type>::value,\n                  \"Incorrect container allocator_type member type\");\n\n    using value_type = typename ets_container_type::value_type;\n\n    static_assert(std::is_same<typename ets_container_type::value_type, int>::value,\n                  \"Incorrect container value_type member type\");\n    static_assert(std::is_same<typename ets_container_type::reference, value_type&>::value,\n                  \"Incorrect container reference member type\");\n    static_assert(std::is_same<typename ets_container_type::const_reference, const value_type&>::value,\n                  \"Incorrect container const_reference member type\");\n\n    using allocator_type = typename ets_container_type::allocator_type;\n    static_assert(std::is_same<typename ets_container_type::pointer, typename std::allocator_traits<allocator_type>::pointer>::value,\n                  \"Incorrect container pointer member type\");\n    static_assert(std::is_same<typename ets_container_type::const_pointer, typename std::allocator_traits<allocator_type>::const_pointer>::value,\n                  \"Incorrect container const_pointer member type\");\n\n    static_assert(std::is_unsigned<typename ets_container_type::size_type>::value,\n                  \"Incorrect container size_type member type\");\n    static_assert(std::is_signed<typename ets_container_type::difference_type>::value,\n                  \"Incorrect container difference_type member type\");\n\n    static_assert(utils::is_random_access_iterator<typename ets_container_type::iterator>::value,\n                  \"Incorrect container iterator member type\");\n    static_assert(!std::is_const<typename ets_container_type::iterator::value_type>::value,\n                  \"Incorrect container iterator member type\");\n    static_assert(utils::is_random_access_iterator<typename ets_container_type::const_iterator>::value,\n                  \"Incorrect container const_iterator member type\");\n    static_assert(std::is_const<typename ets_container_type::const_iterator::value_type>::value,\n                  \"Incorrect container iterator member type\");\n}\n\nsize_t init_tbb_alloc_mask() {\n    // TODO: use __TBB_alignof(T) to check for local() results instead of using internal knowledges of ets element padding\n    if(oneapi::tbb::tbb_allocator<int>::allocator_type() == oneapi::tbb::tbb_allocator<int>::standard) {\n        // scalable allocator is not available.\n        return 1;\n    }\n    else {\n        // this value is for large objects, but will be correct for small.\n        return 64; // TBB_REVAMP_TODO: enable as estimatedCacheLineSize when tbbmalloc is available;\n    }\n}\n\n// TODO: rework the test not to depend on oneTBB internals\nstatic const size_t cache_allocator_mask = oneapi::tbb::detail::r1::cache_line_size();\nstatic const size_t tbb_allocator_mask = init_tbb_alloc_mask();\n\nvoid TestETSIterator() {\n    using ets_type = oneapi::tbb::enumerable_thread_specific<int>;\n    if (utils::get_platform_max_threads() == 1) {\n        ets_type ets;\n        ets.local() = 1;\n        REQUIRE_MESSAGE(std::next(ets.begin()) == ets.end(), \"Incorrect begin or end of the ETS\");\n        REQUIRE_MESSAGE(std::prev(ets.end()) == ets.begin(), \"Incorrect begin or end of the ETS\");\n    } else {\n        std::atomic<std::size_t> sync_counter(0);\n\n        const std::size_t expected_ets_size = 2;\n        ets_type ets;\n        const ets_type& cets(ets);\n\n        auto fill_ets_body = [&](){\n            ets.local() = 42;\n            ++sync_counter;\n            while(sync_counter != expected_ets_size)\n                utils::yield();\n        };\n\n        oneapi::tbb::parallel_invoke(fill_ets_body, fill_ets_body);\n        REQUIRE_MESSAGE(ets.size() == expected_ets_size, \"Incorrect ETS size\");\n\n        std::size_t counter = 0;\n        auto iter = ets.begin();\n        while(iter != ets.end()) {\n            ++counter % 2 == 0 ? ++iter : iter++;\n        }\n        REQUIRE(counter == expected_ets_size);\n        while(iter != ets.begin()) {\n            --counter % 2 == 0 ? --iter : iter--;\n        }\n        REQUIRE(counter == 0);\n        auto citer = cets.begin();\n        while(citer != cets.end()) {\n            ++counter % 2 == 0 ? ++citer : citer++;\n        }\n        REQUIRE(counter == expected_ets_size);\n        while(citer != cets.begin()) {\n            --counter % 2 == 0 ? --citer : citer--;\n        }\n        REQUIRE(counter == 0);\n        REQUIRE(ets.begin() + expected_ets_size == ets.end());\n        REQUIRE(expected_ets_size + ets.begin() == ets.end());\n        REQUIRE(ets.end() - expected_ets_size == ets.begin());\n\n        typename ets_type::iterator it;\n        it = ets.begin();\n\n        auto it_bkp = it;\n        auto it2 = it++;\n        REQUIRE(it2 == it_bkp);\n\n        it = ets.begin();\n        it += expected_ets_size;\n        REQUIRE(it == ets.end());\n        it -= expected_ets_size;\n        REQUIRE(it == ets.begin());\n\n        for (int i = 0; i < int(expected_ets_size - 1); ++i) {\n            REQUIRE(ets.begin()[i] == 42);\n            REQUIRE(std::prev(ets.end())[-i] == 42);\n        }\n\n        auto iter1 = ets.begin();\n        auto iter2 = ets.end();\n        REQUIRE(iter1 < iter2);\n        REQUIRE(iter1 <= iter2);\n        REQUIRE(!(iter1 > iter2));\n        REQUIRE(!(iter1 >= iter2));\n    }\n}\n\ntemplate <bool ExpectEqual, bool ExpectLess, typename Iterator>\nvoid DoETSIteratorComparisons( const Iterator& lhs, const Iterator& rhs ) {\n    // TODO: replace with testEqualityAndLessComparisons after adding <=> operator for ETS iterator\n    using namespace comparisons_testing;\n    testEqualityComparisons<ExpectEqual>(lhs, rhs);\n    testTwoWayComparisons<ExpectEqual, ExpectLess>(lhs, rhs);\n}\n\ntemplate <typename Iterator, typename ETS>\nvoid TestETSIteratorComparisonsBasic( ETS& ets ) {\n    REQUIRE_MESSAGE(!ets.empty(), \"Incorrect test setup\");\n    Iterator it1, it2;\n    DoETSIteratorComparisons</*ExpectEqual = */true, /*ExpectLess = */false>(it1, it2);\n    it1 = ets.begin();\n    it2 = ets.begin();\n    DoETSIteratorComparisons</*ExpectEqual = */true, /*ExpectLess = */false>(it1, it2);\n    it2 = std::prev(ets.end());\n    DoETSIteratorComparisons</*ExpectEqual = */false, /*ExpectLess = */true>(it1, it2);\n}\n\nvoid TestETSIteratorComparisons() {\n    using ets_type = oneapi::tbb::enumerable_thread_specific<int>;\n    ets_type ets;\n\n    // Fill the ets\n    const std::size_t expected_ets_size = 2;\n    std::atomic<std::size_t> sync_counter(0);\n    auto fill_ets_body = [&](int){\n            ets.local() = 42;\n            ++sync_counter;\n            while(sync_counter != expected_ets_size)\n                std::this_thread::yield();\n        };\n\n    utils::NativeParallelFor(2, fill_ets_body);\n\n    TestETSIteratorComparisonsBasic<typename ets_type::iterator>(ets);\n    const ets_type& cets = ets;\n    TestETSIteratorComparisonsBasic<typename ets_type::const_iterator>(cets);\n}\n\n//! Test container instantiation\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Instantiation\") {\n    AlignMask = cache_allocator_mask;\n    TestInstantiation<oneapi::tbb::cache_aligned_allocator>(\"oneapi::tbb::cache_aligned_allocator\");\n    AlignMask = tbb_allocator_mask;\n    TestInstantiation<oneapi::tbb::tbb_allocator>(\"oneapi::tbb::tbb_allocator\");\n}\n\n//! Test assignment and copy constructor\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Assignment and copy constructor\") {\n    AlignMask = cache_allocator_mask;\n    run_assignment_and_copy_constructor_tests<oneapi::tbb::cache_aligned_allocator>(\"oneapi::tbb::cache_aligned_allocator\");\n    AlignMask = tbb_allocator_mask;\n    run_assignment_and_copy_constructor_tests<oneapi::tbb::tbb_allocator>(\"oneapi::tbb::tbb_allocator\");\n}\n\n//! Test for basic ETS functionality and requirements\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Basic ETS functionality\") {\n    const int LOCALS = 10;\n\n    oneapi::tbb::enumerable_thread_specific<int> ets;\n    ets.local() = 42;\n\n    utils::SpinBarrier barrier(LOCALS);\n    utils::NativeParallelFor(LOCALS, [&](int i) {\n        barrier.wait();\n        ets.local() = i;\n        CHECK(ets.local() == i);\n    });\n    CHECK(ets.local() == 42);\n\n    int ref_combined{0};\n    std::vector<int> sequence(LOCALS);\n    std::iota(sequence.begin(), sequence.end(), 0);\n    for (int i : sequence) {\n        ref_combined += i;\n    }\n    ref_combined += 42;\n    int ets_combined = ets.combine([](int x, int y) {\n        return x + y;\n    });\n    CHECK(ref_combined == ets_combined);\n}\n\n//! Test ETS usage in parallel algorithms.\n//! Also tests flattened2d and flattend2d\n//! \\brief \\ref interface \\ref requirement \\ref stress\nTEST_CASE(\"Parallel test\") {\n    run_reference_check();\n    AlignMask = cache_allocator_mask;\n    run_parallel_tests<oneapi::tbb::cache_aligned_allocator>(\"oneapi::tbb::cache_aligned_allocator\");\n    AlignMask = tbb_allocator_mask;\n    run_parallel_tests<oneapi::tbb::tbb_allocator>(\"oneapi::tbb::tbb_allocator\");\n    run_cross_type_tests();\n}\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Member types\") {\n    TestMemberTypes();\n}\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"enumerable_thread_specific iterator\") {\n    TestETSIterator();\n}\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"enumerable_thread_specific iterator comparisons\") {\n    TestETSIteratorComparisons();\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_flowgraph.h",
    "content": "/*\n    Copyright (c) 2020-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_conformance_conformance_flowgraph_H\n#define __TBB_test_conformance_conformance_flowgraph_H\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/graph_utils.h\"\n#include \"common/concurrency_tracker.h\"\n\n#include \"oneapi/tbb/flow_graph.h\"\n#include \"oneapi/tbb/task_arena.h\"\n#include \"oneapi/tbb/global_control.h\"\n\nnamespace conformance {\n\nconstexpr int expected = 5;\n\ntemplate<typename V>\nusing test_push_receiver = oneapi::tbb::flow::queue_node<V>;\n\ntemplate<typename Input, typename Output = Input>\nusing multifunc_ports_t =\n      typename oneapi::tbb::flow::multifunction_node<Input, std::tuple<Output>>::output_ports_type;\n\ntemplate<typename Input, typename Output = Input>\nusing async_ports_t =\n      typename oneapi::tbb::flow::async_node<Input, Output>::gateway_type;\n\ntemplate<bool DefaultConstructible, bool CopyConstructible, bool CopyAssignable>\nstruct message {\n    int data;\n\n    message(int _data) : data(_data) {};\n\n    template<bool T = DefaultConstructible, typename = typename std::enable_if<T>::type>\n    message(){};\n\n    template<bool T = CopyConstructible, typename = typename std::enable_if<T>::type>\n    message(const message& msg) : data(msg.data) {};\n\n    template<bool T = CopyAssignable, typename = typename std::enable_if<T>::type>\n    message& operator=(const message& msg) {\n        this->data = msg.data;\n        return *this;\n    };\n\n    bool operator==(const int expected_data) const {\n        return data == expected_data;\n    }\n\n    bool operator==(const message& msg) const {\n        return data == msg.data;\n    }\n\n    operator std::size_t() const {\n        return static_cast<std::size_t>(data);\n    }\n\n    operator int() const {\n        return data;\n    }\n};\n\ntemplate<typename V>\ntypename std::enable_if<!std::is_default_constructible<V>::value, std::vector<V>>::type get_values( test_push_receiver<V>& rr ) {\n    std::vector<V> messages;\n    V tmp(0);\n\n    while (rr.try_get(tmp)) {\n        messages.push_back(tmp);\n    }\n    return messages;\n}\n\ntemplate<typename V>\ntypename std::enable_if<std::is_default_constructible<V>::value, std::vector<V>>::type get_values( test_push_receiver<V>& rr ) {\n    std::vector<V> messages;\n    V tmp;\n\n    while (rr.try_get(tmp)) {\n        messages.push_back(tmp);\n    }\n    return messages;\n}\n\ntemplate<typename Node, typename InputType = void>\nbool produce_messages(Node& node, int arg = 1) {\n    utils::suppress_unused_warning(arg);\n#if defined CONFORMANCE_INPUT_NODE\n    node.activate();\n    return true;\n#elif defined CONFORMANCE_CONTINUE_NODE\n    return node.try_put(InputType());\n#else\n    return node.try_put(InputType(arg));\n#endif\n}\n\ntemplate<typename T, typename U>\ntypename std::enable_if<std::is_same<T, U>::value, bool>::type check_output_type(){\n    return true;\n}\n\ntemplate<typename T, typename U>\ntypename std::enable_if<!std::is_same<T, U>::value, bool>::type check_output_type(){\n    return false;\n}\n\ntemplate<typename T>\nstruct sequencer_functor {\n    struct seq_message {\n        std::size_t id;\n        T data;\n    };\n\n    using input_type = T;\n\n    std::size_t operator()(T v) {\n        return v;\n    }\n\n    std::size_t operator()(seq_message msg) {\n        return msg.id;\n    }\n};\n\ntemplate<typename OutputType>\nstruct track_first_id_functor {\n    int my_id;\n    static std::atomic<int> first_id;\n\n    track_first_id_functor(int id) : my_id(id) {}\n\n    OutputType operator()( OutputType argument ) {\n        int old_value = -1;\n        while(first_id == -1 &&\n              !first_id.compare_exchange_strong(old_value, my_id));\n        return argument;\n    }\n\n    template<typename InputType>\n    OutputType operator()( InputType& ) {\n        return operator()(OutputType(0));\n    }\n\n    template<typename InputType>\n    void operator()( InputType, async_ports_t<InputType, OutputType>& g ) {\n        g.try_put(operator()(OutputType(0)));\n    }\n\n    template<typename InputType>\n    void operator()( InputType, multifunc_ports_t<InputType, OutputType>& op ) {\n        std::get<0>(op).try_put(operator()(OutputType(0)));\n    }\n};\n\ntemplate<typename OutputType>\nstd::atomic<int> track_first_id_functor<OutputType>::first_id = {-1};\n\ntemplate<typename OutputType>\nstruct counting_functor {\n    OutputType return_value;\n\n    static std::atomic<std::size_t> execute_count;\n\n    counting_functor( OutputType value = OutputType(0) ) : return_value(value) {\n        execute_count = 0;\n    }\n\n    counting_functor( const counting_functor & c ) : return_value(static_cast<int>(c.return_value)) {\n        execute_count = 0;\n    }\n\n    template<typename InputType>\n    OutputType operator()( InputType ) {\n        ++execute_count;\n        return return_value;\n    }\n\n    template<typename InputType>\n    void operator()( InputType, multifunc_ports_t<InputType, OutputType>& op ) {\n        ++execute_count;\n        std::get<0>(op).try_put(return_value);\n    }\n\n    OutputType operator()( oneapi::tbb::flow_control& fc ) {\n        ++execute_count;\n        if(execute_count > std::size_t(return_value)) {\n            fc.stop();\n            return return_value;\n        }\n        return return_value;\n    }\n\n    template<typename InputType>\n    void operator()( InputType, async_ports_t<InputType, OutputType>& g ) {\n        ++execute_count;\n        g.try_put(return_value);\n    }\n};\n\ntemplate<typename OutputType>\nstd::atomic<std::size_t> counting_functor<OutputType>::execute_count = {0};\n\ntemplate<typename OutputType>\nstruct dummy_functor {\n    template<typename InputType>\n    OutputType operator()( InputType ) {\n#ifdef CONFORMANCE_CONTINUE_NODE\n        return OutputType();\n#else\n        return OutputType(0);\n#endif\n    }\n\n    template<typename InputType>\n    void operator()( InputType, multifunc_ports_t<InputType, OutputType>& op ) {\n        std::get<0>(op).try_put(OutputType(0));\n    }\n\n    template<typename InputType>\n    void operator()( InputType, async_ports_t<InputType, OutputType>& g ) {\n        g.try_put(OutputType(0));\n    }\n\n    template<typename InputType, typename T>\n    void operator()( InputType, std::tuple<T, T>& ) {}\n\n    OutputType operator()( oneapi::tbb::flow_control & fc ) {\n        static bool check = false;\n        if(check) {\n            check = false;\n            fc.stop();\n            return OutputType(1);\n        }\n        check = true;\n        return OutputType(1);\n    }\n};\n\nstruct wait_flag_body {\n    static std::atomic<bool> flag;\n\n    wait_flag_body() {\n        flag.store(false);\n    }\n\n    template<typename InputType>\n    InputType operator()( InputType ) {\n        while(!flag.load()) { utils::yield(); };\n#ifdef CONFORMANCE_CONTINUE_NODE\n        return InputType();\n#else\n        return InputType(0);\n#endif\n    }\n\n    template<typename InputType>\n    void operator()( InputType argument, multifunc_ports_t<InputType>& op ) {\n        while(!flag.load()) { };\n        std::get<0>(op).try_put(argument);\n    }\n\n    template<typename InputType>\n    void operator()( InputType argument, async_ports_t<InputType>& g ) {\n        while(!flag.load()) { };\n        g.try_put(argument);\n    }\n};\n\nstd::atomic<bool> wait_flag_body::flag{false};\n\nstruct concurrency_peak_checker_body {\n    std::size_t required_max_concurrency = 0;\n\n    concurrency_peak_checker_body( std::size_t req_max_concurrency = 0 ) :\n                                    required_max_concurrency(req_max_concurrency) {}\n\n    concurrency_peak_checker_body( const concurrency_peak_checker_body & ) = default;\n\n    int operator()( oneapi::tbb::flow_control & fc ) {\n        static int counter = 0;\n        utils::ConcurrencyTracker ct;\n        if(++counter > 500) {\n            counter = 0;\n            fc.stop();\n            return 1;\n        }\n        utils::doDummyWork(1000);\n        CHECK_MESSAGE((int)utils::ConcurrencyTracker::PeakParallelism() <= required_max_concurrency,\n        \"Input node is serial and its body never invoked concurrently\");\n        return 1;\n    }\n\n    int operator()( int ) {\n        utils::ConcurrencyTracker ct;\n        utils::doDummyWork(1000);\n        CHECK_MESSAGE((int)utils::ConcurrencyTracker::PeakParallelism() <= required_max_concurrency,\n        \"Measured parallelism is not expected\");\n        return 1;\n    }\n\n    void operator()( const int& argument, multifunc_ports_t<int>& op ) {\n        utils::ConcurrencyTracker ct;\n        utils::doDummyWork(1000);\n        CHECK_MESSAGE((int)utils::ConcurrencyTracker::PeakParallelism() <= required_max_concurrency,\n        \"Measured parallelism is not expected\");\n        std::get<0>(op).try_put(argument);\n    }\n\n    void operator()( const int& argument , async_ports_t<int>& g ) {\n        utils::ConcurrencyTracker ct;\n        utils::doDummyWork(1000);\n        CHECK_MESSAGE((int)utils::ConcurrencyTracker::PeakParallelism() <= required_max_concurrency,\n        \"Measured parallelism is not expected\");\n        g.try_put(argument);\n    }\n};\n\ntemplate<typename OutputType, typename InputType = int>\nstruct copy_counting_object {\n    std::size_t copy_count;/*increases on every new copied object*/\n    mutable std::size_t copies_count;/*count number of objects copied from this object*/\n    std::size_t assign_count;\n    bool is_copy;\n\n    copy_counting_object():\n        copy_count(0), copies_count(0), assign_count(0), is_copy(false) {}\n\n    copy_counting_object(int):\n        copy_count(0), copies_count(0), assign_count(0), is_copy(false) {}\n\n    copy_counting_object( const copy_counting_object<OutputType, InputType>& other ):\n        copy_count(other.copy_count + 1), is_copy(true) {\n            ++other.copies_count;\n        }\n\n    copy_counting_object& operator=( const copy_counting_object<OutputType, InputType>& other ) {\n        assign_count = other.assign_count + 1;\n        is_copy = true;\n        return *this;\n    }\n\n    OutputType operator()( InputType ) {\n        return OutputType(1);\n    }\n\n    void operator()( InputType, multifunc_ports_t<InputType,OutputType>& op ) {\n        std::get<0>(op).try_put(OutputType(1));\n    }\n\n    void operator()( InputType , async_ports_t<InputType, OutputType>& g) {\n        g.try_put(OutputType(1));\n    }\n\n    OutputType operator()( oneapi::tbb::flow_control & fc ) {\n        static bool check = false;\n        if(check) {\n            check = false;\n            fc.stop();\n            return OutputType(1);\n        }\n        check = true;\n        return OutputType(1);\n    }\n};\n\ntemplate <typename OutputType = int>\nstruct passthru_body {\n    OutputType operator()( const oneapi::tbb::flow::continue_msg& ) {\n        return OutputType(0);\n    }\n\n    OutputType operator()( const OutputType& i ) {\n        return i;\n    }\n\n    OutputType operator()( oneapi::tbb::flow_control & fc ) {\n        static bool check = false;\n        if(check) {\n            check = false;\n            fc.stop();\n            return OutputType(0);\n        }\n        check = true;\n        return OutputType(0);\n    }\n\n    void operator()( OutputType argument, multifunc_ports_t<OutputType>& op ) {\n        std::get<0>(op).try_put(argument);\n    }\n\n    void operator()( OutputType argument, async_ports_t<OutputType>& g ) {\n        g.try_put(argument);\n    }\n};\n\ntemplate<typename Node, typename InputType, typename OutputType, typename ...Args>\nvoid test_body_exec(Args... node_args) {\n    oneapi::tbb::flow::graph g;\n    counting_functor<OutputType> counting_body;\n    counting_body.execute_count = 0;\n\n    Node testing_node(g, node_args..., counting_body);\n\n    constexpr std::size_t n = 10;\n    for(std::size_t i = 0; i < n; ++i) {\n        CHECK_MESSAGE((produce_messages<Node, InputType>(testing_node) == true),\n                \"try_put of first node should return true\");\n    }\n    g.wait_for_all();\n\n    CHECK_MESSAGE((counting_body.execute_count == n), \"Body of the first node needs to be executed N times\");\n}\n\ntemplate<typename Node, typename Body, typename ...Args>\nvoid test_copy_body_function(Args... node_args) {\n    using namespace oneapi::tbb::flow;\n\n    Body base_body;\n\n    graph g;\n\n    Node testing_node(g, node_args..., base_body);\n\n    Body b2 = copy_body<Body, Node>(testing_node);\n\n    CHECK_MESSAGE((base_body.copy_count + 1 < b2.copy_count), \"copy_body and constructor should copy bodies\");\n}\n\ntemplate<typename Node, typename InputType, typename ...Args>\nvoid test_buffering(Args... node_args) {\n    oneapi::tbb::flow::graph g;\n\n    Node testing_node(g, node_args...);\n    oneapi::tbb::flow::limiter_node<int> rejecter(g, 0);\n\n    oneapi::tbb::flow::make_edge(testing_node, rejecter);\n\n    int tmp = -1;\n    produce_messages<Node, InputType>(testing_node);\n    g.wait_for_all();\n\n\n#if defined CONFORMANCE_BUFFERING_NODES || defined CONFORMANCE_INPUT_NODE\n    CHECK_MESSAGE((testing_node.try_get(tmp) == true), \"try_get after rejection should succeed\");\n    CHECK_MESSAGE((tmp == 1), \"try_get after rejection should set value\");\n#else\n#ifdef CONFORMANCE_MULTIFUNCTION_NODE\n    CHECK_MESSAGE((std::get<0>(testing_node.output_ports()).try_get(tmp) == false), \"try_get after rejection should not succeed\");\n#else\n    CHECK_MESSAGE((testing_node.try_get(tmp) == false), \"try_get after rejection should not succeed\");\n#endif\n    CHECK_MESSAGE((tmp == -1), \"try_get after rejection should not alter passed value\");\n#endif\n}\n\n\ntemplate<typename Node, typename InputType, typename OutputType = InputType, typename ...Args>\nvoid test_forwarding(std::size_t messages_received, Args... node_args) {\n    oneapi::tbb::flow::graph g;\n\n    Node testing_node(g, node_args...);\n    std::vector<std::unique_ptr<test_push_receiver<OutputType>>> receiver_nodes;\n\n    for(std::size_t i = 0; i < 10; ++i) {\n        receiver_nodes.emplace_back(new test_push_receiver<OutputType>(g));\n        oneapi::tbb::flow::make_edge(testing_node, *receiver_nodes.back());\n    }\n\n    produce_messages<Node, InputType>(testing_node, expected);\n\n#ifdef CONFORMANCE_INPUT_NODE\n    CHECK_MESSAGE(expected == messages_received, \"For correct execution of test\");\n#endif\n\n    g.wait_for_all();\n    for(auto& receiver : receiver_nodes) {\n        auto values = get_values(*receiver);\n        CHECK_MESSAGE((values.size() == messages_received), std::string(\"Descendant of the node must receive \" + std::to_string(messages_received) + \" message.\"));\n        CHECK_MESSAGE((values[0] == expected), \"Value passed is the actual one received.\");\n    }\n}\n\ntemplate<typename Node, typename ...Args>\nvoid test_forwarding_single_push(Args... node_args) {\n    oneapi::tbb::flow::graph g;\n\n    Node testing_node(g, node_args...);\n    test_push_receiver<int> suc_node1(g);\n    test_push_receiver<int> suc_node2(g);\n\n    oneapi::tbb::flow::make_edge(testing_node, suc_node1);\n    oneapi::tbb::flow::make_edge(testing_node, suc_node2);\n\n    testing_node.try_put(0);\n    g.wait_for_all();\n\n    auto values1 = get_values(suc_node1);\n    auto values2 = get_values(suc_node2);\n    CHECK_MESSAGE((values1.size() != values2.size()), \"Only one descendant the node needs to receive\");\n    CHECK_MESSAGE((values1.size() + values2.size() == 1), \"All messages need to be received\");\n\n    testing_node.try_put(1);\n    g.wait_for_all();\n\n    auto values3 = get_values(suc_node1);\n    auto values4 = get_values(suc_node2);\n    CHECK_MESSAGE((values3.size() != values4.size()), \"Only one descendant the node needs to receive\");\n    CHECK_MESSAGE((values3.size() + values4.size() == 1), \"All messages need to be received\");\n\n#ifdef CONFORMANCE_QUEUE_NODE\n    CHECK_MESSAGE((values1[0] == 0), \"Value passed is the actual one received\");\n    CHECK_MESSAGE((values3[0] == 1), \"Value passed is the actual one received\");\n#else\n    if(values1.size() == 1) {\n        CHECK_MESSAGE((values1[0] == 0), \"Value passed is the actual one received\");\n    }else{\n        CHECK_MESSAGE((values2[0] == 0), \"Value passed is the actual one received\");\n    }\n#endif\n}\n\ntemplate<typename Node, typename InputType, typename OutputType>\nvoid test_inheritance() {\n    using namespace oneapi::tbb::flow;\n\n    CHECK_MESSAGE((std::is_base_of<graph_node, Node>::value), \"Node should be derived from graph_node\");\n    CHECK_MESSAGE((std::is_base_of<receiver<InputType>, Node>::value), \"Node should be derived from receiver<Input>\");\n    CHECK_MESSAGE((std::is_base_of<sender<OutputType>, Node>::value), \"Node should be derived from sender<Output>\");\n}\n\ntemplate<typename Node>\nvoid test_copy_ctor() {\n    using namespace oneapi::tbb::flow;\n    graph g;\n\n    dummy_functor<int> fun1;\n    conformance::copy_counting_object<int> fun2;\n\n    Node node0(g, unlimited, fun1);\n    Node node1(g, unlimited, fun2);\n    test_push_receiver<int> suc_node1(g);\n    test_push_receiver<int> suc_node2(g);\n\n    oneapi::tbb::flow::make_edge(node0, node1);\n    oneapi::tbb::flow::make_edge(node1, suc_node1);\n\n    Node node_copy(node1);\n\n    conformance::copy_counting_object<int> b2 = copy_body<conformance::copy_counting_object<int>, Node>(node_copy);\n\n    CHECK_MESSAGE((fun2.copy_count + 1 < b2.copy_count), \"constructor should copy bodies\");\n\n    oneapi::tbb::flow::make_edge(node_copy, suc_node2);\n\n    node_copy.try_put(1);\n    g.wait_for_all();\n\n    CHECK_MESSAGE((get_values(suc_node1).size() == 0 && get_values(suc_node2).size() == 1), \"Copied node doesn`t copy successor\");\n\n    node0.try_put(1);\n    g.wait_for_all();\n\n    CHECK_MESSAGE((get_values(suc_node1).size() == 1 && get_values(suc_node2).size() == 0), \"Copied node doesn`t copy predecessor\");\n}\n\ntemplate<typename Node, typename ...Args>\nvoid test_copy_ctor_for_buffering_nodes(Args... node_args) {\n    oneapi::tbb::flow::graph g;\n\n    dummy_functor<int> fun;\n\n    Node testing_node(g, node_args...);\n    oneapi::tbb::flow::continue_node<int> pred_node(g, fun);\n    test_push_receiver<int> suc_node1(g);\n    test_push_receiver<int> suc_node2(g);\n\n    oneapi::tbb::flow::make_edge(pred_node, testing_node);\n    oneapi::tbb::flow::make_edge(testing_node, suc_node1);\n\n#ifdef CONFORMANCE_OVERWRITE_NODE\n    testing_node.try_put(1);\n#endif\n\n    Node node_copy(testing_node);\n\n#ifdef CONFORMANCE_OVERWRITE_NODE\n    int tmp;\n    CHECK_MESSAGE((!node_copy.is_valid() && !node_copy.try_get(tmp)), \"The buffered value is not copied from src\");\n    get_values(suc_node1);\n#endif\n\n    oneapi::tbb::flow::make_edge(node_copy, suc_node2);\n\n    node_copy.try_put(0);\n    g.wait_for_all();\n\n    CHECK_MESSAGE((get_values(suc_node1).size() == 0 && get_values(suc_node2).size() == 1), \"Copied node doesn`t copy successor\");\n\n#ifdef CONFORMANCE_OVERWRITE_NODE\n    node_copy.clear();\n    testing_node.clear();\n#endif\n\n    pred_node.try_put(oneapi::tbb::flow::continue_msg());\n    g.wait_for_all();\n\n    CHECK_MESSAGE((get_values(suc_node1).size() == 1 && get_values(suc_node2).size() == 0), \"Copied node doesn`t copy predecessor\");\n}\n\ntemplate<typename Node, typename InputType, typename ...Args>\nvoid test_priority(Args... node_args) {\n\n\n    oneapi::tbb::flow::graph g;\n    oneapi::tbb::flow::continue_node<InputType> source(g, dummy_functor<InputType>());\n\n    track_first_id_functor<int>::first_id = -1;\n    track_first_id_functor<int> low_functor(1);\n    track_first_id_functor<int> high_functor(2);\n\n    // Due to args... we cannot create the nodes inside the lambda with old compilers\n    Node high(g, node_args..., high_functor, oneapi::tbb::flow::node_priority_t(1));\n    Node low(g, node_args..., low_functor);\n\n    tbb::task_arena a(1, 1);\n    a.execute([&] {\n        g.reset(); // attach to this arena\n\n        make_edge(source, low);\n        make_edge(source, high);\n        source.try_put(oneapi::tbb::flow::continue_msg());\n\n        g.wait_for_all();\n\n        CHECK_MESSAGE((track_first_id_functor<int>::first_id == 2), \"High priority node should execute first\");\n    });\n}\n\ntemplate<typename Node>\nvoid test_concurrency() {\n    auto max_num_threads = oneapi::tbb::this_task_arena::max_concurrency();\n\n    oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism,\n                                  max_num_threads);\n\n    std::vector<int> threads_count = {1, oneapi::tbb::flow::serial, max_num_threads, oneapi::tbb::flow::unlimited};\n\n    if(max_num_threads > 2) {\n        threads_count.push_back(max_num_threads / 2);\n    }\n\n    for(auto num_threads : threads_count) {\n        utils::ConcurrencyTracker::Reset();\n        int expected_threads = num_threads;\n        if(num_threads == oneapi::tbb::flow::unlimited) {\n            expected_threads = max_num_threads;\n        }\n        if(num_threads == oneapi::tbb::flow::serial) {\n            expected_threads = 1;\n        }\n        oneapi::tbb::flow::graph g;\n        concurrency_peak_checker_body counter(expected_threads);\n        Node fnode(g, num_threads, counter);\n\n        test_push_receiver<int> suc_node(g);\n\n        make_edge(fnode, suc_node);\n\n        for(int i = 0; i < 500; ++i) {\n            fnode.try_put(i);\n        }\n        g.wait_for_all();\n    }\n}\n\ntemplate<typename Node>\nvoid test_rejecting() {\n    oneapi::tbb::flow::graph g;\n\n    wait_flag_body body;\n    Node fnode(g, oneapi::tbb::flow::serial, body);\n\n    test_push_receiver<int> suc_node(g);\n\n    make_edge(fnode, suc_node);\n\n    fnode.try_put(0);\n\n    CHECK_MESSAGE((!fnode.try_put(1)), \"Messages should be rejected while the first is being processed\");\n\n    wait_flag_body::flag = true;\n\n    g.wait_for_all();\n    CHECK_MESSAGE((get_values(suc_node).size() == 1), \"Messages should be rejected while the first is being processed\");\n}\n\ntemplate<typename Node, typename CountingBody>\nvoid test_output_input_class() {\n    using namespace oneapi::tbb::flow;\n\n    passthru_body<CountingBody> fun;\n\n    graph g;\n    Node node1(g, unlimited, fun);\n    test_push_receiver<CountingBody> suc_node(g);\n    make_edge(node1, suc_node);\n    CountingBody b1;\n    CountingBody b2;\n    node1.try_put(b1);\n    g.wait_for_all();\n    suc_node.try_get(b2);\n    DOCTEST_WARN_MESSAGE((b1.copies_count > 0), \"The type Input must meet the DefaultConstructible and CopyConstructible requirements\");\n    DOCTEST_WARN_MESSAGE((b2.is_copy), \"The type Output must meet the CopyConstructible requirements\");\n}\n\ntemplate<typename Node, typename Output = copy_counting_object<int>>\nvoid test_output_class() {\n    using namespace oneapi::tbb::flow;\n\n    passthru_body<Output> fun;\n\n    graph g;\n    Node node1(g, fun);\n    test_push_receiver<Output> suc_node(g);\n    make_edge(node1, suc_node);\n\n#ifdef CONFORMANCE_INPUT_NODE\n    node1.activate();\n#else\n    node1.try_put(oneapi::tbb::flow::continue_msg());\n#endif\n\n    g.wait_for_all();\n    Output b;\n    suc_node.try_get(b);\n    DOCTEST_WARN_MESSAGE((b.is_copy), \"The type Output must meet the CopyConstructible requirements\");\n}\n\ntemplate<typename Node>\nvoid test_with_reserving_join_node_class() {\n    using namespace oneapi::tbb::flow;\n\n    graph g;\n\n    function_node<int, int> static_result_computer_n(\n        g, serial,\n        [&](const int& msg) {\n            // compute the result using incoming message and pass it further, e.g.:\n            int result = int((msg >> 2) / 4);\n            return result;\n        });\n    Node testing_node(g); // for buffering once computed value\n\n    buffer_node<int> buffer_n(g);\n    join_node<std::tuple<int, int>, reserving> join_n(g);\n\n    std::atomic<int> number{2};\n    std::atomic<int> counter{0};\n    function_node<std::tuple<int, int>> consumer_n(\n        g, unlimited,\n        [&](const std::tuple<int, int>& arg) {\n            // use the precomputed static result along with dynamic data\n            ++counter;\n#ifdef CONFORMANCE_OVERWRITE_NODE\n            CHECK_MESSAGE((std::get<0>(arg) == int((number >> 2) / 4)), \"A overwrite_node store a single item that can be overwritten\");\n#else\n            CHECK_MESSAGE((std::get<0>(arg) == int((number >> 2) / 4)), \"A write_once_node store a single item that cannot be overwritten\");\n#endif\n        });\n\n    make_edge(static_result_computer_n, testing_node);\n    make_edge(testing_node, input_port<0>(join_n));\n    make_edge(buffer_n, input_port<1>(join_n));\n    make_edge(join_n, consumer_n);\n\n    // do one-time calculation that will be reused many times further in the graph\n    static_result_computer_n.try_put(number);\n\n    constexpr int put_count = 50;\n    for (int i = 0; i < put_count / 2; i++) {\n        buffer_n.try_put(i);\n    }\n#ifdef CONFORMANCE_OVERWRITE_NODE\n    number = 3;\n#endif\n    static_result_computer_n.try_put(number);\n    for (int i = 0; i < put_count / 2; i++) {\n        buffer_n.try_put(i);\n    }\n\n    g.wait_for_all();\n    CHECK_MESSAGE((counter == put_count), \"join_node with reserving policy \\\n        if at least one successor accepts the tuple must consume messages\");\n}\n}\n#endif // __TBB_test_conformance_conformance_flowgraph_H\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_function_node.cpp",
    "content": "/*\n    Copyright (c) 2020-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"conformance_flowgraph.h\"\n#include \"common/test_invoke.h\"\n\nusing input_msg = conformance::message</*default_ctor*/true, /*copy_ctor*/true, /*copy_assign*/false>;\nusing output_msg = conformance::message</*default_ctor*/false, /*copy_ctor*/true, /*copy_assign*/false>;\n\n//! \\file conformance_function_node.cpp\n//! \\brief Test for [flow_graph.function_node] specification\n\n/*\n    Test node deduction guides\n*/\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\nint function_body_f(const int&) { return 1; }\n\ntemplate <typename Body>\nvoid test_deduction_guides_common(Body body) {\n    using namespace tbb::flow;\n    graph g;\n\n    function_node f1(g, unlimited, body);\n    static_assert(std::is_same_v<decltype(f1), function_node<int, int>>);\n\n    function_node f2(g, unlimited, body, rejecting());\n    static_assert(std::is_same_v<decltype(f2), function_node<int, int, rejecting>>);\n\n    function_node f3(g, unlimited, body, node_priority_t(5));\n    static_assert(std::is_same_v<decltype(f3), function_node<int, int>>);\n\n    function_node f4(g, unlimited, body, rejecting(), node_priority_t(5));\n    static_assert(std::is_same_v<decltype(f4), function_node<int, int, rejecting>>);\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    function_node f5(follows(f2), unlimited, body);\n    static_assert(std::is_same_v<decltype(f5), function_node<int, int>>);\n\n    function_node f6(follows(f5), unlimited, body, rejecting());\n    static_assert(std::is_same_v<decltype(f6), function_node<int, int, rejecting>>);\n\n    function_node f7(follows(f6), unlimited, body, node_priority_t(5));\n    static_assert(std::is_same_v<decltype(f7), function_node<int, int>>);\n\n    function_node f8(follows(f7), unlimited, body, rejecting(), node_priority_t(5));\n    static_assert(std::is_same_v<decltype(f8), function_node<int, int, rejecting>>);\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n\n    function_node f9(f1);\n    static_assert(std::is_same_v<decltype(f9), function_node<int, int>>);\n}\n\nvoid test_deduction_guides() {\n    test_deduction_guides_common([](const int&)->int { return 1; });\n    test_deduction_guides_common([](const int&) mutable ->int { return 1; });\n    test_deduction_guides_common(function_body_f);\n}\n\n#endif\n\n#if __TBB_CPP17_INVOKE_PRESENT\n\ntemplate <typename InputType, typename OutputType1, typename OutputType2,\n          typename Body1, typename Body2>\nvoid test_fn_invoke_basic(const Body1& body1, const Body2& body2) {\n    using namespace oneapi::tbb::flow;\n\n    graph g;\n\n    function_node<InputType, OutputType1> f1(g, unlimited, body1);\n    function_node<OutputType1, OutputType2> f2(g, unlimited, body2);\n    buffer_node<OutputType2> buf(g);\n\n    make_edge(f1, f2);\n    make_edge(f2, buf);\n\n    f1.try_put(InputType{OutputType1{1}});\n\n    g.wait_for_all();\n\n    std::size_t result = 0;\n    CHECK(buf.try_get(result));\n    CHECK(result == 1);\n    CHECK(!buf.try_get(result));\n}\n\nvoid test_fn_invoke() {\n    using output_type = test_invoke::SmartID<std::size_t>;\n    using input_type = test_invoke::SmartID<output_type>;\n    // Testing pointer to member function\n    test_fn_invoke_basic<input_type, output_type, std::size_t>(&input_type::get_id, &output_type::get_id);\n    // Testing pointer to member object\n    test_fn_invoke_basic<input_type, output_type, std::size_t>(&input_type::id, &output_type::id);\n}\n#endif // __TBB_CPP17_INVOKE_PRESENT\n\n//! Test calling function body\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Test function_node body\") {\n    conformance::test_body_exec<oneapi::tbb::flow::function_node<input_msg, output_msg>, input_msg, output_msg>(oneapi::tbb::flow::unlimited);\n}\n\n//! Test function_node constructors\n//! \\brief \\ref requirement\nTEST_CASE(\"function_node constructors\"){\n    using namespace oneapi::tbb::flow;\n    graph g;\n\n    conformance::counting_functor<int> fun;\n\n    function_node<int, int> fn1(g, unlimited, fun);\n    function_node<int, int> fn2(g, unlimited, fun, oneapi::tbb::flow::node_priority_t(1));\n\n    function_node<int, int, lightweight> lw_node1(g, serial, fun, lightweight());\n    function_node<int, int, lightweight> lw_node2(g, serial, fun, lightweight(), oneapi::tbb::flow::node_priority_t(1));\n}\n\n//! The node that is constructed has a reference to the same graph object as src, has a copy of the initial body used by src, and has the same concurrency threshold as src.\n//! The predecessors and successors of src are not copied.\n//! \\brief \\ref requirement\nTEST_CASE(\"function_node copy constructor\"){\n    conformance::test_copy_ctor<oneapi::tbb::flow::function_node<int, int>>();\n}\n\n//! Test node reject the incoming message if the concurrency limit achieved.\n//! \\brief \\ref interface\nTEST_CASE(\"function_node with rejecting policy\"){\n    conformance::test_rejecting<oneapi::tbb::flow::function_node<int, int, oneapi::tbb::flow::rejecting>>();\n}\n\n//! Test body copying and copy_body logic\n//! Test the body object passed to a node is copied\n//! \\brief \\ref interface\nTEST_CASE(\"function_node and body copying\"){\n    conformance::test_copy_body_function<oneapi::tbb::flow::function_node<int, int>, conformance::copy_counting_object<int>>(oneapi::tbb::flow::unlimited);\n}\n\n//! Test function_node is a graph_node, receiver<Input>, and sender<Output>\n//! \\brief \\ref interface\nTEST_CASE(\"function_node superclasses\"){\n    conformance::test_inheritance<oneapi::tbb::flow::function_node<int, int>, int, int>();\n    conformance::test_inheritance<oneapi::tbb::flow::function_node<void*, float>, void*, float>();\n    conformance::test_inheritance<oneapi::tbb::flow::function_node<input_msg, output_msg>, input_msg, output_msg>();\n}\n\n//! Test node not buffered unsuccessful message, and try_get after rejection should not succeed.\n//! \\brief \\ref requirement\nTEST_CASE(\"function_node buffering\"){\n    conformance::dummy_functor<int> fun;\n    conformance::test_buffering<oneapi::tbb::flow::function_node<input_msg, int, oneapi::tbb::flow::rejecting>, input_msg>(oneapi::tbb::flow::unlimited, fun);\n    conformance::test_buffering<oneapi::tbb::flow::function_node<input_msg, int, oneapi::tbb::flow::queueing>, input_msg>(oneapi::tbb::flow::unlimited, fun);\n}\n\n//! Test node broadcast messages to successors\n//! \\brief \\ref requirement\nTEST_CASE(\"function_node broadcast\"){\n    conformance::counting_functor<int> fun(conformance::expected);\n    conformance::test_forwarding<oneapi::tbb::flow::function_node<input_msg, int>, input_msg, int>(1, oneapi::tbb::flow::unlimited, fun);\n}\n\n//! Test deduction guides\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Deduction guides\"){\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n    test_deduction_guides();\n#endif\n}\n\n//! Test priorities work in single-threaded configuration\n//! \\brief \\ref requirement\nTEST_CASE(\"function_node priority support\"){\n    conformance::test_priority<oneapi::tbb::flow::function_node<input_msg, int>, input_msg>(oneapi::tbb::flow::unlimited);\n}\n\n//! Test function_node has a user-settable concurrency limit. It can be set to one of predefined values.\n//! The user can also provide a value of type std::size_t to limit concurrency.\n//! Test that not more than limited threads works in parallel.\n//! \\brief \\ref requirement\nTEST_CASE(\"concurrency follows set limits\"){\n    conformance::test_concurrency<oneapi::tbb::flow::function_node<int, int>>();\n}\n\n//! Test node Input class meet the DefaultConstructible and CopyConstructible requirements and Output class meet the CopyConstructible requirements.\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Test function_node Output and Input class\") {\n    using Body = conformance::copy_counting_object<int>;\n    conformance::test_output_input_class<oneapi::tbb::flow::function_node<Body, Body>, Body>();\n}\n\n#if __TBB_CPP17_INVOKE_PRESENT\n//! Test that function_node uses std::invoke to execute the body\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Test function_node and std::invoke\") {\n    test_fn_invoke();\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_global_control.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n#include \"common/test.h\"\n#include \"common/concurrency_tracker.h\"\n#include \"common/spin_barrier.h\"\n#include \"common/utils.h\"\n#include \"common/utils_concurrency_limit.h\"\n#include \"common/cpu_usertime.h\"\n\n#include \"oneapi/tbb/global_control.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n\n#include <limits.h>\n#include <thread>\n\n//! \\file conformance_global_control.cpp\n//! \\brief Test for [sched.global_control] specification\n\nconst std::size_t MB = 1024*1024;\n\nvoid TestStackSizeSimpleControl() {\n    oneapi::tbb::global_control s0(oneapi::tbb::global_control::thread_stack_size, 1*MB);\n\n    {\n        oneapi::tbb::global_control s1(oneapi::tbb::global_control::thread_stack_size, 8*MB);\n\n        CHECK(8*MB == oneapi::tbb::global_control::active_value(oneapi::tbb::global_control::thread_stack_size));\n    }\n    CHECK(1*MB == oneapi::tbb::global_control::active_value(oneapi::tbb::global_control::thread_stack_size));\n}\n\nstruct StackSizeRun : utils::NoAssign {\n\n    int num_threads;\n    utils::SpinBarrier *barr1, *barr2;\n\n    StackSizeRun(int threads, utils::SpinBarrier *b1, utils::SpinBarrier *b2) :\n        num_threads(threads), barr1(b1), barr2(b2) {}\n    void operator()( int id ) const {\n        oneapi::tbb::global_control s1(oneapi::tbb::global_control::thread_stack_size, (1+id)*MB);\n\n        barr1->wait();\n\n        REQUIRE(num_threads*MB == oneapi::tbb::global_control::active_value(oneapi::tbb::global_control::thread_stack_size));\n        barr2->wait();\n    }\n};\n\nvoid TestStackSizeThreadsControl() {\n    int threads = 4;\n    utils::SpinBarrier barr1(threads), barr2(threads);\n    utils::NativeParallelFor( threads, StackSizeRun(threads, &barr1, &barr2) );\n}\n\nvoid RunWorkersLimited(size_t parallelism)\n{\n    oneapi::tbb::global_control s(oneapi::tbb::global_control::max_allowed_parallelism, parallelism);\n    // TODO: consider better testing approach\n    // Sleep is required because after destruction global_control on the previous iteration,\n    // it recalls the maximum concurrency and excessive worker threads might populate the arena.\n    // So, we need to wait when arena becomes empty but it is unreliable and might sporadically fail.\n    utils::Sleep(100);\n    const std::size_t expected_threads = (utils::get_platform_max_threads()==1)? 1 : parallelism;\n    utils::ExactConcurrencyLevel::check(expected_threads);\n}\n\nvoid TestWorkersConstraints()\n{\n    const size_t max_parallelism =\n        oneapi::tbb::global_control::active_value(oneapi::tbb::global_control::max_allowed_parallelism);\n    if (max_parallelism > 3) {\n        oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism, max_parallelism-1);\n        CHECK_MESSAGE(max_parallelism-1 ==\n               oneapi::tbb::global_control::active_value(oneapi::tbb::global_control::max_allowed_parallelism),\n               \"Allowed parallelism must be decreasable.\");\n        oneapi::tbb::global_control c1(oneapi::tbb::global_control::max_allowed_parallelism, max_parallelism-2);\n        CHECK_MESSAGE(max_parallelism-2 ==\n               oneapi::tbb::global_control::active_value(oneapi::tbb::global_control::max_allowed_parallelism),\n               \"Allowed parallelism must be decreasable.\");\n    }\n    const size_t limit_par = utils::min(max_parallelism, 4U);\n    // check that constrains are really met\n    for (size_t num=2; num<limit_par; num++)\n        RunWorkersLimited(num);\n    for (size_t num=limit_par; num>1; num--)\n        RunWorkersLimited(num);\n}\n\nstruct SetUseRun: utils::NoAssign {\n    utils::SpinBarrier &barr;\n\n    SetUseRun(utils::SpinBarrier& b) : barr(b) {}\n    void operator()( int id ) const {\n        if (id == 0) {\n            for (int i=0; i<10; i++) {\n                oneapi::tbb::parallel_for(0, 1000, utils::DummyBody(10), oneapi::tbb::simple_partitioner());\n                barr.wait();\n            }\n        } else {\n            for (int i=0; i<10; i++) {\n                oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism, 8);\n                barr.wait();\n            }\n        }\n    }\n};\n\nvoid TestConcurrentSetUseConcurrency()\n{\n    utils::SpinBarrier barr(2);\n    NativeParallelFor( 2, SetUseRun(barr) );\n}\n\n// check number of workers after autoinitialization\nvoid TestAutoInit()\n{\n    const size_t max_parallelism =\n        oneapi::tbb::global_control::active_value(oneapi::tbb::global_control::max_allowed_parallelism);\n    const unsigned expected_threads = utils::get_platform_max_threads()==1?\n        1 : (unsigned)max_parallelism;\n    utils::ExactConcurrencyLevel::check(expected_threads);\n    CHECK_MESSAGE(oneapi::tbb::global_control::active_value(oneapi::tbb::global_control::max_allowed_parallelism)\n           == max_parallelism, \"max_allowed_parallelism must not be changed after auto init\");\n    if (max_parallelism > 2) {\n        // after autoinit it's possible to decrease workers number\n        oneapi::tbb::global_control s(oneapi::tbb::global_control::max_allowed_parallelism, max_parallelism-1);\n        // TODO: consider better testing approach\n        // Sleep is required because after previous concurrency check, the arena is still populated with workers.\n        // So, we need to wait when arena becomes empty but it is unreliable and might sporadically fail.\n        utils::Sleep(100);\n        utils::ExactConcurrencyLevel::check(max_parallelism-1);\n    }\n}\n\nclass TestMultipleControlsRun {\n    utils::SpinBarrier &barrier;\npublic:\n    TestMultipleControlsRun(utils::SpinBarrier& b) : barrier(b) {}\n    void operator()( int id ) const {\n        barrier.wait();\n        if (id) {\n            {\n                oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism, 1);\n                utils::ExactConcurrencyLevel::check(1);\n                barrier.wait();\n            }\n            utils::ExactConcurrencyLevel::check(1);\n            barrier.wait();\n            {\n                oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism, 2);\n                utils::ExactConcurrencyLevel::check(1);\n                barrier.wait();\n                utils::ExactConcurrencyLevel::check(2);\n                barrier.wait();\n            }\n        } else {\n            {\n                utils::ExactConcurrencyLevel::check(1);\n                oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism, 1);\n                barrier.wait();\n                utils::ExactConcurrencyLevel::check(1);\n                barrier.wait();\n                utils::ExactConcurrencyLevel::check(1);\n                barrier.wait();\n            }\n            utils::ExactConcurrencyLevel::check(2);\n            barrier.wait();\n        }\n    }\n};\n\n// test that global controls from different thread with overlapping lifetime\n// still keep parallelism under control\nvoid TestMultipleControls()\n{\n    utils::SpinBarrier barrier(2);\n    utils::NativeParallelFor( 2, TestMultipleControlsRun(barrier) );\n}\n\n#if !(__TBB_WIN8UI_SUPPORT && (_WIN32_WINNT < 0x0A00))\n//! Testing setting stack size\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"setting stack size\") {\n    std::size_t default_ss = oneapi::tbb::global_control::active_value(oneapi::tbb::global_control::thread_stack_size);\n    CHECK(default_ss > 0);\n    TestStackSizeSimpleControl();\n    TestStackSizeThreadsControl();\n    CHECK(default_ss == oneapi::tbb::global_control::active_value(oneapi::tbb::global_control::thread_stack_size));\n}\n#endif\n\n//! Testing setting max number of threads\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"setting max number of threads\") {\n    TestWorkersConstraints();\n}\n//! Testing concurrenct setting concurrency\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"concurrenct setting concurrency\") {\n    TestConcurrentSetUseConcurrency();\n}\n\n//! Testing auto initialization\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"auto initialization\") {\n    TestAutoInit();\n}\n\n//! Test terminate_on_exception default value\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"terminate_on_exception: default\") {\n    std::size_t default_toe = oneapi::tbb::global_control::active_value(oneapi::tbb::global_control::terminate_on_exception);\n    CHECK(default_toe == 0);\n}\n\n//! Test terminate_on_exception in a nested case\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"terminate_on_exception: nested\") {\n    oneapi::tbb::global_control* c0;\n    {\n        oneapi::tbb::global_control c1(oneapi::tbb::global_control::terminate_on_exception, 1);\n        CHECK(oneapi::tbb::global_control::active_value(oneapi::tbb::global_control::terminate_on_exception) == 1);\n        {\n            oneapi::tbb::global_control c2(oneapi::tbb::global_control::terminate_on_exception, 0);\n            CHECK(oneapi::tbb::global_control::active_value(oneapi::tbb::global_control::terminate_on_exception) == 1);\n        }\n        CHECK(oneapi::tbb::global_control::active_value(oneapi::tbb::global_control::terminate_on_exception) == 1);\n        c0 = new oneapi::tbb::global_control(oneapi::tbb::global_control::terminate_on_exception, 0);\n    }\n    CHECK(oneapi::tbb::global_control::active_value(oneapi::tbb::global_control::terminate_on_exception) == 0);\n    delete c0;\n}\n\n//! Testing setting the same value but different objects\n//! \\brief \\ref interface \\ref error_guessing\nTEST_CASE(\"setting same value\") {\n    const std::size_t value = 2;\n\n    oneapi::tbb::global_control* ctl1 = new oneapi::tbb::global_control(oneapi::tbb::global_control::max_allowed_parallelism, value);\n    oneapi::tbb::global_control* ctl2 = new oneapi::tbb::global_control(oneapi::tbb::global_control::max_allowed_parallelism, value);\n\n    std::size_t active = oneapi::tbb::global_control::active_value(oneapi::tbb::global_control::max_allowed_parallelism);\n    REQUIRE(active == value);\n    delete ctl2;\n\n    active = oneapi::tbb::global_control::active_value(oneapi::tbb::global_control::max_allowed_parallelism);\n    REQUIRE_MESSAGE(active == value, \"Active value should not change, because of value duplication\");\n    delete ctl1;\n}\n\n//! Testing lifetime control conformance\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"prolong lifetime simple\") {\n    tbb::task_scheduler_handle hdl1{ tbb::attach{} };\n    {\n        tbb::parallel_for(0, 10, utils::DummyBody());\n\n        tbb::task_scheduler_handle hdl2;\n        hdl2 = tbb::task_scheduler_handle{ tbb::attach{} };\n        hdl2.release();\n    }\n    bool ok = tbb::finalize(hdl1, std::nothrow);\n    REQUIRE(ok);\n}\n\n//! Testing handle check for emptiness\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"null handle check\") {\n    tbb::task_scheduler_handle hndl;\n    REQUIRE_FALSE(hndl);\n}\n\n//! Testing handle check for emptiness\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"null handle check 2\") {\n    tbb::task_scheduler_handle hndl{ tbb::attach{} };\n    bool not_empty = (bool)hndl;\n\n    tbb::finalize(hndl, std::nothrow);\n\n    REQUIRE(not_empty);\n    REQUIRE_FALSE(hndl);\n}\n\n//! Testing handle check for emptiness\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"null handle check 3\") {\n    tbb::task_scheduler_handle handle1{ tbb::attach{} };\n    tbb::task_scheduler_handle handle2(std::move(handle1));\n\n    bool handle1_empty = !handle1;\n    bool handle2_not_empty = (bool)handle2;\n\n    tbb::finalize(handle2, std::nothrow);\n\n    REQUIRE(handle1_empty);\n    REQUIRE(handle2_not_empty);\n}\n\n//! Testing  task_scheduler_handle is created on one thread and destroyed on another.\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"cross thread 1\") {\n    // created task_scheduler_handle, parallel_for on another thread - finalize\n    tbb::task_scheduler_handle handle{ tbb::attach{} };\n    utils::NativeParallelFor(1, [&](int) {\n        tbb::parallel_for(0, 10, utils::DummyBody());\n        bool res = tbb::finalize(handle, std::nothrow);\n        REQUIRE(res);\n    });\n}\n\n//! Testing  task_scheduler_handle is created on one thread and destroyed on another.\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"cross thread 2\") {\n    // created task_scheduler_handle, called parallel_for on this thread, killed the thread - and finalize on another thread\n    tbb::task_scheduler_handle handle;\n    utils::NativeParallelFor(1, [&](int) {\n        handle = tbb::task_scheduler_handle{ tbb::attach{} };\n        tbb::parallel_for(0, 10, utils::DummyBody());\n    });\n    bool res = tbb::finalize(handle, std::nothrow);\n    REQUIRE(res);\n}\n\n//! Testing multiple wait\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"simple prolong lifetime 3\") {\n    // Parallel region\n    tbb::parallel_for(0, 10, utils::DummyBody());\n    // Termination\n    tbb::task_scheduler_handle handle = tbb::task_scheduler_handle{ tbb::attach{} };\n    bool res = tbb::finalize(handle, std::nothrow);\n    REQUIRE(res);\n    // New parallel region\n    tbb::parallel_for(0, 10, utils::DummyBody());\n}\n\n//! \\brief \\ref regression \\ref interface \\ref requirement\nTEST_CASE(\"Test worker threads remain inactive in enforced serial execution mode\") {\n    auto num_threads = utils::get_platform_max_threads();\n    utils::SpinBarrier barrier{num_threads};\n\n    // Warm-up threads\n    tbb::parallel_for(std::size_t(0), num_threads, [&] (std::size_t) {\n        barrier.wait();\n    });\n\n    tbb::global_control control(tbb::global_control::max_allowed_parallelism, 1);\n\n    std::thread thr([&] {\n        tbb::parallel_for(0, 100000, [&] (int) {\n            utils::doDummyWork(100);\n        });\n    });\n\n    // Workers should sleep because of global_control enforced serial execution of tasks\n    TestCPUUserTime(utils::get_platform_max_threads() - 1);\n\n    thr.join();\n}\n\n// The test cannot work correctly with statically linked runtime.\n// TODO: investigate a failure in debug with MSVC\n#if (!_MSC_VER || (defined(_DLL) && !defined(_DEBUG))) && !EMSCRIPTEN\n#include <csetjmp>\n\n// Overall, the test case is not safe because the dtors might not be called during long jump.\n// Therefore, it makes sense to run the test case after all other test cases.\n//! Test terminate_on_exception behavior\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"terminate_on_exception: enabled\") {\n    oneapi::tbb::global_control c(oneapi::tbb::global_control::terminate_on_exception, 1);\n    static bool terminate_handler_called;\n    terminate_handler_called = false;\n\n#if TBB_USE_EXCEPTIONS\n    try {\n#endif\n        static std::jmp_buf buffer;\n        std::terminate_handler prev = std::set_terminate([] {\n            CHECK(!terminate_handler_called);\n            terminate_handler_called = true;\n            std::longjmp(buffer, 1);\n        });\n#if _MSC_VER\n#pragma warning(push)\n#pragma warning(disable:4611) // interaction between '_setjmp' and C++ object destruction is non - portable\n#endif\n        SUBCASE(\"internal exception\") {\n            if (setjmp(buffer) == 0) {\n                oneapi::tbb::parallel_for(0, 1, -1, [](int) {});\n                FAIL(\"Unreachable code\");\n            }\n        }\n#if TBB_USE_EXCEPTIONS\n        SUBCASE(\"user exception\") {\n            if (setjmp(buffer) == 0) {\n                oneapi::tbb::parallel_for(0, 1, [](int) {\n                    volatile bool suppress_unreachable_code_warning = true;\n                    if (suppress_unreachable_code_warning) {\n                        throw std::exception();\n                    }\n                });\n                FAIL(\"Unreachable code\");\n            }\n        }\n#endif\n#if _MSC_VER\n#pragma warning(pop)\n#endif\n        std::set_terminate(prev);\n        terminate_handler_called = true;\n#if TBB_USE_EXCEPTIONS\n    } catch (...) {\n        FAIL(\"The exception is not expected\");\n    }\n#endif\n    CHECK(terminate_handler_called);\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_graph.cpp",
    "content": "/*\n    Copyright (c) 2020-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"conformance_flowgraph.h\"\n\n//! \\file conformance_graph.cpp\n//! \\brief Test for [flow_graph.graph] specification\n\nvoid test_continue_node_rf_reset_protocol(){\n    using namespace oneapi::tbb::flow;\n    graph g;\n\n    std::atomic<bool> flag = {false};\n    continue_node<int> source(g, 2, [&](const continue_msg&){ flag = true; return 1;});\n\n    source.try_put(continue_msg());\n    g.wait_for_all();\n\n    CHECK_MESSAGE((flag == false), \"Should be false\");\n\n    g.reset(rf_reset_protocol);\n\n    source.try_put(continue_msg());\n    g.wait_for_all();\n    CHECK_MESSAGE((flag == false), \"Internal number of predecessors reinitialized\");\n\n    source.try_put(continue_msg());\n    g.wait_for_all();\n    CHECK_MESSAGE((flag == true), \"Should be true\");\n}\n\nvoid test_input_node_rf_reset_protocol(){\n    oneapi::tbb::flow::graph g;\n\n    conformance::copy_counting_object<int> fun;\n\n    oneapi::tbb::flow::input_node<int> node(g, fun);\n    oneapi::tbb::flow::limiter_node<int> rejecter(g, 0);\n\n    oneapi::tbb::flow::make_edge(node, rejecter);\n\n    node.activate();\n    g.wait_for_all();\n\n    g.reset(oneapi::tbb::flow::rf_reset_protocol);\n\n    int tmp = -1;\n    CHECK_MESSAGE((node.try_get(tmp) == false), \"Should be false\");\n}\n\ntemplate<typename Node>\nvoid test_functional_nodes_rf_reset_protocol(){\n    oneapi::tbb::flow::graph g;\n    size_t concurrency_limit = 1;\n    oneapi::tbb::global_control control(oneapi::tbb::global_control::max_allowed_parallelism, concurrency_limit);\n\n    conformance::counting_functor<int> counting_body;\n    Node f(g, oneapi::tbb::flow::serial, counting_body);\n\n    f.try_put(0);\n    f.try_put(0);\n    CHECK_MESSAGE((counting_body.execute_count == 0), \"Body should not be executed\");\n    g.reset(oneapi::tbb::flow::rf_reset_protocol);\n\n    g.wait_for_all();\n    CHECK_MESSAGE((counting_body.execute_count == 1), \"Body should be executed\");\n}\n\ntemplate<typename Node, typename ...Args>\nvoid test_buffering_nodes_rf_reset_protocol(Args... node_body){\n    oneapi::tbb::flow::graph g;\n    Node testing_node(g, node_body...);\n\n    int tmp = -1;\n    CHECK_MESSAGE((testing_node.try_get(tmp) == false), \"try_get should not succeed\");\n    CHECK_MESSAGE((tmp == -1), \"Value should not be updated\");\n\n    testing_node.try_put(1);\n    g.wait_for_all();\n    g.reset(oneapi::tbb::flow::rf_reset_protocol);\n\n    tmp = -1;\n    CHECK_MESSAGE((testing_node.try_get(tmp) == false), \"try_get should not succeed\");\n    CHECK_MESSAGE((tmp == -1), \"Value should not be updated\");\n    g.wait_for_all();\n}\n\ntemplate<typename Node, typename InputType, typename ...Args>\nvoid test_nodes_with_body_rf_reset_bodies(Args... node_args){\n    oneapi::tbb::flow::graph g;\n    conformance::counting_functor<int> counting_body(5);\n    Node testing_node(g, node_args..., counting_body);\n\n    testing_node.try_put(InputType());\n    g.wait_for_all();\n\n    CHECK_MESSAGE((counting_body.execute_count == 1), \"Body should be executed\");\n\n    g.reset(oneapi::tbb::flow::rf_reset_bodies);\n    testing_node.try_put(InputType());\n    g.wait_for_all();\n\n    CHECK_MESSAGE((counting_body.execute_count == 1), \"Body should be replaced with a copy of the body\");\n}\n\nvoid test_limiter_node_rf_reset_protocol(){\n    oneapi::tbb::flow::graph g;\n\n    constexpr int limit = 5;\n    oneapi::tbb::flow::limiter_node<int> testing_node(g, limit);\n    conformance::test_push_receiver<int> suc_node(g);\n\n    oneapi::tbb::flow::make_edge(testing_node, suc_node);\n\n    for(int i = 0; i < limit * 2; ++i)\n        testing_node.try_put(1);\n    g.wait_for_all();\n\n    CHECK_MESSAGE((conformance::get_values(suc_node).size() == limit), \"Descendant of the node needs be receive limited number of messages\");\n\n    g.reset(oneapi::tbb::flow::rf_reset_protocol);\n\n    for(int i = 0; i < limit * 2; ++i)\n        testing_node.try_put(1);\n    g.wait_for_all();\n\n    CHECK_MESSAGE((conformance::get_values(suc_node).size() == limit), \"Descendant of the node needs be receive limited number of messages\");\n}\n\nvoid test_join_node_rf_reset_protocol(){\n    oneapi::tbb::flow::graph g;\n\n    oneapi::tbb::flow::join_node<std::tuple<int>, oneapi::tbb::flow::queueing> testing_node(g);\n\n    oneapi::tbb::flow::input_port<0>(testing_node).try_put(1);\n    \n    g.wait_for_all();\n    g.reset(oneapi::tbb::flow::rf_reset_protocol);\n\n    std::tuple<int> tmp(0);\n    CHECK_MESSAGE((!testing_node.try_get(tmp)), \"All buffers must be emptied\");\n}\n\n// global_control::max_allowed_parallelism functionality is not covered by TCM\n#if !__TBB_TCM_TESTING_ENABLED\n//! Graph reset\n//! \\brief \\ref requirement\nTEST_CASE(\"graph reset with rf_reset_protocol\") {\n    using namespace oneapi::tbb::flow;\n    test_continue_node_rf_reset_protocol();\n    test_input_node_rf_reset_protocol();\n    test_functional_nodes_rf_reset_protocol<function_node<int, int, queueing>>();\n    test_functional_nodes_rf_reset_protocol<multifunction_node<int, std::tuple<int>, queueing>>();\n    test_functional_nodes_rf_reset_protocol<async_node<int, int, queueing>>();\n\n    test_buffering_nodes_rf_reset_protocol<buffer_node<int>>();\n    test_buffering_nodes_rf_reset_protocol<queue_node<int>>();\n    test_buffering_nodes_rf_reset_protocol<overwrite_node<int>>();\n    test_buffering_nodes_rf_reset_protocol<write_once_node<int>>();\n    test_buffering_nodes_rf_reset_protocol<priority_queue_node<int>>();\n    conformance::sequencer_functor<int> sequencer;\n    test_buffering_nodes_rf_reset_protocol<sequencer_node<int>>(sequencer);\n\n    test_limiter_node_rf_reset_protocol();\n    test_join_node_rf_reset_protocol();\n}\n#endif\n\n//! Graph reset rf_clear_edges\n//! \\brief \\ref requirement\nTEST_CASE(\"graph reset with rf_clear_edges\") {\n    oneapi::tbb::flow::graph g;\n    using body = conformance::dummy_functor<int>;\n\n    oneapi::tbb::flow::queue_node<int> successor(g);\n    oneapi::tbb::flow::queue_node<std::tuple<int>> successor2(g);\n    oneapi::tbb::flow::queue_node<oneapi::tbb::flow::indexer_node<int>::output_type> successor3(g);\n\n    //node types\n    oneapi::tbb::flow::continue_node<int> ct(g, body());\n    oneapi::tbb::flow::split_node< std::tuple<int> > s(g);\n    oneapi::tbb::flow::input_node<int> src(g, body());\n    oneapi::tbb::flow::function_node<int, int> fxn(g, oneapi::tbb::flow::unlimited, body());\n    oneapi::tbb::flow::multifunction_node<int, std::tuple<int, int> > m_fxn(g, oneapi::tbb::flow::unlimited, body());\n    oneapi::tbb::flow::broadcast_node<int> bc(g);\n    oneapi::tbb::flow::limiter_node<int> lim(g, 2);\n    oneapi::tbb::flow::indexer_node<int> ind(g);\n    oneapi::tbb::flow::join_node< std::tuple< int >, oneapi::tbb::flow::queueing > j(g);\n    oneapi::tbb::flow::buffer_node<int> bf(g);\n    oneapi::tbb::flow::priority_queue_node<int> pq(g);\n    oneapi::tbb::flow::write_once_node<int> wo(g);\n    oneapi::tbb::flow::overwrite_node<int> ovw(g);\n    oneapi::tbb::flow::sequencer_node<int> seq(g, conformance::sequencer_functor<int>());\n\n    oneapi::tbb::flow::make_edge(ct, successor);\n    oneapi::tbb::flow::make_edge(s, successor);\n    oneapi::tbb::flow::make_edge(src, successor);\n    oneapi::tbb::flow::make_edge(fxn, successor);\n    oneapi::tbb::flow::make_edge(m_fxn, successor);\n    oneapi::tbb::flow::make_edge(bc, successor);\n    oneapi::tbb::flow::make_edge(lim, successor);\n    oneapi::tbb::flow::make_edge(ind, successor3);\n    oneapi::tbb::flow::make_edge(j, successor2);\n    oneapi::tbb::flow::make_edge(bf, successor);\n    oneapi::tbb::flow::make_edge(pq, successor);\n    oneapi::tbb::flow::make_edge(wo, successor);\n    oneapi::tbb::flow::make_edge(ovw, successor);\n    oneapi::tbb::flow::make_edge(seq, successor);\n\n    g.wait_for_all();\n    g.reset(oneapi::tbb::flow::rf_clear_edges);\n\n    ct.try_put(oneapi::tbb::flow::continue_msg());\n    s.try_put(std::tuple<int>{1});\n    src.activate();\n    fxn.try_put(1);\n    m_fxn.try_put(1);\n    bc.try_put(1);\n    lim.try_put(1);\n    oneapi::tbb::flow::input_port<0>(ind).try_put(1);\n    oneapi::tbb::flow::input_port<0>(j).try_put(1);\n    bf.try_put(1);\n    pq.try_put(1);\n    wo.try_put(1);\n    ovw.try_put(1);\n    seq.try_put(0);\n\n    g.wait_for_all();\n\n    CHECK_MESSAGE((conformance::get_values(successor).size() == 0), \"Message should not pass when edges doesn't exist\");\n    CHECK_MESSAGE((conformance::get_values(successor2).size() == 0), \"Message should not pass when edge doesn't exist\");\n    CHECK_MESSAGE((conformance::get_values(successor3).size() == 0), \"Message should not pass when edge doesn't exist\");\n}\n\n//! Graph reset rf_reset_bodies\n//! \\brief \\ref requirement\nTEST_CASE(\"graph reset with rf_reset_bodies\") {\n    using namespace oneapi::tbb::flow;\n    test_nodes_with_body_rf_reset_bodies<continue_node<int>, continue_msg>(serial);\n    test_nodes_with_body_rf_reset_bodies<function_node<int, int>, int>(serial);\n    test_nodes_with_body_rf_reset_bodies<multifunction_node<int, std::tuple<int>>, int>(serial);\n    test_nodes_with_body_rf_reset_bodies<async_node<int, int>, int>(serial);\n\n    graph g;\n    conformance::counting_functor<int> counting_body(1);\n    input_node<int> testing_node(g,counting_body);\n    queue_node<int> q_node(g);\n\n    make_edge(testing_node, q_node);\n\n    testing_node.activate();\n    g.wait_for_all();\n\n    CHECK_MESSAGE((counting_body.execute_count == 2), \"Body should be executed\");\n\n    g.reset(rf_reset_bodies);\n    testing_node.activate();\n    g.wait_for_all();\n\n    CHECK_MESSAGE((counting_body.execute_count == 2), \"Body should be replaced with a copy of the body\");\n}\n\n//! Graph cancel\n//! \\brief \\ref requirement\nTEST_CASE(\"graph cancel\") {\n    oneapi::tbb::flow::graph g;\n    CHECK_MESSAGE(!g.is_cancelled(), \"Freshly created graph should not be cancelled.\" );\n\n    g.cancel();\n    CHECK_MESSAGE(!g.is_cancelled(), \"Cancelled status should appear only after the wait_for_all() call.\" );\n\n    g.wait_for_all();\n    CHECK_MESSAGE(g.is_cancelled(), \"Waiting should allow checking the cancellation status.\" );\n\n    g.reset();\n    CHECK_MESSAGE(!g.is_cancelled(), \"Resetting must reset the cancellation status.\" );\n\n    std::atomic<bool> cancelled(false);\n    std::atomic<unsigned> executed(0);\n    oneapi::tbb::flow::function_node<int> f(g, oneapi::tbb::flow::serial, [&](int) {\n        ++executed;\n        while( !cancelled.load(std::memory_order_relaxed) )\n            std::this_thread::sleep_for(std::chrono::milliseconds(1));\n    });\n\n    const unsigned N = 10;\n    for( unsigned i = 0; i < N; ++i )\n        f.try_put(0);\n\n    std::thread thr([&] {\n        while( !executed )\n            std::this_thread::sleep_for(std::chrono::milliseconds(1));\n        g.cancel();\n        cancelled.store(true, std::memory_order_relaxed);\n    });\n    g.wait_for_all();\n    thr.join();\n    CHECK_MESSAGE(g.is_cancelled(), \"Wait for all should not change the cancellation status.\" );\n    CHECK_MESSAGE(1 == executed, \"Buffered messages should be dropped by the cancelled graph.\" );\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_indexer_node.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"conformance_flowgraph.h\"\n\n//! \\file conformance_indexer_node.cpp\n//! \\brief Test for [flow_graph.indexer_node] specification\n\nusing input_msg = conformance::message</*default_ctor*/false, /*copy_ctor*/true, /*copy_assign*/false>;\nusing my_indexer_type = oneapi::tbb::flow::indexer_node<int, float, input_msg>;\nusing my_output_type = my_indexer_type::output_type;\n\n//! Test node broadcast messages to successors\n//! \\brief \\ref requirement\nTEST_CASE(\"indexer_node broadcasts\"){\n    oneapi::tbb::flow::graph g;\n\n    my_indexer_type testing_node(g);\n    std::vector<conformance::test_push_receiver<my_output_type>*> receiver_nodes;\n\n    for(std::size_t i = 0; i < 3; ++i) {\n        receiver_nodes.emplace_back(new conformance::test_push_receiver<my_output_type>(g));\n        oneapi::tbb::flow::make_edge(testing_node, *receiver_nodes.back());\n    }\n\n    oneapi::tbb::flow::input_port<0>(testing_node).try_put(6);\n    oneapi::tbb::flow::input_port<1>(testing_node).try_put(1.5);\n    oneapi::tbb::flow::input_port<2>(testing_node).try_put(input_msg(1));\n    g.wait_for_all();\n\n    for(auto receiver: receiver_nodes) {\n        auto values = conformance::get_values(*receiver);\n        CHECK_MESSAGE((values.size() == 3), std::string(\"Descendant of the node must receive 3 messages.\"));\n        for(auto& value : values){\n            if(value.is_a<int>()){\n                CHECK_MESSAGE((value.cast_to<int>() == 6), \"Value passed is the actual one received.\");\n            } else if(value.is_a<float>()){\n                CHECK_MESSAGE((value.cast_to<float>() == 1.5), \"Value passed is the actual one received.\");\n            } else {\n                CHECK_MESSAGE((value.cast_to<input_msg>() == 1), \"Value passed is the actual one received.\");\n            }\n        }\n        delete receiver;\n    }\n}\n\n//! Test inheritance relations\n//! \\brief \\ref interface\nTEST_CASE(\"indexer_node superclasses\"){\n    CHECK_MESSAGE((std::is_base_of<oneapi::tbb::flow::graph_node, my_indexer_type>::value), \"indexer_node should be derived from graph_node\");\n}\n\n//! Test node not buffered unsuccessful message, and try_get after rejection should not succeed.\n//! \\brief \\ref requirement\nTEST_CASE(\"indexer_node buffering\") {\n    oneapi::tbb::flow::graph g;\n\n    my_indexer_type testing_node(g);\n\n    oneapi::tbb::flow::limiter_node<my_output_type> rejecter(g,0);\n    oneapi::tbb::flow::make_edge(testing_node, rejecter);\n\n    oneapi::tbb::flow::input_port<0>(testing_node).try_put(6);\n    oneapi::tbb::flow::input_port<1>(testing_node).try_put(1.5);\n    oneapi::tbb::flow::input_port<2>(testing_node).try_put(input_msg(1));\n\n    my_output_type tmp;\n    CHECK_MESSAGE((testing_node.try_get(tmp) == false), \"Value should be discarded after rejection\");\n    g.wait_for_all();\n}\n\n//! Test indexer behaviour\n//! \\brief \\ref requirement\nTEST_CASE(\"indexer_node behaviour\") {\n    oneapi::tbb::flow::graph g;\n    oneapi::tbb::flow::function_node<int, int> f1( g, oneapi::tbb::flow::unlimited,\n                                [](const int &i) { return 2*i; } );\n    oneapi::tbb::flow::function_node<float, float> f2( g, oneapi::tbb::flow::unlimited,\n                                [](const float &f) { return f/2; } );\n    oneapi::tbb::flow::continue_node<input_msg> c1( g,\n                                [](oneapi::tbb::flow::continue_msg) { return input_msg(5); } );\n\n    my_indexer_type testing_node(g);\n\n    oneapi::tbb::flow::function_node<my_output_type>\n        f3( g, oneapi::tbb::flow::unlimited,\n            []( const my_output_type &v ) {\n                if (v.tag() == 0) {\n                    CHECK_MESSAGE((v.is_a<int>()), \"Expected to int\" );\n                    CHECK_MESSAGE((oneapi::tbb::flow::cast_to<int>(v) == 6), \"Expected to receive 6\" );\n                } else if (v.tag() == 1) {\n                    CHECK_MESSAGE((v.is_a<float>()), \"Expected to float\" );\n                    CHECK_MESSAGE((oneapi::tbb::flow::cast_to<float>(v) == 1.5), \"Expected to receive 1.5\" );\n                } else {\n                    CHECK_MESSAGE((v.is_a<input_msg>()), \"Expected to float\" );\n                    CHECK_MESSAGE((oneapi::tbb::flow::cast_to<input_msg>(v) == 5), \"Expected to receive input_msg(5)\" );\n                }\n            }\n        );\n\n    oneapi::tbb::flow::make_edge(f1, oneapi::tbb::flow::input_port<0>(testing_node));\n    oneapi::tbb::flow::make_edge(f2, oneapi::tbb::flow::input_port<1>(testing_node));\n    oneapi::tbb::flow::make_edge(c1, oneapi::tbb::flow::input_port<2>(testing_node));\n    oneapi::tbb::flow::make_edge(testing_node, f3);\n\n    f1.try_put(3);\n    f2.try_put(3);\n    c1.try_put(oneapi::tbb::flow::continue_msg());\n    g.wait_for_all();\n}\n\n//! The node that is constructed has a reference to the same graph object as src.\n//! The list of predecessors, messages in the input ports, and successors are not copied.\n//! \\brief \\ref interface\nTEST_CASE(\"indexer_node copy constructor\"){\n    oneapi::tbb::flow::graph g;\n    oneapi::tbb::flow::continue_node<int> node0( g,\n                                [](oneapi::tbb::flow::continue_msg) { return 1; } );\n\n    my_indexer_type node1(g);\n    conformance::test_push_receiver<my_output_type> node2(g);\n    conformance::test_push_receiver<my_output_type> node3(g);\n\n    oneapi::tbb::flow::make_edge(node0, oneapi::tbb::flow::input_port<0>(node1));\n    oneapi::tbb::flow::make_edge(node1, node2);\n\n    my_indexer_type node_copy(node1);\n\n    oneapi::tbb::flow::make_edge(node_copy, node3);\n\n    oneapi::tbb::flow::input_port<0>(node_copy).try_put(1);\n    g.wait_for_all();\n\n    CHECK_MESSAGE((conformance::get_values(node2).size() == 0 && conformance::get_values(node3).size() == 1), \"Copied node doesn`t copy successor\");\n\n    node0.try_put(oneapi::tbb::flow::continue_msg());\n    g.wait_for_all();\n\n    CHECK_MESSAGE((conformance::get_values(node2).size() == 1 && conformance::get_values(node3).size() == 0), \"Copied node doesn`t copy predecessor\");\n}\n\n//! Test indexer_node output_type\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"indexer_node output_type\") {\n    CHECK_MESSAGE((conformance::check_output_type<my_output_type, oneapi::tbb::flow::tagged_msg<size_t, int, float, input_msg>>()), \"indexer_node output_type should returns a tagged_msg\");\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_input_node.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#define CONFORMANCE_INPUT_NODE\n\n#include \"conformance_flowgraph.h\"\n\n//! \\file conformance_input_node.cpp\n//! \\brief Test for [flow_graph.input_node] specification\n\nusing output_msg = conformance::message<true, true, true>;\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\nint input_body_f(tbb::flow_control&) { return 42; }\n\nvoid test_deduction_guides() {\n    using namespace tbb::flow;\n    graph g;\n\n    auto lambda = [](tbb::flow_control&) { return 42; };\n    auto non_const_lambda = [](tbb::flow_control&) mutable { return 42; };\n\n    // Tests for input_node(graph&, Body)\n    input_node s1(g, lambda);\n    static_assert(std::is_same_v<decltype(s1), input_node<int>>);\n\n    input_node s2(g, non_const_lambda);\n    static_assert(std::is_same_v<decltype(s2), input_node<int>>);\n\n    input_node s3(g, input_body_f);\n    static_assert(std::is_same_v<decltype(s3), input_node<int>>);\n\n    input_node s4(s3);\n    static_assert(std::is_same_v<decltype(s4), input_node<int>>);\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    broadcast_node<int> bc(g);\n\n    // Tests for input_node(const node_set<Args...>&, Body)\n    input_node s5(precedes(bc), lambda);\n    static_assert(std::is_same_v<decltype(s5), input_node<int>>);\n\n    input_node s6(precedes(bc), non_const_lambda);\n    static_assert(std::is_same_v<decltype(s6), input_node<int>>);\n\n    input_node s7(precedes(bc), input_body_f);\n    static_assert(std::is_same_v<decltype(s7), input_node<int>>);\n#endif\n    g.wait_for_all();\n}\n\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate<typename O>\nvoid test_inheritance(){\n    using namespace oneapi::tbb::flow;\n\n    CHECK_MESSAGE((std::is_base_of<graph_node, input_node<O>>::value), \"input_node should be derived from graph_node\");\n    CHECK_MESSAGE((std::is_base_of<sender<O>, input_node<O>>::value), \"input_node should be derived from sender<Output>\");\n    CHECK_MESSAGE((!std::is_base_of<receiver<O>, input_node<O>>::value), \"input_node cannot have predecessors\");\n}\n\n//! Test the body object passed to a node is copied\n//! \\brief \\ref interface\nTEST_CASE(\"input_node and body copying\"){\n    conformance::test_copy_body_function<oneapi::tbb::flow::input_node<int>, conformance::copy_counting_object<int>>();\n}\n\n//! The node that is constructed has a reference to the same graph object as src,\n//! has a copy of the initial body used by src.\n//! The successors of src are not copied.\n//! \\brief \\ref requirement\nTEST_CASE(\"input_node copy constructor\"){\n    using namespace oneapi::tbb::flow;\n    graph g;\n\n    conformance::copy_counting_object<output_msg> fun2;\n\n    input_node<output_msg> node1(g, fun2);\n    conformance::test_push_receiver<output_msg> node2(g);\n    conformance::test_push_receiver<output_msg> node3(g);\n\n    oneapi::tbb::flow::make_edge(node1, node2);\n\n    input_node<output_msg> node_copy(node1);\n\n    conformance::copy_counting_object<output_msg> b2 = copy_body<conformance::copy_counting_object<output_msg>, input_node<output_msg>>(node_copy);\n\n    CHECK_MESSAGE((fun2.copy_count + 1 < b2.copy_count), \"constructor should copy bodies\");\n\n    oneapi::tbb::flow::make_edge(node_copy, node3);\n\n    node_copy.activate();\n    g.wait_for_all();\n\n    CHECK_MESSAGE((conformance::get_values(node2).size() == 0 && conformance::get_values(node3).size() == 1), \"Copied node doesn`t copy successor\");\n\n    node1.activate();\n    g.wait_for_all();\n\n    CHECK_MESSAGE((conformance::get_values(node2).size() == 1 && conformance::get_values(node3).size() == 0), \"Copied node doesn`t copy successor\");\n}\n\n//! Test inheritance relations\n//! \\brief \\ref interface\nTEST_CASE(\"input_node superclasses\"){\n    test_inheritance<int>();\n    test_inheritance<void*>();\n    test_inheritance<output_msg>();\n}\n\n//! Test input_node forwarding\n//! \\brief \\ref requirement\nTEST_CASE(\"input_node forwarding\"){\n    conformance::counting_functor<output_msg> fun(conformance::expected);\n    conformance::test_forwarding<oneapi::tbb::flow::input_node<output_msg>, void, output_msg>(5, fun);\n}\n\n//! Test input_node buffering\n//! \\brief \\ref requirement\nTEST_CASE(\"input_node buffering\"){\n    conformance::dummy_functor<int> fun;\n    conformance::test_buffering<oneapi::tbb::flow::input_node<int>, int>(fun);\n}\n\n//! Test calling input_node body\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"input_node body\") {\n    oneapi::tbb::flow::graph g;\n    constexpr std::size_t counting_threshold = 10;\n    conformance::counting_functor<output_msg> fun(counting_threshold);\n\n    oneapi::tbb::flow::input_node<output_msg> node1(g, fun);\n    conformance::test_push_receiver<output_msg> node2(g);\n\n    oneapi::tbb::flow::make_edge(node1, node2);\n\n    node1.activate();\n    g.wait_for_all();\n\n    CHECK_MESSAGE((conformance::get_values(node2).size() == counting_threshold), \"Descendant of the node needs to be receive N messages\");\n    CHECK_MESSAGE((fun.execute_count == counting_threshold + 1), \"Body of the node needs to be executed N + 1 times\");\n}\n\n//! Test deduction guides\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Deduction guides\"){\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n    test_deduction_guides();\n#endif\n}\n\n//! Test that measured concurrency respects set limits\n//! \\brief \\ref requirement\nTEST_CASE(\"concurrency follows set limits\"){\n    oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism,\n                                  oneapi::tbb::this_task_arena::max_concurrency());\n\n\n    utils::ConcurrencyTracker::Reset();\n    oneapi::tbb::flow::graph g;\n    conformance::concurrency_peak_checker_body counter(1);\n    oneapi::tbb::flow::input_node<int> testing_node(g, counter);\n\n    conformance::test_push_receiver<int> sink(g);\n\n    make_edge(testing_node, sink);\n    testing_node.activate();\n\n    g.wait_for_all();\n}\n\n//! Test node Output class meet the CopyConstructible requirements.\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Test input_node Output class\") {\n    conformance::test_output_class<oneapi::tbb::flow::input_node<conformance::copy_counting_object<int>>>();\n}\n\nstruct input_node_counter{\n    static int count;\n    int N;\n    input_node_counter(int n) : N(n){};\n    \n    int operator()( oneapi::tbb::flow_control & fc ) {\n       ++count;\n       if(count > N){\n           fc.stop();\n           return N;\n       }\n       return N;\n    }\n};\n\nstruct function_node_counter{\n    static int count;\n\n    int operator()( int ) {\n        ++count;\n        utils::doDummyWork(1000000);\n        CHECK_MESSAGE((input_node_counter::count <= function_node_counter::count + 1), \"input_node `try_get()' call testing: a call to body is made only when the internal buffer is empty\");\n        return 1;\n    }\n};\n\nint input_node_counter::count = 0;\nint function_node_counter::count = 0;\n\n//! Test input_node `try_get()' call testing: a call to body is made only when the internal buffer is empty.\n//! \\brief \\ref requirement\nTEST_CASE(\"input_node `try_get()' call testing: a call to body is made only when the internal buffer is empty.\") {\n    oneapi::tbb::global_control control(oneapi::tbb::global_control::max_allowed_parallelism, 1);\n    oneapi::tbb::flow::graph g;\n    input_node_counter fun1(500);\n    function_node_counter fun2;\n\n    oneapi::tbb::flow::function_node <int, int, oneapi::tbb::flow::rejecting> fnode(g, oneapi::tbb::flow::serial, fun2);\n    oneapi::tbb::flow::input_node<int> testing_node(g, fun1);\n\n    make_edge(testing_node, fnode);\n    testing_node.activate();\n\n    g.wait_for_all();\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_join_node.cpp",
    "content": "/*\n    Copyright (c) 2020-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"conformance_flowgraph.h\"\n#include \"common/test_invoke.h\"\n\n//! \\file conformance_join_node.cpp\n//! \\brief Test for [flow_graph.join_node] specification\n\nusing input_msg = conformance::message</*default_ctor*/true, /*copy_ctor*/true, /*copy_assign*/true>;\nusing my_input_tuple = std::tuple<int, float, input_msg>;\n\nstd::vector<my_input_tuple> get_values( conformance::test_push_receiver<my_input_tuple>& rr ) {\n    std::vector<my_input_tuple> messages;\n    my_input_tuple tmp(0, 0.f, input_msg(0));\n    while(rr.try_get(tmp)) {\n        messages.push_back(tmp);\n    }\n    return messages;\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\nvoid test_deduction_guides() {\n    using namespace tbb::flow;\n\n    graph g;\n    using tuple_type = std::tuple<int, int, int>;\n    broadcast_node<int> b1(g), b2(g), b3(g);\n    broadcast_node<tuple_type> b4(g);\n    join_node<tuple_type> j0(g);\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    join_node j1(follows(b1, b2, b3));\n    static_assert(std::is_same_v<decltype(j1), join_node<tuple_type>>);\n\n    join_node j2(follows(b1, b2, b3), reserving());\n    static_assert(std::is_same_v<decltype(j2), join_node<tuple_type, reserving>>);\n\n    join_node j3(precedes(b4));\n    static_assert(std::is_same_v<decltype(j3), join_node<tuple_type>>);\n\n    join_node j4(precedes(b4), reserving());\n    static_assert(std::is_same_v<decltype(j4), join_node<tuple_type, reserving>>);\n#endif\n\n    join_node j5(j0);\n    static_assert(std::is_same_v<decltype(j5), join_node<tuple_type>>);\n}\n\n#endif\n\n//! The node that is constructed has a reference to the same graph object as src.\n//! The list of predecessors, messages in the input ports, and successors are not copied.\n//! \\brief \\ref interface\nTEST_CASE(\"join_node copy constructor\"){\n    oneapi::tbb::flow::graph g;\n    oneapi::tbb::flow::continue_node<int> node0( g,\n                                [](oneapi::tbb::flow::continue_msg) { return 1; } );\n\n    oneapi::tbb::flow::join_node<std::tuple<int>> node1(g);\n    conformance::test_push_receiver<std::tuple<int>> node2(g);\n    conformance::test_push_receiver<std::tuple<int>> node3(g);\n\n    oneapi::tbb::flow::make_edge(node0, oneapi::tbb::flow::input_port<0>(node1));\n    oneapi::tbb::flow::make_edge(node1, node2);\n    oneapi::tbb::flow::join_node<std::tuple<int>> node_copy(node1);\n\n    oneapi::tbb::flow::make_edge(node_copy, node3);\n\n    oneapi::tbb::flow::input_port<0>(node_copy).try_put(1);\n    g.wait_for_all();\n\n    auto values = conformance::get_values(node3);\n    CHECK_MESSAGE((conformance::get_values(node2).size() == 0 && values.size() == 1), \"Copied node doesn`t copy successor\");\n\n    node0.try_put(oneapi::tbb::flow::continue_msg());\n    g.wait_for_all();\n\n    CHECK_MESSAGE((conformance::get_values(node2).size() == 1 && conformance::get_values(node3).size() == 0), \"Copied node doesn`t copy predecessor\");\n\n    oneapi::tbb::flow::remove_edge(node1, node2);\n    oneapi::tbb::flow::input_port<0>(node1).try_put(1);\n    g.wait_for_all();\n    oneapi::tbb::flow::join_node<std::tuple<int>> node_copy2(node1);\n    oneapi::tbb::flow::make_edge(node_copy2, node3);\n    oneapi::tbb::flow::input_port<0>(node_copy2).try_put(2);\n    g.wait_for_all();\n    CHECK_MESSAGE((std::get<0>(conformance::get_values(node3)[0]) == 2), \"Copied node doesn`t copy messages in the input ports\");\n}\n\n//! Test inheritance relations\n//! \\brief \\ref interface\nTEST_CASE(\"join_node inheritance\"){\n    CHECK_MESSAGE((std::is_base_of<oneapi::tbb::flow::graph_node,\n                   oneapi::tbb::flow::join_node<my_input_tuple>>::value),\n                   \"join_node should be derived from graph_node\");\n    CHECK_MESSAGE((std::is_base_of<oneapi::tbb::flow::sender<my_input_tuple>,\n                   oneapi::tbb::flow::join_node<my_input_tuple>>::value),\n                   \"join_node should be derived from sender<input_tuple>\");\n}\n\n//! Test join_node<queueing> behavior and broadcast property\n//! \\brief \\ref requirement\nTEST_CASE(\"join_node queueing policy and broadcast property\") {\n    oneapi::tbb::flow::graph g;\n    oneapi::tbb::flow::function_node<int, int>\n        f1( g, oneapi::tbb::flow::unlimited, [](const int &i) { return i; } );\n    oneapi::tbb::flow::function_node<float, float>\n        f2( g, oneapi::tbb::flow::unlimited, [](const float &f) { return f; } );\n    oneapi::tbb::flow::continue_node<input_msg> c1( g,\n                            [](oneapi::tbb::flow::continue_msg) { return input_msg(1); } );\n\n    oneapi::tbb::flow::join_node<my_input_tuple, oneapi::tbb::flow::queueing> testing_node(g);\n\n    conformance::test_push_receiver<my_input_tuple> q_node(g);\n\n    std::atomic<int> number{1};\n    oneapi::tbb::flow::function_node<my_input_tuple, my_input_tuple>\n        f3( g, oneapi::tbb::flow::unlimited,\n            [&]( const my_input_tuple &t ) {\n                CHECK_MESSAGE((std::get<0>(t) == number), \"Messages must be in first-in first-out order\" );\n                CHECK_MESSAGE((std::get<1>(t) == static_cast<float>(number) + 0.5f), \"Messages must be in first-in first-out order\" );\n                CHECK_MESSAGE((std::get<2>(t) == 1), \"Messages must be in first-in first-out order\" );\n                ++number;\n                return t;\n            } );\n\n    oneapi::tbb::flow::make_edge(f1, oneapi::tbb::flow::input_port<0>(testing_node));\n    oneapi::tbb::flow::make_edge(f2, oneapi::tbb::flow::input_port<1>(testing_node));\n    oneapi::tbb::flow::make_edge(c1, oneapi::tbb::flow::input_port<2>(testing_node));\n    make_edge(testing_node, f3);\n    make_edge(f3, q_node);\n\n    f1.try_put(1);\n    g.wait_for_all();\n    CHECK_MESSAGE((get_values(q_node).size() == 0),\n        \"join_node must broadcast when there is at least one message at each input port\");\n    f1.try_put(2);\n    f2.try_put(1.5f);\n    g.wait_for_all();\n    CHECK_MESSAGE((get_values(q_node).size() == 0),\n        \"join_node must broadcast when there is at least one message at each input port\");\n    f1.try_put(3);\n    f2.try_put(2.5f);\n    c1.try_put(oneapi::tbb::flow::continue_msg());\n    g.wait_for_all();\n    CHECK_MESSAGE((get_values(q_node).size() == 1),\n        \"join_node must broadcast when there is at least one message at each input port\");\n    f2.try_put(3.5f);\n    c1.try_put(oneapi::tbb::flow::continue_msg());\n    g.wait_for_all();\n    CHECK_MESSAGE((get_values(q_node).size() == 1),\n        \"If at least one successor accepts the tuple, the head of each input port’s queue is removed\");\n    c1.try_put(oneapi::tbb::flow::continue_msg());\n    g.wait_for_all();\n    CHECK_MESSAGE((get_values(q_node).size() == 1),\n        \"If at least one successor accepts the tuple, the head of each input port’s queue is removed\");\n    c1.try_put(oneapi::tbb::flow::continue_msg());\n    g.wait_for_all();\n    CHECK_MESSAGE((get_values(q_node).size() == 0),\n        \"join_node must broadcast when there is at least one message at each input port\");\n\n    oneapi::tbb::flow::remove_edge(testing_node, f3);\n\n    f1.try_put(1);\n    f2.try_put(1);\n    c1.try_put(oneapi::tbb::flow::continue_msg());\n    g.wait_for_all();\n\n    my_input_tuple tmp(0, 0.f, input_msg(0));\n    CHECK_MESSAGE((testing_node.try_get(tmp)), \"If no one successor accepts the tuple the messages\\\n        must remain in their respective input port queues\");\n    CHECK_MESSAGE((tmp == my_input_tuple(1, 1.f, input_msg(1))), \"If no one successor accepts the tuple\\\n        the messages must remain in their respective input port queues\");\n}\n\n//! Test join_node<reserving> behavior\n//! \\brief \\ref requirement\nTEST_CASE(\"join_node reserving policy\") {\n    conformance::test_with_reserving_join_node_class<oneapi::tbb::flow::write_once_node<int>>();\n}\n\ntemplate<typename KeyType>\nstruct MyHash{\n    std::size_t hash(const KeyType &k) const {\n        return k * 2000 + 3;\n    }\n\n    bool equal(const KeyType &k1, const KeyType &k2) const{\n        return hash(k1) == hash(k2);\n    }\n};\n\n//! Test join_node<key_matching> behavior\n//! \\brief \\ref requirement\nTEST_CASE(\"join_node key_matching policy\"){\n    oneapi::tbb::flow::graph g;\n    auto body1 = [](const oneapi::tbb::flow::continue_msg &) -> int { return 1; };\n    auto body2 = [](const float &val) -> int { return static_cast<int>(val); };\n\n    oneapi::tbb::flow::join_node<std::tuple<oneapi::tbb::flow::continue_msg, float>,\n        oneapi::tbb::flow::key_matching<int, MyHash<int>>> testing_node(g, body1, body2);\n\n    oneapi::tbb::flow::input_port<0>(testing_node).try_put(oneapi::tbb::flow::continue_msg());\n    oneapi::tbb::flow::input_port<1>(testing_node).try_put(1.3f);\n\n    g.wait_for_all();\n\n    std::tuple<oneapi::tbb::flow::continue_msg, float> tmp;\n    CHECK_MESSAGE((testing_node.try_get(tmp)), \"Mapped keys should match.\\\n        If no successor accepts the tuple, it is must been saved and will be forwarded on a subsequent try_get\");\n    CHECK_MESSAGE((!testing_node.try_get(tmp)), \"Message should not exist after item is consumed\");\n}\n\n//! Test join_node<tag_matching> behavior\n//! \\brief \\ref requirement\nTEST_CASE(\"join_node tag_matching policy\"){\n    oneapi::tbb::flow::graph g;\n    auto body1 = [](const oneapi::tbb::flow::continue_msg &) -> oneapi::tbb::flow::tag_value { return 1; };\n    auto body2 = [](const float &val) -> oneapi::tbb::flow::tag_value { return static_cast<oneapi::tbb::flow::tag_value>(val); };\n\n    oneapi::tbb::flow::join_node<std::tuple<oneapi::tbb::flow::continue_msg, float>,\n        oneapi::tbb::flow::tag_matching> testing_node(g, body1, body2);\n\n    oneapi::tbb::flow::input_port<0>(testing_node).try_put(oneapi::tbb::flow::continue_msg());\n    oneapi::tbb::flow::input_port<1>(testing_node).try_put(1.3f);\n\n    g.wait_for_all();\n\n    std::tuple<oneapi::tbb::flow::continue_msg, float> tmp;\n    CHECK_MESSAGE((testing_node.try_get(tmp) == true), \"Mapped keys should match\");\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Test deduction guides\n//! \\brief \\ref requirement\nTEST_CASE(\"Deduction guides test\"){\n    test_deduction_guides();\n}\n#endif\n\n//! Test join_node input_ports() returns a tuple of input ports.\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"join_node output_ports\") {\n    oneapi::tbb::flow::graph g;\n    oneapi::tbb::flow::join_node<std::tuple<int>> node(g);\n\n    CHECK_MESSAGE((std::is_same<oneapi::tbb::flow::join_node<std::tuple<int>>::input_ports_type&,\n        decltype(node.input_ports())>::value), \"join_node input_ports should returns a tuple of input ports\");\n}\n\n#if __TBB_CPP17_INVOKE_PRESENT\n\ntemplate <typename K, typename Body1, typename Body2>\nvoid test_invoke_basic(Body1 body1, Body2 body2) {\n    static_assert(std::is_same_v<std::decay_t<K>, std::size_t>, \"incorrect test setup\");\n    using namespace oneapi::tbb::flow;\n    auto generator = [](std::size_t n) { return test_invoke::SmartID<std::size_t>(n); };\n    graph g;\n\n    function_node<std::size_t, test_invoke::SmartID<std::size_t>> f1(g, unlimited, generator);\n    function_node<std::size_t, test_invoke::SmartID<std::size_t>> f2(g, unlimited, generator);\n\n    using tuple_type = std::tuple<test_invoke::SmartID<std::size_t>, test_invoke::SmartID<std::size_t>>;\n    using join_type = join_node<tuple_type, key_matching<K>>;\n\n\n    join_type j(g, body1, body2);\n\n    buffer_node<tuple_type> buf(g);\n\n    make_edge(f1, input_port<0>(j));\n    make_edge(f2, input_port<1>(j));\n    make_edge(j, buf);\n\n    std::size_t objects_count = 100;\n    for (std::size_t i = 0; i < objects_count; ++i) {\n        f1.try_put(i);\n        f2.try_put(objects_count - i - 1);\n    }\n\n    g.wait_for_all();\n\n    std::size_t buf_size = 0;\n    tuple_type tpl;\n\n    while(buf.try_get(tpl)) {\n        ++buf_size;\n        CHECK(std::get<0>(tpl).id == std::get<1>(tpl).id);\n    }\n    CHECK(buf_size == objects_count);\n}\n\n//! Test that key_matching join_node uses std::invoke to run the body\n//! \\brief \\ref requirement\nTEST_CASE(\"key_matching join_node invoke semantics\") {\n    test_invoke_basic</*K = */std::size_t>(&test_invoke::SmartID<std::size_t>::get_id, &test_invoke::SmartID<std::size_t>::id);\n    test_invoke_basic</*K = */const std::size_t&>(&test_invoke::SmartID<std::size_t>::get_id_ref, &test_invoke::SmartID<std::size_t>::get_id_ref);\n}\n#endif // __TBB_CPP17_INVOKE_PRESENT\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_limiter_node.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"conformance_flowgraph.h\"\n\n//! \\file conformance_limiter_node.cpp\n//! \\brief Test for [flow_graph.limiter_node] specification\n\nusing input_msg = conformance::message</*default_ctor*/true, /*copy_ctor*/true/*enable for queue_node successor*/, /*copy_assign*/true/*enable for queue_node successor*/>;\n\n//! Test limiter_node limiting\n//! \\brief \\ref requirement\nTEST_CASE(\"limiter_node limiting\"){\n    oneapi::tbb::flow::graph g;\n\n    constexpr int limit = 5;\n    oneapi::tbb::flow::limiter_node<input_msg> node1(g, limit);\n    conformance::test_push_receiver<input_msg> node2(g);\n\n    oneapi::tbb::flow::make_edge(node1, node2);\n\n    for(int i = 0; i < limit * 2; ++i)\n        node1.try_put(input_msg(1));\n    g.wait_for_all();\n\n    CHECK_MESSAGE((conformance::get_values(node2).size() == limit), \"Descendant of the node needs be receive limited number of messages\");\n}\n\n//! Test node broadcast messages to successors\n//! \\brief \\ref requirement\nTEST_CASE(\"limiter_node broadcast\"){\n    conformance::test_forwarding<oneapi::tbb::flow::limiter_node<int>, int>(1, 5);\n    conformance::test_forwarding<oneapi::tbb::flow::limiter_node<input_msg>, input_msg>(1, 5);\n}\n\n//! Test node not buffered unsuccessful message, and try_get after rejection should not succeed.\n//! \\brief \\ref requirement\nTEST_CASE(\"limiter_node buffering\"){\n    conformance::test_buffering<oneapi::tbb::flow::limiter_node<int>, int>(5);\n    conformance::test_buffering<oneapi::tbb::flow::limiter_node<int, int>, int>(5);\n}\n\n//! The node that is constructed has a reference to the same graph object as src, has the same threshold.\n//! The predecessors and successors of src are not copied.\n//! \\brief \\ref interface\nTEST_CASE(\"limiter_node copy constructor\"){\n    using namespace oneapi::tbb::flow;\n    graph g;\n\n    limiter_node<int> node0(g, 1);\n    limiter_node<int> node1(g, 1);\n    conformance::test_push_receiver<int> node2(g);\n    conformance::test_push_receiver<int> node3(g);\n\n    oneapi::tbb::flow::make_edge(node0, node1);\n    oneapi::tbb::flow::make_edge(node1, node2);\n\n    limiter_node<int> node_copy(node1);\n\n    oneapi::tbb::flow::make_edge(node_copy, node3);\n\n    node_copy.try_put(1);\n    g.wait_for_all();\n\n    CHECK_MESSAGE((conformance::get_values(node2).size() == 0 && conformance::get_values(node3).size() == 1), \"Copied node doesn`t copy successor\");\n\n    node_copy.try_put(1);\n    g.wait_for_all();\n\n    CHECK_MESSAGE((conformance::get_values(node2).size() == 0 && conformance::get_values(node3).size() == 0), \"Copied node copy threshold\");\n\n    node0.try_put(1);\n    g.wait_for_all();\n\n    CHECK_MESSAGE((conformance::get_values(node2).size() == 1 && conformance::get_values(node3).size() == 0), \"Copied node doesn`t copy predecessor\");\n}\n\n//! Test inheritance relations\n//! \\brief \\ref interface\nTEST_CASE(\"limiter_node superclasses\"){\n    conformance::test_inheritance<oneapi::tbb::flow::limiter_node<int>, int, int>();\n    conformance::test_inheritance<oneapi::tbb::flow::limiter_node<float>, float, float>();\n    conformance::test_inheritance<oneapi::tbb::flow::limiter_node<input_msg>, input_msg, input_msg>();\n}\n\n//! Test limiter_node decrementer\n//! \\brief \\ref interface\nTEST_CASE(\"limiter_node decrementer\"){\n    const int threshold = 5;\n    oneapi::tbb::flow::graph g;\n    oneapi::tbb::flow::limiter_node<int, int> limit(g, threshold);\n    oneapi::tbb::flow::queue_node<int> queue(g);\n    make_edge(limit, queue);\n    int m = 0;\n    CHECK_MESSAGE(( limit.try_put( m++ )), \"Newly constructed limiter node does not accept message.\" );\n    CHECK_MESSAGE(limit.decrementer().try_put( -threshold ), // close limiter's gate\n                   \"Limiter node decrementer's port does not accept message.\" );\n    CHECK_MESSAGE(( !limit.try_put( m++ )), \"Closed limiter node's accepts message.\" );\n    CHECK_MESSAGE(limit.decrementer().try_put( threshold + 5 ),  // open limiter's gate\n                   \"Limiter node decrementer's port does not accept message.\" );\n    for( int i = 0; i < threshold; ++i )\n        CHECK_MESSAGE(( limit.try_put( m++ )), \"Limiter node does not accept message while open.\" );\n    CHECK_MESSAGE(( !limit.try_put( m )), \"Limiter node's gate is not closed.\" );\n    g.wait_for_all();\n    int expected[] = {0, 2, 3, 4, 5, 6};\n    int actual = -1; m = 0;\n    while( queue.try_get(actual) )\n        CHECK_MESSAGE(actual == expected[m++], \"\" );\n    CHECK_MESSAGE(( sizeof(expected) / sizeof(expected[0]) == m), \"Not all messages have been processed.\" );\n    g.wait_for_all();\n\n    const size_t threshold2 = size_t(-1);\n    oneapi::tbb::flow::limiter_node<int, long long> limit2(g, threshold2);\n    make_edge(limit2, queue);\n    CHECK_MESSAGE(( limit2.try_put( 1 )), \"Newly constructed limiter node does not accept message.\" );\n    long long decrement_value = (long long)( size_t(-1)/2 );\n    CHECK_MESSAGE(limit2.decrementer().try_put( -decrement_value ),\n                   \"Limiter node decrementer's port does not accept message\" );\n    CHECK_MESSAGE(( limit2.try_put( 2 )), \"Limiter's gate should not be closed yet.\" );\n    CHECK_MESSAGE(limit2.decrementer().try_put( -decrement_value ),\n                   \"Limiter node decrementer's port does not accept message\" );\n    CHECK_MESSAGE(( !limit2.try_put( 3 )), \"Overflow happened for internal counter.\" );\n    int expected2[] = {1, 2};\n    actual = -1; m = 0;\n    while( queue.try_get(actual) )\n        CHECK_MESSAGE(actual == expected2[m++], \"\" );\n    CHECK_MESSAGE(( sizeof(expected2) / sizeof(expected2[0]) == m), \"Not all messages have been processed.\" );\n    g.wait_for_all();\n\n    const size_t threshold3 = 10;\n    oneapi::tbb::flow::limiter_node<int, long long> limit3(g, threshold3);\n    make_edge(limit3, queue);\n    long long decrement_value3 = 3;\n    CHECK_MESSAGE(limit3.decrementer().try_put( -decrement_value3 ),\n                   \"Limiter node decrementer's port does not accept message\" );\n\n    m = 0;\n    while( limit3.try_put( m ) ){ m++; };\n    CHECK_MESSAGE(m == threshold3 - decrement_value3, \"Not all messages have been accepted.\" );\n\n    actual = -1; m = 0;\n    while( queue.try_get(actual) ){\n        CHECK_MESSAGE(actual == m++, \"Not all messages have been processed.\" );\n    }\n\n    g.wait_for_all();\n    CHECK_MESSAGE(m == threshold3 - decrement_value3, \"Not all messages have been processed.\" );\n\n    const size_t threshold4 = 10;\n    oneapi::tbb::flow::limiter_node<int> limit4(g, threshold4);\n    make_edge(limit4, queue);\n\n    limit4.try_put(-1);\n    CHECK_MESSAGE(limit4.decrementer().try_put(oneapi::tbb::flow::continue_msg()),\n                   \"Limiter node decrementer's port does not accept continue_msg\" );\n\n    m = 0;\n    while( limit4.try_put( m ) ){ m++; };\n    CHECK_MESSAGE(m == threshold4, \"Not all messages have been accepted.\" );\n\n    actual = -1; m = -1;\n    while( queue.try_get(actual) ){\n        CHECK_MESSAGE(actual == m++, \"Not all messages have been processed.\" );\n    }\n\n    g.wait_for_all();\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_multifunction_node.cpp",
    "content": "/*\n    Copyright (c) 2020-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#define CONFORMANCE_MULTIFUNCTION_NODE\n\n#include \"conformance_flowgraph.h\"\n#include \"common/test_invoke.h\"\n\n//! \\file conformance_multifunction_node.cpp\n//! \\brief Test for [flow_graph.function_node] specification\n\nusing input_msg = conformance::message</*default_ctor*/true, /*copy_ctor*/true, /*copy_assign*/false>;\nusing output_msg = conformance::message</*default_ctor*/false, /*copy_ctor*/false, /*copy_assign*/false>;\n\n/*\n    Test function_node is a graph_node, receiver<Input>, and sender<Output>\n*/\ntemplate<typename I, typename O>\nvoid test_inheritance(){\n    using namespace oneapi::tbb::flow;\n\n    CHECK_MESSAGE((std::is_base_of<graph_node, multifunction_node<I, O>>::value), \"multifunction_node should be derived from graph_node\");\n    CHECK_MESSAGE((std::is_base_of<receiver<I>, multifunction_node<I, O>>::value), \"multifunction_node should be derived from receiver<Input>\");\n}\n\n//! Test node reject the incoming message if the concurrency limit achieved.\n//! \\brief \\ref interface\nTEST_CASE(\"multifunction_node with rejecting policy\"){\n    conformance::test_rejecting<oneapi::tbb::flow::multifunction_node<int, std::tuple<int>, oneapi::tbb::flow::rejecting>>();\n}\n\n//! Test nodes for execution with priority in single-threaded configuration\n//! \\brief \\ref interface\nTEST_CASE(\"multifunction_node priority\"){\n    conformance::test_priority<oneapi::tbb::flow::multifunction_node<input_msg, std::tuple<int>>, input_msg>(oneapi::tbb::flow::unlimited);\n}\n\n//! Test function_node has a user-settable concurrency limit. It can be set to one of predefined values.\n//! The user can also provide a value of type std::size_t to limit concurrency.\n//! Test that not more than limited threads works in parallel.\n//! \\brief \\ref interface\nTEST_CASE(\"multifunction_node concurrency\"){\n    conformance::test_concurrency<oneapi::tbb::flow::multifunction_node<int, std::tuple<int>>>();\n}\n\n//! Test all node constructors\n//! \\brief \\ref interface\nTEST_CASE(\"multifunction_node constructors\"){\n    using namespace oneapi::tbb::flow;\n    graph g;\n\n    conformance::counting_functor<int> fun;\n\n    multifunction_node<int, std::tuple<int>> fn1(g, unlimited, fun);\n    multifunction_node<int, std::tuple<int>> fn2(g, unlimited, fun, oneapi::tbb::flow::node_priority_t(1));\n\n    multifunction_node<int, std::tuple<int>, lightweight> lw_node1(g, serial, fun, lightweight());\n    multifunction_node<int, std::tuple<int>, lightweight> lw_node2(g, serial, fun, lightweight(), oneapi::tbb::flow::node_priority_t(1));\n}\n\n//! The node that is constructed has a reference to the same graph object as src, has a copy of the initial body used by src, and has the same concurrency threshold as src.\n//! The predecessors and successors of src are not copied.\n//! \\brief \\ref interface\nTEST_CASE(\"multifunction_node copy constructor\"){\n    conformance::test_copy_ctor<oneapi::tbb::flow::multifunction_node<int, std::tuple<int>>>();\n}\n\n//! Test node not buffered unsuccessful message, and try_get after rejection should not succeed.\n//! \\brief \\ref requirement\nTEST_CASE(\"multifunction_node buffering\"){\n    conformance::dummy_functor<int> fun;\n    conformance::test_buffering<oneapi::tbb::flow::multifunction_node<input_msg, std::tuple<int>,\n    oneapi::tbb::flow::rejecting>, input_msg>(oneapi::tbb::flow::unlimited, fun);\n}\n\n//! Test multifunction_node broadcasting\n//! \\brief \\ref requirement\nTEST_CASE(\"multifunction_node broadcast\"){\n    conformance::counting_functor<int> fun(conformance::expected);\n    conformance::test_forwarding<oneapi::tbb::flow::multifunction_node<input_msg, std::tuple<int>>, input_msg, int>(1, oneapi::tbb::flow::unlimited, fun);\n}\n\n//! Test the body object passed to a node is copied\n//! \\brief \\ref interface\nTEST_CASE(\"multifunction_node copy body\"){\n    conformance::test_copy_body_function<oneapi::tbb::flow::multifunction_node<int, std::tuple<int>>, conformance::copy_counting_object<int>>(oneapi::tbb::flow::unlimited);\n}\n\n//! Test execution of node body\n//! Test node can do try_put call\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"multifunction_node body\") {\n    conformance::test_body_exec<oneapi::tbb::flow::multifunction_node<input_msg, std::tuple<output_msg>, oneapi::tbb::flow::rejecting>, input_msg, output_msg>(oneapi::tbb::flow::unlimited);\n}\n\n//! Test multifunction_node output_ports() returns a tuple of output ports.\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"multifunction_node output_ports\") {\n    using namespace oneapi::tbb::flow;\n    graph g;\n    conformance::dummy_functor<int> fun;\n    oneapi::tbb::flow::multifunction_node <int, std::tuple<int>> node(g, unlimited, fun);\n\n    CHECK_MESSAGE((std::is_same<oneapi::tbb::flow::multifunction_node<int, std::tuple<int>>::output_ports_type&,\n        decltype(node.output_ports())>::value), \"multifunction_node output_ports should returns a tuple of output ports\");\n}\n\n//! Test inheritance relations\n//! \\brief \\ref interface\nTEST_CASE(\"multifunction_node superclasses\"){\n    test_inheritance<int, std::tuple<int>>();\n    test_inheritance<void*, std::tuple<float>>();\n    test_inheritance<input_msg, std::tuple<output_msg>>();\n}\n\n//! Test node Input class meet the DefaultConstructible and CopyConstructible requirements and Output class meet the CopyConstructible requirements.\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Test function_node Output and Input class\") {\n    using Body = conformance::copy_counting_object<int>;\n    conformance::test_output_input_class<oneapi::tbb::flow::multifunction_node<Body, std::tuple<Body>>, Body>();\n}\n\n#if __TBB_CPP17_INVOKE_PRESENT\n//! Test that multifunction_node uses std::invoke to execute the body\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Test multifunction_node and std::invoke\") {\n    using namespace oneapi::tbb::flow;\n\n    using output_type1 = test_invoke::SmartID<std::size_t>;\n    using input_type = test_invoke::SmartID<output_type1>;\n\n    using output_tuple1 = std::tuple<output_type1, output_type1>;\n    using output_tuple2 = std::tuple<std::size_t>;\n\n    using first_mf_node_type = multifunction_node<input_type, output_tuple1>;\n    using second_mf_node_type = multifunction_node<output_type1, output_tuple2>;\n\n    using first_ports_type = typename first_mf_node_type::output_ports_type;\n    using second_ports_type = typename second_mf_node_type::output_ports_type;\n\n    graph g;\n\n    auto first_body = &input_type::template send_id<first_ports_type>;\n    auto second_body = &output_type1::template send_id<second_ports_type>;\n\n    first_mf_node_type mf1(g, unlimited, first_body);\n    second_mf_node_type mf21(g, unlimited, second_body);\n    second_mf_node_type mf22(g, unlimited, second_body);\n\n    buffer_node<std::size_t> buf(g);\n\n    make_edge(output_port<0>(mf1), mf21);\n    make_edge(output_port<1>(mf1), mf22);\n\n    make_edge(output_port<0>(mf21), buf);\n    make_edge(output_port<0>(mf22), buf);\n\n    mf1.try_put(input_type{output_type1{1}});\n\n    g.wait_for_all();\n\n    std::size_t buf_size = 0;\n    std::size_t tmp = 0;\n    while(buf.try_get(tmp)) {\n        ++buf_size;\n        CHECK(tmp == 1);\n    }\n\n    CHECK(buf_size == 2);\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_mutex.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"conformance_mutex.h\"\n\n#include \"oneapi/tbb/spin_mutex.h\"\n#include \"oneapi/tbb/mutex.h\"\n#include \"oneapi/tbb/spin_rw_mutex.h\"\n#include \"oneapi/tbb/rw_mutex.h\"\n#include \"oneapi/tbb/queuing_mutex.h\"\n#include \"oneapi/tbb/queuing_rw_mutex.h\"\n#include \"oneapi/tbb/null_mutex.h\"\n#include \"oneapi/tbb/null_rw_mutex.h\"\n\n//! \\file conformance_mutex.cpp\n//! \\brief Test for [mutex.spin_mutex mutex.spin_rw_mutex mutex.queuing_mutex mutex.queuing_rw_mutex mutex.mutex mutex.rw_mutex mutex.speculative_spin_mutex mutex.speculative_spin_rw_mutex mutex.null_mutex mutex.null_rw_mutex] specifications\n\n//! Testing Mutex requirements\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Basic Locable requirement test\") {\n    // BasicLockable\n    GeneralTest<oneapi::tbb::spin_mutex>(\"Spin Mutex\");\n    GeneralTest<oneapi::tbb::spin_rw_mutex>(\"Spin RW Mutex\");\n    GeneralTest<oneapi::tbb::queuing_mutex>(\"Queuing Mutex\");\n    GeneralTest<oneapi::tbb::queuing_rw_mutex>(\"Queuing RW Mutex\");\n    GeneralTest<oneapi::tbb::mutex>(\"Adaptive Mutex\");\n    GeneralTest<oneapi::tbb::rw_mutex>(\"Adaptive RW Mutex\");\n    // TODO: Consider adding Thread Sanitizer (note that accesses inside the transaction\n    // considered as races by Thread Sanitizer)\n#if !__TBB_USE_THREAD_SANITIZER\n    GeneralTest<oneapi::tbb::speculative_spin_mutex>(\"Speculative Spin Mutex\");\n    GeneralTest<oneapi::tbb::speculative_spin_rw_mutex>(\"Speculative Spin RW Mutex\");\n#endif\n    // NullMutexes\n    GeneralTest<oneapi::tbb::null_mutex, utils::AtomicCounter<oneapi::tbb::null_mutex>>(\"Null Mutex\", false);\n    GeneralTest<oneapi::tbb::null_rw_mutex, utils::AtomicCounter<oneapi::tbb::null_rw_mutex>>(\"Null RW Mutex\", false);\n    TestNullMutex<oneapi::tbb::null_mutex>(\"Null Mutex\");\n    TestNullMutex<oneapi::tbb::null_rw_mutex>(\"Null RW Mutex\");\n}\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Lockable requirement test\") {\n    // Lockable - single threaded try_acquire operations\n    TestTryAcquire<oneapi::tbb::spin_mutex>(\"Spin Mutex\");\n    TestTryAcquire<oneapi::tbb::spin_rw_mutex>(\"Spin RW Mutex\");\n    TestTryAcquire<oneapi::tbb::queuing_mutex>(\"Queuing Mutex\");\n    TestTryAcquire<oneapi::tbb::queuing_rw_mutex>(\"Queuing RW Mutex\");\n    TestTryAcquire<oneapi::tbb::mutex>(\"Adaptive Mutex\");\n    TestTryAcquire<oneapi::tbb::rw_mutex>(\"Adaptive RW Mutex\");\n#if !__TBB_USE_THREAD_SANITIZER\n    TestTryAcquire<oneapi::tbb::speculative_spin_mutex>(\"Speculative Spin Mutex\");\n    TestTryAcquire<oneapi::tbb::speculative_spin_rw_mutex>(\"Speculative Spin RW Mutex\");\n#endif\n    TestTryAcquire<oneapi::tbb::null_mutex>(\"Null Mutex\");\n}\n\n//! Testing ReaderWriterMutex requirements\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Shared mutexes (reader/writer) test\") {\n    // General reader writer capabilities + upgrade/downgrade\n    TestReaderWriterLock<oneapi::tbb::spin_rw_mutex>(\"Spin RW Mutex\");\n    TestReaderWriterLock<oneapi::tbb::queuing_rw_mutex>(\"Queuing RW Mutex\");\n    TestReaderWriterLock<oneapi::tbb::rw_mutex>(\"Adaptive RW Mutex\");\n    TestNullRWMutex<oneapi::tbb::null_rw_mutex>(\"Null RW Mutex\");\n    // Single threaded read/write try_acquire operations\n    TestTryAcquireReader<oneapi::tbb::spin_rw_mutex>(\"Spin RW Mutex\");\n    TestTryAcquireReader<oneapi::tbb::queuing_rw_mutex>(\"Queuing RW Mutex\");\n    TestRWStateMultipleChange<oneapi::tbb::spin_rw_mutex>(\"Spin RW Mutex\");\n    TestRWStateMultipleChange<oneapi::tbb::queuing_rw_mutex>(\"Queuing RW Mutex\");\n    TestRWStateMultipleChange<oneapi::tbb::rw_mutex>(\"Adaptive RW Mutex\");\n    TestTryAcquireReader<oneapi::tbb::null_rw_mutex>(\"Null RW Mutex\");\n#if !__TBB_USE_THREAD_SANITIZER\n    TestReaderWriterLock<oneapi::tbb::speculative_spin_rw_mutex>(\"Speculative Spin RW Mutex\");\n    TestTryAcquireReader<oneapi::tbb::speculative_spin_rw_mutex>(\"Speculative Spin RW Mutex\");\n    TestRWStateMultipleChange<oneapi::tbb::speculative_spin_rw_mutex>(\"Speculative Spin RW Mutex\");\n#endif\n}\n\n//! Testing ISO C++ Mutex and Shared Mutex requirements.\n//! Compatibility with the standard\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"ISO interface test\") {\n    GeneralTest<TBB_MutexFromISO_Mutex<oneapi::tbb::spin_mutex> >(\"ISO Spin Mutex\");\n    GeneralTest<TBB_MutexFromISO_Mutex<oneapi::tbb::spin_rw_mutex> >(\"ISO Spin RW Mutex\");\n    GeneralTest<TBB_MutexFromISO_Mutex<oneapi::tbb::mutex> >(\"ISO Adaprive Mutex\");\n    GeneralTest<TBB_MutexFromISO_Mutex<oneapi::tbb::rw_mutex>>(\"ISO Adaptive RW Mutex\");\n    TestTryAcquire<TBB_MutexFromISO_Mutex<oneapi::tbb::spin_mutex> >(\"ISO Spin Mutex\");\n    TestTryAcquire<TBB_MutexFromISO_Mutex<oneapi::tbb::spin_rw_mutex> >(\"ISO Spin RW Mutex\");\n    TestTryAcquire<TBB_MutexFromISO_Mutex<oneapi::tbb::mutex> >(\"ISO Adaptive  Mutex\");\n    TestTryAcquire<TBB_MutexFromISO_Mutex<oneapi::tbb::rw_mutex>>(\"ISO Adaptive RW Mutex\");\n    TestTryAcquireReader<TBB_MutexFromISO_Mutex<oneapi::tbb::spin_rw_mutex> >(\"ISO Spin RW Mutex\");\n    TestReaderWriterLock<TBB_MutexFromISO_Mutex<oneapi::tbb::spin_rw_mutex> >(\"ISO Spin RW Mutex\");\n    TestTryAcquireReader<TBB_MutexFromISO_Mutex<oneapi::tbb::rw_mutex>>(\"ISO Adaptive RW Mutex\");\n    TestReaderWriterLock<TBB_MutexFromISO_Mutex<oneapi::tbb::rw_mutex>>(\"ISO Adaptive RW Mutex\");\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_mutex.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/null_mutex.h\"\n#include \"oneapi/tbb/null_rw_mutex.h\"\n\n#include <type_traits>\n\n//! Generic test of a TBB mutex\n/** Does not test features specific to reader-writer locks. */\ntemplate<typename M, typename Counter = utils::Counter<M>>\nvoid GeneralTest(const char* mutex_name, bool check = true) { // check flag is needed to disable correctness check for null mutexes (for test reusage)\n    const int N = 100000;\n    const int GRAIN = 10000;\n    Counter counter;\n    counter.value = 0;\n\n    // Stress test to force possible race condition of the counter\n    utils::NativeParallelFor(N, GRAIN, [&] (int i) {\n        if (i & 1) {\n            // Try implicit acquire and explicit release\n            typename M::scoped_lock lock(counter.mutex);\n            counter.value = counter.value + 1;\n            lock.release();\n        } else {\n            // Try explicit acquire and implicit release\n            typename M::scoped_lock lock;\n            lock.acquire(counter.mutex);\n            counter.value = counter.value + 1;\n        }\n    });\n    if (check) {\n        REQUIRE_MESSAGE(counter.value == N, \"ERROR for \" << mutex_name << \": race is detected\");\n    }\n}\n\n//! Test try_acquire functionality of a non-reenterable mutex\ntemplate<typename M>\nvoid TestTryAcquire(const char* mutex_name) {\n    M tested_mutex;\n    typename M::scoped_lock lock_outer;\n    if (lock_outer.try_acquire(tested_mutex)) {\n        lock_outer.release();\n    } else {\n        CHECK_MESSAGE(false, \"ERROR for \" << mutex_name << \": try_acquire failed though it should not\");\n    }\n    {\n        typename M::scoped_lock lock_inner(tested_mutex);\n        CHECK_MESSAGE(!lock_outer.try_acquire(tested_mutex), \"ERROR for \" << mutex_name << \": try_acquire failed though it should not (1)\");\n    }\n    if (lock_outer.try_acquire(tested_mutex)) {\n        lock_outer.release();\n    } else {\n        CHECK_MESSAGE(false, \"ERROR for \" << mutex_name << \": try_acquire failed though it should not\");\n    }\n}\n\ntemplate <>\nvoid TestTryAcquire<oneapi::tbb::null_mutex>( const char* mutex_name ) {\n    oneapi::tbb::null_mutex tested_mutex;\n    typename oneapi::tbb::null_mutex::scoped_lock lock(tested_mutex);\n    CHECK_MESSAGE(lock.try_acquire(tested_mutex), \"ERROR for \" << mutex_name << \": try_acquire failed though it should not\");\n    lock.release();\n    CHECK_MESSAGE(lock.try_acquire(tested_mutex), \"ERROR for \" << mutex_name << \": try_acquire failed though it should not\");\n}\n\n//! Test try_acquire functionality of a non-reenterable mutex\ntemplate<typename M>\nvoid TestTryAcquireReader(const char* mutex_name) {\n    M tested_mutex;\n    typename M::scoped_lock lock_outer;\n    if (lock_outer.try_acquire(tested_mutex, false) ) {\n        lock_outer.release();\n    } else {\n        CHECK_MESSAGE(false, \"ERROR for \" << mutex_name << \": try_acquire failed though it should not\");\n    }\n    {\n        typename M::scoped_lock lock_inner(tested_mutex, false); // read lock\n        // try acquire on write\n        CHECK_MESSAGE(!lock_outer.try_acquire(tested_mutex, true), \"ERROR for \" << mutex_name << \": try_acquire on write succeed though it should not (1)\");\n        lock_inner.release();                                    // unlock\n        lock_inner.acquire(tested_mutex, true);                  // write lock\n        // try acquire on read\n        CHECK_MESSAGE(!lock_outer.try_acquire(tested_mutex, false), \"ERROR for \" << mutex_name << \": try_acquire on read succeed though it should not (2)\");\n    }\n    if (lock_outer.try_acquire(tested_mutex, false) ) {\n        lock_outer.release();\n    } else {\n        CHECK_MESSAGE(false, \"ERROR for \" << mutex_name << \": try_acquire failed though it should not\");\n    }\n}\n\ntemplate <>\nvoid TestTryAcquireReader<oneapi::tbb::null_rw_mutex>( const char* mutex_name ) {\n    oneapi::tbb::null_rw_mutex tested_mutex;\n    typename oneapi::tbb::null_rw_mutex::scoped_lock lock(tested_mutex, false);\n    CHECK_MESSAGE(lock.try_acquire(tested_mutex, false), \"Error for \" << mutex_name << \": try_acquire on read failed though it should not\");\n    CHECK_MESSAGE(lock.try_acquire(tested_mutex, true), \"Error for \" << mutex_name << \": try_acquire on write failed though it should not\");\n    lock.release();\n    CHECK_MESSAGE(lock.try_acquire(tested_mutex, false), \"Error for \" << mutex_name << \": try_acquire on read failed though it should not\");\n    CHECK_MESSAGE(lock.try_acquire(tested_mutex, true), \"Error for \" << mutex_name << \": try_acquire on write failed though it should not\");\n}\n\ntemplate<typename M, size_t N>\nstruct ArrayCounter {\n    using mutex_type = M;\n    M mutex;\n    long value[N];\n\n    ArrayCounter() : value{0} {}\n\n    void increment() {\n        for (size_t k = 0; k < N; ++k) {\n            ++value[k];\n        }\n    }\n\n    bool value_is(long expected_value) const {\n        for (size_t k = 0; k < N; ++k) {\n            if (value[k] != expected_value) {\n                return false;\n            }\n        }\n        return true;\n    }\n};\n\ntemplate<typename M, typename Counter>\nvoid TestReaderWriterLock_Impl(Counter& counter, typename M::scoped_lock& lock, const std::size_t i, const bool write) {\n    bool okay = true;\n    if (write) {\n        long counter_value = counter.value[0];\n        counter.increment();\n        // Downgrade to reader\n        if (i % 16 == 7) {\n            if (!lock.downgrade_to_reader()) {\n                // Get the previous value as downgrade with the same lock acquired was failed\n                counter_value = counter.value[0] - 1;\n            }\n            okay = counter.value_is(counter_value + 1);\n        }\n    } else {\n        okay = counter.value_is(counter.value[0]);\n        // Upgrade to writer\n        if (i % 8 == 3) {\n            long counter_value = counter.value[0];\n            if (!lock.upgrade_to_writer()) {\n                // Failed to upgrade, reacquiring happened, need to update the value\n                counter_value = counter.value[0];\n            }\n            counter.increment();\n            okay = counter.value_is(counter_value + 1);\n        }\n    }\n    CHECK_MESSAGE(okay, \"Error in read write mutex operations\");\n}\n\n//! Shared mutex type test\ntemplate<typename M>\nvoid TestReaderWriterLock(const char* mutex_name) {\n    ArrayCounter<M, 8> counter;\n    const int N = 10000;\n#if TBB_TEST_LOW_WORKLOAD\n    const int GRAIN = 500;\n#else\n    const int GRAIN = 100;\n#endif /* TBB_TEST_LOW_WORKLOAD */\n\n    // Stress test similar to the general, but with upgrade/downgrade cases\n    utils::NativeParallelFor(N, GRAIN, [&](int i) {\n        //! Every 8th access is a write access\n        const bool write = (i % 8) == 7;\n        if (i & 1) {\n            // Try implicit acquire and explicit release\n            typename M::scoped_lock lock(counter.mutex, write);\n            TestReaderWriterLock_Impl<M, ArrayCounter<M, 8>>(counter, lock, i, write);\n            lock.release();\n        } else {\n            // Try explicit acquire and implicit release\n            typename M::scoped_lock lock;\n            lock.acquire(counter.mutex, write);\n            TestReaderWriterLock_Impl<M, ArrayCounter<M, 8>>(counter, lock, i, write);\n        }\n    });\n    // There is either a writer or a reader upgraded to a writer for each 4th iteration\n    REQUIRE_MESSAGE(counter.value_is(N / 4), \"ERROR for \" << mutex_name << \": race is detected\");\n}\n\ntemplate<typename M>\nvoid TestRWStateMultipleChange(const char* mutex_name) {\n    static_assert(M::is_rw_mutex, \"Incorrect mutex type\");\n\n    const int N = 1000;\n    const int GRAIN = 100;\n    M mutex;\n    utils::NativeParallelFor(N, GRAIN, [&] (int) {\n        typename M::scoped_lock l(mutex, /*write=*/false);\n        for (int i = 0; i != GRAIN; ++i) {\n            CHECK_MESSAGE(l.downgrade_to_reader(), mutex_name << \" downgrade must succeed for read lock\");\n        }\n        l.upgrade_to_writer();\n        for (int i = 0; i != GRAIN; ++i) {\n            CHECK_MESSAGE(l.upgrade_to_writer(), mutex_name << \" upgrade must succeed for write lock\");\n        }\n    });\n}\n\n//! Adaptor for using ISO C++0x style mutex as a TBB-style mutex.\ntemplate<typename M>\nclass TBB_MutexFromISO_Mutex {\n    M my_iso_mutex;\npublic:\n    typedef TBB_MutexFromISO_Mutex mutex_type;\n\n    class scoped_lock;\n    friend class scoped_lock;\n\n    class scoped_lock {\n        mutex_type* my_mutex;\n        bool m_is_writer;\n    public:\n        scoped_lock() : my_mutex(nullptr), m_is_writer(false) {}\n        scoped_lock(mutex_type& m) : my_mutex(nullptr), m_is_writer(false) {\n            acquire(m);\n        }\n        scoped_lock(mutex_type& m, bool is_writer) : my_mutex(nullptr) {\n            acquire(m,is_writer);\n        }\n        void acquire(mutex_type& m) {\n            m_is_writer = true;\n            m.my_iso_mutex.lock();\n            my_mutex = &m;\n        }\n        bool try_acquire(mutex_type& m) {\n            m_is_writer = true;\n            if (m.my_iso_mutex.try_lock()) {\n                my_mutex = &m;\n                return true;\n            } else {\n                return false;\n            }\n        }\n\n        template<typename Q = M>\n        typename std::enable_if<!Q::is_rw_mutex>::type release() {\n            my_mutex->my_iso_mutex.unlock();\n            my_mutex = nullptr;\n        }\n\n        template<typename Q = M>\n        typename std::enable_if<Q::is_rw_mutex>::type  release() {\n            if (m_is_writer)\n                my_mutex->my_iso_mutex.unlock();\n            else\n                my_mutex->my_iso_mutex.unlock_shared();\n            my_mutex = nullptr;\n        }\n\n        // Methods for reader-writer mutex\n        // These methods can be instantiated only if M supports lock_shared() and try_lock_shared().\n\n        void acquire(mutex_type& m, bool is_writer) {\n            m_is_writer = is_writer;\n            if (is_writer) m.my_iso_mutex.lock();\n            else m.my_iso_mutex.lock_shared();\n            my_mutex = &m;\n        }\n        bool try_acquire(mutex_type& m, bool is_writer) {\n            m_is_writer = is_writer;\n            if (is_writer ? m.my_iso_mutex.try_lock() : m.my_iso_mutex.try_lock_shared()) {\n                my_mutex = &m;\n                return true;\n            } else {\n                return false;\n            }\n        }\n        bool upgrade_to_writer() {\n            if (m_is_writer)\n                return true;\n            m_is_writer = true;\n            my_mutex->my_iso_mutex.unlock_shared();\n            my_mutex->my_iso_mutex.lock();\n            return false;\n        }\n        bool downgrade_to_reader() {\n            if (!m_is_writer)\n                return true;\n            m_is_writer = false;\n            my_mutex->my_iso_mutex.unlock();\n            my_mutex->my_iso_mutex.lock_shared();\n            return false;\n        }\n        ~scoped_lock() {\n            if (my_mutex)\n                release();\n        }\n    };\n\n    static constexpr bool is_recursive_mutex = M::is_recursive_mutex;\n    static constexpr bool is_rw_mutex = M::is_rw_mutex;\n};\n\ntemplate<typename C>\nstruct NullRecursive: utils::NoAssign {\n    void recurse_till(std::size_t i, std::size_t till) const {\n        if(i == till) {\n            counter.value = counter.value + 1;\n            return;\n        }\n        if(i & 1) {\n            typename C::mutex_type::scoped_lock lock2(counter.mutex);\n            recurse_till(i + 1, till);\n            lock2.release();\n        } else {\n            typename C::mutex_type::scoped_lock lock2;\n            lock2.acquire(counter.mutex);\n            recurse_till(i + 1, till);\n        }\n    }\n\n    void operator()(oneapi::tbb::blocked_range<std::size_t>& range) const {\n        typename C::mutex_type::scoped_lock lock(counter.mutex);\n        recurse_till(range.begin(), range.end());\n    }\n    NullRecursive(C& counter_) : counter(counter_) {\n        REQUIRE_MESSAGE(is_recursive_mutex, \"Null mutex should be a recursive mutex.\");\n    }\n    C& counter;\n    bool is_recursive_mutex = C::mutex_type::is_recursive_mutex;\n};\n\ntemplate<typename M>\nstruct NullUpgradeDowngrade: utils::NoAssign {\n    void operator()(oneapi::tbb::blocked_range<std::size_t>& range) const {\n        typename M::scoped_lock lock2;\n        for(std::size_t i = range.begin(); i != range.end(); ++i) {\n            if(i & 1) {\n                typename M::scoped_lock lock1(my_mutex, true);\n                if(lock1.downgrade_to_reader() == false) {\n                    REQUIRE_MESSAGE(false, \"ERROR for \" << mutex_name << \": downgrade should always succeed\");\n                }\n            } else {\n                lock2.acquire(my_mutex, false);\n                if(lock2.upgrade_to_writer() == false) {\n                    REQUIRE_MESSAGE(false, \"ERROR for \" << mutex_name << \": upgrade should always succeed\");\n                }\n                lock2.release();\n            }\n        }\n    }\n\n    NullUpgradeDowngrade(M& m_, const char* n_) : my_mutex(m_), mutex_name(n_) {}\n    M& my_mutex;\n    const char* mutex_name;\n};\n\ntemplate<typename M>\nvoid TestNullMutex(const char* mutex_name) {\n    INFO(mutex_name);\n    utils::AtomicCounter<M> counter;\n    counter.value = 0;\n    const std::size_t n = 100;\n    oneapi::tbb::parallel_for(oneapi::tbb::blocked_range<std::size_t>(0, n, 10), NullRecursive<utils::AtomicCounter<M>>(counter));\n    M m;\n    m.lock();\n    REQUIRE(m.try_lock());\n    m.unlock();\n}\n\ntemplate<typename M>\nvoid TestNullRWMutex(const char* mutex_name) {\n    const std::size_t n = 100;\n    M m;\n    oneapi::tbb::parallel_for(oneapi::tbb::blocked_range<std::size_t>(0, n, 10), NullUpgradeDowngrade<M>(m, mutex_name));\n    m.lock();\n    REQUIRE(m.try_lock());\n    m.lock_shared();\n    REQUIRE(m.try_lock_shared());\n    m.unlock_shared();\n    m.unlock();\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_overwrite_node.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#define CONFORMANCE_BUFFERING_NODES\n#define CONFORMANCE_OVERWRITE_NODE\n\n#include \"conformance_flowgraph.h\"\n\n//! \\file conformance_overwrite_node.cpp\n//! \\brief Test for [flow_graph.overwrite_node] specification\n\n//! Test overwrite_node behavior\n//! \\brief \\ref requirement\nTEST_CASE(\"overwrite_node messages\"){\n    oneapi::tbb::flow::graph g;\n\n    oneapi::tbb::flow::overwrite_node<int> testing_node(g);\n\n    int tmp = -1;\n    testing_node.try_put(1);\n    g.wait_for_all();\n\n    CHECK_MESSAGE((testing_node.try_get(tmp) == true), \"Descendant needs to receive a message\");\n    CHECK_MESSAGE((tmp == 1), \"Descendant needs to receive a correct value\");\n\n    testing_node.try_put(2);\n    g.wait_for_all();\n\n    CHECK_MESSAGE((testing_node.try_get(tmp) == true), \"Descendant needs to receive a message\");\n    CHECK_MESSAGE((tmp == 2), \"Descendant needs to receive a correct value\");\n}\n\n//! Test function_node broadcast\n//! \\brief \\ref requirement\nTEST_CASE(\"overwrite_node broadcast\"){\n    conformance::test_forwarding<oneapi::tbb::flow::overwrite_node<int>, int>(1);\n}\n\n//! Test function_node buffering\n//! \\brief \\ref requirement\nTEST_CASE(\"overwrite_node buffering\"){\n    conformance::test_buffering<oneapi::tbb::flow::overwrite_node<int>, int>();\n}\n\n//! The node that is constructed has a reference to the same graph object as src,with an invalid internal buffer item. \n//! The buffered value and list of successors are not copied from src.\n//! \\brief \\ref requirement\nTEST_CASE(\"overwrite_node copy constructor\"){\n    conformance::test_copy_ctor_for_buffering_nodes<oneapi::tbb::flow::overwrite_node<int>>();\n}\n\n//! Test inheritance relations\n//! \\brief \\ref interface\nTEST_CASE(\"overwrite_node superclasses\"){\n    conformance::test_inheritance<oneapi::tbb::flow::overwrite_node<int>, int, int>();\n    conformance::test_inheritance<oneapi::tbb::flow::overwrite_node<void*>, void*, void*>();\n}\n\n//! Test overwrite_node node constructor\n//! \\brief \\ref requirement\nTEST_CASE(\"overwrite_node constructor\"){\n    oneapi::tbb::flow::graph g;\n    oneapi::tbb::flow::overwrite_node<int> testing_node(g);\n\n    int tmp = -1;\n    CHECK_MESSAGE((!testing_node.is_valid()), \"Constructed node has invalid internal buffer item\");\n    CHECK_MESSAGE((!testing_node.try_get(tmp)), \"Gets from the node are non-destructive, but the first `try_get' fails\");\n}\n\n//! Test overwrite_node node `is_valid()` and `clear()`\n//! \\brief \\ref requirement\nTEST_CASE(\"overwrite_node methods\"){\n    oneapi::tbb::flow::graph g;\n    oneapi::tbb::flow::overwrite_node<int> testing_node(g);\n\n    CHECK_MESSAGE((!testing_node.is_valid()), \"Constructed node has invalid internal buffer item\");\n    \n    testing_node.try_put(1);\n    \n    CHECK_MESSAGE((testing_node.is_valid()), \"Buffer must be valid after try_put call\");\n\n    testing_node.clear();\n\n    CHECK_MESSAGE((!testing_node.is_valid()), \"call `clear` invalidates the value held in the buffer.\");\n}\n\n//! The following test shows the possibility to connect the node to a reserving join_node,\n//! avoiding direct calls to the try_get() method from the body of the successor node\n//! \\brief \\ref requirement\nTEST_CASE(\"overwrite_node with reserving join_node as successor\"){\n    conformance::test_with_reserving_join_node_class<oneapi::tbb::flow::overwrite_node<int>>();\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_parallel_for.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#define DOCTEST_CONFIG_SUPER_FAST_ASSERTS\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_report.h\"\n#include \"common/test_invoke.h\"\n\n#include \"oneapi/tbb/parallel_for.h\"\n#include \"oneapi/tbb/tick_count.h\"\n\n#include \"../tbb/test_partitioner.h\"\n\n#include <atomic>\n\n//! \\file conformance_parallel_for.cpp\n//! \\brief Test for [algorithms.parallel_for algorithms.auto_partitioner algorithms.simple_partitioner algorithms.static_partitioner algorithms.affinity_partitioner] specification\n\nstatic const int N = 500;\nstatic std::atomic<int> Array[N];\n\nstruct parallel_tag {};\nstruct empty_partitioner_tag {};\n\n// Testing parallel_for with step support\nconst std::size_t PFOR_BUFFER_TEST_SIZE = 1024;\n// test_buffer has some extra items beyond its right bound\nconst std::size_t PFOR_BUFFER_ACTUAL_SIZE = PFOR_BUFFER_TEST_SIZE + 1024;\nsize_t pfor_buffer[PFOR_BUFFER_ACTUAL_SIZE];\n\ntemplate<typename T>\nclass TestFunctor{\npublic:\n    void operator ()(T index) const {\n        pfor_buffer[index]++;\n    }\n};\n\nstatic std::atomic<int> FooBodyCount;\n\n// A range object whose only public members are those required by the Range concept.\ntemplate<size_t Pad>\nclass FooRange {\n    // Start of range\n    int start;\n\n    // Size of range\n    int size;\n    FooRange( int start_, int size_ ) : start(start_), size(size_) {\n        utils::zero_fill<char>(pad, Pad);\n        pad[Pad-1] = 'x';\n    }\n    template<typename Flavor_, std::size_t Pad_> friend void Flog( );\n    template<size_t Pad_> friend class FooBody;\n    void operator&();\n\n    char pad[Pad];\npublic:\n    bool empty() const {return size==0;}\n    bool is_divisible() const {return size>1;}\n    FooRange( FooRange& original, oneapi::tbb::split ) : size(original.size/2) {\n        original.size -= size;\n        start = original.start+original.size;\n        CHECK_FAST( original.pad[Pad-1]=='x');\n        pad[Pad-1] = 'x';\n    }\n};\n\n// A range object whose only public members are those required by the parallel_for.h body concept.\ntemplate<size_t Pad>\nclass FooBody {\npublic:\n    ~FooBody() {\n        --FooBodyCount;\n        for( std::size_t i=0; i<sizeof(*this); ++i )\n            reinterpret_cast<char*>(this)[i] = -1;\n    }\n    // Copy constructor\n    FooBody( const FooBody& other ) : array(other.array), state(other.state) {\n        ++FooBodyCount;\n        CHECK_FAST(state == LIVE);\n    }\n    void operator()( FooRange<Pad>& r ) const {\n        for (int k = r.start; k < r.start + r.size; ++k) {\n            CHECK_FAST(array[k].load(std::memory_order_relaxed) == 0);\n            array[k].store(1, std::memory_order_relaxed);\n        }\n    }\nprivate:\n    const int LIVE = 0x1234;\n    std::atomic<int>* array;\n    int state;\n    friend class FooRange<Pad>;\n    template<typename Flavor_, std::size_t Pad_> friend void Flog( );\n    FooBody( std::atomic<int>* array_ ) : array(array_), state(LIVE) {}\n};\n\ntemplate <typename Flavor, typename Partitioner, typename Range, typename Body>\nstruct Invoker;\n\ntemplate <typename Range, typename Body>\nstruct Invoker<parallel_tag, empty_partitioner_tag, Range, Body> {\n    void operator()( const Range& r, const Body& body, empty_partitioner_tag& ) {\n        oneapi::tbb::parallel_for( r, body );\n    }\n};\n\ntemplate <typename Partitioner, typename Range, typename Body>\nstruct Invoker<parallel_tag, Partitioner, Range, Body> {\n    void operator()( const Range& r, const Body& body, Partitioner& p ) {\n        oneapi::tbb::parallel_for( r, body, p );\n    }\n};\n\ntemplate <typename Flavor, typename Partitioner, typename T, typename Body>\nstruct InvokerStep;\n\ntemplate <typename T, typename Body>\nstruct InvokerStep<parallel_tag, empty_partitioner_tag, T, Body> {\n    void operator()( const T& first, const T& last, const Body& f, empty_partitioner_tag& ) {\n        oneapi::tbb::parallel_for( first, last, f );\n    }\n    void operator()( const T& first, const T& last, const T& step, const Body& f, empty_partitioner_tag& ) {\n        oneapi::tbb::parallel_for( first, last, step, f );\n    }\n};\n\ntemplate <typename Partitioner, typename T, typename Body>\nstruct InvokerStep<parallel_tag, Partitioner, T, Body> {\n    void operator()( const T& first, const T& last, const Body& f, Partitioner& p ) {\n        oneapi::tbb::parallel_for( first, last, f, p );\n    }\n    void operator()( const T& first, const T& last, const T& step, const Body& f, Partitioner& p ) {\n        oneapi::tbb::parallel_for( first, last, step, f, p );\n    }\n};\n\ntemplate<typename Flavor, std::size_t Pad>\nvoid Flog() {\n    for ( int i=0; i<N; ++i ) {\n        for ( int mode = 0; mode < 4; ++mode) {\n            FooRange<Pad> r( 0, i );\n            const FooRange<Pad> rc = r;\n            FooBody<Pad> f( Array );\n            const FooBody<Pad> fc = f;\n            for (int a_i = 0; a_i < N; a_i++) {\n                Array[a_i].store(0, std::memory_order_relaxed);\n            }\n            FooBodyCount = 1;\n            switch (mode) {\n            case 0: {\n                empty_partitioner_tag p;\n                Invoker< Flavor, empty_partitioner_tag, FooRange<Pad>, FooBody<Pad> > invoke_for;\n                invoke_for( rc, fc, p );\n            }\n                break;\n            case 1: {\n                Invoker< Flavor, const oneapi::tbb::simple_partitioner, FooRange<Pad>, FooBody<Pad> > invoke_for;\n                invoke_for( rc, fc, oneapi::tbb::simple_partitioner() );\n            }\n                break;\n            case 2: {\n                Invoker< Flavor, const oneapi::tbb::auto_partitioner, FooRange<Pad>, FooBody<Pad> > invoke_for;\n                invoke_for( rc, fc, oneapi::tbb::auto_partitioner() );\n            }\n                break;\n            case 3: {\n                static oneapi::tbb::affinity_partitioner affinity;\n                Invoker< Flavor, oneapi::tbb::affinity_partitioner, FooRange<Pad>, FooBody<Pad> > invoke_for;\n                invoke_for( rc, fc, affinity );\n            }\n                break;\n            }\n            CHECK(std::find_if_not(Array, Array + i, [](const std::atomic<int>& v) { return v.load(std::memory_order_relaxed) == 1; }) == Array + i);\n            CHECK(std::find_if_not(Array + i, Array + N, [](const std::atomic<int>& v) { return v.load(std::memory_order_relaxed) == 0; }) == Array + N);\n            CHECK(FooBodyCount == 1);\n        }\n    }\n}\n\n#include <stdexcept> // std::invalid_argument\n\ntemplate <typename Flavor, typename T, typename Partitioner>\nvoid TestParallelForWithStepSupportHelper(Partitioner& p) {\n    const T pfor_buffer_test_size = static_cast<T>(PFOR_BUFFER_TEST_SIZE);\n    const T pfor_buffer_actual_size = static_cast<T>(PFOR_BUFFER_ACTUAL_SIZE);\n    // Testing parallel_for with different step values\n    InvokerStep< Flavor, Partitioner, T, TestFunctor<T> > invoke_for;\n    for (T begin = 0; begin < pfor_buffer_test_size - 1; begin += pfor_buffer_test_size / 10 + 1) {\n        T step;\n        for (step = 1; step < pfor_buffer_test_size; step++) {\n            std::memset(pfor_buffer, 0, pfor_buffer_actual_size * sizeof(std::size_t));\n            if (step == 1){\n                invoke_for(begin, pfor_buffer_test_size, TestFunctor<T>(), p);\n            } else {\n                invoke_for(begin, pfor_buffer_test_size, step, TestFunctor<T>(), p);\n            }\n            // Verifying that parallel_for processed all items it should\n            for (T i = begin; i < pfor_buffer_test_size; i = i + step) {\n                if (pfor_buffer[i] != 1) {\n                    CHECK_MESSAGE(false, \"parallel_for didn't process all required elements\");\n                }\n                pfor_buffer[i] = 0;\n            }\n            // Verifying that no extra items were processed and right bound of array wasn't crossed\n            for (T i = 0; i < pfor_buffer_actual_size; i++) {\n                if (pfor_buffer[i] != 0) {\n                    CHECK_MESSAGE(false, \"parallel_for processed an extra element\");\n                }\n            }\n        }\n    }\n}\n\ntemplate <typename Flavor, typename T>\nvoid TestParallelForWithStepSupport() {\n    static oneapi::tbb::affinity_partitioner affinity_p;\n    oneapi::tbb::auto_partitioner auto_p;\n    oneapi::tbb::simple_partitioner simple_p;\n    oneapi::tbb::static_partitioner static_p;\n    empty_partitioner_tag p;\n\n    // Try out all partitioner combinations\n    TestParallelForWithStepSupportHelper< Flavor,T,empty_partitioner_tag >(p);\n    TestParallelForWithStepSupportHelper< Flavor,T,const oneapi::tbb::auto_partitioner >(auto_p);\n    TestParallelForWithStepSupportHelper< Flavor,T,const oneapi::tbb::simple_partitioner >(simple_p);\n    TestParallelForWithStepSupportHelper< Flavor,T,oneapi::tbb::affinity_partitioner >(affinity_p);\n    TestParallelForWithStepSupportHelper< Flavor,T,oneapi::tbb::static_partitioner >(static_p);\n\n    // Testing some corner cases\n    oneapi::tbb::parallel_for(static_cast<T>(2), static_cast<T>(1), static_cast<T>(1), TestFunctor<T>());\n}\n\n#if __TBB_CPP17_INVOKE_PRESENT\nclass SmartIndex {\npublic:\n    SmartIndex(std::size_t ri) : real_index(ri), change_vector(nullptr) {}\n    SmartIndex(std::size_t ri, std::vector<std::size_t>& cv)\n        : real_index(ri), change_vector(&cv) {}\n    SmartIndex(const SmartIndex& other) : real_index(other.real_index),\n                                          change_vector(other.change_vector) {}\n    ~SmartIndex() = default;\n\n    SmartIndex& operator=(const SmartIndex& other) {\n        real_index = other.real_index;\n        change_vector = other.change_vector;\n        return *this;\n    }\n\n    bool operator<(const SmartIndex& other) const {\n        return real_index < other.real_index;\n    }\n\n    bool operator<=(const SmartIndex& other) const {\n        return real_index <= other.real_index;\n    }\n\n    SmartIndex operator/(const SmartIndex& other) const {\n        return {real_index / other.real_index, *change_vector};\n    }\n\n    SmartIndex operator*(const SmartIndex& other) const {\n        return {real_index * other.real_index, *change_vector};\n    }\n\n    SmartIndex operator+(const SmartIndex& other) const {\n        return {real_index + other.real_index, *change_vector};\n    }\n\n    SmartIndex& operator+=(const SmartIndex& other) {\n        real_index += other.real_index;\n        return *this;\n    }\n\n    SmartIndex& operator++() { ++real_index; return *this; }\n\n    std::size_t operator-(const SmartIndex& other) const {\n        return real_index - other.real_index;\n    }\n\n    SmartIndex operator+(std::size_t k) {\n        return {real_index + k, *change_vector};\n    }\n\n    void increase() const {\n        CHECK(change_vector);\n        ++(*change_vector)[real_index];\n    }\nprivate:\n    std::size_t real_index;\n    std::vector<std::size_t>* change_vector;\n};\n\nvoid test_pfor_body_invoke() {\n    const std::size_t number_of_overloads = 5;\n    const std::size_t iterations = 100000;\n\n    using range_type = test_invoke::SmartRange<std::size_t>;\n    std::vector<std::size_t> change_vector(iterations, 0);\n    range_type range{0, iterations, change_vector};\n\n    oneapi::tbb::parallel_for(range, &range_type::increase);\n    oneapi::tbb::parallel_for(range, &range_type::increase, oneapi::tbb::simple_partitioner());\n    oneapi::tbb::parallel_for(range, &range_type::increase, oneapi::tbb::auto_partitioner());\n    oneapi::tbb::parallel_for(range, &range_type::increase, oneapi::tbb::static_partitioner());\n    oneapi::tbb::affinity_partitioner aff;\n    oneapi::tbb::parallel_for(range, &range_type::increase, aff);\n\n    for (std::size_t item : change_vector) {\n        CHECK(item == number_of_overloads);\n    }\n}\n\n\nvoid test_pfor_func_invoke() {\n    const std::size_t number_of_overloads = 5;\n    const std::size_t iterations = 100000;\n\n    std::vector<std::size_t> change_vector(iterations, 0);\n    SmartIndex first{0, change_vector};\n    SmartIndex last{iterations, change_vector};\n    SmartIndex stride{2};\n\n    oneapi::tbb::parallel_for(first, last, &SmartIndex::increase);\n    oneapi::tbb::parallel_for(first, last, &SmartIndex::increase, oneapi::tbb::simple_partitioner());\n    oneapi::tbb::parallel_for(first, last, &SmartIndex::increase, oneapi::tbb::auto_partitioner());\n    oneapi::tbb::parallel_for(first, last, &SmartIndex::increase, oneapi::tbb::static_partitioner());\n    oneapi::tbb::affinity_partitioner aff;\n    oneapi::tbb::parallel_for(first, last, &SmartIndex::increase, aff);\n\n    for (std::size_t& item : change_vector) {\n        CHECK(item == number_of_overloads);\n        item = 0;\n    }\n\n    oneapi::tbb::parallel_for(first, last, stride, &SmartIndex::increase);\n    oneapi::tbb::parallel_for(first, last, stride, &SmartIndex::increase, oneapi::tbb::simple_partitioner());\n    oneapi::tbb::parallel_for(first, last, stride, &SmartIndex::increase, oneapi::tbb::auto_partitioner());\n    oneapi::tbb::parallel_for(first, last, stride, &SmartIndex::increase, oneapi::tbb::static_partitioner());\n    oneapi::tbb::parallel_for(first, last, stride, &SmartIndex::increase, aff);\n\n    CHECK(change_vector[0] == number_of_overloads);\n    for (std::size_t i = 1; i < iterations; ++i) {\n        std::size_t expected = change_vector[i - 1] == 0 ? number_of_overloads : 0;\n        CHECK(change_vector[i] == expected);\n    }\n}\n#endif // __TBB_CPP17_INVOKE_PRESENT\n\n//! Test simple parallel_for with different partitioners\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Basic parallel_for\") {\n    std::atomic<unsigned long> counter{};\n    const std::size_t number_of_partitioners = 5;\n    const std::size_t iterations = 100000;\n\n    oneapi::tbb::parallel_for(std::size_t(0), iterations, [&](std::size_t) {\n        counter++;\n    });\n\n    oneapi::tbb::parallel_for(std::size_t(0), iterations, [&](std::size_t) {\n        counter++;\n    }, oneapi::tbb::simple_partitioner());\n\n    oneapi::tbb::parallel_for(std::size_t(0), iterations, [&](std::size_t) {\n        counter++;\n    }, oneapi::tbb::auto_partitioner());\n\n    oneapi::tbb::parallel_for(std::size_t(0), iterations, [&](std::size_t) {\n        counter++;\n    }, oneapi::tbb::static_partitioner());\n\n    oneapi::tbb::affinity_partitioner aff;\n    oneapi::tbb::parallel_for(std::size_t(0), iterations, [&](std::size_t) {\n        counter++;\n    }, aff);\n\n    CHECK_EQ(counter.load(std::memory_order_relaxed), iterations * number_of_partitioners);\n}\n\n//! Testing parallel for with different partitioners and ranges ranges\n//! \\brief \\ref interface \\ref requirement \\ref stress\nTEST_CASE(\"Flog test\") {\n    Flog<parallel_tag, 1>();\n    Flog<parallel_tag, 10>();\n    Flog<parallel_tag, 100>();\n    Flog<parallel_tag, 1000>();\n#if !EMSCRIPTEN    \n    Flog<parallel_tag, 10000>();\n#endif\n}\n\n//! Testing parallel for with different types and step\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE_TEMPLATE(\"parallel_for with step support\", T, short, unsigned short, int, unsigned int,\n                                    long, unsigned long, long long, unsigned long long, std::size_t) {\n    // Testing with different integer types\n    TestParallelForWithStepSupport<parallel_tag, T>();\n}\n\n//! Testing with different types of ranges and partitioners\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Testing parallel_for with partitioners\") {\n    using namespace test_partitioner_utils::interaction_with_range_and_partitioner;\n\n    test_partitioner_utils::SimpleBody b;\n    oneapi::tbb::affinity_partitioner ap;\n\n    parallel_for(Range1(true, false), b, ap);\n    parallel_for(Range6(false, true), b, ap);\n\n    parallel_for(Range1(false, true), b, oneapi::tbb::simple_partitioner());\n    parallel_for(Range6(false, true), b, oneapi::tbb::simple_partitioner());\n\n    parallel_for(Range1(false, true), b, oneapi::tbb::auto_partitioner());\n    parallel_for(Range6(false, true), b, oneapi::tbb::auto_partitioner());\n\n    parallel_for(Range1(true, false), b, oneapi::tbb::static_partitioner());\n    parallel_for(Range6(false, true), b, oneapi::tbb::static_partitioner());\n}\n\n#if __TBB_CPP17_INVOKE_PRESENT\n//! Test that parallel_for uses std::invoke to run body and function\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"parallel_for and std::invoke\") {\n    test_pfor_body_invoke();\n    test_pfor_func_invoke();\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_parallel_for_each.cpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/parallel_for_each_common.h\"\n\n//! \\file conformance_parallel_for_each.cpp\n//! \\brief Test for [algorithms.parallel_for_each] specification\n\n//! Test input access iterator support\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Input iterator support\") {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        oneapi::tbb::global_control control(oneapi::tbb::global_control::max_allowed_parallelism, concurrency_level);\n\n        for( size_t depth = 0; depth <= depths_nubmer; ++depth ) {\n            g_tasks_expected = 0;\n            for ( size_t i=0; i < depth; ++i )\n                g_tasks_expected += FindNumOfTasks(g_depths[i].value());\n            TestIterator_Const<utils::InputIterator<value_t>>(depth);\n            TestIterator_Move<utils::InputIterator<value_t>>(depth);\n#if __TBB_CPP14_GENERIC_LAMBDAS_PRESENT\n            TestGenericLambdasCommon<utils::InputIterator<value_t>>(depth);\n#endif\n        }\n    }\n}\n\n//! Test container based overload\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Container based overload - input iterator based container\") {\n    container_based_overload_test_case<utils::InputIterator, incremental_functor_const>(/*expected_value*/0);\n}\n\nconst size_t elements = 10000;\nconst size_t init_sum = 0;\nstd::atomic<size_t> element_counter;\n\ntemplate<size_t K>\nstruct set_to {\n    void operator()(size_t& x) const {\n        x = K;\n        ++element_counter;\n    }\n};\n\n#include \"common/range_based_for_support.h\"\n#include <functional>\n#include <deque>\n\ntemplate<typename... Context>\nvoid WorkProducingTest(Context&... context) {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        oneapi::tbb::global_control control(oneapi::tbb::global_control::max_allowed_parallelism, concurrency_level);\n\n        using namespace range_based_for_support_tests;\n        std::deque<size_t> v(elements, 0);\n\n        element_counter = 0;\n        oneapi::tbb::parallel_for_each(v.begin(), v.end(), set_to<0>(), context...);\n        REQUIRE_MESSAGE((element_counter == v.size() && element_counter == elements),\n            \"not all elements were set\");\n        REQUIRE_MESSAGE(range_based_for_accumulate(v, std::plus<size_t>(), init_sum) == init_sum,\n            \"elements of v not all ones\");\n\n        element_counter = 0;\n        oneapi::tbb::parallel_for_each(v, set_to<1>(), context...);\n        REQUIRE_MESSAGE((element_counter == v.size() && element_counter == elements),\n            \"not all elements were set\");\n        REQUIRE_MESSAGE(range_based_for_accumulate(v, std::plus<size_t>(), init_sum) == v.size(),\n            \"elements of v not all ones\");\n\n        element_counter = 0;\n        oneapi::tbb::parallel_for_each(oneapi::tbb::blocked_range<std::deque<size_t>::iterator>(v.begin(), v.end()), set_to<0>(), context...);\n        REQUIRE_MESSAGE((element_counter == v.size() && element_counter == elements),\n            \"not all elements were set\");\n        REQUIRE_MESSAGE(range_based_for_accumulate(v, std::plus<size_t>(), init_sum) == init_sum,\n            \"elements of v not all zeros\");\n    }\n}\n\n#if __TBB_CPP17_INVOKE_PRESENT\n\nclass ForEachInvokeItem {\npublic:\n    ForEachInvokeItem(std::size_t rv, std::vector<std::size_t>& cv) : real_value(rv), change_vector(cv) {}\n\n    void do_action() const { ++change_vector[real_value]; }\n\n    void do_action_and_feed(oneapi::tbb::feeder<ForEachInvokeItem>& feeder) const {\n        CHECK_MESSAGE(change_vector.size() % 2 == 0, \"incorrect test setup\");\n        std::size_t shift = change_vector.size() / 2;\n        ++change_vector[real_value];\n        if (real_value < shift) {\n            feeder.add(ForEachInvokeItem(real_value + shift, change_vector));\n        }\n    }\nprivate:\n    std::size_t real_value;\n    std::vector<std::size_t>& change_vector;\n};\n\ntemplate <template <class T> typename IteratorType>\nvoid test_pfor_each_invoke_basic() {\n    const std::size_t items_count = 10;\n    std::vector<ForEachInvokeItem> items_to_proceed;\n    std::vector<std::size_t> change_vector(2 * items_count, 0);\n\n    for (std::size_t i = 0; i < items_count; ++i) {\n        items_to_proceed.emplace_back(i, change_vector);\n    }\n\n    using iterator_type = IteratorType<ForEachInvokeItem>;\n\n    // Test without feeder\n    oneapi::tbb::parallel_for_each(iterator_type(items_to_proceed.data()),\n                                   iterator_type(items_to_proceed.data() + items_count),\n                                   &ForEachInvokeItem::do_action);\n\n    for (std::size_t i = 0; i < items_count; ++i) {\n        CHECK(change_vector[i] == 1);\n        CHECK(change_vector[i + items_count] == 0);\n        change_vector[i] = 0; // reset\n    }\n\n    // Test with feeder\n    oneapi::tbb::parallel_for_each(iterator_type(items_to_proceed.data()),\n                                   iterator_type(items_to_proceed.data() + items_count),\n                                   &ForEachInvokeItem::do_action_and_feed);\n\n    for (auto item : change_vector) {\n        CHECK(item == 1);\n    }\n}\n\n#endif\n\n//! Test that all elements were produced\n//! \\brief \\ref requirement \\ref stress\nTEST_CASE(\"Test that all elements in range were produced through body (without task_group_context)\") {\n    WorkProducingTest();\n}\n\n//! Test that all elements were produced (with task_group_context)\n//! \\brief \\ref requirement \\ref interface \\ref stress\nTEST_CASE(\"Test that all elements in range were produced through body (with task_group_context)\") {\n    oneapi::tbb::task_group_context context;\n    WorkProducingTest(context);\n}\n\n//! Move iterator test for class that supports both move and copy semantics\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Move Semantics Test | Item: MovePreferable\") {\n    DoTestMoveSemantics<TestMoveSem::MovePreferable>();\n}\n\n//!  Move semantic test for move only class\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Move Semantics | Item: MoveOnly\") {\n    //  parallel_for_each uses is_copy_constructible to support non-copyable types\n    DoTestMoveSemantics<TestMoveSem::MoveOnly>();\n}\n\n#if __TBB_CPP17_INVOKE_PRESENT\n//! Test that parallel_for_each uses std::invoke to run the body\n//! \\brief \\ref requirement\nTEST_CASE(\"parallel_for_each and std::invoke\") {\n    test_pfor_each_invoke_basic<utils::InputIterator>();\n    test_pfor_each_invoke_basic<utils::ForwardIterator>();\n    test_pfor_each_invoke_basic<utils::RandomIterator>();\n}\n\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_parallel_invoke.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/cpu_usertime.h\"\n#include \"common/utils_concurrency_limit.h\"\n#include \"common/parallel_invoke_common.h\"\n#include \"common/memory_usage.h\"\n\n#include <cstddef>\n#include <cstdint>\n#include <atomic>\n\n//! \\file conformance_parallel_invoke.cpp\n//! \\brief Test for [algorithms.parallel_invoke] specification\n\ntemplate<std::size_t TaskCount>\nstruct correctness_test_case {\n    static std::atomic<std::size_t> data_array[TaskCount];\n\n    // invocation functor\n    template<std::size_t Position>\n    struct functor {\n\n        functor() = default;\n        functor(const functor&) = delete;\n        functor& operator=(const functor&) = delete;\n\n        void operator()() const {\n            REQUIRE_MESSAGE(Position < TaskCount, \"Wrong structure configuration.\");\n            data_array[Position]++;\n        }\n    };\n\n    static void run_validate_and_reset(oneapi::tbb::task_group_context* context_ptr) {\n        for (auto& elem : data_array)\n            elem.store(0, std::memory_order_relaxed);\n\n        parallel_invoke_call<TaskCount, functor>::perform(context_ptr);\n        for (std::size_t i = 0; i < TaskCount; i++) {\n            REQUIRE_MESSAGE(data_array[i] == 1, \"Some task was executed more than once, or was not executed.\");\n            data_array[i] = 0;\n        }\n    }\n};\n\ntemplate<std::size_t TaskCount>\nstd::atomic<std::size_t> correctness_test_case<TaskCount>::data_array[TaskCount];\n\nvoid correctness_test(oneapi::tbb::task_group_context* context_ptr = nullptr) {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        oneapi::tbb::global_control control(oneapi::tbb::global_control::max_allowed_parallelism, concurrency_level);\n\n        correctness_test_case<2>::run_validate_and_reset(context_ptr);\n        correctness_test_case<3>::run_validate_and_reset(context_ptr);\n        correctness_test_case<4>::run_validate_and_reset(context_ptr);\n        correctness_test_case<5>::run_validate_and_reset(context_ptr);\n        correctness_test_case<6>::run_validate_and_reset(context_ptr);\n        correctness_test_case<7>::run_validate_and_reset(context_ptr);\n        correctness_test_case<8>::run_validate_and_reset(context_ptr);\n        correctness_test_case<9>::run_validate_and_reset(context_ptr);\n        correctness_test_case<10>::run_validate_and_reset(context_ptr);\n        // ...\n        correctness_test_case<50>::run_validate_and_reset(context_ptr);\n        correctness_test_case<51>::run_validate_and_reset(context_ptr);\n        correctness_test_case<52>::run_validate_and_reset(context_ptr);\n    }\n}\n\n//! Testing correctness with various functors count\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Test correctness\") {\n    correctness_test();\n}\n\n//! Testing correctness with various functors count using task_group_context\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Test correctness using context\") {\n    oneapi::tbb::task_group_context context;\n    correctness_test(&context);\n}\n\n// Exception handling support test\n#define UTILS_EXCEPTION_HANDLING_SIMPLE_MODE 1\n#include \"common/exception_handling.h\"\n\n#if TBB_USE_EXCEPTIONS\n\ntemplate<std::size_t TaskCount>\nstruct exception_handling_test_case {\n    // invocation functor\n    template<std::size_t Position>\n    struct functor {\n        functor() = default;\n        functor(const functor&) = delete;\n        functor& operator=(const functor&) = delete;\n\n        void operator()() const {\n            REQUIRE_MESSAGE(Position < TaskCount, \"Wrong structure configuration.\");\n            if (exception_mask & (1 << Position)) {\n                ThrowTestException();\n            }\n        }\n    };\n\n    static void run_validate_and_reset() {\n        // Checks all permutations of the exception handling mask for the current tasks count\n        for( exception_mask = 1; exception_mask < (std::size_t(1) << TaskCount); ++exception_mask ) {\n            ResetEhGlobals();\n            TRY();\n                parallel_invoke_call<TaskCount, functor>::perform();\n            CATCH();\n            ASSERT_EXCEPTION();\n        }\n    }\nprivate:\n    static std::uint64_t exception_mask; // each bit represents whether the function should throw exception or not\n};\n\ntemplate<std::size_t TaskCount>\nstd::uint64_t exception_handling_test_case<TaskCount>::exception_mask(0);\n\n//! Testing exception hangling\n//! \\brief \\ref requirement \\ref error_guessing\nTEST_CASE(\"Test exception hangling\") {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        if (concurrency_level < 2) continue;\n        oneapi::tbb::global_control control(oneapi::tbb::global_control::max_allowed_parallelism, concurrency_level);\n\n        exception_handling_test_case<2>::run_validate_and_reset();\n        exception_handling_test_case<3>::run_validate_and_reset();\n        exception_handling_test_case<4>::run_validate_and_reset();\n        exception_handling_test_case<5>::run_validate_and_reset();\n        exception_handling_test_case<6>::run_validate_and_reset();\n        exception_handling_test_case<7>::run_validate_and_reset();\n        exception_handling_test_case<8>::run_validate_and_reset();\n        exception_handling_test_case<9>::run_validate_and_reset();\n        exception_handling_test_case<10>::run_validate_and_reset();\n    }\n}\n#endif /* TBB_USE_EXCEPTIONS */\n\n// Cancellation support test\nvoid function_to_cancel() {\n    ++g_CurExecuted;\n    Cancellator::WaitUntilReady();\n}\n\n// The function is used to test cancellation\nvoid simple_test_nothrow (){\n    ++g_CurExecuted;\n}\n\nstd::size_t g_numFunctions, g_functionToCancel;\n\nstruct ParInvokeLauncher {\n    oneapi::tbb::task_group_context &my_ctx;\n\n    void operator()() const {\n        void(*func_array[10])(void);\n        for (int i = 0; i <=9; ++i)\n            func_array[i] = &simple_test_nothrow;\n        func_array[g_functionToCancel] = &function_to_cancel;\n\n        oneapi::tbb::parallel_invoke(func_array[0], func_array[1], func_array[2], func_array[3],\n            func_array[4], func_array[5], func_array[6], func_array[7], func_array[8], func_array[9], my_ctx);\n    }\n\n    ParInvokeLauncher ( oneapi::tbb::task_group_context& ctx ) : my_ctx(ctx) {}\n};\n\n//! Testing cancellation\n//! \\brief \\ref requirement \\ref error_guessing\nTEST_CASE(\"Test cancellation\") {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        if (concurrency_level < 2) continue;\n        oneapi::tbb::global_control control(oneapi::tbb::global_control::max_allowed_parallelism, concurrency_level);\n\n        for ( int n = 2; n <= 10; ++n ) {\n            for ( int m = 0; m <= n - 1; ++m ) {\n                g_numFunctions = n;\n                g_functionToCancel = m;\n                ResetEhGlobals();\n                RunCancellationTest<ParInvokeLauncher, Cancellator>();\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_parallel_pipeline.cpp",
    "content": "/*\n    Copyright (c) 2020-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/checktype.h\"\n#include \"common/spin_barrier.h\"\n#include \"common/utils_concurrency_limit.h\"\n#include \"common/test_invoke.h\"\n\n#include \"oneapi/tbb/parallel_pipeline.h\"\n#include \"oneapi/tbb/global_control.h\"\n#include \"oneapi/tbb/task_group.h\"\n\n#include <atomic>\n#include <thread>\n#include <string.h>\n#include <memory>\n#include <tuple>\n\n//! \\file conformance_parallel_pipeline.cpp\n//! \\brief Test for [algorithms.parallel_pipeline algorithms.parallel_pipeline.flow_control] specification\n\nconstexpr std::size_t n_tokens = 8;\n\nconstexpr int max_counter = 1024;\n\nstatic std::atomic<int> input_counter{ max_counter };\n\ntemplate<typename U>\nclass input_filter {\npublic:\n    U operator()( oneapi::tbb::flow_control& control ) const {\n        if( --input_counter < 0 ) {\n            control.stop();\n            input_counter = max_counter;\n        }\n        return U();\n    }\n};\n\ntemplate<typename T, typename U>\nclass middle_filter {\npublic:\n    U operator()(T) const {\n        U out{};\n        return out;\n    }\n};\n\ntemplate<typename T>\nclass output_filter {\npublic:\n    void operator()(T ) const {}\n};\n\nstatic const oneapi::tbb::filter_mode filter_table[] = { oneapi::tbb::filter_mode::parallel,\n                                                 oneapi::tbb::filter_mode::serial_in_order,\n                                                 oneapi::tbb::filter_mode::serial_out_of_order};\n\ntemplate<typename Body, typename... Cotnext>\nvoid TestSingleFilter(Body body, Cotnext&... context) {\n\n    for(int i =0; i <3; i++)\n    {\n        oneapi::tbb::filter_mode mode = filter_table[i];\n\n        oneapi::tbb::filter<void, void> one_filter( mode, body );\n        oneapi::tbb::parallel_pipeline( n_tokens, one_filter, context...   );\n\n        oneapi::tbb::parallel_pipeline( n_tokens, oneapi::tbb::filter<void, void>(mode, body), context... );\n\n        oneapi::tbb::parallel_pipeline( n_tokens, oneapi::tbb::make_filter<void, void>(mode, body), context...);\n    }\n}\n\nvoid TestSingleFilterFunctor() {\n\n    input_filter<void> i_filter;\n\n    TestSingleFilter(i_filter);\n\n    oneapi::tbb::task_group_context context;\n    TestSingleFilter(i_filter,  context);\n}\n\n\nvoid TestSingleFilterLambda() {\n\n\n    TestSingleFilter([]( oneapi::tbb::flow_control& control ) {\n                    if(input_counter-- == 0 ) {\n                        control.stop();\n                        input_counter = max_counter;\n                        }\n                    } );\n\n    oneapi::tbb::task_group_context context;\n    TestSingleFilter([]( oneapi::tbb::flow_control& control ) {\n                     if(input_counter-- == 0 ) {\n                        control.stop();\n                        input_counter = max_counter;\n                        }\n                    },  context);\n}\n\ntemplate<typename I, typename O>\nvoid RunPipeline(const oneapi::tbb::filter<I, O> &filter)\n{\n    bool flag{false};\n\n    auto f_beg = oneapi::tbb::make_filter<void, I>(oneapi::tbb::filter_mode::serial_out_of_order,\n                                        [&flag](oneapi::tbb::flow_control& fc) -> I{\n                                            if(flag) {\n                                                fc.stop();\n                                            }\n                                            flag = true;\n                                            return I();\n                                        });\n\n    auto f_end = oneapi::tbb::make_filter<O, void>(oneapi::tbb::filter_mode::serial_in_order,\n                                            [](O) {});\n\n    oneapi::tbb::parallel_pipeline(n_tokens, f_beg & filter & f_end);\n}\n\nvoid RunPipeline(const oneapi::tbb::filter<void, void> &filter)\n{\n    oneapi::tbb::parallel_pipeline(n_tokens, filter);\n}\n\ntemplate<typename Iterator1, typename Iterator2>\nvoid RootSequence( Iterator1 first, Iterator1 last, Iterator2 res) {\n    using ValueType = typename Iterator1::value_type;\n    oneapi::tbb::parallel_pipeline( n_tokens,\n        oneapi::tbb::make_filter<void,ValueType>(\n            oneapi::tbb::filter_mode::serial_in_order,\n            [&first, &last](oneapi::tbb::flow_control& fc)-> ValueType{\n                if( first<last ) {\n                    ValueType val  = *first;\n                    ++first;\n                    return val;\n                 } else {\n                    fc.stop();\n                    return ValueType{};\n                }\n            }\n        ) &\n        oneapi::tbb::make_filter<ValueType,ValueType>(\n            oneapi::tbb::filter_mode::parallel,\n            [](ValueType p){return p*p;}\n        ) &\n        oneapi::tbb::make_filter<ValueType,void>(\n            oneapi::tbb::filter_mode::serial_in_order,\n            [&res](ValueType x) {\n                *res = x;\n                ++res; }\n        )\n    );\n}\n\n//! Testing pipeline correctness\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Testing pipeline correctness\")\n{\n    std::vector<double> input(max_counter);\n    std::vector<double> output(max_counter);\n    for(std::size_t i = 0; i < max_counter; i++)\n        input[i] = (double)i;\n\n    RootSequence(input.cbegin(), input.cend(), output.begin());\n    for(int  i = 0; i < max_counter; i++) {\n        CHECK_MESSAGE(output[i] == input[i]*input[i], \"pipeline result is incorrect\");\n    }\n}\n\n//! Testing pipeline with single filter\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Testing pipeline with single filter\")\n{\n    TestSingleFilterFunctor();\n    TestSingleFilterLambda();\n}\n\n//! Testing single filter with different ways of creation\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE_TEMPLATE(\"Filter creation testing\", T, std::tuple<size_t, int>,\n                                                 std::tuple<int, double>,\n                                                 std::tuple<unsigned int*, size_t>,\n                                                 std::tuple<unsigned short, unsigned short*>,\n                                                 std::tuple<double*, unsigned short*>,\n                                                 std::tuple<std::unique_ptr<int>, std::unique_ptr<int> >)\n{\n    using I = typename std::tuple_element<0, T>::type;\n    using O = typename std::tuple_element<1, T>::type;\n    for(int i = 0; i < 3; i++)\n    {\n        oneapi::tbb::filter_mode mode = filter_table[i];\n        oneapi::tbb::filter<I, O> default_filter;\n\n        auto made_filter1 = oneapi::tbb::make_filter<I,O>(mode, [](I)->O{return O();});\n        static_assert(std::is_same<oneapi::tbb::filter<I, O>, decltype(made_filter1)>::value, \"make_filter wrong result type\");\n        RunPipeline(made_filter1);\n\n        auto made_filter2 = oneapi::tbb::make_filter(mode, [](I)->O{return O();});\n        static_assert(std::is_same<oneapi::tbb::filter<I, O>, decltype(made_filter2)>::value, \"make_filter wrong result type\");\n        RunPipeline(made_filter2);\n\n        oneapi::tbb::filter<I, O> one_filter(mode, [](I)->O{return O();});\n        RunPipeline(one_filter);\n\n        oneapi::tbb::filter<I, O> copy_filter(one_filter);\n        RunPipeline(one_filter);\n\n        default_filter = copy_filter;\n        RunPipeline(default_filter);\n        default_filter.clear();\n    }\n}\n\n//! Testing filters concatenation\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE_TEMPLATE(\"Testing filters concatenation\", T, std::tuple<size_t, int>,\n                                                       std::tuple<int, double>,\n                                                       std::tuple<unsigned int*, size_t>,\n                                                       std::tuple<unsigned short, unsigned short*>,\n                                                       std::tuple<double*, unsigned short*>,\n                                                       std::tuple<std::unique_ptr<int>, std::unique_ptr<int> >)\n{\n    using I = typename std::tuple_element<0, T>::type;\n    using O = typename std::tuple_element<1, T>::type;\n\n    for(int fi = 0; fi< 27; fi++)\n    {\n        int i = fi%3;\n        int j = (fi/3)%3;\n        int k = (fi/9);\n        auto filter_chain = oneapi::tbb::filter<void, I>(filter_table[i], input_filter<I>()) &\n                            oneapi::tbb::filter<I, O>(filter_table[j], middle_filter<I,O>()) &\n                            oneapi::tbb::filter<O, void>(filter_table[k], output_filter<O>());\n        RunPipeline(filter_chain);\n\n        oneapi::tbb::filter<void, I> filter1 = oneapi::tbb::filter<void, I>(filter_table[i], input_filter<I>());\n        oneapi::tbb::filter<I, O> filter2 = oneapi::tbb::filter<I, O>(filter_table[j], middle_filter<I,O>());\n        oneapi::tbb::filter<O, void> filter3 = oneapi::tbb::filter<O, void>(filter_table[k], output_filter<O>());\n\n        auto fitler12 = filter1 & filter2;\n        auto fitler23 = filter2 & filter3;\n        auto fitler123 = filter1 & filter2 & filter3;\n\n        RunPipeline(fitler12 & filter3);\n        RunPipeline(filter1 & fitler23);\n        RunPipeline(fitler123);\n    }\n}\n\nvoid doWork() {\n    for (int i = 0; i < 10; ++i)\n        utils::yield();\n}\n\n//! Testing filter modes\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Testing filter modes\")\n{\n    for ( auto concurrency_level : utils::concurrency_range() )\n    {\n        oneapi::tbb::global_control control(oneapi::tbb::global_control::max_allowed_parallelism, concurrency_level);\n\n        short serial_checker{0};\n        oneapi::tbb::filter<void,short> filter1(oneapi::tbb::filter_mode::serial_out_of_order,\n                                [&serial_checker](oneapi::tbb::flow_control&fc)\n                                {\n                                    auto check_value = ++serial_checker;\n                                    doWork();\n                                    CHECK_MESSAGE(check_value == serial_checker, \"a serial filter was executed concurrently\");\n                                    if(serial_checker>=(short)max_counter)\n                                    {\n                                        fc.stop();\n                                    }\n                                    return check_value;\n                                });\n\n        short serial_checker2{ 0 };\n        oneapi::tbb::filter<short, short> filter2(oneapi::tbb::filter_mode::serial_in_order,\n            [&serial_checker2](int)\n            {\n                auto check_value = ++serial_checker2;\n                doWork();\n                CHECK_MESSAGE(check_value == serial_checker2, \"a serial filter was executed concurrently\");\n                return check_value;\n            });\n\n        utils::SpinBarrier spin_barrier(utils::min(concurrency_level, n_tokens), true);\n        oneapi::tbb::filter<short,int> filter3(oneapi::tbb::filter_mode::parallel,\n                                [&spin_barrier](int value)\n                                {\n                                    spin_barrier.wait();\n                                    doWork();\n                                    return value;\n                                });\n\n\n        short order_checker{0};\n        oneapi::tbb::filter<int,void> filter4(oneapi::tbb::filter_mode::serial_in_order,\n                                [&order_checker](int value)\n                                {\n                                    CHECK_MESSAGE(++order_checker == value, \"the order of message was broken\");\n                                });\n\n        oneapi::tbb::parallel_pipeline(n_tokens, filter1 & filter2 & filter3 & filter4);\n    }\n}\n\n//! Testing max tocken number\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Testing max token number\")\n{\n    for(unsigned int i = 1; i < n_tokens; i++)\n    {\n        std::atomic<short> active_tokens{0};\n\n        oneapi::tbb::filter<void,int> filter1(oneapi::tbb::filter_mode::parallel,\n                                [&active_tokens](oneapi::tbb::flow_control&fc)\n                                {\n                                    ++active_tokens;\n                                    doWork();\n                                    CHECK_MESSAGE(active_tokens <= n_tokens, \"max number of tokens is exceed\");\n                                    --active_tokens;\n                                    if (--input_counter < 0) {\n                                        fc.stop();\n                                        input_counter = max_counter;\n                                    }\n                                    return 0;\n                                });\n\n        oneapi::tbb::filter<int,int> filter2(oneapi::tbb::filter_mode::parallel,\n                                [&active_tokens](int value)\n                                {\n                                    ++active_tokens;\n                                    doWork();\n                                    CHECK_MESSAGE(active_tokens <= n_tokens, \"max number of tockens is exceed\");\n                                    --active_tokens;\n                                    return value;\n                                });\n\n        oneapi::tbb::filter<int,void> filter3(oneapi::tbb::filter_mode::serial_out_of_order,\n                                [&active_tokens](int)\n                                {\n                                    ++active_tokens;\n                                    doWork();\n                                    CHECK_MESSAGE(active_tokens <= n_tokens, \"max number of tockens is exceed\");\n                                    --active_tokens;\n                                });\n\n        oneapi::tbb::parallel_pipeline(i, filter1 & filter2 & filter3);\n    }\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\ntemplate <typename... T> struct print;\n\n//! Testing deduction guides\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE_TEMPLATE(\"Deduction guides testing\", T, int, unsigned int, double)\n{\n    input_filter<T> i_filter;\n\n    oneapi::tbb::filter  fc1(oneapi::tbb::filter_mode::serial_in_order, i_filter);\n    static_assert(std::is_same_v<decltype(fc1), oneapi::tbb::filter<void, T>>);\n\n    oneapi::tbb::filter fc2 (fc1);\n    static_assert(std::is_same_v<decltype(fc2), oneapi::tbb::filter<void, T>>);\n\n    middle_filter<T, std::size_t> m_filter;\n    oneapi::tbb::filter  fc3(oneapi::tbb::filter_mode::serial_in_order, m_filter);\n    static_assert(std::is_same_v<decltype(fc3), oneapi::tbb::filter<T, std::size_t>>);\n\n    oneapi::tbb::filter frv(oneapi::tbb::filter_mode::serial_in_order, [](int&&) -> double { return 0.0; });\n    oneapi::tbb::filter fclv(oneapi::tbb::filter_mode::serial_in_order, [](const int&) -> double { return 0.0; });\n    oneapi::tbb::filter fc(oneapi::tbb::filter_mode::serial_in_order, [](const int) -> double { return 0.0; });\n\n    static_assert(std::is_same_v<decltype(frv), oneapi::tbb::filter<int, double>>);\n    static_assert(std::is_same_v<decltype(fclv), oneapi::tbb::filter<int, double>>);\n    static_assert(std::is_same_v<decltype(fc), oneapi::tbb::filter<int, double>>);\n}\n#endif  //__TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\n#if __TBB_CPP17_INVOKE_PRESENT\n\ntemplate <typename MiddleFilterBody, typename LastFilterBody>\nvoid test_pipeline_invoke_basic(const MiddleFilterBody& middle_body, const LastFilterBody& last_body) {\n    using output_filter_type = test_invoke::SmartID<std::size_t>;\n    using middle_filter_type = test_invoke::SmartID<output_filter_type>;\n\n    const std::size_t input_count = 10;\n    std::size_t signal_point = 0;\n    std::size_t counter = 0;\n\n    auto first_body = [&](oneapi::tbb::flow_control& fc) -> middle_filter_type {\n        if (++counter > input_count) {\n            fc.stop();\n        }\n        return middle_filter_type{output_filter_type{&signal_point}};\n    };\n\n    auto first_filter = oneapi::tbb::make_filter<void, middle_filter_type>(oneapi::tbb::filter_mode::serial_in_order, first_body);\n    auto middle_filter = oneapi::tbb::make_filter<middle_filter_type, output_filter_type>(oneapi::tbb::filter_mode::serial_in_order, middle_body);\n    auto last_filter = oneapi::tbb::make_filter<output_filter_type, void>(oneapi::tbb::filter_mode::serial_in_order, last_body);\n\n    oneapi::tbb::parallel_pipeline(16, first_filter & middle_filter & last_filter);\n\n    CHECK(signal_point == input_count);\n}\n\n//! Test that parallel_pipeline uses std::invoke to run the filter body\n//! \\brief \\ref requirement\nTEST_CASE(\"parallel_pipeline and std::invoke\") {\n    using output_filter_type = test_invoke::SmartID<std::size_t>;\n    using middle_filter_type = test_invoke::SmartID<output_filter_type>;\n\n    test_pipeline_invoke_basic(&middle_filter_type::get_id, &output_filter_type::operate); // Pointer to non-static function as middle filter\n    test_pipeline_invoke_basic(&middle_filter_type::id, &output_filter_type::operate); // Pointer to non-static member as middle filter\n}\n\n#endif // __TBB_CPP17_INVOKE_PRESENT\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_parallel_reduce.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/parallel_reduce_common.h\"\n#include \"common/concurrency_tracker.h\"\n#include \"common/test_invoke.h\"\n\n#include \"../tbb/test_partitioner.h\"\n#include <list>\n\n//! \\file conformance_parallel_reduce.cpp\n//! \\brief Test for [algorithms.parallel_reduce algorithms.parallel_deterministic_reduce] specification\n\nclass RotOp {\npublic:\n    using Type = int;\n    int operator() ( int x, int i ) const {\n        return ( x<<1 ) ^ i;\n    }\n    int join( int x, int y ) const {\n        return operator()( x, y );\n    }\n};\n\ntemplate <class Op>\nstruct ReduceBody {\n    using result_type = typename Op::Type;\n    result_type my_value;\n\n    ReduceBody() : my_value() {}\n    ReduceBody( ReduceBody &, oneapi::tbb::split ) : my_value() {}\n\n    void operator() ( const oneapi::tbb::blocked_range<int>& r ) {\n        utils::ConcurrencyTracker ct;\n        for ( int i = r.begin(); i != r.end(); ++i ) {\n            Op op;\n            my_value = op(my_value, i);\n        }\n    }\n\n    void join( const ReduceBody& y ) {\n        Op op;\n        my_value = op.join(my_value, y.my_value);\n    }\n};\n\ntemplate <typename T>\nclass MoveOnlyWrapper {\npublic:\n    MoveOnlyWrapper() = default;\n    MoveOnlyWrapper(const T& obj) : my_obj(obj) {}\n\n    MoveOnlyWrapper(MoveOnlyWrapper&&) = default;\n    MoveOnlyWrapper& operator=(MoveOnlyWrapper&&) = default;\n\n    MoveOnlyWrapper(const MoveOnlyWrapper&) = delete;\n    MoveOnlyWrapper& operator=(const MoveOnlyWrapper&) = delete;\n\n    bool operator==(const MoveOnlyWrapper& other) const { return my_obj == other.my_obj; }\nprivate:\n    T my_obj;\n}; // class MoveOnlyWrapper\n\n// The container wrapper that is copyable but the copy constructor fails if the source container is non-empty\n// If such an empty container is provided as an identity into parallel reduce algorithm with rvalue-friendly body,\n// it should only call the copy constructor while broadcasting the identity element into the leafs\n// and the identity element is an empty container for the further test\ntemplate <typename T>\nclass EmptyCopyList {\npublic:\n    EmptyCopyList() = default;\n\n    EmptyCopyList(EmptyCopyList&&) = default;\n    EmptyCopyList& operator=(EmptyCopyList&&) = default;\n\n    EmptyCopyList(const EmptyCopyList& other) {\n        REQUIRE_MESSAGE(other.my_list.empty(), \"reduce copied non-identity list\");\n    }\n    EmptyCopyList& operator=(const EmptyCopyList& other) {\n        REQUIRE_MESSAGE(other.my_list.empty(), \"reduce copied non-identity list\");\n        return *this;\n    }\n\n    typename std::list<T>::iterator insert(typename std::list<T>::const_iterator pos, T&& item) {\n        return my_list.insert(pos, std::move(item));\n    }\n\n    void splice(typename std::list<T>::const_iterator pos, EmptyCopyList&& other) {\n        my_list.splice(pos, std::move(other.my_list));\n    }\n\n    typename std::list<T>::const_iterator end() const { return my_list.end(); }\n\n    bool operator==(const EmptyCopyList& other) const { return my_list == other.my_list; }\n\nprivate:\n    std::list<T> my_list;\n}; // class EmptyCopyList\n\ntemplate <class Partitioner>\nvoid TestDeterministicReductionFor() {\n    const int N = 1000;\n    const oneapi::tbb::blocked_range<int> range(0, N);\n    using BodyType = ReduceBody<RotOp>;\n    using Type = RotOp::Type;\n\n    BodyType benchmark_body;\n    deterministic_reduce_invoker(range, benchmark_body, Partitioner());\n    for ( int i=0; i<100; ++i ) {\n        BodyType measurement_body;\n        deterministic_reduce_invoker(range, measurement_body, Partitioner());\n        REQUIRE_MESSAGE( benchmark_body.my_value == measurement_body.my_value,\n        \"parallel_deterministic_reduce behaves differently from run to run\" );\n\n        Type lambda_measurement_result = deterministic_reduce_invoker<Type>( range,\n            [](const oneapi::tbb::blocked_range<int>& br, Type value) -> Type {\n                utils::ConcurrencyTracker ct;\n                for ( int ii = br.begin(); ii != br.end(); ++ii ) {\n                    RotOp op;\n                    value = op(value, ii);\n                }\n                return value;\n            },\n            [](const Type& v1, const Type& v2) -> Type {\n                RotOp op;\n                return op.join(v1,v2);\n            },\n            Partitioner()\n        );\n        REQUIRE_MESSAGE( benchmark_body.my_value == lambda_measurement_result,\n            \"lambda-based parallel_deterministic_reduce behaves differently from run to run\" );\n    }\n}\n\n//! Test that deterministic reduction returns the same result during several measurements\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Test deterministic reduce correctness\") {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        oneapi::tbb::global_control control(oneapi::tbb::global_control::max_allowed_parallelism, concurrency_level);\n        TestDeterministicReductionFor<oneapi::tbb::simple_partitioner>();\n        TestDeterministicReductionFor<oneapi::tbb::static_partitioner>();\n        TestDeterministicReductionFor<utils_default_partitioner>();\n    }\n}\n\n//! Test partitioners interaction with various ranges\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Test partitioners interaction with various ranges\") {\n    using namespace test_partitioner_utils::interaction_with_range_and_partitioner;\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        oneapi::tbb::global_control control(oneapi::tbb::global_control::max_allowed_parallelism, concurrency_level);\n\n        test_partitioner_utils::SimpleReduceBody body;\n        oneapi::tbb::affinity_partitioner ap;\n\n        parallel_reduce(Range1(/*assert_in_split*/ true, /*assert_in_proportional_split*/ false), body, ap);\n        parallel_reduce(Range6(false, true), body, ap);\n\n        parallel_reduce(Range1(/*assert_in_split*/ true, /*assert_in_proportional_split*/ false), body, oneapi::tbb::static_partitioner());\n        parallel_reduce(Range6(false, true), body, oneapi::tbb::static_partitioner());\n\n        parallel_reduce(Range1(/*assert_in_split*/ false, /*assert_in_proportional_split*/ true), body, oneapi::tbb::simple_partitioner());\n        parallel_reduce(Range6(false, true), body, oneapi::tbb::simple_partitioner());\n\n        parallel_reduce(Range1(/*assert_in_split*/ false, /*assert_in_proportional_split*/ true), body, oneapi::tbb::auto_partitioner());\n        parallel_reduce(Range6(false, true), body, oneapi::tbb::auto_partitioner());\n\n        parallel_deterministic_reduce(Range1(/*assert_in_split*/true, /*assert_in_proportional_split*/ false), body, oneapi::tbb::static_partitioner());\n        parallel_deterministic_reduce(Range6(false, true), body, oneapi::tbb::static_partitioner());\n\n        parallel_deterministic_reduce(Range1(/*assert_in_split*/false, /*assert_in_proportional_split*/ true), body, oneapi::tbb::simple_partitioner());\n        parallel_deterministic_reduce(Range6(false, true), body, oneapi::tbb::simple_partitioner());\n    }\n}\n\n#if __TBB_CPP17_INVOKE_PRESENT\n\ntemplate <typename Body, typename Reduction>\nvoid test_preduce_invoke_basic(const Body& body, const Reduction& reduction) {\n    const std::size_t iterations = 100000;\n    const std::size_t result = iterations * (iterations - 1) / 2;\n\n    test_invoke::SmartRange<test_invoke::SmartValue> range(0, iterations);\n    test_invoke::SmartValue identity(0);\n\n    CHECK(result == oneapi::tbb::parallel_reduce(range, identity, body, reduction).get());\n    CHECK(result == oneapi::tbb::parallel_reduce(range, identity, body, reduction, oneapi::tbb::simple_partitioner()).get());\n    CHECK(result == oneapi::tbb::parallel_reduce(range, identity, body, reduction, oneapi::tbb::auto_partitioner()).get());\n    CHECK(result == oneapi::tbb::parallel_reduce(range, identity, body, reduction, oneapi::tbb::static_partitioner()).get());\n    oneapi::tbb::affinity_partitioner aff;\n    CHECK(result == oneapi::tbb::parallel_reduce(range, identity, body, reduction, aff).get());\n\n    CHECK(result == oneapi::tbb::parallel_deterministic_reduce(range, identity, body, reduction).get());\n    CHECK(result == oneapi::tbb::parallel_deterministic_reduce(range, identity, body, reduction, oneapi::tbb::simple_partitioner()).get());\n    CHECK(result == oneapi::tbb::parallel_deterministic_reduce(range, identity, body, reduction, oneapi::tbb::static_partitioner()).get());\n}\n\n//! Test that parallel_reduce uses std::invoke to run the body\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"parallel_[deterministic_]reduce and std::invoke\") {\n    auto regular_reduce = [](const test_invoke::SmartRange<test_invoke::SmartValue>& range, const test_invoke::SmartValue& idx) {\n        test_invoke::SmartValue result = idx;\n        for (auto i = range.begin(); i.get() != range.end().get(); ++i) {\n            result = result + i;\n        }\n        return result;\n    };\n    auto regular_join = [](const test_invoke::SmartValue& lhs, const test_invoke::SmartValue& rhs) {\n        return lhs + rhs;\n    };\n\n    test_preduce_invoke_basic(&test_invoke::SmartRange<test_invoke::SmartValue>::reduction, &test_invoke::SmartValue::operator+);\n    test_preduce_invoke_basic(&test_invoke::SmartRange<test_invoke::SmartValue>::reduction, regular_join);\n    test_preduce_invoke_basic(regular_reduce, &test_invoke::SmartValue::operator+);\n}\n\n#endif\n\ntemplate <typename Runner, typename... PartitionerContext>\nvoid test_vector_of_lists_rvalue_reduce_basic(const Runner& runner, PartitionerContext&&... args) {\n    constexpr std::size_t n_vectors = 10000;\n\n    using inner_type = MoveOnlyWrapper<int>;\n    using list_type = EmptyCopyList<inner_type>;\n    using vector_of_lists_type = std::vector<list_type>;\n\n    vector_of_lists_type vector_of_lists;\n\n    vector_of_lists.reserve(n_vectors);\n    for (std::size_t i = 0; i < n_vectors; ++i) {\n        list_type list;\n\n        list.insert(list.end(), inner_type{1});\n        list.insert(list.end(), inner_type{2});\n        list.insert(list.end(), inner_type{3});\n        list.insert(list.end(), inner_type{4});\n        list.insert(list.end(), inner_type{5});\n        vector_of_lists.emplace_back(std::move(list));\n    }\n\n    oneapi::tbb::blocked_range<std::size_t> range(0, n_vectors, n_vectors * 2);\n\n    auto reduce_body = [&](const decltype(range)& range_obj, list_type&& x) {\n        list_type new_list = std::move(x);\n\n        for (std::size_t index = range_obj.begin(); index != range_obj.end(); ++index) {\n            new_list.splice(new_list.end(), std::move(vector_of_lists[index]));\n        }\n        return new_list;\n    };\n\n    auto join_body = [&](list_type&& x, list_type&& y) {\n        list_type new_list = std::move(x);\n\n        new_list.splice(new_list.end(), std::move(y));\n        return new_list;\n    };\n\n    list_type result = runner(range, list_type{}, reduce_body, join_body, std::forward<PartitionerContext>(args)...);\n\n    list_type expected_result;\n\n    for (std::size_t i = 0; i < n_vectors; ++i) {\n        expected_result.insert(expected_result.end(), inner_type{1});\n        expected_result.insert(expected_result.end(), inner_type{2});\n        expected_result.insert(expected_result.end(), inner_type{3});\n        expected_result.insert(expected_result.end(), inner_type{4});\n        expected_result.insert(expected_result.end(), inner_type{5});\n    }\n\n    REQUIRE_MESSAGE(expected_result == result, \"Incorrect reduce result\");\n}\n\nstruct ReduceRunner {\n    template <typename... Args>\n    auto operator()(Args&&... args) const -> decltype(oneapi::tbb::parallel_reduce(std::forward<Args>(args)...)) {\n        return oneapi::tbb::parallel_reduce(std::forward<Args>(args)...);\n    }\n};\n\nstruct DeterministicReduceRunner {\n    template <typename... Args>\n    auto operator()(Args&&... args) const -> decltype(oneapi::tbb::parallel_deterministic_reduce(std::forward<Args>(args)...)) {\n        return oneapi::tbb::parallel_deterministic_reduce(std::forward<Args>(args)...);\n    }\n};\n\nvoid test_vector_of_lists_rvalue_reduce() {\n    ReduceRunner runner;\n    oneapi::tbb::affinity_partitioner af_partitioner;\n    oneapi::tbb::task_group_context context;\n\n    test_vector_of_lists_rvalue_reduce_basic(runner);\n    test_vector_of_lists_rvalue_reduce_basic(runner, oneapi::tbb::auto_partitioner{});\n    test_vector_of_lists_rvalue_reduce_basic(runner, oneapi::tbb::simple_partitioner{});\n    test_vector_of_lists_rvalue_reduce_basic(runner, oneapi::tbb::static_partitioner{});\n    test_vector_of_lists_rvalue_reduce_basic(runner, af_partitioner);\n\n    test_vector_of_lists_rvalue_reduce_basic(runner, context);\n    test_vector_of_lists_rvalue_reduce_basic(runner, oneapi::tbb::auto_partitioner{}, context);\n    test_vector_of_lists_rvalue_reduce_basic(runner, oneapi::tbb::simple_partitioner{}, context);\n    test_vector_of_lists_rvalue_reduce_basic(runner, oneapi::tbb::static_partitioner{}, context);\n    test_vector_of_lists_rvalue_reduce_basic(runner, af_partitioner, context);\n}\n\nvoid test_vector_of_lists_rvalue_deterministic_reduce() {\n    DeterministicReduceRunner runner;\n    oneapi::tbb::task_group_context context;\n\n    test_vector_of_lists_rvalue_reduce_basic(runner);\n    test_vector_of_lists_rvalue_reduce_basic(runner, oneapi::tbb::simple_partitioner{});\n    test_vector_of_lists_rvalue_reduce_basic(runner, oneapi::tbb::static_partitioner{});\n\n    test_vector_of_lists_rvalue_reduce_basic(runner, context);\n    test_vector_of_lists_rvalue_reduce_basic(runner, oneapi::tbb::simple_partitioner{}, context);\n    test_vector_of_lists_rvalue_reduce_basic(runner, oneapi::tbb::static_partitioner{}, context);\n}\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"test rvalue optimization\") {\n    test_vector_of_lists_rvalue_reduce();\n    test_vector_of_lists_rvalue_deterministic_reduce();\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_parallel_scan.cpp",
    "content": "/*\n    Copyright (c) 2020-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#define DOCTEST_CONFIG_SUPER_FAST_ASSERTS\n#include \"common/test.h\"\n#include \"common/test_invoke.h\"\n\n#include \"oneapi/tbb/parallel_scan.h\"\n\n#include <vector>\n\n//! \\file conformance_parallel_scan.cpp\n//! \\brief Test for [algorithms.parallel_scan] specification\n\nconstexpr std::size_t size = 1000;\n\ntemplate<typename T, typename Op>\nclass Body {\n    const T identity;\n    T sum;\n    std::vector<T>& y;\n    const std::vector<T>& z;\npublic:\n    Body( const std::vector<T>& z_, std::vector<T>& y_, T id ) : identity(id), sum(id), y(y_), z(z_) {}\n    T get_sum() const { return sum; }\n\n    template<typename Tag>\n    void operator()( const oneapi::tbb::blocked_range<std::size_t>& r, Tag ) {\n        T temp = sum;\n        for(std::size_t i=r.begin(); i<r.end(); ++i ) {\n            temp = Op()(temp, z[i]);\n            if( Tag::is_final_scan() )\n                y[i] = temp;\n        }\n        sum = temp;\n    }\n    Body( Body& b, oneapi::tbb::split ): identity(b.identity), sum(b.identity), y(b.y), z(b.z) {}\n    void reverse_join( Body& a ) { sum = Op()(a.sum, sum); }\n    void assign( Body& b ) { sum = b.sum; }\n};\n\nclass default_partitioner_tag{};\n\ntemplate<typename Partitioner>\nstruct parallel_scan_wrapper{\n    template<typename... Args>\n    void operator()(Args&&... args) {\n    oneapi::tbb::parallel_scan(std::forward<Args>(args)..., Partitioner());\n    }\n};\n\ntemplate<>\nstruct parallel_scan_wrapper<default_partitioner_tag>{\n    template<typename... Args>\n    void operator()(Args&&... args) {\n    oneapi::tbb::parallel_scan(std::forward<Args>(args)...);\n    }\n};\n\n// Test scan tag\n//! \\brief \\ref interface\nTEST_CASE(\"scan tags testing\") {\n    CHECK(oneapi::tbb::pre_scan_tag::is_final_scan()==false);\n    CHECK(oneapi::tbb::final_scan_tag::is_final_scan()==true);\n    CHECK((bool)oneapi::tbb::pre_scan_tag()==false);\n    CHECK((bool)oneapi::tbb::final_scan_tag()==true);\n}\n\n//! Test parallel prefix sum calculation for body-based interface\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE_TEMPLATE(\"Test parallel scan with body\", Partitioner, default_partitioner_tag, oneapi::tbb::simple_partitioner, oneapi::tbb::auto_partitioner) {\n    std::vector<int> input(size);\n    std::vector<int> output(size);\n    std::vector<int> control(size);\n\n    for(size_t i = 0; i < size; ++i) {\n        input[i] = int(i / 2);\n        if(i)\n            control[i] = control[i-1] + input[i];\n        else\n            control[i] = input[i];\n    }\n    Body<int, std::plus<int>> body(input, output, 0);\n    parallel_scan_wrapper<Partitioner>()(oneapi::tbb::blocked_range<std::size_t>(0U, size, 1U), body);\n    CHECK((control == output));\n}\n\n\n//! Test parallel prefix sum calculation for scan-based interface\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE_TEMPLATE(\"Test parallel scan with body\", Partitioner, default_partitioner_tag, oneapi::tbb::simple_partitioner, oneapi::tbb::auto_partitioner) {\n    std::vector<std::size_t> input(size);\n    std::vector<std::size_t> output(size);\n    std::vector<std::size_t> control(size);\n\n    for (std::size_t i = 0; i<size; ++i) {\n        input[i] = i;\n        if (i)\n            control[i] = control[i-1]+input[i];\n        else\n            control[i] = input[i];\n    }\n    parallel_scan_wrapper<Partitioner>()(oneapi::tbb::blocked_range<std::size_t>(0U, size, 1U), std::size_t(0),\n        [&](const oneapi::tbb::blocked_range<std::size_t>& r, std::size_t sum, bool is_final) -> std::size_t\n        {\n            std::size_t temp = sum;\n            for (std::size_t i = r.begin(); i<r.end(); ++i) {\n                temp = temp + input[i];\n                if (is_final)\n                    output[i] = temp;\n            }\n            return temp;\n        },\n        [](std::size_t a, std::size_t b) -> std::size_t\n        {\n            return a + b;\n        });\n\n    CHECK((control==output));\n}\n\n#if __TBB_CPP17_INVOKE_PRESENT\ntemplate <typename... Args>\nvoid test_pscan_invoke(const std::vector<std::size_t>& desired_vector,\n                       std::vector<std::size_t>& result_vector,\n                       Args&&... args) {\n    auto result = oneapi::tbb::parallel_scan(std::forward<Args>(args)...);\n    CHECK(desired_vector == result_vector);\n    CHECK(result.get() == result_vector.back());\n\n    for (std::size_t& item : result_vector) item = 0;\n}\n\n//! Test that parallel_scan uses std::invoke to run the body\n//! \\brief \\ref requirement\nTEST_CASE(\"parallel_scan and std::invoke\") {\n    const std::size_t iterations = 1000000;\n    std::vector<std::size_t> desired_vector(iterations);\n\n    for (std::size_t i = 1; i < iterations; ++i) {\n        desired_vector[i] = desired_vector[i - 1] + i;\n    }\n\n    std::vector<std::size_t> change_vector(iterations, 0);\n    test_invoke::SmartRange<test_invoke::SmartValue> range(0, iterations, change_vector);\n    test_invoke::SmartValue identity(0);\n\n    auto scan = &test_invoke::SmartRange<test_invoke::SmartValue>::scan;\n    auto combine = &test_invoke::SmartValue::operator+;\n\n    test_pscan_invoke(desired_vector, change_vector, range, identity, scan, combine);\n    test_pscan_invoke(desired_vector, change_vector, range, identity, scan, combine, oneapi::tbb::auto_partitioner());\n    test_pscan_invoke(desired_vector, change_vector, range, identity, scan, combine, oneapi::tbb::simple_partitioner());\n}\n\n#endif // __TBB_CPP17_INVOKE_PRESENT\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_parallel_sort.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/utils_concurrency_limit.h\"\n\n#include \"oneapi/tbb/parallel_sort.h\"\n#include \"oneapi/tbb/global_control.h\"\n\n#include <vector>\n\n//! \\file conformance_parallel_sort.cpp\n//! \\brief Test for [algorithms.parallel_sort]\n\nconst int vector_size = 10000;\n\nstd::vector<int> get_random_vector() {\n    std::vector<int> result(vector_size);\n    for (int i = 0; i < vector_size; ++i)\n        result[i] = rand() % vector_size;\n    return result;\n}\n\n//! Iterator based range sorting test (default comparator)\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Iterator based range sorting test (default comparator)\") {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        oneapi::tbb::global_control control(oneapi::tbb::global_control::max_allowed_parallelism, concurrency_level);\n\n        auto test_vector = get_random_vector();\n        oneapi::tbb::parallel_sort(test_vector.begin(), test_vector.end());\n\n        for(auto it = test_vector.begin(); it != test_vector.end() - 1; ++it)\n            REQUIRE_MESSAGE(*it <= *(it+1), \"Testing data not sorted\");\n    }\n}\n\n//! Iterator based range sorting test (greater comparator)\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE (\"Iterator based range sorting test (greater comparator)\") {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        oneapi::tbb::global_control control(oneapi::tbb::global_control::max_allowed_parallelism, concurrency_level);\n\n        auto test_vector = get_random_vector();\n        oneapi::tbb::parallel_sort(test_vector.begin(), test_vector.end(), std::greater<int>());\n\n        for(auto it = test_vector.begin(); it != test_vector.end() - 1; ++it)\n            REQUIRE_MESSAGE(*it >= *(it+1), \"Testing data not sorted\");\n    }\n}\n\n//! Range sorting test (default comparator)\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE (\"Range sorting test (default comparator)\") {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        oneapi::tbb::global_control control(oneapi::tbb::global_control::max_allowed_parallelism, concurrency_level);\n\n        auto test_vector = get_random_vector();\n        oneapi::tbb::parallel_sort(test_vector);\n\n        for(auto it = test_vector.begin(); it != test_vector.end() - 1; ++it)\n            REQUIRE_MESSAGE(*it <= *(it+1), \"Testing data not sorted\");\n    }\n}\n\n//! Range sorting test (greater comparator)\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE (\"Range sorting test (greater comparator)\") {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        oneapi::tbb::global_control control(oneapi::tbb::global_control::max_allowed_parallelism, concurrency_level);\n\n        auto test_vector = get_random_vector();\n        oneapi::tbb::parallel_sort(test_vector, std::greater<int>());\n\n        for(auto it = test_vector.begin(); it != test_vector.end() - 1; ++it)\n            REQUIRE_MESSAGE(*it >= *(it+1), \"Testing data not sorted\");\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_priority_queue_node.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#define CONFORMANCE_BUFFERING_NODES\n#define CONFORMANCE_QUEUE_NODE\n\n#include \"conformance_flowgraph.h\"\n\n//! \\file conformance_priority_queue_node.cpp\n//! \\brief Test for [flow_graph.priority_queue_node] specification\n\n//! Test priority_queue_node single_push\n//! \\brief \\ref requirement\nTEST_CASE(\"priority_queue_node single_push\"){\n    conformance::test_forwarding_single_push<oneapi::tbb::flow::priority_queue_node<int>>();\n}\n\n//! Test function_node buffering\n//! \\brief \\ref requirement\nTEST_CASE(\"priority_queue_node buffering\"){\n    conformance::test_buffering<oneapi::tbb::flow::priority_queue_node<int>, int>();\n}\n\n//! Constructs an empty priority_queue_node that belongs to the same graph g as src.\n//! Any intermediate state of src, including its links to predecessors and successors, is not copied.\n//! \\brief \\ref requirement\nTEST_CASE(\"priority_queue_node copy constructor\"){\n    conformance::test_copy_ctor_for_buffering_nodes<oneapi::tbb::flow::priority_queue_node<int>>();\n}\n\n//! Test inheritance relations\n//! \\brief \\ref interface\nTEST_CASE(\"priority_queue_node superclasses\"){\n    conformance::test_inheritance<oneapi::tbb::flow::priority_queue_node<int>, int, int>();\n    conformance::test_inheritance<oneapi::tbb::flow::priority_queue_node<void*>, void*, void*>();\n}\n\n//! Test priority_queue_node node `try_put()` and `try_get()`\n//! \\brief \\ref requirement\nTEST_CASE(\"priority_queue_node methods\"){\n    oneapi::tbb::flow::graph g;\n\n    oneapi::tbb::flow::priority_queue_node<int, std::greater<int>> testing_node(g);\n\n    testing_node.try_put(2);\n    testing_node.try_put(3);\n    testing_node.try_put(1);\n    g.wait_for_all();\n\n    int tmp = -1;\n    CHECK_MESSAGE((testing_node.try_get(tmp)), \"Get should succeed\");\n    CHECK_MESSAGE((tmp == 1), \"Values should get sorted\");\n    CHECK_MESSAGE((testing_node.try_get(tmp)), \"Get should succeed\");\n    CHECK_MESSAGE((tmp == 2), \"Values should get sorted\");\n    CHECK_MESSAGE((testing_node.try_get(tmp)), \"Get should succeed\");\n    CHECK_MESSAGE((tmp == 3), \"Values should get sorted\");\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_queue_node.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#define CONFORMANCE_BUFFERING_NODES\n#define CONFORMANCE_QUEUE_NODE\n\n#include \"conformance_flowgraph.h\"\n\n//! \\file conformance_queue_node.cpp\n//! \\brief Test for [flow_graph.queue_node] specification\n\n//! Test queue_node single_push\n//! \\brief \\ref requirement\nTEST_CASE(\"queue_node single_push\"){\n    conformance::test_forwarding_single_push<oneapi::tbb::flow::queue_node<int>>();\n}\n\n//! Test function_node buffering\n//! \\brief \\ref requirement\nTEST_CASE(\"queue_node buffering\"){\n    conformance::test_buffering<oneapi::tbb::flow::queue_node<int>, int>();\n}\n\n//! Constructs an empty queue_node that belongs to the same graph g as src.\n//! Any intermediate state of src, including its links to predecessors and successors, is not copied.\n//! \\brief \\ref requirement\nTEST_CASE(\"queue_node copy constructor\"){\n    conformance::test_copy_ctor_for_buffering_nodes<oneapi::tbb::flow::queue_node<int>>();\n}\n\n//! Test inheritance relations\n//! \\brief \\ref interface\nTEST_CASE(\"queue_node superclasses\"){\n    conformance::test_inheritance<oneapi::tbb::flow::queue_node<int>, int, int>();\n    conformance::test_inheritance<oneapi::tbb::flow::queue_node<void*>, void*, void*>();\n}\n\n//! Test queue_node node `try_put()` and `try_get()`\n//! \\brief \\ref requirement\nTEST_CASE(\"queue_node methods\"){\n    oneapi::tbb::flow::graph g;\n    oneapi::tbb::flow::queue_node<int> testing_node(g);\n\n    int tmp1 = -1;\n    int tmp2 = -1;\n\n    CHECK_MESSAGE((!testing_node.try_get(tmp1) && tmp1 == -1), \"`try_get` must returns false if there is no non-reserved item currently in the node.\");\n\n    testing_node.try_put(1);\n    testing_node.try_put(2);\n    g.wait_for_all();\n\n    testing_node.try_get(tmp1);\n    CHECK_MESSAGE((tmp1 == 1), \"Messages must be an FIFO order\");\n\n    testing_node.try_get(tmp2);\n    CHECK_MESSAGE((tmp2 == 2), \"Additional `try_get()' does not receive the same value as previous\");\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_resumable_tasks.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n\n#if (!__TBB_WIN8UI_SUPPORT && !defined(WINAPI_FAMILY) && !__ANDROID__)\n\n#include \"oneapi/tbb/task.h\"\n#include \"oneapi/tbb/task_group.h\"\n#include <thread>\n\n//! \\file conformance_resumable_tasks.cpp\n//! \\brief Test for [resumable_tasks] specification\n\nthread_local bool mLocal = false;\n\n//! Test asynchronous resume\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Async test\") {\n    CHECK(!mLocal);\n    mLocal = true;\n    bool suspend = false, resume = false;\n    std::thread t;\n    oneapi::tbb::task::suspend([&t, &suspend, &resume](oneapi::tbb::task::suspend_point sp) {\n        suspend = true;\n        t = std::thread([sp, &resume] {\n            resume = true;\n            oneapi::tbb::task::resume(sp);\n        });\n    });\n    CHECK(suspend);\n    CHECK(resume);\n    CHECK_MESSAGE(mLocal, \"The same thread is expected\");\n    mLocal = false;\n    t.join();\n}\n\n//! Test parallel resume\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Parallel test\") {\n    CHECK(!mLocal);\n    mLocal = true;\n    constexpr int N = 100;\n    std::atomic<int> suspend{}, resume{};\n    oneapi::tbb::task_group tg;\n    for (int i = 0; i < N; ++i) {\n        tg.run([&tg, &suspend, &resume] {\n            oneapi::tbb::task::suspend([&tg, &suspend, &resume](oneapi::tbb::task::suspend_point sp) {\n                ++suspend;\n                tg.run([sp, &resume] {\n                    ++resume;\n                    oneapi::tbb::task::resume(sp);\n                });\n            });\n        });\n    }\n    tg.wait();\n    CHECK(suspend == N);\n    CHECK(resume == N);\n    CHECK_MESSAGE(mLocal, \"The same thread is expected\");\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_sequencer_node.cpp",
    "content": "/*\n    Copyright (c) 2020-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#define SEQUENCER_NODE\n\n#include \"conformance_flowgraph.h\"\n#include \"common/test_invoke.h\"\n\n//! \\file conformance_sequencer_node.cpp\n//! \\brief Test for [flow_graph.sequencer_node] specification\n\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\ntemplate <typename Body>\nvoid test_deduction_guides_common(Body body) {\n    using namespace tbb::flow;\n    graph g;\n    broadcast_node<int> br(g);\n\n    sequencer_node s1(g, body);\n    static_assert(std::is_same_v<decltype(s1), sequencer_node<int>>);\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    sequencer_node s2(follows(br), body);\n    static_assert(std::is_same_v<decltype(s2), sequencer_node<int>>);\n#endif\n\n    sequencer_node s3(s1);\n    static_assert(std::is_same_v<decltype(s3), sequencer_node<int>>);\n}\n\nstd::size_t sequencer_body_f(const int&) { return 1; }\n\nvoid test_deduction_guides() {\n    test_deduction_guides_common([](const int&)->std::size_t { return 1; });\n    test_deduction_guides_common([](const int&) mutable ->std::size_t { return 1; });\n    test_deduction_guides_common(sequencer_body_f);\n}\n#endif\n\n//! Test deduction guides\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Deduction guides\"){\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n    test_deduction_guides();\n#endif\n}\n\n//! Test sequencer_node single_push\n//! \\brief \\ref requirement\nTEST_CASE(\"sequencer_node single_push\"){\n    conformance::sequencer_functor<int> sequencer;\n    conformance::test_forwarding_single_push<oneapi::tbb::flow::sequencer_node<int>>(sequencer);\n}\n\n//! Test function_node buffering\n//! \\brief \\ref requirement\nTEST_CASE(\"sequencer_node buffering\"){\n    conformance::sequencer_functor<int> sequencer;\n    conformance::test_buffering<oneapi::tbb::flow::sequencer_node<int>, int>(sequencer);\n}\n\n//! Constructs an empty sequencer_node that belongs to the same graph g as src.\n//! Any intermediate state of src, including its links to predecessors and successors, is not copied.\n//! \\brief \\ref requirement\nTEST_CASE(\"sequencer_node copy constructor\"){\n    conformance::sequencer_functor<int> sequencer;\n    conformance::test_copy_ctor_for_buffering_nodes<oneapi::tbb::flow::sequencer_node<int>>(sequencer);\n}\n\n//! Test inheritance relations\n//! \\brief \\ref interface\nTEST_CASE(\"sequencer_node superclasses\"){\n    conformance::test_inheritance<oneapi::tbb::flow::sequencer_node<int>, int, int>();\n    conformance::test_inheritance<oneapi::tbb::flow::sequencer_node<void*>, void*, void*>();\n}\n\n//! Test the sequencer_node rejects duplicate sequencer numbers\n//! \\brief \\ref interface\nTEST_CASE(\"sequencer_node rejects duplicate\"){\n    oneapi::tbb::flow::graph g;\n    conformance::sequencer_functor<int> sequencer;\n\n    oneapi::tbb::flow::sequencer_node<int> node(g, sequencer);\n\n    node.try_put(1);\n\n    CHECK_MESSAGE((node.try_put(1) == false), \"sequencer_node must rejects duplicate sequencer numbers\");\n    g.wait_for_all();\n}\n\n//! Test queue_node node `try_put()` and `try_get()`\n//! \\brief \\ref requirement\nTEST_CASE(\"queue_node methods\"){\n    oneapi::tbb::flow::graph g;\n    conformance::sequencer_functor<int> sequencer;\n\n    oneapi::tbb::flow::sequencer_node<int> node(g, sequencer);\n\n    node.try_put(1);\n    node.try_put(0);\n    node.try_put(1);\n    g.wait_for_all();\n\n    int tmp = -1;\n    CHECK_MESSAGE((node.try_get(tmp) == true), \"Getting from sequencer should succeed\");\n    CHECK_MESSAGE((tmp == 0), \"Received value should be correct\");\n\n    tmp = -1;\n    CHECK_MESSAGE((node.try_get(tmp) == true), \"Getting from sequencer should succeed\");\n    CHECK_MESSAGE((tmp == 1), \"Received value should be correct\");\n\n    tmp = -1;\n    CHECK_MESSAGE((node.try_get(tmp) == false), \"Getting from sequencer should not succeed\");\n}\n\n//! The example demonstrates ordering capabilities of the sequencer_node.\n//! While being processed in parallel, the data is passed to the successor node in the exact same order it was read.\n//! \\brief \\ref requirement\nTEST_CASE(\"sequencer_node ordering\"){\n    using namespace oneapi::tbb::flow;\n    using message = conformance::sequencer_functor<int>::seq_message;\n    graph g;\n\n    // Due to parallelism the node can push messages to its successors in any order\n    function_node<message, message> process(g, unlimited, [] (message msg) {\n        msg.data++;\n        return msg;\n    });\n\n    sequencer_node<message> ordering(g, conformance::sequencer_functor<int>());\n\n    std::atomic<std::size_t> counter{0};\n    function_node<message> writer(g, tbb::flow::serial, [&] (const message& msg) {\n        CHECK_MESSAGE((msg.id == counter++), \"The data is passed to the successor node in the exact same order it was read\");\n    });\n\n    tbb::flow::make_edge(process, ordering);\n    tbb::flow::make_edge(ordering, writer);\n\n    for (std::size_t i = 0; i < 100; ++i) {\n        message msg = {i, 0};\n        process.try_put(msg);\n    }\n\n    g.wait_for_all();\n}\n\n#if __TBB_CPP17_INVOKE_PRESENT\n//! Test that sequencer node uses std::invoke to execute the body\n//! \\brief \\ref requirement\nTEST_CASE(\"sequencer_node and std::invoke\") {\n    using namespace oneapi::tbb::flow;\n\n    graph g;\n\n    function_node<std::size_t, test_invoke::SmartID<std::size_t>> starter(g, unlimited, [](std::size_t x) { return test_invoke::SmartID(x); });\n    sequencer_node<test_invoke::SmartID<std::size_t>> seq1(g, &test_invoke::SmartID<std::size_t>::get_id); // Member function\n    sequencer_node<test_invoke::SmartID<std::size_t>> seq2(g, &test_invoke::SmartID<std::size_t>::id); // Member object\n\n    std::size_t expected_item = 0;\n\n    function_node<test_invoke::SmartID<std::size_t>, std::size_t> check(g, serial, [&](const test_invoke::SmartID<std::size_t>& x) {\n        CHECK(x.id == expected_item);\n        ++expected_item;\n        return x.id;\n    });\n\n    // Build the first graph\n    make_edge(starter, seq1);\n    make_edge(seq1, check);\n\n    std::size_t objects_count = 10;\n    for (std::size_t i = 0; i < objects_count; ++i) {\n        starter.try_put(objects_count - i - 1);\n    }\n\n    g.wait_for_all();\n\n    CHECK(expected_item == objects_count);\n\n    // Rebuild the graph\n    g.reset(reset_flags::rf_clear_edges);\n    make_edge(starter, seq2);\n    make_edge(seq2, check);\n    expected_item = 0;\n\n    for (std::size_t i = 0; i < objects_count; ++i) {\n        starter.try_put(objects_count - i - 1);\n    }\n\n    g.wait_for_all();\n\n    CHECK(expected_item == objects_count);\n}\n\n#endif // __TBB_CPP17_INVOKE_PRESENT\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_split_node.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"conformance_flowgraph.h\"\n\n//! \\file conformance_split_node.cpp\n//! \\brief Test for [flow_graph.split_node] specification\n\nusing input_msg = conformance::message</*default_ctor*/true, /*copy_ctor*/true, /*copy_assign*/true/*enable for queue_node successor*/>;\nusing my_input_tuple = std::tuple<int, float, input_msg>;\nusing my_split_type = oneapi::tbb::flow::split_node<my_input_tuple>;\n\n//! Test node not buffered unsuccessful message, and try_get after rejection should not succeed.\n//! \\brief \\ref requirement\nTEST_CASE(\"split_node buffering\") {\n    oneapi::tbb::flow::graph g;\n\n    my_split_type testing_node(g);\n\n    oneapi::tbb::flow::limiter_node<int> rejecter1(g,0);\n    oneapi::tbb::flow::limiter_node<float> rejecter2(g,0);\n    oneapi::tbb::flow::limiter_node<input_msg> rejecter3(g,0);\n\n    oneapi::tbb::flow::make_edge(oneapi::tbb::flow::output_port<0>(testing_node), rejecter1);\n    oneapi::tbb::flow::make_edge(oneapi::tbb::flow::output_port<1>(testing_node), rejecter2);\n    oneapi::tbb::flow::make_edge(oneapi::tbb::flow::output_port<2>(testing_node), rejecter3);\n\n    my_input_tuple my_tuple(1, 1.5f, input_msg(2));\n    testing_node.try_put(my_tuple);\n    g.wait_for_all();\n\n    int tmp1 = -1;\n    float tmp2 = -1;\n    input_msg tmp3(-1);\n    CHECK_MESSAGE((oneapi::tbb::flow::output_port<0>(testing_node).try_get(tmp1) == false \n                    && tmp1 == -1), \"Value should be discarded after rejection\");\n    CHECK_MESSAGE((oneapi::tbb::flow::output_port<1>(testing_node).try_get(tmp2) == false \n                    && tmp2 == -1.f), \"Value should be discarded after rejection\");\n    CHECK_MESSAGE((oneapi::tbb::flow::output_port<2>(testing_node).try_get(tmp3) == false \n                    && tmp3 == -1), \"Value should be discarded after rejection\");\n}\n\n//! Test node broadcast messages to successors and splitting them in correct order\n//! \\brief \\ref requirement\nTEST_CASE(\"split_node broadcast and splitting\"){\n    using namespace oneapi::tbb::flow;\n    oneapi::tbb::flow::graph g;\n\n    my_split_type testing_node(g);\n    conformance::test_push_receiver<int> node2(g);\n    conformance::test_push_receiver<float> node3(g);\n    conformance::test_push_receiver<input_msg> node4(g);\n\n    oneapi::tbb::flow::make_edge(output_port<0>(testing_node), node2);\n    oneapi::tbb::flow::make_edge(output_port<1>(testing_node), node3);\n    oneapi::tbb::flow::make_edge(output_port<2>(testing_node), node4);\n\n    my_input_tuple my_tuple(1, 1.5f, input_msg(2));\n\n    CHECK_MESSAGE((testing_node.try_put(my_tuple)), \"`try_put()' must always returns `true'\");\n    g.wait_for_all();\n    auto values1 = conformance::get_values(node2);\n    auto values2 = conformance::get_values(node3);\n    auto values3 = conformance::get_values(node4);\n\n    CHECK_MESSAGE((values1.size() == 1), \"Descendant of the node must receive one message.\");\n    CHECK_MESSAGE((values2.size() == 1), \"Descendant of the node must receive one message.\");\n    CHECK_MESSAGE((values3.size() == 1), \"Descendant of the node must receive one message.\");\n    CHECK_MESSAGE((values1[0] == 1), \"Descendant of the node needs to be receive N messages\");\n    CHECK_MESSAGE((values2[0] == 1.5f), \"Descendant of the node must receive one message.\");\n    CHECK_MESSAGE((values3[0] == 2), \"Descendant of the node must receive one message.\");\n}\n\n//! The node that is constructed has a reference to the same graph object as src.\n//! The predecessors and successors of src are not copied.\n//! \\brief \\ref interface\nTEST_CASE(\"split_node copy constructor\"){\n    oneapi::tbb::flow::graph g;\n    oneapi::tbb::flow::continue_node<std::tuple<int>> node0( g,\n                                [](oneapi::tbb::flow::continue_msg) { return std::tuple<int>(1); } );\n\n    oneapi::tbb::flow::split_node<std::tuple<int>> node1(g);\n    conformance::test_push_receiver<int> node2(g);\n    conformance::test_push_receiver<int> node3(g);\n\n    oneapi::tbb::flow::make_edge(node0, node1);\n    oneapi::tbb::flow::make_edge(oneapi::tbb::flow::output_port<0>(node1), node2);\n\n    oneapi::tbb::flow::split_node<std::tuple<int>> node_copy(node1);\n\n    oneapi::tbb::flow::make_edge(oneapi::tbb::flow::output_port<0>(node_copy), node3);\n\n    node_copy.try_put(std::tuple<int>(1));\n    g.wait_for_all();\n\n    CHECK_MESSAGE((conformance::get_values(node2).size() == 0 && conformance::get_values(node3).size() == 1), \"Copied node doesn`t copy successor\");\n\n    node0.try_put(oneapi::tbb::flow::continue_msg());\n    g.wait_for_all();\n\n    CHECK_MESSAGE((conformance::get_values(node2).size() == 1 && conformance::get_values(node3).size() == 0), \"Copied node doesn`t copy predecessor\");\n}\n\n//! Test copy constructor\n//! \\brief \\ref interface\nTEST_CASE(\"split_node superclasses\") {\n    CHECK_MESSAGE((std::is_base_of<oneapi::tbb::flow::graph_node, my_split_type>::value), \"split_node should be derived from graph_node\");\n    CHECK_MESSAGE((std::is_base_of<oneapi::tbb::flow::receiver<my_input_tuple>, my_split_type>::value), \"split_node should be derived from receiver<T>\");\n}\n\n//! Test split_node output_ports() returns a tuple of output ports.\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"split_node output_ports\") {\n    oneapi::tbb::flow::graph g;\n    my_split_type node(g);\n\n    CHECK_MESSAGE((std::is_same<my_split_type::output_ports_type&,\n        decltype(node.output_ports())>::value), \"split_node output_ports should returns a tuple of output ports\");\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_task_arena.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n\n#include \"oneapi/tbb/task_arena.h\"\n#include \"oneapi/tbb/task_scheduler_observer.h\"\n#include \"oneapi/tbb/enumerable_thread_specific.h\"\n#include \"oneapi/tbb/parallel_for.h\"\n\n//! \\file conformance_task_arena.cpp\n//! \\brief Test for [scheduler.task_arena scheduler.task_scheduler_observer] specification\n\n// This test requires TBB in an uninitialized state\n//! Test for uninitilized arena\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Test current_thread_index\") {\n    REQUIRE_MESSAGE((tbb::this_task_arena::current_thread_index() == tbb::task_arena::not_initialized), \"TBB was initialized state\");\n}\n\n//! Test task arena interfaces\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Arena interfaces\") {\n    //! Initialization interfaces\n    oneapi::tbb::task_arena a(1,1); a.initialize();\n    std::atomic<bool> done{ false };\n    //! Enqueue interface\n    a.enqueue([&done] {\n        CHECK(oneapi::tbb::this_task_arena::max_concurrency() == 2);\n        done = true;\n    });\n    //! Execute interface\n    a.execute([&] {\n        //! oneapi::tbb::this_task_arena interfaces\n        CHECK(oneapi::tbb::this_task_arena::current_thread_index() >= 0);\n        //! Attach interface\n        oneapi::tbb::task_arena attached_arena{oneapi::tbb::task_arena::attach()};\n        CHECK(attached_arena.is_active());\n        oneapi::tbb::task_arena attached_arena2{oneapi::tbb::attach()};\n        CHECK(attached_arena2.is_active());\n    });\n    while (!done) {\n        utils::yield();\n    }\n    //! Terminate interface\n    a.terminate();\n}\n\n//! Test tasks isolation for inner oneapi::tbb::parallel_for loop\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Task isolation\") {\n    const int N1 = 1000, N2 = 1000;\n    oneapi::tbb::enumerable_thread_specific<int> ets;\n    oneapi::tbb::parallel_for(0, N1, [&](int i) {\n        // Set a thread specific value\n        ets.local() = i;\n        // Run the second parallel loop in an isolated region to prevent the current thread\n        // from taking tasks related to the outer parallel loop.\n        oneapi::tbb::this_task_arena::isolate([&]{\n            oneapi::tbb::parallel_for(0, N2, utils::DummyBody(10));\n        });\n        REQUIRE(ets.local() == i);\n    });\n}\n\nclass conformance_observer: public oneapi::tbb::task_scheduler_observer {\npublic:\n    std::atomic<bool> is_entry_called{false};\n    std::atomic<bool> is_exit_called{false};\n\n    conformance_observer( oneapi::tbb::task_arena &a ) : oneapi::tbb::task_scheduler_observer(a) {\n        observe(true); // activate the observer\n    }\n\n    ~conformance_observer() {\n        observe(false);\n    }\n\n    void on_scheduler_entry(bool) override {\n        is_entry_called.store(true, std::memory_order_relaxed);\n    }\n\n    void on_scheduler_exit(bool) override {\n        is_exit_called.store(true, std::memory_order_relaxed);\n    }\n\n    bool is_callbacks_called() {\n        return is_entry_called.load(std::memory_order_relaxed)\n            && is_exit_called.load(std::memory_order_relaxed);\n    }\n};\n\n//! Test task arena observer interfaces\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Task arena observer\") {\n    oneapi::tbb::task_arena a; a.initialize();\n    conformance_observer observer(a);\n    a.execute([&] {\n        oneapi::tbb::parallel_for(0, 100, utils::DummyBody(10), oneapi::tbb::simple_partitioner());\n    });\n    REQUIRE(observer.is_callbacks_called());\n}\n\n//! Test task arena copy constructor\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Task arena copy constructor\") {\n    oneapi::tbb::task_arena arena(1);\n    oneapi::tbb::task_arena copy = arena;\n\n    REQUIRE(arena.max_concurrency() == copy.max_concurrency());\n    REQUIRE(arena.is_active() == copy.is_active());\n}\n\n\n//! Basic test for arena::enqueue with task handle\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"enqueue task_handle\") {\n    oneapi::tbb::task_arena arena;\n    oneapi::tbb::task_group tg;\n\n    //This flag is intentionally made non-atomic for Thread Sanitizer\n    //to raise a flag if implementation of task_group is incorrect\n    bool run{false};\n\n    auto task_handle = tg.defer([&]{ run = true; });\n\n    arena.enqueue(std::move(task_handle));\n    tg.wait();\n\n    CHECK(run == true);\n}\n\n//! Basic test for this_task_arena::enqueue with task handle\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"this_task_arena::enqueue task_handle\") {\n    oneapi::tbb::task_arena arena;\n    oneapi::tbb::task_group tg;\n\n    //This flag is intentionally made non-atomic for Thread Sanitizer\n    //to raise a flag if implementation of task_group is incorrect\n    bool run{false};\n\n    arena.execute([&]{\n        auto task_handle = tg.defer([&]{ run = true; });\n\n        oneapi::tbb::this_task_arena::enqueue(std::move(task_handle));\n    });\n\n    tg.wait();\n\n    CHECK(run == true);\n}\n\n//TODO: Add\n//! Basic test for this_task_arena::enqueue with functor\n\n//! Test case for the common use-case of prolonging task_group lifetime\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"this_task_arena::enqueue prolonging task_group\") {\n    oneapi::tbb::task_arena arena;\n    oneapi::tbb::task_group tg;\n\n    //This flag is intentionally made non-atomic for Thread Sanitizer\n    //to raise a flag if implementation of task_group is incorrect\n    bool run{false};\n\n    //block the task_group to wait on it\n    auto task_handle = tg.defer([]{});\n\n    arena.execute([&]{\n        oneapi::tbb::this_task_arena::enqueue([&]{\n            run = true;\n            //release the task_group\n            task_handle = oneapi::tbb::task_handle{};\n        });\n    });\n\n    tg.wait();\n\n    CHECK(run == true);\n}\n\n#if TBB_USE_EXCEPTIONS\n//! Basic test for exceptions in task_arena::enqueue with task_handle\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"task_arena::enqueue(task_handle) exception propagation\"){\n    oneapi::tbb::task_group tg;\n    oneapi::tbb::task_arena arena;\n\n    oneapi::tbb::task_handle h = tg.defer([&]{\n        volatile bool suppress_unreachable_code_warning = true;\n        if (suppress_unreachable_code_warning) {\n            throw std::runtime_error{ \"\" };\n        }\n    });\n\n    arena.enqueue(std::move(h));\n\n    CHECK_THROWS_AS(tg.wait(), std::runtime_error);\n}\n\n//! Basic test for exceptions in this_task_arena::enqueue with task_handle\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"this_task_arena::enqueue(task_handle) exception propagation\"){\n    oneapi::tbb::task_group tg;\n\n    oneapi::tbb::task_handle h = tg.defer([&]{\n        volatile bool suppress_unreachable_code_warning = true;\n        if (suppress_unreachable_code_warning) {\n            throw std::runtime_error{ \"\" };\n        }\n    });\n\n    oneapi::tbb::this_task_arena::enqueue(std::move(h));\n\n    CHECK_THROWS_AS(tg.wait(), std::runtime_error);\n}\n\n#endif // TBB_USE_EXCEPTIONS\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_task_group.cpp",
    "content": "/*\n    Copyright (c) 2021-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/task_group.h\"\n#include \"oneapi/tbb/task_arena.h\"\n#include \"common/test.h\"\n#include \"common/utils.h\"\n\n#include \"common/spin_barrier.h\"\n\n#include <type_traits>\n#include \"oneapi/tbb/global_control.h\"\n\n\n//! \\file conformance_task_group.cpp\n//! \\brief Test for [scheduler.task_group] specification\n\n//! Test checks that for lost task handle\n//! \\brief \\ref requirement\nTEST_CASE(\"Task handle created but not run\"){\n    {\n        oneapi::tbb::task_group tg;\n\n        //This flag is intentionally made non-atomic for Thread Sanitizer\n        //to raise a flag if implementation of task_group is incorrect\n        bool run {false};\n\n        auto h = tg.defer([&]{\n            run = true;\n        });\n        CHECK_MESSAGE(run == false, \"delayed task should not be run until run(task_handle) is called\");\n    }\n}\n\n//! Basic test for task handle\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Task handle run\"){\n    oneapi::tbb::task_handle h;\n\n    oneapi::tbb::task_group tg;\n    //This flag is intentionally made non-atomic for Thread Sanitizer\n    //to raise a flag if implementation of task_group is incorrect\n    bool run {false};\n\n    h = tg.defer([&]{\n        run = true;\n    });\n    CHECK_MESSAGE(run == false, \"delayed task should not be run until run(task_handle) is called\");\n    tg.run(std::move(h));\n    tg.wait();\n    CHECK_MESSAGE(run == true, \"Delayed task should be completed when task_group::wait exits\");\n\n    CHECK_MESSAGE(h == nullptr, \"Delayed task can be executed only once\");\n}\n\n//! Basic test for task handle\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Task handle run_and_wait\"){\n    oneapi::tbb::task_handle h;\n\n    oneapi::tbb::task_group tg;\n    //This flag is intentionally made non-atomic for Thread Sanitizer\n    //to raise a flag if implementation of task_group is incorrect\n    bool run {false};\n\n    h = tg.defer([&]{\n        run = true;\n    });\n    CHECK_MESSAGE(run == false, \"delayed task should not be run until run(task_handle) is called\");\n    tg.run_and_wait(std::move(h));\n    CHECK_MESSAGE(run == true, \"Delayed task should be completed when task_group::wait exits\");\n\n    CHECK_MESSAGE(h == nullptr, \"Delayed task can be executed only once\");\n}\n\n//! Test for empty check\n//! \\brief \\ref interface\nTEST_CASE(\"Task handle empty check\"){\n    oneapi::tbb::task_group tg;\n\n    oneapi::tbb::task_handle h;\n\n    bool empty = (h == nullptr);\n    CHECK_MESSAGE(empty, \"default constructed task_handle should be empty\");\n\n    h = tg.defer([]{});\n\n    CHECK_MESSAGE(h != nullptr, \"delayed task returned by task_group::delayed should not be empty\");\n}\n\n//! Test for comparison operations\n//! \\brief \\ref interface\nTEST_CASE(\"Task handle comparison/empty checks\"){\n    oneapi::tbb::task_group tg;\n\n    oneapi::tbb::task_handle h;\n\n    bool empty =  ! static_cast<bool>(h);\n    CHECK_MESSAGE(empty, \"default constructed task_handle should be empty\");\n    CHECK_MESSAGE(h == nullptr, \"default constructed task_handle should be empty\");\n    CHECK_MESSAGE(nullptr == h, \"default constructed task_handle should be empty\");\n\n    h = tg.defer([]{});\n\n    CHECK_MESSAGE(h != nullptr, \"deferred task returned by task_group::defer() should not be empty\");\n    CHECK_MESSAGE(nullptr != h, \"deferred task returned by task_group::defer() should not be empty\");\n\n}\n\n//! Test for task_handle being non copyable\n//! \\brief \\ref interface\nTEST_CASE(\"Task handle being non copyable\"){\n    static_assert(\n              (!std::is_copy_constructible<oneapi::tbb::task_handle>::value)\n            &&(!std::is_copy_assignable<oneapi::tbb::task_handle>::value),\n            \"oneapi::tbb::task_handle should be non copyable\");\n}\n//! Test that task_handle prolongs task_group::wait\n//! \\brief \\ref requirement\nTEST_CASE(\"Task handle blocks wait\"){\n    //Forbid creation of worker threads to ensure that task described by the task_handle is not run until wait is called\n    oneapi::tbb::global_control s(oneapi::tbb::global_control::max_allowed_parallelism, 1);\n    oneapi::tbb::task_group tg;\n    //explicit task_arena is needed to prevent a deadlock,\n    //as both task_group::run() and task_group::wait() should be called in the same arena\n    //to guarantee execution of the task spawned by run().\n    oneapi::tbb::task_arena arena;\n\n    //This flag is intentionally made non-atomic for Thread Sanitizer\n    //to raise a flag if implementation of task_group is incorrect\n    bool completed  {false};\n    std::atomic<bool> start_wait {false};\n    std::atomic<bool> thread_started{false};\n\n    oneapi::tbb::task_handle h = tg.defer([&]{\n        completed = true;\n    });\n\n    std::thread wait_thread {[&]{\n        CHECK_MESSAGE(completed == false, \"Deferred task should not be run until run(task_handle) is called\");\n\n        thread_started = true;\n        utils::SpinWaitUntilEq(start_wait, true);\n        arena.execute([&]{\n            tg.wait();\n            CHECK_MESSAGE(completed == true, \"Deferred task should be completed when task_group::wait exits\");\n        });\n    }};\n\n    utils::SpinWaitUntilEq(thread_started, true);\n    CHECK_MESSAGE(completed == false, \"Deferred task should not be run until run(task_handle) is called\");\n\n    arena.execute([&]{\n        tg.run(std::move(h));\n    });\n    CHECK_MESSAGE(completed == false, \"Deferred task should not be run until run(task_handle) and wait is called\");\n    start_wait = true;\n    wait_thread.join();\n}\n\n#if TBB_USE_EXCEPTIONS\n//! The test for exception handling in task_handle\n//! \\brief \\ref requirement\nTEST_CASE(\"Task handle exception propagation\"){\n    oneapi::tbb::task_group tg;\n\n    oneapi::tbb::task_handle h = tg.defer([&]{\n        volatile bool suppress_unreachable_code_warning = true;\n        if (suppress_unreachable_code_warning) {\n            throw std::runtime_error{ \"\" };\n        }\n    });\n\n    tg.run(std::move(h));\n\n    CHECK_THROWS_AS(tg.wait(), std::runtime_error);\n}\n#endif // TBB_USE_EXCEPTIONS\n\n//TODO: move to some common place to share with unit tests\nnamespace accept_task_group_context {\n\nstruct SelfRunner {\n    tbb::task_group& m_tg;\n    std::atomic<unsigned>& count;\n    void operator()() const {\n        unsigned previous_count = count.fetch_sub(1);\n        if (previous_count > 1)\n            m_tg.run( *this );\n    }\n};\n\ntemplate <typename TaskGroup, typename CancelF, typename WaitF>\nvoid run_cancellation_use_case(CancelF&& cancel, WaitF&& wait) {\n    std::atomic<bool> outer_cancelled{false};\n    std::atomic<unsigned> count{13};\n\n    tbb::task_group_context inner_ctx(tbb::task_group_context::isolated);\n    TaskGroup inner_tg(inner_ctx);\n\n    tbb::task_group outer_tg;\n    auto outer_tg_task = [&] {\n        inner_tg.run([&] {\n            utils::SpinWaitUntilEq(outer_cancelled, true);\n            inner_tg.run( SelfRunner{inner_tg, count} );\n        });\n\n        utils::try_call([&] {\n            std::forward<CancelF>(cancel)(outer_tg);\n        }).on_completion([&] {\n            outer_cancelled = true;\n        });\n    };\n\n    auto check = [&] {\n        tbb::task_group_status outer_status = tbb::task_group_status::not_complete;\n        outer_status = std::forward<WaitF>(wait)(outer_tg);\n        CHECK_MESSAGE(\n            outer_status == tbb::task_group_status::canceled,\n            \"Outer task group should have been cancelled.\"\n        );\n\n        tbb::task_group_status inner_status = inner_tg.wait();\n        CHECK_MESSAGE(\n            inner_status == tbb::task_group_status::complete,\n            \"Inner task group should have completed despite the cancellation of the outer one.\"\n        );\n\n        CHECK_MESSAGE(0 == count, \"Some of the inner group tasks were not executed.\");\n    };\n\n    outer_tg.run(outer_tg_task);\n    check();\n}\n\ntemplate <typename TaskGroup>\nvoid test() {\n    run_cancellation_use_case<TaskGroup>(\n        [](tbb::task_group& outer) { outer.cancel(); },\n        [](tbb::task_group& outer) { return outer.wait(); }\n    );\n\n#if TBB_USE_EXCEPTIONS\n    run_cancellation_use_case<TaskGroup>(\n        [](tbb::task_group& /*outer*/) {\n            volatile bool suppress_unreachable_code_warning = true;\n            if (suppress_unreachable_code_warning) {\n                throw int();\n            }\n        },\n        [](tbb::task_group& outer) {\n            try {\n                outer.wait();\n                return tbb::task_group_status::complete;\n            } catch(const int&) {\n                return tbb::task_group_status::canceled;\n            }\n        }\n    );\n#endif\n}\n\n} // namespace accept_task_group_context\n\n//! Respect task_group_context passed from outside\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Respect task_group_context passed from outside\") {\n    accept_task_group_context::test<tbb::task_group>();\n}\n\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_task_group_context.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"oneapi/tbb/task_group.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n\n//! \\file conformance_task_group_context.cpp\n//! \\brief Test for [task_group_context] specification\n\n//! Test construction\n//! \\brief \\ref interface\nTEST_CASE(\"Test construction\") {\n    {\n        oneapi::tbb::task_group_context ctx;\n        utils::suppress_unused_warning(ctx);\n    }\n    {\n        oneapi::tbb::task_group_context ctx{ oneapi::tbb::task_group_context::bound };\n        utils::suppress_unused_warning(ctx);\n    }\n    {\n        oneapi::tbb::task_group_context ctx{ oneapi::tbb::task_group_context::isolated\n            , oneapi::tbb::task_group_context::default_traits | oneapi::tbb::task_group_context::fp_settings | oneapi::tbb::task_group_context::concurrent_wait };\n        utils::suppress_unused_warning(ctx);\n    }\n}\n\n//! Test methods\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Test methods\") {\n    oneapi::tbb::task_group_context ctx{ oneapi::tbb::task_group_context::bound, oneapi::tbb::task_group_context::default_traits };\n    ctx.capture_fp_settings();\n    CHECK_FALSE(ctx.is_group_execution_cancelled());\n    CHECK(ctx.cancel_group_execution());\n    CHECK(ctx.is_group_execution_cancelled());\n    ctx.reset();\n    CHECK_FALSE(ctx.is_group_execution_cancelled());\n    ctx.traits();\n}\n\n//TODO: add test for task_group_context(task_group_context*)\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_tick_count.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n\n#include \"oneapi/tbb/tick_count.h\"\n#include \"oneapi/tbb/detail/_template_helpers.h\"\n#include <type_traits>\n\n//! \\file conformance_tick_count.cpp\n//! \\brief Test for [timing] specification\n\n//! Testing default construction\n//! \\brief \\ref interface\nTEST_CASE(\"Default construction\") {\n    oneapi::tbb::tick_count t1;\n    utils::suppress_unused_warning(t1);\n}\n\n//! Testing subtraction operation\n//! Subtraction of two equal tick_counts after call seconds must be equal to 0\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Subtraction of equal tick_counts\") {\n    oneapi::tbb::tick_count tick_f = oneapi::tbb::tick_count::now();\n    oneapi::tbb::tick_count tick_s(tick_f);\n    CHECK_EQ((tick_f - tick_s).seconds(), 0);\n}\n\n//! Testing subsequent timestamp\n//! \\brief \\ref requirement\nTEST_CASE(\"Subtraction subsequent timestamp\") {\n    oneapi::tbb::tick_count tick_f(oneapi::tbb::tick_count::now());\n    oneapi::tbb::tick_count tick_s(oneapi::tbb::tick_count::now());\n    while ((tick_s - tick_f).seconds() == 0) {\n        tick_s = oneapi::tbb::tick_count::now();\n    }\n    CHECK_GT((tick_s - tick_f).seconds(), 0);\n}\n\n// Wait for given duration.\n// The duration parameter is in units of seconds.\nstatic void WaitForDuration( double duration ) {\n    CHECK_GT(duration, 0);\n    oneapi::tbb::tick_count start = oneapi::tbb::tick_count::now();\n    double sec = 0;\n    do {\n        sec = (oneapi::tbb::tick_count::now() - start).seconds();\n        CHECK_GE(sec, 0);\n    } while (sec < duration);\n}\n\n// CHECK that two times in seconds are very close.\nvoid CheckNear( double x, double y ) {\n    CHECK_GE(x-y, -1.0E-10);\n    CHECK_GE(1.0E-10, x-y);\n}\n\n//! Test arithmetic operators on tick_count::interval_t\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Arithmetic operators\") {\n    oneapi::tbb::tick_count t1 = oneapi::tbb::tick_count::now();\n    WaitForDuration(0.000001);\n    oneapi::tbb::tick_count t2 = oneapi::tbb::tick_count::now();\n    WaitForDuration(0.0000012);\n    oneapi::tbb::tick_count t3 = oneapi::tbb::tick_count::now();\n\n    using interval_type = oneapi::tbb::tick_count::interval_t;\n    interval_type i = t2 - t1;\n    interval_type j = t3 - t2;\n    interval_type k = t3 - t1;\n    CHECK_EQ(std::is_same<oneapi::tbb::tick_count::interval_t, decltype(i - j)>::value, true);\n    CHECK_EQ(std::is_same<oneapi::tbb::tick_count::interval_t, decltype(i + j)>::value, true);\n    CheckNear((i + j).seconds(), k.seconds());\n    CheckNear((k - j).seconds(), i.seconds());\n    CheckNear(((k - j) + (j - i)).seconds(), k.seconds() - i.seconds());\n    interval_type sum;\n    sum += i;\n    sum += j;\n    CheckNear(sum.seconds(), k.seconds());\n    sum -= i;\n    CheckNear(sum.seconds(), j.seconds());\n    sum -= j;\n    CheckNear(sum.seconds(), 0.0);\n}\n\n\n//! Test resolution of oneapi::tbb::tick_count::interval_t\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"oneapi::tbb::tick_count::interval_t resolution\") {\n    static double target_value = 0.314159265358979323846264338327950288419;\n    static double step_value = 0.00027182818284590452353602874713526624977572;\n    static int range_value = 100;\n    for (int i = -range_value; i <= range_value; ++i) {\n        double my_time = target_value + step_value * i;\n        oneapi::tbb::tick_count::interval_t t0(my_time);\n        double interval_time = t0.seconds();\n        //! time always truncates\n        CHECK_GE(interval_time, 0);\n        CHECK_LT(my_time - interval_time, oneapi::tbb::tick_count::resolution());\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_version.cpp",
    "content": "/*\n    Copyright (c) 2020-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n\n#include \"oneapi/tbb/version.h\"\n#include <cstring>\n\n//! \\file conformance_version.cpp\n//! \\brief Test for [version_information] specification\n\n//! Testing the match of compile-time oneTBB specification version\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Test specification version\") {\n    int expected = 104;\n    REQUIRE_MESSAGE(ONETBB_SPEC_VERSION == expected,\n        \"Expected and actual specification versions do not match.\");\n}\n\n//! Testing the match of compile-time and runtime interface versions\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Test interface version\") {\n    REQUIRE_MESSAGE(TBB_runtime_interface_version()==TBB_INTERFACE_VERSION,\n        \"Running with the library of different version than the test was compiled against.\");\n}\n\n//! Testing the match of compile-time and runtime version strings\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Test version string\") {\n    REQUIRE_MESSAGE(std::strcmp( TBB_runtime_version(), TBB_VERSION_STRING )==0,\n        \"Running with the library of different version than the test was compiled against.\");\n}\n\n//! Testing interface macros\n//! \\brief \\ref requirement\nTEST_CASE(\"Test interface version\") {\n    REQUIRE(TBB_INTERFACE_VERSION / 1000 == TBB_INTERFACE_VERSION_MAJOR);\n    REQUIRE(TBB_INTERFACE_VERSION % 1000 / 10 == TBB_INTERFACE_VERSION_MINOR);\n}\n"
  },
  {
    "path": "third-party/tbb/test/conformance/conformance_write_once_node.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#define CONFORMANCE_BUFFERING_NODES\n#define CONFORMANCE_OVERWRITE_NODE\n\n#include \"conformance_flowgraph.h\"\n\n//! \\file conformance_write_once_node.cpp\n//! \\brief Test for [flow_graph.write_once_node] specification\n\n//! Test function_node broadcast\n//! \\brief \\ref requirement\nTEST_CASE(\"write_once_node broadcast\"){\n    conformance::test_forwarding<oneapi::tbb::flow::write_once_node<int>, int>(1);\n}\n\n//! Test write_once_node buffering\n//! \\brief \\ref requirement\nTEST_CASE(\"write_once_node buffering\"){\n    conformance::test_buffering<oneapi::tbb::flow::write_once_node<int>, int>();\n}\n\n//! The node that is constructed has a reference to the same graph object as src,with an invalid internal buffer item. \n//! The buffered value and list of successors are not copied from src.\n//! \\brief \\ref requirement\nTEST_CASE(\"write_once_node copy constructor\"){\n    conformance::test_copy_ctor_for_buffering_nodes<oneapi::tbb::flow::write_once_node<int>>();\n}\n\n//! Test inheritance relations\n//! \\brief \\ref interface\nTEST_CASE(\"write_once_node superclasses\"){\n    conformance::test_inheritance<oneapi::tbb::flow::write_once_node<int>, int, int>();\n    conformance::test_inheritance<oneapi::tbb::flow::write_once_node<void*>, void*, void*>();\n}\n\n//! Test overwrite_node node constructor\n//! \\brief \\ref requirement\nTEST_CASE(\"write_once_node constructor\"){\n    oneapi::tbb::flow::graph g;\n    oneapi::tbb::flow::overwrite_node<int> testing_node(g);\n\n    int tmp = -1;\n    CHECK_MESSAGE((!testing_node.is_valid()), \"Constructed node has invalid internal buffer item\");\n    CHECK_MESSAGE((!testing_node.try_get(tmp)), \"Gets from the node are non-destructive, but the first `try_get' fails\");\n}\n\n//! Test write_once_node node `is_valid()` and `clear()`\n//! \\brief \\ref requirement\nTEST_CASE(\"write_once_node methods\"){\n    oneapi::tbb::flow::graph g;\n    oneapi::tbb::flow::write_once_node<int> testing_node(g);\n\n    CHECK_MESSAGE((!testing_node.is_valid()), \"Constructed node has invalid internal buffer item\");\n\n    testing_node.try_put(1);\n\n    CHECK_MESSAGE((testing_node.is_valid()), \"Buffer must be valid after try_put call\");\n\n    testing_node.clear();\n\n    CHECK_MESSAGE((!testing_node.is_valid()), \"call `clear` invalidates the value held in the buffer.\");\n}\n\n//! The following test shows the possibility to connect the node to a reserving join_node,\n//! avoiding direct calls to the try_get() method from the body of the successor node\n//! \\brief \\ref requirement\nTEST_CASE(\"write_once_node with reserving join_node as successor\"){\n    conformance::test_with_reserving_join_node_class<oneapi::tbb::flow::write_once_node<int>>();\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_adaptive_mutex.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#define TBB_PREVIEW_MUTEXES 1\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"../conformance/conformance_mutex.h\"\n#include \"test_mutex.h\"\n\n#include \"oneapi/tbb/mutex.h\"\n#include \"oneapi/tbb/rw_mutex.h\"\n\n//! \\file test_adaptive_mutex.cpp\n//! \\brief Test for [preview] functionality\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test upgrade/downgrade with rw_mutex\") {\n    test_rwm_upgrade_downgrade<tbb::rw_mutex>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test mutex with native threads\") {\n    test_with_native_threads::test<tbb::mutex>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test rw_mutex with native threads\") {\n    test_with_native_threads::test<tbb::rw_mutex>();\n    test_with_native_threads::test_rw<tbb::rw_mutex>();\n}\n\n//! Testing Mutex requirements\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Basic Locable requirement test\") {\n    // BasicLockable\n    GeneralTest<oneapi::tbb::mutex>(\"Adaptive Mutex\");\n    GeneralTest<oneapi::tbb::rw_mutex>(\"Adaptive RW Mutex\");\n}\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Lockable requirement test\") {\n    // Lockable - single threaded try_acquire operations\n    TestTryAcquire<oneapi::tbb::mutex>(\"Adaptive Mutex\");\n    TestTryAcquire<oneapi::tbb::rw_mutex>(\"Adaptive RW Mutex\");\n}\n\n//! Testing ReaderWriterMutex requirements\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Shared mutexes (reader/writer) test\") {\n    // General reader writer capabilities + upgrade/downgrade\n    TestReaderWriterLock<oneapi::tbb::rw_mutex>(\"Adaptive RW Mutex\");\n    TestRWStateMultipleChange<oneapi::tbb::rw_mutex>(\"Adaptive RW Mutex\");\n}\n\n//! Testing ISO C++ Mutex and Shared Mutex requirements.\n//! Compatibility with the standard\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"ISO interface test\") {\n    GeneralTest<TBB_MutexFromISO_Mutex<oneapi::tbb::mutex> >(\"ISO Adaprive Mutex\");\n    GeneralTest<TBB_MutexFromISO_Mutex<oneapi::tbb::rw_mutex>>(\"ISO Adaptive RW Mutex\");\n    TestTryAcquire<TBB_MutexFromISO_Mutex<oneapi::tbb::mutex> >(\"ISO Adaptive  Mutex\");\n    TestTryAcquire<TBB_MutexFromISO_Mutex<oneapi::tbb::rw_mutex>>(\"ISO Adaptive RW Mutex\");\n    TestTryAcquireReader<TBB_MutexFromISO_Mutex<oneapi::tbb::rw_mutex>>(\"ISO Adaptive RW Mutex\");\n    TestReaderWriterLock<TBB_MutexFromISO_Mutex<oneapi::tbb::rw_mutex>>(\"ISO Adaptive RW Mutex\");\n}\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test internal mutex concepts for oneapi::tbb::mutex and oneapi::tbb::rw_mutex\") {\n    static_assert(oneapi::tbb::detail::scoped_lockable<oneapi::tbb::mutex>);\n    static_assert(oneapi::tbb::detail::scoped_lockable<oneapi::tbb::rw_mutex>);\n    static_assert(oneapi::tbb::detail::rw_scoped_lockable<oneapi::tbb::rw_mutex>);\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_allocators.cpp",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <tbb/version.h> // For __TBB_GLIBCXX_VERSION and __TBB_CPP20_PRESENT\n\n// Intel LLVM compiler triggers a deprecation warning in the implementation of std::allocator_traits::destroy\n// inside Standard Library while using STL PMR containers since std::polymorphic_allocator::destroy is deprecated since C++20\n#define TEST_LLVM_COMPILER_PMR_DESTROY_DEPRECATED_BROKEN __INTEL_LLVM_COMPILER == 20250000 && __TBB_GLIBCXX_VERSION == 110000 && __TBB_CPP20_PRESENT\n\n#if TEST_LLVM_COMPILER_PMR_DESTROY_DEPRECATED_BROKEN\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wdeprecated-declarations\"\n#endif\n\n#include \"tbb/cache_aligned_allocator.h\"\n#include \"tbb/tbb_allocator.h\"\n\n// the real body of the test is there:\n#include \"common/allocator_test_common.h\"\n#include \"common/allocator_stl_test_common.h\"\n\n//! \\file test_allocators.cpp\n//! \\brief Test for [memory_allocation.cache_aligned_allocator memory_allocation.tbb_allocator memory_allocation.cache_aligned_resource] specifications\n\n#if TBB_USE_EXCEPTIONS\n//! Test that cache_aligned_allocate() throws bad_alloc if cannot allocate memory.\n//! \\brief \\ref requirement\nTEST_CASE(\"Test cache_aligned_allocate throws\") {\n    #if __APPLE__\n        // On macOS*, failure to map memory results in messages to stderr;\n        // suppress them.\n        DisableStderr disableStderr;\n    #endif\n\n    using namespace tbb::detail::r1;\n\n    // First, allocate a reasonably big amount of memory, big enough\n    // to not cause warp around in system allocator after adding object header\n    // during address2 allocation.\n    const size_t itemsize = 1024;\n    const size_t nitems   = 1024;\n    void *address1 = nullptr;\n    try {\n        address1 = cache_aligned_allocate(nitems * itemsize);\n    } catch(...) {\n        // intentionally empty\n    }\n    REQUIRE_MESSAGE(address1, \"cache_aligned_allocate unable to obtain 1024*1024 bytes\");\n\n    bool exception_caught = false;\n    try {\n        // Try allocating more memory than left in the address space; should cause std::bad_alloc\n        (void)cache_aligned_allocate(~size_t(0) - itemsize * nitems + cache_line_size());\n    } catch (std::bad_alloc&) {\n        exception_caught = true;\n    } catch (...) {\n        REQUIRE_MESSAGE(false, \"Unexpected exception type (std::bad_alloc was expected)\");\n        exception_caught = true;\n    }\n    REQUIRE_MESSAGE(exception_caught, \"cache_aligned_allocate did not throw bad_alloc\");\n\n    try {\n        cache_aligned_deallocate(address1);\n    } catch (...) {\n        REQUIRE_MESSAGE(false, \"cache_aligned_deallocate did not accept the address obtained with cache_aligned_allocate\");\n    }\n}\n#endif /* TBB_USE_EXCEPTIONS */\n\n#if TBB_ALLOCATOR_TRAITS_BROKEN\n//! Testing allocator types in case std::allocator traits is broken\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Broken allocator concept\") {\n    TestAllocator<tbb::cache_aligned_allocator<void>>(Broken);\n    TestAllocator<tbb::tbb_allocator<void>>(Broken);\n}\n#endif\n\n//! Testing allocators compatibility with STL containers\n//! \\brief \\ref interface\nTEST_CASE(\"Test allocators with STL containers\") {\n    TestAllocatorWithSTL<tbb::cache_aligned_allocator<void>>();\n    TestAllocatorWithSTL<tbb::tbb_allocator<void>>();\n}\n\n#if __TBB_CPP17_MEMORY_RESOURCE_PRESENT\n//! Testing memory resources compatibility with STL containers through the\n//! std::pmr::polymorphic_allocator\n//! \\brief \\ref interface\nTEST_CASE(\"polymorphic_allocator test\") {\n    tbb::cache_aligned_resource aligned_resource;\n    tbb::cache_aligned_resource equal_aligned_resource(std::pmr::get_default_resource());\n    REQUIRE_MESSAGE(aligned_resource.is_equal(equal_aligned_resource),\n            \"Underlying upstream resources should be equal.\");\n    REQUIRE_MESSAGE(!aligned_resource.is_equal(*std::pmr::null_memory_resource()),\n            \"Cache aligned resource upstream shouldn't be equal to the standard resource.\");\n    TestAllocatorWithSTL(std::pmr::polymorphic_allocator<void>(&aligned_resource));\n}\n#endif\n\n#if TEST_LLVM_COMPILER_PMR_DESTROY_DEPRECATED_BROKEN\n#pragma clang diagnostic pop // \"-Wdeprecated-declarations\"\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_arena_constraints.cpp",
    "content": "/*\n    Copyright (c) 2019-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_arena_constraints.cpp\n//! \\brief Test for [info_namespace scheduler.task_arena] specifications\n\n#include \"common/common_arena_constraints.h\"\n\n#include \"tbb/parallel_for.h\"\n\n#if __TBB_HWLOC_VALID_ENVIRONMENT && __HWLOC_CPUBIND_PRESENT\n//! Test affinity and default_concurrency correctness for all available constraints.\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test affinity and default_concurrency correctness for all available constraints.\") {\n    system_info::initialize();\n    for (const auto& constraints: generate_constraints_variety()) {\n        tbb::task_arena ta{constraints};\n        test_constraints_affinity_and_concurrency(constraints, get_arena_affinity(ta));\n    }\n}\n\nbool is_observer_created(const tbb::task_arena::constraints& c) {\n    std::vector<tbb::core_type_id> core_types = tbb::info::core_types();\n    std::vector<tbb::numa_node_id> numa_nodes = tbb::info::numa_nodes();\n    return\n        (c.numa_id != tbb::task_arena::automatic && numa_nodes.size() > 1) ||\n        (c.core_type != tbb::task_arena::automatic && core_types.size() > 1) ||\n        c.max_threads_per_core != tbb::task_arena::automatic;\n}\n\nvoid recursive_arena_binding(constraints_container::iterator current_pos, constraints_container::iterator end_pos) {\n    system_info::affinity_mask affinity_before = system_info::allocate_current_affinity_mask();\n\n    if (current_pos != end_pos) {\n        auto constraints = *current_pos;\n        tbb::task_arena current_level_arena{constraints};\n\n        if (is_observer_created(constraints)) {\n            system_info::affinity_mask affinity = get_arena_affinity(current_level_arena);\n            test_constraints_affinity_and_concurrency(constraints, affinity);\n        }\n\n        current_level_arena.execute(\n            [&current_pos, &end_pos]() {\n                recursive_arena_binding(++current_pos, end_pos);\n            }\n        );\n    }\n\n    system_info::affinity_mask affinity_after = system_info::allocate_current_affinity_mask();\n    REQUIRE_MESSAGE(hwloc_bitmap_isequal(affinity_before, affinity_after),\n        \"After nested arena execution previous affinity mask was not restored.\");\n}\n\n//! Testing binding correctness during passing through nested arenas\n//! \\brief \\ref interface \\ref error_guessing\nTEST_CASE(\"Test binding with nested arenas\") {\n    system_info::initialize();\n    auto constraints_variety = generate_constraints_variety();\n    recursive_arena_binding(constraints_variety.begin(), constraints_variety.end());\n}\n\n\n//! Testing constraints propagation during arenas copy construction\n//! \\brief \\ref regression\nTEST_CASE(\"Test constraints propagation during arenas copy construction\") {\n    system_info::initialize();\n    for (const auto& constraints: generate_constraints_variety()) {\n        tbb::task_arena constructed{constraints};\n\n        tbb::task_arena copied(constructed);\n        system_info::affinity_mask copied_affinity = get_arena_affinity(copied);\n\n        test_constraints_affinity_and_concurrency(constraints, copied_affinity);\n    }\n}\n#endif /*__TBB_HWLOC_VALID_ENVIRONMENT && __HWLOC_CPUBIND_PRESENT */\n\n// The test cannot be stabilized with TBB malloc under Thread Sanitizer\n#if !__TBB_USE_THREAD_SANITIZER\n\n//! Testing memory leaks absence\n//! \\brief \\ref resource_usage\nTEST_CASE(\"Test memory leaks\") {\n    constexpr size_t num_trials = 1000;\n\n    // To reduce the test session time only one constraints object is used inside this test.\n    // This constraints should use all available settings to cover the most part of tbbbind functionality.\n    auto constraints = tbb::task_arena::constraints{}\n        .set_numa_id(tbb::info::numa_nodes().front())\n        .set_core_type(tbb::info::core_types().front())\n        .set_max_threads_per_core(1);\n\n    size_t current_memory_usage = 0, previous_memory_usage = 0, stability_counter = 0;\n    bool no_memory_leak = false;\n    for (size_t i = 0; i < num_trials; i++) {\n        { /* All DTORs must be called before GetMemoryUsage() call*/\n            tbb::task_arena arena{constraints};\n            arena.execute([]{\n                utils::SpinBarrier barrier;\n                barrier.initialize(tbb::this_task_arena::max_concurrency());\n                tbb::parallel_for(\n                    tbb::blocked_range<size_t>(0, tbb::this_task_arena::max_concurrency()),\n                    [&barrier](const tbb::blocked_range<size_t>&) {\n                        barrier.wait();\n                    }\n                );\n            });\n        }\n\n        current_memory_usage = utils::GetMemoryUsage();\n        stability_counter = current_memory_usage==previous_memory_usage ? stability_counter + 1 : 0;\n        // If the amount of used memory has not changed during 5% of executions,\n        // then we can assume that the check was successful\n        if (stability_counter > num_trials / 20) {\n            no_memory_leak = true;\n            break;\n        }\n        previous_memory_usage = current_memory_usage;\n    }\n    REQUIRE_MESSAGE(no_memory_leak, \"Seems we get memory leak here.\");\n}\n#endif\n\n//! Testing arena constraints setters\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Test arena constraints setters\") {\n    using constraints = tbb::task_arena::constraints;\n    auto constraints_comparison = [](const constraints& c1, const constraints& c2) {\n        REQUIRE_MESSAGE(constraints_equal{}(c1, c2),\n            \"Equal constraints settings specified by different interfaces shows different result.\");\n    };\n\n    // NUMA node ID setter testing\n    for(const auto& numa_index: tbb::info::numa_nodes()) {\n        constraints setter_c = constraints{}.set_numa_id(numa_index);\n        constraints assignment_c{}; assignment_c.numa_id = numa_index;\n\n        constraints_comparison(setter_c, assignment_c);\n    }\n\n    // Core type setter testing\n    for(const auto& core_type_index: tbb::info::core_types()) {\n        constraints setter_c = constraints{}.set_core_type(core_type_index);\n        constraints assignment_c{}; assignment_c.core_type = core_type_index;\n\n        constraints_comparison(setter_c, assignment_c);\n    }\n\n    // Max concurrency setter testing\n    {\n        constraints setter_c = constraints{}.set_max_concurrency(1);\n        constraints assignment_c{}; assignment_c.max_concurrency = 1;\n\n        constraints_comparison(setter_c, assignment_c);\n    }\n\n    // Threads per core setter testing\n    {\n        constraints setter_c = constraints{}.set_max_threads_per_core(1);\n        constraints assignment_c{}; assignment_c.max_threads_per_core = 1;\n\n        constraints_comparison(setter_c, assignment_c);\n    }\n}\n\nconst int custom_concurrency_value = 42;\nvoid check_concurrency_level(const tbb::task_arena::constraints& c) {\n    REQUIRE_MESSAGE(tbb::info::default_concurrency(c) == custom_concurrency_value,\n        \"Custom arena concurrency was passed to constraints, but was not respected by default_concurrency() call.\");\n    REQUIRE_MESSAGE(tbb::task_arena{c}.max_concurrency() == custom_concurrency_value,\n        \"Custom arena concurrency was passed to constraints, but was not respected by default_concurrency() call.\");\n}\n\n//! Testing concurrency getters output for constraints with custom concurrency value\n//! \\brief \\ref interface \\ref error_guessing\nTEST_CASE(\"Test concurrency getters output for constraints with custom concurrency value\") {\n    tbb::task_arena::constraints c{};\n    c.set_max_concurrency(custom_concurrency_value);\n    check_concurrency_level(c);\n\n    c.set_numa_id(tbb::info::numa_nodes().front());\n    check_concurrency_level(c);\n\n    c.set_core_type(tbb::info::core_types().front());\n    check_concurrency_level(c);\n\n    c.set_max_threads_per_core(1);\n    check_concurrency_level(c);\n}\n\n//! Testing constraints_threads_per_core() reserved entry point\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Testing constraints_threads_per_core() reserved entry point\") {\n    tbb::task_arena::constraints c{};\n    tbb::detail::r1::constraints_threads_per_core(c);\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_arena_priorities.cpp",
    "content": "/*\n    Copyright (c) 2020-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n\n#include \"tbb/task_group.h\"\n#include \"tbb/task_arena.h\"\n#include \"tbb/global_control.h\"\n\n#include \"common/spin_barrier.h\"\n#include \"common/utils.h\"\n#include \"common/utils_concurrency_limit.h\"\n\n#include <cstddef>\n#include <algorithm>\n#include <numeric>\n\n//! \\file test_arena_priorities.cpp\n//! \\brief Test for [scheduler.task_arena] specification\n\n//--------------------------------------------------//\n\nstd::vector<tbb::task_arena::priority> g_task_info;\n\nstd::atomic<unsigned> g_task_num;\n\nstd::atomic<bool> g_work_submitted;\n\nnamespace HighPriorityArenasTakeExecutionPrecedence {\n\nusing concurrency_type = int;\nusing arena_info =\n    std::tuple<std::unique_ptr<tbb::task_arena>,\n               concurrency_type,\n               tbb::task_arena::priority,\n               std::unique_ptr<tbb::task_group>>;\n\nenum arena_info_keys {\n    arena_pointer, arena_concurrency, arena_priority, associated_task_group\n};\n\nvoid prepare_logging_data(std::vector<tbb::task_arena::priority>& task_log, unsigned overall_tasks_num) {\n    task_log.clear();\n    task_log.resize(overall_tasks_num);\n    for( auto& record : task_log )\n        record = tbb::task_arena::priority::normal;\n}\n\ntemplate<typename... ArenaArgs>\ntbb::task_arena* do_allocate_and_construct( const ArenaArgs&... arena_args )\n{\n    const int dummy_max_concurrency = 4;\n    const int dummy_reserved_for_masters = 4;\n\n    enum initialization_methods {\n        lazy,\n        explicit_initialize,\n        explicit_initialize_with_different_constructor_parameters,\n        initialization_methods_num\n    };\n    static initialization_methods initialization_method = lazy;\n\n    tbb::task_arena* result_arena = nullptr;\n\n    switch( initialization_method ) {\n\n    case lazy:\n        result_arena = new tbb::task_arena( arena_args... );\n        break;\n\n    case explicit_initialize:\n        result_arena = new tbb::task_arena;\n        result_arena->initialize( arena_args... );\n        break;\n\n    case explicit_initialize_with_different_constructor_parameters:\n    {\n        tbb::task_arena tmp(dummy_max_concurrency, dummy_reserved_for_masters);\n        result_arena = new tbb::task_arena(tmp);\n        result_arena->initialize(arena_args...);\n        break;\n    }\n\n    default:\n        REQUIRE_MESSAGE( false, \"Not implemented method of initialization.\" );\n        break;\n    }\n\n    int next_value = (initialization_method + 1) % initialization_methods_num;\n    initialization_method = (initialization_methods)next_value;\n\n    return result_arena;\n}\n\ntemplate<typename FirstArenaArg>\ntbb::task_arena* decide_on_arguments(\n    const FirstArenaArg& first_arg, const int reserved_for_masters,\n    tbb::task_arena::priority a_priority )\n{\n    const tbb::task_arena::priority default_priority = tbb::task_arena::priority::normal;\n    static bool pass_default_priority_implicitly = false;\n    if( default_priority == a_priority ) {\n        pass_default_priority_implicitly = !pass_default_priority_implicitly;\n        if( pass_default_priority_implicitly )\n            return do_allocate_and_construct( first_arg, reserved_for_masters );\n    }\n    return do_allocate_and_construct( first_arg, reserved_for_masters, a_priority );\n}\n\n\ntbb::task_arena* allocate_and_construct_arena(\n    int arena_max_concurrency, tbb::task_arena::priority a_priority )\n{\n    const int reserved_for_masters = 0;\n\n    static bool use_constraints = false;\n    use_constraints = !use_constraints;\n\n    if( use_constraints ) {\n        tbb::task_arena::constraints properties{tbb::task_arena::automatic, arena_max_concurrency};\n        return decide_on_arguments( properties, reserved_for_masters, a_priority );\n    }\n\n    return decide_on_arguments( arena_max_concurrency, reserved_for_masters, a_priority );\n}\n\nvoid submit_work( std::vector<arena_info>& arenas, unsigned repeats, utils::SpinBarrier& barrier ) {\n    for( auto& item : arenas ) {\n        tbb::task_arena& arena = *std::get<arena_pointer>(item).get();\n        concurrency_type concurrency = std::get<arena_concurrency>(item);\n        tbb::task_arena::priority priority_value = std::get<arena_priority>(item);\n        auto& tg = std::get<associated_task_group>(item);\n\n        arena.execute(\n            [repeats, &barrier, &tg, priority_value, concurrency]() {\n                for( unsigned i = 0; i < repeats * concurrency; ++i ) {\n                    tg->run(\n                        [&barrier, priority_value](){\n                            while( !g_work_submitted.load(std::memory_order_acquire) )\n                                utils::yield();\n                            g_task_info[g_task_num++] = priority_value;\n                            barrier.wait();\n                        }\n                    );\n                }\n            } // arena work submission functor\n        );\n    }\n}\n\nvoid wait_work_completion(\n    std::vector<arena_info>& arenas, std::size_t max_num_threads, unsigned overall_tasks_num )\n{\n    if( max_num_threads > 1 )\n        while( g_task_num < overall_tasks_num )\n            utils::yield();\n\n    for( auto& item : arenas ) {\n        tbb::task_arena& arena = *std::get<arena_pointer>(item).get();\n        auto& tg = std::get<associated_task_group>(item);\n        arena.execute( [&tg]() { tg->wait(); } );\n    }\n    CHECK_MESSAGE(g_task_num == overall_tasks_num, \"Not all tasks were executed.\");\n}\n\nvoid test() {\n\n    const std::size_t max_num_threads = utils::get_platform_max_threads();\n\n    tbb::global_control control(tbb::global_control::max_allowed_parallelism, max_num_threads + 1);\n    concurrency_type signed_max_num_threads = static_cast<int>(max_num_threads);\n    if (1 == max_num_threads) {\n        // Skipping workerless case\n        return;\n    }\n\n    INFO( \"max_num_threads = \" << max_num_threads );\n    // TODO: iterate over threads to see that the work is going on in low priority arena.\n\n    const int min_arena_concurrency = 2; // implementation detail\n\n    tbb::task_arena::priority high   = tbb::task_arena::priority::high;\n    tbb::task_arena::priority normal = tbb::task_arena::priority::normal;\n    tbb::task_arena::priority low    = tbb::task_arena::priority::low;\n\n    // TODO: use vector or std::array of priorities instead of the c-style array.\n\n    // TODO: consider extending priorities to have more than three arenas.\n\n    tbb::task_arena::priority priorities[] = {high, normal, low}; // keep it sorted\n    const unsigned priorities_num = sizeof(priorities) / sizeof(priorities[0]);\n    const unsigned overall_arenas_num = priorities_num;\n\n    std::vector<arena_info> arenas;\n\n    std::vector<unsigned> progressing_arenas( overall_arenas_num, 0 );\n    std::iota( progressing_arenas.begin(), progressing_arenas.end(), 1 );\n\n    for( const auto& progressing_arenas_num : progressing_arenas ) {\n\n        INFO( \"progressing_arenas_num = \" << progressing_arenas_num );\n\n        // TODO: consider populating vector with arenas in separate function.\n        unsigned adjusted_progressing_arenas = progressing_arenas_num;\n\n        arenas.clear();\n        g_task_num = 0;\n\n        concurrency_type projected_concurrency =\n            (signed_max_num_threads + progressing_arenas_num - 1) / progressing_arenas_num;\n        projected_concurrency = std::max(min_arena_concurrency, projected_concurrency); // implementation detail\n        adjusted_progressing_arenas = signed_max_num_threads / projected_concurrency;\n\n        int threads_left = signed_max_num_threads;\n\n        // Instantiate arenas with necessary concurrency so that progressing arenas consume all\n        // available threads.\n        for( unsigned arena_idx = 0; arena_idx < overall_arenas_num; ++arena_idx ) {\n            tbb::task_arena::priority a_priority = priorities[arena_idx];\n\n            concurrency_type concurrency = projected_concurrency;\n            concurrency_type actual_concurrency = projected_concurrency;\n            if( threads_left < actual_concurrency ||\n                arena_idx == adjusted_progressing_arenas - 1 ) // give all remaining threads to last progressing arena\n            {\n                concurrency = actual_concurrency = threads_left;\n            }\n\n            threads_left -= actual_concurrency;\n\n            if( !actual_concurrency ) {\n                concurrency = tbb::task_arena::automatic;\n                actual_concurrency = signed_max_num_threads;\n            }\n            actual_concurrency = std::max( min_arena_concurrency, actual_concurrency ); // implementation detail\n\n            tbb::task_arena* arena = allocate_and_construct_arena(concurrency, a_priority);\n            arenas.push_back(\n                std::make_tuple(\n                    std::unique_ptr<tbb::task_arena>(arena),\n                    actual_concurrency,\n                    a_priority,\n                    std::unique_ptr<tbb::task_group>(new tbb::task_group)\n                )\n            );\n        }\n\n        std::rotate( arenas.begin(), arenas.begin() + progressing_arenas_num - 1, arenas.end() );\n\n        const unsigned repeats = 10;\n\n        unsigned overall_tasks_num = 0;\n        for( auto& item : arenas )\n            overall_tasks_num += std::get<arena_concurrency>(item) * repeats;\n\n        prepare_logging_data( g_task_info, overall_tasks_num );\n\n        g_work_submitted = false;\n\n        utils::SpinBarrier barrier{ max_num_threads };\n        submit_work( arenas, repeats, barrier );\n\n        g_work_submitted = true;\n\n        wait_work_completion( arenas, max_num_threads, overall_tasks_num );\n\n        std::map<tbb::task_arena::priority, unsigned> wasted_tasks;\n\n        tbb::task_arena::priority* end_ptr = priorities + adjusted_progressing_arenas;\n\n        {\n            // First epoch - check progressing arenas only\n            unsigned overall_progressing_arenas_tasks_num = 0;\n            std::map<tbb::task_arena::priority, unsigned> per_priority_tasks_num;\n\n            // Due to indeterministic submission of tasks in the beginning, count tasks priorities up\n            // to additional epoch. Assume threads are rebalanced once the work is submitted.\n            unsigned last_task_idx = std::min((repeats + 1) * unsigned(max_num_threads), overall_tasks_num);\n            for( unsigned i = 0; i < last_task_idx; ++i ) {\n                tbb::task_arena::priority p = g_task_info[i];\n                ++per_priority_tasks_num[p];\n\n                overall_progressing_arenas_tasks_num += (int)(\n                    end_ptr != std::find(priorities, end_ptr, p)\n                );\n\n                if( i < max_num_threads || i >= repeats * max_num_threads )\n                    ++wasted_tasks[p];\n            }\n\n            unsigned expected_overall_progressing_arenas_tasks_num = 0;\n            for( unsigned i = 0; i < adjusted_progressing_arenas; ++i ) {\n                tbb::task_arena::priority p = priorities[i];\n                concurrency_type concurrency = 0;\n                for( auto& item : arenas ) {\n                    if( std::get<arena_priority>(item) == p ) {\n                        concurrency = std::get<arena_concurrency>(item);\n                        break;\n                    }\n                }\n                unsigned expected_tasks_num = repeats * concurrency;\n\n                CHECK_MESSAGE( expected_tasks_num == per_priority_tasks_num[p],\n                               \"Unexpected number of executed tasks in arena with index \" << i << \" and concurrency = \" << concurrency ) ;\n\n                expected_overall_progressing_arenas_tasks_num += expected_tasks_num;\n            }\n            CHECK_MESSAGE(\n                expected_overall_progressing_arenas_tasks_num == overall_progressing_arenas_tasks_num,\n                \"Number of tasks for progressing arenas mismatched.\"\n            );\n        }\n        {\n            // Other epochs - check remaining arenas\n            std::map<tbb::task_arena::priority, unsigned> per_priority_tasks_num;\n\n            std::size_t lower_priority_start = (repeats + 1) * max_num_threads;\n            for( std::size_t i = lower_priority_start; i < overall_tasks_num; ++i )\n                ++per_priority_tasks_num[ g_task_info[i] ];\n\n            for( auto& e : per_priority_tasks_num ) {\n                auto priority = e.first;\n                auto tasks_num = e.second;\n\n                auto priorities_it = std::find( end_ptr, priorities + priorities_num, priority );\n                CHECK_MESSAGE( priorities_it != priorities + priorities_num,\n                               \"Tasks from prioritized arena got deferred.\" );\n\n                auto it = std::find_if(\n                    arenas.begin(), arenas.end(),\n                    [priority](arena_info& info) {\n                        return std::get<arena_priority>(info) == priority;\n                    }\n                );\n                auto per_arena_tasks_num = repeats * std::get<arena_concurrency>(*it);\n                CHECK_MESSAGE(\n                    tasks_num == per_arena_tasks_num - wasted_tasks[priority],\n                    \"Incorrect number of tasks from deferred (non-progressing) arenas were executed.\"\n                );\n            }\n        } // Other epochs\n    } // loop over simultaneously progressing arenas\n\n    INFO( \"Done\\n\" );\n}\n\n} // namespace HighPriorityArenasTakeExecutionPrecedence\n\n\n// TODO: nested arena case\n//! Test for setting a priority to arena\n//! \\brief \\ref requirement\nTEST_CASE(\"Arena priorities\") {\n    HighPriorityArenasTakeExecutionPrecedence::test();\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_async_node.cpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"common/config.h\"\n\n#include \"tbb/flow_graph.h\"\n\n#include \"tbb/task.h\"\n#include \"tbb/global_control.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_assert.h\"\n#include \"common/graph_utils.h\"\n#include \"common/spin_barrier.h\"\n#include \"common/test_follows_and_precedes_api.h\"\n#include \"common/concepts_common.h\"\n\n#include <string>\n#include <thread>\n#include <mutex>\n\n\n//! \\file test_async_node.cpp\n//! \\brief Test for [flow_graph.async_node] specification\n\n\nclass minimal_type {\n    template<typename T>\n    friend struct place_wrapper;\n\n    int value;\n\npublic:\n    minimal_type() : value(-1) {}\n    minimal_type(int v) : value(v) {}\n    minimal_type(const minimal_type &m) : value(m.value) { }\n    minimal_type &operator=(const minimal_type &m) { value = m.value; return *this; }\n};\n\ntemplate <typename T>\nstruct place_wrapper {\n    typedef T wrapped_type;\n    T value;\n    std::thread::id thread_id;\n\n    place_wrapper( int v = 0 ) : value(v), thread_id(std::this_thread::get_id()) {}\n\n    template <typename Q>\n    place_wrapper(const place_wrapper<Q>& v)\n        : value(v.value), thread_id(v.thread_id)\n    {}\n\n    template <typename Q>\n    place_wrapper<Q>& operator=(const place_wrapper<Q>& v) {\n        if (this != &v) {\n            value = v.value;\n            thread_id = v.thread_id;\n        }\n        return *this;\n    }\n\n};\n\ntemplate<typename T1, typename T2>\nstruct wrapper_helper {\n    static void check(const T1 &, const T2 &) { }\n    static void copy_value(const T1 &in, T2 &out) { out = in; }\n};\n\ntemplate<typename T1, typename T2>\nstruct wrapper_helper< place_wrapper<T1>, place_wrapper<T2> > {\n    static void check(const place_wrapper<T1> &a, const place_wrapper<T2> &b) {\n       CHECK_MESSAGE( ( (a.thread_id != b.thread_id)), \"same thread used to execute adjacent nodes\");\n       return;\n    }\n    static void copy_value(const place_wrapper<T1> &in, place_wrapper<T2> &out) {\n        out.value = in.value;\n    }\n};\n\nconst int NUMBER_OF_MSGS = 10;\nconst int UNKNOWN_NUMBER_OF_ITEMS = -1;\nstd::atomic<int> async_body_exec_count;\nstd::atomic<int> async_activity_processed_msg_count;\nstd::atomic<int> end_body_exec_count;\n\n// queueing required in test_reset for testing of cancellation\ntypedef tbb::flow::async_node< int, int, tbb::flow::queueing > counting_async_node_type;\ntypedef counting_async_node_type::gateway_type counting_gateway_type;\n\nstruct counting_async_unlimited_body {\n\n    counting_async_unlimited_body(tbb::task_group_context& graph_tgc) : my_tgc( graph_tgc ) {}\n\n    void operator()( const int &input, counting_gateway_type& gateway) {\n        // TODO revamp: reconsider logging for the tests. It is known that frequent calls to\n        // doctest's INFO cause issues.\n\n        // INFO( \"Body execution with input == \" << input << \"\\n\");\n        ++async_body_exec_count;\n        if ( input == -1 ) {\n            bool result = my_tgc.cancel_group_execution();\n            // INFO( \"Canceling graph execution\\n\" );\n            CHECK_MESSAGE( ( result == true), \"attempted to cancel graph twice\" );\n            utils::Sleep(50);\n        }\n        gateway.try_put(input);\n    }\nprivate:\n    tbb::task_group_context& my_tgc;\n};\n\nstruct counting_async_serial_body : counting_async_unlimited_body {\n    typedef counting_async_unlimited_body base_type;\n    int my_async_body_exec_count;\n\n    counting_async_serial_body(tbb::task_group_context& tgc)\n        : base_type(tgc), my_async_body_exec_count( 0 ) { }\n\n    void operator()( const int &input, counting_gateway_type& gateway ) {\n        ++my_async_body_exec_count;\n        base_type::operator()( input, gateway );\n    }\n};\n\nvoid test_reset() {\n    const int N = NUMBER_OF_MSGS;\n    async_body_exec_count = 0;\n\n    tbb::task_group_context graph_ctx;\n    tbb::flow::graph g(graph_ctx);\n    counting_async_node_type a(g, tbb::flow::serial, counting_async_serial_body(graph_ctx) );\n\n    const int R = 3;\n    std::vector< std::shared_ptr<harness_counting_receiver<int>> > r;\n    for (size_t i = 0; i < R; ++i) {\n        r.push_back( std::make_shared<harness_counting_receiver<int>>(g) );\n    }\n\n    for (int i = 0; i < R; ++i) {\n        tbb::flow::make_edge(a, *r[i]);\n    }\n\n    INFO( \"One body execution\\n\" );\n    a.try_put(-1);\n    for (int i = 0; i < N; ++i) {\n       a.try_put(i);\n    }\n    g.wait_for_all();\n    // should be canceled with only 1 item reaching the async_body and the counting receivers\n    // and N items left in the node's queue\n    CHECK_MESSAGE( ( g.is_cancelled() == true), \"task group not canceled\" );\n\n    counting_async_serial_body b1 = tbb::flow::copy_body<counting_async_serial_body>(a);\n    CHECK_MESSAGE( ( int(async_body_exec_count) == int(b1.my_async_body_exec_count)), \"body and global body counts are different\" );\n    CHECK_MESSAGE( ( int(async_body_exec_count) == 1), \"global body execution count not 1\"  );\n    for (int i = 0; i < R; ++i) {\n        CHECK_MESSAGE( ( int(r[i]->my_count) == 1), \"counting receiver count not 1\" );\n    }\n\n    // should clear the async_node queue, but retain its local count at 1 and keep all edges\n    g.reset(tbb::flow::rf_reset_protocol);\n\n    INFO( \"N body executions\\n\" );\n    for (int i = 0; i < N; ++i) {\n       a.try_put(i);\n    }\n    g.wait_for_all();\n    CHECK_MESSAGE( ( g.is_cancelled() == false), \"task group not canceled\" );\n\n    // a total of N+1 items should have passed through the node body\n    // the local body count should also be N+1\n    // and the counting receivers should all have a count of N+1\n    counting_async_serial_body b2 = tbb::flow::copy_body<counting_async_serial_body>(a);\n    CHECK_MESSAGE( int(async_body_exec_count) == int(b2.my_async_body_exec_count),\n                   \"local and global body execution counts are different\" );\n    INFO( \"async_body_exec_count==\" << int(async_body_exec_count) << \"\\n\" );\n    CHECK_MESSAGE( ( int(async_body_exec_count) == N+1), \"global body execution count not N+1\"  );\n    for (int i = 0; i < R; ++i) {\n        CHECK_MESSAGE( ( int(r[i]->my_count) == N+1), \"counting receiver has not received N+1 items\" );\n    }\n\n    INFO( \"N body executions with new bodies\\n\" );\n    // should clear the async_node queue and reset its local count to 0, but keep all edges\n    g.reset(tbb::flow::rf_reset_bodies);\n    for (int i = 0; i < N; ++i) {\n       a.try_put(i);\n    }\n    g.wait_for_all();\n    CHECK_MESSAGE( ( g.is_cancelled() == false), \"task group not canceled\" );\n\n    // a total of 2N+1 items should have passed through the node body\n    // the local body count should be N\n    // and the counting receivers should all have a count of 2N+1\n    counting_async_serial_body b3 = tbb::flow::copy_body<counting_async_serial_body>(a);\n    CHECK_MESSAGE( ( int(async_body_exec_count) == 2*N+1), \"global body execution count not 2N+1\"  );\n    CHECK_MESSAGE( ( int(b3.my_async_body_exec_count) == N), \"local body execution count not N\"  );\n    for (int i = 0; i < R; ++i) {\n        CHECK_MESSAGE( ( int(r[i]->my_count) == 2*N+1), \"counting receiver has not received 2N+1 items\" );\n    }\n\n    // should clear the async_node queue and keep its local count at N and remove all edges\n    INFO( \"N body executions with no edges\\n\" );\n    g.reset(tbb::flow::rf_clear_edges);\n    for (int i = 0; i < N; ++i) {\n       a.try_put(i);\n    }\n    g.wait_for_all();\n    CHECK_MESSAGE( ( g.is_cancelled() == false), \"task group not canceled\" );\n\n    // a total of 3N+1 items should have passed through the node body\n    // the local body count should now be 2*N\n    // and the counting receivers should remain at a count of 2N+1\n    counting_async_serial_body b4 = tbb::flow::copy_body<counting_async_serial_body>(a);\n    CHECK_MESSAGE( ( int(async_body_exec_count) == 3*N+1), \"global body execution count not 3N+1\"  );\n    CHECK_MESSAGE( ( int(b4.my_async_body_exec_count) == 2*N), \"local body execution count not 2N\"  );\n    for (int i = 0; i < R; ++i) {\n        CHECK_MESSAGE( ( int(r[i]->my_count) == 2*N+1), \"counting receiver has not received 2N+1 items\" );\n    }\n\n    // put back 1 edge to receiver 0\n    INFO( \"N body executions with 1 edge\\n\" );\n    tbb::flow::make_edge(a, *r[0]);\n    for (int i = 0; i < N; ++i) {\n       a.try_put(i);\n    }\n    g.wait_for_all();\n    CHECK_MESSAGE( ( g.is_cancelled() == false), \"task group not canceled\" );\n\n    // a total of 4N+1 items should have passed through the node body\n    // the local body count should now be 3*N\n    // and all of the counting receivers should remain at a count of 2N+1, except r[0] which should be 3N+1\n    counting_async_serial_body b5 = tbb::flow::copy_body<counting_async_serial_body>(a);\n    CHECK_MESSAGE( ( int(async_body_exec_count) == 4*N+1), \"global body execution count not 4N+1\"  );\n    CHECK_MESSAGE( ( int(b5.my_async_body_exec_count) == 3*N), \"local body execution count not 3N\"  );\n    CHECK_MESSAGE( ( int(r[0]->my_count) == 3*N+1), \"counting receiver has not received 3N+1 items\" );\n    for (int i = 1; i < R; ++i) {\n        CHECK_MESSAGE( ( int(r[i]->my_count) == 2*N+1), \"counting receiver has not received 2N+1 items\" );\n    }\n\n    // should clear the async_node queue and keep its local count at N and remove all edges\n    INFO( \"N body executions with no edges and new body\\n\" );\n    g.reset(static_cast<tbb::flow::reset_flags>(tbb::flow::rf_reset_bodies|tbb::flow::rf_clear_edges));\n    for (int i = 0; i < N; ++i) {\n       a.try_put(i);\n    }\n    g.wait_for_all();\n    CHECK_MESSAGE( ( g.is_cancelled() == false), \"task group not canceled\" );\n\n    // a total of 4N+1 items should have passed through the node body\n    // the local body count should now be 3*N\n    // and all of the counting receivers should remain at a count of 2N+1, except r[0] which should be 3N+1\n    counting_async_serial_body b6 = tbb::flow::copy_body<counting_async_serial_body>(a);\n    CHECK_MESSAGE( ( int(async_body_exec_count) == 5*N+1), \"global body execution count not 5N+1\"  );\n    CHECK_MESSAGE( ( int(b6.my_async_body_exec_count) == N), \"local body execution count not N\"  );\n    CHECK_MESSAGE( ( int(r[0]->my_count) == 3*N+1), \"counting receiver has not received 3N+1 items\" );\n    for (int i = 1; i < R; ++i) {\n        CHECK_MESSAGE( ( int(r[i]->my_count) == 2*N+1), \"counting receiver has not received 2N+1 items\" );\n    }\n}\n\n\n#include <mutex>\n\ntemplate <typename T>\nclass async_activity_queue {\npublic:\n    void push( const T& item ) {\n        std::lock_guard<mutex_t> lock( m_mutex );\n        m_queue.push( item );\n    }\n\n    bool try_pop( T& item ) {\n        std::lock_guard<mutex_t> lock( m_mutex );\n        if( m_queue.empty() )\n            return false;\n        item = m_queue.front();\n        m_queue.pop();\n        return true;\n    }\n\n    bool empty() {\n        std::lock_guard<mutex_t> lock( m_mutex );\n        return m_queue.empty();\n    }\n\nprivate:\n    typedef std::mutex mutex_t;\n    mutex_t m_mutex;\n    std::queue<T> m_queue;\n};\n\ntemplate< typename Input, typename Output >\nclass async_activity : utils::NoAssign {\npublic:\n    typedef Input input_type;\n    typedef Output output_type;\n    typedef tbb::flow::async_node< input_type, output_type > async_node_type;\n    typedef typename async_node_type::gateway_type gateway_type;\n\n    struct work_type {\n        input_type input;\n        gateway_type* gateway;\n    };\n\n    class ServiceThreadBody {\n    public:\n        ServiceThreadBody( async_activity* activity ) : my_activity( activity ) {}\n        void operator()() { my_activity->process(); }\n    private:\n        async_activity* my_activity;\n    };\n\n    async_activity(int expected_items, bool deferred = false, int sleep_time = 50)\n        : my_expected_items(expected_items), my_sleep_time(sleep_time)\n    {\n        is_active = !deferred;\n        my_quit = false;\n        std::thread( ServiceThreadBody( this ) ).swap( my_service_thread );\n    }\n\nprivate:\n\n    async_activity( const async_activity& )\n        : my_expected_items(UNKNOWN_NUMBER_OF_ITEMS), my_sleep_time(0)\n    {\n        is_active = true;\n    }\n\npublic:\n    ~async_activity() {\n        stop();\n        my_service_thread.join();\n    }\n\n    void submit( const input_type &input, gateway_type& gateway ) {\n        work_type work = {input, &gateway};\n        my_work_queue.push( work );\n    }\n\n    void process() {\n        do {\n            work_type work;\n            if( is_active && my_work_queue.try_pop( work ) ) {\n                utils::Sleep(my_sleep_time);\n                ++async_activity_processed_msg_count;\n                output_type output;\n                wrapper_helper<output_type, output_type>::copy_value(work.input, output);\n                wrapper_helper<output_type, output_type>::check(work.input, output);\n                work.gateway->try_put(output);\n                if ( my_expected_items == UNKNOWN_NUMBER_OF_ITEMS ||\n                     int(async_activity_processed_msg_count) == my_expected_items ) {\n                    work.gateway->release_wait();\n                }\n            }\n        } while( my_quit == false || !my_work_queue.empty());\n    }\n\n    void stop() {\n        my_quit = true;\n    }\n\n    void activate() {\n        is_active = true;\n    }\n\n    bool should_reserve_each_time() {\n        if ( my_expected_items == UNKNOWN_NUMBER_OF_ITEMS )\n            return true;\n        else\n            return false;\n    }\n\nprivate:\n\n    const int my_expected_items;\n    const int my_sleep_time;\n    std::atomic< bool > is_active;\n\n    async_activity_queue<work_type> my_work_queue;\n\n    std::atomic< bool > my_quit;\n\n    std::thread my_service_thread;\n};\n\ntemplate<typename Input, typename Output>\nstruct basic_test {\n    typedef Input input_type;\n    typedef Output output_type;\n    typedef tbb::flow::async_node< input_type, output_type > async_node_type;\n    typedef typename async_node_type::gateway_type gateway_type;\n\n    basic_test() {}\n\n    static int run(int async_expected_items = UNKNOWN_NUMBER_OF_ITEMS) {\n        async_activity<input_type, output_type> my_async_activity(async_expected_items);\n\n        tbb::flow::graph g;\n\n        tbb::flow::function_node< int, input_type > start_node(\n            g, tbb::flow::unlimited, [](int input) { return input_type(input); }\n        );\n        async_node_type offload_node(\n            g, tbb::flow::unlimited,\n            [&] (const input_type &input, gateway_type& gateway) {\n                ++async_body_exec_count;\n                if(my_async_activity.should_reserve_each_time())\n                    gateway.reserve_wait();\n                my_async_activity.submit(input, gateway);\n            }\n        );\n        tbb::flow::function_node< output_type > end_node(\n            g, tbb::flow::unlimited,\n            [&](const output_type& input) {\n                ++end_body_exec_count;\n                output_type output;\n                wrapper_helper<output_type, output_type>::check(input, output);\n            }\n        );\n\n        tbb::flow::make_edge( start_node, offload_node );\n        tbb::flow::make_edge( offload_node, end_node );\n\n        async_body_exec_count = 0;\n        async_activity_processed_msg_count = 0;\n        end_body_exec_count = 0;\n\n        if (async_expected_items != UNKNOWN_NUMBER_OF_ITEMS) {\n            offload_node.gateway().reserve_wait();\n        }\n        for (int i = 0; i < NUMBER_OF_MSGS; ++i) {\n            start_node.try_put(i);\n        }\n        g.wait_for_all();\n        CHECK_MESSAGE( ( async_body_exec_count == NUMBER_OF_MSGS), \"AsyncBody processed wrong number of signals\" );\n        CHECK_MESSAGE( ( async_activity_processed_msg_count == NUMBER_OF_MSGS), \"AsyncActivity processed wrong number of signals\" );\n        CHECK_MESSAGE( ( end_body_exec_count == NUMBER_OF_MSGS), \"EndBody processed wrong number of signals\");\n        INFO( \"async_body_exec_count == \" << int(async_body_exec_count) <<\n              \" == async_activity_processed_msg_count == \" << int(async_activity_processed_msg_count) <<\n              \" == end_body_exec_count == \" << int(end_body_exec_count) << \"\\n\"\n        );\n        return 0;\n    }\n\n};\n\nint test_copy_ctor() {\n    const int N = NUMBER_OF_MSGS;\n    async_body_exec_count = 0;\n\n    tbb::flow::graph g;\n\n    harness_counting_receiver<int> r1(g);\n    harness_counting_receiver<int> r2(g);\n\n    tbb::task_group_context graph_ctx;\n    counting_async_node_type a(g, tbb::flow::unlimited, counting_async_unlimited_body(graph_ctx) );\n    counting_async_node_type b(a);\n\n    tbb::flow::make_edge(a, r1);                             // C++11-style of making edges\n    tbb::flow::make_edge(tbb::flow::output_port<0>(b), r2);  // usual way of making edges\n\n    for (int i = 0; i < N; ++i) {\n       a.try_put(i);\n    }\n    g.wait_for_all();\n\n    INFO(\"async_body_exec_count = \" << int(async_body_exec_count) << \"\\n\" );\n    INFO(\"r1.my_count == \" << int(r1.my_count) << \" and r2.my_count = \" << int(r2.my_count) << \"\\n\" );\n    CHECK_MESSAGE( ( int(async_body_exec_count) == NUMBER_OF_MSGS), \"AsyncBody processed wrong number of signals\" );\n    CHECK_MESSAGE( ( int(r1.my_count) == N), \"counting receiver r1 has not received N items\" );\n    CHECK_MESSAGE( ( int(r2.my_count) == 0), \"counting receiver r2 has not received 0 items\" );\n\n    for (int i = 0; i < N; ++i) {\n       b.try_put(i);\n    }\n    g.wait_for_all();\n\n    INFO(\"async_body_exec_count = \" << int(async_body_exec_count) << \"\\n\" );\n    INFO(\"r1.my_count == \" << int(r1.my_count) << \" and r2.my_count = \" << int(r2.my_count) << \"\\n\" );\n    CHECK_MESSAGE( ( int(async_body_exec_count) == 2*NUMBER_OF_MSGS), \"AsyncBody processed wrong number of signals\" );\n    CHECK_MESSAGE( ( int(r1.my_count) == N), \"counting receiver r1 has not received N items\" );\n    CHECK_MESSAGE( ( int(r2.my_count) == N), \"counting receiver r2 has not received N items\" );\n    return 0;\n}\n\nstd::atomic<int> main_tid_count;\n\ntemplate<typename Input, typename Output>\nstruct spin_test {\n    typedef Input input_type;\n    typedef Output output_type;\n    typedef tbb::flow::async_node< input_type, output_type > async_node_type;\n    typedef typename async_node_type::gateway_type gateway_type;\n\n    class end_body_type {\n        typedef Output output_type;\n        std::thread::id my_main_tid;\n        utils::SpinBarrier *my_barrier;\n    public:\n        end_body_type(std::thread::id t, utils::SpinBarrier &b) : my_main_tid(t), my_barrier(&b) { }\n\n        void operator()( const output_type & ) {\n            ++end_body_exec_count;\n            if (std::this_thread::get_id() == my_main_tid) {\n               ++main_tid_count;\n            }\n            my_barrier->wait();\n        }\n    };\n\n    spin_test() {}\n\n    static int run(int nthreads, int async_expected_items = UNKNOWN_NUMBER_OF_ITEMS) {\n        async_activity<input_type, output_type> my_async_activity(async_expected_items, false, 0);\n        const int overall_message_count = nthreads * NUMBER_OF_MSGS;\n        utils::SpinBarrier spin_barrier(nthreads);\n\n        tbb::flow::graph g;\n        tbb::flow::function_node<int, input_type> start_node(\n            g, tbb::flow::unlimited, [](int input) { return input_type(input); }\n        );\n        async_node_type offload_node(\n            g, tbb::flow::unlimited,\n            [&](const input_type &input, gateway_type& gateway) {\n                ++async_body_exec_count;\n                if(my_async_activity.should_reserve_each_time())\n                    gateway.reserve_wait();\n                my_async_activity.submit(input, gateway);\n            }\n        );\n        tbb::flow::function_node<output_type> end_node(\n            g, tbb::flow::unlimited, end_body_type(std::this_thread::get_id(), spin_barrier)\n        );\n\n        tbb::flow::make_edge( start_node, offload_node );\n        tbb::flow::make_edge( offload_node, end_node );\n\n        async_body_exec_count = 0;\n        async_activity_processed_msg_count = 0;\n        end_body_exec_count = 0;\n        main_tid_count = 0;\n\n        if (async_expected_items != UNKNOWN_NUMBER_OF_ITEMS ) {\n            offload_node.gateway().reserve_wait();\n        }\n        for (int i = 0; i < overall_message_count; ++i) {\n            start_node.try_put(i);\n        }\n        g.wait_for_all();\n        CHECK_MESSAGE( (async_body_exec_count == overall_message_count),\n                       \"AsyncBody processed wrong number of signals\" );\n        CHECK_MESSAGE( (async_activity_processed_msg_count == overall_message_count),\n                       \"AsyncActivity processed wrong number of signals\" );\n        CHECK_MESSAGE( (end_body_exec_count == overall_message_count),\n                       \"EndBody processed wrong number of signals\");\n\n        INFO( \"Main thread participated in \" << main_tid_count << \" end_body tasks\\n\");\n\n        INFO(\"async_body_exec_count == \" << int(async_body_exec_count) <<\n             \" == async_activity_processed_msg_count == \" << int(async_activity_processed_msg_count) <<\n             \" == end_body_exec_count == \" << int(end_body_exec_count) << \"\\n\"\n        );\n        return 0;\n    }\n\n};\n\nvoid test_for_spin_avoidance() {\n    const int nthreads = 4;\n    tbb::global_control gc(tbb::global_control::max_allowed_parallelism, nthreads);\n    tbb::task_arena a(nthreads);\n    a.execute([&] {\n        spin_test<int, int>::run(nthreads);\n    });\n}\n\ntemplate< typename Input, typename Output >\nint run_tests() {\n    basic_test<Input, Output>::run();\n    basic_test<Input, Output>::run(NUMBER_OF_MSGS);\n    basic_test<place_wrapper<Input>, place_wrapper<Output> >::run();\n    basic_test<place_wrapper<Input>, place_wrapper<Output> >::run(NUMBER_OF_MSGS);\n    return 0;\n}\n\n#include \"tbb/parallel_for.h\"\ntemplate<typename Input, typename Output>\nclass enqueueing_on_inner_level {\n    typedef Input input_type;\n    typedef Output output_type;\n    typedef async_activity<input_type, output_type> async_activity_type;\n    typedef tbb::flow::async_node<Input, Output> async_node_type;\n    typedef typename async_node_type::gateway_type gateway_type;\n\n    class body_graph_with_async {\n    public:\n        body_graph_with_async( utils::SpinBarrier& barrier, async_activity_type& activity )\n            : spin_barrier(&barrier), my_async_activity(&activity) {}\n\n        void operator()(int) const {\n            tbb::flow::graph g;\n            tbb::flow::function_node< int, input_type > start_node(\n                g, tbb::flow::unlimited, [](int input) { return input_type(input); }\n            );\n            async_node_type offload_node(\n                g, tbb::flow::unlimited,\n                [&](const input_type &input, gateway_type& gateway) {\n                    gateway.reserve_wait();\n                    my_async_activity->submit( input, gateway );\n                }\n            );\n            tbb::flow::function_node< output_type > end_node( g, tbb::flow::unlimited, [](output_type){} );\n\n            tbb::flow::make_edge( start_node, offload_node );\n            tbb::flow::make_edge( offload_node, end_node );\n\n            start_node.try_put(1);\n\n            spin_barrier->wait();\n\n            my_async_activity->activate();\n\n            g.wait_for_all();\n        }\n\n    private:\n        utils::SpinBarrier* spin_barrier;\n        async_activity_type* my_async_activity;\n    };\n\npublic:\n    static int run ()\n    {\n        const int nthreads = tbb::this_task_arena::max_concurrency();\n        utils::SpinBarrier spin_barrier( nthreads );\n\n        async_activity_type my_async_activity( UNKNOWN_NUMBER_OF_ITEMS, true );\n\n        tbb::parallel_for( 0, nthreads, body_graph_with_async( spin_barrier, my_async_activity ) );\n        return 0;\n    }\n};\n\nint run_test_enqueueing_on_inner_level() {\n    enqueueing_on_inner_level<int, int>::run();\n    return 0;\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n#include <array>\n\ntemplate<typename NodeType>\nclass AsyncActivity {\npublic:\n    using gateway_t = typename NodeType::gateway_type;\n\n    struct work_type {\n        int input;\n        gateway_t* gateway;\n    };\n\n    AsyncActivity(size_t limit) : stop_limit(limit), c(0), thr([this]() {\n        while(!end_of_work()) {\n            work_type w;\n            while( my_q.try_pop(w) ) {\n                int res = do_work(w.input);\n                w.gateway->try_put(res);\n                w.gateway->release_wait();\n                ++c;\n            }\n        }\n    }) {}\n\n    void submit(int i, gateway_t* gateway) {\n        work_type w = {i, gateway};\n        gateway->reserve_wait();\n        my_q.push(w);\n    }\n\n    void wait_for_all() { thr.join(); }\n\nprivate:\n    bool end_of_work() { return c >= stop_limit; }\n\n    int do_work(int& i) { return i + i; }\n\n    async_activity_queue<work_type> my_q;\n    size_t stop_limit;\n    size_t c;\n    std::thread thr;\n};\n\nvoid test_follows() {\n    using namespace tbb::flow;\n\n    using input_t = int;\n    using output_t = int;\n    using node_t = async_node<input_t, output_t>;\n\n    graph g;\n\n    AsyncActivity<node_t> async_activity(3);\n\n    std::array<broadcast_node<input_t>, 3> preds = {\n      {\n        broadcast_node<input_t>(g),\n        broadcast_node<input_t>(g),\n        broadcast_node<input_t>(g)\n      }\n    };\n\n    node_t node(follows(preds[0], preds[1], preds[2]), unlimited, [&](int input, node_t::gateway_type& gtw) {\n        async_activity.submit(input, &gtw);\n    }, no_priority);\n\n    buffer_node<output_t> buf(g);\n    make_edge(node, buf);\n\n    for(auto& pred: preds) {\n        pred.try_put(1);\n    }\n\n    g.wait_for_all();\n    async_activity.wait_for_all();\n\n    output_t storage;\n    CHECK_MESSAGE((buf.try_get(storage) && buf.try_get(storage) && buf.try_get(storage) && !buf.try_get(storage)),\n                  \"Not exact edge quantity was made\");\n}\n\nvoid test_precedes() {\n    using namespace tbb::flow;\n\n    using input_t = int;\n    using output_t = int;\n    using node_t = async_node<input_t, output_t>;\n\n    graph g;\n\n    AsyncActivity<node_t> async_activity(1);\n\n    std::array<buffer_node<input_t>, 1> successors = { {buffer_node<input_t>(g)} };\n\n    broadcast_node<input_t> start(g);\n\n    node_t node(precedes(successors[0]), unlimited, [&](int input, node_t::gateway_type& gtw) {\n        async_activity.submit(input, &gtw);\n    }, no_priority);\n\n    make_edge(start, node);\n\n    start.try_put(1);\n\n    g.wait_for_all();\n    async_activity.wait_for_all();\n\n    for(auto& successor : successors) {\n        output_t storage;\n        CHECK_MESSAGE((successor.try_get(storage) && !successor.try_get(storage)),\n                      \"Not exact edge quantity was made\");\n    }\n}\n\nvoid test_follows_and_precedes_api() {\n    test_follows();\n    test_precedes();\n}\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n\n//! Test async bodies processing\n//! \\brief \\ref requirement \\ref error_guessing\nTEST_CASE(\"Basic tests\"){\n    tbb::task_arena arena(utils::MaxThread);\n    arena.execute(\n        [&]() {\n            run_tests<int, int>();\n            run_tests<minimal_type, minimal_type>();\n            run_tests<int, minimal_type>();\n        }\n    );\n}\n\n//! NativeParallelFor test with various concurrency settings\n//! \\brief \\ref requirement \\ref error_guessing\nTEST_CASE(\"Lightweight tests\"){\n    lightweight_testing::test<tbb::flow::async_node>(NUMBER_OF_MSGS);\n}\n\n//! Test reset and cancellation\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Reset test\"){\n    test_reset();\n}\n\n//! Test\n//! \\brief \\ref requirement \\ref error_guessing\nTEST_CASE(\"Copy constructor test\"){\n    test_copy_ctor();\n}\n\n//! Test if main thread spins\n//! \\brief \\ref stress\nTEST_CASE(\"Spin avoidance test\"){\n    test_for_spin_avoidance();\n}\n\n//! Test nested enqueuing\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Inner enqueuing test\"){\n    run_test_enqueueing_on_inner_level();\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n//! Test deprecated follows and precedes API\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test follows and precedes API\"){\n    test_follows_and_precedes_api();\n}\n#endif\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"constraints for async_node input\") {\n    struct InputObject {\n        InputObject() = default;\n        InputObject( const InputObject& ) = default;\n    };\n\n    static_assert(utils::well_formed_instantiation<tbb::flow::async_node, InputObject, int>);\n    static_assert(utils::well_formed_instantiation<tbb::flow::async_node, int, int>);\n    static_assert(!utils::well_formed_instantiation<tbb::flow::async_node, test_concepts::NonCopyable, int>);\n    static_assert(!utils::well_formed_instantiation<tbb::flow::async_node, test_concepts::NonDefaultInitializable, int>);\n}\n\ntemplate <typename Input, typename Output, typename Body>\nconcept can_call_async_node_ctor = requires( tbb::flow::graph& graph, std::size_t concurrency,\n                                             Body body, tbb::flow::node_priority_t priority, tbb::flow::buffer_node<int>& f ) {\n    tbb::flow::async_node<Input, Output>(graph, concurrency, body);\n    tbb::flow::async_node<Input, Output>(graph, concurrency, body, priority);\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    tbb::flow::async_node<Input, Output>(tbb::flow::follows(f), concurrency, body);\n    tbb::flow::async_node<Input, Output>(tbb::flow::follows(f), concurrency, body, priority);\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n};\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"constraints for async_node body\") {\n    using input_type = int;\n    using output_type = input_type;\n    using namespace test_concepts::async_node_body;\n\n    static_assert(can_call_async_node_ctor<input_type, output_type, Correct<input_type, output_type>>);\n    static_assert(!can_call_async_node_ctor<input_type, output_type, NonCopyable<input_type, output_type>>);\n    static_assert(!can_call_async_node_ctor<input_type, output_type, NonDestructible<input_type, output_type>>);\n    static_assert(!can_call_async_node_ctor<input_type, output_type, NoOperatorRoundBrackets<input_type, output_type>>);\n    static_assert(!can_call_async_node_ctor<input_type, output_type, WrongFirstInputOperatorRoundBrackets<input_type, output_type>>);\n    static_assert(!can_call_async_node_ctor<input_type, output_type, WrongSecondInputOperatorRoundBrackets<input_type, output_type>>);\n}\n\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_blocked_range.cpp",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_report.h\"\n#include \"common/range_based_for_support.h\"\n#include \"common/config.h\"\n#include \"common/concepts_common.h\"\n\n#include \"tbb/blocked_range.h\"\n#include \"tbb/blocked_range2d.h\"\n#include \"tbb/blocked_range3d.h\"\n#include \"tbb/blocked_nd_range.h\"\n\n//! \\file test_blocked_range.cpp\n//! \\brief Test for [algorithms.blocked_range algorithms.blocked_range2d algorithms.blocked_range3d algorithms.blocked_nd_range] specification\n\n#include <utility> //for std::pair\n#include <functional>\n#include <vector>\n\n//! Testing blocked_range with range based for\n//! \\brief \\ref interface\nTEST_CASE(\"Range based for\") {\n    using namespace range_based_for_support_tests;\n\n    const std::size_t sequence_length = 100;\n    std::size_t int_array[sequence_length] = {0};\n\n    for (std::size_t i = 0; i < sequence_length; ++i) {\n        int_array[i] = i + 1;\n    }\n    const tbb::blocked_range<std::size_t*> r(int_array, int_array + sequence_length, 1);\n\n    CHECK_MESSAGE(range_based_for_accumulate<std::size_t>(r, std::plus<std::size_t>(), std::size_t(0))\n            == gauss_summ_of_int_sequence(sequence_length), \"incorrect accumulated value generated via range based for ?\");\n}\n\n//! Proportional split does not overflow with blocked range\n//! \\brief \\ref error_guessing \\ref boundary\nTEST_CASE(\"Proportional split overflow\") {\n    using tbb::blocked_range;\n    using tbb::proportional_split;\n\n    blocked_range<std::size_t> r1(0, std::size_t(-1) / 2);\n    std::size_t size = r1.size();\n    std::size_t begin = r1.begin();\n    std::size_t end = r1.end();\n\n    proportional_split p(1, 3);\n    blocked_range<std::size_t> r2(r1, p);\n\n    // overflow-free computation\n    std::size_t parts = p.left() + p.right();\n    std::size_t int_part = size / parts;\n    std::size_t fraction = size - int_part * parts; // fraction < parts\n    std::size_t right_idx = int_part * p.right() + fraction * p.right() / parts + 1;\n    std::size_t newRangeBegin = end - right_idx;\n\n    // Division in 'right_idx' very likely is inexact also.\n    std::size_t tolerance = 1;\n    std::size_t diff = (r2.begin() < newRangeBegin) ? (newRangeBegin - r2.begin()) : (r2.begin() - newRangeBegin);\n    bool is_split_correct = diff <= tolerance;\n    bool test_passed = (r1.begin() == begin && r1.end() == r2.begin() && is_split_correct &&\n                        r2.end() == end);\n    if (!test_passed) {\n        REPORT(\"Incorrect split of blocked range[%lu, %lu) into r1[%lu, %lu) and r2[%lu, %lu), \"\n               \"must be r1[%lu, %lu) and r2[%lu, %lu)\\n\", begin, end, r1.begin(), r1.end(), r2.begin(), r2.end(), begin, newRangeBegin, newRangeBegin, end);\n        CHECK(test_passed);\n    }\n}\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n\ntemplate <bool ExpectSatisfies, typename... Types>\n    requires (... && (utils::well_formed_instantiation<tbb::blocked_range, Types> == ExpectSatisfies))\nvoid test_blocked_range_constraint() {}\n\ntemplate <bool ExpectSatisfies, typename... Types>\n    requires (... && (utils::well_formed_instantiation<tbb::blocked_range2d, Types, Types> == ExpectSatisfies))\nvoid test_blocked_range2d_constraint() {}\n\ntemplate <typename... Types>\n    requires (... && (utils::well_formed_instantiation<tbb::blocked_range2d, Types, test_concepts::Dummy> == false))\nvoid test_blocked_range2d_col_invalid_constraint() {}\n\ntemplate <typename... Types>\n    requires (... && (utils::well_formed_instantiation<tbb::blocked_range2d, test_concepts::Dummy, Types> == false))\nvoid test_blocked_range2d_row_invalid_constraint() {}\n\ntemplate <bool ExpectSatisfies, typename... Types>\n    requires (... && (utils::well_formed_instantiation<tbb::blocked_range3d, Types, Types, Types> == ExpectSatisfies))\nvoid test_blocked_range3d_constraint() {}\n\ntemplate <typename... Types>\n    requires (... && (utils::well_formed_instantiation<tbb::blocked_range3d, test_concepts::Dummy, Types, Types> == false))\nvoid test_blocked_range3d_page_invalid_constraint() {}\n\ntemplate <typename... Types>\n    requires (... && (utils::well_formed_instantiation<tbb::blocked_range3d, Types, test_concepts::Dummy, Types> == false))\nvoid test_blocked_range3d_row_invalid_constraint() {}\n\ntemplate <typename... Types>\n    requires (... && (utils::well_formed_instantiation<tbb::blocked_range3d, Types, Types, test_concepts::Dummy> == false))\nvoid test_blocked_range3d_col_invalid_constraint() {}\n\ntemplate <typename T>\nconcept well_formed_blocked_nd_range_instantiation_basic = requires {\n    typename tbb::blocked_nd_range<T, 1>;\n};\n\ntemplate <typename... Types>\nconcept well_formed_blocked_nd_range_instantiation = ( ... && well_formed_blocked_nd_range_instantiation_basic<Types> );\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"constraints for blocked_range value\") {\n    using namespace test_concepts::blocked_range_value;\n    using const_iterator = typename std::vector<int>::const_iterator;\n\n    test_blocked_range_constraint</*Expected = */true,\n                                  Correct, char, int, std::size_t, const_iterator>();\n\n    test_blocked_range_constraint</*Expected = */false,\n                                  NonCopyable, NonCopyAssignable, NonDestructible,\n                                  NoOperatorLess, OperatorLessNonConst, WrongReturnOperatorLess,\n                                  NoOperatorMinus, OperatorMinusNonConst, WrongReturnOperatorMinus,\n                                  NoOperatorPlus, OperatorPlusNonConst, WrongReturnOperatorPlus>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"constraints for blocked_range2d value\") {\n    using namespace test_concepts::blocked_range_value;\n    using const_iterator = typename std::vector<int>::const_iterator;\n\n    test_blocked_range2d_constraint</*Expected = */true,\n                                    Correct, char, int, std::size_t, const_iterator>();\n\n    test_blocked_range2d_constraint</*Expected = */false,\n                                    NonCopyable, NonCopyAssignable, NonDestructible,\n                                    NoOperatorLess, OperatorLessNonConst, WrongReturnOperatorLess,\n                                    NoOperatorMinus, OperatorMinusNonConst, WrongReturnOperatorMinus,\n                                    NoOperatorPlus, OperatorPlusNonConst, WrongReturnOperatorPlus>();\n\n    test_blocked_range2d_row_invalid_constraint<Correct, char, int, std::size_t, const_iterator>();\n    test_blocked_range2d_col_invalid_constraint<Correct, char, int, std::size_t, const_iterator>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"constraints for blocked_range3d value\") {\n    using namespace test_concepts::blocked_range_value;\n    using const_iterator = typename std::vector<int>::const_iterator;\n\n    test_blocked_range3d_constraint</*Expected = */true,\n                                    Correct, char, int, std::size_t, const_iterator>();\n\n    test_blocked_range3d_constraint</*Expected = */false,\n                                    NonCopyable, NonCopyAssignable, NonDestructible,\n                                    NoOperatorLess, OperatorLessNonConst, WrongReturnOperatorLess,\n                                    NoOperatorMinus, OperatorMinusNonConst, WrongReturnOperatorMinus,\n                                    NoOperatorPlus, OperatorPlusNonConst, WrongReturnOperatorPlus>();\n\n    test_blocked_range3d_page_invalid_constraint<Correct, char, int, std::size_t, const_iterator>();\n    test_blocked_range3d_row_invalid_constraint<Correct, char, int, std::size_t, const_iterator>();\n    test_blocked_range3d_col_invalid_constraint<Correct, char, int, std::size_t, const_iterator>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"constraints for blocked_nd_range value\") {\n    using namespace test_concepts::blocked_range_value;\n    using const_iterator = typename std::vector<int>::const_iterator;\n\n    static_assert(well_formed_blocked_nd_range_instantiation<Correct, char, int, std::size_t, const_iterator>);\n\n    static_assert(!well_formed_blocked_nd_range_instantiation<NonCopyable, NonCopyAssignable, NonDestructible,\n                                                              NoOperatorLess, OperatorLessNonConst, WrongReturnOperatorLess,\n                                                              NoOperatorMinus, OperatorMinusNonConst, WrongReturnOperatorMinus,\n                                                              NoOperatorPlus, OperatorPlusNonConst, WrongReturnOperatorPlus>);\n}\n\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT && __TBB_PREVIEW_BLOCKED_ND_RANGE_DEDUCTION_GUIDES\ntemplate <typename T>\nvoid test_deduction_guides() {\n    using oneapi::tbb::blocked_nd_range;\n    static_assert(std::is_constructible<T, int>::value, \"Incorrect test setup\");\n    // T as a grainsize in braced-init-list constructions should be used since only\n    // the same type is allowed by the braced-init-list\n    static_assert(std::is_convertible<T, typename blocked_nd_range<T, 1>::size_type>::value,\n                  \"Incorrect test setup\");\n\n    std::vector<T> v;\n    using iterator = typename decltype(v)::iterator;\n\n    oneapi::tbb::blocked_range<T> dim_range(0, 100);\n\n    blocked_nd_range<T, 2> source_range(dim_range, dim_range);\n\n    {\n        blocked_nd_range range(dim_range, dim_range, dim_range);\n        static_assert(std::is_same_v<decltype(range), blocked_nd_range<T, 3>>);\n    }\n    {\n        blocked_nd_range range({v.begin(), v.end()}, {v.begin(), v.end()});\n        static_assert(std::is_same_v<decltype(range), blocked_nd_range<iterator, 2>>);\n    }\n    {\n        blocked_nd_range range({T{0}, T{100}}, {T{0}, T{100}, T{5}}, {T{0}, T{100}}, {T{0}, T{100}, T{5}});\n        static_assert(std::is_same_v<decltype(range), blocked_nd_range<T, 4>>);\n    }\n    {\n        blocked_nd_range range({T{100}});\n        static_assert(std::is_same_v<decltype(range), blocked_nd_range<T, 1>>);\n    }\n    {\n        T array[1] = {100};\n        blocked_nd_range range(array);\n        static_assert(std::is_same_v<decltype(range), blocked_nd_range<T, 1>>);\n    }\n    {\n        blocked_nd_range range({T{100}}, 5);\n        static_assert(std::is_same_v<decltype(range), blocked_nd_range<T, 1>>);\n    }\n    {\n        T array[1] = {100};\n        blocked_nd_range range(array, 5);\n        static_assert(std::is_same_v<decltype(range), blocked_nd_range<T, 1>>);\n    }\n    {\n        blocked_nd_range range({T{100}, T{200}}, 5);\n        static_assert(std::is_same_v<decltype(range), blocked_nd_range<T, 2>>);\n    }\n    {\n        blocked_nd_range range({T{100}, T{200}});\n        static_assert(std::is_same_v<decltype(range), blocked_nd_range<T, 2>>);\n    }\n    {\n        T array[2] = {100, 200};\n        blocked_nd_range range(array, 5);\n        static_assert(std::is_same_v<decltype(range), blocked_nd_range<T, 2>>);\n    }\n    {\n        blocked_nd_range range({T{100}, T{200}, T{300}}, 5);\n        static_assert(std::is_same_v<decltype(range), blocked_nd_range<T, 3>>);\n    }\n    {\n        blocked_nd_range range({T{100}, T{200}, T{300}});\n        static_assert(std::is_same_v<decltype(range), blocked_nd_range<T, 3>>);\n    }\n    {\n        T array[3] = {100, 200, 300};\n        blocked_nd_range range(array, 5);\n        static_assert(std::is_same_v<decltype(range), blocked_nd_range<T, 3>>);\n    }\n    {\n        blocked_nd_range range({T{100}, T{200}, T{300}, T{400}});\n        static_assert(std::is_same_v<decltype(range), blocked_nd_range<T, 4>>);\n    }\n    {\n        T array[4] = {100, 200, 300, 400};\n        blocked_nd_range range(array);\n        static_assert(std::is_same_v<decltype(range), blocked_nd_range<T, 4>>);\n\n    }\n    {\n        blocked_nd_range range({T{100}, T{200}, T{300}, T{400}}, 5);\n        static_assert(std::is_same_v<decltype(range), blocked_nd_range<T, 4>>);\n    }\n    {\n        T array[4] = {100, 200, 300, 400};\n        blocked_nd_range range(array, 5);\n        static_assert(std::is_same_v<decltype(range), blocked_nd_range<T, 4>>);\n    }\n    {\n        blocked_nd_range range(source_range, oneapi::tbb::split{});\n        static_assert(std::is_same_v<decltype(range), decltype(source_range)>);\n    }\n    {\n        blocked_nd_range range(source_range, oneapi::tbb::proportional_split{1, 3});\n        static_assert(std::is_same_v<decltype(range), decltype(source_range)>);\n    }\n    {\n        blocked_nd_range range(source_range);\n        static_assert(std::is_same_v<decltype(range), decltype(source_range)>);\n    }\n    {\n        blocked_nd_range range(std::move(source_range));\n        static_assert(std::is_same_v<decltype(range), decltype(source_range)>);\n    }\n}\n\nclass fancy_value {\npublic:\n    fancy_value(std::size_t real_value) : my_real_value(real_value) {}\n    fancy_value(const fancy_value&) = default;\n    ~fancy_value() = default;\n    fancy_value& operator=(const fancy_value&) = default;\n\n    friend bool operator<(const fancy_value& lhs, const fancy_value& rhs) {\n        return lhs.my_real_value < rhs.my_real_value;\n    }\n    friend std::size_t operator-(const fancy_value& lhs, const fancy_value& rhs) {\n        return lhs.my_real_value - rhs.my_real_value;\n    }\n    friend std::size_t operator-(const fancy_value& lhs, std::size_t offset) {\n        return lhs.my_real_value - offset;\n    }\n    friend fancy_value operator+(const fancy_value& lhs, std::size_t offset) {\n        return fancy_value(lhs.my_real_value + offset);\n    }\n\n    operator std::size_t() const {\n        return my_real_value;\n    }\nprivate:\n    std::size_t my_real_value;\n};\n\n//! Testing blocked_nd_range deduction guides\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"blocked_nd_range deduction guides\") {\n    test_deduction_guides<int>();\n    test_deduction_guides<fancy_value>();\n}\n#endif // __TBB_CPP17_DEDUCTION_GUIDES_PRESENT && __TBB_PREVIEW_BLOCKED_ND_RANGE_DEDUCTION_GUIDES\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_broadcast_node.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/config.h\"\n\n#include \"tbb/flow_graph.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/test_follows_and_precedes_api.h\"\n\n#include <atomic>\n\n\n//! \\file test_broadcast_node.cpp\n//! \\brief Test for [flow_graph.broadcast_node] specification\n\n\n#define TBB_INTERNAL_NAMESPACE detail::d2\nnamespace tbb {\nusing task = TBB_INTERNAL_NAMESPACE::graph_task;\n}\nusing tbb::TBB_INTERNAL_NAMESPACE::SUCCESSFULLY_ENQUEUED;\n\nconst int N = 1000;\nconst int R = 4;\n\nclass int_convertable_type : private utils::NoAssign {\n\n   int my_value;\n\npublic:\n\n   int_convertable_type( int v ) : my_value(v) {}\n   operator int() const { return my_value; }\n\n};\n\n\ntemplate< typename T >\nclass counting_array_receiver : public tbb::flow::receiver<T> {\n\n    std::atomic<size_t> my_counters[N];\n    tbb::flow::graph& my_graph;\n\npublic:\n\n    counting_array_receiver(tbb::flow::graph& g) : my_graph(g) {\n        for (int i = 0; i < N; ++i )\n           my_counters[i] = 0;\n    }\n\n    size_t operator[]( int i ) {\n        size_t v = my_counters[i];\n        return v;\n    }\n\n    tbb::task * try_put_task( const T &v ) override {\n        ++my_counters[(int)v];\n        return const_cast<tbb::task *>(SUCCESSFULLY_ENQUEUED);\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    tbb::task * try_put_task( const T &v, const tbb::detail::d2::message_metainfo& ) override {\n        return try_put_task(v);\n    }\n#endif\n\n    tbb::flow::graph& graph_reference() const override {\n        return my_graph;\n    }\n};\n\ntemplate< typename T >\nvoid test_serial_broadcasts() {\n\n    tbb::flow::graph g;\n    tbb::flow::broadcast_node<T> b(g);\n\n    for ( int num_receivers = 1; num_receivers < R; ++num_receivers ) {\n        std::vector< std::shared_ptr<counting_array_receiver<T>> > receivers;\n        for( int i = 0; i < num_receivers; ++i )\n            receivers.push_back( std::make_shared<counting_array_receiver<T>>(g) );\n\n        for ( int r = 0; r < num_receivers; ++r ) {\n            tbb::flow::make_edge( b, *receivers[r] );\n        }\n\n        for (int n = 0; n < N; ++n ) {\n            CHECK_MESSAGE( b.try_put( (T)n ), \"\" );\n        }\n\n        for ( int r = 0; r < num_receivers; ++r ) {\n            for (int n = 0; n < N; ++n ) {\n                CHECK_MESSAGE( (*receivers[r])[n] == 1, \"\" );\n            }\n            tbb::flow::remove_edge( b, *receivers[r] );\n        }\n        CHECK_MESSAGE( b.try_put( (T)0 ), \"\" );\n        for ( int r = 0; r < num_receivers; ++r )\n            CHECK_MESSAGE( (*receivers[0])[0] == 1, \"\" );\n    }\n\n}\n\ntemplate< typename T >\nclass native_body : private utils::NoAssign {\n\n    tbb::flow::broadcast_node<T> &my_b;\n\npublic:\n\n    native_body( tbb::flow::broadcast_node<T> &b ) : my_b(b) {}\n\n    void operator()(int) const {\n        for (int n = 0; n < N; ++n ) {\n            CHECK_MESSAGE( my_b.try_put( (T)n ), \"\" );\n        }\n    }\n\n};\n\ntemplate< typename T >\nvoid run_parallel_broadcasts(tbb::flow::graph& g, int p, tbb::flow::broadcast_node<T>& b) {\n    for ( int num_receivers = 1; num_receivers < R; ++num_receivers ) {\n        std::vector< std::shared_ptr<counting_array_receiver<T>> > receivers;\n        for( int i = 0; i < num_receivers; ++i )\n            receivers.push_back( std::make_shared< counting_array_receiver<T> >(g) );\n\n        for ( int r = 0; r < num_receivers; ++r ) {\n            tbb::flow::make_edge( b, *receivers[r] );\n        }\n\n        utils::NativeParallelFor( p, native_body<T>( b ) );\n\n        for ( int r = 0; r < num_receivers; ++r ) {\n            for (int n = 0; n < N; ++n ) {\n                CHECK_MESSAGE( (int)(*receivers[r])[n] == p, \"\" );\n            }\n            tbb::flow::remove_edge( b, *receivers[r] );\n        }\n        CHECK_MESSAGE( b.try_put( (T)0 ), \"\" );\n        for ( int r = 0; r < num_receivers; ++r )\n            CHECK_MESSAGE( (int)(*receivers[r])[0] == p, \"\" );\n    }\n}\n\ntemplate< typename T >\nvoid test_parallel_broadcasts(int p) {\n\n    tbb::flow::graph g;\n    tbb::flow::broadcast_node<T> b(g);\n    run_parallel_broadcasts(g, p, b);\n\n    // test copy constructor\n    tbb::flow::broadcast_node<T> b_copy(b);\n    run_parallel_broadcasts(g, p, b_copy);\n}\n\n// broadcast_node does not allow successors to try_get from it (it does not allow\n// the flow edge to switch) so we only need test the forward direction.\ntemplate<typename T>\nvoid test_resets() {\n    tbb::flow::graph g;\n    tbb::flow::broadcast_node<T> b0(g);\n    tbb::flow::broadcast_node<T> b1(g);\n    tbb::flow::queue_node<T> q0(g);\n    tbb::flow::make_edge(b0,b1);\n    tbb::flow::make_edge(b1,q0);\n    T j;\n\n    // test standard reset\n    for(int testNo = 0; testNo < 2; ++testNo) {\n        for(T i= 0; i <= 3; i += 1) {\n            b0.try_put(i);\n        }\n        g.wait_for_all();\n        for(T i= 0; i <= 3; i += 1) {\n            CHECK_MESSAGE( (q0.try_get(j) && j == i), \"Bad value in queue\");\n        }\n        CHECK_MESSAGE( (!q0.try_get(j)), \"extra value in queue\");\n\n        // reset the graph.  It should work as before.\n        if (testNo == 0) g.reset();\n    }\n\n    g.reset(tbb::flow::rf_clear_edges);\n    for(T i= 0; i <= 3; i += 1) {\n        b0.try_put(i);\n    }\n    g.wait_for_all();\n    CHECK_MESSAGE( (!q0.try_get(j)), \"edge between nodes not removed\");\n    for(T i= 0; i <= 3; i += 1) {\n        b1.try_put(i);\n    }\n    g.wait_for_all();\n    CHECK_MESSAGE( (!q0.try_get(j)), \"edge between nodes not removed\");\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n#include <array>\n#include <vector>\nvoid test_follows_and_precedes_api() {\n    using msg_t = tbb::flow::continue_msg;\n\n    std::array<msg_t, 3> messages_for_follows= { {msg_t(), msg_t(), msg_t()} };\n    std::vector<msg_t> messages_for_precedes = {msg_t()};\n\n    follows_and_precedes_testing::test_follows <msg_t, tbb::flow::broadcast_node<msg_t>>(messages_for_follows);\n    follows_and_precedes_testing::test_precedes <msg_t, tbb::flow::broadcast_node<msg_t>>(messages_for_precedes);\n}\n#endif\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\nvoid test_deduction_guides() {\n    using namespace tbb::flow;\n\n    graph g;\n\n    broadcast_node<int> b0(g);\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    buffer_node<int> buf(g);\n\n    broadcast_node b1(follows(buf));\n    static_assert(std::is_same_v<decltype(b1), broadcast_node<int>>);\n\n    broadcast_node b2(precedes(buf));\n    static_assert(std::is_same_v<decltype(b2), broadcast_node<int>>);\n#endif\n\n    broadcast_node b3(b0);\n    static_assert(std::is_same_v<decltype(b3), broadcast_node<int>>);\n    g.wait_for_all();\n}\n#endif\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n// Basic idea of the following tests is to check that try_put_and_wait(message) call for broadcast_node\n// processes all of the previous jobs required to process message, the message itself, but does\n// not process the elements submitted later or not required to process the message\n// These tests submit start_work_items using the regular try_put and then submit wait_message\n// with try_put_and_wait. During the completion of the graph, new_work_items would be submitted\n// once the wait_message arrives.\nvoid test_try_put_and_wait_spawning_and_serial_receiver() {\n    tbb::task_arena arena(1);\n\n    arena.execute([&]{\n        tbb::flow::graph g;\n\n        std::vector<int> start_work_items;\n        std::vector<int> processed_items_unlimited, processed_items_serial;\n        std::vector<int> new_work_items;\n\n        int wait_message = 10;\n\n        for (int i = 0; i < wait_message; ++i) {\n            start_work_items.emplace_back(i);\n            new_work_items.emplace_back(i + 1 + wait_message);\n        }\n\n        tbb::flow::broadcast_node<int> broadcast(g);\n\n        // Broadcast to 2 function_nodes, one with unlimited concurrency and the other serial\n        tbb::flow::function_node<int, int, tbb::flow::queueing> unlimited(g, tbb::flow::unlimited,\n            [&](int input) noexcept {\n                if (input == wait_message) {\n                    for (auto item : new_work_items) {\n                        broadcast.try_put(item);\n                    }\n                }\n                processed_items_unlimited.emplace_back(input);\n                return 0;\n            });\n        tbb::flow::make_edge(broadcast, unlimited);\n\n        tbb::flow::function_node<int, int, tbb::flow::queueing> serial(g, tbb::flow::serial,\n            [&](int input) noexcept {\n                processed_items_serial.emplace_back(input);\n                return 0;\n            });\n        tbb::flow::make_edge(broadcast, serial);\n\n        for (int i = 0; i < wait_message; ++i) {\n            broadcast.try_put(i);\n        }\n\n        broadcast.try_put_and_wait(wait_message);\n\n        size_t unlimited_check_index = 0, serial_check_index = 0;\n\n        // For the unlimited function_node, all of the tasks for start_work_items and wait_message would be spawned\n        // and hence processed by the thread in LIFO order.\n        // The first processed item is expected to be wait_message since it was spawned last\n        CHECK_MESSAGE(processed_items_unlimited.size() == new_work_items.size() + start_work_items.size(),\n                      \"Unexpected number of processed items\");\n        CHECK_MESSAGE(processed_items_unlimited[unlimited_check_index++] == wait_message, \"Unexpected items processing\");\n        for (int i = int(new_work_items.size()) - 1; i >= 0; --i) {\n            CHECK_MESSAGE(processed_items_unlimited[unlimited_check_index++] == new_work_items[i], \"Unexpected items processing\");\n        }\n        for (int i = int(start_work_items.size()) - 1; i >= 1; --i) {\n            CHECK_MESSAGE(processed_items_unlimited[unlimited_check_index++] == start_work_items[i], \"Unexpected items processing\");\n        }\n\n        // Serial queueing function_node should add all start_work_items except the first one into the queue\n        // and then process them in FIFO order.\n        // wait_message would also be added to the queue, but would be processed later\n        CHECK_MESSAGE(processed_items_serial.size() == start_work_items.size() + 1,\n                      \"Unexpected number of processed items\");\n        for (auto item : start_work_items) {\n            CHECK_MESSAGE(processed_items_serial[serial_check_index++] == item, \"Unexpected items processing\");\n        }\n        CHECK_MESSAGE(processed_items_serial[serial_check_index++] == wait_message, \"Unexpected items processing\");\n\n        g.wait_for_all();\n\n        CHECK_MESSAGE(processed_items_unlimited[unlimited_check_index++] == start_work_items[0], \"Unexpected items processing\");\n\n        // For serial queueing function_node, the new_work_items are expected to be processed while calling to wait_for_all\n        // They would be queued and processed later in FIFO order\n        for (auto item : new_work_items) {\n            CHECK_MESSAGE(processed_items_serial[serial_check_index++] == item, \"Unexpected items processing\");\n        }\n        CHECK(serial_check_index == processed_items_serial.size());\n        CHECK(unlimited_check_index == processed_items_unlimited.size());\n    });\n}\n\nvoid test_try_put_and_wait_spawning_receivers() {\n    tbb::task_arena arena(1);\n\n    arena.execute([&]{\n        tbb::flow::graph g;\n\n        int wait_message = 10;\n        int num_successors = wait_message - 1;\n\n        std::vector<int> start_work_items;\n        std::vector<std::vector<int>> processed_items(num_successors);\n        std::vector<int> new_work_items;\n\n        for (int i = 0; i < wait_message; ++i) {\n            start_work_items.emplace_back(i);\n            new_work_items.emplace_back(i + 1 + wait_message);\n        }\n\n        tbb::flow::broadcast_node<int> broadcast(g);\n\n        std::vector<tbb::flow::function_node<int, int, tbb::flow::queueing>> successors;\n        successors.reserve(num_successors);\n        for (int i = 0; i < num_successors; ++i) {\n            successors.emplace_back(g, tbb::flow::unlimited,\n                [&, i](int input) noexcept {\n                    if (input == wait_message) {\n                        broadcast.try_put(new_work_items[i]);\n                    }\n                    processed_items[i].emplace_back(input);\n                    return 0;\n                });\n            tbb::flow::make_edge(broadcast, successors.back());\n        }\n\n        for (int i = 0; i < wait_message; ++i) {\n            broadcast.try_put(i);\n        }\n\n        broadcast.try_put_and_wait(wait_message);\n\n        for (int i = num_successors - 1; i >= 0; --i) {\n            size_t check_index = 0;\n            for (int j = num_successors - 1; j != i; --j) {\n                CHECK_MESSAGE(processed_items[i][check_index++] == new_work_items[j], \"Unexpected items processing\");\n            }\n            CHECK_MESSAGE(processed_items[i][check_index++] == wait_message, \"Unexpected items processing\");\n            for (int j = i; j >= 1; --j) {\n                CHECK_MESSAGE(processed_items[i][check_index++] == new_work_items[j], \"Unexpected items processing\");\n            }\n        }\n\n        g.wait_for_all();\n\n        for (auto& processed_item : processed_items) {\n            size_t check_index = num_successors;\n            CHECK_MESSAGE(processed_item[check_index++] == new_work_items[0], \"Unexpected items processing\");\n            for (int i = int(start_work_items.size()) - 1; i >= 0; --i) {\n                CHECK_MESSAGE(processed_item[check_index++] == start_work_items[i], \"Unexpected items processing\");\n            }\n        }\n    });\n}\n\nvoid test_try_put_and_wait() {\n    test_try_put_and_wait_spawning_and_serial_receiver();\n    test_try_put_and_wait_spawning_receivers();\n}\n#endif // __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n\n//! Test serial broadcasts\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Serial broadcasts\"){\n   test_serial_broadcasts<int>();\n   test_serial_broadcasts<float>();\n   test_serial_broadcasts<int_convertable_type>();\n}\n\n//! Test parallel broadcasts\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Parallel broadcasts\"){\n    for( unsigned int p=utils::MinThread; p<=utils::MaxThread; ++p ) {\n       test_parallel_broadcasts<int>(p);\n       test_parallel_broadcasts<float>(p);\n       test_parallel_broadcasts<int_convertable_type>(p);\n   }\n}\n\n//! Test reset and cancellation behavior\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Resets\"){\n   test_resets<int>();\n   test_resets<float>();\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n//! Test deprecated follows and precedes API\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Follows and precedes API\"){\n    test_follows_and_precedes_api();\n}\n#endif\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Test deduction guides\n//! \\brief requirement\nTEST_CASE(\"Deduction guides\"){\n    test_deduction_guides();\n}\n#endif\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test broadcast_node try_put_and_wait\") {\n    test_try_put_and_wait();\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_buffer_node.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/config.h\"\n\n#include \"tbb/flow_graph.h\"\n#include \"tbb/global_control.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/graph_utils.h\"\n#include \"common/test_follows_and_precedes_api.h\"\n\n#include \"test_buffering_try_put_and_wait.h\"\n\n//! \\file test_buffer_node.cpp\n//! \\brief Test for [flow_graph.buffer_node] specification\n\n#define N 1000\n#define C 10\n\ntemplate< typename T >\nvoid spin_try_get( tbb::flow::buffer_node<T> &b, T &value ) {\n    while ( b.try_get(value) != true ) {}\n}\n\ntemplate< typename T >\nvoid check_item( T* count_value, T &value ) {\n    count_value[value / N] += value % N;\n}\n\ntemplate< typename T >\nstruct parallel_puts : utils::NoAssign {\n\n    tbb::flow::buffer_node<T> &my_b;\n\n    parallel_puts( tbb::flow::buffer_node<T> &b ) : my_b(b) {}\n\n    void operator()(int i) const {\n        for (int j = 0; j < N; ++j) {\n            bool msg = my_b.try_put( T(N*i + j) );\n            CHECK_MESSAGE( msg == true, \"\" );\n        }\n    }\n};\n\ntemplate< typename T >\nstruct touches {\n\n    bool **my_touches;\n    int my_num_threads;\n\n    touches( int num_threads ) : my_num_threads(num_threads) {\n        my_touches = new bool* [my_num_threads];\n        for ( int p = 0; p < my_num_threads; ++p) {\n            my_touches[p] = new bool[N];\n            for ( int n = 0; n < N; ++n)\n                my_touches[p][n] = false;\n        }\n    }\n\n    ~touches() {\n        for ( int p = 0; p < my_num_threads; ++p) {\n            delete [] my_touches[p];\n        }\n        delete [] my_touches;\n    }\n\n    bool check( T v ) {\n        CHECK_MESSAGE( my_touches[v/N][v%N] == false, \"\" );\n        my_touches[v/N][v%N] = true;\n        return true;\n    }\n\n    bool validate_touches() {\n        for ( int p = 0; p < my_num_threads; ++p) {\n            for ( int n = 0; n < N; ++n) {\n                CHECK_MESSAGE( my_touches[p][n] == true, \"\" );\n            }\n        }\n        return true;\n    }\n};\n\ntemplate< typename T >\nstruct parallel_gets : utils::NoAssign {\n\n    tbb::flow::buffer_node<T> &my_b;\n    touches<T> &my_touches;\n\n    parallel_gets( tbb::flow::buffer_node<T> &b, touches<T> &t) : my_b(b), my_touches(t) {}\n\n    void operator()(int) const {\n        for (int j = 0; j < N; ++j) {\n            T v;\n            spin_try_get( my_b, v );\n            my_touches.check( v );\n        }\n    }\n\n};\n\ntemplate< typename T >\nstruct parallel_put_get : utils::NoAssign {\n\n    tbb::flow::buffer_node<T> &my_b;\n    touches<T> &my_touches;\n\n    parallel_put_get( tbb::flow::buffer_node<T> &b, touches<T> &t ) : my_b(b), my_touches(t) {}\n\n    void operator()(int tid) const {\n\n        for ( int i = 0; i < N; i+=C ) {\n            int j_end = ( N < i + C ) ? N : i + C;\n            // dump about C values into the buffer\n            for ( int j = i; j < j_end; ++j ) {\n                CHECK_MESSAGE( my_b.try_put( T (N*tid + j ) ) == true, \"\" );\n            }\n            // receiver about C values from the buffer\n            for ( int j = i; j < j_end; ++j ) {\n                T v;\n                spin_try_get( my_b, v );\n                my_touches.check( v );\n            }\n        }\n    }\n\n};\n\n//\n// Tests\n//\n// Item can be reserved, released, consumed ( single serial receiver )\n//\ntemplate< typename T >\nint test_reservation() {\n    tbb::flow::graph g;\n    T bogus_value(-1);\n\n    // Simple tests\n    tbb::flow::buffer_node<T> b(g);\n\n    b.try_put(T(1));\n    b.try_put(T(2));\n    b.try_put(T(3));\n\n    T v, vsum;\n    CHECK_MESSAGE( b.try_reserve(v) == true, \"\" );\n    CHECK_MESSAGE( b.try_release() == true, \"\" );\n    v = bogus_value;\n    g.wait_for_all();\n    CHECK_MESSAGE( b.try_reserve(v) == true, \"\" );\n    CHECK_MESSAGE( b.try_consume() == true, \"\" );\n    vsum += v;\n    v = bogus_value;\n    g.wait_for_all();\n\n    CHECK_MESSAGE( b.try_get(v) == true, \"\" );\n    vsum += v;\n    v = bogus_value;\n    g.wait_for_all();\n\n    CHECK_MESSAGE( b.try_reserve(v) == true, \"\" );\n    CHECK_MESSAGE( b.try_release() == true, \"\" );\n    v = bogus_value;\n    g.wait_for_all();\n    CHECK_MESSAGE( b.try_reserve(v) == true, \"\" );\n    CHECK_MESSAGE( b.try_consume() == true, \"\" );\n    vsum += v;\n    CHECK_MESSAGE( vsum == T(6), \"\");\n    v = bogus_value;\n    g.wait_for_all();\n\n    return 0;\n}\n\n//\n// Tests\n//\n// multiple parallel senders, items in arbitrary order\n// multiple parallel senders, multiple parallel receivers, items in arbitrary order and all items received\n//   * overlapped puts / gets\n//   * all puts finished before any getS\n//\ntemplate< typename T >\nint test_parallel(int num_threads) {\n    tbb::flow::graph g;\n    tbb::flow::buffer_node<T> b(g);\n    tbb::flow::buffer_node<T> b2(g);\n    tbb::flow::buffer_node<T> b3(g);\n    T bogus_value(-1);\n    T j = bogus_value;\n\n    NativeParallelFor( num_threads, parallel_puts<T>(b) );\n\n    T *next_value = new T[num_threads];\n    for (int tid = 0; tid < num_threads; ++tid) next_value[tid] = T(0);\n\n    for (int i = 0; i < num_threads * N; ++i ) {\n        spin_try_get( b, j );\n        check_item( next_value, j );\n        j = bogus_value;\n    }\n    for (int tid = 0; tid < num_threads; ++tid)  {\n        CHECK_MESSAGE( next_value[tid] == T((N*(N-1))/2), \"\" );\n    }\n\n    j = bogus_value;\n    g.wait_for_all();\n    CHECK_MESSAGE( b.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    NativeParallelFor( num_threads, parallel_puts<T>(b) );\n\n    {\n        touches< T > t( num_threads );\n        NativeParallelFor( num_threads, parallel_gets<T>(b, t) );\n        g.wait_for_all();\n        CHECK_MESSAGE( t.validate_touches(), \"\" );\n    }\n    j = bogus_value;\n    CHECK_MESSAGE( b.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    g.wait_for_all();\n    {\n        touches< T > t( num_threads );\n        NativeParallelFor( num_threads, parallel_put_get<T>(b, t) );\n        g.wait_for_all();\n        CHECK_MESSAGE( t.validate_touches(), \"\" );\n    }\n    j = bogus_value;\n    CHECK_MESSAGE( b.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    tbb::flow::make_edge( b, b2 );\n    tbb::flow::make_edge( b2, b3 );\n\n    NativeParallelFor( num_threads, parallel_puts<T>(b) );\n    {\n        touches< T > t( num_threads );\n        NativeParallelFor( num_threads, parallel_gets<T>(b3, t) );\n        g.wait_for_all();\n        CHECK_MESSAGE( t.validate_touches(), \"\" );\n    }\n    j = bogus_value;\n    g.wait_for_all();\n    CHECK_MESSAGE( b.try_get( j ) == false, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( b2.try_get( j ) == false, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( b3.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    // test copy constructor\n    CHECK_MESSAGE( b.remove_successor( b2 ), \"\" );\n    // fill up b:\n    NativeParallelFor( num_threads, parallel_puts<T>(b) );\n    // copy b:\n    tbb::flow::buffer_node<T> b_copy(b);\n\n    // b_copy should be empty\n    j = bogus_value;\n    g.wait_for_all();\n    CHECK_MESSAGE( b_copy.try_get( j ) == false, \"\" );\n\n    // hook them together:\n    CHECK_MESSAGE( b.register_successor(b_copy) == true, \"\" );\n    // try to get content from b_copy\n    {\n        touches< T > t( num_threads );\n        NativeParallelFor( num_threads, parallel_gets<T>(b_copy, t) );\n        g.wait_for_all();\n        CHECK_MESSAGE( t.validate_touches(), \"\" );\n    }\n    // now both should be empty\n    j = bogus_value;\n    g.wait_for_all();\n    CHECK_MESSAGE( b.try_get( j ) == false, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( b_copy.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    delete [] next_value;\n    return 0;\n}\n\n//\n// Tests\n//\n// Predecessors cannot be registered\n// Empty buffer rejects item requests\n// Single serial sender, items in arbitrary order\n// Chained buffers ( 2 & 3 ), single sender, items at last buffer in arbitrary order\n//\n\n#define TBB_INTERNAL_NAMESPACE detail::d2\nusing tbb::TBB_INTERNAL_NAMESPACE::register_predecessor;\nusing tbb::TBB_INTERNAL_NAMESPACE::remove_predecessor;\n\ntemplate< typename T >\nint test_serial() {\n    tbb::flow::graph g;\n    T bogus_value(-1);\n\n    tbb::flow::buffer_node<T> b(g);\n    tbb::flow::buffer_node<T> b2(g);\n    T j = bogus_value;\n\n    //\n    // Rejects attempts to add / remove predecessor\n    // Rejects request from empty buffer\n    //\n    CHECK_MESSAGE( register_predecessor<T>( b, b2 ) == false, \"\" );\n    CHECK_MESSAGE( remove_predecessor<T>( b, b2 ) == false, \"\" );\n    CHECK_MESSAGE( b.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    //\n    // Simple puts and gets\n    //\n\n    for (int i = 0; i < N; ++i) {\n        bool msg = b.try_put( T(i) );\n        CHECK_MESSAGE( msg == true, \"\" );\n    }\n\n    T vsum = T(0);\n    for (int i = 0; i < N; ++i) {\n        j = bogus_value;\n        spin_try_get( b, j );\n        vsum += j;\n    }\n    CHECK_MESSAGE( vsum == (N*(N-1))/2, \"\");\n    j = bogus_value;\n    g.wait_for_all();\n    CHECK_MESSAGE( b.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    tbb::flow::make_edge(b, b2);\n\n    vsum = T(0);\n    for (int i = 0; i < N; ++i) {\n        bool msg = b.try_put( T(i) );\n        CHECK_MESSAGE( msg == true, \"\" );\n    }\n\n    for (int i = 0; i < N; ++i) {\n        j = bogus_value;\n        spin_try_get( b2, j );\n        vsum += j;\n    }\n    CHECK_MESSAGE( vsum == (N*(N-1))/2, \"\");\n    j = bogus_value;\n    g.wait_for_all();\n    CHECK_MESSAGE( b.try_get( j ) == false, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( b2.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    tbb::flow::remove_edge(b, b2);\n    CHECK_MESSAGE( b.try_put( 1 ) == true, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( b2.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( b.try_get( j ) == true, \"\" );\n    CHECK_MESSAGE( j == 1, \"\" );\n\n    tbb::flow::buffer_node<T> b3(g);\n    tbb::flow::make_edge( b, b2 );\n    tbb::flow::make_edge( b2, b3 );\n\n    vsum = T(0);\n    for (int i = 0; i < N; ++i) {\n        bool msg = b.try_put( T(i) );\n        CHECK_MESSAGE( msg == true, \"\" );\n    }\n\n    for (int i = 0; i < N; ++i) {\n        j = bogus_value;\n        spin_try_get( b3, j );\n        vsum += j;\n    }\n    CHECK_MESSAGE( vsum == (N*(N-1))/2, \"\");\n    j = bogus_value;\n    g.wait_for_all();\n    CHECK_MESSAGE( b.try_get( j ) == false, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( b2.try_get( j ) == false, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( b3.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    tbb::flow::remove_edge(b, b2);\n    CHECK_MESSAGE( b.try_put( 1 ) == true, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( b2.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( b3.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( b.try_get( j ) == true, \"\" );\n    CHECK_MESSAGE( j == 1, \"\" );\n\n    return 0;\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n#include <array>\n#include <vector>\nvoid test_follows_and_precedes_api() {\n    using msg_t = tbb::flow::continue_msg;\n\n    std::array<msg_t, 3> messages_for_follows = { {msg_t(), msg_t(), msg_t()} };\n    std::vector<msg_t> messages_for_precedes = {msg_t(), msg_t(), msg_t()};\n\n    follows_and_precedes_testing::test_follows<msg_t, tbb::flow::buffer_node<msg_t>>(messages_for_follows);\n    follows_and_precedes_testing::test_precedes<msg_t, tbb::flow::buffer_node<msg_t>>(messages_for_precedes);\n}\n#endif\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\nvoid test_deduction_guides() {\n    using namespace tbb::flow;\n    graph g;\n    broadcast_node<int> br(g);\n    buffer_node<int> b0(g);\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    buffer_node b1(follows(br));\n    static_assert(std::is_same_v<decltype(b1), buffer_node<int>>);\n\n    buffer_node b2(precedes(br));\n    static_assert(std::is_same_v<decltype(b2), buffer_node<int>>);\n#endif\n\n    buffer_node b3(b0);\n    static_assert(std::is_same_v<decltype(b3), buffer_node<int>>);\n    g.wait_for_all();\n}\n#endif\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\nvoid test_buffer_node_try_put_and_wait() {\n    using namespace test_try_put_and_wait;\n\n    std::vector<int> start_work_items;\n    std::vector<int> new_work_items;\n    int wait_message = 10;\n\n    for (int i = 0; i < wait_message; ++i) {\n        start_work_items.emplace_back(i);\n        new_work_items.emplace_back(i + 1 + wait_message);\n    }\n\n    // Test push\n    // test_buffer_push tests the graph\n    // buffer1 -> function -> buffer2 -> writer\n    //     function is a queueing serial function_node that submits new_work_items once wait_message arrives\n    //     writer is an unlimited function_node that writes an item into the processed_items vector\n    // Test steps\n    //     1. push start_work_items into the buffer1\n    //     2. buffer1.try_put_and_wait(wait_message);\n    //     3. g.wait_for_all()\n    // test_buffer_push returns the index from which the items processed during wait_for_all() starts\n    {\n        std::vector<int> processed_items;\n\n        std::size_t after_start = test_buffer_push<tbb::flow::buffer_node<int>>(start_work_items, wait_message,\n                                                                                new_work_items, processed_items);\n\n        // Expected effect:\n        // During buffer1.try_put_and_wait()\n        //     1. start_work_items would be pushed to buffer1\n        //     2. wait_message would be pushed to buffer1\n        //     3. forward_task on buffer1 would transfer all of the items to the function_node in LIFO order\n        //     4. wait_message would occupy concurrency of function, other items would be pushed to the queue\n        //     5. function would process wait_message and add new_work_items to the buffer1\n        //     6. forward_task for new_work_items would be spawned, wait_message would be buffered in the buffer2\n        //     7. function task for next FIFO item in the queue would be spawned\n        //     8. forward_task for wait_message in buffer2 would be executed without spawning\n        //     9. writer task for wait_message would be executed without spawning and write wait_message to the buffer\n        //     10. try_put_and_wait exits since wait_message is completed\n        // During g.wait_for_all()\n        //     10. forward_task for new_work_items in buffer1 would be spawned and put items in function in LIFO order\n        //     11. function_node would process and push forward items from the queue in FIFO order\n        // Expected items processing - { wait_message, start_work_items LIFO, new_work_items LIFO }\n\n        std::size_t check_index = 0;\n        CHECK_MESSAGE(after_start == 1, \"try_put_and_wait should process only the wait_message\");\n        CHECK_MESSAGE(processed_items[check_index++] == wait_message, \"try_put_and_wait should process only the wait_message\");\n\n        for (std::size_t index = start_work_items.size(); index != 0; --index) {\n            CHECK_MESSAGE(processed_items[check_index++] == start_work_items[index - 1],\n                          \"wait_for_all should process start_work_items LIFO\");\n        }\n        for (std::size_t index = new_work_items.size(); index != 0; --index) {\n            CHECK_MESSAGE(processed_items[check_index++] == new_work_items[index - 1],\n                          \"wait_for_all should process new_work_items LIFO\");\n        }\n        CHECK(check_index == processed_items.size());\n    } // Test push\n\n    // Test pull\n    // test_buffer_pull tests the graph\n    // buffer -> function\n    //     function is a rejecting serial function_node that submits new_work_items once wait_message arrives\n    //     and writes the processed item into the processed_items\n    // Test steps\n    //     1. push the occupier message to the function\n    //     2. push start_work_items into the buffer\n    //     3. buffer.try_put_and_wait(wait_message)\n    //     4. g.wait_for_all()\n    // test_buffer_pull returns the index from which the items processed during wait_for_all() starts\n\n    {\n        std::vector<int> processed_items;\n        int occupier = 42;\n\n        std::size_t after_start = test_buffer_pull<tbb::flow::buffer_node<int>>(start_work_items, wait_message, occupier,\n                                                                                new_work_items, processed_items);\n\n        // Expected effect\n        // 0. task for occupier processing would be spawned by the function\n        // During buffer.try_put_and_wait()\n        //     1. start_work_items would be pushed to the buffer\n        //     2. wait_message would be pushed to the buffer\n        //     3. forward_task would try to push items to the function, but would fail\n        //        and set the edge to the pull state\n        //     4. occupier would be processed\n        //     5. items would be taken from the buffer by function in LIFO order\n        //     6. wait_message would be taken first and push new_work_items to the buffer\n        // Expected items processing { occupier, wait_message, new_work_items LIFO, start_work_items LIFO }\n\n        std::size_t check_index = 0;\n\n        CHECK_MESSAGE(after_start == 2, \"Only wait_message and occupier should be processed by try_put_and_wait\");\n        CHECK_MESSAGE(processed_items[check_index++] == occupier, \"Unexpected items processing by try_put_and_wait\");\n        CHECK_MESSAGE(processed_items[check_index++] == wait_message, \"Unexpected items processing by try_put_and_wait\");\n\n        for (std::size_t index = new_work_items.size(); index != 0; --index) {\n            CHECK_MESSAGE(processed_items[check_index++] == new_work_items[index - 1],\n                          \"wait_for_all should process new_work_items LIFO\");\n        }\n        for (std::size_t index = start_work_items.size(); index != 0; --index) {\n            CHECK_MESSAGE(processed_items[check_index++] == start_work_items[index - 1],\n                          \"wait_for_all should process start_work_items LIFO\");\n        }\n        CHECK(check_index == processed_items.size());\n    }\n\n    // Test reserve\n    {\n        int thresholds[] = { 1, 2 };\n\n        for (int threshold : thresholds) {\n            std::vector<int> processed_items;\n\n            // test_buffer_reserve tests the following graph\n            // buffer -> limiter -> function\n            //  function is a rejecting serial function_node that puts an item to the decrementer port\n            //  of the limiter inside of the body\n\n            std::size_t after_start = test_buffer_reserve<tbb::flow::buffer_node<int>>(threshold,\n                start_work_items, wait_message, new_work_items, processed_items);\n\n            // Expected effect:\n            // 1. start_work_items would be pushed to the buffer\n            // 2. wait_message_would be pushed to the buffer\n            // 3. forward task of the buffer would push wait_message to the limiter node.\n            //    Since the limiter threshold is not reached, it would be directly passed to the function\n            // 4. function would spawn the task for wait_message processing\n            // 5. wait_message would be processed that would add new_work_items to the buffer\n            // 6. decrementer.try_put() would be called and the limiter node would\n            //    process all of the items from the buffer using the try_reserve/try_consume/try_release semantics\n            // Since the reservation always accepts the front element of the buffer\n            // it is expected that the items would be taken from the buffer in FIFO order\n            // instead of LIFO on try_get for buffer_node\n\n            std::size_t check_index = 0;\n\n            CHECK_MESSAGE(after_start == 1, \"try_put_and_wait should process only wait_message\");\n            CHECK_MESSAGE(processed_items[check_index++] == wait_message, \"Unexpected wait_message processing\");\n\n            for (auto item : start_work_items) {\n                CHECK_MESSAGE(processed_items[check_index++] == item, \"Unexpected start_work_items processing\");\n            }\n\n            for (auto item : new_work_items) {\n                CHECK_MESSAGE(processed_items[check_index++] == item, \"Unexpected start_work_items processing\");\n            }\n\n        }\n    }\n}\n#endif // __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n\n#include <iomanip>\n\n//! Test buffer_node with parallel and serial neighbours\n//! \\brief \\ref requirement \\ref error_guessing\nTEST_CASE(\"Serial and parallel test\"){\n    for (int p = 2; p <= 4; ++p) {\n        tbb::global_control thread_limit(tbb::global_control::max_allowed_parallelism, p);\n        tbb::task_arena arena(p);\n        arena.execute(\n            [&]() {\n                test_serial<int>();\n                test_parallel<int>(p);\n            }\n        );\n    }\n}\n\n//! Test reset and cancellation behavior\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Resets\"){\n    test_resets<int,tbb::flow::buffer_node<int> >();\n    test_resets<float,tbb::flow::buffer_node<float> >();\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n//! Test deprecated follows and precedes API\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Follows and precedes API\"){\n    test_follows_and_precedes_api();\n}\n#endif\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Test deduction guides\n//! \\brief \\ref requirement\nTEST_CASE(\"Deduction guides\"){\n    test_deduction_guides();\n}\n#endif\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test buffer_node try_put_and_wait\") {\n    test_buffer_node_try_put_and_wait();\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_buffering_try_put_and_wait.h",
    "content": "/*\n    Copyright (c) 2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef __TBB_test_tbb_buffering_try_put_and_wait_H\n#define __TBB_test_tbb_buffering_try_put_and_wait_H\n\n#include <oneapi/tbb/task_arena.h>\n#include <oneapi/tbb/flow_graph.h>\n\n#include <vector>\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n\nnamespace test_try_put_and_wait {\n\ntemplate <typename BufferingNode, typename... Args>\nstd::size_t test_buffer_push(const std::vector<int>& start_work_items,\n                             int wait_message,\n                             const std::vector<int>& new_work_items,\n                             std::vector<int>& processed_items,\n                             Args... args)\n{\n    std::size_t after_try_put_and_wait_start_index = 0;\n    tbb::task_arena arena(1);\n\n    arena.execute([&] {\n        tbb::flow::graph g;\n\n        using function_node_type = tbb::flow::function_node<int, int>;\n\n        BufferingNode buffer1(g, args...);\n\n        function_node_type function(g, tbb::flow::serial,\n            [&](int input) noexcept {\n                if (input == wait_message) {\n                    for (auto item : new_work_items) {\n                        buffer1.try_put(item);\n                    }\n                }\n                return input;\n            });\n\n        BufferingNode buffer2(g, args...);\n\n        function_node_type writer(g, tbb::flow::unlimited,\n            [&](int input) noexcept {\n                processed_items.emplace_back(input);\n                return 0;\n            });\n\n        tbb::flow::make_edge(buffer1, function);\n        tbb::flow::make_edge(function, buffer2);\n        tbb::flow::make_edge(buffer2, writer);\n\n        for (auto item : start_work_items) {\n            buffer1.try_put(item);\n        }\n\n        buffer1.try_put_and_wait(wait_message);\n\n        after_try_put_and_wait_start_index = processed_items.size();\n\n        g.wait_for_all();\n    });\n\n    return after_try_put_and_wait_start_index;\n}\n\ntemplate <typename BufferingNode, typename... Args>\nstd::size_t test_buffer_pull(const std::vector<int>& start_work_items,\n                             int wait_message,\n                             int occupier,\n                             const std::vector<int>& new_work_items,\n                             std::vector<int>& processed_items,\n                             Args... args)\n{\n    tbb::task_arena arena(1);\n    std::size_t after_try_put_and_wait_start_index = 0;\n\n    arena.execute([&] {\n        tbb::flow::graph g;\n\n        using function_node_type = tbb::flow::function_node<int, int, tbb::flow::rejecting>;\n\n        BufferingNode buffer(g, args...);\n\n        function_node_type function(g, tbb::flow::serial,\n            [&](int input) noexcept {\n                if (input == wait_message) {\n                    for (auto item : new_work_items) {\n                        buffer.try_put(item);\n                    }\n                }\n\n                processed_items.emplace_back(input);\n                return 0;\n            });\n\n        // Occupy the concurrency of function_node\n        // This call spawns the task to process the occupier\n        function.try_put(occupier);\n\n        // Make edge between buffer and function after occupying the concurrency\n        // To ensure that forward task of the buffer would be spawned after the occupier task\n        // And the function_node would reject the items from the buffer\n        // and process them later by calling try_get on the buffer\n        tbb::flow::make_edge(buffer, function);\n\n        for (auto item : start_work_items) {\n            buffer.try_put(item);\n        }\n\n        buffer.try_put_and_wait(wait_message);\n\n        after_try_put_and_wait_start_index = processed_items.size();\n\n        g.wait_for_all();\n    });\n\n    return after_try_put_and_wait_start_index;\n}\n\ntemplate <typename BufferingNode, typename... Args>\nstd::size_t test_buffer_reserve(std::size_t limiter_threshold,\n                                const std::vector<int>& start_work_items,\n                                int wait_message,\n                                const std::vector<int>& new_work_items,\n                                std::vector<int>& processed_items,\n                                Args... args)\n{\n    tbb::task_arena arena(1);\n    std::size_t after_try_put_and_wait_start_index = 0;\n\n    arena.execute([&] {\n        tbb::flow::graph g;\n\n        BufferingNode buffer(g, args...);\n\n        tbb::flow::limiter_node<int, int> limiter(g, limiter_threshold);\n        tbb::flow::function_node<int, int, tbb::flow::rejecting> function(g, tbb::flow::serial,\n            [&](int input) {\n                if (input == wait_message) {\n                    for (auto item : new_work_items) {\n                        buffer.try_put(item);\n                    }\n                }\n                // Explicitly put to the decrementer instead of making edge\n                // to guarantee that the next task would be spawned and not returned\n                // to the current thread as the next task\n                // Otherwise, all elements would be processed during the try_put_and_wait\n                limiter.decrementer().try_put(1);\n                processed_items.emplace_back(input);\n                return 0;\n            });\n\n        tbb::flow::make_edge(buffer, limiter);\n        tbb::flow::make_edge(limiter, function);\n\n        for (auto item : start_work_items) {\n            buffer.try_put(item);\n        }\n\n        buffer.try_put_and_wait(wait_message);\n\n        after_try_put_and_wait_start_index = processed_items.size();\n\n        g.wait_for_all();\n    });\n\n    return after_try_put_and_wait_start_index;\n}\n\n} // test_try_put_and_wait\n\n#endif // __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n#endif // __TBB_test_tbb_buffering_try_put_and_wait_H\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_collaborative_call_once.cpp",
    "content": "/*\n    Copyright (c) 2022-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n// unreachable code\n#pragma warning( push )\n#pragma warning( disable: 4702 )\n#endif\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"common/config.h\"\n\n// Include first to check missed header dependencies\n#include \"tbb/collaborative_call_once.h\"\n\n#include \"common/test.h\"\n#include \"common/exception_handling.h\"\n#include \"common/utils_concurrency_limit.h\"\n\n#include \"tbb/parallel_invoke.h\"\n#include \"tbb/parallel_reduce.h\"\n#include \"tbb/task_arena.h\"\n\n//! \\file test_collaborative_call_once.cpp\n//! \\brief Tests for [algorithms.collaborative_call_once] functionality\n\nstruct increment_functor {\n    int ct{0};\n\n    void operator()() {\n        ct++;\n    }\n};\n\nstruct sum_functor {\n    int sum{0};\n\n    template<typename T>\n    void operator()(T first_op) {\n        sum += first_op;\n    }\n\n    template<typename T, typename... Args>\n    void operator()(T first_op, Args&&... args) {\n        (*this)(first_op);\n        (*this)(std::forward<Args>(args)...);\n    }\n};\n\nstruct move_only_type {\n    const int* my_pointer;\n    move_only_type(move_only_type && other): my_pointer(other.my_pointer){ other.my_pointer=nullptr; }\n    explicit move_only_type(const int* value): my_pointer(value) {}\n};\n\n\nclass call_once_exception : public std::exception {};\n\ntemplate<typename Fn, typename... Args>\nvoid call_once_in_for_loop(std::size_t N, Fn&& body, Args&&... args) {\n    tbb::collaborative_once_flag flag;\n    for (std::size_t i = 0; i < N; ++i) {\n        tbb::collaborative_call_once(flag, std::forward<Fn>(body), std::forward<Args>(args)...);\n    }\n}\n\ntemplate<typename Fn, typename... Args>\nvoid call_once_in_parallel_for(std::size_t N, Fn&& body, Args&&... args) {\n    tbb::collaborative_once_flag flag;\n#if __TBB_GCC_PARAMETER_PACK_IN_LAMBDAS_BROKEN\n    auto stored_pack = tbb::detail::d0::save_pack(std::forward<Args>(args)...);\n    auto func = [&] { tbb::detail::d0::call(std::forward<Fn>(body), std::move(stored_pack)); };\n#endif // __TBB_GCC_PARAMETER_PACK_IN_LAMBDAS_BROKEN\n\n    tbb::parallel_for(tbb::blocked_range<size_t>(0, N), [&](const tbb::blocked_range<size_t>& range) {\n        for (size_t i = range.begin(); i != range.end(); ++i) {\n#if __TBB_GCC_PARAMETER_PACK_IN_LAMBDAS_BROKEN\n            tbb::collaborative_call_once(flag, func);\n#else\n            tbb::collaborative_call_once(flag, std::forward<Fn>(body), std::forward<Args>(args)...);\n#endif //__TBB_GCC_PARAMETER_PACK_IN_LAMBDAS_BROKEN\n        }\n    });\n}\n\ntemplate<typename Fn, typename... Args>\nvoid call_once_threads(std::size_t N, Fn&& body, Args&&... args) {\n    tbb::collaborative_once_flag flag;\n    std::vector<std::thread> threads;\n\n#if __TBB_GCC_PARAMETER_PACK_IN_LAMBDAS_BROKEN\n    auto stored_pack = tbb::detail::d0::save_pack(std::forward<Args>(args)...);\n    auto func = [&] { tbb::detail::d0::call(std::forward<Fn>(body), std::move(stored_pack)); };\n#endif // __TBB_GCC_PARAMETER_PACK_IN_LAMBDAS_BROKEN\n\n    for (std::size_t i = 0; i < N; ++i)\n    {\n        threads.push_back(std::thread([&]() {\n#if __TBB_GCC_PARAMETER_PACK_IN_LAMBDAS_BROKEN\n            tbb::collaborative_call_once(flag, func);\n#else\n            tbb::collaborative_call_once(flag, std::forward<Fn>(body), std::forward<Args>(args)...);\n#endif // __TBB_GCC_PARAMETER_PACK_IN_LAMBDAS_BROKEN\n        }));\n    }\n    for (auto& thread : threads) {\n        thread.join();\n    }\n}\n\n//! Test for functor to be called only once\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"only calls once 1\") {\n    {\n        increment_functor f;\n\n        call_once_in_for_loop(1024, f);\n\n        REQUIRE( f.ct == 1);\n    }\n    {\n        increment_functor f;\n\n        call_once_in_parallel_for(100, f);\n\n        REQUIRE(f.ct == 1);\n    }\n    {\n        increment_functor f;\n\n        call_once_threads(utils::get_platform_max_threads(), f);\n\n        REQUIRE(f.ct == 1);\n    }\n}\n\n//! Test for functor to be called only once\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"only calls once 2\") {\n    {\n        sum_functor f;\n\n        call_once_in_for_loop(1024, f, 1, 2, 3 ,4);\n\n        REQUIRE(f.sum == 10);\n    }\n    {\n        sum_functor f;\n\n        call_once_in_parallel_for(512, f, 1000, -1000);\n\n        REQUIRE(f.sum == 0);\n    }\n    {\n        sum_functor f;\n\n        call_once_threads(utils::get_platform_max_threads(), f, 0, -1, -5);\n\n        REQUIRE(f.sum == -6);\n    }\n}\n\n//! Test for correct handling move-only arguments\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"only calls once - move only argument\") {\n    const int value = 42;\n    int ready{0};\n\n    auto func = [&ready, &value] (move_only_type other) {\n        REQUIRE(other.my_pointer == &value);\n        ready++;\n    };\n\n    {\n        move_only_type mv(&value);\n\n        call_once_in_parallel_for(512, func, std::move(mv));\n\n        REQUIRE(ready == 1);\n        REQUIRE(mv.my_pointer == nullptr);\n    }\n\n    {\n        move_only_type mv(&value);\n\n        call_once_threads(utils::get_platform_max_threads(), func, std::move(mv));\n\n        REQUIRE(ready == 2);\n        REQUIRE(mv.my_pointer == nullptr);\n    }\n}\n\n#if !EMSCRIPTEN\n//! Stress test for functor to be called only once\n//! \\brief \\ref interface \\ref requirement \\ref stress\nTEST_CASE(\"only calls once - stress test\") {\n#if TBB_TEST_LOW_WORKLOAD\n    constexpr std::size_t N = 32;\n#elif __TBB_x86_32 || __arm__  || __ANDROID__\n    // Some C++ implementations allocate 8MB stacks for std::thread on 32 bit platforms\n    // that makes impossible to create more than ~500 threads.\n    // Android has been added to decrease testing time.\n    constexpr std::size_t N = tbb::detail::d0::max_nfs_size * 2;\n#elif __TBB_USE_THREAD_SANITIZER\n    // Reduce execution time under Thread Sanitizer\n    constexpr std::size_t N = tbb::detail::d0::max_nfs_size + 64;\n#else \n    constexpr std::size_t N = tbb::detail::d0::max_nfs_size * 4;\n#endif\n    {\n        increment_functor f;\n\n        call_once_threads(N, f);\n\n        REQUIRE(f.ct == 1);\n    }\n    {\n        increment_functor f;\n\n        utils::SpinBarrier barrier{N};\n        tbb::collaborative_once_flag flag;\n        utils::NativeParallelFor(N, [&](std::size_t) {\n            for (int i = 0; i < 100; ++i) {\n                REQUIRE(f.ct == i);\n                barrier.wait([&] {\n                    flag.~collaborative_once_flag();\n                    new (&flag) tbb::collaborative_once_flag{};\n                });\n                tbb::collaborative_call_once(flag, f);\n            }\n        });\n    }\n}\n#endif\n#if TBB_USE_EXCEPTIONS\n\n//! Test for collaborative_call_once exception handling\n//! \\brief \\ref error_guessing\nTEST_CASE(\"handles exceptions - state reset\") {\n    bool b{ false };\n    auto setB = [&b]() { b = true; };\n    auto setBAndCancel = [&b]() {\n        b = true;\n        throw call_once_exception{};\n    };\n\n    tbb::collaborative_once_flag flag;\n    REQUIRE_THROWS_AS(tbb::collaborative_call_once(flag, setBAndCancel), call_once_exception);\n    REQUIRE(b);\n\n    b = false;\n    REQUIRE_THROWS_AS(tbb::collaborative_call_once(flag, setBAndCancel), call_once_exception);\n    REQUIRE(b);\n\n    b = false;\n    tbb::collaborative_call_once(flag, setB);\n    REQUIRE(b);\n\n    b = false;\n    tbb::collaborative_call_once(flag, setB); // Now the call_once flag should be set.\n    REQUIRE(!b);\n\n    b = false;\n    REQUIRE_NOTHROW(tbb::collaborative_call_once(flag, setBAndCancel)); // Flag still set, so it shouldn't be called.\n    REQUIRE(!b);\n}\n\n//! Stress test for collaborative_call_once exception handling\n//! \\brief \\ref error_guessing \\ref stress\nTEST_CASE(\"handles exceptions - stress test\") {\n#if TBB_TEST_LOW_WORKLOAD\n    constexpr std::size_t N = 32;\n#elif __TBB_x86_32 || __arm__ || __ANDROID__\n    // Some C++ implementations allocate 8MB stacks for std::thread on 32 bit platforms\n    // that makes impossible to create more than ~500 threads.\n    // Android has been added to decrease testing time.\n    constexpr std::size_t N = tbb::detail::d0::max_nfs_size * 2;\n#else \n    constexpr std::size_t N = tbb::detail::d0::max_nfs_size * 4;\n#endif\n\n    int data{0};\n    std::atomic<bool> run_again{true};\n\n    auto throwing_func = [&] {\n        utils::doDummyWork(10000);\n        if (data < 100) {\n            data++;\n            throw call_once_exception{};\n        }\n        run_again = false;\n    };\n\n    tbb::collaborative_once_flag flag;\n\n    utils::NativeParallelFor(N, [&](std::size_t) {\n        while(run_again) {\n            try {\n                tbb::collaborative_call_once(flag, throwing_func);\n            } catch (const call_once_exception&) {\n                // We expecting only const call_once_exception&\n            } catch (...) {\n                FAIL(\"Unexpected exception\");\n            }\n        }\n    });\n    REQUIRE(data == 100);\n}\n\n#endif\n\n#if !EMSCRIPTEN\n//! Test for multiple help from moonlighting threads\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"multiple help\") {\n    std::size_t num_threads = utils::get_platform_max_threads();\n    utils::SpinBarrier barrier{num_threads};\n\n    tbb::collaborative_once_flag flag;\n\n    tbb::parallel_for<std::size_t>(0, num_threads, [&](std::size_t) {\n        barrier.wait();\n        tbb::collaborative_call_once(flag, [&] {\n            tbb::parallel_for<std::size_t>(0, num_threads, [&](std::size_t) {\n                barrier.wait();\n            });\n        });\n    });\n}\n#endif\n\n//! Test for collaborative work from different arenas\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"multiple arenas\") {\n    int num_threads = static_cast<int>(utils::get_platform_max_threads());\n    utils::SpinBarrier barrier(num_threads);\n    tbb::task_arena a1(num_threads), a2(num_threads);\n\n    tbb::collaborative_once_flag flag;\n    for (auto i = 0; i < num_threads - 1; ++i) {\n        a1.enqueue([&] {\n            barrier.wait();\n            barrier.wait();\n\n            tbb::collaborative_call_once(flag, [] {\n                FAIL(\"Unreachable code. collaborative_once_flag must be already initialized at this moment\");\n            });\n            // To sync collaborative_once_flag lifetime\n            barrier.wait();\n        });\n    }\n\n    barrier.wait();\n\n    a2.execute([&] {\n        utils::ConcurrencyTracker ct;\n        tbb::parallel_for(0, num_threads, [&](int) {\n            CHECK(utils::ConcurrencyTracker::PeakParallelism() == 1);\n        });\n        tbb::collaborative_call_once(flag, [&] {\n            barrier.wait();\n            tbb::parallel_for(0, num_threads, [&](int) {\n                barrier.wait();\n            });\n        });\n        // To sync collaborative_once_flag lifetime\n        barrier.wait();\n    });\n}\n\nusing FibBuffer = std::vector<std::pair<tbb::collaborative_once_flag, std::uint64_t>>;\nstd::uint64_t collaborative_recursive_fib(int n, FibBuffer& buffer) {\n    if (n <= 1) {\n        return 1;\n    }\n    tbb::collaborative_call_once(buffer[n].first, [&]() {\n        std::uint64_t a, b;\n        tbb::parallel_invoke([&] { a = collaborative_recursive_fib(n - 2, buffer); },\n                             [&] { b = collaborative_recursive_fib(n - 1, buffer); });\n        buffer[n].second = a + b;\n    });\n    return buffer[n].second;\n}\n\nstd::uint64_t collaborative_recursive_fib(int n) {\n    FibBuffer buffer(n);\n    return collaborative_recursive_fib(n-1, buffer);\n}\n\n//! Correctness test for Fibonacci example\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"fibonacci example\") {\n    constexpr int N = 93;\n    constexpr std::uint64_t expected_result = 12200160415121876738ull;\n\n    auto collaborative = collaborative_recursive_fib(N);\n\n    REQUIRE(collaborative == expected_result);\n}\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n#pragma warning( pop )\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_composite_node.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"common/config.h\"\n\n#include \"tbb/flow_graph.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/graph_utils.h\"\n\n#include <tuple>\n#include <cmath>\n#include <vector>\n\n\n//! \\file test_composite_node.cpp\n//! \\brief Test for [flow_graph.composite_node] specification\n\n\nstruct passthru_body {\n    int operator()( int i ) {\n        return i;\n    }\n};\n\nclass my_input_body{\n    int start;\n    int finish;\n    int step;\npublic:\n    my_input_body(int f, int s) : start(1), finish(f), step(s) {}\n    int operator()(tbb::flow_control& fc) {\n       int a = start;\n       if (start <= finish) {\n           a = start;\n           start+=step;\n           return a;\n       }\n       else {\n           fc.stop();\n           return int();\n       };\n   }\n};\n\nstruct m_fxn_body{\n    void operator()(int, tbb::flow::multifunction_node<int, std::tuple<int,int> >::output_ports_type ) {}\n};\n\nstruct ct_body {\nct_body(){}\n    void operator()(tbb::flow::continue_msg){}\n};\n\nstruct seq_body {\nstd::size_t operator()(int i) { return i; }\n};\n\ntemplate<int N, typename T1, typename T2>\nstruct compare {\n    static void compare_refs(T1 tuple1, T2 tuple2) {\n    CHECK_MESSAGE( ( &std::get<N>(tuple1) == &std::get<N>(tuple2)), \"ports not set correctly\");\n    compare<N-1, T1, T2>::compare_refs(tuple1, tuple2);\n    }\n};\n\ntemplate<typename T1, typename T2>\nstruct compare<1, T1, T2> {\n    static void compare_refs(T1 tuple1, T2 tuple2) {\n    CHECK_MESSAGE( (&std::get<0>(tuple1) == &std::get<0>(tuple2)), \"port 0 not correctly set\");\n    }\n};\n\nstruct tiny_node : public tbb::flow::composite_node< std::tuple< int >, std::tuple< int > > {\n    tbb::flow::function_node< int, int > f1;\n    tbb::flow::function_node< int, int > f2;\n    typedef tbb::flow::composite_node< std::tuple< int >, std::tuple< int > > base_type;\n\npublic:\n    tiny_node(tbb::flow::graph &g, bool hidden = false) : base_type(g), f1(g, tbb::flow::unlimited, passthru_body() ), f2(g, tbb::flow::unlimited, passthru_body() ) {\n        tbb::flow::make_edge(f1, f2);\n\n        std::tuple<tbb::flow::function_node< int, int >& > input_tuple(f1);\n        std::tuple<tbb::flow::function_node< int, int >& > output_tuple(f2);\n        base_type::set_external_ports(input_tuple, output_tuple);\n\n        if(hidden)\n            base_type::add_nodes(f1, f2);\n        else\n            base_type::add_visible_nodes(f1, f2);\n\n    }\n};\n\nint test_tiny(bool hidden = false) {\n    tbb::flow::graph g;\n    tbb::flow::function_node< int, int > f0( g, tbb::flow::unlimited, passthru_body() );\n    tiny_node t(g, hidden);\n    CHECK_MESSAGE( (&tbb::flow::input_port<0>(t) == &t.f1), \"f1 not bound to input port 0 in composite_node t\");\n    CHECK_MESSAGE( (&tbb::flow::output_port<0>(t) == &t.f2), \"f2 not bound to output port 0 in composite_node t\");\n\n    tiny_node t1(g, hidden);\n    CHECK_MESSAGE( (&std::get<0>(t1.input_ports()) == &t1.f1), \"f1 not bound to input port 0 in composite_node t1\");\n    CHECK_MESSAGE( (&std::get<0>(t1.output_ports()) == &t1.f2), \"f2 not bound to output port 0 in composite_node t1\");\n\n    test_input_ports_return_ref(t1);\n    test_output_ports_return_ref(t1);\n\n    tiny_node t2(g, hidden);\n    CHECK_MESSAGE( (&tbb::flow::input_port<0>(t2) == &t2.f1), \"f1 not bound to input port 0 in composite_node t2\");\n    CHECK_MESSAGE( (&tbb::flow::output_port<0>(t2) == &t2.f2), \"f2 not bound to output port 0 in composite_node t2\");\n\n    tbb::flow::function_node< int, int > f3( g, tbb::flow::unlimited, passthru_body() );\n    tbb::flow::make_edge( f0, t );\n    tbb::flow::make_edge( t, t1 );\n    tbb::flow::make_edge( t1, t2 );\n    tbb::flow::make_edge( t2 , f3 );\n    tbb::flow::queue_node<int> q(g);\n    tbb::flow::make_edge(f3, q);\n    f0.try_put(1);\n    g.wait_for_all();\n\n    int i, j =0;\n    q.try_get(i);\n    CHECK_MESSAGE( ( i == 1), \"item did not go through graph\");\n    q.try_get(j);\n    CHECK_MESSAGE( ( !j), \"unexpected item in graph\");\n    g.wait_for_all();\n\n    tbb::flow::remove_edge(f3, q);\n    tbb::flow::remove_edge(t2, f3);\n    tbb::flow::remove_edge(t1, t2);\n\n    tbb::flow::make_edge( t1 , f3 );\n    tbb::flow::make_edge(f3, q);\n\n    f0.try_put(2);\n    g.wait_for_all();\n\n    q.try_get(i);\n    CHECK_MESSAGE( ( i == 2), \"item did not go through graph after removal of edge\");\n    q.try_get(j);\n    CHECK_MESSAGE( ( !j), \"unexpected item in graph after removal of edge\");\n\n    return 0;\n}\n\nclass adder_node : public tbb::flow::composite_node< std::tuple< int, int >, std::tuple< int > > {\npublic:\n    tbb::flow::join_node< std::tuple< int, int >, tbb::flow::queueing > j;\n    tbb::flow::function_node< std::tuple< int, int >, int > f;\nprivate:\n    typedef tbb::flow::composite_node< std::tuple< int, int >, std::tuple< int > > base_type;\n\n    struct f_body {\n        int operator()( const std::tuple< int, int > &t ) {\n            return std::get<0>(t) + std::get<1>(t);\n        }\n    };\n\npublic:\n    adder_node(tbb::flow::graph &g, bool hidden = false) : base_type(g), j(g), f(g, tbb::flow::unlimited, f_body() ) {\n        tbb::flow::make_edge( j, f );\n\n        base_type::set_external_ports(base_type::input_ports_type(tbb::flow::input_port<0>(j), tbb::flow::input_port<1>(j)), base_type::output_ports_type(f));\n\n        if (hidden)\n            base_type::add_nodes(j, f);\n        else\n            base_type::add_visible_nodes(j, f);\n\n    }\n};\n\nstruct square_body { int operator()(int v) { return v*v; } };\nstruct cube_body { int operator()(int v) { return v*v*v; } };\nint adder_sum(int i) {\n    return (int)(pow(3*pow(i,3) + pow(i, 2),2));\n}\nint test_adder(bool hidden = false) {\n    tbb::flow::graph g;\n    tbb::flow::function_node<int,int> s(g, tbb::flow::unlimited, square_body());\n    tbb::flow::function_node<int,int> c(g, tbb::flow::unlimited, cube_body());\n    tbb::flow::function_node<int,int> p(g, tbb::flow::unlimited, passthru_body());\n\n    adder_node a0(g, hidden);\n    CHECK_MESSAGE( (&tbb::flow::input_port<0>(a0) == &tbb::flow::input_port<0>(a0.j)), \"input_port 0 of j not bound to input port 0 in composite_node a0\");\n    CHECK_MESSAGE( (&tbb::flow::input_port<1>(a0) == &tbb::flow::input_port<1>(a0.j)), \"input_port 1 of j not bound to input port 1 in composite_node a0\");\n    CHECK_MESSAGE( (&tbb::flow::output_port<0>(a0) == &a0.f), \"f not bound to output port 0 in composite_node a0\");\n\n    adder_node a1(g, hidden);\n    CHECK_MESSAGE( (&std::get<0>(a0.input_ports()) == &tbb::flow::input_port<0>(a0.j)), \"input_port 0 of j not bound to input port 0 in composite_node a1\");\n    CHECK_MESSAGE( (&std::get<1>(a0.input_ports()) == &tbb::flow::input_port<1>(a0.j)), \"input_port1 of j not bound to input port 1 in composite_node a1\");\n    CHECK_MESSAGE( (&std::get<0>(a0.output_ports()) == &a0.f), \"f not bound to output port 0 in composite_node a1\");\n\n    adder_node a2(g, hidden);\n    CHECK_MESSAGE( (&tbb::flow::input_port<0>(a2) == &tbb::flow::input_port<0>(a2.j)), \"input_port 0 of j not bound to input port 0 in composite_node a2\");\n    CHECK_MESSAGE( (&tbb::flow::input_port<1>(a2) == &tbb::flow::input_port<1>(a2.j)), \"input_port 1 of j not bound to input port 1 in composite_node a2\");\n    CHECK_MESSAGE( (&tbb::flow::output_port<0>(a2) == &a2.f), \"f not bound to output port 0 in composite_node a2\");\n\n    adder_node a3(g, hidden);\n    CHECK_MESSAGE( (&std::get<0>(a3.input_ports()) == &tbb::flow::input_port<0>(a3.j)), \"input_port 0 of j not bound to input port 0 in composite_node a3\");\n    CHECK_MESSAGE( (&std::get<1>(a3.input_ports()) == &tbb::flow::input_port<1>(a3.j)), \"input_port1 of j not bound to input port 1 in composite_node a3\");\n    CHECK_MESSAGE( (&std::get<0>(a3.output_ports()) == &a3.f), \"f not bound to output port 0 in composite_node a3\");\n\n    tbb::flow::function_node<int,int> s2(g, tbb::flow::unlimited, square_body());\n    tbb::flow::queue_node<int> q(g);\n\n    tbb::flow::make_edge( s, tbb::flow::input_port<0>(a0) );\n    tbb::flow::make_edge( c, tbb::flow::input_port<1>(a0) );\n\n    tbb::flow::make_edge( c, tbb::flow::input_port<0>(a1) );\n    tbb::flow::make_edge( c, tbb::flow::input_port<1>(a1) );\n\n    tbb::flow::make_edge( tbb::flow::output_port<0>(a0), tbb::flow::input_port<0>(a2) );\n    tbb::flow::make_edge( tbb::flow::output_port<0>(a1), tbb::flow::input_port<1>(a2) );\n\n    tbb::flow::make_edge( tbb::flow::output_port<0>(a2), s2 );\n    tbb::flow::make_edge( s2, q );\n\n    int sum_total=0;\n    int result=0;\n    for ( int i = 1; i < 4; ++i ) {\n        s.try_put(i);\n        c.try_put(i);\n        sum_total += adder_sum(i);\n        g.wait_for_all();\n    }\n\n    int j;\n    for ( int i = 1; i < 4; ++i ) {\n        q.try_get(j);\n        result += j;\n    }\n    g.wait_for_all();\n    CHECK_MESSAGE( (result == sum_total), \"the sum from the graph does not match the calculated value\");\n\n    tbb::flow::remove_edge(s2, q);\n    tbb::flow::remove_edge( a2, s2 );\n    tbb::flow::make_edge( a0, a3 );\n    tbb::flow::make_edge( a1, tbb::flow::input_port<1>(a3) );\n    tbb::flow::make_edge( a3, s2 );\n    tbb::flow::make_edge( s2, q );\n\n    sum_total=0;\n    result=0;\n    for ( int i = 10; i < 20; ++i ) {\n        s.try_put(i);\n        c.try_put(i);\n        sum_total += adder_sum(i);\n        g.wait_for_all();\n    }\n\n    for ( int i = 10; i < 20; ++i ) {\n        q.try_get(j);\n        result += j;\n    }\n    g.wait_for_all();\n    CHECK_MESSAGE( (result == sum_total), \"the new sum after the replacement of the nodes does not match the calculated value\");\n\n    return 0;\n}\n\n/*\n                                              outer composite node (outer_node)\n                                     |-------------------------------------------------------------------|\n                                     |                                                                   |\n                                     |  |------------------|  |------------------|  |------------------| |\n             |---------------------| |--| inner composite  | /| inner composite  | /| inner composite  | | |-------------------|\n             |broadcast node(input)|/|  | node             |/ | node             |/ | node             |-+-| queue node(output)|\n             |---------------------|\\|  |(inner_node1)     |\\ | (inner_node2)    |\\ | (inner_node3)    | | |-------------------|\n                                     |--|                  | \\|                  | \\|                  | |\n                                     |  |------------------|  |------------------|  |------------------| |\n                                     |                                                                   |\n                                     |-------------------------------------------------------------------|\n\n*/\nint test_nested_adder(bool hidden=false) {\n    tbb::flow::graph g;\n    tbb::flow::composite_node<std::tuple<int, int>, std::tuple<int> > outer_node(g);\n    typedef tbb::flow::composite_node<std::tuple<int, int>, std::tuple<int> > base_type;\n    tbb::flow::broadcast_node<int> input(g);\n    tbb::flow::queue_node<int> output(g);\n\n    adder_node inner_node1(g, hidden);\n    adder_node inner_node2(g, hidden);\n    adder_node inner_node3(g, hidden);\n\n    outer_node.set_external_ports(base_type::input_ports_type(tbb::flow::input_port<0>(inner_node1), tbb::flow::input_port<1>(inner_node1)), base_type::output_ports_type(tbb::flow::output_port<0>(inner_node3)));\n\n    CHECK_MESSAGE( (&tbb::flow::input_port<0>(outer_node) == &tbb::flow::input_port<0>(inner_node1)), \"input port 0 of inner_node1 not bound to input port 0 in outer_node\");\n    CHECK_MESSAGE( (&tbb::flow::input_port<1>(outer_node) == &tbb::flow::input_port<1>(inner_node1)), \"input port 1 of inner_node1 not bound to input port 1 in outer_node\");\n    CHECK_MESSAGE( (&tbb::flow::output_port<0>(outer_node) == &tbb::flow::output_port<0>(inner_node3)), \"output port 0 of inner_node3 not bound to output port 0 in outer_node\");\n\n    tbb::flow::make_edge(input, tbb::flow::input_port<0>(outer_node)/*inner_node1*/);\n    tbb::flow::make_edge(input, tbb::flow::input_port<1>(outer_node)/*inner_node1*/);\n\n    tbb::flow::make_edge(inner_node1, tbb::flow::input_port<0>(inner_node2));\n    tbb::flow::make_edge(inner_node1, tbb::flow::input_port<1>(inner_node2));\n\n    tbb::flow::make_edge(inner_node2, tbb::flow::input_port<0>(inner_node3));\n    tbb::flow::make_edge(inner_node2, tbb::flow::input_port<1>(inner_node3));\n\n    tbb::flow::make_edge(outer_node/*inner_node3*/, output);\n\n    if(hidden)\n        outer_node.add_nodes(inner_node1, inner_node2, inner_node3);\n    else\n        outer_node.add_visible_nodes(inner_node1, inner_node2, inner_node3);\n\n    int out;\n    for (int i = 1; i < 200000; ++i) {\n        input.try_put(i);\n        g.wait_for_all();\n        output.try_get(out);\n        CHECK_MESSAGE( (tbb::flow::output_port<0>(outer_node).try_get(out) == output.try_get(out)), \"output from outer_node does not match output from graph\");\n        CHECK_MESSAGE( (out == 8*i), \"output from outer_node not correct\");\n    }\n    g.wait_for_all();\n\n    return 0;\n}\n\ntemplate< typename T >\nclass prefix_node : public tbb::flow::composite_node< std::tuple< T, T, T, T, T >, std::tuple< T, T, T, T, T > > {\n    typedef std::tuple< T, T, T, T, T > my_tuple_t;\npublic:\n    tbb::flow::join_node< my_tuple_t, tbb::flow::queueing > j;\n    tbb::flow::split_node< my_tuple_t > s;\nprivate:\n    tbb::flow::function_node< my_tuple_t, my_tuple_t > f;\n    typedef tbb::flow::composite_node< my_tuple_t, my_tuple_t > base_type;\n\n    struct f_body {\n        my_tuple_t operator()( const my_tuple_t &t ) {\n            return my_tuple_t( std::get<0>(t),\n                               std::get<0>(t) + std::get<1>(t),\n                               std::get<0>(t) + std::get<1>(t) + std::get<2>(t),\n                               std::get<0>(t) + std::get<1>(t) + std::get<2>(t) + std::get<3>(t),\n                               std::get<0>(t) + std::get<1>(t) + std::get<2>(t) + std::get<3>(t) + std::get<4>(t) );\n        }\n    };\n\npublic:\n    prefix_node(tbb::flow::graph &g, bool hidden = false ) : base_type(g), j(g), s(g), f(g, tbb::flow::serial, f_body() ) {\n        tbb::flow::make_edge( j, f );\n        tbb::flow::make_edge( f, s );\n\n    typename base_type::input_ports_type input_tuple(tbb::flow::input_port<0>(j), tbb::flow::input_port<1>(j), tbb::flow::input_port<2>(j), tbb::flow::input_port<3>(j), tbb::flow::input_port<4>(j));\n\n    typename base_type::output_ports_type output_tuple(tbb::flow::output_port<0>(s), tbb::flow::output_port<1>(s), tbb::flow::output_port<2>(s), tbb::flow::output_port<3>(s), tbb::flow::output_port<4>(s));\n\n    base_type::set_external_ports(input_tuple, output_tuple);\n\n        if(hidden)\n            base_type::add_nodes(j,s,f);\n        else\n            base_type::add_visible_nodes(j,s,f);\n\n    }\n};\n\nint test_prefix(bool hidden = false) {\n    tbb::flow::graph g;\n    prefix_node<double> p(g, hidden);\n\n    CHECK_MESSAGE( (&std::get<0>(p.input_ports()) == &tbb::flow::input_port<0>(p.j)), \"input port 0 of j is not bound to input port 0 of composite node p\");\n    CHECK_MESSAGE( (&tbb::flow::input_port<1>(p.j) == &tbb::flow::input_port<1>(p.j)), \"input port 1 of j is not bound to input port 1 of composite node p\");\n    CHECK_MESSAGE( (&std::get<2>(p.input_ports()) == &tbb::flow::input_port<2>(p.j)), \"input port 2 of j is not bound to input port 2 of composite node p\");\n    CHECK_MESSAGE( (&tbb::flow::input_port<3>(p.j) == &tbb::flow::input_port<3>(p.j)), \"input port 3 of j is not bound to input port 3 of composite node p\");\n    CHECK_MESSAGE( (&std::get<4>(p.input_ports()) == &tbb::flow::input_port<4>(p.j)), \"input port 4 of j is not bound to input port 4 of composite node p\");\n\n\n    CHECK_MESSAGE( (&std::get<0>(p.output_ports()) == &tbb::flow::output_port<0>(p.s)), \"output port 0 of s is not bound to output port 0 of composite node p\");\n    CHECK_MESSAGE( (&tbb::flow::output_port<1>(p.s) == &tbb::flow::output_port<1>(p.s)), \"output port 1 of s is not bound to output port 1 of composite node p\");\n    CHECK_MESSAGE( (&std::get<2>(p.output_ports()) == &tbb::flow::output_port<2>(p.s)), \"output port 2 of s is not bound to output port 2 of composite node p\");\n    CHECK_MESSAGE( (&tbb::flow::output_port<3>(p.s) == &tbb::flow::output_port<3>(p.s)), \"output port 3 of s is not bound to output port 3 of composite node p\");\n    CHECK_MESSAGE( (&std::get<4>(p.output_ports()) == &tbb::flow::output_port<4>(p.s)), \"output port 4 of s is not bound to output port 4 of composite node p\");\n\n    std::vector< tbb::flow::queue_node<double> > v( 5, tbb::flow::queue_node<double>(g) );\n    tbb::flow::make_edge( tbb::flow::output_port<0>(p), v[0] );\n    tbb::flow::make_edge( tbb::flow::output_port<1>(p), v[1] );\n    tbb::flow::make_edge( tbb::flow::output_port<2>(p), v[2] );\n    tbb::flow::make_edge( tbb::flow::output_port<3>(p), v[3] );\n    tbb::flow::make_edge( tbb::flow::output_port<4>(p), v[4] );\n\n    for(  double offset = 1; offset < 10000; offset *= 10 ) {\n        tbb::flow::input_port<0>(p).try_put( offset );\n        tbb::flow::input_port<1>(p).try_put( offset + 1 );\n        tbb::flow::input_port<2>(p).try_put( offset + 2 );\n        tbb::flow::input_port<3>(p).try_put( offset + 3 );\n        tbb::flow::input_port<4>(p).try_put( offset + 4 );\n    }\n    g.wait_for_all();\n\n    double x;\n    while ( v[0].try_get(x) ) {\n        g.wait_for_all();\n        for ( int i = 1; i < 5; ++i ) {\n            v[i].try_get(x);\n            g.wait_for_all();\n        }\n    }\n    return 0;\n}\n\nstruct input_only_output_only_seq {\n    std::size_t operator()(int i) {\n        CHECK(i > 0);\n        return std::size_t((i + 3) / 4 - 1);\n    }\n};\n\nvoid input_only_output_only_composite(bool hidden) {\n    tbb::flow::graph g;\n\n    tbb::flow::composite_node<std::tuple<int>, std::tuple<int> > input_output(g);\n\n    typedef tbb::flow::composite_node<std::tuple<int>, std::tuple<> > input_only_composite;\n    typedef tbb::flow::composite_node<std::tuple<>, std::tuple<int> > output_only_composite;\n\n    typedef tbb::flow::input_node<int> src_type;\n    typedef tbb::flow::queue_node<int> q_type;\n    typedef tbb::flow::function_node<int, int> f_type;\n    typedef tbb::flow::sequencer_node<int> sequencer_type;\n\n    int num = 0;\n    int finish=1000;\n    int step = 4;\n\n    input_only_composite a_in(g);\n    output_only_composite a_out(g);\n\n    src_type src(g, my_input_body(finish, step));\n    q_type que(g);\n    f_type f(g, 1, passthru_body());\n\n    // Sequencer_node is needed, because serial function_node guarantees only serial body execution,\n    // not a sequential order of messages dispatch\n    sequencer_type seq(g, input_only_output_only_seq());\n\n    std::tuple<f_type& > input_tuple(f);\n    a_in.set_external_ports(input_tuple);\n    CHECK_MESSAGE( (&std::get<0>(a_in.input_ports()) == &f), \"f not bound to input port 0 in composite_node a_in\");\n\n    std::tuple<src_type&> output_tuple(src);\n    a_out.set_external_ports(output_tuple);\n    CHECK_MESSAGE( (&std::get<0>(a_out.output_ports()) == &src), \"src not bound to output port 0 in composite_node a_out\");\n\n    if(hidden) {\n        a_in.add_nodes(f, seq, que);\n        a_out.add_nodes(src);\n    } else {\n        a_in.add_visible_nodes(f, seq, que);\n        a_out.add_visible_nodes(src);\n    }\n\n    tbb::flow::make_edge(a_out, a_in);\n    tbb::flow::make_edge(f, seq);\n    tbb::flow::make_edge(seq, que);\n    src.activate();\n    g.wait_for_all();\n\n    for(int i = 1; i<finish/step; ++i) {\n        que.try_get(num);\n        CHECK_MESSAGE( (num == 4*i - 3), \"number does not match position in sequence\");\n    }\n    g.wait_for_all();\n}\n\n//! Test single node inside composite nodes\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Tiny tests\"){\n    test_tiny(false);\n    test_tiny(true);\n}\n\n//! Test basic adders in composite node\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Adder tests\"){\n    test_adder(false);\n    test_adder(true);\n}\n\n//! Test nested adders in composite node\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Nested adder tests\"){\n    test_nested_adder(true);\n    test_nested_adder(false);\n}\n\n//! Test returning a subset of inputs\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Prefix test\"){\n    test_prefix(false);\n    test_prefix(true);\n}\n\n//! Test input-only composite node\n//! \\brief \\ref error_guessing \\ref boundary\nTEST_CASE(\"Input-only composite\"){\n    input_only_output_only_composite(true);\n    input_only_output_only_composite(false);\n}\n\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_concurrent_hash_map.cpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if _MSC_VER\n#if __INTEL_COMPILER\n    #pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#else\n    // Workaround for vs2015 and warning name was longer than the compiler limit (4096).\n    #pragma warning (disable: 4503)\n#endif\n#endif\n\n#define TBB_DEFINE_STD_HASH_SPECIALIZATIONS 1\n#define TBB_PREVIEW_CONCURRENT_HASH_MAP_EXTENSIONS 1\n#include <common/test.h>\n#include <common/utils.h>\n#include <common/range_based_for_support.h>\n#include <common/custom_allocators.h>\n#include <common/containers_common.h>\n#include <common/concepts_common.h>\n#include <tbb/concurrent_hash_map.h>\n#include <tbb/parallel_for.h>\n#include <common/concurrent_associative_common.h>\n#include <vector>\n#include <list>\n#include <algorithm>\n#include <functional>\n#include <scoped_allocator>\n#include <mutex>\n\n//! \\file test_concurrent_hash_map.cpp\n//! \\brief Test for [containers.concurrent_hash_map containers.tbb_hash_compare] specification\n\nvoid TestRangeBasedFor(){\n    using namespace range_based_for_support_tests;\n\n    INFO(\"testing range based for loop compatibility \\n\");\n    using ch_map = tbb::concurrent_hash_map<int,int>;\n    ch_map a_ch_map;\n\n    const int sequence_length = 100;\n    for (int i = 1; i <= sequence_length; ++i){\n        a_ch_map.insert(ch_map::value_type(i,i));\n    }\n\n    REQUIRE_MESSAGE((range_based_for_accumulate(a_ch_map, pair_second_summer(), 0) == gauss_summ_of_int_sequence(sequence_length)),\n        \"incorrect accumulated value generated via range based for ?\");\n}\n\n// The helper to run a test only when a default construction is present.\ntemplate <bool default_construction_present> struct do_default_construction_test {\n    template<typename FuncType> void operator() ( FuncType func ) const { func(); }\n};\n\ntemplate <> struct do_default_construction_test<false> {\n    template<typename FuncType> void operator()( FuncType ) const {}\n};\n\ntemplate <typename Table>\nclass test_insert_by_key {\n    using value_type = typename Table::value_type;\n    Table &my_c;\n    const value_type &my_value;\npublic:\n    test_insert_by_key( Table &c, const value_type &value ) : my_c(c), my_value(value) {}\n    void operator()() const {\n        {\n            typename Table::accessor a;\n            CHECK(my_c.insert( a, my_value.first ));\n            CHECK(utils::IsEqual()(a->first, my_value.first));\n            a->second = my_value.second;\n        }\n        {\n            typename Table::const_accessor ca;\n            CHECK(!my_c.insert( ca, my_value.first ));\n            CHECK(utils::IsEqual()(ca->first, my_value.first));\n            CHECK(utils::IsEqual()(ca->second, my_value.second));\n        }\n    }\n};\n\ntemplate <typename Table, typename Iterator, typename Range = typename Table::range_type>\nclass test_range {\n    using value_type = typename Table::value_type;\n    Table &my_c;\n    const std::list<value_type> &my_lst;\n    std::vector<detail::atomic_type<bool>>& my_marks;\npublic:\n    test_range( Table &c, const std::list<value_type> &lst, std::vector<detail::atomic_type<bool>> &marks ) : my_c(c), my_lst(lst), my_marks(marks) {\n        for (std::size_t i = 0; i < my_marks.size(); ++i) {\n            my_marks[i].store(false, std::memory_order_relaxed);\n        }\n    }\n\n    void operator()( const Range &r ) const { do_test_range( r.begin(), r.end() ); }\n    void do_test_range( Iterator i, Iterator j ) const {\n        for ( Iterator it = i; it != j; ) {\n            Iterator it_prev = it++;\n            typename std::list<value_type>::const_iterator it2 = std::search( my_lst.begin(), my_lst.end(), it_prev, it, utils::IsEqual() );\n            CHECK(it2 != my_lst.end());\n            typename std::list<value_type>::difference_type dist = std::distance( my_lst.begin(), it2 );\n            CHECK(!my_marks[dist]);\n            my_marks[dist].store(true);\n        }\n    }\n};\n\ntemplate <bool default_construction_present, typename Table>\nclass check_value {\n    using const_iterator = typename Table::const_iterator;\n    using iterator = typename Table::iterator;\n    using size_type = typename Table::size_type;\n    Table &my_c;\npublic:\n    check_value( Table &c ) : my_c(c) {}\n    void operator()(const typename Table::value_type &value ) {\n        const Table &const_c = my_c;\n        CHECK(my_c.count( value.first ) == 1);\n        { // tests with a const accessor.\n            typename Table::const_accessor ca;\n            // find\n            CHECK(my_c.find( ca, value.first ));\n            CHECK(!ca.empty() );\n            CHECK(utils::IsEqual()(ca->first, value.first));\n            CHECK(utils::IsEqual()(ca->second, value.second));\n            // erase\n            CHECK(my_c.erase( ca ));\n            CHECK(my_c.count( value.first ) == 0);\n            // insert (pair)\n            CHECK(my_c.insert( ca, value ));\n            CHECK(utils::IsEqual()(ca->first, value.first));\n            CHECK(utils::IsEqual()(ca->second, value.second));\n        } { // tests with a non-const accessor.\n            typename Table::accessor a;\n            // find\n            CHECK(my_c.find( a, value.first ));\n            CHECK(!a.empty() );\n            CHECK(utils::IsEqual()(a->first, value.first));\n            CHECK(utils::IsEqual()(a->second, value.second));\n            // erase\n            CHECK(my_c.erase( a ));\n            CHECK(my_c.count( value.first ) == 0);\n            // insert\n            CHECK(my_c.insert( a, value ));\n            CHECK(utils::IsEqual()(a->first, value.first));\n            CHECK(utils::IsEqual()(a->second, value.second));\n        }\n        // erase by key\n        CHECK(my_c.erase( value.first ));\n        CHECK(my_c.count( value.first ) == 0);\n        do_default_construction_test<default_construction_present>()(test_insert_by_key<Table>( my_c, value ));\n        // insert by value\n        CHECK(my_c.insert( value ) != default_construction_present);\n        // equal_range\n        std::pair<iterator,iterator> r1 = my_c.equal_range( value.first );\n        iterator r1_first_prev = r1.first++;\n        CHECK((utils::IsEqual()( *r1_first_prev, value ) && utils::IsEqual()( r1.first, r1.second )));\n        std::pair<const_iterator,const_iterator> r2 = const_c.equal_range( value.first );\n        const_iterator r2_first_prev = r2.first++;\n        CHECK((utils::IsEqual()( *r2_first_prev, value ) && utils::IsEqual()( r2.first, r2.second )));\n    }\n};\n\ntemplate <typename Value, typename U = Value>\nstruct CompareTables {\n    template <typename T>\n    static bool IsEqual( const T& t1, const T& t2 ) {\n        return (t1 == t2) && !(t1 != t2);\n    }\n};\n\ntemplate <typename U>\nstruct CompareTables< std::pair<const std::weak_ptr<U>, std::weak_ptr<U> > > {\n    template <typename T>\n    static bool IsEqual( const T&, const T& ) {\n        /* do nothing for std::weak_ptr */\n        return true;\n    }\n};\n\ntemplate <bool default_construction_present, typename Table>\nvoid Examine( Table c, const std::list<typename Table::value_type> &lst) {\n    using const_table = const Table;\n    using const_iterator = typename Table::const_iterator;\n    using iterator = typename Table::iterator;\n    using value_type = typename Table::value_type;\n    using size_type = typename Table::size_type;\n\n    CHECK(!c.empty());\n    CHECK(c.size() == lst.size());\n    CHECK(c.max_size() >= c.size());\n\n    const check_value<default_construction_present, Table> cv(c);\n    std::for_each( lst.begin(), lst.end(), cv );\n\n    std::vector<detail::atomic_type<bool>> marks( lst.size() );\n\n    test_range<Table,iterator>( c, lst, marks ).do_test_range( c.begin(), c.end() );\n    CHECK(std::find( marks.begin(), marks.end(), false ) == marks.end());\n\n    test_range<const_table,const_iterator>( c, lst, marks ).do_test_range( c.begin(), c.end() );\n    CHECK(std::find( marks.begin(), marks.end(), false ) == marks.end());\n\n    using range_type = typename Table::range_type;\n    tbb::parallel_for( c.range(), test_range<Table,typename range_type::iterator,range_type>( c, lst, marks ) );\n    CHECK(std::find( marks.begin(), marks.end(), false ) == marks.end());\n\n    const_table const_c = c;\n    CHECK(CompareTables<value_type>::IsEqual( c, const_c ));\n\n    const size_type new_bucket_count = 2*c.bucket_count();\n    c.rehash( new_bucket_count );\n    CHECK(c.bucket_count() >= new_bucket_count);\n\n    Table c2;\n    typename std::list<value_type>::const_iterator begin5 = lst.begin();\n    std::advance( begin5, 5 );\n    c2.insert( lst.begin(), begin5 );\n    std::for_each( lst.begin(), begin5, check_value<default_construction_present, Table>( c2 ) );\n\n    c2.swap( c );\n    CHECK(CompareTables<value_type>::IsEqual( c2, const_c ));\n    CHECK(c.size() == 5);\n    std::for_each( lst.begin(), lst.end(), check_value<default_construction_present,Table>(c2) );\n\n    swap( c, c2 );\n    CHECK(CompareTables<value_type>::IsEqual( c, const_c ));\n    CHECK(c2.size() == 5);\n\n    c2.clear();\n    CHECK(CompareTables<value_type>::IsEqual( c2, Table() ));\n\n    typename Table::allocator_type a = c.get_allocator();\n    value_type *ptr = a.allocate(1);\n    CHECK(ptr);\n    a.deallocate( ptr, 1 );\n}\n\ntemplate <typename T>\nstruct debug_hash_compare : public tbb::detail::d1::tbb_hash_compare<T> {};\n\ntemplate <bool default_construction_present, typename Value>\nvoid TypeTester( const std::list<Value> &lst ) {\n    using first_type = typename Value::first_type;\n    using key_type = typename std::remove_const<first_type>::type;\n    using second_type = typename Value::second_type;\n    using ch_map = tbb::concurrent_hash_map<key_type, second_type>;\n    debug_hash_compare<key_type> compare{};\n    // Construct an empty hash map.\n    ch_map c1;\n    c1.insert( lst.begin(), lst.end() );\n    Examine<default_construction_present>( c1, lst );\n\n    // Constructor from initializer_list.\n    typename std::list<Value>::const_iterator it = lst.begin();\n    std::initializer_list<Value> il = { *it++, *it++, *it++ };\n    ch_map c2( il );\n    c2.insert( it, lst.end() );\n    Examine<default_construction_present>( c2, lst );\n\n    // Constructor from initializer_list and compare object\n    ch_map c3( il, compare);\n    c3.insert( it, lst.end() );\n    Examine<default_construction_present>( c3, lst );\n\n    // Constructor from initializer_list, compare object and allocator\n    ch_map c4( il, compare, typename ch_map::allocator_type());\n    c4.insert( it, lst.end());\n    Examine<default_construction_present>( c4, lst );\n\n    // Copying constructor.\n    ch_map c5(c1);\n    Examine<default_construction_present>( c5, lst );\n    // Construct with non-default allocator\n    using ch_map_debug_alloc = tbb::concurrent_hash_map<key_type, second_type,\n                                                        tbb::detail::d1::tbb_hash_compare<key_type>,\n                                                        LocalCountingAllocator<std::allocator<Value>>>;\n    ch_map_debug_alloc c6;\n    c6.insert( lst.begin(), lst.end() );\n    Examine<default_construction_present>( c6, lst );\n    // Copying constructor\n    ch_map_debug_alloc c7(c6);\n    Examine<default_construction_present>( c7, lst );\n    // Construction empty table with n preallocated buckets.\n    ch_map c8( lst.size() );\n    c8.insert( lst.begin(), lst.end() );\n    Examine<default_construction_present>( c8, lst );\n    ch_map_debug_alloc c9( lst.size() );\n    c9.insert( lst.begin(), lst.end() );\n    Examine<default_construction_present>( c9, lst );\n    // Construction with copying iteration range.\n    ch_map c10_1( c1.begin(), c1.end() ), c10_2(c1.cbegin(), c1.cend());\n    Examine<default_construction_present>( c10_1, lst );\n    Examine<default_construction_present>( c10_2, lst );\n    // Construction with copying iteration range and given allocator instance.\n    LocalCountingAllocator<std::allocator<Value>> allocator;\n    ch_map_debug_alloc c11( lst.begin(), lst.end(), allocator );\n    Examine<default_construction_present>( c11, lst );\n\n    using ch_map_debug_hash = tbb::concurrent_hash_map<key_type, second_type,\n                                                       debug_hash_compare<key_type>,\n                                                       typename ch_map::allocator_type>;\n\n    // Constructor with two iterators and hash_compare\n    ch_map_debug_hash c12(c1.begin(), c1.end(), compare);\n    Examine<default_construction_present>( c12, lst );\n\n    ch_map_debug_hash c13(c1.begin(), c1.end(), compare, typename ch_map::allocator_type());\n    Examine<default_construction_present>( c13, lst );\n}\n\nvoid TestSpecificTypes() {\n    const int NUMBER = 10;\n\n    using int_int_t = std::pair<const int, int>;\n    std::list<int_int_t> arrIntInt;\n    for ( int i=0; i<NUMBER; ++i ) arrIntInt.push_back( int_int_t(i, NUMBER-i) );\n    TypeTester</*default_construction_present = */true>( arrIntInt );\n\n    using ref_int_t = std::pair<const std::reference_wrapper<const int>, int>;\n    std::list<ref_int_t> arrRefInt;\n    for ( std::list<int_int_t>::iterator it = arrIntInt.begin(); it != arrIntInt.end(); ++it )\n        arrRefInt.push_back( ref_int_t( it->first, it->second ) );\n    TypeTester</*default_construction_present = */true>( arrRefInt );\n\n    using int_ref_t = std::pair< const int, std::reference_wrapper<int> >;\n    std::list<int_ref_t> arrIntRef;\n    for ( std::list<int_int_t>::iterator it = arrIntInt.begin(); it != arrIntInt.end(); ++it )\n        arrIntRef.push_back( int_ref_t( it->first, it->second ) );\n    TypeTester</*default_construction_present = */false>( arrIntRef );\n\n    using shr_shr_t = std::pair< const std::shared_ptr<int>, std::shared_ptr<int> >;\n    std::list<shr_shr_t> arrShrShr;\n    for ( int i=0; i<NUMBER; ++i ) {\n        const int NUMBER_minus_i = NUMBER - i;\n        arrShrShr.push_back( shr_shr_t( std::make_shared<int>(i), std::make_shared<int>(NUMBER_minus_i) ) );\n    }\n    TypeTester< /*default_construction_present = */true>( arrShrShr );\n\n    using wk_wk_t = std::pair< const std::weak_ptr<int>, std::weak_ptr<int> >;\n    std::list< wk_wk_t > arrWkWk;\n    std::copy( arrShrShr.begin(), arrShrShr.end(), std::back_inserter(arrWkWk) );\n    TypeTester< /*default_construction_present = */true>( arrWkWk );\n\n    // Check working with deprecated hashers\n    using pair_key_type = std::pair<int, int>;\n    using pair_int_t = std::pair<const pair_key_type, int>;\n    std::list<pair_int_t> arr_pair_int;\n    for (int i = 0; i < NUMBER; ++i) {\n        arr_pair_int.push_back(pair_int_t(pair_key_type{i, i}, i));\n    }\n    TypeTester</*default_construction_present = */true>(arr_pair_int);\n\n    using tbb_string_key_type = std::basic_string<char, std::char_traits<char>, tbb::tbb_allocator<char>>;\n    using pair_tbb_string_int_t = std::pair<const tbb_string_key_type, int>;\n    std::list<pair_tbb_string_int_t> arr_pair_string_int;\n    for (int i = 0; i < NUMBER; ++i) {\n        tbb_string_key_type key(i, char(i));\n        arr_pair_string_int.push_back(pair_tbb_string_int_t(key, i));\n    }\n    TypeTester</*default_construction_present = */true>(arr_pair_string_int);\n}\n\nstruct custom_hash_compare {\n    template<typename Allocator>\n    size_t hash(const AllocatorAwareData<Allocator>& key) const {\n        return my_hash_compare.hash(key.value());\n    }\n\n    template<typename Allocator>\n    bool equal(const AllocatorAwareData<Allocator>& key1, const AllocatorAwareData<Allocator>& key2) const {\n        return my_hash_compare.equal(key1.value(), key2.value());\n    }\n\nprivate:\n    tbb::tbb_hash_compare<int> my_hash_compare;\n};\n\nvoid TestScopedAllocator() {\n    using allocator_data_type = AllocatorAwareData<std::scoped_allocator_adaptor<tbb::tbb_allocator<int>>>;\n    using allocator_type = std::scoped_allocator_adaptor<tbb::tbb_allocator<std::pair<const allocator_data_type, allocator_data_type>>>;\n    using hash_map_type = tbb::concurrent_hash_map<allocator_data_type, allocator_data_type,\n                                                   custom_hash_compare, allocator_type>;\n\n    allocator_type allocator;\n    allocator_data_type key1(1, allocator), key2(2, allocator);\n    allocator_data_type data1(1, allocator), data2(data1, allocator);\n    hash_map_type map1(allocator), map2(allocator);\n\n    hash_map_type::value_type v1(key1, data1), v2(key2, data2);\n\n    auto init_list = { v1, v2 };\n\n    allocator_data_type::assert_on_constructions = true;\n    map1.emplace(key1, data1);\n    map2.emplace(key2, std::move(data2));\n\n    map1.clear();\n    map2.clear();\n\n    map1.insert(v1);\n    map2.insert(std::move(v2));\n\n    map1.clear();\n    map2.clear();\n\n    map1.insert(init_list);\n\n    map1.clear();\n    map2.clear();\n\n    hash_map_type::accessor a;\n    map2.insert(a, allocator_data_type(3));\n    a.release();\n\n    map1 = map2;\n    map2 = std::move(map1);\n\n    hash_map_type map3(allocator);\n    map3.rehash(1000);\n    map3 = map2;\n}\n\n// A test for undocumented member function internal_fast_find\n// which is declared protected in concurrent_hash_map for internal TBB use\nvoid TestInternalFastFind() {\n    typedef tbb::concurrent_hash_map<int, int> basic_chmap_type;\n    typedef basic_chmap_type::const_pointer const_pointer;\n\n    class chmap : public basic_chmap_type {\n    public:\n        chmap() : basic_chmap_type() {}\n\n        using basic_chmap_type::internal_fast_find;\n    };\n\n    chmap m;\n    int sz = 100;\n\n    for (int i = 0; i != sz; ++i) {\n        m.insert(std::make_pair(i, i * i));\n    }\n    REQUIRE_MESSAGE(m.size() == 100, \"Incorrect concurrent_hash_map size\");\n\n    for (int i = 0; i != sz; ++i) {\n        const_pointer res = m.internal_fast_find(i);\n        REQUIRE_MESSAGE(res != nullptr, \"Incorrect internal_fast_find return value for existing key\");\n        basic_chmap_type::value_type val = *res;\n        REQUIRE_MESSAGE(val.first == i, \"Incorrect key in internal_fast_find return value\");\n        REQUIRE_MESSAGE(val.second == i * i, \"Incorrect mapped in internal_fast_find return value\");\n    }\n\n    for (int i = sz; i != 2 * sz; ++i) {\n        const_pointer res = m.internal_fast_find(i);\n        REQUIRE_MESSAGE(res == nullptr, \"Incorrect internal_fast_find return value for not existing key\");\n    }\n}\n\nstruct default_container_traits {\n    template <typename container_type, typename iterator_type>\n    static container_type& construct_container(typename std::aligned_storage<sizeof(container_type)>::type& storage, iterator_type begin, iterator_type end){\n        container_type* ptr = reinterpret_cast<container_type*>(&storage);\n        new (ptr) container_type(begin, end);\n        return *ptr;\n    }\n\n    template <typename container_type, typename iterator_type, typename allocator_type>\n    static container_type& construct_container(typename std::aligned_storage<sizeof(container_type)>::type& storage, iterator_type begin, iterator_type end, allocator_type const& a){\n        container_type* ptr = reinterpret_cast<container_type*>(&storage);\n        new (ptr) container_type(begin, end, a);\n        return *ptr;\n    }\n};\n\nstruct hash_map_traits : default_container_traits {\n    enum{ expected_number_of_items_to_allocate_for_steal_move = 0 };\n\n    template<typename T>\n    struct hash_compare {\n        bool equal( const T& lhs, const T& rhs ) const {\n            return lhs==rhs;\n        }\n        size_t hash( const T& k ) const {\n            return my_hash_func(k);\n        }\n        std::hash<T> my_hash_func;\n    };\n\n    template <typename T, typename Allocator>\n    using container_type = tbb::concurrent_hash_map<T, T, hash_compare<T>, Allocator>;\n\n    template <typename T>\n    using container_value_type = std::pair<const T, T>;\n\n    template<typename element_type, typename allocator_type>\n    struct apply {\n        using type = tbb::concurrent_hash_map<element_type, element_type, hash_compare<element_type>, allocator_type>;\n    };\n\n    using init_iterator_type = move_support_tests::FooPairIterator;\n    template <typename hash_map_type, typename iterator>\n    static bool equal(hash_map_type const& c, iterator begin, iterator end){\n        bool equal_sizes = ( static_cast<size_t>(std::distance(begin, end)) == c.size() );\n        if (!equal_sizes)\n            return false;\n\n        for (iterator it = begin; it != end; ++it ){\n            if (c.count( (*it).first) == 0){\n                return false;\n            }\n        }\n        return true;\n    }\n};\n\ntemplate <bool SimulateReacquiring>\nclass MinimalisticMutex {\npublic:\n    static constexpr bool is_rw_mutex = true;\n    static constexpr bool is_recursive_mutex = false;\n    static constexpr bool is_fair_mutex = false;\n\n    class scoped_lock {\n    public:\n        constexpr scoped_lock() noexcept : my_mutex_ptr(nullptr) {}\n\n        scoped_lock( MinimalisticMutex& m, bool = true ) : my_mutex_ptr(&m) {\n            my_mutex_ptr->my_mutex.lock();\n        }\n\n        scoped_lock( const scoped_lock& ) = delete;\n        scoped_lock& operator=( const scoped_lock& ) = delete;\n\n        ~scoped_lock() {\n            if (my_mutex_ptr) release();\n        }\n\n        void acquire( MinimalisticMutex& m, bool = true ) {\n            CHECK(my_mutex_ptr == nullptr);\n            my_mutex_ptr = &m;\n            my_mutex_ptr->my_mutex.lock();\n        }\n\n        bool try_acquire( MinimalisticMutex& m, bool = true ) {\n            if (m.my_mutex.try_lock()) {\n                my_mutex_ptr = &m;\n                return true;\n            }\n            return false;\n        }\n\n        void release() {\n            CHECK(my_mutex_ptr != nullptr);\n            my_mutex_ptr->my_mutex.unlock();\n            my_mutex_ptr = nullptr;\n        }\n\n        bool upgrade_to_writer() const {\n            // upgrade_to_writer should return false if the mutex simulates\n            // reacquiring the lock on upgrade operation\n            return !SimulateReacquiring;\n        }\n\n        bool downgrade_to_reader() const {\n            // downgrade_to_reader should return false if the mutex simulates\n            // reacquiring the lock on upgrade operation\n            return !SimulateReacquiring;\n        }\n\n        bool is_writer() const {\n            CHECK(my_mutex_ptr != nullptr);\n            return true; // Always a writer\n        }\n\n    private:\n        MinimalisticMutex* my_mutex_ptr;\n    }; // class scoped_lock\nprivate:\n    std::mutex my_mutex;\n}; // class MinimalisticMutex\n\ntemplate <bool SimulateReacquiring>\nvoid test_with_minimalistic_mutex() {\n    using mutex_type = MinimalisticMutex<SimulateReacquiring>;\n    using chmap_type = tbb::concurrent_hash_map<int, int, tbb::tbb_hash_compare<int>,\n                                                tbb::tbb_allocator<std::pair<const int, int>>,\n                                                mutex_type>;\n\n    chmap_type chmap;\n\n    // Insert pre-existing elements\n    for (int i = 0; i < 100; ++i) {\n        bool result = chmap.emplace(i, i);\n        CHECK(result);\n    }\n\n    // Insert elements to erase\n    for (int i = 10000; i < 10005; ++i) {\n        bool result = chmap.emplace(i, i);\n        CHECK(result);\n    }\n\n    auto thread_body = [&]( const tbb::blocked_range<std::size_t>& range ) {\n        for (std::size_t item = range.begin(); item != range.end(); ++item) {\n            switch(item % 4) {\n                case 0 :\n                    // Insert new elements\n                    for (int i = 100; i < 200; ++i) {\n                        typename chmap_type::const_accessor acc;\n                        chmap.emplace(acc, i, i);\n                        CHECK(acc->first == i);\n                        CHECK(acc->second == i);\n                    }\n                    break;\n                case 1 :\n                    // Insert pre-existing elements\n                    for (int i = 0; i < 100; ++i) {\n                        typename chmap_type::const_accessor acc;\n                        bool result = chmap.emplace(acc, i, i * 10000);\n                        CHECK(!result);\n                        CHECK(acc->first == i);\n                        CHECK(acc->second == i);\n                    }\n                    break;\n                case 2 :\n                    // Find pre-existing elements\n                    for (int i = 0; i < 100; ++i) {\n                        typename chmap_type::const_accessor acc;\n                        bool result = chmap.find(acc, i);\n                        CHECK(result);\n                        CHECK(acc->first == i);\n                        CHECK(acc->second == i);\n                    }\n                    break;\n                case 3 :\n                    // Erase pre-existing elements\n                    for (int i = 10000; i < 10005; ++i) {\n                        chmap.erase(i);\n                    }\n                break;\n            }\n        }\n    }; // thread_body\n\n    tbb::blocked_range<std::size_t> br(0, 1000, 8);\n\n    tbb::parallel_for(br, thread_body);\n\n    // Check pre-existing and new elements\n    for (int i = 0; i < 200; ++i) {\n        typename chmap_type::const_accessor acc;\n        bool result = chmap.find(acc, i);\n        REQUIRE_MESSAGE(result, \"Some element was unexpectedly removed or not inserted\");\n        REQUIRE_MESSAGE(acc->first == i, \"Incorrect key\");\n        REQUIRE_MESSAGE(acc->second == i, \"Incorrect value\");\n    }\n\n    // Check elements for erasure\n    for (int i = 10000; i < 10005; ++i) {\n        typename chmap_type::const_accessor acc;\n        bool result = chmap.find(acc, i);\n        REQUIRE_MESSAGE(!result, \"Some element was not removed\");\n    }\n}\n\nvoid test_mutex_customization() {\n    test_with_minimalistic_mutex</*SimulateReacquiring = */false>();\n    test_with_minimalistic_mutex</*SimulateReacquiring = */true>();\n}\n\nstruct SimpleTransparentHashCompare {\n    using is_transparent = void;\n\n    template <typename T>\n    std::size_t hash(const T&) const { return 0; }\n\n    template <typename T, typename U>\n    bool equal(const T& key1, const U& key2) const { return key1 == key2; }\n};\n\ntemplate <typename Accessor>\nstruct IsWriterAccessor : public Accessor {\n    using Accessor::is_writer;\n};\n\ntemplate <typename Map, typename Accessor>\nvoid test_chmap_access_mode(bool expect_write) {\n    static_assert(std::is_same<int, typename Map::key_type>::value, \"Incorrect test setup\");\n    Map map;\n    Accessor acc;\n\n    // Test homogeneous insert\n    bool result = map.insert(acc, 1);\n    CHECK(result);\n    CHECK_MESSAGE(acc.is_writer() == expect_write, \"Incorrect access into the map from homogeneous insert\");\n\n    // Test heterogeneous insert\n    result = map.insert(acc, 2L);\n    CHECK(result);\n    CHECK_MESSAGE(acc.is_writer() == expect_write, \"Incorrect access into the map from heterogeneous insert\");\n\n    // Test lvalue insert\n    typename Map::value_type value{3, 3};\n    result = map.insert(acc, value);\n    CHECK(result);\n    CHECK_MESSAGE(acc.is_writer() == expect_write, \"Incorrect access into the map from lvalue insert\");\n\n    // Test rvalue insert\n    result = map.insert(acc, typename Map::value_type{4, 4});\n    CHECK(result);\n    CHECK_MESSAGE(acc.is_writer() == expect_write, \"Incorrect access into the map from rvalue insert\");\n\n    // Test homogeneous find\n    result = map.find(acc, 1);\n    CHECK(result);\n    CHECK_MESSAGE(acc.is_writer() == expect_write, \"Incorrect access into the map from homogeneous find\");\n\n    // Test heterogeneous find\n    result = map.find(acc, 2L);\n    CHECK(result);\n    CHECK_MESSAGE(acc.is_writer() == expect_write, \"Incorrect access into the map from heterogeneous find\");\n}\n\n//! Test of insert operation\n//! \\brief \\ref error_guessing\nTEST_CASE(\"testing range based for support\"){\n    TestRangeBasedFor();\n}\n\n//! Test concurrent_hash_map with specific key/mapped types\n//! \\brief \\ref regression \\ref error_guessing\nTEST_CASE(\"testing concurrent_hash_map with specific key/mapped types\") {\n    TestSpecificTypes();\n}\n\n//! Test work with scoped allocator\n//! \\brief \\ref regression\nTEST_CASE(\"testing work with scoped allocator\") {\n    TestScopedAllocator();\n}\n\n//! Test internal fast find for concurrent_hash_map\n//! \\brief \\ref regression\nTEST_CASE(\"testing internal fast find for concurrent_hash_map\") {\n    TestInternalFastFind();\n}\n\n//! Test constructor with move iterators\n//! \\brief \\ref error_guessing\nTEST_CASE(\"testing constructor with move iterators\"){\n    move_support_tests::test_constructor_with_move_iterators<hash_map_traits>();\n}\n\n#if TBB_USE_EXCEPTIONS\n//! Test exception in constructors\n//! \\brief \\ref regression \\ref error_guessing\nTEST_CASE(\"Test exception in constructors\") {\n    using allocator_type = StaticSharedCountingAllocator<std::allocator<std::pair<const int, int>>>;\n    using map_type = tbb::concurrent_hash_map<int, int, tbb::tbb_hash_compare<int>, allocator_type>;\n\n    auto init_list = {std::pair<const int, int>(1, 42), std::pair<const int, int>(2, 42), std::pair<const int, int>(3, 42),\n        std::pair<const int, int>(4, 42), std::pair<const int, int>(5, 42), std::pair<const int, int>(6, 42)};\n    map_type map(init_list);\n\n    allocator_type::set_limits(1);\n    REQUIRE_THROWS_AS( [&] {\n        map_type map1(map);\n        utils::suppress_unused_warning(map1);\n    }(), const std::bad_alloc);\n\n    REQUIRE_THROWS_AS( [&] {\n        map_type map2(init_list.begin(), init_list.end());\n        utils::suppress_unused_warning(map2);\n    }(), const std::bad_alloc);\n\n    tbb::tbb_hash_compare<int> test_hash;\n\n    REQUIRE_THROWS_AS( [&] {\n        map_type map3(init_list.begin(), init_list.end(), test_hash);\n        utils::suppress_unused_warning(map3);\n    }(), const std::bad_alloc);\n\n    REQUIRE_THROWS_AS( [&] {\n        map_type map4(init_list, test_hash);\n        utils::suppress_unused_warning(map4);\n    }(), const std::bad_alloc);\n\n    REQUIRE_THROWS_AS( [&] {\n        map_type map5(init_list);\n        utils::suppress_unused_warning(map5);\n    }(), const std::bad_alloc);\n\n    allocator_type::set_limits(0);\n    map_type big_map{};\n    for (int i = 0; i < 1000; ++i) {\n        big_map.insert(std::pair<const int, int>(i, 42));\n    }\n\n    allocator_type::init_counters();\n    allocator_type::set_limits(300);\n    REQUIRE_THROWS_AS( [&] {\n        map_type map6(big_map);\n        utils::suppress_unused_warning(map6);\n    }(), const std::bad_alloc);\n}\n#endif // TBB_USE_EXCEPTIONS\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"swap with NotAlwaysEqualAllocator allocators\") {\n    using allocator_type = NotAlwaysEqualAllocator<std::pair<const int, int>>;\n    using map_type = tbb::concurrent_hash_map<int, int, tbb::tbb_hash_compare<int>, allocator_type>;\n\n    map_type map1{};\n    map_type map2({{42, 42}, {24, 42}});\n    map_type map3(map2);\n\n    swap(map1, map2);\n\n    CHECK(map2.empty());\n    CHECK(map1 == map3);\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test concurrent_hash_map mutex customization\") {\n    test_mutex_customization();\n}\n\n// A test for an issue when const_accessor passed to find provides write access into the map after the lookup\n//! \\brief \\ref regression\nTEST_CASE(\"test concurrent_hash_map accessors issue\") {\n    using map_type = tbb::concurrent_hash_map<int, int, SimpleTransparentHashCompare>;\n    using accessor = IsWriterAccessor<typename map_type::accessor>;\n    using const_accessor = IsWriterAccessor<typename map_type::const_accessor>;\n\n    test_chmap_access_mode<map_type, accessor>(/*expect_write = */true);\n    test_chmap_access_mode<map_type, const_accessor>(/*expect_write = */false);\n}\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\ntemplate <bool ExpectSatisfies, typename Key, typename Mapped, typename... HCTypes>\n    requires (... && (utils::well_formed_instantiation<tbb::concurrent_hash_map, Key, Mapped, HCTypes> == ExpectSatisfies))\nvoid test_chmap_hash_compare_constraints() {}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"tbb::concurrent_hash_map hash_compare constraints\") {\n    using key_type = int;\n    using mapped_type = int;\n    using namespace test_concepts::hash_compare;\n\n    test_chmap_hash_compare_constraints</*Expected = */true, /*key = */key_type, /*mapped = */mapped_type,\n                                        Correct<key_type>, tbb::tbb_hash_compare<key_type>>();\n\n    test_chmap_hash_compare_constraints</*Expected = */false, /*key = */key_type, /*mapped = */mapped_type,\n                                        NonCopyable<key_type>, NonDestructible<key_type>,\n                                        NoHash<key_type>, HashNonConst<key_type>, WrongInputHash<key_type>, WrongReturnHash<key_type>,\n                                        NoEqual<key_type>, EqualNonConst<key_type>,\n                                        WrongFirstInputEqual<key_type>, WrongSecondInputEqual<key_type>, WrongReturnEqual<key_type>>();\n}\n\ntemplate <bool ExpectSatisfies, typename Key, typename Mapped, typename... RWMutexes>\n    requires (... && (utils::well_formed_instantiation<tbb::concurrent_hash_map, Key, Mapped,\n                                                tbb::tbb_hash_compare<Key>, tbb::tbb_allocator<std::pair<const Key, Mapped>>, RWMutexes> == ExpectSatisfies))\nvoid test_chmap_mutex_constraints() {}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"tbb::concurrent_hash_map rw_mutex constraints\") {\n    using key_type = int;\n    using mapped_type = int;\n    using namespace test_concepts::rw_mutex;\n\n    test_chmap_mutex_constraints</*Expected = */true, key_type, mapped_type,\n                                 Correct>();\n\n    test_chmap_mutex_constraints</*Expected = */false, key_type, mapped_type,\n                                 NoScopedLock, ScopedLockNoDefaultCtor, ScopedLockNoMutexCtor,\n                                 ScopedLockNoDtor, ScopedLockNoAcquire, ScopedLockWrongFirstInputAcquire, ScopedLockWrongSecondInputAcquire, ScopedLockNoTryAcquire,\n                                 ScopedLockWrongFirstInputTryAcquire, ScopedLockWrongSecondInputTryAcquire, ScopedLockWrongReturnTryAcquire, ScopedLockNoRelease,\n                                 ScopedLockNoUpgrade, ScopedLockWrongReturnUpgrade, ScopedLockNoDowngrade, ScopedLockWrongReturnDowngrade,\n                                 ScopedLockNoIsWriter, ScopedLockIsWriterNonConst, ScopedLockWrongReturnIsWriter>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"container_range concept for tbb::concurrent_hash_map ranges\") {\n    static_assert(test_concepts::container_range<tbb::concurrent_hash_map<int, int>::range_type>);\n    static_assert(test_concepts::container_range<tbb::concurrent_hash_map<int, int>::const_range_type>);\n}\n\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_concurrent_lru_cache.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#define TBB_PREVIEW_CONCURRENT_LRU_CACHE 1\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include <tbb/concurrent_lru_cache.h>\n#include <common/concurrent_lru_cache_common.h>\n\n//! \\file test_concurrent_lru_cache.cpp\n//! \\brief Test for [preview] functionality\n\n//-----------------------------------------------------------------------------\n// Concurrent LRU Cache Tests: Cache Test Cases\n//-----------------------------------------------------------------------------\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"basic test for return value\") {\n    using preset = concurrent_lru_cache_presets::preset_default<int, int>;\n\n    auto dummy_f = [](int /*key*/) -> int { return 0xDEADBEEF; };\n    std::size_t number_of_lru_history_items = 8;\n\n    preset preset_object{dummy_f, number_of_lru_history_items};\n    preset::cache_type& cache = preset_object.cache;\n\n    int dummy_key = 1;\n    REQUIRE_MESSAGE(\n        dummy_f(dummy_key) == cache[dummy_key].value(),\n        \"cache operator() must return only values obtained from value function\");\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"basic test for unused objects\") {\n    using preset = concurrent_lru_cache_presets::preset_instance_count;\n    preset preset_object{};\n\n    for (std::size_t i = 0; i < preset_object.number_of_lru_history_items; ++i)\n        preset_object.cache[i];\n\n    REQUIRE_MESSAGE(\n        preset_object.source.instances_count() > 1,\n        \"cache should store some unused objects\");\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"basic test for unused object limit\") {\n    using preset = concurrent_lru_cache_presets::preset_instance_count;\n    preset preset_object{};\n\n    for (std::size_t i = 0; i < preset_object.number_of_lru_history_items + 1; ++i)\n        preset_object.cache[i];\n\n    REQUIRE_MESSAGE(\n        preset_object.source.instances_count() == preset_object.number_of_lru_history_items + 1,\n        \"cache should respect number of stored unused objects to number passed in constructor\");\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"basic test for eviction order\") {\n    using preset = concurrent_lru_cache_presets::preset_map_instance_count;\n    preset preset_object{};\n\n    REQUIRE_MESSAGE(\n        preset_object.number_of_lru_history_items > 2,\n        \"incorrect test setup\");\n\n    preset_object.fill_up_cache(0, preset_object.number_of_lru_history_items);\n\n    // heat up first element\n    preset_object.cache[0];\n\n    // cause eviction;\n    preset_object.cache[preset_object.number_of_lru_history_items];\n\n    bool is_correct = preset_object.is_evicted(1) && !preset_object.is_evicted(0);\n    REQUIRE_MESSAGE(is_correct, \"cache should evict items in lru order\");\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"basic test for eviction of only unused items\") {\n    using preset = concurrent_lru_cache_presets::preset_map_instance_count;\n    preset preset_object{};\n\n    preset::handle_type h = preset_object.cache[0];\n\n    //cause eviction\n    preset_object.fill_up_cache(1, preset_object.number_of_lru_history_items+2);\n\n    bool is_correct = preset_object.is_evicted(1) && !preset_object.is_evicted(0);\n    REQUIRE_MESSAGE(is_correct, \"cache should not evict items in use\");\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"basic test for eviction of only unused items 2\") {\n    using preset = concurrent_lru_cache_presets::preset_map_instance_count;\n    preset preset_object{};\n\n    preset::handle_type h = preset_object.cache[0];\n    {\n        preset::handle_type h1 = preset_object.cache[0];\n    }\n\n    //cause eviction\n    preset_object.fill_up_cache(1,preset_object.number_of_lru_history_items+2);\n\n    bool is_correct = preset_object.is_evicted(1) && !preset_object.is_evicted(0);\n    REQUIRE_MESSAGE(is_correct, \"cache should not evict items in use\");\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"basic test for handling case when number_of_lru_history_items is zero\") {\n    auto foo = [] (int) {\n        return utils::LifeTrackableObject{};\n    };\n    using cache_type =  tbb::concurrent_lru_cache<int, utils::LifeTrackableObject, decltype(foo)>;\n    cache_type cache{foo, 0};\n    \n    for(int i = 0; i < 10; ++i) {\n        // Check that no history is stored when my_history_list_capacity is 0.\n        // In this case, when trying to fill the cache, the items will be deleted if reference was not taken.\n        const utils::LifeTrackableObject* obj_addr = &cache[1].value();\n        REQUIRE_MESSAGE(utils::LifeTrackableObject::is_alive(obj_addr) == false, \"when number_of_lru_history_items is zero, element must be erased after use\");\n    }\n\n    cache_type::handle h = cache[1];\n    const utils::LifeTrackableObject* obj_addr = &h.value();\n    auto& object_set = utils::LifeTrackableObject::set();\n    for(int i = 0; i < 10; ++i) {\n        // Verify that item will still be alive if there is a handle holding that item.\n        cache[1];\n        REQUIRE_MESSAGE(utils::LifeTrackableObject::is_alive(obj_addr), \"the object with the key=1 was destroyed but should not\");\n        REQUIRE_MESSAGE(object_set.size() == 1, \"no other values should be added\");\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_concurrent_map.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n#ifndef NOMINMAX\n#define NOMINMAX\n#endif\n#include <tbb/concurrent_map.h>\n#include \"common/concurrent_ordered_common.h\"\n\n//! \\file test_concurrent_map.cpp\n//! \\brief Test for [containers.concurrent_map containers.concurrent_multimap] specifications\n\ntemplate <typename... Args>\nstruct AllowMultimapping<tbb::concurrent_multimap<Args...>> : std::true_type {};\n\ntemplate <typename Key, typename Mapped>\nusing MyAllocator = LocalCountingAllocator<std::allocator<std::pair<const Key, Mapped>>>;\n\nusing move_support_tests::FooWithAssign;\n\nusing map_type = tbb::concurrent_map<int, int, std::less<int>, MyAllocator<int, int>>;\nusing multimap_type = tbb::concurrent_multimap<int, int, std::less<int>, MyAllocator<int, int>>;\nusing checked_map_type = tbb::concurrent_map<int, CheckType<int>, std::less<int>, MyAllocator<int, CheckType<int>>>;\nusing checked_multimap_type = tbb::concurrent_multimap<int, CheckType<int>, std::less<int>, MyAllocator<int, CheckType<int>>>;\nusing greater_map_type = tbb::concurrent_map<int, int, std::greater<int>, MyAllocator<int, int>>;\nusing greater_multimap_type = tbb::concurrent_multimap<int, int, std::greater<int>, MyAllocator<int, int>>;\nusing checked_state_map_type = tbb::concurrent_map<intptr_t, FooWithAssign, std::less<intptr_t>,\n                                                   MyAllocator<intptr_t, FooWithAssign>>;\nusing checked_state_multimap_type = tbb::concurrent_multimap<intptr_t, FooWithAssign, std::less<intptr_t>,\n                                                             MyAllocator<intptr_t, FooWithAssign>>;\n\ntemplate <>\nstruct SpecialTests<map_type> {\n    static void Test() {\n        SpecialMapTests<map_type>();\n    }\n};\n\ntemplate <>\nstruct SpecialTests<multimap_type> {\n    static void Test() {\n        SpecialMultiMapTests<multimap_type>();\n    }\n};\n\nstruct COMapTraits : OrderedMoveTraitsBase {\n    template <typename T, typename Allocator>\n    using container_type = tbb::concurrent_map<T, T, std::less<T>, Allocator>;\n\n    template <typename T>\n    using container_value_type = std::pair<const T, T>;\n\n    using init_iterator_type = move_support_tests::FooPairIterator;\n}; // struct COMapTraits\n\nstruct COMultimapTraits : OrderedMoveTraitsBase {\n    template <typename T, typename Allocator>\n    using container_type = tbb::concurrent_multimap<T, T, std::less<T>, Allocator>;\n\n    template <typename T>\n    using container_value_type = std::pair<const T, T>;\n\n    using init_iterator_type = move_support_tests::FooPairIterator;\n}; // struct COMultimapTraits\n\nstruct OrderedMapTypesTester {\n    template <bool DefCtorPresent, typename ValueType>\n    void check( const std::list<ValueType>& lst ) {\n        using key_type = typename ValueType::first_type;\n        using mapped_type = typename ValueType::second_type;\n\n        TypeTester<DefCtorPresent, tbb::concurrent_map<key_type, mapped_type>>(lst);\n        TypeTester<DefCtorPresent, tbb::concurrent_multimap<key_type, mapped_type>>(lst);\n    }\n}; // struct OrderedMapTypesTester\n\nvoid test_specific_types() {\n    test_map_specific_types<OrderedMapTypesTester>();\n\n    // Regression test for a problem with excessive requirements of emplace()\n    test_emplace_insert<tbb::concurrent_map<int*, test::unique_ptr<int>>,std::false_type>\n                       (new int, new int);\n    test_emplace_insert<tbb::concurrent_multimap<int*, test::unique_ptr<int>>,std::false_type>\n                       (new int, new int);\n}\n\n// Regression test for an issue in lock free algorithms\n// In some cases this test hangs due to broken skip list internal structure on levels > 1\n// This issue was resolved by adding index_number into the skip list node\nvoid test_cycles_absense() {\n    for (std::size_t execution = 0; execution != 10; ++execution) {\n        tbb::concurrent_multimap<int, int> mmap;\n        std::vector<int> v(2);\n        int vector_size = int(v.size());\n\n        for (int i = 0; i != vector_size; ++i) {\n            v[i] = i;\n        }\n        size_t num_threads = 4; // Can be changed to 2 for debugging\n\n        utils::NativeParallelFor(num_threads, [&](size_t) {\n            for (int i = 0; i != vector_size; ++i) {\n                mmap.emplace(i, i);\n            }\n        });\n\n        for (int i = 0; i != vector_size; ++i) {\n            REQUIRE(mmap.count(i) == num_threads);\n        }\n    }\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"basic test for concurrent_map with greater compare\") {\n    test_basic<greater_map_type>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"basic test for concurrent_multimap with greater compare\") {\n    test_basic<greater_multimap_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"basic test for concurrent_map with elements ctor and dtor check\") {\n    Checker<checked_map_type::value_type> checker;\n    test_basic<checked_map_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"basic test for concurrent_multimap with elements ctor and dtor check\") {\n    Checker<checked_multimap_type::value_type> checker;\n    test_basic<checked_multimap_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"basic test for concurrent_map with elements state check\") {\n    test_basic<checked_state_map_type, /*CheckState = */std::true_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"basic test for concurrent_multimap with elements state check\") {\n    test_basic<checked_state_multimap_type, /*CheckState = */std::true_type>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"multithreading support in concurrent_map with greater compare\") {\n    test_concurrent<greater_map_type>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"multithreading support in concurrent_multimap with greater compare\") {\n    test_concurrent<greater_multimap_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"multithreading support in concurrent_map with elements ctor and dtor check\") {\n    Checker<checked_map_type::value_type> checker;\n    test_concurrent<checked_map_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"multithreading support in concurrent_multimap with elements ctor and dtor check\") {\n    Checker<checked_multimap_type::value_type> checker;\n    test_concurrent<checked_multimap_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"multithreading support in concurrent_map with elements state check\") {\n    test_concurrent<checked_state_map_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"multithreading support in concurrent_multimap with elements state check\") {\n    test_concurrent<checked_state_multimap_type>();\n}\n\n//! \\brief \\ref stress \\ref error_guessing\nTEST_CASE(\"multithreading support in concurrent_multimap no unique keys\") {\n    test_concurrent<multimap_type>(true);\n}\n\n//! \\brief \\ref stress \\ref error_guessing\nTEST_CASE(\"multithreading support in concurrent_multimap with greater compare and no unique keys\") {\n    test_concurrent<greater_multimap_type>(true);\n}\n\n//! \\brief \\ref interface \\ref error_guessing\nTEST_CASE(\"range based for support in concurrent_map\") {\n    test_range_based_for_support<map_type>();\n}\n\n//! \\brief \\ref interface \\ref error_guessing\nTEST_CASE(\"range based for support in concurrent_multimap\") {\n    test_range_based_for_support<multimap_type>();\n}\n\n//! \\brief \\ref regression\nTEST_CASE(\"concurrent_map/multimap with specific key/mapped types\") {\n    test_specific_types();\n}\n\n// TODO: add test with scoped_allocator_adaptor with broken macro\n\n//! \\brief \\ref regression\nTEST_CASE(\"broken internal structure for multimap\") {\n    test_cycles_absense();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_map::swap with not always equal allocator\") {\n    using not_always_equal_alloc_map_type = tbb::concurrent_map<int, int, std::less<int>,\n                                                                NotAlwaysEqualAllocator<std::pair<const int, int>>>;\n    test_swap_not_always_equal_allocator<not_always_equal_alloc_map_type>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_multimap::swap with not always equal allocator\") {\n    using not_always_equal_alloc_mmap_type = tbb::concurrent_multimap<int, int, std::less<int>,\n                                                                      NotAlwaysEqualAllocator<std::pair<const int, int>>>;\n    test_swap_not_always_equal_allocator<not_always_equal_alloc_mmap_type>();\n}\n\n#if TBB_USE_EXCEPTIONS\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_map throwing copy constructor\") {\n    using exception_map_type = tbb::concurrent_map<ThrowOnCopy, ThrowOnCopy>;\n    test_exception_on_copy_ctor<exception_map_type>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_multimap throwing copy constructor\") {\n    using exception_mmap_type = tbb::concurrent_multimap<ThrowOnCopy, ThrowOnCopy>;\n    test_exception_on_copy_ctor<exception_mmap_type>();\n}\n#endif // TBB_USE_EXCEPTIONS\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"container_range concept for concurrent_map ranges\") {\n    static_assert(test_concepts::container_range<typename tbb::concurrent_map<int, int>::range_type>);\n    static_assert(test_concepts::container_range<typename tbb::concurrent_map<int, int>::const_range_type>);\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"container_range concept for concurrent_multimap ranges\") {\n    static_assert(test_concepts::container_range<typename tbb::concurrent_multimap<int, int>::range_type>);\n    static_assert(test_concepts::container_range<typename tbb::concurrent_multimap<int, int>::const_range_type>);\n}\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_concurrent_monitor.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if _WIN32 || _WIN64\n#define _CRT_SECURE_NO_WARNINGS\n#endif\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n// structure was padded due to alignment specifier\n#pragma warning( disable: 4324 )\n#endif\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_concurrency_limit.h\"\n#include \"common/spin_barrier.h\"\n\n#include \"tbb/global_control.h\"\n#include \"tbb/task_arena.h\"\n#include \"../../src/tbb/concurrent_monitor.h\"\n#include \"../../src/tbb/misc.cpp\"\n\n//! \\file test_concurrent_monitor.cpp\n//! \\brief Test for [internal] functionality\n\n#if TBB_USE_EXCEPTIONS\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Stress test\") {\n    enum class notification_types {\n        notify,\n        notify_one,\n        notify_all,\n        notify_number\n    };\n\n    std::size_t threads_number = utils::get_platform_max_threads();\n\n    // Need to prolong lifetime of the exposed concurrent_monitor\n    tbb::task_scheduler_handle handler{tbb::attach{}};\n\n    utils::SpinBarrier barrier(threads_number);\n\n    tbb::detail::r1::concurrent_monitor test_monitor;\n    {\n        tbb::task_arena arena(static_cast<int>(threads_number - 1), 0);\n\n\n        std::size_t iter_on_operation = 1000;\n        std::size_t operation_number = std::size_t(notification_types::notify_number) * iter_on_operation;\n\n        auto thread_func = [&, operation_number] {\n            for (std::size_t i = 0; i < operation_number; ++i) {\n                tbb::detail::r1::concurrent_monitor::thread_context context{std::uintptr_t(1)};\n                test_monitor.prepare_wait(context);\n                barrier.wait();\n                test_monitor.cancel_wait(context);\n            }\n        };\n\n        for (std::size_t i = 0; i < threads_number - 1; ++i) {\n            arena.enqueue(thread_func);\n        }\n\n        for (std::size_t i = 0; i < operation_number; ++i) {\n            barrier.wait();\n            switch (i / iter_on_operation) {\n                case 0:\n                {\n                    test_monitor.notify([] ( std::uintptr_t ) { return true; });\n                    break;\n                }\n                case 1:\n                {\n                    test_monitor.notify_one();\n                    break;\n                }\n                case 2:\n                {\n                    test_monitor.notify_all();\n                    break;\n                }\n            };\n        }\n    }\n\n    tbb::finalize(handler);\n}\n#endif // TBB_USE_EXCEPTIONS\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_concurrent_priority_queue.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include <common/concurrent_priority_queue_common.h>\n#include <common/containers_common.h>\n\n//! \\file test_concurrent_priority_queue.cpp\n//! \\brief Test for [containers.concurrent_priority_queue] specification\n\nvoid test_cpq_with_smart_pointers() {\n    const int NUMBER = 10;\n\n    utils::FastRandom<> rnd(1234);\n\n    std::vector<std::shared_ptr<int>> shared_pointers;\n    for (int i = 0; i < NUMBER; ++i ) {\n        const int rnd_get = rnd.get();\n        shared_pointers.emplace_back(std::make_shared<int>(rnd_get));\n    }\n    std::vector<std::weak_ptr<int>> weak_pointers;\n    std::copy(shared_pointers.begin(), shared_pointers.end(), std::back_inserter(weak_pointers));\n\n    type_tester(shared_pointers, LessForSmartPointers{});\n    type_tester(weak_pointers, LessForSmartPointers{});\n\n    std::vector<int> arrInt;\n    for (int i = 0; i < NUMBER; ++i)\n        arrInt.emplace_back(rnd.get());\n\n    type_tester_unique_ptr(arrInt); // Test std::unique_ptr\n}\n\nstruct MyDataType {\n    std::size_t priority;\n    char padding[tbb::detail::max_nfs_size - sizeof(int) % tbb::detail::max_nfs_size];\n\n    MyDataType() = default;\n    MyDataType( int val ) : priority(std::size_t(val)) {}\n\n    const MyDataType operator+( const MyDataType& other ) const {\n        return MyDataType(int(priority + other.priority));\n    }\n\n    bool operator==(const MyDataType& other) const {\n        return this->priority == other.priority;\n    }\n}; // struct MyDataType\n\nconst MyDataType DATA_MIN(INT_MIN);\nconst MyDataType DATA_MAX(INT_MAX);\n\nstruct MyLess {\n    bool operator()( const MyDataType d1, const MyDataType d2 ) const {\n        return d1.priority < d2.priority;\n    }\n}; // struct MyLess\n\nvoid test_concurrent( std::size_t n ) {\n    test_parallel_push_pop<MyLess>(n, DATA_MAX, DATA_MIN);\n    test_flogger<MyLess, MyDataType>(n);\n}\n\nvoid test_multithreading() {\n    for (std::size_t n = utils::MinThread; n != utils::MaxThread; ++n) {\n        test_concurrent(n);\n    }\n}\n\nstruct MyThrowingType : public MyDataType {\n    static int throw_flag;\n    MyThrowingType() = default;\n    MyThrowingType( const MyThrowingType& src ) : MyDataType(src) {\n        if (throw_flag) {\n            TBB_TEST_THROW(42);\n        }\n    }\n\n    MyThrowingType& operator=( const MyThrowingType& other ) {\n        priority = other.priority;\n        return *this;\n    }\n};\n\nint MyThrowingType::throw_flag = 0;\n\nusing CPQExTestType = tbb::concurrent_priority_queue<MyThrowingType, MyLess>;\n\n#if TBB_USE_EXCEPTIONS\nvoid test_exceptions() {\n    // TODO: TBB_USE_EXCEPTIONS?\n    const std::size_t TOO_LARGE_SZ = std::vector<MyThrowingType, typename CPQExTestType::allocator_type>{}.max_size() + 1;\n\n    REQUIRE(TOO_LARGE_SZ < std::numeric_limits<std::size_t>::max());\n    MyThrowingType elem;\n\n    // Allocation of empty queue should not throw\n    REQUIRE_NOTHROW([]{\n        MyThrowingType::throw_flag = 1;\n        CPQExTestType q;\n    }());\n\n    // Allocation of small queue should not throw for reasonably sized type\n    REQUIRE_NOTHROW([]{\n        MyThrowingType::throw_flag = 1;\n        CPQExTestType(42);\n    }());\n\n    // Allocate a queue with too large initial size\n    REQUIRE_THROWS([&]{\n        MyThrowingType::throw_flag = 0;\n        CPQExTestType q(TOO_LARGE_SZ);\n    }());\n\n    // Test copy ctor exceptions\n    MyThrowingType::throw_flag = 0;\n    CPQExTestType src_q(42);\n    elem.priority = 42;\n    for (std::size_t i = 0; i < 42; ++i) src_q.push(elem);\n\n    REQUIRE_THROWS_MESSAGE([&]{\n        MyThrowingType::throw_flag = 1;\n        CPQExTestType q(src_q);\n    }(), \"Copy ctor did not throw exception\");\n\n    // Test assignment\n    MyThrowingType::throw_flag = 0;\n    CPQExTestType assign_q(24);\n\n    REQUIRE_THROWS_MESSAGE([&]{\n        MyThrowingType::throw_flag = 1;\n        assign_q = src_q;\n    }(), \"Assignment did not throw exception\");\n    REQUIRE(assign_q.empty());\n\n    for (std::size_t i = 0; i < push_selector_variants; ++i) {\n        MyThrowingType::throw_flag = 0;\n        CPQExTestType pq(3);\n        REQUIRE_NOTHROW([&]{\n            push_selector(pq, elem, i);\n            push_selector(pq, elem, i);\n            push_selector(pq, elem, i);\n        }());\n\n        try {\n            MyThrowingType::throw_flag = 1;\n            push_selector(pq, elem, i);\n        } catch(...) {\n            REQUIRE_MESSAGE(!pq.empty(), \"Failed: pq should not be empty\");\n            REQUIRE_MESSAGE(pq.size() == 3, \"Failed: pq should contain only three elements\");\n            REQUIRE_MESSAGE(pq.try_pop(elem), \"Failed: pq is not functional\");\n        }\n\n        MyThrowingType::throw_flag = 0;\n        CPQExTestType pq2(3);\n        REQUIRE_NOTHROW([&]{\n            push_selector(pq2, elem, i);\n            push_selector(pq2, elem, i);\n        }());\n\n        try {\n            MyThrowingType::throw_flag = 1;\n            push_selector(pq2, elem, i);\n        } catch(...) {\n            REQUIRE_MESSAGE(!pq2.empty(), \"Failed: pq should not be empty\");\n            REQUIRE_MESSAGE(pq2.size() == 2, \"Failed: pq should contain only two elements\");\n            REQUIRE_MESSAGE(pq2.try_pop(elem), \"Failed: pq is not functional\");\n        }\n    }\n}\n#endif\n\nvoid test_scoped_allocator() {\n    using allocator_data_type = AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int>>>;\n    using basic_allocator_type = std::scoped_allocator_adaptor<std::allocator<allocator_data_type>>;\n    using allocator_type = std::allocator_traits<basic_allocator_type>::template rebind_alloc<allocator_data_type>;\n    using container_type = tbb::concurrent_priority_queue<allocator_data_type, std::less<allocator_data_type>, allocator_type>;\n\n    allocator_type allocator;\n    allocator_data_type data1(1, allocator);\n    allocator_data_type data2(1, allocator);\n\n    container_type c1(allocator);\n    container_type c2(allocator);\n\n    allocator_data_type::activate();\n\n    c1.push(data1);\n    c2.push(std::move(data2));\n\n    // TODO: support uses allocator construction in this place\n    // c1.emplace(data1);\n\n    c1 = c2;\n    c2 = std::move(c1);\n\n    allocator_data_type::deactivate();\n}\n\n// Testing concurrent_priority_queue with smart pointers and other special types\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_priority_queue with smart_pointers\") {\n    test_cpq_with_smart_pointers();\n}\n\n//! Testing push-pop operations in concurrent_priority_queue with multithreading and specific value type\n//! \\brief \\ref error_guessing\nTEST_CASE(\"multithreading support in concurrent_priority_queue with specific value type\") {\n    test_multithreading();\n}\n\n#if TBB_USE_EXCEPTIONS\n//! Testing exceptions support in concurrent_priority_queue\n//! \\brief \\ref stress \\ref error_guessing\nTEST_CASE(\"exception handling in concurrent_priority_queue\") {\n    test_exceptions();\n}\n#endif\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_priority_queue with std::scoped_allocator_adaptor\") {\n    test_scoped_allocator();\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_concurrent_queue.cpp",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <common/test.h>\n#include <common/utils.h>\n#include <common/vector_types.h>\n#include <common/custom_allocators.h>\n\n#include <tbb/concurrent_queue.h>\n#include <unordered_set>\n\n//! \\file test_concurrent_queue.cpp\n//! \\brief Test for [containers.concurrent_queue containers.concurrent_bounded_queue] specification\n\nstatic constexpr std::size_t MaxThread = 4;\n\ntemplate<typename CQ, typename T>\nstruct TestQueueElements {\n    CQ& queue;\n    const std::size_t nthread;\n    TestQueueElements( CQ& q, std::size_t n ) : queue(q), nthread(n) {}\n    void operator()( std::size_t k ) const {\n        for (std::size_t i=0; i < 1000; ++i) {\n            if( (i&0x1)==0 ) {\n                CHECK(T(k) < T(nthread));\n                queue.push(T(k));\n            } else {\n                // Pop item from queue\n                T item = 0;\n                queue.try_pop(item);\n                CHECK(item <= T(nthread));\n            }\n        }\n    }\n};\n\n//! Test concurrent queue with primitive data type\ntemplate<typename CQ, typename T>\nvoid TestPrimitiveTypes(std::size_t nthread, T exemplar) {\n    CQ queue;\n    for (std::size_t i = 0; i < 100; ++i) {\n        queue.push(exemplar);\n    }\n    utils::NativeParallelFor(nthread, TestQueueElements<CQ, T>(queue, nthread));\n}\n\nvoid TestQueueWorksWithPrimitiveTypes() {\n    TestPrimitiveTypes<tbb::concurrent_queue<char>, char>(MaxThread, (char)1);\n    TestPrimitiveTypes<tbb::concurrent_queue<int>, int>(MaxThread, (int)-12);\n    TestPrimitiveTypes<tbb::concurrent_queue<float>, float>(MaxThread, (float)-1.2f);\n    TestPrimitiveTypes<tbb::concurrent_queue<double>, double>(MaxThread, (double)-4.3);\n    TestPrimitiveTypes<tbb::concurrent_bounded_queue<char>, char>(MaxThread, (char)1);\n    TestPrimitiveTypes<tbb::concurrent_bounded_queue<int>, int>(MaxThread, (int)-12);\n    TestPrimitiveTypes<tbb::concurrent_bounded_queue<float>, float>(MaxThread, (float)-1.2f);\n    TestPrimitiveTypes<tbb::concurrent_bounded_queue<double>, double>(MaxThread, (double)-4.3);\n}\n\n#if HAVE_m128 || HAVE_m256\n//! Test concurrent queue with vector types\n/** Type Queue should be a queue of ClassWithSSE/ClassWithAVX. */\ntemplate<typename ClassWithVectorType, typename Queue>\nvoid TestVectorTypes() {\n    Queue q1;\n    for (int i = 0; i < 100; ++i) {\n        // VC8 does not properly align a temporary value; to work around, use explicit variable\n        ClassWithVectorType bar(i);\n        q1.push(bar);\n    }\n\n    // Copy the queue\n    Queue q2 = q1;\n    // Check that elements of the copy are correct\n    typename Queue::const_iterator ci = q2.unsafe_begin();\n    for (int i=0; i < 100; ++i ) {\n        CHECK((ci != q2.unsafe_end()));\n        ClassWithVectorType foo = *ci;\n        ClassWithVectorType bar(i);\n        CHECK((*ci == bar));\n        ++ci;\n    }\n\n    for (int i = 0; i < 101; ++i) {\n        ClassWithVectorType tmp;\n        bool b = q1.try_pop(tmp);\n        CHECK((b == (i < 100)));\n        ClassWithVectorType bar(i);\n        CHECK((!b || tmp==bar));\n    }\n}\n#endif /* HAVE_m128 || HAVE_m256 */\n\nvoid TestQueueWorksWithSSE() {\n\n#if HAVE_m128\n    TestVectorTypes<ClassWithSSE, tbb::concurrent_queue<ClassWithSSE> >();\n    TestVectorTypes<ClassWithSSE, tbb::concurrent_bounded_queue<ClassWithSSE> >();\n#endif /* HAVE_m128 */\n#if HAVE_m256\n    if( have_AVX() ) {\n        TestVectorTypes<ClassWithAVX, tbb::concurrent_queue<ClassWithAVX> >();\n        TestVectorTypes<ClassWithAVX, tbb::concurrent_bounded_queue<ClassWithAVX> >();\n    }\n#endif /* HAVE_m256 */\n}\n#if TBB_USE_EXCEPTIONS\n    int rnd_elem = -1;\n    int global_counter = -1;\n\nstruct throw_element {\n    throw_element() = default;\n    throw_element(const throw_element&) {\n        if (global_counter++ == rnd_elem) {\n            throw std::exception{};\n        }\n    }\n\n    throw_element& operator= (const throw_element&) = default;\n};\n\ntemplate <typename Queue>\nvoid CopyWithThrowElement() {\n    utils::FastRandom<> rnd(42);\n\n    Queue source;\n\n    constexpr size_t queue_size = 100000;\n    for (std::size_t i = 0; i < queue_size; ++i) {\n        source.emplace();\n    }\n\n    for (std::size_t i = 0; i < 100; ++i) {\n        global_counter = 0;\n        rnd_elem = rnd.get() % queue_size;\n\n        REQUIRE_THROWS_AS( [&] {\n            Queue copy(source);\n            utils::suppress_unused_warning(copy);\n        }(), std::exception);\n    }\n}\n#endif // TBB_USE_EXCEPTIONS\n\n//! Test work with different fypes\n//! \\brief \\ref error_guessing\nTEST_CASE(\"testing work with different fypes\") {\n    TestQueueWorksWithPrimitiveTypes();\n}\n\n//! Test work with vector types\n//! \\brief \\ref error_guessing\nTEST_CASE(\"testing vector types\") {\n    TestQueueWorksWithSSE();\n}\n\n#if TBB_USE_EXCEPTIONS\n//! \\brief \\ref regression \\ref error_guessing\nTEST_CASE(\"Test exception in allocation\") {\n    using allocator_type = StaticSharedCountingAllocator<std::allocator<int>>;\n    using queue_type = tbb::concurrent_queue<int, allocator_type>;\n\n    queue_type src_queue;\n    for (int i = 0; i < 100000; ++i) {\n        src_queue.push(i);\n    }\n\n    allocator_type::set_limits(1);\n\n    REQUIRE_THROWS_AS( [] {\n        queue_type queue1;\n        queue1.push(1);\n    }(), const std::bad_alloc);\n\n    for (std::size_t i = 1; i < 1000; ++i) {\n        allocator_type::init_counters();\n        allocator_type::set_limits(1);\n        REQUIRE_THROWS_AS( [&] {\n            queue_type queue2(src_queue);\n            utils::suppress_unused_warning(queue2);\n        }(), const std::bad_alloc);\n    }\n}\n\n//! \\brief \\ref regression \\ref error_guessing\nTEST_CASE(\"Test exception in allocation\") {\n    CopyWithThrowElement<tbb::concurrent_queue<throw_element>>();\n    CopyWithThrowElement<tbb::concurrent_bounded_queue<throw_element>>();\n}\n\n#endif // TBB_USE_EXCEPTIONS\n\nstruct TrackableItem {\n    static std::unordered_set<TrackableItem*> object_addresses;\n#if TBB_USE_EXCEPTIONS\n    static std::size_t global_count_for_exceptions;\n#endif\n\n    TrackableItem() {\n#if TBB_USE_EXCEPTIONS\n        if (global_count_for_exceptions++ % 3 == 0) throw 1;\n#endif\n        bool res = object_addresses.emplace(this).second;\n        CHECK(res);\n    }\n\n    ~TrackableItem() {\n        auto it = object_addresses.find(this);\n        CHECK(it != object_addresses.end());\n        object_addresses.erase(it);\n        CHECK(object_addresses.count(this) == 0);\n    }\n};\n\ntemplate <typename Container>\nvoid fill_and_catch(Container& q, std::size_t elements_count) {\n    CHECK(TrackableItem::object_addresses.size() == 0);\n    for (std::size_t i = 0; i < elements_count; ++i) {\n#if TBB_USE_EXCEPTIONS\n        try {\n#endif\n            q.emplace();\n#if TBB_USE_EXCEPTIONS\n        } catch (int exception) {\n            CHECK(exception == 1);\n        }\n#endif\n    }\n#if TBB_USE_EXCEPTIONS\n    CHECK(TrackableItem::object_addresses.size() == 2 * elements_count / 3);\n#else\n    CHECK(TrackableItem::object_addresses.size() == elements_count);\n#endif\n}\n\nstd::unordered_set<TrackableItem*> TrackableItem::object_addresses;\n#if TBB_USE_EXCEPTIONS\nstd::size_t TrackableItem::global_count_for_exceptions = 0;\n#endif\n\ntemplate <typename Container>\nvoid test_tracking_dtors_on_clear() {\n    static_assert(std::is_same<typename Container::value_type, TrackableItem>::value, \"Incorrect test setup\");\n    const std::size_t elements_count = 100000;\n    {\n        Container q;\n        fill_and_catch(q, elements_count);\n\n        q.clear();\n        \n        CHECK(q.empty());\n        CHECK(TrackableItem::object_addresses.empty());\n#if TBB_USE_EXCEPTIONS\n        TrackableItem::global_count_for_exceptions = 0;\n#endif\n    }\n    {\n        {\n            Container q;\n            fill_and_catch(q, elements_count);\n        } // Dtor of q would be called here\n        CHECK(TrackableItem::object_addresses.empty());\n#if TBB_USE_EXCEPTIONS\n        TrackableItem::global_count_for_exceptions = 0;\n#endif\n    }\n}\n\n//! \\brief \\ref regression \\ref error_guessing\nTEST_CASE(\"Test clear and dtor with TrackableItem\") {\n    test_tracking_dtors_on_clear<oneapi::tbb::concurrent_queue<TrackableItem>>();\n    test_tracking_dtors_on_clear<oneapi::tbb::concurrent_bounded_queue<TrackableItem>>();\n}\n\n//! \\brief \\ref regression \nTEST_CASE(\"test capacity on modifying operations\") {\n    // Test that concurrent_bounded_queue capacity is preserved on copying, moving and swapping\n    using queue_type = oneapi::tbb::concurrent_bounded_queue<int>;\n    using capacity_type = typename queue_type::size_type;\n\n    queue_type q;\n    capacity_type desired_capacity = 64;\n\n    q.set_capacity(desired_capacity);\n    REQUIRE_MESSAGE(q.capacity() == desired_capacity, \"Capacity is not set correctly\");\n\n    queue_type q_copy(q);\n    REQUIRE_MESSAGE(q_copy.capacity() == desired_capacity, \"Capacity is not preserved on copying\");\n\n    queue_type q_move(std::move(q));\n    REQUIRE_MESSAGE(q_move.capacity() == desired_capacity, \"Capacity is not preserved on moving\");\n\n    queue_type different_capacity_q1;\n    different_capacity_q1.set_capacity(desired_capacity * 2);\n\n    different_capacity_q1 = q_move;\n    REQUIRE_MESSAGE(different_capacity_q1.capacity() == desired_capacity,\n                    \"Capacity is not preserved on copy assignment\");\n\n    queue_type different_capacity_q2;\n    different_capacity_q2.set_capacity(desired_capacity * 2);\n\n    different_capacity_q2 = std::move(q_move);\n    REQUIRE_MESSAGE(different_capacity_q2.capacity() == desired_capacity,\n                    \"Capacity is not preserved on move assignment\");\n\n    queue_type different_capacity_q3;\n    different_capacity_q3.set_capacity(desired_capacity * 2);\n\n    different_capacity_q3.swap(different_capacity_q2);\n    REQUIRE_MESSAGE(different_capacity_q3.capacity() == desired_capacity,\n                    \"Capacity is not preserved on swap\");\n    REQUIRE_MESSAGE(different_capacity_q2.capacity() == desired_capacity * 2,\n                    \"Capacity is not preserved on swap\");\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_concurrent_queue_whitebox.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if _WIN32 || _WIN64\n#define _CRT_SECURE_NO_WARNINGS\n#endif\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n// structure was padded due to alignment specifier\n#pragma warning( disable: 4324 )\n#endif\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#define __TBB_TEST_DEFINE_PRIVATE_PUBLIC 1\n#include \"common/inject_scheduler.h\"\n#define private public\n#define protected public\n#include \"tbb/concurrent_queue.h\"\n#undef protected\n#undef private\n\n#include <limits>\n\n//! \\file test_concurrent_queue_whitebox.cpp\n//! \\brief Test for [internal] functionality\n\ntemplate <typename Q>\nclass FloggerBody {\npublic:\n    FloggerBody& operator=( const FloggerBody& ) = delete;\n\n    FloggerBody( Q& queue, std::size_t el_num )\n        : q(queue), elem_num(el_num) {}\n\n    void operator()( const int thread_id ) const {\n        using value_type = typename Q::value_type;\n        value_type elem = value_type(thread_id);\n        for (std::size_t i = 0; i < elem_num; ++i) {\n            q.push(elem);\n            bool res = q.try_pop(elem);\n            CHECK_FAST(res);\n        }\n    }\n\nprivate:\n    Q& q;\n    std::size_t elem_num;\n}; // class FloggerBody\n\ntemplate <typename Q>\nvoid test_flogger_help( Q& q, std::size_t items_per_page ) {\n    std::size_t nq = q.my_queue_representation->n_queue;\n    std::size_t reserved_elem_num = nq * items_per_page - 1;\n    std::size_t hack_val = std::numeric_limits<std::size_t>::max() & ~reserved_elem_num;\n\n    q.my_queue_representation->head_counter = hack_val;\n    q.my_queue_representation->tail_counter = hack_val;\n\n    std::size_t k = q.my_queue_representation->tail_counter & -(std::ptrdiff_t)nq;\n\n    for (std::size_t i = 0; i < nq; ++i) {\n        q.my_queue_representation->array[i].head_counter = k;\n        q.my_queue_representation->array[i].tail_counter = k;\n    }\n\n    // To induce the overflow occurrence\n    utils::NativeParallelFor(static_cast<typename Q::value_type>(utils::MaxThread), FloggerBody<Q>(q, reserved_elem_num + 20));\n\n    REQUIRE_MESSAGE(q.empty(), \"Failed flogger/empty test\");\n    REQUIRE_MESSAGE(q.my_queue_representation->head_counter < hack_val, \"Failed wraparound test\");\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test CQ Wrapparound\") {\n    for (int i = 0; i < 1000; ++i) {\n        tbb::concurrent_queue<int> q;\n        test_flogger_help(q, q.my_queue_representation->items_per_page);\n    }\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test CBQ Wrapparound\") {\n    for (int i = 0; i < 1000; ++i) {\n        tbb::concurrent_bounded_queue<int> q;\n        test_flogger_help(q, q.my_queue_representation->items_per_page);\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_concurrent_set.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n#ifndef NOMINMAX\n#define NOMINMAX\n#endif\n\n#include <tbb/concurrent_set.h>\n#include \"common/concurrent_ordered_common.h\"\n\n//! \\file test_concurrent_set.cpp\n//! \\brief Test for [containers.concurrent_set containers.concurrent_multiset] specifications\n\ntemplate <typename... Args>\nstruct AllowMultimapping<tbb::concurrent_multiset<Args...>> : std::true_type {};\n\ntemplate <typename Key>\nusing MyAllocator = LocalCountingAllocator<std::allocator<Key>>;\n\nusing move_support_tests::FooWithAssign;\n\nusing set_type = tbb::concurrent_set<int, std::less<int>, MyAllocator<int>>;\nusing multiset_type = tbb::concurrent_multiset<int, std::less<int>, MyAllocator<int>>;\nusing checked_set_type = tbb::concurrent_set<CheckType<int>, std::less<CheckType<int>>, MyAllocator<CheckType<int>>>;\nusing checked_multiset_type = tbb::concurrent_multiset<CheckType<int>, std::less<CheckType<int>>, MyAllocator<CheckType<int>>>;\nusing greater_set_type = tbb::concurrent_set<int, std::greater<int>, MyAllocator<int>>;\nusing greater_multiset_type = tbb::concurrent_multiset<int, std::greater<int>, MyAllocator<int>>;\nusing checked_state_set_type = tbb::concurrent_set<FooWithAssign, std::less<FooWithAssign>, MyAllocator<FooWithAssign>>;\nusing checked_state_multiset_type = tbb::concurrent_multiset<FooWithAssign, std::less<FooWithAssign>, MyAllocator<FooWithAssign>>;\n\nstruct COSetTraits : OrderedMoveTraitsBase {\n    template <typename T, typename Allocator>\n    using container_type = tbb::concurrent_set<T, std::less<T>, Allocator>;\n\n    template <typename T>\n    using container_value_type = T;\n\n    using init_iterator_type = move_support_tests::FooIterator;\n}; // struct COSetTraits\n\nstruct COMultisetTraits : OrderedMoveTraitsBase {\n    template <typename T, typename Allocator>\n    using container_type = tbb::concurrent_multiset<T, std::less<T>, Allocator>;\n\n    template <typename T>\n    using container_value_type = T;\n\n    using init_iterator_type = move_support_tests::FooIterator;\n}; // struct COMultisetTraits\n\nstruct OrderedSetTypesTester {\n    template <bool DefCtorPresent, typename ValueType>\n    void check( const std::list<ValueType>& lst ) {\n        TypeTester<DefCtorPresent, tbb::concurrent_set<ValueType>>(lst);\n        TypeTester<DefCtorPresent, tbb::concurrent_multiset<ValueType>>(lst);\n    }\n}; // struct OrderedMapTypesTester\n\nvoid test_specific_types() {\n    test_set_specific_types<OrderedSetTypesTester>();\n\n    // Regression test for a problem with excessive requirements of emplace\n    test_emplace_insert<tbb::concurrent_set<test::unique_ptr<int>>, std::false_type>\n                       (new int, new int);\n    test_emplace_insert<tbb::concurrent_multiset<test::unique_ptr<int>>, std::false_type>\n                       (new int, new int);\n}\n\n// Regression test for an issue in lock free algorithms\n// In some cases this test hangs due to broken skip list internal structure on levels > 1\n// This issue was resolved by adding index_number into the skip list node\nvoid test_cycles_absense() {\n    for (std::size_t execution = 0; execution != 10; ++execution) {\n        tbb::concurrent_multiset<int> mset;\n        std::vector<int> v(2);\n        int vector_size = int(v.size());\n\n        for (int i = 0; i != vector_size; ++i) {\n            v[i] = int(i);\n        }\n        size_t num_threads = 4; // Can be changed to 2 for debugging\n\n        utils::NativeParallelFor(num_threads, [&](size_t) {\n            for (int i = 0; i != vector_size; ++i) {\n                mset.emplace(i);\n            }\n        });\n\n        for (int i = 0; i != vector_size; ++i) {\n            REQUIRE(mset.count(i) == num_threads);\n        }\n    }\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"basic test for concurrent_set with greater compare\") {\n    test_basic<greater_set_type>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"basic test for concurrent_multiset with greater compare\") {\n    test_basic<greater_multiset_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"basic test for concurrent_set with elements ctor and dtor check\") {\n    Checker<checked_set_type::value_type> checker;\n    test_basic<checked_set_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"basic test for concurrent_multiset with elements ctor and dtor check\") {\n    Checker<checked_multiset_type::value_type> checker;\n    test_basic<checked_multiset_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"basic test for concurrent_set with elements state check\") {\n    test_basic<checked_state_set_type, /*CheckState = */std::true_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"basic test for concurrent_multiset with elements state check\") {\n    test_basic<checked_state_multiset_type, /*CheckState = */std::true_type>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"multithreading support in concurrent_set with greater compare\") {\n    test_concurrent<greater_set_type>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"multithreading support in concurrent_multiset with greater compare\") {\n    test_concurrent<greater_multiset_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"multithreding support in concurrent_set with elements ctor and dtor check\") {\n    Checker<checked_set_type::value_type> checker;\n    test_concurrent<checked_set_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"multithreading support in concurrent_multiset with elements ctor and dtor check\") {\n    Checker<checked_multiset_type::value_type> checker;\n    test_concurrent<checked_multiset_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"multithreading support in concurrent_set with elements state check\") {\n    test_concurrent<checked_state_set_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"multithreading support in concurrent_multiset with elements state check\") {\n    test_concurrent<checked_state_multiset_type>();\n}\n\n//! \\brief \\ref stress \\ref error_guessing\nTEST_CASE(\"multithreading support in concurrent_multiset with no unique keys\") {\n    test_concurrent<multiset_type>(true);\n}\n\n//! \\brief \\ref stress \\ref error_guessing\nTEST_CASE(\"multithreading support in concurrent_multiset with greater compare and no unique keys\") {\n    test_concurrent<greater_multiset_type>(true);\n}\n\n//! \\brief \\ref interface \\ref error_guessing\nTEST_CASE(\"range based for support in concurrent_set\") {\n    test_range_based_for_support<set_type>();\n}\n\n//! \\brief \\ref interface \\ref error_guessing\nTEST_CASE(\"range based for support in concurrent_multiset\") {\n    test_range_based_for_support<multiset_type>();\n}\n\n//! \\brief \\ref regression\nTEST_CASE(\"concurrent set/multiset with specific key types\") {\n    test_specific_types();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_set with std::scoped_allocator_adaptor\") {\n    test_scoped_allocator<COSetTraits>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_multiset with std::scoped_allocator_adaptor\") {\n    test_scoped_allocator<COMultisetTraits>();\n}\n\n//! \\brief \\ref regression\nTEST_CASE(\"broken internal structure for multiset\") {\n    test_cycles_absense();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_set::swap with not always equal allocator\") {\n    using not_always_equal_alloc_set_type = tbb::concurrent_set<int, std::less<int>, NotAlwaysEqualAllocator<int>>;\n    test_swap_not_always_equal_allocator<not_always_equal_alloc_set_type>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_multiset::swap with not always equal allocator\") {\n    using not_always_equal_alloc_mset_type = tbb::concurrent_multiset<int, std::less<int>, NotAlwaysEqualAllocator<int>>;\n    test_swap_not_always_equal_allocator<not_always_equal_alloc_mset_type>();\n}\n\n#if TBB_USE_EXCEPTIONS\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_set throwing copy constructor\") {\n    using exception_set_type = tbb::concurrent_set<ThrowOnCopy>;\n    test_exception_on_copy_ctor<exception_set_type>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_multiset throwing copy constructor\") {\n    using exception_mset_type = tbb::concurrent_multiset<ThrowOnCopy>;\n    test_exception_on_copy_ctor<exception_mset_type>();\n}\n#endif // TBB_USE_EXCEPTIONS\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"container_range concept for concurrent_set ranges\") {\n    static_assert(test_concepts::container_range<typename tbb::concurrent_set<int>::range_type>);\n    static_assert(test_concepts::container_range<typename tbb::concurrent_set<int>::const_range_type>);\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"container range concept for concurrent_multiset ranges\") {\n    static_assert(test_concepts::container_range<typename tbb::concurrent_multiset<int>::range_type>);\n    static_assert(test_concepts::container_range<typename tbb::concurrent_multiset<int>::const_range_type>);\n}\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_concurrent_unordered_map.cpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#define TBB_DEFINE_STD_HASH_SPECIALIZATIONS 1\n#include <tbb/concurrent_unordered_map.h>\n#include \"common/concurrent_unordered_common.h\"\n\n//! \\file test_concurrent_unordered_map.cpp\n//! \\brief Test for [containers.concurrent_unordered_map containers.concurrent_unordered_multimap] specifications\n\ntemplate <typename... Args>\nstruct AllowMultimapping<tbb::concurrent_unordered_multimap<Args...>> : std::true_type {};\n\ntemplate <typename Key, typename Mapped>\nusing MyAllocator = LocalCountingAllocator<std::allocator<std::pair<const Key, Mapped>>>;\n\nusing move_support_tests::FooWithAssign;\n\nusing map_type = tbb::concurrent_unordered_map<int, int, std::hash<int>, std::equal_to<int>, MyAllocator<int, int>>;\nusing multimap_type = tbb::concurrent_unordered_multimap<int, int, std::hash<int>, std::equal_to<int>, MyAllocator<int, int>>;\nusing degenerate_map_type = tbb::concurrent_unordered_map<int, int, degenerate_hash<int>, std::equal_to<int>, MyAllocator<int, int>>;\nusing degenerate_multimap_type = tbb::concurrent_unordered_multimap<int, int, degenerate_hash<int>, std::equal_to<int>, MyAllocator<int, int>>;\n\nusing checked_map_type = tbb::concurrent_unordered_map<int, CheckType<int>, std::hash<int>, std::equal_to<int>, MyAllocator<int, CheckType<int>>>;\nusing checked_multimap_type = tbb::concurrent_unordered_multimap<int, CheckType<int>, std::hash<int>, std::equal_to<int>, MyAllocator<int, CheckType<int>>>;\nusing checked_state_map_type = tbb::concurrent_unordered_map<intptr_t, FooWithAssign, std::hash<intptr_t>,\n                                                             std::equal_to<intptr_t>, MyAllocator<intptr_t, FooWithAssign>>;\nusing checked_state_multimap_type = tbb::concurrent_unordered_multimap<intptr_t, FooWithAssign, std::hash<intptr_t>,\n                                                                       std::equal_to<intptr_t>, MyAllocator<intptr_t, FooWithAssign>>;\n\nstruct CumapTraits : UnorderedMoveTraitsBase {\n    template <typename T, typename Allocator>\n    using container_type = tbb::concurrent_unordered_map<T, T, std::hash<T>, std::equal_to<T>, Allocator>;\n\n    template <typename T>\n    using container_value_type = std::pair<const T, T>;\n\n    using init_iterator_type = move_support_tests::FooPairIterator;\n}; // struct CumapTraits\n\nstruct CumultimapTraits : UnorderedMoveTraitsBase {\n    template <typename T, typename Allocator>\n    using container_type = tbb::concurrent_unordered_multimap<T, T, std::hash<T>, std::equal_to<T>, Allocator>;\n\n    template <typename T>\n    using container_value_type = std::pair<const T, T>;\n\n    using init_iterator_type = move_support_tests::FooPairIterator;\n}; // struct CumultimapTraits\n\ntemplate <>\nstruct SpecialTests<map_type> {\n    static void Test() {\n        SpecialMapTests<map_type>();\n    }\n};\n\ntemplate <>\nstruct SpecialTests<multimap_type> {\n    static void Test() {\n        SpecialMultiMapTests<multimap_type>();\n    }\n};\n\nstruct UnorderedMapTypesTester {\n    template <template <typename...> class GeneralTableType, typename Key, typename Mapped>\n    using table_type = GeneralTableType<Key, Mapped, std::hash<Key>, utils::IsEqual>;\n\n    template <bool DefCtorPresent, typename ValueType>\n    void check( const std::list<ValueType>& lst ) {\n        using key_type = typename std::remove_const<typename ValueType::first_type>::type;\n        using mapped_type = typename ValueType::second_type;\n\n        TypeTester<DefCtorPresent, table_type<tbb::concurrent_unordered_map, key_type, mapped_type>>(lst);\n        TypeTester<DefCtorPresent, table_type<tbb::concurrent_unordered_multimap, key_type, mapped_type>>(lst);\n    }\n}; // struct UnorderedMapTypesTester\n\nvoid test_specific_types() {\n    test_map_specific_types<UnorderedMapTypesTester>();\n\n    // Regression test for a problem with excessive requirements of emplace()\n    test_emplace_insert<tbb::concurrent_unordered_map<int*, test::unique_ptr<int>>, std::false_type>\n                       (new int, new int);\n    test_emplace_insert<tbb::concurrent_unordered_multimap<int*, test::unique_ptr<int>>, std::false_type>\n                       (new int, new int);\n}\n\n//! \\brief \\ref stress \\ref error_guessing\nTEST_CASE(\"basic test for concurrent_unordered_map with degenerate hash\") {\n    test_basic<degenerate_map_type>();\n}\n\n//! \\brief \\ref stress \\ref error_guessing\nTEST_CASE(\"basic test for concurrent_unordered_multimap with degenerate hash\") {\n    test_basic<degenerate_multimap_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"basic test for concurrent_unordered_map with elements ctor and dtor check\") {\n    Checker<checked_map_type::mapped_type> checker;\n    test_basic<checked_map_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"basic test for concurrent_unordered_multimap with elements ctor and dtor check\") {\n    Checker<checked_multimap_type::mapped_type> checker;\n    test_basic<checked_multimap_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"basic test for concurrent_unordered_map with elements state check\") {\n    test_basic<checked_state_map_type, /*CheckState = */std::true_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"basic test for concurrent_unordered_multimap with elements state check\") {\n    test_basic<checked_state_multimap_type, /*CheckState = */std::true_type>();\n}\n\n//! \\brief \\ref stress \\ref error_guessing\nTEST_CASE(\"multithreading support in concurrent_unordered_map with degenerate hash\") {\n    test_concurrent<degenerate_map_type>();\n}\n\n//! \\brief \\ref stress \\ref error_guessing\nTEST_CASE(\"multithreading support in concurrent_unordered_multimap with degenerate hash\") {\n    test_concurrent<degenerate_multimap_type>();\n}\n\n//! \\brief \\ref stress \\ref error_guessing\nTEST_CASE(\"multithreading support in concurrent_unordered_multimap no unique keys\") {\n    test_concurrent<multimap_type>(true);\n}\n\n//! \\brief \\ref stress \\ref error_guessing\nTEST_CASE(\"multithreading support in concurrent_unordered_multimap with degenerate hash and no unique keys\") {\n    test_concurrent<degenerate_multimap_type>(true);\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"multithreading support in concurrent_unordered_map with elements ctor and dtor check\") {\n    Checker<checked_map_type::mapped_type> checker;\n    test_concurrent<checked_map_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"multithreading support in concurrent_unordered_multimap with elements ctor and dtor check\") {\n    Checker<checked_multimap_type::mapped_type> checker;\n    test_concurrent<checked_multimap_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"multithreading support in concurrent_unordered_map with elements state check\") {\n    test_concurrent<checked_state_map_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"multithreading support in concurrent_unordered_multimap with elements state check\") {\n    test_concurrent<checked_state_multimap_type>();\n}\n\n//! \\brief \\ref interface \\ref error_guessing\nTEST_CASE(\"range based for support in concurrent_unordered_map\") {\n    test_range_based_for_support<map_type>();\n}\n\n//! \\brief \\ref interface \\ref error_guessing\nTEST_CASE(\"range based for support in concurrent_unordered_multimap\") {\n    test_range_based_for_support<multimap_type>();\n}\n\n//! \\brief \\ref stress \\ref error_guessing\nTEST_CASE(\"merge and concurrent merge in concurrent_unordered_map with degenerative hash\") {\n    node_handling_tests::test_merge<map_type, degenerate_multimap_type>(1000);\n}\n\n//! \\brief \\ref regression\nTEST_CASE(\"concurrent_unordered map/multimap with specific key/mapped types\") {\n    test_specific_types();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_unordered_map::swap with not always equal allocator\") {\n    using not_always_equal_alloc_map_type = tbb::concurrent_unordered_map<int, int, std::hash<int>, std::equal_to<int>,\n                                                                          NotAlwaysEqualAllocator<std::pair<const int, int>>>;\n    test_swap_not_always_equal_allocator<not_always_equal_alloc_map_type>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_unordered_multimap::swap with not always equal allocator\") {\n    using not_always_equal_alloc_mmap_type = tbb::concurrent_unordered_multimap<int, int, std::hash<int>, std::equal_to<int>,\n                                                                                NotAlwaysEqualAllocator<std::pair<const int, int>>>;\n    test_swap_not_always_equal_allocator<not_always_equal_alloc_mmap_type>();\n}\n\n#if TBB_USE_EXCEPTIONS\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_unordered_map throwing copy constructor\") {\n    using exception_map_type = tbb::concurrent_unordered_map<ThrowOnCopy, ThrowOnCopy>;\n    test_exception_on_copy_ctor<exception_map_type>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_unordered_multimap throwing copy constructor\") {\n    using exception_mmap_type = tbb::concurrent_unordered_multimap<ThrowOnCopy, ThrowOnCopy>;\n    test_exception_on_copy_ctor<exception_mmap_type>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_unordered_map whitebox throwing copy constructor\") {\n    using allocator_type = StaticSharedCountingAllocator<std::allocator<std::pair<const int, int>>>;\n    using exception_mmap_type = tbb::concurrent_unordered_map<int, int, std::hash<int>, std::equal_to<int>, allocator_type>;\n\n    exception_mmap_type map;\n    for (int i = 0; i < 10; ++i) {\n        map.insert(std::pair<const int, int>(i, 42));\n    }\n\n    allocator_type::set_limits(1);\n    REQUIRE_THROWS_AS( [&] {\n        exception_mmap_type map1(map);\n        utils::suppress_unused_warning(map1);\n    }(), const std::bad_alloc);\n}\n\n#endif // TBB_USE_EXCEPTIONS\n\n// TODO: add test_scoped_allocator support with broken macro\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"container_range concept for concurrent_unordered_map ranges\") {\n    static_assert(test_concepts::container_range<typename tbb::concurrent_unordered_map<int, int>::range_type>);\n    static_assert(test_concepts::container_range<typename tbb::concurrent_unordered_map<int, int>::const_range_type>);\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"container_range concept for concurrent_unordered_multimap ranges\") {\n    static_assert(test_concepts::container_range<typename tbb::concurrent_unordered_multimap<int, int>::range_type>);\n    static_assert(test_concepts::container_range<typename tbb::concurrent_unordered_multimap<int, int>::const_range_type>);\n}\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n\n//! \\brief \\ref regression\nTEST_CASE(\"reserve(0) issue regression test\") {\n    test_reserve_regression<oneapi::tbb::concurrent_unordered_map<int, int>>();\n    test_reserve_regression<oneapi::tbb::concurrent_unordered_multimap<int, int>>();\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_concurrent_unordered_set.cpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#define TBB_DEFINE_STD_HASH_SPECIALIZATIONS 1\n#include <tbb/concurrent_unordered_set.h>\n#include \"common/concurrent_unordered_common.h\"\n\n//! \\file test_concurrent_unordered_set.cpp\n//! \\brief Test for [containers.concurrent_unordered_set containers.concurrent_unordered_multiset] specifications\n\ntemplate <typename... Args>\nstruct AllowMultimapping<tbb::concurrent_unordered_multiset<Args...>> : std::true_type {};\n\ntemplate <typename Value>\nusing MyAllocator = LocalCountingAllocator<std::allocator<Value>>;\n\nusing move_support_tests::FooWithAssign;\n\nusing set_type = tbb::concurrent_unordered_set<int, std::hash<int>, std::equal_to<int>, MyAllocator<int>>;\nusing multiset_type = tbb::concurrent_unordered_multiset<int, std::hash<int>, std::equal_to<int>, MyAllocator<int>>;\nusing degenerate_set_type = tbb::concurrent_unordered_set<int, degenerate_hash<int>, std::equal_to<int>, MyAllocator<int>>;\nusing degenerate_multiset_type = tbb::concurrent_unordered_multiset<int, degenerate_hash<int>, std::equal_to<int>, MyAllocator<int>>;\n\nusing checked_set_type = tbb::concurrent_unordered_set<CheckType<int>, std::hash<CheckType<int>>, std::equal_to<CheckType<int>>, MyAllocator<CheckType<int>>>;\nusing checked_multiset_type = tbb::concurrent_unordered_multiset<CheckType<int>, std::hash<CheckType<int>>,\n                                                                 std::equal_to<CheckType<int>>, MyAllocator<CheckType<int>>>;\nusing checked_state_set_type = tbb::concurrent_unordered_set<FooWithAssign, std::hash<FooWithAssign>, std::equal_to<FooWithAssign>,\n                                                             MyAllocator<FooWithAssign>>;\nusing checked_state_multiset_type = tbb::concurrent_unordered_multiset<FooWithAssign, std::hash<FooWithAssign>, std::equal_to<FooWithAssign>,\n                                                                       MyAllocator<FooWithAssign>>;\n\nstruct CusetTraits : UnorderedMoveTraitsBase {\n    template <typename T, typename Allocator>\n    using container_type = tbb::concurrent_unordered_set<T, std::hash<T>, std::equal_to<T>, Allocator>;\n\n    template <typename T>\n    using container_value_type = T;\n\n    using init_iterator_type = move_support_tests::FooIterator;\n}; // struct CusetTraits\n\nstruct CumultisetTraits : UnorderedMoveTraitsBase {\n    template <typename T, typename Allocator>\n    using container_type = tbb::concurrent_unordered_multiset<T, std::hash<T>, std::equal_to<T>, Allocator>;\n\n    template <typename T>\n    using container_value_type = T;\n\n    using init_iterator_type = move_support_tests::FooIterator;\n}; // struct CumultisetTraits\n\nstruct UnorderedSetTypesTester {\n    template <bool DefCtorPresent, typename ValueType>\n    void check( const std::list<ValueType>& lst ) {\n        TypeTester<DefCtorPresent, tbb::concurrent_unordered_set<ValueType, std::hash<ValueType>, utils::IsEqual>>(lst);\n        TypeTester<DefCtorPresent, tbb::concurrent_unordered_multiset<ValueType, std::hash<ValueType>, utils::IsEqual>>(lst);\n    }\n};\n\nvoid test_specific_types() {\n    test_set_specific_types<UnorderedSetTypesTester>();\n\n    // Regressiong test for a problem with excessive requirements of emplace()\n    test_emplace_insert<tbb::concurrent_unordered_set<test::unique_ptr<int>>,\n                        std::false_type>(new int, new int);\n    test_emplace_insert<tbb::concurrent_unordered_multiset<test::unique_ptr<int>>,\n                        std::false_type>(new int, new int);\n}\n\n//! \\brief \\ref stress \\ref error_guessing\nTEST_CASE(\"basic test for concurrent_unordered_set with degenerate hash\") {\n    test_basic<degenerate_set_type>();\n}\n\n//! \\brief \\ref stress \\ref error_guessing\nTEST_CASE(\"basic test for concurrent_unordered_multiset with degenerate hash\") {\n    test_basic<degenerate_multiset_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"basic test for concurrent_unordered_set with elements ctor and dtor check\") {\n    Checker<checked_set_type::value_type> checker;\n    test_basic<checked_set_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"basic test for concurrent_unordered_multiset with elements ctor and dtor check\") {\n    Checker<checked_multiset_type::value_type> checker;\n    test_basic<checked_multiset_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"basic test for concurrent_unordered_set with elements state check\") {\n    test_basic<checked_state_set_type, /*CheckState = */std::true_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"basic test for concurrent_unordered_multiset with elements state check\") {\n    test_basic<checked_state_multiset_type, /*CheckState = */std::true_type>();\n}\n\n//! \\brief \\ref stress \\ref error_guessing\nTEST_CASE(\"multithreading support in concurrent_unordered_set with degenerate hash\") {\n    test_concurrent<degenerate_set_type>();\n}\n\n//! \\brief \\ref stress \\ref error_guessing\nTEST_CASE(\"multithreading support in concurrent_unordered_multiset with degenerate hash\") {\n    test_concurrent<degenerate_multiset_type>();\n}\n\n//! \\brief \\ref stress \\ref error_guessing\nTEST_CASE(\"multithreading support in concurrent_unordered_multiset with no unique keys\") {\n    test_concurrent<multiset_type>(true);\n}\n\n//! \\brief \\ref stress \\ref error_guessing\nTEST_CASE(\"multithreading support in concurrent_unordered_multiset with degenerate hash and no unique keys\") {\n    test_concurrent<degenerate_multiset_type>(true);\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"multithreading support in concurrent_unordered_set with elements ctor and dtor check\") {\n    Checker<checked_set_type::value_type> checker;\n    test_concurrent<checked_set_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"multithreading support in concurrent_unordered_multiset with elements ctor and dtor check\") {\n    Checker<checked_multiset_type::value_type> checker;\n    test_concurrent<checked_multiset_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"multithreading support in concurrent_unordered_set with elements state check\") {\n    test_concurrent<checked_state_set_type>();\n}\n\n//! \\brief \\ref resource_usage\nTEST_CASE(\"multithreading support in concurrent_unordered_multiset with elements state check\") {\n    test_concurrent<checked_state_multiset_type>();\n}\n\n//! \\brief \\ref interface \\ref error_guessing\nTEST_CASE(\"range based for support in concurrent_unordered_set\") {\n    test_range_based_for_support<set_type>();\n}\n\n//! \\brief \\ref interface \\ref error_guessing\nTEST_CASE(\"range based for support in concurrent_unordered_multiset\") {\n    test_range_based_for_support<multiset_type>();\n}\n\n//! \\brief \\ref stress \\ref error_guessing\nTEST_CASE(\"merge and concurrent merge in concurrent_unordered_set and set with degenerate hash\") {\n    node_handling_tests::test_merge<set_type, degenerate_set_type>(1000);\n}\n\n//! \\brief \\ref regression\nTEST_CASE(\"concurrent_unordered_set/multiset with specific key types\") {\n    test_specific_types();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_unordered_set with std::scoped_allocator_adaptor\") {\n    test_scoped_allocator<CusetTraits>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_unordered_multiset with std::scoped_allocator_adaptor\") {\n    test_scoped_allocator<CumultisetTraits>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_unordered_set::swap with not always equal allocator\") {\n    using not_always_equal_alloc_set_type = tbb::concurrent_unordered_set<int, std::hash<int>, std::equal_to<int>,\n                                                                          NotAlwaysEqualAllocator<int>>;\n    test_swap_not_always_equal_allocator<not_always_equal_alloc_set_type>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_unordered_multiset::swap with not always equal allocator\") {\n    using not_always_equal_alloc_mset_type = tbb::concurrent_unordered_multiset<int, std::hash<int>, std::equal_to<int>,\n                                                                                NotAlwaysEqualAllocator<int>>;\n    test_swap_not_always_equal_allocator<not_always_equal_alloc_mset_type>();\n}\n\n#if __TBB_USE_EXCEPTIONS\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_unordered_set throwing copy constructor\") {\n    using exception_set_type = tbb::concurrent_unordered_set<ThrowOnCopy>;\n    test_exception_on_copy_ctor<exception_set_type>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"concurrent_unordered_multimap throwing copy constructor\") {\n    using exception_mset_type = tbb::concurrent_unordered_multiset<ThrowOnCopy>;\n    test_exception_on_copy_ctor<exception_mset_type>();\n}\n#endif // __TBB_USE_EXCEPTIONS\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"container_range concept for concurrent_unordered_set ranges\") {\n    static_assert(test_concepts::container_range<typename tbb::concurrent_unordered_set<int>::range_type>);\n    static_assert(test_concepts::container_range<typename tbb::concurrent_unordered_set<int>::const_range_type>);\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"container_range concept for concurrent_unordered_multiset ranges\") {\n    static_assert(test_concepts::container_range<typename tbb::concurrent_unordered_multiset<int>::range_type>);\n    static_assert(test_concepts::container_range<typename tbb::concurrent_unordered_multiset<int>::const_range_type>);\n}\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n\n//! \\brief \\ref regression\nTEST_CASE(\"reserve(0) issue regression test\") {\n    test_reserve_regression<oneapi::tbb::concurrent_unordered_set<int>>();\n    test_reserve_regression<oneapi::tbb::concurrent_unordered_multiset<int>>();\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_concurrent_vector.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include <common/test.h>\n#include <common/spin_barrier.h>\n#include <common/state_trackable.h>\n#include <common/container_move_support.h>\n#include <common/range_based_for_support.h>\n#include <common/utils.h>\n#include <common/utils_concurrency_limit.h>\n#include <common/vector_types.h>\n#include <common/concepts_common.h>\n#include <tbb/concurrent_vector.h>\n#include <tbb/tick_count.h>\n#include <tbb/parallel_reduce.h>\n#include <tbb/parallel_for.h>\n#include <algorithm>\n#include <cmath>\n#include <random>\n\n//! \\file test_concurrent_vector.cpp\n//! \\brief Test for [containers.concurrent_vector] specification\n\nvoid TestSort() {\n    for( int n=0; n<100; n=n*3+1 ) {\n        tbb::concurrent_vector<int> array(n);\n        for( int i=0; i<n; ++i ){\n            array.at(i) = (i*7)%n;\n        }\n        std::sort( array.begin(), array.end() );\n        for( int i=0; i<n; ++i ){\n            REQUIRE( array[i]==i );\n        }\n    }\n}\n\nvoid TestRangeBasedFor(){\n    using namespace range_based_for_support_tests;\n\n    using c_vector = tbb::concurrent_vector<int>;\n    c_vector a_c_vector;\n\n    const int sequence_length = 10;\n    for (int i = 1; i<= sequence_length; ++i){\n        a_c_vector.push_back(i);\n    }\n\n    REQUIRE_MESSAGE( range_based_for_accumulate(a_c_vector, std::plus<int>(), 0) == gauss_summ_of_int_sequence(sequence_length), \"incorrect accumulated value generated via range based for ?\");\n}\n\nstruct default_container_traits {\n    template <typename container_type, typename iterator_type>\n    static container_type& construct_container(typename std::aligned_storage<sizeof(container_type)>::type& storage, iterator_type begin, iterator_type end){\n        container_type* ptr = reinterpret_cast<container_type*>(&storage);\n        new (ptr) container_type(begin, end);\n        return *ptr;\n    }\n\n    template <typename container_type, typename iterator_type, typename allocator_type>\n    static container_type& construct_container(typename std::aligned_storage<sizeof(container_type)>::type& storage, iterator_type begin, iterator_type end, allocator_type const& a){\n        container_type* ptr = reinterpret_cast<container_type*>(&storage);\n        new (ptr) container_type(begin, end, a);\n        return *ptr;\n    }\n};\n\nstruct c_vector_type : default_container_traits {\n    template <typename T, typename Allocator>\n    using container_type = tbb::concurrent_vector<T, Allocator>;\n\n    template <typename T>\n    using container_value_type = T;\n\n    using init_iterator_type = move_support_tests::FooIterator;\n    template<typename element_type, typename allocator_type>\n    struct apply{\n        using type = tbb::concurrent_vector<element_type,  allocator_type >;\n    };\n\n    enum{ expected_number_of_items_to_allocate_for_steal_move = 0 };\n\n    template<typename element_type, typename allocator_type, typename iterator>\n    static bool equal(tbb::concurrent_vector<element_type, allocator_type > const& c, iterator begin, iterator end){\n        bool equal_sizes = (size_t)std::distance(begin, end) == c.size();\n        return  equal_sizes && std::equal(c.begin(), c.end(), begin);\n    }\n};\n\nvoid TestSerialGrowByWithMoveIterators(){\n    using fixture_t = move_support_tests::DefaultStatefulFixtureHelper<c_vector_type>::type;\n    using vector_t = fixture_t::container_type;\n\n    fixture_t fixture;\n\n    vector_t dst(fixture.dst_allocator);\n    dst.grow_by(std::make_move_iterator(fixture.source.begin()), std::make_move_iterator(fixture.source.end()));\n\n    fixture.verify_content_deep_moved(dst);\n}\n\n#if HAVE_m128 || HAVE_m256\n\ntemplate<typename ClassWithVectorType>\nvoid TestVectorTypes() {\n    tbb::concurrent_vector<ClassWithVectorType> v;\n    for( int i = 0; i < 100; ++i ) {\n        // VC8 does not properly align a temporary value; to work around, use explicit variable\n        ClassWithVectorType foo(i);\n        v.push_back(foo);\n        for( int j=0; j<i; ++j ) {\n            ClassWithVectorType bar(j);\n            REQUIRE( v[j]==bar );\n        }\n    }\n}\n#endif /* HAVE_m128 | HAVE_m256 */\n\n\nstatic tbb::concurrent_vector<std::size_t> Primes;\n\nclass FindPrimes {\n    bool is_prime( std::size_t val ) const {\n        int limit, factor = 3;\n        if( val<5u )\n            return val==2;\n        else {\n            limit = long(sqrtf(float(val))+0.5f);\n            while( factor<=limit && val % factor )\n                ++factor;\n            return factor>limit;\n        }\n    }\npublic:\n    void operator()( const std::size_t idx ) const {\n        if( idx % 2 && is_prime(idx) ) {\n            Primes.push_back( idx );\n        }\n    }\n};\n\ndouble TimeFindPrimes( std::size_t nthread ) {\n    Primes.clear();\n    const std::size_t count = 1048576;\n    Primes.reserve(count);// TODO: or compact()?\n    tbb::tick_count t0 = tbb::tick_count::now();\n    std::size_t block_size = count / nthread;\n    utils::NativeParallelFor(count, block_size, FindPrimes() );\n    tbb::tick_count t1 = tbb::tick_count::now();\n    return (t1-t0).seconds();\n}\n\nvoid TestFindPrimes() {\n    // Time fully subscribed run.\n\n    // TimeFindPrimes( tbb::task_scheduler_init::automatic );\n    double t2 = TimeFindPrimes( utils::get_platform_max_threads() );\n\n    // Time parallel run that is very likely oversubscribed.\n#if TBB_TEST_LOW_WORKLOAD\n    double tx = TimeFindPrimes(32);\n#else\n    double tx = TimeFindPrimes(128);\n#endif\n    INFO(\"TestFindPrimes: t2 == \" << t2 << \" tx == \" << tx << \"k == \" << tx / t2);\n\n    // We allow the X-thread run a little extra time to allow for thread overhead.\n    // Theoretically, following test will fail on machine with >X processors.\n    // But that situation is not going to come up in the near future,\n    // and the generalization to fix the issue is not worth the trouble.\n    WARN_MESSAGE( tx <= 1.3*t2, \"Warning: grow_by is pathetically slow\");\n    INFO(\"t2 == \" << t2 << \" tx == \" << tx << \"k == \" << tx / t2);\n}\n\ntemplate <typename Type, typename Allocator>\nclass test_grow_by_and_resize {\n    tbb::concurrent_vector<Type, Allocator> &my_c;\npublic:\n    test_grow_by_and_resize( tbb::concurrent_vector<Type, Allocator> &c ) : my_c(c) {}\n    void operator()() const {\n        const typename tbb::concurrent_vector<Type, Allocator>::size_type sz = my_c.size();\n        my_c.grow_by( 5 );\n        REQUIRE( my_c.size() == sz + 5 );\n        my_c.resize( sz );\n        REQUIRE( my_c.size() == sz );\n    }\n};\n\nvoid test_scoped_allocator() {\n    using allocator_data_type = AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int>>>;\n    using allocator_type = std::scoped_allocator_adaptor<std::allocator<allocator_data_type>>;\n    using container_type = tbb::concurrent_vector<allocator_data_type, allocator_type>;\n\n    allocator_type allocator;\n    allocator_data_type data1(1, allocator);\n    allocator_data_type data2(2, allocator);\n\n    auto init_list = {data1, data2};\n\n    container_type c1(allocator), c2(allocator);\n\n    allocator_data_type::activate();\n\n    c1.grow_by(100);\n    c1.grow_by(10, data1);\n    c1.grow_by(init_list.begin(), init_list.end());\n    c1.grow_by(init_list);\n\n    c1.clear();\n\n    c1.grow_to_at_least(100);\n    c1.grow_to_at_least(110, data1);\n\n    c1.clear();\n\n    c1.push_back(data1);\n    c1.push_back(data2);\n    c1.push_back(std::move(data1));\n    c1.emplace_back(1);\n\n    c1.clear();\n\n    c1.reserve(100);\n    c1.resize(110);\n    c1.resize(100);\n    c1.resize(110, data1);\n    c1.resize(100, data1);\n\n    c1.shrink_to_fit();\n\n    c1.clear();\n\n    c1.grow_by(10, data1);\n    c2.grow_by(20, data2);\n\n    c1 = c2;\n    c2 = std::move(c1);\n\n    allocator_data_type::deactivate();\n}\n\ntemplate <bool default_construction_present> struct do_default_construction_test {\n    template<typename FuncType> void operator() ( FuncType func ) const { func(); }\n};\ntemplate <> struct do_default_construction_test<false> {\n    template<typename FuncType> void operator()( FuncType ) const {}\n};\n\ntemplate <typename Type, typename Allocator>\nvoid CompareVectors( const tbb::concurrent_vector<Type, Allocator> &c1, const tbb::concurrent_vector<Type, Allocator> &c2 ) {\n    REQUIRE( (!(c1 == c2) && c1 != c2) );\n    REQUIRE( (c1 <= c2 && c1 < c2 && c2 >= c1 && c2 > c1) );\n}\n\ntemplate <typename Type, typename Allocator>\nvoid CompareVectors( const tbb::concurrent_vector<std::weak_ptr<Type>, Allocator> &, const tbb::concurrent_vector<std::weak_ptr<Type>, Allocator> & ) {\n    /* do nothing for std::weak_ptr */\n}\n\ntemplate <bool default_construction_present, typename Type, typename Allocator>\nvoid Examine( tbb::concurrent_vector<Type, Allocator> c, const std::vector<Type> &vec ) {\n    using vector_t = tbb::concurrent_vector<Type, Allocator>;\n    using size_type_t = typename vector_t::size_type;\n\n\n    REQUIRE( c.size() == vec.size() );\n    for ( size_type_t i=0; i<c.size(); ++i ) {\n        REQUIRE( utils::IsEqual()(c[i], vec[i]) );\n    }\n    do_default_construction_test<default_construction_present>()(test_grow_by_and_resize<Type,Allocator>(c));\n    c.grow_by( size_type_t(5), c[0] );\n    c.grow_to_at_least( c.size()+5, c.at(0) );\n    vector_t c2;\n    c2.reserve( 5 );\n    std::copy( c.begin(), c.begin() + 5, std::back_inserter( c2 ) );\n\n    c.grow_by( c2.begin(), c2.end() );\n    const vector_t& cvcr = c;\n    REQUIRE( utils::IsEqual()(cvcr.front(), *(c2.rend()-1)) );\n    REQUIRE( utils::IsEqual()(cvcr.back(), *c2.rbegin()));\n    REQUIRE( utils::IsEqual()(*c.cbegin(), *(c.crend()-1)) );\n    REQUIRE( utils::IsEqual()(*(c.cend()-1), *c.crbegin()) );\n    c.swap( c2 );\n    REQUIRE( c.size() == 5 );\n    CompareVectors( c, c2 );\n    c.swap( c2 );\n    c2.clear();\n    REQUIRE( c2.size() == 0 );\n    c2.shrink_to_fit();\n    Allocator a = c.get_allocator();\n    a.deallocate( a.allocate(1), 1 );\n}\n\ntemplate <typename Type>\nclass test_default_construction {\n    const std::vector<Type> &my_vec;\npublic:\n    test_default_construction( const std::vector<Type> &vec ) : my_vec(vec) {}\n    void operator()() const {\n        // Construction with initial size specified by argument n.\n        tbb::concurrent_vector<Type> c7( my_vec.size() );\n        std::copy( my_vec.begin(), my_vec.end(), c7.begin() );\n        Examine</*default_construction_present = */true>( c7, my_vec );\n        tbb::concurrent_vector< Type, std::allocator<Type> > c8( my_vec.size() );\n        std::copy( c7.begin(), c7.end(), c8.begin() );\n        Examine</*default_construction_present = */true>( c8, my_vec );\n    }\n};\n\ntemplate <bool default_construction_present, typename Type>\nvoid TypeTester( const std::vector<Type> &vec ) {\n    __TBB_ASSERT( vec.size() >= 5, \"Array should have at least 5 elements\" );\n    // Construct empty vector.\n    tbb::concurrent_vector<Type> c1;\n    std::copy( vec.begin(), vec.end(), std::back_inserter(c1) );\n    Examine<default_construction_present>( c1, vec );\n    // Constructor from initializer_list.\n    tbb::concurrent_vector<Type> c2({vec[0],vec[1],vec[2]});\n    std::copy( vec.begin()+3, vec.end(), std::back_inserter(c2) );\n    Examine<default_construction_present>( c2, vec );\n    // Copying constructor.\n    tbb::concurrent_vector<Type> c3(c1);\n    Examine<default_construction_present>( c3, vec );\n    // Construct with non-default allocator\n    tbb::concurrent_vector< Type, std::allocator<Type> > c4;\n    std::copy( vec.begin(), vec.end(), std::back_inserter(c4) );\n    Examine<default_construction_present>( c4, vec );\n    // Construction with initial size specified by argument n.\n    do_default_construction_test<default_construction_present>()(test_default_construction<Type>(vec));\n    // Construction with initial size specified by argument n, initialization by copying of t, and given allocator instance.\n    std::allocator<Type> allocator;\n    tbb::concurrent_vector< Type, std::allocator<Type> > c9(vec.size(), vec[1], allocator);\n    Examine<default_construction_present>( c9, std::vector<Type>(vec.size(), vec[1]) );\n    // Construction with copying iteration range and given allocator instance.\n    tbb::concurrent_vector< Type, std::allocator<Type> > c10(c1.begin(), c1.end(), allocator);\n    Examine<default_construction_present>( c10, vec );\n    tbb::concurrent_vector<Type> c11(vec.begin(), vec.end());\n    Examine<default_construction_present>( c11, vec );\n}\n\nvoid TestTypes() {\n    const int NUMBER = 100;\n\n    std::vector<int> intArr;\n    for ( int i=0; i<NUMBER; ++i ) intArr.push_back(i);\n    TypeTester</*default_construction_present = */true>( intArr );\n\n    std::vector< std::reference_wrapper<int> > refArr;\n    // The constructor of std::reference_wrapper<T> from T& is explicit in some versions of libstdc++.\n    for ( int i=0; i<NUMBER; ++i ) refArr.push_back( std::reference_wrapper<int>(intArr[i]) );\n    TypeTester</*default_construction_present = */false>( refArr );\n\n    // std::vector< std::atomic<int> > tbbIntArr( NUMBER ); //TODO compilation error\n    // for ( int i=0; i<NUMBER; ++i ) tbbIntArr[i] = i;\n    // TypeTester</*default_construction_present = */true>( tbbIntArr );\n\n    std::vector< std::shared_ptr<int> > shrPtrArr;\n    for ( int i=0; i<NUMBER; ++i ) shrPtrArr.push_back( std::make_shared<int>(i) );\n    TypeTester</*default_construction_present = */true>( shrPtrArr );\n\n    std::vector< std::weak_ptr<int> > wkPtrArr;\n    std::copy( shrPtrArr.begin(), shrPtrArr.end(), std::back_inserter(wkPtrArr) );\n    TypeTester</*default_construction_present = */true>( wkPtrArr );\n}\n\ntemplate <typename Vector>\nvoid test_grow_by_empty_range( Vector &v, typename Vector::value_type* range_begin_end ) {\n    const Vector v_copy = v;\n    REQUIRE_MESSAGE( (v.grow_by( range_begin_end, range_begin_end ) == v.end()), \"grow_by(empty_range) returned a wrong iterator.\" );\n    REQUIRE_MESSAGE( v == v_copy, \"grow_by(empty_range) has changed the vector.\" );\n}\n\nvoid TestSerialGrowByRange( bool fragmented_vector ) {\n    tbb::concurrent_vector<int> v;\n    if ( fragmented_vector ) {\n        v.reserve( 1 );\n    }\n    int init_range[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };\n    REQUIRE_MESSAGE( (v.grow_by( init_range, init_range + (utils::array_length( init_range )) ) == v.begin()), \"grow_by(I,I) returned a wrong iterator.\" );\n    REQUIRE_MESSAGE( std::equal( v.begin(), v.end(), init_range ), \"grow_by(I,I) did not properly copied all elements ?\" );\n    test_grow_by_empty_range( v, init_range );\n    test_grow_by_empty_range( v, (int*)nullptr );\n}\n\ntemplate <typename allocator_type>\nvoid TestConcurrentOperationsWithUnSafeOperations(std::size_t threads_number) {\n    using vector_type = tbb::concurrent_vector<move_support_tests::Foo, allocator_type>;\n\n    vector_type vector;\n\n    constexpr std::size_t max_operations = 1000;\n    std::atomic<int> curr_unsafe_thread{-1};\n    // 0 - is safe operations\n    // 1 - is shrink_to_fit\n    // 2 - is clear + shrink_to_fit\n    // 3 - is resize\n    std::vector<std::size_t> operations(std::size_t(max_operations * 0.95), 0);\n    utils::FastRandom<> op_rand(42);\n    for (std::size_t i = std::size_t(max_operations * 0.95); i < max_operations; ++i) {\n        std::size_t random_operation = op_rand.get() % 3;\n        operations.push_back(random_operation + 1);\n    }\n\n    // Array of active threads\n    std::unique_ptr<std::atomic<int>[]> active_threads{ new std::atomic<int>[threads_number]() };\n    // If thread still have i < max_operations than in array will be false\n    // When some thread finish it operation, set true in active_thread on thread_id position and start executing only safe operations\n    // Than wait all threads\n    // When all threads is finish their operations, all thread exit from lambda\n    auto all_done = [&active_threads, threads_number] {\n        for (std::size_t i = 0; i < threads_number; ++i) {\n            if (active_threads[i].load(std::memory_order_relaxed) == 0) return false;\n        }\n        return true;\n    };\n\n    // Need double synchronization to correct work\n    std::unique_ptr<std::atomic<int>[]> ready_threads{ new std::atomic<int>[threads_number]() };\n    auto all_ready_leave = [&ready_threads, threads_number] {\n        for (std::size_t i = 0; i < threads_number; ++i) {\n            if (ready_threads[i].load(std::memory_order_relaxed) == 0) return false;\n        }\n        return true;\n    };\n\n    utils::SpinBarrier barrier(threads_number);\n    auto concurrent_func = [&operations, &vector, &curr_unsafe_thread, &barrier, &all_done, &active_threads,\n                            &all_ready_leave, &ready_threads] (std::size_t thread_id)\n    {\n        std::vector<std::size_t> local_operations(operations);\n        utils::FastRandom<> rand(thread_id);\n        // std::shuffle doesn't work with msvc2017 and FastRandom\n        for (std::size_t i = local_operations.size(); i > 1; --i) {\n            std::size_t j = rand.get() % i;\n            std::swap(local_operations[i - 1], local_operations[j]);\n        }\n\n        std::size_t i = 0;\n        do {\n            if (all_done()) ready_threads[thread_id] = 1;\n            if (curr_unsafe_thread.load() != -1) {\n                    // If lock taken, wait\n                    // First wait unblock unsafe thread\n                    // Second wait finish unsafe operations\n                    barrier.wait();\n                    barrier.wait();\n            }\n            // Is safe operation\n            if (active_threads[thread_id] == 1 || local_operations[i] == 0) {\n                // If lock is free, perform various operations\n                std::size_t random_operation = rand.get() % 3;\n                switch (random_operation) {\n                    case 0:\n                        {\n                            vector.push_back(1);\n                        }\n                        break;\n                    case 1:\n                        {\n                            std::size_t grow_size = rand.get() % 100;\n                            vector.grow_by(grow_size, 1);\n                        }\n                        break;\n                    case 2:\n                        {\n                            std::size_t grow_at_least_size = vector.size() + rand.get() % 100;\n                            vector.grow_to_at_least(grow_at_least_size, 1);\n                        }\n                        break;\n                }\n            } else {\n                int default_unsafe_thread = -1;\n                if (curr_unsafe_thread.compare_exchange_strong(default_unsafe_thread, int(thread_id))) {\n                    barrier.wait();\n                    // All threads are blocked we can execute our unsafe operation\n                    switch (local_operations[i]) {\n                        case 1:\n                            vector.shrink_to_fit();\n                            break;\n                        case 2:\n                            {\n                                vector.clear();\n                                vector.shrink_to_fit();\n                            }\n                            break;\n                        case 3:\n                            {\n                                vector.resize(0);\n                            }\n                            break;\n                    }\n                    curr_unsafe_thread = -1;\n                    barrier.wait();\n                }\n            }\n            ++i;\n            if (i >= local_operations.size()) active_threads[thread_id] = 1;\n        } while (!all_ready_leave() || !all_done());\n    };\n\n    utils::NativeParallelFor(threads_number, concurrent_func);\n\n    vector.clear();\n    vector.shrink_to_fit();\n}\n\ntemplate <typename RangeType>\nint reduce_vector(RangeType test_range) {\n    return tbb::parallel_reduce(test_range, 0,\n        [] ( const RangeType& range, int sum ) {\n            for (auto it = range.begin(); it != range.end(); ++it) {\n                sum += *it;\n            }\n\n            return sum;\n        },\n        [] ( const int& lhs, const int& rhs) {\n            return lhs + rhs;\n        }\n    );\n}\n\n//! Test the grow_by on range\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"testing serial grow_by range\"){\n    TestSerialGrowByRange(/*fragmented_vector = */false);\n    TestSerialGrowByRange(/*fragmented_vector = */true);\n}\n\n//! Test of push_back operation\n//! \\brief \\ref interface\nTEST_CASE(\"testing range based for support\"){\n    TestRangeBasedFor();\n}\n\n//! Test of work STL algorithms  with concurrent_vector iterator.\n//! \\brief \\ref interface\nTEST_CASE(\"testing sort\"){\n    TestSort();\n}\n\n//! Test concurrent_vector with vector types\n//! \\brief \\ref error_guessing\nTEST_CASE(\"testing concurrent_vector with vector types\"){\n#if HAVE_m128\n    TestVectorTypes<ClassWithSSE>();\n#endif\n#if HAVE_m256\n    if (have_AVX()) TestVectorTypes<ClassWithAVX>();\n#endif\n}\n\n//! Test concurrent push_back operation\n//! \\brief \\ref error_guessing\nTEST_CASE(\"testing find primes\"){\n    TestFindPrimes();\n}\n\n//! Test concurrent_vector with std::scoped_allocator_adaptor\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test concurrent_vector with std::scoped_allocator_adaptor\") {\n    test_scoped_allocator();\n}\n\n//! Test type of vector\n//! \\brief \\ref requirement\nTEST_CASE(\"testing types\"){\n    TestTypes();\n}\n\n//! Test concurrent and unsafe operations\n//! \\brief \\ref regression \\ref error_guessing\nTEST_CASE(\"Work without hang\") {\n    using allocator_type = StaticSharedCountingAllocator<std::allocator<move_support_tests::Foo>>;\n    std::size_t max_threads = utils::get_platform_max_threads() - 1;\n\n    for (std::size_t threads = 1; threads < max_threads; threads = std::size_t(double(threads) * 2.7)) {\n        allocator_type::init_counters();\n        TestConcurrentOperationsWithUnSafeOperations<allocator_type>(threads);\n\n        REQUIRE( allocator_type::allocations == allocator_type::frees );\n        REQUIRE( allocator_type::items_allocated == allocator_type::items_freed );\n        REQUIRE( allocator_type::items_constructed == allocator_type::items_destroyed );\n    }\n}\n\n#if TBB_USE_EXCEPTIONS\n//! Whitebox test for segment table extension\n//! \\brief \\ref regression \\ref error_guessing\nTEST_CASE(\"Whitebox test for segment table extension\") {\n    using allocator_type = StaticSharedCountingAllocator<std::allocator<move_support_tests::Foo>>;\n    using vector_type = tbb::concurrent_vector<move_support_tests::Foo, allocator_type>;\n\n    std::size_t max_number_of_elements_in_embedded = 12;\n\n    for (std::size_t i = 3; i < max_number_of_elements_in_embedded; i += 3) {\n        vector_type vector;\n        allocator_type::init_counters();\n        allocator_type::set_limits(std::size_t(1) << (i + 1));\n\n        try {\n            for (std::size_t j = 0; j < std::size_t(1) << i; ++j) {\n                vector.push_back(1);\n            }\n            vector.grow_by(1000);\n        } catch (std::bad_alloc& ) {\n            allocator_type::set_limits();\n            vector_type copy_of_vector(vector);\n            vector_type copy_of_copy(copy_of_vector);\n            vector_type assigned_vector;\n            assigned_vector = vector;\n            REQUIRE(copy_of_vector == copy_of_copy);\n            REQUIRE(assigned_vector == copy_of_copy);\n        }\n    }\n}\n\n//! Test exception in constructors\n//! \\brief \\ref regression \\ref error_guessing\nTEST_CASE(\"Test exception in constructors\") {\n    using allocator_type = StaticSharedCountingAllocator<std::allocator<double>>;\n    using vector_type = tbb::concurrent_vector<double, allocator_type>;\n\n    allocator_type::set_limits(1);\n\n    REQUIRE_THROWS_AS( [] {\n        vector_type vec1(42, 42.);\n        utils::suppress_unused_warning(vec1);\n    }(), const std::bad_alloc);\n\n    auto list = { 42., 42., 42., 42., 42., 42., 42., 42., 42., 42. };\n    REQUIRE_THROWS_AS( [&] {\n        vector_type vec2(list.begin(), list.end());\n        utils::suppress_unused_warning(vec2);\n    }(), const std::bad_alloc);\n\n    allocator_type::init_counters();\n    allocator_type::set_limits(0);\n    vector_type src_vec(42, 42.);\n    allocator_type::set_limits(1);\n\n    REQUIRE_THROWS_AS( [&] {\n        vector_type vec3(src_vec, allocator_type{});\n        utils::suppress_unused_warning(vec3);\n    }(), const std::bad_alloc);\n}\n#endif // TBB_USE_EXCEPTIONS\n\n//! \\brief \\ref regression \\ref error_guessing\nTEST_CASE(\"Reducing concurrent_vector\") {\n    constexpr int final_sum = 100000;\n    tbb::concurrent_vector<int> vec(final_sum, 1);\n    const tbb::concurrent_vector<int> cvec(vec);\n\n    CHECK(reduce_vector(vec.range()) == final_sum);\n    CHECK(reduce_vector(cvec.range()) == final_sum);\n}\n\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"swap with not always equal allocators\"){\n    using allocator_type = NotAlwaysEqualAllocator<int>;\n    using vector_type = tbb::concurrent_vector<int, allocator_type>;\n\n    vector_type vec1{};\n    vector_type vec2(42, 42);\n\n    swap(vec1, vec2);\n\n    CHECK(vec2.empty());\n}\n\n// The problem was that after allocating first_block,\n// no write was made to the embedded table.\n// Also, two threads could be in the table extension section at once.\n// NOTE: If the implementation of the vector has an issue, this test will either hang\n// or fail with the assertion in debug mode.\n//! \\brief \\ref regression\nTEST_CASE(\"Testing vector in a highly concurrent environment\") {\n    std::uniform_int_distribution<> uniform_dist(1, 32); // grow by from 1 to 32 randomly\n    std::mt19937_64 gen(/*seed*/1); // Constructing with seed to have reproducible results\n    constexpr int num_repeats = 10000, num_inserts = 256;\n    std::vector<int> grow_by_vals(num_inserts);\n\n    for (int i = 0; i < num_repeats; ++i) {\n        int expected_size = 0, expected_sum = 0;\n        std::generate(grow_by_vals.begin(), grow_by_vals.end(),\n                      [&gen, &uniform_dist, &expected_size, &expected_sum]() {\n                          const int random_value = uniform_dist(gen);\n                          expected_size += random_value;\n                          expected_sum += random_value * random_value;\n                          return random_value;\n                      });\n\n        tbb::concurrent_vector<int> test_vec;\n        tbb::parallel_for(0, num_inserts, [&] (int j) {\n            tbb::concurrent_vector<int>::iterator start_it = test_vec.grow_by(grow_by_vals[j]);\n            tbb::concurrent_vector<int>::iterator end_it = start_it + grow_by_vals[j];\n            do {\n                *start_it = grow_by_vals[j];\n            } while (++start_it != end_it);\n        });\n\n        REQUIRE(test_vec.size() == expected_size);\n        int actual_sum = 0;\n        for (int j = 0; j < expected_size; ++j) {\n            actual_sum += test_vec[j];\n        }\n        REQUIRE(expected_sum == actual_sum);\n    }\n}\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"container_range concept for concurrent_vector ranges\") {\n    static_assert(test_concepts::container_range<typename tbb::concurrent_vector<int>::range_type>);\n    static_assert(test_concepts::container_range<typename tbb::concurrent_vector<int>::const_range_type>);\n}\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n\n// There was a bug in concurrent_vector that was reproduced when resize marked\n// segment (that owned by my_first_block) as deleted and\n// on segment allocation thread is stuck waiting this segment to be published by other thread that allocated first block.\n//! Testing resize behavior for case when new size lesser than old size.\n//! \\brief \\ref regression\nTEST_CASE(\"testing resize on sequantual mode\") {\n    tbb::concurrent_vector<int> v;\n\n    v.resize(382);\n    CHECK(v.size() == 382);\n    while (v.size() < 737) {\n        v.emplace_back();\n    }\n    CHECK(v.size() == 737);\n\n    v.resize(27);\n    CHECK(v.size() == 27);\n    while (v.size() < 737) {\n        v.emplace_back();\n    }\n    CHECK(v.size() == 737);\n\n    v.resize(1);\n    CHECK(v.size() == 1);\n    while (v.size() < 40) {\n        v.emplace_back();\n    }\n    CHECK(v.size() == 40);\n\n    v.resize(2222);\n    CHECK(v.size() == 2222);\n    while (v.size() < 4444) {\n        v.emplace_back();\n    }\n    CHECK(v.size() == 4444);\n\n    v.clear();\n    CHECK(v.size() == 0);\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_continue_node.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/config.h\"\n\n#include \"tbb/flow_graph.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/graph_utils.h\"\n#include \"common/test_follows_and_precedes_api.h\"\n#include \"common/concepts_common.h\"\n\n\n//! \\file test_continue_node.cpp\n//! \\brief Test for [flow_graph.continue_node] specification\n\n\n#define N 1000\n#define MAX_NODES 4\n#define C 8\n\n// A class to use as a fake predecessor of continue_node\nstruct fake_continue_sender : public tbb::flow::sender<tbb::flow::continue_msg>\n{\n    typedef tbb::flow::sender<tbb::flow::continue_msg>::successor_type successor_type;\n    // Define implementations of virtual methods that are abstract in the base class\n    bool register_successor( successor_type& ) override { return false; }\n    bool remove_successor( successor_type& )   override { return false; }\n};\n\ntemplate< typename InputType >\nstruct parallel_puts {\n\n    tbb::flow::receiver< InputType > * const my_exe_node;\n\n    parallel_puts( tbb::flow::receiver< InputType > &exe_node ) : my_exe_node(&exe_node) {}\n    parallel_puts& operator=(const parallel_puts&) = delete;\n\n    void operator()( int ) const  {\n        for ( int i = 0; i < N; ++i ) {\n            // the nodes will accept all puts\n            CHECK_MESSAGE( my_exe_node->try_put( InputType() ) == true, \"\" );\n        }\n    }\n\n};\n\ntemplate< typename OutputType >\nvoid run_continue_nodes( int p, tbb::flow::graph& g, tbb::flow::continue_node< OutputType >& n ) {\n    fake_continue_sender fake_sender;\n    for (size_t i = 0; i < N; ++i) {\n        tbb::detail::d2::register_predecessor(n, fake_sender);\n    }\n\n    for (size_t num_receivers = 1; num_receivers <= MAX_NODES; ++num_receivers ) {\n        std::vector< std::shared_ptr<harness_counting_receiver<OutputType>> > receivers;\n        for (size_t i = 0; i < num_receivers; ++i) {\n            receivers.push_back( std::make_shared<harness_counting_receiver<OutputType>>(g) );\n        }\n        harness_graph_executor<tbb::flow::continue_msg, OutputType>::execute_count = 0;\n\n        for (size_t r = 0; r < num_receivers; ++r ) {\n            tbb::flow::make_edge( n, *receivers[r] );\n        }\n\n        utils::NativeParallelFor( p, parallel_puts<tbb::flow::continue_msg>(n) );\n        g.wait_for_all();\n\n        // 2) the nodes will receive puts from multiple predecessors simultaneously,\n        size_t ec = harness_graph_executor<tbb::flow::continue_msg, OutputType>::execute_count;\n        CHECK_MESSAGE( (int)ec == p, \"\" );\n        for (size_t r = 0; r < num_receivers; ++r ) {\n            size_t c = receivers[r]->my_count;\n            // 3) the nodes will send to multiple successors.\n            CHECK_MESSAGE( (int)c == p, \"\" );\n        }\n\n        for (size_t r = 0; r < num_receivers; ++r ) {\n            tbb::flow::remove_edge( n, *receivers[r] );\n        }\n    }\n}\n\ntemplate< typename OutputType, typename Body >\nvoid continue_nodes( Body body ) {\n    for (int p = 1; p < 2*4/*MaxThread*/; ++p) {\n        tbb::flow::graph g;\n        tbb::flow::continue_node< OutputType > exe_node( g, body );\n        run_continue_nodes( p, g, exe_node);\n        exe_node.try_put(tbb::flow::continue_msg());\n        tbb::flow::continue_node< OutputType > exe_node_copy( exe_node );\n        run_continue_nodes( p, g, exe_node_copy);\n    }\n}\n\nconst size_t Offset = 123;\nstd::atomic<size_t> global_execute_count;\n\ntemplate< typename OutputType >\nstruct inc_functor {\n\n    std::atomic<size_t> local_execute_count;\n    inc_functor( ) { local_execute_count = 0; }\n    inc_functor( const inc_functor &f ) { local_execute_count = size_t(f.local_execute_count); }\n    void operator=(const inc_functor &f) { local_execute_count = size_t(f.local_execute_count); }\n\n    OutputType operator()( tbb::flow::continue_msg ) {\n       ++global_execute_count;\n       ++local_execute_count;\n       return OutputType();\n    }\n\n};\n\ntemplate< typename OutputType >\nvoid continue_nodes_with_copy( ) {\n\n    for (int p = 1; p < 2*4/*MaxThread*/; ++p) {\n        tbb::flow::graph g;\n        inc_functor<OutputType> cf;\n        cf.local_execute_count = Offset;\n        global_execute_count = Offset;\n\n        tbb::flow::continue_node< OutputType > exe_node( g, cf );\n        fake_continue_sender fake_sender;\n        for (size_t i = 0; i < N; ++i) {\n            tbb::detail::d2::register_predecessor(exe_node, fake_sender);\n        }\n\n        for (size_t num_receivers = 1; num_receivers <= MAX_NODES; ++num_receivers ) {\n            std::vector< std::shared_ptr<harness_counting_receiver<OutputType>> > receivers;\n            for (size_t i = 0; i < num_receivers; ++i) {\n                receivers.push_back( std::make_shared<harness_counting_receiver<OutputType>>(g) );\n            }\n\n            for (size_t r = 0; r < num_receivers; ++r ) {\n                tbb::flow::make_edge( exe_node, *receivers[r] );\n            }\n\n            utils::NativeParallelFor( p, parallel_puts<tbb::flow::continue_msg>(exe_node) );\n            g.wait_for_all();\n\n            // 2) the nodes will receive puts from multiple predecessors simultaneously,\n            for (size_t r = 0; r < num_receivers; ++r ) {\n                size_t c = receivers[r]->my_count;\n                // 3) the nodes will send to multiple successors.\n                CHECK_MESSAGE( (int)c == p, \"\" );\n            }\n            for (size_t r = 0; r < num_receivers; ++r ) {\n                tbb::flow::remove_edge( exe_node, *receivers[r] );\n            }\n        }\n\n        // validate that the local body matches the global execute_count and both are correct\n        inc_functor<OutputType> body_copy = tbb::flow::copy_body< inc_functor<OutputType> >( exe_node );\n        const size_t expected_count = p*MAX_NODES + Offset;\n        size_t global_count = global_execute_count;\n        size_t inc_count = body_copy.local_execute_count;\n        CHECK_MESSAGE( global_count == expected_count, \"\" );\n        CHECK_MESSAGE( global_count == inc_count, \"\" );\n        g.reset(tbb::flow::rf_reset_bodies);\n        body_copy = tbb::flow::copy_body< inc_functor<OutputType> >( exe_node );\n        inc_count = body_copy.local_execute_count;\n        CHECK_MESSAGE( ( Offset == inc_count), \"reset(rf_reset_bodies) did not reset functor\" );\n\n    }\n}\n\ntemplate< typename OutputType >\nvoid run_continue_nodes() {\n    harness_graph_executor< tbb::flow::continue_msg, OutputType>::max_executors = 0;\n    continue_nodes<OutputType>( []( tbb::flow::continue_msg i ) -> OutputType { return harness_graph_executor<tbb::flow::continue_msg, OutputType>::func(i); } );\n    continue_nodes<OutputType>( &harness_graph_executor<tbb::flow::continue_msg, OutputType>::func );\n    continue_nodes<OutputType>( typename harness_graph_executor<tbb::flow::continue_msg, OutputType>::functor() );\n    continue_nodes_with_copy<OutputType>();\n}\n\n//! Tests limited concurrency cases for nodes that accept data messages\nvoid test_concurrency(int num_threads) {\n    tbb::task_arena arena(num_threads);\n    arena.execute(\n        [&] {\n            run_continue_nodes<tbb::flow::continue_msg>();\n            run_continue_nodes<int>();\n            run_continue_nodes<utils::NoAssign>();\n        }\n    );\n}\n/*\n * Connection of two graphs is not currently supported, but works to some limited extent.\n * This test is included to check for backward compatibility. It checks that a continue_node\n * with predecessors in two different graphs receives the required\n * number of continue messages before it executes.\n */\nusing namespace tbb::flow;\n\nstruct add_to_counter {\n    int* counter;\n    add_to_counter(int& var):counter(&var){}\n    void operator()(continue_msg){*counter+=1;}\n};\n\nvoid test_two_graphs(){\n    int count=0;\n\n    //graph g with broadcast_node and continue_node\n    graph g;\n    broadcast_node<continue_msg> start_g(g);\n    continue_node<continue_msg> first_g(g, add_to_counter(count));\n\n    //graph h with broadcast_node\n    graph h;\n    broadcast_node<continue_msg> start_h(h);\n\n    //making two edges to first_g from the two graphs\n    make_edge(start_g,first_g);\n    make_edge(start_h, first_g);\n\n    //two try_puts from the two graphs\n    start_g.try_put(continue_msg());\n    start_h.try_put(continue_msg());\n    g.wait_for_all();\n    CHECK_MESSAGE( (count==1), \"Not all continue messages received\");\n\n    //two try_puts from the graph that doesn't contain the node\n    count=0;\n    start_h.try_put(continue_msg());\n    start_h.try_put(continue_msg());\n    g.wait_for_all();\n    CHECK_MESSAGE( (count==1), \"Not all continue messages received -1\");\n\n    //only one try_put\n    count=0;\n    start_g.try_put(continue_msg());\n    g.wait_for_all();\n    CHECK_MESSAGE( (count==0), \"Node executed without waiting for all predecessors\");\n}\n\nstruct lightweight_policy_body {\n    const std::thread::id my_thread_id;\n    std::atomic<size_t>& my_count;\n\n    lightweight_policy_body( std::atomic<size_t>& count )\n        : my_thread_id(std::this_thread::get_id()), my_count(count)\n    {\n        my_count = 0;\n    }\n\n    lightweight_policy_body( const lightweight_policy_body& ) = default;\n    lightweight_policy_body& operator=( const lightweight_policy_body& ) = delete;\n\n    void operator()( tbb::flow::continue_msg ) {\n        ++my_count;\n        std::thread::id body_thread_id = std::this_thread::get_id();\n        CHECK_MESSAGE( (body_thread_id == my_thread_id), \"Body executed as not lightweight\");\n    }\n};\n\nvoid test_lightweight_policy() {\n    tbb::flow::graph g;\n    std::atomic<size_t> count1;\n    std::atomic<size_t> count2;\n    tbb::flow::continue_node<tbb::flow::continue_msg, tbb::flow::lightweight>\n        node1(g, lightweight_policy_body(count1));\n    tbb::flow::continue_node<tbb::flow::continue_msg, tbb::flow::lightweight>\n        node2(g, lightweight_policy_body(count2));\n\n    tbb::flow::make_edge(node1, node2);\n    const size_t n = 10;\n    for(size_t i = 0; i < n; ++i) {\n        node1.try_put(tbb::flow::continue_msg());\n    }\n    g.wait_for_all();\n\n    lightweight_policy_body body1 = tbb::flow::copy_body<lightweight_policy_body>(node1);\n    lightweight_policy_body body2 = tbb::flow::copy_body<lightweight_policy_body>(node2);\n    CHECK_MESSAGE( (body1.my_count == n), \"Body of the first node needs to be executed N times\");\n    CHECK_MESSAGE( (body2.my_count == n), \"Body of the second node needs to be executed N times\");\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n#include <array>\n#include <vector>\nvoid test_follows_and_precedes_api() {\n    using msg_t = tbb::flow::continue_msg;\n\n    std::array<msg_t, 3> messages_for_follows = { { msg_t(), msg_t(), msg_t() } };\n    std::vector<msg_t> messages_for_precedes  = { msg_t() };\n\n    auto pass_through = [](const msg_t& msg) { return msg; };\n\n    follows_and_precedes_testing::test_follows\n        <msg_t, tbb::flow::continue_node<msg_t>>\n        (messages_for_follows, pass_through, node_priority_t(0));\n\n    follows_and_precedes_testing::test_precedes\n        <msg_t, tbb::flow::continue_node<msg_t>>\n        (messages_for_precedes, /* number_of_predecessors = */0, pass_through, node_priority_t(1));\n}\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n\n// TODO: use pass_through from test_function_node instead\ntemplate<typename T>\nstruct passing_body {\n    T operator()(const T& val) {\n        return val;\n    }\n};\n\n/*\n    The test covers the case when a node with non-default mutex type is a predecessor for continue_node,\n    because there used to be a bug when make_edge(node, continue_node)\n    did not update continue_node's predecesosor threshold\n    since the specialization of node's successor_cache for a continue_node was not chosen.\n*/\nvoid test_successor_cache_specialization() {\n    using namespace tbb::flow;\n\n    graph g;\n\n    broadcast_node<continue_msg> node_with_default_mutex_type(g);\n    buffer_node<continue_msg> node_with_non_default_mutex_type(g);\n\n    continue_node<continue_msg> node(g, passing_body<continue_msg>());\n\n    make_edge(node_with_default_mutex_type, node);\n    make_edge(node_with_non_default_mutex_type, node);\n\n    buffer_node<continue_msg> buf(g);\n\n    make_edge(node, buf);\n\n    node_with_default_mutex_type.try_put(continue_msg());\n    node_with_non_default_mutex_type.try_put(continue_msg());\n\n    g.wait_for_all();\n\n    continue_msg storage;\n    CHECK_MESSAGE((buf.try_get(storage) && !buf.try_get(storage)),\n                  \"Wrong number of messages is passed via continue_node\");\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\nvoid test_try_put_and_wait_default() {\n    tbb::task_arena arena(1);\n\n    arena.execute([&]{\n        tbb::flow::graph g;\n\n        int processed_items = 0;\n\n        tbb::flow::continue_node<tbb::flow::continue_msg>* start_node = nullptr;\n\n        tbb::flow::continue_node<tbb::flow::continue_msg> cont(g,\n            [&](tbb::flow::continue_msg) noexcept {\n                static bool put_ten_msgs = true;\n                if (put_ten_msgs) {\n                    for (std::size_t i = 0; i < 10; ++i) {\n                        start_node->try_put(tbb::flow::continue_msg{});\n                    }\n                    put_ten_msgs = false;\n                }\n            });\n\n        start_node = &cont;\n\n        tbb::flow::continue_node<tbb::flow::continue_msg, tbb::flow::lightweight> writer(g,\n            [&](tbb::flow::continue_msg) noexcept {\n                ++processed_items;\n            });\n\n        tbb::flow::make_edge(cont, writer);\n\n        cont.try_put_and_wait(tbb::flow::continue_msg{});\n\n        // Only 1 item should be processed, with the additional 10 items having been spawned\n        CHECK_MESSAGE(processed_items == 1, \"Unexpected items processing\");\n\n        g.wait_for_all();\n\n        // The additional 10 items should be processed\n        CHECK_MESSAGE(processed_items == 11, \"Unexpected items processing\");\n    });\n}\n\nvoid test_try_put_and_wait_lightweight() {\n    tbb::task_arena arena(1);\n\n    arena.execute([&]{\n        tbb::flow::graph g;\n\n        std::vector<int> start_work_items;\n        std::vector<int> processed_items;\n        std::vector<int> new_work_items;\n\n        int wait_message = 10;\n\n        for (int i = 0; i < wait_message; ++i) {\n            start_work_items.emplace_back(i);\n            new_work_items.emplace_back(i + 1 + wait_message);\n        }\n\n        tbb::flow::continue_node<int, tbb::flow::lightweight>* start_node = nullptr;\n\n        tbb::flow::continue_node<int, tbb::flow::lightweight> cont(g,\n            [&](tbb::flow::continue_msg) noexcept {\n                static int counter = 0;\n                int i = counter++;\n                if (i == wait_message) {\n                    for (auto item : new_work_items) {\n                        (void)item;\n                        start_node->try_put(tbb::flow::continue_msg{});\n                    }\n                }\n                return i;\n            });\n\n        start_node = &cont;\n\n        tbb::flow::function_node<int, int, tbb::flow::lightweight> writer(g, tbb::flow::unlimited,\n            [&](int input) noexcept {\n                processed_items.emplace_back(input);\n                return 0;\n            });\n\n        tbb::flow::make_edge(cont, writer);\n\n        for (auto item : start_work_items) {\n            (void)item;\n            cont.try_put(tbb::flow::continue_msg{});\n        }\n\n        cont.try_put_and_wait(tbb::flow::continue_msg{});\n\n        CHECK_MESSAGE(processed_items.size() == start_work_items.size() + new_work_items.size() + 1,\n                      \"Unexpected number of elements processed\");\n\n        std::size_t check_index = 0;\n\n        // For lightweight continue_node, start_work_items are expected to be processed first\n        // while putting items into the first node\n        for (auto item : start_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item, \"Unexpected items processing\");\n        }\n\n        for (auto item : new_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item, \"Unexpected items processing\");\n        }\n        // wait_message would be processed only after new_work_items\n        CHECK_MESSAGE(processed_items[check_index++] == wait_message, \"Unexpected items processing\");\n\n        g.wait_for_all();\n\n        CHECK(check_index == processed_items.size());\n    });\n}\n\nvoid test_metainfo_buffering() {\n    tbb::task_arena arena(1);\n\n    arena.execute([&] {\n        tbb::flow::graph g;\n\n        std::vector<char> call_order;\n\n        tbb::flow::continue_node<tbb::flow::continue_msg>* b_ptr = nullptr;\n\n        tbb::flow::continue_node<tbb::flow::continue_msg> a(g,\n            [&](tbb::flow::continue_msg) noexcept {\n                call_order.push_back('A');\n                static std::once_flag flag; // Send a signal to B only in the first call\n                std::call_once(flag, [&]{ b_ptr->try_put(tbb::flow::continue_msg{}); });\n            });\n\n        tbb::flow::continue_node<tbb::flow::continue_msg> b(g,\n            [&](tbb::flow::continue_msg) noexcept {\n                call_order.push_back('B');\n                a.try_put(tbb::flow::continue_msg{});\n            });\n\n        b_ptr = &b;\n\n        tbb::flow::continue_node<tbb::flow::continue_msg, tbb::flow::lightweight> c(g,\n            [&](tbb::flow::continue_msg) noexcept {\n                call_order.push_back('C');\n            });\n\n        tbb::flow::make_edge(a, c);\n        tbb::flow::make_edge(b, c);\n\n        a.try_put_and_wait(tbb::flow::continue_msg{});\n\n        // Inside the first call of A, we send a signal to B.\n        // Both of them send signals to C. Since C lightweight, it is processed immediately\n        // upon receiving signals from both predecessors. This completes the wait.\n        CHECK(call_order == std::vector<char>{'A', 'B', 'C'});\n\n        g.wait_for_all();\n\n        // B previously sent a signal to A, which has now been processed.\n        // A sends a signal to C, which is not processed because no signal is received from B this time.\n        CHECK(call_order == std::vector<char>{'A', 'B', 'C', 'A'});\n    });\n}\n\nvoid test_try_put_and_wait() {\n    test_try_put_and_wait_default();\n    test_try_put_and_wait_lightweight();\n    test_metainfo_buffering();\n}\n#endif // __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n\n//! Test concurrent continue_node for correctness\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Concurrency testing\") {\n    for( unsigned p=utils::MinThread; p<=utils::MaxThread; ++p ) {\n        test_concurrency(p);\n    }\n}\n\n//! Test concurrent continue_node in separate graphs\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Two graphs\") { test_two_graphs(); }\n\n//! Test basic behaviour with lightweight body\n//! \\brief \\ref requirement \\ref error_guessing\nTEST_CASE( \"Lightweight policy\" ) { test_lightweight_policy(); }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n//! Test deprecated follows and precedes API\n//! \\brief \\ref error_guessing\nTEST_CASE( \"Support for follows and precedes API\" ) { test_follows_and_precedes_api(); }\n#endif\n\n//! Test for successor cache specialization\n//! \\brief \\ref regression\nTEST_CASE( \"Regression for successor cache specialization\" ) {\n    test_successor_cache_specialization();\n}\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"constraints for continue_node input\") {\n    static_assert(utils::well_formed_instantiation<tbb::flow::continue_node, test_concepts::Copyable>);\n    static_assert(!utils::well_formed_instantiation<tbb::flow::continue_node, test_concepts::NonCopyable>);\n}\n\ntemplate <typename Input, typename Body>\nconcept can_call_continue_node_ctor = requires( tbb::flow::graph& graph, Body body,\n                                                tbb::flow::buffer_node<int>& f, std::size_t num,\n                                                tbb::flow::node_priority_t priority  ) {\n    tbb::flow::continue_node<Input>(graph, body);\n    tbb::flow::continue_node<Input>(graph, body, priority);\n    tbb::flow::continue_node<Input>(graph, num, body);\n    tbb::flow::continue_node<Input>(graph, num, body, priority);\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    tbb::flow::continue_node<Input>(tbb::flow::follows(f), body);\n    tbb::flow::continue_node<Input>(tbb::flow::follows(f), body, priority);\n    tbb::flow::continue_node<Input>(tbb::flow::follows(f), num, body);\n    tbb::flow::continue_node<Input>(tbb::flow::follows(f), num, body, priority);\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n};\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"constraints for continue_node body\") {\n    using output_type = int;\n    using namespace test_concepts::continue_node_body;\n\n    static_assert(can_call_continue_node_ctor<output_type, Correct<output_type>>);\n    static_assert(!can_call_continue_node_ctor<output_type, NonCopyable<output_type>>);\n    static_assert(!can_call_continue_node_ctor<output_type, NonDestructible<output_type>>);\n    static_assert(!can_call_continue_node_ctor<output_type, NoOperatorRoundBrackets<output_type>>);\n    static_assert(!can_call_continue_node_ctor<output_type, WrongInputOperatorRoundBrackets<output_type>>);\n    static_assert(!can_call_continue_node_ctor<output_type, WrongReturnOperatorRoundBrackets<output_type>>);\n}\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test continue_node try_put_and_wait\") {\n    test_try_put_and_wait();\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_dynamic_link.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_dynamic_link.cpp\n//! \\brief Test for [internal] functionality\n\n#if _WIN32 || _WIN64\n#define _CRT_SECURE_NO_WARNINGS\n#endif\n\n#include \"common/test.h\"\n\nenum FOO_TYPE {\n    FOO_DUMMY,\n    FOO_IMPLEMENTATION\n};\n\n#if _WIN32 || _WIN64\n#define TEST_EXPORT\n#else\n#define TEST_EXPORT extern \"C\" __TBB_EXPORT\n#endif /* _WIN32 || _WIN64 */\n\n// foo \"implementations\".\nTEST_EXPORT FOO_TYPE foo1() { return FOO_IMPLEMENTATION; }\nTEST_EXPORT FOO_TYPE foo2() { return FOO_IMPLEMENTATION; }\n// foo \"dummies\".\nFOO_TYPE dummy_foo1() { return FOO_DUMMY; }\nFOO_TYPE dummy_foo2() { return FOO_DUMMY; }\n\n#include \"oneapi/tbb/detail/_config.h\"\n// Suppress the weak symbol mechanism to avoid surplus compiler warnings.\n#ifdef __TBB_WEAK_SYMBOLS_PRESENT\n#undef __TBB_WEAK_SYMBOLS_PRESENT\n#endif\n#include \"src/tbb/dynamic_link.h\"\n\n#if __TBB_DYNAMIC_LOAD_ENABLED\n// Handlers.\nstatic FOO_TYPE (*foo1_handler)() = &dummy_foo1;\nstatic FOO_TYPE (*foo2_handler)() = &dummy_foo2;\n\n// Table describing how to link the handlers.\nstatic const tbb::detail::r1::dynamic_link_descriptor LinkTable[] = {\n    { \"foo1\", (tbb::detail::r1::pointer_to_handler*)(void*)(&foo1_handler) },\n    { \"foo2\", (tbb::detail::r1::pointer_to_handler*)(void*)(&foo2_handler) }\n};\n#endif\n\n// The direct include since we want to test internal functionality.\n#include \"src/tbb/dynamic_link.cpp\"\n#include \"common/utils.h\"\n#include \"common/utils_dynamic_libs.h\"\n\nvoid test_dynamic_link(const char* lib_name) {\n#if __TBB_DYNAMIC_LOAD_ENABLED\n#if !_WIN32\n    // Check if the executable exports its symbols.\n    REQUIRE_MESSAGE((utils::GetAddress(utils::OpenLibrary(nullptr), \"foo1\") && utils::GetAddress(utils::OpenLibrary(nullptr), \"foo2\")),\n            \"The executable doesn't export its symbols. Is the -rdynamic switch set during linking?\");\n#endif /* !_WIN32 */\n    // We want to link (or fail to link) to the symbols available from the\n    // executable so it doesn't matter what the library name is specified in\n    // the dynamic_link call - let it be an empty string.\n    // Generally speaking the test has sense only on Linux but on Windows it\n    // checks the dynamic_link graceful behavior with incorrect library name.\n    if (tbb::detail::r1::dynamic_link(lib_name, LinkTable, sizeof(LinkTable) / sizeof(LinkTable[0]))) {\n        REQUIRE_MESSAGE((foo1_handler && foo2_handler), \"The symbols are corrupted by dynamic_link\");\n        REQUIRE_MESSAGE((foo1_handler() == FOO_IMPLEMENTATION && foo2_handler() == FOO_IMPLEMENTATION),\n                \"dynamic_link returned the successful code but symbol(s) are wrong\");\n    } else {\n        REQUIRE_MESSAGE((foo1_handler == dummy_foo1 && foo2_handler == dummy_foo2), \"The symbols are corrupted by dynamic_link\");\n    }\n#else\n    utils::suppress_unused_warning(lib_name);\n#endif\n}\n\n//! Testing dynamic_link with non-existing library\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test dynamic_link with non-existing library\") {\n    test_dynamic_link(\"tbb_unrealNAME.so\");\n}\n\n//! Testing dynamic_link\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test dynamic_link\") {\n    test_dynamic_link(\"\");\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_eh_algorithms.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/concurrency_tracker.h\"\n#include \"common/iterator.h\"\n#include \"common/utils_concurrency_limit.h\"\n\n#include <limits.h> // for INT_MAX\n#include <thread>\n#include <vector>\n\n#include \"tbb/parallel_for.h\"\n#include \"tbb/parallel_reduce.h\"\n#include \"tbb/parallel_for_each.h\"\n#include \"tbb/parallel_pipeline.h\"\n#include \"tbb/blocked_range.h\"\n#include \"tbb/task_group.h\"\n#include \"tbb/concurrent_unordered_map.h\"\n#include \"tbb/task.h\"\n#include \"tbb/global_control.h\"\n\n//! \\file test_eh_algorithms.cpp\n//! \\brief Test for [algorithms.parallel_for algorithms.parallel_reduce algorithms.parallel_deterministic_reduce algorithms.parallel_for_each algorithms.parallel_pipeline algorithms.parallel_pipeline.flow_control] specifications\n\n#define FLAT_RANGE  100000\n#define FLAT_GRAIN  100\n#define OUTER_RANGE  100\n#define OUTER_GRAIN  10\n#define INNER_RANGE  (FLAT_RANGE / OUTER_RANGE)\n#define INNER_GRAIN  (FLAT_GRAIN / OUTER_GRAIN)\n\nstruct context_specific_counter {\n    tbb::concurrent_unordered_map<tbb::task_group_context*, std::atomic<unsigned>> context_map{};\n\n    void increment() {\n        tbb::task_group_context* ctx = tbb::task::current_context();\n        REQUIRE(ctx != nullptr);\n        context_map[ctx]++;\n    }\n\n    void reset() {\n        context_map.clear();\n    }\n\n    void validate(unsigned expected_count, const char* msg) {\n        for (auto it = context_map.begin(); it != context_map.end(); it++) {\n            REQUIRE_MESSAGE( it->second <= expected_count, msg);\n        }\n    }\n};\n\nstd::atomic<intptr_t> g_FedTasksCount{}; // number of tasks added by parallel_for_each feeder\nstd::atomic<intptr_t> g_OuterParCalls{};  // number of actual invocations of the outer construct executed.\ncontext_specific_counter g_TGCCancelled{};  // Number of times a task sees its group cancelled at start\n\n#include \"common/exception_handling.h\"\n\n/********************************\n      Variables in test\n\n__ Test control variables\n      g_ExceptionInMaster -- only the external thread is allowed to throw.  If false, the external cannot throw\n      g_SolitaryException -- only one throw may be executed.\n\n-- controls for ThrowTestException for pipeline tests\n      g_NestedPipelines -- are inner pipelines being run?\n      g_PipelinesStarted -- how many pipelines have run their first filter at least once.\n\n-- Information variables\n\n   g_Master -- Thread ID of the \"external\" thread\n      In pipelines sometimes the external thread does not participate, so the tests have to be resilient to this.\n\n-- Measurement variables\n\n   g_OuterParCalls -- how many outer parallel ranges or filters started\n   g_TGCCancelled --  how many inner parallel ranges or filters saw task::self().is_cancelled()\n   g_ExceptionsThrown -- number of throws executed (counted in ThrowTestException)\n   g_MasterExecutedThrow -- number of times external thread actually executed a throw\n   g_NonMasterExecutedThrow -- number of times non-external thread actually executed a throw\n   g_ExceptionCaught -- one of PropagatedException or unknown exception was caught.  (Other exceptions cause assertions.)\n\n   --  Tallies for the task bodies which have executed (counted in each inner body, sampled in ThrowTestException)\n      g_CurExecuted -- total number of inner ranges or filters which executed\n      g_ExecutedAtLastCatch -- value of g_CurExecuted when last catch was made, 0 if none.\n      g_ExecutedAtFirstCatch -- value of g_CurExecuted when first catch is made, 0 if none.\n  *********************************/\n\ninline void ResetGlobals (  bool throwException = true, bool flog = false ) {\n    ResetEhGlobals( throwException, flog );\n    g_FedTasksCount = 0;\n    g_OuterParCalls = 0;\n    g_NestedPipelines = false;\n    g_TGCCancelled.reset();\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// Tests for tbb::parallel_for and tbb::parallel_reduce\n////////////////////////////////////////////////////////////////////////////////\n\ntypedef size_t count_type;\ntypedef tbb::blocked_range<count_type> range_type;\n\ninline intptr_t CountSubranges(range_type r) {\n    if(!r.is_divisible()) return intptr_t(1);\n    range_type r2(r,tbb::split());\n    return CountSubranges(r) + CountSubranges(r2);\n}\n\ninline intptr_t NumSubranges ( intptr_t length, intptr_t grain ) {\n    return CountSubranges(range_type(0,length,grain));\n}\n\ntemplate<class Body>\nintptr_t TestNumSubrangesCalculation ( intptr_t length, intptr_t grain, intptr_t inner_length, intptr_t inner_grain ) {\n    ResetGlobals();\n    g_ThrowException = false;\n    intptr_t outerCalls = NumSubranges(length, grain),\n             innerCalls = NumSubranges(inner_length, inner_grain),\n             maxExecuted = outerCalls * (innerCalls + 1);\n    tbb::parallel_for( range_type(0, length, grain), Body() );\n    REQUIRE_MESSAGE (g_CurExecuted == maxExecuted, \"Wrong estimation of bodies invocation count\");\n    return maxExecuted;\n}\n\nclass NoThrowParForBody {\npublic:\n    void operator()( const range_type& r ) const {\n        if(g_Master == std::this_thread::get_id()) g_MasterExecuted = true;\n        else g_NonMasterExecuted = true;\n        if( tbb::is_current_task_group_canceling() ) g_TGCCancelled.increment();\n        utils::doDummyWork(r.size());\n    }\n};\n\n#if TBB_USE_EXCEPTIONS\n\nvoid Test0 () {\n    ResetGlobals();\n    tbb::simple_partitioner p;\n    for( size_t i=0; i<10; ++i ) {\n        tbb::parallel_for( range_type(0, 0, 1), NoThrowParForBody() );\n        tbb::parallel_for( range_type(0, 0, 1), NoThrowParForBody(), p );\n        tbb::parallel_for( range_type(0, 128, 8), NoThrowParForBody() );\n        tbb::parallel_for( range_type(0, 128, 8), NoThrowParForBody(), p );\n    }\n} // void Test0 ()\n\n//! Template that creates a functor suitable for parallel_reduce from a functor for parallel_for.\ntemplate<typename ParForBody>\nclass SimpleParReduceBody {\n    ParForBody m_Body;\npublic:\n    void operator=(const SimpleParReduceBody&) = delete;\n    SimpleParReduceBody(const SimpleParReduceBody&) = default;\n    SimpleParReduceBody() = default;\n\n    void operator()( const range_type& r ) const { m_Body(r); }\n    SimpleParReduceBody( SimpleParReduceBody& left, tbb::split ) : m_Body(left.m_Body) {}\n    void join( SimpleParReduceBody& /*right*/ ) {}\n}; // SimpleParReduceBody\n\n//! Test parallel_for and parallel_reduce for a given partitioner.\n/** The Body need only be suitable for a parallel_for. */\ntemplate<typename ParForBody, typename Partitioner>\nvoid TestParallelLoopAux() {\n    Partitioner partitioner;\n    for( int i=0; i<2; ++i ) {\n        ResetGlobals();\n        TRY();\n            if( i==0 )\n                tbb::parallel_for( range_type(0, FLAT_RANGE, FLAT_GRAIN), ParForBody(), partitioner );\n            else {\n                SimpleParReduceBody<ParForBody> rb;\n                tbb::parallel_reduce( range_type(0, FLAT_RANGE, FLAT_GRAIN), rb, partitioner );\n            }\n        CATCH_AND_ASSERT();\n        // two cases: g_SolitaryException and !g_SolitaryException\n        //   1) g_SolitaryException: only one thread actually threw.  There is only one context, so the exception\n        //      (when caught) will cause that context to be cancelled.  After this event, there may be one or\n        //      more threads which are \"in-flight\", up to g_NumThreads, but no more will be started.  The threads,\n        //      when they start, if they see they are cancelled, TGCCancelled is incremented.\n        //   2) !g_SolitaryException: more than one thread can throw.  The number of threads that actually\n        //      threw is g_MasterExecutedThrow if only the external thread is allowed, else g_NonMasterExecutedThrow.\n        //      Only one context, so TGCCancelled should be <= g_NumThreads.\n        //\n        // the reasoning is similar for nested algorithms in a single context (Test2).\n        //\n        // If a thread throws in a context, more than one subsequent task body may see the\n        // cancelled state (if they are scheduled before the state is propagated.) this is\n        // infrequent, but it occurs.  So what was to be an assertion must be a remark.\n        g_TGCCancelled.validate( g_NumThreads, \"Too many tasks ran after exception thrown\");\n        REQUIRE_MESSAGE(g_CurExecuted <= g_ExecutedAtLastCatch + g_NumThreads, \"Too many tasks survived exception\");\n        if ( g_SolitaryException ) {\n            REQUIRE_MESSAGE(g_NumExceptionsCaught == 1, \"No try_blocks in any body expected in this test\");\n            REQUIRE_MESSAGE(g_NumExceptionsCaught == (g_ExceptionInMaster ? g_MasterExecutedThrow : g_NonMasterExecutedThrow),\n                \"Not all throws were caught\");\n            REQUIRE_MESSAGE(g_ExecutedAtFirstCatch == g_ExecutedAtLastCatch, \"Too many exceptions occurred\");\n        }\n        else {\n            REQUIRE_MESSAGE(g_NumExceptionsCaught >= 1, \"No try blocks in any body expected in this test\");\n        }\n    }\n}  // TestParallelLoopAux\n\n//! Test with parallel_for and parallel_reduce, over all three kinds of partitioners.\n/** The Body only needs to be suitable for tbb::parallel_for. */\ntemplate<typename Body>\nvoid TestParallelLoop() {\n    // The simple and auto partitioners should be const, but not the affinity partitioner.\n    TestParallelLoopAux<Body, const tbb::simple_partitioner  >();\n    TestParallelLoopAux<Body, const tbb::auto_partitioner    >();\n#define __TBB_TEMPORARILY_DISABLED 1\n#if !__TBB_TEMPORARILY_DISABLED\n    // TODO: Improve the test so that it tolerates delayed start of tasks with affinity_partitioner\n    TestParallelLoopAux<Body, /***/ tbb::affinity_partitioner>();\n#endif\n#undef __TBB_TEMPORARILY_DISABLED\n}\n\nclass SimpleParForBody {\npublic:\n    void operator=(const SimpleParForBody&) = delete;\n    SimpleParForBody(const SimpleParForBody&) = default;\n    SimpleParForBody() = default;\n\n    void operator()( const range_type& r ) const {\n        utils::ConcurrencyTracker ct;\n        ++g_CurExecuted;\n        if(g_Master == std::this_thread::get_id()) g_MasterExecuted = true;\n        else g_NonMasterExecuted = true;\n        if( tbb::is_current_task_group_canceling() ) g_TGCCancelled.increment();\n        utils::doDummyWork(r.size());\n        WaitUntilConcurrencyPeaks();\n        ThrowTestException(1);\n    }\n};\n\nvoid Test1() {\n    // non-nested parallel_for/reduce with throwing body, one context\n    TestParallelLoop<SimpleParForBody>();\n} // void Test1 ()\n\nclass OuterParForBody {\npublic:\n    void operator=(const OuterParForBody&) = delete;\n    OuterParForBody(const OuterParForBody&) = default;\n    OuterParForBody() = default;\n    void operator()( const range_type& ) const {\n        utils::ConcurrencyTracker ct;\n        ++g_OuterParCalls;\n        tbb::parallel_for( tbb::blocked_range<size_t>(0, INNER_RANGE, INNER_GRAIN), SimpleParForBody() );\n    }\n};\n\n//! Uses parallel_for body containing an inner parallel_for with the default context not wrapped by a try-block.\n/** Inner algorithms are spawned inside the new bound context by default. Since\n    exceptions thrown from the inner parallel_for are not handled by the caller\n    (outer parallel_for body) in this test, they will cancel all the sibling inner\n    algorithms. **/\nvoid Test2 () {\n    TestParallelLoop<OuterParForBody>();\n} // void Test2 ()\n\nclass OuterParForBodyWithIsolatedCtx {\npublic:\n    void operator()( const range_type& ) const {\n        tbb::task_group_context ctx(tbb::task_group_context::isolated);\n        ++g_OuterParCalls;\n        tbb::parallel_for( tbb::blocked_range<size_t>(0, INNER_RANGE, INNER_GRAIN), SimpleParForBody(), tbb::simple_partitioner(), ctx );\n    }\n};\n\n//! Uses parallel_for body invoking an inner parallel_for with an isolated context without a try-block.\n/** Even though exceptions thrown from the inner parallel_for are not handled\n    by the caller in this test, they will not affect sibling inner algorithms\n    already running because of the isolated contexts. However because the first\n    exception cancels the root parallel_for only the first g_NumThreads subranges\n    will be processed (which launch inner parallel_fors) **/\nvoid Test3 () {\n    ResetGlobals();\n    typedef OuterParForBodyWithIsolatedCtx body_type;\n    intptr_t  innerCalls = NumSubranges(INNER_RANGE, INNER_GRAIN),\n            // we expect one thread to throw without counting, the rest to run to completion\n            // this formula assumes g_numThreads outer pfor ranges will be started, but that is not the\n            // case; the SimpleParFor subranges are started up as part of the outer ones, and when\n            // the amount of concurrency reaches g_NumThreads no more outer Pfor ranges are started.\n            // so we have to count the number of outer Pfors actually started.\n            minExecuted = (g_NumThreads - 1) * innerCalls;\n    TRY();\n        tbb::parallel_for( range_type(0, OUTER_RANGE, OUTER_GRAIN), body_type() );\n    CATCH_AND_ASSERT();\n    minExecuted = (g_OuterParCalls - 1) * innerCalls;  // see above\n\n    // The first formula above assumes all ranges of the outer parallel for are executed, and one\n    // cancels.  In the event, we have a smaller number of ranges that start before the exception\n    // is caught.\n    //\n    //  g_SolitaryException:One inner range throws.  Outer parallel_For is cancelled, but sibling\n    //                      parallel_fors continue to completion (unless the threads that execute\n    //                      are not allowed to throw, in which case we will not see any exceptions).\n    // !g_SolitaryException:multiple inner ranges may throw.  Any which throws will stop, and the\n    //                      corresponding range of the outer pfor will stop also.\n    //\n    // In either case, once the outer pfor gets the exception it will stop executing further ranges.\n\n    // if the only threads executing were not allowed to throw, then not seeing an exception is okay.\n    bool okayNoExceptionsCaught = (g_ExceptionInMaster && !g_MasterExecuted) || (!g_ExceptionInMaster && !g_NonMasterExecuted);\n    if ( g_SolitaryException ) {\n        g_TGCCancelled.validate(g_NumThreads, \"Too many tasks survived exception\");\n        REQUIRE_MESSAGE (g_CurExecuted > minExecuted, \"Too few tasks survived exception\");\n        REQUIRE_MESSAGE ((g_CurExecuted <= minExecuted + (g_ExecutedAtLastCatch + g_NumThreads)), \"Too many tasks survived exception\");\n        REQUIRE_MESSAGE ((g_NumExceptionsCaught == 1 || okayNoExceptionsCaught), \"No try_blocks in any body expected in this test\");\n    }\n    else {\n        REQUIRE_MESSAGE ((g_CurExecuted <= g_ExecutedAtLastCatch + g_NumThreads), \"Too many tasks survived exception\");\n        REQUIRE_MESSAGE ((g_NumExceptionsCaught >= 1 || okayNoExceptionsCaught), \"No try_blocks in any body expected in this test\");\n    }\n} // void Test3 ()\n\nclass OuterParForExceptionSafeBody {\npublic:\n    void operator()( const range_type& ) const {\n        tbb::task_group_context ctx(tbb::task_group_context::isolated);\n        ++g_OuterParCalls;\n        TRY();\n            tbb::parallel_for( tbb::blocked_range<size_t>(0, INNER_RANGE, INNER_GRAIN), SimpleParForBody(), tbb::simple_partitioner(), ctx );\n        CATCH();  // this macro sets g_ExceptionCaught\n    }\n};\n\n//! Uses parallel_for body invoking an inner parallel_for (with isolated context) inside a try-block.\n/** Since exception(s) thrown from the inner parallel_for are handled by the caller\n    in this test, they do not affect neither other tasks of the the root parallel_for\n    nor sibling inner algorithms. **/\nvoid Test4 () {\n    ResetGlobals( true, true );\n    intptr_t  innerCalls = NumSubranges(INNER_RANGE, INNER_GRAIN),\n              outerCalls = NumSubranges(OUTER_RANGE, OUTER_GRAIN);\n    TRY();\n        tbb::parallel_for( range_type(0, OUTER_RANGE, OUTER_GRAIN), OuterParForExceptionSafeBody() );\n    CATCH();\n    // g_SolitaryException  : one inner pfor will throw, the rest will execute to completion.\n    //                        so the count should be (outerCalls -1) * innerCalls, if a throw happened.\n    // !g_SolitaryException : possible multiple inner pfor throws.  Should be approximately\n    //                        (outerCalls - g_NumExceptionsCaught) * innerCalls, give or take a few\n    intptr_t  minExecuted = (outerCalls - g_NumExceptionsCaught) * innerCalls;\n    bool okayNoExceptionsCaught = (g_ExceptionInMaster && !g_MasterExecuted) || (!g_ExceptionInMaster && !g_NonMasterExecuted);\n    if ( g_SolitaryException ) {\n        // only one task had exception thrown. That task had at least one execution (the one that threw).\n        // There may be an arbitrary number of ranges executed after the throw but before the exception\n        // is caught in the scheduler and cancellation is signaled.  (seen 9, 11 and 62 (!) for 8 threads)\n        REQUIRE_MESSAGE ((g_NumExceptionsCaught == 1 || okayNoExceptionsCaught), \"No exception registered\");\n        REQUIRE_MESSAGE (g_CurExecuted >= minExecuted, \"Too few tasks executed\");\n        g_TGCCancelled.validate(g_NumThreads, \"Too many tasks survived exception\");\n        // a small number of threads can execute in a throwing sub-pfor, if the task which is\n        // to do the solitary throw swaps out after registering its intent to throw but before it\n        // actually does so. As a result, the number of extra tasks cannot exceed the number of thread\n        // for each nested pfor invication)\n        REQUIRE_MESSAGE (g_CurExecuted <= minExecuted + (g_ExecutedAtLastCatch + g_NumThreads), \"Too many tasks survived exception\");\n    }\n    else {\n        REQUIRE_MESSAGE (((g_NumExceptionsCaught >= 1 && g_NumExceptionsCaught <= outerCalls) || okayNoExceptionsCaught), \"Unexpected actual number of exceptions\");\n        REQUIRE_MESSAGE (g_CurExecuted >= minExecuted, \"Too few executed tasks reported\");\n        REQUIRE_MESSAGE ((g_CurExecuted <= g_ExecutedAtLastCatch + g_NumThreads), \"Too many tasks survived multiple exceptions\");\n        REQUIRE_MESSAGE (g_CurExecuted <= outerCalls * (1 + g_NumThreads), \"Too many tasks survived exception\");\n    }\n} // void Test4 ()\n\n//! Testing parallel_for and parallel_reduce exception handling\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_for and parallel_reduce exception handling test #0\") {\n    for (auto concurrency_level: utils::concurrency_range()) {\n        g_NumThreads = static_cast<int>(concurrency_level);\n        g_Master = std::this_thread::get_id();\n        if (g_NumThreads > 1) {\n            tbb::task_arena a(g_NumThreads);\n            a.execute([] {\n                // Execute in all the possible modes\n                for (size_t j = 0; j < 4; ++j) {\n                    g_ExceptionInMaster = (j & 1) != 0;\n                    g_SolitaryException = (j & 2) != 0;\n\n                    Test0();\n                }\n            });\n        }\n    }\n}\n#if !EMSCRIPTEN\n//! Testing parallel_for and parallel_reduce exception handling\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_for and parallel_reduce exception handling test #1\") {\n    for (auto concurrency_level: utils::concurrency_range()) {\n        g_NumThreads = static_cast<int>(concurrency_level);\n        g_Master = std::this_thread::get_id();\n        if (g_NumThreads > 1) {\n            tbb::task_arena a(g_NumThreads);\n            a.execute([] {\n                // Execute in all the possible modes\n                for (size_t j = 0; j < 4; ++j) {\n                    g_ExceptionInMaster = (j & 1) != 0;\n                    g_SolitaryException = (j & 2) != 0;\n\n                    Test1();\n                }\n            });\n        }\n    }\n}\n\n//! Testing parallel_for and parallel_reduce exception handling\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_for and parallel_reduce exception handling test #2\") {\n    for (auto concurrency_level: utils::concurrency_range()) {\n        g_NumThreads = static_cast<int>(concurrency_level);\n        g_Master = std::this_thread::get_id();\n        if (g_NumThreads > 1) {\n            tbb::task_arena a(g_NumThreads);\n            a.execute([] {\n                // Execute in all the possible modes\n                for (size_t j = 0; j < 4; ++j) {\n                    g_ExceptionInMaster = (j & 1) != 0;\n                    g_SolitaryException = (j & 2) != 0;\n\n                    Test2();\n                }\n            });\n        }\n    }\n}\n\n//! Testing parallel_for and parallel_reduce exception handling\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_for and parallel_reduce exception handling test #3\") {\n    for (auto concurrency_level: utils::concurrency_range()) {\n        g_NumThreads = static_cast<int>(concurrency_level);\n        g_Master = std::this_thread::get_id();\n        if (g_NumThreads > 1) {\n            tbb::task_arena a(g_NumThreads);\n            a.execute([] {\n                // Execute in all the possible modes\n                for (size_t j = 0; j < 4; ++j) {\n                    g_ExceptionInMaster = (j & 1) != 0;\n                    g_SolitaryException = (j & 2) != 0;\n\n                    Test3();\n                }\n            });\n        }\n    }\n}\n\n//! Testing parallel_for and parallel_reduce exception handling\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_for and parallel_reduce exception handling test #4\") {\n    for (auto concurrency_level: utils::concurrency_range()) {\n        g_NumThreads = static_cast<int>(concurrency_level);\n        g_Master = std::this_thread::get_id();\n        if (g_NumThreads > 1) {\n            tbb::task_arena a(g_NumThreads);\n            a.execute([] {\n                // Execute in all the possible modes\n                for (size_t j = 0; j < 4; ++j) {\n                    g_ExceptionInMaster = (j & 1) != 0;\n                    g_SolitaryException = (j & 2) != 0;\n\n                    Test4();\n                }\n            });\n        }\n    }\n}\n\n#endif\n#endif /* TBB_USE_EXCEPTIONS */\nclass ParForBodyToCancel {\npublic:\n    void operator()( const range_type& ) const {\n        ++g_CurExecuted;\n        Cancellator::WaitUntilReady();\n    }\n};\n\ntemplate<class B>\nclass ParForLauncher {\n    tbb::task_group_context &my_ctx;\npublic:\n    void operator()() const {\n        tbb::parallel_for( range_type(0, FLAT_RANGE, FLAT_GRAIN), B(), tbb::simple_partitioner(), my_ctx );\n    }\n    ParForLauncher ( tbb::task_group_context& ctx ) : my_ctx(ctx) {}\n};\n\n//! Test for cancelling an algorithm from outside (from a task running in parallel with the algorithm).\nvoid TestCancelation1 () {\n    ResetGlobals( false );\n    RunCancellationTest<ParForLauncher<ParForBodyToCancel>, Cancellator>( NumSubranges(FLAT_RANGE, FLAT_GRAIN) / 4 );\n}\n\nclass Cancellator2  {\n    tbb::task_group_context &m_GroupToCancel;\n\npublic:\n    void operator()() const {\n        utils::ConcurrencyTracker ct;\n        WaitUntilConcurrencyPeaks();\n        m_GroupToCancel.cancel_group_execution();\n        g_ExecutedAtLastCatch = g_CurExecuted.load();\n    }\n\n    Cancellator2 ( tbb::task_group_context& ctx, intptr_t ) : m_GroupToCancel(ctx) {}\n};\n\nclass ParForBodyToCancel2 {\npublic:\n    void operator()( const range_type& ) const {\n        ++g_CurExecuted;\n        utils::ConcurrencyTracker ct;\n        // The test will hang (and be timed out by the test system) if is_cancelled() is broken\n        while( !tbb::is_current_task_group_canceling() )\n            utils::yield();\n    }\n};\n\n//! Test for cancelling an algorithm from outside (from a task running in parallel with the algorithm).\n/** This version also tests tbb::is_current_task_group_canceling() method. **/\nvoid TestCancelation2 () {\n    ResetGlobals();\n    RunCancellationTest<ParForLauncher<ParForBodyToCancel2>, Cancellator2>();\n    REQUIRE_MESSAGE (g_ExecutedAtLastCatch < g_NumThreads, \"Somehow worker tasks started their execution before the cancellator task\");\n    g_TGCCancelled.validate(g_NumThreads, \"Too many tasks survived cancellation\");\n    REQUIRE_MESSAGE (g_CurExecuted <= g_ExecutedAtLastCatch + g_NumThreads, \"Some tasks were executed after cancellation\");\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// Regression test based on the contribution by the author of the following forum post:\n// http://softwarecommunity.intel.com/isn/Community/en-US/forums/thread/30254959.aspx\n\nclass Worker {\n    static const int max_nesting = 3;\n    static const int reduce_range = 1024;\n    static const int reduce_grain = 256;\npublic:\n    int DoWork (int level);\n    int Validate (int start_level) {\n        int expected = 1; // identity for multiplication\n        for(int i=start_level+1; i<max_nesting; ++i)\n             expected *= reduce_range;\n        return expected;\n    }\n};\n\nclass RecursiveParReduceBodyWithSharedWorker {\n    Worker * m_SharedWorker;\n    int m_NestingLevel;\n    int m_Result;\npublic:\n    RecursiveParReduceBodyWithSharedWorker ( RecursiveParReduceBodyWithSharedWorker& src, tbb::split )\n        : m_SharedWorker(src.m_SharedWorker)\n        , m_NestingLevel(src.m_NestingLevel)\n        , m_Result(0)\n    {}\n    RecursiveParReduceBodyWithSharedWorker ( Worker *w, int outer )\n        : m_SharedWorker(w)\n        , m_NestingLevel(outer)\n        , m_Result(0)\n    {}\n\n    void operator() ( const tbb::blocked_range<size_t>& r ) {\n        if(g_Master == std::this_thread::get_id()) g_MasterExecuted = true;\n        else g_NonMasterExecuted = true;\n        if( tbb::is_current_task_group_canceling() ) g_TGCCancelled.increment();\n        for (size_t i = r.begin (); i != r.end (); ++i) {\n            m_Result += m_SharedWorker->DoWork (m_NestingLevel);\n        }\n    }\n    void join (const RecursiveParReduceBodyWithSharedWorker & x) {\n        m_Result += x.m_Result;\n    }\n    int result () { return m_Result; }\n};\n\nint Worker::DoWork ( int level ) {\n    ++level;\n    if ( level < max_nesting ) {\n        RecursiveParReduceBodyWithSharedWorker rt (this, level);\n        tbb::parallel_reduce (tbb::blocked_range<size_t>(0, reduce_range, reduce_grain), rt);\n        return rt.result();\n    }\n    else\n        return 1;\n}\n\n//! Regression test for hanging that occurred with the first version of cancellation propagation\nvoid TestCancelation3 () {\n    Worker w;\n    int result   = w.DoWork (0);\n    int expected = w.Validate(0);\n    REQUIRE_MESSAGE ( result == expected, \"Wrong calculation result\");\n}\n\nstruct StatsCounters {\n    std::atomic<size_t> my_total_created;\n    std::atomic<size_t> my_total_deleted;\n    StatsCounters() {\n        my_total_created = 0;\n        my_total_deleted = 0;\n    }\n};\n\nclass ParReduceBody {\n    StatsCounters* my_stats;\n    size_t my_id;\n    bool my_exception;\n    tbb::task_group_context& tgc;\n\npublic:\n    ParReduceBody( StatsCounters& s_, tbb::task_group_context& context, bool e_ ) :\n        my_stats(&s_), my_exception(e_), tgc(context) {\n        my_id = my_stats->my_total_created++;\n    }\n\n    ParReduceBody( const ParReduceBody& lhs ) : tgc(lhs.tgc) {\n        my_stats = lhs.my_stats;\n        my_id = my_stats->my_total_created++;\n    }\n\n    ParReduceBody( ParReduceBody& lhs, tbb::split ) : tgc(lhs.tgc) {\n        my_stats = lhs.my_stats;\n        my_id = my_stats->my_total_created++;\n    }\n\n    ~ParReduceBody(){ ++my_stats->my_total_deleted; }\n\n    void operator()( const tbb::blocked_range<std::size_t>& /*range*/ ) const {\n        //Do nothing, except for one task (chosen arbitrarily)\n        if( my_id >= 12 ) {\n            if( my_exception )\n                ThrowTestException(1);\n            else\n                tgc.cancel_group_execution();\n        }\n    }\n\n    void join( ParReduceBody& /*rhs*/ ) {}\n};\n\nvoid TestCancelation4() {\n    StatsCounters statsObj;\n#if TBB_USE_EXCEPTIONS\n    try\n#endif\n    {\n        tbb::task_group_context tgc1, tgc2;\n        ParReduceBody body_for_cancellation(statsObj, tgc1, false), body_for_exception(statsObj, tgc2, true);\n        tbb::parallel_reduce( tbb::blocked_range<std::size_t>(0,100000000,100), body_for_cancellation, tbb::simple_partitioner(), tgc1 );\n        tbb::parallel_reduce( tbb::blocked_range<std::size_t>(0,100000000,100), body_for_exception, tbb::simple_partitioner(), tgc2 );\n    }\n#if TBB_USE_EXCEPTIONS\n    catch(...) {}\n#endif\n    REQUIRE_MESSAGE ( statsObj.my_total_created==statsObj.my_total_deleted, \"Not all parallel_reduce body objects created were reclaimed\");\n}\n\n//! Testing parallel_for and parallel_reduce cancellation\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_for and parallel_reduce cancellation test #1\") {\n    for (auto concurrency_level: utils::concurrency_range()) {\n        g_NumThreads = static_cast<int>(concurrency_level);\n        g_Master = std::this_thread::get_id();\n        if (g_NumThreads > 1) {\n            tbb::task_arena a(g_NumThreads);\n            a.execute([] {\n                // Execute in all the possible modes\n                for (size_t j = 0; j < 4; ++j) {\n                    g_ExceptionInMaster = (j & 1) != 0;\n                    g_SolitaryException = (j & 2) != 0;\n\n                    TestCancelation1();\n                }\n            });\n        }\n    }\n}\n\n#if !EMSCRIPTEN\n//! Testing parallel_for and parallel_reduce cancellation\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_for and parallel_reduce cancellation test #2\") {\n    for (auto concurrency_level: utils::concurrency_range()) {\n        g_NumThreads = static_cast<int>(concurrency_level);\n        g_Master = std::this_thread::get_id();\n        if (g_NumThreads > 1) {\n            tbb::task_arena a(g_NumThreads);\n            a.execute([] {\n                // Execute in all the possible modes\n                for (size_t j = 0; j < 4; ++j) {\n                    g_ExceptionInMaster = (j & 1) != 0;\n                    g_SolitaryException = (j & 2) != 0;\n\n                    TestCancelation2();\n                }\n            });\n        }\n    }\n}\n#endif\n\n//! Testing parallel_for and parallel_reduce cancellation\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_for and parallel_reduce cancellation test #3\") {\n    for (auto concurrency_level: utils::concurrency_range()) {\n        g_NumThreads = static_cast<int>(concurrency_level);\n        g_Master = std::this_thread::get_id();\n        if (g_NumThreads > 1) {\n            tbb::task_arena a(g_NumThreads);\n            a.execute([] {\n                // Execute in all the possible modes\n                for (size_t j = 0; j < 4; ++j) {\n                    g_ExceptionInMaster = (j & 1) != 0;\n                    g_SolitaryException = (j & 2) != 0;\n\n                    TestCancelation3();\n                }\n            });\n        }\n    }\n}\n\n//! Testing parallel_for and parallel_reduce cancellation\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_for and parallel_reduce cancellation test #4\") {\n    for (auto concurrency_level: utils::concurrency_range()) {\n        g_NumThreads = static_cast<int>(concurrency_level);\n        g_Master = std::this_thread::get_id();\n        if (g_NumThreads > 1) {\n            tbb::task_arena a(g_NumThreads);\n            a.execute([] {\n                // Execute in all the possible modes\n                for (size_t j = 0; j < 4; ++j) {\n                    g_ExceptionInMaster = (j & 1) != 0;\n                    g_SolitaryException = (j & 2) != 0;\n\n                    TestCancelation4();\n                }\n            });\n        }\n    }\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// Tests for tbb::parallel_for_each\n////////////////////////////////////////////////////////////////////////////////\n\nstd::size_t get_iter_range_size() {\n    // Set the minimal iteration sequence size to 50 to improve test complexity on small machines\n    return std::max(50, g_NumThreads * 2);\n}\n\ntemplate<typename Iterator>\nstruct adaptive_range {\n    std::vector<std::size_t> my_array;\n\n    adaptive_range(std::size_t size) : my_array(size + 1) {}\n    using iterator = Iterator;\n\n    iterator begin() const {\n        return iterator{&my_array.front()};\n    }\n    iterator begin() {\n        return iterator{&my_array.front()};\n    }\n    iterator end() const {\n        return iterator{&my_array.back()};\n    }\n    iterator end() {\n        return iterator{&my_array.back()};\n    }\n};\n\nvoid Feed ( tbb::feeder<size_t> &feeder, size_t val ) {\n    if (g_FedTasksCount < 50) {\n        ++g_FedTasksCount;\n        feeder.add(val);\n    }\n}\n\n#define RunWithSimpleBody(func, body)       \\\n    func<utils::ForwardIterator<size_t>, body>();         \\\n    func<utils::ForwardIterator<size_t>, body##WithFeeder>()\n\n#define RunWithTemplatedBody(func, body)     \\\n    func<utils::ForwardIterator<size_t>, body<utils::ForwardIterator<size_t> > >();         \\\n    func<utils::ForwardIterator<size_t>, body##WithFeeder<utils::ForwardIterator<size_t> > >()\n\n#if TBB_USE_EXCEPTIONS\n\n// Simple functor object with exception\nclass SimpleParForEachBody {\npublic:\n    void operator() ( size_t &value ) const {\n        ++g_CurExecuted;\n        if(g_Master == std::this_thread::get_id()) g_MasterExecuted = true;\n        else g_NonMasterExecuted = true;\n        if( tbb::is_current_task_group_canceling() ) {\n            g_TGCCancelled.increment();\n        }\n        utils::ConcurrencyTracker ct;\n        value += 1000;\n        WaitUntilConcurrencyPeaks();\n        ThrowTestException(1);\n    }\n};\n\n// Simple functor object with exception and feeder\nclass SimpleParForEachBodyWithFeeder : SimpleParForEachBody {\npublic:\n    void operator() ( size_t &value, tbb::feeder<size_t> &feeder ) const {\n        Feed(feeder, 0);\n        SimpleParForEachBody::operator()(value);\n    }\n};\n\n// Tests exceptions without nesting\ntemplate <class Iterator, class simple_body>\nvoid Test1_parallel_for_each () {\n    ResetGlobals();\n    auto range = adaptive_range<Iterator>(get_iter_range_size());\n    TRY();\n        tbb::parallel_for_each(std::begin(range), std::end(range), simple_body() );\n    CATCH_AND_ASSERT();\n    REQUIRE_MESSAGE (g_CurExecuted <= g_ExecutedAtLastCatch + g_NumThreads, \"Too many tasks survived exception\");\n    g_TGCCancelled.validate(g_NumThreads, \"Too many tasks survived cancellation\");\n    REQUIRE_MESSAGE (g_NumExceptionsCaught == 1, \"No try_blocks in any body expected in this test\");\n    if ( !g_SolitaryException )\n        REQUIRE_MESSAGE (g_CurExecuted <= g_ExecutedAtLastCatch + g_NumThreads, \"Too many tasks survived exception\");\n\n} // void Test1_parallel_for_each ()\n\ntemplate <class Iterator>\nclass OuterParForEachBody {\npublic:\n    void operator()( size_t& /*value*/ ) const {\n        ++g_OuterParCalls;\n        auto range = adaptive_range<Iterator>(get_iter_range_size());\n        tbb::parallel_for_each(std::begin(range), std::end(range), SimpleParForEachBody());\n    }\n};\n\ntemplate <class Iterator>\nclass OuterParForEachBodyWithFeeder : OuterParForEachBody<Iterator> {\npublic:\n    void operator()( size_t& value, tbb::feeder<size_t>& feeder ) const {\n        Feed(feeder, 0);\n        OuterParForEachBody<Iterator>::operator()(value);\n    }\n};\n\n//! Uses parallel_for_each body containing an inner parallel_for_each with the default context not wrapped by a try-block.\n/** Inner algorithms are spawned inside the new bound context by default. Since\n    exceptions thrown from the inner parallel_for_each are not handled by the caller\n    (outer parallel_for_each body) in this test, they will cancel all the sibling inner\n    algorithms. **/\ntemplate <class Iterator, class outer_body>\nvoid Test2_parallel_for_each () {\n    ResetGlobals();\n    auto range = adaptive_range<Iterator>(get_iter_range_size());\n    TRY();\n        tbb::parallel_for_each(std::begin(range), std::end(range), outer_body() );\n    CATCH_AND_ASSERT();\n    REQUIRE_MESSAGE (g_CurExecuted <= g_ExecutedAtLastCatch + g_NumThreads, \"Too many tasks survived exception\");\n    g_TGCCancelled.validate(g_NumThreads, \"Too many tasks survived cancellation\");\n    REQUIRE_MESSAGE (g_NumExceptionsCaught == 1, \"No try_blocks in any body expected in this test\");\n    if ( !g_SolitaryException )\n        REQUIRE_MESSAGE (g_CurExecuted <= g_ExecutedAtLastCatch + g_NumThreads, \"Too many tasks survived exception\");\n} // void Test2_parallel_for_each ()\n\ntemplate <class Iterator>\nclass OuterParForEachBodyWithIsolatedCtx {\npublic:\n    void operator()( size_t& /*value*/ ) const {\n        tbb::task_group_context ctx(tbb::task_group_context::isolated);\n        ++g_OuterParCalls;\n        auto range = adaptive_range<Iterator>(get_iter_range_size());\n        tbb::parallel_for_each(std::begin(range), std::end(range), SimpleParForEachBody(), ctx);\n    }\n};\n\ntemplate <class Iterator>\nclass OuterParForEachBodyWithIsolatedCtxWithFeeder : OuterParForEachBodyWithIsolatedCtx<Iterator> {\npublic:\n    void operator()( size_t& value, tbb::feeder<size_t> &feeder ) const {\n        Feed(feeder, 0);\n        OuterParForEachBodyWithIsolatedCtx<Iterator>::operator()(value);\n    }\n};\n\n//! Uses parallel_for_each body invoking an inner parallel_for_each with an isolated context without a try-block.\n/** Even though exceptions thrown from the inner parallel_for_each are not handled\n    by the caller in this test, they will not affect sibling inner algorithms\n    already running because of the isolated contexts. However because the first\n    exception cancels the root parallel_for_each, at most the first g_NumThreads subranges\n    will be processed (which launch inner parallel_for_eachs) **/\ntemplate <class Iterator, class outer_body>\nvoid Test3_parallel_for_each () {\n    ResetGlobals();\n    auto range = adaptive_range<Iterator>(get_iter_range_size());\n    intptr_t innerCalls = get_iter_range_size(),\n             // The assumption here is the same as in outer parallel fors.\n             minExecuted = (g_NumThreads - 1) * innerCalls;\n    g_Master = std::this_thread::get_id();\n    TRY();\n        tbb::parallel_for_each(std::begin(range), std::end(range), outer_body());\n    CATCH_AND_ASSERT();\n    // figure actual number of expected executions given the number of outer PDos started.\n    minExecuted = (g_OuterParCalls - 1) * innerCalls;\n    // one extra thread may run a task that sees cancellation.  Infrequent but possible\n    g_TGCCancelled.validate(g_NumThreads, \"Too many tasks survived exception\");\n    if ( g_SolitaryException ) {\n        REQUIRE_MESSAGE (g_CurExecuted > minExecuted, \"Too few tasks survived exception\");\n        REQUIRE_MESSAGE (g_CurExecuted <= minExecuted + (g_ExecutedAtLastCatch + g_NumThreads), \"Too many tasks survived exception\");\n    }\n    REQUIRE_MESSAGE (g_NumExceptionsCaught == 1, \"No try_blocks in any body expected in this test\");\n    if ( !g_SolitaryException )\n        REQUIRE_MESSAGE (g_CurExecuted <= g_ExecutedAtLastCatch + g_NumThreads, \"Too many tasks survived exception\");\n} // void Test3_parallel_for_each ()\n\ntemplate <class Iterator>\nclass OuterParForEachWithEhBody {\npublic:\n    void operator()( size_t& /*value*/ ) const {\n        tbb::task_group_context ctx(tbb::task_group_context::isolated);\n        ++g_OuterParCalls;\n        auto range = adaptive_range<Iterator>(get_iter_range_size());\n        TRY();\n            tbb::parallel_for_each(std::begin(range), std::end(range), SimpleParForEachBody(), ctx);\n        CATCH();\n    }\n};\n\ntemplate <class Iterator>\nclass OuterParForEachWithEhBodyWithFeeder : OuterParForEachWithEhBody<Iterator> {\npublic:\n    void operator=(const OuterParForEachWithEhBodyWithFeeder&) = delete;\n    OuterParForEachWithEhBodyWithFeeder(const OuterParForEachWithEhBodyWithFeeder&) = default;\n    OuterParForEachWithEhBodyWithFeeder() = default;\n    void operator()( size_t &value, tbb::feeder<size_t> &feeder ) const {\n        Feed(feeder, 0);\n        OuterParForEachWithEhBody<Iterator>::operator()(value);\n    }\n};\n\n//! Uses parallel_for body invoking an inner parallel_for (with default bound context) inside a try-block.\n/** Since exception(s) thrown from the inner parallel_for are handled by the caller\n    in this test, they do not affect neither other tasks of the the root parallel_for\n    nor sibling inner algorithms. **/\ntemplate <class Iterator, class outer_body_with_eh>\nvoid Test4_parallel_for_each () {\n    ResetGlobals( true, true );\n    auto range = adaptive_range<Iterator>(get_iter_range_size());\n    g_Master = std::this_thread::get_id();\n    TRY();\n        tbb::parallel_for_each(std::begin(range), std::end(range), outer_body_with_eh());\n    CATCH();\n    REQUIRE_MESSAGE (!l_ExceptionCaughtAtCurrentLevel, \"All exceptions must have been handled in the parallel_for_each body\");\n    intptr_t innerCalls = get_iter_range_size(),\n             outerCalls = get_iter_range_size() + g_FedTasksCount,\n             maxExecuted = outerCalls * innerCalls,\n             minExecuted = 0;\n    g_TGCCancelled.validate(g_NumThreads, \"Too many tasks survived exception\");\n    if ( g_SolitaryException ) {\n        minExecuted = maxExecuted - innerCalls;\n        REQUIRE_MESSAGE (g_NumExceptionsCaught == 1, \"No exception registered\");\n        REQUIRE_MESSAGE (g_CurExecuted >= minExecuted, \"Too few tasks executed\");\n        // This test has the same property as Test4 (parallel_for); the exception can be\n        // thrown, but some number of tasks from the outer Pdo can execute after the throw but\n        // before the cancellation is signaled (have seen 36).\n        DOCTEST_WARN_MESSAGE(g_CurExecuted < maxExecuted, \"All tasks survived exception. Oversubscription?\");\n    }\n    else {\n        minExecuted = g_NumExceptionsCaught;\n        REQUIRE_MESSAGE ((g_NumExceptionsCaught > 1 && g_NumExceptionsCaught <= outerCalls), \"Unexpected actual number of exceptions\");\n        REQUIRE_MESSAGE (g_CurExecuted >= minExecuted, \"Too many executed tasks reported\");\n        REQUIRE_MESSAGE (g_CurExecuted < g_ExecutedAtLastCatch + g_NumThreads + outerCalls, \"Too many tasks survived multiple exceptions\");\n        REQUIRE_MESSAGE (g_CurExecuted <= outerCalls * (1 + g_NumThreads), \"Too many tasks survived exception\");\n    }\n} // void Test4_parallel_for_each ()\n\n// This body throws an exception only if the task was added by feeder\nclass ParForEachBodyWithThrowingFeederTasks {\npublic:\n    //! This form of the function call operator can be used when the body needs to add more work during the processing\n    void operator() (const size_t &value, tbb::feeder<size_t> &feeder ) const {\n        ++g_CurExecuted;\n        if(g_Master == std::this_thread::get_id()) g_MasterExecuted = true;\n        else g_NonMasterExecuted = true;\n        if( tbb::is_current_task_group_canceling() ) g_TGCCancelled.increment();\n        Feed(feeder, 1);\n        if (value == 1)\n            ThrowTestException(1);\n    }\n}; // class ParForEachBodyWithThrowingFeederTasks\n\n// Test exception in task, which was added by feeder.\ntemplate <class Iterator>\nvoid Test5_parallel_for_each () {\n    ResetGlobals();\n    auto range = adaptive_range<Iterator>(get_iter_range_size());\n    g_Master = std::this_thread::get_id();\n    TRY();\n        tbb::parallel_for_each(std::begin(range), std::end(range), ParForEachBodyWithThrowingFeederTasks());\n    CATCH();\n    if (g_SolitaryException) {\n        // Failure occurs when g_ExceptionInMaster is false, but all the 1 values in the range\n        // are handled by the external thread.  In this case no throw occurs.\n        REQUIRE_MESSAGE ((l_ExceptionCaughtAtCurrentLevel               // we saw an exception\n                || (!g_ExceptionInMaster && !g_NonMasterExecutedThrow)  // non-external trhead throws but none tried\n                || (g_ExceptionInMaster && !g_MasterExecutedThrow))     // external thread throws but external thread didn't try\n                , \"At least one exception should occur\");\n    }\n} // void Test5_parallel_for_each ()\n\n#if !EMSCRIPTEN\n//! Testing parallel_for_each exception handling\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_for_each exception handling test #1\") {\n    for (auto concurrency_level: utils::concurrency_range()) {\n        g_NumThreads = static_cast<int>(concurrency_level);\n        g_Master = std::this_thread::get_id();\n        if (g_NumThreads > 1) {\n            tbb::task_arena a(g_NumThreads);\n            a.execute([] {\n                // Execute in all the possible modes\n                for (size_t j = 0; j < 4; ++j) {\n                    g_ExceptionInMaster = (j & 1) != 0;\n                    g_SolitaryException = (j & 2) != 0;\n\n                    RunWithSimpleBody(Test1_parallel_for_each, SimpleParForEachBody);\n                }\n            });\n        }\n    }\n}\n#endif\n\n//! Testing parallel_for_each exception handling\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_for_each exception handling test #2\") {\n    for (auto concurrency_level: utils::concurrency_range()) {\n        g_NumThreads = static_cast<int>(concurrency_level);\n        g_Master = std::this_thread::get_id();\n        if (g_NumThreads > 1) {\n            tbb::task_arena a(g_NumThreads);\n            a.execute([] {\n                // Execute in all the possible modes\n                for (size_t j = 0; j < 4; ++j) {\n                    g_ExceptionInMaster = (j & 1) != 0;\n                    g_SolitaryException = (j & 2) != 0;\n\n                    RunWithTemplatedBody(Test2_parallel_for_each, OuterParForEachBody);\n                }\n            });\n        }\n    }\n}\n\n#if !EMSCRIPTEN\n//! Testing parallel_for_each exception handling\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_for_each exception handling test #3\") {\n    for (auto concurrency_level: utils::concurrency_range()) {\n        g_NumThreads = static_cast<int>(concurrency_level);\n        g_Master = std::this_thread::get_id();\n        if (g_NumThreads > 1) {\n            tbb::task_arena a(g_NumThreads);\n            a.execute([] {\n                // Execute in all the possible modes\n                for (size_t j = 0; j < 4; ++j) {\n                    g_ExceptionInMaster = (j & 1) != 0;\n                    g_SolitaryException = (j & 2) != 0;\n\n                    RunWithTemplatedBody(Test3_parallel_for_each, OuterParForEachBodyWithIsolatedCtx);\n                }\n            });\n        }\n    }\n}\n#endif\n\n//! Testing parallel_for_each exception handling\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_for_each exception handling test #4\") {\n    for (auto concurrency_level: utils::concurrency_range()) {\n        g_NumThreads = static_cast<int>(concurrency_level);\n        g_Master = std::this_thread::get_id();\n        if (g_NumThreads > 1) {\n            tbb::task_arena a(g_NumThreads);\n            a.execute([] {\n                // Execute in all the possible modes\n                for (size_t j = 0; j < 4; ++j) {\n                    g_ExceptionInMaster = (j & 1) != 0;\n                    g_SolitaryException = (j & 2) != 0;\n\n                    RunWithTemplatedBody(Test4_parallel_for_each, OuterParForEachWithEhBody);\n                }\n            });\n        }\n    }\n}\n\n#if !EMSCRIPTEN\n//! Testing parallel_for_each exception handling\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_for_each exception handling test #5\") {\n    for (auto concurrency_level: utils::concurrency_range()) {\n        g_NumThreads = static_cast<int>(concurrency_level);\n        g_Master = std::this_thread::get_id();\n        if (g_NumThreads > 1) {\n            tbb::task_arena a(g_NumThreads);\n            a.execute([] {\n                // Execute in all the possible modes\n                for (size_t j = 0; j < 4; ++j) {\n                    g_ExceptionInMaster = (j & 1) != 0;\n                    g_SolitaryException = (j & 2) != 0;\n\n                    Test5_parallel_for_each<utils::InputIterator<size_t> >();\n                    Test5_parallel_for_each<utils::ForwardIterator<size_t> >();\n                    Test5_parallel_for_each<utils::RandomIterator<size_t> >();\n                }\n            });\n        }\n    }\n}\n#endif\n#endif /* TBB_USE_EXCEPTIONS */\n\nclass ParForEachBodyToCancel {\npublic:\n    void operator()( size_t& /*value*/ ) const {\n        ++g_CurExecuted;\n        Cancellator::WaitUntilReady();\n    }\n};\n\nclass ParForEachBodyToCancelWithFeeder : ParForEachBodyToCancel {\npublic:\n    void operator()( size_t& value, tbb::feeder<size_t> &feeder ) const {\n        Feed(feeder, 0);\n        ParForEachBodyToCancel::operator()(value);\n    }\n};\n\ntemplate<class B, class Iterator>\nclass ParForEachWorker {\n    tbb::task_group_context &my_ctx;\npublic:\n    void operator()() const {\n        auto range = adaptive_range<Iterator>(get_iter_range_size());\n        tbb::parallel_for_each( std::begin(range), std::end(range), B(), my_ctx );\n    }\n\n    ParForEachWorker ( tbb::task_group_context& ctx ) : my_ctx(ctx) {}\n};\n\n//! Test for cancelling an algorithm from outside (from a task running in parallel with the algorithm).\ntemplate <class Iterator, class body_to_cancel>\nvoid TestCancelation1_parallel_for_each () {\n    ResetGlobals( false );\n    // Threshold should leave more than max_threads tasks to test the cancellation. Set the threshold to iter_range_size()/4 since iter_range_size >= max_threads*2\n    intptr_t threshold = get_iter_range_size() / 4;\n    REQUIRE_MESSAGE(get_iter_range_size() - threshold > g_NumThreads, \"Threshold should leave more than max_threads tasks to test the cancellation.\");\n    tbb::task_group tg;\n    tbb::task_group_context  ctx;\n    Cancellator cancellator(ctx, threshold);\n    ParForEachWorker<body_to_cancel, Iterator> worker(ctx);\n    tg.run( cancellator );\n    utils::yield();\n    tg.run( worker );\n    TRY();\n        tg.wait();\n    CATCH_AND_FAIL();\n    REQUIRE_MESSAGE (g_CurExecuted < g_ExecutedAtLastCatch + g_NumThreads, \"Too many tasks were executed after cancellation\");\n}\n\nclass ParForEachBodyToCancel2 {\npublic:\n    void operator()( size_t& /*value*/ ) const {\n        ++g_CurExecuted;\n        utils::ConcurrencyTracker ct;\n        // The test will hang (and be timed out by the test system) if is_cancelled() is broken\n        while( !tbb::is_current_task_group_canceling() )\n            utils::yield();\n    }\n};\n\nclass ParForEachBodyToCancel2WithFeeder : ParForEachBodyToCancel2 {\npublic:\n    void operator()( size_t& value, tbb::feeder<size_t> &feeder ) const {\n        Feed(feeder, 0);\n        ParForEachBodyToCancel2::operator()(value);\n    }\n};\n\n//! Test for cancelling an algorithm from outside (from a task running in parallel with the algorithm).\n/** This version also tests tbb::is_current_task_group_canceling() method. **/\ntemplate <class Iterator, class body_to_cancel>\nvoid TestCancelation2_parallel_for_each () {\n    ResetGlobals();\n    RunCancellationTest<ParForEachWorker<body_to_cancel, Iterator>, Cancellator2>();\n}\n\n#if !EMSCRIPTEN\n//! Testing parallel_for_each cancellation test\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_for_each cancellation test #1\") {\n    for (auto concurrency_level: utils::concurrency_range()) {\n        g_NumThreads = static_cast<int>(concurrency_level);\n        g_Master = std::this_thread::get_id();\n        if (g_NumThreads > 1) {\n            tbb::task_arena a(g_NumThreads);\n            a.execute([] {\n                // Execute in all the possible modes\n                for (size_t j = 0; j < 4; ++j) {\n                    g_ExceptionInMaster = (j & 1) != 0;\n                    g_SolitaryException = (j & 2) != 0;\n                    RunWithSimpleBody(TestCancelation1_parallel_for_each, ParForEachBodyToCancel);\n                }\n            });\n        }\n    }\n}\n\n//! Testing parallel_for_each cancellation test\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_for_each cancellation test #2\") {\n    for (auto concurrency_level: utils::concurrency_range()) {\n        g_NumThreads = static_cast<int>(concurrency_level);\n        g_Master = std::this_thread::get_id();\n        if (g_NumThreads > 1) {\n            tbb::task_arena a(g_NumThreads);\n            a.execute([] {\n                // Execute in all the possible modes\n                for (size_t j = 0; j < 4; ++j) {\n                    g_ExceptionInMaster = (j & 1) != 0;\n                    g_SolitaryException = (j & 2) != 0;\n\n                    RunWithSimpleBody(TestCancelation2_parallel_for_each, ParForEachBodyToCancel2);\n                }\n            });\n        }\n    }\n}\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// Tests for tbb::parallel_pipeline\n////////////////////////////////////////////////////////////////////////////////\nint g_NumTokens = 0;\n\n// Simple input filter class, it assigns 1 to all array members\n// It stops when it receives item equal to -1\nclass InputFilter {\n    mutable std::atomic<size_t> m_Item{};\n    mutable std::vector<size_t> m_Buffer;\npublic:\n    InputFilter() : m_Buffer(get_iter_range_size()) {\n        m_Item = 0;\n        for (size_t i = 0; i < get_iter_range_size(); ++i )\n            m_Buffer[i] = 1;\n    }\n    InputFilter(const InputFilter& other) : m_Item(other.m_Item.load()), m_Buffer(get_iter_range_size()) {\n        for (size_t i = 0; i < get_iter_range_size(); ++i )\n            m_Buffer[i] = other.m_Buffer[i];\n    }\n\n    void* operator()(tbb::flow_control& control) const {\n        size_t item = m_Item++;\n        if(g_Master == std::this_thread::get_id()) g_MasterExecuted = true;\n        else g_NonMasterExecuted = true;\n        if( tbb::is_current_task_group_canceling() ) g_TGCCancelled.increment();\n        if(item == 1) {\n            ++g_PipelinesStarted;   // count on emitting the first item.\n        }\n        if ( item >= get_iter_range_size() ) {\n            control.stop();\n            return nullptr;\n        }\n        m_Buffer[item] = 1;\n        return &m_Buffer[item];\n    }\n\n    size_t* buffer() { return m_Buffer.data(); }\n}; // class InputFilter\n\n#if TBB_USE_EXCEPTIONS\n\n// Simple filter with exception throwing.  If parallel, will wait until\n// as many parallel filters start as there are threads.\nclass SimpleFilter {\n    bool m_canThrow;\n    bool m_serial;\npublic:\n    SimpleFilter (bool canThrow, bool serial ) : m_canThrow(canThrow), m_serial(serial) {}\n    void* operator()(void* item) const {\n        ++g_CurExecuted;\n        if(g_Master == std::this_thread::get_id()) g_MasterExecuted = true;\n        else g_NonMasterExecuted = true;\n        if( tbb::is_current_task_group_canceling() ) g_TGCCancelled.increment();\n        if ( m_canThrow ) {\n            if ( !m_serial ) {\n                utils::ConcurrencyTracker ct;\n                WaitUntilConcurrencyPeaks( std::min(g_NumTokens, g_NumThreads) );\n            }\n            ThrowTestException(1);\n        }\n        return item;\n    }\n}; // class SimpleFilter\n\n// This enumeration represents filters order in pipeline\nstruct FilterSet {\n    tbb::filter_mode mode1, mode2;\n    bool throw1, throw2;\n\n    FilterSet( tbb::filter_mode m1, tbb::filter_mode m2, bool t1, bool t2 )\n        : mode1(m1), mode2(m2), throw1(t1), throw2(t2)\n    {}\n}; // struct FilterSet\n\nFilterSet serial_parallel( tbb::filter_mode::serial_in_order, tbb::filter_mode::parallel, /*throw1*/false, /*throw2*/true );\n\ntemplate<typename InFilter, typename Filter>\nclass CustomPipeline {\n    InFilter inputFilter;\n    Filter filter1;\n    Filter filter2;\n    FilterSet my_filters;\npublic:\n    CustomPipeline( const FilterSet& filters )\n        : filter1(filters.throw1, filters.mode1 != tbb::filter_mode::parallel),\n          filter2(filters.throw2, filters.mode2 != tbb::filter_mode::parallel),\n          my_filters(filters)\n    {}\n\n    void run () {\n        tbb::parallel_pipeline(\n            g_NumTokens,\n            tbb::make_filter<void, void*>(tbb::filter_mode::parallel, inputFilter) &\n            tbb::make_filter<void*, void*>(my_filters.mode1, filter1) &\n            tbb::make_filter<void*, void>(my_filters.mode2, filter2)\n        );\n    }\n    void run ( tbb::task_group_context& ctx ) {\n        tbb::parallel_pipeline(\n            g_NumTokens,\n            tbb::make_filter<void, void*>(tbb::filter_mode::parallel, inputFilter) &\n            tbb::make_filter<void*, void*>(my_filters.mode1, filter1) &\n            tbb::make_filter<void*, void>(my_filters.mode2, filter2),\n            ctx\n        );\n    }\n};\n\ntypedef CustomPipeline<InputFilter, SimpleFilter> SimplePipeline;\n\n// Tests exceptions without nesting\nvoid Test1_pipeline ( const FilterSet& filters ) {\n    ResetGlobals();\n    SimplePipeline testPipeline(filters);\n    TRY();\n        testPipeline.run();\n        if ( g_CurExecuted == 2 * static_cast<int>(get_iter_range_size()) ) {\n            // all the items were processed, though an exception was supposed to occur.\n            if(!g_ExceptionInMaster && g_NonMasterExecutedThrow > 0) {\n                // if !g_ExceptionInMaster, the external thread is not allowed to throw.\n                // if g_nonMasterExcutedThrow > 0 then a thread besides the external thread tried to throw.\n                REQUIRE_MESSAGE((filters.mode1 != tbb::filter_mode::parallel && filters.mode2 != tbb::filter_mode::parallel),\n                    \"Unusual count\");\n            }\n            // In case of all serial filters they might be all executed in the thread(s)\n            // where exceptions are not allowed by the common test logic. So we just quit.\n            return;\n        }\n    CATCH_AND_ASSERT();\n    g_TGCCancelled.validate(g_NumThreads, \"Too many tasks survived exception\");\n    REQUIRE_MESSAGE (g_CurExecuted <= g_ExecutedAtLastCatch + g_NumThreads, \"Too many tasks survived exception\");\n    REQUIRE_MESSAGE (g_NumExceptionsCaught == 1, \"No try_blocks in any body expected in this test\");\n    if ( !g_SolitaryException )\n        REQUIRE_MESSAGE (g_CurExecuted <= g_ExecutedAtLastCatch + g_NumThreads, \"Too many tasks survived exception\");\n\n} // void Test1_pipeline ()\n\n// Filter with nesting\nclass OuterFilter {\npublic:\n    OuterFilter ( bool, bool ) {}\n\n    void* operator()(void* item) const {\n        ++g_OuterParCalls;\n        SimplePipeline testPipeline(serial_parallel);\n        testPipeline.run();\n        return item;\n    }\n}; // class OuterFilter\n\n//! Uses pipeline containing an inner pipeline with the default context not wrapped by a try-block.\n/** Inner algorithms are spawned inside the new bound context by default. Since\n    exceptions thrown from the inner pipeline are not handled by the caller\n    (outer pipeline body) in this test, they will cancel all the sibling inner\n    algorithms. **/\nvoid Test2_pipeline ( const FilterSet& filters ) {\n    ResetGlobals();\n    g_NestedPipelines = true;\n    CustomPipeline<InputFilter, OuterFilter> testPipeline(filters);\n    TRY();\n        testPipeline.run();\n    CATCH_AND_ASSERT();\n    bool okayNoExceptionCaught = (g_ExceptionInMaster && !g_MasterExecutedThrow) || (!g_ExceptionInMaster && !g_NonMasterExecutedThrow);\n    REQUIRE_MESSAGE ((g_NumExceptionsCaught == 1 || okayNoExceptionCaught), \"No try_blocks in any body expected in this test\");\n    if ( !g_SolitaryException ) {\n        REQUIRE_MESSAGE (g_CurExecuted <= g_ExecutedAtLastCatch + g_NumThreads, \"Too many tasks survived exception\");\n    }\n} // void Test2_pipeline ()\n\n//! creates isolated inner pipeline and runs it.\nclass OuterFilterWithIsolatedCtx {\npublic:\n    OuterFilterWithIsolatedCtx( bool , bool ) {}\n\n    void* operator()(void* item) const {\n        ++g_OuterParCalls;\n        tbb::task_group_context ctx(tbb::task_group_context::isolated);\n        // create inner pipeline with serial input, parallel output filter, second filter throws\n        SimplePipeline testPipeline(serial_parallel);\n        testPipeline.run(ctx);\n        return item;\n    }\n}; // class OuterFilterWithIsolatedCtx\n\n//! Uses pipeline invoking an inner pipeline with an isolated context without a try-block.\n/** Even though exceptions thrown from the inner pipeline are not handled\n    by the caller in this test, they will not affect sibling inner algorithms\n    already running because of the isolated contexts. However because the first\n    exception cancels the root parallel_for_each only the first g_NumThreads subranges\n    will be processed (which launch inner pipelines) **/\nvoid Test3_pipeline ( const FilterSet& filters ) {\n    for( int nTries = 1; nTries <= 4; ++nTries) {\n        ResetGlobals();\n        g_NestedPipelines = true;\n        g_Master = std::this_thread::get_id();\n        intptr_t innerCalls = get_iter_range_size(),\n                 minExecuted = (g_NumThreads - 1) * innerCalls;\n        CustomPipeline<InputFilter, OuterFilterWithIsolatedCtx> testPipeline(filters);\n        TRY();\n            testPipeline.run();\n        CATCH_AND_ASSERT();\n\n        bool okayNoExceptionCaught = (g_ExceptionInMaster && !g_MasterExecuted) ||\n            (!g_ExceptionInMaster && !g_NonMasterExecuted);\n        // only test assertions if the test threw an exception (or we don't care)\n        bool testSucceeded = okayNoExceptionCaught || g_NumExceptionsCaught > 0;\n        if(testSucceeded) {\n            if (g_SolitaryException) {\n\n                // The test is one outer pipeline with two NestedFilters that each start an inner pipeline.\n                // Each time the input filter of a pipeline delivers its first item, it increments\n                // g_PipelinesStarted.  When g_SolitaryException, the throw will not occur until\n                // g_PipelinesStarted >= 3.  (This is so at least a second pipeline in its own isolated\n                // context will start; that is what we're testing.)\n                //\n                // There are two pipelines which will NOT run to completion when a solitary throw\n                // happens in an isolated inner context: the outer pipeline and the pipeline which\n                // throws.  All the other pipelines which start should run to completion.  But only\n                // inner body invocations are counted.\n                //\n                // So g_CurExecuted should be about\n                //\n                //   (2*get_iter_range_size()) * (g_PipelinesStarted - 2) + 1\n                //   ^ executions for each completed pipeline\n                //                   ^ completing pipelines (remembering two will not complete)\n                //                                              ^ one for the inner throwing pipeline\n\n                minExecuted = (2*get_iter_range_size()) * (g_PipelinesStarted - 2) + 1;\n                // each failing pipeline must execute at least two tasks\n                REQUIRE_MESSAGE(g_CurExecuted >= minExecuted, \"Too few tasks survived exception\");\n                // no more than g_NumThreads tasks will be executed in a cancelled context.  Otherwise\n                // tasks not executing at throw were scheduled.\n                g_TGCCancelled.validate(g_NumThreads, \"Tasks not in-flight were executed\");\n                REQUIRE_MESSAGE(g_NumExceptionsCaught == 1, \"Should have only one exception\");\n                // if we're only throwing from the external thread, and that thread didn't\n                // participate in the pipelines, then no throw occurred.\n            }\n            REQUIRE_MESSAGE ((g_NumExceptionsCaught == 1 || okayNoExceptionCaught), \"No try_blocks in any body expected in this test\");\n            REQUIRE_MESSAGE (((g_CurExecuted <= g_ExecutedAtLastCatch + g_NumThreads) || okayNoExceptionCaught), \"Too many tasks survived exception\");\n            return;\n        }\n    }\n}\n\nclass OuterFilterWithEhBody  {\npublic:\n    OuterFilterWithEhBody( bool, bool ){}\n\n    void* operator()(void* item) const {\n        tbb::task_group_context ctx(tbb::task_group_context::isolated);\n        ++g_OuterParCalls;\n        SimplePipeline testPipeline(serial_parallel);\n        TRY();\n            testPipeline.run(ctx);\n        CATCH();\n        return item;\n    }\n}; // class OuterFilterWithEhBody\n\n//! Uses pipeline body invoking an inner pipeline (with isolated context) inside a try-block.\n/** Since exception(s) thrown from the inner pipeline are handled by the caller\n    in this test, they do not affect other tasks of the the root pipeline\n    nor sibling inner algorithms. **/\nvoid Test4_pipeline ( const FilterSet& filters ) {\n#if __GNUC__ && !__INTEL_COMPILER\n    if ( strncmp(__VERSION__, \"4.1.0\", 5) == 0 ) {\n        MESSAGE(\"Known issue: one of exception handling tests is skipped.\");\n        return;\n    }\n#endif\n    ResetGlobals( true, true );\n    // each outer pipeline stage will start get_iter_range_size() inner pipelines.\n    // each inner pipeline that doesn't throw will process get_iter_range_size() items.\n    // for solitary exception there will be one pipeline that only processes one stage, one item.\n    // innerCalls should be 2*get_iter_range_size()\n    intptr_t innerCalls = 2*get_iter_range_size(),\n             outerCalls = 2*get_iter_range_size(),\n             maxExecuted = outerCalls * innerCalls;  // the number of invocations of the inner pipelines\n    CustomPipeline<InputFilter, OuterFilterWithEhBody> testPipeline(filters);\n    TRY();\n        testPipeline.run();\n    CATCH_AND_ASSERT();\n    intptr_t  minExecuted = 0;\n    bool okayNoExceptionCaught = (g_ExceptionInMaster && !g_MasterExecuted) ||\n        (!g_ExceptionInMaster && !g_NonMasterExecuted);\n    if ( g_SolitaryException ) {\n        minExecuted = maxExecuted - innerCalls;  // one throwing inner pipeline\n        REQUIRE_MESSAGE((g_NumExceptionsCaught == 1 || okayNoExceptionCaught), \"No exception registered\");\n        g_TGCCancelled.validate(g_NumThreads, \"Too many tasks survived exception\");  // probably will assert.\n    }\n    else {\n        // we assume throwing pipelines will not count\n        minExecuted = (outerCalls - g_NumExceptionsCaught) * innerCalls;\n        REQUIRE_MESSAGE(((g_NumExceptionsCaught >= 1 && g_NumExceptionsCaught <= outerCalls) || okayNoExceptionCaught), \"Unexpected actual number of exceptions\");\n        REQUIRE_MESSAGE (g_CurExecuted >= minExecuted, \"Too many executed tasks reported\");\n        // too many already-scheduled tasks are started after the first exception is\n        // thrown.  And g_ExecutedAtLastCatch is updated every time an exception is caught.\n        // So with multiple exceptions there are a variable number of tasks that have been\n        // discarded because of the signals.\n        // each throw is caught, so we will see many cancelled tasks.  g_ExecutedAtLastCatch is\n        // updated with each throw, so the value will be the number of tasks executed at the last\n        REQUIRE_MESSAGE (g_CurExecuted <= g_ExecutedAtLastCatch + g_NumThreads, \"Too many tasks survived multiple exceptions\");\n    }\n} // void Test4_pipeline ()\n\n//! Tests pipeline function passed with different combination of filters\ntemplate<void testFunc(const FilterSet&)>\nvoid TestWithDifferentFiltersAndConcurrency() {\n#if __TBB_USE_ADDRESS_SANITIZER\n    // parallel_pipeline allocates tls that sporadically observed as a memory leak with\n    // detached threads. So, use task_scheduler_handle to join threads with finalize\n    tbb::task_scheduler_handle handle{ tbb::attach{} };\n#endif\n    for (auto concurrency_level: utils::concurrency_range()) {\n        g_NumThreads = static_cast<int>(concurrency_level);\n        g_Master = std::this_thread::get_id();\n        if (g_NumThreads > 1) {\n\n            const tbb::filter_mode modes[] = {\n                tbb::filter_mode::parallel,\n                tbb::filter_mode::serial_in_order,\n                tbb::filter_mode::serial_out_of_order\n            };\n\n            const int NumFilterTypes = sizeof(modes)/sizeof(modes[0]);\n\n            // Execute in all the possible modes\n            for ( size_t j = 0; j < 4; ++j ) {\n                tbb::task_arena a(g_NumThreads);\n                a.execute([&] {\n                    g_ExceptionInMaster = (j & 1) != 0;\n                    g_SolitaryException = (j & 2) != 0;\n                    g_NumTokens = 2 * g_NumThreads;\n\n                    for (int i = 0; i < NumFilterTypes; ++i) {\n                        for (int n = 0; n < NumFilterTypes; ++n) {\n                            for (int k = 0; k < 2; ++k)\n                                testFunc(FilterSet(modes[i], modes[n], k == 0, k != 0));\n                        }\n                    }\n                });\n            }\n        }\n    }\n#if __TBB_USE_ADDRESS_SANITIZER\n    tbb::finalize(handle);\n#endif\n}\n\n#if !EMSCRIPTEN\n//! Testing parallel_pipeline exception handling\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_pipeline exception handling test #1\") {\n    TestWithDifferentFiltersAndConcurrency<Test1_pipeline>();\n}\n\n//! Testing parallel_pipeline exception handling\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_pipeline exception handling test #2\") {\n    TestWithDifferentFiltersAndConcurrency<Test2_pipeline>();\n}\n\n//! Testing parallel_pipeline exception handling\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_pipeline exception handling test #3\") {\n    TestWithDifferentFiltersAndConcurrency<Test3_pipeline>();\n}\n\n//! Testing parallel_pipeline exception handling\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_pipeline exception handling test #4\") {\n    TestWithDifferentFiltersAndConcurrency<Test4_pipeline>();\n}\n#endif\n#endif /* TBB_USE_EXCEPTIONS */\n\nclass FilterToCancel  {\npublic:\n    FilterToCancel() {}\n    void* operator()(void* item) const {\n        ++g_CurExecuted;\n        Cancellator::WaitUntilReady();\n        return item;\n    }\n}; // class FilterToCancel\n\ntemplate <class Filter_to_cancel>\nclass PipelineLauncher {\n    tbb::task_group_context &my_ctx;\npublic:\n    PipelineLauncher ( tbb::task_group_context& ctx ) : my_ctx(ctx) {}\n\n    void operator()() const {\n        // Run test when serial filter is the first non-input filter\n        InputFilter inputFilter;\n        Filter_to_cancel filterToCancel;\n        tbb::parallel_pipeline(\n            g_NumTokens,\n            tbb::make_filter<void, void*>(tbb::filter_mode::parallel, inputFilter) &\n            tbb::make_filter<void*, void>(tbb::filter_mode::parallel, filterToCancel),\n            my_ctx\n        );\n    }\n};\n\n//! Test for cancelling an algorithm from outside (from a task running in parallel with the algorithm).\nvoid TestCancelation1_pipeline () {\n    ResetGlobals();\n    g_ThrowException = false;\n    // Threshold should leave more than max_threads tasks to test the cancellation. Set the threshold to iter_range_size()/4 since iter_range_size >= max_threads*2\n    intptr_t threshold = get_iter_range_size() / 4;\n    REQUIRE_MESSAGE(get_iter_range_size() - threshold > g_NumThreads, \"Threshold should leave more than max_threads tasks to test the cancellation.\");\n    RunCancellationTest<PipelineLauncher<FilterToCancel>, Cancellator>(threshold);\n    g_TGCCancelled.validate(g_NumThreads, \"Too many tasks survived cancellation\");\n    REQUIRE_MESSAGE (g_CurExecuted < g_ExecutedAtLastCatch + g_NumThreads, \"Too many tasks were executed after cancellation\");\n}\n\nclass FilterToCancel2  {\npublic:\n    FilterToCancel2() {}\n\n    void* operator()(void* item) const {\n        ++g_CurExecuted;\n        utils::ConcurrencyTracker ct;\n        // The test will hang (and be timed out by the test system) if is_cancelled() is broken\n        while( !tbb::is_current_task_group_canceling() )\n            utils::yield();\n        return item;\n    }\n};\n\n//! Test for cancelling an algorithm from outside (from a task running in parallel with the algorithm).\n/** This version also tests task::is_cancelled() method. **/\nvoid TestCancelation2_pipeline () {\n    ResetGlobals();\n    RunCancellationTest<PipelineLauncher<FilterToCancel2>, Cancellator2>();\n    // g_CurExecuted is always >= g_ExecutedAtLastCatch, because the latter is always a snapshot of the\n    // former, and g_CurExecuted is monotonic increasing.  so the comparison should be at least ==.\n    // If another filter is started after cancel but before cancellation is propagated, then the\n    // number will be larger.\n    REQUIRE_MESSAGE (g_CurExecuted <= g_ExecutedAtLastCatch, \"Some tasks were executed after cancellation\");\n}\n\n/** If min and max thread numbers specified on the command line are different,\n    the test is run only for 2 sizes of the thread pool (MinThread and MaxThread)\n    to be able to test the high and low contention modes while keeping the test reasonably fast **/\n\n//! Testing parallel_pipeline cancellation\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_pipeline cancellation test #1\") {\n    for (auto concurrency_level: utils::concurrency_range()) {\n        g_NumThreads = static_cast<int>(concurrency_level);\n        g_Master = std::this_thread::get_id();\n        if (g_NumThreads > 1) {\n            tbb::task_arena a(g_NumThreads);\n            a.execute([] {\n                // Execute in all the possible modes\n                for (size_t j = 0; j < 4; ++j) {\n                    g_ExceptionInMaster = (j & 1) != 0;\n                    g_SolitaryException = (j & 2) != 0;\n                    g_NumTokens = 2 * g_NumThreads;\n\n                    TestCancelation1_pipeline();\n                }\n            });\n        }\n    }\n}\n\n#if !EMSCRIPTEN\n//! Testing parallel_pipeline cancellation\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_pipeline cancellation test #2\") {\n    for (auto concurrency_level: utils::concurrency_range()) {\n        g_NumThreads = static_cast<int>(concurrency_level);\n        g_Master = std::this_thread::get_id();\n        if (g_NumThreads > 1) {\n            tbb::task_arena a(g_NumThreads);\n            a.execute([] {\n                // Execute in all the possible modes\n                for (size_t j = 0; j < 4; ++j) {\n                    g_ExceptionInMaster = (j & 1) != 0;\n                    g_SolitaryException = (j & 2) != 0;\n                    g_NumTokens = 2 * g_NumThreads;\n\n                    TestCancelation2_pipeline();\n                }\n            });\n        }\n    }\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_eh_flow_graph.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_eh_flow_graph.cpp\n//! \\brief Test for [flow_graph.copy_body flow_graph.broadcast_node flow_graph.priority_queue_node flow_graph.indexer_node flow_graph.sequencer_node flow_graph.remove_edge flow_graph.join_node flow_graph.split_node flow_graph.limiter_node flow_graph.write_once_node flow_graph.overwrite_node flow_graph.make_edge flow_graph.graph flow_graph.buffer_node flow_graph.function_node flow_graph.multifunction_node flow_graph.continue_node flow_graph.input_node] specification\n\n#include \"common/config.h\"\n\n#if USE_TASK_SCHEDULER_OBSERVER\n#include \"tbb/task_scheduler_observer.h\"\n#endif\n#include \"tbb/flow_graph.h\"\n#include \"tbb/global_control.h\"\n\n#include \"common/test.h\"\n\n#if TBB_USE_EXCEPTIONS\n\n#include \"common/utils.h\"\n#include \"common/checktype.h\"\n#include \"common/concurrency_tracker.h\"\n\n#if _MSC_VER\n    #pragma warning (disable: 4503) // Suppress \"decorated name length exceeded, name was truncated\" warning\n#endif\n\n#if __TBB_MSVC_UNREACHABLE_CODE_IGNORED\n    // Suppress \"unreachable code\" warning by VC++ 17.0-18.0 (VS 2012 or newer)\n    #pragma warning (disable: 4702)\n#endif\n\n// global task_scheduler_observer is an imperfect tool to find how many threads are really\n// participating.  That was the hope, but it counts the entries into the marketplace,\n// not the arena.\n// TODO: Consider using local task scheduler observer\n// #define USE_TASK_SCHEDULER_OBSERVER 1\n\n#include <iostream>\n#include <sstream>\n#include <vector>\n\n#include \"common/exception_handling.h\"\n\n#include <stdexcept>\n\n#define NUM_ITEMS 15\nint g_NumItems;\n\nstd::atomic<unsigned> nExceptions;\nstd::atomic<intptr_t> g_TGCCancelled;\n\nenum TestNodeTypeEnum { nonThrowing, isThrowing };\n\nstatic const size_t unlimited_type = 0;\nstatic const size_t serial_type = 1;\nstatic const size_t limited_type = 4;\n\ntemplate<TestNodeTypeEnum T> struct TestNodeTypeName;\ntemplate<> struct TestNodeTypeName<nonThrowing> { static const char *name() { return \"nonThrowing\"; } };\ntemplate<> struct TestNodeTypeName<isThrowing> { static const char *name() { return \"isThrowing\"; } };\n\ntemplate<size_t Conc> struct concurrencyName;\ntemplate<> struct concurrencyName<serial_type>{ static const char *name() { return \"serial\"; } };\ntemplate<> struct concurrencyName<unlimited_type>{ static const char *name() { return \"unlimited\"; } };\ntemplate<> struct concurrencyName<limited_type>{ static const char *name() { return \"limited\"; } };\n\n// Class that provides waiting and throwing behavior.  If we are not throwing, do nothing\n// If serial, we can't wait for concurrency to peak; we may be the bottleneck and will\n// stop further processing.  We will execute g_NumThreads + 10 times (the \"10\" is somewhat\n// arbitrary, and just makes sure there are enough items in the graph to keep it flowing),\n// If parallel or serial and throwing, use utils::ConcurrencyTracker to wait.\n\ntemplate<size_t Conc, TestNodeTypeEnum t = nonThrowing>\nclass WaitThrow;\n\ntemplate<>\nclass WaitThrow<serial_type,nonThrowing> {\nprotected:\n    void WaitAndThrow(int cnt, const char * /*name*/) {\n        if(cnt > g_NumThreads + 10) {\n            utils::ConcurrencyTracker ct;\n            WaitUntilConcurrencyPeaks();\n        }\n    }\n};\n\ntemplate<>\nclass WaitThrow<serial_type,isThrowing> {\nprotected:\n    void WaitAndThrow(int cnt, const char * /*name*/) {\n        if(cnt > g_NumThreads + 10) {\n            utils::ConcurrencyTracker ct;\n            WaitUntilConcurrencyPeaks();\n            ThrowTestException(1);\n        }\n    }\n};\n\n// for nodes with limited concurrency, if that concurrency is < g_NumThreads, we need\n// to make sure enough other nodes wait for concurrency to peak.  If we are attached to\n// N successors, for each item we pass to a successor, we will get N executions of the\n// \"absorbers\" (because we broadcast to successors.)  for an odd number of threads we\n// need (g_NumThreads - limited + 1) / 2 items (that will give us one extra execution\n// of an \"absorber\", but we can't change that without changing the behavior of the node.)\ntemplate<>\nclass WaitThrow<limited_type,nonThrowing> {\nprotected:\n    void WaitAndThrow(int cnt, const char * /*name*/) {\n        if(cnt <= (g_NumThreads - (int)limited_type + 1)/2) {\n            return;\n        }\n        utils::ConcurrencyTracker ct;\n        WaitUntilConcurrencyPeaks();\n    }\n};\n\ntemplate<>\nclass WaitThrow<limited_type,isThrowing> {\nprotected:\n    void WaitAndThrow(int cnt, const char * /*name*/) {\n        utils::ConcurrencyTracker ct;\n        if(cnt <= (g_NumThreads - (int)limited_type + 1)/2) {\n            return;\n        }\n        WaitUntilConcurrencyPeaks();\n        ThrowTestException(1);\n    }\n};\n\ntemplate<>\nclass WaitThrow<unlimited_type,nonThrowing> {\nprotected:\n    void WaitAndThrow(int /*cnt*/, const char * /*name*/) {\n        utils::ConcurrencyTracker ct;\n        WaitUntilConcurrencyPeaks();\n    }\n};\n\ntemplate<>\nclass WaitThrow<unlimited_type,isThrowing> {\nprotected:\n    void WaitAndThrow(int /*cnt*/, const char * /*name*/) {\n        utils::ConcurrencyTracker ct;\n        WaitUntilConcurrencyPeaks();\n        ThrowTestException(1);\n    }\n};\n\nvoid\nResetGlobals(bool throwException = true, bool flog = false) {\n    nExceptions = 0;\n    g_TGCCancelled = 0;\n    ResetEhGlobals(throwException, flog);\n}\n\n// -------input_node body ------------------\ntemplate <class OutputType, TestNodeTypeEnum TType>\nclass test_input_body : WaitThrow<serial_type, TType> {\n    using WaitThrow<serial_type, TType>::WaitAndThrow;\n    std::atomic<int> *my_current_val;\n    int my_mult;\npublic:\n    test_input_body(std::atomic<int> &my_cnt, int multiplier = 1) : my_current_val(&my_cnt), my_mult(multiplier) {\n        // INFO(\"- --------- - - -   constructed \" << (size_t)(my_current_val) << \"\\n\");\n    }\n\n    OutputType operator()(tbb::flow_control& fc) {\n        UPDATE_COUNTS();\n        OutputType ret = OutputType(my_mult * ++(*my_current_val));\n        // TODO revamp: reconsider logging for the tests.\n\n        // The following line is known to cause double frees. Therefore, commenting out frequent\n        // calls to INFO() macro.\n\n        // INFO(\"xx(\" << (size_t)(my_current_val) << \") ret == \" << (int)ret << \"\\n\");\n        if(*my_current_val > g_NumItems) {\n            // INFO(\" ------ End of the line!\\n\");\n            *my_current_val = g_NumItems;\n            fc.stop();\n            return OutputType();\n        }\n        WaitAndThrow((int)ret,\"test_input_body\");\n        return ret;\n    }\n\n    int count_value() { return (int)*my_current_val; }\n};\n\ntemplate <TestNodeTypeEnum TType>\nclass test_input_body<tbb::flow::continue_msg, TType> : WaitThrow<serial_type, TType> {\n    using WaitThrow<serial_type, TType>::WaitAndThrow;\n    std::atomic<int> *my_current_val;\npublic:\n    test_input_body(std::atomic<int> &my_cnt) : my_current_val(&my_cnt) { }\n\n    tbb::flow::continue_msg operator()( tbb::flow_control & fc) {\n        UPDATE_COUNTS();\n        int outint = ++(*my_current_val);\n        if(*my_current_val > g_NumItems) {\n            *my_current_val = g_NumItems;\n            fc.stop();\n            return tbb::flow::continue_msg();\n        }\n        WaitAndThrow(outint,\"test_input_body\");\n        return tbb::flow::continue_msg();\n    }\n\n    int count_value() { return (int)*my_current_val; }\n};\n\n// -------{function/continue}_node body ------------------\ntemplate<class InputType, class OutputType, TestNodeTypeEnum T, size_t Conc>\nclass absorber_body : WaitThrow<Conc,T> {\n    using WaitThrow<Conc,T>::WaitAndThrow;\n    std::atomic<int> *my_count;\npublic:\n    absorber_body(std::atomic<int> &my_cnt) : my_count(&my_cnt) { }\n    OutputType operator()(const InputType &/*p_in*/) {\n        UPDATE_COUNTS();\n        int out = ++(*my_count);\n        WaitAndThrow(out,\"absorber_body\");\n        return OutputType();\n    }\n    int count_value() { return *my_count; }\n};\n\n// -------multifunction_node body ------------------\n\n// helper classes\ntemplate<int N,class PortsType>\nstruct IssueOutput {\n    typedef typename std::tuple_element<N-1,PortsType>::type::output_type my_type;\n\n    static void issue_tuple_element( PortsType &my_ports) {\n        CHECK_MESSAGE( (std::get<N-1>(my_ports).try_put(my_type())), \"Error putting to successor\");\n        IssueOutput<N-1,PortsType>::issue_tuple_element(my_ports);\n    }\n};\n\ntemplate<class PortsType>\nstruct IssueOutput<1,PortsType> {\n    typedef typename std::tuple_element<0,PortsType>::type::output_type my_type;\n\n    static void issue_tuple_element( PortsType &my_ports) {\n        CHECK_MESSAGE( (std::get<0>(my_ports).try_put(my_type())), \"Error putting to successor\");\n    }\n};\n\ntemplate<class InputType, class OutputTupleType, TestNodeTypeEnum T, size_t Conc>\nclass multifunction_node_body : WaitThrow<Conc,T> {\n    using WaitThrow<Conc,T>::WaitAndThrow;\n    static const int N = std::tuple_size<OutputTupleType>::value;\n    typedef typename tbb::flow::multifunction_node<InputType,OutputTupleType> NodeType;\n    typedef typename NodeType::output_ports_type PortsType;\n    std::atomic<int> *my_count;\npublic:\n    multifunction_node_body(std::atomic<int> &my_cnt) : my_count(&my_cnt) { }\n    void operator()(const InputType& /*in*/, PortsType &my_ports) {\n        UPDATE_COUNTS();\n        int out = ++(*my_count);\n        WaitAndThrow(out,\"multifunction_node_body\");\n        // issue an item to each output port.\n        IssueOutput<N,PortsType>::issue_tuple_element(my_ports);\n    }\n\n    int count_value() { return *my_count; }\n};\n\n// --------- body to sort items in sequencer_node\ntemplate<class BufferItemType>\nstruct sequencer_body {\n    size_t operator()(const BufferItemType &s) {\n        CHECK_MESSAGE( (s), \"sequencer item out of range (== 0)\");\n        return size_t(s) - 1;\n    }\n};\n\n// --------- type for < comparison in priority_queue_node.\ntemplate<class ItemType>\nstruct less_body {\n    bool operator()(const ItemType &lhs, const ItemType &rhs) {\n        return (int(lhs) % 3) < (int(rhs) % 3);\n    }\n};\n\n// --------- tag methods for tag_matching join_node\ntemplate<typename TT>\nclass tag_func {\n    TT my_mult;\npublic:\n    tag_func(TT multiplier) : my_mult(multiplier) { }\n    // operator() will return [0 .. Count)\n    tbb::flow::tag_value operator()( TT v) {\n        tbb::flow::tag_value t = tbb::flow::tag_value(v / my_mult);\n        return t;\n    }\n};\n\n// --------- Input body for split_node test.\ntemplate <class OutputTuple, TestNodeTypeEnum TType>\nclass tuple_test_input_body : WaitThrow<serial_type, TType> {\n    typedef typename std::tuple_element<0,OutputTuple>::type ItemType0;\n    typedef typename std::tuple_element<1,OutputTuple>::type ItemType1;\n    using WaitThrow<serial_type, TType>::WaitAndThrow;\n    std::atomic<int> *my_current_val;\npublic:\n    tuple_test_input_body(std::atomic<int> &my_cnt) : my_current_val(&my_cnt) { }\n\n    OutputTuple operator()(tbb::flow_control& fc) {\n        UPDATE_COUNTS();\n        int ival = ++(*my_current_val);\n        if(*my_current_val > g_NumItems) {\n            *my_current_val = g_NumItems;  // jam the final value; we assert on it later.\n            fc.stop();\n            return OutputTuple();\n        }\n        WaitAndThrow(ival,\"tuple_test_input_body\");\n        return OutputTuple(ItemType0(ival),ItemType1(ival));\n    }\n\n    int count_value() { return (int)*my_current_val; }\n};\n\n// ------- end of node bodies\n\n// input_node is only-serial.  input_node can throw, or the function_node can throw.\n// graph being tested is\n//\n//      input_node+---+parallel function_node\n//\n//    After each run the graph is reset(), to test the reset functionality.\n//\n\n\ntemplate<class ItemType, TestNodeTypeEnum inpThrowType, TestNodeTypeEnum absorbThrowType>\nvoid run_one_input_node_test(bool throwException, bool flog) {\n    typedef test_input_body<ItemType,inpThrowType> src_body_type;\n    typedef absorber_body<ItemType, tbb::flow::continue_msg, absorbThrowType, unlimited_type> parallel_absorb_body_type;\n    std::atomic<int> input_body_count;\n    std::atomic<int> absorber_body_count;\n    input_body_count = 0;\n    absorber_body_count = 0;\n\n    tbb::flow::graph g;\n\n    g_Master = std::this_thread::get_id();\n\n#if USE_TASK_SCHEDULER_OBSERVER\n    eh_test_observer o;\n    o.observe(true);\n#endif\n\n    tbb::flow::input_node<ItemType> sn(g, src_body_type(input_body_count));\n    parallel_absorb_body_type ab2(absorber_body_count);\n    tbb::flow::function_node<ItemType> parallel_fn(g,tbb::flow::unlimited,ab2);\n    make_edge(sn, parallel_fn);\n    for(int runcnt = 0; runcnt < 2; ++runcnt) {\n        ResetGlobals(throwException,flog);\n        if(throwException) {\n            TRY();\n                sn.activate();\n                g.wait_for_all();\n            CATCH_AND_ASSERT();\n        }\n        else {\n            TRY();\n                sn.activate();\n                g.wait_for_all();\n            CATCH_AND_FAIL();\n        }\n\n        bool okayNoExceptionsCaught = (g_ExceptionInMaster && !g_MasterExecutedThrow) || (!g_ExceptionInMaster && !g_NonMasterExecutedThrow) || !throwException;\n        int src_cnt = tbb::flow::copy_body<src_body_type>(sn).count_value();\n        int sink_cnt = tbb::flow::copy_body<parallel_absorb_body_type>(parallel_fn).count_value();\n        if(throwException) {\n            CHECK_MESSAGE( (g.exception_thrown() || okayNoExceptionsCaught), \"Exception flag in flow::graph not set\");\n            CHECK_MESSAGE( (g.is_cancelled() || okayNoExceptionsCaught), \"canceled flag not set\");\n            CHECK_MESSAGE( (src_cnt <= g_NumItems), \"Too many input_node items emitted\");\n            CHECK_MESSAGE( (sink_cnt <= src_cnt), \"Too many input_node items received\");\n        }\n        else {\n            CHECK_MESSAGE( (!g.exception_thrown()), \"Exception flag in flow::graph set but no throw occurred\");\n            CHECK_MESSAGE( (!g.is_cancelled()), \"canceled flag set but no throw occurred\");\n            CHECK_MESSAGE( (src_cnt == g_NumItems), \"Incorrect # input_node items emitted\");\n            CHECK_MESSAGE( (sink_cnt == src_cnt), \"Incorrect # input_node items received\");\n        }\n        g.reset();  // resets the body of the input_node and the absorb_nodes.\n        input_body_count = 0;\n        absorber_body_count = 0;\n        CHECK_MESSAGE( (!g.exception_thrown()), \"Reset didn't clear exception_thrown()\");\n        CHECK_MESSAGE( (!g.is_cancelled()), \"Reset didn't clear is_cancelled()\");\n        src_cnt = tbb::flow::copy_body<src_body_type>(sn).count_value();\n        sink_cnt = tbb::flow::copy_body<parallel_absorb_body_type>(parallel_fn).count_value();\n        CHECK_MESSAGE( (src_cnt == 0), \"input_node count not reset\");\n        CHECK_MESSAGE( (sink_cnt == 0), \"sink_node count not reset\");\n    }\n#if USE_TASK_SCHEDULER_OBSERVER\n    o.observe(false);\n#endif\n}  // run_one_input_node_test\n\n\ntemplate<class ItemType, TestNodeTypeEnum inpThrowType, TestNodeTypeEnum absorbThrowType>\nvoid run_input_node_test() {\n    run_one_input_node_test<ItemType,inpThrowType,absorbThrowType>(false,false);\n    run_one_input_node_test<ItemType,inpThrowType,absorbThrowType>(true,false);\n    run_one_input_node_test<ItemType,inpThrowType,absorbThrowType>(true,true);\n}  // run_input_node_test\n\nvoid test_input_node() {\n    INFO(\"Testing input_node\\n\");\n    CheckType<int>::check_type_counter = 0;\n    g_Wakeup_Msg = \"input_node(1): Missed wakeup or machine is overloaded?\";\n    run_input_node_test<CheckType<int>, isThrowing, nonThrowing>();\n    CHECK_MESSAGE( (!CheckType<int>::check_type_counter), \"Some items leaked in test\");\n    g_Wakeup_Msg = \"input_node(2): Missed wakeup or machine is overloaded?\";\n    run_input_node_test<int, isThrowing, nonThrowing>();\n    g_Wakeup_Msg = \"input_node(3): Missed wakeup or machine is overloaded?\";\n    run_input_node_test<int, nonThrowing, isThrowing>();\n    g_Wakeup_Msg = \"input_node(4): Missed wakeup or machine is overloaded?\";\n    run_input_node_test<int, isThrowing, isThrowing>();\n    g_Wakeup_Msg = \"input_node(5): Missed wakeup or machine is overloaded?\";\n    run_input_node_test<CheckType<int>, isThrowing, isThrowing>();\n    g_Wakeup_Msg = g_Orig_Wakeup_Msg;\n    CHECK_MESSAGE( (!CheckType<int>::check_type_counter), \"Some items leaked in test\");\n}\n\n// -------- utilities & types to test function_node and multifunction_node.\n\n// need to tell the template which node type I am using so it attaches successors correctly.\nenum NodeFetchType { func_node_type, multifunc_node_type };\n\ntemplate<class NodeType, class ItemType, int indx, NodeFetchType NFT>\nstruct AttachPoint;\n\ntemplate<class NodeType, class ItemType, int indx>\nstruct AttachPoint<NodeType,ItemType,indx,multifunc_node_type> {\n    static tbb::flow::sender<ItemType> &GetSender(NodeType &n) {\n        return tbb::flow::output_port<indx>(n);\n    }\n};\n\ntemplate<class NodeType, class ItemType, int indx>\nstruct AttachPoint<NodeType,ItemType,indx,func_node_type> {\n    static tbb::flow::sender<ItemType> &GetSender(NodeType &n) {\n        return n;\n    }\n};\n\n\n// common template for running function_node, multifunction_node.  continue_node\n// has different firing requirements, so it needs a different graph topology.\ntemplate<\n    class InputNodeType,\n    class InputNodeBodyType0,\n    class InputNodeBodyType1,\n    NodeFetchType NFT,\n    class TestNodeType,\n    class TestNodeBodyType,\n    class TypeToSink0,          // what kind of item are we sending to sink0\n    class TypeToSink1,          // what kind of item are we sending to sink1\n    class SinkNodeType0,        // will be same for function;\n    class SinkNodeType1,        // may differ for multifunction_node\n    class SinkNodeBodyType0,\n    class SinkNodeBodyType1,\n    size_t Conc\n    >\nvoid\nrun_one_functype_node_test(bool throwException, bool flog, const char * /*name*/) {\n\n    std::stringstream ss;\n    std::string ss_str;\n    char *saved_msg = const_cast<char *>(g_Wakeup_Msg);\n    tbb::flow::graph g;\n\n    std::atomic<int> input0_count;\n    std::atomic<int> input1_count;\n    std::atomic<int> sink0_count;\n    std::atomic<int> sink1_count;\n    std::atomic<int> test_count;\n    input0_count = input1_count = sink0_count = sink1_count = test_count = 0;\n\n#if USE_TASK_SCHEDULER_OBSERVER\n    eh_test_observer o;\n    o.observe(true);\n#endif\n\n    g_Master = std::this_thread::get_id();\n    InputNodeType input0(g, InputNodeBodyType0(input0_count));\n    InputNodeType input1(g, InputNodeBodyType1(input1_count));\n    TestNodeType node_to_test(g, Conc, TestNodeBodyType(test_count));\n    SinkNodeType0 sink0(g,tbb::flow::unlimited,SinkNodeBodyType0(sink0_count));\n    SinkNodeType1 sink1(g,tbb::flow::unlimited,SinkNodeBodyType1(sink1_count));\n    make_edge(input0, node_to_test);\n    make_edge(input1, node_to_test);\n    make_edge(AttachPoint<TestNodeType, TypeToSink0, 0, NFT>::GetSender(node_to_test), sink0);\n    make_edge(AttachPoint<TestNodeType, TypeToSink1, 1, NFT>::GetSender(node_to_test), sink1);\n\n    for(int iter = 0; iter < 2; ++iter) {  // run, reset, run again\n        ss.clear();\n        ss << saved_msg << \" iter=\" << iter << \", threads=\" << g_NumThreads << \", throw=\" << (throwException ? \"T\" : \"F\") << \", flow=\" << (flog ? \"T\" : \"F\");\n        ss_str = ss.str();\n        g_Wakeup_Msg = ss_str.c_str();\n        ResetGlobals(throwException,flog);\n        if(throwException) {\n            TRY();\n                input0.activate();\n                input1.activate();\n                g.wait_for_all();\n            CATCH_AND_ASSERT();\n        }\n        else {\n            TRY();\n                input0.activate();\n                input1.activate();\n                g.wait_for_all();\n            CATCH_AND_FAIL();\n        }\n        bool okayNoExceptionsCaught = (g_ExceptionInMaster && !g_MasterExecutedThrow) || (!g_ExceptionInMaster && !g_NonMasterExecutedThrow) || !throwException;\n        int ib0_cnt = tbb::flow::copy_body<InputNodeBodyType0>(input0).count_value();\n        int ib1_cnt = tbb::flow::copy_body<InputNodeBodyType1>(input1).count_value();\n        int t_cnt   = tbb::flow::copy_body<TestNodeBodyType>(node_to_test).count_value();\n        int nb0_cnt = tbb::flow::copy_body<SinkNodeBodyType0>(sink0).count_value();\n        int nb1_cnt = tbb::flow::copy_body<SinkNodeBodyType1>(sink1).count_value();\n        if(throwException) {\n            CHECK_MESSAGE( (g.exception_thrown() || okayNoExceptionsCaught), \"Exception not caught by graph\");\n            CHECK_MESSAGE( (g.is_cancelled() || okayNoExceptionsCaught), \"Cancellation not signalled in graph\");\n            CHECK_MESSAGE( (ib0_cnt + ib1_cnt <= 2*g_NumItems), \"Too many items sent by inputs\");\n            CHECK_MESSAGE( (ib0_cnt + ib1_cnt >= t_cnt), \"Too many items received by test node\");\n            CHECK_MESSAGE( (nb0_cnt + nb1_cnt <= t_cnt*2), \"Too many items received by sink nodes\");\n        }\n        else {\n            CHECK_MESSAGE( (!g.exception_thrown()), \"Exception flag in flow::graph set but no throw occurred\");\n            CHECK_MESSAGE( (!g.is_cancelled()), \"canceled flag set but no throw occurred\");\n            CHECK_MESSAGE( (ib0_cnt + ib1_cnt == 2*g_NumItems), \"Missing invocations of input_nodes\");\n            CHECK_MESSAGE( (t_cnt == 2*g_NumItems), \"Not all items reached test node\");\n            CHECK_MESSAGE( (nb0_cnt == 2*g_NumItems && nb1_cnt == 2*g_NumItems), \"Missing items in absorbers\");\n        }\n        g.reset();  // resets the body of the input_nodes, test_node and the absorb_nodes.\n        input0_count = input1_count = sink0_count = sink1_count = test_count = 0;\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<InputNodeBodyType0>(input0).count_value()),\"Reset input 0 failed\");\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<InputNodeBodyType1>(input1).count_value()),\"Reset input 1 failed\");\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<TestNodeBodyType>(node_to_test).count_value()),\"Reset test_node failed\");\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<SinkNodeBodyType0>(sink0).count_value()),\"Reset sink 0 failed\");\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<SinkNodeBodyType1>(sink1).count_value()),\"Reset sink 1 failed\");\n\n        g_Wakeup_Msg = saved_msg;\n    }\n#if USE_TASK_SCHEDULER_OBSERVER\n    o.observe(false);\n#endif\n}\n\n//  Test function_node\n//\n// graph being tested is\n//\n//         input_node -\\                 /- parallel function_node\n//                      \\               /\n//                       +function_node+\n//                      /               \\                                  x\n//         input_node -/                 \\- parallel function_node\n//\n//    After each run the graph is reset(), to test the reset functionality.\n//\ntemplate<\n    TestNodeTypeEnum IType1,                          // does input node 1 throw?\n    TestNodeTypeEnum IType2,                          // does input node 2 throw?\n    class Item12,                                     // type of item passed between inputs and test node\n    TestNodeTypeEnum FType,                           // does function node throw?\n    class Item23,                                     // type passed from function_node to sink nodes\n    TestNodeTypeEnum NType1,                          // does sink node 1 throw?\n    TestNodeTypeEnum NType2,                          // does sink node 1 throw?\n    class NodePolicy,                                 // rejecting,queueing\n    size_t Conc                                       // is node concurrent? {serial | limited | unlimited}\n>\nvoid run_function_node_test() {\n\n    typedef test_input_body<Item12,IType1> IBodyType1;\n    typedef test_input_body<Item12,IType2> IBodyType2;\n    typedef absorber_body<Item12, Item23, FType, Conc> TestBodyType;\n    typedef absorber_body<Item23,tbb::flow::continue_msg, NType1, unlimited_type> SinkBodyType1;\n    typedef absorber_body<Item23,tbb::flow::continue_msg, NType2, unlimited_type> SinkBodyType2;\n\n    typedef tbb::flow::input_node<Item12> InputType;\n    typedef tbb::flow::function_node<Item12, Item23, NodePolicy> TestType;\n    typedef tbb::flow::function_node<Item23,tbb::flow::continue_msg> SnkType;\n\n    for(int i = 0; i < 4; ++i ) {\n        if(i != 2) {  // doesn't make sense to flog a non-throwing test\n            bool doThrow = (i & 0x1) != 0;\n            bool doFlog = (i & 0x2) != 0;\n            run_one_functype_node_test<\n                /*InputNodeType*/       InputType,\n                /*InputNodeBodyType0*/  IBodyType1,\n                /*InputNodeBodyType1*/  IBodyType2,\n                /* NFT */               func_node_type,\n                /*TestNodeType*/        TestType,\n                /*TestNodeBodyType*/    TestBodyType,\n                /*TypeToSink0 */        Item23,\n                /*TypeToSink1 */        Item23,\n                /*SinkNodeType0*/       SnkType,\n                /*SinkNodeType1*/       SnkType,\n                /*SinkNodeBodyType1*/   SinkBodyType1,\n                /*SinkNodeBodyType2*/   SinkBodyType2,\n                /*Conc*/                Conc>\n                    (doThrow,doFlog,\"function_node\");\n        }\n    }\n}  // run_function_node_test\n\nvoid test_function_node() {\n    INFO(\"Testing function_node\\n\");\n    // serial rejecting\n    g_Wakeup_Msg = \"function_node(1a): Missed wakeup or machine is overloaded?\";\n    run_function_node_test<isThrowing, nonThrowing, int, nonThrowing, int, nonThrowing, nonThrowing, tbb::flow::rejecting, serial_type>();\n    g_Wakeup_Msg = \"function_node(1b): Missed wakeup or machine is overloaded?\";\n    run_function_node_test<nonThrowing, nonThrowing, int, isThrowing, int, nonThrowing, nonThrowing, tbb::flow::rejecting, serial_type>();\n    g_Wakeup_Msg = \"function_node(1c): Missed wakeup or machine is overloaded?\";\n    run_function_node_test<nonThrowing, nonThrowing, int, nonThrowing, int, isThrowing, nonThrowing, tbb::flow::rejecting, serial_type>();\n\n    // serial queueing\n    g_Wakeup_Msg = \"function_node(2): Missed wakeup or machine is overloaded?\";\n    run_function_node_test<isThrowing, nonThrowing, int, nonThrowing, int, nonThrowing, nonThrowing, tbb::flow::queueing, serial_type>();\n    run_function_node_test<nonThrowing, nonThrowing, int, isThrowing, int, nonThrowing, nonThrowing, tbb::flow::queueing, serial_type>();\n    run_function_node_test<nonThrowing, nonThrowing, int, nonThrowing, int, isThrowing, nonThrowing, tbb::flow::queueing, serial_type>();\n    CheckType<int>::check_type_counter = 0;\n    run_function_node_test<nonThrowing, nonThrowing, CheckType<int>, nonThrowing, CheckType<int>, isThrowing, nonThrowing, tbb::flow::queueing, serial_type>();\n    CHECK_MESSAGE( (!CheckType<int>::check_type_counter), \"Some items leaked in test\");\n\n    // unlimited parallel rejecting\n    g_Wakeup_Msg = \"function_node(3): Missed wakeup or machine is overloaded?\";\n    run_function_node_test<isThrowing, nonThrowing, int, nonThrowing, int, nonThrowing, nonThrowing, tbb::flow::rejecting, unlimited_type>();\n    run_function_node_test<nonThrowing, nonThrowing, int, isThrowing, int, nonThrowing, nonThrowing, tbb::flow::rejecting, unlimited_type>();\n    run_function_node_test<nonThrowing, nonThrowing, int, nonThrowing, int, nonThrowing, isThrowing, tbb::flow::rejecting, unlimited_type>();\n\n    // limited parallel rejecting\n    g_Wakeup_Msg = \"function_node(4): Missed wakeup or machine is overloaded?\";\n    run_function_node_test<isThrowing, nonThrowing, int, nonThrowing, int, nonThrowing, nonThrowing, tbb::flow::rejecting, limited_type>();\n    run_function_node_test<nonThrowing, nonThrowing, int, isThrowing, int, nonThrowing, nonThrowing, tbb::flow::rejecting, (size_t)limited_type>();\n    run_function_node_test<nonThrowing, nonThrowing, int, nonThrowing, int, nonThrowing, isThrowing, tbb::flow::rejecting, (size_t)limited_type>();\n\n    // limited parallel queueing\n    g_Wakeup_Msg = \"function_node(5): Missed wakeup or machine is overloaded?\";\n    run_function_node_test<isThrowing, nonThrowing, int, nonThrowing, int, nonThrowing, nonThrowing, tbb::flow::queueing, (size_t)limited_type>();\n    run_function_node_test<nonThrowing, nonThrowing, int, isThrowing, int, nonThrowing, nonThrowing, tbb::flow::queueing, (size_t)limited_type>();\n    run_function_node_test<nonThrowing, nonThrowing, int, nonThrowing, int, nonThrowing, isThrowing, tbb::flow::queueing, (size_t)limited_type>();\n\n    // everyone throwing\n    g_Wakeup_Msg = \"function_node(6): Missed wakeup or machine is overloaded?\";\n    run_function_node_test<isThrowing, isThrowing, int, isThrowing, int, isThrowing, isThrowing, tbb::flow::rejecting, unlimited_type>();\n    g_Wakeup_Msg = g_Orig_Wakeup_Msg;\n}\n\n// ----------------------------------- multifunction_node ----------------------------------\n//  Test multifunction_node.\n//\n// graph being tested is\n//\n//         input_node -\\                      /- parallel function_node\n//                      \\                    /\n//                       +multifunction_node+\n//                      /                    \\                                  x\n//         input_node -/                      \\- parallel function_node\n//\n//    After each run the graph is reset(), to test the reset functionality.  The\n//    multifunction_node will put an item to each successor for every item\n//    received.\n//\ntemplate<\n    TestNodeTypeEnum IType0,                          // does input node 1 throw?\n    TestNodeTypeEnum IType1,                          // does input node 2 thorw?\n    class Item12,                                 // type of item passed between inputs and test node\n    TestNodeTypeEnum FType,                           // does multifunction node throw?\n    class ItemTuple,                              // tuple of types passed from multifunction_node to sink nodes\n    TestNodeTypeEnum NType1,                          // does sink node 1 throw?\n    TestNodeTypeEnum NType2,                          // does sink node 2 throw?\n    class  NodePolicy,                            // rejecting,queueing\n    size_t Conc                                   // is node concurrent? {serial | limited | unlimited}\n>\nvoid run_multifunction_node_test() {\n\n    typedef typename std::tuple_element<0,ItemTuple>::type Item23Type0;\n    typedef typename std::tuple_element<1,ItemTuple>::type Item23Type1;\n    typedef test_input_body<Item12,IType0> IBodyType1;\n    typedef test_input_body<Item12,IType1> IBodyType2;\n    typedef multifunction_node_body<Item12, ItemTuple, FType, Conc> TestBodyType;\n    typedef absorber_body<Item23Type0,tbb::flow::continue_msg, NType1, unlimited_type> SinkBodyType1;\n    typedef absorber_body<Item23Type1,tbb::flow::continue_msg, NType2, unlimited_type> SinkBodyType2;\n\n    typedef tbb::flow::input_node<Item12> InputType;\n    typedef tbb::flow::multifunction_node<Item12, ItemTuple, NodePolicy> TestType;\n    typedef tbb::flow::function_node<Item23Type0,tbb::flow::continue_msg> SnkType0;\n    typedef tbb::flow::function_node<Item23Type1,tbb::flow::continue_msg> SnkType1;\n\n    for(int i = 0; i < 4; ++i ) {\n        if(i != 2) {  // doesn't make sense to flog a non-throwing test\n            bool doThrow = (i & 0x1) != 0;\n            bool doFlog = (i & 0x2) != 0;\n    run_one_functype_node_test<\n        /*InputNodeType*/       InputType,\n        /*InputNodeBodyType0*/  IBodyType1,\n        /*InputNodeBodyType1*/  IBodyType2,\n        /*NFT*/                 multifunc_node_type,\n        /*TestNodeType*/        TestType,\n        /*TestNodeBodyType*/    TestBodyType,\n        /*TypeToSink0*/         Item23Type0,\n        /*TypeToSink1*/         Item23Type1,\n        /*SinkNodeType0*/       SnkType0,\n        /*SinkNodeType1*/       SnkType1,\n        /*SinkNodeBodyType0*/   SinkBodyType1,\n        /*SinkNodeBodyType1*/   SinkBodyType2,\n        /*Conc*/                Conc>\n            (doThrow,doFlog,\"multifunction_node\");\n        }\n    }\n}  // run_multifunction_node_test\n\nvoid test_multifunction_node() {\n    INFO(\"Testing multifunction_node\\n\");\n    g_Wakeup_Msg = \"multifunction_node(input throws,rejecting,serial): Missed wakeup or machine is overloaded?\";\n    // serial rejecting\n    run_multifunction_node_test<isThrowing, nonThrowing, int, nonThrowing, std::tuple<int,float>, nonThrowing, nonThrowing, tbb::flow::rejecting, serial_type>();\n    g_Wakeup_Msg = \"multifunction_node(test throws,rejecting,serial): Missed wakeup or machine is overloaded?\";\n    run_multifunction_node_test<nonThrowing, nonThrowing, int, isThrowing, std::tuple<int,int>, nonThrowing, nonThrowing, tbb::flow::rejecting, serial_type>();\n    g_Wakeup_Msg = \"multifunction_node(sink throws,rejecting,serial): Missed wakeup or machine is overloaded?\";\n    run_multifunction_node_test<nonThrowing, nonThrowing, int, nonThrowing, std::tuple<int,int>, isThrowing, nonThrowing, tbb::flow::rejecting, serial_type>();\n\n    g_Wakeup_Msg = \"multifunction_node(2): Missed wakeup or machine is overloaded?\";\n    // serial queueing\n    run_multifunction_node_test<isThrowing, nonThrowing, int, nonThrowing, std::tuple<int,int>, nonThrowing, nonThrowing, tbb::flow::queueing, serial_type>();\n    run_multifunction_node_test<nonThrowing, nonThrowing, int, isThrowing, std::tuple<int,int>, nonThrowing, nonThrowing, tbb::flow::queueing, serial_type>();\n    run_multifunction_node_test<nonThrowing, nonThrowing, int, nonThrowing, std::tuple<int,int>, isThrowing, nonThrowing, tbb::flow::queueing, serial_type>();\n    CheckType<int>::check_type_counter = 0;\n    run_multifunction_node_test<nonThrowing, nonThrowing, CheckType<int>, nonThrowing, std::tuple<CheckType<int>, CheckType<int> >, isThrowing, nonThrowing, tbb::flow::queueing, serial_type>();\n    CHECK_MESSAGE( (!CheckType<int>::check_type_counter), \"Some items leaked in test\");\n\n    g_Wakeup_Msg = \"multifunction_node(3): Missed wakeup or machine is overloaded?\";\n    // unlimited parallel rejecting\n    run_multifunction_node_test<isThrowing, nonThrowing, int, nonThrowing, std::tuple<int,int>, nonThrowing, nonThrowing, tbb::flow::rejecting, unlimited_type>();\n    run_multifunction_node_test<nonThrowing, nonThrowing, int, isThrowing, std::tuple<int,int>, nonThrowing, nonThrowing, tbb::flow::rejecting, unlimited_type>();\n    run_multifunction_node_test<nonThrowing, nonThrowing, int, nonThrowing, std::tuple<int,int>, nonThrowing, isThrowing, tbb::flow::rejecting, unlimited_type>();\n\n    g_Wakeup_Msg = \"multifunction_node(4): Missed wakeup or machine is overloaded?\";\n    // limited parallel rejecting\n    run_multifunction_node_test<isThrowing, nonThrowing, int, nonThrowing, std::tuple<int,int>, nonThrowing, nonThrowing, tbb::flow::rejecting, limited_type>();\n    run_multifunction_node_test<nonThrowing, nonThrowing, int, isThrowing, std::tuple<int,int>, nonThrowing, nonThrowing, tbb::flow::rejecting, (size_t)limited_type>();\n    run_multifunction_node_test<nonThrowing, nonThrowing, int, nonThrowing, std::tuple<int,int>, nonThrowing, isThrowing, tbb::flow::rejecting, (size_t)limited_type>();\n\n    g_Wakeup_Msg = \"multifunction_node(5): Missed wakeup or machine is overloaded?\";\n    // limited parallel queueing\n    run_multifunction_node_test<isThrowing, nonThrowing, int, nonThrowing, std::tuple<int,int>, nonThrowing, nonThrowing, tbb::flow::queueing, (size_t)limited_type>();\n    run_multifunction_node_test<nonThrowing, nonThrowing, int, isThrowing, std::tuple<int,int>, nonThrowing, nonThrowing, tbb::flow::queueing, (size_t)limited_type>();\n    run_multifunction_node_test<nonThrowing, nonThrowing, int, nonThrowing, std::tuple<int,int>, nonThrowing, isThrowing, tbb::flow::queueing, (size_t)limited_type>();\n\n    g_Wakeup_Msg = \"multifunction_node(6): Missed wakeup or machine is overloaded?\";\n    // everyone throwing\n    run_multifunction_node_test<isThrowing, isThrowing, int, isThrowing, std::tuple<int,int>, isThrowing, isThrowing, tbb::flow::rejecting, unlimited_type>();\n    g_Wakeup_Msg = g_Orig_Wakeup_Msg;\n}\n\n//\n// Continue node has T predecessors.  when it receives messages (continue_msg) on T predecessors\n// it executes the body of the node, and forwards a continue_msg to its successors.\n// However many predecessors the continue_node has, that's how many continue_msgs it receives\n// on input before forwarding a message.\n//\n// The graph will look like\n//\n//                                          +broadcast_node+\n//                                         /                \\             ___\n//       input_node+------>+broadcast_node+                  +continue_node+--->+absorber\n//                                         \\                /\n//                                          +broadcast_node+\n//\n// The continue_node has unlimited parallelism, no input buffering, and broadcasts to successors.\n// The absorber is parallel, so each item emitted by the input will result in one thread\n// spinning.  So for N threads we pass N-1 continue_messages, then spin wait and then throw if\n// we are allowed to.\n\ntemplate < class InputNodeType, class InputNodeBodyType, class TTestNodeType, class TestNodeBodyType,\n        class SinkNodeType, class SinkNodeBodyType>\nvoid run_one_continue_node_test (bool throwException, bool flog) {\n    tbb::flow::graph g;\n\n    std::atomic<int> input_count;\n    std::atomic<int> test_count;\n    std::atomic<int> sink_count;\n    input_count = test_count = sink_count = 0;\n#if USE_TASK_SCHEDULER_OBSERVER\n    eh_test_observer o;\n    o.observe(true);\n#endif\n    g_Master = std::this_thread::get_id();\n    InputNodeType input(g, InputNodeBodyType(input_count));\n    TTestNodeType node_to_test(g, TestNodeBodyType(test_count));\n    SinkNodeType sink(g,tbb::flow::unlimited,SinkNodeBodyType(sink_count));\n    tbb::flow::broadcast_node<tbb::flow::continue_msg> b1(g), b2(g), b3(g);\n    make_edge(input, b1);\n    make_edge(b1,b2);\n    make_edge(b1,b3);\n    make_edge(b2,node_to_test);\n    make_edge(b3,node_to_test);\n    make_edge(node_to_test, sink);\n    for(int iter = 0; iter < 2; ++iter) {\n        ResetGlobals(throwException,flog);\n        if(throwException) {\n            TRY();\n                input.activate();\n                g.wait_for_all();\n            CATCH_AND_ASSERT();\n        }\n        else {\n            TRY();\n                input.activate();\n                g.wait_for_all();\n            CATCH_AND_FAIL();\n        }\n        bool okayNoExceptionsCaught = (g_ExceptionInMaster && !g_MasterExecutedThrow) || (!g_ExceptionInMaster && !g_NonMasterExecutedThrow) || !throwException;\n        int ib_cnt = tbb::flow::copy_body<InputNodeBodyType>(input).count_value();\n        int t_cnt   = tbb::flow::copy_body<TestNodeBodyType>(node_to_test).count_value();\n        int nb_cnt = tbb::flow::copy_body<SinkNodeBodyType>(sink).count_value();\n        if(throwException) {\n            CHECK_MESSAGE( (g.exception_thrown() || okayNoExceptionsCaught), \"Exception not caught by graph\");\n            CHECK_MESSAGE( (g.is_cancelled() || okayNoExceptionsCaught), \"Cancellation not signalled in graph\");\n            CHECK_MESSAGE( (ib_cnt <= g_NumItems), \"Too many items sent by inputs\");\n            CHECK_MESSAGE( (ib_cnt >= t_cnt), \"Too many items received by test node\");\n            CHECK_MESSAGE( (nb_cnt <= t_cnt), \"Too many items received by sink nodes\");\n        }\n        else {\n            CHECK_MESSAGE( (!g.exception_thrown()), \"Exception flag in flow::graph set but no throw occurred\");\n            CHECK_MESSAGE( (!g.is_cancelled()), \"canceled flag set but no throw occurred\");\n            CHECK_MESSAGE( (ib_cnt == g_NumItems), \"Missing invocations of input_node\");\n            CHECK_MESSAGE( (t_cnt == g_NumItems), \"Not all items reached test node\");\n            CHECK_MESSAGE( (nb_cnt == g_NumItems), \"Missing items in absorbers\");\n        }\n        g.reset();  // resets the body of the input_nodes, test_node and the absorb_nodes.\n        input_count = test_count = sink_count = 0;\n        CHECK_MESSAGE( (0 == (int)test_count), \"Atomic wasn't reset properly\");\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<InputNodeBodyType>(input).count_value()),\"Reset input failed\");\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<TestNodeBodyType>(node_to_test).count_value()),\"Reset test_node failed\");\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<SinkNodeBodyType>(sink).count_value()),\"Reset sink failed\");\n    }\n#if USE_TASK_SCHEDULER_OBSERVER\n    o.observe(false);\n#endif\n}\n\ntemplate<\n    class ItemType,\n    TestNodeTypeEnum IType,   // does input node throw?\n    TestNodeTypeEnum CType,   // does continue_node throw?\n    TestNodeTypeEnum AType>    // does absorber throw\nvoid run_continue_node_test() {\n    typedef test_input_body<tbb::flow::continue_msg,IType> IBodyType;\n    typedef absorber_body<tbb::flow::continue_msg,ItemType,CType,unlimited_type> ContBodyType;\n    typedef absorber_body<ItemType,tbb::flow::continue_msg, AType, unlimited_type> SinkBodyType;\n\n    typedef tbb::flow::input_node<tbb::flow::continue_msg> InputType;\n    typedef tbb::flow::continue_node<ItemType> TestType;\n    typedef tbb::flow::function_node<ItemType,tbb::flow::continue_msg> SnkType;\n\n    for(int i = 0; i < 4; ++i ) {\n        if(i == 2) continue;  // don't run (false,true); it doesn't make sense.\n        bool doThrow = (i & 0x1) != 0;\n        bool doFlog = (i & 0x2) != 0;\n        run_one_continue_node_test<\n            /*InputNodeType*/       InputType,\n            /*InputNodeBodyType*/   IBodyType,\n            /*TestNodeType*/        TestType,\n            /*TestNodeBodyType*/    ContBodyType,\n            /*SinkNodeType*/        SnkType,\n            /*SinkNodeBodyType*/    SinkBodyType>\n            (doThrow,doFlog);\n    }\n}\n\n//\nvoid test_continue_node() {\n    INFO(\"Testing continue_node\\n\");\n    g_Wakeup_Msg = \"buffer_node(non,is,non): Missed wakeup or machine is overloaded?\";\n    run_continue_node_test<int,nonThrowing,isThrowing,nonThrowing>();\n    g_Wakeup_Msg = \"buffer_node(non,non,is): Missed wakeup or machine is overloaded?\";\n    run_continue_node_test<int,nonThrowing,nonThrowing,isThrowing>();\n    g_Wakeup_Msg = \"buffer_node(is,non,non): Missed wakeup or machine is overloaded?\";\n    run_continue_node_test<int,isThrowing,nonThrowing,nonThrowing>();\n    g_Wakeup_Msg = \"buffer_node(is,is,is): Missed wakeup or machine is overloaded?\";\n    run_continue_node_test<int,isThrowing,isThrowing,isThrowing>();\n    CheckType<double>::check_type_counter = 0;\n    run_continue_node_test<CheckType<double>,isThrowing,isThrowing,isThrowing>();\n    CHECK_MESSAGE( (!CheckType<double>::check_type_counter), \"Dropped objects in continue_node test\");\n    g_Wakeup_Msg = g_Orig_Wakeup_Msg;\n}\n\n// ---------- buffer_node queue_node overwrite_node --------------\n\ntemplate<\n    class BufferItemType,       //\n    class InputNodeType,\n    class InputNodeBodyType,\n    class TestNodeType,\n    class SinkNodeType,\n    class SinkNodeBodyType >\nvoid run_one_buffer_node_test(bool throwException,bool flog) {\n    tbb::flow::graph g;\n\n    std::atomic<int> input_count;\n    std::atomic<int> sink_count;\n    input_count = sink_count = 0;\n#if USE_TASK_SCHEDULER_OBSERVER\n    eh_test_observer o;\n    o.observe(true);\n#endif\n    g_Master = std::this_thread::get_id();\n    InputNodeType input(g, InputNodeBodyType(input_count));\n    TestNodeType node_to_test(g);\n    SinkNodeType sink(g,tbb::flow::unlimited,SinkNodeBodyType(sink_count));\n    make_edge(input,node_to_test);\n    make_edge(node_to_test, sink);\n    for(int iter = 0; iter < 2; ++iter) {\n        ResetGlobals(throwException,flog);\n        if(throwException) {\n            TRY();\n                input.activate();\n                g.wait_for_all();\n            CATCH_AND_ASSERT();\n        }\n        else {\n            TRY();\n                input.activate();\n                g.wait_for_all();\n            CATCH_AND_FAIL();\n        }\n        bool okayNoExceptionsCaught = (g_ExceptionInMaster && !g_MasterExecutedThrow) || (!g_ExceptionInMaster && !g_NonMasterExecutedThrow) || !throwException;\n        int ib_cnt = tbb::flow::copy_body<InputNodeBodyType>(input).count_value();\n        int nb_cnt = tbb::flow::copy_body<SinkNodeBodyType>(sink).count_value();\n        if(throwException) {\n            CHECK_MESSAGE( (g.exception_thrown() || okayNoExceptionsCaught), \"Exception not caught by graph\");\n            CHECK_MESSAGE( (g.is_cancelled() || okayNoExceptionsCaught), \"Cancellation not signalled in graph\");\n            CHECK_MESSAGE( (ib_cnt <= g_NumItems), \"Too many items sent by inputs\");\n            CHECK_MESSAGE( (nb_cnt <= ib_cnt), \"Too many items received by sink nodes\");\n        }\n        else {\n            CHECK_MESSAGE( (!g.exception_thrown()), \"Exception flag in flow::graph set but no throw occurred\");\n            CHECK_MESSAGE( (!g.is_cancelled()), \"canceled flag set but no throw occurred\");\n            CHECK_MESSAGE( (ib_cnt == g_NumItems), \"Missing invocations of input_node\");\n            CHECK_MESSAGE( (nb_cnt == g_NumItems), \"Missing items in absorbers\");\n        }\n        if(iter == 0) {\n            remove_edge(node_to_test, sink);\n            node_to_test.try_put(BufferItemType());\n            g.wait_for_all();\n            g.reset();\n            input_count = sink_count = 0;\n            BufferItemType tmp;\n            CHECK_MESSAGE( (!node_to_test.try_get(tmp)), \"node not empty\");\n            make_edge(node_to_test, sink);\n            g.wait_for_all();\n        }\n        else {\n            g.reset();\n            input_count = sink_count = 0;\n        }\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<InputNodeBodyType>(input).count_value()),\"Reset input failed\");\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<SinkNodeBodyType>(sink).count_value()),\"Reset sink failed\");\n    }\n\n#if USE_TASK_SCHEDULER_OBSERVER\n    o.observe(false);\n#endif\n}\ntemplate<class BufferItemType,\n         TestNodeTypeEnum InputThrowType,\n         TestNodeTypeEnum SinkThrowType>\nvoid run_buffer_queue_and_overwrite_node_test() {\n    typedef test_input_body<BufferItemType,InputThrowType> InputBodyType;\n    typedef absorber_body<BufferItemType,tbb::flow::continue_msg,SinkThrowType,unlimited_type> SinkBodyType;\n\n    typedef tbb::flow::input_node<BufferItemType> InputType;\n    typedef tbb::flow::buffer_node<BufferItemType> BufType;\n    typedef tbb::flow::queue_node<BufferItemType>  QueType;\n    typedef tbb::flow::overwrite_node<BufferItemType>  OvrType;\n    typedef tbb::flow::function_node<BufferItemType,tbb::flow::continue_msg> SnkType;\n\n    for(int i = 0; i < 4; ++i) {\n        if(i == 2) continue;  // no need to test flog w/o throws\n        bool throwException = (i & 0x1) != 0;\n        bool doFlog = (i & 0x2) != 0;\n        run_one_buffer_node_test<\n            /* class BufferItemType*/     BufferItemType,\n            /*class InputNodeType*/       InputType,\n            /*class InputNodeBodyType*/   InputBodyType,\n            /*class TestNodeType*/        BufType,\n            /*class SinkNodeType*/        SnkType,\n            /*class SinkNodeBodyType*/    SinkBodyType\n            >(throwException, doFlog);\n        run_one_buffer_node_test<\n            /* class BufferItemType*/     BufferItemType,\n            /*class InputNodeType*/       InputType,\n            /*class InputNodeBodyType*/   InputBodyType,\n            /*class TestNodeType*/        QueType,\n            /*class SinkNodeType*/        SnkType,\n            /*class SinkNodeBodyType*/    SinkBodyType\n            >(throwException, doFlog);\n        run_one_buffer_node_test<\n            /* class BufferItemType*/     BufferItemType,\n            /*class InputNodeType*/       InputType,\n            /*class InputNodeBodyType*/   InputBodyType,\n            /*class TestNodeType*/        OvrType,\n            /*class SinkNodeType*/        SnkType,\n            /*class SinkNodeBodyType*/    SinkBodyType\n            >(throwException, doFlog);\n    }\n}\n\nvoid test_buffer_queue_and_overwrite_node() {\n    INFO(\"Testing buffer_node, queue_node and overwrite_node\\n\");\n    g_Wakeup_Msg = \"buffer, queue, overwrite(is,non): Missed wakeup or machine is overloaded?\";\n    run_buffer_queue_and_overwrite_node_test<int,isThrowing,nonThrowing>();\n    g_Wakeup_Msg = \"buffer, queue, overwrite(non,is): Missed wakeup or machine is overloaded?\";\n    run_buffer_queue_and_overwrite_node_test<int,nonThrowing,isThrowing>();\n    g_Wakeup_Msg = \"buffer, queue, overwrite(is,is): Missed wakeup or machine is overloaded?\";\n    run_buffer_queue_and_overwrite_node_test<int,isThrowing,isThrowing>();\n    g_Wakeup_Msg = g_Orig_Wakeup_Msg;\n}\n\n// ---------- sequencer_node -------------------------\n\n\ntemplate<\n    class BufferItemType,       //\n    class InputNodeType,\n    class InputNodeBodyType,\n    class TestNodeType,\n    class SeqBodyType,\n    class SinkNodeType,\n    class SinkNodeBodyType >\nvoid run_one_sequencer_node_test(bool throwException,bool flog) {\n    tbb::flow::graph g;\n\n    std::atomic<int> input_count;\n    std::atomic<int> sink_count;\n    input_count = sink_count = 0;\n#if USE_TASK_SCHEDULER_OBSERVER\n    eh_test_observer o;\n    o.observe(true);\n#endif\n    g_Master = std::this_thread::get_id();\n    InputNodeType input(g, InputNodeBodyType(input_count));\n    TestNodeType node_to_test(g,SeqBodyType());\n    SinkNodeType sink(g,tbb::flow::unlimited,SinkNodeBodyType(sink_count));\n    make_edge(input,node_to_test);\n    make_edge(node_to_test, sink);\n    for(int iter = 0; iter < 2; ++iter) {\n        ResetGlobals(throwException,flog);\n        if(throwException) {\n            TRY();\n                input.activate();\n                g.wait_for_all();\n            CATCH_AND_ASSERT();\n        }\n        else {\n            TRY();\n                input.activate();\n                g.wait_for_all();\n            CATCH_AND_FAIL();\n        }\n        bool okayNoExceptionsCaught = (g_ExceptionInMaster && !g_MasterExecutedThrow) || (!g_ExceptionInMaster && !g_NonMasterExecutedThrow) || !throwException;\n        int ib_cnt = tbb::flow::copy_body<InputNodeBodyType>(input).count_value();\n        int nb_cnt = tbb::flow::copy_body<SinkNodeBodyType>(sink).count_value();\n        if(throwException) {\n            CHECK_MESSAGE( (g.exception_thrown() || okayNoExceptionsCaught), \"Exception not caught by graph\");\n            CHECK_MESSAGE( (g.is_cancelled() || okayNoExceptionsCaught), \"Cancellation not signalled in graph\");\n            CHECK_MESSAGE( (ib_cnt <= g_NumItems), \"Too many items sent by inputs\");\n            CHECK_MESSAGE( (nb_cnt <= ib_cnt), \"Too many items received by sink nodes\");\n        }\n        else {\n            CHECK_MESSAGE( (!g.exception_thrown()), \"Exception flag in flow::graph set but no throw occurred\");\n            CHECK_MESSAGE( (!g.is_cancelled()), \"canceled flag set but no throw occurred\");\n            CHECK_MESSAGE( (ib_cnt == g_NumItems), \"Missing invocations of input_node\");\n            CHECK_MESSAGE( (nb_cnt == g_NumItems), \"Missing items in absorbers\");\n        }\n        if(iter == 0) {\n            remove_edge(node_to_test, sink);\n            node_to_test.try_put(BufferItemType(g_NumItems + 1));\n            node_to_test.try_put(BufferItemType(1));\n            g.wait_for_all();\n            g.reset();\n            input_count = sink_count = 0;\n            make_edge(node_to_test, sink);\n            g.wait_for_all();\n        }\n        else {\n            g.reset();\n            input_count = sink_count = 0;\n        }\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<InputNodeBodyType>(input).count_value()),\"Reset input failed\");\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<SinkNodeBodyType>(sink).count_value()),\"Reset sink failed\");\n    }\n\n#if USE_TASK_SCHEDULER_OBSERVER\n    o.observe(false);\n#endif\n}\n\ntemplate<class BufferItemType,\n         TestNodeTypeEnum InputThrowType,\n         TestNodeTypeEnum SinkThrowType>\nvoid run_sequencer_node_test() {\n    typedef test_input_body<BufferItemType,InputThrowType> InputBodyType;\n    typedef absorber_body<BufferItemType,tbb::flow::continue_msg,SinkThrowType,unlimited_type> SinkBodyType;\n    typedef sequencer_body<BufferItemType> SeqBodyType;\n\n    typedef tbb::flow::input_node<BufferItemType> InputType;\n    typedef tbb::flow::sequencer_node<BufferItemType>  SeqType;\n    typedef tbb::flow::function_node<BufferItemType,tbb::flow::continue_msg> SnkType;\n\n    for(int i = 0; i < 4; ++i) {\n        if(i == 2) continue;  // no need to test flog w/o throws\n        bool throwException = (i & 0x1) != 0;\n        bool doFlog = (i & 0x2) != 0;\n        run_one_sequencer_node_test<\n            /* class BufferItemType*/     BufferItemType,\n            /*class InputNodeType*/       InputType,\n            /*class InputNodeBodyType*/   InputBodyType,\n            /*class TestNodeType*/        SeqType,\n            /*class SeqBodyType*/         SeqBodyType,\n            /*class SinkNodeType*/        SnkType,\n            /*class SinkNodeBodyType*/    SinkBodyType\n            >(throwException, doFlog);\n    }\n}\n\n\n\nvoid test_sequencer_node() {\n    INFO(\"Testing sequencer_node\\n\");\n    g_Wakeup_Msg = \"sequencer_node(is,non): Missed wakeup or machine is overloaded?\";\n    run_sequencer_node_test<int, isThrowing,nonThrowing>();\n    CheckType<int>::check_type_counter = 0;\n    g_Wakeup_Msg = \"sequencer_node(non,is): Missed wakeup or machine is overloaded?\";\n    run_sequencer_node_test<CheckType<int>, nonThrowing,isThrowing>();\n    CHECK_MESSAGE( (!CheckType<int>::check_type_counter), \"Dropped objects in sequencer_node test\");\n    g_Wakeup_Msg = \"sequencer_node(is,is): Missed wakeup or machine is overloaded?\";\n    run_sequencer_node_test<int, isThrowing,isThrowing>();\n    g_Wakeup_Msg = g_Orig_Wakeup_Msg;\n}\n\n// ------------ priority_queue_node ------------------\n\ntemplate<\n    class BufferItemType,\n    class InputNodeType,\n    class InputNodeBodyType,\n    class TestNodeType,\n    class SinkNodeType,\n    class SinkNodeBodyType >\nvoid run_one_priority_queue_node_test(bool throwException,bool flog) {\n    tbb::flow::graph g;\n\n    std::atomic<int> input_count;\n    std::atomic<int> sink_count;\n    input_count = sink_count = 0;\n#if USE_TASK_SCHEDULER_OBSERVER\n    eh_test_observer o;\n    o.observe(true);\n#endif\n    g_Master = std::this_thread::get_id();\n    InputNodeType input(g, InputNodeBodyType(input_count));\n\n    TestNodeType node_to_test(g);\n\n    SinkNodeType sink(g,tbb::flow::unlimited,SinkNodeBodyType(sink_count));\n\n    make_edge(input,node_to_test);\n    make_edge(node_to_test, sink);\n    for(int iter = 0; iter < 2; ++iter) {\n        ResetGlobals(throwException,flog);\n        if(throwException) {\n            TRY();\n                input.activate();\n                g.wait_for_all();\n            CATCH_AND_ASSERT();\n        }\n        else {\n            TRY();\n                input.activate();\n                g.wait_for_all();\n            CATCH_AND_FAIL();\n        }\n        bool okayNoExceptionsCaught = (g_ExceptionInMaster && !g_MasterExecutedThrow) || (!g_ExceptionInMaster && !g_NonMasterExecutedThrow) || !throwException;\n        int ib_cnt = tbb::flow::copy_body<InputNodeBodyType>(input).count_value();\n        int nb_cnt = tbb::flow::copy_body<SinkNodeBodyType>(sink).count_value();\n        if(throwException) {\n            CHECK_MESSAGE( (g.exception_thrown() || okayNoExceptionsCaught), \"Exception not caught by graph\");\n            CHECK_MESSAGE( (g.is_cancelled() || okayNoExceptionsCaught), \"Cancellation not signalled in graph\");\n            CHECK_MESSAGE( (ib_cnt <= g_NumItems), \"Too many items sent by inputs\");\n            CHECK_MESSAGE( (nb_cnt <= ib_cnt), \"Too many items received by sink nodes\");\n        }\n        else {\n            CHECK_MESSAGE( (!g.exception_thrown()), \"Exception flag in flow::graph set but no throw occurred\");\n            CHECK_MESSAGE( (!g.is_cancelled()), \"canceled flag set but no throw occurred\");\n            CHECK_MESSAGE( (ib_cnt == g_NumItems), \"Missing invocations of input_node\");\n            CHECK_MESSAGE( (nb_cnt == g_NumItems), \"Missing items in absorbers\");\n        }\n        if(iter == 0) {\n            remove_edge(node_to_test, sink);\n            node_to_test.try_put(BufferItemType(g_NumItems + 1));\n            node_to_test.try_put(BufferItemType(g_NumItems + 2));\n            node_to_test.try_put(BufferItemType());\n            g.wait_for_all();\n            g.reset();\n            input_count = sink_count = 0;\n            make_edge(node_to_test, sink);\n            g.wait_for_all();\n        }\n        else {\n            g.reset();\n            input_count = sink_count = 0;\n        }\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<InputNodeBodyType>(input).count_value()),\"Reset input failed\");\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<SinkNodeBodyType>(sink).count_value()),\"Reset sink failed\");\n    }\n\n#if USE_TASK_SCHEDULER_OBSERVER\n    o.observe(false);\n#endif\n}\n\ntemplate<class BufferItemType,\n         TestNodeTypeEnum InputThrowType,\n         TestNodeTypeEnum SinkThrowType>\nvoid run_priority_queue_node_test() {\n    typedef test_input_body<BufferItemType,InputThrowType> InputBodyType;\n    typedef absorber_body<BufferItemType,tbb::flow::continue_msg,SinkThrowType,unlimited_type> SinkBodyType;\n    typedef less_body<BufferItemType> LessBodyType;\n\n    typedef tbb::flow::input_node<BufferItemType> InputType;\n    typedef tbb::flow::priority_queue_node<BufferItemType,LessBodyType>  PrqType;\n    typedef tbb::flow::function_node<BufferItemType,tbb::flow::continue_msg> SnkType;\n\n    for(int i = 0; i < 4; ++i) {\n        if(i == 2) continue;  // no need to test flog w/o throws\n        bool throwException = (i & 0x1) != 0;\n        bool doFlog = (i & 0x2) != 0;\n        run_one_priority_queue_node_test<\n            /* class BufferItemType*/     BufferItemType,\n            /*class InputNodeType*/       InputType,\n            /*class InputNodeBodyType*/   InputBodyType,\n            /*class TestNodeType*/        PrqType,\n            /*class SinkNodeType*/        SnkType,\n            /*class SinkNodeBodyType*/    SinkBodyType\n            >(throwException, doFlog);\n    }\n}\n\nvoid test_priority_queue_node() {\n    INFO(\"Testing priority_queue_node\\n\");\n    g_Wakeup_Msg = \"priority_queue_node(is,non): Missed wakeup or machine is overloaded?\";\n    run_priority_queue_node_test<int, isThrowing,nonThrowing>();\n    CheckType<int>::check_type_counter = 0;\n    g_Wakeup_Msg = \"priority_queue_node(non,is): Missed wakeup or machine is overloaded?\";\n    run_priority_queue_node_test<CheckType<int>, nonThrowing,isThrowing>();\n    CHECK_MESSAGE( (!CheckType<int>::check_type_counter), \"Dropped objects in priority_queue_node test\");\n    g_Wakeup_Msg = \"priority_queue_node(is,is): Missed wakeup or machine is overloaded?\";\n    run_priority_queue_node_test<int, isThrowing,isThrowing>();\n    g_Wakeup_Msg = g_Orig_Wakeup_Msg;\n}\n\n// ------------------- join_node ----------------\ntemplate<class JP> struct graph_policy_name{\n    static const char* name() {return \"unknown\"; }\n};\ntemplate<> struct graph_policy_name<tbb::flow::queueing>  {\n    static const char* name() {return \"queueing\"; }\n};\ntemplate<> struct graph_policy_name<tbb::flow::reserving> {\n    static const char* name() {return \"reserving\"; }\n};\ntemplate<> struct graph_policy_name<tbb::flow::tag_matching> {\n    static const char* name() {return \"tag_matching\"; }\n};\n\n\ntemplate<\n    class JP,\n    class OutputTuple,\n    class InputType0,\n    class InputBodyType0,\n    class InputType1,\n    class InputBodyType1,\n    class TestJoinType,\n    class SinkType,\n    class SinkBodyType\n    >\nstruct run_one_join_node_test {\n    run_one_join_node_test() {}\n    static void execute_test(bool throwException,bool flog) {\n        typedef typename std::tuple_element<0,OutputTuple>::type ItemType0;\n        typedef typename std::tuple_element<1,OutputTuple>::type ItemType1;\n\n        tbb::flow::graph g;\n        std::atomic<int>input0_count;\n        std::atomic<int>input1_count;\n        std::atomic<int>sink_count;\n        input0_count = input1_count = sink_count = 0;\n#if USE_TASK_SCHEDULER_OBSERVER\n        eh_test_observer o;\n        o.observe(true);\n#endif\n        g_Master = std::this_thread::get_id();\n        InputType0 input0(g, InputBodyType0(input0_count));\n        InputType1 input1(g, InputBodyType1(input1_count));\n        TestJoinType node_to_test(g);\n        SinkType sink(g,tbb::flow::unlimited,SinkBodyType(sink_count));\n        make_edge(input0,tbb::flow::input_port<0>(node_to_test));\n        make_edge(input1,tbb::flow::input_port<1>(node_to_test));\n        make_edge(node_to_test, sink);\n        for(int iter = 0; iter < 2; ++iter) {\n            ResetGlobals(throwException,flog);\n            if(throwException) {\n                TRY();\n                    input0.activate();\n                    input1.activate();\n                    g.wait_for_all();\n                CATCH_AND_ASSERT();\n            }\n            else {\n                TRY();\n                    input0.activate();\n                    input1.activate();\n                    g.wait_for_all();\n                CATCH_AND_FAIL();\n            }\n            bool okayNoExceptionsCaught = (g_ExceptionInMaster && !g_MasterExecutedThrow) || (!g_ExceptionInMaster && !g_NonMasterExecutedThrow) || !throwException;\n            int ib0_cnt = tbb::flow::copy_body<InputBodyType0>(input0).count_value();\n            int ib1_cnt = tbb::flow::copy_body<InputBodyType1>(input1).count_value();\n            int nb_cnt = tbb::flow::copy_body<SinkBodyType>(sink).count_value();\n            if(throwException) {\n                CHECK_MESSAGE( (g.exception_thrown() || okayNoExceptionsCaught), \"Exception not caught by graph\");\n                CHECK_MESSAGE( (g.is_cancelled() || okayNoExceptionsCaught), \"Cancellation not signalled in graph\");\n                CHECK_MESSAGE( (ib0_cnt <= g_NumItems && ib1_cnt <= g_NumItems), \"Too many items sent by inputs\");\n                CHECK_MESSAGE( (nb_cnt <= ((ib0_cnt < ib1_cnt) ? ib0_cnt : ib1_cnt)), \"Too many items received by sink nodes\");\n            }\n            else {\n                CHECK_MESSAGE( (!g.exception_thrown()), \"Exception flag in flow::graph set but no throw occurred\");\n                CHECK_MESSAGE( (!g.is_cancelled()), \"canceled flag set but no throw occurred\");\n                if(ib0_cnt != g_NumItems) {\n                //     INFO(\"throwException == %s\\n\" << (throwException ? \"true\" : \"false\"));\n                //     INFO(\"iter == \" << iter << \"\\n\");\n                //     INFO(\"ib0_cnt == \" << ib0_cnt << \"\\n\");\n                //     INFO(\"g_NumItems == \" << g_NumItems << \"\\n\");\n                }\n                CHECK_MESSAGE( (ib0_cnt == g_NumItems), \"Missing invocations of input_node0\");  // this one\n                CHECK_MESSAGE( (ib1_cnt == g_NumItems), \"Missing invocations of input_node1\");\n                CHECK_MESSAGE( (nb_cnt == g_NumItems), \"Missing items in absorbers\");\n            }\n            if(iter == 0) {\n                remove_edge(node_to_test, sink);\n                tbb::flow::input_port<0>(node_to_test).try_put(ItemType0(g_NumItems + 1));\n                tbb::flow::input_port<1>(node_to_test).try_put(ItemType1(g_NumItems + 2));\n                g.wait_for_all();\n                g.reset();\n                input0_count = input1_count = sink_count = 0;\n                make_edge(node_to_test, sink);\n                g.wait_for_all();\n            }\n            else {\n                g.wait_for_all();\n                g.reset();\n                input0_count = input1_count = sink_count = 0;\n            }\n            CHECK_MESSAGE( (0 == tbb::flow::copy_body<InputBodyType0>(input0).count_value()),\"Reset input failed\");\n            CHECK_MESSAGE( (0 == tbb::flow::copy_body<InputBodyType1>(input1).count_value()),\"Reset input failed\");\n            nb_cnt = tbb::flow::copy_body<SinkBodyType>(sink).count_value();\n            CHECK_MESSAGE( (0 == tbb::flow::copy_body<SinkBodyType>(sink).count_value()),\"Reset sink failed\");\n        }\n\n#if USE_TASK_SCHEDULER_OBSERVER\n        o.observe(false);\n#endif\n    }\n};  // run_one_join_node_test\n\ntemplate<\n    class OutputTuple,\n    class InputType0,\n    class InputBodyType0,\n    class InputType1,\n    class InputBodyType1,\n    class TestJoinType,\n    class SinkType,\n    class SinkBodyType\n    >\nstruct run_one_join_node_test<\n        tbb::flow::tag_matching,\n        OutputTuple,\n        InputType0,\n        InputBodyType0,\n        InputType1,\n        InputBodyType1,\n        TestJoinType,\n        SinkType,\n        SinkBodyType\n    > {\n    run_one_join_node_test() {}\n    static void execute_test(bool throwException,bool flog) {\n        typedef typename std::tuple_element<0,OutputTuple>::type ItemType0;\n        typedef typename std::tuple_element<1,OutputTuple>::type ItemType1;\n\n        tbb::flow::graph g;\n\n        std::atomic<int>input0_count;\n        std::atomic<int>input1_count;\n        std::atomic<int>sink_count;\n        input0_count = input1_count = sink_count = 0;\n#if USE_TASK_SCHEDULER_OBSERVER\n        eh_test_observer o;\n        o.observe(true);\n#endif\n        g_Master = std::this_thread::get_id();\n        InputType0 input0(g, InputBodyType0(input0_count, 2));\n        InputType1 input1(g, InputBodyType1(input1_count, 3));\n        TestJoinType node_to_test(g, tag_func<ItemType0>(ItemType0(2)), tag_func<ItemType1>(ItemType1(3)));\n        SinkType sink(g,tbb::flow::unlimited,SinkBodyType(sink_count));\n        make_edge(input0,tbb::flow::input_port<0>(node_to_test));\n        make_edge(input1,tbb::flow::input_port<1>(node_to_test));\n        make_edge(node_to_test, sink);\n        for(int iter = 0; iter < 2; ++iter) {\n            ResetGlobals(throwException,flog);\n            if(throwException) {\n                TRY();\n                    input0.activate();\n                    input1.activate();\n                    g.wait_for_all();\n                CATCH_AND_ASSERT();\n            }\n            else {\n                TRY();\n                    input0.activate();\n                    input1.activate();\n                    g.wait_for_all();\n                CATCH_AND_FAIL();\n            }\n            bool okayNoExceptionsCaught = (g_ExceptionInMaster && !g_MasterExecutedThrow) || (!g_ExceptionInMaster && !g_NonMasterExecutedThrow) || !throwException;\n            int ib0_cnt = tbb::flow::copy_body<InputBodyType0>(input0).count_value();\n            int ib1_cnt = tbb::flow::copy_body<InputBodyType1>(input1).count_value();\n            int nb_cnt = tbb::flow::copy_body<SinkBodyType>(sink).count_value();\n            if(throwException) {\n                CHECK_MESSAGE( (g.exception_thrown() || okayNoExceptionsCaught), \"Exception not caught by graph\");\n                CHECK_MESSAGE( (g.is_cancelled() || okayNoExceptionsCaught), \"Cancellation not signalled in graph\");\n                CHECK_MESSAGE( (ib0_cnt <= g_NumItems && ib1_cnt <= g_NumItems), \"Too many items sent by inputs\");\n                CHECK_MESSAGE( (nb_cnt <= ((ib0_cnt < ib1_cnt) ? ib0_cnt : ib1_cnt)), \"Too many items received by sink nodes\");\n            }\n            else {\n                CHECK_MESSAGE( (!g.exception_thrown()), \"Exception flag in flow::graph set but no throw occurred\");\n                CHECK_MESSAGE( (!g.is_cancelled()), \"canceled flag set but no throw occurred\");\n                CHECK_MESSAGE( (ib0_cnt == g_NumItems), \"Missing invocations of input_node0\");\n                CHECK_MESSAGE( (ib1_cnt == g_NumItems), \"Missing invocations of input_node1\");\n                CHECK_MESSAGE( (nb_cnt == g_NumItems), \"Missing items in absorbers\");\n            }\n            if(iter == 0) {\n                remove_edge(node_to_test, sink);\n                tbb::flow::input_port<0>(node_to_test).try_put(ItemType0(g_NumItems + 4));\n                tbb::flow::input_port<1>(node_to_test).try_put(ItemType1(g_NumItems + 2));\n                g.wait_for_all();   // have to wait for the graph to stop again....\n                g.reset();  // resets the body of the input_nodes, test_node and the absorb_nodes.\n                input0_count = input1_count = sink_count = 0;\n                make_edge(node_to_test, sink);\n                g.wait_for_all();   // have to wait for the graph to stop again....\n            }\n            else {\n                g.wait_for_all();\n                g.reset();\n                input0_count = input1_count = sink_count = 0;\n            }\n            CHECK_MESSAGE( (0 == tbb::flow::copy_body<InputBodyType0>(input0).count_value()),\"Reset input failed\");\n            CHECK_MESSAGE( (0 == tbb::flow::copy_body<InputBodyType1>(input1).count_value()),\"Reset input failed\");\n            nb_cnt = tbb::flow::copy_body<SinkBodyType>(sink).count_value();\n            CHECK_MESSAGE( (0 == tbb::flow::copy_body<SinkBodyType>(sink).count_value()),\"Reset sink failed\");\n        }\n\n#if USE_TASK_SCHEDULER_OBSERVER\n        o.observe(false);\n#endif\n    }\n};  // run_one_join_node_test<tag_matching>\n\ntemplate<class JP, class OutputTuple,\n             TestNodeTypeEnum InputThrowType,\n             TestNodeTypeEnum SinkThrowType>\nvoid run_join_node_test() {\n    typedef typename std::tuple_element<0,OutputTuple>::type ItemType0;\n    typedef typename std::tuple_element<1,OutputTuple>::type ItemType1;\n    typedef test_input_body<ItemType0,InputThrowType> InputBodyType0;\n    typedef test_input_body<ItemType1,InputThrowType> InputBodyType1;\n    typedef absorber_body<OutputTuple,tbb::flow::continue_msg,SinkThrowType,unlimited_type> SinkBodyType;\n\n    typedef typename tbb::flow::input_node<ItemType0> InputType0;\n    typedef typename tbb::flow::input_node<ItemType1> InputType1;\n    typedef typename tbb::flow::join_node<OutputTuple,JP> TestJoinType;\n    typedef typename tbb::flow::function_node<OutputTuple,tbb::flow::continue_msg> SinkType;\n\n    for(int i = 0; i < 4; ++i) {\n        if(2 == i) continue;\n        bool throwException = (i & 0x1) != 0;\n        bool doFlog = (i & 0x2) != 0;\n        run_one_join_node_test<\n             JP,\n             OutputTuple,\n             InputType0,\n             InputBodyType0,\n             InputType1,\n             InputBodyType1,\n             TestJoinType,\n             SinkType,\n             SinkBodyType>::execute_test(throwException,doFlog);\n    }\n}\n\ntemplate<class JP>\nvoid test_join_node() {\n    INFO(\"Testing join_node<\" << graph_policy_name<JP>::name() << \">\\n\");\n    // only doing two-input joins\n    g_Wakeup_Msg = \"join(is,non): Missed wakeup or machine is overloaded?\";\n    run_join_node_test<JP, std::tuple<int,int>,  isThrowing, nonThrowing>();\n    CheckType<int>::check_type_counter = 0;\n    g_Wakeup_Msg = \"join(non,is): Missed wakeup or machine is overloaded?\";\n    run_join_node_test<JP, std::tuple<CheckType<int>,int>, nonThrowing, isThrowing>();\n    CHECK_MESSAGE( (!CheckType<int>::check_type_counter), \"Dropped items in test\");\n    g_Wakeup_Msg = \"join(is,is): Missed wakeup or machine is overloaded?\";\n    run_join_node_test<JP, std::tuple<int,int>,  isThrowing, isThrowing>();\n    g_Wakeup_Msg = g_Orig_Wakeup_Msg;\n}\n\n// ------------------- limiter_node -------------\n\ntemplate<\n    class BufferItemType,       //\n    class InputNodeType,\n    class InputNodeBodyType,\n    class TestNodeType,\n    class SinkNodeType,\n    class SinkNodeBodyType >\nvoid run_one_limiter_node_test(bool throwException,bool flog) {\n    tbb::flow::graph g;\n\n    std::atomic<int> input_count;\n    std::atomic<int> sink_count;\n    input_count = sink_count = 0;\n#if USE_TASK_SCHEDULER_OBSERVER\n    eh_test_observer o;\n    o.observe(true);\n#endif\n    g_Master = std::this_thread::get_id();\n    InputNodeType input(g, InputNodeBodyType(input_count));\n    TestNodeType node_to_test(g,g_NumThreads + 1);\n    SinkNodeType sink(g,tbb::flow::unlimited,SinkNodeBodyType(sink_count));\n    make_edge(input,node_to_test);\n    make_edge(node_to_test, sink);\n    for(int iter = 0; iter < 2; ++iter) {\n        ResetGlobals(throwException,flog);\n        if(throwException) {\n            TRY();\n                input.activate();\n                g.wait_for_all();\n            CATCH_AND_ASSERT();\n        }\n        else {\n            TRY();\n                input.activate();\n                g.wait_for_all();\n            CATCH_AND_FAIL();\n        }\n        bool okayNoExceptionsCaught = (g_ExceptionInMaster && !g_MasterExecutedThrow) || (!g_ExceptionInMaster && !g_NonMasterExecutedThrow) || !throwException;\n        int ib_cnt = tbb::flow::copy_body<InputNodeBodyType>(input).count_value();\n        int nb_cnt = tbb::flow::copy_body<SinkNodeBodyType>(sink).count_value();\n        if(throwException) {\n            CHECK_MESSAGE( (g.exception_thrown() || okayNoExceptionsCaught), \"Exception not caught by graph\");\n            CHECK_MESSAGE( (g.is_cancelled() || okayNoExceptionsCaught), \"Cancellation not signalled in graph\");\n            CHECK_MESSAGE( (ib_cnt <= g_NumItems), \"Too many items sent by inputs\");\n            CHECK_MESSAGE( (nb_cnt <= ib_cnt), \"Too many items received by sink nodes\");\n        }\n        else {\n            CHECK_MESSAGE( (!g.exception_thrown()), \"Exception flag in flow::graph set but no throw occurred\");\n            CHECK_MESSAGE( (!g.is_cancelled()), \"canceled flag set but no throw occurred\");\n            // we stop after limiter's limit, which is g_NumThreads + 1.  The input_node\n            // is invoked one extra time, filling its buffer, so its limit is g_NumThreads + 2.\n            CHECK_MESSAGE( (ib_cnt == g_NumThreads + 2), \"Missing invocations of input_node\");\n            CHECK_MESSAGE( (nb_cnt == g_NumThreads + 1), \"Missing items in absorbers\");\n        }\n        if(iter == 0) {\n            remove_edge(node_to_test, sink);\n            node_to_test.try_put(BufferItemType());\n            node_to_test.try_put(BufferItemType());\n            g.wait_for_all();\n            g.reset();\n            input_count = sink_count = 0;\n            BufferItemType tmp;\n            CHECK_MESSAGE( (!node_to_test.try_get(tmp)), \"node not empty\");\n            make_edge(node_to_test, sink);\n            g.wait_for_all();\n        }\n        else {\n            g.reset();\n            input_count = sink_count = 0;\n        }\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<InputNodeBodyType>(input).count_value()),\"Reset input failed\");\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<SinkNodeBodyType>(sink).count_value()),\"Reset sink failed\");\n    }\n\n#if USE_TASK_SCHEDULER_OBSERVER\n    o.observe(false);\n#endif\n}\n\ntemplate<class BufferItemType,\n         TestNodeTypeEnum InputThrowType,\n         TestNodeTypeEnum SinkThrowType>\nvoid run_limiter_node_test() {\n    typedef test_input_body<BufferItemType,InputThrowType> InputBodyType;\n    typedef absorber_body<BufferItemType,tbb::flow::continue_msg,SinkThrowType,unlimited_type> SinkBodyType;\n\n    typedef tbb::flow::input_node<BufferItemType> InputType;\n    typedef tbb::flow::limiter_node<BufferItemType>  LmtType;\n    typedef tbb::flow::function_node<BufferItemType,tbb::flow::continue_msg> SnkType;\n\n    for(int i = 0; i < 4; ++i) {\n        if(i == 2) continue;  // no need to test flog w/o throws\n        bool throwException = (i & 0x1) != 0;\n        bool doFlog = (i & 0x2) != 0;\n        run_one_limiter_node_test<\n            /* class BufferItemType*/     BufferItemType,\n            /*class InputNodeType*/       InputType,\n            /*class InputNodeBodyType*/   InputBodyType,\n            /*class TestNodeType*/        LmtType,\n            /*class SinkNodeType*/        SnkType,\n            /*class SinkNodeBodyType*/    SinkBodyType\n            >(throwException, doFlog);\n    }\n}\n\nvoid test_limiter_node() {\n    INFO(\"Testing limiter_node\\n\");\n    g_Wakeup_Msg = \"limiter_node(is,non): Missed wakeup or machine is overloaded?\";\n    run_limiter_node_test<int,isThrowing,nonThrowing>();\n    g_Wakeup_Msg = \"limiter_node(non,is): Missed wakeup or machine is overloaded?\";\n    run_limiter_node_test<int,nonThrowing,isThrowing>();\n    g_Wakeup_Msg = \"limiter_node(is,is): Missed wakeup or machine is overloaded?\";\n    run_limiter_node_test<int,isThrowing,isThrowing>();\n    g_Wakeup_Msg = g_Orig_Wakeup_Msg;\n}\n\n// -------- split_node --------------------\n\ntemplate<\n    class InputTuple,\n    class InputType,\n    class InputBodyType,\n    class TestSplitType,\n    class SinkType0,\n    class SinkBodyType0,\n    class SinkType1,\n    class SinkBodyType1>\nvoid run_one_split_node_test(bool throwException, bool flog) {\n\n    tbb::flow::graph g;\n\n    std::atomic<int> input_count;\n    std::atomic<int> sink0_count;\n    std::atomic<int> sink1_count;\n    input_count = sink0_count = sink1_count = 0;\n#if USE_TASK_SCHEDULER_OBSERVER\n    eh_test_observer o;\n    o.observe(true);\n#endif\n\n    g_Master = std::this_thread::get_id();\n    InputType input(g, InputBodyType(input_count));\n    TestSplitType node_to_test(g);\n    SinkType0 sink0(g,tbb::flow::unlimited,SinkBodyType0(sink0_count));\n    SinkType1 sink1(g,tbb::flow::unlimited,SinkBodyType1(sink1_count));\n    make_edge(input, node_to_test);\n    make_edge(tbb::flow::output_port<0>(node_to_test), sink0);\n    make_edge(tbb::flow::output_port<1>(node_to_test), sink1);\n\n    for(int iter = 0; iter < 2; ++iter) {  // run, reset, run again\n        ResetGlobals(throwException,flog);\n        if(throwException) {\n            TRY();\n                input.activate();\n                g.wait_for_all();\n            CATCH_AND_ASSERT();\n        }\n        else {\n            TRY();\n                input.activate();\n                g.wait_for_all();\n            CATCH_AND_FAIL();\n        }\n        bool okayNoExceptionsCaught = (g_ExceptionInMaster && !g_MasterExecutedThrow) || (!g_ExceptionInMaster && !g_NonMasterExecutedThrow) || !throwException;\n        int ib_cnt = tbb::flow::copy_body<InputBodyType>(input).count_value();\n        int nb0_cnt = tbb::flow::copy_body<SinkBodyType0>(sink0).count_value();\n        int nb1_cnt = tbb::flow::copy_body<SinkBodyType1>(sink1).count_value();\n        if(throwException) {\n            CHECK_MESSAGE( (g.exception_thrown() || okayNoExceptionsCaught), \"Exception not caught by graph\");\n            CHECK_MESSAGE( (g.is_cancelled() || okayNoExceptionsCaught), \"Cancellation not signalled in graph\");\n            CHECK_MESSAGE( (ib_cnt <= 2*g_NumItems), \"Too many items sent by input\");\n            CHECK_MESSAGE( (nb0_cnt + nb1_cnt <= ib_cnt*2), \"Too many items received by sink nodes\");\n        }\n        else {\n            CHECK_MESSAGE( (!g.exception_thrown()), \"Exception flag in flow::graph set but no throw occurred\");\n            CHECK_MESSAGE( (!g.is_cancelled()), \"canceled flag set but no throw occurred\");\n            CHECK_MESSAGE( (ib_cnt == g_NumItems), \"Missing invocations of input_nodes\");\n            CHECK_MESSAGE( (nb0_cnt == g_NumItems && nb1_cnt == g_NumItems), \"Missing items in absorbers\");\n        }\n        g.reset();  // resets the body of the input_nodes and the absorb_nodes.\n        input_count = sink0_count = sink1_count = 0;\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<InputBodyType>(input).count_value()),\"Reset input failed\");\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<SinkBodyType0>(sink0).count_value()),\"Reset sink 0 failed\");\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<SinkBodyType1>(sink1).count_value()),\"Reset sink 1 failed\");\n    }\n#if USE_TASK_SCHEDULER_OBSERVER\n    o.observe(false);\n#endif\n}\n\ntemplate<class InputTuple,\n             TestNodeTypeEnum InputThrowType,\n             TestNodeTypeEnum SinkThrowType>\nvoid run_split_node_test() {\n    typedef typename std::tuple_element<0,InputTuple>::type ItemType0;\n    typedef typename std::tuple_element<1,InputTuple>::type ItemType1;\n    typedef tuple_test_input_body<InputTuple,InputThrowType> InputBodyType;\n    typedef absorber_body<ItemType0,tbb::flow::continue_msg,SinkThrowType,unlimited_type> SinkBodyType0;\n    typedef absorber_body<ItemType1,tbb::flow::continue_msg,SinkThrowType,unlimited_type> SinkBodyType1;\n\n    typedef typename tbb::flow::input_node<InputTuple> InputType;\n    typedef typename tbb::flow::split_node<InputTuple> TestSplitType;\n    typedef typename tbb::flow::function_node<ItemType0,tbb::flow::continue_msg> SinkType0;\n    typedef typename tbb::flow::function_node<ItemType1,tbb::flow::continue_msg> SinkType1;\n\n    for(int i = 0; i < 4; ++i) {\n        if(2 == i) continue;\n        bool throwException = (i & 0x1) != 0;\n        bool doFlog = (i & 0x2) != 0;\n        run_one_split_node_test<\n            InputTuple,\n            InputType,\n            InputBodyType,\n            TestSplitType,\n            SinkType0,\n            SinkBodyType0,\n            SinkType1,\n            SinkBodyType1>\n                (throwException,doFlog);\n    }\n}\n\nvoid test_split_node() {\n    INFO(\"Testing split_node\\n\");\n    g_Wakeup_Msg = \"split_node(is,non): Missed wakeup or machine is overloaded?\";\n    run_split_node_test<std::tuple<int,int>, isThrowing, nonThrowing>();\n    g_Wakeup_Msg = \"split_node(non,is): Missed wakeup or machine is overloaded?\";\n    run_split_node_test<std::tuple<int,int>, nonThrowing, isThrowing>();\n    g_Wakeup_Msg = \"split_node(is,is): Missed wakeup or machine is overloaded?\";\n    run_split_node_test<std::tuple<int,int>, isThrowing,  isThrowing>();\n    g_Wakeup_Msg = g_Orig_Wakeup_Msg;\n}\n\n// --------- indexer_node ----------------------\n\ntemplate < class InputTuple,\n    class InputType0,\n    class InputBodyType0,\n    class InputType1,\n    class InputBodyType1,\n    class TestNodeType,\n    class SinkType,\n    class SinkBodyType>\nvoid run_one_indexer_node_test(bool throwException,bool flog) {\n    typedef typename std::tuple_element<0,InputTuple>::type ItemType0;\n    typedef typename std::tuple_element<1,InputTuple>::type ItemType1;\n\n    tbb::flow::graph g;\n\n    std::atomic<int> input0_count;\n    std::atomic<int> input1_count;\n    std::atomic<int> sink_count;\n    input0_count = input1_count = sink_count = 0;\n#if USE_TASK_SCHEDULER_OBSERVER\n    eh_test_observer o;\n    o.observe(true);\n#endif\n    g_Master = std::this_thread::get_id();\n    InputType0 input0(g, InputBodyType0(input0_count));\n    InputType1 input1(g, InputBodyType1(input1_count));\n    TestNodeType node_to_test(g);\n    SinkType sink(g,tbb::flow::unlimited,SinkBodyType(sink_count));\n    make_edge(input0,tbb::flow::input_port<0>(node_to_test));\n    make_edge(input1,tbb::flow::input_port<1>(node_to_test));\n    make_edge(node_to_test, sink);\n    for(int iter = 0; iter < 2; ++iter) {\n        ResetGlobals(throwException,flog);\n        if(throwException) {\n            TRY();\n                input0.activate();\n                input1.activate();\n                g.wait_for_all();\n            CATCH_AND_ASSERT();\n        }\n        else {\n            TRY();\n                input0.activate();\n                input1.activate();\n                g.wait_for_all();\n            CATCH_AND_FAIL();\n        }\n        bool okayNoExceptionsCaught = (g_ExceptionInMaster && !g_MasterExecutedThrow) || (!g_ExceptionInMaster && !g_NonMasterExecutedThrow) || !throwException;\n        int ib0_cnt = tbb::flow::copy_body<InputBodyType0>(input0).count_value();\n        int ib1_cnt = tbb::flow::copy_body<InputBodyType1>(input1).count_value();\n        int nb_cnt = tbb::flow::copy_body<SinkBodyType>(sink).count_value();\n        if(throwException) {\n            CHECK_MESSAGE( (g.exception_thrown() || okayNoExceptionsCaught), \"Exception not caught by graph\");\n            CHECK_MESSAGE( (g.is_cancelled() || okayNoExceptionsCaught), \"Cancellation not signalled in graph\");\n            CHECK_MESSAGE( (ib0_cnt <= g_NumItems && ib1_cnt <= g_NumItems), \"Too many items sent by inputs\");\n            CHECK_MESSAGE( (nb_cnt <= ib0_cnt + ib1_cnt), \"Too many items received by sink nodes\");\n        }\n        else {\n            CHECK_MESSAGE( (!g.exception_thrown()), \"Exception flag in flow::graph set but no throw occurred\");\n            CHECK_MESSAGE( (!g.is_cancelled()), \"canceled flag set but no throw occurred\");\n            CHECK_MESSAGE( (ib0_cnt == g_NumItems), \"Missing invocations of input_node0\");\n            CHECK_MESSAGE( (ib1_cnt == g_NumItems), \"Missing invocations of input_node1\");\n            CHECK_MESSAGE( (nb_cnt == 2*g_NumItems), \"Missing items in absorbers\");\n        }\n        if(iter == 0) {\n            remove_edge(node_to_test, sink);\n            tbb::flow::input_port<0>(node_to_test).try_put(ItemType0(g_NumItems + 4));\n            tbb::flow::input_port<1>(node_to_test).try_put(ItemType1(g_NumItems + 2));\n            g.wait_for_all();\n            g.reset();\n            input0_count = input1_count = sink_count = 0;\n            make_edge(node_to_test, sink);\n            g.wait_for_all();\n        }\n        else {\n            g.wait_for_all();\n            g.reset();\n            input0_count = input1_count = sink_count = 0;\n        }\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<InputBodyType0>(input0).count_value()),\"Reset input failed\");\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<InputBodyType1>(input1).count_value()),\"Reset input failed\");\n        nb_cnt = tbb::flow::copy_body<SinkBodyType>(sink).count_value();\n        CHECK_MESSAGE( (0 == tbb::flow::copy_body<SinkBodyType>(sink).count_value()),\"Reset sink failed\");\n    }\n\n#if USE_TASK_SCHEDULER_OBSERVER\n    o.observe(false);\n#endif\n}\n\ntemplate<class InputTuple,\n    TestNodeTypeEnum InputThrowType,\n    TestNodeTypeEnum SinkThrowType>\nvoid run_indexer_node_test() {\n    typedef typename std::tuple_element<0,InputTuple>::type ItemType0;\n    typedef typename std::tuple_element<1,InputTuple>::type ItemType1;\n    typedef test_input_body<ItemType0,InputThrowType> InputBodyType0;\n    typedef test_input_body<ItemType1,InputThrowType> InputBodyType1;\n    typedef typename tbb::flow::indexer_node<ItemType0, ItemType1> TestNodeType;\n    typedef absorber_body<typename TestNodeType::output_type,tbb::flow::continue_msg,SinkThrowType,unlimited_type> SinkBodyType;\n\n    typedef typename tbb::flow::input_node<ItemType0> InputType0;\n    typedef typename tbb::flow::input_node<ItemType1> InputType1;\n    typedef typename tbb::flow::function_node<typename TestNodeType::output_type,tbb::flow::continue_msg> SinkType;\n\n    for(int i = 0; i < 4; ++i) {\n        if(2 == i) continue;\n        bool throwException = (i & 0x1) != 0;\n        bool doFlog = (i & 0x2) != 0;\n        run_one_indexer_node_test<\n             InputTuple,\n             InputType0,\n             InputBodyType0,\n             InputType1,\n             InputBodyType1,\n             TestNodeType,\n             SinkType,\n             SinkBodyType>(throwException,doFlog);\n    }\n}\n\nvoid test_indexer_node() {\n    INFO(\"Testing indexer_node\\n\");\n    g_Wakeup_Msg = \"indexer_node(is,non): Missed wakeup or machine is overloaded?\";\n    run_indexer_node_test<std::tuple<int,int>, isThrowing, nonThrowing>();\n    g_Wakeup_Msg = \"indexer_node(non,is): Missed wakeup or machine is overloaded?\";\n    run_indexer_node_test<std::tuple<int,int>, nonThrowing, isThrowing>();\n    g_Wakeup_Msg = \"indexer_node(is,is): Missed wakeup or machine is overloaded?\";\n    run_indexer_node_test<std::tuple<int,int>, isThrowing,  isThrowing>();\n    g_Wakeup_Msg = g_Orig_Wakeup_Msg;\n}\n\n///////////////////////////////////////////////\n// whole-graph exception test\n\nclass Foo {\nprivate:\n    // std::vector<int>& m_vec;\n    std::vector<int>* m_vec;\npublic:\n    Foo(std::vector<int>& vec) : m_vec(&vec) { }\n    void operator() (tbb::flow::continue_msg) const {\n        ++nExceptions;\n        (void)m_vec->at(m_vec->size()); // Will throw out_of_range exception\n        CHECK_MESSAGE( (false), \"Exception not thrown by invalid access\");\n    }\n};\n\n// test from user ahelwer: https://community.intel.com/t5/Intel-oneAPI-Threading-Building/Exception-in-flow-graph-results-in-graph-wait-for-all-hanging/td-p/789352\n// exception thrown in graph node, not caught in wait_for_all()\nvoid\ntest_flow_graph_exception0() {\n    // Initializes body\n    std::vector<int> vec;\n    vec.push_back(0);\n    Foo f(vec);\n    nExceptions = 0;\n\n    // Construct graph and nodes\n    tbb::flow::graph g;\n    tbb::flow::broadcast_node<tbb::flow::continue_msg> start(g);\n    tbb::flow::continue_node<tbb::flow::continue_msg> fooNode(g, f);\n\n    // Construct edge\n    tbb::flow::make_edge(start, fooNode);\n\n    // Execute graph\n    CHECK_MESSAGE( (!g.exception_thrown()), \"exception_thrown flag already set\");\n    CHECK_MESSAGE( (!g.is_cancelled()), \"canceled flag already set\");\n    try {\n        start.try_put(tbb::flow::continue_msg());\n        g.wait_for_all();\n        CHECK_MESSAGE( (false), \"Exception not thrown\");\n    }\n    catch(std::out_of_range& ex) {\n        INFO(\"Exception: \" << ex.what() << \"(expected)\\n\");\n    }\n    catch(...) {\n        INFO(\"Unknown exception caught (expected)\\n\");\n    }\n    CHECK_MESSAGE( (nExceptions > 0), \"Exception caught, but no body signaled exception being thrown\");\n    nExceptions = 0;\n    CHECK_MESSAGE( (g.exception_thrown()), \"Exception not intercepted\");\n    // if exception set, cancellation also set.\n    CHECK_MESSAGE( (g.is_cancelled()), \"Exception cancellation not signaled\");\n    // in case we got an exception\n    try {\n        g.wait_for_all();  // context still signalled canceled, my_exception still set.\n    }\n    catch(...) {\n        CHECK_MESSAGE( (false), \"Second exception thrown but no task executing\");\n    }\n    CHECK_MESSAGE( (nExceptions == 0), \"body signaled exception being thrown, but no body executed\");\n    CHECK_MESSAGE( (!g.exception_thrown()), \"exception_thrown flag not reset\");\n    CHECK_MESSAGE( (!g.is_cancelled()), \"canceled flag not reset\");\n}\n\nvoid TestOneThreadNum(int nThread) {\n    INFO(\"Testing \" << nThread << \"%d threads\\n\");\n    g_NumItems = ((nThread > NUM_ITEMS) ? nThread *2 : NUM_ITEMS);\n    g_NumThreads = nThread;\n    tbb::task_arena arena(nThread);\n\tarena.execute(\n        [&]() {\n            // whole-graph exception catch and rethrow test\n            test_flow_graph_exception0();\n            for(int i = 0; i < 4; ++i) {\n                g_ExceptionInMaster = (i & 1) != 0;\n                g_SolitaryException = (i & 2) != 0;\n                INFO(\"g_ExceptionInMaster == \" << (g_ExceptionInMaster ? \"T\":\"F\")\n                     << \", g_SolitaryException == \" << (g_SolitaryException ? \"T\":\"F\") << \"\\n\");\n                test_input_node();\n                test_function_node();\n                test_continue_node();  // also test broadcast_node\n                test_multifunction_node();\n                // single- and multi-item buffering nodes\n                test_buffer_queue_and_overwrite_node();\n                test_sequencer_node();\n                test_priority_queue_node();\n\n                // join_nodes\n                test_join_node<tbb::flow::queueing>();\n                test_join_node<tbb::flow::reserving>();\n                test_join_node<tbb::flow::tag_matching>();\n\n                test_limiter_node();\n                test_split_node();\n                // graph for write_once_node will be complicated by the fact the node will\n                // not do try_puts after it has been set.  To get parallelism of N we have\n                // to attach N successor nodes to the write_once (or play some similar game).\n                // test_write_once_node();\n                test_indexer_node();\n            }\n        }\n    );\n}\n\n#if !EMSCRIPTEN\n//! Test exceptions with parallelism\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Testing several threads\"){\n    // reverse order of tests\n    for(unsigned int nThread=utils::MaxThread; nThread >= utils::MinThread; --nThread) {\n        tbb::global_control thread_limit(tbb::global_control::max_allowed_parallelism, nThread);\n        TestOneThreadNum(nThread);\n    }\n}\n#endif\n#endif // TBB_USE_EXCEPTIONS\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_eh_thread.cpp",
    "content": "/*\n    Copyright (c) 2020-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/config.h\"\n\n#include \"tbb/parallel_for.h\"\n#include \"tbb/global_control.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_concurrency_limit.h\"\n\n#include <atomic>\n#include <condition_variable>\n#include <thread>\n#include <vector>\n\n//! \\file test_eh_thread.cpp\n//! \\brief Test for [internal] functionality\n\n// On Windows there is no real thread number limit beside available memory.\n// Therefore, the test for thread limit is unreasonable.\n// TODO: enable limitThreads with sanitizer under docker\n#if TBB_USE_EXCEPTIONS && !_WIN32 && !__ANDROID__\n\n#include <limits.h>\n#include <sys/types.h>\n#include <sys/time.h>\n#include <sys/resource.h>\n\nvoid limitThreads(size_t limit)\n{\n    rlimit rlim;\n\n    int ret = getrlimit(RLIMIT_NPROC, &rlim);\n    CHECK_MESSAGE(0 == ret, \"getrlimit has returned an error\");\n\n    rlim.rlim_cur = (rlim.rlim_max == (rlim_t)RLIM_INFINITY) ? limit : utils::min(limit, rlim.rlim_max);\n\n    ret = setrlimit(RLIMIT_NPROC, &rlim);\n    CHECK_MESSAGE(0 == ret, \"setrlimit has returned an error\");\n}\n\nsize_t getThreadLimit() {\n    rlimit rlim;\n\n    int ret = getrlimit(RLIMIT_NPROC, &rlim);\n    CHECK_MESSAGE(0 == ret, \"getrlimit has returned an error\");\n    return rlim.rlim_cur;\n}\n\nstatic void* thread_routine(void*)\n{\n    return nullptr;\n}\n\nclass Thread {\n    pthread_t mHandle{};\n    bool mValid{};\npublic:\n    Thread() {\n        mValid = false;\n        pthread_attr_t attr;\n        // Limit the stack size not to consume all virtual memory on 32 bit platforms.\n        std::size_t stacksize = utils::max(std::size_t(128*1024), std::size_t(PTHREAD_STACK_MIN));\n        if (pthread_attr_init(&attr) == 0 && pthread_attr_setstacksize(&attr, stacksize) == 0) {\n            mValid = pthread_create(&mHandle, &attr, thread_routine, /* arg = */ nullptr) == 0;\n        }\n    }\n    bool isValid() const { return mValid; }\n    void join() {\n        pthread_join(mHandle, nullptr);\n    }\n};\n\n//! Test for exception when too many threads\n//! \\brief \\ref resource_usage\nTEST_CASE(\"Too many threads\") {\n    if (utils::get_platform_max_threads() < 2) {\n        // The test expects that the scheduler will try to create at least one thread.\n        return;\n    }\n\n    // Some systems set really big limit (e.g. >45K) for the number of processes/threads\n    limitThreads(1);\n    if (getThreadLimit() == 1) {\n        for (int attempt = 0; attempt < 5; ++attempt) {\n            Thread thread;\n            if (thread.isValid()) {\n                WARN_MESSAGE(false, \"We were able to create a thread. setrlimit seems having no effect\");\n                thread.join();\n                return;\n            }\n        }\n        bool g_exception_caught = false;\n        try {\n            // Initialize the library to create worker threads\n            tbb::parallel_for(0, 2, [](int) {});\n        } catch (const std::exception & e) {\n            g_exception_caught = true;\n            // Do not CHECK to avoid memory allocation (we can be out of memory)\n            if (e.what()== nullptr) {\n                FAIL(\"Exception does not have description\");\n            }\n        }\n        // Do not CHECK to avoid memory allocation (we can be out of memory)\n        if (!g_exception_caught) {\n            FAIL(\"No exception was thrown on library initialization\");\n        }\n    } else {\n        WARN_MESSAGE(false, \"setrlimit seems having no effect\");\n    }\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_enumerable_thread_specific.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_report.h\"\n#include \"common/checktype.h\"\n\n#include \"oneapi/tbb/detail/_utils.h\"\n\n#include \"tbb/enumerable_thread_specific.h\"\n#include \"tbb/parallel_for.h\"\n#include \"tbb/blocked_range.h\"\n#include \"tbb/tbb_allocator.h\"\n#include \"tbb/global_control.h\"\n#include \"tbb/cache_aligned_allocator.h\"\n\n#include <cstring>\n#include <cstdio>\n#include <vector>\n#include <deque>\n#include <list>\n#include <map>\n#include <utility>\n#include <atomic>\n\n//! \\file test_enumerable_thread_specific.cpp\n//! \\brief Test for [tls.enumerable_thread_specific] specification\n\n//! Minimum number of threads\nstatic int MinThread = 1;\n\n//! Maximum number of threads\nstatic int MaxThread = 4;\n\nstatic std::atomic<int> construction_counter;\nstatic std::atomic<int> destruction_counter;\n\nconst int VALID_NUMBER_OF_KEYS = 100;\n\n//! A minimal class that occupies N bytes.\n/** Defines default and copy constructor, and allows implicit operator&. Hides operator=. */\ntemplate<size_t N = tbb::detail::max_nfs_size>\nclass minimalN: utils::NoAssign {\nprivate:\n    int my_value;\n    bool is_constructed;\n    char pad[N-sizeof(int) - sizeof(bool)];\npublic:\n    minimalN() : utils::NoAssign(), my_value(0) { ++construction_counter; is_constructed = true; }\n    minimalN( const minimalN&m ) : utils::NoAssign(), my_value(m.my_value) { ++construction_counter; is_constructed = true; }\n    ~minimalN() { ++destruction_counter; REQUIRE(is_constructed); is_constructed = false; }\n    void set_value( const int i ) { REQUIRE(is_constructed); my_value = i; }\n    int value( ) const { REQUIRE(is_constructed); return my_value; }\n};\n\nstatic size_t AlignMask = 0;  // set to cache-line-size - 1\n\ntemplate<typename T>\nT& check_alignment(T& t, const char *aname) {\n    if( !tbb::detail::is_aligned(&t, AlignMask)) {\n        // TBB_REVAMP_TODO: previously was REPORT_ONCE\n        REPORT(\"alignment error with %s allocator (%x)\\n\", aname, (int)size_t(&t) & (AlignMask-1));\n    }\n    return t;\n}\n\ntemplate<typename T>\nconst T& check_alignment(const T& t, const char *aname) {\n    if( !tbb::detail::is_aligned(&t, AlignMask)) {\n        // TBB_REVAMP_TODO: previously was REPORT_ONCE\n        REPORT(\"alignment error with %s allocator (%x)\\n\", aname, (int)size_t(&t) & (AlignMask-1));\n    }\n    return t;\n}\n\n//\n// A helper class that simplifies writing the tests since minimalN does not\n// define = or + operators.\n//\n\nconst size_t line_size = tbb::detail::max_nfs_size;\n\ntypedef tbb::enumerable_thread_specific<minimalN<line_size> > flogged_ets;\n\nclass set_body {\n    flogged_ets *a;\n\npublic:\n    set_body( flogged_ets*_a ) : a(_a) { }\n\n    void operator() ( ) const {\n        for (int i = 0; i < VALID_NUMBER_OF_KEYS; ++i) {\n            check_alignment(a[i].local(), \"default\").set_value(i + 1);\n        }\n    }\n\n};\n\nvoid do_std_threads( int max_threads, flogged_ets a[] ) {\n    std::vector< std::thread * > threads;\n\n    for (int p = 0; p < max_threads; ++p) {\n        threads.push_back( new std::thread ( set_body( a ) ) );\n    }\n\n    for (int p = 0; p < max_threads; ++p) {\n        threads[p]->join();\n    }\n\n    for(int p = 0; p < max_threads; ++p) {\n        delete threads[p];\n    }\n}\n\nvoid flog_key_creation_and_deletion() {\n    const int FLOG_REPETITIONS = 100;\n\n    for (int p = MinThread; p <= MaxThread; ++p) {\n        for (int j = 0; j < FLOG_REPETITIONS; ++j) {\n            construction_counter = 0;\n            destruction_counter = 0;\n            // causes VALID_NUMBER_OF_KEYS exemplar instances to be constructed\n            flogged_ets* a = new flogged_ets[VALID_NUMBER_OF_KEYS];\n            REQUIRE(int(construction_counter) == 0);   // no exemplars or actual locals have been constructed\n            REQUIRE(int(destruction_counter) == 0);    // and none have been destroyed\n            // causes p * VALID_NUMBER_OF_KEYS minimals to be created\n            do_std_threads(p, a);\n            for (int i = 0; i < VALID_NUMBER_OF_KEYS; ++i) {\n                int pcnt = 0;\n                for ( flogged_ets::iterator tli = a[i].begin(); tli != a[i].end(); ++tli ) {\n                    REQUIRE( (*tli).value() == i+1 );\n                    ++pcnt;\n                }\n                REQUIRE( pcnt == p);  // should be one local per thread.\n            }\n            delete[] a;\n        }\n        REQUIRE( int(construction_counter) == (p)*VALID_NUMBER_OF_KEYS );\n        REQUIRE( int(destruction_counter) == (p)*VALID_NUMBER_OF_KEYS );\n\n        construction_counter = 0;\n        destruction_counter = 0;\n\n        // causes VALID_NUMBER_OF_KEYS exemplar instances to be constructed\n        flogged_ets* a = new flogged_ets[VALID_NUMBER_OF_KEYS];\n\n        for (int j = 0; j < FLOG_REPETITIONS; ++j) {\n            // causes p * VALID_NUMBER_OF_KEYS minimals to be created\n            do_std_threads(p, a);\n\n            for (int i = 0; i < VALID_NUMBER_OF_KEYS; ++i) {\n                for ( flogged_ets::iterator tli = a[i].begin(); tli != a[i].end(); ++tli ) {\n                    REQUIRE( (*tli).value() == i+1 );\n                }\n                a[i].clear();\n                REQUIRE( static_cast<int>(a[i].end() - a[i].begin()) == 0 );\n            }\n        }\n        delete[] a;\n        REQUIRE( int(construction_counter) == (FLOG_REPETITIONS*p)*VALID_NUMBER_OF_KEYS );\n        REQUIRE( int(destruction_counter) == (FLOG_REPETITIONS*p)*VALID_NUMBER_OF_KEYS );\n    }\n\n}\n\ntemplate <typename inner_container>\nvoid flog_segmented_interator() {\n\n    bool found_error = false;\n    typedef typename inner_container::value_type T;\n    typedef std::vector< inner_container > nested_vec;\n    inner_container my_inner_container;\n    my_inner_container.clear();\n    nested_vec my_vec;\n\n    // simple nested vector (neither level empty)\n    const int maxval = 10;\n    for(int i=0; i < maxval; i++) {\n        my_vec.push_back(my_inner_container);\n        for(int j = 0; j < maxval; j++) {\n            my_vec.at(i).push_back((T)(maxval * i + j));\n        }\n    }\n\n    tbb::detail::d1::segmented_iterator<nested_vec, T> my_si(my_vec);\n\n    T ii;\n    for(my_si=my_vec.begin(), ii=0; my_si != my_vec.end(); ++my_si, ++ii) {\n        if((*my_si) != ii) {\n            found_error = true;\n        }\n    }\n\n    // outer level empty\n    my_vec.clear();\n    for(my_si=my_vec.begin(); my_si != my_vec.end(); ++my_si) {\n        found_error = true;\n    }\n\n    // inner levels empty\n    my_vec.clear();\n    for(int i =0; i < maxval; ++i) {\n        my_vec.push_back(my_inner_container);\n    }\n    for(my_si = my_vec.begin(); my_si != my_vec.end(); ++my_si) {\n        found_error = true;\n    }\n\n    // every other inner container is empty\n    my_vec.clear();\n    for(int i=0; i < maxval; ++i) {\n        my_vec.push_back(my_inner_container);\n        if(i%2) {\n            for(int j = 0; j < maxval; ++j) {\n                my_vec.at(i).push_back((T)(maxval * (i/2) + j));\n            }\n        }\n    }\n    for(my_si = my_vec.begin(), ii=0; my_si != my_vec.end(); ++my_si, ++ii) {\n        if((*my_si) != ii) {\n            found_error = true;\n        }\n    }\n\n    tbb::detail::d1::segmented_iterator<nested_vec, const T> my_csi(my_vec);\n    for(my_csi=my_vec.begin(), ii=0; my_csi != my_vec.end(); ++my_csi, ++ii) {\n        if((*my_csi) != ii) {\n            found_error = true;\n        }\n    }\n\n    // outer level empty\n    my_vec.clear();\n    for(my_csi=my_vec.begin(); my_csi != my_vec.end(); ++my_csi) {\n        found_error = true;\n    }\n\n    // inner levels empty\n    my_vec.clear();\n    for(int i =0; i < maxval; ++i) {\n        my_vec.push_back(my_inner_container);\n    }\n    for(my_csi = my_vec.begin(); my_csi != my_vec.end(); ++my_csi) {\n        found_error = true;\n    }\n\n    // every other inner container is empty\n    my_vec.clear();\n    for(int i=0; i < maxval; ++i) {\n        my_vec.push_back(my_inner_container);\n        if(i%2) {\n            for(int j = 0; j < maxval; ++j) {\n                my_vec.at(i).push_back((T)(maxval * (i/2) + j));\n            }\n        }\n    }\n    for(my_csi = my_vec.begin(), ii=0; my_csi != my_vec.end(); ++my_csi, ++ii) {\n        if((*my_csi) != ii) {\n            found_error = true;\n        }\n    }\n\n\n    if(found_error) REPORT(\"segmented_iterator failed\\n\");\n}\n\ntemplate <typename Key, typename Val>\nvoid flog_segmented_iterator_map() {\n   typedef typename std::map<Key, Val> my_map;\n   typedef std::vector< my_map > nested_vec;\n   my_map my_inner_container;\n   my_inner_container.clear();\n   nested_vec my_vec;\n   my_vec.clear();\n   bool found_error = false;\n\n   // simple nested vector (neither level empty)\n   const int maxval = 4;\n   for(int i=0; i < maxval; i++) {\n       my_vec.push_back(my_inner_container);\n       for(int j = 0; j < maxval; j++) {\n           my_vec.at(i).insert(std::make_pair<Key,Val>(maxval * i + j, 2*(maxval*i + j)));\n       }\n   }\n\n   tbb::detail::d1::segmented_iterator<nested_vec, std::pair<const Key, Val> > my_si(my_vec);\n   Key ii;\n   for(my_si=my_vec.begin(), ii=0; my_si != my_vec.end(); ++my_si, ++ii) {\n       if(((*my_si).first != ii) || ((*my_si).second != 2*ii)) {\n           found_error = true;\n       }\n   }\n\n   tbb::detail::d1::segmented_iterator<nested_vec, const std::pair<const Key, Val> > my_csi(my_vec);\n   for(my_csi=my_vec.begin(), ii=0; my_csi != my_vec.end(); ++my_csi, ++ii) {\n       if(((*my_csi).first != ii) || ((*my_csi).second != 2*ii)) {\n           found_error = true;\n           // INFO( \"ii=%d, (*my_csi).first=%d, second=%d\\n\",ii, int((*my_csi).first), int((*my_csi).second));\n       }\n   }\n   if(found_error) REPORT(\"segmented_iterator_map failed\\n\");\n}\n\nvoid run_segmented_iterator_tests() {\n   // only the following containers can be used with the segmented iterator.\n   flog_segmented_interator<std::vector< int > >();\n   flog_segmented_interator<std::vector< double > >();\n   flog_segmented_interator<std::deque< int > >();\n   flog_segmented_interator<std::deque< double > >();\n   flog_segmented_interator<std::list< int > >();\n   flog_segmented_interator<std::list< double > >();\n\n   flog_segmented_iterator_map<int, int>();\n   flog_segmented_iterator_map<int, double>();\n}\n\nint align_val(void * const p) {\n    size_t tmp = (size_t)p;\n    int a = 1;\n    while((tmp&0x1) == 0) { a <<=1; tmp >>= 1; }\n    return a;\n}\n\nbool is_between(void* lowp, void *highp, void *testp) {\n    if((size_t)lowp < (size_t)testp && (size_t)testp < (size_t)highp) return true;\n    return (size_t)lowp > (size_t)testp && (size_t)testp > (size_t)highp;\n}\n\ntemplate<class U> struct alignment_of {\n    typedef struct { char t; U    padded; } test_alignment;\n    static const size_t value = sizeof(test_alignment) - sizeof(U);\n};\nusing tbb::detail::d1::ets_element;\ntemplate<typename T, typename OtherType>\nvoid allocate_ets_element_on_stack(const char* /* name */) {\n    typedef T aligning_element_type;\n    const size_t my_align = alignment_of<aligning_element_type>::value;\n    OtherType c1;\n    ets_element<aligning_element_type> my_stack_element;\n    OtherType c2;\n    ets_element<aligning_element_type> my_stack_element2;\n    struct {\n        OtherType cxx;\n        ets_element<aligning_element_type> my_struct_element;\n    } mystruct1;\n    tbb::detail::suppress_unused_warning(c1,c2);\n    REQUIRE_MESSAGE(tbb::detail::is_aligned(my_stack_element.value(), my_align), \"Error in first stack alignment\" );\n    REQUIRE_MESSAGE(tbb::detail::is_aligned(my_stack_element2.value(), my_align), \"Error in second stack alignment\" );\n    REQUIRE_MESSAGE(tbb::detail::is_aligned(mystruct1.my_struct_element.value(), my_align), \"Error in struct element alignment\" );\n}\n\nclass BigType {\npublic:\n    BigType() { /* avoid cl warning C4345 about default initialization of POD types */ }\n    char my_data[12 * 1024 * 1024];\n};\n\ntemplate<template<class> class Allocator>\nvoid TestConstructorWithBigType(const char* allocator_name) {\n    typedef tbb::enumerable_thread_specific<BigType, Allocator<BigType> > CounterBigType;\n    // Test default constructor\n    CounterBigType MyCounters;\n    // Create a local instance.\n    typename CounterBigType::reference my_local = MyCounters.local();\n    my_local.my_data[0] = 'a';\n    // Test copy constructor\n    CounterBigType MyCounters2(MyCounters);\n    REQUIRE(check_alignment(MyCounters2.local(), allocator_name).my_data[0]=='a');\n}\n\nsize_t init_tbb_alloc_mask() {\n    // TODO: use __TBB_alignof(T) to check for local() results instead of using internal knowledges of ets element padding\n    if(tbb::tbb_allocator<int>::allocator_type() == tbb::tbb_allocator<int>::standard) {\n        // scalable allocator is not available.\n        // INFO(\"tbb::tbb_allocator is not available\\n\");\n        return 1;\n    }\n    else {\n        // this value is for large objects, but will be correct for small.\n        return 64; // TBB_REVAMP_TODO: enable as estimatedCacheLineSize when tbbmalloc is available;\n    }\n}\n\nstatic const size_t cache_allocator_mask = tbb::detail::r1::cache_line_size();\nstatic const size_t tbb_allocator_mask = init_tbb_alloc_mask();\n\n//! Test for internal segmented_iterator type, used inside flattened2d class\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Segmented iterator\") {\n    AlignMask = tbb_allocator_mask;\n    run_segmented_iterator_tests();\n}\n\n//! Test ETS keys creation/deletion\n//! \\brief \\ref error_guessing \\ref boundary\nTEST_CASE(\"Key creation and deletion\") {\n    AlignMask = tbb_allocator_mask;\n    flog_key_creation_and_deletion();\n}\n\n//! Test construction with big ETS types\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Constructor with big type\") {\n    AlignMask = cache_allocator_mask;\n    TestConstructorWithBigType<tbb::cache_aligned_allocator>(\"tbb::cache_aligned_allocator\");\n    AlignMask = tbb_allocator_mask;\n    TestConstructorWithBigType<tbb::tbb_allocator>(\"tbb::tbb_allocator\");\n}\n\n//! Test allocation of ETS elements on the stack (internal types)\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Allocate ETS on stack\") {\n    AlignMask = tbb_allocator_mask;\n    allocate_ets_element_on_stack<int,char>(\"int vs. char\");\n    allocate_ets_element_on_stack<int,short>(\"int vs. short\");\n    allocate_ets_element_on_stack<int,char[3]>(\"int vs. char[3]\");\n    allocate_ets_element_on_stack<float,char>(\"float vs. char\");\n    allocate_ets_element_on_stack<float,short>(\"float vs. short\");\n    allocate_ets_element_on_stack<float,char[3]>(\"float vs. char[3]\");\n}\n\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_environment_whitebox.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_environment_whitebox.cpp\n//! \\brief Test for [internal] functionality\n\n#if _WIN32 || _WIN64\n#define _CRT_SECURE_NO_WARNINGS\n#endif\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_env.h\"\n#include \"src/tbb/environment.h\"\n\n#include <string>\n#include <algorithm>\n#include <sstream>\n#include <climits>\n#include <utility>\n#include <vector>\n\nconst char* environment_variable_name = \"TEST_VARIABLE_NAME\";\n\n// For WIN8UI applications reading and writing the environment variables\n// is prohibited due to the platform limitations\n#if !__TBB_WIN8UI_SUPPORT\n\n#if _WIN32 || _WIN64\n// Environment variable length is limited by 32K on Windows\nconst std::size_t large_length = 32000;\n#else\nconst std::size_t large_length = 1000000;\n#endif\n\ntemplate <typename T>\nvoid set_and_get_test_variable( T (*environment_variable_getter)( const char* ),\n                                std::pair<std::string, T> test_case )\n{\n    utils::SetEnv(environment_variable_name, test_case.first.c_str());\n    T result = environment_variable_getter(environment_variable_name);\n    REQUIRE_MESSAGE(result == test_case.second, \"Wrong Get<Type>EnvironmentVariable return value\");\n    utils::SetEnv(environment_variable_name, \"\");\n}\n\nutils::FastRandom<> rnd(12345);\n\nstruct RandomCharacterGenerator {\n    char operator()() {\n        return rnd.get() % 128; // 127 - the last ASCII symbol\n    }\n}; // struct RandomCharacterGenerator\n\nbool alternative_env_variable_checker( const char* str, bool ) {\n    bool result = false;\n    for (unsigned i = 0; str[i]; ++i) {\n        if (str[i] == '1') {\n            // if we found more then one '1' character -> return false\n            result = !result;\n            if (!result) return false;\n        } else if (str[i] != ' ') {\n            // if we found some character other than ' ' and '1' -> return false\n            return false;\n        }\n    }\n    return result;\n}\n\n// Suitable alternative checker for GetLongEnvVariable() was not found\n// So here we use the code from GetLongEnvVariable() realization\nlong alternative_env_variable_checker( const char* str, long ) {\n    char* end;\n    errno = 0;\n    long result = std::strtol(str, &end, 10);\n\n    // We have exceeded the range, value is negative or it is the end of the string\n    if (errno == ERANGE || result < 0 || end == str) {\n        result = -1;\n    }\n\n    for (; *end != '\\0'; ++end) {\n        if (!std::isspace(*end))\n            result = -1;\n    }\n    return result;\n}\n\ntemplate <typename T>\nstd::pair<std::string, T> create_random_case( std::size_t length ) {\n    REQUIRE_MESSAGE(length != 0, \"Requested random string cannot be empty\");\n    std::string rand_string(length, ' ');\n    std::generate(rand_string.begin(), rand_string.end(), RandomCharacterGenerator{});\n\n    T expected_result = alternative_env_variable_checker(rand_string.c_str(), T());\n\n    return std::make_pair(rand_string, expected_result);\n}\n\ntemplate <typename T>\nvoid prepare_random_cases( std::vector<std::pair<std::string, T>>& cases ) {\n    // Random cases\n    std::size_t length = 10000;\n\n    for (std::size_t i = 0; i < 10; ++i) {\n        cases.push_back(create_random_case<T>((rnd.get() % length) + 1));\n    }\n\n    // Random case with large string\n    cases.push_back(create_random_case<T>(large_length));\n}\n\nstd::vector<std::pair<std::string, bool>> initialize_cases( bool wrong_result ) {\n    std::vector<std::pair<std::string, bool>> cases;\n    // Valid cases\n    cases.push_back(std::make_pair(\"1\", true));\n    cases.push_back(std::make_pair(\" 1 \", true));\n    cases.push_back(std::make_pair(\"1              \", true));\n    cases.push_back(std::make_pair(\"             1           \", true));\n    cases.push_back(std::make_pair(\"         1\", true));\n    cases.push_back(std::make_pair((std::string(large_length, ' ') + '1'), true));\n\n    // Invalid cases\n    cases.push_back(std::make_pair(\"\", wrong_result));\n    cases.push_back(std::make_pair(\" \", wrong_result));\n    cases.push_back(std::make_pair(\" 11\", wrong_result));\n    cases.push_back(std::make_pair(\"111111\", wrong_result));\n    cases.push_back(std::make_pair(\"1 1\", wrong_result));\n    cases.push_back(std::make_pair(\" 1 abc?\", wrong_result));\n    cases.push_back(std::make_pair(\"1;\", wrong_result));\n    cases.push_back(std::make_pair(\" d \", wrong_result));\n    cases.push_back(std::make_pair(\"0\", wrong_result));\n    cases.push_back(std::make_pair(\"0 \", wrong_result));\n    cases.push_back(std::make_pair(\"000000\", wrong_result));\n    cases.push_back(std::make_pair(\"01\", wrong_result));\n    cases.push_back(std::make_pair(\"00000001\", wrong_result));\n    cases.push_back(std::make_pair(\"ABCDEFG\", wrong_result));\n    cases.push_back(std::make_pair(\"2018\", wrong_result));\n    cases.push_back(std::make_pair(\"ABC_123\", wrong_result));\n    cases.push_back(std::make_pair(\"true\", wrong_result));\n    cases.push_back(std::make_pair(std::string(large_length, 'A'), wrong_result));\n\n    prepare_random_cases(cases);\n    return cases;\n}\n\nstd::vector<std::pair<std::string, long>> initialize_cases( long wrong_result ) {\n    std::vector<std::pair<std::string, long>> cases;\n    std::stringstream ss;\n    // Valid cases\n    for (long i = 0; i < 100; ++i) {\n        ss << i;\n        cases.push_back(std::make_pair(ss.str(), i));\n        ss.str(\"\");\n\n        ss << \"     \" << i << \"     \";\n        cases.push_back(std::make_pair(ss.str(), i));\n        ss.str(\"\");\n\n        ss << i << \"     \";\n        cases.push_back(std::make_pair(ss.str(), i));\n        ss.str(\"\");\n\n        ss << \"     \" << i;\n        cases.push_back(std::make_pair(ss.str(), i));\n        ss.str(\"\");\n    }\n\n    ss << LONG_MAX;\n    cases.push_back(std::make_pair(ss.str(), LONG_MAX));\n    ss.str(\"\");\n\n    cases.push_back(std::make_pair((std::string(large_length, ' ') + '1'), 1L));\n\n    // Invalid cases\n    cases.push_back(std::make_pair(\"\", wrong_result));\n    cases.push_back(std::make_pair(\"  \", wrong_result));\n    cases.push_back(std::make_pair(\"a\", wrong_result));\n    cases.push_back(std::make_pair(\"^&*\", wrong_result));\n    cases.push_back(std::make_pair(\"  10   e\", wrong_result));\n    cases.push_back(std::make_pair(\"a   12\", wrong_result));\n    cases.push_back(std::make_pair(\"eeeeeeeeeeeeeeeeee\", wrong_result));\n    cases.push_back(std::make_pair(\"200000000000000000000000000\", wrong_result));\n    cases.push_back(std::make_pair(\"-1\", wrong_result));\n    cases.push_back(std::make_pair(\"-100\", wrong_result));\n    cases.push_back(std::make_pair(\"-200000000000000000000000000\", wrong_result));\n    cases.push_back(std::make_pair(\"ABBDDRR\", wrong_result));\n    cases.push_back(std::make_pair(\"10  10\", wrong_result));\n    cases.push_back(std::make_pair(\"true\", wrong_result));\n    cases.push_back(std::make_pair(\"false\", wrong_result));\n    cases.push_back(std::make_pair(\"1A\", wrong_result));\n    cases.push_back(std::make_pair(\"_123\", wrong_result));\n    cases.push_back(std::make_pair(std::string(large_length, 'A'), wrong_result));\n\n    // Prepare string with LONG_MAX + 1 value\n    ss << LONG_MAX / 10 << (LONG_MAX % 10 + 1);\n    cases.push_back(std::make_pair(ss.str(), -1));\n    ss.str(\"\");\n\n    prepare_random_cases(cases);\n    return cases;\n}\n\ntemplate <typename T>\nvoid test_environment_variable( T (*environment_variables_handler)( const char* ), T wrong_result ) {\n    REQUIRE_MESSAGE(environment_variables_handler(environment_variable_name) == wrong_result,\n                    \"Tested environment variable should not be defined in the beginning\");\n\n    // Each pair is a test case:\n    // pair.first -> value of environment variable\n    // pair.second -> expected result\n    std::vector<std::pair<std::string, T>> cases = initialize_cases(wrong_result);\n\n    for (std::size_t i = 0; i != cases.size(); ++i) {\n        set_and_get_test_variable(environment_variables_handler, cases[i]);\n    }\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"testing GetBoolEnvironmentVariable\") {\n    test_environment_variable(tbb::detail::r1::GetBoolEnvironmentVariable, false);\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"testing GetIntegralEnvironmentVariable\") {\n    test_environment_variable(tbb::detail::r1::GetIntegralEnvironmentVariable, -1L);\n}\n\n#endif // !__TBB_WIN8UI_SUPPORT\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_flow_graph.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"common/config.h\"\n\n#include \"tbb/flow_graph.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/graph_utils.h\"\n#include \"common/spin_barrier.h\"\n\n\n//! \\file test_flow_graph.cpp\n//! \\brief Test for [flow_graph.continue_msg flow_graph.graph_node flow_graph.input_port flow_graph.output_port flow_graph.join_node flow_graph.split_node flow_graph.limiter_node flow_graph.write_once_node flow_graph.overwrite_node flow_graph.make_edge flow_graph.graph flow_graph.buffer_node flow_graph.function_node flow_graph.multifunction_node flow_graph.continue_node flow_graph.input_node] specification\n\nconst int T = 4;\nconst int W = 4;\n\nstruct decrement_wait : utils::NoAssign {\n\n    tbb::flow::graph * const my_graph;\n    bool * const my_done_flag;\n\n    decrement_wait( tbb::flow::graph &h, bool *done_flag ) : my_graph(&h), my_done_flag(done_flag) {}\n\n    void operator()(int i) const {\n        utils::Sleep(10 * i);\n\n        my_done_flag[i] = true;\n        my_graph->release_wait();\n    }\n};\n\nstatic void test_wait_count() {\n    tbb::flow::graph h;\n    for (int i = 0; i < T; ++i ) {\n        bool done_flag[W];\n        for (int j = 0; j < W; ++j ) {\n            for ( int w = 0; w < W; ++w ) done_flag[w] = false;\n            for ( int w = 0; w < j; ++w ) h.reserve_wait();\n\n            utils::NativeParallelFor( j, decrement_wait(h, done_flag) );\n            h.wait_for_all();\n            for ( int w = 0; w < W; ++w ) {\n                if ( w < j ) CHECK_MESSAGE( done_flag[w] == true, \"\" );\n                else CHECK_MESSAGE( done_flag[w] == false, \"\" );\n            }\n        }\n    }\n}\n\n// Encapsulate object we want to store in vector (because contained type must have\n// copy constructor and assignment operator\nclass my_int_buffer {\n    tbb::flow::buffer_node<int> *b;\n    tbb::flow::graph& my_graph;\npublic:\n    my_int_buffer(tbb::flow::graph &g) : my_graph(g) { b = new tbb::flow::buffer_node<int>(my_graph); }\n    my_int_buffer(const my_int_buffer& other) : my_graph(other.my_graph) {\n        b = new tbb::flow::buffer_node<int>(my_graph);\n    }\n    ~my_int_buffer() { delete b; }\n    my_int_buffer& operator=(const my_int_buffer& /*other*/) {\n        return *this;\n    }\n};\n\n// test the graph iterator, delete nodes from graph, test again\nvoid test_iterator() {\n    tbb::flow::graph g;\n    my_int_buffer a_buffer(g);\n    my_int_buffer b_buffer(g);\n    my_int_buffer c_buffer(g);\n    my_int_buffer *d_buffer = new my_int_buffer(g);\n    my_int_buffer e_buffer(g);\n    std::vector< my_int_buffer > my_buffer_vector(10, c_buffer);\n\n    int count = 0;\n    for (tbb::flow::graph::iterator it = g.begin(); it != g.end(); ++it) {\n        count++;\n    }\n    CHECK_MESSAGE( (count==15), \"error in iterator count\");\n\n    delete d_buffer;\n\n    count = 0;\n    for (tbb::flow::graph::iterator it = g.begin(); it != g.end(); ++it) {\n        count++;\n    }\n    CHECK_MESSAGE( (count==14), \"error in iterator count\");\n\n    my_buffer_vector.clear();\n\n    count = 0;\n    for (tbb::flow::graph::iterator it = g.begin(); it != g.end(); ++it) {\n        count++;\n    }\n    CHECK_MESSAGE( (count==4), \"error in iterator count\");\n}\n\nclass AddRemoveBody : utils::NoAssign {\n    tbb::flow::graph& g;\n    int nThreads;\n    utils::SpinBarrier &barrier;\npublic:\n    AddRemoveBody(int nthr, utils::SpinBarrier &barrier_, tbb::flow::graph& _g) :\n        g(_g), nThreads(nthr), barrier(barrier_)\n    {}\n    void operator()(const int /*threadID*/) const {\n        my_int_buffer b(g);\n        {\n            std::vector<my_int_buffer> my_buffer_vector(100, b);\n            barrier.wait();  // wait until all nodes are created\n            // now test that the proper number of nodes were created\n            int count = 0;\n            for (tbb::flow::graph::iterator it = g.begin(); it != g.end(); ++it) {\n                count++;\n            }\n            CHECK_MESSAGE( (count==101*nThreads), \"error in iterator count\");\n            barrier.wait();  // wait until all threads are done counting\n        } // all nodes but for the initial node on this thread are deleted\n        barrier.wait(); // wait until all threads have deleted all nodes in their vectors\n        // now test that all the nodes were deleted except for the initial node\n        int count = 0;\n        for (tbb::flow::graph::iterator it = g.begin(); it != g.end(); ++it) {\n            count++;\n        }\n        CHECK_MESSAGE( (count==nThreads), \"error in iterator count\");\n        barrier.wait();  // wait until all threads are done counting\n    } // initial node gets deleted\n};\n\nvoid test_parallel(int nThreads) {\n    tbb::flow::graph g;\n    utils::SpinBarrier barrier(nThreads);\n    AddRemoveBody body(nThreads, barrier, g);\n    NativeParallelFor(nThreads, body);\n}\n\n/*\n * Functors for graph arena spawn tests\n */\n\ninline void check_arena(tbb::task_arena* midway_arena) {\n    CHECK_MESSAGE(midway_arena->max_concurrency() == 2, \"\");\n    CHECK_MESSAGE(tbb::this_task_arena::max_concurrency() == 1, \"\");\n}\n\nstruct run_functor {\n    tbb::task_arena* midway_arena;\n    int return_value;\n    run_functor(tbb::task_arena* a) : midway_arena(a), return_value(1) {}\n    int operator()() {\n        check_arena(midway_arena);\n        return return_value;\n    }\n};\n\ntemplate < typename T >\nstruct function_body {\n    tbb::task_arena* midway_arena;\n    function_body(tbb::task_arena* a) : midway_arena(a) {}\n    tbb::flow::continue_msg operator()(const T& /*arg*/) {\n        check_arena(midway_arena);\n        return tbb::flow::continue_msg();\n    }\n};\n\ntypedef tbb::flow::multifunction_node< int, std::tuple< int > > mf_node;\n\nstruct multifunction_body {\n    tbb::task_arena* midway_arena;\n    multifunction_body(tbb::task_arena* a) : midway_arena(a) {}\n    void operator()(const int& /*arg*/, mf_node::output_ports_type& /*outports*/) {\n        check_arena(midway_arena);\n    }\n};\n\nstruct input_body {\n    tbb::task_arena* midway_arena;\n    int counter;\n    input_body(tbb::task_arena* a) : midway_arena(a), counter(0) {}\n    int operator()(tbb::flow_control &fc) {\n        check_arena(midway_arena);\n        if (counter++ >= 1) {\n            fc.stop();\n        }\n        return int();\n    }\n};\n\nstruct nodes_test_functor : utils::NoAssign {\n    tbb::task_arena* midway_arena;\n    tbb::flow::graph& my_graph;\n\n    nodes_test_functor(tbb::task_arena* a, tbb::flow::graph& g) : midway_arena(a), my_graph(g) {}\n    void operator()() const {\n\n        // Define test nodes\n        // Continue, function, source nodes\n        tbb::flow::continue_node< tbb::flow::continue_msg > c_n(my_graph, function_body<tbb::flow::continue_msg>(midway_arena));\n        tbb::flow::function_node< int > f_n(my_graph, tbb::flow::unlimited, function_body<int>(midway_arena));\n        tbb::flow::input_node< int > s_n(my_graph, input_body(midway_arena));\n\n        // Multifunction node\n        mf_node m_n(my_graph, tbb::flow::unlimited, multifunction_body(midway_arena));\n\n        // Join node\n        tbb::flow::function_node< std::tuple< int, int > > join_f_n(\n            my_graph, tbb::flow::unlimited, function_body< std::tuple< int, int > >(midway_arena)\n        );\n        tbb::flow::join_node< std::tuple< int, int > > j_n(my_graph);\n        make_edge(j_n, join_f_n);\n\n        // Split node\n        tbb::flow::function_node< int > split_f_n1 = f_n;\n        tbb::flow::function_node< int > split_f_n2 = f_n;\n        tbb::flow::split_node< std::tuple< int, int > > sp_n(my_graph);\n        make_edge(tbb::flow::output_port<0>(sp_n), split_f_n1);\n        make_edge(tbb::flow::output_port<1>(sp_n), split_f_n2);\n\n        // Overwrite node\n        tbb::flow::function_node< int > ow_f_n = f_n;\n        tbb::flow::overwrite_node< int > ow_n(my_graph);\n        make_edge(ow_n, ow_f_n);\n\n        // Write once node\n        tbb::flow::function_node< int > w_f_n = f_n;\n        tbb::flow::write_once_node< int > w_n(my_graph);\n        make_edge(w_n, w_f_n);\n\n        // Buffer node\n        tbb::flow::function_node< int > buf_f_n = f_n;\n        tbb::flow::buffer_node< int > buf_n(my_graph);\n        make_edge(w_n, buf_f_n);\n\n        // Limiter node\n        tbb::flow::function_node< int > l_f_n = f_n;\n        tbb::flow::limiter_node< int > l_n(my_graph, 1);\n        make_edge(l_n, l_f_n);\n\n        // Execute nodes\n        c_n.try_put( tbb::flow::continue_msg() );\n        f_n.try_put(1);\n        m_n.try_put(1);\n        s_n.activate();\n\n        tbb::flow::input_port<0>(j_n).try_put(1);\n        tbb::flow::input_port<1>(j_n).try_put(1);\n\n        std::tuple< int, int > sp_tuple(1, 1);\n        sp_n.try_put(sp_tuple);\n\n        ow_n.try_put(1);\n        w_n.try_put(1);\n        buf_n.try_put(1);\n        l_n.try_put(1);\n\n        my_graph.wait_for_all();\n    }\n};\n\nvoid test_graph_arena() {\n    // There is only one thread for execution (external thread).\n    // So, if graph's tasks get spawned in different arena\n    // external thread won't be able to find them in its own arena.\n    // In this case test should hang.\n    tbb::task_arena arena(1);\n\tarena.execute(\n        [&]() {\n            tbb::flow::graph g;\n            tbb::task_arena midway_arena;\n            midway_arena.initialize(2);\n            midway_arena.execute(nodes_test_functor(&midway_arena, g));\n\n        }\n\t);\n}\n\n//! Test wait counts\n//! \\brief error_guessing\nTEST_CASE(\"Test wait_count\"){\n    for(unsigned int p=utils::MinThread; p<=utils::MaxThread; ++p ) {\n        tbb::task_arena arena(p);\n        arena.execute(\n            [&]() {\n                test_wait_count();\n            }\n        );\n\t}\n}\n\n//! Test graph iterators\n//! \\brief interface\nTEST_CASE(\"Test graph::iterator\"){\n    for(unsigned int p=utils::MinThread; p<=utils::MaxThread; ++p ) {\n        tbb::task_arena arena(p);\n        arena.execute(\n            [&]() {\n                test_iterator();\n            }\n        );\n\t}\n}\n\n//! Test parallel for body\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test parallel\"){\n    for(unsigned int p=utils::MinThread; p<=utils::MaxThread; ++p ) {\n        tbb::task_arena arena(p);\n        arena.execute(\n            [&]() {\n                test_parallel(p);\n            }\n        );\n\t}\n}\n\n//! Test separate arena isn't used\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test graph_arena\"){\n    test_graph_arena();\n}\n\n//! Graph iterator\n//! \\brief \\ref error_guessing\nTEST_CASE(\"graph iterator\") {\n    using namespace tbb::flow;\n\n    graph g;\n    \n    auto past_end = g.end();\n    ++past_end;\n\n    continue_node<int> n(g, [](const continue_msg &){return 1;});\n\n    size_t item_count = 0;\n\n    for(auto it = g.cbegin(); it != g.cend(); it++)\n        ++item_count;\n    CHECK_MESSAGE((item_count == 1), \"Should find 1 item\");\n\n    item_count = 0;\n    auto jt(g.begin());\n    for(; jt != g.end(); jt++)\n        ++item_count;\n    CHECK_MESSAGE((item_count == 1), \"Should find 1 item\");\n\n    graph g2;\n    continue_node<int> n2(g, [](const continue_msg &){return 1;});\n    CHECK_MESSAGE((g.begin() != g2.begin()), \"Different graphs should have different iterators\");\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_flow_graph_priorities.cpp",
    "content": "/*\n    Copyright (c) 2018-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"common/config.h\"\n\n#include \"tbb/flow_graph.h\"\n#include \"tbb/parallel_for.h\"\n#include \"tbb/global_control.h\"\n#include \"tbb/task_arena.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_concurrency_limit.h\"\n#include \"common/spin_barrier.h\"\n\n#include <vector>\n#include <cstdlib>\n#include <random>\n#include <algorithm>\n#include <memory>\n\n\n//! \\file test_flow_graph_priorities.cpp\n//! \\brief Test for [flow_graph.copy_body flow_graph.function_node flow_graph.multifunction_node flow_graph.continue_node flow_graph.async_node] specification\n\n\nusing namespace tbb::flow;\n\nstruct TaskInfo {\n    TaskInfo() : my_priority(-1), my_task_index(-1) {}\n    TaskInfo( int priority, int task_index )\n        : my_priority(priority), my_task_index(task_index) {}\n    int my_priority;\n    int my_task_index;\n};\n\nstd::vector<TaskInfo> g_task_info;\n\nstd::atomic<unsigned> g_task_num;\n\nvoid spin_for( double delta ) {\n    tbb::tick_count start = tbb::tick_count::now();\n    while( (tbb::tick_count::now() - start).seconds() < delta ) ;\n}\n\nnamespace PriorityNodesTakePrecedence {\n\nstd::atomic<bool> g_work_submitted;\n\nconst unsigned node_num = 100;\nconst unsigned start_index = node_num / 3;\nconst unsigned end_index = node_num * 2 / 3;\nstd::atomic<unsigned> g_priority_task_index;\n\nvoid body_func( int priority, utils::SpinBarrier& my_barrier ) {\n    while( !g_work_submitted.load(std::memory_order_acquire) )\n        tbb::detail::d0::yield();\n    int current_task_index = g_task_num++;\n    if( priority != no_priority )\n        g_task_info[g_priority_task_index++] = TaskInfo( priority, current_task_index );\n    const bool all_threads_will_come =\n        unsigned(current_task_index) < node_num - (node_num % tbb::this_task_arena::max_concurrency());\n    if( all_threads_will_come )\n        my_barrier.wait();\n}\n\ntypedef multifunction_node< int, std::tuple<int> > multi_node;\n\ntemplate <typename T>\nstruct Body {\n    Body( int priority, utils::SpinBarrier& barrier )\n        : my_priority( priority ), my_barrier( barrier ) {}\n    T operator()( const T& msg ) const {\n        body_func( my_priority, my_barrier );\n        return msg;\n    }\n    void operator()( int msg, multi_node::output_ports_type& op ) const {\n        body_func( my_priority, my_barrier );\n        std::get<0>(op).try_put( msg );\n    }\nprivate:\n    int my_priority;\n    utils::SpinBarrier& my_barrier;\n};\n\ntemplate<typename NodeType, typename BodyType>\nstruct node_creator_t {\n    NodeType* operator()( graph& g, unsigned index, utils::SpinBarrier& barrier ) {\n        if( start_index <= index && index < end_index )\n            return new NodeType( g, unlimited, BodyType(index, barrier), node_priority_t(index) );\n        else\n            return new NodeType( g, unlimited, BodyType(no_priority, barrier) );\n    }\n};\n\ntemplate<typename BodyType>\nstruct node_creator_t< continue_node<continue_msg>, BodyType > {\n    continue_node<continue_msg>* operator()( graph& g, unsigned index, utils::SpinBarrier& barrier ) {\n        if( start_index <= index && index < end_index )\n            return new continue_node<continue_msg>( g, BodyType(index, barrier), node_priority_t(index) );\n        else\n            return new continue_node<continue_msg>( g, BodyType(no_priority, barrier) );\n    }\n};\n\n\nstruct passthru_body {\n    template<typename T>\n    continue_msg operator()( T ) const { return continue_msg(); }\n};\n\ntemplate<typename NodeType, typename NodeTypeCreator>\nvoid test_node( NodeTypeCreator node_creator ) {\n    const int num_threads = tbb::this_task_arena::max_concurrency();\n    utils::SpinBarrier barrier( num_threads );\n    graph g;\n    broadcast_node<typename NodeType::input_type> bn(g);\n    function_node<typename NodeType::input_type> tn(g, unlimited, passthru_body());\n    // Using pointers to nodes to avoid errors on compilers, which try to generate assignment\n    // operator for the nodes\n    std::vector< std::unique_ptr<NodeType> > nodes;\n    for( unsigned i = 0; i < node_num; ++i ) {\n        nodes.push_back(std::unique_ptr<NodeType>( node_creator(g, i, barrier) ));\n        make_edge( bn, *nodes.back() );\n        make_edge( *nodes.back(), tn );\n    }\n\n    const size_t repeats = 10;\n    const size_t priority_nodes_num = end_index - start_index;\n    size_t global_order_failures = 0;\n    for( size_t repeat = 0; repeat < repeats; ++repeat ) {\n        g_work_submitted.store( false, std::memory_order_release );\n        g_task_num = g_priority_task_index = 0;\n        g_task_info.clear(); g_task_info.resize( priority_nodes_num );\n\n        bn.try_put( typename NodeType::input_type{} );\n        // Setting of the flag is based on the knowledge that the calling thread broadcasts the\n        // message to successor nodes. Thus, once the calling thread returns from try_put() call all\n        // necessary tasks are spawned. Thus, this makes this test to be a whitebox test to some\n        // extent.\n        g_work_submitted.store( true, std::memory_order_release );\n\n        g.wait_for_all();\n\n        CHECK_MESSAGE( (g_priority_task_index == g_task_info.size()), \"Incorrect number of tasks with priority.\" );\n        CHECK_MESSAGE( (priority_nodes_num == g_task_info.size()), \"Incorrect number of tasks with priority executed.\" );\n\n        for( unsigned i = 0; i < g_priority_task_index; i += num_threads ) {\n            bool found = false;\n            unsigned highest_priority_within_group = end_index - i - 1;\n            for( unsigned j = i; j < i+num_threads; ++j ) {\n                if( g_task_info[j].my_priority == int(highest_priority_within_group) ) {\n                    found = true;\n                    break;\n                }\n            }\n            CHECK_MESSAGE( found, \"Highest priority task within a group was not found\" );\n        }\n        for( unsigned i = 0; i < g_priority_task_index; ++i ) {\n            // This check might fail because priorities do not guarantee ordering, i.e. assumption\n            // that all priority nodes should increment the task counter before any subsequent\n            // no-priority node is not correct. In the worst case, a thread that took a priority\n            // node might be preempted and become the last to increment the counter. That's why the\n            // test passing is based on statistics, which could be affected by machine overload\n            // unfortunately.\n            // TODO revamp: reconsider the following check for this test\n            if( g_task_info[i].my_task_index > int(priority_nodes_num + num_threads) )\n                ++global_order_failures;\n        }\n    }\n    float failure_ratio = float(global_order_failures) / float(repeats*priority_nodes_num);\n    CHECK_MESSAGE(\n        failure_ratio <= 0.1f,\n        \"Nodes with priorities executed in wrong order too frequently over non-prioritized nodes.\"\n    );\n}\n\ntemplate<typename NodeType, typename NodeBody>\nvoid call_within_arena( tbb::task_arena& arena ) {\n    arena.execute(\n        [&]() {\n            test_node<NodeType>( node_creator_t<NodeType, NodeBody>() );\n        }\n    );\n}\n\nvoid test( int num_threads ) {\n    INFO( \"Testing execution of nodes with priority takes precedence (num_threads=\" << num_threads << \") - \" );\n    tbb::task_arena arena(num_threads);\n    call_within_arena< function_node<int,int>, Body<int> >( arena );\n    call_within_arena< multi_node, Body<int> >( arena );\n    call_within_arena< continue_node<continue_msg>, Body<continue_msg> >( arena );\n}\n\n} /* namespace PriorityNodesTakePrecedence */\n\nnamespace ThreadsEagerReaction {\n\n// TODO revamp: combine with similar queue from test_async_node\ntemplate <typename T>\nclass concurrent_queue {\npublic:\n    bool try_pop(T& item) {\n        std::lock_guard<queue_mutex> lock(mutex);\n        if ( q.empty() )\n            return false;\n        item = q.front();\n        q.pop();\n        return true;\n    }\n\n    void push(const T& item) {\n        std::lock_guard<queue_mutex> lock(mutex);\n        q.push(item);\n    }\nprivate:\n    std::queue<T> q;\n    using queue_mutex = std::mutex;\n    std::mutex mutex;\n};\n\nusing utils::SpinBarrier;\n\nenum task_type_t { no_task, regular_task, async_task };\n\nstruct profile_t {\n    task_type_t task_type;\n    unsigned global_task_id;\n    double elapsed;\n};\n\nstd::vector<unsigned> g_async_task_ids;\n\ntypedef unsigned data_type;\ntypedef async_node<data_type, data_type> async_node_type;\ntypedef multifunction_node<\n    data_type, std::tuple<data_type, data_type> > decider_node_type;\nstruct AsyncActivity {\n    typedef async_node_type::gateway_type gateway_type;\n\n    struct work_type { data_type input; gateway_type* gateway; };\n    std::atomic<bool> done;\n    concurrent_queue<work_type> my_queue;\n    std::thread my_service_thread;\n\n    struct ServiceThreadFunc {\n        SpinBarrier& my_barrier;\n        ServiceThreadFunc(SpinBarrier& barrier) : my_barrier(barrier) {}\n        void operator()(AsyncActivity* activity) {\n            while (!activity->done) {\n                work_type work;\n                while (activity->my_queue.try_pop(work)) {\n                    g_async_task_ids.push_back( ++g_task_num );\n                    work.gateway->try_put(work.input);\n                    work.gateway->release_wait();\n                    my_barrier.wait();\n                }\n            }\n        }\n    };\n    void stop_and_wait() { done = true; my_service_thread.join(); }\n\n    void submit(data_type input, gateway_type* gateway) {\n        work_type work = { input, gateway };\n        gateway->reserve_wait();\n        my_queue.push(work);\n    }\n    AsyncActivity(SpinBarrier& barrier)\n        : done(false), my_service_thread(ServiceThreadFunc(barrier), this) {}\n};\n\nstruct StartBody {\n    bool has_run;\n    data_type operator()(tbb::flow_control& fc) {\n        if (has_run){\n            fc.stop();\n            return data_type();\n        }\n        has_run = true;\n        return 1;\n    }\n    StartBody() : has_run(false) {}\n};\n\nstruct ParallelForBody {\n    SpinBarrier& my_barrier;\n    const data_type& my_input;\n    ParallelForBody(SpinBarrier& barrier, const data_type& input)\n        : my_barrier(barrier), my_input(input) {}\n    void operator()(const data_type&) const {\n        my_barrier.wait();\n        ++g_task_num;\n    }\n};\n\nstruct CpuWorkBody {\n    SpinBarrier& my_barrier;\n    const int my_tasks_count;\n    data_type operator()(const data_type& input) {\n        tbb::parallel_for(0, my_tasks_count, ParallelForBody(my_barrier, input), tbb::simple_partitioner());\n        return input;\n    }\n    CpuWorkBody(SpinBarrier& barrier, int tasks_count)\n        : my_barrier(barrier), my_tasks_count(tasks_count) {}\n};\n\nstruct DeciderBody {\n    const data_type my_limit;\n    DeciderBody( const data_type& limit ) : my_limit( limit ) {}\n    void operator()(data_type input, decider_node_type::output_ports_type& ports) {\n        if (input < my_limit)\n            std::get<0>(ports).try_put(input + 1);\n    }\n};\n\nstruct AsyncSubmissionBody {\n    AsyncActivity* my_activity;\n    // It is important that async_node in the test executes without spawning a TBB task, because\n    // it passes the work to asynchronous thread, which unlocks the barrier that is waited\n    // by every execution thread (asynchronous thread and any TBB worker or main thread).\n    // This is why async_node's body marked noexcept.\n    void operator()(data_type input, async_node_type::gateway_type& gateway) noexcept {\n        my_activity->submit(input, &gateway);\n    }\n    AsyncSubmissionBody(AsyncActivity* activity) : my_activity(activity) {}\n};\n\nvoid test( unsigned num_threads ) {\n    INFO( \"Testing threads react eagerly on asynchronous tasks (num_threads=\" << num_threads << \") - \" );\n    if( num_threads == std::thread::hardware_concurrency() ) {\n        // one thread is required for asynchronous compute resource\n        INFO(\"skipping test since it is designed to work on less number of threads than \"\n             \"hardware concurrency allows\\n\");\n        return;\n    }\n    const unsigned cpu_threads = unsigned(num_threads);\n    const unsigned cpu_tasks_per_thread = 4;\n    const unsigned nested_cpu_tasks = cpu_tasks_per_thread * cpu_threads;\n    const unsigned async_subgraph_reruns = 8;\n    const unsigned cpu_subgraph_reruns = 2;\n\n    SpinBarrier barrier(cpu_threads + /*async thread=*/1);\n    g_task_num = 0;\n    g_async_task_ids.clear();\n    g_async_task_ids.reserve(async_subgraph_reruns);\n\n    tbb::task_arena arena(cpu_threads);\n\tarena.execute(\n        [&]() {\n            AsyncActivity activity(barrier);\n            graph g;\n\n            input_node<data_type> starter_node(g, StartBody());\n            function_node<data_type, data_type> cpu_work_node(\n                g, unlimited, CpuWorkBody(barrier, nested_cpu_tasks));\n            decider_node_type cpu_restarter_node(g, unlimited, DeciderBody(cpu_subgraph_reruns));\n            async_node_type async_node(g, unlimited, AsyncSubmissionBody(&activity));\n            decider_node_type async_restarter_node(\n                g, unlimited, DeciderBody(async_subgraph_reruns), node_priority_t(1)\n            );\n\n            make_edge(starter_node, cpu_work_node);\n            make_edge(cpu_work_node, cpu_restarter_node);\n            make_edge(output_port<0>(cpu_restarter_node), cpu_work_node);\n\n            make_edge(starter_node, async_node);\n            make_edge(async_node, async_restarter_node);\n            make_edge(output_port<0>(async_restarter_node), async_node);\n\n            starter_node.activate();\n            g.wait_for_all();\n            activity.stop_and_wait();\n\n            const size_t async_task_num = size_t(async_subgraph_reruns);\n            CHECK_MESSAGE( ( g_async_task_ids.size() == async_task_num), \"Incorrect number of async tasks.\" );\n            unsigned max_span = unsigned(2 * cpu_threads + 1);\n            for( size_t idx = 1; idx < async_task_num; ++idx ) {\n                CHECK_MESSAGE( (g_async_task_ids[idx] - g_async_task_ids[idx-1] <= max_span),\n                               \"Async tasks were not able to interfere with CPU tasks.\" );\n\n            }\n        }\n    );\n    INFO(\"done\\n\");\n}\n} /* ThreadsEagerReaction */\n\nnamespace LimitingExecutionToPriorityTask {\n\nenum work_type_t { NONPRIORITIZED_WORK, PRIORITIZED_WORK };\n\nstruct execution_tracker_t {\n    execution_tracker_t() { reset(); }\n    void reset() {\n        prioritized_work_submitter = std::thread::id();\n        prioritized_work_started = false;\n        prioritized_work_finished = false;\n        prioritized_work_interrupted = false;\n    }\n    std::thread::id prioritized_work_submitter;\n    std::atomic<bool> prioritized_work_started;\n    bool prioritized_work_finished;\n    bool prioritized_work_interrupted;\n} exec_tracker;\n\ntemplate<work_type_t work_type>\nvoid do_node_work( int work_size );\n\ntemplate<work_type_t>\nvoid do_nested_work( const std::thread::id& tid, const tbb::blocked_range<int>& subrange );\n\ntemplate<work_type_t work_type>\nstruct CommonBody {\n    CommonBody() : my_body_size( 0 ) { }\n    CommonBody( int body_size ) : my_body_size( body_size ) { }\n    continue_msg operator()( const continue_msg& msg ) const {\n        do_node_work<work_type>(my_body_size);\n        return msg;\n    }\n    void operator()( const tbb::blocked_range<int>& subrange ) const {\n        do_nested_work<work_type>( /*tid=*/std::this_thread::get_id(), subrange );\n    }\n    int my_body_size;\n};\n\ntemplate<work_type_t work_type>\nvoid do_node_work(int work_size) {\n    tbb::parallel_for( tbb::blocked_range<int>(0, work_size), CommonBody<work_type>(),\n                       tbb::simple_partitioner() );\n}\n\ntemplate<work_type_t>\nvoid do_nested_work( const std::thread::id& tid, const tbb::blocked_range<int>& /*subrange*/ ) {\n    // This is non-prioritized work...\n    if( !exec_tracker.prioritized_work_started || exec_tracker.prioritized_work_submitter != tid )\n        return;\n    // ...being executed by the thread that initially started prioritized one...\n    CHECK_MESSAGE( exec_tracker.prioritized_work_started,\n                   \"Prioritized work should have been started by that time.\" );\n    // ...prioritized work has been started already...\n    if( exec_tracker.prioritized_work_finished )\n        return;\n    // ...but has not been finished yet\n    exec_tracker.prioritized_work_interrupted = true;\n}\n\nstruct IsolationFunctor {\n    int work_size;\n    IsolationFunctor(int ws) : work_size(ws) {}\n    void operator()() const {\n        tbb::parallel_for( tbb::blocked_range<int>(0, work_size), CommonBody<PRIORITIZED_WORK>(),\n                           tbb::simple_partitioner() );\n    }\n};\n\ntemplate<>\nvoid do_node_work<PRIORITIZED_WORK>(int work_size) {\n    exec_tracker.prioritized_work_submitter = std::this_thread::get_id();\n    exec_tracker.prioritized_work_started = true;\n    tbb::this_task_arena::isolate( IsolationFunctor(work_size) );\n    exec_tracker.prioritized_work_finished = true;\n}\n\ntemplate<>\nvoid do_nested_work<PRIORITIZED_WORK>( const std::thread::id& tid,\n                                       const tbb::blocked_range<int>& /*subrange*/ ) {\n    if( exec_tracker.prioritized_work_started && exec_tracker.prioritized_work_submitter == tid ) {\n        CHECK_MESSAGE( !exec_tracker.prioritized_work_interrupted,\n                       \"Thread was not fully devoted to processing of prioritized task.\" );\n    } else {\n        // prolong processing of prioritized work so that the thread that started\n        // prioritized work has higher probability to help with non-prioritized one.\n        spin_for(0.1);\n    }\n}\n\n// Using pointers to nodes to avoid errors on compilers, which try to generate assignment operator\n// for the nodes\ntypedef std::vector< std::unique_ptr<continue_node<continue_msg>> > nodes_container_t;\n\nvoid create_nodes( nodes_container_t& nodes, graph& g, int num, int body_size ) {\n    for( int i = 0; i < num; ++i )\n        nodes.push_back(\n            std::unique_ptr<continue_node<continue_msg>>(\n                new continue_node<continue_msg>( g, CommonBody<NONPRIORITIZED_WORK>( body_size ) )\n            )\n        );\n}\n\nvoid test( int num_threads ) {\n    INFO( \"Testing limit execution to priority tasks (num_threads=\" << num_threads << \") - \" );\n\n    tbb::task_arena arena( num_threads );\n\tarena.execute(\n        [&]() {\n            const int nodes_num = 100;\n            const int priority_node_position_part = 10;\n            const int pivot = nodes_num / priority_node_position_part;\n            const int nodes_in_lane = 3 * num_threads;\n            const int small_problem_size = 100;\n            const int large_problem_size = 1000;\n\n            graph g;\n            nodes_container_t nodes;\n            create_nodes( nodes, g, pivot, large_problem_size );\n            nodes.push_back(\n                std::unique_ptr<continue_node<continue_msg>>(\n                    new continue_node<continue_msg>(\n                        g, CommonBody<PRIORITIZED_WORK>(small_problem_size), node_priority_t(1)\n                    )\n                )\n            );\n            create_nodes( nodes, g, nodes_num - pivot - 1, large_problem_size );\n\n            broadcast_node<continue_msg> bn(g);\n            for( int i = 0; i < nodes_num; ++i )\n                if( i % nodes_in_lane == 0 )\n                    make_edge( bn, *nodes[i] );\n                else\n                    make_edge( *nodes[i-1], *nodes[i] );\n            exec_tracker.reset();\n            bn.try_put( continue_msg() );\n            g.wait_for_all();\n        }\n\t);\n\n    INFO( \"done\\n\" );\n}\n\n} /* namespace LimitingExecutionToPriorityTask */\n\nnamespace NestedCase {\n\nusing tbb::task_arena;\n\nstruct InnerBody {\n    continue_msg operator()( const continue_msg& ) const {\n        return continue_msg();\n    }\n};\n\nstruct OuterBody {\n    int my_max_threads;\n    task_arena** my_inner_arena;\n    OuterBody( int max_threads, task_arena** inner_arena )\n        : my_max_threads(max_threads), my_inner_arena(inner_arena) {}\n    // copy constructor to please some old compilers\n    OuterBody( const OuterBody& rhs )\n        : my_max_threads(rhs.my_max_threads), my_inner_arena(rhs.my_inner_arena) {}\n    int operator()( const int& ) {\n        graph inner_graph;\n        continue_node<continue_msg> start_node(inner_graph, InnerBody());\n        continue_node<continue_msg> mid_node1(inner_graph, InnerBody(), node_priority_t(5));\n        continue_node<continue_msg> mid_node2(inner_graph, InnerBody());\n        continue_node<continue_msg> end_node(inner_graph, InnerBody(), node_priority_t(15));\n        make_edge( start_node, mid_node1 );\n        make_edge( mid_node1, end_node );\n        make_edge( start_node, mid_node2 );\n        make_edge( mid_node2, end_node );\n        (*my_inner_arena)->execute( [&inner_graph]{ inner_graph.reset(); } );\n        start_node.try_put( continue_msg() );\n        inner_graph.wait_for_all();\n        return 13;\n    }\n};\n\nvoid execute_outer_graph( bool same_arena, task_arena& inner_arena, int max_threads,\n                          graph& outer_graph, function_node<int,int>& start_node ) {\n    if( same_arena ) {\n        start_node.try_put( 42 );\n        outer_graph.wait_for_all();\n        return;\n    }\n\n    auto threads_range = utils::concurrency_range(max_threads);\n    for( auto num_threads : threads_range ) {\n        inner_arena.initialize( static_cast<int>(num_threads) );\n        start_node.try_put( 42 );\n        outer_graph.wait_for_all();\n        inner_arena.terminate();\n    }\n}\n\nvoid test_in_arena( int max_threads, task_arena& outer_arena, task_arena& inner_arena,\n                    graph& outer_graph, function_node<int, int>& start_node ) {\n    bool same_arena = &outer_arena == &inner_arena;\n    auto threads_range = utils::concurrency_range(max_threads);\n    for( auto num_threads : threads_range ) {\n        INFO( \"Testing nested nodes with specified priority in \" << (same_arena? \"same\" : \"different\")\n              << \" arenas, num_threads=\" << num_threads << \") - \" );\n        outer_arena.initialize( static_cast<int>(num_threads) );\n        outer_arena.execute( [&outer_graph]{ outer_graph.reset(); } );\n        execute_outer_graph( same_arena, inner_arena, max_threads, outer_graph, start_node );\n        outer_arena.terminate();\n        INFO( \"done\\n\" );\n    }\n}\n\nvoid test( int max_threads ) {\n    task_arena outer_arena; task_arena inner_arena;\n    task_arena* inner_arena_pointer = &outer_arena; // make it same as outer arena in the beginning\n\n    graph outer_graph;\n    const unsigned num_outer_nodes = 10;\n    const size_t concurrency = unlimited;\n    std::vector< std::unique_ptr<function_node<int,int>> > outer_nodes;\n    for( unsigned node_index = 0; node_index < num_outer_nodes; ++node_index ) {\n        node_priority_t priority = no_priority;\n        if( node_index == num_outer_nodes / 2 )\n            priority = 10;\n\n        outer_nodes.push_back(\n            std::unique_ptr< function_node<int, int> >(\n                new function_node<int,int>(\n                    outer_graph, concurrency, OuterBody(max_threads, &inner_arena_pointer), priority\n                )\n            )\n        );\n    }\n\n    for( unsigned node_index1 = 0; node_index1 < num_outer_nodes; ++node_index1 )\n        for( unsigned node_index2 = node_index1+1; node_index2 < num_outer_nodes; ++node_index2 )\n            make_edge( *outer_nodes[node_index1], *outer_nodes[node_index2] );\n\n    test_in_arena( max_threads, outer_arena, outer_arena, outer_graph, *outer_nodes[0] );\n\n    inner_arena_pointer = &inner_arena;\n\n    test_in_arena( max_threads, outer_arena, inner_arena, outer_graph, *outer_nodes[0] );\n}\n} // namespace NestedCase\n\n\nnamespace BypassPrioritizedTask {\n\nvoid common_body( int priority ) {\n    int current_task_index = g_task_num++;\n    g_task_info.push_back( TaskInfo( priority, current_task_index ) );\n}\n\nstruct Body {\n    Body( int priority ) : my_priority( priority ) {}\n    continue_msg operator()(const continue_msg&) {\n        common_body( my_priority );\n        return continue_msg();\n    }\n    int my_priority;\n};\n\nstruct InputNodeBody {\n    continue_msg operator()( tbb::flow_control& fc ){\n        static bool is_source_executed = false;\n\n        if( is_source_executed ) {\n            fc.stop();\n            return continue_msg();\n        }\n\n        common_body( 0 );\n        is_source_executed = true;\n\n        return continue_msg();\n    }\n};\n\ntemplate<typename StarterNodeType>\nStarterNodeType create_starter_node(graph& g) {\n    return continue_node<continue_msg>( g, Body(0) );\n}\n\ntemplate<>\ninput_node<continue_msg> create_starter_node<input_node<continue_msg>>(graph& g) {\n    return input_node<continue_msg>( g, InputNodeBody() );\n}\n\ntemplate<typename StarterNodeType>\nvoid start_graph( StarterNodeType& starter ) {\n    starter.try_put( continue_msg() );\n}\n\ntemplate<>\nvoid start_graph<input_node<continue_msg>>( input_node<continue_msg>& starter ) {\n    starter.activate();\n}\n\ntemplate<typename StarterNodeType>\nvoid test_use_case() {\n    g_task_info.clear();\n    g_task_num = 0;\n    graph g;\n    StarterNodeType starter = create_starter_node<StarterNodeType>(g);\n    continue_node<continue_msg> spawn_successor( g, Body(1), node_priority_t(1) );\n    continue_node<continue_msg> bypass_successor( g, Body(2), node_priority_t(2) );\n\n    make_edge( starter, spawn_successor );\n    make_edge( starter, bypass_successor );\n\n    start_graph<StarterNodeType>( starter );\n    g.wait_for_all();\n\n    CHECK_MESSAGE( g_task_info.size() == 3, \"\" );\n    CHECK_MESSAGE( g_task_info[0].my_task_index == 0, \"\" );\n    CHECK_MESSAGE( g_task_info[1].my_task_index == 1, \"\" );\n    CHECK_MESSAGE( g_task_info[2].my_task_index == 2, \"\" );\n\n    CHECK_MESSAGE( g_task_info[0].my_priority == 0, \"\" );\n    CHECK_MESSAGE( g_task_info[1].my_priority == 2, \"Bypassed task with higher priority executed in wrong order.\" );\n    CHECK_MESSAGE( g_task_info[2].my_priority == 1, \"\" );\n}\n\n//! The test checks that the task from the node with higher priority, which task gets bypassed, is\n//! executed first than the one spawned with lower priority.\nvoid test() {\n    test_use_case<continue_node<continue_msg>>();\n    test_use_case<input_node<continue_msg>>();\n}\n\n} // namespace BypassPrioritizedTask\n\nnamespace ManySuccessors {\n\nstruct no_priority_node_body {\n    void operator()(continue_msg) {\n        CHECK_MESSAGE(\n            barrier == 0, \"Non-priority successor has to be executed after all priority successors\"\n        );\n    }\n    std::atomic<int>& barrier;\n};\n\nstruct priority_node_body {\n    void operator()(continue_msg) {\n        --barrier;\n        while (barrier)\n            tbb::detail::d0::yield();\n    }\n    std::atomic<int>& barrier;\n};\n\nvoid test(int num_threads) {\n    tbb::task_arena arena( num_threads );\n    arena.execute(\n        [&]() {\n            graph g;\n            broadcast_node<continue_msg> bn(g);\n            std::vector< std::unique_ptr<continue_node<continue_msg>> > nodes;\n            std::atomic<int> barrier;\n            for (int i = 0; i < 2 * num_threads; ++i)\n                nodes.push_back(\n                    std::unique_ptr<continue_node<continue_msg>>(\n                        new continue_node<continue_msg>(g, no_priority_node_body{ barrier })\n                    )\n                );\n            for (int i = 0; i < num_threads; ++i)\n                nodes.push_back(\n                    std::unique_ptr<continue_node<continue_msg>>(\n                        new continue_node<continue_msg>(g, priority_node_body{ barrier }, /*priority*/1)\n                    )\n                );\n\n            std::random_device rd;\n            std::mt19937 gen(rd());\n\n            for (int trial = 0; trial < 10; ++trial) {\n                barrier = num_threads;\n                std::shuffle(nodes.begin(), nodes.end(), gen);\n                for (auto& n : nodes)\n                    make_edge(bn, *n);\n                bn.try_put(continue_msg());\n                g.wait_for_all();\n                for (auto& n : nodes)\n                    remove_edge(bn, *n);\n            }\n        }\n    );\n}\n\n} // namespace ManySuccessors\n\n#if TBB_USE_EXCEPTIONS\nnamespace Exceptions {\n    void test() {\n        using namespace tbb::flow;\n        graph g;\n        std::srand(42);\n        const unsigned num_messages = 50;\n        std::vector<unsigned> throwing_msgs;\n        std::atomic<unsigned> msg_count(0);\n        continue_node<unsigned> c(g, [&msg_count](continue_msg) {\n            return ++msg_count;\n        }, 2);\n        function_node<unsigned> f(g, unlimited, [&throwing_msgs](unsigned v) {\n            for( auto i : throwing_msgs ) {\n                if( i == v )\n                    throw std::runtime_error(\"Exception::test\");\n            }\n        }, 1);\n        make_edge(c, f);\n        for (int i = 0; i < 10; ++i) {\n            msg_count = 0;\n            g.reset();\n            throwing_msgs.push_back(std::rand() % num_messages);\n            try {\n                for (unsigned j = 0; j < num_messages; ++j) {\n                    c.try_put(continue_msg());\n                }\n                g.wait_for_all();\n                FAIL(\"Unreachable code. The exception is expected\");\n            } catch (std::runtime_error&) {\n                CHECK(g.is_cancelled());\n                CHECK(g.exception_thrown());\n            } catch (...) {\n                FAIL(\"Unexpected exception\");\n            }\n        }\n    }\n} // namespace Exceptions\n#endif\n\n//! Test node prioritization\n//! \\brief \\ref requirement\nTEST_CASE(\"Priority nodes take precedence\"){\n    for( auto p : utils::concurrency_range() ) {\n        PriorityNodesTakePrecedence::test( static_cast<int>(p) );\n    }\n}\n\n#if !EMSCRIPTEN\n//! Test thread eager reaction\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Thread eager reaction\"){\n    for( auto p : utils::concurrency_range() ) {\n        ThreadsEagerReaction::test( static_cast<int>(p) );\n    }\n}\n#endif\n\n//! Test prioritization under concurrency limits\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Limiting execution to prioritized work\") {\n    for( auto p : utils::concurrency_range() ) {\n        LimitingExecutionToPriorityTask::test( static_cast<int>(p) );\n    }\n}\n\n//! Test nested graphs\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Nested test case\") {\n    std::size_t max_threads = utils::get_platform_max_threads();\n    // The stepping for the threads is done inside.\n    NestedCase::test( static_cast<int>(max_threads) );\n}\n\n//! Test bypassed task with higher priority\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Bypass prioritized task\"){\n    tbb::global_control gc( tbb::global_control::max_allowed_parallelism, 1 );\n    BypassPrioritizedTask::test();\n}\n\n//! Test mixing prioritized and ordinary successors\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Many successors\") {\n    for( auto p : utils::concurrency_range() ) {\n        ManySuccessors::test( static_cast<int>(p) );\n    }\n}\n\n#if TBB_USE_EXCEPTIONS\n//! Test for exceptions\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Exceptions\") {\n    Exceptions::test();\n}\n#endif\n\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_flow_graph_whitebox.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/config.h\"\n\n#if _MSC_VER\n    #pragma warning (disable: 4503) // Suppress \"decorated name length exceeded, name was truncated\" warning\n    #if _MSC_VER==1700 && !defined(__INTEL_COMPILER)\n        // Suppress \"unreachable code\" warning by VC++ 17.0 (VS 2012)\n        #pragma warning (disable: 4702)\n    #endif\n#endif\n\n// need these to get proper external names for private methods in library.\n#include \"tbb/spin_mutex.h\"\n#include \"tbb/spin_rw_mutex.h\"\n#include \"tbb/task_arena.h\"\n#include \"tbb/task_group.h\"\n\n#define private public\n#define protected public\n#include \"tbb/flow_graph.h\"\n#undef protected\n#undef private\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/spin_barrier.h\"\n#include \"common/graph_utils.h\"\n\n#include <string> // merely prevents LNK2001 error to happen (on ICL+VC9 configurations)\n\n//! \\file test_flow_graph_whitebox.cpp\n//! \\brief Test for [flow_graph.broadcast_node flow_graph.priority_queue_node flow_graph.indexer_node flow_graph.sequencer_node flow_graph.remove_edge flow_graph.join_node flow_graph.split_node flow_graph.limiter_node flow_graph.write_once_node flow_graph.overwrite_node flow_graph.make_edge flow_graph.graph flow_graph.buffer_node flow_graph.function_node flow_graph.multifunction_node flow_graph.continue_node flow_graph.input_node] specification\n\ntemplate<typename T>\nstruct receiverBody {\n    tbb::flow::continue_msg operator()(const T &/*in*/) {\n        return tbb::flow::continue_msg();\n    }\n};\n\n// split_nodes cannot have predecessors\n// they do not reject messages and always forward.\n// they reject edge reversals from successors.\nvoid TestSplitNode() {\n    typedef tbb::flow::split_node<std::tuple<int> > snode_type;\n    tbb::flow::graph g;\n    snode_type snode(g);\n    tbb::flow::function_node<int> rcvr(g,tbb::flow::unlimited, receiverBody<int>());\n    INFO(\"Testing split_node\\n\");\n    CHECK_MESSAGE( (tbb::flow::output_port<0>(snode).my_successors.empty()), \"Constructed split_node has successors\");\n    // tbb::flow::output_port<0>(snode)\n    tbb::flow::make_edge(tbb::flow::output_port<0>(snode), rcvr);\n    CHECK_MESSAGE( (!(tbb::flow::output_port<0>(snode).my_successors.empty())), \"after make_edge, split_node has no successor.\");\n    snode.try_put(std::tuple<int>(1));\n    g.wait_for_all();\n    g.reset();\n    CHECK_MESSAGE( (!(tbb::flow::output_port<0>(snode).my_successors.empty())), \"after reset(), split_node has no successor.\");\n    g.reset(tbb::flow::rf_clear_edges);\n    CHECK_MESSAGE( (tbb::flow::output_port<0>(snode).my_successors.empty()), \"after reset(rf_clear_edges), split_node has a successor.\");\n}\n\n// buffering nodes cannot have predecessors\n// they do not reject messages and always save or forward\n// they allow edge reversals from successors\ntemplate< typename B >\nvoid TestBufferingNode(const char * name) {\n    tbb::flow::graph g;\n    B bnode(g);\n    tbb::flow::function_node<int,int,tbb::flow::rejecting> fnode(g, tbb::flow::serial, serial_fn_body<int>(serial_fn_state0));\n    INFO(\"Testing \" << name << \":\");\n    for(int icnt = 0; icnt < 2; icnt++) {\n        bool reverse_edge = (icnt & 0x2) != 0;\n        serial_fn_state0 = 0;  // reset to waiting state.\n        INFO(\" make_edge\");\n        tbb::flow::make_edge(bnode, fnode);\n        CHECK_MESSAGE( (!bnode.my_successors.empty()), \"buffering node has no successor after make_edge\");\n        std::thread t([&] {\n            INFO(\" try_put\");\n            bnode.try_put(1);  // will forward to the fnode\n            g.wait_for_all();\n        });\n        utils::SpinWaitWhileEq(serial_fn_state0, 0);\n        if(reverse_edge) {\n            INFO(\" try_put2\");\n            bnode.try_put(2);  // should reverse the edge\n            // waiting for the edge to reverse\n            utils::SpinWaitWhile([&] { return !bnode.my_successors.empty(); });\n        }\n        else {\n            CHECK_MESSAGE( (!bnode.my_successors.empty()), \"buffering node has no successor after forwarding message\");\n        }\n        serial_fn_state0 = 0;  // release the function_node.\n        if(reverse_edge) {\n            // have to do a second release because the function_node will get the 2nd item\n            utils::SpinWaitWhileEq(serial_fn_state0, 0);\n            serial_fn_state0 = 0;  // release the function_node.\n        }\n        t.join();\n        INFO(\" remove_edge\");\n        tbb::flow::remove_edge(bnode, fnode);\n        CHECK_MESSAGE( (bnode.my_successors.empty()), \"buffering node has a successor after remove_edge\");\n    }\n    tbb::flow::join_node<std::tuple<int,int>,tbb::flow::reserving> jnode(g);\n    tbb::flow::make_edge(bnode, tbb::flow::input_port<0>(jnode));  // will spawn a task\n    g.wait_for_all();\n    CHECK_MESSAGE( (!bnode.my_successors.empty()), \"buffering node has no successor after attaching to join\");\n    INFO(\" reverse\");\n    bnode.try_put(1);  // the edge should reverse\n    g.wait_for_all();\n    CHECK_MESSAGE( (bnode.my_successors.empty()), \"buffering node has a successor after reserving\");\n    INFO(\" reset()\");\n    g.wait_for_all();\n    g.reset();  // should be in forward direction again\n    CHECK_MESSAGE( (!bnode.my_successors.empty()), \"buffering node has no successor after reset()\");\n    INFO(\" remove_edge\");\n    g.reset(tbb::flow::rf_clear_edges);\n    CHECK_MESSAGE( (bnode.my_successors.empty()), \"buffering node has a successor after reset(rf_clear_edges)\");\n    tbb::flow::make_edge(bnode, tbb::flow::input_port<0>(jnode));  // add edge again\n    // reverse edge by adding to buffer.\n    bnode.try_put(1);  // the edge should reverse\n    g.wait_for_all();\n    CHECK_MESSAGE( (bnode.my_successors.empty()), \"buffering node has a successor after reserving\");\n    INFO(\" remove_edge(reversed)\");\n    g.reset(tbb::flow::rf_clear_edges);\n    CHECK_MESSAGE( (bnode.my_successors.empty()), \"buffering node has no successor after reset()\");\n    CHECK_MESSAGE( (tbb::flow::input_port<0>(jnode).my_predecessors.empty()), \"predecessor not reset\");\n    INFO(\"  done\\n\");\n    g.wait_for_all();\n}\n\n// continue_node has only predecessor count\n// they do not have predecessors, only the counts\n// successor edges cannot be reversed\nvoid TestContinueNode() {\n    tbb::flow::graph g;\n    tbb::flow::function_node<int> fnode0(g, tbb::flow::serial, serial_fn_body<int>(serial_fn_state0));\n    tbb::flow::continue_node<int> cnode(g, /*number_of_predecessors*/ 1,\n                                        serial_continue_body<int>(serial_continue_state0));\n    tbb::flow::function_node<int> fnode1(g, tbb::flow::serial, serial_fn_body<int>(serial_fn_state1));\n    tbb::flow::make_edge(fnode0, cnode);\n    tbb::flow::make_edge(cnode, fnode1);\n    INFO(\"Testing continue_node:\");\n    for( int icnt = 0; icnt < 2; ++icnt ) {\n        INFO( \" initial\" << icnt);\n        CHECK_MESSAGE( (cnode.my_predecessor_count == 2), \"predecessor addition didn't increment count\");\n        CHECK_MESSAGE( (!cnode.successors().empty()), \"successors empty though we added one\");\n        CHECK_MESSAGE( (cnode.my_current_count == 0), \"state of continue_receiver incorrect\");\n        serial_continue_state0 = 0;\n        serial_fn_state0 = 0;\n        serial_fn_state1 = 0;\n\n        std::thread t([&] {\n            fnode0.try_put(1);  // start the first function node.\n            if(icnt == 0) {  // first time through, let the continue_node fire\n                INFO(\" firing\");\n                fnode0.try_put(1);  // second message\n                g.wait_for_all();\n\n                // try a try_get()\n                {\n                    int i;\n                    CHECK_MESSAGE( (!cnode.try_get(i)), \"try_get not rejected\");\n                }\n\n                INFO(\" reset\");\n                CHECK_MESSAGE( (!cnode.my_successors.empty()), \"Empty successors in built graph (before reset)\");\n                CHECK_MESSAGE( (cnode.my_predecessor_count == 2), \"predecessor_count reset (before reset)\");\n                g.reset();  // should still be the same\n                CHECK_MESSAGE( (!cnode.my_successors.empty()), \"Empty successors in built graph (after reset)\" );\n                CHECK_MESSAGE( (cnode.my_predecessor_count == 2), \"predecessor_count reset (after reset)\");\n            }\n            else {  // we're going to see if the rf_clear_edges resets things.\n                g.wait_for_all();\n                INFO(\" reset(rf_clear_edges)\");\n                CHECK_MESSAGE( (!cnode.my_successors.empty()), \"Empty successors in built graph (before reset)\" );\n                CHECK_MESSAGE( (cnode.my_predecessor_count == 2), \"predecessor_count reset (before reset)\" );\n                g.reset(tbb::flow::rf_clear_edges);  // should be in forward direction again\n                CHECK_MESSAGE( (cnode.my_current_count == 0), \"state of continue_receiver incorrect after reset(rf_clear_edges)\" );\n                CHECK_MESSAGE( (cnode.my_successors.empty()), \"buffering node has a successor after reset(rf_clear_edges)\" );\n                CHECK_MESSAGE( (cnode.my_predecessor_count == cnode.my_initial_predecessor_count), \"predecessor count not reset\" );\n            }\n        });\n\n        utils::SpinWaitWhileEq(serial_fn_state0, 0); // waiting for the first message to arrive in function_node\n        // Now the body of function_node 0 is executing.\n        serial_fn_state0 = 0;  // release the node\n        if (icnt == 0) {\n            // wait for node to count the message (or for the node body to execute, which would be wrong)\n            utils::SpinWaitWhile([&] {\n                tbb::spin_mutex::scoped_lock l(cnode.my_mutex);\n                return serial_continue_state0 == 0 && cnode.my_current_count == 0;\n            });\n            CHECK_MESSAGE( (serial_continue_state0 == 0), \"Improperly released continue_node\");\n            CHECK_MESSAGE( (cnode.my_current_count == 1), \"state of continue_receiver incorrect\");\n\n            utils::SpinWaitWhileEq(serial_fn_state0, 0); // waiting for the second message to arrive in function_node\n            // Now the body of function_node 0 is executing.\n            serial_fn_state0 = 0;  // release the node\n\n            utils::SpinWaitWhileEq(serial_continue_state0, 0); // waiting for continue_node to start\n            CHECK_MESSAGE( (cnode.my_current_count == 0), \" my_current_count not reset before body of continue_node started\");\n            serial_continue_state0 = 0;  // release the continue_node\n\n            utils::SpinWaitWhileEq(serial_fn_state1, 0); // wait for the successor function_node to enter body\n            serial_fn_state1 = 0;  // release successor function_node.\n        }\n\n        t.join();\n    }\n\n    INFO(\" done\\n\");\n\n}\n\n// function_node has predecessors and successors\n// try_get() rejects\n// successor edges cannot be reversed\n// predecessors will reverse (only rejecting will reverse)\nvoid TestFunctionNode() {\n    tbb::flow::graph g;\n    tbb::flow::queue_node<int> qnode0(g);\n    tbb::flow::function_node<int,int,   tbb::flow::rejecting > fnode0(g, tbb::flow::serial, serial_fn_body<int>(serial_fn_state0));\n    tbb::flow::function_node<int,int/*, tbb::flow::queueing*/> fnode1(g, tbb::flow::serial, serial_fn_body<int>(serial_fn_state0));\n\n    tbb::flow::queue_node<int> qnode1(g);\n\n    tbb::flow::make_edge(fnode0, qnode1);\n    tbb::flow::make_edge(qnode0, fnode0);\n\n    serial_fn_state0 = 2;  // just let it go\n    qnode0.try_put(1);\n    g.wait_for_all();\n    int ii;\n    CHECK_MESSAGE( (qnode1.try_get(ii) && ii == 1), \"output not passed\" );\n    tbb::flow::remove_edge(qnode0, fnode0);\n    tbb::flow::remove_edge(fnode0, qnode1);\n\n    tbb::flow::make_edge(fnode1, qnode1);\n    tbb::flow::make_edge(qnode0, fnode1);\n\n    serial_fn_state0 = 2;  // just let it go\n    qnode0.try_put(1);\n    g.wait_for_all();\n    CHECK_MESSAGE( (qnode1.try_get(ii) && ii == 1), \"output not passed\" );\n    tbb::flow::remove_edge(qnode0, fnode1);\n    tbb::flow::remove_edge(fnode1, qnode1);\n\n    // rejecting\n    serial_fn_state0 = 0;\n    std::atomic<bool> rejected{ false };\n    std::thread t([&] {\n        g.reset(); // attach to the current arena\n        tbb::flow::make_edge(fnode0, qnode1);\n        tbb::flow::make_edge(qnode0, fnode0); // TODO: invesigate why it always creates a forwarding task\n        INFO(\"Testing rejecting function_node:\");\n        CHECK_MESSAGE( (!fnode0.my_queue), \"node should have no queue\");\n        CHECK_MESSAGE( (!fnode0.my_successors.empty()), \"successor edge not added\");\n        qnode0.try_put(1);\n        qnode0.try_put(2);   // rejecting node should reject, reverse.\n        rejected = true;\n        g.wait_for_all();\n    });\n    utils::SpinWaitWhileEq(serial_fn_state0, 0); // waiting rejecting node to start\n    utils::SpinWaitWhileEq(rejected, false);\n    // TODO: the assest below is not stable due to the logical race between try_put(1)\n    // try_put(2) and wait_for_all.\n    // Additionally, empty() cannot be called concurrently due to null_mutex used in implementation\n    // CHECK(fnode0.my_predecessors.empty() == false);\n    serial_fn_state0 = 2;   // release function_node body.\n    t.join();\n    INFO(\" reset\");\n    g.reset();  // should reverse the edge from the input to the function node.\n    CHECK_MESSAGE( (!qnode0.my_successors.empty()), \"empty successors after reset()\");\n    CHECK_MESSAGE( (fnode0.my_predecessors.empty()), \"predecessor not reversed\");\n    tbb::flow::remove_edge(qnode0, fnode0);\n    tbb::flow::remove_edge(fnode0, qnode1);\n    INFO(\"\\n\");\n\n    // queueing\n    tbb::flow::make_edge(fnode1, qnode1);\n    INFO(\"Testing queueing function_node:\");\n    CHECK_MESSAGE( (fnode1.my_queue), \"node should have no queue\");\n    CHECK_MESSAGE( (!fnode1.my_successors.empty()), \"successor edge not added\");\n    INFO(\" add_pred\");\n    CHECK_MESSAGE( (fnode1.register_predecessor(qnode0)), \"Cannot register as predecessor\");\n    CHECK_MESSAGE( (!fnode1.my_predecessors.empty()), \"Missing predecessor\");\n    INFO(\" reset\");\n    g.wait_for_all();\n    g.reset();  // should reverse the edge from the input to the function node.\n    CHECK_MESSAGE( (!qnode0.my_successors.empty()), \"empty successors after reset()\");\n    CHECK_MESSAGE( (fnode1.my_predecessors.empty()), \"predecessor not reversed\");\n    tbb::flow::remove_edge(qnode0, fnode1);\n    tbb::flow::remove_edge(fnode1, qnode1);\n    INFO(\"\\n\");\n\n    serial_fn_state0 = 0;  // make the function_node wait\n    rejected = false;\n    std::thread t2([&] {\n        g.reset(); // attach to the current arena\n\n        tbb::flow::make_edge(qnode0, fnode0); // TODO: invesigate why it always creates a forwarding task\n\n        INFO(\" start_func\");\n        qnode0.try_put(1);\n        // now if we put an item to the queues the edges to the function_node will reverse.\n        INFO(\" put_node(2)\");\n        qnode0.try_put(2);   // start queue node.\n        rejected = true;\n        g.wait_for_all();\n    });\n    utils::SpinWaitWhileEq(serial_fn_state0, 0); // waiting rejecting node to start\n    // wait for the edges to reverse\n    utils::SpinWaitWhileEq(rejected, false);\n    // TODO: the assest below is not stable due to the logical race between try_put(1)\n    // try_put(2) and wait_for_all.\n    // Additionally, empty() cannot be called concurrently due to null_mutex used in implementation\n    // CHECK(fnode0.my_predecessors.empty() == false);\n    g.my_context->cancel_group_execution();\n    // release the function_node\n    serial_fn_state0 = 2;\n    t2.join();\n    g.reset(tbb::flow::rf_clear_edges);\n    CHECK_MESSAGE( (fnode0.my_predecessors.empty() && qnode0.my_successors.empty()), \"function_node edge not removed\");\n    CHECK_MESSAGE( (fnode0.my_successors.empty()), \"successor to fnode not removed\");\n    INFO(\" done\\n\");\n}\n\ntemplate<typename TT>\nclass tag_func {\n    TT my_mult;\npublic:\n    tag_func(TT multiplier) : my_mult(multiplier) { }\n    // operator() will return [0 .. Count)\n    tbb::flow::tag_value operator()( TT v) {\n        tbb::flow::tag_value t = tbb::flow::tag_value(v / my_mult);\n        return t;\n    }\n};\n\ntemplate<typename JNODE_TYPE>\nvoid\nTestSimpleSuccessorArc(const char *name) {\n    tbb::flow::graph g;\n    {\n        INFO(\"Join<\" << name << \"> successor test \");\n        tbb::flow::join_node<std::tuple<int>, JNODE_TYPE> qj(g);\n        tbb::flow::broadcast_node<std::tuple<int> > bnode(g);\n        tbb::flow::make_edge(qj, bnode);\n        CHECK_MESSAGE( (!qj.my_successors.empty()),\"successor missing after linking\");\n        g.reset();\n        CHECK_MESSAGE( (!qj.my_successors.empty()),\"successor missing after reset()\");\n        g.reset(tbb::flow::rf_clear_edges);\n        CHECK_MESSAGE( (qj.my_successors.empty()), \"successors not removed after reset(rf_clear_edges)\");\n    }\n}\n\ntemplate<>\nvoid\nTestSimpleSuccessorArc<tbb::flow::tag_matching>(const char *name) {\n    tbb::flow::graph g;\n    {\n        INFO(\"Join<\" << name << \"> successor test \");\n        typedef std::tuple<int,int> my_tuple;\n        tbb::flow::join_node<my_tuple, tbb::flow::tag_matching> qj(g,\n                                                                   tag_func<int>(1),\n                                                                   tag_func<int>(1)\n        );\n        tbb::flow::broadcast_node<my_tuple > bnode(g);\n        tbb::flow::make_edge(qj, bnode);\n        CHECK_MESSAGE( (!qj.my_successors.empty()),\"successor missing after linking\");\n        g.reset();\n        CHECK_MESSAGE( (!qj.my_successors.empty()),\"successor missing after reset()\");\n        g.reset(tbb::flow::rf_clear_edges);\n        CHECK_MESSAGE( (qj.my_successors.empty()), \"successors not removed after reset(rf_clear_edges)\");\n    }\n}\n\nvoid\nTestJoinNode() {\n    tbb::flow::graph g;\n\n    TestSimpleSuccessorArc<tbb::flow::queueing>(\"queueing\");\n    TestSimpleSuccessorArc<tbb::flow::reserving>(\"reserving\");\n    TestSimpleSuccessorArc<tbb::flow::tag_matching>(\"tag_matching\");\n\n    // queueing and tagging join nodes have input queues, so the input ports do not reverse.\n    INFO(\" reserving preds\");\n    {\n        tbb::flow::join_node<std::tuple<int,int>, tbb::flow::reserving> rj(g);\n        tbb::flow::queue_node<int> q0(g);\n        tbb::flow::queue_node<int> q1(g);\n        tbb::flow::make_edge(q0,tbb::flow::input_port<0>(rj));\n        tbb::flow::make_edge(q1,tbb::flow::input_port<1>(rj));\n        q0.try_put(1);\n        g.wait_for_all();  // quiesce\n        CHECK_MESSAGE( (!(tbb::flow::input_port<0>(rj).my_predecessors.empty())),\"reversed port missing predecessor\");\n        CHECK_MESSAGE( ((tbb::flow::input_port<1>(rj).my_predecessors.empty())),\"non-reversed port has pred\");\n        g.reset();\n        CHECK_MESSAGE( ((tbb::flow::input_port<0>(rj).my_predecessors.empty())),\"reversed port has pred after reset()\");\n        CHECK_MESSAGE( ((tbb::flow::input_port<1>(rj).my_predecessors.empty())),\"non-reversed port has pred after reset()\");\n        q1.try_put(2);\n        g.wait_for_all();  // quiesce\n        CHECK_MESSAGE( (!(tbb::flow::input_port<1>(rj).my_predecessors.empty())),\"reversed port missing predecessor\");\n        CHECK_MESSAGE( ((tbb::flow::input_port<0>(rj).my_predecessors.empty())),\"non-reversed port has pred\");\n        g.reset();\n        CHECK_MESSAGE( ((tbb::flow::input_port<1>(rj).my_predecessors.empty())),\"reversed port has pred after reset()\");\n        CHECK_MESSAGE( ((tbb::flow::input_port<0>(rj).my_predecessors.empty())),\"non-reversed port has pred after reset()\");\n        // should reset predecessors just as regular reset.\n        q1.try_put(3);\n        g.wait_for_all();  // quiesce\n        CHECK_MESSAGE( (!(tbb::flow::input_port<1>(rj).my_predecessors.empty())),\"reversed port missing predecessor\");\n        CHECK_MESSAGE( ((tbb::flow::input_port<0>(rj).my_predecessors.empty())),\"non-reversed port has pred\");\n        g.reset(tbb::flow::rf_clear_edges);\n        CHECK_MESSAGE( ((tbb::flow::input_port<1>(rj).my_predecessors.empty())),\"reversed port has pred after reset()\");\n        CHECK_MESSAGE( ((tbb::flow::input_port<0>(rj).my_predecessors.empty())),\"non-reversed port has pred after reset()\");\n        CHECK_MESSAGE( (q0.my_successors.empty()), \"edge not removed by reset(rf_clear_edges)\");\n        CHECK_MESSAGE( (q1.my_successors.empty()), \"edge not removed by reset(rf_clear_edges)\");\n    }\n    INFO(\" done\\n\");\n}\n\ntemplate <typename DecrementerType>\nstruct limiter_node_type {\n    using type = tbb::flow::limiter_node<int, DecrementerType>;\n    using dtype = DecrementerType;\n};\n\ntemplate <>\nstruct limiter_node_type<void> {\n    using type = tbb::flow::limiter_node<int>;\n    using dtype = tbb::flow::continue_msg;\n};\n\ntemplate <typename DType>\nstruct DecrementerHelper {\n    template <typename Decrementer>\n    static void check(Decrementer&) {}\n    static DType makeDType() {\n        return DType(1);\n    }\n};\n\ntemplate <>\nstruct DecrementerHelper<tbb::flow::continue_msg> {\n    template <typename Decrementer>\n    static void check(Decrementer& decrementer) {\n        auto& d = static_cast<tbb::detail::d2::continue_receiver&>(decrementer);\n        CHECK_MESSAGE(d.my_predecessor_count == 0, \"error in pred count\");\n        CHECK_MESSAGE(d.my_initial_predecessor_count == 0, \"error in initial pred count\");\n        CHECK_MESSAGE(d.my_current_count == 0, \"error in current count\");\n    }\n    static tbb::flow::continue_msg makeDType() {\n        return tbb::flow::continue_msg();\n    }\n};\n\ntemplate <typename DecrementerType>\nvoid TestLimiterNode() {\n    int out_int{};\n    tbb::flow::graph g;\n    using dtype = typename limiter_node_type<DecrementerType>::dtype;\n    typename limiter_node_type<DecrementerType>::type ln(g,1);\n    INFO(\"Testing limiter_node: preds and succs\");\n    DecrementerHelper<dtype>::check(ln.decrementer());\n    CHECK_MESSAGE( (ln.my_threshold == 1), \"error in my_threshold\");\n    tbb::flow::queue_node<int> inq(g);\n    tbb::flow::queue_node<int> outq(g);\n    tbb::flow::broadcast_node<dtype> bn(g);\n\n    tbb::flow::make_edge(inq,ln);\n    tbb::flow::make_edge(ln,outq);\n    tbb::flow::make_edge(bn,ln.decrementer());\n\n    g.wait_for_all();\n    CHECK_MESSAGE( (!(ln.my_successors.empty())),\"successors empty after make_edge\");\n    CHECK_MESSAGE( (ln.my_predecessors.empty()), \"input edge reversed\");\n    inq.try_put(1);\n    g.wait_for_all();\n    CHECK_MESSAGE( (outq.try_get(out_int) && out_int == 1), \"limiter_node didn't pass first value\");\n    CHECK_MESSAGE( (ln.my_predecessors.empty()), \"input edge reversed\");\n    inq.try_put(2);\n    g.wait_for_all();\n    CHECK_MESSAGE( (!outq.try_get(out_int)), \"limiter_node incorrectly passed second input\");\n    CHECK_MESSAGE( (!ln.my_predecessors.empty()), \"input edge to limiter_node not reversed\");\n    bn.try_put(DecrementerHelper<dtype>::makeDType());\n    g.wait_for_all();\n    CHECK_MESSAGE( (outq.try_get(out_int) && out_int == 2), \"limiter_node didn't pass second value\");\n    g.wait_for_all();\n    CHECK_MESSAGE( (!ln.my_predecessors.empty()), \"input edge was reversed(after try_get())\");\n    g.reset();\n    CHECK_MESSAGE( (ln.my_predecessors.empty()), \"input edge not reset\");\n    inq.try_put(3);\n    g.wait_for_all();\n    CHECK_MESSAGE( (outq.try_get(out_int) && out_int == 3), \"limiter_node didn't pass third value\");\n\n    INFO(\" rf_clear_edges\");\n    // currently the limiter_node will not pass another message\n    g.reset(tbb::flow::rf_clear_edges);\n    DecrementerHelper<dtype>::check(ln.decrementer());\n    CHECK_MESSAGE( (ln.my_threshold == 1), \"error in my_threshold\");\n    CHECK_MESSAGE( (ln.my_predecessors.empty()), \"preds not reset(rf_clear_edges)\");\n    CHECK_MESSAGE( (ln.my_successors.empty()), \"preds not reset(rf_clear_edges)\");\n    CHECK_MESSAGE( (inq.my_successors.empty()), \"Arc not removed on reset(rf_clear_edges)\");\n    CHECK_MESSAGE( (inq.my_successors.empty()), \"Arc not removed on reset(rf_clear_edges)\");\n    CHECK_MESSAGE( (bn.my_successors.empty()), \"control edge not removed on reset(rf_clear_edges)\");\n    tbb::flow::make_edge(inq,ln);\n    tbb::flow::make_edge(ln,outq);\n    inq.try_put(4);\n    inq.try_put(5);\n    g.wait_for_all();\n    CHECK_MESSAGE( (outq.try_get(out_int)),\"missing output after reset(rf_clear_edges)\");\n    CHECK_MESSAGE( (out_int == 4), \"input incorrect (4)\");\n    bn.try_put(DecrementerHelper<dtype>::makeDType());\n    g.wait_for_all();\n    CHECK_MESSAGE( (!outq.try_get(out_int)),\"second output incorrectly passed (rf_clear_edges)\");\n    INFO(\" done\\n\");\n}\n\ntemplate<typename MF_TYPE>\nstruct mf_body {\n    std::atomic<int>& my_flag;\n    mf_body(std::atomic<int>& flag) : my_flag(flag) { }\n    void operator()(const int& in, typename MF_TYPE::output_ports_type& outports) {\n        if(my_flag == 0) {\n            my_flag = 1;\n\n            utils::SpinWaitWhileEq(my_flag, 1);\n        }\n\n        if (in & 0x1)\n            std::get<1>(outports).try_put(in);\n        else\n            std::get<0>(outports).try_put(in);\n    }\n};\n\ntemplate<typename P, typename T>\nstruct test_reversal;\ntemplate<typename T>\nstruct test_reversal<tbb::flow::queueing, T> {\n    test_reversal() { INFO(\"<queueing>\"); }\n    // queueing node will not reverse.\n    bool operator()(T& node) const { return node.my_predecessors.empty(); }\n};\n\ntemplate<typename T>\nstruct test_reversal<tbb::flow::rejecting, T> {\n    test_reversal() { INFO(\"<rejecting>\"); }\n    bool operator()(T& node) const { return !node.my_predecessors.empty(); }\n};\n\ntemplate<typename P>\nvoid TestMultifunctionNode() {\n    typedef tbb::flow::multifunction_node<int, std::tuple<int, int>, P> multinode_type;\n    INFO(\"Testing multifunction_node\");\n    test_reversal<P,multinode_type> my_test;\n    INFO(\":\");\n    tbb::flow::graph g;\n    multinode_type mf(g, tbb::flow::serial, mf_body<multinode_type>(serial_fn_state0));\n    tbb::flow::queue_node<int> qin(g);\n    tbb::flow::queue_node<int> qodd_out(g);\n    tbb::flow::queue_node<int> qeven_out(g);\n    tbb::flow::make_edge(qin,mf);\n    tbb::flow::make_edge(tbb::flow::output_port<0>(mf), qeven_out);\n    tbb::flow::make_edge(tbb::flow::output_port<1>(mf), qodd_out);\n    g.wait_for_all();\n    for (int ii = 0; ii < 2 ; ++ii) {\n        std::atomic<bool> submitted{ false };\n        serial_fn_state0 = 0;\n        /* if(ii == 0) REMARK(\" reset preds\"); else REMARK(\" 2nd\");*/\n        std::thread t([&] {\n            g.reset(); // attach to the current arena\n            qin.try_put(0);\n            qin.try_put(1);\n            submitted = true;\n            g.wait_for_all();\n        });\n        // wait for node to be active\n        utils::SpinWaitWhileEq(serial_fn_state0, 0);\n        utils::SpinWaitWhileEq(submitted, false);\n        g.my_context->cancel_group_execution();\n        // release node\n        serial_fn_state0 = 2;\n        t.join();\n        // The rejection test cannot guarantee the state of predecessors cache.\n        if (!std::is_same<P, tbb::flow::rejecting>::value) {\n            CHECK_MESSAGE((my_test(mf)), \"fail cancel group test\");\n        }\n        if( ii == 1) {\n            INFO(\" rf_clear_edges\");\n            g.reset(tbb::flow::rf_clear_edges);\n            CHECK_MESSAGE( (tbb::flow::output_port<0>(mf).my_successors.empty()), \"output_port<0> not reset (rf_clear_edges)\");\n            CHECK_MESSAGE( (tbb::flow::output_port<1>(mf).my_successors.empty()), \"output_port<1> not reset (rf_clear_edges)\");\n        }\n        else\n        {\n            g.reset();\n        }\n        CHECK_MESSAGE( (mf.my_predecessors.empty()), \"edge didn't reset\");\n        CHECK_MESSAGE( ((ii == 0 && !qin.my_successors.empty()) || (ii == 1 && qin.my_successors.empty())), \"edge didn't reset\");\n    }\n    INFO(\" done\\n\");\n}\n\n// indexer_node is like a broadcast_node, in that none of its inputs reverse, and it\n// never allows a successor to reverse its edge, so we only need test the successors.\nvoid\nTestIndexerNode() {\n    tbb::flow::graph g;\n    typedef tbb::flow::indexer_node< int, int > indexernode_type;\n    indexernode_type inode(g);\n    INFO(\"Testing indexer_node:\");\n    tbb::flow::queue_node<indexernode_type::output_type> qout(g);\n    tbb::flow::make_edge(inode,qout);\n    g.wait_for_all();\n    CHECK_MESSAGE( (!inode.my_successors.empty()), \"successor of indexer_node missing\");\n    g.reset();\n    CHECK_MESSAGE( (!inode.my_successors.empty()), \"successor of indexer_node missing after reset\");\n    g.reset(tbb::flow::rf_clear_edges);\n    CHECK_MESSAGE( (inode.my_successors.empty()), \"successor of indexer_node not removed by reset(rf_clear_edges)\");\n    INFO(\" done\\n\");\n}\n\ntemplate<typename Node>\nvoid\nTestScalarNode(const char *name) {\n    tbb::flow::graph g;\n    Node on(g);\n    tbb::flow::queue_node<int> qout(g);\n    INFO(\"Testing \" << name << \":\");\n    tbb::flow::make_edge(on,qout);\n    g.wait_for_all();\n    CHECK_MESSAGE( (!on.my_successors.empty()), \"edge not added\");\n    g.reset();\n    CHECK_MESSAGE( (!on.my_successors.empty()), \"edge improperly removed\");\n    g.reset(tbb::flow::rf_clear_edges);\n    CHECK_MESSAGE( (on.my_successors.empty()), \"edge not removed by reset(rf_clear_edges)\");\n    INFO(\" done\\n\");\n}\n\nstruct seq_body {\n    size_t operator()(const int &in) {\n        return size_t(in / 3);\n    }\n};\n\n// sequencer_node behaves like a queueing node, but requires a different constructor.\nvoid TestSequencerNode() {\n    tbb::flow::graph g;\n    tbb::flow::sequencer_node<int> bnode(g, seq_body());\n    INFO(\"Testing sequencer_node:\");\n    tbb::flow::function_node<int> fnode(g, tbb::flow::serial, serial_fn_body<int>(serial_fn_state0));\n    INFO(\"Testing sequencer_node:\");\n    serial_fn_state0 = 0;  // reset to waiting state.\n    INFO(\" make_edge\");\n    tbb::flow::make_edge(bnode, fnode);\n    CHECK_MESSAGE( (!bnode.my_successors.empty()), \"buffering node has no successor after make_edge\" );\n    INFO(\" try_put\");\n    std::thread t([&]{\n        bnode.try_put(0);  // will forward to the fnode\n        g.wait_for_all();\n    });\n    // wait for the function_node to fire up\n    utils::SpinWaitWhileEq(serial_fn_state0, 0);\n    CHECK_MESSAGE( (!bnode.my_successors.empty()), \"buffering node has no successor after forwarding message\" );\n    serial_fn_state0 = 0;       // release the function node\n    t.join();\n\n    INFO(\" remove_edge\");\n    tbb::flow::remove_edge(bnode, fnode);\n    CHECK_MESSAGE( (bnode.my_successors.empty()), \"buffering node has a successor after remove_edge\");\n    tbb::flow::join_node<std::tuple<int,int>,tbb::flow::reserving> jnode(g);\n    tbb::flow::make_edge(bnode, tbb::flow::input_port<0>(jnode));  // will spawn a task\n    g.wait_for_all();\n    CHECK_MESSAGE( (!bnode.my_successors.empty()), \"buffering node has no successor after attaching to join\");\n    INFO(\" reverse\");\n    bnode.try_put(3);  // the edge should reverse\n    g.wait_for_all();\n    CHECK_MESSAGE( (bnode.my_successors.empty()), \"buffering node has a successor after reserving\");\n    INFO(\" reset()\");\n    g.wait_for_all();\n    g.reset();  // should be in forward direction again\n    CHECK_MESSAGE( (!bnode.my_successors.empty()), \"buffering node has no successor after reset()\");\n    INFO(\" remove_edge\");\n    g.reset(tbb::flow::rf_clear_edges);  // should be in forward direction again\n    CHECK_MESSAGE( (bnode.my_successors.empty()), \"buffering node has a successor after reset(rf_clear_edges)\");\n    CHECK_MESSAGE( (fnode.my_predecessors.empty()), \"buffering node reversed after reset(rf_clear_edges)\");\n    INFO(\"  done\\n\");\n    g.wait_for_all();\n}\n\nstruct snode_body {\n    int max_cnt;\n    int my_cnt;\n    snode_body(const int& in) : max_cnt(in) { my_cnt = 0; }\n    int operator()(tbb::flow_control& fc) {\n        if (max_cnt <= my_cnt++) {\n            fc.stop();\n            return int();\n        }\n        return my_cnt;\n    }\n};\n\nvoid TestInputNode() {\n    tbb::flow::graph g;\n    tbb::flow::input_node<int> in(g, snode_body(4));\n    INFO(\"Testing input_node:\");\n    tbb::flow::queue_node<int> qin(g);\n    tbb::flow::join_node<std::tuple<int,int>, tbb::flow::reserving> jn(g);\n    tbb::flow::queue_node<std::tuple<int,int> > qout(g);\n\n    INFO(\" make_edges\");\n    tbb::flow::make_edge(in, tbb::flow::input_port<0>(jn));\n    tbb::flow::make_edge(qin, tbb::flow::input_port<1>(jn));\n    tbb::flow::make_edge(jn,qout);\n    CHECK_MESSAGE( (!in.my_successors.empty()), \"input node has no successor after make_edge\");\n    g.wait_for_all();\n    g.reset();\n    CHECK_MESSAGE( (!in.my_successors.empty()), \"input node has no successor after reset\");\n    g.wait_for_all();\n    g.reset(tbb::flow::rf_clear_edges);\n    CHECK_MESSAGE( (in.my_successors.empty()), \"input node has successor after reset(rf_clear_edges)\");\n    tbb::flow::make_edge(in, tbb::flow::input_port<0>(jn));\n    tbb::flow::make_edge(qin, tbb::flow::input_port<1>(jn));\n    tbb::flow::make_edge(jn,qout);\n    g.wait_for_all();\n    INFO(\" activate\");\n    in.activate();  // will forward to the fnode\n    INFO(\" wait1\");\n    g.wait_for_all();\n    CHECK_MESSAGE( (in.my_successors.empty()), \"input node has no successor after forwarding message\");\n    g.reset();\n    CHECK_MESSAGE( (!in.my_successors.empty()), \"input_node has no successors after reset\");\n    CHECK_MESSAGE( (tbb::flow::input_port<0>(jn).my_predecessors.empty()), \"successor of input_node has pred after reset.\");\n    INFO(\" done\\n\");\n}\n\n//! Test buffering nodes\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test buffering nodes\"){\n    unsigned int MinThread = utils::MinThread;\n    if(MinThread < 3) MinThread = 3;\n    tbb::task_arena arena(MinThread);\n\tarena.execute(\n        [&]() {\n            // tests presume at least three threads\n            TestBufferingNode< tbb::flow::buffer_node<int> >(\"buffer_node\");\n            TestBufferingNode< tbb::flow::priority_queue_node<int> >(\"priority_queue_node\");\n            TestBufferingNode< tbb::flow::queue_node<int> >(\"queue_node\");\n        }\n\t);\n}\n\n//! Test sequencer_node\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test sequencer node\"){\n    TestSequencerNode();\n}\n\nTEST_SUITE(\"Test multifunction node\") {\n    //! Test multifunction_node with rejecting policy\n    //! \\brief \\ref error_guessing\n    TEST_CASE(\"with rejecting policy\"){\n        TestMultifunctionNode<tbb::flow::rejecting>();\n    }\n\n    //! Test multifunction_node with queueing policy\n    //! \\brief \\ref error_guessing\n    TEST_CASE(\"with queueing policy\") {\n        TestMultifunctionNode<tbb::flow::queueing>();\n    }\n}\n\n//! Test input_node\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test input node\"){\n    TestInputNode();\n}\n\n//! Test continue_node\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test continue node\"){\n    TestContinueNode();\n}\n\n//! Test function_node\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test function node\" * doctest::may_fail()){\n    TestFunctionNode();\n}\n\n//! Test join_node\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test join node\"){\n    TestJoinNode();\n}\n\n//! Test limiter_node\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test limiter node\"){\n    TestLimiterNode<void>();\n    TestLimiterNode<int>();\n    TestLimiterNode<tbb::flow::continue_msg>();\n}\n\n//! Test indexer_node\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test indexer node\"){\n    TestIndexerNode();\n}\n\n//! Test split_node\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test split node\"){\n    TestSplitNode();\n}\n\n//! Test broadcast, overwrite, write_once nodes\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test scalar node\"){\n    TestScalarNode<tbb::flow::broadcast_node<int> >(\"broadcast_node\");\n    TestScalarNode<tbb::flow::overwrite_node<int> >(\"overwrite_node\");\n    TestScalarNode<tbb::flow::write_once_node<int> >(\"write_once_node\");\n}\n\n//! try_get in inactive graph\n//! \\brief \\ref error_guessing\nTEST_CASE(\"try_get in inactive graph\"){\n    tbb::flow::graph g;\n\n    tbb::flow::input_node<int> src(g, [&](tbb::flow_control& fc) { fc.stop(); return 0;});\n    deactivate_graph(g);\n\n    int tmp = -1;\n    CHECK_MESSAGE((src.try_get(tmp) == false), \"try_get can not succeed\");\n\n    src.activate();\n    tmp = -1;\n    CHECK_MESSAGE((src.try_get(tmp) == false), \"try_get can not succeed\");\n}\n\n//! Test make_edge in inactive graph\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test make_edge in inactive graph\"){\n    tbb::flow::graph g;\n\n    tbb::flow::continue_node<int> c(g, [](const tbb::flow::continue_msg&){ return 1; });\n\n    tbb::flow::function_node<int, int> f(g, tbb::flow::serial, serial_fn_body<int>(serial_fn_state0));\n\n    c.try_put(tbb::flow::continue_msg());\n    g.wait_for_all();\n\n    deactivate_graph(g);\n\n    make_edge(c, f);\n}\n\n//! Test make_edge from overwrite_node in inactive graph\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test make_edge from overwrite_node in inactive graph\"){\n    tbb::flow::graph g;\n\n    tbb::flow::queue_node<int> q(g);\n\n    tbb::flow::overwrite_node<int> on(g);\n\n    on.try_put(1);\n    g.wait_for_all();\n\n    deactivate_graph(g);\n\n    make_edge(on, q);\n\n    int tmp = -1;\n    CHECK_MESSAGE((q.try_get(tmp) == false), \"Message should not be passed on\");\n}\n\n//! Test iterators directly\n//! \\brief \\ref error_guessing\nTEST_CASE(\"graph_iterator details\"){\n    tbb::flow::graph g;\n    const tbb::flow::graph cg;\n\n    tbb::flow::graph::iterator b = g.begin();\n    tbb::flow::graph::iterator b2 = g.begin();\n    ++b2;\n    // Cast to a volatile pointer to workaround self assignment warnings from some compilers.\n    tbb::flow::graph::iterator* volatile b2_ptr = &b2;\n    b2 = *b2_ptr;\n    b = b2;\n    CHECK_MESSAGE((b == b2), \"Assignment should make iterators equal\");\n}\n\n//! const graph\n//! \\brief \\ref error_guessing\nTEST_CASE(\"const graph\"){\n    using namespace tbb::flow;\n\n    const graph g;\n    CHECK_MESSAGE((g.cbegin() == g.cend()), \"Starting graph is empty\");\n    CHECK_MESSAGE((g.begin() == g.end()), \"Starting graph is empty\");\n\n    graph g2;\n    CHECK_MESSAGE((g2.begin() == g2.end()), \"Starting graph is empty\");\n}\n\n//! Send message to continue_node while graph is inactive\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Send message to continue_node while graph is inactive\") {\n    using namespace tbb::flow;\n\n    graph g;\n\n    continue_node<int> c(g, [](const continue_msg&){ return 1; });\n    buffer_node<int> b(g);\n\n    make_edge(c, b);\n\n    deactivate_graph(g);\n\n    c.try_put(continue_msg());\n    g.wait_for_all();\n\n    int tmp = -1;\n    CHECK_MESSAGE((b.try_get(tmp) == false), \"Message should not arrive\");\n    CHECK_MESSAGE((tmp == -1), \"Value should not be altered\");\n}\n\n\n//! Bypass of a successor's message in a node with lightweight policy\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Bypass of a successor's message in a node with lightweight policy\") {\n    using namespace tbb::flow;\n\n    graph g;\n\n    auto body = [](const int&v)->int { return v * 2; };\n    function_node<int, int, lightweight> f1(g, unlimited, body);\n\n    auto body2 = [](const int&v)->int {return v / 2;};\n    function_node<int, int> f2(g, unlimited, body2);\n\n    buffer_node<int> b(g);\n\n    make_edge(f1, f2);\n    make_edge(f2, b);\n\n    f1.try_put(1);\n    g.wait_for_all();\n\n    int tmp = -1;\n    CHECK_MESSAGE((b.try_get(tmp) == true), \"Functional nodes can work in succession\");\n    CHECK_MESSAGE((tmp == 1), \"Value should not be altered\");\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_function_node.cpp",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"common/config.h\"\n\n#include \"tbb/flow_graph.h\"\n#include \"tbb/spin_rw_mutex.h\"\n#include \"tbb/global_control.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/graph_utils.h\"\n#include \"common/test_follows_and_precedes_api.h\"\n#include \"common/concepts_common.h\"\n\n\n//! \\file test_function_node.cpp\n//! \\brief Test for [flow_graph.function_node] specification\n\n\n#define N 100\n#define MAX_NODES 4\n\n//! Performs test on function nodes with limited concurrency and buffering\n/** These tests check:\n    1) that the number of executing copies never exceed the concurrency limit\n    2) that the node never rejects\n    3) that no items are lost\n    and 4) all of this happens even if there are multiple predecessors and successors\n*/\n\ntemplate<typename IO>\nstruct pass_through {\n    IO operator()(const IO& i) { return i; }\n};\n\ntemplate< typename InputType, typename OutputType, typename Body >\nvoid buffered_levels( size_t concurrency, Body body ) {\n\n   // Do for lc = 1 to concurrency level\n   for ( size_t lc = 1; lc <= concurrency; ++lc ) {\n   tbb::flow::graph g;\n\n   // Set the execute_counter back to zero in the harness\n   harness_graph_executor<InputType, OutputType>::execute_count = 0;\n   // Set the number of current executors to zero.\n   harness_graph_executor<InputType, OutputType>::current_executors = 0;\n   // Set the max allowed executors to lc.  There is a check in the functor to make sure this is never exceeded.\n   harness_graph_executor<InputType, OutputType>::max_executors = lc;\n\n   // Create the function_node with the appropriate concurrency level, and use default buffering\n   tbb::flow::function_node< InputType, OutputType > exe_node( g, lc, body );\n   tbb::flow::function_node<InputType, InputType> pass_thru( g, tbb::flow::unlimited, pass_through<InputType>());\n\n   // Create a vector of identical exe_nodes and pass_thrus\n   std::vector< tbb::flow::function_node< InputType, OutputType > > exe_vec(2, exe_node);\n   std::vector< tbb::flow::function_node< InputType, InputType > > pass_thru_vec(2, pass_thru);\n   // Attach each pass_thru to its corresponding exe_node\n   for (size_t node_idx=0; node_idx<exe_vec.size(); ++node_idx) {\n       tbb::flow::make_edge(pass_thru_vec[node_idx], exe_vec[node_idx]);\n   }\n\n   // TODO: why the test is executed serially for the node pairs, not concurrently?\n   for (size_t node_idx=0; node_idx<exe_vec.size(); ++node_idx) {\n   // For num_receivers = 1 to MAX_NODES\n       for (size_t num_receivers = 1; num_receivers <= MAX_NODES; ++num_receivers ) {\n           // Create num_receivers counting receivers and connect the exe_vec[node_idx] to them.\n           std::vector< std::shared_ptr<harness_mapped_receiver<OutputType>> > receivers;\n           for (size_t i = 0; i < num_receivers; i++) {\n               receivers.push_back( std::make_shared<harness_mapped_receiver<OutputType>>(g) );\n           }\n\n           for (size_t r = 0; r < num_receivers; ++r ) {\n               tbb::flow::make_edge( exe_vec[node_idx], *receivers[r] );\n           }\n\n           // Do the test with varying numbers of senders\n           std::vector< std::shared_ptr<harness_counting_sender<InputType>> > senders;\n           for (size_t num_senders = 1; num_senders <= MAX_NODES; ++num_senders ) {\n               // Create num_senders senders, set there message limit each to N, and connect them to\n               // pass_thru_vec[node_idx]\n               senders.clear();\n               for (size_t s = 0; s < num_senders; ++s ) {\n                   senders.push_back( std::make_shared<harness_counting_sender<InputType>>() );\n                   senders.back()->my_limit = N;\n                   senders.back()->register_successor(pass_thru_vec[node_idx] );\n               }\n\n               // Initialize the receivers so they know how many senders and messages to check for\n               for (size_t r = 0; r < num_receivers; ++r ) {\n                   receivers[r]->initialize_map( N, num_senders );\n               }\n\n               // Do the test\n               utils::NativeParallelFor( (int)num_senders, parallel_put_until_limit<InputType>(senders) );\n               g.wait_for_all();\n\n               // confirm that each sender was requested from N times\n               for (size_t s = 0; s < num_senders; ++s ) {\n                   size_t n = senders[s]->my_received;\n                   CHECK( n == N );\n                   CHECK( senders[s]->my_receiver.load(std::memory_order_relaxed) == &pass_thru_vec[node_idx] );\n               }\n               // validate the receivers\n               for (size_t r = 0; r < num_receivers; ++r ) {\n                   receivers[r]->validate();\n               }\n           }\n           for (size_t r = 0; r < num_receivers; ++r ) {\n               tbb::flow::remove_edge( exe_vec[node_idx], *receivers[r] );\n           }\n           CHECK( exe_vec[node_idx].try_put( InputType() ) == true );\n           g.wait_for_all();\n           for (size_t r = 0; r < num_receivers; ++r ) {\n               // since it's detached, nothing should have changed\n               receivers[r]->validate();\n           }\n\n       } // for num_receivers\n    } // for node_idx\n    } // for concurrency level lc\n}\n\nconst size_t Offset = 123;\nstd::atomic<size_t> global_execute_count;\n\nstruct inc_functor {\n\n    std::atomic<size_t> local_execute_count;\n    inc_functor( ) { local_execute_count = 0; }\n    inc_functor( const inc_functor &f ) { local_execute_count = size_t(f.local_execute_count); }\n    void operator=( const inc_functor &f ) { local_execute_count = size_t(f.local_execute_count); }\n\n    int operator()( int i ) {\n       ++global_execute_count;\n       ++local_execute_count;\n       return i;\n    }\n\n};\n\ntemplate< typename InputType, typename OutputType >\nvoid buffered_levels_with_copy( size_t concurrency ) {\n\n    // Do for lc = 1 to concurrency level\n    for ( size_t lc = 1; lc <= concurrency; ++lc ) {\n        tbb::flow::graph g;\n\n        inc_functor cf;\n        cf.local_execute_count = Offset;\n        global_execute_count = Offset;\n\n        tbb::flow::function_node< InputType, OutputType > exe_node( g, lc, cf );\n\n        for (size_t num_receivers = 1; num_receivers <= MAX_NODES; ++num_receivers ) {\n\n            std::vector< std::shared_ptr<harness_mapped_receiver<OutputType>> > receivers;\n            for (size_t i = 0; i < num_receivers; i++) {\n                receivers.push_back( std::make_shared<harness_mapped_receiver<OutputType>>(g) );\n            }\n\n            for (size_t r = 0; r < num_receivers; ++r ) {\n                tbb::flow::make_edge( exe_node, *receivers[r] );\n            }\n\n            std::vector< std::shared_ptr<harness_counting_sender<InputType>> > senders;\n            for (size_t num_senders = 1; num_senders <= MAX_NODES; ++num_senders ) {\n                senders.clear();\n                for (size_t s = 0; s < num_senders; ++s ) {\n                    senders.push_back( std::make_shared<harness_counting_sender<InputType>>() );\n                    senders.back()->my_limit = N;\n                    tbb::flow::make_edge( *senders.back(), exe_node );\n                }\n\n                for (size_t r = 0; r < num_receivers; ++r ) {\n                    receivers[r]->initialize_map( N, num_senders );\n                }\n\n                utils::NativeParallelFor( (int)num_senders, parallel_put_until_limit<InputType>(senders) );\n                g.wait_for_all();\n\n                for (size_t s = 0; s < num_senders; ++s ) {\n                    size_t n = senders[s]->my_received;\n                    CHECK( n == N );\n                    CHECK( senders[s]->my_receiver.load(std::memory_order_relaxed) == &exe_node );\n                }\n                for (size_t r = 0; r < num_receivers; ++r ) {\n                    receivers[r]->validate();\n                }\n            }\n            for (size_t r = 0; r < num_receivers; ++r ) {\n                tbb::flow::remove_edge( exe_node, *receivers[r] );\n            }\n            CHECK( exe_node.try_put( InputType() ) == true );\n            g.wait_for_all();\n            for (size_t r = 0; r < num_receivers; ++r ) {\n                receivers[r]->validate();\n            }\n        }\n\n        // validate that the local body matches the global execute_count and both are correct\n        inc_functor body_copy = tbb::flow::copy_body<inc_functor>( exe_node );\n        const size_t expected_count = N/2 * MAX_NODES * MAX_NODES * ( MAX_NODES + 1 ) + MAX_NODES + Offset;\n        size_t global_count = global_execute_count;\n        size_t inc_count = body_copy.local_execute_count;\n        CHECK(global_count == expected_count);\n        CHECK(global_count == inc_count );\n        g.reset(tbb::flow::rf_reset_bodies);\n        body_copy = tbb::flow::copy_body<inc_functor>( exe_node );\n        inc_count = body_copy.local_execute_count;\n        CHECK_MESSAGE( Offset == inc_count, \"reset(rf_reset_bodies) did not reset functor\" );\n    }\n}\n\ntemplate< typename InputType, typename OutputType >\nvoid run_buffered_levels( int c ) {\n    buffered_levels<InputType,OutputType>( c, []( InputType i ) -> OutputType { return harness_graph_executor<InputType, OutputType>::func(i); } );\n    buffered_levels<InputType,OutputType>( c, &harness_graph_executor<InputType, OutputType>::func );\n    buffered_levels<InputType,OutputType>( c, typename harness_graph_executor<InputType, OutputType>::functor() );\n    buffered_levels_with_copy<InputType,OutputType>( c );\n}\n\n\n//! Performs test on executable nodes with limited concurrency\n/** These tests check:\n    1) that the nodes will accepts puts up to the concurrency limit,\n    2) the nodes do not exceed the concurrency limit even when run with more threads (this is checked in the harness_graph_executor),\n    3) the nodes will receive puts from multiple successors simultaneously,\n    and 4) the nodes will send to multiple predecessors.\n    There is no checking of the contents of the messages for corruption.\n*/\n\ntemplate< typename InputType, typename OutputType, typename Body >\nvoid concurrency_levels( size_t concurrency, Body body ) {\n\n    for ( size_t lc = 1; lc <= concurrency; ++lc ) {\n        tbb::flow::graph g;\n\n        // Set the execute_counter back to zero in the harness\n        harness_graph_executor<InputType, OutputType>::execute_count = 0;\n        // Set the number of current executors to zero.\n        harness_graph_executor<InputType, OutputType>::current_executors = 0;\n        // Set the max allowed executors to lc. There is a check in the functor to make sure this is never exceeded.\n        harness_graph_executor<InputType, OutputType>::max_executors = lc;\n\n        typedef tbb::flow::function_node< InputType, OutputType, tbb::flow::rejecting > fnode_type;\n        fnode_type exe_node( g, lc, body );\n\n        for (size_t num_receivers = 1; num_receivers <= MAX_NODES; ++num_receivers ) {\n\n            std::vector< std::shared_ptr<harness_counting_receiver<OutputType>> > receivers;\n            for (size_t i = 0; i < num_receivers; ++i) {\n                receivers.push_back( std::make_shared<harness_counting_receiver<OutputType>>(g) );\n            }\n\n            for (size_t r = 0; r < num_receivers; ++r ) {\n                tbb::flow::make_edge( exe_node, *receivers[r] );\n            }\n\n            std::vector< std::shared_ptr<harness_counting_sender<InputType>> > senders;\n\n            for (size_t num_senders = 1; num_senders <= MAX_NODES; ++num_senders ) {\n                senders.clear();\n                {\n                    // Exclusively lock m to prevent exe_node from finishing\n                    tbb::spin_rw_mutex::scoped_lock l(\n                        harness_graph_executor<InputType, OutputType>::template mutex_holder<tbb::spin_rw_mutex>::mutex\n                    );\n\n                    // put to lc level, it will accept and then block at m\n                    for ( size_t c = 0 ; c < lc ; ++c ) {\n                        CHECK( exe_node.try_put( InputType() ) == true );\n                    }\n                    // it only accepts to lc level\n                    CHECK( exe_node.try_put( InputType() ) == false );\n\n                    for (size_t s = 0; s < num_senders; ++s ) {\n                        senders.push_back( std::make_shared<harness_counting_sender<InputType>>() );\n                        // register a sender\n                        senders.back()->my_limit = N;\n                        exe_node.register_predecessor( *senders.back() );\n                    }\n\n                } // release lock at end of scope, setting the exe node free to continue\n                // wait for graph to settle down\n                g.wait_for_all();\n\n                // confirm that each sender was requested from N times\n                for (size_t s = 0; s < num_senders; ++s ) {\n                    size_t n = senders[s]->my_received;\n                    CHECK( n == N );\n                    CHECK( senders[s]->my_receiver.load(std::memory_order_relaxed) == &exe_node );\n                }\n                // confirm that each receivers got N * num_senders + the initial lc puts\n                for (size_t r = 0; r < num_receivers; ++r ) {\n                    size_t n = receivers[r]->my_count;\n                    CHECK( n == num_senders*N+lc );\n                    receivers[r]->my_count = 0;\n                }\n            }\n            for (size_t r = 0; r < num_receivers; ++r ) {\n                tbb::flow::remove_edge( exe_node, *receivers[r] );\n            }\n            CHECK( exe_node.try_put( InputType() ) == true );\n            g.wait_for_all();\n            for (size_t r = 0; r < num_receivers; ++r ) {\n                CHECK( int(receivers[r]->my_count) == 0 );\n            }\n        }\n    }\n}\n\n\ntemplate< typename InputType, typename OutputType >\nvoid run_concurrency_levels( int c ) {\n    concurrency_levels<InputType,OutputType>( c, []( InputType i ) -> OutputType { return harness_graph_executor<InputType, OutputType>::template tfunc<tbb::spin_rw_mutex>(i); } );\n    concurrency_levels<InputType,OutputType>( c, &harness_graph_executor<InputType, OutputType>::template tfunc<tbb::spin_rw_mutex> );\n    concurrency_levels<InputType,OutputType>( c, typename harness_graph_executor<InputType, OutputType>::template tfunctor<tbb::spin_rw_mutex>() );\n}\n\n\nstruct empty_no_assign {\n   empty_no_assign() {}\n   empty_no_assign( int ) {}\n   operator int() { return 0; }\n};\n\ntemplate< typename InputType >\nstruct parallel_puts : private utils::NoAssign {\n\n    tbb::flow::receiver< InputType > * const my_exe_node;\n\n    parallel_puts( tbb::flow::receiver< InputType > &exe_node ) : my_exe_node(&exe_node) {}\n\n    void operator()( int ) const  {\n        for ( int i = 0; i < N; ++i ) {\n            // the nodes will accept all puts\n            CHECK( my_exe_node->try_put( InputType() ) == true );\n        }\n    }\n\n};\n\n//! Performs test on executable nodes with unlimited concurrency\n/** These tests check:\n    1) that the nodes will accept all puts\n    2) the nodes will receive puts from multiple predecessors simultaneously,\n    and 3) the nodes will send to multiple successors.\n    There is no checking of the contents of the messages for corruption.\n*/\n\ntemplate< typename InputType, typename OutputType, typename Body >\nvoid unlimited_concurrency( Body body ) {\n\n    for (unsigned p = 1; p < 2*utils::MaxThread; ++p) {\n        tbb::flow::graph g;\n        tbb::flow::function_node< InputType, OutputType, tbb::flow::rejecting > exe_node( g, tbb::flow::unlimited, body );\n\n        for (size_t num_receivers = 1; num_receivers <= MAX_NODES; ++num_receivers ) {\n\n            std::vector< std::shared_ptr<harness_counting_receiver<OutputType>> > receivers;\n            for (size_t i = 0; i < num_receivers; ++i) {\n                receivers.push_back( std::make_shared<harness_counting_receiver<OutputType>>(g) );\n            }\n\n            harness_graph_executor<InputType, OutputType>::execute_count = 0;\n\n            for (size_t r = 0; r < num_receivers; ++r ) {\n                tbb::flow::make_edge( exe_node, *receivers[r] );\n            }\n\n            utils::NativeParallelFor( p, parallel_puts<InputType>(exe_node) );\n            g.wait_for_all();\n\n            // 2) the nodes will receive puts from multiple predecessors simultaneously,\n            size_t ec = harness_graph_executor<InputType, OutputType>::execute_count;\n            CHECK( ec == p*N );\n            for (size_t r = 0; r < num_receivers; ++r ) {\n                size_t c = receivers[r]->my_count;\n                // 3) the nodes will send to multiple successors.\n                CHECK( c == p*N );\n            }\n            for (size_t r = 0; r < num_receivers; ++r ) {\n                tbb::flow::remove_edge( exe_node, *receivers[r] );\n            }\n            }\n        }\n    }\n\ntemplate< typename InputType, typename OutputType >\nvoid run_unlimited_concurrency() {\n    harness_graph_executor<InputType, OutputType>::max_executors = 0;\n    unlimited_concurrency<InputType,OutputType>( []( InputType i ) -> OutputType { return harness_graph_executor<InputType, OutputType>::func(i); } );\n    unlimited_concurrency<InputType,OutputType>( &harness_graph_executor<InputType, OutputType>::func );\n    unlimited_concurrency<InputType,OutputType>( typename harness_graph_executor<InputType, OutputType>::functor() );\n}\n\nstruct continue_msg_to_int {\n    int my_int;\n    continue_msg_to_int(int x) : my_int(x) {}\n    int operator()(tbb::flow::continue_msg) { return my_int; }\n};\n\nvoid test_function_node_with_continue_msg_as_input() {\n    // If this function terminates, then this test is successful\n    tbb::flow::graph g;\n\n    tbb::flow::broadcast_node<tbb::flow::continue_msg> Start(g);\n\n    tbb::flow::function_node<tbb::flow::continue_msg, int, tbb::flow::rejecting> FN1( g, tbb::flow::serial, continue_msg_to_int(42));\n    tbb::flow::function_node<tbb::flow::continue_msg, int, tbb::flow::rejecting> FN2( g, tbb::flow::serial, continue_msg_to_int(43));\n\n    tbb::flow::make_edge( Start, FN1 );\n    tbb::flow::make_edge( Start, FN2 );\n\n    Start.try_put( tbb::flow::continue_msg() );\n    g.wait_for_all();\n}\n\n//! Tests limited concurrency cases for nodes that accept data messages\nvoid test_concurrency(int num_threads) {\n    tbb::global_control thread_limit(tbb::global_control::max_allowed_parallelism, num_threads);\n    run_concurrency_levels<int,int>(num_threads);\n    run_concurrency_levels<int,tbb::flow::continue_msg>(num_threads);\n    run_buffered_levels<int, int>(num_threads);\n    run_unlimited_concurrency<int,int>();\n    run_unlimited_concurrency<int,empty_no_assign>();\n    run_unlimited_concurrency<empty_no_assign,int>();\n    run_unlimited_concurrency<empty_no_assign,empty_no_assign>();\n    run_unlimited_concurrency<int,tbb::flow::continue_msg>();\n    run_unlimited_concurrency<empty_no_assign,tbb::flow::continue_msg>();\n    test_function_node_with_continue_msg_as_input();\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n#include <array>\n#include <vector>\nvoid test_follows_and_precedes_api() {\n    using msg_t = tbb::flow::continue_msg;\n\n    std::array<msg_t, 3> messages_for_follows = { {msg_t(), msg_t(), msg_t()} };\n    std::vector<msg_t> messages_for_precedes = { msg_t() };\n\n    pass_through<msg_t> pass_msg;\n\n    follows_and_precedes_testing::test_follows\n        <msg_t, tbb::flow::function_node<msg_t, msg_t>>\n        (messages_for_follows, tbb::flow::unlimited, pass_msg);\n    follows_and_precedes_testing::test_precedes\n        <msg_t, tbb::flow::function_node<msg_t, msg_t>>\n        (messages_for_precedes, tbb::flow::unlimited, pass_msg, tbb::flow::node_priority_t(1));\n}\n#endif\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n// Basic idea of the following tests is to check that try_put_and_wait(message) call for function_node\n// with one of the policies (lightweight, queueing and rejecting) with different concurrency limits\n// processes all of the previous jobs required to process message, the message itself, but does\n// not process the elements submitted later or not required to process the message\n// These tests submit start_work_items using the regular try_put and then submit wait_message\n// with try_put_and_wait. During the completion of the graph, new_work_items would be submitted\n// once the wait_message arrives.\nvoid test_try_put_and_wait_lightweight(std::size_t concurrency_limit) {\n    tbb::task_arena arena(1);\n\n    arena.execute([&]{\n        tbb::flow::graph g;\n\n        std::vector<int> start_work_items;\n        std::vector<int> processed_items;\n        std::vector<int> new_work_items;\n\n        int wait_message = 10;\n\n        for (int i = 0; i < wait_message; ++i) {\n            start_work_items.emplace_back(i);\n            new_work_items.emplace_back(i + 1 + wait_message);\n        }\n\n        using function_node_type = tbb::flow::function_node<int, int, tbb::flow::lightweight>;\n        function_node_type* start_node = nullptr;\n\n        function_node_type function(g, concurrency_limit,\n            [&](int input) noexcept {\n                if (input == wait_message) {\n                    for (int item : new_work_items) {\n                        start_node->try_put(item);\n                    }\n                }\n                return input;\n            });\n\n        start_node = &function;\n\n        function_node_type writer(g, concurrency_limit,\n            [&](int input) noexcept {\n                processed_items.emplace_back(input);\n                return 0;\n            });\n\n        tbb::flow::make_edge(function, writer);\n\n        for (int i = 0; i < wait_message; ++i) {\n            function.try_put(i);\n        }\n\n        function.try_put_and_wait(wait_message);\n\n        std::size_t check_index = 0;\n\n        // For lightweight function_node, start_work_items are expected to be processed first\n        // while putting items into the first node.\n        for (auto item : start_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item, \"Unexpected items processing\");\n        }\n\n        if (concurrency_limit == tbb::flow::serial) {\n            // If the lightweight function_node is serial, it should process the wait_message but add items from new_work_items\n            // into the queue since the concurrency limit is occupied.\n            CHECK_MESSAGE(processed_items.size() == start_work_items.size() + 1, \"Unexpected number of elements processed\");\n            CHECK_MESSAGE(processed_items[check_index++] == wait_message, \"Unexpected items processing\");\n        } else {\n            // If the node is unlimited, it should process new_work_items immediately while processing the wait_message\n            // Hence they should be processed before exiting the try_put_and_wait\n            CHECK_MESSAGE(processed_items.size() == start_work_items.size() + new_work_items.size() + 1,\n                          \"Unexpected number of elements processed\");\n            for (auto item : new_work_items) {\n                CHECK_MESSAGE(processed_items[check_index++] == item, \"Unexpected items processing\");\n            }\n            // wait_message would be processed only after new_work_items\n            CHECK_MESSAGE(processed_items[check_index++] == wait_message, \"Unexpected items processing\");\n        }\n\n        g.wait_for_all();\n\n        if (concurrency_limit == tbb::flow::serial) {\n            // For the serial node, processing of new_work_items would be postponed to wait_for_all since they\n            // would be queued and spawned after working with wait_message\n            for (auto item : new_work_items) {\n                CHECK_MESSAGE(processed_items[check_index++] == item, \"Unexpected items processing\");\n            }\n        }\n        CHECK(check_index == processed_items.size());\n    });\n}\n\nvoid test_try_put_and_wait_queueing(std::size_t concurrency_limit) {\n    tbb::task_arena arena(1);\n    arena.execute([&]{\n        tbb::flow::graph g;\n\n        std::vector<int> start_work_items;\n        std::vector<int> processed_items;\n        std::vector<int> new_work_items;\n\n        int wait_message = 10;\n\n        for (int i = 0; i < wait_message; ++i) {\n            start_work_items.emplace_back(i);\n            new_work_items.emplace_back(i + 1 + wait_message);\n        }\n\n        using function_node_type = tbb::flow::function_node<int, int, tbb::flow::queueing>;\n        function_node_type* start_node = nullptr;\n\n        function_node_type function(g, concurrency_limit,\n            [&](int input) noexcept {\n                if (input == wait_message) {\n                    for (int item : new_work_items) {\n                        start_node->try_put(item);\n                    }\n                }\n                return input;\n            });\n\n        start_node = &function;\n\n        function_node_type writer(g, concurrency_limit,\n            [&](int input) noexcept {\n                processed_items.emplace_back(input);\n                return 0;\n            });\n\n        tbb::flow::make_edge(function, writer);\n\n        for (int i = 0; i < wait_message; ++i) {\n            function.try_put(i);\n        }\n\n        function.try_put_and_wait(wait_message);\n\n        std::size_t check_index = 0;\n\n        if (concurrency_limit == tbb::flow::serial) {\n            // Serial queueing function_node should add all start_work_items except the first one into the queue\n            // and then process them in FIFO order.\n            // wait_message would also be added to the queue, but would be processed later\n            CHECK_MESSAGE(processed_items.size() == start_work_items.size() + 1, \"Unexpected number of elements processed\");\n            for (auto item : start_work_items) {\n                CHECK_MESSAGE(processed_items[check_index++] == item, \"Unexpected items processing\");\n            }\n        } else {\n            CHECK_MESSAGE(processed_items.size() == 1, \"Unexpected number of elements processed\");\n        }\n\n        // For the unlimited function_node, all of the tasks for start_work_items and wait_message would be spawned\n        // and hence processed by the thread in LIFO order.\n        // The first processed item is expected to be wait_message since it was spawned last\n        CHECK_MESSAGE(processed_items[check_index++] == wait_message, \"Unexpected items processing\");\n\n        g.wait_for_all();\n\n        if (concurrency_limit == tbb::flow::serial) {\n            // For serial queueing function_node, the new_work_items are expected to be processed while calling to wait_for_all\n            // They would be queued and processed later in FIFO order\n            for (auto item : new_work_items) {\n                CHECK_MESSAGE(processed_items[check_index++] == item, \"Unexpected items processing\");\n            }\n        } else {\n            // Unlimited function_node would always spawn tasks immediately without adding them into the queue\n            // They would be processed in LIFO order. Hence it is expected that new_work_items would be processed first in reverse order\n            // After them, start_work_items would be processed also in reverse order\n            for (std::size_t i = new_work_items.size(); i != 0; --i) {\n                CHECK_MESSAGE(processed_items[check_index++] == new_work_items[i - 1], \"Unexpected items processing\");\n            }\n            for (std::size_t i = start_work_items.size(); i != 0; --i) {\n                CHECK_MESSAGE(processed_items[check_index++] == start_work_items[i - 1], \"Unexpected items processing\");\n            }\n        }\n        CHECK(check_index == processed_items.size());\n    });\n}\n\nvoid test_try_put_and_wait_rejecting(size_t concurrency_limit) {\n    tbb::task_arena arena(1);\n\n    arena.execute([&]{\n        tbb::flow::graph g;\n\n        std::vector<int> processed_items;\n        std::vector<int> new_work_items;\n\n        int wait_message = 0;\n\n        for (int i = 1; i < wait_message; ++i) {\n            new_work_items.emplace_back(i);\n        }\n\n        using function_node_type = tbb::flow::function_node<int, int, tbb::flow::rejecting>;\n        function_node_type* start_node = nullptr;\n\n        function_node_type function(g, concurrency_limit,\n            [&](int input) noexcept {\n                if (input == wait_message) {\n                    for (int item : new_work_items) {\n                        start_node->try_put(item);\n                    }\n                }\n                return input;\n            });\n\n        start_node = &function;\n\n        function_node_type writer(g, concurrency_limit,\n            [&](int input) noexcept {\n                processed_items.emplace_back(input);\n                return 0;\n            });\n\n        tbb::flow::make_edge(function, writer);\n\n        // If the first action is try_put_and_wait, it will occupy concurrency of the function_node\n        // All submits of new_work_items inside of the body should be rejected\n        bool result = function.try_put_and_wait(wait_message);\n        CHECK_MESSAGE(result, \"task should not rejected since the node concurrency is not saturated\");\n\n        CHECK_MESSAGE(processed_items.size() == 1, nullptr);\n        CHECK_MESSAGE(processed_items[0] == wait_message, \"Unexpected items processing\");\n\n        g.wait_for_all();\n\n        CHECK_MESSAGE(processed_items.size() == 1, nullptr);\n\n        processed_items.clear();\n\n        // If the first action is try_put, try_put_and_wait is expected to return false since the concurrency of the\n        // node would be saturated\n        function.try_put(0);\n        result = function.try_put_and_wait(wait_message);\n        CHECK_MESSAGE(!result, \"task should be rejected since the node concurrency is saturated\");\n        CHECK(processed_items.empty());\n\n        g.wait_for_all();\n\n        CHECK(processed_items.size() == 1);\n        CHECK_MESSAGE(processed_items[0] == 0, \"Unexpected items processing\");\n    });\n}\n\nvoid test_try_put_and_wait() {\n    test_try_put_and_wait_lightweight(tbb::flow::serial);\n    test_try_put_and_wait_lightweight(tbb::flow::unlimited);\n\n    test_try_put_and_wait_queueing(tbb::flow::serial);\n    test_try_put_and_wait_queueing(tbb::flow::unlimited);\n\n    test_try_put_and_wait_rejecting(tbb::flow::serial);\n}\n#endif // __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n\n//! Test various node bodies with concurrency\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Concurrency test\") {\n    for(unsigned int p = utils::MinThread; p <= utils::MaxThread; ++p ) {\n        test_concurrency(p);\n    }\n}\n\n//! NativeParallelFor testing with various concurrency settings\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Lightweight testing\"){\n   lightweight_testing::test<tbb::flow::function_node>(10);\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n//! Test follows and precedes API\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Flowgraph node set test\"){\n     test_follows_and_precedes_api();\n}\n#endif\n\n//! try_release and try_consume test\n//! \\brief \\ref error_guessing\nTEST_CASE(\"try_release try_consume\"){\n    tbb::flow::graph g;\n\n    tbb::flow::function_node<int, int> fn(g, tbb::flow::unlimited, [](const int&v){return v;});\n\n    CHECK_MESSAGE((fn.try_release()==false), \"try_release should initially return false on a node\");\n    CHECK_MESSAGE((fn.try_consume()==false), \"try_consume should initially return false on a node\");\n}\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"constraints for function_node input and output\") {\n    struct InputObject {\n        InputObject() = default;\n        InputObject( const InputObject& ) = default;\n    };\n    struct OutputObject : test_concepts::Copyable {};\n\n    static_assert(utils::well_formed_instantiation<tbb::flow::function_node, InputObject, OutputObject>);\n    static_assert(utils::well_formed_instantiation<tbb::flow::function_node, int, int>);\n    static_assert(!utils::well_formed_instantiation<tbb::flow::function_node, test_concepts::NonCopyable, OutputObject>);\n    static_assert(!utils::well_formed_instantiation<tbb::flow::function_node, test_concepts::NonDefaultInitializable, OutputObject>);\n    static_assert(!utils::well_formed_instantiation<tbb::flow::function_node, InputObject, test_concepts::NonCopyable>);\n}\n\ntemplate <typename Input, typename Output, typename Body>\nconcept can_call_function_node_ctor = requires( tbb::flow::graph& graph, std::size_t concurrency, Body body,\n                                                tbb::flow::node_priority_t priority, tbb::flow::buffer_node<int>& f ) {\n    tbb::flow::function_node<Input, Output>(graph, concurrency, body);\n    tbb::flow::function_node<Input, Output>(graph, concurrency, body, priority);\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    tbb::flow::function_node<Input, Output>(tbb::flow::follows(f), concurrency, body);\n    tbb::flow::function_node<Input, Output>(tbb::flow::follows(f), concurrency, body, priority);\n#endif\n};\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"constraints for function_node body\") {\n    using input_type = int;\n    using output_type = int;\n    using namespace test_concepts::function_node_body;\n\n    static_assert(can_call_function_node_ctor<input_type, output_type, Correct<input_type, output_type>>);\n    static_assert(!can_call_function_node_ctor<input_type, output_type, NonCopyable<input_type, output_type>>);\n    static_assert(!can_call_function_node_ctor<input_type, output_type, NonDestructible<input_type, output_type>>);\n    static_assert(!can_call_function_node_ctor<input_type, output_type, NoOperatorRoundBrackets<input_type, output_type>>);\n    static_assert(!can_call_function_node_ctor<input_type, output_type, WrongInputRoundBrackets<input_type, output_type>>);\n    static_assert(!can_call_function_node_ctor<input_type, output_type, WrongReturnRoundBrackets<input_type, output_type>>);\n}\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test function_node try_put_and_wait\") {\n    test_try_put_and_wait();\n}\n#endif\n\n// It was an issue when the critical task wrapper was allocated using the small object pool\n// of the task being wrapped. Since the original task creates under the aggregator, there is no\n// guarantee that the thread that requested the task creating is the same as actually created the task\n// Mismatch between memory pool caused internal assertion failure while deallocating the task\n//! \\brief \\ref regression\nTEST_CASE(\"test critical tasks memory pool correctness\") {\n    using node_type = tbb::flow::function_node<int, tbb::flow::continue_msg>;\n    constexpr int num_iterations = 10000;\n    int num_calls = 0;\n    auto node_body = [&](int) { ++num_calls; };\n\n    tbb::flow::graph g;\n    node_type node(g, tbb::flow::serial, node_body, tbb::flow::node_priority_t{1});\n\n    for (int i = 0; i < num_iterations; ++i) {\n        node.try_put(i);\n    }\n\n    g.wait_for_all();\n    REQUIRE_MESSAGE(num_calls == num_iterations, \"Incorrect number of body executions\");\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_fuzzing.cpp",
    "content": "/*\n    Copyright (c) 2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_fuzzing.cpp\n//! \\brief Test the [internal] of environment variables\n\n#include <fuzzer/FuzzedDataProvider.h>\n\nextern \"C\" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {\n  FuzzedDataProvider provider(data, size);\n  for (auto var : {\"INTEL_ITTNOTIFY_GROUPS\", \"INTEL_LIBITTNOTIFY32\",\n                   \"INTEL_LIBITTNOTIFY64\", \"KMP_FOR_TCHECK\", \"KMP_FOR_TPROFILE\",\n                   \"TBB_ENABLE_SANITIZERS\", \"TBB_MALLOC_DISABLE_REPLACEMENT\",\n                   \"TBB_MALLOC_SET_HUGE_SIZE_THRESHOLD\",\n                   \"TBB_MALLOC_USE_HUGE_PAGES\", \"TBB_VERSION\"}) {\n    std::string val = provider.ConsumeRandomLengthString();\n#if _WIN32\n    _putenv_s(var, val.c_str());\n#else\n    setenv(var, val.c_str(), 1);\n#endif\n  }\n\n  if (std::system(CMD) != 0)\n    __builtin_trap();\n\n  return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_global_control.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_global_control.cpp\n//! \\brief Test for [sched.global_control] specification\n\n#include \"common/test.h\"\n\n#include \"common/utils.h\"\n#include \"common/spin_barrier.h\"\n#include \"common/utils_concurrency_limit.h\"\n\n#include \"tbb/global_control.h\"\n#include \"tbb/parallel_for.h\"\n#include \"tbb/task_group.h\"\n#include \"tbb/task_arena.h\"\n\n#include <cstring>\n\nstruct task_scheduler_handle_guard {\n    tbb::task_scheduler_handle m_handle{};\n\n    task_scheduler_handle_guard() {\n        m_handle = tbb::task_scheduler_handle{tbb::attach{}};\n    }\n\n    ~task_scheduler_handle_guard() {\n        m_handle.release();\n    }\n\n    tbb::task_scheduler_handle& get() {\n        return m_handle;\n    }\n};\n\nnamespace TestBlockingTerminateNS {\n\n    struct TestAutoInitBody {\n        void operator()( int ) const {\n            tbb::parallel_for( 0, 100, utils::DummyBody() );\n        }\n    };\n\n    static std::atomic<int> gSeed;\n    static std::atomic<int> gNumSuccesses;\n\n    class TestMultpleWaitBody {\n        bool myAutoInit;\n    public:\n        TestMultpleWaitBody( bool autoInit = false ) : myAutoInit( autoInit ) {}\n        void operator()( int ) const {\n            task_scheduler_handle_guard init;\n            if ( !myAutoInit ) {\n                tbb::parallel_for(0, 10, utils::DummyBody());\n            }\n            utils::FastRandom<> rnd( ++gSeed );\n            // In case of auto init sub-tests we skip\n            //  - case #4 to avoid recursion\n            //  - case #5 because it is explicit initialization\n            const int numCases = myAutoInit ? 4 : 6;\n            switch ( rnd.get() % numCases ) {\n            case 0: {\n                tbb::task_arena a;\n                a.enqueue(utils::DummyBody() );\n                break;\n            }\n            case 1: {\n                tbb::task_group tg;\n                utils::DummyBody eb;\n                tg.run( eb );\n                tg.wait();\n                break;\n            }\n            case 2:\n                tbb::parallel_for( 0, 100, utils::DummyBody() );\n                break;\n            case 3:\n                /* do nothing */\n                break;\n            case 4:\n                // Create and join several threads with auto initialized scheduler.\n                utils::NativeParallelFor( rnd.get() % 5 + 1, TestMultpleWaitBody( true ) );\n                break;\n            case 5:\n                {\n                    task_scheduler_handle_guard init2;\n                    bool res = tbb::finalize( init2.get(), std::nothrow );\n                    REQUIRE( !res );\n                }\n                break;\n            }\n            if ( !myAutoInit && tbb::finalize( init.get(), std::nothrow ) )\n                ++gNumSuccesses;\n        }\n    };\n\n    void TestMultpleWait() {\n        const int minThreads = 1;\n        const int maxThreads = 16;\n        const int numRepeats = 5;\n        // Initialize seed with different values on different machines.\n        gSeed = tbb::this_task_arena::max_concurrency();\n        for ( int repeats = 0; repeats<numRepeats; ++repeats ) {\n            for ( int threads = minThreads; threads<maxThreads; ++threads ) {\n                gNumSuccesses = 0;\n                utils::NativeParallelFor( threads, TestMultpleWaitBody() );\n                REQUIRE_MESSAGE( gNumSuccesses > 0, \"At least one blocking terminate must return 'true'\" );\n            }\n        }\n    }\n\n#if TBB_USE_EXCEPTIONS\n    template <typename F>\n    void TestException( F &f ) {\n        utils::suppress_unused_warning( f );\n        bool caught = false;\n        try {\n            f();\n            REQUIRE( false );\n        }\n        catch ( const tbb::unsafe_wait& e) {\n            const char* msg = e.what();\n            REQUIRE((msg && std::strlen(msg) != 0));\n            caught = true;\n        }\n        catch ( ... ) {\n            REQUIRE( false );\n        }\n        REQUIRE( caught );\n    }\n\n    class ExceptionTest1 {\n        task_scheduler_handle_guard tsi1;\n        int myIndex;\n\n    public:\n        ExceptionTest1( int index ) : myIndex( index ) {}\n\n        void operator()() {\n            task_scheduler_handle_guard tsi2;\n            tbb::parallel_for(0, 2, utils::DummyBody()); // auto-init\n            tbb::finalize((myIndex == 0 ? tsi1.get() : tsi2.get()));\n            REQUIRE_MESSAGE( false, \"Blocking terminate did not throw the exception\" );\n        }\n    };\n\n    struct ExceptionTest2 {\n        class Body {\n            utils::SpinBarrier& myBarrier;\n        public:\n            Body( utils::SpinBarrier& barrier ) : myBarrier( barrier ) {}\n            void operator()( int ) const {\n                myBarrier.wait();\n                task_scheduler_handle_guard init;\n                tbb::finalize( init.get() );\n                REQUIRE_MESSAGE( false, \"Blocking terminate did not throw the exception inside the parallel region\" );\n            }\n        };\n        void operator()() {\n            const int numThreads = 4;\n            tbb::global_control init(tbb::global_control::max_allowed_parallelism, numThreads);\n            tbb::task_arena a(numThreads);\n            a.execute([&] {\n                utils::SpinBarrier barrier(numThreads);\n                tbb::parallel_for(0, numThreads, Body(barrier));\n                REQUIRE_MESSAGE(false, \"Parallel loop did not throw the exception\");\n            });\n        }\n    };\n\n    void TestExceptions() {\n        ExceptionTest1 Test1(0);\n        TestException( Test1 );\n        ExceptionTest1 Test2(1);\n        TestException( Test2 );\n        if (utils::get_platform_max_threads() > 1) {\n            // TODO: Fix the arena leak issue on single threaded machine\n            // (see https://github.com/oneapi-src/oneTBB/issues/396)\n            ExceptionTest2 Test3;\n            TestException(Test3);\n        }\n    }\n\n#endif /* TBB_USE_EXCEPTIONS */\n\n} // namespace TestBlockingTerminateNS\n\nvoid TestTerminationAndAutoinit(bool autoinit) {\n    task_scheduler_handle_guard ctl1;\n    task_scheduler_handle_guard ctl2;\n\n    if (autoinit) {\n        tbb::parallel_for(0, 10, utils::DummyBody());\n    }\n    bool res1 = tbb::finalize(ctl1.get(), std::nothrow);\n    if (autoinit) {\n        REQUIRE(!res1);\n    } else {\n        REQUIRE(res1);\n    }\n    bool res2 = tbb::finalize(ctl2.get(), std::nothrow);\n    REQUIRE(res2);\n}\n\n//! Check no reference leak for an external thread\n//! \\brief \\ref regression \\ref error_guessing\nTEST_CASE(\"test decrease reference\") {\n    tbb::task_scheduler_handle handle = tbb::task_scheduler_handle{tbb::attach{}};\n\n    std::thread thr([] { tbb::parallel_for(0, 1, [](int) {}); } );\n    thr.join();\n\n    REQUIRE(tbb::finalize(handle, std::nothrow));\n}\n\n//! Testing lifetime control\n//! \\brief \\ref error_guessing\nTEST_CASE(\"prolong lifetime auto init\") {\n    TestTerminationAndAutoinit(false);\n    TestTerminationAndAutoinit(true);\n}\n\n#if TBB_USE_EXCEPTIONS\n//! Testing lifetime control advanced\n//! \\brief \\ref error_guessing\nTEST_CASE(\"prolong lifetime advanced\") {\n    // Exceptions test leaves auto-initialized scheduler after,\n    // because all blocking terminate calls are inside the parallel region,\n    // thus resulting in false termination result.\n    utils::NativeParallelFor(1,\n        [&](int) { TestBlockingTerminateNS::TestExceptions(); });\n}\n#endif\n\n#if !EMSCRIPTEN\n//! Testing multiple wait\n//! \\brief \\ref error_guessing\nTEST_CASE(\"prolong lifetime multiple wait\") {\n    TestBlockingTerminateNS::TestMultpleWait();\n}\n#endif\n\n//! \\brief \\ref regression\nTEST_CASE(\"test concurrent task_scheduler_handle destruction\") {\n    std::atomic<bool> stop{ false };\n    std::thread thr1([&] {\n        while (!stop) {\n            auto h = tbb::task_scheduler_handle{ tbb::attach{} };\n            tbb::finalize(h, std::nothrow_t{});\n        }\n    });\n\n    for (int i = 0; i < 1000; ++i) {\n        std::thread thr2([] {\n            tbb::parallel_for(0, 1, [](int) {});\n        });\n        thr2.join();\n    }\n    stop = true;\n    thr1.join();\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_handle_perror.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_handle_perror.cpp\n//! \\brief Test for [internal] functionality\n\n#if _WIN32 || _WIN64\n#define _CRT_SECURE_NO_WARNINGS\n#endif\n\n#define __TBB_NO_IMPLICIT_LINKAGE 1\n\n#include \"../../src/tbb/assert_impl.h\" // Out-of-line TBB assertion handling routines are instantiated here.\n#include \"common/test.h\"\n#include \"oneapi/tbb/detail/_exception.h\"\n#include \"../../src/tbb/exception.cpp\"\n#include <stdexcept>\n#include <cerrno>\n#include <iostream>\n\nnamespace tbb {\nnamespace detail {\nnamespace r1 {\nbool terminate_on_exception() {\n    return false;\n}\n}\n}\n}\n\n#if TBB_USE_EXCEPTIONS\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test tbb::detail::r1::handle_perror\") {\n    bool caught = false;\n\n    try {\n        tbb::detail::r1::handle_perror(EAGAIN, \"apple\");\n    } catch( std::runtime_error& e ) {\n        REQUIRE(std::memcmp(e.what(), \"apple: \", 7) == 0);\n        REQUIRE_MESSAGE(std::strlen(std::strstr(e.what(), std::strerror(EAGAIN))), \"Bad error message\");\n        caught = true;\n    }\n    REQUIRE(caught);\n}\n\n#endif // TBB_USE_EXCEPTIONS\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_hw_concurrency.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_hw_concurrency.cpp\n//! \\brief Test for [internal] specifications\n\n#include \"common/config.h\"\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#if !__TBB_TEST_SKIP_AFFINITY\n#include \"common/utils_concurrency_limit.h\"\n#include \"tbb/global_control.h\"\n#include \"tbb/enumerable_thread_specific.h\"\n#include \"tbb/task_arena.h\"\n#include \"tbb/concurrent_vector.h\"\n#include \"tbb/concurrent_queue.h\"\n#include \"tbb/concurrent_priority_queue.h\"\n#include \"tbb/concurrent_hash_map.h\"\n#include \"tbb/concurrent_unordered_map.h\"\n#include \"tbb/concurrent_unordered_set.h\"\n#include \"tbb/concurrent_map.h\"\n#include \"tbb/concurrent_set.h\"\n#include \"tbb/cache_aligned_allocator.h\"\n#include \"tbb/scalable_allocator.h\"\n#include \"tbb/tbb_allocator.h\"\n#include \"tbb/null_mutex.h\"\n#include \"tbb/null_rw_mutex.h\"\n#include \"tbb/queuing_mutex.h\"\n#include \"tbb/queuing_rw_mutex.h\"\n#include \"tbb/spin_mutex.h\"\n#include \"tbb/spin_rw_mutex.h\"\n#include \"tbb/tick_count.h\"\n#include \"tbb/combinable.h\"\n#include \"tbb/blocked_range.h\"\n#include \"tbb/blocked_range2d.h\"\n#include \"tbb/blocked_range3d.h\"\n#include \"tbb/blocked_nd_range.h\"\n\n// Declaration of global objects are needed to check that\n// it does not initialize the task scheduler, and in particular\n// does not set the default thread number.\n// TODO: add other objects that should not initialize the scheduler.\ntbb::enumerable_thread_specific<std::size_t> ets;\nusing vector_ets_type = tbb::enumerable_thread_specific<std::vector<std::size_t>>;\nvector_ets_type vets;\ntbb::flattened2d<vector_ets_type> f2d(vets);\ntbb::combinable<std::size_t> comb;\ntbb::concurrent_vector<std::size_t> cv;\ntbb::concurrent_queue<std::size_t> cq;\ntbb::concurrent_bounded_queue<std::size_t> cbq;\ntbb::concurrent_priority_queue<std::size_t> test_cpq;\ntbb::concurrent_hash_map<std::size_t, std::size_t> chmap;\ntbb::concurrent_unordered_map<std::size_t, std::size_t> cumap;\ntbb::concurrent_unordered_multimap<std::size_t, std::size_t> cummap;\ntbb::concurrent_unordered_set<std::size_t> cuset;\ntbb::concurrent_unordered_multiset<std::size_t> cumset;\ntbb::concurrent_map<std::size_t, std::size_t> cmap;\ntbb::concurrent_multimap<std::size_t, std::size_t> cmmap;\ntbb::concurrent_set<std::size_t> cset;\ntbb::concurrent_multiset<std::size_t> cmset;\ntbb::cache_aligned_allocator<std::size_t> caa;\ntbb::scalable_allocator<std::size_t> sa;\ntbb::tbb_allocator<std::size_t> ta;\ntbb::null_mutex nm;\ntbb::null_rw_mutex nrwm;\ntbb::queuing_mutex qm;\ntbb::queuing_rw_mutex qrwm;\ntbb::spin_mutex sm;\ntbb::spin_rw_mutex srwm;\ntbb::speculative_spin_mutex ssm;\ntbb::speculative_spin_rw_mutex ssrwm;\ntbb::tick_count test_tc;\ntbb::blocked_range<std::size_t> br(0, 1);\ntbb::blocked_range2d<std::size_t> br2d(0, 1, 0, 1);\ntbb::blocked_range3d<std::size_t> br3d(0, 1, 0, 1, 0, 1);\ntbb::blocked_nd_range<std::size_t, 2> brNd({0, 1}, {0, 1});\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Check absence of scheduler initialization\") {\n    int maxProcs = utils::get_max_procs();\n\n    if (maxProcs >= 2) {\n        int availableProcs = maxProcs / 2;\n        REQUIRE_MESSAGE(utils::limit_number_of_threads(availableProcs) == availableProcs, \"limit_number_of_threads has not set the requested limitation\");\n        REQUIRE(tbb::this_task_arena::max_concurrency() == availableProcs);\n    }\n}\n\n#endif // !__TBB_TEST_SKIP_AFFINITY\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_implicit_linkage_on_windows.cpp",
    "content": "/*\n    Copyright (c) 2020-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n\n#include <tbb/version.h>\n\n//! \\file test_implicit_linkage_on_windows.cpp\n//! \\brief Test for [internal] functionality\n\n//! Testing the library is implicitly linked on Windows platforms\n//! \\brief \\ref error_guessing \\ref interface\nTEST_CASE(\"Test implicit linkage\") {\n    // Pulling something from the library so that it is indeed required during the linkage\n    REQUIRE_MESSAGE(\n        TBB_runtime_interface_version()==TBB_INTERFACE_VERSION,\n        \"Running with the library of different version than the test was compiled against.\"\n    );\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_indexer_node.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"common/config.h\"\n\n#include \"tbb/flow_graph.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_assert.h\"\n#include \"common/test_follows_and_precedes_api.h\"\n\n\n//! \\file test_indexer_node.cpp\n//! \\brief Test for [flow_graph.indexer_node] specification\n\n\n#if defined(_MSC_VER) && _MSC_VER < 1600\n    #pragma warning (disable : 4503) //disabling the \"decorated name length exceeded\" warning for VS2008 and earlier\n#endif\n\nconst int Count = 150;\nconst int MaxPorts = 10;\nconst int MaxNInputs = 5; // max # of input_nodes to register for each indexer_node input in parallel test\nbool outputCheck[MaxPorts][Count];  // for checking output\n\nvoid\ncheck_outputCheck( int nUsed, int maxCnt) {\n    for(int i=0; i < nUsed; ++i) {\n        for( int j = 0; j < maxCnt; ++j) {\n            CHECK_MESSAGE(outputCheck[i][j], \"\");\n        }\n    }\n}\n\nvoid\nreset_outputCheck( int nUsed, int maxCnt) {\n    for(int i=0; i < nUsed; ++i) {\n        for( int j = 0; j < maxCnt; ++j) {\n            outputCheck[i][j] = false;\n        }\n    }\n}\n\nclass test_class {\n    public:\n        test_class() { my_val = 0; }\n        test_class(int i) { my_val = i; }\n        operator int() { return my_val; }\n    private:\n        int my_val;\n};\n\ntemplate<typename T>\nclass name_of {\npublic:\n    static const char* name() { return  \"Unknown\"; }\n};\ntemplate<>\nclass name_of<int> {\npublic:\n    static const char* name() { return  \"int\"; }\n};\ntemplate<>\nclass name_of<float> {\npublic:\n    static const char* name() { return  \"float\"; }\n};\ntemplate<>\nclass name_of<double> {\npublic:\n    static const char* name() { return  \"double\"; }\n};\ntemplate<>\nclass name_of<long> {\npublic:\n    static const char* name() { return  \"long\"; }\n};\ntemplate<>\nclass name_of<short> {\npublic:\n    static const char* name() { return  \"short\"; }\n};\ntemplate<>\nclass name_of<test_class> {\npublic:\n    static const char* name() { return  \"test_class\"; }\n};\n\n// TT must be arithmetic, and shouldn't wrap around for reasonable sizes of Count (which is now 150, and maxPorts is 10,\n// so the max number generated right now is 1500 or so.)  Input will generate a series of TT with value\n// (init_val + (i-1)*addend) * my_mult, where i is the i-th invocation of the body.  We are attaching addend\n// input nodes to a indexer_port, and each will generate part of the numerical series the port is expecting\n// to receive.  If there is only one input node, the series order will be maintained; if more than one,\n// this is not guaranteed.\n// The manual specifies bodies can be assigned, so we can't hide the operator=.\ntemplate<typename TT>\nclass my_input_body {\n    TT my_mult;\n    int my_count;\n    int addend;\npublic:\n    my_input_body(TT multiplier, int init_val, int addto) : my_mult(multiplier), my_count(init_val), addend(addto) { }\n    TT operator()( tbb::flow_control& fc) {\n        int lc = my_count;\n        TT ret = my_mult * (TT)my_count;\n        my_count += addend;\n        if ( lc < Count){\n            return ret;\n        }else{\n            fc.stop();\n            return TT();\n        }\n    }\n};\n\n// allocator for indexer_node.\n\ntemplate<typename IType>\nclass makeIndexer {\npublic:\n    static IType *create() {\n        IType *temp = new IType();\n        return temp;\n    }\n    static void destroy(IType *p) { delete p; }\n};\n\ntemplate<int ELEM, typename INT>\nstruct getval_helper {\n\n    typedef typename INT::output_type OT;\n    typedef typename std::tuple_element<ELEM-1, typename INT::tuple_types>::type stored_type;\n\n    static int get_integer_val(OT const &o) {\n        stored_type res = tbb::flow::cast_to<stored_type>(o);\n        return (int)res;\n    }\n};\n\n// holder for input_node pointers for eventual deletion\n\nstatic void* all_input_nodes[MaxPorts][MaxNInputs];\n\ntemplate<int ELEM, typename INT>\nclass input_node_helper {\npublic:\n    typedef INT indexer_node_type;\n    typedef typename indexer_node_type::output_type TT;\n    typedef typename std::tuple_element<ELEM-1,typename INT::tuple_types>::type IT;\n    typedef typename tbb::flow::input_node<IT> my_input_node_type;\n    static void print_remark() {\n        input_node_helper<ELEM-1,INT>::print_remark();\n        INFO(\", \" << name_of<IT>::name());\n    }\n    static void add_input_nodes(indexer_node_type &my_indexer, tbb::flow::graph &g, int nInputs) {\n        for(int i=0; i < nInputs; ++i) {\n            my_input_node_type *new_node = new my_input_node_type(g, my_input_body<IT>((IT)(ELEM+1), i, nInputs));\n            tbb::flow::make_edge(*new_node, tbb::flow::input_port<ELEM-1>(my_indexer));\n\n            all_input_nodes[ELEM-1][i] = (void *)new_node;\n            new_node->activate();\n        }\n\n        // add the next input_node\n        input_node_helper<ELEM-1, INT>::add_input_nodes(my_indexer, g, nInputs);\n    }\n    static void check_value(TT &v) {\n        if(v.tag() == ELEM-1) {\n            int ival = getval_helper<ELEM,INT>::get_integer_val(v);\n            CHECK_MESSAGE(!(ival%(ELEM+1)), \"\");\n            ival /= (ELEM+1);\n            CHECK_MESSAGE(!outputCheck[ELEM-1][ival], \"\");\n            outputCheck[ELEM-1][ival] = true;\n        }\n        else {\n            input_node_helper<ELEM-1,INT>::check_value(v);\n        }\n    }\n\n    static void remove_input_nodes(indexer_node_type& my_indexer, int nInputs) {\n        for(int i=0; i< nInputs; ++i) {\n            my_input_node_type *dp = reinterpret_cast<my_input_node_type *>(all_input_nodes[ELEM-1][i]);\n            tbb::flow::remove_edge(*dp, tbb::flow::input_port<ELEM-1>(my_indexer));\n            delete dp;\n        }\n        input_node_helper<ELEM-1, INT>::remove_input_nodes(my_indexer, nInputs);\n    }\n};\n\ntemplate<typename INT>\nclass input_node_helper<1, INT> {\n    typedef INT indexer_node_type;\n    typedef typename indexer_node_type::output_type TT;\n\n    typedef typename std::tuple_element<0, typename INT::tuple_types>::type IT;\n    typedef typename tbb::flow::input_node<IT> my_input_node_type;\npublic:\n    static void print_remark() {\n        INFO(\"Parallel test of indexer_node< \" << name_of<IT>::name());\n    }\n    static void add_input_nodes(indexer_node_type &my_indexer, tbb::flow::graph &g, int nInputs) {\n        for(int i=0; i < nInputs; ++i) {\n            my_input_node_type *new_node = new my_input_node_type(g, my_input_body<IT>((IT)2, i, nInputs));\n            tbb::flow::make_edge(*new_node, tbb::flow::input_port<0>(my_indexer));\n            all_input_nodes[0][i] = (void *)new_node;\n            new_node->activate();\n        }\n    }\n    static void check_value(TT &v) {\n        int ival = getval_helper<1,INT>::get_integer_val(v);\n        CHECK_MESSAGE(!(ival%2), \"\");\n        ival /= 2;\n        CHECK_MESSAGE(!outputCheck[0][ival], \"\");\n        outputCheck[0][ival] = true;\n    }\n    static void remove_input_nodes(indexer_node_type& my_indexer, int nInputs) {\n        for(int i=0; i < nInputs; ++i) {\n            my_input_node_type *dp = reinterpret_cast<my_input_node_type *>(all_input_nodes[0][i]);\n            tbb::flow::remove_edge(*dp, tbb::flow::input_port<0>(my_indexer));\n            delete dp;\n        }\n    }\n};\n\ntemplate<typename IType>\nclass parallel_test {\npublic:\n    typedef typename IType::output_type TType;\n    typedef typename IType::tuple_types union_types;\n    static const int SIZE = std::tuple_size<union_types>::value;\n    static void test() {\n        TType v;\n        input_node_helper<SIZE,IType>::print_remark();\n        INFO(\" >\\n\");\n        for(int i=0; i < MaxPorts; ++i) {\n            for(int j=0; j < MaxNInputs; ++j) {\n                all_input_nodes[i][j] = nullptr;\n            }\n        }\n        for(int nInputs = 1; nInputs <= MaxNInputs; ++nInputs) {\n            tbb::flow::graph g;\n            IType* my_indexer_ptr = new IType(g); //makeIndexer<IType>::create();\n            IType my_indexer = *my_indexer_ptr;\n            tbb::flow::queue_node<TType> outq1(g);\n            tbb::flow::queue_node<TType> outq2(g);\n\n            tbb::flow::make_edge(my_indexer, outq1);\n            tbb::flow::make_edge(my_indexer, outq2);\n\n            input_node_helper<SIZE, IType>::add_input_nodes(my_indexer, g, nInputs);\n\n            g.wait_for_all();\n            makeIndexer<IType>::destroy(my_indexer_ptr);\n\n            reset_outputCheck(SIZE, Count);\n            for(int i=0; i < Count*SIZE; ++i) {\n                CHECK_MESSAGE(outq1.try_get(v), \"\");\n                input_node_helper<SIZE, IType>::check_value(v);\n            }\n\n            check_outputCheck(SIZE, Count);\n            reset_outputCheck(SIZE, Count);\n\n            for(int i=0; i < Count*SIZE; i++) {\n                CHECK_MESSAGE(outq2.try_get(v), \"\");\n                input_node_helper<SIZE, IType>::check_value(v);\n            }\n            check_outputCheck(SIZE, Count);\n\n            CHECK_MESSAGE(!outq1.try_get(v), \"\");\n            CHECK_MESSAGE(!outq2.try_get(v), \"\");\n\n            input_node_helper<SIZE, IType>::remove_input_nodes(my_indexer, nInputs);\n            tbb::flow::remove_edge(my_indexer, outq1);\n            tbb::flow::remove_edge(my_indexer, outq2);\n        }\n    }\n};\n\nstd::vector<int> last_index_seen;\n\ntemplate<int ELEM, typename IType>\nclass serial_queue_helper {\npublic:\n    typedef typename IType::output_type OT;\n    typedef typename IType::tuple_types TT;\n    typedef typename std::tuple_element<ELEM-1,TT>::type IT;\n    static void print_remark() {\n        serial_queue_helper<ELEM-1,IType>::print_remark();\n        INFO(\",\" << name_of<IT>::name());\n    }\n    static void fill_one_queue(int maxVal, IType &my_indexer) {\n        // fill queue to \"left\" of me\n        serial_queue_helper<ELEM-1,IType>::fill_one_queue(maxVal,my_indexer);\n        for(int i = 0; i < maxVal; ++i) {\n            CHECK_MESSAGE(tbb::flow::input_port<ELEM-1>(my_indexer).try_put((IT)(i*(ELEM+1))), \"\");\n        }\n    }\n    static void put_one_queue_val(int myVal, IType &my_indexer) {\n        // put this val to my \"left\".\n        serial_queue_helper<ELEM-1,IType>::put_one_queue_val(myVal, my_indexer);\n        CHECK_MESSAGE(tbb::flow::input_port<ELEM-1>(my_indexer).try_put((IT)(myVal*(ELEM+1))), \"\");\n    }\n    static void check_queue_value(OT &v) {\n        if(ELEM - 1 == v.tag()) {\n            // this assumes each or node input is queueing.\n            int rval = getval_helper<ELEM,IType>::get_integer_val(v);\n            CHECK_MESSAGE( rval == (last_index_seen[ELEM-1]+1)*(ELEM+1), \"\");\n            last_index_seen[ELEM-1] = rval / (ELEM+1);\n        }\n        else {\n            serial_queue_helper<ELEM-1,IType>::check_queue_value(v);\n        }\n    }\n};\n\ntemplate<typename IType>\nclass serial_queue_helper<1, IType> {\npublic:\n    typedef typename IType::output_type OT;\n    typedef typename IType::tuple_types TT;\n    typedef typename std::tuple_element<0,TT>::type IT;\n    static void print_remark() {\n        INFO(\"Serial test of indexer_node< \" << name_of<IT>::name());\n    }\n    static void fill_one_queue(int maxVal, IType &my_indexer) {\n        for(int i = 0; i < maxVal; ++i) {\n            CHECK_MESSAGE(tbb::flow::input_port<0>(my_indexer).try_put((IT)(i*2)), \"\");\n        }\n    }\n    static void put_one_queue_val(int myVal, IType &my_indexer) {\n        CHECK_MESSAGE(tbb::flow::input_port<0>(my_indexer).try_put((IT)(myVal*2)), \"\");\n    }\n    static void check_queue_value(OT &v) {\n        CHECK_MESSAGE(v.tag() == 0, \"\");  // won't get here unless true\n        int rval = getval_helper<1,IType>::get_integer_val(v);\n        CHECK_MESSAGE( rval == (last_index_seen[0]+1)*2, \"\");\n        last_index_seen[0] = rval / 2;\n    }\n};\n\ntemplate<typename IType, typename TType, int SIZE>\nvoid test_one_serial( IType &my_indexer, tbb::flow::graph &g) {\n    last_index_seen.clear();\n    for(int ii=0; ii < SIZE; ++ii) last_index_seen.push_back(-1);\n\n    typedef TType q3_input_type;\n    tbb::flow::queue_node< q3_input_type >  q3(g);\n    q3_input_type v;\n\n    tbb::flow::make_edge(my_indexer, q3);\n\n    // fill each queue with its value one-at-a-time\n    for (int i = 0; i < Count; ++i ) {\n        serial_queue_helper<SIZE,IType>::put_one_queue_val(i,my_indexer);\n    }\n\n    g.wait_for_all();\n    for (int i = 0; i < Count * SIZE; ++i ) {\n        g.wait_for_all();\n        CHECK_MESSAGE( (q3.try_get( v )), \"Error in try_get()\");\n        {\n            serial_queue_helper<SIZE,IType>::check_queue_value(v);\n        }\n    }\n    CHECK_MESSAGE( (!q3.try_get( v )), \"extra values in output queue\");\n    for(int ii=0; ii < SIZE; ++ii) last_index_seen[ii] = -1;\n\n    // fill each queue completely before filling the next.\n    serial_queue_helper<SIZE, IType>::fill_one_queue(Count,my_indexer);\n\n    g.wait_for_all();\n    for (int i = 0; i < Count*SIZE; ++i ) {\n        g.wait_for_all();\n        CHECK_MESSAGE( (q3.try_get( v )), \"Error in try_get()\");\n        {\n            serial_queue_helper<SIZE,IType>::check_queue_value(v);\n        }\n    }\n    CHECK_MESSAGE( (!q3.try_get( v )), \"extra values in output queue\");\n}\n\n//\ntemplate<typename NodeType>\nvoid test_input_ports_return_ref(NodeType& mip_node) {\n    typename NodeType::input_ports_type& input_ports1 = mip_node.input_ports();\n    typename NodeType::input_ports_type& input_ports2 = mip_node.input_ports();\n    CHECK_MESSAGE( (&input_ports1 == &input_ports2), \"input_ports() should return reference\");\n}\n\n// Single predecessor at each port, single accepting successor\n//   * put to buffer before port0, then put to buffer before port1, ...\n//   * fill buffer before port0 then fill buffer before port1, ...\n\ntemplate<typename IType>\nclass serial_test {\n    typedef typename IType::output_type TType;  // this is the union\n    typedef typename IType::tuple_types union_types;\n    static const int SIZE = std::tuple_size<union_types>::value;\npublic:\nstatic void test() {\n    tbb::flow::graph g;\n    static const int ELEMS = 3;\n    IType* my_indexer = new IType(g); //makeIndexer<IType>::create(g);\n\n    test_input_ports_return_ref(*my_indexer);\n\n    serial_queue_helper<SIZE, IType>::print_remark(); INFO(\" >\\n\");\n\n    test_one_serial<IType,TType,SIZE>(*my_indexer, g);\n\n    std::vector<IType> indexer_vector(ELEMS,*my_indexer);\n\n    makeIndexer<IType>::destroy(my_indexer);\n\n    for(int e = 0; e < ELEMS; ++e) {\n        test_one_serial<IType,TType,SIZE>(indexer_vector[e], g);\n    }\n}\n\n}; // serial_test\n\ntemplate<\n      template<typename> class TestType,  // serial_test or parallel_test\n      typename T0, typename T1=void, typename T2=void, typename T3=void, typename T4=void,\n      typename T5=void, typename T6=void, typename T7=void, typename T8=void, typename T9=void> // type of the inputs to the indexer_node\nclass generate_test {\npublic:\n    typedef tbb::flow::indexer_node<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>  indexer_node_type;\n    static void do_test() {\n        TestType<indexer_node_type>::test();\n    }\n};\n\n//specializations for indexer node inputs\ntemplate<\n      template<typename> class TestType,\n      typename T0, typename T1, typename T2, typename T3, typename T4,\n      typename T5, typename T6, typename T7, typename T8>\nclass generate_test<TestType, T0, T1, T2, T3, T4, T5, T6, T7, T8> {\npublic:\n    typedef tbb::flow::indexer_node<T0, T1, T2, T3, T4, T5, T6, T7, T8>  indexer_node_type;\n    static void do_test() {\n        TestType<indexer_node_type>::test();\n    }\n};\n\ntemplate<\n      template<typename> class TestType,\n      typename T0, typename T1, typename T2, typename T3, typename T4,\n      typename T5, typename T6, typename T7>\nclass generate_test<TestType, T0, T1, T2, T3, T4, T5, T6, T7> {\npublic:\n    typedef tbb::flow::indexer_node<T0, T1, T2, T3, T4, T5, T6, T7>  indexer_node_type;\n    static void do_test() {\n        TestType<indexer_node_type>::test();\n    }\n};\n\ntemplate<\n      template<typename> class TestType,\n      typename T0, typename T1, typename T2, typename T3, typename T4,\n      typename T5, typename T6>\nclass generate_test<TestType, T0, T1, T2, T3, T4, T5, T6> {\npublic:\n    typedef tbb::flow::indexer_node<T0, T1, T2, T3, T4, T5, T6>  indexer_node_type;\n    static void do_test() {\n        TestType<indexer_node_type>::test();\n    }\n};\n\ntemplate<\n      template<typename> class TestType,\n      typename T0, typename T1, typename T2, typename T3, typename T4,\n      typename T5>\nclass generate_test<TestType, T0, T1, T2, T3, T4, T5>  {\npublic:\n    typedef tbb::flow::indexer_node<T0, T1, T2, T3, T4, T5>  indexer_node_type;\n    static void do_test() {\n        TestType<indexer_node_type>::test();\n    }\n};\n\ntemplate<\n      template<typename> class TestType,\n      typename T0, typename T1, typename T2, typename T3, typename T4>\nclass generate_test<TestType, T0, T1, T2, T3, T4>  {\npublic:\n    typedef tbb::flow::indexer_node<T0, T1, T2, T3, T4>  indexer_node_type;\n    static void do_test() {\n        TestType<indexer_node_type>::test();\n    }\n};\n\ntemplate<\n      template<typename> class TestType,\n      typename T0, typename T1, typename T2, typename T3>\nclass generate_test<TestType, T0, T1, T2, T3> {\npublic:\n    typedef tbb::flow::indexer_node<T0, T1, T2, T3>  indexer_node_type;\n    static void do_test() {\n        TestType<indexer_node_type>::test();\n    }\n};\n\ntemplate<\n      template<typename> class TestType,\n      typename T0, typename T1, typename T2>\nclass generate_test<TestType, T0, T1, T2> {\npublic:\n    typedef tbb::flow::indexer_node<T0, T1, T2>  indexer_node_type;\n    static void do_test() {\n        TestType<indexer_node_type>::test();\n    }\n};\n\ntemplate<\n      template<typename> class TestType,\n      typename T0, typename T1>\nclass generate_test<TestType, T0, T1> {\npublic:\n    typedef tbb::flow::indexer_node<T0, T1>  indexer_node_type;\n    static void do_test() {\n        TestType<indexer_node_type>::test();\n    }\n};\n\ntemplate<\n      template<typename> class TestType,\n      typename T0>\nclass generate_test<TestType, T0> {\npublic:\n    typedef tbb::flow::indexer_node<T0>  indexer_node_type;\n    static void do_test() {\n        TestType<indexer_node_type>::test();\n    }\n};\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\ntemplate<typename tagged_msg_t, typename input_t>\nbool check_edge(tbb::flow::graph& g,\n                tbb::flow::broadcast_node<input_t>& start,\n                tbb::flow::buffer_node<tagged_msg_t>& buf,\n                input_t input_value) {\n    start.try_put(input_value);\n    g.wait_for_all();\n\n    tagged_msg_t msg;\n    bool is_get_succeeded = buf.try_get(msg);\n\n    CHECK_MESSAGE( ((is_get_succeeded)), \"There is no item in the buffer\");\n    CHECK_MESSAGE( ((tbb::flow::cast_to<input_t>(msg) == input_value)), \"Wrong item value\");\n    return true;\n}\n\ntemplate <typename... T>\nvoid sink(T...) {}\n\ntemplate <typename indexer_output_t, typename Type, typename BN, std::size_t... Seq>\nvoid check_edge(tbb::flow::graph& g, BN& bn, tbb::flow::buffer_node<indexer_output_t>& buf, Type, tbb::detail::index_sequence<Seq...>) {\n    sink(check_edge<indexer_output_t>(g, std::get<Seq>(bn), buf, typename std::tuple_element<Seq, Type>::type(Seq))...);\n}\n\ntemplate <typename... Args, std::size_t... Seq>\nvoid test_follows_impl(std::tuple<Args...> t, tbb::detail::index_sequence<Seq...> seq) {\n    using namespace tbb::flow;\n    using indexer_output_t = typename indexer_node<Args...>::output_type;\n\n    graph g;\n    auto bn = std::make_tuple(broadcast_node<Args>(g)...);\n\n    indexer_node<Args...> my_indexer(follows(std::get<Seq>(bn)...));\n\n    buffer_node<indexer_output_t> buf(g);\n    make_edge(my_indexer, buf);\n\n    check_edge<indexer_output_t>(g, bn, buf, t, seq);\n}\n\ntemplate <typename... Args>\nvoid test_follows() {\n    test_follows_impl(std::tuple<Args...>(), tbb::detail::make_index_sequence<sizeof...(Args)>());\n}\n\nvoid test_precedes() {\n    using namespace tbb::flow;\n\n    using indexer_output_t = indexer_node<int, float, double>::output_type;\n\n    graph g;\n\n    broadcast_node<int> start1(g);\n    broadcast_node<float> start2(g);\n    broadcast_node<double> start3(g);\n\n    buffer_node<indexer_output_t> buf1(g);\n    buffer_node<indexer_output_t> buf2(g);\n    buffer_node<indexer_output_t> buf3(g);\n\n    indexer_node<int, float, double> node(precedes(buf1, buf2, buf3));\n\n    make_edge(start1, input_port<0>(node));\n    make_edge(start2, input_port<1>(node));\n    make_edge(start3, input_port<2>(node));\n\n    check_edge<indexer_output_t, int>(g, start1, buf1, 1);\n    check_edge<indexer_output_t, float>(g, start2, buf2, 2.2f);\n    check_edge<indexer_output_t, double>(g, start3, buf3, 3.3);\n}\n\nvoid test_follows_and_precedes_api() {\n    test_follows<double>();\n    test_follows<int, double>();\n    test_follows<int, float, double>();\n    test_follows<float, double, int, double>();\n    test_follows<float, double, int, double, double>();\n    test_follows<float, double, int, double, double, float>();\n    test_follows<float, double, int, double, double, float, long>();\n    test_follows<float, double, int, double, double, float, long, int>();\n    test_follows<float, double, int, double, double, float, long, int, long>();\n    test_follows<float, double, int, double, double, float, long, int, float, long>();\n    test_precedes();\n}\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\nvoid test_deduction_guides() {\n    using namespace tbb::flow;\n    graph g;\n\n    broadcast_node<int> b1(g);\n    broadcast_node<double> b2(g);\n    indexer_node<int, double> i0(g);\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    indexer_node i1(follows(b1, b2));\n    static_assert(std::is_same_v<decltype(i1), indexer_node<int, double>>);\n#endif\n\n    indexer_node i2(i0);\n    static_assert(std::is_same_v<decltype(i2), indexer_node<int, double>>);\n}\n\n#endif\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\nvoid test_try_put_and_wait() {\n    tbb::task_arena arena(1);\n\n    arena.execute([] {\n        tbb::flow::graph g;\n\n        std::vector<int> start_work_items;\n        std::vector<int> processed_items1;\n        std::vector<float> processed_items2;\n        std::vector<int> new_work_items;\n        int wait_message = 10;\n\n        for (int i = 0; i < wait_message; ++i) {\n            start_work_items.emplace_back(i);\n            new_work_items.emplace_back(i + 1 + wait_message);\n        }\n\n        tbb::flow::indexer_node<int, float> indexer(g);\n        using output_type = decltype(indexer)::output_type;\n\n        tbb::flow::function_node<output_type, int> function(g, tbb::flow::serial,\n            [&](output_type tag_msg) noexcept {\n                if (tag_msg.tag() == 0) {\n                    int input = tag_msg.cast_to<int>();\n                    if (input == wait_message) {\n                        for (auto item : new_work_items) {\n                            tbb::flow::input_port<0>(indexer).try_put(item);\n                            tbb::flow::input_port<1>(indexer).try_put(float(item));\n                        }\n                    }\n                    processed_items1.emplace_back(input);\n                } else {\n                    processed_items2.emplace_back(tag_msg.cast_to<float>());\n                }\n                return 0;\n            });\n\n        tbb::flow::make_edge(indexer, function);\n\n        for (auto item : start_work_items) {\n            tbb::flow::input_port<0>(indexer).try_put(item);\n            tbb::flow::input_port<1>(indexer).try_put(float(item));\n        }\n\n        tbb::flow::input_port<0>(indexer).try_put_and_wait(wait_message);\n\n        // Since function is a serial queueing function node, all start_work_items would be stored in a queue\n        // wait_message would be stored at the end of the queue\n        // During the try_put_and_wait call, start_work_items would be processed from the queue in FIFO order\n        // wait_message would be processed last and adds new_work_items into the same queue\n        // It is expected then new_work_items would be processed during wait_for_all() call\n\n        std::size_t check_index1 = 0;\n        std::size_t check_index2 = 0;\n\n        for (auto item : start_work_items) {\n            CHECK_MESSAGE(processed_items1[check_index1++] == item, \"Unexpected items processing\");\n            CHECK_MESSAGE(processed_items2[check_index2++] == float(item), \"Unexpected items processing\");\n        }\n\n        // wait_message was submitted only to the first port of indexer_node\n        CHECK_MESSAGE(processed_items1[check_index1++] == wait_message, \"Unexpected wait_message processing\");\n\n        g.wait_for_all();\n\n        for (auto item : new_work_items) {\n            CHECK_MESSAGE(processed_items1[check_index1++] == item, \"Unexpected new_work_items processing\");\n            CHECK_MESSAGE(processed_items2[check_index2++] == float(item), \"Unexpected new_work_items processing\");\n        }\n        CHECK((check_index1 == processed_items1.size() && check_index2 == processed_items2.size()));\n    });\n}\n#endif // __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n\n//! Serial and parallel test on various tuple sizes\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Serial and parallel test\") {\n    INFO(\"Testing indexer_node, \");\n\n   for (int p = 0; p < 2; ++p) {\n       generate_test<serial_test, float>::do_test();\n#if MAX_TUPLE_TEST_SIZE >= 4\n       generate_test<serial_test, float, double, int, short>::do_test();\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 6\n       generate_test<serial_test, double, double, int, long, int, short>::do_test();\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 8\n       generate_test<serial_test, float, double, double, double, float, int, float, long>::do_test();\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 10\n       generate_test<serial_test, float, double, int, double, double, float, long, int, float, long>::do_test();\n#endif\n       generate_test<parallel_test, float, double>::do_test();\n#if MAX_TUPLE_TEST_SIZE >= 3\n       generate_test<parallel_test, float, int, long>::do_test();\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 5\n       generate_test<parallel_test, double, double, int, int, short>::do_test();\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 7\n       generate_test<parallel_test, float, int, double, float, long, float, long>::do_test();\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 9\n       generate_test<parallel_test, float, double, int, double, double, long, int, float, long>::do_test();\n#endif\n   }\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n//! Test follows and precedes API\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Follows and precedes API\") {\n    test_follows_and_precedes_api();\n}\n#endif\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Test deduction guides\n//! \\brief \\ref requirement\nTEST_CASE(\"Deduction guides\") {\n    test_deduction_guides();\n}\n#endif\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test indexer_node try_put_and_wait\") {\n    test_try_put_and_wait();\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_input_node.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// have to expose the reset_node method to be able to reset a function_body\n\n#include \"common/config.h\"\n\n#include \"tbb/flow_graph.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_assert.h\"\n#include \"common/concepts_common.h\"\n\n\n//! \\file test_input_node.cpp\n//! \\brief Test for [flow_graph.input_node] specification\n\n\nusing tbb::detail::d2::graph_task;\nusing tbb::detail::d2::SUCCESSFULLY_ENQUEUED;\n\nconst int N = 1000;\n\ntemplate< typename T >\nclass test_push_receiver : public tbb::flow::receiver<T>, utils::NoAssign {\n\n    std::atomic<int> my_counters[N];\n    tbb::flow::graph& my_graph;\n\npublic:\n\n    test_push_receiver(tbb::flow::graph& g) : my_graph(g) {\n        for (int i = 0; i < N; ++i )\n            my_counters[i] = 0;\n    }\n\n    int get_count( int i ) {\n        int v = my_counters[i];\n        return v;\n    }\n\n    typedef typename tbb::flow::receiver<T>::predecessor_type predecessor_type;\n\n    graph_task* try_put_task( const T &v ) override {\n        int i = (int)v;\n        ++my_counters[i];\n        return const_cast<graph_task*>(SUCCESSFULLY_ENQUEUED);\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    graph_task* try_put_task( const T& v, const tbb::detail::d2::message_metainfo& ) override {\n        return try_put_task(v);\n    }\n#endif\n\n    tbb::flow::graph& graph_reference() const override {\n        return my_graph;\n    }\n};\n\ntemplate< typename T >\nclass my_input_body {\n\n    unsigned my_count;\n    int *ninvocations;\n\npublic:\n\n    my_input_body() : ninvocations(nullptr) { my_count = 0; }\n    my_input_body(int &_inv) : ninvocations(&_inv)  { my_count = 0; }\n\n    T operator()( tbb::flow_control& fc ) {\n        T v = (T)my_count++;\n        if(ninvocations) ++(*ninvocations);\n        if ( (int)v < N ){\n            return v;\n        }else{\n            fc.stop();\n            return T();\n        }\n    }\n\n};\n\ntemplate< typename T >\nclass function_body {\n\n    std::atomic<int> *my_counters;\n\npublic:\n\n    function_body( std::atomic<int> *counters ) : my_counters(counters) {\n        for (int i = 0; i < N; ++i )\n            my_counters[i] = 0;\n    }\n\n    bool operator()( T v ) {\n        ++my_counters[(int)v];\n        return true;\n    }\n\n};\n\ntemplate< typename T >\nvoid test_single_dest() {\n    // push only\n    tbb::flow::graph g;\n    tbb::flow::input_node<T> src(g, my_input_body<T>() );\n    test_push_receiver<T> dest(g);\n    tbb::flow::make_edge( src, dest );\n    src.activate();\n    g.wait_for_all();\n    for (int i = 0; i < N; ++i ) {\n        CHECK_MESSAGE( dest.get_count(i) == 1, \"\" );\n    }\n\n    // push only\n    std::atomic<int> counters3[N];\n    tbb::flow::input_node<T> src3(g, my_input_body<T>() );\n    src3.activate();\n\n    function_body<T> b3( counters3 );\n    tbb::flow::function_node<T,bool> dest3(g, tbb::flow::unlimited, b3 );\n    tbb::flow::make_edge( src3, dest3 );\n    g.wait_for_all();\n    for (int i = 0; i < N; ++i ) {\n        int v = counters3[i];\n        CHECK_MESSAGE( v == 1, \"\" );\n    }\n\n    // push & pull\n    tbb::flow::input_node<T> src2(g, my_input_body<T>() );\n    src2.activate();\n    std::atomic<int> counters2[N];\n\n    function_body<T> b2( counters2 );\n    tbb::flow::function_node<T,bool,tbb::flow::rejecting> dest2(g, tbb::flow::serial, b2 );\n    tbb::flow::make_edge( src2, dest2 );\n    g.wait_for_all();\n    for (int i = 0; i < N; ++i ) {\n        int v = counters2[i];\n        CHECK_MESSAGE( v == 1, \"\" );\n    }\n\n    // test copy constructor\n    tbb::flow::input_node<T> src_copy(src);\n    src_copy.activate();\n    test_push_receiver<T> dest_c(g);\n    CHECK_MESSAGE( src_copy.register_successor(dest_c), \"\" );\n    g.wait_for_all();\n    for (int i = 0; i < N; ++i ) {\n        CHECK_MESSAGE( dest_c.get_count(i) == 1, \"\" );\n    }\n}\n\nvoid test_reset() {\n    //    input_node -> function_node\n    tbb::flow::graph g;\n    std::atomic<int> counters3[N];\n    tbb::flow::input_node<int> src3(g, my_input_body<int>());\n    src3.activate();\n    tbb::flow::input_node<int> src_inactive(g, my_input_body<int>());\n    function_body<int> b3( counters3 );\n    tbb::flow::function_node<int,bool> dest3(g, tbb::flow::unlimited, b3);\n    tbb::flow::make_edge( src3, dest3 );\n    //    source_node already in active state.  Let the graph run,\n    g.wait_for_all();\n    //    check the array for each value.\n    for (int i = 0; i < N; ++i ) {\n        int v = counters3[i];\n        CHECK_MESSAGE( v == 1, \"\" );\n        counters3[i] = 0;\n    }\n\n    g.reset(tbb::flow::rf_reset_bodies);  // <-- re-initializes the counts.\n    // and spawns task to run input\n    src3.activate();\n\n    g.wait_for_all();\n    //    check output queue again.  Should be the same contents.\n    for (int i = 0; i < N; ++i ) {\n        int v = counters3[i];\n        CHECK_MESSAGE( v == 1, \"\" );\n        counters3[i] = 0;\n    }\n    g.reset();  // doesn't reset the input_node_body to initial state, but does spawn a task\n                // to run the input_node.\n\n    g.wait_for_all();\n    // array should be all zero\n    for (int i = 0; i < N; ++i ) {\n        int v = counters3[i];\n        CHECK_MESSAGE( v == 0, \"\" );\n    }\n\n    remove_edge(src3, dest3);\n    make_edge(src_inactive, dest3);\n\n    // src_inactive doesn't run\n    g.wait_for_all();\n    for (int i = 0; i < N; ++i ) {\n        int v = counters3[i];\n        CHECK_MESSAGE( v == 0, \"\" );\n    }\n\n    // run graph\n    src_inactive.activate();\n    g.wait_for_all();\n    // check output\n    for (int i = 0; i < N; ++i ) {\n        int v = counters3[i];\n        CHECK_MESSAGE( v == 1, \"\" );\n        counters3[i] = 0;\n    }\n    g.reset(tbb::flow::rf_reset_bodies);  // <-- reinitializes the counts\n    // src_inactive doesn't run\n    g.wait_for_all();\n    for (int i = 0; i < N; ++i ) {\n        int v = counters3[i];\n        CHECK_MESSAGE( v == 0, \"\" );\n    }\n\n    // start it up\n    src_inactive.activate();\n    g.wait_for_all();\n    for (int i = 0; i < N; ++i ) {\n        int v = counters3[i];\n        CHECK_MESSAGE( v == 1, \"\" );\n        counters3[i] = 0;\n    }\n    g.reset();  // doesn't reset the input_node_body to initial state, and doesn't\n                // spawn a task to run the input_node.\n\n    g.wait_for_all();\n    // array should be all zero\n    for (int i = 0; i < N; ++i ) {\n        int v = counters3[i];\n        CHECK_MESSAGE( v == 0, \"\" );\n    }\n    src_inactive.activate();\n    // input_node_body is already in final state, so input_node will not forward a message.\n    g.wait_for_all();\n    for (int i = 0; i < N; ++i ) {\n        int v = counters3[i];\n        CHECK_MESSAGE( v == 0, \"\" );\n    }\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n#include <array>\nvoid test_follows_and_precedes_api() {\n    using namespace tbb::flow;\n\n    graph g;\n\n    std::array<buffer_node<bool>, 3> successors {{\n                                                  buffer_node<bool>(g),\n                                                  buffer_node<bool>(g),\n                                                  buffer_node<bool>(g)\n        }};\n\n    bool do_try_put = true;\n    input_node<bool> src(\n        precedes(successors[0], successors[1], successors[2]),\n        [&](tbb::flow_control& fc) -> bool {\n            if(!do_try_put)\n                fc.stop();\n            do_try_put = !do_try_put;\n            return true;\n        }\n    );\n\n    src.activate();\n    g.wait_for_all();\n\n    bool storage;\n    for(auto& successor: successors) {\n        CHECK_MESSAGE((successor.try_get(storage) && !successor.try_get(storage)),\n                      \"Not exact edge quantity was made\");\n    }\n}\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n\n//! Test push, push-pull behavior and copy constructor\n//! \\brief \\ref error_guessing \\ref requirement\nTEST_CASE(\"Single destination tests\"){\n    for ( unsigned int p = utils::MinThread; p < utils::MaxThread; ++p ) {\n        tbb::task_arena arena(p);\n        arena.execute(\n            [&]() {\n                test_single_dest<int>();\n                test_single_dest<float>();\n            }\n        );\n\t}\n}\n\n//! Test reset variants\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Reset test\"){\n    test_reset();\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n//! Test follows and precedes API\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Follows and precedes API\"){\n    test_follows_and_precedes_api();\n}\n#endif\n\n//! Test try_get before activation\n//! \\brief \\ref error_guessing\nTEST_CASE(\"try_get before activation\"){\n    tbb::flow::graph g;\n    tbb::flow::input_node<int> in(g, [&](tbb::flow_control& fc) { fc.stop(); return 0;});\n\n    int tmp = -1;\n    CHECK_MESSAGE((in.try_get(tmp) == false), \"try_get before activation should not succeed\");\n}\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"constraints for input_node output\") {\n    struct Object : test_concepts::Copyable, test_concepts::CopyAssignable {};\n\n    static_assert(utils::well_formed_instantiation<tbb::flow::input_node, Object>);\n    static_assert(utils::well_formed_instantiation<tbb::flow::input_node, int>);\n    static_assert(!utils::well_formed_instantiation<tbb::flow::input_node, test_concepts::NonCopyable>);\n    static_assert(!utils::well_formed_instantiation<tbb::flow::input_node, test_concepts::NonCopyAssignable>);\n}\n\ntemplate <typename Output, typename Body>\nconcept can_call_input_node_ctor = requires( tbb::flow::graph& graph, Body body, tbb::flow::buffer_node<int> f ) {\n    tbb::flow::input_node<Output>(graph, body);\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    tbb::flow::input_node<Output>(tbb::flow::precedes(f), body);\n#endif\n};\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"constraints for input_node body\") {\n    using output_type = int;\n    using namespace test_concepts::input_node_body;\n\n    static_assert(can_call_input_node_ctor<output_type, Correct<output_type>>);\n    static_assert(!can_call_input_node_ctor<output_type, NonCopyable<output_type>>);\n    static_assert(!can_call_input_node_ctor<output_type, NonDestructible<output_type>>);\n    static_assert(!can_call_input_node_ctor<output_type, NoOperatorRoundBrackets<output_type>>);\n    static_assert(!can_call_input_node_ctor<output_type, WrongInputOperatorRoundBrackets<output_type>>);\n    static_assert(!can_call_input_node_ctor<output_type, WrongReturnOperatorRoundBrackets<output_type>>);\n}\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_intrusive_list.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_intrusive_list.cpp\n//! \\brief Test for [internal] functionality\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"../../src/tbb/intrusive_list.h\"\n\nusing tbb::detail::r1::intrusive_list_node;\n\n// Machine word filled with repeated pattern of FC bits\nconst uintptr_t NoliMeTangere = ~uintptr_t(0)/0xFF*0xFC;\n\nstruct VerificationBase : utils::NoAfterlife {\n    uintptr_t m_Canary;\n    VerificationBase() : m_Canary(NoliMeTangere) {}\n}; // struct VerificationBase\n\nstruct DataItemWithInheritedNodeBase : intrusive_list_node {\n    int m_Data;\n\n    DataItemWithInheritedNodeBase( int value ) : m_Data(value) {}\n\n    int Data() const { return m_Data; }\n}; // struct DataItemWithInheritedNodeBase\n\nstruct DataItemWithInheritedNode : VerificationBase, DataItemWithInheritedNodeBase {\n    friend class tbb::detail::r1::intrusive_list<DataItemWithInheritedNode>;\n\n    DataItemWithInheritedNode( int value ) : DataItemWithInheritedNodeBase(value) {}\n}; // struct DataItemWithInheritedNode\n\nstruct DataItemWithMemberNodeBase {\n    int m_Data;\n\n    // Cannot be used be member_intrusive_list to form lists of objects derived from DataItemBase\n    intrusive_list_node m_BaseNode;\n\n    DataItemWithMemberNodeBase( int value ) : m_Data(value) {}\n\n    int Data() const { return m_Data; }\n}; // struct DataItemWithMemberNodeBase\n\nstruct DataItemWithMemberNodes : VerificationBase, DataItemWithMemberNodeBase {\n    intrusive_list_node m_Node;\n\n    DataItemWithMemberNodes( int value ) : DataItemWithMemberNodeBase(value) {}\n}; // struct DataItemWithMemberNodes\n\nusing intrusive_list1 = tbb::detail::r1::intrusive_list<DataItemWithInheritedNode>;\nusing intrusive_list2 = tbb::detail::r1::memptr_intrusive_list<DataItemWithMemberNodes,\n                                                               DataItemWithMemberNodeBase,\n                                                               &DataItemWithMemberNodeBase::m_BaseNode>;\n\nusing intrusive_list3 = tbb::detail::r1::memptr_intrusive_list<DataItemWithMemberNodes,\n                                                               DataItemWithMemberNodes,\n                                                               &DataItemWithMemberNodes::m_Node>;\n\nconst int NumElements = 256 * 1024;\n\n// Iterates through the list forward and backward checking the validity of values stored by the list nodes\ntemplate <typename List, typename Iterator>\nvoid check_list_nodes( List& il, int value_step ) {\n    REQUIRE_MESSAGE(il.size() == unsigned(NumElements / value_step), \"Wrong size of the list\");\n    REQUIRE_MESSAGE(!il.empty(), \"Incorrect result of empty() or the list is corrupted\");\n\n    int i;\n    Iterator it = il.begin();\n\n    Iterator it_default;\n    REQUIRE_MESSAGE(it_default != it, \"Incorrect default constructed intrusive_list::iterator\");\n\n    for ( i = value_step - 1; it != il.end(); ++it, i += value_step ) {\n        REQUIRE_MESSAGE(it->Data() == i, \"Unexpected node value while iterating forward\");\n        REQUIRE_MESSAGE(it->m_Canary == NoliMeTangere, \"Memory corruption\");\n    }\n\n    REQUIRE_MESSAGE(i == NumElements + value_step - 1, \"Wrong number of list elements while iterating forward\");\n    it = il.end();\n\n    for ( i = NumElements - 1, it--; it != il.end(); --it, i -= value_step ) {\n        REQUIRE_MESSAGE(it->Data() == i, \"Unexpected node value while iterating backward\");\n        REQUIRE_MESSAGE(it->m_Canary == NoliMeTangere, \"Memory corruption\");\n    }\n    REQUIRE_MESSAGE(i == -1, \"Wrong number of list elements while iterating backward\");\n}\n\ntemplate <typename List, typename Item>\nvoid test_list_operations() {\n    using iterator = typename List::iterator;\n\n    List il;\n\n    for (int i = NumElements - 1; i >= 0; --i) {\n        il.push_front(*new Item(i));\n    }\n    check_list_nodes<const List, typename List::const_iterator>(il, 1);\n    iterator it = il.begin();\n\n    for (;it != il.end(); ++it) {\n        Item& item = *it;\n        it = il.erase(it); // also advances the iterator\n        delete &item;\n    }\n\n    check_list_nodes<List, iterator>(il, 2);\n    for (it = il.begin(); it != il.end(); ++it) {\n        Item& item = *it;\n        il.remove(*it++); // extra advance here as well\n        delete &item;\n    }\n\n    check_list_nodes<List, iterator>(il, 4);\n    for (it = il.begin(); it != il.end();) {\n        Item& item = *it++; // the iterator advances only here\n        il.remove(item);\n        delete &item;\n    }\n    REQUIRE_MESSAGE(il.size() == 0, \"The list has wrong size or not all items were removed\");\n    REQUIRE_MESSAGE(il.empty(), \"Incorrect result of empty() or not all items were removed\");\n}\n\n// TODO: tests for intrusive_list assertions were not ported\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test tbb::detail::r1::intrusive_list operations\") {\n    test_list_operations<intrusive_list1, DataItemWithInheritedNode>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test tbb::detail::r1::memptr_intrusive_list operations\") {\n    test_list_operations<intrusive_list2, DataItemWithMemberNodes>();\n    test_list_operations<intrusive_list3, DataItemWithMemberNodes>();\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_join_node.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifdef TBB_TEST_LOW_WORKLOAD\n    #undef MAX_TUPLE_TEST_SIZE\n    #define MAX_TUPLE_TEST_SIZE 3\n#endif\n\n#include \"common/config.h\"\n\n#include \"test_join_node.h\"\n#include \"common/test_join_node_multiple_predecessors.h\"\n\n//! \\file test_join_node.cpp\n//! \\brief Test for [flow_graph.join_node] specification\n\nstatic std::atomic<int> output_count;\n\n// get the tag from the output tuple and emit it.\n// the first tuple component is tag * 2 cast to the type\ntemplate<typename OutputTupleType>\nclass recirc_output_func_body {\npublic:\n    // we only need this to use input_node_helper\n    typedef typename tbb::flow::join_node<OutputTupleType, tbb::flow::tag_matching> join_node_type;\n    static const int N = std::tuple_size<OutputTupleType>::value;\n    int operator()(const OutputTupleType &v) {\n        int out = int(std::get<0>(v))/2;\n        input_node_helper<N, join_node_type>::only_check_value(out, v);\n        ++output_count;\n        return out;\n    }\n};\n\ntemplate<typename JType>\nclass tag_recirculation_test {\npublic:\n    typedef typename JType::output_type TType;\n    typedef typename std::tuple<int, tbb::flow::continue_msg> input_tuple_type;\n    typedef tbb::flow::join_node<input_tuple_type, tbb::flow::reserving> input_join_type;\n    static const int N = std::tuple_size<TType>::value;\n    static void test() {\n        input_node_helper<N, JType>::print_remark(\"Recirculation test of tag-matching join\");\n        INFO(\" >\\n\");\n        for(int maxTag = 1; maxTag <10; maxTag *= 3) {\n            for(int i = 0; i < N; ++i) all_input_nodes[i][0] = nullptr;\n\n            tbb::flow::graph g;\n            // this is the tag-matching join we're testing\n            JType * my_join = makeJoin<N, JType, tbb::flow::tag_matching>::create(g);\n            // input_node for continue messages\n            tbb::flow::input_node<tbb::flow::continue_msg> snode(g, recirc_input_node_body());\n            // reserving join that matches recirculating tags with continue messages.\n            input_join_type * my_input_join = makeJoin<2, input_join_type, tbb::flow::reserving>::create(g);\n            // tbb::flow::make_edge(snode, tbb::flow::input_port<1>(*my_input_join));\n            tbb::flow::make_edge(snode, std::get<1>(my_input_join->input_ports()));\n            // queue to hold the tags\n            tbb::flow::queue_node<int> tag_queue(g);\n            tbb::flow::make_edge(tag_queue, tbb::flow::input_port<0>(*my_input_join));\n            // add all the function_nodes that are inputs to the tag-matching join\n            input_node_helper<N, JType>::add_recirc_func_nodes(*my_join, *my_input_join, g);\n            // add the function_node that accepts the output of the join and emits the int tag it was based on\n            tbb::flow::function_node<TType, int> recreate_tag(g, tbb::flow::unlimited, recirc_output_func_body<TType>());\n            tbb::flow::make_edge(*my_join, recreate_tag);\n            // now the recirculating part (output back to the queue)\n            tbb::flow::make_edge(recreate_tag, tag_queue);\n\n            // put the tags into the queue\n            for(int t = 1; t<=maxTag; ++t) tag_queue.try_put(t);\n\n            input_count = Recirc_count;\n            output_count = 0;\n\n            // start up the source node to get things going\n            snode.activate();\n\n            // wait for everything to stop\n            g.wait_for_all();\n\n            CHECK_MESSAGE( (output_count==Recirc_count), \"not all instances were received\");\n\n            int j{};\n            // grab the tags from the queue, record them\n            std::vector<bool> out_tally(maxTag, false);\n            for(int i = 0; i < maxTag; ++i) {\n                CHECK_MESSAGE( (tag_queue.try_get(j)), \"not enough tags in queue\");\n                CHECK_MESSAGE( (!out_tally.at(j-1)), \"duplicate tag from queue\");\n                out_tally[j-1] = true;\n            }\n            CHECK_MESSAGE( (!tag_queue.try_get(j)), \"Extra tags in recirculation queue\");\n\n            // deconstruct graph\n            input_node_helper<N, JType>::remove_recirc_func_nodes(*my_join, *my_input_join);\n            tbb::flow::remove_edge(*my_join, recreate_tag);\n            makeJoin<N, JType, tbb::flow::tag_matching>::destroy(my_join);\n            tbb::flow::remove_edge(tag_queue, tbb::flow::input_port<0>(*my_input_join));\n            tbb::flow::remove_edge(snode, tbb::flow::input_port<1>(*my_input_join));\n            makeJoin<2, input_join_type, tbb::flow::reserving>::destroy(my_input_join);\n        }\n    }\n};\n\ntemplate<typename JType>\nclass generate_recirc_test {\npublic:\n    typedef tbb::flow::join_node<JType, tbb::flow::tag_matching> join_node_type;\n    static void do_test() {\n        tag_recirculation_test<join_node_type>::test();\n    }\n};\n\n//! Test hash buffers behavior\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Tagged buffers test\"){\n    TestTaggedBuffers();\n}\n\n//! Test with various policies and tuple sizes\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Main test\"){\n    test_main<tbb::flow::queueing>();\n    test_main<tbb::flow::reserving>();\n    test_main<tbb::flow::tag_matching>();\n}\n\n//! Test with recirculating tags\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Recirculation test\"){\n    generate_recirc_test<std::tuple<int,float> >::do_test();\n}\n\n// TODO: Look deeper into this test to see if it has the right name\n// and if it actually tests some kind of regression. It is possible\n// that `connect_join_via_follows` and `connect_join_via_precedes`\n// functions are redundant.\n\n//! Test maintaining correct count of ports without input\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test removal of the predecessor while having none\") {\n    using namespace multiple_predecessors;\n\n    test(connect_join_via_make_edge);\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test reservation on the port\") {\n    tbb::flow::graph g;\n\n    tbb::flow::buffer_node<int> buffer1(g), buffer2(g);\n    tbb::flow::join_node<std::tuple<int, int>, tbb::flow::reserving> join(g);\n    tbb::flow::buffer_node<std::tuple<int, int>> buffer3(g);\n\n    auto& port0 = tbb::flow::input_port<0>(join);\n    auto& port1 = tbb::flow::input_port<1>(join);\n\n    tbb::flow::make_edge(buffer1, port0);\n    tbb::flow::make_edge(buffer2, port1);\n    tbb::flow::make_edge(join, buffer3);\n\n    int value = -42;\n    bool result = port0.reserve(value);\n    CHECK_MESSAGE(!result, \"Incorrect reserve return value\");\n\n    result = port1.reserve(value);\n    CHECK_MESSAGE(!result, \"Incorrect reserve return value\");\n\n    buffer1.try_put(1);\n    g.wait_for_all();\n\n    result = port0.reserve(value);\n    CHECK_MESSAGE(result, \"Incorrect reserve return value\");\n    CHECK_MESSAGE(value == 1, \"Incorrect reserved value\");\n    port0.release();\n\n    buffer2.try_put(2);\n    g.wait_for_all();\n\n    result = port1.reserve(value);\n    CHECK_MESSAGE(result, \"incorrect reserve return value\");\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_join_node.h",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifndef tbb_test_join_node_H\n#define tbb_test_join_node_H\n\n#if _MSC_VER\n// Suppress \"decorated name length exceeded, name was truncated\" warning\n#if __INTEL_COMPILER\n#pragma warning( disable: 2586 )\n#else\n#pragma warning( disable: 4503 )\n#endif\n#endif\n\n#include \"tbb/flow_graph.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/checktype.h\"\n#include \"common/graph_utils.h\"\n\n#include <type_traits>\n\nconst char *names[] = {\n    \"Adam\", \"Bruce\", \"Charles\", \"Daniel\", \"Evan\", \"Frederich\", \"George\", \"Hiram\", \"Ichabod\",\n    \"John\", \"Kevin\", \"Leonard\", \"Michael\", \"Ned\", \"Olin\", \"Paul\", \"Quentin\", \"Ralph\", \"Steven\",\n    \"Thomas\", \"Ulysses\", \"Victor\", \"Walter\", \"Xerxes\", \"Yitzhak\", \"Zebediah\", \"Anne\", \"Bethany\",\n    \"Clarisse\", \"Dorothy\", \"Erin\", \"Fatima\", \"Gabrielle\", \"Helen\", \"Irene\", \"Jacqueline\",\n    \"Katherine\", \"Lana\", \"Marilyn\", \"Noelle\", \"Okiilani\", \"Pauline\", \"Querida\", \"Rose\", \"Sybil\",\n    \"Tatiana\", \"Umiko\", \"Victoria\", \"Wilma\", \"Xena\", \"Yolanda\", \"Zoe\", \"Algernon\", \"Benjamin\",\n    \"Caleb\", \"Dylan\", \"Ezra\", \"Felix\", \"Gabriel\", \"Henry\", \"Issac\", \"Jasper\", \"Keifer\",\n    \"Lincoln\", \"Milo\", \"Nathaniel\", \"Owen\", \"Peter\", \"Quincy\", \"Ronan\", \"Silas\", \"Theodore\",\n    \"Uriah\", \"Vincent\", \"Wilbur\", \"Xavier\", \"Yoda\", \"Zachary\", \"Amelia\", \"Brielle\", \"Charlotte\",\n    \"Daphne\", \"Emma\", \"Fiona\", \"Grace\", \"Hazel\", \"Isla\", \"Juliet\", \"Keira\", \"Lily\", \"Mia\",\n    \"Nora\", \"Olivia\", \"Penelope\", \"Quintana\", \"Ruby\", \"Sophia\", \"Tessa\", \"Ursula\", \"Violet\",\n    \"Willow\", \"Xanthe\", \"Yvonne\", \"ZsaZsa\", \"Asher\", \"Bennett\", \"Connor\", \"Dominic\", \"Ethan\",\n    \"Finn\", \"Grayson\", \"Hudson\", \"Ian\", \"Jackson\", \"Kent\", \"Liam\", \"Matthew\", \"Noah\", \"Oliver\",\n    \"Parker\", \"Quinn\", \"Rhys\", \"Sebastian\", \"Taylor\", \"Umberto\", \"Vito\", \"William\", \"Xanto\",\n    \"Yogi\", \"Zane\", \"Ava\", \"Brenda\", \"Chloe\", \"Delilah\", \"Ella\", \"Felicity\", \"Genevieve\",\n    \"Hannah\", \"Isabella\", \"Josephine\", \"Kacie\", \"Lucy\", \"Madeline\", \"Natalie\", \"Octavia\",\n    \"Piper\", \"Qismah\", \"Rosalie\", \"Scarlett\", \"Tanya\", \"Uta\", \"Vivian\", \"Wendy\", \"Xola\",\n    \"Yaritza\", \"Zanthe\"};\n\nstatic const int NameCnt = sizeof(names)/sizeof(char *);\n\ntemplate<typename K>\nstruct index_to_key {\n    K operator()(const int indx) {\n        return (K)(3*indx+1);\n    }\n};\n\ntemplate<>\nstruct index_to_key<std::string> {\n    std::string operator()(const int indx) {\n        return std::string(names[indx % NameCnt]);\n    }\n};\n\ntemplate<typename K>\nstruct K_deref {\n    typedef K type;\n};\n\ntemplate<typename K>\nstruct K_deref<K&> {\n    typedef K type;\n};\n\ntemplate<typename K, typename V>\nstruct MyKeyFirst {\n    K my_key;\n    V my_value;\n    MyKeyFirst(int i = 0, int v = 0): my_key(index_to_key<K>()(i)), my_value((V)v) {\n    }\n    void print_val() const {\n        INFO(\"MyKeyFirst{\"); print_my_value(my_key); INFO(\",\"); print_my_value(my_value); INFO(\"}\");\n    }\n    operator int() const { return (int)my_value; }\n};\n\ntemplate<typename K, typename V>\nstruct MyKeySecond {\n    V my_value;\n    K my_key;\n    MyKeySecond(int i = 0, int v = 0): my_value((V)v), my_key(index_to_key<K>()(i)) {\n    }\n    void print_val() const {\n        INFO(\"MyKeySecond{\"); print_my_value(my_key); INFO(\",\"); print_my_value(my_value); INFO(\"}\");\n    }\n    operator int() const { return (int)my_value; }\n};\n\ntemplate<typename K, typename V>\nstruct MyMessageKeyWithoutKey {\n    V my_value;\n    K my_message_key;\n    MyMessageKeyWithoutKey(int i = 0, int v = 0): my_value((V)v), my_message_key(index_to_key<K>()(i)) {\n    }\n    void print_val() const {\n        INFO(\"MyMessageKeyWithoutKey{\"); print_my_value(my_message_key); INFO(\",\"); print_my_value(my_value); INFO(\"}\");\n    }\n    operator int() const { return (int)my_value; }\n    const K& key() const {\n        return my_message_key;\n    }\n};\n\ntemplate<typename K, typename V>\nstruct MyMessageKeyWithBrokenKey {\n    V my_value;\n    K my_key;\n    K my_message_key;\n    MyMessageKeyWithBrokenKey(int i = 0, int v = 0): my_value((V)v), my_key(), my_message_key(index_to_key<K>()(i)) {\n    }\n    void print_val() const {\n        INFO(\"MyMessageKeyWithBrokenKey{\"); print_my_value(my_message_key); INFO(\",\"); print_my_value(my_value); INFO(\"}\");\n    }\n    operator int() const { return (int)my_value; }\n    const K& key() const {\n        return my_message_key;\n    }\n\n};\n\ntemplate<typename K, typename V>\nstruct MyKeyWithBrokenMessageKey {\n    V my_value;\n    K my_key;\n    MyKeyWithBrokenMessageKey(int i = 0, int v = 0): my_value((V)v), my_key(index_to_key<K>()(i)) {\n    }\n    void print_val() const {\n        INFO(\"MyKeyWithBrokenMessageKey{\"); print_my_value(my_key); INFO(\",\"); print_my_value(my_value); INFO(\"}\");\n    }\n    operator int() const { return (int)my_value; }\n    K key() const {\n        CHECK_MESSAGE( (false), \"The method should never be called\");\n        return K();\n    }\n};\n\ntemplate<typename K, typename V>\nstruct MyMessageKeyWithoutKeyMethod {\n    V my_value;\n    K my_message_key;\n    MyMessageKeyWithoutKeyMethod(int i = 0, int v = 0): my_value((V)v), my_message_key(index_to_key<K>()(i)) {\n    }\n    void print_val() const {\n        INFO(\"MyMessageKeyWithoutKeyMethod{\"); print_my_value(my_message_key); INFO(\",\"); print_my_value(my_value); INFO(\"}\");\n    }\n    operator int() const { return (int)my_value; }\n    //K key() const; // Do not define\n};\n\n// Overload for MyMessageKeyWithoutKeyMethod\ntemplate <typename K, typename V>\nK key_from_message(const MyMessageKeyWithoutKeyMethod<typename std::decay<K>::type, V> &m) {\n    return m.my_message_key;\n}\n\n\n// pattern for creating values in the tag_matching and key_matching, given an integer and the index in the tuple\ntemplate<typename TT, size_t INDEX>\nstruct make_thingie {\n    TT operator()(int const &i) {\n        return TT(i * (INDEX+1));\n    }\n};\n\ntemplate<template <typename, typename> class T, typename K, typename V, size_t INDEX>\nstruct make_thingie<T<K, V>, INDEX> {\n    T<K, V> operator()(int const &i) {\n        return T<K, V>(i, i*(INDEX+1));\n    }\n};\n\n// cast_from<T>::my_int_val(i);\ntemplate<typename T>\nstruct cast_from {\n    static int my_int_val(T const &i) { return (int)i; }\n};\n\ntemplate<typename K, typename V>\nstruct cast_from<MyKeyFirst<K, V> > {\n    static int my_int_val(MyKeyFirst<K, V> const &i) { return (int)(i.my_value); }\n};\n\ntemplate<typename K, typename V>\nstruct cast_from<MyKeySecond<K, V> > {\n    static int my_int_val(MyKeySecond<K, V> const &i) { return (int)(i.my_value); }\n};\n\ntemplate<typename T>\nvoid print_my_value(T const &i) {\n    INFO(\" \" << cast_from<T>::my_int_val(i) << \" \" );\n}\n\ntemplate<typename K, typename V>\nvoid print_my_value(MyKeyFirst<K, V> const &i) {\n    i.print_val();\n}\n\ntemplate<typename K, typename V>\nvoid print_my_value(MyKeySecond<K, V> const &i) {\n    i.print_val();\n}\n\ntemplate<>\nvoid print_my_value(std::string const &i) {\n    INFO(\"\\\"\" << i << \"\\\"\" );\n}\n\n//\n// Tests\n//\n\n//!\n// my_struct_key == given a type V with a field named my_key of type K, will return a copy of my_key\ntemplate<class K, typename V>\nstruct my_struct_key {\n    K operator()(const V& mv) {\n        return mv.my_key;\n    }\n};\n\n// specialization returning reference to my_key.\ntemplate<class K, typename V>\nstruct my_struct_key<K&, V> {\n    K& operator()(const V& mv) {\n        return const_cast<K&>(mv.my_key);\n    }\n};\n\nusing tbb::detail::d2::type_to_key_function_body;\nusing tbb::detail::d2::type_to_key_function_body_leaf;\nusing tbb::detail::d2::hash_buffer;\nusing tbb::detail::d1::tbb_hash_compare;\n\ntemplate<class K, class V> struct VtoKFB {\n    typedef type_to_key_function_body<V, K> type;\n};\n\ntemplate<typename K> struct make_hash_compare { typedef tbb_hash_compare<K> type; };\n\ntemplate<typename K, class V>\nvoid hash_buffer_test(const char *sname) {\n    typedef typename K_deref<K>::type KnoR;\n    hash_buffer<\n        K,\n        V,\n        typename VtoKFB<K, V>::type,\n        tbb_hash_compare<KnoR>\n    > my_hash_buffer;\n    const bool k_is_ref = std::is_reference<K>::value;\n    typedef type_to_key_function_body_leaf<\n        V, K, my_struct_key<K, V> > my_func_body_type;\n    typename VtoKFB<K, V>::type *kp = new my_func_body_type(my_struct_key<K, V>());\n    my_hash_buffer.set_key_func(kp);\n    INFO(\"Running hash_buffer test on \" << sname << \"; is ref == \" << (k_is_ref ? \"true\" : \"false\") << \"\\n\" );\n    V mv1, mv0;\n    bool res;\n    for(int cnt = 0; cnt < 2; ++cnt) {\n        // insert 50 items after checking they are not already in the table\n        for(int i = 0; i < 50; ++i) {\n            KnoR kk = index_to_key<KnoR>()(i);\n            mv1.my_key = kk;\n            mv1.my_value = 0.5*i;\n            res = my_hash_buffer.find_with_key(kk, mv0);\n            CHECK_MESSAGE( (!res), \"Found non-inserted item\");\n            res = my_hash_buffer.insert_with_key(mv1);\n            CHECK_MESSAGE( (res), \"insert failed\");\n            res = my_hash_buffer.find_with_key(kk, mv0);\n            CHECK_MESSAGE( (res), \"not found after insert\");\n            CHECK_MESSAGE( (mv0.my_value==mv1.my_value), \"result not correct\");\n        }\n        // go backwards checking they are still there.\n        for(int i = 49; i>=0; --i) {\n            KnoR kk = index_to_key<KnoR>()(i);\n            double value = 0.5*i;\n            res = my_hash_buffer.find_with_key(kk, mv0);\n            CHECK_MESSAGE( (res), \"find failed\");\n            CHECK_MESSAGE( (mv0.my_value==value), \"result not correct\");\n        }\n        // delete every third item, check they are gone\n        for(int i = 0; i < 50; i += 3) {\n            KnoR kk = index_to_key<KnoR>()(i);\n            my_hash_buffer.delete_with_key(kk);\n            res = my_hash_buffer.find_with_key(kk, mv0);\n            CHECK_MESSAGE( (!res), \"Found deleted item\");\n        }\n        // check the deleted items are gone, the non-deleted items are there.\n        for(int i = 0; i < 50; ++i) {\n            KnoR kk = index_to_key<KnoR>()(i);\n            double value = 0.5*i;\n            if(i%3==0) {\n                res = my_hash_buffer.find_with_key(kk, mv0);\n                CHECK_MESSAGE( (!res), \"found an item that was previously deleted\");\n            }\n            else {\n                res = my_hash_buffer.find_with_key(kk, mv0);\n                CHECK_MESSAGE( (res), \"find failed\");\n                CHECK_MESSAGE( (mv0.my_value==value), \"result not correct\");\n            }\n        }\n        // insert new items, check the deleted items return true, the non-deleted items return false.\n        for(int i = 0; i < 50; ++i) {\n            KnoR kk = index_to_key<KnoR>()(i);\n            double value = 1.5*i;\n            mv1.my_key = kk;\n            mv1.my_value = value;\n            res = my_hash_buffer.insert_with_key(mv1);\n            if(i%3==0) {\n                CHECK_MESSAGE( (res), \"didn't insert in empty slot\");\n            }\n            else {\n                CHECK_MESSAGE( (!res), \"slot was empty on insert\");\n            }\n        }\n        // delete all items\n        for(int i = 0; i < 50; ++i) {\n            KnoR kk = index_to_key<KnoR>()(i);\n            my_hash_buffer.delete_with_key(kk);\n            res = my_hash_buffer.find_with_key(kk, mv0);\n            CHECK_MESSAGE( (!res), \"Found deleted item\");\n        }\n    }  // perform tasks twice\n}\n\nvoid\nTestTaggedBuffers() {\n    hash_buffer_test<int, MyKeyFirst<int, double> >(\"MyKeyFirst<int,double>\");\n    hash_buffer_test<int&, MyKeyFirst<int, double> >(\"MyKeyFirst<int,double> with int&\");\n    hash_buffer_test<int, MyKeySecond<int, double> >(\"MyKeySecond<int,double>\");\n\n    hash_buffer_test<std::string, MyKeyFirst<std::string, double> >(\"MyKeyFirst<std::string,double>\");\n    hash_buffer_test<std::string&, MyKeySecond<std::string, double> >(\"MyKeySecond<std::string,double> with std::string&\");\n}\n\nstruct threebyte {\n    unsigned char b1;\n    unsigned char b2;\n    unsigned char b3;\n    threebyte(int i = 0) {\n        b1 = (unsigned char)(i&0xFF);\n        b2 = (unsigned char)((i>>8)&0xFF);\n        b3 = (unsigned char)((i>>16)&0xFF);\n    }\n    operator int() const { return (int)(b1+(b2<<8)+(b3<<16)); }\n};\n\nconst int Count = 150;\n\nconst int Recirc_count = 1000;  // number of tuples to be generated\nconst int MaxPorts = 10;\nconst int MaxNInputs = 5; // max # of input_nodes to register for each join_node input in parallel test\nbool outputCheck[MaxPorts][Count];  // for checking output\n\nvoid\ncheck_outputCheck(int nUsed, int maxCnt) {\n    for(int i = 0; i < nUsed; ++i) {\n        for(int j = 0; j < maxCnt; ++j) {\n            CHECK_MESSAGE(outputCheck[i][j], \"\");\n        }\n    }\n}\n\nvoid\nreset_outputCheck(int nUsed, int maxCnt) {\n    for(int i = 0; i < nUsed; ++i) {\n        for(int j = 0; j < maxCnt; ++j) {\n            outputCheck[i][j] = false;\n        }\n    }\n}\n\ntemplate<typename T>\nclass name_of {\npublic:\n    static const char* name() { return  \"Unknown\"; }\n};\ntemplate<typename T>\nclass name_of<CheckType<T> > {\npublic:\n    static const char* name() { return \"checktype\"; }\n};\ntemplate<>\nclass name_of<int> {\npublic:\n    static const char* name() { return  \"int\"; }\n};\ntemplate<>\nclass name_of<float> {\npublic:\n    static const char* name() { return  \"float\"; }\n};\ntemplate<>\nclass name_of<double> {\npublic:\n    static const char* name() { return  \"double\"; }\n};\ntemplate<>\nclass name_of<long> {\npublic:\n    static const char* name() { return  \"long\"; }\n};\ntemplate<>\nclass name_of<short> {\npublic:\n    static const char* name() { return  \"short\"; }\n};\ntemplate<>\nclass name_of<threebyte> {\npublic:\n    static const char* name() { return \"threebyte\"; }\n};\ntemplate<>\nclass name_of<std::string> {\npublic:\n    static const char* name() { return \"std::string\"; }\n};\ntemplate<typename K, typename V>\nclass name_of<MyKeyFirst<K, V> > {\npublic:\n    static const char* name() { return \"MyKeyFirst<K,V>\"; }\n};\ntemplate<typename K, typename V>\nclass name_of<MyKeySecond<K, V> > {\npublic:\n    static const char* name() { return \"MyKeySecond<K,V>\"; }\n};\n\n// The additional policy to differ message based key matching from usual key matching.\n// It only makes sense for the test because join_node is created with the key_matching policy for the both cases.\ntemplate <typename K, typename KHash = tbb_hash_compare<typename std::decay<K>::type > >\nstruct message_based_key_matching {};\n\n// test for key_matching\ntemplate<class JP>\nstruct is_key_matching_join {\n    static const bool value;\n    typedef int key_type;  // have to define it to something\n};\n\ntemplate<class JP>\nconst bool is_key_matching_join<JP>::value = false;\n\ntemplate<class K, class KHash>\nstruct is_key_matching_join<tbb::flow::key_matching<K, KHash> > {\n    static const bool value;\n    typedef K key_type;\n};\n\ntemplate<class K, class KHash>\nconst bool is_key_matching_join<tbb::flow::key_matching<K, KHash> >::value = true;\n\ntemplate<class K, class KHash>\nstruct is_key_matching_join<message_based_key_matching<K, KHash> > {\n    static const bool value;\n    typedef K key_type;\n};\n\ntemplate<class K, class KHash>\nconst bool is_key_matching_join<message_based_key_matching<K, KHash> >::value = true;\n\n// for recirculating tags, input is tuple<index,continue_msg>\n// output is index*my_mult cast to the right type\ntemplate<typename TT>\nclass recirc_func_body {\n    TT my_mult;\npublic:\n    typedef std::tuple<int, tbb::flow::continue_msg> input_type;\n    recirc_func_body(TT multiplier): my_mult(multiplier) {}\n    recirc_func_body(const recirc_func_body &other): my_mult(other.my_mult) { }\n    void operator=(const recirc_func_body &other) { my_mult = other.my_mult; }\n    TT operator()(const input_type &v) {\n        return TT(std::get<0>(v)) * my_mult;\n    }\n};\n\nstatic int input_count;  // input_nodes are serial\n\n// emit input_count continue_msg\nclass recirc_input_node_body {\npublic:\n    tbb::flow::continue_msg operator()(tbb::flow_control &fc) {\n        if( --input_count < 0 ){\n            fc.stop();\n        }\n        return tbb::flow::continue_msg();\n    }\n};\n\n// T must be arithmetic, and shouldn't wrap around for reasonable sizes of Count (which is now 150, and maxPorts is 10,\n// so the max number generated right now is 1500 or so.)  Input will generate a series of TT with value\n// (init_val + (i-1)*addend) * my_mult, where i is the i-th invocation of the body.  We are attaching addend\n// input nodes to a join_port, and each will generate part of the numerical series the port is expecting\n// to receive.  If there is only one input node, the series order will be maintained; if more than one,\n// this is not guaranteed.\ntemplate<typename TT, size_t INDEX>\nclass my_input_body {\n    int my_count;\n    int addend;\npublic:\n    my_input_body(int init_val, int addto): my_count(init_val), addend(addto) { }\n    TT operator()(tbb::flow_control& fc) {\n        int lc = my_count;\n        TT ret = make_thingie<TT, INDEX>()(my_count);\n        my_count += addend;\n        if ( lc < Count){\n            return ret;\n        }else{\n            fc.stop();\n            return TT();\n        }\n    }\n};\n\ntemplate<typename TT>\nclass tag_func {\n    TT my_mult;\npublic:\n    tag_func(TT multiplier): my_mult(multiplier) { }\n    // operator() will return [0 .. Count)\n    tbb::flow::tag_value operator()(TT v) {\n        tbb::flow::tag_value t = tbb::flow::tag_value(v/my_mult);\n        return t;\n    }\n};\n\ntemplate <class JP>\nstruct filter_out_message_based_key_matching {\n    typedef JP policy;\n};\n\ntemplate <typename K, typename KHash>\nstruct filter_out_message_based_key_matching<message_based_key_matching<K, KHash> > {\n    // To have message based key matching in join_node, the key_matchig policy should be specified.\n    typedef tbb::flow::key_matching<K, KHash> policy;\n};\n\n// allocator for join_node.  This is specialized for tag_matching and key_matching joins because they require a variable number\n// of tag_value methods passed to the constructor\n\ntemplate<int N, typename JType, class JP>\nclass makeJoin {\npublic:\n    static JType *create(tbb::flow::graph& g) {\n        JType *temp = new JType(g);\n        return temp;\n    }\n    static void destroy(JType *p) { delete p; }\n};\n\n// for general key_matching case, each type in the tuple is a class that has the my_key field and the my_value field.\n//\ntemplate<typename JType, typename K, typename KHash>\nclass makeJoin<2, JType, tbb::flow::key_matching<K, KHash> > {\n    typedef typename JType::output_type TType;\n    typedef typename std::tuple_element<0, TType>::type T0;\n    typedef typename std::tuple_element<1, TType>::type T1;\npublic:\n    static JType *create(tbb::flow::graph& g) {\n        JType *temp = new JType(g,\n            my_struct_key<K, T0>(),\n            my_struct_key<K, T1>()\n        );\n        return temp;\n    }\n    static void destroy(JType *p) { delete p; }\n};\n\ntemplate<typename JType>\nclass makeJoin<2, JType, tbb::flow::tag_matching> {\n    typedef typename JType::output_type TType;\n    typedef typename std::tuple_element<0, TType>::type T0;\n    typedef typename std::tuple_element<1, TType>::type T1;\npublic:\n    static JType *create(tbb::flow::graph& g) {\n        JType *temp = new JType(g,\n            tag_func<T0>(T0(2)),\n            tag_func<T1>(T1(3))\n        );\n        return temp;\n    }\n    static void destroy(JType *p) { delete p; }\n};\n\n#if MAX_TUPLE_TEST_SIZE >= 3\ntemplate<typename JType, typename K, typename KHash>\nclass makeJoin<3, JType, tbb::flow::key_matching<K, KHash> > {\n    typedef typename JType::output_type TType;\n    typedef typename std::tuple_element<0, TType>::type T0;\n    typedef typename std::tuple_element<1, TType>::type T1;\n    typedef typename std::tuple_element<2, TType>::type T2;\npublic:\n    static JType *create(tbb::flow::graph& g) {\n        JType *temp = new JType(g,\n            my_struct_key<K, T0>(),\n            my_struct_key<K, T1>(),\n            my_struct_key<K, T2>()\n        );\n        return temp;\n    }\n    static void destroy(JType *p) { delete p; }\n};\n\ntemplate<typename JType>\nclass makeJoin<3, JType, tbb::flow::tag_matching> {\n    typedef typename JType::output_type TType;\n    typedef typename std::tuple_element<0, TType>::type T0;\n    typedef typename std::tuple_element<1, TType>::type T1;\n    typedef typename std::tuple_element<2, TType>::type T2;\npublic:\n    static JType *create(tbb::flow::graph& g) {\n        JType *temp = new JType(g,\n            tag_func<T0>(T0(2)),\n            tag_func<T1>(T1(3)),\n            tag_func<T2>(T2(4))\n        );\n        return temp;\n    }\n    static void destroy(JType *p) { delete p; }\n};\n\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 4\n\ntemplate<typename JType, typename K, typename KHash>\nclass makeJoin<4, JType, tbb::flow::key_matching<K, KHash> > {\n    typedef typename JType::output_type TType;\n    typedef typename std::tuple_element<0, TType>::type T0;\n    typedef typename std::tuple_element<1, TType>::type T1;\n    typedef typename std::tuple_element<2, TType>::type T2;\n    typedef typename std::tuple_element<3, TType>::type T3;\npublic:\n    static JType *create(tbb::flow::graph& g) {\n        JType *temp = new JType(g,\n            my_struct_key<K, T0>(),\n            my_struct_key<K, T1>(),\n            my_struct_key<K, T2>(),\n            my_struct_key<K, T3>()\n        );\n        return temp;\n    }\n    static void destroy(JType *p) { delete p; }\n};\n\ntemplate<typename JType>\nclass makeJoin<4, JType, tbb::flow::tag_matching> {\n    typedef typename JType::output_type TType;\n    typedef typename std::tuple_element<0, TType>::type T0;\n    typedef typename std::tuple_element<1, TType>::type T1;\n    typedef typename std::tuple_element<2, TType>::type T2;\n    typedef typename std::tuple_element<3, TType>::type T3;\npublic:\n    static JType *create(tbb::flow::graph& g) {\n        JType *temp = new JType(g,\n            tag_func<T0>(T0(2)),\n            tag_func<T1>(T1(3)),\n            tag_func<T2>(T2(4)),\n            tag_func<T3>(T3(5))\n        );\n        return temp;\n    }\n    static void destroy(JType *p) { delete p; }\n};\n\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 5\ntemplate<typename JType, typename K, typename KHash>\nclass makeJoin<5, JType, tbb::flow::key_matching<K, KHash> > {\n    typedef typename JType::output_type TType;\n    typedef typename std::tuple_element<0, TType>::type T0;\n    typedef typename std::tuple_element<1, TType>::type T1;\n    typedef typename std::tuple_element<2, TType>::type T2;\n    typedef typename std::tuple_element<3, TType>::type T3;\n    typedef typename std::tuple_element<4, TType>::type T4;\npublic:\n    static JType *create(tbb::flow::graph& g) {\n        JType *temp = new JType(g,\n            my_struct_key<K, T0>(),\n            my_struct_key<K, T1>(),\n            my_struct_key<K, T2>(),\n            my_struct_key<K, T3>(),\n            my_struct_key<K, T4>()\n        );\n        return temp;\n    }\n    static void destroy(JType *p) { delete p; }\n};\n\ntemplate<typename JType>\nclass makeJoin<5, JType, tbb::flow::tag_matching> {\n    typedef typename JType::output_type TType;\n    typedef typename std::tuple_element<0, TType>::type T0;\n    typedef typename std::tuple_element<1, TType>::type T1;\n    typedef typename std::tuple_element<2, TType>::type T2;\n    typedef typename std::tuple_element<3, TType>::type T3;\n    typedef typename std::tuple_element<4, TType>::type T4;\npublic:\n    static JType *create(tbb::flow::graph& g) {\n        JType *temp = new JType(g,\n            tag_func<T0>(T0(2)),\n            tag_func<T1>(T1(3)),\n            tag_func<T2>(T2(4)),\n            tag_func<T3>(T3(5)),\n            tag_func<T4>(T4(6))\n        );\n        return temp;\n    }\n    static void destroy(JType *p) { delete p; }\n};\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 6\ntemplate<typename JType, typename K, typename KHash>\nclass makeJoin<6, JType, tbb::flow::key_matching<K, KHash> > {\n    typedef typename JType::output_type TType;\n    typedef typename std::tuple_element<0, TType>::type T0;\n    typedef typename std::tuple_element<1, TType>::type T1;\n    typedef typename std::tuple_element<2, TType>::type T2;\n    typedef typename std::tuple_element<3, TType>::type T3;\n    typedef typename std::tuple_element<4, TType>::type T4;\n    typedef typename std::tuple_element<5, TType>::type T5;\npublic:\n    static JType *create(tbb::flow::graph& g) {\n        JType *temp = new JType(g,\n            my_struct_key<K, T0>(),\n            my_struct_key<K, T1>(),\n            my_struct_key<K, T2>(),\n            my_struct_key<K, T3>(),\n            my_struct_key<K, T4>(),\n            my_struct_key<K, T5>()\n        );\n        return temp;\n    }\n    static void destroy(JType *p) { delete p; }\n};\n\ntemplate<typename JType>\nclass makeJoin<6, JType, tbb::flow::tag_matching> {\n    typedef typename JType::output_type TType;\n    typedef typename std::tuple_element<0, TType>::type T0;\n    typedef typename std::tuple_element<1, TType>::type T1;\n    typedef typename std::tuple_element<2, TType>::type T2;\n    typedef typename std::tuple_element<3, TType>::type T3;\n    typedef typename std::tuple_element<4, TType>::type T4;\n    typedef typename std::tuple_element<5, TType>::type T5;\npublic:\n    static JType *create(tbb::flow::graph& g) {\n        JType *temp = new JType(g,\n            tag_func<T0>(T0(2)),\n            tag_func<T1>(T1(3)),\n            tag_func<T2>(T2(4)),\n            tag_func<T3>(T3(5)),\n            tag_func<T4>(T4(6)),\n            tag_func<T5>(T5(7))\n        );\n        return temp;\n    }\n    static void destroy(JType *p) { delete p; }\n};\n#endif\n\n#if MAX_TUPLE_TEST_SIZE >= 7\ntemplate<typename JType, typename K, typename KHash>\nclass makeJoin<7, JType, tbb::flow::key_matching<K, KHash> > {\n    typedef typename JType::output_type TType;\n    typedef typename std::tuple_element<0, TType>::type T0;\n    typedef typename std::tuple_element<1, TType>::type T1;\n    typedef typename std::tuple_element<2, TType>::type T2;\n    typedef typename std::tuple_element<3, TType>::type T3;\n    typedef typename std::tuple_element<4, TType>::type T4;\n    typedef typename std::tuple_element<5, TType>::type T5;\n    typedef typename std::tuple_element<6, TType>::type T6;\npublic:\n    static JType *create(tbb::flow::graph& g) {\n        JType *temp = new JType(g,\n            my_struct_key<K, T0>(),\n            my_struct_key<K, T1>(),\n            my_struct_key<K, T2>(),\n            my_struct_key<K, T3>(),\n            my_struct_key<K, T4>(),\n            my_struct_key<K, T5>(),\n            my_struct_key<K, T6>()\n        );\n        return temp;\n    }\n    static void destroy(JType *p) { delete p; }\n};\n\ntemplate<typename JType>\nclass makeJoin<7, JType, tbb::flow::tag_matching> {\n    typedef typename JType::output_type TType;\n    typedef typename std::tuple_element<0, TType>::type T0;\n    typedef typename std::tuple_element<1, TType>::type T1;\n    typedef typename std::tuple_element<2, TType>::type T2;\n    typedef typename std::tuple_element<3, TType>::type T3;\n    typedef typename std::tuple_element<4, TType>::type T4;\n    typedef typename std::tuple_element<5, TType>::type T5;\n    typedef typename std::tuple_element<6, TType>::type T6;\npublic:\n    static JType *create(tbb::flow::graph& g) {\n        JType *temp = new JType(g,\n            tag_func<T0>(T0(2)),\n            tag_func<T1>(T1(3)),\n            tag_func<T2>(T2(4)),\n            tag_func<T3>(T3(5)),\n            tag_func<T4>(T4(6)),\n            tag_func<T5>(T5(7)),\n            tag_func<T6>(T6(8))\n        );\n        return temp;\n    }\n    static void destroy(JType *p) { delete p; }\n};\n#endif\n\n#if MAX_TUPLE_TEST_SIZE >= 8\ntemplate<typename JType, typename K, typename KHash>\nclass makeJoin<8, JType, tbb::flow::key_matching<K, KHash> > {\n    typedef typename JType::output_type TType;\n    typedef typename std::tuple_element<0, TType>::type T0;\n    typedef typename std::tuple_element<1, TType>::type T1;\n    typedef typename std::tuple_element<2, TType>::type T2;\n    typedef typename std::tuple_element<3, TType>::type T3;\n    typedef typename std::tuple_element<4, TType>::type T4;\n    typedef typename std::tuple_element<5, TType>::type T5;\n    typedef typename std::tuple_element<6, TType>::type T6;\n    typedef typename std::tuple_element<7, TType>::type T7;\npublic:\n    static JType *create(tbb::flow::graph& g) {\n        JType *temp = new JType(g,\n            my_struct_key<K, T0>(),\n            my_struct_key<K, T1>(),\n            my_struct_key<K, T2>(),\n            my_struct_key<K, T3>(),\n            my_struct_key<K, T4>(),\n            my_struct_key<K, T5>(),\n            my_struct_key<K, T6>(),\n            my_struct_key<K, T7>()\n        );\n        return temp;\n    }\n    static void destroy(JType *p) { delete p; }\n};\n\ntemplate<typename JType>\nclass makeJoin<8, JType, tbb::flow::tag_matching> {\n    typedef typename JType::output_type TType;\n    typedef typename std::tuple_element<0, TType>::type T0;\n    typedef typename std::tuple_element<1, TType>::type T1;\n    typedef typename std::tuple_element<2, TType>::type T2;\n    typedef typename std::tuple_element<3, TType>::type T3;\n    typedef typename std::tuple_element<4, TType>::type T4;\n    typedef typename std::tuple_element<5, TType>::type T5;\n    typedef typename std::tuple_element<6, TType>::type T6;\n    typedef typename std::tuple_element<7, TType>::type T7;\npublic:\n    static JType *create(tbb::flow::graph& g) {\n        JType *temp = new JType(g,\n            tag_func<T0>(T0(2)),\n            tag_func<T1>(T1(3)),\n            tag_func<T2>(T2(4)),\n            tag_func<T3>(T3(5)),\n            tag_func<T4>(T4(6)),\n            tag_func<T5>(T5(7)),\n            tag_func<T6>(T6(8)),\n            tag_func<T7>(T7(9))\n        );\n        return temp;\n    }\n    static void destroy(JType *p) { delete p; }\n};\n#endif\n\n#if MAX_TUPLE_TEST_SIZE >= 9\ntemplate<typename JType, typename K, typename KHash>\nclass makeJoin<9, JType, tbb::flow::key_matching<K, KHash> > {\n    typedef typename JType::output_type TType;\n    typedef typename std::tuple_element<0, TType>::type T0;\n    typedef typename std::tuple_element<1, TType>::type T1;\n    typedef typename std::tuple_element<2, TType>::type T2;\n    typedef typename std::tuple_element<3, TType>::type T3;\n    typedef typename std::tuple_element<4, TType>::type T4;\n    typedef typename std::tuple_element<5, TType>::type T5;\n    typedef typename std::tuple_element<6, TType>::type T6;\n    typedef typename std::tuple_element<7, TType>::type T7;\n    typedef typename std::tuple_element<8, TType>::type T8;\npublic:\n    static JType *create(tbb::flow::graph& g) {\n        JType *temp = new JType(g,\n            my_struct_key<K, T0>(),\n            my_struct_key<K, T1>(),\n            my_struct_key<K, T2>(),\n            my_struct_key<K, T3>(),\n            my_struct_key<K, T4>(),\n            my_struct_key<K, T5>(),\n            my_struct_key<K, T6>(),\n            my_struct_key<K, T7>(),\n            my_struct_key<K, T8>()\n        );\n        return temp;\n    }\n    static void destroy(JType *p) { delete p; }\n};\n\ntemplate<typename JType>\nclass makeJoin<9, JType, tbb::flow::tag_matching> {\n    typedef typename JType::output_type TType;\n    typedef typename std::tuple_element<0, TType>::type T0;\n    typedef typename std::tuple_element<1, TType>::type T1;\n    typedef typename std::tuple_element<2, TType>::type T2;\n    typedef typename std::tuple_element<3, TType>::type T3;\n    typedef typename std::tuple_element<4, TType>::type T4;\n    typedef typename std::tuple_element<5, TType>::type T5;\n    typedef typename std::tuple_element<6, TType>::type T6;\n    typedef typename std::tuple_element<7, TType>::type T7;\n    typedef typename std::tuple_element<8, TType>::type T8;\npublic:\n    static JType *create(tbb::flow::graph& g) {\n        JType *temp = new JType(g,\n            tag_func<T0>(T0(2)),\n            tag_func<T1>(T1(3)),\n            tag_func<T2>(T2(4)),\n            tag_func<T3>(T3(5)),\n            tag_func<T4>(T4(6)),\n            tag_func<T5>(T5(7)),\n            tag_func<T6>(T6(8)),\n            tag_func<T7>(T7(9)),\n            tag_func<T8>(T8(10))\n        );\n        return temp;\n    }\n    static void destroy(JType *p) { delete p; }\n};\n#endif\n\n#if MAX_TUPLE_TEST_SIZE >= 10\ntemplate<typename JType, typename K, typename KHash>\nclass makeJoin<10, JType, tbb::flow::key_matching<K, KHash> > {\n    typedef typename JType::output_type TType;\n    typedef typename std::tuple_element<0, TType>::type T0;\n    typedef typename std::tuple_element<1, TType>::type T1;\n    typedef typename std::tuple_element<2, TType>::type T2;\n    typedef typename std::tuple_element<3, TType>::type T3;\n    typedef typename std::tuple_element<4, TType>::type T4;\n    typedef typename std::tuple_element<5, TType>::type T5;\n    typedef typename std::tuple_element<6, TType>::type T6;\n    typedef typename std::tuple_element<7, TType>::type T7;\n    typedef typename std::tuple_element<8, TType>::type T8;\n    typedef typename std::tuple_element<9, TType>::type T9;\npublic:\n    static JType *create(tbb::flow::graph& g) {\n        JType *temp = new JType(g,\n            my_struct_key<K, T0>(),\n            my_struct_key<K, T1>(),\n            my_struct_key<K, T2>(),\n            my_struct_key<K, T3>(),\n            my_struct_key<K, T4>(),\n            my_struct_key<K, T5>(),\n            my_struct_key<K, T6>(),\n            my_struct_key<K, T7>(),\n            my_struct_key<K, T8>(),\n            my_struct_key<K, T9>()\n        );\n        return temp;\n    }\n    static void destroy(JType *p) { delete p; }\n};\n\ntemplate<typename JType>\nclass makeJoin<10, JType, tbb::flow::tag_matching> {\n    typedef typename JType::output_type TType;\n    typedef typename std::tuple_element<0, TType>::type T0;\n    typedef typename std::tuple_element<1, TType>::type T1;\n    typedef typename std::tuple_element<2, TType>::type T2;\n    typedef typename std::tuple_element<3, TType>::type T3;\n    typedef typename std::tuple_element<4, TType>::type T4;\n    typedef typename std::tuple_element<5, TType>::type T5;\n    typedef typename std::tuple_element<6, TType>::type T6;\n    typedef typename std::tuple_element<7, TType>::type T7;\n    typedef typename std::tuple_element<8, TType>::type T8;\n    typedef typename std::tuple_element<9, TType>::type T9;\npublic:\n    static JType *create(tbb::flow::graph& g) {\n        JType *temp = new JType(g,\n            tag_func<T0>(T0(2)),\n            tag_func<T1>(T1(3)),\n            tag_func<T2>(T2(4)),\n            tag_func<T3>(T3(5)),\n            tag_func<T4>(T4(6)),\n            tag_func<T5>(T5(7)),\n            tag_func<T6>(T6(8)),\n            tag_func<T7>(T7(9)),\n            tag_func<T8>(T8(10)),\n            tag_func<T9>(T9(11))\n        );\n        return temp;\n    }\n    static void destroy(JType *p) { delete p; }\n};\n#endif\n\n// holder for input_node pointers for eventual deletion\n\nstatic void* all_input_nodes[MaxPorts][MaxNInputs];\n\ntemplate<int ELEM, typename JNT>\nclass input_node_helper {\npublic:\n    typedef JNT join_node_type;\n    typedef tbb::flow::join_node<std::tuple<int, tbb::flow::continue_msg>, tbb::flow::reserving> input_join_type;\n    typedef typename join_node_type::output_type TT;\n\n    typedef typename std::tuple_element<ELEM-1, TT>::type IT;\n    typedef typename tbb::flow::input_node<IT> my_input_node_type;\n    typedef typename tbb::flow::function_node<std::tuple<int, tbb::flow::continue_msg>, IT> my_recirc_function_type;\n    static void print_remark(const char * str) {\n        input_node_helper<ELEM-1, JNT>::print_remark(str);\n        INFO(\", \" << name_of<IT>::name());\n    }\n    static void add_input_nodes(join_node_type &my_join, tbb::flow::graph &g, int nInputs) {\n        for(int i = 0; i < nInputs; ++i) {\n            my_input_node_type *new_node = new my_input_node_type(g, my_input_body<IT, ELEM>(i, nInputs));\n            tbb::flow::make_edge(*new_node, tbb::flow::input_port<ELEM-1>(my_join));\n            all_input_nodes[ELEM-1][i] = (void *)new_node;\n            new_node->activate();\n        }\n        // add the next input_node\n        input_node_helper<ELEM-1, JNT>::add_input_nodes(my_join, g, nInputs);\n    }\n\n    static void add_recirc_func_nodes(join_node_type &my_join, input_join_type &my_input, tbb::flow::graph &g) {\n        my_recirc_function_type *new_node = new my_recirc_function_type(g, tbb::flow::unlimited, recirc_func_body<IT>((IT)(ELEM+1)));\n        tbb::flow::make_edge(*new_node, tbb::flow::input_port<ELEM-1>(my_join));\n        tbb::flow::make_edge(my_input, *new_node);\n        all_input_nodes[ELEM-1][0] = (void *)new_node;\n        input_node_helper<ELEM-1, JNT>::add_recirc_func_nodes(my_join, my_input, g);\n    }\n\n    static void only_check_value(const int i, const TT &v) {\n        CHECK_MESSAGE(std::get<ELEM-1>(v)==(IT)(i*(ELEM+1)), \"\");\n        input_node_helper<ELEM-1, JNT>::only_check_value(i, v);\n    }\n\n    static void check_value(int i, TT &v, bool is_serial) {\n        // the fetched value will match only if there is only one input_node.\n        bool is_correct = !is_serial||std::get<ELEM-1>(v)==(IT)(i*(ELEM+1));\n        CHECK_MESSAGE(is_correct, \"\");\n        // tally the fetched value.\n        int ival = (int)std::get<ELEM-1>(v);\n        CHECK_MESSAGE(!(ival%(ELEM+1)), \"\");\n        ival /= (ELEM+1);\n        CHECK_MESSAGE(!outputCheck[ELEM-1][ival], \"\");\n        outputCheck[ELEM-1][ival] = true;\n        input_node_helper<ELEM-1, JNT>::check_value(i, v, is_serial);\n    }\n    static void remove_input_nodes(join_node_type& my_join, int nInputs) {\n        for(int i = 0; i< nInputs; ++i) {\n            my_input_node_type *dp = reinterpret_cast<my_input_node_type *>(all_input_nodes[ELEM-1][i]);\n            tbb::flow::remove_edge(*dp, tbb::flow::input_port<ELEM-1>(my_join));\n            delete dp;\n        }\n        input_node_helper<ELEM-1, JNT>::remove_input_nodes(my_join, nInputs);\n    }\n\n    static void remove_recirc_func_nodes(join_node_type& my_join, input_join_type &my_input) {\n        my_recirc_function_type *fn = reinterpret_cast<my_recirc_function_type *>(all_input_nodes[ELEM-1][0]);\n        tbb::flow::remove_edge(*fn, tbb::flow::input_port<ELEM-1>(my_join));\n        tbb::flow::remove_edge(my_input, *fn);\n        delete fn;\n        input_node_helper<ELEM-1, JNT>::remove_recirc_func_nodes(my_join, my_input);\n    }\n};\n\ntemplate<typename JNT>\nclass input_node_helper<1, JNT> {\n    typedef JNT join_node_type;\n    typedef tbb::flow::join_node<std::tuple<int, tbb::flow::continue_msg>, tbb::flow::reserving> input_join_type;\n    typedef typename join_node_type::output_type TT;\n\n    typedef typename std::tuple_element<0, TT>::type IT;\n    typedef typename tbb::flow::input_node<IT> my_input_node_type;\n    typedef typename tbb::flow::function_node<std::tuple<int, tbb::flow::continue_msg>, IT> my_recirc_function_type;\npublic:\n    static void print_remark(const char * str) {\n        INFO(str << \"< \" << name_of<IT>::name());\n    }\n    static void add_input_nodes(join_node_type &my_join, tbb::flow::graph &g, int nInputs) {\n        for(int i = 0; i < nInputs; ++i) {\n            my_input_node_type *new_node = new my_input_node_type(g, my_input_body<IT, 1>(i, nInputs));\n            tbb::flow::make_edge(*new_node, tbb::flow::input_port<0>(my_join));\n            all_input_nodes[0][i] = (void *)new_node;\n            new_node->activate();\n        }\n    }\n\n    static void add_recirc_func_nodes(join_node_type &my_join, input_join_type &my_input, tbb::flow::graph &g) {\n        my_recirc_function_type *new_node = new my_recirc_function_type(g, tbb::flow::unlimited, recirc_func_body<IT>((IT)(2)));\n        tbb::flow::make_edge(*new_node, tbb::flow::input_port<0>(my_join));\n        tbb::flow::make_edge(my_input, *new_node);\n        all_input_nodes[0][0] = (void *)new_node;\n    }\n\n    static void only_check_value(const int i, const TT &v) {\n        CHECK_MESSAGE(std::get<0>(v)==(IT)(i*2), \"\");\n    }\n\n    static void check_value(int i, TT &v, bool is_serial) {\n        bool is_correct = !is_serial||std::get<0>(v)==(IT)(i*(2));\n        CHECK_MESSAGE(is_correct, \"\");\n        int ival = (int)std::get<0>(v);\n        CHECK_MESSAGE(!(ival%2), \"\");\n        ival /= 2;\n        CHECK_MESSAGE(!outputCheck[0][ival], \"\");\n        outputCheck[0][ival] = true;\n    }\n    static void remove_input_nodes(join_node_type& my_join, int nInputs) {\n        for(int i = 0; i < nInputs; ++i) {\n            my_input_node_type *dp = reinterpret_cast<my_input_node_type *>(all_input_nodes[0][i]);\n            tbb::flow::remove_edge(*dp, tbb::flow::input_port<0>(my_join));\n            delete dp;\n        }\n    }\n\n    static void remove_recirc_func_nodes(join_node_type& my_join, input_join_type &my_input) {\n        my_recirc_function_type *fn = reinterpret_cast<my_recirc_function_type *>(all_input_nodes[0][0]);\n        tbb::flow::remove_edge(*fn, tbb::flow::input_port<0>(my_join));\n        tbb::flow::remove_edge(my_input, *fn);\n        delete fn;\n    }\n};\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n// Suppress \"conditional expression is constant\" warning.\n#pragma warning( push )\n#pragma warning( disable: 4127 )\n#endif\n\ntemplate<typename JType, class JP>\nclass parallel_test {\npublic:\n    typedef typename JType::output_type TType;\n    typedef typename is_key_matching_join<JP>::key_type            key_type;\n    static void test() {\n        const int TUPLE_SIZE = std::tuple_size<TType>::value;\n        const bool is_key_matching = is_key_matching_join<JP>::value;\n\n        TType v;\n        input_node_helper<TUPLE_SIZE, JType>::print_remark(\"Parallel test of join_node\");\n        INFO(\" > \");\n        if(is_key_matching) {\n            INFO(\"with K == \" << name_of<typename K_deref<typename is_key_matching_join<JP>::key_type>::type >::name());\n            if(std::is_reference<typename is_key_matching_join<JP>::key_type>::value) {\n                INFO(\"&\");\n            }\n        }\n        INFO(\"\\n\");\n        for(int i = 0; i < MaxPorts; ++i) {\n            for(int j = 0; j < MaxNInputs; ++j) {\n                all_input_nodes[i][j] = nullptr;\n            }\n        }\n        for(int nInputs = 1; nInputs<=MaxNInputs; ++nInputs) {\n            tbb::flow::graph g;\n            bool not_out_of_order = (nInputs==1)&&(!is_key_matching);\n            JType* my_join = makeJoin<TUPLE_SIZE, JType, JP>::create(g);\n            tbb::flow::queue_node<TType> outq1(g);\n            tbb::flow::queue_node<TType> outq2(g);\n\n            tbb::flow::make_edge(*my_join, outq1);\n            tbb::flow::make_edge(*my_join, outq2);\n\n            input_node_helper<TUPLE_SIZE, JType>::add_input_nodes((*my_join), g, nInputs);\n\n            g.wait_for_all();\n\n            reset_outputCheck(TUPLE_SIZE, Count);\n            for(int i = 0; i < Count; ++i) {\n                CHECK_MESSAGE(outq1.try_get(v), \"\");\n                input_node_helper<TUPLE_SIZE, JType>::check_value(i, v, not_out_of_order);\n            }\n\n            check_outputCheck(TUPLE_SIZE, Count);\n            reset_outputCheck(TUPLE_SIZE, Count);\n\n            for(int i = 0; i < Count; i++) {\n                CHECK_MESSAGE(outq2.try_get(v), \"\");\n                input_node_helper<TUPLE_SIZE, JType>::check_value(i, v, not_out_of_order);\n            }\n            check_outputCheck(TUPLE_SIZE, Count);\n\n            CHECK_MESSAGE(!outq1.try_get(v), \"\");\n            CHECK_MESSAGE(!outq2.try_get(v), \"\");\n\n            input_node_helper<TUPLE_SIZE, JType>::remove_input_nodes((*my_join), nInputs);\n            tbb::flow::remove_edge(*my_join, outq1);\n            tbb::flow::remove_edge(*my_join, outq2);\n            makeJoin<TUPLE_SIZE, JType, JP>::destroy(my_join);\n        }\n    }\n};\n\n\ntemplate<int ELEM, typename JType>\nclass serial_queue_helper {\npublic:\n    typedef typename JType::output_type TT;\n    typedef typename std::tuple_element<ELEM-1, TT>::type IT;\n    typedef typename tbb::flow::queue_node<IT> my_queue_node_type;\n    static void print_remark() {\n        serial_queue_helper<ELEM-1, JType>::print_remark();\n        INFO(\", \" << name_of<IT>::name());\n    }\n    static void add_queue_nodes(tbb::flow::graph &g, JType &my_join) {\n        serial_queue_helper<ELEM-1, JType>::add_queue_nodes(g, my_join);\n        my_queue_node_type *new_node = new my_queue_node_type(g);\n        tbb::flow::make_edge(*new_node, std::get<ELEM-1>(my_join.input_ports()));\n        all_input_nodes[ELEM-1][0] = (void *)new_node;\n    }\n\n    static void fill_one_queue(int maxVal) {\n        // fill queue to \"left\" of me\n        my_queue_node_type *qptr = reinterpret_cast<my_queue_node_type *>(all_input_nodes[ELEM-1][0]);\n        serial_queue_helper<ELEM-1, JType>::fill_one_queue(maxVal);\n        for(int i = 0; i < maxVal; ++i) {\n            CHECK_MESSAGE(qptr->try_put(make_thingie<IT, ELEM>()(i)), \"\");\n        }\n    }\n\n    static void put_one_queue_val(int myVal) {\n        // put this val to my \"left\".\n        serial_queue_helper<ELEM-1, JType>::put_one_queue_val(myVal);\n        my_queue_node_type *qptr = reinterpret_cast<my_queue_node_type *>(all_input_nodes[ELEM-1][0]);\n        CHECK_MESSAGE(qptr->try_put(make_thingie<IT, ELEM>()(myVal)), \"\");\n    }\n\n    static void check_queue_value(int i, TT &v) {\n        serial_queue_helper<ELEM-1, JType>::check_queue_value(i, v);\n        CHECK_MESSAGE(cast_from<IT>::my_int_val(std::get<ELEM-1>(v))==i * (ELEM+1), \"\");\n    }\n\n    static void remove_queue_nodes(JType &my_join) {\n        my_queue_node_type *vptr = reinterpret_cast<my_queue_node_type *>(all_input_nodes[ELEM-1][0]);\n        tbb::flow::remove_edge(*vptr, std::get<ELEM-1>(my_join.input_ports()));\n        serial_queue_helper<ELEM-1, JType>::remove_queue_nodes(my_join);\n        delete vptr;\n    }\n};\n\ntemplate<typename JType>\nclass serial_queue_helper<1, JType> {\npublic:\n    typedef typename JType::output_type TT;\n    typedef typename std::tuple_element<0, TT>::type IT;\n    typedef typename tbb::flow::queue_node<IT> my_queue_node_type;\n    static void print_remark() {\n        INFO(\"Serial test of join_node< \" << name_of<IT>::name());\n    }\n\n    static void add_queue_nodes(tbb::flow::graph &g, JType &my_join) {\n        my_queue_node_type *new_node = new my_queue_node_type(g);\n        tbb::flow::make_edge(*new_node, tbb::flow::input_port<0>(my_join));\n        all_input_nodes[0][0] = (void *)new_node;\n    }\n\n    static void fill_one_queue(int maxVal) {\n        my_queue_node_type *qptr = reinterpret_cast<my_queue_node_type *>(all_input_nodes[0][0]);\n        for(int i = 0; i < maxVal; ++i) {\n            CHECK_MESSAGE(qptr->try_put(make_thingie<IT, 1>()(i)), \"\");\n        }\n    }\n\n    static void put_one_queue_val(int myVal) {\n        my_queue_node_type *qptr = reinterpret_cast<my_queue_node_type *>(all_input_nodes[0][0]);\n        IT my_val = make_thingie<IT, 1>()(myVal);\n        CHECK_MESSAGE(qptr->try_put(my_val), \"\");\n    }\n\n    static void check_queue_value(int i, TT &v) {\n        CHECK_MESSAGE(cast_from<IT>::my_int_val(std::get<0>(v))==i*2, \"\");\n    }\n\n    static void remove_queue_nodes(JType &my_join) {\n        my_queue_node_type *vptr = reinterpret_cast<my_queue_node_type *>(all_input_nodes[0][0]);\n        tbb::flow::remove_edge(*vptr, std::get<0>(my_join.input_ports()));\n        delete vptr;\n    }\n};\n\n//\n// Single reservable predecessor at each port, single accepting and rejecting successor\n//   * put to buffer before port0, then put to buffer before port1, ...\n//   * fill buffer before port0 then fill buffer before port1, ...\n\ntemplate<typename JType, class JP>\nvoid test_one_serial(JType &my_join, tbb::flow::graph &g) {\n    typedef typename JType::output_type TType;\n    static const int TUPLE_SIZE = std::tuple_size<TType>::value;\n    bool is_key_matching = is_key_matching_join<JP>::value;\n    std::vector<bool> flags;\n    serial_queue_helper<TUPLE_SIZE, JType>::add_queue_nodes(g, my_join);\n    typedef TType q3_input_type;\n    tbb::flow::queue_node< q3_input_type > q3(g);\n\n    tbb::flow::make_edge(my_join, q3);\n\n    // fill each queue with its value one-at-a-time\n    flags.clear();\n    for(int i = 0; i < Count; ++i) {\n        serial_queue_helper<TUPLE_SIZE, JType>::put_one_queue_val(i);\n        flags.push_back(false);\n    }\n\n    g.wait_for_all();\n    for(int i = 0; i < Count; ++i) {\n        q3_input_type v;\n        g.wait_for_all();\n        CHECK_MESSAGE( (q3.try_get(v)), \"Error in try_get()\");\n        if(is_key_matching) {\n            // because we look up tags in the hash table, the output may be out of order.\n            int j = int(std::get<0>(v))/2;  // figure what the index should be\n            serial_queue_helper<TUPLE_SIZE, JType>::check_queue_value(j, v);\n            flags[j] = true;\n        }\n        else {\n            serial_queue_helper<TUPLE_SIZE, JType>::check_queue_value(i, v);\n        }\n    }\n\n    if(is_key_matching) {\n        for(int i = 0; i < Count; ++i) {\n            CHECK_MESSAGE(flags[i], \"\");\n            flags[i] = false;\n        }\n    }\n\n    tbb::flow::remove_edge(my_join, q3);\n    tbb::flow::limiter_node<q3_input_type> limiter(g, Count / 2);\n    tbb::flow::make_edge(my_join, limiter);\n    tbb::flow::make_edge(limiter, q3);\n\n    // fill each queue completely before filling the next.\n    serial_queue_helper<TUPLE_SIZE, JType>::fill_one_queue(Count);\n\n    g.wait_for_all();\n    for(int i = 0; i < Count / 2; ++i) {\n        q3_input_type v;\n        g.wait_for_all();\n        CHECK_MESSAGE( (q3.try_get(v)), \"Error in try_get()\");\n        if(is_key_matching) {\n            int j = int(std::get<0>(v))/2;\n            serial_queue_helper<TUPLE_SIZE, JType>::check_queue_value(j, v);\n            flags[j] = true;\n        }\n        else {\n            serial_queue_helper<TUPLE_SIZE, JType>::check_queue_value(i, v);\n        }\n    }\n\n    if(is_key_matching) {\n        CHECK(std::count(flags.begin(), flags.end(), true) == Count / 2);\n    }\n\n    serial_queue_helper<TUPLE_SIZE, JType>::remove_queue_nodes(my_join);\n}\n\ntemplate<typename JType, class JP>\nclass serial_test {\n    typedef typename JType::output_type TType;\npublic:\n    static void test() {\n        tbb::flow::graph g;\n        std::vector<bool> flags;\n        bool is_key_matching = is_key_matching_join<JP>::value;\n        flags.reserve(Count);\n\n        const int TUPLE_SIZE = std::tuple_size<TType>::value;\n        static const int ELEMS = 3;\n\n        JType* my_join = makeJoin<TUPLE_SIZE, JType, JP>::create(g);\n        test_input_ports_return_ref(*my_join);\n        serial_queue_helper<TUPLE_SIZE, JType>::print_remark(); INFO(\" >\");\n        if(is_key_matching) {\n            INFO(\"with K == \" << name_of<typename K_deref<typename is_key_matching_join<JP>::key_type>::type >::name());\n            if(std::is_reference<typename is_key_matching_join<JP>::key_type>::value) {\n                INFO(\"&\");\n            }\n        }\n        INFO(\"\\n\");\n\n        test_one_serial<JType, JP>(*my_join, g);\n        // build the vector with copy construction from the used join node.\n        std::vector<JType>join_vector(ELEMS, *my_join);\n        // destroy the tired old join_node in case we're accidentally reusing pieces of it.\n        makeJoin<TUPLE_SIZE, JType, JP>::destroy(my_join);\n\n        for(int e = 0; e < ELEMS; ++e) {  // exercise each of the vector elements\n            test_one_serial<JType, JP>(join_vector[e], g);\n        }\n    }\n\n}; // serial_test\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n#pragma warning( pop )\n#endif\n\ntemplate<\n    template<typename, class > class TestType,  // serial_test or parallel_test\n    typename OutputTupleType,           // type of the output of the join\n    class J>                 // graph_buffer_policy (reserving, queueing, tag_matching or key_matching)\n    class generate_test {\n    public:\n        typedef tbb::flow::join_node<OutputTupleType, typename filter_out_message_based_key_matching<J>::policy> join_node_type;\n        static void do_test() {\n            TestType<join_node_type, J>::test();\n        }\n};\n\ntemplate<class JP>\nvoid test_input_port_policies();\n\n// join_node (reserving) does not consume inputs until an item is available at\n// every input.  It tries to reserve each input, and if any fails it releases the\n// reservation.  When it builds a tuple it broadcasts to all its successors and\n// consumes all the inputs.\n//\n// So our test will put an item at one input port, then attach another node to the\n// same node (a queue node in this case).  The second successor should receive the\n// item in the queue, emptying it.\n//\n// We then place an item in the second input queue, and check the output queues; they\n// should still be empty.  Then we place an item in the first queue; the output queues\n// should then receive a tuple.\n//\n// we then attach another function node to the second input.  It should not receive\n// an item, verifying that the item in the queue is consumed.\ntemplate<>\nvoid test_input_port_policies<tbb::flow::reserving>() {\n    tbb::flow::graph g;\n    typedef tbb::flow::join_node<std::tuple<int, int>, tbb::flow::reserving > JType; // two-phase is the default policy\n                                                                                           // create join_node<type0,type1> jn\n    JType jn(g);\n    // create output_queue oq0, oq1\n    typedef JType::output_type OQType;\n    tbb::flow::queue_node<OQType> oq0(g);\n    tbb::flow::queue_node<OQType> oq1(g);\n    // create iq0, iq1\n    typedef tbb::flow::queue_node<int> IQType;\n    IQType iq0(g);\n    IQType iq1(g);\n    // create qnp, qnq\n    IQType qnp(g);\n    IQType qnq(g);\n    INFO(\"Testing policies of join_node<reserving> input ports\\n\");\n    // attach jn to oq0, oq1\n    tbb::flow::make_edge(jn, oq0);\n    tbb::flow::make_edge(jn, oq1);\n\n    // attach iq0, iq1 to jn\n    tbb::flow::make_edge(iq0, std::get<0>(jn.input_ports()));\n    tbb::flow::make_edge(iq1, std::get<1>(jn.input_ports()));\n\n    for(int loop = 0; loop < 3; ++loop) {\n        // place one item in iq0\n        CHECK_MESSAGE( (iq0.try_put(1)), \"Error putting to iq1\");\n        // attach iq0 to qnp\n        tbb::flow::make_edge(iq0, qnp);\n        // qnp should have an item in it.\n        g.wait_for_all();\n        {\n            int i;\n            CHECK_MESSAGE( (qnp.try_get(i)&&i==1), \"Error in item fetched by qnp\");\n        }\n        // place item in iq1\n        CHECK_MESSAGE( (iq1.try_put(2)), \"Error putting to iq1\");\n        // oq0, oq1 should be empty\n        g.wait_for_all();\n        {\n            OQType t1;\n            CHECK_MESSAGE( (!oq0.try_get(t1)&&!oq1.try_get(t1)), \"oq0 and oq1 not empty\");\n        }\n        // detach qnp from iq0\n        tbb::flow::remove_edge(iq0, qnp); // if we don't remove qnp it will gobble any values we put in iq0\n                                          // place item in iq0\n        CHECK_MESSAGE( (iq0.try_put(3)), \"Error on second put to iq0\");\n        // oq0, oq1 should have items in them\n        g.wait_for_all();\n        {\n            OQType t0;\n            OQType t1;\n            CHECK_MESSAGE( (oq0.try_get(t0)&&std::get<0>(t0)==3&&std::get<1>(t0)==2), \"Error in oq0 output\");\n            CHECK_MESSAGE( (oq1.try_get(t1)&&std::get<0>(t1)==3&&std::get<1>(t1)==2), \"Error in oq1 output\");\n        }\n        // attach qnp to iq0, qnq to iq1\n        // qnp and qnq should be empty\n        tbb::flow::make_edge(iq0, qnp);\n        tbb::flow::make_edge(iq1, qnq);\n        g.wait_for_all();\n        {\n            int i;\n            CHECK_MESSAGE( (!qnp.try_get(i)), \"iq0 still had value in it\");\n            CHECK_MESSAGE( (!qnq.try_get(i)), \"iq1 still had value in it\");\n        }\n        tbb::flow::remove_edge(iq0, qnp);\n        tbb::flow::remove_edge(iq1, qnq);\n    } // for ( int loop ...\n}\n\n// join_node (queueing) consumes inputs as soon as they are available at\n// any input.  When it builds a tuple it broadcasts to all its successors and\n// discards the broadcast values.\n//\n// So our test will put an item at one input port, then attach another node to the\n// same node (a queue node in this case).  The second successor should not receive\n// an item (because the join consumed it).\n//\n// We then place an item in the second input queue, and check the output queues; they\n// should each have a tuple.\n//\n// we then attach another function node to the second input.  It should not receive\n// an item, verifying that the item in the queue is consumed.\ntemplate<>\nvoid test_input_port_policies<tbb::flow::queueing>() {\n    tbb::flow::graph g;\n    typedef tbb::flow::join_node<std::tuple<int, int>, tbb::flow::queueing > JType;\n    // create join_node<type0,type1> jn\n    JType jn(g);\n    // create output_queue oq0, oq1\n    typedef JType::output_type OQType;\n    tbb::flow::queue_node<OQType> oq0(g);\n    tbb::flow::queue_node<OQType> oq1(g);\n    // create iq0, iq1\n    typedef tbb::flow::queue_node<int> IQType;\n    IQType iq0(g);\n    IQType iq1(g);\n    // create qnp, qnq\n    IQType qnp(g);\n    IQType qnq(g);\n    INFO(\"Testing policies of join_node<queueing> input ports\\n\");\n    // attach jn to oq0, oq1\n    tbb::flow::make_edge(jn, oq0);\n    tbb::flow::make_edge(jn, oq1);\n\n    // attach iq0, iq1 to jn\n    tbb::flow::make_edge(iq0, std::get<0>(jn.input_ports()));\n    tbb::flow::make_edge(iq1, std::get<1>(jn.input_ports()));\n\n    for(int loop = 0; loop < 3; ++loop) {\n        // place one item in iq0\n        CHECK_MESSAGE( (iq0.try_put(1)), \"Error putting to iq1\");\n        // attach iq0 to qnp\n        tbb::flow::make_edge(iq0, qnp);\n        // qnp should have an item in it.\n        g.wait_for_all();\n        {\n            int i;\n            CHECK_MESSAGE( (!qnp.try_get(i)), \"Item was received by qnp\");\n        }\n        // place item in iq1\n        CHECK_MESSAGE( (iq1.try_put(2)), \"Error putting to iq1\");\n        // oq0, oq1 should have items\n        g.wait_for_all();\n        {\n            OQType t0;\n            OQType t1;\n            CHECK_MESSAGE( (oq0.try_get(t0)&&std::get<0>(t0)==1&&std::get<1>(t0)==2), \"Error in oq0 output\");\n            CHECK_MESSAGE( (oq1.try_get(t1)&&std::get<0>(t1)==1&&std::get<1>(t1)==2), \"Error in oq1 output\");\n        }\n        // attach qnq to iq1\n        // qnp and qnq should be empty\n        tbb::flow::make_edge(iq1, qnq);\n        g.wait_for_all();\n        {\n            int i;\n            CHECK_MESSAGE( (!qnp.try_get(i)), \"iq0 still had value in it\");\n            CHECK_MESSAGE( (!qnq.try_get(i)), \"iq1 still had value in it\");\n        }\n        tbb::flow::remove_edge(iq0, qnp);\n        tbb::flow::remove_edge(iq1, qnq);\n    } // for ( int loop ...\n}\n\ntemplate<typename T>\nstruct myTagValue {\n    tbb::flow::tag_value operator()(T i) { return tbb::flow::tag_value(i); }\n};\n\ntemplate<>\nstruct myTagValue<CheckType<int> > {\n    tbb::flow::tag_value operator()(CheckType<int> i) { return tbb::flow::tag_value((int)i); }\n};\n\n// join_node (tag_matching) consumes inputs as soon as they are available at\n// any input.  When it builds a tuple it broadcasts to all its successors and\n// discards the broadcast values.\n//\n// It chooses the tuple it broadcasts by matching the tag values returned by the\n// methods given the constructor of the join, in this case the method just casts\n// the value in each port to tag_value.\n//\n// So our test will put an item at one input port, then attach another node to the\n// same node (a queue node in this case).  The second successor should not receive\n// an item (because the join consumed it).\n//\n// We then place an item in the second input queue, and check the output queues; they\n// should each have a tuple.\n//\n// we then attach another queue node to the second input.  It should not receive\n// an item, verifying that the item in the queue is consumed.\n//\n// We will then exercise the join with a bunch of values, and the output order should\n// be determined by the order we insert items into the second queue.  (Each tuple set\n// corresponding to a tag will be complete when the second item is inserted.)\ntemplate<>\nvoid test_input_port_policies<tbb::flow::tag_matching>() {\n    tbb::flow::graph g;\n    typedef tbb::flow::join_node<std::tuple<int, CheckType<int> >, tbb::flow::tag_matching > JoinNodeType;\n    typedef JoinNodeType::output_type CheckTupleType;\n    JoinNodeType testJoinNode(g, myTagValue<int>(), myTagValue<CheckType<int> >());\n    tbb::flow::queue_node<CheckTupleType> checkTupleQueue0(g);\n    tbb::flow::queue_node<CheckTupleType> checkTupleQueue1(g);\n    {\n        Checker<CheckType<int> > my_check;\n\n\n        typedef tbb::flow::queue_node<int> IntQueueType;\n        typedef tbb::flow::queue_node<CheckType<int> > CheckQueueType;\n        IntQueueType intInputQueue(g);\n        CheckQueueType checkInputQueue(g);\n        IntQueueType intEmptyTestQueue(g);\n        CheckQueueType checkEmptyTestQueue(g);\n        INFO(\"Testing policies of join_node<tag_matching> input ports\\n\");\n        // attach testJoinNode to checkTupleQueue0, checkTupleQueue1\n        tbb::flow::make_edge(testJoinNode, checkTupleQueue0);\n        tbb::flow::make_edge(testJoinNode, checkTupleQueue1);\n\n        // attach intInputQueue, checkInputQueue to testJoinNode\n        tbb::flow::make_edge(intInputQueue, tbb::flow::input_port<0>(testJoinNode));\n        tbb::flow::make_edge(checkInputQueue, tbb::flow::input_port<1>(testJoinNode));\n\n        // we'll put four discrete values in the inputs to the join_node.  Each\n        // set of inputs should result in one output.\n        for(int loop = 0; loop < 4; ++loop) {\n            // place one item in intInputQueue\n            CHECK_MESSAGE( (intInputQueue.try_put(loop)), \"Error putting to intInputQueue\");\n            // attach intInputQueue to intEmptyTestQueue\n            tbb::flow::make_edge(intInputQueue, intEmptyTestQueue);\n            // intEmptyTestQueue should not have an item in it.  (the join consumed it.)\n            g.wait_for_all();\n            {\n                int intVal0;\n                CHECK_MESSAGE( (!intEmptyTestQueue.try_get(intVal0)), \"Item was received by intEmptyTestQueue\");\n            }\n            // place item in checkInputQueue\n            CheckType<int> checkVal0(loop);\n            CHECK_MESSAGE( (checkInputQueue.try_put(checkVal0)), \"Error putting to checkInputQueue\");\n            // checkTupleQueue0, checkTupleQueue1 should have items\n            g.wait_for_all();\n            {\n                CheckTupleType t0;\n                CheckTupleType t1;\n                CHECK_MESSAGE( (checkTupleQueue0.try_get(t0)&&std::get<0>(t0)==loop&&(int)std::get<1>(t0)==loop), \"Error in checkTupleQueue0 output\");\n                CHECK_MESSAGE( (checkTupleQueue1.try_get(t1)&&std::get<0>(t1)==loop&&(int)std::get<1>(t1)==loop), \"Error in checkTupleQueue1 output\");\n                CHECK_MESSAGE( (!checkTupleQueue0.try_get(t0)), \"extra object in output queue checkTupleQueue0\");\n                CHECK_MESSAGE( (!checkTupleQueue1.try_get(t0)), \"extra object in output queue checkTupleQueue1\");\n            }\n            // attach checkEmptyTestQueue to checkInputQueue\n            // intEmptyTestQueue and checkEmptyTestQueue should be empty\n            tbb::flow::make_edge(checkInputQueue, checkEmptyTestQueue);\n            g.wait_for_all();\n            {\n                int intVal1;\n                CheckType<int> checkVal1;\n                CHECK_MESSAGE( (!intEmptyTestQueue.try_get(intVal1)), \"intInputQueue still had value in it\");\n                CHECK_MESSAGE( (!checkEmptyTestQueue.try_get(checkVal1)), \"checkInputQueue still had value in it\");\n            }\n            tbb::flow::remove_edge(intInputQueue, intEmptyTestQueue);\n            tbb::flow::remove_edge(checkInputQueue, checkEmptyTestQueue);\n        } // for ( int loop ...\n\n          // Now we'll put [4 .. nValues - 1] in intInputQueue, and then put [4 .. nValues - 1] in checkInputQueue in\n          // a different order.  We should see tuples in the output queues in the order we inserted\n          // the integers into checkInputQueue.\n        const int nValues = 100;\n        const int nIncr = 31;  // relatively prime to nValues\n\n        for(int loop = 4; loop < 4+nValues; ++loop) {\n            // place one item in intInputQueue\n            CHECK_MESSAGE( (intInputQueue.try_put(loop)), \"Error putting to intInputQueue\");\n            g.wait_for_all();\n            {\n                CheckTupleType t3;\n                CHECK_MESSAGE( (!checkTupleQueue0.try_get(t3)), \"Object in output queue\");\n                CHECK_MESSAGE( (!checkTupleQueue1.try_get(t3)), \"Object in output queue\");\n            }\n        } // for ( int loop ...\n\n        for(int loop = 1; loop<=nValues; ++loop) {\n            int lp1 = 4+(loop * nIncr)%nValues;\n            // place item in checkInputQueue\n            CHECK_MESSAGE( (checkInputQueue.try_put(lp1)), \"Error putting to checkInputQueue\");\n            // checkTupleQueue0, checkTupleQueue1 should have items\n            g.wait_for_all();\n            {\n                CheckTupleType t0;\n                CheckTupleType t1;\n                CHECK_MESSAGE( (checkTupleQueue0.try_get(t0)&&std::get<0>(t0)==lp1 && std::get<1>(t0)==lp1), \"Error in checkTupleQueue0 output\");\n                CHECK_MESSAGE( (checkTupleQueue1.try_get(t1)&&std::get<0>(t1)==lp1 && std::get<1>(t1)==lp1), \"Error in checkTupleQueue1 output\");\n                CHECK_MESSAGE( (!checkTupleQueue0.try_get(t0)), \"extra object in output queue checkTupleQueue0\");\n                CHECK_MESSAGE( (!checkTupleQueue1.try_get(t0)), \"extra object in output queue checkTupleQueue1\");\n            }\n        } // for ( int loop ...\n    } // Check\n}\n\ntemplate<typename Policy> struct policy_name {};\n\ntemplate<> struct policy_name<tbb::flow::queueing> {\nconst char* msg_beg() { return \"queueing\\n\";}\nconst char* msg_end() { return \"test queueing extract\\n\";}\n};\n\ntemplate<> struct policy_name<tbb::flow::reserving> {\nconst char* msg_beg() { return \"reserving\\n\";}\nconst char* msg_end() { return \"test reserving extract\\n\";}\n};\n\ntemplate<> struct policy_name<tbb::flow::tag_matching> {\nconst char* msg_beg() { return \"tag_matching\\n\";}\nconst char* msg_end() { return \"test tag_matching extract\\n\";}\n};\n\ntemplate<typename Policy>\nvoid test_main() {\n    test_input_port_policies<Policy>();\n    for(int p = 0; p < 2; ++p) {\n        INFO(policy_name<Policy>().msg_beg());\n        generate_test<serial_test, std::tuple<threebyte, double>, Policy>::do_test();\n#if MAX_TUPLE_TEST_SIZE >= 4\n        {\n            Checker<CheckType<int> > my_check;\n            generate_test<serial_test, std::tuple<float, double, CheckType<int>, long>, Policy>::do_test();\n        }\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 6\n        generate_test<serial_test, std::tuple<double, double, int, long, int, short>, Policy>::do_test();\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 8\n        generate_test<serial_test, std::tuple<float, double, double, double, float, int, float, long>, Policy>::do_test();\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 10\n        generate_test<serial_test, std::tuple<float, double, int, double, double, float, long, int, float, long>, Policy>::do_test();\n#endif\n        {\n            Checker<CheckType<int> > my_check1;\n            generate_test<parallel_test, std::tuple<float, CheckType<int> >, Policy>::do_test();\n        }\n#if MAX_TUPLE_TEST_SIZE >= 3\n        generate_test<parallel_test, std::tuple<float, int, long>, Policy>::do_test();\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 5\n        generate_test<parallel_test, std::tuple<double, double, int, int, short>, Policy>::do_test();\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 7\n        generate_test<parallel_test, std::tuple<float, int, double, float, long, float, long>, Policy>::do_test();\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 9\n        generate_test<parallel_test, std::tuple<float, double, int, double, double, long, int, float, long>, Policy>::do_test();\n#endif\n    }\n}\n\n#endif /* tbb_test_join_node_H */\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_join_node_key_matching.cpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/config.h\"\n\n#include \"test_join_node.h\"\n\n#include \"common/concepts_common.h\"\n\n//! \\file test_join_node_key_matching.cpp\n//! \\brief Test for [flow_graph.join_node] specification\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\nvoid test_deduction_guides() {\n    using namespace tbb::flow;\n    using tuple_type = std::tuple<int, int, double>;\n\n    graph g;\n    auto body_int = [](const int&)->int { return 1; };\n    auto body_double = [](const double&)->int { return 1; };\n\n    join_node j1(g, body_int, body_int, body_double);\n    static_assert(std::is_same_v<decltype(j1), join_node<tuple_type, key_matching<int>>>);\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    broadcast_node<int> b1(g), b2(g);\n    broadcast_node<double> b3(g);\n    broadcast_node<tuple_type> b4(g);\n\n    join_node j2(follows(b1, b2, b3), body_int, body_int, body_double);\n    static_assert(std::is_same_v<decltype(j2), join_node<tuple_type, key_matching<int>>>);\n\n    join_node j3(precedes(b4), body_int, body_int, body_double);\n    static_assert(std::is_same_v<decltype(j3), join_node<tuple_type, key_matching<int>>>);\n#endif\n\n    join_node j4(j1);\n    static_assert(std::is_same_v<decltype(j4), join_node<tuple_type, key_matching<int>>>);\n}\n#endif\n\n//! Test serial key matching on special input types\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Serial test on tuples\") {\n    INFO(\"key_matching\\n\");\n    generate_test<serial_test, std::tuple<MyKeyFirst<int, double>, MyKeySecond<int, float> >, tbb::flow::key_matching<int> >::do_test();\n    generate_test<serial_test, std::tuple<MyKeyFirst<std::string, double>, MyKeySecond<std::string, float> >, tbb::flow::key_matching<std::string> >::do_test();\n    generate_test<serial_test, std::tuple<MyKeyFirst<std::string, double>, MyKeySecond<std::string, float>, MyKeyWithBrokenMessageKey<std::string, int> >, tbb::flow::key_matching<std::string&> >::do_test();\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Test deduction guides\n//! \\brief \\ref requirement\nTEST_CASE(\"Test deduction guides\"){\n    test_deduction_guides();\n}\n#endif\n\n//! Test parallel key matching on special input types\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Parallel test on tuples\"){\n    generate_test<parallel_test, std::tuple<MyKeyFirst<int, double>, MyKeySecond<int, float> >, tbb::flow::key_matching<int> >::do_test();\n    generate_test<parallel_test, std::tuple<MyKeyFirst<int, double>, MyKeySecond<int, float> >, tbb::flow::key_matching<int&> >::do_test();\n    generate_test<parallel_test, std::tuple<MyKeyFirst<std::string, double>, MyKeySecond<std::string, float> >, tbb::flow::key_matching<std::string&> >::do_test();\n}\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\ntemplate <std::size_t Count>\nstruct tuple_helper {\n    using type = decltype(std::tuple_cat(std::declval<std::tuple<int>>(), std::declval<typename tuple_helper<Count - 1>::type>()));\n};\n\ntemplate <>\nstruct tuple_helper<1> {\n    using type = std::tuple<int>;\n};\n\ntemplate <typename... Args>\nconcept can_initialize_join_node = requires(tbb::flow::graph& g, Args... args) {\n    tbb::flow::join_node<typename tuple_helper<sizeof...(Args)>::type,\n                         tbb::flow::key_matching<int>>(g, args...);\n};\n\n// Helper for the concepts which checks if key_matching join_node cannot be instantiated if\n// one of its constructor arguments do not satisfy join_node_function_object concept\n// This structure substitutes IncorrectT to the sequence of arguments on IncorrectArgIndex position\n// The remaining arguments in the sequence are CorrectT\ntemplate <std::size_t ArgCount, std::size_t IncorrectArgIndex, typename CorrectT, typename IncorrectT, typename... Args>\nstruct multiple_arguments_initialization_helper {\n    // Current index is not equal to IncorrectArgIndex - substitute CorrectT at the end of the arguments sequence and continue\n    static constexpr bool value = multiple_arguments_initialization_helper<ArgCount - 1, IncorrectArgIndex - 1, CorrectT, IncorrectT, Args..., CorrectT>::value;\n};\n\ntemplate <std::size_t ArgCount, typename CorrectT, typename IncorrectT, typename... Args>\nstruct multiple_arguments_initialization_helper<ArgCount, 0, CorrectT, IncorrectT, Args...> {\n    // Current index is equal to IncorrectArgIndex - substitute IncorrectT at the end of the sequence and continue\n    // No more incorrect indices would be added - continue with MAX_TUPLE_TEST_SIZE variable as current incorrect index\n    static constexpr bool value = multiple_arguments_initialization_helper<ArgCount - 1, MAX_TUPLE_TEST_SIZE, CorrectT, IncorrectT, Args..., IncorrectT>::value;\n};\n\ntemplate <std::size_t IncorrectArgIndex, typename CorrectT, typename IncorrectT, typename... Args>\nstruct multiple_arguments_initialization_helper<0, IncorrectArgIndex, CorrectT, IncorrectT, Args...> {\n    // ArgCount is equal to 0 - no more arguments should be added\n    // Check if join_node can be initialized with Args\n    static constexpr bool value = can_initialize_join_node<Args...>;\n};\n\n// Helper which iterates over incorrect indices. value is true if initialization is successful for at least for one IncorrectArgIndex\ntemplate <std::size_t ArgCount, std::size_t CurrentIncorrectIndex, typename CorrectT, typename IncorrectT>\nstruct incorrect_arg_index_iteration_helper {\n    // CurrentIncorrectIndex is not equal to max - check with current and continue\n    static constexpr bool value = multiple_arguments_initialization_helper<ArgCount, CurrentIncorrectIndex, CorrectT, IncorrectT>::value ||\n                                  incorrect_arg_index_iteration_helper<ArgCount, CurrentIncorrectIndex + 1, CorrectT, IncorrectT>::value;\n};\n\ntemplate <std::size_t ArgCount, std::size_t CurrentIncorrectIndex, typename CorrectT, typename IncorrectT>\nrequires (ArgCount == CurrentIncorrectIndex + 1)\nstruct incorrect_arg_index_iteration_helper<ArgCount, CurrentIncorrectIndex, CorrectT, IncorrectT> {\n    // CurrentIncorrectIndex is equal to max - check and stop\n    static constexpr bool value = multiple_arguments_initialization_helper<ArgCount, CurrentIncorrectIndex, CorrectT, IncorrectT>::value;\n};\n\n// Helper which iterates over argument count. value is true if initialization (with all possible incorrect indices) is successful for at least one ArgCount\ntemplate <std::size_t CurrentArgCount, typename CorrectT, typename IncorrectT>\nstruct arg_count_iteration_helper {\n    // CurrentArgCount is not equal to max - check and continue\n    static constexpr bool value = incorrect_arg_index_iteration_helper<CurrentArgCount, /*StartIncorrectIndex = */0, CorrectT, IncorrectT>::value ||\n                                  arg_count_iteration_helper<CurrentArgCount + 1, CorrectT, IncorrectT>::value;\n};\n\ntemplate <typename CorrectT, typename IncorrectT>\nstruct arg_count_iteration_helper<MAX_TUPLE_TEST_SIZE, CorrectT, IncorrectT> {\n    // CurrentArgCount is equal to max - check and stop\n    static constexpr bool value = incorrect_arg_index_iteration_helper<MAX_TUPLE_TEST_SIZE, /*StartIncorrectIndex = */0, CorrectT, IncorrectT>::value;\n};\n\ntemplate <typename CorrectT, typename IncorrectT>\nconcept can_initialize_join_node_with_incorrect_argument = arg_count_iteration_helper</*StartArgCount = */2, CorrectT, IncorrectT>::value;\n\ntemplate <std::size_t CurrentArgCount, typename CorrectT, typename... Args>\nstruct join_node_correct_initialization_helper {\n    static constexpr bool value = join_node_correct_initialization_helper<CurrentArgCount - 1, CorrectT, Args..., CorrectT>::value;\n};\n\ntemplate <typename CorrectT, typename... Args>\nstruct join_node_correct_initialization_helper<0, CorrectT, Args...> {\n    static constexpr bool value = can_initialize_join_node<Args...>;\n};\n\ntemplate <std::size_t CurrentArgCount, typename CorrectT>\nstruct arg_count_correct_initialization_helper {\n    static constexpr bool value = join_node_correct_initialization_helper<CurrentArgCount, CorrectT>::value &&\n                                  arg_count_correct_initialization_helper<CurrentArgCount + 1, CorrectT>::value;\n};\n\ntemplate <typename CorrectT>\nstruct arg_count_correct_initialization_helper<MAX_TUPLE_TEST_SIZE, CorrectT> {\n    static constexpr bool value = join_node_correct_initialization_helper<MAX_TUPLE_TEST_SIZE, CorrectT>::value;\n};\n\ntemplate <typename CorrectT>\nconcept can_initialize_join_node_with_correct_argument = arg_count_correct_initialization_helper</*Start = */2, CorrectT>::value;\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"join_node constraints\") {\n    using namespace test_concepts::join_node_function_object;\n    static_assert(can_initialize_join_node_with_correct_argument<Correct<int, int>>);\n    static_assert(!can_initialize_join_node_with_incorrect_argument<Correct<int, int>, NonCopyable<int, int>>);\n    static_assert(!can_initialize_join_node_with_incorrect_argument<Correct<int, int>, NonDestructible<int, int>>);\n    static_assert(!can_initialize_join_node_with_incorrect_argument<Correct<int, int>, NoOperatorRoundBrackets<int, int>>);\n    static_assert(!can_initialize_join_node_with_incorrect_argument<Correct<int, int>, WrongInputOperatorRoundBrackets<int, int>>);\n    static_assert(!can_initialize_join_node_with_incorrect_argument<Correct<int, int>, WrongReturnOperatorRoundBrackets<int, int>>);\n}\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_join_node_key_matching_n_args.cpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/config.h\"\n\n#include \"test_join_node.h\"\n\n//! \\file test_join_node_key_matching_n_args.cpp\n//! \\brief Test for [flow_graph.join_node] specification\n\ntemplate <typename T1, typename T2>\nusing make_tuple = decltype(std::tuple_cat(T1(), std::tuple<T2>()));\nusing T1 = std::tuple<MyKeyFirst<std::string, double>>;\nusing T2 = make_tuple<T1, MyKeySecond<std::string, int>>;\nusing T3 = make_tuple<T2, MyKeyFirst<std::string, int>>;\nusing T4 = make_tuple<T3, MyKeyWithBrokenMessageKey<std::string, size_t>>;\nusing T5 = make_tuple<T4, MyKeyWithBrokenMessageKey<std::string, int>>;\nusing T6 = make_tuple<T5, MyKeySecond<std::string, short>>;\nusing T7 = make_tuple<T6, MyKeySecond<std::string, threebyte>>;\nusing T8 = make_tuple<T7, MyKeyFirst<std::string, int>>;\nusing T9 = make_tuple<T8, MyKeySecond<std::string, threebyte>>;\nusing T10 = make_tuple<T9, MyKeyWithBrokenMessageKey<std::string, size_t>>;\n\n#if TBB_TEST_LOW_WORKLOAD && TBB_USE_DEBUG\n// the compiler might generate huge object file in debug (>64M)\n#define TEST_CASE_TEMPLATE_N_ARGS(dec) TEST_CASE_TEMPLATE(dec, T, T2, T5, T8, T10)\n#else\n#define TEST_CASE_TEMPLATE_N_ARGS(dec) TEST_CASE_TEMPLATE(dec, T, T2, T3, T4, T5, T6, T7, T8, T9, T10)\n#endif\n\n//! Serial test with different tuple sizes\n//! \\brief \\ref error_guessing\nTEST_CASE_TEMPLATE_N_ARGS(\"Serial N tests on tuples\") {\n     generate_test<serial_test, T, tbb::flow::key_matching<std::string&>>::do_test();\n}\n\n//! Parallel test with different tuple sizes\n//! \\brief \\ref error_guessing\nTEST_CASE_TEMPLATE_N_ARGS(\"Parallel N tests on tuples\") {\n    generate_test<parallel_test, T, tbb::flow::key_matching<std::string&>>::do_test();\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_join_node_msg_key_matching.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// Message based key matching is a preview feature\n#define TBB_PREVIEW_FLOW_GRAPH_FEATURES 1\n\n#include \"common/config.h\"\n\n#include \"test_join_node.h\"\n\n//! \\file test_join_node_msg_key_matching.cpp\n//! \\brief Test for [preview] functionality\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\nstruct message_key {\n    int my_key;\n    double my_value;\n\n    int key() const { return my_key; }\n\n    operator size_t() const { return my_key; }\n\n    bool operator==(const message_key& rhs) { return my_value == rhs.my_value; }\n};\n\nvoid test_deduction_guides() {\n    using namespace tbb::flow;\n    using tuple_type = std::tuple<message_key, message_key>;\n\n    graph g;\n    broadcast_node<message_key> bm1(g), bm2(g);\n    broadcast_node<tuple_type> bm3(g);\n    join_node<tuple_type, key_matching<int> > j0(g);\n    join_node j3(j0);\n    static_assert(std::is_same_v<decltype(j3), join_node<tuple_type, key_matching<int>>>);\n}\n#endif\n\n//! Serial test with matching policies\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Serial test\") {\n    generate_test<serial_test, std::tuple<MyMessageKeyWithBrokenKey<int, double>, MyMessageKeyWithoutKey<int, float> >, message_based_key_matching<int> >::do_test();\n    generate_test<serial_test, std::tuple<MyMessageKeyWithoutKeyMethod<std::string, double>, MyMessageKeyWithBrokenKey<std::string, float> >, message_based_key_matching<std::string> >::do_test();\n}\n\n//! Parallel test with special key types\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Parallel test\"){\n    generate_test<parallel_test, std::tuple<MyMessageKeyWithBrokenKey<int, double>, MyMessageKeyWithoutKey<int, float> >, message_based_key_matching<int> >::do_test();\n    generate_test<parallel_test, std::tuple<MyMessageKeyWithoutKeyMethod<int, double>, MyMessageKeyWithBrokenKey<int, float> >, message_based_key_matching<int&> >::do_test();\n    generate_test<parallel_test, std::tuple<MyMessageKeyWithoutKey<std::string, double>, MyMessageKeyWithoutKeyMethod<std::string, float> >, message_based_key_matching<std::string&> >::do_test();\n}\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Test deduction guides\n//! \\brief \\ref requirement\nTEST_CASE(\"Deduction guides test\"){\n    test_deduction_guides();\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_join_node_msg_key_matching_n_args.cpp",
    "content": "/*\n    Copyright (c) 2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// Message based key matching is a preview feature\n#define TBB_PREVIEW_FLOW_GRAPH_FEATURES 1\n\n#include \"common/config.h\"\n\n#include \"test_join_node.h\"\n\n//! \\file test_join_node_msg_key_matching_n_args.cpp\n//! \\brief Test for [preview] functionality\n\ntemplate <typename T1, typename T2>\nusing make_tuple = decltype(std::tuple_cat(T1(), std::tuple<T2>()));\nusing T1 = std::tuple<MyMessageKeyWithoutKeyMethod<std::string, double>>;\nusing T2 = make_tuple<T1, MyMessageKeyWithBrokenKey<std::string, int>>;\nusing T3 = make_tuple < T2, MyMessageKeyWithoutKey<std::string, int>>;\nusing T4 = make_tuple < T3, MyMessageKeyWithoutKeyMethod<std::string, size_t>>;\nusing T5 = make_tuple < T4, MyMessageKeyWithBrokenKey<std::string, int>>;\nusing T6 = make_tuple < T5, MyMessageKeyWithoutKeyMethod<std::string, short>>;\nusing T7 = make_tuple < T6, MyMessageKeyWithoutKeyMethod<std::string, threebyte>>;\nusing T8 = make_tuple < T7, MyMessageKeyWithBrokenKey<std::string, int>>;\nusing T9 = make_tuple < T8, MyMessageKeyWithoutKeyMethod<std::string, threebyte>>;\nusing T10 = make_tuple < T9, MyMessageKeyWithBrokenKey<std::string, size_t>>;\n\n#if TBB_TEST_LOW_WORKLOAD && TBB_USE_DEBUG\n// the compiler might generate huge object file in debug (>64M)\n#define TEST_CASE_TEMPLATE_N_ARGS(dec) TEST_CASE_TEMPLATE(dec, T, T2, T10)\n#else\n#define TEST_CASE_TEMPLATE_N_ARGS(dec) TEST_CASE_TEMPLATE(dec, T, T2, T3, T4, T5, T6, T7, T8, T9, T10)\n#endif\n\n//! Serial test with different tuple sizes\n//! \\brief \\ref error_guessing\nTEST_CASE_TEMPLATE_N_ARGS(\"Serial N tests\") {\n    generate_test<serial_test, T, message_based_key_matching<std::string&> >::do_test();\n}\n\n//! Parallel test with different tuple sizes\n//! \\brief \\ref error_guessing\nTEST_CASE_TEMPLATE_N_ARGS(\"Parallel N tests\") {\n    generate_test<parallel_test, T, message_based_key_matching<std::string&> >::do_test();\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_join_node_preview.cpp",
    "content": "/*\n    Copyright (c) 2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#define TBB_PREVIEW_FLOW_GRAPH_FEATURES 1\n\n#include \"common/config.h\"\n\n#include \"test_join_node.h\"\n#include \"common/test_join_node_multiple_predecessors.h\"\n#include \"common/test_follows_and_precedes_api.h\"\n\n#include <array>\n#include <vector>\n\n//! \\file test_join_node_preview.cpp\n//! \\brief Test for [preview] functionality\n\nvoid jn_follows_and_precedes() {\n    using msg_t = tbb::flow::continue_msg;\n    using JoinOutputType = std::tuple<msg_t, msg_t, msg_t>;\n\n    std::array<msg_t, 3> messages_for_follows = { {msg_t(), msg_t(), msg_t()} };\n    std::vector<msg_t> messages_for_precedes = {msg_t(), msg_t(), msg_t()};\n\n    follows_and_precedes_testing::test_follows\n        <msg_t, tbb::flow::join_node<JoinOutputType>, tbb::flow::buffer_node<msg_t>>(messages_for_follows);\n    follows_and_precedes_testing::test_follows\n        <msg_t, tbb::flow::join_node<JoinOutputType, tbb::flow::queueing>>(messages_for_follows);\n    follows_and_precedes_testing::test_follows\n        <msg_t, tbb::flow::join_node<JoinOutputType, tbb::flow::reserving>, tbb::flow::buffer_node<msg_t>>(messages_for_follows);\n    auto b = [](msg_t) { return msg_t(); };\n    class hash_compare {\n    public:\n        std::size_t hash(msg_t) const { return 0; }\n        bool equal(msg_t, msg_t) const { return true; }\n    };\n    follows_and_precedes_testing::test_follows\n        <msg_t, tbb::flow::join_node<JoinOutputType, tbb::flow::key_matching<msg_t, hash_compare>>, tbb::flow::buffer_node<msg_t>>\n        (messages_for_follows, b, b, b);\n\n    follows_and_precedes_testing::test_precedes\n        <msg_t, tbb::flow::join_node<JoinOutputType>>(messages_for_precedes);\n    follows_and_precedes_testing::test_precedes\n        <msg_t, tbb::flow::join_node<JoinOutputType, tbb::flow::queueing>>(messages_for_precedes);\n    follows_and_precedes_testing::test_precedes\n        <msg_t, tbb::flow::join_node<JoinOutputType, tbb::flow::reserving>>(messages_for_precedes);\n    follows_and_precedes_testing::test_precedes\n        <msg_t, tbb::flow::join_node<JoinOutputType, tbb::flow::key_matching<msg_t, hash_compare>>>\n        (messages_for_precedes, b, b, b);\n}\n\nvoid jn_msg_key_matching_follows_and_precedes() {\n    using msg_t = MyMessageKeyWithoutKey<int, int>;\n    using JoinOutputType = std::tuple<msg_t, msg_t, msg_t>;\n\n    std::array<msg_t, 3> messages_for_follows = { {msg_t(), msg_t(), msg_t()} };\n    std::vector<msg_t> messages_for_precedes = { msg_t(), msg_t(), msg_t() };\n\n    follows_and_precedes_testing::test_follows\n        <msg_t, tbb::flow::join_node<JoinOutputType, tbb::flow::key_matching<std::size_t>>, tbb::flow::buffer_node<msg_t>>\n        (messages_for_follows);\n    follows_and_precedes_testing::test_precedes\n        <msg_t, tbb::flow::join_node<JoinOutputType, tbb::flow::key_matching<std::size_t>>>\n        (messages_for_precedes);\n}\n\nvoid test_follows_and_precedes_api() {\n    jn_follows_and_precedes();\n    jn_msg_key_matching_follows_and_precedes();\n}\n\nvoid test_try_put_and_wait_queueing() {\n    tbb::task_arena arena(1);\n\n    arena.execute([] {\n        tbb::flow::graph g;\n\n        std::vector<int> start_work_items;\n        std::vector<int> processed_items;\n        std::vector<int> new_work_items;\n        int wait_message = 10;\n\n        for (int i = 0; i < wait_message; ++i) {\n            start_work_items.emplace_back(i);\n            new_work_items.emplace_back(i + 1 + wait_message);\n        }\n\n        using tuple_type = std::tuple<int, int, int>;\n        tbb::flow::join_node<tuple_type, tbb::flow::queueing> join(g);\n\n        tbb::flow::function_node<tuple_type, int, tbb::flow::rejecting> function(g, tbb::flow::serial,\n            [&](tuple_type tuple) noexcept {\n                CHECK(std::get<0>(tuple) == std::get<1>(tuple));\n                CHECK(std::get<1>(tuple) == std::get<2>(tuple));\n\n                auto input = std::get<0>(tuple);\n\n                if (input == wait_message) {\n                    for (auto item : new_work_items) {\n                        tbb::flow::input_port<0>(join).try_put(item);\n                        tbb::flow::input_port<1>(join).try_put(item);\n                        tbb::flow::input_port<2>(join).try_put(item);\n                    }\n                }\n                processed_items.emplace_back(input);\n                return 0;\n            });\n\n        tbb::flow::make_edge(join, function);\n\n        for (auto item : start_work_items) {\n            tbb::flow::input_port<0>(join).try_put(item);\n            tbb::flow::input_port<1>(join).try_put(item);\n            tbb::flow::input_port<2>(join).try_put(item);\n        }\n\n        tbb::flow::input_port<0>(join).try_put(wait_message);\n        tbb::flow::input_port<1>(join).try_put(wait_message);\n        tbb::flow::input_port<2>(join).try_put_and_wait(wait_message);\n\n        // It is expected that the join_node would push the tuple of three copies of first element in start_work_items\n        // And occupy the concurrency of function. Other tuples would be rejected and taken using push-pull protocol\n        // in FIFO order\n        std::size_t check_index = 0;\n\n        for (auto item : start_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item, \"Unexpected start_work_items processing\");\n        }\n\n        CHECK_MESSAGE(processed_items[check_index++] == wait_message, \"Unexpected wait_message processing\");\n        CHECK_MESSAGE(check_index == processed_items.size(), \"Unexpected number of messages\");\n\n        g.wait_for_all();\n\n        for (auto item : new_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item, \"Unexpected start_work_items processing\");\n        }\n    });\n}\n\nvoid test_try_put_and_wait_reserving() {\n    tbb::task_arena arena(1);\n\n    arena.execute([]{\n        tbb::flow::graph g;\n\n        std::vector<int> start_work_items;\n        std::vector<int> processed_items;\n        std::vector<int> new_work_items;\n        int wait_message = 10;\n\n        for (int i = 0; i < wait_message; ++i) {\n            start_work_items.emplace_back(i);\n            new_work_items.emplace_back(i + 1 + wait_message);\n        }\n\n        using tuple_type = std::tuple<int, int, int>;\n        tbb::flow::queue_node<int> buffer1(g);\n        tbb::flow::queue_node<int> buffer2(g);\n        tbb::flow::queue_node<int> buffer3(g);\n\n        tbb::flow::join_node<tuple_type, tbb::flow::reserving> join(g);\n\n        tbb::flow::function_node<tuple_type, int, tbb::flow::rejecting> function(g, tbb::flow::serial,\n            [&](tuple_type tuple) noexcept {\n                CHECK(std::get<0>(tuple) == std::get<1>(tuple));\n                CHECK(std::get<1>(tuple) == std::get<2>(tuple));\n\n                auto input = std::get<0>(tuple);\n\n                if (input == wait_message) {\n                    for (auto item : new_work_items) {\n                        buffer1.try_put(item);\n                        buffer2.try_put(item);\n                        buffer3.try_put(item);\n                    }\n                }\n                processed_items.emplace_back(input);\n                return 0;\n            });\n\n        tbb::flow::make_edge(buffer1, tbb::flow::input_port<0>(join));\n        tbb::flow::make_edge(buffer2, tbb::flow::input_port<1>(join));\n        tbb::flow::make_edge(buffer3, tbb::flow::input_port<2>(join));\n        tbb::flow::make_edge(join, function);\n\n        for (auto item : start_work_items) {\n            buffer1.try_put(item);\n            buffer2.try_put(item);\n            buffer3.try_put(item);\n        }\n\n        buffer1.try_put(wait_message);\n        buffer2.try_put(wait_message);\n        buffer3.try_put_and_wait(wait_message);\n\n        // It is expected that the join_node would push the tuple of three copies of first element in start_work_items\n        // And occupy the concurrency of function. Other tuples would be rejected and taken using push-pull protocol\n        // between function and join_node and between join_node and each buffer in FIFO order because queue_node is used\n        std::size_t check_index = 0;\n\n        for (auto item : start_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item, \"Unexpected start_work_items processing\");\n        }\n\n        CHECK_MESSAGE(processed_items[check_index++] == wait_message, \"Unexpected wait_message processing\");\n        CHECK_MESSAGE(check_index == processed_items.size(), \"Unexpected number of messages\");\n\n        g.wait_for_all();\n\n        for (auto item : new_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item, \"Unexpected start_work_items processing\");\n        }\n    });\n}\n\nstruct int_wrapper {\n    int i = 0;\n    int_wrapper() : i(0) {}\n    int_wrapper(int ii) : i(ii) {}\n    int_wrapper& operator=(int ii) {\n        i = ii;\n        return *this;\n    }\n\n    int key() const {\n        return i;\n    }\n\n    friend bool operator==(const int_wrapper& lhs, const int_wrapper& rhs) {\n        return lhs.i == rhs.i;\n    }\n};\n\ntemplate <typename... Body>\nvoid test_try_put_and_wait_key_matching(Body... body) {\n    // Body of one argument for testing standard key_matching\n    // Body of zero arguments for testing message based key_matching\n    static_assert(sizeof...(Body) == 0 || sizeof...(Body) == 1, \"incorrect test setup\");\n    tbb::task_arena arena(1);\n\n    arena.execute([=] {\n        tbb::flow::graph g;\n\n        std::vector<int_wrapper> start_work_items;\n        std::vector<int_wrapper> processed_items;\n        std::vector<int_wrapper> new_work_items;\n        int_wrapper wait_message = 10;\n\n        for (int i = 0; i < wait_message.i; ++i) {\n            start_work_items.emplace_back(i);\n            new_work_items.emplace_back(i + 1 + wait_message.i);\n        }\n\n        using tuple_type = std::tuple<int_wrapper, int_wrapper, int_wrapper>;\n        tbb::flow::join_node<tuple_type, tbb::flow::key_matching<int>> join(g, body..., body..., body...);\n\n        tbb::flow::function_node<tuple_type, int, tbb::flow::rejecting> function(g, tbb::flow::serial,\n            [&](tuple_type tuple) noexcept {\n                CHECK(std::get<0>(tuple) == std::get<1>(tuple));\n                CHECK(std::get<1>(tuple) == std::get<2>(tuple));\n\n                auto input = std::get<0>(tuple);\n\n                if (input == wait_message) {\n                    for (auto item : new_work_items) {\n                        tbb::flow::input_port<0>(join).try_put(item);\n                        tbb::flow::input_port<1>(join).try_put(item);\n                        tbb::flow::input_port<2>(join).try_put(item);\n                    }\n                }\n                processed_items.emplace_back(input);\n                return 0;\n            });\n\n        tbb::flow::make_edge(join, function);\n\n        tbb::flow::input_port<0>(join).try_put(wait_message);\n        tbb::flow::input_port<1>(join).try_put(wait_message);\n\n        // For the first port - submit items in reversed order\n        for (std::size_t i = start_work_items.size(); i != 0; --i) {\n            tbb::flow::input_port<0>(join).try_put(start_work_items[i - 1]);\n        }\n\n        // For first two ports - submit items in direct order\n        for (auto item : start_work_items) {\n            tbb::flow::input_port<1>(join).try_put(item);\n            tbb::flow::input_port<2>(join).try_put(item);\n        }\n\n        tbb::flow::input_port<2>(join).try_put_and_wait(wait_message);\n\n        // It is expected that the join_node would push the tuple of three copies of first element in start_work_items\n        // And occupy the concurrency of function. Other tuples would be rejected and taken using push-pull protocol\n        // in order of submission\n        std::size_t check_index = 0;\n\n        for (auto item : start_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item, \"Unexpected start_work_items processing\");\n        }\n\n        CHECK_MESSAGE(processed_items[check_index++] == wait_message, \"Unexpected wait_message processing\");\n        CHECK_MESSAGE(check_index == processed_items.size(), \"Unexpected number of messages\");\n\n        g.wait_for_all();\n\n        for (auto item : new_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item, \"Unexpected start_work_items processing\");\n        }\n        CHECK_MESSAGE(check_index == processed_items.size(), \"Unexpected number of messages\");\n    });\n}\n\n//! Test follows and precedes API\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test follows and precedes API\"){\n    test_follows_and_precedes_api();\n}\n\n// TODO: Look deeper into this test to see if it has the right name\n// and if it actually tests some kind of regression. It is possible\n// that `connect_join_via_follows` and `connect_join_via_precedes`\n// functions are redundant.\n\n//! Test maintaining correct count of ports without input\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test removal of the predecessor while having none\") {\n    using namespace multiple_predecessors;\n\n    test(connect_join_via_follows);\n    test(connect_join_via_precedes);\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test join_node try_put_and_wait\") {\n    test_try_put_and_wait_queueing();\n    test_try_put_and_wait_reserving();\n    // Test standard key_matching policy\n    test_try_put_and_wait_key_matching([](int_wrapper w) { return w.i; });\n    // Test msg based key_matching policy\n    test_try_put_and_wait_key_matching();\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_limiter_node.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"common/config.h\"\n\n#include \"tbb/flow_graph.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_assert.h\"\n#include \"common/test_follows_and_precedes_api.h\"\n#include \"tbb/global_control.h\"\n\n#include <atomic>\n\n\n//! \\file test_limiter_node.cpp\n//! \\brief Test for [flow_graph.limiter_node] specification\n\n\nconst int L = 10;\nconst int N = 1000;\n\nusing tbb::detail::d2::SUCCESSFULLY_ENQUEUED;\nusing tbb::detail::d2::graph_task;\n\ntemplate< typename T >\nstruct serial_receiver : public tbb::flow::receiver<T>, utils::NoAssign {\n   T next_value;\n   tbb::flow::graph& my_graph;\n\n   serial_receiver(tbb::flow::graph& g) : next_value(T(0)), my_graph(g) {}\n\n   graph_task* try_put_task( const T &v ) override {\n       CHECK_MESSAGE( next_value++  == v, \"\" );\n       return const_cast<graph_task*>(SUCCESSFULLY_ENQUEUED);\n   }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    graph_task * try_put_task( const T &v, const tbb::detail::d2::message_metainfo& ) override {\n        return try_put_task(v);\n    }\n#endif\n\n    tbb::flow::graph& graph_reference() const override {\n        return my_graph;\n    }\n};\n\ntemplate< typename T >\nstruct parallel_receiver : public tbb::flow::receiver<T>, utils::NoAssign {\n\n    std::atomic<int> my_count;\n    tbb::flow::graph& my_graph;\n\n    parallel_receiver(tbb::flow::graph& g) : my_graph(g) { my_count = 0; }\n\n    graph_task* try_put_task( const T &/*v*/ ) override {\n       ++my_count;\n       return const_cast<graph_task*>(SUCCESSFULLY_ENQUEUED);\n    }\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n    graph_task * try_put_task( const T &v, const tbb::detail::d2::message_metainfo& ) override {\n        return try_put_task(v);\n    }\n#endif\n\n    tbb::flow::graph& graph_reference() const override {\n        return my_graph;\n    }\n};\n\ntemplate< typename T >\nstruct empty_sender : public tbb::flow::sender<T> {\n        typedef typename tbb::flow::sender<T>::successor_type successor_type;\n\n        bool register_successor( successor_type & ) override { return false; }\n        bool remove_successor( successor_type & ) override { return false; }\n};\n\n\ntemplate< typename T >\nstruct put_body : utils::NoAssign {\n\n    tbb::flow::limiter_node<T> &my_lim;\n    std::atomic<int> &my_accept_count;\n\n    put_body( tbb::flow::limiter_node<T> &lim, std::atomic<int> &accept_count ) :\n        my_lim(lim), my_accept_count(accept_count) {}\n\n    void operator()( int ) const {\n        for ( int i = 0; i < L; ++i ) {\n            bool msg = my_lim.try_put( T(i) );\n            if ( msg == true )\n               ++my_accept_count;\n        }\n    }\n};\n\ntemplate< typename T >\nstruct put_dec_body : utils::NoAssign {\n\n    tbb::flow::limiter_node<T> &my_lim;\n    std::atomic<int> &my_accept_count;\n\n    put_dec_body( tbb::flow::limiter_node<T> &lim, std::atomic<int> &accept_count ) :\n        my_lim(lim), my_accept_count(accept_count) {}\n\n    void operator()( int ) const {\n        int local_accept_count = 0;\n        while ( local_accept_count < N ) {\n            bool msg = my_lim.try_put( T(local_accept_count) );\n            if ( msg == true ) {\n                ++local_accept_count;\n                ++my_accept_count;\n                my_lim.decrementer().try_put( tbb::flow::continue_msg() );\n            }\n        }\n    }\n\n};\n\ntemplate< typename T >\nvoid test_puts_with_decrements( int num_threads, tbb::flow::limiter_node< T >& lim , tbb::flow::graph& g) {\n    parallel_receiver<T> r(g);\n    empty_sender< tbb::flow::continue_msg > s;\n    std::atomic<int> accept_count;\n    accept_count = 0;\n    tbb::flow::make_edge( lim, r );\n    tbb::flow::make_edge(s, lim.decrementer());\n\n    // test puts with decrements\n    utils::NativeParallelFor( num_threads, put_dec_body<T>(lim, accept_count) );\n    int c = accept_count;\n    CHECK_MESSAGE( c == N*num_threads, \"\" );\n    CHECK_MESSAGE( r.my_count == N*num_threads, \"\" );\n}\n\n//\n// Tests\n//\n// limiter only forwards below the limit, multiple parallel senders / single receiver\n// multiple parallel senders that put to decrement at each accept, limiter accepts new messages\n//\n//\ntemplate< typename T >\nint test_parallel(int num_threads) {\n\n   // test puts with no decrements\n   for ( int i = 0; i < L; ++i ) {\n       tbb::flow::graph g;\n       tbb::flow::limiter_node< T > lim(g, i);\n       parallel_receiver<T> r(g);\n       std::atomic<int> accept_count;\n       accept_count = 0;\n       tbb::flow::make_edge( lim, r );\n       // test puts with no decrements\n       utils::NativeParallelFor( num_threads, put_body<T>(lim, accept_count) );\n       g.wait_for_all();\n       int c = accept_count;\n       CHECK_MESSAGE( c == i, \"\" );\n   }\n\n   // test puts with decrements\n   for ( int i = 1; i < L; ++i ) {\n       tbb::flow::graph g;\n       tbb::flow::limiter_node< T > lim(g, i);\n       test_puts_with_decrements(num_threads, lim, g);\n       tbb::flow::limiter_node< T > lim_copy( lim );\n       test_puts_with_decrements(num_threads, lim_copy, g);\n   }\n\n   return 0;\n}\n\n//\n// Tests\n//\n// limiter only forwards below the limit, single sender / single receiver\n// at reject, a put to decrement, will cause next message to be accepted\n//\ntemplate< typename T >\nint test_serial() {\n\n   // test puts with no decrements\n   for ( int i = 0; i < L; ++i ) {\n       tbb::flow::graph g;\n       tbb::flow::limiter_node< T > lim(g, i);\n       serial_receiver<T> r(g);\n       tbb::flow::make_edge( lim, r );\n       for ( int j = 0; j < L; ++j ) {\n           bool msg = lim.try_put( T(j) );\n           CHECK_MESSAGE( (( j < i && msg == true ) || ( j >= i && msg == false )), \"\" );\n       }\n       g.wait_for_all();\n   }\n\n   // test puts with decrements\n   for ( int i = 1; i < L; ++i ) {\n       tbb::flow::graph g;\n       tbb::flow::limiter_node< T > lim(g, i);\n       serial_receiver<T> r(g);\n       empty_sender< tbb::flow::continue_msg > s;\n       tbb::flow::make_edge( lim, r );\n       tbb::flow::make_edge(s, lim.decrementer());\n       for ( int j = 0; j < N; ++j ) {\n           bool msg = lim.try_put( T(j) );\n           CHECK_MESSAGE( (( j < i && msg == true ) || ( j >= i && msg == false )), \"\" );\n           if ( msg == false ) {\n               lim.decrementer().try_put( tbb::flow::continue_msg() );\n               msg = lim.try_put( T(j) );\n               CHECK_MESSAGE( msg == true, \"\" );\n           }\n       }\n   }\n   return 0;\n}\n\n// reported bug in limiter (https://community.intel.com/t5/Intel-oneAPI-Threading-Building/multifun-node-try-put-several-messages-to-one-successor-crashes/m-p/922844)\n#define DECREMENT_OUTPUT 1  // the port number of the decrement output of the multifunction_node\n#define LIMITER_OUTPUT 0    // port number of the integer output\n\ntypedef tbb::flow::multifunction_node<int, std::tuple<int,tbb::flow::continue_msg> > mfnode_type;\n\nstd::atomic<size_t> emit_count;\nstd::atomic<size_t> emit_sum;\nstd::atomic<size_t> receive_count;\nstd::atomic<size_t> receive_sum;\n\nstruct mfnode_body {\n    int max_cnt;\n    std::atomic<int>* my_cnt;\n    mfnode_body(const int& _max, std::atomic<int> &_my) : max_cnt(_max), my_cnt(&_my)  { }\n    void operator()(const int &/*in*/, mfnode_type::output_ports_type &out) {\n        int lcnt = ++(*my_cnt);\n        if(lcnt > max_cnt) {\n            return;\n        }\n        // put one continue_msg to the decrement of the limiter.\n        if(!std::get<DECREMENT_OUTPUT>(out).try_put(tbb::flow::continue_msg())) {\n            CHECK_MESSAGE( (false),\"Unexpected rejection of decrement\");\n        }\n        {\n            // put messages to the input of the limiter_node until it rejects.\n            while( std::get<LIMITER_OUTPUT>(out).try_put(lcnt) ) {\n                emit_sum += lcnt;\n                ++emit_count;\n            }\n        }\n    }\n};\n\nstruct fn_body {\n    int operator()(const int &in) {\n        receive_sum += in;\n        ++receive_count;\n        return in;\n    }\n};\n\n//                   +------------+\n//    +---------+    |            v\n//    | mf_node |0---+       +----------+          +----------+\n// +->|         |1---------->| lim_node |--------->| fn_node  |--+\n// |  +---------+            +----------+          +----------+  |\n// |                                                             |\n// |                                                             |\n// +-------------------------------------------------------------+\n//\nvoid\ntest_multifunction_to_limiter(int _max, int _nparallel) {\n    tbb::flow::graph g;\n    emit_count = 0;\n    emit_sum = 0;\n    receive_count = 0;\n    receive_sum = 0;\n    std::atomic<int> local_cnt;\n    local_cnt = 0;\n    mfnode_type mf_node(g, tbb::flow::unlimited, mfnode_body(_max, local_cnt));\n    tbb::flow::function_node<int, int> fn_node(g, tbb::flow::unlimited, fn_body());\n    tbb::flow::limiter_node<int> lim_node(g, _nparallel);\n    tbb::flow::make_edge(tbb::flow::output_port<LIMITER_OUTPUT>(mf_node), lim_node);\n    tbb::flow::make_edge(tbb::flow::output_port<DECREMENT_OUTPUT>(mf_node), lim_node.decrementer());\n    tbb::flow::make_edge(lim_node, fn_node);\n    tbb::flow::make_edge(fn_node, mf_node);\n\n    mf_node.try_put(1);\n    g.wait_for_all();\n    CHECK_MESSAGE( (emit_count == receive_count), \"counts do not match\");\n    CHECK_MESSAGE( (emit_sum == receive_sum), \"sums do not match\");\n\n    // reset, test again\n    g.reset();\n    emit_count = 0;\n    emit_sum = 0;\n    receive_count = 0;\n    receive_sum = 0;\n    local_cnt = 0;\n    mf_node.try_put(1);\n    g.wait_for_all();\n    CHECK_MESSAGE( (emit_count == receive_count), \"counts do not match\");\n    CHECK_MESSAGE( (emit_sum == receive_sum), \"sums do not match\");\n}\n\n\nvoid\ntest_continue_msg_reception() {\n    tbb::flow::graph g;\n    tbb::flow::limiter_node<int> ln(g,2);\n    tbb::flow::queue_node<int>   qn(g);\n    tbb::flow::make_edge(ln, qn);\n    ln.decrementer().try_put(tbb::flow::continue_msg());\n    ln.try_put(42);\n    g.wait_for_all();\n    int outint;\n    CHECK_MESSAGE( (qn.try_get(outint) && outint == 42), \"initial put to decrement stops node\");\n}\n\n\n//\n// This test ascertains that if a message is not successfully put\n// to a successor, the message is not dropped but released.\n//\n\nvoid test_reserve_release_messages() {\n    using namespace tbb::flow;\n    graph g;\n\n    //making two queue_nodes: one broadcast_node and one limiter_node\n    queue_node<int> input_queue(g);\n    queue_node<int> output_queue(g);\n    broadcast_node<int> broad(g);\n    limiter_node<int, int> limit(g,2); //threshold of 2\n\n    //edges\n    make_edge(input_queue, limit);\n    make_edge(limit, output_queue);\n    make_edge(broad,limit.decrementer());\n\n    int list[4] = {19, 33, 72, 98}; //list to be put to the input queue\n\n    input_queue.try_put(list[0]); // succeeds\n    input_queue.try_put(list[1]); // succeeds\n    input_queue.try_put(list[2]); // fails, stored in upstream buffer\n    g.wait_for_all();\n\n    remove_edge(limit, output_queue); //remove successor\n\n    //sending message to the decrement port of the limiter\n    broad.try_put(1); //failed message retrieved.\n    g.wait_for_all();\n\n    tbb::flow::make_edge(limit, output_queue); //putting the successor back\n\n    broad.try_put(1);  //drop the count\n\n    input_queue.try_put(list[3]);  //success\n    g.wait_for_all();\n\n    int var=0;\n\n    for (int i=0; i<4; i++) {\n        output_queue.try_get(var);\n        CHECK_MESSAGE( (var==list[i]), \"some data dropped, input does not match output\");\n        g.wait_for_all();\n    }\n}\n\nvoid test_decrementer() {\n    const int threshold = 5;\n    tbb::flow::graph g;\n    tbb::flow::limiter_node<int, int> limit(g, threshold);\n    tbb::flow::queue_node<int> queue(g);\n    make_edge(limit, queue);\n    int m = 0;\n    CHECK_MESSAGE( ( limit.try_put( m++ )), \"Newly constructed limiter node does not accept message.\" );\n    CHECK_MESSAGE( limit.decrementer().try_put( -threshold ), // close limiter's gate\n                   \"Limiter node decrementer's port does not accept message.\" );\n    CHECK_MESSAGE( ( !limit.try_put( m++ )), \"Closed limiter node's accepts message.\" );\n    CHECK_MESSAGE( limit.decrementer().try_put( threshold + 5 ),  // open limiter's gate\n                   \"Limiter node decrementer's port does not accept message.\" );\n    for( int i = 0; i < threshold; ++i )\n        CHECK_MESSAGE( ( limit.try_put( m++ )), \"Limiter node does not accept message while open.\" );\n    CHECK_MESSAGE( ( !limit.try_put( m )), \"Limiter node's gate is not closed.\" );\n    g.wait_for_all();\n    int expected[] = {0, 2, 3, 4, 5, 6};\n    int actual = -1; m = 0;\n    while( queue.try_get(actual) )\n        CHECK_MESSAGE( actual == expected[m++], \"\" );\n    CHECK_MESSAGE( ( sizeof(expected) / sizeof(expected[0]) == m), \"Not all messages have been processed.\" );\n    g.wait_for_all();\n\n    const size_t threshold2 = size_t(-1);\n    tbb::flow::limiter_node<int, long long> limit2(g, threshold2);\n    make_edge(limit2, queue);\n    CHECK_MESSAGE( ( limit2.try_put( 1 )), \"Newly constructed limiter node does not accept message.\" );\n    long long decrement_value = (long long)( size_t(-1)/2 );\n    CHECK_MESSAGE( limit2.decrementer().try_put( -decrement_value ),\n                   \"Limiter node decrementer's port does not accept message\" );\n    CHECK_MESSAGE( ( limit2.try_put( 2 )), \"Limiter's gate should not be closed yet.\" );\n    CHECK_MESSAGE( limit2.decrementer().try_put( -decrement_value ),\n                   \"Limiter node decrementer's port does not accept message\" );\n    CHECK_MESSAGE( ( !limit2.try_put( 3 )), \"Overflow happened for internal counter.\" );\n    int expected2[] = {1, 2};\n    actual = -1; m = 0;\n    while( queue.try_get(actual) )\n        CHECK_MESSAGE( actual == expected2[m++], \"\" );\n    CHECK_MESSAGE( ( sizeof(expected2) / sizeof(expected2[0]) == m), \"Not all messages have been processed.\" );\n    g.wait_for_all();\n\n    const size_t threshold3 = 10;\n    tbb::flow::limiter_node<int, long long> limit3(g, threshold3);\n    make_edge(limit3, queue);\n    long long decrement_value3 = 3;\n    CHECK_MESSAGE( limit3.decrementer().try_put( -decrement_value3 ),\n                   \"Limiter node decrementer's port does not accept message\" );\n\n    m = 0;\n    while( limit3.try_put( m ) ){ m++; };\n    CHECK_MESSAGE( m == threshold3 - decrement_value3, \"Not all messages have been accepted.\" );\n\n    actual = -1; m = 0;\n    while( queue.try_get(actual) ){\n        CHECK_MESSAGE( actual == m++, \"Not all messages have been processed.\" );\n    }\n\n    g.wait_for_all();\n    CHECK_MESSAGE( m == threshold3 - decrement_value3, \"Not all messages have been processed.\" );\n}\n\nvoid test_try_put_without_successors() {\n    tbb::flow::graph g;\n    int try_put_num{3};\n    tbb::flow::buffer_node<int> bn(g);\n    tbb::flow::limiter_node<int> ln(g, try_put_num);\n\n    tbb::flow::make_edge(bn, ln);\n\n    int i = 1;\n    for (; i <= try_put_num; i++)\n        bn.try_put(i);\n\n    std::atomic<int> counter{0};\n    tbb::flow::function_node<int, int> fn(g, tbb::flow::unlimited,\n        [&](int input) {\n            counter += input;\n            return int{};\n        }\n    );\n\n    tbb::flow::make_edge(ln, fn);\n\n    g.wait_for_all();\n    CHECK((counter == i * try_put_num / 2));\n\n    // Check the lost message\n    tbb::flow::remove_edge(bn, ln);\n    ln.decrementer().try_put(tbb::flow::continue_msg());\n    bn.try_put(try_put_num + 1);\n    g.wait_for_all();\n    CHECK((counter == i * try_put_num / 2));\n\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n#include <array>\n#include <vector>\nvoid test_follows_and_precedes_api() {\n    using msg_t = tbb::flow::continue_msg;\n\n    std::array<msg_t, 3> messages_for_follows= { {msg_t(), msg_t(), msg_t()} };\n    std::vector<msg_t> messages_for_precedes = {msg_t()};\n\n    follows_and_precedes_testing::test_follows\n        <msg_t, tbb::flow::limiter_node<msg_t, msg_t>>(messages_for_follows, 1000);\n    follows_and_precedes_testing::test_precedes\n        <msg_t, tbb::flow::limiter_node<msg_t, msg_t>>(messages_for_precedes, 1000);\n\n}\n#endif\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\nvoid test_deduction_guides() {\n    using namespace tbb::flow;\n\n    graph g;\n    broadcast_node<int> br(g);\n    limiter_node<int> l0(g, 100);\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    limiter_node l1(follows(br), 100);\n    static_assert(std::is_same_v<decltype(l1), limiter_node<int>>);\n\n    limiter_node l2(precedes(br), 100);\n    static_assert(std::is_same_v<decltype(l2), limiter_node<int>>);\n#endif\n\n    limiter_node l3(l0);\n    static_assert(std::is_same_v<decltype(l3), limiter_node<int>>);\n}\n#endif\n\nvoid test_decrement_while_try_put_task() {\n    constexpr int threshold = 50000;\n\n    tbb::flow::graph graph{};\n    std::atomic<int> processed;\n    tbb::flow::input_node<int> input{ graph, [&](tbb::flow_control & fc) -> int {\n        static int i = {};\n        if (i++ >= threshold) fc.stop();\n        return i;\n    }};\n    tbb::flow::limiter_node<int, int> blockingNode{ graph, 1 };\n    tbb::flow::multifunction_node<int, std::tuple<int>> processing{ graph, tbb::flow::serial,\n        [&](const int & value, typename decltype(processing)::output_ports_type & out) {\n            if (value != threshold)\n                std::get<0>(out).try_put(1);\n            processed.store(value);\n        }};\n\n    tbb::flow::make_edge(input, blockingNode);\n    tbb::flow::make_edge(blockingNode, processing);\n    tbb::flow::make_edge(processing, blockingNode.decrementer());\n\n    input.activate();\n\n    graph.wait_for_all();\n    CHECK_MESSAGE(processed.load() == threshold, \"decrementer terminate flow graph work\");\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\nvoid test_try_put_and_wait() {\n    tbb::task_arena arena(1);\n\n    arena.execute([] {\n        tbb::flow::graph g;\n\n        std::vector<int> start_work_items;\n        std::vector<int> processed_items;\n        std::vector<int> new_work_items;\n        int wait_message = 10;\n\n        for (int i = 0; i < wait_message; ++i) {\n            start_work_items.emplace_back(i);\n            new_work_items.emplace_back(i + 1 + wait_message);\n        }\n\n        std::size_t threshold = start_work_items.size() + 1;\n        CHECK_MESSAGE(new_work_items.size() < threshold, \"Incorrect test setup\");\n\n        tbb::flow::limiter_node<int> limiter(g, threshold);\n        tbb::flow::function_node<int, tbb::flow::continue_msg> function(g, tbb::flow::serial,\n            [&](int input) {\n                if (input == wait_message) {\n                    for (auto item : new_work_items) {\n                        limiter.try_put(item);\n                    }\n                }\n                processed_items.emplace_back(input);\n            });\n\n        tbb::flow::make_edge(limiter, function);\n        tbb::flow::make_edge(function, limiter.decrementer());\n\n        for (auto item : start_work_items) {\n            limiter.try_put(item);\n        }\n\n        limiter.try_put_and_wait(wait_message);\n\n        // Since function is a serial queueing function_node, all start_work_items would be added to the queue\n        // and processed in FIFO order. wait_message would be added and processed last. Each item in start_work_items\n        // should put an item to a decrementer edge and hence new_work_items should not be missed as well\n\n        std::size_t check_index = 0;\n\n        for (auto item : start_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item, \"Unexpected start_work_items processing\");\n        }\n        CHECK_MESSAGE(processed_items[check_index++] == wait_message, \"Unexpected wait_message processing\");\n        CHECK_MESSAGE(check_index == processed_items.size(), \"Unexpected number of messages\");\n\n        g.wait_for_all();\n\n        for (auto item : new_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item, \"Unexpected new_work_items processing\");\n        }\n        CHECK(check_index == processed_items.size());\n    });\n}\n#endif\n\n//! Test puts on limiter_node with decrements and varying parallelism levels\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Serial and parallel tests\") {\n    for (unsigned i = 1; i <= 2 * utils::MaxThread; ++i) {\n        tbb::task_arena arena(i);\n        arena.execute(\n            [i]() {\n                test_serial<int>();\n                test_parallel<int>(i);\n            }\n        );\n    }\n}\n\n//! Test initial put of continue_msg on decrementer port does not stop message flow\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test continue_msg reception\") {\n    test_continue_msg_reception();\n}\n\n//! Test put message on decrementer port does not stop message flow\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test try_put to decrementer while try_put to limiter_node\") {\n    test_decrement_while_try_put_task();\n}\n\n//! Test multifunction_node connected to limiter_node\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Multifunction connected to limiter\") {\n    test_multifunction_to_limiter(30,3);\n    test_multifunction_to_limiter(300,13);\n    test_multifunction_to_limiter(3000,1);\n}\n\n//! Test message release if successor doesn't accept\n//! \\brief \\ref requirement\nTEST_CASE(\"Message is released if successor does not accept\") {\n    test_reserve_release_messages();\n}\n\n//! Test decrementer\n//! \\brief \\ref requirement \\ref error_guessing\nTEST_CASE(\"Decrementer\") {\n    test_decrementer();\n}\n\n//! Test try_put() without successor\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test try_put() without successors\") {\n    test_try_put_without_successors();\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n//! Test follows and precedes API\n//! \\brief \\ref error_guessing\nTEST_CASE( \"Support for follows and precedes API\" ) {\n    test_follows_and_precedes_api();\n}\n#endif\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Test deduction guides\n//! \\brief \\ref requirement\nTEST_CASE( \"Deduction guides\" ) {\n    test_deduction_guides();\n}\n#endif\n\nstruct TestLargeStruct {\n    char bytes[512]{ 0 };\n};\n\n//! Test correct node deallocation while using small_object_pool.\n//! (see https://github.com/oneapi-src/oneTBB/issues/639)\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test correct node deallocation while using small_object_pool\") {\n    tbb::flow::graph graph;\n    tbb::flow::queue_node<TestLargeStruct> input_node( graph );\n    tbb::flow::function_node<TestLargeStruct> func( graph, tbb::flow::serial,\n        [](const TestLargeStruct& input) { return input; } );\n\n    tbb::flow::make_edge( input_node, func );\n    CHECK( input_node.try_put( TestLargeStruct{} ) );\n    graph.wait_for_all();\n\n    tbb::task_scheduler_handle handle{ tbb::attach{} };\n    tbb::finalize( handle, std::nothrow );\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test limiter_node try_put_and_wait\") {\n    test_try_put_and_wait();\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_multifunction_node.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"common/config.h\"\n\n#include \"tbb/flow_graph.h\"\n#include \"tbb/spin_rw_mutex.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/graph_utils.h\"\n#include \"common/test_follows_and_precedes_api.h\"\n#include \"common/concepts_common.h\"\n\n\n//! \\file test_multifunction_node.cpp\n//! \\brief Test for [flow_graph.multifunction_node] specification\n\n\n#if TBB_USE_DEBUG\n#define N 16\n#else\n#define N 100\n#endif\n#define MAX_NODES 4\n\n//! Performs test on function nodes with limited concurrency and buffering\n/** These tests check:\n    1) that the number of executing copies never exceed the concurrency limit\n    2) that the node never rejects\n    3) that no items are lost\n    and 4) all of this happens even if there are multiple predecessors and successors\n*/\n\n//! exercise buffered multifunction_node.\ntemplate< typename InputType, typename OutputTuple, typename Body >\nvoid buffered_levels( size_t concurrency, Body body ) {\n    typedef typename std::tuple_element<0,OutputTuple>::type OutputType;\n    // Do for lc = 1 to concurrency level\n    for ( size_t lc = 1; lc <= concurrency; ++lc ) {\n        tbb::flow::graph g;\n\n        // Set the execute_counter back to zero in the harness\n        harness_graph_multifunction_executor<InputType, OutputTuple>::execute_count = 0;\n        // Set the number of current executors to zero.\n        harness_graph_multifunction_executor<InputType, OutputTuple>::current_executors = 0;\n        // Set the max allowed executors to lc.  There is a check in the functor to make sure this is never exceeded.\n        harness_graph_multifunction_executor<InputType, OutputTuple>::max_executors = lc;\n\n        // Create the function_node with the appropriate concurrency level, and use default buffering\n        tbb::flow::multifunction_node< InputType, OutputTuple > exe_node( g, lc, body );\n\n        //Create a vector of identical exe_nodes\n        std::vector< tbb::flow::multifunction_node< InputType, OutputTuple > > exe_vec(2, exe_node);\n\n        // exercise each of the copied nodes\n        for (size_t node_idx=0; node_idx<exe_vec.size(); ++node_idx) {\n            for (size_t num_receivers = 1; num_receivers <= MAX_NODES; ++num_receivers ) {\n                // Create num_receivers counting receivers and connect the exe_vec[node_idx] to them.\n                std::vector< std::shared_ptr<harness_mapped_receiver<OutputType>> > receivers;\n                for (size_t i = 0; i < num_receivers; i++) {\n                    receivers.push_back( std::make_shared<harness_mapped_receiver<OutputType>>(g) );\n                }\n\n                for (size_t r = 0; r < num_receivers; ++r ) {\n                    tbb::flow::make_edge( tbb::flow::output_port<0>(exe_vec[node_idx]), *receivers[r] );\n                }\n\n                // Do the test with varying numbers of senders\n                std::vector< std::shared_ptr<harness_counting_sender<InputType>> > senders;\n                for (size_t num_senders = 1; num_senders <= MAX_NODES; ++num_senders ) {\n                    // Create num_senders senders, set their message limit each to N, and connect\n                    // them to the exe_vec[node_idx]\n                    senders.clear();\n                    for (size_t s = 0; s < num_senders; ++s ) {\n                        senders.push_back( std::make_shared<harness_counting_sender<InputType>>() );\n                        senders.back()->my_limit = N;\n                        tbb::flow::make_edge( *senders.back(), exe_vec[node_idx] );\n                    }\n\n                    // Initialize the receivers so they know how many senders and messages to check for\n                    for (size_t r = 0; r < num_receivers; ++r ) {\n                        receivers[r]->initialize_map( N, num_senders );\n                    }\n\n                    // Do the test\n                    utils::NativeParallelFor( (int)num_senders, parallel_put_until_limit<InputType>(senders) );\n                    g.wait_for_all();\n\n                    // confirm that each sender was requested from N times\n                    for (size_t s = 0; s < num_senders; ++s ) {\n                        size_t n = senders[s]->my_received;\n                        CHECK_MESSAGE( n == N, \"\" );\n                        CHECK_MESSAGE( senders[s]->my_receiver.load(std::memory_order_relaxed) == &exe_vec[node_idx], \"\" );\n                    }\n                    // validate the receivers\n                    for (size_t r = 0; r < num_receivers; ++r ) {\n                        receivers[r]->validate();\n                    }\n                }\n                for (size_t r = 0; r < num_receivers; ++r ) {\n                    tbb::flow::remove_edge( tbb::flow::output_port<0>(exe_vec[node_idx]), *receivers[r] );\n                }\n                CHECK_MESSAGE( exe_vec[node_idx].try_put( InputType() ) == true, \"\" );\n                g.wait_for_all();\n                for (size_t r = 0; r < num_receivers; ++r ) {\n                    // since it's detached, nothing should have changed\n                    receivers[r]->validate();\n                }\n            }\n        }\n    }\n}\n\nconst size_t Offset = 123;\nstd::atomic<size_t> global_execute_count;\n\nstruct inc_functor {\n\n    std::atomic<size_t> local_execute_count;\n    inc_functor( ) { local_execute_count = 0; }\n    inc_functor( const inc_functor &f ) { local_execute_count = size_t(f.local_execute_count); }\n\n    template<typename output_ports_type>\n    void operator()( int i, output_ports_type &p ) {\n       ++global_execute_count;\n       ++local_execute_count;\n       (void)std::get<0>(p).try_put(i);\n    }\n\n};\n\ntemplate< typename InputType, typename OutputTuple >\nvoid buffered_levels_with_copy( size_t concurrency ) {\n    typedef typename std::tuple_element<0,OutputTuple>::type OutputType;\n    // Do for lc = 1 to concurrency level\n    for ( size_t lc = 1; lc <= concurrency; ++lc ) {\n        tbb::flow::graph g;\n\n        inc_functor cf;\n        cf.local_execute_count = Offset;\n        global_execute_count = Offset;\n\n        tbb::flow::multifunction_node< InputType, OutputTuple > exe_node( g, lc, cf );\n\n        for (size_t num_receivers = 1; num_receivers <= MAX_NODES; ++num_receivers ) {\n\n            std::vector< std::shared_ptr<harness_mapped_receiver<OutputType>> > receivers;\n            for (size_t i = 0; i < num_receivers; i++) {\n                receivers.push_back( std::make_shared<harness_mapped_receiver<OutputType>>(g) );\n            }\n\n            for (size_t r = 0; r < num_receivers; ++r ) {\n               tbb::flow::make_edge( tbb::flow::output_port<0>(exe_node), *receivers[r] );\n            }\n\n            std::vector< std::shared_ptr<harness_counting_sender<InputType>> > senders;\n            for (size_t num_senders = 1; num_senders <= MAX_NODES; ++num_senders ) {\n                senders.clear();\n                for (size_t s = 0; s < num_senders; ++s ) {\n                    senders.push_back( std::make_shared<harness_counting_sender<InputType>>() );\n                    senders.back()->my_limit = N;\n                    tbb::flow::make_edge( *senders.back(), exe_node );\n                }\n\n                for (size_t r = 0; r < num_receivers; ++r ) {\n                    receivers[r]->initialize_map( N, num_senders );\n                }\n\n                utils::NativeParallelFor( (int)num_senders, parallel_put_until_limit<InputType>(senders) );\n                g.wait_for_all();\n\n                for (size_t s = 0; s < num_senders; ++s ) {\n                    size_t n = senders[s]->my_received;\n                    CHECK_MESSAGE( n == N, \"\" );\n                    CHECK_MESSAGE( senders[s]->my_receiver.load(std::memory_order_relaxed) == &exe_node, \"\" );\n                }\n                for (size_t r = 0; r < num_receivers; ++r ) {\n                    receivers[r]->validate();\n                }\n            }\n            for (size_t r = 0; r < num_receivers; ++r ) {\n                tbb::flow::remove_edge( tbb::flow::output_port<0>(exe_node), *receivers[r] );\n            }\n            CHECK_MESSAGE( exe_node.try_put( InputType() ) == true, \"\" );\n            g.wait_for_all();\n            for (size_t r = 0; r < num_receivers; ++r ) {\n                receivers[r]->validate();\n            }\n        }\n\n        // validate that the local body matches the global execute_count and both are correct\n        inc_functor body_copy = tbb::flow::copy_body<inc_functor>( exe_node );\n        const size_t expected_count = N/2 * MAX_NODES * MAX_NODES * ( MAX_NODES + 1 ) + MAX_NODES + Offset;\n        size_t global_count = global_execute_count;\n        size_t inc_count = body_copy.local_execute_count;\n        CHECK_MESSAGE( (global_count == expected_count && global_count == inc_count), \"\" );\n    }\n}\n\ntemplate< typename InputType, typename OutputTuple >\nvoid run_buffered_levels( int c ) {\n    typedef typename tbb::flow::multifunction_node<InputType,OutputTuple>::output_ports_type output_ports_type;\n    buffered_levels<InputType,OutputTuple>( c, []( InputType i, output_ports_type &p ) { harness_graph_multifunction_executor<InputType, OutputTuple>::func(i,p); } );\n    buffered_levels<InputType,OutputTuple>( c, &harness_graph_multifunction_executor<InputType, OutputTuple>::func );\n    buffered_levels<InputType,OutputTuple>( c, typename harness_graph_multifunction_executor<InputType, OutputTuple>::functor() );\n    buffered_levels_with_copy<InputType,OutputTuple>( c );\n}\n\n\n//! Performs test on executable nodes with limited concurrency\n/** These tests check:\n    1) that the nodes will accepts puts up to the concurrency limit,\n    2) the nodes do not exceed the concurrency limit even when run with more threads (this is checked in the harness_graph_executor),\n    3) the nodes will receive puts from multiple successors simultaneously,\n    and 4) the nodes will send to multiple predecessors.\n    There is no checking of the contents of the messages for corruption.\n*/\n\ntemplate< typename InputType, typename OutputTuple, typename Body >\nvoid concurrency_levels( size_t concurrency, Body body ) {\n    typedef typename std::tuple_element<0,OutputTuple>::type OutputType;\n    for ( size_t lc = 1; lc <= concurrency; ++lc ) {\n        tbb::flow::graph g;\n\n        // Set the execute_counter back to zero in the harness\n        harness_graph_multifunction_executor<InputType, OutputTuple>::execute_count = 0;\n        // Set the number of current executors to zero.\n        harness_graph_multifunction_executor<InputType, OutputTuple>::current_executors = 0;\n        // Set the max allowed executors to lc.  There is a check in the functor to make sure this is never exceeded.\n        harness_graph_multifunction_executor<InputType, OutputTuple>::max_executors = lc;\n\n\n        tbb::flow::multifunction_node< InputType, OutputTuple, tbb::flow::rejecting > exe_node( g, lc, body );\n\n        for (size_t num_receivers = 1; num_receivers <= MAX_NODES; ++num_receivers ) {\n\n            std::vector< std::shared_ptr<harness_counting_receiver<OutputType>> > receivers;\n            for (size_t i = 0; i < num_receivers; ++i) {\n                receivers.push_back( std::make_shared<harness_counting_receiver<OutputType>>(g) );\n            }\n\n            for (size_t r = 0; r < num_receivers; ++r ) {\n                tbb::flow::make_edge( tbb::flow::output_port<0>(exe_node), *receivers[r] );\n            }\n\n            std::vector< std::shared_ptr<harness_counting_sender<InputType>> > senders;\n\n            for (size_t num_senders = 1; num_senders <= MAX_NODES; ++num_senders ) {\n                {\n                    // Exclusively lock m to prevent exe_node from finishing\n                    tbb::spin_rw_mutex::scoped_lock l(\n                        harness_graph_multifunction_executor< InputType, OutputTuple>::template mutex_holder<tbb::spin_rw_mutex>::mutex\n                    );\n\n                    // put to lc level, it will accept and then block at m\n                    for ( size_t c = 0 ; c < lc ; ++c ) {\n                        CHECK_MESSAGE( exe_node.try_put( InputType() ) == true, \"\" );\n                    }\n                    // it only accepts to lc level\n                    CHECK_MESSAGE( exe_node.try_put( InputType() ) == false, \"\" );\n\n                    senders.clear();\n                    for (size_t s = 0; s < num_senders; ++s ) {\n                        senders.push_back( std::make_shared<harness_counting_sender<InputType>>() );\n                        senders.back()->my_limit = N;\n                        exe_node.register_predecessor( *senders.back() );\n                    }\n\n                } // release lock at end of scope, setting the exe node free to continue\n                // wait for graph to settle down\n                g.wait_for_all();\n\n                // confirm that each sender was requested from N times\n                for (size_t s = 0; s < num_senders; ++s ) {\n                    size_t n = senders[s]->my_received;\n                    CHECK_MESSAGE( n == N, \"\" );\n                    CHECK_MESSAGE( senders[s]->my_receiver.load(std::memory_order_relaxed) == &exe_node, \"\" );\n                }\n                // confirm that each receivers got N * num_senders + the initial lc puts\n                for (size_t r = 0; r < num_receivers; ++r ) {\n                    size_t n = receivers[r]->my_count;\n                    CHECK_MESSAGE( n == num_senders*N+lc, \"\" );\n                    receivers[r]->my_count = 0;\n                }\n            }\n            for (size_t r = 0; r < num_receivers; ++r ) {\n                tbb::flow::remove_edge( tbb::flow::output_port<0>(exe_node), *receivers[r] );\n            }\n            CHECK_MESSAGE( exe_node.try_put( InputType() ) == true, \"\" );\n            g.wait_for_all();\n            for (size_t r = 0; r < num_receivers; ++r ) {\n                CHECK_MESSAGE( int(receivers[r]->my_count) == 0, \"\" );\n            }\n        }\n    }\n}\n\ntemplate< typename InputType, typename OutputTuple >\nvoid run_concurrency_levels( int c ) {\n    typedef typename tbb::flow::multifunction_node<InputType,OutputTuple>::output_ports_type output_ports_type;\n    concurrency_levels<InputType,OutputTuple>( c, []( InputType i, output_ports_type &p ) { harness_graph_multifunction_executor<InputType, OutputTuple>::template tfunc<tbb::spin_rw_mutex>(i,p); } );\n    concurrency_levels<InputType,OutputTuple>( c, &harness_graph_multifunction_executor<InputType, OutputTuple>::template tfunc<tbb::spin_rw_mutex> );\n    concurrency_levels<InputType,OutputTuple>( c, typename harness_graph_multifunction_executor<InputType, OutputTuple>::template tfunctor<tbb::spin_rw_mutex>() );\n}\n\n\nstruct empty_no_assign {\n   empty_no_assign() {}\n   empty_no_assign( int ) {}\n   operator int() { return 0; }\n   operator int() const { return 0; }\n};\n\ntemplate< typename InputType >\nstruct parallel_puts : private utils::NoAssign {\n\n    tbb::flow::receiver< InputType > * const my_exe_node;\n\n    parallel_puts( tbb::flow::receiver< InputType > &exe_node ) : my_exe_node(&exe_node) {}\n\n    void operator()( int ) const  {\n        for ( int i = 0; i < N; ++i ) {\n            // the nodes will accept all puts\n            CHECK_MESSAGE( my_exe_node->try_put( InputType() ) == true, \"\" );\n        }\n    }\n\n};\n\n//! Performs test on executable nodes with unlimited concurrency\n/** These tests check:\n    1) that the nodes will accept all puts\n    2) the nodes will receive puts from multiple predecessors simultaneously,\n    and 3) the nodes will send to multiple successors.\n    There is no checking of the contents of the messages for corruption.\n*/\n\ntemplate< typename InputType, typename OutputTuple, typename Body >\nvoid unlimited_concurrency( Body body ) {\n    typedef typename std::tuple_element<0,OutputTuple>::type OutputType;\n\n    for (unsigned int p = 1; p < 2*utils::MaxThread; ++p) {\n        tbb::flow::graph g;\n        tbb::flow::multifunction_node< InputType, OutputTuple, tbb::flow::rejecting > exe_node( g, tbb::flow::unlimited, body );\n\n        for (size_t num_receivers = 1; num_receivers <= MAX_NODES; ++num_receivers ) {\n            std::vector< std::shared_ptr<harness_counting_receiver<OutputType>> > receivers;\n            for (size_t i = 0; i < num_receivers; ++i) {\n                receivers.push_back( std::make_shared<harness_counting_receiver<OutputType>>(g) );\n            }\n\n            harness_graph_multifunction_executor<InputType, OutputTuple>::execute_count = 0;\n\n            for (size_t r = 0; r < num_receivers; ++r ) {\n                tbb::flow::make_edge( tbb::flow::output_port<0>(exe_node), *receivers[r] );\n            }\n\n            utils::NativeParallelFor( p, parallel_puts<InputType>(exe_node) );\n            g.wait_for_all();\n\n            // 2) the nodes will receive puts from multiple predecessors simultaneously,\n            size_t ec = harness_graph_multifunction_executor<InputType, OutputTuple>::execute_count;\n            CHECK_MESSAGE( (unsigned int)ec == p*N, \"\" );\n            for (size_t r = 0; r < num_receivers; ++r ) {\n                size_t c = receivers[r]->my_count;\n                // 3) the nodes will send to multiple successors.\n                CHECK_MESSAGE( (unsigned int)c == p*N, \"\" );\n            }\n            for (size_t r = 0; r < num_receivers; ++r ) {\n                tbb::flow::remove_edge( tbb::flow::output_port<0>(exe_node), *receivers[r] );\n            }\n        }\n    }\n}\n\ntemplate< typename InputType, typename OutputTuple >\nvoid run_unlimited_concurrency() {\n    harness_graph_multifunction_executor<InputType, OutputTuple>::max_executors = 0;\n    typedef typename tbb::flow::multifunction_node<InputType,OutputTuple>::output_ports_type output_ports_type;\n    unlimited_concurrency<InputType,OutputTuple>( []( InputType i, output_ports_type &p ) { harness_graph_multifunction_executor<InputType, OutputTuple>::func(i,p); } );\n    unlimited_concurrency<InputType,OutputTuple>( &harness_graph_multifunction_executor<InputType, OutputTuple>::func );\n    unlimited_concurrency<InputType,OutputTuple>( typename harness_graph_multifunction_executor<InputType, OutputTuple>::functor() );\n}\n\ntemplate<typename InputType, typename OutputTuple>\nstruct oddEvenBody {\n    typedef typename tbb::flow::multifunction_node<InputType,OutputTuple>::output_ports_type output_ports_type;\n    typedef typename std::tuple_element<0,OutputTuple>::type EvenType;\n    typedef typename std::tuple_element<1,OutputTuple>::type OddType;\n    void operator() (const InputType &i, output_ports_type &p) {\n        if((int)i % 2) {\n            (void)std::get<1>(p).try_put(OddType(i));\n        }\n        else {\n            (void)std::get<0>(p).try_put(EvenType(i));\n        }\n    }\n};\n\ntemplate<typename InputType, typename OutputTuple >\nvoid run_multiport_test(int num_threads) {\n    typedef typename tbb::flow::multifunction_node<InputType, OutputTuple> mo_node_type;\n    typedef typename std::tuple_element<0,OutputTuple>::type EvenType;\n    typedef typename std::tuple_element<1,OutputTuple>::type OddType;\n    tbb::task_arena arena(num_threads);\n    arena.execute(\n        [&] () {\n            tbb::flow::graph g;\n            mo_node_type mo_node(g, tbb::flow::unlimited, oddEvenBody<InputType, OutputTuple>() );\n\n            tbb::flow::queue_node<EvenType> q0(g);\n            tbb::flow::queue_node<OddType> q1(g);\n\n            tbb::flow::make_edge(tbb::flow::output_port<0>(mo_node), q0);\n            tbb::flow::make_edge(tbb::flow::output_port<1>(mo_node), q1);\n\n            for(InputType i = 0; i < N; ++i) {\n                mo_node.try_put(i);\n            }\n\n            g.wait_for_all();\n            for(int i = 0; i < N/2; ++i) {\n                EvenType e{};\n                OddType o{};\n                CHECK_MESSAGE( q0.try_get(e), \"\" );\n                CHECK_MESSAGE( (int)e % 2 == 0, \"\" );\n                CHECK_MESSAGE( q1.try_get(o), \"\" );\n                CHECK_MESSAGE( (int)o % 2 == 1, \"\" );\n            }\n        }\n    );\n}\n\n//! Tests limited concurrency cases for nodes that accept data messages\nvoid test_concurrency(int num_threads) {\n    tbb::task_arena arena(num_threads);\n    arena.execute(\n        [&] () {\n            run_concurrency_levels<int,std::tuple<int> >(num_threads);\n            run_concurrency_levels<int,std::tuple<tbb::flow::continue_msg> >(num_threads);\n            run_buffered_levels<int, std::tuple<int> >(num_threads);\n            run_unlimited_concurrency<int, std::tuple<int> >();\n            run_unlimited_concurrency<int,std::tuple<empty_no_assign> >();\n            run_unlimited_concurrency<empty_no_assign,std::tuple<int> >();\n            run_unlimited_concurrency<empty_no_assign,std::tuple<empty_no_assign> >();\n            run_unlimited_concurrency<int,std::tuple<tbb::flow::continue_msg> >();\n            run_unlimited_concurrency<empty_no_assign,std::tuple<tbb::flow::continue_msg> >();\n            run_multiport_test<int, std::tuple<int, int> >(num_threads);\n            run_multiport_test<float, std::tuple<int, double> >(num_threads);\n        }\n    );\n}\n\ntemplate<typename Policy>\nvoid test_ports_return_references() {\n    tbb::flow::graph g;\n    typedef int InputType;\n    typedef std::tuple<int> OutputTuple;\n    tbb::flow::multifunction_node<InputType, OutputTuple, Policy> mf_node(\n        g, tbb::flow::unlimited,\n        &harness_graph_multifunction_executor<InputType, OutputTuple>::empty_func );\n    test_output_ports_return_ref(mf_node);\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n#include <array>\n#include <vector>\n\nvoid test_precedes() {\n    using namespace tbb::flow;\n\n    using multinode = multifunction_node<int, std::tuple<int, int>>;\n\n    graph g;\n\n    buffer_node<int> b1(g);\n    buffer_node<int> b2(g);\n\n    multinode node(precedes(b1, b2), unlimited, [](const int& i, multinode::output_ports_type& op) -> void {\n            if (i % 2)\n                std::get<0>(op).try_put(i);\n            else\n                std::get<1>(op).try_put(i);\n        }\n    );\n\n    node.try_put(0);\n    node.try_put(1);\n    g.wait_for_all();\n\n    int storage;\n    CHECK_MESSAGE((b1.try_get(storage) && !b1.try_get(storage) && b2.try_get(storage) && !b2.try_get(storage)),\n            \"Not exact edge quantity was made\");\n}\n\nvoid test_follows_and_precedes_api() {\n    using multinode = tbb::flow::multifunction_node<int, std::tuple<int, int, int>>;\n\n    std::array<int, 3> messages_for_follows = { {0, 1, 2} };\n\n    follows_and_precedes_testing::test_follows\n        <int, tbb::flow::multifunction_node<int, std::tuple<int, int, int>>>\n        (messages_for_follows, tbb::flow::unlimited, [](const int& i, multinode::output_ports_type& op) -> void {\n            std::get<0>(op).try_put(i);\n        });\n\n    test_precedes();\n}\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n\n//! Test various node bodies with concurrency\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Concurrency test\"){\n    for( unsigned int p=utils::MinThread; p<=utils::MaxThread; ++p ) {\n       test_concurrency(p);\n    }\n}\n\n//! Test return types of ports\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test ports retrurn references\"){\n    test_ports_return_references<tbb::flow::queueing>();\n    test_ports_return_references<tbb::flow::rejecting>();\n}\n\n//! NativeParallelFor testing with various concurrency settings\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Lightweight testing\"){\n    lightweight_testing::test<tbb::flow::multifunction_node>(10);\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n//! Test follows and precedes API\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test follows-precedes API\"){\n    test_follows_and_precedes_api();\n}\n//! Test priority constructor with follows and precedes API\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test priority with follows and precedes\"){\n    using namespace tbb::flow;\n\n    using multinode = multifunction_node<int, std::tuple<int, int>>;\n\n    graph g;\n\n    buffer_node<int> b1(g);\n    buffer_node<int> b2(g);\n\n    multinode node(precedes(b1, b2), unlimited, [](const int& i, multinode::output_ports_type& op) -> void {\n            if (i % 2)\n                std::get<0>(op).try_put(i);\n            else\n                std::get<1>(op).try_put(i);\n        }\n        , node_priority_t(0));\n\n    node.try_put(0);\n    node.try_put(1);\n    g.wait_for_all();\n\n    int storage;\n    CHECK_MESSAGE((b1.try_get(storage) && !b1.try_get(storage) && b2.try_get(storage) && !b2.try_get(storage)),\n            \"Not exact edge quantity was made\");\n}\n\n#endif\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"constraints for multifunction_node input\") {\n    struct InputObject {\n        InputObject() = default;\n        InputObject( const InputObject& ) = default;\n    };\n\n    static_assert(utils::well_formed_instantiation<tbb::flow::multifunction_node, InputObject, int>);\n    static_assert(utils::well_formed_instantiation<tbb::flow::multifunction_node, int, int>);\n    static_assert(!utils::well_formed_instantiation<tbb::flow::multifunction_node, test_concepts::NonCopyable, int>);\n    static_assert(!utils::well_formed_instantiation<tbb::flow::multifunction_node, test_concepts::NonDefaultInitializable, int>);\n}\n\ntemplate <typename Input, typename Output, typename Body>\nconcept can_call_multifunction_node_ctor = requires( tbb::flow::graph& graph, std::size_t concurrency, Body body,\n                                                     tbb::flow::node_priority_t priority, tbb::flow::buffer_node<int>& f ) {\n    tbb::flow::multifunction_node<Input, Output>(graph, concurrency, body);\n    tbb::flow::multifunction_node<Input, Output>(graph, concurrency, body, priority);\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    tbb::flow::multifunction_node<Input, Output>(tbb::flow::follows(f), concurrency, body);\n    tbb::flow::multifunction_node<Input, Output>(tbb::flow::follows(f), concurrency, body, priority);\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n};\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"constraints for multifunction_node body\") {\n    using input_type = int;\n    using output_type = std::tuple<int>;\n    using namespace test_concepts::multifunction_node_body;\n\n    static_assert(can_call_multifunction_node_ctor<input_type, output_type, Correct<input_type, output_type>>);\n    static_assert(!can_call_multifunction_node_ctor<input_type, output_type, NonCopyable<input_type, output_type>>);\n    static_assert(!can_call_multifunction_node_ctor<input_type, output_type, NonDestructible<input_type, output_type>>);\n    static_assert(!can_call_multifunction_node_ctor<input_type, output_type, NoOperatorRoundBrackets<input_type, output_type>>);\n    static_assert(!can_call_multifunction_node_ctor<input_type, output_type, WrongFirstInputOperatorRoundBrackets<input_type, output_type>>);\n    static_assert(!can_call_multifunction_node_ctor<input_type, output_type, WrongSecondInputOperatorRoundBrackets<input_type, output_type>>);\n}\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_mutex.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"test_mutex.h\"\n\n#include <tbb/spin_mutex.h>\n#include \"oneapi/tbb/mutex.h\"\n#include <tbb/spin_rw_mutex.h>\n#include \"oneapi/tbb/rw_mutex.h\"\n#include <tbb/queuing_mutex.h>\n#include <tbb/queuing_rw_mutex.h>\n#include <tbb/null_mutex.h>\n#include <tbb/null_rw_mutex.h>\n#include <tbb/parallel_for.h>\n#include <oneapi/tbb/detail/_utils.h>\n#include <oneapi/tbb/detail/_machine.h>\n\n//! \\file test_mutex.cpp\n//! \\brief Test for [mutex.spin_mutex mutex.spin_rw_mutex mutex.queuing_mutex mutex.queuing_rw_mutex mutex.mutex mutex.rw_mutex mutex.speculative_spin_mutex mutex.speculative_spin_rw_mutex] specifications\n\n// TODO: Investigate why RTM doesn't work on some macOS.\n// TODO: Consider adding Thread Sanitizer (note that accesses inside the transaction\n// considered as races by Thread Sanitizer)\n#if __TBB_TSX_INTRINSICS_PRESENT && !__APPLE__ && !__TBB_USE_THREAD_SANITIZER\n\ninline static bool IsInsideTx() {\n    return _xtest() != 0;\n}\n\nbool have_TSX() {\n    bool result = false;\n    const int rtm_ebx_mask = 1 << 11;\n#if _MSC_VER\n    int info[4] = { 0,0,0,0 };\n    const int reg_ebx = 1;\n    __cpuidex(info, 7, 0);\n    result = (info[reg_ebx] & rtm_ebx_mask) != 0;\n#elif __GNUC__ || __SUNPRO_CC\n    int32_t reg_ebx = 0;\n    int32_t reg_eax = 7;\n    int32_t reg_ecx = 0;\n    __asm__ __volatile__(\"movl %%ebx, %%esi\\n\"\n        \"cpuid\\n\"\n        \"movl %%ebx, %0\\n\"\n        \"movl %%esi, %%ebx\\n\"\n        : \"=a\"(reg_ebx) : \"0\" (reg_eax), \"c\" (reg_ecx) : \"esi\",\n#if __TBB_x86_64\n        \"ebx\",\n#endif\n        \"edx\"\n    );\n    result = (reg_ebx & rtm_ebx_mask) != 0;\n#endif\n    return result;\n}\n\n//! Function object for use with parallel_for.h to see if a transaction is actually attempted.\nstd::atomic<std::size_t> n_transactions_attempted;\ntemplate<typename C>\nstruct AddOne_CheckTransaction {\n\n    AddOne_CheckTransaction& operator=(const AddOne_CheckTransaction&) = delete;\n    AddOne_CheckTransaction(const AddOne_CheckTransaction&) = default;\n    AddOne_CheckTransaction() = default;\n\n    C& counter;\n    /** Increments counter once for each iteration in the iteration space. */\n    void operator()(tbb::blocked_range<size_t>& range) const {\n        for (std::size_t i = range.begin(); i != range.end(); ++i) {\n            bool transaction_attempted = false;\n            {\n                typename C::mutex_type::scoped_lock lock(counter.mutex);\n                if (IsInsideTx()) transaction_attempted = true;\n                counter.value = counter.value + 1;\n            }\n            if (transaction_attempted) ++n_transactions_attempted;\n            tbb::detail::machine_pause(static_cast<int32_t>(i));\n        }\n    }\n    AddOne_CheckTransaction(C& counter_) : counter(counter_) {}\n};\n\n/* TestTransaction() checks if a speculative mutex actually uses transactions. */\ntemplate<typename M>\nvoid TestTransaction(const char* name)\n{\n    utils::Counter<M> counter;\n    constexpr int n = 550;\n\n    n_transactions_attempted = 0;\n    for (int i = 0; i < 5 && n_transactions_attempted.load(std::memory_order_relaxed) == 0; ++i) {\n        counter.value = 0;\n        tbb::parallel_for(tbb::blocked_range<std::size_t>(0, n, 2), AddOne_CheckTransaction<utils::Counter<M>>(counter));\n        REQUIRE(counter.value == n);\n    }\n    REQUIRE_MESSAGE(n_transactions_attempted.load(std::memory_order_relaxed), \"ERROR for \" << name << \": transactions were never attempted\");\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Transaction test\") {\n    if (have_TSX()) {\n        TestTransaction<tbb::speculative_spin_mutex>(\"Speculative Spin Mutex\");\n        TestTransaction<tbb::speculative_spin_rw_mutex>(\"Speculative Spin RW Mutex\");\n    }\n}\n#endif /* __TBB_TSX_TESTING_ENABLED_FOR_THIS_COMPILER */\n\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test upgrade/downgrade with spin_rw_mutex\") {\n    test_rwm_upgrade_downgrade<tbb::spin_rw_mutex>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test upgrade/downgrade with queueing_rw_mutex\") {\n    test_rwm_upgrade_downgrade<tbb::queuing_rw_mutex>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test upgrade/downgrade with rw_mutex\") {\n    test_rwm_upgrade_downgrade<tbb::rw_mutex>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test upgrade/downgrade with speculative_spin_rw_mutex\") {\n    test_rwm_upgrade_downgrade<tbb::speculative_spin_rw_mutex>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test spin_mutex with native threads\") {\n    test_with_native_threads::test<tbb::spin_mutex>();\n}\n\n#if !EMSCRIPTEN\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test queuing_mutex with native threads\") {\n    test_with_native_threads::test<tbb::queuing_mutex>();\n}\n#endif\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test mutex with native threads\") {\n    test_with_native_threads::test<tbb::mutex>();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test spin_rw_mutex with native threads\") {\n    test_with_native_threads::test<tbb::spin_rw_mutex>();\n    test_with_native_threads::test_rw<tbb::spin_rw_mutex>();\n}\n\n#if !EMSCRIPTEN\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test queuing_rw_mutex with native threads\") {\n    test_with_native_threads::test<tbb::queuing_rw_mutex>();\n    test_with_native_threads::test_rw<tbb::queuing_rw_mutex>();\n}\n#endif\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test rw_mutex with native threads\") {\n    test_with_native_threads::test<tbb::rw_mutex>();\n    test_with_native_threads::test_rw<tbb::rw_mutex>();\n}\n\n//! Test scoped_lock::is_writer getter\n//! \\brief \\ref error_guessing\nTEST_CASE(\"scoped_lock::is_writer\") {\n    TestIsWriter<oneapi::tbb::spin_rw_mutex>(\"spin_rw_mutex\");\n    TestIsWriter<oneapi::tbb::queuing_rw_mutex>(\"queuing_rw_mutex\");\n    TestIsWriter<oneapi::tbb::speculative_spin_rw_mutex>(\"speculative_spin_rw_mutex\");\n    TestIsWriter<oneapi::tbb::null_rw_mutex>(\"null_rw_mutex\");\n    TestIsWriter<oneapi::tbb::rw_mutex>(\"rw_mutex\");\n}\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\ntemplate <typename... Args>\nconcept mutexes = (... && tbb::detail::scoped_lockable<Args>);\n\ntemplate <typename... Args>\nconcept rw_mutexes = (... && tbb::detail::rw_scoped_lockable<Args>);\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"internal mutex concepts\") {\n    static_assert(mutexes<tbb::spin_mutex, oneapi::tbb::mutex, tbb::speculative_spin_mutex, tbb::null_mutex, tbb::queuing_mutex,\n                          tbb::spin_rw_mutex, oneapi::tbb::rw_mutex, tbb::speculative_spin_rw_mutex, tbb::null_rw_mutex, tbb::queuing_rw_mutex>);\n    static_assert(rw_mutexes<tbb::spin_rw_mutex, oneapi::tbb::rw_mutex, tbb::speculative_spin_rw_mutex,\n                             tbb::null_rw_mutex, tbb::queuing_rw_mutex>);\n}\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_mutex.h",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_concurrency_limit.h\"\n#include \"common/config.h\"\n#include \"common/rwm_upgrade_downgrade.h\"\n#include \"common/concepts_common.h\"\n#include <tbb/null_rw_mutex.h>\n\n#include <atomic>\n\nnamespace test_with_native_threads {\n\ntemplate <typename M>\nstruct Counter {\n    using mutex_type = M;\n\n    M mutex;\n    long value;\n\n    void flog_once( std::size_t mode ) {\n        // Increments counter once for each iteration in the iteration space\n        if (mode & 1) {\n            // Try implicit acquire and explicit release\n            typename mutex_type::scoped_lock lock(mutex);\n            value += 1;\n            lock.release();\n        } else {\n            // Try explicit acquire and implicit release\n            typename mutex_type::scoped_lock lock;\n            lock.acquire(mutex);\n            value += 1;\n        }\n    }\n}; // struct Counter\n\ntemplate <typename M, long N>\nstruct Invariant {\n    using mutex_type = M;\n\n    M mutex;\n    long value[N];\n\n    Invariant() {\n        for (long k = 0; k < N; ++k) {\n            value[k] = 0;\n        }\n    }\n\n    void update() {\n        for (long k = 0; k < N; ++k) {\n            ++value[k];\n        }\n    }\n\n    bool value_is( long expected_value ) const {\n        long tmp;\n\n        for (long k = 0; k < N; ++k) {\n            if ((tmp = value[k]) != expected_value) {\n                return false;\n            }\n        }\n        return true;\n    }\n\n    bool is_okay() {\n        return value_is(value[0]);\n    }\n\n    void flog_once( std::size_t mode ) {\n        // Every 8th access is a write access\n        bool write = (mode % 8) == 7;\n        bool okay = true;\n        bool lock_kept = true;\n\n        if ((mode / 8) & 1) {\n            // Try implicit acquire and explicit release\n            typename mutex_type::scoped_lock lock(mutex, write);\n            if (write) {\n                long my_value = value[0];\n                update();\n                if (mode % 16 == 7) {\n                    lock_kept = lock.downgrade_to_reader();\n                    if (!lock_kept) {\n                        my_value = value[0] - 1;\n                    }\n                    okay = value_is(my_value + 1);\n                }\n            } else {\n                okay = is_okay();\n                if (mode % 8 == 3) {\n                    long my_value = value[0];\n                    lock_kept = lock.upgrade_to_writer();\n                    if (!lock_kept) {\n                        my_value = value[0];\n                    }\n                    update();\n                    okay = value_is(my_value + 1);\n                }\n            }\n            lock.release();\n        } else {\n            // Try explicit acquire and implicit release\n            typename mutex_type::scoped_lock lock;\n            lock.acquire(mutex, write);\n            if (write) {\n                long my_value = value[0];\n                update();\n                if (mode % 16 == 7) {\n                    lock_kept = lock.downgrade_to_reader();\n                    if (!lock_kept) {\n                        my_value = value[0] - 1;\n                    }\n                    okay = value_is(my_value + 1);\n                }\n            } else {\n                okay = is_okay();\n                if (mode % 8 == 3) {\n                    long my_value = value[0];\n                    lock_kept = lock.upgrade_to_writer();\n                    if (!lock_kept) {\n                        my_value = value[0];\n                    }\n                    update();\n                    okay = value_is(my_value + 1);\n                }\n            }\n        }\n        REQUIRE(okay);\n    }\n}; // struct Invariant\n\nstatic std::atomic<std::size_t> Order;\n\ntemplate <typename State, long TestSize>\nstruct Work : utils::NoAssign {\n    static constexpr std::size_t chunk = 100;\n    State& state;\n\n    Work( State& st ) : state(st){ Order = 0; }\n\n    void operator()(std::size_t) const {\n        std::size_t step;\n        while( (step = Order.fetch_add(chunk, std::memory_order_acquire)) < TestSize ) {\n            for (std::size_t i = 0; i < chunk && step < TestSize; ++i, ++step) {\n                state.flog_once(step);\n            }\n        }\n    }\n}; // struct Work\n\nconstexpr std::size_t TEST_SIZE = 100000;\n\ntemplate <typename M>\nvoid test_basic( std::size_t nthread ) {\n    Counter<M> counter;\n    counter.value = 0;\n    Order = 0;\n    utils::NativeParallelFor(nthread, Work<Counter<M>, TEST_SIZE>(counter));\n\n    REQUIRE(counter.value == TEST_SIZE);\n}\n\ntemplate <typename M>\nvoid test_rw_basic( std::size_t nthread ) {\n    Invariant<M, 8> invariant;\n    Order = 0;\n    // use the macro because of a gcc 4.6 issue\n    utils::NativeParallelFor(nthread, Work<Invariant<M, 8>, TEST_SIZE>(invariant));\n    // There is either a writer or a reader upgraded to a writer for each 4th iteration\n    long expected_value = TEST_SIZE / 4;\n    REQUIRE(invariant.value_is(expected_value));\n}\n\ntemplate <typename M>\nvoid test() {\n    for (std::size_t p : utils::concurrency_range()) {\n        test_basic<M>(p);\n    }\n}\n\ntemplate <typename M>\nvoid test_rw() {\n    for (std::size_t p : utils::concurrency_range()) {\n        test_rw_basic<M>(p);\n    }\n}\n\n} // namespace test_with_native_threads\n\ntemplate <typename RWMutexType>\nvoid TestIsWriter(const char* mutex_name) {\n    using scoped_lock = typename RWMutexType::scoped_lock;\n\n    RWMutexType rw_mutex;\n    std::string error_message_writer = std::string(mutex_name) + \"::scoped_lock is not acquired for write, is_writer should return false\";\n    std::string error_message_not_writer = std::string(mutex_name) + \"::scoped_lock is acquired for write, is_writer should return true\";\n    // Test is_writer after construction\n    {\n        scoped_lock lock(rw_mutex, /*writer = */false);\n        CHECK_MESSAGE(!lock.is_writer(), error_message_writer);\n    }\n    {\n        scoped_lock lock(rw_mutex, /*writer = */true);\n        CHECK_MESSAGE(lock.is_writer(), error_message_not_writer);\n    }\n    // Test is_writer after acquire\n    {\n        scoped_lock lock;\n        lock.acquire(rw_mutex, /*writer = */false);\n        CHECK_MESSAGE(!lock.is_writer(), error_message_writer);\n    }\n    {\n        scoped_lock lock;\n        lock.acquire(rw_mutex, /*writer = */true);\n        CHECK_MESSAGE(lock.is_writer(), error_message_not_writer);\n    }\n    // Test is_writer on upgrade/downgrade\n    {\n        scoped_lock lock(rw_mutex, /*writer = */false);\n        lock.upgrade_to_writer();\n        CHECK_MESSAGE(lock.is_writer(), error_message_not_writer);\n        lock.downgrade_to_reader();\n        CHECK_MESSAGE(!lock.is_writer(), error_message_writer);\n    }\n}\n\ntemplate <>\nvoid TestIsWriter<oneapi::tbb::null_rw_mutex>( const char* ) {\n    using scoped_lock = typename oneapi::tbb::null_rw_mutex::scoped_lock;\n\n    oneapi::tbb::null_rw_mutex nrw_mutex;\n    scoped_lock l(nrw_mutex);\n    CHECK(l.is_writer());\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_numa_dist.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n\n#if !__TBB_WIN8UI_SUPPORT\n\n#include <stdio.h>\n#include \"tbb/parallel_for.h\"\n#include \"tbb/global_control.h\"\n#include \"tbb/enumerable_thread_specific.h\"\n\n#include \"common/config.h\"\n#include \"common/utils.h\"\n#include \"common/utils_concurrency_limit.h\"\n#include \"common/utils_report.h\"\n#include \"common/vector_types.h\"\n#include \"common/cpu_usertime.h\"\n#include \"common/spin_barrier.h\"\n#include \"common/exception_handling.h\"\n#include \"common/concepts_common.h\"\n#include \"test_partitioner.h\"\n\n#include <cstddef>\n#include <vector>\n\n//! \\file test_numa_dist.cpp\n//! \\brief Test for [internal] functionality\n#if _MSC_VER\n#pragma warning (push)\n// Suppress conditional expression is constant\n#pragma warning (disable: 4127)\n#if __TBB_MSVC_UNREACHABLE_CODE_IGNORED\n    // Suppress pointless \"unreachable code\" warning.\n    #pragma warning (disable: 4702)\n#endif\n#if defined(_Wp64)\n    // Workaround for overzealous compiler warnings in /Wp64 mode\n    #pragma warning (disable: 4267)\n#endif\n#define _SCL_SECURE_NO_WARNINGS\n#endif //#if _MSC_VER\n\n\nstruct numa {\n    WORD processorGroupCount;\n    std::vector<DWORD> numaProcessors;\n    DWORD maxProcessors;\n    numa() : processorGroupCount(GetMaximumProcessorGroupCount()), maxProcessors(GetActiveProcessorCount(ALL_PROCESSOR_GROUPS)){   \n        numaProcessors.resize(processorGroupCount);\n       for (WORD i = 0; i < processorGroupCount; i++) {\n            this->numaProcessors[i] = GetActiveProcessorCount((i));\n        }        \n    }\n};\n\n\nint TestNumaDistribution(std::vector<DWORD> &validateProcgrp, int additionalParallelism, bool allThreads){\n    validateProcgrp.resize(GetMaximumProcessorGroupCount());\n    PROCESSOR_NUMBER proc;\n    struct numa nodes;\n    GetThreadIdealProcessorEx(GetCurrentThread(), &proc);\n    int master_thread_proc_grp = proc.Group;\n    int requested_parallelism;\n    if (allThreads) \n        requested_parallelism = additionalParallelism;\n    else \n        requested_parallelism = nodes.numaProcessors.at(master_thread_proc_grp) + additionalParallelism;\n    tbb::global_control global_limit(oneapi::tbb::global_control::max_allowed_parallelism, 1024);\n    tbb::enumerable_thread_specific< std::pair<int, int> > tls;\n    tbb::enumerable_thread_specific< double > tls_dummy;\n    tbb::static_partitioner s;\n  \n    utils::SpinBarrier sb(requested_parallelism);\n    oneapi::tbb::task_arena limited(requested_parallelism);\n    limited.execute([&]() {\n\n        tbb::parallel_for(0, requested_parallelism, [&](int)\n            {                    \n                PROCESSOR_NUMBER proc;\n                if (GetThreadIdealProcessorEx(GetCurrentThread(), &proc))\n                {\n                    tls.local() = std::pair<int, int>(proc.Group, proc.Number);\n                    sb.wait();\n                }\n            }, s);\n        for (const auto& it : tls) {\n           validateProcgrp[it.first]++;\n        }\n      });\n    \n\n    return master_thread_proc_grp;\n}\n\n//! Testing Numa Thread Distribution Stability\n//! \\brief \\ref stress\nTEST_CASE(\"Numa stability for the same node\") {\n    numa example;\n    std::vector<DWORD> validateProcgrp;\n    \n    int numaGrp = TestNumaDistribution(validateProcgrp,0, 0);\n    std::vector<DWORD> result(GetMaximumProcessorGroupCount(), 0);\n    result[numaGrp] = example.numaProcessors[numaGrp];\n    REQUIRE(validateProcgrp == result);\n}\n\n//! Testing Numa Thread Distribution Overflow\n//! \\brief \\ref stress\nTEST_CASE(\"Numa overflow\") {\n    numa example;\n    std::vector<DWORD> validateProcgrp;\n    \n    int numaGrp = TestNumaDistribution(validateProcgrp, 1, 0);\n    std::vector<DWORD> result(GetMaximumProcessorGroupCount(), 0);\n    if (example.processorGroupCount <= 1) { // for single Numa node\n       result[numaGrp] = example.numaProcessors[numaGrp] + 1;\n    } else {\n       result[numaGrp] = example.numaProcessors[numaGrp];\n       result[(numaGrp+1)% GetMaximumProcessorGroupCount()] = 1;\n    }\n    REQUIRE(validateProcgrp == result);\n}\n\n//! Testing Numa Thread Distribution Maximum\n//! \\brief \\ref stress\nTEST_CASE(\"Numa all threads\") {\n    numa example;\n    std::vector<DWORD> validateProcgrp;\n    TestNumaDistribution(validateProcgrp, example.maxProcessors, 1);\n    REQUIRE(validateProcgrp == example.numaProcessors);\n}\n\n//! Testing Numa Thread Distribution Doubled Max\n//! \\brief \\ref stress\nTEST_CASE(\"Double threads\") {\n    numa example;\n    std::vector<DWORD> validateProcgrp;\n    std::vector<DWORD> result(example.numaProcessors.size(), 0);\n    for (size_t i = 0; i < example.numaProcessors.size(); i++) result[i] = 2 * example.numaProcessors[i];\n    TestNumaDistribution(validateProcgrp, example.maxProcessors * 2, 1);\n    REQUIRE(validateProcgrp == result);\n}\n\n#if _MSC_VER\n#pragma warning (pop)\n#endif\n\n#endif // !__TBB_WIN8UI_SUPPORT\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_openmp.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_openmp.cpp\n//! \\brief Test for [internal] functionality\n\n#if _WIN32 || _WIN64\n#define _CRT_SECURE_NO_WARNINGS\n#endif\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_env.h\"\n#include \"tbb/global_control.h\"\n#include \"tbb/blocked_range.h\"\n#include \"tbb/parallel_for.h\"\n#include \"tbb/parallel_reduce.h\"\n\n// Test mixing OpenMP and TBB\n#include <omp.h>\n\nusing data_type = short;\n\nvoid SerialConvolve( data_type c[], const data_type a[], int m, const data_type b[], int n ) {\n    for (int i = 0; i < m + n - 1; ++i) {\n        int start = i < n ? 0 : i - n + 1;\n        int finish = i < m ? i + 1 : m;\n        data_type sum = 0;\n        for (int j = start; j < finish; ++j)\n            sum += a[j] * b[i - j];\n        c[i] = sum;\n    }\n}\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    // Suppress overzealous warning about short+=short\n    #pragma warning( push )\n    #pragma warning( disable: 4244 )\n#endif\n\nclass InnerBody: utils::NoAssign {\n    const data_type* my_a;\n    const data_type* my_b;\n    const int i;\npublic:\n    data_type sum;\n    InnerBody( data_type /*c*/[], const data_type a[], const data_type b[], int ii ) :\n        my_a(a), my_b(b), i(ii), sum(0)\n    {}\n    InnerBody( InnerBody& x, tbb::split ) :\n        my_a(x.my_a), my_b(x.my_b), i(x.i), sum(0)\n    {\n    }\n    void join( InnerBody& x ) { sum += x.sum; }\n    void operator()( const tbb::blocked_range<int>& range ) {\n        for (int j = range.begin(); j != range.end(); ++j)\n            sum += my_a[j] * my_b[i - j];\n    }\n};\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n    #pragma warning( pop )\n#endif\n\n//! Test OpenMP loop around TBB loop\nvoid OpenMP_TBB_Convolve( data_type c[], const data_type a[], int m, const data_type b[], int n, int p ) {\n    utils::suppress_unused_warning(p);\n#pragma omp parallel num_threads(p)\n    {\n#pragma omp for\n        for (int i = 0; i < m + n - 1; ++i) {\n            int start = i < n ? 0 : i - n + 1;\n            int finish = i < m ? i + 1 : m;\n            InnerBody body(c, a, b, i);\n            tbb::parallel_reduce(tbb::blocked_range<int>(start, finish, 10), body);\n            c[i] = body.sum;\n        }\n    }\n}\n\nclass OuterBody: utils::NoAssign {\n    const data_type* my_a;\n    const data_type* my_b;\n    data_type* my_c;\n    const int m;\n    const int n;\n#if __clang__ && !__INTEL_COMPILER\n    #pragma clang diagnostic push\n    #pragma clang diagnostic ignored \"-Wunused-private-field\"\n#endif\n    const int p;\n#if __clang__ && !__INTEL_COMPILER\n    #pragma clang diagnostic pop // \"-Wunused-private-field\"\n#endif\npublic:\n    OuterBody( data_type c[], const data_type a[], int m_, const data_type b[], int n_, int p_ ) :\n        my_a(a), my_b(b), my_c(c), m(m_), n(n_), p(p_)\n    {}\n    void operator()( const tbb::blocked_range<int>& range ) const {\n        for (int i = range.begin(); i != range.end(); ++i) {\n            int start = i < n ? 0 : i - n + 1;\n            int finish = i < m ? i + 1 : m;\n            data_type sum = 0;\n#pragma omp parallel for reduction(+:sum) num_threads(p)\n            for (int j = start; j < finish; ++j)\n                sum += my_a[j] * my_b[i - j];\n            my_c[i] = sum;\n        }\n    }\n};\n\n//! Test TBB loop around OpenMP loop\nvoid TBB_OpenMP_Convolve( data_type c[], const data_type a[], int m, const data_type b[], int n, int p ) {\n    tbb::parallel_for(tbb::blocked_range<int>(0, m + n - 1, 10), OuterBody(c, a, m, b, n, p));\n}\n\n#if __INTEL_COMPILER\nvoid TestNumThreads() {\n    utils::SetEnv(\"KMP_AFFINITY\", \"compact\");\n    // Make an OpenMP call before initializing TBB\n    int omp_nthreads = omp_get_max_threads();\n    #pragma omp parallel\n    {}\n    int tbb_nthreads = tbb::this_task_arena::max_concurrency();\n    // For the purpose of testing, assume that OpenMP and TBB should utilize the same # of threads.\n    // If it's not true on some platforms, the test will need to be adjusted.\n    REQUIRE_MESSAGE(tbb_nthreads == omp_nthreads, \"Initialization of TBB is possibly affected by OpenMP\");\n}\n#endif // __INTEL_COMPILER\n\nconst int M = 17 * 17;\nconst int N = 13 * 13;\ndata_type A[M], B[N];\ndata_type expected[M+N], actual[M+N];\n\ntemplate <class Func>\nvoid RunTest( Func F, int m, int n, int p) {\n    tbb::global_control limit(tbb::global_control::max_allowed_parallelism, p);\n    memset(actual, -1, (m + n) * sizeof(data_type));\n    F(actual, A, m, B, n, p);\n    CHECK(memcmp(actual, expected, (m + n - 1) * sizeof(data_type)) == 0);\n}\n\n// Disable it because OpenMP isn't instrumented that leads to false positive\n#if !__TBB_USE_THREAD_SANITIZER\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Testing oneTBB with OpenMP\") {\n#if __INTEL_COMPILER\n    TestNumThreads(); // Testing initialization-related behavior; must be the first\n#endif // __INTEL_COMPILER\n    for (int p = static_cast<int>(utils::MinThread); p <= static_cast<int>(utils::MaxThread); ++p) {\n        for (int m = 1; m <= M; m *= 17) {\n            for (int n = 1; n <= N; n *= 13) {\n                for (int i = 0; i < m; ++i) A[i] = data_type(1 + i / 5);\n                for (int i = 0; i < n; ++i) B[i] = data_type(1 + i / 7);\n                SerialConvolve( expected, A, m, B, n );\n                RunTest( OpenMP_TBB_Convolve, m, n, p );\n                RunTest( TBB_OpenMP_Convolve, m, n, p );\n            }\n        }\n    }\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_overwrite_node.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/config.h\"\n\n#include \"tbb/flow_graph.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_assert.h\"\n#include \"common/graph_utils.h\"\n#include \"common/test_follows_and_precedes_api.h\"\n\n#include \"test_buffering_try_put_and_wait.h\"\n\n//! \\file test_overwrite_node.cpp\n//! \\brief Test for [flow_graph.overwrite_node] specification\n\n\n#define N 300\n#define T 4\n#define M 5\n\ntemplate< typename R >\nvoid simple_read_write_tests() {\n    tbb::flow::graph g;\n    tbb::flow::overwrite_node<R> n(g);\n\n    for ( int t = 0; t < T; ++t ) {\n        R v0(N+1);\n        std::vector< std::shared_ptr<harness_counting_receiver<R>> > r;\n        for (size_t i = 0; i < M; ++i) {\n            r.push_back( std::make_shared<harness_counting_receiver<R>>(g) );\n        }\n\n        CHECK_MESSAGE( n.is_valid() == false, \"\" );\n        CHECK_MESSAGE( n.try_get( v0 ) == false, \"\" );\n        if ( t % 2 ) {\n            CHECK_MESSAGE( n.try_put( static_cast<R>(N) ), \"\" );\n            CHECK_MESSAGE( n.is_valid() == true, \"\" );\n            CHECK_MESSAGE( n.try_get( v0 ) == true, \"\" );\n            CHECK_MESSAGE( v0 == R(N), \"\" );\n        }\n\n        for (int i = 0; i < M; ++i) {\n            tbb::flow::make_edge( n, *r[i] );\n        }\n\n        for (int i = 0; i < N; ++i ) {\n            R v1(static_cast<R>(i));\n            CHECK_MESSAGE( n.try_put( v1 ), \"\" );\n            CHECK_MESSAGE( n.is_valid() == true, \"\" );\n            for (int j = 0; j < N; ++j ) {\n                R v2(0);\n                CHECK_MESSAGE( n.try_get( v2 ), \"\" );\n                CHECK_MESSAGE( v1 == v2, \"\" );\n            }\n        }\n        for (int i = 0; i < M; ++i) {\n            size_t c = r[i]->my_count;\n            CHECK_MESSAGE( int(c) == N+t%2, \"\" );\n        }\n        for (int i = 0; i < M; ++i) {\n            tbb::flow::remove_edge( n, *r[i] );\n        }\n        CHECK_MESSAGE( n.try_put( R(0) ), \"\" );\n        for (int i = 0; i < M; ++i) {\n            size_t c = r[i]->my_count;\n            CHECK_MESSAGE( int(c) == N+t%2, \"\" );\n        }\n        n.clear();\n        CHECK_MESSAGE( n.is_valid() == false, \"\" );\n        CHECK_MESSAGE( n.try_get( v0 ) == false, \"\" );\n    }\n}\n\ntemplate< typename R >\nclass native_body : utils::NoAssign {\n    tbb::flow::overwrite_node<R> &my_node;\n\npublic:\n\n    native_body( tbb::flow::overwrite_node<R> &n ) : my_node(n) {}\n\n    void operator()( int i ) const {\n        R v1(static_cast<R>(i));\n        CHECK_MESSAGE( my_node.try_put( v1 ), \"\" );\n        CHECK_MESSAGE( my_node.is_valid() == true, \"\" );\n    }\n};\n\ntemplate< typename R >\nvoid parallel_read_write_tests() {\n    tbb::flow::graph g;\n    tbb::flow::overwrite_node<R> n(g);\n    //Create a vector of identical nodes\n    std::vector< tbb::flow::overwrite_node<R> > ow_vec(2, n);\n\n    for (size_t node_idx=0; node_idx<ow_vec.size(); ++node_idx) {\n        for ( int t = 0; t < T; ++t ) {\n            std::vector< std::shared_ptr<harness_counting_receiver<R>> > r;\n            for (size_t i = 0; i < M; ++i) {\n                r.push_back( std::make_shared<harness_counting_receiver<R>>(g) );\n            }\n\n            for (int i = 0; i < M; ++i) {\n                tbb::flow::make_edge( ow_vec[node_idx], *r[i] );\n            }\n            R v0;\n            CHECK_MESSAGE( ow_vec[node_idx].is_valid() == false, \"\" );\n            CHECK_MESSAGE( ow_vec[node_idx].try_get( v0 ) == false, \"\" );\n\n#if TBB_TEST_LOW_WORKLOAD\n            const int nthreads = 30;\n#else\n            const int nthreads = N;\n#endif\n            utils::NativeParallelFor( nthreads, native_body<R>( ow_vec[node_idx] ) );\n\n            for (int i = 0; i < M; ++i) {\n                size_t c = r[i]->my_count;\n                CHECK_MESSAGE( int(c) == nthreads, \"\" );\n            }\n            for (int i = 0; i < M; ++i) {\n                tbb::flow::remove_edge( ow_vec[node_idx], *r[i] );\n            }\n            CHECK_MESSAGE( ow_vec[node_idx].try_put( R(0) ), \"\" );\n            for (int i = 0; i < M; ++i) {\n                size_t c = r[i]->my_count;\n                CHECK_MESSAGE( int(c) == nthreads, \"\" );\n            }\n            ow_vec[node_idx].clear();\n            CHECK_MESSAGE( ow_vec[node_idx].is_valid() == false, \"\" );\n            CHECK_MESSAGE( ow_vec[node_idx].try_get( v0 ) == false, \"\" );\n        }\n    }\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n#include <array>\n#include <vector>\nvoid test_follows_and_precedes_api() {\n    using msg_t = tbb::flow::continue_msg;\n\n    std::array<msg_t, 3> messages_for_follows = { {msg_t(), msg_t(), msg_t()} };\n    std::vector<msg_t> messages_for_precedes = {msg_t()};\n\n    follows_and_precedes_testing::test_follows<msg_t, tbb::flow::overwrite_node<msg_t>>(messages_for_follows);\n    follows_and_precedes_testing::test_precedes<msg_t, tbb::flow::overwrite_node<msg_t>>(messages_for_precedes);\n}\n#endif\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\nvoid test_deduction_guides() {\n    using namespace tbb::flow;\n\n    graph g;\n    broadcast_node<int> b1(g);\n    overwrite_node<int> o0(g);\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    overwrite_node o1(follows(b1));\n    static_assert(std::is_same_v<decltype(o1), overwrite_node<int>>);\n\n    overwrite_node o2(precedes(b1));\n    static_assert(std::is_same_v<decltype(o2), overwrite_node<int>>);\n#endif\n\n    overwrite_node o3(o0);\n    static_assert(std::is_same_v<decltype(o3), overwrite_node<int>>);\n}\n#endif\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\nvoid test_overwrite_node_try_put_and_wait() {\n    using namespace test_try_put_and_wait;\n\n    std::vector<int> start_work_items;\n    std::vector<int> new_work_items;\n    int wait_message = 10;\n\n    for (int i = 0; i < wait_message; ++i) {\n        start_work_items.emplace_back(i);\n        new_work_items.emplace_back(i + 1 + wait_message);\n    }\n\n    // Test push\n    {\n        std::vector<int> processed_items;\n\n        // Returns the index from which wait_for_all processing started\n        std::size_t after_start = test_buffer_push<tbb::flow::overwrite_node<int>>(start_work_items, wait_message,\n                                                                                   new_work_items, processed_items);\n\n        // It is expected that try_put_and_wait would process start_work_items (FIFO) and the wait_message\n        // and new_work_items (FIFO) would be processed in wait_for_all\n\n        CHECK_MESSAGE(after_start - 1 == start_work_items.size() + 1,\n                      \"incorrect number of items processed by try_put_and_wait\");\n        std::size_t check_index = 0;\n        for (auto item : start_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item, \"unexpected start_work_items processing\");\n        }\n        CHECK_MESSAGE(processed_items[check_index++] == wait_message, \"unexpected wait_message processing\");\n        for (auto item : new_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item, \"unexpected new_work_items processing\");\n        }\n    }\n    // Test pull\n    {\n        tbb::task_arena arena(1);\n\n        arena.execute([&] {\n            std::vector<int> processed_items;\n\n            tbb::flow::graph g;\n            tbb::flow::overwrite_node<int> buffer(g);\n            int start_message = 0;\n            int new_message = 1;\n\n            using function_node_type = tbb::flow::function_node<int, int, tbb::flow::rejecting>;\n\n            function_node_type function(g, tbb::flow::serial,\n                [&](int input) {\n                    if (input == wait_message) {\n                        buffer.try_put(new_message);\n                    }\n\n                    // Explicitly clean the buffer to prevent infinite try_get by the function_node\n                    if (input == new_message) {\n                        buffer.clear();\n                    }\n\n                    processed_items.emplace_back(input);\n                    return 0;\n                });\n\n            tbb::flow::make_edge(buffer, function);\n\n            buffer.try_put(start_message); // Occupies concurrency of function\n\n            buffer.try_put_and_wait(wait_message);\n\n            CHECK_MESSAGE(processed_items.size() == 2, \"only the start_message and wait_message should be processed\");\n            std::size_t check_index = 0;\n            CHECK_MESSAGE(processed_items[check_index++] == start_message, \"unexpected start_message processing\");\n            CHECK_MESSAGE(processed_items[check_index++] == wait_message, \"unexpected wait_message processing\");\n\n            g.wait_for_all();\n\n            CHECK_MESSAGE(processed_items[check_index++] == new_message, \"unexpected new_message processing\");\n            CHECK(check_index == processed_items.size());\n        });\n    }\n    // Test reserve\n    {\n        tbb::task_arena arena(1);\n\n        arena.execute([&] {\n            std::vector<int> processed_items;\n\n            tbb::flow::graph g;\n            tbb::flow::overwrite_node<int> buffer(g);\n            tbb::flow::limiter_node<int, int> limiter(g, 1);\n            int start_message = 0;\n            int new_message = 1;\n\n            using function_node_type = tbb::flow::function_node<int, int, tbb::flow::rejecting>;\n\n            function_node_type function(g, tbb::flow::serial,\n                [&](int input) {\n                    if (input == wait_message) {\n                        buffer.try_put(new_message);\n                    }\n\n                    // Explicitly clean the buffer to prevent infinite try_get by the function_node\n                    if (input == new_message) {\n                        buffer.clear();\n                    }\n\n                    processed_items.emplace_back(input);\n                    limiter.decrementer().try_put(1);\n                    return 0;\n                });\n\n            tbb::flow::make_edge(buffer, limiter);\n            tbb::flow::make_edge(limiter, function);\n\n            buffer.try_put(start_message); // Occupies concurrency of function\n\n            buffer.try_put_and_wait(wait_message);\n\n            CHECK_MESSAGE(processed_items.size() == 2, \"only the start_message and wait_message should be processed\");\n            std::size_t check_index = 0;\n            CHECK_MESSAGE(processed_items[check_index++] == start_message, \"unexpected start_message processing\");\n            CHECK_MESSAGE(processed_items[check_index++] == wait_message, \"unexpected wait_message processing\");\n\n            g.wait_for_all();\n\n            CHECK_MESSAGE(processed_items[check_index++] == new_message, \"unexpected new_message processing\");\n            CHECK(check_index == processed_items.size());\n        });\n    }\n    // Test explicit clear\n    {\n        tbb::flow::graph g;\n        tbb::flow::overwrite_node<int> buffer(g);\n\n        std::vector<int> processed_items;\n\n        tbb::flow::function_node<int, int> f(g, tbb::flow::serial,\n            [&](int input) {\n                processed_items.emplace_back(input);\n                buffer.clear();\n                return 0;\n            });\n\n        tbb::flow::make_edge(buffer, f);\n\n        buffer.try_put_and_wait(wait_message);\n\n        CHECK_MESSAGE(processed_items.size() == 1, \"Incorrect number of processed items\");\n        CHECK_MESSAGE(processed_items.back() == wait_message, \"unexpected processing\");\n\n        g.wait_for_all();\n\n        CHECK(processed_items.size() == 1);\n        CHECK(processed_items.back() == wait_message);\n    }\n}\n#endif\n\n//! Test read-write properties\n//! \\brief \\ref requirement \\ref error_guessing\nTEST_CASE(\"Read-write\"){\n    simple_read_write_tests<int>();\n    simple_read_write_tests<float>();\n}\n\n//! Read-write and ParallelFor tests under limited parallelism\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Limited parallelism\"){\n    for( unsigned int p=utils::MinThread; p<=utils::MaxThread; ++p ) {\n        tbb::task_arena arena(p);\n        arena.execute(\n            [&]() {\n                parallel_read_write_tests<int>();\n                parallel_read_write_tests<float>();\n                test_reserving_nodes<tbb::flow::overwrite_node, size_t>();\n            }\n        );\n\t}\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n//! Test follows and precedes API\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Follows and precedes API\"){\n    test_follows_and_precedes_api();\n}\n#endif\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Test decution guides\n//! \\brief \\ref requirement\nTEST_CASE(\"Deduction guides\"){\n    test_deduction_guides();\n}\n#endif\n\n//! Test try_release\n//! \\brief \\ref error_guessing\nTEST_CASE(\"try_release\"){\n    tbb::flow::graph g;\n\n    tbb::flow::overwrite_node<int> on(g);\n\n    CHECK_MESSAGE ((on.try_release()== true), \"try_release should return true\");\n}\n\n//! Test for cancel register_predecessor_task\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Cancel register_predecessor_task\") {\n    tbb::flow::graph g;\n    // Cancel graph context for preventing tasks execution and\n    // calling cancel method of spawned tasks\n    g.cancel();\n\n    // To spawn register_predecessor_task internal buffer of overwrite_node\n    // should be valid and successor should failed during putting an item to it\n    oneapi::tbb::flow::overwrite_node<size_t> node(g);\n    // Reserving join_node always fails during putting an item to it\n    tbb::flow::join_node<std::tuple<size_t>, tbb::flow::reserving> j_node(g);\n\n    // Make internal buffer of overwrite_node valid\n    node.try_put(1);\n    // Making an edge attempts pushing an item to join_node\n    // that immediately fails and tries to reverse an edge into PULL state\n    // by spawning register_predecessor_task, which will be cancelled\n    // during execution\n    tbb::flow::make_edge(node, tbb::flow::input_port<0>(j_node));\n\n    // Wait for cancellation of spawned tasks\n    g.wait_for_all();\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test overwrite_node try_put_and_wait\") {\n    test_overwrite_node_try_put_and_wait();\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_parallel_for.cpp",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n\n#include \"tbb/parallel_for.h\"\n\n#include \"common/config.h\"\n#include \"common/utils.h\"\n#include \"common/utils_concurrency_limit.h\"\n#include \"common/utils_report.h\"\n#include \"common/vector_types.h\"\n#include \"common/cpu_usertime.h\"\n#include \"common/spin_barrier.h\"\n#include \"common/exception_handling.h\"\n#include \"common/concepts_common.h\"\n#include \"test_partitioner.h\"\n\n#include <cstddef>\n#include <vector>\n\n//! \\file test_parallel_for.cpp\n//! \\brief Test for [algorithms.parallel_for] specification\n\n#if _MSC_VER\n#pragma warning (push)\n// Suppress conditional expression is constant\n#pragma warning (disable: 4127)\n#if __TBB_MSVC_UNREACHABLE_CODE_IGNORED\n    // Suppress pointless \"unreachable code\" warning.\n    #pragma warning (disable: 4702)\n#endif\n#if defined(_Wp64)\n    // Workaround for overzealous compiler warnings in /Wp64 mode\n    #pragma warning (disable: 4267)\n#endif\n#define _SCL_SECURE_NO_WARNINGS\n#endif //#if _MSC_VER\n\n\n#if (HAVE_m128 || HAVE_m256)\ntemplate<typename ClassWithVectorType>\nstruct SSE_Functor {\n    ClassWithVectorType* Src, * Dst;\n    SSE_Functor( ClassWithVectorType* src, ClassWithVectorType* dst ) : Src(src), Dst(dst) {}\n\n    void operator()( tbb::blocked_range<int>& r ) const {\n        for( int i=r.begin(); i!=r.end(); ++i )\n            Dst[i] = Src[i];\n    }\n};\n\n//! Test that parallel_for works with stack-allocated __m128\ntemplate<typename ClassWithVectorType>\nvoid TestVectorTypes() {\n    const int aSize = 300;\n    ClassWithVectorType Array1[aSize], Array2[aSize];\n    for( int i=0; i<aSize; ++i ) {\n        // VC8 does not properly align a temporary value; to work around, use explicit variable\n        ClassWithVectorType foo(i);\n        Array1[i] = foo;\n    }\n    tbb::parallel_for( tbb::blocked_range<int>(0,aSize), SSE_Functor<ClassWithVectorType>(Array1, Array2) );\n    for( int i=0; i<aSize; ++i ) {\n        ClassWithVectorType foo(i);\n        CHECK( Array2[i]==foo ) ;\n    }\n}\n#endif /* HAVE_m128 || HAVE_m256 */\n\nstruct TestSimplePartitionerStabilityFunctor {\n  std::vector<int> & ranges;\n  TestSimplePartitionerStabilityFunctor(std::vector<int> & theRanges):ranges(theRanges){}\n  void operator()(tbb::blocked_range<size_t>& r)const{\n      ranges.at(r.begin()) = 1;\n  }\n};\nvoid TestSimplePartitionerStability(){\n    const std::size_t repeat_count= 10;\n    const std::size_t rangeToSplitSize=1000000;\n    const std::size_t grainsizeStep=rangeToSplitSize/repeat_count;\n    typedef TestSimplePartitionerStabilityFunctor FunctorType;\n\n    for (std::size_t i=0 , grainsize=grainsizeStep; i<repeat_count;i++, grainsize+=grainsizeStep){\n        std::vector<int> firstSeries(rangeToSplitSize,0);\n        std::vector<int> secondSeries(rangeToSplitSize,0);\n\n        tbb::parallel_for(tbb::blocked_range<size_t>(0,rangeToSplitSize,grainsize),FunctorType(firstSeries),tbb::simple_partitioner());\n        tbb::parallel_for(tbb::blocked_range<size_t>(0,rangeToSplitSize,grainsize),FunctorType(secondSeries),tbb::simple_partitioner());\n\n        CHECK_MESSAGE(\n            firstSeries == secondSeries,\n            \"Splitting range with tbb::simple_partitioner must be reproducible; i = \" << i\n        );\n    }\n}\n\nnamespace various_range_implementations {\n\nusing namespace test_partitioner_utils;\nusing namespace test_partitioner_utils::TestRanges;\n\n// Body ensures that initial work distribution is done uniformly through affinity mechanism and not through work stealing\nclass Body {\n    utils::SpinBarrier &m_sb;\npublic:\n    Body(utils::SpinBarrier& sb) : m_sb(sb) { }\n    Body(Body& b, tbb::split) : m_sb(b.m_sb) { }\n\n    template <typename Range>\n    void operator()(Range& r) const {\n        INFO(\"Executing range [\" << r.begin() << \", \" << r.end() << \"]\");\n        m_sb.wait(); // waiting for all threads\n    }\n};\n\nnamespace correctness {\n\n/* Testing only correctness (that is parallel_for does not hang) */\ntemplate <typename RangeType, bool /* feedback */, bool ensure_non_emptiness>\nvoid test() {\n    RangeType range( 0, utils::get_platform_max_threads(), nullptr, false, ensure_non_emptiness );\n    tbb::affinity_partitioner ap;\n    tbb::parallel_for( range, SimpleBody(), ap );\n}\n\n} // namespace correctness\n\nnamespace uniform_distribution {\n\n/* Body of parallel_for algorithm would hang if non-uniform work distribution happened  */\ntemplate <typename RangeType, bool feedback, bool ensure_non_emptiness>\nvoid test() {\n    static const std::size_t thread_num = utils::get_platform_max_threads();\n    utils::SpinBarrier sb( thread_num );\n    RangeType range(0, thread_num, nullptr, feedback, ensure_non_emptiness);\n    const Body sync_body( sb );\n    tbb::affinity_partitioner ap;\n    tbb::parallel_for( range, sync_body, ap );\n    tbb::parallel_for( range, sync_body, tbb::static_partitioner() );\n}\n\n} // namespace uniform_distribution\n\nvoid test() {\n    const bool provide_feedback = false;\n    const bool ensure_non_empty_range = true;\n\n    // BlockedRange does not take into account feedback and non-emptiness settings but uses the\n    // tbb::blocked_range implementation\n    uniform_distribution::test<BlockedRange, !provide_feedback, !ensure_non_empty_range>();\n    using correctness::test;\n\n    {\n        test<RoundedDownRange, provide_feedback, ensure_non_empty_range>();\n        test<RoundedDownRange, provide_feedback, !ensure_non_empty_range>();\n    }\n\n    {\n        test<RoundedUpRange, provide_feedback, ensure_non_empty_range>();\n        test<RoundedUpRange, provide_feedback, !ensure_non_empty_range>();\n    }\n\n    // Testing that parallel_for algorithm works with such weird ranges\n    correctness::test<Range1_2, /* provide_feedback= */ false, !ensure_non_empty_range>();\n    correctness::test<Range1_999, /* provide_feedback= */ false, !ensure_non_empty_range>();\n    correctness::test<Range999_1, /* provide_feedback= */ false, !ensure_non_empty_range>();\n\n    // The following ranges do not comply with the proportion suggested by partitioner. Therefore\n    // they have to provide the proportion in which they were actually split back to partitioner and\n    // ensure theirs non-emptiness\n    test<Range1_2, provide_feedback, ensure_non_empty_range>();\n    test<Range1_999, provide_feedback, ensure_non_empty_range>();\n    test<Range999_1, provide_feedback, ensure_non_empty_range>();\n}\n\n} // namespace various_range_implementations\n\nnamespace test_cancellation {\n\nstruct FunctorToCancel {\n    static std::atomic<bool> need_to_wait;\n\n    void operator()( std::size_t ) const {\n        ++g_CurExecuted;\n        if (need_to_wait) {\n            need_to_wait = Cancellator::WaitUntilReady();\n        }\n    }\n\n    void operator()( const tbb::blocked_range<std::size_t>& ) const {\n        ++g_CurExecuted;\n        Cancellator::WaitUntilReady();\n    }\n\n    static void reset() { need_to_wait = true; }\n}; // struct FunctorToCancel\n\nstd::atomic<bool> FunctorToCancel::need_to_wait(true);\n\nstatic constexpr std::size_t buffer_test_size = 1024;\nstatic constexpr std::size_t maxParallelForRunnerMode = 14;\n\ntemplate <std::size_t Mode>\nclass ParallelForRunner {\n    tbb::task_group_context& my_ctx;\n    const std::size_t worker_task_step = 1;\n\n    static_assert(Mode >= 0 && Mode <= maxParallelForRunnerMode, \"Incorrect mode for ParallelForRunner\");\n\n    template <typename Partitioner, typename... Args>\n    void run_parallel_for( Args&&... args ) const {\n        Partitioner part;\n        tbb::parallel_for(std::forward<Args>(args)..., part, my_ctx);\n    }\n\n    template <typename... Args>\n    void run_overload( Args&&... args ) const {\n\n        switch(Mode % 5) {\n            case 0 : {\n                tbb::parallel_for(std::forward<Args>(args)..., my_ctx);\n                break;\n            }\n            case 1 : {\n                run_parallel_for<tbb::simple_partitioner>(std::forward<Args>(args)...);\n                break;\n            }\n            case 2 : {\n                run_parallel_for<tbb::auto_partitioner>(std::forward<Args>(args)...);\n                break;\n            }\n            case 3 : {\n                run_parallel_for<tbb::static_partitioner>(std::forward<Args>(args)...);\n                break;\n            }\n            case 4 : {\n                run_parallel_for<tbb::affinity_partitioner>(std::forward<Args>(args)...);\n                break;\n            }\n        }\n    }\n\npublic:\n    ParallelForRunner( tbb::task_group_context& ctx )\n        : my_ctx(ctx) {}\n\n    ~ParallelForRunner() { FunctorToCancel::reset(); }\n\n    void operator()() const {\n        if (Mode < 5) {\n            // Overload with blocked range\n            tbb::blocked_range<std::size_t> br(0, buffer_test_size);\n            run_overload(br, FunctorToCancel{});\n        } else if (Mode < 10) {\n            // Overload with two indexes\n            run_overload(std::size_t(0), buffer_test_size, FunctorToCancel{});\n        } else {\n            // Overload with two indexes and step\n            run_overload(std::size_t(0), buffer_test_size, worker_task_step, FunctorToCancel{});\n        }\n    }\n}; // class ParallelForRunner\n\ntemplate <std::size_t Mode>\nvoid run_parallel_for_cancellation_test() {\n    // TODO: enable concurrency_range\n    if (utils::get_platform_max_threads() < 2) {\n        // The test requires at least one worker thread to request cancellation\n        return;\n    }\n    ResetEhGlobals();\n    RunCancellationTest<ParallelForRunner<Mode>, Cancellator>();\n}\n\ntemplate <std::size_t Mode>\nstruct ParallelForTestRunner {\n    static void run() {\n        run_parallel_for_cancellation_test<Mode>();\n        ParallelForTestRunner<Mode + 1>::run();\n    }\n}; // struct ParallelForTestRunner\n\ntemplate <>\nstruct ParallelForTestRunner<maxParallelForRunnerMode> {\n    static void run() {\n        run_parallel_for_cancellation_test<maxParallelForRunnerMode>();\n    }\n}; // struct ParallelForTestRunner<maxParallelForRunnerMode>\n\n} // namespace test_cancellation\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\ntemplate <typename... Args>\nconcept can_call_parallel_for_basic = requires( Args&&... args ) {\n    tbb::parallel_for(std::forward<Args>(args)...);\n};\n\ntemplate <typename... Args>\nconcept can_call_parallel_for_helper = can_call_parallel_for_basic<Args...> &&\n                                       can_call_parallel_for_basic<Args..., tbb::task_group_context&>;\n\ntemplate <typename... Args>\nconcept can_call_parallel_for_with_partitioner = can_call_parallel_for_helper<Args...> &&\n                                                 can_call_parallel_for_helper<Args..., const tbb::simple_partitioner&> &&\n                                                 can_call_parallel_for_helper<Args..., const tbb::auto_partitioner&> &&\n                                                 can_call_parallel_for_helper<Args..., const tbb::static_partitioner> &&\n                                                 can_call_parallel_for_helper<Args..., tbb::affinity_partitioner&>;\n\ntemplate <typename Range, typename Body>\nconcept can_call_range_pfor = can_call_parallel_for_with_partitioner<const Range&, const Body&>;\n\ntemplate <typename Index, typename Function>\nconcept can_call_index_pfor = can_call_parallel_for_with_partitioner<Index, Index, const Function&> &&\n                              can_call_parallel_for_with_partitioner<Index, Index, Index, const Function&>;\n\n\ntemplate <typename Range>\nusing CorrectBody = test_concepts::parallel_for_body::Correct<Range>;\ntemplate <typename Index>\nusing CorrectFunc = test_concepts::parallel_for_function::Correct<Index>;\n\nvoid test_pfor_range_constraints() {\n    using namespace test_concepts::range;\n\n    static_assert(can_call_range_pfor<Correct, CorrectBody<Correct>>);\n    static_assert(!can_call_range_pfor<NonCopyable, CorrectBody<NonCopyable>>);\n    static_assert(!can_call_range_pfor<NonSplittable, CorrectBody<NonSplittable>>);\n    static_assert(!can_call_range_pfor<NonDestructible, CorrectBody<NonDestructible>>);\n    static_assert(!can_call_range_pfor<NoEmpty, CorrectBody<NoEmpty>>);\n    static_assert(!can_call_range_pfor<EmptyNonConst, CorrectBody<EmptyNonConst>>);\n    static_assert(!can_call_range_pfor<WrongReturnEmpty, CorrectBody<WrongReturnEmpty>>);\n    static_assert(!can_call_range_pfor<NoIsDivisible, CorrectBody<NoIsDivisible>>);\n    static_assert(!can_call_range_pfor<IsDivisibleNonConst, CorrectBody<IsDivisibleNonConst>>);\n    static_assert(!can_call_range_pfor<WrongReturnIsDivisible, CorrectBody<WrongReturnIsDivisible>>);\n}\n\nvoid test_pfor_body_constraints() {\n    using namespace test_concepts::parallel_for_body;\n    using CorrectRange = test_concepts::range::Correct;\n\n    static_assert(can_call_range_pfor<CorrectRange, Correct<CorrectRange>>);\n    static_assert(!can_call_range_pfor<CorrectRange, NonCopyable<CorrectRange>>);\n    static_assert(!can_call_range_pfor<CorrectRange, NonDestructible<CorrectRange>>);\n    static_assert(!can_call_range_pfor<CorrectRange, NoOperatorRoundBrackets<CorrectRange>>);\n    static_assert(!can_call_range_pfor<CorrectRange, OperatorRoundBracketsNonConst<CorrectRange>>);\n    static_assert(!can_call_range_pfor<CorrectRange, WrongInputOperatorRoundBrackets<CorrectRange>>);\n}\n\nvoid test_pfor_func_constraints() {\n    using namespace test_concepts::parallel_for_function;\n    using CorrectIndex = test_concepts::parallel_for_index::Correct;\n\n    static_assert(can_call_index_pfor<CorrectIndex, Correct<CorrectIndex>>);\n    static_assert(!can_call_index_pfor<CorrectIndex, NoOperatorRoundBrackets<CorrectIndex>>);\n    static_assert(!can_call_index_pfor<CorrectIndex, OperatorRoundBracketsNonConst<CorrectIndex>>);\n    static_assert(!can_call_index_pfor<CorrectIndex, WrongInputOperatorRoundBrackets<CorrectIndex>>);\n}\n\nvoid test_pfor_index_constraints() {\n    using namespace test_concepts::parallel_for_index;\n    static_assert(can_call_index_pfor<Correct, CorrectFunc<Correct>>);\n    static_assert(!can_call_index_pfor<NoIntCtor, CorrectFunc<NoIntCtor>>);\n    static_assert(!can_call_index_pfor<NonCopyable, CorrectFunc<NonCopyable>>);\n    static_assert(!can_call_index_pfor<NonCopyAssignable, CorrectFunc<NonCopyAssignable>>);\n    static_assert(!can_call_index_pfor<NonDestructible, CorrectFunc<NonDestructible>>);\n    static_assert(!can_call_index_pfor<NoOperatorLess, CorrectFunc<NoOperatorLess>>);\n    static_assert(!can_call_index_pfor<OperatorLessNonConst, CorrectFunc<OperatorLessNonConst>>);\n    static_assert(!can_call_index_pfor<WrongInputOperatorLess, CorrectFunc<WrongInputOperatorLess>>);\n    static_assert(!can_call_index_pfor<WrongReturnOperatorLess, CorrectFunc<WrongReturnOperatorLess>>);\n    static_assert(!can_call_index_pfor<NoOperatorMinus, CorrectFunc<NoOperatorMinus>>);\n    static_assert(!can_call_index_pfor<OperatorMinusNonConst, CorrectFunc<OperatorMinusNonConst>>);\n    static_assert(!can_call_index_pfor<WrongInputOperatorMinus, CorrectFunc<WrongInputOperatorMinus>>);\n    static_assert(!can_call_index_pfor<WrongReturnOperatorMinus, CorrectFunc<WrongReturnOperatorMinus>>);\n    static_assert(!can_call_index_pfor<NoOperatorPlus, CorrectFunc<NoOperatorPlus>>);\n    static_assert(!can_call_index_pfor<OperatorPlusNonConst, CorrectFunc<OperatorPlusNonConst>>);\n    static_assert(!can_call_index_pfor<WrongInputOperatorPlus, CorrectFunc<WrongInputOperatorPlus>>);\n    static_assert(!can_call_index_pfor<WrongReturnOperatorPlus, CorrectFunc<WrongReturnOperatorPlus>>);\n}\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n\n#if TBB_USE_EXCEPTIONS && !__TBB_THROW_ACROSS_MODULE_BOUNDARY_BROKEN && TBB_REVAMP_TODO\n#include \"tbb/global_control.h\"\n//! Testing exceptions\n//! \\brief \\ref requirement\nTEST_CASE(\"Exceptions support\") {\n    for ( int p = MinThread; p <= MaxThread; ++p ) {\n        if ( p > 0 ) {\n            tbb::global_control control(tbb::global_control::max_allowed_parallelism, p);\n            TestExceptionsSupport();\n        }\n    }\n}\n#endif /* TBB_USE_EXCEPTIONS && !__TBB_THROW_ACROSS_MODULE_BOUNDARY_BROKEN */\n\n//! Testing cancellation\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Vector types\") {\n#if HAVE_m128\n    TestVectorTypes<ClassWithSSE>();\n#endif\n#if HAVE_m256\n    if (have_AVX()) TestVectorTypes<ClassWithAVX>();\n#endif\n}\n\n//! Testing workers going to sleep\n//! \\brief \\ref resource_usage\nTEST_CASE(\"That all workers sleep when no work\") {\n    const std::size_t N = 100000;\n    std::atomic<int> counter{};\n\n    tbb::parallel_for(std::size_t(0), N, [&](std::size_t) {\n        for (int i = 0; i < 1000; ++i) {\n            ++counter;\n        }\n    }, tbb::simple_partitioner());\n    TestCPUUserTime(utils::get_platform_max_threads());\n}\n\n//! Testing simple partitioner stability\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Simple partitioner stability\") {\n    TestSimplePartitionerStability();\n}\n\n//! Testing various range implementations\n//! \\brief \\ref requirement\nTEST_CASE(\"Various range implementations\") {\n    various_range_implementations::test();\n}\n\n//! Testing parallel_for with explicit task_group_context\n//! \\brief \\ref interface \\ref error_guessing\nTEST_CASE(\"Cancellation test for tbb::parallel_for\") {\n    test_cancellation::ParallelForTestRunner</*FirstMode = */0>::run();\n}\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_for constraints\") {\n    test_pfor_range_constraints();\n    test_pfor_body_constraints();\n    test_pfor_func_constraints();\n    test_pfor_index_constraints();\n}\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n\n#if _MSC_VER\n#pragma warning (pop)\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_parallel_for_each.cpp",
    "content": "/*\n    Copyright (c) 2005-2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/parallel_for_each_common.h\"\n#include \"common/concepts_common.h\"\n#include <vector>\n#include <iterator>\n\n//! \\file test_parallel_for_each.cpp\n//! \\brief Test for [algorithms.parallel_for_each]\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n// Fancy iterator type that models the C++20 iterator type\n// that defines the real iterator category using iterator_concept type\n// and iterator_category is always std::input_iterator_type\n// Similar iterators are used by C++20 ranges (e.g. std::ranges::iota_view::iterator)\n// parallel_for_each algorithm should detect such iterators with respect to iterator_concept value\n\ntemplate <typename T, typename Category>\nstruct cpp20_iterator {\n    static_assert(std::derived_from<Category, std::forward_iterator_tag>,\n                  \"cpp20_iterator should be of at least forward iterator category\");\n\n    using iterator_concept = Category;\n    using iterator_category = std::input_iterator_tag;\n    using value_type = T;\n    using difference_type = std::ptrdiff_t;\n\n    cpp20_iterator() = default;\n    explicit cpp20_iterator(T* ptr) : my_ptr(ptr) {}\n\n    T& operator*() const { return *my_ptr; }\n\n    cpp20_iterator& operator++() {\n        ++my_ptr;\n        return *this;\n    }\n\n    cpp20_iterator operator++(int) {\n        auto it = *this;\n        ++*this;\n        return it;\n    }\n\n    cpp20_iterator& operator--()\n        requires std::derived_from<Category, std::bidirectional_iterator_tag>\n    {\n        --my_ptr;\n        return *this;\n    }\n\n    cpp20_iterator operator--(int)\n        requires std::derived_from<Category, std::bidirectional_iterator_tag>\n    {\n        auto it = *this;\n        --*this;\n        return it;\n    }\n\n    cpp20_iterator& operator+=(difference_type n)\n        requires std::derived_from<Category, std::random_access_iterator_tag>\n    {\n        my_ptr += n;\n        return *this;\n    }\n\n    cpp20_iterator& operator-=(difference_type n)\n        requires std::derived_from<Category, std::random_access_iterator_tag>\n    {\n        my_ptr -= n;\n        return *this;\n    }\n\n    T& operator[](difference_type n) const\n        requires std::derived_from<Category, std::random_access_iterator_tag>\n    {\n        return my_ptr[n];\n    }\n\n    friend bool operator==(const cpp20_iterator&, const cpp20_iterator&) = default;\n\n    friend auto operator<=>(const cpp20_iterator&, const cpp20_iterator&)\n        requires std::derived_from<Category, std::random_access_iterator_tag> = default;\n\n    friend cpp20_iterator operator+(cpp20_iterator i, difference_type n)\n        requires std::derived_from<Category, std::random_access_iterator_tag>\n    {\n        return cpp20_iterator(i.my_ptr + n);\n    }\n\n    friend cpp20_iterator operator+(difference_type n, cpp20_iterator i)\n        requires std::derived_from<Category, std::random_access_iterator_tag>\n    {\n        return i + n;\n    }\n\n    friend cpp20_iterator operator-(cpp20_iterator i, difference_type n)\n        requires std::derived_from<Category, std::random_access_iterator_tag>\n    {\n        return cpp20_iterator(i.my_ptr - n);\n    }\n\n    friend difference_type operator-(const cpp20_iterator& x, const cpp20_iterator& y) {\n        return x.my_ptr - y.my_ptr;\n    }\nprivate:\n    T* my_ptr = nullptr;\n}; // class cpp20_iterator\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n\n//! Test forward access iterator support\n//! \\brief \\ref error_guessing \\ref interface\nTEST_CASE(\"Forward iterator support\") {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        tbb::global_control control(tbb::global_control::max_allowed_parallelism, concurrency_level);\n        for(size_t depth = 0; depth <= depths_nubmer; ++depth) {\n            g_tasks_expected = 0;\n            for (size_t i=0; i < depth; ++i)\n                g_tasks_expected += FindNumOfTasks(g_depths[i].value());\n            TestIterator_Modifiable<utils::ForwardIterator<value_t>>(depth);\n        }\n    }\n}\n\n//! Test random access iterator support\n//! \\brief \\ref error_guessing \\ref interface\nTEST_CASE(\"Random access iterator support\") {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        tbb::global_control control(tbb::global_control::max_allowed_parallelism, concurrency_level);\n        for(size_t depth = 0; depth <= depths_nubmer; ++depth) {\n            g_tasks_expected = 0;\n            for (size_t i=0; i < depth; ++i)\n                g_tasks_expected += FindNumOfTasks(g_depths[i].value());\n            TestIterator_Modifiable<value_t*>(depth);\n        }\n    }\n}\n\n//! Test const random access iterator support\n//! \\brief \\ref error_guessing \\ref interface\nTEST_CASE(\"Const random access iterator support\") {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        tbb::global_control control(tbb::global_control::max_allowed_parallelism, concurrency_level);\n        for(size_t depth = 0; depth <= depths_nubmer; ++depth) {\n            g_tasks_expected = 0;\n            for (size_t i=0; i < depth; ++i)\n                g_tasks_expected += FindNumOfTasks(g_depths[i].value());\n            TestIterator_Const<utils::ConstRandomIterator<value_t>>(depth);\n        }\n    }\n\n}\n\n//! Test container based overload\n//! \\brief \\ref error_guessing \\ref interface\nTEST_CASE(\"Container based overload - forward iterator based container\") {\n    container_based_overload_test_case<utils::ForwardIterator>(/*expected_value*/1);\n}\n\n//! Test container based overload\n//! \\brief \\ref error_guessing \\ref interface\nTEST_CASE(\"Container based overload - random access iterator based container\") {\n    container_based_overload_test_case<utils::RandomIterator>(/*expected_value*/1);\n}\n\n// Test for iterators over values convertible to work item type\n//! \\brief \\ref error_guessing \\ref interface\nTEST_CASE(\"Using with values convertible to work item type\") {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        tbb::global_control control(tbb::global_control::max_allowed_parallelism, concurrency_level);\n        using Iterator = size_t*;\n        for(size_t depth = 0; depth <= depths_nubmer; ++depth) {\n            g_tasks_expected = 0;\n            for (size_t i=0; i < depth; ++i)\n                g_tasks_expected += FindNumOfTasks(g_depths[i].value());\n            // Test for iterators over values convertible to work item type\n            TestIterator_Common<Iterator>(depth);\n            TestBody<FakeTaskGeneratorBody_RvalueRefVersion, Iterator>(depth);\n            TestBody<TaskGeneratorBody_RvalueRefVersion, Iterator>(depth);\n        }\n    }\n}\n\n//! Testing workers going to sleep\n//! \\brief \\ref resource_usage \\ref stress\nTEST_CASE(\"That all workers sleep when no work\") {\n    const std::size_t N = 100000;\n    std::vector<std::size_t> vec(N, 0);\n\n    tbb::parallel_for_each(vec.begin(), vec.end(), [&](std::size_t& in) {\n        for (int i = 0; i < 1000; ++i) {\n            ++in;\n        }\n    });\n    TestCPUUserTime(utils::get_platform_max_threads());\n}\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n\ntemplate <typename Iterator, typename Body>\nconcept can_call_parallel_for_each_with_iterator = requires( Iterator it, const Body& body, tbb::task_group_context ctx ) {\n    tbb::parallel_for_each(it, it, body);\n    tbb::parallel_for_each(it, it, body, ctx);\n};\n\ntemplate <typename ContainerBasedSequence, typename Body>\nconcept can_call_parallel_for_each_with_cbs = requires( ContainerBasedSequence cbs,\n                                                        const ContainerBasedSequence const_cbs,\n                                                        const Body& body, tbb::task_group_context ctx ) {\n    tbb::parallel_for_each(cbs, body);\n    tbb::parallel_for_each(cbs, body, ctx);\n    tbb::parallel_for_each(const_cbs, body);\n    tbb::parallel_for_each(const_cbs, body, ctx);\n};\n\nusing CorrectCBS = test_concepts::container_based_sequence::Correct;\n\ntemplate <typename Body>\nconcept can_call_parallel_for_each =\n    can_call_parallel_for_each_with_iterator<CorrectCBS::iterator, Body> &&\n    can_call_parallel_for_each_with_cbs<CorrectCBS, Body>;\n\ntemplate <typename Iterator>\nusing CorrectBody = test_concepts::parallel_for_each_body::Correct<decltype(*std::declval<Iterator>())>;\n\nvoid test_pfor_each_iterator_constraints() {\n    using CorrectIterator = typename std::vector<int>::iterator; // random_access_iterator\n    using IncorrectIterator = std::ostream_iterator<int>; // output_iterator\n    static_assert(can_call_parallel_for_each_with_iterator<CorrectIterator, CorrectBody<CorrectIterator>>);\n    static_assert(!can_call_parallel_for_each_with_iterator<IncorrectIterator, CorrectBody<IncorrectIterator>>);\n}\n\nvoid test_pfor_each_container_based_sequence_constraints() {\n    using namespace test_concepts::container_based_sequence;\n    static_assert(can_call_parallel_for_each_with_cbs<Correct, CorrectBody<Correct::iterator>>);\n    static_assert(!can_call_parallel_for_each_with_cbs<NoBegin, CorrectBody<NoBegin::iterator>>);\n    static_assert(!can_call_parallel_for_each_with_cbs<NoEnd, CorrectBody<NoEnd::iterator>>);\n}\n\nvoid test_pfor_each_body_constraints() {\n    using namespace test_concepts::parallel_for_each_body;\n    static_assert(can_call_parallel_for_each<Correct<int>>);\n    static_assert(can_call_parallel_for_each<WithFeeder<int>>);\n    static_assert(!can_call_parallel_for_each<NoOperatorRoundBrackets<int>>);\n    static_assert(!can_call_parallel_for_each<WithFeederNoOperatorRoundBrackets<int>>);\n    static_assert(!can_call_parallel_for_each<OperatorRoundBracketsNonConst<int>>);\n    static_assert(!can_call_parallel_for_each<WithFeederOperatorRoundBracketsNonConst<int>>);\n    static_assert(!can_call_parallel_for_each<WrongInputOperatorRoundBrackets<int>>);\n    static_assert(!can_call_parallel_for_each<WithFeederWrongFirstInputOperatorRoundBrackets<int>>);\n    static_assert(!can_call_parallel_for_each<WithFeederWrongSecondInputOperatorRoundBrackets<int>>);\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_for_each constraints\") {\n    test_pfor_each_iterator_constraints();\n    test_pfor_each_container_based_sequence_constraints();\n    test_pfor_each_body_constraints();\n}\n\nstruct no_copy_move {\n    no_copy_move() = default;\n\n    no_copy_move(const no_copy_move&) = delete;\n    no_copy_move(no_copy_move&&) = delete;\n\n    no_copy_move& operator=(const no_copy_move&) = delete;\n    no_copy_move& operator=(no_copy_move&&) = delete;\n\n    int item = 0;\n};\n\ntemplate <typename Category>\nvoid test_with_cpp20_iterator() {\n    constexpr std::size_t n = 1'000'000;\n\n    std::vector<no_copy_move> elements(n);\n\n    cpp20_iterator<no_copy_move, Category> begin(elements.data());\n    cpp20_iterator<no_copy_move, Category> end(elements.data() + n);\n\n    oneapi::tbb::parallel_for_each(begin, end, [](no_copy_move& element) {\n        element.item = 42;\n    });\n\n    for (std::size_t index = 0; index < n; ++index) {\n        CHECK(elements[index].item == 42);\n    }\n}\n\n//! \\brief \\ref error_guessing \\ref regression\nTEST_CASE(\"parallel_for_each with cpp20 iterator\") {\n    // Test that parallel_for_each threats ignores iterator_category type\n    // if iterator_concept type is defined for iterator\n\n    // For input iterators parallel_for_each requires element to be\n    // copyable or movable so since cpp20_iterator is at least forward\n    // parallel_for_each should work with cpp20_iterator\n    // on non-copyable and non-movable type\n\n    // test cpp20_iterator implementation\n    using cpp20_forward_iterator = cpp20_iterator<int, std::forward_iterator_tag>;\n    using cpp20_bidirectional_iterator = cpp20_iterator<int, std::bidirectional_iterator_tag>;\n    using cpp20_random_access_iterator = cpp20_iterator<int, std::random_access_iterator_tag>;\n\n    static_assert(std::forward_iterator<cpp20_forward_iterator>);\n    static_assert(!std::bidirectional_iterator<cpp20_forward_iterator>);\n\n    static_assert(std::bidirectional_iterator<cpp20_bidirectional_iterator>);\n    static_assert(!std::random_access_iterator<cpp20_bidirectional_iterator>);\n\n    static_assert(std::random_access_iterator<cpp20_random_access_iterator>);\n\n    test_with_cpp20_iterator<std::forward_iterator_tag>();\n    test_with_cpp20_iterator<std::bidirectional_iterator_tag>();\n    test_with_cpp20_iterator<std::random_access_iterator_tag>();\n}\n\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_parallel_invoke.cpp",
    "content": "/*\n    Copyright (c) 2020-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/cpu_usertime.h\"\n#include \"common/utils_concurrency_limit.h\"\n#include \"common/parallel_invoke_common.h\"\n#include \"common/memory_usage.h\"\n\n#include <cstddef>\n#include <atomic>\n\n//! \\file test_parallel_invoke.cpp\n//! \\brief Test for [algorithms.parallel_invoke]\n\n#if !EMSCRIPTEN\n//! Emscripten requires preloading of the file used to determine memory usage, hence disabled.\n//! Testing parallel_invoke memory usage\n//! \\brief \\ref resource_usage \\ref stress\nTEST_CASE(\"Test memory leaks\") {\n    std::size_t number_of_measurements = 500;\n    std::size_t current_memory_usage = 0, max_memory_usage = 0, stability_counter=0;\n\n    // Limit concurrency to prevent extra allocations not dependent on algorithm behavior\n    auto concurrency_limit = utils::get_platform_max_threads() < 8 ? utils::get_platform_max_threads() : 8;\n    tbb::global_control control(tbb::global_control::max_allowed_parallelism, concurrency_limit);\n\n    for (std::size_t i = 0; i < number_of_measurements; i++) {\n        {\n            // ~45000 workload tasks\n            invoke_tree</*LevelTaskCount*/6, /*Depth*/6, /*WorkSize*/10>::generate_and_run();\n        }\n\n        current_memory_usage = utils::GetMemoryUsage();\n        if (current_memory_usage > max_memory_usage) {\n            stability_counter = 0;\n            max_memory_usage = current_memory_usage;\n        } else {\n            stability_counter++;\n        }\n        // If the amount of used memory has not changed during 10% of executions,\n        // then we can assume that the check was successful\n        if (stability_counter > number_of_measurements / 10) return;\n    }\n    REQUIRE_MESSAGE(false, \"Seems like we get memory leak here.\");\n}\n#endif\n\ntemplate<typename Body>\nvoid test_from_2_to_10_arguments(const Body& body, const std::atomic<std::size_t>& counter) {\n    tbb::parallel_invoke(body, body);\n    tbb::parallel_invoke(body, body, body);\n    tbb::parallel_invoke(body, body, body, body);\n    tbb::parallel_invoke(body, body, body, body, body);\n    tbb::parallel_invoke(body, body, body, body, body, body);\n    tbb::parallel_invoke(body, body, body, body, body, body, body);\n    tbb::parallel_invoke(body, body, body, body, body, body, body, body);\n    tbb::parallel_invoke(body, body, body, body, body, body, body, body, body);\n    tbb::parallel_invoke(body, body, body, body, body, body, body, body, body, body);\n\n    REQUIRE_MESSAGE(counter == (2 + 10) * 9 / 2,\n        \"Parallel invoke correctness was broken during lambda support test execution.\");\n}\n\n//! Testing lambdas support\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test lambda support\") {\n    std::atomic<std::size_t> lambda_counter{0};\n    auto body = [&]{ lambda_counter++; };\n\n    test_from_2_to_10_arguments(body, lambda_counter);\n}\n\nstd::atomic<std::size_t> func_counter{0};\nvoid func() { func_counter++; };\n\n//! Testing function pointers support\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test function pointers support\") {\n    auto func_ptr = &func;\n    test_from_2_to_10_arguments(func_ptr, func_counter);\n}\n\n//! Testing workers going to sleep\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test that all workers sleep when no work\") {\n    invoke_tree</*LevelTaskCount*/9, /*Depth*/6, /*WorkSize*/10>::generate_and_run();\n    TestCPUUserTime(utils::get_platform_max_threads());\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_parallel_phase.cpp",
    "content": "/*\n    Copyright (c) 2025 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_parallel_phase.cpp\n//! \\brief Test for [preview] functionality\n\n#define TBB_PREVIEW_PARALLEL_PHASE 1\n\n#include <chrono>\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_concurrency_limit.h\"\n#include \"common/spin_barrier.h\"\n\n#include \"tbb/task_arena.h\"\n\nvoid active_wait_for(std::chrono::microseconds duration) {\n    for (auto t1 = std::chrono::steady_clock::now(), t2 = t1;\n        std::chrono::duration_cast<std::chrono::microseconds>(t2 - t1) < duration;\n        t2 = std::chrono::steady_clock::now())\n    {\n        utils::doDummyWork(100);\n    }\n}\n\nstruct dummy_func {\n    void operator()() const {\n    }\n};\n\ntemplate <typename F1 = dummy_func, typename F2 = dummy_func>\nstd::size_t measure_median_start_time(tbb::task_arena* ta, const F1& start = F1{}, const F2& end = F2{}) {\n    std::size_t num_threads = ta ? ta->max_concurrency() : tbb::this_task_arena::max_concurrency();\n    std::size_t num_runs = 500;\n    std::vector<std::size_t> longest_start_times;\n    longest_start_times.reserve(num_runs);\n\n    std::vector<std::chrono::steady_clock::time_point> start_times(num_threads);\n    utils::SpinBarrier barrier(num_threads);\n    auto measure_start_time = [&] {\n        start_times[tbb::this_task_arena::current_thread_index()] = std::chrono::steady_clock::now();\n        barrier.wait();\n    };\n\n    auto get_longest_start = [&] (std::chrono::steady_clock::time_point start_time) {\n        std::size_t longest_time = 0;\n        for (auto& time : start_times) {\n            auto diff = std::chrono::duration_cast<std::chrono::microseconds>(time - start_time);\n            longest_time = std::max(longest_time, std::size_t(diff.count()));\n        }\n        return longest_time;\n    };\n\n    auto work = [&] {\n        auto start_time = std::chrono::steady_clock::now();\n        start();\n        for(std::size_t thr = 0; thr < num_threads-1; ++thr) {\n            tbb::this_task_arena::enqueue(measure_start_time);\n        }\n        start_times[tbb::this_task_arena::current_thread_index()] = std::chrono::steady_clock::now();\n        barrier.wait();\n        end();\n        longest_start_times.push_back(get_longest_start(start_time));\n    };\n\n    for (std::size_t i = 1; i < num_runs; ++i) {\n        if (ta) {\n            ta->execute(work);\n        } else {\n            work();\n        }\n        active_wait_for(std::chrono::microseconds(i*2));\n    }\n    return utils::median(longest_start_times.begin(), longest_start_times.end());\n}\n\ntemplate <typename Impl>\nclass start_time_collection_base {\n    friend Impl;\npublic:\n    start_time_collection_base(tbb::task_arena& ta, std::size_t ntrials) :\n        arena(&ta), num_trials(ntrials), start_times(ntrials) {}\n\n    explicit start_time_collection_base(std::size_t ntrials) :\n        arena(nullptr), num_trials(ntrials), start_times(ntrials) {}\n\n    std::vector<std::size_t> measure() {\n        for (std::size_t i = 0; i < num_trials; ++i) {\n            std::size_t median_start_time = static_cast<Impl*>(this)->measure_impl();\n            start_times[i] = median_start_time;\n        }\n        return start_times;\n    }\nprotected:\n    tbb::task_arena* arena;\n    std::size_t num_trials;\n    std::vector<std::size_t> start_times;\n};\n\nclass start_time_collection : public start_time_collection_base<start_time_collection> {\n    using base = start_time_collection_base<start_time_collection>;\n    using base::base;\n    friend base;\n\n    std::size_t measure_impl() {\n        return measure_median_start_time(arena);\n    }\n};\n\nclass start_time_collection_phase_wrapped\n    : public start_time_collection_base<start_time_collection_phase_wrapped>\n{\n    using base = start_time_collection_base<start_time_collection_phase_wrapped>;\n    using base::base;\n    friend base;\n\n    std::size_t measure_impl() {\n        arena->start_parallel_phase();\n        auto median_start_time = measure_median_start_time(arena);\n        arena->end_parallel_phase(/*with_fast_leave*/true);\n        return median_start_time;\n    }\n};\n\nclass start_time_collection_scoped_phase_wrapped\n    : public start_time_collection_base<start_time_collection_scoped_phase_wrapped>\n{\n    using base = start_time_collection_base<start_time_collection_scoped_phase_wrapped>;\n    using base::base;\n    friend base;\n\n    std::size_t measure_impl() {\n        tbb::task_arena::scoped_parallel_phase phase{*arena};\n        auto median_start_time = measure_median_start_time(arena);\n        return median_start_time;\n    }\n};\n\nclass start_time_collection_sequenced_phases\n    : public start_time_collection_base<start_time_collection_sequenced_phases>\n{\n    using base = start_time_collection_base<start_time_collection_sequenced_phases>;\n    friend base;\n\n    bool with_fast_leave;\n\n    std::size_t measure_impl() {\n        std::size_t median_start_time;\n        utils::SpinBarrier barrier;\n        auto body = [&] {\n            barrier.wait();\n        };\n        if (arena) {\n            barrier.initialize(arena->max_concurrency());\n            median_start_time = measure_median_start_time(arena,\n                [&] {\n                    std::size_t num_threads = arena->max_concurrency();\n                    arena->start_parallel_phase();\n                    arena->execute([&] {\n                        for(std::size_t thr = 0; thr < num_threads-1; ++thr) {\n                            tbb::this_task_arena::enqueue(body);\n                        }\n                        barrier.wait();\n                    });\n                    arena->end_parallel_phase(with_fast_leave);\n                }\n            );\n        } else {\n            barrier.initialize(tbb::this_task_arena::max_concurrency());\n            median_start_time = measure_median_start_time(arena,\n                [&] {\n                    std::size_t num_threads = tbb::this_task_arena::max_concurrency();\n                    tbb::this_task_arena::start_parallel_phase();\n                    for(std::size_t thr = 0; thr < num_threads-1; ++thr) {\n                        tbb::this_task_arena::enqueue(body);\n                    }\n                    barrier.wait();\n                    tbb::this_task_arena::end_parallel_phase(with_fast_leave); \n                }\n            );\n        }\n        return median_start_time;\n    }\n\npublic:\n    start_time_collection_sequenced_phases(tbb::task_arena& ta, std::size_t ntrials, bool fast_leave = false) :\n        base(ta, ntrials), with_fast_leave(fast_leave)\n    {}\n\n    explicit start_time_collection_sequenced_phases(std::size_t ntrials, bool fast_leave = false) :\n        base(ntrials), with_fast_leave(fast_leave)\n    {}\n};\n\nclass start_time_collection_sequenced_scoped_phases\n    : public start_time_collection_base<start_time_collection_sequenced_scoped_phases>\n{\n    using base = start_time_collection_base<start_time_collection_sequenced_scoped_phases>;\n    friend base;\n\n    bool with_fast_leave;\n\n    std::size_t measure_impl() {\n        utils::SpinBarrier barrier{static_cast<std::size_t>(arena->max_concurrency())};\n        auto body = [&] {\n            barrier.wait();\n        };\n        auto median_start_time = measure_median_start_time(arena,\n            [&] {\n                std::size_t num_threads = arena->max_concurrency();\n                {\n                    tbb::task_arena::scoped_parallel_phase phase{*arena, with_fast_leave};\n                    arena->execute([&] {\n                        for(std::size_t thr = 0; thr < num_threads-1; ++thr) {\n                            tbb::this_task_arena::enqueue(body);\n                        }\n                        barrier.wait();\n                    });\n                }\n            }\n        );\n        return median_start_time;\n    }\n\npublic:\n    start_time_collection_sequenced_scoped_phases(tbb::task_arena& ta, std::size_t ntrials, bool fast_leave = false) :\n        base(ta, ntrials), with_fast_leave(fast_leave)\n    {}\n\n    explicit start_time_collection_sequenced_scoped_phases(std::size_t ntrials, bool fast_leave = false) :\n        base(ntrials), with_fast_leave(fast_leave)\n    {}\n};\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Check that workers leave faster with leave_policy::fast\") {\n    // Test measures workers start time, so no there is no point to\n    // measure it with workerless arena\n    if (utils::get_platform_max_threads() < 2) {\n        return;\n    }\n    tbb::task_arena ta_automatic_leave {\n        tbb::task_arena::automatic, 1,\n        tbb::task_arena::priority::normal,\n        tbb::task_arena::leave_policy::automatic\n    };\n    tbb::task_arena ta_fast_leave { \n        tbb::task_arena::automatic, 1,\n        tbb::task_arena::priority::normal,\n        tbb::task_arena::leave_policy::fast\n    };\n    start_time_collection st_collector1{ta_automatic_leave, /*num_trials=*/5};\n    start_time_collection st_collector2{ta_fast_leave, /*num_trials=*/5};\n\n    auto times_automatic = st_collector1.measure();\n    auto times_fast = st_collector2.measure();\n\n    auto median_automatic = utils::median(times_automatic.begin(), times_automatic.end());\n    auto median_fast = utils::median(times_fast.begin(), times_fast.end());\n\n    WARN_MESSAGE(median_automatic < median_fast,\n        \"Expected workers to start new work slower with fast leave policy\");\n}\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Parallel Phase retains workers in task_arena\") {\n    if (utils::get_platform_max_threads() < 2) {\n        return;\n    }\n    tbb::task_arena ta_fast1 {\n        tbb::task_arena::automatic, 1,\n        tbb::task_arena::priority::normal,\n        tbb::task_arena::leave_policy::fast\n    };\n    tbb::task_arena ta_fast2 { \n        tbb::task_arena::automatic, 1,\n        tbb::task_arena::priority::normal,\n        tbb::task_arena::leave_policy::fast\n    };\n    start_time_collection_phase_wrapped st_collector1{ta_fast1, /*num_trials=*/5};\n    start_time_collection_scoped_phase_wrapped st_collector_scoped{ta_fast1, /*num_trials=*/5};\n    start_time_collection st_collector2{ta_fast2, /*num_trials=*/5};\n\n    auto times1 = st_collector1.measure();\n    auto times2 = st_collector2.measure();\n    auto times_scoped = st_collector_scoped.measure();\n\n    auto median1 = utils::median(times1.begin(), times1.end());\n    auto median2 = utils::median(times2.begin(), times2.end());\n    auto median_scoped = utils::median(times_scoped.begin(), times_scoped.end());\n\n    WARN_MESSAGE(median1 < median2,\n        \"Expected workers start new work faster when using parallel_phase\");\n\n    WARN_MESSAGE(median_scoped < median2,\n        \"Expected workers start new work faster when using scoped parallel_phase\");\n}\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Test one-time fast leave\") {\n    if (utils::get_platform_max_threads() < 2) {\n        return;\n    }\n    tbb::task_arena ta1{};\n    tbb::task_arena ta2{};\n    start_time_collection_sequenced_phases st_collector1{ta1, /*num_trials=*/10};\n    start_time_collection_sequenced_phases st_collector2{ta2, /*num_trials=*/10, /*fast_leave*/true};\n    start_time_collection_sequenced_scoped_phases st_collector_scoped{ta2, /*num_trials=*/10, /*fast_leave*/true};\n\n    auto times1 = st_collector1.measure();\n    auto times2 = st_collector2.measure();\n    auto times_scoped = st_collector_scoped.measure();\n\n    auto median1 = utils::median(times1.begin(), times1.end());\n    auto median2 = utils::median(times2.begin(), times2.end());\n    auto median_scoped = utils::median(times_scoped.begin(), times_scoped.end());\n\n    WARN_MESSAGE(median1 < median2,\n        \"Expected one-time fast leave setting to slow workers to start new work\");\n\n    WARN_MESSAGE(median1 < median_scoped,\n        \"Expected one-time fast leave setting to slow workers to start new work\");\n}\n\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Test parallel phase with this_task_arena\") {\n    if (utils::get_platform_max_threads() < 2) {\n        return;\n    }\n    start_time_collection_sequenced_phases st_collector1{/*num_trials=*/10};\n    start_time_collection_sequenced_phases st_collector2{/*num_trials=*/10, /*fast_leave*/true};\n\n    auto times1 = st_collector1.measure();\n    auto times2 = st_collector2.measure();\n\n    auto median1 = utils::median(times1.begin(), times1.end());\n    auto median2 = utils::median(times2.begin(), times2.end());\n\n    WARN_MESSAGE(median1 < median2,\n        \"Expected one-time fast leave setting to slow workers to start new work\");\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_parallel_pipeline.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// Before including parallel_pipeline.h, set up the variable to count heap allocated\n// filter_node objects, and make it known for the header.\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/checktype.h\"\n\nint filter_node_count = 0;\n#define __TBB_TEST_FILTER_NODE_COUNT filter_node_count\n#include \"tbb/parallel_pipeline.h\"\n#include \"tbb/global_control.h\"\n#include \"tbb/spin_mutex.h\"\n#include \"tbb/task_group.h\"\n\n#include <atomic>\n#include <string.h>\n#include <memory> // std::unique_ptr\n\n//! \\file test_parallel_pipeline.cpp\n//! \\brief Test for [algorithms.parallel_pipeline algorithms.parallel_pipeline.flow_control] specification\n\nconst unsigned n_tokens = 8;\n// we can conceivably have two buffers used in the middle filter for every token in flight, so\n// we must allocate two buffers for every token.  Unlikely, but possible.\nconst unsigned n_buffers = 2*n_tokens;\nconst int max_counter = 16;\n\nstatic std::size_t concurrency = 0;\n\nstatic std::atomic<int> output_counter;\nstatic std::atomic<int> input_counter;\nstatic std::atomic<int> non_pointer_specialized_calls;\nstatic std::atomic<int> pointer_specialized_calls;\nstatic std::atomic<int> first_pointer_specialized_calls;\nstatic std::atomic<int> second_pointer_specialized_calls;\n\nstatic int intbuffer[max_counter];  // store results for <int,int> parallel pipeline test\nstatic bool check_intbuffer;\n\nstatic void* buffers[n_buffers];\nstatic std::atomic_flag buf_in_use[n_buffers] = {ATOMIC_FLAG_INIT};\n\nvoid *fetchNextBuffer() {\n    for(size_t icnt = 0; icnt < n_buffers; ++icnt) {\n        if(!buf_in_use[icnt].test_and_set()) {\n            return buffers[icnt];\n        }\n    }\n    CHECK_MESSAGE(false, \"Ran out of buffers, p:\"<< concurrency);\n    return nullptr;\n}\nvoid freeBuffer(void *buf) {\n    for(size_t i=0; i < n_buffers;++i) {\n        if(buffers[i] == buf) {\n            buf_in_use[i].clear();\n            return;\n        }\n    }\n    CHECK_MESSAGE(false, \"Tried to free a buffer not in our list, p:\" << concurrency);\n}\n\ntemplate<typename T>\nclass free_on_scope_exit {\npublic:\n    free_on_scope_exit(T *p) : my_p(p) {}\n    ~free_on_scope_exit() { if(!my_p) return; my_p->~T(); freeBuffer(my_p); }\nprivate:\n    T *my_p;\n};\n\n// methods for testing CheckType< >, that return okay values for other types.\ntemplate<typename T>\nbool middle_is_ready(T &/*p*/) { return false; }\n\ntemplate<typename U>\nbool middle_is_ready(CheckType<U> &p) { return p.is_ready(); }\n\ntemplate<typename T>\nbool output_is_ready(T &/*p*/) { return true; }\n\ntemplate<typename U>\nbool output_is_ready(CheckType<U> &p) { return p.is_ready(); }\n\ntemplate<typename T>\nint middle_my_id( T &/*p*/) { return 0; }\n\ntemplate<typename U>\nint middle_my_id(CheckType<U> &p) { return p.id(); }\n\ntemplate<typename T>\nint output_my_id( T &/*p*/) { return 1; }\n\ntemplate<typename U>\nint output_my_id(CheckType<U> &p) { return p.id(); }\n\ntemplate<typename T>\nvoid my_function(T &p) { p = 0; }\n\ntemplate<typename U>\nvoid my_function(CheckType<U> &p) { p.get_ready(); }\n\n// Filters must be copy-constructible, and be const-qualifiable.\ntemplate<typename U>\nclass input_filter : DestroyedTracker {\npublic:\n    U operator()( tbb::flow_control& control ) const {\n        CHECK(is_alive());\n        if( --input_counter < 0 ) {\n            control.stop();\n        }\n        else  // only count successful reads\n            ++non_pointer_specialized_calls;\n        return U();  // default constructed\n    }\n\n};\n\n// specialization for pointer\ntemplate<typename U>\nclass input_filter<U*> : DestroyedTracker {\npublic:\n    U* operator()(tbb::flow_control& control) const {\n        CHECK(is_alive());\n        int ival = --input_counter;\n        if(ival < 0) {\n            control.stop();\n            return nullptr;\n        }\n        ++pointer_specialized_calls;\n        if(ival == max_counter / 2) {\n            return nullptr;  // non-stop nullptr\n        }\n        U* myReturn = new(fetchNextBuffer()) U();\n        if (myReturn) {  // may have been passed in a nullptr\n            CHECK_MESSAGE(!middle_my_id(*myReturn), \"bad id value, p:\" << concurrency);\n            CHECK_MESSAGE(!middle_is_ready(*myReturn), \"Already ready, p:\" << concurrency);\n        }\n        return myReturn;\n    }\n};\n\ntemplate<>\nclass input_filter<void> : DestroyedTracker {\npublic:\n    void operator()( tbb::flow_control& control ) const {\n        CHECK(is_alive());\n        if( --input_counter < 0 ) {\n            control.stop();\n        }\n        else\n            ++non_pointer_specialized_calls;\n    }\n\n};\n\n// specialization for int that passes back a sequence of integers\ntemplate<>\nclass input_filter<int> : DestroyedTracker {\npublic:\n    int\n    operator()(tbb::flow_control& control ) const {\n        CHECK(is_alive());\n        int oldval = --input_counter;\n        if( oldval < 0 ) {\n            control.stop();\n        }\n        else\n            ++non_pointer_specialized_calls;\n        return oldval+1;\n    }\n};\n\ntemplate<typename T, typename U>\nclass middle_filter : DestroyedTracker {\npublic:\n    U operator()(T t) const {\n        CHECK(is_alive());\n        CHECK_MESSAGE(!middle_my_id(t), \"bad id value, p:\" << concurrency);\n        CHECK_MESSAGE(!middle_is_ready(t), \"Already ready, p:\" << concurrency );\n        U out;\n        my_function(out);\n        ++non_pointer_specialized_calls;\n        return out;\n    }\n};\n\ntemplate<typename T, typename U>\nclass middle_filter<T*,U> : DestroyedTracker {\npublic:\n    U operator()(T* my_storage) const {\n        free_on_scope_exit<T> my_ptr(my_storage);  // free_on_scope_exit marks the buffer available\n        CHECK(is_alive());\n        if(my_storage) {  // may have been passed in a nullptr\n            CHECK_MESSAGE(!middle_my_id(*my_storage), \"bad id value, p:\" << concurrency);\n            CHECK_MESSAGE(!middle_is_ready(*my_storage), \"Already ready, p:\" << concurrency );\n        }\n        ++first_pointer_specialized_calls;\n        U out;\n        my_function(out);\n        return out;\n    }\n};\n\ntemplate<typename T, typename U>\nclass middle_filter<T,U*> : DestroyedTracker {\npublic:\n    U* operator()(T my_storage) const {\n        CHECK(is_alive());\n        CHECK_MESSAGE(!middle_my_id(my_storage), \"bad id value, p:\" << concurrency);\n        CHECK_MESSAGE(!middle_is_ready(my_storage), \"Already ready, p:\" << concurrency );\n        // allocate new space from buffers\n        U* my_return = new(fetchNextBuffer()) U();\n        my_function(*my_return);\n        ++second_pointer_specialized_calls;\n        return my_return;\n    }\n};\n\ntemplate<typename T, typename U>\nclass middle_filter<T*,U*> : DestroyedTracker {\npublic:\n    U* operator()(T* my_storage) const {\n        free_on_scope_exit<T> my_ptr(my_storage);  // free_on_scope_exit marks the buffer available\n        CHECK(is_alive());\n        if(my_storage) {\n            CHECK_MESSAGE(!middle_my_id(*my_storage), \"bad id value, p:\" << concurrency);\n            CHECK_MESSAGE(!middle_is_ready(*my_storage), \"Already ready, p:\" << concurrency );\n        }\n        // may have been passed a nullptr\n        ++pointer_specialized_calls;\n        if(!my_storage) return nullptr;\n        CHECK_MESSAGE(!middle_my_id(*my_storage), \"bad id value, p:\" << concurrency);\n        CHECK_MESSAGE(!middle_is_ready(*my_storage), \"Already ready, p:\" << concurrency );\n        U* my_return = new(fetchNextBuffer()) U();\n        my_function(*my_return);\n        return my_return;\n    }\n};\n\n// specialization for int that squares the input and returns that.\ntemplate<>\nclass middle_filter<int,int> : DestroyedTracker {\npublic:\n    int operator()(int my_input) const {\n        CHECK(is_alive());\n        ++non_pointer_specialized_calls;\n        return my_input*my_input;\n    }\n};\n\n// ---------------------------------\ntemplate<typename T>\nclass output_filter : DestroyedTracker {\npublic:\n    void operator()(T c) const {\n        CHECK(is_alive());\n        CHECK_MESSAGE(output_my_id(c), \"unset id value, p:\" << concurrency);\n        CHECK_MESSAGE(output_is_ready(c), \"not yet ready, p:\" << concurrency);\n        ++non_pointer_specialized_calls;\n        output_counter++;\n    }\n};\n\n// specialization for int that puts the received value in an array\ntemplate<>\nclass output_filter<int> : DestroyedTracker {\npublic:\n    void operator()(int my_input) const {\n        CHECK(is_alive());\n        ++non_pointer_specialized_calls;\n        int myindx = output_counter++;\n        intbuffer[myindx] = my_input;\n    }\n};\n\ntemplate<typename T>\nclass output_filter<T*> : DestroyedTracker {\npublic:\n    void operator()(T* c) const {\n        free_on_scope_exit<T> my_ptr(c);\n        CHECK(is_alive());\n        if(c) {\n            CHECK_MESSAGE(output_my_id(*c), \"unset id value, p:\" << concurrency);\n            CHECK_MESSAGE(output_is_ready(*c), \"not yet ready, p:\" << concurrency);\n        }\n        output_counter++;\n        ++pointer_specialized_calls;\n    }\n};\n\ntypedef enum {\n    no_pointer_counts,\n    assert_nonpointer,\n    assert_firstpointer,\n    assert_secondpointer,\n    assert_allpointer\n} final_assert_type;\n\nvoid resetCounters() {\n    output_counter = 0;\n    input_counter = max_counter;\n    non_pointer_specialized_calls = 0;\n    pointer_specialized_calls = 0;\n    first_pointer_specialized_calls = 0;\n    second_pointer_specialized_calls = 0;\n    // we have to reset the buffer flags because our input filters return allocated space on end-of-input,\n    // (on eof a default-constructed object is returned) and they do not pass through the filter further.\n    for(size_t i = 0; i < n_buffers; ++i)\n        buf_in_use[i].clear();\n}\n\nvoid checkCounters(final_assert_type my_t) {\n    CHECK_MESSAGE(output_counter == max_counter, \"Ran out of buffers, p:\" << concurrency);\n    switch(my_t) {\n        case assert_nonpointer:\n            CHECK_MESSAGE(pointer_specialized_calls+first_pointer_specialized_calls+second_pointer_specialized_calls == 0, \"non-pointer filters specialized to pointer, p:\" << concurrency);\n            CHECK_MESSAGE(non_pointer_specialized_calls == 3*max_counter, \"bad count for non-pointer filters, p:\" << concurrency);\n            if(check_intbuffer) {\n                for(int i = 1; i <= max_counter; ++i) {\n                    int j = i*i;\n                    bool found_val = false;\n                    for(int k = 0; k < max_counter; ++k) {\n                        if(intbuffer[k] == j) {\n                            found_val = true;\n                            break;\n                        }\n                    }\n                    CHECK_MESSAGE(found_val, \"Missing value in output array, p:\" << concurrency );\n                }\n            }\n            break;\n        case assert_firstpointer:\n            {\n                bool check = pointer_specialized_calls == max_counter &&  // input filter extra invocation\n                    first_pointer_specialized_calls == max_counter &&\n                    non_pointer_specialized_calls == max_counter &&\n                    second_pointer_specialized_calls == 0;\n                CHECK_MESSAGE(check, \"incorrect specialization for firstpointer, p:\" << concurrency);\n            }\n            break;\n        case assert_secondpointer:\n            {\n                bool check = pointer_specialized_calls == max_counter &&\n                    first_pointer_specialized_calls == 0 &&\n                    non_pointer_specialized_calls == max_counter &&  // input filter\n                    second_pointer_specialized_calls == max_counter;\n                CHECK_MESSAGE(check, \"incorrect specialization for firstpointer, p:\" << concurrency);\n            }\n            break;\n        case assert_allpointer:\n            CHECK_MESSAGE(non_pointer_specialized_calls+first_pointer_specialized_calls+second_pointer_specialized_calls == 0, \"pointer filters specialized to non-pointer, p:\" << concurrency);\n            CHECK_MESSAGE(pointer_specialized_calls == 3*max_counter, \"bad count for pointer filters, p:\" << concurrency);\n            break;\n        case no_pointer_counts:\n            break;\n    }\n}\n\nstatic const tbb::filter_mode filter_table[] = { tbb::filter_mode::parallel, tbb::filter_mode::serial_in_order, tbb::filter_mode::serial_out_of_order};\nconst unsigned number_of_filter_types = sizeof(filter_table)/sizeof(filter_table[0]);\n\nusing filter_chain = tbb::filter<void, void>;\nusing mode_array =tbb::filter_mode;\n\n// The filters are passed by value, which forces a temporary copy to be created.  This is\n// to reproduce the bug where a filter_chain uses refs to filters, which after a call\n// would be references to destructed temporaries.\ntemplate<typename type1, typename type2>\nvoid fill_chain( filter_chain &my_chain, mode_array *filter_type, input_filter<type1> i_filter,\n         middle_filter<type1, type2> m_filter, output_filter<type2> o_filter ) {\n    my_chain = tbb::filter<void, type1>(filter_type[0], i_filter) &\n        tbb::filter<type1, type2>(filter_type[1], m_filter) &\n        tbb::filter<type2, void>(filter_type[2], o_filter);\n}\n\ntemplate<typename... Context>\nvoid run_function_spec(Context&... context) {\n    CHECK_MESSAGE(!filter_node_count, \"invalid filter_node counter\");\n    input_filter<void> i_filter;\n    // Test pipeline that contains only one filter\n    for( unsigned i = 0; i<number_of_filter_types; i++) {\n        tbb::filter<void, void> one_filter( filter_table[i], i_filter );\n        CHECK_MESSAGE(filter_node_count==1, \"some filter nodes left after previous iteration?\");\n        resetCounters();\n        tbb::parallel_pipeline( n_tokens, one_filter, context... );\n        // no need to check counters\n        std::atomic<int> counter;\n        counter = max_counter;\n        // Construct filter using lambda-syntax when parallel_pipeline() is being run;\n        tbb::parallel_pipeline( n_tokens,\n            tbb::filter<void, void>(filter_table[i], [&counter]( tbb::flow_control& control ) {\n                    if( counter-- == 0 )\n                        control.stop();\n                    }\n            ),\n            context...\n        );\n    }\n    CHECK_MESSAGE(!filter_node_count, \"filter_node objects leaked\");\n}\n\ntemplate<typename t1, typename t2, typename... Context>\nvoid run_filter_set(\n        input_filter<t1>& i_filter,\n        middle_filter<t1,t2>& m_filter,\n        output_filter<t2>& o_filter,\n        mode_array *filter_type,\n        final_assert_type my_t,\n        Context&... context) {\n    tbb::filter<void, t1> filter1( filter_type[0], i_filter );\n    tbb::filter<t1, t2> filter2( filter_type[1], m_filter );\n    tbb::filter<t2, void> filter3( filter_type[2], o_filter );\n\n    CHECK_MESSAGE(filter_node_count==3, \"some filter nodes left after previous iteration?\");\n    resetCounters();\n    // Create filters sequence when parallel_pipeline() is being run\n    tbb::parallel_pipeline( n_tokens, filter1, filter2, filter3, context...  );\n    checkCounters(my_t);\n\n    // Create filters sequence partially outside parallel_pipeline() and also when parallel_pipeline() is being run\n    tbb::filter<void, t2> filter12;\n    filter12 = filter1 & filter2;\n    for( int i = 0; i<3; i++)\n    {\n        filter12 &= tbb::filter<t2,t2>(filter_type[i], [](t2 x) -> t2 { return x;});\n    }\n    resetCounters();\n    tbb::parallel_pipeline( n_tokens, filter12, filter3, context...  );\n    checkCounters(my_t);\n\n    tbb::filter<void, void> filter123 = filter12 & filter3;\n    // Run pipeline twice with the same filter sequence\n    for( unsigned i = 0; i<2; i++ ) {\n        resetCounters();\n        tbb::parallel_pipeline( n_tokens, filter123, context...  );\n        checkCounters(my_t);\n    }\n\n    // Now copy-and-move-construct another filter instance, and use it to run pipeline\n    {\n        tbb::filter<void, void> copy123( filter123 );\n        resetCounters();\n        tbb::parallel_pipeline( n_tokens, copy123, context...  );\n        checkCounters(my_t);\n        tbb::filter<void, void> move123( std::move(filter123) );\n        resetCounters();\n        tbb::parallel_pipeline( n_tokens, move123, context...  );\n        checkCounters(my_t);\n    }\n\n    // Construct filters and create the sequence when parallel_pipeline() is being run\n    resetCounters();\n    tbb::parallel_pipeline( n_tokens,\n               tbb::filter<void, t1>(filter_type[0], i_filter),\n               tbb::filter<t1, t2>(filter_type[1], m_filter),\n               tbb::filter<t2, void>(filter_type[2], o_filter),\n               context...  );\n    checkCounters(my_t);\n\n    // Construct filters, make a copy, destroy the original filters, and run with the copy\n    int cnt = filter_node_count;\n    {\n        tbb::filter<void, void>* p123 = new tbb::filter<void,void> (\n               tbb::filter<void, t1>(filter_type[0], i_filter)&\n               tbb::filter<t1, t2>(filter_type[1], m_filter)&\n               tbb::filter<t2, void>(filter_type[2], o_filter) );\n        CHECK_MESSAGE(filter_node_count==cnt+5, \"filter node accounting error?\");\n        tbb::filter<void, void> copy123( *p123 );\n        delete p123;\n        CHECK_MESSAGE(filter_node_count==cnt+5, \"filter nodes deleted prematurely?\");\n        resetCounters();\n        tbb::parallel_pipeline( n_tokens, copy123, context...  );\n        checkCounters(my_t);\n    }\n\n    // construct a filter with temporaries\n    {\n        tbb::filter<void, void> my_filter;\n        fill_chain<t1,t2>( my_filter, filter_type, i_filter, m_filter, o_filter );\n        resetCounters();\n        tbb::parallel_pipeline( n_tokens, my_filter, context...  );\n        checkCounters(my_t);\n    }\n    CHECK_MESSAGE(filter_node_count==cnt, \"scope ended but filter nodes not deleted?\");\n}\n\ntemplate <typename t1, typename t2, typename... Context>\nvoid run_lambdas_test( mode_array *filter_type, Context&... context ) {\n    std::atomic<int> counter;\n    counter = max_counter;\n    // Construct filters using lambda-syntax and create the sequence when parallel_pipeline() is being run;\n    resetCounters();  // only need the output_counter reset.\n    tbb::parallel_pipeline( n_tokens,\n        tbb::make_filter<void, t1>(filter_type[0], [&counter]( tbb::flow_control& control ) -> t1 {\n                if( --counter < 0 )\n                    control.stop();\n                return t1(); }\n        ),\n        tbb::make_filter<t1, t2>(filter_type[1], []( t1 /*my_storage*/ ) -> t2 {\n                return t2(); }\n        ),\n        tbb::make_filter<t2,void>(filter_type[2], [] ( t2 ) -> void {\n                output_counter++; }\n        ),\n        context...\n    );\n    checkCounters(no_pointer_counts);  // don't have to worry about specializations\n    counter = max_counter;\n    // pointer filters\n    resetCounters();\n    tbb::parallel_pipeline( n_tokens,\n        tbb::filter<void,t1*>(filter_type[0], [&counter]( tbb::flow_control& control ) -> t1* {\n                if( --counter < 0 ) {\n                    control.stop();\n                    return nullptr;\n                }\n                return new(fetchNextBuffer()) t1(); }\n        ),\n\t\ttbb::filter<t1*, t2*>(filter_type[1], []( t1* my_storage ) -> t2* {\n                my_storage->~t1();\n                return new(my_storage) t2(); }\n        ),\n\t\ttbb::filter<t2*, void>(filter_type[2], [] ( t2* my_storage ) -> void {\n                my_storage->~t2();\n                freeBuffer(my_storage);\n                output_counter++; }\n        ),\n        context...\n    );\n    checkCounters(no_pointer_counts);\n    // first filter outputs pointer\n    counter = max_counter;\n    resetCounters();\n    tbb::parallel_pipeline( n_tokens,\n        tbb::make_filter(filter_type[0], [&counter]( tbb::flow_control& control ) -> t1* {\n                if( --counter < 0 ) {\n                    control.stop();\n                    return nullptr;\n                }\n                return new(fetchNextBuffer()) t1(); }\n        )&\n        tbb::make_filter(filter_type[1], []( t1* my_storage ) -> t2 {\n                my_storage->~t1();\n                freeBuffer(my_storage);\n                return t2(); }\n        ),\n        tbb::make_filter(filter_type[2], [] ( t2 /*my_storage*/) -> void {\n                output_counter++; }\n        ),\n        context...\n    );\n    checkCounters(no_pointer_counts);\n    // second filter outputs pointer\n    counter = max_counter;\n    resetCounters();\n    tbb::parallel_pipeline( n_tokens,\n        tbb::make_filter(filter_type[0], [&counter]( tbb::flow_control& control ) -> t1 {\n                if( --counter < 0 ) {\n                    control.stop();\n                }\n                return t1(); }\n        ),\n        tbb::filter<t1, t2*>(filter_type[1], []( t1 /*my_storage*/ ) -> t2* {\n                return new(fetchNextBuffer()) t2(); }\n        )&\n        tbb::make_filter<t2*, void>(filter_type[2], [] ( t2* my_storage) -> void {\n                my_storage->~t2();\n                freeBuffer(my_storage);\n                output_counter++; }\n        ),\n        context...\n    );\n    checkCounters(no_pointer_counts);\n}\n\ntemplate<typename type1, typename type2>\nvoid run_function(const char *l1, const char *l2) {\n    CHECK_MESSAGE(!filter_node_count, \"invalid filter_node counter\");\n\n    check_intbuffer = (!strcmp(l1,\"int\") && !strcmp(l2,\"int\"));\n\n    Checker<type1> check1;  // check constructions/destructions\n    Checker<type2> check2;  // for type1 or type2 === CheckType<T>\n\n    const size_t number_of_filters = 3;\n\n    input_filter<type1> i_filter;\n    input_filter<type1*> p_i_filter;\n\n    middle_filter<type1, type2> m_filter;\n    middle_filter<type1*, type2> pr_m_filter;\n    middle_filter<type1, type2*> rp_m_filter;\n    middle_filter<type1*, type2*> pp_m_filter;\n\n    output_filter<type2> o_filter;\n    output_filter<type2*> p_o_filter;\n\n    // allocate the buffers for the filters\n    unsigned max_size = (sizeof(type1) > sizeof(type2) ) ? sizeof(type1) : sizeof(type2);\n    for(unsigned i = 0; i < (unsigned)n_buffers; ++i) {\n        buffers[i] = malloc(max_size);\n        buf_in_use[i].clear();\n    }\n\n    unsigned limit = 1;\n    // Test pipeline that contains number_of_filters filters\n    for( unsigned i=0; i<number_of_filters; ++i)\n        limit *= number_of_filter_types;\n    // Iterate over possible filter sequences\n    for( unsigned numeral=0; numeral<limit; ++numeral ) {\n        unsigned temp = numeral;\n        tbb::filter_mode filter_type[number_of_filter_types];\n        for( unsigned i=0; i<number_of_filters; ++i, temp/=number_of_filter_types )\n            filter_type[i] = filter_table[temp%number_of_filter_types];\n\n        tbb::task_group_context context;\n        run_filter_set<type1,type2>(i_filter, m_filter, o_filter, filter_type, assert_nonpointer);\n        run_filter_set<type1,type2>(i_filter, m_filter, o_filter, filter_type, assert_nonpointer, context);\n        run_filter_set<type1*,type2>(p_i_filter, pr_m_filter, o_filter, filter_type, assert_firstpointer);\n        run_filter_set<type1*,type2>(p_i_filter, pr_m_filter, o_filter, filter_type, assert_firstpointer, context);\n        run_filter_set<type1,type2*>(i_filter, rp_m_filter, p_o_filter, filter_type, assert_secondpointer);\n        run_filter_set<type1,type2*>(i_filter, rp_m_filter, p_o_filter, filter_type, assert_secondpointer, context);\n        run_filter_set<type1*,type2*>(p_i_filter, pp_m_filter, p_o_filter, filter_type, assert_allpointer);\n        run_filter_set<type1*,type2*>(p_i_filter, pp_m_filter, p_o_filter, filter_type, assert_allpointer, context);\n\n        run_lambdas_test<type1,type2>(filter_type);\n        run_lambdas_test<type1,type2>(filter_type, context);\n    }\n    CHECK_MESSAGE(!filter_node_count, \"filter_node objects leaked\");\n\n    for(unsigned i = 0; i < (unsigned)n_buffers; ++i) {\n        free(buffers[i]);\n    }\n}\n\n//! Testing single filter pipeline\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Pipeline testing for single filter\") {\n    run_function_spec();\n    tbb::task_group_context context;\n    run_function_spec(context);\n}\n\n#define RUN_TYPED_TEST_CASE(type1, type2) TEST_CASE(\"Pipeline testing with \"#type1\" and \"#type2) { \\\n                                                for ( std::size_t concurrency_level : {1, 2, 4, 5, 7, 8} ) { \\\n                                                    if ( concurrency_level > tbb::global_control::active_value(tbb::global_control::max_allowed_parallelism) ) \\\n                                                        break; \\\n                                                    concurrency = concurrency_level; \\\n                                                    tbb::global_control control(tbb::global_control::max_allowed_parallelism, concurrency_level); \\\n                                                    run_function<type1, type2>(#type1, #type2); \\\n                                                } \\\n                                            }\n// Run test several times with different types\nRUN_TYPED_TEST_CASE(std::size_t, int)\nRUN_TYPED_TEST_CASE(int, double)\nRUN_TYPED_TEST_CASE(std::size_t, double)\nRUN_TYPED_TEST_CASE(std::size_t, bool)\nRUN_TYPED_TEST_CASE(int, int)\nRUN_TYPED_TEST_CASE(CheckType<unsigned int>, std::size_t)\nRUN_TYPED_TEST_CASE(CheckType<unsigned short>, std::size_t)\nRUN_TYPED_TEST_CASE(CheckType<unsigned int>, CheckType<unsigned int>)\nRUN_TYPED_TEST_CASE(CheckType<unsigned int>, CheckType<unsigned short>)\nRUN_TYPED_TEST_CASE(CheckType<unsigned short>, CheckType<unsigned short>)\nRUN_TYPED_TEST_CASE(double, CheckType<unsigned short>)\nRUN_TYPED_TEST_CASE(std::unique_ptr<int>, std::unique_ptr<int>) // move-only type\n\n#undef RUN_TYPED_TEST_CASE\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_parallel_reduce.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include <atomic>\n\n#include \"common/parallel_reduce_common.h\"\n#include \"common/cpu_usertime.h\"\n#include \"common/exception_handling.h\"\n#include \"common/concepts_common.h\"\n\n//! \\file test_parallel_reduce.cpp\n//! \\brief Test for [algorithms.parallel_reduce algorithms.parallel_deterministic_reduce] specification\n\n#if _MSC_VER\n#pragma warning (push)\n// Suppress conditional expression is constant\n#pragma warning (disable: 4127)\n#endif //#if _MSC_VER\n\nusing ValueType = uint64_t;\n\nstruct Sum {\n    template<typename T>\n    T operator() ( const T& v1, const T& v2 ) const {\n        return v1 + v2;\n    }\n};\n\nstruct Accumulator {\n    ValueType operator() ( const tbb::blocked_range<ValueType*>& r, ValueType value ) const {\n        for ( ValueType* pv = r.begin(); pv != r.end(); ++pv )\n            value += *pv;\n        return value;\n    }\n};\n\nclass ParallelSumTester {\npublic:\n    ParallelSumTester( const ParallelSumTester& ) = default;\n    void operator=( const ParallelSumTester& ) = delete;\n\n    ParallelSumTester() : m_range(nullptr, nullptr) {\n        m_array = new ValueType[unsigned(count)];\n        for ( ValueType i = 0; i < count; ++i )\n            m_array[i] = i + 1;\n        m_range = tbb::blocked_range<ValueType*>( m_array, m_array + count );\n    }\n    ~ParallelSumTester() { delete[] m_array; }\n\n    template<typename Partitioner>\n    void CheckParallelReduce() {\n        Partitioner partitioner;\n        ValueType result1 = reduce_invoker<ValueType>( m_range, Accumulator(), Sum(), partitioner );\n        REQUIRE_MESSAGE( result1 == expected, \"Wrong parallel summation result\" );\n        ValueType result2 = reduce_invoker<ValueType>( m_range,\n            [](const tbb::blocked_range<ValueType*>& r, ValueType value) -> ValueType {\n                for ( const ValueType* pv = r.begin(); pv != r.end(); ++pv )\n                    value += *pv;\n                return value;\n            },\n            Sum(),\n            partitioner\n        );\n        REQUIRE_MESSAGE( result2 == expected, \"Wrong parallel summation result\" );\n    }\nprivate:\n    ValueType* m_array;\n    tbb::blocked_range<ValueType*> m_range;\n    static const ValueType count, expected;\n};\n\nconst ValueType ParallelSumTester::count = 1000000;\nconst ValueType ParallelSumTester::expected = count * (count + 1) / 2;\n\nnamespace test_cancellation {\n\nstruct ReduceToCancel {\n    std::size_t operator()( const tbb::blocked_range<std::size_t>&, std::size_t ) const {\n        ++g_CurExecuted;\n        Cancellator::WaitUntilReady();\n        return 1;\n    }\n}; // struct ReduceToCancel\n\nstruct JoinToCancel {\n    std::size_t operator()( std::size_t, std::size_t ) const {\n        ++g_CurExecuted;\n        Cancellator::WaitUntilReady();\n        return 1;\n    }\n}; // struct Join\n\nstruct ReduceFunctorToCancel {\n    std::size_t result;\n\n    ReduceFunctorToCancel() : result(0) {}\n    ReduceFunctorToCancel( ReduceFunctorToCancel&, tbb::split ) : result(0) {}\n\n    void operator()( const tbb::blocked_range<std::size_t>& br ) {\n        result = ReduceToCancel{}(br, result);\n    }\n\n    void join( ReduceFunctorToCancel& rhs ) {\n        result = JoinToCancel{}(result, rhs.result);\n    }\n}; // struct ReduceFunctorToCancel\n\nstatic constexpr std::size_t buffer_test_size = 1024;\nstatic constexpr std::size_t maxParallelReduceRunnerMode = 9;\n\ntemplate <std::size_t Mode>\nclass ParallelReduceRunner {\n    tbb::task_group_context& my_ctx;\n\n    static_assert(Mode >= 0 && Mode <= maxParallelReduceRunnerMode, \"Incorrect mode for ParallelReduceTask\");\n\n    template <typename... Args>\n    void run_parallel_reduce( Args&&... args ) const {\n        switch(Mode % 5) {\n            case 0 : {\n                tbb::parallel_reduce(std::forward<Args>(args)..., my_ctx);\n                break;\n            }\n            case 1 : {\n                tbb::parallel_reduce(std::forward<Args>(args)..., tbb::simple_partitioner{}, my_ctx);\n                break;\n            }\n            case 2 : {\n                tbb::parallel_reduce(std::forward<Args>(args)..., tbb::auto_partitioner{}, my_ctx);\n                break;\n            }\n            case 3 : {\n                tbb::parallel_reduce(std::forward<Args>(args)..., tbb::static_partitioner{}, my_ctx);\n                break;\n            }\n            case 4 : {\n                tbb::affinity_partitioner aff;\n                tbb::parallel_reduce(std::forward<Args>(args)..., aff, my_ctx);\n                break;\n            }\n        }\n    }\n\npublic:\n    ParallelReduceRunner( tbb::task_group_context& ctx )\n        : my_ctx(ctx) {}\n\n    void operator()() const {\n        tbb::blocked_range<std::size_t> br(0, buffer_test_size);\n        if (Mode < 5) {\n            ReduceFunctorToCancel functor;\n            run_parallel_reduce(br, functor);\n        } else {\n            run_parallel_reduce(br, std::size_t(0), ReduceToCancel{}, JoinToCancel{});\n        }\n    }\n}; // class ParallelReduceRunner\n\nstatic constexpr std::size_t maxParallelDeterministicReduceRunnerMode = 5;\n\n// TODO: unify with ParallelReduceRunner\ntemplate <std::size_t Mode>\nclass ParallelDeterministicReduceRunner {\n    tbb::task_group_context& my_ctx;\n\n    static_assert(Mode >= 0 && Mode <= maxParallelDeterministicReduceRunnerMode, \"Incorrect Mode for deterministic_reduce task\");\n\n    template <typename... Args>\n    void run_parallel_deterministic_reduce( Args&&... args ) const {\n        switch(Mode % 3) {\n            case 0 : {\n                tbb::parallel_deterministic_reduce(std::forward<Args>(args)..., my_ctx);\n                break;\n            }\n            case 1 : {\n                tbb::parallel_deterministic_reduce(std::forward<Args>(args)..., tbb::simple_partitioner{}, my_ctx);\n                break;\n            }\n            case 2 : {\n                tbb::parallel_deterministic_reduce(std::forward<Args>(args)..., tbb::static_partitioner{}, my_ctx);\n                break;\n            }\n        }\n    }\n\npublic:\n    ParallelDeterministicReduceRunner( tbb::task_group_context& ctx )\n        : my_ctx(ctx) {}\n\n    void operator()() const {\n        tbb::blocked_range<std::size_t> br(0, buffer_test_size);\n        if (Mode < 3) {\n            ReduceFunctorToCancel functor;\n            run_parallel_deterministic_reduce(br, functor);\n        } else {\n            run_parallel_deterministic_reduce(br, std::size_t(0), ReduceToCancel{}, JoinToCancel{});\n        }\n    }\n}; // class ParallelDeterministicReduceRunner\n\ntemplate <std::size_t Mode>\nvoid run_parallel_reduce_cancellation_test() {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        if (concurrency_level < 2) continue;\n\n        tbb::global_control gc(tbb::global_control::max_allowed_parallelism, concurrency_level);\n        ResetEhGlobals();\n        RunCancellationTest<ParallelReduceRunner<Mode>, Cancellator>();\n    }\n}\n\ntemplate <std::size_t Mode>\nvoid run_parallel_deterministic_reduce_cancellation_test() {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        if (concurrency_level < 2) continue;\n\n        tbb::global_control gc(tbb::global_control::max_allowed_parallelism, concurrency_level);\n        ResetEhGlobals();\n        RunCancellationTest<ParallelDeterministicReduceRunner<Mode>, Cancellator>();\n    }\n}\n\ntemplate <std::size_t Mode>\nstruct ParallelReduceTestRunner {\n    static void run() {\n        run_parallel_reduce_cancellation_test<Mode>();\n        ParallelReduceTestRunner<Mode + 1>::run();\n    }\n}; // struct ParallelReduceTestRunner\n\ntemplate <>\nstruct ParallelReduceTestRunner<maxParallelReduceRunnerMode> {\n    static void run() {\n        run_parallel_reduce_cancellation_test<maxParallelReduceRunnerMode>();\n    }\n}; // struct ParallelReduceTestRunner<maxParallelReduceRunnerMode>\n\ntemplate <std::size_t Mode>\nstruct ParallelDeterministicReduceTestRunner {\n    static void run() {\n        run_parallel_deterministic_reduce_cancellation_test<Mode>();\n        ParallelDeterministicReduceTestRunner<Mode + 1>::run();\n    }\n}; // struct ParallelDeterministicReduceTestRunner\n\ntemplate <>\nstruct ParallelDeterministicReduceTestRunner<maxParallelDeterministicReduceRunnerMode> {\n    static void run() {\n        run_parallel_deterministic_reduce_cancellation_test<maxParallelDeterministicReduceRunnerMode>();\n    }\n}; // struct ParallelDeterministicReduceTestRunner<maxParallelDeterministicReduceRunnerMode>\n\n} // namespace test_cancellation\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\ntemplate <typename... Args>\nconcept can_call_parallel_reduce_basic = requires( Args&&... args ) {\n    tbb::parallel_reduce(std::forward<Args>(args)...);\n};\n\ntemplate <typename... Args>\nconcept can_call_parallel_deterministic_reduce_basic = requires ( Args&&... args ) {\n    tbb::parallel_deterministic_reduce(std::forward<Args>(args)...);\n};\n\ntemplate <typename... Args>\nconcept can_call_preduce_helper = can_call_parallel_reduce_basic<Args...> &&\n                                  can_call_parallel_reduce_basic<Args..., tbb::task_group_context&>;\n\ntemplate <typename... Args>\nconcept can_call_pdet_reduce_helper = can_call_parallel_deterministic_reduce_basic<Args...> &&\n                                      can_call_parallel_deterministic_reduce_basic<Args..., tbb::task_group_context&>;\n\ntemplate <typename... Args>\nconcept can_call_preduce_with_partitioner = can_call_preduce_helper<Args...> &&\n                                            can_call_preduce_helper<Args..., const tbb::simple_partitioner&> &&\n                                            can_call_preduce_helper<Args..., const tbb::auto_partitioner&> &&\n                                            can_call_preduce_helper<Args..., const tbb::static_partitioner&> &&\n                                            can_call_preduce_helper<Args..., tbb::affinity_partitioner&>;\n\ntemplate <typename... Args>\nconcept can_call_pdet_reduce_with_partitioner = can_call_pdet_reduce_helper<Args...> &&\n                                                can_call_pdet_reduce_helper<Args..., const tbb::simple_partitioner&> &&\n                                                can_call_pdet_reduce_helper<Args..., const tbb::static_partitioner&>;\n\ntemplate <typename Range, typename Body>\nconcept can_call_imperative_preduce = can_call_preduce_with_partitioner<const Range&, Body&>;\n\ntemplate <typename Range, typename Body>\nconcept can_call_imperative_pdet_reduce = can_call_pdet_reduce_with_partitioner<const Range&, Body&>;\n\ntemplate <typename Range, typename Value, typename RealBody, typename Reduction>\nconcept can_call_functional_preduce = can_call_preduce_with_partitioner<const Range&, const Value&,\n                                                                        const RealBody&, const Reduction&>;\n\ntemplate <typename Range, typename Value, typename RealBody, typename Reduction>\nconcept can_call_functional_pdet_reduce = can_call_pdet_reduce_with_partitioner<const Range&, const Value&,\n                                                                                const RealBody&, const Reduction&>;\n\ntemplate <typename Range>\nusing CorrectBody = test_concepts::parallel_reduce_body::Correct<Range>;\n\ntemplate <typename Range>\nusing CorrectFunc = test_concepts::parallel_reduce_function::Correct<Range>;\n\nusing CorrectReduction = test_concepts::parallel_reduce_combine::Correct<int>;\nusing CorrectRange = test_concepts::range::Correct;\n\nvoid test_preduce_range_constraints() {\n    using namespace test_concepts::range;\n    static_assert(can_call_imperative_preduce<Correct, CorrectBody<Correct>>);\n    static_assert(!can_call_imperative_preduce<NonCopyable, CorrectBody<NonCopyable>>);\n    static_assert(!can_call_imperative_preduce<NonDestructible, CorrectBody<NonDestructible>>);\n    static_assert(!can_call_imperative_preduce<NonSplittable, CorrectBody<NonSplittable>>);\n    static_assert(!can_call_imperative_preduce<NoEmpty, CorrectBody<NoEmpty>>);\n    static_assert(!can_call_imperative_preduce<EmptyNonConst, CorrectBody<EmptyNonConst>>);\n    static_assert(!can_call_imperative_preduce<WrongReturnEmpty, CorrectBody<WrongReturnEmpty>>);\n    static_assert(!can_call_imperative_preduce<NoIsDivisible, CorrectBody<NoIsDivisible>>);\n    static_assert(!can_call_imperative_preduce<IsDivisibleNonConst, CorrectBody<NoIsDivisible>>);\n    static_assert(!can_call_imperative_preduce<WrongReturnIsDivisible, CorrectBody<WrongReturnIsDivisible>>);\n\n    static_assert(can_call_functional_preduce<Correct, int, CorrectFunc<Correct>, CorrectReduction>);\n    static_assert(!can_call_functional_preduce<NonCopyable, int, CorrectFunc<NonCopyable>, CorrectReduction>);\n    static_assert(!can_call_functional_preduce<NonDestructible, int, CorrectFunc<NonDestructible>, CorrectReduction>);\n    static_assert(!can_call_functional_preduce<NonSplittable, int, CorrectFunc<NonSplittable>, CorrectReduction>);\n    static_assert(!can_call_functional_preduce<NoEmpty, int, CorrectFunc<NoEmpty>, CorrectReduction>);\n    static_assert(!can_call_functional_preduce<EmptyNonConst, int, CorrectFunc<EmptyNonConst>, CorrectReduction>);\n    static_assert(!can_call_functional_preduce<WrongReturnEmpty, int, CorrectFunc<WrongReturnEmpty>, CorrectReduction>);\n    static_assert(!can_call_functional_preduce<NoIsDivisible, int, CorrectFunc<NoIsDivisible>, CorrectReduction>);\n    static_assert(!can_call_functional_preduce<IsDivisibleNonConst, int, CorrectFunc<IsDivisibleNonConst>, CorrectReduction>);\n    static_assert(!can_call_functional_preduce<WrongReturnIsDivisible, int, CorrectFunc<WrongReturnIsDivisible>, CorrectReduction>);\n}\n\nvoid test_preduce_body_constraints() {\n    using namespace test_concepts::parallel_reduce_body;\n    static_assert(can_call_imperative_preduce<CorrectRange, Correct<CorrectRange>>);\n    static_assert(!can_call_imperative_preduce<CorrectRange, NonSplittable<CorrectRange>>);\n    static_assert(!can_call_imperative_preduce<CorrectRange, NonDestructible<CorrectRange>>);\n    static_assert(!can_call_imperative_preduce<CorrectRange, NoOperatorRoundBrackets<CorrectRange>>);\n    static_assert(!can_call_imperative_preduce<CorrectRange, WrongInputOperatorRoundBrackets<CorrectRange>>);\n    static_assert(!can_call_imperative_preduce<CorrectRange, NoJoin<CorrectRange>>);\n    static_assert(!can_call_imperative_preduce<CorrectRange, WrongInputJoin<CorrectRange>>);\n}\n\nvoid test_preduce_func_constraints() {\n    using namespace test_concepts::parallel_reduce_function;\n    static_assert(can_call_functional_preduce<CorrectRange, int, Correct<CorrectRange>, CorrectReduction>);\n    static_assert(!can_call_functional_preduce<CorrectRange, int, NoOperatorRoundBrackets<CorrectRange>, CorrectReduction>);\n    static_assert(!can_call_functional_preduce<CorrectRange, int, OperatorRoundBracketsNonConst<CorrectRange>, CorrectReduction>);\n    static_assert(!can_call_functional_preduce<CorrectRange, int, WrongFirstInputOperatorRoundBrackets<CorrectRange>, CorrectReduction>);\n    static_assert(!can_call_functional_preduce<CorrectRange, int, WrongSecondInputOperatorRoundBrackets<CorrectRange>, CorrectReduction>);\n    static_assert(!can_call_functional_preduce<CorrectRange, int, WrongReturnOperatorRoundBrackets<CorrectRange>, CorrectReduction>);\n}\n\nvoid test_preduce_combine_constraints() {\n    using namespace test_concepts::parallel_reduce_combine;\n    static_assert(can_call_functional_preduce<CorrectRange, int, CorrectFunc<CorrectRange>, Correct<int>>);\n    static_assert(!can_call_functional_preduce<CorrectRange, int, CorrectFunc<CorrectRange>, NoOperatorRoundBrackets<int>>);\n    static_assert(!can_call_functional_preduce<CorrectRange, int, CorrectFunc<CorrectRange>, OperatorRoundBracketsNonConst<int>>);\n    static_assert(!can_call_functional_preduce<CorrectRange, int, CorrectFunc<CorrectRange>, WrongFirstInputOperatorRoundBrackets<int>>);\n    static_assert(!can_call_functional_preduce<CorrectRange, int, CorrectFunc<CorrectRange>, WrongSecondInputOperatorRoundBrackets<int>>);\n    static_assert(!can_call_functional_preduce<CorrectRange, int, CorrectFunc<CorrectRange>, WrongReturnOperatorRoundBrackets<int>>);\n}\n\nvoid test_pdet_reduce_range_constraints() {\n    using namespace test_concepts::range;\n    static_assert(can_call_imperative_pdet_reduce<Correct, CorrectBody<Correct>>);\n    static_assert(!can_call_imperative_pdet_reduce<NonCopyable, CorrectBody<NonCopyable>>);\n    static_assert(!can_call_imperative_pdet_reduce<NonDestructible, CorrectBody<NonDestructible>>);\n    static_assert(!can_call_imperative_pdet_reduce<NonSplittable, CorrectBody<NonSplittable>>);\n    static_assert(!can_call_imperative_pdet_reduce<NoEmpty, CorrectBody<NoEmpty>>);\n    static_assert(!can_call_imperative_pdet_reduce<EmptyNonConst, CorrectBody<EmptyNonConst>>);\n    static_assert(!can_call_imperative_pdet_reduce<WrongReturnEmpty, CorrectBody<WrongReturnEmpty>>);\n    static_assert(!can_call_imperative_pdet_reduce<NoIsDivisible, CorrectBody<NoIsDivisible>>);\n    static_assert(!can_call_imperative_pdet_reduce<IsDivisibleNonConst, CorrectBody<NoIsDivisible>>);\n    static_assert(!can_call_imperative_pdet_reduce<WrongReturnIsDivisible, CorrectBody<WrongReturnIsDivisible>>);\n\n    static_assert(can_call_functional_pdet_reduce<Correct, int, CorrectFunc<Correct>, CorrectReduction>);\n    static_assert(!can_call_functional_pdet_reduce<NonCopyable, int, CorrectFunc<NonCopyable>, CorrectReduction>);\n    static_assert(!can_call_functional_pdet_reduce<NonDestructible, int, CorrectFunc<NonDestructible>, CorrectReduction>);\n    static_assert(!can_call_functional_pdet_reduce<NonSplittable, int, CorrectFunc<NonSplittable>, CorrectReduction>);\n    static_assert(!can_call_functional_pdet_reduce<NoEmpty, int, CorrectFunc<NoEmpty>, CorrectReduction>);\n    static_assert(!can_call_functional_pdet_reduce<EmptyNonConst, int, CorrectFunc<EmptyNonConst>, CorrectReduction>);\n    static_assert(!can_call_functional_pdet_reduce<WrongReturnEmpty, int, CorrectFunc<WrongReturnEmpty>, CorrectReduction>);\n    static_assert(!can_call_functional_pdet_reduce<NoIsDivisible, int, CorrectFunc<NoIsDivisible>, CorrectReduction>);\n    static_assert(!can_call_functional_pdet_reduce<IsDivisibleNonConst, int, CorrectFunc<IsDivisibleNonConst>, CorrectReduction>);\n    static_assert(!can_call_functional_pdet_reduce<WrongReturnIsDivisible, int, CorrectFunc<WrongReturnIsDivisible>, CorrectReduction>);\n}\n\nvoid test_pdet_reduce_body_constraints() {\n    using namespace test_concepts::parallel_reduce_body;\n    static_assert(can_call_imperative_pdet_reduce<CorrectRange, Correct<CorrectRange>>);\n    static_assert(!can_call_imperative_pdet_reduce<CorrectRange, NonSplittable<CorrectRange>>);\n    static_assert(!can_call_imperative_pdet_reduce<CorrectRange, NonDestructible<CorrectRange>>);\n    static_assert(!can_call_imperative_pdet_reduce<CorrectRange, NoOperatorRoundBrackets<CorrectRange>>);\n    static_assert(!can_call_imperative_pdet_reduce<CorrectRange, WrongInputOperatorRoundBrackets<CorrectRange>>);\n    static_assert(!can_call_imperative_pdet_reduce<CorrectRange, NoJoin<CorrectRange>>);\n    static_assert(!can_call_imperative_pdet_reduce<CorrectRange, WrongInputJoin<CorrectRange>>);\n}\n\nvoid test_pdet_reduce_func_constraints() {\n    using namespace test_concepts::parallel_reduce_function;\n    static_assert(can_call_functional_pdet_reduce<CorrectRange, int, Correct<CorrectRange>, CorrectReduction>);\n    static_assert(!can_call_functional_pdet_reduce<CorrectRange, int, NoOperatorRoundBrackets<CorrectRange>, CorrectReduction>);\n    static_assert(!can_call_functional_pdet_reduce<CorrectRange, int, OperatorRoundBracketsNonConst<CorrectRange>, CorrectReduction>);\n    static_assert(!can_call_functional_pdet_reduce<CorrectRange, int, WrongFirstInputOperatorRoundBrackets<CorrectRange>, CorrectReduction>);\n    static_assert(!can_call_functional_pdet_reduce<CorrectRange, int, WrongSecondInputOperatorRoundBrackets<CorrectRange>, CorrectReduction>);\n    static_assert(!can_call_functional_pdet_reduce<CorrectRange, int, WrongReturnOperatorRoundBrackets<CorrectRange>, CorrectReduction>);\n}\n\nvoid test_pdet_reduce_combine_constraints() {\n    using namespace test_concepts::parallel_reduce_combine;\n    static_assert(can_call_functional_pdet_reduce<CorrectRange, int, CorrectFunc<CorrectRange>, Correct<int>>);\n    static_assert(!can_call_functional_pdet_reduce<CorrectRange, int, CorrectFunc<CorrectRange>, NoOperatorRoundBrackets<int>>);\n    static_assert(!can_call_functional_pdet_reduce<CorrectRange, int, CorrectFunc<CorrectRange>, OperatorRoundBracketsNonConst<int>>);\n    static_assert(!can_call_functional_pdet_reduce<CorrectRange, int, CorrectFunc<CorrectRange>, WrongFirstInputOperatorRoundBrackets<int>>);\n    static_assert(!can_call_functional_pdet_reduce<CorrectRange, int, CorrectFunc<CorrectRange>, WrongSecondInputOperatorRoundBrackets<int>>);\n    static_assert(!can_call_functional_pdet_reduce<CorrectRange, int, CorrectFunc<CorrectRange>, WrongReturnOperatorRoundBrackets<int>>);\n}\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n\n//! Test parallel summation correctness\n//! \\brief \\ref stress\nTEST_CASE(\"Test parallel summation correctness\") {\n    ParallelSumTester pst;\n    pst.CheckParallelReduce<utils_default_partitioner>();\n    pst.CheckParallelReduce<tbb::simple_partitioner>();\n    pst.CheckParallelReduce<tbb::auto_partitioner>();\n    pst.CheckParallelReduce<tbb::affinity_partitioner>();\n    pst.CheckParallelReduce<tbb::static_partitioner>();\n}\n\nstatic std::atomic<long> ForkCount;\nstatic std::atomic<long> FooBodyCount;\n\n//! Class with public interface that is exactly minimal requirements for Range concept\nclass MinimalRange {\n    size_t begin, end;\n    friend class FooBody;\n    explicit MinimalRange( size_t i ) : begin(0), end(i) {}\n    template <typename Partitioner_> friend void TestSplitting( std::size_t nthread );\npublic:\n    MinimalRange( MinimalRange& r, tbb::split ) : end(r.end) {\n        begin = r.end = (r.begin+r.end)/2;\n    }\n    bool is_divisible() const {return end-begin>=2;}\n    bool empty() const {return begin==end;}\n};\n\n//! Class with public interface that is exactly minimal requirements for Body of a parallel_reduce\nclass FooBody {\nprivate:\n    FooBody( const FooBody& );          // Deny access\n    void operator=( const FooBody& );   // Deny access\n    template <typename Partitioner_> friend void TestSplitting( std::size_t nthread );\n    //! Parent that created this body via split operation.  nullptr if original body.\n    FooBody* parent;\n    //! Total number of index values processed by body and its children.\n    size_t sum;\n    //! Range that has been processed so far by this body and its children.\n    size_t begin, end;\n    //! True if body has not yet been processed at least once by operator().\n    bool is_new;\n    //! 1 if body was created by split; 0 if original body.\n    int forked;\n    FooBody() {++FooBodyCount;}\npublic:\n    ~FooBody() {\n        forked = 0xDEADBEEF;\n        sum=0xDEADBEEF;\n        --FooBodyCount;\n    }\n    FooBody( FooBody& other, tbb::split ) {\n        ++FooBodyCount;\n        ++ForkCount;\n        sum = 0;\n        parent = &other;\n        is_new = true;\n        forked = 1;\n    }\n\n    void init() {\n        sum = 0;\n        parent = nullptr;\n        is_new = true;\n        forked = 0;\n        begin = ~size_t(0);\n        end = ~size_t(0);\n    }\n\n    void join( FooBody& s ) {\n        REQUIRE( s.forked==1 );\n        REQUIRE( this!=&s );\n        REQUIRE( this==s.parent );\n        REQUIRE( end==s.begin );\n        end = s.end;\n        sum += s.sum;\n        s.forked = 2;\n    }\n    void operator()( const MinimalRange& r ) {\n        for( size_t k=r.begin; k<r.end; ++k )\n            ++sum;\n        if( is_new ) {\n            is_new = false;\n            begin = r.begin;\n        } else\n            REQUIRE( end==r.begin );\n        end = r.end;\n    }\n};\n\ntemplate<typename Partitioner>\nvoid TestSplitting( std::size_t nthread ) {\n    ForkCount = 0;\n    Partitioner partitioner;\n    for( size_t i=0; i<=1000; ++i ) {\n        FooBody f;\n        f.init();\n        REQUIRE_MESSAGE( FooBodyCount==1, \"Wrong initial BodyCount value\" );\n        reduce_invoker(MinimalRange(i), f, partitioner);\n\n        if (nthread == 1) REQUIRE_MESSAGE(ForkCount==0, \"Body was split during 1 thread execution\");\n\n        REQUIRE_MESSAGE( FooBodyCount==1, \"Some copies of FooBody was not removed after reduction\");\n        REQUIRE_MESSAGE( f.sum==i, \"Incorrect reduction\" );\n        REQUIRE_MESSAGE( f.begin==(i==0 ? ~size_t(0) : 0), \"Incorrect range borders\" );\n        REQUIRE_MESSAGE( f.end==(i==0 ? ~size_t(0) : i), \"Incorrect range borders\" );\n    }\n}\n\n//! Test splitting range and body during reduction, test that all workers sleep when no work\n//! \\brief \\ref resource_usage \\ref error_guessing\nTEST_CASE(\"Test splitting range and body during reduction, test that all workers sleep when no work\") {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        tbb::global_control control(tbb::global_control::max_allowed_parallelism, concurrency_level);\n\n        TestSplitting<tbb::simple_partitioner>(concurrency_level);\n        TestSplitting<tbb::static_partitioner>(concurrency_level);\n        TestSplitting<tbb::auto_partitioner>(concurrency_level);\n        TestSplitting<tbb::affinity_partitioner>(concurrency_level);\n        TestSplitting<utils_default_partitioner>(concurrency_level);\n\n        // Test that all workers sleep when no work\n        TestCPUUserTime(concurrency_level);\n    }\n}\n\n//! Define overloads of parallel_deterministic_reduce that accept \"undesired\" types of partitioners\nnamespace unsupported {\n    template<typename Range, typename Body>\n    void parallel_deterministic_reduce(const Range&, Body&, const tbb::auto_partitioner&) { }\n    template<typename Range, typename Body>\n    void parallel_deterministic_reduce(const Range&, Body&, tbb::affinity_partitioner&) { }\n\n    template<typename Range, typename Value, typename RealBody, typename Reduction>\n    Value parallel_deterministic_reduce(const Range& , const Value& identity, const RealBody& , const Reduction& , const tbb::auto_partitioner&) {\n        return identity;\n    }\n    template<typename Range, typename Value, typename RealBody, typename Reduction>\n    Value parallel_deterministic_reduce(const Range& , const Value& identity, const RealBody& , const Reduction& , tbb::affinity_partitioner&) {\n        return identity;\n    }\n}\n\nstruct Body {\n    float value;\n    Body() : value(0) {}\n    Body(Body&, tbb::split) { value = 0; }\n    void operator()(const tbb::blocked_range<int>&) {}\n    void join(Body&) {}\n};\n\n//! Check that other types of partitioners are not supported (auto, affinity)\n//! In the case of \"unsupported\" API unexpectedly sneaking into namespace tbb,\n//! this test should result in a compilation error due to overload resolution ambiguity\n//! \\brief \\ref negative \\ref error_guessing\nTEST_CASE(\"Test Unsupported Partitioners\") {\n    using namespace tbb;\n    using namespace unsupported;\n    Body body;\n    parallel_deterministic_reduce(blocked_range<int>(0, 10), body, tbb::auto_partitioner());\n\n    tbb::affinity_partitioner ap;\n    parallel_deterministic_reduce(blocked_range<int>(0, 10), body, ap);\n\n    parallel_deterministic_reduce(\n        blocked_range<int>(0, 10),\n        0,\n        [](const blocked_range<int>&, int init)->int {\n            return init;\n        },\n        [](int x, int y)->int {\n            return x + y;\n        },\n        tbb::auto_partitioner()\n    );\n    parallel_deterministic_reduce(\n        blocked_range<int>(0, 10),\n        0,\n        [](const blocked_range<int>&, int init)->int {\n            return init;\n        },\n        [](int x, int y)->int {\n            return x + y;\n        },\n        ap\n    );\n}\n\n//! Testing tbb::parallel_reduce with tbb::task_group_context\n//! \\brief \\ref interface \\ref error_guessing\nTEST_CASE(\"cancellation test for tbb::parallel_reduce\") {\n    test_cancellation::ParallelReduceTestRunner</*First mode = */0>::run();\n}\n\n//! Testing tbb::parallel_deterministic_reduce with tbb::task_group_context\n//! \\brief \\ref interface \\ref error_guessing\nTEST_CASE(\"cancellation test for tbb::parallel_deterministic_reduce\") {\n    test_cancellation::ParallelDeterministicReduceTestRunner</*First mode = */0>::run();\n}\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_reduce constraints\") {\n    test_preduce_range_constraints();\n    test_preduce_body_constraints();\n    test_preduce_func_constraints();\n    test_preduce_combine_constraints();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_deterministic_reduce constraints\") {\n    test_pdet_reduce_range_constraints();\n    test_pdet_reduce_body_constraints();\n    test_pdet_reduce_func_constraints();\n    test_pdet_reduce_combine_constraints();\n}\n#endif\n\n#if _MSC_VER\n#pragma warning (pop)\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_parallel_scan.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#include \"common/test.h\"\n#include \"common/config.h\"\n#include \"common/utils_concurrency_limit.h\"\n#include \"common/cpu_usertime.h\"\n#include \"common/concepts_common.h\"\n\n#include \"tbb/global_control.h\"\n#include \"tbb/parallel_scan.h\"\n#include \"tbb/blocked_range.h\"\n#include \"tbb/tick_count.h\"\n#include <vector>\n#include <atomic>\n\n//! \\file test_parallel_scan.cpp\n//! \\brief Test for [algorithms.parallel_scan] specification\n\nusing Range = tbb::blocked_range<long>;\n\nstatic volatile bool ScanIsRunning = false;\n\n//! Sum of 0..i with wrap around on overflow.\ninline int TriangularSum( int i ) {\n    return i&1 ? ((i>>1)+1)*i : (i>>1)*(i+1);\n}\n\n//! Verify that sum is init plus sum of integers in closed interval [0..finish_index].\n/** line should be the source line of the caller */\nvoid VerifySum( int init, long finish_index, int sum, int line ) {\n    int expected = init + TriangularSum(finish_index);\n    CHECK_MESSAGE(expected == sum, \"line \" << line << \": sum[0..\" << finish_index << \"] should be = \" << expected << \", but was computed as \" << sum << \"\\n\");\n}\n\nconst int MAXN = 20000;\n\nenum AddendFlag {\n    UNUSED=0,\n    USED_NONFINAL=1,\n    USED_FINAL=2\n};\n\n//! Array recording how each addend was used.\n/** 'unsigned char' instead of AddendFlag for sake of compactness. */\nstatic unsigned char AddendHistory[MAXN];\n\nstd::atomic<long> NumberOfLiveStorage;\n\ntemplate<typename T>\nstruct Storage {\n    T my_total;\n    Range my_range;\n    Storage(T init) :\n        my_total(init), my_range(-1, -1, 1) {\n        ++NumberOfLiveStorage;\n    }\n    ~Storage() {\n        --NumberOfLiveStorage;\n    }\n    Storage(const Storage& strg) :\n        my_total(strg.my_total), my_range(strg.my_range) {\n        ++NumberOfLiveStorage;\n    }\n    Storage & operator=(const Storage& strg) {\n        my_total = strg.my_total;\n        my_range = strg.my_range;\n        return *this;\n    }\n};\n\ntemplate<typename T>\nStorage<T> JoinStorages(const Storage<T>& left, const Storage<T>& right) {\n    Storage<T> result = right;\n    CHECK(ScanIsRunning);\n    CHECK(left.my_range.end() == right.my_range.begin());\n    result.my_total += left.my_total;\n    result.my_range = Range(left.my_range.begin(), right.my_range.end(), 1);\n    CHECK(ScanIsRunning);\n    return result;\n}\n\ntemplate<typename T>\nvoid Scan(const Range & r, bool is_final, Storage<T> & storage, std::vector<T> & sum, const std::vector<T> & addend) {\n    CHECK((!is_final || (storage.my_range.begin() == 0 && storage.my_range.end() == r.begin()) || (storage.my_range.empty() && r.begin() == 0)));\n    for (long i = r.begin(); i < r.end(); ++i) {\n        storage.my_total += addend[i];\n        if (is_final) {\n            CHECK_MESSAGE(AddendHistory[i] < USED_FINAL, \"addend used 'finally' twice?\");\n            AddendHistory[i] |= USED_FINAL;\n            sum[i] = storage.my_total;\n            VerifySum(42, i, int(sum[i]), __LINE__);\n        }\n        else {\n            CHECK_MESSAGE(AddendHistory[i] == UNUSED, \"addend used too many times\");\n            AddendHistory[i] |= USED_NONFINAL;\n        }\n    }\n    if (storage.my_range.empty())\n        storage.my_range = r;\n    else\n        storage.my_range = Range(storage.my_range.begin(), r.end(), 1);\n}\n\ntemplate<typename T>\nStorage<T> ScanWithInit(const Range & r, T init, bool is_final, Storage<T> & storage, std::vector<T> & sum, const std::vector<T> & addend) {\n    if (r.begin() == 0)\n        storage.my_total = init;\n    Scan(r, is_final, storage, sum, addend);\n    return storage;\n}\n\ntemplate<typename T>\nclass Accumulator {\n    const  std::vector<T> &my_array;\n    std::vector<T> & my_sum;\n    Storage<T> storage;\n    enum state_type {\n        full,       // Accumulator has sufficient information for final scan,\n                    // i.e. has seen all iterations to its left.\n                    // It's either the original Accumulator provided by the user\n                    // or a Accumulator constructed by a splitting constructor *and* subsequently\n                    // subjected to a reverse_join with a full accumulator.\n\n        partial,    // Accumulator has only enough information for pre_scan.\n                    // i.e. has not seen all iterations to its left.\n                    // It's an Accumulator created by a splitting constructor that\n                    // has not yet been subjected to a reverse_join with a full accumulator.\n\n        summary,    // Accumulator has summary of iterations processed, but not necessarily\n                    // the information required for a final_scan or pre_scan.\n                    // It's the result of \"assign\".\n\n        trash       // Accumulator with possibly no useful information.\n                    // It was the source for \"assign\".\n\n    };\n    mutable state_type my_state;\n    //! Equals this while object is fully constructed, nullptr otherwise.\n    /** Used to detect premature destruction and accidental bitwise copy. */\n    Accumulator* self;\n    Accumulator& operator= (const Accumulator& other);\npublic:\n    Accumulator( T init, const std::vector<T> & array, std::vector<T> & sum ) :\n        my_array(array), my_sum(sum), storage(init), my_state(full)\n    {\n        // Set self as last action of constructor, to indicate that object is fully constructed.\n        self = this;\n    }\n    ~Accumulator() {\n        // Clear self as first action of destructor, to indicate that object is not fully constructed.\n        self = nullptr;\n    }\n    Accumulator( Accumulator& a, tbb::split ) :\n        my_array(a.my_array), my_sum(a.my_sum), storage(0), my_state(partial)\n    {\n        if (!(a.my_state == partial))\n            CHECK(a.my_state == full);\n        if (!(a.my_state == full))\n            CHECK(a.my_state == partial);\n        CHECK(ScanIsRunning);\n        // Set self as last action of constructor, to indicate that object is fully constructed.\n        self = this;\n    }\n    template<typename Tag>\n    void operator()( const Range& r, Tag /*tag*/ ) {\n        if(Tag::is_final_scan())\n            CHECK(my_state == full);\n        else\n            CHECK(my_state == partial);\n        Scan(r, Tag::is_final_scan(), storage, my_sum, my_array);\n        CHECK_MESSAGE(self==this, \"this Accumulator corrupted or prematurely destroyed\");\n    }\n    void reverse_join( const Accumulator& left_body) {\n        const Storage<T> & left = left_body.storage;\n        Storage<T> & right = storage;\n        CHECK(my_state == partial);\n        CHECK( ((left_body.my_state == full) || (left_body.my_state==partial)) );\n\n        right = JoinStorages(left, right);\n\n        CHECK(left_body.self == &left_body);\n        my_state = left_body.my_state;\n    }\n    void assign( const Accumulator& other ) {\n        CHECK(other.my_state == full);\n        CHECK(my_state == full);\n        storage.my_total = other.storage.my_total;\n        storage.my_range = other.storage.my_range;\n        CHECK(self == this);\n        CHECK_MESSAGE(other.self==&other, \"other Accumulator corrupted or prematurely destroyed\");\n        my_state = summary;\n        other.my_state = trash;\n    }\n    T get_total() {\n        return storage.my_total;\n    }\n};\n\n\ntemplate<typename T, typename Scan, typename ReverseJoin>\nT ParallelScanFunctionalInvoker(const Range& range, T idx, const Scan& scan, const ReverseJoin& reverse_join, int mode) {\n    switch (mode%3) {\n    case 0:\n        return tbb::parallel_scan(range, idx, scan, reverse_join);\n        break;\n    case 1:\n        return tbb::parallel_scan(range, idx, scan, reverse_join, tbb::simple_partitioner());\n        break;\n    default:\n        return tbb::parallel_scan(range, idx, scan, reverse_join, tbb::auto_partitioner());\n    }\n}\n\ntemplate<typename T>\nclass ScanBody {\n    const std::vector<T> &my_addend;\n    std::vector<T> &my_sum;\n    const T my_init;\n    ScanBody& operator= (const ScanBody&);\npublic:\n    ScanBody(T init, const std::vector<T> &addend, std::vector<T> &sum) :my_addend(addend), my_sum(sum), my_init(init) {}\n    template<typename S, typename Tag>\n    Storage<S> operator()(const Range& r, Storage<S> storage, Tag) const {\n        return ScanWithInit(r, my_init, Tag::is_final_scan(), storage, my_sum, my_addend);\n    }\n};\n\nclass JoinBody {\npublic:\n    template<typename T>\n    Storage<T> operator()(const Storage<T>& left, const Storage<T>& right) const {\n        return JoinStorages(left, right);\n    }\n};\n\nstruct ParallelScanTemplateFunctor {\n    template<typename T>\n    T operator()(Range range, T init, const std::vector<T> &addend, std::vector<T> &sum, int mode) {\n        for (long i = 0; i<MAXN; ++i) {\n            AddendHistory[i] = UNUSED;\n        }\n        ScanIsRunning = true;\n        ScanBody<T> sb(init, addend, sum);\n        JoinBody jb;\n        Storage<T> res = ParallelScanFunctionalInvoker(range, Storage<T>(0), sb, jb, mode);\n        ScanIsRunning = false;\n        if (range.empty())\n            res.my_total = init;\n        return res.my_total;\n    }\n};\n\nstruct ParallelScanLambda {\n    template<typename T>\n    T operator()(Range range, T init, const std::vector<T> &addend, std::vector<T> &sum, int mode) {\n        for (long i = 0; i<MAXN; ++i) {\n            AddendHistory[i] = UNUSED;\n        }\n        ScanIsRunning = true;\n        Storage<T> res = ParallelScanFunctionalInvoker(range, Storage<T>(0),\n            [&addend, &sum, init](const Range& r, Storage<T> storage, bool is_final_scan /*tag*/) -> Storage<T> {\n                return ScanWithInit(r, init, is_final_scan, storage, sum, addend);\n            },\n            [](const Storage<T>& left, const Storage<T>& right) -> Storage<T> {\n                return JoinStorages(left, right);\n            },\n            mode);\n        ScanIsRunning = false;\n        if (range.empty())\n            res.my_total = init;\n        return res.my_total;\n    }\n};\n\nvoid TestAccumulator( int mode ) {\n    typedef int T;\n    std::vector<T> addend(MAXN);\n    std::vector<T> sum(MAXN);\n    std::vector<T> control_sum(MAXN);\n    T control_total;\n    for( int n=0; n<=MAXN; n = n <=128? n+1: n*3) {\n        for( int gs : {1, 2, 100, 511, 12345, n/ 111, n/17, n-1, n}) {\n            if(gs<=0 || gs > n)\n                continue;\n            control_total = 42;\n            for( long i=0; i<MAXN; ++i ) {\n                addend[i] = -1;\n                sum[i] = -2;\n                control_sum[i] = -2;\n                AddendHistory[i] = UNUSED;\n            }\n            for (long i = 0; i<n; ++i) {\n                addend[i] = i;\n                control_total += addend[i];\n                control_sum[i] = control_total;\n            }\n\n            Accumulator<T> acc( 42, addend, sum);\n            ScanIsRunning = true;\n\n            switch (mode) {\n                case 0:\n                    tbb::parallel_scan( Range( 0, n,  gs ), acc );\n                break;\n                case 1:\n                    tbb::parallel_scan( Range( 0, n, gs ), acc, tbb::simple_partitioner() );\n                break;\n                case 2:\n                    tbb::parallel_scan( Range( 0, n, gs ), acc, tbb::auto_partitioner() );\n                break;\n            }\n\n            ScanIsRunning = false;\n\n            for( long i=0; i<n; ++i )\n                CHECK_MESSAGE((AddendHistory[i]&USED_FINAL), \"failed to use addend[\" << i << \"] \" << (AddendHistory[i] & USED_NONFINAL ? \"(but used nonfinal)\\n\" : \"\\n\"));\n            for( long i=0; i<n; ++i ) {\n                VerifySum( 42, i, sum[i], __LINE__ );\n            }\n            if( n )\n                CHECK(acc.get_total()==sum[n-1]);\n            else\n                CHECK(acc.get_total()==42);\n            CHECK(control_total ==acc.get_total());\n            CHECK(control_sum==sum);\n        }\n    }\n}\n\ntemplate<typename ParallelScanWrapper>\nvoid TestInterface( int mode, ParallelScanWrapper parallel_scan_wrapper ) {\n    using T = int;\n    std::vector<T> addend(MAXN);\n    std::vector<T> control_sum(MAXN);\n    T control_total(42);\n    for( long i=0; i<MAXN; ++i ) {\n        addend[i] = i;\n        control_total += addend[i];\n        control_sum[i] = control_total;\n        AddendHistory[i] = UNUSED;\n    }\n\n    std::vector<T> sum(MAXN);\n    for (long i = 0; i<MAXN; ++i)\n        sum[i] = -2;\n    ScanIsRunning = true;\n    T total = parallel_scan_wrapper(Range(0, MAXN, 1), 42, addend, sum, mode);\n    ScanIsRunning = false;\n\n    CHECK_MESSAGE(control_total==total, \"Parallel prefix sum is not equal to serial\");\n    CHECK_MESSAGE(control_sum==sum, \"Parallel prefix vector is not equal to serial\");\n}\n\n\n#if __TBB_CPP14_GENERIC_LAMBDAS_PRESENT\nstruct ParallelScanGenericLambda {\n    template<typename T>\n    T operator()(Range range, T init, const std::vector<T> &addend, std::vector<T> &sum, int mode) {\n        for (long i = 0; i<MAXN; ++i) {\n            AddendHistory[i] = UNUSED;\n        }\n        ScanIsRunning = true;\n        Storage<T> res = ParallelScanFunctionalInvoker(range, Storage<T>(0),\n            [&addend, &sum, init](const auto& rng, auto storage, bool is_final_scan) {\n                return ScanWithInit(rng, init, is_final_scan, storage, sum, addend);\n            },\n            [](const auto& left, const auto& right) {\n                return JoinStorages(left, right);\n            },\n            mode);\n        ScanIsRunning = false;\n        if (range.empty())\n            res.my_total = init;\n        return res.my_total;\n    }\n};\n#endif /* __TBB_CPP14_GENERIC_LAMBDAS_PRESENT */\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\ntemplate <typename... Args>\nconcept can_call_parallel_scan_basic = requires( Args&&... args ) {\n    tbb::parallel_scan(std::forward<Args>(args)...);\n};\n\ntemplate <typename Range, typename Body>\nconcept can_call_imperative_pscan = can_call_parallel_scan_basic<const Range&, Body&> &&\n                                    can_call_parallel_scan_basic<const Range&, Body&, const tbb::simple_partitioner&> &&\n                                    can_call_parallel_scan_basic<const Range&, Body&, const tbb::auto_partitioner&>;\n\ntemplate <typename Range, typename Value, typename Func, typename Combine>\nconcept can_call_functional_pscan = can_call_parallel_scan_basic<const Range&, const Value&, const Func&, const Combine&> &&\n                                    can_call_parallel_scan_basic<const Range&, const Value&, const Func&, const Combine&, const tbb::simple_partitioner&> &&\n                                    can_call_parallel_scan_basic<const Range&, const Value&, const Func&, const Combine&, const tbb::auto_partitioner&>;\n\nusing CorrectRange = test_concepts::range::Correct;\n\ntemplate <typename Range>\nusing CorrectBody = test_concepts::parallel_scan_body::Correct<Range>;\n\ntemplate <typename Range, typename T>\nusing CorrectFunc = test_concepts::parallel_scan_function::Correct<Range, T>;\n\ntemplate <typename T>\nusing CorrectCombine = test_concepts::parallel_scan_combine::Correct<T>;\n\nvoid test_pscan_range_constraints() {\n    using namespace test_concepts::range;\n    static_assert(can_call_imperative_pscan<Correct, CorrectBody<Correct>>);\n    static_assert(!can_call_imperative_pscan<NonCopyable, CorrectBody<NonCopyable>>);\n    static_assert(!can_call_imperative_pscan<NonDestructible, CorrectBody<NonDestructible>>);\n    static_assert(!can_call_imperative_pscan<NonSplittable, CorrectBody<NonSplittable>>);\n    static_assert(!can_call_imperative_pscan<NoEmpty, CorrectBody<NoEmpty>>);\n    static_assert(!can_call_imperative_pscan<EmptyNonConst, CorrectBody<EmptyNonConst>>);\n    static_assert(!can_call_imperative_pscan<WrongReturnEmpty, CorrectBody<WrongReturnEmpty>>);\n    static_assert(!can_call_imperative_pscan<NoIsDivisible, CorrectBody<NoIsDivisible>>);\n    static_assert(!can_call_imperative_pscan<IsDivisibleNonConst, CorrectBody<IsDivisibleNonConst>>);\n    static_assert(!can_call_imperative_pscan<WrongReturnIsDivisible, CorrectBody<WrongReturnIsDivisible>>);\n\n    static_assert(can_call_functional_pscan<Correct, int, CorrectFunc<Correct, int>, CorrectCombine<int>>);\n    static_assert(!can_call_functional_pscan<NonCopyable, int, CorrectFunc<NonCopyable, int>, CorrectCombine<int>>);\n    static_assert(!can_call_functional_pscan<NonDestructible, int, CorrectFunc<NonDestructible, int>, CorrectCombine<int>>);\n    static_assert(!can_call_functional_pscan<NonSplittable, int, CorrectFunc<NonSplittable, int>, CorrectCombine<int>>);\n    static_assert(!can_call_functional_pscan<NoEmpty, int, CorrectFunc<NoEmpty, int>, CorrectCombine<int>>);\n    static_assert(!can_call_functional_pscan<EmptyNonConst, int, CorrectFunc<EmptyNonConst, int>, CorrectCombine<int>>);\n    static_assert(!can_call_functional_pscan<WrongReturnEmpty, int, CorrectFunc<WrongReturnEmpty, int>, CorrectCombine<int>>);\n    static_assert(!can_call_functional_pscan<NoIsDivisible, int, CorrectFunc<NoIsDivisible, int>, CorrectCombine<int>>);\n    static_assert(!can_call_functional_pscan<IsDivisibleNonConst, int, CorrectFunc<IsDivisibleNonConst, int>, CorrectCombine<int>>);\n    static_assert(!can_call_functional_pscan<WrongReturnIsDivisible, int, CorrectFunc<WrongReturnIsDivisible, int>, CorrectCombine<int>>);\n}\n\nvoid test_pscan_body_constraints() {\n    using namespace test_concepts::parallel_scan_body;\n    static_assert(can_call_imperative_pscan<CorrectRange, Correct<CorrectRange>>);\n    static_assert(!can_call_imperative_pscan<CorrectRange, NonSplittable<CorrectRange>>);\n    static_assert(!can_call_imperative_pscan<CorrectRange, NoPreScanOperatorRoundBrackets<CorrectRange>>);\n    static_assert(!can_call_imperative_pscan<CorrectRange, WrongFirstInputPreScanOperatorRoundBrackets<CorrectRange>>);\n    static_assert(!can_call_imperative_pscan<CorrectRange, WrongSecondInputPreScanOperatorRoundBrackets<CorrectRange>>);\n    static_assert(!can_call_imperative_pscan<CorrectRange, NoFinalScanOperatorRoundBrackets<CorrectRange>>);\n    static_assert(!can_call_imperative_pscan<CorrectRange, WrongFirstInputFinalScanOperatorRoundBrackets<CorrectRange>>);\n    static_assert(!can_call_imperative_pscan<CorrectRange, WrongSecondInputFinalScanOperatorRoundBrackets<CorrectRange>>);\n    static_assert(!can_call_imperative_pscan<CorrectRange, NoReverseJoin<CorrectRange>>);\n    static_assert(!can_call_imperative_pscan<CorrectRange, WrongInputReverseJoin<CorrectRange>>);\n    static_assert(!can_call_imperative_pscan<CorrectRange, NoAssign<CorrectRange>>);\n    static_assert(!can_call_imperative_pscan<CorrectRange, WrongInputAssign<CorrectRange>>);\n}\n\nvoid test_pscan_func_constraints() {\n    using namespace test_concepts::parallel_scan_function;\n    static_assert(can_call_functional_pscan<CorrectRange, int, Correct<CorrectRange, int>, CorrectCombine<int>>);\n    static_assert(!can_call_functional_pscan<CorrectRange, int, NoOperatorRoundBrackets<CorrectRange, int>, CorrectCombine<int>>);\n    static_assert(!can_call_functional_pscan<CorrectRange, int, OperatorRoundBracketsNonConst<CorrectRange, int>, CorrectCombine<int>>);\n    static_assert(!can_call_functional_pscan<CorrectRange, int, WrongFirstInputOperatorRoundBrackets<CorrectRange, int>, CorrectCombine<int>>);\n    static_assert(!can_call_functional_pscan<CorrectRange, int, WrongSecondInputOperatorRoundBrackets<CorrectRange, int>, CorrectCombine<int>>);\n    static_assert(!can_call_functional_pscan<CorrectRange, int, WrongReturnOperatorRoundBrackets<CorrectRange, int>, CorrectCombine<int>>);\n}\n\nvoid test_pscan_combine_constraints() {\n    using namespace test_concepts::parallel_scan_combine;\n    static_assert(can_call_functional_pscan<CorrectRange, int, CorrectFunc<CorrectRange, int>, Correct<int>>);\n    static_assert(!can_call_functional_pscan<CorrectRange, int, CorrectFunc<CorrectRange, int>, NoOperatorRoundBrackets<int>>);\n    static_assert(!can_call_functional_pscan<CorrectRange, int, CorrectFunc<CorrectRange, int>, OperatorRoundBracketsNonConst<int>>);\n    static_assert(!can_call_functional_pscan<CorrectRange, int, CorrectFunc<CorrectRange, int>, WrongFirstInputOperatorRoundBrackets<int>>);\n    static_assert(!can_call_functional_pscan<CorrectRange, int, CorrectFunc<CorrectRange, int>, WrongSecondInputOperatorRoundBrackets<int>>);\n    static_assert(!can_call_functional_pscan<CorrectRange, int, CorrectFunc<CorrectRange, int>, WrongReturnOperatorRoundBrackets<int>>);\n}\n\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n\n// Test for parallel_scan with with different partitioners\n//! \\brief \\ref error_guessing \\ref resource_usage\nTEST_CASE(\"parallel_scan testing with different partitioners\") {\n    for (auto concurrency_level : utils::concurrency_range()) {\n        tbb::global_control control(tbb::global_control::max_allowed_parallelism, concurrency_level);\n        for (int mode = 0; mode < 3; mode++) {\n            NumberOfLiveStorage = 0;\n            TestAccumulator(mode);\n            // Test that all workers sleep when no work\n            TestCPUUserTime(concurrency_level);\n\n            // Checking has to be done late, because when parallel_scan makes copies of\n            // the user's \"Body\", the copies might be destroyed slightly after parallel_scan\n            // returns.\n            CHECK(NumberOfLiveStorage == 0);\n        }\n    }\n}\n\n// Test for parallel_scan with template functors\n//! \\brief \\ref error_guessing \\ref interface \\ref resource_usage\nTEST_CASE(\"parallel_scan testing with template functor\") {\n    for (auto concurrency_level : utils::concurrency_range()) {\n        tbb::global_control control(tbb::global_control::max_allowed_parallelism, concurrency_level);\n        for (int mode = 0; mode < 3; mode++) {\n            NumberOfLiveStorage = 0;\n            TestInterface(mode,  ParallelScanTemplateFunctor());\n            // Test that all workers sleep when no work\n            TestCPUUserTime(concurrency_level);\n\n            // Checking has to be done late, because when parallel_scan makes copies of\n            // the user's \"Body\", the copies might be destroyed slightly after parallel_scan\n            // returns.\n            CHECK(NumberOfLiveStorage == 0);\n        }\n    }\n}\n\n// Test for parallel_scan with lambdas\n//! \\brief \\ref error_guessing \\ref interface \\ref resource_usage\nTEST_CASE(\"parallel_scan testing with lambdas\") {\n    for (auto concurrency_level : utils::concurrency_range()) {\n        tbb::global_control control(tbb::global_control::max_allowed_parallelism, concurrency_level);\n        for (int mode = 0; mode < 3; mode++) {\n            NumberOfLiveStorage = 0;\n            TestInterface(mode,  ParallelScanLambda());\n\n            // Test that all workers sleep when no work\n            TestCPUUserTime(concurrency_level);\n\n            // Checking has to be done late, because when parallel_scan makes copies of\n            // the user's \"Body\", the copies might be destroyed slightly after parallel_scan\n            // returns.\n            CHECK(NumberOfLiveStorage == 0);\n        }\n    }\n}\n\n#if __TBB_CPP14_GENERIC_LAMBDAS_PRESENT\n// Test for parallel_scan with genetic lambdas\n//! \\brief \\ref error_guessing \\ref interface \\ref resource_usage\nTEST_CASE(\"parallel_scan testing with generic lambdas\") {\n    for (auto concurrency_level : utils::concurrency_range()) {\n        tbb::global_control control(tbb::global_control::max_allowed_parallelism, concurrency_level);\n        for (int mode = 0; mode < 3; mode++) {\n            NumberOfLiveStorage = 0;\n            TestInterface(mode,  ParallelScanGenericLambda());\n            // Test that all workers sleep when no work\n            TestCPUUserTime(concurrency_level);\n\n            // Checking has to be done late, because when parallel_scan makes copies of\n            // the user's \"Body\", the copies might be destroyed slightly after parallel_scan\n            // returns.\n            CHECK(NumberOfLiveStorage == 0);\n        }\n    }\n}\n#endif /* __TBB_CPP14_GENERIC_LAMBDAS_PRESENT */\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_scan constraints\") {\n    test_pscan_range_constraints();\n    test_pscan_body_constraints();\n    test_pscan_func_constraints();\n    test_pscan_combine_constraints();\n}\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_parallel_sort.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/utils_concurrency_limit.h\"\n#include \"common/cpu_usertime.h\"\n#include \"common/concepts_common.h\"\n#include \"common/iterator.h\"\n\n#include \"tbb/parallel_sort.h\"\n#include \"tbb/concurrent_vector.h\"\n#include \"tbb/global_control.h\"\n\n#include <math.h>\n#include <vector>\n#include <functional>\n#include <string>\n#include <cstring>\n#include <cstddef>\n#include <iterator>\n#include <type_traits>\n\n//! \\file test_parallel_sort.cpp\n//! \\brief Test for [algorithms.parallel_sort]\n\n/** Has tightly controlled interface so that we can verify\n    that parallel_sort uses only the required interface. */\nclass Minimal {\n    int val;\npublic:\n    void set_val(int i) { val = i; }\n    static bool Less (const Minimal &a, const Minimal &b) {\n        return (a.val < b.val);\n    }\n    static bool AreEqual( const Minimal &a, const Minimal &b) {\n       return a.val == b.val;\n    }\n};\n\n//! Defines a comparison function object for Minimal\nclass MinimalLessCompare {\npublic:\n    bool operator() (const Minimal &a, const Minimal &b) const {\n        return Minimal::Less(a,b);\n    }\n};\n\ntemplate<typename Value>\nbool compare(const Value& lhs, const Value& rhs) {\n    return lhs == rhs;\n}\n\nbool compare(const Minimal& lhs, const Minimal& rhs) {\n    return Minimal::AreEqual(lhs, rhs);\n}\n\ntemplate<typename Range>\nvoid validate(Range test_range, Range sorted_range) {\n    using value_type = typename std::iterator_traits<decltype(std::begin(test_range))>::value_type;\n    REQUIRE(\n        std::equal(std::begin(test_range), std::end(test_range), std::begin(sorted_range),\n            [](const value_type& tested, const value_type& reference) {\n                return compare(tested, reference);\n            }\n        )\n    );\n}\n\n//! The default initialization routine.\n/*! This routine assumes that you can assign to the elements from a float.\n    It assumes that iter and sorted_list have already been allocated. It fills\n    them according to the current data set (tracked by a local static variable).\n    Returns true if a valid test has been setup, or false if there is no test to\n    perform.\n*/\ntemplate <typename RefType, typename ValueType>\nvoid set(RefType& ref, ValueType new_value) {\n    ref = static_cast<RefType>(new_value);\n}\n\ntemplate <typename ValueType>\nvoid set(Minimal& minimal_ref, ValueType new_value) {\n    minimal_ref.set_val(static_cast<int>(new_value));\n}\n\ntemplate <typename KeyType>\nvoid set(std::string& string_ref, KeyType key) {\n    string_ref = std::to_string(static_cast<float>(key));\n}\n\n\ntemplate <typename RandomAccessIterator, typename Compare>\nbool fill_ranges(RandomAccessIterator test_range_begin, RandomAccessIterator sorted_range_begin,\n    std::size_t size, const Compare &compare) {\n\n    static char test_case = 0;\n    const char num_cases = 3;\n\n    if (test_case < num_cases) {\n        // switch on the current test case, filling the test_list and sorted_list appropriately\n        switch(test_case) {\n            case 0:\n                /* use sin to generate the values */\n                for (std::size_t i = 0; i < size; i++) {\n                    set(test_range_begin[i], sin(float(i)));\n                    set(sorted_range_begin[i], sin(float(i)));\n                }\n                break;\n            case 1:\n                /* presorted list */\n                for (std::size_t i = 0; i < size; i++) {\n                    set(test_range_begin[i], i);\n                    set(sorted_range_begin[i], i);\n                }\n                break;\n            case 2:\n                /* reverse-sorted list */\n                for (std::size_t i = 0; i < size; i++) {\n                    set(test_range_begin[i], size - i);\n                    set(sorted_range_begin[i], size - i);\n                }\n                break;\n        }\n\n        // pre-sort sorted_range for later validity testing\n        std::sort(sorted_range_begin, sorted_range_begin + size, compare);\n        test_case++;\n        return true;\n    }\n    test_case = 0;\n    return false;\n}\n\n//! The default test routine.\n/*! Tests all data set sizes from 0 to N, all grainsizes from 0 to G=10, and selects from\n    all possible interfaces to parallel_sort depending on whether a scratch space and\n    compare have been provided.\n*/\ntemplate<typename ContainerType, std::size_t Size>\nstruct parallel_sort_test {\n    static void run() {\n        std::less<typename ContainerType::value_type> default_comp;\n        ContainerType range(Size);\n        ContainerType sorted_range(Size);\n\n        while (fill_ranges(std::begin(range), std::begin(sorted_range), Size, default_comp)) {\n            tbb::parallel_sort(range);\n            validate(range, sorted_range);\n        }\n    }\n\n    template<typename Comparator>\n    static void run(Comparator& comp) {\n        ContainerType range(Size);\n        ContainerType sorted_range(Size);\n\n        while (fill_ranges(std::begin(range), std::begin(sorted_range), Size, comp)) {\n            tbb::parallel_sort(range, comp);\n            validate(range, sorted_range);\n        }\n    }\n};\n\ntemplate<typename ContainerType, typename Comparator>\nvoid parallel_sort_test_suite() {\n    Comparator comp;\n    for (auto concurrency_level : utils::concurrency_range()) {\n        tbb::global_control control(tbb::global_control::max_allowed_parallelism, concurrency_level);\n        parallel_sort_test<ContainerType, /*Size*/0    >::run(comp);\n        parallel_sort_test<ContainerType, /*Size*/1    >::run(comp);\n        parallel_sort_test<ContainerType, /*Size*/10   >::run(comp);\n        parallel_sort_test<ContainerType, /*Size*/9999 >::run(comp);\n        parallel_sort_test<ContainerType, /*Size*/50000>::run(comp);\n    }\n}\n\ntemplate<typename ContainerType>\nvoid parallel_sort_test_suite() {\n    for (auto concurrency_level : utils::concurrency_range()) {\n        tbb::global_control control(tbb::global_control::max_allowed_parallelism, concurrency_level);\n        parallel_sort_test<ContainerType, /*Size*/0    >::run();\n        parallel_sort_test<ContainerType, /*Size*/1    >::run();\n        parallel_sort_test<ContainerType, /*Size*/10   >::run();\n        parallel_sort_test<ContainerType, /*Size*/9999 >::run();\n        parallel_sort_test<ContainerType, /*Size*/50000>::run();\n    }\n}\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\ntemplate <typename RandomAccessIterator>\nconcept can_call_parallel_sort_with_iterator = requires( RandomAccessIterator it ) {\n    tbb::parallel_sort(it, it);\n};\n\ntemplate <typename RandomAccessIterator, typename Compare>\nconcept can_call_parallel_sort_with_iterator_and_compare = requires( RandomAccessIterator it, const Compare& compare ) {\n    tbb::parallel_sort(it, it, compare);\n};\n\ntemplate <typename CBS>\nconcept can_call_parallel_sort_with_cbs = requires( CBS& cbs ) {\n    tbb::parallel_sort(cbs);\n};\n\ntemplate <typename CBS, typename Compare>\nconcept can_call_parallel_sort_with_cbs_and_compare = requires( CBS& cbs, const Compare& compare ) {\n    tbb::parallel_sort(cbs, compare);\n};\n\ntemplate <typename T>\nusing CorrectCompare = test_concepts::compare::Correct<T>;\n\nvoid test_psort_iterator_constraints() {\n    using namespace test_concepts::parallel_sort_value;\n\n    static_assert(can_call_parallel_sort_with_iterator<utils::RandomIterator<int>>);\n    static_assert(can_call_parallel_sort_with_iterator<typename std::vector<int>::iterator>);\n    static_assert(!can_call_parallel_sort_with_iterator<utils::ForwardIterator<int>>);\n    static_assert(!can_call_parallel_sort_with_iterator<utils::InputIterator<int>>);\n    static_assert(!can_call_parallel_sort_with_iterator<utils::RandomIterator<NonMovableValue>>);\n    static_assert(!can_call_parallel_sort_with_iterator<utils::RandomIterator<NonMoveAssignableValue>>);\n    static_assert(!can_call_parallel_sort_with_iterator<utils::RandomIterator<NonComparableValue>>);\n    static_assert(!can_call_parallel_sort_with_iterator<test_concepts::ConstantIT<int>>);\n\n    static_assert(can_call_parallel_sort_with_iterator_and_compare<utils::RandomIterator<int>, CorrectCompare<int>>);\n    static_assert(can_call_parallel_sort_with_iterator_and_compare<typename std::vector<int>::iterator, CorrectCompare<int>>);\n    static_assert(!can_call_parallel_sort_with_iterator_and_compare<utils::ForwardIterator<int>, CorrectCompare<int>>);\n    static_assert(!can_call_parallel_sort_with_iterator_and_compare<utils::InputIterator<int>, CorrectCompare<int>>);\n    static_assert(!can_call_parallel_sort_with_iterator_and_compare<utils::RandomIterator<NonMovableValue>, CorrectCompare<NonMovableValue>>);\n    static_assert(!can_call_parallel_sort_with_iterator_and_compare<utils::RandomIterator<NonMoveAssignableValue>, CorrectCompare<NonMoveAssignableValue>>);\n    static_assert(!can_call_parallel_sort_with_iterator_and_compare<test_concepts::ConstantIT<int>, CorrectCompare<const int>>);\n}\n\nvoid test_psort_compare_constraints() {\n    using namespace test_concepts::compare;\n\n    using CorrectCBS = test_concepts::container_based_sequence::Correct;\n    using CorrectIterator = CorrectCBS::iterator;\n    static_assert(can_call_parallel_sort_with_iterator_and_compare<CorrectIterator, Correct<int>>);\n    static_assert(!can_call_parallel_sort_with_iterator_and_compare<CorrectIterator, NoOperatorRoundBrackets<int>>);\n    static_assert(!can_call_parallel_sort_with_iterator_and_compare<CorrectIterator, WrongFirstInputOperatorRoundBrackets<int>>);\n    static_assert(!can_call_parallel_sort_with_iterator_and_compare<CorrectIterator, WrongSecondInputOperatorRoundBrackets<int>>);\n    static_assert(!can_call_parallel_sort_with_iterator_and_compare<CorrectIterator, WrongReturnOperatorRoundBrackets<int>>);\n\n    static_assert(can_call_parallel_sort_with_cbs_and_compare<CorrectCBS, Correct<int>>);\n    static_assert(!can_call_parallel_sort_with_cbs_and_compare<CorrectCBS, NoOperatorRoundBrackets<int>>);\n    static_assert(!can_call_parallel_sort_with_cbs_and_compare<CorrectCBS, WrongFirstInputOperatorRoundBrackets<int>>);\n    static_assert(!can_call_parallel_sort_with_cbs_and_compare<CorrectCBS, WrongSecondInputOperatorRoundBrackets<int>>);\n    static_assert(!can_call_parallel_sort_with_cbs_and_compare<CorrectCBS, WrongReturnOperatorRoundBrackets<int>>);\n}\n\nvoid test_psort_cbs_constraints() {\n    using namespace test_concepts::container_based_sequence;\n    using namespace test_concepts::parallel_sort_value;\n\n    static_assert(can_call_parallel_sort_with_cbs<Correct>);\n    static_assert(!can_call_parallel_sort_with_cbs<NoBegin>);\n    static_assert(!can_call_parallel_sort_with_cbs<NoEnd>);\n    static_assert(!can_call_parallel_sort_with_cbs<ForwardIteratorCBS>);\n    static_assert(!can_call_parallel_sort_with_cbs<ConstantCBS>);\n\n    static_assert(can_call_parallel_sort_with_cbs<CustomValueCBS<CorrectValue>>);\n    static_assert(!can_call_parallel_sort_with_cbs<CustomValueCBS<NonMovableValue>>);\n    static_assert(!can_call_parallel_sort_with_cbs<CustomValueCBS<NonMoveAssignableValue>>);\n    static_assert(!can_call_parallel_sort_with_cbs<CustomValueCBS<NonComparableValue>>);\\\n\n    using CorrectCompare = test_concepts::compare::Correct<int>;\n    using NonMovableCompare = test_concepts::compare::Correct<NonMovableValue>;\n    using NonMoveAssignableCompare = test_concepts::compare::Correct<NonMoveAssignableValue>;\n    static_assert(can_call_parallel_sort_with_cbs_and_compare<Correct, CorrectCompare>);\n    static_assert(!can_call_parallel_sort_with_cbs_and_compare<NoBegin, CorrectCompare>);\n    static_assert(!can_call_parallel_sort_with_cbs_and_compare<NoEnd, CorrectCompare>);\n    static_assert(!can_call_parallel_sort_with_cbs_and_compare<ForwardIteratorCBS, CorrectCompare>);\n    static_assert(!can_call_parallel_sort_with_cbs_and_compare<ConstantCBS, CorrectCompare>);\n    static_assert(!can_call_parallel_sort_with_cbs_and_compare<CustomValueCBS<NonMovableValue>, NonMovableCompare>);\n    static_assert(!can_call_parallel_sort_with_cbs_and_compare<CustomValueCBS<NonMoveAssignableValue>, NonMoveAssignableCompare>);\n}\n\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n\ntemplate<typename T>\nstruct minimal_span {\n    minimal_span(T* input_data, std::size_t input_size)\n     : data{input_data}\n     , size{input_size}\n    {}\n\n    T* begin() const {\n        return data;\n    }\n    T* end() const {\n        return data + size;\n    }\nprivate:\n    T* data;\n    std::size_t size;\n};\n\n//! Minimal array sorting test (less comparator)\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Minimal array sorting test (less comparator)\") {\n    parallel_sort_test_suite<std::vector<Minimal>, MinimalLessCompare>();\n}\n\n//! Float array sorting test (default comparator)\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Float array sorting test (default comparator)\") {\n    parallel_sort_test_suite<std::vector<float>>();\n}\n\n//! tbb::concurrent_vector<float> sorting test (less comparator)\n//! \\brief \\ref error_guessing\nTEST_CASE(\"tbb::concurrent_vector<float> sorting test (less comparator)\") {\n    parallel_sort_test_suite<tbb::concurrent_vector<float>, std::less<float>>();\n}\n\n//! tbb::concurrent_vector<float> sorting test (default comparator)\n//! \\brief \\ref error_guessing\nTEST_CASE(\"tbb::concurrent_vector<float> sorting test (default comparator)\") {\n    parallel_sort_test_suite<tbb::concurrent_vector<float>>();\n}\n\n//! Array of strings sorting test (less comparator)\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Array of strings sorting test (less comparator)\") {\n    parallel_sort_test_suite<std::vector<std::string>, std::less<std::string>>();\n}\n\n//! Array of strings sorting test (default comparator)\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Array of strings sorting test (default comparator)\") {\n    parallel_sort_test_suite<std::vector<std::string>>();\n}\n\n//! tbb::concurrent_vector<Minimal> sorting test (less comparator)\n//! \\brief \\ref error_guessing\nTEST_CASE(\"tbb::concurrent_vector<Minimal> sorting test (less comparator)\") {\n    parallel_sort_test_suite<tbb::concurrent_vector<Minimal>, MinimalLessCompare>();\n}\n\nconstexpr std::size_t array_size = 10000;\n\ntemplate<typename SortFunctor>\nvoid sort_array_test(const SortFunctor& sort_functor) {\n    int test_array[array_size];\n    for (std::size_t i = 0; i < array_size; ++i)\n        test_array[i] = rand() % array_size;\n\n    sort_functor(test_array);\n\n    for (std::size_t i = 0; i < array_size - 1; ++i)\n        REQUIRE_MESSAGE(test_array[i] <= test_array[i + 1], \"Testing data not sorted\");\n}\n\n//! Array sorting test (default comparator)\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Array sorting test (default comparator)\") {\n    for ( auto concurrency_level : utils::concurrency_range() ) {\n        tbb::global_control control(tbb::global_control::max_allowed_parallelism, concurrency_level);\n        sort_array_test([](int (&array)[array_size]) {\n            tbb::parallel_sort(array);\n        });\n    }\n}\n\n//! Test array sorting via rvalue span (default comparator)\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test array sorting via rvalue span (default comparator)\") {\n    sort_array_test([](int (&array)[array_size]) {\n        tbb::parallel_sort(minimal_span<int>{array, array_size});\n    });\n}\n\n//! Test array sorting via const span (default comparator)\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test array sorting via const span (default comparator)\") {\n    sort_array_test([](int (&array)[array_size]) {\n        const minimal_span<int> span(array, array_size);\n        tbb::parallel_sort(span);\n    });\n}\n\n//! Test rvalue container with stateful comparator\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test rvalue container with stateful comparator\") {\n    // Create sorted range\n    std::vector<std::size_t> test_vector(array_size);\n    for (std::size_t i = 0; i < array_size; ++i)\n        test_vector[i] = i;\n\n    std::atomic<std::size_t> count{0};\n    tbb::parallel_sort(std::move(test_vector), [&](std::size_t lhs, std::size_t rhs) {\n        ++count;\n        return lhs < rhs;\n    });\n\n    // The comparator should be called at least (size - 1) times to check that the array is sorted\n    REQUIRE_MESSAGE(count >= array_size - 1, \"Incorrect comparator calls count\");\n}\n\n//! Testing workers going to sleep\n//! \\brief \\ref resource_usage\nTEST_CASE(\"That all workers sleep when no work\") {\n    int test_array[array_size];\n    for (std::size_t i = 0; i < array_size; ++i)\n        test_array[i] = rand() % array_size;\n\n    tbb::parallel_sort(test_array);\n    TestCPUUserTime(utils::get_platform_max_threads());\n}\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"parallel_sort constraints\") {\n    test_psort_iterator_constraints();\n    test_psort_compare_constraints();\n    test_psort_cbs_constraints();\n}\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_partitioner.cpp",
    "content": "/*\n    Copyright (c) 2021-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n\n#include \"tbb/parallel_for.h\"\n#include \"tbb/task_arena.h\"\n#include \"tbb/task_scheduler_observer.h\"\n#include \"tbb/global_control.h\"\n#include \"oneapi/tbb/mutex.h\"\n\n#include \"common/utils.h\"\n#include \"common/utils_concurrency_limit.h\"\n#include \"common/dummy_body.h\"\n#include \"common/spin_barrier.h\"\n\n#include <cstddef>\n#include <utility>\n#include <vector>\n#include <algorithm> // std::min_element\n\n//! \\file test_partitioner.cpp\n//! \\brief Test for [internal] functionality\n\nnamespace task_affinity_retention {\n\nclass leaving_observer : public tbb::task_scheduler_observer {\n    std::atomic<int> my_thread_count{};\npublic:\n    leaving_observer(tbb::task_arena& a) : tbb::task_scheduler_observer(a) {\n        observe(true);\n    }\n\n    void on_scheduler_entry(bool) override {\n        ++my_thread_count;\n    }\n\n    void on_scheduler_exit(bool) override {\n        --my_thread_count;\n    }\n\n    void wait_leave() {\n        while (my_thread_count.load() != 0) {\n            std::this_thread::yield();\n        }\n    }\n};\n\ntemplate <typename PerBodyFunc> float test(PerBodyFunc&& body) {\n    const std::size_t num_threads = 2 * utils::get_platform_max_threads();\n    tbb::global_control concurrency(tbb::global_control::max_allowed_parallelism, num_threads);\n    tbb::task_arena big_arena(static_cast<int>(num_threads));\n    leaving_observer observer(big_arena);\n\n#if __TBB_USE_THREAD_SANITIZER\n    // Reduce execution time under Thread Sanitizer\n    const std::size_t repeats = 50;\n#elif EMSCRIPTEN\n    // Reduce execution time for emscripten\n    const std::size_t repeats = 10;\n#else\n    const std::size_t repeats = 100;\n#endif\n    const std::size_t per_thread_iters = 1000;\n\n    using range = std::pair<std::size_t, std::size_t>;\n    using execution_trace = std::vector< std::vector<range> >;\n\n    execution_trace trace(num_threads);\n    for (auto& v : trace)\n        v.reserve(repeats);\n\n    for (std::size_t repeat = 0; repeat < repeats; ++repeat) {\n        big_arena.execute([&] {\n            tbb::parallel_for(\n                tbb::blocked_range<std::size_t>(0, per_thread_iters * num_threads),\n                [&](const tbb::blocked_range<std::size_t>& r) {\n                    int thread_id = tbb::this_task_arena::current_thread_index();\n                    trace[thread_id].emplace_back(r.begin(), r.end());\n\n                    const bool is_uniform_split = r.size() == per_thread_iters;\n                    CHECK_MESSAGE(is_uniform_split, \"static partitioner split the range incorrectly.\");\n\n                    std::this_thread::yield();\n\n                    std::forward<PerBodyFunc>(body)();\n                },\n                tbb::static_partitioner()\n            );\n        });\n        // To avoid tasks stealing in the beginning of the parallel algorithm, the test waits for\n        // the threads to leave the arena, so that on the next iteration they have tasks assigned\n        // in their mailboxes and, thus, don't need to search for work to do in other task pools.\n        observer.wait_leave();\n    }\n\n    std::size_t range_shifts = 0;\n    for (std::size_t thread_id = 0; thread_id < num_threads; ++thread_id) {\n        auto trace_size = trace[thread_id].size();\n        if (trace_size > 1) {\n            auto previous_call_range = trace[thread_id][1];\n\n            for (std::size_t invocation = 2; invocation < trace_size; ++invocation) {\n                const auto& current_call_range = trace[thread_id][invocation];\n\n                const bool is_range_changed = previous_call_range != current_call_range;\n                if (is_range_changed) {\n                    previous_call_range = current_call_range;\n                    // count thread changes its execution strategy\n                    ++range_shifts;\n                }\n            }\n        }\n\n#if TBB_USE_DEBUG\n        WARN_MESSAGE(\n            trace_size <= repeats,\n            \"Thread \" << thread_id << \" executed extra \" << trace_size - repeats\n            << \" ranges assigned to other threads.\"\n        );\n        WARN_MESSAGE(\n            trace_size >= repeats,\n            \"Thread \" << thread_id << \" executed \" << repeats - trace_size\n            << \" fewer ranges than expected.\"\n        );\n#endif\n    }\n\n#if TBB_USE_DEBUG\n    WARN_MESSAGE(\n        range_shifts == 0,\n        \"Threads change subranges \" << range_shifts << \" times out of \"\n        << num_threads * repeats - num_threads << \" possible.\"\n    );\n#endif\n\n    return float(range_shifts) / float(repeats * num_threads);\n}\n\nvoid relaxed_test() {\n    float range_shifts_part = test(/*per body invocation call*/[]{});\n    const float require_tolerance = 0.5f;\n    // TODO: investigate why switching could happen in more than half of the cases\n    WARN_MESSAGE(\n        (0 <= range_shifts_part && range_shifts_part <= require_tolerance),\n        \"Tasks affinitization was not respected in \" << range_shifts_part * 100 << \"% of the cases.\"\n    );\n}\n\nvoid strict_test() {\n    utils::SpinBarrier barrier(2 * utils::get_platform_max_threads());\n    const float tolerance = 1e-5f;\n    while (test(/*per body invocation call*/[&barrier] { barrier.wait(); }) > tolerance);\n}\n\n} // namespace task_affinity_retention\n\n// global_control::max_allowed_parallelism functionality is not covered by TCM\n#if !__TBB_TCM_TESTING_ENABLED\n//! Testing affinitized tasks are not stolen\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Threads respect task affinity\") {\n    task_affinity_retention::relaxed_test();\n    task_affinity_retention::strict_test();\n}\n#endif\n\ntemplate <typename Range>\nvoid test_custom_range(int diff_mult) {\n    int num_trials = 100;\n\n    std::vector<std::vector<std::size_t>> results(num_trials);\n    oneapi::tbb::mutex results_mutex;\n\n    for (int i = 0; i < num_trials; ++i) {\n        oneapi::tbb::parallel_for(Range(0, int(100 * utils::get_platform_max_threads()), 1), [&] (const Range& r) {\n            oneapi::tbb::mutex::scoped_lock lock(results_mutex);\n            results[i].push_back(r.size());\n        }, oneapi::tbb::static_partitioner{});\n    }\n\n    for (auto& res : results) {\n        REQUIRE(res.size() == utils::get_platform_max_threads());\n\n        std::size_t min_size = *std::min_element(res.begin(), res.end());\n        for (auto elem : res) {\n            REQUIRE(min_size * diff_mult + 2 >= elem);\n        }\n    }\n}\n\n//! \\brief \\ref regression\nTEST_CASE(\"Test partitioned tasks count and size for static_partitioner\") {\n    class custom_range : public oneapi::tbb::blocked_range<int> {\n        using base_type = oneapi::tbb::blocked_range<int>;\n    public:\n        custom_range(int l, int r, int g) : base_type(l, r, g) {}\n        custom_range(const custom_range& r) : base_type(r) {}\n\n        custom_range(custom_range& r, tbb::split) : base_type(r, tbb::split()) {}\n    };\n\n    test_custom_range<custom_range>(2);\n\n    class custom_range_with_psplit : public oneapi::tbb::blocked_range<int> {\n        using base_type = oneapi::tbb::blocked_range<int>;\n    public:\n        custom_range_with_psplit(int l, int r, int g) : base_type(l, r, g) {}\n        custom_range_with_psplit(const custom_range_with_psplit& r) : base_type(r) {}\n\n        custom_range_with_psplit(custom_range_with_psplit& r, tbb::split) : base_type(r, tbb::split()) {}\n        custom_range_with_psplit(custom_range_with_psplit& r, tbb::proportional_split& p) : base_type(r, p) {}\n    };\n\n    test_custom_range<custom_range_with_psplit>(1);\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_partitioner.h",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n\n#include \"tbb/blocked_range.h\"\n\n#include <cmath>\n#include <vector>\n\n#include \"common/utils_report.h\"\n\nnamespace test_partitioner_utils {\n\nstruct RangeStatisticData {\n    // denotes the number of range objects\n    size_t m_rangeNum;\n\n    // store minimal and maximal range sizes (in terms of number of iterations)\n    size_t m_minRangeSize;\n    size_t m_maxRangeSize;\n\n    bool m_wasMinRangeSizeWritten; // shows whether relevant field was written or not\n};\n\nusing tbb::split;\nusing tbb::proportional_split;\nusing tbb::blocked_range;\n\n// helper for calculating number of range objects created before balancing phase is started\n// and for finding maximum and minimum number of iterations among all such ranges\n// Note: class does not provide exclusive access to members\nclass RangeStatisticCollector {\npublic:\n    RangeStatisticCollector(RangeStatisticData *statisticData) :\n        m_statData(statisticData)\n    {\n        m_called = false;\n        if (m_statData)\n            m_statData->m_rangeNum = 1;\n    }\n\n    // constructor is called from non-proportional split constructor of derived Range\n    RangeStatisticCollector(RangeStatisticCollector& sc, size_t rangeSize) {\n        if (!sc.m_called) {\n            // this is the first time non-proportional split constructor is called\n            // it means that work distribution phase has been completed and\n            // work balancing phase has been just started\n            sc.m_called = true;\n\n            if (sc.m_statData) {\n                size_t *minRangeSize = &sc.m_statData->m_minRangeSize;\n                if (*minRangeSize > rangeSize || !sc.m_statData->m_wasMinRangeSizeWritten) { // if minimum is not an actual minimum\n                    *minRangeSize = rangeSize;\n                    sc.m_statData->m_wasMinRangeSizeWritten = true;\n                }\n                size_t *maxRangeSize = &sc.m_statData->m_maxRangeSize;\n                if (*maxRangeSize < rangeSize) { // if maximum is not an actual maximum\n                    *maxRangeSize = rangeSize;\n                }\n            }\n        }\n        *this = sc;\n        // constructor is used on work balancing phase only, so no need to increment\n        // number of range objects created\n    }\n\n    RangeStatisticCollector(RangeStatisticCollector& sc, proportional_split&) {\n        if (sc.m_statData)\n            sc.m_statData->m_rangeNum++;\n        *this = sc;\n    }\n\nprivate:\n    RangeStatisticData *m_statData;\n\n    // turns to 'true' when non-proportional split constructor is called first time\n    bool m_called;\n};\n\n// Base class for fake ranges used in various tests for parallel\n// algorithms as well as for partitioner\ntemplate <typename DerivedRange, typename T>\nclass RangeBase: public RangeStatisticCollector {\nprotected:\n    size_t my_begin, my_end;\n    bool m_provide_feedback;\n    bool m_ensure_non_empty_size;\npublic:\n    RangeBase(size_t _begin, size_t _end, RangeStatisticData *statData,\n              bool provide_feedback, bool ensure_non_empty_size)\n        : RangeStatisticCollector(statData)\n        , my_begin(_begin), my_end(_end)\n        , m_provide_feedback(provide_feedback)\n        , m_ensure_non_empty_size(ensure_non_empty_size)\n        { }\n    RangeBase(RangeBase& r, tbb::split) : RangeStatisticCollector(r, r.size()) {\n        *this = r;\n        size_t middle = r.my_begin + (r.my_end - r.my_begin) / 2u;\n        r.my_end = my_begin = middle;\n    }\n\n    RangeBase(RangeBase& r, proportional_split& p) : RangeStatisticCollector(r, p) {\n        *this = r;\n        size_t original_size = r.size();\n        T right = self().compute_right_part(r, p);\n        size_t right_part = self().round(right);\n        if( m_ensure_non_empty_size ) {\n            right_part = (original_size == right_part) ? (original_size - 1) : right_part;\n            right_part = (right_part != 0) ? right_part : 1;\n        }\n        r.my_end = my_begin = r.my_end - right_part;\n        if( m_ensure_non_empty_size )\n            CHECK_MESSAGE((r.my_end != r.my_begin && my_end != my_begin), \"Incorrect range split\");\n    }\n\n    size_t begin() const { return my_begin; }\n    size_t end() const { return my_end; }\n    bool is_divisible() const { return (my_end - my_begin) > 1; }\n    bool empty() const { return my_end == my_begin; }\n    size_t size() const { return my_end - my_begin; }\n\n    // helper methods (not part of the range concept)\n    DerivedRange& self() { return static_cast<DerivedRange&>(*this); }\n    size_t round(T part) { return size_t(part); }\n    T compute_right_part(RangeBase& r, proportional_split& p) {\n        return T(r.size() * T(p.right())) / T(p.left() + p.right());\n    }\n    bool is_ensure_non_emptiness() { return m_ensure_non_empty_size; }\n};\n\nnamespace TestRanges {\n/*\n * RoundedUpRange rounds result up\n * RoundedDownRange rounds result down\n * Range1_2 forces proportion always to be 1:2 and rounds up\n * Range1_999 uses weird proportion 1:999 and rounds up\n * Range1_999 uses weird proportion 999:1 and rounds up\n * BlockedRange uses tbb::blocked_range formula for proportion calculation\n * InvertedProportionRange inverts proportion suggested by partitioner (e.g. 1:3 --> 3:1)\n * ExactSplitRange uses integer arithmetic for accurate splitting\n */\n\nclass RoundedDownRange: public RangeBase<RoundedDownRange, float> {\npublic:\n    RoundedDownRange(size_t _begin, size_t _end, RangeStatisticData *statData,\n                     bool provide_feedback, bool ensure_non_empty_size)\n        : RangeBase<RoundedDownRange, float>(_begin, _end, statData, provide_feedback,\n                                             ensure_non_empty_size) { }\n    RoundedDownRange(RoundedDownRange& r, tbb::split)\n        : RangeBase<RoundedDownRange, float>(r, tbb::split()) { }\n    RoundedDownRange(RoundedDownRange& r, proportional_split& p)\n        : RangeBase<RoundedDownRange, float>(r, p) { }\n    // uses default implementation of RangeBase::round() which rounds down\n};\n\nclass RoundedUpRange: public RangeBase<RoundedUpRange, float> {\npublic:\n    RoundedUpRange(size_t _begin, size_t _end, RangeStatisticData *statData,\n                   bool provide_feedback, bool ensure_non_empty_size)\n        : RangeBase<RoundedUpRange, float>(_begin, _end, statData, provide_feedback,\n                                           ensure_non_empty_size) { }\n    RoundedUpRange(RoundedUpRange& r, tbb::split)\n        : RangeBase<RoundedUpRange, float>(r, tbb::split()) { }\n    RoundedUpRange(RoundedUpRange& r, proportional_split& p)\n        : RangeBase<RoundedUpRange, float>(r, p) { }\n    size_t round(float part) { return size_t(std::ceil(part)); }\n};\n\nclass Range1_2: public RangeBase<Range1_2, float> {\npublic:\n    Range1_2(size_t _begin, size_t _end, RangeStatisticData *statData,\n             bool provide_feedback, bool ensure_non_empty_size)\n        : RangeBase<Range1_2, float>(_begin, _end, statData, provide_feedback,\n                                     ensure_non_empty_size) { }\n    Range1_2(Range1_2& r, tbb::split) : RangeBase<Range1_2, float>(r, tbb::split()) { }\n    Range1_2(Range1_2& r, proportional_split& p) : RangeBase<Range1_2, float>(r, p) { }\n    float compute_right_part(RangeBase<Range1_2, float>& r, proportional_split&) {\n        return float(r.size() * 2) / 3.0f;\n    }\n    // uses default implementation of RangeBase::round() which rounds down\n};\n\nclass Range1_999: public RangeBase<Range1_999, float> {\npublic:\n    Range1_999(size_t _begin, size_t _end, RangeStatisticData *statData,\n               bool provide_feedback, bool ensure_non_empty_size)\n        : RangeBase<Range1_999, float>(_begin, _end, statData, provide_feedback,\n                                       ensure_non_empty_size) { }\n    Range1_999(Range1_999& r, tbb::split) : RangeBase<Range1_999, float>(r, tbb::split()) { }\n    Range1_999(Range1_999& r, proportional_split& p) : RangeBase<Range1_999, float>(r, p) { }\n    float compute_right_part(RangeBase<Range1_999, float>& r, proportional_split&) {\n        return float(r.size() * 999) / 1000.0f;\n    }\n    // uses default implementation of RangeBase::round() which rounds down\n};\n\nclass Range999_1: public RangeBase<Range999_1, float> {\npublic:\n    Range999_1(size_t _begin, size_t _end, RangeStatisticData *statData,\n               bool provide_feedback, bool ensure_non_empty_size)\n        : RangeBase<Range999_1, float>(_begin, _end, statData, provide_feedback,\n                                       ensure_non_empty_size) { }\n    Range999_1(Range999_1& r, tbb::split) : RangeBase<Range999_1, float>(r, tbb::split()) { }\n    Range999_1(Range999_1& r, proportional_split& p) : RangeBase<Range999_1, float>(r, p) { }\n    float compute_right_part(RangeBase<Range999_1, float>& r, proportional_split&) {\n        return float(r.size()) / 1000.0f;\n    }\n    // uses default implementation of RangeBase::round() which rounds down\n};\n\nclass BlockedRange: public RangeStatisticCollector, public blocked_range<size_t>  {\npublic:\n    BlockedRange(size_t _begin, size_t _end, RangeStatisticData *statData, bool, bool)\n        : RangeStatisticCollector(statData), blocked_range<size_t>(_begin, _end) { }\n    BlockedRange(BlockedRange& r, split)\n        : RangeStatisticCollector(r, r.size()), blocked_range<size_t>(r, split()) { }\n    BlockedRange(BlockedRange& r, proportional_split& p)\n        : RangeStatisticCollector(r, p), blocked_range<size_t>(r, p) { }\n    bool is_ensure_non_emptiness() { return false; }\n};\n\nclass InvertedProportionRange: public RangeBase<InvertedProportionRange, float> {\npublic:\n    InvertedProportionRange(size_t _begin, size_t _end, RangeStatisticData *statData,\n                            bool provide_feedback, bool ensure_non_empty_size)\n        : RangeBase<InvertedProportionRange, float>(_begin, _end, statData, provide_feedback,\n                                                    ensure_non_empty_size) { }\n    InvertedProportionRange(InvertedProportionRange& r, split)\n        : RangeBase<InvertedProportionRange, float>(r, split()) { }\n    InvertedProportionRange(InvertedProportionRange& r, proportional_split& p)\n        : RangeBase<InvertedProportionRange, float>(r, p) { }\n    float compute_right_part(RangeBase<InvertedProportionRange, float>& r,\n                             proportional_split& p) {\n        return float(r.size() * float(p.left())) / float(p.left() + p.right());\n    }\n};\n\nclass ExactSplitRange: public RangeBase<ExactSplitRange, size_t> {\npublic:\n    ExactSplitRange(size_t _begin, size_t _end, RangeStatisticData *statData,\n                    bool provide_feedback, bool ensure_non_empty_size)\n        : RangeBase<ExactSplitRange, size_t>(_begin, _end, statData, provide_feedback,\n                                             ensure_non_empty_size) { }\n    ExactSplitRange(ExactSplitRange& r, split)\n        : RangeBase<ExactSplitRange, size_t>(r, split()) { }\n    ExactSplitRange(ExactSplitRange& r, proportional_split& p)\n        : RangeBase<ExactSplitRange, size_t>(r, p) { }\n    size_t compute_right_part(RangeBase<ExactSplitRange, size_t>& r, proportional_split& p) {\n        size_t parts = size_t(p.left() + p.right());\n        size_t currSize = r.size();\n        size_t int_part = currSize / parts * p.right();\n        size_t remainder = currSize % parts * p.right();\n        int_part += remainder / parts;\n        remainder %= parts;\n        size_t right_part = int_part + (remainder > parts/2 ? 1 : 0);\n        return right_part;\n    }\n};\n\n} // namespace TestRanges\n\nstruct TreeNode {\n    size_t m_affinity;\n    size_t m_range_begin, m_range_end;\n    TreeNode *m_left, *m_right;\nprivate:\n    TreeNode(size_t range_begin, size_t range_end, size_t affinity,\n             TreeNode* left, TreeNode* right)\n        : m_affinity(affinity), m_range_begin(range_begin), m_range_end(range_end),\n          m_left(left), m_right(right) { }\n\n    friend TreeNode* make_node(size_t range_begin, size_t range_end, size_t affinity,\n                               TreeNode *left, TreeNode *right);\n};\n\nTreeNode* make_node(size_t range_begin, size_t range_end, size_t affinity,\n                    TreeNode* left = nullptr, TreeNode* right = nullptr) {\n    CHECK_MESSAGE((range_begin <= range_end), \"Incorrect range interval\");\n    return new TreeNode(range_begin, range_end, affinity, left, right);\n}\n\n// Class stores nodes as a binary tree\n// (marshals TreeNode objects in accordance with values of range intervals)\n// Note: BinaryTree deletes all TreeNode objects pushed into it in a destruction phase\nclass BinaryTree {\npublic:\n    BinaryTree() : m_root(nullptr) { }\n    ~BinaryTree() {\n        if (m_root)\n            remove_node_recursively(m_root);\n    }\n\n    // pushed node must be within subrange of the parent nodes\n    void push_node(TreeNode* node) {\n        if (!node)\n            return;\n\n        if (m_root) {\n            CHECK_MESSAGE((node->m_range_begin >= m_root->m_range_begin && node->m_range_end <= m_root->m_range_end),\n                \"Cannot push node not from subrange\");\n        }\n\n        push_subnode(m_root, node);\n    }\n\n    void visualize() {\n        if (!m_root) { // nothing to visualize\n            REPORT(\"Tree is empty\\n\");\n            return;\n        }\n        visualize_node(m_root);\n    }\n\n    bool operator ==(const BinaryTree& other_tree) const { return compare_nodes(m_root, other_tree.m_root); }\n    void fill_leafs(std::vector<TreeNode*>& leafs) const { fill_leafs_impl(m_root, leafs); }\n\nprivate:\n    TreeNode *m_root;\n\n    void push_subnode(TreeNode *&root_node, TreeNode *node) {\n        if (!root_node) {\n            root_node = node;\n            return;\n        } else if (are_nodes_equal(root_node, node)) {\n            // no need to push the same node\n            return;\n        }\n\n        if (!has_children(root_node)) {\n            // if current root_node does not have children passed node\n            // should has one of the interval bounds to be equal to\n            // the same bound in the root_node\n            if (is_look_like_left_sibling(root_node, node))\n                push_subnode(root_node->m_left, node);\n            else\n                push_subnode(root_node->m_right, node);\n            return;\n        }\n\n        if (has_left_child(root_node)) {\n            if (is_subnode(root_node->m_left, node)) {\n                push_subnode(root_node->m_left, node);\n                return;\n            }\n            push_subnode(root_node->m_right, node);\n            return;\n        }\n\n        CHECK_MESSAGE(root_node->m_right != nullptr, \"Right child is nullptr but must be present\");\n        if (is_subnode(root_node->m_right, node)) {\n            push_subnode(root_node->m_right, node);\n            return;\n        }\n        push_subnode(root_node->m_left, node);\n        return;\n    }\n\n    bool has_children(TreeNode *node) { return node->m_left || node->m_right; }\n\n    bool is_look_like_left_sibling(TreeNode *root_node, TreeNode *node) {\n        if (root_node->m_range_begin == node->m_range_begin)\n            return true;\n        CHECK_MESSAGE(root_node->m_range_end == node->m_range_end, nullptr);\n        return false;\n    }\n\n    bool has_left_child(TreeNode *node) { return node->m_left != nullptr; }\n\n    bool is_subnode(TreeNode *root_node, TreeNode *node) {\n        return root_node->m_range_begin <= node->m_range_begin &&\n            node->m_range_end <= root_node->m_range_end;\n    }\n\n    bool are_nodes_equal(TreeNode *node1, TreeNode *node2) const {\n        return node1->m_range_begin == node2->m_range_begin &&\n            node1->m_range_end == node2->m_range_end;\n    }\n\n    void remove_node_recursively(TreeNode *node) {\n        if (node->m_left)\n            remove_node_recursively(node->m_left);\n        if (node->m_right)\n            remove_node_recursively(node->m_right);\n        delete node;\n    }\n\n    static void visualize_node(const TreeNode* node, unsigned indent = 0) {\n        // respecting indent\n        const char *indentStep = \"    \";\n        for (unsigned i = 0; i < indent; ++i)\n            REPORT(\"%s\", indentStep);\n\n        size_t rangeSize = node->m_range_end - node->m_range_begin;\n        REPORT(\"[%llu, %llu)%%%llu@%llu\\n\", uint64_t(node->m_range_begin), uint64_t(node->m_range_end),\n               uint64_t(rangeSize), uint64_t(node->m_affinity));\n\n        if (node->m_left)\n            visualize_node(node->m_left, indent + 1);\n        if (node->m_right)\n            visualize_node(node->m_right, indent + 1);\n    }\n\n    bool compare_nodes(TreeNode* node1, TreeNode* node2) const {\n        if (node1 == nullptr && node2 == nullptr) return true;\n        if (node1 == nullptr || node2 == nullptr) return false;\n        return are_nodes_equal(node1, node2) && compare_nodes(node1->m_left, node2->m_left)\n            && compare_nodes(node1->m_right, node2->m_right);\n    }\n\n    void fill_leafs_impl(TreeNode* node, std::vector<TreeNode*>& leafs) const {\n        if (node->m_left == nullptr && node->m_right == nullptr)\n            leafs.push_back(node);\n        if (node->m_left != nullptr) fill_leafs_impl(node->m_left, leafs);\n        if (node->m_right != nullptr) fill_leafs_impl(node->m_right, leafs);\n    }\n};\n\nclass SimpleBody {\npublic:\n    SimpleBody() { }\n    template <typename Range>\n    void operator()(Range&) const { }\n};\n\nclass SimpleReduceBody {\npublic:\n    SimpleReduceBody() { }\n    SimpleReduceBody(SimpleReduceBody&, tbb::split) { }\n    template <typename Range>\n    void operator()(Range&) { }\n    void join(SimpleReduceBody&) { }\n};\n\nnamespace interaction_with_range_and_partitioner {\n\nclass SplitConstructorAssertedRange {\n    mutable bool is_divisible_called;\n    mutable bool is_empty_called;\n    bool my_assert_in_nonproportional, my_assert_in_proportional;\npublic:\n    SplitConstructorAssertedRange(bool assert_in_nonproportional, bool assert_in_proportional)\n        : is_divisible_called(false),\n          is_empty_called(false),\n          my_assert_in_nonproportional(assert_in_nonproportional),\n          my_assert_in_proportional(assert_in_proportional) { }\n    SplitConstructorAssertedRange(SplitConstructorAssertedRange& r, tbb::split) {\n        *this = r;\n        CHECK_MESSAGE( !my_assert_in_nonproportional, \"Disproportional splitting constructor was called but should not been\" );\n    }\n    SplitConstructorAssertedRange(SplitConstructorAssertedRange& r, proportional_split&) {\n        *this = r;\n        CHECK_MESSAGE( !my_assert_in_proportional, \"Proportional splitting constructor was called but should not been\" );\n    }\n    bool is_divisible() const {\n        if (!is_divisible_called) {\n            is_divisible_called = true;\n            return true;\n        }\n        return false;\n    }\n    bool empty() const {\n        if (!is_empty_called) {\n            is_empty_called = true;\n            return false;\n        }\n        return true;\n    }\n};\n\n// proportional_split ctor defined\nclass Range1: public SplitConstructorAssertedRange {\npublic:\n    Range1(bool assert_in_nonproportional, bool assert_in_proportional)\n        : SplitConstructorAssertedRange(assert_in_nonproportional, assert_in_proportional) { }\n    Range1( Range1& r, tbb::split ) : SplitConstructorAssertedRange(r, tbb::split()) { }\n    Range1( Range1& r, proportional_split& proportion ) : SplitConstructorAssertedRange(r, proportion) { }\n};\n\n// proportional_split ctor is not defined\nclass Range6: public SplitConstructorAssertedRange {\npublic:\n    Range6(bool assert_in_nonproportional, bool assert_in_proportional)\n        : SplitConstructorAssertedRange(assert_in_nonproportional, assert_in_proportional) { }\n    Range6(Range6& r, tbb::split) : SplitConstructorAssertedRange(r, tbb::split()) { }\n};\n\n} // namespace interaction_with_range_and_partitioner\n\n} // namespace test_partitioner_utils\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_priority_queue_node.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// TODO: Add overlapping put / receive tests\n\n#include \"common/config.h\"\n\n#include \"tbb/flow_graph.h\"\n#include \"tbb/global_control.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_assert.h\"\n#include \"common/checktype.h\"\n#include \"common/graph_utils.h\"\n#include \"common/test_follows_and_precedes_api.h\"\n\n#include <cstdio>\n\n#include \"test_buffering_try_put_and_wait.h\"\n\n//! \\file test_priority_queue_node.cpp\n//! \\brief Test for [flow_graph.priority_queue_node] specification\n\n\n#define N 10\n#define C 10\n\ntemplate< typename T >\nvoid spin_try_get( tbb::flow::priority_queue_node<T> &q, T &value ) {\n    while ( q.try_get(value) != true ) ;\n}\n\ntemplate< typename T >\nvoid check_item( T* next_value, T &value ) {\n    int tid = value / N;\n    int offset = value % N;\n    CHECK_MESSAGE( next_value[tid] == T(offset), \"\" );\n    ++next_value[tid];\n}\n\ntemplate< typename T >\nstruct parallel_puts : utils::NoAssign {\n    tbb::flow::priority_queue_node<T> &my_q;\n    parallel_puts( tbb::flow::priority_queue_node<T> &q ) : my_q(q) {}\n    void operator()(int i) const {\n        for (int j = 0; j < N; ++j) {\n            bool msg = my_q.try_put( T(N*i + j) );\n            CHECK_MESSAGE( msg == true, \"\" );\n        }\n    }\n};\n\ntemplate< typename T >\nstruct parallel_gets : utils::NoAssign {\n    tbb::flow::priority_queue_node<T> &my_q;\n    parallel_gets( tbb::flow::priority_queue_node<T> &q) : my_q(q) {}\n    void operator()(int) const {\n        T prev;\n        spin_try_get( my_q, prev );\n        for (int j = 0; j < N-1; ++j) {\n            T v;\n            spin_try_get( my_q, v );\n            CHECK_MESSAGE(v < prev, \"\");\n        }\n    }\n};\n\ntemplate< typename T >\nstruct parallel_put_get : utils::NoAssign {\n    tbb::flow::priority_queue_node<T> &my_q;\n    parallel_put_get( tbb::flow::priority_queue_node<T> &q ) : my_q(q) {}\n    void operator()(int tid) const {\n        for ( int i = 0; i < N; i+=C ) {\n            int j_end = ( N < i + C ) ? N : i + C;\n            // dump about C values into the Q\n            for ( int j = i; j < j_end; ++j ) {\n                CHECK_MESSAGE( my_q.try_put( T (N*tid + j ) ) == true, \"\" );\n            }\n            // receive about C values from the Q\n            for ( int j = i; j < j_end; ++j ) {\n                T v;\n                spin_try_get( my_q, v );\n            }\n        }\n    }\n};\n\n//\n// Tests\n//\n// Item can be reserved, released, consumed ( single serial receiver )\n//\ntemplate< typename T >\nint test_reservation(int) {\n    tbb::flow::graph g;\n\n    // Simple tests\n    tbb::flow::priority_queue_node<T> q(g);\n\n    {\n\n        T bogus_value(-1);\n\n        q.try_put(T(1));\n        q.try_put(T(2));\n        q.try_put(T(3));\n        g.wait_for_all();\n\n        T v=bogus_value, w=bogus_value;\n        CHECK_MESSAGE( q.try_reserve(v) == true, \"\" );\n        CHECK_MESSAGE( v == T(3), \"\" );\n        CHECK_MESSAGE( q.try_release() == true, \"\" );\n        v = bogus_value;\n        g.wait_for_all();\n        CHECK_MESSAGE( q.try_reserve(v) == true, \"\" );\n        CHECK_MESSAGE( v == T(3), \"\" );\n        CHECK_MESSAGE( q.try_consume() == true, \"\" );\n        v = bogus_value;\n        g.wait_for_all();\n\n        CHECK_MESSAGE( q.try_get(v) == true, \"\" );\n        CHECK_MESSAGE( v == T(2), \"\" );\n        v = bogus_value;\n        g.wait_for_all();\n\n        CHECK_MESSAGE( q.try_reserve(v) == true, \"\" );\n        CHECK_MESSAGE( v == T(1), \"\" );\n        CHECK_MESSAGE( q.try_reserve(w) == false, \"\" );\n        CHECK_MESSAGE( w == bogus_value, \"\" );\n        CHECK_MESSAGE( q.try_get(w) == false, \"\" );\n        CHECK_MESSAGE( w == bogus_value, \"\" );\n        CHECK_MESSAGE( q.try_release() == true, \"\" );\n        v = bogus_value;\n        g.wait_for_all();\n        CHECK_MESSAGE( q.try_reserve(v) == true, \"\" );\n        CHECK_MESSAGE( v == T(1), \"\" );\n        CHECK_MESSAGE( q.try_consume() == true, \"\" );\n        v = bogus_value;\n        g.wait_for_all();\n        CHECK_MESSAGE( q.try_get(v) == false, \"\" );\n    }\n    return 0;\n}\n\n//\n// Tests\n//\n// multiple parallel senders, items in FIFO (relatively to sender) order\n// multiple parallel senders, multiple parallel receivers, items in FIFO order (relative to sender/receiver) and all items received\n//   * overlapped puts / gets\n//   * all puts finished before any getS\n//\ntemplate< typename T >\nint test_parallel(int num_threads) {\n    tbb::flow::graph g;\n    tbb::flow::priority_queue_node<T> q(g);\n    tbb::flow::priority_queue_node<T> q2(g);\n    tbb::flow::priority_queue_node<T> q3(g);\n    T bogus_value(-1);\n    T j = bogus_value;\n\n    NativeParallelFor( num_threads, parallel_puts<T>(q) );\n    for (int i = num_threads*N -1; i>=0; --i) {\n        spin_try_get( q, j );\n        CHECK_MESSAGE(j == i, \"\");\n        j = bogus_value;\n    }\n    g.wait_for_all();\n    CHECK_MESSAGE( q.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    NativeParallelFor( num_threads, parallel_puts<T>(q) );\n    g.wait_for_all();\n    NativeParallelFor( num_threads, parallel_gets<T>(q) );\n    g.wait_for_all();\n    j = bogus_value;\n    CHECK_MESSAGE( q.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    NativeParallelFor( num_threads, parallel_put_get<T>(q) );\n    g.wait_for_all();\n    j = bogus_value;\n    CHECK_MESSAGE( q.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    tbb::flow::make_edge( q, q2 );\n    tbb::flow::make_edge( q2, q3 );\n    NativeParallelFor( num_threads, parallel_puts<T>(q) );\n    g.wait_for_all();\n    NativeParallelFor( num_threads, parallel_gets<T>(q3) );\n    g.wait_for_all();\n    j = bogus_value;\n    CHECK_MESSAGE( q.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n    CHECK_MESSAGE( q2.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n    CHECK_MESSAGE( q3.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    // test copy constructor\n    CHECK_MESSAGE( remove_successor(q, q2) == true, \"\" );\n    NativeParallelFor( num_threads, parallel_puts<T>(q) );\n    tbb::flow::priority_queue_node<T> q_copy(q);\n    g.wait_for_all();\n    j = bogus_value;\n    CHECK_MESSAGE( q_copy.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( register_successor(q, q_copy) == true, \"\" );\n    for (int i = num_threads*N -1; i>=0; --i) {\n        spin_try_get( q_copy, j );\n        CHECK_MESSAGE(j == i, \"\");\n        j = bogus_value;\n    }\n    g.wait_for_all();\n    CHECK_MESSAGE( q.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n    CHECK_MESSAGE( q_copy.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    return 0;\n}\n\n//\n// Tests\n//\n// Predecessors cannot be registered\n// Empty Q rejects item requests\n// Single serial sender, items in FIFO order\n// Chained Qs ( 2 & 3 ), single sender, items at last Q in FIFO order\n//\n\ntemplate< typename T >\nint test_serial() {\n    tbb::flow::graph g;\n    T bogus_value(-1);\n\n    tbb::flow::priority_queue_node<T> q(g);\n    tbb::flow::priority_queue_node<T> q2(g);\n    T j = bogus_value;\n\n    //\n    // Rejects attempts to add / remove predecessor\n    // Rejects request from empty Q\n    //\n    CHECK_MESSAGE( register_predecessor(q, q2) == false, \"\" );\n    CHECK_MESSAGE( remove_predecessor(q, q2) == false, \"\" );\n    CHECK_MESSAGE( q.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    //\n    // Simple puts and gets\n    //\n\n    for (int i = 0; i < N; ++i)\n        CHECK_MESSAGE( q.try_put( T(i) ), \"\" );\n    for (int i = N-1; i >=0; --i) {\n        j = bogus_value;\n        spin_try_get( q, j );\n        CHECK_MESSAGE( i == j, \"\" );\n    }\n    j = bogus_value;\n    g.wait_for_all();\n    CHECK_MESSAGE( q.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    tbb::flow::make_edge( q, q2 );\n\n    for (int i = 0; i < N; ++i)\n        CHECK_MESSAGE( q.try_put( T(i) ), \"\" );\n    g.wait_for_all();\n    for (int i = N-1; i >= 0; --i) {\n        j = bogus_value;\n        spin_try_get( q2, j );\n        CHECK_MESSAGE( i == j, \"\" );\n    }\n    j = bogus_value;\n    g.wait_for_all();\n    CHECK_MESSAGE( q.try_get( j ) == false, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( q2.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    tbb::flow::remove_edge( q, q2 );\n    CHECK_MESSAGE( q.try_put( 1 ) == true, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( q2.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( q.try_get( j ) == true, \"\" );\n    CHECK_MESSAGE( j == 1, \"\" );\n\n    tbb::flow::priority_queue_node<T> q3(g);\n    tbb::flow::make_edge( q, q2 );\n    tbb::flow::make_edge( q2, q3 );\n\n    for (int i = 0; i < N; ++i)\n        CHECK_MESSAGE(  q.try_put( T(i) ), \"\" );\n    g.wait_for_all();\n    for (int i = N-1; i >= 0; --i) {\n        j = bogus_value;\n        spin_try_get( q3, j );\n        CHECK_MESSAGE( i == j, \"\" );\n    }\n    j = bogus_value;\n    g.wait_for_all();\n    CHECK_MESSAGE( q.try_get( j ) == false, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( q2.try_get( j ) == false, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( q3.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    tbb::flow::remove_edge( q,  q2 );\n    CHECK_MESSAGE( q.try_put( 1 ) == true, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( q2.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( q3.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( q.try_get( j ) == true, \"\" );\n    CHECK_MESSAGE( j == 1, \"\" );\n\n    return 0;\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n#include <array>\n#include <vector>\nvoid test_follows_and_precedes_api() {\n    std::array<int, 3> messages_for_follows = { {0, 1, 2} };\n    std::vector<int> messages_for_precedes = {0, 1, 2};\n\n    follows_and_precedes_testing::test_follows <int, tbb::flow::priority_queue_node<int>>(messages_for_follows);\n    follows_and_precedes_testing::test_precedes <int, tbb::flow::priority_queue_node<int>>(messages_for_precedes);\n}\n#endif\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\nvoid test_deduction_guides() {\n    using namespace tbb::flow;\n\n    graph g;\n    broadcast_node<int> br(g);\n    priority_queue_node<int> pq0(g);\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    using compare_type = std::greater<void>;\n    priority_queue_node pq1(follows(br));\n    static_assert(std::is_same_v<decltype(pq1), priority_queue_node<int>>);\n\n    priority_queue_node pq2(follows(br), compare_type());\n    static_assert(std::is_same_v<decltype(pq2), priority_queue_node<int, compare_type>>);\n\n    priority_queue_node pq3(precedes(br));\n    static_assert(std::is_same_v<decltype(pq3), priority_queue_node<int>>);\n\n    priority_queue_node pq4(precedes(br), compare_type());\n    static_assert(std::is_same_v<decltype(pq4), priority_queue_node<int, compare_type>>);\n#endif\n\n    priority_queue_node pq5(pq0);\n    static_assert(std::is_same_v<decltype(pq5), priority_queue_node<int>>);\n    g.wait_for_all();\n}\n#endif\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\nvoid test_pqueue_node_try_put_and_wait() {\n    using namespace test_try_put_and_wait;\n\n    std::vector<int> start_work_items;\n    std::vector<int> new_work_items;\n    int wait_message = -10;\n\n    for (int i = 0; i < 10; ++i) {\n        start_work_items.emplace_back(i);\n        new_work_items.emplace_back(i + 1 + wait_message);\n    }\n\n    // Test push\n    // test_buffer_push tests the graph\n    // buffer1 -> function -> buffer2 -> writer\n    //     function is a queueing serial function_node that submits new_work_items once wait_message arrives\n    //     writer is an unlimited function_node that writes an item into the processed_items vector\n    // Test steps\n    //     1. push start_work_items into the buffer1\n    //     2. buffer1.try_put_and_wait(wait_message);\n    //     3. g.wait_for_all()\n    // test_buffer_push returns the index from which the items processed during wait_for_all() starts\n    {\n        std::vector<int> processed_items;\n\n        std::size_t after_start = test_buffer_push<tbb::flow::priority_queue_node<int>>(start_work_items, wait_message,\n                                                                                        new_work_items, processed_items);\n\n        // Expected effect:\n        // During buffer1.try_put_and_wait()\n        //     1. start_work_items would be pushed to buffer1\n        //     2. wait_message would be pushed to buffer1\n        //     3. forward_task on buffer1 would transfer start_work_items into the function_node in LIFO order\n        //     4. wait_message would be transferred last because of lowest priority\n        //     5. the first item would occupy concurrency of function, other items would be pushed to the queue\n        //     6. function would process start_work_items and push them to the buffer2\n        //     7. wait_message would be processed last and add new_work_items to buffer1\n        //     8. forward_task on buffer2 would transfer start_work_items in FIFO order and the wait_message to the writer\n        //     9.  try_put_and_wait exits since wait_message is completed\n        // During g.wait_for_all()\n        //     10. forward_task for new_work_items in buffer1 would be spawned and put items in function in LIFO order\n        // Expected items processing - { start_work_items LIFO, wait_message, new_work_items LIFO }\n\n        std::size_t check_index = 0;\n        CHECK_MESSAGE(after_start == start_work_items.size() + 1,\n                      \"try_put_and_wait should process start_work_items and the wait_message\");\n        for (std::size_t i = start_work_items.size(); i != 0; --i) {\n            CHECK_MESSAGE(processed_items[check_index++] == start_work_items[i - 1],\n                          \"try_put_and_wait should process start_work_items in LIFO order\");\n        }\n        CHECK_MESSAGE(processed_items[check_index++] == wait_message,\n                      \"try_put_and_wait should process wait_message after start_work_items\");\n\n        for (std::size_t i = new_work_items.size(); i != 0; --i) {\n            CHECK_MESSAGE(processed_items[check_index++] == new_work_items[i - 1],\n                          \"wait_for_all should process new_work_items in LIFO order\");\n        }\n        CHECK(check_index == processed_items.size());\n    } // Test push\n\n    // Test pull\n    // test_buffer_pull tests the graph\n    // buffer -> function\n    //     function is a rejecting serial function_node that submits new_work_items once wait_message arrives\n    //     and writes the processed item into the processed_items\n    // Test steps\n    //     1. push the occupier message to the function\n    //     2. push start_work_items into the buffer\n    //     3. buffer.try_put_and_wait(wait_message)\n    //     4. g.wait_for_all()\n    // test_buffer_pull returns the index from which the items processed during wait_for_all() starts\n\n    {\n        std::vector<int> processed_items;\n        int occupier = 42;\n\n        std::size_t after_start = test_buffer_pull<tbb::flow::priority_queue_node<int>>(start_work_items, wait_message, occupier,\n                                                                                        new_work_items, processed_items);\n\n        // Expected effect\n        // 0. task for occupier processing would be spawned by the function\n        // During buffer.try_put_and_wait()\n        //     1. start_work_items would be pushed to the buffer\n        //     2. wait_message would be pushed to the buffer\n        //     3. forward_task would try to push items to the function, but would fail\n        //        and set the edge to the pull state\n        //     4. occupier would be processed\n        //     5. items would be taken from the buffer by function in the priority (LIFO)  order\n        //     6. wait_message would be taken last due to lowest priority\n        //     7. new_work_items would be pushed to the buffer while processing wait_message\n        // During wait_for_all()\n        //     8. new_work_items would be taken from the buffer in the priority (LIFO) order\n        // Expected items processing { occupier, start_work_items LIFO, wait_message, new_work_items LIFO }\n\n        std::size_t check_index = 0;\n        CHECK_MESSAGE(after_start == start_work_items.size() + 2,\n                      \"try_put_and_wait should process start_work_items, occupier and the wait_message\");\n        CHECK_MESSAGE(processed_items[check_index++] == occupier, \"try_put_and_wait should process the occupier\");\n        for (std::size_t i = start_work_items.size(); i != 0; --i) {\n            CHECK_MESSAGE(processed_items[check_index++] == start_work_items[i - 1],\n                          \"try_put_and_wait should process start_work_items in LIFO order\");\n        }\n        CHECK_MESSAGE(processed_items[check_index++] == wait_message,\n                      \"try_put_and_wait should process wait_message after start_work_items\");\n\n        for (std::size_t i = new_work_items.size(); i != 0; --i) {\n            CHECK_MESSAGE(processed_items[check_index++] == new_work_items[i - 1],\n                          \"wait_for_all should process new_work_items in LIFO order\");\n        }\n        CHECK(check_index == processed_items.size());\n    }\n\n    // Test reserve\n    {\n        int thresholds[] = { 1, 2 };\n\n        for (int threshold : thresholds) {\n            std::vector<int> processed_items;\n\n            // test_buffer_reserve tests the following graph\n            // buffer -> limiter -> function\n            //  function is a rejecting serial function_node that puts an item to the decrementer port\n            //  of the limiter inside of the body\n\n            std::size_t after_start = test_buffer_reserve<tbb::flow::priority_queue_node<int>>(threshold,\n                start_work_items, wait_message, new_work_items, processed_items);\n\n            // Expected effect:\n            // 1. start_work_items would be pushed to the buffer\n            // 2. wait_message_would be pushed to the buffer\n            // 3. forward task of the buffer would push the first message to the limiter node.\n            //    Since the limiter threshold is not reached, it would be directly passed to the function\n            // 4. function would spawn the task for the first message processing\n            // 5. the first would be processed\n            // 6. decrementer.try_put() would be called and the limiter node would\n            //    process all of the items from the buffer using the try_reserve/try_consume/try_release semantics\n            //    in the priority (greatest first) order\n            // 7. When the wait_message would be taken from the queue, the try_put_and_wait would exit\n\n            std::size_t check_index = 0;\n\n            CHECK_MESSAGE(after_start == start_work_items.size() + 1,\n                          \"try_put_and_wait should start_work_items and wait_message\");\n            for (std::size_t index = start_work_items.size(); index != 0; --index) {\n                CHECK_MESSAGE(processed_items[check_index++] == start_work_items[index - 1],\n                              \"Unexpected start_work_items processing\");\n            }\n\n            CHECK_MESSAGE(processed_items[check_index++] == wait_message, \"Unexpected wait_message processing\");\n\n            for (std::size_t index = new_work_items.size(); index != 0; --index) {\n                CHECK_MESSAGE(processed_items[check_index++] == new_work_items[index - 1],\n                              \"Unexpected new_work_items processing\");\n            }\n        }\n    }\n}\n#endif // __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n\n//! Test serial, parallel behavior and reservation under parallelism\n//! \\brief \\ref requirement \\ref error_guessing\nTEST_CASE(\"Serial, parallel and reservation tests\"){\n    for (int p = 2; p <= 4; ++p) {\n        tbb::global_control thread_limit(tbb::global_control::max_allowed_parallelism, p);\n        tbb::task_arena arena(p);\n        arena.execute(\n            [&]() {\n                test_serial<int>();\n                test_reservation<int>(p);\n                test_reservation<CheckType<int> >(p);\n                test_parallel<int>(p);\n            }\n        );\n\t}\n}\n\n//! Test reset and cancellation\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Reset tests\"){\n    INFO(\"Testing resets\\n\");\n    test_resets<int,tbb::flow::priority_queue_node<int> >();\n    test_resets<float,tbb::flow::priority_queue_node<float> >();\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n//! Test follows and precedes API\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test follows and precedes API\"){\n    test_follows_and_precedes_api();\n}\n#endif\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Test decution guides\n//! \\brief \\ref requirement\nTEST_CASE(\"Test deduction guides\"){\n    test_deduction_guides();\n}\n#endif\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test priority_queue_node try_put_and_wait\") {\n    test_pqueue_node_try_put_and_wait();\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_profiling.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#define DOCTEST_CONFIG_SUPER_FAST_ASSERTS\n#include \"common/test.h\"\n\n#include \"tbb/spin_mutex.h\"\n#include \"tbb/spin_rw_mutex.h\"\n#include \"tbb/queuing_mutex.h\"\n#include \"tbb/queuing_rw_mutex.h\"\n\n//! \\file test_profiling.cpp\n//! \\brief Test for [internal] functionality\n\n//! Test for mutexes set_name\n//! \\brief \\ref interface\nTEST_CASE_TEMPLATE(\"Mutexes set_name\", Mutex, tbb::spin_mutex,\n                                              tbb::spin_rw_mutex,\n                                              tbb::speculative_spin_mutex,\n                                              tbb::speculative_spin_rw_mutex,\n                                              tbb::queuing_mutex,\n                                              tbb::queuing_rw_mutex) {\n    Mutex mutex;\n    tbb::profiling::set_name(mutex, \"mutex\");\n}\n\n\n#if (_WIN32||_WIN64)\n//! Test for mutexes set_name with wchar\n//! \\brief \\ref interface\nTEST_CASE_TEMPLATE(\"Mutexes set_name wchar\", Mutex, tbb::spin_mutex,\n                                              tbb::spin_rw_mutex,\n                                              tbb::speculative_spin_mutex,\n                                              tbb::speculative_spin_rw_mutex,\n                                              tbb::queuing_mutex,\n                                              tbb::queuing_rw_mutex) {\n    Mutex mutex;\n    tbb::profiling::set_name(mutex, L\"mutex\");\n}\n#endif //WIN\n\n#include \"tbb/flow_graph.h\"\n\nstruct Body {\n    template<typename... Args>\n    int operator()(Args...) { return 0; }\n};\n\n//! Test for flow graph set_name\n//! \\brief \\ref interface\nTEST_CASE(\"Flow Graph set_name\") {\n    tbb::flow::graph g;\n    tbb::profiling::set_name(g, \"graph\");\n}\n\nstruct async_body\n{\n    template<typename T>\n    void operator()(int, T&) {};\n};\n\n//! Test for async_node set_name\n//! \\brief \\ref interface\nTEST_CASE(\"async_node set_name\") {\n    tbb::flow::graph g;\n    tbb::flow::async_node<int, int> node(g, 1, async_body{});\n    tbb::profiling::set_name(node, \"async_node\");\n}\n\n//! Test for broadcast_node set_name\n//! \\brief \\ref interface\nTEST_CASE(\"broadcast_node set_name\") {\n    tbb::flow::graph g;\n    tbb::flow::broadcast_node<int> node(g);\n    tbb::profiling::set_name(node, \"broadcast_node\");\n}\n\n//! Test for buffer_node set_name\n//! \\brief \\ref interface\nTEST_CASE(\"buffer_node set_name\") {\n    tbb::flow::graph g;\n    tbb::flow::buffer_node<int> node(g);\n    tbb::profiling::set_name(node, \"buffer_node\");\n}\n\n//! Test for composite_node set_name\n//! \\brief \\ref interface\nTEST_CASE(\"composite_node set_name\") {\n    tbb::flow::graph g;\n    tbb::flow::composite_node<std::tuple<int>, std::tuple<int>> node(g);\n    tbb::profiling::set_name(node, \"composite_node\");\n}\n\n//! Test for continue_node set_name\n//! \\brief \\ref interface\nTEST_CASE(\"continue_node set_name\") {\n    tbb::flow::graph g;\n    tbb::flow::continue_node<tbb::flow::continue_msg> node(g,\n        [](const tbb::flow::continue_msg& val) -> const tbb::flow::continue_msg&\n        {\n            return val;\n        });\n    tbb::profiling::set_name(node, \"continue_node\");\n}\n\n//! Test for function_node set_name\n//! \\brief \\ref interface\nTEST_CASE(\"function_node set_name\") {\n    tbb::flow::graph g;\n    tbb::flow::function_node<int, int> node(g, 1, [](const int& val) -> int {return val; });\n    tbb::profiling::set_name(node, \"function_node\");\n}\n\n//! Test for indexer_node set_name\n//! \\brief \\ref interface\nTEST_CASE(\"indexer_node set_name\") {\n    tbb::flow::graph g;\n    tbb::flow::indexer_node<int> node1(g);\n    tbb::profiling::set_name(node1, \"indexer_node\");\n    tbb::flow::indexer_node<int, int> node2(g);\n    tbb::profiling::set_name(node2, \"indexer_node\");\n    tbb::flow::indexer_node<int, int, int> node3(g);\n    tbb::profiling::set_name(node3, \"indexer_node\");\n    tbb::flow::indexer_node<int, int, int, int> node4(g);\n    tbb::profiling::set_name(node4, \"indexer_node\");\n    tbb::flow::indexer_node<int, int, int, int, int> node5(g);\n    tbb::profiling::set_name(node5, \"indexer_node\");\n    tbb::flow::indexer_node<int, int, int, int, int, int> node6(g);\n    tbb::profiling::set_name(node6, \"indexer_node\");\n    tbb::flow::indexer_node<int, int, int, int, int, int, int> node7(g);\n    tbb::profiling::set_name(node7, \"indexer_node\");\n    tbb::flow::indexer_node<int, int, int, int, int, int, int, int> node8(g);\n    tbb::profiling::set_name(node8, \"indexer_node\");\n    tbb::flow::indexer_node<int, int, int, int, int, int, int, int, int> node9(g);\n    tbb::profiling::set_name(node9, \"indexer_node\");\n    tbb::flow::indexer_node<int, int, int, int, int, int, int, int, int, int> node10(g);\n    tbb::profiling::set_name(node10, \"indexer_node\");\n}\n\n//! Test for input_node set_name\n//! \\brief \\ref interface\nTEST_CASE(\"input_node set_name\") {\n    tbb::flow::graph g;\n    tbb::flow::input_node<int> node(g, [](tbb::flow_control& ) -> int { return 0;});\n    tbb::profiling::set_name(node, \"input_node\");\n}\n\n//! Test for join_node set_name\n//! \\brief \\ref interface\nTEST_CASE(\"join_node set_name\") {\n    tbb::flow::graph g;\n    tbb::flow::join_node<std::tuple<int>> node(g);\n    tbb::profiling::set_name(node, \"join_node\");\n}\n\n//! Test for limiter_node set_name\n//! \\brief \\ref interface\nTEST_CASE(\"limiter_node set_name\") {\n    tbb::flow::graph g;\n    tbb::flow::limiter_node<int> node(g, 1);\n    tbb::profiling::set_name(node, \"limiter_node\");\n}\n\nstruct mf_body\n{\n    template<typename T>\n    void operator()(int, T&) {};\n};\n\n//! Test for multifunction_node set_name\n//! \\brief \\ref interface\nTEST_CASE(\"multifunction_node set_name\") {\n    tbb::flow::graph g;\n    tbb::flow::multifunction_node<int, std::tuple<int>> node(g, 1, mf_body{});\n    tbb::profiling::set_name(node, \"multifunction_node\");\n}\n\n//! Test for overwrite_node set_name\n//! \\brief \\ref interface\nTEST_CASE(\"overwrite_node set_name\") {\n    tbb::flow::graph g;\n    tbb::flow::overwrite_node<int> node(g);\n    tbb::profiling::set_name(node, \"overwrite_node\");\n}\n\n//! Test for priority_queue_node set_name\n//! \\brief \\ref interface\nTEST_CASE(\"priority_queue_node set_name\") {\n    tbb::flow::graph g;\n    tbb::flow::priority_queue_node<int> node(g);\n    tbb::profiling::set_name(node, \"priority_queue_node\");\n}\n\n//! Test for queue_node set_name\n//! \\brief \\ref interface\nTEST_CASE(\"queue_node set_name\") {\n    tbb::flow::graph g;\n    tbb::flow::queue_node<int> node(g);\n    tbb::profiling::set_name(node, \"queue_node\");\n}\n\nstruct seq_inspector {\n    std::size_t operator()(const int& v) const { return v; }\n};\n\n//! Test for sequencer_node set_name\n//! \\brief \\ref interface\nTEST_CASE(\"sequencer_node set_name\") {\n    tbb::flow::graph g;\n    tbb::flow::sequencer_node<int> node(g, seq_inspector{});\n    tbb::profiling::set_name(node, \"sequencer_node\");\n}\n\n//! Test for split_node set_name\n//! \\brief \\ref interface\nTEST_CASE(\"split_node set_name\") {\n    tbb::flow::graph g;\n    tbb::flow::split_node<std::tuple<int>> node(g);\n    tbb::profiling::set_name(node, \"split_node\");\n}\n\n//! Test for write_once_node set_name\n//! \\brief \\ref interface\nTEST_CASE(\"write_once_node set_name\") {\n    tbb::flow::graph g;\n    tbb::flow::write_once_node<int> node(g);\n    tbb::profiling::set_name(node, \"write_once_node\");\n}\n\n#include \"tbb/profiling.h\"\n\n//! Test for event\n//! \\brief \\ref interface\nTEST_CASE(\"event class\") {\n    tbb::profiling::event e(\"event\");\n    e.emit();\n    tbb::profiling::event::emit(\"emit\");\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_queue_node.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n// TODO: Add overlapping put / receive tests\n\n#include \"common/config.h\"\n\n#include \"tbb/flow_graph.h\"\n#include \"tbb/global_control.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_assert.h\"\n#include \"common/checktype.h\"\n#include \"common/graph_utils.h\"\n#include \"common/test_follows_and_precedes_api.h\"\n\n#include <cstdio>\n\n#include \"test_buffering_try_put_and_wait.h\"\n\n//! \\file test_queue_node.cpp\n//! \\brief Test for [flow_graph.queue_node] specification\n\n\n#define N 1000\n#define C 10\n\ntemplate< typename T >\nvoid spin_try_get( tbb::flow::queue_node<T> &q, T &value ) {\n    int count = 0;\n    while ( q.try_get(value) != true ) {\n        if (count < 1000000) {\n            ++count;\n        }\n        if (count == 1000000) {\n            // Perhaps, we observe the missed wakeup. Enqueue a task to wake up threads.\n            tbb::task_arena a(tbb::task_arena::attach{});\n            a.enqueue([]{});\n            ++count;\n        }\n    }\n}\n\ntemplate< typename T >\nvoid check_item( T* next_value, T &value ) {\n    int tid = value / N;\n    int offset = value % N;\n    CHECK_MESSAGE( next_value[tid] == T(offset), \"\" );\n    ++next_value[tid];\n}\n\ntemplate< typename T >\nstruct parallel_puts : utils::NoAssign {\n\n    tbb::flow::queue_node<T> &my_q;\n\n    parallel_puts( tbb::flow::queue_node<T> &q ) : my_q(q) {}\n\n    void operator()(int i) const {\n        for (int j = 0; j < N; ++j) {\n            bool msg = my_q.try_put( T(N*i + j) );\n            CHECK_MESSAGE( msg == true, \"\" );\n        }\n    }\n\n};\n\ntemplate< typename T >\nstruct touches {\n\n    bool **my_touches;\n    T **my_last_touch;\n    int my_num_threads;\n\n    touches( int num_threads ) : my_num_threads(num_threads) {\n        my_last_touch = new T* [my_num_threads];\n        my_touches = new bool* [my_num_threads];\n        for ( int p = 0; p < my_num_threads; ++p) {\n            my_last_touch[p] = new T[my_num_threads];\n            for ( int p2 = 0; p2 < my_num_threads; ++p2)\n                my_last_touch[p][p2] = -1;\n\n            my_touches[p] = new bool[N*my_num_threads];\n            for ( int n = 0; n < N*my_num_threads; ++n)\n                my_touches[p][n] = false;\n        }\n    }\n\n    ~touches() {\n        for ( int p = 0; p < my_num_threads; ++p) {\n            delete [] my_touches[p];\n            delete [] my_last_touch[p];\n        }\n        delete [] my_touches;\n        delete [] my_last_touch;\n    }\n\n    bool check( int tid, T v ) {\n        int v_tid = v / N;\n        if ( my_touches[tid][v] != false ) {\n            printf(\"Error: value seen twice by local thread\\n\");\n            return false;\n        }\n        if ( v <= my_last_touch[tid][v_tid] ) {\n            printf(\"Error: value seen in wrong order by local thread\\n\");\n            return false;\n        }\n        my_last_touch[tid][v_tid] = v;\n        my_touches[tid][v] = true;\n        return true;\n    }\n\n    bool validate_touches() {\n        bool *all_touches = new bool[N*my_num_threads];\n        for ( int n = 0; n < N*my_num_threads; ++n)\n            all_touches[n] = false;\n\n        for ( int p = 0; p < my_num_threads; ++p) {\n            for ( int n = 0; n < N*my_num_threads; ++n) {\n                if ( my_touches[p][n] == true ) {\n                    CHECK_MESSAGE( ( all_touches[n] == false), \"value see by more than one thread\\n\" );\n                    all_touches[n] = true;\n                }\n            }\n        }\n        for ( int n = 0; n < N*my_num_threads; ++n) {\n            if ( !all_touches[n] )\n                printf(\"No touch at %d, my_num_threads = %d\\n\", n, my_num_threads);\n            //CHECK_MESSAGE( ( all_touches[n] == true), \"value not seen by any thread\\n\" );\n        }\n        delete [] all_touches;\n        return true;\n    }\n\n};\n\ntemplate< typename T >\nstruct parallel_gets : utils::NoAssign {\n\n    tbb::flow::queue_node<T> &my_q;\n    touches<T> &my_touches;\n\n    parallel_gets( tbb::flow::queue_node<T> &q, touches<T> &t) : my_q(q), my_touches(t) {}\n\n    void operator()(int tid) const {\n        for (int j = 0; j < N; ++j) {\n            T v;\n            spin_try_get( my_q, v );\n            my_touches.check( tid, v );\n        }\n    }\n\n};\n\ntemplate< typename T >\nstruct parallel_put_get : utils::NoAssign {\n\n    tbb::flow::queue_node<T> &my_q;\n    touches<T> &my_touches;\n\n    parallel_put_get( tbb::flow::queue_node<T> &q, touches<T> &t ) : my_q(q), my_touches(t) {}\n\n    void operator()(int tid) const {\n\n        for ( int i = 0; i < N; i+=C ) {\n            int j_end = ( N < i + C ) ? N : i + C;\n            // dump about C values into the Q\n            for ( int j = i; j < j_end; ++j ) {\n                CHECK_MESSAGE( my_q.try_put( T (N*tid + j ) ) == true, \"\" );\n            }\n            // receiver about C values from the Q\n            for ( int j = i; j < j_end; ++j ) {\n                T v;\n                spin_try_get( my_q, v );\n                my_touches.check( tid, v );\n            }\n        }\n    }\n\n};\n\n//\n// Tests\n//\n// Item can be reserved, released, consumed ( single serial receiver )\n//\ntemplate< typename T >\nint test_reservation() {\n    tbb::flow::graph g;\n    T bogus_value(-1);\n\n    // Simple tests\n    tbb::flow::queue_node<T> q(g);\n\n    q.try_put(T(1));\n    q.try_put(T(2));\n    q.try_put(T(3));\n\n    T v;\n    CHECK_MESSAGE( q.reserve_item(v) == true, \"\" );\n    CHECK_MESSAGE( v == T(1), \"\" );\n    CHECK_MESSAGE( q.release_reservation() == true, \"\" );\n    v = bogus_value;\n    g.wait_for_all();\n    CHECK_MESSAGE( q.reserve_item(v) == true, \"\" );\n    CHECK_MESSAGE( v == T(1), \"\" );\n    CHECK_MESSAGE( q.consume_reservation() == true, \"\" );\n    v = bogus_value;\n    g.wait_for_all();\n\n    CHECK_MESSAGE( q.try_get(v) == true, \"\" );\n    CHECK_MESSAGE( v == T(2), \"\" );\n    v = bogus_value;\n    g.wait_for_all();\n\n    CHECK_MESSAGE( q.reserve_item(v) == true, \"\" );\n    CHECK_MESSAGE( v == T(3), \"\" );\n    CHECK_MESSAGE( q.release_reservation() == true, \"\" );\n    v = bogus_value;\n    g.wait_for_all();\n    CHECK_MESSAGE( q.reserve_item(v) == true, \"\" );\n    CHECK_MESSAGE( v == T(3), \"\" );\n    CHECK_MESSAGE( q.consume_reservation() == true, \"\" );\n    v = bogus_value;\n    g.wait_for_all();\n\n    return 0;\n}\n\n//\n// Tests\n//\n// multiple parallel senders, items in FIFO (relatively to sender) order\n// multiple parallel senders, multiple parallel receivers, items in FIFO order (relative to sender/receiver) and all items received\n//   * overlapped puts / gets\n//   * all puts finished before any getS\n//\ntemplate< typename T >\nint test_parallel(int num_threads) {\n    tbb::flow::graph g;\n    tbb::flow::queue_node<T> q(g);\n    tbb::flow::queue_node<T> q2(g);\n    tbb::flow::queue_node<T> q3(g);\n    {\n        Checker< T > my_check;\n        T bogus_value(-1);\n        T j = bogus_value;\n        utils::NativeParallelFor( num_threads, parallel_puts<T>(q) );\n\n        T *next_value = new T[num_threads];\n        for (int tid = 0; tid < num_threads; ++tid) next_value[tid] = T(0);\n\n        for (int i = 0; i < num_threads * N; ++i ) {\n            spin_try_get( q, j );\n            check_item( next_value, j );\n            j = bogus_value;\n        }\n        for (int tid = 0; tid < num_threads; ++tid)  {\n            CHECK_MESSAGE( next_value[tid] == T(N), \"\" );\n        }\n        delete[] next_value;\n\n        j = bogus_value;\n        g.wait_for_all();\n        CHECK_MESSAGE( q.try_get( j ) == false, \"\" );\n        CHECK_MESSAGE( j == bogus_value, \"\" );\n\n        utils::NativeParallelFor( num_threads, parallel_puts<T>(q) );\n\n        {\n            touches< T > t( num_threads );\n            utils::NativeParallelFor( num_threads, parallel_gets<T>(q, t) );\n            g.wait_for_all();\n            CHECK_MESSAGE( t.validate_touches(), \"\" );\n        }\n        j = bogus_value;\n        CHECK_MESSAGE( q.try_get( j ) == false, \"\" );\n        CHECK_MESSAGE( j == bogus_value, \"\" );\n\n        g.wait_for_all();\n        {\n            touches< T > t2( num_threads );\n            utils::NativeParallelFor( num_threads, parallel_put_get<T>(q, t2) );\n            g.wait_for_all();\n            CHECK_MESSAGE( t2.validate_touches(), \"\" );\n        }\n        j = bogus_value;\n        CHECK_MESSAGE( q.try_get( j ) == false, \"\" );\n        CHECK_MESSAGE( j == bogus_value, \"\" );\n\n        tbb::flow::make_edge( q, q2 );\n        tbb::flow::make_edge( q2, q3 );\n\n        utils::NativeParallelFor( num_threads, parallel_puts<T>(q) );\n        {\n            touches< T > t3( num_threads );\n            utils::NativeParallelFor( num_threads, parallel_gets<T>(q3, t3) );\n            g.wait_for_all();\n            CHECK_MESSAGE( t3.validate_touches(), \"\" );\n        }\n        j = bogus_value;\n        g.wait_for_all();\n        CHECK_MESSAGE( q.try_get( j ) == false, \"\" );\n        g.wait_for_all();\n        CHECK_MESSAGE( q2.try_get( j ) == false, \"\" );\n        g.wait_for_all();\n        CHECK_MESSAGE( q3.try_get( j ) == false, \"\" );\n        CHECK_MESSAGE( j == bogus_value, \"\" );\n\n        // test copy constructor\n        CHECK_MESSAGE( remove_successor( q, q2 ), \"\" );\n        utils::NativeParallelFor( num_threads, parallel_puts<T>(q) );\n        tbb::flow::queue_node<T> q_copy(q);\n        j = bogus_value;\n        g.wait_for_all();\n        CHECK_MESSAGE( q_copy.try_get( j ) == false, \"\" );\n        CHECK_MESSAGE( register_successor( q, q_copy ) == true, \"\" );\n        {\n            touches< T > t( num_threads );\n            utils::NativeParallelFor( num_threads, parallel_gets<T>(q_copy, t) );\n            g.wait_for_all();\n            CHECK_MESSAGE( t.validate_touches(), \"\" );\n        }\n        j = bogus_value;\n        CHECK_MESSAGE( q.try_get( j ) == false, \"\" );\n        CHECK_MESSAGE( j == bogus_value, \"\" );\n        CHECK_MESSAGE( q_copy.try_get( j ) == false, \"\" );\n        CHECK_MESSAGE( j == bogus_value, \"\" );\n    }\n\n    return 0;\n}\n\n//\n// Tests\n//\n// Predecessors cannot be registered\n// Empty Q rejects item requests\n// Single serial sender, items in FIFO order\n// Chained Qs ( 2 & 3 ), single sender, items at last Q in FIFO order\n//\n\ntemplate< typename T >\nint test_serial() {\n    tbb::flow::graph g;\n    tbb::flow::queue_node<T> q(g);\n    tbb::flow::queue_node<T> q2(g);\n    {   // destroy the graph after manipulating it, and see if all the items in the buffers\n        // have been destroyed before the graph\n        Checker<T> my_check;  // if CheckType< U > count constructions and destructions\n        T bogus_value(-1);\n        T j = bogus_value;\n\n        //\n        // Rejects attempts to add / remove predecessor\n        // Rejects request from empty Q\n        //\n        CHECK_MESSAGE( register_predecessor( q, q2 ) == false, \"\" );\n        CHECK_MESSAGE( remove_predecessor( q, q2 ) == false, \"\" );\n        CHECK_MESSAGE( q.try_get( j ) == false, \"\" );\n        CHECK_MESSAGE( j == bogus_value, \"\" );\n\n        //\n        // Simple puts and gets\n        //\n\n        for (int i = 0; i < N; ++i) {\n            bool msg = q.try_put( T(i) );\n            CHECK_MESSAGE( msg == true, \"\" );\n        }\n\n\n        for (int i = 0; i < N; ++i) {\n            j = bogus_value;\n            spin_try_get( q, j );\n            CHECK_MESSAGE( i == j, \"\" );\n        }\n        j = bogus_value;\n        g.wait_for_all();\n        CHECK_MESSAGE( q.try_get( j ) == false, \"\" );\n        CHECK_MESSAGE( j == bogus_value, \"\" );\n\n        tbb::flow::make_edge( q, q2 );\n\n        for (int i = 0; i < N; ++i) {\n            bool msg = q.try_put( T(i) );\n            CHECK_MESSAGE( msg == true, \"\" );\n        }\n\n\n        for (int i = 0; i < N; ++i) {\n            j = bogus_value;\n            spin_try_get( q2, j );\n            CHECK_MESSAGE( i == j, \"\" );\n        }\n        j = bogus_value;\n        g.wait_for_all();\n        CHECK_MESSAGE( q.try_get( j ) == false, \"\" );\n        g.wait_for_all();\n        CHECK_MESSAGE( q2.try_get( j ) == false, \"\" );\n        CHECK_MESSAGE( j == bogus_value, \"\" );\n\n        tbb::flow::remove_edge( q, q2 );\n        CHECK_MESSAGE( q.try_put( 1 ) == true, \"\" );\n        g.wait_for_all();\n        CHECK_MESSAGE( q2.try_get( j ) == false, \"\" );\n        CHECK_MESSAGE( j == bogus_value, \"\" );\n        g.wait_for_all();\n        CHECK_MESSAGE( q.try_get( j ) == true, \"\" );\n        CHECK_MESSAGE( j == 1, \"\" );\n\n        tbb::flow::queue_node<T> q3(g);\n        tbb::flow::make_edge( q, q2 );\n        tbb::flow::make_edge( q2, q3 );\n\n        for (int i = 0; i < N; ++i) {\n            bool msg = q.try_put( T(i) );\n            CHECK_MESSAGE( msg == true, \"\" );\n        }\n\n        for (int i = 0; i < N; ++i) {\n            j = bogus_value;\n            spin_try_get( q3, j );\n            CHECK_MESSAGE( i == j, \"\" );\n        }\n        j = bogus_value;\n        g.wait_for_all();\n        CHECK_MESSAGE( q.try_get( j ) == false, \"\" );\n        g.wait_for_all();\n        CHECK_MESSAGE( q2.try_get( j ) == false, \"\" );\n        g.wait_for_all();\n        CHECK_MESSAGE( q3.try_get( j ) == false, \"\" );\n        CHECK_MESSAGE( j == bogus_value, \"\" );\n\n        tbb::flow::remove_edge( q,  q2 );\n        CHECK_MESSAGE( q.try_put( 1 ) == true, \"\" );\n        g.wait_for_all();\n        CHECK_MESSAGE( q2.try_get( j ) == false, \"\" );\n        CHECK_MESSAGE( j == bogus_value, \"\" );\n        g.wait_for_all();\n        CHECK_MESSAGE( q3.try_get( j ) == false, \"\" );\n        CHECK_MESSAGE( j == bogus_value, \"\" );\n        g.wait_for_all();\n        CHECK_MESSAGE( q.try_get( j ) == true, \"\" );\n        CHECK_MESSAGE( j == 1, \"\" );\n    }\n\n    return 0;\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n#include <array>\n#include <vector>\nvoid test_follows_and_precedes_api() {\n    std::array<int, 3> messages_for_follows = { {0, 1, 2} };\n    std::vector<int> messages_for_precedes = {0, 1, 2};\n\n    follows_and_precedes_testing::test_follows <int, tbb::flow::queue_node<int>>(messages_for_follows);\n    follows_and_precedes_testing::test_precedes <int, tbb::flow::queue_node<int>>(messages_for_precedes);\n}\n#endif\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\nvoid test_deduction_guides() {\n    using namespace tbb::flow;\n    graph g;\n    broadcast_node<int> br(g);\n    queue_node<int> q0(g);\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    queue_node q1(follows(br));\n    static_assert(std::is_same_v<decltype(q1), queue_node<int>>);\n\n    queue_node q2(precedes(br));\n    static_assert(std::is_same_v<decltype(q2), queue_node<int>>);\n#endif\n\n    queue_node q3(q0);\n    static_assert(std::is_same_v<decltype(q3), queue_node<int>>);\n    g.wait_for_all();\n}\n#endif\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\nvoid test_queue_node_try_put_and_wait() {\n    using namespace test_try_put_and_wait;\n\n    std::vector<int> start_work_items;\n    std::vector<int> new_work_items;\n    int wait_message = 10;\n\n    for (int i = 0; i < wait_message; ++i) {\n        start_work_items.emplace_back(i);\n        new_work_items.emplace_back(i + 1 + wait_message);\n    }\n\n    // Test push\n    // test_buffer_push tests the graph\n    // buffer1 -> function -> buffer2 -> writer\n    //     function is a queueing serial function_node that submits new_work_items once wait_message arrives\n    //     writer is an unlimited function_node that writes an item into the processed_items vector\n    // Test steps\n    //     1. push start_work_items into the buffer1\n    //     2. buffer1.try_put_and_wait(wait_message);\n    //     3. g.wait_for_all()\n    // test_buffer_push returns the index from which the items processed during wait_for_all() starts\n    {\n        std::vector<int> processed_items;\n\n        std::size_t after_start = test_buffer_push<tbb::flow::queue_node<int>>(start_work_items, wait_message,\n                                                                               new_work_items, processed_items);\n\n        // Expected effect:\n        // During buffer1.try_put_and_wait()\n        //     1. start_work_items would be pushed to buffer1\n        //     2. wait_message would be pushed to buffer1\n        //     3. forward_task on buffer1 would transfer all of the items to the function_node in FIFO order\n        //     4. the first item would occupy concurrency of function, other items would be pushed to the queue\n        //     5. function would process start_work_items and push them to the buffer2\n        //     6. wait_message would be processed last and add new_work_items to buffer1\n        //     7. forward_task on buffer2 would transfer start_work_items in FIFO order and the wait_message to the writer\n        //     8.  try_put_and_wait exits since wait_message is completed\n        // During g.wait_for_all()\n        //     10. forward_task for new_work_items in buffer1 would be spawned and put items in function in FIFO order\n        //     11. function_node would process and push forward items from the queue in FIFO order\n        // Expected items processing - { start_work_items FIFO, wait_message, new_work_items FIFO }\n\n        std::size_t check_index = 0;\n        CHECK_MESSAGE(after_start == start_work_items.size() + 1,\n                      \"try_put_and_wait should process start_work_items and the wait_message\");\n        for (auto item : start_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item,\n                          \"try_put_and_wait should process start_work_items FIFO\");\n        }\n\n        CHECK_MESSAGE(processed_items[check_index++] == wait_message,\n                      \"try_put_and_wait should process wait_message after start_work_items\");\n\n        for (auto item : new_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item,\n                          \"wait_for_all should process new_work_items FIFO\");\n        }\n        CHECK(check_index == processed_items.size());\n    } // Test push\n\n    // Test pull\n    // test_buffer_pull tests the graph\n    // buffer -> function\n    //     function is a rejecting serial function_node that submits new_work_items once wait_message arrives\n    //     and writes the processed item into the processed_items\n    // Test steps\n    //     1. push the occupier message to the function\n    //     2. push start_work_items into the buffer\n    //     3. buffer.try_put_and_wait(wait_message)\n    //     4. g.wait_for_all()\n    // test_buffer_pull returns the index from which the items processed during wait_for_all() starts\n\n    {\n        std::vector<int> processed_items;\n        int occupier = 42;\n\n        std::size_t after_start = test_buffer_pull<tbb::flow::queue_node<int>>(start_work_items, wait_message, occupier,\n                                                                               new_work_items, processed_items);\n\n        // Expected effect\n        // 0. task for occupier processing would be spawned by the function\n        // During buffer.try_put_and_wait()\n        //     1. start_work_items would be pushed to the buffer\n        //     2. wait_message would be pushed to the buffer\n        //     3. forward_task would try to push items to the function, but would fail\n        //        and set the edge to the pull state\n        //     4. occupier would be processed\n        //     5. items would be taken from the buffer by function in FIFO order\n        //     6. wait_message would be taken last and push new_work_items to the buffer\n        // During wait_for_all()\n        //     7. new_work_items would be taken from the buffer in FIFO order\n        // Expected items processing { occupier, start_work_items FIFO, wait_message, new_work_items FIFO }\n\n        std::size_t check_index = 0;\n\n        CHECK_MESSAGE(after_start == start_work_items.size() + 2,\n                      \"start_work_items, occupier and wait_message should be processed by try_put_and_wait\");\n        CHECK_MESSAGE(processed_items[check_index++] == occupier, \"Unexpected items processing by try_put_and_wait\");\n        for (auto item : start_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item,\n                          \"try_put_and_wait should process start_work_items FIFO\");\n        }\n        CHECK_MESSAGE(processed_items[check_index++] == wait_message, \"Unexpected items processing by try_put_and_wait\");\n\n        for (auto item : new_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item,\n                          \"try_put_and_wait should process new_work_items FIFO\");\n        }\n        CHECK(check_index == processed_items.size());\n    }\n\n    // Test reserve\n    {\n        int thresholds[] = { 1, 2 };\n\n        for (int threshold : thresholds) {\n            std::vector<int> processed_items;\n\n            // test_buffer_reserve tests the following graph\n            // buffer -> limiter -> function\n            //  function is a rejecting serial function_node that puts an item to the decrementer port\n            //  of the limiter inside of the body\n\n            std::size_t after_start = test_buffer_reserve<tbb::flow::queue_node<int>>(threshold,\n                start_work_items, wait_message, new_work_items, processed_items);\n\n            // Expected effect:\n            // 1. start_work_items would be pushed to the buffer\n            // 2. wait_message_would be pushed to the buffer\n            // 3. forward task of the buffer would push the first message to the limiter node.\n            //    Since the limiter threshold is not reached, it would be directly passed to the function\n            // 4. function would spawn the task for the first message processing\n            // 5. the first would be processed\n            // 6. decrementer.try_put() would be called and the limiter node would\n            //    process all of the items from the buffer using the try_reserve/try_consume/try_release semantics\n            // 7. When the wait_message would be taken from the queue, the try_put_and_wait would exit\n\n            std::size_t check_index = 0;\n\n            CHECK_MESSAGE(after_start == start_work_items.size() + 1,\n                          \"try_put_and_wait should start_work_items and wait_message\");\n            for (auto item : start_work_items) {\n                CHECK_MESSAGE(processed_items[check_index++] == item, \"Unexpected start_work_items processing\");\n            }\n            CHECK_MESSAGE(processed_items[check_index++] == wait_message, \"Unexpected wait_message processing\");\n\n            for (auto item : new_work_items) {\n                CHECK_MESSAGE(processed_items[check_index++] == item, \"Unexpected start_work_items processing\");\n            }\n        }\n    }\n}\n#endif // __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n\n//! Test serial, parallel behavior and reservation under parallelism\n//! \\brief \\ref requirement \\ref error_guessing\nTEST_CASE(\"Parallel, serial test\"){\n    for (int p = 2; p <= 4; ++p) {\n        tbb::global_control thread_limit(tbb::global_control::max_allowed_parallelism, p);\n        tbb::task_arena arena(p);\n        arena.execute(\n            [&]() {\n                test_serial<int>();\n                test_serial<CheckType<int> >();\n                test_parallel<int>(p);\n                test_parallel<CheckType<int> >(p);\n            }\n        );\n\t}\n}\n\n//! Test reset and cancellation\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Resets test\"){\n    INFO(\"Testing resets\\n\");\n    test_resets<int, tbb::flow::queue_node<int> >();\n    test_resets<float, tbb::flow::queue_node<float> >();\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n//! Test follows and precedes API\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test follows and precedes API\"){\n    test_follows_and_precedes_api();\n}\n#endif\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Test decution guides\n//! \\brief \\ref requirement\nTEST_CASE(\"Deduction guides\"){\n    test_deduction_guides();\n}\n#endif\n\n//! Test operations on a reserved queue_node\n//! \\brief \\ref error_guessing\nTEST_CASE(\"queue_node with reservation\"){\n    tbb::flow::graph g;\n\n    tbb::flow::queue_node<int> q(g);\n\n    bool res = q.try_put(42);\n    CHECK_MESSAGE( res, \"queue_node must accept input.\" );\n\n    int val = 1;\n    res = q.try_reserve(val);\n    CHECK_MESSAGE( res, \"queue_node must reserve as it has an item.\" );\n    CHECK_MESSAGE( (val == 42), \"queue_node must reserve once passed item.\" );\n\n    int out_arg = -1;\n    CHECK_MESSAGE((q.try_reserve(out_arg) == false), \"Reserving a reserved node should fail.\");\n    CHECK_MESSAGE((out_arg == -1), \"Reserving a reserved node should not update its argument.\");\n\n    out_arg = -1;\n    CHECK_MESSAGE((q.try_get(out_arg) == false), \"Getting from reserved node should fail.\");\n    CHECK_MESSAGE((out_arg == -1), \"Getting from reserved node should not update its argument.\");\n    g.wait_for_all();\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test queue_node try_put_and_wait\") {\n    test_queue_node_try_put_and_wait();\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_resumable_tasks.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_resumable_tasks.cpp\n//! \\brief Test for [scheduler.resumable_tasks] specification\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n\n#include \"tbb/task.h\"\n\n#if __TBB_RESUMABLE_TASKS\n\n#include \"tbb/global_control.h\"\n#include \"tbb/task_arena.h\"\n#include \"tbb/parallel_for.h\"\n#include \"tbb/task_scheduler_observer.h\"\n#include \"tbb/task_group.h\"\n\n#include <algorithm>\n#include <thread>\n#include <queue>\n#include <condition_variable>\n\nconst int N = 10;\n\n// External activity used in all tests, which resumes suspended execution point\nclass AsyncActivity {\npublic:\n    AsyncActivity(int num_) : m_numAsyncThreads(num_) {\n        for (int i = 0; i < m_numAsyncThreads ; ++i) {\n            m_asyncThreads.push_back( new std::thread(AsyncActivity::asyncLoop, this) );\n        }\n    }\n    ~AsyncActivity() {\n        {\n            std::lock_guard<std::mutex> lock(m_mutex);\n            for (int i = 0; i < m_numAsyncThreads; ++i) {\n                m_tagQueue.push(nullptr);\n            }\n            m_condvar.notify_all();\n        }\n        for (int i = 0; i < m_numAsyncThreads; ++i) {\n            m_asyncThreads[i]->join();\n            delete m_asyncThreads[i];\n        }\n        CHECK(m_tagQueue.empty());\n    }\n    void submit(tbb::task::suspend_point ctx) {\n        std::lock_guard<std::mutex> lock(m_mutex);\n        m_tagQueue.push(ctx);\n        m_condvar.notify_one();\n    }\n\nprivate:\n    static void asyncLoop(AsyncActivity* async) {\n        tbb::task::suspend_point tag;\n        for (;;) {\n            {\n                std::unique_lock<std::mutex> lock(async->m_mutex);\n                async->m_condvar.wait(lock, [async] {return !async->m_tagQueue.empty(); });\n                tag = async->m_tagQueue.front();\n                async->m_tagQueue.pop();\n            }\n            if (!tag) {\n                break;\n            }\n            tbb::task::resume(tag);\n        };\n    }\n\n    const int m_numAsyncThreads;\n    std::mutex m_mutex;\n    std::condition_variable m_condvar;\n    std::queue<tbb::task::suspend_point> m_tagQueue;\n    std::vector<std::thread*> m_asyncThreads;\n};\n\nstruct SuspendBody {\n    SuspendBody(AsyncActivity& a_, std::thread::id id) :\n        m_asyncActivity(a_), thread_id(id) {}\n    void operator()(tbb::task::suspend_point tag) {\n        CHECK(thread_id == std::this_thread::get_id());\n        m_asyncActivity.submit(tag);\n    }\n\nprivate:\n    AsyncActivity& m_asyncActivity;\n    std::thread::id thread_id;\n};\n\nclass InnermostArenaBody {\npublic:\n    InnermostArenaBody(AsyncActivity& a_) : m_asyncActivity(a_) {}\n\n    void operator()() {\n        InnermostOuterParFor inner_outer_body(m_asyncActivity);\n        tbb::parallel_for(0, N, inner_outer_body );\n    }\n\nprivate:\n    struct InnermostInnerParFor {\n        InnermostInnerParFor(AsyncActivity& a_) : m_asyncActivity(a_) {}\n        void operator()(int) const {\n            tbb::task::suspend(SuspendBody(m_asyncActivity, std::this_thread::get_id()));\n        }\n        AsyncActivity& m_asyncActivity;\n    };\n    struct InnermostOuterParFor {\n        InnermostOuterParFor(AsyncActivity& a_) : m_asyncActivity(a_) {}\n        void operator()(int) const {\n            tbb::task::suspend(SuspendBody(m_asyncActivity, std::this_thread::get_id()));\n            InnermostInnerParFor inner_inner_body(m_asyncActivity);\n            tbb::parallel_for(0, N, inner_inner_body);\n        }\n        AsyncActivity& m_asyncActivity;\n    };\n    AsyncActivity& m_asyncActivity;\n};\n\n#include \"tbb/enumerable_thread_specific.h\"\n\nclass OutermostArenaBody {\npublic:\n    OutermostArenaBody(AsyncActivity& a_, tbb::task_arena& o_, tbb::task_arena& i_\n            , tbb::task_arena& id_, tbb::enumerable_thread_specific<int>& ets) :\n        m_asyncActivity(a_), m_outermostArena(o_), m_innermostArena(i_), m_innermostArenaDefault(id_), m_local(ets) {}\n\n    void operator()() {\n        tbb::parallel_for(0, 32, *this);\n    }\n\n    void operator()(int i) const {\n        tbb::task::suspend([&] (tbb::task::suspend_point sp) { m_asyncActivity.submit(sp); });\n\n        tbb::task_arena& nested_arena = (i % 3 == 0) ?\n            m_outermostArena : (i % 3 == 1 ? m_innermostArena : m_innermostArenaDefault);\n\n        if (i % 3 != 0) {\n            // We can only guarantee recall coorectness for \"not-same\" nested arenas entry\n            m_local.local() = i;\n        }\n        InnermostArenaBody innermost_arena_body(m_asyncActivity);\n        nested_arena.execute(innermost_arena_body);\n        if (i % 3 != 0) {\n            CHECK_MESSAGE(i == m_local.local(), \"Original thread wasn't recalled for innermost nested arena.\");\n        }\n    }\n\nprivate:\n    AsyncActivity& m_asyncActivity;\n    tbb::task_arena& m_outermostArena;\n    tbb::task_arena& m_innermostArena;\n    tbb::task_arena& m_innermostArenaDefault;\n    tbb::enumerable_thread_specific<int>& m_local;\n};\n\nvoid TestNestedArena() {\n    AsyncActivity asyncActivity(4);\n\n    tbb::task_arena outermost_arena;\n    tbb::task_arena innermost_arena(2,2);\n    tbb::task_arena innermost_arena_default;\n\n    outermost_arena.initialize();\n    innermost_arena_default.initialize();\n    innermost_arena.initialize();\n\n    tbb::enumerable_thread_specific<int> ets;\n\n    OutermostArenaBody outer_arena_body(asyncActivity, outermost_arena, innermost_arena, innermost_arena_default, ets);\n    outermost_arena.execute(outer_arena_body);\n}\n\n// External activity used in all tests, which resumes suspended execution point\nclass EpochAsyncActivity {\npublic:\n    EpochAsyncActivity(int num_, std::atomic<int>& e_) : m_numAsyncThreads(num_), m_globalEpoch(e_) {\n        for (int i = 0; i < m_numAsyncThreads ; ++i) {\n            m_asyncThreads.push_back( new std::thread(EpochAsyncActivity::asyncLoop, this) );\n        }\n    }\n    ~EpochAsyncActivity() {\n        {\n            std::lock_guard<std::mutex> lock(m_mutex);\n            for (int i = 0; i < m_numAsyncThreads; ++i) {\n                m_tagQueue.push(nullptr);\n            }\n            m_condvar.notify_all();\n        }\n        for (int i = 0; i < m_numAsyncThreads; ++i) {\n            m_asyncThreads[i]->join();\n            delete m_asyncThreads[i];\n        }\n        CHECK(m_tagQueue.empty());\n    }\n    void submit(tbb::task::suspend_point ctx) {\n        std::lock_guard<std::mutex> lock(m_mutex);\n        m_tagQueue.push(ctx);\n        m_condvar.notify_one();\n    }\n\nprivate:\n    static void asyncLoop(EpochAsyncActivity* async) {\n        tbb::task::suspend_point tag;\n        for (;;) {\n            {\n                std::unique_lock<std::mutex> lock(async->m_mutex);\n                async->m_condvar.wait(lock, [async] {return !async->m_tagQueue.empty(); });\n                tag = async->m_tagQueue.front();\n                async->m_tagQueue.pop();\n            }\n            if (!tag) {\n                break;\n            }\n            // Track the global epoch\n            async->m_globalEpoch++;\n            tbb::task::resume(tag);\n        };\n    }\n\n    const int m_numAsyncThreads;\n    std::atomic<int>& m_globalEpoch;\n    std::mutex m_mutex;\n    std::condition_variable m_condvar;\n    std::queue<tbb::task::suspend_point> m_tagQueue;\n    std::vector<std::thread*> m_asyncThreads;\n};\n\nstruct EpochSuspendBody {\n    EpochSuspendBody(EpochAsyncActivity& a_, std::atomic<int>& e_, int& le_) :\n        m_asyncActivity(a_), m_globalEpoch(e_), m_localEpoch(le_) {}\n\n    void operator()(tbb::task::suspend_point ctx) {\n        m_localEpoch = m_globalEpoch;\n        m_asyncActivity.submit(ctx);\n    }\n\nprivate:\n    EpochAsyncActivity& m_asyncActivity;\n    std::atomic<int>& m_globalEpoch;\n    int& m_localEpoch;\n};\n\n// Simple test for basic resumable tasks functionality\nvoid TestSuspendResume() {\n#if __TBB_USE_SANITIZERS\n    constexpr int iter_size = 100;\n#else\n    constexpr int iter_size = 50000;\n#endif\n\n    std::atomic<int> global_epoch; global_epoch = 0;\n    EpochAsyncActivity async(4, global_epoch);\n\n    tbb::enumerable_thread_specific<int, tbb::cache_aligned_allocator<int>, tbb::ets_suspend_aware> ets_fiber;\n    std::atomic<int> inner_par_iters, outer_par_iters;\n    inner_par_iters = outer_par_iters = 0;\n\n    tbb::parallel_for(0, N, [&](int) {\n        for (int i = 0; i < iter_size; ++i) {\n            ets_fiber.local() = i;\n\n            int local_epoch;\n            tbb::task::suspend(EpochSuspendBody(async, global_epoch, local_epoch));\n            CHECK(local_epoch < global_epoch);\n            CHECK(ets_fiber.local() == i);\n\n            tbb::parallel_for(0, N, [&](int) {\n                int local_epoch2;\n                tbb::task::suspend(EpochSuspendBody(async, global_epoch, local_epoch2));\n                CHECK(local_epoch2 < global_epoch);\n                ++inner_par_iters;\n            });\n\n            ets_fiber.local() = i;\n            tbb::task::suspend(EpochSuspendBody(async, global_epoch, local_epoch));\n            CHECK(local_epoch < global_epoch);\n            CHECK(ets_fiber.local() == i);\n        }\n        ++outer_par_iters;\n    });\n    CHECK(outer_par_iters == N);\n    CHECK(inner_par_iters == N*N*iter_size);\n}\n\n// During cleanup external thread's local task pool may\n// e.g. contain proxies of affinitized tasks, but can be recalled\nvoid TestCleanupMaster() {\n    if (tbb::this_task_arena::max_concurrency() == 1) {\n        // The test requires at least 2 threads\n        return;\n    }\n    AsyncActivity asyncActivity(4);\n    tbb::task_group tg;\n    std::atomic<int> iter_spawned;\n    std::atomic<int> iter_executed;\n\n    for (int i = 0; i < 100; i++) {\n        iter_spawned = 0;\n        iter_executed = 0;\n\n        utils::NativeParallelFor(N, [&asyncActivity, &tg, &iter_spawned, &iter_executed](int j) {\n            for (int k = 0; k < j*10 + 1; ++k) {\n                tg.run([&asyncActivity, j, &iter_executed] {\n                    utils::doDummyWork(j * 10);\n                    tbb::task::suspend(SuspendBody(asyncActivity, std::this_thread::get_id()));\n                    iter_executed++;\n                });\n                iter_spawned++;\n            }\n        });\n        CHECK(iter_spawned == 460);\n        tg.wait();\n        CHECK(iter_executed == 460);\n    }\n}\nclass ParForSuspendBody {\n    AsyncActivity& asyncActivity;\n    int m_numIters;\npublic:\n    ParForSuspendBody(AsyncActivity& a_, int iters) : asyncActivity(a_), m_numIters(iters) {}\n    void operator()(int) const {\n        utils::doDummyWork(m_numIters);\n        tbb::task::suspend(SuspendBody(asyncActivity, std::this_thread::get_id()));\n    }\n};\n\nvoid TestNativeThread() {\n    AsyncActivity asyncActivity(4);\n\n    tbb::task_arena arena;\n    tbb::task_group tg;\n    std::atomic<int> iter{};\n    utils::NativeParallelFor(arena.max_concurrency() / 2, [&arena, &tg, &asyncActivity, &iter](int) {\n        for (int i = 0; i < 10; i++) {\n            arena.execute([&tg, &asyncActivity, &iter]() {\n                tg.run([&asyncActivity]() {\n                    tbb::task::suspend(SuspendBody(asyncActivity, std::this_thread::get_id()));\n                });\n                iter++;\n            });\n        }\n    });\n\n    CHECK(iter == (arena.max_concurrency() / 2 * 10));\n    arena.execute([&tg](){\n        tg.wait();\n    });\n}\n\nclass ObserverTracker : public tbb::task_scheduler_observer {\n    static thread_local bool is_in_arena;\npublic:\n    std::atomic<int> counter;\n\n    ObserverTracker(tbb::task_arena& a) : tbb::task_scheduler_observer(a) {\n        counter = 0;\n        observe(true);\n    }\n    void on_scheduler_entry(bool) override {\n        bool& l = is_in_arena;\n        CHECK_MESSAGE(l == false, \"The thread must call on_scheduler_entry only one time.\");\n        l = true;\n        ++counter;\n    }\n    void on_scheduler_exit(bool) override {\n        bool& l = is_in_arena;\n        CHECK_MESSAGE(l == true, \"The thread must call on_scheduler_entry before calling on_scheduler_exit.\");\n        l = false;\n    }\n};\n\nthread_local bool ObserverTracker::is_in_arena;\n\nvoid TestObservers() {\n    tbb::task_arena arena;\n    ObserverTracker tracker(arena);\n    do {\n        arena.execute([] {\n            tbb::parallel_for(0, 10, [](int) {\n                auto thread_id = std::this_thread::get_id();\n                tbb::task::suspend([thread_id](tbb::task::suspend_point tag) {\n                    CHECK(thread_id == std::this_thread::get_id());\n                    tbb::task::resume(tag);\n                });\n            }, tbb::simple_partitioner());\n        });\n    } while (tracker.counter < 100);\n    tracker.observe(false);\n}\n\nclass TestCaseGuard {\n    static thread_local bool m_local;\n    tbb::global_control m_threadLimit;\n    tbb::global_control m_stackLimit;\npublic:\n    TestCaseGuard()\n        : m_threadLimit(tbb::global_control::max_allowed_parallelism, std::max(tbb::this_task_arena::max_concurrency(), 16))\n        , m_stackLimit(tbb::global_control::thread_stack_size, 128*1024)\n    {\n        CHECK(m_local == false);\n        m_local = true;\n    }\n    ~TestCaseGuard() {\n        CHECK(m_local == true);\n        m_local = false;\n    }\n};\n\nthread_local bool TestCaseGuard::m_local = false;\n\n#if !EMSCRIPTEN\n//! Nested test for suspend and resume\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Nested test for suspend and resume\") {\n    TestCaseGuard guard;\n    TestSuspendResume();\n}\n\n//! Nested arena complex test\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Nested arena\") {\n    TestCaseGuard guard;\n    TestNestedArena();\n}\n#endif\n\n//! Test with external threads\n//! \\brief \\ref error_guessing\nTEST_CASE(\"External threads\") {\n    TestNativeThread();\n}\n\n#if !EMSCRIPTEN\n//! Stress test with external threads\n//! \\brief \\ref stress\nTEST_CASE(\"Stress test with external threads\") {\n    TestCleanupMaster();\n}\n#endif\n\n//! Test with an arena observer\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Arena observer\") {\n    TestObservers();\n}\n#endif /* __TBB_RESUMABLE_TASKS */\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_scheduler_mix.cpp",
    "content": "/*\n    Copyright (c) 2021-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/config.h\"\n\n#include <oneapi/tbb/task_arena.h>\n#include <oneapi/tbb/concurrent_vector.h>\n#include <oneapi/tbb/rw_mutex.h>\n#include <oneapi/tbb/task_group.h>\n#include <oneapi/tbb/parallel_for.h>\n\n#include <oneapi/tbb/global_control.h>\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_concurrency_limit.h\"\n#include \"common/spin_barrier.h\"\n\n#include <stdlib.h> // C11/POSIX aligned_alloc\n#include <random>\n\n\n//! \\file test_scheduler_mix.cpp\n//! \\brief Test for [scheduler.task_arena scheduler.task_scheduler_observer] specification\n\nconst std::uint64_t maxNumActions = 1 * 100 * 1000;\nstatic std::atomic<std::uint64_t> globalNumActions{};\n\n//using Random = utils::FastRandom<>;\nclass Random {\n    struct State {\n        std::random_device rd;\n        std::mt19937 gen;\n        std::uniform_int_distribution<> dist;\n\n        State() : gen(rd()), dist(0, std::numeric_limits<unsigned short>::max()) {}\n\n        int get() {\n            return dist(gen);\n        }\n    };\n    static thread_local State* mState;\n    tbb::concurrent_vector<State*> mStateList;\npublic:\n    ~Random() {\n        for (auto s : mStateList) {\n            delete s;\n        }\n    }\n\n    int get() {\n        auto& s = mState;\n        if (!s) {\n            s = new State;\n            mStateList.push_back(s);\n        }\n        return s->get();\n    }\n};\n\nthread_local Random::State* Random::mState = nullptr;\n\n\nvoid* aligned_malloc(std::size_t alignment, std::size_t size) {\n#if _WIN32\n    return _aligned_malloc(size, alignment);\n#elif __unix__ || __APPLE__\n    void* ptr{};\n    int res = posix_memalign(&ptr, alignment, size);\n    CHECK(res == 0);\n    return ptr;\n#else\n    return aligned_alloc(alignment, size);\n#endif\n}\n\nvoid aligned_free(void* ptr) {\n#if _WIN32\n    _aligned_free(ptr);\n#else\n    free(ptr);\n#endif\n}\n\ntemplate <typename T, std::size_t Alignment>\nclass PtrRWMutex {\n    static const std::size_t maxThreads = (Alignment >> 1) - 1;\n    static const std::uintptr_t READER_MASK = maxThreads;       // 7F..\n    static const std::uintptr_t LOCKED = Alignment - 1;         // FF..\n    static const std::uintptr_t LOCKED_MASK = LOCKED;           // FF..\n    static const std::uintptr_t LOCK_PENDING = READER_MASK + 1; // 80..\n\n    std::atomic<std::uintptr_t> mState;\n\n    T* pointer() {\n        return reinterpret_cast<T*>(state() & ~LOCKED_MASK);\n    }\n\n    std::uintptr_t state() {\n        return mState.load(std::memory_order_relaxed);\n    }\n\npublic:\n    class ScopedLock {\n    public:\n        constexpr ScopedLock() : mMutex(nullptr), mIsWriter(false) {}\n        //! Acquire lock on given mutex.\n        ScopedLock(PtrRWMutex& m, bool write = true) : mMutex(nullptr) {\n            CHECK_FAST(write == true);\n            acquire(m);\n        }\n        //! Release lock (if lock is held).\n        ~ScopedLock() {\n            if (mMutex) {\n                release();\n            }\n        }\n        //! No Copy\n        ScopedLock(const ScopedLock&) = delete;\n        ScopedLock& operator=(const ScopedLock&) = delete;\n\n        //! Acquire lock on given mutex.\n        void acquire(PtrRWMutex& m) {\n            CHECK_FAST(mMutex == nullptr);\n            mIsWriter = true;\n            mMutex = &m;\n            mMutex->lock();\n        }\n\n        //! Try acquire lock on given mutex.\n        bool tryAcquire(PtrRWMutex& m, bool write = true) {\n            bool succeed = write ? m.tryLock() : m.tryLockShared();\n            if (succeed) {\n                mMutex = &m;\n                mIsWriter = write;\n            }\n            return succeed;\n        }\n\n        void clear() {\n            CHECK_FAST(mMutex != nullptr);\n            CHECK_FAST(mIsWriter);\n            PtrRWMutex* m = mMutex;\n            mMutex = nullptr;\n            m->clear();\n        }\n\n        //! Release lock.\n        void release() {\n            CHECK_FAST(mMutex != nullptr);\n            PtrRWMutex* m = mMutex;\n            mMutex = nullptr;\n\n            if (mIsWriter) {\n                m->unlock();\n            }\n            else {\n                m->unlockShared();\n            }\n        }\n    protected:\n        PtrRWMutex* mMutex{};\n        bool mIsWriter{};\n    };\n\n    bool trySet(T* ptr) {\n        auto p = reinterpret_cast<std::uintptr_t>(ptr);\n        CHECK_FAST((p & (Alignment - 1)) == 0);\n        if (!state()) {\n            std::uintptr_t expected = 0;\n            if (mState.compare_exchange_strong(expected, p)) {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    void clear() {\n        CHECK_FAST((state() & LOCKED_MASK) == LOCKED);\n        mState.store(0, std::memory_order_relaxed);\n    }\n\n    bool tryLock() {\n        auto v = state();\n        if (v == 0) {\n            return false;\n        }\n        CHECK_FAST((v & LOCKED_MASK) == LOCKED || (v & READER_MASK) < maxThreads);\n        if ((v & READER_MASK) == 0) {\n            if (mState.compare_exchange_strong(v, v | LOCKED)) {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    bool tryLockShared() {\n        auto v = state();\n        if (v == 0) {\n            return false;\n        }\n        CHECK_FAST((v & LOCKED_MASK) == LOCKED || (v & READER_MASK) < maxThreads);\n        if ((v & LOCKED_MASK) != LOCKED && (v & LOCK_PENDING) == 0) {\n            if (mState.compare_exchange_strong(v, v + 1)) {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    void lock() {\n        auto v = state();\n        mState.compare_exchange_strong(v, v | LOCK_PENDING);\n        while (!tryLock()) {\n            utils::yield();\n        }\n    }\n\n    void unlock() {\n        auto v = state();\n        CHECK_FAST((v & LOCKED_MASK) == LOCKED);\n        mState.store(v & ~LOCKED, std::memory_order_release);\n    }\n\n    void unlockShared() {\n        auto v = state();\n        CHECK_FAST((v & LOCKED_MASK) != LOCKED);\n        CHECK_FAST((v & READER_MASK) > 0);\n        mState -= 1;\n    }\n\n    operator bool() const {\n        return pointer() != 0;\n    }\n\n    T* get() {\n        return pointer();\n    }\n};\n\nclass Statistics {\npublic:\n    enum ACTION {\n        ArenaCreate,\n        ArenaDestroy,\n        ArenaAcquire,\n        skippedArenaCreate,\n        skippedArenaDestroy,\n        skippedArenaAcquire,\n        ParallelAlgorithm,\n        ArenaEnqueue,\n        ArenaExecute,\n        numActions\n    };\n\n    static const char* const mStatNames[numActions];\nprivate:\n    struct StatType {\n        StatType() : mCounters() {}\n        std::array<std::uint64_t, numActions> mCounters;\n    };\n\n    tbb::concurrent_vector<StatType*> mStatsList;\n    static thread_local StatType* mStats;\n\n    StatType& get() {\n        auto& s = mStats;\n        if (!s) {\n            s = new StatType;\n            mStatsList.push_back(s);\n        }\n        return *s;\n    }\npublic:\n    ~Statistics() {\n        for (auto s : mStatsList) {\n            delete s;\n        }\n    }\n\n    void notify(ACTION a) {\n        ++get().mCounters[a];\n    }\n\n    void report() {\n        StatType summary;\n        for (auto& s : mStatsList) {\n            for (int i = 0; i < numActions; ++i) {\n                summary.mCounters[i] += s->mCounters[i];\n            }\n        }\n        std::cout << std::endl << \"Statistics:\" << std::endl;\n        std::cout << \"Total actions: \" << globalNumActions << std::endl;\n        for (int i = 0; i < numActions; ++i) {\n            std::cout << mStatNames[i] << \": \" << summary.mCounters[i] << std::endl;\n        }\n    }\n};\n\n\nconst char* const Statistics::mStatNames[Statistics::numActions] = {\n    \"Arena create\", \"Arena destroy\", \"Arena acquire\",\n    \"Skipped arena create\", \"Skipped arena destroy\", \"Skipped arena acquire\",\n    \"Parallel algorithm\", \"Arena enqueue\", \"Arena execute\"\n};\nthread_local Statistics::StatType* Statistics::mStats;\n\nstatic Statistics gStats;\n\nclass LifetimeTracker {\npublic:\n    LifetimeTracker() = default;\n\n    class Guard {\n    public:\n        Guard(LifetimeTracker* obj) {\n            if (!(obj->mReferences.load(std::memory_order_relaxed) & SHUTDOWN_FLAG)) {\n                if (obj->mReferences.fetch_add(REFERENCE_FLAG) & SHUTDOWN_FLAG) {\n                    obj->mReferences.fetch_sub(REFERENCE_FLAG);\n                } else {\n                    mObj = obj;\n                }\n            }\n        }\n\n        Guard(Guard&& ing) : mObj(ing.mObj) {\n            ing.mObj = nullptr;\n        }\n\n        ~Guard() {\n            if (mObj != nullptr) {\n                mObj->mReferences.fetch_sub(REFERENCE_FLAG);\n            }\n        }\n\n        bool continue_execution() {\n            return mObj != nullptr;\n        }\n\n    private:\n        LifetimeTracker* mObj{nullptr};\n    };\n\n    Guard makeGuard() {\n        return Guard(this);\n    }\n\n    void signalShutdown() {\n        mReferences.fetch_add(SHUTDOWN_FLAG);\n    }\n\n    void waitCompletion() {\n        utils::SpinWaitUntilEq(mReferences, SHUTDOWN_FLAG);\n    }\n\nprivate:\n    friend class Guard;\n    static constexpr std::uintptr_t SHUTDOWN_FLAG = 1;\n    static constexpr std::uintptr_t REFERENCE_FLAG = 1 << 1;\n    std::atomic<std::uintptr_t> mReferences{};\n};\n\nclass ArenaTable {\n    static const std::size_t maxArenas = 64;\n    static const std::size_t maxThreads = 1 << 9;\n    static const std::size_t arenaAligment = maxThreads << 1;\n\n    using ArenaPtrRWMutex = PtrRWMutex<tbb::task_arena, arenaAligment>;\n    std::array<ArenaPtrRWMutex, maxArenas> mArenaTable;\n\n    struct ThreadState {\n        bool lockedArenas[maxArenas]{};\n        int arenaIdxStack[maxArenas];\n        int level{};\n    };\n\n    LifetimeTracker mLifetimeTracker{};\n    static thread_local ThreadState mThreadState;\n\n    template <typename F>\n    auto find_arena(std::size_t start, F f) -> decltype(f(std::declval<ArenaPtrRWMutex&>(), std::size_t{})) {\n        for (std::size_t idx = start, i = 0; i < maxArenas; ++i, idx = (idx + 1) % maxArenas) {\n            auto res = f(mArenaTable[idx], idx);\n            if (res) {\n                return res;\n            }\n        }\n        return {};\n    }\n\npublic:\n    using ScopedLock = ArenaPtrRWMutex::ScopedLock;\n\n    void create(Random& rnd) {\n        auto guard = mLifetimeTracker.makeGuard();\n        if (guard.continue_execution()) {\n            int num_threads = rnd.get() % utils::get_platform_max_threads() + 1;\n            unsigned int num_reserved = rnd.get() % num_threads;\n            tbb::task_arena::priority priorities[] = { tbb::task_arena::priority::low , tbb::task_arena::priority::normal, tbb::task_arena::priority::high };\n            tbb::task_arena::priority priority = priorities[rnd.get() % 3];\n\n            tbb::task_arena* a = new (aligned_malloc(arenaAligment, arenaAligment)) tbb::task_arena{ num_threads , num_reserved , priority };\n\n            if (!find_arena(rnd.get() % maxArenas, [a](ArenaPtrRWMutex& arena, std::size_t) -> bool {\n                    if (arena.trySet(a)) {\n                        return true;\n                    }\n                    return false;\n                }))\n            {\n                gStats.notify(Statistics::skippedArenaCreate);\n                a->~task_arena();\n                aligned_free(a);\n            }\n        }\n    }\n\n    void destroy(Random& rnd) {\n        auto guard = mLifetimeTracker.makeGuard();\n        if (guard.continue_execution()) {\n            auto& ts = mThreadState;\n            if (!find_arena(rnd.get() % maxArenas, [&ts](ArenaPtrRWMutex& arena, std::size_t idx) {\n                    if (!ts.lockedArenas[idx]) {\n                        ScopedLock lock;\n                        if (lock.tryAcquire(arena, true)) {\n                            auto a = arena.get();\n                            lock.clear();\n                            a->~task_arena();\n                            aligned_free(a);\n                            return true;\n                        }\n                    }\n                    return false;\n                }))\n            {\n                gStats.notify(Statistics::skippedArenaDestroy);\n            }\n        }\n    }\n\n    void shutdown() {\n        mLifetimeTracker.signalShutdown();\n        mLifetimeTracker.waitCompletion();\n        find_arena(0, [](ArenaPtrRWMutex& arena, std::size_t) {\n            if (arena.get()) {\n                ScopedLock lock{ arena, true };\n                auto a = arena.get();\n                lock.clear();\n                a->~task_arena();\n                aligned_free(a);\n            }\n            return false;\n        });\n    }\n\n    std::pair<tbb::task_arena*, std::size_t> acquire(Random& rnd, ScopedLock& lock) {\n        auto guard = mLifetimeTracker.makeGuard();\n\n        tbb::task_arena* a{nullptr};\n        std::size_t resIdx{};\n        if (guard.continue_execution()) {\n            auto& ts = mThreadState;\n            a = find_arena(rnd.get() % maxArenas,\n                [&ts, &lock, &resIdx](ArenaPtrRWMutex& arena, std::size_t idx) -> tbb::task_arena* {\n                    if (!ts.lockedArenas[idx]) {\n                        if (lock.tryAcquire(arena, false)) {\n                            ts.lockedArenas[idx] = true;\n                            ts.arenaIdxStack[ts.level++] = int(idx);\n                            resIdx = idx;\n                            return arena.get();\n                        }\n                    }\n                    return nullptr;\n                });\n            if (!a) {\n                gStats.notify(Statistics::skippedArenaAcquire);\n            }\n        }\n        return { a, resIdx };\n    }\n\n    void release(ScopedLock& lock) {\n        auto& ts = mThreadState;\n        CHECK_FAST(ts.level > 0);\n        auto idx = ts.arenaIdxStack[--ts.level];\n        CHECK_FAST(ts.lockedArenas[idx]);\n        ts.lockedArenas[idx] = false;\n        lock.release();\n    }\n};\n\nthread_local ArenaTable::ThreadState ArenaTable::mThreadState;\n\nstatic ArenaTable arenaTable;\nstatic Random threadRandom;\n\nenum ACTIONS {\n    arena_create,\n    arena_destroy,\n    arena_action,\n    parallel_algorithm,\n    // TODO:\n    // observer_attach,\n    // observer_detach,\n    // flow_graph,\n    // task_group,\n    // resumable_tasks,\n\n    num_actions\n};\n\nvoid global_actor(size_t arenaAfterStealing);\n\ntemplate <ACTIONS action>\nstruct actor;\n\ntemplate <>\nstruct actor<arena_create> {\n    static void do_it(Random& r) {\n        arenaTable.create(r);\n    }\n};\n\ntemplate <>\nstruct actor<arena_destroy> {\n    static void do_it(Random& r) {\n        arenaTable.destroy(r);\n    }\n};\n\ntemplate <>\nstruct actor<arena_action> {\n    static void do_it(Random& r, size_t arenaAfterStealing) {\n        static thread_local std::size_t arenaLevel = 0;\n\n        // treat arenas index as priority: we own some resource already,\n        // so may pretend only to low-priority resource\n        arenaLevel = std::max(arenaLevel, arenaAfterStealing);\n\n        ArenaTable::ScopedLock lock;\n        auto entry = arenaTable.acquire(r, lock);\n        if (entry.first) {\n            enum arena_actions {\n                arena_execute,\n                arena_enqueue,\n                num_arena_actions\n            };\n            auto process = r.get() % 2;\n            auto body = [process] {\n                if (process) {\n                    tbb::detail::d1::wait_context wctx{ 1 };\n                    tbb::task_group_context ctx;\n                    tbb::this_task_arena::enqueue([&wctx] { wctx.release(); });\n                    tbb::detail::d1::wait(wctx, ctx);\n                } else {\n                    global_actor(0);\n                }\n            };\n            switch (r.get() % (16*num_arena_actions)) {\n            case arena_execute:\n                // to prevent deadlock, potentially blocking operation\n                // may be called only for arenas with larger index\n                if (entry.second > arenaLevel) {\n                    gStats.notify(Statistics::ArenaExecute);\n                    auto oldArenaLevel = arenaLevel;\n                    arenaLevel = entry.second;\n                    entry.first->execute(body);\n                    arenaLevel = oldArenaLevel;\n                    break;\n                }\n                utils_fallthrough;\n            case arena_enqueue:\n                utils_fallthrough;\n            default:\n                gStats.notify(Statistics::ArenaEnqueue);\n                // after stealing by a worker, the task will run in arena\n                // with index entry.second\n                entry.first->enqueue([ entry ] { global_actor(entry.second); });\n                break;\n            }\n            arenaTable.release(lock);\n        }\n    }\n};\n\ntemplate <>\nstruct actor<parallel_algorithm> {\n    static void do_it(Random& rnd) {\n        enum PARTITIONERS {\n            simpl_part,\n            auto_part,\n            aff_part,\n            static_part,\n            num_parts\n        };\n        int sz = rnd.get() % 10000;\n        auto doGlbAction = rnd.get() % 1000 == 42;\n        auto body = [doGlbAction, sz](int i) {\n            if (i == sz / 2 && doGlbAction) {\n                global_actor(0);\n            }\n        };\n\n        switch (rnd.get() % num_parts) {\n        case simpl_part:\n            tbb::parallel_for(0, sz, body, tbb::simple_partitioner{}); break;\n        case auto_part:\n            tbb::parallel_for(0, sz, body, tbb::auto_partitioner{}); break;\n        case aff_part:\n        {\n            tbb::affinity_partitioner aff;\n            tbb::parallel_for(0, sz, body, aff); break;\n        }\n        case static_part:\n            tbb::parallel_for(0, sz, body, tbb::static_partitioner{}); break;\n        }\n    }\n};\n\nvoid global_actor(size_t arenaAfterStealing) {\n    static thread_local std::uint64_t localNumActions{};\n\n    while (globalNumActions < maxNumActions) {\n        auto& rnd = threadRandom;\n        switch (rnd.get() % num_actions) {\n        case arena_create:  gStats.notify(Statistics::ArenaCreate); actor<arena_create>::do_it(rnd);  break;\n        case arena_destroy: gStats.notify(Statistics::ArenaDestroy); actor<arena_destroy>::do_it(rnd); break;\n        case arena_action:  gStats.notify(Statistics::ArenaAcquire); actor<arena_action>::do_it(rnd, arenaAfterStealing);  break;\n        case parallel_algorithm: gStats.notify(Statistics::ParallelAlgorithm); actor<parallel_algorithm>::do_it(rnd);  break;\n        }\n\n        if (++localNumActions == 100) {\n            localNumActions = 0;\n            globalNumActions += 100;\n\n            // TODO: Enable statistics\n            // static std::mutex mutex;\n            // std::lock_guard<std::mutex> lock{ mutex };\n            // std::cout << globalNumActions << \"\\r\" << std::flush;\n        }\n    }\n}\n\n#if TBB_USE_EXCEPTIONS\n//! \\brief \\ref stress\nTEST_CASE(\"Stress test with mixing functionality\") {\n    // TODO add thread recreation\n    // TODO: Enable statistics\n    tbb::task_scheduler_handle handle{ tbb::attach{} };\n\n    const std::size_t numExtraThreads = 16;\n    utils::SpinBarrier startBarrier{numExtraThreads};\n    utils::NativeParallelFor(numExtraThreads, [&startBarrier](std::size_t) {\n        startBarrier.wait();\n        global_actor(0);\n    });\n\n    arenaTable.shutdown();\n\n    tbb::finalize(handle);\n\n    // gStats.report();\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_semaphore.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_semaphore.cpp\n//! \\brief Test for [internal] functionality\n\n#if _WIN32 || _WIN64\n#define _CRT_SECURE_NO_WARNINGS\n#endif\n\n// Test for counting semaphore\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/spin_barrier.h\"\n#include \"tbb/blocked_range.h\"\n#include \"tbb/tick_count.h\"\n#include \"../../src/tbb/semaphore.h\"\n#include <atomic>\n#include <vector>\n\nusing tbb::detail::r1::semaphore;\n\nstd::atomic<int> pCount;\nutils::SpinBarrier sBarrier;\n\n// Semaphore basis function:\n//  set semaphore to initial value\n// see that semaphore only allows that number of threads to be active\nclass Body : utils::NoAssign {\n    const int nIters;\n    semaphore& mySem;\n    std::vector<int>& ourCounts;\n    std::vector<double>& tottime;\n\n    static constexpr int tickCounts = 1; // millisecond\n    static constexpr int innerWait = 5; // millisecond\npublic:\n    Body( int nThread, int nIter, semaphore& sem,\n          std::vector<int>& our_counts, std::vector<double>& tot_time )\n        : nIters(nIter), mySem(sem), ourCounts(our_counts), tottime(tot_time)\n    {\n        sBarrier.initialize(nThread);\n        pCount = 0;\n    }\n\n    void operator()( const int tid ) const {\n        sBarrier.wait();\n\n        for (int i = 0; i < nIters; ++i) {\n            utils::Sleep(tid * tickCounts);\n            tbb::tick_count t0 = tbb::tick_count::now();\n            mySem.P();\n            tbb::tick_count t1 = tbb::tick_count::now();\n            tottime[tid] += (t1 - t0).seconds();\n\n            int curval = ++pCount;\n            if (curval > ourCounts[tid]) {\n                ourCounts[tid] = curval;\n            }\n            utils::Sleep(innerWait);\n            --pCount;\n            REQUIRE(int(pCount) >= 0);\n            mySem.V();\n        }\n    }\n}; // class Body\n\nvoid test_semaphore( int sem_init_cnt, int extra_threads ) {\n    semaphore my_sem(sem_init_cnt);\n    int n_threads = sem_init_cnt + extra_threads;\n\n    std::vector<int> max_vals(n_threads);\n    std::vector<double> tot_times(n_threads);\n\n    int n_iters = 10;\n    Body body(n_threads, n_iters, my_sem, max_vals, tot_times);\n\n    pCount = 0;\n    utils::NativeParallelFor(n_threads, body);\n    REQUIRE_MESSAGE(!pCount, \"not all threads decremented pCount\");\n\n    int max_count = -1;\n    for (auto item : max_vals) {\n        max_count = utils::max(max_count, item);\n    }\n    REQUIRE_MESSAGE(max_count <= sem_init_cnt, \"Too many threads in semaphore-protected increment\");\n}\n\n#include \"../../src/tbb/semaphore.cpp\"\n#if _WIN32 || _WIN64\n#include \"../../src/tbb/dynamic_link.cpp\"\n#endif\n\nconstexpr std::size_t N_TIMES = 1000;\n\ntemplate <typename S>\nstruct Counter {\n    std::atomic<long> value;\n    S my_sem;\n    Counter() : value(0) {}\n}; // struct Counter\n\n// Function object for use with parallel_for.h\ntemplate <typename C>\nstruct AddOne : utils::NoAssign {\n    C& my_counter;\n\n    // Increments counter once for each iteration in the iteration space\n    void operator()( int ) const {\n        for (std::size_t i = 0; i < N_TIMES; ++i) {\n            my_counter.my_sem.P();\n            ++my_counter.value;\n            my_counter.my_sem.V();\n        }\n    }\n\n    AddOne( C& c ) : my_counter(c) {\n        my_counter.my_sem.V();\n    }\n}; // struct AddOne\n\nvoid test_binary_semaphore( int n_threads ) {\n    Counter<tbb::detail::r1::binary_semaphore> counter;\n    AddOne<decltype(counter)> AddOneBody(counter);\n    utils::NativeParallelFor(n_threads, AddOneBody);\n    REQUIRE_MESSAGE(n_threads * N_TIMES == counter.value, \"Binary semaphore operations P()/V() have a race\");\n}\n\n// Power of 2, the most tokens that can be in flight\nconstexpr std::size_t MAX_TOKENS = 32;\nenum FilterType { imaProducer, imaConsumer };\n\nclass FilterBase : utils::NoAssign {\nprotected:\n    FilterType ima;\n    unsigned totTokens; // total number of tokens to be emitted, only used by producer\n    std::atomic<unsigned>& myTokens;\n    std::atomic<unsigned>& otherTokens;\n\n    unsigned myWait;\n    semaphore& my_sem;\n    semaphore& next_sem;\n\n    unsigned* myBuffer;\n    unsigned* nextBuffer;\n    unsigned curToken;\npublic:\n    FilterBase( FilterType filter,\n                unsigned tot_tokens,\n                std::atomic<unsigned>& my_tokens,\n                std::atomic<unsigned>& other_tokens,\n                unsigned my_wait,\n                semaphore& m_sem,\n                semaphore& n_sem,\n                unsigned* buf,\n                unsigned* n_buf )\n        : ima(filter), totTokens(tot_tokens), myTokens(my_tokens),\n          otherTokens(other_tokens), myWait(my_wait), my_sem(m_sem),\n          next_sem(n_sem), myBuffer(buf), nextBuffer(n_buf)\n    {\n        curToken = 0;\n    }\n\n    void Produce( const int );\n    void Consume( const int );\n    void operator()( const int tid ) {\n        if (ima == imaConsumer) {\n            Consume(tid);\n        } else {\n            Produce(tid);\n        }\n    }\n}; // class FilterBase\n\nclass ProduceConsumeBody {\n    FilterBase** my_filters;\npublic:\n    ProduceConsumeBody( FilterBase** filters ) : my_filters(filters) {}\n\n    void operator()( const int tid ) const {\n        my_filters[tid]->operator()(tid);\n    }\n}; // class ProduceConsumeBody\n\n// send a bunch of non-null \"tokens\" to consumer, then a nullptr\nvoid FilterBase::Produce( const int ) {\n    nextBuffer[0] = 0; // just in case we provide no tokens\n    sBarrier.wait();\n    while(totTokens) {\n        while(!myTokens) {\n            my_sem.P();\n        }\n        // we have a slot available\n        --myTokens; // moving this down reduces spurious wakeups\n        --totTokens;\n        if (totTokens) {\n            nextBuffer[curToken & (MAX_TOKENS - 1)] = curToken * 3 + 1;\n        } else {\n            nextBuffer[curToken & (MAX_TOKENS - 1)] = 0;\n        }\n        ++curToken;\n\n        utils::Sleep(myWait);\n        unsigned temp = ++otherTokens;\n        if (temp == 1) {\n            next_sem.V();\n        }\n    }\n    next_sem.V(); // final wakeup\n}\n\nvoid FilterBase::Consume( const int ) {\n    unsigned myToken;\n    sBarrier.wait();\n    do {\n        while( !myTokens ) {\n            my_sem.P();\n        }\n        // we have a slot available\n        --myTokens;\n        myToken = myBuffer[curToken & (MAX_TOKENS - 1)];\n        if (myToken) {\n            REQUIRE_MESSAGE(myToken == curToken * 3 + 1, \"Error in received token\");\n            ++curToken;\n            utils::Sleep(myWait);\n            unsigned temp = ++otherTokens;\n            if (temp == 1) {\n                next_sem.V();\n            }\n        }\n    } while(myToken);\n    // end of processing\n    REQUIRE_MESSAGE(curToken + 1 == totTokens, \"Didn't receive enough tokens\");\n}\n\n// test of producer/consumer with atomic buffer cnt and semaphore\n// nTokens are total number of tokens through the pipe\n// pWait is the wait time for the producer\n// cWait is the wait time for the consumer\nvoid test_producer_consumer( unsigned totTokens, unsigned nTokens, unsigned pWait, unsigned cWait ) {\n    semaphore p_sem;\n    semaphore c_sem;\n    std::atomic<unsigned> p_tokens;\n    std::atomic<unsigned> c_tokens(0);\n\n    unsigned c_buffer[MAX_TOKENS];\n    FilterBase* my_filters[2]; // one producer, one concumer\n\n    REQUIRE_MESSAGE(nTokens <= MAX_TOKENS, \"Not enough slots for tokens\");\n\n    my_filters[0] = new FilterBase(imaProducer, totTokens, p_tokens, c_tokens, pWait, c_sem, p_sem, nullptr, &(c_buffer[0]));\n    my_filters[1] = new FilterBase(imaConsumer, totTokens, c_tokens, p_tokens, cWait, p_sem, c_sem, c_buffer, nullptr);\n\n    p_tokens = nTokens;\n    ProduceConsumeBody body(my_filters);\n    sBarrier.initialize(2);\n    utils::NativeParallelFor(2, body);\n    delete my_filters[0];\n    delete my_filters[1];\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test binary semaphore\") {\n    test_binary_semaphore(utils::MaxThread);\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test semaphore\") {\n    for (int sem_size = 1; sem_size <= int(utils::MaxThread); ++sem_size) {\n        for (int ex_threads = 0; ex_threads <= int(utils::MaxThread) - sem_size; ++ex_threads) {\n            test_semaphore(sem_size, ex_threads);\n        }\n    }\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test producer-consumer\") {\n    test_producer_consumer(10, 2, 5, 5);\n    test_producer_consumer(10, 2, 20, 5);\n    test_producer_consumer(10, 2, 5, 20);\n\n    test_producer_consumer(10, 1, 5, 5);\n    test_producer_consumer(20, 10, 5, 20);\n    test_producer_consumer(64, 32, 1, 20);\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_sequencer_node.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/config.h\"\n\n#include \"tbb/flow_graph.h\"\n#include \"tbb/global_control.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_assert.h\"\n#include \"common/test_follows_and_precedes_api.h\"\n#include \"common/concepts_common.h\"\n\n#include <cstdio>\n#include <atomic>\n\n#include \"test_buffering_try_put_and_wait.h\"\n\n//! \\file test_sequencer_node.cpp\n//! \\brief Test for [flow_graph.sequencer_node] specification\n\n\n#define N 1000\n#define C 10\n\ntemplate< typename T >\nstruct seq_inspector {\n    size_t operator()(const T &v) const { return size_t(v); }\n};\n\ntemplate< typename T >\nbool wait_try_get( tbb::flow::graph &g, tbb::flow::sequencer_node<T> &q, T &value ) {\n    g.wait_for_all();\n    return q.try_get(value);\n}\n\ntemplate< typename T >\nvoid spin_try_get( tbb::flow::queue_node<T> &q, T &value ) {\n    while ( q.try_get(value) != true ) ;\n}\n\ntemplate< typename T >\nstruct parallel_puts : utils::NoAssign {\n\n    tbb::flow::sequencer_node<T> &my_q;\n    int my_num_threads;\n\n    parallel_puts( tbb::flow::sequencer_node<T> &q, int num_threads ) : my_q(q), my_num_threads(num_threads) {}\n\n    void operator()(int tid) const {\n        for (int j = tid; j < N; j+=my_num_threads) {\n            bool msg = my_q.try_put( T(j) );\n            CHECK_MESSAGE( msg == true, \"\" );\n        }\n    }\n\n};\n\ntemplate< typename T >\nstruct touches {\n\n    bool **my_touches;\n    T *my_last_touch;\n    int my_num_threads;\n\n    touches( int num_threads ) : my_num_threads(num_threads) {\n        my_last_touch = new T[my_num_threads];\n        my_touches = new bool* [my_num_threads];\n        for ( int p = 0; p < my_num_threads; ++p) {\n            my_last_touch[p] = T(-1);\n            my_touches[p] = new bool[N];\n            for ( int n = 0; n < N; ++n)\n                my_touches[p][n] = false;\n        }\n    }\n\n    ~touches() {\n        for ( int p = 0; p < my_num_threads; ++p) {\n            delete [] my_touches[p];\n        }\n        delete [] my_touches;\n        delete [] my_last_touch;\n    }\n\n    bool check( int tid, T v ) {\n        if ( my_touches[tid][v] != false ) {\n            printf(\"Error: value seen twice by local thread\\n\");\n            return false;\n        }\n        if ( v <= my_last_touch[tid] ) {\n            printf(\"Error: value seen in wrong order by local thread\\n\");\n            return false;\n        }\n        my_last_touch[tid] = v;\n        my_touches[tid][v] = true;\n        return true;\n    }\n\n    bool validate_touches() {\n        bool *all_touches = new bool[N];\n        for ( int n = 0; n < N; ++n)\n            all_touches[n] = false;\n\n        for ( int p = 0; p < my_num_threads; ++p) {\n            for ( int n = 0; n < N; ++n) {\n                if ( my_touches[p][n] == true ) {\n                    CHECK_MESSAGE( ( all_touches[n] == false), \"value see by more than one thread\\n\" );\n                    all_touches[n] = true;\n                }\n            }\n        }\n        for ( int n = 0; n < N; ++n) {\n            if ( !all_touches[n] )\n                printf(\"No touch at %d, my_num_threads = %d\\n\", n, my_num_threads);\n            //CHECK_MESSAGE( ( all_touches[n] == true), \"value not seen by any thread\\n\" );\n        }\n        delete [] all_touches;\n        return true;\n    }\n\n};\n\ntemplate< typename T >\nstruct parallel_gets : utils::NoAssign {\n\n    tbb::flow::sequencer_node<T> &my_q;\n    int my_num_threads;\n    touches<T> &my_touches;\n\n    parallel_gets( tbb::flow::sequencer_node<T> &q, int num_threads, touches<T> &t ) : my_q(q), my_num_threads(num_threads), my_touches(t) {}\n\n    void operator()(int tid) const {\n        for (int j = tid; j < N; j+=my_num_threads) {\n            T v;\n            spin_try_get( my_q, v );\n            my_touches.check( tid, v );\n        }\n    }\n\n};\n\ntemplate< typename T >\nstruct parallel_put_get : utils::NoAssign {\n\n    tbb::flow::sequencer_node<T> &my_s1;\n    tbb::flow::sequencer_node<T> &my_s2;\n    int my_num_threads;\n    std::atomic< int > &my_counter;\n    touches<T> &my_touches;\n\n    parallel_put_get( tbb::flow::sequencer_node<T> &s1, tbb::flow::sequencer_node<T> &s2, int num_threads,\n                      std::atomic<int> &counter, touches<T> &t ) : my_s1(s1), my_s2(s2), my_num_threads(num_threads), my_counter(counter), my_touches(t) {}\n\n    void operator()(int tid) const {\n        int i_start = 0;\n\n        while ( (i_start = my_counter.fetch_add(C)) < N ) {\n            int i_end = ( N < i_start + C ) ? N : i_start + C;\n            for (int i = i_start; i < i_end; ++i) {\n                bool msg = my_s1.try_put( T(i) );\n                CHECK_MESSAGE( msg == true, \"\" );\n            }\n\n            for (int i = i_start; i < i_end; ++i) {\n                T v;\n                spin_try_get( my_s2, v );\n                my_touches.check( tid, v );\n            }\n        }\n    }\n\n};\n\n//\n// Tests\n//\n// multiple parallel senders, multiple receivers, properly sequenced (relative to receiver) at output\n// chained sequencers, multiple parallel senders, multiple receivers, properly sequenced (relative to receiver) at output\n//\n\ntemplate< typename T >\nint test_parallel(int num_threads) {\n    tbb::flow::graph g;\n\n    tbb::flow::sequencer_node<T> s(g, seq_inspector<T>());\n    utils::NativeParallelFor( num_threads, parallel_puts<T>(s, num_threads) );\n    {\n        touches<T> t( num_threads );\n        utils::NativeParallelFor( num_threads, parallel_gets<T>(s, num_threads, t) );\n        g.wait_for_all();\n        CHECK_MESSAGE( t.validate_touches(), \"\" );\n    }\n    T bogus_value(-1);\n    T j = bogus_value;\n    CHECK_MESSAGE( s.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n    g.wait_for_all();\n\n    tbb::flow::sequencer_node<T> s1(g, seq_inspector<T>());\n    tbb::flow::sequencer_node<T> s2(g, seq_inspector<T>());\n    tbb::flow::sequencer_node<T> s3(g, seq_inspector<T>());\n    tbb::flow::make_edge( s1, s2 );\n    tbb::flow::make_edge( s2, s3 );\n\n    {\n        touches<T> t( num_threads );\n        std::atomic<int> counter;\n        counter = 0;\n        utils::NativeParallelFor( num_threads, parallel_put_get<T>(s1, s3, num_threads, counter, t) );\n        g.wait_for_all();\n        t.validate_touches();\n    }\n    g.wait_for_all();\n    CHECK_MESSAGE( s1.try_get( j ) == false, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( s2.try_get( j ) == false, \"\" );\n    g.wait_for_all();\n    CHECK_MESSAGE( s3.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    // test copy constructor\n    tbb::flow::sequencer_node<T> s_copy(s);\n    utils::NativeParallelFor( num_threads, parallel_puts<T>(s_copy, num_threads) );\n    for (int i = 0; i < N; ++i) {\n        j = bogus_value;\n        spin_try_get( s_copy, j );\n        CHECK_MESSAGE( i == j, \"\" );\n    }\n    j = bogus_value;\n    g.wait_for_all();\n    CHECK_MESSAGE( s_copy.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    return 0;\n}\n\n\n//\n// Tests\n//\n// No predecessors can be registered\n// Request from empty buffer fails\n// In-order puts, single sender, single receiver, properly sequenced at output\n// Reverse-order puts, single sender, single receiver, properly sequenced at output\n// Chained sequencers (3), in-order and reverse-order tests, properly sequenced at output\n//\n\ntemplate< typename T >\nint test_serial() {\n    tbb::flow::graph g;\n    T bogus_value(-1);\n\n    tbb::flow::sequencer_node<T> s(g, seq_inspector<T>());\n    tbb::flow::sequencer_node<T> s2(g, seq_inspector<T>());\n    T j = bogus_value;\n\n    //\n    // Rejects attempts to add / remove predecessor\n    // Rejects request from empty Q\n    //\n    CHECK_MESSAGE( register_predecessor( s, s2 ) == false, \"\" );\n    CHECK_MESSAGE( remove_predecessor( s, s2 ) == false, \"\" );\n    CHECK_MESSAGE( s.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    //\n    // In-order simple puts and gets\n    //\n\n    for (int i = 0; i < N; ++i) {\n        bool msg = s.try_put( T(i) );\n        CHECK_MESSAGE( msg == true, \"\" );\n        CHECK_MESSAGE(!s.try_put( T(i) ), \"\");  // second attempt to put should reject\n    }\n\n\n    for (int i = 0; i < N; ++i) {\n        j = bogus_value;\n        CHECK_MESSAGE(wait_try_get( g, s, j ) == true, \"\");\n        CHECK_MESSAGE( i == j, \"\" );\n        CHECK_MESSAGE(!s.try_put( T(i) ),\"\" );  // after retrieving value, subsequent put should fail\n    }\n    j = bogus_value;\n    g.wait_for_all();\n    CHECK_MESSAGE( s.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    //\n    // Reverse-order simple puts and gets\n    //\n\n    for (int i = N-1; i >= 0; --i) {\n        bool msg = s2.try_put( T(i) );\n        CHECK_MESSAGE( msg == true, \"\" );\n    }\n\n    for (int i = 0; i < N; ++i) {\n        j = bogus_value;\n        CHECK_MESSAGE(wait_try_get( g, s2, j ) == true, \"\");\n        CHECK_MESSAGE( i == j, \"\" );\n    }\n    j = bogus_value;\n    g.wait_for_all();\n    CHECK_MESSAGE( s2.try_get( j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    //\n    // Chained in-order simple puts and gets\n    //\n\n    tbb::flow::sequencer_node<T> s3(g, seq_inspector<T>());\n    tbb::flow::sequencer_node<T> s4(g, seq_inspector<T>());\n    tbb::flow::sequencer_node<T> s5(g, seq_inspector<T>());\n    tbb::flow::make_edge( s3, s4 );\n    tbb::flow::make_edge( s4, s5 );\n\n    for (int i = 0; i < N; ++i) {\n        bool msg = s3.try_put( T(i) );\n        CHECK_MESSAGE( msg == true, \"\" );\n    }\n\n    for (int i = 0; i < N; ++i) {\n        j = bogus_value;\n        CHECK_MESSAGE(wait_try_get( g, s5, j ) == true, \"\");\n        CHECK_MESSAGE( i == j, \"\" );\n    }\n    j = bogus_value;\n    CHECK_MESSAGE( wait_try_get( g, s3, j ) == false, \"\" );\n    CHECK_MESSAGE( wait_try_get( g, s4, j ) == false, \"\" );\n    CHECK_MESSAGE( wait_try_get( g, s5, j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    g.wait_for_all();\n    tbb::flow::remove_edge( s3, s4 );\n    CHECK_MESSAGE( s3.try_put( N ) == true, \"\" );\n    CHECK_MESSAGE( wait_try_get( g, s4, j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n    CHECK_MESSAGE( wait_try_get( g, s5, j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n    CHECK_MESSAGE( wait_try_get( g, s3, j ) == true, \"\" );\n    CHECK_MESSAGE( j == N, \"\" );\n\n    //\n    // Chained reverse-order simple puts and gets\n    //\n\n    tbb::flow::sequencer_node<T> s6(g, seq_inspector<T>());\n    tbb::flow::sequencer_node<T> s7(g, seq_inspector<T>());\n    tbb::flow::sequencer_node<T> s8(g, seq_inspector<T>());\n    tbb::flow::make_edge( s6, s7 );\n    tbb::flow::make_edge( s7, s8 );\n\n    for (int i = N-1; i >= 0; --i) {\n        bool msg = s6.try_put( T(i) );\n        CHECK_MESSAGE( msg == true, \"\" );\n    }\n\n    for (int i = 0; i < N; ++i) {\n        j = bogus_value;\n        CHECK_MESSAGE( wait_try_get( g, s8, j ) == true, \"\" );\n        CHECK_MESSAGE( i == j, \"\" );\n    }\n    j = bogus_value;\n    CHECK_MESSAGE( wait_try_get( g, s6, j ) == false, \"\" );\n    CHECK_MESSAGE( wait_try_get( g, s7, j ) == false, \"\" );\n    CHECK_MESSAGE( wait_try_get( g, s8, j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n\n    g.wait_for_all();\n    tbb::flow::remove_edge( s6, s7 );\n    CHECK_MESSAGE( s6.try_put( N ) == true, \"\" );\n    CHECK_MESSAGE( wait_try_get( g, s7, j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n    CHECK_MESSAGE( wait_try_get( g, s8, j ) == false, \"\" );\n    CHECK_MESSAGE( j == bogus_value, \"\" );\n    CHECK_MESSAGE( wait_try_get( g, s6, j ) == true, \"\" );\n    CHECK_MESSAGE( j == N, \"\" );\n\n    return 0;\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n#include <array>\n#include <vector>\nvoid test_follows_and_precedes_api() {\n    std::array<int, 3> messages_for_follows = { {0, 1, 2} };\n    std::vector<int> messages_for_precedes = {0, 1, 2};\n\n    follows_and_precedes_testing::test_follows\n        <int, tbb::flow::sequencer_node<int>>\n        (messages_for_follows, [](const int& i) -> std::size_t { return i; });\n\n    follows_and_precedes_testing::test_precedes\n        <int, tbb::flow::sequencer_node<int>>\n        (messages_for_precedes, [](const int& i) -> std::size_t { return i; });\n}\n#endif\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\ntemplate <typename Body>\nvoid test_deduction_guides_common(Body body) {\n    using namespace tbb::flow;\n    graph g;\n    broadcast_node<int> br(g);\n\n    sequencer_node s1(g, body);\n    static_assert(std::is_same_v<decltype(s1), sequencer_node<int>>);\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    sequencer_node s2(follows(br), body);\n    static_assert(std::is_same_v<decltype(s2), sequencer_node<int>>);\n#endif\n\n    sequencer_node s3(s1);\n    static_assert(std::is_same_v<decltype(s3), sequencer_node<int>>);\n}\n\nstd::size_t sequencer_body_f(const int&) { return 1; }\n\nvoid test_deduction_guides() {\n    test_deduction_guides_common([](const int&)->std::size_t { return 1; });\n    test_deduction_guides_common([](const int&) mutable ->std::size_t { return 1; });\n    test_deduction_guides_common(sequencer_body_f);\n}\n#endif\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\nvoid test_seq_node_try_put_and_wait() {\n    using namespace test_try_put_and_wait;\n\n    std::vector<int> start_work_items;\n    std::vector<int> new_work_items;\n    int wait_message = 10;\n\n    for (int i = 0; i < wait_message; ++i) {\n        start_work_items.emplace_back(i);\n        new_work_items.emplace_back(i + 1 + wait_message);\n    }\n\n    auto simple_sequencer = [](int item) { return item; };\n\n    // Test push\n    // test_buffer_push tests the graph\n    // buffer1 -> function -> buffer2 -> writer\n    //     function is a queueing serial function_node that submits new_work_items once wait_message arrives\n    //     writer is an unlimited function_node that writes an item into the processed_items vector\n    // Test steps\n    //     1. push start_work_items into the buffer1\n    //     2. buffer1.try_put_and_wait(wait_message);\n    //     3. g.wait_for_all()\n    // test_buffer_push returns the index from which the items processed during wait_for_all() starts\n    {\n        std::vector<int> processed_items;\n\n        std::size_t after_start = test_buffer_push<tbb::flow::sequencer_node<int>>(start_work_items, wait_message,\n                                                                                   new_work_items, processed_items,\n                                                                                   simple_sequencer);\n\n        // Expected effect:\n        // During buffer1.try_put_and_wait()\n        //     1. start_work_items would be pushed to buffer1\n        //     2. wait_message would be pushed to buffer1\n        //     3. forward_task on buffer1 would transfer all of the items to the function_node in sequencer order (FIFO)\n        //     4. the first item would occupy concurrency of function, other items would be pushed to the queue\n        //     5. function would process start_work_items and push them to the buffer2\n        //     6. wait_message would be processed last and add new_work_items to buffer1\n        //     7. forward_task on buffer2 would transfer start_work_items in sequencer (FIFO) order and the wait_message to the writer\n        //     8.  try_put_and_wait exits since wait_message is completed\n        // During g.wait_for_all()\n        //     10. forward_task for new_work_items in buffer1 would be spawned and put items in function in FIFO order\n        //     11. function_node would process and push forward items from the queue in FIFO order\n        // Expected items processing - { start_work_items FIFO, wait_message, new_work_items FIFO }\n\n        std::size_t check_index = 0;\n        CHECK_MESSAGE(after_start == start_work_items.size() + 1,\n                      \"try_put_and_wait should process start_work_items and the wait_message\");\n        for (auto item : start_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item,\n                          \"try_put_and_wait should process start_work_items FIFO\");\n        }\n\n        CHECK_MESSAGE(processed_items[check_index++] == wait_message,\n                      \"try_put_and_wait should process wait_message after start_work_items\");\n\n        for (auto item : new_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item,\n                          \"wait_for_all should process new_work_items FIFO\");\n        }\n        CHECK(check_index == processed_items.size());\n    } // Test push\n\n    // Test pull\n    // test_buffer_pull tests the graph\n    // buffer -> function\n    //     function is a rejecting serial function_node that submits new_work_items once wait_message arrives\n    //     and writes the processed item into the processed_items\n    // Test steps\n    //     1. push the occupier message to the function\n    //     2. push start_work_items into the buffer\n    //     3. buffer.try_put_and_wait(wait_message)\n    //     4. g.wait_for_all()\n    // test_buffer_pull returns the index from which the items processed during wait_for_all() starts\n\n    {\n        std::vector<int> processed_items;\n        int occupier = 42;\n\n        std::size_t after_start = test_buffer_pull<tbb::flow::sequencer_node<int>>(start_work_items, wait_message, occupier,\n                                                                                   new_work_items, processed_items,\n                                                                                   simple_sequencer);\n\n        // Expected effect\n        // 0. task for occupier processing would be spawned by the function\n        // During buffer.try_put_and_wait()\n        //     1. start_work_items would be pushed to the buffer\n        //     2. wait_message would be pushed to the buffer\n        //     3. forward_task would try to push items to the function, but would fail\n        //        and set the edge to the pull state\n        //     4. occupier would be processed\n        //     5. items would be taken from the buffer by function in FIFO order\n        //     6. wait_message would be taken last and push new_work_items to the buffer\n        // During wait_for_all()\n        //     7. new_work_items would be taken from the buffer in FIFO order\n        // Expected items processing { occupier, start_work_items FIFO, wait_message, new_work_items FIFO }\n\n        std::size_t check_index = 0;\n\n        CHECK_MESSAGE(after_start == start_work_items.size() + 2,\n                      \"start_work_items, occupier and wait_message should be processed by try_put_and_wait\");\n        CHECK_MESSAGE(processed_items[check_index++] == occupier, \"Unexpected items processing by try_put_and_wait\");\n        for (auto item : start_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item,\n                          \"try_put_and_wait should process start_work_items FIFO\");\n        }\n        CHECK_MESSAGE(processed_items[check_index++] == wait_message, \"Unexpected items processing by try_put_and_wait\");\n\n        for (auto item : new_work_items) {\n            CHECK_MESSAGE(processed_items[check_index++] == item,\n                          \"try_put_and_wait should process new_work_items FIFO\");\n        }\n        CHECK(check_index == processed_items.size());\n    }\n\n    // Test reserve\n    {\n        int thresholds[] = { 1, 2 };\n\n        for (int threshold : thresholds) {\n            std::vector<int> processed_items;\n\n            // test_buffer_reserve tests the following graph\n            // buffer -> limiter -> function\n            //  function is a rejecting serial function_node that puts an item to the decrementer port\n            //  of the limiter inside of the body\n\n            std::size_t after_start = test_buffer_reserve<tbb::flow::sequencer_node<int>>(threshold,\n                start_work_items, wait_message, new_work_items, processed_items, simple_sequencer);\n\n            // Expected effect:\n            // 1. start_work_items would be pushed to the buffer\n            // 2. wait_message_would be pushed to the buffer\n            // 3. forward task of the buffer would push the first message to the limiter node.\n            //    Since the limiter threshold is not reached, it would be directly passed to the function\n            // 4. function would spawn the task for the first message processing\n            // 5. the first would be processed\n            // 6. decrementer.try_put() would be called and the limiter node would\n            //    process all of the items from the buffer using the try_reserve/try_consume/try_release semantics\n            // 7. When the wait_message would be taken from the buffer, the try_put_and_wait would exit\n\n            std::size_t check_index = 0;\n\n            CHECK_MESSAGE(after_start == start_work_items.size() + 1,\n                      \"start_work_items, occupier and wait_message should be processed by try_put_and_wait\");\n            for (auto item : start_work_items) {\n                CHECK_MESSAGE(processed_items[check_index++] == item,\n                            \"try_put_and_wait should process start_work_items FIFO\");\n            }\n            CHECK_MESSAGE(processed_items[check_index++] == wait_message, \"Unexpected items processing by try_put_and_wait\");\n\n            for (auto item : new_work_items) {\n                CHECK_MESSAGE(processed_items[check_index++] == item,\n                            \"try_put_and_wait should process new_work_items FIFO\");\n            }\n            CHECK(check_index == processed_items.size());\n        }\n    }\n}\n#endif // __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n\n//! Test sequencer with various request orders and parallelism levels\n//! \\brief \\ref requirement \\ref error_guessing\nTEST_CASE(\"Serial and parallel test\"){\n    for (int p = 2; p <= 4; ++p) {\n        tbb::global_control thread_limit(tbb::global_control::max_allowed_parallelism, p);\n        tbb::task_arena arena(p);\n        arena.execute(\n            [&]() {\n                test_serial<int>();\n                test_parallel<int>(p);\n            }\n        );\n\t}\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n//! Test decution guides\n//! \\brief \\ref requirement\nTEST_CASE(\"Test follows and precedes API\"){\n    test_follows_and_precedes_api();\n}\n#endif\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Test decution guides\n//! \\brief \\ref requirement\nTEST_CASE(\"Test deduction guides\"){\n    test_deduction_guides();\n}\n#endif\n\n#if __TBB_CPP20_CONCEPTS_PRESENT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"constraints for sequencer_node object\") {\n    struct Object : test_concepts::Copyable, test_concepts::CopyAssignable {};\n\n    static_assert(utils::well_formed_instantiation<tbb::flow::sequencer_node, Object>);\n    static_assert(utils::well_formed_instantiation<tbb::flow::sequencer_node, int>);\n    static_assert(!utils::well_formed_instantiation<tbb::flow::sequencer_node, test_concepts::NonCopyable>);\n    static_assert(!utils::well_formed_instantiation<tbb::flow::sequencer_node, test_concepts::NonCopyAssignable>);\n}\n\ntemplate <typename T, typename Sequencer>\nconcept can_call_sequencer_node_ctor = requires( tbb::flow::graph& graph, Sequencer seq,\n                                                 tbb::flow::buffer_node<int>& f ) {\n    tbb::flow::sequencer_node<T>(graph, seq);\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    tbb::flow::sequencer_node<T>(tbb::flow::follows(f), seq);\n#endif\n};\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"constraints for sequencer_node sequencer\") {\n    using type = int;\n    using namespace test_concepts::sequencer;\n\n    static_assert(can_call_sequencer_node_ctor<type, Correct<type>>);\n    static_assert(!can_call_sequencer_node_ctor<type, NonCopyable<type>>);\n    static_assert(!can_call_sequencer_node_ctor<type, NonDestructible<type>>);\n    static_assert(!can_call_sequencer_node_ctor<type, NoOperatorRoundBrackets<type>>);\n    static_assert(!can_call_sequencer_node_ctor<type, WrongInputOperatorRoundBrackets<type>>);\n    static_assert(!can_call_sequencer_node_ctor<type, WrongReturnOperatorRoundBrackets<type>>);\n}\n#endif // __TBB_CPP20_CONCEPTS_PRESENT\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test sequencer_node try_put_and_wait\") {\n    test_seq_node_try_put_and_wait();\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_split_node.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/config.h\"\n\n#include \"tbb/flow_graph.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_assert.h\"\n#include \"common/graph_utils.h\"\n\n\n//! \\file test_split_node.cpp\n//! \\brief Test for [flow_graph.split_node] specification\n\n\n#if defined(_MSC_VER) && _MSC_VER < 1600\n    #pragma warning (disable : 4503) //disabling the \"decorated name length exceeded\" warning for VS2008 and earlier\n#endif\n\n//\n// Tests\n//\n\nconst int Count = 300;\nconst int MaxPorts = 10;\nconst int MaxNInputs = 5; // max # of input_nodes to register for each split_node input in parallel test\n\nstd::vector<bool> flags;   // for checking output\n\ntemplate<typename T>\nclass name_of {\npublic:\n    static const char* name() { return  \"Unknown\"; }\n};\ntemplate<>\nclass name_of<int> {\npublic:\n    static const char* name() { return  \"int\"; }\n};\ntemplate<>\nclass name_of<float> {\npublic:\n    static const char* name() { return  \"float\"; }\n};\ntemplate<>\nclass name_of<double> {\npublic:\n    static const char* name() { return  \"double\"; }\n};\ntemplate<>\nclass name_of<long> {\npublic:\n    static const char* name() { return  \"long\"; }\n};\ntemplate<>\nclass name_of<short> {\npublic:\n    static const char* name() { return  \"short\"; }\n};\n\n// T must be arithmetic, and shouldn't wrap around for reasonable sizes of Count (which is now 150, and maxPorts is 10,\n// so the max number generated right now is 1500 or so.)  Input will generate a series of TT with value\n// (init_val + (i-1)*addend) * my_mult, where i is the i-th invocation of the body.  We are attaching addend\n// input nodes to a join_port, and each will generate part of the numerical series the port is expecting\n// to receive.  If there is only one input node, the series order will be maintained; if more than one,\n// this is not guaranteed.\n\ntemplate<int N>\nstruct tuple_helper {\n    template<typename TupleType>\n    static void set_element( TupleType &t, int i) {\n        std::get<N-1>(t) = (typename std::tuple_element<N-1,TupleType>::type)(i * (N+1));\n        tuple_helper<N-1>::set_element(t, i);\n    }\n};\n\ntemplate<>\nstruct tuple_helper<1> {\n    template<typename TupleType>\n    static void set_element(TupleType &t, int i) {\n        std::get<0>(t) = (typename std::tuple_element<0,TupleType>::type)(i * 2);\n    }\n};\n\n// if we start N input_bodys they will all have the addend N, and my_count should be initialized to 0 .. N-1.\n// the output tuples should have all the sequence, but the order will in general vary.\ntemplate<typename TupleType>\nclass my_input_body {\n    typedef TupleType TT;\n    static const int N = std::tuple_size<TT>::value;\n    int my_count;\n    int addend;\npublic:\n    my_input_body(int init_val, int addto) : my_count(init_val), addend(addto) { }\n    TT operator()( tbb::flow_control &fc) {\n        if(my_count >= Count){\n            fc.stop();\n            return TT();\n        }\n        TT v;\n        tuple_helper<N>::set_element(v, my_count);\n        my_count += addend;\n        return v;\n    }\n};\n\n// allocator for split_node.\n\ntemplate<int N, typename SType>\nclass makeSplit {\npublic:\n    static SType *create(tbb::flow::graph& g) {\n        SType *temp = new SType(g);\n        return temp;\n    }\n    static void destroy(SType *p) { delete p; }\n};\n\n// holder for sink_node pointers for eventual deletion\n\nstatic void* all_sink_nodes[MaxPorts];\n\n\ntemplate<int ELEM, typename SType>\nclass sink_node_helper {\npublic:\n    typedef typename SType::input_type TT;\n    typedef typename std::tuple_element<ELEM-1,TT>::type IT;\n    typedef typename tbb::flow::queue_node<IT> my_sink_node_type;\n    static void print_parallel_remark() {\n        sink_node_helper<ELEM-1,SType>::print_parallel_remark();\n        INFO(\", \" << name_of<IT>::name());\n    }\n    static void print_serial_remark() {\n        sink_node_helper<ELEM-1,SType>::print_serial_remark();\n        INFO(\", \" << name_of<IT>::name());\n    }\n    static void add_sink_nodes(SType &my_split, tbb::flow::graph &g) {\n        my_sink_node_type *new_node = new my_sink_node_type(g);\n        tbb::flow::make_edge( tbb::flow::output_port<ELEM-1>(my_split) , *new_node);\n        all_sink_nodes[ELEM-1] = (void *)new_node;\n        sink_node_helper<ELEM-1, SType>::add_sink_nodes(my_split, g);\n    }\n\n    static void check_sink_values() {\n        my_sink_node_type *dp = reinterpret_cast<my_sink_node_type *>(all_sink_nodes[ELEM-1]);\n        for(int i = 0; i < Count; ++i) {\n            IT v{};\n            CHECK_MESSAGE(dp->try_get(v), \"\");\n            flags[((int)v) / (ELEM+1)] = true;\n        }\n        for(int i = 0; i < Count; ++i) {\n            CHECK_MESSAGE(flags[i], \"\");\n            flags[i] = false;  // reset for next test\n        }\n        sink_node_helper<ELEM-1,SType>::check_sink_values();\n    }\n    static void remove_sink_nodes(SType& my_split) {\n        my_sink_node_type *dp = reinterpret_cast<my_sink_node_type *>(all_sink_nodes[ELEM-1]);\n        tbb::flow::remove_edge( tbb::flow::output_port<ELEM-1>(my_split) , *dp);\n        delete dp;\n        sink_node_helper<ELEM-1, SType>::remove_sink_nodes(my_split);\n    }\n};\n\ntemplate<typename SType>\nclass sink_node_helper<1, SType> {\n    typedef typename SType::input_type TT;\n    typedef typename std::tuple_element<0,TT>::type IT;\n    typedef typename tbb::flow::queue_node<IT> my_sink_node_type;\npublic:\n    static void print_parallel_remark() {\n        INFO(\"Parallel test of split_node< \" << name_of<IT>::name());\n    }\n    static void print_serial_remark() {\n        INFO(\"Serial test of split_node< \" << name_of<IT>::name());\n    }\n    static void add_sink_nodes(SType &my_split, tbb::flow::graph &g) {\n        my_sink_node_type *new_node = new my_sink_node_type(g);\n        tbb::flow::make_edge( tbb::flow::output_port<0>(my_split) , *new_node);\n        all_sink_nodes[0] = (void *)new_node;\n    }\n    static void check_sink_values() {\n        my_sink_node_type *dp = reinterpret_cast<my_sink_node_type *>(all_sink_nodes[0]);\n        for(int i = 0; i < Count; ++i) {\n            IT v{};\n            CHECK_MESSAGE(dp->try_get(v), \"\");\n            flags[((int)v) / 2] = true;\n        }\n        for(int i = 0; i < Count; ++i) {\n            CHECK_MESSAGE(flags[i], \"\");\n            flags[i] = false;  // reset for next test\n        }\n    }\n    static void remove_sink_nodes(SType& my_split) {\n        my_sink_node_type *dp = reinterpret_cast<my_sink_node_type *>(all_sink_nodes[0]);\n        tbb::flow::remove_edge( tbb::flow::output_port<0>(my_split) , *dp);\n        delete dp;\n    }\n};\n\n// parallel_test: create input_nodes that feed tuples into the split node\n//    and queue_nodes that receive the output.\ntemplate<typename SType>\nclass parallel_test {\npublic:\n    typedef typename SType::input_type TType;\n    typedef tbb::flow::input_node<TType> input_type;\n    static const int N = std::tuple_size<TType>::value;\n\n    static void test() {\n        input_type* all_input_nodes[MaxNInputs];\n        sink_node_helper<N,SType>::print_parallel_remark();\n        INFO(\" >\\n\");\n        for(int i=0; i < MaxPorts; ++i) {\n            all_sink_nodes[i] = nullptr;\n        }\n        // try test for # inputs 1 .. MaxNInputs\n        for(int nInputs = 1; nInputs <= MaxNInputs; ++nInputs) {\n            tbb::flow::graph g;\n            SType* my_split = makeSplit<N,SType>::create(g);\n\n            // add sinks first so when inputs start spitting out values they are there to catch them\n            sink_node_helper<N, SType>::add_sink_nodes((*my_split), g);\n\n            // now create nInputs input_nodes, each spitting out i, i+nInputs, i+2*nInputs ...\n            // each element of the tuple is i*(n+1), where n is the tuple element index (1-N)\n            for(int i = 0; i < nInputs; ++i) {\n                // create input node\n                input_type *s = new input_type(g, my_input_body<TType>(i, nInputs) );\n                tbb::flow::make_edge(*s, *my_split);\n                all_input_nodes[i] = s;\n                s->activate();\n            }\n\n            g.wait_for_all();\n\n            // check that we got Count values in each output queue, and all the index values\n            // are there.\n            sink_node_helper<N, SType>::check_sink_values();\n\n            sink_node_helper<N, SType>::remove_sink_nodes(*my_split);\n            for(int i = 0; i < nInputs; ++i) {\n                delete all_input_nodes[i];\n            }\n            makeSplit<N,SType>::destroy(my_split);\n        }\n    }\n};\n\n//\n// Single predecessor, single accepting successor at each port\n\ntemplate<typename SType>\nvoid test_one_serial( SType &my_split, tbb::flow::graph &g) {\n    typedef typename SType::input_type TType;\n    static const int TUPLE_SIZE = std::tuple_size<TType>::value;\n    sink_node_helper<TUPLE_SIZE, SType>::add_sink_nodes(my_split,g);\n    typedef TType q3_input_type;\n    tbb::flow::queue_node< q3_input_type >  q3(g);\n\n    tbb::flow::make_edge( q3, my_split );\n\n    // fill the  queue with its value one-at-a-time\n    flags.clear();\n    for (int i = 0; i < Count; ++i ) {\n        TType v;\n        tuple_helper<TUPLE_SIZE>::set_element(v, i);\n        CHECK_MESSAGE(my_split.try_put(v), \"\");\n        flags.push_back(false);\n    }\n\n    g.wait_for_all();\n\n    sink_node_helper<TUPLE_SIZE,SType>::check_sink_values();\n\n    sink_node_helper<TUPLE_SIZE, SType>::remove_sink_nodes(my_split);\n\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\nvoid test_follows_and_precedes_api() {\n    using namespace tbb::flow;\n    using msg_t = std::tuple<int, float, double>;\n\n    graph g;\n\n    function_node<msg_t, msg_t> f1(g, unlimited, [](msg_t msg) { return msg; } );\n    auto f2(f1);\n    auto f3(f1);\n\n    std::atomic<int> body_calls;\n    body_calls = 0;\n\n    function_node<int, int> f4(g, unlimited, [&](int val) { ++body_calls; return val; } );\n    function_node<float, float> f5(g, unlimited, [&](float val) { ++body_calls; return val; } );\n    function_node<double, double> f6(g, unlimited, [&](double val) { ++body_calls; return val; } );\n\n    split_node<msg_t> following_node(follows(f1, f2, f3));\n    make_edge(output_port<0>(following_node), f4);\n    make_edge(output_port<1>(following_node), f5);\n    make_edge(output_port<2>(following_node), f6);\n\n    split_node<msg_t> preceding_node(precedes(f4, f5, f6));\n    make_edge(f1, preceding_node);\n    make_edge(f2, preceding_node);\n    make_edge(f3, preceding_node);\n\n    msg_t msg(1, 2.2f, 3.3);\n    f1.try_put(msg);\n    f2.try_put(msg);\n    f3.try_put(msg);\n\n    g.wait_for_all();\n\n    // <number of try puts> * <number of splits by a input node> * <number of input nodes>\n    CHECK_MESSAGE( ((body_calls == 3*3*2)), \"Not exact edge quantity was made\");\n}\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n\ntemplate<typename SType>\nclass serial_test {\n    typedef typename SType::input_type TType;\n    static const int TUPLE_SIZE = std::tuple_size<TType>::value;\n    static const int ELEMS = 3;\npublic:\nstatic void test() {\n    tbb::flow::graph g;\n    flags.reserve(Count);\n    SType* my_split = makeSplit<TUPLE_SIZE,SType>::create(g);\n    sink_node_helper<TUPLE_SIZE, SType>::print_serial_remark(); INFO(\" >\\n\");\n\n    test_output_ports_return_ref(*my_split);\n\n    test_one_serial<SType>(*my_split, g);\n    // build the vector with copy construction from the used split node.\n    std::vector<SType>split_vector(ELEMS, *my_split);\n    // destroy the tired old split_node in case we're accidentally reusing pieces of it.\n    makeSplit<TUPLE_SIZE,SType>::destroy(my_split);\n\n\n    for(int e = 0; e < ELEMS; ++e) {  // exercise each of the vector elements\n        test_one_serial<SType>(split_vector[e], g);\n    }\n}\n\n}; // serial_test\n\ntemplate<\n      template<typename> class TestType,  // serial_test or parallel_test\n      typename TupleType >                               // type of the input of the split\nstruct generate_test {\n    typedef tbb::flow::split_node<TupleType> split_node_type;\n    static void do_test() {\n        TestType<split_node_type>::test();\n    }\n}; // generate_test\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n\nvoid test_deduction_guides() {\n    using namespace tbb::flow;\n    using tuple_type = std::tuple<int, int>;\n\n    graph g;\n    split_node<tuple_type> s0(g);\n\n    split_node s1(s0);\n    static_assert(std::is_same_v<decltype(s1), split_node<tuple_type>>);\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    broadcast_node<tuple_type> b1(g), b2(g);\n    broadcast_node<int> b3(g), b4(g);\n\n    split_node s2(follows(b1, b2));\n    static_assert(std::is_same_v<decltype(s2), split_node<tuple_type>>);\n\n    split_node s3(precedes(b3, b4));\n    static_assert(std::is_same_v<decltype(s3), split_node<tuple_type>>);\n#endif\n}\n\n#endif\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\nvoid test_try_put_and_wait() {\n    tbb::task_arena arena(1);\n\n    arena.execute([] {\n        tbb::flow::graph g;\n\n        std::vector<int> start_work_items;\n        std::vector<int> processed_items1;\n        std::vector<int> processed_items2;\n        std::vector<int> new_work_items;\n        int wait_message = 10;\n\n        for (int i = 0; i < wait_message; ++i) {\n            start_work_items.emplace_back(i);\n            new_work_items.emplace_back(i + 1 + wait_message);\n        }\n\n        using tuple_type = std::tuple<int, int>;\n        tbb::flow::split_node<tuple_type> split(g);\n\n        tbb::flow::function_node<int, int> function1(g, tbb::flow::unlimited,\n            [&](int input) noexcept {\n                if (input == wait_message) {\n                    for (int item : new_work_items) {\n                        split.try_put(tuple_type{item, item});\n                    }\n                }\n                processed_items1.emplace_back(input);\n                return 0;\n            });\n\n        tbb::flow::function_node<int, int> function2(g, tbb::flow::unlimited,\n            [&](int input) noexcept {\n                processed_items2.emplace_back(input);\n                return 0;\n            });\n\n        tbb::flow::make_edge(tbb::flow::output_port<0>(split), function1);\n        tbb::flow::make_edge(tbb::flow::output_port<1>(split), function2);\n\n        for (int i = 0; i < wait_message; ++i) {\n            split.try_put(tuple_type{i, i});\n        }\n\n        split.try_put_and_wait(tuple_type{wait_message, wait_message});\n\n        std::size_t check_index1 = 0;\n        std::size_t check_index2 = 0;\n\n        // Since split node broadcasts items to successors from last to first, start_work_items tasks and wait_message would be spawned\n        // in the following order {f2 - 1} - {f1 - 1} {f2 - 2} {f1 - 2} ... {f2 - 10}{f1 - 10}\n        // and processed in reversed order\n        // Hence {f1 - wait_message} task would be processed first and it would spawn tasks for new_work_items in the same order\n        // Since new_work_items tasks would processed first and {f2 - 10} would be still in queue\n        // it is expected that during the try_put_and_wait {f1 - 10} would be processed first, then new_work_items would be processed\n        // and only when {f2 - 10} would be taken and executed, try_put_and_wait would be exitted\n        // All of the other tasks for start_work_items would be processed during wait_for_all()\n        CHECK_MESSAGE(processed_items1[check_index1++] == wait_message, \"Unexpected items processing\");\n\n        for (std::size_t i = new_work_items.size(); i != 0; --i) {\n            CHECK_MESSAGE(processed_items1[check_index1++] == new_work_items[i - 1], \"Unexpected items processing\");\n            CHECK_MESSAGE(processed_items2[check_index2++] == new_work_items[i - 1], \"Unexpected items processing\");\n        }\n\n        CHECK_MESSAGE(processed_items2[check_index2++] == wait_message, \"Unexpected items processing\");\n\n        g.wait_for_all();\n\n        for (std::size_t i = start_work_items.size(); i != 0; --i) {\n            CHECK_MESSAGE(processed_items1[check_index1++] == start_work_items[i - 1], \"Unexpected items processing\");\n            CHECK_MESSAGE(processed_items2[check_index2++] == start_work_items[i - 1], \"Unexpected items processing\");\n        }\n    });\n}\n#endif // __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n\n//! Test output ports and message passing with different input tuples\n//! \\brief \\ref requirement \\ref error_guessing\nTEST_CASE(\"Tuple tests\"){\n    for (int p = 0; p < 2; ++p) {\n        generate_test<serial_test, std::tuple<float, double> >::do_test();\n#if MAX_TUPLE_TEST_SIZE >= 4\n        generate_test<serial_test, std::tuple<float, double, int, long> >::do_test();\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 6\n        generate_test<serial_test, std::tuple<double, double, int, long, int, short> >::do_test();\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 8\n        generate_test<serial_test, std::tuple<float, double, double, double, float, int, float, long> >::do_test();\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 10\n        generate_test<serial_test, std::tuple<float, double, int, double, double, float, long, int, float, long> >::do_test();\n#endif\n        generate_test<parallel_test, std::tuple<float, double> >::do_test();\n#if MAX_TUPLE_TEST_SIZE >= 3\n        generate_test<parallel_test, std::tuple<float, int, long> >::do_test();\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 5\n        generate_test<parallel_test, std::tuple<double, double, int, int, short> >::do_test();\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 7\n        generate_test<parallel_test, std::tuple<float, int, double, float, long, float, long> >::do_test();\n#endif\n#if MAX_TUPLE_TEST_SIZE >= 9\n        generate_test<parallel_test, std::tuple<float, double, int, double, double, long, int, float, long> >::do_test();\n#endif\n    }\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n//! Test decution guides\n//! \\brief \\ref requirement\nTEST_CASE(\"Test follows and precedes API\"){\n    test_follows_and_precedes_api();\n}\n#endif\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Test decution guides\n//! \\brief \\ref requirement\nTEST_CASE(\"Deduction guides\"){\n    test_deduction_guides();\n}\n#endif\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test split_node try_put_and_wait\") {\n    test_try_put_and_wait();\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_tagged_msg.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n\n#define _VARIADIC_MAX 10   // Visual Studio 2012\n#include \"common/config.h\"\n\n#include \"tbb/flow_graph.h\"\n\n#include \"common/test.h\"\n#include \"common/checktype.h\"\n\n#include <cstdio>\n#include <atomic>\n#include <tuple>\n#include <stdexcept>\n#include <vector>\n\n\n//! \\file test_tagged_msg.cpp\n//! \\brief Test for [flow_graph.tagged_msg] specification\n\n\n// given a tuple, return the type of the element that has the maximum alignment requirement.\n// Given a tuple and that type, return the number of elements of the object with the max\n// alignment requirement that is at least as big as the largest object in the tuple.\n\nusing std::tuple_element;\nusing std::tuple_size;\nusing tbb::flow::cast_to;\nusing tbb::flow::is_a;\n\ntypedef int *int_ptr;\ntypedef char odd_array_type[15];\ntypedef char odder_array[17];\ntypedef CheckType<int> counted_array_type[12];\ntypedef std::vector<double> d_vector;\ntypedef std::vector<int> i_vector;\ntypedef i_vector i_vector_array[2];\ntypedef tbb::flow::tagged_msg<size_t, int, char, double, odd_array_type, odder_array, d_vector, CheckType<int>, counted_array_type, i_vector_array> tagged_msg_type;\n\n// test base of tagged_msg\nvoid TestWrapper() {\n    using tbb::detail::d2::Wrapper;\n    Wrapper<int> wi(42);\n    Wrapper<int> wic(23);\n\n    INFO(\"Value of wic is \" << wic.value() << \"\\n\");\n\n    // pointer-type creation\n    int point_to_me = 23;\n    Wrapper<int_ptr> wip(&point_to_me);\n    CHECK_MESSAGE( (*(wip.value()) == 23), \"Error in wip value\");\n\n    odd_array_type ww;\n    for(int ii = 0; ii < 15; ++ii) { ww[ii] = char('0' + ii); } ww[14] = 0;\n\n    Wrapper<odd_array_type> ci(ww);\n    CHECK_MESSAGE( (!strncmp(ci.value(), ww, 14)), \"odd_array_type ci not properly-constructed\" );\n\n    Wrapper<odd_array_type> ci2(ci);\n\n    CHECK_MESSAGE( (!strncmp(ci2.value(), ww, 14)), \"odd_array_type ci2 not properly-constructed\" );\n\n    d_vector di;\n    di.clear();\n    di.push_back(2.0);\n    Wrapper<d_vector> dvec(di);\n    CHECK_MESSAGE( (dvec.value()[0] == 2.0), \"incorrect value in vector\");\n\n    // test array of non-PODs.\n    i_vector_array oia;\n    oia[0].clear();\n    oia[1].clear();\n    oia[0].push_back(3);\n    oia[1].push_back(2);\n    Wrapper<i_vector_array> ia(oia);\n    CHECK_MESSAGE( ((ia.value()[1])[0] == 2), \"integer vector array element[1] misbehaved\");\n    CHECK_MESSAGE( ((ia.value()[0])[0] == 3), \"integer vector array element[0] misbehaved\");\n    Wrapper<i_vector_array> iac(ia);\n    CHECK_MESSAGE( ((iac.value()[1])[0] == 2), \"integer vector array element[1] misbehaved\");\n    CHECK_MESSAGE( ((iac.value()[0])[0] == 3), \"integer vector array element[0] misbehaved\");\n\n    // counted_array\n    counted_array_type cat_orig;\n    for(int i = 0; i < 12; ++i) cat_orig[i] = i + 1;\n    Wrapper<counted_array_type> cat(cat_orig);\n    for(int j = 0; j < 12; ++j)\n        CHECK_MESSAGE( (1 + j == cat.value()[j]), \"Error in cat array\");\n\n    int i = wi.value();\n    CHECK_MESSAGE( (i == 42), \"Assignment to i failed\");\n    CHECK_MESSAGE( (wi.value() == 42), \"Assignment to wi failed\");\n    double d = wi.value();\n    CHECK_MESSAGE( (d == 42), \"Implicit cast in assign to double failed\");\n    int_ptr ip = wip.value();\n    CHECK_MESSAGE( (ip == &(point_to_me)), \"Error in assignment of pointer\");\n}\n\nvoid RunTests() {\n    tagged_msg_type def;\n    tagged_msg_type i(1,3);\n    CheckType<int>::check_type_counter = 0;\n    int z;\n    #if TBB_USE_EXCEPTIONS\n    try {\n        z = cast_to<int>(def); // disallowed (non-array returning int)\n        CHECK_MESSAGE( (false), \"should not allow cast to int of non-array\");\n    }\n    catch(...) {\n        INFO(\"cast of non-array to int disallowed (okay)\\n\");\n    }\n    #endif\n    z = cast_to<int>(i);\n    CHECK_MESSAGE( (is_a<int>(i)), \"wrong type for i ( == int)\");\n    CHECK_MESSAGE( (!(is_a<double>(i))), \"Wrong type for i ( != double)\");\n    z = 5;\n    z = cast_to<int>(i);\n\n    const int &ref_i(cast_to<int>(i));\n    CHECK_MESSAGE( (ref_i == 3), \"ref_i got wrong value\");\n    tagged_msg_type j(2,4);\n    i = j;\n    CHECK_MESSAGE( (ref_i == 4), \"assign to i did not affect ref_i\");\n\n    CHECK_MESSAGE( ( z == 3), \"Error retrieving value from i\");\n\n    //updating and retrieving tags\n    CHECK_MESSAGE( (j.tag() == 2), \"Error retrieving tag for j\");\n    j.set_tag(10);\n    CHECK_MESSAGE( (j.tag() == 10), \"Error updating tag for j\");\n\n    tbb::flow::tagged_msg<char, int, char, double> k('a', 4);\n    k.set_tag('b');\n    CHECK_MESSAGE( (k.tag() == 'b'), \"Error updating char tag\");\n\n    tagged_msg_type double_tagged_msg(3, 8.0);\n    CHECK_MESSAGE( (is_a<double>(double_tagged_msg)), \"Wrong type for double_tagged_msg (== double)\");\n    CHECK_MESSAGE( (!is_a<char>(double_tagged_msg)), \"Wrong type for double_tagged_msg (!= char)\");\n    CHECK_MESSAGE( (!is_a<int>(double_tagged_msg)), \"Wrong type for double_tagged_msg (!= int)\");\n    tagged_msg_type copytype(double_tagged_msg);\n    CHECK_MESSAGE( (is_a<double>(copytype)), \"Wrong type for double_tagged_msg (== double)\");\n    CHECK_MESSAGE( (!is_a<char>(copytype)), \"Wrong type for double_tagged_msg (!= char)\");\n    CHECK_MESSAGE( (!is_a<int>(copytype)), \"Wrong type for double_tagged_msg (!= int)\");\n    tagged_msg_type default_tagged_msg;\n    CHECK_MESSAGE( (!(is_a<double>(default_tagged_msg))), \"wrong type for default ( != double)\");\n    CHECK_MESSAGE( (!(is_a<int>(default_tagged_msg))), \"wrong type for default ( != int)\");\n    CHECK_MESSAGE( (!(is_a<bool>(default_tagged_msg))), \"wrong type for default ( != bool)\");\n    CheckType<int> c;\n    CHECK_MESSAGE( (CheckType<int>::check_type_counter == 1), \"Incorrect number of CheckType<int>s created\");\n    tagged_msg_type cnt_type(4, c);\n    CHECK_MESSAGE( (CheckType<int>::check_type_counter == 2), \"Incorrect number of CheckType<int>s created\");\n    CHECK_MESSAGE( (is_a<CheckType<int> >(cnt_type)), \"Incorrect type for cnt_type\");\n    cnt_type = default_tagged_msg;\n    CHECK_MESSAGE( (CheckType<int>::check_type_counter == 1), \"Incorrect number of CheckType<int>s after reassignment\");\n    CHECK_MESSAGE( (cnt_type.is_default_constructed()), \"Assigned CheckType<int>s is not default-constructed\");\n    // having problem with init on gcc 3.4.6 (fxeolin16)  constructor for elements of array not called\n    // for this version.\n    // counted_array_type counted_array;\n    CheckType<int> counted_array[12];  // this is okay\n    CHECK_MESSAGE( (CheckType<int>::check_type_counter == 13), \"Incorrect number of CheckType<int>s after counted_array construction\");\n    tagged_msg_type counted_array_tagged_msg(5, counted_array);\n    // the is_a<>() should return exact type matches.\n    CHECK_MESSAGE( (!is_a<CheckType<int> *>(counted_array_tagged_msg)), \"Test of is_a for counted_array_tagged_msg fails\");\n    #if TBB_USE_EXCEPTIONS\n    try {\n        int *iip = cast_to<int *>(counted_array_tagged_msg);\n        CHECK_MESSAGE( (false), \"did not throw on invalid cast\");\n        *iip = 2;  // avoids \"iip set but not used\" warning\n    }\n    catch(std::runtime_error &re) {\n        INFO(\"attempt to cast to invalid type caught \" << re.what() << \"\\n\");\n    }\n    CHECK_MESSAGE( (is_a<counted_array_type>(counted_array_tagged_msg)), \"testing\");\n    const CheckType<int> *ctip = cast_to<counted_array_type>(counted_array_tagged_msg);\n\n    CHECK_MESSAGE( ((int)(*ctip) == 0), \"ctip incorrect\");\n\n    CHECK_MESSAGE( (CheckType<int>::check_type_counter == 25), \"Incorrect number of CheckType<int>s after counted_array_tagged_msg construction\");\n    counted_array_tagged_msg = default_tagged_msg;\n    CHECK_MESSAGE( (CheckType<int>::check_type_counter == 13), \"Incorrect number of CheckType<int>s after counted_array_tagged_msg destruction\");\n    CHECK_MESSAGE( (counted_array_tagged_msg.is_default_constructed()), \"Assigned counted_array_type is not default-constructed\");\n\n    default_tagged_msg = double_tagged_msg;\n    const double my_dval = cast_to<double>(default_tagged_msg);\n    CHECK_MESSAGE( (my_dval == 8.0), \"did not retrieve correct value from assigned default_tagged_msg\");\n\n    {\n        odd_array_type my_b;\n        for(size_t ii=0; ii < 14;++ii) {\n            my_b[ii] = (char)('0' + ii);\n        }\n        my_b[14] = 0;\n        {\n            tagged_msg_type odd_array_tagged_msg(6, my_b);\n            const char *my_copy = cast_to<odd_array_type>(odd_array_tagged_msg);\n            CHECK_MESSAGE( (!strncmp(my_b, my_copy, 14)), \"copied char array not correct value\");\n            default_tagged_msg = odd_array_tagged_msg;\n            try {\n                const char *my_copy2 = cast_to<odd_array_type>(default_tagged_msg);\n                CHECK_MESSAGE( (!strncmp(my_b, my_copy2, 14)), \"char array from default tagged_msg assign not correct value\");\n            }\n            catch(...) {\n                CHECK_MESSAGE( (false), \"Bad cast\");\n            }\n        }\n    }\n\n    CHECK_MESSAGE( (!is_a<double>(i)), \"bad type for i\");\n    try {\n        double y = cast_to<double>(i);\n        // use '&' to force eval of RHS (fixes \"initialized but not referenced\" vs2012 warnings)\n        CHECK_MESSAGE( (false & (0 != y)), \"Error: cast to type in tuple did not get exception\");\n    }\n    catch(std::runtime_error &bc) {\n        CHECK_MESSAGE( (0 == strcmp(bc.what(), \"Illegal tagged_msg cast\")), \"Incorrect std:runtime_error\");\n    }\n    catch(...) {\n        CHECK_MESSAGE( (false & cast_to<int>(i)), \"Error: improper exception thrown\");\n    }\n\n    try {\n        int *ip = cast_to<int *>(i);\n        CHECK_MESSAGE( (false & (nullptr!=ip)), \"Error: non-array cast to pointer type.\");\n    }\n    catch(std::runtime_error &bc) {\n        CHECK_MESSAGE( (0 == strcmp(bc.what(), \"Illegal tagged_msg cast\")), \"Incorrect std:runtime_error\");\n    }\n    catch(...) {\n        CHECK_MESSAGE( (false), \"did not get runtime_error exception in casting non-array to pointer\");\n    }\n\n    try {\n        bool b = cast_to<bool>(i);\n        CHECK_MESSAGE( (false & b), \"Error: cast against type did not get exception\");\n    }\n    catch(std::runtime_error &bc) {\n        CHECK_MESSAGE( (0 == strcmp(bc.what(), \"Illegal tagged_msg cast\")), \"Incorrect std:runtime_error\");\n    }\n    catch(...) {\n        CHECK_MESSAGE( (false), \"did not get runtime_error exception casting to disparate types\");\n    }\n    #endif //TBB_USE_EXCEPTIONS\n}\n\n//! Test tagged_msg for specific types\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test base of tagged_msg\") {\n    TestWrapper();\n    CHECK_MESSAGE( (CheckType<int>::check_type_counter == 0), \"After TestWrapper return not all CheckType<int>s were destroyed\");\n}\n\n//! Test tagged_msg functions and exceptional behavior\n//! \\brief \\ref requirement \\ref error_guessing\nTEST_CASE(\"Test tagged_msg\") {\n    RunTests();\n    CHECK_MESSAGE( (CheckType<int>::check_type_counter == 0), \"After RunTests return not all CheckType<int>s were destroyed\");\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_task.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/dummy_body.h\"\n#include \"common/spin_barrier.h\"\n#include \"common/utils_concurrency_limit.h\"\n#include \"common/cpu_usertime.h\"\n\n#include \"tbb/task.h\"\n#include \"tbb/task_group.h\"\n#include \"tbb/parallel_for.h\"\n#include \"tbb/cache_aligned_allocator.h\"\n#include \"tbb/global_control.h\"\n#include \"tbb/concurrent_vector.h\"\n\n#include <atomic>\n#include <thread>\n#include <deque>\n\n//! \\file test_task.cpp\n//! \\brief Test for [internal] functionality\nstruct EmptyBody {\n    void operator()() const {}\n};\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n// unreachable code\n#pragma warning( push )\n#pragma warning( disable: 4702 )\n#endif\n\ntemplate <typename Body = EmptyBody>\nclass CountingTask : public tbb::detail::d1::task {\npublic:\n    CountingTask( Body body, tbb::detail::d1::wait_context& wait ) : my_body(body), my_wait(wait) {}\n\n    CountingTask( tbb::detail::d1::wait_context& wait ) : my_wait(wait) {}\n\n    task* execute( tbb::detail::d1::execution_data& ) override {\n        ++my_execute_counter;\n        my_body();\n        my_wait.release();\n        return nullptr;\n    }\n\n    task* cancel( tbb::detail::d1::execution_data& ) override {\n        ++my_cancel_counter;\n        my_wait.release();\n        return nullptr;\n    }\n\n    static void reset() {\n        my_execute_counter = 0;\n        my_cancel_counter = 0;\n    }\n\n    static std::size_t execute_counter() { return my_execute_counter; }\n    static std::size_t cancel_counter() { return my_cancel_counter; }\n\nprivate:\n    Body my_body;\n    tbb::detail::d1::wait_context& my_wait;\n\n    static std::atomic<std::size_t> my_execute_counter;\n    static std::atomic<std::size_t> my_cancel_counter;\n}; // struct CountingTask\n\n\n#if _MSC_VER && !defined(__INTEL_COMPILER)\n#pragma warning( pop )\n#endif // warning 4702 is back\n\ntemplate <typename Body>\nstd::atomic<std::size_t> CountingTask<Body>::my_execute_counter(0);\n\ntemplate <typename Body>\nstd::atomic<std::size_t> CountingTask<Body>::my_cancel_counter(0);\n\n#if TBB_USE_EXCEPTIONS\nvoid test_cancellation_on_exception( bool reset_ctx ) {\n    tbb::detail::d1::wait_context wait(1);\n    tbb::task_group_context test_context;\n    auto throw_body = [] {\n        throw 1;\n    };\n    CountingTask<decltype(throw_body)> task(throw_body, wait);\n\n    constexpr std::size_t iter_counter = 1000;\n    for (std::size_t i = 0; i < iter_counter; ++i) {\n        try {\n            tbb::detail::d1::execute_and_wait(task, test_context, wait, test_context);\n        } catch(int ex) {\n            REQUIRE(ex == 1);\n        }\n        if (reset_ctx) {\n            test_context.reset();\n        }\n        wait.reserve(1);\n    }\n    wait.release(1);\n\n    REQUIRE_MESSAGE(task.execute_counter() == (reset_ctx ? iter_counter : 1), \"Some task was not executed\");\n    REQUIRE_MESSAGE(task.cancel_counter() == iter_counter, \"Some task was not canceled after the exception occurs\");\n    task.reset();\n}\n#endif // TBB_USE_EXCEPTIONS\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"External threads sleep\") {\n    if (utils::get_platform_max_threads() < 2) return;\n    utils::SpinBarrier barrier(2);\n\n    tbb::task_group test_gr;\n\n    test_gr.run([&] {\n        barrier.wait();\n        TestCPUUserTime(2);\n    });\n\n    barrier.wait();\n\n    test_gr.wait();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test that task was executed p times\") {\n    tbb::detail::d1::wait_context wait(1);\n    tbb::task_group_context test_context;\n    CountingTask<> test_task(wait);\n\n    constexpr std::size_t iter_counter = 10000;\n    for (std::size_t i = 0; i < iter_counter; ++i) {\n        tbb::detail::d1::execute_and_wait(test_task, test_context, wait, test_context);\n        wait.reserve(1);\n    }\n\n    wait.release(1);\n\n    REQUIRE_MESSAGE(CountingTask<>::execute_counter() == iter_counter, \"The task was not executed necessary times\");\n    REQUIRE_MESSAGE(CountingTask<>::cancel_counter() == 0, \"Some instance of the task was canceled\");\n    CountingTask<>::reset();\n}\n\n#if TBB_USE_EXCEPTIONS\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test cancellation on exception\") {\n    test_cancellation_on_exception(/*reset_ctx = */true);\n    test_cancellation_on_exception(/*reset_ctx = */false);\n}\n#endif // TBB_USE_EXCEPTIONS\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Simple test parallelism usage\") {\n    std::uint32_t threads_num = static_cast<std::uint32_t>(utils::get_platform_max_threads());\n    utils::SpinBarrier barrier(threads_num);\n\n    auto barrier_wait = [&barrier] {\n        barrier.wait();\n    };\n\n    tbb::detail::d1::wait_context wait(threads_num);\n    tbb::detail::d1::task_group_context test_context;\n    using task_type = CountingTask<decltype(barrier_wait)>;\n\n    std::vector<task_type, tbb::cache_aligned_allocator<task_type>> vector_test_task(threads_num, task_type(barrier_wait, wait));\n\n    constexpr std::size_t iter_counter = 100;\n    for (std::size_t i = 0; i < iter_counter; ++i) {\n        for (std::size_t j = 0; j < threads_num; ++j) {\n            tbb::detail::d1::spawn(vector_test_task[j], test_context);\n        }\n        tbb::detail::d1::wait(wait, test_context);\n        wait.reserve(threads_num);\n    }\n    wait.release(threads_num);\n\n    REQUIRE_MESSAGE(task_type::execute_counter() == iter_counter * threads_num, \"Some task was not executed\");\n    REQUIRE_MESSAGE(task_type::cancel_counter() == 0, \"Some task was canceled\");\n    task_type::reset();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test parallelism usage with parallel_for\") {\n    std::uint32_t task_threads_num = static_cast<std::uint32_t>(utils::get_platform_max_threads());\n    utils::SpinBarrier barrier(task_threads_num);\n\n    auto barrier_wait = [&barrier] {\n        barrier.wait();\n    };\n\n    std::size_t pfor_iter_count = 10000;\n    std::atomic<std::size_t> pfor_counter(0);\n\n    auto parallel_for_func = [&pfor_counter, pfor_iter_count] {\n        tbb::parallel_for(tbb::blocked_range<std::size_t>(0, pfor_iter_count),\n                          [&pfor_counter] (tbb::blocked_range<std::size_t>& range) {\n                              for (auto it = range.begin(); it != range.end(); ++it) {\n                                  ++pfor_counter;\n                              }\n                           }\n        );\n    };\n\n    tbb::detail::d1::wait_context wait(task_threads_num);\n    tbb::detail::d1::task_group_context test_context;\n    using task_type = CountingTask<decltype(barrier_wait)>;\n    std::vector<task_type, tbb::cache_aligned_allocator<task_type>> vector_test_task(task_threads_num, task_type(barrier_wait, wait));\n\n    constexpr std::size_t iter_count = 10;\n    constexpr std::size_t pfor_threads_num = 4;\n    for (std::size_t i = 0; i < iter_count; ++i) {\n        std::vector<std::thread> pfor_threads;\n\n        for (std::size_t j = 0; j < task_threads_num; ++j) {\n            tbb::detail::d1::spawn(vector_test_task[j], test_context);\n        }\n\n        for (std::size_t k = 0; k < pfor_threads_num; ++k) {\n            pfor_threads.emplace_back(parallel_for_func);\n        }\n\n        tbb::detail::d1::wait(wait, test_context);\n\n        for (auto& thread : pfor_threads) {\n            if (thread.joinable()) {\n                thread.join();\n            }\n        }\n\n        wait.reserve(task_threads_num);\n    }\n    wait.release(task_threads_num);\n\n    REQUIRE_MESSAGE(task_type::execute_counter() == task_threads_num * iter_count, \"Some task was not executed\");\n    REQUIRE_MESSAGE(task_type::cancel_counter() == 0, \"Some task was canceled\");\n    REQUIRE_MESSAGE(pfor_counter == iter_count * pfor_threads_num * pfor_iter_count, \"Some parallel_for thread was not finished\");\n    task_type::reset();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test parallelism usage with spawn tasks in different threads\") {\n    std::uint32_t threads_num = static_cast<std::uint32_t>(utils::get_platform_max_threads());\n    utils::SpinBarrier barrier(threads_num);\n\n    auto barrier_wait = [&barrier] {\n        barrier.wait();\n    };\n\n    tbb::detail::d1::wait_context wait(threads_num);\n    tbb::detail::d1::task_group_context test_context;\n    using task_type = CountingTask<decltype(barrier_wait)>;\n    std::vector<task_type, tbb::cache_aligned_allocator<task_type>> vector_test_task(threads_num, task_type(barrier_wait, wait));\n\n    auto thread_func = [&vector_test_task, &test_context] ( std::size_t idx ) {\n        tbb::detail::d1::spawn(vector_test_task[idx], test_context);\n    };\n\n    constexpr std::size_t iter_count = 10;\n    for (std::size_t i = 0; i < iter_count; ++i) {\n        std::vector<std::thread> threads;\n\n        for (std::size_t k = 0; k < threads_num - 1; ++k) {\n            threads.emplace_back(thread_func, k);\n        }\n\n        for (auto& thread : threads) {\n            if (thread.joinable()) {\n                thread.join();\n            }\n        }\n\n        tbb::detail::d1::execute_and_wait(vector_test_task[threads_num - 1], test_context, wait, test_context);\n        wait.reserve(threads_num);\n    }\n    wait.release(threads_num);\n\n    REQUIRE_MESSAGE(task_type::execute_counter() == iter_count * threads_num, \"Some task was not executed\");\n    REQUIRE_MESSAGE(task_type::cancel_counter() == 0, \"Some task was canceled\");\n    task_type::reset();\n}\n\nclass SpawningTaskBody;\n\nusing SpawningTask = CountingTask<SpawningTaskBody>;\n\nclass SpawningTaskBody {\npublic:\n    using task_pool_type = std::vector<SpawningTask, tbb::cache_aligned_allocator<SpawningTask>>;\n\n    SpawningTaskBody( task_pool_type& task_pool, tbb::task_group_context& test_ctx )\n        : my_task_pool(task_pool), my_test_ctx(test_ctx) {}\n\n    void operator()() const {\n        std::size_t delta = 7;\n        std::size_t start_idx = my_current_task.fetch_add(delta);\n\n        if (start_idx < my_task_pool.size()) {\n            for (std::size_t idx = start_idx; idx != std::min(my_task_pool.size(), start_idx + delta); ++idx) {\n                tbb::detail::d1::spawn(my_task_pool[idx], my_test_ctx);\n            }\n        }\n    }\nprivate:\n    task_pool_type& my_task_pool;\n    tbb::task_group_context& my_test_ctx;\n    static std::atomic<std::size_t> my_current_task;\n}; // class SpawningTaskBody\n\nstd::atomic<std::size_t> SpawningTaskBody::my_current_task(0);\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Actively adding tasks\") {\n    std::uint32_t task_number = 500 * static_cast<std::uint32_t>(utils::get_platform_max_threads());\n\n    tbb::detail::d1::wait_context wait(task_number + 1);\n    tbb::task_group_context test_context;\n\n    SpawningTaskBody::task_pool_type task_pool;\n\n    SpawningTaskBody task_body{task_pool, test_context};\n    for (std::size_t i = 0; i < task_number; ++i) {\n        task_pool.emplace_back(task_body, wait);\n    }\n\n    SpawningTask first_task(task_body, wait);\n    tbb::detail::d1::execute_and_wait(first_task, test_context, wait, test_context);\n\n    REQUIRE_MESSAGE(SpawningTask::execute_counter() == task_number + 1, \"Some tasks were not executed\"); // Is it right?\n    REQUIRE_MESSAGE(SpawningTask::cancel_counter() == 0, \"Some tasks were canceled\");\n}\n\n#if __TBB_RESUMABLE_TASKS\nstruct suspended_task : public tbb::detail::d1::task {\n\n    suspended_task(tbb::task::suspend_point tag, tbb::detail::d1::wait_context& wait)\n        : my_suspend_tag(tag), my_wait(wait)\n    {}\n\n    task* execute(tbb::detail::d1::execution_data&) override {\n        tbb::parallel_for(tbb::blocked_range<std::size_t>(0, 100000),\n            [] (const tbb::blocked_range<std::size_t>& range) {\n                // Make some heavy work\n                std::atomic<int> sum{};\n                for (auto it = range.begin(); it != range.end(); ++it) {\n                    ++sum;\n                }\n            },\n            tbb::static_partitioner{}\n        );\n\n        my_wait.release();\n        tbb::task::resume(my_suspend_tag);\n        return nullptr;\n    }\n\n    task* cancel(tbb::detail::d1::execution_data&) override {\n        FAIL(\"The function should never be called.\");\n        return nullptr;\n    }\n\n    tbb::task::suspend_point my_suspend_tag;\n    tbb::detail::d1::wait_context& my_wait;\n};\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Isolation + resumable tasks\") {\n    std::atomic<int> suspend_flag{};\n    tbb::task_group_context test_context;\n\n    std::atomic<int> suspend_count{};\n    std::atomic<int> resume_count{};\n\n    tbb::parallel_for(tbb::blocked_range<std::size_t>(0, 100000),\n        [&suspend_flag, &test_context, &suspend_count, &resume_count] (const tbb::blocked_range<std::size_t>& range) {\n            int ticket = 0;\n            for (auto it = range.begin(); it != range.end(); ++it) {\n                ticket = suspend_flag++;\n            }\n\n            if (ticket % 5 == 0) {\n                std::vector<suspended_task, tbb::cache_aligned_allocator<suspended_task>> test_task;\n                tbb::detail::d1::wait_context wait(1);\n                ++suspend_count;\n                tbb::this_task_arena::isolate([&wait, &test_context, &test_task] {\n                    auto thread_id = std::this_thread::get_id();\n                    tbb::task::suspend([&wait, &test_context, &test_task, thread_id] (tbb::task::suspend_point tag) {\n                        CHECK(thread_id == std::this_thread::get_id());\n                        test_task.emplace_back(tag, wait);\n                        tbb::detail::d1::spawn(test_task[0], test_context);\n                    });\n                    }\n                );\n                tbb::detail::d1::wait(wait, test_context);\n                ++resume_count;\n            }\n        }\n    );\n\n    CHECK(suspend_count == resume_count);\n}\n\nstruct bypass_task : public tbb::detail::d1::task {\n    using task_pool_type = std::vector<bypass_task, tbb::cache_aligned_allocator<bypass_task>>;\n\n    bypass_task(tbb::detail::d1::wait_context& wait, task_pool_type& task_pool,\n                std::atomic<int>& resume_flag, tbb::task::suspend_point& suspend_tag)\n        : my_wait(wait), my_task_pool(task_pool), my_resume_flag(resume_flag), my_suspend_tag(suspend_tag)\n    {}\n\n    task* execute(tbb::detail::d1::execution_data&) override {\n        utils::doDummyWork(10000);\n\n        int expected = 1;\n        if (my_resume_flag.compare_exchange_strong(expected, 2)) {\n            tbb::task::resume(my_suspend_tag);\n        }\n\n        std::size_t ticket = my_current_task++;\n        task* next = ticket < my_task_pool.size() ? &my_task_pool[ticket] : nullptr;\n\n        if (!next && my_resume_flag != 2) {\n            // Rarely all tasks can be executed before the suspend.\n            // So, wait for the suspend before leaving.\n            utils::SpinWaitWhileEq(my_resume_flag, 0);\n            expected = 1;\n            if (my_resume_flag.compare_exchange_strong(expected, 2)) {\n                tbb::task::resume(my_suspend_tag);\n            }\n        }\n\n        my_wait.release();\n        return next;\n    }\n\n    task* cancel(tbb::detail::d1::execution_data&) override {\n        FAIL(\"The function should never be called.\");\n        return nullptr;\n    }\n\n    tbb::detail::d1::wait_context& my_wait;\n    task_pool_type& my_task_pool;\n    std::atomic<int>& my_resume_flag;\n    tbb::task::suspend_point& my_suspend_tag;\n    static std::atomic<int> my_current_task;\n};\n\nstd::atomic<int> bypass_task::my_current_task(0);\n\nthread_local int test_tls = 0;\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Bypass suspended by resume\") {\n    std::uint32_t task_number = 500 * static_cast<std::uint32_t>(utils::get_platform_max_threads());\n    tbb::task_group_context test_context;\n    tbb::detail::d1::wait_context wait(task_number + 1);\n\n    test_tls = 1;\n\n    std::atomic<int> resume_flag{0};\n    tbb::task::suspend_point test_suspend_tag;\n\n    std::vector<bypass_task, tbb::cache_aligned_allocator<bypass_task>> test_task_pool;\n\n    for (std::size_t i = 0; i < task_number; ++i) {\n        test_task_pool.emplace_back(wait, test_task_pool, resume_flag, test_suspend_tag);\n    }\n\n    for (std::size_t i = 0; i < utils::get_platform_max_threads(); ++i) {\n        std::size_t ticket = bypass_task::my_current_task++;\n        if (ticket < test_task_pool.size()) {\n            tbb::detail::d1::spawn(test_task_pool[ticket], test_context);\n        }\n    }\n\n    auto suspend_func = [&resume_flag, &test_suspend_tag] {\n        auto thread_id = std::this_thread::get_id();\n        tbb::task::suspend([&resume_flag, &test_suspend_tag, thread_id] (tbb::task::suspend_point tag) {\n            CHECK(thread_id == std::this_thread::get_id());\n            test_suspend_tag = tag;\n            resume_flag = 1;\n        });\n    };\n    using task_type = CountingTask<decltype(suspend_func)>;\n    task_type suspend_task(suspend_func, wait);\n\n    tbb::detail::d1::execute_and_wait(suspend_task, test_context, wait, test_context);\n    CHECK(bypass_task::my_current_task >= test_task_pool.size());\n    REQUIRE_MESSAGE(test_tls == 1, \"The wrong thread came out\");\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Critical tasks + resume\") {\n    std::uint32_t task_number = 500 * static_cast<std::uint32_t>(utils::get_platform_max_threads());\n\n    tbb::task_group_context test_context;\n    tbb::detail::d1::wait_context wait{ 0 };\n\n    // The test expects at least one thread in test_arena\n    int num_threads_in_test_arena = std::max(2, int(utils::get_platform_max_threads()));\n    tbb::global_control thread_limit(tbb::global_control::max_allowed_parallelism, num_threads_in_test_arena);\n    tbb::task_arena test_arena(num_threads_in_test_arena);\n\n    test_arena.initialize();\n\n    std::atomic<bool> resume_flag{}, resumed{};\n    tbb::task::suspend_point test_suspend_tag;\n\n    auto task_body = [&resume_flag, &resumed, &test_suspend_tag] {\n        // Make some work\n        utils::doDummyWork(1000);\n\n        if (resume_flag.exchange(false)) {\n            tbb::task::resume(test_suspend_tag);\n            resumed = true;\n        }\n    };\n\n    using task_type = CountingTask<decltype(task_body)>;\n    std::vector<task_type, tbb::cache_aligned_allocator<task_type>> test_tasks;\n\n    for (std::size_t i = 0; i < task_number; ++i) {\n        test_tasks.emplace_back(task_body, wait);\n    }\n\n    wait.reserve(task_number / 2);\n    for (std::size_t i = 0; i < task_number / 2; ++i) {\n        submit(test_tasks[i], test_arena, test_context, true);\n    }\n\n    auto suspend_func = [&resume_flag, &test_suspend_tag] {\n        auto thread_id = std::this_thread::get_id();\n        tbb::task::suspend([&resume_flag, &test_suspend_tag, thread_id] (tbb::task::suspend_point tag) {\n            CHECK(thread_id == std::this_thread::get_id());\n            test_suspend_tag = tag;\n            resume_flag.store(true, std::memory_order_release);\n        });\n    };\n    using suspend_task_type = CountingTask<decltype(suspend_func)>;\n    suspend_task_type suspend_task(suspend_func, wait);\n\n    wait.reserve(1);\n    submit(suspend_task, test_arena, test_context, true);\n\n    test_arena.execute([&wait, &test_tasks, &test_arena, &test_context, &resumed, task_number] {\n        tbb::this_task_arena::isolate([&wait, &test_tasks, &test_arena, &test_context, &resumed, task_number] {\n            do {\n                wait.reserve(task_number / 2);\n                tbb::parallel_for(tbb::blocked_range<std::size_t>(task_number / 2, task_number),\n                    [&test_tasks, &test_arena, &test_context] (tbb::blocked_range<std::size_t>& range) {\n                        for (std::size_t i = range.begin(); i != range.end(); ++i) {\n                            submit(test_tasks[i], test_arena, test_context, true);\n                        }\n                    }\n                );\n            } while (!resumed);\n        });\n    });\n\n    test_arena.execute([&wait, &test_context] {\n        tbb::detail::d1::wait(wait, test_context);\n    });\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Stress testing\") {\n    std::uint32_t task_number = static_cast<std::uint32_t>(utils::get_platform_max_threads());\n\n    tbb::task_group_context test_context;\n    tbb::detail::d1::wait_context wait(task_number);\n\n    tbb::task_arena test_arena;\n\n    test_arena.initialize();\n\n    auto task_body = [] {\n        tbb::parallel_for(tbb::blocked_range<std::size_t>(0, 1000), [] (tbb::blocked_range<std::size_t>&) {\n            utils::doDummyWork(100);\n        });\n    };\n    using task_type = CountingTask<decltype(task_body)>;\n\n    std::size_t iter_counter = 20;\n\n    std::vector<task_type, tbb::cache_aligned_allocator<task_type>> test_tasks;\n\n    for (std::size_t j = 0; j < task_number; ++j) {\n        test_tasks.emplace_back(task_body, wait);\n    }\n\n    test_arena.execute([&test_tasks, &task_body, &wait, &test_context, &test_arena, iter_counter, task_number] {\n        for (std::size_t i = 0; i < iter_counter; ++i) {\n\n            for (std::size_t j = 0; j < task_number; ++j) {\n                test_arena.enqueue(task_body);\n            }\n\n            for (std::size_t j = 0; j < task_number / 2; ++j) {\n                tbb::detail::d1::spawn(test_tasks[j], test_context);\n            }\n\n            for (std::size_t j = task_number / 2; j < task_number; ++j) {\n                submit(test_tasks[j], test_arena, test_context, true);\n            }\n\n            tbb::detail::d1::wait(wait, test_context);\n            wait.reserve(task_number);\n        }\n        wait.release(task_number);\n    });\n\n\n    REQUIRE_MESSAGE(task_type::execute_counter() == task_number * iter_counter, \"Some task was not executed\");\n    REQUIRE_MESSAGE(task_type::cancel_counter() == 0, \"Some task was canceled\");\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"All workers sleep\") {\n    std::uint32_t thread_number = static_cast<std::uint32_t>(utils::get_platform_max_threads());\n    tbb::concurrent_vector<tbb::task::suspend_point> suspend_points;\n\n    tbb::task_group test_gr;\n\n    utils::SpinBarrier barrier(thread_number);\n    auto resumble_task = [&] {\n        barrier.wait();\n        auto thread_id = std::this_thread::get_id();\n        tbb::task::suspend([&] (tbb::task::suspend_point sp) {\n            CHECK(thread_id == std::this_thread::get_id());\n            suspend_points.push_back(sp);\n            barrier.wait();\n        });\n    };\n\n    for (std::size_t i = 0; i < thread_number - 1; ++i) {\n        test_gr.run(resumble_task);\n    }\n\n    barrier.wait();\n    barrier.wait();\n    TestCPUUserTime(thread_number);\n\n    for (auto sp : suspend_points)\n        tbb::task::resume(sp);\n    test_gr.wait();\n}\n\n#endif // __TBB_RESUMABLE_TASKS\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Enqueue with exception\") {\n    std::uint32_t task_number = 500 * static_cast<std::uint32_t>(utils::get_platform_max_threads());\n\n    tbb::task_group_context test_context;\n    tbb::detail::d1::wait_context wait(task_number);\n\n    tbb::task_arena test_arena{int(std::thread::hardware_concurrency() + 1)};\n\n    test_arena.initialize();\n\n    auto task_body = [] {\n        utils::doDummyWork(100);\n    };\n\n    std::atomic<bool> end_flag{false};\n    auto check_body = [&end_flag] {\n        end_flag.store(true, std::memory_order_relaxed);\n    };\n\n    using task_type = CountingTask<decltype(task_body)>;\n    std::vector<task_type, tbb::cache_aligned_allocator<task_type>> test_tasks;\n\n    for (std::size_t j = 0; j < task_number; ++j) {\n        test_tasks.emplace_back(task_body, wait);\n    }\n\n    {\n        tbb::global_control gc(tbb::global_control::max_allowed_parallelism, 1);\n        test_arena.enqueue(task_body);\n        // Initialize implicit arena\n        tbb::parallel_for(0, 1, [] (int) {});\n        tbb::task_arena test_arena2(tbb::task_arena::attach{});\n        test_arena2.enqueue(task_body);\n    }\n\n    constexpr std::size_t iter_count = 10;\n    for (std::size_t k = 0; k < iter_count; ++k) {\n        tbb::global_control gc(tbb::global_control::max_allowed_parallelism, 1);\n        test_arena.enqueue(check_body);\n\n        while (!end_flag.load(std::memory_order_relaxed)) ;\n\n        utils::Sleep(1);\n        end_flag.store(false, std::memory_order_relaxed);\n\n        test_arena.execute([&test_tasks, &wait, &test_context, task_number] {\n            for (std::size_t j = 0; j < task_number; ++j) {\n                tbb::detail::d1::spawn(test_tasks[j], test_context);\n            }\n\n            tbb::detail::d1::wait(wait, test_context);\n            wait.reserve(task_number);\n        });\n    }\n    wait.release(task_number);\n\n\n    REQUIRE_MESSAGE(task_type::execute_counter() == task_number * iter_count, \"Some task was not executed\");\n    REQUIRE_MESSAGE(task_type::cancel_counter() == 0, \"Some task was canceled\");\n}\n\nstruct resubmitting_task : public tbb::detail::d1::task {\n    tbb::task_arena& my_arena;\n    tbb::task_group_context& my_ctx;\n    std::atomic<int> counter{100000};\n\n    resubmitting_task(tbb::task_arena& arena, tbb::task_group_context& ctx) : my_arena(arena), my_ctx(ctx)\n    {}\n\n    tbb::detail::d1::task* execute(tbb::detail::d1::execution_data& ) override {\n        if (counter-- > 0) {\n            submit(*this, my_arena, my_ctx, true);\n        }\n        return nullptr;\n    }\n\n    tbb::detail::d1::task* cancel( tbb::detail::d1::execution_data& ) override {\n        FAIL(\"The function should never be called.\");\n        return nullptr;\n    }\n};\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test with priority inversion\") {\n    if (!utils::can_change_thread_priority()) return;\n\n    std::uint32_t thread_number = static_cast<std::uint32_t>(utils::get_platform_max_threads());\n    tbb::global_control gc(tbb::global_control::max_allowed_parallelism, thread_number + 1);\n\n    tbb::task_arena test_arena(2 * thread_number, thread_number);\n    test_arena.initialize();\n    utils::pinning_observer obsr(test_arena);\n    CHECK_MESSAGE(obsr.is_observing(), \"Arena observer has not been activated\");\n\n    std::uint32_t  critical_task_counter = 1000 * thread_number;\n    std::atomic<std::size_t> task_counter{0};\n\n    tbb::task_group_context test_context;\n    tbb::detail::d1::wait_context wait(critical_task_counter);\n\n    auto critical_work = [&] {\n        utils::doDummyWork(10);\n    };\n\n    using suspend_task_type = CountingTask<decltype(critical_work)>;\n    suspend_task_type critical_task(critical_work, wait);\n\n    auto high_priority_thread_func = [&] {\n        // Increase external threads priority\n        utils::increased_priority_guard guard{};\n        utils::suppress_unused_warning(guard);\n        // pin external threads\n        test_arena.execute([]{});\n        while (task_counter++ < critical_task_counter) {\n            submit(critical_task, test_arena, test_context, true);\n            std::this_thread::sleep_for(std::chrono::milliseconds(1));\n        }\n    };\n\n    resubmitting_task worker_task(test_arena, test_context);\n    // warm up\n    // take first core on execute\n    utils::SpinBarrier barrier(thread_number + 1);\n    test_arena.execute([&] {\n        tbb::parallel_for(std::uint32_t(0), thread_number + 1, [&] (std::uint32_t) {\n            barrier.wait();\n            submit(worker_task, test_arena, test_context, true);\n        });\n    });\n\n    std::vector<std::thread> high_priority_threads;\n    for (std::size_t i = 0; i < thread_number - 1; ++i) {\n        high_priority_threads.emplace_back(high_priority_thread_func);\n    }\n\n    utils::increased_priority_guard guard{};\n    utils::suppress_unused_warning(guard);\n    while (task_counter++ < critical_task_counter) {\n        submit(critical_task, test_arena, test_context, true);\n        std::this_thread::sleep_for(std::chrono::milliseconds(1));\n    }\n\n    tbb::detail::d1::wait(wait, test_context);\n\n    for (std::size_t i = 0; i < thread_number - 1; ++i) {\n        high_priority_threads[i].join();\n    }\n}\n\n// Explicit test for raii_guard move ctor because of copy elision optimization\n// TODO: consider better test file for the test case\n//! \\brief \\ref interface\nTEST_CASE(\"raii_guard move ctor\") {\n    int count{0};\n    auto func = [&count] {\n        count++;\n        CHECK(count == 1);\n    };\n\n    tbb::detail::d0::raii_guard<decltype(func)> guard1(func);\n    tbb::detail::d0::raii_guard<decltype(func)> guard2(std::move(guard1));\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Check correct arena destruction with enqueue\") {\n    for (int i = 0; i < 100; ++i) {\n        tbb::task_scheduler_handle handle{ tbb::attach{} };\n        {\n            tbb::task_arena a(2, 0);\n\n            a.enqueue([] {\n                tbb::parallel_for(0, 100, [] (int) { std::this_thread::sleep_for(std::chrono::nanoseconds(10)); });\n            });\n            std::this_thread::sleep_for(std::chrono::microseconds(1));\n        }\n        tbb::finalize(handle, std::nothrow_t{});\n    }\n}\n\n//! \\brief \\ref regression\nTEST_CASE(\"Try to force Leaked proxy observers warning\") {\n    int num_threads = std::thread::hardware_concurrency() * 2;\n    tbb::global_control gc(tbb::global_control::max_allowed_parallelism, num_threads);\n    tbb::task_arena arena(num_threads, 0);\n    std::deque<tbb::task_scheduler_observer> observers;\n    for (int i = 0; i < 1000; ++i) {\n        observers.emplace_back(arena);\n    }\n\n    for (auto& observer : observers) {\n        observer.observe(true);\n    }\n\n    arena.enqueue([] {\n        tbb::parallel_for(0, 100000, [] (int) {\n            utils::doDummyWork(1000);\n        });\n    });\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Force thread limit on per-thread reference_vertex\") {\n    int num_threads = std::thread::hardware_concurrency();\n    int num_groups = 1000;\n\n    // Force thread limit on per-thread reference_vertex\n    std::vector<tbb::task_group> groups(num_groups);\n    tbb::parallel_for(0, num_threads, [&] (int) {\n        std::vector<tbb::task_group> local_groups(num_groups);\n        for (int i = 0; i < num_groups; ++i) {\n            groups[i].run([] {});\n            local_groups[i].run([] {});\n            local_groups[i].wait();\n        }\n    }, tbb::static_partitioner{});\n\n    // Enforce extra reference on each task_group\n    std::deque<tbb::task_handle> handles{};\n    for (int i = 0; i < num_groups; ++i) {\n        handles.emplace_back(groups[i].defer([] {}));\n    }\n\n    // Check correctness of the execution\n    tbb::task_group group;\n\n    std::atomic<int> final_sum{};\n    for (int i = 0; i < num_groups; ++i) {\n        group.run([&] { ++final_sum; });\n    }\n    group.wait();\n    REQUIRE_MESSAGE(final_sum == num_groups, \"Some tasks were not executed\");\n\n    for (int i = 0; i < num_groups; ++i) {\n        groups[i].run(std::move(handles[i]));\n    }\n\n    for (int i = 0; i < num_groups; ++i) {\n        groups[i].wait();\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_task_arena.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n\n#define __TBB_EXTRA_DEBUG 1\n#include \"common/concurrency_tracker.h\"\n#include \"common/cpu_usertime.h\"\n#include \"common/spin_barrier.h\"\n#include \"common/utils.h\"\n#include \"common/utils_report.h\"\n#include \"common/utils_concurrency_limit.h\"\n\n#include \"tbb/task_arena.h\"\n#include \"tbb/task_scheduler_observer.h\"\n#include \"tbb/enumerable_thread_specific.h\"\n#include \"tbb/parallel_for.h\"\n#include \"tbb/global_control.h\"\n#include \"tbb/concurrent_set.h\"\n#include \"tbb/spin_mutex.h\"\n#include \"tbb/spin_rw_mutex.h\"\n#include \"tbb/task_group.h\"\n\n#include <atomic>\n#include <condition_variable>\n#include <cstdio>\n#include <cstdlib>\n#include <stdexcept>\n#include <thread>\n#include <vector>\n\n//#include \"harness_fp.h\"\n\n//! \\file test_task_arena.cpp\n//! \\brief Test for [scheduler.task_arena scheduler.task_scheduler_observer] specification\n\n//--------------------------------------------------//\n// Test that task_arena::initialize and task_arena::terminate work when doing nothing else.\n/* maxthread is treated as the biggest possible concurrency level. */\nvoid InitializeAndTerminate( int maxthread ) {\n    for( int i=0; i<200; ++i ) {\n        switch( i&3 ) {\n            // Arena is created inactive, initialization is always explicit. Lazy initialization is covered by other test functions.\n            // Explicit initialization can either keep the original values or change those.\n            // Arena termination can be explicit or implicit (in the destructor).\n            // TODO: extend with concurrency level checks if such a method is added.\n            default: {\n                tbb::task_arena arena( std::rand() % maxthread + 1 );\n                CHECK_MESSAGE(!arena.is_active(), \"arena should not be active until initialized\");\n                arena.initialize();\n                CHECK(arena.is_active());\n                arena.terminate();\n                CHECK_MESSAGE(!arena.is_active(), \"arena should not be active; it was terminated\");\n                break;\n            }\n            case 0: {\n                tbb::task_arena arena( 1 );\n                CHECK_MESSAGE(!arena.is_active(), \"arena should not be active until initialized\");\n                arena.initialize( std::rand() % maxthread + 1 ); // change the parameters\n                CHECK(arena.is_active());\n                break;\n            }\n            case 1: {\n                tbb::task_arena arena( tbb::task_arena::automatic );\n                CHECK(!arena.is_active());\n                arena.initialize();\n                CHECK(arena.is_active());\n                break;\n            }\n            case 2: {\n                tbb::task_arena arena;\n                CHECK_MESSAGE(!arena.is_active(), \"arena should not be active until initialized\");\n                arena.initialize( std::rand() % maxthread + 1 );\n                CHECK(arena.is_active());\n                arena.terminate();\n                CHECK_MESSAGE(!arena.is_active(), \"arena should not be active; it was terminated\");\n                break;\n            }\n        }\n    }\n}\n\n//--------------------------------------------------//\n\n// Definitions used in more than one test\ntypedef tbb::blocked_range<int> Range;\n\n// slot_id value: -1 is reserved by current_slot(), -2 is set in on_scheduler_exit() below\nstatic tbb::enumerable_thread_specific<int> local_id, old_id, slot_id(-3);\n\nvoid ResetTLS() {\n    local_id.clear();\n    old_id.clear();\n    slot_id.clear();\n}\n\nclass ArenaObserver : public tbb::task_scheduler_observer {\n    int myId;               // unique observer/arena id within a test\n    int myMaxConcurrency;   // concurrency of the associated arena\n    int myNumReservedSlots; // reserved slots in the associated arena\n    void on_scheduler_entry( bool is_worker ) override {\n        int current_index = tbb::this_task_arena::current_thread_index();\n        CHECK(current_index < (myMaxConcurrency > 1 ? myMaxConcurrency : 2));\n        if (is_worker) {\n            CHECK(current_index >= myNumReservedSlots);\n        }\n        CHECK_MESSAGE(!old_id.local(), \"double call to on_scheduler_entry\");\n        old_id.local() = local_id.local();\n        CHECK_MESSAGE(old_id.local() != myId, \"double entry to the same arena\");\n        local_id.local() = myId;\n        slot_id.local() = current_index;\n    }\n    void on_scheduler_exit( bool /*is_worker*/ ) override {\n        CHECK_MESSAGE(local_id.local() == myId, \"nesting of arenas is broken\");\n        CHECK(slot_id.local() == tbb::this_task_arena::current_thread_index());\n        slot_id.local() = -2;\n        local_id.local() = old_id.local();\n        old_id.local() = 0;\n    }\npublic:\n    ArenaObserver(tbb::task_arena &a, int maxConcurrency, int numReservedSlots, int id)\n        : tbb::task_scheduler_observer(a)\n        , myId(id)\n        , myMaxConcurrency(maxConcurrency)\n        , myNumReservedSlots(numReservedSlots) {\n        CHECK(myId);\n        observe(true);\n    }\n    ~ArenaObserver () {\n        observe(false);\n        CHECK_MESSAGE(!old_id.local(), \"inconsistent observer state\");\n    }\n};\n\nstruct IndexTrackingBody { // Must be used together with ArenaObserver\n    void operator() ( const Range& ) const {\n        CHECK(slot_id.local() == tbb::this_task_arena::current_thread_index());\n        utils::doDummyWork(50000);\n    }\n};\n\nstruct AsynchronousWork {\n    utils::SpinBarrier &my_barrier;\n    bool my_is_blocking;\n    AsynchronousWork(utils::SpinBarrier &a_barrier, bool blocking = true)\n    : my_barrier(a_barrier), my_is_blocking(blocking) {}\n    void operator()() const {\n        CHECK_MESSAGE(local_id.local() != 0, \"not in explicit arena\");\n        tbb::parallel_for(Range(0,500), IndexTrackingBody(), tbb::simple_partitioner());\n        if(my_is_blocking) my_barrier.wait(); // must be asynchronous to an external thread\n        else my_barrier.signalNoWait();\n    }\n};\n\n//-----------------------------------------------------------------------------------------//\n\n// Test that task_arenas might be created and used from multiple application threads.\n// Also tests arena observers. The parameter p is the index of an app thread running this test.\nvoid TestConcurrentArenasFunc(int idx) {\n    // A regression test for observer activation order:\n    // check that arena observer can be activated before local observer\n    struct LocalObserver : public tbb::task_scheduler_observer {\n        LocalObserver() : tbb::task_scheduler_observer() { observe(true); }\n        LocalObserver(tbb::task_arena& a) : tbb::task_scheduler_observer(a) {\n            observe(true);\n        }\n        ~LocalObserver() {\n            observe(false);\n        }\n    };\n\n    tbb::task_arena a1;\n    a1.initialize(1,0);\n    ArenaObserver o1(a1, 1, 0, idx*2+1); // the last argument is a \"unique\" observer/arena id for the test\n    CHECK_MESSAGE(o1.is_observing(), \"Arena observer has not been activated\");\n\n    tbb::task_arena a2(2,1);\n    ArenaObserver o2(a2, 2, 1, idx*2+2);\n    CHECK_MESSAGE(o2.is_observing(), \"Arena observer has not been activated\");\n\n    LocalObserver lo1;\n    CHECK_MESSAGE(lo1.is_observing(), \"Local observer has not been activated\");\n\n    tbb::task_arena a3(1, 0);\n    LocalObserver lo2(a3);\n    CHECK_MESSAGE(lo2.is_observing(), \"Local observer has not been activated\");\n\n    utils::SpinBarrier barrier(2);\n    AsynchronousWork work(barrier);\n\n    a1.enqueue(work); // put async work\n    barrier.wait();\n\n    a2.enqueue(work); // another work\n    a2.execute(work);\n\n    a3.execute([] {\n        utils::doDummyWork(100);\n    });\n\n    a1.debug_wait_until_empty();\n    a2.debug_wait_until_empty();\n}\n\nvoid TestConcurrentArenas(int p) {\n    // TODO REVAMP fix with global control\n    ResetTLS();\n    utils::NativeParallelFor( p, &TestConcurrentArenasFunc );\n}\n//--------------------------------------------------//\n// Test multiple application threads working with a single arena at the same time.\nclass MultipleMastersPart1 : utils::NoAssign {\n    tbb::task_arena &my_a;\n    utils::SpinBarrier &my_b1, &my_b2;\npublic:\n    MultipleMastersPart1( tbb::task_arena &a, utils::SpinBarrier &b1, utils::SpinBarrier &b2)\n        : my_a(a), my_b1(b1), my_b2(b2) {}\n    void operator()(int) const {\n        my_a.execute(AsynchronousWork(my_b2, /*blocking=*/false));\n        my_b1.wait();\n        // A regression test for bugs 1954 & 1971\n        my_a.enqueue(AsynchronousWork(my_b2, /*blocking=*/false));\n    }\n};\n\nclass MultipleMastersPart2 : utils::NoAssign {\n    tbb::task_arena &my_a;\n    utils::SpinBarrier &my_b;\npublic:\n    MultipleMastersPart2( tbb::task_arena &a, utils::SpinBarrier &b) : my_a(a), my_b(b) {}\n    void operator()(int) const {\n        my_a.execute(AsynchronousWork(my_b, /*blocking=*/false));\n    }\n};\n\nclass MultipleMastersPart3 : utils::NoAssign {\n    tbb::task_arena &my_a;\n    utils::SpinBarrier &my_b;\n    using wait_context = tbb::detail::d1::wait_context;\n\n    struct Runner : NoAssign {\n        wait_context& myWait;\n        Runner(wait_context& w) : myWait(w) {}\n        void operator()() const {\n            utils::doDummyWork(10000);\n            myWait.release();\n        }\n    };\n\n    struct Waiter : NoAssign {\n        wait_context& myWait;\n        Waiter(wait_context& w) : myWait(w) {}\n        void operator()() const {\n            tbb::task_group_context ctx;\n            tbb::detail::d1::wait(myWait, ctx);\n        }\n    };\n\npublic:\n    MultipleMastersPart3(tbb::task_arena &a, utils::SpinBarrier &b)\n        : my_a(a), my_b(b) {}\n    void operator()(int) const {\n        wait_context wait(0);\n        my_b.wait(); // increases chances for task_arena initialization contention\n        for( int i=0; i<100; ++i) {\n            wait.reserve();\n            my_a.enqueue(Runner(wait));\n            my_a.execute(Waiter(wait));\n        }\n        my_b.wait();\n    }\n};\n\nvoid TestMultipleMasters(int p) {\n    {\n        ResetTLS();\n        tbb::task_arena a(1,0);\n        a.initialize();\n        ArenaObserver o(a, 1, 0, 1);\n        utils::SpinBarrier barrier1(p), barrier2(2*p+1); // each of p threads will submit two tasks signaling the barrier\n        NativeParallelFor( p, MultipleMastersPart1(a, barrier1, barrier2) );\n        barrier2.wait();\n        a.debug_wait_until_empty();\n    } {\n        ResetTLS();\n        tbb::task_arena a(2,1);\n        ArenaObserver o(a, 2, 1, 2);\n        utils::SpinBarrier barrier(p+2);\n        a.enqueue(AsynchronousWork(barrier, /*blocking=*/true)); // occupy the worker, a regression test for bug 1981\n        // TODO: buggy test. A worker threads need time to occupy the slot to prevent an external thread from taking an enqueue task.\n        utils::Sleep(10);\n        NativeParallelFor( p, MultipleMastersPart2(a, barrier) );\n        barrier.wait();\n        a.debug_wait_until_empty();\n    } {\n        // Regression test for the bug 1981 part 2 (task_arena::execute() with wait_for_all for an enqueued task)\n        tbb::task_arena a(p,1);\n        utils::SpinBarrier barrier(p+1); // for external threads to avoid endless waiting at least in some runs\n        // \"Oversubscribe\" the arena by 1 external thread\n        NativeParallelFor( p+1, MultipleMastersPart3(a, barrier) );\n        a.debug_wait_until_empty();\n    }\n}\n\n//--------------------------------------------------//\n// TODO: explain what TestArenaEntryConsistency does\n#include <sstream>\n#include <stdexcept>\n#include \"oneapi/tbb/detail/_exception.h\"\n#include \"common/fp_control.h\"\n\nstruct TestArenaEntryBody : FPModeContext {\n    std::atomic<int> &my_stage; // each execute increases it\n    std::stringstream my_id;\n    bool is_caught, is_expected;\n    enum { arenaFPMode = 1 };\n\n    TestArenaEntryBody(std::atomic<int> &s, int idx, int i)  // init thread-specific instance\n    :   FPModeContext(idx+i)\n    ,   my_stage(s)\n    ,   is_caught(false)\n#if TBB_USE_EXCEPTIONS\n    ,   is_expected( (idx&(1<<i)) != 0 )\n#else\n    , is_expected(false)\n#endif\n    {\n        my_id << idx << ':' << i << '@';\n    }\n    void operator()() { // inside task_arena::execute()\n        // synchronize with other stages\n        int stage = my_stage++;\n        int slot = tbb::this_task_arena::current_thread_index();\n        CHECK(slot >= 0);\n        CHECK(slot <= 1);\n        // wait until the third stage is delegated and then starts on slot 0\n        while(my_stage < 2+slot) utils::yield();\n        // deduct its entry type and put it into id, it helps to find source of a problem\n        my_id << (stage < 3 ? (tbb::this_task_arena::current_thread_index()?\n                              \"delegated_to_worker\" : stage < 2? \"direct\" : \"delegated_to_master\")\n                            : stage == 3? \"nested_same_ctx\" : \"nested_alien_ctx\");\n        AssertFPMode(arenaFPMode);\n        if (is_expected) {\n            TBB_TEST_THROW(std::logic_error(my_id.str()));\n        }\n        // no code can be put here since exceptions can be thrown\n    }\n    void on_exception(const char *e) { // outside arena, in catch block\n        is_caught = true;\n        CHECK(my_id.str() == e);\n        assertFPMode();\n    }\n    void after_execute() { // outside arena and catch block\n        CHECK(is_caught == is_expected);\n        assertFPMode();\n    }\n};\n\nclass ForEachArenaEntryBody : utils::NoAssign {\n    tbb::task_arena &my_a; // expected task_arena(2,1)\n    std::atomic<int> &my_stage; // each execute increases it\n    int my_idx;\n\npublic:\n    ForEachArenaEntryBody(tbb::task_arena &a, std::atomic<int> &c)\n    : my_a(a), my_stage(c), my_idx(0) {}\n\n    void test(int idx) {\n        my_idx = idx;\n        my_stage = 0;\n        NativeParallelFor(3, *this); // test cross-arena calls\n        CHECK(my_stage == 3);\n        my_a.execute(*this); // test nested calls\n        CHECK(my_stage == 5);\n    }\n\n    // task_arena functor for nested tests\n    void operator()() const {\n        test_arena_entry(3); // in current task group context\n        tbb::parallel_for(4, 5, *this); // in different context\n    }\n\n    // NativeParallelFor & parallel_for functor\n    void operator()(int i) const {\n        test_arena_entry(i);\n    }\n\nprivate:\n    void test_arena_entry(int i) const {\n        GetRoundingMode();\n        TestArenaEntryBody scoped_functor(my_stage, my_idx, i);\n        GetRoundingMode();\n#if TBB_USE_EXCEPTIONS\n        try {\n            my_a.execute(scoped_functor);\n        } catch(std::logic_error &e) {\n            scoped_functor.on_exception(e.what());\n        } catch(...) { CHECK_MESSAGE(false, \"Unexpected exception type\"); }\n#else\n        my_a.execute(scoped_functor);\n#endif\n        scoped_functor.after_execute();\n    }\n};\n\nvoid TestArenaEntryConsistency() {\n    tbb::task_arena a(2, 1);\n    std::atomic<int> c;\n    ForEachArenaEntryBody body(a, c);\n\n    FPModeContext fp_scope(TestArenaEntryBody::arenaFPMode);\n    a.initialize(); // capture FP settings to arena\n    fp_scope.setNextFPMode();\n\n    for (int i = 0; i < 100; i++) // not less than 32 = 2^5 of entry types\n        body.test(i);\n}\n//--------------------------------------------------\n// Test that the requested degree of concurrency for task_arena is achieved in various conditions\nclass TestArenaConcurrencyBody : utils::NoAssign {\n    tbb::task_arena &my_a;\n    int my_max_concurrency;\n    int my_reserved_slots;\n    utils::SpinBarrier *my_barrier;\n    utils::SpinBarrier *my_worker_barrier;\npublic:\n    TestArenaConcurrencyBody( tbb::task_arena &a, int max_concurrency, int reserved_slots, utils::SpinBarrier *b = nullptr, utils::SpinBarrier *wb = nullptr )\n    : my_a(a), my_max_concurrency(max_concurrency), my_reserved_slots(reserved_slots), my_barrier(b), my_worker_barrier(wb) {}\n    // NativeParallelFor's functor\n    void operator()( int ) const {\n        CHECK_MESSAGE( local_id.local() == 0, \"TLS was not cleaned?\" );\n        local_id.local() = 1;\n        my_a.execute( *this );\n    }\n    // Arena's functor\n    void operator()() const {\n        int idx = tbb::this_task_arena::current_thread_index();\n        REQUIRE( idx < (my_max_concurrency > 1 ? my_max_concurrency : 2) );\n        REQUIRE( my_a.max_concurrency() == tbb::this_task_arena::max_concurrency() );\n        int max_arena_concurrency = tbb::this_task_arena::max_concurrency();\n        REQUIRE( max_arena_concurrency == my_max_concurrency );\n        if ( my_worker_barrier ) {\n            if ( local_id.local() == 1 ) {\n                // External thread in a reserved slot\n                CHECK_MESSAGE( idx < my_reserved_slots, \"External threads are supposed to use only reserved slots in this test\" );\n            } else {\n                // Worker thread\n                CHECK( idx >= my_reserved_slots );\n                my_worker_barrier->wait();\n            }\n        } else if ( my_barrier )\n            CHECK_MESSAGE( local_id.local() == 1, \"Workers are not supposed to enter the arena in this test\" );\n        if ( my_barrier ) my_barrier->wait();\n        else utils::Sleep( 1 );\n    }\n};\n\nvoid TestArenaConcurrency( int p, int reserved = 0, int step = 1) {\n    for (; reserved <= p; reserved += step) {\n        tbb::task_arena a( p, reserved );\n        if (p - reserved < tbb::this_task_arena::max_concurrency()) {\n            // Check concurrency with worker & reserved external threads.\n            ResetTLS();\n            utils::SpinBarrier b( p );\n            utils::SpinBarrier wb( p-reserved );\n            TestArenaConcurrencyBody test( a, p, reserved, &b, &wb );\n            for ( int i = reserved; i < p; ++i ) // requests p-reserved worker threads\n                a.enqueue( test );\n            if ( reserved==1 )\n                test( 0 ); // calls execute()\n            else\n                utils::NativeParallelFor( reserved, test );\n            a.debug_wait_until_empty();\n        } { // Check if multiple external threads alone can achieve maximum concurrency.\n            ResetTLS();\n            utils::SpinBarrier b( p );\n            utils::NativeParallelFor( p, TestArenaConcurrencyBody( a, p, reserved, &b ) );\n            a.debug_wait_until_empty();\n        } { // Check oversubscription by external threads.\n#if !_WIN32 || !_WIN64\n            // Some C++ implementations allocate 8MB stacks for std::thread on 32 bit platforms\n            // that makes impossible to create more than ~500 threads.\n            if ( !(sizeof(std::size_t) == 4 && p > 200) )\n#endif\n#if TBB_TEST_LOW_WORKLOAD\n            if ( p <= 16 )\n#endif\n            {\n                ResetTLS();\n                utils::NativeParallelFor(2 * p, TestArenaConcurrencyBody(a, p, reserved));\n                a.debug_wait_until_empty();\n            }\n        }\n    }\n}\n\nstruct TestMandatoryConcurrencyObserver : public tbb::task_scheduler_observer {\n    utils::SpinBarrier& m_barrier;\n\n    TestMandatoryConcurrencyObserver(tbb::task_arena& a, utils::SpinBarrier& barrier)\n        : tbb::task_scheduler_observer(a), m_barrier(barrier) {\n        observe(true);\n    }\n    ~TestMandatoryConcurrencyObserver() {\n        observe(false);\n    }\n    void on_scheduler_exit(bool worker) override {\n        if (worker) {\n            m_barrier.wait();\n        }\n    }\n};\n\nvoid TestMandatoryConcurrency() {\n    tbb::task_arena a(1);\n    a.execute([&a] {\n        int n_threads = 4;\n        utils::SpinBarrier exit_barrier(2);\n        TestMandatoryConcurrencyObserver observer(a, exit_barrier);\n        for (int j = 0; j < 5; ++j) {\n            utils::ExactConcurrencyLevel::check(1);\n            std::atomic<int> num_tasks{ 0 }, curr_tasks{ 0 };\n            utils::SpinBarrier barrier(n_threads);\n            utils::NativeParallelFor(n_threads, [&](int) {\n                for (int i = 0; i < 5; ++i) {\n                    barrier.wait();\n                    a.enqueue([&] {\n                        CHECK(tbb::this_task_arena::max_concurrency() == 2);\n                        CHECK(a.max_concurrency() == 2);\n                        ++curr_tasks;\n                        CHECK(curr_tasks == 1);\n                        utils::doDummyWork(1000);\n                        CHECK(curr_tasks == 1);\n                        --curr_tasks;\n                        ++num_tasks;\n                    });\n                    barrier.wait();\n                }\n            });\n            do {\n                exit_barrier.wait();\n            } while (num_tasks < n_threads * 5);\n        }\n    });\n}\n\nvoid TestConcurrentFunctionality(int min_thread_num = 1, int max_thread_num = 3) {\n    TestMandatoryConcurrency();\n    InitializeAndTerminate(max_thread_num);\n    for (int p = min_thread_num; p <= max_thread_num; ++p) {\n        TestConcurrentArenas(p);\n        TestMultipleMasters(p);\n        TestArenaConcurrency(p);\n    }\n}\n\n//--------------------------------------------------//\n// Test creation/initialization of a task_arena that references an existing arena (aka attach).\n// This part of the test uses the knowledge of task_arena internals\n\nstruct TaskArenaValidator {\n    int my_slot_at_construction;\n    const tbb::task_arena& my_arena;\n    TaskArenaValidator( const tbb::task_arena& other )\n        : my_slot_at_construction(tbb::this_task_arena::current_thread_index())\n        , my_arena(other)\n    {}\n    // Inspect the internal state\n    int concurrency() { return my_arena.debug_max_concurrency(); }\n    int reserved_for_masters() { return my_arena.debug_reserved_slots(); }\n\n    // This method should be called in task_arena::execute() for a captured arena\n    // by the same thread that created the validator.\n    void operator()() {\n        CHECK_MESSAGE( tbb::this_task_arena::current_thread_index()==my_slot_at_construction,\n                \"Current thread index has changed since the validator construction\" );\n    }\n};\n\nvoid ValidateAttachedArena( tbb::task_arena& arena, bool expect_activated,\n                            int expect_concurrency, int expect_masters ) {\n    CHECK_MESSAGE( arena.is_active()==expect_activated, \"Unexpected activation state\" );\n    if( arena.is_active() ) {\n        TaskArenaValidator validator( arena );\n        CHECK_MESSAGE( validator.concurrency()==expect_concurrency, \"Unexpected arena size\" );\n        CHECK_MESSAGE( validator.reserved_for_masters()==expect_masters, \"Unexpected # of reserved slots\" );\n        if ( tbb::this_task_arena::current_thread_index() != tbb::task_arena::not_initialized ) {\n            CHECK(tbb::this_task_arena::current_thread_index() >= 0);\n            // for threads already in arena, check that the thread index remains the same\n            arena.execute( validator );\n        } else { // not_initialized\n            // Test the deprecated method\n            CHECK(tbb::this_task_arena::current_thread_index() == -1);\n        }\n\n        // Ideally, there should be a check for having the same internal arena object,\n        // but that object is not easily accessible for implicit arenas.\n    }\n}\n\nstruct TestAttachBody : utils::NoAssign {\n    static thread_local int my_idx; // safe to modify and use within the NativeParallelFor functor\n    const int maxthread;\n    TestAttachBody( int max_thr ) : maxthread(max_thr) {}\n\n    // The functor body for NativeParallelFor\n    void operator()( int idx ) const {\n        my_idx = idx;\n\n        int default_threads = tbb::this_task_arena::max_concurrency();\n\n        tbb::task_arena arena{tbb::task_arena::attach()};\n        ValidateAttachedArena( arena, false, -1, -1 ); // Nothing yet to attach to\n\n        arena.terminate();\n        ValidateAttachedArena( arena, false, -1, -1 );\n\n        // attach to an auto-initialized arena\n        tbb::parallel_for(0, 1, [](int) {});\n\n        tbb::task_arena arena2{tbb::task_arena::attach()};\n        ValidateAttachedArena( arena2, true, default_threads, 1 );\n\n        tbb::task_arena arena3;\n        arena3.initialize(tbb::attach());\n        ValidateAttachedArena( arena3, true, default_threads, 1 );\n\n\n        // attach to another task_arena\n        arena.initialize( maxthread, std::min(maxthread,idx) );\n        arena.execute( *this );\n    }\n\n    // The functor body for task_arena::execute above\n    void operator()() const {\n        tbb::task_arena arena2{tbb::task_arena::attach()};\n        ValidateAttachedArena( arena2, true, maxthread, std::min(maxthread,my_idx) );\n    }\n\n    // The functor body for tbb::parallel_for\n    void operator()( const Range& r ) const {\n        for( int i = r.begin(); i<r.end(); ++i ) {\n            tbb::task_arena arena2{tbb::task_arena::attach()};\n            ValidateAttachedArena( arena2, true, tbb::this_task_arena::max_concurrency(), 1 );\n        }\n    }\n};\n\nthread_local int TestAttachBody::my_idx;\n\nvoid TestAttach( int maxthread ) {\n    // Externally concurrent, but no concurrency within a thread\n    utils::NativeParallelFor( std::max(maxthread,4), TestAttachBody( maxthread ) );\n    // Concurrent within the current arena; may also serve as a stress test\n    tbb::parallel_for( Range(0,10000*maxthread), TestAttachBody( maxthread ) );\n}\n\n//--------------------------------------------------//\n\n// Test that task_arena::enqueue does not tolerate a non-const functor.\n// TODO: can it be reworked as SFINAE-based compile-time check?\nstruct TestFunctor {\n    void operator()() { CHECK_MESSAGE( false, \"Non-const operator called\" ); }\n    void operator()() const { /* library requires this overload only */ }\n};\n\nvoid TestConstantFunctorRequirement() {\n    tbb::task_arena a;\n    TestFunctor tf;\n    a.enqueue( tf );\n}\n\n//--------------------------------------------------//\n\n#include \"tbb/parallel_reduce.h\"\n#include \"tbb/parallel_invoke.h\"\n\n// Test this_task_arena::isolate\nnamespace TestIsolatedExecuteNS {\n    template <typename NestedPartitioner>\n    class NestedParFor : utils::NoAssign {\n    public:\n        NestedParFor() {}\n        void operator()() const {\n            NestedPartitioner p;\n            tbb::parallel_for( 0, 10, utils::DummyBody( 10 ), p );\n        }\n    };\n\n    template <typename NestedPartitioner>\n    class ParForBody : utils::NoAssign {\n        bool myOuterIsolation;\n        tbb::enumerable_thread_specific<int> &myEts;\n        std::atomic<bool> &myIsStolen;\n    public:\n        ParForBody( bool outer_isolation, tbb::enumerable_thread_specific<int> &ets, std::atomic<bool> &is_stolen )\n            : myOuterIsolation( outer_isolation ), myEts( ets ), myIsStolen( is_stolen ) {}\n        void operator()( int ) const {\n            int &e = myEts.local();\n            if ( e++ > 0 ) myIsStolen = true;\n            if ( myOuterIsolation )\n                NestedParFor<NestedPartitioner>()();\n            else\n                tbb::this_task_arena::isolate( NestedParFor<NestedPartitioner>() );\n            --e;\n        }\n    };\n\n    template <typename OuterPartitioner, typename NestedPartitioner>\n    class OuterParFor : utils::NoAssign {\n        bool myOuterIsolation;\n        std::atomic<bool> &myIsStolen;\n    public:\n        OuterParFor( bool outer_isolation, std::atomic<bool> &is_stolen ) : myOuterIsolation( outer_isolation ), myIsStolen( is_stolen ) {}\n        void operator()() const {\n            tbb::enumerable_thread_specific<int> ets( 0 );\n            OuterPartitioner p;\n            tbb::parallel_for( 0, 1000, ParForBody<NestedPartitioner>( myOuterIsolation, ets, myIsStolen ), p );\n        }\n    };\n\n    template <typename OuterPartitioner, typename NestedPartitioner>\n    void TwoLoopsTest( bool outer_isolation ) {\n        std::atomic<bool> is_stolen;\n        is_stolen = false;\n        const int max_repeats = 100;\n        if ( outer_isolation ) {\n            for ( int i = 0; i <= max_repeats; ++i ) {\n                tbb::this_task_arena::isolate( OuterParFor<OuterPartitioner, NestedPartitioner>( outer_isolation, is_stolen ) );\n                if ( is_stolen ) break;\n            }\n            // TODO: was ASSERT_WARNING\n            if (!is_stolen) {\n                REPORT(\"Warning: isolate() should not block stealing on nested levels without isolation\\n\");\n            }\n        } else {\n            for ( int i = 0; i <= max_repeats; ++i ) {\n                OuterParFor<OuterPartitioner, NestedPartitioner>( outer_isolation, is_stolen )();\n            }\n            REQUIRE_MESSAGE( !is_stolen, \"isolate() on nested levels should prevent stealing from outer levels\" );\n        }\n    }\n\n    void TwoLoopsTest( bool outer_isolation ) {\n        TwoLoopsTest<tbb::simple_partitioner, tbb::simple_partitioner>( outer_isolation );\n        TwoLoopsTest<tbb::simple_partitioner, tbb::affinity_partitioner>( outer_isolation );\n        TwoLoopsTest<tbb::affinity_partitioner, tbb::simple_partitioner>( outer_isolation );\n        TwoLoopsTest<tbb::affinity_partitioner, tbb::affinity_partitioner>( outer_isolation );\n    }\n\n    void TwoLoopsTest() {\n        TwoLoopsTest( true );\n        TwoLoopsTest( false );\n    }\n    //--------------------------------------------------//\n    class HeavyMixTestBody : utils::NoAssign {\n        tbb::enumerable_thread_specific<utils::FastRandom<>>& myRandom;\n        tbb::enumerable_thread_specific<int>& myIsolatedLevel;\n        int myNestedLevel;\n\n        template <typename Partitioner, typename Body>\n        static void RunTwoBodies( utils::FastRandom<>& rnd, const Body &body, Partitioner& p, tbb::task_group_context* ctx = nullptr ) {\n            if ( rnd.get() % 2 ) {\n                if  (ctx )\n                    tbb::parallel_for( 0, 2, body, p, *ctx );\n                else\n                    tbb::parallel_for( 0, 2, body, p );\n            } else {\n                tbb::parallel_invoke( body, body );\n            }\n        }\n\n        template <typename Partitioner>\n        class IsolatedBody : utils::NoAssign {\n            const HeavyMixTestBody &myHeavyMixTestBody;\n            Partitioner &myPartitioner;\n        public:\n            IsolatedBody( const HeavyMixTestBody &body, Partitioner &partitioner )\n                : myHeavyMixTestBody( body ), myPartitioner( partitioner ) {}\n            void operator()() const {\n                RunTwoBodies( myHeavyMixTestBody.myRandom.local(),\n                    HeavyMixTestBody( myHeavyMixTestBody.myRandom, myHeavyMixTestBody.myIsolatedLevel,\n                        myHeavyMixTestBody.myNestedLevel + 1 ),\n                    myPartitioner );\n            }\n        };\n\n        template <typename Partitioner>\n        void RunNextLevel( utils::FastRandom<>& rnd, int &isolated_level ) const {\n            Partitioner p;\n            switch ( rnd.get() % 2 ) {\n                case 0: {\n                    // No features\n                    tbb::task_group_context ctx;\n                    RunTwoBodies( rnd, HeavyMixTestBody(myRandom, myIsolatedLevel, myNestedLevel + 1), p, &ctx );\n                    break;\n                }\n                case 1: {\n                    // Isolation\n                    int previous_isolation = isolated_level;\n                    isolated_level = myNestedLevel;\n                    tbb::this_task_arena::isolate( IsolatedBody<Partitioner>( *this, p ) );\n                    isolated_level = previous_isolation;\n                    break;\n                }\n            }\n        }\n    public:\n        HeavyMixTestBody( tbb::enumerable_thread_specific<utils::FastRandom<>>& random,\n            tbb::enumerable_thread_specific<int>& isolated_level, int nested_level )\n            : myRandom( random ), myIsolatedLevel( isolated_level )\n            , myNestedLevel( nested_level ) {}\n        void operator()() const {\n            int &isolated_level = myIsolatedLevel.local();\n            CHECK_FAST_MESSAGE( myNestedLevel > isolated_level, \"The outer-level task should not be stolen on isolated level\" );\n            if ( myNestedLevel == 20 )\n                return;\n            utils::FastRandom<>& rnd = myRandom.local();\n            if ( rnd.get() % 2 == 1 ) {\n                RunNextLevel<tbb::auto_partitioner>( rnd, isolated_level );\n            } else {\n                RunNextLevel<tbb::affinity_partitioner>( rnd, isolated_level );\n            }\n        }\n        void operator()(int) const {\n            this->operator()();\n        }\n    };\n\n    struct RandomInitializer {\n        utils::FastRandom<> operator()() {\n            return utils::FastRandom<>( tbb::this_task_arena::current_thread_index() );\n        }\n    };\n\n    void HeavyMixTest() {\n        std::size_t num_threads = tbb::this_task_arena::max_concurrency() < 3 ? 3 : tbb::this_task_arena::max_concurrency();\n        tbb::global_control ctl(tbb::global_control::max_allowed_parallelism, num_threads);\n\n        RandomInitializer init_random;\n        tbb::enumerable_thread_specific<utils::FastRandom<>> random( init_random );\n        tbb::enumerable_thread_specific<int> isolated_level( 0 );\n        for ( int i = 0; i < 5; ++i ) {\n            HeavyMixTestBody b( random, isolated_level, 1 );\n            b( 0 );\n        }\n    }\n\n    //--------------------------------------------------//\n#if TBB_USE_EXCEPTIONS\n    struct MyException {};\n    struct IsolatedBodyThrowsException {\n        void operator()() const {\n#if _MSC_VER && !__INTEL_COMPILER\n            // Workaround an unreachable code warning in task_arena_function.\n            volatile bool workaround = true;\n            if (workaround)\n#endif\n            {\n                throw MyException();\n            }\n        }\n    };\n    struct ExceptionTestBody : utils::NoAssign {\n        tbb::enumerable_thread_specific<int>& myEts;\n        std::atomic<bool>& myIsStolen;\n        ExceptionTestBody( tbb::enumerable_thread_specific<int>& ets, std::atomic<bool>& is_stolen )\n            : myEts( ets ), myIsStolen( is_stolen ) {}\n        void operator()( int i ) const {\n            try {\n                tbb::this_task_arena::isolate( IsolatedBodyThrowsException() );\n                REQUIRE_MESSAGE( false, \"The exception has been lost\" );\n            }\n            catch ( MyException ) {}\n            catch ( ... ) {\n                REQUIRE_MESSAGE( false, \"Unexpected exception\" );\n            }\n            // Check that nested algorithms can steal outer-level tasks\n            int &e = myEts.local();\n            if ( e++ > 0 ) myIsStolen = true;\n            // work imbalance increases chances for stealing\n            tbb::parallel_for( 0, 10+i, utils::DummyBody( 100 ) );\n            --e;\n        }\n    };\n\n#endif /* TBB_USE_EXCEPTIONS */\n    void ExceptionTest() {\n#if TBB_USE_EXCEPTIONS\n        tbb::enumerable_thread_specific<int> ets;\n        std::atomic<bool> is_stolen;\n        is_stolen = false;\n        for ( ;; ) {\n            tbb::parallel_for( 0, 1000, ExceptionTestBody( ets, is_stolen ) );\n            if ( is_stolen ) break;\n        }\n        REQUIRE_MESSAGE( is_stolen, \"isolate should not affect non-isolated work\" );\n#endif /* TBB_USE_EXCEPTIONS */\n    }\n\n    struct NonConstBody {\n        unsigned int state;\n        void operator()() {\n            state ^= ~0u;\n        }\n    };\n\n    void TestNonConstBody() {\n        NonConstBody body;\n        body.state = 0x6c97d5ed;\n        tbb::this_task_arena::isolate(body);\n        REQUIRE_MESSAGE(body.state == 0x93682a12, \"The wrong state\");\n    }\n\n    // TODO: Consider tbb::task_group instead of explicit task API.\n    class TestEnqueueTask : public tbb::detail::d1::task {\n        using wait_context = tbb::detail::d1::wait_context;\n\n        tbb::enumerable_thread_specific<bool>& executed;\n        std::atomic<int>& completed;\n\n    public:\n        wait_context& waiter;\n        tbb::task_arena& arena;\n        static const int N = 100;\n\n        TestEnqueueTask(tbb::enumerable_thread_specific<bool>& exe, std::atomic<int>& c, wait_context& w, tbb::task_arena& a)\n            : executed(exe), completed(c), waiter(w), arena(a) {}\n\n        tbb::detail::d1::task* execute(tbb::detail::d1::execution_data&) override {\n            for (int i = 0; i < N; ++i) {\n                arena.enqueue([&]() {\n                    executed.local() = true;\n                    ++completed;\n                    for (int j = 0; j < 100; j++) utils::yield();\n                    waiter.release(1);\n                });\n            }\n            return nullptr;\n        }\n        tbb::detail::d1::task* cancel(tbb::detail::d1::execution_data&) override { return nullptr; }\n    };\n\n    class TestEnqueueIsolateBody : utils::NoCopy {\n        tbb::enumerable_thread_specific<bool>& executed;\n        std::atomic<int>& completed;\n        tbb::task_arena& arena;\n    public:\n        static const int N = 100;\n\n        TestEnqueueIsolateBody(tbb::enumerable_thread_specific<bool>& exe, std::atomic<int>& c, tbb::task_arena& a)\n            : executed(exe), completed(c), arena(a) {}\n        void operator()() {\n            tbb::task_group_context ctx;\n            tbb::detail::d1::wait_context waiter(N);\n\n            TestEnqueueTask root(executed, completed, waiter, arena);\n            tbb::detail::d1::execute_and_wait(root, ctx, waiter, ctx);\n        }\n    };\n\n    void TestEnqueue() {\n        tbb::enumerable_thread_specific<bool> executed(false);\n        std::atomic<int> completed;\n        tbb::task_arena arena{tbb::task_arena::attach()};\n\n        // Check that the main thread can process enqueued tasks.\n        completed = 0;\n        TestEnqueueIsolateBody b1(executed, completed, arena);\n        b1();\n\n        if (!executed.local()) {\n            REPORT(\"Warning: No one enqueued task has executed by the main thread.\\n\");\n        }\n\n        executed.local() = false;\n        completed = 0;\n        const int N = 100;\n        // Create enqueued tasks out of isolation.\n\n        tbb::task_group_context ctx;\n        tbb::detail::d1::wait_context waiter(N);\n        for (int i = 0; i < N; ++i) {\n            arena.enqueue([&]() {\n                executed.local() = true;\n                ++completed;\n                utils::yield();\n                waiter.release(1);\n            });\n        }\n        TestEnqueueIsolateBody b2(executed, completed, arena);\n        tbb::this_task_arena::isolate(b2);\n        REQUIRE_MESSAGE(executed.local() == false, \"An enqueued task was executed within isolate.\");\n\n        tbb::detail::d1::wait(waiter, ctx);\n        // while (completed < TestEnqueueTask::N + N) utils::yield();\n    }\n}\n\nvoid TestIsolatedExecute() {\n    // At least 3 threads (owner + 2 thieves) are required to reproduce a situation when the owner steals outer\n    // level task on a nested level. If we have only one thief then it will execute outer level tasks first and\n    // the owner will not have a possibility to steal outer level tasks.\n    int platform_max_thread = tbb::this_task_arena::max_concurrency();\n    int num_threads = utils::min( platform_max_thread, 3 );\n    {\n        // Too many threads require too many work to reproduce the stealing from outer level.\n        tbb::global_control ctl(tbb::global_control::max_allowed_parallelism, utils::max(num_threads, 7));\n        TestIsolatedExecuteNS::TwoLoopsTest();\n        TestIsolatedExecuteNS::HeavyMixTest();\n        TestIsolatedExecuteNS::ExceptionTest();\n    }\n    tbb::global_control ctl(tbb::global_control::max_allowed_parallelism, num_threads);\n    TestIsolatedExecuteNS::HeavyMixTest();\n    TestIsolatedExecuteNS::TestNonConstBody();\n    TestIsolatedExecuteNS::TestEnqueue();\n}\n\n//-----------------------------------------------------------------------------------------//\n\nclass TestDelegatedSpawnWaitBody : utils::NoAssign {\n    tbb::task_arena &my_a;\n    utils::SpinBarrier &my_b1, &my_b2;\npublic:\n    TestDelegatedSpawnWaitBody( tbb::task_arena &a, utils::SpinBarrier &b1, utils::SpinBarrier &b2)\n        : my_a(a), my_b1(b1), my_b2(b2) {}\n    // NativeParallelFor's functor\n    void operator()(int idx) const {\n        if ( idx==0 ) { // thread 0 works in the arena, thread 1 waits for it (to prevent test hang)\n            for (int i = 0; i < 2; ++i) {\n                my_a.enqueue([this] { my_b1.wait(); }); // tasks to sync with workers\n            }\n            tbb::task_group tg;\n            my_b1.wait(); // sync with the workers\n            for( int i=0; i<100000; ++i) {\n                my_a.execute([&tg] { tg.run([] {}); });\n            }\n            my_a.execute([&tg] {tg.wait(); });\n        }\n\n        my_b2.wait(); // sync both threads\n    }\n};\n\nvoid TestDelegatedSpawnWait() {\n    if (tbb::this_task_arena::max_concurrency() < 3) {\n        // The test requires at least 2 worker threads\n        return;\n    }\n    // Regression test for a bug with missed wakeup notification from a delegated task\n    tbb::task_arena a(2,0);\n    a.initialize();\n    utils::SpinBarrier barrier1(3), barrier2(2);\n    utils::NativeParallelFor( 2, TestDelegatedSpawnWaitBody(a, barrier1, barrier2) );\n    a.debug_wait_until_empty();\n}\n\n//-----------------------------------------------------------------------------------------//\n\nclass TestMultipleWaitsArenaWait : utils::NoAssign {\n    using wait_context = tbb::detail::d1::wait_context;\npublic:\n    TestMultipleWaitsArenaWait( int idx, int bunch_size, int num_tasks, std::vector<wait_context*>& waiters, std::atomic<int>& processed, tbb::task_group_context& tgc )\n        : my_idx( idx ), my_bunch_size( bunch_size ), my_num_tasks(num_tasks), my_waiters( waiters ), my_processed( processed ), my_context(tgc) {}\n    void operator()() const {\n        ++my_processed;\n        // Wait for all tasks\n        if ( my_idx < my_num_tasks ) {\n            tbb::detail::d1::wait(*my_waiters[my_idx], my_context);\n        }\n        // Signal waiting tasks\n        if ( my_idx >= my_bunch_size ) {\n            my_waiters[my_idx-my_bunch_size]->release();\n        }\n    }\nprivate:\n    int my_idx;\n    int my_bunch_size;\n    int my_num_tasks;\n    std::vector<wait_context*>& my_waiters;\n    std::atomic<int>& my_processed;\n    tbb::task_group_context& my_context;\n};\n\nclass TestMultipleWaitsThreadBody : utils::NoAssign {\n    using wait_context = tbb::detail::d1::wait_context;\npublic:\n    TestMultipleWaitsThreadBody( int bunch_size, int num_tasks, tbb::task_arena& a, std::vector<wait_context*>& waiters, std::atomic<int>& processed, tbb::task_group_context& tgc )\n        : my_bunch_size( bunch_size ), my_num_tasks( num_tasks ), my_arena( a ), my_waiters( waiters ), my_processed( processed ), my_context(tgc) {}\n    void operator()( int idx ) const {\n        my_arena.execute( TestMultipleWaitsArenaWait( idx, my_bunch_size, my_num_tasks, my_waiters, my_processed, my_context ) );\n        --my_processed;\n    }\nprivate:\n    int my_bunch_size;\n    int my_num_tasks;\n    tbb::task_arena& my_arena;\n    std::vector<wait_context*>& my_waiters;\n    std::atomic<int>& my_processed;\n    tbb::task_group_context& my_context;\n};\n\nvoid TestMultipleWaits( int num_threads, int num_bunches, int bunch_size ) {\n    tbb::task_arena a( num_threads );\n    const int num_tasks = (num_bunches-1)*bunch_size;\n\n    tbb::task_group_context tgc;\n    std::vector<tbb::detail::d1::wait_context*> waiters(num_tasks);\n    for (auto& w : waiters) w = new tbb::detail::d1::wait_context(0);\n\n    std::atomic<int> processed(0);\n    for ( int repeats = 0; repeats<10; ++repeats ) {\n        int idx = 0;\n        for ( int bunch = 0; bunch < num_bunches-1; ++bunch ) {\n            // Sync with the previous bunch of waiters to prevent \"false\" nested dependencies (when a nested task waits for an outer task).\n            while ( processed < bunch*bunch_size ) utils::yield();\n            // Run the bunch of threads/waiters that depend on the next bunch of threads/waiters.\n            for ( int i = 0; i<bunch_size; ++i ) {\n                waiters[idx]->reserve();\n                std::thread( TestMultipleWaitsThreadBody( bunch_size, num_tasks, a, waiters, processed, tgc ), idx++ ).detach();\n            }\n        }\n        // No sync because the threads of the last bunch do not call wait_for_all.\n        // Run the last bunch of threads.\n        for ( int i = 0; i<bunch_size; ++i )\n            std::thread( TestMultipleWaitsThreadBody( bunch_size, num_tasks, a, waiters, processed, tgc ), idx++ ).detach();\n        while ( processed ) utils::yield();\n    }\n    for (auto w : waiters) delete w;\n}\n\nvoid TestMultipleWaits() {\n    // Limit the number of threads to prevent heavy oversubscription.\n#if TBB_TEST_LOW_WORKLOAD\n    const int max_threads = std::min( 4, tbb::this_task_arena::max_concurrency() );\n#else\n    const int max_threads = std::min( 16, tbb::this_task_arena::max_concurrency() );\n#endif\n\n    utils::FastRandom<> rnd(1234);\n    for ( int threads = 1; threads <= max_threads; threads += utils::max( threads/2, 1 ) ) {\n        for ( int i = 0; i<3; ++i ) {\n            const int num_bunches = 3 + rnd.get()%3;\n            const int bunch_size = max_threads + rnd.get()%max_threads;\n            TestMultipleWaits( threads, num_bunches, bunch_size );\n        }\n    }\n}\n\n//--------------------------------------------------//\n\nvoid TestSmallStackSize() {\n    tbb::global_control gc(tbb::global_control::thread_stack_size,\n            tbb::global_control::active_value(tbb::global_control::thread_stack_size) / 2 );\n    // The test produces the warning (not a error) if fails. So the test is run many times\n    // to make the log annoying (to force to consider it as an error).\n    for (int i = 0; i < 100; ++i) {\n        tbb::task_arena a;\n        a.initialize();\n    }\n}\n\n//--------------------------------------------------//\n\nnamespace TestMoveSemanticsNS {\n    struct TestFunctor {\n        void operator()() const {};\n    };\n\n    struct MoveOnlyFunctor : utils::MoveOnly, TestFunctor {\n        MoveOnlyFunctor() : utils::MoveOnly() {};\n        MoveOnlyFunctor(MoveOnlyFunctor&& other) : utils::MoveOnly(std::move(other)) {};\n    };\n\n    struct MovePreferableFunctor : utils::Movable, TestFunctor {\n        MovePreferableFunctor() : utils::Movable() {};\n        MovePreferableFunctor(MovePreferableFunctor&& other) : utils::Movable( std::move(other) ) {};\n        MovePreferableFunctor(const MovePreferableFunctor& other) : utils::Movable(other) {};\n    };\n\n    struct NoMoveNoCopyFunctor : utils::NoCopy, TestFunctor {\n        NoMoveNoCopyFunctor() : utils::NoCopy() {};\n        // mv ctor is not allowed as cp ctor from parent NoCopy\n    private:\n        NoMoveNoCopyFunctor(NoMoveNoCopyFunctor&&);\n    };\n\n    void TestFunctors() {\n        tbb::task_arena ta;\n        MovePreferableFunctor mpf;\n        // execute() doesn't have any copies or moves of arguments inside the impl\n        ta.execute( NoMoveNoCopyFunctor() );\n\n        ta.enqueue( MoveOnlyFunctor() );\n        ta.enqueue( mpf );\n        REQUIRE_MESSAGE(mpf.alive, \"object was moved when was passed by lval\");\n        mpf.Reset();\n        ta.enqueue( std::move(mpf) );\n        REQUIRE_MESSAGE(!mpf.alive, \"object was copied when was passed by rval\");\n        mpf.Reset();\n    }\n}\n\nvoid TestMoveSemantics() {\n    TestMoveSemanticsNS::TestFunctors();\n}\n\n//--------------------------------------------------//\n\n#include <vector>\n\n#include \"common/state_trackable.h\"\n\nnamespace TestReturnValueNS {\n    struct noDefaultTag {};\n    class ReturnType : public StateTrackable<> {\n        static const int SIZE = 42;\n        std::vector<int> data;\n    public:\n        ReturnType(noDefaultTag) : StateTrackable<>(0) {}\n        // Define copy constructor to test that it is never called\n        ReturnType(const ReturnType& r) : StateTrackable<>(r), data(r.data) {}\n        ReturnType(ReturnType&& r) : StateTrackable<>(std::move(r)), data(std::move(r.data)) {}\n\n        void fill() {\n            for (int i = 0; i < SIZE; ++i)\n                data.push_back(i);\n        }\n        void check() {\n            REQUIRE(data.size() == unsigned(SIZE));\n            for (int i = 0; i < SIZE; ++i)\n                REQUIRE(data[i] == i);\n            StateTrackableCounters::counters_type& cnts = StateTrackableCounters::counters;\n            REQUIRE(cnts[StateTrackableBase::DefaultInitialized] == 0);\n            REQUIRE(cnts[StateTrackableBase::DirectInitialized] == 1);\n            std::size_t copied = cnts[StateTrackableBase::CopyInitialized];\n            std::size_t moved = cnts[StateTrackableBase::MoveInitialized];\n            REQUIRE(cnts[StateTrackableBase::Destroyed] == copied + moved);\n            // The number of copies/moves should not exceed 3 if copy elision takes a place:\n            // function return, store to an internal storage, acquire internal storage.\n            // For compilation, without copy elision, this number may be grown up to 7.\n            REQUIRE((copied == 0 && moved <= 7));\n            WARN_MESSAGE(moved <= 3,\n                \"Warning: The number of copies/moves should not exceed 3 if copy elision takes a place.\"\n                \"Take an attention to this warning only if copy elision is enabled.\"\n            );\n        }\n    };\n\n    template <typename R>\n    R function() {\n        noDefaultTag tag;\n        R r(tag);\n        r.fill();\n        return r;\n    }\n\n    template <>\n    void function<void>() {}\n\n    template <typename R>\n    struct Functor {\n        R operator()() const {\n            return function<R>();\n        }\n    };\n\n    tbb::task_arena& arena() {\n        static tbb::task_arena a;\n        return a;\n    }\n\n    template <typename F>\n    void TestExecute(F &f) {\n        StateTrackableCounters::reset();\n        ReturnType r{arena().execute(f)};\n        r.check();\n    }\n\n    template <typename F>\n    void TestExecute(const F &f) {\n        StateTrackableCounters::reset();\n        ReturnType r{arena().execute(f)};\n        r.check();\n    }\n    template <typename F>\n    void TestIsolate(F &f) {\n        StateTrackableCounters::reset();\n        ReturnType r{tbb::this_task_arena::isolate(f)};\n        r.check();\n    }\n\n    template <typename F>\n    void TestIsolate(const F &f) {\n        StateTrackableCounters::reset();\n        ReturnType r{tbb::this_task_arena::isolate(f)};\n        r.check();\n    }\n\n    void Test() {\n        TestExecute(Functor<ReturnType>());\n        Functor<ReturnType> f1;\n        TestExecute(f1);\n        TestExecute(function<ReturnType>);\n\n        arena().execute(Functor<void>());\n        Functor<void> f2;\n        arena().execute(f2);\n        arena().execute(function<void>);\n        TestIsolate(Functor<ReturnType>());\n        TestIsolate(f1);\n        TestIsolate(function<ReturnType>);\n        tbb::this_task_arena::isolate(Functor<void>());\n        tbb::this_task_arena::isolate(f2);\n        tbb::this_task_arena::isolate(function<void>);\n    }\n}\n\nvoid TestReturnValue() {\n    TestReturnValueNS::Test();\n}\n\n//--------------------------------------------------//\n\n// MyObserver checks if threads join to the same arena\nstruct MyObserver: public tbb::task_scheduler_observer {\n    tbb::enumerable_thread_specific<tbb::task_arena*>& my_tls;\n    tbb::task_arena& my_arena;\n    std::atomic<int>& my_failure_counter;\n    std::atomic<int>& my_counter;\n    utils::SpinBarrier& m_barrier;\n\n    MyObserver(tbb::task_arena& a,\n        tbb::enumerable_thread_specific<tbb::task_arena*>& tls,\n        std::atomic<int>& failure_counter,\n        std::atomic<int>& counter,\n        utils::SpinBarrier& barrier)\n        : tbb::task_scheduler_observer(a), my_tls(tls), my_arena(a),\n        my_failure_counter(failure_counter), my_counter(counter), m_barrier(barrier) {\n        observe(true);\n    }\n    ~MyObserver(){\n        observe(false);\n    }\n    void on_scheduler_entry(bool worker) override {\n        if (worker) {\n            ++my_counter;\n            tbb::task_arena*& cur_arena = my_tls.local();\n            if (cur_arena != nullptr && cur_arena != &my_arena) {\n                ++my_failure_counter;\n            }\n            cur_arena = &my_arena;\n            m_barrier.wait();\n        }\n    }\n    void on_scheduler_exit(bool worker) override {\n        if (worker) {\n            m_barrier.wait(); // before wakeup\n            m_barrier.wait(); // after wakeup\n        }\n    }\n};\n\nvoid TestArenaWorkersMigrationWithNumThreads(int n_threads = 0) {\n    if (n_threads == 0) {\n        n_threads = tbb::this_task_arena::max_concurrency();\n    }\n\n    const int max_n_arenas = 8;\n    int n_arenas = 2;\n    if(n_threads > 16) {\n        n_arenas = max_n_arenas;\n    } else if (n_threads > 8) {\n        n_arenas = 4;\n    }\n\n    int n_workers = n_threads - 1;\n    n_workers = n_arenas * (n_workers / n_arenas);\n    if (n_workers == 0) {\n        return;\n    }\n\n    n_threads = n_workers + 1;\n    tbb::global_control control(tbb::global_control::max_allowed_parallelism, n_threads);\n\n    const int n_repetitions = 20;\n    const int n_outer_repetitions = 100;\n    std::multiset<float> failure_ratio; // for median calculating\n    utils::SpinBarrier barrier(n_threads);\n    utils::SpinBarrier worker_barrier(n_workers);\n    MyObserver* observer[max_n_arenas];\n    std::vector<tbb::task_arena> arenas(n_arenas);\n    std::atomic<int> failure_counter;\n    std::atomic<int> counter;\n    tbb::enumerable_thread_specific<tbb::task_arena*> tls;\n\n    for (int i = 0; i < n_arenas; ++i) {\n        arenas[i].initialize(n_workers / n_arenas + 1); // +1 for master\n        observer[i] = new MyObserver(arenas[i], tls, failure_counter, counter, barrier);\n    }\n\n    int ii = 0;\n    for (; ii < n_outer_repetitions; ++ii) {\n        failure_counter = 0;\n        counter = 0;\n\n        // Main code\n        auto wakeup = [&arenas] { for (auto& a : arenas) a.enqueue([]{}); };\n        wakeup();\n        for (int j = 0; j < n_repetitions; ++j) {\n            barrier.wait(); // entry\n            barrier.wait(); // exit1\n            wakeup();\n            barrier.wait(); // exit2\n        }\n        barrier.wait(); // entry\n        barrier.wait(); // exit1\n        barrier.wait(); // exit2\n\n        failure_ratio.insert(float(failure_counter) / counter);\n        tls.clear();\n        // collect 3 elements in failure_ratio before calculating median\n        if (ii > 1) {\n            std::multiset<float>::iterator it = failure_ratio.begin();\n            std::advance(it, failure_ratio.size() / 2);\n            if (*it < 0.02)\n                break;\n        }\n    }\n    for (int i = 0; i < n_arenas; ++i) {\n        delete observer[i];\n    }\n    // check if median is so big\n    std::multiset<float>::iterator it = failure_ratio.begin();\n    std::advance(it, failure_ratio.size() / 2);\n    // TODO: decrease constants 0.05 and 0.3 by setting ratio between n_threads and n_arenas\n    if (*it > 0.05) {\n        REPORT(\"Warning: So many cases when threads join to different arenas.\\n\");\n        REQUIRE_MESSAGE(*it <= 0.3, \"A lot of cases when threads join to different arenas.\\n\");\n    }\n}\n\nvoid TestArenaWorkersMigration() {\n    TestArenaWorkersMigrationWithNumThreads(4);\n    if (tbb::this_task_arena::max_concurrency() != 4) {\n        TestArenaWorkersMigrationWithNumThreads();\n    }\n}\n\n//--------------------------------------------------//\nvoid TestDefaultCreatedWorkersAmount() {\n    int threads = tbb::this_task_arena::max_concurrency();\n    utils::NativeParallelFor(1, [threads](int idx) {\n        REQUIRE_MESSAGE(idx == 0, \"more than 1 thread is going to reset TLS\");\n        utils::SpinBarrier barrier(threads);\n        ResetTLS();\n        for (auto blocked : { false, true }) {\n            for (int trail = 0; trail < (blocked ? 10 : 10000); ++trail) {\n                tbb::parallel_for(0, threads, [threads, blocked, &barrier](int) {\n                    CHECK_FAST_MESSAGE(threads == tbb::this_task_arena::max_concurrency(), \"concurrency level is not equal specified threadnum\");\n                    CHECK_FAST_MESSAGE(tbb::this_task_arena::current_thread_index() < tbb::this_task_arena::max_concurrency(), \"amount of created threads is more than specified by default\");\n                    local_id.local() = 1;\n                    if (blocked) {\n                        // If there is more threads than expected, 'sleep' gives a chance to join unexpected threads.\n                        utils::Sleep(1);\n                        barrier.wait();\n                    }\n                }, tbb::simple_partitioner());\n                REQUIRE_MESSAGE(local_id.size() <= size_t(threads), \"amount of created threads is not equal to default num\");\n                if (blocked) {\n                    REQUIRE_MESSAGE(local_id.size() == size_t(threads), \"amount of created threads is not equal to default num\");\n                }\n            }\n        }\n    });\n}\n\nvoid TestAbilityToCreateWorkers(int thread_num) {\n    tbb::global_control thread_limit(tbb::global_control::max_allowed_parallelism, thread_num);\n    // Checks only some part of reserved-external threads amount:\n    // 0 and 1 reserved threads are important cases but it is also needed\n    // to collect some statistic data with other amount and to not consume\n    // whole test session time checking each amount\n    TestArenaConcurrency(thread_num - 1, 0, int(thread_num / 2.72));\n    TestArenaConcurrency(thread_num, 1, int(thread_num / 3.14));\n}\n\nvoid TestDefaultWorkersLimit() {\n    TestDefaultCreatedWorkersAmount();\n#if TBB_TEST_LOW_WORKLOAD\n    TestAbilityToCreateWorkers(24);\n#else\n    TestAbilityToCreateWorkers(256);\n#endif\n}\n\n#if TBB_USE_EXCEPTIONS\n\nvoid ExceptionInExecute() {\n    std::size_t thread_number = utils::get_platform_max_threads();\n    int arena_concurrency = static_cast<int>(thread_number) / 2;\n    tbb::task_arena test_arena(arena_concurrency, arena_concurrency);\n\n    std::atomic<int> canceled_task{};\n\n    auto parallel_func = [&test_arena, &canceled_task] (std::size_t) {\n        for (std::size_t i = 0; i < 1000; ++i) {\n            try {\n                test_arena.execute([] {\n                    volatile bool suppress_unreachable_code_warning = true;\n                    if (suppress_unreachable_code_warning) {\n                        throw -1;\n                    }\n                });\n                FAIL(\"An exception should have thrown.\");\n            } catch (int) {\n                ++canceled_task;\n            } catch (...) {\n                FAIL(\"Wrong type of exception.\");\n            }\n        }\n    };\n\n    utils::NativeParallelFor(thread_number, parallel_func);\n    CHECK(canceled_task == thread_number * 1000);\n}\n\n#endif // TBB_USE_EXCEPTIONS\n\nclass simple_observer : public tbb::task_scheduler_observer {\n    static std::atomic<int> idx_counter;\n    int my_idx;\n    int myMaxConcurrency;   // concurrency of the associated arena\n    int myNumReservedSlots; // reserved slots in the associated arena\n    void on_scheduler_entry( bool is_worker ) override {\n        int current_index = tbb::this_task_arena::current_thread_index();\n        CHECK(current_index < (myMaxConcurrency > 1 ? myMaxConcurrency : 2));\n        if (is_worker) {\n            CHECK(current_index >= myNumReservedSlots);\n        }\n    }\n    void on_scheduler_exit( bool /*is_worker*/ ) override\n    {}\npublic:\n    simple_observer(tbb::task_arena &a, int maxConcurrency, int numReservedSlots)\n        : tbb::task_scheduler_observer(a), my_idx(idx_counter++)\n        , myMaxConcurrency(maxConcurrency)\n        , myNumReservedSlots(numReservedSlots) {\n        observe(true);\n    }\n\n    ~simple_observer(){\n        observe(false);\n    }\n\n    friend bool operator<(const simple_observer& lhs, const simple_observer& rhs) {\n        return lhs.my_idx < rhs.my_idx;\n    }\n};\n\nstd::atomic<int> simple_observer::idx_counter{};\n\nstruct arena_handler {\n    enum arena_status {\n        alive,\n        deleting,\n        deleted\n    };\n\n    tbb::task_arena* arena;\n\n    std::atomic<arena_status> status{alive};\n    tbb::spin_rw_mutex arena_in_use{};\n\n    tbb::concurrent_set<simple_observer> observers;\n\n    arena_handler(tbb::task_arena* ptr) : arena(ptr)\n    {}\n\n    friend bool operator<(const arena_handler& lhs, const arena_handler& rhs) {\n        return lhs.arena < rhs.arena;\n    }\n};\n\n// TODO: Add observer operations\nvoid StressTestMixFunctionality() {\n    enum operation_type {\n        create_arena,\n        delete_arena,\n        attach_observer,\n        detach_observer,\n        arena_execute,\n        enqueue_task,\n        last_operation_marker\n    };\n\n    std::size_t operations_number = last_operation_marker;\n    std::size_t thread_number = utils::get_platform_max_threads();\n    utils::FastRandom<> operation_rnd(42);\n    tbb::spin_mutex random_operation_guard;\n\n    auto get_random_operation = [&operation_rnd, &random_operation_guard, operations_number] () {\n        tbb::spin_mutex::scoped_lock lock(random_operation_guard);\n        return static_cast<operation_type>(operation_rnd.get() % operations_number);\n    };\n\n    utils::FastRandom<> arena_rnd(42);\n    tbb::spin_mutex random_arena_guard;\n    auto get_random_arena = [&arena_rnd, &random_arena_guard] () {\n        tbb::spin_mutex::scoped_lock lock(random_arena_guard);\n        return arena_rnd.get();\n    };\n\n    tbb::concurrent_set<arena_handler> arenas_pool;\n\n    std::vector<std::thread> thread_pool;\n\n    utils::SpinBarrier thread_barrier(thread_number);\n    std::size_t max_operations = 20000;\n    std::atomic<std::size_t> curr_operation{};\n\n    auto find_arena = [&arenas_pool](tbb::spin_rw_mutex::scoped_lock& lock) -> decltype(arenas_pool.begin()) {\n        for (auto curr_arena = arenas_pool.begin(); curr_arena != arenas_pool.end(); ++curr_arena) {\n            if (lock.try_acquire(curr_arena->arena_in_use, /*writer*/ false)) {\n                if (curr_arena->status == arena_handler::alive) {\n                    return curr_arena;\n                }\n                else {\n                    lock.release();\n                }\n            }\n        }\n        return arenas_pool.end();\n    };\n\n    auto thread_func = [&] () {\n        arenas_pool.emplace(new tbb::task_arena());\n        thread_barrier.wait();\n        while (curr_operation++ < max_operations) {\n            switch (get_random_operation()) {\n                case create_arena :\n                {\n                    arenas_pool.emplace(new tbb::task_arena());\n                    break;\n                }\n                case delete_arena :\n                {\n                    auto curr_arena = arenas_pool.begin();\n                    for (; curr_arena != arenas_pool.end(); ++curr_arena) {\n                        arena_handler::arena_status curr_status = arena_handler::alive;\n                        if (curr_arena->status.compare_exchange_strong(curr_status, arena_handler::deleting)) {\n                            break;\n                        }\n                    }\n\n                    if (curr_arena == arenas_pool.end()) break;\n\n                    tbb::spin_rw_mutex::scoped_lock lock(curr_arena->arena_in_use, /*writer*/ true);\n\n                    delete curr_arena->arena;\n                    curr_arena->status.store(arena_handler::deleted);\n\n                    break;\n                }\n                case attach_observer :\n                {\n                    tbb::spin_rw_mutex::scoped_lock lock{};\n\n                    auto curr_arena = find_arena(lock);\n                    if (curr_arena != arenas_pool.end()) {\n                        curr_arena->observers.emplace(*curr_arena->arena, thread_number, 1);\n                    }\n                    break;\n                }\n                case detach_observer:\n                {\n                    auto arena_number = get_random_arena() % arenas_pool.size();\n                    auto curr_arena = arenas_pool.begin();\n                    std::advance(curr_arena, arena_number);\n\n                    for (auto it = curr_arena->observers.begin(); it != curr_arena->observers.end(); ++it) {\n                        if (it->is_observing()) {\n                            it->observe(false);\n                            break;\n                        }\n                    }\n\n                    break;\n                }\n                case arena_execute:\n                {\n                    tbb::spin_rw_mutex::scoped_lock lock{};\n                    auto curr_arena = find_arena(lock);\n\n                    if (curr_arena != arenas_pool.end()) {\n                        curr_arena->arena->execute([]() {\n                            tbb::affinity_partitioner aff;\n                            tbb::parallel_for(0, 10000, utils::DummyBody(10), tbb::auto_partitioner{});\n                            tbb::parallel_for(0, 10000, utils::DummyBody(10), aff);\n                        });\n                    }\n\n                    break;\n                }\n                case enqueue_task:\n                {\n                    tbb::spin_rw_mutex::scoped_lock lock{};\n                    auto curr_arena = find_arena(lock);\n\n                    if (curr_arena != arenas_pool.end()) {\n                        curr_arena->arena->enqueue([] { utils::doDummyWork(1000); });\n                    }\n\n                    break;\n                }\n                case last_operation_marker :\n                break;\n            }\n        }\n    };\n\n    for (std::size_t i = 0; i < thread_number - 1; ++i) {\n        thread_pool.emplace_back(thread_func);\n    }\n\n    thread_func();\n\n    for (std::size_t i = 0; i < thread_number - 1; ++i) {\n        if (thread_pool[i].joinable()) thread_pool[i].join();\n    }\n\n    for (auto& handler : arenas_pool) {\n        if (handler.status != arena_handler::deleted) delete handler.arena;\n    }\n}\n\nstruct enqueue_test_helper {\n    enqueue_test_helper(tbb::task_arena& arena, tbb::enumerable_thread_specific<bool>& ets , std::atomic<std::size_t>& task_counter)\n        : my_arena(arena), my_ets(ets), my_task_counter(task_counter)\n    {}\n\n    enqueue_test_helper(const enqueue_test_helper& ef) : my_arena(ef.my_arena), my_ets(ef.my_ets), my_task_counter(ef.my_task_counter)\n    {}\n\n    void operator() () const {\n        CHECK(my_ets.local());\n        if (my_task_counter++ < 100000) my_arena.enqueue(enqueue_test_helper(my_arena, my_ets, my_task_counter));\n        utils::yield();\n    }\n\n    tbb::task_arena& my_arena;\n    tbb::enumerable_thread_specific<bool>& my_ets;\n    std::atomic<std::size_t>& my_task_counter;\n};\n\nvoid test_threads_sleep(int concurrency, int reserved_slots, int num_external_threads) {\n    tbb::task_arena a(concurrency, reserved_slots);\n    std::mutex m;\n    std::condition_variable cond_var;\n    bool completed{ false };\n    utils::SpinBarrier barrier( concurrency - reserved_slots + 1 );\n\n    auto body = [&] {\n        std::unique_lock<std::mutex> lock(m);\n        cond_var.wait(lock, [&] { return completed == true; });\n    };\n\n    for (int i = 0; i < concurrency - reserved_slots; ++i) {\n        a.enqueue([&] {\n            body();\n            barrier.signalNoWait();\n        });\n    }\n    std::vector<std::thread> threads;\n    for (int i = 0; i < num_external_threads; ++i) {\n        threads.emplace_back([&]() { a.execute(body); });\n    }\n    TestCPUUserTime(concurrency);\n\n    {\n        std::lock_guard<std::mutex> lock(m);\n        completed = true;\n        cond_var.notify_all();\n    }\n    for (auto& t : threads) {\n        t.join();\n    }\n    barrier.wait();\n}\n\nvoid test_threads_sleep(int concurrency, int reserved_slots) {\n    test_threads_sleep(concurrency, reserved_slots, reserved_slots);\n    test_threads_sleep(concurrency, reserved_slots, 2 * concurrency);\n}\n\n//--------------------------------------------------//\n\n// This test requires TBB in an uninitialized state\n//! \\brief \\ref requirement\nTEST_CASE(\"task_arena initialize soft limit ignoring affinity mask\") {\n    REQUIRE_MESSAGE((tbb::this_task_arena::current_thread_index() == tbb::task_arena::not_initialized), \"TBB was initialized state\");\n    tbb::enumerable_thread_specific<int> ets;\n\n    tbb::task_arena arena(int(utils::get_platform_max_threads() * 2));\n    arena.execute([&ets] {\n        tbb::parallel_for(0, 10000000, [&ets](int){\n            ets.local() = 1;\n            utils::doDummyWork(100);\n        });\n    });\n\n    CHECK(ets.combine(std::plus<int>{}) <= int(utils::get_platform_max_threads()));\n}\n\n//! Test for task arena in concurrent cases\n//! \\brief \\ref requirement\nTEST_CASE(\"Test for concurrent functionality\") {\n    TestConcurrentFunctionality();\n}\n\n#if !EMSCRIPTEN\n//! For emscripten, FPU control state has not been set correctly\n//! Test for arena entry consistency\n//! \\brief \\ref requirement \\ref error_guessing\nTEST_CASE(\"Test for task arena entry consistency\") {\n    TestArenaEntryConsistency();\n}\n#endif\n\n//! Test for task arena attach functionality\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Test for the attach functionality\") {\n    TestAttach(4);\n}\n\n//! Test for constant functor requirements\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Test for constant functor requirement\") {\n    TestConstantFunctorRequirement();\n}\n\n//! Test for move semantics support\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Move semantics support\") {\n    TestMoveSemantics();\n}\n\n//! Test for different return value types\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Return value test\") {\n    TestReturnValue();\n}\n\n//! Test for delegated task spawn in case of unsuccessful slot attach\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Delegated spawn wait\") {\n    TestDelegatedSpawnWait();\n}\n\n#if !EMSCRIPTEN\n//! For emscripten, FPU control state has not been set correctly\n//! Test task arena isolation functionality\n//! \\brief \\ref requirement \\ref interface\nTEST_CASE(\"Isolated execute\") {\n    // Isolation tests cases is valid only for more then 2 threads\n    if (tbb::this_task_arena::max_concurrency() > 2) {\n        TestIsolatedExecute();\n    }\n}\n#endif\n\n//! Test for TBB Workers creation limits\n//! \\brief \\ref requirement\nTEST_CASE(\"Default workers limit\") {\n    TestDefaultWorkersLimit();\n}\n\n//! Test for workers migration between arenas\n//! \\brief \\ref error_guessing \\ref stress\nTEST_CASE(\"Arena workers migration\") {\n    TestArenaWorkersMigration();\n}\n\n#if !EMSCRIPTEN\n//! For emscripten, FPU control state has not been set correctly\n//! Test for multiple waits, threads should not block each other\n//! \\brief \\ref requirement\nTEST_CASE(\"Multiple waits\") {\n    TestMultipleWaits();\n}\n#endif\n\n//! Test for small stack size settings and arena initialization\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Small stack size\") {\n    TestSmallStackSize();\n}\n\n#if TBB_USE_EXCEPTIONS\n//! \\brief \\ref requirement \\ref stress\nTEST_CASE(\"Test for exceptions during execute.\") {\n    ExceptionInExecute();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Exception thrown during tbb::task_arena::execute call\") {\n    struct throwing_obj {\n        throwing_obj() {\n            volatile bool flag = true;\n            if (flag) throw std::exception{};\n        }\n        throwing_obj(const throwing_obj&) = default;\n        ~throwing_obj() { FAIL(\"An destructor was called.\"); }\n    };\n\n    tbb::task_arena arena;\n\n    REQUIRE_THROWS_AS( [&] {\n        arena.execute([] {\n            return throwing_obj{};\n        });\n    }(), std::exception );\n}\n#endif // TBB_USE_EXCEPTIONS\n\n//! \\brief \\ref stress\nTEST_CASE(\"Stress test with mixing functionality\") {\n    StressTestMixFunctionality();\n}\n\n// global_control::max_allowed_parallelism functionality is not covered by TCM\n#if !__TBB_TCM_TESTING_ENABLED\n//! \\brief \\ref stress\nTEST_CASE(\"Workers oversubscription\") {\n    std::size_t num_threads = utils::get_platform_max_threads();\n    tbb::enumerable_thread_specific<bool> ets;\n    tbb::global_control gl(tbb::global_control::max_allowed_parallelism, num_threads * 2);\n    tbb::task_arena arena(static_cast<int>(num_threads) * 2);\n\n    utils::SpinBarrier barrier(num_threads * 2);\n\n    arena.execute([&] {\n        tbb::parallel_for(std::size_t(0), num_threads * 2,\n            [&] (const std::size_t&) {\n                ets.local() = true;\n                barrier.wait();\n            }\n        );\n    });\n\n    utils::yield();\n\n    std::atomic<std::size_t> task_counter{0};\n    for (std::size_t i = 0; i < num_threads / 4 + 1; ++i) {\n        arena.enqueue(enqueue_test_helper(arena, ets, task_counter));\n    }\n\n    while (task_counter < 100000) utils::yield();\n\n    arena.execute([&] {\n        tbb::parallel_for(std::size_t(0), num_threads * 2,\n            [&] (const std::size_t&) {\n                CHECK(ets.local());\n                barrier.wait();\n            }\n        );\n    });\n}\n#endif\n\n#if TBB_USE_EXCEPTIONS\n//! The test for error in scheduling empty task_handle\n//! \\brief \\ref requirement\nTEST_CASE(\"Empty task_handle cannot be scheduled\"\n        * doctest::should_fail()    //Test needs to revised as implementation uses assertions instead of exceptions\n        * doctest::skip()           //skip the test for now, to not pollute the test log\n){\n    tbb::task_arena ta;\n\n    CHECK_THROWS_WITH_AS(ta.enqueue(tbb::task_handle{}),                    \"Attempt to schedule empty task_handle\", std::runtime_error);\n    CHECK_THROWS_WITH_AS(tbb::this_task_arena::enqueue(tbb::task_handle{}), \"Attempt to schedule empty task_handle\", std::runtime_error);\n}\n#endif\n\n#if !EMSCRIPTEN\n//! For emscripten, FPU control state has not been set correctly\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test threads sleep\") {\n    for (auto concurrency_level : utils::concurrency_range()) {\n        int conc = int(concurrency_level);\n        test_threads_sleep(conc, 0);\n        test_threads_sleep(conc, 1);\n        test_threads_sleep(conc, conc/2);\n        test_threads_sleep(conc, conc);\n    }\n}\n#endif\n\n#if __TBB_PREVIEW_TASK_GROUP_EXTENSIONS\n\n//! Basic test for is_inside_task in task_group\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"is_inside_task in task_group\"){\n    CHECK( false == tbb::is_inside_task());\n\n    tbb::task_group tg;\n    tg.run_and_wait([&]{\n        CHECK( true == tbb::is_inside_task());\n    });\n}\n\n//! Basic test for is_inside_task in arena::execute\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"is_inside_task in arena::execute\"){\n    CHECK( false == tbb::is_inside_task());\n\n    tbb::task_arena arena;\n\n    arena.execute([&]{\n        // The execute method is processed outside of any task\n        CHECK( false == tbb::is_inside_task());\n    });\n}\n\n//! The test for is_inside_task in arena::execute when inside other task\n//! \\brief \\ref error_guessing\nTEST_CASE(\"is_inside_task in arena::execute\") {\n    CHECK(false == tbb::is_inside_task());\n\n    tbb::task_arena arena;\n    tbb::task_group tg;\n    tg.run_and_wait([&] {\n        arena.execute([&] {\n            // The execute method is processed outside of any task\n            CHECK(false == tbb::is_inside_task());\n        });\n    });\n}\n#endif //__TBB_PREVIEW_TASK_GROUP_EXTENSIONS\n\n//! \\brief \\ref interface \\ref requirement \\ref regression\nTEST_CASE(\"worker threads occupy slots in correct range\") {\n    std::vector<tbb::task_arena> arenas(42);\n    for (auto& arena : arenas) {\n        arena.initialize(1, 0);\n    }\n\n    std::atomic<int> counter{0};\n    for (auto& arena : arenas) {\n        arena.enqueue([&] {\n            CHECK(tbb::this_task_arena::current_thread_index() == 0);\n            ++counter;\n        });\n    }\n\n    while (counter < 42) { utils::yield(); }\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_task_group.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"oneapi/tbb/detail/_config.h\"\n#include \"tbb/global_control.h\"\n\n#include \"tbb/task_group.h\"\n\n#include \"common/concurrency_tracker.h\"\n\n#include <atomic>\n#include <stdexcept>\n\n//! \\file test_task_group.cpp\n//! \\brief Test for [scheduler.task_group scheduler.task_group_status] specification\n\nunsigned g_MaxConcurrency = 4;\nusing atomic_t = std::atomic<std::uintptr_t>;\nunsigned MinThread = 1;\nunsigned MaxThread = 4;\n\n//------------------------------------------------------------------------\n// Tests for the thread safety of the task_group manipulations\n//------------------------------------------------------------------------\n\n#include \"common/spin_barrier.h\"\n\nenum SharingMode {\n    VagabondGroup = 1,\n    ParallelWait = 2\n};\n\ntemplate<typename task_group_type>\nclass SharedGroupBodyImpl : utils::NoCopy, utils::NoAfterlife {\n    static const std::uintptr_t c_numTasks0 = 4096,\n                        c_numTasks1 = 1024;\n\n    const std::uintptr_t m_numThreads;\n    const std::uintptr_t m_sharingMode;\n\n    task_group_type *m_taskGroup;\n    atomic_t m_tasksSpawned,\n             m_threadsReady;\n    utils::SpinBarrier m_barrier;\n\n    static atomic_t s_tasksExecuted;\n\n    struct TaskFunctor {\n        SharedGroupBodyImpl *m_pOwner;\n        void operator () () const {\n            if ( m_pOwner->m_sharingMode & ParallelWait ) {\n                while ( utils::ConcurrencyTracker::PeakParallelism() < m_pOwner->m_numThreads )\n                    utils::yield();\n            }\n            ++s_tasksExecuted;\n        }\n    };\n\n    TaskFunctor m_taskFunctor;\n\n    void Spawn ( std::uintptr_t numTasks ) {\n        for ( std::uintptr_t i = 0; i < numTasks; ++i ) {\n            ++m_tasksSpawned;\n            utils::ConcurrencyTracker ct;\n            m_taskGroup->run( m_taskFunctor );\n        }\n        ++m_threadsReady;\n    }\n\n    void DeleteTaskGroup () {\n        delete m_taskGroup;\n        m_taskGroup = nullptr;\n    }\n\n    void Wait () {\n        while ( m_threadsReady != m_numThreads )\n            utils::yield();\n        const std::uintptr_t numSpawned = c_numTasks0 + c_numTasks1 * (m_numThreads - 1);\n        CHECK_MESSAGE( m_tasksSpawned == numSpawned, \"Wrong number of spawned tasks. The test is broken\" );\n        INFO(\"Max spawning parallelism is \" << utils::ConcurrencyTracker::PeakParallelism() << \"out of \" << g_MaxConcurrency);\n        if ( m_sharingMode & ParallelWait ) {\n            m_barrier.wait( &utils::ConcurrencyTracker::Reset );\n            {\n                utils::ConcurrencyTracker ct;\n                m_taskGroup->wait();\n            }\n            if ( utils::ConcurrencyTracker::PeakParallelism() == 1 ) {\n                const char* msg = \"Warning: No parallel waiting detected in TestParallelWait\";\n                WARN( msg );\n            }\n            m_barrier.wait();\n        }\n        else\n            m_taskGroup->wait();\n        CHECK_MESSAGE( m_tasksSpawned == numSpawned, \"No tasks should be spawned after wait starts. The test is broken\" );\n        CHECK_MESSAGE( s_tasksExecuted == numSpawned, \"Not all spawned tasks were executed\" );\n    }\n\npublic:\n    SharedGroupBodyImpl ( std::uintptr_t numThreads, std::uintptr_t sharingMode = 0 )\n        : m_numThreads(numThreads)\n        , m_sharingMode(sharingMode)\n        , m_taskGroup(nullptr)\n        , m_barrier(numThreads)\n    {\n        CHECK_MESSAGE( m_numThreads > 1, \"SharedGroupBody tests require concurrency\" );\n        if ((m_sharingMode & VagabondGroup) && m_numThreads != 2) {\n            CHECK_MESSAGE(false, \"In vagabond mode SharedGroupBody must be used with 2 threads only\");\n        }\n        utils::ConcurrencyTracker::Reset();\n        s_tasksExecuted = 0;\n        m_tasksSpawned = 0;\n        m_threadsReady = 0;\n        m_taskFunctor.m_pOwner = this;\n    }\n\n    void Run ( std::uintptr_t idx ) {\n        AssertLive();\n        if ( idx == 0 ) {\n            if (m_taskGroup || m_tasksSpawned) {\n                CHECK_MESSAGE(false, \"SharedGroupBody must be reset before reuse\");\n            }\n            m_taskGroup = new task_group_type;\n            Spawn( c_numTasks0 );\n            Wait();\n            if ( m_sharingMode & VagabondGroup )\n                m_barrier.wait();\n            else\n                DeleteTaskGroup();\n        }\n        else {\n            while ( m_tasksSpawned == 0 )\n                utils::yield();\n            CHECK_MESSAGE ( m_taskGroup, \"Task group is not initialized\");\n            Spawn (c_numTasks1);\n            if ( m_sharingMode & ParallelWait )\n                Wait();\n            if ( m_sharingMode & VagabondGroup ) {\n                CHECK_MESSAGE ( idx == 1, \"In vagabond mode SharedGroupBody must be used with 2 threads only\" );\n                m_barrier.wait();\n                DeleteTaskGroup();\n            }\n        }\n        AssertLive();\n    }\n};\n\ntemplate<typename task_group_type>\natomic_t SharedGroupBodyImpl<task_group_type>::s_tasksExecuted;\n\ntemplate<typename task_group_type>\nclass  SharedGroupBody : utils::NoAssign, utils::NoAfterlife {\n    bool m_bOwner;\n    SharedGroupBodyImpl<task_group_type> *m_pImpl;\npublic:\n    SharedGroupBody ( std::uintptr_t numThreads, std::uintptr_t sharingMode = 0 )\n        : utils::NoAssign()\n        , utils::NoAfterlife()\n        , m_bOwner(true)\n        , m_pImpl( new SharedGroupBodyImpl<task_group_type>(numThreads, sharingMode) )\n    {}\n    SharedGroupBody ( const SharedGroupBody& src )\n        : utils::NoAssign()\n        , utils::NoAfterlife()\n        , m_bOwner(false)\n        , m_pImpl(src.m_pImpl)\n    {}\n    ~SharedGroupBody () {\n        if ( m_bOwner )\n            delete m_pImpl;\n    }\n    void operator() ( std::uintptr_t idx ) const {\n        // Wrap the functior into additional task group to enforce bounding.\n        task_group_type tg;\n        tg.run_and_wait([&] { m_pImpl->Run(idx); });\n    }\n};\n\ntemplate<typename task_group_type>\nclass RunAndWaitSyncronizationTestBody : utils::NoAssign {\n    utils::SpinBarrier& m_barrier;\n    std::atomic<bool>& m_completed;\n    task_group_type& m_tg;\npublic:\n    RunAndWaitSyncronizationTestBody(utils::SpinBarrier& barrier, std::atomic<bool>& completed, task_group_type& tg)\n        : m_barrier(barrier), m_completed(completed), m_tg(tg) {}\n\n    void operator()() const {\n        m_barrier.wait();\n        utils::doDummyWork(100000);\n        m_completed = true;\n    }\n\n    void operator()(int id) const {\n        if (id == 0) {\n            m_tg.run_and_wait(*this);\n        } else {\n            m_barrier.wait();\n            m_tg.wait();\n            CHECK_MESSAGE(m_completed, \"A concurrent waiter has left the wait method earlier than work has finished\");\n        }\n    }\n};\n\ntemplate<typename task_group_type>\nvoid TestParallelSpawn () {\n    NativeParallelFor( g_MaxConcurrency, SharedGroupBody<task_group_type>(g_MaxConcurrency) );\n}\n\ntemplate<typename task_group_type>\nvoid TestParallelWait () {\n    NativeParallelFor( g_MaxConcurrency, SharedGroupBody<task_group_type>(g_MaxConcurrency, ParallelWait) );\n\n    utils::SpinBarrier barrier(g_MaxConcurrency);\n    std::atomic<bool> completed;\n    completed = false;\n    task_group_type tg;\n    RunAndWaitSyncronizationTestBody<task_group_type> b(barrier, completed, tg);\n    NativeParallelFor( g_MaxConcurrency, b );\n}\n\n// Tests non-stack-bound task group (the group that is allocated by one thread and destroyed by the other)\ntemplate<typename task_group_type>\nvoid TestVagabondGroup () {\n    NativeParallelFor( 2, SharedGroupBody<task_group_type>(2, VagabondGroup) );\n}\n\n#include \"common/memory_usage.h\"\n\ntemplate<typename task_group_type>\nvoid TestThreadSafety() {\n    auto tests = [] {\n        for (int trail = 0; trail < 10; ++trail) {\n            TestParallelSpawn<task_group_type>();\n            TestParallelWait<task_group_type>();\n            TestVagabondGroup<task_group_type>();\n        }\n    };\n\n    // Test and warm up allocator.\n    tests();\n\n    // Ensure that cosumption is stabilized.\n    std::size_t initial = utils::GetMemoryUsage();\n    for (;;) {\n        tests();\n        std::size_t current = utils::GetMemoryUsage();\n        if (current <= initial) {\n            return;\n        }\n        initial = current;\n    }\n}\n//------------------------------------------------------------------------\n// Common requisites of the Fibonacci tests\n//------------------------------------------------------------------------\n\nconst std::uintptr_t N = 20;\nconst std::uintptr_t F = 6765;\n\natomic_t g_Sum;\n\n#define FIB_TEST_PROLOGUE() \\\n    const unsigned numRepeats = g_MaxConcurrency * 4;    \\\n    utils::ConcurrencyTracker::Reset()\n\n#define FIB_TEST_EPILOGUE(sum) \\\n    CHECK(utils::ConcurrencyTracker::PeakParallelism() <= g_MaxConcurrency); \\\n    CHECK( sum == numRepeats * F );\n\n\n// Fibonacci tasks specified as functors\ntemplate<class task_group_type>\nclass FibTaskBase : utils::NoAssign, utils::NoAfterlife {\nprotected:\n    std::uintptr_t* m_pRes;\n    mutable std::uintptr_t m_Num;\n    virtual void impl() const = 0;\npublic:\n    FibTaskBase( std::uintptr_t* y, std::uintptr_t n ) : m_pRes(y), m_Num(n) {}\n    void operator()() const {\n        utils::ConcurrencyTracker ct;\n        AssertLive();\n        if( m_Num < 2 ) {\n            *m_pRes = m_Num;\n        } else {\n            impl();\n        }\n    }\n    virtual ~FibTaskBase() {}\n};\n\ntemplate<class task_group_type>\nclass FibTaskAsymmetricTreeWithFunctor : public FibTaskBase<task_group_type> {\npublic:\n    FibTaskAsymmetricTreeWithFunctor( std::uintptr_t* y, std::uintptr_t n ) : FibTaskBase<task_group_type>(y, n) {}\n    virtual void impl() const override {\n        std::uintptr_t x = ~0u;\n        task_group_type tg;\n        tg.run( FibTaskAsymmetricTreeWithFunctor(&x, this->m_Num-1) );\n        this->m_Num -= 2; tg.run_and_wait( *this );\n        *(this->m_pRes) += x;\n    }\n};\n\ntemplate<class task_group_type>\nclass FibTaskSymmetricTreeWithFunctor : public FibTaskBase<task_group_type> {\npublic:\n    FibTaskSymmetricTreeWithFunctor( std::uintptr_t* y, std::uintptr_t n ) : FibTaskBase<task_group_type>(y, n) {}\n    virtual void impl() const override {\n        std::uintptr_t x = ~0u,\n               y = ~0u;\n        task_group_type tg;\n        tg.run( FibTaskSymmetricTreeWithFunctor(&x, this->m_Num-1) );\n        tg.run( FibTaskSymmetricTreeWithFunctor(&y, this->m_Num-2) );\n        tg.wait();\n        *(this->m_pRes) = x + y;\n    }\n};\n\n// Helper functions\ntemplate<class fib_task>\nstd::uintptr_t RunFibTask(std::uintptr_t n) {\n    std::uintptr_t res = ~0u;\n    fib_task(&res, n)();\n    return res;\n}\n\ntemplate<typename fib_task>\nvoid RunFibTest() {\n    FIB_TEST_PROLOGUE();\n    std::uintptr_t sum = 0;\n    for( unsigned i = 0; i < numRepeats; ++i )\n        sum += RunFibTask<fib_task>(N);\n    FIB_TEST_EPILOGUE(sum);\n}\n\ntemplate<typename fib_task>\nvoid FibFunctionNoArgs() {\n    g_Sum += RunFibTask<fib_task>(N);\n}\n\ntemplate<typename task_group_type>\nvoid TestFibWithLambdas() {\n    FIB_TEST_PROLOGUE();\n    atomic_t sum;\n    sum = 0;\n    task_group_type tg;\n    for( unsigned i = 0; i < numRepeats; ++i )\n        tg.run( [&](){sum += RunFibTask<FibTaskSymmetricTreeWithFunctor<task_group_type> >(N);} );\n    tg.wait();\n    FIB_TEST_EPILOGUE(sum);\n}\n\ntemplate<typename task_group_type>\nvoid TestFibWithFunctor() {\n    RunFibTest<FibTaskAsymmetricTreeWithFunctor<task_group_type> >();\n    RunFibTest< FibTaskSymmetricTreeWithFunctor<task_group_type> >();\n}\n\ntemplate<typename task_group_type>\nvoid TestFibWithFunctionPtr() {\n    FIB_TEST_PROLOGUE();\n    g_Sum = 0;\n    task_group_type tg;\n    for( unsigned i = 0; i < numRepeats; ++i )\n        tg.run( &FibFunctionNoArgs<FibTaskSymmetricTreeWithFunctor<task_group_type> > );\n    tg.wait();\n    FIB_TEST_EPILOGUE(g_Sum);\n}\n\ntemplate<typename task_group_type>\nvoid RunFibonacciTests() {\n    TestFibWithLambdas<task_group_type>();\n    TestFibWithFunctor<task_group_type>();\n    TestFibWithFunctionPtr<task_group_type>();\n}\n\nclass test_exception : public std::exception\n{\n    const char* m_strDescription;\npublic:\n    test_exception ( const char* descr ) : m_strDescription(descr) {}\n\n    const char* what() const noexcept override { return m_strDescription; }\n};\n\nusing TestException = test_exception;\n\n#include <string.h>\n\n#define NUM_CHORES      512\n#define NUM_GROUPS      64\n#define SKIP_CHORES     (NUM_CHORES/4)\n#define SKIP_GROUPS     (NUM_GROUPS/4)\n#define EXCEPTION_DESCR1 \"Test exception 1\"\n#define EXCEPTION_DESCR2 \"Test exception 2\"\n\natomic_t g_ExceptionCount;\natomic_t g_TaskCount;\nunsigned g_ExecutedAtCancellation;\nbool g_Rethrow;\nbool g_Throw;\n\nclass ThrowingTask : utils::NoAssign, utils::NoAfterlife {\n    atomic_t &m_TaskCount;\npublic:\n    ThrowingTask( atomic_t& counter ) : m_TaskCount(counter) {}\n    void operator() () const {\n        utils::ConcurrencyTracker ct;\n        AssertLive();\n        if ( g_Throw ) {\n            if ( ++m_TaskCount == SKIP_CHORES )\n                TBB_TEST_THROW(test_exception(EXCEPTION_DESCR1));\n            utils::yield();\n        }\n        else {\n            ++g_TaskCount;\n            while( !tbb::is_current_task_group_canceling() )\n                utils::yield();\n        }\n    }\n};\n\ninline void ResetGlobals ( bool bThrow, bool bRethrow ) {\n    g_Throw = bThrow;\n    g_Rethrow = bRethrow;\n    g_ExceptionCount = 0;\n    g_TaskCount = 0;\n    utils::ConcurrencyTracker::Reset();\n}\n\ntemplate<typename task_group_type>\nvoid LaunchChildrenWithFunctor () {\n    atomic_t count;\n    count = 0;\n    task_group_type g;\n    for (unsigned i = 0; i < NUM_CHORES; ++i) {\n        if (i % 2 == 1) {\n            g.run(g.defer(ThrowingTask(count)));\n        } else\n        {\n            g.run(ThrowingTask(count));\n        }\n    }\n#if TBB_USE_EXCEPTIONS\n    tbb::task_group_status status = tbb::not_complete;\n    bool exceptionCaught = false;\n    try {\n        status = g.wait();\n    } catch ( TestException& e ) {\n        CHECK_MESSAGE( e.what(), \"Empty what() string\" );\n        CHECK_MESSAGE( strcmp(e.what(), EXCEPTION_DESCR1) == 0, \"Unknown exception\" );\n        exceptionCaught = true;\n        ++g_ExceptionCount;\n    } catch( ... ) { CHECK_MESSAGE( false, \"Unknown exception\" ); }\n    if (g_Throw && !exceptionCaught && status != tbb::canceled) {\n        CHECK_MESSAGE(false, \"No exception in the child task group\");\n    }\n    if ( g_Rethrow && g_ExceptionCount > SKIP_GROUPS ) {\n        throw test_exception(EXCEPTION_DESCR2);\n    }\n#else\n    g.wait();\n#endif\n}\n\n// Tests for cancellation and exception handling behavior\ntemplate<typename task_group_type>\nvoid TestManualCancellationWithFunctor () {\n    ResetGlobals( false, false );\n    task_group_type tg;\n    for (unsigned i = 0; i < NUM_GROUPS; ++i) {\n        // TBB version does not require taking function address\n        if (i % 2 == 0) {\n            auto h = tg.defer(&LaunchChildrenWithFunctor<task_group_type>);\n            tg.run(std::move(h));\n        } else\n        {\n            tg.run(&LaunchChildrenWithFunctor<task_group_type>);\n        }\n    }\n    CHECK_MESSAGE ( !tbb::is_current_task_group_canceling(), \"Unexpected cancellation\" );\n    while ( g_MaxConcurrency > 1 && g_TaskCount == 0 )\n        utils::yield();\n    tg.cancel();\n    g_ExecutedAtCancellation = int(g_TaskCount);\n    tbb::task_group_status status = tg.wait();\n    CHECK_MESSAGE( status == tbb::canceled, \"Task group reported invalid status.\" );\n    CHECK_MESSAGE( g_TaskCount <= NUM_GROUPS * NUM_CHORES, \"Too many tasks reported. The test is broken\" );\n    CHECK_MESSAGE( g_TaskCount < NUM_GROUPS * NUM_CHORES, \"No tasks were cancelled. Cancellation model changed?\" );\n    CHECK_MESSAGE( g_TaskCount <= g_ExecutedAtCancellation + utils::ConcurrencyTracker::PeakParallelism(), \"Too many tasks survived cancellation\" );\n}\n\n#if TBB_USE_EXCEPTIONS\ntemplate<typename task_group_type>\nvoid TestExceptionHandling1 () {\n    ResetGlobals( true, false );\n    task_group_type tg;\n    for( unsigned i = 0; i < NUM_GROUPS; ++i )\n        // TBB version does not require taking function address\n        tg.run( &LaunchChildrenWithFunctor<task_group_type> );\n    try {\n        tg.wait();\n    } catch ( ... ) {\n        CHECK_MESSAGE( false, \"Unexpected exception\" );\n    }\n    CHECK_MESSAGE( g_ExceptionCount <= NUM_GROUPS, \"Too many exceptions from the child groups. The test is broken\" );\n    CHECK_MESSAGE( g_ExceptionCount == NUM_GROUPS, \"Not all child groups threw the exception\" );\n}\n\ntemplate<typename task_group_type>\nvoid TestExceptionHandling2 () {\n    ResetGlobals( true, true );\n    task_group_type tg;\n    bool exceptionCaught = false;\n    for( unsigned i = 0; i < NUM_GROUPS; ++i ) {\n        // TBB version does not require taking function address\n        tg.run( &LaunchChildrenWithFunctor<task_group_type> );\n    }\n    try {\n        tg.wait();\n    } catch ( TestException& e ) {\n        CHECK_MESSAGE( e.what(), \"Empty what() string\" );\n        CHECK_MESSAGE( strcmp(e.what(), EXCEPTION_DESCR2) == 0, \"Unknown exception\" );\n        exceptionCaught = true;\n    } catch( ... ) { CHECK_MESSAGE( false, \"Unknown exception\" ); }\n    CHECK_MESSAGE( exceptionCaught, \"No exception thrown from the root task group\" );\n    CHECK_MESSAGE( g_ExceptionCount >= SKIP_GROUPS, \"Too few exceptions from the child groups. The test is broken\" );\n    CHECK_MESSAGE( g_ExceptionCount <= NUM_GROUPS - SKIP_GROUPS, \"Too many exceptions from the child groups. The test is broken\" );\n    CHECK_MESSAGE( g_ExceptionCount < NUM_GROUPS - SKIP_GROUPS, \"None of the child groups was cancelled\" );\n}\n\ntemplate <typename task_group_type>\nvoid TestExceptionHandling3() {\n    task_group_type tg;\n    try {\n        tg.run_and_wait([]() {\n            volatile bool suppress_unreachable_code_warning = true;\n            if (suppress_unreachable_code_warning) {\n                throw 1;\n            }\n        });\n    } catch (int error) {\n        CHECK(error == 1);\n    } catch ( ... ) {\n        CHECK_MESSAGE( false, \"Unexpected exception\" );\n    }\n}\n\ntemplate<typename task_group_type>\nclass LaunchChildrenDriver {\npublic:\n    void Launch(task_group_type& tg) {\n        ResetGlobals(false, false);\n        for (unsigned i = 0; i < NUM_GROUPS; ++i) {\n            tg.run(LaunchChildrenWithFunctor<task_group_type>);\n        }\n        CHECK_MESSAGE(!tbb::is_current_task_group_canceling(), \"Unexpected cancellation\");\n        while (g_MaxConcurrency > 1 && g_TaskCount == 0)\n            utils::yield();\n    }\n\n    void Finish() {\n        CHECK_MESSAGE(g_TaskCount <= NUM_GROUPS * NUM_CHORES, \"Too many tasks reported. The test is broken\");\n        CHECK_MESSAGE(g_TaskCount < NUM_GROUPS * NUM_CHORES, \"No tasks were cancelled. Cancellation model changed?\");\n        CHECK_MESSAGE(g_TaskCount <= g_ExecutedAtCancellation + g_MaxConcurrency, \"Too many tasks survived cancellation\");\n    }\n}; // LaunchChildrenWithTaskHandleDriver\n\ntemplate<typename task_group_type, bool Throw>\nvoid TestMissingWait () {\n    bool exception_occurred = false,\n         unexpected_exception = false;\n    LaunchChildrenDriver<task_group_type> driver;\n    try {\n        task_group_type tg;\n        driver.Launch( tg );\n        volatile bool suppress_unreachable_code_warning = Throw;\n        if (suppress_unreachable_code_warning) {\n            throw int(); // Initiate stack unwinding\n        }\n    }\n    catch ( const tbb::missing_wait& e ) {\n        CHECK_MESSAGE( e.what(), \"Error message is absent\" );\n        exception_occurred = true;\n        unexpected_exception = Throw;\n    }\n    catch ( int ) {\n        exception_occurred = true;\n        unexpected_exception = !Throw;\n    }\n    catch ( ... ) {\n        exception_occurred = unexpected_exception = true;\n    }\n    CHECK( exception_occurred );\n    CHECK( !unexpected_exception );\n    driver.Finish();\n}\n#endif\n\ntemplate<typename task_group_type>\nvoid RunCancellationAndExceptionHandlingTests() {\n    TestManualCancellationWithFunctor<task_group_type>();\n#if TBB_USE_EXCEPTIONS\n    TestExceptionHandling1<task_group_type>();\n    TestExceptionHandling2<task_group_type>();\n    TestExceptionHandling3<task_group_type>();\n    TestMissingWait<task_group_type, true>();\n    TestMissingWait<task_group_type, false>();\n#endif\n}\n\nvoid EmptyFunction () {}\n\nstruct TestFunctor {\n    void operator()() { CHECK_MESSAGE( false, \"Non-const operator called\" ); }\n    void operator()() const { /* library requires this overload only */ }\n};\n\ntemplate<typename task_group_type>\nvoid TestConstantFunctorRequirement() {\n    task_group_type g;\n    TestFunctor tf;\n    g.run( tf ); g.wait();\n    g.run_and_wait( tf );\n}\n\n//------------------------------------------------------------------------\nnamespace TestMoveSemanticsNS {\n    struct TestFunctor {\n        void operator()() const {};\n    };\n\n    struct MoveOnlyFunctor : utils::MoveOnly, TestFunctor {\n        MoveOnlyFunctor() : utils::MoveOnly() {};\n        MoveOnlyFunctor(MoveOnlyFunctor&& other) : utils::MoveOnly(std::move(other)) {};\n    };\n\n    struct MovePreferableFunctor : utils::Movable, TestFunctor {\n        MovePreferableFunctor() : utils::Movable() {};\n        MovePreferableFunctor(MovePreferableFunctor&& other) : utils::Movable(std::move(other)) {};\n        MovePreferableFunctor(const MovePreferableFunctor& other) : utils::Movable(other) {};\n    };\n\n    struct NoMoveNoCopyFunctor : utils::NoCopy, TestFunctor {\n        NoMoveNoCopyFunctor() : utils::NoCopy() {};\n        // mv ctor is not allowed as cp ctor from parent utils::NoCopy\n    private:\n        NoMoveNoCopyFunctor(NoMoveNoCopyFunctor&&);\n    };\n\n     template<typename task_group_type>\n    void TestBareFunctors() {\n        task_group_type tg;\n        MovePreferableFunctor mpf;\n        // run_and_wait() doesn't have any copies or moves of arguments inside the impl\n        tg.run_and_wait( NoMoveNoCopyFunctor() );\n\n        tg.run( MoveOnlyFunctor() );\n        tg.wait();\n\n        tg.run( mpf );\n        tg.wait();\n        CHECK_MESSAGE(mpf.alive, \"object was moved when was passed by lval\");\n        mpf.Reset();\n\n        tg.run( std::move(mpf) );\n        tg.wait();\n        CHECK_MESSAGE(!mpf.alive, \"object was copied when was passed by rval\");\n        mpf.Reset();\n    }\n}\n\ntemplate<typename task_group_type>\nvoid TestMoveSemantics() {\n    TestMoveSemanticsNS::TestBareFunctors<task_group_type>();\n}\n//------------------------------------------------------------------------\n\n// TODO: TBB_REVAMP_TODO - enable when ETS is available\n#if TBBTEST_USE_TBB && TBB_PREVIEW_ISOLATED_TASK_GROUP\nnamespace TestIsolationNS {\n    class DummyFunctor {\n    public:\n        DummyFunctor() {}\n        void operator()() const {\n            for ( volatile int j = 0; j < 10; ++j ) {}\n        }\n    };\n\n    template<typename task_group_type>\n    class ParForBody {\n        task_group_type& m_tg;\n        std::atomic<bool>& m_preserved;\n        tbb::enumerable_thread_specific<int>& m_ets;\n    public:\n        ParForBody(\n            task_group_type& tg,\n            std::atomic<bool>& preserved,\n            tbb::enumerable_thread_specific<int>& ets\n        ) : m_tg(tg), m_preserved(preserved), m_ets(ets) {}\n\n        void operator()(int) const {\n            if (++m_ets.local() > 1) m_preserved = false;\n\n            for (int i = 0; i < 1000; ++i)\n                m_tg.run(DummyFunctor());\n            m_tg.wait();\n            m_tg.run_and_wait(DummyFunctor());\n\n            --m_ets.local();\n        }\n    };\n\n    template<typename task_group_type>\n    void CheckIsolation(bool isolation_is_expected) {\n        task_group_type tg;\n        std::atomic<bool> isolation_is_preserved;\n        isolation_is_preserved = true;\n        tbb::enumerable_thread_specific<int> ets(0);\n\n        tbb::parallel_for(0, 100, ParForBody<task_group_type>(tg, isolation_is_preserved, ets));\n\n        ASSERT(\n            isolation_is_expected == isolation_is_preserved,\n            \"Actual and expected isolation-related behaviours are different\"\n        );\n    }\n\n    // Should be called only when > 1 thread is used, because otherwise isolation is guaranteed to take place\n    void TestIsolation() {\n        CheckIsolation<tbb::task_group>(false);\n        CheckIsolation<tbb::isolated_task_group>(true);\n    }\n}\n#endif\n\n#if __TBB_USE_ADDRESS_SANITIZER\n//! Test for thread safety for the task_group\n//! \\brief \\ref error_guessing \\ref resource_usage\nTEST_CASE(\"Memory leaks test is not applicable under ASAN\\n\" * doctest::skip(true)) {}\n#elif !EMSCRIPTEN\n//! Emscripten requires preloading of the file used to determine memory usage, hence disabled.\n//! Test for thread safety for the task_group\n//! \\brief \\ref error_guessing \\ref resource_usage\nTEST_CASE(\"Thread safety test for the task group\") {\n    if (tbb::this_task_arena::max_concurrency() < 2) {\n        // The test requires more than one thread to check thread safety\n        return;\n    }\n    for (unsigned p=MinThread; p <= MaxThread; ++p) {\n        if (p < 2) {\n            continue;\n        }\n        tbb::global_control limit(tbb::global_control::max_allowed_parallelism, p);\n        g_MaxConcurrency = p;\n        TestThreadSafety<tbb::task_group>();\n    }\n}\n#endif\n\n//! Fibonacci test for task group\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Fibonacci test for the task group\") {\n    for (unsigned p=MinThread; p <= MaxThread; ++p) {\n        tbb::global_control limit(tbb::global_control::max_allowed_parallelism, p);\n        tbb::task_arena a(p);\n        g_MaxConcurrency = p;\n        a.execute([] {\n            RunFibonacciTests<tbb::task_group>();\n        });\n    }\n}\n\n//! Cancellation and exception test for the task group\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Cancellation and exception test for the task group\") {\n    for (unsigned p = MinThread; p <= MaxThread; ++p) {\n        tbb::global_control limit(tbb::global_control::max_allowed_parallelism, p);\n        tbb::task_arena a(p);\n        g_MaxConcurrency = p;\n        a.execute([] {\n            RunCancellationAndExceptionHandlingTests<tbb::task_group>();\n        });\n    }\n}\n\n//! Constant functor test for the task group\n//! \\brief \\ref interface \\ref negative\nTEST_CASE(\"Constant functor test for the task group\") {\n    for (unsigned p=MinThread; p <= MaxThread; ++p) {\n        tbb::global_control limit(tbb::global_control::max_allowed_parallelism, p);\n        g_MaxConcurrency = p;\n        TestConstantFunctorRequirement<tbb::task_group>();\n    }\n}\n\n//! Move semantics test for the task group\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Move semantics test for the task group\") {\n    for (unsigned p=MinThread; p <= MaxThread; ++p) {\n        tbb::global_control limit(tbb::global_control::max_allowed_parallelism, p);\n        g_MaxConcurrency = p;\n        TestMoveSemantics<tbb::task_group>();\n    }\n}\n\n#if TBB_PREVIEW_ISOLATED_TASK_GROUP\n\n#if __TBB_USE_ADDRESS_SANITIZER\n//! Test for thread safety for the isolated_task_group\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Memory leaks test is not applicable under ASAN\\n\" * doctest::skip(true)) {}\n#elif !EMSCRIPTEN\n//! Test for thread safety for the isolated_task_group\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Thread safety test for the isolated task group\") {\n    if (tbb::this_task_arena::max_concurrency() < 2) {\n        // The test requires more than one thread to check thread safety\n        return;\n    }\n    for (unsigned p=MinThread; p <= MaxThread; ++p) {\n        if (p < 2) {\n            continue;\n        }\n        tbb::global_control limit(tbb::global_control::max_allowed_parallelism, p);\n        g_MaxConcurrency = p;\n        tbb::task_arena a(p);\n        a.execute([] {\n            TestThreadSafety<tbb::isolated_task_group>();\n        });\n    }\n}\n#endif\n\n//! Cancellation and exception test for the isolated task group\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Fibonacci test for the isolated task group\") {\n    for (unsigned p=MinThread; p <= MaxThread; ++p) {\n        tbb::global_control limit(tbb::global_control::max_allowed_parallelism, p);\n        g_MaxConcurrency = p;\n        tbb::task_arena a(p);\n        a.execute([] {\n            RunFibonacciTests<tbb::isolated_task_group>();\n        });\n    }\n}\n\n//! Cancellation and exception test for the isolated task group\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Cancellation and exception test for the isolated task group\") {\n    for (unsigned p=MinThread; p <= MaxThread; ++p) {\n        tbb::global_control limit(tbb::global_control::max_allowed_parallelism, p);\n        g_MaxConcurrency = p;\n        tbb::task_arena a(p);\n        a.execute([] {\n            RunCancellationAndExceptionHandlingTests<tbb::isolated_task_group>();\n        });\n    }\n}\n\n//! Constant functor test for the isolated task group.\n//! \\brief \\ref interface \\ref negative\nTEST_CASE(\"Constant functor test for the isolated task group\") {\n    for (unsigned p=MinThread; p <= MaxThread; ++p) {\n        tbb::global_control limit(tbb::global_control::max_allowed_parallelism, p);\n        g_MaxConcurrency = p;\n        tbb::task_arena a(p);\n        a.execute([] {\n            TestConstantFunctorRequirement<tbb::isolated_task_group>();\n        });\n    }\n}\n\n//! Move semantics test for the isolated task group.\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Move semantics test for the isolated task group\") {\n    for (unsigned p=MinThread; p <= MaxThread; ++p) {\n        tbb::global_control limit(tbb::global_control::max_allowed_parallelism, p);\n        g_MaxConcurrency = p;\n        tbb::task_arena a(p);\n        a.execute([] {\n            TestMoveSemantics<tbb::isolated_task_group>();\n        });\n    }\n}\n\n//TODO: add test void isolated_task_group::run(d2::task_handle&& h) and isolated_task_group::::run_and_wait(d2::task_handle&& h)\n#endif /* TBB_PREVIEW_ISOLATED_TASK_GROUP */\n\nvoid run_deep_stealing(tbb::task_group& tg1, tbb::task_group& tg2, int num_tasks, std::atomic<int>& tasks_executed) {\n    for (int i = 0; i < num_tasks; ++i) {\n        tg2.run([&tg1, &tasks_executed] {\n            volatile char consume_stack[1000]{};\n            ++tasks_executed;\n            tg1.wait();\n            utils::suppress_unused_warning(consume_stack);\n        });\n    }\n}\n\n// TODO: move to the conformance test\n//! Test for stack overflow avoidance mechanism.\n//! \\brief \\ref requirement\nTEST_CASE(\"Test for stack overflow avoidance mechanism\") {\n    if (tbb::this_task_arena::max_concurrency() < 2) {\n        return;\n    }\n\n    tbb::global_control thread_limit(tbb::global_control::max_allowed_parallelism, 2);\n    tbb::task_group tg1;\n    tbb::task_group tg2;\n    std::atomic<int> tasks_executed{};\n    tg1.run_and_wait([&tg1, &tg2, &tasks_executed] {\n        run_deep_stealing(tg1, tg2, 10000, tasks_executed);\n        while (tasks_executed < 100) {\n            // Some stealing is expected to happen.\n            utils::yield();\n        }\n        CHECK(tasks_executed < 10000);\n    });\n    tg2.wait();\n    CHECK(tasks_executed == 10000);\n}\n\n//! Test for stack overflow avoidance mechanism.\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test for stack overflow avoidance mechanism within arena\") {\n    if (tbb::this_task_arena::max_concurrency() < 2) {\n        return;\n    }\n\n    tbb::task_arena a1(2, 1);\n    a1.execute([] {\n        tbb::task_group tg1;\n        tbb::task_group tg2;\n        std::atomic<int> tasks_executed{};\n\n        // Determine nested task execution limit.\n        int second_thread_executed{};\n        tg1.run_and_wait([&tg1, &tg2, &tasks_executed, &second_thread_executed] {\n            run_deep_stealing(tg1, tg2, 10000, tasks_executed);\n            do {\n                second_thread_executed = tasks_executed;\n                utils::Sleep(10);\n            } while (second_thread_executed < 100 || second_thread_executed != tasks_executed);\n            CHECK(tasks_executed < 10000);\n        });\n        tg2.wait();\n        CHECK(tasks_executed == 10000);\n\n        tasks_executed = 0;\n        tbb::task_arena a2(2, 2);\n        tg1.run_and_wait([&a2, &tg1, &tg2, &tasks_executed, second_thread_executed] {\n            run_deep_stealing(tg1, tg2, second_thread_executed - 1, tasks_executed);\n            while (tasks_executed < second_thread_executed - 1) {\n                // Wait until the second thread near the limit.\n                utils::yield();\n            }\n            tg2.run([&a2, &tg1, &tasks_executed] {\n                a2.execute([&tg1, &tasks_executed] {\n                    volatile char consume_stack[1000]{};\n                    ++tasks_executed;\n                    tg1.wait();\n                    utils::suppress_unused_warning(consume_stack);\n                });\n            });\n            while (tasks_executed < second_thread_executed) {\n                // Wait until the second joins the arena.\n                utils::yield();\n            }\n            a2.execute([&tg1, &tg2, &tasks_executed] {\n                run_deep_stealing(tg1, tg2, 10000, tasks_executed);\n            });\n            int currently_executed{};\n            do {\n                currently_executed = tasks_executed;\n                utils::Sleep(10);\n            } while (currently_executed != tasks_executed);\n            CHECK(tasks_executed < 10000 + second_thread_executed);\n        });\n        a2.execute([&tg2] {\n            tg2.wait();\n        });\n        CHECK(tasks_executed == 10000 + second_thread_executed);\n    });\n}\n\n//! Test checks that we can submit work to task_group asynchronously with waiting.\n//! \\brief \\ref regression\nTEST_CASE(\"Async task group\") {\n    int num_threads = tbb::this_task_arena::max_concurrency();\n    if (num_threads < 3) {\n        // The test requires at least 2 worker threads\n        return;\n    }\n    tbb::task_arena a(2*num_threads, num_threads);\n    utils::SpinBarrier barrier(num_threads + 2);\n    tbb::task_group tg[2];\n    std::atomic<bool> finished[2]{};\n    finished[0] = false; finished[1] = false;\n    for (int i = 0; i < 2; ++i) {\n        a.enqueue([i, &tg, &finished, &barrier] {\n            barrier.wait();\n            for (int j = 0; j < 10000; ++j) {\n                tg[i].run([] {});\n                utils::yield();\n            }\n            finished[i] = true;\n        });\n    }\n    utils::NativeParallelFor(num_threads, [&](int idx) {\n        barrier.wait();\n        a.execute([idx, &tg, &finished] {\n            std::size_t counter{};\n            while (!finished[idx%2]) {\n                tg[idx%2].wait();\n                if (counter++ % 16 == 0) utils::yield();\n            }\n            tg[idx%2].wait();\n        });\n    });\n}\n\nstruct SelfRunner {\n    tbb::task_group& m_tg;\n    std::atomic<unsigned>& count;\n    void operator()() const {\n        unsigned previous_count = count.fetch_sub(1);\n        if (previous_count > 1)\n            m_tg.run( *this );\n    }\n};\n\n//! Submit work to single task_group instance from inside the work\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Run self using same task_group instance\") {\n    const unsigned num = 10;\n    std::atomic<unsigned> count{num};\n    tbb::task_group tg;\n    SelfRunner uf{tg, count};\n    tg.run( uf );\n    tg.wait();\n    CHECK_MESSAGE(\n        count == 0,\n        \"Not all tasks were spawned from inside the functor running within task_group.\"\n    );\n}\n\n//TODO: move to some common place to share with conformance tests\nnamespace accept_task_group_context {\n\ntemplate <typename TaskGroup, typename CancelF, typename WaitF>\nvoid run_cancellation_use_case(CancelF&& cancel, WaitF&& wait) {\n    std::atomic<bool> outer_cancelled{false};\n    std::atomic<unsigned> count{13};\n\n    tbb::task_group_context inner_ctx(tbb::task_group_context::isolated);\n    TaskGroup inner_tg(inner_ctx);\n\n    tbb::task_group outer_tg;\n    auto outer_tg_task = [&] {\n        inner_tg.run([&] {\n            utils::SpinWaitUntilEq(outer_cancelled, true);\n            inner_tg.run( SelfRunner{inner_tg, count} );\n        });\n\n        utils::try_call([&] {\n            std::forward<CancelF>(cancel)(outer_tg);\n        }).on_completion([&] {\n            outer_cancelled = true;\n        });\n    };\n\n    auto check = [&] {\n        tbb::task_group_status outer_status = tbb::task_group_status::not_complete;\n        outer_status = std::forward<WaitF>(wait)(outer_tg);\n        CHECK_MESSAGE(\n            outer_status == tbb::task_group_status::canceled,\n            \"Outer task group should have been cancelled.\"\n        );\n\n        tbb::task_group_status inner_status = inner_tg.wait();\n        CHECK_MESSAGE(\n            inner_status == tbb::task_group_status::complete,\n            \"Inner task group should have completed despite the cancellation of the outer one.\"\n        );\n\n        CHECK_MESSAGE(0 == count, \"Some of the inner group tasks were not executed.\");\n    };\n\n    outer_tg.run(outer_tg_task);\n    check();\n}\n\ntemplate <typename TaskGroup>\nvoid test() {\n    run_cancellation_use_case<TaskGroup>(\n        [](tbb::task_group& outer) { outer.cancel(); },\n        [](tbb::task_group& outer) { return outer.wait(); }\n    );\n\n#if TBB_USE_EXCEPTIONS\n    run_cancellation_use_case<TaskGroup>(\n        [](tbb::task_group& /*outer*/) {\n            volatile bool suppress_unreachable_code_warning = true;\n            if (suppress_unreachable_code_warning) {\n                throw int();\n            }\n        },\n        [](tbb::task_group& outer) {\n            try {\n                outer.wait();\n                return tbb::task_group_status::complete;\n            } catch(const int&) {\n                return tbb::task_group_status::canceled;\n            }\n        }\n    );\n#endif\n}\n\n} // namespace accept_task_group_context\n\n//! Respect task_group_context passed from outside\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Respect task_group_context passed from outside\") {\n#if TBB_PREVIEW_ISOLATED_TASK_GROUP\n    accept_task_group_context::test<tbb::isolated_task_group>();\n#endif\n}\n\n#if __TBB_PREVIEW_TASK_GROUP_EXTENSIONS\n//! The test for task_handle inside other task waiting with run\n//! \\brief \\ref requirement\nTEST_CASE(\"Task handle for scheduler bypass\"){\n    tbb::task_group tg;\n    std::atomic<bool> run {false};\n\n    tg.run([&]{\n        return tg.defer([&]{\n            run = true;\n        });\n    });\n\n    tg.wait();\n    CHECK_MESSAGE(run == true, \"task handle returned by user lambda (bypassed) should be run\");\n}\n\n//! The test for task_handle inside other task waiting with run_and_wait\n//! \\brief \\ref requirement\nTEST_CASE(\"Task handle for scheduler bypass via run_and_wait\"){\n    tbb::task_group tg;\n    std::atomic<bool> run {false};\n\n    tg.run_and_wait([&]{\n        return tg.defer([&]{\n            run = true;\n        });\n    });\n\n    CHECK_MESSAGE(run == true, \"task handle returned by user lambda (bypassed) should be run\");\n}\n#endif //__TBB_PREVIEW_TASK_GROUP_EXTENSIONS\n\n#if TBB_USE_EXCEPTIONS\n//As these tests are against behavior marked by spec as undefined, they can not be put into conformance tests\n\n//! The test for error in scheduling empty task_handle\n//! \\brief \\ref requirement\nTEST_CASE(\"Empty task_handle cannot be scheduled\"\n        * doctest::should_fail()    //Test needs to revised as implementation uses assertions instead of exceptions\n        * doctest::skip()           //skip the test for now, to not pollute the test log\n){\n    tbb::task_group tg;\n\n    CHECK_THROWS_WITH_AS(tg.run(tbb::task_handle{}), \"Attempt to schedule empty task_handle\", std::runtime_error);\n}\n\n//! The test for error in task_handle being scheduled into task_group different from one it was created from\n//! \\brief \\ref requirement\nTEST_CASE(\"task_handle cannot be scheduled into different task_group\"\n        * doctest::should_fail()    //Test needs to revised as implementation uses assertions instead of exceptions\n        * doctest::skip()           //skip the test for now, to not pollute the test log\n){\n    tbb::task_group tg;\n    tbb::task_group tg1;\n\n    CHECK_THROWS_WITH_AS(tg1.run(tg.defer([]{})), \"Attempt to schedule task_handle into different task_group\", std::runtime_error);\n}\n\n//! The test for error in task_handle being scheduled into task_group different from one it was created from\n//! \\brief \\ref requirement\nTEST_CASE(\"task_handle cannot be scheduled into other task_group of the same context\"\n        * doctest::should_fail()    //Implementation is no there yet, as it is not clear that is the expected behavior\n        * doctest::skip()           //skip the test for now, to not pollute the test log\n)\n{\n    tbb::task_group_context ctx;\n\n    tbb::task_group tg(ctx);\n    tbb::task_group tg1(ctx);\n\n    CHECK_NOTHROW(tg.run(tg.defer([]{})));\n    CHECK_THROWS_WITH_AS(tg1.run(tg.defer([]{})), \"Attempt to schedule task_handle into different task_group\", std::runtime_error);\n}\n\n#endif // TBB_USE_EXCEPTIONS\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_tbb_fork.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_tbb_fork.cpp\n//! \\brief Test for [sched.global_control] specification\n\n#include \"tbb/global_control.h\"\n#include \"tbb/blocked_range.h\"\n#include \"tbb/cache_aligned_allocator.h\"\n#include \"tbb/parallel_for.h\"\n\nstatic const int MinThread = 1;\nstatic const int MaxThread = 4;\n\n// Doctest is not used here, but placed just to prevent compiler errors for bad headers design\n#define DOCTEST_CONFIG_IMPLEMENT\n#include \"common/test.h\"\n\n#include \"common/utils.h\"\n#include \"common/utils_assert.h\"\n\n#if _WIN32||_WIN64\n#include \"tbb/concurrent_hash_map.h\"\n\nHANDLE getCurrentThreadHandle()\n{\n    HANDLE hProc = GetCurrentProcess(), hThr = INVALID_HANDLE_VALUE;\n#if TBB_USE_ASSERT\n    BOOL res =\n#endif\n    DuplicateHandle( hProc, GetCurrentThread(), hProc, &hThr, 0, FALSE, DUPLICATE_SAME_ACCESS );\n    __TBB_ASSERT( res, \"Retrieving current thread handle failed\" );\n    return hThr;\n}\n\nbool threadTerminated(HANDLE h)\n{\n    DWORD ret = WaitForSingleObjectEx(h, 0, FALSE);\n    return WAIT_OBJECT_0 == ret;\n}\n\nstruct Data {\n    HANDLE h;\n};\n\ntypedef tbb::concurrent_hash_map<DWORD, Data> TidTableType;\n\nstatic TidTableType tidTable;\n\n#else\n\n#if __sun || __SUNPRO_CC\n#define _POSIX_PTHREAD_SEMANTICS 1 // to get standard-conforming sigwait(2)\n#endif\n#include <signal.h>\n#include <sys/types.h>\n#include <unistd.h>\n#include <sys/wait.h>\n#include <sched.h>\n\n#include \"tbb/tick_count.h\"\n\nvoid SigHandler(int) { }\n\n#endif // _WIN32||_WIN64\n\nclass AllocTask {\npublic:\n    void operator() (const tbb::blocked_range<int> &r) const {\n#if _WIN32||_WIN64\n        HANDLE h = getCurrentThreadHandle();\n        DWORD tid = GetCurrentThreadId();\n        {\n            TidTableType::accessor acc;\n            if (tidTable.insert(acc, tid)) {\n                acc->second.h = h;\n            }\n        }\n#endif\n        for (int y = r.begin(); y != r.end(); ++y) {\n            void *p = tbb::detail::r1::cache_aligned_allocate(7000);\n            tbb::detail::r1::cache_aligned_deallocate(p);\n        }\n    }\n    AllocTask() {}\n};\n\nvoid CallParallelFor()\n{\n    tbb::parallel_for(tbb::blocked_range<int>(0, 10000, 1), AllocTask(),\n                      tbb::simple_partitioner());\n}\n\n/* Regression test against data race between termination of workers\n   and setting blocking termination mode in main thread. */\nclass RunWorkersBody : utils::NoAssign {\n    bool wait_workers;\npublic:\n    RunWorkersBody(bool waitWorkers) : wait_workers(waitWorkers) {}\n    void operator()(const int /*threadID*/) const {\n        tbb::task_scheduler_handle tsi{tbb::attach{}};\n        CallParallelFor();\n        if (wait_workers) {\n            bool ok = tbb::finalize(tsi, std::nothrow);\n            ASSERT(ok, nullptr);\n        } else {\n            tsi.release();\n        }\n    }\n};\n\nvoid TestBlockNonblock()\n{\n    for (int i=0; i<100; i++) {\n        utils::NativeParallelFor(4, RunWorkersBody(/*wait_workers=*/false));\n        RunWorkersBody(/*wait_workers=*/true)(0);\n    }\n}\n\nclass RunInNativeThread : utils::NoAssign {\n    bool blocking;\n\npublic:\n    RunInNativeThread(bool blocking_) : blocking(blocking_) {}\n    void operator()(const int /*threadID*/) const {\n        tbb::task_scheduler_handle tsi = tbb::task_scheduler_handle{tbb::attach{}};\n        CallParallelFor();\n        if (blocking) {\n            bool ok = tbb::finalize(tsi, std::nothrow);\n            ASSERT(!ok, \"Nested blocking terminate must fail.\");\n        } else {\n            tsi.release();\n        }\n    }\n};\n\nvoid TestTasksInThread()\n{\n    tbb::task_scheduler_handle sch{tbb::attach{}};\n    CallParallelFor();\n    utils::NativeParallelFor(2, RunInNativeThread(/*blocking=*/false));\n    bool ok = tbb::finalize(sch, std::nothrow);\n    ASSERT(ok, nullptr);\n}\n\n#if TBB_REVAMP_TODO\n\n#include \"common/memory_usage.h\"\n\n// check for memory leak during TBB task scheduler init/terminate life cycle\n// TODO: move to test_task_scheduler_init after workers waiting productization\nvoid TestSchedulerMemLeaks()\n{\n    const int ITERS = 10;\n    int it;\n\n    for (it=0; it<ITERS; it++) {\n        size_t memBefore = utils::GetMemoryUsage();\n#if _MSC_VER && _DEBUG\n        // _CrtMemCheckpoint() and _CrtMemDifference are non-empty only in _DEBUG\n        _CrtMemState stateBefore, stateAfter, diffState;\n        _CrtMemCheckpoint(&stateBefore);\n#endif\n        for (int i=0; i<100; i++) {\n            tbb::task_arena arena(1, 1); arena.initialize(); // right approach?\n            // tbb::task_scheduler_init sch(1);\n            tbb::task_scheduler_handle sch = tbb::task_scheduler_handle::get();\n            for (int k=0; k<10; k++) {\n                // tbb::empty_task *t = new( tbb::task::allocate_root() ) tbb::empty_task();\n                // tbb::task::enqueue(*t);\n                arena.enqueue([&]{});\n            }\n            bool ok = tbb::finalize(sch, std::nothrow);\n            ASSERT(ok, nullptr);\n        }\n#if _MSC_VER && _DEBUG\n        _CrtMemCheckpoint(&stateAfter);\n        int ret = _CrtMemDifference(&diffState, &stateBefore, &stateAfter);\n        ASSERT(!ret, \"It must be no memory leaks at this point.\");\n#endif\n        if (utils::GetMemoryUsage() <= memBefore)\n            break;\n    }\n    ASSERT(it < ITERS, \"Memory consumption has not stabilized. Memory Leak?\");\n}\n\n#endif // TBB_REVAMP_TODO\n\nvoid TestNestingTSI()\n{\n    // nesting with and without blocking is possible\n    for (int i=0; i<2; i++) {\n        tbb::task_scheduler_handle schBlock = tbb::task_scheduler_handle{tbb::attach{}};\n        CallParallelFor();\n        tbb::task_scheduler_handle schBlock1;\n        schBlock1 = tbb::task_scheduler_handle{tbb::attach{}};\n        CallParallelFor();\n        if (i) {\n            schBlock1.release();\n        } else {\n            bool ok = tbb::finalize(schBlock1, std::nothrow);\n            ASSERT(!ok, \"Nested blocking terminate must fail.\");\n        }\n        bool ok = tbb::finalize(schBlock, std::nothrow);\n        ASSERT(ok, nullptr);\n    }\n    {\n        tbb::task_scheduler_handle schBlock{tbb::attach{}};\n        utils::NativeParallelFor(1, RunInNativeThread(/*blocking=*/true));\n        bool ok = tbb::finalize(schBlock, std::nothrow);\n        ASSERT(ok, nullptr);\n    }\n}\n\nvoid TestAutoInit()\n{\n    CallParallelFor(); // autoinit\n    // creation of blocking scheduler is possible, but one is not block\n    utils::NativeParallelFor(1, RunInNativeThread(/*blocking=*/true));\n}\n\nint main()\n{\n    TestNestingTSI();\n    TestBlockNonblock();\n    TestTasksInThread();\n\n#if TBB_REVAMP_TODO\n    TestSchedulerMemLeaks();\n#endif\n\n    bool child = false;\n#if _WIN32||_WIN64\n    DWORD masterTid = GetCurrentThreadId();\n#else\n    struct sigaction sa;\n    sigset_t sig_set;\n\n    sigemptyset(&sa.sa_mask);\n    sa.sa_flags = 0;\n    sa.sa_handler = SigHandler;\n    if (sigaction(SIGCHLD, &sa, nullptr))\n        ASSERT(0, \"sigaction failed\");\n    if (sigaction(SIGALRM, &sa, nullptr))\n        ASSERT(0, \"sigaction failed\");\n    // block SIGCHLD and SIGALRM, the mask is inherited by worker threads\n    sigemptyset(&sig_set);\n    sigaddset(&sig_set, SIGCHLD);\n    sigaddset(&sig_set, SIGALRM);\n    if (pthread_sigmask(SIG_BLOCK, &sig_set, nullptr))\n        ASSERT(0, \"pthread_sigmask failed\");\n#endif\n    utils::suppress_unused_warning(child);\n    for (int threads=MinThread; threads<=MaxThread; threads+=MinThread) {\n        for (int i=0; i<20; i++) {\n            tbb::global_control ctl(tbb::global_control::max_allowed_parallelism, threads);\n            {\n                tbb::task_scheduler_handle sch{tbb::attach{}};\n                bool ok = tbb::finalize( sch, std::nothrow );\n                ASSERT(ok, nullptr);\n            }\n            tbb::task_scheduler_handle sch{tbb::attach{}};\n            CallParallelFor();\n            bool ok = tbb::finalize( sch, std::nothrow );\n            ASSERT(ok, nullptr);\n#if _WIN32||_WIN64\n            // check that there is no alive threads after terminate()\n            for (TidTableType::const_iterator it = tidTable.begin();\n                it != tidTable.end(); ++it) {\n                if (masterTid != it->first) {\n                    ASSERT(threadTerminated(it->second.h), nullptr);\n                }\n            }\n            tidTable.clear();\n#else // _WIN32||_WIN64\n            if (child)\n                exit(0);\n            else {\n                pid_t pid = fork();\n                if (!pid) {\n                    i = -1;\n                    child = true;\n                } else {\n                    int sig;\n                    pid_t w_ret = 0;\n                    // wait for SIGCHLD up to timeout\n                    alarm(30);\n                    if (0 != sigwait(&sig_set, &sig))\n                        ASSERT(0, \"sigwait failed\");\n                    alarm(0);\n                    w_ret = waitpid(pid, nullptr, WNOHANG);\n                    ASSERT(w_ret>=0, \"waitpid failed\");\n                    if (!w_ret) {\n                        ASSERT(!kill(pid, SIGKILL), nullptr);\n                        w_ret = waitpid(pid, nullptr, 0);\n                        ASSERT(w_ret!=-1, \"waitpid failed\");\n\n                        ASSERT(0, \"Hang after fork\");\n                    }\n                    // clean pending signals (if any occurs since sigwait)\n                    sigset_t p_mask;\n                    for (;;) {\n                        sigemptyset(&p_mask);\n                        sigpending(&p_mask);\n                        if (sigismember(&p_mask, SIGALRM)\n                            || sigismember(&p_mask, SIGCHLD)) {\n                            if (0 != sigwait(&p_mask, &sig))\n                                ASSERT(0, \"sigwait failed\");\n                        } else\n                            break;\n                    }\n                }\n            }\n#endif // _WIN32||_WIN64\n        }\n    }\n    // auto initialization at this point\n    TestAutoInit();\n\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_tbb_header.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_tbb_header.cpp\n//! \\brief Test for [all] specification\n\n/**\n    This test ensures that tbb.h brings in all the public TBB interface definitions,\n    and if all the necessary symbols are exported from the library.\n\n    Most of the checks happen at the compilation or link phases.\n**/\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#ifndef NOMINMAX\n#define NOMINMAX\n#endif // NOMINMAX\n\n#define __TBB_NO_IMPLICIT_LINKAGE 1\n\n\n#if __TBB_TEST_SECONDARY\n    // Test _DEBUG macro custom definitions.\n    #if TBB_USE_DEBUG\n        #ifdef _DEBUG\n            #undef _DEBUG\n        #endif /* _DEBUG */\n        // Check that empty value successfully enables the debug mode.\n        #define _DEBUG\n        static bool isDebugExpected = true;\n    #else\n        // Check that zero value does not enable the debug mode.\n        #define _DEBUG 0x0\n        static bool isDebugExpected = false;\n    #endif /* TBB_USE_DEBUG */\n    #define DO_TEST_DEBUG_MACRO 1\n#else\n    // Test default definitions of _DEBUG.\n    #if _DEBUG\n        static bool isDebugExpected = true;\n        #define DO_TEST_DEBUG_MACRO 1\n    #elif _MSC_VER\n        // for MSVC, _DEBUG not defined indicates a release mode.\n        static bool isDebugExpected = false;\n        #define DO_TEST_DEBUG_MACRO 1\n    #endif /* _DEBUG */\n#endif /* __TBB_TEST_SECONDARY */\n\n#if DO_TEST_DEBUG_MACRO\n// Reset TBB_USE_DEBUG defined in makefiles.\n#undef TBB_USE_DEBUG\n#endif /* DO_TEST_DEBUG_MACRO */\n#define __TBB_CONFIG_PREPROC_ONLY _MSC_VER // For MSVC, prevent including standard headers in tbb_config.h\n#include \"common/config.h\"\n\n#include \"oneapi/tbb/detail/_config.h\"\n\n#if !TBB_USE_DEBUG && defined(_DEBUG)\n// TBB_USE_DEBUG is 0 but _DEBUG is defined, it means that _DEBUG is 0\n// MSVC C++ headers consider any definition of _DEBUG, including 0, as debug mode\n#undef _DEBUG\n#endif /* !TBB_USE_DEBUG && defined(_DEBUG) */\n\n#include \"tbb/tbb.h\"\n\n#if !__TBB_TEST_SECONDARY\n#include \"common/test.h\"\n#endif\n\nstatic volatile size_t g_sink;\n\n#define TestTypeDefinitionPresence( Type ) g_sink = sizeof(tbb::Type);\n#define TestTypeDefinitionPresence2(TypeStart, TypeEnd) g_sink = sizeof(tbb::TypeStart,TypeEnd);\n#define TestTypeDefinitionPresence3(TypeStart, TypeMid, TypeEnd) g_sink = sizeof(tbb::TypeStart,TypeMid,TypeEnd);\n#define TestFuncDefinitionPresence(Fn, Args, ReturnType) { ReturnType (*pfn)Args = &tbb::Fn; (void)pfn; }\n\nstruct Body {\n    void operator() () const {}\n};\nstruct Body1 {\n    void operator() ( int ) const {}\n};\nstruct Body1a { // feeder body for parallel_do\n    void operator() ( int, tbb::feeder<int>& ) const {}\n};\nstruct Body1b { // binary operator for reduction\n    int operator() ( const int, const int ) const { return 0; }\n};\nstruct Body1bc { // binary operator for comparison\n    bool operator() (const int, const int) const { return false; }\n};\nstruct Body2 {\n    Body2 () {}\n    Body2 ( const Body2&, tbb::split ) {}\n    void operator() ( const tbb::blocked_range<int>& ) const {}\n    void join( const Body2& ) {}\n};\nstruct Body2a { // for lambda-friendly parallel_reduce\n    int operator() ( const tbb::blocked_range<int>&, const int ) const { return 0; }\n};\nstruct Body3 { // for parallel_scan\n    Body3 () {}\n    Body3 ( const Body3&, tbb::split ) {}\n    void operator() ( const tbb::blocked_range2d<int>&, tbb::pre_scan_tag ) const {}\n    void operator() ( const tbb::blocked_range2d<int>&, tbb::final_scan_tag ) const {}\n    void reverse_join( Body3& ) {}\n    void assign( const Body3& ) {}\n};\nstruct Body3a { // for lambda-friednly parallel_scan\n    int operator() ( const tbb::blocked_range<int>&, const int, bool ) const { return 0; }\n};\nstruct Msg {};\n\n// Test if all the necessary symbols are exported for the exceptions thrown by TBB.\n// Missing exports result either in link error or in runtime assertion failure.\n#include <stdexcept>\n\ntemplate <typename E>\nvoid TestExceptionClassExports ( const E& exc, tbb::detail::exception_id eid ) {\n    CHECK( eid < tbb::detail::exception_id::last_entry );\n#if TBB_USE_EXCEPTIONS\n    for ( int i = 0; i < 2; ++i ) {\n        try {\n            if ( i == 0 )\n                throw exc;\n            else\n                tbb::detail::throw_exception( eid );\n        }\n        catch ( E& e ) {\n            CHECK_MESSAGE( e.what(), \"Missing what() string\" );\n        }\n        catch ( ... ) {\n            CHECK_MESSAGE( false, \"Unrecognized exception. Likely RTTI related exports are missing\" );\n        }\n    }\n#else /* TBB_USE_EXCEPTIONS */\n    (void)exc;\n#endif /* TBB_USE_EXCEPTIONS */\n}\n\nstatic void TestExceptionClassesExports () {\n    TestExceptionClassExports( std::bad_alloc(), tbb::detail::exception_id::bad_alloc );\n    TestExceptionClassExports( tbb::bad_last_alloc(), tbb::detail::exception_id::bad_last_alloc );\n    TestExceptionClassExports( std::invalid_argument(\"test\"), tbb::detail::exception_id::nonpositive_step );\n    TestExceptionClassExports( std::out_of_range(\"test\"), tbb::detail::exception_id::out_of_range );\n    TestExceptionClassExports( tbb::missing_wait(), tbb::detail::exception_id::missing_wait );\n    TestExceptionClassExports( std::out_of_range(\"test\"), tbb::detail::exception_id::invalid_load_factor );\n    TestExceptionClassExports( std::length_error(\"test\"), tbb::detail::exception_id::reservation_length_error );\n    TestExceptionClassExports( std::out_of_range(\"test\"), tbb::detail::exception_id::invalid_key );\n    TestExceptionClassExports( tbb::user_abort(), tbb::detail::exception_id::user_abort );\n    TestExceptionClassExports( std::runtime_error(\"test\"), tbb::detail::exception_id::bad_tagged_msg_cast );\n    TestExceptionClassExports( tbb::unsafe_wait(\"test\"), tbb::detail::exception_id::unsafe_wait );\n}\n\n#if __TBB_CPF_BUILD\n// These names are only tested in \"preview\" configuration\n// When a feature becomes fully supported, its names should be moved to the main test\nstatic void TestPreviewNames() {\n    TestTypeDefinitionPresence2( concurrent_lru_cache<int, int> );\n    TestTypeDefinitionPresence( isolated_task_group );\n}\n#endif\n\nstatic void DefinitionPresence() {\n    TestTypeDefinitionPresence( cache_aligned_allocator<int> );\n    TestTypeDefinitionPresence( tbb_hash_compare<int> );\n    TestTypeDefinitionPresence2( concurrent_hash_map<int, int> );\n    TestTypeDefinitionPresence2( concurrent_unordered_map<int, int> );\n    TestTypeDefinitionPresence2( concurrent_unordered_multimap<int, int> );\n    TestTypeDefinitionPresence( concurrent_unordered_set<int> );\n    TestTypeDefinitionPresence( concurrent_unordered_multiset<int> );\n    TestTypeDefinitionPresence2( concurrent_map<int, int> );\n    TestTypeDefinitionPresence2( concurrent_multimap<int, int> );\n    TestTypeDefinitionPresence( concurrent_set<int> );\n    TestTypeDefinitionPresence( concurrent_multiset<int> );\n    TestTypeDefinitionPresence( concurrent_bounded_queue<int> );\n    TestTypeDefinitionPresence( concurrent_queue<int> );\n    TestTypeDefinitionPresence( concurrent_priority_queue<int> );\n    TestTypeDefinitionPresence( concurrent_vector<int> );\n    TestTypeDefinitionPresence( combinable<int> );\n    TestTypeDefinitionPresence( enumerable_thread_specific<int> );\n    /* Flow graph names */\n    TestTypeDefinitionPresence( flow::graph );\n    TestTypeDefinitionPresence( flow::continue_msg );\n    TestTypeDefinitionPresence2(flow::tagged_msg<int, int> );\n    TestFuncDefinitionPresence( flow::make_edge, (tbb::flow::sender<Msg>&, tbb::flow::receiver<Msg>&), void );\n    TestFuncDefinitionPresence( flow::remove_edge, (tbb::flow::sender<Msg>&, tbb::flow::receiver<Msg>&), void );\n    typedef std::tuple<int, int> intpair;\n    TestTypeDefinitionPresence( flow::input_node<int> );\n    TestTypeDefinitionPresence3(flow::function_node<int, int, tbb::flow::rejecting> );\n    TestTypeDefinitionPresence3(flow::multifunction_node<int, intpair, tbb::flow::queueing> );\n    TestTypeDefinitionPresence3(flow::async_node<int, int, tbb::flow::queueing_lightweight> );\n    TestTypeDefinitionPresence2(flow::continue_node<int, tbb::flow::lightweight> );\n    TestTypeDefinitionPresence2(flow::join_node<intpair, tbb::flow::reserving> );\n    TestTypeDefinitionPresence2(flow::join_node<intpair, tbb::flow::key_matching<int> > );\n    TestTypeDefinitionPresence( flow::split_node<intpair> );\n    TestTypeDefinitionPresence( flow::overwrite_node<int> );\n    TestTypeDefinitionPresence( flow::write_once_node<int> );\n    TestTypeDefinitionPresence( flow::broadcast_node<int> );\n    TestTypeDefinitionPresence( flow::buffer_node<int> );\n    TestTypeDefinitionPresence( flow::queue_node<int> );\n    TestTypeDefinitionPresence( flow::sequencer_node<int> );\n    TestTypeDefinitionPresence( flow::priority_queue_node<int> );\n    TestTypeDefinitionPresence( flow::limiter_node<int> );\n    TestTypeDefinitionPresence2(flow::indexer_node<int, int> );\n    TestTypeDefinitionPresence2(flow::composite_node<std::tuple<int>, std::tuple<int> > );\n    /* Mutex names */\n    TestTypeDefinitionPresence( null_mutex );\n    TestTypeDefinitionPresence( null_rw_mutex );\n    TestTypeDefinitionPresence( queuing_mutex );\n    TestTypeDefinitionPresence( queuing_rw_mutex );\n    TestTypeDefinitionPresence( spin_mutex );\n    TestTypeDefinitionPresence( spin_rw_mutex );\n    TestTypeDefinitionPresence( mutex );\n    TestTypeDefinitionPresence( rw_mutex );\n    TestTypeDefinitionPresence( speculative_spin_mutex );\n    TestTypeDefinitionPresence( speculative_spin_rw_mutex );\n    TestTypeDefinitionPresence( task_group_context );\n    TestTypeDefinitionPresence( task_group );\n    /* Algorithm related names */\n    TestTypeDefinitionPresence( blocked_range<int> );\n    TestTypeDefinitionPresence( blocked_range2d<int> );\n    TestTypeDefinitionPresence( blocked_range3d<int> );\n    TestTypeDefinitionPresence2( blocked_nd_range<int,4> );\n    TestTypeDefinitionPresence( collaborative_once_flag );\n    TestFuncDefinitionPresence( collaborative_call_once, (tbb::collaborative_once_flag&, const Body&), void );\n    TestFuncDefinitionPresence( parallel_invoke, (const Body&, const Body&, const Body&), void );\n    TestFuncDefinitionPresence( parallel_for_each, (int*, int*, const Body1&), void );\n    TestFuncDefinitionPresence( parallel_for, (int, int, int, const Body1&), void );\n    TestFuncDefinitionPresence( parallel_for, (const tbb::blocked_range<int>&, const Body2&, const tbb::simple_partitioner&), void );\n    TestFuncDefinitionPresence( parallel_reduce, (const tbb::blocked_range<int>&, const int&, const Body2a&, const Body1b&), int );\n    TestFuncDefinitionPresence( parallel_reduce, (const tbb::blocked_range<int>&, Body2&, tbb::affinity_partitioner&), void );\n    TestFuncDefinitionPresence( parallel_deterministic_reduce, (const tbb::blocked_range<int>&, const int&, const Body2a&, const Body1b&), int );\n    TestFuncDefinitionPresence( parallel_deterministic_reduce, (const tbb::blocked_range<int>&, Body2&, const tbb::static_partitioner&), void );\n    TestFuncDefinitionPresence( parallel_scan, (const tbb::blocked_range2d<int>&, Body3&, const tbb::auto_partitioner&), void );\n    TestFuncDefinitionPresence( parallel_scan, (const tbb::blocked_range<int>&, const int&, const Body3a&, const Body1b&), int );\n    typedef int intarray[10];\n\n    TestFuncDefinitionPresence( parallel_sort, (int*, int*), void );\n    TestFuncDefinitionPresence( parallel_sort, (intarray&, const Body1bc&), void );\n    TestFuncDefinitionPresence( parallel_pipeline, (size_t, const tbb::filter<void,void>&), void );\n    TestFuncDefinitionPresence( parallel_invoke, (const Body&, const Body&, tbb::task_group_context&), void );\n    TestFuncDefinitionPresence( parallel_for_each, (const intarray&, const Body1a&, tbb::task_group_context&), void );\n    TestFuncDefinitionPresence( parallel_for, (int, int, const Body1&, const tbb::auto_partitioner&, tbb::task_group_context&), void );\n    TestFuncDefinitionPresence( parallel_for, (int, int, const Body1&, tbb::task_group_context&), void );\n    TestFuncDefinitionPresence( parallel_reduce, (const tbb::blocked_range<int>&, Body2&, const tbb::auto_partitioner&, tbb::task_group_context&), void );\n    TestFuncDefinitionPresence( parallel_reduce, (const tbb::blocked_range<int>&, Body2&, tbb::task_group_context&), void );\n    TestFuncDefinitionPresence( parallel_deterministic_reduce, (const tbb::blocked_range<int>&, Body2&, const tbb::simple_partitioner&, tbb::task_group_context&), void );\n    TestFuncDefinitionPresence( parallel_deterministic_reduce, (const tbb::blocked_range<int>&, Body2&, tbb::task_group_context&), void );\n    TestTypeDefinitionPresence( proportional_split );\n\n    TestTypeDefinitionPresence( task_arena );\n    TestFuncDefinitionPresence( this_task_arena::current_thread_index, (), int );\n    TestFuncDefinitionPresence( this_task_arena::max_concurrency, (), int );\n    TestFuncDefinitionPresence( info::numa_nodes, (), std::vector<tbb::numa_node_id> );\n    TestFuncDefinitionPresence( info::default_concurrency, (tbb::numa_node_id), int );\n    TestTypeDefinitionPresence( task_scheduler_observer );\n    TestTypeDefinitionPresence( tbb_allocator<int> );\n    TestTypeDefinitionPresence( tick_count );\n    TestTypeDefinitionPresence( global_control );\n\n#if __TBB_CPF_BUILD\n    TestPreviewNames();\n#endif\n#ifdef DO_TEST_DEBUG_MACRO\n#if TBB_USE_DEBUG\n    CHECK_MESSAGE( isDebugExpected, \"Debug mode is observed while release mode is expected.\" );\n#else\n    CHECK_MESSAGE( !isDebugExpected, \"Release mode is observed while debug mode is expected.\" );\n#endif /* TBB_USE_DEBUG */\n#endif /* DO_TEST_DEBUG_MACRO */\n    TestExceptionClassesExports();\n}\n\n#if __TBB_TEST_SECONDARY\n/* This mode is used to produce a secondary object file that is linked with\n   the main one in order to detect \"multiple definition\" linker error.\n*/\nvoid Secondary() {\n    DefinitionPresence();\n}\n#else\n//! Test for deifinition presence\n//! \\brief \\ref interface\nTEST_CASE(\"Test for deifinition presence\") {\n    DefinitionPresence();\n}\n\nvoid Secondary();\n//! Test for \"multiple definition\" linker error\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test for multiple definition linker error\") {\n    Secondary();\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_tbb_header_secondary.cpp",
    "content": "/*\n    Copyright (c) 2020-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_tbb_header_secondary.cpp\n//! \\brief Test for [all] specification\n\n#if __INTEL_COMPILER && _MSC_VER\n#pragma warning(disable : 2586) // decorated name length exceeded, name was truncated\n#endif\n\n#ifndef NOMINMAX\n#define NOMINMAX\n#endif // NOMINMAX\n\n#if _MSC_VER && TBB_USE_DEBUG\n// Check that there is no conflict with _CRTDBG_MAP_ALLOC\n#define _CRTDBG_MAP_ALLOC\n#include \"crtdbg.h\"\n#endif\n\n#include <exception>\n\n#define CHECK(x) do { if (!(x)) { std::terminate(); } } while (false)\n#define CHECK_MESSAGE(x, y) CHECK(x);\n\n#define __TBB_TEST_SECONDARY 1\n#include \"test_tbb_header.cpp\"\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_tick_count.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_concurrency_limit.h\"\n#include \"common/spin_barrier.h\"\n\n#include <tbb/tick_count.h>\n#include <thread>\n\n//! \\file test_tick_count.cpp\n//! \\brief Test for [timing] specification\n\n//! Testing clock type of tbb::tick_count\n//! Clock in tbb::tick_count should be steady\n//! \\brief \\ref requirement\nTEST_CASE(\"Clock in tbb::tick_count should be steady\") {\n    CHECK_EQ(tbb::tick_count::clock_type::is_steady, true);\n}\n\n#if TBB_USE_EXCEPTIONS\n//! Subtraction of equal tick_counts should not throw\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Subtraction of equal tick_counts should not throw\") {\n    tbb::tick_count tick_f = tbb::tick_count::now();\n    tbb::tick_count tick_s(tick_f);\n    CHECK_NOTHROW(tick_f - tick_s);\n}\n#endif\n\n//! Test that two tick_count values recorded on different threads can be meaningfully subtracted.\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test for subtracting calls to tick_count from different threads\") {\n    auto num_of_threads = utils::get_platform_max_threads();\n\n    utils::SpinBarrier thread_barrier(num_of_threads);\n    tbb::tick_count start_time;\n\n    auto diff_func = [&thread_barrier, &start_time] (std::size_t ) {\n        thread_barrier.wait([&start_time] { start_time = tbb::tick_count::now(); });\n\n        tbb::tick_count end_time(tbb::tick_count::now());\n        while ((end_time - start_time).seconds() == 0) {\n            end_time = tbb::tick_count::now();\n        }\n\n        CHECK_GT((end_time - start_time).seconds(), 0);\n    };\n\n    for (std::size_t i = 0; i < 10; ++i) {\n        utils::NativeParallelFor(num_of_threads, diff_func);\n    }\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbb/test_write_once_node.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n\n#include \"common/config.h\"\n\n#include \"tbb/flow_graph.h\"\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_assert.h\"\n#include \"common/graph_utils.h\"\n#include \"common/test_follows_and_precedes_api.h\"\n\n#define N 300\n#define T 4\n#define M 4\n\n\n//! \\file test_write_once_node.cpp\n//! \\brief Test for [flow_graph.write_once_node] specification\n\n\ntemplate< typename R >\nvoid simple_read_write_tests() {\n    tbb::flow::graph g;\n    tbb::flow::write_once_node<R> n(g);\n\n    for ( int t = 0; t < T; ++t ) {\n        R v0(0);\n        std::vector< std::shared_ptr<harness_counting_receiver<R>> > r;\n        for (size_t i = 0; i < M; ++i) {\n            r.push_back( std::make_shared<harness_counting_receiver<R>>(g) );\n        }\n\n\n        CHECK_MESSAGE( n.is_valid() == false, \"\" );\n        CHECK_MESSAGE( n.try_get( v0 ) == false, \"\" );\n\n        if ( t % 2 ) {\n            CHECK_MESSAGE( n.try_put( static_cast<R>(N+1) ), \"\" );\n            CHECK_MESSAGE( n.is_valid() == true, \"\" );\n            CHECK_MESSAGE( n.try_get( v0 ) == true, \"\" );\n            CHECK_MESSAGE( v0 == R(N+1), \"\" );\n        }\n\n        for (int i = 0; i < M; ++i) {\n            tbb::flow::make_edge( n, *r[i] );\n        }\n\n        if ( t%2 ) {\n            for (int i = 0; i < M; ++i) {\n                size_t c = r[i]->my_count;\n                CHECK_MESSAGE( int(c) == 1, \"\" );\n            }\n        }\n\n        for (int i = 1; i <= N; ++i ) {\n            R v1(static_cast<R>(i));\n\n            bool result = n.try_put( v1 );\n            if ( !(t%2) && i == 1 )\n                CHECK_MESSAGE( result == true, \"\" );\n            else\n                CHECK_MESSAGE( result == false, \"\" );\n\n            CHECK_MESSAGE( n.is_valid() == true, \"\" );\n\n            for (int j = 0; j < N; ++j ) {\n                R v2(0);\n                CHECK_MESSAGE( n.try_get( v2 ), \"\" );\n                if ( t%2 )\n                    CHECK_MESSAGE( R(N+1) == v2, \"\" );\n                else\n                    CHECK_MESSAGE( R(1) == v2, \"\" );\n            }\n        }\n        for (int i = 0; i < M; ++i) {\n            size_t c = r[i]->my_count;\n            CHECK_MESSAGE( int(c) == 1, \"\" );\n        }\n        for (int i = 0; i < M; ++i) {\n            tbb::flow::remove_edge( n, *r[i] );\n        }\n        CHECK_MESSAGE( n.try_put( R(0) ) == false, \"\" );\n        for (int i = 0; i < M; ++i) {\n            size_t c = r[i]->my_count;\n            CHECK_MESSAGE( int(c) == 1, \"\" );\n        }\n        n.clear();\n        CHECK_MESSAGE( n.is_valid() == false, \"\" );\n        CHECK_MESSAGE( n.try_get( v0 ) == false, \"\" );\n    }\n}\n\ntemplate< typename R >\nclass native_body : utils::NoAssign {\n    tbb::flow::write_once_node<R> &my_node;\n\npublic:\n\n    native_body( tbb::flow::write_once_node<R> &n ) : my_node(n) {}\n\n    void operator()( int i ) const {\n        R v1(static_cast<R>(i));\n        CHECK_MESSAGE( my_node.try_put( v1 ) == false, \"\" );\n        CHECK_MESSAGE( my_node.is_valid() == true, \"\" );\n        CHECK_MESSAGE( my_node.try_get( v1 ) == true, \"\" );\n        CHECK_MESSAGE( v1 == R(-1), \"\" );\n    }\n};\n\ntemplate< typename R >\nvoid parallel_read_write_tests() {\n    tbb::flow::graph g;\n    tbb::flow::write_once_node<R> n(g);\n    //Create a vector of identical nodes\n    std::vector< tbb::flow::write_once_node<R> > wo_vec(2, n);\n\n    for (size_t node_idx=0; node_idx<wo_vec.size(); ++node_idx) {\n        for ( int t = 0; t < T; ++t ) {\n            std::vector< std::shared_ptr<harness_counting_receiver<R>> > r;\n            for (size_t i = 0; i < M; ++i) {\n                r.push_back( std::make_shared<harness_counting_receiver<R>>(g) );\n            }\n\n\n            for (int i = 0; i < M; ++i) {\n                tbb::flow::make_edge( wo_vec[node_idx], *r[i] );\n            }\n            R v0;\n            CHECK_MESSAGE( wo_vec[node_idx].is_valid() == false, \"\" );\n            CHECK_MESSAGE( wo_vec[node_idx].try_get( v0 ) == false, \"\" );\n\n            CHECK_MESSAGE( wo_vec[node_idx].try_put( R(-1) ), \"\" );\n#if TBB_TEST_LOW_WORKLOAD\n            const int nthreads = 30;\n#else\n            const int nthreads = N;\n#endif\n            utils::NativeParallelFor( nthreads, native_body<R>( wo_vec[node_idx] ) );\n\n            for (int i = 0; i < M; ++i) {\n                size_t c = r[i]->my_count;\n                CHECK_MESSAGE( int(c) == 1, \"\" );\n            }\n            for (int i = 0; i < M; ++i) {\n                tbb::flow::remove_edge( wo_vec[node_idx], *r[i] );\n            }\n            CHECK_MESSAGE( wo_vec[node_idx].try_put( R(0) ) == false, \"\" );\n            for (int i = 0; i < M; ++i) {\n                size_t c = r[i]->my_count;\n                CHECK_MESSAGE( int(c) == 1, \"\" );\n            }\n            wo_vec[node_idx].clear();\n            CHECK_MESSAGE( wo_vec[node_idx].is_valid() == false, \"\" );\n            CHECK_MESSAGE( wo_vec[node_idx].try_get( v0 ) == false, \"\" );\n        }\n    }\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n#include <array>\n#include <vector>\nvoid test_follows_and_precedes_api() {\n    using msg_t = tbb::flow::continue_msg;\n\n    std::array<msg_t, 3> messages_for_follows= {msg_t(), msg_t(), msg_t()};\n    std::vector<msg_t> messages_for_precedes = {msg_t()};\n\n    follows_and_precedes_testing::test_follows<msg_t, tbb::flow::write_once_node<msg_t>>(messages_for_follows);\n    follows_and_precedes_testing::test_precedes<msg_t, tbb::flow::write_once_node<msg_t>>(messages_for_precedes);\n}\n#endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\nvoid test_deduction_guides() {\n    using namespace tbb::flow;\n\n    graph g;\n    broadcast_node<int> b1(g);\n    write_once_node<int> wo0(g);\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n    write_once_node wo1(follows(b1));\n    static_assert(std::is_same_v<decltype(wo1), write_once_node<int>>);\n\n    write_once_node wo2(precedes(b1));\n    static_assert(std::is_same_v<decltype(wo2), write_once_node<int>>);\n#endif\n\n    write_once_node wo3(wo0);\n    static_assert(std::is_same_v<decltype(wo3), write_once_node<int>>);\n}\n#endif\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\nvoid test_try_put_and_wait() {\n    int wait_message = 0;\n    int occupy_concurrency_message = 1;\n    int new_message = 2;\n\n    // Test push\n    {\n        tbb::task_arena arena(1);\n\n        std::vector<int> processed_items;\n\n        arena.execute([&] {\n            tbb::flow::graph g;\n\n            tbb::flow::write_once_node<int> wo_buffer(g);\n            tbb::flow::function_node<int, int> function(g, tbb::flow::serial,\n                [&](int input) {\n                    if (input == wait_message) {\n                        wo_buffer.clear();\n                        wo_buffer.try_put(new_message);\n                    }\n                    processed_items.emplace_back(input);\n                    return 0;\n                });\n\n            tbb::flow::make_edge(wo_buffer, function);\n\n            wo_buffer.try_put_and_wait(wait_message);\n\n            std::size_t check_index = 0;\n            CHECK_MESSAGE(processed_items.size() == 1, \"Only the wait_message should be processed\");\n            CHECK_MESSAGE(processed_items[check_index++] == wait_message, \"Only the wait_message should be processed\");\n\n            g.wait_for_all();\n\n            CHECK_MESSAGE(processed_items[check_index++] == new_message,\n                          \"only the new_message should be processed in wait_for_all\");\n            CHECK(check_index == processed_items.size());\n        });\n    }\n    // Test pull\n    {\n        std::vector<int> processed_items;\n        tbb::task_arena arena(1);\n\n        arena.execute([&] {\n            tbb::flow::graph g;\n\n            tbb::flow::write_once_node<int> wo_buffer(g);\n            tbb::flow::function_node<int, int, tbb::flow::rejecting> function(g, tbb::flow::serial,\n                [&](int input) {\n                    if (input == new_message || input == wait_message) {\n                        wo_buffer.clear();\n                    }\n\n                    if (input == wait_message) {\n                        wo_buffer.try_put(new_message);\n                    }\n                    processed_items.emplace_back(input);\n                    return 0;\n                });\n\n            tbb::flow::make_edge(wo_buffer, function);\n\n            function.try_put(occupy_concurrency_message);\n            wo_buffer.try_put_and_wait(wait_message);\n\n            std::size_t check_index = 0;\n            CHECK_MESSAGE(processed_items.size() == 2, \"unexpected message processing for try_put_and_wait\");\n            CHECK_MESSAGE(processed_items[check_index++] == occupy_concurrency_message,\n                          \"occupy_concurrency_message should be processed first\");\n            CHECK_MESSAGE(processed_items[check_index++] == wait_message,\n                          \"wait_message was not processed\");\n\n            g.wait_for_all();\n\n            CHECK_MESSAGE(processed_items[check_index++] == new_message,\n                          \"only the new_message should be processed in wait_for_all\");\n            CHECK(check_index == processed_items.size());\n        });\n    }\n    // Test reserve\n    {\n        std::vector<int> processed_items;\n        tbb::task_arena arena(1);\n\n        arena.execute([&] {\n            tbb::flow::graph g;\n\n            tbb::flow::write_once_node<int> wo_buffer(g);\n            tbb::flow::limiter_node<int, int> limiter(g, 1);\n            tbb::flow::function_node<int, int, tbb::flow::rejecting> function(g, tbb::flow::serial,\n                [&](int input) {\n                    if (input == new_message || input == wait_message) {\n                        wo_buffer.clear();\n                    }\n\n                    if (input == wait_message) {\n                        wo_buffer.try_put(new_message);\n                    }\n                    processed_items.emplace_back(input);\n                    limiter.decrementer().try_put(1);\n                    return 0;\n                });\n\n            tbb::flow::make_edge(wo_buffer, limiter);\n            tbb::flow::make_edge(limiter, function);\n\n            limiter.try_put(occupy_concurrency_message);\n            wo_buffer.try_put_and_wait(wait_message);\n\n            std::size_t check_index = 0;\n            CHECK_MESSAGE(processed_items.size() == 2, \"unexpected message processing for try_put_and_wait\");\n            CHECK_MESSAGE(processed_items[check_index++] == occupy_concurrency_message,\n                          \"occupy_concurrency_message should be processed first\");\n            CHECK_MESSAGE(processed_items[check_index++] == wait_message,\n                          \"wait_message was not processed\");\n\n            g.wait_for_all();\n\n            CHECK_MESSAGE(processed_items[check_index++] == new_message,\n                          \"only the new_message should be processed in wait_for_all\");\n            CHECK(check_index == processed_items.size());\n        });\n    }\n}\n#endif\n\n//! Test read-write properties\n//! \\brief \\ref requirement \\ref error_guessing\nTEST_CASE(\"Read-write tests\"){\n    simple_read_write_tests<int>();\n    simple_read_write_tests<float>();\n}\n\n//! Test read-write properties under parallelism\n//! \\brief \\ref requirement \\ref error_guessing \\ref stress\nTEST_CASE(\"Parallel read-write tests\"){\n    for( unsigned int p=utils::MinThread; p<=utils::MaxThread; ++p ) {\n        tbb::task_arena arena(p);\n        arena.execute(\n            [&]() {\n                parallel_read_write_tests<int>();\n                parallel_read_write_tests<float>();\n                test_reserving_nodes<tbb::flow::write_once_node, size_t>();\n            }\n        );\n\t}\n}\n\n#if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET\n//! Test deprecated follows and precedes API\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Test follows and precedes API\"){\n    test_follows_and_precedes_api();\n}\n#endif\n\n#if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT\n//! Test deduction guides\n//! \\brief \\ref requirement\nTEST_CASE(\"Deduction guides\"){\n    test_deduction_guides();\n}\n#endif\n\n#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test write_once_node try_put_and_wait\") {\n    test_try_put_and_wait();\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbbmalloc/test_malloc_atexit.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n/* Regression test against a bug in TBB allocator manifested when\n   dynamic library calls atexit() or registers dtors of static objects.\n   If the allocator is not initialized yet, we can get deadlock,\n   because allocator library has static object dtors as well, they\n   registered during allocator initialization, and atexit() is protected\n   by non-recursive mutex in some versions of GLIBC.\n */\n\n#define __TBB_NO_IMPLICIT_LINKAGE 1\n\n#include \"common/allocator_overload.h\"\n#include \"common/utils_assert.h\"\n#include <stdlib.h>\n\n// __TBB_malloc_safer_msize() returns 0 for unknown objects,\n// thus we can detect ownership\n#if _USRDLL\n#if _WIN32||_WIN64\nextern __declspec(dllexport)\n#else\n__TBB_EXPORT\n#endif\nbool dll_isMallocOverloaded()\n#else\nbool exe_isMallocOverloaded()\n#endif\n{\n    const size_t reqSz = 8;\n    void *o = malloc(reqSz);\n    bool ret = __TBB_malloc_safer_msize(o, nullptr) >= reqSz;\n    free(o);\n    return ret;\n}\n\n#if _USRDLL\n#include \"common/utils_report.h\"\n\n#if MALLOC_UNIXLIKE_OVERLOAD_ENABLED || MALLOC_ZONE_OVERLOAD_ENABLED\n\n#include <dlfcn.h>\n#if __APPLE__\n#include <malloc/malloc.h>\n#define malloc_usable_size(p) malloc_size(p)\n#else\n#include <malloc.h>\n#endif\n#include <signal.h>\n\n#if __unix__ && !__ANDROID__\nextern \"C\" {\nvoid __libc_free(void *ptr);\nvoid *__libc_realloc(void *ptr, size_t size);\n\n// check that such kind of free/realloc overload works correctly\nvoid free(void *ptr)\n{\n    __libc_free(ptr);\n}\n\nvoid *realloc(void *ptr, size_t size)\n{\n    return __libc_realloc(ptr, size);\n}\n} // extern \"C\"\n#endif // __unix__ && !__ANDROID__\n\n#endif // MALLOC_UNIXLIKE_OVERLOAD_ENABLED || MALLOC_ZONE_OVERLOAD_ENABLED\n\n// Even when the test is skipped, dll source must not be empty to generate .lib to link with.\n\n#if !defined(_PGO_INSTRUMENT) && !__TBB_USE_ADDRESS_SANITIZER\nvoid dummyFunction() {}\n\n// TODO: enable the check under Android\n#if (MALLOC_UNIXLIKE_OVERLOAD_ENABLED || MALLOC_ZONE_OVERLOAD_ENABLED) && !__ANDROID__\ntypedef void *(malloc_type)(size_t);\n\nstatic void SigSegv(int)\n{\n    REPORT(\"Known issue: SIGSEGV during work with memory allocated by replaced allocator.\\n\"\n           \"skip\\n\");\n    exit(0);\n}\n\n// TODO: Using of SIGSEGV can be eliminated via parsing /proc/self/maps\n// and series of system malloc calls.\nvoid TestReplacedAllocFunc()\n{\n    struct sigaction sa, sa_default;\n    malloc_type *orig_malloc = (malloc_type*)dlsym(RTLD_NEXT, \"malloc\");\n    void *p = (*orig_malloc)(16);\n\n    // protect potentially unsafe actions\n    sigemptyset(&sa.sa_mask);\n    sa.sa_flags = 0;\n    sa.sa_handler = SigSegv;\n    if (sigaction(SIGSEGV, &sa, &sa_default))\n        ASSERT(0, \"sigaction failed\");\n\n    ASSERT(malloc_usable_size(p) >= 16, nullptr);\n    free(p);\n    // no more unsafe actions, restore SIGSEGV\n    if (sigaction(SIGSEGV, &sa_default, nullptr))\n        ASSERT(0, \"sigaction failed\");\n}\n#else\nvoid TestReplacedAllocFunc() { }\n#endif\n\nclass Foo {\npublic:\n    Foo() {\n        // add a lot of exit handlers to cause memory allocation\n        for (int i=0; i<1024; i++)\n            atexit(dummyFunction);\n        TestReplacedAllocFunc();\n    }\n};\n\nstatic Foo f;\n#endif // !defined(_PGO_INSTRUMENT) && !__TBB_USE_ADDRESS_SANITIZER\n\nint main() {}\n\n#else // _USRDLL\n#include \"common/test.h\"\n\n#if _WIN32||_WIN64\n#include \"tbb/tbbmalloc_proxy.h\"\n\nextern __declspec(dllimport)\n#endif\nbool dll_isMallocOverloaded();\n\n#ifdef _PGO_INSTRUMENT\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Known issue: test_malloc_atexit hangs if compiled with -prof-genx\\n\" * doctest::skip(true)) {}\n#elif __TBB_USE_ADDRESS_SANITIZER\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Known issue: test_malloc_atexit is not applicable under ASAN\\n\" * doctest::skip(true)) {}\n#else\n// Check common/allocator_overload.h for skip cases\n#if !HARNESS_SKIP_TEST\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test malloc atexit\") {\n    REQUIRE_MESSAGE( dll_isMallocOverloaded(), \"malloc was not replaced\" );\n    REQUIRE_MESSAGE( exe_isMallocOverloaded(), \"malloc was not replaced\" );\n}\n#endif // HARNESS_SKIP_TEST\n\n#endif // _PGO_INSTRUMENT\n\n#endif // _USRDLL\n"
  },
  {
    "path": "third-party/tbb/test/tbbmalloc/test_malloc_compliance.cpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_malloc_compliance.cpp\n//! \\brief Test for [memory_allocation.scalable_alloc_c_interface] functionality\n\n#define __TBB_NO_IMPLICIT_LINKAGE 1\n\n#define __STDC_LIMIT_MACROS 1 // to get SIZE_MAX from stdint.h\n\n#include \"common/test.h\"\n\n#include \"common/utils.h\"\n#include \"common/utils_report.h\"\n#include \"common/spin_barrier.h\"\n#include \"common/memory_usage.h\"\n\n#include \"oneapi/tbb/detail/_config.h\"\n\n// There is no RLIMIT_AS on OpenBSD.\n// Therefore, the tests for memory limit is unreasonable.\n#if !__OpenBSD__\n\n#define __TBB_NO_IMPLICIT_LINKAGE 1\n#include \"tbb/scalable_allocator.h\"\n\n#include <vector>\n\n#if _WIN32 || _WIN64\n/**\n *  _WIN32_WINNT should be defined at the very beginning,\n *  because other headers might include <windows.h>\n **/\n#undef _WIN32_WINNT\n#define _WIN32_WINNT 0x0501\n#include <windows.h>\n#include <stdio.h>\n\n#if _MSC_VER && defined(_MT) && defined(_DLL)\n    #pragma comment(lib, \"version.lib\")  // to use GetFileVersionInfo*\n#endif\n\nvoid limitMem( size_t limit )\n{\n    static HANDLE hJob = nullptr;\n    JOBOBJECT_EXTENDED_LIMIT_INFORMATION jobInfo;\n\n    jobInfo.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_PROCESS_MEMORY;\n    jobInfo.ProcessMemoryLimit = limit? limit*MByte : 2*MByte*1024;\n    if (nullptr == hJob) {\n        if (nullptr == (hJob = CreateJobObject(nullptr, nullptr))) {\n            REPORT(\"Can't assign create job object: %ld\\n\", GetLastError());\n            exit(1);\n        }\n        if (0 == AssignProcessToJobObject(hJob, GetCurrentProcess())) {\n            REPORT(\"Can't assign process to job object: %ld\\n\", GetLastError());\n            exit(1);\n        }\n    }\n    if (0 == SetInformationJobObject(hJob, JobObjectExtendedLimitInformation,\n                                     &jobInfo, sizeof(jobInfo))) {\n        REPORT(\"Can't set limits: %ld\\n\", GetLastError());\n        exit(1);\n    }\n}\n// Do not test errno with static VC runtime\n#else // _WIN32 || _WIN64\n#include <sys/resource.h>\n#include <stdlib.h>\n#include <stdio.h>\n#include <errno.h>\n#include <sys/types.h>  // uint64_t on FreeBSD, needed for rlim_t\n#include <stdint.h>     // SIZE_MAX\n\nvoid limitMem( size_t limit )\n{\n    rlimit rlim;\n    int ret = getrlimit(RLIMIT_AS,&rlim);\n    if (0 != ret) {\n        REPORT(\"getrlimit() returned an error: errno %d\\n\", errno);\n        exit(1);\n    }\n    if (rlim.rlim_max==(rlim_t)RLIM_INFINITY)\n        rlim.rlim_cur = (limit > 0) ? limit*MByte : rlim.rlim_max;\n    else rlim.rlim_cur = (limit > 0 && static_cast<rlim_t>(limit)<rlim.rlim_max) ? limit*MByte : rlim.rlim_max;\n    ret = setrlimit(RLIMIT_AS,&rlim);\n    if (0 != ret) {\n        REPORT(\"Can't set limits: errno %d\\n\", errno);\n        exit(1);\n    }\n}\n#endif  // _WIN32 || _WIN64\n\nbool __tbb_test_errno = false;\n\n#define ASSERT_ERRNO(cond, msg)  REQUIRE_MESSAGE( (!__tbb_test_errno || (cond)), msg )\n#define CHECK_ERRNO(cond) (__tbb_test_errno && (cond))\n\nstatic const int MinThread = 1;\nstatic const int MaxThread = 4;\nstatic bool Verbose = false;\n\n#include <time.h>\n#include <errno.h>\n#include <limits.h> // for CHAR_BIT\n\n#if __unix__\n#include <stdint.h> // uintptr_t\n#endif\n#if _WIN32 || _WIN64\n#include <malloc.h> // _aligned_(malloc|free|realloc)\n#if __MINGW64__\n// Workaround a bug in MinGW64 headers with _aligned_(malloc|free) not declared by default\nextern \"C\" void __cdecl __declspec(dllimport) _aligned_free(void *);\nextern \"C\" void *__cdecl __declspec(dllimport) _aligned_malloc(size_t,size_t);\n#endif\n#endif\n\n#include <vector>\n\nconst int COUNT_ELEM = 25000;\nconst size_t MAX_SIZE = 1000;\nconst int COUNTEXPERIMENT = 10000;\n\nconst char strError[]=\"failed\";\nconst char strOk[]=\"done\";\n\ntypedef unsigned int UINT;\ntypedef unsigned char UCHAR;\ntypedef unsigned long DWORD;\ntypedef unsigned char BYTE;\n\ntypedef void* TestMalloc(size_t size);\ntypedef void* TestCalloc(size_t num, size_t size);\ntypedef void* TestRealloc(void* memblock, size_t size);\ntypedef void  TestFree(void* memblock);\ntypedef int   TestPosixMemalign(void **memptr, size_t alignment, size_t size);\ntypedef void* TestAlignedMalloc(size_t size, size_t alignment);\ntypedef void* TestAlignedRealloc(void* memblock, size_t size, size_t alignment);\ntypedef void  TestAlignedFree(void* memblock);\n\n// pointers to tested functions\nTestMalloc*  Rmalloc;\nTestCalloc*  Rcalloc;\nTestRealloc* Rrealloc;\nTestFree*    Tfree;\nTestPosixMemalign*  Rposix_memalign;\nTestAlignedMalloc*  Raligned_malloc;\nTestAlignedRealloc* Raligned_realloc;\nTestAlignedFree* Taligned_free;\n\n// call functions via pointer and check result's alignment\nvoid* Tmalloc(size_t size);\nvoid* Tcalloc(size_t num, size_t size);\nvoid* Trealloc(void* memblock, size_t size);\nint   Tposix_memalign(void **memptr, size_t alignment, size_t size);\nvoid* Taligned_malloc(size_t size, size_t alignment);\nvoid* Taligned_realloc(void* memblock, size_t size, size_t alignment);\n\nstd::atomic<bool> error_occurred{ false };\n\n#if __APPLE__\n// Tests that use the variables are skipped on macOS*\n#else\nconst size_t COUNT_ELEM_CALLOC = 2;\nconst int COUNT_TESTS = 1000;\nstatic bool perProcessLimits = true;\n#endif\n\nconst size_t POWERS_OF_2 = 20;\n\nstruct MemStruct\n{\n    void* Pointer;\n    UINT Size;\n\n    MemStruct() : Pointer(nullptr), Size(0) {}\n    MemStruct(void* ptr, UINT sz) : Pointer(ptr), Size(sz) {}\n};\n\nclass CMemTest: utils::NoAssign\n{\n    bool FullLog;\n    utils::SpinBarrier *limitBarrier;\n    static bool firstTime;\n\npublic:\n    CMemTest(utils::SpinBarrier *barrier, bool isVerbose=false) : limitBarrier(barrier)\n        {\n            srand((UINT)time(nullptr));\n            FullLog=isVerbose;\n        }\n    void NULLReturn(UINT MinSize, UINT MaxSize, int total_threads); // nullptr pointer + check errno\n    void UniquePointer(); // unique pointer - check with padding\n    void AddrArifm(); // unique pointer - check with pointer arithmetic\n    bool ShouldReportError();\n    void Free_NULL(); //\n    void Zerofilling(); // check if arrays are zero-filled\n    void TestAlignedParameters();\n    void RunAllTests(int total_threads);\n    ~CMemTest() {}\n};\n\nclass Limit {\n    size_t limit;\npublic:\n    Limit(size_t a_limit) : limit(a_limit) {}\n    void operator() () const {\n        limitMem(limit);\n    }\n};\n\nint argC;\nchar** argV;\n\nstruct RoundRobin: utils::NoAssign {\n    const long number_of_threads;\n    mutable CMemTest test;\n\n    RoundRobin( long p, utils::SpinBarrier *limitBarrier, bool verbose ) :\n        number_of_threads(p), test(limitBarrier, verbose) {}\n    void operator()( int /*id*/ ) const\n        {\n            test.RunAllTests(number_of_threads);\n        }\n};\n\nbool CMemTest::firstTime = true;\n\ninline size_t choose_random_alignment() {\n    return sizeof(void*)<<(rand() % POWERS_OF_2);\n}\n\n#if TBB_REVAMP_TODO\n// TODO: enable this test mode\nstatic void setSystemAllocs()\n{\n    Rmalloc=malloc;\n    Rrealloc=realloc;\n    Rcalloc=calloc;\n    Tfree=free;\n#if _WIN32 || _WIN64\n    Raligned_malloc=_aligned_malloc;\n    Raligned_realloc=_aligned_realloc;\n    Taligned_free=_aligned_free;\n    Rposix_memalign=0;\n#elif  __APPLE__ || __sun || __ANDROID__\n// macOS, Solaris*, and Android* don't have posix_memalign\n    Raligned_malloc=0;\n    Raligned_realloc=0;\n    Taligned_free=0;\n    Rposix_memalign=0;\n#else\n    Raligned_malloc=0;\n    Raligned_realloc=0;\n    Taligned_free=0;\n    Rposix_memalign=posix_memalign;\n#endif\n}\n#endif\n\n// check that realloc works as free and as malloc\nvoid ReallocParam()\n{\n    const int ITERS = 1000;\n    int i;\n    void *bufs[ITERS];\n\n    bufs[0] = Trealloc(nullptr, 30*MByte);\n    REQUIRE_MESSAGE(bufs[0], \"Can't get memory to start the test.\");\n\n    for (i=1; i<ITERS; i++)\n    {\n        bufs[i] = Trealloc(nullptr, 30*MByte);\n        if (nullptr == bufs[i])\n            break;\n    }\n    REQUIRE_MESSAGE(i<ITERS, \"Limits should be decreased for the test to work.\");\n\n    Trealloc(bufs[0], 0);\n    /* There is a race for the free space between different threads at\n       this point. So, have to run the test sequentially.\n    */\n    bufs[0] = Trealloc(nullptr, 30*MByte);\n    REQUIRE(bufs[0]);\n\n    for (int j=0; j<i; j++)\n        Trealloc(bufs[j], 0);\n}\n\nvoid CheckArgumentsOverflow()\n{\n    void *p;\n    const size_t params[] = {SIZE_MAX, SIZE_MAX-16};\n\n    for (unsigned i=0; i<utils::array_length(params); i++) {\n        p = Tmalloc(params[i]);\n        REQUIRE(!p);\n        ASSERT_ERRNO(errno==ENOMEM, nullptr);\n        p = Trealloc(nullptr, params[i]);\n        REQUIRE(!p);\n        ASSERT_ERRNO(errno==ENOMEM, nullptr);\n        p = Tcalloc(1, params[i]);\n        REQUIRE(!p);\n        ASSERT_ERRNO(errno==ENOMEM, nullptr);\n        p = Tcalloc(params[i], 1);\n        REQUIRE(!p);\n        ASSERT_ERRNO(errno==ENOMEM, nullptr);\n    }\n    const size_t max_alignment = size_t(1) << (sizeof(size_t)*CHAR_BIT - 1);\n    if (Rposix_memalign) {\n        int ret = Rposix_memalign(&p, max_alignment, ~max_alignment);\n        REQUIRE(ret == ENOMEM);\n        for (unsigned i=0; i<utils::array_length(params); i++) {\n            ret = Rposix_memalign(&p, max_alignment, params[i]);\n            REQUIRE(ret == ENOMEM);\n            ret = Rposix_memalign(&p, sizeof(void*), params[i]);\n            REQUIRE(ret == ENOMEM);\n        }\n    }\n    if (Raligned_malloc) {\n        p = Raligned_malloc(~max_alignment, max_alignment);\n        REQUIRE(!p);\n        for (unsigned i=0; i<utils::array_length(params); i++) {\n            p = Raligned_malloc(params[i], max_alignment);\n            REQUIRE(!p);\n            ASSERT_ERRNO(errno==ENOMEM, nullptr);\n            p = Raligned_malloc(params[i], sizeof(void*));\n            REQUIRE(!p);\n            ASSERT_ERRNO(errno==ENOMEM, nullptr);\n        }\n    }\n\n    p = Tcalloc(SIZE_MAX/2-16, SIZE_MAX/2-16);\n    REQUIRE(!p);\n    ASSERT_ERRNO(errno==ENOMEM, nullptr);\n    p = Tcalloc(SIZE_MAX/2, SIZE_MAX/2);\n    REQUIRE(!p);\n    ASSERT_ERRNO(errno==ENOMEM, nullptr);\n}\n\nvoid InvariantDataRealloc(bool aligned, size_t maxAllocSize, bool checkData)\n{\n    utils::FastRandom<> fastRandom(1);\n    size_t size = 0, start = 0;\n    char *ptr = nullptr,\n        // external thread to create copies and compare ralloc result against it\n        *base = (char*)Tmalloc(2*maxAllocSize);\n\n    REQUIRE(base);\n    REQUIRE_MESSAGE(!(2*maxAllocSize%sizeof(unsigned short)),\n           \"The loop below expects that 2*maxAllocSize contains sizeof(unsigned short)\");\n    for (size_t k = 0; k<2*maxAllocSize; k+=sizeof(unsigned short))\n        *(unsigned short*)(base+k) = fastRandom.get();\n\n    for (int i=0; i<100; i++) {\n        // don't want sizeNew==0 here\n        const size_t sizeNew = fastRandom.get() % (maxAllocSize-1) + 1;\n        char *ptrNew = aligned?\n            (char*)Taligned_realloc(ptr, sizeNew, choose_random_alignment())\n            : (char*)Trealloc(ptr, sizeNew);\n        REQUIRE(ptrNew);\n        // check that old data not changed\n        if (checkData)\n            REQUIRE_MESSAGE(!memcmp(ptrNew, base+start, utils::min(size, sizeNew)), \"broken data\");\n\n        // prepare fresh data, copying them from random position in external\n        size = sizeNew;\n        ptr = ptrNew;\n        if (checkData) {\n            start = fastRandom.get() % maxAllocSize;\n            memcpy(ptr, base+start, size);\n        }\n    }\n    if (aligned)\n        Taligned_realloc(ptr, 0, choose_random_alignment());\n    else\n        Trealloc(ptr, 0);\n    Tfree(base);\n}\n\nvoid CheckReallocLeak()\n{\n    int i;\n    const int ITER_TO_STABILITY = 10;\n    // do bootstrap\n    for (int k=0; k<3; k++)\n        InvariantDataRealloc(/*aligned=*/false, 128*MByte, /*checkData=*/false);\n    size_t prev = utils::GetMemoryUsage(utils::peakUsage);\n    // expect realloc to not increase peak memory consumption after ITER_TO_STABILITY-1 iterations\n    for (i=0; i<ITER_TO_STABILITY; i++) {\n        for (int k=0; k<3; k++)\n            InvariantDataRealloc(/*aligned=*/false, 128*MByte, /*checkData=*/false);\n        size_t curr = utils::GetMemoryUsage(utils::peakUsage);\n        if (prev == curr)\n            break;\n        prev = curr;\n    }\n    REQUIRE_MESSAGE(i < ITER_TO_STABILITY, \"Can't stabilize memory consumption.\");\n}\n\n// if non-zero byte found, returns bad value address plus 1\nsize_t NonZero(void *ptr, size_t size)\n{\n    size_t words = size / sizeof(intptr_t);\n    size_t tailSz = size % sizeof(intptr_t);\n    intptr_t *buf =(intptr_t*)ptr;\n    char *bufTail =(char*)(buf+words);\n\n    for (size_t i=0; i<words; i++)\n        if (buf[i]) {\n            for (unsigned b=0; b<sizeof(intptr_t); b++)\n                if (((char*)(buf+i))[b])\n                    return sizeof(intptr_t)*i + b + 1;\n        }\n    for (size_t i=0; i<tailSz; i++)\n        if (bufTail[i]) {\n            return words*sizeof(intptr_t)+i+1;\n        }\n    return 0;\n}\n\nstruct TestStruct\n{\n    DWORD field1:2;\n    DWORD field2:6;\n    double field3;\n    UCHAR field4[100];\n    TestStruct* field5;\n    std::vector<int> field7;\n    double field8;\n};\n\nvoid* Tmalloc(size_t size)\n{\n    // For compatibility, on 64-bit systems malloc should align to 16 bytes\n    size_t alignment = (sizeof(intptr_t)>4 && size>8) ? 16 : 8;\n    void *ret = Rmalloc(size);\n    if (nullptr != ret)\n        CHECK_FAST_MESSAGE(0==((uintptr_t)ret & (alignment-1)),\n               \"allocation result should be properly aligned\");\n    return ret;\n}\nvoid* Tcalloc(size_t num, size_t size)\n{\n    // For compatibility, on 64-bit systems calloc should align to 16 bytes\n    size_t alignment = (sizeof(intptr_t)>4 && num && size>8) ? 16 : 8;\n    void *ret = Rcalloc(num, size);\n    if (nullptr != ret)\n        CHECK_FAST_MESSAGE(0==((uintptr_t)ret & (alignment-1)),\n               \"allocation result should be properly aligned\");\n    return ret;\n}\nvoid* Trealloc(void* memblock, size_t size)\n{\n    // For compatibility, on 64-bit systems realloc should align to 16 bytes\n    size_t alignment = (sizeof(intptr_t)>4 && size>8) ? 16 : 8;\n    void *ret = Rrealloc(memblock, size);\n    if (nullptr != ret)\n        CHECK_FAST_MESSAGE(0==((uintptr_t)ret & (alignment-1)),\n               \"allocation result should be properly aligned\");\n    return ret;\n}\nint Tposix_memalign(void **memptr, size_t alignment, size_t size)\n{\n    int ret = Rposix_memalign(memptr, alignment, size);\n    if (0 == ret)\n        CHECK_FAST_MESSAGE(0==((uintptr_t)*memptr & (alignment-1)),\n               \"allocation result should be aligned\");\n    return ret;\n}\nvoid* Taligned_malloc(size_t size, size_t alignment)\n{\n    void *ret = Raligned_malloc(size, alignment);\n    if (nullptr != ret)\n        CHECK_FAST_MESSAGE(0==((uintptr_t)ret & (alignment-1)),\n               \"allocation result should be aligned\");\n    return ret;\n}\nvoid* Taligned_realloc(void* memblock, size_t size, size_t alignment)\n{\n    void *ret = Raligned_realloc(memblock, size, alignment);\n    if (nullptr != ret)\n        CHECK_FAST_MESSAGE(0==((uintptr_t)ret & (alignment-1)),\n               \"allocation result should be aligned\");\n    return ret;\n}\n\nstruct PtrSize {\n    void  *ptr;\n    size_t size;\n};\n\nstatic int cmpAddrs(const void *p1, const void *p2)\n{\n    const PtrSize *a = (const PtrSize *)p1;\n    const PtrSize *b = (const PtrSize *)p2;\n\n    return a->ptr < b->ptr ? -1 : ( a->ptr == b->ptr ? 0 : 1);\n}\n\nvoid CMemTest::AddrArifm()\n{\n    PtrSize *arr = (PtrSize*)Tmalloc(COUNT_ELEM*sizeof(PtrSize));\n\n    if (FullLog) REPORT(\"\\nUnique pointer using Address arithmetic\\n\");\n    if (FullLog) REPORT(\"malloc....\");\n    REQUIRE(arr);\n    for (int i=0; i<COUNT_ELEM; i++)\n    {\n        arr[i].size=rand()%MAX_SIZE;\n        arr[i].ptr=Tmalloc(arr[i].size);\n    }\n    qsort(arr, COUNT_ELEM, sizeof(PtrSize), cmpAddrs);\n\n    for (int i=0; i<COUNT_ELEM-1; i++)\n    {\n        if (nullptr!=arr[i].ptr && nullptr!=arr[i+1].ptr)\n            REQUIRE_MESSAGE((uintptr_t)arr[i].ptr+arr[i].size <= (uintptr_t)arr[i+1].ptr,\n                   \"intersection detected\");\n    }\n    //----------------------------------------------------------------\n    if (FullLog) REPORT(\"realloc....\");\n    for (int i=0; i<COUNT_ELEM; i++)\n    {\n        size_t count=arr[i].size*2;\n        void *tmpAddr=Trealloc(arr[i].ptr,count);\n        if (nullptr!=tmpAddr) {\n            arr[i].ptr = tmpAddr;\n            arr[i].size = count;\n        } else if (count==0) { // because realloc(..., 0) works as free\n            arr[i].ptr = nullptr;\n            arr[i].size = 0;\n        }\n    }\n    qsort(arr, COUNT_ELEM, sizeof(PtrSize), cmpAddrs);\n\n    for (int i=0; i<COUNT_ELEM-1; i++)\n    {\n        if (nullptr!=arr[i].ptr && nullptr!=arr[i+1].ptr)\n            REQUIRE_MESSAGE((uintptr_t)arr[i].ptr+arr[i].size <= (uintptr_t)arr[i+1].ptr,\n                   \"intersection detected\");\n    }\n    for (int i=0; i<COUNT_ELEM; i++)\n    {\n        Tfree(arr[i].ptr);\n    }\n    //-------------------------------------------\n    if (FullLog) REPORT(\"calloc....\");\n    for (int i=0; i<COUNT_ELEM; i++)\n    {\n        arr[i].size=rand()%MAX_SIZE;\n        arr[i].ptr=Tcalloc(arr[i].size,1);\n    }\n    qsort(arr, COUNT_ELEM, sizeof(PtrSize), cmpAddrs);\n\n    for (int i=0; i<COUNT_ELEM-1; i++)\n    {\n        if (nullptr!=arr[i].ptr && nullptr!=arr[i+1].ptr)\n            REQUIRE_MESSAGE((uintptr_t)arr[i].ptr+arr[i].size <= (uintptr_t)arr[i+1].ptr,\n                   \"intersection detected\");\n    }\n    for (int i=0; i<COUNT_ELEM; i++)\n    {\n        Tfree(arr[i].ptr);\n    }\n    Tfree(arr);\n}\n\nvoid CMemTest::Zerofilling()\n{\n    TestStruct* TSMas;\n    size_t CountElement;\n    static std::atomic<int> CountErrors{0};\n    if (FullLog) REPORT(\"\\nzeroings elements of array....\");\n    //test struct\n    for (int i=0; i<COUNTEXPERIMENT; i++)\n    {\n        CountElement=rand()%MAX_SIZE;\n        TSMas=(TestStruct*)Tcalloc(CountElement,sizeof(TestStruct));\n        if (nullptr == TSMas)\n            continue;\n        for (size_t j=0; j<CountElement; j++)\n        {\n            if (NonZero(TSMas+j, sizeof(TestStruct)))\n            {\n                CountErrors++;\n                if (ShouldReportError()) REPORT(\"detect nonzero element at TestStruct\\n\");\n            }\n        }\n        Tfree(TSMas);\n    }\n    if (CountErrors) REPORT(\"%s\\n\",strError);\n    else if (FullLog) REPORT(\"%s\\n\",strOk);\n    if (CountErrors) error_occurred = true;\n}\n\n#if !__APPLE__\n\nvoid myMemset(void *ptr, int c, size_t n)\n{\n#if  __unix__ &&  __i386__\n// memset in Fedora 13 not always correctly sets memory to required values.\n    char *p = (char*)ptr;\n    for (size_t i=0; i<n; i++)\n        p[i] = c;\n#else\n    memset(ptr, c, n);\n#endif\n}\n\n// This test requires more than TOTAL_MB_ALLOC MB of RAM.\n#if __ANDROID__\n// Android requires lower limit due to lack of virtual memory.\n#define TOTAL_MB_ALLOC\t200\n#else\n#define TOTAL_MB_ALLOC  800\n#endif\nvoid CMemTest::NULLReturn(UINT MinSize, UINT MaxSize, int total_threads)\n{\n    const int MB_PER_THREAD = TOTAL_MB_ALLOC / total_threads;\n    // find size to guarantee getting nullptr for 1024 B allocations\n    const int MAXNUM_1024 = (MB_PER_THREAD + (MB_PER_THREAD>>2)) * 1024;\n\n    std::vector<MemStruct> PointerList;\n    void *tmp;\n    static std::atomic<int> CountErrors{0};\n    int CountNULL, num_1024;\n    if (FullLog) REPORT(\"\\nNULL return & check errno:\\n\");\n    UINT Size;\n    Limit limit_total(TOTAL_MB_ALLOC), no_limit(0);\n    void **buf_1024 = (void**)Tmalloc(MAXNUM_1024*sizeof(void*));\n\n    REQUIRE(buf_1024);\n    /* We must have space for pointers when memory limit is hit.\n       Reserve enough for the worst case, taking into account race for\n       limited space between threads.\n    */\n    PointerList.reserve(TOTAL_MB_ALLOC*MByte/MinSize);\n\n    /* There is a bug in the specific version of GLIBC (2.5-12) shipped\n       with RHEL5 that leads to erroneous working of the test\n       on Intel(R) 64 and Itanium(R) architecture when setrlimit-related part is enabled.\n       Switching to GLIBC 2.5-18 from RHEL5.1 resolved the issue.\n     */\n    if (perProcessLimits)\n        limitBarrier->wait(limit_total);\n    else\n        limitMem(MB_PER_THREAD);\n\n    /* regression test against the bug in allocator when it dereference nullptr\n       while lack of memory\n    */\n    for (num_1024=0; num_1024<MAXNUM_1024; num_1024++) {\n        buf_1024[num_1024] = Tcalloc(1024, 1);\n        if (! buf_1024[num_1024]) {\n            ASSERT_ERRNO(errno == ENOMEM, nullptr);\n            break;\n        }\n    }\n    for (int i=0; i<num_1024; i++)\n        Tfree(buf_1024[i]);\n    Tfree(buf_1024);\n\n    do {\n        Size=rand()%(MaxSize-MinSize)+MinSize;\n        tmp=Tmalloc(Size);\n        if (tmp != nullptr)\n        {\n            myMemset(tmp, 0, Size);\n            PointerList.push_back(MemStruct(tmp, Size));\n        }\n    } while(tmp != nullptr);\n    ASSERT_ERRNO(errno == ENOMEM, nullptr);\n    if (FullLog) REPORT(\"\\n\");\n\n    // preparation complete, now running tests\n    // malloc\n    if (FullLog) REPORT(\"malloc....\");\n    CountNULL = 0;\n    while (CountNULL==0)\n        for (int j=0; j<COUNT_TESTS; j++)\n        {\n            Size=rand()%(MaxSize-MinSize)+MinSize;\n            errno = ENOMEM+j+1;\n            tmp=Tmalloc(Size);\n            if (tmp == nullptr)\n            {\n                CountNULL++;\n                if ( CHECK_ERRNO(errno != ENOMEM) ) {\n                    CountErrors++;\n                    if (ShouldReportError()) REPORT(\"nullptr returned, error: errno (%d) != ENOMEM\\n\", errno);\n                }\n            }\n            else\n            {\n                // Technically, if malloc returns a non-null pointer, it is allowed to set errno anyway.\n                // However, on most systems it does not set errno.\n                bool known_issue = false;\n#if __unix__ || __ANDROID__\n                if( CHECK_ERRNO(errno==ENOMEM) ) known_issue = true;\n#endif /* __unix__ */\n                if ( CHECK_ERRNO(errno != ENOMEM+j+1) && !known_issue) {\n                    CountErrors++;\n                    if (ShouldReportError()) REPORT(\"error: errno changed to %d though valid pointer was returned\\n\", errno);\n                }\n                myMemset(tmp, 0, Size);\n                PointerList.push_back(MemStruct(tmp, Size));\n            }\n        }\n    if (FullLog) REPORT(\"end malloc\\n\");\n    if (CountErrors) REPORT(\"%s\\n\",strError);\n    else if (FullLog) REPORT(\"%s\\n\",strOk);\n    if (CountErrors) error_occurred = true;\n\n    //calloc\n    if (FullLog) REPORT(\"calloc....\");\n    CountNULL = 0;\n    while (CountNULL==0)\n        for (int j=0; j<COUNT_TESTS; j++)\n        {\n            Size=rand()%(MaxSize-MinSize)+MinSize;\n            errno = ENOMEM+j+1;\n            tmp=Tcalloc(COUNT_ELEM_CALLOC,Size);\n            if (tmp == nullptr)\n            {\n                CountNULL++;\n                if ( CHECK_ERRNO(errno != ENOMEM) ){\n                    CountErrors++;\n                    if (ShouldReportError()) REPORT(\"nullptr returned, error: errno(%d) != ENOMEM\\n\", errno);\n                }\n            }\n            else\n            {\n                // Technically, if calloc returns a non-null pointer, it is allowed to set errno anyway.\n                // However, on most systems it does not set errno.\n                bool known_issue = false;\n#if __unix__\n                if( CHECK_ERRNO(errno==ENOMEM) ) known_issue = true;\n#endif /* __unix__ */\n                if ( CHECK_ERRNO(errno != ENOMEM+j+1) && !known_issue ) {\n                    CountErrors++;\n                    if (ShouldReportError()) REPORT(\"error: errno changed to %d though valid pointer was returned\\n\", errno);\n                }\n                PointerList.push_back(MemStruct(tmp, Size));\n            }\n        }\n    if (FullLog) REPORT(\"end calloc\\n\");\n    if (CountErrors) REPORT(\"%s\\n\",strError);\n    else if (FullLog) REPORT(\"%s\\n\",strOk);\n    if (CountErrors) error_occurred = true;\n    if (FullLog) REPORT(\"realloc....\");\n    CountNULL = 0;\n    if (PointerList.size() > 0)\n        while (CountNULL==0)\n            for (size_t i=0; i<(size_t)COUNT_TESTS && i<PointerList.size(); i++)\n            {\n                errno = 0;\n                tmp=Trealloc(PointerList[i].Pointer,PointerList[i].Size*2);\n                if (tmp != nullptr) // same or another place\n                {\n                    bool known_issue = false;\n#if __unix__\n                    if( errno==ENOMEM ) known_issue = true;\n#endif /* __unix__ */\n                    if (errno != 0 && !known_issue) {\n                        CountErrors++;\n                        if (ShouldReportError()) REPORT(\"valid pointer returned, error: errno not kept\\n\");\n                    }\n                    // newly allocated area have to be zeroed\n                    myMemset((char*)tmp + PointerList[i].Size, 0, PointerList[i].Size);\n                    PointerList[i].Pointer = tmp;\n                    PointerList[i].Size *= 2;\n                } else {\n                    CountNULL++;\n                    if ( CHECK_ERRNO(errno != ENOMEM) )\n                    {\n                        CountErrors++;\n                        if (ShouldReportError()) REPORT(\"nullptr returned, error: errno(%d) != ENOMEM\\n\", errno);\n                    }\n                    // check data integrity\n                    if (NonZero(PointerList[i].Pointer, PointerList[i].Size)) {\n                        CountErrors++;\n                        if (ShouldReportError()) REPORT(\"nullptr returned, error: data changed\\n\");\n                    }\n                }\n            }\n    if (FullLog) REPORT(\"realloc end\\n\");\n    if (CountErrors) REPORT(\"%s\\n\",strError);\n    else if (FullLog) REPORT(\"%s\\n\",strOk);\n    if (CountErrors) error_occurred = true;\n    for (UINT i=0; i<PointerList.size(); i++)\n    {\n        Tfree(PointerList[i].Pointer);\n    }\n\n    if (perProcessLimits)\n        limitBarrier->wait(no_limit);\n    else\n        limitMem(0);\n}\n#endif /* #if !__APPLE__ */\n\nvoid CMemTest::UniquePointer()\n{\n    static std::atomic<int> CountErrors{0};\n    int **MasPointer = (int **)Tmalloc(sizeof(int*)*COUNT_ELEM);\n    size_t *MasCountElem = (size_t*)Tmalloc(sizeof(size_t)*COUNT_ELEM);\n    if (FullLog) REPORT(\"\\nUnique pointer using 0\\n\");\n    REQUIRE((MasCountElem && MasPointer));\n    //\n    //-------------------------------------------------------\n    //malloc\n    for (int i=0; i<COUNT_ELEM; i++)\n    {\n        MasCountElem[i]=rand()%MAX_SIZE;\n        MasPointer[i]=(int*)Tmalloc(MasCountElem[i]*sizeof(int));\n        if (nullptr == MasPointer[i])\n            MasCountElem[i]=0;\n        memset(MasPointer[i], 0, sizeof(int)*MasCountElem[i]);\n    }\n    if (FullLog) REPORT(\"malloc....\");\n    for (UINT i=0; i<COUNT_ELEM-1; i++)\n    {\n        if (size_t badOff = NonZero(MasPointer[i], sizeof(int)*MasCountElem[i])) {\n            CountErrors++;\n            if (ShouldReportError())\n                REPORT(\"error, detect non-zero at %p\\n\", (char*)MasPointer[i]+badOff-1);\n        }\n        memset(MasPointer[i], 1, sizeof(int)*MasCountElem[i]);\n    }\n    if (CountErrors) REPORT(\"%s\\n\",strError);\n    else if (FullLog) REPORT(\"%s\\n\",strOk);\n    if (CountErrors) error_occurred = true;\n    //----------------------------------------------------------\n    //calloc\n    for (int i=0; i<COUNT_ELEM; i++)\n        Tfree(MasPointer[i]);\n    for (long i=0; i<COUNT_ELEM; i++)\n    {\n        MasPointer[i]=(int*)Tcalloc(MasCountElem[i]*sizeof(int),2);\n        if (nullptr == MasPointer[i])\n            MasCountElem[i]=0;\n    }\n    if (FullLog) REPORT(\"calloc....\");\n    for (int i=0; i<COUNT_ELEM-1; i++)\n    {\n        if (size_t badOff = NonZero(MasPointer[i], sizeof(int)*MasCountElem[i])) {\n            CountErrors++;\n            if (ShouldReportError())\n                REPORT(\"error, detect non-zero at %p\\n\", (char*)MasPointer[i]+badOff-1);\n        }\n        memset(MasPointer[i], 1, sizeof(int)*MasCountElem[i]);\n    }\n    if (CountErrors) REPORT(\"%s\\n\",strError);\n    else if (FullLog) REPORT(\"%s\\n\",strOk);\n    if (CountErrors) error_occurred = true;\n    //---------------------------------------------------------\n    //realloc\n    for (int i=0; i<COUNT_ELEM; i++)\n    {\n        MasCountElem[i]*=2;\n        *(MasPointer+i)=\n            (int*)Trealloc(*(MasPointer+i),MasCountElem[i]*sizeof(int));\n        if (nullptr == MasPointer[i])\n            MasCountElem[i]=0;\n        memset(MasPointer[i], 0, sizeof(int)*MasCountElem[i]);\n    }\n    if (FullLog) REPORT(\"realloc....\");\n    for (int i=0; i<COUNT_ELEM-1; i++)\n    {\n        if (NonZero(MasPointer[i], sizeof(int)*MasCountElem[i]))\n            CountErrors++;\n        memset(MasPointer[i], 1, sizeof(int)*MasCountElem[i]);\n    }\n    if (CountErrors) REPORT(\"%s\\n\",strError);\n    else if (FullLog) REPORT(\"%s\\n\",strOk);\n    if (CountErrors) error_occurred = true;\n    for (int i=0; i<COUNT_ELEM; i++)\n        Tfree(MasPointer[i]);\n    Tfree(MasCountElem);\n    Tfree(MasPointer);\n}\n\nbool CMemTest::ShouldReportError()\n{\n    if (FullLog)\n        return true;\n    else\n        if (firstTime) {\n            firstTime = false;\n            return true;\n        } else\n            return false;\n}\n\nvoid CMemTest::Free_NULL()\n{\n    static std::atomic<int> CountErrors{0};\n    if (FullLog) REPORT(\"\\ncall free with parameter nullptr....\");\n    errno = 0;\n    for (int i=0; i<COUNTEXPERIMENT; i++)\n    {\n        Tfree(nullptr);\n        if (CHECK_ERRNO(errno))\n        {\n            CountErrors++;\n            if (ShouldReportError()) REPORT(\"error is found by a call free with parameter nullptr\\n\");\n        }\n    }\n    if (CountErrors) REPORT(\"%s\\n\",strError);\n    else if (FullLog) REPORT(\"%s\\n\",strOk);\n    if (CountErrors) error_occurred = true;\n}\n\nvoid CMemTest::TestAlignedParameters()\n{\n    void *memptr;\n    int ret;\n\n    if (Rposix_memalign) {\n        // alignment isn't power of 2\n        for (int bad_align=3; bad_align<16; bad_align++)\n            if (bad_align&(bad_align-1)) {\n                ret = Tposix_memalign(nullptr, bad_align, 100);\n                REQUIRE(EINVAL==ret);\n            }\n\n        memptr = &ret;\n        ret = Tposix_memalign(&memptr, 5*sizeof(void*), 100);\n        REQUIRE_MESSAGE(memptr == &ret,\n               \"memptr should not be changed after unsuccessful call\");\n        REQUIRE(EINVAL==ret);\n\n        // alignment is power of 2, but not a multiple of sizeof(void *),\n        // we expect that sizeof(void*) > 2\n        ret = Tposix_memalign(nullptr, 2, 100);\n        REQUIRE(EINVAL==ret);\n    }\n    if (Raligned_malloc) {\n        // alignment isn't power of 2\n        for (int bad_align=3; bad_align<16; bad_align++)\n            if (bad_align&(bad_align-1)) {\n                memptr = Taligned_malloc(100, bad_align);\n                REQUIRE(memptr == nullptr);\n                ASSERT_ERRNO(EINVAL==errno, nullptr);\n            }\n\n        // size is zero\n        memptr = Taligned_malloc(0, 16);\n        REQUIRE_MESSAGE(memptr == nullptr, \"size is zero, so must return nullptr\");\n        ASSERT_ERRNO(EINVAL==errno, nullptr);\n    }\n    if (Taligned_free) {\n        // nullptr pointer is OK to free\n        errno = 0;\n        Taligned_free(nullptr);\n        /* As there is no return value for free, strictly speaking we can't\n           check errno here. But checked implementations obey the assertion.\n        */\n        ASSERT_ERRNO(0==errno, nullptr);\n    }\n    if (Raligned_realloc) {\n        for (int i=1; i<20; i++) {\n            // checks that calls work correctly in presence of non-zero errno\n            errno = i;\n            void *ptr = Taligned_malloc(i*10, 128);\n            REQUIRE(ptr != nullptr);\n            ASSERT_ERRNO(0!=errno, nullptr);\n            // if size is zero and pointer is not nullptr, works like free\n            memptr = Taligned_realloc(ptr, 0, 64);\n            REQUIRE(memptr == nullptr);\n            ASSERT_ERRNO(0!=errno, nullptr);\n        }\n        // alignment isn't power of 2\n        for (int bad_align=3; bad_align<16; bad_align++)\n            if (bad_align&(bad_align-1)) {\n                void *ptr = &bad_align;\n                memptr = Taligned_realloc(&ptr, 100, bad_align);\n                REQUIRE(memptr == nullptr);\n                REQUIRE(&bad_align==ptr);\n                ASSERT_ERRNO(EINVAL==errno, nullptr);\n            }\n    }\n}\n\nvoid CMemTest::RunAllTests(int total_threads)\n{\n    Zerofilling();\n    Free_NULL();\n    InvariantDataRealloc(/*aligned=*/false, 8*MByte, /*checkData=*/true);\n    if (Raligned_realloc)\n        InvariantDataRealloc(/*aligned=*/true, 8*MByte, /*checkData=*/true);\n    TestAlignedParameters();\n    UniquePointer();\n    AddrArifm();\n#if __APPLE__ || __TBB_USE_THREAD_SANITIZER\n    REPORT(\"Known issue: some tests are skipped on macOS\\n\");\n#else\n    // TODO: enable\n    NULLReturn(1*MByte,100*MByte,total_threads);\n#endif\n    if (FullLog) REPORT(\"Tests for %d threads ended\\n\", total_threads);\n}\n\n// TODO: fix the tests to support UWP mode\n#if !__TBB_WIN8UI_SUPPORT\n\nTEST_CASE(\"MAIN TEST\") {\n    Rmalloc=scalable_malloc;\n    Rrealloc=scalable_realloc;\n    Rcalloc=scalable_calloc;\n    Tfree=scalable_free;\n    Rposix_memalign=scalable_posix_memalign;\n    Raligned_malloc=scalable_aligned_malloc;\n    Raligned_realloc=scalable_aligned_realloc;\n    Taligned_free=scalable_aligned_free;\n\n    // Check if we were called to test standard behavior\n    // TODO: enable this mode\n    // setSystemAllocs();\n#if __unix__\n    /* According to man pthreads\n       \"NPTL threads do not share resource limits (fixed in kernel 2.6.10)\".\n       Use per-threads limits for affected systems.\n     */\n    if ( utils::LinuxKernelVersion() < 2*1000000 + 6*1000 + 10)\n        perProcessLimits = false;\n#endif\n    //-------------------------------------\n#if __APPLE__ || __TBB_USE_SANITIZERS\n    /* Skip due to lack of memory limit enforcing under macOS. */\n    //Skip this test under ASAN , as OOM condition breaks the ASAN as well\n#else\n    limitMem(200);\n    ReallocParam();\n    limitMem(0);\n#endif\n\n//for linux and dynamic runtime errno is used to check allocator functions\n//check if library compiled with /MD(d) and we can use errno\n#if _MSC_VER\n#if defined(_MT) && defined(_DLL) //check errno if test itself compiled with /MD(d) only\n    char*  version_info_block = nullptr;\n    int version_info_block_size;\n    LPVOID comments_block = nullptr;\n    UINT comments_block_size;\n#ifdef _DEBUG\n#define __TBBMALLOCDLL \"tbbmalloc_debug.dll\"\n#else  //_DEBUG\n#define __TBBMALLOCDLL \"tbbmalloc.dll\"\n#endif //_DEBUG\n    version_info_block_size = GetFileVersionInfoSize( __TBBMALLOCDLL, (LPDWORD)&version_info_block_size );\n    if( version_info_block_size\n        && ((version_info_block = (char*)malloc(version_info_block_size)) != nullptr)\n        && GetFileVersionInfo(  __TBBMALLOCDLL, NULL, version_info_block_size, version_info_block )\n        && VerQueryValue( version_info_block, \"\\\\StringFileInfo\\\\000004b0\\\\Comments\", &comments_block, &comments_block_size )\n        && strstr( (char*)comments_block, \"/MD\" )\n        ){\n            __tbb_test_errno = true;\n     }\n     if( version_info_block ) free( version_info_block );\n#endif // defined(_MT) && defined(_DLL)\n#else  // _MSC_VER\n    __tbb_test_errno = true;\n#endif // _MSC_VER\n\n    CheckArgumentsOverflow();\n    CheckReallocLeak();\n    for( int p=MaxThread; p>=MinThread; --p ) {\n        for (int limit=0; limit<2; limit++) {\n            int ret = scalable_allocation_mode(TBBMALLOC_SET_SOFT_HEAP_LIMIT, 16*1024*limit);\n            REQUIRE(ret==TBBMALLOC_OK);\n            utils::SpinBarrier *barrier = new utils::SpinBarrier(p);\n            utils::NativeParallelFor( p, RoundRobin(p, barrier, Verbose) );\n            delete barrier;\n        }\n    }\n    int ret = scalable_allocation_mode(TBBMALLOC_SET_SOFT_HEAP_LIMIT, 0);\n    REQUIRE(ret==TBBMALLOC_OK);\n    REQUIRE(!error_occurred);\n}\n\n#endif /* __TBB_WIN8UI_SUPPORT\t */\n#endif /* Enable test */\n"
  },
  {
    "path": "third-party/tbb/test/tbbmalloc/test_malloc_init_shutdown.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#define __TBB_NO_IMPLICIT_LINKAGE 1\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/spin_barrier.h\"\n#include \"oneapi/tbb/detail/_utils.h\"\n#include \"tbb/scalable_allocator.h\"\n#include <thread>\n\nstatic constexpr std::size_t MaxTasks = 16;\nstd::atomic<std::size_t> FinishedTasks;\n\nstatic constexpr std::size_t MaxThread = 4;\n\n/*--------------------------------------------------------------------*/\n// The regression test against a bug triggered when malloc initialization\n// and thread shutdown were called simultaneously, in which case\n// Windows dynamic loader lock and allocator initialization/termination lock\n// were taken in different order.\n\n\n\nclass TestFunc1 {\n    utils::SpinBarrier* my_barr;\npublic:\n    TestFunc1 (utils::SpinBarrier& barr) : my_barr(&barr) {}\n    void operator() (bool do_malloc) const {\n        my_barr->wait();\n        if (do_malloc) scalable_malloc(10);\n        ++FinishedTasks;\n    }\n};\n\nvoid Test1 () {\n    std::size_t NTasks = utils::min(MaxTasks, utils::max(std::size_t(2), MaxThread));\n    utils::SpinBarrier barr(NTasks);\n    TestFunc1 tf(barr);\n    FinishedTasks = 0;\n\n    utils::NativeParallelFor(NTasks, [&] (std::size_t thread_idx) {\n        tf(thread_idx % 2 == 0);\n        while (FinishedTasks != NTasks) utils::yield();\n    });\n}\n\n/*--------------------------------------------------------------------*/\n// The regression test against a bug when cross-thread deallocation\n// caused livelock at thread shutdown.\n\nstd::atomic<void*> gPtr(nullptr);\n\nclass TestFunc2a {\n    utils::SpinBarrier* my_barr;\npublic:\n    TestFunc2a (utils::SpinBarrier& barr) : my_barr(&barr) {}\n    void operator() (std::size_t) const {\n        gPtr = scalable_malloc(8);\n        my_barr->wait();\n        ++FinishedTasks;\n    }\n};\n\nclass TestFunc2b {\n    utils::SpinBarrier* my_barr;\n    std::thread& my_ward;\npublic:\n    TestFunc2b (utils::SpinBarrier& barr, std::thread& t) : my_barr(&barr), my_ward(t) {}\n    void operator() (std::size_t) const {\n        utils::SpinWaitWhileEq(gPtr, (void*)nullptr);\n        scalable_free(gPtr);\n        my_barr->wait();\n        my_ward.join();\n        ++FinishedTasks;\n    }\n};\nvoid Test2() {\n    utils::SpinBarrier barr(2);\n    TestFunc2a func2a(barr);\n    std::thread t2a;\n    TestFunc2b func2b(barr, t2a);\n    FinishedTasks = 0;\n    t2a = std::thread(func2a, std::size_t(0));\n    std::thread t2b(func2b, std::size_t(1));\n\n    while (FinishedTasks != 2) utils::yield();\n\n    t2b.join(); // t2a is monitored by t2b\n\n    if (t2a.joinable()) t2a.join();\n}\n\n#if _WIN32||_WIN64\n\nvoid TestKeyDtor() {}\n\n#else\n\nvoid *currSmall, *prevSmall, *currLarge, *prevLarge;\n\nextern \"C\" void threadDtor(void*) {\n    // First, release memory that was allocated before;\n    // it will not re-initialize the thread-local data if already deleted\n    prevSmall = currSmall;\n    scalable_free(currSmall);\n    prevLarge = currLarge;\n    scalable_free(currLarge);\n    // Then, allocate more memory.\n    // It will re-initialize the allocator data in the thread.\n    scalable_free(scalable_malloc(8));\n}\n\ninline bool intersectingObjects(const void *p1, const void *p2, size_t n)\n{\n    return p1>p2 ? ((uintptr_t)p1-(uintptr_t)p2)<n : ((uintptr_t)p2-(uintptr_t)p1)<n;\n}\n\nstruct TestThread: utils::NoAssign {\n    TestThread(int ) {}\n\n    void operator()( std::size_t /*id*/ ) const {\n        pthread_key_t key;\n\n        currSmall = scalable_malloc(8);\n        REQUIRE_MESSAGE((!prevSmall || currSmall==prevSmall), \"Possible memory leak\");\n        currLarge = scalable_malloc(32*1024);\n        // intersectingObjects takes into account object shuffle\n        REQUIRE_MESSAGE((!prevLarge || intersectingObjects(currLarge, prevLarge, 32*1024)), \"Possible memory leak\");\n        pthread_key_create( &key, &threadDtor );\n        pthread_setspecific(key, (const void*)this);\n    }\n};\n\n// test releasing memory from pthread key destructor\nvoid TestKeyDtor() {\n    // Allocate region for large objects to prevent whole region release\n    // on scalable_free(currLarge) call, which result in wrong assert inside intersectingObjects check\n    void* preventLargeRelease = scalable_malloc(32*1024);\n    for (int i=0; i<4; i++)\n        utils::NativeParallelFor( 1, TestThread(1) );\n    scalable_free(preventLargeRelease);\n}\n\n#endif // _WIN32||_WIN64\n\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test1\") {\n    Test1(); // requires malloc initialization so should be first\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test2\") {\n    Test2();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test key dtor\") {\n    TestKeyDtor();\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbbmalloc/test_malloc_lib_unload.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n\n#define __TBB_NO_IMPLICIT_LINKAGE 1\n\n#if _USRDLL\n#include \"common/utils_assert.h\"\n\nconst char *globalCallMsg = \"A TBB allocator function call is resolved into wrong implementation.\";\n\n#if _WIN32||_WIN64\n    #define TEST_EXPORT __declspec(dllexport)\n#else\n    #define TEST_EXPORT __TBB_EXPORT\n#endif\n\n// must be defined in DLL for linker to not drop the dependency on the DLL.\nextern \"C\" {\n    extern TEST_EXPORT void *scalable_malloc(size_t);\n    extern TEST_EXPORT void scalable_free (void *);\n    extern TEST_EXPORT void safer_scalable_free (void *, void (*)(void*));\n    extern TEST_EXPORT void *scalable_realloc(void *, size_t);\n    extern TEST_EXPORT void *safer_scalable_realloc(void *, size_t, void *);\n    extern TEST_EXPORT void *scalable_calloc(size_t, size_t);\n    extern TEST_EXPORT int scalable_posix_memalign(void **, size_t, size_t);\n    extern TEST_EXPORT void *scalable_aligned_malloc(size_t, size_t);\n    extern TEST_EXPORT void *scalable_aligned_realloc(void *, size_t, size_t);\n    extern TEST_EXPORT void *safer_scalable_aligned_realloc(void *, size_t, size_t, void *);\n    extern TEST_EXPORT void scalable_aligned_free(void *);\n    extern TEST_EXPORT size_t scalable_msize(void *);\n    extern TEST_EXPORT size_t safer_scalable_msize (void *, size_t (*)(void*));\n    extern TEST_EXPORT int anchor();\n}\n\nextern \"C\" int anchor() {\n    return 42;\n}\n\n// Those functions must not be called instead of presented in dynamic library.\nextern \"C\" void *scalable_malloc(size_t)\n{\n    ASSERT(0, globalCallMsg);\n    return nullptr;\n}\nextern \"C\" void scalable_free (void *)\n{\n    ASSERT(0, globalCallMsg);\n}\nextern \"C\" void safer_scalable_free (void *, void (*)(void*))\n{\n    ASSERT(0, globalCallMsg);\n}\nextern \"C\" void *scalable_realloc(void *, size_t)\n{\n    ASSERT(0, globalCallMsg);\n    return nullptr;\n}\nextern \"C\" void *safer_scalable_realloc(void *, size_t, void *)\n{\n    ASSERT(0, globalCallMsg);\n    return nullptr;\n}\nextern \"C\" void *scalable_calloc(size_t, size_t)\n{\n    ASSERT(0, globalCallMsg);\n    return nullptr;\n}\nextern \"C\" int scalable_posix_memalign(void **, size_t, size_t)\n{\n    ASSERT(0, globalCallMsg);\n    return 0;\n}\nextern \"C\" void *scalable_aligned_malloc(size_t, size_t)\n{\n    ASSERT(0, globalCallMsg);\n    return nullptr;\n}\nextern \"C\" void *scalable_aligned_realloc(void *, size_t, size_t)\n{\n    ASSERT(0, globalCallMsg);\n    return nullptr;\n}\nextern \"C\" void *safer_scalable_aligned_realloc(void *, size_t, size_t, void *)\n{\n    ASSERT(0, globalCallMsg);\n    return nullptr;\n}\nextern \"C\" void scalable_aligned_free(void *)\n{\n    ASSERT(0, globalCallMsg);\n}\nextern \"C\" size_t scalable_msize(void *)\n{\n    ASSERT(0, globalCallMsg);\n    return 0;\n}\nextern \"C\" size_t safer_scalable_msize (void *, size_t (*)(void*))\n{\n    ASSERT(0, globalCallMsg);\n    return 0;\n}\n\nint main() {}\n\n#else  // _USRDLL\n\n#include \"common/config.h\"\n// harness_defs.h must be included before tbb_stddef.h to overcome exception-dependent\n// system headers that come from tbb_stddef.h\n#if __TBB_WIN8UI_SUPPORT || __TBB_MIC_OFFLOAD || (__GNUC__ && __GNUC__ < 10 && __TBB_USE_SANITIZERS) || __TBB_SOURCE_DIRECTLY_INCLUDED\n// The test does not work if dynamic load is unavailable.\n// For MIC offload, it fails because liboffload brings libiomp which observes and uses the fake scalable_* calls.\n// For sanitizers, it fails because RUNPATH is lost: https://github.com/google/sanitizers/issues/1219\n#else\n#include \"common/test.h\"\n#include \"common/memory_usage.h\"\n#include \"common/utils_dynamic_libs.h\"\n#include \"common/utils_assert.h\"\n#include \"common/utils_report.h\"\n#include <cstring> // memset\n\nextern \"C\" {\n#if _WIN32||_WIN64\n    extern __declspec(dllimport)\n#endif\n    void *scalable_malloc(size_t);\n\n#if _WIN32||_WIN64\n    extern __declspec(dllimport)\n#endif\n    int anchor();\n}\n\nstruct Run {\n    void operator()( std::size_t /*id*/ ) const {\n\n        void* (*malloc_ptr)(std::size_t);\n        void (*free_ptr)(void*);\n\n        void* (*aligned_malloc_ptr)(size_t size, size_t alignment);\n        void  (*aligned_free_ptr)(void*);\n\n        const char* actual_name;\n        utils::LIBRARY_HANDLE lib = utils::OpenLibrary(actual_name = MALLOCLIB_NAME1);\n        if (!lib) lib = utils::OpenLibrary(actual_name = MALLOCLIB_NAME2);\n        if (!lib) {\n            REPORT(\"Can't load \" MALLOCLIB_NAME1 \" or \" MALLOCLIB_NAME2 \"\\n\");\n            exit(1);\n        }\n        utils::GetAddress(lib, \"scalable_malloc\", malloc_ptr);\n        utils::GetAddress(lib, \"scalable_free\", free_ptr);\n        utils::GetAddress(lib, \"scalable_aligned_malloc\", aligned_malloc_ptr);\n        utils::GetAddress(lib, \"scalable_aligned_free\", aligned_free_ptr);\n\n        for (size_t sz = 1024; sz <= 10*1024 ; sz*=10) {\n            void *p1 = aligned_malloc_ptr(sz, 16);\n            std::memset(p1, 0, sz);\n            aligned_free_ptr(p1);\n        }\n\n        void *p = malloc_ptr(100);\n        std::memset(p, 1, 100);\n        free_ptr(p);\n\n        utils::CloseLibrary(lib);\n#if _WIN32 || _WIN64\n        ASSERT(GetModuleHandle(actual_name),\n               \"allocator library must not be unloaded\");\n#else\n        ASSERT(dlsym(RTLD_DEFAULT, \"scalable_malloc\"),\n               \"allocator library must not be unloaded\");\n#endif\n    }\n};\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"test unload lib\") {\n    CHECK(anchor() == 42);\n\n    // warm-up run\n    utils::NativeParallelFor( 1, Run() );\n\n    // It seems Thread Sanitizer remembers some history information about destroyed threads,\n    // so memory consumption cannot be stabilized\n    std::ptrdiff_t memory_leak = 0;\n    {\n        /* 1st call to GetMemoryUsage() allocate some memory,\n           but it seems memory consumption stabilized after this.\n        */\n        utils::GetMemoryUsage();\n        std::size_t memory_in_use = utils::GetMemoryUsage();\n        std::size_t memory_check = utils::GetMemoryUsage();\n        REQUIRE_MESSAGE(memory_in_use == memory_check,\n            \"Memory consumption should not increase after 1st GetMemoryUsage() call\");\n    }\n\n    {\n        // expect that memory consumption stabilized after several runs\n        for (;;) {\n            std::size_t memory_in_use = utils::GetMemoryUsage();\n            for (int j=0; j<10; j++)\n                utils::NativeParallelFor( 1, Run() );\n            memory_leak = utils::GetMemoryUsage() - memory_in_use;\n            if (memory_leak == 0)\n                return;\n        }\n    }\n}\n\n#endif /* Unsupported configurations */\n\n#endif // _USRDLL\n"
  },
  {
    "path": "third-party/tbb/test/tbbmalloc/test_malloc_new_handler.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_malloc_new_handler.cpp\n//! \\brief Test for [memory_allocation] functionality\n\n#define __TBB_NO_IMPLICIT_LINKAGE 1\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n\n#include \"common/allocator_overload.h\"\n\n// Under ASAN current approach is not viable as it breaks the ASAN itself as well\n#if !HARNESS_SKIP_TEST && TBB_USE_EXCEPTIONS && !__TBB_USE_ADDRESS_SANITIZER\n\n#if _MSC_VER\n#pragma warning (push)\n// Forcing value to bool 'true' or 'false' (occurred inside tls.h)\n#pragma warning (disable: 4800)\n#endif //#if _MSC_VER\n\nthread_local bool new_handler_called = false;\nvoid customNewHandler() {\n    new_handler_called = true;\n    throw std::bad_alloc();\n}\n\n// Return true if operator new threw exception\nbool allocateWithException(size_t big_mem) {\n    bool exception_caught = false;\n    try {\n        // Allocate big array (should throw exception)\n        char* volatile big_array = new char[big_mem];\n        // If succeeded, double the size (unless it overflows) and recursively retry\n        if (big_mem * 2 > big_mem) {\n            exception_caught = allocateWithException(big_mem * 2);\n        }\n        delete[] big_array;\n    } catch (const std::bad_alloc&) {\n        bool is_called = new_handler_called;\n        REQUIRE_MESSAGE(is_called, \"User provided new_handler was not called.\");\n        exception_caught = true;\n    }\n    return exception_caught;\n}\n\nclass AllocLoopBody : utils::NoAssign {\npublic:\n    void operator()(int) const {\n        size_t BIG_MEM = 100 * 1024 * 1024;\n        new_handler_called = false;\n        REQUIRE_MESSAGE(allocateWithException(BIG_MEM), \"Operator new did not throw bad_alloc.\");\n    }\n};\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"New handler callback\") {\n#if __TBB_CPP11_GET_NEW_HANDLER_PRESENT\n    std::new_handler default_handler = std::get_new_handler();\n    REQUIRE_MESSAGE(default_handler == nullptr, \"No handler should be set at this point.\");\n#endif\n    // Define the handler for new operations\n    std::set_new_handler(customNewHandler);\n    // Run the test\n    utils::NativeParallelFor(8, AllocLoopBody());\n    // Undo custom handler\n    std::set_new_handler(nullptr);\n}\n\n#if _MSC_VER\n#pragma warning (pop)\n#endif\n\n#endif // !HARNESS_SKIP_TEST && TBB_USE_EXCEPTIONS\n"
  },
  {
    "path": "third-party/tbb/test/tbbmalloc/test_malloc_overload.cpp",
    "content": "/*\n    Copyright (c) 2005-2023 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_malloc_overload.cpp\n//! \\brief Test for [memory_allocation] functionality\n\n#define __TBB_NO_IMPLICIT_LINKAGE 1\n\n#if (_WIN32 || _WIN64)\n#define _CRT_SECURE_NO_WARNINGS\n// As the test is intentionally build with /EHs-, suppress multiple VS2005's\n// warnings like C4530: C++ exception handler used, but unwind semantics are not enabled\n#if defined(_MSC_VER) && !__INTEL_COMPILER\n/* ICC 10.1 and 11.0 generates code that uses std::_Raise_handler,\n   but it's only defined in libcpmt(d), which the test doesn't linked with.\n */\n#undef  _HAS_EXCEPTIONS\n#define _HAS_EXCEPTIONS _CPPUNWIND\n#endif\n// to use strdup w/o warnings\n#define _CRT_NONSTDC_NO_DEPRECATE 1\n#endif // _WIN32 || _WIN64\n\n#define _ISOC11_SOURCE 1 // to get C11 declarations for GLIBC\n\n#include \"common/allocator_overload.h\"\n\n#if MALLOC_WINDOWS_OVERLOAD_ENABLED\n#include \"tbb/tbbmalloc_proxy.h\"\n#endif\n\n#include \"common/test.h\"\n\n//ASAN overloads memory allocation functions, so no point to run this test under it.\n#if !HARNESS_SKIP_TEST && !__TBB_USE_ADDRESS_SANITIZER\n\n#if __ANDROID__\n  #include <android/api-level.h> // for __ANDROID_API__\n#endif\n\n#define __TBB_POSIX_MEMALIGN_PRESENT (__unix__ && !__ANDROID__) || __APPLE__\n#define __TBB_PVALLOC_PRESENT __unix__ && !__ANDROID__\n#if __GLIBC__\n  // aligned_alloc available since GLIBC 2.16\n  #define __TBB_ALIGNED_ALLOC_PRESENT __GLIBC_PREREQ(2, 16)\n#endif // __GLIBC__\n // later Android doesn't have valloc or dlmalloc_usable_size\n#define __TBB_VALLOC_PRESENT (__unix__ && __ANDROID_API__<21) || __APPLE__\n#define __TBB_DLMALLOC_USABLE_SIZE_PRESENT  __ANDROID__ && __ANDROID_API__<21\n\n#include \"common/utils.h\"\n#include \"common/utils_report.h\"\n#include \"common/utils_assert.h\"\n#include \"common/utils_env.h\"\n\n#include <stdlib.h>\n#include <string.h>\n#if !__APPLE__\n#include <malloc.h>\n#endif\n#include <stdio.h>\n#include <new>\n#if MALLOC_UNIXLIKE_OVERLOAD_ENABLED || MALLOC_ZONE_OVERLOAD_ENABLED\n#include <unistd.h> // for sysconf\n#include <dlfcn.h>\n#endif\n\n#if __unix__\n#include <stdint.h> // for uintptr_t\n\nextern \"C\" {\nvoid *__libc_malloc(size_t size);\nvoid *__libc_realloc(void *ptr, size_t size);\nvoid *__libc_calloc(size_t num, size_t size);\nvoid __libc_free(void *ptr);\nvoid *__libc_memalign(size_t alignment, size_t size);\nvoid *__libc_pvalloc(size_t size);\nvoid *__libc_valloc(size_t size);\n#if __TBB_DLMALLOC_USABLE_SIZE_PRESENT\n#define malloc_usable_size(p) dlmalloc_usable_size(p)\nsize_t dlmalloc_usable_size(const void *ptr);\n#endif\n}\n\n#elif __APPLE__\n\n#include <malloc/malloc.h>\n#define malloc_usable_size(p) malloc_size(p)\n\n#elif _WIN32\n#include <stddef.h>\n#if __MINGW32__\n#include <unistd.h>\n#else\ntypedef unsigned __int16 uint16_t;\ntypedef unsigned __int32 uint32_t;\ntypedef unsigned __int64 uint64_t;\n#endif\n\n#endif /* OS selection */\n\n#if _WIN32\n// On Windows, the trick with string \"dependency on msvcpXX.dll\" is necessary to create\n// dependency on msvcpXX.dll, for sake of a regression test.\n// On Linux, C++ RTL headers are undesirable because of breaking strict ANSI mode.\n#if defined(_MSC_VER) && _MSC_VER >= 1300 && _MSC_VER <= 1310 && !defined(__INTEL_COMPILER)\n/* Fixing compilation error reported by VS2003 for exception class\n   when _HAS_EXCEPTIONS is 0:\n   bad_cast that inherited from exception is not in std namespace.\n*/\nusing namespace std;\n#endif\n#include <string>\n#include <set>\n#include <sstream>\n#endif\n\n#include \"oneapi/tbb/detail/_utils.h\"  // tbb::detail::is_aligned\n#include \"src/tbbmalloc/shared_utils.h\"  // alignDown, alignUp, estimatedCacheLineSize\n\n/* start of code replicated from src/tbbmalloc */\n\nclass BackRefIdx { // composite index to backreference array\nprivate:\n    uint16_t main;      // index in BackRefMain\n    uint16_t largeObj:1;  // is this object \"large\"?\n    uint16_t offset  :15; // offset from beginning of BackRefBlock\npublic:\n    BackRefIdx() : main((uint16_t)-1) {}\n    bool isInvalid() { return main == (uint16_t)-1; }\n    bool isLargeObject() const { return largeObj; }\n    uint16_t getMain() const { return main; }\n    uint16_t getOffset() const { return offset; }\n\n    // only newBackRef can modify BackRefIdx\n    static BackRefIdx newBackRef(bool largeObj);\n};\n\nclass MemoryPool;\nclass ExtMemoryPool;\n\nstruct BlockI {\n    intptr_t     blockState[2];\n};\n\nstruct LargeMemoryBlock : public BlockI {\n    MemoryPool       *pool;          // owner pool\n    LargeMemoryBlock *next,          // ptrs in list of cached blocks\n                     *prev,\n                     *gPrev,         // in pool's global list\n                     *gNext;\n    uintptr_t         age;           // age of block while in cache\n    size_t            objectSize;    // the size requested by a client\n    size_t            unalignedSize; // the size requested from getMemory\n    bool              fromMapMemory;\n    BackRefIdx        backRefIdx;    // cached here, used copy is in LargeObjectHdr\n    void registerInPool(ExtMemoryPool *extMemPool);\n    void unregisterFromPool(ExtMemoryPool *extMemPool);\n};\n\nstruct LargeObjectHdr {\n    LargeMemoryBlock *memoryBlock;\n    /* Have to duplicate it here from CachedObjectHdr,\n       as backreference must be checked without further pointer dereference.\n       Points to LargeObjectHdr. */\n    BackRefIdx       backRefIdx;\n};\n\n/*\n * Objects of size minLargeObjectSize and larger are considered large objects.\n */\nconst uintptr_t blockSize = 16*1024;\nconst uint32_t fittingAlignment = rml::internal::estimatedCacheLineSize;\n#define SET_FITTING_SIZE(N) ( (blockSize-2*rml::internal::estimatedCacheLineSize)/N ) & ~(fittingAlignment-1)\nconst uint32_t fittingSize5 = SET_FITTING_SIZE(2); // 8128/8064\n#undef SET_FITTING_SIZE\nconst uint32_t minLargeObjectSize = fittingSize5 + 1;\n\n/* end of code replicated from src/tbbmalloc */\n\nstatic void scalableMallocCheckSize(void *object, size_t size)\n{\n#if __clang__\n    // This prevents Clang from throwing out the calls to new & delete in CheckNewDeleteOverload().\n    static void *v = object;\n    utils::suppress_unused_warning(v);\n#endif\n    REQUIRE(object);\n    if (size >= minLargeObjectSize) {\n        LargeMemoryBlock *lmb = ((LargeObjectHdr*)object-1)->memoryBlock;\n        REQUIRE((uintptr_t(lmb)<uintptr_t(((LargeObjectHdr*)object-1)) && lmb->objectSize >= size));\n    }\n#if MALLOC_UNIXLIKE_OVERLOAD_ENABLED || MALLOC_ZONE_OVERLOAD_ENABLED\n    REQUIRE(malloc_usable_size(object) >= size);\n#elif MALLOC_WINDOWS_OVERLOAD_ENABLED\n    // Check that _msize works correctly\n    REQUIRE(_msize(object) >= size);\n    REQUIRE((size < 8 || _aligned_msize(object,8,0) >= size));\n#endif\n}\n\nvoid CheckStdFuncOverload(void *(*malloc_p)(size_t), void *(*calloc_p)(size_t, size_t),\n                          void *(*realloc_p)(void *, size_t), void (*free_p)(void *))\n{\n    void *ptr = malloc_p(minLargeObjectSize);\n    scalableMallocCheckSize(ptr, minLargeObjectSize);\n    free(ptr);\n\n    ptr = calloc_p(minLargeObjectSize, 2);\n    scalableMallocCheckSize(ptr, 2*minLargeObjectSize);\n    void *ptr1 = realloc_p(ptr, 10*minLargeObjectSize);\n    scalableMallocCheckSize(ptr1, 10*minLargeObjectSize);\n    free_p(ptr1);\n}\n\n#if MALLOC_UNIXLIKE_OVERLOAD_ENABLED || MALLOC_ZONE_OVERLOAD_ENABLED\n\nvoid CheckMemalignFuncOverload(void *(*memalign_p)(size_t, size_t),\n                               void (*free_p)(void*))\n{\n    void *ptr = memalign_p(128, 4*minLargeObjectSize);\n    scalableMallocCheckSize(ptr, 4*minLargeObjectSize);\n    REQUIRE(tbb::detail::is_aligned(ptr, 128));\n    free_p(ptr);\n}\n\nvoid CheckVallocFuncOverload(void *(*valloc_p)(size_t), void (*free_p)(void*))\n{\n    void *ptr = valloc_p(minLargeObjectSize);\n    scalableMallocCheckSize(ptr, minLargeObjectSize);\n    REQUIRE(tbb::detail::is_aligned(ptr, sysconf(_SC_PAGESIZE)));\n    free_p(ptr);\n}\n\nvoid CheckPvalloc(void *(*pvalloc_p)(size_t), void (*free_p)(void*))\n{\n    const long memoryPageSize = sysconf(_SC_PAGESIZE);\n    // request large object with not power-of-2 size\n    const size_t largeSz = alignUp(minLargeObjectSize, 16*1024) + 1;\n\n    for (size_t sz = 0; sz<=largeSz; sz+=largeSz) {\n        void *ptr = pvalloc_p(sz);\n        scalableMallocCheckSize(ptr, sz? alignUp(sz, memoryPageSize) : memoryPageSize);\n        REQUIRE(tbb::detail::is_aligned(ptr, memoryPageSize));\n        free_p(ptr);\n    }\n}\n\n#endif // MALLOC_UNIXLIKE_OVERLOAD_ENABLED || MALLOC_ZONE_OVERLOAD_ENABLED\n\n// regression test: on macOS scalable_free() treated small aligned object,\n// placed in large block, as small block\nvoid CheckFreeAligned() {\n    size_t sz[] = {8, 4*1024, 16*1024, 0};\n    size_t align[] = {8, 4*1024, 16*1024, 0};\n\n    for (int s=0; sz[s]; s++)\n        for (int a=0; align[a]; a++) {\n            void *ptr = nullptr;\n#if __TBB_POSIX_MEMALIGN_PRESENT\n            int ret = posix_memalign(&ptr, align[a], sz[s]);\n            REQUIRE(!ret);\n#elif MALLOC_WINDOWS_OVERLOAD_ENABLED\n            ptr = _aligned_malloc(sz[s], align[a]);\n#endif\n            REQUIRE(tbb::detail::is_aligned(ptr, align[a]));\n            free(ptr);\n        }\n}\n\n#if __ANDROID__\n// Workaround for an issue with strdup somehow bypassing our malloc replacement on Android.\nchar *strdup(const char *str) {\n    REPORT( \"Known issue: malloc replacement does not work for strdup on Android.\\n\" );\n    size_t len = strlen(str)+1;\n    void *new_str = malloc(len);\n    return new_str ? reinterpret_cast<char *>(memcpy(new_str, str, len)) : 0;\n}\n#endif\n\n#if __APPLE__\n#include <mach/mach.h>\n\n// regression test: malloc_usable_size() that was passed to zone interface\n// called system malloc_usable_size(), so for object that was not allocated\n// by tbbmalloc non-zero was returned, so such objects were passed to\n// tbbmalloc's free(), that is incorrect\nvoid TestZoneOverload() {\n    vm_address_t *zones;\n    unsigned zones_num;\n\n    kern_return_t ret = malloc_get_all_zones(mach_task_self(), nullptr, &zones, &zones_num);\n    REQUIRE((!ret && zones_num>1));\n    malloc_zone_t *sys_zone = (malloc_zone_t*)zones[1];\n    REQUIRE_MESSAGE(strcmp(\"tbbmalloc\", malloc_get_zone_name(sys_zone)), \"zone 1 expected to be not tbbmalloc\");\n    void *p = malloc_zone_malloc(sys_zone, 16);\n    free(p);\n}\n#else\n#define TestZoneOverload()\n#endif\n\n#if _WIN32\n// regression test: certain MSVC runtime functions use \"public\" allocation functions\n// but internal free routines, causing crashes if tbbmalloc_proxy does not intercept the latter.\nvoid TestRuntimeRoutines() {\n    system(\"rem should be a safe command to call\");\n}\n#else\n#define TestRuntimeRoutines()\n#endif\n\nstruct BigStruct {\n    char f[minLargeObjectSize];\n};\n\nvoid CheckNewDeleteOverload() {\n    BigStruct *s1, *s2, *s3, *s4, *s5, *s6;\n\n    s1 = new BigStruct;\n    scalableMallocCheckSize(s1, sizeof(BigStruct));\n    delete s1;\n\n    s2 = new BigStruct[10];\n    scalableMallocCheckSize(s2, 10*sizeof(BigStruct));\n    delete []s2;\n\n    s3 = new(std::nothrow) BigStruct;\n    scalableMallocCheckSize(s3, sizeof(BigStruct));\n    delete s3;\n\n    s4 = new(std::nothrow) BigStruct[2];\n    scalableMallocCheckSize(s4, 2*sizeof(BigStruct));\n    delete []s4;\n\n    s5 = new BigStruct;\n    scalableMallocCheckSize(s5, sizeof(BigStruct));\n    operator delete(s5, std::nothrow);\n\n    s6 = new BigStruct[5];\n    scalableMallocCheckSize(s6, 5*sizeof(BigStruct));\n    operator delete[](s6, std::nothrow);\n\n}\n\n#if MALLOC_WINDOWS_OVERLOAD_ENABLED\nvoid FuncReplacementInfoCheck() {\n    char **func_replacement_log;\n    int func_replacement_status = TBB_malloc_replacement_log(&func_replacement_log);\n\n    std::set<std::string> functions;\n    functions.insert(\"free\");\n    functions.insert(\"_msize\");\n    functions.insert(\"_aligned_free\");\n    functions.insert(\"_aligned_msize\");\n\n    int status_check = 0;\n    for (char** log_string = func_replacement_log; *log_string != 0; log_string++) {\n        std::stringstream s(*log_string);\n        std::string status, function_name;\n        s >> status >> function_name;\n\n        if (status.find(\"Fail:\") != status.npos) {\n            status_check = -1;\n        }\n\n        functions.erase(function_name);\n    }\n\n    REQUIRE_MESSAGE(functions.empty(), \"Changed opcodes log must contain all required functions with \\\"Success\\\" changed status\");\n    REQUIRE_MESSAGE(func_replacement_status == status_check, \"replacement_opcodes_log() function return wrong status\");\n\n    func_replacement_status = TBB_malloc_replacement_log(nullptr);\n    REQUIRE_MESSAGE(func_replacement_status == status_check, \"replacement_opcodes_log() function return wrong status\");\n\n    // TODO: was ASSERT_WARNING\n    if (func_replacement_status != 0) {\n        REPORT(\"Some standard allocation functions was not replaced to tbb_malloc functions.\\n\");\n    }\n}\n#endif // MALLOC_WINDOWS_OVERLOAD_ENABLED\n\n//! Testing tbbmalloc_proxy overload capabilities\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Main set of tests\") {\n#if __unix__\n    REQUIRE(mallopt(0, 0)); // add dummy mallopt call for coverage\n#endif // __unix__\n\n    void *ptr = nullptr;\n    utils::suppress_unused_warning(ptr); // for android\n\n#if MALLOC_UNIXLIKE_OVERLOAD_ENABLED || MALLOC_ZONE_OVERLOAD_ENABLED\n    REQUIRE_MESSAGE(dlsym(RTLD_DEFAULT, \"scalable_malloc\"), \"Lost dependency on malloc_proxy or LD_PRELOAD was not set?\");\n#endif\n\n/* On Windows, memory block size returned by _msize() is sometimes used\n   to calculate the size for an extended block. Substituting _msize,\n   scalable_msize initially returned 0 for regions not allocated by the scalable\n   allocator, which led to incorrect memory reallocation and subsequent crashes.\n   It was found that adding a new environment variable triggers the error.\n*/\n    REQUIRE_MESSAGE(getenv(\"PATH\"), \"We assume that PATH is set everywhere.\");\n    char *pathCopy = strdup(getenv(\"PATH\"));\n#if __ANDROID__\n    REQUIRE_MESSAGE(strcmp(pathCopy,getenv(\"PATH\")) == 0, \"strdup workaround does not work as expected.\");\n#endif\n    const char *newEnvName = \"__TBBMALLOC_OVERLOAD_REGRESSION_TEST_FOR_REALLOC_AND_MSIZE\";\n    REQUIRE_MESSAGE(!getenv(newEnvName), \"Environment variable should not be used before.\");\n    int r = utils::SetEnv(newEnvName,\"1\");\n    REQUIRE(!r);\n    char *path = getenv(\"PATH\");\n    REQUIRE_MESSAGE((path && 0==strcmp(path, pathCopy)), \"Environment was changed erroneously.\");\n    free(pathCopy);\n\n    CheckStdFuncOverload(malloc, calloc, realloc, free);\n#if MALLOC_UNIXLIKE_OVERLOAD_ENABLED || MALLOC_ZONE_OVERLOAD_ENABLED\n\n#if __TBB_POSIX_MEMALIGN_PRESENT\n    int ret = posix_memalign(&ptr, 1024, 3*minLargeObjectSize);\n    REQUIRE(0 == ret);\n    scalableMallocCheckSize(ptr, 3*minLargeObjectSize);\n    REQUIRE(tbb::detail::is_aligned(ptr, 1024));\n    free(ptr);\n#endif\n\n#if __TBB_VALLOC_PRESENT\n    CheckVallocFuncOverload(valloc, free);\n#endif\n#if __TBB_PVALLOC_PRESENT\n    CheckPvalloc(pvalloc, free);\n#endif\n#if __unix__\n    CheckMemalignFuncOverload(memalign, free);\n#if __TBB_ALIGNED_ALLOC_PRESENT\n    CheckMemalignFuncOverload(aligned_alloc, free);\n#endif\n\n#if __INTEL_COMPILER\n   #pragma warning(push)\n   #pragma warning(disable: 1478)\n#elif __GNUC__\n   #pragma GCC diagnostic push\n   #pragma GCC diagnostic ignored \"-Wdeprecated-declarations\"\n#endif\n    struct mallinfo info = mallinfo();\n#if __INTEL_COMPILER\n    #pragma warning(pop)\n#elif __GNUC__\n    #pragma GCC diagnostic pop\n#endif\n    // right now mallinfo initialized by zero\n    REQUIRE((!info.arena && !info.ordblks && !info.smblks && !info.hblks\n           && !info.hblkhd && !info.usmblks && !info.fsmblks\n           && !info.uordblks && !info.fordblks && !info.keepcost));\n\n #if !__ANDROID__\n    // These non-standard functions are exported by GLIBC, and might be used\n    // in conjunction with standard malloc/free. Test that we overload them as well.\n    // Bionic doesn't have them.\n    CheckStdFuncOverload(__libc_malloc, __libc_calloc, __libc_realloc, __libc_free);\n    CheckMemalignFuncOverload(__libc_memalign, __libc_free);\n    CheckVallocFuncOverload(__libc_valloc, __libc_free);\n    CheckPvalloc(__libc_pvalloc, __libc_free);\n #endif\n#endif // __unix__\n\n#else // MALLOC_WINDOWS_OVERLOAD_ENABLED\n\n    ptr = _aligned_malloc(minLargeObjectSize, 16);\n    scalableMallocCheckSize(ptr, minLargeObjectSize);\n    REQUIRE(tbb::detail::is_aligned(ptr, 16));\n\n    // Testing of workaround for vs \"is power of 2 pow N\" bug that accepts zeros\n    void* ptr1 = _aligned_malloc(minLargeObjectSize, 0);\n    scalableMallocCheckSize(ptr, minLargeObjectSize);\n    REQUIRE(tbb::detail::is_aligned(ptr, sizeof(void*)));\n    _aligned_free(ptr1);\n\n    ptr1 = _aligned_realloc(ptr, minLargeObjectSize*10, 16);\n    scalableMallocCheckSize(ptr1, minLargeObjectSize*10);\n    REQUIRE(tbb::detail::is_aligned(ptr, 16));\n    _aligned_free(ptr1);\n\n    FuncReplacementInfoCheck();\n\n#endif\n    CheckFreeAligned();\n\n    CheckNewDeleteOverload();\n\n#if _WIN32\n    std::string stdstring = \"dependency on msvcpXX.dll\";\n    REQUIRE(strcmp(stdstring.c_str(), \"dependency on msvcpXX.dll\") == 0);\n#endif\n    TestZoneOverload();\n    TestRuntimeRoutines();\n}\n\n//! Test address range tracker in backend that could be\n//! broken during remap because of incorrect order of\n//! deallocation event and the mremap system call\n//! \\brief \\ref regression\nTEST_CASE(\"Address range tracker regression test\") {\n    int numThreads = 16;\n    utils::NativeParallelFor(numThreads, [](int) {\n        void *ptr = nullptr;\n        for (int i = 0; i < 1000; ++i) {\n            for (int j = 0; j < 100; ++j) {\n                ptr = realloc(ptr, 1024*1024 + 4096*j);\n            }\n        }\n        free(ptr);\n    });\n}\n#endif // !HARNESS_SKIP_TEST\n"
  },
  {
    "path": "third-party/tbb/test/tbbmalloc/test_malloc_overload_disable.cpp",
    "content": "/*\n    Copyright (c) 2018-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#define __TBB_NO_IMPLICIT_LINKAGE 1\n\n#if _WIN32 || _WIN64\n#define _CRT_SECURE_NO_WARNINGS\n#endif\n\n#include \"common/test.h\"\n\n#include \"common/allocator_overload.h\"\n#include \"common/utils_report.h\"\n#include \"common/utils_env.h\"\n\n// Disabling malloc proxy via env variable is available only on Windows for now\n#if MALLOC_WINDOWS_OVERLOAD_ENABLED\n\n#define TEST_SYSTEM_COMMAND \"test_malloc_overload_disable.exe\"\n\n#include \"tbb/tbbmalloc_proxy.h\"\n\n#include \"src/tbb/environment.h\"\n\nconst size_t SmallObjectSize = 16;\nconst size_t LargeObjectSize = 2*8*1024;\nconst size_t HugeObjectSize = 2*1024*1024;\n\nvoid CheckWindowsProxyDisablingViaMemSize( size_t ObjectSize ) {\n    void* ptr = malloc(ObjectSize);\n    /*\n     * If msize returns 0 - tbbmalloc doesn't contain this object in it`s memory\n     * Also msize check that proxy lib is linked\n     */\n    REQUIRE_MESSAGE(!__TBB_malloc_safer_msize(ptr,nullptr), \"Malloc replacement is not deactivated\");\n    free(ptr);\n}\n\nTEST_CASE(\"Disabling malloc overload\") {\n    if (!tbb::detail::r1::GetBoolEnvironmentVariable(\"TBB_MALLOC_DISABLE_REPLACEMENT\"))\n    {\n        utils::SetEnv(\"TBB_MALLOC_DISABLE_REPLACEMENT\",\"1\");\n        if ((system(TEST_SYSTEM_COMMAND)) != 0) {\n            REPORT(\"Test error: unable to run the command: %s\", TEST_SYSTEM_COMMAND);\n            exit(-1);\n        }\n        // We must execute exit(0) to avoid duplicate \"Done\" printing.\n        exit(0);\n    }\n    else\n    {\n        // Check SMALL objects replacement disable\n        CheckWindowsProxyDisablingViaMemSize(SmallObjectSize);\n        // Check LARGE objects replacement disable\n        CheckWindowsProxyDisablingViaMemSize(LargeObjectSize);\n        // Check HUGE objects replacement disable\n        CheckWindowsProxyDisablingViaMemSize(HugeObjectSize);\n    }\n}\n#endif // MALLOC_WINDOWS_OVERLOAD_ENABLED\n"
  },
  {
    "path": "third-party/tbb/test/tbbmalloc/test_malloc_pools.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_malloc_pools.cpp\n//! \\brief Test for [memory_allocation] functionality\n\n#define __TBB_NO_IMPLICIT_LINKAGE 1\n\n#include \"common/test.h\"\n\n#define HARNESS_TBBMALLOC_THREAD_SHUTDOWN 1\n\n#include \"common/utils.h\"\n#include \"common/utils_assert.h\"\n#include \"common/spin_barrier.h\"\n#include \"common/tls_limit.h\"\n\n#include \"tbb/scalable_allocator.h\"\n\n#include <atomic>\n\ntemplate<typename T>\nstatic inline T alignUp  (T arg, uintptr_t alignment) {\n    return T(((uintptr_t)arg+(alignment-1)) & ~(alignment-1));\n}\n\nstruct PoolSpace: utils::NoCopy {\n    size_t pos;\n    int    regions;\n    size_t bufSize;\n    char  *space;\n\n    static const size_t BUF_SIZE = 8*1024*1024;\n\n    PoolSpace(size_t bufSz = BUF_SIZE) :\n        pos(0), regions(0),\n        bufSize(bufSz), space(new char[bufSize]) {\n        memset(space, 0, bufSize);\n    }\n    ~PoolSpace() {\n        delete []space;\n    }\n};\n\nstatic PoolSpace *poolSpace;\n\nstruct MallocPoolHeader {\n    void  *rawPtr;\n    size_t userSize;\n};\n\nstatic std::atomic<int> liveRegions;\n\nstatic void *getMallocMem(intptr_t /*pool_id*/, size_t &bytes)\n{\n    void *rawPtr = malloc(bytes+sizeof(MallocPoolHeader)+1);\n    if (!rawPtr)\n        return nullptr;\n    // +1 to check working with unaligned space\n    void *ret = (void *)((uintptr_t)rawPtr+sizeof(MallocPoolHeader)+1);\n\n    MallocPoolHeader *hdr = (MallocPoolHeader*)ret-1;\n    hdr->rawPtr = rawPtr;\n    hdr->userSize = bytes;\n\n    liveRegions++;\n\n    return ret;\n}\n\nstatic int putMallocMem(intptr_t /*pool_id*/, void *ptr, size_t bytes)\n{\n    MallocPoolHeader *hdr = (MallocPoolHeader*)ptr-1;\n    ASSERT(bytes == hdr->userSize, \"Invalid size in pool callback.\");\n    free(hdr->rawPtr);\n\n    liveRegions--;\n\n    return 0;\n}\n\nvoid TestPoolReset()\n{\n    rml::MemPoolPolicy pol(getMallocMem, putMallocMem);\n    rml::MemoryPool *pool;\n\n    pool_create_v1(0, &pol, &pool);\n    for (int i=0; i<100; i++) {\n        REQUIRE(pool_malloc(pool, 8));\n        REQUIRE(pool_malloc(pool, 50*1024));\n    }\n    int regionsBeforeReset = liveRegions.load(std::memory_order_acquire);\n    bool ok = pool_reset(pool);\n    REQUIRE(ok);\n    for (int i=0; i<100; i++) {\n        REQUIRE(pool_malloc(pool, 8));\n        REQUIRE(pool_malloc(pool, 50*1024));\n    }\n    REQUIRE_MESSAGE(regionsBeforeReset == liveRegions.load(std::memory_order_relaxed),\n           \"Expected no new regions allocation.\");\n    ok = pool_destroy(pool);\n    REQUIRE(ok);\n    REQUIRE_MESSAGE(!liveRegions.load(std::memory_order_relaxed), \"Expected all regions were released.\");\n}\n\nclass SharedPoolRun: utils::NoAssign {\n    static long                 threadNum;\n    static utils::SpinBarrier startB,\n                                mallocDone;\n    static rml::MemoryPool     *pool;\n    static void               **crossThread,\n                              **afterTerm;\npublic:\n    static const int OBJ_CNT = 100;\n\n    static void init(int num, rml::MemoryPool *pl, void **crThread, void **aTerm) {\n        threadNum = num;\n        pool = pl;\n        crossThread = crThread;\n        afterTerm = aTerm;\n        startB.initialize(threadNum);\n        mallocDone.initialize(threadNum);\n    }\n\n    void operator()( int id ) const {\n        const int ITERS = 1000;\n        void *local[ITERS];\n\n        startB.wait();\n        for (int i=id*OBJ_CNT; i<(id+1)*OBJ_CNT; i++) {\n            afterTerm[i] = pool_malloc(pool, i%2? 8*1024 : 9*1024);\n            memset(afterTerm[i], i, i%2? 8*1024 : 9*1024);\n            crossThread[i] = pool_malloc(pool, i%2? 9*1024 : 8*1024);\n            memset(crossThread[i], i, i%2? 9*1024 : 8*1024);\n        }\n\n        for (int i=1; i<ITERS; i+=2) {\n            local[i-1] = pool_malloc(pool, 6*1024);\n            memset(local[i-1], i, 6*1024);\n            local[i] = pool_malloc(pool, 16*1024);\n            memset(local[i], i, 16*1024);\n        }\n        mallocDone.wait();\n        int myVictim = threadNum-id-1;\n        for (int i=myVictim*OBJ_CNT; i<(myVictim+1)*OBJ_CNT; i++)\n            pool_free(pool, crossThread[i]);\n        for (int i=0; i<ITERS; i++)\n            pool_free(pool, local[i]);\n    }\n};\n\nlong                 SharedPoolRun::threadNum;\nutils::SpinBarrier SharedPoolRun::startB,\n                     SharedPoolRun::mallocDone;\nrml::MemoryPool     *SharedPoolRun::pool;\nvoid               **SharedPoolRun::crossThread,\n                   **SharedPoolRun::afterTerm;\n\n// single pool shared by different threads\nvoid TestSharedPool()\n{\n    rml::MemPoolPolicy pol(getMallocMem, putMallocMem);\n    rml::MemoryPool *pool;\n\n    pool_create_v1(0, &pol, &pool);\n    void **crossThread = new void*[utils::MaxThread * SharedPoolRun::OBJ_CNT];\n    void **afterTerm = new void*[utils::MaxThread * SharedPoolRun::OBJ_CNT];\n\n    for (int p=utils::MinThread; p<=utils::MaxThread; p++) {\n        SharedPoolRun::init(p, pool, crossThread, afterTerm);\n        SharedPoolRun thr;\n\n        void *hugeObj = pool_malloc(pool, 10*1024*1024);\n        REQUIRE(hugeObj);\n\n        utils::NativeParallelFor( p, thr );\n\n        pool_free(pool, hugeObj);\n        for (int i=0; i<p*SharedPoolRun::OBJ_CNT; i++)\n            pool_free(pool, afterTerm[i]);\n    }\n    delete []afterTerm;\n    delete []crossThread;\n\n    bool ok = pool_destroy(pool);\n    REQUIRE(ok);\n    REQUIRE_MESSAGE(!liveRegions.load(std::memory_order_relaxed), \"Expected all regions were released.\");\n}\n\nvoid *CrossThreadGetMem(intptr_t pool_id, size_t &bytes)\n{\n    if (poolSpace[pool_id].pos + bytes > poolSpace[pool_id].bufSize)\n        return nullptr;\n\n    void *ret = poolSpace[pool_id].space + poolSpace[pool_id].pos;\n    poolSpace[pool_id].pos += bytes;\n    poolSpace[pool_id].regions++;\n\n    return ret;\n}\n\nint CrossThreadPutMem(intptr_t pool_id, void* /*raw_ptr*/, size_t /*raw_bytes*/)\n{\n    poolSpace[pool_id].regions--;\n    return 0;\n}\n\nclass CrossThreadRun: utils::NoAssign {\n    static long number_of_threads;\n    static utils::SpinBarrier barrier;\n    static rml::MemoryPool **pool;\n    static char **obj;\npublic:\n    static void initBarrier(unsigned thrds) { barrier.initialize(thrds); }\n    static void init(long num) {\n        number_of_threads = num;\n        pool = new rml::MemoryPool*[number_of_threads];\n        poolSpace = new PoolSpace[number_of_threads];\n        obj = new char*[number_of_threads];\n    }\n    static void destroy() {\n        for (long i=0; i<number_of_threads; i++)\n            REQUIRE_MESSAGE(!poolSpace[i].regions, \"Memory leak detected\");\n        delete []pool;\n        delete []poolSpace;\n        delete []obj;\n    }\n    CrossThreadRun() {}\n    void operator()( int id ) const {\n        rml::MemPoolPolicy pol(CrossThreadGetMem, CrossThreadPutMem);\n        const int objLen = 10*id;\n\n        pool_create_v1(id, &pol, &pool[id]);\n        obj[id] = (char*)pool_malloc(pool[id], objLen);\n        REQUIRE(obj[id]);\n        memset(obj[id], id, objLen);\n\n        {\n            const size_t lrgSz = 2*16*1024;\n            void *ptrLarge = pool_malloc(pool[id], lrgSz);\n            REQUIRE(ptrLarge);\n            memset(ptrLarge, 1, lrgSz);\n            // consume all small objects\n            while (pool_malloc(pool[id], 5 * 1024));\n            // releasing of large object will not give a chance to allocate more\n            // since only fixed pool can look at other bins aligned/notAligned\n            pool_free(pool[id], ptrLarge);\n            CHECK(!pool_malloc(pool[id], 5*1024));\n        }\n\n        barrier.wait();\n        int myPool = number_of_threads-id-1;\n        for (int i=0; i<10*myPool; i++)\n            REQUIRE(myPool==obj[myPool][i]);\n        pool_free(pool[myPool], obj[myPool]);\n        bool ok = pool_destroy(pool[myPool]);\n        REQUIRE(ok);\n    }\n};\n\nlong CrossThreadRun::number_of_threads;\nutils::SpinBarrier CrossThreadRun::barrier;\nrml::MemoryPool **CrossThreadRun::pool;\nchar **CrossThreadRun::obj;\n\n// pools created, used and destroyed by different threads\nvoid TestCrossThreadPools()\n{\n    for (int p=utils::MinThread; p<=utils::MaxThread; p++) {\n        CrossThreadRun::initBarrier(p);\n        CrossThreadRun::init(p);\n        utils::NativeParallelFor( p, CrossThreadRun() );\n        for (int i=0; i<p; i++)\n            REQUIRE_MESSAGE(!poolSpace[i].regions, \"Region leak detected\");\n        CrossThreadRun::destroy();\n    }\n}\n\n// buffer is too small to pool be created, but must not leak resources\nvoid TestTooSmallBuffer()\n{\n    poolSpace = new PoolSpace(8*1024);\n\n    rml::MemPoolPolicy pol(CrossThreadGetMem, CrossThreadPutMem);\n    rml::MemoryPool *pool;\n    pool_create_v1(0, &pol, &pool);\n    bool ok = pool_destroy(pool);\n    REQUIRE(ok);\n    REQUIRE_MESSAGE(!poolSpace[0].regions, \"No leaks.\");\n\n    delete poolSpace;\n}\n\nclass FixedPoolHeadBase : utils::NoAssign {\n    size_t size;\n    std::atomic<bool> used;\n    char* data;\npublic:\n    FixedPoolHeadBase(size_t s) : size(s), used(false) {\n        data = new char[size];\n    }\n    void *useData(size_t &bytes) {\n        bool wasUsed = used.exchange(true);\n        REQUIRE_MESSAGE(!wasUsed, \"The buffer must not be used twice.\");\n        bytes = size;\n        return data;\n    }\n    ~FixedPoolHeadBase() {\n        delete []data;\n    }\n};\n\ntemplate<size_t SIZE>\nclass FixedPoolHead : FixedPoolHeadBase {\npublic:\n    FixedPoolHead() : FixedPoolHeadBase(SIZE) { }\n};\n\nstatic void *fixedBufGetMem(intptr_t pool_id, size_t &bytes)\n{\n    return ((FixedPoolHeadBase*)pool_id)->useData(bytes);\n}\n\nclass FixedPoolUse: utils::NoAssign {\n    static utils::SpinBarrier startB;\n    rml::MemoryPool *pool;\n    size_t reqSize;\n    int iters;\npublic:\n    FixedPoolUse(unsigned threads, rml::MemoryPool *p, size_t sz, int it) :\n        pool(p), reqSize(sz), iters(it) {\n        startB.initialize(threads);\n    }\n    void operator()( int /*id*/ ) const {\n        startB.wait();\n        for (int i=0; i<iters; i++) {\n            void *o = pool_malloc(pool, reqSize);\n            ASSERT(o, \"Invalid object\");\n            pool_free(pool, o);\n        }\n    }\n};\n\nutils::SpinBarrier FixedPoolUse::startB;\n\nclass FixedPoolNomem: utils::NoAssign {\n    utils::SpinBarrier *startB;\n    rml::MemoryPool *pool;\npublic:\n    FixedPoolNomem(utils::SpinBarrier *b, rml::MemoryPool *p) :\n        startB(b), pool(p) {}\n    void operator()(int id) const {\n        startB->wait();\n        void *o = pool_malloc(pool, id%2? 64 : 128*1024);\n        ASSERT(!o, \"All memory must be consumed.\");\n    }\n};\n\nclass FixedPoolSomeMem: utils::NoAssign {\n    utils::SpinBarrier *barrier;\n    rml::MemoryPool *pool;\npublic:\n    FixedPoolSomeMem(utils::SpinBarrier *b, rml::MemoryPool *p) :\n        barrier(b), pool(p) {}\n    void operator()(int id) const {\n        barrier->wait();\n        utils::Sleep(2*id);\n        void *o = pool_malloc(pool, id%2? 64 : 128*1024);\n        barrier->wait();\n        pool_free(pool, o);\n    }\n};\n\nbool haveEnoughSpace(rml::MemoryPool *pool, size_t sz)\n{\n    if (void *p = pool_malloc(pool, sz)) {\n        pool_free(pool, p);\n        return true;\n    }\n    return false;\n}\n\nvoid TestFixedBufferPool()\n{\n    const int ITERS = 7;\n    const size_t MAX_OBJECT = 7*1024*1024;\n    void *ptrs[ITERS];\n    rml::MemPoolPolicy pol(fixedBufGetMem, nullptr, 0, /*fixedSizePool=*/true,\n                           /*keepMemTillDestroy=*/false);\n    rml::MemoryPool *pool;\n    {\n        FixedPoolHead<MAX_OBJECT + 1024*1024> head;\n\n        pool_create_v1((intptr_t)&head, &pol, &pool);\n        {\n            utils::NativeParallelFor( 1, FixedPoolUse(1, pool, MAX_OBJECT, 2) );\n\n            for (int i=0; i<ITERS; i++) {\n                ptrs[i] = pool_malloc(pool, MAX_OBJECT/ITERS);\n                REQUIRE(ptrs[i]);\n            }\n            for (int i=0; i<ITERS; i++)\n                pool_free(pool, ptrs[i]);\n\n            utils::NativeParallelFor( 1, FixedPoolUse(1, pool, MAX_OBJECT, 1) );\n        }\n        // each thread asks for an MAX_OBJECT/p/2 object,\n        // /2 is to cover fragmentation\n        for (int p=utils::MinThread; p<=utils::MaxThread; p++) {\n            utils::NativeParallelFor( p, FixedPoolUse(p, pool, MAX_OBJECT/p/2, 10000) );\n        }\n        {\n            const int p = 128;\n            utils::NativeParallelFor( p, FixedPoolUse(p, pool, MAX_OBJECT/p/2, 1) );\n        }\n        {\n            size_t maxSz;\n            const int p = 256;\n            utils::SpinBarrier barrier(p);\n\n            // Find maximal useful object size. Start with MAX_OBJECT/2,\n            // as the pool might be fragmented by BootStrapBlocks consumed during\n            // FixedPoolRun.\n            size_t l, r;\n            REQUIRE(haveEnoughSpace(pool, MAX_OBJECT/2));\n            for (l = MAX_OBJECT/2, r = MAX_OBJECT + 1024*1024; l < r-1; ) {\n                size_t mid = (l+r)/2;\n                if (haveEnoughSpace(pool, mid))\n                    l = mid;\n                else\n                    r = mid;\n            }\n            maxSz = l;\n            REQUIRE_MESSAGE(!haveEnoughSpace(pool, maxSz+1), \"Expect to find boundary value.\");\n            // consume all available memory\n            void *largeObj = pool_malloc(pool, maxSz);\n            REQUIRE(largeObj);\n            void *o = pool_malloc(pool, 64);\n            if (o) // pool fragmented, skip FixedPoolNomem\n                pool_free(pool, o);\n            else\n                utils::NativeParallelFor( p, FixedPoolNomem(&barrier, pool) );\n            pool_free(pool, largeObj);\n            // keep some space unoccupied\n            largeObj = pool_malloc(pool, maxSz-512*1024);\n            REQUIRE(largeObj);\n            utils::NativeParallelFor( p, FixedPoolSomeMem(&barrier, pool) );\n            pool_free(pool, largeObj);\n        }\n        bool ok = pool_destroy(pool);\n        REQUIRE(ok);\n    }\n    // check that fresh untouched pool can successfully fulfil requests from 128 threads\n    {\n        FixedPoolHead<MAX_OBJECT + 1024*1024> head;\n        pool_create_v1((intptr_t)&head, &pol, &pool);\n        int p=128;\n        utils::NativeParallelFor( p, FixedPoolUse(p, pool, MAX_OBJECT/p/2, 1) );\n        bool ok = pool_destroy(pool);\n        REQUIRE(ok);\n    }\n}\n\nstatic size_t currGranularity;\n\nstatic void *getGranMem(intptr_t /*pool_id*/, size_t &bytes)\n{\n    REQUIRE_MESSAGE(!(bytes%currGranularity), \"Region size mismatch granularity.\");\n    return malloc(bytes);\n}\n\nstatic int putGranMem(intptr_t /*pool_id*/, void *ptr, size_t bytes)\n{\n    REQUIRE_MESSAGE(!(bytes%currGranularity), \"Region size mismatch granularity.\");\n    free(ptr);\n    return 0;\n}\n\nvoid TestPoolGranularity()\n{\n    rml::MemPoolPolicy pol(getGranMem, putGranMem);\n    const size_t grans[] = {4*1024, 2*1024*1024, 6*1024*1024, 10*1024*1024};\n\n    for (unsigned i=0; i<sizeof(grans)/sizeof(grans[0]); i++) {\n        pol.granularity = currGranularity = grans[i];\n        rml::MemoryPool *pool;\n\n        pool_create_v1(0, &pol, &pool);\n        for (int sz=500*1024; sz<16*1024*1024; sz+=101*1024) {\n            void *p = pool_malloc(pool, sz);\n            REQUIRE_MESSAGE(p, \"Can't allocate memory in pool.\");\n            pool_free(pool, p);\n        }\n        bool ok = pool_destroy(pool);\n        REQUIRE(ok);\n    }\n}\n\nstatic size_t putMemAll, getMemAll, getMemSuccessful;\n\nstatic void *getMemMalloc(intptr_t /*pool_id*/, size_t &bytes)\n{\n    getMemAll++;\n    void *p = malloc(bytes);\n    if (p)\n        getMemSuccessful++;\n    return p;\n}\n\nstatic int putMemFree(intptr_t /*pool_id*/, void *ptr, size_t /*bytes*/)\n{\n    putMemAll++;\n    free(ptr);\n    return 0;\n}\n\nvoid TestPoolKeepTillDestroy()\n{\n    const int ITERS = 50*1024;\n    void *ptrs[2*ITERS+1];\n    rml::MemPoolPolicy pol(getMemMalloc, putMemFree);\n    rml::MemoryPool *pool;\n\n    // 1st create default pool that returns memory back to callback,\n    // then use keepMemTillDestroy policy\n    for (int keep=0; keep<2; keep++) {\n        getMemAll = putMemAll = 0;\n        if (keep)\n            pol.keepAllMemory = 1;\n        pool_create_v1(0, &pol, &pool);\n        for (int i=0; i<2*ITERS; i+=2) {\n            ptrs[i] = pool_malloc(pool, 7*1024);\n            ptrs[i+1] = pool_malloc(pool, 10*1024);\n        }\n        ptrs[2*ITERS] = pool_malloc(pool, 8*1024*1024);\n        REQUIRE(!putMemAll);\n        for (int i=0; i<2*ITERS; i++)\n            pool_free(pool, ptrs[i]);\n        pool_free(pool, ptrs[2*ITERS]);\n        size_t totalPutMemCalls = putMemAll;\n        if (keep)\n            REQUIRE(!putMemAll);\n        else {\n            REQUIRE(putMemAll);\n            putMemAll = 0;\n        }\n        size_t getCallsBefore = getMemAll;\n        void *p = pool_malloc(pool, 8*1024*1024);\n        REQUIRE(p);\n        if (keep)\n            REQUIRE_MESSAGE(getCallsBefore == getMemAll, \"Must not lead to new getMem call\");\n        size_t putCallsBefore = putMemAll;\n        bool ok = pool_reset(pool);\n        REQUIRE(ok);\n        REQUIRE_MESSAGE(putCallsBefore == putMemAll, \"Pool is not releasing memory during reset.\");\n        ok = pool_destroy(pool);\n        REQUIRE(ok);\n        REQUIRE(putMemAll);\n        totalPutMemCalls += putMemAll;\n        REQUIRE_MESSAGE(getMemAll == totalPutMemCalls, \"Memory leak detected.\");\n    }\n\n}\n\nstatic bool memEqual(char *buf, size_t size, int val)\n{\n    bool memEq = true;\n    for (size_t k=0; k<size; k++)\n        if (buf[k] != val)\n             memEq = false;\n    return memEq;\n}\n\nvoid TestEntries()\n{\n    const int SZ = 4;\n    const int ALGN = 4;\n    size_t size[SZ] = {8, 8000, 9000, 100*1024};\n    size_t algn[ALGN] = {8, 64, 4*1024, 8*1024*1024};\n\n    rml::MemPoolPolicy pol(getGranMem, putGranMem);\n    currGranularity = 1; // not check granularity in the test\n    rml::MemoryPool *pool;\n\n    pool_create_v1(0, &pol, &pool);\n    for (int i=0; i<SZ; i++)\n        for (int j=0; j<ALGN; j++) {\n            char *p = (char*)pool_aligned_malloc(pool, size[i], algn[j]);\n            REQUIRE((p && 0==((uintptr_t)p & (algn[j]-1))));\n            memset(p, j, size[i]);\n\n            size_t curr_algn = algn[rand() % ALGN];\n            size_t curr_sz = size[rand() % SZ];\n            char *p1 = (char*)pool_aligned_realloc(pool, p, curr_sz, curr_algn);\n            REQUIRE((p1 && 0==((uintptr_t)p1 & (curr_algn-1))));\n            REQUIRE(memEqual(p1, utils::min(size[i], curr_sz), j));\n\n            memset(p1, j+1, curr_sz);\n            size_t curr_sz1 = size[rand() % SZ];\n            char *p2 = (char*)pool_realloc(pool, p1, curr_sz1);\n            REQUIRE(p2);\n            REQUIRE(memEqual(p2, utils::min(curr_sz1, curr_sz), j+1));\n\n            pool_free(pool, p2);\n        }\n\n    bool ok = pool_destroy(pool);\n    REQUIRE(ok);\n\n    bool fail = rml::pool_destroy(nullptr);\n    REQUIRE(!fail);\n    fail = rml::pool_reset(nullptr);\n    REQUIRE(!fail);\n}\n\nrml::MemoryPool *CreateUsablePool(size_t size)\n{\n    rml::MemoryPool *pool;\n    rml::MemPoolPolicy okPolicy(getMemMalloc, putMemFree);\n\n    putMemAll = getMemAll = getMemSuccessful = 0;\n    rml::MemPoolError res = pool_create_v1(0, &okPolicy, &pool);\n    if (res != rml::POOL_OK) {\n        REQUIRE_MESSAGE((!getMemAll && !putMemAll), \"No callbacks after fail.\");\n        return nullptr;\n    }\n    void *o = pool_malloc(pool, size);\n    if (!getMemSuccessful) {\n        // no memory from callback, valid reason to leave\n        REQUIRE_MESSAGE(!o, \"The pool must be unusable.\");\n        return nullptr;\n    }\n    REQUIRE_MESSAGE(o, \"Created pool must be useful.\");\n    REQUIRE_MESSAGE((getMemSuccessful == 1 || getMemSuccessful == 5 || getMemAll > getMemSuccessful),\n           \"Multiple requests are allowed when unsuccessful request occurred or cannot search in bootstrap memory. \");\n    REQUIRE(!putMemAll);\n    pool_free(pool, o);\n\n    return pool;\n}\n\nvoid CheckPoolLeaks(size_t poolsAlwaysAvailable)\n{\n    const size_t MAX_POOLS = 16*1000;\n    const int ITERS = 20, CREATED_STABLE = 3;\n    rml::MemoryPool *pools[MAX_POOLS];\n    size_t created, maxCreated = MAX_POOLS;\n    int maxNotChangedCnt = 0;\n\n    // expecting that for ITERS runs, max number of pools that can be created\n    // can be stabilized and still stable CREATED_STABLE times\n    for (int j=0; j<ITERS && maxNotChangedCnt<CREATED_STABLE; j++) {\n        for (created=0; created<maxCreated; created++) {\n            rml::MemoryPool *p = CreateUsablePool(1024);\n            if (!p)\n                break;\n            pools[created] = p;\n        }\n        REQUIRE_MESSAGE(created>=poolsAlwaysAvailable,\n               \"Expect that the reasonable number of pools can be always created.\");\n        for (size_t i=0; i<created; i++) {\n            bool ok = pool_destroy(pools[i]);\n            REQUIRE(ok);\n        }\n        if (created < maxCreated) {\n            maxCreated = created;\n            maxNotChangedCnt = 0;\n        } else\n            maxNotChangedCnt++;\n    }\n    REQUIRE_MESSAGE(maxNotChangedCnt == CREATED_STABLE, \"The number of created pools must be stabilized.\");\n}\n\nvoid TestPoolCreation()\n{\n    putMemAll = getMemAll = getMemSuccessful = 0;\n\n    rml::MemPoolPolicy nullPolicy(nullptr, putMemFree),\n        emptyFreePolicy(getMemMalloc, nullptr),\n        okPolicy(getMemMalloc, putMemFree);\n    rml::MemoryPool *pool;\n\n    rml::MemPoolError res = pool_create_v1(0, &nullPolicy, &pool);\n    REQUIRE_MESSAGE(res==rml::INVALID_POLICY, \"pool with empty pAlloc can't be created\");\n    res = pool_create_v1(0, &emptyFreePolicy, &pool);\n    REQUIRE_MESSAGE(res==rml::INVALID_POLICY, \"pool with empty pFree can't be created\");\n    REQUIRE_MESSAGE((!putMemAll && !getMemAll), \"no callback calls are expected\");\n    res = pool_create_v1(0, &okPolicy, &pool);\n    REQUIRE(res==rml::POOL_OK);\n    bool ok = pool_destroy(pool);\n    REQUIRE(ok);\n    REQUIRE_MESSAGE(putMemAll == getMemSuccessful, \"no leaks after pool_destroy\");\n\n    // 32 is a guess for a number of pools that is acceptable everywere\n    CheckPoolLeaks(32);\n    // try to consume all but 16 TLS keys\n    LimitTLSKeysTo limitTLSTo(16);\n    // ...and check that we can create at least 16 pools\n    CheckPoolLeaks(16);\n}\n\nstruct AllocatedObject {\n    rml::MemoryPool *pool;\n};\n\nconst size_t BUF_SIZE = 1024*1024;\n\nclass PoolIdentityCheck : utils::NoAssign {\n    rml::MemoryPool** const pools;\n    AllocatedObject** const objs;\npublic:\n    PoolIdentityCheck(rml::MemoryPool** p, AllocatedObject** o) : pools(p), objs(o) {}\n    void operator()(int id) const {\n        objs[id] = (AllocatedObject*)pool_malloc(pools[id], BUF_SIZE/2);\n        REQUIRE(objs[id]);\n        rml::MemoryPool *act_pool = rml::pool_identify(objs[id]);\n        REQUIRE(act_pool == pools[id]);\n\n        for (size_t total=0; total<2*BUF_SIZE; total+=256) {\n            AllocatedObject *o = (AllocatedObject*)pool_malloc(pools[id], 256);\n            REQUIRE(o);\n            act_pool = rml::pool_identify(o);\n            REQUIRE(act_pool == pools[id]);\n            pool_free(act_pool, o);\n        }\n        if( id&1 ) { // make every second returned object \"small\"\n            pool_free(act_pool, objs[id]);\n            objs[id] = (AllocatedObject*)pool_malloc(pools[id], 16);\n            REQUIRE(objs[id]);\n        }\n        objs[id]->pool = act_pool;\n    }\n};\n\nvoid TestPoolDetection()\n{\n    const int POOLS = 4;\n    rml::MemPoolPolicy pol(fixedBufGetMem, nullptr, 0, /*fixedSizePool=*/true,\n                           /*keepMemTillDestroy=*/false);\n    rml::MemoryPool *pools[POOLS];\n    FixedPoolHead<BUF_SIZE*POOLS> head[POOLS];\n    AllocatedObject *objs[POOLS];\n\n    for (int i=0; i<POOLS; i++)\n        pool_create_v1((intptr_t)(head+i), &pol, &pools[i]);\n    // if object somehow released to different pools, subsequent allocation\n    // from affected pools became impossible\n    for (int k=0; k<10; k++) {\n        PoolIdentityCheck check(pools, objs);\n        if( k&1 )\n            utils::NativeParallelFor( POOLS, check);\n        else\n            for (int i=0; i<POOLS; i++) check(i);\n\n        for (int i=0; i<POOLS; i++) {\n            rml::MemoryPool *p = rml::pool_identify(objs[i]);\n            REQUIRE(p == objs[i]->pool);\n            pool_free(p, objs[i]);\n        }\n    }\n    for (int i=0; i<POOLS; i++) {\n        bool ok = pool_destroy(pools[i]);\n        REQUIRE(ok);\n    }\n}\n\nvoid TestLazyBootstrap()\n{\n    rml::MemPoolPolicy pol(getMemMalloc, putMemFree);\n    const size_t sizes[] = {8, 9*1024, 0};\n\n    for (int i=0; sizes[i]; i++) {\n        rml::MemoryPool *pool = CreateUsablePool(sizes[i]);\n        bool ok = pool_destroy(pool);\n        REQUIRE(ok);\n        REQUIRE_MESSAGE(getMemSuccessful == putMemAll, \"No leak.\");\n    }\n}\n\nclass NoLeakOnDestroyRun: utils::NoAssign {\n    rml::MemoryPool      *pool;\n    utils::SpinBarrier *barrier;\npublic:\n    NoLeakOnDestroyRun(rml::MemoryPool *p, utils::SpinBarrier *b) : pool(p), barrier(b) {}\n    void operator()(int id) const {\n        void *p = pool_malloc(pool, id%2? 8 : 9000);\n        REQUIRE((p && liveRegions.load(std::memory_order_relaxed)));\n        barrier->wait();\n        if (!id) {\n            bool ok = pool_destroy(pool);\n            REQUIRE(ok);\n            REQUIRE_MESSAGE(!liveRegions.load(std::memory_order_relaxed), \"Expected all regions were released.\");\n        }\n        // other threads must wait till pool destruction,\n        // to not call thread destruction cleanup before this\n        barrier->wait();\n    }\n};\n\nvoid TestNoLeakOnDestroy()\n{\n    liveRegions.store(0, std::memory_order_release);\n    for (int p=utils::MinThread; p<=utils::MaxThread; p++) {\n        rml::MemPoolPolicy pol(getMallocMem, putMallocMem);\n        utils::SpinBarrier barrier(p);\n        rml::MemoryPool *pool;\n\n        pool_create_v1(0, &pol, &pool);\n        utils::NativeParallelFor(p, NoLeakOnDestroyRun(pool, &barrier));\n    }\n}\n\nstatic int putMallocMemError(intptr_t /*pool_id*/, void *ptr, size_t bytes)\n{\n    MallocPoolHeader *hdr = (MallocPoolHeader*)ptr-1;\n    REQUIRE_MESSAGE(bytes == hdr->userSize, \"Invalid size in pool callback.\");\n    free(hdr->rawPtr);\n\n    liveRegions--;\n\n    return -1;\n}\n\nvoid TestDestroyFailed()\n{\n    rml::MemPoolPolicy pol(getMallocMem, putMallocMemError);\n    rml::MemoryPool *pool;\n    pool_create_v1(0, &pol, &pool);\n    void *ptr = pool_malloc(pool, 16);\n    REQUIRE(ptr);\n    bool fail = pool_destroy(pool);\n    REQUIRE_MESSAGE(fail==false, \"putMemPolicyError callback returns error, \"\n           \"expect pool_destroy() failure\");\n}\n\nvoid TestPoolMSize() {\n    rml::MemoryPool *pool = CreateUsablePool(1024);\n\n    const int SZ = 10;\n    // Original allocation requests, random numbers from small to large\n    size_t requestedSz[SZ] = {8, 16, 500, 1000, 2000, 4000, 8000, 1024*1024, 4242+4242, 8484+8484};\n\n    // Unlike large objects, small objects do not store its original size along with the object itself\n    // On Power architecture TLS bins are divided differently.\n    size_t allocatedSz[SZ] =\n#if __powerpc64__ || __ppc64__ || __bgp__\n        {8, 16, 512, 1024, 2688, 5376, 8064, 1024*1024, 4242+4242, 8484+8484};\n#else\n        {8, 16, 512, 1024, 2688, 4032, 8128, 1024*1024, 4242+4242, 8484+8484};\n#endif\n    for (int i = 0; i < SZ; i++) {\n        void* obj = pool_malloc(pool, requestedSz[i]);\n        size_t objSize = pool_msize(pool, obj);\n        REQUIRE_MESSAGE(objSize == allocatedSz[i], \"pool_msize returned the wrong value\");\n        pool_free(pool, obj);\n    }\n    bool destroyed = pool_destroy(pool);\n    REQUIRE(destroyed);\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Too small buffer\") {\n    TestTooSmallBuffer();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Pool reset\") {\n    TestPoolReset();\n}\nTEST_CASE(\"Shared pool\") {\n    TestSharedPool();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Cross thread pools\") {\n    TestCrossThreadPools();\n}\n\n//! \\brief \\ref interface\nTEST_CASE(\"Fixed buffer pool\") {\n    TestFixedBufferPool();\n}\n\n//! \\brief \\ref interface\nTEST_CASE(\"Pool granularity\") {\n    TestPoolGranularity();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Keep pool till destroy\") {\n    TestPoolKeepTillDestroy();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Entries\") {\n    TestEntries();\n}\n\n//! \\brief \\ref interface\nTEST_CASE(\"Pool creation\") {\n    TestPoolCreation();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Pool detection\") {\n    TestPoolDetection();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Lazy bootstrap\") {\n    TestLazyBootstrap();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"No leak on destroy\") {\n    TestNoLeakOnDestroy();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Destroy failed\") {\n    TestDestroyFailed();\n}\n\n//! \\brief \\ref interface\nTEST_CASE(\"Pool msize\") {\n    TestPoolMSize();\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbbmalloc/test_malloc_pure_c.c",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#ifdef __cplusplus\n#error For testing purpose, this file should be compiled with a C compiler, not C++\n#endif /*__cplusplus */\n\n#include \"tbb/scalable_allocator.h\"\n#include <stdio.h>\n#include <assert.h>\n#include <stdlib.h> /* for atexit */\n\n/*\n *  The test is to check if the scalable_allocator.h and its functions\n *  can be used from pure C programs; also some regression checks are done\n */\n\n#if __unix__\n/* huge pages supported only under Linux so far */\nconst int ExpectedResultHugePages = TBBMALLOC_OK;\n#else\nconst int ExpectedResultHugePages = TBBMALLOC_NO_EFFECT;\n#endif\n\n/* bool type definition for C */\n#if (defined(_MSC_VER) && _MSC_VER < 1800) || __sun || __SUNPRO_CC\ntypedef int bool;\n#define false 0\n#define true 1\n#else\n#include <stdbool.h>\n#endif\n\n/* test that it's possible to call allocation function from atexit\n   after mallocProcessShutdownNotification() called */\nstatic void MyExit(void) {\n    void *p = scalable_malloc(32);\n    assert(p);\n    scalable_free(p);\n}\n\nint main(void) {\n    size_t i, j;\n    int curr_mode, res;\n    void *p1, *p2;\n\n    atexit( MyExit );\n    for ( curr_mode = 0; curr_mode<=1; curr_mode++) {\n        assert(ExpectedResultHugePages ==\n               scalable_allocation_mode(TBBMALLOC_USE_HUGE_PAGES, !curr_mode));\n        p1 = scalable_malloc(10*1024*1024);\n        assert(p1);\n        assert(ExpectedResultHugePages ==\n               scalable_allocation_mode(TBBMALLOC_USE_HUGE_PAGES, curr_mode));\n        scalable_free(p1);\n    }\n\n    for( i=0; i<=1<<16; ++i) {\n        p1 = scalable_malloc(i);\n        if( !p1 )\n            printf(\"Warning: there should be memory but scalable_malloc returned NULL\\n\");\n        scalable_free(p1);\n    }\n    p1 = p2 = NULL;\n    for( i=1024*1024; ; i/=2 )\n    {\n        scalable_free(p1);\n        p1 = scalable_realloc(p2, i);\n        p2 = scalable_calloc(i, 32);\n        if (p2) {\n            if (i<sizeof(size_t)) {\n                for (j=0; j<i; j++)\n                    assert(0==*((char*)p2+j));\n            } else {\n                for (j=0; j<i; j+=sizeof(size_t))\n                    assert(0==*((size_t*)p2+j));\n            }\n        }\n        scalable_free(p2);\n        p2 = scalable_malloc(i);\n        if (i==0) break;\n    }\n    for( i=1; i<1024*1024; i*=2 )\n    {\n        scalable_free(p1);\n        p1 = scalable_realloc(p2, i);\n        p2 = scalable_malloc(i);\n    }\n    scalable_free(p1);\n    scalable_free(p2);\n    res = scalable_allocation_command(TBBMALLOC_CLEAN_ALL_BUFFERS, NULL);\n    assert(res == TBBMALLOC_OK);\n    res = scalable_allocation_command(TBBMALLOC_CLEAN_THREAD_BUFFERS, NULL);\n    /* expect all caches cleaned before, so got nothing from CLEAN_THREAD_BUFFERS */\n    assert(res == TBBMALLOC_NO_EFFECT);\n    /* check that invalid param argument give expected result*/\n    res = scalable_allocation_command(TBBMALLOC_CLEAN_THREAD_BUFFERS,\n                                      (void*)(intptr_t)1);\n    assert(res == TBBMALLOC_INVALID_PARAM);\n    printf(\"done\\n\");\n    return 0;\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbbmalloc/test_malloc_regression.cpp",
    "content": "/*\n    Copyright (c) 2005-2021 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#define __TBB_NO_IMPLICIT_LINKAGE 1\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_report.h\"\n#include \"common/memory_usage.h\"\n#include \"oneapi/tbb/detail/_utils.h\"\n#include \"tbb/scalable_allocator.h\"\n#include \"thread\"\n#include <stdio.h>\n\nclass minimalAllocFree {\npublic:\n    void operator()(int size) const {\n        tbb::scalable_allocator<char> a;\n        char* str = a.allocate( size );\n        a.deallocate( str, size );\n    }\n};\n\n\ntemplate<typename Body, typename Arg>\nvoid RunThread(const Body& body, const Arg& arg) {\n    std::thread job(body, arg);\n    job.join();\n}\n\n/*--------------------------------------------------------------------*/\n// The regression test against bug #1518 where thread bootstrap allocations \"leaked\"\n\nbool TestBootstrapLeak() {\n    /* In the bug 1518, each thread leaked ~384 bytes.\n       Initially, scalable allocator maps 1MB. Thus it is necessary to take out most of this space.\n       1MB is chunked into 16K blocks; of those, one block is for thread bootstrap, and one more\n       should be reserved for the test body. 62 blocks left, each can serve 15 objects of 1024 bytes.\n    */\n    const int alloc_size = 1024;\n    const int take_out_count = 15*62;\n\n    tbb::scalable_allocator<char> a;\n    char* array[take_out_count];\n    for( int i=0; i<take_out_count; ++i )\n        array[i] = a.allocate( alloc_size );\n\n    RunThread( minimalAllocFree(), alloc_size ); // for threading library to take some memory\n    size_t memory_in_use = utils::GetMemoryUsage();\n    // Wait for memory usage data to \"stabilize\". The test number (1000) has nothing underneath.\n    for( int i=0; i<1000; i++) {\n        if( utils::GetMemoryUsage()!=memory_in_use ) {\n            memory_in_use = utils::GetMemoryUsage();\n            i = -1;\n        }\n    }\n\n    ptrdiff_t memory_leak = 0;\n    // Note that 16K bootstrap memory block is enough to serve 42 threads.\n    const int num_thread_runs = 200;\n    for (;;) {\n        memory_in_use = utils::GetMemoryUsage();\n        for( int i=0; i<num_thread_runs; ++i )\n            RunThread( minimalAllocFree(), alloc_size );\n\n        memory_leak = utils::GetMemoryUsage() - memory_in_use;\n        if (!memory_leak)\n            break;\n    }\n    if( memory_leak>0 ) { // possibly too strong?\n        REPORT( \"Error: memory leak of up to %ld bytes\\n\", static_cast<long>(memory_leak));\n    }\n\n    for( int i=0; i<take_out_count; ++i )\n        a.deallocate( array[i], alloc_size );\n\n    return memory_leak<=0;\n}\n\n/*--------------------------------------------------------------------*/\n// The regression test against a bug with incompatible semantics of msize and realloc\n\nbool TestReallocMsize(size_t startSz) {\n    bool passed = true;\n\n    char *buf = (char*)scalable_malloc(startSz);\n    REQUIRE_MESSAGE(buf, \"\");\n    size_t realSz = scalable_msize(buf);\n    REQUIRE_MESSAGE(realSz>=startSz, \"scalable_msize must be not less then allocated size\");\n    memset(buf, 'a', realSz-1);\n    buf[realSz-1] = 0;\n    char *buf1 = (char*)scalable_realloc(buf, 2*realSz);\n    REQUIRE_MESSAGE(buf1, \"\");\n    REQUIRE_MESSAGE((scalable_msize(buf1)>=2*realSz), \"scalable_msize must be not less then allocated size\");\n    buf1[2*realSz-1] = 0;\n    if ( strspn(buf1, \"a\") < realSz-1 ) {\n        REPORT( \"Error: data broken for %d Bytes object.\\n\", startSz);\n        passed = false;\n    }\n    scalable_free(buf1);\n\n    return passed;\n}\n\n// regression test against incorrect work of msize/realloc\n// for aligned objects\nvoid TestAlignedMsize()\n{\n    const int NUM = 4;\n    char *p[NUM];\n    size_t objSizes[NUM];\n    size_t allocSz[] = {4, 8, 512, 2*1024, 4*1024, 8*1024, 16*1024, 0};\n    size_t align[] = {8, 512, 2*1024, 4*1024, 8*1024, 16*1024, 0};\n\n    for (int a=0; align[a]; a++)\n        for (int s=0; allocSz[s]; s++) {\n            for (int i=0; i<NUM; i++) {\n                p[i] = (char*)scalable_aligned_malloc(allocSz[s], align[a]);\n                CHECK_FAST(tbb::detail::is_aligned(p[i], align[a]));\n            }\n\n            for (int i=0; i<NUM; i++) {\n                objSizes[i] = scalable_msize(p[i]);\n                CHECK_FAST_MESSAGE(objSizes[i] >= allocSz[s], \"allocated size must be not less than requested\");\n                memset(p[i], i, objSizes[i]);\n            }\n            for (int i=0; i<NUM; i++) {\n                for (unsigned j=0; j<objSizes[i]; j++)\n                    CHECK_FAST_MESSAGE((((char*)p[i])[j] == i), \"Error: data broken\");\n            }\n\n            for (int i=0; i<NUM; i++) {\n                p[i] = (char*)scalable_aligned_realloc(p[i], 2*allocSz[s], align[a]);\n                CHECK(tbb::detail::is_aligned(p[i], align[a]));\n                memset((char*)p[i]+allocSz[s], i+1, allocSz[s]);\n            }\n            for (int i=0; i<NUM; i++) {\n                for (unsigned j=0; j<allocSz[s]; j++)\n                    CHECK_FAST_MESSAGE((((char*)p[i])[j] == i), \"Error: data broken\");\n                for (size_t j=allocSz[s]; j<2*allocSz[s]; j++)\n                    CHECK_FAST_MESSAGE((((char*)p[i])[j] == i+1), \"Error: data broken\");\n            }\n            for (int i=0; i<NUM; i++)\n                scalable_free(p[i]);\n        }\n}\n\n#if __TBB_USE_ADDRESS_SANITIZER\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Memory leaks test is not applicable under ASAN\\n\" * doctest::skip(true)) {}\n#else\n//! \\brief \\ref error_guessing\nTEST_CASE(\"testing leaks\") {\n    // Check whether memory usage data can be obtained; if not, skip test_bootstrap_leak.\n    if (utils::GetMemoryUsage()) {\n        REQUIRE_MESSAGE(TestBootstrapLeak(), \"Test failed\");\n    }\n}\n#endif // __TBB_USE_ADDRESS_SANITIZER\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"testing realloc mem size\") {\n    bool passed = true;\n    // TestReallocMsize runs for each power of 2 and each Fibonacci number below 64K\n    for (size_t a=1, b=1, sum=1; sum<=64*1024; ) {\n        passed &= TestReallocMsize(sum);\n        a = b;\n        b = sum;\n        sum = a+b;\n    }\n    for (size_t a=2; a<=64*1024; a*=2) {\n        passed &= TestReallocMsize(a);\n    }\n    REQUIRE_MESSAGE( passed, \"Test failed\" );\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"testing memory align\") {\n    TestAlignedMsize();\n}\n"
  },
  {
    "path": "third-party/tbb/test/tbbmalloc/test_malloc_shutdown_hang.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#define DOCTEST_CONFIG_IMPLEMENT\n#include \"common/test.h\"\n\n#include \"common/utils.h\"\n#include \"common/utils_report.h\"\n\n#include \"tbb/global_control.h\"\n#include \"tbb/task_arena.h\"\n#include \"tbb/scalable_allocator.h\"\n\n\n// Lets slow down the main thread on exit\nstatic constexpr int MAX_DELAY = 5;\nstruct GlobalObject {\n    ~GlobalObject() {\n        utils::Sleep(rand( ) % MAX_DELAY);\n    }\n} go;\n\nvoid allocatorRandomThrashing() {\n    const int ARRAY_SIZE = 1000;\n    const int MAX_ITER = 10000;\n    const int MAX_ALLOC = 10 * 1024 * 1024;\n\n    void *arr[ARRAY_SIZE] = {nullptr};\n    for (int i = 0; i < rand() % MAX_ITER; ++i) {\n        // Random allocation size for random arrays\n        for (int j = 0; j < rand() % ARRAY_SIZE; ++j) {\n            arr[j] = scalable_malloc(rand() % MAX_ALLOC);\n        }\n        // Deallocate everything\n        for (int j = 0; j < ARRAY_SIZE; ++j) {\n            scalable_free(arr[j]);\n            arr[j] = nullptr;\n        }\n    }\n}\n\nvoid hangOnExitReproducer() {\n    const int P = tbb::global_control::max_allowed_parallelism;\n    tbb::task_arena test_arena;\n    for (int i = 0; i < P-1; i++) {\n        test_arena.enqueue(allocatorRandomThrashing);\n    }\n}\n\n#if (_WIN32 || _WIN64) && !__TBB_WIN8UI_SUPPORT\n#include <process.h> // _spawnl\nvoid processSpawn(const char* self) {\n    _spawnl(_P_WAIT, self, self, \"1\", nullptr);\n}\n#elif __unix__ || __APPLE__\n#include <unistd.h> // fork/exec\n#include <sys/wait.h> // waitpid\nvoid processSpawn(const char* self) {\n    pid_t pid = fork();\n    if (pid == -1) {\n        REPORT(\"ERROR: fork failed.\\n\");\n    } else if (pid == 0) { // child\n        execl(self, self, \"1\", nullptr);\n        REPORT(\"ERROR: exec never returns\\n\");\n        exit(1);\n    } else { // parent\n        int status;\n        waitpid(pid, &status, 0);\n    }\n}\n#else\nvoid processSpawn(const char* /*self*/) {\n    REPORT(\"Known issue: no support for process spawn on this platform.\\n\");\n    REPORT(\"done\\n\");\n    exit(0);\n}\n#endif\n\n#if _MSC_VER && !__INTEL_COMPILER\n#pragma warning (push)\n#pragma warning (disable: 4702)  /* Unreachable code */\n#endif\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"testing shutdown hang\") {\n    hangOnExitReproducer();\n    CHECK(true); // just to notify that test has assertions\n}\n\nDOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4007) // 'function' : must be 'attribute' - see issue #182\nDOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4447)\nint main(int argc, char* argv[]) {\n    // Executed from child processes\n    if (argc == 2 && strcmp(argv[1],\"1\") == 0) {\n        return doctest::Context(argc, argv).run();\n    }\n\n    // The number of executions is a tradeoff\n    // between execution time and NBTS statistics\n    const int EXEC_TIMES = 100;\n    const char* self = argv[0];\n    for (int i = 0; i < EXEC_TIMES; i++) {\n        processSpawn(self);\n    }\n\n#if _MSC_VER && !__INTEL_COMPILER\n#pragma warning (pop)\n#endif\n}\nDOCTEST_MSVC_SUPPRESS_WARNING_POP\n"
  },
  {
    "path": "third-party/tbb/test/tbbmalloc/test_malloc_used_by_lib.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n#define __TBB_NO_IMPLICIT_LINKAGE 1\n\n#if _USRDLL\n\n#include <stdlib.h>\n#include \"common/config.h\"\n#include \"common/utils_assert.h\"\n#include \"tbb/scalable_allocator.h\"\n\nextern \"C\" {\n#if _WIN32||_WIN64\n    extern __declspec(dllexport) void callDll();\n#else\n    extern __TBB_EXPORT void callDll();\n#endif\n}\n\nextern \"C\" void callDll()\n{\n    static const int NUM = 20;\n    void *ptrs[NUM];\n\n    for (int i=0; i<NUM; i++) {\n        ptrs[i] = scalable_malloc(i*1024);\n        ASSERT(ptrs[i], nullptr);\n    }\n    for (int i=0; i<NUM; i++)\n        scalable_free(ptrs[i]);\n}\n\nint main() {}\n\n\n#else // _USRDLL\n#include \"common/config.h\"\n// FIXME: fix the test to support Windows* 8 Store Apps mode.\n// For sanitizers, it fails because RUNPATH is lost: https://github.com/google/sanitizers/issues/1219\n#if !__TBB_WIN8UI_SUPPORT && !(__GNUC__ && __GNUC__ < 10 && __TBB_USE_SANITIZERS) && __TBB_DYNAMIC_LOAD_ENABLED\n\n#define __TBB_NO_IMPLICIT_LINKAGE 1\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_dynamic_libs.h\"\n#include \"common/utils_report.h\"\n#include \"common/memory_usage.h\"\n#include \"common/spin_barrier.h\"\n\n\nclass UseDll {\n    utils::FunctionAddress run;\npublic:\n    UseDll(utils::FunctionAddress runPtr) : run(runPtr) { }\n    void operator()( std::size_t /*id*/ ) const {\n        (*run)();\n    }\n};\n\nvoid LoadThreadsUnload()\n{\n    utils::LIBRARY_HANDLE lib =\n        utils::OpenLibrary(TEST_LIBRARY_NAME(\"_test_malloc_used_by_lib\"));\n    ASSERT(lib, \"Can't load \" TEST_LIBRARY_NAME(\"_test_malloc_used_by_lib\"));\n    utils::NativeParallelFor(std::size_t(4), UseDll(utils::GetAddress(lib, \"callDll\")));\n    utils::CloseLibrary(lib);\n}\n\nstruct UnloadCallback {\n    utils::LIBRARY_HANDLE lib;\n\n    void operator() () const {\n        utils::CloseLibrary(lib);\n    }\n};\n\nstruct RunWithLoad {\n    static utils::SpinBarrier startBarr, endBarr;\n    static UnloadCallback unloadCallback;\n    static utils::FunctionAddress runPtr;\n\n    void operator()(std::size_t id) const {\n        if (!id) {\n            utils::LIBRARY_HANDLE lib =\n                utils::OpenLibrary(TEST_LIBRARY_NAME(\"_test_malloc_used_by_lib\"));\n            ASSERT(lib, \"Can't load \" TEST_LIBRARY_NAME(\"_test_malloc_used_by_lib\"));\n            runPtr = utils::GetAddress(lib, \"callDll\");\n            unloadCallback.lib = lib;\n        }\n        startBarr.wait();\n        (*runPtr)();\n        endBarr.wait(unloadCallback);\n    }\n};\n\nutils::SpinBarrier RunWithLoad::startBarr{}, RunWithLoad::endBarr{};\nUnloadCallback RunWithLoad::unloadCallback;\nutils::FunctionAddress RunWithLoad::runPtr;\n\nvoid ThreadsLoadUnload() {\n    constexpr std::size_t threads = 4;\n\n    RunWithLoad::startBarr.initialize(threads);\n    RunWithLoad::endBarr.initialize(threads);\n    RunWithLoad body{};\n    utils::NativeParallelFor(threads, body);\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"use test as lib\") {\n    const int ITERS = 20;\n    int i;\n    std::ptrdiff_t memory_leak = 0;\n\n    utils::GetMemoryUsage();\n\n    for (int run = 0; run < 2; run++) {\n        // expect that memory consumption stabilized after several runs\n        for (i = 0; i < ITERS; i++) {\n            std::size_t memory_in_use = utils::GetMemoryUsage();\n            if (run) {\n                LoadThreadsUnload();\n            } else {\n                ThreadsLoadUnload();\n            }\n            memory_leak = utils::GetMemoryUsage() - memory_in_use;\n            if (memory_leak == 0)  // possibly too strong?\n                break;\n        }\n        if(i==ITERS) {\n            // not stabilized, could be leak\n            REPORT( \"Error: memory leak of up to %ld bytes\\n\", static_cast<long>(memory_leak));\n            WARN(false);\n        }\n    }\n}\n#endif /* Unsupported configurations */\n#endif // _USRDLL\n"
  },
  {
    "path": "third-party/tbb/test/tbbmalloc/test_malloc_whitebox.cpp",
    "content": "/*\n    Copyright (c) 2005-2024 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n//! \\file test_malloc_whitebox.cpp\n//! \\brief Test for [memory_allocation] functionality\n\n#if _WIN32 || _WIN64\n#define _CRT_SECURE_NO_WARNINGS\n#endif\n\n// To prevent loading dynamic TBBmalloc at startup, that is not needed for the whitebox test\n#define __TBB_SOURCE_DIRECTLY_INCLUDED 1\n// Call thread shutdown API for native threads join\n#define HARNESS_TBBMALLOC_THREAD_SHUTDOWN 1\n\n// According to C99 standard INTPTR_MIN defined for C++ if __STDC_LIMIT_MACROS pre-defined\n#define __STDC_LIMIT_MACROS 1\n\n// To not depends on ITT support stuff\n#ifdef DO_ITT_NOTIFY\n#undef DO_ITT_NOTIFY\n#endif\n\n#include \"common/test.h\"\n\n#include \"common/utils.h\"\n#include \"common/utils_assert.h\"\n#include \"common/utils_env.h\"\n#include \"common/spin_barrier.h\"\n\n#include \"oneapi/tbb/detail/_machine.h\"\n\n#define __TBB_MALLOC_WHITEBOX_TEST 1 // to get access to allocator internals\n// help trigger rare race condition\n#define WhiteboxTestingYield() (tbb::detail::yield(), tbb::detail::yield(), tbb::detail::yield(), tbb::detail::yield())\n\n#if __INTEL_COMPILER && __TBB_MIC_OFFLOAD\n// 2571 is variable has not been declared with compatible \"target\" attribute\n// 3218 is class/struct may fail when offloaded because this field is misaligned\n//         or contains data that is misaligned\n    #pragma warning(push)\n    #pragma warning(disable:2571 3218)\n#endif\n#define protected public\n#define private public\n#include \"../../src/tbbmalloc/frontend.cpp\"\n#undef protected\n#undef private\n#if __INTEL_COMPILER && __TBB_MIC_OFFLOAD\n    #pragma warning(pop)\n#endif\n#include \"../../src/tbbmalloc/backend.cpp\"\n#include \"../../src/tbbmalloc/backref.cpp\"\n\nnamespace tbbmalloc_whitebox {\n    std::atomic<size_t> locGetProcessed{};\n    std::atomic<size_t> locPutProcessed{};\n}\n#include \"../../src/tbbmalloc/large_objects.cpp\"\n#include \"../../src/tbbmalloc/tbbmalloc.cpp\"\n\nconst int LARGE_MEM_SIZES_NUM = 10;\nstatic const int MinThread = 1;\nstatic const int MaxThread = 4;\n\nclass AllocInfo {\n    int *p;\n    int val;\n    int size;\npublic:\n    AllocInfo() : p(nullptr), val(0), size(0) {}\n    explicit AllocInfo(int sz) : p((int*)scalable_malloc(sz*sizeof(int))),\n                                   val(rand()), size(sz) {\n        REQUIRE(p);\n        for (int k=0; k<size; k++)\n            p[k] = val;\n    }\n    void check() const {\n        for (int k=0; k<size; k++)\n            ASSERT(p[k] == val, nullptr);\n    }\n    void clear() {\n        scalable_free(p);\n    }\n};\n\n// Test struct to call ProcessShutdown after all tests\nstruct ShutdownTest {\n    ~ShutdownTest() {\n    #if _WIN32 || _WIN64\n        __TBB_mallocProcessShutdownNotification(true);\n    #else\n        __TBB_mallocProcessShutdownNotification(false);\n    #endif\n    }\n};\n\nstatic ShutdownTest shutdownTest;\n\nclass SimpleBarrier: utils::NoAssign {\nprotected:\n    static utils::SpinBarrier barrier;\npublic:\n    static void initBarrier(unsigned thrds) { barrier.initialize(thrds); }\n};\n\nutils::SpinBarrier SimpleBarrier::barrier;\n\nclass TestLargeObjCache: public SimpleBarrier {\npublic:\n    static int largeMemSizes[LARGE_MEM_SIZES_NUM];\n\n    TestLargeObjCache( ) {}\n\n    void operator()( int /*mynum*/ ) const {\n        AllocInfo allocs[LARGE_MEM_SIZES_NUM];\n\n        // push to maximal cache limit\n        for (int i=0; i<2; i++) {\n            const int sizes[] = { MByte/sizeof(int),\n                                  (MByte-2*LargeObjectCache::LargeBSProps::CacheStep)/sizeof(int) };\n            for (int q=0; q<2; q++) {\n                size_t curr = 0;\n                for (int j=0; j<LARGE_MEM_SIZES_NUM; j++, curr++)\n                    new (allocs+curr) AllocInfo(sizes[q]);\n\n                for (size_t j=0; j<curr; j++) {\n                    allocs[j].check();\n                    allocs[j].clear();\n                }\n            }\n        }\n\n        barrier.wait();\n\n        // check caching correctness\n        for (int i=0; i<1000; i++) {\n            size_t curr = 0;\n            for (int j=0; j<LARGE_MEM_SIZES_NUM-1; j++, curr++)\n                new (allocs+curr) AllocInfo(largeMemSizes[j]);\n\n            new (allocs+curr)\n                AllocInfo((int)(4*minLargeObjectSize +\n                                2*minLargeObjectSize*(1.*rand()/RAND_MAX)));\n            curr++;\n\n            for (size_t j=0; j<curr; j++) {\n                allocs[j].check();\n                allocs[j].clear();\n            }\n        }\n    }\n};\n\nint TestLargeObjCache::largeMemSizes[LARGE_MEM_SIZES_NUM];\n\nvoid TestLargeObjectCache()\n{\n    for (int i=0; i<LARGE_MEM_SIZES_NUM; i++)\n        TestLargeObjCache::largeMemSizes[i] =\n            (int)(minLargeObjectSize + 2*minLargeObjectSize*(1.*rand()/RAND_MAX));\n\n    for( int p=MaxThread; p>=MinThread; --p ) {\n        TestLargeObjCache::initBarrier( p );\n        utils::NativeParallelFor( p, TestLargeObjCache() );\n    }\n}\n\n#if MALLOC_CHECK_RECURSION\n\nclass TestStartupAlloc: public SimpleBarrier {\n    struct TestBlock {\n        void *ptr;\n        size_t sz;\n    };\n    static const int ITERS = 100;\npublic:\n    TestStartupAlloc() {}\n    void operator()(int) const {\n        TestBlock blocks1[ITERS], blocks2[ITERS];\n\n        barrier.wait();\n\n        for (int i=0; i<ITERS; i++) {\n            blocks1[i].sz = rand() % minLargeObjectSize;\n            blocks1[i].ptr = StartupBlock::allocate(blocks1[i].sz);\n            REQUIRE((blocks1[i].ptr && StartupBlock::msize(blocks1[i].ptr)>=blocks1[i].sz\n                   && 0==(uintptr_t)blocks1[i].ptr % sizeof(void*)));\n            memset(blocks1[i].ptr, i, blocks1[i].sz);\n        }\n        for (int i=0; i<ITERS; i++) {\n            blocks2[i].sz = rand() % minLargeObjectSize;\n            blocks2[i].ptr = StartupBlock::allocate(blocks2[i].sz);\n            REQUIRE((blocks2[i].ptr && StartupBlock::msize(blocks2[i].ptr)>=blocks2[i].sz\n                   && 0==(uintptr_t)blocks2[i].ptr % sizeof(void*)));\n            memset(blocks2[i].ptr, i, blocks2[i].sz);\n\n            for (size_t j=0; j<blocks1[i].sz; j++)\n                REQUIRE(*((char*)blocks1[i].ptr+j) == i);\n            Block *block = (Block *)alignDown(blocks1[i].ptr, slabSize);\n            ((StartupBlock *)block)->free(blocks1[i].ptr);\n        }\n        for (int i=ITERS-1; i>=0; i--) {\n            for (size_t j=0; j<blocks2[i].sz; j++)\n                REQUIRE(*((char*)blocks2[i].ptr+j) == i);\n            Block *block = (Block *)alignDown(blocks2[i].ptr, slabSize);\n            ((StartupBlock *)block)->free(blocks2[i].ptr);\n        }\n    }\n};\n\n#endif /* MALLOC_CHECK_RECURSION */\n\n#include <deque>\n\ntemplate<int ITERS>\nclass BackRefWork: utils::NoAssign {\n    struct TestBlock {\n        BackRefIdx idx;\n        char       data;\n        TestBlock(BackRefIdx idx_) : idx(idx_) {}\n    };\npublic:\n    BackRefWork() {}\n    void operator()(int) const {\n        size_t cnt;\n        // it's important to not invalidate pointers to the contents of the container\n        std::deque<TestBlock> blocks;\n\n        // for ITERS==0 consume all available backrefs\n        for (cnt=0; !ITERS || cnt<ITERS; cnt++) {\n            BackRefIdx idx = BackRefIdx::newBackRef(/*largeObj=*/false);\n            if (idx.isInvalid())\n                break;\n            blocks.push_back(TestBlock(idx));\n            setBackRef(blocks.back().idx, &blocks.back().data);\n        }\n        for (size_t i=0; i<cnt; i++)\n            REQUIRE((Block*)&blocks[i].data == getBackRef(blocks[i].idx));\n        for (size_t i=cnt; i>0; i--)\n            removeBackRef(blocks[i-1].idx);\n    }\n};\n\nclass LocalCachesHit: utils::NoAssign {\n    // set ITERS to trigger possible leak of backreferences\n    // during cleanup on cache overflow and on thread termination\n    static const int ITERS = 2*(FreeBlockPool::POOL_HIGH_MARK +\n                                LocalLOC::LOC_HIGH_MARK);\npublic:\n    LocalCachesHit() {}\n    void operator()(int) const {\n        void *objsSmall[ITERS], *objsLarge[ITERS];\n\n        for (int i=0; i<ITERS; i++) {\n            objsSmall[i] = scalable_malloc(minLargeObjectSize-1);\n            objsLarge[i] = scalable_malloc(minLargeObjectSize);\n        }\n        for (int i=0; i<ITERS; i++) {\n            scalable_free(objsSmall[i]);\n            scalable_free(objsLarge[i]);\n        }\n    }\n};\n\nstatic size_t allocatedBackRefCount()\n{\n    size_t cnt = 0;\n    for (int i=0; i<=backRefMain.load(std::memory_order_relaxed)->lastUsed.load(std::memory_order_relaxed); i++)\n        cnt += backRefMain.load(std::memory_order_relaxed)->backRefBl[i]->allocatedCount;\n    return cnt;\n}\n\nclass TestInvalidBackrefs: public SimpleBarrier {\n#if __ANDROID__\n    // Android requires lower iters due to lack of virtual memory.\n    static const int BACKREF_GROWTH_ITERS = 50*1024;\n#else\n    static const int BACKREF_GROWTH_ITERS = 200*1024;\n#endif\n\n    static std::atomic<bool> backrefGrowthDone;\n    static void *ptrs[BACKREF_GROWTH_ITERS];\npublic:\n    TestInvalidBackrefs() {}\n    void operator()(int id) const {\n\n        if (!id) {\n            backrefGrowthDone = false;\n            barrier.wait();\n\n            for (int i=0; i<BACKREF_GROWTH_ITERS; i++)\n                ptrs[i] = scalable_malloc(minLargeObjectSize);\n            backrefGrowthDone = true;\n            for (int i=0; i<BACKREF_GROWTH_ITERS; i++)\n                scalable_free(ptrs[i]);\n        } else {\n            void *p2 = scalable_malloc(minLargeObjectSize-1);\n            char *p1 = (char*)scalable_malloc(minLargeObjectSize-1);\n            LargeObjectHdr *hdr =\n                (LargeObjectHdr*)(p1+minLargeObjectSize-1 - sizeof(LargeObjectHdr));\n            hdr->backRefIdx.main = 7;\n            hdr->backRefIdx.largeObj = 1;\n            hdr->backRefIdx.offset = 2000;\n\n            barrier.wait();\n\n            int yield_count = 0;\n            while (!backrefGrowthDone) {\n                scalable_free(p2);\n                p2 = scalable_malloc(minLargeObjectSize-1);\n                if (yield_count++ == 100) {\n                    yield_count = 0;\n                    std::this_thread::yield();\n                }\n            }\n            scalable_free(p1);\n            scalable_free(p2);\n        }\n    }\n};\n\nstd::atomic<bool> TestInvalidBackrefs::backrefGrowthDone;\nvoid *TestInvalidBackrefs::ptrs[BACKREF_GROWTH_ITERS];\n\nvoid TestBackRef() {\n    size_t beforeNumBackRef, afterNumBackRef;\n\n    beforeNumBackRef = allocatedBackRefCount();\n    for( int p=MaxThread; p>=MinThread; --p )\n        utils::NativeParallelFor( p, BackRefWork<2*BR_MAX_CNT+2>() );\n    afterNumBackRef = allocatedBackRefCount();\n    REQUIRE_MESSAGE(beforeNumBackRef==afterNumBackRef, \"backreference leak detected\");\n    // lastUsed marks peak resource consumption. As we allocate below the mark,\n    // it must not move up, otherwise there is a resource leak.\n    int sustLastUsed = backRefMain.load(std::memory_order_relaxed)->lastUsed.load(std::memory_order_relaxed);\n    utils::NativeParallelFor( 1, BackRefWork<2*BR_MAX_CNT+2>() );\n    REQUIRE_MESSAGE(sustLastUsed == backRefMain.load(std::memory_order_relaxed)->lastUsed.load(std::memory_order_relaxed), \"backreference leak detected\");\n    // check leak of back references while per-thread caches are in use\n    // warm up needed to cover bootStrapMalloc call\n    utils::NativeParallelFor( 1, LocalCachesHit() );\n    beforeNumBackRef = allocatedBackRefCount();\n    utils::NativeParallelFor( 2, LocalCachesHit() );\n    int res = scalable_allocation_command(TBBMALLOC_CLEAN_ALL_BUFFERS, nullptr);\n    REQUIRE(res == TBBMALLOC_OK);\n    afterNumBackRef = allocatedBackRefCount();\n    REQUIRE_MESSAGE(beforeNumBackRef>=afterNumBackRef, \"backreference leak detected\");\n\n    // This is a regression test against race condition between backreference\n    // extension and checking invalid BackRefIdx.\n    // While detecting is object large or small, scalable_free 1st check for\n    // large objects, so there is a chance to prepend small object with\n    // seems valid BackRefIdx for large objects, and thus trigger the bug.\n    TestInvalidBackrefs::initBarrier(MaxThread);\n    utils::NativeParallelFor( MaxThread, TestInvalidBackrefs() );\n    // Consume all available backrefs and check they work correctly.\n    // For now test 32-bit machines only, because for 64-bit memory consumption is too high.\n    if (sizeof(uintptr_t) == 4)\n        utils::NativeParallelFor( MaxThread, BackRefWork<0>() );\n}\n\nvoid *getMem(intptr_t /*pool_id*/, size_t &bytes)\n{\n    const size_t BUF_SIZE = 8*1024*1024;\n    static char space[BUF_SIZE];\n    static size_t pos;\n\n    if (pos + bytes > BUF_SIZE)\n        return nullptr;\n\n    void *ret = space + pos;\n    pos += bytes;\n\n    return ret;\n}\n\nint putMem(intptr_t /*pool_id*/, void* /*raw_ptr*/, size_t /*raw_bytes*/)\n{\n    return 0;\n}\n\nstruct MallocPoolHeader {\n    void  *rawPtr;\n    size_t userSize;\n};\n\nvoid *getMallocMem(intptr_t /*pool_id*/, size_t &bytes)\n{\n    void *rawPtr = malloc(bytes+sizeof(MallocPoolHeader));\n    void *ret = (void *)((uintptr_t)rawPtr+sizeof(MallocPoolHeader));\n\n    MallocPoolHeader *hdr = (MallocPoolHeader*)ret-1;\n    hdr->rawPtr = rawPtr;\n    hdr->userSize = bytes;\n\n    return ret;\n}\n\nint putMallocMem(intptr_t /*pool_id*/, void *ptr, size_t bytes)\n{\n    MallocPoolHeader *hdr = (MallocPoolHeader*)ptr-1;\n    ASSERT(bytes == hdr->userSize, \"Invalid size in pool callback.\");\n    free(hdr->rawPtr);\n\n    return 0;\n}\n\nclass StressLOCacheWork: utils::NoAssign {\n    rml::MemoryPool *my_mallocPool;\npublic:\n    StressLOCacheWork(rml::MemoryPool *mallocPool) : my_mallocPool(mallocPool) {}\n    void operator()(int) const {\n        for (size_t sz=minLargeObjectSize; sz<1*1024*1024;\n             sz+=LargeObjectCache::LargeBSProps::CacheStep) {\n            void *ptr = pool_malloc(my_mallocPool, sz);\n            REQUIRE_MESSAGE(ptr, \"Memory was not allocated\");\n            memset(ptr, sz, sz);\n            pool_free(my_mallocPool, ptr);\n        }\n    }\n};\n\nvoid TestPools() {\n    rml::MemPoolPolicy pol(getMem, putMem);\n    size_t beforeNumBackRef, afterNumBackRef;\n\n    rml::MemoryPool *pool1;\n    rml::MemoryPool *pool2;\n    pool_create_v1(0, &pol, &pool1);\n    pool_create_v1(0, &pol, &pool2);\n    pool_destroy(pool1);\n    pool_destroy(pool2);\n\n    scalable_allocation_command(TBBMALLOC_CLEAN_ALL_BUFFERS, nullptr);\n    beforeNumBackRef = allocatedBackRefCount();\n    rml::MemoryPool *fixedPool;\n\n    pool_create_v1(0, &pol, &fixedPool);\n    pol.pAlloc = getMallocMem;\n    pol.pFree = putMallocMem;\n    pol.granularity = 8;\n    rml::MemoryPool *mallocPool;\n\n    pool_create_v1(0, &pol, &mallocPool);\n/* check that large object cache (LOC) returns correct size for cached objects\n   passBackendSz Byte objects are cached in LOC, but bypassed the backend, so\n   memory requested directly from allocation callback.\n   nextPassBackendSz Byte objects must fit to another LOC bin,\n   so that their allocation/releasing leads to cache cleanup.\n   All this is expecting to lead to releasing of passBackendSz Byte object\n   from LOC during LOC cleanup, and putMallocMem checks that returned size\n   is correct.\n*/\n    const size_t passBackendSz = Backend::maxBinned_HugePage+1,\n        anotherLOCBinSz = minLargeObjectSize+1;\n    for (int i=0; i<10; i++) { // run long enough to be cached\n        void *p = pool_malloc(mallocPool, passBackendSz);\n        REQUIRE_MESSAGE(p, \"Memory was not allocated\");\n        pool_free(mallocPool, p);\n    }\n    // run long enough to passBackendSz allocation was cleaned from cache\n    // and returned back to putMallocMem for size checking\n    for (int i=0; i<1000; i++) {\n        void *p = pool_malloc(mallocPool, anotherLOCBinSz);\n        REQUIRE_MESSAGE(p, \"Memory was not allocated\");\n        pool_free(mallocPool, p);\n    }\n\n    void *smallObj =  pool_malloc(fixedPool, 10);\n    REQUIRE_MESSAGE(smallObj, \"Memory was not allocated\");\n    memset(smallObj, 1, 10);\n    void *ptr = pool_malloc(fixedPool, 1024);\n    REQUIRE_MESSAGE(ptr, \"Memory was not allocated\");\n    memset(ptr, 1, 1024);\n    void *largeObj = pool_malloc(fixedPool, minLargeObjectSize);\n    REQUIRE_MESSAGE(largeObj, \"Memory was not allocated\");\n    memset(largeObj, 1, minLargeObjectSize);\n    ptr = pool_malloc(fixedPool, minLargeObjectSize);\n    REQUIRE_MESSAGE(ptr, \"Memory was not allocated\");\n    memset(ptr, minLargeObjectSize, minLargeObjectSize);\n    pool_malloc(fixedPool, 10*minLargeObjectSize); // no leak for unsuccessful allocations\n    pool_free(fixedPool, smallObj);\n    pool_free(fixedPool, largeObj);\n\n    // provoke large object cache cleanup and hope no leaks occurs\n    for( int p=MaxThread; p>=MinThread; --p )\n        utils::NativeParallelFor( p, StressLOCacheWork(mallocPool) );\n    pool_destroy(mallocPool);\n    pool_destroy(fixedPool);\n\n    scalable_allocation_command(TBBMALLOC_CLEAN_ALL_BUFFERS, nullptr);\n    afterNumBackRef = allocatedBackRefCount();\n    REQUIRE_MESSAGE(beforeNumBackRef==afterNumBackRef, \"backreference leak detected\");\n\n    {\n        // test usedSize/cachedSize and LOC bitmask correctness\n        void *p[5];\n        pool_create_v1(0, &pol, &mallocPool);\n        const LargeObjectCache *loc = &((rml::internal::MemoryPool*)mallocPool)->extMemPool.loc;\n        const int LargeCacheStep = LargeObjectCache::LargeBSProps::CacheStep;\n        p[3] = pool_malloc(mallocPool, minLargeObjectSize+2*LargeCacheStep);\n        for (int i=0; i<10; i++) {\n            p[0] = pool_malloc(mallocPool, minLargeObjectSize);\n            p[1] = pool_malloc(mallocPool, minLargeObjectSize+LargeCacheStep);\n            pool_free(mallocPool, p[0]);\n            pool_free(mallocPool, p[1]);\n        }\n        REQUIRE(loc->getUsedSize());\n        pool_free(mallocPool, p[3]);\n        REQUIRE(loc->getLOCSize() < 3*(minLargeObjectSize+LargeCacheStep));\n        const size_t maxLocalLOCSize = LocalLOCImpl<3,30>::getMaxSize();\n        REQUIRE(loc->getUsedSize() <= maxLocalLOCSize);\n        for (int i=0; i<3; i++)\n            p[i] = pool_malloc(mallocPool, minLargeObjectSize+i*LargeCacheStep);\n        size_t currUser = loc->getUsedSize();\n        REQUIRE((!loc->getLOCSize() && currUser >= 3*(minLargeObjectSize+LargeCacheStep)));\n        p[4] = pool_malloc(mallocPool, minLargeObjectSize+3*LargeCacheStep);\n        REQUIRE(loc->getUsedSize() - currUser >= minLargeObjectSize+3*LargeCacheStep);\n        pool_free(mallocPool, p[4]);\n        REQUIRE(loc->getUsedSize() <= currUser+maxLocalLOCSize);\n        pool_reset(mallocPool);\n        REQUIRE((!loc->getLOCSize() && !loc->getUsedSize()));\n        pool_destroy(mallocPool);\n    }\n    // To test LOC we need bigger lists than released by current LocalLOC\n    //   in production code. Create special LocalLOC.\n    {\n        LocalLOCImpl<2, 20> lLOC;\n        pool_create_v1(0, &pol, &mallocPool);\n        rml::internal::ExtMemoryPool *mPool = &((rml::internal::MemoryPool*)mallocPool)->extMemPool;\n        const LargeObjectCache *loc = &((rml::internal::MemoryPool*)mallocPool)->extMemPool.loc;\n        const int LargeCacheStep = LargeObjectCache::LargeBSProps::CacheStep;\n        for (int i=0; i<22; i++) {\n            void *o = pool_malloc(mallocPool, minLargeObjectSize+i*LargeCacheStep);\n            bool ret = lLOC.put(((LargeObjectHdr*)o - 1)->memoryBlock, mPool);\n            REQUIRE(ret);\n\n            o = pool_malloc(mallocPool, minLargeObjectSize+i*LargeCacheStep);\n            ret = lLOC.put(((LargeObjectHdr*)o - 1)->memoryBlock, mPool);\n            REQUIRE(ret);\n        }\n        lLOC.externalCleanup(mPool);\n        REQUIRE(!loc->getUsedSize());\n\n        pool_destroy(mallocPool);\n    }\n}\n\nvoid TestObjectRecognition() {\n    size_t headersSize = sizeof(LargeMemoryBlock)+sizeof(LargeObjectHdr);\n    unsigned falseObjectSize = 113; // unsigned is the type expected by getObjectSize\n    size_t obtainedSize;\n\n    REQUIRE_MESSAGE(sizeof(BackRefIdx)==sizeof(uintptr_t), \"Unexpected size of BackRefIdx\");\n    REQUIRE_MESSAGE(getObjectSize(falseObjectSize)!=falseObjectSize, \"Error in test: bad choice for false object size\");\n\n    void* mem = scalable_malloc(2*slabSize);\n    REQUIRE_MESSAGE(mem, \"Memory was not allocated\");\n    Block* falseBlock = (Block*)alignUp((uintptr_t)mem, slabSize);\n    falseBlock->objectSize = falseObjectSize;\n    char* falseSO = (char*)falseBlock + falseObjectSize*7;\n    REQUIRE_MESSAGE(alignDown(falseSO, slabSize)==(void*)falseBlock, \"Error in test: false object offset is too big\");\n\n    void* bufferLOH = scalable_malloc(2*slabSize + headersSize);\n    REQUIRE_MESSAGE(bufferLOH, \"Memory was not allocated\");\n    LargeObjectHdr* falseLO =\n        (LargeObjectHdr*)alignUp((uintptr_t)bufferLOH + headersSize, slabSize);\n    LargeObjectHdr* headerLO = (LargeObjectHdr*)falseLO-1;\n    headerLO->memoryBlock = (LargeMemoryBlock*)bufferLOH;\n    headerLO->memoryBlock->unalignedSize = 2*slabSize + headersSize;\n    headerLO->memoryBlock->objectSize = slabSize + headersSize;\n    headerLO->backRefIdx = BackRefIdx::newBackRef(/*largeObj=*/true);\n    setBackRef(headerLO->backRefIdx, headerLO);\n    REQUIRE_MESSAGE(scalable_msize(falseLO) == slabSize + headersSize,\n           \"Error in test: LOH falsification failed\");\n    removeBackRef(headerLO->backRefIdx);\n\n    const int NUM_OF_IDX = BR_MAX_CNT+2;\n    BackRefIdx idxs[NUM_OF_IDX];\n    for (int cnt=0; cnt<2; cnt++) {\n        for (int main = -10; main<10; main++) {\n            falseBlock->backRefIdx.main = (uint16_t)main;\n            headerLO->backRefIdx.main = (uint16_t)main;\n\n            for (int bl = -10; bl<BR_MAX_CNT+10; bl++) {\n                falseBlock->backRefIdx.offset = (uint16_t)bl;\n                headerLO->backRefIdx.offset = (uint16_t)bl;\n\n                for (int largeObj = 0; largeObj<2; largeObj++) {\n                    falseBlock->backRefIdx.largeObj = largeObj;\n                    headerLO->backRefIdx.largeObj = largeObj;\n\n                    obtainedSize = __TBB_malloc_safer_msize(falseSO, nullptr);\n                    REQUIRE_MESSAGE(obtainedSize==0, \"Incorrect pointer accepted\");\n                    obtainedSize = __TBB_malloc_safer_msize(falseLO, nullptr);\n                    REQUIRE_MESSAGE(obtainedSize==0, \"Incorrect pointer accepted\");\n                }\n            }\n        }\n        if (cnt == 1) {\n            for (int i=0; i<NUM_OF_IDX; i++)\n                removeBackRef(idxs[i]);\n            break;\n        }\n        for (int i=0; i<NUM_OF_IDX; i++) {\n            idxs[i] = BackRefIdx::newBackRef(/*largeObj=*/false);\n            setBackRef(idxs[i], nullptr);\n        }\n    }\n    char *smallPtr = (char*)scalable_malloc(falseObjectSize);\n    obtainedSize = __TBB_malloc_safer_msize(smallPtr, nullptr);\n    REQUIRE_MESSAGE(obtainedSize==getObjectSize(falseObjectSize), \"Correct pointer not accepted?\");\n    scalable_free(smallPtr);\n\n    obtainedSize = __TBB_malloc_safer_msize(mem, nullptr);\n    REQUIRE_MESSAGE(obtainedSize>=2*slabSize, \"Correct pointer not accepted?\");\n    scalable_free(mem);\n    scalable_free(bufferLOH);\n}\n\nclass TestBackendWork: public SimpleBarrier {\n    struct TestBlock {\n        intptr_t   data;\n        BackRefIdx idx;\n    };\n    static const int ITERS = 20;\n\n    rml::internal::Backend *backend;\npublic:\n    TestBackendWork(rml::internal::Backend *bknd) : backend(bknd) {}\n    void operator()(int) const {\n        barrier.wait();\n\n        for (int i=0; i<ITERS; i++) {\n            BlockI *slabBlock = backend->getSlabBlock(1);\n            REQUIRE_MESSAGE(slabBlock, \"Memory was not allocated\");\n            uintptr_t prevBlock = (uintptr_t)slabBlock;\n            backend->putSlabBlock(slabBlock);\n\n            LargeMemoryBlock *largeBlock = backend->getLargeBlock(16*1024);\n            REQUIRE_MESSAGE(largeBlock, \"Memory was not allocated\");\n            REQUIRE_MESSAGE((uintptr_t)largeBlock != prevBlock,\n                    \"Large block cannot be reused from slab memory, only in fixed_pool case.\");\n            backend->putLargeBlock(largeBlock);\n        }\n    }\n};\n\nvoid TestBackend()\n{\n    rml::MemPoolPolicy pol(getMallocMem, putMallocMem);\n    rml::MemoryPool *mPool;\n    pool_create_v1(0, &pol, &mPool);\n    rml::internal::ExtMemoryPool *ePool = &((rml::internal::MemoryPool*)mPool)->extMemPool;\n    rml::internal::Backend *backend = &ePool->backend;\n\n    for( int p=MaxThread; p>=MinThread; --p ) {\n        // regression test against an race condition in backend synchronization,\n        // triggered only when WhiteboxTestingYield() call yields\n#if TBB_USE_DEBUG\n        int num_iters = 10;\n#else\n        int num_iters = 100;\n#endif\n        for (int i = 0; i < num_iters; i++) {\n            TestBackendWork::initBarrier(p);\n            utils::NativeParallelFor( p, TestBackendWork(backend) );\n        }\n    }\n\n    BlockI *block = backend->getSlabBlock(1);\n    REQUIRE_MESSAGE(block, \"Memory was not allocated\");\n    backend->putSlabBlock(block);\n\n    // Checks if the backend increases and decreases the amount of allocated memory when memory is allocated.\n    const size_t memSize0 = backend->getTotalMemSize();\n    LargeMemoryBlock *lmb = backend->getLargeBlock(4*MByte);\n    REQUIRE( lmb );\n\n    const size_t memSize1 = backend->getTotalMemSize();\n    REQUIRE_MESSAGE( (intptr_t)(memSize1-memSize0) >= 4*MByte, \"The backend has not increased the amount of using memory.\" );\n\n    backend->putLargeBlock(lmb);\n    const size_t memSize2 = backend->getTotalMemSize();\n    REQUIRE_MESSAGE( memSize2 == memSize0, \"The backend has not decreased the amount of using memory.\" );\n\n    pool_destroy(mPool);\n}\n\nvoid TestBitMask()\n{\n    BitMaskMin<256> mask;\n\n    mask.reset();\n    mask.set(10, 1);\n    mask.set(5, 1);\n    mask.set(1, 1);\n    REQUIRE(mask.getMinTrue(2) == 5);\n\n    mask.reset();\n    mask.set(0, 1);\n    mask.set(64, 1);\n    mask.set(63, 1);\n    mask.set(200, 1);\n    mask.set(255, 1);\n    REQUIRE(mask.getMinTrue(0) == 0);\n    REQUIRE(mask.getMinTrue(1) == 63);\n    REQUIRE(mask.getMinTrue(63) == 63);\n    REQUIRE(mask.getMinTrue(64) == 64);\n    REQUIRE(mask.getMinTrue(101) == 200);\n    REQUIRE(mask.getMinTrue(201) == 255);\n    mask.set(255, 0);\n    REQUIRE(mask.getMinTrue(201) == -1);\n}\n\nsize_t getMemSize()\n{\n    return defaultMemPool->extMemPool.backend.getTotalMemSize();\n}\n\nclass CheckNotCached {\n    static size_t memSize;\npublic:\n    void operator() () const {\n        int res = scalable_allocation_mode(TBBMALLOC_SET_SOFT_HEAP_LIMIT, 1);\n        REQUIRE(res == TBBMALLOC_OK);\n        if (memSize==(size_t)-1) {\n            memSize = getMemSize();\n        } else {\n            REQUIRE(getMemSize() == memSize);\n            memSize=(size_t)-1;\n        }\n    }\n};\n\nsize_t CheckNotCached::memSize = (size_t)-1;\n\nclass RunTestHeapLimit: public SimpleBarrier {\npublic:\n    void operator()( int /*mynum*/ ) const {\n        // Provoke bootstrap heap initialization before recording memory size.\n        // NOTE: The initialization should be processed only with a \"large\"\n        // object. Since the \"small\" object allocation lead to blocking of a\n        // slab as an active block and it is impossible to release it with\n        // foreign thread.\n        scalable_free(scalable_malloc(minLargeObjectSize));\n        barrier.wait(CheckNotCached());\n        for (size_t n = minLargeObjectSize; n < 5*1024*1024; n += 128*1024)\n            scalable_free(scalable_malloc(n));\n        barrier.wait(CheckNotCached());\n    }\n};\n\nvoid TestHeapLimit()\n{\n    if(!isMallocInitialized()) doInitialization();\n    // tiny limit to stop caching\n    int res = scalable_allocation_mode(TBBMALLOC_SET_SOFT_HEAP_LIMIT, 1);\n    REQUIRE(res == TBBMALLOC_OK);\n     // Provoke bootstrap heap initialization before recording memory size.\n    scalable_free(scalable_malloc(8));\n    size_t n, sizeBefore = getMemSize();\n\n    // Try to provoke call to OS for memory to check that\n    // requests are not fulfilled from caches.\n    // Single call is not enough here because of backend fragmentation.\n    for (n = minLargeObjectSize; n < 10*1024*1024; n += 16*1024) {\n        void *p = scalable_malloc(n);\n        bool leave = (sizeBefore != getMemSize());\n        scalable_free(p);\n        if (leave)\n            break;\n        REQUIRE_MESSAGE(sizeBefore == getMemSize(), \"No caching expected\");\n    }\n    REQUIRE_MESSAGE(n < 10*1024*1024, \"scalable_malloc doesn't provoke OS request for memory, \"\n           \"is some internal cache still used?\");\n\n    for( int p=MaxThread; p>=MinThread; --p ) {\n        RunTestHeapLimit::initBarrier( p );\n        utils::NativeParallelFor( p, RunTestHeapLimit() );\n    }\n    // it's try to match limit as well as set limit, so call here\n    res = scalable_allocation_mode(TBBMALLOC_SET_SOFT_HEAP_LIMIT, 1);\n    REQUIRE(res == TBBMALLOC_OK);\n    size_t m = getMemSize();\n    REQUIRE(sizeBefore == m);\n    // restore default\n    res = scalable_allocation_mode(TBBMALLOC_SET_SOFT_HEAP_LIMIT, 0);\n    REQUIRE(res == TBBMALLOC_OK);\n}\n\nvoid checkNoHugePages()\n{\n    REQUIRE_MESSAGE(!hugePages.isEnabled, \"scalable_allocation_mode \"\n           \"must have priority over environment variable\");\n}\n\n/*---------------------------------------------------------------------------*/\n// The regression test against bugs in TBBMALLOC_CLEAN_ALL_BUFFERS allocation command.\n// The idea is to allocate and deallocate a set of objects randomly in parallel.\n// For large sizes (16K), it forces conflicts in backend during coalescing.\n// For small sizes (4K), it forces cross-thread deallocations and then orphaned slabs.\n// Global cleanup should process orphaned slabs and the queue of postponed coalescing\n// requests, otherwise it will not be able to unmap all unused memory.\n\nconst int num_allocs = 10*1024;\nvoid *ptrs[num_allocs];\nstd::atomic<int> alloc_counter;\nstatic thread_local bool free_was_called = false;\n\ninline void multiThreadAlloc(size_t alloc_size) {\n    for( int i = alloc_counter++; i < num_allocs; i = alloc_counter++ ) {\n       ptrs[i] = scalable_malloc( alloc_size );\n       REQUIRE_MESSAGE( ptrs[i] != nullptr, \"scalable_malloc returned zero.\" );\n    }\n}\ninline void crossThreadDealloc() {\n    free_was_called = false;\n    for( int i = --alloc_counter; i >= 0; i = --alloc_counter ) {\n        if (i < num_allocs) {\n            scalable_free(ptrs[i]);\n            free_was_called = true;\n        }\n    }\n}\n\ntemplate<int AllocSize>\nstruct TestCleanAllBuffersBody : public SimpleBarrier {\n    void operator() ( int ) const {\n        barrier.wait();\n        multiThreadAlloc(AllocSize);\n        barrier.wait();\n        crossThreadDealloc();\n    }\n};\n\ntemplate<int AllocSize>\nvoid TestCleanAllBuffers() {\n    const int num_threads = 8;\n    // Clean up if something was allocated before the test\n    scalable_allocation_command(TBBMALLOC_CLEAN_ALL_BUFFERS,nullptr);\n\n    size_t memory_in_use_before = getMemSize();\n    alloc_counter = 0;\n    TestCleanAllBuffersBody<AllocSize>::initBarrier(num_threads);\n\n    utils::NativeParallelFor(num_threads, TestCleanAllBuffersBody<AllocSize>());\n    // TODO: reproduce the bug conditions more reliably\n    if ( defaultMemPool->extMemPool.backend.coalescQ.blocksToFree.load(std::memory_order_relaxed) == nullptr ) {\n        INFO( \"Warning: The queue of postponed coalescing requests is empty. \");\n        INFO( \"Unable to create the condition for bug reproduction.\\n\" );\n    }\n    int result = scalable_allocation_command(TBBMALLOC_CLEAN_ALL_BUFFERS,nullptr);\n    REQUIRE_MESSAGE( result == TBBMALLOC_OK, \"The cleanup request has not cleaned anything.\" );\n    size_t memory_in_use_after = getMemSize();\n\n    size_t memory_leak = memory_in_use_after - memory_in_use_before;\n    INFO( \"memory_in_use_before = \" <<  memory_in_use_before << \", memory_in_use_after = \" << memory_in_use_after << \"\\n\" );\n    REQUIRE_MESSAGE( memory_leak == 0, \"Cleanup was unable to release all allocated memory.\" );\n}\n\n//! Force cross thread deallocation of small objects to create a set of privatizable slab blocks.\n//! TBBMALLOC_CLEAN_THREAD_BUFFERS command have to privatize all the block.\nstruct TestCleanThreadBuffersBody : public SimpleBarrier {\n    void operator() ( int ) const {\n        barrier.wait();\n        multiThreadAlloc(2*1024);\n        barrier.wait();\n        crossThreadDealloc();\n        barrier.wait();\n        int result = scalable_allocation_command(TBBMALLOC_CLEAN_THREAD_BUFFERS,nullptr);\n        if (result != TBBMALLOC_OK && free_was_called) {\n            REPORT(\"Warning: clean-up request for this particular thread has not cleaned anything.\");\n        }\n\n        // Check that TLS was cleaned fully\n        TLSData *tlsCurr = defaultMemPool->getTLS(/*create=*/false);\n        if (tlsCurr) {\n            for (int i = 0; i < numBlockBinLimit; i++) {\n                REQUIRE_MESSAGE(!(tlsCurr->bin[i].activeBlk), \"Some bin was not cleaned.\");\n            }\n            REQUIRE_MESSAGE(!(tlsCurr->lloc.head.load(std::memory_order_relaxed)), \"Local LOC was not cleaned.\");\n            REQUIRE_MESSAGE(!(tlsCurr->freeSlabBlocks.head.load(std::memory_order_relaxed)), \"Free Block pool was not cleaned.\");\n        }\n    }\n};\n\nvoid TestCleanThreadBuffers() {\n    const int num_threads = 8;\n    // Clean up if something was allocated before the test\n    scalable_allocation_command(TBBMALLOC_CLEAN_ALL_BUFFERS,nullptr);\n\n    alloc_counter = 0;\n    TestCleanThreadBuffersBody::initBarrier(num_threads);\n    utils::NativeParallelFor(num_threads, TestCleanThreadBuffersBody());\n}\n\n/*---------------------------------------------------------------------------*/\n/*------------------------- Large Object Cache tests ------------------------*/\n#if _MSC_VER==1600 || _MSC_VER==1500\n    // ignore C4275: non dll-interface class 'stdext::exception' used as\n    // base for dll-interface class 'std::bad_cast'\n    #pragma warning (disable: 4275)\n#endif\n#include <vector>\n#include <list>\n\n// default constructor of CacheBin\ntemplate<typename Props>\nrml::internal::LargeObjectCacheImpl<Props>::CacheBin::CacheBin() {}\n\ntemplate<typename Props>\nclass CacheBinModel {\n\n    typedef typename rml::internal::LargeObjectCacheImpl<Props>::CacheBin CacheBinType;\n\n    // The emulated cache bin.\n    CacheBinType cacheBinModel;\n    // The reference to real cache bin inside the large object cache.\n    CacheBinType &cacheBin;\n\n    const size_t size;\n\n    // save only current time\n    std::list<uintptr_t> objects;\n\n    void doCleanup() {\n        if ( cacheBinModel.cachedSize.load(std::memory_order_relaxed) >\n            Props::TooLargeFactor*cacheBinModel.usedSize.load(std::memory_order_relaxed)) tooLargeLOC++;\n        else tooLargeLOC = 0;\n\n        intptr_t threshold = cacheBinModel.ageThreshold.load(std::memory_order_relaxed);\n        if (tooLargeLOC > 3 && threshold) {\n            threshold = (threshold + cacheBinModel.meanHitRange.load(std::memory_order_relaxed)) / 2;\n            cacheBinModel.ageThreshold.store(threshold, std::memory_order_relaxed);\n        }\n\n        uintptr_t currTime = cacheCurrTime;\n        while (!objects.empty() && (intptr_t)(currTime - objects.front()) > threshold) {\n            cacheBinModel.cachedSize.store(cacheBinModel.cachedSize.load(std::memory_order_relaxed) - size, std::memory_order_relaxed);\n            cacheBinModel.lastCleanedAge = objects.front();\n            objects.pop_front();\n        }\n\n        cacheBinModel.oldest.store(objects.empty() ? 0 : objects.front(), std::memory_order_relaxed);\n    }\n\npublic:\n    CacheBinModel(CacheBinType &_cacheBin, size_t allocSize) : cacheBin(_cacheBin), size(allocSize) {\n        cacheBinModel.oldest.store(cacheBin.oldest.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        cacheBinModel.lastCleanedAge = cacheBin.lastCleanedAge;\n        cacheBinModel.ageThreshold.store(cacheBin.ageThreshold.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        cacheBinModel.usedSize.store(cacheBin.usedSize.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        cacheBinModel.cachedSize.store(cacheBin.cachedSize.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        cacheBinModel.meanHitRange.store(cacheBin.meanHitRange.load(std::memory_order_relaxed), std::memory_order_relaxed);\n        cacheBinModel.lastGet = cacheBin.lastGet;\n    }\n    void get() {\n        uintptr_t currTime = ++cacheCurrTime;\n\n        if ( objects.empty() ) {\n            const uintptr_t sinceLastGet = currTime - cacheBinModel.lastGet;\n            intptr_t threshold = cacheBinModel.ageThreshold.load(std::memory_order_relaxed);\n            if ((threshold && sinceLastGet > Props::LongWaitFactor * threshold) ||\n                (cacheBinModel.lastCleanedAge && sinceLastGet > Props::LongWaitFactor * (cacheBinModel.lastCleanedAge - cacheBinModel.lastGet))) {\n                cacheBinModel.lastCleanedAge = 0;\n                cacheBinModel.ageThreshold.store(0, std::memory_order_relaxed);\n            }\n\n            if (cacheBinModel.lastCleanedAge)\n                cacheBinModel.ageThreshold.store(Props::OnMissFactor * (currTime - cacheBinModel.lastCleanedAge), std::memory_order_relaxed);\n        } else {\n            uintptr_t obj_age = objects.back();\n            objects.pop_back();\n            if (objects.empty()) cacheBinModel.oldest.store(0, std::memory_order_relaxed);\n\n            intptr_t hitRange = currTime - obj_age;\n            intptr_t mean = cacheBinModel.meanHitRange.load(std::memory_order_relaxed);\n            mean = mean ? (mean + hitRange) / 2 : hitRange;\n            cacheBinModel.meanHitRange.store(mean, std::memory_order_relaxed);\n\n            cacheBinModel.cachedSize.store(cacheBinModel.cachedSize.load(std::memory_order_relaxed) - size, std::memory_order_relaxed);\n        }\n\n        cacheBinModel.usedSize.store(cacheBinModel.usedSize.load(std::memory_order_relaxed) + size, std::memory_order_relaxed);\n        cacheBinModel.lastGet = currTime;\n\n        if ( currTime % rml::internal::cacheCleanupFreq == 0 ) doCleanup();\n    }\n\n    void putList( int num ) {\n        uintptr_t currTime = cacheCurrTime;\n        cacheCurrTime += num;\n\n        cacheBinModel.usedSize.store(cacheBinModel.usedSize.load(std::memory_order_relaxed) - num * size, std::memory_order_relaxed);\n\n        bool cleanUpNeeded = false;\n        if ( !cacheBinModel.lastCleanedAge ) {\n            cacheBinModel.lastCleanedAge = ++currTime;\n            cleanUpNeeded |= currTime % rml::internal::cacheCleanupFreq == 0;\n            num--;\n        }\n\n        for ( int i=1; i<=num; ++i ) {\n            currTime+=1;\n            cleanUpNeeded |= currTime % rml::internal::cacheCleanupFreq == 0;\n            if (objects.empty())\n                cacheBinModel.oldest.store(currTime, std::memory_order_relaxed);\n            objects.push_back(currTime);\n        }\n\n        cacheBinModel.cachedSize.store(cacheBinModel.cachedSize.load(std::memory_order_relaxed) + num * size, std::memory_order_relaxed);\n\n        if ( cleanUpNeeded ) doCleanup();\n    }\n\n    void check() {\n        CHECK_FAST(cacheBinModel.oldest.load(std::memory_order_relaxed) == cacheBin.oldest.load(std::memory_order_relaxed));\n        CHECK_FAST(cacheBinModel.lastCleanedAge == cacheBin.lastCleanedAge);\n        CHECK_FAST(cacheBinModel.ageThreshold.load(std::memory_order_relaxed) == cacheBin.ageThreshold.load(std::memory_order_relaxed));\n        CHECK_FAST(cacheBinModel.usedSize.load(std::memory_order_relaxed) == cacheBin.usedSize.load(std::memory_order_relaxed));\n        CHECK_FAST(cacheBinModel.cachedSize.load(std::memory_order_relaxed) == cacheBin.cachedSize.load(std::memory_order_relaxed));\n        CHECK_FAST(cacheBinModel.meanHitRange.load(std::memory_order_relaxed) == cacheBin.meanHitRange.load(std::memory_order_relaxed));\n        CHECK_FAST(cacheBinModel.lastGet == cacheBin.lastGet);\n    }\n\n    static uintptr_t cacheCurrTime;\n    static intptr_t tooLargeLOC;\n};\n\ntemplate<typename Props> uintptr_t CacheBinModel<Props>::cacheCurrTime;\ntemplate<typename Props> intptr_t CacheBinModel<Props>::tooLargeLOC;\n\ntemplate <typename Scenario>\nvoid LOCModelTester() {\n    defaultMemPool->extMemPool.loc.cleanAll();\n    defaultMemPool->extMemPool.loc.reset();\n\n    const size_t size = 16 * 1024;\n    const size_t headersSize = sizeof(rml::internal::LargeMemoryBlock)+sizeof(rml::internal::LargeObjectHdr);\n    const size_t allocationSize = LargeObjectCache::alignToBin(size+headersSize+rml::internal::largeObjectAlignment);\n    const int binIdx = defaultMemPool->extMemPool.loc.largeCache.sizeToIdx( allocationSize );\n\n    CacheBinModel<rml::internal::LargeObjectCache::LargeCacheTypeProps>::cacheCurrTime = defaultMemPool->extMemPool.loc.cacheCurrTime;\n    CacheBinModel<rml::internal::LargeObjectCache::LargeCacheTypeProps>::tooLargeLOC = defaultMemPool->extMemPool.loc.largeCache.tooLargeLOC;\n    CacheBinModel<rml::internal::LargeObjectCache::LargeCacheTypeProps> cacheBinModel(defaultMemPool->extMemPool.loc.largeCache.bin[binIdx], allocationSize);\n\n    Scenario scen;\n    for (rml::internal::LargeMemoryBlock *lmb = scen.next(); (intptr_t)lmb != (intptr_t)-1; lmb = scen.next()) {\n        if ( lmb ) {\n            int num=1;\n            for (rml::internal::LargeMemoryBlock *curr = lmb; curr->next; curr=curr->next) num+=1;\n            defaultMemPool->extMemPool.freeLargeObject(lmb);\n            cacheBinModel.putList(num);\n        } else {\n            scen.saveLmb(defaultMemPool->extMemPool.mallocLargeObject(defaultMemPool, allocationSize));\n            cacheBinModel.get();\n        }\n\n        cacheBinModel.check();\n    }\n}\n\nclass TestBootstrap {\n    bool allocating;\n    std::vector<rml::internal::LargeMemoryBlock*> lmbArray;\npublic:\n    TestBootstrap() : allocating(true) {}\n\n    rml::internal::LargeMemoryBlock* next() {\n        if ( allocating )\n            return nullptr;\n        if ( !lmbArray.empty() ) {\n            rml::internal::LargeMemoryBlock *ret = lmbArray.back();\n            lmbArray.pop_back();\n            return ret;\n        }\n        return (rml::internal::LargeMemoryBlock*)-1;\n    }\n\n    void saveLmb( rml::internal::LargeMemoryBlock *lmb ) {\n        lmb->next = nullptr;\n        lmbArray.push_back(lmb);\n        if ( lmbArray.size() == 1000 ) allocating = false;\n    }\n};\n\nclass TestRandom {\n    std::vector<rml::internal::LargeMemoryBlock*> lmbArray;\n    int numOps;\npublic:\n    TestRandom() : numOps(100000) {\n        srand(1234);\n    }\n\n    rml::internal::LargeMemoryBlock* next() {\n        if ( numOps-- ) {\n            if ( lmbArray.empty() || rand() / (RAND_MAX>>1) == 0 )\n                return nullptr;\n            size_t ind = rand()%lmbArray.size();\n            if ( ind != lmbArray.size()-1 ) std::swap(lmbArray[ind],lmbArray[lmbArray.size()-1]);\n            rml::internal::LargeMemoryBlock *lmb = lmbArray.back();\n            lmbArray.pop_back();\n            return lmb;\n        }\n        return (rml::internal::LargeMemoryBlock*)-1;\n    }\n\n    void saveLmb( rml::internal::LargeMemoryBlock *lmb ) {\n        lmb->next = nullptr;\n        lmbArray.push_back(lmb);\n    }\n};\n\nclass TestCollapsingMallocFree : public SimpleBarrier {\npublic:\n    static const int NUM_ALLOCS = 100000;\n    const int num_threads;\n\n    TestCollapsingMallocFree( int _num_threads ) : num_threads(_num_threads) {\n        initBarrier( num_threads );\n    }\n\n    void operator() ( int ) const {\n        const size_t size = 16 * 1024;\n        const size_t headersSize = sizeof(rml::internal::LargeMemoryBlock)+sizeof(rml::internal::LargeObjectHdr);\n        const size_t allocationSize = LargeObjectCache::alignToBin(size+headersSize+rml::internal::largeObjectAlignment);\n\n        barrier.wait();\n        for ( int i=0; i<NUM_ALLOCS; ++i ) {\n            defaultMemPool->extMemPool.freeLargeObject(\n                defaultMemPool->extMemPool.mallocLargeObject(defaultMemPool, allocationSize) );\n        }\n    }\n\n    void check() {\n        REQUIRE( tbbmalloc_whitebox::locGetProcessed == tbbmalloc_whitebox::locPutProcessed);\n        REQUIRE_MESSAGE( tbbmalloc_whitebox::locGetProcessed < num_threads*NUM_ALLOCS, \"No one Malloc/Free pair was collapsed.\" );\n    }\n};\n\nclass TestCollapsingBootstrap : public SimpleBarrier {\n    class CheckNumAllocs {\n        const int num_threads;\n    public:\n        CheckNumAllocs( int _num_threads ) : num_threads(_num_threads) {}\n        void operator()() const {\n            REQUIRE( tbbmalloc_whitebox::locGetProcessed == num_threads*NUM_ALLOCS );\n            REQUIRE( tbbmalloc_whitebox::locPutProcessed == 0 );\n        }\n    };\npublic:\n    static const int NUM_ALLOCS = 1000;\n    const int num_threads;\n\n    TestCollapsingBootstrap( int _num_threads ) : num_threads(_num_threads) {\n        initBarrier( num_threads );\n    }\n\n    void operator() ( int ) const {\n        const size_t size = 16 * 1024;\n        size_t headersSize = sizeof(rml::internal::LargeMemoryBlock)+sizeof(rml::internal::LargeObjectHdr);\n        size_t allocationSize = LargeObjectCache::alignToBin(size+headersSize+rml::internal::largeObjectAlignment);\n\n        barrier.wait();\n        rml::internal::LargeMemoryBlock *lmbArray[NUM_ALLOCS];\n        for ( int i=0; i<NUM_ALLOCS; ++i )\n            lmbArray[i] = defaultMemPool->extMemPool.mallocLargeObject(defaultMemPool, allocationSize);\n\n        barrier.wait(CheckNumAllocs(num_threads));\n        for ( int i=0; i<NUM_ALLOCS; ++i )\n            defaultMemPool->extMemPool.freeLargeObject( lmbArray[i] );\n    }\n\n    void check() {\n        REQUIRE( tbbmalloc_whitebox::locGetProcessed == tbbmalloc_whitebox::locPutProcessed );\n        REQUIRE( tbbmalloc_whitebox::locGetProcessed == num_threads*NUM_ALLOCS );\n    }\n};\n\ntemplate <typename Scenario>\nvoid LOCCollapsingTester( int num_threads ) {\n    tbbmalloc_whitebox::locGetProcessed = 0;\n    tbbmalloc_whitebox::locPutProcessed = 0;\n    defaultMemPool->extMemPool.loc.cleanAll();\n    defaultMemPool->extMemPool.loc.reset();\n\n    Scenario scen(num_threads);\n    utils::NativeParallelFor(num_threads, scen);\n\n    scen.check();\n}\n\nvoid TestLOC() {\n    LOCModelTester<TestBootstrap>();\n    LOCModelTester<TestRandom>();\n\n    const int num_threads = 16;\n    LOCCollapsingTester<TestCollapsingBootstrap>( num_threads );\n    if ( num_threads > 1 ) {\n        INFO( \"num_threads = \" << num_threads );\n        LOCCollapsingTester<TestCollapsingMallocFree>( num_threads );\n    } else {\n        REPORT( \"Warning: concurrency is too low for TestMallocFreeCollapsing ( num_threads = %d )\\n\", num_threads );\n    }\n}\n/*---------------------------------------------------------------------------*/\n\nvoid *findCacheLine(void *p) {\n    return (void*)alignDown((uintptr_t)p, estimatedCacheLineSize);\n}\n\n// test that internals of Block are at expected cache lines\nvoid TestSlabAlignment() {\n    const size_t min_sz = 8;\n    const int space = 2*16*1024; // fill at least 2 slabs\n    void *pointers[space / min_sz];  // the worst case is min_sz byte object\n\n    for (size_t sz = min_sz; sz <= 64; sz *= 2) {\n        for (size_t i = 0; i < space/sz; i++) {\n            pointers[i] = scalable_malloc(sz);\n            Block *block = (Block *)alignDown(pointers[i], slabSize);\n            REQUIRE_MESSAGE(findCacheLine(&block->isFull) != findCacheLine(pointers[i]),\n                          \"A user object must not share a cache line with slab control structures.\");\n            REQUIRE_MESSAGE(findCacheLine(&block->next) != findCacheLine(&block->nextPrivatizable),\n                          \"GlobalBlockFields and LocalBlockFields must be on different cache lines.\");\n        }\n        for (size_t i = 0; i < space/sz; i++)\n            scalable_free(pointers[i]);\n    }\n}\n\n#include \"common/memory_usage.h\"\n\n// TODO: Consider adding Huge Pages support on macOS (special mmap flag).\n// Transparent Huge pages support could be enabled by different system parsing mechanism,\n// because there is no /proc/meminfo on macOS\n#if __unix__\nvoid TestTHP() {\n    // Get backend from default memory pool\n    rml::internal::Backend *backend = &(defaultMemPool->extMemPool.backend);\n\n    // Configure malloc to use huge pages\n    scalable_allocation_mode(USE_HUGE_PAGES, 1);\n    REQUIRE_MESSAGE(hugePages.isEnabled, \"Huge pages should be enabled via scalable_allocation_mode\");\n\n#if defined __loongarch64\n    const int HUGE_PAGE_SIZE = 32 * 1024 * 1024;\n#else\n    const int HUGE_PAGE_SIZE = 2 * 1024 * 1024;\n#endif\n\n    // allocCount transparent huge pages should be allocated\n    const int allocCount = 10;\n\n    // Allocate huge page aligned memory regions to track system\n    // counters for transparent huge pages\n    void*  allocPtrs[allocCount];\n\n    // Wait for the system to update process memory info files after other tests\n    utils::Sleep(4000);\n\n    // Parse system info regarding current THP status\n    size_t currentSystemTHPCount = utils::getSystemTHPCount();\n    size_t currentSystemTHPAllocatedSize = utils::getSystemTHPAllocatedSize();\n\n    for (int i = 0; i < allocCount; i++) {\n        // Allocation size have to be aligned on page size\n        size_t allocSize = HUGE_PAGE_SIZE - (i * 1000);\n\n        // Map memory\n        allocPtrs[i] = backend->allocRawMem(allocSize);\n\n        REQUIRE_MESSAGE(allocPtrs[i], \"Allocation not succeeded.\");\n        REQUIRE_MESSAGE(allocSize == HUGE_PAGE_SIZE,\n            \"Allocation size have to be aligned on Huge Page size internally.\");\n\n        // First touch policy - no real pages allocated by OS without accessing the region\n        memset(allocPtrs[i], 1, allocSize);\n\n        REQUIRE_MESSAGE(isAligned(allocPtrs[i], HUGE_PAGE_SIZE),\n            \"The pointer returned by scalable_malloc is not aligned on huge page size.\");\n    }\n\n    // Wait for the system to update process memory info files after allocations\n    utils::Sleep(4000);\n\n    // Generally, kernel tries to allocate transparent huge pages, but sometimes it cannot do this\n    // (tested on SLES 11/12), so consider this system info checks as a remark.\n    // Also, some systems can allocate more memory then needed in background (tested on Ubuntu 14.04)\n    size_t newSystemTHPCount = utils::getSystemTHPCount();\n    size_t newSystemTHPAllocatedSize = utils::getSystemTHPAllocatedSize();\n    if ((newSystemTHPCount - currentSystemTHPCount) < allocCount\n            && (newSystemTHPAllocatedSize - currentSystemTHPAllocatedSize) / (2 * 1024) < allocCount) {\n        REPORT( \"Warning: the system didn't allocate needed amount of THPs.\\n\" );\n    }\n\n    // Test memory unmap\n    for (int i = 0; i < allocCount; i++) {\n        REQUIRE_MESSAGE(backend->freeRawMem(allocPtrs[i], HUGE_PAGE_SIZE),\n                \"Something went wrong during raw memory free\");\n    }\n}\n#endif // __unix__\n\ninline size_t getStabilizedMemUsage() {\n    for (int i = 0; i < 3; i++) utils::GetMemoryUsage();\n    return utils::GetMemoryUsage();\n}\n\ninline void* reallocAndRetrieve(void* origPtr, size_t reallocSize, size_t& origBlockSize, size_t& reallocBlockSize) {\n    rml::internal::LargeMemoryBlock* origLmb = ((rml::internal::LargeObjectHdr *)origPtr - 1)->memoryBlock;\n    origBlockSize = origLmb->unalignedSize;\n\n    void* reallocPtr = rml::internal::reallocAligned(defaultMemPool, origPtr, reallocSize, 0);\n\n    // Retrieved reallocated block information\n    rml::internal::LargeMemoryBlock* reallocLmb = ((rml::internal::LargeObjectHdr *)reallocPtr - 1)->memoryBlock;\n    reallocBlockSize = reallocLmb->unalignedSize;\n\n    return reallocPtr;\n}\n\nvoid TestReallocDecreasing() {\n\n    /* Testing that actual reallocation happens for large objects that do not fit the backend cache\n       but decrease in size by a factor of >= 2. */\n\n    size_t startSize = 100 * 1024 * 1024;\n    size_t maxBinnedSize = defaultMemPool->extMemPool.backend.getMaxBinnedSize();\n    void*  origPtr = scalable_malloc(startSize);\n    void*  reallocPtr = nullptr;\n\n    // Realloc on 1MB less size\n    size_t origBlockSize = 42;\n    size_t reallocBlockSize = 43;\n    reallocPtr = reallocAndRetrieve(origPtr, startSize - 1 * 1024 * 1024, origBlockSize, reallocBlockSize);\n    REQUIRE_MESSAGE(origBlockSize == reallocBlockSize, \"Reallocated block size shouldn't change\");\n    REQUIRE_MESSAGE(reallocPtr == origPtr, \"Original pointer shouldn't change\");\n\n    // Repeated decreasing reallocation while max cache bin size reached\n    size_t reallocSize = (startSize / 2) - 1000; // exact realloc\n    while(reallocSize > maxBinnedSize) {\n\n        // Prevent huge/large objects caching\n        defaultMemPool->extMemPool.loc.cleanAll();\n        // Prevent local large object caching\n        TLSData *tls = defaultMemPool->getTLS(/*create=*/false);\n        tls->lloc.externalCleanup(&defaultMemPool->extMemPool);\n\n        size_t sysMemUsageBefore = getStabilizedMemUsage();\n        size_t totalMemSizeBefore = defaultMemPool->extMemPool.backend.getTotalMemSize();\n\n        reallocPtr = reallocAndRetrieve(origPtr, reallocSize, origBlockSize, reallocBlockSize);\n\n        REQUIRE_MESSAGE(origBlockSize > reallocBlockSize, \"Reallocated block size should decrease.\");\n\n        size_t sysMemUsageAfter = getStabilizedMemUsage();\n        size_t totalMemSizeAfter = defaultMemPool->extMemPool.backend.getTotalMemSize();\n\n        // Prevent false checking when backend caching occurred or could not read system memory usage info\n        if (totalMemSizeBefore > totalMemSizeAfter && sysMemUsageAfter != 0 && sysMemUsageBefore != 0) {\n            REQUIRE_MESSAGE(sysMemUsageBefore > sysMemUsageAfter, \"Memory were not released\");\n        }\n\n        origPtr = reallocPtr;\n        reallocSize = (reallocSize / 2) - 1000; // exact realloc\n    }\n    scalable_free(reallocPtr);\n\n    /* TODO: Decreasing reallocation of large objects that fit backend cache */\n    /* TODO: Small objects decreasing reallocation test */\n}\n#if !__TBB_WIN8UI_SUPPORT && defined(_WIN32)\n\n#include \"../../src/tbbmalloc_proxy/function_replacement.cpp\"\n#include <string>\nnamespace FunctionReplacement {\n    FunctionInfo funcInfo = { \"funcname\",\"dllname\" };\n    char **func_replacement_log;\n    int status;\n\n    void LogCleanup() {\n        // Free all allocated memory\n        for (unsigned i = 0; i < Log::record_number; i++){\n            HeapFree(GetProcessHeap(), 0, Log::records[i]);\n        }\n        for (unsigned i = 0; i < Log::RECORDS_COUNT + 1; i++){\n            Log::records[i] = nullptr;\n        }\n        Log::replacement_status = true;\n        Log::record_number = 0;\n    }\n\n    void TestEmptyLog() {\n        status = TBB_malloc_replacement_log(&func_replacement_log);\n\n        REQUIRE_MESSAGE(status == -1, \"Status is true, but log is empty\");\n        REQUIRE_MESSAGE(*func_replacement_log == nullptr, \"Log must be empty\");\n    }\n\n    void TestLogOverload() {\n        for (int i = 0; i < 1000; i++)\n            Log::record(funcInfo, \"opcode string\", true);\n\n        status = TBB_malloc_replacement_log(&func_replacement_log);\n        // Find last record\n        for (; *(func_replacement_log + 1) != 0; func_replacement_log++) {}\n\n        std::string last_line(*func_replacement_log);\n        REQUIRE_MESSAGE(status == 0, \"False status, but all functions found\");\n        REQUIRE_MESSAGE(last_line.compare(\"Log was truncated.\") == 0, \"Log overflow was not handled\");\n\n        // Change status\n        Log::record(funcInfo, \"opcode string\", false);\n        status = TBB_malloc_replacement_log(nullptr);\n        REQUIRE_MESSAGE(status == -1, \"Status is true, but we have false search case\");\n\n        LogCleanup();\n    }\n\n    void TestFalseSearchCase() {\n        Log::record(funcInfo, \"opcode string\", false);\n        std::string expected_line = \"Fail: \"+ std::string(funcInfo.funcName) + \" (\" +\n                         std::string(funcInfo.dllName) + \"), byte pattern: <opcode string>\";\n\n        status = TBB_malloc_replacement_log(&func_replacement_log);\n\n        REQUIRE_MESSAGE(expected_line.compare(*func_replacement_log) == 0, \"Wrong last string contnent\");\n        REQUIRE_MESSAGE(status == -1, \"Status is true, but we have false search case\");\n        LogCleanup();\n    }\n\n    void TestWrongFunctionInDll(){\n        HMODULE ucrtbase_handle = GetModuleHandle(\"ucrtbase.dll\");\n        if (ucrtbase_handle) {\n            IsPrologueKnown(\"ucrtbase.dll\", \"fake_function\", nullptr, ucrtbase_handle);\n            std::string expected_line = \"Fail: fake_function (ucrtbase.dll), byte pattern: <unknown>\";\n\n            status = TBB_malloc_replacement_log(&func_replacement_log);\n\n            REQUIRE_MESSAGE(expected_line.compare(*func_replacement_log) == 0, \"Wrong last string contnent\");\n            REQUIRE_MESSAGE(status == -1, \"Status is true, but we have false search case\");\n            LogCleanup();\n        } else {\n            INFO(\"Cannot found ucrtbase.dll on system, test skipped!\\n\");\n        }\n    }\n}\n\nvoid TesFunctionReplacementLog() {\n    using namespace FunctionReplacement;\n    // Do not reorder the test cases\n    TestEmptyLog();\n    TestLogOverload();\n    TestFalseSearchCase();\n    TestWrongFunctionInDll();\n}\n\n#endif /*!__TBB_WIN8UI_SUPPORT && defined(_WIN32)*/\n\n#include <cmath> // pow function\n\n// Huge objects cache: Size = MinSize * (2 ^ (Index / StepFactor) formula gives value for the bin size,\n// but it is not matched with our sizeToIdx approximation algorithm, where step sizes between major\n// (power of 2) sizes are equal. Used internally for the test. Static cast to avoid warnings.\ninline size_t hocIdxToSizeFormula(int idx) {\n    return static_cast<size_t>(float(rml::internal::LargeObjectCache::maxLargeSize) *\n        pow(2, float(idx) / float(rml::internal::LargeObjectCache::HugeBSProps::StepFactor)));\n}\n// Large objects cache arithmetic progression\ninline size_t locIdxToSizeFormula(int idx) {\n    return rml::internal::LargeObjectCache::LargeBSProps::MinSize +\n        (idx * rml::internal::LargeObjectCache::LargeBSProps::CacheStep);\n}\n\ntemplate <typename CacheType>\nvoid TestLOCacheBinsConverterImpl(int idx, size_t checkingSize) {\n    size_t alignedSize = CacheType::alignToBin(checkingSize);\n    REQUIRE_MESSAGE(alignedSize >= checkingSize, \"Size is not correctly aligned\");\n    int calcIdx = CacheType::sizeToIdx(alignedSize);\n    REQUIRE_MESSAGE(calcIdx == idx, \"Index from size calculated not correctly\");\n}\n\nvoid TestLOCacheBinsConverter(){\n    typedef rml::internal::LargeObjectCache::LargeCacheType LargeCacheType;\n    typedef rml::internal::LargeObjectCache::HugeCacheType HugeCacheType;\n\n    size_t checkingSize = 0;\n    for (int idx = 0; idx < LargeCacheType::numBins; idx++) {\n        checkingSize = locIdxToSizeFormula(idx);\n        TestLOCacheBinsConverterImpl<LargeCacheType>(idx, checkingSize);\n    }\n    for (int idx = 0; idx < HugeCacheType::numBins; idx++) {\n        checkingSize = hocIdxToSizeFormula(idx);\n        TestLOCacheBinsConverterImpl<HugeCacheType>(idx, checkingSize);\n    }\n}\n\nstruct HOThresholdTester {\n    LargeObjectCache* loc;\n    size_t hugeSize;\n\n    static const size_t sieveSize = LargeObjectCache::defaultMaxHugeSize;\n    // Sieve starts from 64MB (24-th cache bin), enough to check 4 bins radius range\n    // for decent memory consumption (especially for 32-bit arch)\n    static const int MIN_BIN_IDX = 21;\n    static const int MAX_BIN_IDX = 27;\n\n    enum CleanupType {\n        NO_CLEANUP,\n        REGULAR_CLEANUP,\n        HARD_CLEANUP\n    };\n\n    void populateCache() {\n        LargeMemoryBlock* loArray[MAX_BIN_IDX - MIN_BIN_IDX];\n        // To avoid backend::softCacheCleanup consequences (cleanup by isLOCToolarge),\n        // firstly allocate all objects and then cache them at once.\n        // Morevover, just because first cache item will still be dropped from cache because of the lack of history,\n        // redo allocation 2 times.\n        for (int idx = MIN_BIN_IDX; idx < MAX_BIN_IDX; ++idx) {\n            size_t allocationSize = alignedSizeFromIdx(idx);\n            int localIdx = idx - MIN_BIN_IDX;\n            loArray[localIdx] = defaultMemPool->extMemPool.mallocLargeObject(defaultMemPool, allocationSize);\n            REQUIRE_MESSAGE(loArray[localIdx], \"Large object was not allocated.\");\n            loc->put(loArray[localIdx]);\n            loArray[localIdx] = defaultMemPool->extMemPool.mallocLargeObject(defaultMemPool, allocationSize);\n        }\n        for (int idx = MIN_BIN_IDX; idx < MAX_BIN_IDX; ++idx) {\n            loc->put(loArray[idx - MIN_BIN_IDX]);\n        }\n    }\n    void clean(bool all) {\n        if (all) {\n            // Should avoid any threshold and clean all bins\n            loc->cleanAll();\n        } else {\n            // Regular cleanup should do nothing for bins above threshold. Decreasing option used\n            // for the test to be sure that all objects below defaultMaxHugeSize (sieveSize) were cleaned\n            loc->regularCleanup();\n            loc->decreasingCleanup();\n        }\n    }\n    void check(CleanupType type) {\n        for (int idx = MIN_BIN_IDX; idx < MAX_BIN_IDX; ++idx) {\n            size_t objectSize = alignedSizeFromIdx(idx);\n            // Cache object below sieve threshold and above huge object threshold should be cached\n            // (other should be sieved). Unless all cache is dropped. Regular cleanup drops object only below sieve size.\n            if (type == NO_CLEANUP && sizeInCacheRange(objectSize)) {\n                REQUIRE_MESSAGE(objectInCacheBin(idx, objectSize), \"Object was released from cache, it shouldn't.\");\n            } else if (type == REGULAR_CLEANUP && (objectSize >= hugeSize)) {\n                REQUIRE_MESSAGE(objectInCacheBin(idx, objectSize), \"Object was released from cache, it shouldn't.\");\n            } else { // HARD_CLEANUP\n                REQUIRE_MESSAGE(cacheBinEmpty(idx), \"Object is still cached.\");\n            }\n        }\n    }\n\nprivate:\n    bool cacheBinEmpty(int idx) {\n        return (loc->hugeCache.bin[idx].cachedSize.load(std::memory_order_relaxed) == 0 && loc->hugeCache.bin[idx].get() == nullptr);\n    }\n    bool objectInCacheBin(int idx, size_t size) {\n        return (loc->hugeCache.bin[idx].cachedSize.load(std::memory_order_relaxed) != 0 &&\n            loc->hugeCache.bin[idx].cachedSize.load(std::memory_order_relaxed) % size == 0);\n    }\n    bool sizeInCacheRange(size_t size) {\n        return size <= sieveSize || size >= hugeSize;\n    }\n    size_t alignedSizeFromIdx(int idx) {\n        return rml::internal::LargeObjectCache::alignToBin(hocIdxToSizeFormula(idx));\n    }\n};\n\n// TBBMALLOC_SET_HUGE_OBJECT_THRESHOLD value should be set before the test,\n// through scalable API or env variable\nvoid TestHugeSizeThresholdImpl(LargeObjectCache* loc, size_t hugeSize, bool fullTesting) {\n    HOThresholdTester test = {loc, hugeSize};\n    test.populateCache();\n    // Check the default sieve value\n    test.check(HOThresholdTester::NO_CLEANUP);\n\n    if(fullTesting) {\n        // Check that objects above threshold stay in cache after regular cleanup\n        test.clean(/*all*/false);\n        test.check(HOThresholdTester::REGULAR_CLEANUP);\n    }\n    // Check that all objects dropped from cache after hard cleanup (ignore huge obects threshold)\n    test.clean(/*all*/true);\n    test.check(HOThresholdTester::HARD_CLEANUP);\n    // Restore previous settings\n    loc->setHugeSizeThreshold(LargeObjectCache::maxHugeSize);\n    loc->reset();\n}\n\n/*\n *  Test for default huge size and behaviour when huge object settings defined\n */\nvoid TestHugeSizeThreshold() {\n    // Clean up if something was allocated before the test and reset cache state\n    scalable_allocation_command(TBBMALLOC_CLEAN_ALL_BUFFERS, nullptr);\n    LargeObjectCache* loc = &defaultMemPool->extMemPool.loc;\n    // Restore default settings just in case\n    loc->setHugeSizeThreshold(LargeObjectCache::maxHugeSize);\n    loc->reset();\n    // Firstly check default huge size value (with max huge object threshold).\n    // Everything that more then this value should be released to OS without caching.\n    TestHugeSizeThresholdImpl(loc, loc->hugeSizeThreshold, false);\n    // Then set huge object threshold.\n    // All objects with sizes after threshold will be released only after the hard cleanup.\n#if !__TBB_WIN8UI_SUPPORT\n    // Unit testing for environment variable\n    utils::SetEnv(\"TBB_MALLOC_SET_HUGE_SIZE_THRESHOLD\",\"67108864\");\n    // Large object cache reads threshold environment during initialization.\n    // Reset the value before the test.\n    loc->hugeSizeThreshold = 0;\n    // Reset logical time to prevent regular cleanup\n    loc->cacheCurrTime = 0;\n    loc->init(&defaultMemPool->extMemPool);\n    TestHugeSizeThresholdImpl(loc, 64 * MByte, true);\n#endif\n    // Unit testing for scalable_allocation_command\n    scalable_allocation_mode(TBBMALLOC_SET_HUGE_SIZE_THRESHOLD, 56 * MByte);\n    TestHugeSizeThresholdImpl(loc, 56 * MByte, true);\n    // Verify that objects whose sizes align to maxHugeSize are not cached.\n    size_t sz = LargeObjectCache::maxHugeSize;\n    size_t aligned_sz = LargeObjectCache::alignToBin(sz);\n    REQUIRE_MESSAGE(sz == aligned_sz, \"maxHugeSize should be aligned.\");\n    REQUIRE_MESSAGE(!loc->sizeInCacheRange(sz), \"Upper bound sized object shouldn't be cached.\");\n    REQUIRE_MESSAGE(loc->get(sz) == nullptr, \"Upper bound sized object shouldn't be cached.\");\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Main test case\") {\n    scalable_allocation_mode(USE_HUGE_PAGES, 0);\n#if !__TBB_WIN8UI_SUPPORT\n    utils::SetEnv(\"TBB_MALLOC_USE_HUGE_PAGES\",\"yes\");\n#endif\n    checkNoHugePages();\n    // backreference requires that initialization was done\n    if(!isMallocInitialized()) doInitialization();\n    checkNoHugePages();\n    // to succeed, leak detection must be the 1st memory-intensive test\n    TestBackRef();\n    TestCleanAllBuffers<4*1024>();\n    TestCleanAllBuffers<16*1024>();\n    TestCleanThreadBuffers();\n    TestPools();\n    TestBackend();\n\n#if MALLOC_CHECK_RECURSION\n    for( int p=MaxThread; p>=MinThread; --p ) {\n        TestStartupAlloc::initBarrier( p );\n        utils::NativeParallelFor( p, TestStartupAlloc() );\n        REQUIRE_MESSAGE(!firstStartupBlock, \"Startup heap memory leak detected\");\n    }\n#endif\n    TestLargeObjectCache();\n    TestObjectRecognition();\n    TestBitMask();\n    TestHeapLimit();\n    TestLOC();\n    TestSlabAlignment();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Decreasing reallocation\") {\n    if (!isMallocInitialized()) doInitialization();\n    TestReallocDecreasing();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Large object cache bins converter\") {\n    if (!isMallocInitialized()) doInitialization();\n    TestLOCacheBinsConverter();\n}\n\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Huge size threshold settings\") {\n    if (!isMallocInitialized()) doInitialization();\n    TestHugeSizeThreshold();\n}\n\n#if __unix__\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Transparent huge pages\") {\n    if (utils::isTHPEnabledOnMachine()) {\n        if (!isMallocInitialized()) doInitialization();\n        TestTHP();\n    } else {\n        INFO(\"Transparent Huge Pages is not supported on the system - skipped the test\\n\");\n    }\n}\n#endif\n\n#if !__TBB_WIN8UI_SUPPORT && defined(_WIN32)\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Function replacement log\") {\n    TesFunctionReplacementLog();\n}\n#endif\n"
  },
  {
    "path": "third-party/tbb/test/tbbmalloc/test_scalable_allocator.cpp",
    "content": "/*\n    Copyright (c) 2005-2022 Intel Corporation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\n\n//! \\file test_scalable_allocator.cpp\n//! \\brief Test for [memory_allocation.scalable_allocator] functionality\n\n// Test whether scalable_allocator complies with the requirements in 20.1.5 of ISO C++ Standard (1998).\n\n#define __TBB_NO_IMPLICIT_LINKAGE 1\n\n#if _WIN32 || _WIN64\n#define _CRT_SECURE_NO_WARNINGS\n#endif\n\n#define __TBB_EXTRA_DEBUG 1 // enables additional checks\n#define TBB_PREVIEW_MEMORY_POOL 1\n#define HARNESS_TBBMALLOC_THREAD_SHUTDOWN 1\n\n#include \"common/test.h\"\n#include \"common/utils.h\"\n#include \"common/utils_assert.h\"\n#include \"common/custom_allocators.h\"\n\n\n#include \"tbb/memory_pool.h\"\n#include \"tbb/scalable_allocator.h\"\n\n// The actual body of the tests\n#include \"common/allocator_test_common.h\"\n#include \"common/allocator_stl_test_common.h\"\n\n// #include \"harness_allocator.h\"\n\n#if _MSC_VER\n#include <windows.h>\n#endif /* _MSC_VER */\n\ntypedef StaticCountingAllocator<tbb::memory_pool_allocator<char>> cnt_alloc_t;\ntypedef LocalCountingAllocator<std::allocator<char> > cnt_provider_t;\n\nclass MinimalAllocator : cnt_provider_t {\npublic:\n    typedef char value_type;\n    MinimalAllocator() {\n        // REMARK(\"%p::ctor\\n\", this);\n    }\n    MinimalAllocator(const MinimalAllocator&s) : cnt_provider_t(s) {\n        // REMARK(\"%p::ctor(%p)\\n\", this, &s);\n    }\n    ~MinimalAllocator() {\n        /* REMARK(\"%p::dtor: alloc=%u/%u free=%u/%u\\n\", this, unsigned(items_allocated),unsigned(allocations),\n            unsigned(items_freed), unsigned(frees) ); */\n        REQUIRE((allocations==frees && items_allocated==items_freed));\n        if( allocations ) { // non-temporal copy\n            // TODO: describe consumption requirements\n            REQUIRE(items_allocated>cnt_alloc_t::items_allocated);\n        }\n    }\n    void *allocate(size_t sz) {\n        void *p = cnt_provider_t::allocate(sz);\n        // REMARK(\"%p::allocate(%u) = %p\\n\", this, unsigned(sz), p);\n        return p;\n    }\n    void deallocate(void *p, size_t sz) {\n        REQUIRE(allocations>frees);\n        // REMARK(\"%p::deallocate(%p, %u)\\n\", this, p, unsigned(sz));\n        cnt_provider_t::deallocate(std::allocator_traits<cnt_provider_t>::pointer(p), sz);\n    }\n};\n\nclass NullAllocator {\npublic:\n    typedef char value_type;\n    NullAllocator() { }\n    NullAllocator(const NullAllocator&) { }\n    ~NullAllocator() { }\n    void *allocate(size_t) { return nullptr; }\n    void deallocate(void *, size_t) { REQUIRE(false); }\n};\n\nvoid TestZeroSpaceMemoryPool()\n{\n    tbb::memory_pool<NullAllocator> pool;\n    bool allocated = pool.malloc(16) || pool.malloc(9*1024);\n    REQUIRE_MESSAGE(!allocated, \"Allocator with no memory must not allocate anything.\");\n}\n\n#if !TBB_USE_EXCEPTIONS\nstruct FixedPool {\n    void  *buf;\n    size_t size;\n    bool   used;\n    FixedPool(void *a_buf, size_t a_size) : buf(a_buf), size(a_size), used(false) {}\n};\n\nstatic void *fixedBufGetMem(intptr_t pool_id, size_t &bytes)\n{\n    if (((FixedPool*)pool_id)->used)\n        return nullptr;\n\n    ((FixedPool*)pool_id)->used = true;\n    bytes = ((FixedPool*)pool_id)->size;\n    return bytes? ((FixedPool*)pool_id)->buf : nullptr;\n}\n#endif\n\n/* test that pools in small space are either usable or not created\n   (i.e., exception raised) */\nvoid TestSmallFixedSizePool()\n{\n    char *buf;\n    bool allocated = false;\n\n    for (size_t sz = 0; sz < 64*1024; sz = sz? 3*sz : 3) {\n        buf = (char*)malloc(sz);\n#if TBB_USE_EXCEPTIONS\n        try {\n            tbb::fixed_pool pool(buf, sz);\n/* Check that pool is usable, i.e. such an allocation exists,\n   that can be fulfilled from the pool. 16B allocation fits in 16KB slabs,\n   so it requires at least 16KB. Requirement of 9KB allocation is more modest.\n*/\n            allocated = pool.malloc( 16 ) || pool.malloc( 9*1024 );\n        } catch (std::invalid_argument&) {\n            REQUIRE_MESSAGE(!sz, \"expect std::invalid_argument for zero-sized pool only\");\n        } catch (...) {\n            REQUIRE_MESSAGE(false, \"wrong exception type;\");\n        }\n#else\n/* Do not test high-level pool interface because pool ctor emit exception\n   on creation failure. Instead test same functionality via low-level interface.\n   TODO: add support for configuration with disabled exceptions to pools.\n*/\n        rml::MemPoolPolicy pol(fixedBufGetMem, nullptr, 0, /*fixedSizePool=*/true,\n                               /*keepMemTillDestroy=*/false);\n        rml::MemoryPool *pool;\n        FixedPool fixedPool(buf, sz);\n\n        rml::MemPoolError ret = pool_create_v1((intptr_t)&fixedPool, &pol, &pool);\n\n        if (ret == rml::POOL_OK) {\n            allocated = pool_malloc(pool, 16) || pool_malloc(pool, 9*1024);\n            pool_destroy(pool);\n        } else\n            REQUIRE_MESSAGE(ret == rml::NO_MEMORY, \"Expected that pool either valid or have no memory to be created\");\n#endif\n        free(buf);\n    }\n    REQUIRE_MESSAGE(allocated, \"Maximal buf size should be enough to create working fixed_pool\");\n#if TBB_USE_EXCEPTIONS\n    try {\n        tbb::fixed_pool pool(nullptr, 10*1024*1024);\n        REQUIRE_MESSAGE(false, \"Useless allocator with no memory must not be created\");\n    } catch (std::invalid_argument&) {\n    } catch (...) {\n        REQUIRE_MESSAGE(false, \"wrong exception type; expected invalid_argument\");\n    }\n#endif\n}\n\n//! Testing ISO C++ allocator requirements\n//! \\brief \\ref interface \\ref requirement\nTEST_CASE(\"Allocator concept\") {\n#if _MSC_VER && !__TBBMALLOC_NO_IMPLICIT_LINKAGE && !__TBB_WIN8UI_SUPPORT\n#ifdef _DEBUG\n    REQUIRE_MESSAGE((!GetModuleHandle(\"tbbmalloc.dll\") && GetModuleHandle(\"tbbmalloc_debug.dll\")),\n        \"test linked with wrong (non-debug) tbbmalloc library\");\n#else\n    REQUIRE_MESSAGE((!GetModuleHandle(\"tbbmalloc_debug.dll\") && GetModuleHandle(\"tbbmalloc.dll\")),\n        \"test linked with wrong (debug) tbbmalloc library\");\n#endif // _DEBUG\n#endif // _MSC_VER && !__TBBMALLOC_NO_IMPLICIT_LINKAGE\n    // allocate/deallocate\n    TestAllocator<tbb::scalable_allocator<void>>(Concept);\n    {\n        tbb::memory_pool<tbb::scalable_allocator<int>> pool;\n        TestAllocator(Concept, tbb::memory_pool_allocator<void>(pool));\n    }{\n        // tbb::memory_pool<MinimalAllocator> pool;\n        // cnt_alloc_t alloc( tbb::memory_pool_allocator<char>(pool) ); // double parentheses to avoid function declaration\n        // TestAllocator(Concept, alloc);\n    }{\n        static char buf[1024*1024*4];\n        tbb::fixed_pool pool(buf, sizeof(buf));\n        const char *text = \"this is a test\";// 15 bytes\n        char *p1 = (char*)pool.malloc( 16 );\n        REQUIRE(p1);\n        strcpy(p1, text);\n        char *p2 = (char*)pool.realloc( p1, 15 );\n        REQUIRE_MESSAGE( (p2 && !strcmp(p2, text)), \"realloc broke memory\" );\n\n        TestAllocator(Concept, tbb::memory_pool_allocator<void>(pool) );\n\n        // try allocate almost entire buf keeping some reasonable space for internals\n        char *p3 = (char*)pool.realloc( p2, sizeof(buf)-128*1024 );\n        REQUIRE_MESSAGE( p3, \"defragmentation failed\" );\n        REQUIRE_MESSAGE( !strcmp(p3, text), \"realloc broke memory\" );\n        for( size_t sz = 10; sz < sizeof(buf); sz *= 2) {\n            REQUIRE( pool.malloc( sz ) );\n            pool.recycle();\n        }\n\n        TestAllocator(Concept, tbb::memory_pool_allocator<void>(pool) );\n    }{\n        // Two nested level allocators case with fixed pool allocator as an underlying layer\n        // serving allocRawMem requests for the top level scalable allocator\n        typedef tbb::memory_pool<tbb::memory_pool_allocator<char, tbb::fixed_pool> > NestedPool;\n\n        static char buffer[8*1024*1024];\n        tbb::fixed_pool fixedPool(buffer, sizeof(buffer));\n        // Underlying fixed pool allocator\n        tbb::memory_pool_allocator<char, tbb::fixed_pool> fixedPoolAllocator(fixedPool);\n        // Memory pool that handles fixed pool allocator\n        NestedPool nestedPool(fixedPoolAllocator);\n        // Top level memory pool allocator\n        tbb::memory_pool_allocator<char, NestedPool> nestedAllocator(nestedPool);\n\n        TestAllocator(Concept, nestedAllocator);\n    }\n    tbb::memory_pool<tbb::scalable_allocator<int>> mpool;\n\n    tbb::memory_pool_allocator<int> mpalloc(mpool);\n\n    TestAllocator<tbb::memory_pool_allocator<int>>(Concept, mpalloc);\n    TestAllocator<tbb::memory_pool_allocator<void>>(Concept, mpalloc);\n\n    // operator==\n    TestAllocator<tbb::scalable_allocator<void>>(Comparison);\n    TestAllocator<tbb::memory_pool_allocator<void>>(Comparison, tbb::memory_pool_allocator<void>(mpool));\n    TestAllocator<tbb::memory_pool_allocator<int>>(Comparison, mpalloc);\n    TestAllocator<tbb::memory_pool_allocator<void>>(Comparison, mpalloc);\n}\n\n#if TBB_USE_EXCEPTIONS\n//! Testing exception guarantees\n//! \\brief \\ref requirement\nTEST_CASE(\"Exceptions\") {\n    TestAllocator<tbb::scalable_allocator<void>>(Exceptions);\n}\n#endif /* TBB_USE_EXCEPTIONS */\n\n//! Testing allocators thread safety (should not introduce data races)\n//! \\brief \\ref requirements\nTEST_CASE(\"Thread safety\") {\n    TestAllocator<tbb::scalable_allocator<void>>(ThreadSafety);\n}\n\n//! Test that pools in small space are either usable or not created (i.e., exception raised)\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Small fixed pool\") {\n    TestSmallFixedSizePool();\n}\n\n//! Test that allocator with no memory must not allocate anything.\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Zero space pool\") {\n    TestZeroSpaceMemoryPool();\n}\n\n#if TBB_ALLOCATOR_TRAITS_BROKEN\n//! Testing allocator traits is broken\n//! \\brief \\ref error_guessing\nTEST_CASE(\"Broken allocator concept\") {\n    TestAllocator<tbb::scalable_allocator<void>>(Broken);\n    \n    tbb::memory_pool<tbb::scalable_allocator<int>> mpool; \n    TestAllocator<tbb::memory_pool_allocator<void>>(Broken, tbb::memory_pool_allocator<void>(mpool));\n}\n#endif\n\n\n//! Testing allocators compatibility with STL containers\n//! \\brief \\ref interface\nTEST_CASE(\"Integration with STL containers\") {\n    TestAllocatorWithSTL<tbb::scalable_allocator<void> >();\n    tbb::memory_pool<tbb::scalable_allocator<int> > mpool;\n    TestAllocatorWithSTL(tbb::memory_pool_allocator<void>(mpool) );\n    static char buf[1024*1024*4];\n    tbb::fixed_pool fpool(buf, sizeof(buf));\n    TestAllocatorWithSTL(tbb::memory_pool_allocator<void>(fpool) );\n}\n\n#if __TBB_CPP17_MEMORY_RESOURCE_PRESENT\n//! Testing memory resources compatibility with STL containers through std::pmr::polymorphic_allocator\n//! \\brief \\ref interface\nTEST_CASE(\"polymorphic_allocator test\") {\n    REQUIRE_MESSAGE(!tbb::scalable_memory_resource()->is_equal(*std::pmr::get_default_resource()),\n            \"Scalable resource shouldn't be equal to standard resource.\" );\n    REQUIRE_MESSAGE(tbb::scalable_memory_resource()->is_equal(*tbb::scalable_memory_resource()),\n            \"Memory that was allocated by one scalable resource should be deallocated by any other instance.\");\n\n    typedef std::pmr::polymorphic_allocator<void> pmr_alloc_t;\n    TestAllocatorWithSTL(pmr_alloc_t(tbb::scalable_memory_resource()));\n}\n#endif\n\n"
  },
  {
    "path": "third-party/tbb/third-party-programs.txt",
    "content": "oneAPI Threading Building Blocks (oneTBB) Third Party Programs File\n\nThis file is the \"third-party-programs.txt\" file specified  in  the  associated Intel end user license\nagreement for the Intel software you are licensing.\n\nThe third party programs and their corresponding required notices and/or license\nterms are listed below.\n_______________________________________________________________________________________________________\n\n1.  Instrumentation and Tracing Technology (ITT) Notify User API:\n    Copyright (c) 2005-2023 Intel Corporation. All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in \n       the documentation and/or other materials provided with the \n       distribution.\n    3. Neither the name of the copyright holder nor the names of its\n       contributors may be used to endorse or promote products derived\n       from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n    \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n    HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n_______________________________________________________________________________________________________\n\n2.  Portable Hardware Locality (hwloc):\n\n    Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana University Research and\n                            Technology Corporation.  All rights reserved.\n    Copyright (c) 2004-2005 The University of Tennessee and The University of Tennessee Research\n                            Foundation. All rights reserved.\n    Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, University of Stuttgart.\n                            All rights reserved.\n    Copyright (c) 2004-2005 The Regents of the University of California. All rights reserved.\n    Copyright (c) 2009      CNRS\n    Copyright (c) 2009-2016 Inria.  All rights reserved.\n    Copyright (c) 2009-2015 Université Bordeaux\n    Copyright (c) 2009-2015 Cisco Systems, Inc.  All rights reserved.\n    Copyright (c) 2009-2012 Oracle and/or its affiliates.  All rights reserved.\n    Copyright (c) 2010      IBM\n    Copyright (c) 2010      Jirka Hladky\n    Copyright (c) 2012      Aleksej Saushev, The NetBSD Foundation\n    Copyright (c) 2012      Blue Brain Project, EPFL. All rights reserved.\n    Copyright (c) 2013-2014 University of Wisconsin-La Crosse. All rights reserved.\n    Copyright (c) 2015      Research Organization for Information Science and Technology (RIST).\n                            All rights reserved.\n    Copyright (c) 2015-2016 Intel, Inc.  All rights reserved.\n    See COPYING in top-level directory.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n    3. The name of the author may not be used to endorse or promote products\n       derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n    OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n    IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n    NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n    THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n_______________________________________________________________________________________________________\n\n3.  gperftools: Copyright (c) 2011, Google Inc.\n\n    Tachyon: Copyright (c) 1994-2008 John E. Stone. All rights reserved.\n\n    BSD 3-Clause \"New\" or \"Revised\" License\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions are\n    met:\n\n        * Redistributions of source code must retain the above copyright\n    notice, this list of conditions and the following disclaimer.\n        * Redistributions in binary form must reproduce the above\n    copyright notice, this list of conditions and the following disclaimer\n    in the documentation and/or other materials provided with the\n    distribution.\n        * Neither the name of Google Inc. nor the names of its\n    contributors may be used to endorse or promote products derived from\n    this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n    \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n_______________________________________________________________________________________________________\n\n4.  Mateusz Kwiatkowski Workaround for bug 62258 in libstdc++\n\n    ********************************************************************************\n    * Author: Mateusz Kwiatkowski <m.kwiatkowski@avsystem.com>                     *\n    *                                                                              *\n    * I hereby renounce all copyright to this file and my rights resulting from    *\n    * it, to the broadest extent permitted by law. It may be treated as public     *\n    * domain.                                                                      *\n    *                                                                              *\n    * However, as this file interfaces with GCC internal ABI, it may be subject to *\n    * the terms and conditions of the GNU General Public License. Please consult   *\n    * the GCC licensing terms and/or a lawyer for details.                         *\n    *                                                                              *\n    * Note that libstdc++ licensing terms grant additional permissions described   *\n    * in the GCC Runtime Library Exception, version 3.1, as published by the       *\n    * Free Software Foundation.                                                    *\n    *******************************************************************************/\n_______________________________________________________________________________________________________\n\n5. ActiveState Thread pool with same API as (multi) processing. Pool (Python recipe)\n\n    #\n    # Copyright (c) 2008,2016 david decotigny (this file)\n    # Copyright (c) 2006-2008, R Oudkerk (multiprocessing.Pool)\n    # All rights reserved.\n    #\n    # Redistribution and use in source and binary forms, with or without\n    # modification, are permitted provided that the following conditions\n    # are met:\n    #\n    # 1. Redistributions of source code must retain the above copyright\n    #    notice, this list of conditions and the following disclaimer.\n    # 2. Redistributions in binary form must reproduce the above copyright\n    #    notice, this list of conditions and the following disclaimer in the\n    #    documentation and/or other materials provided with the distribution.\n    # 3. Neither the name of author nor the names of any contributors may be\n    #    used to endorse or promote products derived from this software\n    #    without specific prior written permission.\n    #\n    # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS \"AS IS\" AND\n    # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n    # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    # ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n    # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    # SUCH DAMAGE.\n\n_______________________________________________________________________________________________________\n\n6. doctest\n\n    Copyright (c) 2016-2023 Viktor Kirilov\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in all\n    copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n    SOFTWARE.\n\n_______________________________________________________________________________________________________\n\n*Other names and brands may be claimed as the property of others."
  },
  {
    "path": "third-party/xxhash/.gitattributes",
    "content": "# Set the default behavior\n* text eol=lf\n\n# Explicitly declare source files\n*.c text eol=lf\n*.h text eol=lf\n\n# Denote files that should not be modified.\n*.odt binary\n\n"
  },
  {
    "path": "third-party/xxhash/.github/dependabot.yml",
    "content": "# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file\nversion: 2\nupdates:\n  - package-ecosystem: \"github-actions\"\n    directory: \"/\"\n    schedule:\n      interval: \"weekly\"\n"
  },
  {
    "path": "third-party/xxhash/.github/workflows/ci.yml",
    "content": "# Known critical issues:\n# - AVX512 related tests are incomplete.  Because default environment of\n#   GitHub Actions doesn't guarantee to support AVX512.\n#   As of May 2021, they're using Xeon E5-2673 (which doesn't support\n#   AVX512) and Xeon Platinum 8171M (which supports AVX512).\n#   See also https://github.com/actions/runner/issues/1069\n#\n#   In this CI script, it always run `make default` which compiles xxHash\n#   with AVX512 intrinsics.  But if test runner doesn't support AVX512,\n#   it doesn't run `make check` which tests runtime error/consistency.\n#   It means that this test stochastically detects a failure in AVX512\n#   code path.\n#\n# Known issues:\n# - This test script ignores exit code of cppcheck which can see under\n#   Job:Linux x64 misc tests > cppcheck in the GitHub Actions report.\n#   Because xxHash project doesn't 100% follow their recommendation.\n#   Also sometimes it reports false positives.\n#\n# - GitHub Actions doesn't support Visual Studio 2015 and 2013.\n#   https://github.com/actions/virtual-environments/issues/387\n#\n# - Setup procedure for msys2 environment is painfully slow.  It takes\n#   3..5 minutes.\n#\n# Notes:\n# - You can investigate various information at the right pane of GitHub\n#   Actions report page.\n#\n#   | Item                      | Section in the right pane             |\n#   | ------------------------- | ------------------------------------- |\n#   | OS, VM                    | Set up job                            |\n#   | git repo, commit hash     | Run actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683               |\n#   | gcc, tools                | Environment info                      |\n#\n# - To fail earlier, order of tests in the same job are roughly sorted by\n#   elapsed time.\n#\n# Todos:\n# - [ ] Linux: Add native ARM runner.\n# - [ ] Linux: Add native ARM64 runner.\n# - [ ] Linux: Add native PPC64LE runner.\n# - [ ] Linux: Add native S390X runner.\n# - [ ] Windows: Add VS2013.\n# - [ ] Windows: Add VS2015.\n# - [ ] Windows: Add clang for msys2.\n# - [ ] Windows: Add native or emulated ARM runner.\n# - [ ] Windows: Add native or emulated ARM64 runner.\n\n\n# Name of the workflow is also displayed as a SVG badge\nname: xxHash CI tests\n\non: [push, pull_request]\n\nconcurrency:\n  group: fast-${{ github.ref }}\n  cancel-in-progress: true\n\npermissions:\n  contents: read\n\njobs:\n  xxhash-c-compilers:\n    name: CC=${{ matrix.cc }}, ${{ matrix.os }}\n    strategy:\n      fail-fast: false  # 'false' means Don't stop matrix workflows even if some matrix entry fails.\n      matrix:\n        include: [\n          # You can access the following values via ${{ matrix.??? }}\n          #\n          #   pkgs    : apt-get package names.  It can include multiple package names which are delimited by space.\n          #   cc      : C compiler executable.\n          #   cxx     : C++ compiler executable for `make ctocpptest`.\n          #   os      : GitHub Actions YAML workflow label.  See https://github.com/actions/virtual-environments#available-environments\n\n          # cc\n          { pkgs: '',                                  cc: cc,        cxx: c++,         os: ubuntu-latest, },\n\n          # gcc\n          { pkgs: '',                                  cc: gcc,       cxx: g++,         os: ubuntu-latest, },\n          # { pkgs: 'gcc-13  g++-13  lib32gcc-13-dev',   cc: gcc-13,    cxx: g++-13,      os: ubuntu-22.04,  }, # currently failing\n          { pkgs: 'gcc-12  g++-12  lib32gcc-12-dev',   cc: gcc-12,    cxx: g++-12,      os: ubuntu-22.04,  },\n          { pkgs: 'gcc-11  g++-11  lib32gcc-11-dev',   cc: gcc-11,    cxx: g++-11,      os: ubuntu-22.04,  },\n          { pkgs: 'gcc-10  g++-10  lib32gcc-10-dev',   cc: gcc-10,    cxx: g++-10,      os: ubuntu-22.04,  },\n          { pkgs: 'gcc-9   g++-9   lib32gcc-9-dev',    cc: gcc-9,     cxx: g++-9,       os: ubuntu-22.04,  },\n          { pkgs: 'gcc-8   g++-8   lib32gcc-8-dev',    cc: gcc-8,     cxx: g++-8,       os: ubuntu-20.04,  },\n          { pkgs: 'gcc-7   g++-7   lib32gcc-7-dev',    cc: gcc-7,     cxx: g++-7,       os: ubuntu-20.04,  },\n\n          # clang\n          { pkgs: '',                                  cc: clang,     cxx: clang++,     os: ubuntu-latest, },\n          { pkgs: 'clang-15',                          cc: clang-15,  cxx: clang++-15,  os: ubuntu-22.04,  },\n          { pkgs: 'clang-14',                          cc: clang-14,  cxx: clang++-14,  os: ubuntu-22.04,  },\n          { pkgs: 'clang-13',                          cc: clang-13,  cxx: clang++-13,  os: ubuntu-22.04,  },\n          { pkgs: 'clang-12',                          cc: clang-12,  cxx: clang++-12,  os: ubuntu-22.04,  },\n          { pkgs: 'clang-11',                          cc: clang-11,  cxx: clang++-11,  os: ubuntu-22.04,  },\n          { pkgs: 'clang-10',                          cc: clang-10,  cxx: clang++-10,  os: ubuntu-20.04,  },\n          { pkgs: 'clang-9',                           cc: clang-9,   cxx: clang++-9,   os: ubuntu-20.04,  },\n          { pkgs: 'clang-8',                           cc: clang-8,   cxx: clang++-8,   os: ubuntu-20.04,  },\n          { pkgs: 'clang-7',                           cc: clang-7,   cxx: clang++-7,   os: ubuntu-20.04,  },\n          { pkgs: 'clang-6.0',                         cc: clang-6.0, cxx: clang++-6.0, os: ubuntu-20.04,  },\n        ]\n\n    runs-on: ${{ matrix.os }}\n    env:                        # Set environment variables\n      # We globally set CC and CXX to improve compatibility with .travis.yml\n      CC: ${{ matrix.cc }}\n      CXX: ${{ matrix.cxx }}\n    steps:\n    - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n\n    - name: apt-get install\n      run: |\n        sudo apt-get update\n        sudo apt-get install gcc-multilib\n        sudo apt-get install ${{ matrix.pkgs }}\n\n    - name: Environment info\n      run: |\n        echo && type $CC && which $CC && $CC --version\n        echo && type $CXX && which $CXX && $CXX --version\n        echo && type make && make -v\n        echo && cat /proc/cpuinfo || echo /proc/cpuinfo is not present\n\n    - name: C90 + no-long-long compliance\n      if: always()\n      run: |\n        CFLAGS=\"-std=c90 -pedantic -Wno-long-long -Werror\" make clean xxhsum\n\n    - name: C90 + XXH_NO_LONG_LONG\n      if: always()\n      run: |\n        # strict c90, with no long long support; resulting in no XXH64_* symbol\n        make clean c90test\n\n    - name: dispatch\n      if: always()\n      run: |\n        # removing sign conversion warnings due to a bug in gcc-5's definition of some AVX512 intrinsics\n        CFLAGS=\"-Werror\" MOREFLAGS=\"-Wno-sign-conversion\" make clean dispatch\n\n    - name: DISPATCH=1\n      if: always()\n      run: |\n        CFLAGS=\"-Wall -Wextra -Werror\" make DISPATCH=1 clean default\n\n    - name: XXH_SIZE_OPT == 2\n      if: always()\n      run: |\n        CFLAGS=\"-Os -DXXH_SIZE_OPT=2 -Wall -Wextra -Werror\" make clean xxhsum\n\n    - name: noxxh3test\n      if: always()\n      run: |\n        # check library can be compiled with XXH_NO_XXH3, resulting in no XXH3_* symbol\n        make clean noxxh3test\n\n    - name: nostreamtest\n      if: always()\n      run: |\n        # check library can be compiled with XXH_NO_STREAM, resulting in no streaming symbols\n        make clean noxxh3test\n\n    - name: make avx512f\n      run: |\n        CFLAGS=\"-O1 -mavx512f -Werror\" make clean default\n\n    - name: test-all\n      if: always()\n      run: |\n        make clean test-all\n\n\n  ubuntu-consistency:\n    name: Linux x64 check results consistency\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n\n    - name: Environment info\n      run: |\n        echo && gcc --version\n        echo && make -v\n        echo && cat /proc/cpuinfo || echo /proc/cpuinfo is not present\n\n    - name: Scalar code path\n      run: |\n        CPPFLAGS=-DXXH_VECTOR=XXH_SCALAR make clean check\n\n    - name: SSE2 code path\n      run: |\n        CPPFLAGS=-DXXH_VECTOR=XXH_SSE2 make clean check\n\n    - name: AVX2 code path\n      run: |\n        CPPFLAGS=\"-mavx2 -DXXH_VECTOR=XXH_AVX2\" make clean check\n\n    # As for AVX512, see \"Known critical issues\" at the top of this file\n    - name: AVX512 code path\n      run: |\n        # Run \"make check\" if /proc/cpuinfo has flags for avx512.\n        grep -q \"^flags.*\\bavx512\\b\" /proc/cpuinfo && CPPFLAGS=\"-mavx512f -DXXH_VECTOR=XXH_AVX512\" make clean check || (echo This test runner does not support AVX512. && $(exit 0))\n\n    - name: reroll code path (#240)\n      run: |\n        CPPFLAGS=-DXXH_REROLL=1 make clean check\n\n    - name: tests/bench\n      run: |\n        make -C tests/bench\n\n\n  ubuntu-wasm:\n    name: Ubuntu Node ${{ matrix.node-version }} WebAssembly/asm.js tests\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        node-version: [16.x, 17.x, 18.x]\n\n    env:\n      EM_VERSION: 3.1.33 # TODO: more emsdk versions\n      EM_CACHE_FOLDER: emsdk-cache-${{ matrix.node-version }}\n      CC: emcc\n\n    steps:\n    - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n\n    - name: Setup cache\n      id: cache-system-libraries\n      uses: actions/cache@v4\n      with:\n        path: ${{env.EM_CACHE_FOLDER}}\n        key: em${{env.EM_VERSION}}-node${{ matrix.node-version }}-${{ runner.os }}\n\n    - name: Setup emsdk\n      uses: mymindstorm/setup-emsdk@v14\n      with:\n        version: ${{env.EM_VERSION}}\n        actions-cache-folder: ${{env.EM_CACHE_FOLDER}}\n\n    - name: Use Node.js ${{ matrix.node-version }}\n      uses: actions/setup-node@v4\n      with:\n        node-version: ${{ matrix.node-version }}\n\n    - name: Environment info\n      run: |\n        echo && node -p '`node version: ${process.versions.node}, v8 version: ${process.versions.v8}`'\n        echo && emcc --version\n        echo && make -v\n        echo && cat /proc/cpuinfo || echo /proc/cpuinfo is not present\n\n    - name: Scalar code path\n      run: |\n        CPPFLAGS=\"-DXXH_VECTOR=XXH_SCALAR\" RUN_ENV=\"node\" NODE_JS=1 make clean check\n\n    - name: SIMD128 (via NEON SIMDe) code path (XXH_VECTOR=XXH_NEON)\n      run: |\n        CPPFLAGS=\"-DXXH_VECTOR=XXH_NEON -msimd128\" RUN_ENV=\"node\" NODE_JS=1 make clean check\n\n    - name: Scalar asm.js (-sWASM=0)\n      run: |\n        CPPFLAGS=\"-DXXH_VECTOR=XXH_SCALAR\" RUN_ENV=\"node\" NODE_JS=1 LDFLAGS=\"-sWASM=0\" make clean check\n\n\n  ubuntu-misc:\n    name: Linux x64 misc tests\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n\n    - name: apt-get install\n      run: |\n        sudo apt-get update\n        sudo apt-get install valgrind cppcheck\n\n    - name: Environment info\n      run: |\n        echo && gcc --version\n        echo && clang --version\n        echo && valgrind --version\n        echo && cppcheck --version\n        echo && make -v\n        echo && cat /proc/cpuinfo || echo /proc/cpuinfo is not present\n\n    - name: cppcheck\n      run: |\n        # This test script ignores exit code of cppcheck.  See knowin issues\n        # at the top of this file.\n        make clean cppcheck || echo There are some cppcheck reports\n\n    - name: test-mem (valgrind)\n      run: |\n        make clean test-mem\n\n    - name: usan\n      run: |\n        make clean usan\n\n    - name: Lint Unicode in root-dir, cli/, tests/, tests/bench/, tests/collisions/.\n      run: |\n        make lint-unicode\n\n    - name: test-filename-escape\n      # See also issue #695 - https://github.com/Cyan4973/xxHash/issues/695\n      run: |\n        make clean test-filename-escape\n\n    - name: test-cli-comment-line\n      run: |\n        make clean test-cli-comment-line\n\n  ubuntu-cmake-unofficial:\n    name: Linux x64 cmake unofficial build test\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n\n    - name: Environment info\n      run: |\n        echo && gcc --version\n        echo && cmake --version\n        echo && make -v\n        echo && cat /proc/cpuinfo || echo /proc/cpuinfo is not present\n\n    - name: cmake\n      run: |\n        cd cmake_unofficial\n        cmake -Bbuild\n        cd build\n        CFLAGS=-Werror make\n        mkdir -p test_install_dir\n        DESTDIR=test_install_dir cmake --install .\n\n    - name: cmake pkgconfig generation\n      run: |\n        cd cmake_unofficial\n        pwd\n        ls\n        rm -rf build\n        cmake -Bbuild -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_INCLUDEDIR=/usr/include -DCMAKE_INSTALL_LIBDIR=/usr/lib\n        echo \"checking content of libxxhash.pc\"\n        cat build/libxxhash.pc | grep \"libdir=/usr/lib\"\n        cat build/libxxhash.pc | grep \"includedir=/usr/include\"\n\n    - name: cmake minimum version v3.10 test\n      run: |\n        mkdir -p cmake_bins\n        cd cmake_bins\n        wget https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.tar.gz\n        tar xzf cmake-3.10.0-Linux-x86_64.tar.gz\n        cd ../cmake_unofficial\n        rm -rf build\n        pwd\n        ls\n        mkdir -p build\n        cd build\n        ../../cmake_bins/cmake-3.10.0-Linux-x86_64/bin/cmake --version\n        ../../cmake_bins/cmake-3.10.0-Linux-x86_64/bin/cmake ..\n        ../../cmake_bins/cmake-3.10.0-Linux-x86_64/bin/cmake --build .\n        mkdir -p test_install_dir\n        DESTDIR=test_install_dir ../../cmake_bins/cmake-3.10.0-Linux-x86_64/bin/cmake --install .\n        rm -rf *\n        ../../cmake_bins/cmake-3.10.0-Linux-x86_64/bin/cmake -DCMAKE_BUILD_TYPE=Debug ..\n        ../../cmake_bins/cmake-3.10.0-Linux-x86_64/bin/cmake --build .\n\n\n\n  # Linux, { ARM, ARM64, PPC64LE, PPC64, S390X }\n  # All tests are using QEMU and gcc cross compiler.\n\n  qemu-consistency:\n    name: QEMU ${{ matrix.name }}\n    runs-on: ${{ matrix.os }}\n    strategy:\n      fail-fast: false  # 'false' means Don't stop matrix workflows even if some matrix failed.\n      matrix:\n        include: [\n          { name: 'ARM',             xcc_pkg: gcc-arm-linux-gnueabi,        xcc: arm-linux-gnueabi-gcc,        xemu_pkg: qemu-system-arm,    xemu: qemu-arm-static,     os: ubuntu-latest, },\n          { name: 'AARCH64',         xcc_pkg: gcc-aarch64-linux-gnu,        xcc: aarch64-linux-gnu-gcc,        xemu_pkg: qemu-system-arm,    xemu: qemu-aarch64-static, os: ubuntu-latest, },\n          { name: 'PPC64LE',         xcc_pkg: gcc-powerpc64le-linux-gnu,    xcc: powerpc64le-linux-gnu-gcc,    xemu_pkg: qemu-system-ppc,    xemu: qemu-ppc64le-static, os: ubuntu-latest, },\n          { name: 'PPC64',           xcc_pkg: gcc-powerpc64-linux-gnu,      xcc: powerpc64-linux-gnu-gcc,      xemu_pkg: qemu-system-ppc,    xemu: qemu-ppc64-static,   os: ubuntu-latest, },\n          { name: 'S390X',           xcc_pkg: gcc-s390x-linux-gnu,          xcc: s390x-linux-gnu-gcc,          xemu_pkg: qemu-system-s390x,  xemu: qemu-s390x-static,   os: ubuntu-latest, },\n          { name: 'MIPS',            xcc_pkg: gcc-mips-linux-gnu,           xcc: mips-linux-gnu-gcc,           xemu_pkg: qemu-system-mips,   xemu: qemu-mips-static,    os: ubuntu-latest, },\n          { name: 'M68K',            xcc_pkg: gcc-m68k-linux-gnu,           xcc: m68k-linux-gnu-gcc,           xemu_pkg: qemu-system-m68k,   xemu: qemu-m68k-static,    os: ubuntu-latest, },\n          { name: 'RISC-V',          xcc_pkg: gcc-riscv64-linux-gnu,        xcc: riscv64-linux-gnu-gcc,        xemu_pkg: qemu-system-riscv64,xemu: qemu-riscv64-static, os: ubuntu-latest, },\n          # SPARC64 qemu emulation seems broken on Ubuntu-22\n          { name: 'SPARC',           xcc_pkg: gcc-sparc64-linux-gnu,        xcc: sparc64-linux-gnu-gcc,        xemu_pkg: qemu-system-sparc,  xemu: qemu-sparc64-static, os: ubuntu-20.04, },\n          { name: 'LoongArch',       xcc_pkg: gcc-14-loongarch64-linux-gnu,    xcc: loongarch64-linux-gnu-gcc-14, xemu_pkg: qemu-system-loongarch64, xemu: qemu-loongarch64-static, os: ubuntu-24.04, },\n\n          { name: 'ARM, gcc-10',     xcc_pkg: gcc-10-arm-linux-gnueabi,     xcc: arm-linux-gnueabi-gcc-10,     xemu_pkg: qemu-system-arm,   xemu: qemu-arm-static,     os: ubuntu-20.04, },\n          { name: 'AARCH64, gcc-10', xcc_pkg: gcc-10-aarch64-linux-gnu,     xcc: aarch64-linux-gnu-gcc-10,     xemu_pkg: qemu-system-arm,   xemu: qemu-aarch64-static, os: ubuntu-20.04, },\n          { name: 'PPC64LE, gcc-10', xcc_pkg: gcc-10-powerpc64le-linux-gnu, xcc: powerpc64le-linux-gnu-gcc-10, xemu_pkg: qemu-system-ppc,   xemu: qemu-ppc64le-static, os: ubuntu-20.04, },\n          { name: 'PPC64, gcc-10',   xcc_pkg: gcc-10-powerpc64-linux-gnu,   xcc: powerpc64-linux-gnu-gcc-10,   xemu_pkg: qemu-system-ppc,   xemu: qemu-ppc64-static,   os: ubuntu-20.04, },\n          { name: 'S390X, gcc-10',   xcc_pkg: gcc-10-s390x-linux-gnu,       xcc: s390x-linux-gnu-gcc-10,       xemu_pkg: qemu-system-s390x, xemu: qemu-s390x-static,   os: ubuntu-20.04, },\n          { name: 'MIPS, gcc-10',    xcc_pkg: gcc-10-mips-linux-gnu,        xcc: mips-linux-gnu-gcc-10,        xemu_pkg: qemu-system-mips,  xemu: qemu-mips-static,    os: ubuntu-20.04, },\n\n          { name: 'ARM, gcc-9',      xcc_pkg: gcc-9-arm-linux-gnueabi,      xcc: arm-linux-gnueabi-gcc-9,      xemu_pkg: qemu-system-arm,   xemu: qemu-arm-static,     os: ubuntu-20.04, },\n          # SVE tests require at least gcc-10.1\n          # { name: 'AARCH64, gcc-9',  xcc_pkg: gcc-9-aarch64-linux-gnu,      xcc: aarch64-linux-gnu-gcc-9,      xemu_pkg: qemu-system-arm,   xemu: qemu-aarch64-static, os: ubuntu-20.04, },\n          { name: 'PPC64LE, gcc-9',  xcc_pkg: gcc-9-powerpc64le-linux-gnu,  xcc: powerpc64le-linux-gnu-gcc-9,  xemu_pkg: qemu-system-ppc,   xemu: qemu-ppc64le-static, os: ubuntu-20.04, },\n          { name: 'PPC64, gcc-9',    xcc_pkg: gcc-9-powerpc64-linux-gnu,    xcc: powerpc64-linux-gnu-gcc-9,    xemu_pkg: qemu-system-ppc,   xemu: qemu-ppc64-static,   os: ubuntu-20.04, },\n          { name: 'S390X, gcc-9',    xcc_pkg: gcc-9-s390x-linux-gnu,        xcc: s390x-linux-gnu-gcc-9,        xemu_pkg: qemu-system-s390x, xemu: qemu-s390x-static,   os: ubuntu-20.04, },\n          { name: 'MIPS, gcc-9',     xcc_pkg: gcc-9-mips-linux-gnu,         xcc: mips-linux-gnu-gcc-9,         xemu_pkg: qemu-system-mips,  xemu: qemu-mips-static,    os: ubuntu-20.04, },\n\n          { name: 'ARM, gcc-8',      xcc_pkg: gcc-8-arm-linux-gnueabi,      xcc: arm-linux-gnueabi-gcc-8,      xemu_pkg: qemu-system-arm,   xemu: qemu-arm-static,     os: ubuntu-20.04, },\n          # aarch64-linux-gnu-gcc-8 linker has an issue for LDFLAGS=\"-static\"\n          # { name: 'AARCH64, gcc-8',  xcc_pkg: gcc-8-aarch64-linux-gnu,      xcc: aarch64-linux-gnu-gcc-8,      xemu_pkg: qemu-system-arm,   xemu: qemu-aarch64-static, os: ubuntu-20.04, },\n          { name: 'PPC64LE, gcc-8',  xcc_pkg: gcc-8-powerpc64le-linux-gnu,  xcc: powerpc64le-linux-gnu-gcc-8,  xemu_pkg: qemu-system-ppc,   xemu: qemu-ppc64le-static, os: ubuntu-20.04, },\n          { name: 'PPC64, gcc-8',    xcc_pkg: gcc-8-powerpc64-linux-gnu,    xcc: powerpc64-linux-gnu-gcc-8,    xemu_pkg: qemu-system-ppc,   xemu: qemu-ppc64-static,   os: ubuntu-20.04, },\n          { name: 'S390X, gcc-8',    xcc_pkg: gcc-8-s390x-linux-gnu,        xcc: s390x-linux-gnu-gcc-8,        xemu_pkg: qemu-system-s390x, xemu: qemu-s390x-static,   os: ubuntu-20.04, },\n          # ubuntu-20.04 fails to retrieve gcc-8-mips-linux-gnu for some reason.\n          # { name: 'MIPS, gcc-8',   xcc_pkg: gcc-8-mips-linux-gnu,         xcc: mips-linux-gnu-gcc-8,         xemu_pkg: qemu-system-mips,  xemu: qemu-mips-static,    os: ubuntu-20.04, },\n        ]\n    env:                        # Set environment variables\n      XCC: ${{ matrix.xcc }}\n      XEMU: ${{ matrix.xemu }}\n      MOREFLAGS: -Werror\n    steps:\n    - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n    - name: apt update & install (1)\n      run: |\n        sudo apt-get update\n        sudo apt-get install gcc-multilib g++-multilib qemu-utils qemu-user-static\n\n    - name: Environment info (1)\n      run: |\n        echo && apt-cache search \"^gcc-\" | grep \"linux\" | sort\n\n    - name: apt update & install (2)\n      run: |\n        sudo apt-get install ${{ matrix.xcc_pkg }} ${{ matrix.xemu_pkg }}\n\n    - name: Environment info (2)\n      run: |\n        echo && which $XCC\n        echo && $XCC --version\n        echo && $XCC -v  # Show built-in specs\n        echo && which $XEMU\n        echo && $XEMU --version\n\n    - name: ARM (XXH_VECTOR=[ scalar, NEON ])\n      if: ${{ startsWith(matrix.name, 'ARM') }}\n      run: |\n        CPPFLAGS=\"-DXXH_VECTOR=XXH_SCALAR\" LDFLAGS=\"-static\" CC=$XCC RUN_ENV=$XEMU make clean check\n        CPPFLAGS=\"-DXXH_VECTOR=XXH_NEON\" CFLAGS=\"-O3 -march=armv7-a -fPIC -mfloat-abi=softfp -mfpu=neon-vfpv4\" LDFLAGS=\"-static\" CC=$XCC RUN_ENV=$XEMU make clean check\n        make -C tests clean\n        CPPFLAGS=\"-DXXH_VECTOR=XXH_SCALAR\" LDFLAGS=\"-static\" CC=$XCC RUN_ENV=$XEMU make -C tests sanity_test_vectors.h test_sanity\n\n    - name: AARCH64 (XXH_VECTOR=[ scalar, NEON, SVE ])\n      if: ${{ startsWith(matrix.name, 'AARCH64') }}\n      run: |\n        CPPFLAGS=\"-DXXH_VECTOR=XXH_SCALAR\" LDFLAGS=\"-static\" CC=$XCC RUN_ENV=$XEMU make clean check\n        CPPFLAGS=\"-DXXH_VECTOR=XXH_NEON\" LDFLAGS=\"-static\" CC=$XCC RUN_ENV=$XEMU make clean check\n        CPPFLAGS=\"-DXXH_VECTOR=XXH_SVE\" LDFLAGS=\"-static\" CC=\"$XCC -march=armv8.2-a+sve\" RUN_ENV=\"$XEMU -cpu max,sve128=on,sve256=off,sve512=off,sve1024=off,sve2048=off\" make clean check\n        CPPFLAGS=\"-DXXH_VECTOR=XXH_SVE\" LDFLAGS=\"-static\" CC=\"$XCC -march=armv8.2-a+sve\" RUN_ENV=\"$XEMU -cpu max,sve128=on,sve256=on,sve512=off,sve1024=off,sve2048=off\" make clean check\n        CPPFLAGS=\"-DXXH_VECTOR=XXH_SVE\" LDFLAGS=\"-static\" CC=\"$XCC -march=armv8.2-a+sve\" RUN_ENV=\"$XEMU -cpu max,sve128=on,sve256=on,sve512=on,sve1024=off,sve2048=off\" make clean check\n        CPPFLAGS=\"-DXXH_VECTOR=XXH_SVE\" LDFLAGS=\"-static\" CC=\"$XCC -march=armv8.2-a+sve\" RUN_ENV=\"$XEMU -cpu max,sve128=on,sve256=on,sve512=on,sve1024=on,sve2048=off\" make clean check\n        CPPFLAGS=\"-DXXH_VECTOR=XXH_SVE\" LDFLAGS=\"-static\" CC=\"$XCC -march=armv8.2-a+sve\" RUN_ENV=\"$XEMU -cpu max,sve128=on,sve256=on,sve512=on,sve1024=on,sve2048=on\" make clean check\n\n    - name: PPC64(LE) (XXH_VECTOR=[ scalar, VSX ])\n      if: ${{ startsWith(matrix.name, 'PPC64') }}\n      run: |\n        CPPFLAGS=\"-DXXH_VECTOR=XXH_SCALAR\" LDFLAGS=\"-static\" CC=$XCC RUN_ENV=$XEMU make clean check\n        CPPFLAGS=\"-DXXH_VECTOR=XXH_VSX\" CFLAGS=\"-O3 -maltivec -mvsx -mpower8-vector -mcpu=power8\" LDFLAGS=\"-static\" CC=$XCC RUN_ENV=$XEMU make clean check\n\n    - name: S390X (XXH_VECTOR=[ scalar, VSX ])\n      if: ${{ startsWith(matrix.name, 'S390X') }}\n      run: |\n        CPPFLAGS=\"-DXXH_VECTOR=XXH_SCALAR\" LDFLAGS=\"-static\" CC=$XCC RUN_ENV=$XEMU make clean check\n        CPPFLAGS=-DXXH_VECTOR=XXH_VSX CFLAGS=\"-O3 -march=arch11 -mzvector\" LDFLAGS=\"-static\" CC=$XCC RUN_ENV=$XEMU make clean check\n\n    - name: MIPS-M68K-RISCV-SPARC (XXH_VECTOR=[ scalar ])\n      if: ${{ startsWith(matrix.name, 'MIPS') || startsWith(matrix.name, 'M68K') || startsWith(matrix.name, 'RISC-V') || startsWith(matrix.name, 'SPARC') }}\n      run: |\n        make clean; LDFLAGS=\"-static\" CC=$XCC RUN_ENV=$XEMU make check\n\n    - name: LoongArch (XXH_VECTOR=[ scalar, LSX ])\n      if: ${{ startsWith(matrix.name, 'LoongArch') }}\n      run: |\n        CPPFLAGS=\"-DXXH_VECTOR=XXH_SCALAR\" LDFLAGS=\"-static\" CC=$XCC RUN_ENV=$XEMU make clean check\n        CPPFLAGS=-DXXH_VECTOR=XXH_LSX CFLAGS=\"-O3 -march=la464 -mlsx\" LDFLAGS=\"-static\" CC=$XCC RUN_ENV=$XEMU make clean check\n\n  # macOS\n\n  macos-general:\n    name: ${{ matrix.system.os }}\n    runs-on: ${{ matrix.system.os }}\n    strategy:\n      fail-fast: false  # 'false' means Don't stop matrix workflows even if some matrix failed.\n      matrix:\n        system: [\n          { os: macos-13     },\n          { os: macos-14     },\n          { os: macos-15     },\n          { os: macos-latest },\n        ]\n    steps:\n    - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n\n    - name: Environment info\n      run: |\n        echo && clang --version\n        echo && sysctl -a | grep machdep.cpu   # cpuinfo\n\n    - name: make\n      run: |\n        CFLAGS=\"-Werror\" make clean default\n\n    - name: make test\n      run: |\n        # test scenario where \"stdout\" is not the console\n        make clean test MOREFLAGS='-Werror' | tee\n\n\n  # Windows, { VC++2022, VC++2019 } x { x64, Win32, ARM, ARM64 }\n  #\n  # - Default shell for Windows environment is PowerShell Core.\n  #   https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell\n  #\n  # - \"windows-2022\" uses Visual Studio 2022.\n  #   https://github.com/actions/virtual-environments/blob/main/images/win/Windows2022-Readme.md#visual-studio-enterprise-2022\n  #\n  # - \"windows-2019\" uses Visual Studio 2019.\n  #   https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md#visual-studio-enterprise-2019\n\n  windows-visualc-general:\n    name: ${{ matrix.system.vc }}, ${{ matrix.arch }}\n    runs-on: ${{ matrix.system.os }}   # Runs-on foreach value of strategy.matrix.system.os\n    strategy:\n      fail-fast: false  # 'false' means: Don't stop matrix workflows even if some matrix failed.\n      matrix:\n        system: [\n          { os: windows-2022, vc: \"VC++ 2022\", clangcl: 'true', },\n          { os: windows-2019, vc: \"VC++ 2019\", clangcl: 'true', },\n        ]\n        arch: [ x64, Win32, ARM64 ]\n\n    steps:\n    - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n\n    - name: Build ${{ matrix.system.os }}, ${{ matrix.arch }}\n      run: |\n        cd cmake_unofficial\n        mkdir build\n        cd build\n        cmake .. -DCMAKE_BUILD_TYPE=Release -A ${{ matrix.arch }} -DCMAKE_C_FLAGS=\"/W4 /WX\"\n        cmake --build . --config Release\n\n    - name: Test\n      # Run benchmark for testing only if target arch is x64 or Win32.\n      if: ${{ matrix.arch == 'x64' || matrix.arch == 'Win32' }}\n      run: |\n        .\\cmake_unofficial\\build\\Release\\xxhsum.exe -bi1\n\n    - name: Build ${{ matrix.system.os }}, ${{ matrix.arch }}, with DISPATCH\n      # DISPATCH only if target arch is x64 or Win32.\n      if: ${{ ( matrix.arch == 'x64' || matrix.arch == 'Win32' ) }}\n      run: |\n        cd cmake_unofficial\n        mkdir build-visual-dispatch\n        cd build-visual-dispatch\n        cmake .. -DCMAKE_BUILD_TYPE=Release -DDISPATCH=ON -A x64 -DCMAKE_C_FLAGS=\"/W4 /WX\"\n        cmake --build . --config Release\n\n    - name: Runtime Test (DISPATCH)\n      # Run benchmark for testing only if target arch is x64 or Win32.\n      if: ${{ ( matrix.arch == 'x64' || matrix.arch == 'Win32' ) }}\n      run: |\n        .\\cmake_unofficial\\build-visual-dispatch\\Release\\xxhsum.exe -V | grep autoVec\n        .\\cmake_unofficial\\build-visual-dispatch\\Release\\xxhsum.exe -bi1\n\n\n    - name: Build ${{ matrix.system.os }}, clang-cl, ${{ matrix.arch }}\n      if: ${{ matrix.system.clangcl == 'true' }}\n      run: |\n        cd cmake_unofficial\n        mkdir build-clang-cl\n        cd build-clang-cl\n        cmake .. -DCMAKE_BUILD_TYPE=Release -A x64 -DCMAKE_GENERATOR_TOOLSET=ClangCL\n        cmake --build . --config Release\n\n    - name: Test (clang-cl)\n      # Run benchmark for testing only if target arch is x64 or Win32.\n      if: ${{ matrix.system.clangcl == 'true' && ( matrix.arch == 'x64' || matrix.arch == 'Win32' ) }}\n      run: |\n        .\\cmake_unofficial\\build-clang-cl\\Release\\xxhsum.exe -bi1\n\n\n\n  # Windows, { mingw64, mingw32 }\n  #\n  # - Shell for msys2 is sh (msys2).  defaults.run.shell is for this setting.\n  #\n  # https://github.com/msys2/MINGW-packages/blob/master/.github/workflows/main.yml\n  # https://github.com/actions/starter-workflows/issues/95\n\n  windows-msys2-general:\n    name: Windows ${{ matrix.msystem }}\n    runs-on: windows-latest\n    strategy:\n      fail-fast: false  # 'false' means Don't stop matrix workflows even if some matrix failed.\n      matrix:\n        include: [\n          { msystem: mingw64, toolchain: mingw-w64-x86_64-toolchain },\n          { msystem: mingw32, toolchain: mingw-w64-i686-toolchain },\n        ]\n    defaults:\n      run:\n        shell: msys2 {0}\n    steps:\n      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n      - uses: msys2/setup-msys2@7efe20baefed56359985e327d329042cde2434ff # v2\n        with:\n          msystem: MSYS\n          install: mingw-w64-i686-make ${{ matrix.toolchain }}\n          update: true\n\n      - name: Update\n        run: |\n          pacman --noconfirm -Suuy\n          pacman --noconfirm -Suu\n\n      - name: mingw64\n        if: ${{ matrix.msystem == 'mingw64' }}\n        run: |\n          PATH=/mingw64/bin:$PATH /mingw32/bin/mingw32-make clean test gcc-og-test MOREFLAGS=-Werror\n          PATH=/mingw64/bin:$PATH /mingw32/bin/mingw32-make -C tests/bench\n          # Abort if result of \"file ./xxhsum.exe\" doesn't contain 'x86-64'.\n          # Expected output is \"./xxhsum.exe: PE32+ executable (console) x86-64, for MS Windows\"\n          file ./xxhsum.exe\n          file ./xxhsum.exe | grep -q 'x86-64' || $(exit 1)\n          ./xxhsum.exe --version\n\n      - name: mingw32\n        if: ${{ matrix.msystem == 'mingw32' }}\n        run: |\n          PATH=/mingw32/bin:$PATH /mingw32/bin/mingw32-make.exe clean test MOREFLAGS=-Werror\n          PATH=/mingw32/bin:$PATH /mingw32/bin/mingw32-make.exe -C tests/bench\n          # Abort if result of \"file ./xxhsum.exe\" doesn't contain '80386'.\n          # Expected output is \"./xxhsum.exe: PE32 executable (console) Intel i386, for MS Windows\"\n          file ./xxhsum.exe\n          file ./xxhsum.exe | grep -q '386' || $(exit 1)\n          ./xxhsum.exe --version\n"
  },
  {
    "path": "third-party/xxhash/.github/workflows/scorecard.yml",
    "content": "# This workflow uses actions that are not certified by GitHub. They are provided\n# by a third-party and are governed by separate terms of service, privacy\n# policy, and support documentation.\n\nname: Scorecard supply-chain security\non:\n  # For Branch-Protection check. Only the default branch is supported. See\n  # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection\n  branch_protection_rule:\n  # To guarantee Maintained check is occasionally updated. See\n  # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained\n  schedule:\n    - cron: '35 19 * * 2'\n  push:\n    branches: [ \"dev\" ]\n\n# Declare default permissions as read only.\npermissions: read-all\n\njobs:\n  analysis:\n    name: Scorecard analysis\n    runs-on: ubuntu-latest\n    permissions:\n      # Needed to upload the results to code-scanning dashboard.\n      security-events: write\n      # Needed to publish results and get a badge (see publish_results below).\n      id-token: write\n      # Uncomment the permissions below if installing in a private repository.\n      # contents: read\n      # actions: read\n\n    steps:\n      - name: \"Checkout code\"\n        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n        with:\n          persist-credentials: false\n\n      - name: \"Run analysis\"\n        uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1\n        with:\n          results_file: results.sarif\n          results_format: sarif\n          # (Optional) \"write\" PAT token. Uncomment the `repo_token` line below if:\n          # - you want to enable the Branch-Protection check on a *public* repository, or\n          # - you are installing Scorecard on a *private* repository\n          # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.\n          # repo_token: ${{ secrets.SCORECARD_TOKEN }}\n\n          # Public repositories:\n          #   - Publish results to OpenSSF REST API for easy access by consumers\n          #   - Allows the repository to include the Scorecard badge.\n          #   - See https://github.com/ossf/scorecard-action#publishing-results.\n          # For private repositories:\n          #   - `publish_results` will always be set to `false`, regardless\n          #     of the value entered here.\n          publish_results: true\n\n      # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF\n      # format to the repository Actions tab.\n      - name: \"Upload artifact\"\n        uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3\n        with:\n          name: SARIF file\n          path: results.sarif\n          retention-days: 5\n\n      # Upload the results to GitHub's code scanning dashboard.\n      - name: \"Upload to code-scanning\"\n        uses: github/codeql-action/upload-sarif@c6c77c8c2d62cfd5b2e8d548817fd3d1582ac744 # v2.14.5\n        with:\n          sarif_file: results.sarif\n"
  },
  {
    "path": "third-party/xxhash/.gitignore",
    "content": "# objects\n*.o\n*.obj\n*.s\n\n# libraries\nlibxxhash.*\n!libxxhash.pc.in\n\n# Executables\n*.exe\nxxh32sum\nxxh64sum\nxxh128sum\nxxh3sum\nxxhsum\nxxhsum32\nxxhsum_privateXXH\nxxhsum_inlinedXXH\ndispatch\ntests/generate_unicode_test\ntests/sanity_test\ntests/sanity_test_vectors_generator\nfuzzer\n\n# Mac OS-X artefacts\n*.dSYM\n.DS_Store\n\n# Wasm / emcc / emscripten artefacts\n*.html\n*.wasm\n*.js\n\n# CMake build directories\nbuild*/\n\n# project managers artifacts\n.projectile\n\n# analyzer artifacts\ninfer-out\n\n# test artifacts\n.test*\ntmp*\ntests/*.unicode\ntests/unicode_test*\n*.txt\n!CMakeLists.txt\n*.xxhsum\n\n# editor artifacts\n.clang_complete\n.clangd\n*.swp\n.vscode/\n.vs/\n\n# Doxygen\ndoxygen/\n"
  },
  {
    "path": "third-party/xxhash/CHANGELOG",
    "content": "v0.8.3\n- fix  : variant `XXH3_128bits_withSecretandSeed()` could produce an invalid result in some specific set of conditions, #894 by @hltj\n- cli  : vector extension detected at runtime on x86/x64, enabled by default\n- cli  : new commands `--filelist` and `--files-from`, by @Ian-Clowes\n- cli  : XXH3 64-bits GNU format can now be generated and checked (command `-H3`)\n- portability: LoongArch SX SIMD extension, by @lrzlin\n- portability: can build on AIX, suggested by @likema\n- portability: validated for SPARC cpus\n\nv0.8.2\n- fix  : XXH3 S390x vector implementation (@hzhuang1)\n- fix  : PowerPC vector compilation with IBM XL compiler (@MaxiBoether)\n- perf : improved WASM speed by x2/x3 using SIMD128 (@easyaspi314)\n- perf : improved speed (+20%) for XXH3 on ARM NEON (@easyaspi314)\n- cli  : Fix filename contain /LF character (@t-mat)\n- cli  : Support # comment lines in --check files (@t-mat)\n- cli  : Support commands --binary and --ignore-missing (@t-mat)\n- build: fix -Og compilation (@easyaspi314, @t-mat)\n- build: fix pkgconfig generation with cmake (@ilya-fedin)\n- build: fix icc compilation\n- build: fix cmake install directories\n- build: new build options XXH_NO_XXH3, XXH_SIZE_OPT and XXH_NO_STREAM to reduce binary size (@easyaspi314)\n- build: dedicated install targets (@ffontaine)\n- build: support DISPATCH mode in cmake (@hzhuang1)\n- portability: fix x86dispatch when building with Visual + clang-cl (@t-mat)\n- portability: SVE vector implementation of XXH3 (@hzhuang1)\n- portability: compatibility with freestanding environments, using XXH_NO_STDLIB\n- portability: can build on Haiku (@Begasus)\n- portability: validated on m68k and risc-v\n- doc  : XXH3 specification (@Adrien1018)\n- doc  : improved doxygen documentation (@easyaspi314, @t-mat)\n- misc : dedicated sanity test binary (@t-mat)\n\nv0.8.1\n- perf : much improved performance for XXH3 streaming variants, notably on gcc and msvc\n- perf : improved XXH64 speed and latency on small inputs\n- perf : small XXH32 speed and latency improvement on small inputs of random size\n- perf : minor stack usage improvement for XXH32 and XXH64\n- api  : new experimental variants XXH3_*_withSecretandSeed()\n- api  : update XXH3_generateSecret(), can no generate secret of any size (>= XXH3_SECRET_SIZE_MIN)\n- cli  : xxhsum can now generate and check XXH3 checksums, using command `-H3`\n- build: can build xxhash without XXH3, with new build macro XXH_NO_XXH3\n- build: fix xxh_x86dispatch build with MSVC, by @apankrat\n- build: XXH_INLINE_ALL can always be used safely, even after XXH_NAMESPACE or a previous XXH_INLINE_ALL\n- build: improved PPC64LE vector support, by @mpe\n- install: fix pkgconfig, by @ellert\n- install: compatibility with Haiku, by @Begasus\n- doc  : code comments made compatible with doxygen, by @easyaspi314\n- misc : XXH_ACCEPT_NULL_INPUT_POINTER is no longer necessary, all functions can accept NULL input pointers, as long as size == 0\n- misc : complete refactor of CI tests on Github Actions, offering much larger coverage, by @t-mat\n- misc : xxhsum code base split into multiple specialized units, within directory cli/, by @easyaspi314\n\nv0.8.0\n- api : stabilize XXH3\n- cli : xxhsum can parse BSD-style --check lines, by @WayneD\n- cli : `xxhsum -` accepts console input, requested by @jaki\n- cli : xxhsum accepts -- separator, by @jaki\n- cli : fix : print correct default algo for symlinked helpers, by @martinetd\n- install: improved pkgconfig script, allowing custom install locations, requested by @ellert\n\nv0.7.4\n- perf: automatic vector detection and selection at runtime (`xxh_x86dispatch.h`), initiated by @easyaspi314\n- perf: added AVX512 support, by @gzm55\n- api : new: secret generator `XXH_generateSecret()`, suggested by @koraa\n- api : fix: XXH3_state_t is movable, identified by @koraa\n- api : fix: state is correctly aligned in AVX mode (unlike `malloc()`), by @easyaspi314\n- api : fix: streaming generated wrong values in some combination of random ingestion lengths, reported by @WayneD\n- cli : fix unicode print on Windows, by @easyaspi314\n- cli : can `-c` check file generated by sfv\n- build: `make DISPATCH=1` generates `xxhsum` and `libxxhash` with runtime vector detection (x86/x64 only)\n- install: cygwin installation support\n- doc : Cryptol specification of XXH32 and XXH64, by @weaversa\n\nv0.7.3\n- perf: improved speed for large inputs (~+20%)\n- perf: improved latency for small inputs (~10%)\n- perf: s390x Vectorial code, by @easyaspi314\n- cli: improved support for Unicode filenames on Windows, thanks to @easyaspi314 and @t-mat\n- api: `xxhash.h` can now be included in any order, with and without `XXH_STATIC_LINKING_ONLY` and `XXH_INLINE_ALL`\n- build: xxHash's implementation transferred into `xxhash.h`. No more need to have `xxhash.c` in the `/include` directory for `XXH_INLINE_ALL` to work\n- install: created pkg-config file, by @bket\n- install: VCpkg installation instructions, by @LilyWangL\n- doc: Highly improved code documentation, by @easyaspi314\n- misc: New test tool in `/tests/collisions`: brute force collision tester for 64-bit hashes\n\nv0.7.2\n- Fixed collision ratio of `XXH128` for some specific input lengths, reported by @svpv\n- Improved `VSX` and `NEON` variants, by @easyaspi314\n- Improved performance of scalar code path (`XXH_VECTOR=0`), by @easyaspi314\n- `xxhsum`: can generate 128-bit hashes with the `-H2` option (note: for experimental purposes only! `XXH128` is not yet frozen)\n- `xxhsum`: option `-q` removes status notifications\n\nv0.7.1\n- Secret first: the algorithm computation can be altered by providing a \"secret\", which is any blob of bytes, of size >= `XXH3_SECRET_SIZE_MIN`.\n- `seed` is still available, and acts as a secret generator\n- updated `ARM NEON` variant by @easyaspi314\n- Streaming implementation is available\n- Improve compatibility and performance with Visual Studio, with help from @aras-p\n- Better integration when using `XXH_INLINE_ALL`: do not pollute host namespace, use its own macros, such as `XXH_ASSERT()`, `XXH_ALIGN`, etc.\n- 128-bit variant provides helper functions for comparison of hashes.\n- Better `clang` generation of `rotl` instruction, thanks to @easyaspi314\n- `XXH_REROLL` build macro to reduce binary size, by @easyaspi314\n- Improved `cmake` script, by @Mezozoysky\n- Full benchmark program provided in `/tests/bench`\n"
  },
  {
    "path": "third-party/xxhash/Doxyfile",
    "content": "# Doxygen config for xxHash\nDOXYFILE_ENCODING      = UTF-8\n\nPROJECT_NAME           = \"xxHash\"\nPROJECT_NUMBER         = \"0.8.2\"\nPROJECT_BRIEF          = \"Extremely fast non-cryptographic hash function\"\nOUTPUT_DIRECTORY       = doxygen\nOUTPUT_LANGUAGE        = English\n\n# We already separate the internal docs.\nINTERNAL_DOCS          = NO\n# Consistency\nSORT_MEMBER_DOCS       = NO\nBRIEF_MEMBER_DESC      = YES\nREPEAT_BRIEF           = YES\n\n# Warnings\nQUIET                  = YES\n# Until we document everything\nWARN_IF_UNDOCUMENTED   = NO\n\n# TODO: Add the other files. It is just xxhash.h for now.\nFILE_PATTERNS          = xxhash.h xxh_x86dispatch.c\n# Note: xxHash's source files are technically ASCII only.\nINPUT_ENCODING         = UTF-8\nTAB_SIZE               = 4\nMARKDOWN_SUPPORT       = YES\n\n# xxHash is a C library\nOPTIMIZE_OUTPUT_FOR_C  = YES\n# We hide private part from public document\nEXTRACT_STATIC         = NO\n# We hide private part from public document\nEXTRACT_PRIVATE        = NO\n# Document the macros\nMACRO_EXPANSION        = YES\nEXPAND_ONLY_PREDEF     = YES\n# Predefine some macros to clean up the output.\nPREDEFINED             = \"XXH_DOXYGEN=\" \\\n                         \"XXH_PUBLIC_API=\" \\\n                         \"XXH_NOESCAPE=\" \\\n                         \"XXH_FORCE_INLINE=static inline\" \\\n                         \"XXH_NO_INLINE=static\" \\\n                         \"XXH_RESTRICT=restrict\" \\\n                         \"XSUM_API=\" \\\n                         \"XXH_STATIC_LINKING_ONLY\" \\\n                         \"XXH_IMPLEMENTATION\" \\\n                         \"XXH_PUREF=[[gnu::pure]]\" \\\n                         \"XXH_CONSTF=[[gnu::const]]\" \\\n                         \"XXH_MALLOCF=[[gnu::malloc]]\" \\\n                         \"XXH_ALIGN(N)=alignas(N)\" \\\n                         \"XXH_ALIGN_MEMBER(align,type)=alignas(align) type\"\n\n# We want HTML docs\nGENERATE_HTML          = YES\nHTML_OUTPUT            = html\nHTML_FILE_EXTENSION    = .html\n# Tweak the colors a bit\nHTML_COLORSTYLE_HUE    = 220\nHTML_COLORSTYLE_GAMMA  = 100\nHTML_COLORSTYLE_SAT    = 100\n\n# We don't want LaTeX.\nGENERATE_LATEX         = NO\n"
  },
  {
    "path": "third-party/xxhash/Doxyfile-internal",
    "content": "# Doxygen config for xxHash\nDOXYFILE_ENCODING      = UTF-8\n\nPROJECT_NAME           = \"xxHash\"\nPROJECT_NUMBER         = \"0.8.2\"\nPROJECT_BRIEF          = \"Extremely fast non-cryptographic hash function\"\nOUTPUT_DIRECTORY       = doxygen\nOUTPUT_LANGUAGE        = English\n\n# We already separate the internal docs.\nINTERNAL_DOCS          = YES\n# Consistency\nSORT_MEMBER_DOCS       = NO\nBRIEF_MEMBER_DESC      = YES\nREPEAT_BRIEF           = YES\n\n# Warnings\nQUIET                  = YES\n# Until we document everything\nWARN_IF_UNDOCUMENTED   = NO\n\n# TODO: Add the other files. It is just xxhash.h for now.\nFILE_PATTERNS          = xxhash.h xxh_x86dispatch.c\n# Note: xxHash's source files are technically ASCII only.\nINPUT_ENCODING         = UTF-8\nTAB_SIZE               = 4\nMARKDOWN_SUPPORT       = YES\n\n# xxHash is a C library\nOPTIMIZE_OUTPUT_FOR_C  = YES\n# So we can document the internals\nEXTRACT_STATIC         = YES\n# We show private part in the internal document\nEXTRACT_PRIVATE        = YES\n# Document the macros\nMACRO_EXPANSION        = YES\nEXPAND_ONLY_PREDEF     = YES\n# Predefine some macros to clean up the output.\nPREDEFINED             = \"XXH_DOXYGEN=\" \\\n                         \"XXH_PUBLIC_API=\" \\\n                         \"XXH_NOESCAPE=\" \\\n                         \"XXH_FORCE_INLINE=static inline\" \\\n                         \"XXH_NO_INLINE=static\" \\\n                         \"XXH_RESTRICT=restrict\" \\\n                         \"XSUM_API=\" \\\n                         \"XXH_STATIC_LINKING_ONLY\" \\\n                         \"XXH_IMPLEMENTATION\" \\\n                         \"XXH_PUREF=[[gnu::pure]]\" \\\n                         \"XXH_CONSTF=[[gnu::const]]\" \\\n                         \"XXH_MALLOCF=[[gnu::malloc]]\" \\\n                         \"XXH_ALIGN(N)=alignas(N)\" \\\n                         \"XXH_ALIGN_MEMBER(align,type)=alignas(align) type\"\n\n# We want HTML docs\nGENERATE_HTML          = YES\nHTML_OUTPUT            = html\nHTML_FILE_EXTENSION    = .html\n# Tweak the colors a bit\nHTML_COLORSTYLE_HUE    = 220\nHTML_COLORSTYLE_GAMMA  = 100\nHTML_COLORSTYLE_SAT    = 100\n\n# We don't want LaTeX.\nGENERATE_LATEX         = NO\n"
  },
  {
    "path": "third-party/xxhash/LICENSE",
    "content": "xxHash Library\nCopyright (c) 2012-2021 Yann Collet\nAll rights reserved.\n\nBSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice, this\n  list of conditions and the following disclaimer in the documentation and/or\n  other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "third-party/xxhash/Makefile",
    "content": "# ################################################################\n# xxHash Makefile\n# Copyright (C) 2012-2024 Yann Collet\n#\n# GPL v2 License\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License along\n# with this program; if not, write to the Free Software Foundation, Inc.,\n# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n#\n# You can contact the author at:\n#   - xxHash homepage: https://www.xxhash.com\n#   - xxHash source repository: https://github.com/Cyan4973/xxHash\n# ################################################################\n# xxhsum: provides 32/64 bits hash of one or multiple files, or stdin\n# ################################################################\nQ = $(if $(filter 1,$(V) $(VERBOSE)),,@)\n\n# Version numbers\nSED ?= sed\nSED_ERE_OPT ?= -E\nLIBVER_MAJOR_SCRIPT:=`$(SED) -n '/define XXH_VERSION_MAJOR/s/.*[[:blank:]]\\([0-9][0-9]*\\).*/\\1/p' < xxhash.h`\nLIBVER_MINOR_SCRIPT:=`$(SED) -n '/define XXH_VERSION_MINOR/s/.*[[:blank:]]\\([0-9][0-9]*\\).*/\\1/p' < xxhash.h`\nLIBVER_PATCH_SCRIPT:=`$(SED) -n '/define XXH_VERSION_RELEASE/s/.*[[:blank:]]\\([0-9][0-9]*\\).*/\\1/p' < xxhash.h`\nLIBVER_MAJOR := $(shell echo $(LIBVER_MAJOR_SCRIPT))\nLIBVER_MINOR := $(shell echo $(LIBVER_MINOR_SCRIPT))\nLIBVER_PATCH := $(shell echo $(LIBVER_PATCH_SCRIPT))\nLIBVER := $(LIBVER_MAJOR).$(LIBVER_MINOR).$(LIBVER_PATCH)\n\nCFLAGS ?= -O3\nDEBUGFLAGS+=-Wall -Wextra -Wconversion -Wcast-qual -Wcast-align -Wshadow \\\n            -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement \\\n            -Wstrict-prototypes -Wundef -Wpointer-arith -Wformat-security \\\n            -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \\\n            -Wredundant-decls -Wstrict-overflow=2\nCFLAGS += $(DEBUGFLAGS) $(MOREFLAGS)\nFLAGS   = $(CFLAGS) $(CPPFLAGS)\nXXHSUM_VERSION = $(LIBVER)\nUNAME := $(shell uname)\n\n# Define *.exe as extension for Windows systems\nifneq (,$(filter Windows%,$(OS)))\nEXT =.exe\nelse\nEXT =\nendif\n\n# automatically enable runtime vector dispatch on x86/64 targets\ndetect_x86_arch = $(shell $(CC) -dumpmachine | grep -E 'i[3-6]86|x86_64')\nifneq ($(strip $(call detect_x86_arch)),)\n    #note: can be overridden at compile time, by setting DISPATCH=0\n    DISPATCH ?= 1\nendif\n\nifeq ($(NODE_JS),1)\n    # Link in unrestricted filesystem support\n    LDFLAGS += -sNODERAWFS\n    # Set flag to fix isatty() support\n    CPPFLAGS += -DXSUM_NODE_JS=1\nendif\n\n# OS X linker doesn't support -soname, and use different extension\n# see: https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html\nifeq ($(UNAME), Darwin)\n\tSHARED_EXT = dylib\n\tSHARED_EXT_MAJOR = $(LIBVER_MAJOR).$(SHARED_EXT)\n\tSHARED_EXT_VER = $(LIBVER).$(SHARED_EXT)\n\tSONAME_FLAGS = -install_name $(LIBDIR)/libxxhash.$(SHARED_EXT_MAJOR) -compatibility_version $(LIBVER_MAJOR) -current_version $(LIBVER)\nelse\n\tSONAME_FLAGS = -Wl,-soname=libxxhash.$(SHARED_EXT).$(LIBVER_MAJOR)\n\tSHARED_EXT = so\n\tSHARED_EXT_MAJOR = $(SHARED_EXT).$(LIBVER_MAJOR)\n\tSHARED_EXT_VER = $(SHARED_EXT).$(LIBVER)\nendif\n\nLIBXXH = libxxhash.$(SHARED_EXT_VER)\n\nXXHSUM_SRC_DIR = cli\nXXHSUM_SPLIT_SRCS = $(XXHSUM_SRC_DIR)/xxhsum.c \\\n                    $(XXHSUM_SRC_DIR)/xsum_os_specific.c \\\n                    $(XXHSUM_SRC_DIR)/xsum_arch.c \\\n                    $(XXHSUM_SRC_DIR)/xsum_output.c \\\n                    $(XXHSUM_SRC_DIR)/xsum_sanity_check.c \\\n                    $(XXHSUM_SRC_DIR)/xsum_bench.c\nXXHSUM_SPLIT_OBJS = $(XXHSUM_SPLIT_SRCS:.c=.o)\nXXHSUM_HEADERS = $(XXHSUM_SRC_DIR)/xsum_config.h \\\n                 $(XXHSUM_SRC_DIR)/xsum_arch.h \\\n                 $(XXHSUM_SRC_DIR)/xsum_os_specific.h \\\n                 $(XXHSUM_SRC_DIR)/xsum_output.h \\\n                 $(XXHSUM_SRC_DIR)/xsum_sanity_check.h \\\n                 $(XXHSUM_SRC_DIR)/xsum_bench.h\n\n## generate CLI and libraries in release mode (default for `make`)\n.PHONY: default\ndefault: DEBUGFLAGS=\ndefault: lib xxhsum_and_links\n\n.PHONY: all\nall: lib xxhsum xxhsum_inlinedXXH\n\n## xxhsum is the command line interface (CLI)\nifeq ($(DISPATCH),1)\nxxhsum: CPPFLAGS += -DXXHSUM_DISPATCH=1\nxxhsum: xxh_x86dispatch.o\nendif\nxxhsum: xxhash.o $(XXHSUM_SPLIT_OBJS)\n\t$(CC) $(FLAGS) $^ $(LDFLAGS) -o $@$(EXT)\n\nxxhsum32: CFLAGS += -m32  ## generate CLI in 32-bits mode\nxxhsum32: xxhash.c $(XXHSUM_SPLIT_SRCS) ## do not generate object (avoid mixing different ABI)\n\t$(CC) $(FLAGS) $^ $(LDFLAGS) -o $@$(EXT)\n\n## dispatch only works for x86/x64 systems\ndispatch: CPPFLAGS += -DXXHSUM_DISPATCH=1\ndispatch: xxhash.o xxh_x86dispatch.o $(XXHSUM_SPLIT_SRCS)\n\t$(CC) $(FLAGS) $^ $(LDFLAGS) -o $@$(EXT)\n\nxxhash.o: xxhash.c xxhash.h\nxxhsum.o: $(XXHSUM_SRC_DIR)/xxhsum.c $(XXHSUM_HEADERS) \\\n    xxhash.h xxh_x86dispatch.h\nxxh_x86dispatch.o: xxh_x86dispatch.c xxh_x86dispatch.h xxhash.h\n\n.PHONY: xxhsum_and_links\nxxhsum_and_links: xxhsum xxh32sum xxh64sum xxh128sum xxh3sum\n\nxxh32sum xxh64sum xxh128sum xxh3sum: xxhsum\n\tln -sf $<$(EXT) $@$(EXT)\n\nxxhsum_inlinedXXH: CPPFLAGS += -DXXH_INLINE_ALL\nxxhsum_inlinedXXH: $(XXHSUM_SPLIT_SRCS)\n\t$(CC) $(FLAGS) $< -o $@$(EXT)\n\n\n# library\n\nlibxxhash.a: ARFLAGS = rcs\nlibxxhash.a: xxhash.o\n\t$(AR) $(ARFLAGS) $@ $^\n\n$(LIBXXH): LDFLAGS += -shared\nifeq (,$(filter Windows%,$(OS)))\n$(LIBXXH): CFLAGS += -fPIC\nendif\nifeq ($(LIBXXH_DISPATCH),1)\n$(LIBXXH): xxh_x86dispatch.c\nendif\n$(LIBXXH): xxhash.c\n\t$(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@\n\tln -sf $@ libxxhash.$(SHARED_EXT_MAJOR)\n\tln -sf $@ libxxhash.$(SHARED_EXT)\n\n.PHONY: libxxhash\nlibxxhash:  ## generate dynamic xxhash library\nlibxxhash: $(LIBXXH)\n\n.PHONY: lib\nlib:  ## generate static and dynamic xxhash libraries\nlib: libxxhash.a libxxhash\n\n# helper targets\n\nAWK  = awk\nGREP = grep\nSORT = sort\nNM   = nm\n\n.PHONY: list\nlist:  ## list all Makefile targets\n\t$(Q)$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | $(AWK) -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ \"^[#.]\") {print $$1}}' | $(SORT) | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs\n\n.PHONY: help\nhelp:  ## list documented targets\n\t$(Q)$(GREP) -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \\\n\t$(SORT) | \\\n\t$(AWK) 'BEGIN {FS = \":.*?## \"}; {printf \"\\033[36m%-30s\\033[0m %s\\n\", $$1, $$2}'\n\n.PHONY: clean\nclean:  ## remove all build artifacts\n\t$(Q)$(RM) -r *.dSYM   # Mac OS-X specific\n\t$(Q)$(RM) core *.o *.obj *.$(SHARED_EXT) *.$(SHARED_EXT).* *.a libxxhash.pc\n\t$(Q)$(RM) xxhsum$(EXT) xxhsum32$(EXT) xxhsum_inlinedXXH$(EXT) dispatch$(EXT)\n\t$(Q)$(RM) xxhsum.wasm xxhsum.js xxhsum.html\n\t$(Q)$(RM) xxh32sum$(EXT) xxh64sum$(EXT) xxh128sum$(EXT) xxh3sum$(EXT)\n\t$(Q)$(RM) fuzzer\n\t$(Q)$(RM) $(XXHSUM_SRC_DIR)/*.o $(XXHSUM_SRC_DIR)/*.obj\n\t$(MAKE) -C tests clean\n\t$(MAKE) -C tests/bench clean\n\t$(MAKE) -C tests/collisions clean\n\t@echo cleaning completed\n\n\n# =================================================\n# tests\n# =================================================\n\n# make check can be run with cross-compiled binaries on emulated environments (qemu user mode)\n# by setting $(RUN_ENV) to the target emulation environment\n.PHONY: check\ncheck: xxhsum test_sanity   ## basic tests for xxhsum CLI, set RUN_ENV for emulated environments\n\t# stdin\n\t# If you get \"Wrong parameters\" on Emscripten+Node.js, recompile with `NODE_JS=1`\n\t$(RUN_ENV) ./xxhsum$(EXT) < xxhash.c\n\t# multiple files\n\t$(RUN_ENV) ./xxhsum$(EXT) xxhash.*\n\t# internal bench\n\t$(RUN_ENV) ./xxhsum$(EXT) -bi0\n\t# long bench command\n\t$(RUN_ENV) ./xxhsum$(EXT) --benchmark-all -i0\n\t# bench multiple variants\n\t$(RUN_ENV) ./xxhsum$(EXT) -b1,2,3 -i0\n\t# file bench\n\t$(RUN_ENV) ./xxhsum$(EXT) -bi0 xxhash.c\n\t# 32-bit\n\t$(RUN_ENV) ./xxhsum$(EXT) -H0 xxhash.c\n\t# 128-bit\n\t$(RUN_ENV) ./xxhsum$(EXT) -H2 xxhash.c\n\t# XXH3 (enforce BSD style)\n\t$(RUN_ENV) ./xxhsum$(EXT) -H3 xxhash.c | grep \"XXH3\"\n\t# request incorrect variant\n\t$(RUN_ENV) ./xxhsum$(EXT) -H9 xxhash.c ; test $$? -eq 1\n\t@printf \"\\n .......   checks completed successfully   ....... \\n\"\n\n.PHONY: test-unicode\ntest-unicode:\n\t$(MAKE) -C tests test_unicode\n\n.PHONY: test_sanity\ntest_sanity:\n\t$(MAKE) -C tests test_sanity\n\n.PHONY: test-mem\nVALGRIND = valgrind --leak-check=yes --error-exitcode=1\ntest-mem: RUN_ENV = $(VALGRIND)\ntest-mem: xxhsum check\n\n.PHONY: test32\ntest32: xxhsum32\n\t@echo ---- test 32-bit ----\n\t./xxhsum32 -bi0 xxhash.c\n\nTEST_FILES = xxhsum$(EXT) xxhash.c xxhash.h\n.PHONY: test-xxhsum-c\ntest-xxhsum-c: xxhsum\n\t# xxhsum to/from pipe\n\t./xxhsum $(TEST_FILES) | ./xxhsum -c -\n\t./xxhsum -H0 $(TEST_FILES) | ./xxhsum -c -\n\t# xxhsum -c is unable to verify checksum of file from STDIN (#470)\n\t./xxhsum < README.md > .test.README.md.xxh\n\t./xxhsum -c .test.README.md.xxh < README.md\n\t# xxhsum -q does not display \"Loading\" message into stderr (#251)\n\t! ./xxhsum -q $(TEST_FILES) 2>&1 | grep Loading\n\t# xxhsum does not display \"Loading\" message into stderr either\n\t! ./xxhsum $(TEST_FILES) 2>&1 | grep Loading\n\t# Check that xxhsum do display filename that it failed to open.\n\tLC_ALL=C ./xxhsum nonexistent 2>&1 | grep \"Error: Could not open 'nonexistent'\"\n\t# xxhsum to/from file, shell redirection\n\t./xxhsum $(TEST_FILES) > .test.xxh64\n\t./xxhsum --tag $(TEST_FILES) > .test.xxh64_tag\n\t./xxhsum --little-endian $(TEST_FILES) > .test.le_xxh64\n\t./xxhsum --tag --little-endian $(TEST_FILES) > .test.le_xxh64_tag\n\t./xxhsum -H0 $(TEST_FILES) > .test.xxh32\n\t./xxhsum -H0 --tag $(TEST_FILES) > .test.xxh32_tag\n\t./xxhsum -H0 --little-endian $(TEST_FILES) > .test.le_xxh32\n\t./xxhsum -H0 --tag --little-endian $(TEST_FILES) > .test.le_xxh32_tag\n\t./xxhsum -H2 $(TEST_FILES) > .test.xxh128\n\t./xxhsum -H2 --tag $(TEST_FILES) > .test.xxh128_tag\n\t./xxhsum -H2 --little-endian $(TEST_FILES) > .test.le_xxh128\n\t./xxhsum -H2 --tag --little-endian $(TEST_FILES) > .test.le_xxh128_tag\n\t./xxhsum -H3 $(TEST_FILES) > .test.xxh3\n\t./xxhsum -H3 --tag $(TEST_FILES) > .test.xxh3_tag\n\t./xxhsum -H3 --little-endian $(TEST_FILES) > .test.le_xxh3\n\t./xxhsum -H3 --tag --little-endian $(TEST_FILES) > .test.le_xxh3_tag\n\t./xxhsum -c .test.xxh*\n\t./xxhsum -c --little-endian .test.le_xxh*\n\t./xxhsum -c .test.*_tag\n\t# read list of files from stdin\n\t./xxhsum -c < .test.xxh32\n\t./xxhsum -c < .test.xxh64\n\t./xxhsum -c < .test.xxh128\n\t./xxhsum -c < .test.xxh3\n\tcat .test.xxh* | ./xxhsum -c -\n\t# check variant with '*' marker as second separator\n\t$(SED) 's/  / \\*/' .test.xxh32 | ./xxhsum -c\n\t# bsd-style output\n\t./xxhsum --tag xxhsum* | $(GREP) XXH64\n\t./xxhsum --tag -H0 xxhsum* | $(GREP) XXH32\n\t./xxhsum --tag -H1 xxhsum* | $(GREP) XXH64\n\t./xxhsum --tag -H2 xxhsum* | $(GREP) XXH128\n\t./xxhsum --tag -H3 xxhsum* | $(GREP) XXH3\n\t./xxhsum       -H3 xxhsum* | $(GREP) XXH3_ # prefix for GNU format\n\t./xxhsum --tag -H32 xxhsum* | $(GREP) XXH32\n\t./xxhsum --tag -H64 xxhsum* | $(GREP) XXH64\n\t./xxhsum --tag -H128 xxhsum* | $(GREP) XXH128\n\t./xxhsum --tag -H0 --little-endian xxhsum* | $(GREP) XXH32_LE\n\t./xxhsum --tag -H1 --little-endian xxhsum* | $(GREP) XXH64_LE\n\t./xxhsum --tag -H2 --little-endian xxhsum* | $(GREP) XXH128_LE\n\t./xxhsum --tag -H3 --little-endian xxhsum* | $(GREP) XXH3_LE\n\t./xxhsum --tag -H32 --little-endian xxhsum* | $(GREP) XXH32_LE\n\t./xxhsum --tag -H64 --little-endian xxhsum* | $(GREP) XXH64_LE\n\t./xxhsum --tag -H128 --little-endian xxhsum* | $(GREP) XXH128_LE\n\t# check bsd-style\n\t./xxhsum --tag xxhsum* | ./xxhsum -c\n\t./xxhsum --tag -H32 --little-endian xxhsum* | ./xxhsum -c\n\t# xxhsum -c warns improperly format lines.\n\techo '12345678 ' >>.test.xxh32\n\t./xxhsum -c .test.xxh32 | $(GREP) improperly\n\techo '123456789  file' >>.test.xxh64\n\t./xxhsum -c .test.xxh64 | $(GREP) improperly\n\t# Expects \"FAILED\"\n\techo \"0000000000000000  LICENSE\" | ./xxhsum -c -; test $$? -eq 1\n\techo \"00000000  LICENSE\" | ./xxhsum -c -; test $$? -eq 1\n\t# Expects \"FAILED open or read\"\n\techo \"0000000000000000  test-expects-file-not-found\" | ./xxhsum -c -; test $$? -eq 1\n\techo \"00000000  test-expects-file-not-found\" | ./xxhsum -c -; test $$? -eq 1\n\t# --filelist\n\techo xxhash.c > .test.filenames\n\t$(RUN_ENV) ./xxhsum$(EXT) --filelist .test.filenames\n\t# --filelist from stdin\n\tcat .test.filenames | $(RUN_ENV) ./xxhsum$(EXT) --filelist\n\t@$(RM) .test.*\n\nLIB_FUZZING_ENGINE?=\"-fsanitize=fuzzer\"\nCC_VERSION := $(shell $(CC) --version)\nifneq (,$(findstring clang,$(CC_VERSION)))\nfuzzer: libxxhash.a fuzz/fuzzer.c\n\t$(CC) $(CFLAGS) $(LIB_FUZZING_ENGINE) -I. -o fuzzer fuzz/fuzzer.c -L. -Wl,-Bstatic -lxxhash -Wl,-Bdynamic\nendif\n\n.PHONY: test-filename-escape\ntest-filename-escape:\n\t$(MAKE) -C tests test_filename_escape\n\n.PHONY: test-cli-comment-line\ntest-cli-comment-line:\n\t$(MAKE) -C tests test_cli_comment_line\n\n.PHONY: test-cli-ignore-missing\ntest-cli-ignore-missing:\n\t$(MAKE) -C tests test_cli_ignore_missing\n\n.PHONY: armtest\narmtest: clean\n\t@echo ---- test ARM compilation ----\n\tCC=arm-linux-gnueabi-gcc MOREFLAGS=\"-Werror -static\" $(MAKE) xxhsum\n\n.PHONY: clangtest\nclangtest: clean\n\t@echo ---- test clang compilation ----\n\tCC=clang MOREFLAGS=\"-Werror -Wconversion -Wno-sign-conversion\" $(MAKE) all\n\n.PHONY: gcc-og-test\ngcc-og-test: clean\n\t@echo ---- test gcc -Og compilation ----\n\tCFLAGS=\"-Og -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror -fPIC\" CPPFLAGS=\"-DXXH_NO_INLINE_HINTS\" MOREFLAGS=\"-Werror\" $(MAKE) all\n\n.PHONY: cxxtest\ncxxtest: clean\n\t@echo ---- test C++ compilation ----\n\tCC=\"$(CXX) -Wno-deprecated\" $(MAKE) all CFLAGS=\"-O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror -fPIC\"\n\n# In strict C90 mode, there is no `long long` type support,\n# consequently, only XXH32 can be compiled.\n.PHONY: c90test\nifeq ($(NO_C90_TEST),true)\nc90test:\n\t@echo no c90 compatibility test\nelse\nc90test: CPPFLAGS += -DXXH_NO_LONG_LONG\nc90test: CFLAGS += -std=c90 -Werror -pedantic\nc90test: xxhash.c\n\t@echo ---- test strict C90 compilation [xxh32 only] ----\n\t$(RM) xxhash.o\n\t$(CC) $(FLAGS) $^ -c\n\t$(NM) xxhash.o | $(GREP) XXH64 ; test $$? -eq 1\n\t$(RM) xxhash.o\nendif\n\n.PHONY: noxxh3test\nnoxxh3test: CPPFLAGS += -DXXH_NO_XXH3\nnoxxh3test: CFLAGS += -Werror -pedantic -Wno-long-long  # XXH64 requires long long support\nnoxxh3test: OFILE = xxh_noxxh3.o\nnoxxh3test: xxhash.c\n\t@echo ---- test compilation without XXH3 ----\n\t$(CC) $(FLAGS) -c $^ -o $(OFILE)\n\t$(NM) $(OFILE) | $(GREP) XXH3_ ; test $$? -eq 1\n\t$(RM) $(OFILE)\n\n.PHONY: nostreamtest\nnostreamtest: CPPFLAGS += -DXXH_NO_STREAM\nnostreamtest: CFLAGS += -Werror -pedantic -Wno-long-long  # XXH64 requires long long support\nnostreamtest: OFILE = xxh_nostream.o\nnostreamtest: xxhash.c\n\t@echo ---- test compilation without streaming ----\n\t$(CC) $(FLAGS) -c $^ -o $(OFILE)\n\t$(NM) $(OFILE) | $(GREP) update ; test $$? -eq 1\n\t$(RM) $(OFILE)\n\n.PHONY: nostdlibtest\nnostdlibtest: CPPFLAGS += -DXXH_NO_STDLIB\nnostdlibtest: CFLAGS += -Werror -pedantic -Wno-long-long  # XXH64 requires long long support\nnostdlibtest: OFILE = xxh_nostdlib.o\nnostdlibtest: xxhash.c\n\t@echo ---- test compilation without \\<stdlib.h\\> ----\n\t$(CC) $(FLAGS) -c $^ -o $(OFILE)\n\t$(NM) $(OFILE) | $(GREP) \"U _free\\|U free\" ; test $$? -eq 1\n\t$(RM) $(OFILE)\n\n.PHONY: usan\nusan: CC=clang\nusan: CXX=clang++\nusan:  ## check CLI runtime for undefined behavior, using clang's sanitizer\n\t@echo ---- check undefined behavior - sanitize ----\n\t$(MAKE) clean\n\t$(MAKE) test CC=$(CC) CXX=$(CXX) MOREFLAGS=\"-g -fsanitize=undefined -fno-sanitize-recover=all\"\n\n.PHONY: staticAnalyze\nSCANBUILD ?= scan-build\nstaticAnalyze: clean  ## check C source files using $(SCANBUILD) static analyzer\n\t@echo ---- static analyzer - $(SCANBUILD) ----\n\tCFLAGS=\"-g -Werror\" $(SCANBUILD) --status-bugs -v $(MAKE) all\n\nCPPCHECK ?= cppcheck\n.PHONY: cppcheck\ncppcheck:  ## check C source files using $(CPPCHECK) static analyzer\n\t@echo ---- static analyzer - $(CPPCHECK) ----\n\t$(CPPCHECK) . --force --enable=warning,portability,performance,style --error-exitcode=1 > /dev/null\n\n.PHONY: namespaceTest\nnamespaceTest:  ## ensure XXH_NAMESPACE redefines all public symbols\n\t$(CC) -c xxhash.c\n\t$(CC) -DXXH_NAMESPACE=TEST_ -c xxhash.c -o xxhash2.o\n\t$(CC) xxhash.o xxhash2.o $(XXHSUM_SPLIT_SRCS)  -o xxhsum2  # will fail if one namespace missing (symbol collision)\n\t$(RM) *.o xxhsum2  # clean\n\nMAN = $(XXHSUM_SRC_DIR)/xxhsum.1\nMD2ROFF ?= ronn\nMD2ROFF_FLAGS ?= --roff --warnings --manual=\"User Commands\" --organization=\"xxhsum $(XXHSUM_VERSION)\"\n$(MAN): $(XXHSUM_SRC_DIR)/xxhsum.1.md xxhash.h\n\tcat $< | $(MD2ROFF) $(MD2ROFF_FLAGS) | $(SED) -n '/^\\.\\\\\\\".*/!p' > $@\n\n.PHONY: man\nman: $(MAN)  ## generate man page from markdown source\n\n.PHONY: clean-man\nclean-man:\n\t$(RM) xxhsum.1\n\n.PHONY: preview-man\npreview-man: man\n\tman ./xxhsum.1\n\n.PHONY: test\ntest: DEBUGFLAGS += -DXXH_DEBUGLEVEL=1\ntest: all namespaceTest check test-xxhsum-c c90test test-tools noxxh3test nostdlibtest\n\n# this test checks that including \"xxhash.h\" multiple times and with different directives still compiles properly\n.PHONY: test-multiInclude\ntest-multiInclude:\n\t$(MAKE) -C tests test_multiInclude\n\n.PHONY: test-inline-notexposed\ntest-inline-notexposed: xxhsum_inlinedXXH\n\t$(NM) xxhsum_inlinedXXH | $(GREP) \"t _XXH32_\" ; test $$? -eq 1  # no XXH32 symbol should be left\n\t$(NM) xxhsum_inlinedXXH | $(GREP) \"t _XXH64_\" ; test $$? -eq 1  # no XXH64 symbol should be left\n\n.PHONY: test-inline\ntest-inline: test-inline-notexposed test-multiInclude\n\n\n.PHONY: test-all\ntest-all: CFLAGS += -Werror\ntest-all: test test32 test-unicode clangtest gcc-og-test cxxtest usan test-inline listL120 trailingWhitespace test-xxh-nnn-sums\n\n.PHONY: test-tools\ntest-tools:\n\tCFLAGS=-Werror $(MAKE) -C tests/bench\n\tCFLAGS=-Werror $(MAKE) -C tests/collisions check\n\n.PHONY: test-xxh-nnn-sums\ntest-xxh-nnn-sums: xxhsum_and_links\n\t./xxhsum    README.md > tmp.xxhsum.out    # xxhsum outputs xxh64\n\t./xxh32sum  README.md > tmp.xxh32sum.out\n\t./xxh64sum  README.md > tmp.xxh64sum.out\n\t./xxh128sum README.md > tmp.xxh128sum.out\n\t./xxh3sum   README.md > tmp.xxh3sum.out\n\tcat tmp.xxhsum.out\n\tcat tmp.xxh32sum.out\n\tcat tmp.xxh64sum.out\n\tcat tmp.xxh128sum.out\n\tcat tmp.xxh3sum.out\n\t./xxhsum -c tmp.xxhsum.out\n\t./xxhsum -c tmp.xxh32sum.out\n\t./xxhsum -c tmp.xxh64sum.out\n\t./xxhsum -c tmp.xxh128sum.out\n\t./xxhsum -c tmp.xxh3sum.out\n\t./xxh32sum -c tmp.xxhsum.out            ; test $$? -eq 1  # expects \"no properly formatted\"\n\t./xxh32sum -c tmp.xxh32sum.out\n\t./xxh32sum -c tmp.xxh64sum.out          ; test $$? -eq 1  # expects \"no properly formatted\"\n\t./xxh32sum -c tmp.xxh128sum.out         ; test $$? -eq 1  # expects \"no properly formatted\"\n\t./xxh32sum -c tmp.xxh3sum.out           ; test $$? -eq 1  # expects \"no properly formatted\"\n\t./xxh64sum -c tmp.xxhsum.out\n\t./xxh64sum -c tmp.xxh32sum.out          ; test $$? -eq 1  # expects \"no properly formatted\"\n\t./xxh64sum -c tmp.xxh64sum.out\n\t./xxh64sum -c tmp.xxh128sum.out         ; test $$? -eq 1  # expects \"no properly formatted\"\n\t./xxh64sum -c tmp.xxh3sum.out           ; test $$? -eq 1  # expects \"no properly formatted\"\n\t./xxh128sum -c tmp.xxhsum.out           ; test $$? -eq 1  # expects \"no properly formatted\"\n\t./xxh128sum -c tmp.xxh32sum.out         ; test $$? -eq 1  # expects \"no properly formatted\"\n\t./xxh128sum -c tmp.xxh64sum.out         ; test $$? -eq 1  # expects \"no properly formatted\"\n\t./xxh128sum -c tmp.xxh128sum.out\n\t./xxh128sum -c tmp.xxh3sum.out          ; test $$? -eq 1  # expects \"no properly formatted\"\n\t./xxh3sum -c tmp.xxhsum.out             ; test $$? -eq 1  # expects \"no properly formatted\"\n\t./xxh3sum -c tmp.xxh32sum.out           ; test $$? -eq 1  # expects \"no properly formatted\"\n\t./xxh3sum -c tmp.xxh64sum.out           ; test $$? -eq 1  # expects \"no properly formatted\"\n\t./xxh3sum -c tmp.xxh128sum.out          ; test $$? -eq 1  # expects \"no properly formatted\"\n\t./xxh3sum -c tmp.xxh3sum.out\n\n.PHONY: listL120\nlistL120:  # extract lines >= 120 characters in *.{c,h}, by Takayuki Matsuoka (note: $$, for Makefile compatibility)\n\tfind . -type f -name '*.c' -o -name '*.h' | while read -r filename; do awk 'length > 120 {print FILENAME \"(\" FNR \"): \" $$0}' $$filename; done\n\n.PHONY: trailingWhitespace\ntrailingWhitespace:\n\t! $(GREP) -E \"`printf '[ \\\\t]$$'`\" cli/*.c cli/*.h cli/*.1 *.c *.h LICENSE Makefile cmake_unofficial/CMakeLists.txt\n\n.PHONY: lint-unicode\nlint-unicode:\n\t./tests/unicode_lint.sh\n\n# =========================================================\n# make install is validated only for the following targets\n# =========================================================\nifneq (,$(filter Linux Darwin GNU/kFreeBSD GNU Haiku OpenBSD FreeBSD NetBSD DragonFly SunOS CYGWIN% , $(UNAME)))\n\nDESTDIR     ?=\n# directory variables: GNU conventions prefer lowercase\n# see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html\n# support both lower and uppercase (BSD), use uppercase in script\nprefix      ?= /usr/local\nPREFIX      ?= $(prefix)\nexec_prefix ?= $(PREFIX)\nEXEC_PREFIX ?= $(exec_prefix)\nlibdir      ?= $(EXEC_PREFIX)/lib\nLIBDIR      ?= $(libdir)\nincludedir  ?= $(PREFIX)/include\nINCLUDEDIR  ?= $(includedir)\nbindir      ?= $(EXEC_PREFIX)/bin\nBINDIR      ?= $(bindir)\ndatarootdir ?= $(PREFIX)/share\nmandir      ?= $(datarootdir)/man\nman1dir     ?= $(mandir)/man1\n\nifneq (,$(filter $(UNAME),FreeBSD NetBSD DragonFly))\nPKGCONFIGDIR ?= $(PREFIX)/libdata/pkgconfig\nelse\nPKGCONFIGDIR ?= $(LIBDIR)/pkgconfig\nendif\n\nifneq (,$(filter $(UNAME),OpenBSD FreeBSD NetBSD DragonFly SunOS))\nMANDIR  ?= $(PREFIX)/man/man1\nelse\nMANDIR  ?= $(man1dir)\nendif\n\nifneq (,$(filter $(UNAME),SunOS))\nINSTALL ?= ginstall\nelse\nINSTALL ?= install\nendif\n\nINSTALL_PROGRAM ?= $(INSTALL)\nINSTALL_DATA    ?= $(INSTALL) -m 644\nMAKE_DIR        ?= $(INSTALL) -d -m 755\n\n\n# Escape special symbols by putting each character into its separate class\nEXEC_PREFIX_REGEX ?= $(shell echo \"$(EXEC_PREFIX)\" | $(SED) $(SED_ERE_OPT) -e \"s/([^^])/[\\1]/g\" -e \"s/\\\\^/\\\\\\\\^/g\")\nPREFIX_REGEX ?= $(shell echo \"$(PREFIX)\" | $(SED) $(SED_ERE_OPT) -e \"s/([^^])/[\\1]/g\" -e \"s/\\\\^/\\\\\\\\^/g\")\n\nPCLIBDIR ?= $(shell echo \"$(LIBDIR)\"     | $(SED) -n $(SED_ERE_OPT) -e \"s@^$(EXEC_PREFIX_REGEX)(/|$$)@@p\")\nPCINCDIR ?= $(shell echo \"$(INCLUDEDIR)\" | $(SED) -n $(SED_ERE_OPT) -e \"s@^$(PREFIX_REGEX)(/|$$)@@p\")\nPCEXECDIR?= $(if $(filter $(PREFIX),$(EXEC_PREFIX)),$$\\{prefix\\},$(EXEC_PREFIX))\n\nifeq (,$(PCLIBDIR))\n# Additional prefix check is required, since the empty string is technically a\n# valid PCLIBDIR\nifeq (,$(shell echo \"$(LIBDIR)\" | $(SED) -n $(SED_ERE_OPT) -e \"\\\\@^$(EXEC_PREFIX_REGEX)(/|$$)@ p\"))\n$(error configured libdir ($(LIBDIR)) is outside of exec_prefix ($(EXEC_PREFIX)), can't generate pkg-config file)\nendif\nendif\n\nifeq (,$(PCINCDIR))\n# Additional prefix check is required, since the empty string is technically a\n# valid PCINCDIR\nifeq (,$(shell echo \"$(INCLUDEDIR)\" | $(SED) -n $(SED_ERE_OPT) -e \"\\\\@^$(PREFIX_REGEX)(/|$$)@ p\"))\n$(error configured includedir ($(INCLUDEDIR)) is outside of prefix ($(PREFIX)), can't generate pkg-config file)\nendif\nendif\n\nlibxxhash.pc: libxxhash.pc.in\n\t@echo creating pkgconfig\n\t$(Q)$(SED) $(SED_ERE_OPT) -e 's|@PREFIX@|$(PREFIX)|' \\\n          -e 's|@EXECPREFIX@|$(PCEXECDIR)|' \\\n          -e 's|@LIBDIR@|$$\\{exec_prefix\\}/$(PCLIBDIR)|' \\\n          -e 's|@INCLUDEDIR@|$$\\{prefix\\}/$(PCINCDIR)|' \\\n          -e 's|@VERSION@|$(LIBVER)|' \\\n          $< > $@\n\n\ninstall_libxxhash.a: libxxhash.a\n\t@echo Installing libxxhash.a\n\t$(Q)$(MAKE_DIR) $(DESTDIR)$(LIBDIR)\n\t$(Q)$(INSTALL_DATA) libxxhash.a $(DESTDIR)$(LIBDIR)\n\ninstall_libxxhash: libxxhash\n\t@echo Installing libxxhash\n\t$(Q)$(MAKE_DIR) $(DESTDIR)$(LIBDIR)\n\t$(Q)$(INSTALL_PROGRAM) $(LIBXXH) $(DESTDIR)$(LIBDIR)\n\t$(Q)ln -sf $(LIBXXH) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT_MAJOR)\n\t$(Q)ln -sf $(LIBXXH) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT)\n\ninstall_libxxhash.includes:\n\t$(Q)$(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR)   # includes\n\t$(Q)$(INSTALL_DATA) xxhash.h $(DESTDIR)$(INCLUDEDIR)\n\t$(Q)$(INSTALL_DATA) xxh3.h $(DESTDIR)$(INCLUDEDIR) # for compatibility, will be removed in v0.9.0\nifeq ($(LIBXXH_DISPATCH),1)\n\t$(Q)$(INSTALL_DATA) xxh_x86dispatch.h $(DESTDIR)$(INCLUDEDIR)\nendif\n\ninstall_libxxhash.pc: libxxhash.pc\n\t@echo Installing pkgconfig\n\t$(Q)$(MAKE_DIR) $(DESTDIR)$(PKGCONFIGDIR)/\n\t$(Q)$(INSTALL_DATA) libxxhash.pc $(DESTDIR)$(PKGCONFIGDIR)/\n\ninstall_xxhsum: xxhsum\n\t@echo Installing xxhsum\n\t$(Q)$(MAKE_DIR) $(DESTDIR)$(BINDIR)/\n\t$(Q)$(INSTALL_PROGRAM) xxhsum $(DESTDIR)$(BINDIR)/xxhsum\n\t$(Q)ln -sf xxhsum $(DESTDIR)$(BINDIR)/xxh32sum\n\t$(Q)ln -sf xxhsum $(DESTDIR)$(BINDIR)/xxh64sum\n\t$(Q)ln -sf xxhsum $(DESTDIR)$(BINDIR)/xxh128sum\n\t$(Q)ln -sf xxhsum $(DESTDIR)$(BINDIR)/xxh3sum\n\ninstall_man:\n\t@echo Installing man pages\n\t$(Q)$(MAKE_DIR) $(DESTDIR)$(MANDIR)/\n\t$(Q)$(INSTALL_DATA) $(MAN) $(DESTDIR)$(MANDIR)/xxhsum.1\n\t$(Q)ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh32sum.1\n\t$(Q)ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh64sum.1\n\t$(Q)ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh128sum.1\n\t$(Q)ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh3sum.1\n\n.PHONY: install\n## install libraries, CLI, links and man pages\ninstall: install_libxxhash.a install_libxxhash install_libxxhash.includes install_libxxhash.pc install_xxhsum install_man\n\t@echo xxhash installation completed\n\n.PHONY: uninstall\nuninstall:  ## uninstall libraries, CLI, links and man page\n\t$(Q)$(RM) $(DESTDIR)$(LIBDIR)/libxxhash.a\n\t$(Q)$(RM) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT)\n\t$(Q)$(RM) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT_MAJOR)\n\t$(Q)$(RM) $(DESTDIR)$(LIBDIR)/$(LIBXXH)\n\t$(Q)$(RM) $(DESTDIR)$(INCLUDEDIR)/xxhash.h\n\t$(Q)$(RM) $(DESTDIR)$(INCLUDEDIR)/xxh3.h\n\t$(Q)$(RM) $(DESTDIR)$(INCLUDEDIR)/xxh_x86dispatch.h\n\t$(Q)$(RM) $(DESTDIR)$(PKGCONFIGDIR)/libxxhash.pc\n\t$(Q)$(RM) $(DESTDIR)$(BINDIR)/xxh32sum\n\t$(Q)$(RM) $(DESTDIR)$(BINDIR)/xxh64sum\n\t$(Q)$(RM) $(DESTDIR)$(BINDIR)/xxh128sum\n\t$(Q)$(RM) $(DESTDIR)$(BINDIR)/xxh3sum\n\t$(Q)$(RM) $(DESTDIR)$(BINDIR)/xxhsum\n\t$(Q)$(RM) $(DESTDIR)$(MANDIR)/xxh32sum.1\n\t$(Q)$(RM) $(DESTDIR)$(MANDIR)/xxh64sum.1\n\t$(Q)$(RM) $(DESTDIR)$(MANDIR)/xxh128sum.1\n\t$(Q)$(RM) $(DESTDIR)$(MANDIR)/xxh3sum.1\n\t$(Q)$(RM) $(DESTDIR)$(MANDIR)/xxhsum.1\n\t@echo xxhsum successfully uninstalled\n\nendif\n"
  },
  {
    "path": "third-party/xxhash/README.md",
    "content": "\nxxHash - Extremely fast hash algorithm\n======================================\n\nxxHash is an Extremely fast Hash algorithm, processing at RAM speed limits.\nCode is highly portable, and produces hashes identical across all platforms (little / big endian).\nThe library includes the following algorithms :\n- XXH32 : generates 32-bit hashes, using 32-bit arithmetic\n- XXH64 : generates 64-bit hashes, using 64-bit arithmetic\n- XXH3 (since `v0.8.0`): generates 64 or 128-bit hashes, using vectorized arithmetic.\n  The 128-bit variant is called XXH128.\n\nAll variants successfully complete the [SMHasher](https://code.google.com/p/smhasher/wiki/SMHasher) test suite\nwhich evaluates the quality of hash functions (collision, dispersion and randomness).\nAdditional tests, which evaluate more thoroughly speed and collision properties of 64-bit hashes, [are also provided](https://github.com/Cyan4973/xxHash/tree/dev/tests).\n\n|Branch      |Status   |\n|------------|---------|\n|release     | [![Build Status](https://github.com/Cyan4973/xxHash/actions/workflows/ci.yml/badge.svg?branch=release)](https://github.com/Cyan4973/xxHash/actions?query=branch%3Arelease+) |\n|dev         | [![Build Status](https://github.com/Cyan4973/xxHash/actions/workflows/ci.yml/badge.svg?branch=dev)](https://github.com/Cyan4973/xxHash/actions?query=branch%3Adev+) |\n\n\nBenchmarks\n-------------------------\n\nThe benchmarked reference system uses an Intel i7-9700K cpu, and runs Ubuntu x64 20.04.\nThe [open source benchmark program] is compiled with `clang` v10.0 using `-O3` flag.\n\n| Hash Name     | Width | Bandwidth (GB/s) | Small Data Velocity | Quality | Comment |\n| ---------     | ----- | ---------------- | ----- | --- | --- |\n| __XXH3__ (SSE2) |  64 | 31.5 GB/s        | 133.1 | 10\n| __XXH128__ (SSE2) | 128 | 29.6 GB/s      | 118.1 | 10\n| _RAM sequential read_ | N/A | 28.0 GB/s  |   N/A | N/A | _for reference_\n| City64        |    64 | 22.0 GB/s        |  76.6 | 10\n| T1ha2         |    64 | 22.0 GB/s        |  99.0 |  9 | Slightly worse [collisions]\n| City128       |   128 | 21.7 GB/s        |  57.7 | 10\n| __XXH64__     |    64 | 19.4 GB/s        |  71.0 | 10\n| SpookyHash    |    64 | 19.3 GB/s        |  53.2 | 10\n| Mum           |    64 | 18.0 GB/s        |  67.0 |  9 | Slightly worse [collisions]\n| __XXH32__     |    32 |  9.7 GB/s        |  71.9 | 10\n| City32        |    32 |  9.1 GB/s        |  66.0 | 10\n| Murmur3       |    32 |  3.9 GB/s        |  56.1 | 10\n| SipHash       |    64 |  3.0 GB/s        |  43.2 | 10\n| FNV64         |    64 |  1.2 GB/s        |  62.7 |  5 | Poor avalanche properties\n| Blake2        |   256 |  1.1 GB/s        |   5.1 | 10 | Cryptographic\n| SHA1          |   160 |  0.8 GB/s        |   5.6 | 10 | Cryptographic but broken\n| MD5           |   128 |  0.6 GB/s        |   7.8 | 10 | Cryptographic but broken\n\n[open source benchmark program]: https://github.com/Cyan4973/xxHash/tree/release/tests/bench\n[collisions]: https://github.com/Cyan4973/xxHash/wiki/Collision-ratio-comparison#collision-study\n\nnote 1: Small data velocity is a _rough_ evaluation of algorithm's efficiency on small data. For more detailed analysis, please refer to next paragraph.\n\nnote 2: some algorithms feature _faster than RAM_ speed. In which case, they can only reach their full speed potential when input is already in CPU cache (L3 or better). Otherwise, they max out on RAM speed limit.\n\n### Small data\n\nPerformance on large data is only one part of the picture.\nHashing is also very useful in constructions like hash tables and bloom filters.\nIn these use cases, it's frequent to hash a lot of small data (starting at a few bytes).\nAlgorithm's performance can be very different for such scenarios, since parts of the algorithm,\nsuch as initialization or finalization, become fixed cost.\nThe impact of branch mis-prediction also becomes much more present.\n\nXXH3 has been designed for excellent performance on both long and small inputs,\nwhich can be observed in the following graph:\n\n![XXH3, latency, random size](https://user-images.githubusercontent.com/750081/61976089-aedeab00-af9f-11e9-9239-e5375d6c080f.png)\n\nFor a more detailed analysis, please visit the wiki :\nhttps://github.com/Cyan4973/xxHash/wiki/Performance-comparison#benchmarks-concentrating-on-small-data-\n\nQuality\n-------------------------\n\nSpeed is not the only property that matters.\nProduced hash values must respect excellent dispersion and randomness properties,\nso that any sub-section of it can be used to maximally spread out a table or index,\nas well as reduce the amount of collisions to the minimal theoretical level, following the [birthday paradox].\n\n`xxHash` has been tested with Austin Appleby's excellent SMHasher test suite,\nand passes all tests, ensuring reasonable quality levels.\nIt also passes extended tests from [newer forks of SMHasher], featuring additional scenarios and conditions.\n\nFinally, xxHash provides its own [massive collision tester](https://github.com/Cyan4973/xxHash/tree/dev/tests/collisions),\nable to generate and compare billions of hashes to test the limits of 64-bit hash algorithms.\nOn this front too, xxHash features good results, in line with the [birthday paradox].\nA more detailed analysis is documented [in the wiki](https://github.com/Cyan4973/xxHash/wiki/Collision-ratio-comparison).\n\n[birthday paradox]: https://en.wikipedia.org/wiki/Birthday_problem\n[newer forks of SMHasher]: https://github.com/rurban/smhasher\n\n\n### Build modifiers\n\nThe following macros can be set at compilation time to modify `libxxhash`'s behavior. They are generally disabled by default.\n\n- `XXH_INLINE_ALL`: Make all functions `inline`, implementation is directly included within `xxhash.h`.\n                    Inlining functions is beneficial for speed, notably for small keys.\n                    It's _extremely effective_ when key's length is expressed as _a compile time constant_,\n                    with performance improvements observed in the +200% range .\n                    See [this article](https://fastcompression.blogspot.com/2018/03/xxhash-for-small-keys-impressive-power.html) for details.\n- `XXH_PRIVATE_API`: same outcome as `XXH_INLINE_ALL`. Still available for legacy support.\n                     The name underlines that `XXH_*` symbol names will not be exported.\n- `XXH_STATIC_LINKING_ONLY`: gives access to internal state declaration, required for static allocation.\n                             Incompatible with dynamic linking, due to risks of ABI changes.\n- `XXH_NAMESPACE`: Prefixes all symbols with the value of `XXH_NAMESPACE`.\n                   This macro can only use compilable character set.\n                   Useful to evade symbol naming collisions,\n                   in case of multiple inclusions of xxHash's source code.\n                   Client applications still use the regular function names,\n                   as symbols are automatically translated through `xxhash.h`.\n- `XXH_FORCE_ALIGN_CHECK`: Use a faster direct read path when input is aligned.\n                           This option can result in dramatic performance improvement on architectures unable to load memory from unaligned addresses\n                           when input to hash happens to be aligned on 32 or 64-bit boundaries.\n                           It is (slightly) detrimental on platform with good unaligned memory access performance (same instruction for both aligned and unaligned accesses).\n                           This option is automatically disabled on `x86`, `x64` and `aarch64`, and enabled on all other platforms.\n- `XXH_FORCE_MEMORY_ACCESS`: The default method `0` uses a portable `memcpy()` notation.\n                             Method `1` uses a gcc-specific `packed` attribute, which can provide better performance for some targets.\n                             Method `2` forces unaligned reads, which is not standard compliant, but might sometimes be the only way to extract better read performance.\n                             Method `3` uses a byteshift operation, which is best for old compilers which don't inline `memcpy()` or big-endian systems without a byteswap instruction.\n- `XXH_CPU_LITTLE_ENDIAN`: By default, endianness is determined by a runtime test resolved at compile time.\n                           If, for some reason, the compiler cannot simplify the runtime test, it can cost performance.\n                           It's possible to skip auto-detection and simply state that the architecture is little-endian by setting this macro to 1.\n                           Setting it to 0 states big-endian.\n- `XXH_ENABLE_AUTOVECTORIZE`: Auto-vectorization may be triggered for XXH32 and XXH64, depending on cpu vector capabilities and compiler version.\n                              Note: auto-vectorization tends to be triggered more easily with recent versions of `clang`.\n                              For XXH32, SSE4.1 or equivalent (NEON) is enough, while XXH64 requires AVX512.\n                              Unfortunately, auto-vectorization is generally detrimental to XXH performance.\n                              For this reason, the xxhash source code tries to prevent auto-vectorization by default.\n                              That being said, systems evolve, and this conclusion is not forthcoming.\n                              For example, it has been reported that recent Zen4 cpus are more likely to improve performance with vectorization.\n                              Therefore, should you prefer or want to test vectorized code, you can enable this flag:\n                              it will remove the no-vectorization protection code, thus making it more likely for XXH32 and XXH64 to be auto-vectorized.\n- `XXH32_ENDJMP`: Switch multi-branch finalization stage of XXH32 by a single jump.\n                  This is generally undesirable for performance, especially when hashing inputs of random sizes.\n                  But depending on exact architecture and compiler, a jump might provide slightly better performance on small inputs. Disabled by default.\n- `XXH_IMPORT`: MSVC specific: should only be defined for dynamic linking, as it prevents linkage errors.\n- `XXH_NO_STDLIB`: Disable invocation of `<stdlib.h>` functions, notably `malloc()` and `free()`.\n                   `libxxhash`'s `XXH*_createState()` will always fail and return `NULL`.\n                   But one-shot hashing (like `XXH32()`) or streaming using statically allocated states\n                   still work as expected.\n                   This build flag is useful for embedded environments without dynamic allocation.\n- `XXH_DEBUGLEVEL` : When set to any value >= 1, enables `assert()` statements.\n                     This (slightly) slows down execution, but may help finding bugs during debugging sessions.\n\n#### Binary size control\n- `XXH_NO_XXH3` : removes symbols related to `XXH3` (both 64 & 128 bits) from generated binary.\n                  `XXH3` is by far the largest contributor to `libxxhash` size,\n                  so it's useful to reduce binary size for applications which do not employ `XXH3`.\n- `XXH_NO_LONG_LONG`: removes compilation of algorithms relying on 64-bit `long long` types\n                      which include `XXH3` and `XXH64`.\n                      Only `XXH32` will be compiled.\n                      Useful for targets (architectures and compilers) without 64-bit support.\n- `XXH_NO_STREAM`: Disables the streaming API, limiting the library to single shot variants only.\n- `XXH_NO_INLINE_HINTS`: By default, xxHash uses `__attribute__((always_inline))` and `__forceinline` to improve performance at the cost of code size.\n                         Defining this macro to 1 will mark all internal functions as `static`, allowing the compiler to decide whether to inline a function or not.\n                         This is very useful when optimizing for smallest binary size,\n                         and is automatically defined when compiling with `-O0`, `-Os`, `-Oz`, or `-fno-inline` on GCC and Clang.\n                         It may also be required to successfully compile using `-Og`, depending on compiler version.\n- `XXH_SIZE_OPT`: `0`: default, optimize for speed\n                  `1`: default for `-Os` and `-Oz`: disables some speed hacks for size optimization\n                  `2`: makes code as small as possible, performance may cry\n\n#### Build modifiers specific for XXH3\n- `XXH_VECTOR` : manually select a vector instruction set (default: auto-selected at compilation time). Available instruction sets are `XXH_SCALAR`, `XXH_SSE2`, `XXH_AVX2`, `XXH_AVX512`, `XXH_NEON` and `XXH_VSX`. Compiler may require additional flags to ensure proper support (for example, `gcc` on x86_64 requires `-mavx2` for `AVX2`, or `-mavx512f` for `AVX512`).\n- `XXH_PREFETCH_DIST` : select prefetching distance. For close-to-metal adaptation to specific hardware platforms. XXH3 only.\n- `XXH_NO_PREFETCH` : disable prefetching. Some platforms or situations may perform better without prefetching. XXH3 only.\n\n#### Makefile variables\nWhen compiling the Command Line Interface `xxhsum` using `make`, the following environment variables can also be set :\n- `DISPATCH=1` : use `xxh_x86dispatch.c`, select at runtime between `scalar`, `sse2`, `avx2` or `avx512` instruction set. This option is only valid for `x86`/`x64` systems. It is enabled by default when target `x86`/`x64` is detected. It can be forcefully turned off using `DISPATCH=0`.\n- `LIBXXH_DISPATCH=1` : same idea, implemented a runtime vector extension detector, but within `libxxhash`. This parameter is disabled by default. When enabled (only valid for `x86`/`x64` systems), new symbols published in `xxh_x86dispatch.h` become accessible. At the time of this writing, it's required to include `xxh_x86dispatch.h` in order to access the symbols with runtime vector extension detection.\n- `XXH_1ST_SPEED_TARGET` : select an initial speed target, expressed in MB/s, for the first speed test in benchmark mode. Benchmark will adjust the target at subsequent iterations, but the first test is made \"blindly\" by targeting this speed. Currently conservatively set to 10 MB/s, to support very slow (emulated) platforms.\n- `NODE_JS=1` : When compiling `xxhsum` for Node.js with Emscripten, this links the `NODERAWFS` library for unrestricted filesystem access and patches `isatty` to make the command line utility correctly detect the terminal. This does make the binary specific to Node.js.\n\n### Building xxHash - Using vcpkg\n\nYou can download and install xxHash using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:\n\n    git clone https://github.com/Microsoft/vcpkg.git\n    cd vcpkg\n    ./bootstrap-vcpkg.sh\n    ./vcpkg integrate install\n    ./vcpkg install xxhash\n\nThe xxHash port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.\n\n### Example\n\nThe simplest example calls xxhash 64-bit variant as a one-shot function\ngenerating a hash value from a single buffer, and invoked from a C/C++ program:\n\n```C\n#include \"xxhash.h\"\n\n    (...)\n    XXH64_hash_t hash = XXH64(buffer, size, seed);\n}\n```\n\nStreaming variant is more involved, but makes it possible to provide data incrementally:\n\n```C\n#include \"stdlib.h\"   /* abort() */\n#include \"xxhash.h\"\n\n\nXXH64_hash_t calcul_hash_streaming(FileHandler fh)\n{\n    /* create a hash state */\n    XXH64_state_t* const state = XXH64_createState();\n    if (state==NULL) abort();\n\n    size_t const bufferSize = SOME_SIZE;\n    void* const buffer = malloc(bufferSize);\n    if (buffer==NULL) abort();\n\n    /* Initialize state with selected seed */\n    XXH64_hash_t const seed = 0;   /* or any other value */\n    if (XXH64_reset(state, seed) == XXH_ERROR) abort();\n\n    /* Feed the state with input data, any size, any number of times */\n    (...)\n    while ( /* some data left */ ) {\n        size_t const length = get_more_data(buffer, bufferSize, fh);\n        if (XXH64_update(state, buffer, length) == XXH_ERROR) abort();\n        (...)\n    }\n    (...)\n\n    /* Produce the final hash value */\n    XXH64_hash_t const hash = XXH64_digest(state);\n\n    /* State could be re-used; but in this example, it is simply freed  */\n    free(buffer);\n    XXH64_freeState(state);\n\n    return hash;\n}\n```\n\n\n### License\n\nThe library files `xxhash.c` and `xxhash.h` are BSD licensed.\nThe utility `xxhsum` is GPL licensed.\n\n\n### Other programming languages\n\nBeyond the C reference version,\nxxHash is also available from many different programming languages,\nthanks to great contributors.\nThey are [listed here](http://www.xxhash.com/#other-languages).\n\n\n### Packaging status\n\nMany distributions bundle a package manager\nwhich allows easy xxhash installation as both a `libxxhash` library\nand `xxhsum` command line interface.\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/xxhash.svg)](https://repology.org/project/xxhash/versions)\n\n\n### Special Thanks\n\n- Takayuki Matsuoka, aka @t-mat, for creating `xxhsum -c` and great support during early xxh releases\n- Mathias Westerdahl, aka @JCash, for introducing the first version of `XXH64`\n- Devin Hussey, aka @easyaspi314, for incredible low-level optimizations on `XXH3` and `XXH128`\n"
  },
  {
    "path": "third-party/xxhash/SECURITY.md",
    "content": "# Security Policy\n\n## Supported Versions\n\nSecurity updates are applied only to the latest release.\n\n## Reporting a Vulnerability\n\nIf you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released.\n\nPlease disclose it at [security advisory](https://github.com/Cyan4973/xxHash/security/advisories/new).\n\nThis project is maintained by a team of volunteers on a reasonable-effort basis. As such, please give us at least 90 days to work on a fix before public exposure.\n"
  },
  {
    "path": "third-party/xxhash/appveyor.yml",
    "content": "#---------------------------------#\n#      general configuration      #\n#---------------------------------#\nversion: 1.0.{build}\nmax_jobs: 2\n\n#---------------------------------#\n#    environment configuration    #\n#---------------------------------#\nclone_depth: 2\nenvironment:\n  matrix:\n  - COMPILER: \"visual\"\n    ARCH: \"x64\"\n    TEST_XXHSUM: \"true\"\n  - COMPILER: \"visual\"\n    ARCH: \"Win32\"\n    TEST_XXHSUM: \"true\"\n  - COMPILER: \"visual\"\n    ARCH: \"Win32\"\n    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013\n    TEST_XXHSUM: \"true\"\n  - COMPILER: \"visual\"\n    ARCH: \"ARM\"\n# Below tests are now disabled due to redundancy.\n# Their equivalent already runs correctly on Github Actions.\n#  - COMPILER: \"visual\"\n#    ARCH: \"x64\"\n#    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017\n#    TEST_XXHSUM: \"true\"\n#  - COMPILER: \"visual\"\n#    ARCH: \"ARM64\"\n#    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017\n#    # note: ARM64 is not available with Visual Studio 14 2015, which is default for Appveyor\n\n# The following tests were also flacky on Appveyor, for various reasons.\n#  - COMPILER: \"gcc\"\n#    PLATFORM: \"mingw64\"\n#  - COMPILER: \"gcc\"\n#    PLATFORM: \"mingw32\"\n#  - COMPILER: \"gcc\"\n#    PLATFORM: \"clang\"\n\ninstall:\n  - ECHO Installing %COMPILER% %PLATFORM% %ARCH%\n  - MKDIR bin\n  - if [%COMPILER%]==[gcc] SET PATH_ORIGINAL=%PATH%\n  - if [%COMPILER%]==[gcc] (\n      SET \"PATH_MINGW32=c:\\MinGW\\bin;c:\\MinGW\\usr\\bin\" &&\n      SET \"PATH_MINGW64=c:\\msys64\\mingw64\\bin;c:\\msys64\\usr\\bin\" &&\n      COPY C:\\MinGW\\bin\\mingw32-make.exe C:\\MinGW\\bin\\make.exe &&\n      COPY C:\\MinGW\\bin\\gcc.exe C:\\MinGW\\bin\\cc.exe\n    )\n\n#---------------------------------#\n#       build configuration       #\n#---------------------------------#\nbuild_script:\n  - if [%PLATFORM%]==[mingw32] SET PATH=%PATH_MINGW32%;%PATH_ORIGINAL%\n  - if [%PLATFORM%]==[mingw64] SET PATH=%PATH_MINGW64%;%PATH_ORIGINAL%\n  - if [%PLATFORM%]==[clang]   SET PATH=%PATH_MINGW64%;%PATH_ORIGINAL%\n  - ECHO ***\n  - ECHO Building %COMPILER% %PLATFORM% %ARCH%\n  - ECHO ***\n\n  - if [%COMPILER%]==[gcc] (\n      if [%PLATFORM%]==[clang] (\n        clang -v\n      ) ELSE (\n        gcc -v\n      )\n    )\n  - if [%COMPILER%]==[gcc] (\n      echo ----- &&\n      make -v &&\n      echo ----- &&\n      if not [%PLATFORM%]==[clang] (\n        if [%PLATFORM%]==[mingw32] ( SET CPPFLAGS=-DPOOL_MT=0 ) &&\n        make -B clean test MOREFLAGS=-Werror\n      ) ELSE (\n        SET CXXFLAGS=--std=c++14 &&\n        make -B clean test CC=clang CXX=clang++ MOREFLAGS=\"--target=x86_64-w64-mingw32 -Werror -Wno-pass-failed\" NO_C90_TEST=true\n      ) &&\n      make -C tests/bench\n    )\n    # note 1: strict c90 tests with clang fail, due to (erroneous) presence on `inline` keyword in some included system file\n    # note 2: multi-threading code doesn't work with mingw32, disabled through POOL_MT=0\n    # note 3: clang requires C++14 to compile sort because its own code contains c++14-only code\n\n  - if [%COMPILER%]==[visual] (\n      cd cmake_unofficial &&\n      cmake . -DCMAKE_BUILD_TYPE=Release -A %ARCH% -DXXHASH_C_FLAGS=\"/WX\" &&\n      cmake --build . --config Release\n    )\n\n#---------------------------------#\n#       tests configuration       #\n#---------------------------------#\ntest_script:\n  # note: can only run x86 and x64 binaries on Appveyor\n  # note: if %COMPILER%==gcc, xxhsum was already tested within `make test`\n  - if [%TEST_XXHSUM%]==[true] (\n      ECHO ***  &&\n      ECHO Testing %COMPILER% %PLATFORM% %ARCH%  &&\n      ECHO ***  &&\n      cd Release &&\n      xxhsum.exe -bi1 &&\n      ECHO ------- xxhsum tested -------\n    )\n\n\n#---------------------------------#\n#      artifacts configuration    #\n#---------------------------------#\n# none yet\n"
  },
  {
    "path": "third-party/xxhash/cli/.tipi/deps",
    "content": "{\n    \"Cyan4973/xxHash\": { }\n}"
  },
  {
    "path": "third-party/xxhash/cli/.tipi/opts",
    "content": ""
  },
  {
    "path": "third-party/xxhash/cli/COPYING",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundation, Inc.,\n 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The licenses for most software are designed to take away your\nfreedom to share and change it.  By contrast, the GNU General Public\nLicense is intended to guarantee your freedom to share and change free\nsoftware--to make sure the software is free for all its users.  This\nGeneral Public License applies to most of the Free Software\nFoundation's software and to any other program whose authors commit to\nusing it.  (Some other Free Software Foundation software is covered by\nthe GNU Lesser General Public License instead.)  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthis service if you wish), that you receive source code or can get it\nif you want it, that you can change the software or use pieces of it\nin new free programs; and that you know you can do these things.\n\n  To protect your rights, we need to make restrictions that forbid\nanyone to deny you these rights or to ask you to surrender the rights.\nThese restrictions translate to certain responsibilities for you if you\ndistribute copies of the software, or if you modify it.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must give the recipients all the rights that\nyou have.  You must make sure that they, too, receive or can get the\nsource code.  And you must show them these terms so they know their\nrights.\n\n  We protect your rights with two steps: (1) copyright the software, and\n(2) offer you this license which gives you legal permission to copy,\ndistribute and/or modify the software.\n\n  Also, for each author's protection and ours, we want to make certain\nthat everyone understands that there is no warranty for this free\nsoftware.  If the software is modified by someone else and passed on, we\nwant its recipients to know that what they have is not the original, so\nthat any problems introduced by others will not reflect on the original\nauthors' reputations.\n\n  Finally, any free program is threatened constantly by software\npatents.  We wish to avoid the danger that redistributors of a free\nprogram will individually obtain patent licenses, in effect making the\nprogram proprietary.  To prevent this, we have made it clear that any\npatent must be licensed for everyone's free use or not licensed at all.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                    GNU GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License applies to any program or other work which contains\na notice placed by the copyright holder saying it may be distributed\nunder the terms of this General Public License.  The \"Program\", below,\nrefers to any such program or work, and a \"work based on the Program\"\nmeans either the Program or any derivative work under copyright law:\nthat is to say, a work containing the Program or a portion of it,\neither verbatim or with modifications and/or translated into another\nlanguage.  (Hereinafter, translation is included without limitation in\nthe term \"modification\".)  Each licensee is addressed as \"you\".\n\nActivities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning the Program is not restricted, and the output from the Program\nis covered only if its contents constitute a work based on the\nProgram (independent of having been made by running the Program).\nWhether that is true depends on what the Program does.\n\n  1. You may copy and distribute verbatim copies of the Program's\nsource code as you receive it, in any medium, provided that you\nconspicuously and appropriately publish on each copy an appropriate\ncopyright notice and disclaimer of warranty; keep intact all the\nnotices that refer to this License and to the absence of any warranty;\nand give any other recipients of the Program a copy of this License\nalong with the Program.\n\nYou may charge a fee for the physical act of transferring a copy, and\nyou may at your option offer warranty protection in exchange for a fee.\n\n  2. You may modify your copy or copies of the Program or any portion\nof it, thus forming a work based on the Program, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) You must cause the modified files to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    b) You must cause any work that you distribute or publish, that in\n    whole or in part contains or is derived from the Program or any\n    part thereof, to be licensed as a whole at no charge to all third\n    parties under the terms of this License.\n\n    c) If the modified program normally reads commands interactively\n    when run, you must cause it, when started running for such\n    interactive use in the most ordinary way, to print or display an\n    announcement including an appropriate copyright notice and a\n    notice that there is no warranty (or else, saying that you provide\n    a warranty) and that users may redistribute the program under\n    these conditions, and telling the user how to view a copy of this\n    License.  (Exception: if the Program itself is interactive but\n    does not normally print such an announcement, your work based on\n    the Program is not required to print an announcement.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Program,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Program, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote it.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Program.\n\nIn addition, mere aggregation of another work not based on the Program\nwith the Program (or with a work based on the Program) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may copy and distribute the Program (or a work based on it,\nunder Section 2) in object code or executable form under the terms of\nSections 1 and 2 above provided that you also do one of the following:\n\n    a) Accompany it with the complete corresponding machine-readable\n    source code, which must be distributed under the terms of Sections\n    1 and 2 above on a medium customarily used for software interchange; or,\n\n    b) Accompany it with a written offer, valid for at least three\n    years, to give any third party, for a charge no more than your\n    cost of physically performing source distribution, a complete\n    machine-readable copy of the corresponding source code, to be\n    distributed under the terms of Sections 1 and 2 above on a medium\n    customarily used for software interchange; or,\n\n    c) Accompany it with the information you received as to the offer\n    to distribute corresponding source code.  (This alternative is\n    allowed only for noncommercial distribution and only if you\n    received the program in object code or executable form with such\n    an offer, in accord with Subsection b above.)\n\nThe source code for a work means the preferred form of the work for\nmaking modifications to it.  For an executable work, complete source\ncode means all the source code for all modules it contains, plus any\nassociated interface definition files, plus the scripts used to\ncontrol compilation and installation of the executable.  However, as a\nspecial exception, the source code distributed need not include\nanything that is normally distributed (in either source or binary\nform) with the major components (compiler, kernel, and so on) of the\noperating system on which the executable runs, unless that component\nitself accompanies the executable.\n\nIf distribution of executable or object code is made by offering\naccess to copy from a designated place, then offering equivalent\naccess to copy the source code from the same place counts as\ndistribution of the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  4. You may not copy, modify, sublicense, or distribute the Program\nexcept as expressly provided under this License.  Any attempt\notherwise to copy, modify, sublicense or distribute the Program is\nvoid, and will automatically terminate your rights under this License.\nHowever, parties who have received copies, or rights, from you under\nthis License will not have their licenses terminated so long as such\nparties remain in full compliance.\n\n  5. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Program or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Program (or any work based on the\nProgram), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Program or works based on it.\n\n  6. Each time you redistribute the Program (or any work based on the\nProgram), the recipient automatically receives a license from the\noriginal licensor to copy, distribute or modify the Program subject to\nthese terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties to\nthis License.\n\n  7. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Program at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Program by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Program.\n\nIf any portion of this section is held invalid or unenforceable under\nany particular circumstance, the balance of the section is intended to\napply and the section as a whole is intended to apply in other\ncircumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system, which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  8. If the distribution and/or use of the Program is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Program under this License\nmay add an explicit geographical distribution limitation excluding\nthose countries, so that distribution is permitted only in or among\ncountries not thus excluded.  In such case, this License incorporates\nthe limitation as if written in the body of this License.\n\n  9. The Free Software Foundation may publish revised and/or new versions\nof the General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Program\nspecifies a version number of this License which applies to it and \"any\nlater version\", you have the option of following the terms and conditions\neither of that version or of any later version published by the Free\nSoftware Foundation.  If the Program does not specify a version number of\nthis License, you may choose any version ever published by the Free Software\nFoundation.\n\n  10. If you wish to incorporate parts of the Program into other free\nprograms whose distribution conditions are different, write to the author\nto ask for permission.  For software which is copyrighted by the Free\nSoftware Foundation, write to the Free Software Foundation; we sometimes\nmake exceptions for this.  Our decision will be guided by the two goals\nof preserving the free status of all derivatives of our free software and\nof promoting the sharing and reuse of software generally.\n\n                            NO WARRANTY\n\n  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\nFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\nOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\nPROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\nOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\nTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\nPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\nREPAIR OR CORRECTION.\n\n  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\nREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\nINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\nOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\nTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\nYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\nPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGES.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nconvey the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software; you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation; either version 2 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License along\n    with this program; if not, write to the Free Software Foundation, Inc.,\n    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\nAlso add information on how to contact you by electronic and paper mail.\n\nIf the program is interactive, make it output a short notice like this\nwhen it starts in an interactive mode:\n\n    Gnomovision version 69, Copyright (C) year name of author\n    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, the commands you use may\nbe called something other than `show w' and `show c'; they could even be\nmouse-clicks or menu items--whatever suits your program.\n\nYou should also get your employer (if you work as a programmer) or your\nschool, if any, to sign a \"copyright disclaimer\" for the program, if\nnecessary.  Here is a sample; alter the names:\n\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the program\n  `Gnomovision' (which makes passes at compilers) written by James Hacker.\n\n  <signature of Ty Coon>, 1 April 1989\n  Ty Coon, President of Vice\n\nThis General Public License does not permit incorporating your program into\nproprietary programs.  If your program is a subroutine library, you may\nconsider it more useful to permit linking proprietary applications with the\nlibrary.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.\n"
  },
  {
    "path": "third-party/xxhash/cli/README.md",
    "content": "This directory contains source code dedicated to the `xxhsum` command line utility,\nwhich is a user program of `libxxhash`.\n\nNote that, in contrast with the library `libxxhash`, the command line utility `xxhsum` ships with GPLv2 license.\n"
  },
  {
    "path": "third-party/xxhash/cli/xsum_arch.c",
    "content": "/*\n * xxhsum - Command line interface for xxhash algorithms\n * Copyright (C) 2013-2024 Yann Collet\n *\n * GPL v2 License\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\nint g_xsumarch_avoid_empty_unit = 0;\n\n#if ((defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64)) && !defined(_M_ARM64EC)) || defined(__i386__) || defined(_M_IX86) || defined(_M_IX86_FP)\n#if defined(XXHSUM_DISPATCH)\n\n#include \"../xxh_x86dispatch.h\"\n\nconst char* XSUM_autox86(void)\n{\n    int vecVersion = XXH_featureTest();\n    switch(vecVersion) {\n        case XXH_SCALAR:\n            return \"x86 autoVec (scalar: no vector extension detected)\";\n        case XXH_SSE2:\n            return \"x86 autoVec (SSE2 detected)\";\n        case XXH_AVX2:\n            return \"x86 autoVec (AVX2 detected)\";\n        case XXH_AVX512:\n            return \"x86 autoVec (AVX512 detected)\";\n        default:;\n    }\n    return \" autoVec (error detecting vector extension)\";\n}\n\n#endif /* XXHSUM_DISPATCH */\n#endif /* x86 */\n"
  },
  {
    "path": "third-party/xxhash/cli/xsum_arch.h",
    "content": "/*\n * xxhsum - Command line interface for xxhash algorithms\n * Copyright (C) 2013-2021 Yann Collet\n *\n * GPL v2 License\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n/*\n * Checks for predefined macros by the compiler to try and get both the arch\n * and the compiler version.\n */\n#ifndef XSUM_ARCH_H\n#define XSUM_ARCH_H\n\n#include \"xsum_config.h\"\n\n#define XSUM_LIB_VERSION XXH_VERSION_MAJOR.XXH_VERSION_MINOR.XXH_VERSION_RELEASE\n#define XSUM_QUOTE(str) #str\n#define XSUM_EXPAND_AND_QUOTE(str) XSUM_QUOTE(str)\n#define XSUM_PROGRAM_VERSION XSUM_EXPAND_AND_QUOTE(XSUM_LIB_VERSION)\n\n\n/* Show compiler versions in WELCOME_MESSAGE. XSUM_CC_VERSION_FMT will return the printf specifiers,\n * and VERSION will contain the comma separated list of arguments to the XSUM_CC_VERSION_FMT string. */\n#if defined(__clang_version__)\n/* Clang does its own thing. */\n#  ifdef __apple_build_version__\n#    define XSUM_CC_VERSION_FMT \"Apple Clang %s\"\n#  else\n#    define XSUM_CC_VERSION_FMT \"Clang %s\"\n#  endif\n#  define XSUM_CC_VERSION  __clang_version__\n#elif defined(__VERSION__)\n/* GCC and ICC */\n#  define XSUM_CC_VERSION_FMT \"%s\"\n#  ifdef __INTEL_COMPILER /* icc adds its prefix */\n#    define XSUM_CC_VERSION __VERSION__\n#  else /* assume GCC */\n#    define XSUM_CC_VERSION \"GCC \" __VERSION__\n#  endif\n#elif defined(_MSC_FULL_VER) && defined(_MSC_BUILD)\n/*\n * MSVC\n *  \"For example, if the version number of the Visual C++ compiler is\n *   15.00.20706.01, the _MSC_FULL_VER macro evaluates to 150020706.\"\n *\n *   https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2017\n */\n#  define XSUM_CC_VERSION_FMT \"MSVC %02i.%02i.%05i.%02i\"\n#  define XSUM_CC_VERSION  _MSC_FULL_VER / 10000000 % 100, _MSC_FULL_VER / 100000 % 100, _MSC_FULL_VER % 100000, _MSC_BUILD\n#elif defined(_MSC_VER) /* old MSVC */\n#  define XSUM_CC_VERSION_FMT \"MSVC %02i.%02i\"\n#  define XSUM_CC_VERSION _MSC_VER / 100, _MSC_VER % 100\n#elif defined(__TINYC__)\n/* tcc stores its version in the __TINYC__ macro. */\n#  define XSUM_CC_VERSION_FMT \"tcc %i.%i.%i\"\n#  define XSUM_CC_VERSION __TINYC__ / 10000 % 100, __TINYC__ / 100 % 100, __TINYC__ % 100\n#else\n#  define XSUM_CC_VERSION_FMT \"%s\"\n#  define XSUM_CC_VERSION \"unknown compiler\"\n#endif\n\n/* makes the next part easier */\n#if (defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64)) && !defined(_M_ARM64EC)\n#   define XSUM_ARCH_X64 1\n#   define XSUM_ARCH_X86 \"x86_64\"\n#elif defined(__i386__) || defined(_M_IX86) || defined(_M_IX86_FP)\n#   define XSUM_ARCH_X86 \"i386\"\n#endif\n\n/* Try to detect the architecture. */\n#if defined(XSUM_ARCH_X86)\n#  if defined(XXHSUM_DISPATCH)\n     const char* XSUM_autox86(void);\n#    define XSUM_ARCH XSUM_autox86()\n#  elif defined(__AVX512F__)\n#    define XSUM_ARCH XSUM_ARCH_X86 \" + AVX512\"\n#  elif defined(__AVX2__)\n#    define XSUM_ARCH XSUM_ARCH_X86 \" + AVX2\"\n#  elif defined(__AVX__)\n#    define XSUM_ARCH XSUM_ARCH_X86 \" + AVX\"\n#  elif defined(_M_X64) || defined(_M_AMD64) || defined(__x86_64__) \\\n      || defined(__SSE2__) || (defined(_M_IX86_FP) && _M_IX86_FP == 2)\n#     define XSUM_ARCH XSUM_ARCH_X86 \" + SSE2\"\n#  else\n#     define XSUM_ARCH XSUM_ARCH_X86\n#  endif\n#elif defined(__aarch64__) || defined(__arm64__) || defined(_M_ARM64) || defined(_M_ARM64EC)\n#  if defined(__ARM_FEATURE_SVE)\n#    define XSUM_ARCH \"aarch64 + SVE\"\n#  else\n#    define XSUM_ARCH \"aarch64 + NEON\"\n#  endif\n#elif defined(__arm__) || defined(__thumb__) || defined(__thumb2__) || defined(_M_ARM)\n/* ARM has a lot of different features that can change xxHash significantly. */\n#  ifdef __ARM_ARCH\n#    define XSUM_ARCH_ARM_VER XSUM_EXPAND_AND_QUOTE(__ARM_ARCH)\n#  else\n#    define XSUM_ARCH_ARM_VER XSUM_EXPAND_AND_QUOTE(_M_ARM)\n#  endif\n#  if defined(_M_ARM) /* windows arm is always thumb-2 */ \\\n    || defined(__thumb2__) || (defined(__thumb__) && (__thumb__ == 2 || __ARM_ARCH >= 7))\n#    define XSUM_ARCH_THUMB \" Thumb-2\"\n#  elif defined(__thumb__)\n#    define XSUM_ARCH_THUMB \" Thumb-1\"\n#  else\n#    define XSUM_ARCH_THUMB \"\"\n#  endif\n/* ARMv7 has unaligned by default */\n#  if defined(__ARM_FEATURE_UNALIGNED) || __ARM_ARCH >= 7 || defined(_M_ARM)\n#    define XSUM_ARCH_UNALIGNED \" + unaligned\"\n#  else\n#    define XSUM_ARCH_UNALIGNED \"\"\n#  endif\n#  if defined(__ARM_NEON) || defined(__ARM_NEON__) || defined(_M_ARM)\n#    define XSUM_ARCH_NEON \" + NEON\"\n#  else\n#    define XSUM_ARCH_NEON \"\"\n#  endif\n#  define XSUM_ARCH \"ARMv\" XSUM_ARCH_ARM_VER XSUM_ARCH_THUMB XSUM_ARCH_NEON XSUM_ARCH_UNALIGNED\n#elif defined(__powerpc64__) || defined(__ppc64__) || defined(__PPC64__)\n#  if defined(__GNUC__) && defined(__POWER9_VECTOR__)\n#    define XSUM_ARCH \"ppc64 + POWER9 vector\"\n#  elif defined(__GNUC__) && defined(__POWER8_VECTOR__)\n#    define XSUM_ARCH \"ppc64 + POWER8 vector\"\n#  else\n#    define XSUM_ARCH \"ppc64\"\n#  endif\n#elif defined(__powerpc__) || defined(__ppc__) || defined(__PPC__)\n#  define XSUM_ARCH \"ppc\"\n#elif defined(__AVR)\n#  define XSUM_ARCH \"AVR\"\n#elif defined(__mips64)\n#  define XSUM_ARCH \"mips64\"\n#elif defined(__mips)\n#  define XSUM_ARCH \"mips\"\n#elif defined(__s390x__)\n#  define XSUM_ARCH \"s390x\"\n#elif defined(__s390__)\n#  define XSUM_ARCH \"s390\"\n#elif defined(__wasm__) || defined(__asmjs__) || defined(__EMSCRIPTEN__)\n#  if defined(__wasm_simd128__)\n#    define XSUM_ARCH \"wasm/asmjs + simd128\"\n#  else\n#    define XSUM_ARCH \"wasm/asmjs\"\n#  endif\n#elif defined(__loongarch_lp64)\n#  define XSUM_ARCH \"loongarch\"\n#else\n#  define XSUM_ARCH \"unknown\"\n#endif\n\n\n#endif /* XSUM_ARCH_H */\n"
  },
  {
    "path": "third-party/xxhash/cli/xsum_bench.c",
    "content": "/*\n * xsum_bench - Benchmark functions for xxhsum\n * Copyright (C) 2013-2021 Yann Collet\n *\n * GPL v2 License\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n#include \"xsum_output.h\"  /* XSUM_logLevel */\n#include \"xsum_bench.h\"\n#include \"xsum_sanity_check.h\" /* XSUM_fillTestBuffer */\n#include \"xsum_os_specific.h\"  /* XSUM_getFileSize */\n#ifndef XXH_STATIC_LINKING_ONLY\n#  define XXH_STATIC_LINKING_ONLY\n#endif\n#include \"../xxhash.h\"\n#ifdef XXHSUM_DISPATCH\n#  include \"../xxh_x86dispatch.h\"  /* activate _dispatch() redirectors */\n#endif\n\n#include <stdlib.h>  /* malloc, free */\n#include <assert.h>\n#include <string.h>  /* strlen, memcpy */\n#include <time.h>   /* clock_t, clock, CLOCKS_PER_SEC */\n#include <errno.h>  /* errno */\n\n#define TIMELOOP_S 1\n#define TIMELOOP  (TIMELOOP_S * CLOCKS_PER_SEC)   /* target timing per iteration */\n#define TIMELOOP_MIN (TIMELOOP / 2)               /* minimum timing to validate a result */\n\n/* Each benchmark iteration attempts to match TIMELOOP (1 second).\n * The nb of loops is adjusted at each iteration to reach that target.\n * However, initially, there is no information, so 1st iteration blindly targets an arbitrary speed.\n * If it's too small, it will be adjusted, and a new attempt will be made.\n * But if it's too large, the first iteration can be very long,\n * before being fixed at second attempt.\n * So prefer starting with small speed targets.\n * XXH_1ST_SPEED_TARGET is defined in MB/s */\n#ifndef XXH_1ST_SPEED_TARGET\n# define XXH_1ST_SPEED_TARGET 10\n#endif\n\n#define MAX_MEM    (2 GB - 64 MB)\n\nstatic clock_t XSUM_clockSpan( clock_t start )\n{\n    return clock() - start;   /* works even if overflow; Typical max span ~ 30 mn */\n}\n\nstatic size_t XSUM_findMaxMem(XSUM_U64 requiredMem)\n{\n    size_t const step = 64 MB;\n    void* testmem = NULL;\n\n    requiredMem = (((requiredMem >> 26) + 1) << 26);\n    requiredMem += 2*step;\n    if (requiredMem > MAX_MEM) requiredMem = MAX_MEM;\n\n    while (!testmem) {\n        if (requiredMem > step) requiredMem -= step;\n        else requiredMem >>= 1;\n        testmem = malloc ((size_t)requiredMem);\n    }\n    free (testmem);\n\n    /* keep some space available */\n    if (requiredMem > step) requiredMem -= step;\n    else requiredMem >>= 1;\n\n    return (size_t)requiredMem;\n}\n\n/*\n * A secret buffer used for benchmarking XXH3's withSecret variants.\n *\n * In order for the bench to be realistic, the secret buffer would need to be\n * pre-generated.\n *\n * Adding a pointer to the parameter list would be messy.\n */\nstatic XSUM_U8 g_benchSecretBuf[XXH3_SECRET_SIZE_MIN];\n\n/*\n * Wrappers for the benchmark.\n *\n * If you would like to add other hashes to the bench, create a wrapper and add\n * it to the g_hashesToBench table. It will automatically be added.\n */\ntypedef XSUM_U32 (*hashFunction)(const void* buffer, size_t bufferSize, XSUM_U32 seed);\n\nstatic XSUM_U32 localXXH32(const void* buffer, size_t bufferSize, XSUM_U32 seed)\n{\n    return XXH32(buffer, bufferSize, seed);\n}\nstatic XSUM_U32 localXXH32_stream(const void* buffer, size_t bufferSize, XSUM_U32 seed)\n{\n    XXH32_state_t state;\n    (void)seed;\n    XXH32_reset(&state, seed);\n    XXH32_update(&state, buffer, bufferSize);\n    return (XSUM_U32)XXH32_digest(&state);\n}\nstatic XSUM_U32 localXXH64(const void* buffer, size_t bufferSize, XSUM_U32 seed)\n{\n    return (XSUM_U32)XXH64(buffer, bufferSize, seed);\n}\nstatic XSUM_U32 localXXH64_stream(const void* buffer, size_t bufferSize, XSUM_U32 seed)\n{\n    XXH64_state_t state;\n    (void)seed;\n    XXH64_reset(&state, seed);\n    XXH64_update(&state, buffer, bufferSize);\n    return (XSUM_U32)XXH64_digest(&state);\n}\nstatic XSUM_U32 localXXH3_64b(const void* buffer, size_t bufferSize, XSUM_U32 seed)\n{\n    (void)seed;\n    return (XSUM_U32)XXH3_64bits(buffer, bufferSize);\n}\nstatic XSUM_U32 localXXH3_64b_seeded(const void* buffer, size_t bufferSize, XSUM_U32 seed)\n{\n    return (XSUM_U32)XXH3_64bits_withSeed(buffer, bufferSize, seed);\n}\nstatic XSUM_U32 localXXH3_64b_secret(const void* buffer, size_t bufferSize, XSUM_U32 seed)\n{\n    (void)seed;\n    return (XSUM_U32)XXH3_64bits_withSecret(buffer, bufferSize, g_benchSecretBuf, sizeof(g_benchSecretBuf));\n}\nstatic XSUM_U32 localXXH3_128b(const void* buffer, size_t bufferSize, XSUM_U32 seed)\n{\n    (void)seed;\n    return (XSUM_U32)(XXH3_128bits(buffer, bufferSize).low64);\n}\nstatic XSUM_U32 localXXH3_128b_seeded(const void* buffer, size_t bufferSize, XSUM_U32 seed)\n{\n    return (XSUM_U32)(XXH3_128bits_withSeed(buffer, bufferSize, seed).low64);\n}\nstatic XSUM_U32 localXXH3_128b_secret(const void* buffer, size_t bufferSize, XSUM_U32 seed)\n{\n    (void)seed;\n    return (XSUM_U32)(XXH3_128bits_withSecret(buffer, bufferSize, g_benchSecretBuf, sizeof(g_benchSecretBuf)).low64);\n}\nstatic XSUM_U32 localXXH3_stream(const void* buffer, size_t bufferSize, XSUM_U32 seed)\n{\n    XXH3_state_t state;\n    (void)seed;\n    XXH3_64bits_reset(&state);\n    XXH3_64bits_update(&state, buffer, bufferSize);\n    return (XSUM_U32)XXH3_64bits_digest(&state);\n}\nstatic XSUM_U32 localXXH3_stream_seeded(const void* buffer, size_t bufferSize, XSUM_U32 seed)\n{\n    XXH3_state_t state;\n    XXH3_INITSTATE(&state);\n    XXH3_64bits_reset_withSeed(&state, (XXH64_hash_t)seed);\n    XXH3_64bits_update(&state, buffer, bufferSize);\n    return (XSUM_U32)XXH3_64bits_digest(&state);\n}\nstatic XSUM_U32 localXXH128_stream(const void* buffer, size_t bufferSize, XSUM_U32 seed)\n{\n    XXH3_state_t state;\n    (void)seed;\n    XXH3_128bits_reset(&state);\n    XXH3_128bits_update(&state, buffer, bufferSize);\n    return (XSUM_U32)(XXH3_128bits_digest(&state).low64);\n}\nstatic XSUM_U32 localXXH128_stream_seeded(const void* buffer, size_t bufferSize, XSUM_U32 seed)\n{\n    XXH3_state_t state;\n    XXH3_INITSTATE(&state);\n    XXH3_128bits_reset_withSeed(&state, (XXH64_hash_t)seed);\n    XXH3_128bits_update(&state, buffer, bufferSize);\n    return (XSUM_U32)(XXH3_128bits_digest(&state).low64);\n}\n\n\ntypedef struct {\n    const char*  name;\n    hashFunction func;\n} hashInfo;\n\nstatic const hashInfo g_hashesToBench[] = {\n    { \"XXH32\",             &localXXH32 },\n    { \"XXH64\",             &localXXH64 },\n    { \"XXH3_64b\",          &localXXH3_64b },\n    { \"XXH3_64b w/seed\",   &localXXH3_64b_seeded },\n    { \"XXH3_64b w/secret\", &localXXH3_64b_secret },\n    { \"XXH128\",            &localXXH3_128b },\n    { \"XXH128 w/seed\",     &localXXH3_128b_seeded },\n    { \"XXH128 w/secret\",   &localXXH3_128b_secret },\n    { \"XXH32_stream\",      &localXXH32_stream },\n    { \"XXH64_stream\",      &localXXH64_stream },\n    { \"XXH3_stream\",       &localXXH3_stream },\n    { \"XXH3_stream w/seed\",&localXXH3_stream_seeded },\n    { \"XXH128_stream\",     &localXXH128_stream },\n    { \"XXH128_stream w/seed\",&localXXH128_stream_seeded },\n};\n#define NB_HASHFUNC (sizeof(g_hashesToBench) / sizeof(*g_hashesToBench))\n\n#define NB_TESTFUNC (1 + 2 * NB_HASHFUNC)\nint const g_nbTestFunctions = NB_TESTFUNC;\nchar g_testIDs[NB_TESTFUNC] = { 0 };\nconst char k_testIDs_default[NB_TESTFUNC] = { 0,\n        1 /*XXH32*/, 0,\n        1 /*XXH64*/, 0,\n        1 /*XXH3*/, 0, 0, 0, 0, 0,\n        1 /*XXH128*/ };\n\nint g_nbIterations = NBLOOPS_DEFAULT;\n#define HASHNAME_MAX 29\nstatic void XSUM_benchHash(hashFunction h, const char* hName, int testID,\n                           const void* buffer, size_t bufferSize)\n{\n    XSUM_U32 nbh_perIteration = (XSUM_U32)((XXH_1ST_SPEED_TARGET MB) / (bufferSize+1)) + 1;\n    int iterationNb, nbIterations = g_nbIterations + !g_nbIterations /* min 1 */;\n    double fastestH = 100000000.;\n    assert(HASHNAME_MAX > 2);\n    XSUM_logVerbose(2, \"\\r%80s\\r\", \"\");       /* Clean display line */\n\n    for (iterationNb = 1; iterationNb <= nbIterations; iterationNb++) {\n        XSUM_U32 r=0;\n        clock_t cStart;\n\n        XSUM_logVerbose(2, \"%2i-%-*.*s : %10u ->\\r\",\n                        iterationNb,\n                        HASHNAME_MAX, HASHNAME_MAX, hName,\n                        (unsigned)bufferSize);\n        cStart = clock();\n        while (clock() == cStart);   /* starts clock() at its exact beginning */\n        cStart = clock();\n\n        {   XSUM_U32 u;\n            for (u=0; u<nbh_perIteration; u++)\n                r += h(buffer, bufferSize, u);\n        }\n        if (r==0) XSUM_logVerbose(3,\".\\r\");  /* do something with r to defeat compiler \"optimizing\" hash away */\n\n        {   clock_t const nbTicks = XSUM_clockSpan(cStart);\n            double const ticksPerHash = ((double)nbTicks / TIMELOOP) / nbh_perIteration;\n            /*\n             * clock() is the only decent portable timer, but it isn't very\n             * precise.\n             *\n             * Sometimes, this lack of precision is enough that the benchmark\n             * finishes before there are enough ticks to get a meaningful result.\n             *\n             * For example, on a Core 2 Duo (without any sort of Turbo Boost),\n             * the imprecise timer caused peculiar results like so:\n             *\n             *    XXH3_64b                   4800.0 MB/s // conveniently even\n             *    XXH3_64b unaligned         4800.0 MB/s\n             *    XXH3_64b seeded            9600.0 MB/s // magical 2x speedup?!\n             *    XXH3_64b seeded unaligned  4800.0 MB/s\n             *\n             * If we sense a suspiciously low number of ticks, we increase the\n             * iterations until we can get something meaningful.\n             */\n            if (nbTicks < TIMELOOP_MIN) {\n                /* Not enough time spent in benchmarking, risk of rounding bias */\n                if (nbTicks == 0) { /* faster than resolution timer */\n                    nbh_perIteration *= 100;\n                } else {\n                    /*\n                     * update nbh_perIteration so that the next round lasts\n                     * approximately 1 second.\n                     */\n                    double nbh_perSecond = (1 / ticksPerHash) + 1;\n                    if (nbh_perSecond > (double)(4000U<<20)) nbh_perSecond = (double)(4000U<<20);   /* avoid overflow */\n                    nbh_perIteration = (XSUM_U32)nbh_perSecond;\n                }\n                /* g_nbIterations==0 => quick evaluation, no claim of accuracy */\n                if (g_nbIterations>0) {\n                    iterationNb--;   /* new round for a more accurate speed evaluation */\n                    continue;\n                }\n            }\n            if (ticksPerHash < fastestH) fastestH = ticksPerHash;\n            if (fastestH>0.) { /* avoid div by zero */\n                XSUM_logVerbose(2, \"%2i-%-*.*s : %10u -> %8.0f it/s (%7.1f MB/s) \\r\",\n                            iterationNb,\n                            HASHNAME_MAX, HASHNAME_MAX, hName,\n                            (unsigned)bufferSize,\n                            (double)1 / fastestH,\n                            ((double)bufferSize / (1 MB)) / fastestH);\n        }   }\n        {   double nbh_perSecond = (1 / fastestH) + 1;\n            if (nbh_perSecond > (double)(4000U<<20)) nbh_perSecond = (double)(4000U<<20);   /* avoid overflow */\n            nbh_perIteration = (XSUM_U32)nbh_perSecond;\n        }\n    }\n    XSUM_logVerbose(1, \"%2i#%-*.*s : %10u -> %8.0f it/s (%7.1f MB/s) \\n\",\n                    testID,\n                    HASHNAME_MAX, HASHNAME_MAX, hName,\n                    (unsigned)bufferSize,\n                    (double)1 / fastestH,\n                    ((double)bufferSize / (1 MB)) / fastestH);\n    if (XSUM_logLevel<1)\n        XSUM_logVerbose(0, \"%u, \", (unsigned)((double)1 / fastestH));\n}\n\n\n/*\n * Allocates a string containing s1 and s2 concatenated. Acts like strdup.\n * The result must be freed.\n */\nstatic char* XSUM_strcatDup(const char* s1, const char* s2)\n{\n    assert(s1 != NULL);\n    assert(s2 != NULL);\n    {   size_t len1 = strlen(s1);\n        size_t len2 = strlen(s2);\n        char* buf = (char*)malloc(len1 + len2 + 1);\n        if (buf != NULL) {\n            /* strcpy(buf, s1) */\n            memcpy(buf, s1, len1);\n            /* strcat(buf, s2) */\n            memcpy(buf + len1, s2, len2 + 1);\n        }\n        return buf;\n    }\n}\n\n\n/*!\n * XSUM_benchMem():\n * Benchmark provided content up to twice per function:\n * - once at provided aligned memory address (%16)\n * - second time at unaligned memory address (+3)\n * Enabled functions and modes are provided via @g_hashesToBench global variable.\n * @buffer: Must be 16-byte aligned.\n * The allocated size of underlying @buffer must be >= (@bufferSize+3).\n * This function also fills @g_benchSecretBuf, to bench XXH3's _withSecret() variants.\n */\nstatic void XSUM_benchMem(const void* buffer, size_t bufferSize)\n{\n    assert((((size_t)buffer) & 15) == 0);  /* ensure alignment */\n    XSUM_fillTestBuffer(g_benchSecretBuf, sizeof(g_benchSecretBuf));\n    {   int i;\n        for (i = 1; i < (int)NB_TESTFUNC; i++) {\n            int const hashFuncID = (i-1) / 2;\n            assert(g_hashesToBench[hashFuncID].name != NULL);\n            if (g_testIDs[i] == 0) continue;\n            /* aligned */\n            if ((i % 2) == 1) {\n                XSUM_benchHash(g_hashesToBench[hashFuncID].func, g_hashesToBench[hashFuncID].name, i, buffer, bufferSize);\n            }\n            /* unaligned */\n            if ((i % 2) == 0) {\n                /* Append \"unaligned\". */\n                char* const hashNameBuf = XSUM_strcatDup(g_hashesToBench[hashFuncID].name, \" unaligned\");\n                assert(hashNameBuf != NULL);\n                XSUM_benchHash(g_hashesToBench[hashFuncID].func, hashNameBuf, i, ((const char*)buffer)+3, bufferSize);\n                free(hashNameBuf);\n            }\n    }   }\n}\n\nstatic size_t XSUM_selectBenchedSize(const char* fileName)\n{\n    XSUM_U64 const inFileSize = XSUM_getFileSize(fileName);\n    size_t benchedSize = (size_t) XSUM_findMaxMem(inFileSize);\n    if ((XSUM_U64)benchedSize > inFileSize) benchedSize = (size_t)inFileSize;\n    if (benchedSize < inFileSize) {\n        XSUM_log(\"Not enough memory for '%s' full size; testing %i MB only...\\n\", fileName, (int)(benchedSize>>20));\n    }\n    return benchedSize;\n}\n\n\nint XSUM_benchFiles(const char* fileNamesTable[], int nbFiles)\n{\n    int fileIdx;\n    for (fileIdx=0; fileIdx<nbFiles; fileIdx++) {\n        const char* const inFileName = fileNamesTable[fileIdx];\n        assert(inFileName != NULL);\n\n        {   FILE* const inFile = XSUM_fopen( inFileName, \"rb\" );\n            size_t const benchedSize = XSUM_selectBenchedSize(inFileName);\n            char* const buffer = (char*)calloc(benchedSize+16+3, 1);\n            void* const alignedBuffer = (buffer+15) - (((size_t)(buffer+15)) & 0xF);  /* align on next 16 bytes */\n\n            /* Checks */\n            if (inFile==NULL){\n                XSUM_log(\"Error: Could not open '%s': %s.\\n\", inFileName, strerror(errno));\n                free(buffer);\n                exit(11);\n            }\n            if(!buffer) {\n                XSUM_log(\"\\nError: Out of memory.\\n\");\n                fclose(inFile);\n                exit(12);\n            }\n\n            /* Fill input buffer */\n            {   size_t const readSize = fread(alignedBuffer, 1, benchedSize, inFile);\n                fclose(inFile);\n                if(readSize != benchedSize) {\n                    XSUM_log(\"\\nError: Could not read '%s': %s.\\n\", inFileName, strerror(errno));\n                    free(buffer);\n                    exit(13);\n            }   }\n\n            /* bench */\n            XSUM_benchMem(alignedBuffer, benchedSize);\n\n            free(buffer);\n    }   }\n    return 0;\n}\n\n\nint XSUM_benchInternal(size_t keySize)\n{\n    void* const buffer = calloc(keySize+16+3, 1);\n    if (buffer == NULL) {\n        XSUM_log(\"\\nError: Out of memory.\\n\");\n        exit(12);\n    }\n\n    {   const void* const alignedBuffer = ((char*)buffer+15) - (((size_t)((char*)buffer+15)) & 0xF);  /* align on next 16 bytes */\n\n        /* bench */\n        XSUM_logVerbose(1, \"Sample of \");\n        if (keySize > 10 KB) {\n            XSUM_logVerbose(1, \"%u KB\", (unsigned)(keySize >> 10));\n        } else {\n            XSUM_logVerbose(1, \"%u bytes\", (unsigned)keySize);\n        }\n        XSUM_logVerbose(1, \"...        \\n\");\n\n        XSUM_benchMem(alignedBuffer, keySize);\n        free(buffer);\n    }\n    return 0;\n}\n"
  },
  {
    "path": "third-party/xxhash/cli/xsum_bench.h",
    "content": "/*\n * xsum_bench - Benchmark functions for xxhsum\n * Copyright (C) 2013-2021 Yann Collet\n *\n * GPL v2 License\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n#ifndef XSUM_BENCH_H\n#define XSUM_BENCH_H\n\n#include <stddef.h>  /* size_t */\n\n#define NBLOOPS_DEFAULT    3    /* Default number of benchmark iterations */\n\nextern int const g_nbTestFunctions;\nextern char g_testIDs[];  /* size : g_nbTestFunctions */\nextern const char k_testIDs_default[];\nextern int g_nbIterations;\n\nint XSUM_benchInternal(size_t keySize);\nint XSUM_benchFiles(const char* fileNamesTable[], int nbFiles);\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* XSUM_BENCH_H */\n"
  },
  {
    "path": "third-party/xxhash/cli/xsum_config.h",
    "content": "/*\n * xxhsum - Command line interface for xxhash algorithms\n * Copyright (C) 2013-2021 Yann Collet\n *\n * GPL v2 License\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n/*\n * This contains various configuration parameters and feature detection for\n * xxhsum.\n *\n * Similar to config.h in Autotools, this should be the first header included.\n */\n\n#ifndef XSUM_CONFIG_H\n#define XSUM_CONFIG_H\n\n\n/* ************************************\n *  Compiler Options\n **************************************/\n/*\n * Disable Visual C's warnings when using the \"insecure\" CRT functions instead\n * of the \"secure\" _s functions.\n *\n * These functions are not portable, and aren't necessary if you are using the\n * original functions properly.\n */\n#if defined(_MSC_VER) || defined(_WIN32)\n#  ifndef _CRT_SECURE_NO_WARNINGS\n#    define _CRT_SECURE_NO_WARNINGS\n#  endif\n#endif\n\n/* Under Linux at least, pull in the *64 commands */\n#ifndef _LARGEFILE64_SOURCE\n#  define _LARGEFILE64_SOURCE\n#endif\n#ifndef _FILE_OFFSET_BITS\n#  define _FILE_OFFSET_BITS 64\n#endif\n\n/*\n * So we can use __attribute__((__format__))\n */\n#ifdef __GNUC__\n#  define XSUM_ATTRIBUTE(x) __attribute__(x)\n#else\n#  define XSUM_ATTRIBUTE(x)\n#endif\n\n#if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)) /* UNIX-like OS */ \\\n   || defined(__midipix__) || defined(__VMS))\n#  if (defined(__APPLE__) && defined(__MACH__)) || defined(__SVR4) || defined(_AIX) || defined(__hpux) /* POSIX.1-2001 (SUSv3) conformant */ \\\n     || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)  /* BSD distros */\n#    define XSUM_PLATFORM_POSIX_VERSION 200112L\n#  else\n#    if defined(__linux__) || defined(__linux)\n#      ifndef _POSIX_C_SOURCE\n#        define _POSIX_C_SOURCE 200112L  /* use feature test macro */\n#      endif\n#    endif\n#    include <unistd.h>  /* declares _POSIX_VERSION */\n#    if defined(_POSIX_VERSION)  /* POSIX compliant */\n#      define XSUM_PLATFORM_POSIX_VERSION _POSIX_VERSION\n#    else\n#      define XSUM_PLATFORM_POSIX_VERSION 0\n#    endif\n#  endif\n#endif\n#if !defined(XSUM_PLATFORM_POSIX_VERSION)\n#  define XSUM_PLATFORM_POSIX_VERSION -1\n#endif\n\n#if !defined(S_ISREG)\n#  define S_ISREG(x) (((x) & S_IFMT) == S_IFREG)\n#endif\n\n\n/* ************************************\n * Windows helpers\n **************************************/\n\n/*\n * Whether to use the Windows UTF-16 APIs instead of the portable libc 8-bit\n * (\"ANSI\") APIs.\n *\n * Windows is not UTF-8 clean by default, and the only way to access every file\n * on the OS is to use UTF-16.\n *\n * Do note that xxhsum uses UTF-8 internally and only uses UTF-16 for command\n * line arguments, console I/O, and opening files.\n *\n * Additionally, this guarantees all piped output is UTF-8.\n */\n#if defined(XSUM_WIN32_USE_WCHAR) && !defined(_WIN32)\n/* We use Windows APIs, only use this on Windows. */\n#  undef XSUM_WIN32_USE_WCHAR\n#endif\n\n#ifndef XSUM_WIN32_USE_WCHAR\n#  if defined(_WIN32)\n#    include <wchar.h>\n#    if WCHAR_MAX == 0xFFFFU /* UTF-16 wchar_t */\n#       define XSUM_WIN32_USE_WCHAR 1\n#    else\n#       define XSUM_WIN32_USE_WCHAR 0\n#    endif\n#  else\n#    define XSUM_WIN32_USE_WCHAR 0\n#  endif\n#endif\n\n#if !XSUM_WIN32_USE_WCHAR\n/*\n * It doesn't make sense to have one without the other.\n * Due to XSUM_WIN32_USE_WCHAR being undef'd, this also handles\n * non-WIN32 platforms.\n */\n#  undef  XSUM_WIN32_USE_WMAIN\n#  define XSUM_WIN32_USE_WMAIN 0\n#else\n/*\n * Whether to use wmain() or main().\n *\n * wmain() is preferred because we don't have to mess with internal hidden\n * APIs.\n *\n * It always works on MSVC, but in MinGW, it only works on MinGW-w64 with the\n * -municode flag.\n *\n * Therefore we have to use main() -- there is no better option.\n */\n#  ifndef XSUM_WIN32_USE_WMAIN\n#    if defined(_UNICODE) || defined(UNICODE) /* MinGW -municode */ \\\n        || defined(_MSC_VER) /* MSVC */\n#      define XSUM_WIN32_USE_WMAIN 1\n#    else\n#      define XSUM_WIN32_USE_WMAIN 0\n#    endif\n#  endif\n/*\n * It is always good practice to define these to prevent accidental use of the\n * ANSI APIs, even if the program primarily uses UTF-8.\n */\n#  ifndef _UNICODE\n#    define _UNICODE\n#  endif\n#  ifndef UNICODE\n#    define UNICODE\n#  endif\n#endif /* XSUM_WIN32_USE_WCHAR */\n\n#ifndef XSUM_API\n#  ifdef XXH_INLINE_ALL\n#    define XSUM_API static\n#  else\n#    define XSUM_API\n#  endif\n#endif\n\n#ifndef XSUM_NO_TESTS\n#  define XSUM_NO_TESTS 0\n#endif\n\n/* ***************************\n * Basic types\n * ***************************/\n\n#if defined(__cplusplus) /* C++ */ \\\n || (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)  /* C99 */\n#  include <stdint.h>\n    typedef uint8_t  XSUM_U8;\n    typedef uint32_t XSUM_U32;\n    typedef uint64_t XSUM_U64;\n# else\n#   include <limits.h>\n    typedef unsigned char      XSUM_U8;\n#   if UINT_MAX == 0xFFFFFFFFUL\n      typedef unsigned int     XSUM_U32;\n#   else\n      typedef unsigned long    XSUM_U32;\n#   endif\n    typedef unsigned long long XSUM_U64;\n#endif /* not C++/C99 */\n\n/* ***************************\n * Common constants\n * ***************************/\n\n#define KB *( 1<<10)\n#define MB *( 1<<20)\n#define GB *(1U<<30)\n\n\n#endif /* XSUM_CONFIG_H */\n"
  },
  {
    "path": "third-party/xxhash/cli/xsum_os_specific.c",
    "content": "/*\n * xxhsum - Command line interface for xxhash algorithms\n * Copyright (C) 2013-2021 Yann Collet\n *\n * GPL v2 License\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n#include \"xsum_os_specific.h\"  /* XSUM_API */\n#include <sys/stat.h>   /* stat() / _stat64() */\n\n/*\n * This file contains all of the ugly boilerplate to make xxhsum work across\n * platforms.\n */\n#if defined(_MSC_VER) || XSUM_WIN32_USE_WCHAR\n    typedef struct __stat64 XSUM_stat_t;\n# if defined(_MSC_VER)\n    typedef int mode_t;\n# endif\n#else\n    typedef struct stat XSUM_stat_t;\n#endif\n\n#if defined(__EMSCRIPTEN__) && defined(XSUM_NODE_JS)\n#  include <unistd.h>   /* isatty */\n#  include <emscripten.h> /* EM_ASM_INT */\n\n/* The Emscripten SDK does not properly detect when the standard streams\n * are piped to node.js, and there does not seem to be any way to tell in\n * plain C. To work around it, inline JavaScript is used to call Node's\n * isatty() function. */\nstatic int XSUM_IS_CONSOLE(FILE* stdStream)\n{\n    /* https://github.com/iliakan/detect-node */\n    int is_node = EM_ASM_INT((\n        return (Object.prototype.toString.call(\n            typeof process !== 'undefined' ? process : 0\n        ) == '[object process]') | 0\n    ));\n    if (is_node) {\n        return EM_ASM_INT(\n            return require('node:tty').isatty($0),\n            fileno(stdStream)\n        );\n    } else {\n        return isatty(fileno(stdStream));\n    }\n}\n#elif defined(__EMSCRIPTEN__) || (defined(__linux__) && (XSUM_PLATFORM_POSIX_VERSION >= 1)) \\\n || (XSUM_PLATFORM_POSIX_VERSION >= 200112L) \\\n || defined(__DJGPP__) \\\n || defined(__MSYS__) \\\n || defined(__HAIKU__)\n#  ifdef __OpenBSD__\n#    include <errno.h>       /* errno */\n#    include <string.h>      /* strerror */\n#    include \"xsum_output.h\" /* XSUM_log */\n#  endif\n#  include <unistd.h>   /* isatty */\n#  define XSUM_IS_CONSOLE(stdStream) isatty(fileno(stdStream))\n#elif defined(MSDOS) || defined(OS2)\n#  include <io.h>       /* _isatty */\n#  define XSUM_IS_CONSOLE(stdStream) _isatty(_fileno(stdStream))\n#elif defined(_WIN32)\n#  include <io.h>      /* _isatty */\n#  include <windows.h> /* DeviceIoControl, HANDLE, FSCTL_SET_SPARSE */\n#  include <stdio.h>   /* FILE */\nstatic __inline int XSUM_IS_CONSOLE(FILE* stdStream)\n{\n    DWORD dummy;\n    return _isatty(_fileno(stdStream)) && GetConsoleMode((HANDLE)_get_osfhandle(_fileno(stdStream)), &dummy);\n}\n#else\n#  define XSUM_IS_CONSOLE(stdStream) 0\n#endif\n\n#if defined(MSDOS) || defined(OS2) || defined(_WIN32)\n#  include <fcntl.h>   /* _O_BINARY */\n#  include <io.h>      /* _setmode, _fileno, _get_osfhandle */\n#  if !defined(__DJGPP__)\n#    include <windows.h> /* DeviceIoControl, HANDLE, FSCTL_SET_SPARSE */\n#    include <winioctl.h> /* FSCTL_SET_SPARSE */\n#    define XSUM_SET_BINARY_MODE(file) { int const unused=_setmode(_fileno(file), _O_BINARY); (void)unused; }\n#  else\n#    define XSUM_SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)\n#  endif\n#else\n#  define XSUM_SET_BINARY_MODE(file) ((void)file)\n#endif\n\nXSUM_API int XSUM_isConsole(FILE* stream)\n{\n    return XSUM_IS_CONSOLE(stream);\n}\n\nXSUM_API void XSUM_setBinaryMode(FILE* stream)\n{\n    XSUM_SET_BINARY_MODE(stream);\n}\n\n#if !XSUM_WIN32_USE_WCHAR\n\nXSUM_API FILE* XSUM_fopen(const char* filename, const char* mode)\n{\n    return fopen(filename, mode);\n}\nXSUM_ATTRIBUTE((__format__(__printf__, 2, 0)))\nXSUM_API int XSUM_vfprintf(FILE* stream, const char* format, va_list ap)\n{\n    return vfprintf(stream, format, ap);\n}\n\nstatic int XSUM_stat(const char* infilename, XSUM_stat_t* statbuf)\n{\n#if defined(_MSC_VER)\n    return _stat64(infilename, statbuf);\n#else\n    return stat(infilename, statbuf);\n#endif\n}\n\n#ifndef XSUM_NO_MAIN\nint main(int argc, const char* argv[])\n{\n#ifdef __OpenBSD__\n    /*\n     * xxhsum(1) does not create or write files, permit reading only.\n     */\n    if (pledge(\"stdio rpath\", NULL) == -1) {\n        XSUM_log(\"pledge: %s\\n\", strerror(errno));\n        return 1;\n    }\n#endif\n\n    return XSUM_main(argc, argv);\n}\n#endif\n\n/* Unicode helpers for Windows to make UTF-8 act as it should. */\n#else\n#  include <windows.h>\n#  include <wchar.h>\n\n/*****************************************************************************\n *                       Unicode conversion tools\n *****************************************************************************/\n\n/*\n * Converts a UTF-8 string to UTF-16. Acts like strdup. The string must be freed afterwards.\n * This version allows keeping the output length.\n */\nstatic wchar_t* XSUM_widenString(const char* str, int* lenOut)\n{\n    int const len = MultiByteToWideChar(CP_UTF8, 0, str, -1, NULL, 0);\n    if (lenOut != NULL) *lenOut = len;\n    if (len == 0) return NULL;\n    {   wchar_t* buf = (wchar_t*)malloc((size_t)len * sizeof(wchar_t));\n        if (buf != NULL) {\n            if (MultiByteToWideChar(CP_UTF8, 0, str, -1, buf, len) == 0) {\n                free(buf);\n                return NULL;\n       }    }\n       return buf;\n    }\n}\n\n/*\n * Converts a UTF-16 string to UTF-8. Acts like strdup. The string must be freed afterwards.\n * This version allows keeping the output length.\n */\nstatic char* XSUM_narrowString(const wchar_t *str, int *lenOut)\n{\n    int len = WideCharToMultiByte(CP_UTF8, 0, str, -1, NULL, 0, NULL, NULL);\n    if (lenOut != NULL) *lenOut = len;\n    if (len == 0) return NULL;\n    {   char* const buf = (char*)malloc((size_t)len * sizeof(char));\n        if (buf != NULL) {\n            if (WideCharToMultiByte(CP_UTF8, 0, str, -1, buf, len, NULL, NULL) == 0) {\n                free(buf);\n                return NULL;\n        }    }\n        return buf;\n    }\n}\n\n\n\n/*****************************************************************************\n *                             File helpers\n *****************************************************************************/\n/*\n * fopen wrapper that supports UTF-8\n *\n * fopen will only accept ANSI filenames, which means that we can't open Unicode filenames.\n *\n * In order to open a Unicode filename, we need to convert filenames to UTF-16 and use _wfopen.\n */\nXSUM_API FILE* XSUM_fopen(const char* filename, const char* mode)\n{\n    FILE* f = NULL;\n    wchar_t* const wide_filename = XSUM_widenString(filename, NULL);\n    if (wide_filename != NULL) {\n        wchar_t* const wide_mode = XSUM_widenString(mode, NULL);\n        if (wide_mode != NULL) {\n            f = _wfopen(wide_filename, wide_mode);\n            free(wide_mode);\n        }\n        free(wide_filename);\n    }\n    return f;\n}\n\n/*\n * stat() wrapper which supports UTF-8 filenames.\n */\nstatic int XSUM_stat(const char* infilename, XSUM_stat_t* statbuf)\n{\n    int r = -1;\n    wchar_t* const wide_filename = XSUM_widenString(infilename, NULL);\n    if (wide_filename != NULL) {\n        r = _wstat64(wide_filename, statbuf);\n        free(wide_filename);\n    }\n    return r;\n}\n\n/*\n * In case it isn't available, this is what MSVC 2019 defines in stdarg.h.\n */\n#if defined(_MSC_VER) && !defined(__clang__) && !defined(va_copy)\n#  define XSUM_va_copy(destination, source) ((destination) = (source))\n#else\n#  define XSUM_va_copy(destination, source) va_copy(destination, source)\n#endif\n\n/*\n * vasprintf for Windows.\n */\nXSUM_ATTRIBUTE((__format__(__printf__, 2, 0)))\nstatic int XSUM_vasprintf(char** strp, const char* format, va_list ap)\n{\n    int size;\n    va_list copy;\n    /*\n     * To be safe, make a va_copy.\n     *\n     * Note that Microsoft doesn't use va_copy in its sample code:\n     *   https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l?view=vs-2019\n     */\n    XSUM_va_copy(copy, ap);\n    /* Calculate how many characters we need */\n    size = _vscprintf(format, ap);\n    va_end(copy);\n\n    if (size < 0) {\n        *strp = NULL;\n        return size;\n    } else {\n        int ret;\n        *strp = (char*) malloc((size_t)size + 1);\n        if (*strp == NULL) {\n            return -1;\n        }\n        /* vsprintf into the new buffer */\n        ret = vsprintf(*strp, format, ap);\n        if (ret < 0) {\n            free(*strp);\n            *strp = NULL;\n        }\n        return ret;\n    }\n}\n\n/*\n * fprintf wrapper that supports UTF-8.\n *\n * fprintf doesn't properly handle Unicode on Windows.\n *\n * Additionally, it is codepage sensitive on console and may crash the program.\n *\n * Instead, we use vsnprintf, and either print with fwrite or convert to UTF-16\n * for console output and use the codepage-independent WriteConsoleW.\n *\n * Credit to t-mat: https://github.com/t-mat/xxHash/commit/5691423\n */\nXSUM_ATTRIBUTE((__format__(__printf__, 2, 0)))\nXSUM_API int XSUM_vfprintf(FILE *stream, const char *format, va_list ap)\n{\n    int result;\n    char* u8_str = NULL;\n\n    /*\n     * Generate the UTF-8 output string with vasprintf.\n     */\n    result = XSUM_vasprintf(&u8_str, format, ap);\n\n    if (result >= 0) {\n        const size_t nchar = (size_t)result + 1;\n\n        /*\n         * Check if we are outputting to a console. Don't use XSUM_isConsole\n         * directly -- we don't need to call _get_osfhandle twice.\n         */\n        int fileNb = _fileno(stream);\n        intptr_t handle_raw = _get_osfhandle(fileNb);\n        HANDLE handle = (HANDLE)handle_raw;\n        DWORD dwTemp;\n\n        if (handle_raw < 0) {\n             result = -1;\n        } else if (_isatty(fileNb) && GetConsoleMode(handle, &dwTemp)) {\n            /*\n             * Convert to UTF-16 and output with WriteConsoleW.\n             *\n             * This is codepage independent and works on Windows XP's default\n             * msvcrt.dll.\n             */\n            int len;\n            wchar_t* const u16_buf = XSUM_widenString(u8_str, &len);\n            if (u16_buf == NULL) {\n                result = -1;\n            } else {\n                if (WriteConsoleW(handle, u16_buf, (DWORD)len - 1, &dwTemp, NULL)) {\n                    result = (int)dwTemp;\n                } else {\n                    result = -1;\n                }\n                free(u16_buf);\n            }\n        } else {\n            /* fwrite the UTF-8 string if we are printing to a file */\n            result = (int)fwrite(u8_str, 1, nchar - 1, stream);\n            if (result == 0) {\n                result = -1;\n            }\n        }\n        free(u8_str);\n    }\n    return result;\n}\n\n#ifndef XSUM_NO_MAIN\n/*****************************************************************************\n *                    Command Line argument parsing\n *****************************************************************************/\n\n/* Converts a UTF-16 argv to UTF-8. */\nstatic char** XSUM_convertArgv(int argc, wchar_t* utf16_argv[])\n{\n    char** const utf8_argv = (char**)malloc((size_t)(argc + 1) * sizeof(char*));\n    if (utf8_argv != NULL) {\n        int i;\n        for (i = 0; i < argc; i++) {\n            utf8_argv[i] = XSUM_narrowString(utf16_argv[i], NULL);\n            if (utf8_argv[i] == NULL) {\n                /* Out of memory, whoops. */\n                while (i-- > 0) {\n                    free(utf8_argv[i]);\n                }\n                free(utf8_argv);\n                return NULL;\n            }\n        }\n        utf8_argv[argc] = NULL;\n    }\n    return utf8_argv;\n}\n/* Frees arguments returned by XSUM_convertArgv */\nstatic void XSUM_freeArgv(int argc, char** argv)\n{\n    int i;\n    if (argv == NULL) {\n        return;\n    }\n    for (i = 0; i < argc; i++) {\n        free(argv[i]);\n    }\n    free(argv);\n}\n\nstatic int XSUM_wmain(int argc, wchar_t* utf16_argv[])\n{\n    /* Convert the UTF-16 arguments to UTF-8. */\n    char** utf8_argv = XSUM_convertArgv(argc, utf16_argv);\n\n    if (utf8_argv == NULL) {\n        /* An unfortunate but incredibly unlikely error. */\n        fprintf(stderr, \"xxhsum: error converting command line arguments!\\n\");\n        abort();\n    } else {\n        int ret;\n\n        /*\n         * MinGW's terminal uses full block buffering for stderr.\n         *\n         * This is nonstandard behavior and causes text to not display until\n         * the buffer fills.\n         *\n         * `setvbuf()` can easily correct this to make text display instantly.\n         */\n        setvbuf(stderr, NULL, _IONBF, 0);\n\n        /* Call our real main function */\n        ret = XSUM_main(argc, (void*)utf8_argv);\n\n        /* Cleanup */\n        XSUM_freeArgv(argc, utf8_argv);\n        return ret;\n    }\n}\n\n#if XSUM_WIN32_USE_WMAIN\n\n/*\n * The preferred method of obtaining the real UTF-16 arguments. Always works\n * on MSVC, sometimes works on MinGW-w64 depending on the compiler flags.\n */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nint __cdecl wmain(int argc, wchar_t* utf16_argv[])\n{\n    return XSUM_wmain(argc, utf16_argv);\n}\n#else /* !XSUM_WIN32_USE_WMAIN */\n\n/*\n * Wrap `XSUM_wmain()` using `main()` and `__wgetmainargs()` on MinGW without\n * Unicode support.\n *\n * `__wgetmainargs()` is used in the CRT startup to retrieve the arguments for\n * `wmain()`, so we use it on MinGW to emulate `wmain()`.\n *\n * It is an internal function and not declared in any public headers, so we\n * have to declare it manually.\n *\n * An alternative that doesn't mess with internal APIs is `GetCommandLineW()`\n * with `CommandLineToArgvW()`, but the former doesn't expand wildcards and the\n * latter requires linking to Shell32.dll and its numerous dependencies.\n *\n * This method keeps our dependencies to kernel32.dll and the CRT.\n *\n * https://docs.microsoft.com/en-us/cpp/c-runtime-library/getmainargs-wgetmainargs?view=vs-2019\n */\ntypedef struct {\n    int newmode;\n} _startupinfo;\n\n#ifdef __cplusplus\nextern \"C\"\n#endif\nint __cdecl __wgetmainargs(\n    int*          Argc,\n    wchar_t***    Argv,\n    wchar_t***    Env,\n    int           DoWildCard,\n    _startupinfo* StartInfo\n);\n\nint main(int ansi_argc, const char* ansi_argv[])\n{\n    int       utf16_argc;\n    wchar_t** utf16_argv;\n    wchar_t** utf16_envp;         /* Unused but required */\n    _startupinfo startinfo = {0}; /* 0 == don't change new mode */\n\n    /* Get wmain's UTF-16 arguments. Make sure we expand wildcards. */\n    if (__wgetmainargs(&utf16_argc, &utf16_argv, &utf16_envp, 1, &startinfo) < 0)\n        /* In the very unlikely case of an error, use the ANSI arguments. */\n        return XSUM_main(ansi_argc, ansi_argv);\n\n    /* Call XSUM_wmain with our UTF-16 arguments */\n    return XSUM_wmain(utf16_argc, utf16_argv);\n}\n\n#endif /* !XSUM_WIN32_USE_WMAIN */\n#endif /* !XSUM_NO_MAIN */\n#endif /* XSUM_WIN32_USE_WCHAR */\n\n\n/*\n * Determines whether the file at filename is a directory.\n */\nXSUM_API int XSUM_isDirectory(const char* filename)\n{\n    XSUM_stat_t statbuf;\n    int r = XSUM_stat(filename, &statbuf);\n#ifdef _MSC_VER\n    if (!r && (statbuf.st_mode & _S_IFDIR)) return 1;\n#else\n    if (!r && S_ISDIR(statbuf.st_mode)) return 1;\n#endif\n    return 0;\n}\n\n/*\n * Returns the filesize of the file at filename.\n */\nXSUM_API XSUM_U64 XSUM_getFileSize(const char* filename)\n{\n    XSUM_stat_t statbuf;\n    int r = XSUM_stat(filename, &statbuf);\n    if (r || !S_ISREG(statbuf.st_mode)) return 0;   /* No good... */\n    return (XSUM_U64)statbuf.st_size;\n}\n"
  },
  {
    "path": "third-party/xxhash/cli/xsum_os_specific.h",
    "content": "/*\n * xxhsum - Command line interface for xxhash algorithms\n * Copyright (C) 2013-2021 Yann Collet\n *\n * GPL v2 License\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n#ifndef XSUM_OS_SPECIFIC_H\n#define XSUM_OS_SPECIFIC_H\n\n#include \"xsum_config.h\"\n#include <stdio.h>\n#include <stdarg.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * Declared here to be implemented in user code.\n *\n * Functions like main(), but is passed UTF-8 arguments even on Windows.\n */\nXSUM_API int XSUM_main(int argc, const char* argv[]);\n\n/*\n * Returns whether stream is a console.\n *\n * Functionally equivalent to isatty(fileno(stream)).\n */\nXSUM_API int XSUM_isConsole(FILE* stream);\n\n/*\n * Sets stream to pure binary mode (a.k.a. no CRLF conversions).\n */\nXSUM_API void XSUM_setBinaryMode(FILE* stream);\n\n/*\n * Returns whether the file at filename is a directory.\n */\nXSUM_API int XSUM_isDirectory(const char* filename);\n\n/*\n * Returns the file size of the file at filename.\n */\nXSUM_API XSUM_U64 XSUM_getFileSize(const char* filename);\n\n/*\n * UTF-8 stdio wrappers primarily for Windows\n */\n\n/*\n * fopen() wrapper. Accepts UTF-8 filenames on Windows.\n *\n * Specifically, on Windows, the arguments will be converted to UTF-16\n * and passed to _wfopen().\n */\nXSUM_API FILE* XSUM_fopen(const char* filename, const char* mode);\n\n/*\n * vfprintf() wrapper which prints UTF-8 strings to Windows consoles\n * if applicable.\n */\nXSUM_ATTRIBUTE((__format__(__printf__, 2, 0)))\nXSUM_API int XSUM_vfprintf(FILE* stream, const char* format, va_list ap);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* XSUM_OS_SPECIFIC_H */\n"
  },
  {
    "path": "third-party/xxhash/cli/xsum_output.c",
    "content": "/*\n * xxhsum - Command line interface for xxhash algorithms\n * Copyright (C) 2013-2021 Yann Collet\n *\n * GPL v2 License\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n#include \"xsum_output.h\"\n#include \"xsum_os_specific.h\"  /* XSUM_API */\n\nint XSUM_logLevel = 2;\n\nXSUM_ATTRIBUTE((__format__(__printf__, 1, 2)))\nXSUM_API int XSUM_log(const char* format, ...)\n{\n    int ret;\n    va_list ap;\n    va_start(ap, format);\n    ret = XSUM_vfprintf(stderr, format, ap);\n    va_end(ap);\n    return ret;\n}\n\n\nXSUM_ATTRIBUTE((__format__(__printf__, 1, 2)))\nXSUM_API int XSUM_output(const char* format, ...)\n{\n    int ret;\n    va_list ap;\n    va_start(ap, format);\n    ret = XSUM_vfprintf(stdout, format, ap);\n    va_end(ap);\n    return ret;\n}\n\nXSUM_ATTRIBUTE((__format__(__printf__, 2, 3)))\nXSUM_API int XSUM_logVerbose(int minLevel, const char* format, ...)\n{\n    if (XSUM_logLevel >= minLevel) {\n        int ret;\n        va_list ap;\n        va_start(ap, format);\n        ret = XSUM_vfprintf(stderr, format, ap);\n        va_end(ap);\n        return ret;\n    }\n    return 0;\n}\n"
  },
  {
    "path": "third-party/xxhash/cli/xsum_output.h",
    "content": "/*\n * xxhsum - Command line interface for xxhash algorithms\n * Copyright (C) 2013-2021 Yann Collet\n *\n * GPL v2 License\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n#ifndef XSUM_OUTPUT_H\n#define XSUM_OUTPUT_H\n\n#include \"xsum_config.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * How verbose the output is.\n */\nextern int XSUM_logLevel;\n\n/*\n * Same as fprintf(stderr, format, ...)\n */\nXSUM_ATTRIBUTE((__format__(__printf__, 1, 2)))\nXSUM_API int XSUM_log(const char *format, ...);\n\n/*\n * Like XSUM_log, but only outputs if XSUM_logLevel >= minLevel.\n */\nXSUM_ATTRIBUTE((__format__(__printf__, 2, 3)))\nXSUM_API int XSUM_logVerbose(int minLevel, const char *format, ...);\n\n/*\n * Same as printf(format, ...)\n */\nXSUM_ATTRIBUTE((__format__(__printf__, 1, 2)))\nXSUM_API int XSUM_output(const char *format, ...);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* XSUM_OUTPUT_H */\n"
  },
  {
    "path": "third-party/xxhash/cli/xsum_sanity_check.c",
    "content": "/*\n * xxhsum - Command line interface for xxhash algorithms\n * Copyright (C) 2013-2021 Yann Collet\n *\n * GPL v2 License\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n#include \"xsum_sanity_check.h\"\n#include \"xsum_output.h\"  /* XSUM_log */\n#ifndef XXH_STATIC_LINKING_ONLY\n#  define XXH_STATIC_LINKING_ONLY\n#endif\n#include \"../xxhash.h\"\n\n#include <stdlib.h>  /* exit */\n#include <assert.h>\n#include <string.h>  /* memcmp */\n\n/* use #define to make them constant, required for initialization */\n#define PRIME32 2654435761U\n#define PRIME64 11400714785074694797ULL\n\n/*\n * Fills a test buffer with pseudorandom data.\n *\n * This is used in the sanity check - its values must not be changed.\n */\nXSUM_API void XSUM_fillTestBuffer(XSUM_U8* buffer, size_t len)\n{\n    XSUM_U64 byteGen = PRIME32;\n    size_t i;\n\n    assert(buffer != NULL);\n\n    for (i=0; i<len; i++) {\n        buffer[i] = (XSUM_U8)(byteGen>>56);\n        byteGen *= PRIME64;\n    }\n}\n\n\n\n/* ************************************************\n * Self-test:\n * ensure results consistency across platforms\n *********************************************** */\n#if XSUM_NO_TESTS\nXSUM_API void XSUM_sanityCheck(void)\n{\n    XSUM_log(\"This version of xxhsum is not verified.\\n\");\n}\n#else\n\n/*\n * Test data vectors\n */\ntypedef struct {\n    XSUM_U32 len;\n    XSUM_U32 seed;\n    XSUM_U32 Nresult;\n} XSUM_testdata32_t;\n\ntypedef struct {\n    XSUM_U32 len;\n    XSUM_U64 seed;\n    XSUM_U64 Nresult;\n} XSUM_testdata64_t;\n\ntypedef struct {\n    XSUM_U32 len;\n    XSUM_U64 seed;\n    XXH128_hash_t Nresult;\n} XSUM_testdata128_t;\n\n#define SECRET_SAMPLE_NBBYTES 5\ntypedef struct {\n    XSUM_U32 seedLen;\n    XSUM_U32 secretLen;\n    XSUM_U8 byte[SECRET_SAMPLE_NBBYTES];\n} XSUM_testdata_sample_t;\n\n/* XXH32 */\nstatic const XSUM_testdata32_t XSUM_XXH32_testdata[] = {\n    {   0,       0, 0x02CC5D05U },\n    {   0, PRIME32, 0x36B78AE7U },\n    {   1,       0, 0xCF65B03EU },\n    {   1, PRIME32, 0xB4545AA4U },\n    {  14,       0, 0x1208E7E2U },\n    {  14, PRIME32, 0x6AF1D1FEU },\n    { 222,       0, 0x5BD11DBDU },\n    { 222, PRIME32, 0x58803C5FU }\n};\n\n/* XXH64 */\nstatic const XSUM_testdata64_t XSUM_XXH64_testdata[] = {\n    {   0,       0, 0xEF46DB3751D8E999ULL },\n    {   0, PRIME32, 0xAC75FDA2929B17EFULL },\n    {   1,       0, 0xE934A84ADB052768ULL },\n    {   1, PRIME32, 0x5014607643A9B4C3ULL },\n    {   4,       0, 0x9136A0DCA57457EEULL },\n    {  14,       0, 0x8282DCC4994E35C8ULL },\n    {  14, PRIME32, 0xC3BD6BF63DEB6DF0ULL },\n    { 222,       0, 0xB641AE8CB691C174ULL },\n    { 222, PRIME32, 0x20CB8AB7AE10C14AULL }\n};\n/*\n * XXH3:\n * Due to being a more complex hash function with specializations for certain\n * lengths, a more extensive test is used for XXH3.\n */\n\n/* XXH3_64bits, seeded */\nstatic const XSUM_testdata64_t XSUM_XXH3_testdata[] = {\n    {    0,       0, 0x2D06800538D394C2ULL },  /* empty string */\n    {    0, PRIME64, 0xA8A6B918B2F0364AULL },\n    {    1,       0, 0xC44BDFF4074EECDBULL },  /*  1 -  3 */\n    {    1, PRIME64, 0x032BE332DD766EF8ULL },\n    {    6,       0, 0x27B56A84CD2D7325ULL },  /*  4 -  8 */\n    {    6, PRIME64, 0x84589C116AB59AB9ULL },\n    {   12,       0, 0xA713DAF0DFBB77E7ULL },  /*  9 - 16 */\n    {   12, PRIME64, 0xE7303E1B2336DE0EULL },\n    {   24,       0, 0xA3FE70BF9D3510EBULL },  /* 17 - 32 */\n    {   24, PRIME64, 0x850E80FC35BDD690ULL },\n    {   48,       0, 0x397DA259ECBA1F11ULL },  /* 33 - 64 */\n    {   48, PRIME64, 0xADC2CBAA44ACC616ULL },\n    {   80,       0, 0xBCDEFBBB2C47C90AULL },  /* 65 - 96 */\n    {   80, PRIME64, 0xC6DD0CB699532E73ULL },\n    {  195,       0, 0xCD94217EE362EC3AULL },  /* 129-240 */\n    {  195, PRIME64, 0xBA68003D370CB3D9ULL },\n\n    {  403,       0, 0xCDEB804D65C6DEA4ULL },  /* one block, last stripe is overlapping */\n    {  403, PRIME64, 0x6259F6ECFD6443FDULL },\n    {  512,       0, 0x617E49599013CB6BULL },  /* one block, finishing at stripe boundary */\n    {  512, PRIME64, 0x3CE457DE14C27708ULL },\n    { 2048,       0, 0xDD59E2C3A5F038E0ULL },  /* 2 blocks, finishing at block boundary */\n    { 2048, PRIME64, 0x66F81670669ABABCULL },\n    { 2099,       0, 0xC6B9D9B3FC9AC765ULL },  /* 2 blocks + 1 partial block, to detect off-by-one scrambling issues, like #816 */\n    { 2099, PRIME64, 0x184F316843663974ULL },\n    { 2240,       0, 0x6E73A90539CF2948ULL },  /* 3 blocks, finishing at stripe boundary */\n    { 2240, PRIME64, 0x757BA8487D1B5247ULL },\n    { 2367,       0, 0xCB37AEB9E5D361EDULL },  /* 3 blocks, last stripe is overlapping */\n    { 2367, PRIME64, 0xD2DB3415B942B42AULL }\n};\n/* XXH3_64bits, custom secret */\nstatic const XSUM_testdata64_t XSUM_XXH3_withSecret_testdata[] = {\n    {       0, 0, 0x3559D64878C5C66CULL },  /* empty string */\n    {       1, 0, 0x8A52451418B2DA4DULL },  /*  1 -  3 */\n    {       6, 0, 0x82C90AB0519369ADULL },  /*  4 -  8 */\n    {      12, 0, 0x14631E773B78EC57ULL },  /*  9 - 16 */\n    {      24, 0, 0xCDD5542E4A9D9FE8ULL },  /* 17 - 32 */\n    {      48, 0, 0x33ABD54D094B2534ULL },  /* 33 - 64 */\n    {      80, 0, 0xE687BA1684965297ULL },  /* 65 - 96 */\n    {     195, 0, 0xA057273F5EECFB20ULL },  /* 129-240 */\n\n    {     403, 0, 0x14546019124D43B8ULL },  /* one block, last stripe is overlapping */\n    {     512, 0, 0x7564693DD526E28DULL },  /* one block, finishing at stripe boundary */\n    {    2048, 0, 0xD32E975821D6519FULL },  /* >= 2 blodcks, at least one scrambling */\n    {    2367, 0, 0x293FA8E5173BB5E7ULL },  /* >= 2 blocks, at least one scrambling, last stripe unaligned */\n\n    { 64*10*3, 0, 0x751D2EC54BC6038BULL }   /* exactly 3 full blocks, not a multiple of 256 */\n};\n/* XXH3_128bits, seeded */\nstatic const XSUM_testdata128_t XSUM_XXH128_testdata[] = {\n    {    0,       0, { 0x6001C324468D497FULL, 0x99AA06D3014798D8ULL } },  /* empty string */\n    {    0, PRIME32, { 0x5444F7869C671AB0ULL, 0x92220AE55E14AB50ULL } },\n    {    1,       0, { 0xC44BDFF4074EECDBULL, 0xA6CD5E9392000F6AULL } },  /*  1 -  3 */\n    {    1, PRIME32, { 0xB53D5557E7F76F8DULL, 0x89B99554BA22467CULL } },\n    {    6,       0, { 0x3E7039BDDA43CFC6ULL, 0x082AFE0B8162D12AULL } },  /*  4 -  8 */\n    {    6, PRIME32, { 0x269D8F70BE98856EULL, 0x5A865B5389ABD2B1ULL } },\n    {   12,       0, { 0x061A192713F69AD9ULL, 0x6E3EFD8FC7802B18ULL } },  /*  9 - 16 */\n    {   12, PRIME32, { 0x9BE9F9A67F3C7DFBULL, 0xD7E09D518A3405D3ULL } },\n    {   24,       0, { 0x1E7044D28B1B901DULL, 0x0CE966E4678D3761ULL } },  /* 17 - 32 */\n    {   24, PRIME32, { 0xD7304C54EBAD40A9ULL, 0x3162026714A6A243ULL } },\n    {   48,       0, { 0xF942219AED80F67BULL, 0xA002AC4E5478227EULL } },  /* 33 - 64 */\n    {   48, PRIME32, { 0x7BA3C3E453A1934EULL, 0x163ADDE36C072295ULL } },\n    {   81,       0, { 0x5E8BAFB9F95FB803ULL, 0x4952F58181AB0042ULL } },  /* 65 - 96 */\n    {   81, PRIME32, { 0x703FBB3D7A5F755CULL, 0x2724EC7ADC750FB6ULL } },\n    {  222,       0, { 0xF1AEBD597CEC6B3AULL, 0x337E09641B948717ULL } },  /* 129-240 */\n    {  222, PRIME32, { 0xAE995BB8AF917A8DULL, 0x91820016621E97F1ULL } },\n\n    {  403,       0, { 0xCDEB804D65C6DEA4ULL, 0x1B6DE21E332DD73DULL } },  /* one block, last stripe is overlapping */\n    {  403, PRIME64, { 0x6259F6ECFD6443FDULL, 0xBED311971E0BE8F2ULL } },\n    {  512,       0, { 0x617E49599013CB6BULL, 0x18D2D110DCC9BCA1ULL } },  /* one block, finishing at stripe boundary */\n    {  512, PRIME64, { 0x3CE457DE14C27708ULL, 0x925D06B8EC5B8040ULL } },\n    { 2048,       0, { 0xDD59E2C3A5F038E0ULL, 0xF736557FD47073A5ULL } },  /* 2 blocks, finishing at block boundary */\n    { 2048, PRIME32, { 0x230D43F30206260BULL, 0x7FB03F7E7186C3EAULL } },\n    { 2240,       0, { 0x6E73A90539CF2948ULL, 0xCCB134FBFA7CE49DULL } },  /* 3 blocks, finishing at stripe boundary */\n    { 2240, PRIME32, { 0xED385111126FBA6FULL, 0x50A1FE17B338995FULL } },\n    { 2367,       0, { 0xCB37AEB9E5D361EDULL, 0xE89C0F6FF369B427ULL } },  /* 3 blocks, last stripe is overlapping */\n    { 2367, PRIME32, { 0x6F5360AE69C2F406ULL, 0xD23AAE4B76C31ECBULL } }\n};\n\n/* XXH128, custom secret */\nstatic const XSUM_testdata128_t XSUM_XXH128_withSecret_testdata[] = {\n    {  0, 0, { 0x005923CCEECBE8AEULL, 0x5F70F4EA232F1D38ULL } },  /* empty string */\n    {  1, 0, { 0x8A52451418B2DA4DULL, 0x3A66AF5A9819198EULL } },  /*  1 -  3 */\n    {  6, 0, { 0x0B61C8ACA7D4778FULL, 0x376BD91B6432F36DULL } },  /*  4 -  8 */\n    { 12, 0, { 0xAF82F6EBA263D7D8ULL, 0x90A3C2D839F57D0FULL } }   /*  9 - 16 */\n};\n\n#define SECRET_SIZE_MAX 9867\nstatic const XSUM_testdata_sample_t XSUM_XXH3_generateSecret_testdata[] = {\n    {                              0, 192, { 0xE7, 0x8C, 0x77, 0x77, 0x00 } },\n    {                              1, 240, { 0x2B, 0x3E, 0xDE, 0xC1, 0x00 } },\n    {     XXH3_SECRET_SIZE_MIN -   1, 277, { 0xE8, 0x39, 0x6C, 0xCC, 0x7B } },\n    { XXH3_SECRET_DEFAULT_SIZE + 500, SECRET_SIZE_MAX, { 0xD6, 0x1C, 0x41, 0x17, 0xB3 } }\n};\n\nstatic void XSUM_checkResult32(XXH32_hash_t r1, XXH32_hash_t r2)\n{\n    static int nbTests = 1;\n    if (r1!=r2) {\n        XSUM_log(\"\\rError: 32-bit hash test %i: Internal sanity check failed!\\n\", nbTests);\n        XSUM_log(\"\\rGot 0x%08X, expected 0x%08X.\\n\", (unsigned)r1, (unsigned)r2);\n        XSUM_log(\"\\rNote: If you modified the hash functions, make sure to either update the values\\n\"\n                  \"or temporarily recompile with XSUM_NO_TESTS=1.\\n\");\n        exit(1);\n    }\n    nbTests++;\n}\n\nstatic void XSUM_checkResult64(XXH64_hash_t r1, XXH64_hash_t r2)\n{\n    static int nbTests = 1;\n    if (r1!=r2) {\n        XSUM_log(\"\\rError: 64-bit hash test %i: Internal sanity check failed!\\n\", nbTests);\n        XSUM_log(\"\\rGot 0x%08X%08XULL, expected 0x%08X%08XULL.\\n\",\n                (unsigned)(r1>>32), (unsigned)r1, (unsigned)(r2>>32), (unsigned)r2);\n        XSUM_log(\"\\rNote: If you modified the hash functions, make sure to either update the values\\n\"\n                  \"or temporarily recompile with XSUM_NO_TESTS=1.\\n\");\n        exit(1);\n    }\n    nbTests++;\n}\n\nstatic void XSUM_checkResult128(XXH128_hash_t r1, XXH128_hash_t r2)\n{\n    static int nbTests = 1;\n    if ((r1.low64 != r2.low64) || (r1.high64 != r2.high64)) {\n        XSUM_log(\"\\rError: 128-bit hash test %i: Internal sanity check failed.\\n\", nbTests);\n        XSUM_log(\"\\rGot { 0x%08X%08XULL, 0x%08X%08XULL }, expected { 0x%08X%08XULL, 0x%08X%08XULL } \\n\",\n                (unsigned)(r1.low64>>32), (unsigned)r1.low64, (unsigned)(r1.high64>>32), (unsigned)r1.high64,\n                (unsigned)(r2.low64>>32), (unsigned)r2.low64, (unsigned)(r2.high64>>32), (unsigned)r2.high64 );\n        XSUM_log(\"\\rNote: If you modified the hash functions, make sure to either update the values\\n\"\n                  \"or temporarily recompile with XSUM_NO_TESTS=1.\\n\");\n        exit(1);\n    }\n    nbTests++;\n}\n\n\nstatic void XSUM_testXXH32(const void* data, const XSUM_testdata32_t* testData)\n{\n    XXH32_state_t *state = XXH32_createState();\n    size_t pos;\n\n    size_t len = testData->len;\n    XSUM_U32 seed = testData->seed;\n    XSUM_U32 Nresult = testData->Nresult;\n\n    if (len == 0) {\n        data = NULL;\n    } else {\n        assert(data != NULL);\n    }\n\n    assert(state != NULL);\n\n    XSUM_checkResult32(XXH32(data, len, seed), Nresult);\n\n    (void)XXH32_reset(state, seed);\n    (void)XXH32_update(state, data, len);\n    XSUM_checkResult32(XXH32_digest(state), Nresult);\n\n    (void)XXH32_reset(state, seed);\n    for (pos=0; pos<len; pos++)\n        (void)XXH32_update(state, ((const char*)data)+pos, 1);\n    XSUM_checkResult32(XXH32_digest(state), Nresult);\n    XXH32_freeState(state);\n}\n\nstatic void XSUM_testXXH64(const void* data, const XSUM_testdata64_t* testData)\n{\n    XXH64_state_t *state = XXH64_createState();\n    size_t pos;\n\n    size_t len = (size_t)testData->len;\n    XSUM_U64 seed = testData->seed;\n    XSUM_U64 Nresult = testData->Nresult;\n\n    if (len == 0) {\n        data = NULL;\n    } else {\n        assert(data != NULL);\n    }\n\n    assert(state != NULL);\n\n    XSUM_checkResult64(XXH64(data, len, seed), Nresult);\n\n    (void)XXH64_reset(state, seed);\n    (void)XXH64_update(state, data, len);\n    XSUM_checkResult64(XXH64_digest(state), Nresult);\n\n    (void)XXH64_reset(state, seed);\n    for (pos=0; pos<len; pos++)\n        (void)XXH64_update(state, ((const char*)data)+pos, 1);\n    XSUM_checkResult64(XXH64_digest(state), Nresult);\n    XXH64_freeState(state);\n}\n\n/*\n * Used to get \"random\" (but actually 100% reproducible) lengths for\n * XSUM_XXH3_randomUpdate.\n */\nstatic XSUM_U32 XSUM_rand(void)\n{\n    static XSUM_U64 seed = PRIME32;\n    seed *= PRIME64;\n    return (XSUM_U32)(seed >> 40);\n}\n\n/*\n * Technically, XXH3_64bits_update is identical to XXH3_128bits_update as of\n * v0.8.0, but we treat them as separate.\n */\ntypedef XXH_errorcode (*XSUM_XXH3_update_t)(XXH3_state_t* state, const void* input, size_t length);\n\n/*\n * Runs the passed XXH3_update variant on random lengths. This is to test the\n * more complex logic of the update function, catching bugs like this one:\n *    https://github.com/Cyan4973/xxHash/issues/378\n */\nstatic void XSUM_XXH3_randomUpdate(XXH3_state_t* state, const void* data,\n                                   size_t len, XSUM_XXH3_update_t update_fn)\n{\n    size_t p = 0;\n    while (p < len) {\n        size_t const modulo = len > 2 ? len : 2;\n        size_t l = (size_t)(XSUM_rand()) % modulo;\n        if (p + l > len) l = len - p;\n        (void)update_fn(state, (const char*)data+p, l);\n        p += l;\n    }\n}\n\nstatic void XSUM_testXXH3(const void* data, const XSUM_testdata64_t* testData)\n{\n    size_t len = testData->len;\n    XSUM_U64 seed = testData->seed;\n    XSUM_U64 Nresult = testData->Nresult;\n    if (len == 0) {\n        data = NULL;\n    } else {\n        assert(data != NULL);\n    }\n    {   XSUM_U64 const Dresult = XXH3_64bits_withSeed(data, len, seed);\n        XSUM_checkResult64(Dresult, Nresult);\n    }\n\n    /* check that the no-seed variant produces same result as seed==0 */\n    if (seed == 0) {\n        XSUM_U64 const Dresult = XXH3_64bits(data, len);\n        XSUM_checkResult64(Dresult, Nresult);\n    }\n\n    /* check that the combination of\n     * XXH3_generateSecret_fromSeed() and XXH3_64bits_withSecretandSeed()\n     * results in exactly the same hash generation as XXH3_64bits_withSeed() */\n    {   char secretBuffer[XXH3_SECRET_DEFAULT_SIZE+1];\n        char* const secret = secretBuffer + 1;  /* intentional unalignment */\n        XXH3_generateSecret_fromSeed(secret, seed);\n        {   XSUM_U64 const Dresult = XXH3_64bits_withSecretandSeed(data, len, secret, XXH3_SECRET_DEFAULT_SIZE, seed);\n            XSUM_checkResult64(Dresult, Nresult);\n        }\n\n        /* check that XXH3_64bits_withSecretandSeed()\n         * results in exactly the same return value as XXH3_64bits_withSeed()\n         * when len <= XXH3_MIDSIZE_MAX, whatever the content of @secret */\n        memset(secret, 0x99, 9);\n        if (len <= XXH3_MIDSIZE_MAX) {\n            XSUM_U64 const Dresult = XXH3_64bits_withSecretandSeed(data, len, secret, XXH3_SECRET_DEFAULT_SIZE, seed);\n            XSUM_checkResult64(Dresult, Nresult);\n        }\n    }\n\n    /* streaming API test */\n    {   XXH3_state_t* const state = XXH3_createState();\n        assert(state != NULL);\n        /* single ingestion */\n        (void)XXH3_64bits_reset_withSeed(state, seed);\n        (void)XXH3_64bits_update(state, data, len);\n        XSUM_checkResult64(XXH3_64bits_digest(state), Nresult);\n\n        /* random ingestion */\n        (void)XXH3_64bits_reset_withSeed(state, seed);\n        XSUM_XXH3_randomUpdate(state, data, len, &XXH3_64bits_update);\n        XSUM_checkResult64(XXH3_64bits_digest(state), Nresult);\n\n        /* byte by byte ingestion */\n        {   size_t pos;\n            (void)XXH3_64bits_reset_withSeed(state, seed);\n            for (pos=0; pos<len; pos++)\n                (void)XXH3_64bits_update(state, ((const char*)data)+pos, 1);\n            XSUM_checkResult64(XXH3_64bits_digest(state), Nresult);\n        }\n\n        /* check that streaming with a combination of\n         * XXH3_generateSecret_fromSeed() and XXH3_64bits_reset_withSecretandSeed()\n         * results in exactly the same hash generation as XXH3_64bits_reset_withSeed() */\n        {   char secretBuffer[XXH3_SECRET_DEFAULT_SIZE+1];\n            char* const secret = secretBuffer + 1;  /* intentional unalignment */\n            XXH3_generateSecret_fromSeed(secret, seed);\n            /* single ingestion */\n            (void)XXH3_64bits_reset_withSecretandSeed(state, secret, XXH3_SECRET_DEFAULT_SIZE, seed);\n            (void)XXH3_64bits_update(state, data, len);\n            XSUM_checkResult64(XXH3_64bits_digest(state), Nresult);\n\n            /* check that XXH3_64bits_withSecretandSeed()\n             * results in exactly the same return value as XXH3_64bits_withSeed()\n             * when len <= XXH3_MIDSIZE_MAX, whatever the content of @secret */\n            if (len <= XXH3_MIDSIZE_MAX) {\n                /* single ingestion */\n                memset(secret, 0x99, 9);\n                (void)XXH3_64bits_reset_withSecretandSeed(state, secret, XXH3_SECRET_DEFAULT_SIZE, seed);\n                (void)XXH3_64bits_update(state, data, len);\n                XSUM_checkResult64(XXH3_64bits_digest(state), Nresult);\n            }\n        }\n\n        XXH3_freeState(state);\n    }\n\n}\n\n\nstatic void XSUM_testXXH3_withSecret(const void* data, const void* secret,\n                                     size_t secretSize, const XSUM_testdata64_t* testData)\n{\n    size_t len = (size_t)testData->len;\n    XSUM_U64 Nresult = testData->Nresult;\n\n    if (len == 0) {\n        data = NULL;\n    } else {\n        assert(data != NULL);\n    }\n    {   XSUM_U64 const Dresult = XXH3_64bits_withSecret(data, len, secret, secretSize);\n        XSUM_checkResult64(Dresult, Nresult);\n    }\n\n    /* check that XXH3_64bits_withSecretandSeed()\n     * results in exactly the same return value as XXH3_64bits_withSecret() */\n    if (len > XXH3_MIDSIZE_MAX)\n    {   XSUM_U64 const Dresult = XXH3_64bits_withSecretandSeed(data, len, secret, secretSize, 0);\n        XSUM_checkResult64(Dresult, Nresult);\n    }\n\n    /* streaming API test */\n    {   XXH3_state_t *state = XXH3_createState();\n        assert(state != NULL);\n        (void)XXH3_64bits_reset_withSecret(state, secret, secretSize);\n        (void)XXH3_64bits_update(state, data, len);\n        XSUM_checkResult64(XXH3_64bits_digest(state), Nresult);\n\n        /* random ingestion */\n        (void)XXH3_64bits_reset_withSecret(state, secret, secretSize);\n        XSUM_XXH3_randomUpdate(state, data, len, &XXH3_64bits_update);\n        XSUM_checkResult64(XXH3_64bits_digest(state), Nresult);\n\n        /* byte by byte ingestion */\n        {   size_t pos;\n            (void)XXH3_64bits_reset_withSecret(state, secret, secretSize);\n            for (pos=0; pos<len; pos++)\n                (void)XXH3_64bits_update(state, ((const char*)data)+pos, 1);\n            XSUM_checkResult64(XXH3_64bits_digest(state), Nresult);\n        }\n\n        /* check that XXH3_64bits_reset_withSecretandSeed()\n         * results in exactly the same return value as XXH3_64bits_reset_withSecret()\n         * when len > XXH3_MIDSIZE_MAX, whatever the value of @seed */\n         if (len > XXH3_MIDSIZE_MAX) {\n            /* single ingestion */\n            (void)XXH3_64bits_reset_withSecretandSeed(state, secret, secretSize, 17);\n            (void)XXH3_64bits_update(state, data, len);\n            XSUM_checkResult64(XXH3_64bits_digest(state), Nresult);\n        }\n\n        XXH3_freeState(state);\n    }\n}\n\nstatic void XSUM_testXXH128(const void* data, const XSUM_testdata128_t* testData)\n{\n    size_t len = (size_t)testData->len;\n    XSUM_U64 seed = testData->seed;\n    XXH128_hash_t const Nresult = testData->Nresult;\n    if (len == 0) {\n        data = NULL;\n    } else {\n        assert(data != NULL);\n    }\n\n    {   XXH128_hash_t const Dresult = XXH3_128bits_withSeed(data, len, seed);\n        XSUM_checkResult128(Dresult, Nresult);\n    }\n\n    /* check that XXH128() is identical to XXH3_128bits_withSeed() */\n    {   XXH128_hash_t const Dresult2 = XXH128(data, len, seed);\n        XSUM_checkResult128(Dresult2, Nresult);\n    }\n\n    /* check that the no-seed variant produces same result as seed==0 */\n    if (seed == 0) {\n        XXH128_hash_t const Dresult = XXH3_128bits(data, len);\n        XSUM_checkResult128(Dresult, Nresult);\n    }\n\n    /* check that the combination of\n     * XXH3_generateSecret_fromSeed() and XXH3_128bits_withSecretandSeed()\n     * results in exactly the same hash generation as XXH3_64bits_withSeed() */\n    {   char secretBuffer[XXH3_SECRET_DEFAULT_SIZE+1];\n        char* const secret = secretBuffer + 1;  /* intentional unalignment */\n        XXH3_generateSecret_fromSeed(secret, seed);\n        {   XXH128_hash_t const Dresult = XXH3_128bits_withSecretandSeed(data, len, secret, XXH3_SECRET_DEFAULT_SIZE, seed);\n            XSUM_checkResult128(Dresult, Nresult);\n        }\n\n        /* check that XXH3_128bits_withSecretandSeed()\n         * results in exactly the same return value as XXH3_128bits_withSeed()\n         * if len <= XXH3_MIDSIZE_MAX, whatever the content of @secret */\n        memset(secret, 0x99, 9);\n        if (len <= XXH3_MIDSIZE_MAX) {\n            XXH128_hash_t const Dresult = XXH3_128bits_withSecretandSeed(data, len, secret, XXH3_SECRET_DEFAULT_SIZE, seed);\n            XSUM_checkResult128(Dresult, Nresult);\n        }\n    }\n\n    /* streaming API test */\n    {   XXH3_state_t *state = XXH3_createState();\n        assert(state != NULL);\n\n        /* single ingestion */\n        (void)XXH3_128bits_reset_withSeed(state, seed);\n        (void)XXH3_128bits_update(state, data, len);\n        XSUM_checkResult128(XXH3_128bits_digest(state), Nresult);\n\n        /* random ingestion */\n        (void)XXH3_128bits_reset_withSeed(state, seed);\n        XSUM_XXH3_randomUpdate(state, data, len, &XXH3_128bits_update);\n        XSUM_checkResult128(XXH3_128bits_digest(state), Nresult);\n\n        /* byte by byte ingestion */\n        {   size_t pos;\n            (void)XXH3_128bits_reset_withSeed(state, seed);\n            for (pos=0; pos<len; pos++)\n                (void)XXH3_128bits_update(state, ((const char*)data)+pos, 1);\n            XSUM_checkResult128(XXH3_128bits_digest(state), Nresult);\n        }\n\n        /* check that streaming with a combination of\n         * XXH3_generateSecret_fromSeed() and XXH3_128bits_reset_withSecretandSeed()\n         * results in exactly the same hash generation as XXH3_128bits_reset_withSeed() */\n        {   char secretBuffer[XXH3_SECRET_DEFAULT_SIZE+1];\n            char* const secret = secretBuffer + 1;  /* intentional unalignment */\n            XXH3_generateSecret_fromSeed(secret, seed);\n            /* single ingestion */\n            (void)XXH3_128bits_reset_withSecretandSeed(state, secret, XXH3_SECRET_DEFAULT_SIZE, seed);\n            (void)XXH3_128bits_update(state, data, len);\n            XSUM_checkResult128(XXH3_128bits_digest(state), Nresult);\n\n            /* check that XXH3_128bits_reset_withSecretandSeed()\n             * results in exactly the same return value as XXH3_128bits_reset_withSeed()\n             * if len <= XXH3_MIDSIZE_MAX, whatever the content of @secret */\n            if (len <= XXH3_MIDSIZE_MAX) {\n                /* single ingestion */\n                memset(secret, 0x99, 9);\n                (void)XXH3_128bits_reset_withSecretandSeed(state, secret, XXH3_SECRET_DEFAULT_SIZE, seed);\n                (void)XXH3_128bits_update(state, data, len);\n                XSUM_checkResult128(XXH3_128bits_digest(state), Nresult);\n            }\n        }\n\n        XXH3_freeState(state);\n    }\n}\n\nstatic void XSUM_testXXH128_withSecret(const void* data, const void* secret, size_t secretSize, const XSUM_testdata128_t* testData)\n{\n    size_t len = testData->len;\n    XXH128_hash_t Nresult = testData->Nresult;\n    if (len == 0) {\n        data = NULL;\n    } else {\n        assert(data != NULL);\n    }\n    {   XXH128_hash_t const Dresult = XXH3_128bits_withSecret(data, len, secret, secretSize);\n        XSUM_checkResult128(Dresult, Nresult);\n    }\n\n    /* check that XXH3_128bits_withSecretandSeed()\n     * results in exactly the same return value as XXH3_128bits_withSecret() */\n    if (len > XXH3_MIDSIZE_MAX)\n    {   XXH128_hash_t const Dresult = XXH3_128bits_withSecretandSeed(data, len, secret, secretSize, 0);\n        XSUM_checkResult128(Dresult, Nresult);\n    }\n\n    /* streaming API test */\n    {   XXH3_state_t* const state = XXH3_createState();\n        assert(state != NULL);\n        (void)XXH3_128bits_reset_withSecret(state, secret, secretSize);\n        (void)XXH3_128bits_update(state, data, len);\n        XSUM_checkResult128(XXH3_128bits_digest(state), Nresult);\n\n        /* random ingestion */\n        (void)XXH3_128bits_reset_withSecret(state, secret, secretSize);\n        XSUM_XXH3_randomUpdate(state, data, len, &XXH3_128bits_update);\n        XSUM_checkResult128(XXH3_128bits_digest(state), Nresult);\n\n        /* byte by byte ingestion */\n        {   size_t pos;\n            (void)XXH3_128bits_reset_withSecret(state, secret, secretSize);\n            for (pos=0; pos<len; pos++)\n                (void)XXH3_128bits_update(state, ((const char*)data)+pos, 1);\n            XSUM_checkResult128(XXH3_128bits_digest(state), Nresult);\n        }\n\n        /* check that XXH3_128bits_reset_withSecretandSeed()\n         * results in exactly the same return value as XXH3_128bits_reset_withSecret() */\n         if (len > XXH3_MIDSIZE_MAX) {\n            /* single ingestion */\n            (void)XXH3_128bits_reset_withSecretandSeed(state, secret, secretSize, 0);\n            (void)XXH3_128bits_update(state, data, len);\n            XSUM_checkResult128(XXH3_128bits_digest(state), Nresult);\n        }\n\n        XXH3_freeState(state);\n    }\n}\n\nstatic void XSUM_testSecretGenerator(const void* customSeed, const XSUM_testdata_sample_t* testData)\n{\n    static int nbTests = 1;\n    const int sampleIndex[SECRET_SAMPLE_NBBYTES] = { 0, 62, 131, 191, 241 };  /* position of sampled bytes */\n    XSUM_U8 secretBuffer[SECRET_SIZE_MAX] = {0};\n    XSUM_U8 samples[SECRET_SAMPLE_NBBYTES];\n    int i;\n\n    assert(testData->secretLen <= SECRET_SIZE_MAX);\n    XXH3_generateSecret(secretBuffer, testData->secretLen, customSeed, testData->seedLen);\n    for (i=0; i<SECRET_SAMPLE_NBBYTES; i++) {\n        samples[i] = secretBuffer[sampleIndex[i]];\n    }\n    if (memcmp(samples, testData->byte, sizeof(testData->byte))) {\n        XSUM_log(\"\\rError: Secret generation test %i: Internal sanity check failed. \\n\", nbTests);\n        XSUM_log(\"\\rGot { 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X }, expected { 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X } \\n\",\n                samples[0], samples[1], samples[2], samples[3], samples[4],\n                testData->byte[0], testData->byte[1], testData->byte[2], testData->byte[3], testData->byte[4] );\n        exit(1);\n    }\n    nbTests++;\n}\n\n/*!\n * XSUM_sanityCheck():\n * Runs a sanity check before the benchmark.\n *\n * Exits on an incorrect output.\n */\nXSUM_API void XSUM_sanityCheck(void)\n{\n    size_t i;\n#define SANITY_BUFFER_SIZE 2367\n    XSUM_U8 sanityBuffer[SANITY_BUFFER_SIZE];\n    const void* const secret = sanityBuffer + 7;\n    const size_t secretSize = XXH3_SECRET_SIZE_MIN + 11;\n    assert(sizeof(sanityBuffer) >= 7 + secretSize);\n\n    XSUM_fillTestBuffer(sanityBuffer, sizeof(sanityBuffer));\n\n    /* XXH32 */\n    for (i = 0; i < (sizeof(XSUM_XXH32_testdata)/sizeof(XSUM_XXH32_testdata[0])); i++) {\n        XSUM_testXXH32(sanityBuffer, &XSUM_XXH32_testdata[i]);\n    }\n    /* XXH64 */\n    for (i = 0; i < (sizeof(XSUM_XXH64_testdata)/sizeof(XSUM_XXH64_testdata[0])); i++) {\n        XSUM_testXXH64(sanityBuffer, &XSUM_XXH64_testdata[i]);\n    }\n    /* XXH3_64bits, seeded */\n    for (i = 0; i < (sizeof(XSUM_XXH3_testdata)/sizeof(XSUM_XXH3_testdata[0])); i++) {\n        XSUM_testXXH3(sanityBuffer, &XSUM_XXH3_testdata[i]);\n    }\n    /* XXH3_64bits, custom secret */\n    for (i = 0; i < (sizeof(XSUM_XXH3_withSecret_testdata)/sizeof(XSUM_XXH3_withSecret_testdata[0])); i++) {\n        XSUM_testXXH3_withSecret(sanityBuffer, secret, secretSize, &XSUM_XXH3_withSecret_testdata[i]);\n    }\n    /* XXH128 */\n    for (i = 0; i < (sizeof(XSUM_XXH128_testdata)/sizeof(XSUM_XXH128_testdata[0])); i++) {\n        XSUM_testXXH128(sanityBuffer, &XSUM_XXH128_testdata[i]);\n    }\n    /* XXH128 with custom Secret */\n    for (i = 0; i < (sizeof(XSUM_XXH128_withSecret_testdata)/sizeof(XSUM_XXH128_withSecret_testdata[0])); i++) {\n        XSUM_testXXH128_withSecret(sanityBuffer, secret, secretSize, &XSUM_XXH128_withSecret_testdata[i]);\n    }\n    /* secret generator */\n    for (i = 0; i < (sizeof(XSUM_XXH3_generateSecret_testdata)/sizeof(XSUM_XXH3_generateSecret_testdata[0])); i++) {\n        assert(XSUM_XXH3_generateSecret_testdata[i].seedLen <= SANITY_BUFFER_SIZE);\n        XSUM_testSecretGenerator(sanityBuffer, &XSUM_XXH3_generateSecret_testdata[i]);\n    }\n\n    XSUM_logVerbose(3, \"\\r%70s\\r\", \"\");       /* Clean display line */\n    XSUM_logVerbose(3, \"Sanity check -- all tests ok\\n\");\n}\n\n#endif /* !XSUM_NO_TESTS */\n"
  },
  {
    "path": "third-party/xxhash/cli/xsum_sanity_check.h",
    "content": "/*\n * xxhsum - Command line interface for xxhash algorithms\n * Copyright (C) 2013-2021 Yann Collet\n *\n * GPL v2 License\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n#ifndef XSUM_SANITY_CHECK_H\n#define XSUM_SANITY_CHECK_H\n\n#include \"xsum_config.h\"  /* XSUM_API, XSUM_U8 */\n\n#include <stddef.h>   /* size_t */\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * Runs a series of self-tests.\n *\n * Exits if any of these tests fail, printing a message to stderr.\n *\n * If XSUM_NO_TESTS is defined to non-zero,\n * this will instead print a warning if this is called (e.g. via xxhsum -b).\n */\nXSUM_API void XSUM_sanityCheck(void);\n\n/*\n * Fills a test buffer with pseudorandom data.\n *\n * This is used in the sanity check and the benchmarks.\n * Its values must not be changed.\n */\nXSUM_API void XSUM_fillTestBuffer(XSUM_U8* buffer, size_t len);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* XSUM_SANITY_CHECK_H */\n"
  },
  {
    "path": "third-party/xxhash/cli/xxhsum.1",
    "content": ".\n.TH \"XXHSUM\" \"1\" \"May 2024\" \"xxhsum 0.8.3\" \"User Commands\"\n.\n.SH \"NAME\"\n\\fBxxhsum\\fR \\- print or check xxHash non\\-cryptographic checksums\n.\n.SH \"SYNOPSIS\"\n\\fBxxhsum\\fR [\\fIOPTION\\fR]\\.\\.\\. [\\fIFILE\\fR]\\.\\.\\. \\fBxxhsum \\-b\\fR [\\fIOPTION\\fR]\\.\\.\\.\n.\n.P\n\\fBxxh32sum\\fR is equivalent to \\fBxxhsum \\-H0\\fR, \\fBxxh64sum\\fR is equivalent to \\fBxxhsum \\-H1\\fR, \\fBxxh128sum\\fR is equivalent to \\fBxxhsum \\-H2\\fR, \\fBxxh3sum\\fR is equivalent to \\fBxxhsum \\-H3\\fR\\.\n.\n.SH \"DESCRIPTION\"\nPrint or check xxHash (32, 64 or 128 bits) checksums\\. When no \\fIFILE\\fR, read standard input, except if it\\'s the console\\. When \\fIFILE\\fR is \\fB\\-\\fR, read standard input even if it\\'s the console\\.\n.\n.P\n\\fBxxhsum\\fR supports a command line syntax similar but not identical to md5sum(1)\\. Differences are:\n.\n.IP \"\\(bu\" 4\n\\fBxxhsum\\fR doesn\\'t have text mode switch (\\fB\\-t\\fR)\n.\n.IP \"\\(bu\" 4\n\\fBxxhsum\\fR doesn\\'t have short binary mode switch (\\fB\\-b\\fR)\n.\n.IP \"\\(bu\" 4\n\\fBxxhsum\\fR always treats files as binary file\n.\n.IP \"\\(bu\" 4\n\\fBxxhsum\\fR has a hash selection switch (\\fB\\-H\\fR)\n.\n.IP \"\" 0\n.\n.P\nAs xxHash is a fast non\\-cryptographic checksum algorithm, \\fBxxhsum\\fR should not be used for security related purposes\\.\n.\n.P\n\\fBxxhsum \\-b\\fR invokes benchmark mode\\. See OPTIONS and EXAMPLES for details\\.\n.\n.SH \"OPTIONS\"\n.\n.TP\n\\fB\\-V\\fR, \\fB\\-\\-version\\fR\nDisplays xxhsum version and exits\n.\n.TP\n\\fB\\-H\\fR\\fIHASHTYPE\\fR\nHash selection\\. \\fIHASHTYPE\\fR means \\fB0\\fR=XXH32, \\fB1\\fR=XXH64, \\fB2\\fR=XXH128, \\fB3\\fR=XXH3\\. Alternatively, \\fIHASHTYPE\\fR \\fB32\\fR=XXH32, \\fB64\\fR=XXH64, \\fB128\\fR=XXH128\\. Default value is \\fB1\\fR (XXH64)\n.\n.TP\n\\fB\\-\\-binary\\fR\nRead in binary mode\\.\n.\n.TP\n\\fB\\-\\-tag\\fR\nOutput in the BSD style\\.\n.\n.TP\n\\fB\\-\\-little\\-endian\\fR\nSet output hexadecimal checksum value as little endian convention\\. By default, value is displayed as big endian\\.\n.\n.TP\n\\fB\\-h\\fR, \\fB\\-\\-help\\fR\nDisplays help and exits\n.\n.SS \"The following options are useful only when verifying checksums (\\-c):\"\n.\n.TP\n\\fB\\-c\\fR, \\fB\\-\\-check\\fR \\fIFILE\\fR\nRead xxHash sums from \\fIFILE\\fR and check them\n.\n.TP\n\\fB\\-q\\fR, \\fB\\-\\-quiet\\fR\nDon\\'t print OK for each successfully verified file\n.\n.TP\n\\fB\\-\\-strict\\fR\nReturn an error code if any line in the file is invalid, not just if some checksums are wrong\\. This policy is disabled by default, though UI will prompt an informational message if any line in the file is detected invalid\\.\n.\n.TP\n\\fB\\-\\-status\\fR\nDon\\'t output anything\\. Status code shows success\\.\n.\n.TP\n\\fB\\-w\\fR, \\fB\\-\\-warn\\fR\nEmit a warning message about each improperly formatted checksum line\\.\n.\n.SS \"The following options are useful only benchmark purpose:\"\n.\n.TP\n\\fB\\-b\\fR\nBenchmark mode\\. See EXAMPLES for details\\.\n.\n.TP\n\\fB\\-b#\\fR\nSpecify ID of variant to be tested\\. Multiple variants can be selected, separated by a \\',\\' comma\\.\n.\n.TP\n\\fB\\-B\\fR\\fIBLOCKSIZE\\fR\nOnly useful for benchmark mode (\\fB\\-b\\fR)\\. See \\fIEXAMPLES\\fR for details\\. \\fIBLOCKSIZE\\fR specifies benchmark mode\\'s test data block size in bytes\\. Default value is 102400\n.\n.TP\n\\fB\\-i\\fR\\fIITERATIONS\\fR\nOnly useful for benchmark mode (\\fB\\-b\\fR)\\. See \\fIEXAMPLES\\fR for details\\. \\fIITERATIONS\\fR specifies number of iterations in benchmark\\. Single iteration lasts approximately 1000 milliseconds\\. Default value is 3\n.\n.SH \"EXIT STATUS\"\n\\fBxxhsum\\fR exit \\fB0\\fR on success, \\fB1\\fR if at least one file couldn\\'t be read or doesn\\'t have the same checksum as the \\fB\\-c\\fR option\\.\n.\n.SH \"EXAMPLES\"\nOutput xxHash (64bit) checksum values of specific files to standard output\n.\n.IP \"\" 4\n.\n.nf\n\n$ xxhsum \\-H1 foo bar baz\n.\n.fi\n.\n.IP \"\" 0\n.\n.P\nOutput xxHash (32bit and 64bit) checksum values of specific files to standard output, and redirect it to \\fBxyz\\.xxh32\\fR and \\fBqux\\.xxh64\\fR\n.\n.IP \"\" 4\n.\n.nf\n\n$ xxhsum \\-H0 foo bar baz > xyz\\.xxh32\n$ xxhsum \\-H1 foo bar baz > qux\\.xxh64\n.\n.fi\n.\n.IP \"\" 0\n.\n.P\nRead xxHash sums from specific files and check them\n.\n.IP \"\" 4\n.\n.nf\n\n$ xxhsum \\-c xyz\\.xxh32 qux\\.xxh64\n.\n.fi\n.\n.IP \"\" 0\n.\n.P\nBenchmark xxHash algorithm\\. By default, \\fBxxhsum\\fR benchmarks xxHash main variants on a synthetic sample of 100 KB, and print results into standard output\\. The first column is the algorithm, the second column is the source data size in bytes, the third column is the number of hashes generated per second (throughput), and finally the last column translates speed in megabytes per second\\.\n.\n.IP \"\" 4\n.\n.nf\n\n$ xxhsum \\-b\n.\n.fi\n.\n.IP \"\" 0\n.\n.P\nIn the following example, the sample to hash is set to 16384 bytes, the variants to be benched are selected by their IDs, and each benchmark test is repeated 10 times, for increased accuracy\\.\n.\n.IP \"\" 4\n.\n.nf\n\n$ xxhsum \\-b1,2,3 \\-i10 \\-B16384\n.\n.fi\n.\n.IP \"\" 0\n.\n.SH \"BUGS\"\nReport bugs at: https://github\\.com/Cyan4973/xxHash/issues/\n.\n.SH \"AUTHOR\"\nYann Collet\n.\n.SH \"SEE ALSO\"\nmd5sum(1)\n"
  },
  {
    "path": "third-party/xxhash/cli/xxhsum.1.md",
    "content": "xxhsum(1) -- print or check xxHash non-cryptographic checksums\n==============================================================\n\nSYNOPSIS\n--------\n\n`xxhsum` [*OPTION*]... [*FILE*]...\n\n`xxhsum -b` [*OPTION*]...\n\n`xxh32sum` is equivalent to `xxhsum -H0`,\n`xxh64sum` is equivalent to `xxhsum -H1`,\n`xxh128sum` is equivalent to `xxhsum -H2`,\n`xxh3sum` is equivalent to `xxhsum -H3`.\n\n\nDESCRIPTION\n-----------\n\nPrint or check xxHash (32, 64 or 128 bits) checksums.\nWhen no *FILE*, read standard input, except if it's the console.\nWhen *FILE* is `-`, read standard input even if it's the console.\n\n`xxhsum` supports a command line syntax similar but not identical to md5sum(1).  Differences are:\n\n* `xxhsum` doesn't have text mode switch (`-t`)\n* `xxhsum` doesn't have short binary mode switch (`-b`)\n* `xxhsum` always treats files as binary file\n* `xxhsum` has a hash selection switch (`-H`)\n\nAs xxHash is a fast non-cryptographic checksum algorithm,\n`xxhsum` should not be used for security related purposes.\n\n`xxhsum -b` invokes benchmark mode. See OPTIONS and EXAMPLES for details.\n\nOPTIONS\n-------\n\n* `-H`*HASHTYPE*:\n  Hash selection. *HASHTYPE* means `0`=XXH32, `1`=XXH64, `2`=XXH128, `3`=XXH3.\n  Alternatively, *HASHTYPE* `32`=XXH32, `64`=XXH64, `128`=XXH128.\n  Default value is `1` (XXH64)\n\n* `--binary`:\n  Read in binary mode.\n\n* `--tag`:\n  Output in the BSD style.\n\n* `--little-endian`:\n  Set output hexadecimal checksum value as little endian convention.\n  By default, value is displayed as big endian.\n\n* `-V`, `--version`:\n  Displays xxhsum version and exits\n\n* `-h`, `--help`:\n  Displays help and exits\n\n### Advanced file input options\n\n* `--files-from`, `--filelist` *FILE*:\n  Read filenames from *FILE* and generate hashes for them.\n  `stdin` is also a valid way to provide filenames (when no *FILE* or `-` provided).\n  Valid format is one filename per line, which can include embedded spaces, etc with no need for quotes, escapes, etc.\n  A line commencing with '\\\\' will enable the convention used in the encoding of filenames against output hashes,\n  whereby subsequent \\\\\\\\, \\n and \\r seqeuences are converted to the single\n  character 0x5C, 0x0A and 0x0D respectively.\n\n### The following options are useful only for checksum verification:\n\n* `-c`, `--check` *FILE*:\n  Read xxHash sums from *FILE* and check them\n\n* `--strict`:\n  Return an error code if any line in *FILE* is invalid,\n  not just if some checksums are wrong.\n  This policy is disabled by default,\n  though UI will prompt an informational message\n  if any line in the file is detected invalid.\n\n* `-w`, `--warn`:\n  Emit a warning message about each improperly formatted line in *FILE*.\n\n* `-q`, `--quiet`:\n   Don't print OK for each successfully verified hash\n\n* `--status`:\n  Don't output anything. Only generate a Status code to show success.\n\n### The following options are useful only benchmark purpose:\n\n* `-b`:\n  Benchmark mode.  See EXAMPLES for details.\n\n* `-b#`:\n  Specify ID of variant to be tested.\n  Multiple variants can be selected, separated by a ',' comma.\n\n* `-B`*BLOCKSIZE*:\n  Only useful for benchmark mode (`-b`). See *EXAMPLES* for details.\n  <BLOCKSIZE> specifies benchmark mode's test data block size in bytes.\n  Default value is 102400\n\n* `-i`*ITERATIONS*:\n  Only useful for benchmark mode (`-b`). See *EXAMPLES* for details.\n  <ITERATIONS> specifies number of iterations in benchmark. Single iteration\n  lasts approximately 1000 milliseconds. Default value is 3\n\nEXIT STATUS\n-----------\n\n`xxhsum` exit `0` on success, `1` if at least one file couldn't be read or\ndoesn't have the same checksum as the `-c` option.\n\nEXAMPLES\n--------\n\nOutput xxHash (64bit) checksum values of specific files to standard output\n\n    $ xxhsum -H1 foo bar baz\n\nOutput xxHash (32bit and 64bit) checksum values of specific files to standard\noutput, and redirect it to `xyz.xxh32` and `qux.xxh64`\n\n    $ xxhsum -H0 foo bar baz > xyz.xxh32\n    $ xxhsum -H1 foo bar baz > qux.xxh64\n\nRead xxHash sums from specific files and check them\n\n    $ xxhsum -c xyz.xxh32 qux.xxh64\n\nProduce a list of files, then generate hashes for that list\n\n    $ find . -type f -name '*.[ch]' > c-files.txt\n    $ xxhsum --files-from c-files.txt\n\nRead the list of files from standard input to avoid the need for an intermediate file\n\n    $ find . -type f -name '*.[ch]' | xxhsum --files-from -\n\nNote that if shell expansion, length of argument list, clarity of use of spaces in filenames, etc allow it then the same output as the previous example can be generated like this\n\n    $ xxhsum `find . -name '*.[ch]'`\n\nBenchmark xxHash algorithm.\nBy default, `xxhsum` benchmarks xxHash main variants\non a synthetic sample of 100 KB,\nand print results into standard output.\nThe first column is the algorithm,\nthe second column is the source data size in bytes,\nthe third column is the number of hashes generated per second (throughput),\nand finally the last column translates speed in megabytes per second.\n\n    $ xxhsum -b\n\nIn the following example,\nthe sample to hash is set to 16384 bytes,\nthe variants to be benched are selected by their IDs,\nand each benchmark test is repeated 10 times, for increased accuracy.\n\n    $ xxhsum -b1,2,3 -i10 -B16384\n\nBUGS\n----\n\nReport bugs at: https://github.com/Cyan4973/xxHash/issues/\n\nAUTHOR\n------\n\nYann Collet\n\nSEE ALSO\n--------\n\nmd5sum(1)\n"
  },
  {
    "path": "third-party/xxhash/cli/xxhsum.c",
    "content": "/*\n * xxhsum - Command line interface for xxhash algorithms\n * Copyright (C) 2013-2023 Yann Collet\n *\n * GPL v2 License\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n/*\n * xxhsum:\n * Provides hash value of a file content, or a list of files, or stdin\n * Display convention is Big Endian, for both 32 and 64 bits algorithms\n */\n\n/* Transitional headers */\n#include \"xsum_arch.h\"         /* XSUM_PROGRAM_VERSION */\n#include \"xsum_os_specific.h\"  /* XSUM_setBinaryMode */\n#include \"xsum_output.h\"       /* XSUM_output */\n#include \"xsum_sanity_check.h\" /* XSUM_sanityCheck */\n#include \"xsum_bench.h\"        /* NBLOOPS_DEFAULT */\n#ifdef XXH_INLINE_ALL\n#  include \"xsum_os_specific.c\"\n#  include \"xsum_output.c\"\n#  include \"xsum_sanity_check.c\"\n#  include \"xsum_bench.c\"\n#endif\n\n/* ************************************\n *  Includes\n **************************************/\n#include <stdlib.h>     /* malloc, calloc, free, exit */\n#include <string.h>     /* strerror, strcmp, memcpy */\n#include <assert.h>     /* assert */\n#include <errno.h>      /* errno */\n\n#define XXH_STATIC_LINKING_ONLY   /* *_state_t */\n#include \"../xxhash.h\"\n\n#ifdef XXHSUM_DISPATCH\n#  include \"../xxh_x86dispatch.h\"\n#endif\n\nstatic unsigned XSUM_isLittleEndian(void)\n{\n    const union { XSUM_U32 u; XSUM_U8 c[4]; } one = { 1 };   /* don't use static: performance detrimental  */\n    return one.c[0];\n}\n\nstatic const int g_nbBits = (int)(sizeof(void*)*8);\nstatic const char g_lename[] = \"little endian\";\nstatic const char g_bename[] = \"big endian\";\n#define ENDIAN_NAME (XSUM_isLittleEndian() ? g_lename : g_bename)\nstatic const char author[] = \"Yann Collet\";\n#define WELCOME_MESSAGE(exename) \"%s %s by %s \\n\", exename, XSUM_PROGRAM_VERSION, author\n#define FULL_WELCOME_MESSAGE(exename) \"%s %s by %s \\n\" \\\n                    \"compiled as %i-bit %s %s with \" XSUM_CC_VERSION_FMT \" \\n\", \\\n                    exename, XSUM_PROGRAM_VERSION, author, \\\n                    g_nbBits, XSUM_ARCH, ENDIAN_NAME, XSUM_CC_VERSION\n\n\nstatic const char stdinName[] = \"-\";\nstatic const char stdinFileName[] = \"stdin\";\ntypedef enum { algo_xxh32=0, algo_xxh64=1, algo_xxh128=2, algo_xxh3=3 } AlgoSelected;\nstatic AlgoSelected g_defaultAlgo = algo_xxh64;    /* required within main() & XSUM_usage() */\n\ntypedef enum {\n    algo_bitmask_xxh32  = 1 << algo_xxh32,      /* 1 << 0 */\n    algo_bitmask_xxh64  = 1 << algo_xxh64,      /* 1 << 1 */\n    algo_bitmask_xxh128 = 1 << algo_xxh128,     /* 1 << 2 */\n    algo_bitmask_xxh3   = 1 << algo_xxh3,       /* 1 << 3 */\n    algo_bitmask_all    = algo_bitmask_xxh32    /* All algorithms */\n                        | algo_bitmask_xxh64\n                        | algo_bitmask_xxh128\n                        | algo_bitmask_xxh3\n} AlgoBitmask;\n\n\n/* <16 hex char> <SPC> <SPC> <filename> <'\\0'>\n * '4096' is typical Linux PATH_MAX configuration. */\n#define DEFAULT_LINE_LENGTH (sizeof(XXH64_hash_t) * 2 + 2 + 4096 + 1)\n\n/* Maximum acceptable line length. */\n#define MAX_LINE_LENGTH (32 KB)\n\nstatic size_t XSUM_DEFAULT_SAMPLE_SIZE = 100 KB;\n\n\n/* ********************************************************\n*  Filename (un)escaping\n**********************************************************/\nstatic int XSUM_filenameNeedsEscape(const char* filename) {\n    return strchr(filename, '\\\\')\n        || strchr(filename, '\\n')\n        || strchr(filename, '\\r');\n}\n\nstatic int XSUM_lineNeedsUnescape(const char* line) {\n    /* Skip white-space characters */\n    while (*line == ' ' || *line == '\\t') {\n        ++line;\n    }\n    /* Returns true if first non-white-space character is '\\\\' (0x5c) */\n    return *line == '\\\\';\n}\n\nstatic void XSUM_printFilename(const char* filename, int needsEscape) {\n    if (!needsEscape) {\n        XSUM_output(\"%s\", filename);\n    } else {\n        const char* p;\n        for (p = filename; *p != '\\0'; ++p) {\n            switch (*p)\n            {\n            case '\\n':\n                XSUM_output(\"\\\\n\");\n                break;\n            case '\\r':\n                XSUM_output(\"\\\\r\");\n                break;\n            case '\\\\':\n                XSUM_output(\"\\\\\\\\\");\n                break;\n            default:\n                XSUM_output(\"%c\", *p);\n                break;\n            }\n        }\n    }\n}\n\n/* Unescape filename in place.\n\n   - Replace '\\\\', 'n'  (0x5c, 0x6e) with '\\n' (0x0a).\n   - Replace '\\\\', 'r'  (0x5c, 0x72) with '\\r' (0x0d).\n   - Replace '\\\\', '\\\\' (0x5c, 0x5c) with '\\\\' (0x5c).\n   - filename may not contain other backslash sequences.\n   - filename may not ends with backslash.\n   - filename may not contain NUL (0x00).\n\n   Return filename if everything is okay.\n   Return NULL if something wrong.\n*/\nstatic char* XSUM_filenameUnescape(char* filename, size_t filenameLen) {\n    char *p = filename;\n    size_t i;\n    for (i = 0; i < filenameLen; ++i) {\n        switch (filename[i])\n        {\n        case '\\\\':\n            ++i;\n            if (i == filenameLen) {\n                return NULL; /* Don't accept '\\\\', <EOL> */\n            }\n            switch (filename[i])\n            {\n            case 'n':\n                *p++ = '\\n';\n                break;\n            case 'r':\n                *p++ = '\\r';\n                break;\n            case '\\\\':\n                *p++ = '\\\\';\n                break;\n            default:\n                return NULL; /* Don't accept any other backslash sequence */\n            }\n            break;\n        case '\\0':\n            return NULL; /* Don't accept NUL (0x00) */\n        default:\n            *p++ = filename[i];\n            break;\n        }\n    }\n    if (p < filename + filenameLen) {\n        *p = '\\0';\n    }\n    return filename;\n}\n\n\n/* ********************************************************\n*  Algorithm Bitmask\n**********************************************************/\n/* Compute AlgoBitmask (as a U32) from AlgoSelected */\nstatic XSUM_U32 XSUM_algoBitmask_ComputeAlgoBitmaskFromAlgoSelected(AlgoSelected algoSelected) {\n    return (XSUM_U32) (1U << algoSelected);\n}\n\n/* Returns true (!0) if algoBitmask contains (accepts) parsedLineAlgo */\nstatic int XSUM_algoBitmask_Accepts(XSUM_U32 algoBitmask, AlgoSelected parsedLineAlgo) {\n    const XSUM_U32 mask = XSUM_algoBitmask_ComputeAlgoBitmaskFromAlgoSelected(parsedLineAlgo);\n    return (algoBitmask & mask) != 0;\n}\n\n\n/* ********************************************************\n*  File Hashing\n**********************************************************/\n\n#define XXHSUM32_DEFAULT_SEED 0                   /* Default seed for algo_xxh32 */\n#define XXHSUM64_DEFAULT_SEED 0                   /* Default seed for algo_xxh64 */\n\n/* for support of --little-endian display mode */\nstatic void XSUM_display_LittleEndian(const void* ptr, size_t length)\n{\n    const XSUM_U8* const p = (const XSUM_U8*)ptr;\n    size_t idx;\n    for (idx=length-1; idx<length; idx--)    /* intentional underflow to negative to detect end */\n        XSUM_output(\"%02x\", p[idx]);\n}\n\nstatic void XSUM_display_BigEndian(const void* ptr, size_t length)\n{\n    const XSUM_U8* const p = (const XSUM_U8*)ptr;\n    size_t idx;\n    for (idx=0; idx<length; idx++)\n        XSUM_output(\"%02x\", p[idx]);\n}\n\ntypedef union {\n    XXH32_hash_t  hash32;\n    XXH64_hash_t  hash64;  /* also for xxh3_64bits */\n    XXH128_hash_t hash128;\n} Multihash;\n\n/*\n * XSUM_hashStream:\n * Reads data from `inFile`, generating an incremental hash of type hashType,\n * using `buffer` of size `blockSize` for temporary storage.\n */\nstatic Multihash\nXSUM_hashStream(FILE* inFile,\n                AlgoSelected hashType,\n                void* buffer, size_t blockSize)\n{\n    XXH32_state_t state32;\n    XXH64_state_t state64;\n    XXH3_state_t  state3;\n\n    /* Init */\n    (void)XXH32_reset(&state32, XXHSUM32_DEFAULT_SEED);\n    (void)XXH64_reset(&state64, XXHSUM64_DEFAULT_SEED);\n    (void)XXH3_128bits_reset(&state3);\n\n    /* Load file & update hash */\n    {   size_t readSize;\n        while ((readSize = fread(buffer, 1, blockSize, inFile)) > 0) {\n            switch(hashType)\n            {\n            case algo_xxh32:\n                (void)XXH32_update(&state32, buffer, readSize);\n                break;\n            case algo_xxh64:\n                (void)XXH64_update(&state64, buffer, readSize);\n                break;\n            case algo_xxh128:\n                (void)XXH3_128bits_update(&state3, buffer, readSize);\n                break;\n            case algo_xxh3:\n                (void)XXH3_64bits_update(&state3, buffer, readSize);\n                break;\n            default:\n                assert(0);\n            }\n        }\n        if (ferror(inFile)) {\n            XSUM_log(\"Error: a failure occurred reading the input file.\\n\");\n            exit(1);\n    }   }\n\n    {   Multihash finalHash = {0};\n        switch(hashType)\n        {\n        case algo_xxh32:\n            finalHash.hash32 = XXH32_digest(&state32);\n            break;\n        case algo_xxh64:\n            finalHash.hash64 = XXH64_digest(&state64);\n            break;\n        case algo_xxh128:\n            finalHash.hash128 = XXH3_128bits_digest(&state3);\n            break;\n        case algo_xxh3:\n            finalHash.hash64 = XXH3_64bits_digest(&state3);\n            break;\n        default:\n            assert(0);\n        }\n        return finalHash;\n    }\n}\n\n                                       /* algo_xxh32, algo_xxh64, algo_xxh128 */\nstatic const char* XSUM_algoName[] =    { \"XXH32\",    \"XXH64\",    \"XXH128\",    \"XXH3\" };\nstatic const char* XSUM_algoLE_name[] = { \"XXH32_LE\", \"XXH64_LE\", \"XXH128_LE\", \"XXH3_LE\" };\nstatic const size_t XSUM_algoLength[] = { 4,          8,          16,          8 };\n\n#define XSUM_TABLE_ELT_SIZE(table)   (sizeof(table) / sizeof(*table))\n\ntypedef void (*XSUM_displayHash_f)(const void*, size_t);  /* display function signature */\n\nstatic void XSUM_printLine_BSD_internal(const char* filename,\n                                        const void* canonicalHash, const AlgoSelected hashType,\n                                        const char* algoString[],\n                                        XSUM_displayHash_f f_displayHash)\n{\n    assert(0 <= hashType && (size_t)hashType <= XSUM_TABLE_ELT_SIZE(XSUM_algoName));\n    {   const char* const typeString = algoString[hashType];\n        const size_t hashLength = XSUM_algoLength[hashType];\n        const int needsEscape = XSUM_filenameNeedsEscape(filename);\n        if (needsEscape) {\n            XSUM_output(\"%c\", '\\\\');\n        }\n        XSUM_output(\"%s (\", typeString);\n        XSUM_printFilename(filename, needsEscape);\n        XSUM_output(\") = \");\n        f_displayHash(canonicalHash, hashLength);\n        XSUM_output(\"\\n\");\n}   }\n\nstatic void XSUM_printLine_BSD_LE(const char* filename, const void* canonicalHash, const AlgoSelected hashType)\n{\n    XSUM_printLine_BSD_internal(filename, canonicalHash, hashType, XSUM_algoLE_name, XSUM_display_LittleEndian);\n}\n\nstatic void XSUM_printLine_BSD(const char* filename, const void* canonicalHash, const AlgoSelected hashType)\n{\n    XSUM_printLine_BSD_internal(filename, canonicalHash, hashType, XSUM_algoName, XSUM_display_BigEndian);\n}\n\nstatic void XSUM_displayPrefix(const AlgoSelected hashType)\n{\n    assert(0 <= hashType && (size_t)hashType <= XSUM_TABLE_ELT_SIZE(XSUM_algoName));\n    if (hashType == algo_xxh3) {\n        XSUM_output(\"XXH3_\");\n    }\n}\n\nstatic void XSUM_printLine_GNU_internal(const char* filename,\n                               const void* canonicalHash, const AlgoSelected hashType,\n                               XSUM_displayHash_f f_displayHash)\n{\n    assert(0 <= hashType && (size_t)hashType <= XSUM_TABLE_ELT_SIZE(XSUM_algoName));\n    {   const size_t hashLength = XSUM_algoLength[hashType];\n        const int needsEscape = XSUM_filenameNeedsEscape(filename);\n        if (needsEscape) {\n            XSUM_output(\"%c\", '\\\\');\n        }\n        XSUM_displayPrefix(hashType);\n        f_displayHash(canonicalHash, hashLength);\n        XSUM_output(\"  \");\n        XSUM_printFilename(filename, needsEscape);\n        XSUM_output(\"\\n\");\n}   }\n\nstatic void XSUM_printLine_GNU(const char* filename,\n                               const void* canonicalHash, const AlgoSelected hashType)\n{\n    XSUM_printLine_GNU_internal(filename, canonicalHash, hashType, XSUM_display_BigEndian);\n}\n\nstatic void XSUM_printLine_GNU_LE(const char* filename,\n                                  const void* canonicalHash, const AlgoSelected hashType)\n{\n    XSUM_printLine_GNU_internal(filename, canonicalHash, hashType, XSUM_display_LittleEndian);\n}\n\ntypedef enum { big_endian, little_endian} Display_endianness;\n\ntypedef enum { display_gnu, display_bsd } Display_convention;\n\ntypedef void (*XSUM_displayLine_f)(const char*, const void*, AlgoSelected);  /* line display signature */\n\ntypedef enum {\n    LineStatus_hashOk,\n    LineStatus_hashFailed,\n    LineStatus_failedToOpen,\n    LineStatus_isDirectory,\n    LineStatus_memoryError\n} LineStatus;\n\nstatic XSUM_displayLine_f XSUM_kDisplayLine_fTable[2][2] = {\n    { XSUM_printLine_GNU, XSUM_printLine_GNU_LE },\n    { XSUM_printLine_BSD, XSUM_printLine_BSD_LE }\n};\n\nstatic LineStatus XSUM_hashFile(const char* fileName,\n                         const AlgoSelected hashType,\n                         const Display_endianness displayEndianness,\n                         const Display_convention convention)\n{\n    size_t const blockSize = 64 KB;\n    XSUM_displayLine_f const f_displayLine = XSUM_kDisplayLine_fTable[convention][displayEndianness];\n    FILE* inFile;\n    Multihash hashValue;\n    assert(displayEndianness==big_endian || displayEndianness==little_endian);\n    assert(convention==display_gnu || convention==display_bsd);\n\n    /* Check file existence */\n    if (fileName == stdinName) {\n        inFile = stdin;\n        fileName = stdinFileName; /* \"stdin\" */\n        XSUM_setBinaryMode(stdin);\n    } else {\n        if (XSUM_isDirectory(fileName)) {\n            return LineStatus_isDirectory;\n        }\n        inFile = XSUM_fopen( fileName, \"rb\" );\n        if (inFile==NULL) {\n            return LineStatus_failedToOpen;\n    }   }\n\n    /* Memory allocation & streaming */\n    {   void* const buffer = malloc(blockSize);\n        if (buffer == NULL) {\n            XSUM_log(\"\\nError: Out of memory.\\n\");\n            fclose(inFile);\n            return LineStatus_memoryError;\n        }\n\n        /* Stream file & update hash */\n        hashValue = XSUM_hashStream(inFile, hashType, buffer, blockSize);\n\n        fclose(inFile);\n        free(buffer);\n    }\n\n    /* display Hash value in selected format */\n    switch(hashType)\n    {\n    case algo_xxh32:\n        {   XXH32_canonical_t hcbe32;\n            (void)XXH32_canonicalFromHash(&hcbe32, hashValue.hash32);\n            f_displayLine(fileName, &hcbe32, hashType);\n            break;\n        }\n    case algo_xxh64:\n        {   XXH64_canonical_t hcbe64;\n            (void)XXH64_canonicalFromHash(&hcbe64, hashValue.hash64);\n            f_displayLine(fileName, &hcbe64, hashType);\n            break;\n        }\n    case algo_xxh128:\n        {   XXH128_canonical_t hcbe128;\n            (void)XXH128_canonicalFromHash(&hcbe128, hashValue.hash128);\n            f_displayLine(fileName, &hcbe128, hashType);\n            break;\n        }\n    case algo_xxh3:\n        {   XXH64_canonical_t hcbe64;\n            (void)XXH64_canonicalFromHash(&hcbe64, hashValue.hash64);\n            f_displayLine(fileName, &hcbe64, hashType);\n            break;\n        }\n    default:\n        assert(0);  /* not possible */\n    }\n\n    return LineStatus_hashOk;\n}\n\n\n/*\n * XSUM_hashFiles:\n * If fnTotal==0, read from stdin instead.\n */\nstatic int XSUM_hashFiles(const char* fnList[], int fnTotal,\n                          AlgoSelected hashType,\n                          Display_endianness displayEndianness,\n                          Display_convention convention)\n{\n    int fnNb;\n    int result = 0;\n\n    if (fnTotal == 0)\n    {\n        LineStatus filestatus = XSUM_hashFile(stdinName, hashType, displayEndianness, convention);\n        switch (filestatus)\n        {\n        case LineStatus_hashOk:\n        case LineStatus_hashFailed:\n            break;\n        case LineStatus_isDirectory:\n            XSUM_log(\"xxhsum: %s: Is a directory \\n\", stdinName);\n            break;\n        case LineStatus_failedToOpen:\n            XSUM_log(\"Error: Could not open '%s': %s. \\n\", stdinName, strerror(errno));\n            break;\n        case LineStatus_memoryError:\n            XSUM_log(\"\\nError: Out of memory.\\n\");\n            break;\n        }\n\n        if (filestatus != LineStatus_hashOk)\n            result = 1;\n    }\n\n\n    for (fnNb = 0; fnNb < fnTotal; fnNb++)\n    {\n        LineStatus filestatus = XSUM_hashFile(fnList[fnNb], hashType, displayEndianness, convention);\n        switch (filestatus)\n        {\n        case LineStatus_hashOk:\n        case LineStatus_hashFailed:\n            break;\n        case LineStatus_isDirectory:\n            XSUM_log(\"xxhsum: %s: Is a directory \\n\", fnList[fnNb]);\n            break;\n        case LineStatus_failedToOpen:\n            XSUM_log(\"Error: Could not open '%s': %s. \\n\", fnList[fnNb], strerror(errno));\n            break;\n        case LineStatus_memoryError:\n            XSUM_log(\"\\nError: Out of memory.\\n\");\n            break;\n        }\n\n        if (filestatus != LineStatus_hashOk)\n            result = 1;\n    }\n\n    return result;\n}\n\n\ntypedef enum {\n    GetLine_ok,\n    GetLine_comment,\n    GetLine_eof,\n    GetLine_exceedMaxLineLength,\n    GetLine_outOfMemory\n} GetLineResult;\n\ntypedef enum {\n    CanonicalFromString_ok,\n    CanonicalFromString_invalidFormat\n} CanonicalFromStringResult;\n\ntypedef enum {\n    ParseLine_ok,\n    ParseLine_invalidFormat\n} ParseLineResult;\n\ntypedef union {\n    XXH32_canonical_t xxh32;\n    XXH64_canonical_t xxh64;\n    XXH128_canonical_t xxh128;\n} Canonical;\n\ntypedef struct {\n    Canonical    canonical;\n    const char*  filename;\n    AlgoSelected algo;\n} ParsedLine;\n\ntypedef struct {\n    unsigned long   nProperlyFormattedLines;\n    unsigned long   nImproperlyFormattedLines;\n    unsigned long   nMismatchedChecksums;\n    unsigned long   nMatchedChecksums;\n    unsigned long   nOpenOrReadFailures;\n    unsigned long   nMixedFormatLines;\n    unsigned long   nMissing;\n    int             quit;\n} ParseFileReport;\n\ntypedef struct {\n    const char*  inFileName;\n    FILE*        inFile;\n    int          lineMax;\n    char*        lineBuf;\n    size_t       blockSize;\n    char*        blockBuf;\n    int          strictMode;\n    int          statusOnly;\n    int          ignoreMissing;\n    int          warn;\n    int          quiet;\n    XSUM_U32     algoBitmask;\n    ParseFileReport report;\n} ParseFileArg;\n\n\n/*\n * Reads a line from stream `inFile`.\n * Returns GetLine_ok, if it reads line successfully.\n * Returns GetLine_comment, if the line is beginning with '#'.\n * Returns GetLine_eof, if stream reaches EOF.\n * Returns GetLine_exceedMaxLineLength, if line length is longer than MAX_LINE_LENGTH.\n * Returns GetLine_outOfMemory, if line buffer memory allocation failed.\n */\nstatic GetLineResult XSUM_getLine(char** lineBuf, int* lineMax, FILE* inFile)\n{\n    GetLineResult result = GetLine_ok;\n    size_t len = 0;\n\n    if ((*lineBuf == NULL) || (*lineMax<1)) {\n        free(*lineBuf);  /* in case it's != NULL */\n        *lineMax = 0;\n        *lineBuf = (char*)malloc(DEFAULT_LINE_LENGTH);\n        if(*lineBuf == NULL) return GetLine_outOfMemory;\n        *lineMax = DEFAULT_LINE_LENGTH;\n    }\n\n    for (;;) {\n        const int c = fgetc(inFile);\n        if (c == EOF) {\n            /*\n             * If we meet EOF before first character, returns GetLine_eof,\n             * otherwise GetLine_ok.\n             */\n            if (len == 0) result = GetLine_eof;\n            break;\n        }\n\n        /* Make enough space for len+1 (for final NUL) bytes. */\n        if (len+1 >= (size_t)*lineMax) {\n            char* newLineBuf = NULL;\n            size_t newBufSize = (size_t)*lineMax;\n\n            newBufSize += (newBufSize/2) + 1; /* x 1.5 */\n            if (newBufSize > MAX_LINE_LENGTH) newBufSize = MAX_LINE_LENGTH;\n            if (len+1 >= newBufSize) return GetLine_exceedMaxLineLength;\n\n            newLineBuf = (char*) realloc(*lineBuf, newBufSize);\n            if (newLineBuf == NULL) return GetLine_outOfMemory;\n\n            *lineBuf = newLineBuf;\n            *lineMax = (int)newBufSize;\n        }\n\n        if (c == '\\n') break;\n        (*lineBuf)[len++] = (char) c;\n    }\n\n    (*lineBuf)[len] = '\\0';\n\n    /* Ignore comment lines, which begin with a '#' character. */\n    if (result == GetLine_ok && len > 0 && ((*lineBuf)[0] == '#')) {\n        result = GetLine_comment;\n    }\n\n    return result;\n}\n\n\n/*\n * Converts one hexadecimal character to integer.\n * Returns -1 if the given character is not hexadecimal.\n */\nstatic int charToHex(char c)\n{\n    int result = -1;\n    if (c >= '0' && c <= '9') {\n        result = (int) (c - '0');\n    } else if (c >= 'A' && c <= 'F') {\n        result = (int) (c - 'A') + 0x0a;\n    } else if (c >= 'a' && c <= 'f') {\n        result = (int) (c - 'a') + 0x0a;\n    }\n    return result;\n}\n\n\n/*\n * Converts canonical ASCII hexadecimal string `hashStr`\n * to the big endian binary representation in unsigned char array `dst`.\n *\n * Returns CanonicalFromString_invalidFormat if hashStr is not well formatted.\n * Returns CanonicalFromString_ok if hashStr is parsed successfully.\n */\nstatic CanonicalFromStringResult XSUM_canonicalFromString(unsigned char* dst,\n                                                          size_t dstSize,\n                                                          const char* hashStr,\n                                                          int reverseBytes)\n{\n    size_t i;\n    for (i = 0; i < dstSize; ++i) {\n        int h0, h1;\n        size_t j = reverseBytes ? dstSize - i - 1 : i;\n\n        h0 = charToHex(hashStr[j*2 + 0]);\n        if (h0 < 0) return CanonicalFromString_invalidFormat;\n\n        h1 = charToHex(hashStr[j*2 + 1]);\n        if (h1 < 0) return CanonicalFromString_invalidFormat;\n\n        dst[i] = (unsigned char) ((h0 << 4) | h1);\n    }\n    return CanonicalFromString_ok;\n}\n\n\n/*\n * Parse single line of xxHash checksum file.\n * Returns ParseLine_invalidFormat if the line is not well formatted.\n * Returns ParseLine_ok if the line is parsed successfully.\n * And members of XSUM_parseLine will be filled by parsed values.\n *\n *  - line must be terminated with '\\0' without a trailing newline.\n *  - Since parsedLine.filename will point within given argument `line`,\n *    users must keep `line`s content when they are using parsedLine.\n *  - The line may be modified to carve up the information it contains.\n *\n * xxHash checksum lines should have the following format:\n *\n *      <8, 16, or 32 hexadecimal char> <space> <space> <filename...> <'\\0'>\n *\n * or:\n *\n *      <algorithm> <' ('> <filename> <') = '> <hexstring> <'\\0'>\n */\nstatic ParseLineResult XSUM_parseLine1(ParsedLine* parsedLine, char* line, int rev, int needsUnescape, XSUM_U32 algoBitmask)\n{\n    char* const firstSpace = strchr(line, ' ');\n    const char* hash_ptr;\n    size_t hash_len;\n\n    parsedLine->filename = NULL;\n    parsedLine->algo = algo_xxh64; /* default - will be overwritten */\n    if (firstSpace == NULL || !firstSpace[1]) return ParseLine_invalidFormat;\n\n    if (firstSpace[1] == '(') {\n        char* lastSpace = strrchr(line, ' ');\n        if (lastSpace - firstSpace < 5) return ParseLine_invalidFormat;\n        if (lastSpace[-1] != '=' || lastSpace[-2] != ' ' || lastSpace[-3] != ')') return ParseLine_invalidFormat;\n        lastSpace[-3] = '\\0'; /* Terminate the filename */\n        *firstSpace = '\\0';\n        rev = strstr(line, \"_LE\") != NULL; /* was output little-endian */\n        hash_ptr = lastSpace + 1;\n        hash_len = strlen(hash_ptr);\n        if (!memcmp(line, \"XXH3\", 4)) parsedLine->algo = algo_xxh3;\n        if (!memcmp(line, \"XXH32\", 5)) parsedLine->algo = algo_xxh32;\n        if (!memcmp(line, \"XXH64\", 5)) parsedLine->algo = algo_xxh64;\n        if (!memcmp(line, \"XXH128\", 6)) parsedLine->algo = algo_xxh128;\n    } else {\n        hash_ptr = line;\n        hash_len = (size_t)(firstSpace - line);\n        if (hash_len==8) parsedLine->algo = algo_xxh32;\n        if (hash_len==16) parsedLine->algo = algo_xxh64;\n        if (hash_len==21) parsedLine->algo = algo_xxh3;\n        if (hash_len==32) parsedLine->algo = algo_xxh128;\n    }\n\n    /* Check current CLI accepts the algorithm or not */\n    if(! XSUM_algoBitmask_Accepts(algoBitmask, parsedLine->algo)) {\n        return ParseLine_invalidFormat;\n    }\n\n    switch (hash_len)\n    {\n    case 8:\n        if (parsedLine->algo != algo_xxh32) return ParseLine_invalidFormat;\n        {   XXH32_canonical_t* xxh32c = &parsedLine->canonical.xxh32;\n            if (XSUM_canonicalFromString(xxh32c->digest, sizeof(xxh32c->digest), hash_ptr, rev)\n                != CanonicalFromString_ok) {\n                return ParseLine_invalidFormat;\n            }\n            break;\n        }\n\n    case 16:\n        if (parsedLine->algo != algo_xxh64 && parsedLine->algo != algo_xxh3) return ParseLine_invalidFormat;\n        {   XXH64_canonical_t* xxh64c = &parsedLine->canonical.xxh64;\n            if (XSUM_canonicalFromString(xxh64c->digest, sizeof(xxh64c->digest), hash_ptr, rev)\n                != CanonicalFromString_ok) {\n                return ParseLine_invalidFormat;\n            }\n            break;\n        }\n\n    case 21:\n        if (parsedLine->algo != algo_xxh3) return ParseLine_invalidFormat;\n        /* check XXH3 prefix*/\n        if (memcmp(hash_ptr, \"XXH3_\", 5) != 0) return ParseLine_invalidFormat;\n        {   XXH64_canonical_t* xxh64c = &parsedLine->canonical.xxh64;\n            if (XSUM_canonicalFromString(xxh64c->digest, sizeof(xxh64c->digest), (const char*)hash_ptr+5, rev)\n                != CanonicalFromString_ok) {\n                return ParseLine_invalidFormat;\n            }\n            break;\n        }\n\n    case 32:\n        if (parsedLine->algo != algo_xxh128) return ParseLine_invalidFormat;\n        {   XXH128_canonical_t* xxh128c = &parsedLine->canonical.xxh128;\n            if (XSUM_canonicalFromString(xxh128c->digest, sizeof(xxh128c->digest), hash_ptr, rev)\n                != CanonicalFromString_ok) {\n                return ParseLine_invalidFormat;\n            }\n            break;\n        }\n\n    default:\n            return ParseLine_invalidFormat;\n            break;\n    }\n\n    /* note : skipping second separation character, which can be anything,\n     * allowing insertion of custom markers such as '*' */\n    {\n        char* const filename = firstSpace + 2;\n        const size_t filenameLen = strlen(filename);\n        if (needsUnescape) {\n            char* const result = XSUM_filenameUnescape(filename, filenameLen);\n            if (result == NULL) {\n                return ParseLine_invalidFormat;\n            }\n        }\n        parsedLine->filename = filename;\n    }\n    return ParseLine_ok;\n}\n\nstatic ParseLineResult XSUM_parseLine(ParsedLine* parsedLine, char* line, int rev, XSUM_U32 algoBitmask) {\n    const int needsUnescape = XSUM_lineNeedsUnescape(line);\n    if (needsUnescape) {\n        ++line;\n    }\n    return XSUM_parseLine1(parsedLine, line, rev, needsUnescape, algoBitmask);\n}\n\n\n\n/*!\n * Parse xxHash checksum file.\n */\nstatic void XSUM_parseFile1(ParseFileArg* XSUM_parseFileArg, int rev)\n{\n    const char* const inFileName = XSUM_parseFileArg->inFileName;\n    ParseFileReport* const report = &XSUM_parseFileArg->report;\n\n    unsigned long lineNumber = 0;\n    memset(report, 0, sizeof(*report));\n\n    while (!report->quit) {\n        LineStatus lineStatus = LineStatus_hashFailed;\n        ParsedLine parsedLine;\n        memset(&parsedLine, 0, sizeof(parsedLine));\n\n        lineNumber++;\n        if (lineNumber == 0) {\n            /* This is unlikely happen, but md5sum.c has this error check. */\n            XSUM_log(\"%s: Error: Too many checksum lines\\n\", inFileName);\n            report->quit = 1;\n            break;\n        }\n\n        {   GetLineResult const XSUM_getLineResult =\n                XSUM_getLine(&XSUM_parseFileArg->lineBuf,\n                    &XSUM_parseFileArg->lineMax,\n                    XSUM_parseFileArg->inFile);\n\n            /* Ignore comment lines */\n            if (XSUM_getLineResult == GetLine_comment) {\n                continue;\n            }\n\n            if (XSUM_getLineResult != GetLine_ok) {\n                if (XSUM_getLineResult == GetLine_eof) break;\n\n                switch (XSUM_getLineResult)\n                {\n                case GetLine_ok:\n                case GetLine_comment:\n                case GetLine_eof:\n                    /* These cases never happen.  See above XSUM_getLineResult related \"if\"s.\n                       They exist just for make gcc's -Wswitch-enum happy. */\n                    assert(0);\n                    break;\n\n                default:\n                    XSUM_log(\"%s:%lu: Error: Unknown error.\\n\", inFileName, lineNumber);\n                    break;\n\n                case GetLine_exceedMaxLineLength:\n                    XSUM_log(\"%s:%lu: Error: Line too long.\\n\", inFileName, lineNumber);\n                    break;\n\n                case GetLine_outOfMemory:\n                    XSUM_log(\"%s:%lu: Error: Out of memory.\\n\", inFileName, lineNumber);\n                    break;\n                }\n                report->quit = 1;\n                break;\n        }   }\n\n        if (XSUM_parseLine(&parsedLine, XSUM_parseFileArg->lineBuf, rev, XSUM_parseFileArg->algoBitmask) != ParseLine_ok) {\n            report->nImproperlyFormattedLines++;\n            if (XSUM_parseFileArg->warn) {\n                XSUM_log(\"%s:%lu: Error: Improperly formatted checksum line.\\n\",\n                        inFileName, lineNumber);\n            }\n            continue;\n        }\n\n        report->nProperlyFormattedLines++;\n\n        do {\n            int const fnameIsStdin = (strcmp(parsedLine.filename, stdinFileName) == 0); /* \"stdin\" */\n            FILE* const fp = fnameIsStdin ? stdin : XSUM_fopen(parsedLine.filename, \"rb\");\n            if (fp == stdin) {\n                XSUM_setBinaryMode(stdin);\n            }\n            if (fp == NULL) {\n                lineStatus = LineStatus_failedToOpen;\n                break;\n            }\n            lineStatus = LineStatus_hashFailed;\n            {   Multihash const xxh = XSUM_hashStream(fp, parsedLine.algo, XSUM_parseFileArg->blockBuf, XSUM_parseFileArg->blockSize);\n                switch (parsedLine.algo)\n                {\n                case algo_xxh32:\n                    if (xxh.hash32 == XXH32_hashFromCanonical(&parsedLine.canonical.xxh32)) {\n                        lineStatus = LineStatus_hashOk;\n                    }\n                    break;\n\n                case algo_xxh64:\n                case algo_xxh3:\n                    if (xxh.hash64 == XXH64_hashFromCanonical(&parsedLine.canonical.xxh64)) {\n                        lineStatus = LineStatus_hashOk;\n                    }\n                    break;\n\n                case algo_xxh128:\n                    if (XXH128_isEqual(xxh.hash128, XXH128_hashFromCanonical(&parsedLine.canonical.xxh128))) {\n                        lineStatus = LineStatus_hashOk;\n                    }\n                    break;\n\n                default:\n                    break;\n                }\n            }\n            if (fp != stdin) fclose(fp);\n        } while (0);\n\n        switch (lineStatus)\n        {\n        default:\n            XSUM_log(\"%s: Error: Unknown error.\\n\", inFileName);\n            report->quit = 1;\n            break;\n\n        case LineStatus_memoryError:\n        case LineStatus_isDirectory:\n            assert(0); /* Never happens on these paths */\n            break;\n\n        case LineStatus_failedToOpen:\n            if (XSUM_parseFileArg->ignoreMissing) {\n                report->nMissing++;\n            } else {\n                report->nOpenOrReadFailures++;\n                if (!XSUM_parseFileArg->statusOnly) {\n                    XSUM_output(\"%s:%lu: Could not open or read '%s': %s.\\n\",\n                        inFileName, lineNumber, parsedLine.filename, strerror(errno));\n                }\n            }\n            break;\n\n        case LineStatus_hashOk:\n        case LineStatus_hashFailed:\n            {   int b = 1;\n                if (lineStatus == LineStatus_hashOk) {\n                    report->nMatchedChecksums++;\n                    /* If --quiet is specified, don't display \"OK\" */\n                    if (XSUM_parseFileArg->quiet) b = 0;\n                } else {\n                    report->nMismatchedChecksums++;\n                }\n\n                if (b && !XSUM_parseFileArg->statusOnly) {\n                    const int needsEscape = XSUM_filenameNeedsEscape(parsedLine.filename);\n                    if (needsEscape) {\n                        XSUM_output(\"%c\", '\\\\');\n                    }\n                    XSUM_printFilename(parsedLine.filename, needsEscape);\n                    XSUM_output(\": %s\\n\", lineStatus == LineStatus_hashOk ? \"OK\" : \"FAILED\");\n            }   }\n            break;\n        }\n    }   /* while (!report->quit) */\n}\n\n\n/*  Parse xxHash checksum file.\n *  Returns 1, if all procedures were succeeded.\n *  Returns 0, if any procedures was failed.\n *\n *  If strictMode != 0, return error code if any line is invalid.\n *  If statusOnly != 0, don't generate any output.\n *  If ignoreMissing != 0, ignore missing file.  But if no file was verified, returns 0 (failed).\n *  If warn != 0, print a warning message to stderr.\n *  If quiet != 0, suppress \"OK\" line.\n *\n *  \"All procedures are succeeded\" means:\n *    - Checksum file contains at least one line and less than SIZE_T_MAX lines.\n *    - All files are properly opened and read.\n *    - All hash values match with its content.\n *    - (strict mode) All lines in checksum file are consistent and well formatted.\n */\nstatic int XSUM_checkFile(const char* inFileName,\n                          const Display_endianness displayEndianness,\n                          int strictMode,\n                          int statusOnly,\n                          int ignoreMissing,\n                          int warn,\n                          int quiet,\n                          XSUM_U32 algoBitmask)\n{\n    int result = 0;\n    FILE* inFile = NULL;\n    ParseFileArg XSUM_parseFileArgBody;\n    ParseFileArg* const XSUM_parseFileArg = &XSUM_parseFileArgBody;\n    ParseFileReport* const report = &XSUM_parseFileArg->report;\n\n    /* note: stdinName is special constant pointer.  It is not a string. */\n    if (inFileName == stdinName) {\n        /*\n         * Note: Since we expect text input for xxhash -c mode,\n         * we don't set binary mode for stdin.\n         */\n        inFileName = stdinFileName; /* \"stdin\" */\n        inFile = stdin;\n    } else {\n        inFile = XSUM_fopen( inFileName, \"rt\" );\n    }\n\n    if (inFile == NULL) {\n        XSUM_log(\"Error: Could not open '%s': %s\\n\", inFileName, strerror(errno));\n        return 0;\n    }\n\n    XSUM_parseFileArg->inFileName  = inFileName;\n    XSUM_parseFileArg->inFile      = inFile;\n    XSUM_parseFileArg->lineMax     = DEFAULT_LINE_LENGTH;\n    XSUM_parseFileArg->lineBuf     = (char*) malloc((size_t)XSUM_parseFileArg->lineMax);\n    XSUM_parseFileArg->blockSize   = 64 * 1024;\n    XSUM_parseFileArg->blockBuf    = (char*) malloc(XSUM_parseFileArg->blockSize);\n    XSUM_parseFileArg->strictMode  = strictMode;\n    XSUM_parseFileArg->statusOnly  = statusOnly;\n    XSUM_parseFileArg->ignoreMissing = ignoreMissing;\n    XSUM_parseFileArg->warn        = warn;\n    XSUM_parseFileArg->quiet       = quiet;\n    XSUM_parseFileArg->algoBitmask = algoBitmask;\n\n    if ( (XSUM_parseFileArg->lineBuf == NULL)\n      || (XSUM_parseFileArg->blockBuf == NULL) ) {\n        XSUM_log(\"Error: : memory allocation failed \\n\");\n        exit(1);\n    }\n    XSUM_parseFile1(XSUM_parseFileArg, displayEndianness != big_endian);\n\n    free(XSUM_parseFileArg->blockBuf);\n    free(XSUM_parseFileArg->lineBuf);\n\n    if (inFile != stdin) fclose(inFile);\n\n    /* Show error/warning messages.  All messages are copied from md5sum.c\n     */\n    if (report->nProperlyFormattedLines == 0) {\n        XSUM_log(\"%s: no properly formatted xxHash checksum lines found\\n\", inFileName);\n    } else if (!statusOnly) {\n        if (report->nImproperlyFormattedLines) {\n            XSUM_output(\"%lu %s improperly formatted\\n\"\n                , report->nImproperlyFormattedLines\n                , report->nImproperlyFormattedLines == 1 ? \"line is\" : \"lines are\");\n        }\n        if (report->nOpenOrReadFailures) {\n            XSUM_output(\"%lu listed %s could not be read\\n\"\n                , report->nOpenOrReadFailures\n                , report->nOpenOrReadFailures == 1 ? \"file\" : \"files\");\n        }\n        if (report->nMismatchedChecksums) {\n            XSUM_output(\"%lu computed %s did NOT match\\n\"\n                , report->nMismatchedChecksums\n                , report->nMismatchedChecksums == 1 ? \"checksum\" : \"checksums\");\n    }   }\n\n    /* Result (exit) code logic is copied from\n     * gnu coreutils/src/md5sum.c digest_check() */\n    result =   report->nProperlyFormattedLines != 0\n            && report->nMismatchedChecksums == 0\n            && report->nOpenOrReadFailures == 0\n            && (!strictMode || report->nImproperlyFormattedLines == 0)\n            && report->quit == 0;\n\n    /* If \"--ignore-missing\" is enabled and there's no matched checksum, report it as error.\n     * See https://github.com/coreutils/coreutils/blob/2f1cffe07ab0f0b4135a52d95f1689d7fc7f26c9/src/digest.c#L1325-L1328 */\n    if (ignoreMissing && report->nMatchedChecksums == 0) {\n        XSUM_output(\"%s: no file was verified\\n\", inFileName);\n        result = 0;\n    }\n\n    return result;\n}\n\n\nstatic int XSUM_checkFiles(const char* fnList[], int fnTotal,\n                           const Display_endianness displayEndianness,\n                           int strictMode,\n                           int statusOnly,\n                           int ignoreMissing,\n                           int warn,\n                           int quiet,\n                           XSUM_U32 algoBitmask)\n{\n    int ok = 1;\n\n    /* Special case for stdinName \"-\",\n     * note: stdinName is not a string.  It's special pointer. */\n    if (fnTotal==0) {\n        ok &= XSUM_checkFile(stdinName, displayEndianness, strictMode, statusOnly, ignoreMissing, warn, quiet, algoBitmask);\n    } else {\n        int fnNb;\n        for (fnNb=0; fnNb<fnTotal; fnNb++)\n            ok &= XSUM_checkFile(fnList[fnNb], displayEndianness, strictMode, statusOnly, ignoreMissing, warn, quiet, algoBitmask);\n    }\n    return ok ? 0 : 1;\n}\n\n\n/*\n*\n* Parse single filename from list to generate hashes for.\n* Returns ParseLine_invalidFormat if the filename is not well formatted.\n* Returns ParseLine_ok if the filename is parsed successfully.\n*/\nstatic ParseLineResult XSUM_parseGenLine(ParsedLine * parsedLine,\n    char* filename)\n{\n    if (XSUM_lineNeedsUnescape(filename)) {\n        size_t filenameLen;\n        ++filename;\n        filenameLen = strlen(filename);\n\n        if (XSUM_filenameUnescape(filename, filenameLen) == NULL) {\n            parsedLine->filename = NULL;\n            return ParseLine_invalidFormat;\n        }\n    }\n\n    parsedLine->filename = filename;\n\n    return ParseLine_ok;\n}\n\n/*\n * Parse gen source file.\n */\nstatic void XSUM_parseGenFile1(ParseFileArg* XSUM_parseGenArg,\n    AlgoSelected hashType,\n    Display_endianness displayEndianness,\n    Display_convention convention)\n{\n    const char* const inFileName = XSUM_parseGenArg->inFileName;\n    ParseFileReport* const report = &XSUM_parseGenArg->report;\n\n    unsigned long lineNumber = 0;\n    memset(report, 0, sizeof(*report));\n\n    while (!report->quit) {\n        LineStatus lineStatus = LineStatus_hashFailed;\n        ParsedLine parsedLine;\n        memset(&parsedLine, 0, sizeof(parsedLine));\n\n        lineNumber++;\n        if (lineNumber == 0) {\n            /* This is unlikely happen, but md5sum.c has this error check. */\n            XSUM_log(\"%s: Error: Too many generate lines\\n\", inFileName);\n            report->quit = 1;\n            break;\n        }\n\n        {   GetLineResult const XSUM_getLineResult = XSUM_getLine(&XSUM_parseGenArg->lineBuf,\n            &XSUM_parseGenArg->lineMax,\n            XSUM_parseGenArg->inFile);\n\n        /* Ignore comment lines */\n        if (XSUM_getLineResult == GetLine_comment) {\n            continue;\n        }\n\n        if (XSUM_getLineResult != GetLine_ok) {\n            if (XSUM_getLineResult == GetLine_eof) break;\n\n            switch (XSUM_getLineResult)\n            {\n            case GetLine_ok:\n            case GetLine_comment:\n            case GetLine_eof:\n                /* These cases never happen.  See above XSUM_getLineResult related \"if\"s.\n                   They exist just for make gcc's -Wswitch-enum happy. */\n                assert(0);\n                break;\n\n            default:\n                XSUM_log(\"%s:%lu: Error: Unknown error.\\n\", inFileName, lineNumber);\n                break;\n\n            case GetLine_exceedMaxLineLength:\n                XSUM_log(\"%s:%lu: Error: Line too long.\\n\", inFileName, lineNumber);\n                break;\n\n            case GetLine_outOfMemory:\n                XSUM_log(\"%s:%lu: Error: Out of memory.\\n\", inFileName, lineNumber);\n                break;\n            }\n            report->quit = 1;\n            break;\n        }   }\n\n        if (XSUM_parseGenLine(&parsedLine, XSUM_parseGenArg->lineBuf) != ParseLine_ok) {\n            report->nImproperlyFormattedLines++;\n            if (XSUM_parseGenArg->warn) {\n                XSUM_log(\"%s:%lu: Error: Improperly formatted line.\\n\",\n                    inFileName, lineNumber);\n            }\n            continue;\n        }\n\n        report->nProperlyFormattedLines++;\n\n        lineStatus = XSUM_hashFile(parsedLine.filename, hashType, displayEndianness, convention);\n\n        switch (lineStatus)\n        {\n        default:\n            XSUM_log(\"%s: Error: Unknown error.\\n\", parsedLine.filename);\n            report->quit = 1;\n            break;\n\n        case LineStatus_memoryError:\n            XSUM_log(\"\\nError: Out of memory.\\n\");\n            break;\n\n        case LineStatus_failedToOpen:\n        case LineStatus_isDirectory:\n            if (XSUM_parseGenArg->ignoreMissing) {\n                report->nMissing++;\n            }\n            else {\n                report->nOpenOrReadFailures++;\n                if (!XSUM_parseGenArg->statusOnly) {\n                    XSUM_output(\n                        lineStatus == LineStatus_failedToOpen ?\n                            \"%s:%lu: Could not open or read '%s': %s.\\n\" :\n                            \"%s:%lu: Target is a directory '%s'.\\n\", /* Leaves errno argument unconsumed */\n                        inFileName, lineNumber, parsedLine.filename, strerror(errno));\n                }\n            }\n            break;\n\n        case LineStatus_hashOk:\n        case LineStatus_hashFailed:\n        break;\n        }\n    }   /* while (!report->quit) */\n}\n\n\n/*  Parse text file for list of targets.\n */\nstatic int XSUM_generateFile(const char* inFileName,\n    AlgoSelected hashType,\n    Display_endianness displayEndianness,\n    Display_convention convention,\n    int statusOnly,\n    int ignoreMissing,\n    int warn)\n{\n    int result = 0;\n    FILE* inFile = NULL;\n    ParseFileArg XSUM_parseGenArgBody;\n    ParseFileArg* const XSUM_parseGenArg = &XSUM_parseGenArgBody;\n    ParseFileReport* const report = &XSUM_parseGenArg->report;\n\n    /* note: stdinName is special constant pointer.  It is not a string. */\n    if (inFileName == stdinName) {\n        /*\n         * Note: Since we expect text input for xxhash -c mode,\n         * we don't set binary mode for stdin.\n         */\n        inFileName = stdinFileName; /* \"stdin\" */\n        inFile = stdin;\n    }\n    else {\n        inFile = XSUM_fopen(inFileName, \"rt\");\n    }\n\n    if (inFile == NULL) {\n        XSUM_log(\"Error: Could not open '%s': %s\\n\", inFileName, strerror(errno));\n        return 0;\n    }\n\n    XSUM_parseGenArg->inFileName = inFileName;\n    XSUM_parseGenArg->inFile = inFile;\n    XSUM_parseGenArg->lineMax = DEFAULT_LINE_LENGTH;\n    XSUM_parseGenArg->lineBuf = (char*)malloc((size_t)XSUM_parseGenArg->lineMax);\n    XSUM_parseGenArg->blockSize = 64 * 1024;\n    XSUM_parseGenArg->blockBuf = (char*)malloc(XSUM_parseGenArg->blockSize);\n    XSUM_parseGenArg->statusOnly = statusOnly;\n    XSUM_parseGenArg->ignoreMissing = ignoreMissing;\n    XSUM_parseGenArg->warn = warn;\n\n    if ((XSUM_parseGenArg->lineBuf == NULL)\n        || (XSUM_parseGenArg->blockBuf == NULL)) {\n        XSUM_log(\"Error: : memory allocation failed \\n\");\n        exit(1);\n    }\n    XSUM_parseGenFile1(XSUM_parseGenArg, hashType, displayEndianness, convention);\n\n    free(XSUM_parseGenArg->blockBuf);\n    free(XSUM_parseGenArg->lineBuf);\n\n    if (inFile != stdin) fclose(inFile);\n\n    /* Show error/warning messages.  All messages are copied from md5sum.c\n     */\n    if (report->nProperlyFormattedLines == 0) {\n        XSUM_log(\"%s: no properly formatted filename lines found\\n\", inFileName);\n    }\n    if (report->nImproperlyFormattedLines) {\n        XSUM_output(\"%lu %s improperly formatted\\n\"\n            , report->nImproperlyFormattedLines\n            , report->nImproperlyFormattedLines == 1 ? \"line is\" : \"lines are\");\n    }\n    if (report->nOpenOrReadFailures) {\n        XSUM_output(\"%lu listed %s could not be read\\n\"\n            , report->nOpenOrReadFailures\n            , report->nOpenOrReadFailures == 1 ? \"file\" : \"files\");\n    }\n    /* Result (exit) code logic is copied from\n     * gnu coreutils/src/md5sum.c digest_check() */\n    result = report->nProperlyFormattedLines != 0\n        && report->nOpenOrReadFailures == 0\n        && (report->nImproperlyFormattedLines == 0)\n        && report->quit == 0;\n\n    return result;\n}\n\nstatic int XSUM_generateFiles(const char* fnList[], int fnTotal,\n    AlgoSelected hashType,\n    Display_endianness displayEndianness,\n    Display_convention convention,\n    int statusOnly,\n    int ignoreMissing,\n    int warn)\n{\n    int ok = 1;\n\n    /* Special case for stdinName \"-\",\n     * note: stdinName is not a string.  It's special pointer. */\n    if (fnTotal == 0) {\n        ok &= XSUM_generateFile(stdinName, hashType, displayEndianness, convention, statusOnly, ignoreMissing, warn);\n    }\n    else {\n        int fnNb;\n        for (fnNb = 0; fnNb < fnTotal; fnNb++)\n            ok &= XSUM_generateFile(fnList[fnNb], hashType, displayEndianness, convention, statusOnly, ignoreMissing, warn);\n    }\n    return ok ? 0 : 1;\n}\n\n\n/* ********************************************************\n*  Main\n**********************************************************/\n\nstatic int XSUM_usage(const char* exename)\n{\n    XSUM_log( WELCOME_MESSAGE(exename) );\n    XSUM_log( \"Create or verify checksums using fast non-cryptographic algorithm xxHash \\n\\n\" );\n    XSUM_log( \"Usage: %s [options] [files] \\n\\n\", exename);\n    XSUM_log( \"When no filename provided or when '-' is provided, uses stdin as input. \\n\");\n    XSUM_log( \"\\nOptions: \\n\");\n    XSUM_log( \"  -H#             select an xxhash algorithm (default: %i) \\n\", (int)g_defaultAlgo);\n    XSUM_log( \"                  0: XXH32 \\n\");\n    XSUM_log( \"                  1: XXH64 \\n\");\n    XSUM_log( \"                  2: XXH128 (also called XXH3_128bits) \\n\");\n    XSUM_log( \"                  3: XXH3 (also called XXH3_64bits) \\n\");\n    XSUM_log( \"  -c, --check     read xxHash checksum from [files] and check them \\n\");\n    XSUM_log( \"      --filelist  generate hashes for files listed in [files] \\n\");\n    XSUM_log( \"  -h, --help      display a long help page about advanced options \\n\");\n    return 0;\n}\n\n\nstatic int XSUM_usage_advanced(const char* exename)\n{\n    XSUM_usage(exename);\n    XSUM_log( \"\\nAdvanced :\\n\");\n    XSUM_log( \"  -V, --version        Display version information \\n\");\n    XSUM_log( \"      --tag            Produce BSD-style checksum lines \\n\");\n    XSUM_log( \"      --little-endian  Checksum values use little endian convention (default: big endian) \\n\");\n    XSUM_log( \"      --binary         Read in binary mode \\n\");\n    XSUM_log( \"  -b                   Run benchmark \\n\");\n    XSUM_log( \"  -b#                  Bench only algorithm variant # \\n\");\n    XSUM_log( \"  -i#                  Number of times to run the benchmark (default: %i) \\n\", NBLOOPS_DEFAULT);\n    XSUM_log( \"  -q, --quiet          Don't display version header in benchmark mode \\n\");\n    XSUM_log( \"\\n\");\n    XSUM_log( \"The following five options are useful only when using lists in [files] to verify or generate checksums: \\n\");\n    XSUM_log( \"  -q, --quiet          Don't print OK for each successfully verified hash \\n\");\n    XSUM_log( \"      --status         Don't output anything, status code shows success \\n\");\n    XSUM_log( \"      --strict         Exit non-zero for improperly formatted lines in [files] \\n\");\n    XSUM_log( \"      --warn           Warn about improperly formatted lines in [files] \\n\");\n    XSUM_log( \"      --ignore-missing Don't fail or report status for missing files \\n\");\n    return 0;\n}\n\nstatic int XSUM_badusage(const char* exename)\n{\n    XSUM_log(\"Wrong parameters\\n\\n\");\n    XSUM_usage(exename);\n    return 1;\n}\n\nstatic void errorOut(const char* msg)\n{\n    XSUM_log(\"%s \\n\", msg);\n    exit(1);\n}\n\nstatic const char* XSUM_lastNameFromPath(const char* path)\n{\n    const char* name = path;\n    if (strrchr(name, '/')) name = strrchr(name, '/') + 1;\n    if (strrchr(name, '\\\\')) name = strrchr(name, '\\\\') + 1; /* windows */\n    return name;\n}\n\n/*!\n * XSUM_readU32FromCharChecked():\n * @return 0 if success, and store the result in *value.\n * Allows and interprets K, KB, KiB, M, MB and MiB suffix.\n * Will also modify `*stringPtr`, advancing it to position where it stopped reading.\n * @return 1 if an overflow error occurs\n */\nstatic int XSUM_readU32FromCharChecked(const char** stringPtr, XSUM_U32* value)\n{\n    static const XSUM_U32 max = (((XSUM_U32)(-1)) / 10) - 1;\n    XSUM_U32 result = 0;\n    while ((**stringPtr >='0') && (**stringPtr <='9')) {\n        if (result > max) return 1; /* overflow error */\n        result *= 10;\n        result += (XSUM_U32)(**stringPtr - '0');\n        (*stringPtr)++ ;\n    }\n    if ((**stringPtr=='K') || (**stringPtr=='M')) {\n        XSUM_U32 const maxK = ((XSUM_U32)(-1)) >> 10;\n        if (result > maxK) return 1; /* overflow error */\n        result <<= 10;\n        if (**stringPtr=='M') {\n            if (result > maxK) return 1; /* overflow error */\n            result <<= 10;\n        }\n        (*stringPtr)++;  /* skip `K` or `M` */\n        if (**stringPtr=='i') (*stringPtr)++;\n        if (**stringPtr=='B') (*stringPtr)++;\n    }\n    *value = result;\n    return 0;\n}\n\n/*!\n * XSUM_readU32FromChar():\n * @return: unsigned integer value read from input in `char` format.\n *  allows and interprets K, KB, KiB, M, MB and MiB suffix.\n *  Will also modify `*stringPtr`, advancing it to position where it stopped reading.\n *  Note: function will exit() program if digit sequence overflows\n */\nstatic XSUM_U32 XSUM_readU32FromChar(const char** stringPtr) {\n    XSUM_U32 result;\n    if (XSUM_readU32FromCharChecked(stringPtr, &result)) {\n        static const char errorMsg[] = \"Error: numeric value too large\";\n        errorOut(errorMsg);\n    }\n    return result;\n}\n\nXSUM_API int XSUM_main(int argc, const char* argv[])\n{\n    int i, filenamesStart = 0;\n    const char* const exename = XSUM_lastNameFromPath(argv[0]);\n    int benchmarkMode = 0;\n    int fileCheckMode = 0;\n    int readFilenamesMode = 0;\n    int strictMode    = 0;\n    int statusOnly    = 0;\n    int warn          = 0;\n    int ignoreMissing = 0;\n    XSUM_U32 algoBitmask   = algo_bitmask_all;\n    int explicitStdin = 0;\n    XSUM_U32 selectBenchIDs= 0;  /* 0 == use default k_testIDs_default, kBenchAll == bench all */\n    static const XSUM_U32 kBenchAll = 99;\n    size_t keySize    = XSUM_DEFAULT_SAMPLE_SIZE;\n    AlgoSelected algo     = g_defaultAlgo;\n    Display_endianness displayEndianness = big_endian;\n    Display_convention convention = display_gnu;\n    int nbIterations = NBLOOPS_DEFAULT;\n\n    /* special case: xxhNNsum default to NN bits checksum */\n    if (strstr(exename,  \"xxh32sum\") != NULL) { algo = g_defaultAlgo = algo_xxh32;  algoBitmask = algo_bitmask_xxh32;  }\n    if (strstr(exename,  \"xxh64sum\") != NULL) { algo = g_defaultAlgo = algo_xxh64;  algoBitmask = algo_bitmask_xxh64;  }\n    if (strstr(exename, \"xxh128sum\") != NULL) { algo = g_defaultAlgo = algo_xxh128; algoBitmask = algo_bitmask_xxh128; }\n    if (strstr(exename,   \"xxh3sum\") != NULL) { algo = g_defaultAlgo = algo_xxh3;   algoBitmask = algo_bitmask_xxh3;  }\n\n    for (i=1; i<argc; i++) {\n        const char* argument = argv[i];\n        assert(argument != NULL);\n\n        if (!strcmp(argument, \"--check\")) { fileCheckMode = 1; continue; }\n        if (!strcmp(argument, \"--files-from\")) { readFilenamesMode = 1; continue; }\n        if (!strcmp(argument, \"--filelist\")) { readFilenamesMode = 1; continue; }\n        if (!strcmp(argument, \"--benchmark-all\")) { benchmarkMode = 1; selectBenchIDs = kBenchAll; continue; }\n        if (!strcmp(argument, \"--bench-all\")) { benchmarkMode = 1; selectBenchIDs = kBenchAll; continue; }\n        if (!strcmp(argument, \"--quiet\")) { XSUM_logLevel--; continue; }\n        if (!strcmp(argument, \"--little-endian\")) { displayEndianness = little_endian; continue; }\n        if (!strcmp(argument, \"--strict\")) { strictMode = 1; continue; }\n        if (!strcmp(argument, \"--status\")) { statusOnly = 1; continue; }\n        if (!strcmp(argument, \"--warn\")) { warn = 1; continue; }\n        if (!strcmp(argument, \"--binary\")) { continue; } /* Just ignore it. See https://github.com/Cyan4973/xxHash/issues/812 */\n        if (!strcmp(argument, \"--ignore-missing\")) { ignoreMissing = 1; continue; }\n        if (!strcmp(argument, \"--help\")) { return XSUM_usage_advanced(exename); }\n        if (!strcmp(argument, \"--version\")) { XSUM_log(FULL_WELCOME_MESSAGE(exename)); XSUM_sanityCheck(); return 0; }\n        if (!strcmp(argument, \"--tag\")) { convention = display_bsd; continue; }\n\n        if (!strcmp(argument, \"--\")) {\n            if (filenamesStart==0 && i!=argc-1) filenamesStart=i+1; /* only supports a continuous list of filenames */\n            break;  /* treat rest of arguments as strictly file names */\n        }\n        if (*argument != '-') {\n            if (filenamesStart==0) filenamesStart=i;   /* only supports a continuous list of filenames */\n            break;  /* treat rest of arguments as strictly file names */\n        }\n\n        /* command selection */\n        argument++;   /* note: argument[0] was =='-' */\n        if (*argument == 0) explicitStdin = 1;\n\n        while (*argument != 0) {\n            switch(*argument)\n            {\n            /* Display version */\n            case 'V':\n                XSUM_log(FULL_WELCOME_MESSAGE(exename));\n                XSUM_sanityCheck();\n                return 0;\n\n            /* Display help on XSUM_usage */\n            case 'h':\n                return XSUM_usage_advanced(exename);\n\n            /* select hash algorithm */\n            case 'H': argument++;\n                switch(XSUM_readU32FromChar(&argument)) {\n                    case 0 :\n                    case 32: algo = algo_xxh32; break;\n                    case 1 :\n                    case 64: algo = algo_xxh64; break;\n                    case 2 :\n                    case 128: algo = algo_xxh128; break;\n                    case 3 :\n                        algo = algo_xxh3; break;\n                    default:\n                        return XSUM_badusage(exename);\n                }\n                break;\n\n            /* File check mode */\n            case 'c':\n                fileCheckMode=1;\n                argument++;\n                break;\n\n            /* Generate hash mode (tar style short form of --files-from)\n            case 'T':\n                readFilenamesMode = 2;\n                argument++;\n                break; */\n\n            /* Warning mode (file check mode only, alias of \"--warning\") */\n            case 'w':\n                warn=1;\n                argument++;\n                break;\n\n            /* Trigger benchmark mode */\n            case 'b':\n                argument++;\n                benchmarkMode = 1;\n                do {\n                    if (*argument == ',') argument++;\n                    selectBenchIDs = XSUM_readU32FromChar(&argument); /* select one specific test */\n                    if ((int)selectBenchIDs < g_nbTestFunctions) {\n                        g_testIDs[selectBenchIDs] = 1;\n                    } else {\n                        selectBenchIDs = kBenchAll;\n                    }\n                } while (*argument == ',');\n                break;\n\n            /* Modify Nb Iterations (benchmark only) */\n            case 'i':\n                argument++;\n                nbIterations = (int)XSUM_readU32FromChar(&argument);\n                break;\n\n            /* Modify Block size (benchmark only) */\n            case 'B':\n                argument++;\n                keySize = XSUM_readU32FromChar(&argument);\n                break;\n\n            /* Modify verbosity of benchmark output (hidden option) */\n            case 'q':\n                argument++;\n                XSUM_logLevel--;\n                break;\n\n            default:\n                return XSUM_badusage(exename);\n            }\n        }\n    }   /* for(i=1; i<argc; i++) */\n\n    /* Check benchmark mode */\n    if (benchmarkMode) {\n        XSUM_logVerbose(2, FULL_WELCOME_MESSAGE(exename) );\n        XSUM_sanityCheck();\n        g_nbIterations = nbIterations;\n        if (selectBenchIDs == 0) memcpy(g_testIDs, k_testIDs_default, (size_t)g_nbTestFunctions);\n        if (selectBenchIDs == kBenchAll) memset(g_testIDs, 1, (size_t)g_nbTestFunctions);\n        if (filenamesStart==0) return XSUM_benchInternal(keySize);\n        return XSUM_benchFiles(argv+filenamesStart, argc-filenamesStart);\n    }\n\n    /* Check if input is defined as console; trigger an error in this case */\n    if ( (filenamesStart==0) && XSUM_isConsole(stdin) && !explicitStdin)\n        return XSUM_badusage(exename);\n\n    if (filenamesStart==0) filenamesStart = argc;\n\n    if (fileCheckMode) {\n        return XSUM_checkFiles(argv+filenamesStart, argc-filenamesStart,\n                          displayEndianness, strictMode, statusOnly, ignoreMissing, warn, (XSUM_logLevel < 2) /*quiet*/, algoBitmask);\n    }\n\n    if (readFilenamesMode) {\n        return XSUM_generateFiles(argv + filenamesStart, argc - filenamesStart, algo, displayEndianness, convention, statusOnly, ignoreMissing, warn);\n    }\n\n    return XSUM_hashFiles(argv+filenamesStart, argc-filenamesStart, algo, displayEndianness, convention);\n\n}\n"
  },
  {
    "path": "third-party/xxhash/clib.json",
    "content": "{\n  \"name\": \"xxhash\",\n  \"version\": \"0.8.2\",\n  \"repo\": \"Cyan4973/xxhash\",\n  \"description\": \"Extremely fast non-cryptographic hash algorithm\",\n  \"keywords\": [\"xxhash\", \"hashing\"],\n  \"license\": \"BSD-2-Clause\",\n  \"src\": [\n    \"xxhash.c\",\n    \"xxhash.h\"\n  ]\n}\n"
  },
  {
    "path": "third-party/xxhash/cmake_unofficial/.gitignore",
    "content": "# cmake artifacts\n\nCMakeCache.txt\nCMakeFiles\nMakefile\ncmake_install.cmake\n\n\n# make compilation results\n\n*.dylib\n*.a\n"
  },
  {
    "path": "third-party/xxhash/cmake_unofficial/CMakeLists.txt",
    "content": "# To the extent possible under law, the author(s) have dedicated all\n# copyright and related and neighboring rights to this software to\n# the public domain worldwide. This software is distributed without\n# any warranty.\n#\n# For details, see <https://creativecommons.org/publicdomain/zero/1.0/>.\n\ncmake_minimum_required (VERSION 3.10 FATAL_ERROR)\n\nset(XXHASH_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/..\")\n\nfile(STRINGS \"${XXHASH_DIR}/xxhash.h\" XXHASH_VERSION_MAJOR REGEX \"^#define XXH_VERSION_MAJOR +([0-9]+) *$\")\nstring(REGEX REPLACE \"^#define XXH_VERSION_MAJOR +([0-9]+) *$\" \"\\\\1\" XXHASH_VERSION_MAJOR \"${XXHASH_VERSION_MAJOR}\")\nfile(STRINGS \"${XXHASH_DIR}/xxhash.h\" XXHASH_VERSION_MINOR REGEX \"^#define XXH_VERSION_MINOR +([0-9]+) *$\")\nstring(REGEX REPLACE \"^#define XXH_VERSION_MINOR +([0-9]+) *$\" \"\\\\1\" XXHASH_VERSION_MINOR \"${XXHASH_VERSION_MINOR}\")\nfile(STRINGS \"${XXHASH_DIR}/xxhash.h\" XXHASH_VERSION_RELEASE REGEX \"^#define XXH_VERSION_RELEASE +([0-9]+) *$\")\nstring(REGEX REPLACE \"^#define XXH_VERSION_RELEASE +([0-9]+) *$\" \"\\\\1\" XXHASH_VERSION_RELEASE \"${XXHASH_VERSION_RELEASE}\")\nset(XXHASH_VERSION_STRING \"${XXHASH_VERSION_MAJOR}.${XXHASH_VERSION_MINOR}.${XXHASH_VERSION_RELEASE}\")\nset(XXHASH_LIB_VERSION ${XXHASH_VERSION_STRING})\nset(XXHASH_LIB_SOVERSION \"${XXHASH_VERSION_MAJOR}\")\nmark_as_advanced(XXHASH_VERSION_MAJOR XXHASH_VERSION_MINOR XXHASH_VERSION_RELEASE XXHASH_VERSION_STRING XXHASH_LIB_VERSION XXHASH_LIB_SOVERSION)\n\nif(\"${CMAKE_VERSION}\" VERSION_LESS \"3.13\")\n    #message(WARNING \"CMake ${CMAKE_VERSION} has no CMP0077 policy: options will erase uncached/untyped normal vars!\")\nelse()\n    cmake_policy (SET CMP0077 NEW)\nendif()\ncmake_policy (SET CMP0048 NEW)\nproject(xxHash\n    VERSION ${XXHASH_VERSION_STRING}\n    LANGUAGES C)\n\nif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)\n  set(CMAKE_BUILD_TYPE \"Release\" CACHE STRING \"Project build type\" FORCE)\n  set_property(CACHE CMAKE_BUILD_TYPE\n    PROPERTY STRINGS \"Debug\" \"Release\" \"RelWithDebInfo\" \"MinSizeRel\")\nendif()\nif(NOT CMAKE_CONFIGURATION_TYPES)\n  message(STATUS \"xxHash build type: ${CMAKE_BUILD_TYPE}\")\nendif()\n\n# Enable assert() statements in debug builds\nif(\"${CMAKE_BUILD_TYPE}\" STREQUAL \"Debug\")\n    if(\"${CMAKE_VERSION}\" VERSION_LESS \"3.12\")\n        # add_compile_definitions is not available for older cmake => do nothing\n    else()\n        add_compile_definitions(XXH_DEBUGLEVEL=1)\n    endif()\nendif()\n\noption(BUILD_SHARED_LIBS \"Build shared library\" ON)\noption(XXHASH_BUILD_XXHSUM \"Build the xxhsum binary\" ON)\n\n# If XXHASH is being bundled in another project, we don't want to\n# install anything.  However, we want to let people override this, so\n# we'll use the XXHASH_BUNDLED_MODE variable to let them do that; just\n# set it to OFF in your project before you add_subdirectory(xxhash/cmake_unofficial).\nif(NOT DEFINED XXHASH_BUNDLED_MODE)\n  if(\"${PROJECT_SOURCE_DIR}\" STREQUAL \"${CMAKE_SOURCE_DIR}\")\n    set(XXHASH_BUNDLED_MODE OFF)\n  else()\n    set(XXHASH_BUNDLED_MODE ON)\n  endif()\nendif()\nset(XXHASH_BUNDLED_MODE ${XXHASH_BUNDLED_MODE} CACHE BOOL \"\" FORCE)\nmark_as_advanced(XXHASH_BUNDLED_MODE)\n\n# Allow people to choose whether to build shared or static libraries\n# via the BUILD_SHARED_LIBS option unless we are in bundled mode, in\n# which case we always use static libraries.\ninclude(CMakeDependentOption)\nCMAKE_DEPENDENT_OPTION(BUILD_SHARED_LIBS \"Build shared libraries\" ON \"NOT XXHASH_BUNDLED_MODE\" OFF)\n\n# detect architecture for DISPATCH mode\nCMAKE_HOST_SYSTEM_INFORMATION(RESULT PLATFORM QUERY OS_PLATFORM)\nmessage(STATUS \"Architecture: ${PLATFORM}\")\n\n# libxxhash\nif((DEFINED DISPATCH) AND (DEFINED PLATFORM))\n  # Only support DISPATCH option on x86_64.\n  if((\"${PLATFORM}\" STREQUAL \"x86_64\") OR (\"${PLATFORM}\" STREQUAL \"AMD64\"))\n    set(XXHSUM_DISPATCH ON)\n    message(STATUS \"Enable xxHash dispatch mode\")\n    add_library(xxhash \"${XXHASH_DIR}/xxh_x86dispatch.c\"\n                       \"${XXHASH_DIR}/xxhash.c\"\n               )\n    set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} -DXXHSUM_DISPATCH=1\")\n  else()\n    add_library(xxhash \"${XXHASH_DIR}/xxhash.c\")\n  endif()\nelse()\n  add_library(xxhash \"${XXHASH_DIR}/xxhash.c\")\nendif()\nadd_library(${PROJECT_NAME}::xxhash ALIAS xxhash)\n\ntarget_include_directories(xxhash\n  PUBLIC\n    $<BUILD_INTERFACE:${XXHASH_DIR}>\n    $<INSTALL_INTERFACE:include/>)\nif (BUILD_SHARED_LIBS)\n  target_compile_definitions(xxhash PUBLIC XXH_EXPORT)\nendif ()\nset_target_properties(xxhash PROPERTIES\n  SOVERSION \"${XXHASH_LIB_SOVERSION}\"\n  VERSION \"${XXHASH_VERSION_STRING}\")\n\nif(XXHASH_BUILD_XXHSUM)\n  set(XXHSUM_DIR \"${XXHASH_DIR}/cli\")\n  # xxhsum\n  set(XXHSUM_SOURCES)\n  if (XXHSUM_DISPATCH)\n    list(APPEND XXHSUM_SOURCES \"${XXHASH_DIR}/xxh_x86dispatch.c\")\n  endif()\n  list(APPEND XXHSUM_SOURCES \"${XXHSUM_DIR}/xxhsum.c\"\n                             \"${XXHSUM_DIR}/xsum_arch.c\"\n                             \"${XXHSUM_DIR}/xsum_os_specific.c\"\n                             \"${XXHSUM_DIR}/xsum_output.c\"\n                             \"${XXHSUM_DIR}/xsum_sanity_check.c\"\n                             \"${XXHSUM_DIR}/xsum_bench.c\"\n      )\n  add_executable(xxhsum ${XXHSUM_SOURCES})\n  add_executable(${PROJECT_NAME}::xxhsum ALIAS xxhsum)\n\n  target_link_libraries(xxhsum PRIVATE xxhash)\n  target_include_directories(xxhsum PRIVATE \"${XXHASH_DIR}\")\nendif(XXHASH_BUILD_XXHSUM)\n\n# Extra warning flags\ninclude (CheckCCompilerFlag)\nif (XXHASH_C_FLAGS)\n  set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} ${XXHASH_C_FLAGS}\")\nendif()\n\nif(NOT XXHASH_BUNDLED_MODE)\n  include(GNUInstallDirs)\n\n  install(TARGETS xxhash\n    EXPORT xxHashTargets\n    RUNTIME DESTINATION \"${CMAKE_INSTALL_BINDIR}\"\n    LIBRARY DESTINATION \"${CMAKE_INSTALL_LIBDIR}\"\n    ARCHIVE DESTINATION \"${CMAKE_INSTALL_LIBDIR}\")\n  install(FILES \"${XXHASH_DIR}/xxhash.h\"\n    DESTINATION \"${CMAKE_INSTALL_INCLUDEDIR}\")\n  install(FILES \"${XXHASH_DIR}/xxh3.h\"\n    DESTINATION \"${CMAKE_INSTALL_INCLUDEDIR}\")\n  if(DISPATCH)\n    install(FILES \"${XXHASH_DIR}/xxh_x86dispatch.h\"\n      DESTINATION \"${CMAKE_INSTALL_INCLUDEDIR}\")\n  endif()\n  if(XXHASH_BUILD_XXHSUM)\n    install(TARGETS xxhsum\n      EXPORT xxHashTargets\n      RUNTIME DESTINATION \"${CMAKE_INSTALL_BINDIR}\")\n    install(FILES \"${XXHSUM_DIR}/xxhsum.1\"\n      DESTINATION \"${CMAKE_INSTALL_MANDIR}/man1\")\n  endif(XXHASH_BUILD_XXHSUM)\n\n  include(CMakePackageConfigHelpers)\n\n  set(xxHash_VERSION_CONFIG \"${PROJECT_BINARY_DIR}/xxHashConfigVersion.cmake\")\n  set(xxHash_PROJECT_CONFIG \"${PROJECT_BINARY_DIR}/xxHashConfig.cmake\")\n  set(xxHash_TARGETS_CONFIG \"${PROJECT_BINARY_DIR}/xxHashTargets.cmake\")\n  set(xxHash_CONFIG_INSTALL_DIR \"${CMAKE_INSTALL_LIBDIR}/cmake/xxHash/\")\n  write_basic_package_version_file(${xxHash_VERSION_CONFIG}\n    VERSION ${XXHASH_VERSION_STRING}\n    COMPATIBILITY AnyNewerVersion)\n  configure_package_config_file(\n    ${PROJECT_SOURCE_DIR}/xxHashConfig.cmake.in\n    ${xxHash_PROJECT_CONFIG}\n    INSTALL_DESTINATION ${xxHash_CONFIG_INSTALL_DIR})\n    export(EXPORT xxHashTargets\n      FILE ${xxHash_TARGETS_CONFIG}\n      NAMESPACE ${PROJECT_NAME}::)\n\n  install(FILES ${xxHash_PROJECT_CONFIG} ${xxHash_VERSION_CONFIG}\n    DESTINATION ${xxHash_CONFIG_INSTALL_DIR})\n  install(EXPORT xxHashTargets\n    DESTINATION ${xxHash_CONFIG_INSTALL_DIR}\n    NAMESPACE ${PROJECT_NAME}::)\n\n  # configure and install pkg-config\n  include(JoinPaths.cmake)\n  set(PREFIX ${CMAKE_INSTALL_PREFIX})\n  set(EXECPREFIX \"\\${prefix}\")\n  join_paths(INCLUDEDIR \"\\${prefix}\" \"${CMAKE_INSTALL_INCLUDEDIR}\")\n  join_paths(LIBDIR \"\\${prefix}\" \"${CMAKE_INSTALL_LIBDIR}\")\n  set(VERSION \"${XXHASH_VERSION_STRING}\")\n  configure_file(${XXHASH_DIR}/libxxhash.pc.in ${CMAKE_BINARY_DIR}/libxxhash.pc @ONLY)\n\n  install(FILES ${CMAKE_BINARY_DIR}/libxxhash.pc\n    DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)\n\nendif(NOT XXHASH_BUNDLED_MODE)\n\ninclude(CPack)\n"
  },
  {
    "path": "third-party/xxhash/cmake_unofficial/JoinPaths.cmake",
    "content": "# This module provides function for joining paths\n# known from most languages\n#\n# SPDX-License-Identifier: (MIT OR CC0-1.0)\n# Copyright 2020 Jan Tojnar\n# https://github.com/jtojnar/cmake-snips\n#\n# Modelled after Python’s os.path.join\n# https://docs.python.org/3.7/library/os.path.html#os.path.join\n# Windows not supported\nfunction(join_paths joined_path first_path_segment)\n    set(temp_path \"${first_path_segment}\")\n    foreach(current_segment IN LISTS ARGN)\n        if(NOT (\"${current_segment}\" STREQUAL \"\"))\n            if(IS_ABSOLUTE \"${current_segment}\")\n                set(temp_path \"${current_segment}\")\n            else()\n                set(temp_path \"${temp_path}/${current_segment}\")\n            endif()\n        endif()\n    endforeach()\n    set(${joined_path} \"${temp_path}\" PARENT_SCOPE)\nendfunction()\n"
  },
  {
    "path": "third-party/xxhash/cmake_unofficial/README.md",
    "content": "\n## Usage\n\n### Way 1: import targets\nBuild xxHash targets:\n\n    cd </path/to/xxHash/>\n    mkdir build\n    cd build\n    cmake ../cmake_unofficial [options]\n    cmake --build .\n    cmake --build . --target install #optional\n\nWhere possible options are:\n- `-DXXHASH_BUILD_ENABLE_INLINE_API=<ON|OFF>`: adds xxhash.c for the `-DXXH_INLINE_ALL` api. ON by default.\n- `-DXXHASH_BUILD_XXHSUM=<ON|OFF>`: build the command line binary. ON by default\n- `-DBUILD_SHARED_LIBS=<ON|OFF>`: build dynamic library. ON by default.\n- `-DCMAKE_INSTALL_PREFIX=<path>`: use custom install prefix path.\n- `-DDISPATCH=<ON|OFF>`: enable dispatch mode. OFF by default.\n\nAdd lines into downstream CMakeLists.txt:\n\n    find_package(xxHash 0.7 CONFIG REQUIRED)\n    ...\n    target_link_libraries(MyTarget PRIVATE xxHash::xxhash)\n\n### Way 2: Add subdirectory\nAdd lines into downstream CMakeLists.txt:\n\n    option(BUILD_SHARED_LIBS \"Build shared libs\" OFF) #optional\n    ...\n    set(XXHASH_BUILD_ENABLE_INLINE_API OFF) #optional\n    set(XXHASH_BUILD_XXHSUM OFF) #optional\n    add_subdirectory(</path/to/xxHash/cmake_unofficial/> </path/to/xxHash/build/> EXCLUDE_FROM_ALL)\n    ...\n    target_link_libraries(MyTarget PRIVATE xxHash::xxhash)\n\n"
  },
  {
    "path": "third-party/xxhash/cmake_unofficial/xxHashConfig.cmake.in",
    "content": "@PACKAGE_INIT@\n\ninclude(${CMAKE_CURRENT_LIST_DIR}/xxHashTargets.cmake)\n\n"
  },
  {
    "path": "third-party/xxhash/doc/README.md",
    "content": "xxHash Specification\n=======================\n\nThis directory contains material defining the xxHash algorithm.\nIt's described in [this specification document](xxhash_spec.md).\n\nThe algorithm is also be illustrated by a [simple educational library](https://github.com/easyaspi314/xxhash-clean),\nwritten by @easyaspi314 and designed for readability\n(as opposed to the reference library which is designed for speed).\n"
  },
  {
    "path": "third-party/xxhash/doc/xxhash.cry",
    "content": "module xxhash where\n\n/**\n * The 32-bit variant of xxHash. The first argument is the sequence\n * of L bytes to hash. The second argument is a seed value.\n */\nXXH32 : {L} (fin L) => [L][8] -> [32] -> [32]\nXXH32 input seed = XXH32_avalanche acc1\n  where (stripes16 # stripes4 # stripes1) = input\n        accR = foldl XXH32_rounds (XXH32_init seed) (split stripes16 : [L/16][16][8])\n        accL = `(L % 2^^32) + if (`L:Integer) < 16\n                              then seed + PRIME32_5\n                              else XXH32_converge accR\n        acc4 = foldl XXH32_digest4 accL (split stripes4 : [(L%16)/4][4][8])\n        acc1 = foldl XXH32_digest1 acc4 (stripes1 : [L%4][8])\n\n/**\n * The 64-bit variant of xxHash. The first argument is the sequence\n * of L bytes to hash. The second argument is a seed value.\n */\nXXH64 : {L} (fin L) => [L][8] -> [64] -> [64]\nXXH64 input seed = XXH64_avalanche acc1\n  where (stripes32 # stripes8 # stripes4 # stripes1) = input\n        accR = foldl XXH64_rounds (XXH64_init seed) (split stripes32 : [L/32][32][8])\n        accL = `(L % 2^^64) + if (`L:Integer) < 32\n                              then seed + PRIME64_5\n                              else XXH64_converge accR\n        acc8 = foldl XXH64_digest8 accL (split stripes8 : [(L%32)/8][8][8])\n        acc4 = foldl XXH64_digest4 acc8 (split stripes4 : [(L%8)/4][4][8])\n        acc1 = foldl XXH64_digest1 acc4 (stripes1 : [L%4][8])\n\nprivate\n\n  //Utility functions\n\n  /**\n   * Combines a sequence of bytes into a word using the little-endian\n   * convention.\n   */\n  toLE bytes = join (reverse bytes)\n\n  //32-bit xxHash helper functions\n\n  //32-bit prime number constants\n  PRIME32_1 = 0x9E3779B1 : [32]\n  PRIME32_2 = 0x85EBCA77 : [32]\n  PRIME32_3 = 0xC2B2AE3D : [32]\n  PRIME32_4 = 0x27D4EB2F : [32]\n  PRIME32_5 = 0x165667B1 : [32]\n\n  /**\n   * The property shows that the hexadecimal representation of the\n   * PRIME32 constants is the same as the binary representation.\n   */\n  property PRIME32s_as_bits_correct =\n    (PRIME32_1 == 0b10011110001101110111100110110001) /\\\n    (PRIME32_2 == 0b10000101111010111100101001110111) /\\\n    (PRIME32_3 == 0b11000010101100101010111000111101) /\\\n    (PRIME32_4 == 0b00100111110101001110101100101111) /\\\n    (PRIME32_5 == 0b00010110010101100110011110110001)\n\n  /**\n   * This function initializes the four internal accumulators of XXH32.\n   */\n  XXH32_init : [32] -> [4][32]\n  XXH32_init seed = [acc1, acc2, acc3, acc4]\n    where acc1 = seed + PRIME32_1 + PRIME32_2\n          acc2 = seed + PRIME32_2\n          acc3 = seed + 0\n          acc4 = seed - PRIME32_1\n\n  /**\n   * This processes a single lane of the main round function of XXH32.\n   */\n  XXH32_round : [32] -> [32] -> [32]\n  XXH32_round accN laneN = ((accN + laneN * PRIME32_2) <<< 13) * PRIME32_1\n\n  /**\n   * This is the main round function of XXH32 and processes a stripe,\n   * i.e. 4 lanes with 4 bytes each.\n   */\n  XXH32_rounds : [4][32] -> [16][8] -> [4][32]\n  XXH32_rounds accs stripe =\n    [ XXH32_round accN (toLE laneN) | accN <- accs | laneN <- split stripe ]\n\n  /**\n   * This function combines the four lane accumulators into a single\n   * 32-bit value.\n   */\n  XXH32_converge : [4][32] -> [32]\n  XXH32_converge [acc1, acc2, acc3, acc4] =\n    (acc1 <<< 1) + (acc2 <<< 7) + (acc3 <<< 12) + (acc4 <<< 18)\n\n  /**\n   * This function digests a four byte lane\n   */\n  XXH32_digest4 : [32] -> [4][8] -> [32]\n  XXH32_digest4 acc lane = ((acc + toLE lane * PRIME32_3) <<< 17) * PRIME32_4\n\n  /**\n   * This function digests a single byte lane\n   */\n  XXH32_digest1 : [32] -> [8] -> [32]\n  XXH32_digest1 acc lane = ((acc + (0 # lane) * PRIME32_5) <<< 11) * PRIME32_1\n\n  /**\n   * This function ensures that all input bits have a chance to impact\n   * any bit in the output digest, resulting in an unbiased\n   * distribution.\n   */\n  XXH32_avalanche : [32] -> [32]\n  XXH32_avalanche acc0 = acc5\n    where acc1 = acc0 ^ (acc0 >> 15)\n          acc2 = acc1 * PRIME32_2\n          acc3 = acc2 ^ (acc2 >> 13)\n          acc4 = acc3 * PRIME32_3\n          acc5 = acc4 ^ (acc4 >> 16)\n\n  //64-bit xxHash helper functions\n\n  //64-bit prime number constants\n  PRIME64_1 = 0x9E3779B185EBCA87 : [64]\n  PRIME64_2 = 0xC2B2AE3D27D4EB4F : [64]\n  PRIME64_3 = 0x165667B19E3779F9 : [64]\n  PRIME64_4 = 0x85EBCA77C2B2AE63 : [64]\n  PRIME64_5 = 0x27D4EB2F165667C5 : [64]\n\n  /**\n   * The property shows that the hexadecimal representation of the\n   * PRIME64 constants is the same as the binary representation.\n   */\n  property PRIME64s_as_bits_correct =\n    (PRIME64_1 == 0b1001111000110111011110011011000110000101111010111100101010000111) /\\\n    (PRIME64_2 == 0b1100001010110010101011100011110100100111110101001110101101001111) /\\\n    (PRIME64_3 == 0b0001011001010110011001111011000110011110001101110111100111111001) /\\\n    (PRIME64_4 == 0b1000010111101011110010100111011111000010101100101010111001100011) /\\\n    (PRIME64_5 == 0b0010011111010100111010110010111100010110010101100110011111000101)\n\n  /**\n   * This function initializes the four internal accumulators of XXH64.\n   */\n  XXH64_init : [64] -> [4][64]\n  XXH64_init seed = [acc1, acc2, acc3, acc4]\n    where acc1 = seed + PRIME64_1 + PRIME64_2\n          acc2 = seed + PRIME64_2\n          acc3 = seed + 0\n          acc4 = seed - PRIME64_1\n\n  /**\n   * This processes a single lane of the main round function of XXH64.\n   */\n  XXH64_round : [64] -> [64] -> [64]\n  XXH64_round accN laneN = ((accN + laneN * PRIME64_2) <<< 31) * PRIME64_1\n\n  /**\n   * This is the main round function of XXH64 and processes a stripe,\n   * i.e. 4 lanes with 8 bytes each.\n   */\n  XXH64_rounds : [4][64] -> [32][8] -> [4][64]\n  XXH64_rounds accs stripe =\n    [ XXH64_round accN (toLE laneN) | accN <- accs | laneN <- split stripe ]\n\n  /**\n   * This is a helper function, used to merge the four lane accumulators.\n   */\n  mergeAccumulator : [64] -> [64] -> [64]\n  mergeAccumulator acc accN = (acc ^ XXH64_round 0 accN) * PRIME64_1 + PRIME64_4\n\n  /**\n   * This function combines the four lane accumulators into a single\n   * 64-bit value.\n   */\n  XXH64_converge : [4][64] -> [64]\n  XXH64_converge [acc1, acc2, acc3, acc4] =\n    foldl mergeAccumulator ((acc1 <<< 1) + (acc2 <<< 7) + (acc3 <<< 12) + (acc4 <<< 18)) [acc1, acc2, acc3, acc4]\n\n  /**\n   * This function digests an eight byte lane\n   */\n  XXH64_digest8 : [64] -> [8][8] -> [64]\n  XXH64_digest8 acc lane = ((acc ^ XXH64_round 0 (toLE lane)) <<< 27) * PRIME64_1 + PRIME64_4\n\n  /**\n   * This function digests a four byte lane\n   */\n  XXH64_digest4 : [64] -> [4][8] -> [64]\n  XXH64_digest4 acc lane = ((acc ^ (0 # toLE lane) * PRIME64_1) <<< 23) * PRIME64_2 + PRIME64_3\n\n  /**\n   * This function digests a single byte lane\n   */\n  XXH64_digest1 : [64] -> [8] -> [64]\n  XXH64_digest1 acc lane = ((acc ^ (0 # lane) * PRIME64_5) <<< 11) * PRIME64_1\n\n  /**\n   * This function ensures that all input bits have a chance to impact\n   * any bit in the output digest, resulting in an unbiased\n   * distribution.\n   */\n  XXH64_avalanche : [64] -> [64]\n  XXH64_avalanche acc0 = acc5\n    where acc1 = acc0 ^ (acc0 >> 33)\n          acc2 = acc1 * PRIME64_2\n          acc3 = acc2 ^ (acc2 >> 29)\n          acc4 = acc3 * PRIME64_3\n          acc5 = acc4 ^ (acc4 >> 32)\n"
  },
  {
    "path": "third-party/xxhash/doc/xxhash_spec.md",
    "content": "xxHash fast digest algorithm\n======================\n\n### Notices\n\nCopyright (c) Yann Collet\n\nPermission is granted to copy and distribute this document\nfor any purpose and without charge,\nincluding translations into other languages\nand incorporation into compilations,\nprovided that the copyright notice and this notice are preserved,\nand that any substantive changes or deletions from the original\nare clearly marked.\nDistribution of this document is unlimited.\n\n### Version\n\n0.2.0 (29/06/23)\n\n\nTable of Contents\n---------------------\n- [Introduction](#introduction)\n- [XXH32 algorithm description](#xxh32-algorithm-description)\n- [XXH64 algorithm description](#xxh64-algorithm-description)\n- [XXH3 algorithm description](#xxh3-algorithm-overview)\n   - [Small inputs](#xxh3-algorithm-description-for-small-inputs)\n   - [Medium inputs](#xxh3-algorithm-description-for-medium-inputs)\n   - [Large inputs](#xxh3-algorithm-description-for-large-inputs)\n- [Performance considerations](#performance-considerations)\n- [Reference Implementation](#reference-implementation)\n\n\nIntroduction\n----------------\n\nThis document describes the xxHash digest algorithm for both 32-bit and 64-bit variants, named `XXH32` and `XXH64`. The algorithm takes an input a message of arbitrary length and an optional seed value, then produces an output of 32 or 64-bit as \"fingerprint\" or \"digest\".\n\nxxHash is primarily designed for speed. It is labeled non-cryptographic, and is not meant to avoid intentional collisions (same digest for 2 different messages), or to prevent producing a message with a predefined digest.\n\nXXH32 is designed to be fast on 32-bit machines.\nXXH64 is designed to be fast on 64-bit machines.\nBoth variants produce different output.\nHowever, a given variant shall produce exactly the same output, irrespective of the cpu / os used. In particular, the result remains identical whatever the endianness and width of the cpu is.\n\n### Operation notations\n\nAll operations are performed modulo {32,64} bits. Arithmetic overflows are expected.\n`XXH32` uses 32-bit modular operations.\n`XXH64` and `XXH3` use 64-bit modular operations.\nWhen an operation ingests input or secret as multi-bytes values, it reads it using little-endian convention.\n\n- `+`: denotes modular addition\n- `-`: denotes modular subtraction\n- `*`: denotes modular multiplication\n    - **Exception:** In `XXH3`, if it is in the form `(u128)x * (u128)y`, it denotes 64-bit by 64-bit normal multiplication into a full 128-bit result.\n- `X <<< s`: denotes the value obtained by circularly shifting (rotating) `X` left by `s` bit positions.\n- `X >> s`: denotes the value obtained by shifting `X` right by s bit positions. Upper `s` bits become `0`.\n- `X << s`: denotes the value obtained by shifting `X` left by s bit positions. Lower `s` bits become `0`.\n- `X xor Y`: denotes the bit-wise XOR of `X` and `Y` (same width).\n- `X | Y`: denotes the bit-wise OR of `X` and `Y` (same width).\n- `~X`: denotes the bit-wise negation of `X`.\n\n\nXXH32 Algorithm Description\n-------------------------------------\n\n### Overview\n\nWe begin by supposing that we have a message of any length `L` as input, and that we wish to find its digest. Here `L` is an arbitrary nonnegative integer; `L` may be zero. The following steps are performed to compute the digest of the message.\n\nThe algorithm collect and transform input in _stripes_ of 16 bytes. The transforms are stored inside 4 \"accumulators\", each one storing an unsigned 32-bit value. Each accumulator can be processed independently in parallel, speeding up processing for cpu with multiple execution units.\n\nThe algorithm uses 32-bits addition, multiplication, rotate, shift and xor operations. Many operations require some 32-bits prime number constants, all defined below:\n\n```c\n  static const u32 PRIME32_1 = 0x9E3779B1U;  // 0b10011110001101110111100110110001\n  static const u32 PRIME32_2 = 0x85EBCA77U;  // 0b10000101111010111100101001110111\n  static const u32 PRIME32_3 = 0xC2B2AE3DU;  // 0b11000010101100101010111000111101\n  static const u32 PRIME32_4 = 0x27D4EB2FU;  // 0b00100111110101001110101100101111\n  static const u32 PRIME32_5 = 0x165667B1U;  // 0b00010110010101100110011110110001\n```\n\nThese constants are prime numbers, and feature a good mix of bits 1 and 0, neither too regular, nor too dissymmetric. These properties help dispersion capabilities.\n\n### Step 1. Initialize internal accumulators\n\nEach accumulator gets an initial value based on optional `seed` input. Since the `seed` is optional, it can be `0`.\n\n```c\n  u32 acc1 = seed + PRIME32_1 + PRIME32_2;\n  u32 acc2 = seed + PRIME32_2;\n  u32 acc3 = seed + 0;\n  u32 acc4 = seed - PRIME32_1;\n```\n\n#### Special case: input is less than 16 bytes\n\nWhen the input is too small (< 16 bytes), the algorithm will not process any stripes. Consequently, it will not make use of parallel accumulators.\n\nIn this case, a simplified initialization is performed, using a single accumulator:\n\n```c\n  u32 acc  = seed + PRIME32_5;\n```\n\nThe algorithm then proceeds directly to step 4.\n\n### Step 2. Process stripes\n\nA stripe is a contiguous segment of 16 bytes.\nIt is evenly divided into 4 _lanes_, of 4 bytes each.\nThe first lane is used to update accumulator 1, the second lane is used to update accumulator 2, and so on.\n\nEach lane read its associated 32-bit value using __little-endian__ convention.\n\nFor each {lane, accumulator}, the update process is called a _round_, and applies the following formula:\n\n```c\n  accN = accN + (laneN * PRIME32_2);\n  accN = accN <<< 13;\n  accN = accN * PRIME32_1;\n```\n\nThis shuffles the bits so that any bit from input _lane_ impacts several bits in output _accumulator_. All operations are performed modulo 2^32.\n\nInput is consumed one full stripe at a time. Step 2 is looped as many times as necessary to consume the whole input, except for the last remaining bytes which cannot form a stripe (< 16 bytes).\nWhen that happens, move to step 3.\n\n### Step 3. Accumulator convergence\n\nAll 4 lane accumulators from the previous steps are merged to produce a single remaining accumulator of the same width (32-bit). The associated formula is as follows:\n\n```c\n  acc = (acc1 <<< 1) + (acc2 <<< 7) + (acc3 <<< 12) + (acc4 <<< 18);\n```\n\n### Step 4. Add input length\n\nThe input total length is presumed known at this stage. This step is just about adding the length to accumulator, so that it participates to final mixing.\n\n```c\n  acc = acc + (u32)inputLength;\n```\n\nNote that, if input length is so large that it requires more than 32-bits, only the lower 32-bits are added to the accumulator.\n\n### Step 5. Consume remaining input\n\nThere may be up to 15 bytes remaining to consume from the input.\nThe final stage will digest them according to following pseudo-code:\n\n```c\n  while (remainingLength >= 4) {\n      lane = read_32bit_little_endian(input_ptr);\n      acc = acc + lane * PRIME32_3;\n      acc = (acc <<< 17) * PRIME32_4;\n      input_ptr += 4; remainingLength -= 4;\n  }\n\n  while (remainingLength >= 1) {\n      lane = read_byte(input_ptr);\n      acc = acc + lane * PRIME32_5;\n      acc = (acc <<< 11) * PRIME32_1;\n      input_ptr += 1; remainingLength -= 1;\n  }\n```\n\nThis process ensures that all input bytes are present in the final mix.\n\n### Step 6. Final mix (avalanche)\n\nThe final mix ensures that all input bits have a chance to impact any bit in the output digest, resulting in an unbiased distribution. This is also called avalanche effect.\n\n```c\n  acc = acc xor (acc >> 15);\n  acc = acc * PRIME32_2;\n  acc = acc xor (acc >> 13);\n  acc = acc * PRIME32_3;\n  acc = acc xor (acc >> 16);\n```\n\n### Step 7. Output\n\nThe `XXH32()` function produces an unsigned 32-bit value as output.\n\nFor systems which require to store and/or display the result in binary or hexadecimal format, the canonical format is defined to reproduce the same value as the natural decimal format, hence follows __big-endian__ convention (most significant byte first).\n\n\nXXH64 Algorithm Description\n-------------------------------------\n\n### Overview\n\n`XXH64`'s algorithm structure is very similar to `XXH32` one. The major difference is that `XXH64` uses 64-bit arithmetic, speeding up memory transfer for 64-bit compliant systems, but also relying on cpu capability to efficiently perform 64-bit operations.\n\nThe algorithm collects and transforms input in _stripes_ of 32 bytes. The transforms are stored inside 4 \"accumulators\", each one storing an unsigned 64-bit value. Each accumulator can be processed independently in parallel, speeding up processing for cpu with multiple execution units.\n\nThe algorithm uses 64-bit addition, multiplication, rotate, shift and xor operations. Many operations require some 64-bit prime number constants, all defined below:\n\n```c\n  static const u64 PRIME64_1 = 0x9E3779B185EBCA87ULL;  // 0b1001111000110111011110011011000110000101111010111100101010000111\n  static const u64 PRIME64_2 = 0xC2B2AE3D27D4EB4FULL;  // 0b1100001010110010101011100011110100100111110101001110101101001111\n  static const u64 PRIME64_3 = 0x165667B19E3779F9ULL;  // 0b0001011001010110011001111011000110011110001101110111100111111001\n  static const u64 PRIME64_4 = 0x85EBCA77C2B2AE63ULL;  // 0b1000010111101011110010100111011111000010101100101010111001100011\n  static const u64 PRIME64_5 = 0x27D4EB2F165667C5ULL;  // 0b0010011111010100111010110010111100010110010101100110011111000101\n```\n\nThese constants are prime numbers, and feature a good mix of bits 1 and 0, neither too regular, nor too dissymmetric. These properties help dispersion capabilities.\n\n### Step 1. Initialize internal accumulators\n\nEach accumulator gets an initial value based on optional `seed` input. Since the `seed` is optional, it can be `0`.\n\n```c\n  u64 acc1 = seed + PRIME64_1 + PRIME64_2;\n  u64 acc2 = seed + PRIME64_2;\n  u64 acc3 = seed + 0;\n  u64 acc4 = seed - PRIME64_1;\n```\n\n#### Special case: input is less than 32 bytes\n\nWhen the input is too small (< 32 bytes), the algorithm will not process any stripes. Consequently, it will not make use of parallel accumulators.\n\nIn this case, a simplified initialization is performed, using a single accumulator:\n\n```c\n  u64 acc  = seed + PRIME64_5;\n```\n\nThe algorithm then proceeds directly to step 4.\n\n### Step 2. Process stripes\n\nA stripe is a contiguous segment of 32 bytes.\nIt is evenly divided into 4 _lanes_, of 8 bytes each.\nThe first lane is used to update accumulator 1, the second lane is used to update accumulator 2, and so on.\n\nEach lane read its associated 64-bit value using __little-endian__ convention.\n\nFor each {lane, accumulator}, the update process is called a _round_, and applies the following formula:\n\n```c\nround(accN,laneN):\n  accN = accN + (laneN * PRIME64_2);\n  accN = accN <<< 31;\n  return accN * PRIME64_1;\n```\n\nThis shuffles the bits so that any bit from input _lane_ impacts several bits in output _accumulator_. All operations are performed modulo 2^64.\n\nInput is consumed one full stripe at a time. Step 2 is looped as many times as necessary to consume the whole input, except for the last remaining bytes which cannot form a stripe (< 32 bytes).\nWhen that happens, move to step 3.\n\n### Step 3. Accumulator convergence\n\nAll 4 lane accumulators from previous steps are merged to produce a single remaining accumulator of same width (64-bit). The associated formula is as follows.\n\nNote that accumulator convergence is more complex than 32-bit variant, and requires to define another function called _mergeAccumulator()_:\n\n```c\nmergeAccumulator(acc,accN):\n  acc  = acc xor round(0, accN);\n  acc  = acc * PRIME64_1;\n  return acc + PRIME64_4;\n```\n\nwhich is then used in the convergence formula:\n\n```c\n  acc = (acc1 <<< 1) + (acc2 <<< 7) + (acc3 <<< 12) + (acc4 <<< 18);\n  acc = mergeAccumulator(acc, acc1);\n  acc = mergeAccumulator(acc, acc2);\n  acc = mergeAccumulator(acc, acc3);\n  acc = mergeAccumulator(acc, acc4);\n```\n\n### Step 4. Add input length\n\nThe input total length is presumed known at this stage. This step is just about adding the length to accumulator, so that it participates to final mixing.\n\n```c\n  acc = acc + inputLength;\n```\n\n### Step 5. Consume remaining input\n\nThere may be up to 31 bytes remaining to consume from the input.\nThe final stage will digest them according to following pseudo-code:\n\n```c\n  while (remainingLength >= 8) {\n      lane = read_64bit_little_endian(input_ptr);\n      acc = acc xor round(0, lane);\n      acc = (acc <<< 27) * PRIME64_1;\n      acc = acc + PRIME64_4;\n      input_ptr += 8; remainingLength -= 8;\n  }\n\n  if (remainingLength >= 4) {\n      lane = read_32bit_little_endian(input_ptr);\n      acc = acc xor (lane * PRIME64_1);\n      acc = (acc <<< 23) * PRIME64_2;\n      acc = acc + PRIME64_3;\n      input_ptr += 4; remainingLength -= 4;\n  }\n\n  while (remainingLength >= 1) {\n      lane = read_byte(input_ptr);\n      acc = acc xor (lane * PRIME64_5);\n      acc = (acc <<< 11) * PRIME64_1;\n      input_ptr += 1; remainingLength -= 1;\n  }\n```\n\nThis process ensures that all input bytes are present in the final mix.\n\n### Step 6. Final mix (avalanche)\n\nThe final mix ensures that all input bits have a chance to impact any bit in the output digest, resulting in an unbiased distribution. This is also called avalanche effect.\n\n```c\n  acc = acc xor (acc >> 33);\n  acc = acc * PRIME64_2;\n  acc = acc xor (acc >> 29);\n  acc = acc * PRIME64_3;\n  acc = acc xor (acc >> 32);\n```\n\n### Step 7. Output\n\nThe `XXH64()` function produces an unsigned 64-bit value as output.\n\nFor systems which require to store and/or display the result in binary or hexadecimal format, the canonical format is defined to reproduce the same value as the natural decimal format, hence follows __big-endian__ convention (most significant byte first).\n\nXXH3 Algorithm Overview\n-------------------------------------\n\nXXH3 comes in two different versions: XXH3-64 and XXH3-128 (or XXH128), producing 64 and 128 bits of output, respectively.\n\nXXH3 uses different algorithms for small (0-16 bytes), medium (17-240 bytes), and large (241+ bytes) inputs. The algorithms for small and medium inputs are optimized for performance. The three algorithms are described in the following sections.\n\nMany operations require some 64-bit prime number constants, which are mostly the same constants used in XXH32 and XXH64, all defined below:\n\n```c\n  static const u64 PRIME32_1 = 0x9E3779B1U;  // 0b10011110001101110111100110110001\n  static const u64 PRIME32_2 = 0x85EBCA77U;  // 0b10000101111010111100101001110111\n  static const u64 PRIME32_3 = 0xC2B2AE3DU;  // 0b11000010101100101010111000111101\n  static const u64 PRIME64_1 = 0x9E3779B185EBCA87ULL;  // 0b1001111000110111011110011011000110000101111010111100101010000111\n  static const u64 PRIME64_2 = 0xC2B2AE3D27D4EB4FULL;  // 0b1100001010110010101011100011110100100111110101001110101101001111\n  static const u64 PRIME64_3 = 0x165667B19E3779F9ULL;  // 0b0001011001010110011001111011000110011110001101110111100111111001\n  static const u64 PRIME64_4 = 0x85EBCA77C2B2AE63ULL;  // 0b1000010111101011110010100111011111000010101100101010111001100011\n  static const u64 PRIME64_5 = 0x27D4EB2F165667C5ULL;  // 0b0010011111010100111010110010111100010110010101100110011111000101\n  static const u64 PRIME_MX1 = 0x165667919E3779F9ULL;  // 0b0001011001010110011001111001000110011110001101110111100111111001\n  static const u64 PRIME_MX2 = 0x9FB21C651E98DF25ULL;  // 0b1001111110110010000111000110010100011110100110001101111100100101\n```\n\nThe `XXH3_64bits()` function produces an unsigned 64-bit value.\nThe `XXH3_128bits()` function produces a `XXH128_hash_t` struct containing `low64` and `high64` - the lower and higher 64-bit half values of the result, respectively.\n\nFor systems requiring storing and/or displaying the result in binary or hexadecimal format, the canonical format is defined to reproduce the same value as the natural decimal format, hence following **big-endian** convention (most significant byte first).\n\n### Seed and Secret\n\nXXH3 provides seeded hashing by introducing two configurable constants used in the hashing process: the seed and the secret. The seed is an unsigned 64-bit value, and the secret is an array of bytes that is at least 136 bytes in size. The default seed is 0, and the default secret is the following 192-byte value:\n\n```c\nstatic const u8 defaultSecret[192] = {\n  0xb8, 0xfe, 0x6c, 0x39, 0x23, 0xa4, 0x4b, 0xbe, 0x7c, 0x01, 0x81, 0x2c, 0xf7, 0x21, 0xad, 0x1c,\n  0xde, 0xd4, 0x6d, 0xe9, 0x83, 0x90, 0x97, 0xdb, 0x72, 0x40, 0xa4, 0xa4, 0xb7, 0xb3, 0x67, 0x1f,\n  0xcb, 0x79, 0xe6, 0x4e, 0xcc, 0xc0, 0xe5, 0x78, 0x82, 0x5a, 0xd0, 0x7d, 0xcc, 0xff, 0x72, 0x21,\n  0xb8, 0x08, 0x46, 0x74, 0xf7, 0x43, 0x24, 0x8e, 0xe0, 0x35, 0x90, 0xe6, 0x81, 0x3a, 0x26, 0x4c,\n  0x3c, 0x28, 0x52, 0xbb, 0x91, 0xc3, 0x00, 0xcb, 0x88, 0xd0, 0x65, 0x8b, 0x1b, 0x53, 0x2e, 0xa3,\n  0x71, 0x64, 0x48, 0x97, 0xa2, 0x0d, 0xf9, 0x4e, 0x38, 0x19, 0xef, 0x46, 0xa9, 0xde, 0xac, 0xd8,\n  0xa8, 0xfa, 0x76, 0x3f, 0xe3, 0x9c, 0x34, 0x3f, 0xf9, 0xdc, 0xbb, 0xc7, 0xc7, 0x0b, 0x4f, 0x1d,\n  0x8a, 0x51, 0xe0, 0x4b, 0xcd, 0xb4, 0x59, 0x31, 0xc8, 0x9f, 0x7e, 0xc9, 0xd9, 0x78, 0x73, 0x64,\n  0xea, 0xc5, 0xac, 0x83, 0x34, 0xd3, 0xeb, 0xc3, 0xc5, 0x81, 0xa0, 0xff, 0xfa, 0x13, 0x63, 0xeb,\n  0x17, 0x0d, 0xdd, 0x51, 0xb7, 0xf0, 0xda, 0x49, 0xd3, 0x16, 0x55, 0x26, 0x29, 0xd4, 0x68, 0x9e,\n  0x2b, 0x16, 0xbe, 0x58, 0x7d, 0x47, 0xa1, 0xfc, 0x8f, 0xf8, 0xb8, 0xd1, 0x7a, 0xd0, 0x31, 0xce,\n  0x45, 0xcb, 0x3a, 0x8f, 0x95, 0x16, 0x04, 0x28, 0xaf, 0xd7, 0xfb, 0xca, 0xbb, 0x4b, 0x40, 0x7e,\n};\n```\n\nThe seed and the secret can be optionally specified using the `*_withSecret` and `*_withSeed` versions of the hash function.\n\nThe seed and the secret cannot be specified simultaneously (`*_withSecretAndSeed` is actually `*_withSeed` for short and medium inputs <= 240 bytes, and `*_withSecret` for large inputs). When one is specified, the other one uses the default value.\nThere is one exception though: when input is large (> 240 bytes) and a seed is given, a secret is derived from the seed value and the default secret using the following procedure:\n\n```c\nderiveSecret(u64 seed):\n  u64 derivedSecret[24] = defaultSecret[0:192];\n  for (i = 0; i < 12; i++) {\n    derivedSecret[i*2] += seed;\n    derivedSecret[i*2+1] -= seed;\n  }\n  return derivedSecret; // convert to u8[192] (little-endian)\n```\n\nThe derivation treats the secrets as 24 64-bit values. In XXH3 algorithms, the secret is always read similarly by treating a contiguous segment of the array as one or more 32-bit or 64-bit values. **The secret values are always read using little-endian convention**.\n\n### Final Mixing Step (avalanche)\n\nTo make sure that all input bits have a chance to impact any bit in the output digest (avalanche effect), the final step of the XXH3 algorithm is usually one of the two fixed operations that mix the bits in a 64-bit value. These operations are denoted `avalanche()` and `avalanche_XXH64()` in the following XXH3 description.\n\n```c\navalanche(u64 x):\n  x = x xor (x >> 37);\n  x = x * PRIME_MX1;\n  x = x xor (x >> 32);\n  return x;\n\navalanche_XXH64(u64 x):\n  x = x xor (x >> 33);\n  x = x * PRIME64_2;\n  x = x xor (x >> 29);\n  x = x * PRIME64_3;\n  x = x xor (x >> 32);\n  return x;\n```\n\nXXH3 Algorithm Description (for small inputs)\n-------------------------------------\n\nThe algorithm for small inputs (0-16 bytes of input) is further divided into 4 cases: empty, 1-3 bytes, 4-8 bytes, and 9-16 bytes of input.\n\nThe algorithm uses byte-swap operations. The byte-swap operation reverses the byte order in a 32-bit or 64-bit value. It is denoted `bswap32` and `bswap64` for its 32-bit and 64-bit versions, respectively.\n\n### Empty input\n\nThe hash of empty input is calculated from the seed and a segment of the secret:\n\n```c\nXXH3_64_empty():\n  u64 secretWords[2] = secret[56:72];\n  return avalanche_XXH64(seed xor secretWords[0] xor secretWords[1]);\n\nXXH3_128_empty():\n  u64 secretWords[4] = secret[64:96];\n  return {avalanche_XXH64(seed xor secretWords[0] xor secretWords[1]), // lower half\n          avalanche_XXH64(seed xor secretWords[2] xor secretWords[3])}; // higher half\n```\n\n### 1-3 bytes of input\n\nThe algorithm starts from a single 32-bit value combining the input bytes and its length:\n\n```c\nu32 combined = (u32)input[inputLength-1] | ((u32)inputLength << 8) |\n               ((u32)input[0] << 16) | ((u32)input[inputLength>>1] << 24);\n// LSB          8       16           24                    MSB\n//  | last byte | length | first byte | middle-or-last byte |\n```\n\nThen the final output is calculated from the value and the first 8 bytes (XXH3-64) or 16 bytes (XXH3-128) of the secret to produce the final result. The secret here is read as 32-bit values instead of the usual 64-bit values.\n\n```c\nXXH3_64_1to3():\n  u32 secretWords[2] = secret[0:8];\n  u64 value = ((u64)(secretWords[0] xor secretWords[1]) + seed) xor (u64)combined;\n  return avalanche_XXH64(value);\n\nXXH3_128_1to3():\n  u32 secretWords[4] = secret[0:16];\n  u64 low = ((u64)(secretWords[0] xor secretWords[1]) + seed) xor (u64)combined;\n  u64 high = ((u64)(secretWords[2] xor secretWords[3]) - seed) xor (u64)(bswap32(combined) <<< 13);\n  // note that the bswap32(combined) <<< 13 above is 32-bit rotate\n  return {avalanche_XXH64(low), // lower half\n          avalanche_XXH64(high)}; // higher half\n```\n\nNote that the XXH3-64 result is the lower half of XXH3-128 result.\n\n### 4-8 bytes of input\n\nThe algorithm starts from reading the first and last 4 bytes of the input as little-endian 32-bit values, and a modified seed:\n\n```c\nu32 inputFirst = input[0:4];\nu32 inputLast = input[inputLength-4:inputLength];\nu64 modifiedSeed = seed xor ((u64)bswap32((u32)lowerHalf(seed)) << 32);\n```\n\nAgain, these values are combined with a segment of the secret to produce the final value.\n\n```c\nXXH3_64_4to8():\n  u64 secretWords[2] = secret[8:24];\n  u64 combined = (u64)inputLast | ((u64)inputFirst << 32);\n  u64 value = ((secretWords[0] xor secretWords[1]) - modifiedSeed) xor combined;\n  value = value xor (value <<< 49) xor (value <<< 24);\n  value = value * PRIME_MX2;\n  value = value xor ((value >> 35) + inputLength);\n  value = value * PRIME_MX2;\n  value = value xor (value >> 28);\n  return value;\n\nXXH3_128_4to8():\n  u64 secretWords[2] = secret[16:32];\n  u64 combined = (u64)inputFirst | ((u64)inputLast << 32);\n  u64 value = ((secretWords[0] xor secretWords[1]) + modifiedSeed) xor combined;\n  u128 mulResult = (u128)value * (u128)(PRIME64_1 + (inputLength << 2));\n  u64 high = higherHalf(mulResult); // mulResult >> 64\n  u64 low = lowerHalf(mulResult); // mulResult & 0xFFFFFFFFFFFFFFFF\n  high = high + (low << 1);\n  low = low xor (high >> 3);\n  low = low xor (low >> 35);\n  low = low * PRIME_MX2;\n  low = low xor (low >> 28);\n  high = avalanche(high);\n  return {low, high};\n```\n\n### 9-16 bytes of input\n\nThe algorithm starts from reading the first and last 8 bytes of the input as little-endian 64-bit values:\n\n```c\nu64 inputFirst = input[0:8];\nu64 inputLast = input[inputLength-8:inputLength];\n```\n\nOnce again, these values are combined with a segment of the secret to produce the final value.\n\n```c\nXXH3_64_9to16():\n  u64 secretWords[4] = secret[24:56];\n  u64 low = ((secretWords[0] xor secretWords[1]) + seed) xor inputFirst;\n  u64 high = ((secretWords[2] xor secretWords[3]) - seed) xor inputLast;\n  u128 mulResult = (u128)low * (u128)high;\n  u64 value = inputLength + bswap64(low) + high + (u64)(lowerHalf(mulResult) xor higherHalf(mulResult));\n  return avalanche(value);\n\nXXH3_128_9to16():\n  u64 secretWords[4] = secret[32:64];\n  u64 val1 = ((secretWords[0] xor secretWords[1]) - seed) xor inputFirst xor inputLast;\n  u64 val2 = ((secretWords[2] xor secretWords[3]) + seed) xor inputLast;\n  u128 mulResult = (u128)val1 * (u128)PRIME64_1;\n  u64 low = lowerHalf(mulResult) + ((u64)(inputLength - 1) << 54);\n  u64 high = higherHalf(mulResult) + ((u64)higherHalf(val2) << 32) + (u64)lowerHalf(val2) * PRIME32_2;\n  // the above line can also be simplified to higherHalf(mulResult) + val2 + (u64)lowerHalf(val2) * (PRIME32_2 - 1);\n  low = low xor bswap64(high);\n  // the following three lines are in fact a 128x64 -> 128 multiplication ({low,high} = (u128){low,high} * PRIME64_2)\n  u128 mulResult2 = (u128)low * (u128)PRIME64_2;\n  low = lowerHalf(mulResult2);\n  high = higherHalf(mulResult2) + high * PRIME64_2;\n  return {avalanche(low), // lower half\n          avalanche(high)}; // higher half\n```\n\n\nXXH3 Algorithm Description (for medium inputs)\n-------------------------------------\n\nThis algorithm is used for medium inputs (17-240 bytes of input). Its internal hash state is stored inside 1 (XXH3-64) or 2 (XXH3-128) \"accumulators\", each storing an unsigned 64-bit value.\n\n### Step 1. Initialize internal accumulators\n\nThe accumulator(s) are initialized based on the input length.\n\n```c\n// For XXH3-64\nu64 acc = inputLength * PRIME64_1;\n\n// For XXH3-128\nu64 acc[2] = {inputLength * PRIME64_1, 0};\n```\n\n### Step 2. Process the input\n\nThis step is further divided into two cases: one for 17-128 bytes of input, and one for 129-240 bytes of input.\n\n#### Mixing operation\n\nThis step uses a mixing operation that mixes a 16-byte segment of data, a 16-byte segment of secret and the seed into a 64-bit value as a building block. This operation treat the segment of data and secret as little-endian 64-bit values.\n\n```c\nmixStep(u8 data[16], size secretOffset, u64 seed):\n  u64 dataWords[2] = data[0:16];\n  u64 secretWords[2] = secret[secretOffset:secretOffset+16];\n  u128 mulResult = (u128)(dataWords[0] xor (secretWords[0] + seed)) *\n                   (u128)(dataWords[1] xor (secretWords[1] - seed));\n  return lowerHalf(mulResult) xor higherHalf(mulResult);\n```\n\nThe mixing operation is always invoked in groups of two in XXH3-128, where two 16-byte segments of data are mixed with a 32-byte segment of secret, and the accumulators are updated accordingly.\n\n```c\nmixTwoChunks(u8 data1[16], u8 data2[16], size secretOffset, u64 seed):\n  u64 dataWords1[2] = data1[0:16]; // again, little-endian conversion\n  u64 dataWords2[2] = data2[0:16];\n  acc[0] = acc[0] + mixStep(data1, secretOffset, seed);\n  acc[1] = acc[1] + mixStep(data2, secretOffset + 16, seed);\n  acc[0] = acc[0] xor (dataWords2[0] + dataWords2[1]);\n  acc[1] = acc[1] xor (dataWords1[0] + dataWords1[1]);\n```\n\nThe input is split into several 16-byte chunks and mixed, and the result is added to the accumulator(s).\n\n#### 17-128 bytes of input\n\nThe input is read as *N* 16-byte chunks starting from the beginning and *N* chunks starting from the end, where *N* is the smallest number that these 2*N* chunks cover the whole input. These chunks are paired up and mixed, and the results are accumulated to the accumulator(s).\n\n```c\n// the loop variable `i` should be signed to avoid underflow in implementation\nprocessInput_XXH3_64_17to128():\n  u64 numRounds = ((inputLength - 1) >> 5) + 1;\n  for (i = numRounds - 1; i >= 0; i--) {\n    size offsetStart = i*16;\n    size offsetEnd = inputLength - i*16 - 16;\n    acc += mixStep(input[offsetStart:offsetStart+16], i*32, seed);\n    acc += mixStep(input[offsetEnd:offsetEnd+16], i*32+16, seed);\n  }\n\nprocessInput_XXH3_128_17to128():\n  u64 numRounds = ((inputLength - 1) >> 5) + 1;\n  for (i = numRounds - 1; i >= 0; i--) {\n    size offsetStart = i*16;\n    size offsetEnd = inputLength - i*16 - 16;\n    mixTwoChunks(input[offsetStart:offsetStart+16], input[offsetEnd:offsetEnd+16], i*32, seed);\n  }\n```\n\n#### 129-240 bytes of input\n\nThe input is split into 16-byte (XXH3-64) or 32-byte (XXH3-128) chunks. The first 128 bytes are first mixed chunk by chunk, followed by an intermediate avalanche operation. Then the remaining full chunks are processed, and finally the last 16/32 bytes are treated as a chunk to process.\n\n```c\nprocessInput_XXH3_64_129to240():\n  u64 numChunks = inputLength >> 4;\n  for (i = 0; i < 8; i++) {\n    acc += mixStep(input[i*16:i*16+16], i*16, seed);\n  }\n  acc = avalanche(acc);\n  for (i = 8; i < numChunks; i++) {\n    acc += mixStep(input[i*16:i*16+16], (i-8)*16 + 3, seed);\n  }\n  acc += mixStep(input[inputLength-16:inputLength], 119, seed);\n\nprocessInput_XXH3_128_129to240():\n  u64 numChunks = inputLength >> 5;\n  for (i = 0; i < 4; i++) {\n    mixTwoChunks(input[i*32:i*32+16], input[i*32+16:i*32+32], i*32, seed);\n  }\n  acc[0] = avalanche(acc[0]);\n  acc[1] = avalanche(acc[1]);\n  for (i = 4; i < numChunks; i++) {\n    mixTwoChunks(input[i*32:i*32+16], input[i*32+16:i*32+32], (i-4)*32 + 3, seed);\n  }\n  // note that the half-chunk order and the seed is different here\n  mixTwoChunks(input[inputLength-16:inputLength], input[inputLength-32:inputLength-16], 103, (u64)0 - seed);\n```\n\n### Step 3. Finalization\n\nThe final result is extracted from the accumulator(s).\n\n```c\nXXH3_64_17to240():\n  return avalanche(acc);\n\nXXH3_128_17to240():\n  u64 low = acc[0] + acc[1];\n  u64 high = (acc[0] * PRIME64_1) + (acc[1] * PRIME64_4) + (((u64)inputLength - seed) * PRIME64_2);\n  return {avalanche(low), // lower half\n          (u64)0 - avalanche(high)}; // higher half\n```\n\nXXH3 Algorithm Description (for large inputs)\n-------------------------------------\n\nThis algorithm is used for inputs larger than 240 bytes. The internal hash state is stored inside 8 \"accumulators\", each one storing an unsigned 64-bit value.\n\n### Step 1. Initialize internal accumulators\n\nThe accumulators are initialized to fixed constants:\n\n```c\nu64 acc[8] = {\n  PRIME32_3, PRIME64_1, PRIME64_2, PRIME64_3,\n  PRIME64_4, PRIME32_2, PRIME64_5, PRIME32_1};\n```\n\n### Step 2. Process blocks\n\nThe input is consumed and processed one full block at a time. The size of the block depends on the length of the secret. Specifically, a block consists of several 64-byte stripes. The number of stripes per block is `floor((secretLength-64)/8)` . For the default 192-byte secret, there are 16 stripes in a block, and thus the block size is 1024 bytes.\n\n```c\nsecretLength = lengthInBytes(secret);    // default 192; at least 136\nstripesPerBlock = (secretLength-64) / 8; // default 16; at least 9\nblockSize = 64 * stripesPerBlock;        // default 1024; at least 576\n```\n\nThe process of processing a full block is called a *round*. It consists of the following two sub-steps:\n\n#### Step 2-1. Process stripes in the block\n\nA stripe is evenly divided into 8 lanes, of 8 bytes each. In an accumulation step, one stripe and a 64-byte contiguous segment of the secret are used to update the accumulators. Each lane reads its associated 64-bit value using little-endian convention.\n\nThe accumulation step applies the following procedure:\n\n```c\naccumulate(u64 stripe[8], size secretOffset):\n  u64 secretWords[8] = secret[secretOffset:secretOffset+64];\n  for (i = 0; i < 8; i++) {\n    u64 value = stripe[i] xor secretWords[i];\n    acc[i xor 1] = acc[i xor 1] + stripe[i];\n    acc[i] = acc[i] + (u64)lowerHalf(value) * (u64)higherHalf(value);\n                      // (value and 0xFFFFFFFF) * (value >> 32)\n  }\n```\n\nThe accumulation step is repeated for all stripes in a block, using different segments of the secret, starting from the first 64 bytes for the first stripe, and offset by 8 bytes for each following round:\n\n```c\nround_accumulate(u8 block[blockSize]):\n  for (n = 0; n < stripesPerBlock; n++) {\n    u64 stripe[8] = block[n*64:n*64+64]; // 64 bytes = 8 u64s\n    accumulate(stripe, n*8);\n  }\n```\n\n#### Step 2-2. Scramble accumulators\n\nAfter the accumulation steps are finished for all stripes in the block, the accumulators are scrambled using the last 64 bytes of the secret.\n\n```c\nround_scramble():\n  u64 secretWords[8] = secret[secretLength-64:secretLength];\n  for (i = 0; i < 8; i++) {\n    acc[i] = acc[i] xor (acc[i] >> 47);\n    acc[i] = acc[i] xor secretWords[i];\n    acc[i] = acc[i] * PRIME32_1;\n  }\n```\n\nA round is thus a `round_accumulate` followed by a `round_scramble`:\n\n```c\nround(u8 block[blockSize]):\n  round_accumulate(block);\n  round_scramble();\n```\n\nStep 2 is looped to consume the input until there are less than or equal to `blockSize` bytes of input left. Note that we leave the last block to the next step even if it is a full block.\n\n### Step 3. Process the last block and the last 64 bytes\n\nAccumulation steps are run for the stripes in the last block, except for the last stripe (whether it is full or not). After that, run a final accumulation step by treating the last 64 bytes as a stripe. Note that the last 64 bytes might overlap with the second-to-last block.\n\n```c\n// len is the size of the last block (1 <= len <= blockSize)\nlastRound(u8 block[], size len, u64 lastStripe[8]):\n  size nFullStripes = (len-1)/64;\n  for (n = 0; n < nFullStripes; n++) {\n    u64 stripe[8] = block[n*64:n*64+64];\n    accumulate(stripe, n * 8);\n  }\n  accumulate(lastStripe, secretLength - 71);\n```\n\n### Step 4. Finalization\n\nIn the finalization step, a merging procedure is used to extract a single 64-bit value from the accumulators, using an initial seed value and a 64-byte segment of the secret.\n\n```c\nfinalMerge(u64 initValue, size secretOffset):\n  u64 secretWords[8] = secret[secretOffset:secretOffset+64];\n  u64 result = initValue;\n  for (i = 0; i < 4; i++) {\n    // 64-bit by 64-bit multiplication to 128-bit full result\n    u128 mulResult = (u128)(acc[i*2] xor secretWords[i*2]) *\n                     (u128)(acc[i*2+1] xor secretWords[i*2+1]);\n    result = result + (lowerHalf(mulResult) xor higherHalf(mulResult));\n                      // (mulResult and 0xFFFFFFFFFFFFFFFF) xor (mulResult >> 64)\n  }\n  return avalanche(result);\n```\n\nXXH3-128 runs the merging procedure twice for the two halves of the result, using different secret segments and different initial values derived from the total input length.\nThe XXH3-64 result is just the lower half of the XXH3-128 result.\n\n```c\nXXH3_64_large():\n  return finalMerge((u64)inputLength * PRIME64_1, 11);\n\nXXH3_128_large():\n  return {finalMerge((u64)inputLength * PRIME64_1, 11), // lower half\n          finalMerge(~((u64)inputLength * PRIME64_2), secretLength - 75)}; // higher half\n```\n\n\nPerformance considerations\n----------------------------------\n\nThe xxHash algorithms are simple and compact to implement. They provide a system independent \"fingerprint\" or digest of a message of arbitrary length.\n\nThe algorithm allows input to be streamed and processed in multiple steps. In such case, an internal buffer is needed to ensure data is presented to the algorithm in full stripes.\n\nOn 64-bit systems, the 64-bit variant `XXH64` is generally faster to compute, so it is a recommended variant, even when only 32-bit are needed.\n\nOn 32-bit systems though, positions are reversed: `XXH64` performance is reduced, due to its usage of 64-bit arithmetic. `XXH32` becomes a faster variant.\n\nFinally, when vector operations are possible, `XXH3` is likely the faster variant.\n\n\nReference Implementation\n----------------------------------------\n\nA reference library written in C is available at https://www.xxhash.com.\nThe web page also links to multiple other implementations written in many different languages.\nIt links to the [github project page](https://github.com/Cyan4973/xxHash) where an [issue board](https://github.com/Cyan4973/xxHash/issues) can be used for further public discussions on the topic.\n\n\nVersion changes\n--------------------\nv0.2.0: added XXH3 specification, by Adrien Wu\nv0.1.1: added a note on rationale for selection of constants\nv0.1.0: initial release\n"
  },
  {
    "path": "third-party/xxhash/fuzz/fuzzer.c",
    "content": "#include <stdint.h>\n#include \"xxhash.h\"\n\n\nint LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {\n  volatile XXH64_hash_t hash64 = XXH64(data, size, 0);\n  (void)hash64;\n  volatile XXH32_hash_t hash32 = XXH32(data, size, 0);\n  (void)hash32;\n  return 0;\n}\n"
  },
  {
    "path": "third-party/xxhash/libxxhash.pc.in",
    "content": "#   xxHash - Extremely fast hash algorithm\n#   Copyright (C) 2012-2021, Yann Collet, Facebook\n#   BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)\n\nprefix=@PREFIX@\nexec_prefix=@EXECPREFIX@\nincludedir=@INCLUDEDIR@\nlibdir=@LIBDIR@\n\nName: xxhash\nDescription: extremely fast hash algorithm\nURL: http://www.xxhash.com/\nVersion: @VERSION@\nLibs: -L${libdir} -lxxhash\nCflags: -I${includedir}\n"
  },
  {
    "path": "third-party/xxhash/tests/Makefile",
    "content": "# ################################################################\n# xxHash Makefile\n# Copyright (C) 2012-2021 Yann Collet\n#\n# GPL v2 License\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License along\n# with this program; if not, write to the Free Software Foundation, Inc.,\n# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n#\n# You can contact the author at:\n#   - xxHash homepage: https://www.xxhash.com\n#   - xxHash source repository: https://github.com/Cyan4973/xxHash\n# ################################################################\n\nCFLAGS += -Wall -Wextra -Wundef -g\n\nCP = cp\nNM = nm\nGREP = grep\nXXHSUM_DIR = ..\nXXHSUM = $(XXHSUM_DIR)/xxhsum\n\n# Define *.exe as extension for Windows systems\nifneq (,$(filter Windows%,$(OS)))\nEXT =.exe\nelse\nEXT =\nendif\n\nifneq (,$(filter %UTF-8,$(LANG)))\nENABLE_UNICODE ?= 1\nelse\nENABLE_UNICODE ?= 0\nendif\n\n.PHONY: default\ndefault: all\n\n.PHONY: all\nall: test\n\n.PHONY: test\ntest: test_multiInclude test_unicode test_sanity\n\n.PHONY: test_multiInclude\ntest_multiInclude:\n\t@$(MAKE) clean\n\t# compile without xxhash.o, ensure symbols exist within target\n\t# Note: built using only default rules\n\t$(MAKE) multiInclude\n\t@$(MAKE) clean\n\t# compile with xxhash.o, to detect duplicated symbols\n\t$(MAKE) multiInclude_withxxhash\n\t@$(MAKE) clean\n\t# compile with XXH_NAMESPACE before XXH_INLINE_ALL\n\tCPPFLAGS=-DXXH_NAMESPACE=TESTN_ $(MAKE) multiInclude\n\t# no symbol prefixed TESTN_ should exist\n\t! $(NM) multiInclude | $(GREP) TESTN_\n\t$(MAKE) clean\n\t# compile xxhash.o with XXH_NAMESPACE\n\tCPPFLAGS=-DXXH_NAMESPACE=TESTN_ $(MAKE) multiInclude_withxxhash\n\t# symbols prefixed TESTN_ should exist in xxhash.o (though not be invoked)\n\t$(NM) multiInclude_withxxhash | $(GREP) TESTN_\n\t$(MAKE) clean\n\n.PHONY: test_ppc_redefine\ntest_ppc_redefine: ppc_define.c\n\t@$(MAKE) clean\n\t$(CC) $(CPPFLAGS) $(CFLAGS) -c $^\n\n.PHONY: $(XXHSUM)\n$(XXHSUM):\n\t$(MAKE) -C $(XXHSUM_DIR) xxhsum\n\t$(CP) $(XXHSUM) .\n\n# Make sure that Unicode filenames work.\n# https://github.com/Cyan4973/xxHash/issues/293\n.PHONY: test_unicode\nifeq (0,$(ENABLE_UNICODE))\ntest_unicode:\n\t@echo \"Skipping Unicode test, your terminal doesn't appear to support UTF-8.\"\n\t@echo \"Try with ENABLE_UNICODE=1\"\nelse\ntest_unicode: $(XXHSUM) generate_unicode_test.c\n\t# Generate a Unicode filename test dynamically\n\t# to keep UTF-8 out of the source tree.\n\t$(CC) $(CFLAGS) $(LDFLAGS) generate_unicode_test.c -o generate_unicode_test$(EXT)\n\t./generate_unicode_test$(EXT)\n\t$(SHELL) ./unicode_test.sh\nendif\n\n.PHONY: test_filename_escape\ntest_filename_escape: $(XXHSUM)\n\t./filename-escape.sh\n\n.PHONY: test_cli_comment_line\ntest_cli_comment_line: $(XXHSUM)\n\t$(SHELL) ./cli-comment-line.sh\n\n.PHONY: test_cli_ignore_missing\ntest_cli_ignore_missing: $(XXHSUM)\n\t$(SHELL) ./cli-ignore-missing.sh\n\n.PHONY: test_sanity\ntest_sanity: sanity_test.c\n\t$(CC) $(CFLAGS) $(LDFLAGS) sanity_test.c -o sanity_test$(EXT)\n\t$(RUN_ENV) ./sanity_test$(EXT)\n\n.PHONY: sanity_test_vectors.h\nsanity_test_vectors.h: sanity_test_vectors_generator.c\n\t$(CC) $(CFLAGS) $(LDFLAGS) sanity_test_vectors_generator.c -o sanity_test_vectors_generator$(EXT)\n\t./sanity_test_vectors_generator$(EXT)\n\nxxhash.o: ../xxhash.c ../xxhash.h\n\t$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -c -o $@ $<\n\nmultiInclude_withxxhash: multiInclude.o xxhash.o\n\t$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^\n\nclean:\n\t@$(RM) *.o\n\t@$(RM) multiInclude multiInclude_withxxhash\n\t@$(RM) *.unicode generate_unicode_test$(EXT) unicode_test.* xxhsum*\n\t@$(RM) sanity_test$(EXT) sanity_test_vectors_generator$(EXT)\n"
  },
  {
    "path": "third-party/xxhash/tests/cli-comment-line.sh",
    "content": "#!/bin/bash\n\n# Exit immediately if any command fails.\n# https://stackoverflow.com/a/2871034\nset -euxo\n\n\n# Default\n./xxhsum ./Makefile > ./.test.xxh\necho '# Test comment line' | cat - ./.test.xxh > temp && mv temp ./.test.xxh\n./xxhsum --check ./.test.xxh\n\n# XXH32\n./xxhsum -H32 ./Makefile > ./.test.xxh32\necho '# Test comment line' | cat - ./.test.xxh32 > temp && mv temp ./.test.xxh32\n./xxhsum --check ./.test.xxh32\n\n# XXH64\n./xxhsum -H64 ./Makefile > ./.test.xxh64\necho '# Test comment line' | cat - ./.test.xxh64 > temp && mv temp ./.test.xxh64\n./xxhsum --check ./.test.xxh64\n\n# XXH128\n./xxhsum -H128 ./Makefile > ./.test.xxh128\necho '# Test comment line' | cat - ./.test.xxh128 > temp && mv temp ./.test.xxh128\n./xxhsum --check ./.test.xxh128\n\n\nrm ./.test.xxh\nrm ./.test.xxh32\nrm ./.test.xxh64\nrm ./.test.xxh128\n"
  },
  {
    "path": "third-party/xxhash/tests/cli-ignore-missing.sh",
    "content": "#!/bin/bash\n\n# Exit immediately if any command fails.\n# https://stackoverflow.com/a/2871034\nset -e -u -x\n\n\n# Normal\n./xxhsum ./Makefile > ./.test.xxh\n./xxhsum --check ./.test.xxh\n\n\n# Missing, expect error\n# (1) Create checksum file.\n# (2) Remove one of them.\n# (3) --check it\n# (4) Expect NG (missing file)\ncp Makefile .test.makefile\n./xxhsum ./.test.makefile > ./.test.xxh\nrm ./.test.makefile\n! ./xxhsum --check ./.test.xxh  # Put '!' for expecting error\n\n\n# Missing, --ignore-missing\n# (1) Create checksum file.\n# (2) Remove one of them.\n# (3) --check it with --ignore-missing.\n# (4) Expect OK\n\ncp Makefile .test.makefile\n./xxhsum Makefile ./.test.makefile > ./.test.xxh\nrm ./.test.makefile\n./xxhsum --check --ignore-missing ./.test.xxh\n\n\n# Missing, --ignore-missing, expect error\n# (1) Create checksum file.\n# (2) Remove all of them.\n# (3) --check it with --ignore-missing.\n# (4) Expect NG (no file was verified).\n\ncp Makefile .test.makefile\n./xxhsum ./.test.makefile > ./.test.xxh\nrm ./.test.makefile\n! ./xxhsum --check --ignore-missing ./.test.xxh  # Put '!' for expecting error\n\n\n# Cleanup\n( rm ./.test.* ) || true\n\necho OK\n"
  },
  {
    "path": "third-party/xxhash/tests/collisions/.gitignore",
    "content": "#build artefacts\ncollisionsTest\n"
  },
  {
    "path": "third-party/xxhash/tests/collisions/LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundation, Inc.,\n 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The licenses for most software are designed to take away your\nfreedom to share and change it.  By contrast, the GNU General Public\nLicense is intended to guarantee your freedom to share and change free\nsoftware--to make sure the software is free for all its users.  This\nGeneral Public License applies to most of the Free Software\nFoundation's software and to any other program whose authors commit to\nusing it.  (Some other Free Software Foundation software is covered by\nthe GNU Lesser General Public License instead.)  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthis service if you wish), that you receive source code or can get it\nif you want it, that you can change the software or use pieces of it\nin new free programs; and that you know you can do these things.\n\n  To protect your rights, we need to make restrictions that forbid\nanyone to deny you these rights or to ask you to surrender the rights.\nThese restrictions translate to certain responsibilities for you if you\ndistribute copies of the software, or if you modify it.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must give the recipients all the rights that\nyou have.  You must make sure that they, too, receive or can get the\nsource code.  And you must show them these terms so they know their\nrights.\n\n  We protect your rights with two steps: (1) copyright the software, and\n(2) offer you this license which gives you legal permission to copy,\ndistribute and/or modify the software.\n\n  Also, for each author's protection and ours, we want to make certain\nthat everyone understands that there is no warranty for this free\nsoftware.  If the software is modified by someone else and passed on, we\nwant its recipients to know that what they have is not the original, so\nthat any problems introduced by others will not reflect on the original\nauthors' reputations.\n\n  Finally, any free program is threatened constantly by software\npatents.  We wish to avoid the danger that redistributors of a free\nprogram will individually obtain patent licenses, in effect making the\nprogram proprietary.  To prevent this, we have made it clear that any\npatent must be licensed for everyone's free use or not licensed at all.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                    GNU GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License applies to any program or other work which contains\na notice placed by the copyright holder saying it may be distributed\nunder the terms of this General Public License.  The \"Program\", below,\nrefers to any such program or work, and a \"work based on the Program\"\nmeans either the Program or any derivative work under copyright law:\nthat is to say, a work containing the Program or a portion of it,\neither verbatim or with modifications and/or translated into another\nlanguage.  (Hereinafter, translation is included without limitation in\nthe term \"modification\".)  Each licensee is addressed as \"you\".\n\nActivities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning the Program is not restricted, and the output from the Program\nis covered only if its contents constitute a work based on the\nProgram (independent of having been made by running the Program).\nWhether that is true depends on what the Program does.\n\n  1. You may copy and distribute verbatim copies of the Program's\nsource code as you receive it, in any medium, provided that you\nconspicuously and appropriately publish on each copy an appropriate\ncopyright notice and disclaimer of warranty; keep intact all the\nnotices that refer to this License and to the absence of any warranty;\nand give any other recipients of the Program a copy of this License\nalong with the Program.\n\nYou may charge a fee for the physical act of transferring a copy, and\nyou may at your option offer warranty protection in exchange for a fee.\n\n  2. You may modify your copy or copies of the Program or any portion\nof it, thus forming a work based on the Program, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) You must cause the modified files to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    b) You must cause any work that you distribute or publish, that in\n    whole or in part contains or is derived from the Program or any\n    part thereof, to be licensed as a whole at no charge to all third\n    parties under the terms of this License.\n\n    c) If the modified program normally reads commands interactively\n    when run, you must cause it, when started running for such\n    interactive use in the most ordinary way, to print or display an\n    announcement including an appropriate copyright notice and a\n    notice that there is no warranty (or else, saying that you provide\n    a warranty) and that users may redistribute the program under\n    these conditions, and telling the user how to view a copy of this\n    License.  (Exception: if the Program itself is interactive but\n    does not normally print such an announcement, your work based on\n    the Program is not required to print an announcement.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Program,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Program, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote it.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Program.\n\nIn addition, mere aggregation of another work not based on the Program\nwith the Program (or with a work based on the Program) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may copy and distribute the Program (or a work based on it,\nunder Section 2) in object code or executable form under the terms of\nSections 1 and 2 above provided that you also do one of the following:\n\n    a) Accompany it with the complete corresponding machine-readable\n    source code, which must be distributed under the terms of Sections\n    1 and 2 above on a medium customarily used for software interchange; or,\n\n    b) Accompany it with a written offer, valid for at least three\n    years, to give any third party, for a charge no more than your\n    cost of physically performing source distribution, a complete\n    machine-readable copy of the corresponding source code, to be\n    distributed under the terms of Sections 1 and 2 above on a medium\n    customarily used for software interchange; or,\n\n    c) Accompany it with the information you received as to the offer\n    to distribute corresponding source code.  (This alternative is\n    allowed only for noncommercial distribution and only if you\n    received the program in object code or executable form with such\n    an offer, in accord with Subsection b above.)\n\nThe source code for a work means the preferred form of the work for\nmaking modifications to it.  For an executable work, complete source\ncode means all the source code for all modules it contains, plus any\nassociated interface definition files, plus the scripts used to\ncontrol compilation and installation of the executable.  However, as a\nspecial exception, the source code distributed need not include\nanything that is normally distributed (in either source or binary\nform) with the major components (compiler, kernel, and so on) of the\noperating system on which the executable runs, unless that component\nitself accompanies the executable.\n\nIf distribution of executable or object code is made by offering\naccess to copy from a designated place, then offering equivalent\naccess to copy the source code from the same place counts as\ndistribution of the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  4. You may not copy, modify, sublicense, or distribute the Program\nexcept as expressly provided under this License.  Any attempt\notherwise to copy, modify, sublicense or distribute the Program is\nvoid, and will automatically terminate your rights under this License.\nHowever, parties who have received copies, or rights, from you under\nthis License will not have their licenses terminated so long as such\nparties remain in full compliance.\n\n  5. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Program or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Program (or any work based on the\nProgram), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Program or works based on it.\n\n  6. Each time you redistribute the Program (or any work based on the\nProgram), the recipient automatically receives a license from the\noriginal licensor to copy, distribute or modify the Program subject to\nthese terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties to\nthis License.\n\n  7. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Program at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Program by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Program.\n\nIf any portion of this section is held invalid or unenforceable under\nany particular circumstance, the balance of the section is intended to\napply and the section as a whole is intended to apply in other\ncircumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system, which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  8. If the distribution and/or use of the Program is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Program under this License\nmay add an explicit geographical distribution limitation excluding\nthose countries, so that distribution is permitted only in or among\ncountries not thus excluded.  In such case, this License incorporates\nthe limitation as if written in the body of this License.\n\n  9. The Free Software Foundation may publish revised and/or new versions\nof the General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Program\nspecifies a version number of this License which applies to it and \"any\nlater version\", you have the option of following the terms and conditions\neither of that version or of any later version published by the Free\nSoftware Foundation.  If the Program does not specify a version number of\nthis License, you may choose any version ever published by the Free Software\nFoundation.\n\n  10. If you wish to incorporate parts of the Program into other free\nprograms whose distribution conditions are different, write to the author\nto ask for permission.  For software which is copyrighted by the Free\nSoftware Foundation, write to the Free Software Foundation; we sometimes\nmake exceptions for this.  Our decision will be guided by the two goals\nof preserving the free status of all derivatives of our free software and\nof promoting the sharing and reuse of software generally.\n\n                            NO WARRANTY\n\n  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\nFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\nOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\nPROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\nOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\nTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\nPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\nREPAIR OR CORRECTION.\n\n  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\nREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\nINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\nOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\nTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\nYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\nPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGES.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nconvey the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software; you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation; either version 2 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License along\n    with this program; if not, write to the Free Software Foundation, Inc.,\n    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\nAlso add information on how to contact you by electronic and paper mail.\n\nIf the program is interactive, make it output a short notice like this\nwhen it starts in an interactive mode:\n\n    Gnomovision version 69, Copyright (C) year name of author\n    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, the commands you use may\nbe called something other than `show w' and `show c'; they could even be\nmouse-clicks or menu items--whatever suits your program.\n\nYou should also get your employer (if you work as a programmer) or your\nschool, if any, to sign a \"copyright disclaimer\" for the program, if\nnecessary.  Here is a sample; alter the names:\n\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the program\n  `Gnomovision' (which makes passes at compilers) written by James Hacker.\n\n  <signature of Ty Coon>, 1 April 1989\n  Ty Coon, President of Vice\n\nThis General Public License does not permit incorporating your program into\nproprietary programs.  If your program is a subroutine library, you may\nconsider it more useful to permit linking proprietary applications with the\nlibrary.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.\n"
  },
  {
    "path": "third-party/xxhash/tests/collisions/Makefile",
    "content": "#  Brute force collision tester for 64-bit hashes\n#  Part of xxHash project\n#  Copyright (C) 2019-2021 Yann Collet\n#\n# GPL v2 License\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License along\n# with this program; if not, write to the Free Software Foundation, Inc.,\n# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n#\n#  You can contact the author at:\n#  - xxHash homepage: https://www.xxhash.com\n#  - xxHash source repository: https://github.com/Cyan4973/xxHash\n#\n\nSRC_DIRS = ./ ../../ allcodecs/\nVPATH = $(SRC_DIRS)\nCPPFLAGS += $(addprefix -I ,$(SRC_DIRS))\nCFLAGS   += -Wall -Wextra -Wconversion \\\n            -std=c11\nCXXFLAGS += -Wall -Wextra -Wconversion \\\n            -std=c++11\nLDFLAGS  += -pthread\nTESTHASHES = 3200000\n\nHASH_SRC := $(sort $(wildcard allcodecs/*.c allcodecs/*.cc))\nHASH_OBJ := $(patsubst %.c,%.o,$(HASH_SRC))\n\n\n.PHONY: default\ndefault: release\n\n.PHONY: all\nall: release\n\ncollisionsTest: main.o pool.o threading.o sort.o $(HASH_OBJ)\n\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ $(LDFLAGS) -o $@\n\nmain.o: hashes.h xxhash.h\n\nrelease: CXXFLAGS += -O3\nrelease: CFLAGS += -O3\nrelease: collisionsTest\n\ndebug: CXXFLAGS += -g3 -O0 -DDEBUG\ndebug: CFLAGS += -g3 -O0 -DDEBUG\ndebug: collisionsTest\n\n.PHONY: check\ncheck: test\n\n.PHONY: test\ntest: debug\n\t@echo \"\"\n\t@echo \"## $(TESTHASHES) hashes\"\n\t@time ./collisionsTest --nbh=$(TESTHASHES)\n\t@echo \"\"\n\t@echo \"## $(TESTHASHES) hashes with filter\"\n\t@time ./collisionsTest --nbh=$(TESTHASHES) --filter\n\t@echo \"\"\n\t@echo \"## $(TESTHASHES) hashes with 2 threads\"\n\t@time ./collisionsTest --nbh=$(TESTHASHES) --threadlog=1\n\t@echo \"\"\n\n.PHONY: clean\nclean:\n\t$(RM) *.o allcodecs/*.o\n\t$(RM) collisionsTest\n"
  },
  {
    "path": "third-party/xxhash/tests/collisions/README.md",
    "content": "\n__collisionsTest__ is a brute force hash analyzer\nwhich will measure a 64-bit hash algorithm's collision rate\nby generating billions of hashes,\nand comparing the result to an \"ideal\" target.\n\nThe test requires a very large amount of memory.\nBy default, it will generate 24 billion of 64-bit hashes,\nrequiring __192 GB of RAM__ for their storage.\nThe number of hashes can be modified using command `--nbh=`.\nBe aware that testing the collision ratio of 64-bit hashes\nrequires a very large amount of hashes (several billion) for meaningful measurements.\n\nTo reduce RAM usage, an optional filter can be requested, with `--filter`.\nIt reduces the nb of candidates to analyze, hence associated RAM budget.\nNote that the filter itself requires a lot of RAM\n(32 GB by default, can be modified using `--filterlog=`,\na too small filter will not be efficient, aim at ~2 bytes per hash),\nand reading and writing into filter cost a significant CPU budget,\nso this method is slower.\nIt also doesn't allow advanced analysis of partial bitfields,\nsince most hashes will be discarded and not stored.\n\nWhen using the filter, the RAM budget consists of the filter and a list of candidates,\nwhich will be a fraction of the original hash list.\nUsing default settings (24 billion hashes, 32 GB filter),\nthe number of potential candidates should be reduced to less than 2 billion,\nrequiring ~14 GB for their storage.\nSuch a result also depends on hash algorithm's efficiency.\nThe number of effective candidates is likely to be lower, at ~ 1 billion,\nbut storage must allocate an upper bound.\n\nFor the default test, the expected \"optimal\" collision rate for a 64-bit hash function is ~18 collisions.\n\n#### How to build\n```\nmake\n```\n\nNote: the code is a mix of C99 and C++14,\nit's not compatible with a C90-only compiler.\n\n#### Build modifier\n\n- `SLAB5`: use alternative pattern generator, friendlier for weak hash algorithms\n- `POOL_MT`: if `=0`, disable multi-threading code (enabled by default)\n\n#### How to integrate any hash in the tester\n\nThe build script will compile files found in `./allcodecs`.\nPut the source code here.\nThis also works if the hash is a single `*.h` file.\n\nThe glue happens in `hashes.h`.\nIn this file, there are 2 sections:\n- Adds the required `#include \"header.h\"`, and creates a wrapper\nto respect the format expected by the function pointer.\n- Adds the wrapper, along with the name and an indication of the output width,\nto the table, at the end of `hashes.h`\n\nBuild with `make`. Locate your new hash with `./collisionsTest -h`,\nit should be listed.\n\n\n#### Usage\n\n```\nusage: ./collisionsTest [hashName] [opt]\n\nlist of hashNames: (...)\n\nOptional parameters:\n  --nbh=NB       Select nb of hashes to generate (25769803776 by default)\n  --filter       Enable the filter. Slower, but reduces memory usage for same nb of hashes.\n  --threadlog=NB Use 2^NB threads\n  --len=NB       Select length of input (255 bytes by default)\n```\n\n#### Some advises on how to setup a collisions test\n\nMost tests are primarily driven by the amount of RAM available.\nHere's a method to decide the size of the test.\n\nPresuming that RAM budget is not plentiful, for this example 32 GB,\nthe `--filter` mode is actually compulsory to measure anything meaningful.\nLet's plan 50% of memory for the filter, that's 16 GB.\nThis will be good enough to filter about 10% less hashes than this size.\nLet's round down to 14 G.\n\nBy requesting 14G, the expectation is that the program will automatically\nsize the filter to 16 GB, and expect to store ~1G candidates,\nleaving enough room to breeze for the system.\n\nThe command line becomes:\n```\n./collisionsTest --nbh=14G --filter NameOfHash\n```\n\n#### Examples:\n\nHere are a few results produced with this tester:\n\n| Algorithm | Input Len | Nb Hashes | Expected | Nb Collisions | Notes |\n| ---        | --- | ---    | ---   | --- | --- |\n| __XXH3__   | 255 | 100 Gi | 312.5 | 326 |  |\n| __XXH64__  | 255 | 100 Gi | 312.5 | 294 |  |\n| __XXH128__ low64 | 512 | 100 Gi | 312.5 | 321 |  |\n| __XXH128__ high64| 512 | 100 Gi | 312.5 | 325 |  |\n| __XXH128__ | 255 | 100 Gi |   0.0 |   0 | a 128-bit hash is expected to generate 0 collisions |\n\nTest on small inputs:\n\n| Algorithm  | Input Len | Nb Hashes | Expected | Nb Collisions | Notes |\n| ---        | --- | ---    | --- | --- | --- |\n| __XXH64__  |   8 | 100 Gi | 312.5 | __0__ | `XXH64` is bijective for `len==8` |\n| __XXH3__   |   8 | 100 Gi | 312.5 | __0__ | `XXH3` is also bijective for `len==8` |\n| __XXH3__   |  16 | 100 Gi | 312.5 | 332 |  |\n| __XXH3__   |  32 |  14 Gi |   6.1 |   3 |  |\n| __XXH128__ |  16 |  25 Gi |   0.0 |   0 | test range 9-16 |\n| __XXH128__ |  32 |  25 Gi |   0.0 |   0 | test range 17-128 |\n| __XXH128__ | 100 |  13 Gi |   0.0 |   0 | test range 17-128 |\n| __XXH128__ | 200 |  13 Gi |   0.0 |   0 | test range 129-240 |\n"
  },
  {
    "path": "third-party/xxhash/tests/collisions/allcodecs/README.md",
    "content": "Put in this directory all hash algorithms to test\n"
  },
  {
    "path": "third-party/xxhash/tests/collisions/allcodecs/dummy.c",
    "content": "/*\n * dummy.c, a fake hash algorithm, just to test integration capabilities.\n * Part of the xxHash project\n * Copyright (C) 2020 Yann Collet\n *\n * GPL v2 License\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * You can contact the author at:\n * - xxHash homepage: https://www.xxhash.com\n * - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n\n#include <dummy.h>\n\nunsigned badsum32(const void* input, size_t len, unsigned seed)\n{\n    unsigned sum = seed;\n    const unsigned char* in8 = input;\n    size_t c;\n    for (c=0; c<len; c++)\n        sum += in8[c];\n    return sum;\n}\n"
  },
  {
    "path": "third-party/xxhash/tests/collisions/allcodecs/dummy.h",
    "content": "/*\n * dummy.c,\n * A fake hash algorithm, just to test integration capabilities.\n * Part of the xxHash project\n * Copyright (C) 2020 Yann Collet\n *\n * GPL v2 License\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * You can contact the author at:\n * - xxHash homepage: https://www.xxhash.com\n * - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n#ifndef DUMMY_H_987987\n#define DUMMY_H_987987\n\n#if defined (__cplusplus)\nextern \"C\" {\n#endif\n\n\n#include <stddef.h> /* size_t */\n\nunsigned badsum32(const void* input, size_t len, unsigned seed);\n\n\n#if defined (__cplusplus)\n}\n#endif\n\n#endif  /* DUMMY_H_987987 */\n"
  },
  {
    "path": "third-party/xxhash/tests/collisions/hashes.h",
    "content": "/*\n * List of hashes for the brute force collision tester\n * Part of xxHash project\n * Copyright (C) 2019-2021 Yann Collet\n *\n * GPL v2 License\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * You can contact the author at:\n * - xxHash homepage: https://www.xxhash.com\n * - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n#ifndef HASHES_H_1235465\n#define HASHES_H_1235465\n\n#include <stddef.h>      /* size_t */\n#include <stdint.h>      /* uint64_t */\n#define XXH_INLINE_ALL   /* XXH128_hash_t */\n#include \"xxhash.h\"\n\n\n/* return type */\n\ntypedef union {\n    uint64_t       h64;\n    XXH128_hash_t h128;\n} UniHash;\n\nUniHash uniHash32(uint64_t v32)\n{   UniHash unih;\n    unih.h64 = v32;\n    return unih;\n}\n\nUniHash uniHash64(uint64_t v64)\n{   UniHash unih;\n    unih.h64 = v64;\n    return unih;\n}\n\nUniHash uniHash128(XXH128_hash_t v128)\n{   UniHash unih;\n    unih.h128 = v128;\n    return unih;\n}\n\n\n/* ===  xxHash  === */\n\nUniHash XXH3_wrapper (const void* data, size_t size)\n{\n    return uniHash64( XXH3_64bits(data, size) );\n}\n\nUniHash XXH128_wrapper (const void* data, size_t size)\n{\n    return uniHash128( XXH3_128bits(data, size) );\n}\n\nUniHash XXH128l_wrapper (const void* data, size_t size)\n{\n    return uniHash64( XXH3_128bits(data, size).low64 );\n}\n\nUniHash XXH128h_wrapper (const void* data, size_t size)\n{\n    return uniHash64( XXH3_128bits(data, size).high64 );\n}\n\nUniHash XXH64_wrapper (const void* data, size_t size)\n{\n    return uniHash64 ( XXH64(data, size, 0) );\n}\n\nUniHash XXH32_wrapper (const void* data, size_t size)\n{\n    return uniHash32( XXH32(data, size, 0) );\n}\n\n/* ===  Dummy integration example  === */\n\n#include \"dummy.h\"\n\nUniHash badsum32_wrapper (const void* data, size_t size)\n{\n    return uniHash32( badsum32(data, size, 0) );\n}\n\n\n\n/* ===  Table  === */\n\ntypedef UniHash (*hashfn) (const void* data, size_t size);\n\ntypedef struct {\n    const char* name;\n    hashfn fn;\n    int bits;\n} hashDescription;\n\n#define HASH_FN_TOTAL 7\n\nhashDescription hashfnTable[HASH_FN_TOTAL] = {\n    { \"xxh3\"  ,  XXH3_wrapper,     64 },\n    { \"xxh64\" ,  XXH64_wrapper,    64 },\n    { \"xxh128\",  XXH128_wrapper,  128 },\n    { \"xxh128l\", XXH128l_wrapper,  64 },\n    { \"xxh128h\", XXH128h_wrapper,  64 },\n    { \"xxh32\" ,  XXH32_wrapper,    32 },\n    { \"badsum32\",badsum32_wrapper, 32 },\n};\n\n#endif   /* HASHES_H_1235465 */\n"
  },
  {
    "path": "third-party/xxhash/tests/collisions/main.c",
    "content": "/*\n * Brute force collision tester for 64-bit hashes\n * Part of the xxHash project\n * Copyright (C) 2019-2021 Yann Collet\n *\n * GPL v2 License\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n/*\n * The collision tester will generate 24 billion hashes (by default),\n * and count how many collisions were produced by the 64-bit hash algorithm.\n * The optimal amount of collisions for 64-bit is ~18 collisions.\n * A good hash should be close to this figure.\n *\n * This program requires a lot of memory:\n * - Either store hash values directly => 192 GB\n * - Or use a filter:\n *   -  32 GB (by default) for the filter itself\n *   -  + ~14 GB for the list of hashes (depending on the filter's outcome)\n * Due to these memory constraints, it requires a 64-bit system.\n */\n\n\n /* ===  Dependencies  === */\n\n#include <stdint.h>   /* uint64_t */\n#include <stdlib.h>   /* malloc, free, qsort, exit */\n#include <string.h>   /* memset */\n#include <stdio.h>    /* printf, fflush */\n\n#undef NDEBUG   /* ensure assert is _not_ disabled */\n#include <assert.h>\n\n#include \"hashes.h\"   /* UniHash, hashfn, hashfnTable */\n\n#include \"sort.hh\"    /* sort64 */\n\n\n#ifdef __MINGW32__\n/* MINGW claims C11 complians, yet doesn't provide aligned_alloc().\n * _aligned_malloc() isn't a good workaround,\n * as it seems incompatible with realloc().\n * Let's use malloc() instead, array will not be fully aligned,\n * resulting in some performance degradation, but nothing major.\n * This policy can be updated once MINGW becomes really C11 compliant.\n */\n# define aligned_alloc(a,s)  ((void)(a), malloc(s))\n#endif\n\ntypedef enum { ht32, ht64, ht128 } Htype_e;\n\n/* ===  Debug  === */\n\n#define EXIT(...) { fprintf(stderr, __VA_ARGS__); fprintf(stderr, \"\\n\"); fflush(NULL); exit(1); }\n\nstatic void hexRaw(const void* buffer, size_t size)\n{\n    const unsigned char* p = (const unsigned char*)buffer;\n    for (size_t i=0; i<size; i++) {\n        printf(\"%02X\", p[i]);\n    }\n}\n\nvoid printHash(const void* table, size_t n, Htype_e htype)\n{\n    if ((htype == ht64) || (htype == ht32)){\n        uint64_t const h64 = ((const uint64_t*)table)[n];\n        hexRaw(&h64, sizeof(h64));\n    } else {\n        assert(htype == ht128);\n        XXH128_hash_t const h128 = ((const XXH128_hash_t*)table)[n];\n        hexRaw(&h128, sizeof(h128));\n    }\n}\n\n/* ===  Generate Random unique Samples to hash  === */\n\n/*\n * These functions will generate and update a sample to hash.\n * initSample() will fill a buffer with random bytes,\n * updateSample() will modify one slab in the input buffer.\n * updateSample() guarantees it will produce unique samples,\n * but it needs to know the total number of samples.\n */\n\n\nstatic const uint64_t prime64_1 = 11400714785074694791ULL;   /* 0b1001111000110111011110011011000110000101111010111100101010000111 */\nstatic const uint64_t prime64_2 = 14029467366897019727ULL;   /* 0b1100001010110010101011100011110100100111110101001110101101001111 */\nstatic const uint64_t prime64_3 =  1609587929392839161ULL;   /* 0b0001011001010110011001111011000110011110001101110111100111111001 */\n\nstatic uint64_t avalanche64(uint64_t h64)\n{\n    h64 ^= h64 >> 33;\n    h64 *= prime64_2;\n    h64 ^= h64 >> 29;\n    h64 *= prime64_3;\n    h64 ^= h64 >> 32;\n    return h64;\n}\n\nstatic unsigned char randomByte(uint64_t n)\n{\n    uint64_t n64 = avalanche64(n+1);\n    n64 *= prime64_1;\n    return (unsigned char)(n64 >> 56);\n}\n\ntypedef enum { sf_slab5, sf_sparse } sf_genMode;\n\n\n#ifdef SLAB5\n\n/*\n * Slab5 sample generation.\n * This algorithm generates unique inputs flipping on average 16 bits per candidate.\n * It is generally much more friendly for most hash algorithms, especially\n * weaker ones, as it shuffles more the input.\n * The algorithm also avoids overfitting the per4 or per8 ingestion patterns.\n */\n\n#define SLAB_SIZE 5\n\ntypedef struct {\n    void* buffer;\n    size_t size;\n    sf_genMode mode;\n    size_t prngSeed;\n    uint64_t hnb;\n} sampleFactory;\n\nstatic void init_sampleFactory(sampleFactory* sf, uint64_t htotal)\n{\n    uint64_t const minNbSlabs = ((htotal-1) >> 32) + 1;\n    uint64_t const minSize = minNbSlabs * SLAB_SIZE;\n    if (sf->size < minSize)\n        EXIT(\"sample size must be >= %i bytes for this amount of hashes\",\n            (int)minSize);\n\n    unsigned char* const p = (unsigned char*)sf->buffer;\n    for (size_t n=0; n < sf->size; n++)\n        p[n] = randomByte(n);\n    sf->hnb = 0;\n}\n\nstatic sampleFactory*\ncreate_sampleFactory(size_t size, uint64_t htotal, uint64_t seed)\n{\n    sampleFactory* const sf = malloc(sizeof(sampleFactory));\n    if (!sf) EXIT(\"not enough memory\");\n    void* const buffer = malloc(size);\n    if (!buffer) EXIT(\"not enough memory\");\n    sf->buffer = buffer;\n    sf->size = size;\n    sf->mode = sf_slab5;\n    sf->prngSeed = seed;\n    init_sampleFactory(sf, htotal);\n    return sf;\n}\n\nstatic void free_sampleFactory(sampleFactory* sf)\n{\n    if (!sf) return;\n    free(sf->buffer);\n    free(sf);\n}\n\nstatic inline void update_sampleFactory(sampleFactory* sf)\n{\n    size_t const nbSlabs = sf->size / SLAB_SIZE;\n    size_t const SlabNb = sf->hnb % nbSlabs;\n    sf->hnb++;\n\n    char* const ptr = (char*)sf->buffer;\n    size_t const start = (SlabNb * SLAB_SIZE) + 1;\n    uint32_t val32;\n    memcpy(&val32, ptr+start, sizeof(val32));\n    static const uint32_t prime32_5 = 374761393U;\n    val32 += prime32_5;\n    memcpy(ptr+start, &val32, sizeof(val32));\n}\n\n#else\n\n/*\n * Sparse sample generation.\n * This is the default pattern generator.\n * It only flips one bit at a time (mostly).\n * Low hamming distance scenario is more difficult for weak hash algorithms.\n * Note that CRC is immune to this scenario, since they are specifically\n * designed to detect low hamming distances.\n * Prefer the Slab5 pattern generator for collisions on CRC algorithms.\n */\n\n#define SPARSE_LEVEL_MAX 15\n\n/* Nb of combinations of m bits in a register of n bits */\nstatic double Cnm(int n, int m)\n{\n    assert(n > 0);\n    assert(m > 0);\n    assert(m <= n);\n    double acc = 1;\n    for (int i=0; i<m; i++) {\n        acc *= n - i;\n        acc /= 1 + i;\n    }\n    return acc;\n}\n\nstatic int enoughCombos(size_t size, uint64_t htotal)\n{\n    if (size < 2) return 0;   /* ensure no multiplication by negative */\n    uint64_t acc = 0;\n    uint64_t const srcBits = size * 8; assert(srcBits < INT_MAX);\n    int nbBitsSet = 0;\n    while (acc < htotal) {\n        nbBitsSet++;\n        if (nbBitsSet >= SPARSE_LEVEL_MAX) return 0;\n        acc += (uint64_t)Cnm((int)srcBits, nbBitsSet);\n    }\n    return 1;\n}\n\ntypedef struct {\n    void* buffer;\n    size_t size;\n    sf_genMode mode;\n    /* sparse */\n    size_t bitIdx[SPARSE_LEVEL_MAX];\n    int level;\n    size_t maxBitIdx;\n    /* slab5 */\n    size_t nbSlabs;\n    size_t current;\n    uint64_t prngSeed;\n} sampleFactory;\n\nstatic void init_sampleFactory(sampleFactory* sf, uint64_t htotal)\n{\n    if (!enoughCombos(sf->size, htotal)) {\n        EXIT(\"sample size must be larger for this amount of hashes\");\n    }\n\n    memset(sf->bitIdx, 0, sizeof(sf->bitIdx));\n    sf->level = 0;\n\n    unsigned char* const p = (unsigned char*)sf->buffer;\n    for (size_t n=0; n<sf->size; n++)\n        p[n] = randomByte(sf->prngSeed + n);\n}\n\nstatic sampleFactory*\ncreate_sampleFactory(size_t size, uint64_t htotal, uint64_t seed)\n{\n    sampleFactory* const sf = malloc(sizeof(sampleFactory));\n    if (!sf) EXIT(\"not enough memory\");\n    void* const buffer = malloc(size);\n    if (!buffer) EXIT(\"not enough memory\");\n    sf->buffer = buffer;\n    sf->size = size;\n    sf->mode = sf_sparse;\n    sf->maxBitIdx = size * 8;\n    sf->prngSeed = seed;\n    init_sampleFactory(sf, htotal);\n    return sf;\n}\n\nstatic void free_sampleFactory(sampleFactory* sf)\n{\n    if (!sf) return;\n    free(sf->buffer);\n    free(sf);\n}\n\nstatic void flipbit(void* buffer, uint64_t bitID)\n{\n    size_t const pos = (size_t)(bitID >> 3);\n    unsigned char const mask = (unsigned char)(1 << (bitID & 7));\n    unsigned char* const p = (unsigned char*)buffer;\n    p[pos] ^= mask;\n}\n\nstatic int updateBit(void* buffer, size_t* bitIdx, int level, size_t max)\n{\n    if (level==0) return 0;   /* can't progress further */\n\n    flipbit(buffer, bitIdx[level]); /* erase previous bits */\n\n    if (bitIdx[level] < max-1) { /* simple case: go to next bit */\n        bitIdx[level]++;\n        flipbit(buffer, bitIdx[level]); /* set new bit */\n        return 1;\n    }\n\n    /* reached last bit: need to update a bit from lower level */\n    if (!updateBit(buffer, bitIdx, level-1, max-1)) return 0;\n    bitIdx[level] = bitIdx[level-1] + 1;\n    flipbit(buffer, bitIdx[level]); /* set new bit */\n    return 1;\n}\n\nstatic inline void update_sampleFactory(sampleFactory* sf)\n{\n    if (!updateBit(sf->buffer, sf->bitIdx, sf->level, sf->maxBitIdx)) {\n        /* no more room => move to next level */\n        sf->level++;\n        assert(sf->level < SPARSE_LEVEL_MAX);\n\n        /* set new bits */\n        for (int i=1; i <= sf->level; i++) {\n            sf->bitIdx[i] = (size_t)(i-1);\n            flipbit(sf->buffer, sf->bitIdx[i]);\n        }\n    }\n}\n\n#endif /* pattern generator selection */\n\n\n/* ===  Candidate Filter  === */\n\ntypedef unsigned char Filter;\n\nFilter* create_Filter(int bflog)\n{\n    assert(bflog < 64 && bflog > 1);\n    size_t const bfsize = (size_t)1 << bflog;\n    size_t const cacheline_size = 64;\n    Filter* const bf = aligned_alloc(cacheline_size, bfsize);  // requires C11\n    if (bf==NULL) {\n        fprintf(stderr, \"Filter creation failed (need %zu MB) \\n\", bfsize >> 20);\n        exit(1);\n    }\n    memset(bf, 0, bfsize);  // we want memory to be actually used\n    return bf;\n}\n\nvoid free_Filter(Filter* bf)\n{\n    free(bf);\n}\n\n#ifdef FILTER_1_PROBE\n\n/*\n * Attach hash to a slot\n * return: Nb of potential collision candidates detected\n *          0: position not yet occupied\n *          2: position previously occupied by a single candidate\n *          1: position already occupied by multiple candidates\n */\ninline int Filter_insert(Filter* bf, int bflog, uint64_t hash)\n{\n    int const slotNb = hash & 3;\n    int const shift = slotNb * 2 ;\n\n    size_t const bfmask = ((size_t)1 << bflog) - 1;\n    size_t const pos = (hash >> 2) & bfmask;\n\n    int const existingCandidates = ((((unsigned char*)bf)[pos]) >> shift) & 3;\n\n    static const int addCandidates[4] = { 0, 2, 1, 1 };\n    static const int nextValue[4] = { 1, 2, 3, 3 };\n\n    ((unsigned char*)bf)[pos] |= (unsigned char)(nextValue[existingCandidates] << shift);\n    return addCandidates[existingCandidates];\n}\n\n/*\n * Check if provided 64-bit hash is a collision candidate\n * Requires the slot to be occupied by at least 2 candidates.\n * return >0 if hash is a collision candidate\n *         0 otherwise (slot unoccupied, or only one candidate)\n * note: unoccupied slots should not happen in this algorithm,\n *       since all hashes are supposed to have been inserted at least once.\n */\ninline int Filter_check(const Filter* bf, int bflog, uint64_t hash)\n{\n    int const slotNb = hash & 3;\n    int const shift = slotNb * 2;\n\n    size_t const bfmask = ((size_t)1 << bflog) - 1;\n    size_t const pos = (hash >> 2) & bfmask;\n\n    return (((const unsigned char*)bf)[pos]) >> (shift+1) & 1;\n}\n\n#else\n\n/*\n * 2-probes strategy,\n * more efficient at filtering candidates,\n * requires filter size to be > nb of hashes\n */\n\n#define MIN(a,b)   ((a) < (b) ? (a) : (b))\n#define MAX(a,b)   ((a) > (b) ? (a) : (b))\n\n/*\n * Attach hash to 2 slots\n * return: Nb of potential candidates detected\n *          0: position not yet occupied\n *          1: position may be already occupied\n */\nstatic inline int Filter_insert(Filter* bf, int bflog, uint64_t hash)\n{\n    hash = avalanche64(hash);\n    unsigned const slot1 = hash & 255;\n    hash >>= 8;\n    unsigned const slot2 = hash & 255;\n    hash >>= 8;\n\n    size_t const fclmask = ((size_t)1 << (bflog-6)) - 1;\n    size_t const cacheLineNb = (size_t)hash & fclmask;\n\n    size_t const pos1 = (cacheLineNb << 6) + (slot1 >> 3);\n    unsigned const shift1 = slot1 & 7;\n    unsigned const bit1 = 1U << shift1;\n    unsigned present1 = bf[pos1] & bit1;\n\n    size_t const pos2 = (cacheLineNb << 6) + (slot2 >> 3);\n    unsigned const shift2 = slot2 & 7;\n    unsigned const bit2 = 1U << shift2;\n    unsigned present2 = bf[pos2] & bit2;\n\n    unsigned const maybePresent = (present1 >> shift1) & (present2 >> shift2);\n    present1 &= -maybePresent;\n    present2 &= -maybePresent;\n\n    // Write presence\n    bf[pos1 + 32] |= (Filter)present1;\n    bf[pos2 + 32] |= (Filter)present2;\n    bf[pos1] |= (Filter)bit1;\n    bf[pos2] |= (Filter)bit2;\n\n    return (int)maybePresent;\n}\n\n\nstatic Filter* Filter_reduce(Filter* bf, int bflog)\n{\n    assert(6 < bflog && bflog < 64);\n    size_t const nbLines = (size_t)1 << (bflog - 6);\n    for (size_t lineNb = 0; lineNb < nbLines; lineNb++) {\n        memcpy(bf + lineNb*32, bf + lineNb*64 + 32, 32);\n    }\n    return realloc(bf, nbLines << 5);\n}\n\n/*\n * Check if provided 64-bit hash is a collision candidate\n * Requires both bit positions to be set.\n * return >0 if hash is a collision candidate\n *         0 otherwise (slot unoccupied, or only one candidate)\n * note: unoccupied slots should not happen in this algorithm,\n *       since all hashes are supposed to have been inserted at least once.\n */\nstatic inline int Filter_check(const Filter* bf, int bflog, uint64_t hash)\n{\n    hash = avalanche64(hash);\n    unsigned const slot1 = hash & 255;\n    hash >>= 8;\n    unsigned const slot2 = hash & 255;\n    hash >>= 8;\n\n    size_t const fclmask = ((size_t)1 << (bflog-6)) - 1;\n    size_t const lineNb = (size_t)hash & fclmask;\n\n    size_t const pos1 = (lineNb << 5) + (slot1 >> 3);\n    unsigned const shift1 = slot1 & 7;\n    unsigned const present1 = (bf[pos1] >> shift1) & 1;\n\n    size_t const pos2 = (lineNb << 5) + (slot2 >> 3);\n    unsigned const shift2 = slot2 & 7;\n    unsigned const present2 = (bf[pos2] >> shift2) & 1;\n\n    return (int)(present1 & present2);\n}\n\n#endif // FILTER_1_PROBE\n\n\n/* ===  Display  === */\n\n#include <time.h>   /* clock_t, clock, time_t, time, difftime */\n\nvoid update_indicator(uint64_t v, uint64_t total)\n{\n    static clock_t start = 0;\n    if (start==0) start = clock();\n    clock_t const updateRate = CLOCKS_PER_SEC / 2;\n\n    clock_t const clockSpan = (clock_t)(clock() - start);\n    if (clockSpan > updateRate) {\n        start = clock();\n        assert(v <= total);\n        assert(total > 0);\n        double share = ((double)v / (double)total) * 100;\n        printf(\"%6.2f%% (%llu)  \\r\", share, (unsigned long long)v);\n        fflush(NULL);\n    }\n}\n\n/* note: not thread safe */\nconst char* displayDelay(double delay_s)\n{\n    static char delayString[50];\n    memset(delayString, 0, sizeof(delayString));\n\n    int const mn = ((int)delay_s / 60) % 60;\n    int const h = (int)delay_s / 3600;\n    int const sec = (int)delay_s % 60;\n\n    char* p = delayString;\n    if (h) sprintf(p, \"%i h \", h);\n    if (mn || h) {\n        p = delayString + strlen(delayString);\n        sprintf(p, \"%i mn \", mn);\n    }\n    p = delayString + strlen(delayString);\n    sprintf(p, \"%is \", sec);\n\n    return delayString;\n}\n\n\n/* ===  Math  === */\n\nstatic double power(uint64_t base, int p)\n{\n    double value = 1;\n    assert(p>=0);\n    for (int i=0; i<p; i++) {\n        value *= (double)base;\n    }\n    return value;\n}\n\nstatic double estimateNbCollisions(uint64_t nbH, int nbBits)\n{\n    return ((double)nbH * (double)(nbH-1)) / power(2, nbBits+1);\n}\n\nstatic int highestBitSet(uint64_t v)\n{\n    assert(v!=0);\n    int bitId = 0;\n    while (v >>= 1) bitId++;\n    return bitId;\n}\n\n\n/* ===  Filter and search collisions  === */\n\n#undef NDEBUG   /* ensure assert is not disabled */\n#include <assert.h>\n\n/* will recommend 24 billion samples for 64-bit hashes,\n * expecting 18 collisions for a good 64-bit hash */\n#define NB_BITS_MAX 64   /* can't store nor analyze hash wider than 64-bits for the time being */\nuint64_t select_nbh(int nbBits)\n{\n    assert(nbBits > 0);\n    if (nbBits > NB_BITS_MAX) nbBits = NB_BITS_MAX;\n    double targetColls = (double)((128 + 17) - (nbBits * 2));\n    uint64_t nbH = 24;\n    while (estimateNbCollisions(nbH, nbBits) < targetColls) nbH *= 2;\n    return nbH;\n}\n\n\ntypedef struct {\n    uint64_t nbCollisions;\n} searchCollisions_results;\n\ntypedef struct {\n    uint64_t nbH;\n    uint64_t mask;\n    uint64_t maskSelector;\n    size_t sampleSize;\n    uint64_t prngSeed;\n    int filterLog;      /* <0 = disable filter;  0 = auto-size; */\n    int hashID;\n    int display;\n    int nbThreads;\n    searchCollisions_results* resultPtr;\n} searchCollisions_parameters;\n\n#define DISPLAY(...) { if (display) printf(__VA_ARGS__); }\n\nstatic int isEqual(void* hTablePtr, size_t index1, size_t index2, Htype_e htype)\n{\n    if ((htype == ht64) || (htype == ht32)) {\n        uint64_t const h1 = ((const uint64_t*)hTablePtr)[index1];\n        uint64_t const h2 = ((const uint64_t*)hTablePtr)[index2];\n        return (h1 == h2);\n    } else {\n        assert(htype == ht128);\n        XXH128_hash_t const h1 = ((const XXH128_hash_t*)hTablePtr)[index1];\n        XXH128_hash_t const h2 = ((const XXH128_hash_t*)hTablePtr)[index2];\n        return XXH128_isEqual(h1, h2);\n    }\n}\n\nstatic int isHighEqual(void* hTablePtr, size_t index1, size_t index2, Htype_e htype, int rShift)\n{\n    uint64_t h1, h2;\n    if ((htype == ht64) || (htype == ht32)) {\n        h1 = ((const uint64_t*)hTablePtr)[index1];\n        h2 = ((const uint64_t*)hTablePtr)[index2];\n    } else {\n        assert(htype == ht128);\n        h1 = ((const XXH128_hash_t*)hTablePtr)[index1].high64;\n        h2 = ((const XXH128_hash_t*)hTablePtr)[index2].high64;\n        assert(rShift >= 64);\n        rShift -= 64;\n    }\n    assert(0 <= rShift && rShift < 64);\n    return (h1 >> rShift) == (h2 >> rShift);\n}\n\n/* assumption: (htype*)hTablePtr[index] is valid */\nstatic void addHashCandidate(void* hTablePtr, UniHash h, Htype_e htype, size_t index)\n{\n    if ((htype == ht64) || (htype == ht32)) {\n        ((uint64_t*)hTablePtr)[index] = h.h64;\n    } else {\n        assert(htype == ht128);\n        ((XXH128_hash_t*)hTablePtr)[index] = h.h128;\n    }\n}\n\nstatic int getNbBits_fromHtype(Htype_e htype) {\n    switch(htype) {\n        case ht32: return 32;\n        case ht64: return 64;\n        case ht128:return 128;\n        default: EXIT(\"hash size not supported\");\n    }\n}\n\nstatic Htype_e getHtype_fromHbits(int nbBits) {\n    switch(nbBits) {\n        case 32 : return ht32;\n        case 64 : return ht64;\n        case 128: return ht128;\n        default: EXIT(\"hash size not supported\");\n    }\n}\n\nstatic size_t search_collisions(\n    searchCollisions_parameters param)\n{\n    uint64_t totalH = param.nbH;\n    const uint64_t hMask = param.mask;\n    const uint64_t hSelector = param.maskSelector;\n    int bflog = param.filterLog;\n    const int filter = (param.filterLog >= 0);\n    const size_t sampleSize = param.sampleSize;\n    const int hashID = param.hashID;\n    const Htype_e htype = getHtype_fromHbits(hashfnTable[hashID].bits);\n    const int display = param.display;\n    /* init */\n    sampleFactory* const sf = create_sampleFactory(sampleSize, totalH, param.prngSeed);\n    if (!sf) EXIT(\"not enough memory\");\n\n    //const char* const hname = hashfnTable[hashID].name;\n    hashfn const hfunction = hashfnTable[hashID].fn;\n    int const hwidth = hashfnTable[hashID].bits;\n    if (totalH == 0) totalH = select_nbh(hwidth);\n    if (bflog == 0) bflog = highestBitSet(totalH) + 1;   /* auto-size filter */\n    uint64_t const bfsize = (1ULL << bflog);\n\n\n    /* ===  filter hashes (optional)  === */\n\n    Filter* bf = NULL;\n    uint64_t maxNbH = totalH;\n\n    if (filter) {\n        time_t const filterTBegin = time(NULL);\n        DISPLAY(\" Creating filter (%i GB) \\n\", (int)(bfsize >> 30));\n        bf = create_Filter(bflog);\n        if (!bf) EXIT(\"not enough memory for filter\");\n\n        DISPLAY(\" Generate %llu hashes from samples of %u bytes \\n\",\n                (unsigned long long)totalH, (unsigned)sampleSize);\n        maxNbH = 0;\n\n        for (uint64_t n=0; n < totalH; n++) {\n            if (display && ((n&0xFFFFF) == 1) )\n                update_indicator(n, totalH);\n            update_sampleFactory(sf);\n\n            UniHash const h = hfunction(sf->buffer, sampleSize);\n            if ((h.h64 & hMask) != hSelector) continue;\n\n            maxNbH += 2 * (uint64_t)Filter_insert(bf, bflog, h.h64);\n        }\n\n        if (maxNbH==0) {\n            DISPLAY(\" Analysis completed: No collision detected \\n\");\n            if (param.resultPtr) param.resultPtr->nbCollisions = 0;\n            free_Filter(bf);\n            free_sampleFactory(sf);\n            return 0;\n        }\n\n        {   double const filterDelay = difftime(time(NULL), filterTBegin);\n            DISPLAY(\" Generation and filter completed in %s, detected up to %llu candidates \\n\",\n                    displayDelay(filterDelay), (unsigned long long) maxNbH);\n        }\n\n        bf = Filter_reduce(bf, bflog);\n        if (bf == NULL) EXIT(\"filter reduction failed\");\n    }\n\n    /* === store hash candidates: duplicates will be present here === */\n\n    time_t const storeTBegin = time(NULL);\n    size_t const hashByteSize = (htype == ht128) ? 16 : 8;\n    size_t const tableSize = (size_t)((maxNbH+1) * hashByteSize);\n    assert(tableSize > maxNbH);  /* check tableSize calculation overflow */\n    DISPLAY(\" Storing hash candidates (%i MB) \\n\", (int)(tableSize >> 20));\n\n    /* Generate and store hashes */\n    void* const hashCandidates = malloc(tableSize);\n    if (!hashCandidates) EXIT(\"not enough memory to store candidates\");\n    init_sampleFactory(sf, totalH);\n    size_t nbCandidates = 0;\n    for (uint64_t n=0; n < totalH; n++) {\n        if (display && ((n&0xFFFFF) == 1) ) update_indicator(n, totalH);\n        update_sampleFactory(sf);\n\n        UniHash const h = hfunction(sf->buffer, sampleSize);\n        if ((h.h64 & hMask) != hSelector) continue;\n\n        if (filter) {\n            if (Filter_check(bf, bflog, h.h64)) {\n                //printf(\"found %zu candidates / %llu generated \\n\", nbCandidates, n);\n                assert(nbCandidates < maxNbH);\n                addHashCandidate(hashCandidates, h, htype, nbCandidates++);\n            }\n        } else {\n            assert(nbCandidates < maxNbH);\n            addHashCandidate(hashCandidates, h, htype, nbCandidates++);\n        }\n    }\n    if (nbCandidates < maxNbH) {\n        /* Try to mitigate gnuc_quicksort behavior, by reducing allocated memory,\n         * since gnuc_quicksort uses a lot of additional memory for mergesort */\n        void* const checkPtr = realloc(hashCandidates, nbCandidates * hashByteSize);\n        assert(checkPtr != NULL);\n        assert(checkPtr == hashCandidates);  /* simplification: since we are reducing the size,\n                                              * we hope to keep the same ptr position.\n                                              * Otherwise, hashCandidates must be mutable. */\n        DISPLAY(\" List of hashes reduced to %u MB from %u MB (saved %u MB) \\n\",\n                (unsigned)((nbCandidates * hashByteSize) >> 20),\n                (unsigned)(tableSize >> 20),\n                (unsigned)((tableSize - (nbCandidates * hashByteSize)) >> 20) );\n    }\n    double const storeTDelay = difftime(time(NULL), storeTBegin);\n    DISPLAY(\" Stored %llu hash candidates in %s \\n\",\n            (unsigned long long) nbCandidates, displayDelay(storeTDelay));\n    free_Filter(bf);\n    free_sampleFactory(sf);\n\n\n    /* === step 3: look for duplicates === */\n    time_t const sortTBegin = time(NULL);\n    DISPLAY(\" Sorting candidates... \");\n    fflush(NULL);\n    if ((htype == ht64) || (htype == ht32)) {\n        /*\n         * Use C++'s std::sort, as it's faster than C stdlib's qsort, and\n         * doesn't suffer from gnuc_libsort's memory expansion\n         */\n        sort64(hashCandidates, nbCandidates);\n    } else {\n        assert(htype == ht128);\n        sort128(hashCandidates, nbCandidates); /* sort with custom comparator */\n    }\n    double const sortTDelay = difftime(time(NULL), sortTBegin);\n    DISPLAY(\" Completed in %s \\n\", displayDelay(sortTDelay));\n\n    /* scan and count duplicates */\n    time_t const countBegin = time(NULL);\n    DISPLAY(\" Looking for duplicates: \");\n    fflush(NULL);\n    size_t collisions = 0;\n    for (size_t n=1; n<nbCandidates; n++) {\n        if (isEqual(hashCandidates, n, n-1, htype)) {\n#if defined(COL_DISPLAY_DUPLICATES)\n            printf(\"collision: \");\n            printHash(hashCandidates, n, htype);\n            printf(\" / \");\n            printHash(hashCandidates, n-1, htype);\n            printf(\" \\n\");\n#endif\n            collisions++;\n    }   }\n\n    if (!filter /* all candidates */ && display /*single thead*/ ) {\n        /* check partial bitfields (high bits) */\n        DISPLAY(\" \\n\");\n        int const hashBits = getNbBits_fromHtype(htype);\n        double worstRatio = 0.;\n        int worstNbHBits = 0;\n        for (int nbHBits = 1; nbHBits < hashBits; nbHBits++) {\n            uint64_t const nbSlots = (uint64_t)1 << nbHBits;\n            double const expectedCollisions = estimateNbCollisions(nbCandidates, nbHBits);\n            if ( (nbSlots > nbCandidates * 100)  /* within range for meaningful collision analysis results */\n              && (expectedCollisions > 18.0) ) {\n                int const rShift = hashBits - nbHBits;\n                size_t HBits_collisions = 0;\n                for (size_t n=1; n<nbCandidates; n++) {\n                    if (isHighEqual(hashCandidates, n, n-1, htype, rShift)) {\n                        HBits_collisions++;\n                }   }\n                double const collisionRatio = (double)HBits_collisions / expectedCollisions;\n                if (collisionRatio > 2.0) DISPLAY(\"WARNING !!!  ===> \");\n                DISPLAY(\" high %i bits: %zu collision (%.1f expected): x%.2f \\n\",\n                        nbHBits, HBits_collisions, expectedCollisions, collisionRatio);\n                if (collisionRatio > worstRatio) {\n                    worstNbHBits = nbHBits;\n                    worstRatio = collisionRatio;\n        }   }   }\n        DISPLAY(\"Worst collision ratio at %i high bits: x%.2f \\n\",\n                worstNbHBits, worstRatio);\n    }\n    double const countDelay = difftime(time(NULL), countBegin);\n    DISPLAY(\" Completed in %s \\n\", displayDelay(countDelay));\n\n    /* clean and exit */\n    free (hashCandidates);\n\n#if 0  /* debug */\n    for (size_t n=0; n<nbCandidates; n++)\n        printf(\"0x%016llx \\n\", (unsigned long long)hashCandidates[n]);\n#endif\n\n    if (param.resultPtr) param.resultPtr->nbCollisions = collisions;\n    return collisions;\n}\n\n\n\n#if defined(__MACH__) || defined(__linux__)\n\n#include <sys/resource.h>\nstatic size_t getProcessMemUsage(int children)\n{\n    struct rusage stats;\n    if (getrusage(children ? RUSAGE_CHILDREN : RUSAGE_SELF, &stats) == 0)\n      return (size_t)stats.ru_maxrss;\n    return 0;\n}\n\n#else\nstatic size_t getProcessMemUsage(int ignore) { (void)ignore; return 0; }\n#endif\n\nvoid time_collisions(searchCollisions_parameters param)\n{\n    uint64_t totalH = param.nbH;\n    int hashID = param.hashID;\n    int display = param.display;\n\n    /* init */\n    assert(0 <= hashID && hashID < HASH_FN_TOTAL);\n    //const char* const hname = hashfnTable[hashID].name;\n    int const hwidth = hashfnTable[hashID].bits;\n    if (totalH == 0) totalH = select_nbh(hwidth);\n    double const targetColls = estimateNbCollisions(totalH, hwidth);\n\n    /* Start the timer to measure start/end of hashing + collision detection. */\n    time_t const programTBegin = time(NULL);\n\n    /* Generate hashes, and count collisions */\n    size_t const collisions = search_collisions(param);\n\n    /* display results */\n    double const programTDelay = difftime(time(NULL), programTBegin);\n    size_t const programBytesSelf = getProcessMemUsage(0);\n    size_t const programBytesChildren = getProcessMemUsage(1);\n    DISPLAY(\"\\n\\n\");\n    DISPLAY(\"===>   Found %llu collisions (x%.2f, %.1f expected) in %s\\n\",\n            (unsigned long long)collisions,\n            (double)collisions / targetColls,\n            targetColls,\n            displayDelay(programTDelay));\n    if (programBytesSelf)\n      DISPLAY(\"===>   MaxRSS(self) %zuMB, MaxRSS(children) %zuMB\\n\",\n              programBytesSelf>>20,\n              programBytesChildren>>20);\n    DISPLAY(\"------------------------------------------ \\n\");\n}\n\n// wrapper for pthread interface\nvoid MT_searchCollisions(void* payload)\n{\n    search_collisions(*(searchCollisions_parameters*)payload);\n}\n\n/* ===  Command Line  === */\n\n/*!\n * readU64FromChar():\n * Allows and interprets K, KB, KiB, M, MB and MiB suffix.\n * Will also modify `*stringPtr`, advancing it to the position where it stopped reading.\n */\nstatic uint64_t readU64FromChar(const char** stringPtr)\n{\n    static uint64_t const max = (((uint64_t)(-1)) / 10) - 1;\n    uint64_t result = 0;\n    while ((**stringPtr >='0') && (**stringPtr <='9')) {\n        assert(result < max);\n        result *= 10;\n        result += (unsigned)(**stringPtr - '0');\n        (*stringPtr)++ ;\n    }\n    if ((**stringPtr=='K') || (**stringPtr=='M') || (**stringPtr=='G')) {\n        uint64_t const maxK = ((uint64_t)(-1)) >> 10;\n        assert(result < maxK);\n        result <<= 10;\n        if ((**stringPtr=='M') || (**stringPtr=='G')) {\n            assert(result < maxK);\n            result <<= 10;\n            if (**stringPtr=='G') {\n                assert(result < maxK);\n                result <<= 10;\n            }\n        }\n        (*stringPtr)++;  /* skip `K` or `M` */\n        if (**stringPtr=='i') (*stringPtr)++;\n        if (**stringPtr=='B') (*stringPtr)++;\n    }\n    return result;\n}\n\n\n/**\n * longCommandWArg():\n * Checks if *stringPtr is the same as longCommand.\n * If yes, @return 1 and advances *stringPtr to the position which immediately follows longCommand.\n * @return 0 and doesn't modify *stringPtr otherwise.\n */\nstatic int longCommandWArg(const char** stringPtr, const char* longCommand)\n{\n    assert(longCommand); assert(stringPtr); assert(*stringPtr);\n    size_t const comSize = strlen(longCommand);\n    int const result = !strncmp(*stringPtr, longCommand, comSize);\n    if (result) *stringPtr += comSize;\n    return result;\n}\n\n\n#include \"pool.h\"\n\n/*\n * As some hashes use different algorithms depending on input size,\n * it can be necessary to test multiple input sizes\n * to paint an accurate picture of collision performance\n */\n#define SAMPLE_SIZE_DEFAULT 256\n#define HASHFN_ID_DEFAULT 0\n\nvoid help(const char* exeName)\n{\n    printf(\"usage: %s [hashName] [opt] \\n\\n\", exeName);\n    printf(\"list of hashNames:\");\n    printf(\"%s \", hashfnTable[0].name);\n    for (int i=1; i < HASH_FN_TOTAL; i++) {\n        printf(\", %s \", hashfnTable[i].name);\n    }\n    printf(\" \\n\");\n    printf(\"Default hashName is %s\\n\", hashfnTable[HASHFN_ID_DEFAULT].name);\n\n    printf(\" \\n\");\n    printf(\"Optional parameters: \\n\");\n    printf(\"  --nbh=NB       Select nb of hashes to generate (%llu by default) \\n\", (unsigned long long)select_nbh(64));\n    printf(\"  --filter       Activates the filter. Slower, but reduces memory usage for the same nb of hashes.\\n\");\n    printf(\"  --threadlog=NB Use 2^NB threads.\\n\");\n    printf(\"  --len=MB       Set length of the input (%i bytes by default) \\n\", SAMPLE_SIZE_DEFAULT);\n}\n\nint bad_argument(const char* exeName)\n{\n    printf(\"incorrect command: \\n\");\n    help(exeName);\n    return 1;\n}\n\n\nint main(int argc, const char** argv)\n{\n    printf(\" *** Collision tester for 64+ bit hashes ***  \\n\\n\");\n\n    assert(argc > 0);\n    const char* const exeName = argv[0];\n    uint64_t totalH = 0;  /* auto, based on nbBits */\n    int bflog = 0;    /* auto */\n    int filter = 0;   /* disabled */\n    size_t sampleSize = SAMPLE_SIZE_DEFAULT;\n    int hashID = HASHFN_ID_DEFAULT;\n    int threadlog = 0;\n    uint64_t prngSeed = 0;\n\n    int arg_nb;\n    for (arg_nb = 1; arg_nb < argc; arg_nb++) {\n        const char** arg = argv + arg_nb;\n\n        if (!strcmp(*arg, \"-h\")) { help(exeName); return 0; }\n        if (longCommandWArg(arg, \"-T\")) { threadlog = (int)readU64FromChar(arg); continue; }\n\n        if (!strcmp(*arg, \"--filter\"))    { filter=1; continue; }\n        if (!strcmp(*arg, \"--no-filter\")) { filter=0; continue; }\n\n        if (longCommandWArg(arg, \"--seed\")) { prngSeed = readU64FromChar(arg); continue; }\n        if (longCommandWArg(arg, \"--nbh=\")) { totalH = readU64FromChar(arg); continue; }\n        if (longCommandWArg(arg, \"--filter=\")) { filter=1; bflog = (int)readU64FromChar(arg); assert(bflog < 64); continue; }\n        if (longCommandWArg(arg, \"--filterlog=\")) { filter=1; bflog = (int)readU64FromChar(arg); assert(bflog < 64); continue; }\n        if (longCommandWArg(arg, \"--size=\")) { sampleSize = (size_t)readU64FromChar(arg); continue; }\n        if (longCommandWArg(arg, \"--len=\")) { sampleSize = (size_t)readU64FromChar(arg); continue; }\n        if (longCommandWArg(arg, \"--threadlog=\")) { threadlog = (int)readU64FromChar(arg); continue; }\n\n        /* argument understood as hash name (must be correct) */\n        int hnb;\n        for (hnb=0; hnb < HASH_FN_TOTAL; hnb++) {\n            if (!strcmp(*arg, hashfnTable[hnb].name)) { hashID = hnb; break; }\n        }\n        if (hnb == HASH_FN_TOTAL) return bad_argument(exeName);\n    }\n\n    /* init */\n    const char* const hname = hashfnTable[hashID].name;\n    int const hwidth = hashfnTable[hashID].bits;\n    if (totalH == 0) totalH = select_nbh(hwidth);\n    double const targetColls = estimateNbCollisions(totalH, hwidth);\n    if (bflog == 0) bflog = highestBitSet(totalH) + 1;   /* auto-size filter */\n    if (!filter) bflog = -1; // disable filter\n\n    if (sizeof(size_t) < 8) {\n        printf(\"warning: in 32-bit mode, the program is more likely going to lack address space \\n\");\n    }\n\n    printf(\"Testing %s algorithm (%i-bit) \\n\", hname, hwidth);\n    printf(\"This program will allocate a lot of memory,\\n\");\n    printf(\"generate %llu %i-bit hashes from samples of %u bytes, \\n\",\n            (unsigned long long)totalH, hwidth, (unsigned)sampleSize);\n    printf(\"and attempt to produce %.0f collisions. \\n\\n\", targetColls);\n\n    int const nbThreads = 1 << threadlog;\n    if (nbThreads <= 0) EXIT(\"Invalid --threadlog value.\");\n\n    if (nbThreads == 1) {\n\n        searchCollisions_parameters params;\n        params.nbH = totalH;\n        params.mask = 0;\n        params.maskSelector = 0;\n        params.sampleSize = sampleSize;\n        params.filterLog = bflog;\n        params.hashID = hashID;\n        params.display = 1;\n        params.resultPtr = NULL;\n        params.prngSeed = prngSeed;\n        params.nbThreads = 1;\n        time_collisions(params);\n\n    } else { /*  nbThreads > 1 */\n\n        /* use multithreading */\n        if (threadlog >= 30) EXIT(\"too many threads requested\");\n        if ((uint64_t)nbThreads > (totalH >> 16))\n            EXIT(\"too many threads requested\");\n        if (bflog > 0 && threadlog > (bflog-10))\n            EXIT(\"too many threads requested\");\n        printf(\"using %i threads ... \\n\", nbThreads);\n\n        /* allocation */\n        time_t const programTBegin = time(NULL);\n        POOL_ctx* const pt = POOL_create((size_t)nbThreads, 1);\n        if (!pt) EXIT(\"not enough memory for threads\");\n        searchCollisions_results* const MTresults = calloc ((size_t)nbThreads, sizeof(searchCollisions_results));\n        if (!MTresults) EXIT(\"not enough memory\");\n        searchCollisions_parameters* const MTparams = calloc ((size_t)nbThreads, sizeof(searchCollisions_parameters));\n        if (!MTparams) EXIT(\"not enough memory\");\n\n        /* distribute jobs */\n        for (int tnb=0; tnb<nbThreads; tnb++) {\n            MTparams[tnb].nbH = totalH;\n            MTparams[tnb].mask = (uint64_t)nbThreads - 1;\n            MTparams[tnb].sampleSize = sampleSize;\n            MTparams[tnb].filterLog = bflog ? bflog - threadlog : 0;\n            MTparams[tnb].hashID = hashID;\n            MTparams[tnb].display = 0;\n            MTparams[tnb].resultPtr = MTresults+tnb;\n            MTparams[tnb].prngSeed = prngSeed;\n            MTparams[tnb].maskSelector = (uint64_t)tnb;\n            POOL_add(pt, MT_searchCollisions, MTparams + tnb);\n        }\n        POOL_free(pt);  /* actually joins and free */\n\n        /* Gather results */\n        uint64_t nbCollisions=0;\n        for (int tnb=0; tnb<nbThreads; tnb++) {\n            nbCollisions += MTresults[tnb].nbCollisions;\n        }\n\n        double const programTDelay = difftime(time(NULL), programTBegin);\n        size_t const programBytesSelf = getProcessMemUsage(0);\n        size_t const programBytesChildren = getProcessMemUsage(1);\n        printf(\"\\n\\n\");\n        printf(\"===>   Found %llu collisions (x%.2f, %.1f expected) in %s\\n\",\n                (unsigned long long)nbCollisions,\n                (double)nbCollisions / targetColls,\n                targetColls,\n                displayDelay(programTDelay));\n        if (programBytesSelf)\n          printf(\"===>   MaxRSS(self) %zuMB, MaxRSS(children) %zuMB\\n\",\n                 programBytesSelf>>20,\n                 programBytesChildren>>20);\n        printf(\"------------------------------------------ \\n\");\n\n        /* Clean up */\n        free(MTparams);\n        free(MTresults);\n    }\n\n    return 0;\n}\n"
  },
  {
    "path": "third-party/xxhash/tests/collisions/pool.c",
    "content": "/*\n * Copyright (C) 2016-2021 Yann Collet, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under both the BSD-style license (found in the\n * LICENSE file in the root directory of this source tree) and the GPLv2 (found\n * in the COPYING file in the root directory of this source tree).\n * You may select, at your option, one of the above-listed licenses.\n */\n\n\n/* ======   Dependencies   ======= */\n#include <stddef.h>    /* size_t */\n#include <stdlib.h>    /* malloc, calloc, free */\n#include <string.h>    /* memcpy */\n#include <assert.h>\n\n#include \"pool.h\"\n\n\n/* ======   Compiler specifics   ====== */\n#if defined(_MSC_VER)\n#  pragma warning(disable : 4204)        /* disable: C4204: non-constant aggregate initializer */\n#endif\n\n\n/* ===  Build Macro  === */\n\n#ifndef POOL_MT   // can be defined on command line\n#  define POOL_MT 1\n#endif\n\n\n/* ===  Implementation  === */\n\n#if POOL_MT\n\n#include \"threading.h\"   /* pthread adaptation */\n\n/* A job is a function and an opaque argument */\ntypedef struct POOL_job_s {\n    POOL_function function;\n    void *opaque;\n} POOL_job;\n\nstruct POOL_ctx_s {\n    /* Keep track of the threads */\n    ZSTD_pthread_t* threads;\n    size_t threadCapacity;\n    size_t threadLimit;\n\n    /* The queue is a circular buffer */\n    POOL_job *queue;\n    size_t queueHead;\n    size_t queueTail;\n    size_t queueSize;\n\n    /* The number of threads working on jobs */\n    size_t numThreadsBusy;\n    /* Indicates if the queue is empty */\n    int queueEmpty;\n\n    /* The mutex protects the queue */\n    ZSTD_pthread_mutex_t queueMutex;\n    /* Condition variable for pushers to wait on when the queue is full */\n    ZSTD_pthread_cond_t queuePushCond;\n    /* Condition variables for poppers to wait on when the queue is empty */\n    ZSTD_pthread_cond_t queuePopCond;\n    /* Indicates if the queue is shutting down */\n    int shutdown;\n};\n\n/* POOL_thread() :\n * Work thread for the thread pool.\n * Waits for jobs and executes them.\n * @returns : NULL on failure else non-null.\n */\nstatic void* POOL_thread(void* opaque)\n{\n    POOL_ctx* const ctx = (POOL_ctx*)opaque;\n    if (!ctx) { return NULL; }\n    for (;;) {\n        /* Lock the mutex and wait for a non-empty queue or until shutdown */\n        ZSTD_pthread_mutex_lock(&ctx->queueMutex);\n\n        while ( ctx->queueEmpty\n            || (ctx->numThreadsBusy >= ctx->threadLimit) ) {\n            if (ctx->shutdown) {\n                /* even if !queueEmpty, (possible if numThreadsBusy >= threadLimit),\n                 * a few threads will be shutdown while !queueEmpty,\n                 * but enough threads will remain active to finish the queue */\n                ZSTD_pthread_mutex_unlock(&ctx->queueMutex);\n                return opaque;\n            }\n            ZSTD_pthread_cond_wait(&ctx->queuePopCond, &ctx->queueMutex);\n        }\n        /* Pop a job off the queue */\n        {   POOL_job const job = ctx->queue[ctx->queueHead];\n            ctx->queueHead = (ctx->queueHead + 1) % ctx->queueSize;\n            ctx->numThreadsBusy++;\n            ctx->queueEmpty = ctx->queueHead == ctx->queueTail;\n            /* Unlock the mutex, signal a pusher, and run the job */\n            ZSTD_pthread_cond_signal(&ctx->queuePushCond);\n            ZSTD_pthread_mutex_unlock(&ctx->queueMutex);\n\n            job.function(job.opaque);\n\n            /* If the intended queue size was 0, signal after finishing job */\n            ZSTD_pthread_mutex_lock(&ctx->queueMutex);\n            ctx->numThreadsBusy--;\n            if (ctx->queueSize == 1) {\n                ZSTD_pthread_cond_signal(&ctx->queuePushCond);\n            }\n            ZSTD_pthread_mutex_unlock(&ctx->queueMutex);\n        }\n    }  /* for (;;) */\n    assert(0);  /* Unreachable */\n}\n\nPOOL_ctx* POOL_create(size_t numThreads, size_t queueSize)\n{\n    POOL_ctx* ctx;\n    /* Check parameters */\n    if (!numThreads) { return NULL; }\n    /* Allocate the context and zero initialize */\n    ctx = (POOL_ctx*)calloc(1, sizeof(POOL_ctx));\n    if (!ctx) { return NULL; }\n    /* Initialize the job queue.\n     * It needs one extra space since one space is wasted to differentiate\n     * empty and full queues.\n     */\n    ctx->queueSize = queueSize + 1;\n    ctx->queue = (POOL_job*)malloc(ctx->queueSize * sizeof(POOL_job));\n    ctx->queueHead = 0;\n    ctx->queueTail = 0;\n    ctx->numThreadsBusy = 0;\n    ctx->queueEmpty = 1;\n    (void)ZSTD_pthread_mutex_init(&ctx->queueMutex, NULL);\n    (void)ZSTD_pthread_cond_init(&ctx->queuePushCond, NULL);\n    (void)ZSTD_pthread_cond_init(&ctx->queuePopCond, NULL);\n    ctx->shutdown = 0;\n    /* Allocate space for the thread handles */\n    ctx->threads = (ZSTD_pthread_t*)malloc(numThreads * sizeof(ZSTD_pthread_t));\n    ctx->threadCapacity = 0;\n    /* Check for errors */\n    if (!ctx->threads || !ctx->queue) { POOL_free(ctx); return NULL; }\n    /* Initialize the threads */\n    {   size_t i;\n        for (i = 0; i < numThreads; ++i) {\n            if (ZSTD_pthread_create(&ctx->threads[i], NULL, &POOL_thread, ctx)) {\n                ctx->threadCapacity = i;\n                POOL_free(ctx);\n                return NULL;\n        }   }\n        ctx->threadCapacity = numThreads;\n        ctx->threadLimit = numThreads;\n    }\n    return ctx;\n}\n\n/*! POOL_join() :\n    Shutdown the queue, wake any sleeping threads, and join all of the threads.\n*/\nstatic void POOL_join(POOL_ctx* ctx) {\n    /* Shut down the queue */\n    ZSTD_pthread_mutex_lock(&ctx->queueMutex);\n    ctx->shutdown = 1;\n    ZSTD_pthread_mutex_unlock(&ctx->queueMutex);\n\n    /* Wake up sleeping threads */\n    ZSTD_pthread_cond_broadcast(&ctx->queuePushCond);\n    ZSTD_pthread_cond_broadcast(&ctx->queuePopCond);\n\n    /* Join all of the threads */\n    {   size_t i;\n        for (i = 0; i < ctx->threadCapacity; ++i) {\n            ZSTD_pthread_join(ctx->threads[i], NULL);  /* note : could fail */\n    }   }\n}\n\nvoid POOL_free(POOL_ctx *ctx) {\n    if (!ctx) { return; }\n    POOL_join(ctx);\n    ZSTD_pthread_mutex_destroy(&ctx->queueMutex);\n    ZSTD_pthread_cond_destroy(&ctx->queuePushCond);\n    ZSTD_pthread_cond_destroy(&ctx->queuePopCond);\n    free(ctx->queue);\n    free(ctx->threads);\n    free(ctx);\n}\n\n\n\nsize_t POOL_sizeof(POOL_ctx *ctx) {\n    if (ctx==NULL) return 0;  /* supports sizeof NULL */\n    return sizeof(*ctx)\n        + ctx->queueSize * sizeof(POOL_job)\n        + ctx->threadCapacity * sizeof(ZSTD_pthread_t);\n}\n\n\n/* @return : 0 on success, 1 on error */\nstatic int POOL_resize_internal(POOL_ctx* ctx, size_t numThreads)\n{\n    if (numThreads <= ctx->threadCapacity) {\n        if (!numThreads) return 1;\n        ctx->threadLimit = numThreads;\n        return 0;\n    }\n    /* numThreads > threadCapacity */\n    {   ZSTD_pthread_t* const threadPool = (ZSTD_pthread_t*)malloc(numThreads * sizeof(ZSTD_pthread_t));\n        if (!threadPool) return 1;\n        /* replace existing thread pool */\n        memcpy(threadPool, ctx->threads, ctx->threadCapacity * sizeof(*threadPool));\n        free(ctx->threads);\n        ctx->threads = threadPool;\n        /* Initialize additional threads */\n        {   size_t threadId;\n            for (threadId = ctx->threadCapacity; threadId < numThreads; ++threadId) {\n                if (ZSTD_pthread_create(&threadPool[threadId], NULL, &POOL_thread, ctx)) {\n                    ctx->threadCapacity = threadId;\n                    return 1;\n            }   }\n    }   }\n    /* successfully expanded */\n    ctx->threadCapacity = numThreads;\n    ctx->threadLimit = numThreads;\n    return 0;\n}\n\n/* @return : 0 on success, 1 on error */\nint POOL_resize(POOL_ctx* ctx, size_t numThreads)\n{\n    int result;\n    if (ctx==NULL) return 1;\n    ZSTD_pthread_mutex_lock(&ctx->queueMutex);\n    result = POOL_resize_internal(ctx, numThreads);\n    ZSTD_pthread_cond_broadcast(&ctx->queuePopCond);\n    ZSTD_pthread_mutex_unlock(&ctx->queueMutex);\n    return result;\n}\n\n/**\n * Returns 1 if the queue is full and 0 otherwise.\n *\n * When queueSize is 1 (pool was created with an intended queueSize of 0),\n * then a queue is empty if there is a thread free _and_ no job is waiting.\n */\nstatic int isQueueFull(POOL_ctx const* ctx) {\n    if (ctx->queueSize > 1) {\n        return ctx->queueHead == ((ctx->queueTail + 1) % ctx->queueSize);\n    } else {\n        return (ctx->numThreadsBusy == ctx->threadLimit) ||\n               !ctx->queueEmpty;\n    }\n}\n\n\nstatic void POOL_add_internal(POOL_ctx* ctx, POOL_function function, void *opaque)\n{\n    POOL_job const job = {function, opaque};\n    assert(ctx != NULL);\n    if (ctx->shutdown) return;\n\n    ctx->queueEmpty = 0;\n    ctx->queue[ctx->queueTail] = job;\n    ctx->queueTail = (ctx->queueTail + 1) % ctx->queueSize;\n    ZSTD_pthread_cond_signal(&ctx->queuePopCond);\n}\n\nvoid POOL_add(POOL_ctx* ctx, POOL_function function, void* opaque)\n{\n    assert(ctx != NULL);\n    ZSTD_pthread_mutex_lock(&ctx->queueMutex);\n    /* Wait until there is space in the queue for the new job */\n    while (isQueueFull(ctx) && (!ctx->shutdown)) {\n        ZSTD_pthread_cond_wait(&ctx->queuePushCond, &ctx->queueMutex);\n    }\n    POOL_add_internal(ctx, function, opaque);\n    ZSTD_pthread_mutex_unlock(&ctx->queueMutex);\n}\n\n\nint POOL_tryAdd(POOL_ctx* ctx, POOL_function function, void* opaque)\n{\n    assert(ctx != NULL);\n    ZSTD_pthread_mutex_lock(&ctx->queueMutex);\n    if (isQueueFull(ctx)) {\n        ZSTD_pthread_mutex_unlock(&ctx->queueMutex);\n        return 0;\n    }\n    POOL_add_internal(ctx, function, opaque);\n    ZSTD_pthread_mutex_unlock(&ctx->queueMutex);\n    return 1;\n}\n\n\n#else  /* POOL_MT  not defined */\n\n/* ========================== */\n/* No multi-threading support */\n/* ========================== */\n\n\n/* We don't need any data, but if it is empty, malloc() might return NULL. */\nstruct POOL_ctx_s {\n    int dummy;\n};\nstatic POOL_ctx g_ctx;\n\nPOOL_ctx* POOL_create(size_t numThreads, size_t queueSize) {\n    (void)numThreads;\n    (void)queueSize;\n    return &g_ctx;\n}\n\nvoid POOL_free(POOL_ctx* ctx) {\n    assert(!ctx || ctx == &g_ctx);\n    (void)ctx;\n}\n\nint POOL_resize(POOL_ctx* ctx, size_t numThreads) {\n    (void)ctx; (void)numThreads;\n    return 0;\n}\n\nvoid POOL_add(POOL_ctx* ctx, POOL_function function, void* opaque) {\n    (void)ctx;\n    function(opaque);\n}\n\nint POOL_tryAdd(POOL_ctx* ctx, POOL_function function, void* opaque) {\n    (void)ctx;\n    function(opaque);\n    return 1;\n}\n\nsize_t POOL_sizeof(POOL_ctx* ctx) {\n    if (ctx==NULL) return 0;  /* supports sizeof NULL */\n    assert(ctx == &g_ctx);\n    return sizeof(*ctx);\n}\n\n#endif  /* ZSTD_MULTITHREAD */\n"
  },
  {
    "path": "third-party/xxhash/tests/collisions/pool.h",
    "content": "/*\n * Copyright (c) 2016-2021 Yann Collet, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under both the BSD-style license (found in the\n * LICENSE file in the root directory of this source tree) and the GPLv2 (found\n * in the COPYING file in the root directory of this source tree).\n * You may select, at your option, one of the above-listed licenses.\n */\n\n#ifndef POOL_H\n#define POOL_H\n\n#if defined (__cplusplus)\nextern \"C\" {\n#endif\n\n\n#include <stddef.h>   /* size_t */\n\ntypedef struct POOL_ctx_s POOL_ctx;\n\n/*! POOL_create() :\n *  Create a thread pool with at most `numThreads` threads.\n * `numThreads` must be at least 1.\n *  The maximum number of queued jobs before blocking is `queueSize`.\n * @return : POOL_ctx pointer on success, else NULL.\n*/\nPOOL_ctx* POOL_create(size_t numThreads, size_t queueSize);\n\n/*! POOL_free() :\n *  Free a thread pool returned by POOL_create().\n */\nvoid POOL_free(POOL_ctx* ctx);\n\n/*! POOL_resize() :\n *  Expands or shrinks pool's number of threads.\n *  This is more efficient than releasing + creating a new context,\n *  since it tries to preserve and re-use existing threads.\n * `numThreads` must be at least 1.\n * @return : 0 when resize was successful,\n *           !0 (typically 1) if there is an error.\n *    note : only numThreads can be resized, queueSize remains unchanged.\n */\nint POOL_resize(POOL_ctx* ctx, size_t numThreads);\n\n/*! POOL_sizeof() :\n * @return threadpool memory usage\n *  note : compatible with NULL (returns 0 in this case)\n */\nsize_t POOL_sizeof(POOL_ctx* ctx);\n\n/*! POOL_function :\n *  The function type that can be added to a thread pool.\n */\ntypedef void (*POOL_function)(void*);\n\n/*! POOL_add() :\n *  Add the job `function(opaque)` to the thread pool. `ctx` must be valid.\n *  Possibly blocks until there is room in the queue.\n *  Note : The function may be executed asynchronously,\n *         therefore, `opaque` must live until function has been completed.\n */\nvoid POOL_add(POOL_ctx* ctx, POOL_function function, void* opaque);\n\n\n/*! POOL_tryAdd() :\n *  Add the job `function(opaque)` to thread pool _if_ a worker is available.\n *  Returns immediately even if not (does not block).\n * @return : 1 if successful, 0 if not.\n */\nint POOL_tryAdd(POOL_ctx* ctx, POOL_function function, void* opaque);\n\n\n\n#if defined (__cplusplus)\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "third-party/xxhash/tests/collisions/sort.cc",
    "content": "/*\n * sort.cc - C++ sort functions\n * Copyright (C) 2019-2021 Yann Collet\n * GPL v2 License\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n/*\n * C++ sort functions tend to run faster than C ones due to templates allowing\n * inline optimizations.\n * Also, glibc's qsort() seems to inflate memory usage, resulting in OOM\n * crashes on the test server.\n */\n\n#include <algorithm>  // std::sort\n#define XXH_INLINE_ALL  // XXH128_cmp\n#include <xxhash.h>\n\n#include \"sort.hh\"\n\nvoid sort64(uint64_t* table, size_t size)\n{\n    std::sort(table, table + size);\n}\n\n#include <stdlib.h>  // qsort\n\nvoid sort128(XXH128_hash_t* table, size_t size)\n{\n#if 0\n    // C++ sort using a custom function object\n    struct {\n        bool operator()(XXH128_hash_t a, XXH128_hash_t b) const\n        {\n            return XXH128_cmp(&a, &b);\n        }\n    } customLess;\n    std::sort(table, table + size, customLess);\n#else\n    qsort(table, size, sizeof(*table), XXH128_cmp);\n#endif\n}\n"
  },
  {
    "path": "third-party/xxhash/tests/collisions/sort.hh",
    "content": "/*\n * sort.hh - headers for C++ sort functions\n * Copyright (C) 2019-2021 Yann Collet\n * GPL v2 License\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * You can contact the author at :\n *   - xxHash homepage : https://www.xxhash.com\n *   - xxHash source repository : https://github.com/Cyan4973/xxHash\n */\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include <stddef.h>   // size\n#include <stdint.h>   // uint64_t\n#define XXH_STATIC_LINKING_ONLY  // XXH128_hash_t\n#include \"xxhash.h\"\n\nvoid sort64(uint64_t* table, size_t size);\n\nvoid sort128(XXH128_hash_t* table, size_t size);\n\n#ifdef __cplusplus\n}  // extern C\n#endif\n"
  },
  {
    "path": "third-party/xxhash/tests/collisions/threading.c",
    "content": "/**\n * Copyright (c) 2016 Tino Reichardt\n * All rights reserved.\n *\n * This source code is licensed under both the BSD-style license (found in the\n * LICENSE file in the root directory of this source tree) and the GPLv2 (found\n * in the COPYING file in the root directory of this source tree).\n *\n * You can contact the author at:\n * - zstdmt source repository: https://github.com/mcmilk/zstdmt\n */\n\n/**\n * This file will hold wrapper for systems, which do not support pthreads\n */\n\n\n /* ===  Build Macro  === */\n\n #ifndef POOL_MT   // can be defined on command line\n #  define POOL_MT 1\n #endif\n\n\n/* create fake symbol to avoid empty translation unit warning */\nint g_ZSTD_threading_useles_symbol;\n\n#if POOL_MT && defined(_WIN32)\n\n/**\n * Windows minimalist Pthread Wrapper\n */\n\n\n/* ===  Dependencies  === */\n#include <process.h>\n#include <errno.h>\n#include \"threading.h\"\n\n\n/* ===  Implementation  === */\n\nstatic unsigned __stdcall worker(void *arg)\n{\n    ZSTD_pthread_t* const thread = (ZSTD_pthread_t*) arg;\n    thread->arg = thread->start_routine(thread->arg);\n    return 0;\n}\n\nint ZSTD_pthread_create(ZSTD_pthread_t* thread, const void* unused,\n            void* (*start_routine) (void*), void* arg)\n{\n    (void)unused;\n    thread->arg = arg;\n    thread->start_routine = start_routine;\n    thread->handle = (HANDLE) _beginthreadex(NULL, 0, worker, thread, 0, NULL);\n\n    if (!thread->handle)\n        return errno;\n    else\n        return 0;\n}\n\nint ZSTD_pthread_join(ZSTD_pthread_t thread, void **value_ptr)\n{\n    DWORD result;\n\n    if (!thread.handle) return 0;\n\n    result = WaitForSingleObject(thread.handle, INFINITE);\n    switch (result) {\n    case WAIT_OBJECT_0:\n        if (value_ptr) *value_ptr = thread.arg;\n        return 0;\n    case WAIT_ABANDONED:\n        return EINVAL;\n    default:\n        return (int)GetLastError();\n    }\n}\n\n#endif   /* POOL_MT */\n"
  },
  {
    "path": "third-party/xxhash/tests/collisions/threading.h",
    "content": "/**\n * Copyright (c) 2016 Tino Reichardt\n * All rights reserved.\n *\n * This source code is licensed under both the BSD-style license (found in the\n * LICENSE file in the root directory of this source tree) and the GPLv2 (found\n * in the COPYING file in the root directory of this source tree).\n *\n * You can contact the author at:\n * - zstdmt source repository: https://github.com/mcmilk/zstdmt\n */\n\n#ifndef THREADING_H_938743\n#define THREADING_H_938743\n\n#if defined (__cplusplus)\nextern \"C\" {\n#endif\n\n/* ===  Build Macro  === */\n\n#ifndef POOL_MT   // can be defined on command line\n#  define POOL_MT 1\n#endif\n\n\n/* ===  Implementation  === */\n\n#if POOL_MT && defined(_WIN32)\n\n/**\n * Define windows version before include\n */\n#undef  WINVER\n#define WINVER       0x0600\n\n#undef  _WIN32_WINNT\n#define _WIN32_WINNT 0x0600\n\n#ifndef WIN32_LEAN_AND_MEAN\n#  define WIN32_LEAN_AND_MEAN\n#endif\n\n#include <windows.h>\n#include <stdio.h>\n\n/* mutex */\n#define ZSTD_pthread_mutex_t           CRITICAL_SECTION\n#define ZSTD_pthread_mutex_init(a, b)  ((void)(b), InitializeCriticalSection((a)), 0)\n#define ZSTD_pthread_mutex_destroy(a)  DeleteCriticalSection((a))\n#define ZSTD_pthread_mutex_lock(a)     EnterCriticalSection((a))\n#define ZSTD_pthread_mutex_unlock(a)   LeaveCriticalSection((a))\n\n/* condition variable */\n#define ZSTD_pthread_cond_t             CONDITION_VARIABLE\n#define ZSTD_pthread_cond_init(a, b)    ((void)(b), InitializeConditionVariable((a)), 0)\n#define ZSTD_pthread_cond_destroy(a)    ((void)(a))\n#define ZSTD_pthread_cond_wait(a, b)    SleepConditionVariableCS((a), (b), INFINITE)\n#define ZSTD_pthread_cond_signal(a)     WakeConditionVariable((a))\n#define ZSTD_pthread_cond_broadcast(a)  WakeAllConditionVariable((a))\n\n/* ZSTD_pthread_create() and ZSTD_pthread_join() */\ntypedef struct {\n    HANDLE handle;\n    void* (*start_routine)(void*);\n    void* arg;\n} ZSTD_pthread_t;\n\nint ZSTD_pthread_create(ZSTD_pthread_t* thread, const void* unused,\n                   void* (*start_routine) (void*), void* arg);\n\nint ZSTD_pthread_join(ZSTD_pthread_t thread, void** value_ptr);\n\n/**\n * add here more wrappers as required\n */\n\n\n#elif POOL_MT   /* posix assumed ; need a better detection method */\n/* ===   POSIX Systems   === */\n#  include <pthread.h>\n\n#define ZSTD_pthread_mutex_t            pthread_mutex_t\n#define ZSTD_pthread_mutex_init(a, b)   pthread_mutex_init((a), (b))\n#define ZSTD_pthread_mutex_destroy(a)   pthread_mutex_destroy((a))\n#define ZSTD_pthread_mutex_lock(a)      pthread_mutex_lock((a))\n#define ZSTD_pthread_mutex_unlock(a)    pthread_mutex_unlock((a))\n\n#define ZSTD_pthread_cond_t             pthread_cond_t\n#define ZSTD_pthread_cond_init(a, b)    pthread_cond_init((a), (b))\n#define ZSTD_pthread_cond_destroy(a)    pthread_cond_destroy((a))\n#define ZSTD_pthread_cond_wait(a, b)    pthread_cond_wait((a), (b))\n#define ZSTD_pthread_cond_signal(a)     pthread_cond_signal((a))\n#define ZSTD_pthread_cond_broadcast(a)  pthread_cond_broadcast((a))\n\n#define ZSTD_pthread_t                  pthread_t\n#define ZSTD_pthread_create(a, b, c, d) pthread_create((a), (b), (c), (d))\n#define ZSTD_pthread_join(a, b)         pthread_join((a),(b))\n\n#else  /* POOL_MT == 0 */\n/* No multithreading support */\n\ntypedef int ZSTD_pthread_mutex_t;\n#define ZSTD_pthread_mutex_init(a, b)   ((void)(a), (void)(b), 0)\n#define ZSTD_pthread_mutex_destroy(a)   ((void)(a))\n#define ZSTD_pthread_mutex_lock(a)      ((void)(a))\n#define ZSTD_pthread_mutex_unlock(a)    ((void)(a))\n\ntypedef int ZSTD_pthread_cond_t;\n#define ZSTD_pthread_cond_init(a, b)    ((void)(a), (void)(b), 0)\n#define ZSTD_pthread_cond_destroy(a)    ((void)(a))\n#define ZSTD_pthread_cond_wait(a, b)    ((void)(a), (void)(b))\n#define ZSTD_pthread_cond_signal(a)     ((void)(a))\n#define ZSTD_pthread_cond_broadcast(a)  ((void)(a))\n\n/* do not use ZSTD_pthread_t */\n\n#endif /* POOL_MT */\n\n#if defined (__cplusplus)\n}\n#endif\n\n#endif /* THREADING_H_938743 */\n"
  },
  {
    "path": "third-party/xxhash/tests/filename-escape.sh",
    "content": "#!/bin/bash\n\n# Exit immediately if any command fails.\n# https://stackoverflow.com/a/2871034\nset -euxo pipefail\n\necho filename-escape-test-string > $'filename-escape-foo\\nbar'\n\n./xxhsum $'filename-escape-foo\\nbar' | tee filename-escape-xxh64.txt\ncat filename-escape-xxh64.txt\n./xxhsum -c filename-escape-xxh64.txt\nhexdump -C filename-escape-xxh64.txt\n\n./xxhsum --tag $'filename-escape-foo\\nbar' | tee filename-escape-xxh64-tag.txt\ncat filename-escape-xxh64-tag.txt\n./xxhsum -c filename-escape-xxh64-tag.txt\nhexdump -C filename-escape-xxh64-tag.txt\n\nrm filename-escape-xxh64-tag.txt\nrm filename-escape-xxh64.txt\nrm $'filename-escape-foo\\nbar'\n"
  },
  {
    "path": "third-party/xxhash/tests/generate_unicode_test.c",
    "content": "/*\n * Generates a Unicode test for xxhsum without using Unicode in the source files.\n *\n * Copyright (C) 2020 Devin Hussey (easyaspi314)\n *\n * BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n *     * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n *     * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * Certain terminals don't properly handle UTF-8 (i.e. rxvt and command prompt\n * in the default codepage), and that can cause issues when editing text.\n *\n * We use this C file to generate a file with a Unicode filename, a file with\n * a checksum of said file, and both a Windows batch script and a Unix shell\n * script to test the file.\n */\n\n#define _CRT_SECURE_NO_WARNINGS /* Silence warnings on MSVC */\n#include <stdio.h>\n\n/* Use a Japanese filename, something that can't be cheated with ANSI.\n * yuniko-do.unicode (literally unicode.unicode) */\n\n/* Use raw hex values to ensure that the output is well-formed UTF-8. It is also more C90 compliant. */\nstatic const char FILENAME[] = {\n    (char)0xe3, (char)0x83, (char)0xa6,  /* U+30e6: Katakana letter yu */\n    (char)0xe3, (char)0x83, (char)0x8b,  /* U+30cb: Katakana letter ni */\n    (char)0xe3, (char)0x82, (char)0xb3,  /* U+30b3: Katakana letter ko */\n    (char)0xe3, (char)0x83, (char)0xbc,  /* U+30fc: Katakana-Hiragana prolonged sound mark (dash) */\n    (char)0xe3, (char)0x83, (char)0x89,  /* U+30c9: Katakana letter do */\n    '.','u','n','i','c','o','d','e','\\0' /* \".unicode\" (so we can glob in make clean and .gitignore) */\n};\n\n#ifdef _WIN32\n/* The same text as above, but encoded in Windows UTF-16. */\nstatic const wchar_t WFILENAME[] = { 0x30e6, 0x30cb, 0x30b3, 0x30fc, 0x30c9, L'.', L'u', L'n', L'i', L'c', L'o', L'd', L'e', L'\\0' };\n#endif\n\nint main(void)\n{\n    FILE *f, *script, *checksum;\n\n    /* Create our Unicode file. Use _wfopen on Windows as fopen doesn't support Unicode filenames. */\n#ifdef _WIN32\n    if (!(f = _wfopen(WFILENAME, L\"wb\"))) return 1;\n#else\n    if (!(f = fopen(FILENAME, \"wb\"))) return 1;\n#endif\n    fprintf(f, \"test\\n\");\n    fclose(f);\n\n    /* XXH64 checksum file with the precalculated checksum for said file. */\n    if (!(checksum = fopen(\"unicode_test.xxh64\", \"wb\")))\n        return 1;\n    fprintf(checksum, \"2d7f1808da1fa63c  %s\\n\", FILENAME);\n    fclose(checksum);\n\n\n    /* Create two scripts for both Windows and Unix. */\n\n    /* Generate a Windows batch script. Always insert CRLF manually. */\n    if (!(script = fopen(\"unicode_test.bat\", \"wb\")))\n        return 1;\n\n    /* Disable echoing the commands. We do that ourselves the naive way. */\n    fprintf(script, \"@echo off\\r\\n\");\n\n    /* Change to codepage 65001 to enable UTF-8 support. */\n    fprintf(script, \"chcp 65001 >NUL 2>&1\\r\\n\");\n\n    /* First test a Unicode filename */\n    fprintf(script, \"echo Testing filename provided on command line...\\r\\n\");\n    fprintf(script, \"echo xxhsum.exe \\\"%s\\\"\\r\\n\", FILENAME);\n    fprintf(script, \"xxhsum.exe \\\"%s\\\"\\r\\n\", FILENAME);\n\n    /* Bail on error */\n    fprintf(script, \"if %%ERRORLEVEL%% neq 0 (\\r\\n\");\n    fprintf(script, \"    exit /B %%ERRORLEVEL%%\\r\\n\");\n    fprintf(script, \")\\r\\n\");\n\n    /* Then test a checksum file. */\n    fprintf(script, \"echo Testing a checksum file...\\r\\n\");\n    fprintf(script, \"echo xxhsum.exe -c unicode_test.xxh64\\r\\n\");\n    fprintf(script, \"xxhsum.exe -c unicode_test.xxh64\\r\\n\");\n\n    fprintf(script, \"exit /B %%ERRORLEVEL%%\\r\\n\");\n\n    fclose(script);\n\n    /* Generate a Unix shell script */\n    if (!(script = fopen(\"unicode_test.sh\", \"wb\")))\n        return 1;\n\n    fprintf(script, \"#!/bin/sh\\n\");\n    /*\n     * Some versions of MSYS, MinGW and Cygwin do not support UTF-8, and the ones that\n     * don't may error with something like this:\n     *\n     *    Error: Could not open '<mojibake>.unicode': No such file or directory.\n     *\n     * which is an internal error that happens when it tries to convert MinGW/Cygwin\n     * paths to Windows paths.\n     *\n     * In that case, we bail to cmd.exe and the batch script, which supports UTF-8\n     * on Windows 7 and later.\n     */\n    fprintf(script, \"case $(uname) in\\n\");\n    /* MinGW/MSYS converts /c to C:\\ unless you have a double slash,\n     * Cygwin does not. */\n    fprintf(script, \"    *CYGWIN*)\\n\");\n    fprintf(script, \"        exec cmd.exe /c unicode_test.bat\\n\");\n    fprintf(script, \"        ;;\\n\");\n    fprintf(script, \"    *MINGW*|*MSYS*)\\n\");\n    fprintf(script, \"        exec cmd.exe //c unicode_test.bat\\n\");\n    fprintf(script, \"        ;;\\n\");\n    fprintf(script, \"esac\\n\");\n\n    /* First test a Unicode filename */\n    fprintf(script, \"echo Testing filename provided on command line...\\n\");\n    fprintf(script, \"echo './xxhsum \\\"%s\\\" || exit $?'\\n\", FILENAME);\n    fprintf(script, \"./xxhsum \\\"%s\\\" || exit $?\\n\", FILENAME);\n\n    /* Then test a checksum file. */\n    fprintf(script, \"echo Testing a checksum file...\\n\");\n    fprintf(script, \"echo './xxhsum -c unicode_test.xxh64 || exit $?'\\n\");\n    fprintf(script, \"./xxhsum -c unicode_test.xxh64 || exit $?\\n\");\n\n    fclose(script);\n\n    return 0;\n}\n"
  },
  {
    "path": "third-party/xxhash/tests/multiInclude.c",
    "content": "/*\n * Multi-include test program\n * Validates that xxhash.h can be included multiple times and in any order\n *\n * Copyright (C) 2020 Yann Collet\n *\n * GPL v2 License\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n#include <stdio.h>   /* printf */\n\n/* Normal include, gives access to public symbols */\n#include \"../xxhash.h\"\n\n/* Multiple consecutive inclusions are handled properly. */\n#include \"../xxhash.h\"\n\n/*\n * Advanced include, gives access to experimental symbols\n * This test ensures that xxhash.h can be included multiple times\n * and in any order. The tested order is more difficult:\n * without care, the declaration of experimental symbols could be skipped.\n */\n#define XXH_STATIC_LINKING_ONLY\n#include \"../xxhash.h\"\n\n/*\n * Inlining: redefine all identifiers, keep them private to the unit.\n * Note: Without specific efforts, the identifier names would collide.\n *\n * To be linked with and without xxhash.o\n * to test the symbol's presence and naming collisions.\n */\n#define XXH_INLINE_ALL\n#include \"../xxhash.h\"\n\n/*\n * Multiple consecutive inclusions with XXH_INLINE_ALL are handled properly.\n */\n#define XXH_INLINE_ALL\n#include \"../xxhash.h\"\n\n\nvoid hash_advanced(void)\n{\n    XXH3_state_t state;   /* this type is part of experimental API */\n\n    XXH3_64bits_reset(&state);\n    const char input[] = \"Hello World !\";\n\n    XXH3_64bits_update(&state, input, sizeof(input));\n\n    XXH64_hash_t const h = XXH3_64bits_digest(&state);\n    printf(\"hash '%s': %08x%08x \\n\", input, (unsigned)(h >> 32), (unsigned)h);\n}\n\nint main(void)\n{\n    hash_advanced();\n}\n"
  },
  {
    "path": "third-party/xxhash/tests/ppc_define.c",
    "content": "/*\n * Multi-include test program\n * ensure that pixel, bool and vector are not redefined\n *\n * Copyright (C) 2020 Yann Collet\n *\n * GPL v2 License\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n/* gcc's altivec.h, included for the VSX code path,\n * may, in some circumstances, redefine\n * bool, vector and pixel keywords.\n *\n * This unit checks if it happens.\n * It's a compile test.\n * The test is mostly meaningful for PPC target using altivec.h\n * hence XXH_VECTOR == XXH_VSX\n */\n\n#define BOOL_VALUE 32123456\n#define bool BOOL_VALUE\n\n#define VECTOR_VALUE 374464784\n#define vector VECTOR_VALUE\n\n#define PIXEL_VALUE 5846841\n#define pixel PIXEL_VALUE\n\n#define XXH_INLINE_ALL\n#include \"../xxhash.h\"\n\n#if (bool != BOOL_VALUE)\n#  error \"bool macro was redefined !\"\n#endif\n\n#if (vector != VECTOR_VALUE)\n#  error \"vector macro was redefined !\"\n#endif\n\n#if (pixel != PIXEL_VALUE)\n#  error \"pixel macro was redefined !\"\n#endif\n\nint g_nonEmptyUnit = 0;\n"
  },
  {
    "path": "third-party/xxhash/tests/sanity_test.c",
    "content": "// xxHash/tests/sanity_test.c\n// SPDX-License-Identifier: GPL-2.0-only\n//\n// Building\n// ========\n//\n// cc sanity_test.c && ./a.out\n//\n/*\nnotes or changes:\n\nmain()\n------\n\n- All test methods (XXH32, XXH64, ...) are context free.\n  - It means that there's no restriction by order of tests and # of test.  (Ready for multi-threaded / distributed test)\n  - To achieve it, some test has dedicated 'randSeed' to decouple dependency between tests.\n  - Note that for() loop is not ready for distributed test.\n    - randSeed still needs to be computed step by step in the for() loop so far.\n\n*/\n#define XXH_STATIC_LINKING_ONLY\n#define XXH_IMPLEMENTATION   /* access definitions */\n#include \"../cli/xsum_arch.h\"\n#include \"../cli/xsum_os_specific.h\"\n#include \"../cli/xsum_output.h\"\n#include \"../cli/xsum_output.c\"\n#define XSUM_NO_MAIN 1\n#include \"../cli/xsum_os_specific.h\"\n#include \"../cli/xsum_os_specific.c\"\n#include \"../xxhash.h\"\n#include \"sanity_test_vectors.h\"\n\n#include <assert.h> /* assert */\n\n/* use #define to make them constant, required for initialization */\n#define PRIME32 2654435761U\n#define PRIME64 11400714785074694797ULL\n\n#define SANITY_BUFFER_SIZE (4096 + 64 + 1)\n\n\n/**/\nstatic int abortByError = 1;\n\n\n/**/\nstatic void abortSanityTest(void) {\n    /* ??? : Should we show this message? */\n    XSUM_log(\"\\rNote: If you modified the hash functions, make sure to either update tests/sanity_test_vectors.h with the following command\\n\"\n             \"\\r  make -C tests sanity_test_vectors.h\\n\");\n    XSUM_log(\"\\rAbort.\\n\");\n    exit(1);\n}\n\n/* TODO : Share this function with sanity_check.c and xsum_sanity_check.c */\n/*\n * Fills a test buffer with pseudorandom data.\n *\n * This is used in the sanity check - its values must not be changed.\n */\nstatic void fillTestBuffer(XSUM_U8* buffer, size_t bufferLenInBytes)\n{\n    XSUM_U64 byteGen = PRIME32;\n    size_t i;\n\n    assert(buffer != NULL);\n\n    for (i = 0; i < bufferLenInBytes; ++i) {\n        buffer[i] = (XSUM_U8)(byteGen>>56);\n        byteGen *= PRIME64;\n    }\n}\n\n\n/* TODO : Share this function with sanity_check.c and xsum_sanity_check.c */\n/*\n * Create (malloc) and fill buffer with pseudorandom data for sanity check.\n *\n * Use releaseSanityBuffer() to delete the buffer.\n */\nstatic XSUM_U8* createSanityBuffer(size_t bufferLenInBytes)\n{\n    XSUM_U8* buffer = (XSUM_U8*) malloc(bufferLenInBytes);\n    assert(buffer != NULL);\n    fillTestBuffer(buffer, bufferLenInBytes);\n    return buffer;\n}\n\n\n/* TODO : Share this function with sanity_check.c and xsum_sanity_check.c */\n/*\n * Delete (free) the buffer which has been genereated by createSanityBuffer()\n */\nstatic void releaseSanityBuffer(XSUM_U8* buffer)\n{\n    assert(buffer != NULL);\n    free(buffer);\n}\n\n\n/* TODO : Share this function with xsum_sanity_check.c */\n/**/\nstatic void checkResult32(XXH32_hash_t r1, XXH32_hash_t r2, const char* testName, size_t testNb, size_t lineNb)\n{\n    if(r1 == r2) {\n        return;\n    }\n\n    XSUM_log(\"\\rError: %s #%zd, line #%zd: Sanity check failed!\\n\", testName, testNb, lineNb);\n    XSUM_log(\"\\rGot 0x%08X, expected 0x%08X.\\n\", (unsigned)r1, (unsigned)r2);\n\n    if(abortByError) {\n        abortSanityTest();\n    }\n}\n\n\n/* TODO : Share this function with xsum_sanity_check.c */\n/**/\nstatic void checkResult64(XXH64_hash_t r1, XXH64_hash_t r2, const char* testName, size_t testNb, size_t lineNb)\n{\n    if(r1 == r2) {\n        return;\n    }\n\n    XSUM_log(\"\\rError: %s #%zd, line #%zd: Sanity check failed!\\n\", testName, testNb, lineNb);\n    XSUM_log(\"\\rGot 0x%08X%08XULL, expected 0x%08X%08XULL.\\n\",\n            (unsigned)(r1>>32), (unsigned)r1, (unsigned)(r2>>32), (unsigned)r2);\n\n    if(abortByError) {\n        abortSanityTest();\n    }\n}\n\n\n/* TODO : Share this function with xsum_sanity_check.c */\n/**/\nstatic void checkResult128(XXH128_hash_t r1, XXH128_hash_t r2, const char* testName, size_t testNb, size_t lineNb)\n{\n    if ((r1.low64 == r2.low64) && (r1.high64 == r2.high64)) {\n        return;\n    }\n\n    XSUM_log(\"\\rError: %s #%zd, line #%zd: Sanity check failed!\\n\", testName, testNb, lineNb);\n    XSUM_log(\"\\rGot { 0x%08X%08XULL, 0x%08X%08XULL }, expected { 0x%08X%08XULL, 0x%08X%08XULL } \\n\",\n            (unsigned)(r1.low64>>32), (unsigned)r1.low64, (unsigned)(r1.high64>>32), (unsigned)r1.high64,\n            (unsigned)(r2.low64>>32), (unsigned)r2.low64, (unsigned)(r2.high64>>32), (unsigned)r2.high64 );\n\n    if(abortByError) {\n        abortSanityTest();\n    }\n}\n\n\n/* TODO : Share this function with xsum_sanity_check.c */\n/**/\nstatic void checkResultTestDataSample(const XSUM_U8* r1, const XSUM_U8* r2, const char* testName, size_t testNb, size_t lineNb)\n{\n    if(memcmp(r1, r2, SECRET_SAMPLE_NBBYTES) == 0) {\n        return;\n    }\n\n    XSUM_log(\"\\rError: %s #%zd, line #%zd: Sanity check failed!\\n\", testName, testNb, lineNb);\n    XSUM_log(\"\\rGot { 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X }, expected { 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X } \\n\",\n            r1[0], r1[1], r1[2], r1[3], r1[4],\n            r2[0], r2[1], r2[2], r2[3], r2[4] );\n\n    if(abortByError) {\n        abortSanityTest();\n    }\n}\n\n\n/* TODO : Share this function with xsum_sanity_check.c */\n/**/\nstatic void testXXH32(\n    const void* data,\n    const XSUM_testdata32_t* testData,\n    const char* testName,\n    size_t testNb\n) {\n    size_t   const len     = testData->len;\n    XSUM_U32 const seed    = testData->seed;\n    XSUM_U32 const Nresult = testData->Nresult;\n\n    XXH32_state_t * const state = XXH32_createState();\n\n    if (len == 0) {\n        data = NULL;\n    } else {\n        assert(data != NULL);\n    }\n\n    assert(state != NULL);\n\n    checkResult32(XXH32(data, len, seed), Nresult, testName, testNb, __LINE__);\n\n    (void)XXH32_reset(state, seed);\n    (void)XXH32_update(state, data, len);\n    checkResult32(XXH32_digest(state), Nresult, testName, testNb, __LINE__);\n\n    (void)XXH32_reset(state, seed);\n    {\n        size_t pos;\n        for (pos = 0; pos < len; ++pos) {\n            (void)XXH32_update(state, ((const char*)data)+pos, 1);\n        }\n    }\n    checkResult32(XXH32_digest(state), Nresult, testName, testNb, __LINE__);\n\n    XXH32_freeState(state);\n}\n\n\n/* TODO : Share this function with xsum_sanity_check.c */\n/**/\nstatic void testXXH64(\n    const void* data,\n    const XSUM_testdata64_t* testData,\n    const char* testName,\n    size_t testNb\n)\n{\n    size_t   const len     = (size_t)testData->len;\n    XSUM_U64 const seed    = testData->seed;\n    XSUM_U64 const Nresult = testData->Nresult;\n\n    XXH64_state_t * const state = XXH64_createState();\n\n    if (len == 0) {\n        data = NULL;\n    } else {\n        assert(data != NULL);\n    }\n\n    assert(state != NULL);\n\n    checkResult64(XXH64(data, len, seed), Nresult, testName, testNb, __LINE__);\n\n    (void)XXH64_reset(state, seed);\n    (void)XXH64_update(state, data, len);\n    checkResult64(XXH64_digest(state), Nresult, testName, testNb, __LINE__);\n\n    (void)XXH64_reset(state, seed);\n    {\n        size_t pos;\n        for (pos = 0; pos < len; ++pos) {\n            (void)XXH64_update(state, ((const char*)data)+pos, 1);\n        }\n    }\n    checkResult64(XXH64_digest(state), Nresult, testName, testNb, __LINE__);\n    XXH64_freeState(state);\n}\n\n\n/* TODO : Share this function with xsum_sanity_check.c */\n/*\n * Used to get \"random\" (but actually 100% reproducible) lengths for\n * XSUM_XXH3_randomUpdate.\n */\nstatic XSUM_U32 SANITY_TEST_rand(XSUM_U64* pRandSeed)\n{\n    XSUM_U64 seed = *pRandSeed;\n    seed *= PRIME64;\n    *pRandSeed = seed;\n    return (XSUM_U32)(seed >> 40);\n}\n\n\n/* TODO : Share this function with xsum_sanity_check.c */\n/**/\nstatic XSUM_U64 SANITY_TEST_computeRandSeed(size_t step)\n{\n    XSUM_U64 randSeed = PRIME32;\n    size_t i = 0;\n    for(i = 0; i < step; ++i) {\n        SANITY_TEST_rand(&randSeed);\n    }\n    return randSeed;\n}\n\n\n/* TODO : Share this definition with xsum_sanity_check.c */\n/*\n * Technically, XXH3_64bits_update is identical to XXH3_128bits_update as of\n * v0.8.0, but we treat them as separate.\n */\ntypedef XXH_errorcode (*SANITY_TEST_XXH3_update_t)(XXH3_state_t* state, const void* input, size_t length);\n\n\n/* TODO : Share this function with xsum_sanity_check.c */\n/*\n * Runs the passed XXH3_update variant on random lengths. This is to test the\n * more complex logic of the update function, catching bugs like this one:\n *    https://github.com/Cyan4973/xxHash/issues/378\n */\nstatic void SANITY_TEST_XXH3_randomUpdate(\n    XXH3_state_t* state,\n    const void* data,\n    size_t len,\n    XSUM_U64* pRandSeed,\n    SANITY_TEST_XXH3_update_t update_fn\n)\n{\n    size_t p = 0;\n    while (p < len) {\n        size_t const modulo = len > 2 ? len : 2;\n        size_t l = (size_t)(SANITY_TEST_rand(pRandSeed)) % modulo;\n        if (p + l > len) l = len - p;\n        (void)update_fn(state, (const char*)data+p, l);\n        p += l;\n    }\n}\n\n\n/* TODO : Share this function with xsum_sanity_check.c */\n/**/\nstatic void testXXH3(\n    const void* data,\n    const void* secret,\n    size_t secretSize,\n    const XSUM_testdata64_t* testData,\n    XSUM_U64* pRandSeed,\n    const char* testName,\n    size_t testNb\n)\n{\n    size_t   const len     = testData->len;\n    XSUM_U64 const seed    = testData->seed;\n    XSUM_U64 const Nresult = testData->Nresult;\n    if (len == 0) {\n        data = NULL;\n    } else {\n        assert(data != NULL);\n    }\n    {   XSUM_U64 const Dresult = XXH3_64bits_withSeed(data, len, seed);\n        checkResult64(Dresult, Nresult, testName, testNb, __LINE__);\n    }\n\n    /* check that the no-seed variant produces same result as seed==0 */\n    if (seed == 0) {\n        XSUM_U64 const Dresult = XXH3_64bits(data, len);\n        checkResult64(Dresult, Nresult, testName, testNb, __LINE__);\n    }\n\n    /* check that the combination of\n     * XXH3_generateSecret_fromSeed() and XXH3_64bits_withSecretandSeed()\n     * results in exactly the same hash generation as XXH3_64bits_withSeed() */\n    {   char secretBuffer[XXH3_SECRET_DEFAULT_SIZE+1];\n        char* const secretFromSeed = secretBuffer + 1;  /* intentional unalignment */\n        XXH3_generateSecret_fromSeed(secretFromSeed, seed);\n        {   XSUM_U64 const Dresult = XXH3_64bits_withSecretandSeed(data, len, secretFromSeed, XXH3_SECRET_DEFAULT_SIZE, seed);\n            checkResult64(Dresult, Nresult, testName, testNb, __LINE__);\n    }   }\n\n    /* check that XXH3_64bits_withSecretandSeed()\n     * results in exactly the same return value as XXH3_64bits_withSeed() */\n    if (len <= XXH3_MIDSIZE_MAX) {\n        XSUM_U64 const Dresult = XXH3_64bits_withSecretandSeed(data, len, secret, secretSize, seed);\n        checkResult64(Dresult, Nresult, testName, testNb, __LINE__);\n    }\n\n    /* streaming API test */\n    {   XXH3_state_t* const state = XXH3_createState();\n        assert(state != NULL);\n        /* single ingestion */\n        (void)XXH3_64bits_reset_withSeed(state, seed);\n        (void)XXH3_64bits_update(state, data, len);\n        checkResult64(XXH3_64bits_digest(state), Nresult, testName, testNb, __LINE__);\n\n        /* random ingestion */\n        (void)XXH3_64bits_reset_withSeed(state, seed);\n        SANITY_TEST_XXH3_randomUpdate(state, data, len, pRandSeed, &XXH3_64bits_update);\n        checkResult64(XXH3_64bits_digest(state), Nresult, testName, testNb, __LINE__);\n\n        /* byte by byte ingestion */\n        {   size_t pos;\n            (void)XXH3_64bits_reset_withSeed(state, seed);\n            for (pos=0; pos<len; pos++)\n                (void)XXH3_64bits_update(state, ((const char*)data)+pos, 1);\n            checkResult64(XXH3_64bits_digest(state), Nresult, testName, testNb, __LINE__);\n        }\n\n        /* check that streaming with a combination of\n         * XXH3_generateSecret_fromSeed() and XXH3_64bits_reset_withSecretandSeed()\n         * results in exactly the same hash generation as XXH3_64bits_reset_withSeed() */\n        {   char secretBuffer[XXH3_SECRET_DEFAULT_SIZE+1];\n            char* const secretFromSeed = secretBuffer + 1;  /* intentional unalignment */\n            XXH3_generateSecret_fromSeed(secretFromSeed, seed);\n            /* single ingestion */\n            (void)XXH3_64bits_reset_withSecretandSeed(state, secretFromSeed, XXH3_SECRET_DEFAULT_SIZE, seed);\n            (void)XXH3_64bits_update(state, data, len);\n            checkResult64(XXH3_64bits_digest(state), Nresult, testName, testNb, __LINE__);\n        }\n\n        /* check that XXH3_64bits_withSecretandSeed()\n         * results in exactly the same return value as XXH3_64bits_withSeed() */\n        if (len <= XXH3_MIDSIZE_MAX) {\n            /* single ingestion */\n            (void)XXH3_64bits_reset_withSecretandSeed(state, secret, secretSize, seed);\n            (void)XXH3_64bits_update(state, data, len);\n            checkResult64(XXH3_64bits_digest(state), Nresult, testName, testNb, __LINE__);\n        }\n\n        XXH3_freeState(state);\n    }\n}\n\n\n/* TODO : Share this function with xsum_sanity_check.c */\n/**/\nstatic void testXXH3_withSecret(\n    const void* data,\n    const void* secret,\n    size_t secretSize,\n    const XSUM_testdata64_t* testData,\n    XSUM_U64* pRandSeed,\n    const char* testName,\n    size_t testNb\n)\n{\n    size_t   const len     = (size_t)testData->len;\n    XSUM_U64 const Nresult = testData->Nresult;\n\n    if (len == 0) {\n        data = NULL;\n    } else {\n        assert(data != NULL);\n    }\n    {   XSUM_U64 const Dresult = XXH3_64bits_withSecret(data, len, secret, secretSize);\n        checkResult64(Dresult, Nresult, testName, testNb, __LINE__);\n    }\n\n    /* check that XXH3_64bits_withSecretandSeed()\n     * results in exactly the same return value as XXH3_64bits_withSecret() */\n    if (len > XXH3_MIDSIZE_MAX)\n    {   XSUM_U64 const Dresult = XXH3_64bits_withSecretandSeed(data, len, secret, secretSize, 0);\n        checkResult64(Dresult, Nresult, testName, testNb, __LINE__);\n    }\n\n    /* streaming API test */\n    {   XXH3_state_t * const state = XXH3_createState();\n        assert(state != NULL);\n        (void)XXH3_64bits_reset_withSecret(state, secret, secretSize);\n        (void)XXH3_64bits_update(state, data, len);\n        checkResult64(XXH3_64bits_digest(state), Nresult, testName, testNb, __LINE__);\n\n        /* random ingestion */\n        (void)XXH3_64bits_reset_withSecret(state, secret, secretSize);\n        SANITY_TEST_XXH3_randomUpdate(state, data, len, pRandSeed, &XXH3_64bits_update);\n        checkResult64(XXH3_64bits_digest(state), Nresult, testName, testNb, __LINE__);\n\n        /* byte by byte ingestion */\n        {   size_t pos;\n            (void)XXH3_64bits_reset_withSecret(state, secret, secretSize);\n            for (pos=0; pos<len; pos++)\n                (void)XXH3_64bits_update(state, ((const char*)data)+pos, 1);\n            checkResult64(XXH3_64bits_digest(state), Nresult, testName, testNb, __LINE__);\n        }\n\n        /* check that XXH3_64bits_reset_withSecretandSeed()\n         * results in exactly the same return value as XXH3_64bits_reset_withSecret() */\n         if (len > XXH3_MIDSIZE_MAX) {\n            /* single ingestion */\n            (void)XXH3_64bits_reset_withSecretandSeed(state, secret, secretSize, 0);\n            (void)XXH3_64bits_update(state, data, len);\n            checkResult64(XXH3_64bits_digest(state), Nresult, testName, testNb, __LINE__);\n        }\n\n        XXH3_freeState(state);\n    }\n}\n\n\n/* TODO : Share this function with xsum_sanity_check.c */\n/**/\nstatic void testXXH128(\n    const void* data,\n    const void* secret,\n    size_t secretSize,\n    const XSUM_testdata128_t* testData,\n    XSUM_U64* pRandSeed,\n    const char* testName,\n    size_t testNb\n)\n{\n    size_t        const len     = (size_t)testData->len;\n    XSUM_U64      const seed    = testData->seed;\n    XXH128_hash_t const Nresult = testData->Nresult;\n    if (len == 0) {\n        data = NULL;\n    } else {\n        assert(data != NULL);\n    }\n\n    {   XXH128_hash_t const Dresult = XXH3_128bits_withSeed(data, len, seed);\n        checkResult128(Dresult, Nresult, testName, testNb, __LINE__);\n    }\n\n    /* check that XXH128() is identical to XXH3_128bits_withSeed() */\n    {   XXH128_hash_t const Dresult2 = XXH128(data, len, seed);\n        checkResult128(Dresult2, Nresult, testName, testNb, __LINE__);\n    }\n\n    /* check that the no-seed variant produces same result as seed==0 */\n    if (seed == 0) {\n        XXH128_hash_t const Dresult = XXH3_128bits(data, len);\n        checkResult128(Dresult, Nresult, testName, testNb, __LINE__);\n    }\n\n    /* check that the combination of\n     * XXH3_generateSecret_fromSeed() and XXH3_128bits_withSecretandSeed()\n     * results in exactly the same hash generation as XXH3_64bits_withSeed() */\n    {   char secretBuffer[XXH3_SECRET_DEFAULT_SIZE+1];\n        char* const secretFromSeed = secretBuffer + 1;  /* intentional unalignment */\n        XXH3_generateSecret_fromSeed(secretFromSeed, seed);\n        {   XXH128_hash_t const Dresult = XXH3_128bits_withSecretandSeed(data, len, secretFromSeed, XXH3_SECRET_DEFAULT_SIZE, seed);\n            checkResult128(Dresult, Nresult, testName, testNb, __LINE__);\n    }   }\n\n    /* check that XXH3_128bits_withSecretandSeed()\n     * results in exactly the same return value as XXH3_128bits_withSeed() */\n    if (len <= XXH3_MIDSIZE_MAX) {\n        XXH128_hash_t const Dresult = XXH3_128bits_withSecretandSeed(data, len, secret, secretSize, seed);\n        checkResult128(Dresult, Nresult, testName, testNb, __LINE__);\n    }\n\n    /* streaming API test */\n    {   XXH3_state_t * const state = XXH3_createState();\n        assert(state != NULL);\n\n        /* single ingestion */\n        (void)XXH3_128bits_reset_withSeed(state, seed);\n        (void)XXH3_128bits_update(state, data, len);\n        checkResult128(XXH3_128bits_digest(state), Nresult, testName, testNb, __LINE__);\n\n        /* random ingestion */\n        (void)XXH3_128bits_reset_withSeed(state, seed);\n        SANITY_TEST_XXH3_randomUpdate(state, data, len, pRandSeed, &XXH3_128bits_update);\n        checkResult128(XXH3_128bits_digest(state), Nresult, testName, testNb, __LINE__);\n\n        /* byte by byte ingestion */\n        {   size_t pos;\n            (void)XXH3_128bits_reset_withSeed(state, seed);\n            for (pos=0; pos<len; pos++)\n                (void)XXH3_128bits_update(state, ((const char*)data)+pos, 1);\n            checkResult128(XXH3_128bits_digest(state), Nresult, testName, testNb, __LINE__);\n        }\n\n        /* check that streaming with a combination of\n         * XXH3_generateSecret_fromSeed() and XXH3_128bits_reset_withSecretandSeed()\n         * results in exactly the same hash generation as XXH3_128bits_reset_withSeed() */\n        {   char secretBuffer[XXH3_SECRET_DEFAULT_SIZE+1];\n            char* const secretFromSeed = secretBuffer + 1;  /* intentional unalignment */\n            XXH3_generateSecret_fromSeed(secretFromSeed, seed);\n            /* single ingestion */\n            (void)XXH3_128bits_reset_withSecretandSeed(state, secretFromSeed, XXH3_SECRET_DEFAULT_SIZE, seed);\n            (void)XXH3_128bits_update(state, data, len);\n            checkResult128(XXH3_128bits_digest(state), Nresult, testName, testNb, __LINE__);\n        }\n\n        /* check that XXH3_128bits_reset_withSecretandSeed()\n         * results in exactly the same return value as XXH3_128bits_reset_withSeed() */\n        if (len <= XXH3_MIDSIZE_MAX) {\n            /* single ingestion */\n            (void)XXH3_128bits_reset_withSecretandSeed(state, secret, secretSize, seed);\n            (void)XXH3_128bits_update(state, data, len);\n            checkResult128(XXH3_128bits_digest(state), Nresult, testName, testNb, __LINE__);\n        }\n\n        XXH3_freeState(state);\n    }\n}\n\n\n/* TODO : Share this function with xsum_sanity_check.c */\n/**/\nstatic void testXXH128_withSecret(\n    const void* data,\n    const void* secret,\n    size_t secretSize,\n    const XSUM_testdata128_t* testData,\n    XSUM_U64* pRandSeed,\n    const char* testName,\n    size_t testNb\n)\n{\n    size_t        const len     = testData->len;\n    XXH128_hash_t const Nresult = testData->Nresult;\n    if (len == 0) {\n        data = NULL;\n    } else {\n        assert(data != NULL);\n    }\n\n    {   XXH128_hash_t const Dresult = XXH3_128bits_withSecret(data, len, secret, secretSize);\n        checkResult128(Dresult, Nresult, testName, testNb, __LINE__);\n    }\n\n    /* check that XXH3_128bits_withSecretandSeed()\n     * results in exactly the same return value as XXH3_128bits_withSecret() */\n    if (len > XXH3_MIDSIZE_MAX)\n    {   XXH128_hash_t const Dresult = XXH3_128bits_withSecretandSeed(data, len, secret, secretSize, 0);\n        checkResult128(Dresult, Nresult, testName, testNb, __LINE__);\n    }\n\n    /* streaming API test */\n    {   XXH3_state_t* const state = XXH3_createState();\n        assert(state != NULL);\n        (void)XXH3_128bits_reset_withSecret(state, secret, secretSize);\n        (void)XXH3_128bits_update(state, data, len);\n        checkResult128(XXH3_128bits_digest(state), Nresult, testName, testNb, __LINE__);\n\n        /* random ingestion */\n        (void)XXH3_128bits_reset_withSecret(state, secret, secretSize);\n        SANITY_TEST_XXH3_randomUpdate(state, data, len, pRandSeed, &XXH3_128bits_update);\n        checkResult128(XXH3_128bits_digest(state), Nresult, testName, testNb, __LINE__);\n\n        /* byte by byte ingestion */\n        {   size_t pos;\n            (void)XXH3_128bits_reset_withSecret(state, secret, secretSize);\n            for (pos=0; pos<len; pos++)\n                (void)XXH3_128bits_update(state, ((const char*)data)+pos, 1);\n            checkResult128(XXH3_128bits_digest(state), Nresult, testName, testNb, __LINE__);\n        }\n\n        /* check that XXH3_128bits_reset_withSecretandSeed()\n         * results in exactly the same return value as XXH3_128bits_reset_withSecret() */\n         if (len > XXH3_MIDSIZE_MAX) {\n            /* single ingestion */\n            (void)XXH3_128bits_reset_withSecretandSeed(state, secret, secretSize, 0);\n            (void)XXH3_128bits_update(state, data, len);\n            checkResult128(XXH3_128bits_digest(state), Nresult, testName, testNb, __LINE__);\n        }\n\n        XXH3_freeState(state);\n    }\n}\n\n\n/* TODO : Share this function with xsum_sanity_check.c */\n/**/\nstatic void testSecretGenerator(\n    const void* customSeed,\n    const XSUM_testdata_sample_t* testData,\n    const char* testName,\n    size_t testNb\n)\n{\n    /* TODO : Share this array with sanity_check.c and xsum_sanity_check.c */\n    static const int sampleIndex[SECRET_SAMPLE_NBBYTES] = { 0, 62, 131, 191, 241 };  /* position of sampled bytes */\n    XSUM_U8 secretBuffer[SECRET_SIZE_MAX] = {0};\n    XSUM_U8 samples[SECRET_SAMPLE_NBBYTES];\n    int i;\n\n    assert(testData->secretLen <= SECRET_SIZE_MAX);\n    XXH3_generateSecret(secretBuffer, testData->secretLen, customSeed, testData->seedLen);\n    for (i=0; i<SECRET_SAMPLE_NBBYTES; i++) {\n        samples[i] = secretBuffer[sampleIndex[i]];\n    }\n    checkResultTestDataSample(samples, testData->byte, testName, testNb, __LINE__);\n}\n\n\n/**/\nint main(int argc, const char* argv[])\n{\n    size_t testCount = 0;\n    size_t      const sanityBufferSizeInBytes = SANITY_BUFFER_SIZE;\n    XSUM_U8*    const sanityBuffer            = createSanityBuffer(sanityBufferSizeInBytes);\n    const void* const secret                  = sanityBuffer + 7;\n    size_t      const secretSize              = XXH3_SECRET_SIZE_MIN + 11;\n    assert(sanityBufferSizeInBytes >= 7 + secretSize);\n    (void) argc;\n    (void) argv;\n\n    {\n        /* XXH32 */\n        size_t const n = sizeof(XSUM_XXH32_testdata) / sizeof(XSUM_XXH32_testdata[0]);\n        size_t i;\n        for (i = 0; i < n; ++i, ++testCount) {\n            testXXH32(\n                sanityBuffer,\n                &XSUM_XXH32_testdata[i],\n                \"XSUM_XXH32_testdata\",\n                i\n            );\n        }\n    }\n\n    {\n        /* XXH64 */\n        size_t const n = sizeof(XSUM_XXH64_testdata) / sizeof(XSUM_XXH64_testdata[0]);\n        size_t i;\n        for (i = 0; i < n; ++i, ++testCount) {\n            testXXH64(\n                sanityBuffer,\n                &XSUM_XXH64_testdata[i],\n                \"XSUM_XXH64_testdata\",\n                i\n            );\n        }\n    }\n\n    {\n        /* XXH3_64bits, seeded */\n        size_t const randCount = 0;\n        XSUM_U64 randSeed = SANITY_TEST_computeRandSeed(randCount);\n        size_t const n = sizeof(XSUM_XXH3_testdata) / sizeof(XSUM_XXH3_testdata[0]);\n        size_t i;\n        for (i = 0; i < n; ++i, ++testCount) {\n            testXXH3(\n                sanityBuffer,\n                secret,\n                secretSize,\n                &XSUM_XXH3_testdata[i],\n                &randSeed,\n                \"XSUM_XXH3_testdata\",\n                i\n            );\n        }\n    }\n\n    {\n        /* XXH3_64bits, custom secret */\n        size_t const randCount = 22730;\n        XSUM_U64 randSeed = SANITY_TEST_computeRandSeed(randCount);\n        size_t const n = sizeof(XSUM_XXH3_withSecret_testdata) / sizeof(XSUM_XXH3_withSecret_testdata[0]);\n        size_t i;\n        for (i = 0; i < n; ++i, ++testCount) {\n            testXXH3_withSecret(\n                sanityBuffer,\n                secret,\n                secretSize,\n                &XSUM_XXH3_withSecret_testdata[i],\n                &randSeed,\n                \"XSUM_XXH3_withSecret_testdata\",\n                i\n            );\n            testCount++;\n        }\n    }\n\n    {\n        /* XXH128 */\n        size_t const randCount = 34068;\n        XSUM_U64 randSeed = SANITY_TEST_computeRandSeed(randCount);\n        size_t const n = (sizeof(XSUM_XXH128_testdata)/sizeof(XSUM_XXH128_testdata[0]));\n        size_t i;\n        for (i = 0; i < n; ++i, ++testCount) {\n            testXXH128(\n                sanityBuffer,\n                secret,\n                secretSize,\n                &XSUM_XXH128_testdata[i],\n                &randSeed,\n                \"XSUM_XXH128_testdata\",\n                i\n            );\n        }\n    }\n\n    {\n        /* XXH128 with custom Secret */\n        size_t const randCount = 68019;\n        XSUM_U64 randSeed = SANITY_TEST_computeRandSeed(randCount);\n        size_t const n = (sizeof(XSUM_XXH128_withSecret_testdata)/sizeof(XSUM_XXH128_withSecret_testdata[0]));\n        size_t i;\n        for (i = 0; i < n; ++i, ++testCount) {\n            testXXH128_withSecret(\n                sanityBuffer,\n                secret,\n                secretSize,\n                &XSUM_XXH128_withSecret_testdata[i],\n                &randSeed,\n                \"XSUM_XXH128_withSecret_testdata\",\n                i\n            );\n        }\n    }\n\n    {\n        /* secret generator */\n        size_t const n = sizeof(XSUM_XXH3_generateSecret_testdata) / sizeof(XSUM_XXH3_generateSecret_testdata[0]);\n        size_t i;\n        for (i = 0; i < n; ++i, ++testCount) {\n            assert(XSUM_XXH3_generateSecret_testdata[i].seedLen <= SANITY_BUFFER_SIZE);\n            testSecretGenerator(\n                sanityBuffer,\n                &XSUM_XXH3_generateSecret_testdata[i],\n                \"XSUM_XXH3_generateSecret_testdata\",\n                i\n            );\n        }\n    }\n\n    releaseSanityBuffer(sanityBuffer);\n\n    XSUM_log(\"\\rOK. (passes %zd tests)\\n\", testCount);\n\n    return EXIT_SUCCESS;\n}\n"
  },
  {
    "path": "third-party/xxhash/tests/sanity_test_vectors.h",
    "content": "typedef struct {\n    XSUM_U32 len;\n    XSUM_U32 seed;\n    XSUM_U32 Nresult;\n} XSUM_testdata32_t;\n\ntypedef struct {\n    XSUM_U32 len;\n    XSUM_U64 seed;\n    XSUM_U64 Nresult;\n} XSUM_testdata64_t;\n\ntypedef struct {\n    XSUM_U32 len;\n    XSUM_U64 seed;\n    XXH128_hash_t Nresult;\n} XSUM_testdata128_t;\n\n#ifndef SECRET_SAMPLE_NBBYTES\n#define SECRET_SAMPLE_NBBYTES 5\n#endif\n\ntypedef struct {\n    XSUM_U32 seedLen;\n    XSUM_U32 secretLen;\n    XSUM_U8 byte[SECRET_SAMPLE_NBBYTES];\n} XSUM_testdata_sample_t;\n\n#ifndef SECRET_SIZE_MAX\n#define SECRET_SIZE_MAX 9867\n#endif\nstatic const XSUM_testdata32_t XSUM_XXH32_testdata[] = {\n    {    0, 0x00000000U, 0x02CC5D05U }, /* XSUM_XXH32_testdata[0] */\n    {    0, 0x9E3779B1U, 0x36B78AE7U }, /* XSUM_XXH32_testdata[1] */\n    {    1, 0x00000000U, 0xCF65B03EU }, /* XSUM_XXH32_testdata[2] */\n    {    1, 0x9E3779B1U, 0xB4545AA4U }, /* XSUM_XXH32_testdata[3] */\n    {    2, 0x00000000U, 0x1151BEE4U }, /* XSUM_XXH32_testdata[4] */\n    {    2, 0x9E3779B1U, 0x1EDB879AU }, /* XSUM_XXH32_testdata[5] */\n    {    3, 0x00000000U, 0xC23884F5U }, /* XSUM_XXH32_testdata[6] */\n    {    3, 0x9E3779B1U, 0x1A269947U }, /* XSUM_XXH32_testdata[7] */\n    {    4, 0x00000000U, 0xA9DE7CE9U }, /* XSUM_XXH32_testdata[8] */\n    {    4, 0x9E3779B1U, 0x2BAAFE83U }, /* XSUM_XXH32_testdata[9] */\n    {    5, 0x00000000U, 0xEB1734BBU }, /* XSUM_XXH32_testdata[10] */\n    {    5, 0x9E3779B1U, 0x5874DAB0U }, /* XSUM_XXH32_testdata[11] */\n    {    6, 0x00000000U, 0x659F0C97U }, /* XSUM_XXH32_testdata[12] */\n    {    6, 0x9E3779B1U, 0x0BCF25C5U }, /* XSUM_XXH32_testdata[13] */\n    {    7, 0x00000000U, 0x5E1056CDU }, /* XSUM_XXH32_testdata[14] */\n    {    7, 0x9E3779B1U, 0x3ED9D3FCU }, /* XSUM_XXH32_testdata[15] */\n    {    8, 0x00000000U, 0xA3F6F44BU }, /* XSUM_XXH32_testdata[16] */\n    {    8, 0x9E3779B1U, 0xC2A8E239U }, /* XSUM_XXH32_testdata[17] */\n    {    9, 0x00000000U, 0xFFB82A24U }, /* XSUM_XXH32_testdata[18] */\n    {    9, 0x9E3779B1U, 0xD35632C6U }, /* XSUM_XXH32_testdata[19] */\n    {   10, 0x00000000U, 0xB1E5032EU }, /* XSUM_XXH32_testdata[20] */\n    {   10, 0x9E3779B1U, 0x18679D60U }, /* XSUM_XXH32_testdata[21] */\n    {   11, 0x00000000U, 0x0CF2F032U }, /* XSUM_XXH32_testdata[22] */\n    {   11, 0x9E3779B1U, 0xE0E99838U }, /* XSUM_XXH32_testdata[23] */\n    {   12, 0x00000000U, 0xE89B5F9BU }, /* XSUM_XXH32_testdata[24] */\n    {   12, 0x9E3779B1U, 0x05A6C4B5U }, /* XSUM_XXH32_testdata[25] */\n    {   13, 0x00000000U, 0xC537DE02U }, /* XSUM_XXH32_testdata[26] */\n    {   13, 0x9E3779B1U, 0x1298ADD0U }, /* XSUM_XXH32_testdata[27] */\n    {   14, 0x00000000U, 0x1208E7E2U }, /* XSUM_XXH32_testdata[28] */\n    {   14, 0x9E3779B1U, 0x6AF1D1FEU }, /* XSUM_XXH32_testdata[29] */\n    {   15, 0x00000000U, 0x6B859E14U }, /* XSUM_XXH32_testdata[30] */\n    {   15, 0x9E3779B1U, 0xAD53090DU }, /* XSUM_XXH32_testdata[31] */\n    {   16, 0x00000000U, 0x93BA3759U }, /* XSUM_XXH32_testdata[32] */\n    {   16, 0x9E3779B1U, 0xA94FC1E1U }, /* XSUM_XXH32_testdata[33] */\n    {   17, 0x00000000U, 0x89FDC23EU }, /* XSUM_XXH32_testdata[34] */\n    {   17, 0x9E3779B1U, 0xC9910739U }, /* XSUM_XXH32_testdata[35] */\n    {   18, 0x00000000U, 0x16B53F56U }, /* XSUM_XXH32_testdata[36] */\n    {   18, 0x9E3779B1U, 0x5E88116EU }, /* XSUM_XXH32_testdata[37] */\n    {   19, 0x00000000U, 0x858FC8EAU }, /* XSUM_XXH32_testdata[38] */\n    {   19, 0x9E3779B1U, 0x63826A8FU }, /* XSUM_XXH32_testdata[39] */\n    {   20, 0x00000000U, 0x38374A35U }, /* XSUM_XXH32_testdata[40] */\n    {   20, 0x9E3779B1U, 0xC691A55AU }, /* XSUM_XXH32_testdata[41] */\n    {   21, 0x00000000U, 0x646A88D6U }, /* XSUM_XXH32_testdata[42] */\n    {   21, 0x9E3779B1U, 0x9668CDABU }, /* XSUM_XXH32_testdata[43] */\n    {   22, 0x00000000U, 0xB5CCC747U }, /* XSUM_XXH32_testdata[44] */\n    {   22, 0x9E3779B1U, 0x96F6C6A1U }, /* XSUM_XXH32_testdata[45] */\n    {   23, 0x00000000U, 0xCC7B3099U }, /* XSUM_XXH32_testdata[46] */\n    {   23, 0x9E3779B1U, 0x174910FEU }, /* XSUM_XXH32_testdata[47] */\n    {   24, 0x00000000U, 0xA6276FF0U }, /* XSUM_XXH32_testdata[48] */\n    {   24, 0x9E3779B1U, 0x7AD49212U }, /* XSUM_XXH32_testdata[49] */\n    {   25, 0x00000000U, 0x221B959BU }, /* XSUM_XXH32_testdata[50] */\n    {   25, 0x9E3779B1U, 0xA1899908U }, /* XSUM_XXH32_testdata[51] */\n    {   26, 0x00000000U, 0x3F2F5961U }, /* XSUM_XXH32_testdata[52] */\n    {   26, 0x9E3779B1U, 0x6A936E6BU }, /* XSUM_XXH32_testdata[53] */\n    {   27, 0x00000000U, 0x9501BDDDU }, /* XSUM_XXH32_testdata[54] */\n    {   27, 0x9E3779B1U, 0x61A4E18BU }, /* XSUM_XXH32_testdata[55] */\n    {   28, 0x00000000U, 0xDA976167U }, /* XSUM_XXH32_testdata[56] */\n    {   28, 0x9E3779B1U, 0x261F77CFU }, /* XSUM_XXH32_testdata[57] */\n    {   29, 0x00000000U, 0x249CC065U }, /* XSUM_XXH32_testdata[58] */\n    {   29, 0x9E3779B1U, 0xC8EC8904U }, /* XSUM_XXH32_testdata[59] */\n    {   30, 0x00000000U, 0x36BC3693U }, /* XSUM_XXH32_testdata[60] */\n    {   30, 0x9E3779B1U, 0xA2800E16U }, /* XSUM_XXH32_testdata[61] */\n    {   31, 0x00000000U, 0x5F40E562U }, /* XSUM_XXH32_testdata[62] */\n    {   31, 0x9E3779B1U, 0x5C0C3350U }, /* XSUM_XXH32_testdata[63] */\n    {   32, 0x00000000U, 0xD89829ECU }, /* XSUM_XXH32_testdata[64] */\n    {   32, 0x9E3779B1U, 0xA5C44467U }, /* XSUM_XXH32_testdata[65] */\n    {   33, 0x00000000U, 0x31A427E5U }, /* XSUM_XXH32_testdata[66] */\n    {   33, 0x9E3779B1U, 0x0DE5B1F9U }, /* XSUM_XXH32_testdata[67] */\n    {   34, 0x00000000U, 0x80B8584BU }, /* XSUM_XXH32_testdata[68] */\n    {   34, 0x9E3779B1U, 0x7FFCCCFEU }, /* XSUM_XXH32_testdata[69] */\n    {   35, 0x00000000U, 0x7627760AU }, /* XSUM_XXH32_testdata[70] */\n    {   35, 0x9E3779B1U, 0xD060F480U }, /* XSUM_XXH32_testdata[71] */\n    {   36, 0x00000000U, 0xED4F560FU }, /* XSUM_XXH32_testdata[72] */\n    {   36, 0x9E3779B1U, 0x24321F47U }, /* XSUM_XXH32_testdata[73] */\n    {   37, 0x00000000U, 0x1241D245U }, /* XSUM_XXH32_testdata[74] */\n    {   37, 0x9E3779B1U, 0x09EFB299U }, /* XSUM_XXH32_testdata[75] */\n    {   38, 0x00000000U, 0x5E1CC178U }, /* XSUM_XXH32_testdata[76] */\n    {   38, 0x9E3779B1U, 0xC1322A61U }, /* XSUM_XXH32_testdata[77] */\n    {   39, 0x00000000U, 0xBA125684U }, /* XSUM_XXH32_testdata[78] */\n    {   39, 0x9E3779B1U, 0x2D6246FFU }, /* XSUM_XXH32_testdata[79] */\n    {   40, 0x00000000U, 0xB22A36ABU }, /* XSUM_XXH32_testdata[80] */\n    {   40, 0x9E3779B1U, 0xBF491205U }, /* XSUM_XXH32_testdata[81] */\n    {   41, 0x00000000U, 0x161223AFU }, /* XSUM_XXH32_testdata[82] */\n    {   41, 0x9E3779B1U, 0x0CB4D70FU }, /* XSUM_XXH32_testdata[83] */\n    {   42, 0x00000000U, 0x11586B3FU }, /* XSUM_XXH32_testdata[84] */\n    {   42, 0x9E3779B1U, 0x29218DC3U }, /* XSUM_XXH32_testdata[85] */\n    {   43, 0x00000000U, 0x0A1C7CC9U }, /* XSUM_XXH32_testdata[86] */\n    {   43, 0x9E3779B1U, 0x4D7337ABU }, /* XSUM_XXH32_testdata[87] */\n    {   44, 0x00000000U, 0xF0910CD3U }, /* XSUM_XXH32_testdata[88] */\n    {   44, 0x9E3779B1U, 0xF33E0443U }, /* XSUM_XXH32_testdata[89] */\n    {   45, 0x00000000U, 0xDD97A408U }, /* XSUM_XXH32_testdata[90] */\n    {   45, 0x9E3779B1U, 0x8CEC6D9CU }, /* XSUM_XXH32_testdata[91] */\n    {   46, 0x00000000U, 0x3A609997U }, /* XSUM_XXH32_testdata[92] */\n    {   46, 0x9E3779B1U, 0xBD3BA412U }, /* XSUM_XXH32_testdata[93] */\n    {   47, 0x00000000U, 0xD5E9364EU }, /* XSUM_XXH32_testdata[94] */\n    {   47, 0x9E3779B1U, 0xA463C5A4U }, /* XSUM_XXH32_testdata[95] */\n    {   48, 0x00000000U, 0xBFD05CBDU }, /* XSUM_XXH32_testdata[96] */\n    {   48, 0x9E3779B1U, 0x0ECCC06EU }, /* XSUM_XXH32_testdata[97] */\n    {   49, 0x00000000U, 0xED9B7E81U }, /* XSUM_XXH32_testdata[98] */\n    {   49, 0x9E3779B1U, 0xA7E98491U }, /* XSUM_XXH32_testdata[99] */\n    {   50, 0x00000000U, 0xBDF553E2U }, /* XSUM_XXH32_testdata[100] */\n    {   50, 0x9E3779B1U, 0xA937E7EDU }, /* XSUM_XXH32_testdata[101] */\n    {   51, 0x00000000U, 0x3CDEED0FU }, /* XSUM_XXH32_testdata[102] */\n    {   51, 0x9E3779B1U, 0x9E2ED4B1U }, /* XSUM_XXH32_testdata[103] */\n    {   52, 0x00000000U, 0x27D50857U }, /* XSUM_XXH32_testdata[104] */\n    {   52, 0x9E3779B1U, 0x4682E48BU }, /* XSUM_XXH32_testdata[105] */\n    {   53, 0x00000000U, 0x62E63D09U }, /* XSUM_XXH32_testdata[106] */\n    {   53, 0x9E3779B1U, 0x1FF1A182U }, /* XSUM_XXH32_testdata[107] */\n    {   54, 0x00000000U, 0x30BACCFAU }, /* XSUM_XXH32_testdata[108] */\n    {   54, 0x9E3779B1U, 0x955B14A7U }, /* XSUM_XXH32_testdata[109] */\n    {   55, 0x00000000U, 0xEA5D7666U }, /* XSUM_XXH32_testdata[110] */\n    {   55, 0x9E3779B1U, 0x300DDE4DU }, /* XSUM_XXH32_testdata[111] */\n    {   56, 0x00000000U, 0xC8D07416U }, /* XSUM_XXH32_testdata[112] */\n    {   56, 0x9E3779B1U, 0x8952E674U }, /* XSUM_XXH32_testdata[113] */\n    {   57, 0x00000000U, 0xDF6987F5U }, /* XSUM_XXH32_testdata[114] */\n    {   57, 0x9E3779B1U, 0x98D545E4U }, /* XSUM_XXH32_testdata[115] */\n    {   58, 0x00000000U, 0x447DCE59U }, /* XSUM_XXH32_testdata[116] */\n    {   58, 0x9E3779B1U, 0x1CFC5C29U }, /* XSUM_XXH32_testdata[117] */\n    {   59, 0x00000000U, 0x4529090DU }, /* XSUM_XXH32_testdata[118] */\n    {   59, 0x9E3779B1U, 0xE3ACD84EU }, /* XSUM_XXH32_testdata[119] */\n    {   60, 0x00000000U, 0xA48E8818U }, /* XSUM_XXH32_testdata[120] */\n    {   60, 0x9E3779B1U, 0x31CA20F1U }, /* XSUM_XXH32_testdata[121] */\n    {   61, 0x00000000U, 0xB1C4FBB5U }, /* XSUM_XXH32_testdata[122] */\n    {   61, 0x9E3779B1U, 0x21749FC9U }, /* XSUM_XXH32_testdata[123] */\n    {   62, 0x00000000U, 0x84145F58U }, /* XSUM_XXH32_testdata[124] */\n    {   62, 0x9E3779B1U, 0x0374E669U }, /* XSUM_XXH32_testdata[125] */\n    {   63, 0x00000000U, 0xF1D48FDBU }, /* XSUM_XXH32_testdata[126] */\n    {   63, 0x9E3779B1U, 0x956B3D77U }, /* XSUM_XXH32_testdata[127] */\n    {   64, 0x00000000U, 0x02E95DBBU }, /* XSUM_XXH32_testdata[128] */\n    {   64, 0x9E3779B1U, 0xCF82F830U }, /* XSUM_XXH32_testdata[129] */\n    {   65, 0x00000000U, 0x16992B3DU }, /* XSUM_XXH32_testdata[130] */\n    {   65, 0x9E3779B1U, 0x428EEC5FU }, /* XSUM_XXH32_testdata[131] */\n    {   66, 0x00000000U, 0xDEFD9E68U }, /* XSUM_XXH32_testdata[132] */\n    {   66, 0x9E3779B1U, 0xCED81C34U }, /* XSUM_XXH32_testdata[133] */\n    {   67, 0x00000000U, 0x9667C027U }, /* XSUM_XXH32_testdata[134] */\n    {   67, 0x9E3779B1U, 0x56E465E2U }, /* XSUM_XXH32_testdata[135] */\n    {   68, 0x00000000U, 0xBC606CAAU }, /* XSUM_XXH32_testdata[136] */\n    {   68, 0x9E3779B1U, 0x3679A1D9U }, /* XSUM_XXH32_testdata[137] */\n    {   69, 0x00000000U, 0xE7069479U }, /* XSUM_XXH32_testdata[138] */\n    {   69, 0x9E3779B1U, 0x5D4B3836U }, /* XSUM_XXH32_testdata[139] */\n    {   70, 0x00000000U, 0xF6EBE19DU }, /* XSUM_XXH32_testdata[140] */\n    {   70, 0x9E3779B1U, 0x64AD7E72U }, /* XSUM_XXH32_testdata[141] */\n    {   71, 0x00000000U, 0x7ACA94AAU }, /* XSUM_XXH32_testdata[142] */\n    {   71, 0x9E3779B1U, 0xA5496174U }, /* XSUM_XXH32_testdata[143] */\n    {   72, 0x00000000U, 0xB78CCDD2U }, /* XSUM_XXH32_testdata[144] */\n    {   72, 0x9E3779B1U, 0x6003D7C1U }, /* XSUM_XXH32_testdata[145] */\n    {   73, 0x00000000U, 0x20957640U }, /* XSUM_XXH32_testdata[146] */\n    {   73, 0x9E3779B1U, 0x28188381U }, /* XSUM_XXH32_testdata[147] */\n    {   74, 0x00000000U, 0xC8FEB4EAU }, /* XSUM_XXH32_testdata[148] */\n    {   74, 0x9E3779B1U, 0x2F41F670U }, /* XSUM_XXH32_testdata[149] */\n    {   75, 0x00000000U, 0xE1299536U }, /* XSUM_XXH32_testdata[150] */\n    {   75, 0x9E3779B1U, 0x7EC75712U }, /* XSUM_XXH32_testdata[151] */\n    {   76, 0x00000000U, 0x120EBEC9U }, /* XSUM_XXH32_testdata[152] */\n    {   76, 0x9E3779B1U, 0x174F8A9CU }, /* XSUM_XXH32_testdata[153] */\n    {   77, 0x00000000U, 0x5F6F8059U }, /* XSUM_XXH32_testdata[154] */\n    {   77, 0x9E3779B1U, 0xE13D45E7U }, /* XSUM_XXH32_testdata[155] */\n    {   78, 0x00000000U, 0x2D18D24CU }, /* XSUM_XXH32_testdata[156] */\n    {   78, 0x9E3779B1U, 0xFA4D7DC7U }, /* XSUM_XXH32_testdata[157] */\n    {   79, 0x00000000U, 0x162FFDDCU }, /* XSUM_XXH32_testdata[158] */\n    {   79, 0x9E3779B1U, 0x17E69038U }, /* XSUM_XXH32_testdata[159] */\n    {   80, 0x00000000U, 0xB8D7E581U }, /* XSUM_XXH32_testdata[160] */\n    {   80, 0x9E3779B1U, 0x65D85230U }, /* XSUM_XXH32_testdata[161] */\n    {   81, 0x00000000U, 0xB13BC253U }, /* XSUM_XXH32_testdata[162] */\n    {   81, 0x9E3779B1U, 0xAB0B3D44U }, /* XSUM_XXH32_testdata[163] */\n    {   82, 0x00000000U, 0xA459BF95U }, /* XSUM_XXH32_testdata[164] */\n    {   82, 0x9E3779B1U, 0xABB92571U }, /* XSUM_XXH32_testdata[165] */\n    {   83, 0x00000000U, 0x02042BB9U }, /* XSUM_XXH32_testdata[166] */\n    {   83, 0x9E3779B1U, 0x44F624EDU }, /* XSUM_XXH32_testdata[167] */\n    {   84, 0x00000000U, 0x5AAC85A4U }, /* XSUM_XXH32_testdata[168] */\n    {   84, 0x9E3779B1U, 0x890C0E47U }, /* XSUM_XXH32_testdata[169] */\n    {   85, 0x00000000U, 0x938629B3U }, /* XSUM_XXH32_testdata[170] */\n    {   85, 0x9E3779B1U, 0x2F13BAC8U }, /* XSUM_XXH32_testdata[171] */\n    {   86, 0x00000000U, 0xE59B177EU }, /* XSUM_XXH32_testdata[172] */\n    {   86, 0x9E3779B1U, 0x24624EDCU }, /* XSUM_XXH32_testdata[173] */\n    {   87, 0x00000000U, 0xA1874DCCU }, /* XSUM_XXH32_testdata[174] */\n    {   87, 0x9E3779B1U, 0xD6C644BDU }, /* XSUM_XXH32_testdata[175] */\n    {   88, 0x00000000U, 0xAB18B20CU }, /* XSUM_XXH32_testdata[176] */\n    {   88, 0x9E3779B1U, 0x91094C63U }, /* XSUM_XXH32_testdata[177] */\n    {   89, 0x00000000U, 0x0BB0289BU }, /* XSUM_XXH32_testdata[178] */\n    {   89, 0x9E3779B1U, 0x0A79DCB2U }, /* XSUM_XXH32_testdata[179] */\n    {   90, 0x00000000U, 0x92AA4D3CU }, /* XSUM_XXH32_testdata[180] */\n    {   90, 0x9E3779B1U, 0x5892CA32U }, /* XSUM_XXH32_testdata[181] */\n    {   91, 0x00000000U, 0x88F76854U }, /* XSUM_XXH32_testdata[182] */\n    {   91, 0x9E3779B1U, 0x2398BEDAU }, /* XSUM_XXH32_testdata[183] */\n    {   92, 0x00000000U, 0xD4B4E941U }, /* XSUM_XXH32_testdata[184] */\n    {   92, 0x9E3779B1U, 0xCBC76755U }, /* XSUM_XXH32_testdata[185] */\n    {   93, 0x00000000U, 0x44CC8539U }, /* XSUM_XXH32_testdata[186] */\n    {   93, 0x9E3779B1U, 0x1A2B1728U }, /* XSUM_XXH32_testdata[187] */\n    {   94, 0x00000000U, 0xEC02C59FU }, /* XSUM_XXH32_testdata[188] */\n    {   94, 0x9E3779B1U, 0xA2302AFEU }, /* XSUM_XXH32_testdata[189] */\n    {   95, 0x00000000U, 0xF081F6AAU }, /* XSUM_XXH32_testdata[190] */\n    {   95, 0x9E3779B1U, 0x7A8F0916U }, /* XSUM_XXH32_testdata[191] */\n    {   96, 0x00000000U, 0x4CCF41E0U }, /* XSUM_XXH32_testdata[192] */\n    {   96, 0x9E3779B1U, 0xCFA0AAECU }, /* XSUM_XXH32_testdata[193] */\n    {   97, 0x00000000U, 0x914082D0U }, /* XSUM_XXH32_testdata[194] */\n    {   97, 0x9E3779B1U, 0x9FCA3CB0U }, /* XSUM_XXH32_testdata[195] */\n    {   98, 0x00000000U, 0x5B313627U }, /* XSUM_XXH32_testdata[196] */\n    {   98, 0x9E3779B1U, 0x47F152BAU }, /* XSUM_XXH32_testdata[197] */\n    {   99, 0x00000000U, 0xCC0A29F7U }, /* XSUM_XXH32_testdata[198] */\n    {   99, 0x9E3779B1U, 0xE3ACED83U }, /* XSUM_XXH32_testdata[199] */\n    {  100, 0x00000000U, 0x96AD8143U }, /* XSUM_XXH32_testdata[200] */\n    {  100, 0x9E3779B1U, 0x83D48124U }, /* XSUM_XXH32_testdata[201] */\n    {  101, 0x00000000U, 0x1B305CDBU }, /* XSUM_XXH32_testdata[202] */\n    {  101, 0x9E3779B1U, 0x5839BFA6U }, /* XSUM_XXH32_testdata[203] */\n    {  102, 0x00000000U, 0x3BD5DBACU }, /* XSUM_XXH32_testdata[204] */\n    {  102, 0x9E3779B1U, 0x78187AB1U }, /* XSUM_XXH32_testdata[205] */\n    {  103, 0x00000000U, 0x65688574U }, /* XSUM_XXH32_testdata[206] */\n    {  103, 0x9E3779B1U, 0xEC1A502CU }, /* XSUM_XXH32_testdata[207] */\n    {  104, 0x00000000U, 0x78861916U }, /* XSUM_XXH32_testdata[208] */\n    {  104, 0x9E3779B1U, 0x0F8AC709U }, /* XSUM_XXH32_testdata[209] */\n    {  105, 0x00000000U, 0x321DE7A2U }, /* XSUM_XXH32_testdata[210] */\n    {  105, 0x9E3779B1U, 0x2A383E68U }, /* XSUM_XXH32_testdata[211] */\n    {  106, 0x00000000U, 0x66021791U }, /* XSUM_XXH32_testdata[212] */\n    {  106, 0x9E3779B1U, 0x48DBC967U }, /* XSUM_XXH32_testdata[213] */\n    {  107, 0x00000000U, 0x4FBEEA6DU }, /* XSUM_XXH32_testdata[214] */\n    {  107, 0x9E3779B1U, 0x81DFC749U }, /* XSUM_XXH32_testdata[215] */\n    {  108, 0x00000000U, 0xBF6E81DAU }, /* XSUM_XXH32_testdata[216] */\n    {  108, 0x9E3779B1U, 0x6552FB4CU }, /* XSUM_XXH32_testdata[217] */\n    {  109, 0x00000000U, 0xAB53BD6CU }, /* XSUM_XXH32_testdata[218] */\n    {  109, 0x9E3779B1U, 0x47045E87U }, /* XSUM_XXH32_testdata[219] */\n    {  110, 0x00000000U, 0x80684E97U }, /* XSUM_XXH32_testdata[220] */\n    {  110, 0x9E3779B1U, 0xEFD4C511U }, /* XSUM_XXH32_testdata[221] */\n    {  111, 0x00000000U, 0xB2B2A43DU }, /* XSUM_XXH32_testdata[222] */\n    {  111, 0x9E3779B1U, 0x7C42B0B3U }, /* XSUM_XXH32_testdata[223] */\n    {  112, 0x00000000U, 0xBFD42090U }, /* XSUM_XXH32_testdata[224] */\n    {  112, 0x9E3779B1U, 0xB8FED29FU }, /* XSUM_XXH32_testdata[225] */\n    {  113, 0x00000000U, 0x17957E56U }, /* XSUM_XXH32_testdata[226] */\n    {  113, 0x9E3779B1U, 0x1F838248U }, /* XSUM_XXH32_testdata[227] */\n    {  114, 0x00000000U, 0x0825AA87U }, /* XSUM_XXH32_testdata[228] */\n    {  114, 0x9E3779B1U, 0x588CD5CDU }, /* XSUM_XXH32_testdata[229] */\n    {  115, 0x00000000U, 0x9A1D6116U }, /* XSUM_XXH32_testdata[230] */\n    {  115, 0x9E3779B1U, 0xB39272D7U }, /* XSUM_XXH32_testdata[231] */\n    {  116, 0x00000000U, 0x12A0643EU }, /* XSUM_XXH32_testdata[232] */\n    {  116, 0x9E3779B1U, 0x0B1A2B23U }, /* XSUM_XXH32_testdata[233] */\n    {  117, 0x00000000U, 0xB0D0F17BU }, /* XSUM_XXH32_testdata[234] */\n    {  117, 0x9E3779B1U, 0x60C609A0U }, /* XSUM_XXH32_testdata[235] */\n    {  118, 0x00000000U, 0xCDA9A095U }, /* XSUM_XXH32_testdata[236] */\n    {  118, 0x9E3779B1U, 0xE0C95C1FU }, /* XSUM_XXH32_testdata[237] */\n    {  119, 0x00000000U, 0x176D3D10U }, /* XSUM_XXH32_testdata[238] */\n    {  119, 0x9E3779B1U, 0x18AF97ADU }, /* XSUM_XXH32_testdata[239] */\n    {  120, 0x00000000U, 0xEAA71DC5U }, /* XSUM_XXH32_testdata[240] */\n    {  120, 0x9E3779B1U, 0x820F245AU }, /* XSUM_XXH32_testdata[241] */\n    {  121, 0x00000000U, 0x42171963U }, /* XSUM_XXH32_testdata[242] */\n    {  121, 0x9E3779B1U, 0x7DA93D33U }, /* XSUM_XXH32_testdata[243] */\n    {  122, 0x00000000U, 0x744024B1U }, /* XSUM_XXH32_testdata[244] */\n    {  122, 0x9E3779B1U, 0x27D5D087U }, /* XSUM_XXH32_testdata[245] */\n    {  123, 0x00000000U, 0x7A501B1DU }, /* XSUM_XXH32_testdata[246] */\n    {  123, 0x9E3779B1U, 0xA90DADD0U }, /* XSUM_XXH32_testdata[247] */\n    {  124, 0x00000000U, 0xEEF0D529U }, /* XSUM_XXH32_testdata[248] */\n    {  124, 0x9E3779B1U, 0x7CC63F33U }, /* XSUM_XXH32_testdata[249] */\n    {  125, 0x00000000U, 0x842E47E2U }, /* XSUM_XXH32_testdata[250] */\n    {  125, 0x9E3779B1U, 0xF486621CU }, /* XSUM_XXH32_testdata[251] */\n    {  126, 0x00000000U, 0xED06DF9FU }, /* XSUM_XXH32_testdata[252] */\n    {  126, 0x9E3779B1U, 0xB2EC41E8U }, /* XSUM_XXH32_testdata[253] */\n    {  127, 0x00000000U, 0x1E49F7FCU }, /* XSUM_XXH32_testdata[254] */\n    {  127, 0x9E3779B1U, 0xC926CE8FU }, /* XSUM_XXH32_testdata[255] */\n    {  128, 0x00000000U, 0x0FD07B71U }, /* XSUM_XXH32_testdata[256] */\n    {  128, 0x9E3779B1U, 0x3BD1140EU }, /* XSUM_XXH32_testdata[257] */\n    {  129, 0x00000000U, 0x68C9EC37U }, /* XSUM_XXH32_testdata[258] */\n    {  129, 0x9E3779B1U, 0x2A9476A5U }, /* XSUM_XXH32_testdata[259] */\n    {  130, 0x00000000U, 0x6F668C0EU }, /* XSUM_XXH32_testdata[260] */\n    {  130, 0x9E3779B1U, 0x8FEA8125U }, /* XSUM_XXH32_testdata[261] */\n    {  131, 0x00000000U, 0x250C2751U }, /* XSUM_XXH32_testdata[262] */\n    {  131, 0x9E3779B1U, 0xE2620299U }, /* XSUM_XXH32_testdata[263] */\n    {  132, 0x00000000U, 0x467FF462U }, /* XSUM_XXH32_testdata[264] */\n    {  132, 0x9E3779B1U, 0x2B74691CU }, /* XSUM_XXH32_testdata[265] */\n    {  133, 0x00000000U, 0x3433F9DBU }, /* XSUM_XXH32_testdata[266] */\n    {  133, 0x9E3779B1U, 0xFF609B27U }, /* XSUM_XXH32_testdata[267] */\n    {  134, 0x00000000U, 0x77D99961U }, /* XSUM_XXH32_testdata[268] */\n    {  134, 0x9E3779B1U, 0x74391A4CU }, /* XSUM_XXH32_testdata[269] */\n    {  135, 0x00000000U, 0x5F75EBB8U }, /* XSUM_XXH32_testdata[270] */\n    {  135, 0x9E3779B1U, 0x91EE2559U }, /* XSUM_XXH32_testdata[271] */\n    {  136, 0x00000000U, 0x28FB329FU }, /* XSUM_XXH32_testdata[272] */\n    {  136, 0x9E3779B1U, 0x7448C47DU }, /* XSUM_XXH32_testdata[273] */\n    {  137, 0x00000000U, 0xB70B14C2U }, /* XSUM_XXH32_testdata[274] */\n    {  137, 0x9E3779B1U, 0x3C1F9CFAU }, /* XSUM_XXH32_testdata[275] */\n    {  138, 0x00000000U, 0xF96CC1F5U }, /* XSUM_XXH32_testdata[276] */\n    {  138, 0x9E3779B1U, 0xAD05AE47U }, /* XSUM_XXH32_testdata[277] */\n    {  139, 0x00000000U, 0x226BFE7FU }, /* XSUM_XXH32_testdata[278] */\n    {  139, 0x9E3779B1U, 0x26367250U }, /* XSUM_XXH32_testdata[279] */\n    {  140, 0x00000000U, 0xE084C6C2U }, /* XSUM_XXH32_testdata[280] */\n    {  140, 0x9E3779B1U, 0x0CB176A1U }, /* XSUM_XXH32_testdata[281] */\n    {  141, 0x00000000U, 0x2BD9ACDEU }, /* XSUM_XXH32_testdata[282] */\n    {  141, 0x9E3779B1U, 0x0D7330CCU }, /* XSUM_XXH32_testdata[283] */\n    {  142, 0x00000000U, 0xE8491C05U }, /* XSUM_XXH32_testdata[284] */\n    {  142, 0x9E3779B1U, 0xE39C9562U }, /* XSUM_XXH32_testdata[285] */\n    {  143, 0x00000000U, 0x8C232E66U }, /* XSUM_XXH32_testdata[286] */\n    {  143, 0x9E3779B1U, 0x0CB48D29U }, /* XSUM_XXH32_testdata[287] */\n    {  144, 0x00000000U, 0x07505878U }, /* XSUM_XXH32_testdata[288] */\n    {  144, 0x9E3779B1U, 0x6BA28596U }, /* XSUM_XXH32_testdata[289] */\n    {  145, 0x00000000U, 0x9010ABAEU }, /* XSUM_XXH32_testdata[290] */\n    {  145, 0x9E3779B1U, 0x76A5F3D8U }, /* XSUM_XXH32_testdata[291] */\n    {  146, 0x00000000U, 0x6C421E2EU }, /* XSUM_XXH32_testdata[292] */\n    {  146, 0x9E3779B1U, 0x81A9CA9EU }, /* XSUM_XXH32_testdata[293] */\n    {  147, 0x00000000U, 0xF166561EU }, /* XSUM_XXH32_testdata[294] */\n    {  147, 0x9E3779B1U, 0x9F47EC56U }, /* XSUM_XXH32_testdata[295] */\n    {  148, 0x00000000U, 0xE5F95DE0U }, /* XSUM_XXH32_testdata[296] */\n    {  148, 0x9E3779B1U, 0xE83F34DFU }, /* XSUM_XXH32_testdata[297] */\n    {  149, 0x00000000U, 0x4B285245U }, /* XSUM_XXH32_testdata[298] */\n    {  149, 0x9E3779B1U, 0x6E8BF7D1U }, /* XSUM_XXH32_testdata[299] */\n    {  150, 0x00000000U, 0xAAC19EF4U }, /* XSUM_XXH32_testdata[300] */\n    {  150, 0x9E3779B1U, 0xB1DA61CBU }, /* XSUM_XXH32_testdata[301] */\n    {  151, 0x00000000U, 0x40BD0BF1U }, /* XSUM_XXH32_testdata[302] */\n    {  151, 0x9E3779B1U, 0x1B4E44AEU }, /* XSUM_XXH32_testdata[303] */\n    {  152, 0x00000000U, 0x3371B10DU }, /* XSUM_XXH32_testdata[304] */\n    {  152, 0x9E3779B1U, 0x41CAA047U }, /* XSUM_XXH32_testdata[305] */\n    {  153, 0x00000000U, 0x26BABAF8U }, /* XSUM_XXH32_testdata[306] */\n    {  153, 0x9E3779B1U, 0x7F2C8740U }, /* XSUM_XXH32_testdata[307] */\n    {  154, 0x00000000U, 0x66A6367BU }, /* XSUM_XXH32_testdata[308] */\n    {  154, 0x9E3779B1U, 0x5F647E67U }, /* XSUM_XXH32_testdata[309] */\n    {  155, 0x00000000U, 0x1A3170B4U }, /* XSUM_XXH32_testdata[310] */\n    {  155, 0x9E3779B1U, 0x517CD1A2U }, /* XSUM_XXH32_testdata[311] */\n    {  156, 0x00000000U, 0x829D9B68U }, /* XSUM_XXH32_testdata[312] */\n    {  156, 0x9E3779B1U, 0x357D5E8CU }, /* XSUM_XXH32_testdata[313] */\n    {  157, 0x00000000U, 0x1595DF79U }, /* XSUM_XXH32_testdata[314] */\n    {  157, 0x9E3779B1U, 0x2AA95120U }, /* XSUM_XXH32_testdata[315] */\n    {  158, 0x00000000U, 0xCC70600FU }, /* XSUM_XXH32_testdata[316] */\n    {  158, 0x9E3779B1U, 0x2794A046U }, /* XSUM_XXH32_testdata[317] */\n    {  159, 0x00000000U, 0xD0EBBC26U }, /* XSUM_XXH32_testdata[318] */\n    {  159, 0x9E3779B1U, 0xA16EAAD4U }, /* XSUM_XXH32_testdata[319] */\n    {  160, 0x00000000U, 0x468BAE76U }, /* XSUM_XXH32_testdata[320] */\n    {  160, 0x9E3779B1U, 0xAD988AA2U }, /* XSUM_XXH32_testdata[321] */\n    {  161, 0x00000000U, 0x49E4DC27U }, /* XSUM_XXH32_testdata[322] */\n    {  161, 0x9E3779B1U, 0x1BD4400CU }, /* XSUM_XXH32_testdata[323] */\n    {  162, 0x00000000U, 0x95E85961U }, /* XSUM_XXH32_testdata[324] */\n    {  162, 0x9E3779B1U, 0xCEEB08DFU }, /* XSUM_XXH32_testdata[325] */\n    {  163, 0x00000000U, 0x147A5E77U }, /* XSUM_XXH32_testdata[326] */\n    {  163, 0x9E3779B1U, 0x6B876F53U }, /* XSUM_XXH32_testdata[327] */\n    {  164, 0x00000000U, 0xF3D3DECDU }, /* XSUM_XXH32_testdata[328] */\n    {  164, 0x9E3779B1U, 0xFD669393U }, /* XSUM_XXH32_testdata[329] */\n    {  165, 0x00000000U, 0xE529B75BU }, /* XSUM_XXH32_testdata[330] */\n    {  165, 0x9E3779B1U, 0x7D257F34U }, /* XSUM_XXH32_testdata[331] */\n    {  166, 0x00000000U, 0x2C7251F6U }, /* XSUM_XXH32_testdata[332] */\n    {  166, 0x9E3779B1U, 0x4569F86EU }, /* XSUM_XXH32_testdata[333] */\n    {  167, 0x00000000U, 0x0EE0E8CCU }, /* XSUM_XXH32_testdata[334] */\n    {  167, 0x9E3779B1U, 0x73C2A8EBU }, /* XSUM_XXH32_testdata[335] */\n    {  168, 0x00000000U, 0xC00D25A0U }, /* XSUM_XXH32_testdata[336] */\n    {  168, 0x9E3779B1U, 0xC37F2027U }, /* XSUM_XXH32_testdata[337] */\n    {  169, 0x00000000U, 0x6DDDAF3DU }, /* XSUM_XXH32_testdata[338] */\n    {  169, 0x9E3779B1U, 0xB8EF05AFU }, /* XSUM_XXH32_testdata[339] */\n    {  170, 0x00000000U, 0xEFAAC76BU }, /* XSUM_XXH32_testdata[340] */\n    {  170, 0x9E3779B1U, 0x7BD34115U }, /* XSUM_XXH32_testdata[341] */\n    {  171, 0x00000000U, 0x00331D4BU }, /* XSUM_XXH32_testdata[342] */\n    {  171, 0x9E3779B1U, 0xDCE4C464U }, /* XSUM_XXH32_testdata[343] */\n    {  172, 0x00000000U, 0xCE08A470U }, /* XSUM_XXH32_testdata[344] */\n    {  172, 0x9E3779B1U, 0x89988159U }, /* XSUM_XXH32_testdata[345] */\n    {  173, 0x00000000U, 0xAC3606B0U }, /* XSUM_XXH32_testdata[346] */\n    {  173, 0x9E3779B1U, 0x45BC9345U }, /* XSUM_XXH32_testdata[347] */\n    {  174, 0x00000000U, 0xE38EE399U }, /* XSUM_XXH32_testdata[348] */\n    {  174, 0x9E3779B1U, 0xE9DB0906U }, /* XSUM_XXH32_testdata[349] */\n    {  175, 0x00000000U, 0xC3B39539U }, /* XSUM_XXH32_testdata[350] */\n    {  175, 0x9E3779B1U, 0x4DA8A320U }, /* XSUM_XXH32_testdata[351] */\n    {  176, 0x00000000U, 0x01C0ADB8U }, /* XSUM_XXH32_testdata[352] */\n    {  176, 0x9E3779B1U, 0x63DF5EA5U }, /* XSUM_XXH32_testdata[353] */\n    {  177, 0x00000000U, 0xC7CC4DDEU }, /* XSUM_XXH32_testdata[354] */\n    {  177, 0x9E3779B1U, 0xB2A8BFD6U }, /* XSUM_XXH32_testdata[355] */\n    {  178, 0x00000000U, 0x4D8EFD3EU }, /* XSUM_XXH32_testdata[356] */\n    {  178, 0x9E3779B1U, 0x23346DEDU }, /* XSUM_XXH32_testdata[357] */\n    {  179, 0x00000000U, 0xDB8C3D00U }, /* XSUM_XXH32_testdata[358] */\n    {  179, 0x9E3779B1U, 0xD958AFB0U }, /* XSUM_XXH32_testdata[359] */\n    {  180, 0x00000000U, 0x87630F0BU }, /* XSUM_XXH32_testdata[360] */\n    {  180, 0x9E3779B1U, 0x0EF4A915U }, /* XSUM_XXH32_testdata[361] */\n    {  181, 0x00000000U, 0xEA494866U }, /* XSUM_XXH32_testdata[362] */\n    {  181, 0x9E3779B1U, 0x802BA360U }, /* XSUM_XXH32_testdata[363] */\n    {  182, 0x00000000U, 0x974E6EC9U }, /* XSUM_XXH32_testdata[364] */\n    {  182, 0x9E3779B1U, 0x16D34030U }, /* XSUM_XXH32_testdata[365] */\n    {  183, 0x00000000U, 0x0852ACF7U }, /* XSUM_XXH32_testdata[366] */\n    {  183, 0x9E3779B1U, 0xE5DCC283U }, /* XSUM_XXH32_testdata[367] */\n    {  184, 0x00000000U, 0x72568284U }, /* XSUM_XXH32_testdata[368] */\n    {  184, 0x9E3779B1U, 0x7B3EBBB5U }, /* XSUM_XXH32_testdata[369] */\n    {  185, 0x00000000U, 0xE657B65DU }, /* XSUM_XXH32_testdata[370] */\n    {  185, 0x9E3779B1U, 0xD14C4260U }, /* XSUM_XXH32_testdata[371] */\n    {  186, 0x00000000U, 0xAA4D1F29U }, /* XSUM_XXH32_testdata[372] */\n    {  186, 0x9E3779B1U, 0xB2957E22U }, /* XSUM_XXH32_testdata[373] */\n    {  187, 0x00000000U, 0xEE027F29U }, /* XSUM_XXH32_testdata[374] */\n    {  187, 0x9E3779B1U, 0xAF51CEECU }, /* XSUM_XXH32_testdata[375] */\n    {  188, 0x00000000U, 0x881E82E7U }, /* XSUM_XXH32_testdata[376] */\n    {  188, 0x9E3779B1U, 0x27197D64U }, /* XSUM_XXH32_testdata[377] */\n    {  189, 0x00000000U, 0x34E829DAU }, /* XSUM_XXH32_testdata[378] */\n    {  189, 0x9E3779B1U, 0xD72BB840U }, /* XSUM_XXH32_testdata[379] */\n    {  190, 0x00000000U, 0x2A466969U }, /* XSUM_XXH32_testdata[380] */\n    {  190, 0x9E3779B1U, 0xEA2A0159U }, /* XSUM_XXH32_testdata[381] */\n    {  191, 0x00000000U, 0x1B97EE64U }, /* XSUM_XXH32_testdata[382] */\n    {  191, 0x9E3779B1U, 0xDB59761CU }, /* XSUM_XXH32_testdata[383] */\n    {  192, 0x00000000U, 0x40EA7C2FU }, /* XSUM_XXH32_testdata[384] */\n    {  192, 0x9E3779B1U, 0x45FFCD43U }, /* XSUM_XXH32_testdata[385] */\n    {  193, 0x00000000U, 0xCF7EF1BAU }, /* XSUM_XXH32_testdata[386] */\n    {  193, 0x9E3779B1U, 0x972A1C6CU }, /* XSUM_XXH32_testdata[387] */\n    {  194, 0x00000000U, 0xC048459EU }, /* XSUM_XXH32_testdata[388] */\n    {  194, 0x9E3779B1U, 0xCEF37E3DU }, /* XSUM_XXH32_testdata[389] */\n    {  195, 0x00000000U, 0x70536B96U }, /* XSUM_XXH32_testdata[390] */\n    {  195, 0x9E3779B1U, 0x5637D2B9U }, /* XSUM_XXH32_testdata[391] */\n    {  196, 0x00000000U, 0xB5248A61U }, /* XSUM_XXH32_testdata[392] */\n    {  196, 0x9E3779B1U, 0x45B5F8CDU }, /* XSUM_XXH32_testdata[393] */\n    {  197, 0x00000000U, 0x41BD629EU }, /* XSUM_XXH32_testdata[394] */\n    {  197, 0x9E3779B1U, 0xE4467DAAU }, /* XSUM_XXH32_testdata[395] */\n    {  198, 0x00000000U, 0x07F2D13FU }, /* XSUM_XXH32_testdata[396] */\n    {  198, 0x9E3779B1U, 0xDF6B5563U }, /* XSUM_XXH32_testdata[397] */\n    {  199, 0x00000000U, 0x04C1895FU }, /* XSUM_XXH32_testdata[398] */\n    {  199, 0x9E3779B1U, 0x160380CDU }, /* XSUM_XXH32_testdata[399] */\n    {  200, 0x00000000U, 0x21B47598U }, /* XSUM_XXH32_testdata[400] */\n    {  200, 0x9E3779B1U, 0xA2CD69EDU }, /* XSUM_XXH32_testdata[401] */\n    {  201, 0x00000000U, 0xFE4BCD4FU }, /* XSUM_XXH32_testdata[402] */\n    {  201, 0x9E3779B1U, 0x90D46DB3U }, /* XSUM_XXH32_testdata[403] */\n    {  202, 0x00000000U, 0xFEEC392CU }, /* XSUM_XXH32_testdata[404] */\n    {  202, 0x9E3779B1U, 0xB2F49A0CU }, /* XSUM_XXH32_testdata[405] */\n    {  203, 0x00000000U, 0x69548705U }, /* XSUM_XXH32_testdata[406] */\n    {  203, 0x9E3779B1U, 0x87F156CCU }, /* XSUM_XXH32_testdata[407] */\n    {  204, 0x00000000U, 0xDEA84C5FU }, /* XSUM_XXH32_testdata[408] */\n    {  204, 0x9E3779B1U, 0x57A9236DU }, /* XSUM_XXH32_testdata[409] */\n    {  205, 0x00000000U, 0xCB0685A3U }, /* XSUM_XXH32_testdata[410] */\n    {  205, 0x9E3779B1U, 0x072BBA0BU }, /* XSUM_XXH32_testdata[411] */\n    {  206, 0x00000000U, 0x010B5AF7U }, /* XSUM_XXH32_testdata[412] */\n    {  206, 0x9E3779B1U, 0x606A02CAU }, /* XSUM_XXH32_testdata[413] */\n    {  207, 0x00000000U, 0x45EA54DCU }, /* XSUM_XXH32_testdata[414] */\n    {  207, 0x9E3779B1U, 0xD48744A0U }, /* XSUM_XXH32_testdata[415] */\n    {  208, 0x00000000U, 0x7E8AAE87U }, /* XSUM_XXH32_testdata[416] */\n    {  208, 0x9E3779B1U, 0x8F46A337U }, /* XSUM_XXH32_testdata[417] */\n    {  209, 0x00000000U, 0xE7FC6C7DU }, /* XSUM_XXH32_testdata[418] */\n    {  209, 0x9E3779B1U, 0x2F1B064EU }, /* XSUM_XXH32_testdata[419] */\n    {  210, 0x00000000U, 0x96FBF40EU }, /* XSUM_XXH32_testdata[420] */\n    {  210, 0x9E3779B1U, 0xBEE2100BU }, /* XSUM_XXH32_testdata[421] */\n    {  211, 0x00000000U, 0xC0BE1A6DU }, /* XSUM_XXH32_testdata[422] */\n    {  211, 0x9E3779B1U, 0x5E032ABCU }, /* XSUM_XXH32_testdata[423] */\n    {  212, 0x00000000U, 0xA3FF15AEU }, /* XSUM_XXH32_testdata[424] */\n    {  212, 0x9E3779B1U, 0xA1749364U }, /* XSUM_XXH32_testdata[425] */\n    {  213, 0x00000000U, 0x46F95C4CU }, /* XSUM_XXH32_testdata[426] */\n    {  213, 0x9E3779B1U, 0x03ED3FACU }, /* XSUM_XXH32_testdata[427] */\n    {  214, 0x00000000U, 0x8D6C0F56U }, /* XSUM_XXH32_testdata[428] */\n    {  214, 0x9E3779B1U, 0x4307C70AU }, /* XSUM_XXH32_testdata[429] */\n    {  215, 0x00000000U, 0x51B02367U }, /* XSUM_XXH32_testdata[430] */\n    {  215, 0x9E3779B1U, 0x0516313CU }, /* XSUM_XXH32_testdata[431] */\n    {  216, 0x00000000U, 0xFD9F6A62U }, /* XSUM_XXH32_testdata[432] */\n    {  216, 0x9E3779B1U, 0xFC05201EU }, /* XSUM_XXH32_testdata[433] */\n    {  217, 0x00000000U, 0x8E62A788U }, /* XSUM_XXH32_testdata[434] */\n    {  217, 0x9E3779B1U, 0xCE658A4EU }, /* XSUM_XXH32_testdata[435] */\n    {  218, 0x00000000U, 0xEE9AE53EU }, /* XSUM_XXH32_testdata[436] */\n    {  218, 0x9E3779B1U, 0x00B84CCFU }, /* XSUM_XXH32_testdata[437] */\n    {  219, 0x00000000U, 0x1E43262AU }, /* XSUM_XXH32_testdata[438] */\n    {  219, 0x9E3779B1U, 0xB4488BF6U }, /* XSUM_XXH32_testdata[439] */\n    {  220, 0x00000000U, 0x5A6411DAU }, /* XSUM_XXH32_testdata[440] */\n    {  220, 0x9E3779B1U, 0xA54EB98DU }, /* XSUM_XXH32_testdata[441] */\n    {  221, 0x00000000U, 0xB158BC7BU }, /* XSUM_XXH32_testdata[442] */\n    {  221, 0x9E3779B1U, 0x1F831198U }, /* XSUM_XXH32_testdata[443] */\n    {  222, 0x00000000U, 0x5BD11DBDU }, /* XSUM_XXH32_testdata[444] */\n    {  222, 0x9E3779B1U, 0x58803C5FU }, /* XSUM_XXH32_testdata[445] */\n    {  223, 0x00000000U, 0xABBBBE2CU }, /* XSUM_XXH32_testdata[446] */\n    {  223, 0x9E3779B1U, 0xFAFEF6E3U }, /* XSUM_XXH32_testdata[447] */\n    {  224, 0x00000000U, 0x77996A88U }, /* XSUM_XXH32_testdata[448] */\n    {  224, 0x9E3779B1U, 0xF9B4EBE5U }, /* XSUM_XXH32_testdata[449] */\n    {  225, 0x00000000U, 0x58B792A6U }, /* XSUM_XXH32_testdata[450] */\n    {  225, 0x9E3779B1U, 0x5F1CE2D5U }, /* XSUM_XXH32_testdata[451] */\n    {  226, 0x00000000U, 0x3AA80B8FU }, /* XSUM_XXH32_testdata[452] */\n    {  226, 0x9E3779B1U, 0x42BAFC0BU }, /* XSUM_XXH32_testdata[453] */\n    {  227, 0x00000000U, 0xDCB4AAD3U }, /* XSUM_XXH32_testdata[454] */\n    {  227, 0x9E3779B1U, 0xF51CBA0AU }, /* XSUM_XXH32_testdata[455] */\n    {  228, 0x00000000U, 0xAD3652F9U }, /* XSUM_XXH32_testdata[456] */\n    {  228, 0x9E3779B1U, 0xCD3FF465U }, /* XSUM_XXH32_testdata[457] */\n    {  229, 0x00000000U, 0xA7E2F595U }, /* XSUM_XXH32_testdata[458] */\n    {  229, 0x9E3779B1U, 0x0BBD609BU }, /* XSUM_XXH32_testdata[459] */\n    {  230, 0x00000000U, 0x077419EDU }, /* XSUM_XXH32_testdata[460] */\n    {  230, 0x9E3779B1U, 0xC7742FBFU }, /* XSUM_XXH32_testdata[461] */\n    {  231, 0x00000000U, 0x0E6006C7U }, /* XSUM_XXH32_testdata[462] */\n    {  231, 0x9E3779B1U, 0x7B7DEA5AU }, /* XSUM_XXH32_testdata[463] */\n    {  232, 0x00000000U, 0x61BA51D3U }, /* XSUM_XXH32_testdata[464] */\n    {  232, 0x9E3779B1U, 0x248CD26EU }, /* XSUM_XXH32_testdata[465] */\n    {  233, 0x00000000U, 0xAAA4C78AU }, /* XSUM_XXH32_testdata[466] */\n    {  233, 0x9E3779B1U, 0x06503C12U }, /* XSUM_XXH32_testdata[467] */\n    {  234, 0x00000000U, 0x6CBD3AAFU }, /* XSUM_XXH32_testdata[468] */\n    {  234, 0x9E3779B1U, 0x6968AC95U }, /* XSUM_XXH32_testdata[469] */\n    {  235, 0x00000000U, 0x1FFDE8D3U }, /* XSUM_XXH32_testdata[470] */\n    {  235, 0x9E3779B1U, 0x2BF5B0BCU }, /* XSUM_XXH32_testdata[471] */\n    {  236, 0x00000000U, 0x0A722C4CU }, /* XSUM_XXH32_testdata[472] */\n    {  236, 0x9E3779B1U, 0x3130CB0CU }, /* XSUM_XXH32_testdata[473] */\n    {  237, 0x00000000U, 0x392B8349U }, /* XSUM_XXH32_testdata[474] */\n    {  237, 0x9E3779B1U, 0x0C7E319DU }, /* XSUM_XXH32_testdata[475] */\n    {  238, 0x00000000U, 0x5A40B925U }, /* XSUM_XXH32_testdata[476] */\n    {  238, 0x9E3779B1U, 0x35D94906U }, /* XSUM_XXH32_testdata[477] */\n    {  239, 0x00000000U, 0x7B84D789U }, /* XSUM_XXH32_testdata[478] */\n    {  239, 0x9E3779B1U, 0x6B6ACD8DU }, /* XSUM_XXH32_testdata[479] */\n    {  240, 0x00000000U, 0xFA6B6557U }, /* XSUM_XXH32_testdata[480] */\n    {  240, 0x9E3779B1U, 0x55DF41D9U }, /* XSUM_XXH32_testdata[481] */\n    {  241, 0x00000000U, 0xE5F7C54DU }, /* XSUM_XXH32_testdata[482] */\n    {  241, 0x9E3779B1U, 0x13B52081U }, /* XSUM_XXH32_testdata[483] */\n    {  242, 0x00000000U, 0xDB51CFEFU }, /* XSUM_XXH32_testdata[484] */\n    {  242, 0x9E3779B1U, 0xEA71D8F1U }, /* XSUM_XXH32_testdata[485] */\n    {  243, 0x00000000U, 0x1C39FE79U }, /* XSUM_XXH32_testdata[486] */\n    {  243, 0x9E3779B1U, 0x09465000U }, /* XSUM_XXH32_testdata[487] */\n    {  244, 0x00000000U, 0x9BA349FFU }, /* XSUM_XXH32_testdata[488] */\n    {  244, 0x9E3779B1U, 0x0752C3A7U }, /* XSUM_XXH32_testdata[489] */\n    {  245, 0x00000000U, 0x68006247U }, /* XSUM_XXH32_testdata[490] */\n    {  245, 0x9E3779B1U, 0x6FB5D6BCU }, /* XSUM_XXH32_testdata[491] */\n    {  246, 0x00000000U, 0xBD690B67U }, /* XSUM_XXH32_testdata[492] */\n    {  246, 0x9E3779B1U, 0x8083E6ADU }, /* XSUM_XXH32_testdata[493] */\n    {  247, 0x00000000U, 0x88E644F7U }, /* XSUM_XXH32_testdata[494] */\n    {  247, 0x9E3779B1U, 0x6C439B41U }, /* XSUM_XXH32_testdata[495] */\n    {  248, 0x00000000U, 0xDBD38174U }, /* XSUM_XXH32_testdata[496] */\n    {  248, 0x9E3779B1U, 0xC21A4CFAU }, /* XSUM_XXH32_testdata[497] */\n    {  249, 0x00000000U, 0x7A9A3922U }, /* XSUM_XXH32_testdata[498] */\n    {  249, 0x9E3779B1U, 0x4AA70D45U }, /* XSUM_XXH32_testdata[499] */\n    {  250, 0x00000000U, 0xDCA8BCBEU }, /* XSUM_XXH32_testdata[500] */\n    {  250, 0x9E3779B1U, 0x57D86074U }, /* XSUM_XXH32_testdata[501] */\n    {  251, 0x00000000U, 0x1CC7C17BU }, /* XSUM_XXH32_testdata[502] */\n    {  251, 0x9E3779B1U, 0x5A960706U }, /* XSUM_XXH32_testdata[503] */\n    {  252, 0x00000000U, 0x7DDAADACU }, /* XSUM_XXH32_testdata[504] */\n    {  252, 0x9E3779B1U, 0xC8C004DCU }, /* XSUM_XXH32_testdata[505] */\n    {  253, 0x00000000U, 0x72FD8191U }, /* XSUM_XXH32_testdata[506] */\n    {  253, 0x9E3779B1U, 0x2F101B03U }, /* XSUM_XXH32_testdata[507] */\n    {  254, 0x00000000U, 0x0D07F150U }, /* XSUM_XXH32_testdata[508] */\n    {  254, 0x9E3779B1U, 0x21F78D0DU }, /* XSUM_XXH32_testdata[509] */\n    {  255, 0x00000000U, 0xE048E445U }, /* XSUM_XXH32_testdata[510] */\n    {  255, 0x9E3779B1U, 0x9A92B749U }, /* XSUM_XXH32_testdata[511] */\n    {  256, 0x00000000U, 0x520CB910U }, /* XSUM_XXH32_testdata[512] */\n    {  256, 0x9E3779B1U, 0x734E8A8DU }, /* XSUM_XXH32_testdata[513] */\n    {  257, 0x00000000U, 0x9566588EU }, /* XSUM_XXH32_testdata[514] */\n    {  257, 0x9E3779B1U, 0x4A06AC3FU }, /* XSUM_XXH32_testdata[515] */\n    {  258, 0x00000000U, 0x58EFFE56U }, /* XSUM_XXH32_testdata[516] */\n    {  258, 0x9E3779B1U, 0x0284D4DCU }, /* XSUM_XXH32_testdata[517] */\n    {  259, 0x00000000U, 0x1F6CB68FU }, /* XSUM_XXH32_testdata[518] */\n    {  259, 0x9E3779B1U, 0xC6DD38D6U }, /* XSUM_XXH32_testdata[519] */\n    {  260, 0x00000000U, 0x0177FBC0U }, /* XSUM_XXH32_testdata[520] */\n    {  260, 0x9E3779B1U, 0xCA9AC0CEU }, /* XSUM_XXH32_testdata[521] */\n    {  261, 0x00000000U, 0x437BA246U }, /* XSUM_XXH32_testdata[522] */\n    {  261, 0x9E3779B1U, 0x6424A4E4U }, /* XSUM_XXH32_testdata[523] */\n    {  262, 0x00000000U, 0x7DFD15E7U }, /* XSUM_XXH32_testdata[524] */\n    {  262, 0x9E3779B1U, 0x067EEDF2U }, /* XSUM_XXH32_testdata[525] */\n    {  263, 0x00000000U, 0x7BFD60CEU }, /* XSUM_XXH32_testdata[526] */\n    {  263, 0x9E3779B1U, 0xEDEE5E47U }, /* XSUM_XXH32_testdata[527] */\n    {  264, 0x00000000U, 0x92E3EC8DU }, /* XSUM_XXH32_testdata[528] */\n    {  264, 0x9E3779B1U, 0x467D0FCCU }, /* XSUM_XXH32_testdata[529] */\n    {  265, 0x00000000U, 0xC9057B25U }, /* XSUM_XXH32_testdata[530] */\n    {  265, 0x9E3779B1U, 0x2D4D5572U }, /* XSUM_XXH32_testdata[531] */\n    {  266, 0x00000000U, 0xBF4A38C0U }, /* XSUM_XXH32_testdata[532] */\n    {  266, 0x9E3779B1U, 0x6D9BC26BU }, /* XSUM_XXH32_testdata[533] */\n    {  267, 0x00000000U, 0xAD9D6E04U }, /* XSUM_XXH32_testdata[534] */\n    {  267, 0x9E3779B1U, 0x9D13F48EU }, /* XSUM_XXH32_testdata[535] */\n    {  268, 0x00000000U, 0xE8818377U }, /* XSUM_XXH32_testdata[536] */\n    {  268, 0x9E3779B1U, 0xA1ADFAB5U }, /* XSUM_XXH32_testdata[537] */\n    {  269, 0x00000000U, 0x4050B828U }, /* XSUM_XXH32_testdata[538] */\n    {  269, 0x9E3779B1U, 0x1F388E55U }, /* XSUM_XXH32_testdata[539] */\n    {  270, 0x00000000U, 0xA5151E7EU }, /* XSUM_XXH32_testdata[540] */\n    {  270, 0x9E3779B1U, 0x748B3C1FU }, /* XSUM_XXH32_testdata[541] */\n    {  271, 0x00000000U, 0xBB29ABC8U }, /* XSUM_XXH32_testdata[542] */\n    {  271, 0x9E3779B1U, 0x9E262EFAU }, /* XSUM_XXH32_testdata[543] */\n    {  272, 0x00000000U, 0x42AB99E9U }, /* XSUM_XXH32_testdata[544] */\n    {  272, 0x9E3779B1U, 0x14F2C194U }, /* XSUM_XXH32_testdata[545] */\n    {  273, 0x00000000U, 0xF34DBFE3U }, /* XSUM_XXH32_testdata[546] */\n    {  273, 0x9E3779B1U, 0xB212E03EU }, /* XSUM_XXH32_testdata[547] */\n    {  274, 0x00000000U, 0x1988AD89U }, /* XSUM_XXH32_testdata[548] */\n    {  274, 0x9E3779B1U, 0x03EEFF8CU }, /* XSUM_XXH32_testdata[549] */\n    {  275, 0x00000000U, 0xAEE9CE0EU }, /* XSUM_XXH32_testdata[550] */\n    {  275, 0x9E3779B1U, 0x23A4F5C0U }, /* XSUM_XXH32_testdata[551] */\n    {  276, 0x00000000U, 0xD0C6849BU }, /* XSUM_XXH32_testdata[552] */\n    {  276, 0x9E3779B1U, 0xADD3AB66U }, /* XSUM_XXH32_testdata[553] */\n    {  277, 0x00000000U, 0x4FC91B31U }, /* XSUM_XXH32_testdata[554] */\n    {  277, 0x9E3779B1U, 0xABDC0BC8U }, /* XSUM_XXH32_testdata[555] */\n    {  278, 0x00000000U, 0xEDFEAB16U }, /* XSUM_XXH32_testdata[556] */\n    {  278, 0x9E3779B1U, 0x24893F33U }, /* XSUM_XXH32_testdata[557] */\n    {  279, 0x00000000U, 0xF6F08914U }, /* XSUM_XXH32_testdata[558] */\n    {  279, 0x9E3779B1U, 0xD7F6AD57U }, /* XSUM_XXH32_testdata[559] */\n    {  280, 0x00000000U, 0xF87B452FU }, /* XSUM_XXH32_testdata[560] */\n    {  280, 0x9E3779B1U, 0xA9E93011U }, /* XSUM_XXH32_testdata[561] */\n    {  281, 0x00000000U, 0x078401F1U }, /* XSUM_XXH32_testdata[562] */\n    {  281, 0x9E3779B1U, 0x537B2015U }, /* XSUM_XXH32_testdata[563] */\n    {  282, 0x00000000U, 0x4DC6BCCBU }, /* XSUM_XXH32_testdata[564] */\n    {  282, 0x9E3779B1U, 0x9B22B136U }, /* XSUM_XXH32_testdata[565] */\n    {  283, 0x00000000U, 0x45CCD5A9U }, /* XSUM_XXH32_testdata[566] */\n    {  283, 0x9E3779B1U, 0x599DDBF5U }, /* XSUM_XXH32_testdata[567] */\n    {  284, 0x00000000U, 0xF1545F6CU }, /* XSUM_XXH32_testdata[568] */\n    {  284, 0x9E3779B1U, 0xD12B1BB5U }, /* XSUM_XXH32_testdata[569] */\n    {  285, 0x00000000U, 0x55151707U }, /* XSUM_XXH32_testdata[570] */\n    {  285, 0x9E3779B1U, 0xE4E65E93U }, /* XSUM_XXH32_testdata[571] */\n    {  286, 0x00000000U, 0x4864CB10U }, /* XSUM_XXH32_testdata[572] */\n    {  286, 0x9E3779B1U, 0xEB22E05EU }, /* XSUM_XXH32_testdata[573] */\n    {  287, 0x00000000U, 0x71733C3CU }, /* XSUM_XXH32_testdata[574] */\n    {  287, 0x9E3779B1U, 0x9D7C06B6U }, /* XSUM_XXH32_testdata[575] */\n    {  288, 0x00000000U, 0x65FC8E1AU }, /* XSUM_XXH32_testdata[576] */\n    {  288, 0x9E3779B1U, 0x0C7FE1DCU }, /* XSUM_XXH32_testdata[577] */\n    {  289, 0x00000000U, 0x10C0CE0DU }, /* XSUM_XXH32_testdata[578] */\n    {  289, 0x9E3779B1U, 0x24DF0067U }, /* XSUM_XXH32_testdata[579] */\n    {  290, 0x00000000U, 0x052E2F18U }, /* XSUM_XXH32_testdata[580] */\n    {  290, 0x9E3779B1U, 0xC8C18E54U }, /* XSUM_XXH32_testdata[581] */\n    {  291, 0x00000000U, 0x5BC0E4A1U }, /* XSUM_XXH32_testdata[582] */\n    {  291, 0x9E3779B1U, 0x6B4A2DD2U }, /* XSUM_XXH32_testdata[583] */\n    {  292, 0x00000000U, 0x1A23A055U }, /* XSUM_XXH32_testdata[584] */\n    {  292, 0x9E3779B1U, 0x7E5D990EU }, /* XSUM_XXH32_testdata[585] */\n    {  293, 0x00000000U, 0xC61E0D0CU }, /* XSUM_XXH32_testdata[586] */\n    {  293, 0x9E3779B1U, 0xF4589434U }, /* XSUM_XXH32_testdata[587] */\n    {  294, 0x00000000U, 0x4C387BCEU }, /* XSUM_XXH32_testdata[588] */\n    {  294, 0x9E3779B1U, 0x1B11D015U }, /* XSUM_XXH32_testdata[589] */\n    {  295, 0x00000000U, 0x510F75D4U }, /* XSUM_XXH32_testdata[590] */\n    {  295, 0x9E3779B1U, 0x6CB21524U }, /* XSUM_XXH32_testdata[591] */\n    {  296, 0x00000000U, 0xF6BEA3C9U }, /* XSUM_XXH32_testdata[592] */\n    {  296, 0x9E3779B1U, 0xC980EDEAU }, /* XSUM_XXH32_testdata[593] */\n    {  297, 0x00000000U, 0x9985E9F7U }, /* XSUM_XXH32_testdata[594] */\n    {  297, 0x9E3779B1U, 0x6202CEA4U }, /* XSUM_XXH32_testdata[595] */\n    {  298, 0x00000000U, 0x846241BEU }, /* XSUM_XXH32_testdata[596] */\n    {  298, 0x9E3779B1U, 0xD6270150U }, /* XSUM_XXH32_testdata[597] */\n    {  299, 0x00000000U, 0xCF8AE62AU }, /* XSUM_XXH32_testdata[598] */\n    {  299, 0x9E3779B1U, 0xA113A485U }, /* XSUM_XXH32_testdata[599] */\n    {  300, 0x00000000U, 0xEC9EA372U }, /* XSUM_XXH32_testdata[600] */\n    {  300, 0x9E3779B1U, 0x3715A8EDU }, /* XSUM_XXH32_testdata[601] */\n    {  301, 0x00000000U, 0x94D2F234U }, /* XSUM_XXH32_testdata[602] */\n    {  301, 0x9E3779B1U, 0xA2C6BCB3U }, /* XSUM_XXH32_testdata[603] */\n    {  302, 0x00000000U, 0xC39BF654U }, /* XSUM_XXH32_testdata[604] */\n    {  302, 0x9E3779B1U, 0x326D48D3U }, /* XSUM_XXH32_testdata[605] */\n    {  303, 0x00000000U, 0xFA12C6C5U }, /* XSUM_XXH32_testdata[606] */\n    {  303, 0x9E3779B1U, 0x1A29A870U }, /* XSUM_XXH32_testdata[607] */\n    {  304, 0x00000000U, 0xE7065CF3U }, /* XSUM_XXH32_testdata[608] */\n    {  304, 0x9E3779B1U, 0xEBF7E110U }, /* XSUM_XXH32_testdata[609] */\n    {  305, 0x00000000U, 0x1CBFCB1DU }, /* XSUM_XXH32_testdata[610] */\n    {  305, 0x9E3779B1U, 0xADE0F9DDU }, /* XSUM_XXH32_testdata[611] */\n    {  306, 0x00000000U, 0xBA26761FU }, /* XSUM_XXH32_testdata[612] */\n    {  306, 0x9E3779B1U, 0x4FBDDDF2U }, /* XSUM_XXH32_testdata[613] */\n    {  307, 0x00000000U, 0xE5E8634BU }, /* XSUM_XXH32_testdata[614] */\n    {  307, 0x9E3779B1U, 0x6CBB8159U }, /* XSUM_XXH32_testdata[615] */\n    {  308, 0x00000000U, 0xCFFE7DC2U }, /* XSUM_XXH32_testdata[616] */\n    {  308, 0x9E3779B1U, 0x92A11674U }, /* XSUM_XXH32_testdata[617] */\n    {  309, 0x00000000U, 0x2B58D124U }, /* XSUM_XXH32_testdata[618] */\n    {  309, 0x9E3779B1U, 0x48AAAEE0U }, /* XSUM_XXH32_testdata[619] */\n    {  310, 0x00000000U, 0xD18C8493U }, /* XSUM_XXH32_testdata[620] */\n    {  310, 0x9E3779B1U, 0x1317A5AAU }, /* XSUM_XXH32_testdata[621] */\n    {  311, 0x00000000U, 0x8EF639B9U }, /* XSUM_XXH32_testdata[622] */\n    {  311, 0x9E3779B1U, 0x4A7CC97FU }, /* XSUM_XXH32_testdata[623] */\n    {  312, 0x00000000U, 0x3DBFE4F9U }, /* XSUM_XXH32_testdata[624] */\n    {  312, 0x9E3779B1U, 0xAF633803U }, /* XSUM_XXH32_testdata[625] */\n    {  313, 0x00000000U, 0x51DFDAC5U }, /* XSUM_XXH32_testdata[626] */\n    {  313, 0x9E3779B1U, 0x9BE6E6E2U }, /* XSUM_XXH32_testdata[627] */\n    {  314, 0x00000000U, 0x1B519B9BU }, /* XSUM_XXH32_testdata[628] */\n    {  314, 0x9E3779B1U, 0x5C65F410U }, /* XSUM_XXH32_testdata[629] */\n    {  315, 0x00000000U, 0x48404B91U }, /* XSUM_XXH32_testdata[630] */\n    {  315, 0x9E3779B1U, 0x93E7D7E5U }, /* XSUM_XXH32_testdata[631] */\n    {  316, 0x00000000U, 0xB1544BECU }, /* XSUM_XXH32_testdata[632] */\n    {  316, 0x9E3779B1U, 0xCC7A607DU }, /* XSUM_XXH32_testdata[633] */\n    {  317, 0x00000000U, 0x6AA52990U }, /* XSUM_XXH32_testdata[634] */\n    {  317, 0x9E3779B1U, 0xEB8D1460U }, /* XSUM_XXH32_testdata[635] */\n    {  318, 0x00000000U, 0xB4727934U }, /* XSUM_XXH32_testdata[636] */\n    {  318, 0x9E3779B1U, 0x105DBBF1U }, /* XSUM_XXH32_testdata[637] */\n    {  319, 0x00000000U, 0x6A4013B2U }, /* XSUM_XXH32_testdata[638] */\n    {  319, 0x9E3779B1U, 0x35D6E00BU }, /* XSUM_XXH32_testdata[639] */\n    {  320, 0x00000000U, 0x49D521A8U }, /* XSUM_XXH32_testdata[640] */\n    {  320, 0x9E3779B1U, 0x2D187FE0U }, /* XSUM_XXH32_testdata[641] */\n    {  321, 0x00000000U, 0x3B5AB7A6U }, /* XSUM_XXH32_testdata[642] */\n    {  321, 0x9E3779B1U, 0x2C2DA227U }, /* XSUM_XXH32_testdata[643] */\n    {  322, 0x00000000U, 0x67551411U }, /* XSUM_XXH32_testdata[644] */\n    {  322, 0x9E3779B1U, 0xB2F00616U }, /* XSUM_XXH32_testdata[645] */\n    {  323, 0x00000000U, 0xFD5DEC59U }, /* XSUM_XXH32_testdata[646] */\n    {  323, 0x9E3779B1U, 0x8A31C568U }, /* XSUM_XXH32_testdata[647] */\n    {  324, 0x00000000U, 0x3F132747U }, /* XSUM_XXH32_testdata[648] */\n    {  324, 0x9E3779B1U, 0x76587E1FU }, /* XSUM_XXH32_testdata[649] */\n    {  325, 0x00000000U, 0xEEFDDEB3U }, /* XSUM_XXH32_testdata[650] */\n    {  325, 0x9E3779B1U, 0x8ECB0743U }, /* XSUM_XXH32_testdata[651] */\n    {  326, 0x00000000U, 0x45608CD3U }, /* XSUM_XXH32_testdata[652] */\n    {  326, 0x9E3779B1U, 0xE5BC60C0U }, /* XSUM_XXH32_testdata[653] */\n    {  327, 0x00000000U, 0xF6525A8EU }, /* XSUM_XXH32_testdata[654] */\n    {  327, 0x9E3779B1U, 0x73E65050U }, /* XSUM_XXH32_testdata[655] */\n    {  328, 0x00000000U, 0xD04FADF7U }, /* XSUM_XXH32_testdata[656] */\n    {  328, 0x9E3779B1U, 0x2DA359EDU }, /* XSUM_XXH32_testdata[657] */\n    {  329, 0x00000000U, 0x9B67E7C9U }, /* XSUM_XXH32_testdata[658] */\n    {  329, 0x9E3779B1U, 0xFBB252BEU }, /* XSUM_XXH32_testdata[659] */\n    {  330, 0x00000000U, 0xA4C77DFEU }, /* XSUM_XXH32_testdata[660] */\n    {  330, 0x9E3779B1U, 0xA6A3DBD0U }, /* XSUM_XXH32_testdata[661] */\n    {  331, 0x00000000U, 0x1BDC8DACU }, /* XSUM_XXH32_testdata[662] */\n    {  331, 0x9E3779B1U, 0xDCA45209U }, /* XSUM_XXH32_testdata[663] */\n    {  332, 0x00000000U, 0xB9AA8A58U }, /* XSUM_XXH32_testdata[664] */\n    {  332, 0x9E3779B1U, 0x2A50940AU }, /* XSUM_XXH32_testdata[665] */\n    {  333, 0x00000000U, 0xABD700B2U }, /* XSUM_XXH32_testdata[666] */\n    {  333, 0x9E3779B1U, 0x2D3B5B12U }, /* XSUM_XXH32_testdata[667] */\n    {  334, 0x00000000U, 0x602228A2U }, /* XSUM_XXH32_testdata[668] */\n    {  334, 0x9E3779B1U, 0xFE23801EU }, /* XSUM_XXH32_testdata[669] */\n    {  335, 0x00000000U, 0xE6806E19U }, /* XSUM_XXH32_testdata[670] */\n    {  335, 0x9E3779B1U, 0x133CD99CU }, /* XSUM_XXH32_testdata[671] */\n    {  336, 0x00000000U, 0x8A2CC656U }, /* XSUM_XXH32_testdata[672] */\n    {  336, 0x9E3779B1U, 0x4732A952U }, /* XSUM_XXH32_testdata[673] */\n    {  337, 0x00000000U, 0xCB430B24U }, /* XSUM_XXH32_testdata[674] */\n    {  337, 0x9E3779B1U, 0x6EDB7F8BU }, /* XSUM_XXH32_testdata[675] */\n    {  338, 0x00000000U, 0x7E23FA9BU }, /* XSUM_XXH32_testdata[676] */\n    {  338, 0x9E3779B1U, 0x9F4999B8U }, /* XSUM_XXH32_testdata[677] */\n    {  339, 0x00000000U, 0xFEA69FF3U }, /* XSUM_XXH32_testdata[678] */\n    {  339, 0x9E3779B1U, 0xFE349AB8U }, /* XSUM_XXH32_testdata[679] */\n    {  340, 0x00000000U, 0xA3E9BCB4U }, /* XSUM_XXH32_testdata[680] */\n    {  340, 0x9E3779B1U, 0x6B9FF0B9U }, /* XSUM_XXH32_testdata[681] */\n    {  341, 0x00000000U, 0xC76AB0B1U }, /* XSUM_XXH32_testdata[682] */\n    {  341, 0x9E3779B1U, 0xB518A754U }, /* XSUM_XXH32_testdata[683] */\n    {  342, 0x00000000U, 0xC53F6198U }, /* XSUM_XXH32_testdata[684] */\n    {  342, 0x9E3779B1U, 0x3AF65171U }, /* XSUM_XXH32_testdata[685] */\n    {  343, 0x00000000U, 0x3CE265B5U }, /* XSUM_XXH32_testdata[686] */\n    {  343, 0x9E3779B1U, 0x26BA7450U }, /* XSUM_XXH32_testdata[687] */\n    {  344, 0x00000000U, 0xE8E20ACEU }, /* XSUM_XXH32_testdata[688] */\n    {  344, 0x9E3779B1U, 0xFDF720D1U }, /* XSUM_XXH32_testdata[689] */\n    {  345, 0x00000000U, 0x80E40F24U }, /* XSUM_XXH32_testdata[690] */\n    {  345, 0x9E3779B1U, 0xE0C03B0DU }, /* XSUM_XXH32_testdata[691] */\n    {  346, 0x00000000U, 0x4B108213U }, /* XSUM_XXH32_testdata[692] */\n    {  346, 0x9E3779B1U, 0x41A07629U }, /* XSUM_XXH32_testdata[693] */\n    {  347, 0x00000000U, 0xAB337557U }, /* XSUM_XXH32_testdata[694] */\n    {  347, 0x9E3779B1U, 0x9C945052U }, /* XSUM_XXH32_testdata[695] */\n    {  348, 0x00000000U, 0x712F7232U }, /* XSUM_XXH32_testdata[696] */\n    {  348, 0x9E3779B1U, 0xEB74617CU }, /* XSUM_XXH32_testdata[697] */\n    {  349, 0x00000000U, 0xB57F971FU }, /* XSUM_XXH32_testdata[698] */\n    {  349, 0x9E3779B1U, 0xC4BF19C5U }, /* XSUM_XXH32_testdata[699] */\n    {  350, 0x00000000U, 0xF7D8DEDEU }, /* XSUM_XXH32_testdata[700] */\n    {  350, 0x9E3779B1U, 0x61A8BC19U }, /* XSUM_XXH32_testdata[701] */\n    {  351, 0x00000000U, 0x7C7F64BDU }, /* XSUM_XXH32_testdata[702] */\n    {  351, 0x9E3779B1U, 0x76556F07U }, /* XSUM_XXH32_testdata[703] */\n    {  352, 0x00000000U, 0x0A6A2125U }, /* XSUM_XXH32_testdata[704] */\n    {  352, 0x9E3779B1U, 0x8378198AU }, /* XSUM_XXH32_testdata[705] */\n    {  353, 0x00000000U, 0x33C0055AU }, /* XSUM_XXH32_testdata[706] */\n    {  353, 0x9E3779B1U, 0xD31544F6U }, /* XSUM_XXH32_testdata[707] */\n    {  354, 0x00000000U, 0x35A00295U }, /* XSUM_XXH32_testdata[708] */\n    {  354, 0x9E3779B1U, 0xB29C8615U }, /* XSUM_XXH32_testdata[709] */\n    {  355, 0x00000000U, 0x74FF6311U }, /* XSUM_XXH32_testdata[710] */\n    {  355, 0x9E3779B1U, 0xB9AE081CU }, /* XSUM_XXH32_testdata[711] */\n    {  356, 0x00000000U, 0xC86E7A0CU }, /* XSUM_XXH32_testdata[712] */\n    {  356, 0x9E3779B1U, 0x63EC2C92U }, /* XSUM_XXH32_testdata[713] */\n    {  357, 0x00000000U, 0x9D6FAB85U }, /* XSUM_XXH32_testdata[714] */\n    {  357, 0x9E3779B1U, 0x0279C7ABU }, /* XSUM_XXH32_testdata[715] */\n    {  358, 0x00000000U, 0x17E5E33EU }, /* XSUM_XXH32_testdata[716] */\n    {  358, 0x9E3779B1U, 0xB3604FDFU }, /* XSUM_XXH32_testdata[717] */\n    {  359, 0x00000000U, 0x3386545EU }, /* XSUM_XXH32_testdata[718] */\n    {  359, 0x9E3779B1U, 0x366CBB5CU }, /* XSUM_XXH32_testdata[719] */\n    {  360, 0x00000000U, 0xC61A7338U }, /* XSUM_XXH32_testdata[720] */\n    {  360, 0x9E3779B1U, 0x4AF57A44U }, /* XSUM_XXH32_testdata[721] */\n    {  361, 0x00000000U, 0x43F1AF2AU }, /* XSUM_XXH32_testdata[722] */\n    {  361, 0x9E3779B1U, 0xB8DC3EB8U }, /* XSUM_XXH32_testdata[723] */\n    {  362, 0x00000000U, 0x486B7D18U }, /* XSUM_XXH32_testdata[724] */\n    {  362, 0x9E3779B1U, 0x824748A0U }, /* XSUM_XXH32_testdata[725] */\n    {  363, 0x00000000U, 0x3A5BF026U }, /* XSUM_XXH32_testdata[726] */\n    {  363, 0x9E3779B1U, 0x25BF3D9AU }, /* XSUM_XXH32_testdata[727] */\n    {  364, 0x00000000U, 0xC7C1FA0AU }, /* XSUM_XXH32_testdata[728] */\n    {  364, 0x9E3779B1U, 0xBDEDD6EEU }, /* XSUM_XXH32_testdata[729] */\n    {  365, 0x00000000U, 0x19A7CDDFU }, /* XSUM_XXH32_testdata[730] */\n    {  365, 0x9E3779B1U, 0x042C940AU }, /* XSUM_XXH32_testdata[731] */\n    {  366, 0x00000000U, 0x3581C349U }, /* XSUM_XXH32_testdata[732] */\n    {  366, 0x9E3779B1U, 0xC5F48B19U }, /* XSUM_XXH32_testdata[733] */\n    {  367, 0x00000000U, 0x280BC93FU }, /* XSUM_XXH32_testdata[734] */\n    {  367, 0x9E3779B1U, 0x8030A20BU }, /* XSUM_XXH32_testdata[735] */\n    {  368, 0x00000000U, 0xBC95D911U }, /* XSUM_XXH32_testdata[736] */\n    {  368, 0x9E3779B1U, 0x374BEB53U }, /* XSUM_XXH32_testdata[737] */\n    {  369, 0x00000000U, 0x9F3068D0U }, /* XSUM_XXH32_testdata[738] */\n    {  369, 0x9E3779B1U, 0x65458A66U }, /* XSUM_XXH32_testdata[739] */\n    {  370, 0x00000000U, 0x6F8EADAEU }, /* XSUM_XXH32_testdata[740] */\n    {  370, 0x9E3779B1U, 0xFE1D6768U }, /* XSUM_XXH32_testdata[741] */\n    {  371, 0x00000000U, 0x3E36A074U }, /* XSUM_XXH32_testdata[742] */\n    {  371, 0x9E3779B1U, 0x2D3887B0U }, /* XSUM_XXH32_testdata[743] */\n    {  372, 0x00000000U, 0x12C2A151U }, /* XSUM_XXH32_testdata[744] */\n    {  372, 0x9E3779B1U, 0x051647D3U }, /* XSUM_XXH32_testdata[745] */\n    {  373, 0x00000000U, 0x27BF5245U }, /* XSUM_XXH32_testdata[746] */\n    {  373, 0x9E3779B1U, 0xA67650A5U }, /* XSUM_XXH32_testdata[747] */\n    {  374, 0x00000000U, 0x0BEF5B6AU }, /* XSUM_XXH32_testdata[748] */\n    {  374, 0x9E3779B1U, 0xAE3E4EEFU }, /* XSUM_XXH32_testdata[749] */\n    {  375, 0x00000000U, 0x599E4F08U }, /* XSUM_XXH32_testdata[750] */\n    {  375, 0x9E3779B1U, 0xA5998BA7U }, /* XSUM_XXH32_testdata[751] */\n    {  376, 0x00000000U, 0x36609F25U }, /* XSUM_XXH32_testdata[752] */\n    {  376, 0x9E3779B1U, 0x42604EA1U }, /* XSUM_XXH32_testdata[753] */\n    {  377, 0x00000000U, 0xE7B39A2FU }, /* XSUM_XXH32_testdata[754] */\n    {  377, 0x9E3779B1U, 0x697661E0U }, /* XSUM_XXH32_testdata[755] */\n    {  378, 0x00000000U, 0xE7509987U }, /* XSUM_XXH32_testdata[756] */\n    {  378, 0x9E3779B1U, 0x85F246DCU }, /* XSUM_XXH32_testdata[757] */\n    {  379, 0x00000000U, 0x48B7E112U }, /* XSUM_XXH32_testdata[758] */\n    {  379, 0x9E3779B1U, 0x7480F47DU }, /* XSUM_XXH32_testdata[759] */\n    {  380, 0x00000000U, 0xCA811579U }, /* XSUM_XXH32_testdata[760] */\n    {  380, 0x9E3779B1U, 0x1E9F7D79U }, /* XSUM_XXH32_testdata[761] */\n    {  381, 0x00000000U, 0xF8DE86DDU }, /* XSUM_XXH32_testdata[762] */\n    {  381, 0x9E3779B1U, 0xF4B4B8D7U }, /* XSUM_XXH32_testdata[763] */\n    {  382, 0x00000000U, 0xC8263BE0U }, /* XSUM_XXH32_testdata[764] */\n    {  382, 0x9E3779B1U, 0xBABF4799U }, /* XSUM_XXH32_testdata[765] */\n    {  383, 0x00000000U, 0xEC62F99DU }, /* XSUM_XXH32_testdata[766] */\n    {  383, 0x9E3779B1U, 0x042733CCU }, /* XSUM_XXH32_testdata[767] */\n    {  384, 0x00000000U, 0x331E1EE8U }, /* XSUM_XXH32_testdata[768] */\n    {  384, 0x9E3779B1U, 0xEDB1100CU }, /* XSUM_XXH32_testdata[769] */\n    {  385, 0x00000000U, 0xEE508486U }, /* XSUM_XXH32_testdata[770] */\n    {  385, 0x9E3779B1U, 0x6ECCA303U }, /* XSUM_XXH32_testdata[771] */\n    {  386, 0x00000000U, 0xEB4A5B0AU }, /* XSUM_XXH32_testdata[772] */\n    {  386, 0x9E3779B1U, 0x97D933C9U }, /* XSUM_XXH32_testdata[773] */\n    {  387, 0x00000000U, 0x3104541CU }, /* XSUM_XXH32_testdata[774] */\n    {  387, 0x9E3779B1U, 0xA5D8A58BU }, /* XSUM_XXH32_testdata[775] */\n    {  388, 0x00000000U, 0x4E969069U }, /* XSUM_XXH32_testdata[776] */\n    {  388, 0x9E3779B1U, 0x111C7F65U }, /* XSUM_XXH32_testdata[777] */\n    {  389, 0x00000000U, 0x014B7E47U }, /* XSUM_XXH32_testdata[778] */\n    {  389, 0x9E3779B1U, 0x475107DCU }, /* XSUM_XXH32_testdata[779] */\n    {  390, 0x00000000U, 0x643A23B8U }, /* XSUM_XXH32_testdata[780] */\n    {  390, 0x9E3779B1U, 0xCEF1A493U }, /* XSUM_XXH32_testdata[781] */\n    {  391, 0x00000000U, 0xBB874C44U }, /* XSUM_XXH32_testdata[782] */\n    {  391, 0x9E3779B1U, 0x5965F7E0U }, /* XSUM_XXH32_testdata[783] */\n    {  392, 0x00000000U, 0x3223BC1BU }, /* XSUM_XXH32_testdata[784] */\n    {  392, 0x9E3779B1U, 0xFCC9F419U }, /* XSUM_XXH32_testdata[785] */\n    {  393, 0x00000000U, 0x0B32747CU }, /* XSUM_XXH32_testdata[786] */\n    {  393, 0x9E3779B1U, 0x4D51E1A1U }, /* XSUM_XXH32_testdata[787] */\n    {  394, 0x00000000U, 0x0D6B374AU }, /* XSUM_XXH32_testdata[788] */\n    {  394, 0x9E3779B1U, 0x907A9B49U }, /* XSUM_XXH32_testdata[789] */\n    {  395, 0x00000000U, 0xE2BD516EU }, /* XSUM_XXH32_testdata[790] */\n    {  395, 0x9E3779B1U, 0xECB4F843U }, /* XSUM_XXH32_testdata[791] */\n    {  396, 0x00000000U, 0xC65D7F81U }, /* XSUM_XXH32_testdata[792] */\n    {  396, 0x9E3779B1U, 0xEEA47B8FU }, /* XSUM_XXH32_testdata[793] */\n    {  397, 0x00000000U, 0x619EB9A8U }, /* XSUM_XXH32_testdata[794] */\n    {  397, 0x9E3779B1U, 0x14B06F84U }, /* XSUM_XXH32_testdata[795] */\n    {  398, 0x00000000U, 0xD7735CAFU }, /* XSUM_XXH32_testdata[796] */\n    {  398, 0x9E3779B1U, 0x4C09296AU }, /* XSUM_XXH32_testdata[797] */\n    {  399, 0x00000000U, 0xF62123A8U }, /* XSUM_XXH32_testdata[798] */\n    {  399, 0x9E3779B1U, 0x6743524FU }, /* XSUM_XXH32_testdata[799] */\n    {  400, 0x00000000U, 0x3B64DD3FU }, /* XSUM_XXH32_testdata[800] */\n    {  400, 0x9E3779B1U, 0x3B929C82U }, /* XSUM_XXH32_testdata[801] */\n    {  401, 0x00000000U, 0x9F142B89U }, /* XSUM_XXH32_testdata[802] */\n    {  401, 0x9E3779B1U, 0xE4073DAAU }, /* XSUM_XXH32_testdata[803] */\n    {  402, 0x00000000U, 0xBC88BE0CU }, /* XSUM_XXH32_testdata[804] */\n    {  402, 0x9E3779B1U, 0x0F66FD8DU }, /* XSUM_XXH32_testdata[805] */\n    {  403, 0x00000000U, 0x6675FF5AU }, /* XSUM_XXH32_testdata[806] */\n    {  403, 0x9E3779B1U, 0xBDE7AAB8U }, /* XSUM_XXH32_testdata[807] */\n    {  404, 0x00000000U, 0x9D206630U }, /* XSUM_XXH32_testdata[808] */\n    {  404, 0x9E3779B1U, 0xC1D77C42U }, /* XSUM_XXH32_testdata[809] */\n    {  405, 0x00000000U, 0xEE14FA6FU }, /* XSUM_XXH32_testdata[810] */\n    {  405, 0x9E3779B1U, 0x5BF87816U }, /* XSUM_XXH32_testdata[811] */\n    {  406, 0x00000000U, 0x4388EF50U }, /* XSUM_XXH32_testdata[812] */\n    {  406, 0x9E3779B1U, 0x8FEAFDACU }, /* XSUM_XXH32_testdata[813] */\n    {  407, 0x00000000U, 0xACC118FEU }, /* XSUM_XXH32_testdata[814] */\n    {  407, 0x9E3779B1U, 0x9E582945U }, /* XSUM_XXH32_testdata[815] */\n    {  408, 0x00000000U, 0xF48A158DU }, /* XSUM_XXH32_testdata[816] */\n    {  408, 0x9E3779B1U, 0xDB6ABD2EU }, /* XSUM_XXH32_testdata[817] */\n    {  409, 0x00000000U, 0xAB172472U }, /* XSUM_XXH32_testdata[818] */\n    {  409, 0x9E3779B1U, 0x3EF39FA7U }, /* XSUM_XXH32_testdata[819] */\n    {  410, 0x00000000U, 0x308A5996U }, /* XSUM_XXH32_testdata[820] */\n    {  410, 0x9E3779B1U, 0xDF58D30DU }, /* XSUM_XXH32_testdata[821] */\n    {  411, 0x00000000U, 0x8E6632CCU }, /* XSUM_XXH32_testdata[822] */\n    {  411, 0x9E3779B1U, 0x53D2AC13U }, /* XSUM_XXH32_testdata[823] */\n    {  412, 0x00000000U, 0xF490CD0AU }, /* XSUM_XXH32_testdata[824] */\n    {  412, 0x9E3779B1U, 0x0FCE7F43U }, /* XSUM_XXH32_testdata[825] */\n    {  413, 0x00000000U, 0x7E9F0399U }, /* XSUM_XXH32_testdata[826] */\n    {  413, 0x9E3779B1U, 0x21014515U }, /* XSUM_XXH32_testdata[827] */\n    {  414, 0x00000000U, 0x859E5F00U }, /* XSUM_XXH32_testdata[828] */\n    {  414, 0x9E3779B1U, 0x686DF7E3U }, /* XSUM_XXH32_testdata[829] */\n    {  415, 0x00000000U, 0xE1E7F4E5U }, /* XSUM_XXH32_testdata[830] */\n    {  415, 0x9E3779B1U, 0xD821669EU }, /* XSUM_XXH32_testdata[831] */\n    {  416, 0x00000000U, 0x8E71476EU }, /* XSUM_XXH32_testdata[832] */\n    {  416, 0x9E3779B1U, 0x3C03901EU }, /* XSUM_XXH32_testdata[833] */\n    {  417, 0x00000000U, 0x9F24CA04U }, /* XSUM_XXH32_testdata[834] */\n    {  417, 0x9E3779B1U, 0x2F51519CU }, /* XSUM_XXH32_testdata[835] */\n    {  418, 0x00000000U, 0xDC70F04CU }, /* XSUM_XXH32_testdata[836] */\n    {  418, 0x9E3779B1U, 0x8F28D8E8U }, /* XSUM_XXH32_testdata[837] */\n    {  419, 0x00000000U, 0x214BD5BDU }, /* XSUM_XXH32_testdata[838] */\n    {  419, 0x9E3779B1U, 0x1B23494CU }, /* XSUM_XXH32_testdata[839] */\n    {  420, 0x00000000U, 0x7F7E0759U }, /* XSUM_XXH32_testdata[840] */\n    {  420, 0x9E3779B1U, 0x825F8A94U }, /* XSUM_XXH32_testdata[841] */\n    {  421, 0x00000000U, 0xB23F1C90U }, /* XSUM_XXH32_testdata[842] */\n    {  421, 0x9E3779B1U, 0x2F551E69U }, /* XSUM_XXH32_testdata[843] */\n    {  422, 0x00000000U, 0xE81A4E34U }, /* XSUM_XXH32_testdata[844] */\n    {  422, 0x9E3779B1U, 0xEBBE70E4U }, /* XSUM_XXH32_testdata[845] */\n    {  423, 0x00000000U, 0x4AAE47A6U }, /* XSUM_XXH32_testdata[846] */\n    {  423, 0x9E3779B1U, 0xAC4140ABU }, /* XSUM_XXH32_testdata[847] */\n    {  424, 0x00000000U, 0xFD906A48U }, /* XSUM_XXH32_testdata[848] */\n    {  424, 0x9E3779B1U, 0x6A88714BU }, /* XSUM_XXH32_testdata[849] */\n    {  425, 0x00000000U, 0x7570F9CEU }, /* XSUM_XXH32_testdata[850] */\n    {  425, 0x9E3779B1U, 0xFB986106U }, /* XSUM_XXH32_testdata[851] */\n    {  426, 0x00000000U, 0xEBD5D72BU }, /* XSUM_XXH32_testdata[852] */\n    {  426, 0x9E3779B1U, 0xBECD7793U }, /* XSUM_XXH32_testdata[853] */\n    {  427, 0x00000000U, 0x6C04F6E8U }, /* XSUM_XXH32_testdata[854] */\n    {  427, 0x9E3779B1U, 0xCC887616U }, /* XSUM_XXH32_testdata[855] */\n    {  428, 0x00000000U, 0x6514CD26U }, /* XSUM_XXH32_testdata[856] */\n    {  428, 0x9E3779B1U, 0x41F71FC5U }, /* XSUM_XXH32_testdata[857] */\n    {  429, 0x00000000U, 0xA287F178U }, /* XSUM_XXH32_testdata[858] */\n    {  429, 0x9E3779B1U, 0xA1536EDFU }, /* XSUM_XXH32_testdata[859] */\n    {  430, 0x00000000U, 0x62B099D8U }, /* XSUM_XXH32_testdata[860] */\n    {  430, 0x9E3779B1U, 0x5C5504C2U }, /* XSUM_XXH32_testdata[861] */\n    {  431, 0x00000000U, 0x1F6DC602U }, /* XSUM_XXH32_testdata[862] */\n    {  431, 0x9E3779B1U, 0x5AE9F727U }, /* XSUM_XXH32_testdata[863] */\n    {  432, 0x00000000U, 0xF248875CU }, /* XSUM_XXH32_testdata[864] */\n    {  432, 0x9E3779B1U, 0x74099376U }, /* XSUM_XXH32_testdata[865] */\n    {  433, 0x00000000U, 0x5590F9BAU }, /* XSUM_XXH32_testdata[866] */\n    {  433, 0x9E3779B1U, 0x5ECB00D4U }, /* XSUM_XXH32_testdata[867] */\n    {  434, 0x00000000U, 0x2021D0DDU }, /* XSUM_XXH32_testdata[868] */\n    {  434, 0x9E3779B1U, 0x4EFAF456U }, /* XSUM_XXH32_testdata[869] */\n    {  435, 0x00000000U, 0x0EACB2AAU }, /* XSUM_XXH32_testdata[870] */\n    {  435, 0x9E3779B1U, 0xC5637245U }, /* XSUM_XXH32_testdata[871] */\n    {  436, 0x00000000U, 0xCE6D872CU }, /* XSUM_XXH32_testdata[872] */\n    {  436, 0x9E3779B1U, 0x1C276456U }, /* XSUM_XXH32_testdata[873] */\n    {  437, 0x00000000U, 0x8F82A80FU }, /* XSUM_XXH32_testdata[874] */\n    {  437, 0x9E3779B1U, 0x7029494BU }, /* XSUM_XXH32_testdata[875] */\n    {  438, 0x00000000U, 0x4E427015U }, /* XSUM_XXH32_testdata[876] */\n    {  438, 0x9E3779B1U, 0x368A39D9U }, /* XSUM_XXH32_testdata[877] */\n    {  439, 0x00000000U, 0x245B6031U }, /* XSUM_XXH32_testdata[878] */\n    {  439, 0x9E3779B1U, 0x80B0B122U }, /* XSUM_XXH32_testdata[879] */\n    {  440, 0x00000000U, 0xAD5AFF03U }, /* XSUM_XXH32_testdata[880] */\n    {  440, 0x9E3779B1U, 0xF3BC5BC5U }, /* XSUM_XXH32_testdata[881] */\n    {  441, 0x00000000U, 0xCD89EA32U }, /* XSUM_XXH32_testdata[882] */\n    {  441, 0x9E3779B1U, 0x5BE88559U }, /* XSUM_XXH32_testdata[883] */\n    {  442, 0x00000000U, 0x57F22820U }, /* XSUM_XXH32_testdata[884] */\n    {  442, 0x9E3779B1U, 0x6C60E5F3U }, /* XSUM_XXH32_testdata[885] */\n    {  443, 0x00000000U, 0xB2C31C2CU }, /* XSUM_XXH32_testdata[886] */\n    {  443, 0x9E3779B1U, 0xC13DF407U }, /* XSUM_XXH32_testdata[887] */\n    {  444, 0x00000000U, 0x8D863D75U }, /* XSUM_XXH32_testdata[888] */\n    {  444, 0x9E3779B1U, 0xC2102CEFU }, /* XSUM_XXH32_testdata[889] */\n    {  445, 0x00000000U, 0x00D80351U }, /* XSUM_XXH32_testdata[890] */\n    {  445, 0x9E3779B1U, 0x7A5AA759U }, /* XSUM_XXH32_testdata[891] */\n    {  446, 0x00000000U, 0x6F884EE2U }, /* XSUM_XXH32_testdata[892] */\n    {  446, 0x9E3779B1U, 0x093D3AFBU }, /* XSUM_XXH32_testdata[893] */\n    {  447, 0x00000000U, 0xDE51F8A6U }, /* XSUM_XXH32_testdata[894] */\n    {  447, 0x9E3779B1U, 0x05C1C15BU }, /* XSUM_XXH32_testdata[895] */\n    {  448, 0x00000000U, 0x432830F5U }, /* XSUM_XXH32_testdata[896] */\n    {  448, 0x9E3779B1U, 0xC6AECF11U }, /* XSUM_XXH32_testdata[897] */\n    {  449, 0x00000000U, 0x26F802C7U }, /* XSUM_XXH32_testdata[898] */\n    {  449, 0x9E3779B1U, 0xCE969CDBU }, /* XSUM_XXH32_testdata[899] */\n    {  450, 0x00000000U, 0x38E984BEU }, /* XSUM_XXH32_testdata[900] */\n    {  450, 0x9E3779B1U, 0xE120F08AU }, /* XSUM_XXH32_testdata[901] */\n    {  451, 0x00000000U, 0x5832D435U }, /* XSUM_XXH32_testdata[902] */\n    {  451, 0x9E3779B1U, 0x7F2E93ADU }, /* XSUM_XXH32_testdata[903] */\n    {  452, 0x00000000U, 0x5689682DU }, /* XSUM_XXH32_testdata[904] */\n    {  452, 0x9E3779B1U, 0x85793AD6U }, /* XSUM_XXH32_testdata[905] */\n    {  453, 0x00000000U, 0xD777485DU }, /* XSUM_XXH32_testdata[906] */\n    {  453, 0x9E3779B1U, 0x20A0C4FBU }, /* XSUM_XXH32_testdata[907] */\n    {  454, 0x00000000U, 0x973A7FB6U }, /* XSUM_XXH32_testdata[908] */\n    {  454, 0x9E3779B1U, 0xE7C00D0DU }, /* XSUM_XXH32_testdata[909] */\n    {  455, 0x00000000U, 0x49563743U }, /* XSUM_XXH32_testdata[910] */\n    {  455, 0x9E3779B1U, 0xBC845A31U }, /* XSUM_XXH32_testdata[911] */\n    {  456, 0x00000000U, 0x54C77C2DU }, /* XSUM_XXH32_testdata[912] */\n    {  456, 0x9E3779B1U, 0x8A4F4F36U }, /* XSUM_XXH32_testdata[913] */\n    {  457, 0x00000000U, 0x664D3559U }, /* XSUM_XXH32_testdata[914] */\n    {  457, 0x9E3779B1U, 0xECFB3EFAU }, /* XSUM_XXH32_testdata[915] */\n    {  458, 0x00000000U, 0x98277A3BU }, /* XSUM_XXH32_testdata[916] */\n    {  458, 0x9E3779B1U, 0xEE732216U }, /* XSUM_XXH32_testdata[917] */\n    {  459, 0x00000000U, 0xFEB56F14U }, /* XSUM_XXH32_testdata[918] */\n    {  459, 0x9E3779B1U, 0xD156A399U }, /* XSUM_XXH32_testdata[919] */\n    {  460, 0x00000000U, 0xCCDE1DE4U }, /* XSUM_XXH32_testdata[920] */\n    {  460, 0x9E3779B1U, 0x45B526F0U }, /* XSUM_XXH32_testdata[921] */\n    {  461, 0x00000000U, 0x40BDF622U }, /* XSUM_XXH32_testdata[922] */\n    {  461, 0x9E3779B1U, 0x4E5385C5U }, /* XSUM_XXH32_testdata[923] */\n    {  462, 0x00000000U, 0xB49A5412U }, /* XSUM_XXH32_testdata[924] */\n    {  462, 0x9E3779B1U, 0x2027820EU }, /* XSUM_XXH32_testdata[925] */\n    {  463, 0x00000000U, 0xD56A74EDU }, /* XSUM_XXH32_testdata[926] */\n    {  463, 0x9E3779B1U, 0x18E3A285U }, /* XSUM_XXH32_testdata[927] */\n    {  464, 0x00000000U, 0x87536B30U }, /* XSUM_XXH32_testdata[928] */\n    {  464, 0x9E3779B1U, 0xCBC6694CU }, /* XSUM_XXH32_testdata[929] */\n    {  465, 0x00000000U, 0x5C57EBE2U }, /* XSUM_XXH32_testdata[930] */\n    {  465, 0x9E3779B1U, 0xD3B0BBE1U }, /* XSUM_XXH32_testdata[931] */\n    {  466, 0x00000000U, 0x0D6F434FU }, /* XSUM_XXH32_testdata[932] */\n    {  466, 0x9E3779B1U, 0xB1D8E552U }, /* XSUM_XXH32_testdata[933] */\n    {  467, 0x00000000U, 0x63C5A6D6U }, /* XSUM_XXH32_testdata[934] */\n    {  467, 0x9E3779B1U, 0x60A72A01U }, /* XSUM_XXH32_testdata[935] */\n    {  468, 0x00000000U, 0x9DF34052U }, /* XSUM_XXH32_testdata[936] */\n    {  468, 0x9E3779B1U, 0x4B0919FAU }, /* XSUM_XXH32_testdata[937] */\n    {  469, 0x00000000U, 0xA0893A83U }, /* XSUM_XXH32_testdata[938] */\n    {  469, 0x9E3779B1U, 0xF828D25AU }, /* XSUM_XXH32_testdata[939] */\n    {  470, 0x00000000U, 0x268E79E7U }, /* XSUM_XXH32_testdata[940] */\n    {  470, 0x9E3779B1U, 0xE113114BU }, /* XSUM_XXH32_testdata[941] */\n    {  471, 0x00000000U, 0x7B180A13U }, /* XSUM_XXH32_testdata[942] */\n    {  471, 0x9E3779B1U, 0x5114F053U }, /* XSUM_XXH32_testdata[943] */\n    {  472, 0x00000000U, 0x715EEEB8U }, /* XSUM_XXH32_testdata[944] */\n    {  472, 0x9E3779B1U, 0xEE2237DBU }, /* XSUM_XXH32_testdata[945] */\n    {  473, 0x00000000U, 0x9675D294U }, /* XSUM_XXH32_testdata[946] */\n    {  473, 0x9E3779B1U, 0xDE0E0126U }, /* XSUM_XXH32_testdata[947] */\n    {  474, 0x00000000U, 0x4FD98BFFU }, /* XSUM_XXH32_testdata[948] */\n    {  474, 0x9E3779B1U, 0x9EB9ED42U }, /* XSUM_XXH32_testdata[949] */\n    {  475, 0x00000000U, 0x82C70BFDU }, /* XSUM_XXH32_testdata[950] */\n    {  475, 0x9E3779B1U, 0x2F7A5ACBU }, /* XSUM_XXH32_testdata[951] */\n    {  476, 0x00000000U, 0x3E9A1572U }, /* XSUM_XXH32_testdata[952] */\n    {  476, 0x9E3779B1U, 0x297C9081U }, /* XSUM_XXH32_testdata[953] */\n    {  477, 0x00000000U, 0x00D57F59U }, /* XSUM_XXH32_testdata[954] */\n    {  477, 0x9E3779B1U, 0x8A3B48ADU }, /* XSUM_XXH32_testdata[955] */\n    {  478, 0x00000000U, 0x968C46FDU }, /* XSUM_XXH32_testdata[956] */\n    {  478, 0x9E3779B1U, 0x9E6D5422U }, /* XSUM_XXH32_testdata[957] */\n    {  479, 0x00000000U, 0x13D44DEDU }, /* XSUM_XXH32_testdata[958] */\n    {  479, 0x9E3779B1U, 0xE0AC51ECU }, /* XSUM_XXH32_testdata[959] */\n    {  480, 0x00000000U, 0xFA701665U }, /* XSUM_XXH32_testdata[960] */\n    {  480, 0x9E3779B1U, 0x279E4B73U }, /* XSUM_XXH32_testdata[961] */\n    {  481, 0x00000000U, 0xA02F2709U }, /* XSUM_XXH32_testdata[962] */\n    {  481, 0x9E3779B1U, 0xDC94B814U }, /* XSUM_XXH32_testdata[963] */\n    {  482, 0x00000000U, 0xE77711F6U }, /* XSUM_XXH32_testdata[964] */\n    {  482, 0x9E3779B1U, 0xE68C3BD2U }, /* XSUM_XXH32_testdata[965] */\n    {  483, 0x00000000U, 0x95470A4AU }, /* XSUM_XXH32_testdata[966] */\n    {  483, 0x9E3779B1U, 0xB0E8A315U }, /* XSUM_XXH32_testdata[967] */\n    {  484, 0x00000000U, 0x6702FC8EU }, /* XSUM_XXH32_testdata[968] */\n    {  484, 0x9E3779B1U, 0x5230264BU }, /* XSUM_XXH32_testdata[969] */\n    {  485, 0x00000000U, 0x98C3DBA5U }, /* XSUM_XXH32_testdata[970] */\n    {  485, 0x9E3779B1U, 0x93949CC3U }, /* XSUM_XXH32_testdata[971] */\n    {  486, 0x00000000U, 0x28C00DA0U }, /* XSUM_XXH32_testdata[972] */\n    {  486, 0x9E3779B1U, 0x909F67EBU }, /* XSUM_XXH32_testdata[973] */\n    {  487, 0x00000000U, 0xDBEC9175U }, /* XSUM_XXH32_testdata[974] */\n    {  487, 0x9E3779B1U, 0xAD48356FU }, /* XSUM_XXH32_testdata[975] */\n    {  488, 0x00000000U, 0xEF419D7BU }, /* XSUM_XXH32_testdata[976] */\n    {  488, 0x9E3779B1U, 0xC6D3D6ABU }, /* XSUM_XXH32_testdata[977] */\n    {  489, 0x00000000U, 0x3D4F87B3U }, /* XSUM_XXH32_testdata[978] */\n    {  489, 0x9E3779B1U, 0xE3ADF317U }, /* XSUM_XXH32_testdata[979] */\n    {  490, 0x00000000U, 0x2EDA373CU }, /* XSUM_XXH32_testdata[980] */\n    {  490, 0x9E3779B1U, 0x8488A6BAU }, /* XSUM_XXH32_testdata[981] */\n    {  491, 0x00000000U, 0xBD2D6FE1U }, /* XSUM_XXH32_testdata[982] */\n    {  491, 0x9E3779B1U, 0xF99ED7DEU }, /* XSUM_XXH32_testdata[983] */\n    {  492, 0x00000000U, 0x58CD817BU }, /* XSUM_XXH32_testdata[984] */\n    {  492, 0x9E3779B1U, 0x7DE35E46U }, /* XSUM_XXH32_testdata[985] */\n    {  493, 0x00000000U, 0xE4D1B854U }, /* XSUM_XXH32_testdata[986] */\n    {  493, 0x9E3779B1U, 0x9C57E5C8U }, /* XSUM_XXH32_testdata[987] */\n    {  494, 0x00000000U, 0x23E0C3CDU }, /* XSUM_XXH32_testdata[988] */\n    {  494, 0x9E3779B1U, 0xD00A9348U }, /* XSUM_XXH32_testdata[989] */\n    {  495, 0x00000000U, 0x673567E4U }, /* XSUM_XXH32_testdata[990] */\n    {  495, 0x9E3779B1U, 0x393D7A9DU }, /* XSUM_XXH32_testdata[991] */\n    {  496, 0x00000000U, 0xD8A934B3U }, /* XSUM_XXH32_testdata[992] */\n    {  496, 0x9E3779B1U, 0xEAA0A65DU }, /* XSUM_XXH32_testdata[993] */\n    {  497, 0x00000000U, 0x0611B201U }, /* XSUM_XXH32_testdata[994] */\n    {  497, 0x9E3779B1U, 0xC30359CBU }, /* XSUM_XXH32_testdata[995] */\n    {  498, 0x00000000U, 0x6561A6B7U }, /* XSUM_XXH32_testdata[996] */\n    {  498, 0x9E3779B1U, 0x9E9C406FU }, /* XSUM_XXH32_testdata[997] */\n    {  499, 0x00000000U, 0xC8F50206U }, /* XSUM_XXH32_testdata[998] */\n    {  499, 0x9E3779B1U, 0x8428371CU }, /* XSUM_XXH32_testdata[999] */\n    {  500, 0x00000000U, 0x8BEB3775U }, /* XSUM_XXH32_testdata[1000] */\n    {  500, 0x9E3779B1U, 0xA901249EU }, /* XSUM_XXH32_testdata[1001] */\n    {  501, 0x00000000U, 0x98582798U }, /* XSUM_XXH32_testdata[1002] */\n    {  501, 0x9E3779B1U, 0x672E0008U }, /* XSUM_XXH32_testdata[1003] */\n    {  502, 0x00000000U, 0x9B80E88AU }, /* XSUM_XXH32_testdata[1004] */\n    {  502, 0x9E3779B1U, 0x567F3B9BU }, /* XSUM_XXH32_testdata[1005] */\n    {  503, 0x00000000U, 0x322C52B7U }, /* XSUM_XXH32_testdata[1006] */\n    {  503, 0x9E3779B1U, 0xD2A4AD6FU }, /* XSUM_XXH32_testdata[1007] */\n    {  504, 0x00000000U, 0x06002976U }, /* XSUM_XXH32_testdata[1008] */\n    {  504, 0x9E3779B1U, 0x83DC804DU }, /* XSUM_XXH32_testdata[1009] */\n    {  505, 0x00000000U, 0x304BC8CEU }, /* XSUM_XXH32_testdata[1010] */\n    {  505, 0x9E3779B1U, 0xC498DFE4U }, /* XSUM_XXH32_testdata[1011] */\n    {  506, 0x00000000U, 0x34A20E8DU }, /* XSUM_XXH32_testdata[1012] */\n    {  506, 0x9E3779B1U, 0x946BAC08U }, /* XSUM_XXH32_testdata[1013] */\n    {  507, 0x00000000U, 0x992B910AU }, /* XSUM_XXH32_testdata[1014] */\n    {  507, 0x9E3779B1U, 0xD20E8CDFU }, /* XSUM_XXH32_testdata[1015] */\n    {  508, 0x00000000U, 0x8319D68AU }, /* XSUM_XXH32_testdata[1016] */\n    {  508, 0x9E3779B1U, 0x3110E267U }, /* XSUM_XXH32_testdata[1017] */\n    {  509, 0x00000000U, 0xAF0775DFU }, /* XSUM_XXH32_testdata[1018] */\n    {  509, 0x9E3779B1U, 0x8A6D215BU }, /* XSUM_XXH32_testdata[1019] */\n    {  510, 0x00000000U, 0x798D69BBU }, /* XSUM_XXH32_testdata[1020] */\n    {  510, 0x9E3779B1U, 0xE958E92BU }, /* XSUM_XXH32_testdata[1021] */\n    {  511, 0x00000000U, 0xC79D6F2EU }, /* XSUM_XXH32_testdata[1022] */\n    {  511, 0x9E3779B1U, 0x4486B549U }, /* XSUM_XXH32_testdata[1023] */\n    {  512, 0x00000000U, 0xD485C30AU }, /* XSUM_XXH32_testdata[1024] */\n    {  512, 0x9E3779B1U, 0x6CCF94A9U }, /* XSUM_XXH32_testdata[1025] */\n    {  513, 0x00000000U, 0x6C63C50EU }, /* XSUM_XXH32_testdata[1026] */\n    {  513, 0x9E3779B1U, 0xAB0CEFD4U }, /* XSUM_XXH32_testdata[1027] */\n    {  514, 0x00000000U, 0x2DC9B41AU }, /* XSUM_XXH32_testdata[1028] */\n    {  514, 0x9E3779B1U, 0x5EC73449U }, /* XSUM_XXH32_testdata[1029] */\n    {  515, 0x00000000U, 0xB0FB9A38U }, /* XSUM_XXH32_testdata[1030] */\n    {  515, 0x9E3779B1U, 0xB0AC3757U }, /* XSUM_XXH32_testdata[1031] */\n    {  516, 0x00000000U, 0x4A8C1861U }, /* XSUM_XXH32_testdata[1032] */\n    {  516, 0x9E3779B1U, 0xFE9B0BE8U }, /* XSUM_XXH32_testdata[1033] */\n    {  517, 0x00000000U, 0x75DE8B99U }, /* XSUM_XXH32_testdata[1034] */\n    {  517, 0x9E3779B1U, 0x60C1EB2EU }, /* XSUM_XXH32_testdata[1035] */\n    {  518, 0x00000000U, 0x008C3D32U }, /* XSUM_XXH32_testdata[1036] */\n    {  518, 0x9E3779B1U, 0xF287822AU }, /* XSUM_XXH32_testdata[1037] */\n    {  519, 0x00000000U, 0xF919FEFDU }, /* XSUM_XXH32_testdata[1038] */\n    {  519, 0x9E3779B1U, 0x56698312U }, /* XSUM_XXH32_testdata[1039] */\n    {  520, 0x00000000U, 0x1D2F12D6U }, /* XSUM_XXH32_testdata[1040] */\n    {  520, 0x9E3779B1U, 0x731D9AE6U }, /* XSUM_XXH32_testdata[1041] */\n    {  521, 0x00000000U, 0x2CD568BCU }, /* XSUM_XXH32_testdata[1042] */\n    {  521, 0x9E3779B1U, 0x7AEC499BU }, /* XSUM_XXH32_testdata[1043] */\n    {  522, 0x00000000U, 0xB03EEA72U }, /* XSUM_XXH32_testdata[1044] */\n    {  522, 0x9E3779B1U, 0x7FC900D3U }, /* XSUM_XXH32_testdata[1045] */\n    {  523, 0x00000000U, 0x93312B2FU }, /* XSUM_XXH32_testdata[1046] */\n    {  523, 0x9E3779B1U, 0x872516FFU }, /* XSUM_XXH32_testdata[1047] */\n    {  524, 0x00000000U, 0x879A2BACU }, /* XSUM_XXH32_testdata[1048] */\n    {  524, 0x9E3779B1U, 0xC7E2B1C2U }, /* XSUM_XXH32_testdata[1049] */\n    {  525, 0x00000000U, 0x3F152E85U }, /* XSUM_XXH32_testdata[1050] */\n    {  525, 0x9E3779B1U, 0x4CAE54F1U }, /* XSUM_XXH32_testdata[1051] */\n    {  526, 0x00000000U, 0xC047BF75U }, /* XSUM_XXH32_testdata[1052] */\n    {  526, 0x9E3779B1U, 0xA83C9F31U }, /* XSUM_XXH32_testdata[1053] */\n    {  527, 0x00000000U, 0xFFC3CA2FU }, /* XSUM_XXH32_testdata[1054] */\n    {  527, 0x9E3779B1U, 0x3381A5B9U }, /* XSUM_XXH32_testdata[1055] */\n    {  528, 0x00000000U, 0xCADCFDD7U }, /* XSUM_XXH32_testdata[1056] */\n    {  528, 0x9E3779B1U, 0xDDEB2437U }, /* XSUM_XXH32_testdata[1057] */\n    {  529, 0x00000000U, 0x8D43B097U }, /* XSUM_XXH32_testdata[1058] */\n    {  529, 0x9E3779B1U, 0x079A294CU }, /* XSUM_XXH32_testdata[1059] */\n    {  530, 0x00000000U, 0xEA80C01AU }, /* XSUM_XXH32_testdata[1060] */\n    {  530, 0x9E3779B1U, 0x3B254F04U }, /* XSUM_XXH32_testdata[1061] */\n    {  531, 0x00000000U, 0x6C09961BU }, /* XSUM_XXH32_testdata[1062] */\n    {  531, 0x9E3779B1U, 0x1EFEDE87U }, /* XSUM_XXH32_testdata[1063] */\n    {  532, 0x00000000U, 0xACEF9E82U }, /* XSUM_XXH32_testdata[1064] */\n    {  532, 0x9E3779B1U, 0xDDB9C9A0U }, /* XSUM_XXH32_testdata[1065] */\n    {  533, 0x00000000U, 0xE2656FE5U }, /* XSUM_XXH32_testdata[1066] */\n    {  533, 0x9E3779B1U, 0x996A254DU }, /* XSUM_XXH32_testdata[1067] */\n    {  534, 0x00000000U, 0x59FED3E4U }, /* XSUM_XXH32_testdata[1068] */\n    {  534, 0x9E3779B1U, 0x4B0827ACU }, /* XSUM_XXH32_testdata[1069] */\n    {  535, 0x00000000U, 0x59CC55B2U }, /* XSUM_XXH32_testdata[1070] */\n    {  535, 0x9E3779B1U, 0x01DA2A1FU }, /* XSUM_XXH32_testdata[1071] */\n    {  536, 0x00000000U, 0x9AD1040CU }, /* XSUM_XXH32_testdata[1072] */\n    {  536, 0x9E3779B1U, 0x9B682F40U }, /* XSUM_XXH32_testdata[1073] */\n    {  537, 0x00000000U, 0x2A68CF02U }, /* XSUM_XXH32_testdata[1074] */\n    {  537, 0x9E3779B1U, 0xD02EBBC5U }, /* XSUM_XXH32_testdata[1075] */\n    {  538, 0x00000000U, 0x6B4A67A0U }, /* XSUM_XXH32_testdata[1076] */\n    {  538, 0x9E3779B1U, 0xA52541F3U }, /* XSUM_XXH32_testdata[1077] */\n    {  539, 0x00000000U, 0x83C21C2FU }, /* XSUM_XXH32_testdata[1078] */\n    {  539, 0x9E3779B1U, 0xEEBCB4DAU }, /* XSUM_XXH32_testdata[1079] */\n    {  540, 0x00000000U, 0xA828F35EU }, /* XSUM_XXH32_testdata[1080] */\n    {  540, 0x9E3779B1U, 0xC835265CU }, /* XSUM_XXH32_testdata[1081] */\n    {  541, 0x00000000U, 0xFCAE55B9U }, /* XSUM_XXH32_testdata[1082] */\n    {  541, 0x9E3779B1U, 0x48F7ED44U }, /* XSUM_XXH32_testdata[1083] */\n    {  542, 0x00000000U, 0xE7803526U }, /* XSUM_XXH32_testdata[1084] */\n    {  542, 0x9E3779B1U, 0xCF19C0EEU }, /* XSUM_XXH32_testdata[1085] */\n    {  543, 0x00000000U, 0xF8B11AD8U }, /* XSUM_XXH32_testdata[1086] */\n    {  543, 0x9E3779B1U, 0xA52AAE1BU }, /* XSUM_XXH32_testdata[1087] */\n    {  544, 0x00000000U, 0x383709D8U }, /* XSUM_XXH32_testdata[1088] */\n    {  544, 0x9E3779B1U, 0x2E987E7BU }, /* XSUM_XXH32_testdata[1089] */\n    {  545, 0x00000000U, 0xEECB594AU }, /* XSUM_XXH32_testdata[1090] */\n    {  545, 0x9E3779B1U, 0x26F3333DU }, /* XSUM_XXH32_testdata[1091] */\n    {  546, 0x00000000U, 0xD2CAE8AAU }, /* XSUM_XXH32_testdata[1092] */\n    {  546, 0x9E3779B1U, 0xF2E2CBE9U }, /* XSUM_XXH32_testdata[1093] */\n    {  547, 0x00000000U, 0xF3F44D9DU }, /* XSUM_XXH32_testdata[1094] */\n    {  547, 0x9E3779B1U, 0xC7D21280U }, /* XSUM_XXH32_testdata[1095] */\n    {  548, 0x00000000U, 0x057CA1BBU }, /* XSUM_XXH32_testdata[1096] */\n    {  548, 0x9E3779B1U, 0xD31CB27FU }, /* XSUM_XXH32_testdata[1097] */\n    {  549, 0x00000000U, 0x523D1215U }, /* XSUM_XXH32_testdata[1098] */\n    {  549, 0x9E3779B1U, 0x905365FFU }, /* XSUM_XXH32_testdata[1099] */\n    {  550, 0x00000000U, 0x51D76F9BU }, /* XSUM_XXH32_testdata[1100] */\n    {  550, 0x9E3779B1U, 0x70DFAC47U }, /* XSUM_XXH32_testdata[1101] */\n    {  551, 0x00000000U, 0xFE574440U }, /* XSUM_XXH32_testdata[1102] */\n    {  551, 0x9E3779B1U, 0x249EFE5CU }, /* XSUM_XXH32_testdata[1103] */\n    {  552, 0x00000000U, 0x6D7C3E20U }, /* XSUM_XXH32_testdata[1104] */\n    {  552, 0x9E3779B1U, 0x5F2E27D0U }, /* XSUM_XXH32_testdata[1105] */\n    {  553, 0x00000000U, 0xE21902BAU }, /* XSUM_XXH32_testdata[1106] */\n    {  553, 0x9E3779B1U, 0xF5FFC3CEU }, /* XSUM_XXH32_testdata[1107] */\n    {  554, 0x00000000U, 0xCCB9D7D4U }, /* XSUM_XXH32_testdata[1108] */\n    {  554, 0x9E3779B1U, 0x12733CD2U }, /* XSUM_XXH32_testdata[1109] */\n    {  555, 0x00000000U, 0x9D220DE7U }, /* XSUM_XXH32_testdata[1110] */\n    {  555, 0x9E3779B1U, 0x6B962E79U }, /* XSUM_XXH32_testdata[1111] */\n    {  556, 0x00000000U, 0xD63A2252U }, /* XSUM_XXH32_testdata[1112] */\n    {  556, 0x9E3779B1U, 0x137B28C0U }, /* XSUM_XXH32_testdata[1113] */\n    {  557, 0x00000000U, 0x11075667U }, /* XSUM_XXH32_testdata[1114] */\n    {  557, 0x9E3779B1U, 0x26D76C43U }, /* XSUM_XXH32_testdata[1115] */\n    {  558, 0x00000000U, 0x93F39FA3U }, /* XSUM_XXH32_testdata[1116] */\n    {  558, 0x9E3779B1U, 0x0675020DU }, /* XSUM_XXH32_testdata[1117] */\n    {  559, 0x00000000U, 0xA3FE62E4U }, /* XSUM_XXH32_testdata[1118] */\n    {  559, 0x9E3779B1U, 0x8B4B11B7U }, /* XSUM_XXH32_testdata[1119] */\n    {  560, 0x00000000U, 0x6FCD562DU }, /* XSUM_XXH32_testdata[1120] */\n    {  560, 0x9E3779B1U, 0x143B2E0EU }, /* XSUM_XXH32_testdata[1121] */\n    {  561, 0x00000000U, 0xC3958E40U }, /* XSUM_XXH32_testdata[1122] */\n    {  561, 0x9E3779B1U, 0x9861878AU }, /* XSUM_XXH32_testdata[1123] */\n    {  562, 0x00000000U, 0x5BACD6A1U }, /* XSUM_XXH32_testdata[1124] */\n    {  562, 0x9E3779B1U, 0xAA2290E9U }, /* XSUM_XXH32_testdata[1125] */\n    {  563, 0x00000000U, 0x54B7AAB1U }, /* XSUM_XXH32_testdata[1126] */\n    {  563, 0x9E3779B1U, 0xEF35B304U }, /* XSUM_XXH32_testdata[1127] */\n    {  564, 0x00000000U, 0x3B7E557CU }, /* XSUM_XXH32_testdata[1128] */\n    {  564, 0x9E3779B1U, 0xED950428U }, /* XSUM_XXH32_testdata[1129] */\n    {  565, 0x00000000U, 0xCE795C36U }, /* XSUM_XXH32_testdata[1130] */\n    {  565, 0x9E3779B1U, 0x0CC7CCE5U }, /* XSUM_XXH32_testdata[1131] */\n    {  566, 0x00000000U, 0x3BAFE1EDU }, /* XSUM_XXH32_testdata[1132] */\n    {  566, 0x9E3779B1U, 0xFC15F349U }, /* XSUM_XXH32_testdata[1133] */\n    {  567, 0x00000000U, 0xC17A3D7AU }, /* XSUM_XXH32_testdata[1134] */\n    {  567, 0x9E3779B1U, 0xAB844BA3U }, /* XSUM_XXH32_testdata[1135] */\n    {  568, 0x00000000U, 0xB3E09646U }, /* XSUM_XXH32_testdata[1136] */\n    {  568, 0x9E3779B1U, 0x02B655DBU }, /* XSUM_XXH32_testdata[1137] */\n    {  569, 0x00000000U, 0xC9B1669EU }, /* XSUM_XXH32_testdata[1138] */\n    {  569, 0x9E3779B1U, 0x3B334D34U }, /* XSUM_XXH32_testdata[1139] */\n    {  570, 0x00000000U, 0x4D92E21DU }, /* XSUM_XXH32_testdata[1140] */\n    {  570, 0x9E3779B1U, 0x0599D5AAU }, /* XSUM_XXH32_testdata[1141] */\n    {  571, 0x00000000U, 0xC5628243U }, /* XSUM_XXH32_testdata[1142] */\n    {  571, 0x9E3779B1U, 0x09B85AFCU }, /* XSUM_XXH32_testdata[1143] */\n    {  572, 0x00000000U, 0xDD38AF07U }, /* XSUM_XXH32_testdata[1144] */\n    {  572, 0x9E3779B1U, 0x141F339BU }, /* XSUM_XXH32_testdata[1145] */\n    {  573, 0x00000000U, 0x039D9106U }, /* XSUM_XXH32_testdata[1146] */\n    {  573, 0x9E3779B1U, 0x54588C33U }, /* XSUM_XXH32_testdata[1147] */\n    {  574, 0x00000000U, 0xF0BBF203U }, /* XSUM_XXH32_testdata[1148] */\n    {  574, 0x9E3779B1U, 0x10292D58U }, /* XSUM_XXH32_testdata[1149] */\n    {  575, 0x00000000U, 0x64FA4DF4U }, /* XSUM_XXH32_testdata[1150] */\n    {  575, 0x9E3779B1U, 0x416CCC54U }, /* XSUM_XXH32_testdata[1151] */\n    {  576, 0x00000000U, 0xFF8BC9EAU }, /* XSUM_XXH32_testdata[1152] */\n    {  576, 0x9E3779B1U, 0x94A8013FU }, /* XSUM_XXH32_testdata[1153] */\n    {  577, 0x00000000U, 0x995CD6D4U }, /* XSUM_XXH32_testdata[1154] */\n    {  577, 0x9E3779B1U, 0xF747C40DU }, /* XSUM_XXH32_testdata[1155] */\n    {  578, 0x00000000U, 0x77F76E65U }, /* XSUM_XXH32_testdata[1156] */\n    {  578, 0x9E3779B1U, 0x5A4E2FDFU }, /* XSUM_XXH32_testdata[1157] */\n    {  579, 0x00000000U, 0x9204876BU }, /* XSUM_XXH32_testdata[1158] */\n    {  579, 0x9E3779B1U, 0xC7AEDD9DU }, /* XSUM_XXH32_testdata[1159] */\n    {  580, 0x00000000U, 0x8A281BF8U }, /* XSUM_XXH32_testdata[1160] */\n    {  580, 0x9E3779B1U, 0x45A1BC23U }, /* XSUM_XXH32_testdata[1161] */\n    {  581, 0x00000000U, 0x5E8176BBU }, /* XSUM_XXH32_testdata[1162] */\n    {  581, 0x9E3779B1U, 0x6285049CU }, /* XSUM_XXH32_testdata[1163] */\n    {  582, 0x00000000U, 0xC35C3FC5U }, /* XSUM_XXH32_testdata[1164] */\n    {  582, 0x9E3779B1U, 0xD3E56414U }, /* XSUM_XXH32_testdata[1165] */\n    {  583, 0x00000000U, 0x1E69E8BBU }, /* XSUM_XXH32_testdata[1166] */\n    {  583, 0x9E3779B1U, 0xF7C983E5U }, /* XSUM_XXH32_testdata[1167] */\n    {  584, 0x00000000U, 0xCFA3E33AU }, /* XSUM_XXH32_testdata[1168] */\n    {  584, 0x9E3779B1U, 0x062AC722U }, /* XSUM_XXH32_testdata[1169] */\n    {  585, 0x00000000U, 0x40DC036AU }, /* XSUM_XXH32_testdata[1170] */\n    {  585, 0x9E3779B1U, 0xF7CA6DF7U }, /* XSUM_XXH32_testdata[1171] */\n    {  586, 0x00000000U, 0x9038913EU }, /* XSUM_XXH32_testdata[1172] */\n    {  586, 0x9E3779B1U, 0xAC07FED8U }, /* XSUM_XXH32_testdata[1173] */\n    {  587, 0x00000000U, 0xCA36B71CU }, /* XSUM_XXH32_testdata[1174] */\n    {  587, 0x9E3779B1U, 0x8298F8FBU }, /* XSUM_XXH32_testdata[1175] */\n    {  588, 0x00000000U, 0x2C155240U }, /* XSUM_XXH32_testdata[1176] */\n    {  588, 0x9E3779B1U, 0x47328FEBU }, /* XSUM_XXH32_testdata[1177] */\n    {  589, 0x00000000U, 0xCCEF92BBU }, /* XSUM_XXH32_testdata[1178] */\n    {  589, 0x9E3779B1U, 0x2EA2B429U }, /* XSUM_XXH32_testdata[1179] */\n    {  590, 0x00000000U, 0x5FF56AB1U }, /* XSUM_XXH32_testdata[1180] */\n    {  590, 0x9E3779B1U, 0x6B35A0ADU }, /* XSUM_XXH32_testdata[1181] */\n    {  591, 0x00000000U, 0xD608BA57U }, /* XSUM_XXH32_testdata[1182] */\n    {  591, 0x9E3779B1U, 0x4B4A5F5EU }, /* XSUM_XXH32_testdata[1183] */\n    {  592, 0x00000000U, 0x5B1FEEECU }, /* XSUM_XXH32_testdata[1184] */\n    {  592, 0x9E3779B1U, 0x20756839U }, /* XSUM_XXH32_testdata[1185] */\n    {  593, 0x00000000U, 0x1ED67745U }, /* XSUM_XXH32_testdata[1186] */\n    {  593, 0x9E3779B1U, 0x22C665D0U }, /* XSUM_XXH32_testdata[1187] */\n    {  594, 0x00000000U, 0xF1E02CEAU }, /* XSUM_XXH32_testdata[1188] */\n    {  594, 0x9E3779B1U, 0x2ACD85F8U }, /* XSUM_XXH32_testdata[1189] */\n    {  595, 0x00000000U, 0x803B46A3U }, /* XSUM_XXH32_testdata[1190] */\n    {  595, 0x9E3779B1U, 0xB73A088BU }, /* XSUM_XXH32_testdata[1191] */\n    {  596, 0x00000000U, 0x557A2BD9U }, /* XSUM_XXH32_testdata[1192] */\n    {  596, 0x9E3779B1U, 0x176BE304U }, /* XSUM_XXH32_testdata[1193] */\n    {  597, 0x00000000U, 0xB7E6FAC5U }, /* XSUM_XXH32_testdata[1194] */\n    {  597, 0x9E3779B1U, 0xA2028D7AU }, /* XSUM_XXH32_testdata[1195] */\n    {  598, 0x00000000U, 0x48713AE1U }, /* XSUM_XXH32_testdata[1196] */\n    {  598, 0x9E3779B1U, 0x6596C8A1U }, /* XSUM_XXH32_testdata[1197] */\n    {  599, 0x00000000U, 0xF92390F6U }, /* XSUM_XXH32_testdata[1198] */\n    {  599, 0x9E3779B1U, 0x88CE3FA5U }, /* XSUM_XXH32_testdata[1199] */\n    {  600, 0x00000000U, 0x5929F25FU }, /* XSUM_XXH32_testdata[1200] */\n    {  600, 0x9E3779B1U, 0xD8659733U }, /* XSUM_XXH32_testdata[1201] */\n    {  601, 0x00000000U, 0x6934EF0FU }, /* XSUM_XXH32_testdata[1202] */\n    {  601, 0x9E3779B1U, 0x1A66369AU }, /* XSUM_XXH32_testdata[1203] */\n    {  602, 0x00000000U, 0xD62AFDCAU }, /* XSUM_XXH32_testdata[1204] */\n    {  602, 0x9E3779B1U, 0x90A99973U }, /* XSUM_XXH32_testdata[1205] */\n    {  603, 0x00000000U, 0x30DF07C5U }, /* XSUM_XXH32_testdata[1206] */\n    {  603, 0x9E3779B1U, 0xFB1DC5EDU }, /* XSUM_XXH32_testdata[1207] */\n    {  604, 0x00000000U, 0x354A95CCU }, /* XSUM_XXH32_testdata[1208] */\n    {  604, 0x9E3779B1U, 0xF75E1BE4U }, /* XSUM_XXH32_testdata[1209] */\n    {  605, 0x00000000U, 0xB644F7B0U }, /* XSUM_XXH32_testdata[1210] */\n    {  605, 0x9E3779B1U, 0xF5DE009EU }, /* XSUM_XXH32_testdata[1211] */\n    {  606, 0x00000000U, 0xA800018BU }, /* XSUM_XXH32_testdata[1212] */\n    {  606, 0x9E3779B1U, 0x59C644D4U }, /* XSUM_XXH32_testdata[1213] */\n    {  607, 0x00000000U, 0x22BFC8CFU }, /* XSUM_XXH32_testdata[1214] */\n    {  607, 0x9E3779B1U, 0x9579DEC2U }, /* XSUM_XXH32_testdata[1215] */\n    {  608, 0x00000000U, 0x7269CBF8U }, /* XSUM_XXH32_testdata[1216] */\n    {  608, 0x9E3779B1U, 0x2C6EDB87U }, /* XSUM_XXH32_testdata[1217] */\n    {  609, 0x00000000U, 0x2E68554DU }, /* XSUM_XXH32_testdata[1218] */\n    {  609, 0x9E3779B1U, 0xDF2360BBU }, /* XSUM_XXH32_testdata[1219] */\n    {  610, 0x00000000U, 0xE07AEE88U }, /* XSUM_XXH32_testdata[1220] */\n    {  610, 0x9E3779B1U, 0x7272F640U }, /* XSUM_XXH32_testdata[1221] */\n    {  611, 0x00000000U, 0x39486655U }, /* XSUM_XXH32_testdata[1222] */\n    {  611, 0x9E3779B1U, 0xCF4AFAC3U }, /* XSUM_XXH32_testdata[1223] */\n    {  612, 0x00000000U, 0x9276FE8AU }, /* XSUM_XXH32_testdata[1224] */\n    {  612, 0x9E3779B1U, 0x85DCC42CU }, /* XSUM_XXH32_testdata[1225] */\n    {  613, 0x00000000U, 0x0F2EF2F3U }, /* XSUM_XXH32_testdata[1226] */\n    {  613, 0x9E3779B1U, 0xF34BE8BAU }, /* XSUM_XXH32_testdata[1227] */\n    {  614, 0x00000000U, 0x4484C1D8U }, /* XSUM_XXH32_testdata[1228] */\n    {  614, 0x9E3779B1U, 0x57E2CF3FU }, /* XSUM_XXH32_testdata[1229] */\n    {  615, 0x00000000U, 0x61418265U }, /* XSUM_XXH32_testdata[1230] */\n    {  615, 0x9E3779B1U, 0xC35AF718U }, /* XSUM_XXH32_testdata[1231] */\n    {  616, 0x00000000U, 0x92A0ED48U }, /* XSUM_XXH32_testdata[1232] */\n    {  616, 0x9E3779B1U, 0x017052A7U }, /* XSUM_XXH32_testdata[1233] */\n    {  617, 0x00000000U, 0x7043FD18U }, /* XSUM_XXH32_testdata[1234] */\n    {  617, 0x9E3779B1U, 0x9C2DDF98U }, /* XSUM_XXH32_testdata[1235] */\n    {  618, 0x00000000U, 0x5D07E007U }, /* XSUM_XXH32_testdata[1236] */\n    {  618, 0x9E3779B1U, 0x59434CB8U }, /* XSUM_XXH32_testdata[1237] */\n    {  619, 0x00000000U, 0xB8FECF84U }, /* XSUM_XXH32_testdata[1238] */\n    {  619, 0x9E3779B1U, 0xD91C95D4U }, /* XSUM_XXH32_testdata[1239] */\n    {  620, 0x00000000U, 0x25F891A0U }, /* XSUM_XXH32_testdata[1240] */\n    {  620, 0x9E3779B1U, 0x55BF001EU }, /* XSUM_XXH32_testdata[1241] */\n    {  621, 0x00000000U, 0x8643600FU }, /* XSUM_XXH32_testdata[1242] */\n    {  621, 0x9E3779B1U, 0x5D8AD780U }, /* XSUM_XXH32_testdata[1243] */\n    {  622, 0x00000000U, 0xB45B415AU }, /* XSUM_XXH32_testdata[1244] */\n    {  622, 0x9E3779B1U, 0xB7AF9ADDU }, /* XSUM_XXH32_testdata[1245] */\n    {  623, 0x00000000U, 0xFFEDFB0CU }, /* XSUM_XXH32_testdata[1246] */\n    {  623, 0x9E3779B1U, 0xD3D56B63U }, /* XSUM_XXH32_testdata[1247] */\n    {  624, 0x00000000U, 0x299D5311U }, /* XSUM_XXH32_testdata[1248] */\n    {  624, 0x9E3779B1U, 0xEC9EF02BU }, /* XSUM_XXH32_testdata[1249] */\n    {  625, 0x00000000U, 0x1EC898BFU }, /* XSUM_XXH32_testdata[1250] */\n    {  625, 0x9E3779B1U, 0x0FE4171DU }, /* XSUM_XXH32_testdata[1251] */\n    {  626, 0x00000000U, 0x3D220B0DU }, /* XSUM_XXH32_testdata[1252] */\n    {  626, 0x9E3779B1U, 0x4F611A36U }, /* XSUM_XXH32_testdata[1253] */\n    {  627, 0x00000000U, 0xDF0C13CAU }, /* XSUM_XXH32_testdata[1254] */\n    {  627, 0x9E3779B1U, 0xB3F9C65FU }, /* XSUM_XXH32_testdata[1255] */\n    {  628, 0x00000000U, 0x74DBEB01U }, /* XSUM_XXH32_testdata[1256] */\n    {  628, 0x9E3779B1U, 0x7062283CU }, /* XSUM_XXH32_testdata[1257] */\n    {  629, 0x00000000U, 0xD3CE1024U }, /* XSUM_XXH32_testdata[1258] */\n    {  629, 0x9E3779B1U, 0xCF5147D8U }, /* XSUM_XXH32_testdata[1259] */\n    {  630, 0x00000000U, 0x248FAA29U }, /* XSUM_XXH32_testdata[1260] */\n    {  630, 0x9E3779B1U, 0xCFAC6BACU }, /* XSUM_XXH32_testdata[1261] */\n    {  631, 0x00000000U, 0xC369F007U }, /* XSUM_XXH32_testdata[1262] */\n    {  631, 0x9E3779B1U, 0xC33F685FU }, /* XSUM_XXH32_testdata[1263] */\n    {  632, 0x00000000U, 0x6FACA56EU }, /* XSUM_XXH32_testdata[1264] */\n    {  632, 0x9E3779B1U, 0x05D0B46FU }, /* XSUM_XXH32_testdata[1265] */\n    {  633, 0x00000000U, 0xEAF23F22U }, /* XSUM_XXH32_testdata[1266] */\n    {  633, 0x9E3779B1U, 0x046AD846U }, /* XSUM_XXH32_testdata[1267] */\n    {  634, 0x00000000U, 0xD97464A2U }, /* XSUM_XXH32_testdata[1268] */\n    {  634, 0x9E3779B1U, 0x14A38A1BU }, /* XSUM_XXH32_testdata[1269] */\n    {  635, 0x00000000U, 0x15E01FC1U }, /* XSUM_XXH32_testdata[1270] */\n    {  635, 0x9E3779B1U, 0xC1C5F8B0U }, /* XSUM_XXH32_testdata[1271] */\n    {  636, 0x00000000U, 0xB302CED9U }, /* XSUM_XXH32_testdata[1272] */\n    {  636, 0x9E3779B1U, 0x580BE287U }, /* XSUM_XXH32_testdata[1273] */\n    {  637, 0x00000000U, 0xADF7611AU }, /* XSUM_XXH32_testdata[1274] */\n    {  637, 0x9E3779B1U, 0x6D7D7523U }, /* XSUM_XXH32_testdata[1275] */\n    {  638, 0x00000000U, 0x8945B249U }, /* XSUM_XXH32_testdata[1276] */\n    {  638, 0x9E3779B1U, 0x9B6F82ACU }, /* XSUM_XXH32_testdata[1277] */\n    {  639, 0x00000000U, 0xBE350C50U }, /* XSUM_XXH32_testdata[1278] */\n    {  639, 0x9E3779B1U, 0x7DDF8BBCU }, /* XSUM_XXH32_testdata[1279] */\n    {  640, 0x00000000U, 0xAAA8DFC1U }, /* XSUM_XXH32_testdata[1280] */\n    {  640, 0x9E3779B1U, 0xB4D5E8FFU }, /* XSUM_XXH32_testdata[1281] */\n    {  641, 0x00000000U, 0xA9C2ADB2U }, /* XSUM_XXH32_testdata[1282] */\n    {  641, 0x9E3779B1U, 0x124D8FEDU }, /* XSUM_XXH32_testdata[1283] */\n    {  642, 0x00000000U, 0xFE8F7FEEU }, /* XSUM_XXH32_testdata[1284] */\n    {  642, 0x9E3779B1U, 0x7AA9B6BFU }, /* XSUM_XXH32_testdata[1285] */\n    {  643, 0x00000000U, 0x36FBB591U }, /* XSUM_XXH32_testdata[1286] */\n    {  643, 0x9E3779B1U, 0x959814C7U }, /* XSUM_XXH32_testdata[1287] */\n    {  644, 0x00000000U, 0x8CBC476EU }, /* XSUM_XXH32_testdata[1288] */\n    {  644, 0x9E3779B1U, 0xCEA8C841U }, /* XSUM_XXH32_testdata[1289] */\n    {  645, 0x00000000U, 0xC0365E3EU }, /* XSUM_XXH32_testdata[1290] */\n    {  645, 0x9E3779B1U, 0xF98C999CU }, /* XSUM_XXH32_testdata[1291] */\n    {  646, 0x00000000U, 0x06A6FEA3U }, /* XSUM_XXH32_testdata[1292] */\n    {  646, 0x9E3779B1U, 0xB5648C61U }, /* XSUM_XXH32_testdata[1293] */\n    {  647, 0x00000000U, 0x8982E615U }, /* XSUM_XXH32_testdata[1294] */\n    {  647, 0x9E3779B1U, 0xB45AA50FU }, /* XSUM_XXH32_testdata[1295] */\n    {  648, 0x00000000U, 0x7B446A4DU }, /* XSUM_XXH32_testdata[1296] */\n    {  648, 0x9E3779B1U, 0xB7C22655U }, /* XSUM_XXH32_testdata[1297] */\n    {  649, 0x00000000U, 0xA49903F7U }, /* XSUM_XXH32_testdata[1298] */\n    {  649, 0x9E3779B1U, 0x5D1AC3EDU }, /* XSUM_XXH32_testdata[1299] */\n    {  650, 0x00000000U, 0x1B0AE1F9U }, /* XSUM_XXH32_testdata[1300] */\n    {  650, 0x9E3779B1U, 0x0532737CU }, /* XSUM_XXH32_testdata[1301] */\n    {  651, 0x00000000U, 0x1487D63EU }, /* XSUM_XXH32_testdata[1302] */\n    {  651, 0x9E3779B1U, 0x1919626DU }, /* XSUM_XXH32_testdata[1303] */\n    {  652, 0x00000000U, 0x17824638U }, /* XSUM_XXH32_testdata[1304] */\n    {  652, 0x9E3779B1U, 0xAC008CCBU }, /* XSUM_XXH32_testdata[1305] */\n    {  653, 0x00000000U, 0x57824066U }, /* XSUM_XXH32_testdata[1306] */\n    {  653, 0x9E3779B1U, 0xB0831EDFU }, /* XSUM_XXH32_testdata[1307] */\n    {  654, 0x00000000U, 0xAD58606BU }, /* XSUM_XXH32_testdata[1308] */\n    {  654, 0x9E3779B1U, 0x7DB42B57U }, /* XSUM_XXH32_testdata[1309] */\n    {  655, 0x00000000U, 0xB7F5AFC1U }, /* XSUM_XXH32_testdata[1310] */\n    {  655, 0x9E3779B1U, 0x0BC6BA89U }, /* XSUM_XXH32_testdata[1311] */\n    {  656, 0x00000000U, 0x7BAC0653U }, /* XSUM_XXH32_testdata[1312] */\n    {  656, 0x9E3779B1U, 0xCE8F2116U }, /* XSUM_XXH32_testdata[1313] */\n    {  657, 0x00000000U, 0xAFF34289U }, /* XSUM_XXH32_testdata[1314] */\n    {  657, 0x9E3779B1U, 0xC178DA60U }, /* XSUM_XXH32_testdata[1315] */\n    {  658, 0x00000000U, 0x988F9DA6U }, /* XSUM_XXH32_testdata[1316] */\n    {  658, 0x9E3779B1U, 0x6F20A426U }, /* XSUM_XXH32_testdata[1317] */\n    {  659, 0x00000000U, 0xC97BC454U }, /* XSUM_XXH32_testdata[1318] */\n    {  659, 0x9E3779B1U, 0xC174B4D1U }, /* XSUM_XXH32_testdata[1319] */\n    {  660, 0x00000000U, 0x044A07E1U }, /* XSUM_XXH32_testdata[1320] */\n    {  660, 0x9E3779B1U, 0xFF03D5A0U }, /* XSUM_XXH32_testdata[1321] */\n    {  661, 0x00000000U, 0x2C8C1123U }, /* XSUM_XXH32_testdata[1322] */\n    {  661, 0x9E3779B1U, 0xE8D2D489U }, /* XSUM_XXH32_testdata[1323] */\n    {  662, 0x00000000U, 0xB2D9096CU }, /* XSUM_XXH32_testdata[1324] */\n    {  662, 0x9E3779B1U, 0x9A752C8CU }, /* XSUM_XXH32_testdata[1325] */\n    {  663, 0x00000000U, 0x65F5C022U }, /* XSUM_XXH32_testdata[1326] */\n    {  663, 0x9E3779B1U, 0xD2885DA5U }, /* XSUM_XXH32_testdata[1327] */\n    {  664, 0x00000000U, 0x1A9822F7U }, /* XSUM_XXH32_testdata[1328] */\n    {  664, 0x9E3779B1U, 0x70B0EDD7U }, /* XSUM_XXH32_testdata[1329] */\n    {  665, 0x00000000U, 0x6DF79264U }, /* XSUM_XXH32_testdata[1330] */\n    {  665, 0x9E3779B1U, 0x5A08A975U }, /* XSUM_XXH32_testdata[1331] */\n    {  666, 0x00000000U, 0x65033F15U }, /* XSUM_XXH32_testdata[1332] */\n    {  666, 0x9E3779B1U, 0xF4350D2EU }, /* XSUM_XXH32_testdata[1333] */\n    {  667, 0x00000000U, 0xA431E989U }, /* XSUM_XXH32_testdata[1334] */\n    {  667, 0x9E3779B1U, 0xA3ED338BU }, /* XSUM_XXH32_testdata[1335] */\n    {  668, 0x00000000U, 0x865A9B80U }, /* XSUM_XXH32_testdata[1336] */\n    {  668, 0x9E3779B1U, 0xA35711A4U }, /* XSUM_XXH32_testdata[1337] */\n    {  669, 0x00000000U, 0x9E0B83CEU }, /* XSUM_XXH32_testdata[1338] */\n    {  669, 0x9E3779B1U, 0x4A0318C2U }, /* XSUM_XXH32_testdata[1339] */\n    {  670, 0x00000000U, 0x1C1AA01AU }, /* XSUM_XXH32_testdata[1340] */\n    {  670, 0x9E3779B1U, 0xCA0F79FFU }, /* XSUM_XXH32_testdata[1341] */\n    {  671, 0x00000000U, 0xFD44F183U }, /* XSUM_XXH32_testdata[1342] */\n    {  671, 0x9E3779B1U, 0xAE73FEF1U }, /* XSUM_XXH32_testdata[1343] */\n    {  672, 0x00000000U, 0x54E2B7E3U }, /* XSUM_XXH32_testdata[1344] */\n    {  672, 0x9E3779B1U, 0x53202297U }, /* XSUM_XXH32_testdata[1345] */\n    {  673, 0x00000000U, 0x4E909F92U }, /* XSUM_XXH32_testdata[1346] */\n    {  673, 0x9E3779B1U, 0x710B69A1U }, /* XSUM_XXH32_testdata[1347] */\n    {  674, 0x00000000U, 0xAAAB145DU }, /* XSUM_XXH32_testdata[1348] */\n    {  674, 0x9E3779B1U, 0x5F50BEFDU }, /* XSUM_XXH32_testdata[1349] */\n    {  675, 0x00000000U, 0x4067EDF2U }, /* XSUM_XXH32_testdata[1350] */\n    {  675, 0x9E3779B1U, 0x7A37B9EDU }, /* XSUM_XXH32_testdata[1351] */\n    {  676, 0x00000000U, 0x3006022CU }, /* XSUM_XXH32_testdata[1352] */\n    {  676, 0x9E3779B1U, 0x0FCBC3D7U }, /* XSUM_XXH32_testdata[1353] */\n    {  677, 0x00000000U, 0x1D0886D2U }, /* XSUM_XXH32_testdata[1354] */\n    {  677, 0x9E3779B1U, 0x33CF6C14U }, /* XSUM_XXH32_testdata[1355] */\n    {  678, 0x00000000U, 0x3608EA67U }, /* XSUM_XXH32_testdata[1356] */\n    {  678, 0x9E3779B1U, 0x729B2135U }, /* XSUM_XXH32_testdata[1357] */\n    {  679, 0x00000000U, 0xF7434B2FU }, /* XSUM_XXH32_testdata[1358] */\n    {  679, 0x9E3779B1U, 0x675F3A89U }, /* XSUM_XXH32_testdata[1359] */\n    {  680, 0x00000000U, 0xFD470505U }, /* XSUM_XXH32_testdata[1360] */\n    {  680, 0x9E3779B1U, 0xA7873132U }, /* XSUM_XXH32_testdata[1361] */\n    {  681, 0x00000000U, 0xC1C147A7U }, /* XSUM_XXH32_testdata[1362] */\n    {  681, 0x9E3779B1U, 0x76B23786U }, /* XSUM_XXH32_testdata[1363] */\n    {  682, 0x00000000U, 0x91C067A6U }, /* XSUM_XXH32_testdata[1364] */\n    {  682, 0x9E3779B1U, 0xEC9BED86U }, /* XSUM_XXH32_testdata[1365] */\n    {  683, 0x00000000U, 0x681F83ACU }, /* XSUM_XXH32_testdata[1366] */\n    {  683, 0x9E3779B1U, 0x1AFAFF43U }, /* XSUM_XXH32_testdata[1367] */\n    {  684, 0x00000000U, 0x7BBBD8DFU }, /* XSUM_XXH32_testdata[1368] */\n    {  684, 0x9E3779B1U, 0x09FBBFD8U }, /* XSUM_XXH32_testdata[1369] */\n    {  685, 0x00000000U, 0xE646357AU }, /* XSUM_XXH32_testdata[1370] */\n    {  685, 0x9E3779B1U, 0x7B379021U }, /* XSUM_XXH32_testdata[1371] */\n    {  686, 0x00000000U, 0x31402396U }, /* XSUM_XXH32_testdata[1372] */\n    {  686, 0x9E3779B1U, 0x56878528U }, /* XSUM_XXH32_testdata[1373] */\n    {  687, 0x00000000U, 0xB72268D9U }, /* XSUM_XXH32_testdata[1374] */\n    {  687, 0x9E3779B1U, 0xDAEBFD80U }, /* XSUM_XXH32_testdata[1375] */\n    {  688, 0x00000000U, 0x75D3FE03U }, /* XSUM_XXH32_testdata[1376] */\n    {  688, 0x9E3779B1U, 0xEA936796U }, /* XSUM_XXH32_testdata[1377] */\n    {  689, 0x00000000U, 0xE99A21F6U }, /* XSUM_XXH32_testdata[1378] */\n    {  689, 0x9E3779B1U, 0x123FA3BAU }, /* XSUM_XXH32_testdata[1379] */\n    {  690, 0x00000000U, 0x7FF977A0U }, /* XSUM_XXH32_testdata[1380] */\n    {  690, 0x9E3779B1U, 0xA9411D49U }, /* XSUM_XXH32_testdata[1381] */\n    {  691, 0x00000000U, 0x9FC7E0DFU }, /* XSUM_XXH32_testdata[1382] */\n    {  691, 0x9E3779B1U, 0x565EC388U }, /* XSUM_XXH32_testdata[1383] */\n    {  692, 0x00000000U, 0xD6C3B2D8U }, /* XSUM_XXH32_testdata[1384] */\n    {  692, 0x9E3779B1U, 0x457EE6AFU }, /* XSUM_XXH32_testdata[1385] */\n    {  693, 0x00000000U, 0x4F8F5D69U }, /* XSUM_XXH32_testdata[1386] */\n    {  693, 0x9E3779B1U, 0x717DE12DU }, /* XSUM_XXH32_testdata[1387] */\n    {  694, 0x00000000U, 0x2562840AU }, /* XSUM_XXH32_testdata[1388] */\n    {  694, 0x9E3779B1U, 0x3A2D71CFU }, /* XSUM_XXH32_testdata[1389] */\n    {  695, 0x00000000U, 0x7181A588U }, /* XSUM_XXH32_testdata[1390] */\n    {  695, 0x9E3779B1U, 0xDF26790AU }, /* XSUM_XXH32_testdata[1391] */\n    {  696, 0x00000000U, 0x70AA2253U }, /* XSUM_XXH32_testdata[1392] */\n    {  696, 0x9E3779B1U, 0x86D6EEAFU }, /* XSUM_XXH32_testdata[1393] */\n    {  697, 0x00000000U, 0x9A44444DU }, /* XSUM_XXH32_testdata[1394] */\n    {  697, 0x9E3779B1U, 0xE2854AC5U }, /* XSUM_XXH32_testdata[1395] */\n    {  698, 0x00000000U, 0x57209128U }, /* XSUM_XXH32_testdata[1396] */\n    {  698, 0x9E3779B1U, 0x455841A1U }, /* XSUM_XXH32_testdata[1397] */\n    {  699, 0x00000000U, 0x8B06B883U }, /* XSUM_XXH32_testdata[1398] */\n    {  699, 0x9E3779B1U, 0xB1748D9CU }, /* XSUM_XXH32_testdata[1399] */\n    {  700, 0x00000000U, 0x92B71ECFU }, /* XSUM_XXH32_testdata[1400] */\n    {  700, 0x9E3779B1U, 0x05DF9579U }, /* XSUM_XXH32_testdata[1401] */\n    {  701, 0x00000000U, 0xD1806AB4U }, /* XSUM_XXH32_testdata[1402] */\n    {  701, 0x9E3779B1U, 0x1564D2F9U }, /* XSUM_XXH32_testdata[1403] */\n    {  702, 0x00000000U, 0x5E124C4BU }, /* XSUM_XXH32_testdata[1404] */\n    {  702, 0x9E3779B1U, 0xC8C222C8U }, /* XSUM_XXH32_testdata[1405] */\n    {  703, 0x00000000U, 0x2FDEFB21U }, /* XSUM_XXH32_testdata[1406] */\n    {  703, 0x9E3779B1U, 0x96077C64U }, /* XSUM_XXH32_testdata[1407] */\n    {  704, 0x00000000U, 0xEA6C2F2FU }, /* XSUM_XXH32_testdata[1408] */\n    {  704, 0x9E3779B1U, 0x0E95CE2BU }, /* XSUM_XXH32_testdata[1409] */\n    {  705, 0x00000000U, 0xBD1EA8DDU }, /* XSUM_XXH32_testdata[1410] */\n    {  705, 0x9E3779B1U, 0xBD7512D2U }, /* XSUM_XXH32_testdata[1411] */\n    {  706, 0x00000000U, 0x94221891U }, /* XSUM_XXH32_testdata[1412] */\n    {  706, 0x9E3779B1U, 0x4BF7FB3DU }, /* XSUM_XXH32_testdata[1413] */\n    {  707, 0x00000000U, 0xE095EB99U }, /* XSUM_XXH32_testdata[1414] */\n    {  707, 0x9E3779B1U, 0x158CBC7AU }, /* XSUM_XXH32_testdata[1415] */\n    {  708, 0x00000000U, 0x191074F2U }, /* XSUM_XXH32_testdata[1416] */\n    {  708, 0x9E3779B1U, 0x13CC2B28U }, /* XSUM_XXH32_testdata[1417] */\n    {  709, 0x00000000U, 0x0C01D9C0U }, /* XSUM_XXH32_testdata[1418] */\n    {  709, 0x9E3779B1U, 0x941F1CF7U }, /* XSUM_XXH32_testdata[1419] */\n    {  710, 0x00000000U, 0x2E351C94U }, /* XSUM_XXH32_testdata[1420] */\n    {  710, 0x9E3779B1U, 0x8DC7405AU }, /* XSUM_XXH32_testdata[1421] */\n    {  711, 0x00000000U, 0x649D385FU }, /* XSUM_XXH32_testdata[1422] */\n    {  711, 0x9E3779B1U, 0x26719578U }, /* XSUM_XXH32_testdata[1423] */\n    {  712, 0x00000000U, 0x1500F311U }, /* XSUM_XXH32_testdata[1424] */\n    {  712, 0x9E3779B1U, 0x28E55B9EU }, /* XSUM_XXH32_testdata[1425] */\n    {  713, 0x00000000U, 0xBFE4916EU }, /* XSUM_XXH32_testdata[1426] */\n    {  713, 0x9E3779B1U, 0xAE001B78U }, /* XSUM_XXH32_testdata[1427] */\n    {  714, 0x00000000U, 0x85221436U }, /* XSUM_XXH32_testdata[1428] */\n    {  714, 0x9E3779B1U, 0x976F358BU }, /* XSUM_XXH32_testdata[1429] */\n    {  715, 0x00000000U, 0xA583E7F8U }, /* XSUM_XXH32_testdata[1430] */\n    {  715, 0x9E3779B1U, 0x0B4CA222U }, /* XSUM_XXH32_testdata[1431] */\n    {  716, 0x00000000U, 0x09A08B97U }, /* XSUM_XXH32_testdata[1432] */\n    {  716, 0x9E3779B1U, 0x5C4CBF41U }, /* XSUM_XXH32_testdata[1433] */\n    {  717, 0x00000000U, 0xB5270B17U }, /* XSUM_XXH32_testdata[1434] */\n    {  717, 0x9E3779B1U, 0x7F9F8805U }, /* XSUM_XXH32_testdata[1435] */\n    {  718, 0x00000000U, 0x648FC4FCU }, /* XSUM_XXH32_testdata[1436] */\n    {  718, 0x9E3779B1U, 0x280633CFU }, /* XSUM_XXH32_testdata[1437] */\n    {  719, 0x00000000U, 0x438E4331U }, /* XSUM_XXH32_testdata[1438] */\n    {  719, 0x9E3779B1U, 0x0D90CD0FU }, /* XSUM_XXH32_testdata[1439] */\n    {  720, 0x00000000U, 0x5F5E67E6U }, /* XSUM_XXH32_testdata[1440] */\n    {  720, 0x9E3779B1U, 0xB0BE79BDU }, /* XSUM_XXH32_testdata[1441] */\n    {  721, 0x00000000U, 0x233A5C24U }, /* XSUM_XXH32_testdata[1442] */\n    {  721, 0x9E3779B1U, 0x540F87BEU }, /* XSUM_XXH32_testdata[1443] */\n    {  722, 0x00000000U, 0xC6A457E0U }, /* XSUM_XXH32_testdata[1444] */\n    {  722, 0x9E3779B1U, 0xBA54D79DU }, /* XSUM_XXH32_testdata[1445] */\n    {  723, 0x00000000U, 0xD6F57142U }, /* XSUM_XXH32_testdata[1446] */\n    {  723, 0x9E3779B1U, 0x2D82EB5DU }, /* XSUM_XXH32_testdata[1447] */\n    {  724, 0x00000000U, 0xC8F8634EU }, /* XSUM_XXH32_testdata[1448] */\n    {  724, 0x9E3779B1U, 0x6F0B4A2CU }, /* XSUM_XXH32_testdata[1449] */\n    {  725, 0x00000000U, 0x1B8F2C06U }, /* XSUM_XXH32_testdata[1450] */\n    {  725, 0x9E3779B1U, 0xFDAE3F35U }, /* XSUM_XXH32_testdata[1451] */\n    {  726, 0x00000000U, 0x58D06CFDU }, /* XSUM_XXH32_testdata[1452] */\n    {  726, 0x9E3779B1U, 0xFBCC9165U }, /* XSUM_XXH32_testdata[1453] */\n    {  727, 0x00000000U, 0x23DBAC8AU }, /* XSUM_XXH32_testdata[1454] */\n    {  727, 0x9E3779B1U, 0x12ACF0E2U }, /* XSUM_XXH32_testdata[1455] */\n    {  728, 0x00000000U, 0x89BF6E7FU }, /* XSUM_XXH32_testdata[1456] */\n    {  728, 0x9E3779B1U, 0x5F804B41U }, /* XSUM_XXH32_testdata[1457] */\n    {  729, 0x00000000U, 0xECF6498DU }, /* XSUM_XXH32_testdata[1458] */\n    {  729, 0x9E3779B1U, 0xFBE4A699U }, /* XSUM_XXH32_testdata[1459] */\n    {  730, 0x00000000U, 0x60979E7CU }, /* XSUM_XXH32_testdata[1460] */\n    {  730, 0x9E3779B1U, 0xB7D0F58EU }, /* XSUM_XXH32_testdata[1461] */\n    {  731, 0x00000000U, 0x1BC1FCD2U }, /* XSUM_XXH32_testdata[1462] */\n    {  731, 0x9E3779B1U, 0x7F7750BFU }, /* XSUM_XXH32_testdata[1463] */\n    {  732, 0x00000000U, 0x4C801024U }, /* XSUM_XXH32_testdata[1464] */\n    {  732, 0x9E3779B1U, 0xA88C2776U }, /* XSUM_XXH32_testdata[1465] */\n    {  733, 0x00000000U, 0xFD4608DAU }, /* XSUM_XXH32_testdata[1466] */\n    {  733, 0x9E3779B1U, 0x2BE0F44BU }, /* XSUM_XXH32_testdata[1467] */\n    {  734, 0x00000000U, 0x8683B929U }, /* XSUM_XXH32_testdata[1468] */\n    {  734, 0x9E3779B1U, 0x35C57CB2U }, /* XSUM_XXH32_testdata[1469] */\n    {  735, 0x00000000U, 0x5CE51D32U }, /* XSUM_XXH32_testdata[1470] */\n    {  735, 0x9E3779B1U, 0xF8AD23C2U }, /* XSUM_XXH32_testdata[1471] */\n    {  736, 0x00000000U, 0x916BE77FU }, /* XSUM_XXH32_testdata[1472] */\n    {  736, 0x9E3779B1U, 0xDC94008DU }, /* XSUM_XXH32_testdata[1473] */\n    {  737, 0x00000000U, 0xD5CD0CA2U }, /* XSUM_XXH32_testdata[1474] */\n    {  737, 0x9E3779B1U, 0x01A4E15BU }, /* XSUM_XXH32_testdata[1475] */\n    {  738, 0x00000000U, 0xB5A8991EU }, /* XSUM_XXH32_testdata[1476] */\n    {  738, 0x9E3779B1U, 0x0FA8AB0DU }, /* XSUM_XXH32_testdata[1477] */\n    {  739, 0x00000000U, 0x7BA03CDAU }, /* XSUM_XXH32_testdata[1478] */\n    {  739, 0x9E3779B1U, 0xE677124BU }, /* XSUM_XXH32_testdata[1479] */\n    {  740, 0x00000000U, 0x3460C7E0U }, /* XSUM_XXH32_testdata[1480] */\n    {  740, 0x9E3779B1U, 0x1AB720E0U }, /* XSUM_XXH32_testdata[1481] */\n    {  741, 0x00000000U, 0xD8189CB8U }, /* XSUM_XXH32_testdata[1482] */\n    {  741, 0x9E3779B1U, 0x7FD2D6A7U }, /* XSUM_XXH32_testdata[1483] */\n    {  742, 0x00000000U, 0x3F86374AU }, /* XSUM_XXH32_testdata[1484] */\n    {  742, 0x9E3779B1U, 0xA87D05D7U }, /* XSUM_XXH32_testdata[1485] */\n    {  743, 0x00000000U, 0xA978176FU }, /* XSUM_XXH32_testdata[1486] */\n    {  743, 0x9E3779B1U, 0x424243F1U }, /* XSUM_XXH32_testdata[1487] */\n    {  744, 0x00000000U, 0x4921F712U }, /* XSUM_XXH32_testdata[1488] */\n    {  744, 0x9E3779B1U, 0x351D077EU }, /* XSUM_XXH32_testdata[1489] */\n    {  745, 0x00000000U, 0xB412AF31U }, /* XSUM_XXH32_testdata[1490] */\n    {  745, 0x9E3779B1U, 0xA15FC17DU }, /* XSUM_XXH32_testdata[1491] */\n    {  746, 0x00000000U, 0x399725E9U }, /* XSUM_XXH32_testdata[1492] */\n    {  746, 0x9E3779B1U, 0x3DE0BDE4U }, /* XSUM_XXH32_testdata[1493] */\n    {  747, 0x00000000U, 0xB9C3918BU }, /* XSUM_XXH32_testdata[1494] */\n    {  747, 0x9E3779B1U, 0x75129AB4U }, /* XSUM_XXH32_testdata[1495] */\n    {  748, 0x00000000U, 0x6A74AB66U }, /* XSUM_XXH32_testdata[1496] */\n    {  748, 0x9E3779B1U, 0x5BC783CFU }, /* XSUM_XXH32_testdata[1497] */\n    {  749, 0x00000000U, 0xDA3A9061U }, /* XSUM_XXH32_testdata[1498] */\n    {  749, 0x9E3779B1U, 0xD4F68C29U }, /* XSUM_XXH32_testdata[1499] */\n    {  750, 0x00000000U, 0x6C6EB9BCU }, /* XSUM_XXH32_testdata[1500] */\n    {  750, 0x9E3779B1U, 0xA07B0392U }, /* XSUM_XXH32_testdata[1501] */\n    {  751, 0x00000000U, 0x3788DC46U }, /* XSUM_XXH32_testdata[1502] */\n    {  751, 0x9E3779B1U, 0xE11ACCDAU }, /* XSUM_XXH32_testdata[1503] */\n    {  752, 0x00000000U, 0x6D2F3AFDU }, /* XSUM_XXH32_testdata[1504] */\n    {  752, 0x9E3779B1U, 0xD9E6ECBAU }, /* XSUM_XXH32_testdata[1505] */\n    {  753, 0x00000000U, 0x7B87AB1CU }, /* XSUM_XXH32_testdata[1506] */\n    {  753, 0x9E3779B1U, 0x1BC482ECU }, /* XSUM_XXH32_testdata[1507] */\n    {  754, 0x00000000U, 0x8EC9696BU }, /* XSUM_XXH32_testdata[1508] */\n    {  754, 0x9E3779B1U, 0x4DD8F1D8U }, /* XSUM_XXH32_testdata[1509] */\n    {  755, 0x00000000U, 0x74EF1C43U }, /* XSUM_XXH32_testdata[1510] */\n    {  755, 0x9E3779B1U, 0xBD88304EU }, /* XSUM_XXH32_testdata[1511] */\n    {  756, 0x00000000U, 0x612AF8F5U }, /* XSUM_XXH32_testdata[1512] */\n    {  756, 0x9E3779B1U, 0xDE656DA4U }, /* XSUM_XXH32_testdata[1513] */\n    {  757, 0x00000000U, 0x9DD69924U }, /* XSUM_XXH32_testdata[1514] */\n    {  757, 0x9E3779B1U, 0xD9905A8BU }, /* XSUM_XXH32_testdata[1515] */\n    {  758, 0x00000000U, 0x39B40A78U }, /* XSUM_XXH32_testdata[1516] */\n    {  758, 0x9E3779B1U, 0xD730505BU }, /* XSUM_XXH32_testdata[1517] */\n    {  759, 0x00000000U, 0x149AB890U }, /* XSUM_XXH32_testdata[1518] */\n    {  759, 0x9E3779B1U, 0x2944A2A0U }, /* XSUM_XXH32_testdata[1519] */\n    {  760, 0x00000000U, 0x2875A5BAU }, /* XSUM_XXH32_testdata[1520] */\n    {  760, 0x9E3779B1U, 0xF27711C0U }, /* XSUM_XXH32_testdata[1521] */\n    {  761, 0x00000000U, 0x3880C284U }, /* XSUM_XXH32_testdata[1522] */\n    {  761, 0x9E3779B1U, 0xCB288583U }, /* XSUM_XXH32_testdata[1523] */\n    {  762, 0x00000000U, 0x8A947976U }, /* XSUM_XXH32_testdata[1524] */\n    {  762, 0x9E3779B1U, 0x4D87BA63U }, /* XSUM_XXH32_testdata[1525] */\n    {  763, 0x00000000U, 0xB32330A3U }, /* XSUM_XXH32_testdata[1526] */\n    {  763, 0x9E3779B1U, 0x9E2EF837U }, /* XSUM_XXH32_testdata[1527] */\n    {  764, 0x00000000U, 0x43DF832BU }, /* XSUM_XXH32_testdata[1528] */\n    {  764, 0x9E3779B1U, 0x90190D1BU }, /* XSUM_XXH32_testdata[1529] */\n    {  765, 0x00000000U, 0xFFF4987CU }, /* XSUM_XXH32_testdata[1530] */\n    {  765, 0x9E3779B1U, 0xD9FEC95DU }, /* XSUM_XXH32_testdata[1531] */\n    {  766, 0x00000000U, 0xE34251AEU }, /* XSUM_XXH32_testdata[1532] */\n    {  766, 0x9E3779B1U, 0xD6236F68U }, /* XSUM_XXH32_testdata[1533] */\n    {  767, 0x00000000U, 0x0EE8121CU }, /* XSUM_XXH32_testdata[1534] */\n    {  767, 0x9E3779B1U, 0xA478A20CU }, /* XSUM_XXH32_testdata[1535] */\n    {  768, 0x00000000U, 0xCA5128E2U }, /* XSUM_XXH32_testdata[1536] */\n    {  768, 0x9E3779B1U, 0x2B7FC8B4U }, /* XSUM_XXH32_testdata[1537] */\n    {  769, 0x00000000U, 0x1BF02E61U }, /* XSUM_XXH32_testdata[1538] */\n    {  769, 0x9E3779B1U, 0x5BE6D729U }, /* XSUM_XXH32_testdata[1539] */\n    {  770, 0x00000000U, 0xF328DB39U }, /* XSUM_XXH32_testdata[1540] */\n    {  770, 0x9E3779B1U, 0x7DB3B037U }, /* XSUM_XXH32_testdata[1541] */\n    {  771, 0x00000000U, 0x203C70BCU }, /* XSUM_XXH32_testdata[1542] */\n    {  771, 0x9E3779B1U, 0xC919E129U }, /* XSUM_XXH32_testdata[1543] */\n    {  772, 0x00000000U, 0x4C7F0C56U }, /* XSUM_XXH32_testdata[1544] */\n    {  772, 0x9E3779B1U, 0x33A4929FU }, /* XSUM_XXH32_testdata[1545] */\n    {  773, 0x00000000U, 0x5B47E012U }, /* XSUM_XXH32_testdata[1546] */\n    {  773, 0x9E3779B1U, 0x44306653U }, /* XSUM_XXH32_testdata[1547] */\n    {  774, 0x00000000U, 0x13A7A0A2U }, /* XSUM_XXH32_testdata[1548] */\n    {  774, 0x9E3779B1U, 0xD3A9B1C5U }, /* XSUM_XXH32_testdata[1549] */\n    {  775, 0x00000000U, 0xFF21193DU }, /* XSUM_XXH32_testdata[1550] */\n    {  775, 0x9E3779B1U, 0xB7E86889U }, /* XSUM_XXH32_testdata[1551] */\n    {  776, 0x00000000U, 0x535B5EF2U }, /* XSUM_XXH32_testdata[1552] */\n    {  776, 0x9E3779B1U, 0xE00F76FDU }, /* XSUM_XXH32_testdata[1553] */\n    {  777, 0x00000000U, 0x94797D58U }, /* XSUM_XXH32_testdata[1554] */\n    {  777, 0x9E3779B1U, 0xEE685D23U }, /* XSUM_XXH32_testdata[1555] */\n    {  778, 0x00000000U, 0x79BE2677U }, /* XSUM_XXH32_testdata[1556] */\n    {  778, 0x9E3779B1U, 0xDB3DA974U }, /* XSUM_XXH32_testdata[1557] */\n    {  779, 0x00000000U, 0xBCB775EBU }, /* XSUM_XXH32_testdata[1558] */\n    {  779, 0x9E3779B1U, 0x8D9747A4U }, /* XSUM_XXH32_testdata[1559] */\n    {  780, 0x00000000U, 0xB3EFEB6FU }, /* XSUM_XXH32_testdata[1560] */\n    {  780, 0x9E3779B1U, 0x10342289U }, /* XSUM_XXH32_testdata[1561] */\n    {  781, 0x00000000U, 0x2A9EAC26U }, /* XSUM_XXH32_testdata[1562] */\n    {  781, 0x9E3779B1U, 0xE66F075AU }, /* XSUM_XXH32_testdata[1563] */\n    {  782, 0x00000000U, 0xA22BF0CBU }, /* XSUM_XXH32_testdata[1564] */\n    {  782, 0x9E3779B1U, 0xFA8744A0U }, /* XSUM_XXH32_testdata[1565] */\n    {  783, 0x00000000U, 0xF8F97E0FU }, /* XSUM_XXH32_testdata[1566] */\n    {  783, 0x9E3779B1U, 0x497A21C1U }, /* XSUM_XXH32_testdata[1567] */\n    {  784, 0x00000000U, 0xC4A0816BU }, /* XSUM_XXH32_testdata[1568] */\n    {  784, 0x9E3779B1U, 0x29F27769U }, /* XSUM_XXH32_testdata[1569] */\n    {  785, 0x00000000U, 0xEDAD452EU }, /* XSUM_XXH32_testdata[1570] */\n    {  785, 0x9E3779B1U, 0xF809A80DU }, /* XSUM_XXH32_testdata[1571] */\n    {  786, 0x00000000U, 0xEDB20314U }, /* XSUM_XXH32_testdata[1572] */\n    {  786, 0x9E3779B1U, 0xAD493881U }, /* XSUM_XXH32_testdata[1573] */\n    {  787, 0x00000000U, 0xBC2EE0C9U }, /* XSUM_XXH32_testdata[1574] */\n    {  787, 0x9E3779B1U, 0x820B9F81U }, /* XSUM_XXH32_testdata[1575] */\n    {  788, 0x00000000U, 0x9A18694AU }, /* XSUM_XXH32_testdata[1576] */\n    {  788, 0x9E3779B1U, 0x432C0DBAU }, /* XSUM_XXH32_testdata[1577] */\n    {  789, 0x00000000U, 0xE16F826FU }, /* XSUM_XXH32_testdata[1578] */\n    {  789, 0x9E3779B1U, 0xB12DEFF6U }, /* XSUM_XXH32_testdata[1579] */\n    {  790, 0x00000000U, 0x74997B00U }, /* XSUM_XXH32_testdata[1580] */\n    {  790, 0x9E3779B1U, 0xF2F0240FU }, /* XSUM_XXH32_testdata[1581] */\n    {  791, 0x00000000U, 0xAF9343E2U }, /* XSUM_XXH32_testdata[1582] */\n    {  791, 0x9E3779B1U, 0x543DE858U }, /* XSUM_XXH32_testdata[1583] */\n    {  792, 0x00000000U, 0x7C24394DU }, /* XSUM_XXH32_testdata[1584] */\n    {  792, 0x9E3779B1U, 0x7DC5595BU }, /* XSUM_XXH32_testdata[1585] */\n    {  793, 0x00000000U, 0x14D83702U }, /* XSUM_XXH32_testdata[1586] */\n    {  793, 0x9E3779B1U, 0xF53C71C4U }, /* XSUM_XXH32_testdata[1587] */\n    {  794, 0x00000000U, 0x608703B9U }, /* XSUM_XXH32_testdata[1588] */\n    {  794, 0x9E3779B1U, 0xAB22EDD0U }, /* XSUM_XXH32_testdata[1589] */\n    {  795, 0x00000000U, 0x18D15D7EU }, /* XSUM_XXH32_testdata[1590] */\n    {  795, 0x9E3779B1U, 0x09A50326U }, /* XSUM_XXH32_testdata[1591] */\n    {  796, 0x00000000U, 0x560C13BBU }, /* XSUM_XXH32_testdata[1592] */\n    {  796, 0x9E3779B1U, 0x0754045CU }, /* XSUM_XXH32_testdata[1593] */\n    {  797, 0x00000000U, 0x36288D35U }, /* XSUM_XXH32_testdata[1594] */\n    {  797, 0x9E3779B1U, 0x5F10ADC0U }, /* XSUM_XXH32_testdata[1595] */\n    {  798, 0x00000000U, 0x572027D4U }, /* XSUM_XXH32_testdata[1596] */\n    {  798, 0x9E3779B1U, 0x2D089D82U }, /* XSUM_XXH32_testdata[1597] */\n    {  799, 0x00000000U, 0x349A7EC0U }, /* XSUM_XXH32_testdata[1598] */\n    {  799, 0x9E3779B1U, 0xE1C4B3BCU }, /* XSUM_XXH32_testdata[1599] */\n    {  800, 0x00000000U, 0x799ACE3AU }, /* XSUM_XXH32_testdata[1600] */\n    {  800, 0x9E3779B1U, 0x94557779U }, /* XSUM_XXH32_testdata[1601] */\n    {  801, 0x00000000U, 0x6006B6AEU }, /* XSUM_XXH32_testdata[1602] */\n    {  801, 0x9E3779B1U, 0x3B80BC1BU }, /* XSUM_XXH32_testdata[1603] */\n    {  802, 0x00000000U, 0xCB8EEF30U }, /* XSUM_XXH32_testdata[1604] */\n    {  802, 0x9E3779B1U, 0x53E99BBBU }, /* XSUM_XXH32_testdata[1605] */\n    {  803, 0x00000000U, 0x3CA5935FU }, /* XSUM_XXH32_testdata[1606] */\n    {  803, 0x9E3779B1U, 0x79AE63A2U }, /* XSUM_XXH32_testdata[1607] */\n    {  804, 0x00000000U, 0xFFCBE36BU }, /* XSUM_XXH32_testdata[1608] */\n    {  804, 0x9E3779B1U, 0x42991898U }, /* XSUM_XXH32_testdata[1609] */\n    {  805, 0x00000000U, 0x9E9AEB10U }, /* XSUM_XXH32_testdata[1610] */\n    {  805, 0x9E3779B1U, 0xC917EBB7U }, /* XSUM_XXH32_testdata[1611] */\n    {  806, 0x00000000U, 0x792D9C19U }, /* XSUM_XXH32_testdata[1612] */\n    {  806, 0x9E3779B1U, 0x47430CB1U }, /* XSUM_XXH32_testdata[1613] */\n    {  807, 0x00000000U, 0x0383FB25U }, /* XSUM_XXH32_testdata[1614] */\n    {  807, 0x9E3779B1U, 0x87727B7EU }, /* XSUM_XXH32_testdata[1615] */\n    {  808, 0x00000000U, 0x9B7DDE3FU }, /* XSUM_XXH32_testdata[1616] */\n    {  808, 0x9E3779B1U, 0x1ACE553EU }, /* XSUM_XXH32_testdata[1617] */\n    {  809, 0x00000000U, 0x0C585D82U }, /* XSUM_XXH32_testdata[1618] */\n    {  809, 0x9E3779B1U, 0x0DBEE1DAU }, /* XSUM_XXH32_testdata[1619] */\n    {  810, 0x00000000U, 0x426BD099U }, /* XSUM_XXH32_testdata[1620] */\n    {  810, 0x9E3779B1U, 0xAA00D6C4U }, /* XSUM_XXH32_testdata[1621] */\n    {  811, 0x00000000U, 0x5CA58FCDU }, /* XSUM_XXH32_testdata[1622] */\n    {  811, 0x9E3779B1U, 0x200CD49BU }, /* XSUM_XXH32_testdata[1623] */\n    {  812, 0x00000000U, 0xA005B5F3U }, /* XSUM_XXH32_testdata[1624] */\n    {  812, 0x9E3779B1U, 0xC93B3EAFU }, /* XSUM_XXH32_testdata[1625] */\n    {  813, 0x00000000U, 0x70ED3432U }, /* XSUM_XXH32_testdata[1626] */\n    {  813, 0x9E3779B1U, 0x58CE8E37U }, /* XSUM_XXH32_testdata[1627] */\n    {  814, 0x00000000U, 0x581F1F5BU }, /* XSUM_XXH32_testdata[1628] */\n    {  814, 0x9E3779B1U, 0x87A7138AU }, /* XSUM_XXH32_testdata[1629] */\n    {  815, 0x00000000U, 0xE01F98DBU }, /* XSUM_XXH32_testdata[1630] */\n    {  815, 0x9E3779B1U, 0x2DD3C645U }, /* XSUM_XXH32_testdata[1631] */\n    {  816, 0x00000000U, 0x9197D655U }, /* XSUM_XXH32_testdata[1632] */\n    {  816, 0x9E3779B1U, 0x88181254U }, /* XSUM_XXH32_testdata[1633] */\n    {  817, 0x00000000U, 0x8BEA65B4U }, /* XSUM_XXH32_testdata[1634] */\n    {  817, 0x9E3779B1U, 0xA96D339EU }, /* XSUM_XXH32_testdata[1635] */\n    {  818, 0x00000000U, 0x527578DBU }, /* XSUM_XXH32_testdata[1636] */\n    {  818, 0x9E3779B1U, 0x1CB5CB64U }, /* XSUM_XXH32_testdata[1637] */\n    {  819, 0x00000000U, 0x630CCD19U }, /* XSUM_XXH32_testdata[1638] */\n    {  819, 0x9E3779B1U, 0xED107A3FU }, /* XSUM_XXH32_testdata[1639] */\n    {  820, 0x00000000U, 0x41F3C92CU }, /* XSUM_XXH32_testdata[1640] */\n    {  820, 0x9E3779B1U, 0x1ABE7E73U }, /* XSUM_XXH32_testdata[1641] */\n    {  821, 0x00000000U, 0x19821DAFU }, /* XSUM_XXH32_testdata[1642] */\n    {  821, 0x9E3779B1U, 0xDD0B94C3U }, /* XSUM_XXH32_testdata[1643] */\n    {  822, 0x00000000U, 0xEA9FD68AU }, /* XSUM_XXH32_testdata[1644] */\n    {  822, 0x9E3779B1U, 0x76282216U }, /* XSUM_XXH32_testdata[1645] */\n    {  823, 0x00000000U, 0x298B22DFU }, /* XSUM_XXH32_testdata[1646] */\n    {  823, 0x9E3779B1U, 0xCAB9201FU }, /* XSUM_XXH32_testdata[1647] */\n    {  824, 0x00000000U, 0x1B6C1EBFU }, /* XSUM_XXH32_testdata[1648] */\n    {  824, 0x9E3779B1U, 0xF79DCCE4U }, /* XSUM_XXH32_testdata[1649] */\n    {  825, 0x00000000U, 0xF610D9B6U }, /* XSUM_XXH32_testdata[1650] */\n    {  825, 0x9E3779B1U, 0x73062BC6U }, /* XSUM_XXH32_testdata[1651] */\n    {  826, 0x00000000U, 0xBEA861F5U }, /* XSUM_XXH32_testdata[1652] */\n    {  826, 0x9E3779B1U, 0x3B8CD69DU }, /* XSUM_XXH32_testdata[1653] */\n    {  827, 0x00000000U, 0x3900262DU }, /* XSUM_XXH32_testdata[1654] */\n    {  827, 0x9E3779B1U, 0x851AB34BU }, /* XSUM_XXH32_testdata[1655] */\n    {  828, 0x00000000U, 0xD53836B9U }, /* XSUM_XXH32_testdata[1656] */\n    {  828, 0x9E3779B1U, 0xC93C8FB4U }, /* XSUM_XXH32_testdata[1657] */\n    {  829, 0x00000000U, 0xCC01D7B4U }, /* XSUM_XXH32_testdata[1658] */\n    {  829, 0x9E3779B1U, 0x239420A2U }, /* XSUM_XXH32_testdata[1659] */\n    {  830, 0x00000000U, 0x11A2A8FFU }, /* XSUM_XXH32_testdata[1660] */\n    {  830, 0x9E3779B1U, 0x1C7A6CBEU }, /* XSUM_XXH32_testdata[1661] */\n    {  831, 0x00000000U, 0x140A2E34U }, /* XSUM_XXH32_testdata[1662] */\n    {  831, 0x9E3779B1U, 0xC8E75164U }, /* XSUM_XXH32_testdata[1663] */\n    {  832, 0x00000000U, 0x0783E95AU }, /* XSUM_XXH32_testdata[1664] */\n    {  832, 0x9E3779B1U, 0x021FF221U }, /* XSUM_XXH32_testdata[1665] */\n    {  833, 0x00000000U, 0x8FB9CA1BU }, /* XSUM_XXH32_testdata[1666] */\n    {  833, 0x9E3779B1U, 0xA1CC2DF9U }, /* XSUM_XXH32_testdata[1667] */\n    {  834, 0x00000000U, 0x746A9750U }, /* XSUM_XXH32_testdata[1668] */\n    {  834, 0x9E3779B1U, 0x5F16C1DDU }, /* XSUM_XXH32_testdata[1669] */\n    {  835, 0x00000000U, 0x14B12F5FU }, /* XSUM_XXH32_testdata[1670] */\n    {  835, 0x9E3779B1U, 0xC5005296U }, /* XSUM_XXH32_testdata[1671] */\n    {  836, 0x00000000U, 0xBB9ACFA0U }, /* XSUM_XXH32_testdata[1672] */\n    {  836, 0x9E3779B1U, 0x0DC8DAAFU }, /* XSUM_XXH32_testdata[1673] */\n    {  837, 0x00000000U, 0x7205DC59U }, /* XSUM_XXH32_testdata[1674] */\n    {  837, 0x9E3779B1U, 0xEEFC11DBU }, /* XSUM_XXH32_testdata[1675] */\n    {  838, 0x00000000U, 0x0B52C9B9U }, /* XSUM_XXH32_testdata[1676] */\n    {  838, 0x9E3779B1U, 0xAF1725DAU }, /* XSUM_XXH32_testdata[1677] */\n    {  839, 0x00000000U, 0x464E264DU }, /* XSUM_XXH32_testdata[1678] */\n    {  839, 0x9E3779B1U, 0xF8ABC41AU }, /* XSUM_XXH32_testdata[1679] */\n    {  840, 0x00000000U, 0x6FE0DFAEU }, /* XSUM_XXH32_testdata[1680] */\n    {  840, 0x9E3779B1U, 0x5C313325U }, /* XSUM_XXH32_testdata[1681] */\n    {  841, 0x00000000U, 0x9DEE1514U }, /* XSUM_XXH32_testdata[1682] */\n    {  841, 0x9E3779B1U, 0xB3EA0CA6U }, /* XSUM_XXH32_testdata[1683] */\n    {  842, 0x00000000U, 0xD3A7EDCEU }, /* XSUM_XXH32_testdata[1684] */\n    {  842, 0x9E3779B1U, 0x8694FFA8U }, /* XSUM_XXH32_testdata[1685] */\n    {  843, 0x00000000U, 0xE842112CU }, /* XSUM_XXH32_testdata[1686] */\n    {  843, 0x9E3779B1U, 0x3A6171E5U }, /* XSUM_XXH32_testdata[1687] */\n    {  844, 0x00000000U, 0xD2B2F892U }, /* XSUM_XXH32_testdata[1688] */\n    {  844, 0x9E3779B1U, 0xA413C6D0U }, /* XSUM_XXH32_testdata[1689] */\n    {  845, 0x00000000U, 0xFEFB4745U }, /* XSUM_XXH32_testdata[1690] */\n    {  845, 0x9E3779B1U, 0xE6672924U }, /* XSUM_XXH32_testdata[1691] */\n    {  846, 0x00000000U, 0xAA00C849U }, /* XSUM_XXH32_testdata[1692] */\n    {  846, 0x9E3779B1U, 0x2F20E493U }, /* XSUM_XXH32_testdata[1693] */\n    {  847, 0x00000000U, 0x3BAB9A06U }, /* XSUM_XXH32_testdata[1694] */\n    {  847, 0x9E3779B1U, 0xFD48FEABU }, /* XSUM_XXH32_testdata[1695] */\n    {  848, 0x00000000U, 0x1732CE34U }, /* XSUM_XXH32_testdata[1696] */\n    {  848, 0x9E3779B1U, 0xF693EFE5U }, /* XSUM_XXH32_testdata[1697] */\n    {  849, 0x00000000U, 0x164D3308U }, /* XSUM_XXH32_testdata[1698] */\n    {  849, 0x9E3779B1U, 0x31DB60C9U }, /* XSUM_XXH32_testdata[1699] */\n    {  850, 0x00000000U, 0x2D570248U }, /* XSUM_XXH32_testdata[1700] */\n    {  850, 0x9E3779B1U, 0xFFDE72F1U }, /* XSUM_XXH32_testdata[1701] */\n    {  851, 0x00000000U, 0x6B8793C4U }, /* XSUM_XXH32_testdata[1702] */\n    {  851, 0x9E3779B1U, 0xF8F00489U }, /* XSUM_XXH32_testdata[1703] */\n    {  852, 0x00000000U, 0xEAC2EDADU }, /* XSUM_XXH32_testdata[1704] */\n    {  852, 0x9E3779B1U, 0x0F2CE5ADU }, /* XSUM_XXH32_testdata[1705] */\n    {  853, 0x00000000U, 0x56A12C9DU }, /* XSUM_XXH32_testdata[1706] */\n    {  853, 0x9E3779B1U, 0xDA401320U }, /* XSUM_XXH32_testdata[1707] */\n    {  854, 0x00000000U, 0xE1784C92U }, /* XSUM_XXH32_testdata[1708] */\n    {  854, 0x9E3779B1U, 0xDC0796F4U }, /* XSUM_XXH32_testdata[1709] */\n    {  855, 0x00000000U, 0xEF177BC4U }, /* XSUM_XXH32_testdata[1710] */\n    {  855, 0x9E3779B1U, 0x879E8F48U }, /* XSUM_XXH32_testdata[1711] */\n    {  856, 0x00000000U, 0x9F93E91FU }, /* XSUM_XXH32_testdata[1712] */\n    {  856, 0x9E3779B1U, 0xFB085F0EU }, /* XSUM_XXH32_testdata[1713] */\n    {  857, 0x00000000U, 0x4A47A2C0U }, /* XSUM_XXH32_testdata[1714] */\n    {  857, 0x9E3779B1U, 0x9970434FU }, /* XSUM_XXH32_testdata[1715] */\n    {  858, 0x00000000U, 0x0A564BC8U }, /* XSUM_XXH32_testdata[1716] */\n    {  858, 0x9E3779B1U, 0x94ACD42EU }, /* XSUM_XXH32_testdata[1717] */\n    {  859, 0x00000000U, 0x37664233U }, /* XSUM_XXH32_testdata[1718] */\n    {  859, 0x9E3779B1U, 0x1A64836FU }, /* XSUM_XXH32_testdata[1719] */\n    {  860, 0x00000000U, 0x4308CA3DU }, /* XSUM_XXH32_testdata[1720] */\n    {  860, 0x9E3779B1U, 0x0E4E177DU }, /* XSUM_XXH32_testdata[1721] */\n    {  861, 0x00000000U, 0xD5B7C564U }, /* XSUM_XXH32_testdata[1722] */\n    {  861, 0x9E3779B1U, 0xD903E606U }, /* XSUM_XXH32_testdata[1723] */\n    {  862, 0x00000000U, 0x82037110U }, /* XSUM_XXH32_testdata[1724] */\n    {  862, 0x9E3779B1U, 0x75554B56U }, /* XSUM_XXH32_testdata[1725] */\n    {  863, 0x00000000U, 0x145B2AE2U }, /* XSUM_XXH32_testdata[1726] */\n    {  863, 0x9E3779B1U, 0x7E743179U }, /* XSUM_XXH32_testdata[1727] */\n    {  864, 0x00000000U, 0x16C8B28CU }, /* XSUM_XXH32_testdata[1728] */\n    {  864, 0x9E3779B1U, 0xB51D2BCFU }, /* XSUM_XXH32_testdata[1729] */\n    {  865, 0x00000000U, 0x8C82C8E0U }, /* XSUM_XXH32_testdata[1730] */\n    {  865, 0x9E3779B1U, 0xB2F697C2U }, /* XSUM_XXH32_testdata[1731] */\n    {  866, 0x00000000U, 0xBE274BB3U }, /* XSUM_XXH32_testdata[1732] */\n    {  866, 0x9E3779B1U, 0xE17C3BA2U }, /* XSUM_XXH32_testdata[1733] */\n    {  867, 0x00000000U, 0x476BE8BFU }, /* XSUM_XXH32_testdata[1734] */\n    {  867, 0x9E3779B1U, 0x71FAF09BU }, /* XSUM_XXH32_testdata[1735] */\n    {  868, 0x00000000U, 0xAF268721U }, /* XSUM_XXH32_testdata[1736] */\n    {  868, 0x9E3779B1U, 0x0F7FA222U }, /* XSUM_XXH32_testdata[1737] */\n    {  869, 0x00000000U, 0x0EAD1E2AU }, /* XSUM_XXH32_testdata[1738] */\n    {  869, 0x9E3779B1U, 0xF0C7FCBCU }, /* XSUM_XXH32_testdata[1739] */\n    {  870, 0x00000000U, 0x63CA6795U }, /* XSUM_XXH32_testdata[1740] */\n    {  870, 0x9E3779B1U, 0x6D43A2B2U }, /* XSUM_XXH32_testdata[1741] */\n    {  871, 0x00000000U, 0x255F838FU }, /* XSUM_XXH32_testdata[1742] */\n    {  871, 0x9E3779B1U, 0x3308BEFBU }, /* XSUM_XXH32_testdata[1743] */\n    {  872, 0x00000000U, 0xB8926545U }, /* XSUM_XXH32_testdata[1744] */\n    {  872, 0x9E3779B1U, 0xDD5AA75EU }, /* XSUM_XXH32_testdata[1745] */\n    {  873, 0x00000000U, 0x2A1062E6U }, /* XSUM_XXH32_testdata[1746] */\n    {  873, 0x9E3779B1U, 0x4B6C2322U }, /* XSUM_XXH32_testdata[1747] */\n    {  874, 0x00000000U, 0xE1288231U }, /* XSUM_XXH32_testdata[1748] */\n    {  874, 0x9E3779B1U, 0xF167892FU }, /* XSUM_XXH32_testdata[1749] */\n    {  875, 0x00000000U, 0xC6473C63U }, /* XSUM_XXH32_testdata[1750] */\n    {  875, 0x9E3779B1U, 0xDF7EE803U }, /* XSUM_XXH32_testdata[1751] */\n    {  876, 0x00000000U, 0xADC3ACFBU }, /* XSUM_XXH32_testdata[1752] */\n    {  876, 0x9E3779B1U, 0x5B2393CDU }, /* XSUM_XXH32_testdata[1753] */\n    {  877, 0x00000000U, 0x58D5C9BAU }, /* XSUM_XXH32_testdata[1754] */\n    {  877, 0x9E3779B1U, 0x4B013380U }, /* XSUM_XXH32_testdata[1755] */\n    {  878, 0x00000000U, 0xC063426BU }, /* XSUM_XXH32_testdata[1756] */\n    {  878, 0x9E3779B1U, 0x3431792AU }, /* XSUM_XXH32_testdata[1757] */\n    {  879, 0x00000000U, 0x6F25BC05U }, /* XSUM_XXH32_testdata[1758] */\n    {  879, 0x9E3779B1U, 0x2463EDABU }, /* XSUM_XXH32_testdata[1759] */\n    {  880, 0x00000000U, 0x6941D23BU }, /* XSUM_XXH32_testdata[1760] */\n    {  880, 0x9E3779B1U, 0x133CF5DAU }, /* XSUM_XXH32_testdata[1761] */\n    {  881, 0x00000000U, 0xFE478A0CU }, /* XSUM_XXH32_testdata[1762] */\n    {  881, 0x9E3779B1U, 0xDF743D6CU }, /* XSUM_XXH32_testdata[1763] */\n    {  882, 0x00000000U, 0x5C20FC4BU }, /* XSUM_XXH32_testdata[1764] */\n    {  882, 0x9E3779B1U, 0x0764B5DFU }, /* XSUM_XXH32_testdata[1765] */\n    {  883, 0x00000000U, 0xB4D49683U }, /* XSUM_XXH32_testdata[1766] */\n    {  883, 0x9E3779B1U, 0x16722D88U }, /* XSUM_XXH32_testdata[1767] */\n    {  884, 0x00000000U, 0xC170FFA9U }, /* XSUM_XXH32_testdata[1768] */\n    {  884, 0x9E3779B1U, 0xA536EECCU }, /* XSUM_XXH32_testdata[1769] */\n    {  885, 0x00000000U, 0x4E655C59U }, /* XSUM_XXH32_testdata[1770] */\n    {  885, 0x9E3779B1U, 0x39CA43A8U }, /* XSUM_XXH32_testdata[1771] */\n    {  886, 0x00000000U, 0xF2B5A26DU }, /* XSUM_XXH32_testdata[1772] */\n    {  886, 0x9E3779B1U, 0x8B2A6110U }, /* XSUM_XXH32_testdata[1773] */\n    {  887, 0x00000000U, 0xE71437F1U }, /* XSUM_XXH32_testdata[1774] */\n    {  887, 0x9E3779B1U, 0x0D3C607DU }, /* XSUM_XXH32_testdata[1775] */\n    {  888, 0x00000000U, 0xB46B5CBDU }, /* XSUM_XXH32_testdata[1776] */\n    {  888, 0x9E3779B1U, 0x4A74B7E8U }, /* XSUM_XXH32_testdata[1777] */\n    {  889, 0x00000000U, 0xE006D455U }, /* XSUM_XXH32_testdata[1778] */\n    {  889, 0x9E3779B1U, 0x471546A0U }, /* XSUM_XXH32_testdata[1779] */\n    {  890, 0x00000000U, 0x02ECA8AAU }, /* XSUM_XXH32_testdata[1780] */\n    {  890, 0x9E3779B1U, 0xD35D3207U }, /* XSUM_XXH32_testdata[1781] */\n    {  891, 0x00000000U, 0xCEF23CC1U }, /* XSUM_XXH32_testdata[1782] */\n    {  891, 0x9E3779B1U, 0x24E82C65U }, /* XSUM_XXH32_testdata[1783] */\n    {  892, 0x00000000U, 0xAA24508EU }, /* XSUM_XXH32_testdata[1784] */\n    {  892, 0x9E3779B1U, 0x76F48F31U }, /* XSUM_XXH32_testdata[1785] */\n    {  893, 0x00000000U, 0xB2F9155FU }, /* XSUM_XXH32_testdata[1786] */\n    {  893, 0x9E3779B1U, 0xEE7AD2F9U }, /* XSUM_XXH32_testdata[1787] */\n    {  894, 0x00000000U, 0xE7B59BB7U }, /* XSUM_XXH32_testdata[1788] */\n    {  894, 0x9E3779B1U, 0x926416CFU }, /* XSUM_XXH32_testdata[1789] */\n    {  895, 0x00000000U, 0xC04896A1U }, /* XSUM_XXH32_testdata[1790] */\n    {  895, 0x9E3779B1U, 0x119328BFU }, /* XSUM_XXH32_testdata[1791] */\n    {  896, 0x00000000U, 0xA1C7A923U }, /* XSUM_XXH32_testdata[1792] */\n    {  896, 0x9E3779B1U, 0x46149B0DU }, /* XSUM_XXH32_testdata[1793] */\n    {  897, 0x00000000U, 0xFF4ED8D4U }, /* XSUM_XXH32_testdata[1794] */\n    {  897, 0x9E3779B1U, 0x0F3F65EFU }, /* XSUM_XXH32_testdata[1795] */\n    {  898, 0x00000000U, 0x1F82826EU }, /* XSUM_XXH32_testdata[1796] */\n    {  898, 0x9E3779B1U, 0x759A1CB3U }, /* XSUM_XXH32_testdata[1797] */\n    {  899, 0x00000000U, 0x1A934DC6U }, /* XSUM_XXH32_testdata[1798] */\n    {  899, 0x9E3779B1U, 0x8B0E5440U }, /* XSUM_XXH32_testdata[1799] */\n    {  900, 0x00000000U, 0x4C71F332U }, /* XSUM_XXH32_testdata[1800] */\n    {  900, 0x9E3779B1U, 0xC9E617F3U }, /* XSUM_XXH32_testdata[1801] */\n    {  901, 0x00000000U, 0x52FBDF77U }, /* XSUM_XXH32_testdata[1802] */\n    {  901, 0x9E3779B1U, 0x432B13F4U }, /* XSUM_XXH32_testdata[1803] */\n    {  902, 0x00000000U, 0x25D0AF8FU }, /* XSUM_XXH32_testdata[1804] */\n    {  902, 0x9E3779B1U, 0x2B3F63B6U }, /* XSUM_XXH32_testdata[1805] */\n    {  903, 0x00000000U, 0x311F9CD9U }, /* XSUM_XXH32_testdata[1806] */\n    {  903, 0x9E3779B1U, 0x8B1E128FU }, /* XSUM_XXH32_testdata[1807] */\n    {  904, 0x00000000U, 0x865F9281U }, /* XSUM_XXH32_testdata[1808] */\n    {  904, 0x9E3779B1U, 0xFAA8D0FFU }, /* XSUM_XXH32_testdata[1809] */\n    {  905, 0x00000000U, 0x3C320F49U }, /* XSUM_XXH32_testdata[1810] */\n    {  905, 0x9E3779B1U, 0x4D968269U }, /* XSUM_XXH32_testdata[1811] */\n    {  906, 0x00000000U, 0xA44A8B08U }, /* XSUM_XXH32_testdata[1812] */\n    {  906, 0x9E3779B1U, 0xC1157174U }, /* XSUM_XXH32_testdata[1813] */\n    {  907, 0x00000000U, 0x2933D62FU }, /* XSUM_XXH32_testdata[1814] */\n    {  907, 0x9E3779B1U, 0x68DCB4D9U }, /* XSUM_XXH32_testdata[1815] */\n    {  908, 0x00000000U, 0x87947414U }, /* XSUM_XXH32_testdata[1816] */\n    {  908, 0x9E3779B1U, 0xD1237AD5U }, /* XSUM_XXH32_testdata[1817] */\n    {  909, 0x00000000U, 0xB9C03AA0U }, /* XSUM_XXH32_testdata[1818] */\n    {  909, 0x9E3779B1U, 0x04B9C681U }, /* XSUM_XXH32_testdata[1819] */\n    {  910, 0x00000000U, 0xCFB8C5DFU }, /* XSUM_XXH32_testdata[1820] */\n    {  910, 0x9E3779B1U, 0x35216418U }, /* XSUM_XXH32_testdata[1821] */\n    {  911, 0x00000000U, 0xEA4DECC1U }, /* XSUM_XXH32_testdata[1822] */\n    {  911, 0x9E3779B1U, 0xB83DE5CEU }, /* XSUM_XXH32_testdata[1823] */\n    {  912, 0x00000000U, 0x3AD296A2U }, /* XSUM_XXH32_testdata[1824] */\n    {  912, 0x9E3779B1U, 0xE594F5CAU }, /* XSUM_XXH32_testdata[1825] */\n    {  913, 0x00000000U, 0xDB55306AU }, /* XSUM_XXH32_testdata[1826] */\n    {  913, 0x9E3779B1U, 0xC726427BU }, /* XSUM_XXH32_testdata[1827] */\n    {  914, 0x00000000U, 0x8205386AU }, /* XSUM_XXH32_testdata[1828] */\n    {  914, 0x9E3779B1U, 0xC08D372AU }, /* XSUM_XXH32_testdata[1829] */\n    {  915, 0x00000000U, 0xCC88B456U }, /* XSUM_XXH32_testdata[1830] */\n    {  915, 0x9E3779B1U, 0xF81340A5U }, /* XSUM_XXH32_testdata[1831] */\n    {  916, 0x00000000U, 0x3B2EC5E8U }, /* XSUM_XXH32_testdata[1832] */\n    {  916, 0x9E3779B1U, 0xD06186E9U }, /* XSUM_XXH32_testdata[1833] */\n    {  917, 0x00000000U, 0xB19BCF79U }, /* XSUM_XXH32_testdata[1834] */\n    {  917, 0x9E3779B1U, 0xF0878A1DU }, /* XSUM_XXH32_testdata[1835] */\n    {  918, 0x00000000U, 0x51B6D0B7U }, /* XSUM_XXH32_testdata[1836] */\n    {  918, 0x9E3779B1U, 0xD03ABD0CU }, /* XSUM_XXH32_testdata[1837] */\n    {  919, 0x00000000U, 0xA2388411U }, /* XSUM_XXH32_testdata[1838] */\n    {  919, 0x9E3779B1U, 0x77D39263U }, /* XSUM_XXH32_testdata[1839] */\n    {  920, 0x00000000U, 0x26B9033EU }, /* XSUM_XXH32_testdata[1840] */\n    {  920, 0x9E3779B1U, 0x6FAFC1D6U }, /* XSUM_XXH32_testdata[1841] */\n    {  921, 0x00000000U, 0xB1252094U }, /* XSUM_XXH32_testdata[1842] */\n    {  921, 0x9E3779B1U, 0xF9A756DBU }, /* XSUM_XXH32_testdata[1843] */\n    {  922, 0x00000000U, 0xFB2EA3FDU }, /* XSUM_XXH32_testdata[1844] */\n    {  922, 0x9E3779B1U, 0x0CBF81BCU }, /* XSUM_XXH32_testdata[1845] */\n    {  923, 0x00000000U, 0x9608E6B4U }, /* XSUM_XXH32_testdata[1846] */\n    {  923, 0x9E3779B1U, 0x31D3955DU }, /* XSUM_XXH32_testdata[1847] */\n    {  924, 0x00000000U, 0x7B791E4AU }, /* XSUM_XXH32_testdata[1848] */\n    {  924, 0x9E3779B1U, 0x5C8FF5C1U }, /* XSUM_XXH32_testdata[1849] */\n    {  925, 0x00000000U, 0xC0ADA68DU }, /* XSUM_XXH32_testdata[1850] */\n    {  925, 0x9E3779B1U, 0x8A6E43EAU }, /* XSUM_XXH32_testdata[1851] */\n    {  926, 0x00000000U, 0x7BE7336DU }, /* XSUM_XXH32_testdata[1852] */\n    {  926, 0x9E3779B1U, 0x18617776U }, /* XSUM_XXH32_testdata[1853] */\n    {  927, 0x00000000U, 0xF6508F24U }, /* XSUM_XXH32_testdata[1854] */\n    {  927, 0x9E3779B1U, 0xAA0D461BU }, /* XSUM_XXH32_testdata[1855] */\n    {  928, 0x00000000U, 0x2605B12DU }, /* XSUM_XXH32_testdata[1856] */\n    {  928, 0x9E3779B1U, 0x35BA61DBU }, /* XSUM_XXH32_testdata[1857] */\n    {  929, 0x00000000U, 0xB3E42749U }, /* XSUM_XXH32_testdata[1858] */\n    {  929, 0x9E3779B1U, 0xF4153CE5U }, /* XSUM_XXH32_testdata[1859] */\n    {  930, 0x00000000U, 0x9F218688U }, /* XSUM_XXH32_testdata[1860] */\n    {  930, 0x9E3779B1U, 0x7FE70E23U }, /* XSUM_XXH32_testdata[1861] */\n    {  931, 0x00000000U, 0xF434AA75U }, /* XSUM_XXH32_testdata[1862] */\n    {  931, 0x9E3779B1U, 0x1CB726C8U }, /* XSUM_XXH32_testdata[1863] */\n    {  932, 0x00000000U, 0xE73BFEFCU }, /* XSUM_XXH32_testdata[1864] */\n    {  932, 0x9E3779B1U, 0xC93F71D1U }, /* XSUM_XXH32_testdata[1865] */\n    {  933, 0x00000000U, 0xE5FEB2B6U }, /* XSUM_XXH32_testdata[1866] */\n    {  933, 0x9E3779B1U, 0x11A57E5FU }, /* XSUM_XXH32_testdata[1867] */\n    {  934, 0x00000000U, 0x8AB6D185U }, /* XSUM_XXH32_testdata[1868] */\n    {  934, 0x9E3779B1U, 0xCDA30A60U }, /* XSUM_XXH32_testdata[1869] */\n    {  935, 0x00000000U, 0x84C03046U }, /* XSUM_XXH32_testdata[1870] */\n    {  935, 0x9E3779B1U, 0xEA293516U }, /* XSUM_XXH32_testdata[1871] */\n    {  936, 0x00000000U, 0xE6975E35U }, /* XSUM_XXH32_testdata[1872] */\n    {  936, 0x9E3779B1U, 0xF098711DU }, /* XSUM_XXH32_testdata[1873] */\n    {  937, 0x00000000U, 0x9FC3BFBBU }, /* XSUM_XXH32_testdata[1874] */\n    {  937, 0x9E3779B1U, 0x6AAEBE5DU }, /* XSUM_XXH32_testdata[1875] */\n    {  938, 0x00000000U, 0xDC8B6DCBU }, /* XSUM_XXH32_testdata[1876] */\n    {  938, 0x9E3779B1U, 0xDB967172U }, /* XSUM_XXH32_testdata[1877] */\n    {  939, 0x00000000U, 0x9E2B4A28U }, /* XSUM_XXH32_testdata[1878] */\n    {  939, 0x9E3779B1U, 0xE04AD3FFU }, /* XSUM_XXH32_testdata[1879] */\n    {  940, 0x00000000U, 0xB3DC35ECU }, /* XSUM_XXH32_testdata[1880] */\n    {  940, 0x9E3779B1U, 0x2B7F469CU }, /* XSUM_XXH32_testdata[1881] */\n    {  941, 0x00000000U, 0xDDF34EFEU }, /* XSUM_XXH32_testdata[1882] */\n    {  941, 0x9E3779B1U, 0x11037D75U }, /* XSUM_XXH32_testdata[1883] */\n    {  942, 0x00000000U, 0x072116FCU }, /* XSUM_XXH32_testdata[1884] */\n    {  942, 0x9E3779B1U, 0x9F32CC8BU }, /* XSUM_XXH32_testdata[1885] */\n    {  943, 0x00000000U, 0xBF800F4BU }, /* XSUM_XXH32_testdata[1886] */\n    {  943, 0x9E3779B1U, 0x3A408F9BU }, /* XSUM_XXH32_testdata[1887] */\n    {  944, 0x00000000U, 0xEBE4533EU }, /* XSUM_XXH32_testdata[1888] */\n    {  944, 0x9E3779B1U, 0x7BB63CF7U }, /* XSUM_XXH32_testdata[1889] */\n    {  945, 0x00000000U, 0xE713F9ECU }, /* XSUM_XXH32_testdata[1890] */\n    {  945, 0x9E3779B1U, 0xC244D3CEU }, /* XSUM_XXH32_testdata[1891] */\n    {  946, 0x00000000U, 0xDE1D81AFU }, /* XSUM_XXH32_testdata[1892] */\n    {  946, 0x9E3779B1U, 0x03CC2FFEU }, /* XSUM_XXH32_testdata[1893] */\n    {  947, 0x00000000U, 0x830982E4U }, /* XSUM_XXH32_testdata[1894] */\n    {  947, 0x9E3779B1U, 0x6CE1CADBU }, /* XSUM_XXH32_testdata[1895] */\n    {  948, 0x00000000U, 0x318761FDU }, /* XSUM_XXH32_testdata[1896] */\n    {  948, 0x9E3779B1U, 0x4529AC5FU }, /* XSUM_XXH32_testdata[1897] */\n    {  949, 0x00000000U, 0xF750B50EU }, /* XSUM_XXH32_testdata[1898] */\n    {  949, 0x9E3779B1U, 0x532E8599U }, /* XSUM_XXH32_testdata[1899] */\n    {  950, 0x00000000U, 0xC8144FB8U }, /* XSUM_XXH32_testdata[1900] */\n    {  950, 0x9E3779B1U, 0x3903F70FU }, /* XSUM_XXH32_testdata[1901] */\n    {  951, 0x00000000U, 0x30BC4442U }, /* XSUM_XXH32_testdata[1902] */\n    {  951, 0x9E3779B1U, 0x67AA8772U }, /* XSUM_XXH32_testdata[1903] */\n    {  952, 0x00000000U, 0x8AE5991CU }, /* XSUM_XXH32_testdata[1904] */\n    {  952, 0x9E3779B1U, 0xEA70DD9DU }, /* XSUM_XXH32_testdata[1905] */\n    {  953, 0x00000000U, 0xE463B964U }, /* XSUM_XXH32_testdata[1906] */\n    {  953, 0x9E3779B1U, 0xCAD6C042U }, /* XSUM_XXH32_testdata[1907] */\n    {  954, 0x00000000U, 0x046D9095U }, /* XSUM_XXH32_testdata[1908] */\n    {  954, 0x9E3779B1U, 0x78A6F70BU }, /* XSUM_XXH32_testdata[1909] */\n    {  955, 0x00000000U, 0xF183D423U }, /* XSUM_XXH32_testdata[1910] */\n    {  955, 0x9E3779B1U, 0x296EAF67U }, /* XSUM_XXH32_testdata[1911] */\n    {  956, 0x00000000U, 0x739F78EEU }, /* XSUM_XXH32_testdata[1912] */\n    {  956, 0x9E3779B1U, 0x49771B8AU }, /* XSUM_XXH32_testdata[1913] */\n    {  957, 0x00000000U, 0xDE23CFCFU }, /* XSUM_XXH32_testdata[1914] */\n    {  957, 0x9E3779B1U, 0xF0D2D9D7U }, /* XSUM_XXH32_testdata[1915] */\n    {  958, 0x00000000U, 0xBDD6F4C1U }, /* XSUM_XXH32_testdata[1916] */\n    {  958, 0x9E3779B1U, 0x363CA0A6U }, /* XSUM_XXH32_testdata[1917] */\n    {  959, 0x00000000U, 0x2A85181AU }, /* XSUM_XXH32_testdata[1918] */\n    {  959, 0x9E3779B1U, 0x7CE3C843U }, /* XSUM_XXH32_testdata[1919] */\n    {  960, 0x00000000U, 0x93E1BD3CU }, /* XSUM_XXH32_testdata[1920] */\n    {  960, 0x9E3779B1U, 0x89A288CFU }, /* XSUM_XXH32_testdata[1921] */\n    {  961, 0x00000000U, 0xD94CFDC8U }, /* XSUM_XXH32_testdata[1922] */\n    {  961, 0x9E3779B1U, 0xBC19A71AU }, /* XSUM_XXH32_testdata[1923] */\n    {  962, 0x00000000U, 0xC174D2F7U }, /* XSUM_XXH32_testdata[1924] */\n    {  962, 0x9E3779B1U, 0x953C5DD6U }, /* XSUM_XXH32_testdata[1925] */\n    {  963, 0x00000000U, 0x8795CD3FU }, /* XSUM_XXH32_testdata[1926] */\n    {  963, 0x9E3779B1U, 0x0A3071C8U }, /* XSUM_XXH32_testdata[1927] */\n    {  964, 0x00000000U, 0xED5C5EF5U }, /* XSUM_XXH32_testdata[1928] */\n    {  964, 0x9E3779B1U, 0x94F63473U }, /* XSUM_XXH32_testdata[1929] */\n    {  965, 0x00000000U, 0x71C1F386U }, /* XSUM_XXH32_testdata[1930] */\n    {  965, 0x9E3779B1U, 0x5A0A59F9U }, /* XSUM_XXH32_testdata[1931] */\n    {  966, 0x00000000U, 0xF6DE7763U }, /* XSUM_XXH32_testdata[1932] */\n    {  966, 0x9E3779B1U, 0xC2F383ADU }, /* XSUM_XXH32_testdata[1933] */\n    {  967, 0x00000000U, 0x90EAAAAFU }, /* XSUM_XXH32_testdata[1934] */\n    {  967, 0x9E3779B1U, 0x2D44AE3FU }, /* XSUM_XXH32_testdata[1935] */\n    {  968, 0x00000000U, 0xFAFC5822U }, /* XSUM_XXH32_testdata[1936] */\n    {  968, 0x9E3779B1U, 0x91FC5EDBU }, /* XSUM_XXH32_testdata[1937] */\n    {  969, 0x00000000U, 0x3E9EDE6FU }, /* XSUM_XXH32_testdata[1938] */\n    {  969, 0x9E3779B1U, 0x6182457CU }, /* XSUM_XXH32_testdata[1939] */\n    {  970, 0x00000000U, 0xBBEA0543U }, /* XSUM_XXH32_testdata[1940] */\n    {  970, 0x9E3779B1U, 0x069DEDF2U }, /* XSUM_XXH32_testdata[1941] */\n    {  971, 0x00000000U, 0x1BECCC7FU }, /* XSUM_XXH32_testdata[1942] */\n    {  971, 0x9E3779B1U, 0x5A2067D5U }, /* XSUM_XXH32_testdata[1943] */\n    {  972, 0x00000000U, 0x2A6A0B06U }, /* XSUM_XXH32_testdata[1944] */\n    {  972, 0x9E3779B1U, 0xCC3897B7U }, /* XSUM_XXH32_testdata[1945] */\n    {  973, 0x00000000U, 0xD15F6FEAU }, /* XSUM_XXH32_testdata[1946] */\n    {  973, 0x9E3779B1U, 0x91C4A037U }, /* XSUM_XXH32_testdata[1947] */\n    {  974, 0x00000000U, 0xADB16A16U }, /* XSUM_XXH32_testdata[1948] */\n    {  974, 0x9E3779B1U, 0xBB605662U }, /* XSUM_XXH32_testdata[1949] */\n    {  975, 0x00000000U, 0xD8C78CAEU }, /* XSUM_XXH32_testdata[1950] */\n    {  975, 0x9E3779B1U, 0x52F2C394U }, /* XSUM_XXH32_testdata[1951] */\n    {  976, 0x00000000U, 0xF97B4816U }, /* XSUM_XXH32_testdata[1952] */\n    {  976, 0x9E3779B1U, 0x1207ADA6U }, /* XSUM_XXH32_testdata[1953] */\n    {  977, 0x00000000U, 0x77E56C8FU }, /* XSUM_XXH32_testdata[1954] */\n    {  977, 0x9E3779B1U, 0x8DB37A95U }, /* XSUM_XXH32_testdata[1955] */\n    {  978, 0x00000000U, 0x3819C3C4U }, /* XSUM_XXH32_testdata[1956] */\n    {  978, 0x9E3779B1U, 0xD986DDA8U }, /* XSUM_XXH32_testdata[1957] */\n    {  979, 0x00000000U, 0xA06EEB5EU }, /* XSUM_XXH32_testdata[1958] */\n    {  979, 0x9E3779B1U, 0xCC9CAE2FU }, /* XSUM_XXH32_testdata[1959] */\n    {  980, 0x00000000U, 0x74F8A163U }, /* XSUM_XXH32_testdata[1960] */\n    {  980, 0x9E3779B1U, 0x1B694F97U }, /* XSUM_XXH32_testdata[1961] */\n    {  981, 0x00000000U, 0x0D9030F4U }, /* XSUM_XXH32_testdata[1962] */\n    {  981, 0x9E3779B1U, 0xC5C3D737U }, /* XSUM_XXH32_testdata[1963] */\n    {  982, 0x00000000U, 0x188F83C8U }, /* XSUM_XXH32_testdata[1964] */\n    {  982, 0x9E3779B1U, 0x468E9E56U }, /* XSUM_XXH32_testdata[1965] */\n    {  983, 0x00000000U, 0x0506C18BU }, /* XSUM_XXH32_testdata[1966] */\n    {  983, 0x9E3779B1U, 0x257A6015U }, /* XSUM_XXH32_testdata[1967] */\n    {  984, 0x00000000U, 0xB7353DC6U }, /* XSUM_XXH32_testdata[1968] */\n    {  984, 0x9E3779B1U, 0x65636F3CU }, /* XSUM_XXH32_testdata[1969] */\n    {  985, 0x00000000U, 0x4A096F56U }, /* XSUM_XXH32_testdata[1970] */\n    {  985, 0x9E3779B1U, 0x43F37A61U }, /* XSUM_XXH32_testdata[1971] */\n    {  986, 0x00000000U, 0x7A00909CU }, /* XSUM_XXH32_testdata[1972] */\n    {  986, 0x9E3779B1U, 0xCBEC7147U }, /* XSUM_XXH32_testdata[1973] */\n    {  987, 0x00000000U, 0x31E3A48EU }, /* XSUM_XXH32_testdata[1974] */\n    {  987, 0x9E3779B1U, 0xE8344DC5U }, /* XSUM_XXH32_testdata[1975] */\n    {  988, 0x00000000U, 0x3A0D29FDU }, /* XSUM_XXH32_testdata[1976] */\n    {  988, 0x9E3779B1U, 0x536C8206U }, /* XSUM_XXH32_testdata[1977] */\n    {  989, 0x00000000U, 0xC5B7A4DDU }, /* XSUM_XXH32_testdata[1978] */\n    {  989, 0x9E3779B1U, 0xCB9642ADU }, /* XSUM_XXH32_testdata[1979] */\n    {  990, 0x00000000U, 0x17CF9745U }, /* XSUM_XXH32_testdata[1980] */\n    {  990, 0x9E3779B1U, 0xEB0493B9U }, /* XSUM_XXH32_testdata[1981] */\n    {  991, 0x00000000U, 0xDBD6EFD9U }, /* XSUM_XXH32_testdata[1982] */\n    {  991, 0x9E3779B1U, 0xF8175615U }, /* XSUM_XXH32_testdata[1983] */\n    {  992, 0x00000000U, 0xFF072340U }, /* XSUM_XXH32_testdata[1984] */\n    {  992, 0x9E3779B1U, 0xF683DCEDU }, /* XSUM_XXH32_testdata[1985] */\n    {  993, 0x00000000U, 0x07C9E5E6U }, /* XSUM_XXH32_testdata[1986] */\n    {  993, 0x9E3779B1U, 0x4F3CBD36U }, /* XSUM_XXH32_testdata[1987] */\n    {  994, 0x00000000U, 0x1D20BCE5U }, /* XSUM_XXH32_testdata[1988] */\n    {  994, 0x9E3779B1U, 0x13A765F5U }, /* XSUM_XXH32_testdata[1989] */\n    {  995, 0x00000000U, 0x1479E861U }, /* XSUM_XXH32_testdata[1990] */\n    {  995, 0x9E3779B1U, 0x9859B8A4U }, /* XSUM_XXH32_testdata[1991] */\n    {  996, 0x00000000U, 0x1071C16FU }, /* XSUM_XXH32_testdata[1992] */\n    {  996, 0x9E3779B1U, 0x3648A1FAU }, /* XSUM_XXH32_testdata[1993] */\n    {  997, 0x00000000U, 0xAA229676U }, /* XSUM_XXH32_testdata[1994] */\n    {  997, 0x9E3779B1U, 0x3DBEDEDCU }, /* XSUM_XXH32_testdata[1995] */\n    {  998, 0x00000000U, 0xF927434EU }, /* XSUM_XXH32_testdata[1996] */\n    {  998, 0x9E3779B1U, 0x362876E7U }, /* XSUM_XXH32_testdata[1997] */\n    {  999, 0x00000000U, 0x959FAFE8U }, /* XSUM_XXH32_testdata[1998] */\n    {  999, 0x9E3779B1U, 0x46EA763FU }, /* XSUM_XXH32_testdata[1999] */\n    { 1000, 0x00000000U, 0x2052D698U }, /* XSUM_XXH32_testdata[2000] */\n    { 1000, 0x9E3779B1U, 0xD38B6679U }, /* XSUM_XXH32_testdata[2001] */\n    { 1001, 0x00000000U, 0x2EAA0E22U }, /* XSUM_XXH32_testdata[2002] */\n    { 1001, 0x9E3779B1U, 0x175578E1U }, /* XSUM_XXH32_testdata[2003] */\n    { 1002, 0x00000000U, 0x69E28DCFU }, /* XSUM_XXH32_testdata[2004] */\n    { 1002, 0x9E3779B1U, 0x9B74A874U }, /* XSUM_XXH32_testdata[2005] */\n    { 1003, 0x00000000U, 0x91D77759U }, /* XSUM_XXH32_testdata[2006] */\n    { 1003, 0x9E3779B1U, 0xC7EAE51DU }, /* XSUM_XXH32_testdata[2007] */\n    { 1004, 0x00000000U, 0x749A0B26U }, /* XSUM_XXH32_testdata[2008] */\n    { 1004, 0x9E3779B1U, 0x71D4363AU }, /* XSUM_XXH32_testdata[2009] */\n    { 1005, 0x00000000U, 0x5FCDC293U }, /* XSUM_XXH32_testdata[2010] */\n    { 1005, 0x9E3779B1U, 0xD9DFC560U }, /* XSUM_XXH32_testdata[2011] */\n    { 1006, 0x00000000U, 0x9A7312D6U }, /* XSUM_XXH32_testdata[2012] */\n    { 1006, 0x9E3779B1U, 0x029B937DU }, /* XSUM_XXH32_testdata[2013] */\n    { 1007, 0x00000000U, 0x048E1C88U }, /* XSUM_XXH32_testdata[2014] */\n    { 1007, 0x9E3779B1U, 0xE2F0F1DCU }, /* XSUM_XXH32_testdata[2015] */\n    { 1008, 0x00000000U, 0x4A2E1A5EU }, /* XSUM_XXH32_testdata[2016] */\n    { 1008, 0x9E3779B1U, 0x60AAE1B0U }, /* XSUM_XXH32_testdata[2017] */\n    { 1009, 0x00000000U, 0x25C1658CU }, /* XSUM_XXH32_testdata[2018] */\n    { 1009, 0x9E3779B1U, 0x7913AD41U }, /* XSUM_XXH32_testdata[2019] */\n    { 1010, 0x00000000U, 0x5AC9C738U }, /* XSUM_XXH32_testdata[2020] */\n    { 1010, 0x9E3779B1U, 0x9D671F2DU }, /* XSUM_XXH32_testdata[2021] */\n    { 1011, 0x00000000U, 0x3FEBFA72U }, /* XSUM_XXH32_testdata[2022] */\n    { 1011, 0x9E3779B1U, 0xE0B18591U }, /* XSUM_XXH32_testdata[2023] */\n    { 1012, 0x00000000U, 0xC9D40D6DU }, /* XSUM_XXH32_testdata[2024] */\n    { 1012, 0x9E3779B1U, 0xBE34FA85U }, /* XSUM_XXH32_testdata[2025] */\n    { 1013, 0x00000000U, 0x9ADC9853U }, /* XSUM_XXH32_testdata[2026] */\n    { 1013, 0x9E3779B1U, 0xF0DDB499U }, /* XSUM_XXH32_testdata[2027] */\n    { 1014, 0x00000000U, 0xC5B8FFCEU }, /* XSUM_XXH32_testdata[2028] */\n    { 1014, 0x9E3779B1U, 0x91C3CF2BU }, /* XSUM_XXH32_testdata[2029] */\n    { 1015, 0x00000000U, 0x39D712DCU }, /* XSUM_XXH32_testdata[2030] */\n    { 1015, 0x9E3779B1U, 0x16A75B67U }, /* XSUM_XXH32_testdata[2031] */\n    { 1016, 0x00000000U, 0x93AA1B3CU }, /* XSUM_XXH32_testdata[2032] */\n    { 1016, 0x9E3779B1U, 0x66A9A7BFU }, /* XSUM_XXH32_testdata[2033] */\n    { 1017, 0x00000000U, 0x35963E31U }, /* XSUM_XXH32_testdata[2034] */\n    { 1017, 0x9E3779B1U, 0x0A347870U }, /* XSUM_XXH32_testdata[2035] */\n    { 1018, 0x00000000U, 0xE04FB799U }, /* XSUM_XXH32_testdata[2036] */\n    { 1018, 0x9E3779B1U, 0x997B946BU }, /* XSUM_XXH32_testdata[2037] */\n    { 1019, 0x00000000U, 0xDB06CDA3U }, /* XSUM_XXH32_testdata[2038] */\n    { 1019, 0x9E3779B1U, 0xBA96DA73U }, /* XSUM_XXH32_testdata[2039] */\n    { 1020, 0x00000000U, 0xEAC224C3U }, /* XSUM_XXH32_testdata[2040] */\n    { 1020, 0x9E3779B1U, 0x9150FB03U }, /* XSUM_XXH32_testdata[2041] */\n    { 1021, 0x00000000U, 0xC634C8A4U }, /* XSUM_XXH32_testdata[2042] */\n    { 1021, 0x9E3779B1U, 0xED35004FU }, /* XSUM_XXH32_testdata[2043] */\n    { 1022, 0x00000000U, 0x92C9F946U }, /* XSUM_XXH32_testdata[2044] */\n    { 1022, 0x9E3779B1U, 0x8F9EEE88U }, /* XSUM_XXH32_testdata[2045] */\n    { 1023, 0x00000000U, 0x57AA590FU }, /* XSUM_XXH32_testdata[2046] */\n    { 1023, 0x9E3779B1U, 0x40CF6B0AU }, /* XSUM_XXH32_testdata[2047] */\n    { 1024, 0x00000000U, 0xC08E0A35U }, /* XSUM_XXH32_testdata[2048] */\n    { 1024, 0x9E3779B1U, 0x1D62EA25U }, /* XSUM_XXH32_testdata[2049] */\n    { 1025, 0x00000000U, 0x75B3B8A1U }, /* XSUM_XXH32_testdata[2050] */\n    { 1025, 0x9E3779B1U, 0xE3FB365AU }, /* XSUM_XXH32_testdata[2051] */\n    { 1026, 0x00000000U, 0x8A547721U }, /* XSUM_XXH32_testdata[2052] */\n    { 1026, 0x9E3779B1U, 0x4F243BD2U }, /* XSUM_XXH32_testdata[2053] */\n    { 1027, 0x00000000U, 0x01C7549BU }, /* XSUM_XXH32_testdata[2054] */\n    { 1027, 0x9E3779B1U, 0xB86E9BB2U }, /* XSUM_XXH32_testdata[2055] */\n    { 1028, 0x00000000U, 0x9FD0C14DU }, /* XSUM_XXH32_testdata[2056] */\n    { 1028, 0x9E3779B1U, 0x293B695CU }, /* XSUM_XXH32_testdata[2057] */\n    { 1029, 0x00000000U, 0x879686E2U }, /* XSUM_XXH32_testdata[2058] */\n    { 1029, 0x9E3779B1U, 0x59900271U }, /* XSUM_XXH32_testdata[2059] */\n    { 1030, 0x00000000U, 0x2294579FU }, /* XSUM_XXH32_testdata[2060] */\n    { 1030, 0x9E3779B1U, 0xDC2AB8A5U }, /* XSUM_XXH32_testdata[2061] */\n    { 1031, 0x00000000U, 0xB2E43FE4U }, /* XSUM_XXH32_testdata[2062] */\n    { 1031, 0x9E3779B1U, 0x13F41993U }, /* XSUM_XXH32_testdata[2063] */\n    { 1032, 0x00000000U, 0x2A7DA48DU }, /* XSUM_XXH32_testdata[2064] */\n    { 1032, 0x9E3779B1U, 0x534C0B43U }, /* XSUM_XXH32_testdata[2065] */\n    { 1033, 0x00000000U, 0x5B83A015U }, /* XSUM_XXH32_testdata[2066] */\n    { 1033, 0x9E3779B1U, 0xDABAC127U }, /* XSUM_XXH32_testdata[2067] */\n    { 1034, 0x00000000U, 0x21DA5779U }, /* XSUM_XXH32_testdata[2068] */\n    { 1034, 0x9E3779B1U, 0xBFE62480U }, /* XSUM_XXH32_testdata[2069] */\n    { 1035, 0x00000000U, 0xE0985119U }, /* XSUM_XXH32_testdata[2070] */\n    { 1035, 0x9E3779B1U, 0xEE508960U }, /* XSUM_XXH32_testdata[2071] */\n    { 1036, 0x00000000U, 0x69F48301U }, /* XSUM_XXH32_testdata[2072] */\n    { 1036, 0x9E3779B1U, 0xE8E2CABAU }, /* XSUM_XXH32_testdata[2073] */\n    { 1037, 0x00000000U, 0x9FA6B478U }, /* XSUM_XXH32_testdata[2074] */\n    { 1037, 0x9E3779B1U, 0x34F0858AU }, /* XSUM_XXH32_testdata[2075] */\n    { 1038, 0x00000000U, 0x6F710A1EU }, /* XSUM_XXH32_testdata[2076] */\n    { 1038, 0x9E3779B1U, 0xF2F3BC16U }, /* XSUM_XXH32_testdata[2077] */\n    { 1039, 0x00000000U, 0x27AACA5BU }, /* XSUM_XXH32_testdata[2078] */\n    { 1039, 0x9E3779B1U, 0x43E48B1FU }, /* XSUM_XXH32_testdata[2079] */\n    { 1040, 0x00000000U, 0x1A5AEF00U }, /* XSUM_XXH32_testdata[2080] */\n    { 1040, 0x9E3779B1U, 0xA1D1FF9CU }, /* XSUM_XXH32_testdata[2081] */\n    { 1041, 0x00000000U, 0xC7CC8B3AU }, /* XSUM_XXH32_testdata[2082] */\n    { 1041, 0x9E3779B1U, 0xDA22CDFAU }, /* XSUM_XXH32_testdata[2083] */\n    { 1042, 0x00000000U, 0x6D5359DBU }, /* XSUM_XXH32_testdata[2084] */\n    { 1042, 0x9E3779B1U, 0x16878CF8U }, /* XSUM_XXH32_testdata[2085] */\n    { 1043, 0x00000000U, 0x4EDB8EE4U }, /* XSUM_XXH32_testdata[2086] */\n    { 1043, 0x9E3779B1U, 0x8B14C369U }, /* XSUM_XXH32_testdata[2087] */\n    { 1044, 0x00000000U, 0xDB5DE323U }, /* XSUM_XXH32_testdata[2088] */\n    { 1044, 0x9E3779B1U, 0x045C871DU }, /* XSUM_XXH32_testdata[2089] */\n    { 1045, 0x00000000U, 0xBBE68A80U }, /* XSUM_XXH32_testdata[2090] */\n    { 1045, 0x9E3779B1U, 0x7D011233U }, /* XSUM_XXH32_testdata[2091] */\n    { 1046, 0x00000000U, 0xF9E7FC3FU }, /* XSUM_XXH32_testdata[2092] */\n    { 1046, 0x9E3779B1U, 0xA0D9661FU }, /* XSUM_XXH32_testdata[2093] */\n    { 1047, 0x00000000U, 0x90AD6395U }, /* XSUM_XXH32_testdata[2094] */\n    { 1047, 0x9E3779B1U, 0x5AC7215BU }, /* XSUM_XXH32_testdata[2095] */\n    { 1048, 0x00000000U, 0x7945197AU }, /* XSUM_XXH32_testdata[2096] */\n    { 1048, 0x9E3779B1U, 0x3C3E4834U }, /* XSUM_XXH32_testdata[2097] */\n    { 1049, 0x00000000U, 0x64DD8B17U }, /* XSUM_XXH32_testdata[2098] */\n    { 1049, 0x9E3779B1U, 0xA23725ABU }, /* XSUM_XXH32_testdata[2099] */\n    { 1050, 0x00000000U, 0xA8E664CEU }, /* XSUM_XXH32_testdata[2100] */\n    { 1050, 0x9E3779B1U, 0x37018E95U }, /* XSUM_XXH32_testdata[2101] */\n    { 1051, 0x00000000U, 0xE2FC3D22U }, /* XSUM_XXH32_testdata[2102] */\n    { 1051, 0x9E3779B1U, 0x0DAAAC18U }, /* XSUM_XXH32_testdata[2103] */\n    { 1052, 0x00000000U, 0x57336162U }, /* XSUM_XXH32_testdata[2104] */\n    { 1052, 0x9E3779B1U, 0x1410CB8AU }, /* XSUM_XXH32_testdata[2105] */\n    { 1053, 0x00000000U, 0xACC8EAA8U }, /* XSUM_XXH32_testdata[2106] */\n    { 1053, 0x9E3779B1U, 0x6B0B55CDU }, /* XSUM_XXH32_testdata[2107] */\n    { 1054, 0x00000000U, 0xF1FDACF5U }, /* XSUM_XXH32_testdata[2108] */\n    { 1054, 0x9E3779B1U, 0x023B6E05U }, /* XSUM_XXH32_testdata[2109] */\n    { 1055, 0x00000000U, 0x9ADE3125U }, /* XSUM_XXH32_testdata[2110] */\n    { 1055, 0x9E3779B1U, 0x21D168B8U }, /* XSUM_XXH32_testdata[2111] */\n    { 1056, 0x00000000U, 0x2360F02DU }, /* XSUM_XXH32_testdata[2112] */\n    { 1056, 0x9E3779B1U, 0x168528ABU }, /* XSUM_XXH32_testdata[2113] */\n    { 1057, 0x00000000U, 0x558C8FBFU }, /* XSUM_XXH32_testdata[2114] */\n    { 1057, 0x9E3779B1U, 0x6277C8FCU }, /* XSUM_XXH32_testdata[2115] */\n    { 1058, 0x00000000U, 0x3972BBDFU }, /* XSUM_XXH32_testdata[2116] */\n    { 1058, 0x9E3779B1U, 0xEC06EA1FU }, /* XSUM_XXH32_testdata[2117] */\n    { 1059, 0x00000000U, 0x5AD25CF0U }, /* XSUM_XXH32_testdata[2118] */\n    { 1059, 0x9E3779B1U, 0xBF038D64U }, /* XSUM_XXH32_testdata[2119] */\n    { 1060, 0x00000000U, 0x87BB3AEDU }, /* XSUM_XXH32_testdata[2120] */\n    { 1060, 0x9E3779B1U, 0xAC417030U }, /* XSUM_XXH32_testdata[2121] */\n    { 1061, 0x00000000U, 0x3CA255CEU }, /* XSUM_XXH32_testdata[2122] */\n    { 1061, 0x9E3779B1U, 0x34BAFD11U }, /* XSUM_XXH32_testdata[2123] */\n    { 1062, 0x00000000U, 0xBFED7A26U }, /* XSUM_XXH32_testdata[2124] */\n    { 1062, 0x9E3779B1U, 0xC2F51083U }, /* XSUM_XXH32_testdata[2125] */\n    { 1063, 0x00000000U, 0x177C5860U }, /* XSUM_XXH32_testdata[2126] */\n    { 1063, 0x9E3779B1U, 0xB008BA49U }, /* XSUM_XXH32_testdata[2127] */\n    { 1064, 0x00000000U, 0xBD827070U }, /* XSUM_XXH32_testdata[2128] */\n    { 1064, 0x9E3779B1U, 0x678934F0U }, /* XSUM_XXH32_testdata[2129] */\n    { 1065, 0x00000000U, 0xB3568AD2U }, /* XSUM_XXH32_testdata[2130] */\n    { 1065, 0x9E3779B1U, 0x67DEDF17U }, /* XSUM_XXH32_testdata[2131] */\n    { 1066, 0x00000000U, 0x82EAE591U }, /* XSUM_XXH32_testdata[2132] */\n    { 1066, 0x9E3779B1U, 0xF36D85BBU }, /* XSUM_XXH32_testdata[2133] */\n    { 1067, 0x00000000U, 0x773A5E32U }, /* XSUM_XXH32_testdata[2134] */\n    { 1067, 0x9E3779B1U, 0x580B1974U }, /* XSUM_XXH32_testdata[2135] */\n    { 1068, 0x00000000U, 0xCA2C3486U }, /* XSUM_XXH32_testdata[2136] */\n    { 1068, 0x9E3779B1U, 0x947F4341U }, /* XSUM_XXH32_testdata[2137] */\n    { 1069, 0x00000000U, 0xFBC29794U }, /* XSUM_XXH32_testdata[2138] */\n    { 1069, 0x9E3779B1U, 0x0D564165U }, /* XSUM_XXH32_testdata[2139] */\n    { 1070, 0x00000000U, 0x34ADD445U }, /* XSUM_XXH32_testdata[2140] */\n    { 1070, 0x9E3779B1U, 0xB3458EB4U }, /* XSUM_XXH32_testdata[2141] */\n    { 1071, 0x00000000U, 0x3D40EE5AU }, /* XSUM_XXH32_testdata[2142] */\n    { 1071, 0x9E3779B1U, 0x51B93541U }, /* XSUM_XXH32_testdata[2143] */\n    { 1072, 0x00000000U, 0x54EE3A70U }, /* XSUM_XXH32_testdata[2144] */\n    { 1072, 0x9E3779B1U, 0x37C0DFCDU }, /* XSUM_XXH32_testdata[2145] */\n    { 1073, 0x00000000U, 0x473346C9U }, /* XSUM_XXH32_testdata[2146] */\n    { 1073, 0x9E3779B1U, 0x10F112D8U }, /* XSUM_XXH32_testdata[2147] */\n    { 1074, 0x00000000U, 0x4AF885E3U }, /* XSUM_XXH32_testdata[2148] */\n    { 1074, 0x9E3779B1U, 0x70044FC2U }, /* XSUM_XXH32_testdata[2149] */\n    { 1075, 0x00000000U, 0x198358B8U }, /* XSUM_XXH32_testdata[2150] */\n    { 1075, 0x9E3779B1U, 0x9294EA2AU }, /* XSUM_XXH32_testdata[2151] */\n    { 1076, 0x00000000U, 0x9DD6EF1AU }, /* XSUM_XXH32_testdata[2152] */\n    { 1076, 0x9E3779B1U, 0x46235CBCU }, /* XSUM_XXH32_testdata[2153] */\n    { 1077, 0x00000000U, 0x4CC83416U }, /* XSUM_XXH32_testdata[2154] */\n    { 1077, 0x9E3779B1U, 0x707C64ECU }, /* XSUM_XXH32_testdata[2155] */\n    { 1078, 0x00000000U, 0x8BDDC22EU }, /* XSUM_XXH32_testdata[2156] */\n    { 1078, 0x9E3779B1U, 0xFF932B8BU }, /* XSUM_XXH32_testdata[2157] */\n    { 1079, 0x00000000U, 0x24144C82U }, /* XSUM_XXH32_testdata[2158] */\n    { 1079, 0x9E3779B1U, 0xBF5B8D89U }, /* XSUM_XXH32_testdata[2159] */\n    { 1080, 0x00000000U, 0x628B9202U }, /* XSUM_XXH32_testdata[2160] */\n    { 1080, 0x9E3779B1U, 0x51139113U }, /* XSUM_XXH32_testdata[2161] */\n    { 1081, 0x00000000U, 0xF5638DCEU }, /* XSUM_XXH32_testdata[2162] */\n    { 1081, 0x9E3779B1U, 0x7025E1D7U }, /* XSUM_XXH32_testdata[2163] */\n    { 1082, 0x00000000U, 0x7FA5BC40U }, /* XSUM_XXH32_testdata[2164] */\n    { 1082, 0x9E3779B1U, 0x359E9DFDU }, /* XSUM_XXH32_testdata[2165] */\n    { 1083, 0x00000000U, 0x5D45BE3BU }, /* XSUM_XXH32_testdata[2166] */\n    { 1083, 0x9E3779B1U, 0x05136309U }, /* XSUM_XXH32_testdata[2167] */\n    { 1084, 0x00000000U, 0xDB9406E9U }, /* XSUM_XXH32_testdata[2168] */\n    { 1084, 0x9E3779B1U, 0xA2F2FB71U }, /* XSUM_XXH32_testdata[2169] */\n    { 1085, 0x00000000U, 0x86CC2786U }, /* XSUM_XXH32_testdata[2170] */\n    { 1085, 0x9E3779B1U, 0xFF60906BU }, /* XSUM_XXH32_testdata[2171] */\n    { 1086, 0x00000000U, 0x7D782445U }, /* XSUM_XXH32_testdata[2172] */\n    { 1086, 0x9E3779B1U, 0x5B819CFDU }, /* XSUM_XXH32_testdata[2173] */\n    { 1087, 0x00000000U, 0xBDF23638U }, /* XSUM_XXH32_testdata[2174] */\n    { 1087, 0x9E3779B1U, 0xA840336EU }, /* XSUM_XXH32_testdata[2175] */\n    { 1088, 0x00000000U, 0x23197D27U }, /* XSUM_XXH32_testdata[2176] */\n    { 1088, 0x9E3779B1U, 0x4C7C9667U }, /* XSUM_XXH32_testdata[2177] */\n    { 1089, 0x00000000U, 0xD8C0B8CCU }, /* XSUM_XXH32_testdata[2178] */\n    { 1089, 0x9E3779B1U, 0x379C7B23U }, /* XSUM_XXH32_testdata[2179] */\n    { 1090, 0x00000000U, 0x17228791U }, /* XSUM_XXH32_testdata[2180] */\n    { 1090, 0x9E3779B1U, 0x61FA775EU }, /* XSUM_XXH32_testdata[2181] */\n    { 1091, 0x00000000U, 0x780389C1U }, /* XSUM_XXH32_testdata[2182] */\n    { 1091, 0x9E3779B1U, 0x73D6B2A1U }, /* XSUM_XXH32_testdata[2183] */\n    { 1092, 0x00000000U, 0x60A4F630U }, /* XSUM_XXH32_testdata[2184] */\n    { 1092, 0x9E3779B1U, 0xBDE591C6U }, /* XSUM_XXH32_testdata[2185] */\n    { 1093, 0x00000000U, 0xDE644393U }, /* XSUM_XXH32_testdata[2186] */\n    { 1093, 0x9E3779B1U, 0x5A500945U }, /* XSUM_XXH32_testdata[2187] */\n    { 1094, 0x00000000U, 0x828B6985U }, /* XSUM_XXH32_testdata[2188] */\n    { 1094, 0x9E3779B1U, 0x4337D8A6U }, /* XSUM_XXH32_testdata[2189] */\n    { 1095, 0x00000000U, 0x8D4BEE0CU }, /* XSUM_XXH32_testdata[2190] */\n    { 1095, 0x9E3779B1U, 0x78107E43U }, /* XSUM_XXH32_testdata[2191] */\n    { 1096, 0x00000000U, 0x6DCEDB65U }, /* XSUM_XXH32_testdata[2192] */\n    { 1096, 0x9E3779B1U, 0x7170920FU }, /* XSUM_XXH32_testdata[2193] */\n    { 1097, 0x00000000U, 0xDE059DC1U }, /* XSUM_XXH32_testdata[2194] */\n    { 1097, 0x9E3779B1U, 0x4B591746U }, /* XSUM_XXH32_testdata[2195] */\n    { 1098, 0x00000000U, 0x651C323AU }, /* XSUM_XXH32_testdata[2196] */\n    { 1098, 0x9E3779B1U, 0xD8919B48U }, /* XSUM_XXH32_testdata[2197] */\n    { 1099, 0x00000000U, 0x29B6CED7U }, /* XSUM_XXH32_testdata[2198] */\n    { 1099, 0x9E3779B1U, 0xCB69A781U }, /* XSUM_XXH32_testdata[2199] */\n    { 1100, 0x00000000U, 0x648280E2U }, /* XSUM_XXH32_testdata[2200] */\n    { 1100, 0x9E3779B1U, 0xA1955AC2U }, /* XSUM_XXH32_testdata[2201] */\n    { 1101, 0x00000000U, 0x10985119U }, /* XSUM_XXH32_testdata[2202] */\n    { 1101, 0x9E3779B1U, 0x89D6293EU }, /* XSUM_XXH32_testdata[2203] */\n    { 1102, 0x00000000U, 0x8D5A31ADU }, /* XSUM_XXH32_testdata[2204] */\n    { 1102, 0x9E3779B1U, 0x365F03FAU }, /* XSUM_XXH32_testdata[2205] */\n    { 1103, 0x00000000U, 0x6939913FU }, /* XSUM_XXH32_testdata[2206] */\n    { 1103, 0x9E3779B1U, 0xD066F511U }, /* XSUM_XXH32_testdata[2207] */\n    { 1104, 0x00000000U, 0xD9EBC27CU }, /* XSUM_XXH32_testdata[2208] */\n    { 1104, 0x9E3779B1U, 0x07CCDEECU }, /* XSUM_XXH32_testdata[2209] */\n    { 1105, 0x00000000U, 0x45DCD964U }, /* XSUM_XXH32_testdata[2210] */\n    { 1105, 0x9E3779B1U, 0x7B4B66E2U }, /* XSUM_XXH32_testdata[2211] */\n    { 1106, 0x00000000U, 0xD214E256U }, /* XSUM_XXH32_testdata[2212] */\n    { 1106, 0x9E3779B1U, 0x74A40958U }, /* XSUM_XXH32_testdata[2213] */\n    { 1107, 0x00000000U, 0x9329C598U }, /* XSUM_XXH32_testdata[2214] */\n    { 1107, 0x9E3779B1U, 0x8DC68A56U }, /* XSUM_XXH32_testdata[2215] */\n    { 1108, 0x00000000U, 0x43C5D077U }, /* XSUM_XXH32_testdata[2216] */\n    { 1108, 0x9E3779B1U, 0x328844F5U }, /* XSUM_XXH32_testdata[2217] */\n    { 1109, 0x00000000U, 0xDF2535E4U }, /* XSUM_XXH32_testdata[2218] */\n    { 1109, 0x9E3779B1U, 0xD1ACD1CFU }, /* XSUM_XXH32_testdata[2219] */\n    { 1110, 0x00000000U, 0xDE6CE5DBU }, /* XSUM_XXH32_testdata[2220] */\n    { 1110, 0x9E3779B1U, 0x0E2B868FU }, /* XSUM_XXH32_testdata[2221] */\n    { 1111, 0x00000000U, 0xAB308EBDU }, /* XSUM_XXH32_testdata[2222] */\n    { 1111, 0x9E3779B1U, 0xF35DE130U }, /* XSUM_XXH32_testdata[2223] */\n    { 1112, 0x00000000U, 0xAD69BA13U }, /* XSUM_XXH32_testdata[2224] */\n    { 1112, 0x9E3779B1U, 0x8A9C5F48U }, /* XSUM_XXH32_testdata[2225] */\n    { 1113, 0x00000000U, 0xDD3CC30BU }, /* XSUM_XXH32_testdata[2226] */\n    { 1113, 0x9E3779B1U, 0x6920848BU }, /* XSUM_XXH32_testdata[2227] */\n    { 1114, 0x00000000U, 0xBB8E77EDU }, /* XSUM_XXH32_testdata[2228] */\n    { 1114, 0x9E3779B1U, 0xD3FE90DDU }, /* XSUM_XXH32_testdata[2229] */\n    { 1115, 0x00000000U, 0x082F674CU }, /* XSUM_XXH32_testdata[2230] */\n    { 1115, 0x9E3779B1U, 0x3A405F30U }, /* XSUM_XXH32_testdata[2231] */\n    { 1116, 0x00000000U, 0xAED38B9FU }, /* XSUM_XXH32_testdata[2232] */\n    { 1116, 0x9E3779B1U, 0x275E3165U }, /* XSUM_XXH32_testdata[2233] */\n    { 1117, 0x00000000U, 0x93E3C004U }, /* XSUM_XXH32_testdata[2234] */\n    { 1117, 0x9E3779B1U, 0xAD6D4403U }, /* XSUM_XXH32_testdata[2235] */\n    { 1118, 0x00000000U, 0x47B760C6U }, /* XSUM_XXH32_testdata[2236] */\n    { 1118, 0x9E3779B1U, 0x2E1601C6U }, /* XSUM_XXH32_testdata[2237] */\n    { 1119, 0x00000000U, 0x16BC49ABU }, /* XSUM_XXH32_testdata[2238] */\n    { 1119, 0x9E3779B1U, 0x5EA405B9U }, /* XSUM_XXH32_testdata[2239] */\n    { 1120, 0x00000000U, 0xC59EC900U }, /* XSUM_XXH32_testdata[2240] */\n    { 1120, 0x9E3779B1U, 0xB34C0AD4U }, /* XSUM_XXH32_testdata[2241] */\n    { 1121, 0x00000000U, 0xF32BE6D8U }, /* XSUM_XXH32_testdata[2242] */\n    { 1121, 0x9E3779B1U, 0x0C7A26CBU }, /* XSUM_XXH32_testdata[2243] */\n    { 1122, 0x00000000U, 0xCD4DEB83U }, /* XSUM_XXH32_testdata[2244] */\n    { 1122, 0x9E3779B1U, 0xD9B6086FU }, /* XSUM_XXH32_testdata[2245] */\n    { 1123, 0x00000000U, 0x5B563DB9U }, /* XSUM_XXH32_testdata[2246] */\n    { 1123, 0x9E3779B1U, 0x8F011FEAU }, /* XSUM_XXH32_testdata[2247] */\n    { 1124, 0x00000000U, 0x1D7BF599U }, /* XSUM_XXH32_testdata[2248] */\n    { 1124, 0x9E3779B1U, 0x4A2D8907U }, /* XSUM_XXH32_testdata[2249] */\n    { 1125, 0x00000000U, 0xC73448C3U }, /* XSUM_XXH32_testdata[2250] */\n    { 1125, 0x9E3779B1U, 0xB8578745U }, /* XSUM_XXH32_testdata[2251] */\n    { 1126, 0x00000000U, 0x9681D013U }, /* XSUM_XXH32_testdata[2252] */\n    { 1126, 0x9E3779B1U, 0x9FBAE5F8U }, /* XSUM_XXH32_testdata[2253] */\n    { 1127, 0x00000000U, 0x7BD19AF8U }, /* XSUM_XXH32_testdata[2254] */\n    { 1127, 0x9E3779B1U, 0x62760CFCU }, /* XSUM_XXH32_testdata[2255] */\n    { 1128, 0x00000000U, 0x6792051DU }, /* XSUM_XXH32_testdata[2256] */\n    { 1128, 0x9E3779B1U, 0x2686447DU }, /* XSUM_XXH32_testdata[2257] */\n    { 1129, 0x00000000U, 0xAC7AC7A8U }, /* XSUM_XXH32_testdata[2258] */\n    { 1129, 0x9E3779B1U, 0x52E3F07AU }, /* XSUM_XXH32_testdata[2259] */\n    { 1130, 0x00000000U, 0x652C2B30U }, /* XSUM_XXH32_testdata[2260] */\n    { 1130, 0x9E3779B1U, 0x19F9FD83U }, /* XSUM_XXH32_testdata[2261] */\n    { 1131, 0x00000000U, 0x9657F7D2U }, /* XSUM_XXH32_testdata[2262] */\n    { 1131, 0x9E3779B1U, 0xB87E2204U }, /* XSUM_XXH32_testdata[2263] */\n    { 1132, 0x00000000U, 0x105D2302U }, /* XSUM_XXH32_testdata[2264] */\n    { 1132, 0x9E3779B1U, 0x0CEC52C5U }, /* XSUM_XXH32_testdata[2265] */\n    { 1133, 0x00000000U, 0xB6D388D0U }, /* XSUM_XXH32_testdata[2266] */\n    { 1133, 0x9E3779B1U, 0x29D2E495U }, /* XSUM_XXH32_testdata[2267] */\n    { 1134, 0x00000000U, 0x02009A0CU }, /* XSUM_XXH32_testdata[2268] */\n    { 1134, 0x9E3779B1U, 0x8455DE4DU }, /* XSUM_XXH32_testdata[2269] */\n    { 1135, 0x00000000U, 0x2236051CU }, /* XSUM_XXH32_testdata[2270] */\n    { 1135, 0x9E3779B1U, 0xED09AEA1U }, /* XSUM_XXH32_testdata[2271] */\n    { 1136, 0x00000000U, 0x14C19087U }, /* XSUM_XXH32_testdata[2272] */\n    { 1136, 0x9E3779B1U, 0x43853C21U }, /* XSUM_XXH32_testdata[2273] */\n    { 1137, 0x00000000U, 0xC5142F70U }, /* XSUM_XXH32_testdata[2274] */\n    { 1137, 0x9E3779B1U, 0x0F8730F4U }, /* XSUM_XXH32_testdata[2275] */\n    { 1138, 0x00000000U, 0x8F701CBFU }, /* XSUM_XXH32_testdata[2276] */\n    { 1138, 0x9E3779B1U, 0x0532601BU }, /* XSUM_XXH32_testdata[2277] */\n    { 1139, 0x00000000U, 0x0F9FE493U }, /* XSUM_XXH32_testdata[2278] */\n    { 1139, 0x9E3779B1U, 0xB0C649ACU }, /* XSUM_XXH32_testdata[2279] */\n    { 1140, 0x00000000U, 0xF76EC761U }, /* XSUM_XXH32_testdata[2280] */\n    { 1140, 0x9E3779B1U, 0x4E489FB2U }, /* XSUM_XXH32_testdata[2281] */\n    { 1141, 0x00000000U, 0xAAC872F2U }, /* XSUM_XXH32_testdata[2282] */\n    { 1141, 0x9E3779B1U, 0xD5235209U }, /* XSUM_XXH32_testdata[2283] */\n    { 1142, 0x00000000U, 0x0FA2BBA4U }, /* XSUM_XXH32_testdata[2284] */\n    { 1142, 0x9E3779B1U, 0x832FF451U }, /* XSUM_XXH32_testdata[2285] */\n    { 1143, 0x00000000U, 0x1AD96E36U }, /* XSUM_XXH32_testdata[2286] */\n    { 1143, 0x9E3779B1U, 0x6F3E9DFDU }, /* XSUM_XXH32_testdata[2287] */\n    { 1144, 0x00000000U, 0x1423AEDFU }, /* XSUM_XXH32_testdata[2288] */\n    { 1144, 0x9E3779B1U, 0x4629D110U }, /* XSUM_XXH32_testdata[2289] */\n    { 1145, 0x00000000U, 0xB06A1AB2U }, /* XSUM_XXH32_testdata[2290] */\n    { 1145, 0x9E3779B1U, 0x29560AD3U }, /* XSUM_XXH32_testdata[2291] */\n    { 1146, 0x00000000U, 0xD3115493U }, /* XSUM_XXH32_testdata[2292] */\n    { 1146, 0x9E3779B1U, 0x47214197U }, /* XSUM_XXH32_testdata[2293] */\n    { 1147, 0x00000000U, 0xDA9EF2B5U }, /* XSUM_XXH32_testdata[2294] */\n    { 1147, 0x9E3779B1U, 0xBB23D7ABU }, /* XSUM_XXH32_testdata[2295] */\n    { 1148, 0x00000000U, 0xB8CD0CC8U }, /* XSUM_XXH32_testdata[2296] */\n    { 1148, 0x9E3779B1U, 0x78D65EB7U }, /* XSUM_XXH32_testdata[2297] */\n    { 1149, 0x00000000U, 0xA81E9D5DU }, /* XSUM_XXH32_testdata[2298] */\n    { 1149, 0x9E3779B1U, 0x41651ADCU }, /* XSUM_XXH32_testdata[2299] */\n    { 1150, 0x00000000U, 0x1C36D26CU }, /* XSUM_XXH32_testdata[2300] */\n    { 1150, 0x9E3779B1U, 0x60886177U }, /* XSUM_XXH32_testdata[2301] */\n    { 1151, 0x00000000U, 0x1D6A7DBAU }, /* XSUM_XXH32_testdata[2302] */\n    { 1151, 0x9E3779B1U, 0xD83BE4A6U }, /* XSUM_XXH32_testdata[2303] */\n    { 1152, 0x00000000U, 0x8939EF84U }, /* XSUM_XXH32_testdata[2304] */\n    { 1152, 0x9E3779B1U, 0x213932A9U }, /* XSUM_XXH32_testdata[2305] */\n    { 1153, 0x00000000U, 0x99A1AF03U }, /* XSUM_XXH32_testdata[2306] */\n    { 1153, 0x9E3779B1U, 0x2DB68808U }, /* XSUM_XXH32_testdata[2307] */\n    { 1154, 0x00000000U, 0x4AAD569FU }, /* XSUM_XXH32_testdata[2308] */\n    { 1154, 0x9E3779B1U, 0x332B51DDU }, /* XSUM_XXH32_testdata[2309] */\n    { 1155, 0x00000000U, 0x60F26E61U }, /* XSUM_XXH32_testdata[2310] */\n    { 1155, 0x9E3779B1U, 0xDB739023U }, /* XSUM_XXH32_testdata[2311] */\n    { 1156, 0x00000000U, 0x6F82F443U }, /* XSUM_XXH32_testdata[2312] */\n    { 1156, 0x9E3779B1U, 0xC8431321U }, /* XSUM_XXH32_testdata[2313] */\n    { 1157, 0x00000000U, 0x4E6E2FD0U }, /* XSUM_XXH32_testdata[2314] */\n    { 1157, 0x9E3779B1U, 0xD60B4DA7U }, /* XSUM_XXH32_testdata[2315] */\n    { 1158, 0x00000000U, 0xD205E3BFU }, /* XSUM_XXH32_testdata[2316] */\n    { 1158, 0x9E3779B1U, 0xC453C261U }, /* XSUM_XXH32_testdata[2317] */\n    { 1159, 0x00000000U, 0x17B4C147U }, /* XSUM_XXH32_testdata[2318] */\n    { 1159, 0x9E3779B1U, 0x895E5CA0U }, /* XSUM_XXH32_testdata[2319] */\n    { 1160, 0x00000000U, 0x16CF7D89U }, /* XSUM_XXH32_testdata[2320] */\n    { 1160, 0x9E3779B1U, 0x3FCBE48BU }, /* XSUM_XXH32_testdata[2321] */\n    { 1161, 0x00000000U, 0x6EA386C2U }, /* XSUM_XXH32_testdata[2322] */\n    { 1161, 0x9E3779B1U, 0xAA9F4BC1U }, /* XSUM_XXH32_testdata[2323] */\n    { 1162, 0x00000000U, 0x755960F2U }, /* XSUM_XXH32_testdata[2324] */\n    { 1162, 0x9E3779B1U, 0xA5615BF2U }, /* XSUM_XXH32_testdata[2325] */\n    { 1163, 0x00000000U, 0xC93F7546U }, /* XSUM_XXH32_testdata[2326] */\n    { 1163, 0x9E3779B1U, 0xEE990ECEU }, /* XSUM_XXH32_testdata[2327] */\n    { 1164, 0x00000000U, 0xE79AA5FAU }, /* XSUM_XXH32_testdata[2328] */\n    { 1164, 0x9E3779B1U, 0xBF7C1F8CU }, /* XSUM_XXH32_testdata[2329] */\n    { 1165, 0x00000000U, 0x1BF68339U }, /* XSUM_XXH32_testdata[2330] */\n    { 1165, 0x9E3779B1U, 0x4F4ACACEU }, /* XSUM_XXH32_testdata[2331] */\n    { 1166, 0x00000000U, 0x83069E82U }, /* XSUM_XXH32_testdata[2332] */\n    { 1166, 0x9E3779B1U, 0xE0816A0FU }, /* XSUM_XXH32_testdata[2333] */\n    { 1167, 0x00000000U, 0x8C7CF7E6U }, /* XSUM_XXH32_testdata[2334] */\n    { 1167, 0x9E3779B1U, 0x60CD3724U }, /* XSUM_XXH32_testdata[2335] */\n    { 1168, 0x00000000U, 0x37A453D3U }, /* XSUM_XXH32_testdata[2336] */\n    { 1168, 0x9E3779B1U, 0xD6A5CEABU }, /* XSUM_XXH32_testdata[2337] */\n    { 1169, 0x00000000U, 0xA130C800U }, /* XSUM_XXH32_testdata[2338] */\n    { 1169, 0x9E3779B1U, 0xA9CDFD7BU }, /* XSUM_XXH32_testdata[2339] */\n    { 1170, 0x00000000U, 0x1EA973ABU }, /* XSUM_XXH32_testdata[2340] */\n    { 1170, 0x9E3779B1U, 0xCF888F1BU }, /* XSUM_XXH32_testdata[2341] */\n    { 1171, 0x00000000U, 0x5202D829U }, /* XSUM_XXH32_testdata[2342] */\n    { 1171, 0x9E3779B1U, 0xF36A38CAU }, /* XSUM_XXH32_testdata[2343] */\n    { 1172, 0x00000000U, 0xF8F63A3DU }, /* XSUM_XXH32_testdata[2344] */\n    { 1172, 0x9E3779B1U, 0xE9BA638AU }, /* XSUM_XXH32_testdata[2345] */\n    { 1173, 0x00000000U, 0xD4C6B4F2U }, /* XSUM_XXH32_testdata[2346] */\n    { 1173, 0x9E3779B1U, 0x479F41F6U }, /* XSUM_XXH32_testdata[2347] */\n    { 1174, 0x00000000U, 0xE0DE6614U }, /* XSUM_XXH32_testdata[2348] */\n    { 1174, 0x9E3779B1U, 0x43C7C3B2U }, /* XSUM_XXH32_testdata[2349] */\n    { 1175, 0x00000000U, 0xD0038ACEU }, /* XSUM_XXH32_testdata[2350] */\n    { 1175, 0x9E3779B1U, 0x2EA445FCU }, /* XSUM_XXH32_testdata[2351] */\n    { 1176, 0x00000000U, 0x51236C50U }, /* XSUM_XXH32_testdata[2352] */\n    { 1176, 0x9E3779B1U, 0x6C93A64CU }, /* XSUM_XXH32_testdata[2353] */\n    { 1177, 0x00000000U, 0x77279DADU }, /* XSUM_XXH32_testdata[2354] */\n    { 1177, 0x9E3779B1U, 0x2CDB5679U }, /* XSUM_XXH32_testdata[2355] */\n    { 1178, 0x00000000U, 0x69730B90U }, /* XSUM_XXH32_testdata[2356] */\n    { 1178, 0x9E3779B1U, 0x27787C9FU }, /* XSUM_XXH32_testdata[2357] */\n    { 1179, 0x00000000U, 0x5441912EU }, /* XSUM_XXH32_testdata[2358] */\n    { 1179, 0x9E3779B1U, 0x71A64E8BU }, /* XSUM_XXH32_testdata[2359] */\n    { 1180, 0x00000000U, 0xEBE71841U }, /* XSUM_XXH32_testdata[2360] */\n    { 1180, 0x9E3779B1U, 0x000F3EBAU }, /* XSUM_XXH32_testdata[2361] */\n    { 1181, 0x00000000U, 0x7200E618U }, /* XSUM_XXH32_testdata[2362] */\n    { 1181, 0x9E3779B1U, 0xE9A76CC3U }, /* XSUM_XXH32_testdata[2363] */\n    { 1182, 0x00000000U, 0x7B0E020FU }, /* XSUM_XXH32_testdata[2364] */\n    { 1182, 0x9E3779B1U, 0xD92D1012U }, /* XSUM_XXH32_testdata[2365] */\n    { 1183, 0x00000000U, 0x4A8311BFU }, /* XSUM_XXH32_testdata[2366] */\n    { 1183, 0x9E3779B1U, 0xD77133BFU }, /* XSUM_XXH32_testdata[2367] */\n    { 1184, 0x00000000U, 0x3BC2EE12U }, /* XSUM_XXH32_testdata[2368] */\n    { 1184, 0x9E3779B1U, 0x91A24B1DU }, /* XSUM_XXH32_testdata[2369] */\n    { 1185, 0x00000000U, 0x7C1E4330U }, /* XSUM_XXH32_testdata[2370] */\n    { 1185, 0x9E3779B1U, 0x3D0954DFU }, /* XSUM_XXH32_testdata[2371] */\n    { 1186, 0x00000000U, 0x871B4E42U }, /* XSUM_XXH32_testdata[2372] */\n    { 1186, 0x9E3779B1U, 0xA3540010U }, /* XSUM_XXH32_testdata[2373] */\n    { 1187, 0x00000000U, 0x150BAECFU }, /* XSUM_XXH32_testdata[2374] */\n    { 1187, 0x9E3779B1U, 0x0A9DFC4BU }, /* XSUM_XXH32_testdata[2375] */\n    { 1188, 0x00000000U, 0xEB16B50BU }, /* XSUM_XXH32_testdata[2376] */\n    { 1188, 0x9E3779B1U, 0xF33EA1FFU }, /* XSUM_XXH32_testdata[2377] */\n    { 1189, 0x00000000U, 0x98F0B37BU }, /* XSUM_XXH32_testdata[2378] */\n    { 1189, 0x9E3779B1U, 0xEF1F676FU }, /* XSUM_XXH32_testdata[2379] */\n    { 1190, 0x00000000U, 0x27B6AA12U }, /* XSUM_XXH32_testdata[2380] */\n    { 1190, 0x9E3779B1U, 0xFE0046B3U }, /* XSUM_XXH32_testdata[2381] */\n    { 1191, 0x00000000U, 0xABC6CCFAU }, /* XSUM_XXH32_testdata[2382] */\n    { 1191, 0x9E3779B1U, 0x32570C88U }, /* XSUM_XXH32_testdata[2383] */\n    { 1192, 0x00000000U, 0x25887CC5U }, /* XSUM_XXH32_testdata[2384] */\n    { 1192, 0x9E3779B1U, 0x9A9BFBBCU }, /* XSUM_XXH32_testdata[2385] */\n    { 1193, 0x00000000U, 0x33BA8F99U }, /* XSUM_XXH32_testdata[2386] */\n    { 1193, 0x9E3779B1U, 0x6A79A1D1U }, /* XSUM_XXH32_testdata[2387] */\n    { 1194, 0x00000000U, 0xC544328AU }, /* XSUM_XXH32_testdata[2388] */\n    { 1194, 0x9E3779B1U, 0xE0C08B6EU }, /* XSUM_XXH32_testdata[2389] */\n    { 1195, 0x00000000U, 0x87AB1EE7U }, /* XSUM_XXH32_testdata[2390] */\n    { 1195, 0x9E3779B1U, 0xF83CCDB5U }, /* XSUM_XXH32_testdata[2391] */\n    { 1196, 0x00000000U, 0x5F78223FU }, /* XSUM_XXH32_testdata[2392] */\n    { 1196, 0x9E3779B1U, 0x9E63E1DAU }, /* XSUM_XXH32_testdata[2393] */\n    { 1197, 0x00000000U, 0xE60493C9U }, /* XSUM_XXH32_testdata[2394] */\n    { 1197, 0x9E3779B1U, 0xD9933DC9U }, /* XSUM_XXH32_testdata[2395] */\n    { 1198, 0x00000000U, 0x69D8E4F9U }, /* XSUM_XXH32_testdata[2396] */\n    { 1198, 0x9E3779B1U, 0xBC11B3EDU }, /* XSUM_XXH32_testdata[2397] */\n    { 1199, 0x00000000U, 0xE9F0E205U }, /* XSUM_XXH32_testdata[2398] */\n    { 1199, 0x9E3779B1U, 0x7D96B61DU }, /* XSUM_XXH32_testdata[2399] */\n    { 1200, 0x00000000U, 0x3837ED71U }, /* XSUM_XXH32_testdata[2400] */\n    { 1200, 0x9E3779B1U, 0xB8E1DD53U }, /* XSUM_XXH32_testdata[2401] */\n    { 1201, 0x00000000U, 0xFC4619C6U }, /* XSUM_XXH32_testdata[2402] */\n    { 1201, 0x9E3779B1U, 0x19EF8948U }, /* XSUM_XXH32_testdata[2403] */\n    { 1202, 0x00000000U, 0xB4695527U }, /* XSUM_XXH32_testdata[2404] */\n    { 1202, 0x9E3779B1U, 0xDE11A2FBU }, /* XSUM_XXH32_testdata[2405] */\n    { 1203, 0x00000000U, 0x7D08BED9U }, /* XSUM_XXH32_testdata[2406] */\n    { 1203, 0x9E3779B1U, 0x5735FA80U }, /* XSUM_XXH32_testdata[2407] */\n    { 1204, 0x00000000U, 0x88D2712BU }, /* XSUM_XXH32_testdata[2408] */\n    { 1204, 0x9E3779B1U, 0xA7EDB85DU }, /* XSUM_XXH32_testdata[2409] */\n    { 1205, 0x00000000U, 0x710A2AA7U }, /* XSUM_XXH32_testdata[2410] */\n    { 1205, 0x9E3779B1U, 0x41B50419U }, /* XSUM_XXH32_testdata[2411] */\n    { 1206, 0x00000000U, 0x356F2AC2U }, /* XSUM_XXH32_testdata[2412] */\n    { 1206, 0x9E3779B1U, 0xCD13BFBCU }, /* XSUM_XXH32_testdata[2413] */\n    { 1207, 0x00000000U, 0xCF6089DEU }, /* XSUM_XXH32_testdata[2414] */\n    { 1207, 0x9E3779B1U, 0x64F9EEAAU }, /* XSUM_XXH32_testdata[2415] */\n    { 1208, 0x00000000U, 0xE7BC737BU }, /* XSUM_XXH32_testdata[2416] */\n    { 1208, 0x9E3779B1U, 0x843C0F46U }, /* XSUM_XXH32_testdata[2417] */\n    { 1209, 0x00000000U, 0x77951332U }, /* XSUM_XXH32_testdata[2418] */\n    { 1209, 0x9E3779B1U, 0x067CE62AU }, /* XSUM_XXH32_testdata[2419] */\n    { 1210, 0x00000000U, 0xE5E13970U }, /* XSUM_XXH32_testdata[2420] */\n    { 1210, 0x9E3779B1U, 0xECFCFD62U }, /* XSUM_XXH32_testdata[2421] */\n    { 1211, 0x00000000U, 0xD0FC61AFU }, /* XSUM_XXH32_testdata[2422] */\n    { 1211, 0x9E3779B1U, 0x700BBC98U }, /* XSUM_XXH32_testdata[2423] */\n    { 1212, 0x00000000U, 0x50EFB786U }, /* XSUM_XXH32_testdata[2424] */\n    { 1212, 0x9E3779B1U, 0x837A46F8U }, /* XSUM_XXH32_testdata[2425] */\n    { 1213, 0x00000000U, 0x42A74DCDU }, /* XSUM_XXH32_testdata[2426] */\n    { 1213, 0x9E3779B1U, 0x5B3253E2U }, /* XSUM_XXH32_testdata[2427] */\n    { 1214, 0x00000000U, 0x8A993EB7U }, /* XSUM_XXH32_testdata[2428] */\n    { 1214, 0x9E3779B1U, 0x52B27341U }, /* XSUM_XXH32_testdata[2429] */\n    { 1215, 0x00000000U, 0x1AFEB769U }, /* XSUM_XXH32_testdata[2430] */\n    { 1215, 0x9E3779B1U, 0x8EE2261FU }, /* XSUM_XXH32_testdata[2431] */\n    { 1216, 0x00000000U, 0x32378261U }, /* XSUM_XXH32_testdata[2432] */\n    { 1216, 0x9E3779B1U, 0x83790135U }, /* XSUM_XXH32_testdata[2433] */\n    { 1217, 0x00000000U, 0xFF983CBBU }, /* XSUM_XXH32_testdata[2434] */\n    { 1217, 0x9E3779B1U, 0x4DD6F776U }, /* XSUM_XXH32_testdata[2435] */\n    { 1218, 0x00000000U, 0x7A16A07EU }, /* XSUM_XXH32_testdata[2436] */\n    { 1218, 0x9E3779B1U, 0xF0B4B626U }, /* XSUM_XXH32_testdata[2437] */\n    { 1219, 0x00000000U, 0xE8FB831BU }, /* XSUM_XXH32_testdata[2438] */\n    { 1219, 0x9E3779B1U, 0x2B56D3E6U }, /* XSUM_XXH32_testdata[2439] */\n    { 1220, 0x00000000U, 0x76B95829U }, /* XSUM_XXH32_testdata[2440] */\n    { 1220, 0x9E3779B1U, 0x74BCFD94U }, /* XSUM_XXH32_testdata[2441] */\n    { 1221, 0x00000000U, 0x8B37590EU }, /* XSUM_XXH32_testdata[2442] */\n    { 1221, 0x9E3779B1U, 0x97291E81U }, /* XSUM_XXH32_testdata[2443] */\n    { 1222, 0x00000000U, 0x6262F879U }, /* XSUM_XXH32_testdata[2444] */\n    { 1222, 0x9E3779B1U, 0xB9E152C9U }, /* XSUM_XXH32_testdata[2445] */\n    { 1223, 0x00000000U, 0x5BEB836AU }, /* XSUM_XXH32_testdata[2446] */\n    { 1223, 0x9E3779B1U, 0xBA412E6AU }, /* XSUM_XXH32_testdata[2447] */\n    { 1224, 0x00000000U, 0xB0D158EEU }, /* XSUM_XXH32_testdata[2448] */\n    { 1224, 0x9E3779B1U, 0xC7AD3C4EU }, /* XSUM_XXH32_testdata[2449] */\n    { 1225, 0x00000000U, 0x0BC682CFU }, /* XSUM_XXH32_testdata[2450] */\n    { 1225, 0x9E3779B1U, 0x43AB19D1U }, /* XSUM_XXH32_testdata[2451] */\n    { 1226, 0x00000000U, 0x89B07639U }, /* XSUM_XXH32_testdata[2452] */\n    { 1226, 0x9E3779B1U, 0xE60EC963U }, /* XSUM_XXH32_testdata[2453] */\n    { 1227, 0x00000000U, 0x8650C70AU }, /* XSUM_XXH32_testdata[2454] */\n    { 1227, 0x9E3779B1U, 0xB02C48C6U }, /* XSUM_XXH32_testdata[2455] */\n    { 1228, 0x00000000U, 0x2509FFFEU }, /* XSUM_XXH32_testdata[2456] */\n    { 1228, 0x9E3779B1U, 0xC1897133U }, /* XSUM_XXH32_testdata[2457] */\n    { 1229, 0x00000000U, 0x380B923CU }, /* XSUM_XXH32_testdata[2458] */\n    { 1229, 0x9E3779B1U, 0xF444AB6CU }, /* XSUM_XXH32_testdata[2459] */\n    { 1230, 0x00000000U, 0xE1A7E33EU }, /* XSUM_XXH32_testdata[2460] */\n    { 1230, 0x9E3779B1U, 0xC0576797U }, /* XSUM_XXH32_testdata[2461] */\n    { 1231, 0x00000000U, 0x576DA834U }, /* XSUM_XXH32_testdata[2462] */\n    { 1231, 0x9E3779B1U, 0x06787E9BU }, /* XSUM_XXH32_testdata[2463] */\n    { 1232, 0x00000000U, 0x34370BCDU }, /* XSUM_XXH32_testdata[2464] */\n    { 1232, 0x9E3779B1U, 0x5FB3307DU }, /* XSUM_XXH32_testdata[2465] */\n    { 1233, 0x00000000U, 0x5890D760U }, /* XSUM_XXH32_testdata[2466] */\n    { 1233, 0x9E3779B1U, 0xF7C1AF2FU }, /* XSUM_XXH32_testdata[2467] */\n    { 1234, 0x00000000U, 0x73E0A073U }, /* XSUM_XXH32_testdata[2468] */\n    { 1234, 0x9E3779B1U, 0x2BD51E0EU }, /* XSUM_XXH32_testdata[2469] */\n    { 1235, 0x00000000U, 0xFA5A819CU }, /* XSUM_XXH32_testdata[2470] */\n    { 1235, 0x9E3779B1U, 0xFE0A936FU }, /* XSUM_XXH32_testdata[2471] */\n    { 1236, 0x00000000U, 0x66E90262U }, /* XSUM_XXH32_testdata[2472] */\n    { 1236, 0x9E3779B1U, 0xB22E5BB5U }, /* XSUM_XXH32_testdata[2473] */\n    { 1237, 0x00000000U, 0xA4F94E8AU }, /* XSUM_XXH32_testdata[2474] */\n    { 1237, 0x9E3779B1U, 0xAC47F02CU }, /* XSUM_XXH32_testdata[2475] */\n    { 1238, 0x00000000U, 0x70E2CCF2U }, /* XSUM_XXH32_testdata[2476] */\n    { 1238, 0x9E3779B1U, 0xE66DA26CU }, /* XSUM_XXH32_testdata[2477] */\n    { 1239, 0x00000000U, 0x1C5AC9ADU }, /* XSUM_XXH32_testdata[2478] */\n    { 1239, 0x9E3779B1U, 0x1CB4A6ACU }, /* XSUM_XXH32_testdata[2479] */\n    { 1240, 0x00000000U, 0x388F8391U }, /* XSUM_XXH32_testdata[2480] */\n    { 1240, 0x9E3779B1U, 0x91060E92U }, /* XSUM_XXH32_testdata[2481] */\n    { 1241, 0x00000000U, 0x23FFA3FEU }, /* XSUM_XXH32_testdata[2482] */\n    { 1241, 0x9E3779B1U, 0x3A416412U }, /* XSUM_XXH32_testdata[2483] */\n    { 1242, 0x00000000U, 0x251FFE0AU }, /* XSUM_XXH32_testdata[2484] */\n    { 1242, 0x9E3779B1U, 0x2E9FA9BEU }, /* XSUM_XXH32_testdata[2485] */\n    { 1243, 0x00000000U, 0x74585D9CU }, /* XSUM_XXH32_testdata[2486] */\n    { 1243, 0x9E3779B1U, 0xCD1B299AU }, /* XSUM_XXH32_testdata[2487] */\n    { 1244, 0x00000000U, 0x67E4FD06U }, /* XSUM_XXH32_testdata[2488] */\n    { 1244, 0x9E3779B1U, 0x13E07EDDU }, /* XSUM_XXH32_testdata[2489] */\n    { 1245, 0x00000000U, 0x629BF7D8U }, /* XSUM_XXH32_testdata[2490] */\n    { 1245, 0x9E3779B1U, 0xCD7B95CFU }, /* XSUM_XXH32_testdata[2491] */\n    { 1246, 0x00000000U, 0xE19E25CAU }, /* XSUM_XXH32_testdata[2492] */\n    { 1246, 0x9E3779B1U, 0x7BED7559U }, /* XSUM_XXH32_testdata[2493] */\n    { 1247, 0x00000000U, 0x28770A98U }, /* XSUM_XXH32_testdata[2494] */\n    { 1247, 0x9E3779B1U, 0xF8C689C3U }, /* XSUM_XXH32_testdata[2495] */\n    { 1248, 0x00000000U, 0x53636FA6U }, /* XSUM_XXH32_testdata[2496] */\n    { 1248, 0x9E3779B1U, 0xBCD974FEU }, /* XSUM_XXH32_testdata[2497] */\n    { 1249, 0x00000000U, 0x995EE694U }, /* XSUM_XXH32_testdata[2498] */\n    { 1249, 0x9E3779B1U, 0xDE6D2059U }, /* XSUM_XXH32_testdata[2499] */\n    { 1250, 0x00000000U, 0x5727421AU }, /* XSUM_XXH32_testdata[2500] */\n    { 1250, 0x9E3779B1U, 0x99F8CA7CU }, /* XSUM_XXH32_testdata[2501] */\n    { 1251, 0x00000000U, 0x8E9171A5U }, /* XSUM_XXH32_testdata[2502] */\n    { 1251, 0x9E3779B1U, 0xFD502552U }, /* XSUM_XXH32_testdata[2503] */\n    { 1252, 0x00000000U, 0x17B3A980U }, /* XSUM_XXH32_testdata[2504] */\n    { 1252, 0x9E3779B1U, 0x574E9EF9U }, /* XSUM_XXH32_testdata[2505] */\n    { 1253, 0x00000000U, 0xEC51217CU }, /* XSUM_XXH32_testdata[2506] */\n    { 1253, 0x9E3779B1U, 0x8DC0D26FU }, /* XSUM_XXH32_testdata[2507] */\n    { 1254, 0x00000000U, 0x411271CFU }, /* XSUM_XXH32_testdata[2508] */\n    { 1254, 0x9E3779B1U, 0xE25435A0U }, /* XSUM_XXH32_testdata[2509] */\n    { 1255, 0x00000000U, 0x664FB4F9U }, /* XSUM_XXH32_testdata[2510] */\n    { 1255, 0x9E3779B1U, 0xF91B6733U }, /* XSUM_XXH32_testdata[2511] */\n    { 1256, 0x00000000U, 0x1FD58D25U }, /* XSUM_XXH32_testdata[2512] */\n    { 1256, 0x9E3779B1U, 0x073F8259U }, /* XSUM_XXH32_testdata[2513] */\n    { 1257, 0x00000000U, 0x5CF6EC0DU }, /* XSUM_XXH32_testdata[2514] */\n    { 1257, 0x9E3779B1U, 0xDE1860E3U }, /* XSUM_XXH32_testdata[2515] */\n    { 1258, 0x00000000U, 0xAB8872F8U }, /* XSUM_XXH32_testdata[2516] */\n    { 1258, 0x9E3779B1U, 0x840A1DABU }, /* XSUM_XXH32_testdata[2517] */\n    { 1259, 0x00000000U, 0xF543FDE0U }, /* XSUM_XXH32_testdata[2518] */\n    { 1259, 0x9E3779B1U, 0xC2C19E71U }, /* XSUM_XXH32_testdata[2519] */\n    { 1260, 0x00000000U, 0x2487744CU }, /* XSUM_XXH32_testdata[2520] */\n    { 1260, 0x9E3779B1U, 0x133A67A2U }, /* XSUM_XXH32_testdata[2521] */\n    { 1261, 0x00000000U, 0x9B8EF115U }, /* XSUM_XXH32_testdata[2522] */\n    { 1261, 0x9E3779B1U, 0xF0469C7AU }, /* XSUM_XXH32_testdata[2523] */\n    { 1262, 0x00000000U, 0x15970213U }, /* XSUM_XXH32_testdata[2524] */\n    { 1262, 0x9E3779B1U, 0x42B663DDU }, /* XSUM_XXH32_testdata[2525] */\n    { 1263, 0x00000000U, 0xA0953660U }, /* XSUM_XXH32_testdata[2526] */\n    { 1263, 0x9E3779B1U, 0x964B8A94U }, /* XSUM_XXH32_testdata[2527] */\n    { 1264, 0x00000000U, 0x8E07AE6FU }, /* XSUM_XXH32_testdata[2528] */\n    { 1264, 0x9E3779B1U, 0x1DA26D93U }, /* XSUM_XXH32_testdata[2529] */\n    { 1265, 0x00000000U, 0xF993B00BU }, /* XSUM_XXH32_testdata[2530] */\n    { 1265, 0x9E3779B1U, 0xD3F2FA99U }, /* XSUM_XXH32_testdata[2531] */\n    { 1266, 0x00000000U, 0xD0131D4AU }, /* XSUM_XXH32_testdata[2532] */\n    { 1266, 0x9E3779B1U, 0x90B272F9U }, /* XSUM_XXH32_testdata[2533] */\n    { 1267, 0x00000000U, 0xF1DF1C1EU }, /* XSUM_XXH32_testdata[2534] */\n    { 1267, 0x9E3779B1U, 0x70C5631FU }, /* XSUM_XXH32_testdata[2535] */\n    { 1268, 0x00000000U, 0xECCBEC12U }, /* XSUM_XXH32_testdata[2536] */\n    { 1268, 0x9E3779B1U, 0x2C27652BU }, /* XSUM_XXH32_testdata[2537] */\n    { 1269, 0x00000000U, 0xA8ABBE10U }, /* XSUM_XXH32_testdata[2538] */\n    { 1269, 0x9E3779B1U, 0xE38FEE6CU }, /* XSUM_XXH32_testdata[2539] */\n    { 1270, 0x00000000U, 0x9DD606C0U }, /* XSUM_XXH32_testdata[2540] */\n    { 1270, 0x9E3779B1U, 0xC2BF63EEU }, /* XSUM_XXH32_testdata[2541] */\n    { 1271, 0x00000000U, 0x01F80B9CU }, /* XSUM_XXH32_testdata[2542] */\n    { 1271, 0x9E3779B1U, 0x89FCD27FU }, /* XSUM_XXH32_testdata[2543] */\n    { 1272, 0x00000000U, 0x89E9AFC7U }, /* XSUM_XXH32_testdata[2544] */\n    { 1272, 0x9E3779B1U, 0x05639959U }, /* XSUM_XXH32_testdata[2545] */\n    { 1273, 0x00000000U, 0x4752B0C3U }, /* XSUM_XXH32_testdata[2546] */\n    { 1273, 0x9E3779B1U, 0x9E90A542U }, /* XSUM_XXH32_testdata[2547] */\n    { 1274, 0x00000000U, 0xEF38B0D4U }, /* XSUM_XXH32_testdata[2548] */\n    { 1274, 0x9E3779B1U, 0x16B994DCU }, /* XSUM_XXH32_testdata[2549] */\n    { 1275, 0x00000000U, 0x46195024U }, /* XSUM_XXH32_testdata[2550] */\n    { 1275, 0x9E3779B1U, 0x51A1C37DU }, /* XSUM_XXH32_testdata[2551] */\n    { 1276, 0x00000000U, 0x0EE0441EU }, /* XSUM_XXH32_testdata[2552] */\n    { 1276, 0x9E3779B1U, 0xB834298EU }, /* XSUM_XXH32_testdata[2553] */\n    { 1277, 0x00000000U, 0x8643799EU }, /* XSUM_XXH32_testdata[2554] */\n    { 1277, 0x9E3779B1U, 0x7EB6266EU }, /* XSUM_XXH32_testdata[2555] */\n    { 1278, 0x00000000U, 0x1466B4A6U }, /* XSUM_XXH32_testdata[2556] */\n    { 1278, 0x9E3779B1U, 0xCB60768BU }, /* XSUM_XXH32_testdata[2557] */\n    { 1279, 0x00000000U, 0xEEC1E880U }, /* XSUM_XXH32_testdata[2558] */\n    { 1279, 0x9E3779B1U, 0x3AC5CDF6U }, /* XSUM_XXH32_testdata[2559] */\n    { 1280, 0x00000000U, 0x3A7D59BFU }, /* XSUM_XXH32_testdata[2560] */\n    { 1280, 0x9E3779B1U, 0xA349EC49U }, /* XSUM_XXH32_testdata[2561] */\n    { 1281, 0x00000000U, 0x7D71B06CU }, /* XSUM_XXH32_testdata[2562] */\n    { 1281, 0x9E3779B1U, 0xFA3E3998U }, /* XSUM_XXH32_testdata[2563] */\n    { 1282, 0x00000000U, 0x158406DEU }, /* XSUM_XXH32_testdata[2564] */\n    { 1282, 0x9E3779B1U, 0x2F7381BFU }, /* XSUM_XXH32_testdata[2565] */\n    { 1283, 0x00000000U, 0x9272967AU }, /* XSUM_XXH32_testdata[2566] */\n    { 1283, 0x9E3779B1U, 0x378C6054U }, /* XSUM_XXH32_testdata[2567] */\n    { 1284, 0x00000000U, 0x43A43229U }, /* XSUM_XXH32_testdata[2568] */\n    { 1284, 0x9E3779B1U, 0x367A390DU }, /* XSUM_XXH32_testdata[2569] */\n    { 1285, 0x00000000U, 0xDD831C1FU }, /* XSUM_XXH32_testdata[2570] */\n    { 1285, 0x9E3779B1U, 0x96724406U }, /* XSUM_XXH32_testdata[2571] */\n    { 1286, 0x00000000U, 0xBBB772E8U }, /* XSUM_XXH32_testdata[2572] */\n    { 1286, 0x9E3779B1U, 0x8DFB225DU }, /* XSUM_XXH32_testdata[2573] */\n    { 1287, 0x00000000U, 0x16EBE500U }, /* XSUM_XXH32_testdata[2574] */\n    { 1287, 0x9E3779B1U, 0x13C81E0DU }, /* XSUM_XXH32_testdata[2575] */\n    { 1288, 0x00000000U, 0x1AE5A4DFU }, /* XSUM_XXH32_testdata[2576] */\n    { 1288, 0x9E3779B1U, 0x5E53D10FU }, /* XSUM_XXH32_testdata[2577] */\n    { 1289, 0x00000000U, 0x248A8AB2U }, /* XSUM_XXH32_testdata[2578] */\n    { 1289, 0x9E3779B1U, 0x3844206AU }, /* XSUM_XXH32_testdata[2579] */\n    { 1290, 0x00000000U, 0x1E9E2CE5U }, /* XSUM_XXH32_testdata[2580] */\n    { 1290, 0x9E3779B1U, 0x6AD98606U }, /* XSUM_XXH32_testdata[2581] */\n    { 1291, 0x00000000U, 0x9ADEF56BU }, /* XSUM_XXH32_testdata[2582] */\n    { 1291, 0x9E3779B1U, 0xC41BD1F1U }, /* XSUM_XXH32_testdata[2583] */\n    { 1292, 0x00000000U, 0xFCA4A1D6U }, /* XSUM_XXH32_testdata[2584] */\n    { 1292, 0x9E3779B1U, 0x46429A63U }, /* XSUM_XXH32_testdata[2585] */\n    { 1293, 0x00000000U, 0xBCBEF56CU }, /* XSUM_XXH32_testdata[2586] */\n    { 1293, 0x9E3779B1U, 0xF25C8609U }, /* XSUM_XXH32_testdata[2587] */\n    { 1294, 0x00000000U, 0xCB5593A6U }, /* XSUM_XXH32_testdata[2588] */\n    { 1294, 0x9E3779B1U, 0x576BBFBBU }, /* XSUM_XXH32_testdata[2589] */\n    { 1295, 0x00000000U, 0xB8CFFF93U }, /* XSUM_XXH32_testdata[2590] */\n    { 1295, 0x9E3779B1U, 0x6DAA5212U }, /* XSUM_XXH32_testdata[2591] */\n    { 1296, 0x00000000U, 0x40E4F5EBU }, /* XSUM_XXH32_testdata[2592] */\n    { 1296, 0x9E3779B1U, 0xA937F09CU }, /* XSUM_XXH32_testdata[2593] */\n    { 1297, 0x00000000U, 0xC253CF4FU }, /* XSUM_XXH32_testdata[2594] */\n    { 1297, 0x9E3779B1U, 0xB11282D0U }, /* XSUM_XXH32_testdata[2595] */\n    { 1298, 0x00000000U, 0x2A6C6F76U }, /* XSUM_XXH32_testdata[2596] */\n    { 1298, 0x9E3779B1U, 0x6B668879U }, /* XSUM_XXH32_testdata[2597] */\n    { 1299, 0x00000000U, 0x468FA26BU }, /* XSUM_XXH32_testdata[2598] */\n    { 1299, 0x9E3779B1U, 0xF7E41D7CU }, /* XSUM_XXH32_testdata[2599] */\n    { 1300, 0x00000000U, 0x209C6B5DU }, /* XSUM_XXH32_testdata[2600] */\n    { 1300, 0x9E3779B1U, 0xF5B5CF78U }, /* XSUM_XXH32_testdata[2601] */\n    { 1301, 0x00000000U, 0x3A693473U }, /* XSUM_XXH32_testdata[2602] */\n    { 1301, 0x9E3779B1U, 0x80B60DE5U }, /* XSUM_XXH32_testdata[2603] */\n    { 1302, 0x00000000U, 0x7F9E9BA5U }, /* XSUM_XXH32_testdata[2604] */\n    { 1302, 0x9E3779B1U, 0xC6C7CB6EU }, /* XSUM_XXH32_testdata[2605] */\n    { 1303, 0x00000000U, 0xEE7AC24AU }, /* XSUM_XXH32_testdata[2606] */\n    { 1303, 0x9E3779B1U, 0xF9FF514AU }, /* XSUM_XXH32_testdata[2607] */\n    { 1304, 0x00000000U, 0x4818F809U }, /* XSUM_XXH32_testdata[2608] */\n    { 1304, 0x9E3779B1U, 0xD2E62D34U }, /* XSUM_XXH32_testdata[2609] */\n    { 1305, 0x00000000U, 0xCBE8890FU }, /* XSUM_XXH32_testdata[2610] */\n    { 1305, 0x9E3779B1U, 0x63674791U }, /* XSUM_XXH32_testdata[2611] */\n    { 1306, 0x00000000U, 0x8E7AA579U }, /* XSUM_XXH32_testdata[2612] */\n    { 1306, 0x9E3779B1U, 0x3E3749A5U }, /* XSUM_XXH32_testdata[2613] */\n    { 1307, 0x00000000U, 0x93822890U }, /* XSUM_XXH32_testdata[2614] */\n    { 1307, 0x9E3779B1U, 0x2B2ADA9FU }, /* XSUM_XXH32_testdata[2615] */\n    { 1308, 0x00000000U, 0xF56F9743U }, /* XSUM_XXH32_testdata[2616] */\n    { 1308, 0x9E3779B1U, 0x64B58491U }, /* XSUM_XXH32_testdata[2617] */\n    { 1309, 0x00000000U, 0x20682B4AU }, /* XSUM_XXH32_testdata[2618] */\n    { 1309, 0x9E3779B1U, 0x7ED542FCU }, /* XSUM_XXH32_testdata[2619] */\n    { 1310, 0x00000000U, 0x94D0BA6AU }, /* XSUM_XXH32_testdata[2620] */\n    { 1310, 0x9E3779B1U, 0xCC1D2EEAU }, /* XSUM_XXH32_testdata[2621] */\n    { 1311, 0x00000000U, 0x659608A6U }, /* XSUM_XXH32_testdata[2622] */\n    { 1311, 0x9E3779B1U, 0x3B166B06U }, /* XSUM_XXH32_testdata[2623] */\n    { 1312, 0x00000000U, 0x332A8EE0U }, /* XSUM_XXH32_testdata[2624] */\n    { 1312, 0x9E3779B1U, 0xCCB40380U }, /* XSUM_XXH32_testdata[2625] */\n    { 1313, 0x00000000U, 0xEC5A7C00U }, /* XSUM_XXH32_testdata[2626] */\n    { 1313, 0x9E3779B1U, 0xBFBD7EB8U }, /* XSUM_XXH32_testdata[2627] */\n    { 1314, 0x00000000U, 0x876FAAA0U }, /* XSUM_XXH32_testdata[2628] */\n    { 1314, 0x9E3779B1U, 0x2BD64B48U }, /* XSUM_XXH32_testdata[2629] */\n    { 1315, 0x00000000U, 0xF880F710U }, /* XSUM_XXH32_testdata[2630] */\n    { 1315, 0x9E3779B1U, 0x0BACA9EDU }, /* XSUM_XXH32_testdata[2631] */\n    { 1316, 0x00000000U, 0x71711259U }, /* XSUM_XXH32_testdata[2632] */\n    { 1316, 0x9E3779B1U, 0xF25110A5U }, /* XSUM_XXH32_testdata[2633] */\n    { 1317, 0x00000000U, 0x2812251BU }, /* XSUM_XXH32_testdata[2634] */\n    { 1317, 0x9E3779B1U, 0x5A42BB9FU }, /* XSUM_XXH32_testdata[2635] */\n    { 1318, 0x00000000U, 0xBF018379U }, /* XSUM_XXH32_testdata[2636] */\n    { 1318, 0x9E3779B1U, 0x40CA971CU }, /* XSUM_XXH32_testdata[2637] */\n    { 1319, 0x00000000U, 0x090A3E78U }, /* XSUM_XXH32_testdata[2638] */\n    { 1319, 0x9E3779B1U, 0xD1AE8554U }, /* XSUM_XXH32_testdata[2639] */\n    { 1320, 0x00000000U, 0xC4ECE7E5U }, /* XSUM_XXH32_testdata[2640] */\n    { 1320, 0x9E3779B1U, 0x030264F7U }, /* XSUM_XXH32_testdata[2641] */\n    { 1321, 0x00000000U, 0x2B6CCAF7U }, /* XSUM_XXH32_testdata[2642] */\n    { 1321, 0x9E3779B1U, 0x52292B0FU }, /* XSUM_XXH32_testdata[2643] */\n    { 1322, 0x00000000U, 0x7E716BBEU }, /* XSUM_XXH32_testdata[2644] */\n    { 1322, 0x9E3779B1U, 0x41EAB24FU }, /* XSUM_XXH32_testdata[2645] */\n    { 1323, 0x00000000U, 0xAF8250C9U }, /* XSUM_XXH32_testdata[2646] */\n    { 1323, 0x9E3779B1U, 0x351086A2U }, /* XSUM_XXH32_testdata[2647] */\n    { 1324, 0x00000000U, 0x17690F50U }, /* XSUM_XXH32_testdata[2648] */\n    { 1324, 0x9E3779B1U, 0x1B44CC23U }, /* XSUM_XXH32_testdata[2649] */\n    { 1325, 0x00000000U, 0xC02F41B3U }, /* XSUM_XXH32_testdata[2650] */\n    { 1325, 0x9E3779B1U, 0xAB5BC75DU }, /* XSUM_XXH32_testdata[2651] */\n    { 1326, 0x00000000U, 0xF6B26054U }, /* XSUM_XXH32_testdata[2652] */\n    { 1326, 0x9E3779B1U, 0x3A50A9BBU }, /* XSUM_XXH32_testdata[2653] */\n    { 1327, 0x00000000U, 0x1A98D09BU }, /* XSUM_XXH32_testdata[2654] */\n    { 1327, 0x9E3779B1U, 0xF732461FU }, /* XSUM_XXH32_testdata[2655] */\n    { 1328, 0x00000000U, 0xB39B192CU }, /* XSUM_XXH32_testdata[2656] */\n    { 1328, 0x9E3779B1U, 0x6151A4F5U }, /* XSUM_XXH32_testdata[2657] */\n    { 1329, 0x00000000U, 0x8C40F824U }, /* XSUM_XXH32_testdata[2658] */\n    { 1329, 0x9E3779B1U, 0x99555511U }, /* XSUM_XXH32_testdata[2659] */\n    { 1330, 0x00000000U, 0x13879480U }, /* XSUM_XXH32_testdata[2660] */\n    { 1330, 0x9E3779B1U, 0x939B3510U }, /* XSUM_XXH32_testdata[2661] */\n    { 1331, 0x00000000U, 0xD703BB14U }, /* XSUM_XXH32_testdata[2662] */\n    { 1331, 0x9E3779B1U, 0xD116A1F9U }, /* XSUM_XXH32_testdata[2663] */\n    { 1332, 0x00000000U, 0x87F1C5D9U }, /* XSUM_XXH32_testdata[2664] */\n    { 1332, 0x9E3779B1U, 0x14597EF7U }, /* XSUM_XXH32_testdata[2665] */\n    { 1333, 0x00000000U, 0x69B31BACU }, /* XSUM_XXH32_testdata[2666] */\n    { 1333, 0x9E3779B1U, 0x2CE8FA3AU }, /* XSUM_XXH32_testdata[2667] */\n    { 1334, 0x00000000U, 0x37A6A8C4U }, /* XSUM_XXH32_testdata[2668] */\n    { 1334, 0x9E3779B1U, 0x3779624AU }, /* XSUM_XXH32_testdata[2669] */\n    { 1335, 0x00000000U, 0x941F386DU }, /* XSUM_XXH32_testdata[2670] */\n    { 1335, 0x9E3779B1U, 0x1B70E156U }, /* XSUM_XXH32_testdata[2671] */\n    { 1336, 0x00000000U, 0x1586CEFAU }, /* XSUM_XXH32_testdata[2672] */\n    { 1336, 0x9E3779B1U, 0x84A84E53U }, /* XSUM_XXH32_testdata[2673] */\n    { 1337, 0x00000000U, 0xF488CFDCU }, /* XSUM_XXH32_testdata[2674] */\n    { 1337, 0x9E3779B1U, 0xEA961D61U }, /* XSUM_XXH32_testdata[2675] */\n    { 1338, 0x00000000U, 0xF7828592U }, /* XSUM_XXH32_testdata[2676] */\n    { 1338, 0x9E3779B1U, 0x73B68612U }, /* XSUM_XXH32_testdata[2677] */\n    { 1339, 0x00000000U, 0xC60B6CACU }, /* XSUM_XXH32_testdata[2678] */\n    { 1339, 0x9E3779B1U, 0x4144EA47U }, /* XSUM_XXH32_testdata[2679] */\n    { 1340, 0x00000000U, 0x23D2167FU }, /* XSUM_XXH32_testdata[2680] */\n    { 1340, 0x9E3779B1U, 0x7CE2B4B1U }, /* XSUM_XXH32_testdata[2681] */\n    { 1341, 0x00000000U, 0x77C5C3BAU }, /* XSUM_XXH32_testdata[2682] */\n    { 1341, 0x9E3779B1U, 0x26CAA0AAU }, /* XSUM_XXH32_testdata[2683] */\n    { 1342, 0x00000000U, 0x9BB7390FU }, /* XSUM_XXH32_testdata[2684] */\n    { 1342, 0x9E3779B1U, 0xD220E867U }, /* XSUM_XXH32_testdata[2685] */\n    { 1343, 0x00000000U, 0x9AA3006FU }, /* XSUM_XXH32_testdata[2686] */\n    { 1343, 0x9E3779B1U, 0x2EFE362BU }, /* XSUM_XXH32_testdata[2687] */\n    { 1344, 0x00000000U, 0x7C3973CCU }, /* XSUM_XXH32_testdata[2688] */\n    { 1344, 0x9E3779B1U, 0xBE444DC4U }, /* XSUM_XXH32_testdata[2689] */\n    { 1345, 0x00000000U, 0x67FDA757U }, /* XSUM_XXH32_testdata[2690] */\n    { 1345, 0x9E3779B1U, 0xE609D277U }, /* XSUM_XXH32_testdata[2691] */\n    { 1346, 0x00000000U, 0x61965DEDU }, /* XSUM_XXH32_testdata[2692] */\n    { 1346, 0x9E3779B1U, 0x793F34BBU }, /* XSUM_XXH32_testdata[2693] */\n    { 1347, 0x00000000U, 0xB4861186U }, /* XSUM_XXH32_testdata[2694] */\n    { 1347, 0x9E3779B1U, 0xF54A959EU }, /* XSUM_XXH32_testdata[2695] */\n    { 1348, 0x00000000U, 0x4F4E0553U }, /* XSUM_XXH32_testdata[2696] */\n    { 1348, 0x9E3779B1U, 0xE29AA5F5U }, /* XSUM_XXH32_testdata[2697] */\n    { 1349, 0x00000000U, 0xCD296EA3U }, /* XSUM_XXH32_testdata[2698] */\n    { 1349, 0x9E3779B1U, 0xAADE20F2U }, /* XSUM_XXH32_testdata[2699] */\n    { 1350, 0x00000000U, 0x53C5FBFCU }, /* XSUM_XXH32_testdata[2700] */\n    { 1350, 0x9E3779B1U, 0xFCB744F0U }, /* XSUM_XXH32_testdata[2701] */\n    { 1351, 0x00000000U, 0xF24020ECU }, /* XSUM_XXH32_testdata[2702] */\n    { 1351, 0x9E3779B1U, 0xD13DDB18U }, /* XSUM_XXH32_testdata[2703] */\n    { 1352, 0x00000000U, 0xC95FAC0DU }, /* XSUM_XXH32_testdata[2704] */\n    { 1352, 0x9E3779B1U, 0x4F93839EU }, /* XSUM_XXH32_testdata[2705] */\n    { 1353, 0x00000000U, 0xEA326090U }, /* XSUM_XXH32_testdata[2706] */\n    { 1353, 0x9E3779B1U, 0x0622F5D2U }, /* XSUM_XXH32_testdata[2707] */\n    { 1354, 0x00000000U, 0x86E4DDA8U }, /* XSUM_XXH32_testdata[2708] */\n    { 1354, 0x9E3779B1U, 0xB6DF4E6BU }, /* XSUM_XXH32_testdata[2709] */\n    { 1355, 0x00000000U, 0xB87A0703U }, /* XSUM_XXH32_testdata[2710] */\n    { 1355, 0x9E3779B1U, 0xD5C87EB7U }, /* XSUM_XXH32_testdata[2711] */\n    { 1356, 0x00000000U, 0x1C342F7FU }, /* XSUM_XXH32_testdata[2712] */\n    { 1356, 0x9E3779B1U, 0x23736B55U }, /* XSUM_XXH32_testdata[2713] */\n    { 1357, 0x00000000U, 0x0E011104U }, /* XSUM_XXH32_testdata[2714] */\n    { 1357, 0x9E3779B1U, 0xDE0F61ACU }, /* XSUM_XXH32_testdata[2715] */\n    { 1358, 0x00000000U, 0x0976CE50U }, /* XSUM_XXH32_testdata[2716] */\n    { 1358, 0x9E3779B1U, 0xF51DA101U }, /* XSUM_XXH32_testdata[2717] */\n    { 1359, 0x00000000U, 0x72B42BB6U }, /* XSUM_XXH32_testdata[2718] */\n    { 1359, 0x9E3779B1U, 0x7074D178U }, /* XSUM_XXH32_testdata[2719] */\n    { 1360, 0x00000000U, 0xA5166671U }, /* XSUM_XXH32_testdata[2720] */\n    { 1360, 0x9E3779B1U, 0xD522E653U }, /* XSUM_XXH32_testdata[2721] */\n    { 1361, 0x00000000U, 0x43A03D77U }, /* XSUM_XXH32_testdata[2722] */\n    { 1361, 0x9E3779B1U, 0x82F19731U }, /* XSUM_XXH32_testdata[2723] */\n    { 1362, 0x00000000U, 0x01760E55U }, /* XSUM_XXH32_testdata[2724] */\n    { 1362, 0x9E3779B1U, 0x2452BAD7U }, /* XSUM_XXH32_testdata[2725] */\n    { 1363, 0x00000000U, 0x813B822CU }, /* XSUM_XXH32_testdata[2726] */\n    { 1363, 0x9E3779B1U, 0x678CC0ECU }, /* XSUM_XXH32_testdata[2727] */\n    { 1364, 0x00000000U, 0x6E2EAA8CU }, /* XSUM_XXH32_testdata[2728] */\n    { 1364, 0x9E3779B1U, 0xCCADC6DCU }, /* XSUM_XXH32_testdata[2729] */\n    { 1365, 0x00000000U, 0xFD1C6D1BU }, /* XSUM_XXH32_testdata[2730] */\n    { 1365, 0x9E3779B1U, 0x0417DFBBU }, /* XSUM_XXH32_testdata[2731] */\n    { 1366, 0x00000000U, 0x03A77FA3U }, /* XSUM_XXH32_testdata[2732] */\n    { 1366, 0x9E3779B1U, 0xBB44CC3EU }, /* XSUM_XXH32_testdata[2733] */\n    { 1367, 0x00000000U, 0x691B3F30U }, /* XSUM_XXH32_testdata[2734] */\n    { 1367, 0x9E3779B1U, 0xEEAB3786U }, /* XSUM_XXH32_testdata[2735] */\n    { 1368, 0x00000000U, 0x5EF7B99BU }, /* XSUM_XXH32_testdata[2736] */\n    { 1368, 0x9E3779B1U, 0xF846521AU }, /* XSUM_XXH32_testdata[2737] */\n    { 1369, 0x00000000U, 0x41F32CE8U }, /* XSUM_XXH32_testdata[2738] */\n    { 1369, 0x9E3779B1U, 0x1378FC71U }, /* XSUM_XXH32_testdata[2739] */\n    { 1370, 0x00000000U, 0xCF2A06E8U }, /* XSUM_XXH32_testdata[2740] */\n    { 1370, 0x9E3779B1U, 0x1D8D45DEU }, /* XSUM_XXH32_testdata[2741] */\n    { 1371, 0x00000000U, 0x29EAE45CU }, /* XSUM_XXH32_testdata[2742] */\n    { 1371, 0x9E3779B1U, 0x7318BB02U }, /* XSUM_XXH32_testdata[2743] */\n    { 1372, 0x00000000U, 0xE39F1B94U }, /* XSUM_XXH32_testdata[2744] */\n    { 1372, 0x9E3779B1U, 0x76BE5B11U }, /* XSUM_XXH32_testdata[2745] */\n    { 1373, 0x00000000U, 0x9A1A4D06U }, /* XSUM_XXH32_testdata[2746] */\n    { 1373, 0x9E3779B1U, 0x4598B26EU }, /* XSUM_XXH32_testdata[2747] */\n    { 1374, 0x00000000U, 0x688A7E3CU }, /* XSUM_XXH32_testdata[2748] */\n    { 1374, 0x9E3779B1U, 0x27616B17U }, /* XSUM_XXH32_testdata[2749] */\n    { 1375, 0x00000000U, 0xAF99A477U }, /* XSUM_XXH32_testdata[2750] */\n    { 1375, 0x9E3779B1U, 0x6DA8288DU }, /* XSUM_XXH32_testdata[2751] */\n    { 1376, 0x00000000U, 0x1EBE7C58U }, /* XSUM_XXH32_testdata[2752] */\n    { 1376, 0x9E3779B1U, 0x51C696AAU }, /* XSUM_XXH32_testdata[2753] */\n    { 1377, 0x00000000U, 0xEB84C288U }, /* XSUM_XXH32_testdata[2754] */\n    { 1377, 0x9E3779B1U, 0x1CD6C654U }, /* XSUM_XXH32_testdata[2755] */\n    { 1378, 0x00000000U, 0x7E837336U }, /* XSUM_XXH32_testdata[2756] */\n    { 1378, 0x9E3779B1U, 0x6750EC5BU }, /* XSUM_XXH32_testdata[2757] */\n    { 1379, 0x00000000U, 0xDA0750E5U }, /* XSUM_XXH32_testdata[2758] */\n    { 1379, 0x9E3779B1U, 0x81CA570DU }, /* XSUM_XXH32_testdata[2759] */\n    { 1380, 0x00000000U, 0x5543619FU }, /* XSUM_XXH32_testdata[2760] */\n    { 1380, 0x9E3779B1U, 0xC381E5DBU }, /* XSUM_XXH32_testdata[2761] */\n    { 1381, 0x00000000U, 0x616B4BDCU }, /* XSUM_XXH32_testdata[2762] */\n    { 1381, 0x9E3779B1U, 0x6B75A005U }, /* XSUM_XXH32_testdata[2763] */\n    { 1382, 0x00000000U, 0xF12E20FCU }, /* XSUM_XXH32_testdata[2764] */\n    { 1382, 0x9E3779B1U, 0xE3D3E62EU }, /* XSUM_XXH32_testdata[2765] */\n    { 1383, 0x00000000U, 0x59F2C73CU }, /* XSUM_XXH32_testdata[2766] */\n    { 1383, 0x9E3779B1U, 0x5464F444U }, /* XSUM_XXH32_testdata[2767] */\n    { 1384, 0x00000000U, 0x28DB96CAU }, /* XSUM_XXH32_testdata[2768] */\n    { 1384, 0x9E3779B1U, 0xB7253994U }, /* XSUM_XXH32_testdata[2769] */\n    { 1385, 0x00000000U, 0x11660CF1U }, /* XSUM_XXH32_testdata[2770] */\n    { 1385, 0x9E3779B1U, 0x0F206FCFU }, /* XSUM_XXH32_testdata[2771] */\n    { 1386, 0x00000000U, 0xE16504ADU }, /* XSUM_XXH32_testdata[2772] */\n    { 1386, 0x9E3779B1U, 0xA3182A6EU }, /* XSUM_XXH32_testdata[2773] */\n    { 1387, 0x00000000U, 0x8CFC9B9AU }, /* XSUM_XXH32_testdata[2774] */\n    { 1387, 0x9E3779B1U, 0x9755A534U }, /* XSUM_XXH32_testdata[2775] */\n    { 1388, 0x00000000U, 0xCDC0D867U }, /* XSUM_XXH32_testdata[2776] */\n    { 1388, 0x9E3779B1U, 0x43F6B298U }, /* XSUM_XXH32_testdata[2777] */\n    { 1389, 0x00000000U, 0x889A1EDAU }, /* XSUM_XXH32_testdata[2778] */\n    { 1389, 0x9E3779B1U, 0x2C6A9486U }, /* XSUM_XXH32_testdata[2779] */\n    { 1390, 0x00000000U, 0xD59AFB14U }, /* XSUM_XXH32_testdata[2780] */\n    { 1390, 0x9E3779B1U, 0xD5FEEDF1U }, /* XSUM_XXH32_testdata[2781] */\n    { 1391, 0x00000000U, 0x9ABE6F46U }, /* XSUM_XXH32_testdata[2782] */\n    { 1391, 0x9E3779B1U, 0x2931C68CU }, /* XSUM_XXH32_testdata[2783] */\n    { 1392, 0x00000000U, 0xC7A77F4CU }, /* XSUM_XXH32_testdata[2784] */\n    { 1392, 0x9E3779B1U, 0xC2B5B646U }, /* XSUM_XXH32_testdata[2785] */\n    { 1393, 0x00000000U, 0xF6642296U }, /* XSUM_XXH32_testdata[2786] */\n    { 1393, 0x9E3779B1U, 0xA7DD4B43U }, /* XSUM_XXH32_testdata[2787] */\n    { 1394, 0x00000000U, 0xB6E621FDU }, /* XSUM_XXH32_testdata[2788] */\n    { 1394, 0x9E3779B1U, 0xB0B5AA8EU }, /* XSUM_XXH32_testdata[2789] */\n    { 1395, 0x00000000U, 0xFC8E12A3U }, /* XSUM_XXH32_testdata[2790] */\n    { 1395, 0x9E3779B1U, 0x17C09522U }, /* XSUM_XXH32_testdata[2791] */\n    { 1396, 0x00000000U, 0x6C554B8AU }, /* XSUM_XXH32_testdata[2792] */\n    { 1396, 0x9E3779B1U, 0x0A71965EU }, /* XSUM_XXH32_testdata[2793] */\n    { 1397, 0x00000000U, 0x97EF74A7U }, /* XSUM_XXH32_testdata[2794] */\n    { 1397, 0x9E3779B1U, 0xC6413DC4U }, /* XSUM_XXH32_testdata[2795] */\n    { 1398, 0x00000000U, 0xAE94CB53U }, /* XSUM_XXH32_testdata[2796] */\n    { 1398, 0x9E3779B1U, 0x590FD2BFU }, /* XSUM_XXH32_testdata[2797] */\n    { 1399, 0x00000000U, 0xBC69B6C3U }, /* XSUM_XXH32_testdata[2798] */\n    { 1399, 0x9E3779B1U, 0x97457FE4U }, /* XSUM_XXH32_testdata[2799] */\n    { 1400, 0x00000000U, 0x2A72F074U }, /* XSUM_XXH32_testdata[2800] */\n    { 1400, 0x9E3779B1U, 0x9C74A24CU }, /* XSUM_XXH32_testdata[2801] */\n    { 1401, 0x00000000U, 0x4B6BFCC1U }, /* XSUM_XXH32_testdata[2802] */\n    { 1401, 0x9E3779B1U, 0xD74133C7U }, /* XSUM_XXH32_testdata[2803] */\n    { 1402, 0x00000000U, 0x7FC2D82CU }, /* XSUM_XXH32_testdata[2804] */\n    { 1402, 0x9E3779B1U, 0xDC12A98DU }, /* XSUM_XXH32_testdata[2805] */\n    { 1403, 0x00000000U, 0x10A30F0BU }, /* XSUM_XXH32_testdata[2806] */\n    { 1403, 0x9E3779B1U, 0x556C6675U }, /* XSUM_XXH32_testdata[2807] */\n    { 1404, 0x00000000U, 0x66F3957BU }, /* XSUM_XXH32_testdata[2808] */\n    { 1404, 0x9E3779B1U, 0x4DFE2282U }, /* XSUM_XXH32_testdata[2809] */\n    { 1405, 0x00000000U, 0x5D7B7674U }, /* XSUM_XXH32_testdata[2810] */\n    { 1405, 0x9E3779B1U, 0x911584B8U }, /* XSUM_XXH32_testdata[2811] */\n    { 1406, 0x00000000U, 0xD5D49314U }, /* XSUM_XXH32_testdata[2812] */\n    { 1406, 0x9E3779B1U, 0xB575832DU }, /* XSUM_XXH32_testdata[2813] */\n    { 1407, 0x00000000U, 0xC89A1F79U }, /* XSUM_XXH32_testdata[2814] */\n    { 1407, 0x9E3779B1U, 0xBC0E196BU }, /* XSUM_XXH32_testdata[2815] */\n    { 1408, 0x00000000U, 0x0DFE8294U }, /* XSUM_XXH32_testdata[2816] */\n    { 1408, 0x9E3779B1U, 0xED10BD15U }, /* XSUM_XXH32_testdata[2817] */\n    { 1409, 0x00000000U, 0xD19CDC2EU }, /* XSUM_XXH32_testdata[2818] */\n    { 1409, 0x9E3779B1U, 0x725BD2E1U }, /* XSUM_XXH32_testdata[2819] */\n    { 1410, 0x00000000U, 0x4119B72EU }, /* XSUM_XXH32_testdata[2820] */\n    { 1410, 0x9E3779B1U, 0x593BC6C4U }, /* XSUM_XXH32_testdata[2821] */\n    { 1411, 0x00000000U, 0x45CCE29BU }, /* XSUM_XXH32_testdata[2822] */\n    { 1411, 0x9E3779B1U, 0x13D96973U }, /* XSUM_XXH32_testdata[2823] */\n    { 1412, 0x00000000U, 0x21CB0B9AU }, /* XSUM_XXH32_testdata[2824] */\n    { 1412, 0x9E3779B1U, 0x4A7EE4C4U }, /* XSUM_XXH32_testdata[2825] */\n    { 1413, 0x00000000U, 0xA7997074U }, /* XSUM_XXH32_testdata[2826] */\n    { 1413, 0x9E3779B1U, 0xBF713AB1U }, /* XSUM_XXH32_testdata[2827] */\n    { 1414, 0x00000000U, 0xA2CEC4F5U }, /* XSUM_XXH32_testdata[2828] */\n    { 1414, 0x9E3779B1U, 0x1FA79D80U }, /* XSUM_XXH32_testdata[2829] */\n    { 1415, 0x00000000U, 0x0F814A6EU }, /* XSUM_XXH32_testdata[2830] */\n    { 1415, 0x9E3779B1U, 0xA3884D73U }, /* XSUM_XXH32_testdata[2831] */\n    { 1416, 0x00000000U, 0x20679E8BU }, /* XSUM_XXH32_testdata[2832] */\n    { 1416, 0x9E3779B1U, 0x005C56DFU }, /* XSUM_XXH32_testdata[2833] */\n    { 1417, 0x00000000U, 0x0432202FU }, /* XSUM_XXH32_testdata[2834] */\n    { 1417, 0x9E3779B1U, 0xB631CD97U }, /* XSUM_XXH32_testdata[2835] */\n    { 1418, 0x00000000U, 0x7D08D0FAU }, /* XSUM_XXH32_testdata[2836] */\n    { 1418, 0x9E3779B1U, 0x04349D10U }, /* XSUM_XXH32_testdata[2837] */\n    { 1419, 0x00000000U, 0xC3EBF980U }, /* XSUM_XXH32_testdata[2838] */\n    { 1419, 0x9E3779B1U, 0x7692E29DU }, /* XSUM_XXH32_testdata[2839] */\n    { 1420, 0x00000000U, 0xA56505C3U }, /* XSUM_XXH32_testdata[2840] */\n    { 1420, 0x9E3779B1U, 0x5EAF087AU }, /* XSUM_XXH32_testdata[2841] */\n    { 1421, 0x00000000U, 0x78CE85ACU }, /* XSUM_XXH32_testdata[2842] */\n    { 1421, 0x9E3779B1U, 0x98EC1EC8U }, /* XSUM_XXH32_testdata[2843] */\n    { 1422, 0x00000000U, 0xB4E81E27U }, /* XSUM_XXH32_testdata[2844] */\n    { 1422, 0x9E3779B1U, 0xEE79131EU }, /* XSUM_XXH32_testdata[2845] */\n    { 1423, 0x00000000U, 0x1300FB1DU }, /* XSUM_XXH32_testdata[2846] */\n    { 1423, 0x9E3779B1U, 0xA6AAD254U }, /* XSUM_XXH32_testdata[2847] */\n    { 1424, 0x00000000U, 0xB9F71B65U }, /* XSUM_XXH32_testdata[2848] */\n    { 1424, 0x9E3779B1U, 0xFDB3F66BU }, /* XSUM_XXH32_testdata[2849] */\n    { 1425, 0x00000000U, 0x21176B58U }, /* XSUM_XXH32_testdata[2850] */\n    { 1425, 0x9E3779B1U, 0x0A9DAB87U }, /* XSUM_XXH32_testdata[2851] */\n    { 1426, 0x00000000U, 0xA773945FU }, /* XSUM_XXH32_testdata[2852] */\n    { 1426, 0x9E3779B1U, 0xF6FCF60AU }, /* XSUM_XXH32_testdata[2853] */\n    { 1427, 0x00000000U, 0x9FDBE7B3U }, /* XSUM_XXH32_testdata[2854] */\n    { 1427, 0x9E3779B1U, 0x670BB1A7U }, /* XSUM_XXH32_testdata[2855] */\n    { 1428, 0x00000000U, 0x661DB06EU }, /* XSUM_XXH32_testdata[2856] */\n    { 1428, 0x9E3779B1U, 0x4FD661AAU }, /* XSUM_XXH32_testdata[2857] */\n    { 1429, 0x00000000U, 0xFB224CC2U }, /* XSUM_XXH32_testdata[2858] */\n    { 1429, 0x9E3779B1U, 0x3C85B32CU }, /* XSUM_XXH32_testdata[2859] */\n    { 1430, 0x00000000U, 0x463C1DC8U }, /* XSUM_XXH32_testdata[2860] */\n    { 1430, 0x9E3779B1U, 0x8EB2F324U }, /* XSUM_XXH32_testdata[2861] */\n    { 1431, 0x00000000U, 0x2243C699U }, /* XSUM_XXH32_testdata[2862] */\n    { 1431, 0x9E3779B1U, 0x60ADE561U }, /* XSUM_XXH32_testdata[2863] */\n    { 1432, 0x00000000U, 0xE0327A81U }, /* XSUM_XXH32_testdata[2864] */\n    { 1432, 0x9E3779B1U, 0x6EA60C2CU }, /* XSUM_XXH32_testdata[2865] */\n    { 1433, 0x00000000U, 0x299D8963U }, /* XSUM_XXH32_testdata[2866] */\n    { 1433, 0x9E3779B1U, 0x959A1254U }, /* XSUM_XXH32_testdata[2867] */\n    { 1434, 0x00000000U, 0x638EDEA5U }, /* XSUM_XXH32_testdata[2868] */\n    { 1434, 0x9E3779B1U, 0xE9F0D047U }, /* XSUM_XXH32_testdata[2869] */\n    { 1435, 0x00000000U, 0x388EC35AU }, /* XSUM_XXH32_testdata[2870] */\n    { 1435, 0x9E3779B1U, 0xA946B3CAU }, /* XSUM_XXH32_testdata[2871] */\n    { 1436, 0x00000000U, 0x9784535EU }, /* XSUM_XXH32_testdata[2872] */\n    { 1436, 0x9E3779B1U, 0xFD5C545BU }, /* XSUM_XXH32_testdata[2873] */\n    { 1437, 0x00000000U, 0xB85C3D80U }, /* XSUM_XXH32_testdata[2874] */\n    { 1437, 0x9E3779B1U, 0xB1A43ACAU }, /* XSUM_XXH32_testdata[2875] */\n    { 1438, 0x00000000U, 0xD980C334U }, /* XSUM_XXH32_testdata[2876] */\n    { 1438, 0x9E3779B1U, 0xA16E1773U }, /* XSUM_XXH32_testdata[2877] */\n    { 1439, 0x00000000U, 0x5C5B3834U }, /* XSUM_XXH32_testdata[2878] */\n    { 1439, 0x9E3779B1U, 0xE50ED1FFU }, /* XSUM_XXH32_testdata[2879] */\n    { 1440, 0x00000000U, 0x05D63325U }, /* XSUM_XXH32_testdata[2880] */\n    { 1440, 0x9E3779B1U, 0x6EFDF566U }, /* XSUM_XXH32_testdata[2881] */\n    { 1441, 0x00000000U, 0x453E6103U }, /* XSUM_XXH32_testdata[2882] */\n    { 1441, 0x9E3779B1U, 0x1FAD079BU }, /* XSUM_XXH32_testdata[2883] */\n    { 1442, 0x00000000U, 0x4171244AU }, /* XSUM_XXH32_testdata[2884] */\n    { 1442, 0x9E3779B1U, 0x73A2B038U }, /* XSUM_XXH32_testdata[2885] */\n    { 1443, 0x00000000U, 0x1ADE526BU }, /* XSUM_XXH32_testdata[2886] */\n    { 1443, 0x9E3779B1U, 0xAAA56805U }, /* XSUM_XXH32_testdata[2887] */\n    { 1444, 0x00000000U, 0x3B321083U }, /* XSUM_XXH32_testdata[2888] */\n    { 1444, 0x9E3779B1U, 0xC84F89FAU }, /* XSUM_XXH32_testdata[2889] */\n    { 1445, 0x00000000U, 0x2A2E4FCAU }, /* XSUM_XXH32_testdata[2890] */\n    { 1445, 0x9E3779B1U, 0x646272DCU }, /* XSUM_XXH32_testdata[2891] */\n    { 1446, 0x00000000U, 0x3F2FF28FU }, /* XSUM_XXH32_testdata[2892] */\n    { 1446, 0x9E3779B1U, 0x5906DC49U }, /* XSUM_XXH32_testdata[2893] */\n    { 1447, 0x00000000U, 0x897B22D0U }, /* XSUM_XXH32_testdata[2894] */\n    { 1447, 0x9E3779B1U, 0x89A088E7U }, /* XSUM_XXH32_testdata[2895] */\n    { 1448, 0x00000000U, 0x4C898B3AU }, /* XSUM_XXH32_testdata[2896] */\n    { 1448, 0x9E3779B1U, 0x12C8E645U }, /* XSUM_XXH32_testdata[2897] */\n    { 1449, 0x00000000U, 0xC5B555C4U }, /* XSUM_XXH32_testdata[2898] */\n    { 1449, 0x9E3779B1U, 0x3A8EE208U }, /* XSUM_XXH32_testdata[2899] */\n    { 1450, 0x00000000U, 0xC81121CEU }, /* XSUM_XXH32_testdata[2900] */\n    { 1450, 0x9E3779B1U, 0x2C11D7DFU }, /* XSUM_XXH32_testdata[2901] */\n    { 1451, 0x00000000U, 0x27EBC1E1U }, /* XSUM_XXH32_testdata[2902] */\n    { 1451, 0x9E3779B1U, 0x150C1A09U }, /* XSUM_XXH32_testdata[2903] */\n    { 1452, 0x00000000U, 0xF57F7F47U }, /* XSUM_XXH32_testdata[2904] */\n    { 1452, 0x9E3779B1U, 0xC896F626U }, /* XSUM_XXH32_testdata[2905] */\n    { 1453, 0x00000000U, 0xB15772A2U }, /* XSUM_XXH32_testdata[2906] */\n    { 1453, 0x9E3779B1U, 0xBD60C28BU }, /* XSUM_XXH32_testdata[2907] */\n    { 1454, 0x00000000U, 0x8E2D55E3U }, /* XSUM_XXH32_testdata[2908] */\n    { 1454, 0x9E3779B1U, 0xDF18385DU }, /* XSUM_XXH32_testdata[2909] */\n    { 1455, 0x00000000U, 0x7D0BC3ADU }, /* XSUM_XXH32_testdata[2910] */\n    { 1455, 0x9E3779B1U, 0x48DCD49FU }, /* XSUM_XXH32_testdata[2911] */\n    { 1456, 0x00000000U, 0x99FB477DU }, /* XSUM_XXH32_testdata[2912] */\n    { 1456, 0x9E3779B1U, 0x902CA6AAU }, /* XSUM_XXH32_testdata[2913] */\n    { 1457, 0x00000000U, 0xB267EB4CU }, /* XSUM_XXH32_testdata[2914] */\n    { 1457, 0x9E3779B1U, 0x56DA93D9U }, /* XSUM_XXH32_testdata[2915] */\n    { 1458, 0x00000000U, 0x4F1C3B24U }, /* XSUM_XXH32_testdata[2916] */\n    { 1458, 0x9E3779B1U, 0x2F707029U }, /* XSUM_XXH32_testdata[2917] */\n    { 1459, 0x00000000U, 0xE192EC10U }, /* XSUM_XXH32_testdata[2918] */\n    { 1459, 0x9E3779B1U, 0xE99EEC91U }, /* XSUM_XXH32_testdata[2919] */\n    { 1460, 0x00000000U, 0x64563F28U }, /* XSUM_XXH32_testdata[2920] */\n    { 1460, 0x9E3779B1U, 0x793DB711U }, /* XSUM_XXH32_testdata[2921] */\n    { 1461, 0x00000000U, 0xD772C184U }, /* XSUM_XXH32_testdata[2922] */\n    { 1461, 0x9E3779B1U, 0x0FE2DAF3U }, /* XSUM_XXH32_testdata[2923] */\n    { 1462, 0x00000000U, 0x76E3DC31U }, /* XSUM_XXH32_testdata[2924] */\n    { 1462, 0x9E3779B1U, 0x254AD675U }, /* XSUM_XXH32_testdata[2925] */\n    { 1463, 0x00000000U, 0xB1942E60U }, /* XSUM_XXH32_testdata[2926] */\n    { 1463, 0x9E3779B1U, 0xE1825B19U }, /* XSUM_XXH32_testdata[2927] */\n    { 1464, 0x00000000U, 0x56275E1AU }, /* XSUM_XXH32_testdata[2928] */\n    { 1464, 0x9E3779B1U, 0xECF903CDU }, /* XSUM_XXH32_testdata[2929] */\n    { 1465, 0x00000000U, 0x2AF29989U }, /* XSUM_XXH32_testdata[2930] */\n    { 1465, 0x9E3779B1U, 0xD9420B30U }, /* XSUM_XXH32_testdata[2931] */\n    { 1466, 0x00000000U, 0x27E74C8BU }, /* XSUM_XXH32_testdata[2932] */\n    { 1466, 0x9E3779B1U, 0xDA1E69CBU }, /* XSUM_XXH32_testdata[2933] */\n    { 1467, 0x00000000U, 0xA04901DBU }, /* XSUM_XXH32_testdata[2934] */\n    { 1467, 0x9E3779B1U, 0x607C8CAAU }, /* XSUM_XXH32_testdata[2935] */\n    { 1468, 0x00000000U, 0xBBE4680AU }, /* XSUM_XXH32_testdata[2936] */\n    { 1468, 0x9E3779B1U, 0x064A986EU }, /* XSUM_XXH32_testdata[2937] */\n    { 1469, 0x00000000U, 0x3DADD008U }, /* XSUM_XXH32_testdata[2938] */\n    { 1469, 0x9E3779B1U, 0xD2A871C1U }, /* XSUM_XXH32_testdata[2939] */\n    { 1470, 0x00000000U, 0xCA095253U }, /* XSUM_XXH32_testdata[2940] */\n    { 1470, 0x9E3779B1U, 0x8CA6E1BBU }, /* XSUM_XXH32_testdata[2941] */\n    { 1471, 0x00000000U, 0x5AF8F550U }, /* XSUM_XXH32_testdata[2942] */\n    { 1471, 0x9E3779B1U, 0xCEDC8EC4U }, /* XSUM_XXH32_testdata[2943] */\n    { 1472, 0x00000000U, 0xA07B441AU }, /* XSUM_XXH32_testdata[2944] */\n    { 1472, 0x9E3779B1U, 0x5507B3F0U }, /* XSUM_XXH32_testdata[2945] */\n    { 1473, 0x00000000U, 0xAAF45E2FU }, /* XSUM_XXH32_testdata[2946] */\n    { 1473, 0x9E3779B1U, 0x1ED667D2U }, /* XSUM_XXH32_testdata[2947] */\n    { 1474, 0x00000000U, 0xB5CA74FDU }, /* XSUM_XXH32_testdata[2948] */\n    { 1474, 0x9E3779B1U, 0x43524B7DU }, /* XSUM_XXH32_testdata[2949] */\n    { 1475, 0x00000000U, 0xCF8DFD2EU }, /* XSUM_XXH32_testdata[2950] */\n    { 1475, 0x9E3779B1U, 0x6F25725DU }, /* XSUM_XXH32_testdata[2951] */\n    { 1476, 0x00000000U, 0xA89A68F6U }, /* XSUM_XXH32_testdata[2952] */\n    { 1476, 0x9E3779B1U, 0xAB183A36U }, /* XSUM_XXH32_testdata[2953] */\n    { 1477, 0x00000000U, 0x83496213U }, /* XSUM_XXH32_testdata[2954] */\n    { 1477, 0x9E3779B1U, 0xA407EEF5U }, /* XSUM_XXH32_testdata[2955] */\n    { 1478, 0x00000000U, 0x156DA784U }, /* XSUM_XXH32_testdata[2956] */\n    { 1478, 0x9E3779B1U, 0x0A2FCEFAU }, /* XSUM_XXH32_testdata[2957] */\n    { 1479, 0x00000000U, 0x629390E3U }, /* XSUM_XXH32_testdata[2958] */\n    { 1479, 0x9E3779B1U, 0xF6438AD7U }, /* XSUM_XXH32_testdata[2959] */\n    { 1480, 0x00000000U, 0x964F5433U }, /* XSUM_XXH32_testdata[2960] */\n    { 1480, 0x9E3779B1U, 0xC87AA437U }, /* XSUM_XXH32_testdata[2961] */\n    { 1481, 0x00000000U, 0x4FFB969CU }, /* XSUM_XXH32_testdata[2962] */\n    { 1481, 0x9E3779B1U, 0xB06FCA77U }, /* XSUM_XXH32_testdata[2963] */\n    { 1482, 0x00000000U, 0x29FA6415U }, /* XSUM_XXH32_testdata[2964] */\n    { 1482, 0x9E3779B1U, 0x32D0A061U }, /* XSUM_XXH32_testdata[2965] */\n    { 1483, 0x00000000U, 0x7AC08121U }, /* XSUM_XXH32_testdata[2966] */\n    { 1483, 0x9E3779B1U, 0x6018A9D9U }, /* XSUM_XXH32_testdata[2967] */\n    { 1484, 0x00000000U, 0x563D07CBU }, /* XSUM_XXH32_testdata[2968] */\n    { 1484, 0x9E3779B1U, 0x4E5044BAU }, /* XSUM_XXH32_testdata[2969] */\n    { 1485, 0x00000000U, 0xECEE3205U }, /* XSUM_XXH32_testdata[2970] */\n    { 1485, 0x9E3779B1U, 0xF26D5CFBU }, /* XSUM_XXH32_testdata[2971] */\n    { 1486, 0x00000000U, 0x2058A8BAU }, /* XSUM_XXH32_testdata[2972] */\n    { 1486, 0x9E3779B1U, 0xC3DA1C88U }, /* XSUM_XXH32_testdata[2973] */\n    { 1487, 0x00000000U, 0x5F4FBAA4U }, /* XSUM_XXH32_testdata[2974] */\n    { 1487, 0x9E3779B1U, 0x129D0986U }, /* XSUM_XXH32_testdata[2975] */\n    { 1488, 0x00000000U, 0xCF6B03FCU }, /* XSUM_XXH32_testdata[2976] */\n    { 1488, 0x9E3779B1U, 0xDD6944C8U }, /* XSUM_XXH32_testdata[2977] */\n    { 1489, 0x00000000U, 0xB619554CU }, /* XSUM_XXH32_testdata[2978] */\n    { 1489, 0x9E3779B1U, 0xCDC97809U }, /* XSUM_XXH32_testdata[2979] */\n    { 1490, 0x00000000U, 0xAD7132F7U }, /* XSUM_XXH32_testdata[2980] */\n    { 1490, 0x9E3779B1U, 0x386790A9U }, /* XSUM_XXH32_testdata[2981] */\n    { 1491, 0x00000000U, 0x9A87DD2BU }, /* XSUM_XXH32_testdata[2982] */\n    { 1491, 0x9E3779B1U, 0x54B35790U }, /* XSUM_XXH32_testdata[2983] */\n    { 1492, 0x00000000U, 0x02C8444FU }, /* XSUM_XXH32_testdata[2984] */\n    { 1492, 0x9E3779B1U, 0xCFB45FEEU }, /* XSUM_XXH32_testdata[2985] */\n    { 1493, 0x00000000U, 0xCE87416BU }, /* XSUM_XXH32_testdata[2986] */\n    { 1493, 0x9E3779B1U, 0x0C212296U }, /* XSUM_XXH32_testdata[2987] */\n    { 1494, 0x00000000U, 0x4D57C6D5U }, /* XSUM_XXH32_testdata[2988] */\n    { 1494, 0x9E3779B1U, 0x53F52AE8U }, /* XSUM_XXH32_testdata[2989] */\n    { 1495, 0x00000000U, 0xF4F18C65U }, /* XSUM_XXH32_testdata[2990] */\n    { 1495, 0x9E3779B1U, 0x2F34B21FU }, /* XSUM_XXH32_testdata[2991] */\n    { 1496, 0x00000000U, 0x331FD711U }, /* XSUM_XXH32_testdata[2992] */\n    { 1496, 0x9E3779B1U, 0xDD314583U }, /* XSUM_XXH32_testdata[2993] */\n    { 1497, 0x00000000U, 0x64D5DAD8U }, /* XSUM_XXH32_testdata[2994] */\n    { 1497, 0x9E3779B1U, 0x77C85656U }, /* XSUM_XXH32_testdata[2995] */\n    { 1498, 0x00000000U, 0x3DB5FA68U }, /* XSUM_XXH32_testdata[2996] */\n    { 1498, 0x9E3779B1U, 0xD7507175U }, /* XSUM_XXH32_testdata[2997] */\n    { 1499, 0x00000000U, 0x9418E95AU }, /* XSUM_XXH32_testdata[2998] */\n    { 1499, 0x9E3779B1U, 0x918D3ADFU }, /* XSUM_XXH32_testdata[2999] */\n    { 1500, 0x00000000U, 0x674259FFU }, /* XSUM_XXH32_testdata[3000] */\n    { 1500, 0x9E3779B1U, 0xE0EFA6CCU }, /* XSUM_XXH32_testdata[3001] */\n    { 1501, 0x00000000U, 0x4E07DE91U }, /* XSUM_XXH32_testdata[3002] */\n    { 1501, 0x9E3779B1U, 0xBA624772U }, /* XSUM_XXH32_testdata[3003] */\n    { 1502, 0x00000000U, 0x03110631U }, /* XSUM_XXH32_testdata[3004] */\n    { 1502, 0x9E3779B1U, 0xA888214EU }, /* XSUM_XXH32_testdata[3005] */\n    { 1503, 0x00000000U, 0x87144AA6U }, /* XSUM_XXH32_testdata[3006] */\n    { 1503, 0x9E3779B1U, 0x84E14834U }, /* XSUM_XXH32_testdata[3007] */\n    { 1504, 0x00000000U, 0x41785DE7U }, /* XSUM_XXH32_testdata[3008] */\n    { 1504, 0x9E3779B1U, 0x33C2EC4EU }, /* XSUM_XXH32_testdata[3009] */\n    { 1505, 0x00000000U, 0xCE8FEAFDU }, /* XSUM_XXH32_testdata[3010] */\n    { 1505, 0x9E3779B1U, 0x4CBF6CA8U }, /* XSUM_XXH32_testdata[3011] */\n    { 1506, 0x00000000U, 0xE26FDA0CU }, /* XSUM_XXH32_testdata[3012] */\n    { 1506, 0x9E3779B1U, 0x14F27E32U }, /* XSUM_XXH32_testdata[3013] */\n    { 1507, 0x00000000U, 0xE07C8111U }, /* XSUM_XXH32_testdata[3014] */\n    { 1507, 0x9E3779B1U, 0xEDA376E0U }, /* XSUM_XXH32_testdata[3015] */\n    { 1508, 0x00000000U, 0x6E8003DDU }, /* XSUM_XXH32_testdata[3016] */\n    { 1508, 0x9E3779B1U, 0x82A82D30U }, /* XSUM_XXH32_testdata[3017] */\n    { 1509, 0x00000000U, 0xD137BE39U }, /* XSUM_XXH32_testdata[3018] */\n    { 1509, 0x9E3779B1U, 0x4F015C3EU }, /* XSUM_XXH32_testdata[3019] */\n    { 1510, 0x00000000U, 0xFEDEB13BU }, /* XSUM_XXH32_testdata[3020] */\n    { 1510, 0x9E3779B1U, 0x132FBE15U }, /* XSUM_XXH32_testdata[3021] */\n    { 1511, 0x00000000U, 0x7325E15FU }, /* XSUM_XXH32_testdata[3022] */\n    { 1511, 0x9E3779B1U, 0xEB95FE4EU }, /* XSUM_XXH32_testdata[3023] */\n    { 1512, 0x00000000U, 0xC2A22C8CU }, /* XSUM_XXH32_testdata[3024] */\n    { 1512, 0x9E3779B1U, 0x383E1AC9U }, /* XSUM_XXH32_testdata[3025] */\n    { 1513, 0x00000000U, 0xFDD37C10U }, /* XSUM_XXH32_testdata[3026] */\n    { 1513, 0x9E3779B1U, 0xFBDC4EA7U }, /* XSUM_XXH32_testdata[3027] */\n    { 1514, 0x00000000U, 0x4CBC00D0U }, /* XSUM_XXH32_testdata[3028] */\n    { 1514, 0x9E3779B1U, 0x98C3F136U }, /* XSUM_XXH32_testdata[3029] */\n    { 1515, 0x00000000U, 0xDB7E0D03U }, /* XSUM_XXH32_testdata[3030] */\n    { 1515, 0x9E3779B1U, 0xEBB98383U }, /* XSUM_XXH32_testdata[3031] */\n    { 1516, 0x00000000U, 0x95410C0FU }, /* XSUM_XXH32_testdata[3032] */\n    { 1516, 0x9E3779B1U, 0x40AFA4BDU }, /* XSUM_XXH32_testdata[3033] */\n    { 1517, 0x00000000U, 0x7FA84979U }, /* XSUM_XXH32_testdata[3034] */\n    { 1517, 0x9E3779B1U, 0x3357E626U }, /* XSUM_XXH32_testdata[3035] */\n    { 1518, 0x00000000U, 0x0D1F40E5U }, /* XSUM_XXH32_testdata[3036] */\n    { 1518, 0x9E3779B1U, 0x2D2C352FU }, /* XSUM_XXH32_testdata[3037] */\n    { 1519, 0x00000000U, 0xB0A1BE9FU }, /* XSUM_XXH32_testdata[3038] */\n    { 1519, 0x9E3779B1U, 0x0F550ACAU }, /* XSUM_XXH32_testdata[3039] */\n    { 1520, 0x00000000U, 0x7474BFB8U }, /* XSUM_XXH32_testdata[3040] */\n    { 1520, 0x9E3779B1U, 0x17693B78U }, /* XSUM_XXH32_testdata[3041] */\n    { 1521, 0x00000000U, 0x626CDFA2U }, /* XSUM_XXH32_testdata[3042] */\n    { 1521, 0x9E3779B1U, 0xCC95C9AFU }, /* XSUM_XXH32_testdata[3043] */\n    { 1522, 0x00000000U, 0x19509450U }, /* XSUM_XXH32_testdata[3044] */\n    { 1522, 0x9E3779B1U, 0xD2009357U }, /* XSUM_XXH32_testdata[3045] */\n    { 1523, 0x00000000U, 0x769D6B1FU }, /* XSUM_XXH32_testdata[3046] */\n    { 1523, 0x9E3779B1U, 0xADB558C6U }, /* XSUM_XXH32_testdata[3047] */\n    { 1524, 0x00000000U, 0x4D443049U }, /* XSUM_XXH32_testdata[3048] */\n    { 1524, 0x9E3779B1U, 0xB3A1687CU }, /* XSUM_XXH32_testdata[3049] */\n    { 1525, 0x00000000U, 0xFB204799U }, /* XSUM_XXH32_testdata[3050] */\n    { 1525, 0x9E3779B1U, 0xD2C092DEU }, /* XSUM_XXH32_testdata[3051] */\n    { 1526, 0x00000000U, 0xBF3CA14CU }, /* XSUM_XXH32_testdata[3052] */\n    { 1526, 0x9E3779B1U, 0x39D0056CU }, /* XSUM_XXH32_testdata[3053] */\n    { 1527, 0x00000000U, 0xAE18783FU }, /* XSUM_XXH32_testdata[3054] */\n    { 1527, 0x9E3779B1U, 0x8815EF45U }, /* XSUM_XXH32_testdata[3055] */\n    { 1528, 0x00000000U, 0x0E703449U }, /* XSUM_XXH32_testdata[3056] */\n    { 1528, 0x9E3779B1U, 0x328B093AU }, /* XSUM_XXH32_testdata[3057] */\n    { 1529, 0x00000000U, 0x05471860U }, /* XSUM_XXH32_testdata[3058] */\n    { 1529, 0x9E3779B1U, 0x17CE7233U }, /* XSUM_XXH32_testdata[3059] */\n    { 1530, 0x00000000U, 0x6A0B50F5U }, /* XSUM_XXH32_testdata[3060] */\n    { 1530, 0x9E3779B1U, 0x057CCE6DU }, /* XSUM_XXH32_testdata[3061] */\n    { 1531, 0x00000000U, 0x7A6F6CFFU }, /* XSUM_XXH32_testdata[3062] */\n    { 1531, 0x9E3779B1U, 0xE16B59A3U }, /* XSUM_XXH32_testdata[3063] */\n    { 1532, 0x00000000U, 0x14E75DF7U }, /* XSUM_XXH32_testdata[3064] */\n    { 1532, 0x9E3779B1U, 0x9E23C989U }, /* XSUM_XXH32_testdata[3065] */\n    { 1533, 0x00000000U, 0xDDDFCE27U }, /* XSUM_XXH32_testdata[3066] */\n    { 1533, 0x9E3779B1U, 0xF4B30D84U }, /* XSUM_XXH32_testdata[3067] */\n    { 1534, 0x00000000U, 0x9E6E08B2U }, /* XSUM_XXH32_testdata[3068] */\n    { 1534, 0x9E3779B1U, 0x41E04963U }, /* XSUM_XXH32_testdata[3069] */\n    { 1535, 0x00000000U, 0xEF50F869U }, /* XSUM_XXH32_testdata[3070] */\n    { 1535, 0x9E3779B1U, 0xFAFD83C0U }, /* XSUM_XXH32_testdata[3071] */\n    { 1536, 0x00000000U, 0xCAEAC495U }, /* XSUM_XXH32_testdata[3072] */\n    { 1536, 0x9E3779B1U, 0xA8CC0205U }, /* XSUM_XXH32_testdata[3073] */\n    { 1537, 0x00000000U, 0xE3D25FD3U }, /* XSUM_XXH32_testdata[3074] */\n    { 1537, 0x9E3779B1U, 0x5D16D2F5U }, /* XSUM_XXH32_testdata[3075] */\n    { 1538, 0x00000000U, 0x487B3691U }, /* XSUM_XXH32_testdata[3076] */\n    { 1538, 0x9E3779B1U, 0xF3978D4AU }, /* XSUM_XXH32_testdata[3077] */\n    { 1539, 0x00000000U, 0x3898029BU }, /* XSUM_XXH32_testdata[3078] */\n    { 1539, 0x9E3779B1U, 0x3FCC4B91U }, /* XSUM_XXH32_testdata[3079] */\n    { 1540, 0x00000000U, 0xB7DDBCA0U }, /* XSUM_XXH32_testdata[3080] */\n    { 1540, 0x9E3779B1U, 0x45E04D2CU }, /* XSUM_XXH32_testdata[3081] */\n    { 1541, 0x00000000U, 0xC37F7E70U }, /* XSUM_XXH32_testdata[3082] */\n    { 1541, 0x9E3779B1U, 0xFE16DD89U }, /* XSUM_XXH32_testdata[3083] */\n    { 1542, 0x00000000U, 0x060AE3DEU }, /* XSUM_XXH32_testdata[3084] */\n    { 1542, 0x9E3779B1U, 0x85B6EC0AU }, /* XSUM_XXH32_testdata[3085] */\n    { 1543, 0x00000000U, 0xBB725132U }, /* XSUM_XXH32_testdata[3086] */\n    { 1543, 0x9E3779B1U, 0x71782E92U }, /* XSUM_XXH32_testdata[3087] */\n    { 1544, 0x00000000U, 0x7EE2D172U }, /* XSUM_XXH32_testdata[3088] */\n    { 1544, 0x9E3779B1U, 0xFF5C12C6U }, /* XSUM_XXH32_testdata[3089] */\n    { 1545, 0x00000000U, 0x5295D2E4U }, /* XSUM_XXH32_testdata[3090] */\n    { 1545, 0x9E3779B1U, 0x052C95F6U }, /* XSUM_XXH32_testdata[3091] */\n    { 1546, 0x00000000U, 0xE67BAB10U }, /* XSUM_XXH32_testdata[3092] */\n    { 1546, 0x9E3779B1U, 0x15F52144U }, /* XSUM_XXH32_testdata[3093] */\n    { 1547, 0x00000000U, 0x6503A0A3U }, /* XSUM_XXH32_testdata[3094] */\n    { 1547, 0x9E3779B1U, 0xD4ACA0DEU }, /* XSUM_XXH32_testdata[3095] */\n    { 1548, 0x00000000U, 0x3362BDCEU }, /* XSUM_XXH32_testdata[3096] */\n    { 1548, 0x9E3779B1U, 0x517AF9BAU }, /* XSUM_XXH32_testdata[3097] */\n    { 1549, 0x00000000U, 0x60F74AC9U }, /* XSUM_XXH32_testdata[3098] */\n    { 1549, 0x9E3779B1U, 0x43271084U }, /* XSUM_XXH32_testdata[3099] */\n    { 1550, 0x00000000U, 0x0476F312U }, /* XSUM_XXH32_testdata[3100] */\n    { 1550, 0x9E3779B1U, 0xB42F9F68U }, /* XSUM_XXH32_testdata[3101] */\n    { 1551, 0x00000000U, 0xCDBF47ADU }, /* XSUM_XXH32_testdata[3102] */\n    { 1551, 0x9E3779B1U, 0xCAEA9D94U }, /* XSUM_XXH32_testdata[3103] */\n    { 1552, 0x00000000U, 0xBCD69D2EU }, /* XSUM_XXH32_testdata[3104] */\n    { 1552, 0x9E3779B1U, 0x7107F2FBU }, /* XSUM_XXH32_testdata[3105] */\n    { 1553, 0x00000000U, 0x142B122FU }, /* XSUM_XXH32_testdata[3106] */\n    { 1553, 0x9E3779B1U, 0x71FDE2CAU }, /* XSUM_XXH32_testdata[3107] */\n    { 1554, 0x00000000U, 0x45AABBB8U }, /* XSUM_XXH32_testdata[3108] */\n    { 1554, 0x9E3779B1U, 0x64AFA993U }, /* XSUM_XXH32_testdata[3109] */\n    { 1555, 0x00000000U, 0xB539794DU }, /* XSUM_XXH32_testdata[3110] */\n    { 1555, 0x9E3779B1U, 0x27D686FDU }, /* XSUM_XXH32_testdata[3111] */\n    { 1556, 0x00000000U, 0x101D2A68U }, /* XSUM_XXH32_testdata[3112] */\n    { 1556, 0x9E3779B1U, 0xD5A4C045U }, /* XSUM_XXH32_testdata[3113] */\n    { 1557, 0x00000000U, 0x97A150AAU }, /* XSUM_XXH32_testdata[3114] */\n    { 1557, 0x9E3779B1U, 0xA46B85DDU }, /* XSUM_XXH32_testdata[3115] */\n    { 1558, 0x00000000U, 0xBDD558BAU }, /* XSUM_XXH32_testdata[3116] */\n    { 1558, 0x9E3779B1U, 0xC886C618U }, /* XSUM_XXH32_testdata[3117] */\n    { 1559, 0x00000000U, 0xD4F7AFE9U }, /* XSUM_XXH32_testdata[3118] */\n    { 1559, 0x9E3779B1U, 0x318E5D9EU }, /* XSUM_XXH32_testdata[3119] */\n    { 1560, 0x00000000U, 0x2F45D9FBU }, /* XSUM_XXH32_testdata[3120] */\n    { 1560, 0x9E3779B1U, 0x331208FBU }, /* XSUM_XXH32_testdata[3121] */\n    { 1561, 0x00000000U, 0x008C885AU }, /* XSUM_XXH32_testdata[3122] */\n    { 1561, 0x9E3779B1U, 0xA70D4FFEU }, /* XSUM_XXH32_testdata[3123] */\n    { 1562, 0x00000000U, 0xF71796C8U }, /* XSUM_XXH32_testdata[3124] */\n    { 1562, 0x9E3779B1U, 0x252BDB47U }, /* XSUM_XXH32_testdata[3125] */\n    { 1563, 0x00000000U, 0xC6774B56U }, /* XSUM_XXH32_testdata[3126] */\n    { 1563, 0x9E3779B1U, 0xEB767076U }, /* XSUM_XXH32_testdata[3127] */\n    { 1564, 0x00000000U, 0x4C0A4B6CU }, /* XSUM_XXH32_testdata[3128] */\n    { 1564, 0x9E3779B1U, 0x57529A30U }, /* XSUM_XXH32_testdata[3129] */\n    { 1565, 0x00000000U, 0x5A136E53U }, /* XSUM_XXH32_testdata[3130] */\n    { 1565, 0x9E3779B1U, 0xE07A7093U }, /* XSUM_XXH32_testdata[3131] */\n    { 1566, 0x00000000U, 0x3E12759FU }, /* XSUM_XXH32_testdata[3132] */\n    { 1566, 0x9E3779B1U, 0xCE2C10E2U }, /* XSUM_XXH32_testdata[3133] */\n    { 1567, 0x00000000U, 0x6C45240DU }, /* XSUM_XXH32_testdata[3134] */\n    { 1567, 0x9E3779B1U, 0x80B2D8D4U }, /* XSUM_XXH32_testdata[3135] */\n    { 1568, 0x00000000U, 0xC345288AU }, /* XSUM_XXH32_testdata[3136] */\n    { 1568, 0x9E3779B1U, 0x61A52DC6U }, /* XSUM_XXH32_testdata[3137] */\n    { 1569, 0x00000000U, 0x941F7F2AU }, /* XSUM_XXH32_testdata[3138] */\n    { 1569, 0x9E3779B1U, 0xAEF866E2U }, /* XSUM_XXH32_testdata[3139] */\n    { 1570, 0x00000000U, 0x5AC3E1E9U }, /* XSUM_XXH32_testdata[3140] */\n    { 1570, 0x9E3779B1U, 0x82C08BD8U }, /* XSUM_XXH32_testdata[3141] */\n    { 1571, 0x00000000U, 0xE83EE277U }, /* XSUM_XXH32_testdata[3142] */\n    { 1571, 0x9E3779B1U, 0xEDEE8879U }, /* XSUM_XXH32_testdata[3143] */\n    { 1572, 0x00000000U, 0xE74B6772U }, /* XSUM_XXH32_testdata[3144] */\n    { 1572, 0x9E3779B1U, 0xF3A1613FU }, /* XSUM_XXH32_testdata[3145] */\n    { 1573, 0x00000000U, 0xA76838E6U }, /* XSUM_XXH32_testdata[3146] */\n    { 1573, 0x9E3779B1U, 0x6D41138BU }, /* XSUM_XXH32_testdata[3147] */\n    { 1574, 0x00000000U, 0x0A8F13C0U }, /* XSUM_XXH32_testdata[3148] */\n    { 1574, 0x9E3779B1U, 0x612E7A18U }, /* XSUM_XXH32_testdata[3149] */\n    { 1575, 0x00000000U, 0xF5AF3C9FU }, /* XSUM_XXH32_testdata[3150] */\n    { 1575, 0x9E3779B1U, 0x3B7FA341U }, /* XSUM_XXH32_testdata[3151] */\n    { 1576, 0x00000000U, 0xD27B3DCEU }, /* XSUM_XXH32_testdata[3152] */\n    { 1576, 0x9E3779B1U, 0x1F31D76DU }, /* XSUM_XXH32_testdata[3153] */\n    { 1577, 0x00000000U, 0xB55D9484U }, /* XSUM_XXH32_testdata[3154] */\n    { 1577, 0x9E3779B1U, 0x46B6C803U }, /* XSUM_XXH32_testdata[3155] */\n    { 1578, 0x00000000U, 0x3752DBDDU }, /* XSUM_XXH32_testdata[3156] */\n    { 1578, 0x9E3779B1U, 0x247E932FU }, /* XSUM_XXH32_testdata[3157] */\n    { 1579, 0x00000000U, 0x912CDF3DU }, /* XSUM_XXH32_testdata[3158] */\n    { 1579, 0x9E3779B1U, 0x9836AF33U }, /* XSUM_XXH32_testdata[3159] */\n    { 1580, 0x00000000U, 0xA9DE063CU }, /* XSUM_XXH32_testdata[3160] */\n    { 1580, 0x9E3779B1U, 0xF4EE7FA9U }, /* XSUM_XXH32_testdata[3161] */\n    { 1581, 0x00000000U, 0x06749F4FU }, /* XSUM_XXH32_testdata[3162] */\n    { 1581, 0x9E3779B1U, 0xFCC5252DU }, /* XSUM_XXH32_testdata[3163] */\n    { 1582, 0x00000000U, 0x5DC1592BU }, /* XSUM_XXH32_testdata[3164] */\n    { 1582, 0x9E3779B1U, 0xFF68F018U }, /* XSUM_XXH32_testdata[3165] */\n    { 1583, 0x00000000U, 0x743D7A27U }, /* XSUM_XXH32_testdata[3166] */\n    { 1583, 0x9E3779B1U, 0xAAEF044BU }, /* XSUM_XXH32_testdata[3167] */\n    { 1584, 0x00000000U, 0xD5404470U }, /* XSUM_XXH32_testdata[3168] */\n    { 1584, 0x9E3779B1U, 0xF132B470U }, /* XSUM_XXH32_testdata[3169] */\n    { 1585, 0x00000000U, 0xDA7360D4U }, /* XSUM_XXH32_testdata[3170] */\n    { 1585, 0x9E3779B1U, 0x1EC1B37EU }, /* XSUM_XXH32_testdata[3171] */\n    { 1586, 0x00000000U, 0x445FB92CU }, /* XSUM_XXH32_testdata[3172] */\n    { 1586, 0x9E3779B1U, 0x7481A47FU }, /* XSUM_XXH32_testdata[3173] */\n    { 1587, 0x00000000U, 0x5BD2477EU }, /* XSUM_XXH32_testdata[3174] */\n    { 1587, 0x9E3779B1U, 0xD4489185U }, /* XSUM_XXH32_testdata[3175] */\n    { 1588, 0x00000000U, 0x7DD85E84U }, /* XSUM_XXH32_testdata[3176] */\n    { 1588, 0x9E3779B1U, 0xEA64C606U }, /* XSUM_XXH32_testdata[3177] */\n    { 1589, 0x00000000U, 0x903FC496U }, /* XSUM_XXH32_testdata[3178] */\n    { 1589, 0x9E3779B1U, 0x825283F5U }, /* XSUM_XXH32_testdata[3179] */\n    { 1590, 0x00000000U, 0x81277601U }, /* XSUM_XXH32_testdata[3180] */\n    { 1590, 0x9E3779B1U, 0x27B1C618U }, /* XSUM_XXH32_testdata[3181] */\n    { 1591, 0x00000000U, 0x07B54E36U }, /* XSUM_XXH32_testdata[3182] */\n    { 1591, 0x9E3779B1U, 0x5DAB41E4U }, /* XSUM_XXH32_testdata[3183] */\n    { 1592, 0x00000000U, 0x62DFFFF5U }, /* XSUM_XXH32_testdata[3184] */\n    { 1592, 0x9E3779B1U, 0x3DCF3AA5U }, /* XSUM_XXH32_testdata[3185] */\n    { 1593, 0x00000000U, 0xF3330310U }, /* XSUM_XXH32_testdata[3186] */\n    { 1593, 0x9E3779B1U, 0x3FC691CBU }, /* XSUM_XXH32_testdata[3187] */\n    { 1594, 0x00000000U, 0xDEEEDC03U }, /* XSUM_XXH32_testdata[3188] */\n    { 1594, 0x9E3779B1U, 0xA95E5A7DU }, /* XSUM_XXH32_testdata[3189] */\n    { 1595, 0x00000000U, 0x2EE08B7FU }, /* XSUM_XXH32_testdata[3190] */\n    { 1595, 0x9E3779B1U, 0x88555D5BU }, /* XSUM_XXH32_testdata[3191] */\n    { 1596, 0x00000000U, 0xC4578E00U }, /* XSUM_XXH32_testdata[3192] */\n    { 1596, 0x9E3779B1U, 0xBB0305A3U }, /* XSUM_XXH32_testdata[3193] */\n    { 1597, 0x00000000U, 0xDE6AE940U }, /* XSUM_XXH32_testdata[3194] */\n    { 1597, 0x9E3779B1U, 0x2BA92E4EU }, /* XSUM_XXH32_testdata[3195] */\n    { 1598, 0x00000000U, 0x792980E1U }, /* XSUM_XXH32_testdata[3196] */\n    { 1598, 0x9E3779B1U, 0x0ED42502U }, /* XSUM_XXH32_testdata[3197] */\n    { 1599, 0x00000000U, 0x24F0A805U }, /* XSUM_XXH32_testdata[3198] */\n    { 1599, 0x9E3779B1U, 0x199FF9E1U }, /* XSUM_XXH32_testdata[3199] */\n    { 1600, 0x00000000U, 0x69C3E0B8U }, /* XSUM_XXH32_testdata[3200] */\n    { 1600, 0x9E3779B1U, 0xE6E788CAU }, /* XSUM_XXH32_testdata[3201] */\n    { 1601, 0x00000000U, 0x22AC8B9AU }, /* XSUM_XXH32_testdata[3202] */\n    { 1601, 0x9E3779B1U, 0x31651B71U }, /* XSUM_XXH32_testdata[3203] */\n    { 1602, 0x00000000U, 0x98B5775BU }, /* XSUM_XXH32_testdata[3204] */\n    { 1602, 0x9E3779B1U, 0xFFDBEAF5U }, /* XSUM_XXH32_testdata[3205] */\n    { 1603, 0x00000000U, 0x53229D3EU }, /* XSUM_XXH32_testdata[3206] */\n    { 1603, 0x9E3779B1U, 0xAEA4EA2BU }, /* XSUM_XXH32_testdata[3207] */\n    { 1604, 0x00000000U, 0xC0BEAF77U }, /* XSUM_XXH32_testdata[3208] */\n    { 1604, 0x9E3779B1U, 0x2E8891E7U }, /* XSUM_XXH32_testdata[3209] */\n    { 1605, 0x00000000U, 0x62124272U }, /* XSUM_XXH32_testdata[3210] */\n    { 1605, 0x9E3779B1U, 0x4FE4E574U }, /* XSUM_XXH32_testdata[3211] */\n    { 1606, 0x00000000U, 0x70586C78U }, /* XSUM_XXH32_testdata[3212] */\n    { 1606, 0x9E3779B1U, 0xF068C21FU }, /* XSUM_XXH32_testdata[3213] */\n    { 1607, 0x00000000U, 0xEE89B69AU }, /* XSUM_XXH32_testdata[3214] */\n    { 1607, 0x9E3779B1U, 0x723FAE30U }, /* XSUM_XXH32_testdata[3215] */\n    { 1608, 0x00000000U, 0x9ADB5F45U }, /* XSUM_XXH32_testdata[3216] */\n    { 1608, 0x9E3779B1U, 0xDDE5745AU }, /* XSUM_XXH32_testdata[3217] */\n    { 1609, 0x00000000U, 0x8FA79B0DU }, /* XSUM_XXH32_testdata[3218] */\n    { 1609, 0x9E3779B1U, 0x7C99609CU }, /* XSUM_XXH32_testdata[3219] */\n    { 1610, 0x00000000U, 0x16B32173U }, /* XSUM_XXH32_testdata[3220] */\n    { 1610, 0x9E3779B1U, 0x0497F374U }, /* XSUM_XXH32_testdata[3221] */\n    { 1611, 0x00000000U, 0xCBA2143CU }, /* XSUM_XXH32_testdata[3222] */\n    { 1611, 0x9E3779B1U, 0xDF9010FEU }, /* XSUM_XXH32_testdata[3223] */\n    { 1612, 0x00000000U, 0xADE62487U }, /* XSUM_XXH32_testdata[3224] */\n    { 1612, 0x9E3779B1U, 0xB44C25B3U }, /* XSUM_XXH32_testdata[3225] */\n    { 1613, 0x00000000U, 0x452CEDE9U }, /* XSUM_XXH32_testdata[3226] */\n    { 1613, 0x9E3779B1U, 0xF9AC73F0U }, /* XSUM_XXH32_testdata[3227] */\n    { 1614, 0x00000000U, 0xCC64BBE5U }, /* XSUM_XXH32_testdata[3228] */\n    { 1614, 0x9E3779B1U, 0x51E6057AU }, /* XSUM_XXH32_testdata[3229] */\n    { 1615, 0x00000000U, 0x4320809CU }, /* XSUM_XXH32_testdata[3230] */\n    { 1615, 0x9E3779B1U, 0x8388B4D2U }, /* XSUM_XXH32_testdata[3231] */\n    { 1616, 0x00000000U, 0x93DF3953U }, /* XSUM_XXH32_testdata[3232] */\n    { 1616, 0x9E3779B1U, 0x671A3AACU }, /* XSUM_XXH32_testdata[3233] */\n    { 1617, 0x00000000U, 0x04202C23U }, /* XSUM_XXH32_testdata[3234] */\n    { 1617, 0x9E3779B1U, 0x413FC0A0U }, /* XSUM_XXH32_testdata[3235] */\n    { 1618, 0x00000000U, 0x361C6485U }, /* XSUM_XXH32_testdata[3236] */\n    { 1618, 0x9E3779B1U, 0xF8111A49U }, /* XSUM_XXH32_testdata[3237] */\n    { 1619, 0x00000000U, 0x8A111046U }, /* XSUM_XXH32_testdata[3238] */\n    { 1619, 0x9E3779B1U, 0x48044B1DU }, /* XSUM_XXH32_testdata[3239] */\n    { 1620, 0x00000000U, 0x13D4185AU }, /* XSUM_XXH32_testdata[3240] */\n    { 1620, 0x9E3779B1U, 0xE93AD7B2U }, /* XSUM_XXH32_testdata[3241] */\n    { 1621, 0x00000000U, 0x5153C5C2U }, /* XSUM_XXH32_testdata[3242] */\n    { 1621, 0x9E3779B1U, 0xCB800472U }, /* XSUM_XXH32_testdata[3243] */\n    { 1622, 0x00000000U, 0x269D3B69U }, /* XSUM_XXH32_testdata[3244] */\n    { 1622, 0x9E3779B1U, 0xCDE65B27U }, /* XSUM_XXH32_testdata[3245] */\n    { 1623, 0x00000000U, 0x66377C72U }, /* XSUM_XXH32_testdata[3246] */\n    { 1623, 0x9E3779B1U, 0x810A240DU }, /* XSUM_XXH32_testdata[3247] */\n    { 1624, 0x00000000U, 0x6C594B68U }, /* XSUM_XXH32_testdata[3248] */\n    { 1624, 0x9E3779B1U, 0x0EB0699DU }, /* XSUM_XXH32_testdata[3249] */\n    { 1625, 0x00000000U, 0x9A5DC06AU }, /* XSUM_XXH32_testdata[3250] */\n    { 1625, 0x9E3779B1U, 0xDCC172F6U }, /* XSUM_XXH32_testdata[3251] */\n    { 1626, 0x00000000U, 0x0C1B45B9U }, /* XSUM_XXH32_testdata[3252] */\n    { 1626, 0x9E3779B1U, 0x34CC574DU }, /* XSUM_XXH32_testdata[3253] */\n    { 1627, 0x00000000U, 0x310CBE13U }, /* XSUM_XXH32_testdata[3254] */\n    { 1627, 0x9E3779B1U, 0xA9CB0D8AU }, /* XSUM_XXH32_testdata[3255] */\n    { 1628, 0x00000000U, 0xEDFF967DU }, /* XSUM_XXH32_testdata[3256] */\n    { 1628, 0x9E3779B1U, 0x8ED7DEA9U }, /* XSUM_XXH32_testdata[3257] */\n    { 1629, 0x00000000U, 0x651BF2CCU }, /* XSUM_XXH32_testdata[3258] */\n    { 1629, 0x9E3779B1U, 0x119A0D04U }, /* XSUM_XXH32_testdata[3259] */\n    { 1630, 0x00000000U, 0x71D3637AU }, /* XSUM_XXH32_testdata[3260] */\n    { 1630, 0x9E3779B1U, 0x50D31238U }, /* XSUM_XXH32_testdata[3261] */\n    { 1631, 0x00000000U, 0x67842A4CU }, /* XSUM_XXH32_testdata[3262] */\n    { 1631, 0x9E3779B1U, 0x78723313U }, /* XSUM_XXH32_testdata[3263] */\n    { 1632, 0x00000000U, 0x317673D3U }, /* XSUM_XXH32_testdata[3264] */\n    { 1632, 0x9E3779B1U, 0xBA999B66U }, /* XSUM_XXH32_testdata[3265] */\n    { 1633, 0x00000000U, 0xF9327254U }, /* XSUM_XXH32_testdata[3266] */\n    { 1633, 0x9E3779B1U, 0xA929E8BFU }, /* XSUM_XXH32_testdata[3267] */\n    { 1634, 0x00000000U, 0x4A8CEBC0U }, /* XSUM_XXH32_testdata[3268] */\n    { 1634, 0x9E3779B1U, 0xD7871C32U }, /* XSUM_XXH32_testdata[3269] */\n    { 1635, 0x00000000U, 0x2C3EAE94U }, /* XSUM_XXH32_testdata[3270] */\n    { 1635, 0x9E3779B1U, 0x9621F9C9U }, /* XSUM_XXH32_testdata[3271] */\n    { 1636, 0x00000000U, 0x3A9F4086U }, /* XSUM_XXH32_testdata[3272] */\n    { 1636, 0x9E3779B1U, 0x1FB22723U }, /* XSUM_XXH32_testdata[3273] */\n    { 1637, 0x00000000U, 0x4E05810FU }, /* XSUM_XXH32_testdata[3274] */\n    { 1637, 0x9E3779B1U, 0xA3FD1E61U }, /* XSUM_XXH32_testdata[3275] */\n    { 1638, 0x00000000U, 0x20673048U }, /* XSUM_XXH32_testdata[3276] */\n    { 1638, 0x9E3779B1U, 0xE63ECC6EU }, /* XSUM_XXH32_testdata[3277] */\n    { 1639, 0x00000000U, 0x78D87CC7U }, /* XSUM_XXH32_testdata[3278] */\n    { 1639, 0x9E3779B1U, 0x05F211C2U }, /* XSUM_XXH32_testdata[3279] */\n    { 1640, 0x00000000U, 0xDD0E43C9U }, /* XSUM_XXH32_testdata[3280] */\n    { 1640, 0x9E3779B1U, 0x80F9B51CU }, /* XSUM_XXH32_testdata[3281] */\n    { 1641, 0x00000000U, 0xEFE929FEU }, /* XSUM_XXH32_testdata[3282] */\n    { 1641, 0x9E3779B1U, 0x061AD4EDU }, /* XSUM_XXH32_testdata[3283] */\n    { 1642, 0x00000000U, 0x8F7B4847U }, /* XSUM_XXH32_testdata[3284] */\n    { 1642, 0x9E3779B1U, 0x569C592AU }, /* XSUM_XXH32_testdata[3285] */\n    { 1643, 0x00000000U, 0xC3378BE1U }, /* XSUM_XXH32_testdata[3286] */\n    { 1643, 0x9E3779B1U, 0x55CC7380U }, /* XSUM_XXH32_testdata[3287] */\n    { 1644, 0x00000000U, 0x664C36C2U }, /* XSUM_XXH32_testdata[3288] */\n    { 1644, 0x9E3779B1U, 0x81CC0C9DU }, /* XSUM_XXH32_testdata[3289] */\n    { 1645, 0x00000000U, 0xF33D179FU }, /* XSUM_XXH32_testdata[3290] */\n    { 1645, 0x9E3779B1U, 0xA233BFEAU }, /* XSUM_XXH32_testdata[3291] */\n    { 1646, 0x00000000U, 0x6818BCFBU }, /* XSUM_XXH32_testdata[3292] */\n    { 1646, 0x9E3779B1U, 0xAD02A241U }, /* XSUM_XXH32_testdata[3293] */\n    { 1647, 0x00000000U, 0xDFEDABA5U }, /* XSUM_XXH32_testdata[3294] */\n    { 1647, 0x9E3779B1U, 0xFEF25E03U }, /* XSUM_XXH32_testdata[3295] */\n    { 1648, 0x00000000U, 0x5AB37E18U }, /* XSUM_XXH32_testdata[3296] */\n    { 1648, 0x9E3779B1U, 0x4F27E3E9U }, /* XSUM_XXH32_testdata[3297] */\n    { 1649, 0x00000000U, 0x64272622U }, /* XSUM_XXH32_testdata[3298] */\n    { 1649, 0x9E3779B1U, 0x538E70B4U }, /* XSUM_XXH32_testdata[3299] */\n    { 1650, 0x00000000U, 0xCCD30467U }, /* XSUM_XXH32_testdata[3300] */\n    { 1650, 0x9E3779B1U, 0xD2E7EF12U }, /* XSUM_XXH32_testdata[3301] */\n    { 1651, 0x00000000U, 0xBAF49CE7U }, /* XSUM_XXH32_testdata[3302] */\n    { 1651, 0x9E3779B1U, 0x05D32855U }, /* XSUM_XXH32_testdata[3303] */\n    { 1652, 0x00000000U, 0x7AA0EDE0U }, /* XSUM_XXH32_testdata[3304] */\n    { 1652, 0x9E3779B1U, 0xC7605BC2U }, /* XSUM_XXH32_testdata[3305] */\n    { 1653, 0x00000000U, 0x27455A35U }, /* XSUM_XXH32_testdata[3306] */\n    { 1653, 0x9E3779B1U, 0xCB4D341DU }, /* XSUM_XXH32_testdata[3307] */\n    { 1654, 0x00000000U, 0x59C4E522U }, /* XSUM_XXH32_testdata[3308] */\n    { 1654, 0x9E3779B1U, 0x1F3255BEU }, /* XSUM_XXH32_testdata[3309] */\n    { 1655, 0x00000000U, 0x9CFAFF1DU }, /* XSUM_XXH32_testdata[3310] */\n    { 1655, 0x9E3779B1U, 0x4CB680F2U }, /* XSUM_XXH32_testdata[3311] */\n    { 1656, 0x00000000U, 0x5B310E7FU }, /* XSUM_XXH32_testdata[3312] */\n    { 1656, 0x9E3779B1U, 0x9B4C866FU }, /* XSUM_XXH32_testdata[3313] */\n    { 1657, 0x00000000U, 0x17AC02D8U }, /* XSUM_XXH32_testdata[3314] */\n    { 1657, 0x9E3779B1U, 0xB31D5FFFU }, /* XSUM_XXH32_testdata[3315] */\n    { 1658, 0x00000000U, 0x5B6F4445U }, /* XSUM_XXH32_testdata[3316] */\n    { 1658, 0x9E3779B1U, 0xD29EC0B9U }, /* XSUM_XXH32_testdata[3317] */\n    { 1659, 0x00000000U, 0xCC11B11FU }, /* XSUM_XXH32_testdata[3318] */\n    { 1659, 0x9E3779B1U, 0x4F398D58U }, /* XSUM_XXH32_testdata[3319] */\n    { 1660, 0x00000000U, 0x33E681A4U }, /* XSUM_XXH32_testdata[3320] */\n    { 1660, 0x9E3779B1U, 0x2C1373E0U }, /* XSUM_XXH32_testdata[3321] */\n    { 1661, 0x00000000U, 0x60E1313DU }, /* XSUM_XXH32_testdata[3322] */\n    { 1661, 0x9E3779B1U, 0x822F8D03U }, /* XSUM_XXH32_testdata[3323] */\n    { 1662, 0x00000000U, 0x62A047B0U }, /* XSUM_XXH32_testdata[3324] */\n    { 1662, 0x9E3779B1U, 0x46A24926U }, /* XSUM_XXH32_testdata[3325] */\n    { 1663, 0x00000000U, 0x3012204EU }, /* XSUM_XXH32_testdata[3326] */\n    { 1663, 0x9E3779B1U, 0x7169EF8BU }, /* XSUM_XXH32_testdata[3327] */\n    { 1664, 0x00000000U, 0x408F3A81U }, /* XSUM_XXH32_testdata[3328] */\n    { 1664, 0x9E3779B1U, 0x7C50BB58U }, /* XSUM_XXH32_testdata[3329] */\n    { 1665, 0x00000000U, 0x6C39225AU }, /* XSUM_XXH32_testdata[3330] */\n    { 1665, 0x9E3779B1U, 0xB669E5A9U }, /* XSUM_XXH32_testdata[3331] */\n    { 1666, 0x00000000U, 0x599550BBU }, /* XSUM_XXH32_testdata[3332] */\n    { 1666, 0x9E3779B1U, 0x65003175U }, /* XSUM_XXH32_testdata[3333] */\n    { 1667, 0x00000000U, 0xD404013CU }, /* XSUM_XXH32_testdata[3334] */\n    { 1667, 0x9E3779B1U, 0x60DFC657U }, /* XSUM_XXH32_testdata[3335] */\n    { 1668, 0x00000000U, 0xCD4EBD76U }, /* XSUM_XXH32_testdata[3336] */\n    { 1668, 0x9E3779B1U, 0x72EA10FEU }, /* XSUM_XXH32_testdata[3337] */\n    { 1669, 0x00000000U, 0xA679D904U }, /* XSUM_XXH32_testdata[3338] */\n    { 1669, 0x9E3779B1U, 0x37B164BAU }, /* XSUM_XXH32_testdata[3339] */\n    { 1670, 0x00000000U, 0x4DB14B0FU }, /* XSUM_XXH32_testdata[3340] */\n    { 1670, 0x9E3779B1U, 0xF5DC18A1U }, /* XSUM_XXH32_testdata[3341] */\n    { 1671, 0x00000000U, 0xB096F444U }, /* XSUM_XXH32_testdata[3342] */\n    { 1671, 0x9E3779B1U, 0xEFFB5BEFU }, /* XSUM_XXH32_testdata[3343] */\n    { 1672, 0x00000000U, 0x81FCEF81U }, /* XSUM_XXH32_testdata[3344] */\n    { 1672, 0x9E3779B1U, 0x8D2965EBU }, /* XSUM_XXH32_testdata[3345] */\n    { 1673, 0x00000000U, 0x8265AD62U }, /* XSUM_XXH32_testdata[3346] */\n    { 1673, 0x9E3779B1U, 0x49271FBEU }, /* XSUM_XXH32_testdata[3347] */\n    { 1674, 0x00000000U, 0x8E7C7FF9U }, /* XSUM_XXH32_testdata[3348] */\n    { 1674, 0x9E3779B1U, 0xADEB3401U }, /* XSUM_XXH32_testdata[3349] */\n    { 1675, 0x00000000U, 0x9A5E2DA0U }, /* XSUM_XXH32_testdata[3350] */\n    { 1675, 0x9E3779B1U, 0xEC9D7A32U }, /* XSUM_XXH32_testdata[3351] */\n    { 1676, 0x00000000U, 0x68E9E370U }, /* XSUM_XXH32_testdata[3352] */\n    { 1676, 0x9E3779B1U, 0xDB6F560BU }, /* XSUM_XXH32_testdata[3353] */\n    { 1677, 0x00000000U, 0x8E02268DU }, /* XSUM_XXH32_testdata[3354] */\n    { 1677, 0x9E3779B1U, 0x0B56E3D6U }, /* XSUM_XXH32_testdata[3355] */\n    { 1678, 0x00000000U, 0x45CC6C57U }, /* XSUM_XXH32_testdata[3356] */\n    { 1678, 0x9E3779B1U, 0xCC9779C0U }, /* XSUM_XXH32_testdata[3357] */\n    { 1679, 0x00000000U, 0x2324FBA7U }, /* XSUM_XXH32_testdata[3358] */\n    { 1679, 0x9E3779B1U, 0x244537E0U }, /* XSUM_XXH32_testdata[3359] */\n    { 1680, 0x00000000U, 0xC62F556DU }, /* XSUM_XXH32_testdata[3360] */\n    { 1680, 0x9E3779B1U, 0x9B94A640U }, /* XSUM_XXH32_testdata[3361] */\n    { 1681, 0x00000000U, 0x681F98E5U }, /* XSUM_XXH32_testdata[3362] */\n    { 1681, 0x9E3779B1U, 0x17D4BAEAU }, /* XSUM_XXH32_testdata[3363] */\n    { 1682, 0x00000000U, 0x99E09BB2U }, /* XSUM_XXH32_testdata[3364] */\n    { 1682, 0x9E3779B1U, 0xF72A51BAU }, /* XSUM_XXH32_testdata[3365] */\n    { 1683, 0x00000000U, 0x042B1A8DU }, /* XSUM_XXH32_testdata[3366] */\n    { 1683, 0x9E3779B1U, 0xD0CAD102U }, /* XSUM_XXH32_testdata[3367] */\n    { 1684, 0x00000000U, 0x82EB1661U }, /* XSUM_XXH32_testdata[3368] */\n    { 1684, 0x9E3779B1U, 0x82776D3AU }, /* XSUM_XXH32_testdata[3369] */\n    { 1685, 0x00000000U, 0x3E97EED3U }, /* XSUM_XXH32_testdata[3370] */\n    { 1685, 0x9E3779B1U, 0xE5135CF4U }, /* XSUM_XXH32_testdata[3371] */\n    { 1686, 0x00000000U, 0x3D0D6E6DU }, /* XSUM_XXH32_testdata[3372] */\n    { 1686, 0x9E3779B1U, 0x9809AEAFU }, /* XSUM_XXH32_testdata[3373] */\n    { 1687, 0x00000000U, 0x615E6059U }, /* XSUM_XXH32_testdata[3374] */\n    { 1687, 0x9E3779B1U, 0xCCFCDC15U }, /* XSUM_XXH32_testdata[3375] */\n    { 1688, 0x00000000U, 0x3B63CFFAU }, /* XSUM_XXH32_testdata[3376] */\n    { 1688, 0x9E3779B1U, 0xA2D1E698U }, /* XSUM_XXH32_testdata[3377] */\n    { 1689, 0x00000000U, 0xCA855ACEU }, /* XSUM_XXH32_testdata[3378] */\n    { 1689, 0x9E3779B1U, 0xE49B6DF2U }, /* XSUM_XXH32_testdata[3379] */\n    { 1690, 0x00000000U, 0xDAD3ECACU }, /* XSUM_XXH32_testdata[3380] */\n    { 1690, 0x9E3779B1U, 0xFE88C14AU }, /* XSUM_XXH32_testdata[3381] */\n    { 1691, 0x00000000U, 0x52FA0946U }, /* XSUM_XXH32_testdata[3382] */\n    { 1691, 0x9E3779B1U, 0x1A782519U }, /* XSUM_XXH32_testdata[3383] */\n    { 1692, 0x00000000U, 0xFDB31695U }, /* XSUM_XXH32_testdata[3384] */\n    { 1692, 0x9E3779B1U, 0xF7CBB51DU }, /* XSUM_XXH32_testdata[3385] */\n    { 1693, 0x00000000U, 0xE9D5F2BAU }, /* XSUM_XXH32_testdata[3386] */\n    { 1693, 0x9E3779B1U, 0x99A31C9BU }, /* XSUM_XXH32_testdata[3387] */\n    { 1694, 0x00000000U, 0x5459DBAFU }, /* XSUM_XXH32_testdata[3388] */\n    { 1694, 0x9E3779B1U, 0xDBBCD8B0U }, /* XSUM_XXH32_testdata[3389] */\n    { 1695, 0x00000000U, 0xBA88B7F2U }, /* XSUM_XXH32_testdata[3390] */\n    { 1695, 0x9E3779B1U, 0xB0FC5975U }, /* XSUM_XXH32_testdata[3391] */\n    { 1696, 0x00000000U, 0x542E753BU }, /* XSUM_XXH32_testdata[3392] */\n    { 1696, 0x9E3779B1U, 0x6F41F0EAU }, /* XSUM_XXH32_testdata[3393] */\n    { 1697, 0x00000000U, 0xD747761AU }, /* XSUM_XXH32_testdata[3394] */\n    { 1697, 0x9E3779B1U, 0x46E6312CU }, /* XSUM_XXH32_testdata[3395] */\n    { 1698, 0x00000000U, 0x9548110BU }, /* XSUM_XXH32_testdata[3396] */\n    { 1698, 0x9E3779B1U, 0xA42C1D06U }, /* XSUM_XXH32_testdata[3397] */\n    { 1699, 0x00000000U, 0x2CF0AAE6U }, /* XSUM_XXH32_testdata[3398] */\n    { 1699, 0x9E3779B1U, 0x10780840U }, /* XSUM_XXH32_testdata[3399] */\n    { 1700, 0x00000000U, 0xA6AA95F5U }, /* XSUM_XXH32_testdata[3400] */\n    { 1700, 0x9E3779B1U, 0xE9B158A6U }, /* XSUM_XXH32_testdata[3401] */\n    { 1701, 0x00000000U, 0x5A9A645CU }, /* XSUM_XXH32_testdata[3402] */\n    { 1701, 0x9E3779B1U, 0x3BAE2478U }, /* XSUM_XXH32_testdata[3403] */\n    { 1702, 0x00000000U, 0x192C8773U }, /* XSUM_XXH32_testdata[3404] */\n    { 1702, 0x9E3779B1U, 0xBD13D3E0U }, /* XSUM_XXH32_testdata[3405] */\n    { 1703, 0x00000000U, 0xD5B93B41U }, /* XSUM_XXH32_testdata[3406] */\n    { 1703, 0x9E3779B1U, 0xEB0829E6U }, /* XSUM_XXH32_testdata[3407] */\n    { 1704, 0x00000000U, 0xF7C7918FU }, /* XSUM_XXH32_testdata[3408] */\n    { 1704, 0x9E3779B1U, 0x680E768AU }, /* XSUM_XXH32_testdata[3409] */\n    { 1705, 0x00000000U, 0x2372E6A7U }, /* XSUM_XXH32_testdata[3410] */\n    { 1705, 0x9E3779B1U, 0x6F0D01F4U }, /* XSUM_XXH32_testdata[3411] */\n    { 1706, 0x00000000U, 0x990AAEB1U }, /* XSUM_XXH32_testdata[3412] */\n    { 1706, 0x9E3779B1U, 0xF97347BEU }, /* XSUM_XXH32_testdata[3413] */\n    { 1707, 0x00000000U, 0xF3E40C65U }, /* XSUM_XXH32_testdata[3414] */\n    { 1707, 0x9E3779B1U, 0x8D0EBE91U }, /* XSUM_XXH32_testdata[3415] */\n    { 1708, 0x00000000U, 0xCC7C23B9U }, /* XSUM_XXH32_testdata[3416] */\n    { 1708, 0x9E3779B1U, 0xBE9A8B09U }, /* XSUM_XXH32_testdata[3417] */\n    { 1709, 0x00000000U, 0x9CA6781BU }, /* XSUM_XXH32_testdata[3418] */\n    { 1709, 0x9E3779B1U, 0x1A91A40BU }, /* XSUM_XXH32_testdata[3419] */\n    { 1710, 0x00000000U, 0xB05A9E99U }, /* XSUM_XXH32_testdata[3420] */\n    { 1710, 0x9E3779B1U, 0x64C37B87U }, /* XSUM_XXH32_testdata[3421] */\n    { 1711, 0x00000000U, 0x97D3C609U }, /* XSUM_XXH32_testdata[3422] */\n    { 1711, 0x9E3779B1U, 0x333DD359U }, /* XSUM_XXH32_testdata[3423] */\n    { 1712, 0x00000000U, 0x7DE5FD3CU }, /* XSUM_XXH32_testdata[3424] */\n    { 1712, 0x9E3779B1U, 0x574A505AU }, /* XSUM_XXH32_testdata[3425] */\n    { 1713, 0x00000000U, 0xBD7B8FF1U }, /* XSUM_XXH32_testdata[3426] */\n    { 1713, 0x9E3779B1U, 0x99E5EC63U }, /* XSUM_XXH32_testdata[3427] */\n    { 1714, 0x00000000U, 0x5041BAB5U }, /* XSUM_XXH32_testdata[3428] */\n    { 1714, 0x9E3779B1U, 0x2300775CU }, /* XSUM_XXH32_testdata[3429] */\n    { 1715, 0x00000000U, 0xDB53444BU }, /* XSUM_XXH32_testdata[3430] */\n    { 1715, 0x9E3779B1U, 0x0BB5DBF6U }, /* XSUM_XXH32_testdata[3431] */\n    { 1716, 0x00000000U, 0x01921E73U }, /* XSUM_XXH32_testdata[3432] */\n    { 1716, 0x9E3779B1U, 0xF334E07BU }, /* XSUM_XXH32_testdata[3433] */\n    { 1717, 0x00000000U, 0xC33C0305U }, /* XSUM_XXH32_testdata[3434] */\n    { 1717, 0x9E3779B1U, 0xF43B5057U }, /* XSUM_XXH32_testdata[3435] */\n    { 1718, 0x00000000U, 0xA4CD39C0U }, /* XSUM_XXH32_testdata[3436] */\n    { 1718, 0x9E3779B1U, 0xC4493765U }, /* XSUM_XXH32_testdata[3437] */\n    { 1719, 0x00000000U, 0x892D8D24U }, /* XSUM_XXH32_testdata[3438] */\n    { 1719, 0x9E3779B1U, 0x7E599228U }, /* XSUM_XXH32_testdata[3439] */\n    { 1720, 0x00000000U, 0xFC19B5D6U }, /* XSUM_XXH32_testdata[3440] */\n    { 1720, 0x9E3779B1U, 0x8EBD8BA9U }, /* XSUM_XXH32_testdata[3441] */\n    { 1721, 0x00000000U, 0x600EDC39U }, /* XSUM_XXH32_testdata[3442] */\n    { 1721, 0x9E3779B1U, 0x6F2BAF03U }, /* XSUM_XXH32_testdata[3443] */\n    { 1722, 0x00000000U, 0x8C008B7EU }, /* XSUM_XXH32_testdata[3444] */\n    { 1722, 0x9E3779B1U, 0xD0009FE0U }, /* XSUM_XXH32_testdata[3445] */\n    { 1723, 0x00000000U, 0xDB386119U }, /* XSUM_XXH32_testdata[3446] */\n    { 1723, 0x9E3779B1U, 0xA4F84879U }, /* XSUM_XXH32_testdata[3447] */\n    { 1724, 0x00000000U, 0xCC3A4EF6U }, /* XSUM_XXH32_testdata[3448] */\n    { 1724, 0x9E3779B1U, 0x3DE35C10U }, /* XSUM_XXH32_testdata[3449] */\n    { 1725, 0x00000000U, 0xEC3ADBB3U }, /* XSUM_XXH32_testdata[3450] */\n    { 1725, 0x9E3779B1U, 0xE9E89B01U }, /* XSUM_XXH32_testdata[3451] */\n    { 1726, 0x00000000U, 0xFB3D4CDDU }, /* XSUM_XXH32_testdata[3452] */\n    { 1726, 0x9E3779B1U, 0x4D9E72E2U }, /* XSUM_XXH32_testdata[3453] */\n    { 1727, 0x00000000U, 0x7EE25B8BU }, /* XSUM_XXH32_testdata[3454] */\n    { 1727, 0x9E3779B1U, 0x04D4A624U }, /* XSUM_XXH32_testdata[3455] */\n    { 1728, 0x00000000U, 0x24DAB79DU }, /* XSUM_XXH32_testdata[3456] */\n    { 1728, 0x9E3779B1U, 0x1DF8B05DU }, /* XSUM_XXH32_testdata[3457] */\n    { 1729, 0x00000000U, 0x0F742CEDU }, /* XSUM_XXH32_testdata[3458] */\n    { 1729, 0x9E3779B1U, 0x3BCAA4B5U }, /* XSUM_XXH32_testdata[3459] */\n    { 1730, 0x00000000U, 0xFF497C79U }, /* XSUM_XXH32_testdata[3460] */\n    { 1730, 0x9E3779B1U, 0x3C7DEDCCU }, /* XSUM_XXH32_testdata[3461] */\n    { 1731, 0x00000000U, 0x3765E5C4U }, /* XSUM_XXH32_testdata[3462] */\n    { 1731, 0x9E3779B1U, 0x59492CF8U }, /* XSUM_XXH32_testdata[3463] */\n    { 1732, 0x00000000U, 0x7635BA6EU }, /* XSUM_XXH32_testdata[3464] */\n    { 1732, 0x9E3779B1U, 0x0BEBDC87U }, /* XSUM_XXH32_testdata[3465] */\n    { 1733, 0x00000000U, 0x19307110U }, /* XSUM_XXH32_testdata[3466] */\n    { 1733, 0x9E3779B1U, 0xC3516C3CU }, /* XSUM_XXH32_testdata[3467] */\n    { 1734, 0x00000000U, 0xCCEAB411U }, /* XSUM_XXH32_testdata[3468] */\n    { 1734, 0x9E3779B1U, 0x74845921U }, /* XSUM_XXH32_testdata[3469] */\n    { 1735, 0x00000000U, 0x13D97A5DU }, /* XSUM_XXH32_testdata[3470] */\n    { 1735, 0x9E3779B1U, 0x2AE04859U }, /* XSUM_XXH32_testdata[3471] */\n    { 1736, 0x00000000U, 0x061C3AE4U }, /* XSUM_XXH32_testdata[3472] */\n    { 1736, 0x9E3779B1U, 0x57B7A0BEU }, /* XSUM_XXH32_testdata[3473] */\n    { 1737, 0x00000000U, 0x51D52105U }, /* XSUM_XXH32_testdata[3474] */\n    { 1737, 0x9E3779B1U, 0x8F0844D0U }, /* XSUM_XXH32_testdata[3475] */\n    { 1738, 0x00000000U, 0x98BDFE27U }, /* XSUM_XXH32_testdata[3476] */\n    { 1738, 0x9E3779B1U, 0xA9E0EBDEU }, /* XSUM_XXH32_testdata[3477] */\n    { 1739, 0x00000000U, 0x763FFEC3U }, /* XSUM_XXH32_testdata[3478] */\n    { 1739, 0x9E3779B1U, 0x931260F2U }, /* XSUM_XXH32_testdata[3479] */\n    { 1740, 0x00000000U, 0xD1B7D887U }, /* XSUM_XXH32_testdata[3480] */\n    { 1740, 0x9E3779B1U, 0x7A9B1234U }, /* XSUM_XXH32_testdata[3481] */\n    { 1741, 0x00000000U, 0xD9102280U }, /* XSUM_XXH32_testdata[3482] */\n    { 1741, 0x9E3779B1U, 0xDF4A9EE5U }, /* XSUM_XXH32_testdata[3483] */\n    { 1742, 0x00000000U, 0x2243E274U }, /* XSUM_XXH32_testdata[3484] */\n    { 1742, 0x9E3779B1U, 0xD4C0E6CDU }, /* XSUM_XXH32_testdata[3485] */\n    { 1743, 0x00000000U, 0xE7DD634CU }, /* XSUM_XXH32_testdata[3486] */\n    { 1743, 0x9E3779B1U, 0x954E5D7CU }, /* XSUM_XXH32_testdata[3487] */\n    { 1744, 0x00000000U, 0xBFC75BBAU }, /* XSUM_XXH32_testdata[3488] */\n    { 1744, 0x9E3779B1U, 0x168A72BFU }, /* XSUM_XXH32_testdata[3489] */\n    { 1745, 0x00000000U, 0x2ED3FFF3U }, /* XSUM_XXH32_testdata[3490] */\n    { 1745, 0x9E3779B1U, 0x7A3B8B52U }, /* XSUM_XXH32_testdata[3491] */\n    { 1746, 0x00000000U, 0x6E707159U }, /* XSUM_XXH32_testdata[3492] */\n    { 1746, 0x9E3779B1U, 0x6094673DU }, /* XSUM_XXH32_testdata[3493] */\n    { 1747, 0x00000000U, 0x277394B3U }, /* XSUM_XXH32_testdata[3494] */\n    { 1747, 0x9E3779B1U, 0xE99C979CU }, /* XSUM_XXH32_testdata[3495] */\n    { 1748, 0x00000000U, 0x53F423D8U }, /* XSUM_XXH32_testdata[3496] */\n    { 1748, 0x9E3779B1U, 0xE7A545EFU }, /* XSUM_XXH32_testdata[3497] */\n    { 1749, 0x00000000U, 0x630AE151U }, /* XSUM_XXH32_testdata[3498] */\n    { 1749, 0x9E3779B1U, 0xFE4E5696U }, /* XSUM_XXH32_testdata[3499] */\n    { 1750, 0x00000000U, 0xC5593C27U }, /* XSUM_XXH32_testdata[3500] */\n    { 1750, 0x9E3779B1U, 0xB1CA7B86U }, /* XSUM_XXH32_testdata[3501] */\n    { 1751, 0x00000000U, 0x5AE5BBB9U }, /* XSUM_XXH32_testdata[3502] */\n    { 1751, 0x9E3779B1U, 0x56989C77U }, /* XSUM_XXH32_testdata[3503] */\n    { 1752, 0x00000000U, 0x78521C51U }, /* XSUM_XXH32_testdata[3504] */\n    { 1752, 0x9E3779B1U, 0x366E0D0CU }, /* XSUM_XXH32_testdata[3505] */\n    { 1753, 0x00000000U, 0x6A4BF3BFU }, /* XSUM_XXH32_testdata[3506] */\n    { 1753, 0x9E3779B1U, 0x9EDABA80U }, /* XSUM_XXH32_testdata[3507] */\n    { 1754, 0x00000000U, 0xB9387E10U }, /* XSUM_XXH32_testdata[3508] */\n    { 1754, 0x9E3779B1U, 0x00D382A8U }, /* XSUM_XXH32_testdata[3509] */\n    { 1755, 0x00000000U, 0x4A2FD2B4U }, /* XSUM_XXH32_testdata[3510] */\n    { 1755, 0x9E3779B1U, 0x9AA8406DU }, /* XSUM_XXH32_testdata[3511] */\n    { 1756, 0x00000000U, 0x00C5BC25U }, /* XSUM_XXH32_testdata[3512] */\n    { 1756, 0x9E3779B1U, 0xFD11C9F2U }, /* XSUM_XXH32_testdata[3513] */\n    { 1757, 0x00000000U, 0xEC01B48EU }, /* XSUM_XXH32_testdata[3514] */\n    { 1757, 0x9E3779B1U, 0xEB47E67EU }, /* XSUM_XXH32_testdata[3515] */\n    { 1758, 0x00000000U, 0x378AF63AU }, /* XSUM_XXH32_testdata[3516] */\n    { 1758, 0x9E3779B1U, 0x16E2DA1CU }, /* XSUM_XXH32_testdata[3517] */\n    { 1759, 0x00000000U, 0x2864F6F9U }, /* XSUM_XXH32_testdata[3518] */\n    { 1759, 0x9E3779B1U, 0x5F0FBAF9U }, /* XSUM_XXH32_testdata[3519] */\n    { 1760, 0x00000000U, 0x55CB3E32U }, /* XSUM_XXH32_testdata[3520] */\n    { 1760, 0x9E3779B1U, 0x1748E0A1U }, /* XSUM_XXH32_testdata[3521] */\n    { 1761, 0x00000000U, 0x0929BB1EU }, /* XSUM_XXH32_testdata[3522] */\n    { 1761, 0x9E3779B1U, 0x0FAFECC7U }, /* XSUM_XXH32_testdata[3523] */\n    { 1762, 0x00000000U, 0xE6B5CF33U }, /* XSUM_XXH32_testdata[3524] */\n    { 1762, 0x9E3779B1U, 0xF4F85670U }, /* XSUM_XXH32_testdata[3525] */\n    { 1763, 0x00000000U, 0x9F1F7730U }, /* XSUM_XXH32_testdata[3526] */\n    { 1763, 0x9E3779B1U, 0x01DFC99DU }, /* XSUM_XXH32_testdata[3527] */\n    { 1764, 0x00000000U, 0x71DFC0ADU }, /* XSUM_XXH32_testdata[3528] */\n    { 1764, 0x9E3779B1U, 0x3B84DE0BU }, /* XSUM_XXH32_testdata[3529] */\n    { 1765, 0x00000000U, 0xD3A3110CU }, /* XSUM_XXH32_testdata[3530] */\n    { 1765, 0x9E3779B1U, 0xC93FD24EU }, /* XSUM_XXH32_testdata[3531] */\n    { 1766, 0x00000000U, 0xC3610593U }, /* XSUM_XXH32_testdata[3532] */\n    { 1766, 0x9E3779B1U, 0x312499FAU }, /* XSUM_XXH32_testdata[3533] */\n    { 1767, 0x00000000U, 0x68688EBFU }, /* XSUM_XXH32_testdata[3534] */\n    { 1767, 0x9E3779B1U, 0x2D91AB3AU }, /* XSUM_XXH32_testdata[3535] */\n    { 1768, 0x00000000U, 0xCACAD38CU }, /* XSUM_XXH32_testdata[3536] */\n    { 1768, 0x9E3779B1U, 0x7E15B8CDU }, /* XSUM_XXH32_testdata[3537] */\n    { 1769, 0x00000000U, 0x58BFB196U }, /* XSUM_XXH32_testdata[3538] */\n    { 1769, 0x9E3779B1U, 0x175D758AU }, /* XSUM_XXH32_testdata[3539] */\n    { 1770, 0x00000000U, 0x24F3AE05U }, /* XSUM_XXH32_testdata[3540] */\n    { 1770, 0x9E3779B1U, 0x81AD7357U }, /* XSUM_XXH32_testdata[3541] */\n    { 1771, 0x00000000U, 0xA70DA8D8U }, /* XSUM_XXH32_testdata[3542] */\n    { 1771, 0x9E3779B1U, 0xD6AFAB19U }, /* XSUM_XXH32_testdata[3543] */\n    { 1772, 0x00000000U, 0xFC2574B0U }, /* XSUM_XXH32_testdata[3544] */\n    { 1772, 0x9E3779B1U, 0xE172024BU }, /* XSUM_XXH32_testdata[3545] */\n    { 1773, 0x00000000U, 0xF6FDBC2FU }, /* XSUM_XXH32_testdata[3546] */\n    { 1773, 0x9E3779B1U, 0xEA6581AEU }, /* XSUM_XXH32_testdata[3547] */\n    { 1774, 0x00000000U, 0x35DB2870U }, /* XSUM_XXH32_testdata[3548] */\n    { 1774, 0x9E3779B1U, 0x69F112FEU }, /* XSUM_XXH32_testdata[3549] */\n    { 1775, 0x00000000U, 0xE6706FFAU }, /* XSUM_XXH32_testdata[3550] */\n    { 1775, 0x9E3779B1U, 0x6966DF53U }, /* XSUM_XXH32_testdata[3551] */\n    { 1776, 0x00000000U, 0xE877A90AU }, /* XSUM_XXH32_testdata[3552] */\n    { 1776, 0x9E3779B1U, 0x29B895B6U }, /* XSUM_XXH32_testdata[3553] */\n    { 1777, 0x00000000U, 0xBE2511A5U }, /* XSUM_XXH32_testdata[3554] */\n    { 1777, 0x9E3779B1U, 0x39900621U }, /* XSUM_XXH32_testdata[3555] */\n    { 1778, 0x00000000U, 0xA165C1D0U }, /* XSUM_XXH32_testdata[3556] */\n    { 1778, 0x9E3779B1U, 0x74D4FB26U }, /* XSUM_XXH32_testdata[3557] */\n    { 1779, 0x00000000U, 0xA0429FDBU }, /* XSUM_XXH32_testdata[3558] */\n    { 1779, 0x9E3779B1U, 0x9C833D53U }, /* XSUM_XXH32_testdata[3559] */\n    { 1780, 0x00000000U, 0xE2D89452U }, /* XSUM_XXH32_testdata[3560] */\n    { 1780, 0x9E3779B1U, 0x9FC1796DU }, /* XSUM_XXH32_testdata[3561] */\n    { 1781, 0x00000000U, 0x4DEB03BDU }, /* XSUM_XXH32_testdata[3562] */\n    { 1781, 0x9E3779B1U, 0xC03B780EU }, /* XSUM_XXH32_testdata[3563] */\n    { 1782, 0x00000000U, 0x7BA5D015U }, /* XSUM_XXH32_testdata[3564] */\n    { 1782, 0x9E3779B1U, 0x82D3F686U }, /* XSUM_XXH32_testdata[3565] */\n    { 1783, 0x00000000U, 0xBFC22D50U }, /* XSUM_XXH32_testdata[3566] */\n    { 1783, 0x9E3779B1U, 0xBCB54CB7U }, /* XSUM_XXH32_testdata[3567] */\n    { 1784, 0x00000000U, 0x13148452U }, /* XSUM_XXH32_testdata[3568] */\n    { 1784, 0x9E3779B1U, 0x102E0045U }, /* XSUM_XXH32_testdata[3569] */\n    { 1785, 0x00000000U, 0x78100DF0U }, /* XSUM_XXH32_testdata[3570] */\n    { 1785, 0x9E3779B1U, 0x5048C9C9U }, /* XSUM_XXH32_testdata[3571] */\n    { 1786, 0x00000000U, 0x17DB38E9U }, /* XSUM_XXH32_testdata[3572] */\n    { 1786, 0x9E3779B1U, 0x31BF2171U }, /* XSUM_XXH32_testdata[3573] */\n    { 1787, 0x00000000U, 0x6629FD8DU }, /* XSUM_XXH32_testdata[3574] */\n    { 1787, 0x9E3779B1U, 0x3D471279U }, /* XSUM_XXH32_testdata[3575] */\n    { 1788, 0x00000000U, 0xD2113A3BU }, /* XSUM_XXH32_testdata[3576] */\n    { 1788, 0x9E3779B1U, 0x53FB034FU }, /* XSUM_XXH32_testdata[3577] */\n    { 1789, 0x00000000U, 0xBB1272A4U }, /* XSUM_XXH32_testdata[3578] */\n    { 1789, 0x9E3779B1U, 0xAC115D7EU }, /* XSUM_XXH32_testdata[3579] */\n    { 1790, 0x00000000U, 0x8B226487U }, /* XSUM_XXH32_testdata[3580] */\n    { 1790, 0x9E3779B1U, 0xCEA61776U }, /* XSUM_XXH32_testdata[3581] */\n    { 1791, 0x00000000U, 0xD605D290U }, /* XSUM_XXH32_testdata[3582] */\n    { 1791, 0x9E3779B1U, 0x1BBC5AFBU }, /* XSUM_XXH32_testdata[3583] */\n    { 1792, 0x00000000U, 0xBE8D8D76U }, /* XSUM_XXH32_testdata[3584] */\n    { 1792, 0x9E3779B1U, 0x66BA8C59U }, /* XSUM_XXH32_testdata[3585] */\n    { 1793, 0x00000000U, 0x14857281U }, /* XSUM_XXH32_testdata[3586] */\n    { 1793, 0x9E3779B1U, 0x7A0703D7U }, /* XSUM_XXH32_testdata[3587] */\n    { 1794, 0x00000000U, 0x5658F513U }, /* XSUM_XXH32_testdata[3588] */\n    { 1794, 0x9E3779B1U, 0x72DC0CFAU }, /* XSUM_XXH32_testdata[3589] */\n    { 1795, 0x00000000U, 0x752BEC93U }, /* XSUM_XXH32_testdata[3590] */\n    { 1795, 0x9E3779B1U, 0xC0081D69U }, /* XSUM_XXH32_testdata[3591] */\n    { 1796, 0x00000000U, 0x6476840BU }, /* XSUM_XXH32_testdata[3592] */\n    { 1796, 0x9E3779B1U, 0x7889C41CU }, /* XSUM_XXH32_testdata[3593] */\n    { 1797, 0x00000000U, 0x0CFF8F75U }, /* XSUM_XXH32_testdata[3594] */\n    { 1797, 0x9E3779B1U, 0x639154B1U }, /* XSUM_XXH32_testdata[3595] */\n    { 1798, 0x00000000U, 0xA9C6831CU }, /* XSUM_XXH32_testdata[3596] */\n    { 1798, 0x9E3779B1U, 0x71A27D1FU }, /* XSUM_XXH32_testdata[3597] */\n    { 1799, 0x00000000U, 0x89CF677AU }, /* XSUM_XXH32_testdata[3598] */\n    { 1799, 0x9E3779B1U, 0xBB85DD8EU }, /* XSUM_XXH32_testdata[3599] */\n    { 1800, 0x00000000U, 0x1223F2C2U }, /* XSUM_XXH32_testdata[3600] */\n    { 1800, 0x9E3779B1U, 0xC1880B38U }, /* XSUM_XXH32_testdata[3601] */\n    { 1801, 0x00000000U, 0xB845B8E0U }, /* XSUM_XXH32_testdata[3602] */\n    { 1801, 0x9E3779B1U, 0x7C590E01U }, /* XSUM_XXH32_testdata[3603] */\n    { 1802, 0x00000000U, 0x2A43CFD1U }, /* XSUM_XXH32_testdata[3604] */\n    { 1802, 0x9E3779B1U, 0x015D6FB5U }, /* XSUM_XXH32_testdata[3605] */\n    { 1803, 0x00000000U, 0x93B783D2U }, /* XSUM_XXH32_testdata[3606] */\n    { 1803, 0x9E3779B1U, 0xE0DBE536U }, /* XSUM_XXH32_testdata[3607] */\n    { 1804, 0x00000000U, 0xFEC27017U }, /* XSUM_XXH32_testdata[3608] */\n    { 1804, 0x9E3779B1U, 0xA4EA1580U }, /* XSUM_XXH32_testdata[3609] */\n    { 1805, 0x00000000U, 0x8CC3CE1AU }, /* XSUM_XXH32_testdata[3610] */\n    { 1805, 0x9E3779B1U, 0xBE3AC11DU }, /* XSUM_XXH32_testdata[3611] */\n    { 1806, 0x00000000U, 0x51C1FF40U }, /* XSUM_XXH32_testdata[3612] */\n    { 1806, 0x9E3779B1U, 0xD340B9A1U }, /* XSUM_XXH32_testdata[3613] */\n    { 1807, 0x00000000U, 0x757E3F6BU }, /* XSUM_XXH32_testdata[3614] */\n    { 1807, 0x9E3779B1U, 0x2AB07ACDU }, /* XSUM_XXH32_testdata[3615] */\n    { 1808, 0x00000000U, 0x23F89184U }, /* XSUM_XXH32_testdata[3616] */\n    { 1808, 0x9E3779B1U, 0x87971AC1U }, /* XSUM_XXH32_testdata[3617] */\n    { 1809, 0x00000000U, 0xFC2994F1U }, /* XSUM_XXH32_testdata[3618] */\n    { 1809, 0x9E3779B1U, 0x9E2FA412U }, /* XSUM_XXH32_testdata[3619] */\n    { 1810, 0x00000000U, 0x21881031U }, /* XSUM_XXH32_testdata[3620] */\n    { 1810, 0x9E3779B1U, 0xECDB5201U }, /* XSUM_XXH32_testdata[3621] */\n    { 1811, 0x00000000U, 0x45CA23E5U }, /* XSUM_XXH32_testdata[3622] */\n    { 1811, 0x9E3779B1U, 0xB6344F2AU }, /* XSUM_XXH32_testdata[3623] */\n    { 1812, 0x00000000U, 0x786BABFCU }, /* XSUM_XXH32_testdata[3624] */\n    { 1812, 0x9E3779B1U, 0x8AC7B376U }, /* XSUM_XXH32_testdata[3625] */\n    { 1813, 0x00000000U, 0x7FC15759U }, /* XSUM_XXH32_testdata[3626] */\n    { 1813, 0x9E3779B1U, 0x772AB3D6U }, /* XSUM_XXH32_testdata[3627] */\n    { 1814, 0x00000000U, 0xAE95D00AU }, /* XSUM_XXH32_testdata[3628] */\n    { 1814, 0x9E3779B1U, 0x1A3AADA7U }, /* XSUM_XXH32_testdata[3629] */\n    { 1815, 0x00000000U, 0x691FE11BU }, /* XSUM_XXH32_testdata[3630] */\n    { 1815, 0x9E3779B1U, 0x454A104CU }, /* XSUM_XXH32_testdata[3631] */\n    { 1816, 0x00000000U, 0x879BE524U }, /* XSUM_XXH32_testdata[3632] */\n    { 1816, 0x9E3779B1U, 0xD4F14B55U }, /* XSUM_XXH32_testdata[3633] */\n    { 1817, 0x00000000U, 0x324367F6U }, /* XSUM_XXH32_testdata[3634] */\n    { 1817, 0x9E3779B1U, 0xCD7C3424U }, /* XSUM_XXH32_testdata[3635] */\n    { 1818, 0x00000000U, 0x806AC2C6U }, /* XSUM_XXH32_testdata[3636] */\n    { 1818, 0x9E3779B1U, 0xB1D59D27U }, /* XSUM_XXH32_testdata[3637] */\n    { 1819, 0x00000000U, 0x1304BC0FU }, /* XSUM_XXH32_testdata[3638] */\n    { 1819, 0x9E3779B1U, 0xA8435FC1U }, /* XSUM_XXH32_testdata[3639] */\n    { 1820, 0x00000000U, 0x9D554B46U }, /* XSUM_XXH32_testdata[3640] */\n    { 1820, 0x9E3779B1U, 0x5E964343U }, /* XSUM_XXH32_testdata[3641] */\n    { 1821, 0x00000000U, 0xB36C2C88U }, /* XSUM_XXH32_testdata[3642] */\n    { 1821, 0x9E3779B1U, 0x48EF1982U }, /* XSUM_XXH32_testdata[3643] */\n    { 1822, 0x00000000U, 0xDEBA7341U }, /* XSUM_XXH32_testdata[3644] */\n    { 1822, 0x9E3779B1U, 0xAD09EC67U }, /* XSUM_XXH32_testdata[3645] */\n    { 1823, 0x00000000U, 0x175EA52BU }, /* XSUM_XXH32_testdata[3646] */\n    { 1823, 0x9E3779B1U, 0xA8574931U }, /* XSUM_XXH32_testdata[3647] */\n    { 1824, 0x00000000U, 0x2F5DCC8CU }, /* XSUM_XXH32_testdata[3648] */\n    { 1824, 0x9E3779B1U, 0xF2D4B7C2U }, /* XSUM_XXH32_testdata[3649] */\n    { 1825, 0x00000000U, 0xCB4DEF13U }, /* XSUM_XXH32_testdata[3650] */\n    { 1825, 0x9E3779B1U, 0xF8D9DA7CU }, /* XSUM_XXH32_testdata[3651] */\n    { 1826, 0x00000000U, 0x4E1A72E1U }, /* XSUM_XXH32_testdata[3652] */\n    { 1826, 0x9E3779B1U, 0x41811E2CU }, /* XSUM_XXH32_testdata[3653] */\n    { 1827, 0x00000000U, 0xA58FC1D7U }, /* XSUM_XXH32_testdata[3654] */\n    { 1827, 0x9E3779B1U, 0x3F880806U }, /* XSUM_XXH32_testdata[3655] */\n    { 1828, 0x00000000U, 0x0275E715U }, /* XSUM_XXH32_testdata[3656] */\n    { 1828, 0x9E3779B1U, 0x530CDE35U }, /* XSUM_XXH32_testdata[3657] */\n    { 1829, 0x00000000U, 0xCAF2B117U }, /* XSUM_XXH32_testdata[3658] */\n    { 1829, 0x9E3779B1U, 0x65EDEA16U }, /* XSUM_XXH32_testdata[3659] */\n    { 1830, 0x00000000U, 0xE20DACBBU }, /* XSUM_XXH32_testdata[3660] */\n    { 1830, 0x9E3779B1U, 0x35440710U }, /* XSUM_XXH32_testdata[3661] */\n    { 1831, 0x00000000U, 0xD4D95AA5U }, /* XSUM_XXH32_testdata[3662] */\n    { 1831, 0x9E3779B1U, 0x1E810AD6U }, /* XSUM_XXH32_testdata[3663] */\n    { 1832, 0x00000000U, 0xA20D541FU }, /* XSUM_XXH32_testdata[3664] */\n    { 1832, 0x9E3779B1U, 0x7E0C0B5EU }, /* XSUM_XXH32_testdata[3665] */\n    { 1833, 0x00000000U, 0xC119D0B6U }, /* XSUM_XXH32_testdata[3666] */\n    { 1833, 0x9E3779B1U, 0x1FFB7EBAU }, /* XSUM_XXH32_testdata[3667] */\n    { 1834, 0x00000000U, 0x8D17CD37U }, /* XSUM_XXH32_testdata[3668] */\n    { 1834, 0x9E3779B1U, 0xC4C176EBU }, /* XSUM_XXH32_testdata[3669] */\n    { 1835, 0x00000000U, 0x675B3F12U }, /* XSUM_XXH32_testdata[3670] */\n    { 1835, 0x9E3779B1U, 0x6A1EAE37U }, /* XSUM_XXH32_testdata[3671] */\n    { 1836, 0x00000000U, 0x1B214A29U }, /* XSUM_XXH32_testdata[3672] */\n    { 1836, 0x9E3779B1U, 0xB1C040B4U }, /* XSUM_XXH32_testdata[3673] */\n    { 1837, 0x00000000U, 0xA1ECBA48U }, /* XSUM_XXH32_testdata[3674] */\n    { 1837, 0x9E3779B1U, 0x5746365EU }, /* XSUM_XXH32_testdata[3675] */\n    { 1838, 0x00000000U, 0x5112DAB6U }, /* XSUM_XXH32_testdata[3676] */\n    { 1838, 0x9E3779B1U, 0x1BE9DB5EU }, /* XSUM_XXH32_testdata[3677] */\n    { 1839, 0x00000000U, 0x777392A2U }, /* XSUM_XXH32_testdata[3678] */\n    { 1839, 0x9E3779B1U, 0xBA81062EU }, /* XSUM_XXH32_testdata[3679] */\n    { 1840, 0x00000000U, 0x51F8185EU }, /* XSUM_XXH32_testdata[3680] */\n    { 1840, 0x9E3779B1U, 0x72FFCF3EU }, /* XSUM_XXH32_testdata[3681] */\n    { 1841, 0x00000000U, 0x99BA6C88U }, /* XSUM_XXH32_testdata[3682] */\n    { 1841, 0x9E3779B1U, 0x9C58C6ABU }, /* XSUM_XXH32_testdata[3683] */\n    { 1842, 0x00000000U, 0xA6A21A54U }, /* XSUM_XXH32_testdata[3684] */\n    { 1842, 0x9E3779B1U, 0x44C74437U }, /* XSUM_XXH32_testdata[3685] */\n    { 1843, 0x00000000U, 0x252CA0DEU }, /* XSUM_XXH32_testdata[3686] */\n    { 1843, 0x9E3779B1U, 0x3FB62BB2U }, /* XSUM_XXH32_testdata[3687] */\n    { 1844, 0x00000000U, 0x06DE7EABU }, /* XSUM_XXH32_testdata[3688] */\n    { 1844, 0x9E3779B1U, 0x50E2A47AU }, /* XSUM_XXH32_testdata[3689] */\n    { 1845, 0x00000000U, 0xA65D3237U }, /* XSUM_XXH32_testdata[3690] */\n    { 1845, 0x9E3779B1U, 0x0A2D01FAU }, /* XSUM_XXH32_testdata[3691] */\n    { 1846, 0x00000000U, 0x04F43A59U }, /* XSUM_XXH32_testdata[3692] */\n    { 1846, 0x9E3779B1U, 0x51111F7EU }, /* XSUM_XXH32_testdata[3693] */\n    { 1847, 0x00000000U, 0x6F4019A8U }, /* XSUM_XXH32_testdata[3694] */\n    { 1847, 0x9E3779B1U, 0xE20F3576U }, /* XSUM_XXH32_testdata[3695] */\n    { 1848, 0x00000000U, 0xD866CDA1U }, /* XSUM_XXH32_testdata[3696] */\n    { 1848, 0x9E3779B1U, 0x1AC08626U }, /* XSUM_XXH32_testdata[3697] */\n    { 1849, 0x00000000U, 0x0A51B4EAU }, /* XSUM_XXH32_testdata[3698] */\n    { 1849, 0x9E3779B1U, 0xAC6041B3U }, /* XSUM_XXH32_testdata[3699] */\n    { 1850, 0x00000000U, 0x0AC59D71U }, /* XSUM_XXH32_testdata[3700] */\n    { 1850, 0x9E3779B1U, 0x88F8915EU }, /* XSUM_XXH32_testdata[3701] */\n    { 1851, 0x00000000U, 0x5F92FA39U }, /* XSUM_XXH32_testdata[3702] */\n    { 1851, 0x9E3779B1U, 0xF25E4F80U }, /* XSUM_XXH32_testdata[3703] */\n    { 1852, 0x00000000U, 0x2D213040U }, /* XSUM_XXH32_testdata[3704] */\n    { 1852, 0x9E3779B1U, 0x54C7D298U }, /* XSUM_XXH32_testdata[3705] */\n    { 1853, 0x00000000U, 0x1B95E174U }, /* XSUM_XXH32_testdata[3706] */\n    { 1853, 0x9E3779B1U, 0xAE824BB0U }, /* XSUM_XXH32_testdata[3707] */\n    { 1854, 0x00000000U, 0xA15D6FF6U }, /* XSUM_XXH32_testdata[3708] */\n    { 1854, 0x9E3779B1U, 0x0681ACF4U }, /* XSUM_XXH32_testdata[3709] */\n    { 1855, 0x00000000U, 0xEBD376F2U }, /* XSUM_XXH32_testdata[3710] */\n    { 1855, 0x9E3779B1U, 0x6D348553U }, /* XSUM_XXH32_testdata[3711] */\n    { 1856, 0x00000000U, 0x578A3039U }, /* XSUM_XXH32_testdata[3712] */\n    { 1856, 0x9E3779B1U, 0xBE3F47FEU }, /* XSUM_XXH32_testdata[3713] */\n    { 1857, 0x00000000U, 0xA3F62009U }, /* XSUM_XXH32_testdata[3714] */\n    { 1857, 0x9E3779B1U, 0xA618308CU }, /* XSUM_XXH32_testdata[3715] */\n    { 1858, 0x00000000U, 0x5D53EC58U }, /* XSUM_XXH32_testdata[3716] */\n    { 1858, 0x9E3779B1U, 0x9EFF05C1U }, /* XSUM_XXH32_testdata[3717] */\n    { 1859, 0x00000000U, 0xC0BA7D48U }, /* XSUM_XXH32_testdata[3718] */\n    { 1859, 0x9E3779B1U, 0x83FBDC4CU }, /* XSUM_XXH32_testdata[3719] */\n    { 1860, 0x00000000U, 0x90EAE29DU }, /* XSUM_XXH32_testdata[3720] */\n    { 1860, 0x9E3779B1U, 0xDD27AD43U }, /* XSUM_XXH32_testdata[3721] */\n    { 1861, 0x00000000U, 0xAA9C88CCU }, /* XSUM_XXH32_testdata[3722] */\n    { 1861, 0x9E3779B1U, 0x11555FE1U }, /* XSUM_XXH32_testdata[3723] */\n    { 1862, 0x00000000U, 0x04799A10U }, /* XSUM_XXH32_testdata[3724] */\n    { 1862, 0x9E3779B1U, 0xA9ACC8FBU }, /* XSUM_XXH32_testdata[3725] */\n    { 1863, 0x00000000U, 0xED292432U }, /* XSUM_XXH32_testdata[3726] */\n    { 1863, 0x9E3779B1U, 0x8E3C1F47U }, /* XSUM_XXH32_testdata[3727] */\n    { 1864, 0x00000000U, 0x43C09E40U }, /* XSUM_XXH32_testdata[3728] */\n    { 1864, 0x9E3779B1U, 0xBFB300C8U }, /* XSUM_XXH32_testdata[3729] */\n    { 1865, 0x00000000U, 0x7BE1BF3EU }, /* XSUM_XXH32_testdata[3730] */\n    { 1865, 0x9E3779B1U, 0x58621FC8U }, /* XSUM_XXH32_testdata[3731] */\n    { 1866, 0x00000000U, 0x99F615E2U }, /* XSUM_XXH32_testdata[3732] */\n    { 1866, 0x9E3779B1U, 0x4638A085U }, /* XSUM_XXH32_testdata[3733] */\n    { 1867, 0x00000000U, 0x602FF217U }, /* XSUM_XXH32_testdata[3734] */\n    { 1867, 0x9E3779B1U, 0xCB54058AU }, /* XSUM_XXH32_testdata[3735] */\n    { 1868, 0x00000000U, 0xBB4A90B4U }, /* XSUM_XXH32_testdata[3736] */\n    { 1868, 0x9E3779B1U, 0x812A8213U }, /* XSUM_XXH32_testdata[3737] */\n    { 1869, 0x00000000U, 0xDBAB5AE4U }, /* XSUM_XXH32_testdata[3738] */\n    { 1869, 0x9E3779B1U, 0x9FB2B073U }, /* XSUM_XXH32_testdata[3739] */\n    { 1870, 0x00000000U, 0xE9C0B924U }, /* XSUM_XXH32_testdata[3740] */\n    { 1870, 0x9E3779B1U, 0xCF33FD14U }, /* XSUM_XXH32_testdata[3741] */\n    { 1871, 0x00000000U, 0x4C150BD1U }, /* XSUM_XXH32_testdata[3742] */\n    { 1871, 0x9E3779B1U, 0x6FC102DEU }, /* XSUM_XXH32_testdata[3743] */\n    { 1872, 0x00000000U, 0x128952FFU }, /* XSUM_XXH32_testdata[3744] */\n    { 1872, 0x9E3779B1U, 0xF056CC68U }, /* XSUM_XXH32_testdata[3745] */\n    { 1873, 0x00000000U, 0x2F630230U }, /* XSUM_XXH32_testdata[3746] */\n    { 1873, 0x9E3779B1U, 0x6200B0A0U }, /* XSUM_XXH32_testdata[3747] */\n    { 1874, 0x00000000U, 0x95113D65U }, /* XSUM_XXH32_testdata[3748] */\n    { 1874, 0x9E3779B1U, 0xA2266DC8U }, /* XSUM_XXH32_testdata[3749] */\n    { 1875, 0x00000000U, 0xEB5EC5FAU }, /* XSUM_XXH32_testdata[3750] */\n    { 1875, 0x9E3779B1U, 0x258ED07AU }, /* XSUM_XXH32_testdata[3751] */\n    { 1876, 0x00000000U, 0xBC41D480U }, /* XSUM_XXH32_testdata[3752] */\n    { 1876, 0x9E3779B1U, 0xF6ECF7E5U }, /* XSUM_XXH32_testdata[3753] */\n    { 1877, 0x00000000U, 0x53A61D66U }, /* XSUM_XXH32_testdata[3754] */\n    { 1877, 0x9E3779B1U, 0x7161D2FEU }, /* XSUM_XXH32_testdata[3755] */\n    { 1878, 0x00000000U, 0x6E525359U }, /* XSUM_XXH32_testdata[3756] */\n    { 1878, 0x9E3779B1U, 0x55E29EB2U }, /* XSUM_XXH32_testdata[3757] */\n    { 1879, 0x00000000U, 0x4B6C6614U }, /* XSUM_XXH32_testdata[3758] */\n    { 1879, 0x9E3779B1U, 0xD6467881U }, /* XSUM_XXH32_testdata[3759] */\n    { 1880, 0x00000000U, 0xB04444F7U }, /* XSUM_XXH32_testdata[3760] */\n    { 1880, 0x9E3779B1U, 0x268DC86DU }, /* XSUM_XXH32_testdata[3761] */\n    { 1881, 0x00000000U, 0xD6941295U }, /* XSUM_XXH32_testdata[3762] */\n    { 1881, 0x9E3779B1U, 0xD7407476U }, /* XSUM_XXH32_testdata[3763] */\n    { 1882, 0x00000000U, 0x1B195D84U }, /* XSUM_XXH32_testdata[3764] */\n    { 1882, 0x9E3779B1U, 0x677236D7U }, /* XSUM_XXH32_testdata[3765] */\n    { 1883, 0x00000000U, 0xBB4F8831U }, /* XSUM_XXH32_testdata[3766] */\n    { 1883, 0x9E3779B1U, 0x7355DFAEU }, /* XSUM_XXH32_testdata[3767] */\n    { 1884, 0x00000000U, 0xBE445C3DU }, /* XSUM_XXH32_testdata[3768] */\n    { 1884, 0x9E3779B1U, 0xC7418A25U }, /* XSUM_XXH32_testdata[3769] */\n    { 1885, 0x00000000U, 0x0F1B2DC8U }, /* XSUM_XXH32_testdata[3770] */\n    { 1885, 0x9E3779B1U, 0x58763266U }, /* XSUM_XXH32_testdata[3771] */\n    { 1886, 0x00000000U, 0x151A031CU }, /* XSUM_XXH32_testdata[3772] */\n    { 1886, 0x9E3779B1U, 0xE5227743U }, /* XSUM_XXH32_testdata[3773] */\n    { 1887, 0x00000000U, 0x8A90D1CDU }, /* XSUM_XXH32_testdata[3774] */\n    { 1887, 0x9E3779B1U, 0xCAD9223CU }, /* XSUM_XXH32_testdata[3775] */\n    { 1888, 0x00000000U, 0x8EAAA692U }, /* XSUM_XXH32_testdata[3776] */\n    { 1888, 0x9E3779B1U, 0x71B65B2EU }, /* XSUM_XXH32_testdata[3777] */\n    { 1889, 0x00000000U, 0x3CAEBA43U }, /* XSUM_XXH32_testdata[3778] */\n    { 1889, 0x9E3779B1U, 0x548D96ABU }, /* XSUM_XXH32_testdata[3779] */\n    { 1890, 0x00000000U, 0x02A753A0U }, /* XSUM_XXH32_testdata[3780] */\n    { 1890, 0x9E3779B1U, 0xF2819E92U }, /* XSUM_XXH32_testdata[3781] */\n    { 1891, 0x00000000U, 0x79338331U }, /* XSUM_XXH32_testdata[3782] */\n    { 1891, 0x9E3779B1U, 0x501DC079U }, /* XSUM_XXH32_testdata[3783] */\n    { 1892, 0x00000000U, 0x8B0F6D10U }, /* XSUM_XXH32_testdata[3784] */\n    { 1892, 0x9E3779B1U, 0x9084EBAEU }, /* XSUM_XXH32_testdata[3785] */\n    { 1893, 0x00000000U, 0xD2717BE6U }, /* XSUM_XXH32_testdata[3786] */\n    { 1893, 0x9E3779B1U, 0x2707C7AAU }, /* XSUM_XXH32_testdata[3787] */\n    { 1894, 0x00000000U, 0x0DF2C2A8U }, /* XSUM_XXH32_testdata[3788] */\n    { 1894, 0x9E3779B1U, 0xC9DC005EU }, /* XSUM_XXH32_testdata[3789] */\n    { 1895, 0x00000000U, 0x0226E73AU }, /* XSUM_XXH32_testdata[3790] */\n    { 1895, 0x9E3779B1U, 0x8710F413U }, /* XSUM_XXH32_testdata[3791] */\n    { 1896, 0x00000000U, 0x2A3AEE59U }, /* XSUM_XXH32_testdata[3792] */\n    { 1896, 0x9E3779B1U, 0x851FB087U }, /* XSUM_XXH32_testdata[3793] */\n    { 1897, 0x00000000U, 0x9E7C31B8U }, /* XSUM_XXH32_testdata[3794] */\n    { 1897, 0x9E3779B1U, 0x65F68117U }, /* XSUM_XXH32_testdata[3795] */\n    { 1898, 0x00000000U, 0x0049DB67U }, /* XSUM_XXH32_testdata[3796] */\n    { 1898, 0x9E3779B1U, 0x0095735EU }, /* XSUM_XXH32_testdata[3797] */\n    { 1899, 0x00000000U, 0x2A359B32U }, /* XSUM_XXH32_testdata[3798] */\n    { 1899, 0x9E3779B1U, 0x6B86292AU }, /* XSUM_XXH32_testdata[3799] */\n    { 1900, 0x00000000U, 0x5035F959U }, /* XSUM_XXH32_testdata[3800] */\n    { 1900, 0x9E3779B1U, 0x38350BD6U }, /* XSUM_XXH32_testdata[3801] */\n    { 1901, 0x00000000U, 0xF1F7F830U }, /* XSUM_XXH32_testdata[3802] */\n    { 1901, 0x9E3779B1U, 0x8CE3F218U }, /* XSUM_XXH32_testdata[3803] */\n    { 1902, 0x00000000U, 0x2DD3318CU }, /* XSUM_XXH32_testdata[3804] */\n    { 1902, 0x9E3779B1U, 0x765A45E8U }, /* XSUM_XXH32_testdata[3805] */\n    { 1903, 0x00000000U, 0xD75689F9U }, /* XSUM_XXH32_testdata[3806] */\n    { 1903, 0x9E3779B1U, 0x4787E4F4U }, /* XSUM_XXH32_testdata[3807] */\n    { 1904, 0x00000000U, 0xF860CFF0U }, /* XSUM_XXH32_testdata[3808] */\n    { 1904, 0x9E3779B1U, 0xF51D4BFEU }, /* XSUM_XXH32_testdata[3809] */\n    { 1905, 0x00000000U, 0xFF9A6461U }, /* XSUM_XXH32_testdata[3810] */\n    { 1905, 0x9E3779B1U, 0x4408E97AU }, /* XSUM_XXH32_testdata[3811] */\n    { 1906, 0x00000000U, 0xF6F3050EU }, /* XSUM_XXH32_testdata[3812] */\n    { 1906, 0x9E3779B1U, 0xC621019AU }, /* XSUM_XXH32_testdata[3813] */\n    { 1907, 0x00000000U, 0x8BFA355EU }, /* XSUM_XXH32_testdata[3814] */\n    { 1907, 0x9E3779B1U, 0x9F55973DU }, /* XSUM_XXH32_testdata[3815] */\n    { 1908, 0x00000000U, 0xAFFA76B1U }, /* XSUM_XXH32_testdata[3816] */\n    { 1908, 0x9E3779B1U, 0x0DABD32CU }, /* XSUM_XXH32_testdata[3817] */\n    { 1909, 0x00000000U, 0x10F56148U }, /* XSUM_XXH32_testdata[3818] */\n    { 1909, 0x9E3779B1U, 0xA90D4AD4U }, /* XSUM_XXH32_testdata[3819] */\n    { 1910, 0x00000000U, 0x02851F1BU }, /* XSUM_XXH32_testdata[3820] */\n    { 1910, 0x9E3779B1U, 0xB316A5DDU }, /* XSUM_XXH32_testdata[3821] */\n    { 1911, 0x00000000U, 0x53824F89U }, /* XSUM_XXH32_testdata[3822] */\n    { 1911, 0x9E3779B1U, 0x4078E403U }, /* XSUM_XXH32_testdata[3823] */\n    { 1912, 0x00000000U, 0x00B86DC6U }, /* XSUM_XXH32_testdata[3824] */\n    { 1912, 0x9E3779B1U, 0x4542E1B4U }, /* XSUM_XXH32_testdata[3825] */\n    { 1913, 0x00000000U, 0x207B79BCU }, /* XSUM_XXH32_testdata[3826] */\n    { 1913, 0x9E3779B1U, 0x832092D8U }, /* XSUM_XXH32_testdata[3827] */\n    { 1914, 0x00000000U, 0x623E4AB0U }, /* XSUM_XXH32_testdata[3828] */\n    { 1914, 0x9E3779B1U, 0xC6ACF116U }, /* XSUM_XXH32_testdata[3829] */\n    { 1915, 0x00000000U, 0x8576A5AFU }, /* XSUM_XXH32_testdata[3830] */\n    { 1915, 0x9E3779B1U, 0xBC2AEF5BU }, /* XSUM_XXH32_testdata[3831] */\n    { 1916, 0x00000000U, 0x4C3376B5U }, /* XSUM_XXH32_testdata[3832] */\n    { 1916, 0x9E3779B1U, 0x183EAF12U }, /* XSUM_XXH32_testdata[3833] */\n    { 1917, 0x00000000U, 0x14A58F16U }, /* XSUM_XXH32_testdata[3834] */\n    { 1917, 0x9E3779B1U, 0x8B011085U }, /* XSUM_XXH32_testdata[3835] */\n    { 1918, 0x00000000U, 0xB9291E03U }, /* XSUM_XXH32_testdata[3836] */\n    { 1918, 0x9E3779B1U, 0x7B9DE8A7U }, /* XSUM_XXH32_testdata[3837] */\n    { 1919, 0x00000000U, 0xD38621DCU }, /* XSUM_XXH32_testdata[3838] */\n    { 1919, 0x9E3779B1U, 0x8BF327B8U }, /* XSUM_XXH32_testdata[3839] */\n    { 1920, 0x00000000U, 0x49AB85BDU }, /* XSUM_XXH32_testdata[3840] */\n    { 1920, 0x9E3779B1U, 0xF9B3B5ACU }, /* XSUM_XXH32_testdata[3841] */\n    { 1921, 0x00000000U, 0x5BA98FC5U }, /* XSUM_XXH32_testdata[3842] */\n    { 1921, 0x9E3779B1U, 0x26AD3EAAU }, /* XSUM_XXH32_testdata[3843] */\n    { 1922, 0x00000000U, 0x27483D1DU }, /* XSUM_XXH32_testdata[3844] */\n    { 1922, 0x9E3779B1U, 0xBBC84864U }, /* XSUM_XXH32_testdata[3845] */\n    { 1923, 0x00000000U, 0xF96BB397U }, /* XSUM_XXH32_testdata[3846] */\n    { 1923, 0x9E3779B1U, 0x5140D7C4U }, /* XSUM_XXH32_testdata[3847] */\n    { 1924, 0x00000000U, 0xE2D12306U }, /* XSUM_XXH32_testdata[3848] */\n    { 1924, 0x9E3779B1U, 0x0B58D501U }, /* XSUM_XXH32_testdata[3849] */\n    { 1925, 0x00000000U, 0x89667BBCU }, /* XSUM_XXH32_testdata[3850] */\n    { 1925, 0x9E3779B1U, 0xCE96E91BU }, /* XSUM_XXH32_testdata[3851] */\n    { 1926, 0x00000000U, 0x5744E350U }, /* XSUM_XXH32_testdata[3852] */\n    { 1926, 0x9E3779B1U, 0x06ADC8A8U }, /* XSUM_XXH32_testdata[3853] */\n    { 1927, 0x00000000U, 0x39ED429DU }, /* XSUM_XXH32_testdata[3854] */\n    { 1927, 0x9E3779B1U, 0x981292C6U }, /* XSUM_XXH32_testdata[3855] */\n    { 1928, 0x00000000U, 0x707AF21FU }, /* XSUM_XXH32_testdata[3856] */\n    { 1928, 0x9E3779B1U, 0x4732C9F9U }, /* XSUM_XXH32_testdata[3857] */\n    { 1929, 0x00000000U, 0xD88D5DA0U }, /* XSUM_XXH32_testdata[3858] */\n    { 1929, 0x9E3779B1U, 0x472D33A8U }, /* XSUM_XXH32_testdata[3859] */\n    { 1930, 0x00000000U, 0xFA892672U }, /* XSUM_XXH32_testdata[3860] */\n    { 1930, 0x9E3779B1U, 0xADDEA018U }, /* XSUM_XXH32_testdata[3861] */\n    { 1931, 0x00000000U, 0x633B2910U }, /* XSUM_XXH32_testdata[3862] */\n    { 1931, 0x9E3779B1U, 0xC4E35504U }, /* XSUM_XXH32_testdata[3863] */\n    { 1932, 0x00000000U, 0x50BBBD88U }, /* XSUM_XXH32_testdata[3864] */\n    { 1932, 0x9E3779B1U, 0xA16C8C2CU }, /* XSUM_XXH32_testdata[3865] */\n    { 1933, 0x00000000U, 0xD203BEF6U }, /* XSUM_XXH32_testdata[3866] */\n    { 1933, 0x9E3779B1U, 0x889F74E9U }, /* XSUM_XXH32_testdata[3867] */\n    { 1934, 0x00000000U, 0x1C50E58BU }, /* XSUM_XXH32_testdata[3868] */\n    { 1934, 0x9E3779B1U, 0x783C3F67U }, /* XSUM_XXH32_testdata[3869] */\n    { 1935, 0x00000000U, 0xBFA4C0CBU }, /* XSUM_XXH32_testdata[3870] */\n    { 1935, 0x9E3779B1U, 0x1A0B89C2U }, /* XSUM_XXH32_testdata[3871] */\n    { 1936, 0x00000000U, 0xBD617A8AU }, /* XSUM_XXH32_testdata[3872] */\n    { 1936, 0x9E3779B1U, 0x87E01870U }, /* XSUM_XXH32_testdata[3873] */\n    { 1937, 0x00000000U, 0x87EA5DC3U }, /* XSUM_XXH32_testdata[3874] */\n    { 1937, 0x9E3779B1U, 0x4867250EU }, /* XSUM_XXH32_testdata[3875] */\n    { 1938, 0x00000000U, 0xD5875D68U }, /* XSUM_XXH32_testdata[3876] */\n    { 1938, 0x9E3779B1U, 0x8BBE9DFCU }, /* XSUM_XXH32_testdata[3877] */\n    { 1939, 0x00000000U, 0x7F7F4B00U }, /* XSUM_XXH32_testdata[3878] */\n    { 1939, 0x9E3779B1U, 0x4E6C73F8U }, /* XSUM_XXH32_testdata[3879] */\n    { 1940, 0x00000000U, 0xAF99DF0CU }, /* XSUM_XXH32_testdata[3880] */\n    { 1940, 0x9E3779B1U, 0xA56AAD63U }, /* XSUM_XXH32_testdata[3881] */\n    { 1941, 0x00000000U, 0xF3152C3DU }, /* XSUM_XXH32_testdata[3882] */\n    { 1941, 0x9E3779B1U, 0xD7916DC8U }, /* XSUM_XXH32_testdata[3883] */\n    { 1942, 0x00000000U, 0xFD04A455U }, /* XSUM_XXH32_testdata[3884] */\n    { 1942, 0x9E3779B1U, 0xF136DE7FU }, /* XSUM_XXH32_testdata[3885] */\n    { 1943, 0x00000000U, 0xA93B1B18U }, /* XSUM_XXH32_testdata[3886] */\n    { 1943, 0x9E3779B1U, 0xC872BB06U }, /* XSUM_XXH32_testdata[3887] */\n    { 1944, 0x00000000U, 0x962FB20FU }, /* XSUM_XXH32_testdata[3888] */\n    { 1944, 0x9E3779B1U, 0xB2EEF395U }, /* XSUM_XXH32_testdata[3889] */\n    { 1945, 0x00000000U, 0xF987B8ECU }, /* XSUM_XXH32_testdata[3890] */\n    { 1945, 0x9E3779B1U, 0x35E6AC22U }, /* XSUM_XXH32_testdata[3891] */\n    { 1946, 0x00000000U, 0xA30BFF7BU }, /* XSUM_XXH32_testdata[3892] */\n    { 1946, 0x9E3779B1U, 0x5FF3CF8EU }, /* XSUM_XXH32_testdata[3893] */\n    { 1947, 0x00000000U, 0xAF72D6DCU }, /* XSUM_XXH32_testdata[3894] */\n    { 1947, 0x9E3779B1U, 0x67E062DAU }, /* XSUM_XXH32_testdata[3895] */\n    { 1948, 0x00000000U, 0x9C2C4E68U }, /* XSUM_XXH32_testdata[3896] */\n    { 1948, 0x9E3779B1U, 0x0BEC12E0U }, /* XSUM_XXH32_testdata[3897] */\n    { 1949, 0x00000000U, 0xD511ED41U }, /* XSUM_XXH32_testdata[3898] */\n    { 1949, 0x9E3779B1U, 0xC59C84E8U }, /* XSUM_XXH32_testdata[3899] */\n    { 1950, 0x00000000U, 0x2226F2DFU }, /* XSUM_XXH32_testdata[3900] */\n    { 1950, 0x9E3779B1U, 0x5BF021A6U }, /* XSUM_XXH32_testdata[3901] */\n    { 1951, 0x00000000U, 0x14357E71U }, /* XSUM_XXH32_testdata[3902] */\n    { 1951, 0x9E3779B1U, 0xEC388F23U }, /* XSUM_XXH32_testdata[3903] */\n    { 1952, 0x00000000U, 0xE8CDBE8FU }, /* XSUM_XXH32_testdata[3904] */\n    { 1952, 0x9E3779B1U, 0x9DF13FFAU }, /* XSUM_XXH32_testdata[3905] */\n    { 1953, 0x00000000U, 0x3DD52872U }, /* XSUM_XXH32_testdata[3906] */\n    { 1953, 0x9E3779B1U, 0x48A62A8DU }, /* XSUM_XXH32_testdata[3907] */\n    { 1954, 0x00000000U, 0x5172EAD4U }, /* XSUM_XXH32_testdata[3908] */\n    { 1954, 0x9E3779B1U, 0xCC04ABF1U }, /* XSUM_XXH32_testdata[3909] */\n    { 1955, 0x00000000U, 0x065D2470U }, /* XSUM_XXH32_testdata[3910] */\n    { 1955, 0x9E3779B1U, 0xAE85008FU }, /* XSUM_XXH32_testdata[3911] */\n    { 1956, 0x00000000U, 0x4A2CE749U }, /* XSUM_XXH32_testdata[3912] */\n    { 1956, 0x9E3779B1U, 0x3A9E2B0AU }, /* XSUM_XXH32_testdata[3913] */\n    { 1957, 0x00000000U, 0xC6194778U }, /* XSUM_XXH32_testdata[3914] */\n    { 1957, 0x9E3779B1U, 0x18BD3E49U }, /* XSUM_XXH32_testdata[3915] */\n    { 1958, 0x00000000U, 0xF325B7A3U }, /* XSUM_XXH32_testdata[3916] */\n    { 1958, 0x9E3779B1U, 0xDD8614E3U }, /* XSUM_XXH32_testdata[3917] */\n    { 1959, 0x00000000U, 0x0F194FC1U }, /* XSUM_XXH32_testdata[3918] */\n    { 1959, 0x9E3779B1U, 0x9627C2D2U }, /* XSUM_XXH32_testdata[3919] */\n    { 1960, 0x00000000U, 0x5BC110A1U }, /* XSUM_XXH32_testdata[3920] */\n    { 1960, 0x9E3779B1U, 0x3304A55DU }, /* XSUM_XXH32_testdata[3921] */\n    { 1961, 0x00000000U, 0x177639DFU }, /* XSUM_XXH32_testdata[3922] */\n    { 1961, 0x9E3779B1U, 0x39EDE8A5U }, /* XSUM_XXH32_testdata[3923] */\n    { 1962, 0x00000000U, 0xC27D185FU }, /* XSUM_XXH32_testdata[3924] */\n    { 1962, 0x9E3779B1U, 0x394DD9B5U }, /* XSUM_XXH32_testdata[3925] */\n    { 1963, 0x00000000U, 0x16AA8A49U }, /* XSUM_XXH32_testdata[3926] */\n    { 1963, 0x9E3779B1U, 0x1762A04EU }, /* XSUM_XXH32_testdata[3927] */\n    { 1964, 0x00000000U, 0x83C97FEBU }, /* XSUM_XXH32_testdata[3928] */\n    { 1964, 0x9E3779B1U, 0xC84B8AFFU }, /* XSUM_XXH32_testdata[3929] */\n    { 1965, 0x00000000U, 0x6A0C7F6FU }, /* XSUM_XXH32_testdata[3930] */\n    { 1965, 0x9E3779B1U, 0x9887FA64U }, /* XSUM_XXH32_testdata[3931] */\n    { 1966, 0x00000000U, 0x1CB29578U }, /* XSUM_XXH32_testdata[3932] */\n    { 1966, 0x9E3779B1U, 0x314BCCE7U }, /* XSUM_XXH32_testdata[3933] */\n    { 1967, 0x00000000U, 0xA894A59EU }, /* XSUM_XXH32_testdata[3934] */\n    { 1967, 0x9E3779B1U, 0x69BF2268U }, /* XSUM_XXH32_testdata[3935] */\n    { 1968, 0x00000000U, 0xC101BB45U }, /* XSUM_XXH32_testdata[3936] */\n    { 1968, 0x9E3779B1U, 0x857C3BDAU }, /* XSUM_XXH32_testdata[3937] */\n    { 1969, 0x00000000U, 0xED88C3A2U }, /* XSUM_XXH32_testdata[3938] */\n    { 1969, 0x9E3779B1U, 0x61A6BE5AU }, /* XSUM_XXH32_testdata[3939] */\n    { 1970, 0x00000000U, 0xF5331032U }, /* XSUM_XXH32_testdata[3940] */\n    { 1970, 0x9E3779B1U, 0xAFEE656DU }, /* XSUM_XXH32_testdata[3941] */\n    { 1971, 0x00000000U, 0xB20670B0U }, /* XSUM_XXH32_testdata[3942] */\n    { 1971, 0x9E3779B1U, 0x4DCEA155U }, /* XSUM_XXH32_testdata[3943] */\n    { 1972, 0x00000000U, 0xF86E69E0U }, /* XSUM_XXH32_testdata[3944] */\n    { 1972, 0x9E3779B1U, 0xF140AED0U }, /* XSUM_XXH32_testdata[3945] */\n    { 1973, 0x00000000U, 0x3540BC0FU }, /* XSUM_XXH32_testdata[3946] */\n    { 1973, 0x9E3779B1U, 0x0EADCC04U }, /* XSUM_XXH32_testdata[3947] */\n    { 1974, 0x00000000U, 0x2E735174U }, /* XSUM_XXH32_testdata[3948] */\n    { 1974, 0x9E3779B1U, 0x2A939E78U }, /* XSUM_XXH32_testdata[3949] */\n    { 1975, 0x00000000U, 0xA9F52C85U }, /* XSUM_XXH32_testdata[3950] */\n    { 1975, 0x9E3779B1U, 0xAD17FC4FU }, /* XSUM_XXH32_testdata[3951] */\n    { 1976, 0x00000000U, 0xF9FA268AU }, /* XSUM_XXH32_testdata[3952] */\n    { 1976, 0x9E3779B1U, 0x971874D5U }, /* XSUM_XXH32_testdata[3953] */\n    { 1977, 0x00000000U, 0xF4428F75U }, /* XSUM_XXH32_testdata[3954] */\n    { 1977, 0x9E3779B1U, 0x57FBDA89U }, /* XSUM_XXH32_testdata[3955] */\n    { 1978, 0x00000000U, 0x1AAC8291U }, /* XSUM_XXH32_testdata[3956] */\n    { 1978, 0x9E3779B1U, 0x9E007DFDU }, /* XSUM_XXH32_testdata[3957] */\n    { 1979, 0x00000000U, 0xC352B7ABU }, /* XSUM_XXH32_testdata[3958] */\n    { 1979, 0x9E3779B1U, 0x4E785FFFU }, /* XSUM_XXH32_testdata[3959] */\n    { 1980, 0x00000000U, 0xBAC98FF1U }, /* XSUM_XXH32_testdata[3960] */\n    { 1980, 0x9E3779B1U, 0x76595F3EU }, /* XSUM_XXH32_testdata[3961] */\n    { 1981, 0x00000000U, 0xA45E63FFU }, /* XSUM_XXH32_testdata[3962] */\n    { 1981, 0x9E3779B1U, 0xAD3D3BD3U }, /* XSUM_XXH32_testdata[3963] */\n    { 1982, 0x00000000U, 0x39DB4A7FU }, /* XSUM_XXH32_testdata[3964] */\n    { 1982, 0x9E3779B1U, 0xA3E7F0FBU }, /* XSUM_XXH32_testdata[3965] */\n    { 1983, 0x00000000U, 0xB66503D4U }, /* XSUM_XXH32_testdata[3966] */\n    { 1983, 0x9E3779B1U, 0x1E8E1994U }, /* XSUM_XXH32_testdata[3967] */\n    { 1984, 0x00000000U, 0xCF5DE874U }, /* XSUM_XXH32_testdata[3968] */\n    { 1984, 0x9E3779B1U, 0x2C1B6B3CU }, /* XSUM_XXH32_testdata[3969] */\n    { 1985, 0x00000000U, 0xE10E48A7U }, /* XSUM_XXH32_testdata[3970] */\n    { 1985, 0x9E3779B1U, 0x07559361U }, /* XSUM_XXH32_testdata[3971] */\n    { 1986, 0x00000000U, 0x066E22A7U }, /* XSUM_XXH32_testdata[3972] */\n    { 1986, 0x9E3779B1U, 0x7AC5E452U }, /* XSUM_XXH32_testdata[3973] */\n    { 1987, 0x00000000U, 0x188BA693U }, /* XSUM_XXH32_testdata[3974] */\n    { 1987, 0x9E3779B1U, 0x8A682BCDU }, /* XSUM_XXH32_testdata[3975] */\n    { 1988, 0x00000000U, 0xD0ED0A0CU }, /* XSUM_XXH32_testdata[3976] */\n    { 1988, 0x9E3779B1U, 0x4FB3B028U }, /* XSUM_XXH32_testdata[3977] */\n    { 1989, 0x00000000U, 0x474E34F9U }, /* XSUM_XXH32_testdata[3978] */\n    { 1989, 0x9E3779B1U, 0xFBCF3FE0U }, /* XSUM_XXH32_testdata[3979] */\n    { 1990, 0x00000000U, 0xD02693EFU }, /* XSUM_XXH32_testdata[3980] */\n    { 1990, 0x9E3779B1U, 0x1BB07C3CU }, /* XSUM_XXH32_testdata[3981] */\n    { 1991, 0x00000000U, 0x1C4CF83DU }, /* XSUM_XXH32_testdata[3982] */\n    { 1991, 0x9E3779B1U, 0x20338234U }, /* XSUM_XXH32_testdata[3983] */\n    { 1992, 0x00000000U, 0x6AABD9CEU }, /* XSUM_XXH32_testdata[3984] */\n    { 1992, 0x9E3779B1U, 0x8EB483CAU }, /* XSUM_XXH32_testdata[3985] */\n    { 1993, 0x00000000U, 0x1E773C8BU }, /* XSUM_XXH32_testdata[3986] */\n    { 1993, 0x9E3779B1U, 0xB64A5A21U }, /* XSUM_XXH32_testdata[3987] */\n    { 1994, 0x00000000U, 0x35AFF519U }, /* XSUM_XXH32_testdata[3988] */\n    { 1994, 0x9E3779B1U, 0x473FDCE8U }, /* XSUM_XXH32_testdata[3989] */\n    { 1995, 0x00000000U, 0xDC9FA8CDU }, /* XSUM_XXH32_testdata[3990] */\n    { 1995, 0x9E3779B1U, 0x892138B0U }, /* XSUM_XXH32_testdata[3991] */\n    { 1996, 0x00000000U, 0x6DEF8AD0U }, /* XSUM_XXH32_testdata[3992] */\n    { 1996, 0x9E3779B1U, 0x457FE27BU }, /* XSUM_XXH32_testdata[3993] */\n    { 1997, 0x00000000U, 0x890FB3E4U }, /* XSUM_XXH32_testdata[3994] */\n    { 1997, 0x9E3779B1U, 0x1F5B9CEBU }, /* XSUM_XXH32_testdata[3995] */\n    { 1998, 0x00000000U, 0xB64776BEU }, /* XSUM_XXH32_testdata[3996] */\n    { 1998, 0x9E3779B1U, 0xB101B5F3U }, /* XSUM_XXH32_testdata[3997] */\n    { 1999, 0x00000000U, 0xF2E14CBEU }, /* XSUM_XXH32_testdata[3998] */\n    { 1999, 0x9E3779B1U, 0xCC0E148DU }, /* XSUM_XXH32_testdata[3999] */\n    { 2000, 0x00000000U, 0x037244F1U }, /* XSUM_XXH32_testdata[4000] */\n    { 2000, 0x9E3779B1U, 0xB2FBE118U }, /* XSUM_XXH32_testdata[4001] */\n    { 2001, 0x00000000U, 0x50448CFCU }, /* XSUM_XXH32_testdata[4002] */\n    { 2001, 0x9E3779B1U, 0xFA843DEBU }, /* XSUM_XXH32_testdata[4003] */\n    { 2002, 0x00000000U, 0x06B8CE0AU }, /* XSUM_XXH32_testdata[4004] */\n    { 2002, 0x9E3779B1U, 0x3A40336AU }, /* XSUM_XXH32_testdata[4005] */\n    { 2003, 0x00000000U, 0xA630739DU }, /* XSUM_XXH32_testdata[4006] */\n    { 2003, 0x9E3779B1U, 0xDB23BC34U }, /* XSUM_XXH32_testdata[4007] */\n    { 2004, 0x00000000U, 0x6353FAE6U }, /* XSUM_XXH32_testdata[4008] */\n    { 2004, 0x9E3779B1U, 0x3F8D9741U }, /* XSUM_XXH32_testdata[4009] */\n    { 2005, 0x00000000U, 0xA60FF8FBU }, /* XSUM_XXH32_testdata[4010] */\n    { 2005, 0x9E3779B1U, 0x2D6B8550U }, /* XSUM_XXH32_testdata[4011] */\n    { 2006, 0x00000000U, 0x3AE24C4BU }, /* XSUM_XXH32_testdata[4012] */\n    { 2006, 0x9E3779B1U, 0x5A116536U }, /* XSUM_XXH32_testdata[4013] */\n    { 2007, 0x00000000U, 0x9648CE72U }, /* XSUM_XXH32_testdata[4014] */\n    { 2007, 0x9E3779B1U, 0x516E552AU }, /* XSUM_XXH32_testdata[4015] */\n    { 2008, 0x00000000U, 0x59A961B3U }, /* XSUM_XXH32_testdata[4016] */\n    { 2008, 0x9E3779B1U, 0xEFBF6827U }, /* XSUM_XXH32_testdata[4017] */\n    { 2009, 0x00000000U, 0xAD34FA0CU }, /* XSUM_XXH32_testdata[4018] */\n    { 2009, 0x9E3779B1U, 0x31A65802U }, /* XSUM_XXH32_testdata[4019] */\n    { 2010, 0x00000000U, 0xA35EAFE9U }, /* XSUM_XXH32_testdata[4020] */\n    { 2010, 0x9E3779B1U, 0x46793AC6U }, /* XSUM_XXH32_testdata[4021] */\n    { 2011, 0x00000000U, 0x7A55F70EU }, /* XSUM_XXH32_testdata[4022] */\n    { 2011, 0x9E3779B1U, 0xB5CB7FE3U }, /* XSUM_XXH32_testdata[4023] */\n    { 2012, 0x00000000U, 0x245FE661U }, /* XSUM_XXH32_testdata[4024] */\n    { 2012, 0x9E3779B1U, 0xAB3CC11BU }, /* XSUM_XXH32_testdata[4025] */\n    { 2013, 0x00000000U, 0x5D03D1B8U }, /* XSUM_XXH32_testdata[4026] */\n    { 2013, 0x9E3779B1U, 0xD588E35EU }, /* XSUM_XXH32_testdata[4027] */\n    { 2014, 0x00000000U, 0x9E86CEFCU }, /* XSUM_XXH32_testdata[4028] */\n    { 2014, 0x9E3779B1U, 0x5A2E2EBEU }, /* XSUM_XXH32_testdata[4029] */\n    { 2015, 0x00000000U, 0x08B88BD0U }, /* XSUM_XXH32_testdata[4030] */\n    { 2015, 0x9E3779B1U, 0x089F95BFU }, /* XSUM_XXH32_testdata[4031] */\n    { 2016, 0x00000000U, 0xC49A0201U }, /* XSUM_XXH32_testdata[4032] */\n    { 2016, 0x9E3779B1U, 0x083A01CCU }, /* XSUM_XXH32_testdata[4033] */\n    { 2017, 0x00000000U, 0xA8BFCB32U }, /* XSUM_XXH32_testdata[4034] */\n    { 2017, 0x9E3779B1U, 0x5F51E2E9U }, /* XSUM_XXH32_testdata[4035] */\n    { 2018, 0x00000000U, 0x56D0D478U }, /* XSUM_XXH32_testdata[4036] */\n    { 2018, 0x9E3779B1U, 0xE86FE06CU }, /* XSUM_XXH32_testdata[4037] */\n    { 2019, 0x00000000U, 0x16E681BEU }, /* XSUM_XXH32_testdata[4038] */\n    { 2019, 0x9E3779B1U, 0xB4EB93CBU }, /* XSUM_XXH32_testdata[4039] */\n    { 2020, 0x00000000U, 0x8A7C8329U }, /* XSUM_XXH32_testdata[4040] */\n    { 2020, 0x9E3779B1U, 0x2DAACEAFU }, /* XSUM_XXH32_testdata[4041] */\n    { 2021, 0x00000000U, 0xC2766DBAU }, /* XSUM_XXH32_testdata[4042] */\n    { 2021, 0x9E3779B1U, 0x8FB8125FU }, /* XSUM_XXH32_testdata[4043] */\n    { 2022, 0x00000000U, 0x7E60D1C2U }, /* XSUM_XXH32_testdata[4044] */\n    { 2022, 0x9E3779B1U, 0xD07D751EU }, /* XSUM_XXH32_testdata[4045] */\n    { 2023, 0x00000000U, 0x6214655CU }, /* XSUM_XXH32_testdata[4046] */\n    { 2023, 0x9E3779B1U, 0x291474CCU }, /* XSUM_XXH32_testdata[4047] */\n    { 2024, 0x00000000U, 0xBBD6C077U }, /* XSUM_XXH32_testdata[4048] */\n    { 2024, 0x9E3779B1U, 0x69720F53U }, /* XSUM_XXH32_testdata[4049] */\n    { 2025, 0x00000000U, 0x90AFACE9U }, /* XSUM_XXH32_testdata[4050] */\n    { 2025, 0x9E3779B1U, 0x0A4A2677U }, /* XSUM_XXH32_testdata[4051] */\n    { 2026, 0x00000000U, 0xEE7FA58BU }, /* XSUM_XXH32_testdata[4052] */\n    { 2026, 0x9E3779B1U, 0x4C4FB263U }, /* XSUM_XXH32_testdata[4053] */\n    { 2027, 0x00000000U, 0x40DC1676U }, /* XSUM_XXH32_testdata[4054] */\n    { 2027, 0x9E3779B1U, 0x9B66BBC7U }, /* XSUM_XXH32_testdata[4055] */\n    { 2028, 0x00000000U, 0xF053E1D4U }, /* XSUM_XXH32_testdata[4056] */\n    { 2028, 0x9E3779B1U, 0xA60B2337U }, /* XSUM_XXH32_testdata[4057] */\n    { 2029, 0x00000000U, 0x775F2608U }, /* XSUM_XXH32_testdata[4058] */\n    { 2029, 0x9E3779B1U, 0xD31BB491U }, /* XSUM_XXH32_testdata[4059] */\n    { 2030, 0x00000000U, 0x637D5315U }, /* XSUM_XXH32_testdata[4060] */\n    { 2030, 0x9E3779B1U, 0x7F0210C2U }, /* XSUM_XXH32_testdata[4061] */\n    { 2031, 0x00000000U, 0x5EBF2AA7U }, /* XSUM_XXH32_testdata[4062] */\n    { 2031, 0x9E3779B1U, 0xE71ABE86U }, /* XSUM_XXH32_testdata[4063] */\n    { 2032, 0x00000000U, 0x1C72071DU }, /* XSUM_XXH32_testdata[4064] */\n    { 2032, 0x9E3779B1U, 0x07F4C560U }, /* XSUM_XXH32_testdata[4065] */\n    { 2033, 0x00000000U, 0x41418F2CU }, /* XSUM_XXH32_testdata[4066] */\n    { 2033, 0x9E3779B1U, 0x7EE8E647U }, /* XSUM_XXH32_testdata[4067] */\n    { 2034, 0x00000000U, 0x45D9462AU }, /* XSUM_XXH32_testdata[4068] */\n    { 2034, 0x9E3779B1U, 0xAF1BE5F1U }, /* XSUM_XXH32_testdata[4069] */\n    { 2035, 0x00000000U, 0x21BC7874U }, /* XSUM_XXH32_testdata[4070] */\n    { 2035, 0x9E3779B1U, 0xE29E0AF3U }, /* XSUM_XXH32_testdata[4071] */\n    { 2036, 0x00000000U, 0xA4975122U }, /* XSUM_XXH32_testdata[4072] */\n    { 2036, 0x9E3779B1U, 0xA304FF25U }, /* XSUM_XXH32_testdata[4073] */\n    { 2037, 0x00000000U, 0xEFBA9648U }, /* XSUM_XXH32_testdata[4074] */\n    { 2037, 0x9E3779B1U, 0x374C61BAU }, /* XSUM_XXH32_testdata[4075] */\n    { 2038, 0x00000000U, 0xE1C05541U }, /* XSUM_XXH32_testdata[4076] */\n    { 2038, 0x9E3779B1U, 0x4B71A074U }, /* XSUM_XXH32_testdata[4077] */\n    { 2039, 0x00000000U, 0x80957D94U }, /* XSUM_XXH32_testdata[4078] */\n    { 2039, 0x9E3779B1U, 0xC49E1925U }, /* XSUM_XXH32_testdata[4079] */\n    { 2040, 0x00000000U, 0x6D4D1C66U }, /* XSUM_XXH32_testdata[4080] */\n    { 2040, 0x9E3779B1U, 0xE1C650D3U }, /* XSUM_XXH32_testdata[4081] */\n    { 2041, 0x00000000U, 0x6D646431U }, /* XSUM_XXH32_testdata[4082] */\n    { 2041, 0x9E3779B1U, 0x00891D66U }, /* XSUM_XXH32_testdata[4083] */\n    { 2042, 0x00000000U, 0x71099C2DU }, /* XSUM_XXH32_testdata[4084] */\n    { 2042, 0x9E3779B1U, 0x4F7223C7U }, /* XSUM_XXH32_testdata[4085] */\n    { 2043, 0x00000000U, 0x4A04521BU }, /* XSUM_XXH32_testdata[4086] */\n    { 2043, 0x9E3779B1U, 0x139BD0D3U }, /* XSUM_XXH32_testdata[4087] */\n    { 2044, 0x00000000U, 0x9E81B0E0U }, /* XSUM_XXH32_testdata[4088] */\n    { 2044, 0x9E3779B1U, 0xA2D3A39BU }, /* XSUM_XXH32_testdata[4089] */\n    { 2045, 0x00000000U, 0x4469E1A8U }, /* XSUM_XXH32_testdata[4090] */\n    { 2045, 0x9E3779B1U, 0x7C93C1A4U }, /* XSUM_XXH32_testdata[4091] */\n    { 2046, 0x00000000U, 0xB69D2E91U }, /* XSUM_XXH32_testdata[4092] */\n    { 2046, 0x9E3779B1U, 0x56B9ACCEU }, /* XSUM_XXH32_testdata[4093] */\n    { 2047, 0x00000000U, 0x05CF4C53U }, /* XSUM_XXH32_testdata[4094] */\n    { 2047, 0x9E3779B1U, 0xDAC740B5U }, /* XSUM_XXH32_testdata[4095] */\n    { 2048, 0x00000000U, 0x7C535464U }, /* XSUM_XXH32_testdata[4096] */\n    { 2048, 0x9E3779B1U, 0x89688D5EU }, /* XSUM_XXH32_testdata[4097] */\n    { 2049, 0x00000000U, 0x880E455CU }, /* XSUM_XXH32_testdata[4098] */\n    { 2049, 0x9E3779B1U, 0x0C3F5225U }, /* XSUM_XXH32_testdata[4099] */\n    { 2050, 0x00000000U, 0x0CD5328AU }, /* XSUM_XXH32_testdata[4100] */\n    { 2050, 0x9E3779B1U, 0x5E4CECABU }, /* XSUM_XXH32_testdata[4101] */\n    { 2051, 0x00000000U, 0xB02EC05BU }, /* XSUM_XXH32_testdata[4102] */\n    { 2051, 0x9E3779B1U, 0x8EB1CA2EU }, /* XSUM_XXH32_testdata[4103] */\n    { 2052, 0x00000000U, 0x819785B4U }, /* XSUM_XXH32_testdata[4104] */\n    { 2052, 0x9E3779B1U, 0xEE4DC00FU }, /* XSUM_XXH32_testdata[4105] */\n    { 2053, 0x00000000U, 0xBB02DD05U }, /* XSUM_XXH32_testdata[4106] */\n    { 2053, 0x9E3779B1U, 0xE0B03346U }, /* XSUM_XXH32_testdata[4107] */\n    { 2054, 0x00000000U, 0x9BB201E3U }, /* XSUM_XXH32_testdata[4108] */\n    { 2054, 0x9E3779B1U, 0xA50B6FEFU }, /* XSUM_XXH32_testdata[4109] */\n    { 2055, 0x00000000U, 0x5EB9E721U }, /* XSUM_XXH32_testdata[4110] */\n    { 2055, 0x9E3779B1U, 0x84B80A21U }, /* XSUM_XXH32_testdata[4111] */\n    { 2056, 0x00000000U, 0x4A8BB9DBU }, /* XSUM_XXH32_testdata[4112] */\n    { 2056, 0x9E3779B1U, 0xFBFB5F35U }, /* XSUM_XXH32_testdata[4113] */\n    { 2057, 0x00000000U, 0x621A3AE1U }, /* XSUM_XXH32_testdata[4114] */\n    { 2057, 0x9E3779B1U, 0xE62B3DA9U }, /* XSUM_XXH32_testdata[4115] */\n    { 2058, 0x00000000U, 0xD433D0D2U }, /* XSUM_XXH32_testdata[4116] */\n    { 2058, 0x9E3779B1U, 0x023E0618U }, /* XSUM_XXH32_testdata[4117] */\n    { 2059, 0x00000000U, 0x8D358340U }, /* XSUM_XXH32_testdata[4118] */\n    { 2059, 0x9E3779B1U, 0x98103E37U }, /* XSUM_XXH32_testdata[4119] */\n    { 2060, 0x00000000U, 0x1C734A82U }, /* XSUM_XXH32_testdata[4120] */\n    { 2060, 0x9E3779B1U, 0xA5157D21U }, /* XSUM_XXH32_testdata[4121] */\n    { 2061, 0x00000000U, 0xE4C01B2FU }, /* XSUM_XXH32_testdata[4122] */\n    { 2061, 0x9E3779B1U, 0xEA9E2AE1U }, /* XSUM_XXH32_testdata[4123] */\n    { 2062, 0x00000000U, 0x1EE4F10EU }, /* XSUM_XXH32_testdata[4124] */\n    { 2062, 0x9E3779B1U, 0x93956AB3U }, /* XSUM_XXH32_testdata[4125] */\n    { 2063, 0x00000000U, 0xA568A1D0U }, /* XSUM_XXH32_testdata[4126] */\n    { 2063, 0x9E3779B1U, 0x490518BFU }, /* XSUM_XXH32_testdata[4127] */\n    { 2064, 0x00000000U, 0x0894677FU }, /* XSUM_XXH32_testdata[4128] */\n    { 2064, 0x9E3779B1U, 0x82829756U }, /* XSUM_XXH32_testdata[4129] */\n    { 2065, 0x00000000U, 0xB2DA6FCFU }, /* XSUM_XXH32_testdata[4130] */\n    { 2065, 0x9E3779B1U, 0x35F8DBEBU }, /* XSUM_XXH32_testdata[4131] */\n    { 2066, 0x00000000U, 0x4A995E77U }, /* XSUM_XXH32_testdata[4132] */\n    { 2066, 0x9E3779B1U, 0x67F7EB59U }, /* XSUM_XXH32_testdata[4133] */\n    { 2067, 0x00000000U, 0x241E6D99U }, /* XSUM_XXH32_testdata[4134] */\n    { 2067, 0x9E3779B1U, 0x7FB35950U }, /* XSUM_XXH32_testdata[4135] */\n    { 2068, 0x00000000U, 0x807203FFU }, /* XSUM_XXH32_testdata[4136] */\n    { 2068, 0x9E3779B1U, 0x84F6AADCU }, /* XSUM_XXH32_testdata[4137] */\n    { 2069, 0x00000000U, 0x713F8660U }, /* XSUM_XXH32_testdata[4138] */\n    { 2069, 0x9E3779B1U, 0x28046D70U }, /* XSUM_XXH32_testdata[4139] */\n    { 2070, 0x00000000U, 0x8BB2D1DCU }, /* XSUM_XXH32_testdata[4140] */\n    { 2070, 0x9E3779B1U, 0x88B61103U }, /* XSUM_XXH32_testdata[4141] */\n    { 2071, 0x00000000U, 0x6952D726U }, /* XSUM_XXH32_testdata[4142] */\n    { 2071, 0x9E3779B1U, 0xCA5E851DU }, /* XSUM_XXH32_testdata[4143] */\n    { 2072, 0x00000000U, 0xBC494A9DU }, /* XSUM_XXH32_testdata[4144] */\n    { 2072, 0x9E3779B1U, 0x2245A660U }, /* XSUM_XXH32_testdata[4145] */\n    { 2073, 0x00000000U, 0xEF4414E3U }, /* XSUM_XXH32_testdata[4146] */\n    { 2073, 0x9E3779B1U, 0x1720471BU }, /* XSUM_XXH32_testdata[4147] */\n    { 2074, 0x00000000U, 0x498A6F0BU }, /* XSUM_XXH32_testdata[4148] */\n    { 2074, 0x9E3779B1U, 0x6BC7CB59U }, /* XSUM_XXH32_testdata[4149] */\n    { 2075, 0x00000000U, 0x7436EB2CU }, /* XSUM_XXH32_testdata[4150] */\n    { 2075, 0x9E3779B1U, 0xD1770A41U }, /* XSUM_XXH32_testdata[4151] */\n    { 2076, 0x00000000U, 0xE7ED09E0U }, /* XSUM_XXH32_testdata[4152] */\n    { 2076, 0x9E3779B1U, 0xFE421D54U }, /* XSUM_XXH32_testdata[4153] */\n    { 2077, 0x00000000U, 0x884E145EU }, /* XSUM_XXH32_testdata[4154] */\n    { 2077, 0x9E3779B1U, 0x5106C772U }, /* XSUM_XXH32_testdata[4155] */\n    { 2078, 0x00000000U, 0xA0483532U }, /* XSUM_XXH32_testdata[4156] */\n    { 2078, 0x9E3779B1U, 0x807EC1E3U }, /* XSUM_XXH32_testdata[4157] */\n    { 2079, 0x00000000U, 0x6E5D2A65U }, /* XSUM_XXH32_testdata[4158] */\n    { 2079, 0x9E3779B1U, 0xE0AECE5AU }, /* XSUM_XXH32_testdata[4159] */\n    { 2080, 0x00000000U, 0xDDFF4A1FU }, /* XSUM_XXH32_testdata[4160] */\n    { 2080, 0x9E3779B1U, 0x74896BB0U }, /* XSUM_XXH32_testdata[4161] */\n    { 2081, 0x00000000U, 0x8E2E4382U }, /* XSUM_XXH32_testdata[4162] */\n    { 2081, 0x9E3779B1U, 0x6F62BBFFU }, /* XSUM_XXH32_testdata[4163] */\n    { 2082, 0x00000000U, 0x2BA6E39CU }, /* XSUM_XXH32_testdata[4164] */\n    { 2082, 0x9E3779B1U, 0x83A3C889U }, /* XSUM_XXH32_testdata[4165] */\n    { 2083, 0x00000000U, 0x6108A48CU }, /* XSUM_XXH32_testdata[4166] */\n    { 2083, 0x9E3779B1U, 0xAC9D1C66U }, /* XSUM_XXH32_testdata[4167] */\n    { 2084, 0x00000000U, 0x0F218683U }, /* XSUM_XXH32_testdata[4168] */\n    { 2084, 0x9E3779B1U, 0x9812C2A7U }, /* XSUM_XXH32_testdata[4169] */\n    { 2085, 0x00000000U, 0xCFCA7398U }, /* XSUM_XXH32_testdata[4170] */\n    { 2085, 0x9E3779B1U, 0xDCEBCDDDU }, /* XSUM_XXH32_testdata[4171] */\n    { 2086, 0x00000000U, 0x56C5D691U }, /* XSUM_XXH32_testdata[4172] */\n    { 2086, 0x9E3779B1U, 0xC37D8A9FU }, /* XSUM_XXH32_testdata[4173] */\n    { 2087, 0x00000000U, 0x23C0782DU }, /* XSUM_XXH32_testdata[4174] */\n    { 2087, 0x9E3779B1U, 0x32D0C4E7U }, /* XSUM_XXH32_testdata[4175] */\n    { 2088, 0x00000000U, 0x52055550U }, /* XSUM_XXH32_testdata[4176] */\n    { 2088, 0x9E3779B1U, 0x8153DC52U }, /* XSUM_XXH32_testdata[4177] */\n    { 2089, 0x00000000U, 0x396A700FU }, /* XSUM_XXH32_testdata[4178] */\n    { 2089, 0x9E3779B1U, 0x86CC74C0U }, /* XSUM_XXH32_testdata[4179] */\n    { 2090, 0x00000000U, 0x3C1E21A9U }, /* XSUM_XXH32_testdata[4180] */\n    { 2090, 0x9E3779B1U, 0xAA919D65U }, /* XSUM_XXH32_testdata[4181] */\n    { 2091, 0x00000000U, 0xA1EE86D3U }, /* XSUM_XXH32_testdata[4182] */\n    { 2091, 0x9E3779B1U, 0x7508F175U }, /* XSUM_XXH32_testdata[4183] */\n    { 2092, 0x00000000U, 0x0C0C92CEU }, /* XSUM_XXH32_testdata[4184] */\n    { 2092, 0x9E3779B1U, 0x31AAE533U }, /* XSUM_XXH32_testdata[4185] */\n    { 2093, 0x00000000U, 0x0FED09E1U }, /* XSUM_XXH32_testdata[4186] */\n    { 2093, 0x9E3779B1U, 0xA71F16A2U }, /* XSUM_XXH32_testdata[4187] */\n    { 2094, 0x00000000U, 0x2B97260DU }, /* XSUM_XXH32_testdata[4188] */\n    { 2094, 0x9E3779B1U, 0x1F320538U }, /* XSUM_XXH32_testdata[4189] */\n    { 2095, 0x00000000U, 0x226857ECU }, /* XSUM_XXH32_testdata[4190] */\n    { 2095, 0x9E3779B1U, 0xBE2AA830U }, /* XSUM_XXH32_testdata[4191] */\n    { 2096, 0x00000000U, 0x483AF09AU }, /* XSUM_XXH32_testdata[4192] */\n    { 2096, 0x9E3779B1U, 0xEB914369U }, /* XSUM_XXH32_testdata[4193] */\n    { 2097, 0x00000000U, 0x2D17844DU }, /* XSUM_XXH32_testdata[4194] */\n    { 2097, 0x9E3779B1U, 0xA950DEBDU }, /* XSUM_XXH32_testdata[4195] */\n    { 2098, 0x00000000U, 0x1439FDE2U }, /* XSUM_XXH32_testdata[4196] */\n    { 2098, 0x9E3779B1U, 0x26FE8A85U }, /* XSUM_XXH32_testdata[4197] */\n    { 2099, 0x00000000U, 0x5772718CU }, /* XSUM_XXH32_testdata[4198] */\n    { 2099, 0x9E3779B1U, 0x4FCA33C3U }, /* XSUM_XXH32_testdata[4199] */\n    { 2100, 0x00000000U, 0xD9EB2B50U }, /* XSUM_XXH32_testdata[4200] */\n    { 2100, 0x9E3779B1U, 0xE8F459E0U }, /* XSUM_XXH32_testdata[4201] */\n    { 2101, 0x00000000U, 0xA28FB819U }, /* XSUM_XXH32_testdata[4202] */\n    { 2101, 0x9E3779B1U, 0x9280CA2FU }, /* XSUM_XXH32_testdata[4203] */\n    { 2102, 0x00000000U, 0xEBCFFDB8U }, /* XSUM_XXH32_testdata[4204] */\n    { 2102, 0x9E3779B1U, 0xEB017DC5U }, /* XSUM_XXH32_testdata[4205] */\n    { 2103, 0x00000000U, 0x54058833U }, /* XSUM_XXH32_testdata[4206] */\n    { 2103, 0x9E3779B1U, 0x28EB819FU }, /* XSUM_XXH32_testdata[4207] */\n    { 2104, 0x00000000U, 0xE578AD4EU }, /* XSUM_XXH32_testdata[4208] */\n    { 2104, 0x9E3779B1U, 0x98998373U }, /* XSUM_XXH32_testdata[4209] */\n    { 2105, 0x00000000U, 0x75DD1E49U }, /* XSUM_XXH32_testdata[4210] */\n    { 2105, 0x9E3779B1U, 0x55FB4D69U }, /* XSUM_XXH32_testdata[4211] */\n    { 2106, 0x00000000U, 0x266483CAU }, /* XSUM_XXH32_testdata[4212] */\n    { 2106, 0x9E3779B1U, 0x1B37FDC4U }, /* XSUM_XXH32_testdata[4213] */\n    { 2107, 0x00000000U, 0x2703FCA6U }, /* XSUM_XXH32_testdata[4214] */\n    { 2107, 0x9E3779B1U, 0x668C4D82U }, /* XSUM_XXH32_testdata[4215] */\n    { 2108, 0x00000000U, 0xCCFF2548U }, /* XSUM_XXH32_testdata[4216] */\n    { 2108, 0x9E3779B1U, 0x22EBB2C2U }, /* XSUM_XXH32_testdata[4217] */\n    { 2109, 0x00000000U, 0x02A027B1U }, /* XSUM_XXH32_testdata[4218] */\n    { 2109, 0x9E3779B1U, 0xC8F3C892U }, /* XSUM_XXH32_testdata[4219] */\n    { 2110, 0x00000000U, 0x1F3AD215U }, /* XSUM_XXH32_testdata[4220] */\n    { 2110, 0x9E3779B1U, 0xF89BB413U }, /* XSUM_XXH32_testdata[4221] */\n    { 2111, 0x00000000U, 0x75B32021U }, /* XSUM_XXH32_testdata[4222] */\n    { 2111, 0x9E3779B1U, 0x9E179034U }, /* XSUM_XXH32_testdata[4223] */\n    { 2112, 0x00000000U, 0x90BA76C2U }, /* XSUM_XXH32_testdata[4224] */\n    { 2112, 0x9E3779B1U, 0x89BC588FU }, /* XSUM_XXH32_testdata[4225] */\n    { 2113, 0x00000000U, 0xA4E0D6B2U }, /* XSUM_XXH32_testdata[4226] */\n    { 2113, 0x9E3779B1U, 0xE5F97F9AU }, /* XSUM_XXH32_testdata[4227] */\n    { 2114, 0x00000000U, 0x9B30F92FU }, /* XSUM_XXH32_testdata[4228] */\n    { 2114, 0x9E3779B1U, 0xB072872FU }, /* XSUM_XXH32_testdata[4229] */\n    { 2115, 0x00000000U, 0xFB8EE30EU }, /* XSUM_XXH32_testdata[4230] */\n    { 2115, 0x9E3779B1U, 0xA965355EU }, /* XSUM_XXH32_testdata[4231] */\n    { 2116, 0x00000000U, 0x4ECD0C57U }, /* XSUM_XXH32_testdata[4232] */\n    { 2116, 0x9E3779B1U, 0x66DCD701U }, /* XSUM_XXH32_testdata[4233] */\n    { 2117, 0x00000000U, 0xBDED9E14U }, /* XSUM_XXH32_testdata[4234] */\n    { 2117, 0x9E3779B1U, 0x8330F84CU }, /* XSUM_XXH32_testdata[4235] */\n    { 2118, 0x00000000U, 0x6636A7CBU }, /* XSUM_XXH32_testdata[4236] */\n    { 2118, 0x9E3779B1U, 0xC1305149U }, /* XSUM_XXH32_testdata[4237] */\n    { 2119, 0x00000000U, 0xEE6E1F55U }, /* XSUM_XXH32_testdata[4238] */\n    { 2119, 0x9E3779B1U, 0x883D1A16U }, /* XSUM_XXH32_testdata[4239] */\n    { 2120, 0x00000000U, 0xA3D44D6BU }, /* XSUM_XXH32_testdata[4240] */\n    { 2120, 0x9E3779B1U, 0x29A7B351U }, /* XSUM_XXH32_testdata[4241] */\n    { 2121, 0x00000000U, 0x8155248FU }, /* XSUM_XXH32_testdata[4242] */\n    { 2121, 0x9E3779B1U, 0x115824D3U }, /* XSUM_XXH32_testdata[4243] */\n    { 2122, 0x00000000U, 0xDAB244E4U }, /* XSUM_XXH32_testdata[4244] */\n    { 2122, 0x9E3779B1U, 0x538CF5D7U }, /* XSUM_XXH32_testdata[4245] */\n    { 2123, 0x00000000U, 0xCCADAA76U }, /* XSUM_XXH32_testdata[4246] */\n    { 2123, 0x9E3779B1U, 0x79CE1918U }, /* XSUM_XXH32_testdata[4247] */\n    { 2124, 0x00000000U, 0x291A0B1EU }, /* XSUM_XXH32_testdata[4248] */\n    { 2124, 0x9E3779B1U, 0x0B6DFEACU }, /* XSUM_XXH32_testdata[4249] */\n    { 2125, 0x00000000U, 0x6722DAE9U }, /* XSUM_XXH32_testdata[4250] */\n    { 2125, 0x9E3779B1U, 0x0FE2989AU }, /* XSUM_XXH32_testdata[4251] */\n    { 2126, 0x00000000U, 0xCA5552BDU }, /* XSUM_XXH32_testdata[4252] */\n    { 2126, 0x9E3779B1U, 0x62FA78A6U }, /* XSUM_XXH32_testdata[4253] */\n    { 2127, 0x00000000U, 0xD4D05195U }, /* XSUM_XXH32_testdata[4254] */\n    { 2127, 0x9E3779B1U, 0x96D74687U }, /* XSUM_XXH32_testdata[4255] */\n    { 2128, 0x00000000U, 0xAA1B18EFU }, /* XSUM_XXH32_testdata[4256] */\n    { 2128, 0x9E3779B1U, 0x3916A04DU }, /* XSUM_XXH32_testdata[4257] */\n    { 2129, 0x00000000U, 0x77BEC316U }, /* XSUM_XXH32_testdata[4258] */\n    { 2129, 0x9E3779B1U, 0xEC73137EU }, /* XSUM_XXH32_testdata[4259] */\n    { 2130, 0x00000000U, 0xB447EDE9U }, /* XSUM_XXH32_testdata[4260] */\n    { 2130, 0x9E3779B1U, 0x2BAD6C2EU }, /* XSUM_XXH32_testdata[4261] */\n    { 2131, 0x00000000U, 0xC4EABAB1U }, /* XSUM_XXH32_testdata[4262] */\n    { 2131, 0x9E3779B1U, 0xBF962F78U }, /* XSUM_XXH32_testdata[4263] */\n    { 2132, 0x00000000U, 0xF5D647AEU }, /* XSUM_XXH32_testdata[4264] */\n    { 2132, 0x9E3779B1U, 0x453B9698U }, /* XSUM_XXH32_testdata[4265] */\n    { 2133, 0x00000000U, 0xC067D3EBU }, /* XSUM_XXH32_testdata[4266] */\n    { 2133, 0x9E3779B1U, 0x31C65AC9U }, /* XSUM_XXH32_testdata[4267] */\n    { 2134, 0x00000000U, 0xED35F95BU }, /* XSUM_XXH32_testdata[4268] */\n    { 2134, 0x9E3779B1U, 0x694511F0U }, /* XSUM_XXH32_testdata[4269] */\n    { 2135, 0x00000000U, 0x66EAE8A9U }, /* XSUM_XXH32_testdata[4270] */\n    { 2135, 0x9E3779B1U, 0xD92C573CU }, /* XSUM_XXH32_testdata[4271] */\n    { 2136, 0x00000000U, 0xCB07B88BU }, /* XSUM_XXH32_testdata[4272] */\n    { 2136, 0x9E3779B1U, 0x2E05A315U }, /* XSUM_XXH32_testdata[4273] */\n    { 2137, 0x00000000U, 0xA507A109U }, /* XSUM_XXH32_testdata[4274] */\n    { 2137, 0x9E3779B1U, 0x8F57286CU }, /* XSUM_XXH32_testdata[4275] */\n    { 2138, 0x00000000U, 0xC7ED3A83U }, /* XSUM_XXH32_testdata[4276] */\n    { 2138, 0x9E3779B1U, 0x79911DEEU }, /* XSUM_XXH32_testdata[4277] */\n    { 2139, 0x00000000U, 0x92FC8AB7U }, /* XSUM_XXH32_testdata[4278] */\n    { 2139, 0x9E3779B1U, 0x32875F23U }, /* XSUM_XXH32_testdata[4279] */\n    { 2140, 0x00000000U, 0x2B0CBB1FU }, /* XSUM_XXH32_testdata[4280] */\n    { 2140, 0x9E3779B1U, 0x36F822AAU }, /* XSUM_XXH32_testdata[4281] */\n    { 2141, 0x00000000U, 0xC597BD36U }, /* XSUM_XXH32_testdata[4282] */\n    { 2141, 0x9E3779B1U, 0x7CC8B801U }, /* XSUM_XXH32_testdata[4283] */\n    { 2142, 0x00000000U, 0x7EB11318U }, /* XSUM_XXH32_testdata[4284] */\n    { 2142, 0x9E3779B1U, 0x74617AD2U }, /* XSUM_XXH32_testdata[4285] */\n    { 2143, 0x00000000U, 0x27275139U }, /* XSUM_XXH32_testdata[4286] */\n    { 2143, 0x9E3779B1U, 0xC5EDC2F3U }, /* XSUM_XXH32_testdata[4287] */\n    { 2144, 0x00000000U, 0x6A643B07U }, /* XSUM_XXH32_testdata[4288] */\n    { 2144, 0x9E3779B1U, 0xF7B9436FU }, /* XSUM_XXH32_testdata[4289] */\n    { 2145, 0x00000000U, 0x5015717CU }, /* XSUM_XXH32_testdata[4290] */\n    { 2145, 0x9E3779B1U, 0x43760B37U }, /* XSUM_XXH32_testdata[4291] */\n    { 2146, 0x00000000U, 0x2E2265F8U }, /* XSUM_XXH32_testdata[4292] */\n    { 2146, 0x9E3779B1U, 0xF6DA51EEU }, /* XSUM_XXH32_testdata[4293] */\n    { 2147, 0x00000000U, 0x42FBB597U }, /* XSUM_XXH32_testdata[4294] */\n    { 2147, 0x9E3779B1U, 0x00330918U }, /* XSUM_XXH32_testdata[4295] */\n    { 2148, 0x00000000U, 0x3FC0AD5CU }, /* XSUM_XXH32_testdata[4296] */\n    { 2148, 0x9E3779B1U, 0x045DBF11U }, /* XSUM_XXH32_testdata[4297] */\n    { 2149, 0x00000000U, 0x4020BF41U }, /* XSUM_XXH32_testdata[4298] */\n    { 2149, 0x9E3779B1U, 0xFB478550U }, /* XSUM_XXH32_testdata[4299] */\n    { 2150, 0x00000000U, 0xBA072C74U }, /* XSUM_XXH32_testdata[4300] */\n    { 2150, 0x9E3779B1U, 0xE472A9E7U }, /* XSUM_XXH32_testdata[4301] */\n    { 2151, 0x00000000U, 0x815645CAU }, /* XSUM_XXH32_testdata[4302] */\n    { 2151, 0x9E3779B1U, 0x37ED1656U }, /* XSUM_XXH32_testdata[4303] */\n    { 2152, 0x00000000U, 0x3B2B5205U }, /* XSUM_XXH32_testdata[4304] */\n    { 2152, 0x9E3779B1U, 0x14752F3FU }, /* XSUM_XXH32_testdata[4305] */\n    { 2153, 0x00000000U, 0x6916B481U }, /* XSUM_XXH32_testdata[4306] */\n    { 2153, 0x9E3779B1U, 0xC59879F7U }, /* XSUM_XXH32_testdata[4307] */\n    { 2154, 0x00000000U, 0x2306D44EU }, /* XSUM_XXH32_testdata[4308] */\n    { 2154, 0x9E3779B1U, 0xC4ED179DU }, /* XSUM_XXH32_testdata[4309] */\n    { 2155, 0x00000000U, 0x1CE7C121U }, /* XSUM_XXH32_testdata[4310] */\n    { 2155, 0x9E3779B1U, 0x14F705A5U }, /* XSUM_XXH32_testdata[4311] */\n    { 2156, 0x00000000U, 0x91321AECU }, /* XSUM_XXH32_testdata[4312] */\n    { 2156, 0x9E3779B1U, 0x5A27F995U }, /* XSUM_XXH32_testdata[4313] */\n    { 2157, 0x00000000U, 0x5A862E05U }, /* XSUM_XXH32_testdata[4314] */\n    { 2157, 0x9E3779B1U, 0xBEFE3051U }, /* XSUM_XXH32_testdata[4315] */\n    { 2158, 0x00000000U, 0x53C1D508U }, /* XSUM_XXH32_testdata[4316] */\n    { 2158, 0x9E3779B1U, 0x08B825C0U }, /* XSUM_XXH32_testdata[4317] */\n    { 2159, 0x00000000U, 0x998646FEU }, /* XSUM_XXH32_testdata[4318] */\n    { 2159, 0x9E3779B1U, 0xE9F9CB10U }, /* XSUM_XXH32_testdata[4319] */\n    { 2160, 0x00000000U, 0x73BA8D96U }, /* XSUM_XXH32_testdata[4320] */\n    { 2160, 0x9E3779B1U, 0xE29F6E85U }, /* XSUM_XXH32_testdata[4321] */\n    { 2161, 0x00000000U, 0xFE8E8571U }, /* XSUM_XXH32_testdata[4322] */\n    { 2161, 0x9E3779B1U, 0x8702B7E4U }, /* XSUM_XXH32_testdata[4323] */\n    { 2162, 0x00000000U, 0x50C31782U }, /* XSUM_XXH32_testdata[4324] */\n    { 2162, 0x9E3779B1U, 0xA3CF4F8AU }, /* XSUM_XXH32_testdata[4325] */\n    { 2163, 0x00000000U, 0x52332400U }, /* XSUM_XXH32_testdata[4326] */\n    { 2163, 0x9E3779B1U, 0xD4753852U }, /* XSUM_XXH32_testdata[4327] */\n    { 2164, 0x00000000U, 0x11981CA0U }, /* XSUM_XXH32_testdata[4328] */\n    { 2164, 0x9E3779B1U, 0xB951C4E7U }, /* XSUM_XXH32_testdata[4329] */\n    { 2165, 0x00000000U, 0x020CB658U }, /* XSUM_XXH32_testdata[4330] */\n    { 2165, 0x9E3779B1U, 0x1C62E9FFU }, /* XSUM_XXH32_testdata[4331] */\n    { 2166, 0x00000000U, 0x66A765C7U }, /* XSUM_XXH32_testdata[4332] */\n    { 2166, 0x9E3779B1U, 0xD9A9267AU }, /* XSUM_XXH32_testdata[4333] */\n    { 2167, 0x00000000U, 0x98D114F3U }, /* XSUM_XXH32_testdata[4334] */\n    { 2167, 0x9E3779B1U, 0x26FCF092U }, /* XSUM_XXH32_testdata[4335] */\n    { 2168, 0x00000000U, 0xA00817D1U }, /* XSUM_XXH32_testdata[4336] */\n    { 2168, 0x9E3779B1U, 0x750C35A2U }, /* XSUM_XXH32_testdata[4337] */\n    { 2169, 0x00000000U, 0xF1ACE5ADU }, /* XSUM_XXH32_testdata[4338] */\n    { 2169, 0x9E3779B1U, 0x3DE1E6ABU }, /* XSUM_XXH32_testdata[4339] */\n    { 2170, 0x00000000U, 0xF03CF8E3U }, /* XSUM_XXH32_testdata[4340] */\n    { 2170, 0x9E3779B1U, 0x40412AD8U }, /* XSUM_XXH32_testdata[4341] */\n    { 2171, 0x00000000U, 0x928C9B01U }, /* XSUM_XXH32_testdata[4342] */\n    { 2171, 0x9E3779B1U, 0xA5794E20U }, /* XSUM_XXH32_testdata[4343] */\n    { 2172, 0x00000000U, 0x691771D3U }, /* XSUM_XXH32_testdata[4344] */\n    { 2172, 0x9E3779B1U, 0xC39FA55AU }, /* XSUM_XXH32_testdata[4345] */\n    { 2173, 0x00000000U, 0xB979130AU }, /* XSUM_XXH32_testdata[4346] */\n    { 2173, 0x9E3779B1U, 0x3B4ED784U }, /* XSUM_XXH32_testdata[4347] */\n    { 2174, 0x00000000U, 0x4A0FD14CU }, /* XSUM_XXH32_testdata[4348] */\n    { 2174, 0x9E3779B1U, 0xBD90DDE8U }, /* XSUM_XXH32_testdata[4349] */\n    { 2175, 0x00000000U, 0x8B696624U }, /* XSUM_XXH32_testdata[4350] */\n    { 2175, 0x9E3779B1U, 0xE712EE46U }, /* XSUM_XXH32_testdata[4351] */\n    { 2176, 0x00000000U, 0x7FB86E80U }, /* XSUM_XXH32_testdata[4352] */\n    { 2176, 0x9E3779B1U, 0x58063193U }, /* XSUM_XXH32_testdata[4353] */\n    { 2177, 0x00000000U, 0x13A7F525U }, /* XSUM_XXH32_testdata[4354] */\n    { 2177, 0x9E3779B1U, 0x4A13744DU }, /* XSUM_XXH32_testdata[4355] */\n    { 2178, 0x00000000U, 0x4B1E442FU }, /* XSUM_XXH32_testdata[4356] */\n    { 2178, 0x9E3779B1U, 0x94CBE9E3U }, /* XSUM_XXH32_testdata[4357] */\n    { 2179, 0x00000000U, 0x498768E4U }, /* XSUM_XXH32_testdata[4358] */\n    { 2179, 0x9E3779B1U, 0xA719C141U }, /* XSUM_XXH32_testdata[4359] */\n    { 2180, 0x00000000U, 0xA8BDEA9FU }, /* XSUM_XXH32_testdata[4360] */\n    { 2180, 0x9E3779B1U, 0x1442B51EU }, /* XSUM_XXH32_testdata[4361] */\n    { 2181, 0x00000000U, 0xF7591169U }, /* XSUM_XXH32_testdata[4362] */\n    { 2181, 0x9E3779B1U, 0xEE9E089EU }, /* XSUM_XXH32_testdata[4363] */\n    { 2182, 0x00000000U, 0x48B900C1U }, /* XSUM_XXH32_testdata[4364] */\n    { 2182, 0x9E3779B1U, 0x8B41080FU }, /* XSUM_XXH32_testdata[4365] */\n    { 2183, 0x00000000U, 0x443E9B4AU }, /* XSUM_XXH32_testdata[4366] */\n    { 2183, 0x9E3779B1U, 0x7417F2E4U }, /* XSUM_XXH32_testdata[4367] */\n    { 2184, 0x00000000U, 0xB2464C2AU }, /* XSUM_XXH32_testdata[4368] */\n    { 2184, 0x9E3779B1U, 0x700183B9U }, /* XSUM_XXH32_testdata[4369] */\n    { 2185, 0x00000000U, 0xC3B03C48U }, /* XSUM_XXH32_testdata[4370] */\n    { 2185, 0x9E3779B1U, 0xEBF56618U }, /* XSUM_XXH32_testdata[4371] */\n    { 2186, 0x00000000U, 0x5022D513U }, /* XSUM_XXH32_testdata[4372] */\n    { 2186, 0x9E3779B1U, 0xC86FB5F9U }, /* XSUM_XXH32_testdata[4373] */\n    { 2187, 0x00000000U, 0xB9EE8EE7U }, /* XSUM_XXH32_testdata[4374] */\n    { 2187, 0x9E3779B1U, 0x1FD9084AU }, /* XSUM_XXH32_testdata[4375] */\n    { 2188, 0x00000000U, 0x5E026F1FU }, /* XSUM_XXH32_testdata[4376] */\n    { 2188, 0x9E3779B1U, 0xBD338AC9U }, /* XSUM_XXH32_testdata[4377] */\n    { 2189, 0x00000000U, 0xBA92F986U }, /* XSUM_XXH32_testdata[4378] */\n    { 2189, 0x9E3779B1U, 0x96B1EB29U }, /* XSUM_XXH32_testdata[4379] */\n    { 2190, 0x00000000U, 0xFA8B5152U }, /* XSUM_XXH32_testdata[4380] */\n    { 2190, 0x9E3779B1U, 0xD2DE3CCEU }, /* XSUM_XXH32_testdata[4381] */\n    { 2191, 0x00000000U, 0x14A1B5C2U }, /* XSUM_XXH32_testdata[4382] */\n    { 2191, 0x9E3779B1U, 0x9F3DF200U }, /* XSUM_XXH32_testdata[4383] */\n    { 2192, 0x00000000U, 0xAFBC0996U }, /* XSUM_XXH32_testdata[4384] */\n    { 2192, 0x9E3779B1U, 0x419F8378U }, /* XSUM_XXH32_testdata[4385] */\n    { 2193, 0x00000000U, 0x0662AD6CU }, /* XSUM_XXH32_testdata[4386] */\n    { 2193, 0x9E3779B1U, 0x79AA6AB8U }, /* XSUM_XXH32_testdata[4387] */\n    { 2194, 0x00000000U, 0x2714B7E6U }, /* XSUM_XXH32_testdata[4388] */\n    { 2194, 0x9E3779B1U, 0xF529B3ADU }, /* XSUM_XXH32_testdata[4389] */\n    { 2195, 0x00000000U, 0x563D02D5U }, /* XSUM_XXH32_testdata[4390] */\n    { 2195, 0x9E3779B1U, 0x4065D039U }, /* XSUM_XXH32_testdata[4391] */\n    { 2196, 0x00000000U, 0x36DCE091U }, /* XSUM_XXH32_testdata[4392] */\n    { 2196, 0x9E3779B1U, 0xEABCEC00U }, /* XSUM_XXH32_testdata[4393] */\n    { 2197, 0x00000000U, 0x67F9681CU }, /* XSUM_XXH32_testdata[4394] */\n    { 2197, 0x9E3779B1U, 0x0E885D58U }, /* XSUM_XXH32_testdata[4395] */\n    { 2198, 0x00000000U, 0xC933CA0FU }, /* XSUM_XXH32_testdata[4396] */\n    { 2198, 0x9E3779B1U, 0xF1EDF626U }, /* XSUM_XXH32_testdata[4397] */\n    { 2199, 0x00000000U, 0xB00C6C80U }, /* XSUM_XXH32_testdata[4398] */\n    { 2199, 0x9E3779B1U, 0x65775351U }, /* XSUM_XXH32_testdata[4399] */\n    { 2200, 0x00000000U, 0xD8577660U }, /* XSUM_XXH32_testdata[4400] */\n    { 2200, 0x9E3779B1U, 0xB5D27E08U }, /* XSUM_XXH32_testdata[4401] */\n    { 2201, 0x00000000U, 0x806C4319U }, /* XSUM_XXH32_testdata[4402] */\n    { 2201, 0x9E3779B1U, 0x38C83A91U }, /* XSUM_XXH32_testdata[4403] */\n    { 2202, 0x00000000U, 0xBFBBF483U }, /* XSUM_XXH32_testdata[4404] */\n    { 2202, 0x9E3779B1U, 0xC3D62234U }, /* XSUM_XXH32_testdata[4405] */\n    { 2203, 0x00000000U, 0xD3D92983U }, /* XSUM_XXH32_testdata[4406] */\n    { 2203, 0x9E3779B1U, 0xFB1AA5C4U }, /* XSUM_XXH32_testdata[4407] */\n    { 2204, 0x00000000U, 0x1627B9FEU }, /* XSUM_XXH32_testdata[4408] */\n    { 2204, 0x9E3779B1U, 0x81EBA0B9U }, /* XSUM_XXH32_testdata[4409] */\n    { 2205, 0x00000000U, 0x1FB26F2DU }, /* XSUM_XXH32_testdata[4410] */\n    { 2205, 0x9E3779B1U, 0x7EF255DDU }, /* XSUM_XXH32_testdata[4411] */\n    { 2206, 0x00000000U, 0xFED27284U }, /* XSUM_XXH32_testdata[4412] */\n    { 2206, 0x9E3779B1U, 0x69255805U }, /* XSUM_XXH32_testdata[4413] */\n    { 2207, 0x00000000U, 0xD708979EU }, /* XSUM_XXH32_testdata[4414] */\n    { 2207, 0x9E3779B1U, 0xCDA17E54U }, /* XSUM_XXH32_testdata[4415] */\n    { 2208, 0x00000000U, 0xA8550B50U }, /* XSUM_XXH32_testdata[4416] */\n    { 2208, 0x9E3779B1U, 0x1F647E63U }, /* XSUM_XXH32_testdata[4417] */\n    { 2209, 0x00000000U, 0x0B4BD972U }, /* XSUM_XXH32_testdata[4418] */\n    { 2209, 0x9E3779B1U, 0x65BBC998U }, /* XSUM_XXH32_testdata[4419] */\n    { 2210, 0x00000000U, 0x8ECE7003U }, /* XSUM_XXH32_testdata[4420] */\n    { 2210, 0x9E3779B1U, 0x7929D7ABU }, /* XSUM_XXH32_testdata[4421] */\n    { 2211, 0x00000000U, 0x321F41EDU }, /* XSUM_XXH32_testdata[4422] */\n    { 2211, 0x9E3779B1U, 0x88B3A9FAU }, /* XSUM_XXH32_testdata[4423] */\n    { 2212, 0x00000000U, 0x7FA5938FU }, /* XSUM_XXH32_testdata[4424] */\n    { 2212, 0x9E3779B1U, 0xD1EC32D3U }, /* XSUM_XXH32_testdata[4425] */\n    { 2213, 0x00000000U, 0x20819556U }, /* XSUM_XXH32_testdata[4426] */\n    { 2213, 0x9E3779B1U, 0x609F550AU }, /* XSUM_XXH32_testdata[4427] */\n    { 2214, 0x00000000U, 0xD257A8C1U }, /* XSUM_XXH32_testdata[4428] */\n    { 2214, 0x9E3779B1U, 0x8C57DF62U }, /* XSUM_XXH32_testdata[4429] */\n    { 2215, 0x00000000U, 0xF131CE75U }, /* XSUM_XXH32_testdata[4430] */\n    { 2215, 0x9E3779B1U, 0xC2B31ED6U }, /* XSUM_XXH32_testdata[4431] */\n    { 2216, 0x00000000U, 0x073FB52BU }, /* XSUM_XXH32_testdata[4432] */\n    { 2216, 0x9E3779B1U, 0x308905ABU }, /* XSUM_XXH32_testdata[4433] */\n    { 2217, 0x00000000U, 0x646B7573U }, /* XSUM_XXH32_testdata[4434] */\n    { 2217, 0x9E3779B1U, 0x28DFBE07U }, /* XSUM_XXH32_testdata[4435] */\n    { 2218, 0x00000000U, 0x5205F129U }, /* XSUM_XXH32_testdata[4436] */\n    { 2218, 0x9E3779B1U, 0x5475F01BU }, /* XSUM_XXH32_testdata[4437] */\n    { 2219, 0x00000000U, 0x03D8C19DU }, /* XSUM_XXH32_testdata[4438] */\n    { 2219, 0x9E3779B1U, 0xCF68004DU }, /* XSUM_XXH32_testdata[4439] */\n    { 2220, 0x00000000U, 0xDB6D9660U }, /* XSUM_XXH32_testdata[4440] */\n    { 2220, 0x9E3779B1U, 0x66ADB310U }, /* XSUM_XXH32_testdata[4441] */\n    { 2221, 0x00000000U, 0xEFD92A58U }, /* XSUM_XXH32_testdata[4442] */\n    { 2221, 0x9E3779B1U, 0x93610C4FU }, /* XSUM_XXH32_testdata[4443] */\n    { 2222, 0x00000000U, 0xB2F22C69U }, /* XSUM_XXH32_testdata[4444] */\n    { 2222, 0x9E3779B1U, 0x20D78E8CU }, /* XSUM_XXH32_testdata[4445] */\n    { 2223, 0x00000000U, 0xAB091A36U }, /* XSUM_XXH32_testdata[4446] */\n    { 2223, 0x9E3779B1U, 0xD9C75461U }, /* XSUM_XXH32_testdata[4447] */\n    { 2224, 0x00000000U, 0xAE997C55U }, /* XSUM_XXH32_testdata[4448] */\n    { 2224, 0x9E3779B1U, 0xA8959027U }, /* XSUM_XXH32_testdata[4449] */\n    { 2225, 0x00000000U, 0x7CB4E344U }, /* XSUM_XXH32_testdata[4450] */\n    { 2225, 0x9E3779B1U, 0x13A10FFDU }, /* XSUM_XXH32_testdata[4451] */\n    { 2226, 0x00000000U, 0x008888FBU }, /* XSUM_XXH32_testdata[4452] */\n    { 2226, 0x9E3779B1U, 0xD1897F17U }, /* XSUM_XXH32_testdata[4453] */\n    { 2227, 0x00000000U, 0xB6838035U }, /* XSUM_XXH32_testdata[4454] */\n    { 2227, 0x9E3779B1U, 0xF7829F51U }, /* XSUM_XXH32_testdata[4455] */\n    { 2228, 0x00000000U, 0xC4C87039U }, /* XSUM_XXH32_testdata[4456] */\n    { 2228, 0x9E3779B1U, 0x47F00E7AU }, /* XSUM_XXH32_testdata[4457] */\n    { 2229, 0x00000000U, 0xF6196C05U }, /* XSUM_XXH32_testdata[4458] */\n    { 2229, 0x9E3779B1U, 0x07F98FD1U }, /* XSUM_XXH32_testdata[4459] */\n    { 2230, 0x00000000U, 0xD717B53AU }, /* XSUM_XXH32_testdata[4460] */\n    { 2230, 0x9E3779B1U, 0x88751237U }, /* XSUM_XXH32_testdata[4461] */\n    { 2231, 0x00000000U, 0xEE206236U }, /* XSUM_XXH32_testdata[4462] */\n    { 2231, 0x9E3779B1U, 0x9FD88083U }, /* XSUM_XXH32_testdata[4463] */\n    { 2232, 0x00000000U, 0x20289B58U }, /* XSUM_XXH32_testdata[4464] */\n    { 2232, 0x9E3779B1U, 0x5256A839U }, /* XSUM_XXH32_testdata[4465] */\n    { 2233, 0x00000000U, 0xA031CD1CU }, /* XSUM_XXH32_testdata[4466] */\n    { 2233, 0x9E3779B1U, 0x64590B58U }, /* XSUM_XXH32_testdata[4467] */\n    { 2234, 0x00000000U, 0x2C82C500U }, /* XSUM_XXH32_testdata[4468] */\n    { 2234, 0x9E3779B1U, 0x05802F24U }, /* XSUM_XXH32_testdata[4469] */\n    { 2235, 0x00000000U, 0x7A008763U }, /* XSUM_XXH32_testdata[4470] */\n    { 2235, 0x9E3779B1U, 0x99B6356BU }, /* XSUM_XXH32_testdata[4471] */\n    { 2236, 0x00000000U, 0xF3EC5D8AU }, /* XSUM_XXH32_testdata[4472] */\n    { 2236, 0x9E3779B1U, 0x51ACE959U }, /* XSUM_XXH32_testdata[4473] */\n    { 2237, 0x00000000U, 0xC991D693U }, /* XSUM_XXH32_testdata[4474] */\n    { 2237, 0x9E3779B1U, 0x298B272FU }, /* XSUM_XXH32_testdata[4475] */\n    { 2238, 0x00000000U, 0x477DAD59U }, /* XSUM_XXH32_testdata[4476] */\n    { 2238, 0x9E3779B1U, 0x012ADC64U }, /* XSUM_XXH32_testdata[4477] */\n    { 2239, 0x00000000U, 0x9FBB59D9U }, /* XSUM_XXH32_testdata[4478] */\n    { 2239, 0x9E3779B1U, 0x177BC5E0U }, /* XSUM_XXH32_testdata[4479] */\n    { 2240, 0x00000000U, 0x59E4583DU }, /* XSUM_XXH32_testdata[4480] */\n    { 2240, 0x9E3779B1U, 0x60DD71F3U }, /* XSUM_XXH32_testdata[4481] */\n    { 2241, 0x00000000U, 0x2E8608B1U }, /* XSUM_XXH32_testdata[4482] */\n    { 2241, 0x9E3779B1U, 0x10A1CA8BU }, /* XSUM_XXH32_testdata[4483] */\n    { 2242, 0x00000000U, 0xA45E517FU }, /* XSUM_XXH32_testdata[4484] */\n    { 2242, 0x9E3779B1U, 0x6C61A6D1U }, /* XSUM_XXH32_testdata[4485] */\n    { 2243, 0x00000000U, 0x320E7EE7U }, /* XSUM_XXH32_testdata[4486] */\n    { 2243, 0x9E3779B1U, 0x3B102816U }, /* XSUM_XXH32_testdata[4487] */\n    { 2244, 0x00000000U, 0xBFF1F106U }, /* XSUM_XXH32_testdata[4488] */\n    { 2244, 0x9E3779B1U, 0xF4E8F959U }, /* XSUM_XXH32_testdata[4489] */\n    { 2245, 0x00000000U, 0xA2B49300U }, /* XSUM_XXH32_testdata[4490] */\n    { 2245, 0x9E3779B1U, 0x659488D0U }, /* XSUM_XXH32_testdata[4491] */\n    { 2246, 0x00000000U, 0xDCBC760EU }, /* XSUM_XXH32_testdata[4492] */\n    { 2246, 0x9E3779B1U, 0xA95EAB52U }, /* XSUM_XXH32_testdata[4493] */\n    { 2247, 0x00000000U, 0x4722715BU }, /* XSUM_XXH32_testdata[4494] */\n    { 2247, 0x9E3779B1U, 0x741AC8D1U }, /* XSUM_XXH32_testdata[4495] */\n    { 2248, 0x00000000U, 0x6C74A6C0U }, /* XSUM_XXH32_testdata[4496] */\n    { 2248, 0x9E3779B1U, 0x9FD6C9D7U }, /* XSUM_XXH32_testdata[4497] */\n    { 2249, 0x00000000U, 0x3CFE9D18U }, /* XSUM_XXH32_testdata[4498] */\n    { 2249, 0x9E3779B1U, 0xE7E7597FU }, /* XSUM_XXH32_testdata[4499] */\n    { 2250, 0x00000000U, 0x573EA547U }, /* XSUM_XXH32_testdata[4500] */\n    { 2250, 0x9E3779B1U, 0x2FF14E69U }, /* XSUM_XXH32_testdata[4501] */\n    { 2251, 0x00000000U, 0xEB0578DBU }, /* XSUM_XXH32_testdata[4502] */\n    { 2251, 0x9E3779B1U, 0xA9E4F642U }, /* XSUM_XXH32_testdata[4503] */\n    { 2252, 0x00000000U, 0xE69A2BBAU }, /* XSUM_XXH32_testdata[4504] */\n    { 2252, 0x9E3779B1U, 0x7BADDE34U }, /* XSUM_XXH32_testdata[4505] */\n    { 2253, 0x00000000U, 0x3A897C9BU }, /* XSUM_XXH32_testdata[4506] */\n    { 2253, 0x9E3779B1U, 0x3A63B9D9U }, /* XSUM_XXH32_testdata[4507] */\n    { 2254, 0x00000000U, 0x8C745A56U }, /* XSUM_XXH32_testdata[4508] */\n    { 2254, 0x9E3779B1U, 0x3E75BE33U }, /* XSUM_XXH32_testdata[4509] */\n    { 2255, 0x00000000U, 0x78A82E54U }, /* XSUM_XXH32_testdata[4510] */\n    { 2255, 0x9E3779B1U, 0x54611400U }, /* XSUM_XXH32_testdata[4511] */\n    { 2256, 0x00000000U, 0x7206E96CU }, /* XSUM_XXH32_testdata[4512] */\n    { 2256, 0x9E3779B1U, 0x424F505DU }, /* XSUM_XXH32_testdata[4513] */\n    { 2257, 0x00000000U, 0xA49636FBU }, /* XSUM_XXH32_testdata[4514] */\n    { 2257, 0x9E3779B1U, 0xBD432C53U }, /* XSUM_XXH32_testdata[4515] */\n    { 2258, 0x00000000U, 0x2D876C2EU }, /* XSUM_XXH32_testdata[4516] */\n    { 2258, 0x9E3779B1U, 0x4EFD5C8EU }, /* XSUM_XXH32_testdata[4517] */\n    { 2259, 0x00000000U, 0x2C02E2B2U }, /* XSUM_XXH32_testdata[4518] */\n    { 2259, 0x9E3779B1U, 0x7300D02BU }, /* XSUM_XXH32_testdata[4519] */\n    { 2260, 0x00000000U, 0x42BA6CC6U }, /* XSUM_XXH32_testdata[4520] */\n    { 2260, 0x9E3779B1U, 0xF2036C3CU }, /* XSUM_XXH32_testdata[4521] */\n    { 2261, 0x00000000U, 0x6AA72F1DU }, /* XSUM_XXH32_testdata[4522] */\n    { 2261, 0x9E3779B1U, 0xE5959C13U }, /* XSUM_XXH32_testdata[4523] */\n    { 2262, 0x00000000U, 0x93C4F084U }, /* XSUM_XXH32_testdata[4524] */\n    { 2262, 0x9E3779B1U, 0x766A49E6U }, /* XSUM_XXH32_testdata[4525] */\n    { 2263, 0x00000000U, 0x70D7F9C4U }, /* XSUM_XXH32_testdata[4526] */\n    { 2263, 0x9E3779B1U, 0x6C15DAAFU }, /* XSUM_XXH32_testdata[4527] */\n    { 2264, 0x00000000U, 0xC565B441U }, /* XSUM_XXH32_testdata[4528] */\n    { 2264, 0x9E3779B1U, 0xAA9F3900U }, /* XSUM_XXH32_testdata[4529] */\n    { 2265, 0x00000000U, 0x7462F69AU }, /* XSUM_XXH32_testdata[4530] */\n    { 2265, 0x9E3779B1U, 0x6E3615C4U }, /* XSUM_XXH32_testdata[4531] */\n    { 2266, 0x00000000U, 0x592C9892U }, /* XSUM_XXH32_testdata[4532] */\n    { 2266, 0x9E3779B1U, 0xBC7837EEU }, /* XSUM_XXH32_testdata[4533] */\n    { 2267, 0x00000000U, 0xEDF627B2U }, /* XSUM_XXH32_testdata[4534] */\n    { 2267, 0x9E3779B1U, 0x448558C3U }, /* XSUM_XXH32_testdata[4535] */\n    { 2268, 0x00000000U, 0xA8B7BC3BU }, /* XSUM_XXH32_testdata[4536] */\n    { 2268, 0x9E3779B1U, 0x79DC8E55U }, /* XSUM_XXH32_testdata[4537] */\n    { 2269, 0x00000000U, 0xB9BFE565U }, /* XSUM_XXH32_testdata[4538] */\n    { 2269, 0x9E3779B1U, 0x6324D471U }, /* XSUM_XXH32_testdata[4539] */\n    { 2270, 0x00000000U, 0x92F58D74U }, /* XSUM_XXH32_testdata[4540] */\n    { 2270, 0x9E3779B1U, 0xBFC6C93CU }, /* XSUM_XXH32_testdata[4541] */\n    { 2271, 0x00000000U, 0x4620E3A7U }, /* XSUM_XXH32_testdata[4542] */\n    { 2271, 0x9E3779B1U, 0x24D8917CU }, /* XSUM_XXH32_testdata[4543] */\n    { 2272, 0x00000000U, 0x2A361FAFU }, /* XSUM_XXH32_testdata[4544] */\n    { 2272, 0x9E3779B1U, 0x6B84FA34U }, /* XSUM_XXH32_testdata[4545] */\n    { 2273, 0x00000000U, 0x07FBAE52U }, /* XSUM_XXH32_testdata[4546] */\n    { 2273, 0x9E3779B1U, 0x41ECD574U }, /* XSUM_XXH32_testdata[4547] */\n    { 2274, 0x00000000U, 0x25316CD6U }, /* XSUM_XXH32_testdata[4548] */\n    { 2274, 0x9E3779B1U, 0x980BECB7U }, /* XSUM_XXH32_testdata[4549] */\n    { 2275, 0x00000000U, 0xA4C5373AU }, /* XSUM_XXH32_testdata[4550] */\n    { 2275, 0x9E3779B1U, 0x39DB36E6U }, /* XSUM_XXH32_testdata[4551] */\n    { 2276, 0x00000000U, 0x0A3648BBU }, /* XSUM_XXH32_testdata[4552] */\n    { 2276, 0x9E3779B1U, 0x6F92247BU }, /* XSUM_XXH32_testdata[4553] */\n    { 2277, 0x00000000U, 0x73337FA8U }, /* XSUM_XXH32_testdata[4554] */\n    { 2277, 0x9E3779B1U, 0x4805FBC1U }, /* XSUM_XXH32_testdata[4555] */\n    { 2278, 0x00000000U, 0x3D49A6E8U }, /* XSUM_XXH32_testdata[4556] */\n    { 2278, 0x9E3779B1U, 0x6C7322F6U }, /* XSUM_XXH32_testdata[4557] */\n    { 2279, 0x00000000U, 0x3338F5C0U }, /* XSUM_XXH32_testdata[4558] */\n    { 2279, 0x9E3779B1U, 0x983C08C1U }, /* XSUM_XXH32_testdata[4559] */\n    { 2280, 0x00000000U, 0x6EF8CFDAU }, /* XSUM_XXH32_testdata[4560] */\n    { 2280, 0x9E3779B1U, 0xD70B484AU }, /* XSUM_XXH32_testdata[4561] */\n    { 2281, 0x00000000U, 0x5A564CDFU }, /* XSUM_XXH32_testdata[4562] */\n    { 2281, 0x9E3779B1U, 0x5C353DB4U }, /* XSUM_XXH32_testdata[4563] */\n    { 2282, 0x00000000U, 0xC98A1064U }, /* XSUM_XXH32_testdata[4564] */\n    { 2282, 0x9E3779B1U, 0x85EA76C6U }, /* XSUM_XXH32_testdata[4565] */\n    { 2283, 0x00000000U, 0x8291CA32U }, /* XSUM_XXH32_testdata[4566] */\n    { 2283, 0x9E3779B1U, 0x650EC76CU }, /* XSUM_XXH32_testdata[4567] */\n    { 2284, 0x00000000U, 0xC3838346U }, /* XSUM_XXH32_testdata[4568] */\n    { 2284, 0x9E3779B1U, 0x5C479DB6U }, /* XSUM_XXH32_testdata[4569] */\n    { 2285, 0x00000000U, 0x2CA08A67U }, /* XSUM_XXH32_testdata[4570] */\n    { 2285, 0x9E3779B1U, 0xF7340062U }, /* XSUM_XXH32_testdata[4571] */\n    { 2286, 0x00000000U, 0x08745CDBU }, /* XSUM_XXH32_testdata[4572] */\n    { 2286, 0x9E3779B1U, 0x06C8F4D1U }, /* XSUM_XXH32_testdata[4573] */\n    { 2287, 0x00000000U, 0xA91F06E5U }, /* XSUM_XXH32_testdata[4574] */\n    { 2287, 0x9E3779B1U, 0xC51815EFU }, /* XSUM_XXH32_testdata[4575] */\n    { 2288, 0x00000000U, 0xA828DF5AU }, /* XSUM_XXH32_testdata[4576] */\n    { 2288, 0x9E3779B1U, 0xD6CFD867U }, /* XSUM_XXH32_testdata[4577] */\n    { 2289, 0x00000000U, 0x10695E42U }, /* XSUM_XXH32_testdata[4578] */\n    { 2289, 0x9E3779B1U, 0xBE01DB37U }, /* XSUM_XXH32_testdata[4579] */\n    { 2290, 0x00000000U, 0x9F7828BBU }, /* XSUM_XXH32_testdata[4580] */\n    { 2290, 0x9E3779B1U, 0xB9766D05U }, /* XSUM_XXH32_testdata[4581] */\n    { 2291, 0x00000000U, 0xEB54B2C6U }, /* XSUM_XXH32_testdata[4582] */\n    { 2291, 0x9E3779B1U, 0x9D299329U }, /* XSUM_XXH32_testdata[4583] */\n    { 2292, 0x00000000U, 0x1FC1F1CEU }, /* XSUM_XXH32_testdata[4584] */\n    { 2292, 0x9E3779B1U, 0x76496642U }, /* XSUM_XXH32_testdata[4585] */\n    { 2293, 0x00000000U, 0xB0C01399U }, /* XSUM_XXH32_testdata[4586] */\n    { 2293, 0x9E3779B1U, 0x96F2E86AU }, /* XSUM_XXH32_testdata[4587] */\n    { 2294, 0x00000000U, 0xFC0D7251U }, /* XSUM_XXH32_testdata[4588] */\n    { 2294, 0x9E3779B1U, 0x6D2E955CU }, /* XSUM_XXH32_testdata[4589] */\n    { 2295, 0x00000000U, 0x8391A466U }, /* XSUM_XXH32_testdata[4590] */\n    { 2295, 0x9E3779B1U, 0x6F51DBCFU }, /* XSUM_XXH32_testdata[4591] */\n    { 2296, 0x00000000U, 0x48546BE8U }, /* XSUM_XXH32_testdata[4592] */\n    { 2296, 0x9E3779B1U, 0x5B47746BU }, /* XSUM_XXH32_testdata[4593] */\n    { 2297, 0x00000000U, 0xB0BC78D8U }, /* XSUM_XXH32_testdata[4594] */\n    { 2297, 0x9E3779B1U, 0xCFE99C9FU }, /* XSUM_XXH32_testdata[4595] */\n    { 2298, 0x00000000U, 0x75CD83B5U }, /* XSUM_XXH32_testdata[4596] */\n    { 2298, 0x9E3779B1U, 0x450083C7U }, /* XSUM_XXH32_testdata[4597] */\n    { 2299, 0x00000000U, 0x38A051CDU }, /* XSUM_XXH32_testdata[4598] */\n    { 2299, 0x9E3779B1U, 0xD4FB313FU }, /* XSUM_XXH32_testdata[4599] */\n    { 2300, 0x00000000U, 0x99441C7FU }, /* XSUM_XXH32_testdata[4600] */\n    { 2300, 0x9E3779B1U, 0x1CB8212EU }, /* XSUM_XXH32_testdata[4601] */\n    { 2301, 0x00000000U, 0x0D53CF1BU }, /* XSUM_XXH32_testdata[4602] */\n    { 2301, 0x9E3779B1U, 0x8A004DB5U }, /* XSUM_XXH32_testdata[4603] */\n    { 2302, 0x00000000U, 0xCB001B0DU }, /* XSUM_XXH32_testdata[4604] */\n    { 2302, 0x9E3779B1U, 0x00778E53U }, /* XSUM_XXH32_testdata[4605] */\n    { 2303, 0x00000000U, 0xBA8260FAU }, /* XSUM_XXH32_testdata[4606] */\n    { 2303, 0x9E3779B1U, 0x5F12DB08U }, /* XSUM_XXH32_testdata[4607] */\n    { 2304, 0x00000000U, 0xBCEA8F53U }, /* XSUM_XXH32_testdata[4608] */\n    { 2304, 0x9E3779B1U, 0x7B889175U }, /* XSUM_XXH32_testdata[4609] */\n    { 2305, 0x00000000U, 0x430978EFU }, /* XSUM_XXH32_testdata[4610] */\n    { 2305, 0x9E3779B1U, 0x8AF48587U }, /* XSUM_XXH32_testdata[4611] */\n    { 2306, 0x00000000U, 0x8C6893DCU }, /* XSUM_XXH32_testdata[4612] */\n    { 2306, 0x9E3779B1U, 0xA6C6D34CU }, /* XSUM_XXH32_testdata[4613] */\n    { 2307, 0x00000000U, 0x50CD4BC8U }, /* XSUM_XXH32_testdata[4614] */\n    { 2307, 0x9E3779B1U, 0x5B7B0AF5U }, /* XSUM_XXH32_testdata[4615] */\n    { 2308, 0x00000000U, 0x41D30BF1U }, /* XSUM_XXH32_testdata[4616] */\n    { 2308, 0x9E3779B1U, 0xF34044F6U }, /* XSUM_XXH32_testdata[4617] */\n    { 2309, 0x00000000U, 0x76F916DAU }, /* XSUM_XXH32_testdata[4618] */\n    { 2309, 0x9E3779B1U, 0xC7F44596U }, /* XSUM_XXH32_testdata[4619] */\n    { 2310, 0x00000000U, 0x3EFDC8B8U }, /* XSUM_XXH32_testdata[4620] */\n    { 2310, 0x9E3779B1U, 0x586BA8C0U }, /* XSUM_XXH32_testdata[4621] */\n    { 2311, 0x00000000U, 0x7F910E8DU }, /* XSUM_XXH32_testdata[4622] */\n    { 2311, 0x9E3779B1U, 0xBD823BCCU }, /* XSUM_XXH32_testdata[4623] */\n    { 2312, 0x00000000U, 0xB6617DFAU }, /* XSUM_XXH32_testdata[4624] */\n    { 2312, 0x9E3779B1U, 0x2C490E37U }, /* XSUM_XXH32_testdata[4625] */\n    { 2313, 0x00000000U, 0x5DF58E40U }, /* XSUM_XXH32_testdata[4626] */\n    { 2313, 0x9E3779B1U, 0xA92E5FDAU }, /* XSUM_XXH32_testdata[4627] */\n    { 2314, 0x00000000U, 0x9129B3B7U }, /* XSUM_XXH32_testdata[4628] */\n    { 2314, 0x9E3779B1U, 0x371184EFU }, /* XSUM_XXH32_testdata[4629] */\n    { 2315, 0x00000000U, 0x708281D2U }, /* XSUM_XXH32_testdata[4630] */\n    { 2315, 0x9E3779B1U, 0xE00BC470U }, /* XSUM_XXH32_testdata[4631] */\n    { 2316, 0x00000000U, 0x88AEDFBCU }, /* XSUM_XXH32_testdata[4632] */\n    { 2316, 0x9E3779B1U, 0x75F9331EU }, /* XSUM_XXH32_testdata[4633] */\n    { 2317, 0x00000000U, 0x973A2135U }, /* XSUM_XXH32_testdata[4634] */\n    { 2317, 0x9E3779B1U, 0x97C86A9FU }, /* XSUM_XXH32_testdata[4635] */\n    { 2318, 0x00000000U, 0xEFABBB53U }, /* XSUM_XXH32_testdata[4636] */\n    { 2318, 0x9E3779B1U, 0xD395FF0EU }, /* XSUM_XXH32_testdata[4637] */\n    { 2319, 0x00000000U, 0x3636A669U }, /* XSUM_XXH32_testdata[4638] */\n    { 2319, 0x9E3779B1U, 0x7DA41EAAU }, /* XSUM_XXH32_testdata[4639] */\n    { 2320, 0x00000000U, 0xAF1B89BAU }, /* XSUM_XXH32_testdata[4640] */\n    { 2320, 0x9E3779B1U, 0x2A4DF877U }, /* XSUM_XXH32_testdata[4641] */\n    { 2321, 0x00000000U, 0x91C2F6A0U }, /* XSUM_XXH32_testdata[4642] */\n    { 2321, 0x9E3779B1U, 0x8BCA9801U }, /* XSUM_XXH32_testdata[4643] */\n    { 2322, 0x00000000U, 0x08CCBEC2U }, /* XSUM_XXH32_testdata[4644] */\n    { 2322, 0x9E3779B1U, 0x7F838AB9U }, /* XSUM_XXH32_testdata[4645] */\n    { 2323, 0x00000000U, 0x3E33B29BU }, /* XSUM_XXH32_testdata[4646] */\n    { 2323, 0x9E3779B1U, 0xA247360BU }, /* XSUM_XXH32_testdata[4647] */\n    { 2324, 0x00000000U, 0xCC83AD4AU }, /* XSUM_XXH32_testdata[4648] */\n    { 2324, 0x9E3779B1U, 0xBD508C8CU }, /* XSUM_XXH32_testdata[4649] */\n    { 2325, 0x00000000U, 0x809318BEU }, /* XSUM_XXH32_testdata[4650] */\n    { 2325, 0x9E3779B1U, 0x95AF3438U }, /* XSUM_XXH32_testdata[4651] */\n    { 2326, 0x00000000U, 0x4D8E2E9AU }, /* XSUM_XXH32_testdata[4652] */\n    { 2326, 0x9E3779B1U, 0xA6FA96D0U }, /* XSUM_XXH32_testdata[4653] */\n    { 2327, 0x00000000U, 0xA07CA81CU }, /* XSUM_XXH32_testdata[4654] */\n    { 2327, 0x9E3779B1U, 0x499D93B5U }, /* XSUM_XXH32_testdata[4655] */\n    { 2328, 0x00000000U, 0xA6470A51U }, /* XSUM_XXH32_testdata[4656] */\n    { 2328, 0x9E3779B1U, 0x26ED845DU }, /* XSUM_XXH32_testdata[4657] */\n    { 2329, 0x00000000U, 0x1C554C77U }, /* XSUM_XXH32_testdata[4658] */\n    { 2329, 0x9E3779B1U, 0xB3627F76U }, /* XSUM_XXH32_testdata[4659] */\n    { 2330, 0x00000000U, 0x7AAD0FF8U }, /* XSUM_XXH32_testdata[4660] */\n    { 2330, 0x9E3779B1U, 0xBBA8C728U }, /* XSUM_XXH32_testdata[4661] */\n    { 2331, 0x00000000U, 0x5A567C6FU }, /* XSUM_XXH32_testdata[4662] */\n    { 2331, 0x9E3779B1U, 0x5A06BE2FU }, /* XSUM_XXH32_testdata[4663] */\n    { 2332, 0x00000000U, 0x6BA98891U }, /* XSUM_XXH32_testdata[4664] */\n    { 2332, 0x9E3779B1U, 0x205C0FE4U }, /* XSUM_XXH32_testdata[4665] */\n    { 2333, 0x00000000U, 0x82522B2BU }, /* XSUM_XXH32_testdata[4666] */\n    { 2333, 0x9E3779B1U, 0x076C9707U }, /* XSUM_XXH32_testdata[4667] */\n    { 2334, 0x00000000U, 0x4DC1958BU }, /* XSUM_XXH32_testdata[4668] */\n    { 2334, 0x9E3779B1U, 0xFA396A37U }, /* XSUM_XXH32_testdata[4669] */\n    { 2335, 0x00000000U, 0x3AC57A52U }, /* XSUM_XXH32_testdata[4670] */\n    { 2335, 0x9E3779B1U, 0xF12C465AU }, /* XSUM_XXH32_testdata[4671] */\n    { 2336, 0x00000000U, 0xE3B1A4E8U }, /* XSUM_XXH32_testdata[4672] */\n    { 2336, 0x9E3779B1U, 0x12C0298BU }, /* XSUM_XXH32_testdata[4673] */\n    { 2337, 0x00000000U, 0xF44984F1U }, /* XSUM_XXH32_testdata[4674] */\n    { 2337, 0x9E3779B1U, 0xB4DFA682U }, /* XSUM_XXH32_testdata[4675] */\n    { 2338, 0x00000000U, 0x2FFF7824U }, /* XSUM_XXH32_testdata[4676] */\n    { 2338, 0x9E3779B1U, 0x0973012BU }, /* XSUM_XXH32_testdata[4677] */\n    { 2339, 0x00000000U, 0x30EC8C56U }, /* XSUM_XXH32_testdata[4678] */\n    { 2339, 0x9E3779B1U, 0x2F7B75ADU }, /* XSUM_XXH32_testdata[4679] */\n    { 2340, 0x00000000U, 0x781E8077U }, /* XSUM_XXH32_testdata[4680] */\n    { 2340, 0x9E3779B1U, 0x4D1F9FE6U }, /* XSUM_XXH32_testdata[4681] */\n    { 2341, 0x00000000U, 0xA7CA3DBCU }, /* XSUM_XXH32_testdata[4682] */\n    { 2341, 0x9E3779B1U, 0x63A36898U }, /* XSUM_XXH32_testdata[4683] */\n    { 2342, 0x00000000U, 0x8ADA3F4CU }, /* XSUM_XXH32_testdata[4684] */\n    { 2342, 0x9E3779B1U, 0x81C0BBB3U }, /* XSUM_XXH32_testdata[4685] */\n    { 2343, 0x00000000U, 0x8B054AC2U }, /* XSUM_XXH32_testdata[4686] */\n    { 2343, 0x9E3779B1U, 0x0AF990F3U }, /* XSUM_XXH32_testdata[4687] */\n    { 2344, 0x00000000U, 0x92205A23U }, /* XSUM_XXH32_testdata[4688] */\n    { 2344, 0x9E3779B1U, 0x03054242U }, /* XSUM_XXH32_testdata[4689] */\n    { 2345, 0x00000000U, 0xA6BE0EF5U }, /* XSUM_XXH32_testdata[4690] */\n    { 2345, 0x9E3779B1U, 0xC5D4391DU }, /* XSUM_XXH32_testdata[4691] */\n    { 2346, 0x00000000U, 0x401B0499U }, /* XSUM_XXH32_testdata[4692] */\n    { 2346, 0x9E3779B1U, 0x7A70E3F5U }, /* XSUM_XXH32_testdata[4693] */\n    { 2347, 0x00000000U, 0x061FF802U }, /* XSUM_XXH32_testdata[4694] */\n    { 2347, 0x9E3779B1U, 0xF2EFAAA5U }, /* XSUM_XXH32_testdata[4695] */\n    { 2348, 0x00000000U, 0xB9A50735U }, /* XSUM_XXH32_testdata[4696] */\n    { 2348, 0x9E3779B1U, 0x07B543A3U }, /* XSUM_XXH32_testdata[4697] */\n    { 2349, 0x00000000U, 0xD42FE578U }, /* XSUM_XXH32_testdata[4698] */\n    { 2349, 0x9E3779B1U, 0x4B6ED460U }, /* XSUM_XXH32_testdata[4699] */\n    { 2350, 0x00000000U, 0x48ABC923U }, /* XSUM_XXH32_testdata[4700] */\n    { 2350, 0x9E3779B1U, 0x3FDAD781U }, /* XSUM_XXH32_testdata[4701] */\n    { 2351, 0x00000000U, 0xA1FA455DU }, /* XSUM_XXH32_testdata[4702] */\n    { 2351, 0x9E3779B1U, 0xAC421C38U }, /* XSUM_XXH32_testdata[4703] */\n    { 2352, 0x00000000U, 0xF214EB71U }, /* XSUM_XXH32_testdata[4704] */\n    { 2352, 0x9E3779B1U, 0xE112B0D4U }, /* XSUM_XXH32_testdata[4705] */\n    { 2353, 0x00000000U, 0x8B75B819U }, /* XSUM_XXH32_testdata[4706] */\n    { 2353, 0x9E3779B1U, 0x5586B7DDU }, /* XSUM_XXH32_testdata[4707] */\n    { 2354, 0x00000000U, 0x205A741CU }, /* XSUM_XXH32_testdata[4708] */\n    { 2354, 0x9E3779B1U, 0xC87CB465U }, /* XSUM_XXH32_testdata[4709] */\n    { 2355, 0x00000000U, 0xD12DC954U }, /* XSUM_XXH32_testdata[4710] */\n    { 2355, 0x9E3779B1U, 0x7DB71299U }, /* XSUM_XXH32_testdata[4711] */\n    { 2356, 0x00000000U, 0xA9F34CF6U }, /* XSUM_XXH32_testdata[4712] */\n    { 2356, 0x9E3779B1U, 0x7B5908E5U }, /* XSUM_XXH32_testdata[4713] */\n    { 2357, 0x00000000U, 0xE634B0E9U }, /* XSUM_XXH32_testdata[4714] */\n    { 2357, 0x9E3779B1U, 0x6FDD888DU }, /* XSUM_XXH32_testdata[4715] */\n    { 2358, 0x00000000U, 0x31C599C4U }, /* XSUM_XXH32_testdata[4716] */\n    { 2358, 0x9E3779B1U, 0x866EAF3AU }, /* XSUM_XXH32_testdata[4717] */\n    { 2359, 0x00000000U, 0xE0989B24U }, /* XSUM_XXH32_testdata[4718] */\n    { 2359, 0x9E3779B1U, 0xA981AD4FU }, /* XSUM_XXH32_testdata[4719] */\n    { 2360, 0x00000000U, 0x6D387974U }, /* XSUM_XXH32_testdata[4720] */\n    { 2360, 0x9E3779B1U, 0xF2454878U }, /* XSUM_XXH32_testdata[4721] */\n    { 2361, 0x00000000U, 0xC2E39A3FU }, /* XSUM_XXH32_testdata[4722] */\n    { 2361, 0x9E3779B1U, 0xFD5459E5U }, /* XSUM_XXH32_testdata[4723] */\n    { 2362, 0x00000000U, 0x323EB5EBU }, /* XSUM_XXH32_testdata[4724] */\n    { 2362, 0x9E3779B1U, 0xE74DCA8CU }, /* XSUM_XXH32_testdata[4725] */\n    { 2363, 0x00000000U, 0x2CECE601U }, /* XSUM_XXH32_testdata[4726] */\n    { 2363, 0x9E3779B1U, 0x36CD01FEU }, /* XSUM_XXH32_testdata[4727] */\n    { 2364, 0x00000000U, 0x66FEC502U }, /* XSUM_XXH32_testdata[4728] */\n    { 2364, 0x9E3779B1U, 0x4B2D4558U }, /* XSUM_XXH32_testdata[4729] */\n    { 2365, 0x00000000U, 0x14B0C970U }, /* XSUM_XXH32_testdata[4730] */\n    { 2365, 0x9E3779B1U, 0x0B4936DAU }, /* XSUM_XXH32_testdata[4731] */\n    { 2366, 0x00000000U, 0xF0060AE0U }, /* XSUM_XXH32_testdata[4732] */\n    { 2366, 0x9E3779B1U, 0x2654E924U }, /* XSUM_XXH32_testdata[4733] */\n    { 2367, 0x00000000U, 0x4C8A9773U }, /* XSUM_XXH32_testdata[4734] */\n    { 2367, 0x9E3779B1U, 0x6D5366F6U }, /* XSUM_XXH32_testdata[4735] */\n    { 2368, 0x00000000U, 0xF548E34BU }, /* XSUM_XXH32_testdata[4736] */\n    { 2368, 0x9E3779B1U, 0xE7AD6B44U }, /* XSUM_XXH32_testdata[4737] */\n    { 2369, 0x00000000U, 0x65D503DFU }, /* XSUM_XXH32_testdata[4738] */\n    { 2369, 0x9E3779B1U, 0x5BDF6961U }, /* XSUM_XXH32_testdata[4739] */\n    { 2370, 0x00000000U, 0x5F26B595U }, /* XSUM_XXH32_testdata[4740] */\n    { 2370, 0x9E3779B1U, 0x14CE703BU }, /* XSUM_XXH32_testdata[4741] */\n    { 2371, 0x00000000U, 0xF0A01EDFU }, /* XSUM_XXH32_testdata[4742] */\n    { 2371, 0x9E3779B1U, 0xB6258CA7U }, /* XSUM_XXH32_testdata[4743] */\n    { 2372, 0x00000000U, 0xC0D4B27DU }, /* XSUM_XXH32_testdata[4744] */\n    { 2372, 0x9E3779B1U, 0x0D321D6CU }, /* XSUM_XXH32_testdata[4745] */\n    { 2373, 0x00000000U, 0xB6AB63B0U }, /* XSUM_XXH32_testdata[4746] */\n    { 2373, 0x9E3779B1U, 0x7896B7C8U }, /* XSUM_XXH32_testdata[4747] */\n    { 2374, 0x00000000U, 0x419BDBEBU }, /* XSUM_XXH32_testdata[4748] */\n    { 2374, 0x9E3779B1U, 0xC9C20BCEU }, /* XSUM_XXH32_testdata[4749] */\n    { 2375, 0x00000000U, 0x3AAF5C47U }, /* XSUM_XXH32_testdata[4750] */\n    { 2375, 0x9E3779B1U, 0x1D6C7324U }, /* XSUM_XXH32_testdata[4751] */\n    { 2376, 0x00000000U, 0xA02F14DBU }, /* XSUM_XXH32_testdata[4752] */\n    { 2376, 0x9E3779B1U, 0x97305628U }, /* XSUM_XXH32_testdata[4753] */\n    { 2377, 0x00000000U, 0x2446F15EU }, /* XSUM_XXH32_testdata[4754] */\n    { 2377, 0x9E3779B1U, 0x990E91A9U }, /* XSUM_XXH32_testdata[4755] */\n    { 2378, 0x00000000U, 0xBFF1B80DU }, /* XSUM_XXH32_testdata[4756] */\n    { 2378, 0x9E3779B1U, 0x207555C6U }, /* XSUM_XXH32_testdata[4757] */\n    { 2379, 0x00000000U, 0xCBB9DE50U }, /* XSUM_XXH32_testdata[4758] */\n    { 2379, 0x9E3779B1U, 0x7C35E937U }, /* XSUM_XXH32_testdata[4759] */\n    { 2380, 0x00000000U, 0xB16132E9U }, /* XSUM_XXH32_testdata[4760] */\n    { 2380, 0x9E3779B1U, 0x612C4735U }, /* XSUM_XXH32_testdata[4761] */\n    { 2381, 0x00000000U, 0xFA94BF99U }, /* XSUM_XXH32_testdata[4762] */\n    { 2381, 0x9E3779B1U, 0xCB323A7DU }, /* XSUM_XXH32_testdata[4763] */\n    { 2382, 0x00000000U, 0x66E1CCFEU }, /* XSUM_XXH32_testdata[4764] */\n    { 2382, 0x9E3779B1U, 0x6172EACFU }, /* XSUM_XXH32_testdata[4765] */\n    { 2383, 0x00000000U, 0x0DBA1027U }, /* XSUM_XXH32_testdata[4766] */\n    { 2383, 0x9E3779B1U, 0x32B3A053U }, /* XSUM_XXH32_testdata[4767] */\n    { 2384, 0x00000000U, 0x2A061A21U }, /* XSUM_XXH32_testdata[4768] */\n    { 2384, 0x9E3779B1U, 0x63842046U }, /* XSUM_XXH32_testdata[4769] */\n    { 2385, 0x00000000U, 0x31F706D8U }, /* XSUM_XXH32_testdata[4770] */\n    { 2385, 0x9E3779B1U, 0x07065BDDU }, /* XSUM_XXH32_testdata[4771] */\n    { 2386, 0x00000000U, 0xC89FFCF2U }, /* XSUM_XXH32_testdata[4772] */\n    { 2386, 0x9E3779B1U, 0x380EB6D6U }, /* XSUM_XXH32_testdata[4773] */\n    { 2387, 0x00000000U, 0x3ED8B0B0U }, /* XSUM_XXH32_testdata[4774] */\n    { 2387, 0x9E3779B1U, 0xC87C9DA2U }, /* XSUM_XXH32_testdata[4775] */\n    { 2388, 0x00000000U, 0x9166C2BDU }, /* XSUM_XXH32_testdata[4776] */\n    { 2388, 0x9E3779B1U, 0x06CECF8AU }, /* XSUM_XXH32_testdata[4777] */\n    { 2389, 0x00000000U, 0xE525B308U }, /* XSUM_XXH32_testdata[4778] */\n    { 2389, 0x9E3779B1U, 0x20A21E29U }, /* XSUM_XXH32_testdata[4779] */\n    { 2390, 0x00000000U, 0x7D3019E4U }, /* XSUM_XXH32_testdata[4780] */\n    { 2390, 0x9E3779B1U, 0x0292C707U }, /* XSUM_XXH32_testdata[4781] */\n    { 2391, 0x00000000U, 0x13B25959U }, /* XSUM_XXH32_testdata[4782] */\n    { 2391, 0x9E3779B1U, 0xDAC018B5U }, /* XSUM_XXH32_testdata[4783] */\n    { 2392, 0x00000000U, 0x162AD860U }, /* XSUM_XXH32_testdata[4784] */\n    { 2392, 0x9E3779B1U, 0xB87FE27AU }, /* XSUM_XXH32_testdata[4785] */\n    { 2393, 0x00000000U, 0x561FA10DU }, /* XSUM_XXH32_testdata[4786] */\n    { 2393, 0x9E3779B1U, 0x7B07FDEAU }, /* XSUM_XXH32_testdata[4787] */\n    { 2394, 0x00000000U, 0xD874B0F3U }, /* XSUM_XXH32_testdata[4788] */\n    { 2394, 0x9E3779B1U, 0xA6E4675DU }, /* XSUM_XXH32_testdata[4789] */\n    { 2395, 0x00000000U, 0x6C94309CU }, /* XSUM_XXH32_testdata[4790] */\n    { 2395, 0x9E3779B1U, 0x236ED104U }, /* XSUM_XXH32_testdata[4791] */\n    { 2396, 0x00000000U, 0xA0EEE992U }, /* XSUM_XXH32_testdata[4792] */\n    { 2396, 0x9E3779B1U, 0x91A0C722U }, /* XSUM_XXH32_testdata[4793] */\n    { 2397, 0x00000000U, 0x0C399ADAU }, /* XSUM_XXH32_testdata[4794] */\n    { 2397, 0x9E3779B1U, 0xA7F1A6D5U }, /* XSUM_XXH32_testdata[4795] */\n    { 2398, 0x00000000U, 0x378368A6U }, /* XSUM_XXH32_testdata[4796] */\n    { 2398, 0x9E3779B1U, 0x0C3AB8E1U }, /* XSUM_XXH32_testdata[4797] */\n    { 2399, 0x00000000U, 0xA358B395U }, /* XSUM_XXH32_testdata[4798] */\n    { 2399, 0x9E3779B1U, 0x6FFB1BA8U }, /* XSUM_XXH32_testdata[4799] */\n    { 2400, 0x00000000U, 0x70C3BAC4U }, /* XSUM_XXH32_testdata[4800] */\n    { 2400, 0x9E3779B1U, 0x12C956F8U }, /* XSUM_XXH32_testdata[4801] */\n    { 2401, 0x00000000U, 0xF80E72F2U }, /* XSUM_XXH32_testdata[4802] */\n    { 2401, 0x9E3779B1U, 0x68936275U }, /* XSUM_XXH32_testdata[4803] */\n    { 2402, 0x00000000U, 0x27E902BBU }, /* XSUM_XXH32_testdata[4804] */\n    { 2402, 0x9E3779B1U, 0xDCEBAE57U }, /* XSUM_XXH32_testdata[4805] */\n    { 2403, 0x00000000U, 0x0A2F00E2U }, /* XSUM_XXH32_testdata[4806] */\n    { 2403, 0x9E3779B1U, 0x5134A646U }, /* XSUM_XXH32_testdata[4807] */\n    { 2404, 0x00000000U, 0x7EAA4C6BU }, /* XSUM_XXH32_testdata[4808] */\n    { 2404, 0x9E3779B1U, 0x0EFC5F02U }, /* XSUM_XXH32_testdata[4809] */\n    { 2405, 0x00000000U, 0xF19F7631U }, /* XSUM_XXH32_testdata[4810] */\n    { 2405, 0x9E3779B1U, 0x2033E2E1U }, /* XSUM_XXH32_testdata[4811] */\n    { 2406, 0x00000000U, 0x5CA90E57U }, /* XSUM_XXH32_testdata[4812] */\n    { 2406, 0x9E3779B1U, 0x795BF9ECU }, /* XSUM_XXH32_testdata[4813] */\n    { 2407, 0x00000000U, 0xD113AA64U }, /* XSUM_XXH32_testdata[4814] */\n    { 2407, 0x9E3779B1U, 0x79177ACFU }, /* XSUM_XXH32_testdata[4815] */\n    { 2408, 0x00000000U, 0x50F9A43DU }, /* XSUM_XXH32_testdata[4816] */\n    { 2408, 0x9E3779B1U, 0x7E3349F4U }, /* XSUM_XXH32_testdata[4817] */\n    { 2409, 0x00000000U, 0x027C208DU }, /* XSUM_XXH32_testdata[4818] */\n    { 2409, 0x9E3779B1U, 0x88EE986EU }, /* XSUM_XXH32_testdata[4819] */\n    { 2410, 0x00000000U, 0xC32D3332U }, /* XSUM_XXH32_testdata[4820] */\n    { 2410, 0x9E3779B1U, 0x34A75026U }, /* XSUM_XXH32_testdata[4821] */\n    { 2411, 0x00000000U, 0x17E590DCU }, /* XSUM_XXH32_testdata[4822] */\n    { 2411, 0x9E3779B1U, 0x63890C5BU }, /* XSUM_XXH32_testdata[4823] */\n    { 2412, 0x00000000U, 0x5BC68CEDU }, /* XSUM_XXH32_testdata[4824] */\n    { 2412, 0x9E3779B1U, 0x670759F6U }, /* XSUM_XXH32_testdata[4825] */\n    { 2413, 0x00000000U, 0x657E7361U }, /* XSUM_XXH32_testdata[4826] */\n    { 2413, 0x9E3779B1U, 0x14D537A3U }, /* XSUM_XXH32_testdata[4827] */\n    { 2414, 0x00000000U, 0x85686695U }, /* XSUM_XXH32_testdata[4828] */\n    { 2414, 0x9E3779B1U, 0xF128E84EU }, /* XSUM_XXH32_testdata[4829] */\n    { 2415, 0x00000000U, 0xC665F573U }, /* XSUM_XXH32_testdata[4830] */\n    { 2415, 0x9E3779B1U, 0x17C0AB75U }, /* XSUM_XXH32_testdata[4831] */\n    { 2416, 0x00000000U, 0xF1043438U }, /* XSUM_XXH32_testdata[4832] */\n    { 2416, 0x9E3779B1U, 0x201D2400U }, /* XSUM_XXH32_testdata[4833] */\n    { 2417, 0x00000000U, 0xAF8760FDU }, /* XSUM_XXH32_testdata[4834] */\n    { 2417, 0x9E3779B1U, 0xC37A051BU }, /* XSUM_XXH32_testdata[4835] */\n    { 2418, 0x00000000U, 0xFE2E7C31U }, /* XSUM_XXH32_testdata[4836] */\n    { 2418, 0x9E3779B1U, 0x81779EAFU }, /* XSUM_XXH32_testdata[4837] */\n    { 2419, 0x00000000U, 0xE509F698U }, /* XSUM_XXH32_testdata[4838] */\n    { 2419, 0x9E3779B1U, 0xD50B9B0CU }, /* XSUM_XXH32_testdata[4839] */\n    { 2420, 0x00000000U, 0x5081BD39U }, /* XSUM_XXH32_testdata[4840] */\n    { 2420, 0x9E3779B1U, 0x8FC0450BU }, /* XSUM_XXH32_testdata[4841] */\n    { 2421, 0x00000000U, 0x81C008F1U }, /* XSUM_XXH32_testdata[4842] */\n    { 2421, 0x9E3779B1U, 0xAEB2E7F2U }, /* XSUM_XXH32_testdata[4843] */\n    { 2422, 0x00000000U, 0x4AE97E0DU }, /* XSUM_XXH32_testdata[4844] */\n    { 2422, 0x9E3779B1U, 0xF3C343F8U }, /* XSUM_XXH32_testdata[4845] */\n    { 2423, 0x00000000U, 0x607DFFD1U }, /* XSUM_XXH32_testdata[4846] */\n    { 2423, 0x9E3779B1U, 0x9E312A8EU }, /* XSUM_XXH32_testdata[4847] */\n    { 2424, 0x00000000U, 0xEC94619AU }, /* XSUM_XXH32_testdata[4848] */\n    { 2424, 0x9E3779B1U, 0xD8ACEDE4U }, /* XSUM_XXH32_testdata[4849] */\n    { 2425, 0x00000000U, 0x43825EDBU }, /* XSUM_XXH32_testdata[4850] */\n    { 2425, 0x9E3779B1U, 0x84833C10U }, /* XSUM_XXH32_testdata[4851] */\n    { 2426, 0x00000000U, 0x9C339CC3U }, /* XSUM_XXH32_testdata[4852] */\n    { 2426, 0x9E3779B1U, 0x8336AA1BU }, /* XSUM_XXH32_testdata[4853] */\n    { 2427, 0x00000000U, 0xC27DE396U }, /* XSUM_XXH32_testdata[4854] */\n    { 2427, 0x9E3779B1U, 0xF97DAA8BU }, /* XSUM_XXH32_testdata[4855] */\n    { 2428, 0x00000000U, 0x2F3248A4U }, /* XSUM_XXH32_testdata[4856] */\n    { 2428, 0x9E3779B1U, 0xC713E2CEU }, /* XSUM_XXH32_testdata[4857] */\n    { 2429, 0x00000000U, 0x4540EC38U }, /* XSUM_XXH32_testdata[4858] */\n    { 2429, 0x9E3779B1U, 0xEC4D25B6U }, /* XSUM_XXH32_testdata[4859] */\n    { 2430, 0x00000000U, 0xA05E2C3AU }, /* XSUM_XXH32_testdata[4860] */\n    { 2430, 0x9E3779B1U, 0x9921546BU }, /* XSUM_XXH32_testdata[4861] */\n    { 2431, 0x00000000U, 0x810A1384U }, /* XSUM_XXH32_testdata[4862] */\n    { 2431, 0x9E3779B1U, 0x50C98DB6U }, /* XSUM_XXH32_testdata[4863] */\n    { 2432, 0x00000000U, 0x7FB4B17BU }, /* XSUM_XXH32_testdata[4864] */\n    { 2432, 0x9E3779B1U, 0xF241483CU }, /* XSUM_XXH32_testdata[4865] */\n    { 2433, 0x00000000U, 0x0D389605U }, /* XSUM_XXH32_testdata[4866] */\n    { 2433, 0x9E3779B1U, 0xBC07E8A4U }, /* XSUM_XXH32_testdata[4867] */\n    { 2434, 0x00000000U, 0x168C2350U }, /* XSUM_XXH32_testdata[4868] */\n    { 2434, 0x9E3779B1U, 0x8801D1ABU }, /* XSUM_XXH32_testdata[4869] */\n    { 2435, 0x00000000U, 0x5283B60CU }, /* XSUM_XXH32_testdata[4870] */\n    { 2435, 0x9E3779B1U, 0x10E4870AU }, /* XSUM_XXH32_testdata[4871] */\n    { 2436, 0x00000000U, 0x0421D54CU }, /* XSUM_XXH32_testdata[4872] */\n    { 2436, 0x9E3779B1U, 0x6E3B449BU }, /* XSUM_XXH32_testdata[4873] */\n    { 2437, 0x00000000U, 0x5361F4CCU }, /* XSUM_XXH32_testdata[4874] */\n    { 2437, 0x9E3779B1U, 0xFB59F19CU }, /* XSUM_XXH32_testdata[4875] */\n    { 2438, 0x00000000U, 0x20D19D1FU }, /* XSUM_XXH32_testdata[4876] */\n    { 2438, 0x9E3779B1U, 0x2893EAC6U }, /* XSUM_XXH32_testdata[4877] */\n    { 2439, 0x00000000U, 0xDE177718U }, /* XSUM_XXH32_testdata[4878] */\n    { 2439, 0x9E3779B1U, 0x3EB39364U }, /* XSUM_XXH32_testdata[4879] */\n    { 2440, 0x00000000U, 0xE79B2719U }, /* XSUM_XXH32_testdata[4880] */\n    { 2440, 0x9E3779B1U, 0x312643B1U }, /* XSUM_XXH32_testdata[4881] */\n    { 2441, 0x00000000U, 0x4F5DFDF0U }, /* XSUM_XXH32_testdata[4882] */\n    { 2441, 0x9E3779B1U, 0xED612CE1U }, /* XSUM_XXH32_testdata[4883] */\n    { 2442, 0x00000000U, 0x95180588U }, /* XSUM_XXH32_testdata[4884] */\n    { 2442, 0x9E3779B1U, 0x88F3CABEU }, /* XSUM_XXH32_testdata[4885] */\n    { 2443, 0x00000000U, 0x0C0F7A4DU }, /* XSUM_XXH32_testdata[4886] */\n    { 2443, 0x9E3779B1U, 0x2ED4F445U }, /* XSUM_XXH32_testdata[4887] */\n    { 2444, 0x00000000U, 0xB880E238U }, /* XSUM_XXH32_testdata[4888] */\n    { 2444, 0x9E3779B1U, 0x40A637ABU }, /* XSUM_XXH32_testdata[4889] */\n    { 2445, 0x00000000U, 0xAD670B07U }, /* XSUM_XXH32_testdata[4890] */\n    { 2445, 0x9E3779B1U, 0x11F26435U }, /* XSUM_XXH32_testdata[4891] */\n    { 2446, 0x00000000U, 0x56C94B98U }, /* XSUM_XXH32_testdata[4892] */\n    { 2446, 0x9E3779B1U, 0x60504FB2U }, /* XSUM_XXH32_testdata[4893] */\n    { 2447, 0x00000000U, 0x076B6ABDU }, /* XSUM_XXH32_testdata[4894] */\n    { 2447, 0x9E3779B1U, 0x642D3A22U }, /* XSUM_XXH32_testdata[4895] */\n    { 2448, 0x00000000U, 0xBDCE2439U }, /* XSUM_XXH32_testdata[4896] */\n    { 2448, 0x9E3779B1U, 0x7F00BA89U }, /* XSUM_XXH32_testdata[4897] */\n    { 2449, 0x00000000U, 0xDFAAF476U }, /* XSUM_XXH32_testdata[4898] */\n    { 2449, 0x9E3779B1U, 0x050B1532U }, /* XSUM_XXH32_testdata[4899] */\n    { 2450, 0x00000000U, 0x1F1C1A57U }, /* XSUM_XXH32_testdata[4900] */\n    { 2450, 0x9E3779B1U, 0xCDB6FD63U }, /* XSUM_XXH32_testdata[4901] */\n    { 2451, 0x00000000U, 0xF823D563U }, /* XSUM_XXH32_testdata[4902] */\n    { 2451, 0x9E3779B1U, 0xCA835153U }, /* XSUM_XXH32_testdata[4903] */\n    { 2452, 0x00000000U, 0x51B522C4U }, /* XSUM_XXH32_testdata[4904] */\n    { 2452, 0x9E3779B1U, 0x45900CF0U }, /* XSUM_XXH32_testdata[4905] */\n    { 2453, 0x00000000U, 0x5235F781U }, /* XSUM_XXH32_testdata[4906] */\n    { 2453, 0x9E3779B1U, 0x2D5AA19FU }, /* XSUM_XXH32_testdata[4907] */\n    { 2454, 0x00000000U, 0x18BAE005U }, /* XSUM_XXH32_testdata[4908] */\n    { 2454, 0x9E3779B1U, 0x6C048095U }, /* XSUM_XXH32_testdata[4909] */\n    { 2455, 0x00000000U, 0x3AA89246U }, /* XSUM_XXH32_testdata[4910] */\n    { 2455, 0x9E3779B1U, 0x38AE9554U }, /* XSUM_XXH32_testdata[4911] */\n    { 2456, 0x00000000U, 0x69D553FFU }, /* XSUM_XXH32_testdata[4912] */\n    { 2456, 0x9E3779B1U, 0xC31AA130U }, /* XSUM_XXH32_testdata[4913] */\n    { 2457, 0x00000000U, 0xABCFC613U }, /* XSUM_XXH32_testdata[4914] */\n    { 2457, 0x9E3779B1U, 0x1CFCC09FU }, /* XSUM_XXH32_testdata[4915] */\n    { 2458, 0x00000000U, 0xDEFD37F7U }, /* XSUM_XXH32_testdata[4916] */\n    { 2458, 0x9E3779B1U, 0x3D2B931EU }, /* XSUM_XXH32_testdata[4917] */\n    { 2459, 0x00000000U, 0xC766C583U }, /* XSUM_XXH32_testdata[4918] */\n    { 2459, 0x9E3779B1U, 0xF614CE02U }, /* XSUM_XXH32_testdata[4919] */\n    { 2460, 0x00000000U, 0x354DE099U }, /* XSUM_XXH32_testdata[4920] */\n    { 2460, 0x9E3779B1U, 0xD92DE3CEU }, /* XSUM_XXH32_testdata[4921] */\n    { 2461, 0x00000000U, 0x672C6106U }, /* XSUM_XXH32_testdata[4922] */\n    { 2461, 0x9E3779B1U, 0x1EB302CBU }, /* XSUM_XXH32_testdata[4923] */\n    { 2462, 0x00000000U, 0xBB87002CU }, /* XSUM_XXH32_testdata[4924] */\n    { 2462, 0x9E3779B1U, 0x0CFF9B2CU }, /* XSUM_XXH32_testdata[4925] */\n    { 2463, 0x00000000U, 0x8E000EEEU }, /* XSUM_XXH32_testdata[4926] */\n    { 2463, 0x9E3779B1U, 0x38A79CF8U }, /* XSUM_XXH32_testdata[4927] */\n    { 2464, 0x00000000U, 0x690461FCU }, /* XSUM_XXH32_testdata[4928] */\n    { 2464, 0x9E3779B1U, 0x2B4836B0U }, /* XSUM_XXH32_testdata[4929] */\n    { 2465, 0x00000000U, 0xEEF46B6CU }, /* XSUM_XXH32_testdata[4930] */\n    { 2465, 0x9E3779B1U, 0xD465986EU }, /* XSUM_XXH32_testdata[4931] */\n    { 2466, 0x00000000U, 0xFB754DC6U }, /* XSUM_XXH32_testdata[4932] */\n    { 2466, 0x9E3779B1U, 0xFCE69DA1U }, /* XSUM_XXH32_testdata[4933] */\n    { 2467, 0x00000000U, 0xA88E1A09U }, /* XSUM_XXH32_testdata[4934] */\n    { 2467, 0x9E3779B1U, 0x57214C12U }, /* XSUM_XXH32_testdata[4935] */\n    { 2468, 0x00000000U, 0x78BB1C9CU }, /* XSUM_XXH32_testdata[4936] */\n    { 2468, 0x9E3779B1U, 0xDF185410U }, /* XSUM_XXH32_testdata[4937] */\n    { 2469, 0x00000000U, 0x6213889FU }, /* XSUM_XXH32_testdata[4938] */\n    { 2469, 0x9E3779B1U, 0xAFA9F475U }, /* XSUM_XXH32_testdata[4939] */\n    { 2470, 0x00000000U, 0x95B72151U }, /* XSUM_XXH32_testdata[4940] */\n    { 2470, 0x9E3779B1U, 0x88128454U }, /* XSUM_XXH32_testdata[4941] */\n    { 2471, 0x00000000U, 0x4BF42AACU }, /* XSUM_XXH32_testdata[4942] */\n    { 2471, 0x9E3779B1U, 0x13142328U }, /* XSUM_XXH32_testdata[4943] */\n    { 2472, 0x00000000U, 0x60CFC8A3U }, /* XSUM_XXH32_testdata[4944] */\n    { 2472, 0x9E3779B1U, 0x9E5B1C19U }, /* XSUM_XXH32_testdata[4945] */\n    { 2473, 0x00000000U, 0x5E5AB692U }, /* XSUM_XXH32_testdata[4946] */\n    { 2473, 0x9E3779B1U, 0x15692D3AU }, /* XSUM_XXH32_testdata[4947] */\n    { 2474, 0x00000000U, 0x10EC98B1U }, /* XSUM_XXH32_testdata[4948] */\n    { 2474, 0x9E3779B1U, 0x37643386U }, /* XSUM_XXH32_testdata[4949] */\n    { 2475, 0x00000000U, 0x5BDDCAADU }, /* XSUM_XXH32_testdata[4950] */\n    { 2475, 0x9E3779B1U, 0xC3C71E98U }, /* XSUM_XXH32_testdata[4951] */\n    { 2476, 0x00000000U, 0xB69D9411U }, /* XSUM_XXH32_testdata[4952] */\n    { 2476, 0x9E3779B1U, 0x1EC82D48U }, /* XSUM_XXH32_testdata[4953] */\n    { 2477, 0x00000000U, 0x8EAFEDCEU }, /* XSUM_XXH32_testdata[4954] */\n    { 2477, 0x9E3779B1U, 0xB095B864U }, /* XSUM_XXH32_testdata[4955] */\n    { 2478, 0x00000000U, 0x9D33ED47U }, /* XSUM_XXH32_testdata[4956] */\n    { 2478, 0x9E3779B1U, 0xB36E84D2U }, /* XSUM_XXH32_testdata[4957] */\n    { 2479, 0x00000000U, 0x20CA8E34U }, /* XSUM_XXH32_testdata[4958] */\n    { 2479, 0x9E3779B1U, 0x92D7D0D2U }, /* XSUM_XXH32_testdata[4959] */\n    { 2480, 0x00000000U, 0x6EBC10CFU }, /* XSUM_XXH32_testdata[4960] */\n    { 2480, 0x9E3779B1U, 0xC769351EU }, /* XSUM_XXH32_testdata[4961] */\n    { 2481, 0x00000000U, 0x283A9AB3U }, /* XSUM_XXH32_testdata[4962] */\n    { 2481, 0x9E3779B1U, 0xE8274634U }, /* XSUM_XXH32_testdata[4963] */\n    { 2482, 0x00000000U, 0x1D4783FBU }, /* XSUM_XXH32_testdata[4964] */\n    { 2482, 0x9E3779B1U, 0x94EDEA3EU }, /* XSUM_XXH32_testdata[4965] */\n    { 2483, 0x00000000U, 0xA4C2B354U }, /* XSUM_XXH32_testdata[4966] */\n    { 2483, 0x9E3779B1U, 0xFA13A4EAU }, /* XSUM_XXH32_testdata[4967] */\n    { 2484, 0x00000000U, 0xE2905647U }, /* XSUM_XXH32_testdata[4968] */\n    { 2484, 0x9E3779B1U, 0x5CE8F0B5U }, /* XSUM_XXH32_testdata[4969] */\n    { 2485, 0x00000000U, 0x9BFFBED8U }, /* XSUM_XXH32_testdata[4970] */\n    { 2485, 0x9E3779B1U, 0xD476BD5EU }, /* XSUM_XXH32_testdata[4971] */\n    { 2486, 0x00000000U, 0xA87A215CU }, /* XSUM_XXH32_testdata[4972] */\n    { 2486, 0x9E3779B1U, 0x007637D1U }, /* XSUM_XXH32_testdata[4973] */\n    { 2487, 0x00000000U, 0x88B5055DU }, /* XSUM_XXH32_testdata[4974] */\n    { 2487, 0x9E3779B1U, 0x33151CAEU }, /* XSUM_XXH32_testdata[4975] */\n    { 2488, 0x00000000U, 0x3B0D952CU }, /* XSUM_XXH32_testdata[4976] */\n    { 2488, 0x9E3779B1U, 0x042DC20EU }, /* XSUM_XXH32_testdata[4977] */\n    { 2489, 0x00000000U, 0xB2DF6455U }, /* XSUM_XXH32_testdata[4978] */\n    { 2489, 0x9E3779B1U, 0xA0A9E1AEU }, /* XSUM_XXH32_testdata[4979] */\n    { 2490, 0x00000000U, 0xC4719A06U }, /* XSUM_XXH32_testdata[4980] */\n    { 2490, 0x9E3779B1U, 0xCC0EB049U }, /* XSUM_XXH32_testdata[4981] */\n    { 2491, 0x00000000U, 0x9D0BF4D3U }, /* XSUM_XXH32_testdata[4982] */\n    { 2491, 0x9E3779B1U, 0xDA2AB850U }, /* XSUM_XXH32_testdata[4983] */\n    { 2492, 0x00000000U, 0xD5566A5DU }, /* XSUM_XXH32_testdata[4984] */\n    { 2492, 0x9E3779B1U, 0xE31015C5U }, /* XSUM_XXH32_testdata[4985] */\n    { 2493, 0x00000000U, 0x62C54019U }, /* XSUM_XXH32_testdata[4986] */\n    { 2493, 0x9E3779B1U, 0x30F08047U }, /* XSUM_XXH32_testdata[4987] */\n    { 2494, 0x00000000U, 0x1F8E0294U }, /* XSUM_XXH32_testdata[4988] */\n    { 2494, 0x9E3779B1U, 0x05B20621U }, /* XSUM_XXH32_testdata[4989] */\n    { 2495, 0x00000000U, 0xBDD763A8U }, /* XSUM_XXH32_testdata[4990] */\n    { 2495, 0x9E3779B1U, 0x2B89039CU }, /* XSUM_XXH32_testdata[4991] */\n    { 2496, 0x00000000U, 0xDBCA267CU }, /* XSUM_XXH32_testdata[4992] */\n    { 2496, 0x9E3779B1U, 0x248B0E37U }, /* XSUM_XXH32_testdata[4993] */\n    { 2497, 0x00000000U, 0x4687D6C4U }, /* XSUM_XXH32_testdata[4994] */\n    { 2497, 0x9E3779B1U, 0x71A4D797U }, /* XSUM_XXH32_testdata[4995] */\n    { 2498, 0x00000000U, 0x223F45C3U }, /* XSUM_XXH32_testdata[4996] */\n    { 2498, 0x9E3779B1U, 0x1C480C65U }, /* XSUM_XXH32_testdata[4997] */\n    { 2499, 0x00000000U, 0x71870690U }, /* XSUM_XXH32_testdata[4998] */\n    { 2499, 0x9E3779B1U, 0x88ACAA6CU }, /* XSUM_XXH32_testdata[4999] */\n    { 2500, 0x00000000U, 0x266F7989U }, /* XSUM_XXH32_testdata[5000] */\n    { 2500, 0x9E3779B1U, 0x8997FD8DU }, /* XSUM_XXH32_testdata[5001] */\n    { 2501, 0x00000000U, 0x1CBC94A7U }, /* XSUM_XXH32_testdata[5002] */\n    { 2501, 0x9E3779B1U, 0xBA035B1FU }, /* XSUM_XXH32_testdata[5003] */\n    { 2502, 0x00000000U, 0x8D7DED02U }, /* XSUM_XXH32_testdata[5004] */\n    { 2502, 0x9E3779B1U, 0x2B388041U }, /* XSUM_XXH32_testdata[5005] */\n    { 2503, 0x00000000U, 0xFEC91094U }, /* XSUM_XXH32_testdata[5006] */\n    { 2503, 0x9E3779B1U, 0x8D9BE43FU }, /* XSUM_XXH32_testdata[5007] */\n    { 2504, 0x00000000U, 0xEC4C3E01U }, /* XSUM_XXH32_testdata[5008] */\n    { 2504, 0x9E3779B1U, 0x55830CC0U }, /* XSUM_XXH32_testdata[5009] */\n    { 2505, 0x00000000U, 0xC516CBBFU }, /* XSUM_XXH32_testdata[5010] */\n    { 2505, 0x9E3779B1U, 0xB86FAF5AU }, /* XSUM_XXH32_testdata[5011] */\n    { 2506, 0x00000000U, 0x79747E1AU }, /* XSUM_XXH32_testdata[5012] */\n    { 2506, 0x9E3779B1U, 0x99099909U }, /* XSUM_XXH32_testdata[5013] */\n    { 2507, 0x00000000U, 0xCE63B747U }, /* XSUM_XXH32_testdata[5014] */\n    { 2507, 0x9E3779B1U, 0xF6B7F760U }, /* XSUM_XXH32_testdata[5015] */\n    { 2508, 0x00000000U, 0xA95B498BU }, /* XSUM_XXH32_testdata[5016] */\n    { 2508, 0x9E3779B1U, 0xDA4A2178U }, /* XSUM_XXH32_testdata[5017] */\n    { 2509, 0x00000000U, 0xE2908F0AU }, /* XSUM_XXH32_testdata[5018] */\n    { 2509, 0x9E3779B1U, 0x92D2C2DAU }, /* XSUM_XXH32_testdata[5019] */\n    { 2510, 0x00000000U, 0x4F23E994U }, /* XSUM_XXH32_testdata[5020] */\n    { 2510, 0x9E3779B1U, 0xABFE546BU }, /* XSUM_XXH32_testdata[5021] */\n    { 2511, 0x00000000U, 0xC3BA44D3U }, /* XSUM_XXH32_testdata[5022] */\n    { 2511, 0x9E3779B1U, 0x380C4B29U }, /* XSUM_XXH32_testdata[5023] */\n    { 2512, 0x00000000U, 0x1B0BBAF2U }, /* XSUM_XXH32_testdata[5024] */\n    { 2512, 0x9E3779B1U, 0xDE65FD1BU }, /* XSUM_XXH32_testdata[5025] */\n    { 2513, 0x00000000U, 0x77AA4D39U }, /* XSUM_XXH32_testdata[5026] */\n    { 2513, 0x9E3779B1U, 0x054A6BF2U }, /* XSUM_XXH32_testdata[5027] */\n    { 2514, 0x00000000U, 0x8A698619U }, /* XSUM_XXH32_testdata[5028] */\n    { 2514, 0x9E3779B1U, 0x83B311DAU }, /* XSUM_XXH32_testdata[5029] */\n    { 2515, 0x00000000U, 0x3DD07C59U }, /* XSUM_XXH32_testdata[5030] */\n    { 2515, 0x9E3779B1U, 0x95DFCC93U }, /* XSUM_XXH32_testdata[5031] */\n    { 2516, 0x00000000U, 0xAA71782EU }, /* XSUM_XXH32_testdata[5032] */\n    { 2516, 0x9E3779B1U, 0x930CB31AU }, /* XSUM_XXH32_testdata[5033] */\n    { 2517, 0x00000000U, 0xC10E46FBU }, /* XSUM_XXH32_testdata[5034] */\n    { 2517, 0x9E3779B1U, 0x4E714751U }, /* XSUM_XXH32_testdata[5035] */\n    { 2518, 0x00000000U, 0x00E44351U }, /* XSUM_XXH32_testdata[5036] */\n    { 2518, 0x9E3779B1U, 0xA573A27FU }, /* XSUM_XXH32_testdata[5037] */\n    { 2519, 0x00000000U, 0x3BBDD323U }, /* XSUM_XXH32_testdata[5038] */\n    { 2519, 0x9E3779B1U, 0x7CD2EC98U }, /* XSUM_XXH32_testdata[5039] */\n    { 2520, 0x00000000U, 0x56F5F0F5U }, /* XSUM_XXH32_testdata[5040] */\n    { 2520, 0x9E3779B1U, 0x6DBFC220U }, /* XSUM_XXH32_testdata[5041] */\n    { 2521, 0x00000000U, 0xBFCFEA1CU }, /* XSUM_XXH32_testdata[5042] */\n    { 2521, 0x9E3779B1U, 0x77380567U }, /* XSUM_XXH32_testdata[5043] */\n    { 2522, 0x00000000U, 0x53123268U }, /* XSUM_XXH32_testdata[5044] */\n    { 2522, 0x9E3779B1U, 0xDD6DA0B4U }, /* XSUM_XXH32_testdata[5045] */\n    { 2523, 0x00000000U, 0xCB49F211U }, /* XSUM_XXH32_testdata[5046] */\n    { 2523, 0x9E3779B1U, 0x5B1A4A5DU }, /* XSUM_XXH32_testdata[5047] */\n    { 2524, 0x00000000U, 0xBB216C60U }, /* XSUM_XXH32_testdata[5048] */\n    { 2524, 0x9E3779B1U, 0xBE78F201U }, /* XSUM_XXH32_testdata[5049] */\n    { 2525, 0x00000000U, 0x2BDFFA60U }, /* XSUM_XXH32_testdata[5050] */\n    { 2525, 0x9E3779B1U, 0xD0766490U }, /* XSUM_XXH32_testdata[5051] */\n    { 2526, 0x00000000U, 0xA3DE9270U }, /* XSUM_XXH32_testdata[5052] */\n    { 2526, 0x9E3779B1U, 0xCEC85BF3U }, /* XSUM_XXH32_testdata[5053] */\n    { 2527, 0x00000000U, 0xEFC57AFCU }, /* XSUM_XXH32_testdata[5054] */\n    { 2527, 0x9E3779B1U, 0xC999C77CU }, /* XSUM_XXH32_testdata[5055] */\n    { 2528, 0x00000000U, 0x1155BA9CU }, /* XSUM_XXH32_testdata[5056] */\n    { 2528, 0x9E3779B1U, 0xF22757C6U }, /* XSUM_XXH32_testdata[5057] */\n    { 2529, 0x00000000U, 0xBB71EAD2U }, /* XSUM_XXH32_testdata[5058] */\n    { 2529, 0x9E3779B1U, 0x6F4EF984U }, /* XSUM_XXH32_testdata[5059] */\n    { 2530, 0x00000000U, 0xEDEB9999U }, /* XSUM_XXH32_testdata[5060] */\n    { 2530, 0x9E3779B1U, 0x0AA10A5FU }, /* XSUM_XXH32_testdata[5061] */\n    { 2531, 0x00000000U, 0x32C51A6CU }, /* XSUM_XXH32_testdata[5062] */\n    { 2531, 0x9E3779B1U, 0x2EAD7681U }, /* XSUM_XXH32_testdata[5063] */\n    { 2532, 0x00000000U, 0x3495B28CU }, /* XSUM_XXH32_testdata[5064] */\n    { 2532, 0x9E3779B1U, 0x5723E1FAU }, /* XSUM_XXH32_testdata[5065] */\n    { 2533, 0x00000000U, 0x9AB8397EU }, /* XSUM_XXH32_testdata[5066] */\n    { 2533, 0x9E3779B1U, 0xCDCF0996U }, /* XSUM_XXH32_testdata[5067] */\n    { 2534, 0x00000000U, 0xFA84032BU }, /* XSUM_XXH32_testdata[5068] */\n    { 2534, 0x9E3779B1U, 0x8EBFB96BU }, /* XSUM_XXH32_testdata[5069] */\n    { 2535, 0x00000000U, 0xB247D845U }, /* XSUM_XXH32_testdata[5070] */\n    { 2535, 0x9E3779B1U, 0xC9DC4D84U }, /* XSUM_XXH32_testdata[5071] */\n    { 2536, 0x00000000U, 0xDE3C3124U }, /* XSUM_XXH32_testdata[5072] */\n    { 2536, 0x9E3779B1U, 0x1B134AA2U }, /* XSUM_XXH32_testdata[5073] */\n    { 2537, 0x00000000U, 0x748D3C2FU }, /* XSUM_XXH32_testdata[5074] */\n    { 2537, 0x9E3779B1U, 0x137D499FU }, /* XSUM_XXH32_testdata[5075] */\n    { 2538, 0x00000000U, 0x30184606U }, /* XSUM_XXH32_testdata[5076] */\n    { 2538, 0x9E3779B1U, 0x1390D88DU }, /* XSUM_XXH32_testdata[5077] */\n    { 2539, 0x00000000U, 0xA9BB1A2EU }, /* XSUM_XXH32_testdata[5078] */\n    { 2539, 0x9E3779B1U, 0xD13D5416U }, /* XSUM_XXH32_testdata[5079] */\n    { 2540, 0x00000000U, 0xBD9DECB4U }, /* XSUM_XXH32_testdata[5080] */\n    { 2540, 0x9E3779B1U, 0x58AED3D4U }, /* XSUM_XXH32_testdata[5081] */\n    { 2541, 0x00000000U, 0x871352E8U }, /* XSUM_XXH32_testdata[5082] */\n    { 2541, 0x9E3779B1U, 0x78668F9CU }, /* XSUM_XXH32_testdata[5083] */\n    { 2542, 0x00000000U, 0x2D251116U }, /* XSUM_XXH32_testdata[5084] */\n    { 2542, 0x9E3779B1U, 0x3D6AE30FU }, /* XSUM_XXH32_testdata[5085] */\n    { 2543, 0x00000000U, 0xB0B1A048U }, /* XSUM_XXH32_testdata[5086] */\n    { 2543, 0x9E3779B1U, 0xF05AD391U }, /* XSUM_XXH32_testdata[5087] */\n    { 2544, 0x00000000U, 0x64A2DB5FU }, /* XSUM_XXH32_testdata[5088] */\n    { 2544, 0x9E3779B1U, 0x330B551FU }, /* XSUM_XXH32_testdata[5089] */\n    { 2545, 0x00000000U, 0x1AAB93F5U }, /* XSUM_XXH32_testdata[5090] */\n    { 2545, 0x9E3779B1U, 0x4B872B25U }, /* XSUM_XXH32_testdata[5091] */\n    { 2546, 0x00000000U, 0x3DA05328U }, /* XSUM_XXH32_testdata[5092] */\n    { 2546, 0x9E3779B1U, 0x79A5FA89U }, /* XSUM_XXH32_testdata[5093] */\n    { 2547, 0x00000000U, 0xDE555F91U }, /* XSUM_XXH32_testdata[5094] */\n    { 2547, 0x9E3779B1U, 0x390DB61CU }, /* XSUM_XXH32_testdata[5095] */\n    { 2548, 0x00000000U, 0x8ECFAF26U }, /* XSUM_XXH32_testdata[5096] */\n    { 2548, 0x9E3779B1U, 0x4DD32C3BU }, /* XSUM_XXH32_testdata[5097] */\n    { 2549, 0x00000000U, 0x5F0ED460U }, /* XSUM_XXH32_testdata[5098] */\n    { 2549, 0x9E3779B1U, 0x7A0BB25CU }, /* XSUM_XXH32_testdata[5099] */\n    { 2550, 0x00000000U, 0xC3E328B0U }, /* XSUM_XXH32_testdata[5100] */\n    { 2550, 0x9E3779B1U, 0xC8C02925U }, /* XSUM_XXH32_testdata[5101] */\n    { 2551, 0x00000000U, 0x9B95BB28U }, /* XSUM_XXH32_testdata[5102] */\n    { 2551, 0x9E3779B1U, 0x6609D410U }, /* XSUM_XXH32_testdata[5103] */\n    { 2552, 0x00000000U, 0x7FC5A65FU }, /* XSUM_XXH32_testdata[5104] */\n    { 2552, 0x9E3779B1U, 0xC0E9A0ADU }, /* XSUM_XXH32_testdata[5105] */\n    { 2553, 0x00000000U, 0x5D323F7DU }, /* XSUM_XXH32_testdata[5106] */\n    { 2553, 0x9E3779B1U, 0x38FBB4D5U }, /* XSUM_XXH32_testdata[5107] */\n    { 2554, 0x00000000U, 0xAD3C2619U }, /* XSUM_XXH32_testdata[5108] */\n    { 2554, 0x9E3779B1U, 0x4CBE5431U }, /* XSUM_XXH32_testdata[5109] */\n    { 2555, 0x00000000U, 0x2DEDCDDDU }, /* XSUM_XXH32_testdata[5110] */\n    { 2555, 0x9E3779B1U, 0xF121C811U }, /* XSUM_XXH32_testdata[5111] */\n    { 2556, 0x00000000U, 0xBCC6DA50U }, /* XSUM_XXH32_testdata[5112] */\n    { 2556, 0x9E3779B1U, 0x0EE12681U }, /* XSUM_XXH32_testdata[5113] */\n    { 2557, 0x00000000U, 0x13BE5756U }, /* XSUM_XXH32_testdata[5114] */\n    { 2557, 0x9E3779B1U, 0x773E8E4DU }, /* XSUM_XXH32_testdata[5115] */\n    { 2558, 0x00000000U, 0x1CA3BA3FU }, /* XSUM_XXH32_testdata[5116] */\n    { 2558, 0x9E3779B1U, 0xCACA1974U }, /* XSUM_XXH32_testdata[5117] */\n    { 2559, 0x00000000U, 0x153CAD63U }, /* XSUM_XXH32_testdata[5118] */\n    { 2559, 0x9E3779B1U, 0xD046722DU }, /* XSUM_XXH32_testdata[5119] */\n    { 2560, 0x00000000U, 0x1ABA29BAU }, /* XSUM_XXH32_testdata[5120] */\n    { 2560, 0x9E3779B1U, 0x51D83022U }, /* XSUM_XXH32_testdata[5121] */\n    { 2561, 0x00000000U, 0xADE87E35U }, /* XSUM_XXH32_testdata[5122] */\n    { 2561, 0x9E3779B1U, 0x97BC0802U }, /* XSUM_XXH32_testdata[5123] */\n    { 2562, 0x00000000U, 0x7C693BDEU }, /* XSUM_XXH32_testdata[5124] */\n    { 2562, 0x9E3779B1U, 0x3610DFC4U }, /* XSUM_XXH32_testdata[5125] */\n    { 2563, 0x00000000U, 0xCAB42EDAU }, /* XSUM_XXH32_testdata[5126] */\n    { 2563, 0x9E3779B1U, 0x9C98F65BU }, /* XSUM_XXH32_testdata[5127] */\n    { 2564, 0x00000000U, 0x1BEE92DEU }, /* XSUM_XXH32_testdata[5128] */\n    { 2564, 0x9E3779B1U, 0xA092C145U }, /* XSUM_XXH32_testdata[5129] */\n    { 2565, 0x00000000U, 0x5340661FU }, /* XSUM_XXH32_testdata[5130] */\n    { 2565, 0x9E3779B1U, 0xFC3013D6U }, /* XSUM_XXH32_testdata[5131] */\n    { 2566, 0x00000000U, 0xA00BE528U }, /* XSUM_XXH32_testdata[5132] */\n    { 2566, 0x9E3779B1U, 0x88E43904U }, /* XSUM_XXH32_testdata[5133] */\n    { 2567, 0x00000000U, 0x5B70F3CAU }, /* XSUM_XXH32_testdata[5134] */\n    { 2567, 0x9E3779B1U, 0x963DBA98U }, /* XSUM_XXH32_testdata[5135] */\n    { 2568, 0x00000000U, 0xCA186675U }, /* XSUM_XXH32_testdata[5136] */\n    { 2568, 0x9E3779B1U, 0x771ED8ACU }, /* XSUM_XXH32_testdata[5137] */\n    { 2569, 0x00000000U, 0x8ADF1BD0U }, /* XSUM_XXH32_testdata[5138] */\n    { 2569, 0x9E3779B1U, 0x566F3C4EU }, /* XSUM_XXH32_testdata[5139] */\n    { 2570, 0x00000000U, 0x95E0C3ECU }, /* XSUM_XXH32_testdata[5140] */\n    { 2570, 0x9E3779B1U, 0xC33D4E92U }, /* XSUM_XXH32_testdata[5141] */\n    { 2571, 0x00000000U, 0xB2EF66DFU }, /* XSUM_XXH32_testdata[5142] */\n    { 2571, 0x9E3779B1U, 0x0F8D7D36U }, /* XSUM_XXH32_testdata[5143] */\n    { 2572, 0x00000000U, 0xA700C815U }, /* XSUM_XXH32_testdata[5144] */\n    { 2572, 0x9E3779B1U, 0xA8B82AC3U }, /* XSUM_XXH32_testdata[5145] */\n    { 2573, 0x00000000U, 0x2898B84AU }, /* XSUM_XXH32_testdata[5146] */\n    { 2573, 0x9E3779B1U, 0x338AE2C0U }, /* XSUM_XXH32_testdata[5147] */\n    { 2574, 0x00000000U, 0x0B8D628AU }, /* XSUM_XXH32_testdata[5148] */\n    { 2574, 0x9E3779B1U, 0x999867C3U }, /* XSUM_XXH32_testdata[5149] */\n    { 2575, 0x00000000U, 0x80E4BAD6U }, /* XSUM_XXH32_testdata[5150] */\n    { 2575, 0x9E3779B1U, 0x2F4350BFU }, /* XSUM_XXH32_testdata[5151] */\n    { 2576, 0x00000000U, 0x5A4BF4F5U }, /* XSUM_XXH32_testdata[5152] */\n    { 2576, 0x9E3779B1U, 0xB583DD59U }, /* XSUM_XXH32_testdata[5153] */\n    { 2577, 0x00000000U, 0xCBBEE1FFU }, /* XSUM_XXH32_testdata[5154] */\n    { 2577, 0x9E3779B1U, 0x19C5CAB0U }, /* XSUM_XXH32_testdata[5155] */\n    { 2578, 0x00000000U, 0x84DA9375U }, /* XSUM_XXH32_testdata[5156] */\n    { 2578, 0x9E3779B1U, 0x302900F6U }, /* XSUM_XXH32_testdata[5157] */\n    { 2579, 0x00000000U, 0xD61C2E53U }, /* XSUM_XXH32_testdata[5158] */\n    { 2579, 0x9E3779B1U, 0xC8B528EBU }, /* XSUM_XXH32_testdata[5159] */\n    { 2580, 0x00000000U, 0xDB46C259U }, /* XSUM_XXH32_testdata[5160] */\n    { 2580, 0x9E3779B1U, 0x24565891U }, /* XSUM_XXH32_testdata[5161] */\n    { 2581, 0x00000000U, 0x3B9B6E50U }, /* XSUM_XXH32_testdata[5162] */\n    { 2581, 0x9E3779B1U, 0xE31D1333U }, /* XSUM_XXH32_testdata[5163] */\n    { 2582, 0x00000000U, 0xC2192C93U }, /* XSUM_XXH32_testdata[5164] */\n    { 2582, 0x9E3779B1U, 0xB4ECDB50U }, /* XSUM_XXH32_testdata[5165] */\n    { 2583, 0x00000000U, 0xEE3138CFU }, /* XSUM_XXH32_testdata[5166] */\n    { 2583, 0x9E3779B1U, 0x97A34761U }, /* XSUM_XXH32_testdata[5167] */\n    { 2584, 0x00000000U, 0xB947C19AU }, /* XSUM_XXH32_testdata[5168] */\n    { 2584, 0x9E3779B1U, 0x7ABB56ABU }, /* XSUM_XXH32_testdata[5169] */\n    { 2585, 0x00000000U, 0xC1FD5E79U }, /* XSUM_XXH32_testdata[5170] */\n    { 2585, 0x9E3779B1U, 0x1EF60D93U }, /* XSUM_XXH32_testdata[5171] */\n    { 2586, 0x00000000U, 0x29B23FB2U }, /* XSUM_XXH32_testdata[5172] */\n    { 2586, 0x9E3779B1U, 0x788A9EFDU }, /* XSUM_XXH32_testdata[5173] */\n    { 2587, 0x00000000U, 0xE86DD88FU }, /* XSUM_XXH32_testdata[5174] */\n    { 2587, 0x9E3779B1U, 0x84FAFF47U }, /* XSUM_XXH32_testdata[5175] */\n    { 2588, 0x00000000U, 0x4AE06B62U }, /* XSUM_XXH32_testdata[5176] */\n    { 2588, 0x9E3779B1U, 0xACA1A31DU }, /* XSUM_XXH32_testdata[5177] */\n    { 2589, 0x00000000U, 0x972BB1C4U }, /* XSUM_XXH32_testdata[5178] */\n    { 2589, 0x9E3779B1U, 0xB2BA8F34U }, /* XSUM_XXH32_testdata[5179] */\n    { 2590, 0x00000000U, 0xBA75790CU }, /* XSUM_XXH32_testdata[5180] */\n    { 2590, 0x9E3779B1U, 0x6521A567U }, /* XSUM_XXH32_testdata[5181] */\n    { 2591, 0x00000000U, 0x0051F6F3U }, /* XSUM_XXH32_testdata[5182] */\n    { 2591, 0x9E3779B1U, 0xAB35F09EU }, /* XSUM_XXH32_testdata[5183] */\n    { 2592, 0x00000000U, 0xC086C3D6U }, /* XSUM_XXH32_testdata[5184] */\n    { 2592, 0x9E3779B1U, 0xD999A842U }, /* XSUM_XXH32_testdata[5185] */\n    { 2593, 0x00000000U, 0x2FAAE8F6U }, /* XSUM_XXH32_testdata[5186] */\n    { 2593, 0x9E3779B1U, 0xE28218AFU }, /* XSUM_XXH32_testdata[5187] */\n    { 2594, 0x00000000U, 0x6FF01C64U }, /* XSUM_XXH32_testdata[5188] */\n    { 2594, 0x9E3779B1U, 0xF4979DCBU }, /* XSUM_XXH32_testdata[5189] */\n    { 2595, 0x00000000U, 0x2E66493DU }, /* XSUM_XXH32_testdata[5190] */\n    { 2595, 0x9E3779B1U, 0x0C3FF755U }, /* XSUM_XXH32_testdata[5191] */\n    { 2596, 0x00000000U, 0xF3CA0A8FU }, /* XSUM_XXH32_testdata[5192] */\n    { 2596, 0x9E3779B1U, 0xBE5665A9U }, /* XSUM_XXH32_testdata[5193] */\n    { 2597, 0x00000000U, 0xA3D1F12DU }, /* XSUM_XXH32_testdata[5194] */\n    { 2597, 0x9E3779B1U, 0xE37C6962U }, /* XSUM_XXH32_testdata[5195] */\n    { 2598, 0x00000000U, 0x1BC5E3FCU }, /* XSUM_XXH32_testdata[5196] */\n    { 2598, 0x9E3779B1U, 0x508C0A20U }, /* XSUM_XXH32_testdata[5197] */\n    { 2599, 0x00000000U, 0x6A9E3256U }, /* XSUM_XXH32_testdata[5198] */\n    { 2599, 0x9E3779B1U, 0x1550A26EU }, /* XSUM_XXH32_testdata[5199] */\n    { 2600, 0x00000000U, 0xEF3A2069U }, /* XSUM_XXH32_testdata[5200] */\n    { 2600, 0x9E3779B1U, 0x5DC7FA5FU }, /* XSUM_XXH32_testdata[5201] */\n    { 2601, 0x00000000U, 0x7011A874U }, /* XSUM_XXH32_testdata[5202] */\n    { 2601, 0x9E3779B1U, 0x90ECDBA0U }, /* XSUM_XXH32_testdata[5203] */\n    { 2602, 0x00000000U, 0xDF051DEFU }, /* XSUM_XXH32_testdata[5204] */\n    { 2602, 0x9E3779B1U, 0xD9E10336U }, /* XSUM_XXH32_testdata[5205] */\n    { 2603, 0x00000000U, 0x4F7B4CAAU }, /* XSUM_XXH32_testdata[5206] */\n    { 2603, 0x9E3779B1U, 0xFD43224AU }, /* XSUM_XXH32_testdata[5207] */\n    { 2604, 0x00000000U, 0xABE84A3AU }, /* XSUM_XXH32_testdata[5208] */\n    { 2604, 0x9E3779B1U, 0x4BD78879U }, /* XSUM_XXH32_testdata[5209] */\n    { 2605, 0x00000000U, 0x9EF62713U }, /* XSUM_XXH32_testdata[5210] */\n    { 2605, 0x9E3779B1U, 0xB2B119F8U }, /* XSUM_XXH32_testdata[5211] */\n    { 2606, 0x00000000U, 0x88919716U }, /* XSUM_XXH32_testdata[5212] */\n    { 2606, 0x9E3779B1U, 0xC7B45CF4U }, /* XSUM_XXH32_testdata[5213] */\n    { 2607, 0x00000000U, 0x9C077C09U }, /* XSUM_XXH32_testdata[5214] */\n    { 2607, 0x9E3779B1U, 0xFE7EE296U }, /* XSUM_XXH32_testdata[5215] */\n    { 2608, 0x00000000U, 0x54E5DF23U }, /* XSUM_XXH32_testdata[5216] */\n    { 2608, 0x9E3779B1U, 0x7A0EA04FU }, /* XSUM_XXH32_testdata[5217] */\n    { 2609, 0x00000000U, 0x266D2A26U }, /* XSUM_XXH32_testdata[5218] */\n    { 2609, 0x9E3779B1U, 0x60D9C6FAU }, /* XSUM_XXH32_testdata[5219] */\n    { 2610, 0x00000000U, 0x46D08D97U }, /* XSUM_XXH32_testdata[5220] */\n    { 2610, 0x9E3779B1U, 0xC4DA710AU }, /* XSUM_XXH32_testdata[5221] */\n    { 2611, 0x00000000U, 0x94B7EAA8U }, /* XSUM_XXH32_testdata[5222] */\n    { 2611, 0x9E3779B1U, 0xB5140456U }, /* XSUM_XXH32_testdata[5223] */\n    { 2612, 0x00000000U, 0xA16CC5CAU }, /* XSUM_XXH32_testdata[5224] */\n    { 2612, 0x9E3779B1U, 0x0579FFFAU }, /* XSUM_XXH32_testdata[5225] */\n    { 2613, 0x00000000U, 0x1506CC2CU }, /* XSUM_XXH32_testdata[5226] */\n    { 2613, 0x9E3779B1U, 0x18EFF4DFU }, /* XSUM_XXH32_testdata[5227] */\n    { 2614, 0x00000000U, 0xED5C7F33U }, /* XSUM_XXH32_testdata[5228] */\n    { 2614, 0x9E3779B1U, 0x8B398C71U }, /* XSUM_XXH32_testdata[5229] */\n    { 2615, 0x00000000U, 0xC9F9F086U }, /* XSUM_XXH32_testdata[5230] */\n    { 2615, 0x9E3779B1U, 0x0149AC29U }, /* XSUM_XXH32_testdata[5231] */\n    { 2616, 0x00000000U, 0x0BC9D6D6U }, /* XSUM_XXH32_testdata[5232] */\n    { 2616, 0x9E3779B1U, 0x09DD4562U }, /* XSUM_XXH32_testdata[5233] */\n    { 2617, 0x00000000U, 0xA6ECDE67U }, /* XSUM_XXH32_testdata[5234] */\n    { 2617, 0x9E3779B1U, 0x87D85AC8U }, /* XSUM_XXH32_testdata[5235] */\n    { 2618, 0x00000000U, 0x6F24D814U }, /* XSUM_XXH32_testdata[5236] */\n    { 2618, 0x9E3779B1U, 0xC1778CE5U }, /* XSUM_XXH32_testdata[5237] */\n    { 2619, 0x00000000U, 0xDEE74062U }, /* XSUM_XXH32_testdata[5238] */\n    { 2619, 0x9E3779B1U, 0xA13874B9U }, /* XSUM_XXH32_testdata[5239] */\n    { 2620, 0x00000000U, 0x935BF986U }, /* XSUM_XXH32_testdata[5240] */\n    { 2620, 0x9E3779B1U, 0x105E8B4AU }, /* XSUM_XXH32_testdata[5241] */\n    { 2621, 0x00000000U, 0x2B8941E8U }, /* XSUM_XXH32_testdata[5242] */\n    { 2621, 0x9E3779B1U, 0x1987630FU }, /* XSUM_XXH32_testdata[5243] */\n    { 2622, 0x00000000U, 0xD5B55ED9U }, /* XSUM_XXH32_testdata[5244] */\n    { 2622, 0x9E3779B1U, 0x558D1D07U }, /* XSUM_XXH32_testdata[5245] */\n    { 2623, 0x00000000U, 0x4B90FD59U }, /* XSUM_XXH32_testdata[5246] */\n    { 2623, 0x9E3779B1U, 0x7174560EU }, /* XSUM_XXH32_testdata[5247] */\n    { 2624, 0x00000000U, 0x819572F5U }, /* XSUM_XXH32_testdata[5248] */\n    { 2624, 0x9E3779B1U, 0x2ADEBAFDU }, /* XSUM_XXH32_testdata[5249] */\n    { 2625, 0x00000000U, 0x7FF479D5U }, /* XSUM_XXH32_testdata[5250] */\n    { 2625, 0x9E3779B1U, 0x316797DAU }, /* XSUM_XXH32_testdata[5251] */\n    { 2626, 0x00000000U, 0x9CA96662U }, /* XSUM_XXH32_testdata[5252] */\n    { 2626, 0x9E3779B1U, 0xF5640CB8U }, /* XSUM_XXH32_testdata[5253] */\n    { 2627, 0x00000000U, 0xDB9DC926U }, /* XSUM_XXH32_testdata[5254] */\n    { 2627, 0x9E3779B1U, 0x6C4A6A53U }, /* XSUM_XXH32_testdata[5255] */\n    { 2628, 0x00000000U, 0x3253A88DU }, /* XSUM_XXH32_testdata[5256] */\n    { 2628, 0x9E3779B1U, 0xA0FAD05EU }, /* XSUM_XXH32_testdata[5257] */\n    { 2629, 0x00000000U, 0xB216A6C4U }, /* XSUM_XXH32_testdata[5258] */\n    { 2629, 0x9E3779B1U, 0x86743372U }, /* XSUM_XXH32_testdata[5259] */\n    { 2630, 0x00000000U, 0x5675D3D6U }, /* XSUM_XXH32_testdata[5260] */\n    { 2630, 0x9E3779B1U, 0xA48FCF88U }, /* XSUM_XXH32_testdata[5261] */\n    { 2631, 0x00000000U, 0x29C3CF00U }, /* XSUM_XXH32_testdata[5262] */\n    { 2631, 0x9E3779B1U, 0x744F824FU }, /* XSUM_XXH32_testdata[5263] */\n    { 2632, 0x00000000U, 0xFFE94921U }, /* XSUM_XXH32_testdata[5264] */\n    { 2632, 0x9E3779B1U, 0x7A2AD348U }, /* XSUM_XXH32_testdata[5265] */\n    { 2633, 0x00000000U, 0x8ED862F3U }, /* XSUM_XXH32_testdata[5266] */\n    { 2633, 0x9E3779B1U, 0xEF43D56CU }, /* XSUM_XXH32_testdata[5267] */\n    { 2634, 0x00000000U, 0x79B104B1U }, /* XSUM_XXH32_testdata[5268] */\n    { 2634, 0x9E3779B1U, 0x5996D647U }, /* XSUM_XXH32_testdata[5269] */\n    { 2635, 0x00000000U, 0x6E8F6903U }, /* XSUM_XXH32_testdata[5270] */\n    { 2635, 0x9E3779B1U, 0x17B9C1DFU }, /* XSUM_XXH32_testdata[5271] */\n    { 2636, 0x00000000U, 0x147555C3U }, /* XSUM_XXH32_testdata[5272] */\n    { 2636, 0x9E3779B1U, 0x84E2C5A8U }, /* XSUM_XXH32_testdata[5273] */\n    { 2637, 0x00000000U, 0x5AFDD73CU }, /* XSUM_XXH32_testdata[5274] */\n    { 2637, 0x9E3779B1U, 0xBF3F9C0EU }, /* XSUM_XXH32_testdata[5275] */\n    { 2638, 0x00000000U, 0x0EF90C7EU }, /* XSUM_XXH32_testdata[5276] */\n    { 2638, 0x9E3779B1U, 0xCDC67BAEU }, /* XSUM_XXH32_testdata[5277] */\n    { 2639, 0x00000000U, 0xA64BB85EU }, /* XSUM_XXH32_testdata[5278] */\n    { 2639, 0x9E3779B1U, 0xE96E9BA0U }, /* XSUM_XXH32_testdata[5279] */\n    { 2640, 0x00000000U, 0x28DFAE9AU }, /* XSUM_XXH32_testdata[5280] */\n    { 2640, 0x9E3779B1U, 0xD42DC543U }, /* XSUM_XXH32_testdata[5281] */\n    { 2641, 0x00000000U, 0xF10ACA82U }, /* XSUM_XXH32_testdata[5282] */\n    { 2641, 0x9E3779B1U, 0x38BAB76EU }, /* XSUM_XXH32_testdata[5283] */\n    { 2642, 0x00000000U, 0xB1958BE4U }, /* XSUM_XXH32_testdata[5284] */\n    { 2642, 0x9E3779B1U, 0xCAF2760FU }, /* XSUM_XXH32_testdata[5285] */\n    { 2643, 0x00000000U, 0x2EC97AD3U }, /* XSUM_XXH32_testdata[5286] */\n    { 2643, 0x9E3779B1U, 0xC4D00FC1U }, /* XSUM_XXH32_testdata[5287] */\n    { 2644, 0x00000000U, 0xEE0453E5U }, /* XSUM_XXH32_testdata[5288] */\n    { 2644, 0x9E3779B1U, 0xFBECD6EEU }, /* XSUM_XXH32_testdata[5289] */\n    { 2645, 0x00000000U, 0x89C63061U }, /* XSUM_XXH32_testdata[5290] */\n    { 2645, 0x9E3779B1U, 0x2FBDEC89U }, /* XSUM_XXH32_testdata[5291] */\n    { 2646, 0x00000000U, 0xADF740ACU }, /* XSUM_XXH32_testdata[5292] */\n    { 2646, 0x9E3779B1U, 0x8E60E397U }, /* XSUM_XXH32_testdata[5293] */\n    { 2647, 0x00000000U, 0x67DDA68EU }, /* XSUM_XXH32_testdata[5294] */\n    { 2647, 0x9E3779B1U, 0xBA2934E0U }, /* XSUM_XXH32_testdata[5295] */\n    { 2648, 0x00000000U, 0x5425D298U }, /* XSUM_XXH32_testdata[5296] */\n    { 2648, 0x9E3779B1U, 0xF4B9737FU }, /* XSUM_XXH32_testdata[5297] */\n    { 2649, 0x00000000U, 0x65390777U }, /* XSUM_XXH32_testdata[5298] */\n    { 2649, 0x9E3779B1U, 0x79237015U }, /* XSUM_XXH32_testdata[5299] */\n    { 2650, 0x00000000U, 0x3E1D5015U }, /* XSUM_XXH32_testdata[5300] */\n    { 2650, 0x9E3779B1U, 0xEAEF8B71U }, /* XSUM_XXH32_testdata[5301] */\n    { 2651, 0x00000000U, 0xE4ABFBF2U }, /* XSUM_XXH32_testdata[5302] */\n    { 2651, 0x9E3779B1U, 0xE280D30FU }, /* XSUM_XXH32_testdata[5303] */\n    { 2652, 0x00000000U, 0xE3FAC3F0U }, /* XSUM_XXH32_testdata[5304] */\n    { 2652, 0x9E3779B1U, 0x47DB7B3CU }, /* XSUM_XXH32_testdata[5305] */\n    { 2653, 0x00000000U, 0x0829971DU }, /* XSUM_XXH32_testdata[5306] */\n    { 2653, 0x9E3779B1U, 0xA515CF6CU }, /* XSUM_XXH32_testdata[5307] */\n    { 2654, 0x00000000U, 0x63FE1B1EU }, /* XSUM_XXH32_testdata[5308] */\n    { 2654, 0x9E3779B1U, 0x80D208D6U }, /* XSUM_XXH32_testdata[5309] */\n    { 2655, 0x00000000U, 0x345AC2C8U }, /* XSUM_XXH32_testdata[5310] */\n    { 2655, 0x9E3779B1U, 0x55214C47U }, /* XSUM_XXH32_testdata[5311] */\n    { 2656, 0x00000000U, 0x728C3834U }, /* XSUM_XXH32_testdata[5312] */\n    { 2656, 0x9E3779B1U, 0xF24FCD50U }, /* XSUM_XXH32_testdata[5313] */\n    { 2657, 0x00000000U, 0xF7D04B18U }, /* XSUM_XXH32_testdata[5314] */\n    { 2657, 0x9E3779B1U, 0x09A5503BU }, /* XSUM_XXH32_testdata[5315] */\n    { 2658, 0x00000000U, 0xE5F59CD4U }, /* XSUM_XXH32_testdata[5316] */\n    { 2658, 0x9E3779B1U, 0xB9F629E2U }, /* XSUM_XXH32_testdata[5317] */\n    { 2659, 0x00000000U, 0x91819CE5U }, /* XSUM_XXH32_testdata[5318] */\n    { 2659, 0x9E3779B1U, 0xB26BA83BU }, /* XSUM_XXH32_testdata[5319] */\n    { 2660, 0x00000000U, 0x386059D9U }, /* XSUM_XXH32_testdata[5320] */\n    { 2660, 0x9E3779B1U, 0x9F695DE7U }, /* XSUM_XXH32_testdata[5321] */\n    { 2661, 0x00000000U, 0x35755CCBU }, /* XSUM_XXH32_testdata[5322] */\n    { 2661, 0x9E3779B1U, 0x8E9E3C73U }, /* XSUM_XXH32_testdata[5323] */\n    { 2662, 0x00000000U, 0x296ED7F5U }, /* XSUM_XXH32_testdata[5324] */\n    { 2662, 0x9E3779B1U, 0x3B09C74DU }, /* XSUM_XXH32_testdata[5325] */\n    { 2663, 0x00000000U, 0xEBBEFEBAU }, /* XSUM_XXH32_testdata[5326] */\n    { 2663, 0x9E3779B1U, 0xCAE4636CU }, /* XSUM_XXH32_testdata[5327] */\n    { 2664, 0x00000000U, 0x9069B173U }, /* XSUM_XXH32_testdata[5328] */\n    { 2664, 0x9E3779B1U, 0x54F2649BU }, /* XSUM_XXH32_testdata[5329] */\n    { 2665, 0x00000000U, 0x466182B7U }, /* XSUM_XXH32_testdata[5330] */\n    { 2665, 0x9E3779B1U, 0xD35EBF1CU }, /* XSUM_XXH32_testdata[5331] */\n    { 2666, 0x00000000U, 0x3E076B02U }, /* XSUM_XXH32_testdata[5332] */\n    { 2666, 0x9E3779B1U, 0xB53173B8U }, /* XSUM_XXH32_testdata[5333] */\n    { 2667, 0x00000000U, 0x87A62EE5U }, /* XSUM_XXH32_testdata[5334] */\n    { 2667, 0x9E3779B1U, 0xC71A70A9U }, /* XSUM_XXH32_testdata[5335] */\n    { 2668, 0x00000000U, 0x19FA51B7U }, /* XSUM_XXH32_testdata[5336] */\n    { 2668, 0x9E3779B1U, 0x5DE5FB17U }, /* XSUM_XXH32_testdata[5337] */\n    { 2669, 0x00000000U, 0xBF6DD183U }, /* XSUM_XXH32_testdata[5338] */\n    { 2669, 0x9E3779B1U, 0x6F2E3E6BU }, /* XSUM_XXH32_testdata[5339] */\n    { 2670, 0x00000000U, 0xFEC8B9C5U }, /* XSUM_XXH32_testdata[5340] */\n    { 2670, 0x9E3779B1U, 0x81523330U }, /* XSUM_XXH32_testdata[5341] */\n    { 2671, 0x00000000U, 0x128F0CF7U }, /* XSUM_XXH32_testdata[5342] */\n    { 2671, 0x9E3779B1U, 0x71D3FE04U }, /* XSUM_XXH32_testdata[5343] */\n    { 2672, 0x00000000U, 0xDC954677U }, /* XSUM_XXH32_testdata[5344] */\n    { 2672, 0x9E3779B1U, 0x14D1AEC6U }, /* XSUM_XXH32_testdata[5345] */\n    { 2673, 0x00000000U, 0x1F9C8546U }, /* XSUM_XXH32_testdata[5346] */\n    { 2673, 0x9E3779B1U, 0x72873EECU }, /* XSUM_XXH32_testdata[5347] */\n    { 2674, 0x00000000U, 0xAA8C6432U }, /* XSUM_XXH32_testdata[5348] */\n    { 2674, 0x9E3779B1U, 0x04FD8FF0U }, /* XSUM_XXH32_testdata[5349] */\n    { 2675, 0x00000000U, 0xC5D6F479U }, /* XSUM_XXH32_testdata[5350] */\n    { 2675, 0x9E3779B1U, 0xA06A12AEU }, /* XSUM_XXH32_testdata[5351] */\n    { 2676, 0x00000000U, 0x78436351U }, /* XSUM_XXH32_testdata[5352] */\n    { 2676, 0x9E3779B1U, 0xA9966893U }, /* XSUM_XXH32_testdata[5353] */\n    { 2677, 0x00000000U, 0x7B747ED2U }, /* XSUM_XXH32_testdata[5354] */\n    { 2677, 0x9E3779B1U, 0x54487A50U }, /* XSUM_XXH32_testdata[5355] */\n    { 2678, 0x00000000U, 0x00C30B81U }, /* XSUM_XXH32_testdata[5356] */\n    { 2678, 0x9E3779B1U, 0x511DD715U }, /* XSUM_XXH32_testdata[5357] */\n    { 2679, 0x00000000U, 0xC21D907DU }, /* XSUM_XXH32_testdata[5358] */\n    { 2679, 0x9E3779B1U, 0x931E5DC7U }, /* XSUM_XXH32_testdata[5359] */\n    { 2680, 0x00000000U, 0x23DCC170U }, /* XSUM_XXH32_testdata[5360] */\n    { 2680, 0x9E3779B1U, 0xAE6B07C2U }, /* XSUM_XXH32_testdata[5361] */\n    { 2681, 0x00000000U, 0x61289FF0U }, /* XSUM_XXH32_testdata[5362] */\n    { 2681, 0x9E3779B1U, 0x430C1894U }, /* XSUM_XXH32_testdata[5363] */\n    { 2682, 0x00000000U, 0x6467A6D4U }, /* XSUM_XXH32_testdata[5364] */\n    { 2682, 0x9E3779B1U, 0xBAC82073U }, /* XSUM_XXH32_testdata[5365] */\n    { 2683, 0x00000000U, 0x9C3AF95BU }, /* XSUM_XXH32_testdata[5366] */\n    { 2683, 0x9E3779B1U, 0x600880A9U }, /* XSUM_XXH32_testdata[5367] */\n    { 2684, 0x00000000U, 0x883BF584U }, /* XSUM_XXH32_testdata[5368] */\n    { 2684, 0x9E3779B1U, 0xD23A72C2U }, /* XSUM_XXH32_testdata[5369] */\n    { 2685, 0x00000000U, 0x4283CB47U }, /* XSUM_XXH32_testdata[5370] */\n    { 2685, 0x9E3779B1U, 0xF4643357U }, /* XSUM_XXH32_testdata[5371] */\n    { 2686, 0x00000000U, 0x775547D9U }, /* XSUM_XXH32_testdata[5372] */\n    { 2686, 0x9E3779B1U, 0xFAA2E46EU }, /* XSUM_XXH32_testdata[5373] */\n    { 2687, 0x00000000U, 0xA8F45C39U }, /* XSUM_XXH32_testdata[5374] */\n    { 2687, 0x9E3779B1U, 0x20E0FCD6U }, /* XSUM_XXH32_testdata[5375] */\n    { 2688, 0x00000000U, 0x3D03700BU }, /* XSUM_XXH32_testdata[5376] */\n    { 2688, 0x9E3779B1U, 0x53452CDBU }, /* XSUM_XXH32_testdata[5377] */\n    { 2689, 0x00000000U, 0xBDD6E7E9U }, /* XSUM_XXH32_testdata[5378] */\n    { 2689, 0x9E3779B1U, 0x427DE32BU }, /* XSUM_XXH32_testdata[5379] */\n    { 2690, 0x00000000U, 0x48D79403U }, /* XSUM_XXH32_testdata[5380] */\n    { 2690, 0x9E3779B1U, 0xC1E8052AU }, /* XSUM_XXH32_testdata[5381] */\n    { 2691, 0x00000000U, 0x6724D420U }, /* XSUM_XXH32_testdata[5382] */\n    { 2691, 0x9E3779B1U, 0x6658D971U }, /* XSUM_XXH32_testdata[5383] */\n    { 2692, 0x00000000U, 0x34410C1CU }, /* XSUM_XXH32_testdata[5384] */\n    { 2692, 0x9E3779B1U, 0x61CF4F0DU }, /* XSUM_XXH32_testdata[5385] */\n    { 2693, 0x00000000U, 0x78330DFCU }, /* XSUM_XXH32_testdata[5386] */\n    { 2693, 0x9E3779B1U, 0x7366F99EU }, /* XSUM_XXH32_testdata[5387] */\n    { 2694, 0x00000000U, 0x6A6BC845U }, /* XSUM_XXH32_testdata[5388] */\n    { 2694, 0x9E3779B1U, 0x113DA139U }, /* XSUM_XXH32_testdata[5389] */\n    { 2695, 0x00000000U, 0x870BA124U }, /* XSUM_XXH32_testdata[5390] */\n    { 2695, 0x9E3779B1U, 0xE779D60DU }, /* XSUM_XXH32_testdata[5391] */\n    { 2696, 0x00000000U, 0xF11ABFF6U }, /* XSUM_XXH32_testdata[5392] */\n    { 2696, 0x9E3779B1U, 0x4B8BF8C6U }, /* XSUM_XXH32_testdata[5393] */\n    { 2697, 0x00000000U, 0x6661B68CU }, /* XSUM_XXH32_testdata[5394] */\n    { 2697, 0x9E3779B1U, 0xF777EE84U }, /* XSUM_XXH32_testdata[5395] */\n    { 2698, 0x00000000U, 0xB705B4BDU }, /* XSUM_XXH32_testdata[5396] */\n    { 2698, 0x9E3779B1U, 0x8EFBED1DU }, /* XSUM_XXH32_testdata[5397] */\n    { 2699, 0x00000000U, 0x25D23917U }, /* XSUM_XXH32_testdata[5398] */\n    { 2699, 0x9E3779B1U, 0xD602C138U }, /* XSUM_XXH32_testdata[5399] */\n    { 2700, 0x00000000U, 0x96D45C73U }, /* XSUM_XXH32_testdata[5400] */\n    { 2700, 0x9E3779B1U, 0x7B6D5D92U }, /* XSUM_XXH32_testdata[5401] */\n    { 2701, 0x00000000U, 0x2404B012U }, /* XSUM_XXH32_testdata[5402] */\n    { 2701, 0x9E3779B1U, 0xF80257D4U }, /* XSUM_XXH32_testdata[5403] */\n    { 2702, 0x00000000U, 0xB3BB7ED1U }, /* XSUM_XXH32_testdata[5404] */\n    { 2702, 0x9E3779B1U, 0x8751A09EU }, /* XSUM_XXH32_testdata[5405] */\n    { 2703, 0x00000000U, 0x406E0E4EU }, /* XSUM_XXH32_testdata[5406] */\n    { 2703, 0x9E3779B1U, 0x7AC0153FU }, /* XSUM_XXH32_testdata[5407] */\n    { 2704, 0x00000000U, 0xB2B82914U }, /* XSUM_XXH32_testdata[5408] */\n    { 2704, 0x9E3779B1U, 0xA0D20F9EU }, /* XSUM_XXH32_testdata[5409] */\n    { 2705, 0x00000000U, 0x1D0F4FFAU }, /* XSUM_XXH32_testdata[5410] */\n    { 2705, 0x9E3779B1U, 0xC7FD7E08U }, /* XSUM_XXH32_testdata[5411] */\n    { 2706, 0x00000000U, 0x132C7D2AU }, /* XSUM_XXH32_testdata[5412] */\n    { 2706, 0x9E3779B1U, 0xDD1FBC98U }, /* XSUM_XXH32_testdata[5413] */\n    { 2707, 0x00000000U, 0xB2F7BCBAU }, /* XSUM_XXH32_testdata[5414] */\n    { 2707, 0x9E3779B1U, 0xF037EF59U }, /* XSUM_XXH32_testdata[5415] */\n    { 2708, 0x00000000U, 0x9D308CA4U }, /* XSUM_XXH32_testdata[5416] */\n    { 2708, 0x9E3779B1U, 0xB2843B4DU }, /* XSUM_XXH32_testdata[5417] */\n    { 2709, 0x00000000U, 0x294E4D94U }, /* XSUM_XXH32_testdata[5418] */\n    { 2709, 0x9E3779B1U, 0x77E7910DU }, /* XSUM_XXH32_testdata[5419] */\n    { 2710, 0x00000000U, 0x538C9176U }, /* XSUM_XXH32_testdata[5420] */\n    { 2710, 0x9E3779B1U, 0xD89C74B6U }, /* XSUM_XXH32_testdata[5421] */\n    { 2711, 0x00000000U, 0xF850B7E3U }, /* XSUM_XXH32_testdata[5422] */\n    { 2711, 0x9E3779B1U, 0xA9EAEFEAU }, /* XSUM_XXH32_testdata[5423] */\n    { 2712, 0x00000000U, 0x59A65DF2U }, /* XSUM_XXH32_testdata[5424] */\n    { 2712, 0x9E3779B1U, 0xE1E2DDC5U }, /* XSUM_XXH32_testdata[5425] */\n    { 2713, 0x00000000U, 0x96F15385U }, /* XSUM_XXH32_testdata[5426] */\n    { 2713, 0x9E3779B1U, 0xB5658981U }, /* XSUM_XXH32_testdata[5427] */\n    { 2714, 0x00000000U, 0xF5D23C46U }, /* XSUM_XXH32_testdata[5428] */\n    { 2714, 0x9E3779B1U, 0xCFC11CD5U }, /* XSUM_XXH32_testdata[5429] */\n    { 2715, 0x00000000U, 0xC50611ADU }, /* XSUM_XXH32_testdata[5430] */\n    { 2715, 0x9E3779B1U, 0x489ADED0U }, /* XSUM_XXH32_testdata[5431] */\n    { 2716, 0x00000000U, 0x9B9FC940U }, /* XSUM_XXH32_testdata[5432] */\n    { 2716, 0x9E3779B1U, 0x6A23E943U }, /* XSUM_XXH32_testdata[5433] */\n    { 2717, 0x00000000U, 0xF0BB20F0U }, /* XSUM_XXH32_testdata[5434] */\n    { 2717, 0x9E3779B1U, 0x8B640A2AU }, /* XSUM_XXH32_testdata[5435] */\n    { 2718, 0x00000000U, 0xE5B2613CU }, /* XSUM_XXH32_testdata[5436] */\n    { 2718, 0x9E3779B1U, 0x68D0ACDCU }, /* XSUM_XXH32_testdata[5437] */\n    { 2719, 0x00000000U, 0x168B4FFCU }, /* XSUM_XXH32_testdata[5438] */\n    { 2719, 0x9E3779B1U, 0x99AC56D5U }, /* XSUM_XXH32_testdata[5439] */\n    { 2720, 0x00000000U, 0x1C967381U }, /* XSUM_XXH32_testdata[5440] */\n    { 2720, 0x9E3779B1U, 0xA0C87AB2U }, /* XSUM_XXH32_testdata[5441] */\n    { 2721, 0x00000000U, 0x3B941315U }, /* XSUM_XXH32_testdata[5442] */\n    { 2721, 0x9E3779B1U, 0xD91E6380U }, /* XSUM_XXH32_testdata[5443] */\n    { 2722, 0x00000000U, 0x3FA50533U }, /* XSUM_XXH32_testdata[5444] */\n    { 2722, 0x9E3779B1U, 0x9E249CCDU }, /* XSUM_XXH32_testdata[5445] */\n    { 2723, 0x00000000U, 0x866AFD00U }, /* XSUM_XXH32_testdata[5446] */\n    { 2723, 0x9E3779B1U, 0x2CC6E1E5U }, /* XSUM_XXH32_testdata[5447] */\n    { 2724, 0x00000000U, 0x47D70775U }, /* XSUM_XXH32_testdata[5448] */\n    { 2724, 0x9E3779B1U, 0x0AE88051U }, /* XSUM_XXH32_testdata[5449] */\n    { 2725, 0x00000000U, 0xCD1BA69FU }, /* XSUM_XXH32_testdata[5450] */\n    { 2725, 0x9E3779B1U, 0x96DECF85U }, /* XSUM_XXH32_testdata[5451] */\n    { 2726, 0x00000000U, 0xA8625423U }, /* XSUM_XXH32_testdata[5452] */\n    { 2726, 0x9E3779B1U, 0xA2410F18U }, /* XSUM_XXH32_testdata[5453] */\n    { 2727, 0x00000000U, 0x38195889U }, /* XSUM_XXH32_testdata[5454] */\n    { 2727, 0x9E3779B1U, 0x4BD38529U }, /* XSUM_XXH32_testdata[5455] */\n    { 2728, 0x00000000U, 0x070F89C8U }, /* XSUM_XXH32_testdata[5456] */\n    { 2728, 0x9E3779B1U, 0xDF06AF11U }, /* XSUM_XXH32_testdata[5457] */\n    { 2729, 0x00000000U, 0x8E80915AU }, /* XSUM_XXH32_testdata[5458] */\n    { 2729, 0x9E3779B1U, 0x4A06DCA0U }, /* XSUM_XXH32_testdata[5459] */\n    { 2730, 0x00000000U, 0xBC112A49U }, /* XSUM_XXH32_testdata[5460] */\n    { 2730, 0x9E3779B1U, 0x05C9CC27U }, /* XSUM_XXH32_testdata[5461] */\n    { 2731, 0x00000000U, 0xA1B81A7EU }, /* XSUM_XXH32_testdata[5462] */\n    { 2731, 0x9E3779B1U, 0xB3633441U }, /* XSUM_XXH32_testdata[5463] */\n    { 2732, 0x00000000U, 0xD4268862U }, /* XSUM_XXH32_testdata[5464] */\n    { 2732, 0x9E3779B1U, 0x3E627514U }, /* XSUM_XXH32_testdata[5465] */\n    { 2733, 0x00000000U, 0x5593FD89U }, /* XSUM_XXH32_testdata[5466] */\n    { 2733, 0x9E3779B1U, 0xCA01BBF0U }, /* XSUM_XXH32_testdata[5467] */\n    { 2734, 0x00000000U, 0x851FDB7DU }, /* XSUM_XXH32_testdata[5468] */\n    { 2734, 0x9E3779B1U, 0xB7DE2200U }, /* XSUM_XXH32_testdata[5469] */\n    { 2735, 0x00000000U, 0xA0230D8AU }, /* XSUM_XXH32_testdata[5470] */\n    { 2735, 0x9E3779B1U, 0x4C98ECC3U }, /* XSUM_XXH32_testdata[5471] */\n    { 2736, 0x00000000U, 0x91523E73U }, /* XSUM_XXH32_testdata[5472] */\n    { 2736, 0x9E3779B1U, 0x45AD598CU }, /* XSUM_XXH32_testdata[5473] */\n    { 2737, 0x00000000U, 0xBF5C144EU }, /* XSUM_XXH32_testdata[5474] */\n    { 2737, 0x9E3779B1U, 0xF0A520B6U }, /* XSUM_XXH32_testdata[5475] */\n    { 2738, 0x00000000U, 0x55D29805U }, /* XSUM_XXH32_testdata[5476] */\n    { 2738, 0x9E3779B1U, 0x7E76F531U }, /* XSUM_XXH32_testdata[5477] */\n    { 2739, 0x00000000U, 0xE77D999EU }, /* XSUM_XXH32_testdata[5478] */\n    { 2739, 0x9E3779B1U, 0x97489CB6U }, /* XSUM_XXH32_testdata[5479] */\n    { 2740, 0x00000000U, 0xC08CF749U }, /* XSUM_XXH32_testdata[5480] */\n    { 2740, 0x9E3779B1U, 0x54BBEB2EU }, /* XSUM_XXH32_testdata[5481] */\n    { 2741, 0x00000000U, 0x23664C44U }, /* XSUM_XXH32_testdata[5482] */\n    { 2741, 0x9E3779B1U, 0x3247CE9AU }, /* XSUM_XXH32_testdata[5483] */\n    { 2742, 0x00000000U, 0x5FF2A503U }, /* XSUM_XXH32_testdata[5484] */\n    { 2742, 0x9E3779B1U, 0x8C517D75U }, /* XSUM_XXH32_testdata[5485] */\n    { 2743, 0x00000000U, 0x6167CF50U }, /* XSUM_XXH32_testdata[5486] */\n    { 2743, 0x9E3779B1U, 0x0E019D74U }, /* XSUM_XXH32_testdata[5487] */\n    { 2744, 0x00000000U, 0x54917AA2U }, /* XSUM_XXH32_testdata[5488] */\n    { 2744, 0x9E3779B1U, 0xB54B21B8U }, /* XSUM_XXH32_testdata[5489] */\n    { 2745, 0x00000000U, 0x7B8C955DU }, /* XSUM_XXH32_testdata[5490] */\n    { 2745, 0x9E3779B1U, 0x9003306DU }, /* XSUM_XXH32_testdata[5491] */\n    { 2746, 0x00000000U, 0xBF41C4B3U }, /* XSUM_XXH32_testdata[5492] */\n    { 2746, 0x9E3779B1U, 0xE42BCDF3U }, /* XSUM_XXH32_testdata[5493] */\n    { 2747, 0x00000000U, 0xECAF5690U }, /* XSUM_XXH32_testdata[5494] */\n    { 2747, 0x9E3779B1U, 0x8F078525U }, /* XSUM_XXH32_testdata[5495] */\n    { 2748, 0x00000000U, 0x649FBA7FU }, /* XSUM_XXH32_testdata[5496] */\n    { 2748, 0x9E3779B1U, 0x3891C62EU }, /* XSUM_XXH32_testdata[5497] */\n    { 2749, 0x00000000U, 0x92F8A489U }, /* XSUM_XXH32_testdata[5498] */\n    { 2749, 0x9E3779B1U, 0x9ED412CDU }, /* XSUM_XXH32_testdata[5499] */\n    { 2750, 0x00000000U, 0x5D6125DBU }, /* XSUM_XXH32_testdata[5500] */\n    { 2750, 0x9E3779B1U, 0xC04AD3C5U }, /* XSUM_XXH32_testdata[5501] */\n    { 2751, 0x00000000U, 0xDA1B2BBAU }, /* XSUM_XXH32_testdata[5502] */\n    { 2751, 0x9E3779B1U, 0xCD87B55CU }, /* XSUM_XXH32_testdata[5503] */\n    { 2752, 0x00000000U, 0x5D54F5CFU }, /* XSUM_XXH32_testdata[5504] */\n    { 2752, 0x9E3779B1U, 0x1CA0D0CFU }, /* XSUM_XXH32_testdata[5505] */\n    { 2753, 0x00000000U, 0x38093FF9U }, /* XSUM_XXH32_testdata[5506] */\n    { 2753, 0x9E3779B1U, 0x8DAFB0D3U }, /* XSUM_XXH32_testdata[5507] */\n    { 2754, 0x00000000U, 0xC8289512U }, /* XSUM_XXH32_testdata[5508] */\n    { 2754, 0x9E3779B1U, 0x5F94DF3BU }, /* XSUM_XXH32_testdata[5509] */\n    { 2755, 0x00000000U, 0x80111DEEU }, /* XSUM_XXH32_testdata[5510] */\n    { 2755, 0x9E3779B1U, 0xACBEEEE5U }, /* XSUM_XXH32_testdata[5511] */\n    { 2756, 0x00000000U, 0x6DA1C5D4U }, /* XSUM_XXH32_testdata[5512] */\n    { 2756, 0x9E3779B1U, 0x8EC6544EU }, /* XSUM_XXH32_testdata[5513] */\n    { 2757, 0x00000000U, 0xFB1AF805U }, /* XSUM_XXH32_testdata[5514] */\n    { 2757, 0x9E3779B1U, 0xC454EF93U }, /* XSUM_XXH32_testdata[5515] */\n    { 2758, 0x00000000U, 0x292A653DU }, /* XSUM_XXH32_testdata[5516] */\n    { 2758, 0x9E3779B1U, 0x103F2718U }, /* XSUM_XXH32_testdata[5517] */\n    { 2759, 0x00000000U, 0x8AFD632FU }, /* XSUM_XXH32_testdata[5518] */\n    { 2759, 0x9E3779B1U, 0xD6D5797CU }, /* XSUM_XXH32_testdata[5519] */\n    { 2760, 0x00000000U, 0x12DB2265U }, /* XSUM_XXH32_testdata[5520] */\n    { 2760, 0x9E3779B1U, 0x8FCCDBF8U }, /* XSUM_XXH32_testdata[5521] */\n    { 2761, 0x00000000U, 0x5ADE7086U }, /* XSUM_XXH32_testdata[5522] */\n    { 2761, 0x9E3779B1U, 0x48E1E9A1U }, /* XSUM_XXH32_testdata[5523] */\n    { 2762, 0x00000000U, 0xAC10836EU }, /* XSUM_XXH32_testdata[5524] */\n    { 2762, 0x9E3779B1U, 0x1FF522F5U }, /* XSUM_XXH32_testdata[5525] */\n    { 2763, 0x00000000U, 0x6AA04729U }, /* XSUM_XXH32_testdata[5526] */\n    { 2763, 0x9E3779B1U, 0x55E9EB83U }, /* XSUM_XXH32_testdata[5527] */\n    { 2764, 0x00000000U, 0xDCC2CB34U }, /* XSUM_XXH32_testdata[5528] */\n    { 2764, 0x9E3779B1U, 0xC0422B11U }, /* XSUM_XXH32_testdata[5529] */\n    { 2765, 0x00000000U, 0x744A85FEU }, /* XSUM_XXH32_testdata[5530] */\n    { 2765, 0x9E3779B1U, 0x7831CF41U }, /* XSUM_XXH32_testdata[5531] */\n    { 2766, 0x00000000U, 0xE438101FU }, /* XSUM_XXH32_testdata[5532] */\n    { 2766, 0x9E3779B1U, 0x00C9AF6EU }, /* XSUM_XXH32_testdata[5533] */\n    { 2767, 0x00000000U, 0xB4AFAC85U }, /* XSUM_XXH32_testdata[5534] */\n    { 2767, 0x9E3779B1U, 0xA5015D0FU }, /* XSUM_XXH32_testdata[5535] */\n    { 2768, 0x00000000U, 0xFB673462U }, /* XSUM_XXH32_testdata[5536] */\n    { 2768, 0x9E3779B1U, 0xAD10C891U }, /* XSUM_XXH32_testdata[5537] */\n    { 2769, 0x00000000U, 0x54B334F5U }, /* XSUM_XXH32_testdata[5538] */\n    { 2769, 0x9E3779B1U, 0x57657ABAU }, /* XSUM_XXH32_testdata[5539] */\n    { 2770, 0x00000000U, 0x067159E8U }, /* XSUM_XXH32_testdata[5540] */\n    { 2770, 0x9E3779B1U, 0x570E14C6U }, /* XSUM_XXH32_testdata[5541] */\n    { 2771, 0x00000000U, 0xCF730C58U }, /* XSUM_XXH32_testdata[5542] */\n    { 2771, 0x9E3779B1U, 0xF1BEFB0BU }, /* XSUM_XXH32_testdata[5543] */\n    { 2772, 0x00000000U, 0xA6555537U }, /* XSUM_XXH32_testdata[5544] */\n    { 2772, 0x9E3779B1U, 0x44986ACBU }, /* XSUM_XXH32_testdata[5545] */\n    { 2773, 0x00000000U, 0x4CB31427U }, /* XSUM_XXH32_testdata[5546] */\n    { 2773, 0x9E3779B1U, 0xF7F7EA4EU }, /* XSUM_XXH32_testdata[5547] */\n    { 2774, 0x00000000U, 0x8DED665AU }, /* XSUM_XXH32_testdata[5548] */\n    { 2774, 0x9E3779B1U, 0xD0BF38CCU }, /* XSUM_XXH32_testdata[5549] */\n    { 2775, 0x00000000U, 0xB9A7FCE0U }, /* XSUM_XXH32_testdata[5550] */\n    { 2775, 0x9E3779B1U, 0x7C3DBA58U }, /* XSUM_XXH32_testdata[5551] */\n    { 2776, 0x00000000U, 0x6B8A34C2U }, /* XSUM_XXH32_testdata[5552] */\n    { 2776, 0x9E3779B1U, 0xC489B547U }, /* XSUM_XXH32_testdata[5553] */\n    { 2777, 0x00000000U, 0x6A80AC94U }, /* XSUM_XXH32_testdata[5554] */\n    { 2777, 0x9E3779B1U, 0xD3D9B559U }, /* XSUM_XXH32_testdata[5555] */\n    { 2778, 0x00000000U, 0x1EA784DFU }, /* XSUM_XXH32_testdata[5556] */\n    { 2778, 0x9E3779B1U, 0x0F72F335U }, /* XSUM_XXH32_testdata[5557] */\n    { 2779, 0x00000000U, 0xEC658F01U }, /* XSUM_XXH32_testdata[5558] */\n    { 2779, 0x9E3779B1U, 0x50864FBAU }, /* XSUM_XXH32_testdata[5559] */\n    { 2780, 0x00000000U, 0x7BE8A68DU }, /* XSUM_XXH32_testdata[5560] */\n    { 2780, 0x9E3779B1U, 0x6239E532U }, /* XSUM_XXH32_testdata[5561] */\n    { 2781, 0x00000000U, 0xA0C81CFDU }, /* XSUM_XXH32_testdata[5562] */\n    { 2781, 0x9E3779B1U, 0x9625D6DEU }, /* XSUM_XXH32_testdata[5563] */\n    { 2782, 0x00000000U, 0x49DC7164U }, /* XSUM_XXH32_testdata[5564] */\n    { 2782, 0x9E3779B1U, 0x9EA1983AU }, /* XSUM_XXH32_testdata[5565] */\n    { 2783, 0x00000000U, 0xCA12B02EU }, /* XSUM_XXH32_testdata[5566] */\n    { 2783, 0x9E3779B1U, 0xFE2C3732U }, /* XSUM_XXH32_testdata[5567] */\n    { 2784, 0x00000000U, 0xF26C69B4U }, /* XSUM_XXH32_testdata[5568] */\n    { 2784, 0x9E3779B1U, 0x2CE3B4F4U }, /* XSUM_XXH32_testdata[5569] */\n    { 2785, 0x00000000U, 0x9E2A7683U }, /* XSUM_XXH32_testdata[5570] */\n    { 2785, 0x9E3779B1U, 0x03CC5D74U }, /* XSUM_XXH32_testdata[5571] */\n    { 2786, 0x00000000U, 0x7D464299U }, /* XSUM_XXH32_testdata[5572] */\n    { 2786, 0x9E3779B1U, 0xEC2A1AEDU }, /* XSUM_XXH32_testdata[5573] */\n    { 2787, 0x00000000U, 0x37D18702U }, /* XSUM_XXH32_testdata[5574] */\n    { 2787, 0x9E3779B1U, 0x985AAE49U }, /* XSUM_XXH32_testdata[5575] */\n    { 2788, 0x00000000U, 0x09A47F14U }, /* XSUM_XXH32_testdata[5576] */\n    { 2788, 0x9E3779B1U, 0x7F4C942CU }, /* XSUM_XXH32_testdata[5577] */\n    { 2789, 0x00000000U, 0x10275B1BU }, /* XSUM_XXH32_testdata[5578] */\n    { 2789, 0x9E3779B1U, 0x75FF3962U }, /* XSUM_XXH32_testdata[5579] */\n    { 2790, 0x00000000U, 0x921922CCU }, /* XSUM_XXH32_testdata[5580] */\n    { 2790, 0x9E3779B1U, 0x408DAE7AU }, /* XSUM_XXH32_testdata[5581] */\n    { 2791, 0x00000000U, 0x5752654DU }, /* XSUM_XXH32_testdata[5582] */\n    { 2791, 0x9E3779B1U, 0xE2F27F6BU }, /* XSUM_XXH32_testdata[5583] */\n    { 2792, 0x00000000U, 0x545600A6U }, /* XSUM_XXH32_testdata[5584] */\n    { 2792, 0x9E3779B1U, 0x6E72E1DFU }, /* XSUM_XXH32_testdata[5585] */\n    { 2793, 0x00000000U, 0xE0128B8DU }, /* XSUM_XXH32_testdata[5586] */\n    { 2793, 0x9E3779B1U, 0xF726FF9EU }, /* XSUM_XXH32_testdata[5587] */\n    { 2794, 0x00000000U, 0x051387C8U }, /* XSUM_XXH32_testdata[5588] */\n    { 2794, 0x9E3779B1U, 0x90A42546U }, /* XSUM_XXH32_testdata[5589] */\n    { 2795, 0x00000000U, 0xE96E9CC2U }, /* XSUM_XXH32_testdata[5590] */\n    { 2795, 0x9E3779B1U, 0x545F6201U }, /* XSUM_XXH32_testdata[5591] */\n    { 2796, 0x00000000U, 0x2D5C8D96U }, /* XSUM_XXH32_testdata[5592] */\n    { 2796, 0x9E3779B1U, 0x5769B737U }, /* XSUM_XXH32_testdata[5593] */\n    { 2797, 0x00000000U, 0x1ACC992CU }, /* XSUM_XXH32_testdata[5594] */\n    { 2797, 0x9E3779B1U, 0xB2871004U }, /* XSUM_XXH32_testdata[5595] */\n    { 2798, 0x00000000U, 0x64E3753FU }, /* XSUM_XXH32_testdata[5596] */\n    { 2798, 0x9E3779B1U, 0x9E91644EU }, /* XSUM_XXH32_testdata[5597] */\n    { 2799, 0x00000000U, 0xC098EC8CU }, /* XSUM_XXH32_testdata[5598] */\n    { 2799, 0x9E3779B1U, 0xF75A5C44U }, /* XSUM_XXH32_testdata[5599] */\n    { 2800, 0x00000000U, 0x0AEC90EEU }, /* XSUM_XXH32_testdata[5600] */\n    { 2800, 0x9E3779B1U, 0x3483BEAAU }, /* XSUM_XXH32_testdata[5601] */\n    { 2801, 0x00000000U, 0x66C8AF32U }, /* XSUM_XXH32_testdata[5602] */\n    { 2801, 0x9E3779B1U, 0x20257751U }, /* XSUM_XXH32_testdata[5603] */\n    { 2802, 0x00000000U, 0x0208B7C5U }, /* XSUM_XXH32_testdata[5604] */\n    { 2802, 0x9E3779B1U, 0xEE231D12U }, /* XSUM_XXH32_testdata[5605] */\n    { 2803, 0x00000000U, 0x2FB02482U }, /* XSUM_XXH32_testdata[5606] */\n    { 2803, 0x9E3779B1U, 0xBBEEEB6DU }, /* XSUM_XXH32_testdata[5607] */\n    { 2804, 0x00000000U, 0x7455071DU }, /* XSUM_XXH32_testdata[5608] */\n    { 2804, 0x9E3779B1U, 0xB69F8B50U }, /* XSUM_XXH32_testdata[5609] */\n    { 2805, 0x00000000U, 0xAD0079AEU }, /* XSUM_XXH32_testdata[5610] */\n    { 2805, 0x9E3779B1U, 0xED7C62B3U }, /* XSUM_XXH32_testdata[5611] */\n    { 2806, 0x00000000U, 0x0B164DE3U }, /* XSUM_XXH32_testdata[5612] */\n    { 2806, 0x9E3779B1U, 0x929CE95FU }, /* XSUM_XXH32_testdata[5613] */\n    { 2807, 0x00000000U, 0x8129C829U }, /* XSUM_XXH32_testdata[5614] */\n    { 2807, 0x9E3779B1U, 0xEE7F1D68U }, /* XSUM_XXH32_testdata[5615] */\n    { 2808, 0x00000000U, 0x2F31A376U }, /* XSUM_XXH32_testdata[5616] */\n    { 2808, 0x9E3779B1U, 0xEA574A56U }, /* XSUM_XXH32_testdata[5617] */\n    { 2809, 0x00000000U, 0x3DC19066U }, /* XSUM_XXH32_testdata[5618] */\n    { 2809, 0x9E3779B1U, 0xA10720CBU }, /* XSUM_XXH32_testdata[5619] */\n    { 2810, 0x00000000U, 0x413B2F37U }, /* XSUM_XXH32_testdata[5620] */\n    { 2810, 0x9E3779B1U, 0xF5BDA1A6U }, /* XSUM_XXH32_testdata[5621] */\n    { 2811, 0x00000000U, 0x32C6535CU }, /* XSUM_XXH32_testdata[5622] */\n    { 2811, 0x9E3779B1U, 0x75B7D6E5U }, /* XSUM_XXH32_testdata[5623] */\n    { 2812, 0x00000000U, 0xFE287DF2U }, /* XSUM_XXH32_testdata[5624] */\n    { 2812, 0x9E3779B1U, 0x58E50093U }, /* XSUM_XXH32_testdata[5625] */\n    { 2813, 0x00000000U, 0x2E51BC73U }, /* XSUM_XXH32_testdata[5626] */\n    { 2813, 0x9E3779B1U, 0x44718D78U }, /* XSUM_XXH32_testdata[5627] */\n    { 2814, 0x00000000U, 0x96B81EC3U }, /* XSUM_XXH32_testdata[5628] */\n    { 2814, 0x9E3779B1U, 0x6BF333FBU }, /* XSUM_XXH32_testdata[5629] */\n    { 2815, 0x00000000U, 0x1ACD00E5U }, /* XSUM_XXH32_testdata[5630] */\n    { 2815, 0x9E3779B1U, 0xCA53EF2CU }, /* XSUM_XXH32_testdata[5631] */\n    { 2816, 0x00000000U, 0x6BDD0B9CU }, /* XSUM_XXH32_testdata[5632] */\n    { 2816, 0x9E3779B1U, 0x01EE1441U }, /* XSUM_XXH32_testdata[5633] */\n    { 2817, 0x00000000U, 0xD72F2478U }, /* XSUM_XXH32_testdata[5634] */\n    { 2817, 0x9E3779B1U, 0xA648EA45U }, /* XSUM_XXH32_testdata[5635] */\n    { 2818, 0x00000000U, 0xE9E3DFC2U }, /* XSUM_XXH32_testdata[5636] */\n    { 2818, 0x9E3779B1U, 0x3B09D998U }, /* XSUM_XXH32_testdata[5637] */\n    { 2819, 0x00000000U, 0x5BFE487EU }, /* XSUM_XXH32_testdata[5638] */\n    { 2819, 0x9E3779B1U, 0x40E7F952U }, /* XSUM_XXH32_testdata[5639] */\n    { 2820, 0x00000000U, 0x2D077C99U }, /* XSUM_XXH32_testdata[5640] */\n    { 2820, 0x9E3779B1U, 0xB59A99EDU }, /* XSUM_XXH32_testdata[5641] */\n    { 2821, 0x00000000U, 0xAEDF4A0BU }, /* XSUM_XXH32_testdata[5642] */\n    { 2821, 0x9E3779B1U, 0x91D03418U }, /* XSUM_XXH32_testdata[5643] */\n    { 2822, 0x00000000U, 0x5C97CF3EU }, /* XSUM_XXH32_testdata[5644] */\n    { 2822, 0x9E3779B1U, 0x5A6F09DFU }, /* XSUM_XXH32_testdata[5645] */\n    { 2823, 0x00000000U, 0x110E78AFU }, /* XSUM_XXH32_testdata[5646] */\n    { 2823, 0x9E3779B1U, 0x707B42A0U }, /* XSUM_XXH32_testdata[5647] */\n    { 2824, 0x00000000U, 0x07781E1EU }, /* XSUM_XXH32_testdata[5648] */\n    { 2824, 0x9E3779B1U, 0xDE3F08A5U }, /* XSUM_XXH32_testdata[5649] */\n    { 2825, 0x00000000U, 0xF82A8FC4U }, /* XSUM_XXH32_testdata[5650] */\n    { 2825, 0x9E3779B1U, 0x418A4F5DU }, /* XSUM_XXH32_testdata[5651] */\n    { 2826, 0x00000000U, 0x2D0B6892U }, /* XSUM_XXH32_testdata[5652] */\n    { 2826, 0x9E3779B1U, 0x64A44926U }, /* XSUM_XXH32_testdata[5653] */\n    { 2827, 0x00000000U, 0x3370A87CU }, /* XSUM_XXH32_testdata[5654] */\n    { 2827, 0x9E3779B1U, 0x55EEFDBBU }, /* XSUM_XXH32_testdata[5655] */\n    { 2828, 0x00000000U, 0x90FB19E2U }, /* XSUM_XXH32_testdata[5656] */\n    { 2828, 0x9E3779B1U, 0x948565EEU }, /* XSUM_XXH32_testdata[5657] */\n    { 2829, 0x00000000U, 0x59677021U }, /* XSUM_XXH32_testdata[5658] */\n    { 2829, 0x9E3779B1U, 0x93BEFBCAU }, /* XSUM_XXH32_testdata[5659] */\n    { 2830, 0x00000000U, 0xC6E84587U }, /* XSUM_XXH32_testdata[5660] */\n    { 2830, 0x9E3779B1U, 0x47745AC8U }, /* XSUM_XXH32_testdata[5661] */\n    { 2831, 0x00000000U, 0xAC2EBA34U }, /* XSUM_XXH32_testdata[5662] */\n    { 2831, 0x9E3779B1U, 0x18176CA3U }, /* XSUM_XXH32_testdata[5663] */\n    { 2832, 0x00000000U, 0xCFD418B7U }, /* XSUM_XXH32_testdata[5664] */\n    { 2832, 0x9E3779B1U, 0x05243DC9U }, /* XSUM_XXH32_testdata[5665] */\n    { 2833, 0x00000000U, 0x8B9FA14CU }, /* XSUM_XXH32_testdata[5666] */\n    { 2833, 0x9E3779B1U, 0x99EEDC11U }, /* XSUM_XXH32_testdata[5667] */\n    { 2834, 0x00000000U, 0x2F8EA61CU }, /* XSUM_XXH32_testdata[5668] */\n    { 2834, 0x9E3779B1U, 0x84FFD078U }, /* XSUM_XXH32_testdata[5669] */\n    { 2835, 0x00000000U, 0xB93FA3DDU }, /* XSUM_XXH32_testdata[5670] */\n    { 2835, 0x9E3779B1U, 0x6FA5DFE1U }, /* XSUM_XXH32_testdata[5671] */\n    { 2836, 0x00000000U, 0x4B3E099DU }, /* XSUM_XXH32_testdata[5672] */\n    { 2836, 0x9E3779B1U, 0x1D5C6DDCU }, /* XSUM_XXH32_testdata[5673] */\n    { 2837, 0x00000000U, 0x7E5E5805U }, /* XSUM_XXH32_testdata[5674] */\n    { 2837, 0x9E3779B1U, 0x8AA6C4E6U }, /* XSUM_XXH32_testdata[5675] */\n    { 2838, 0x00000000U, 0x0388F8F1U }, /* XSUM_XXH32_testdata[5676] */\n    { 2838, 0x9E3779B1U, 0x5AF9FE66U }, /* XSUM_XXH32_testdata[5677] */\n    { 2839, 0x00000000U, 0xB2D948DAU }, /* XSUM_XXH32_testdata[5678] */\n    { 2839, 0x9E3779B1U, 0xDADF89C9U }, /* XSUM_XXH32_testdata[5679] */\n    { 2840, 0x00000000U, 0x4375D874U }, /* XSUM_XXH32_testdata[5680] */\n    { 2840, 0x9E3779B1U, 0x1D4E417EU }, /* XSUM_XXH32_testdata[5681] */\n    { 2841, 0x00000000U, 0xB97066F7U }, /* XSUM_XXH32_testdata[5682] */\n    { 2841, 0x9E3779B1U, 0x986F05F1U }, /* XSUM_XXH32_testdata[5683] */\n    { 2842, 0x00000000U, 0x126921E0U }, /* XSUM_XXH32_testdata[5684] */\n    { 2842, 0x9E3779B1U, 0xB451A61BU }, /* XSUM_XXH32_testdata[5685] */\n    { 2843, 0x00000000U, 0xE8165EF7U }, /* XSUM_XXH32_testdata[5686] */\n    { 2843, 0x9E3779B1U, 0x504AD607U }, /* XSUM_XXH32_testdata[5687] */\n    { 2844, 0x00000000U, 0xE016BE32U }, /* XSUM_XXH32_testdata[5688] */\n    { 2844, 0x9E3779B1U, 0x65417295U }, /* XSUM_XXH32_testdata[5689] */\n    { 2845, 0x00000000U, 0xE0447CFFU }, /* XSUM_XXH32_testdata[5690] */\n    { 2845, 0x9E3779B1U, 0x01D677B9U }, /* XSUM_XXH32_testdata[5691] */\n    { 2846, 0x00000000U, 0xA1743CAFU }, /* XSUM_XXH32_testdata[5692] */\n    { 2846, 0x9E3779B1U, 0xEC062830U }, /* XSUM_XXH32_testdata[5693] */\n    { 2847, 0x00000000U, 0x64D64BB9U }, /* XSUM_XXH32_testdata[5694] */\n    { 2847, 0x9E3779B1U, 0xA6E518C8U }, /* XSUM_XXH32_testdata[5695] */\n    { 2848, 0x00000000U, 0x10FDCB68U }, /* XSUM_XXH32_testdata[5696] */\n    { 2848, 0x9E3779B1U, 0x3F1F7470U }, /* XSUM_XXH32_testdata[5697] */\n    { 2849, 0x00000000U, 0xE475F379U }, /* XSUM_XXH32_testdata[5698] */\n    { 2849, 0x9E3779B1U, 0x264D6363U }, /* XSUM_XXH32_testdata[5699] */\n    { 2850, 0x00000000U, 0x5FD4DB79U }, /* XSUM_XXH32_testdata[5700] */\n    { 2850, 0x9E3779B1U, 0x44BBF0CCU }, /* XSUM_XXH32_testdata[5701] */\n    { 2851, 0x00000000U, 0x956431FEU }, /* XSUM_XXH32_testdata[5702] */\n    { 2851, 0x9E3779B1U, 0x4BF184ECU }, /* XSUM_XXH32_testdata[5703] */\n    { 2852, 0x00000000U, 0x0FDB9858U }, /* XSUM_XXH32_testdata[5704] */\n    { 2852, 0x9E3779B1U, 0xED1B181FU }, /* XSUM_XXH32_testdata[5705] */\n    { 2853, 0x00000000U, 0x7476CFEBU }, /* XSUM_XXH32_testdata[5706] */\n    { 2853, 0x9E3779B1U, 0x5CB7A179U }, /* XSUM_XXH32_testdata[5707] */\n    { 2854, 0x00000000U, 0xD38082C1U }, /* XSUM_XXH32_testdata[5708] */\n    { 2854, 0x9E3779B1U, 0x4858100AU }, /* XSUM_XXH32_testdata[5709] */\n    { 2855, 0x00000000U, 0x95E8C751U }, /* XSUM_XXH32_testdata[5710] */\n    { 2855, 0x9E3779B1U, 0xE669B64FU }, /* XSUM_XXH32_testdata[5711] */\n    { 2856, 0x00000000U, 0xB80005D4U }, /* XSUM_XXH32_testdata[5712] */\n    { 2856, 0x9E3779B1U, 0x9C85A331U }, /* XSUM_XXH32_testdata[5713] */\n    { 2857, 0x00000000U, 0x2F4CF2C5U }, /* XSUM_XXH32_testdata[5714] */\n    { 2857, 0x9E3779B1U, 0xB500F804U }, /* XSUM_XXH32_testdata[5715] */\n    { 2858, 0x00000000U, 0xB5D502EBU }, /* XSUM_XXH32_testdata[5716] */\n    { 2858, 0x9E3779B1U, 0x0C960597U }, /* XSUM_XXH32_testdata[5717] */\n    { 2859, 0x00000000U, 0x86386B7DU }, /* XSUM_XXH32_testdata[5718] */\n    { 2859, 0x9E3779B1U, 0x5F3F38FEU }, /* XSUM_XXH32_testdata[5719] */\n    { 2860, 0x00000000U, 0x50454BDAU }, /* XSUM_XXH32_testdata[5720] */\n    { 2860, 0x9E3779B1U, 0xC628A4F9U }, /* XSUM_XXH32_testdata[5721] */\n    { 2861, 0x00000000U, 0x6C4F9758U }, /* XSUM_XXH32_testdata[5722] */\n    { 2861, 0x9E3779B1U, 0xB39F1641U }, /* XSUM_XXH32_testdata[5723] */\n    { 2862, 0x00000000U, 0x535393C8U }, /* XSUM_XXH32_testdata[5724] */\n    { 2862, 0x9E3779B1U, 0x0F17E5C2U }, /* XSUM_XXH32_testdata[5725] */\n    { 2863, 0x00000000U, 0x9D8AB6D8U }, /* XSUM_XXH32_testdata[5726] */\n    { 2863, 0x9E3779B1U, 0xF00959D4U }, /* XSUM_XXH32_testdata[5727] */\n    { 2864, 0x00000000U, 0x34669285U }, /* XSUM_XXH32_testdata[5728] */\n    { 2864, 0x9E3779B1U, 0x74806FACU }, /* XSUM_XXH32_testdata[5729] */\n    { 2865, 0x00000000U, 0xAABDB643U }, /* XSUM_XXH32_testdata[5730] */\n    { 2865, 0x9E3779B1U, 0x287840A3U }, /* XSUM_XXH32_testdata[5731] */\n    { 2866, 0x00000000U, 0xC6251F32U }, /* XSUM_XXH32_testdata[5732] */\n    { 2866, 0x9E3779B1U, 0x49856D67U }, /* XSUM_XXH32_testdata[5733] */\n    { 2867, 0x00000000U, 0xE205A26AU }, /* XSUM_XXH32_testdata[5734] */\n    { 2867, 0x9E3779B1U, 0x9436CDD1U }, /* XSUM_XXH32_testdata[5735] */\n    { 2868, 0x00000000U, 0x4E5E7323U }, /* XSUM_XXH32_testdata[5736] */\n    { 2868, 0x9E3779B1U, 0x2AFAB027U }, /* XSUM_XXH32_testdata[5737] */\n    { 2869, 0x00000000U, 0x7646C51DU }, /* XSUM_XXH32_testdata[5738] */\n    { 2869, 0x9E3779B1U, 0x40E60330U }, /* XSUM_XXH32_testdata[5739] */\n    { 2870, 0x00000000U, 0xEC6BFE35U }, /* XSUM_XXH32_testdata[5740] */\n    { 2870, 0x9E3779B1U, 0xDFDC9D76U }, /* XSUM_XXH32_testdata[5741] */\n    { 2871, 0x00000000U, 0xA4E2C93AU }, /* XSUM_XXH32_testdata[5742] */\n    { 2871, 0x9E3779B1U, 0x2A12988BU }, /* XSUM_XXH32_testdata[5743] */\n    { 2872, 0x00000000U, 0xD49AC4CEU }, /* XSUM_XXH32_testdata[5744] */\n    { 2872, 0x9E3779B1U, 0x556DD939U }, /* XSUM_XXH32_testdata[5745] */\n    { 2873, 0x00000000U, 0xC2D8F776U }, /* XSUM_XXH32_testdata[5746] */\n    { 2873, 0x9E3779B1U, 0x8BB1AE11U }, /* XSUM_XXH32_testdata[5747] */\n    { 2874, 0x00000000U, 0x8502FA30U }, /* XSUM_XXH32_testdata[5748] */\n    { 2874, 0x9E3779B1U, 0xC729E56CU }, /* XSUM_XXH32_testdata[5749] */\n    { 2875, 0x00000000U, 0x5F809ED5U }, /* XSUM_XXH32_testdata[5750] */\n    { 2875, 0x9E3779B1U, 0x8CC6EAAFU }, /* XSUM_XXH32_testdata[5751] */\n    { 2876, 0x00000000U, 0xBD800A9FU }, /* XSUM_XXH32_testdata[5752] */\n    { 2876, 0x9E3779B1U, 0xED6C0E0EU }, /* XSUM_XXH32_testdata[5753] */\n    { 2877, 0x00000000U, 0xCD191B6CU }, /* XSUM_XXH32_testdata[5754] */\n    { 2877, 0x9E3779B1U, 0x018F583DU }, /* XSUM_XXH32_testdata[5755] */\n    { 2878, 0x00000000U, 0x33D204D4U }, /* XSUM_XXH32_testdata[5756] */\n    { 2878, 0x9E3779B1U, 0x87DFAF4DU }, /* XSUM_XXH32_testdata[5757] */\n    { 2879, 0x00000000U, 0xCCCE92A0U }, /* XSUM_XXH32_testdata[5758] */\n    { 2879, 0x9E3779B1U, 0x11CDE586U }, /* XSUM_XXH32_testdata[5759] */\n    { 2880, 0x00000000U, 0xF131872CU }, /* XSUM_XXH32_testdata[5760] */\n    { 2880, 0x9E3779B1U, 0xF433CAD6U }, /* XSUM_XXH32_testdata[5761] */\n    { 2881, 0x00000000U, 0xE272C8CFU }, /* XSUM_XXH32_testdata[5762] */\n    { 2881, 0x9E3779B1U, 0x3E6034EDU }, /* XSUM_XXH32_testdata[5763] */\n    { 2882, 0x00000000U, 0xFBF2C98EU }, /* XSUM_XXH32_testdata[5764] */\n    { 2882, 0x9E3779B1U, 0x1F9B0EB8U }, /* XSUM_XXH32_testdata[5765] */\n    { 2883, 0x00000000U, 0x064096BDU }, /* XSUM_XXH32_testdata[5766] */\n    { 2883, 0x9E3779B1U, 0xE2BC2B69U }, /* XSUM_XXH32_testdata[5767] */\n    { 2884, 0x00000000U, 0x370670E3U }, /* XSUM_XXH32_testdata[5768] */\n    { 2884, 0x9E3779B1U, 0x894D74A5U }, /* XSUM_XXH32_testdata[5769] */\n    { 2885, 0x00000000U, 0x89CDD613U }, /* XSUM_XXH32_testdata[5770] */\n    { 2885, 0x9E3779B1U, 0x268A843FU }, /* XSUM_XXH32_testdata[5771] */\n    { 2886, 0x00000000U, 0x7C9A130CU }, /* XSUM_XXH32_testdata[5772] */\n    { 2886, 0x9E3779B1U, 0xBCB743A2U }, /* XSUM_XXH32_testdata[5773] */\n    { 2887, 0x00000000U, 0xC8E7C80AU }, /* XSUM_XXH32_testdata[5774] */\n    { 2887, 0x9E3779B1U, 0x81B18AA9U }, /* XSUM_XXH32_testdata[5775] */\n    { 2888, 0x00000000U, 0x530EF44CU }, /* XSUM_XXH32_testdata[5776] */\n    { 2888, 0x9E3779B1U, 0x60599386U }, /* XSUM_XXH32_testdata[5777] */\n    { 2889, 0x00000000U, 0x3F360F6DU }, /* XSUM_XXH32_testdata[5778] */\n    { 2889, 0x9E3779B1U, 0x57F16D0BU }, /* XSUM_XXH32_testdata[5779] */\n    { 2890, 0x00000000U, 0x751F5D7BU }, /* XSUM_XXH32_testdata[5780] */\n    { 2890, 0x9E3779B1U, 0x90E5254FU }, /* XSUM_XXH32_testdata[5781] */\n    { 2891, 0x00000000U, 0xFB9505C7U }, /* XSUM_XXH32_testdata[5782] */\n    { 2891, 0x9E3779B1U, 0xBF6BE72EU }, /* XSUM_XXH32_testdata[5783] */\n    { 2892, 0x00000000U, 0xAB270177U }, /* XSUM_XXH32_testdata[5784] */\n    { 2892, 0x9E3779B1U, 0x578E1EA3U }, /* XSUM_XXH32_testdata[5785] */\n    { 2893, 0x00000000U, 0x9BE1BF35U }, /* XSUM_XXH32_testdata[5786] */\n    { 2893, 0x9E3779B1U, 0x2AEC40CAU }, /* XSUM_XXH32_testdata[5787] */\n    { 2894, 0x00000000U, 0x6DA78B70U }, /* XSUM_XXH32_testdata[5788] */\n    { 2894, 0x9E3779B1U, 0xFE6E9BFBU }, /* XSUM_XXH32_testdata[5789] */\n    { 2895, 0x00000000U, 0x92D76350U }, /* XSUM_XXH32_testdata[5790] */\n    { 2895, 0x9E3779B1U, 0x649C5A2AU }, /* XSUM_XXH32_testdata[5791] */\n    { 2896, 0x00000000U, 0x2F25D0AEU }, /* XSUM_XXH32_testdata[5792] */\n    { 2896, 0x9E3779B1U, 0x637B907BU }, /* XSUM_XXH32_testdata[5793] */\n    { 2897, 0x00000000U, 0xCFFEE0E2U }, /* XSUM_XXH32_testdata[5794] */\n    { 2897, 0x9E3779B1U, 0x1F5775C9U }, /* XSUM_XXH32_testdata[5795] */\n    { 2898, 0x00000000U, 0x3E71B1EFU }, /* XSUM_XXH32_testdata[5796] */\n    { 2898, 0x9E3779B1U, 0xDD09C98EU }, /* XSUM_XXH32_testdata[5797] */\n    { 2899, 0x00000000U, 0x4194541FU }, /* XSUM_XXH32_testdata[5798] */\n    { 2899, 0x9E3779B1U, 0x180A0CEEU }, /* XSUM_XXH32_testdata[5799] */\n    { 2900, 0x00000000U, 0x2B09A958U }, /* XSUM_XXH32_testdata[5800] */\n    { 2900, 0x9E3779B1U, 0xDF682AB5U }, /* XSUM_XXH32_testdata[5801] */\n    { 2901, 0x00000000U, 0x8300C2E7U }, /* XSUM_XXH32_testdata[5802] */\n    { 2901, 0x9E3779B1U, 0xDBB03537U }, /* XSUM_XXH32_testdata[5803] */\n    { 2902, 0x00000000U, 0x18A07793U }, /* XSUM_XXH32_testdata[5804] */\n    { 2902, 0x9E3779B1U, 0xAF0FB9BFU }, /* XSUM_XXH32_testdata[5805] */\n    { 2903, 0x00000000U, 0x43D7A654U }, /* XSUM_XXH32_testdata[5806] */\n    { 2903, 0x9E3779B1U, 0xF60FD833U }, /* XSUM_XXH32_testdata[5807] */\n    { 2904, 0x00000000U, 0x8F82C0F9U }, /* XSUM_XXH32_testdata[5808] */\n    { 2904, 0x9E3779B1U, 0xF736225AU }, /* XSUM_XXH32_testdata[5809] */\n    { 2905, 0x00000000U, 0x636F2D35U }, /* XSUM_XXH32_testdata[5810] */\n    { 2905, 0x9E3779B1U, 0xE5A521DAU }, /* XSUM_XXH32_testdata[5811] */\n    { 2906, 0x00000000U, 0x8159C1B4U }, /* XSUM_XXH32_testdata[5812] */\n    { 2906, 0x9E3779B1U, 0x236C551DU }, /* XSUM_XXH32_testdata[5813] */\n    { 2907, 0x00000000U, 0xDF4CA751U }, /* XSUM_XXH32_testdata[5814] */\n    { 2907, 0x9E3779B1U, 0x9A9CEC7CU }, /* XSUM_XXH32_testdata[5815] */\n    { 2908, 0x00000000U, 0x8F62FC0AU }, /* XSUM_XXH32_testdata[5816] */\n    { 2908, 0x9E3779B1U, 0x694589B4U }, /* XSUM_XXH32_testdata[5817] */\n    { 2909, 0x00000000U, 0xD6E638AEU }, /* XSUM_XXH32_testdata[5818] */\n    { 2909, 0x9E3779B1U, 0x26E452DDU }, /* XSUM_XXH32_testdata[5819] */\n    { 2910, 0x00000000U, 0x820F9440U }, /* XSUM_XXH32_testdata[5820] */\n    { 2910, 0x9E3779B1U, 0xB2D048E1U }, /* XSUM_XXH32_testdata[5821] */\n    { 2911, 0x00000000U, 0x2670DD96U }, /* XSUM_XXH32_testdata[5822] */\n    { 2911, 0x9E3779B1U, 0xCEDC28EBU }, /* XSUM_XXH32_testdata[5823] */\n    { 2912, 0x00000000U, 0x1A911C9AU }, /* XSUM_XXH32_testdata[5824] */\n    { 2912, 0x9E3779B1U, 0xC62A7A09U }, /* XSUM_XXH32_testdata[5825] */\n    { 2913, 0x00000000U, 0xCF2B7C95U }, /* XSUM_XXH32_testdata[5826] */\n    { 2913, 0x9E3779B1U, 0x44D7DAC9U }, /* XSUM_XXH32_testdata[5827] */\n    { 2914, 0x00000000U, 0x28225B2CU }, /* XSUM_XXH32_testdata[5828] */\n    { 2914, 0x9E3779B1U, 0xA545F9C8U }, /* XSUM_XXH32_testdata[5829] */\n    { 2915, 0x00000000U, 0x91882039U }, /* XSUM_XXH32_testdata[5830] */\n    { 2915, 0x9E3779B1U, 0x14584116U }, /* XSUM_XXH32_testdata[5831] */\n    { 2916, 0x00000000U, 0x872E972DU }, /* XSUM_XXH32_testdata[5832] */\n    { 2916, 0x9E3779B1U, 0x738A66FEU }, /* XSUM_XXH32_testdata[5833] */\n    { 2917, 0x00000000U, 0x00B45E1CU }, /* XSUM_XXH32_testdata[5834] */\n    { 2917, 0x9E3779B1U, 0xBFFF306DU }, /* XSUM_XXH32_testdata[5835] */\n    { 2918, 0x00000000U, 0x47C8F697U }, /* XSUM_XXH32_testdata[5836] */\n    { 2918, 0x9E3779B1U, 0x13D3E8CFU }, /* XSUM_XXH32_testdata[5837] */\n    { 2919, 0x00000000U, 0x0A7E8141U }, /* XSUM_XXH32_testdata[5838] */\n    { 2919, 0x9E3779B1U, 0x415D09D6U }, /* XSUM_XXH32_testdata[5839] */\n    { 2920, 0x00000000U, 0xF911F0F0U }, /* XSUM_XXH32_testdata[5840] */\n    { 2920, 0x9E3779B1U, 0x865BA41AU }, /* XSUM_XXH32_testdata[5841] */\n    { 2921, 0x00000000U, 0x4CB65FE2U }, /* XSUM_XXH32_testdata[5842] */\n    { 2921, 0x9E3779B1U, 0x0E62F2C1U }, /* XSUM_XXH32_testdata[5843] */\n    { 2922, 0x00000000U, 0x1BE816F4U }, /* XSUM_XXH32_testdata[5844] */\n    { 2922, 0x9E3779B1U, 0x778E6D31U }, /* XSUM_XXH32_testdata[5845] */\n    { 2923, 0x00000000U, 0x20B0B680U }, /* XSUM_XXH32_testdata[5846] */\n    { 2923, 0x9E3779B1U, 0xCB15CF45U }, /* XSUM_XXH32_testdata[5847] */\n    { 2924, 0x00000000U, 0x6FADEEE9U }, /* XSUM_XXH32_testdata[5848] */\n    { 2924, 0x9E3779B1U, 0xFB61B056U }, /* XSUM_XXH32_testdata[5849] */\n    { 2925, 0x00000000U, 0xDDF3D4DCU }, /* XSUM_XXH32_testdata[5850] */\n    { 2925, 0x9E3779B1U, 0x1C9E2FFCU }, /* XSUM_XXH32_testdata[5851] */\n    { 2926, 0x00000000U, 0x15DCD8E9U }, /* XSUM_XXH32_testdata[5852] */\n    { 2926, 0x9E3779B1U, 0x27691377U }, /* XSUM_XXH32_testdata[5853] */\n    { 2927, 0x00000000U, 0xBD3AA7B5U }, /* XSUM_XXH32_testdata[5854] */\n    { 2927, 0x9E3779B1U, 0xE59A1F2FU }, /* XSUM_XXH32_testdata[5855] */\n    { 2928, 0x00000000U, 0xEDC462CEU }, /* XSUM_XXH32_testdata[5856] */\n    { 2928, 0x9E3779B1U, 0x8632E73CU }, /* XSUM_XXH32_testdata[5857] */\n    { 2929, 0x00000000U, 0xC7912A14U }, /* XSUM_XXH32_testdata[5858] */\n    { 2929, 0x9E3779B1U, 0xC31A06D8U }, /* XSUM_XXH32_testdata[5859] */\n    { 2930, 0x00000000U, 0x41F1DED3U }, /* XSUM_XXH32_testdata[5860] */\n    { 2930, 0x9E3779B1U, 0x198EA7C0U }, /* XSUM_XXH32_testdata[5861] */\n    { 2931, 0x00000000U, 0x7BFC4567U }, /* XSUM_XXH32_testdata[5862] */\n    { 2931, 0x9E3779B1U, 0xD277E97BU }, /* XSUM_XXH32_testdata[5863] */\n    { 2932, 0x00000000U, 0x500D6E61U }, /* XSUM_XXH32_testdata[5864] */\n    { 2932, 0x9E3779B1U, 0xBBB97B59U }, /* XSUM_XXH32_testdata[5865] */\n    { 2933, 0x00000000U, 0x833B0AB5U }, /* XSUM_XXH32_testdata[5866] */\n    { 2933, 0x9E3779B1U, 0xF362690DU }, /* XSUM_XXH32_testdata[5867] */\n    { 2934, 0x00000000U, 0x9D0DF51CU }, /* XSUM_XXH32_testdata[5868] */\n    { 2934, 0x9E3779B1U, 0xA9CD2FF5U }, /* XSUM_XXH32_testdata[5869] */\n    { 2935, 0x00000000U, 0x25B61DBEU }, /* XSUM_XXH32_testdata[5870] */\n    { 2935, 0x9E3779B1U, 0x3DF906B1U }, /* XSUM_XXH32_testdata[5871] */\n    { 2936, 0x00000000U, 0x2711D6BEU }, /* XSUM_XXH32_testdata[5872] */\n    { 2936, 0x9E3779B1U, 0x0E945370U }, /* XSUM_XXH32_testdata[5873] */\n    { 2937, 0x00000000U, 0xC486EEA6U }, /* XSUM_XXH32_testdata[5874] */\n    { 2937, 0x9E3779B1U, 0x847F9D58U }, /* XSUM_XXH32_testdata[5875] */\n    { 2938, 0x00000000U, 0xF6028851U }, /* XSUM_XXH32_testdata[5876] */\n    { 2938, 0x9E3779B1U, 0x3D0DAB96U }, /* XSUM_XXH32_testdata[5877] */\n    { 2939, 0x00000000U, 0x2F554587U }, /* XSUM_XXH32_testdata[5878] */\n    { 2939, 0x9E3779B1U, 0x9EE4A0E0U }, /* XSUM_XXH32_testdata[5879] */\n    { 2940, 0x00000000U, 0xB63D3442U }, /* XSUM_XXH32_testdata[5880] */\n    { 2940, 0x9E3779B1U, 0xC9176E49U }, /* XSUM_XXH32_testdata[5881] */\n    { 2941, 0x00000000U, 0x6E61DBD1U }, /* XSUM_XXH32_testdata[5882] */\n    { 2941, 0x9E3779B1U, 0x9B40EADAU }, /* XSUM_XXH32_testdata[5883] */\n    { 2942, 0x00000000U, 0x6BF948A1U }, /* XSUM_XXH32_testdata[5884] */\n    { 2942, 0x9E3779B1U, 0x335D0A7BU }, /* XSUM_XXH32_testdata[5885] */\n    { 2943, 0x00000000U, 0x59F3204CU }, /* XSUM_XXH32_testdata[5886] */\n    { 2943, 0x9E3779B1U, 0x1A5FB81BU }, /* XSUM_XXH32_testdata[5887] */\n    { 2944, 0x00000000U, 0x856DD3C0U }, /* XSUM_XXH32_testdata[5888] */\n    { 2944, 0x9E3779B1U, 0x3DE6DE92U }, /* XSUM_XXH32_testdata[5889] */\n    { 2945, 0x00000000U, 0x5C326DD2U }, /* XSUM_XXH32_testdata[5890] */\n    { 2945, 0x9E3779B1U, 0xC885EB29U }, /* XSUM_XXH32_testdata[5891] */\n    { 2946, 0x00000000U, 0x1198D533U }, /* XSUM_XXH32_testdata[5892] */\n    { 2946, 0x9E3779B1U, 0xBFBB9DAEU }, /* XSUM_XXH32_testdata[5893] */\n    { 2947, 0x00000000U, 0x56278EAEU }, /* XSUM_XXH32_testdata[5894] */\n    { 2947, 0x9E3779B1U, 0x6EF003F5U }, /* XSUM_XXH32_testdata[5895] */\n    { 2948, 0x00000000U, 0x321CB244U }, /* XSUM_XXH32_testdata[5896] */\n    { 2948, 0x9E3779B1U, 0x4572AAC0U }, /* XSUM_XXH32_testdata[5897] */\n    { 2949, 0x00000000U, 0x43702D7FU }, /* XSUM_XXH32_testdata[5898] */\n    { 2949, 0x9E3779B1U, 0x16C3BED0U }, /* XSUM_XXH32_testdata[5899] */\n    { 2950, 0x00000000U, 0x1E097144U }, /* XSUM_XXH32_testdata[5900] */\n    { 2950, 0x9E3779B1U, 0x03960131U }, /* XSUM_XXH32_testdata[5901] */\n    { 2951, 0x00000000U, 0x8A47F205U }, /* XSUM_XXH32_testdata[5902] */\n    { 2951, 0x9E3779B1U, 0xF2B9301EU }, /* XSUM_XXH32_testdata[5903] */\n    { 2952, 0x00000000U, 0xB1487765U }, /* XSUM_XXH32_testdata[5904] */\n    { 2952, 0x9E3779B1U, 0xCC9F40BFU }, /* XSUM_XXH32_testdata[5905] */\n    { 2953, 0x00000000U, 0xA008001EU }, /* XSUM_XXH32_testdata[5906] */\n    { 2953, 0x9E3779B1U, 0xD017F867U }, /* XSUM_XXH32_testdata[5907] */\n    { 2954, 0x00000000U, 0x4F292665U }, /* XSUM_XXH32_testdata[5908] */\n    { 2954, 0x9E3779B1U, 0xE416E73CU }, /* XSUM_XXH32_testdata[5909] */\n    { 2955, 0x00000000U, 0xE0AFE330U }, /* XSUM_XXH32_testdata[5910] */\n    { 2955, 0x9E3779B1U, 0x47EFEF4BU }, /* XSUM_XXH32_testdata[5911] */\n    { 2956, 0x00000000U, 0xF6C977D5U }, /* XSUM_XXH32_testdata[5912] */\n    { 2956, 0x9E3779B1U, 0x57E7630EU }, /* XSUM_XXH32_testdata[5913] */\n    { 2957, 0x00000000U, 0x2CE47441U }, /* XSUM_XXH32_testdata[5914] */\n    { 2957, 0x9E3779B1U, 0x32FA12B7U }, /* XSUM_XXH32_testdata[5915] */\n    { 2958, 0x00000000U, 0x55908F04U }, /* XSUM_XXH32_testdata[5916] */\n    { 2958, 0x9E3779B1U, 0x172D8645U }, /* XSUM_XXH32_testdata[5917] */\n    { 2959, 0x00000000U, 0xB019060CU }, /* XSUM_XXH32_testdata[5918] */\n    { 2959, 0x9E3779B1U, 0xC4D8CA7FU }, /* XSUM_XXH32_testdata[5919] */\n    { 2960, 0x00000000U, 0xBBD31580U }, /* XSUM_XXH32_testdata[5920] */\n    { 2960, 0x9E3779B1U, 0x2C9C790AU }, /* XSUM_XXH32_testdata[5921] */\n    { 2961, 0x00000000U, 0x0A25CF53U }, /* XSUM_XXH32_testdata[5922] */\n    { 2961, 0x9E3779B1U, 0xC7F0BBA8U }, /* XSUM_XXH32_testdata[5923] */\n    { 2962, 0x00000000U, 0xC4C287B0U }, /* XSUM_XXH32_testdata[5924] */\n    { 2962, 0x9E3779B1U, 0x07D2E01FU }, /* XSUM_XXH32_testdata[5925] */\n    { 2963, 0x00000000U, 0x867F489CU }, /* XSUM_XXH32_testdata[5926] */\n    { 2963, 0x9E3779B1U, 0x3C370C6FU }, /* XSUM_XXH32_testdata[5927] */\n    { 2964, 0x00000000U, 0xFCB9A78CU }, /* XSUM_XXH32_testdata[5928] */\n    { 2964, 0x9E3779B1U, 0x9BC99E56U }, /* XSUM_XXH32_testdata[5929] */\n    { 2965, 0x00000000U, 0x954D08E4U }, /* XSUM_XXH32_testdata[5930] */\n    { 2965, 0x9E3779B1U, 0x79D09F28U }, /* XSUM_XXH32_testdata[5931] */\n    { 2966, 0x00000000U, 0x011EC304U }, /* XSUM_XXH32_testdata[5932] */\n    { 2966, 0x9E3779B1U, 0x7A62A282U }, /* XSUM_XXH32_testdata[5933] */\n    { 2967, 0x00000000U, 0xDBB4AED4U }, /* XSUM_XXH32_testdata[5934] */\n    { 2967, 0x9E3779B1U, 0x8CF782A7U }, /* XSUM_XXH32_testdata[5935] */\n    { 2968, 0x00000000U, 0x82E2A299U }, /* XSUM_XXH32_testdata[5936] */\n    { 2968, 0x9E3779B1U, 0x8318B8C8U }, /* XSUM_XXH32_testdata[5937] */\n    { 2969, 0x00000000U, 0x737E90A1U }, /* XSUM_XXH32_testdata[5938] */\n    { 2969, 0x9E3779B1U, 0xE3DCDCD5U }, /* XSUM_XXH32_testdata[5939] */\n    { 2970, 0x00000000U, 0xFB4B300DU }, /* XSUM_XXH32_testdata[5940] */\n    { 2970, 0x9E3779B1U, 0xFC6BA74CU }, /* XSUM_XXH32_testdata[5941] */\n    { 2971, 0x00000000U, 0x5B5D301AU }, /* XSUM_XXH32_testdata[5942] */\n    { 2971, 0x9E3779B1U, 0x70A97341U }, /* XSUM_XXH32_testdata[5943] */\n    { 2972, 0x00000000U, 0x707F8706U }, /* XSUM_XXH32_testdata[5944] */\n    { 2972, 0x9E3779B1U, 0x8208FF05U }, /* XSUM_XXH32_testdata[5945] */\n    { 2973, 0x00000000U, 0xD46D3BD7U }, /* XSUM_XXH32_testdata[5946] */\n    { 2973, 0x9E3779B1U, 0xF97FD829U }, /* XSUM_XXH32_testdata[5947] */\n    { 2974, 0x00000000U, 0x3B853D38U }, /* XSUM_XXH32_testdata[5948] */\n    { 2974, 0x9E3779B1U, 0xB068F481U }, /* XSUM_XXH32_testdata[5949] */\n    { 2975, 0x00000000U, 0x18B0B34FU }, /* XSUM_XXH32_testdata[5950] */\n    { 2975, 0x9E3779B1U, 0xF295B71EU }, /* XSUM_XXH32_testdata[5951] */\n    { 2976, 0x00000000U, 0xB9EAA1ACU }, /* XSUM_XXH32_testdata[5952] */\n    { 2976, 0x9E3779B1U, 0x8FCC965FU }, /* XSUM_XXH32_testdata[5953] */\n    { 2977, 0x00000000U, 0xBE611863U }, /* XSUM_XXH32_testdata[5954] */\n    { 2977, 0x9E3779B1U, 0x379F5EBFU }, /* XSUM_XXH32_testdata[5955] */\n    { 2978, 0x00000000U, 0x1111B83CU }, /* XSUM_XXH32_testdata[5956] */\n    { 2978, 0x9E3779B1U, 0x66FF91B8U }, /* XSUM_XXH32_testdata[5957] */\n    { 2979, 0x00000000U, 0x1BCCB558U }, /* XSUM_XXH32_testdata[5958] */\n    { 2979, 0x9E3779B1U, 0x20658C38U }, /* XSUM_XXH32_testdata[5959] */\n    { 2980, 0x00000000U, 0xAAB5B933U }, /* XSUM_XXH32_testdata[5960] */\n    { 2980, 0x9E3779B1U, 0x84DCB796U }, /* XSUM_XXH32_testdata[5961] */\n    { 2981, 0x00000000U, 0xF373FDC4U }, /* XSUM_XXH32_testdata[5962] */\n    { 2981, 0x9E3779B1U, 0x6DE7A7A8U }, /* XSUM_XXH32_testdata[5963] */\n    { 2982, 0x00000000U, 0x0195E191U }, /* XSUM_XXH32_testdata[5964] */\n    { 2982, 0x9E3779B1U, 0xDE816C61U }, /* XSUM_XXH32_testdata[5965] */\n    { 2983, 0x00000000U, 0x29193BCEU }, /* XSUM_XXH32_testdata[5966] */\n    { 2983, 0x9E3779B1U, 0x1CE6F15BU }, /* XSUM_XXH32_testdata[5967] */\n    { 2984, 0x00000000U, 0x5A489757U }, /* XSUM_XXH32_testdata[5968] */\n    { 2984, 0x9E3779B1U, 0xE84C9D02U }, /* XSUM_XXH32_testdata[5969] */\n    { 2985, 0x00000000U, 0x9A8D2836U }, /* XSUM_XXH32_testdata[5970] */\n    { 2985, 0x9E3779B1U, 0x561AD322U }, /* XSUM_XXH32_testdata[5971] */\n    { 2986, 0x00000000U, 0xA334309EU }, /* XSUM_XXH32_testdata[5972] */\n    { 2986, 0x9E3779B1U, 0x4D373B75U }, /* XSUM_XXH32_testdata[5973] */\n    { 2987, 0x00000000U, 0x0C989056U }, /* XSUM_XXH32_testdata[5974] */\n    { 2987, 0x9E3779B1U, 0xECD70EC8U }, /* XSUM_XXH32_testdata[5975] */\n    { 2988, 0x00000000U, 0xDC615020U }, /* XSUM_XXH32_testdata[5976] */\n    { 2988, 0x9E3779B1U, 0x492373CAU }, /* XSUM_XXH32_testdata[5977] */\n    { 2989, 0x00000000U, 0x8B3CF068U }, /* XSUM_XXH32_testdata[5978] */\n    { 2989, 0x9E3779B1U, 0x86B08886U }, /* XSUM_XXH32_testdata[5979] */\n    { 2990, 0x00000000U, 0x4391DB09U }, /* XSUM_XXH32_testdata[5980] */\n    { 2990, 0x9E3779B1U, 0xD8CF567FU }, /* XSUM_XXH32_testdata[5981] */\n    { 2991, 0x00000000U, 0x1A7A1BF9U }, /* XSUM_XXH32_testdata[5982] */\n    { 2991, 0x9E3779B1U, 0x5B31BE82U }, /* XSUM_XXH32_testdata[5983] */\n    { 2992, 0x00000000U, 0x423A109DU }, /* XSUM_XXH32_testdata[5984] */\n    { 2992, 0x9E3779B1U, 0xD62AB7FCU }, /* XSUM_XXH32_testdata[5985] */\n    { 2993, 0x00000000U, 0x2910FCA6U }, /* XSUM_XXH32_testdata[5986] */\n    { 2993, 0x9E3779B1U, 0xF6C41F6AU }, /* XSUM_XXH32_testdata[5987] */\n    { 2994, 0x00000000U, 0x9225C21CU }, /* XSUM_XXH32_testdata[5988] */\n    { 2994, 0x9E3779B1U, 0x176B2457U }, /* XSUM_XXH32_testdata[5989] */\n    { 2995, 0x00000000U, 0x8B56A4DEU }, /* XSUM_XXH32_testdata[5990] */\n    { 2995, 0x9E3779B1U, 0x0F4E15FAU }, /* XSUM_XXH32_testdata[5991] */\n    { 2996, 0x00000000U, 0x3470DB81U }, /* XSUM_XXH32_testdata[5992] */\n    { 2996, 0x9E3779B1U, 0x48D239ECU }, /* XSUM_XXH32_testdata[5993] */\n    { 2997, 0x00000000U, 0xC466E875U }, /* XSUM_XXH32_testdata[5994] */\n    { 2997, 0x9E3779B1U, 0x40297694U }, /* XSUM_XXH32_testdata[5995] */\n    { 2998, 0x00000000U, 0x310D7935U }, /* XSUM_XXH32_testdata[5996] */\n    { 2998, 0x9E3779B1U, 0x9C82CD08U }, /* XSUM_XXH32_testdata[5997] */\n    { 2999, 0x00000000U, 0x1410789DU }, /* XSUM_XXH32_testdata[5998] */\n    { 2999, 0x9E3779B1U, 0xA34ACC55U }, /* XSUM_XXH32_testdata[5999] */\n    { 3000, 0x00000000U, 0x7DE4955CU }, /* XSUM_XXH32_testdata[6000] */\n    { 3000, 0x9E3779B1U, 0x595FB316U }, /* XSUM_XXH32_testdata[6001] */\n    { 3001, 0x00000000U, 0xC33AC27EU }, /* XSUM_XXH32_testdata[6002] */\n    { 3001, 0x9E3779B1U, 0x76BCAFEFU }, /* XSUM_XXH32_testdata[6003] */\n    { 3002, 0x00000000U, 0x824DD320U }, /* XSUM_XXH32_testdata[6004] */\n    { 3002, 0x9E3779B1U, 0x6F7D851AU }, /* XSUM_XXH32_testdata[6005] */\n    { 3003, 0x00000000U, 0x59B47801U }, /* XSUM_XXH32_testdata[6006] */\n    { 3003, 0x9E3779B1U, 0xDD67D6A4U }, /* XSUM_XXH32_testdata[6007] */\n    { 3004, 0x00000000U, 0xB8395F2CU }, /* XSUM_XXH32_testdata[6008] */\n    { 3004, 0x9E3779B1U, 0xFE7A73A1U }, /* XSUM_XXH32_testdata[6009] */\n    { 3005, 0x00000000U, 0xE66147FFU }, /* XSUM_XXH32_testdata[6010] */\n    { 3005, 0x9E3779B1U, 0x781AA1FCU }, /* XSUM_XXH32_testdata[6011] */\n    { 3006, 0x00000000U, 0x05B76570U }, /* XSUM_XXH32_testdata[6012] */\n    { 3006, 0x9E3779B1U, 0xC560E325U }, /* XSUM_XXH32_testdata[6013] */\n    { 3007, 0x00000000U, 0x74B4319FU }, /* XSUM_XXH32_testdata[6014] */\n    { 3007, 0x9E3779B1U, 0x783B331CU }, /* XSUM_XXH32_testdata[6015] */\n    { 3008, 0x00000000U, 0x0A1A629DU }, /* XSUM_XXH32_testdata[6016] */\n    { 3008, 0x9E3779B1U, 0x9ADD6ABCU }, /* XSUM_XXH32_testdata[6017] */\n    { 3009, 0x00000000U, 0xCD70D942U }, /* XSUM_XXH32_testdata[6018] */\n    { 3009, 0x9E3779B1U, 0x1BFB81F6U }, /* XSUM_XXH32_testdata[6019] */\n    { 3010, 0x00000000U, 0x56694BEBU }, /* XSUM_XXH32_testdata[6020] */\n    { 3010, 0x9E3779B1U, 0xD4D15900U }, /* XSUM_XXH32_testdata[6021] */\n    { 3011, 0x00000000U, 0x0B8F4451U }, /* XSUM_XXH32_testdata[6022] */\n    { 3011, 0x9E3779B1U, 0x4228C4E0U }, /* XSUM_XXH32_testdata[6023] */\n    { 3012, 0x00000000U, 0xD42EC927U }, /* XSUM_XXH32_testdata[6024] */\n    { 3012, 0x9E3779B1U, 0x24EC861AU }, /* XSUM_XXH32_testdata[6025] */\n    { 3013, 0x00000000U, 0x6226F2C5U }, /* XSUM_XXH32_testdata[6026] */\n    { 3013, 0x9E3779B1U, 0xF6840F72U }, /* XSUM_XXH32_testdata[6027] */\n    { 3014, 0x00000000U, 0x7AD77FF1U }, /* XSUM_XXH32_testdata[6028] */\n    { 3014, 0x9E3779B1U, 0xBC3F2621U }, /* XSUM_XXH32_testdata[6029] */\n    { 3015, 0x00000000U, 0x5413594DU }, /* XSUM_XXH32_testdata[6030] */\n    { 3015, 0x9E3779B1U, 0xE96FE3EFU }, /* XSUM_XXH32_testdata[6031] */\n    { 3016, 0x00000000U, 0x163019CFU }, /* XSUM_XXH32_testdata[6032] */\n    { 3016, 0x9E3779B1U, 0xCE696F0BU }, /* XSUM_XXH32_testdata[6033] */\n    { 3017, 0x00000000U, 0x94ECA3C3U }, /* XSUM_XXH32_testdata[6034] */\n    { 3017, 0x9E3779B1U, 0x34FE249DU }, /* XSUM_XXH32_testdata[6035] */\n    { 3018, 0x00000000U, 0xEB15CF8FU }, /* XSUM_XXH32_testdata[6036] */\n    { 3018, 0x9E3779B1U, 0x168B5B6EU }, /* XSUM_XXH32_testdata[6037] */\n    { 3019, 0x00000000U, 0xA918E275U }, /* XSUM_XXH32_testdata[6038] */\n    { 3019, 0x9E3779B1U, 0xD91220BCU }, /* XSUM_XXH32_testdata[6039] */\n    { 3020, 0x00000000U, 0xFC191ABBU }, /* XSUM_XXH32_testdata[6040] */\n    { 3020, 0x9E3779B1U, 0x0AE2796BU }, /* XSUM_XXH32_testdata[6041] */\n    { 3021, 0x00000000U, 0xDE6669BBU }, /* XSUM_XXH32_testdata[6042] */\n    { 3021, 0x9E3779B1U, 0xEFEB930FU }, /* XSUM_XXH32_testdata[6043] */\n    { 3022, 0x00000000U, 0xDD2D73A8U }, /* XSUM_XXH32_testdata[6044] */\n    { 3022, 0x9E3779B1U, 0xD6D9CBB8U }, /* XSUM_XXH32_testdata[6045] */\n    { 3023, 0x00000000U, 0xCBEE8272U }, /* XSUM_XXH32_testdata[6046] */\n    { 3023, 0x9E3779B1U, 0x215FC772U }, /* XSUM_XXH32_testdata[6047] */\n    { 3024, 0x00000000U, 0x014C13C3U }, /* XSUM_XXH32_testdata[6048] */\n    { 3024, 0x9E3779B1U, 0x5EF83E31U }, /* XSUM_XXH32_testdata[6049] */\n    { 3025, 0x00000000U, 0xEDE35D61U }, /* XSUM_XXH32_testdata[6050] */\n    { 3025, 0x9E3779B1U, 0x82738A51U }, /* XSUM_XXH32_testdata[6051] */\n    { 3026, 0x00000000U, 0x668B22B4U }, /* XSUM_XXH32_testdata[6052] */\n    { 3026, 0x9E3779B1U, 0xB422F746U }, /* XSUM_XXH32_testdata[6053] */\n    { 3027, 0x00000000U, 0x31087B46U }, /* XSUM_XXH32_testdata[6054] */\n    { 3027, 0x9E3779B1U, 0x094281ACU }, /* XSUM_XXH32_testdata[6055] */\n    { 3028, 0x00000000U, 0x57F41E72U }, /* XSUM_XXH32_testdata[6056] */\n    { 3028, 0x9E3779B1U, 0xFFB08C2EU }, /* XSUM_XXH32_testdata[6057] */\n    { 3029, 0x00000000U, 0xAF9E9E7BU }, /* XSUM_XXH32_testdata[6058] */\n    { 3029, 0x9E3779B1U, 0x5CD8A1DEU }, /* XSUM_XXH32_testdata[6059] */\n    { 3030, 0x00000000U, 0x75D5BFA0U }, /* XSUM_XXH32_testdata[6060] */\n    { 3030, 0x9E3779B1U, 0x52FBDEF0U }, /* XSUM_XXH32_testdata[6061] */\n    { 3031, 0x00000000U, 0x6E8543CFU }, /* XSUM_XXH32_testdata[6062] */\n    { 3031, 0x9E3779B1U, 0x663E33ADU }, /* XSUM_XXH32_testdata[6063] */\n    { 3032, 0x00000000U, 0xFDF76881U }, /* XSUM_XXH32_testdata[6064] */\n    { 3032, 0x9E3779B1U, 0xE519B676U }, /* XSUM_XXH32_testdata[6065] */\n    { 3033, 0x00000000U, 0x7AEFA9CAU }, /* XSUM_XXH32_testdata[6066] */\n    { 3033, 0x9E3779B1U, 0x865C3370U }, /* XSUM_XXH32_testdata[6067] */\n    { 3034, 0x00000000U, 0x00EF3B72U }, /* XSUM_XXH32_testdata[6068] */\n    { 3034, 0x9E3779B1U, 0x5721E410U }, /* XSUM_XXH32_testdata[6069] */\n    { 3035, 0x00000000U, 0x1C6729ABU }, /* XSUM_XXH32_testdata[6070] */\n    { 3035, 0x9E3779B1U, 0x8D18CB9AU }, /* XSUM_XXH32_testdata[6071] */\n    { 3036, 0x00000000U, 0xECE697A3U }, /* XSUM_XXH32_testdata[6072] */\n    { 3036, 0x9E3779B1U, 0x2065FD13U }, /* XSUM_XXH32_testdata[6073] */\n    { 3037, 0x00000000U, 0xC0F2C8CCU }, /* XSUM_XXH32_testdata[6074] */\n    { 3037, 0x9E3779B1U, 0xED60F9EEU }, /* XSUM_XXH32_testdata[6075] */\n    { 3038, 0x00000000U, 0xDD7D2260U }, /* XSUM_XXH32_testdata[6076] */\n    { 3038, 0x9E3779B1U, 0x869C9DFDU }, /* XSUM_XXH32_testdata[6077] */\n    { 3039, 0x00000000U, 0x87DEC6DAU }, /* XSUM_XXH32_testdata[6078] */\n    { 3039, 0x9E3779B1U, 0x41D284ADU }, /* XSUM_XXH32_testdata[6079] */\n    { 3040, 0x00000000U, 0xCA8DA6B0U }, /* XSUM_XXH32_testdata[6080] */\n    { 3040, 0x9E3779B1U, 0xFBAB5DD5U }, /* XSUM_XXH32_testdata[6081] */\n    { 3041, 0x00000000U, 0x68A1D3EDU }, /* XSUM_XXH32_testdata[6082] */\n    { 3041, 0x9E3779B1U, 0x41249766U }, /* XSUM_XXH32_testdata[6083] */\n    { 3042, 0x00000000U, 0x3E4E842BU }, /* XSUM_XXH32_testdata[6084] */\n    { 3042, 0x9E3779B1U, 0xB3C5D77DU }, /* XSUM_XXH32_testdata[6085] */\n    { 3043, 0x00000000U, 0xE0EEA85BU }, /* XSUM_XXH32_testdata[6086] */\n    { 3043, 0x9E3779B1U, 0x05EFB10DU }, /* XSUM_XXH32_testdata[6087] */\n    { 3044, 0x00000000U, 0x477537C9U }, /* XSUM_XXH32_testdata[6088] */\n    { 3044, 0x9E3779B1U, 0xF583F875U }, /* XSUM_XXH32_testdata[6089] */\n    { 3045, 0x00000000U, 0x99C55376U }, /* XSUM_XXH32_testdata[6090] */\n    { 3045, 0x9E3779B1U, 0x8492D63DU }, /* XSUM_XXH32_testdata[6091] */\n    { 3046, 0x00000000U, 0x9D2314F3U }, /* XSUM_XXH32_testdata[6092] */\n    { 3046, 0x9E3779B1U, 0x2A17457BU }, /* XSUM_XXH32_testdata[6093] */\n    { 3047, 0x00000000U, 0xF520B774U }, /* XSUM_XXH32_testdata[6094] */\n    { 3047, 0x9E3779B1U, 0xCBC0E177U }, /* XSUM_XXH32_testdata[6095] */\n    { 3048, 0x00000000U, 0x7DF6260AU }, /* XSUM_XXH32_testdata[6096] */\n    { 3048, 0x9E3779B1U, 0x2B849C8EU }, /* XSUM_XXH32_testdata[6097] */\n    { 3049, 0x00000000U, 0x2316EEF0U }, /* XSUM_XXH32_testdata[6098] */\n    { 3049, 0x9E3779B1U, 0x8C00785BU }, /* XSUM_XXH32_testdata[6099] */\n    { 3050, 0x00000000U, 0x8BF00BADU }, /* XSUM_XXH32_testdata[6100] */\n    { 3050, 0x9E3779B1U, 0x08C199F5U }, /* XSUM_XXH32_testdata[6101] */\n    { 3051, 0x00000000U, 0xD9EB661CU }, /* XSUM_XXH32_testdata[6102] */\n    { 3051, 0x9E3779B1U, 0x1615E50DU }, /* XSUM_XXH32_testdata[6103] */\n    { 3052, 0x00000000U, 0x09AF9665U }, /* XSUM_XXH32_testdata[6104] */\n    { 3052, 0x9E3779B1U, 0x8001C98FU }, /* XSUM_XXH32_testdata[6105] */\n    { 3053, 0x00000000U, 0x213FC05FU }, /* XSUM_XXH32_testdata[6106] */\n    { 3053, 0x9E3779B1U, 0xFDB85DACU }, /* XSUM_XXH32_testdata[6107] */\n    { 3054, 0x00000000U, 0x330167EEU }, /* XSUM_XXH32_testdata[6108] */\n    { 3054, 0x9E3779B1U, 0x8C7954D3U }, /* XSUM_XXH32_testdata[6109] */\n    { 3055, 0x00000000U, 0x1114A4F7U }, /* XSUM_XXH32_testdata[6110] */\n    { 3055, 0x9E3779B1U, 0x8DD32A76U }, /* XSUM_XXH32_testdata[6111] */\n    { 3056, 0x00000000U, 0xA84F141BU }, /* XSUM_XXH32_testdata[6112] */\n    { 3056, 0x9E3779B1U, 0xA0CFB287U }, /* XSUM_XXH32_testdata[6113] */\n    { 3057, 0x00000000U, 0x46408A5AU }, /* XSUM_XXH32_testdata[6114] */\n    { 3057, 0x9E3779B1U, 0xB332175BU }, /* XSUM_XXH32_testdata[6115] */\n    { 3058, 0x00000000U, 0xE3780AA0U }, /* XSUM_XXH32_testdata[6116] */\n    { 3058, 0x9E3779B1U, 0x00A8A855U }, /* XSUM_XXH32_testdata[6117] */\n    { 3059, 0x00000000U, 0x764D099DU }, /* XSUM_XXH32_testdata[6118] */\n    { 3059, 0x9E3779B1U, 0x092B48AEU }, /* XSUM_XXH32_testdata[6119] */\n    { 3060, 0x00000000U, 0x436F6078U }, /* XSUM_XXH32_testdata[6120] */\n    { 3060, 0x9E3779B1U, 0x4589D0DAU }, /* XSUM_XXH32_testdata[6121] */\n    { 3061, 0x00000000U, 0x2391A33DU }, /* XSUM_XXH32_testdata[6122] */\n    { 3061, 0x9E3779B1U, 0x355113B7U }, /* XSUM_XXH32_testdata[6123] */\n    { 3062, 0x00000000U, 0x60163C95U }, /* XSUM_XXH32_testdata[6124] */\n    { 3062, 0x9E3779B1U, 0xB5CC6958U }, /* XSUM_XXH32_testdata[6125] */\n    { 3063, 0x00000000U, 0x02740200U }, /* XSUM_XXH32_testdata[6126] */\n    { 3063, 0x9E3779B1U, 0x8E0E8A88U }, /* XSUM_XXH32_testdata[6127] */\n    { 3064, 0x00000000U, 0x7846D7E6U }, /* XSUM_XXH32_testdata[6128] */\n    { 3064, 0x9E3779B1U, 0x54DBB912U }, /* XSUM_XXH32_testdata[6129] */\n    { 3065, 0x00000000U, 0x6F098C1FU }, /* XSUM_XXH32_testdata[6130] */\n    { 3065, 0x9E3779B1U, 0xD14C4216U }, /* XSUM_XXH32_testdata[6131] */\n    { 3066, 0x00000000U, 0x99225C5CU }, /* XSUM_XXH32_testdata[6132] */\n    { 3066, 0x9E3779B1U, 0x2BF95082U }, /* XSUM_XXH32_testdata[6133] */\n    { 3067, 0x00000000U, 0x296ED4B0U }, /* XSUM_XXH32_testdata[6134] */\n    { 3067, 0x9E3779B1U, 0xE209F1E1U }, /* XSUM_XXH32_testdata[6135] */\n    { 3068, 0x00000000U, 0x36F7B802U }, /* XSUM_XXH32_testdata[6136] */\n    { 3068, 0x9E3779B1U, 0x26E5BE90U }, /* XSUM_XXH32_testdata[6137] */\n    { 3069, 0x00000000U, 0x3B4B7916U }, /* XSUM_XXH32_testdata[6138] */\n    { 3069, 0x9E3779B1U, 0x72E4B2A2U }, /* XSUM_XXH32_testdata[6139] */\n    { 3070, 0x00000000U, 0x625DFF2CU }, /* XSUM_XXH32_testdata[6140] */\n    { 3070, 0x9E3779B1U, 0x29B404B8U }, /* XSUM_XXH32_testdata[6141] */\n    { 3071, 0x00000000U, 0x449F449CU }, /* XSUM_XXH32_testdata[6142] */\n    { 3071, 0x9E3779B1U, 0xE9AD9AB3U }, /* XSUM_XXH32_testdata[6143] */\n    { 3072, 0x00000000U, 0xA0FDFF1BU }, /* XSUM_XXH32_testdata[6144] */\n    { 3072, 0x9E3779B1U, 0x67E35938U }, /* XSUM_XXH32_testdata[6145] */\n    { 3073, 0x00000000U, 0xE7483D94U }, /* XSUM_XXH32_testdata[6146] */\n    { 3073, 0x9E3779B1U, 0x566A16BDU }, /* XSUM_XXH32_testdata[6147] */\n    { 3074, 0x00000000U, 0x00EA37A4U }, /* XSUM_XXH32_testdata[6148] */\n    { 3074, 0x9E3779B1U, 0x29F448B2U }, /* XSUM_XXH32_testdata[6149] */\n    { 3075, 0x00000000U, 0x053238F7U }, /* XSUM_XXH32_testdata[6150] */\n    { 3075, 0x9E3779B1U, 0x957262A4U }, /* XSUM_XXH32_testdata[6151] */\n    { 3076, 0x00000000U, 0xA3EB26E9U }, /* XSUM_XXH32_testdata[6152] */\n    { 3076, 0x9E3779B1U, 0xDCF26BFCU }, /* XSUM_XXH32_testdata[6153] */\n    { 3077, 0x00000000U, 0xE50C072DU }, /* XSUM_XXH32_testdata[6154] */\n    { 3077, 0x9E3779B1U, 0xC56D7FF2U }, /* XSUM_XXH32_testdata[6155] */\n    { 3078, 0x00000000U, 0xBD5A413EU }, /* XSUM_XXH32_testdata[6156] */\n    { 3078, 0x9E3779B1U, 0x1BBBAC67U }, /* XSUM_XXH32_testdata[6157] */\n    { 3079, 0x00000000U, 0x58F5D25FU }, /* XSUM_XXH32_testdata[6158] */\n    { 3079, 0x9E3779B1U, 0x27668595U }, /* XSUM_XXH32_testdata[6159] */\n    { 3080, 0x00000000U, 0x4BD9A8AAU }, /* XSUM_XXH32_testdata[6160] */\n    { 3080, 0x9E3779B1U, 0x318CA866U }, /* XSUM_XXH32_testdata[6161] */\n    { 3081, 0x00000000U, 0x1F2B243EU }, /* XSUM_XXH32_testdata[6162] */\n    { 3081, 0x9E3779B1U, 0x51FF079AU }, /* XSUM_XXH32_testdata[6163] */\n    { 3082, 0x00000000U, 0x75347DC4U }, /* XSUM_XXH32_testdata[6164] */\n    { 3082, 0x9E3779B1U, 0x88703B3FU }, /* XSUM_XXH32_testdata[6165] */\n    { 3083, 0x00000000U, 0x9BD5BAF2U }, /* XSUM_XXH32_testdata[6166] */\n    { 3083, 0x9E3779B1U, 0xA2670D17U }, /* XSUM_XXH32_testdata[6167] */\n    { 3084, 0x00000000U, 0xB6727943U }, /* XSUM_XXH32_testdata[6168] */\n    { 3084, 0x9E3779B1U, 0x339583BBU }, /* XSUM_XXH32_testdata[6169] */\n    { 3085, 0x00000000U, 0xCAEE49F3U }, /* XSUM_XXH32_testdata[6170] */\n    { 3085, 0x9E3779B1U, 0xB30FD443U }, /* XSUM_XXH32_testdata[6171] */\n    { 3086, 0x00000000U, 0x2AD794ABU }, /* XSUM_XXH32_testdata[6172] */\n    { 3086, 0x9E3779B1U, 0x30BF0A02U }, /* XSUM_XXH32_testdata[6173] */\n    { 3087, 0x00000000U, 0x8ECFAC3DU }, /* XSUM_XXH32_testdata[6174] */\n    { 3087, 0x9E3779B1U, 0xA0320348U }, /* XSUM_XXH32_testdata[6175] */\n    { 3088, 0x00000000U, 0xCEEB962BU }, /* XSUM_XXH32_testdata[6176] */\n    { 3088, 0x9E3779B1U, 0xD2F41917U }, /* XSUM_XXH32_testdata[6177] */\n    { 3089, 0x00000000U, 0x186BB4CEU }, /* XSUM_XXH32_testdata[6178] */\n    { 3089, 0x9E3779B1U, 0xF9B675D1U }, /* XSUM_XXH32_testdata[6179] */\n    { 3090, 0x00000000U, 0xAF0165C0U }, /* XSUM_XXH32_testdata[6180] */\n    { 3090, 0x9E3779B1U, 0x19541AE7U }, /* XSUM_XXH32_testdata[6181] */\n    { 3091, 0x00000000U, 0xA0B93DFAU }, /* XSUM_XXH32_testdata[6182] */\n    { 3091, 0x9E3779B1U, 0xAFF891FFU }, /* XSUM_XXH32_testdata[6183] */\n    { 3092, 0x00000000U, 0xAA524FCBU }, /* XSUM_XXH32_testdata[6184] */\n    { 3092, 0x9E3779B1U, 0x54BEF5C6U }, /* XSUM_XXH32_testdata[6185] */\n    { 3093, 0x00000000U, 0x2E513252U }, /* XSUM_XXH32_testdata[6186] */\n    { 3093, 0x9E3779B1U, 0xF5B2F5A5U }, /* XSUM_XXH32_testdata[6187] */\n    { 3094, 0x00000000U, 0xFDFB5811U }, /* XSUM_XXH32_testdata[6188] */\n    { 3094, 0x9E3779B1U, 0x4C7D0E64U }, /* XSUM_XXH32_testdata[6189] */\n    { 3095, 0x00000000U, 0x0B08D5F4U }, /* XSUM_XXH32_testdata[6190] */\n    { 3095, 0x9E3779B1U, 0x0541E8D7U }, /* XSUM_XXH32_testdata[6191] */\n    { 3096, 0x00000000U, 0x174F7F78U }, /* XSUM_XXH32_testdata[6192] */\n    { 3096, 0x9E3779B1U, 0xBCD26B40U }, /* XSUM_XXH32_testdata[6193] */\n    { 3097, 0x00000000U, 0x3B422793U }, /* XSUM_XXH32_testdata[6194] */\n    { 3097, 0x9E3779B1U, 0x19FF9E1BU }, /* XSUM_XXH32_testdata[6195] */\n    { 3098, 0x00000000U, 0xCB4C9567U }, /* XSUM_XXH32_testdata[6196] */\n    { 3098, 0x9E3779B1U, 0x224AFEA0U }, /* XSUM_XXH32_testdata[6197] */\n    { 3099, 0x00000000U, 0x79993C02U }, /* XSUM_XXH32_testdata[6198] */\n    { 3099, 0x9E3779B1U, 0x12D464AFU }, /* XSUM_XXH32_testdata[6199] */\n    { 3100, 0x00000000U, 0x833D2386U }, /* XSUM_XXH32_testdata[6200] */\n    { 3100, 0x9E3779B1U, 0x332575C2U }, /* XSUM_XXH32_testdata[6201] */\n    { 3101, 0x00000000U, 0x3BA959DBU }, /* XSUM_XXH32_testdata[6202] */\n    { 3101, 0x9E3779B1U, 0x64EA3277U }, /* XSUM_XXH32_testdata[6203] */\n    { 3102, 0x00000000U, 0x0B933AEDU }, /* XSUM_XXH32_testdata[6204] */\n    { 3102, 0x9E3779B1U, 0x2C396C64U }, /* XSUM_XXH32_testdata[6205] */\n    { 3103, 0x00000000U, 0xAB31C79EU }, /* XSUM_XXH32_testdata[6206] */\n    { 3103, 0x9E3779B1U, 0x4DE25C64U }, /* XSUM_XXH32_testdata[6207] */\n    { 3104, 0x00000000U, 0xF2F76764U }, /* XSUM_XXH32_testdata[6208] */\n    { 3104, 0x9E3779B1U, 0x30D3520BU }, /* XSUM_XXH32_testdata[6209] */\n    { 3105, 0x00000000U, 0x18099809U }, /* XSUM_XXH32_testdata[6210] */\n    { 3105, 0x9E3779B1U, 0xCA479E4AU }, /* XSUM_XXH32_testdata[6211] */\n    { 3106, 0x00000000U, 0xB620278DU }, /* XSUM_XXH32_testdata[6212] */\n    { 3106, 0x9E3779B1U, 0x5A2F5AE2U }, /* XSUM_XXH32_testdata[6213] */\n    { 3107, 0x00000000U, 0x8FAA78E5U }, /* XSUM_XXH32_testdata[6214] */\n    { 3107, 0x9E3779B1U, 0x3E9DEEA2U }, /* XSUM_XXH32_testdata[6215] */\n    { 3108, 0x00000000U, 0xC9A6E1ABU }, /* XSUM_XXH32_testdata[6216] */\n    { 3108, 0x9E3779B1U, 0xE7E01671U }, /* XSUM_XXH32_testdata[6217] */\n    { 3109, 0x00000000U, 0x71F31355U }, /* XSUM_XXH32_testdata[6218] */\n    { 3109, 0x9E3779B1U, 0xA757003BU }, /* XSUM_XXH32_testdata[6219] */\n    { 3110, 0x00000000U, 0x80FC6DEBU }, /* XSUM_XXH32_testdata[6220] */\n    { 3110, 0x9E3779B1U, 0xF9C8D1B2U }, /* XSUM_XXH32_testdata[6221] */\n    { 3111, 0x00000000U, 0xB7982649U }, /* XSUM_XXH32_testdata[6222] */\n    { 3111, 0x9E3779B1U, 0x434F40DBU }, /* XSUM_XXH32_testdata[6223] */\n    { 3112, 0x00000000U, 0x26397B91U }, /* XSUM_XXH32_testdata[6224] */\n    { 3112, 0x9E3779B1U, 0xCBA9B3DFU }, /* XSUM_XXH32_testdata[6225] */\n    { 3113, 0x00000000U, 0x00DEBAE6U }, /* XSUM_XXH32_testdata[6226] */\n    { 3113, 0x9E3779B1U, 0x5202E198U }, /* XSUM_XXH32_testdata[6227] */\n    { 3114, 0x00000000U, 0x47E96515U }, /* XSUM_XXH32_testdata[6228] */\n    { 3114, 0x9E3779B1U, 0xD871FFC3U }, /* XSUM_XXH32_testdata[6229] */\n    { 3115, 0x00000000U, 0x03EC5B87U }, /* XSUM_XXH32_testdata[6230] */\n    { 3115, 0x9E3779B1U, 0xB64CD958U }, /* XSUM_XXH32_testdata[6231] */\n    { 3116, 0x00000000U, 0x8164EC50U }, /* XSUM_XXH32_testdata[6232] */\n    { 3116, 0x9E3779B1U, 0x0250BA05U }, /* XSUM_XXH32_testdata[6233] */\n    { 3117, 0x00000000U, 0x598FF0FBU }, /* XSUM_XXH32_testdata[6234] */\n    { 3117, 0x9E3779B1U, 0x342BA701U }, /* XSUM_XXH32_testdata[6235] */\n    { 3118, 0x00000000U, 0x361F1A0AU }, /* XSUM_XXH32_testdata[6236] */\n    { 3118, 0x9E3779B1U, 0x588F5B9CU }, /* XSUM_XXH32_testdata[6237] */\n    { 3119, 0x00000000U, 0x1F8B80AAU }, /* XSUM_XXH32_testdata[6238] */\n    { 3119, 0x9E3779B1U, 0xD8BEDE1BU }, /* XSUM_XXH32_testdata[6239] */\n    { 3120, 0x00000000U, 0x4FEE03B1U }, /* XSUM_XXH32_testdata[6240] */\n    { 3120, 0x9E3779B1U, 0x23DB3750U }, /* XSUM_XXH32_testdata[6241] */\n    { 3121, 0x00000000U, 0x16C4B329U }, /* XSUM_XXH32_testdata[6242] */\n    { 3121, 0x9E3779B1U, 0x751AFB46U }, /* XSUM_XXH32_testdata[6243] */\n    { 3122, 0x00000000U, 0x74F2D8D3U }, /* XSUM_XXH32_testdata[6244] */\n    { 3122, 0x9E3779B1U, 0xF8BCDCBCU }, /* XSUM_XXH32_testdata[6245] */\n    { 3123, 0x00000000U, 0x1DA68D82U }, /* XSUM_XXH32_testdata[6246] */\n    { 3123, 0x9E3779B1U, 0x4E3CB62AU }, /* XSUM_XXH32_testdata[6247] */\n    { 3124, 0x00000000U, 0x471A6C7EU }, /* XSUM_XXH32_testdata[6248] */\n    { 3124, 0x9E3779B1U, 0xD9C5D9F6U }, /* XSUM_XXH32_testdata[6249] */\n    { 3125, 0x00000000U, 0xC71BD5AAU }, /* XSUM_XXH32_testdata[6250] */\n    { 3125, 0x9E3779B1U, 0xB402481FU }, /* XSUM_XXH32_testdata[6251] */\n    { 3126, 0x00000000U, 0xDFBB31E5U }, /* XSUM_XXH32_testdata[6252] */\n    { 3126, 0x9E3779B1U, 0xACDDED03U }, /* XSUM_XXH32_testdata[6253] */\n    { 3127, 0x00000000U, 0xA088651FU }, /* XSUM_XXH32_testdata[6254] */\n    { 3127, 0x9E3779B1U, 0x9E391935U }, /* XSUM_XXH32_testdata[6255] */\n    { 3128, 0x00000000U, 0x2849F292U }, /* XSUM_XXH32_testdata[6256] */\n    { 3128, 0x9E3779B1U, 0x8F1F943FU }, /* XSUM_XXH32_testdata[6257] */\n    { 3129, 0x00000000U, 0x7D1EA42DU }, /* XSUM_XXH32_testdata[6258] */\n    { 3129, 0x9E3779B1U, 0x6F54117CU }, /* XSUM_XXH32_testdata[6259] */\n    { 3130, 0x00000000U, 0x4896187BU }, /* XSUM_XXH32_testdata[6260] */\n    { 3130, 0x9E3779B1U, 0x6496E34FU }, /* XSUM_XXH32_testdata[6261] */\n    { 3131, 0x00000000U, 0x7997DF9CU }, /* XSUM_XXH32_testdata[6262] */\n    { 3131, 0x9E3779B1U, 0x6B8184D4U }, /* XSUM_XXH32_testdata[6263] */\n    { 3132, 0x00000000U, 0x0C2D23BDU }, /* XSUM_XXH32_testdata[6264] */\n    { 3132, 0x9E3779B1U, 0x45D10366U }, /* XSUM_XXH32_testdata[6265] */\n    { 3133, 0x00000000U, 0x33D90B93U }, /* XSUM_XXH32_testdata[6266] */\n    { 3133, 0x9E3779B1U, 0x087A7D97U }, /* XSUM_XXH32_testdata[6267] */\n    { 3134, 0x00000000U, 0xAF4AA558U }, /* XSUM_XXH32_testdata[6268] */\n    { 3134, 0x9E3779B1U, 0x61497C38U }, /* XSUM_XXH32_testdata[6269] */\n    { 3135, 0x00000000U, 0xEE45D13BU }, /* XSUM_XXH32_testdata[6270] */\n    { 3135, 0x9E3779B1U, 0xB08E73A5U }, /* XSUM_XXH32_testdata[6271] */\n    { 3136, 0x00000000U, 0xD235FE2DU }, /* XSUM_XXH32_testdata[6272] */\n    { 3136, 0x9E3779B1U, 0xFE40CD43U }, /* XSUM_XXH32_testdata[6273] */\n    { 3137, 0x00000000U, 0xD12843BEU }, /* XSUM_XXH32_testdata[6274] */\n    { 3137, 0x9E3779B1U, 0xF1FD0CBEU }, /* XSUM_XXH32_testdata[6275] */\n    { 3138, 0x00000000U, 0x264EB7F5U }, /* XSUM_XXH32_testdata[6276] */\n    { 3138, 0x9E3779B1U, 0x02B75CFFU }, /* XSUM_XXH32_testdata[6277] */\n    { 3139, 0x00000000U, 0x8C7DFB2FU }, /* XSUM_XXH32_testdata[6278] */\n    { 3139, 0x9E3779B1U, 0xEC45FCE8U }, /* XSUM_XXH32_testdata[6279] */\n    { 3140, 0x00000000U, 0x9146025EU }, /* XSUM_XXH32_testdata[6280] */\n    { 3140, 0x9E3779B1U, 0x1F38B156U }, /* XSUM_XXH32_testdata[6281] */\n    { 3141, 0x00000000U, 0x5FF2766DU }, /* XSUM_XXH32_testdata[6282] */\n    { 3141, 0x9E3779B1U, 0xA5413F98U }, /* XSUM_XXH32_testdata[6283] */\n    { 3142, 0x00000000U, 0xA88969E3U }, /* XSUM_XXH32_testdata[6284] */\n    { 3142, 0x9E3779B1U, 0x55805C1EU }, /* XSUM_XXH32_testdata[6285] */\n    { 3143, 0x00000000U, 0x9283DCF7U }, /* XSUM_XXH32_testdata[6286] */\n    { 3143, 0x9E3779B1U, 0x1A6B8D1DU }, /* XSUM_XXH32_testdata[6287] */\n    { 3144, 0x00000000U, 0x37318368U }, /* XSUM_XXH32_testdata[6288] */\n    { 3144, 0x9E3779B1U, 0xFE217DF2U }, /* XSUM_XXH32_testdata[6289] */\n    { 3145, 0x00000000U, 0x65E78447U }, /* XSUM_XXH32_testdata[6290] */\n    { 3145, 0x9E3779B1U, 0xB5E1F43CU }, /* XSUM_XXH32_testdata[6291] */\n    { 3146, 0x00000000U, 0x59069A59U }, /* XSUM_XXH32_testdata[6292] */\n    { 3146, 0x9E3779B1U, 0x860F50C8U }, /* XSUM_XXH32_testdata[6293] */\n    { 3147, 0x00000000U, 0x3C9225C4U }, /* XSUM_XXH32_testdata[6294] */\n    { 3147, 0x9E3779B1U, 0xDB0DF5B5U }, /* XSUM_XXH32_testdata[6295] */\n    { 3148, 0x00000000U, 0x7747A93EU }, /* XSUM_XXH32_testdata[6296] */\n    { 3148, 0x9E3779B1U, 0x031DF7FDU }, /* XSUM_XXH32_testdata[6297] */\n    { 3149, 0x00000000U, 0xA195194BU }, /* XSUM_XXH32_testdata[6298] */\n    { 3149, 0x9E3779B1U, 0xF6475F00U }, /* XSUM_XXH32_testdata[6299] */\n    { 3150, 0x00000000U, 0xBD2CE7F4U }, /* XSUM_XXH32_testdata[6300] */\n    { 3150, 0x9E3779B1U, 0x80BE1634U }, /* XSUM_XXH32_testdata[6301] */\n    { 3151, 0x00000000U, 0xA2F026E9U }, /* XSUM_XXH32_testdata[6302] */\n    { 3151, 0x9E3779B1U, 0x4E2A5D06U }, /* XSUM_XXH32_testdata[6303] */\n    { 3152, 0x00000000U, 0xEF5C95F2U }, /* XSUM_XXH32_testdata[6304] */\n    { 3152, 0x9E3779B1U, 0xC301871FU }, /* XSUM_XXH32_testdata[6305] */\n    { 3153, 0x00000000U, 0x112EE61CU }, /* XSUM_XXH32_testdata[6306] */\n    { 3153, 0x9E3779B1U, 0xF76C766DU }, /* XSUM_XXH32_testdata[6307] */\n    { 3154, 0x00000000U, 0x8EC20863U }, /* XSUM_XXH32_testdata[6308] */\n    { 3154, 0x9E3779B1U, 0xF2A61858U }, /* XSUM_XXH32_testdata[6309] */\n    { 3155, 0x00000000U, 0xEBB89A0FU }, /* XSUM_XXH32_testdata[6310] */\n    { 3155, 0x9E3779B1U, 0x22C16BCBU }, /* XSUM_XXH32_testdata[6311] */\n    { 3156, 0x00000000U, 0xB496ED4FU }, /* XSUM_XXH32_testdata[6312] */\n    { 3156, 0x9E3779B1U, 0x419F8EE7U }, /* XSUM_XXH32_testdata[6313] */\n    { 3157, 0x00000000U, 0x611F6C8CU }, /* XSUM_XXH32_testdata[6314] */\n    { 3157, 0x9E3779B1U, 0x5C7EF2CAU }, /* XSUM_XXH32_testdata[6315] */\n    { 3158, 0x00000000U, 0xB9CA36BCU }, /* XSUM_XXH32_testdata[6316] */\n    { 3158, 0x9E3779B1U, 0xD95D24EEU }, /* XSUM_XXH32_testdata[6317] */\n    { 3159, 0x00000000U, 0xC94B8371U }, /* XSUM_XXH32_testdata[6318] */\n    { 3159, 0x9E3779B1U, 0x532BD4BCU }, /* XSUM_XXH32_testdata[6319] */\n    { 3160, 0x00000000U, 0x0713B8A6U }, /* XSUM_XXH32_testdata[6320] */\n    { 3160, 0x9E3779B1U, 0xE2490945U }, /* XSUM_XXH32_testdata[6321] */\n    { 3161, 0x00000000U, 0x14E2DDAEU }, /* XSUM_XXH32_testdata[6322] */\n    { 3161, 0x9E3779B1U, 0x877A32C8U }, /* XSUM_XXH32_testdata[6323] */\n    { 3162, 0x00000000U, 0x7EEC98C5U }, /* XSUM_XXH32_testdata[6324] */\n    { 3162, 0x9E3779B1U, 0xEF999B5CU }, /* XSUM_XXH32_testdata[6325] */\n    { 3163, 0x00000000U, 0xD21604D0U }, /* XSUM_XXH32_testdata[6326] */\n    { 3163, 0x9E3779B1U, 0x192C3A4EU }, /* XSUM_XXH32_testdata[6327] */\n    { 3164, 0x00000000U, 0x5C9A13EFU }, /* XSUM_XXH32_testdata[6328] */\n    { 3164, 0x9E3779B1U, 0x40AF4518U }, /* XSUM_XXH32_testdata[6329] */\n    { 3165, 0x00000000U, 0xC5088103U }, /* XSUM_XXH32_testdata[6330] */\n    { 3165, 0x9E3779B1U, 0xC613F458U }, /* XSUM_XXH32_testdata[6331] */\n    { 3166, 0x00000000U, 0x0D89262FU }, /* XSUM_XXH32_testdata[6332] */\n    { 3166, 0x9E3779B1U, 0x313ED00CU }, /* XSUM_XXH32_testdata[6333] */\n    { 3167, 0x00000000U, 0x965FEE6BU }, /* XSUM_XXH32_testdata[6334] */\n    { 3167, 0x9E3779B1U, 0x53FD0764U }, /* XSUM_XXH32_testdata[6335] */\n    { 3168, 0x00000000U, 0x09D04E0FU }, /* XSUM_XXH32_testdata[6336] */\n    { 3168, 0x9E3779B1U, 0xB4378BE3U }, /* XSUM_XXH32_testdata[6337] */\n    { 3169, 0x00000000U, 0xAE61180AU }, /* XSUM_XXH32_testdata[6338] */\n    { 3169, 0x9E3779B1U, 0x330D2027U }, /* XSUM_XXH32_testdata[6339] */\n    { 3170, 0x00000000U, 0x115A2C00U }, /* XSUM_XXH32_testdata[6340] */\n    { 3170, 0x9E3779B1U, 0x5DB53F41U }, /* XSUM_XXH32_testdata[6341] */\n    { 3171, 0x00000000U, 0xF96AE1B0U }, /* XSUM_XXH32_testdata[6342] */\n    { 3171, 0x9E3779B1U, 0xE269BB5CU }, /* XSUM_XXH32_testdata[6343] */\n    { 3172, 0x00000000U, 0xFB374AAFU }, /* XSUM_XXH32_testdata[6344] */\n    { 3172, 0x9E3779B1U, 0xD5DFB27EU }, /* XSUM_XXH32_testdata[6345] */\n    { 3173, 0x00000000U, 0x212415C0U }, /* XSUM_XXH32_testdata[6346] */\n    { 3173, 0x9E3779B1U, 0xFB23A2BEU }, /* XSUM_XXH32_testdata[6347] */\n    { 3174, 0x00000000U, 0x0FF88F21U }, /* XSUM_XXH32_testdata[6348] */\n    { 3174, 0x9E3779B1U, 0xAC6B2D0CU }, /* XSUM_XXH32_testdata[6349] */\n    { 3175, 0x00000000U, 0x2B0AC506U }, /* XSUM_XXH32_testdata[6350] */\n    { 3175, 0x9E3779B1U, 0xE2CD58E9U }, /* XSUM_XXH32_testdata[6351] */\n    { 3176, 0x00000000U, 0x0E676CF2U }, /* XSUM_XXH32_testdata[6352] */\n    { 3176, 0x9E3779B1U, 0x17B54D7EU }, /* XSUM_XXH32_testdata[6353] */\n    { 3177, 0x00000000U, 0x62421C20U }, /* XSUM_XXH32_testdata[6354] */\n    { 3177, 0x9E3779B1U, 0xB4D551BBU }, /* XSUM_XXH32_testdata[6355] */\n    { 3178, 0x00000000U, 0x35816186U }, /* XSUM_XXH32_testdata[6356] */\n    { 3178, 0x9E3779B1U, 0xB05D3C93U }, /* XSUM_XXH32_testdata[6357] */\n    { 3179, 0x00000000U, 0x90EE14C0U }, /* XSUM_XXH32_testdata[6358] */\n    { 3179, 0x9E3779B1U, 0x45D85FA8U }, /* XSUM_XXH32_testdata[6359] */\n    { 3180, 0x00000000U, 0xC4ECE2CEU }, /* XSUM_XXH32_testdata[6360] */\n    { 3180, 0x9E3779B1U, 0xA092A0F6U }, /* XSUM_XXH32_testdata[6361] */\n    { 3181, 0x00000000U, 0x2155D5C7U }, /* XSUM_XXH32_testdata[6362] */\n    { 3181, 0x9E3779B1U, 0xC55B2AEAU }, /* XSUM_XXH32_testdata[6363] */\n    { 3182, 0x00000000U, 0x17639761U }, /* XSUM_XXH32_testdata[6364] */\n    { 3182, 0x9E3779B1U, 0x529DF2B9U }, /* XSUM_XXH32_testdata[6365] */\n    { 3183, 0x00000000U, 0x0BA30CB0U }, /* XSUM_XXH32_testdata[6366] */\n    { 3183, 0x9E3779B1U, 0x18813F17U }, /* XSUM_XXH32_testdata[6367] */\n    { 3184, 0x00000000U, 0xCC152381U }, /* XSUM_XXH32_testdata[6368] */\n    { 3184, 0x9E3779B1U, 0xE548D846U }, /* XSUM_XXH32_testdata[6369] */\n    { 3185, 0x00000000U, 0x8918EC23U }, /* XSUM_XXH32_testdata[6370] */\n    { 3185, 0x9E3779B1U, 0xD118CA7DU }, /* XSUM_XXH32_testdata[6371] */\n    { 3186, 0x00000000U, 0x40AF52E9U }, /* XSUM_XXH32_testdata[6372] */\n    { 3186, 0x9E3779B1U, 0x6664BF7BU }, /* XSUM_XXH32_testdata[6373] */\n    { 3187, 0x00000000U, 0x6ACE34EDU }, /* XSUM_XXH32_testdata[6374] */\n    { 3187, 0x9E3779B1U, 0x57488E57U }, /* XSUM_XXH32_testdata[6375] */\n    { 3188, 0x00000000U, 0xAD9D0E93U }, /* XSUM_XXH32_testdata[6376] */\n    { 3188, 0x9E3779B1U, 0xA4560825U }, /* XSUM_XXH32_testdata[6377] */\n    { 3189, 0x00000000U, 0xF5DEF529U }, /* XSUM_XXH32_testdata[6378] */\n    { 3189, 0x9E3779B1U, 0xFCE7A71DU }, /* XSUM_XXH32_testdata[6379] */\n    { 3190, 0x00000000U, 0x403D7389U }, /* XSUM_XXH32_testdata[6380] */\n    { 3190, 0x9E3779B1U, 0xABDB9466U }, /* XSUM_XXH32_testdata[6381] */\n    { 3191, 0x00000000U, 0xC3D5BFEBU }, /* XSUM_XXH32_testdata[6382] */\n    { 3191, 0x9E3779B1U, 0x7904F565U }, /* XSUM_XXH32_testdata[6383] */\n    { 3192, 0x00000000U, 0xCD931FA8U }, /* XSUM_XXH32_testdata[6384] */\n    { 3192, 0x9E3779B1U, 0x45C5A5C4U }, /* XSUM_XXH32_testdata[6385] */\n    { 3193, 0x00000000U, 0x756DB004U }, /* XSUM_XXH32_testdata[6386] */\n    { 3193, 0x9E3779B1U, 0x53280EDEU }, /* XSUM_XXH32_testdata[6387] */\n    { 3194, 0x00000000U, 0x106C7308U }, /* XSUM_XXH32_testdata[6388] */\n    { 3194, 0x9E3779B1U, 0x93A20298U }, /* XSUM_XXH32_testdata[6389] */\n    { 3195, 0x00000000U, 0x04E4CE1CU }, /* XSUM_XXH32_testdata[6390] */\n    { 3195, 0x9E3779B1U, 0x6A2726FFU }, /* XSUM_XXH32_testdata[6391] */\n    { 3196, 0x00000000U, 0x246BC429U }, /* XSUM_XXH32_testdata[6392] */\n    { 3196, 0x9E3779B1U, 0xFFBAE096U }, /* XSUM_XXH32_testdata[6393] */\n    { 3197, 0x00000000U, 0x8E3FDEE9U }, /* XSUM_XXH32_testdata[6394] */\n    { 3197, 0x9E3779B1U, 0xE8B5A42EU }, /* XSUM_XXH32_testdata[6395] */\n    { 3198, 0x00000000U, 0x6BD846A6U }, /* XSUM_XXH32_testdata[6396] */\n    { 3198, 0x9E3779B1U, 0x7CEFF93FU }, /* XSUM_XXH32_testdata[6397] */\n    { 3199, 0x00000000U, 0xC1B4CAFAU }, /* XSUM_XXH32_testdata[6398] */\n    { 3199, 0x9E3779B1U, 0xD936CDCEU }, /* XSUM_XXH32_testdata[6399] */\n    { 3200, 0x00000000U, 0xE0342D1DU }, /* XSUM_XXH32_testdata[6400] */\n    { 3200, 0x9E3779B1U, 0xA5385573U }, /* XSUM_XXH32_testdata[6401] */\n    { 3201, 0x00000000U, 0xF619D53CU }, /* XSUM_XXH32_testdata[6402] */\n    { 3201, 0x9E3779B1U, 0xD3253FC8U }, /* XSUM_XXH32_testdata[6403] */\n    { 3202, 0x00000000U, 0x19ADCC70U }, /* XSUM_XXH32_testdata[6404] */\n    { 3202, 0x9E3779B1U, 0xF3ADCBF6U }, /* XSUM_XXH32_testdata[6405] */\n    { 3203, 0x00000000U, 0x1DC16C5BU }, /* XSUM_XXH32_testdata[6406] */\n    { 3203, 0x9E3779B1U, 0x5EA1E98FU }, /* XSUM_XXH32_testdata[6407] */\n    { 3204, 0x00000000U, 0xC99E62DBU }, /* XSUM_XXH32_testdata[6408] */\n    { 3204, 0x9E3779B1U, 0x16AA36C0U }, /* XSUM_XXH32_testdata[6409] */\n    { 3205, 0x00000000U, 0x265E1D17U }, /* XSUM_XXH32_testdata[6410] */\n    { 3205, 0x9E3779B1U, 0x94A4586DU }, /* XSUM_XXH32_testdata[6411] */\n    { 3206, 0x00000000U, 0xCD877560U }, /* XSUM_XXH32_testdata[6412] */\n    { 3206, 0x9E3779B1U, 0x0DA48480U }, /* XSUM_XXH32_testdata[6413] */\n    { 3207, 0x00000000U, 0x00592DEFU }, /* XSUM_XXH32_testdata[6414] */\n    { 3207, 0x9E3779B1U, 0x51CCAEDAU }, /* XSUM_XXH32_testdata[6415] */\n    { 3208, 0x00000000U, 0x445C408FU }, /* XSUM_XXH32_testdata[6416] */\n    { 3208, 0x9E3779B1U, 0x3856ADA4U }, /* XSUM_XXH32_testdata[6417] */\n    { 3209, 0x00000000U, 0x9741E838U }, /* XSUM_XXH32_testdata[6418] */\n    { 3209, 0x9E3779B1U, 0x1BDF26D8U }, /* XSUM_XXH32_testdata[6419] */\n    { 3210, 0x00000000U, 0x1417F232U }, /* XSUM_XXH32_testdata[6420] */\n    { 3210, 0x9E3779B1U, 0x62DD81B7U }, /* XSUM_XXH32_testdata[6421] */\n    { 3211, 0x00000000U, 0x62DA5B7CU }, /* XSUM_XXH32_testdata[6422] */\n    { 3211, 0x9E3779B1U, 0x5B196DA5U }, /* XSUM_XXH32_testdata[6423] */\n    { 3212, 0x00000000U, 0x3B069509U }, /* XSUM_XXH32_testdata[6424] */\n    { 3212, 0x9E3779B1U, 0x5B29F17AU }, /* XSUM_XXH32_testdata[6425] */\n    { 3213, 0x00000000U, 0xC5A43851U }, /* XSUM_XXH32_testdata[6426] */\n    { 3213, 0x9E3779B1U, 0xB25ADC0EU }, /* XSUM_XXH32_testdata[6427] */\n    { 3214, 0x00000000U, 0xCC590B5AU }, /* XSUM_XXH32_testdata[6428] */\n    { 3214, 0x9E3779B1U, 0x007C1AD1U }, /* XSUM_XXH32_testdata[6429] */\n    { 3215, 0x00000000U, 0xA8607CE5U }, /* XSUM_XXH32_testdata[6430] */\n    { 3215, 0x9E3779B1U, 0xA573BD8CU }, /* XSUM_XXH32_testdata[6431] */\n    { 3216, 0x00000000U, 0x42F28507U }, /* XSUM_XXH32_testdata[6432] */\n    { 3216, 0x9E3779B1U, 0x6D4E9010U }, /* XSUM_XXH32_testdata[6433] */\n    { 3217, 0x00000000U, 0x839D5D2DU }, /* XSUM_XXH32_testdata[6434] */\n    { 3217, 0x9E3779B1U, 0x574C747CU }, /* XSUM_XXH32_testdata[6435] */\n    { 3218, 0x00000000U, 0x1771DE8AU }, /* XSUM_XXH32_testdata[6436] */\n    { 3218, 0x9E3779B1U, 0x93F7D225U }, /* XSUM_XXH32_testdata[6437] */\n    { 3219, 0x00000000U, 0x95534138U }, /* XSUM_XXH32_testdata[6438] */\n    { 3219, 0x9E3779B1U, 0x102DBB95U }, /* XSUM_XXH32_testdata[6439] */\n    { 3220, 0x00000000U, 0x05ABC536U }, /* XSUM_XXH32_testdata[6440] */\n    { 3220, 0x9E3779B1U, 0xD753739BU }, /* XSUM_XXH32_testdata[6441] */\n    { 3221, 0x00000000U, 0xEE982049U }, /* XSUM_XXH32_testdata[6442] */\n    { 3221, 0x9E3779B1U, 0x959F3AA2U }, /* XSUM_XXH32_testdata[6443] */\n    { 3222, 0x00000000U, 0x73868AFFU }, /* XSUM_XXH32_testdata[6444] */\n    { 3222, 0x9E3779B1U, 0xAC70F02EU }, /* XSUM_XXH32_testdata[6445] */\n    { 3223, 0x00000000U, 0xF75C05ECU }, /* XSUM_XXH32_testdata[6446] */\n    { 3223, 0x9E3779B1U, 0x99CAF52FU }, /* XSUM_XXH32_testdata[6447] */\n    { 3224, 0x00000000U, 0xBC3692D0U }, /* XSUM_XXH32_testdata[6448] */\n    { 3224, 0x9E3779B1U, 0x81AC3805U }, /* XSUM_XXH32_testdata[6449] */\n    { 3225, 0x00000000U, 0x680E5B4DU }, /* XSUM_XXH32_testdata[6450] */\n    { 3225, 0x9E3779B1U, 0x4B1EF946U }, /* XSUM_XXH32_testdata[6451] */\n    { 3226, 0x00000000U, 0x019B60A0U }, /* XSUM_XXH32_testdata[6452] */\n    { 3226, 0x9E3779B1U, 0x2937E9F3U }, /* XSUM_XXH32_testdata[6453] */\n    { 3227, 0x00000000U, 0x2F301897U }, /* XSUM_XXH32_testdata[6454] */\n    { 3227, 0x9E3779B1U, 0x6185A47AU }, /* XSUM_XXH32_testdata[6455] */\n    { 3228, 0x00000000U, 0xA7869CF4U }, /* XSUM_XXH32_testdata[6456] */\n    { 3228, 0x9E3779B1U, 0x609D5F20U }, /* XSUM_XXH32_testdata[6457] */\n    { 3229, 0x00000000U, 0x8819EF16U }, /* XSUM_XXH32_testdata[6458] */\n    { 3229, 0x9E3779B1U, 0x6D4AA29DU }, /* XSUM_XXH32_testdata[6459] */\n    { 3230, 0x00000000U, 0x06F31D35U }, /* XSUM_XXH32_testdata[6460] */\n    { 3230, 0x9E3779B1U, 0x05DBEF3FU }, /* XSUM_XXH32_testdata[6461] */\n    { 3231, 0x00000000U, 0x741E61C3U }, /* XSUM_XXH32_testdata[6462] */\n    { 3231, 0x9E3779B1U, 0x4A0AD26DU }, /* XSUM_XXH32_testdata[6463] */\n    { 3232, 0x00000000U, 0x856224CDU }, /* XSUM_XXH32_testdata[6464] */\n    { 3232, 0x9E3779B1U, 0x972BF207U }, /* XSUM_XXH32_testdata[6465] */\n    { 3233, 0x00000000U, 0xCA67A7CCU }, /* XSUM_XXH32_testdata[6466] */\n    { 3233, 0x9E3779B1U, 0xB910A3C8U }, /* XSUM_XXH32_testdata[6467] */\n    { 3234, 0x00000000U, 0x655C5B3AU }, /* XSUM_XXH32_testdata[6468] */\n    { 3234, 0x9E3779B1U, 0x6FE6356AU }, /* XSUM_XXH32_testdata[6469] */\n    { 3235, 0x00000000U, 0x25B00DDAU }, /* XSUM_XXH32_testdata[6470] */\n    { 3235, 0x9E3779B1U, 0x2C7197EBU }, /* XSUM_XXH32_testdata[6471] */\n    { 3236, 0x00000000U, 0x4AD29ACBU }, /* XSUM_XXH32_testdata[6472] */\n    { 3236, 0x9E3779B1U, 0x111614C2U }, /* XSUM_XXH32_testdata[6473] */\n    { 3237, 0x00000000U, 0x1AA35D49U }, /* XSUM_XXH32_testdata[6474] */\n    { 3237, 0x9E3779B1U, 0x41BC4F23U }, /* XSUM_XXH32_testdata[6475] */\n    { 3238, 0x00000000U, 0xF7B66E12U }, /* XSUM_XXH32_testdata[6476] */\n    { 3238, 0x9E3779B1U, 0x0B48F6B8U }, /* XSUM_XXH32_testdata[6477] */\n    { 3239, 0x00000000U, 0x204E3726U }, /* XSUM_XXH32_testdata[6478] */\n    { 3239, 0x9E3779B1U, 0x18E915A1U }, /* XSUM_XXH32_testdata[6479] */\n    { 3240, 0x00000000U, 0x95E7D6EAU }, /* XSUM_XXH32_testdata[6480] */\n    { 3240, 0x9E3779B1U, 0x6E612374U }, /* XSUM_XXH32_testdata[6481] */\n    { 3241, 0x00000000U, 0x61754B6BU }, /* XSUM_XXH32_testdata[6482] */\n    { 3241, 0x9E3779B1U, 0xB623D164U }, /* XSUM_XXH32_testdata[6483] */\n    { 3242, 0x00000000U, 0x085B90DBU }, /* XSUM_XXH32_testdata[6484] */\n    { 3242, 0x9E3779B1U, 0x6331B57BU }, /* XSUM_XXH32_testdata[6485] */\n    { 3243, 0x00000000U, 0x476C0FFFU }, /* XSUM_XXH32_testdata[6486] */\n    { 3243, 0x9E3779B1U, 0xE28C1525U }, /* XSUM_XXH32_testdata[6487] */\n    { 3244, 0x00000000U, 0x8D803DB5U }, /* XSUM_XXH32_testdata[6488] */\n    { 3244, 0x9E3779B1U, 0x3199AB10U }, /* XSUM_XXH32_testdata[6489] */\n    { 3245, 0x00000000U, 0xF488DA7FU }, /* XSUM_XXH32_testdata[6490] */\n    { 3245, 0x9E3779B1U, 0x5F7DA49EU }, /* XSUM_XXH32_testdata[6491] */\n    { 3246, 0x00000000U, 0x8812A715U }, /* XSUM_XXH32_testdata[6492] */\n    { 3246, 0x9E3779B1U, 0x917B42E4U }, /* XSUM_XXH32_testdata[6493] */\n    { 3247, 0x00000000U, 0x5F4C12EEU }, /* XSUM_XXH32_testdata[6494] */\n    { 3247, 0x9E3779B1U, 0x35A623D9U }, /* XSUM_XXH32_testdata[6495] */\n    { 3248, 0x00000000U, 0x600E82ADU }, /* XSUM_XXH32_testdata[6496] */\n    { 3248, 0x9E3779B1U, 0x8AD5A40BU }, /* XSUM_XXH32_testdata[6497] */\n    { 3249, 0x00000000U, 0x23BE9DCBU }, /* XSUM_XXH32_testdata[6498] */\n    { 3249, 0x9E3779B1U, 0x3491D915U }, /* XSUM_XXH32_testdata[6499] */\n    { 3250, 0x00000000U, 0x4CAD4682U }, /* XSUM_XXH32_testdata[6500] */\n    { 3250, 0x9E3779B1U, 0x6FE0CEC1U }, /* XSUM_XXH32_testdata[6501] */\n    { 3251, 0x00000000U, 0xD1E7C008U }, /* XSUM_XXH32_testdata[6502] */\n    { 3251, 0x9E3779B1U, 0x5DBE5109U }, /* XSUM_XXH32_testdata[6503] */\n    { 3252, 0x00000000U, 0x3013DBCFU }, /* XSUM_XXH32_testdata[6504] */\n    { 3252, 0x9E3779B1U, 0x11640895U }, /* XSUM_XXH32_testdata[6505] */\n    { 3253, 0x00000000U, 0x386A63A5U }, /* XSUM_XXH32_testdata[6506] */\n    { 3253, 0x9E3779B1U, 0x4473A915U }, /* XSUM_XXH32_testdata[6507] */\n    { 3254, 0x00000000U, 0x10BDF5D0U }, /* XSUM_XXH32_testdata[6508] */\n    { 3254, 0x9E3779B1U, 0x182894D9U }, /* XSUM_XXH32_testdata[6509] */\n    { 3255, 0x00000000U, 0xC6E614F4U }, /* XSUM_XXH32_testdata[6510] */\n    { 3255, 0x9E3779B1U, 0x91906BF1U }, /* XSUM_XXH32_testdata[6511] */\n    { 3256, 0x00000000U, 0xB93BC1D1U }, /* XSUM_XXH32_testdata[6512] */\n    { 3256, 0x9E3779B1U, 0xC22C454FU }, /* XSUM_XXH32_testdata[6513] */\n    { 3257, 0x00000000U, 0xAA6B81D5U }, /* XSUM_XXH32_testdata[6514] */\n    { 3257, 0x9E3779B1U, 0xFEC51FE4U }, /* XSUM_XXH32_testdata[6515] */\n    { 3258, 0x00000000U, 0xC0126AEDU }, /* XSUM_XXH32_testdata[6516] */\n    { 3258, 0x9E3779B1U, 0xBA3A1845U }, /* XSUM_XXH32_testdata[6517] */\n    { 3259, 0x00000000U, 0x3EC9BC82U }, /* XSUM_XXH32_testdata[6518] */\n    { 3259, 0x9E3779B1U, 0xEBB0C4A6U }, /* XSUM_XXH32_testdata[6519] */\n    { 3260, 0x00000000U, 0xC6858062U }, /* XSUM_XXH32_testdata[6520] */\n    { 3260, 0x9E3779B1U, 0x40FA8953U }, /* XSUM_XXH32_testdata[6521] */\n    { 3261, 0x00000000U, 0xC6774D9FU }, /* XSUM_XXH32_testdata[6522] */\n    { 3261, 0x9E3779B1U, 0x3DDF5844U }, /* XSUM_XXH32_testdata[6523] */\n    { 3262, 0x00000000U, 0x2C0441B5U }, /* XSUM_XXH32_testdata[6524] */\n    { 3262, 0x9E3779B1U, 0x27F83A50U }, /* XSUM_XXH32_testdata[6525] */\n    { 3263, 0x00000000U, 0xFAE26B64U }, /* XSUM_XXH32_testdata[6526] */\n    { 3263, 0x9E3779B1U, 0x54963B15U }, /* XSUM_XXH32_testdata[6527] */\n    { 3264, 0x00000000U, 0x8E95005CU }, /* XSUM_XXH32_testdata[6528] */\n    { 3264, 0x9E3779B1U, 0x40337F85U }, /* XSUM_XXH32_testdata[6529] */\n    { 3265, 0x00000000U, 0x93AFC1C9U }, /* XSUM_XXH32_testdata[6530] */\n    { 3265, 0x9E3779B1U, 0x19F2A63CU }, /* XSUM_XXH32_testdata[6531] */\n    { 3266, 0x00000000U, 0x484E3BF5U }, /* XSUM_XXH32_testdata[6532] */\n    { 3266, 0x9E3779B1U, 0x4EDD46CAU }, /* XSUM_XXH32_testdata[6533] */\n    { 3267, 0x00000000U, 0x35B83394U }, /* XSUM_XXH32_testdata[6534] */\n    { 3267, 0x9E3779B1U, 0x3052221CU }, /* XSUM_XXH32_testdata[6535] */\n    { 3268, 0x00000000U, 0x1F2BECC8U }, /* XSUM_XXH32_testdata[6536] */\n    { 3268, 0x9E3779B1U, 0xD01AD33CU }, /* XSUM_XXH32_testdata[6537] */\n    { 3269, 0x00000000U, 0xD99E9DB5U }, /* XSUM_XXH32_testdata[6538] */\n    { 3269, 0x9E3779B1U, 0xD988BDD6U }, /* XSUM_XXH32_testdata[6539] */\n    { 3270, 0x00000000U, 0x64E5A176U }, /* XSUM_XXH32_testdata[6540] */\n    { 3270, 0x9E3779B1U, 0x6514AB22U }, /* XSUM_XXH32_testdata[6541] */\n    { 3271, 0x00000000U, 0x8ECB2A37U }, /* XSUM_XXH32_testdata[6542] */\n    { 3271, 0x9E3779B1U, 0x5EB59754U }, /* XSUM_XXH32_testdata[6543] */\n    { 3272, 0x00000000U, 0x001A88FDU }, /* XSUM_XXH32_testdata[6544] */\n    { 3272, 0x9E3779B1U, 0x6C99D017U }, /* XSUM_XXH32_testdata[6545] */\n    { 3273, 0x00000000U, 0x70C5F135U }, /* XSUM_XXH32_testdata[6546] */\n    { 3273, 0x9E3779B1U, 0xB93B796DU }, /* XSUM_XXH32_testdata[6547] */\n    { 3274, 0x00000000U, 0x3E8BE3C1U }, /* XSUM_XXH32_testdata[6548] */\n    { 3274, 0x9E3779B1U, 0xEA03C59EU }, /* XSUM_XXH32_testdata[6549] */\n    { 3275, 0x00000000U, 0x999E80DDU }, /* XSUM_XXH32_testdata[6550] */\n    { 3275, 0x9E3779B1U, 0xD7876DEDU }, /* XSUM_XXH32_testdata[6551] */\n    { 3276, 0x00000000U, 0x4A617B84U }, /* XSUM_XXH32_testdata[6552] */\n    { 3276, 0x9E3779B1U, 0x0E09E1B4U }, /* XSUM_XXH32_testdata[6553] */\n    { 3277, 0x00000000U, 0xFA0B3567U }, /* XSUM_XXH32_testdata[6554] */\n    { 3277, 0x9E3779B1U, 0x030A9FBFU }, /* XSUM_XXH32_testdata[6555] */\n    { 3278, 0x00000000U, 0x6D9D94ABU }, /* XSUM_XXH32_testdata[6556] */\n    { 3278, 0x9E3779B1U, 0x05520D91U }, /* XSUM_XXH32_testdata[6557] */\n    { 3279, 0x00000000U, 0x75D64587U }, /* XSUM_XXH32_testdata[6558] */\n    { 3279, 0x9E3779B1U, 0xA4C1FBC4U }, /* XSUM_XXH32_testdata[6559] */\n    { 3280, 0x00000000U, 0xF2CBB41AU }, /* XSUM_XXH32_testdata[6560] */\n    { 3280, 0x9E3779B1U, 0x4CF0113FU }, /* XSUM_XXH32_testdata[6561] */\n    { 3281, 0x00000000U, 0x7E6C071AU }, /* XSUM_XXH32_testdata[6562] */\n    { 3281, 0x9E3779B1U, 0x79C7392CU }, /* XSUM_XXH32_testdata[6563] */\n    { 3282, 0x00000000U, 0xDF2161B2U }, /* XSUM_XXH32_testdata[6564] */\n    { 3282, 0x9E3779B1U, 0x7073AE35U }, /* XSUM_XXH32_testdata[6565] */\n    { 3283, 0x00000000U, 0xF5BF713CU }, /* XSUM_XXH32_testdata[6566] */\n    { 3283, 0x9E3779B1U, 0x07DF0FB4U }, /* XSUM_XXH32_testdata[6567] */\n    { 3284, 0x00000000U, 0xD36272D0U }, /* XSUM_XXH32_testdata[6568] */\n    { 3284, 0x9E3779B1U, 0xD2286D32U }, /* XSUM_XXH32_testdata[6569] */\n    { 3285, 0x00000000U, 0x6C541941U }, /* XSUM_XXH32_testdata[6570] */\n    { 3285, 0x9E3779B1U, 0xBF65CACCU }, /* XSUM_XXH32_testdata[6571] */\n    { 3286, 0x00000000U, 0xB0358C54U }, /* XSUM_XXH32_testdata[6572] */\n    { 3286, 0x9E3779B1U, 0x4497AC3BU }, /* XSUM_XXH32_testdata[6573] */\n    { 3287, 0x00000000U, 0xDA8C13B8U }, /* XSUM_XXH32_testdata[6574] */\n    { 3287, 0x9E3779B1U, 0x960CA993U }, /* XSUM_XXH32_testdata[6575] */\n    { 3288, 0x00000000U, 0xCEB2AEB0U }, /* XSUM_XXH32_testdata[6576] */\n    { 3288, 0x9E3779B1U, 0x2B3C60E8U }, /* XSUM_XXH32_testdata[6577] */\n    { 3289, 0x00000000U, 0xE03FA93BU }, /* XSUM_XXH32_testdata[6578] */\n    { 3289, 0x9E3779B1U, 0x87D22071U }, /* XSUM_XXH32_testdata[6579] */\n    { 3290, 0x00000000U, 0xFA43B184U }, /* XSUM_XXH32_testdata[6580] */\n    { 3290, 0x9E3779B1U, 0x6CC7A70BU }, /* XSUM_XXH32_testdata[6581] */\n    { 3291, 0x00000000U, 0x6BB4FA54U }, /* XSUM_XXH32_testdata[6582] */\n    { 3291, 0x9E3779B1U, 0xE8F1671CU }, /* XSUM_XXH32_testdata[6583] */\n    { 3292, 0x00000000U, 0x5318921EU }, /* XSUM_XXH32_testdata[6584] */\n    { 3292, 0x9E3779B1U, 0xB317068AU }, /* XSUM_XXH32_testdata[6585] */\n    { 3293, 0x00000000U, 0x107B4E00U }, /* XSUM_XXH32_testdata[6586] */\n    { 3293, 0x9E3779B1U, 0x7CB5ECC2U }, /* XSUM_XXH32_testdata[6587] */\n    { 3294, 0x00000000U, 0xFC4B0B17U }, /* XSUM_XXH32_testdata[6588] */\n    { 3294, 0x9E3779B1U, 0x4B3BE6A4U }, /* XSUM_XXH32_testdata[6589] */\n    { 3295, 0x00000000U, 0x07F8C4D0U }, /* XSUM_XXH32_testdata[6590] */\n    { 3295, 0x9E3779B1U, 0x73F62641U }, /* XSUM_XXH32_testdata[6591] */\n    { 3296, 0x00000000U, 0x0FEEE0A8U }, /* XSUM_XXH32_testdata[6592] */\n    { 3296, 0x9E3779B1U, 0x3FA23F94U }, /* XSUM_XXH32_testdata[6593] */\n    { 3297, 0x00000000U, 0x7D4C4277U }, /* XSUM_XXH32_testdata[6594] */\n    { 3297, 0x9E3779B1U, 0x23C17F37U }, /* XSUM_XXH32_testdata[6595] */\n    { 3298, 0x00000000U, 0xE11F6DC7U }, /* XSUM_XXH32_testdata[6596] */\n    { 3298, 0x9E3779B1U, 0x7D7B875DU }, /* XSUM_XXH32_testdata[6597] */\n    { 3299, 0x00000000U, 0xB9D1CC35U }, /* XSUM_XXH32_testdata[6598] */\n    { 3299, 0x9E3779B1U, 0x8A36EC90U }, /* XSUM_XXH32_testdata[6599] */\n    { 3300, 0x00000000U, 0x83ED4387U }, /* XSUM_XXH32_testdata[6600] */\n    { 3300, 0x9E3779B1U, 0x66BEE4E5U }, /* XSUM_XXH32_testdata[6601] */\n    { 3301, 0x00000000U, 0xB98D4538U }, /* XSUM_XXH32_testdata[6602] */\n    { 3301, 0x9E3779B1U, 0x7A1A984BU }, /* XSUM_XXH32_testdata[6603] */\n    { 3302, 0x00000000U, 0xBD40F729U }, /* XSUM_XXH32_testdata[6604] */\n    { 3302, 0x9E3779B1U, 0x3363FB98U }, /* XSUM_XXH32_testdata[6605] */\n    { 3303, 0x00000000U, 0xD0A01436U }, /* XSUM_XXH32_testdata[6606] */\n    { 3303, 0x9E3779B1U, 0x1D8FCD96U }, /* XSUM_XXH32_testdata[6607] */\n    { 3304, 0x00000000U, 0xEB9230FFU }, /* XSUM_XXH32_testdata[6608] */\n    { 3304, 0x9E3779B1U, 0x3D3098D7U }, /* XSUM_XXH32_testdata[6609] */\n    { 3305, 0x00000000U, 0x913C866BU }, /* XSUM_XXH32_testdata[6610] */\n    { 3305, 0x9E3779B1U, 0x3C6393A2U }, /* XSUM_XXH32_testdata[6611] */\n    { 3306, 0x00000000U, 0x744F4934U }, /* XSUM_XXH32_testdata[6612] */\n    { 3306, 0x9E3779B1U, 0x813925DBU }, /* XSUM_XXH32_testdata[6613] */\n    { 3307, 0x00000000U, 0x48B5E911U }, /* XSUM_XXH32_testdata[6614] */\n    { 3307, 0x9E3779B1U, 0xFB0FC1A8U }, /* XSUM_XXH32_testdata[6615] */\n    { 3308, 0x00000000U, 0xD3EB7DEDU }, /* XSUM_XXH32_testdata[6616] */\n    { 3308, 0x9E3779B1U, 0xECC64AAFU }, /* XSUM_XXH32_testdata[6617] */\n    { 3309, 0x00000000U, 0x2BC20FB7U }, /* XSUM_XXH32_testdata[6618] */\n    { 3309, 0x9E3779B1U, 0x5F771BB7U }, /* XSUM_XXH32_testdata[6619] */\n    { 3310, 0x00000000U, 0x8AF8E44CU }, /* XSUM_XXH32_testdata[6620] */\n    { 3310, 0x9E3779B1U, 0xF5F8505FU }, /* XSUM_XXH32_testdata[6621] */\n    { 3311, 0x00000000U, 0xD4D67552U }, /* XSUM_XXH32_testdata[6622] */\n    { 3311, 0x9E3779B1U, 0x7CF9D505U }, /* XSUM_XXH32_testdata[6623] */\n    { 3312, 0x00000000U, 0x94241D0BU }, /* XSUM_XXH32_testdata[6624] */\n    { 3312, 0x9E3779B1U, 0x32E2A2D5U }, /* XSUM_XXH32_testdata[6625] */\n    { 3313, 0x00000000U, 0x1D813A73U }, /* XSUM_XXH32_testdata[6626] */\n    { 3313, 0x9E3779B1U, 0xA5091361U }, /* XSUM_XXH32_testdata[6627] */\n    { 3314, 0x00000000U, 0xAB534D10U }, /* XSUM_XXH32_testdata[6628] */\n    { 3314, 0x9E3779B1U, 0x60E473FEU }, /* XSUM_XXH32_testdata[6629] */\n    { 3315, 0x00000000U, 0xD5DECAF9U }, /* XSUM_XXH32_testdata[6630] */\n    { 3315, 0x9E3779B1U, 0xE0F56CDCU }, /* XSUM_XXH32_testdata[6631] */\n    { 3316, 0x00000000U, 0x82F968BCU }, /* XSUM_XXH32_testdata[6632] */\n    { 3316, 0x9E3779B1U, 0xB1B5F75BU }, /* XSUM_XXH32_testdata[6633] */\n    { 3317, 0x00000000U, 0x138AEFE4U }, /* XSUM_XXH32_testdata[6634] */\n    { 3317, 0x9E3779B1U, 0xB255A6C2U }, /* XSUM_XXH32_testdata[6635] */\n    { 3318, 0x00000000U, 0x69A181ADU }, /* XSUM_XXH32_testdata[6636] */\n    { 3318, 0x9E3779B1U, 0x86B4EA3EU }, /* XSUM_XXH32_testdata[6637] */\n    { 3319, 0x00000000U, 0xC8B3AE86U }, /* XSUM_XXH32_testdata[6638] */\n    { 3319, 0x9E3779B1U, 0x965A64FEU }, /* XSUM_XXH32_testdata[6639] */\n    { 3320, 0x00000000U, 0x29E2268CU }, /* XSUM_XXH32_testdata[6640] */\n    { 3320, 0x9E3779B1U, 0x3EAE6CA9U }, /* XSUM_XXH32_testdata[6641] */\n    { 3321, 0x00000000U, 0x0EF824EAU }, /* XSUM_XXH32_testdata[6642] */\n    { 3321, 0x9E3779B1U, 0x1C77FCB9U }, /* XSUM_XXH32_testdata[6643] */\n    { 3322, 0x00000000U, 0x853ECF62U }, /* XSUM_XXH32_testdata[6644] */\n    { 3322, 0x9E3779B1U, 0xE09A7953U }, /* XSUM_XXH32_testdata[6645] */\n    { 3323, 0x00000000U, 0x0806AC59U }, /* XSUM_XXH32_testdata[6646] */\n    { 3323, 0x9E3779B1U, 0x7F63946CU }, /* XSUM_XXH32_testdata[6647] */\n    { 3324, 0x00000000U, 0x70BA2499U }, /* XSUM_XXH32_testdata[6648] */\n    { 3324, 0x9E3779B1U, 0x967776BEU }, /* XSUM_XXH32_testdata[6649] */\n    { 3325, 0x00000000U, 0x05AA012BU }, /* XSUM_XXH32_testdata[6650] */\n    { 3325, 0x9E3779B1U, 0xF44D90EBU }, /* XSUM_XXH32_testdata[6651] */\n    { 3326, 0x00000000U, 0xC7B69097U }, /* XSUM_XXH32_testdata[6652] */\n    { 3326, 0x9E3779B1U, 0x15A5DA45U }, /* XSUM_XXH32_testdata[6653] */\n    { 3327, 0x00000000U, 0xA3DC485CU }, /* XSUM_XXH32_testdata[6654] */\n    { 3327, 0x9E3779B1U, 0x1E4EFCA3U }, /* XSUM_XXH32_testdata[6655] */\n    { 3328, 0x00000000U, 0xE31EFB4AU }, /* XSUM_XXH32_testdata[6656] */\n    { 3328, 0x9E3779B1U, 0x719157B7U }, /* XSUM_XXH32_testdata[6657] */\n    { 3329, 0x00000000U, 0x536C88A7U }, /* XSUM_XXH32_testdata[6658] */\n    { 3329, 0x9E3779B1U, 0x16356812U }, /* XSUM_XXH32_testdata[6659] */\n    { 3330, 0x00000000U, 0x4D8830E4U }, /* XSUM_XXH32_testdata[6660] */\n    { 3330, 0x9E3779B1U, 0x356D307FU }, /* XSUM_XXH32_testdata[6661] */\n    { 3331, 0x00000000U, 0x123A0463U }, /* XSUM_XXH32_testdata[6662] */\n    { 3331, 0x9E3779B1U, 0x0F92401CU }, /* XSUM_XXH32_testdata[6663] */\n    { 3332, 0x00000000U, 0xBA475FC1U }, /* XSUM_XXH32_testdata[6664] */\n    { 3332, 0x9E3779B1U, 0x042517BEU }, /* XSUM_XXH32_testdata[6665] */\n    { 3333, 0x00000000U, 0xD309F04AU }, /* XSUM_XXH32_testdata[6666] */\n    { 3333, 0x9E3779B1U, 0xA865254DU }, /* XSUM_XXH32_testdata[6667] */\n    { 3334, 0x00000000U, 0xA2709322U }, /* XSUM_XXH32_testdata[6668] */\n    { 3334, 0x9E3779B1U, 0xD639FD0BU }, /* XSUM_XXH32_testdata[6669] */\n    { 3335, 0x00000000U, 0xC64579F6U }, /* XSUM_XXH32_testdata[6670] */\n    { 3335, 0x9E3779B1U, 0x5BF001CFU }, /* XSUM_XXH32_testdata[6671] */\n    { 3336, 0x00000000U, 0x8F5936F7U }, /* XSUM_XXH32_testdata[6672] */\n    { 3336, 0x9E3779B1U, 0x3C764EEBU }, /* XSUM_XXH32_testdata[6673] */\n    { 3337, 0x00000000U, 0xEABCB66DU }, /* XSUM_XXH32_testdata[6674] */\n    { 3337, 0x9E3779B1U, 0x14777341U }, /* XSUM_XXH32_testdata[6675] */\n    { 3338, 0x00000000U, 0xBBCC4AF6U }, /* XSUM_XXH32_testdata[6676] */\n    { 3338, 0x9E3779B1U, 0x1104C65CU }, /* XSUM_XXH32_testdata[6677] */\n    { 3339, 0x00000000U, 0x51321A17U }, /* XSUM_XXH32_testdata[6678] */\n    { 3339, 0x9E3779B1U, 0x1959B657U }, /* XSUM_XXH32_testdata[6679] */\n    { 3340, 0x00000000U, 0x5B5DBB59U }, /* XSUM_XXH32_testdata[6680] */\n    { 3340, 0x9E3779B1U, 0x9842D89BU }, /* XSUM_XXH32_testdata[6681] */\n    { 3341, 0x00000000U, 0xF1E4FCEDU }, /* XSUM_XXH32_testdata[6682] */\n    { 3341, 0x9E3779B1U, 0x049D82FCU }, /* XSUM_XXH32_testdata[6683] */\n    { 3342, 0x00000000U, 0xA0B75023U }, /* XSUM_XXH32_testdata[6684] */\n    { 3342, 0x9E3779B1U, 0xB1B92726U }, /* XSUM_XXH32_testdata[6685] */\n    { 3343, 0x00000000U, 0xCB46965FU }, /* XSUM_XXH32_testdata[6686] */\n    { 3343, 0x9E3779B1U, 0x6BDD191BU }, /* XSUM_XXH32_testdata[6687] */\n    { 3344, 0x00000000U, 0x8413E631U }, /* XSUM_XXH32_testdata[6688] */\n    { 3344, 0x9E3779B1U, 0xCB34899EU }, /* XSUM_XXH32_testdata[6689] */\n    { 3345, 0x00000000U, 0x5379CDACU }, /* XSUM_XXH32_testdata[6690] */\n    { 3345, 0x9E3779B1U, 0x7F70593DU }, /* XSUM_XXH32_testdata[6691] */\n    { 3346, 0x00000000U, 0xCCBBACCBU }, /* XSUM_XXH32_testdata[6692] */\n    { 3346, 0x9E3779B1U, 0x486EE3C0U }, /* XSUM_XXH32_testdata[6693] */\n    { 3347, 0x00000000U, 0x7FB8DF71U }, /* XSUM_XXH32_testdata[6694] */\n    { 3347, 0x9E3779B1U, 0xEFA5EFBCU }, /* XSUM_XXH32_testdata[6695] */\n    { 3348, 0x00000000U, 0x9028FC89U }, /* XSUM_XXH32_testdata[6696] */\n    { 3348, 0x9E3779B1U, 0x7897B1B9U }, /* XSUM_XXH32_testdata[6697] */\n    { 3349, 0x00000000U, 0x110326ABU }, /* XSUM_XXH32_testdata[6698] */\n    { 3349, 0x9E3779B1U, 0xE4650A9FU }, /* XSUM_XXH32_testdata[6699] */\n    { 3350, 0x00000000U, 0x6A5F0854U }, /* XSUM_XXH32_testdata[6700] */\n    { 3350, 0x9E3779B1U, 0x44BF80D6U }, /* XSUM_XXH32_testdata[6701] */\n    { 3351, 0x00000000U, 0xB2F03EB8U }, /* XSUM_XXH32_testdata[6702] */\n    { 3351, 0x9E3779B1U, 0xCE2152AFU }, /* XSUM_XXH32_testdata[6703] */\n    { 3352, 0x00000000U, 0x4D09E75FU }, /* XSUM_XXH32_testdata[6704] */\n    { 3352, 0x9E3779B1U, 0xE45FF7EBU }, /* XSUM_XXH32_testdata[6705] */\n    { 3353, 0x00000000U, 0x6054DE76U }, /* XSUM_XXH32_testdata[6706] */\n    { 3353, 0x9E3779B1U, 0xC14F850BU }, /* XSUM_XXH32_testdata[6707] */\n    { 3354, 0x00000000U, 0x25E58B49U }, /* XSUM_XXH32_testdata[6708] */\n    { 3354, 0x9E3779B1U, 0x8191EB72U }, /* XSUM_XXH32_testdata[6709] */\n    { 3355, 0x00000000U, 0x03C78393U }, /* XSUM_XXH32_testdata[6710] */\n    { 3355, 0x9E3779B1U, 0x739347B9U }, /* XSUM_XXH32_testdata[6711] */\n    { 3356, 0x00000000U, 0xAA0B0CBCU }, /* XSUM_XXH32_testdata[6712] */\n    { 3356, 0x9E3779B1U, 0x65B2F344U }, /* XSUM_XXH32_testdata[6713] */\n    { 3357, 0x00000000U, 0x77D5CB0EU }, /* XSUM_XXH32_testdata[6714] */\n    { 3357, 0x9E3779B1U, 0x8F5490AFU }, /* XSUM_XXH32_testdata[6715] */\n    { 3358, 0x00000000U, 0x0936406FU }, /* XSUM_XXH32_testdata[6716] */\n    { 3358, 0x9E3779B1U, 0x142DA509U }, /* XSUM_XXH32_testdata[6717] */\n    { 3359, 0x00000000U, 0x769A4780U }, /* XSUM_XXH32_testdata[6718] */\n    { 3359, 0x9E3779B1U, 0xA184030AU }, /* XSUM_XXH32_testdata[6719] */\n    { 3360, 0x00000000U, 0xB5CDE27CU }, /* XSUM_XXH32_testdata[6720] */\n    { 3360, 0x9E3779B1U, 0xD76A8C16U }, /* XSUM_XXH32_testdata[6721] */\n    { 3361, 0x00000000U, 0x24C2738EU }, /* XSUM_XXH32_testdata[6722] */\n    { 3361, 0x9E3779B1U, 0xEC04CFA7U }, /* XSUM_XXH32_testdata[6723] */\n    { 3362, 0x00000000U, 0x25BDDA8FU }, /* XSUM_XXH32_testdata[6724] */\n    { 3362, 0x9E3779B1U, 0x4E4D0E8EU }, /* XSUM_XXH32_testdata[6725] */\n    { 3363, 0x00000000U, 0x808A12FDU }, /* XSUM_XXH32_testdata[6726] */\n    { 3363, 0x9E3779B1U, 0x6DAF7733U }, /* XSUM_XXH32_testdata[6727] */\n    { 3364, 0x00000000U, 0x5D69DFFCU }, /* XSUM_XXH32_testdata[6728] */\n    { 3364, 0x9E3779B1U, 0xB4404515U }, /* XSUM_XXH32_testdata[6729] */\n    { 3365, 0x00000000U, 0xD92A2946U }, /* XSUM_XXH32_testdata[6730] */\n    { 3365, 0x9E3779B1U, 0xD0889582U }, /* XSUM_XXH32_testdata[6731] */\n    { 3366, 0x00000000U, 0x9D147716U }, /* XSUM_XXH32_testdata[6732] */\n    { 3366, 0x9E3779B1U, 0xD9326756U }, /* XSUM_XXH32_testdata[6733] */\n    { 3367, 0x00000000U, 0x043BC86FU }, /* XSUM_XXH32_testdata[6734] */\n    { 3367, 0x9E3779B1U, 0x00C2EC57U }, /* XSUM_XXH32_testdata[6735] */\n    { 3368, 0x00000000U, 0xB2AA9F17U }, /* XSUM_XXH32_testdata[6736] */\n    { 3368, 0x9E3779B1U, 0x7D8C4F0DU }, /* XSUM_XXH32_testdata[6737] */\n    { 3369, 0x00000000U, 0xA020BC35U }, /* XSUM_XXH32_testdata[6738] */\n    { 3369, 0x9E3779B1U, 0x60847A5AU }, /* XSUM_XXH32_testdata[6739] */\n    { 3370, 0x00000000U, 0x7EE77BFFU }, /* XSUM_XXH32_testdata[6740] */\n    { 3370, 0x9E3779B1U, 0xF6B3404CU }, /* XSUM_XXH32_testdata[6741] */\n    { 3371, 0x00000000U, 0x97731867U }, /* XSUM_XXH32_testdata[6742] */\n    { 3371, 0x9E3779B1U, 0xF945EBD4U }, /* XSUM_XXH32_testdata[6743] */\n    { 3372, 0x00000000U, 0x5826C410U }, /* XSUM_XXH32_testdata[6744] */\n    { 3372, 0x9E3779B1U, 0x5E0A2B89U }, /* XSUM_XXH32_testdata[6745] */\n    { 3373, 0x00000000U, 0xAA457AE4U }, /* XSUM_XXH32_testdata[6746] */\n    { 3373, 0x9E3779B1U, 0xA92F0D06U }, /* XSUM_XXH32_testdata[6747] */\n    { 3374, 0x00000000U, 0x7D1F056DU }, /* XSUM_XXH32_testdata[6748] */\n    { 3374, 0x9E3779B1U, 0xEC3252A8U }, /* XSUM_XXH32_testdata[6749] */\n    { 3375, 0x00000000U, 0x6BEAD6CFU }, /* XSUM_XXH32_testdata[6750] */\n    { 3375, 0x9E3779B1U, 0x9A6CC743U }, /* XSUM_XXH32_testdata[6751] */\n    { 3376, 0x00000000U, 0x74F067ABU }, /* XSUM_XXH32_testdata[6752] */\n    { 3376, 0x9E3779B1U, 0x2323210CU }, /* XSUM_XXH32_testdata[6753] */\n    { 3377, 0x00000000U, 0xA73C775EU }, /* XSUM_XXH32_testdata[6754] */\n    { 3377, 0x9E3779B1U, 0xCD94E18BU }, /* XSUM_XXH32_testdata[6755] */\n    { 3378, 0x00000000U, 0x0C31FFBFU }, /* XSUM_XXH32_testdata[6756] */\n    { 3378, 0x9E3779B1U, 0x102F6983U }, /* XSUM_XXH32_testdata[6757] */\n    { 3379, 0x00000000U, 0xCC684E33U }, /* XSUM_XXH32_testdata[6758] */\n    { 3379, 0x9E3779B1U, 0xE3E0B246U }, /* XSUM_XXH32_testdata[6759] */\n    { 3380, 0x00000000U, 0xBEF5BA70U }, /* XSUM_XXH32_testdata[6760] */\n    { 3380, 0x9E3779B1U, 0x0CA9BEF2U }, /* XSUM_XXH32_testdata[6761] */\n    { 3381, 0x00000000U, 0x5156A4DBU }, /* XSUM_XXH32_testdata[6762] */\n    { 3381, 0x9E3779B1U, 0x6ED7742BU }, /* XSUM_XXH32_testdata[6763] */\n    { 3382, 0x00000000U, 0x2FCB35B0U }, /* XSUM_XXH32_testdata[6764] */\n    { 3382, 0x9E3779B1U, 0x21972DBBU }, /* XSUM_XXH32_testdata[6765] */\n    { 3383, 0x00000000U, 0x3C271778U }, /* XSUM_XXH32_testdata[6766] */\n    { 3383, 0x9E3779B1U, 0xB6B2235AU }, /* XSUM_XXH32_testdata[6767] */\n    { 3384, 0x00000000U, 0x2EC18C38U }, /* XSUM_XXH32_testdata[6768] */\n    { 3384, 0x9E3779B1U, 0xA95A64ADU }, /* XSUM_XXH32_testdata[6769] */\n    { 3385, 0x00000000U, 0xDE7DBE69U }, /* XSUM_XXH32_testdata[6770] */\n    { 3385, 0x9E3779B1U, 0xC7035DE2U }, /* XSUM_XXH32_testdata[6771] */\n    { 3386, 0x00000000U, 0x875AB117U }, /* XSUM_XXH32_testdata[6772] */\n    { 3386, 0x9E3779B1U, 0x72CAC56FU }, /* XSUM_XXH32_testdata[6773] */\n    { 3387, 0x00000000U, 0x3DE24FFFU }, /* XSUM_XXH32_testdata[6774] */\n    { 3387, 0x9E3779B1U, 0x7E7E5AB6U }, /* XSUM_XXH32_testdata[6775] */\n    { 3388, 0x00000000U, 0x9DC35FC1U }, /* XSUM_XXH32_testdata[6776] */\n    { 3388, 0x9E3779B1U, 0x236146F2U }, /* XSUM_XXH32_testdata[6777] */\n    { 3389, 0x00000000U, 0x766DCC65U }, /* XSUM_XXH32_testdata[6778] */\n    { 3389, 0x9E3779B1U, 0x91D03786U }, /* XSUM_XXH32_testdata[6779] */\n    { 3390, 0x00000000U, 0xE7EE8FE5U }, /* XSUM_XXH32_testdata[6780] */\n    { 3390, 0x9E3779B1U, 0xB8BDF469U }, /* XSUM_XXH32_testdata[6781] */\n    { 3391, 0x00000000U, 0x0283AC68U }, /* XSUM_XXH32_testdata[6782] */\n    { 3391, 0x9E3779B1U, 0x305D6B75U }, /* XSUM_XXH32_testdata[6783] */\n    { 3392, 0x00000000U, 0xAEB53FAAU }, /* XSUM_XXH32_testdata[6784] */\n    { 3392, 0x9E3779B1U, 0x0AAC2941U }, /* XSUM_XXH32_testdata[6785] */\n    { 3393, 0x00000000U, 0xFEEEA860U }, /* XSUM_XXH32_testdata[6786] */\n    { 3393, 0x9E3779B1U, 0x4C0D5752U }, /* XSUM_XXH32_testdata[6787] */\n    { 3394, 0x00000000U, 0x25472594U }, /* XSUM_XXH32_testdata[6788] */\n    { 3394, 0x9E3779B1U, 0x04C78A34U }, /* XSUM_XXH32_testdata[6789] */\n    { 3395, 0x00000000U, 0x5328D77BU }, /* XSUM_XXH32_testdata[6790] */\n    { 3395, 0x9E3779B1U, 0x8F2F9AE5U }, /* XSUM_XXH32_testdata[6791] */\n    { 3396, 0x00000000U, 0x5357180CU }, /* XSUM_XXH32_testdata[6792] */\n    { 3396, 0x9E3779B1U, 0x0F498F93U }, /* XSUM_XXH32_testdata[6793] */\n    { 3397, 0x00000000U, 0x9EDF44F8U }, /* XSUM_XXH32_testdata[6794] */\n    { 3397, 0x9E3779B1U, 0xF33B41A9U }, /* XSUM_XXH32_testdata[6795] */\n    { 3398, 0x00000000U, 0xEEC4FDA8U }, /* XSUM_XXH32_testdata[6796] */\n    { 3398, 0x9E3779B1U, 0x790B3886U }, /* XSUM_XXH32_testdata[6797] */\n    { 3399, 0x00000000U, 0x301F31D3U }, /* XSUM_XXH32_testdata[6798] */\n    { 3399, 0x9E3779B1U, 0x27703E74U }, /* XSUM_XXH32_testdata[6799] */\n    { 3400, 0x00000000U, 0x5BBDB3EDU }, /* XSUM_XXH32_testdata[6800] */\n    { 3400, 0x9E3779B1U, 0xB12EAF07U }, /* XSUM_XXH32_testdata[6801] */\n    { 3401, 0x00000000U, 0xA45AE1A2U }, /* XSUM_XXH32_testdata[6802] */\n    { 3401, 0x9E3779B1U, 0xA082C410U }, /* XSUM_XXH32_testdata[6803] */\n    { 3402, 0x00000000U, 0x203C222DU }, /* XSUM_XXH32_testdata[6804] */\n    { 3402, 0x9E3779B1U, 0x906BEE72U }, /* XSUM_XXH32_testdata[6805] */\n    { 3403, 0x00000000U, 0xE01B1E46U }, /* XSUM_XXH32_testdata[6806] */\n    { 3403, 0x9E3779B1U, 0x6B0A432CU }, /* XSUM_XXH32_testdata[6807] */\n    { 3404, 0x00000000U, 0xF5383067U }, /* XSUM_XXH32_testdata[6808] */\n    { 3404, 0x9E3779B1U, 0xF9046D3FU }, /* XSUM_XXH32_testdata[6809] */\n    { 3405, 0x00000000U, 0x0B575A75U }, /* XSUM_XXH32_testdata[6810] */\n    { 3405, 0x9E3779B1U, 0x066DFBB2U }, /* XSUM_XXH32_testdata[6811] */\n    { 3406, 0x00000000U, 0x71959F26U }, /* XSUM_XXH32_testdata[6812] */\n    { 3406, 0x9E3779B1U, 0xF57BB062U }, /* XSUM_XXH32_testdata[6813] */\n    { 3407, 0x00000000U, 0xCB1FD322U }, /* XSUM_XXH32_testdata[6814] */\n    { 3407, 0x9E3779B1U, 0xFA006638U }, /* XSUM_XXH32_testdata[6815] */\n    { 3408, 0x00000000U, 0x2B7AC79FU }, /* XSUM_XXH32_testdata[6816] */\n    { 3408, 0x9E3779B1U, 0xC0EBEFB2U }, /* XSUM_XXH32_testdata[6817] */\n    { 3409, 0x00000000U, 0xFBD4E663U }, /* XSUM_XXH32_testdata[6818] */\n    { 3409, 0x9E3779B1U, 0x1F944A57U }, /* XSUM_XXH32_testdata[6819] */\n    { 3410, 0x00000000U, 0x6524AB8EU }, /* XSUM_XXH32_testdata[6820] */\n    { 3410, 0x9E3779B1U, 0xD7B4501AU }, /* XSUM_XXH32_testdata[6821] */\n    { 3411, 0x00000000U, 0x02082787U }, /* XSUM_XXH32_testdata[6822] */\n    { 3411, 0x9E3779B1U, 0xA46256A5U }, /* XSUM_XXH32_testdata[6823] */\n    { 3412, 0x00000000U, 0x5609EBBAU }, /* XSUM_XXH32_testdata[6824] */\n    { 3412, 0x9E3779B1U, 0x0C20C9BEU }, /* XSUM_XXH32_testdata[6825] */\n    { 3413, 0x00000000U, 0xCFF88265U }, /* XSUM_XXH32_testdata[6826] */\n    { 3413, 0x9E3779B1U, 0x8ABBB4D6U }, /* XSUM_XXH32_testdata[6827] */\n    { 3414, 0x00000000U, 0x6756791CU }, /* XSUM_XXH32_testdata[6828] */\n    { 3414, 0x9E3779B1U, 0x9A22BE7CU }, /* XSUM_XXH32_testdata[6829] */\n    { 3415, 0x00000000U, 0x1AF57BF0U }, /* XSUM_XXH32_testdata[6830] */\n    { 3415, 0x9E3779B1U, 0xC5FB4E2CU }, /* XSUM_XXH32_testdata[6831] */\n    { 3416, 0x00000000U, 0x2115DE5EU }, /* XSUM_XXH32_testdata[6832] */\n    { 3416, 0x9E3779B1U, 0x15F334C8U }, /* XSUM_XXH32_testdata[6833] */\n    { 3417, 0x00000000U, 0xF81CF209U }, /* XSUM_XXH32_testdata[6834] */\n    { 3417, 0x9E3779B1U, 0xF4A8A5ACU }, /* XSUM_XXH32_testdata[6835] */\n    { 3418, 0x00000000U, 0x249AC50EU }, /* XSUM_XXH32_testdata[6836] */\n    { 3418, 0x9E3779B1U, 0x638DB79CU }, /* XSUM_XXH32_testdata[6837] */\n    { 3419, 0x00000000U, 0xC3697E3FU }, /* XSUM_XXH32_testdata[6838] */\n    { 3419, 0x9E3779B1U, 0xADEEDE3AU }, /* XSUM_XXH32_testdata[6839] */\n    { 3420, 0x00000000U, 0x75EBDDD2U }, /* XSUM_XXH32_testdata[6840] */\n    { 3420, 0x9E3779B1U, 0x33683C34U }, /* XSUM_XXH32_testdata[6841] */\n    { 3421, 0x00000000U, 0x10A377DBU }, /* XSUM_XXH32_testdata[6842] */\n    { 3421, 0x9E3779B1U, 0xCF59A4D2U }, /* XSUM_XXH32_testdata[6843] */\n    { 3422, 0x00000000U, 0xF341E29FU }, /* XSUM_XXH32_testdata[6844] */\n    { 3422, 0x9E3779B1U, 0x260F37E7U }, /* XSUM_XXH32_testdata[6845] */\n    { 3423, 0x00000000U, 0x0BA23FD5U }, /* XSUM_XXH32_testdata[6846] */\n    { 3423, 0x9E3779B1U, 0xBBFC1663U }, /* XSUM_XXH32_testdata[6847] */\n    { 3424, 0x00000000U, 0x5F1143BCU }, /* XSUM_XXH32_testdata[6848] */\n    { 3424, 0x9E3779B1U, 0x008AE617U }, /* XSUM_XXH32_testdata[6849] */\n    { 3425, 0x00000000U, 0xE0491B24U }, /* XSUM_XXH32_testdata[6850] */\n    { 3425, 0x9E3779B1U, 0x17BFEA97U }, /* XSUM_XXH32_testdata[6851] */\n    { 3426, 0x00000000U, 0xEA7763B2U }, /* XSUM_XXH32_testdata[6852] */\n    { 3426, 0x9E3779B1U, 0x37D44B7AU }, /* XSUM_XXH32_testdata[6853] */\n    { 3427, 0x00000000U, 0x4A00A5DDU }, /* XSUM_XXH32_testdata[6854] */\n    { 3427, 0x9E3779B1U, 0xDC107BDFU }, /* XSUM_XXH32_testdata[6855] */\n    { 3428, 0x00000000U, 0xB8976EDAU }, /* XSUM_XXH32_testdata[6856] */\n    { 3428, 0x9E3779B1U, 0x93BE08F8U }, /* XSUM_XXH32_testdata[6857] */\n    { 3429, 0x00000000U, 0xAB38E11BU }, /* XSUM_XXH32_testdata[6858] */\n    { 3429, 0x9E3779B1U, 0xF5C27F53U }, /* XSUM_XXH32_testdata[6859] */\n    { 3430, 0x00000000U, 0x03F96055U }, /* XSUM_XXH32_testdata[6860] */\n    { 3430, 0x9E3779B1U, 0xEB4A5CC9U }, /* XSUM_XXH32_testdata[6861] */\n    { 3431, 0x00000000U, 0x1F16FD93U }, /* XSUM_XXH32_testdata[6862] */\n    { 3431, 0x9E3779B1U, 0x9471EEA6U }, /* XSUM_XXH32_testdata[6863] */\n    { 3432, 0x00000000U, 0xE65A87CEU }, /* XSUM_XXH32_testdata[6864] */\n    { 3432, 0x9E3779B1U, 0x59324147U }, /* XSUM_XXH32_testdata[6865] */\n    { 3433, 0x00000000U, 0x717D73AAU }, /* XSUM_XXH32_testdata[6866] */\n    { 3433, 0x9E3779B1U, 0xEDB32A85U }, /* XSUM_XXH32_testdata[6867] */\n    { 3434, 0x00000000U, 0xC991171BU }, /* XSUM_XXH32_testdata[6868] */\n    { 3434, 0x9E3779B1U, 0x77FC09FEU }, /* XSUM_XXH32_testdata[6869] */\n    { 3435, 0x00000000U, 0x56B78DD6U }, /* XSUM_XXH32_testdata[6870] */\n    { 3435, 0x9E3779B1U, 0x34EF0410U }, /* XSUM_XXH32_testdata[6871] */\n    { 3436, 0x00000000U, 0x5F5F52C1U }, /* XSUM_XXH32_testdata[6872] */\n    { 3436, 0x9E3779B1U, 0x60FE20A3U }, /* XSUM_XXH32_testdata[6873] */\n    { 3437, 0x00000000U, 0x9B0434C3U }, /* XSUM_XXH32_testdata[6874] */\n    { 3437, 0x9E3779B1U, 0xB78B9362U }, /* XSUM_XXH32_testdata[6875] */\n    { 3438, 0x00000000U, 0x26B8E3D3U }, /* XSUM_XXH32_testdata[6876] */\n    { 3438, 0x9E3779B1U, 0xEE2B5766U }, /* XSUM_XXH32_testdata[6877] */\n    { 3439, 0x00000000U, 0xC0C09177U }, /* XSUM_XXH32_testdata[6878] */\n    { 3439, 0x9E3779B1U, 0xDB2B6A3DU }, /* XSUM_XXH32_testdata[6879] */\n    { 3440, 0x00000000U, 0xA8B9E919U }, /* XSUM_XXH32_testdata[6880] */\n    { 3440, 0x9E3779B1U, 0x4D59CBE2U }, /* XSUM_XXH32_testdata[6881] */\n    { 3441, 0x00000000U, 0x1638A859U }, /* XSUM_XXH32_testdata[6882] */\n    { 3441, 0x9E3779B1U, 0x51D3D4CBU }, /* XSUM_XXH32_testdata[6883] */\n    { 3442, 0x00000000U, 0xD24B0990U }, /* XSUM_XXH32_testdata[6884] */\n    { 3442, 0x9E3779B1U, 0x7FE3FBCFU }, /* XSUM_XXH32_testdata[6885] */\n    { 3443, 0x00000000U, 0xD11D6C53U }, /* XSUM_XXH32_testdata[6886] */\n    { 3443, 0x9E3779B1U, 0x0A7ABF1AU }, /* XSUM_XXH32_testdata[6887] */\n    { 3444, 0x00000000U, 0x8BE72E70U }, /* XSUM_XXH32_testdata[6888] */\n    { 3444, 0x9E3779B1U, 0x1B62BA1DU }, /* XSUM_XXH32_testdata[6889] */\n    { 3445, 0x00000000U, 0x733E0E94U }, /* XSUM_XXH32_testdata[6890] */\n    { 3445, 0x9E3779B1U, 0xC0680C78U }, /* XSUM_XXH32_testdata[6891] */\n    { 3446, 0x00000000U, 0x4C1B8249U }, /* XSUM_XXH32_testdata[6892] */\n    { 3446, 0x9E3779B1U, 0xF733F468U }, /* XSUM_XXH32_testdata[6893] */\n    { 3447, 0x00000000U, 0x9764625CU }, /* XSUM_XXH32_testdata[6894] */\n    { 3447, 0x9E3779B1U, 0xC56D44A3U }, /* XSUM_XXH32_testdata[6895] */\n    { 3448, 0x00000000U, 0xE512CF48U }, /* XSUM_XXH32_testdata[6896] */\n    { 3448, 0x9E3779B1U, 0x64488BE0U }, /* XSUM_XXH32_testdata[6897] */\n    { 3449, 0x00000000U, 0xDCD9FD0BU }, /* XSUM_XXH32_testdata[6898] */\n    { 3449, 0x9E3779B1U, 0x1E74CCBAU }, /* XSUM_XXH32_testdata[6899] */\n    { 3450, 0x00000000U, 0x05AC75D2U }, /* XSUM_XXH32_testdata[6900] */\n    { 3450, 0x9E3779B1U, 0x2ADAC3D2U }, /* XSUM_XXH32_testdata[6901] */\n    { 3451, 0x00000000U, 0x69FE7FBEU }, /* XSUM_XXH32_testdata[6902] */\n    { 3451, 0x9E3779B1U, 0x1BEB2256U }, /* XSUM_XXH32_testdata[6903] */\n    { 3452, 0x00000000U, 0x3C6CBA89U }, /* XSUM_XXH32_testdata[6904] */\n    { 3452, 0x9E3779B1U, 0x33072D54U }, /* XSUM_XXH32_testdata[6905] */\n    { 3453, 0x00000000U, 0xC5B30423U }, /* XSUM_XXH32_testdata[6906] */\n    { 3453, 0x9E3779B1U, 0x53393BDFU }, /* XSUM_XXH32_testdata[6907] */\n    { 3454, 0x00000000U, 0xCF2718A5U }, /* XSUM_XXH32_testdata[6908] */\n    { 3454, 0x9E3779B1U, 0xE38FFB89U }, /* XSUM_XXH32_testdata[6909] */\n    { 3455, 0x00000000U, 0x23ECAE24U }, /* XSUM_XXH32_testdata[6910] */\n    { 3455, 0x9E3779B1U, 0x92B38816U }, /* XSUM_XXH32_testdata[6911] */\n    { 3456, 0x00000000U, 0x2068B156U }, /* XSUM_XXH32_testdata[6912] */\n    { 3456, 0x9E3779B1U, 0xA4706587U }, /* XSUM_XXH32_testdata[6913] */\n    { 3457, 0x00000000U, 0x295FCAEDU }, /* XSUM_XXH32_testdata[6914] */\n    { 3457, 0x9E3779B1U, 0xEFCCBF79U }, /* XSUM_XXH32_testdata[6915] */\n    { 3458, 0x00000000U, 0x3EA0F67FU }, /* XSUM_XXH32_testdata[6916] */\n    { 3458, 0x9E3779B1U, 0xB8DD7F54U }, /* XSUM_XXH32_testdata[6917] */\n    { 3459, 0x00000000U, 0x69929055U }, /* XSUM_XXH32_testdata[6918] */\n    { 3459, 0x9E3779B1U, 0x7E1F127FU }, /* XSUM_XXH32_testdata[6919] */\n    { 3460, 0x00000000U, 0x97BC7E81U }, /* XSUM_XXH32_testdata[6920] */\n    { 3460, 0x9E3779B1U, 0x0DD5A367U }, /* XSUM_XXH32_testdata[6921] */\n    { 3461, 0x00000000U, 0x250C0660U }, /* XSUM_XXH32_testdata[6922] */\n    { 3461, 0x9E3779B1U, 0x6FE7FB70U }, /* XSUM_XXH32_testdata[6923] */\n    { 3462, 0x00000000U, 0xDEFF6292U }, /* XSUM_XXH32_testdata[6924] */\n    { 3462, 0x9E3779B1U, 0xD8B81F51U }, /* XSUM_XXH32_testdata[6925] */\n    { 3463, 0x00000000U, 0x906A34F4U }, /* XSUM_XXH32_testdata[6926] */\n    { 3463, 0x9E3779B1U, 0x78805F14U }, /* XSUM_XXH32_testdata[6927] */\n    { 3464, 0x00000000U, 0x509D8C8DU }, /* XSUM_XXH32_testdata[6928] */\n    { 3464, 0x9E3779B1U, 0xA49A1719U }, /* XSUM_XXH32_testdata[6929] */\n    { 3465, 0x00000000U, 0x89984810U }, /* XSUM_XXH32_testdata[6930] */\n    { 3465, 0x9E3779B1U, 0x3D4A6AF1U }, /* XSUM_XXH32_testdata[6931] */\n    { 3466, 0x00000000U, 0xB4B40A28U }, /* XSUM_XXH32_testdata[6932] */\n    { 3466, 0x9E3779B1U, 0x51FF0F9DU }, /* XSUM_XXH32_testdata[6933] */\n    { 3467, 0x00000000U, 0x68FD4910U }, /* XSUM_XXH32_testdata[6934] */\n    { 3467, 0x9E3779B1U, 0x94CC21CDU }, /* XSUM_XXH32_testdata[6935] */\n    { 3468, 0x00000000U, 0xCC20A756U }, /* XSUM_XXH32_testdata[6936] */\n    { 3468, 0x9E3779B1U, 0xD5210C7EU }, /* XSUM_XXH32_testdata[6937] */\n    { 3469, 0x00000000U, 0xC3204A36U }, /* XSUM_XXH32_testdata[6938] */\n    { 3469, 0x9E3779B1U, 0xB49F44B9U }, /* XSUM_XXH32_testdata[6939] */\n    { 3470, 0x00000000U, 0x06026F45U }, /* XSUM_XXH32_testdata[6940] */\n    { 3470, 0x9E3779B1U, 0x8E034BD2U }, /* XSUM_XXH32_testdata[6941] */\n    { 3471, 0x00000000U, 0xF0193F99U }, /* XSUM_XXH32_testdata[6942] */\n    { 3471, 0x9E3779B1U, 0xB82C7EF6U }, /* XSUM_XXH32_testdata[6943] */\n    { 3472, 0x00000000U, 0x6A506014U }, /* XSUM_XXH32_testdata[6944] */\n    { 3472, 0x9E3779B1U, 0xF19AC666U }, /* XSUM_XXH32_testdata[6945] */\n    { 3473, 0x00000000U, 0xD9309451U }, /* XSUM_XXH32_testdata[6946] */\n    { 3473, 0x9E3779B1U, 0x5C62FE76U }, /* XSUM_XXH32_testdata[6947] */\n    { 3474, 0x00000000U, 0x08AE31CBU }, /* XSUM_XXH32_testdata[6948] */\n    { 3474, 0x9E3779B1U, 0x1D01F5E3U }, /* XSUM_XXH32_testdata[6949] */\n    { 3475, 0x00000000U, 0x7D938D2CU }, /* XSUM_XXH32_testdata[6950] */\n    { 3475, 0x9E3779B1U, 0xA20BD86BU }, /* XSUM_XXH32_testdata[6951] */\n    { 3476, 0x00000000U, 0xBF98511EU }, /* XSUM_XXH32_testdata[6952] */\n    { 3476, 0x9E3779B1U, 0x728F2E00U }, /* XSUM_XXH32_testdata[6953] */\n    { 3477, 0x00000000U, 0x2DF29085U }, /* XSUM_XXH32_testdata[6954] */\n    { 3477, 0x9E3779B1U, 0x641E0D83U }, /* XSUM_XXH32_testdata[6955] */\n    { 3478, 0x00000000U, 0xD67817ACU }, /* XSUM_XXH32_testdata[6956] */\n    { 3478, 0x9E3779B1U, 0x5B16D790U }, /* XSUM_XXH32_testdata[6957] */\n    { 3479, 0x00000000U, 0xBF955B2DU }, /* XSUM_XXH32_testdata[6958] */\n    { 3479, 0x9E3779B1U, 0x71BFD9A4U }, /* XSUM_XXH32_testdata[6959] */\n    { 3480, 0x00000000U, 0x35902249U }, /* XSUM_XXH32_testdata[6960] */\n    { 3480, 0x9E3779B1U, 0x983AE947U }, /* XSUM_XXH32_testdata[6961] */\n    { 3481, 0x00000000U, 0x4BABEB46U }, /* XSUM_XXH32_testdata[6962] */\n    { 3481, 0x9E3779B1U, 0xFDD16A9EU }, /* XSUM_XXH32_testdata[6963] */\n    { 3482, 0x00000000U, 0x115C555DU }, /* XSUM_XXH32_testdata[6964] */\n    { 3482, 0x9E3779B1U, 0xCFB53ADAU }, /* XSUM_XXH32_testdata[6965] */\n    { 3483, 0x00000000U, 0xAAD5BEBDU }, /* XSUM_XXH32_testdata[6966] */\n    { 3483, 0x9E3779B1U, 0xE0E737E4U }, /* XSUM_XXH32_testdata[6967] */\n    { 3484, 0x00000000U, 0xF6096817U }, /* XSUM_XXH32_testdata[6968] */\n    { 3484, 0x9E3779B1U, 0xE1DAC5D0U }, /* XSUM_XXH32_testdata[6969] */\n    { 3485, 0x00000000U, 0x4264CC84U }, /* XSUM_XXH32_testdata[6970] */\n    { 3485, 0x9E3779B1U, 0x874B1917U }, /* XSUM_XXH32_testdata[6971] */\n    { 3486, 0x00000000U, 0x48136F2CU }, /* XSUM_XXH32_testdata[6972] */\n    { 3486, 0x9E3779B1U, 0x2BA2ECB7U }, /* XSUM_XXH32_testdata[6973] */\n    { 3487, 0x00000000U, 0xE3D3F58BU }, /* XSUM_XXH32_testdata[6974] */\n    { 3487, 0x9E3779B1U, 0x50851C6BU }, /* XSUM_XXH32_testdata[6975] */\n    { 3488, 0x00000000U, 0x398C6B2BU }, /* XSUM_XXH32_testdata[6976] */\n    { 3488, 0x9E3779B1U, 0x4AAD8E7AU }, /* XSUM_XXH32_testdata[6977] */\n    { 3489, 0x00000000U, 0xDCF35413U }, /* XSUM_XXH32_testdata[6978] */\n    { 3489, 0x9E3779B1U, 0x9622B255U }, /* XSUM_XXH32_testdata[6979] */\n    { 3490, 0x00000000U, 0xA3826B53U }, /* XSUM_XXH32_testdata[6980] */\n    { 3490, 0x9E3779B1U, 0xDB328E1EU }, /* XSUM_XXH32_testdata[6981] */\n    { 3491, 0x00000000U, 0x451A3160U }, /* XSUM_XXH32_testdata[6982] */\n    { 3491, 0x9E3779B1U, 0x4508B0DCU }, /* XSUM_XXH32_testdata[6983] */\n    { 3492, 0x00000000U, 0x044F047FU }, /* XSUM_XXH32_testdata[6984] */\n    { 3492, 0x9E3779B1U, 0x501D4005U }, /* XSUM_XXH32_testdata[6985] */\n    { 3493, 0x00000000U, 0xC0C2AC4EU }, /* XSUM_XXH32_testdata[6986] */\n    { 3493, 0x9E3779B1U, 0x7814B99DU }, /* XSUM_XXH32_testdata[6987] */\n    { 3494, 0x00000000U, 0x35EEAB21U }, /* XSUM_XXH32_testdata[6988] */\n    { 3494, 0x9E3779B1U, 0x6607923FU }, /* XSUM_XXH32_testdata[6989] */\n    { 3495, 0x00000000U, 0xBA4E99EEU }, /* XSUM_XXH32_testdata[6990] */\n    { 3495, 0x9E3779B1U, 0xA56E19CDU }, /* XSUM_XXH32_testdata[6991] */\n    { 3496, 0x00000000U, 0x364AEAA2U }, /* XSUM_XXH32_testdata[6992] */\n    { 3496, 0x9E3779B1U, 0xA1C547C7U }, /* XSUM_XXH32_testdata[6993] */\n    { 3497, 0x00000000U, 0xCC867552U }, /* XSUM_XXH32_testdata[6994] */\n    { 3497, 0x9E3779B1U, 0x9775CA37U }, /* XSUM_XXH32_testdata[6995] */\n    { 3498, 0x00000000U, 0x6CF8FB77U }, /* XSUM_XXH32_testdata[6996] */\n    { 3498, 0x9E3779B1U, 0x81B04ED0U }, /* XSUM_XXH32_testdata[6997] */\n    { 3499, 0x00000000U, 0x14B86A6AU }, /* XSUM_XXH32_testdata[6998] */\n    { 3499, 0x9E3779B1U, 0x13CDBE00U }, /* XSUM_XXH32_testdata[6999] */\n    { 3500, 0x00000000U, 0x7DCB439DU }, /* XSUM_XXH32_testdata[7000] */\n    { 3500, 0x9E3779B1U, 0xF39EAA12U }, /* XSUM_XXH32_testdata[7001] */\n    { 3501, 0x00000000U, 0xAB9D75CAU }, /* XSUM_XXH32_testdata[7002] */\n    { 3501, 0x9E3779B1U, 0x9D1B57F0U }, /* XSUM_XXH32_testdata[7003] */\n    { 3502, 0x00000000U, 0x2D241857U }, /* XSUM_XXH32_testdata[7004] */\n    { 3502, 0x9E3779B1U, 0x47CFA606U }, /* XSUM_XXH32_testdata[7005] */\n    { 3503, 0x00000000U, 0x82F56DF6U }, /* XSUM_XXH32_testdata[7006] */\n    { 3503, 0x9E3779B1U, 0x625947AEU }, /* XSUM_XXH32_testdata[7007] */\n    { 3504, 0x00000000U, 0xC6461692U }, /* XSUM_XXH32_testdata[7008] */\n    { 3504, 0x9E3779B1U, 0xABC51768U }, /* XSUM_XXH32_testdata[7009] */\n    { 3505, 0x00000000U, 0x997C0476U }, /* XSUM_XXH32_testdata[7010] */\n    { 3505, 0x9E3779B1U, 0x264A5C81U }, /* XSUM_XXH32_testdata[7011] */\n    { 3506, 0x00000000U, 0xDA324FC8U }, /* XSUM_XXH32_testdata[7012] */\n    { 3506, 0x9E3779B1U, 0xCEAB447EU }, /* XSUM_XXH32_testdata[7013] */\n    { 3507, 0x00000000U, 0x18F00157U }, /* XSUM_XXH32_testdata[7014] */\n    { 3507, 0x9E3779B1U, 0x64EC96ABU }, /* XSUM_XXH32_testdata[7015] */\n    { 3508, 0x00000000U, 0xB936F439U }, /* XSUM_XXH32_testdata[7016] */\n    { 3508, 0x9E3779B1U, 0x59EBF7A4U }, /* XSUM_XXH32_testdata[7017] */\n    { 3509, 0x00000000U, 0xAF357164U }, /* XSUM_XXH32_testdata[7018] */\n    { 3509, 0x9E3779B1U, 0x435C7B3AU }, /* XSUM_XXH32_testdata[7019] */\n    { 3510, 0x00000000U, 0x2AD409A9U }, /* XSUM_XXH32_testdata[7020] */\n    { 3510, 0x9E3779B1U, 0xD34AF9A1U }, /* XSUM_XXH32_testdata[7021] */\n    { 3511, 0x00000000U, 0x28FBD7BAU }, /* XSUM_XXH32_testdata[7022] */\n    { 3511, 0x9E3779B1U, 0xC33EF4C7U }, /* XSUM_XXH32_testdata[7023] */\n    { 3512, 0x00000000U, 0xD0F9EEFAU }, /* XSUM_XXH32_testdata[7024] */\n    { 3512, 0x9E3779B1U, 0xF8E26840U }, /* XSUM_XXH32_testdata[7025] */\n    { 3513, 0x00000000U, 0xF4FB0DABU }, /* XSUM_XXH32_testdata[7026] */\n    { 3513, 0x9E3779B1U, 0x1190481DU }, /* XSUM_XXH32_testdata[7027] */\n    { 3514, 0x00000000U, 0xF8362507U }, /* XSUM_XXH32_testdata[7028] */\n    { 3514, 0x9E3779B1U, 0x5EEA6C56U }, /* XSUM_XXH32_testdata[7029] */\n    { 3515, 0x00000000U, 0x6617EB1FU }, /* XSUM_XXH32_testdata[7030] */\n    { 3515, 0x9E3779B1U, 0x23870DE7U }, /* XSUM_XXH32_testdata[7031] */\n    { 3516, 0x00000000U, 0x1B5CE31FU }, /* XSUM_XXH32_testdata[7032] */\n    { 3516, 0x9E3779B1U, 0x95E40107U }, /* XSUM_XXH32_testdata[7033] */\n    { 3517, 0x00000000U, 0x4679F3F7U }, /* XSUM_XXH32_testdata[7034] */\n    { 3517, 0x9E3779B1U, 0xEB9B67E9U }, /* XSUM_XXH32_testdata[7035] */\n    { 3518, 0x00000000U, 0xEB172620U }, /* XSUM_XXH32_testdata[7036] */\n    { 3518, 0x9E3779B1U, 0xB0B1FECCU }, /* XSUM_XXH32_testdata[7037] */\n    { 3519, 0x00000000U, 0x8C884DA0U }, /* XSUM_XXH32_testdata[7038] */\n    { 3519, 0x9E3779B1U, 0xC275DBE3U }, /* XSUM_XXH32_testdata[7039] */\n    { 3520, 0x00000000U, 0xB9B89945U }, /* XSUM_XXH32_testdata[7040] */\n    { 3520, 0x9E3779B1U, 0x4A84FE06U }, /* XSUM_XXH32_testdata[7041] */\n    { 3521, 0x00000000U, 0x4F03DD19U }, /* XSUM_XXH32_testdata[7042] */\n    { 3521, 0x9E3779B1U, 0x145C3B1DU }, /* XSUM_XXH32_testdata[7043] */\n    { 3522, 0x00000000U, 0x9F71B20CU }, /* XSUM_XXH32_testdata[7044] */\n    { 3522, 0x9E3779B1U, 0x4DD77F83U }, /* XSUM_XXH32_testdata[7045] */\n    { 3523, 0x00000000U, 0xCA98EC84U }, /* XSUM_XXH32_testdata[7046] */\n    { 3523, 0x9E3779B1U, 0xF41B4990U }, /* XSUM_XXH32_testdata[7047] */\n    { 3524, 0x00000000U, 0xD01C61EDU }, /* XSUM_XXH32_testdata[7048] */\n    { 3524, 0x9E3779B1U, 0x20155BE7U }, /* XSUM_XXH32_testdata[7049] */\n    { 3525, 0x00000000U, 0x4A604702U }, /* XSUM_XXH32_testdata[7050] */\n    { 3525, 0x9E3779B1U, 0xA1260022U }, /* XSUM_XXH32_testdata[7051] */\n    { 3526, 0x00000000U, 0x065E509BU }, /* XSUM_XXH32_testdata[7052] */\n    { 3526, 0x9E3779B1U, 0xD72E819DU }, /* XSUM_XXH32_testdata[7053] */\n    { 3527, 0x00000000U, 0xE9792075U }, /* XSUM_XXH32_testdata[7054] */\n    { 3527, 0x9E3779B1U, 0x1701622EU }, /* XSUM_XXH32_testdata[7055] */\n    { 3528, 0x00000000U, 0x35B37877U }, /* XSUM_XXH32_testdata[7056] */\n    { 3528, 0x9E3779B1U, 0x476E1658U }, /* XSUM_XXH32_testdata[7057] */\n    { 3529, 0x00000000U, 0x1730D7A9U }, /* XSUM_XXH32_testdata[7058] */\n    { 3529, 0x9E3779B1U, 0x40DBBCFFU }, /* XSUM_XXH32_testdata[7059] */\n    { 3530, 0x00000000U, 0x62A5E278U }, /* XSUM_XXH32_testdata[7060] */\n    { 3530, 0x9E3779B1U, 0xEB1DF0C7U }, /* XSUM_XXH32_testdata[7061] */\n    { 3531, 0x00000000U, 0x5517A733U }, /* XSUM_XXH32_testdata[7062] */\n    { 3531, 0x9E3779B1U, 0xBD815BD5U }, /* XSUM_XXH32_testdata[7063] */\n    { 3532, 0x00000000U, 0x16CC0FA9U }, /* XSUM_XXH32_testdata[7064] */\n    { 3532, 0x9E3779B1U, 0x37AAE186U }, /* XSUM_XXH32_testdata[7065] */\n    { 3533, 0x00000000U, 0x1B5D51E6U }, /* XSUM_XXH32_testdata[7066] */\n    { 3533, 0x9E3779B1U, 0x1BB9142FU }, /* XSUM_XXH32_testdata[7067] */\n    { 3534, 0x00000000U, 0xD57E81A1U }, /* XSUM_XXH32_testdata[7068] */\n    { 3534, 0x9E3779B1U, 0x22B33257U }, /* XSUM_XXH32_testdata[7069] */\n    { 3535, 0x00000000U, 0x2C9C4DFBU }, /* XSUM_XXH32_testdata[7070] */\n    { 3535, 0x9E3779B1U, 0xEC8E3D7AU }, /* XSUM_XXH32_testdata[7071] */\n    { 3536, 0x00000000U, 0xC8051139U }, /* XSUM_XXH32_testdata[7072] */\n    { 3536, 0x9E3779B1U, 0x66A8B1B2U }, /* XSUM_XXH32_testdata[7073] */\n    { 3537, 0x00000000U, 0x6304DB45U }, /* XSUM_XXH32_testdata[7074] */\n    { 3537, 0x9E3779B1U, 0x83BB1FDFU }, /* XSUM_XXH32_testdata[7075] */\n    { 3538, 0x00000000U, 0xC0EC1FDFU }, /* XSUM_XXH32_testdata[7076] */\n    { 3538, 0x9E3779B1U, 0x788F25ADU }, /* XSUM_XXH32_testdata[7077] */\n    { 3539, 0x00000000U, 0xD3784BD2U }, /* XSUM_XXH32_testdata[7078] */\n    { 3539, 0x9E3779B1U, 0x32FEC42AU }, /* XSUM_XXH32_testdata[7079] */\n    { 3540, 0x00000000U, 0xBA5A0529U }, /* XSUM_XXH32_testdata[7080] */\n    { 3540, 0x9E3779B1U, 0x3589D353U }, /* XSUM_XXH32_testdata[7081] */\n    { 3541, 0x00000000U, 0xD7EB3631U }, /* XSUM_XXH32_testdata[7082] */\n    { 3541, 0x9E3779B1U, 0xE4710E85U }, /* XSUM_XXH32_testdata[7083] */\n    { 3542, 0x00000000U, 0x3D32669CU }, /* XSUM_XXH32_testdata[7084] */\n    { 3542, 0x9E3779B1U, 0x616B634DU }, /* XSUM_XXH32_testdata[7085] */\n    { 3543, 0x00000000U, 0xC60FC5D1U }, /* XSUM_XXH32_testdata[7086] */\n    { 3543, 0x9E3779B1U, 0x9DB69990U }, /* XSUM_XXH32_testdata[7087] */\n    { 3544, 0x00000000U, 0x1A75BAFFU }, /* XSUM_XXH32_testdata[7088] */\n    { 3544, 0x9E3779B1U, 0xC360F2F0U }, /* XSUM_XXH32_testdata[7089] */\n    { 3545, 0x00000000U, 0xC8030778U }, /* XSUM_XXH32_testdata[7090] */\n    { 3545, 0x9E3779B1U, 0xC8B7F46CU }, /* XSUM_XXH32_testdata[7091] */\n    { 3546, 0x00000000U, 0x9CFA61D4U }, /* XSUM_XXH32_testdata[7092] */\n    { 3546, 0x9E3779B1U, 0xB72B3A6BU }, /* XSUM_XXH32_testdata[7093] */\n    { 3547, 0x00000000U, 0x465B0498U }, /* XSUM_XXH32_testdata[7094] */\n    { 3547, 0x9E3779B1U, 0x1A23E3BCU }, /* XSUM_XXH32_testdata[7095] */\n    { 3548, 0x00000000U, 0xF6705104U }, /* XSUM_XXH32_testdata[7096] */\n    { 3548, 0x9E3779B1U, 0x0969FAC1U }, /* XSUM_XXH32_testdata[7097] */\n    { 3549, 0x00000000U, 0x2D995AE5U }, /* XSUM_XXH32_testdata[7098] */\n    { 3549, 0x9E3779B1U, 0x705FF6A2U }, /* XSUM_XXH32_testdata[7099] */\n    { 3550, 0x00000000U, 0xAC0277ECU }, /* XSUM_XXH32_testdata[7100] */\n    { 3550, 0x9E3779B1U, 0x3A46B72AU }, /* XSUM_XXH32_testdata[7101] */\n    { 3551, 0x00000000U, 0x153B0F38U }, /* XSUM_XXH32_testdata[7102] */\n    { 3551, 0x9E3779B1U, 0xF734C0FFU }, /* XSUM_XXH32_testdata[7103] */\n    { 3552, 0x00000000U, 0xADB62613U }, /* XSUM_XXH32_testdata[7104] */\n    { 3552, 0x9E3779B1U, 0x476D2E99U }, /* XSUM_XXH32_testdata[7105] */\n    { 3553, 0x00000000U, 0x40E549F9U }, /* XSUM_XXH32_testdata[7106] */\n    { 3553, 0x9E3779B1U, 0x8D5DC517U }, /* XSUM_XXH32_testdata[7107] */\n    { 3554, 0x00000000U, 0x5A9AE8F6U }, /* XSUM_XXH32_testdata[7108] */\n    { 3554, 0x9E3779B1U, 0xD167867FU }, /* XSUM_XXH32_testdata[7109] */\n    { 3555, 0x00000000U, 0x9C4BECFAU }, /* XSUM_XXH32_testdata[7110] */\n    { 3555, 0x9E3779B1U, 0x1B257CF9U }, /* XSUM_XXH32_testdata[7111] */\n    { 3556, 0x00000000U, 0x7BF50C64U }, /* XSUM_XXH32_testdata[7112] */\n    { 3556, 0x9E3779B1U, 0xEDDE9A0AU }, /* XSUM_XXH32_testdata[7113] */\n    { 3557, 0x00000000U, 0x3958598AU }, /* XSUM_XXH32_testdata[7114] */\n    { 3557, 0x9E3779B1U, 0xAEC3F855U }, /* XSUM_XXH32_testdata[7115] */\n    { 3558, 0x00000000U, 0x6F1B8B73U }, /* XSUM_XXH32_testdata[7116] */\n    { 3558, 0x9E3779B1U, 0x0EAA923CU }, /* XSUM_XXH32_testdata[7117] */\n    { 3559, 0x00000000U, 0x8DF1829EU }, /* XSUM_XXH32_testdata[7118] */\n    { 3559, 0x9E3779B1U, 0x52DE3C01U }, /* XSUM_XXH32_testdata[7119] */\n    { 3560, 0x00000000U, 0xA33B30D8U }, /* XSUM_XXH32_testdata[7120] */\n    { 3560, 0x9E3779B1U, 0xEF5E67F0U }, /* XSUM_XXH32_testdata[7121] */\n    { 3561, 0x00000000U, 0xFA8B0F56U }, /* XSUM_XXH32_testdata[7122] */\n    { 3561, 0x9E3779B1U, 0x090388C0U }, /* XSUM_XXH32_testdata[7123] */\n    { 3562, 0x00000000U, 0xC6871C47U }, /* XSUM_XXH32_testdata[7124] */\n    { 3562, 0x9E3779B1U, 0x395BA54BU }, /* XSUM_XXH32_testdata[7125] */\n    { 3563, 0x00000000U, 0x673C9DD3U }, /* XSUM_XXH32_testdata[7126] */\n    { 3563, 0x9E3779B1U, 0x968E8EADU }, /* XSUM_XXH32_testdata[7127] */\n    { 3564, 0x00000000U, 0x7D9EBDF6U }, /* XSUM_XXH32_testdata[7128] */\n    { 3564, 0x9E3779B1U, 0x61ADCCE9U }, /* XSUM_XXH32_testdata[7129] */\n    { 3565, 0x00000000U, 0xB7A2296BU }, /* XSUM_XXH32_testdata[7130] */\n    { 3565, 0x9E3779B1U, 0xC1A5B56CU }, /* XSUM_XXH32_testdata[7131] */\n    { 3566, 0x00000000U, 0x15D3EAF5U }, /* XSUM_XXH32_testdata[7132] */\n    { 3566, 0x9E3779B1U, 0xEE84F700U }, /* XSUM_XXH32_testdata[7133] */\n    { 3567, 0x00000000U, 0x68AD4088U }, /* XSUM_XXH32_testdata[7134] */\n    { 3567, 0x9E3779B1U, 0x4959A852U }, /* XSUM_XXH32_testdata[7135] */\n    { 3568, 0x00000000U, 0x9C9EB0E2U }, /* XSUM_XXH32_testdata[7136] */\n    { 3568, 0x9E3779B1U, 0x46346CE5U }, /* XSUM_XXH32_testdata[7137] */\n    { 3569, 0x00000000U, 0xF28C4CF0U }, /* XSUM_XXH32_testdata[7138] */\n    { 3569, 0x9E3779B1U, 0xFD31C9EAU }, /* XSUM_XXH32_testdata[7139] */\n    { 3570, 0x00000000U, 0x51E28226U }, /* XSUM_XXH32_testdata[7140] */\n    { 3570, 0x9E3779B1U, 0xF971C6F2U }, /* XSUM_XXH32_testdata[7141] */\n    { 3571, 0x00000000U, 0x5C531B22U }, /* XSUM_XXH32_testdata[7142] */\n    { 3571, 0x9E3779B1U, 0x18A2DDFBU }, /* XSUM_XXH32_testdata[7143] */\n    { 3572, 0x00000000U, 0x6E283669U }, /* XSUM_XXH32_testdata[7144] */\n    { 3572, 0x9E3779B1U, 0xDB304732U }, /* XSUM_XXH32_testdata[7145] */\n    { 3573, 0x00000000U, 0xC3C10F98U }, /* XSUM_XXH32_testdata[7146] */\n    { 3573, 0x9E3779B1U, 0x2CEEBE73U }, /* XSUM_XXH32_testdata[7147] */\n    { 3574, 0x00000000U, 0x5155011CU }, /* XSUM_XXH32_testdata[7148] */\n    { 3574, 0x9E3779B1U, 0xBB0C964DU }, /* XSUM_XXH32_testdata[7149] */\n    { 3575, 0x00000000U, 0x9DED4077U }, /* XSUM_XXH32_testdata[7150] */\n    { 3575, 0x9E3779B1U, 0x9A75980BU }, /* XSUM_XXH32_testdata[7151] */\n    { 3576, 0x00000000U, 0x93DC6857U }, /* XSUM_XXH32_testdata[7152] */\n    { 3576, 0x9E3779B1U, 0x2702EE0FU }, /* XSUM_XXH32_testdata[7153] */\n    { 3577, 0x00000000U, 0x1A1C2D2EU }, /* XSUM_XXH32_testdata[7154] */\n    { 3577, 0x9E3779B1U, 0x716CE1D3U }, /* XSUM_XXH32_testdata[7155] */\n    { 3578, 0x00000000U, 0x636F90BBU }, /* XSUM_XXH32_testdata[7156] */\n    { 3578, 0x9E3779B1U, 0x1A7FA949U }, /* XSUM_XXH32_testdata[7157] */\n    { 3579, 0x00000000U, 0xC822F241U }, /* XSUM_XXH32_testdata[7158] */\n    { 3579, 0x9E3779B1U, 0x96E16D96U }, /* XSUM_XXH32_testdata[7159] */\n    { 3580, 0x00000000U, 0xF0A8735AU }, /* XSUM_XXH32_testdata[7160] */\n    { 3580, 0x9E3779B1U, 0x0156D3B9U }, /* XSUM_XXH32_testdata[7161] */\n    { 3581, 0x00000000U, 0xAC8804A7U }, /* XSUM_XXH32_testdata[7162] */\n    { 3581, 0x9E3779B1U, 0x5D17F278U }, /* XSUM_XXH32_testdata[7163] */\n    { 3582, 0x00000000U, 0xBCBBC758U }, /* XSUM_XXH32_testdata[7164] */\n    { 3582, 0x9E3779B1U, 0x03BE88E3U }, /* XSUM_XXH32_testdata[7165] */\n    { 3583, 0x00000000U, 0x58DA2037U }, /* XSUM_XXH32_testdata[7166] */\n    { 3583, 0x9E3779B1U, 0xFEB8042FU }, /* XSUM_XXH32_testdata[7167] */\n    { 3584, 0x00000000U, 0x6893F203U }, /* XSUM_XXH32_testdata[7168] */\n    { 3584, 0x9E3779B1U, 0xD884346AU }, /* XSUM_XXH32_testdata[7169] */\n    { 3585, 0x00000000U, 0x920F97D0U }, /* XSUM_XXH32_testdata[7170] */\n    { 3585, 0x9E3779B1U, 0xD290ACA9U }, /* XSUM_XXH32_testdata[7171] */\n    { 3586, 0x00000000U, 0x9F9A51CEU }, /* XSUM_XXH32_testdata[7172] */\n    { 3586, 0x9E3779B1U, 0x16637BACU }, /* XSUM_XXH32_testdata[7173] */\n    { 3587, 0x00000000U, 0x1945E691U }, /* XSUM_XXH32_testdata[7174] */\n    { 3587, 0x9E3779B1U, 0x26D280AEU }, /* XSUM_XXH32_testdata[7175] */\n    { 3588, 0x00000000U, 0xB3C7F86DU }, /* XSUM_XXH32_testdata[7176] */\n    { 3588, 0x9E3779B1U, 0x53FD0536U }, /* XSUM_XXH32_testdata[7177] */\n    { 3589, 0x00000000U, 0xBBEB446AU }, /* XSUM_XXH32_testdata[7178] */\n    { 3589, 0x9E3779B1U, 0xB3E8B406U }, /* XSUM_XXH32_testdata[7179] */\n    { 3590, 0x00000000U, 0x9747DA45U }, /* XSUM_XXH32_testdata[7180] */\n    { 3590, 0x9E3779B1U, 0x11E00421U }, /* XSUM_XXH32_testdata[7181] */\n    { 3591, 0x00000000U, 0x31C26A3AU }, /* XSUM_XXH32_testdata[7182] */\n    { 3591, 0x9E3779B1U, 0x80FB18F7U }, /* XSUM_XXH32_testdata[7183] */\n    { 3592, 0x00000000U, 0x81BDA98BU }, /* XSUM_XXH32_testdata[7184] */\n    { 3592, 0x9E3779B1U, 0xC4D7CF42U }, /* XSUM_XXH32_testdata[7185] */\n    { 3593, 0x00000000U, 0x195B87A6U }, /* XSUM_XXH32_testdata[7186] */\n    { 3593, 0x9E3779B1U, 0x9F2C004FU }, /* XSUM_XXH32_testdata[7187] */\n    { 3594, 0x00000000U, 0xFB20D9DBU }, /* XSUM_XXH32_testdata[7188] */\n    { 3594, 0x9E3779B1U, 0x2BE017EEU }, /* XSUM_XXH32_testdata[7189] */\n    { 3595, 0x00000000U, 0x41657EB8U }, /* XSUM_XXH32_testdata[7190] */\n    { 3595, 0x9E3779B1U, 0x37B3AD5BU }, /* XSUM_XXH32_testdata[7191] */\n    { 3596, 0x00000000U, 0x0833A515U }, /* XSUM_XXH32_testdata[7192] */\n    { 3596, 0x9E3779B1U, 0xD054E897U }, /* XSUM_XXH32_testdata[7193] */\n    { 3597, 0x00000000U, 0xC9E91D55U }, /* XSUM_XXH32_testdata[7194] */\n    { 3597, 0x9E3779B1U, 0x5EEA1C9BU }, /* XSUM_XXH32_testdata[7195] */\n    { 3598, 0x00000000U, 0x536B10ACU }, /* XSUM_XXH32_testdata[7196] */\n    { 3598, 0x9E3779B1U, 0x57C11BBEU }, /* XSUM_XXH32_testdata[7197] */\n    { 3599, 0x00000000U, 0x62ACCDF1U }, /* XSUM_XXH32_testdata[7198] */\n    { 3599, 0x9E3779B1U, 0xC80B67A2U }, /* XSUM_XXH32_testdata[7199] */\n    { 3600, 0x00000000U, 0x248FA81BU }, /* XSUM_XXH32_testdata[7200] */\n    { 3600, 0x9E3779B1U, 0x9A7F6193U }, /* XSUM_XXH32_testdata[7201] */\n    { 3601, 0x00000000U, 0x612F2F5CU }, /* XSUM_XXH32_testdata[7202] */\n    { 3601, 0x9E3779B1U, 0x68243746U }, /* XSUM_XXH32_testdata[7203] */\n    { 3602, 0x00000000U, 0xDD0AF8AEU }, /* XSUM_XXH32_testdata[7204] */\n    { 3602, 0x9E3779B1U, 0x69725F6BU }, /* XSUM_XXH32_testdata[7205] */\n    { 3603, 0x00000000U, 0x4E426DD5U }, /* XSUM_XXH32_testdata[7206] */\n    { 3603, 0x9E3779B1U, 0xA633F6E4U }, /* XSUM_XXH32_testdata[7207] */\n    { 3604, 0x00000000U, 0xDB9ACEBEU }, /* XSUM_XXH32_testdata[7208] */\n    { 3604, 0x9E3779B1U, 0x1F65BD5AU }, /* XSUM_XXH32_testdata[7209] */\n    { 3605, 0x00000000U, 0x0926AFE3U }, /* XSUM_XXH32_testdata[7210] */\n    { 3605, 0x9E3779B1U, 0xDBD7C475U }, /* XSUM_XXH32_testdata[7211] */\n    { 3606, 0x00000000U, 0x7B5FCD93U }, /* XSUM_XXH32_testdata[7212] */\n    { 3606, 0x9E3779B1U, 0xC5220832U }, /* XSUM_XXH32_testdata[7213] */\n    { 3607, 0x00000000U, 0xABE80EF3U }, /* XSUM_XXH32_testdata[7214] */\n    { 3607, 0x9E3779B1U, 0xCE0C1C05U }, /* XSUM_XXH32_testdata[7215] */\n    { 3608, 0x00000000U, 0xB1BDDC30U }, /* XSUM_XXH32_testdata[7216] */\n    { 3608, 0x9E3779B1U, 0x20010F7CU }, /* XSUM_XXH32_testdata[7217] */\n    { 3609, 0x00000000U, 0x07CFED4AU }, /* XSUM_XXH32_testdata[7218] */\n    { 3609, 0x9E3779B1U, 0x85A74074U }, /* XSUM_XXH32_testdata[7219] */\n    { 3610, 0x00000000U, 0xDBD8BA2DU }, /* XSUM_XXH32_testdata[7220] */\n    { 3610, 0x9E3779B1U, 0xFC3E98F8U }, /* XSUM_XXH32_testdata[7221] */\n    { 3611, 0x00000000U, 0x8FE9E2FBU }, /* XSUM_XXH32_testdata[7222] */\n    { 3611, 0x9E3779B1U, 0xFA564F48U }, /* XSUM_XXH32_testdata[7223] */\n    { 3612, 0x00000000U, 0x05C87C18U }, /* XSUM_XXH32_testdata[7224] */\n    { 3612, 0x9E3779B1U, 0x33734232U }, /* XSUM_XXH32_testdata[7225] */\n    { 3613, 0x00000000U, 0x3D6E0DE9U }, /* XSUM_XXH32_testdata[7226] */\n    { 3613, 0x9E3779B1U, 0x3B09945EU }, /* XSUM_XXH32_testdata[7227] */\n    { 3614, 0x00000000U, 0x2E2805ACU }, /* XSUM_XXH32_testdata[7228] */\n    { 3614, 0x9E3779B1U, 0x746DD566U }, /* XSUM_XXH32_testdata[7229] */\n    { 3615, 0x00000000U, 0x23B192C0U }, /* XSUM_XXH32_testdata[7230] */\n    { 3615, 0x9E3779B1U, 0xF8A65F68U }, /* XSUM_XXH32_testdata[7231] */\n    { 3616, 0x00000000U, 0x6D4B9060U }, /* XSUM_XXH32_testdata[7232] */\n    { 3616, 0x9E3779B1U, 0x9FB9D735U }, /* XSUM_XXH32_testdata[7233] */\n    { 3617, 0x00000000U, 0xD0D5B57EU }, /* XSUM_XXH32_testdata[7234] */\n    { 3617, 0x9E3779B1U, 0xFFC976E4U }, /* XSUM_XXH32_testdata[7235] */\n    { 3618, 0x00000000U, 0x018D8944U }, /* XSUM_XXH32_testdata[7236] */\n    { 3618, 0x9E3779B1U, 0x1181CB90U }, /* XSUM_XXH32_testdata[7237] */\n    { 3619, 0x00000000U, 0x91CA159AU }, /* XSUM_XXH32_testdata[7238] */\n    { 3619, 0x9E3779B1U, 0x55CBBA05U }, /* XSUM_XXH32_testdata[7239] */\n    { 3620, 0x00000000U, 0x3A3822BAU }, /* XSUM_XXH32_testdata[7240] */\n    { 3620, 0x9E3779B1U, 0x405DE479U }, /* XSUM_XXH32_testdata[7241] */\n    { 3621, 0x00000000U, 0xE3008463U }, /* XSUM_XXH32_testdata[7242] */\n    { 3621, 0x9E3779B1U, 0xBC60BB0CU }, /* XSUM_XXH32_testdata[7243] */\n    { 3622, 0x00000000U, 0x0D7781DFU }, /* XSUM_XXH32_testdata[7244] */\n    { 3622, 0x9E3779B1U, 0xBC99B44AU }, /* XSUM_XXH32_testdata[7245] */\n    { 3623, 0x00000000U, 0xA6A82918U }, /* XSUM_XXH32_testdata[7246] */\n    { 3623, 0x9E3779B1U, 0x04574148U }, /* XSUM_XXH32_testdata[7247] */\n    { 3624, 0x00000000U, 0xCE79503BU }, /* XSUM_XXH32_testdata[7248] */\n    { 3624, 0x9E3779B1U, 0xF13AE2DAU }, /* XSUM_XXH32_testdata[7249] */\n    { 3625, 0x00000000U, 0xDD749303U }, /* XSUM_XXH32_testdata[7250] */\n    { 3625, 0x9E3779B1U, 0x7A3FA3F5U }, /* XSUM_XXH32_testdata[7251] */\n    { 3626, 0x00000000U, 0x05F3B13FU }, /* XSUM_XXH32_testdata[7252] */\n    { 3626, 0x9E3779B1U, 0xDCCCA732U }, /* XSUM_XXH32_testdata[7253] */\n    { 3627, 0x00000000U, 0xFD0ED277U }, /* XSUM_XXH32_testdata[7254] */\n    { 3627, 0x9E3779B1U, 0x292D4ED1U }, /* XSUM_XXH32_testdata[7255] */\n    { 3628, 0x00000000U, 0xE0E69D0DU }, /* XSUM_XXH32_testdata[7256] */\n    { 3628, 0x9E3779B1U, 0x7A94BC7AU }, /* XSUM_XXH32_testdata[7257] */\n    { 3629, 0x00000000U, 0xB1729762U }, /* XSUM_XXH32_testdata[7258] */\n    { 3629, 0x9E3779B1U, 0x78782C54U }, /* XSUM_XXH32_testdata[7259] */\n    { 3630, 0x00000000U, 0xA53435FFU }, /* XSUM_XXH32_testdata[7260] */\n    { 3630, 0x9E3779B1U, 0x05E96413U }, /* XSUM_XXH32_testdata[7261] */\n    { 3631, 0x00000000U, 0x24E8B9BAU }, /* XSUM_XXH32_testdata[7262] */\n    { 3631, 0x9E3779B1U, 0x068F987BU }, /* XSUM_XXH32_testdata[7263] */\n    { 3632, 0x00000000U, 0xA1D8B4CBU }, /* XSUM_XXH32_testdata[7264] */\n    { 3632, 0x9E3779B1U, 0xBD6FD879U }, /* XSUM_XXH32_testdata[7265] */\n    { 3633, 0x00000000U, 0x2F81612CU }, /* XSUM_XXH32_testdata[7266] */\n    { 3633, 0x9E3779B1U, 0xE3CE4F02U }, /* XSUM_XXH32_testdata[7267] */\n    { 3634, 0x00000000U, 0x4BECD281U }, /* XSUM_XXH32_testdata[7268] */\n    { 3634, 0x9E3779B1U, 0x42D777B6U }, /* XSUM_XXH32_testdata[7269] */\n    { 3635, 0x00000000U, 0xF72EB756U }, /* XSUM_XXH32_testdata[7270] */\n    { 3635, 0x9E3779B1U, 0x80D63D29U }, /* XSUM_XXH32_testdata[7271] */\n    { 3636, 0x00000000U, 0x1F6CE3B9U }, /* XSUM_XXH32_testdata[7272] */\n    { 3636, 0x9E3779B1U, 0x100715A4U }, /* XSUM_XXH32_testdata[7273] */\n    { 3637, 0x00000000U, 0x6345D314U }, /* XSUM_XXH32_testdata[7274] */\n    { 3637, 0x9E3779B1U, 0xFF5303AAU }, /* XSUM_XXH32_testdata[7275] */\n    { 3638, 0x00000000U, 0xF7EA7332U }, /* XSUM_XXH32_testdata[7276] */\n    { 3638, 0x9E3779B1U, 0x913E1D4AU }, /* XSUM_XXH32_testdata[7277] */\n    { 3639, 0x00000000U, 0xD940F160U }, /* XSUM_XXH32_testdata[7278] */\n    { 3639, 0x9E3779B1U, 0x32B83120U }, /* XSUM_XXH32_testdata[7279] */\n    { 3640, 0x00000000U, 0xBAA4E80DU }, /* XSUM_XXH32_testdata[7280] */\n    { 3640, 0x9E3779B1U, 0xDDA189EBU }, /* XSUM_XXH32_testdata[7281] */\n    { 3641, 0x00000000U, 0x090BB8C3U }, /* XSUM_XXH32_testdata[7282] */\n    { 3641, 0x9E3779B1U, 0xF3477C4CU }, /* XSUM_XXH32_testdata[7283] */\n    { 3642, 0x00000000U, 0xE0AE7710U }, /* XSUM_XXH32_testdata[7284] */\n    { 3642, 0x9E3779B1U, 0x352779AAU }, /* XSUM_XXH32_testdata[7285] */\n    { 3643, 0x00000000U, 0xEE0DDE23U }, /* XSUM_XXH32_testdata[7286] */\n    { 3643, 0x9E3779B1U, 0x99297192U }, /* XSUM_XXH32_testdata[7287] */\n    { 3644, 0x00000000U, 0x4FE78ECFU }, /* XSUM_XXH32_testdata[7288] */\n    { 3644, 0x9E3779B1U, 0xC295548CU }, /* XSUM_XXH32_testdata[7289] */\n    { 3645, 0x00000000U, 0x8003E9D6U }, /* XSUM_XXH32_testdata[7290] */\n    { 3645, 0x9E3779B1U, 0xF8A5B12CU }, /* XSUM_XXH32_testdata[7291] */\n    { 3646, 0x00000000U, 0xBB44D6ECU }, /* XSUM_XXH32_testdata[7292] */\n    { 3646, 0x9E3779B1U, 0x4D278668U }, /* XSUM_XXH32_testdata[7293] */\n    { 3647, 0x00000000U, 0x66D490B2U }, /* XSUM_XXH32_testdata[7294] */\n    { 3647, 0x9E3779B1U, 0xC9BFAE22U }, /* XSUM_XXH32_testdata[7295] */\n    { 3648, 0x00000000U, 0x433EEDFBU }, /* XSUM_XXH32_testdata[7296] */\n    { 3648, 0x9E3779B1U, 0x6DF2AB93U }, /* XSUM_XXH32_testdata[7297] */\n    { 3649, 0x00000000U, 0xAE3CC2A2U }, /* XSUM_XXH32_testdata[7298] */\n    { 3649, 0x9E3779B1U, 0xFBA61A0BU }, /* XSUM_XXH32_testdata[7299] */\n    { 3650, 0x00000000U, 0xD4B857B4U }, /* XSUM_XXH32_testdata[7300] */\n    { 3650, 0x9E3779B1U, 0x8613D6D3U }, /* XSUM_XXH32_testdata[7301] */\n    { 3651, 0x00000000U, 0xACA5779EU }, /* XSUM_XXH32_testdata[7302] */\n    { 3651, 0x9E3779B1U, 0x2F99119FU }, /* XSUM_XXH32_testdata[7303] */\n    { 3652, 0x00000000U, 0x6A73923DU }, /* XSUM_XXH32_testdata[7304] */\n    { 3652, 0x9E3779B1U, 0xD6FE0D5EU }, /* XSUM_XXH32_testdata[7305] */\n    { 3653, 0x00000000U, 0x4BB6A2B8U }, /* XSUM_XXH32_testdata[7306] */\n    { 3653, 0x9E3779B1U, 0x5F5A48D4U }, /* XSUM_XXH32_testdata[7307] */\n    { 3654, 0x00000000U, 0x264DC18AU }, /* XSUM_XXH32_testdata[7308] */\n    { 3654, 0x9E3779B1U, 0xAA205A02U }, /* XSUM_XXH32_testdata[7309] */\n    { 3655, 0x00000000U, 0x7702D38EU }, /* XSUM_XXH32_testdata[7310] */\n    { 3655, 0x9E3779B1U, 0xD7A9C885U }, /* XSUM_XXH32_testdata[7311] */\n    { 3656, 0x00000000U, 0xA2341A92U }, /* XSUM_XXH32_testdata[7312] */\n    { 3656, 0x9E3779B1U, 0xEDA179DBU }, /* XSUM_XXH32_testdata[7313] */\n    { 3657, 0x00000000U, 0xB2C78F40U }, /* XSUM_XXH32_testdata[7314] */\n    { 3657, 0x9E3779B1U, 0x34D8E18AU }, /* XSUM_XXH32_testdata[7315] */\n    { 3658, 0x00000000U, 0xF46825EAU }, /* XSUM_XXH32_testdata[7316] */\n    { 3658, 0x9E3779B1U, 0x6BA4000DU }, /* XSUM_XXH32_testdata[7317] */\n    { 3659, 0x00000000U, 0x272A1414U }, /* XSUM_XXH32_testdata[7318] */\n    { 3659, 0x9E3779B1U, 0x1C225E88U }, /* XSUM_XXH32_testdata[7319] */\n    { 3660, 0x00000000U, 0x4D40BB27U }, /* XSUM_XXH32_testdata[7320] */\n    { 3660, 0x9E3779B1U, 0x86F6E4B7U }, /* XSUM_XXH32_testdata[7321] */\n    { 3661, 0x00000000U, 0xE47B2164U }, /* XSUM_XXH32_testdata[7322] */\n    { 3661, 0x9E3779B1U, 0x057B0989U }, /* XSUM_XXH32_testdata[7323] */\n    { 3662, 0x00000000U, 0xF4F3B211U }, /* XSUM_XXH32_testdata[7324] */\n    { 3662, 0x9E3779B1U, 0xA37ED698U }, /* XSUM_XXH32_testdata[7325] */\n    { 3663, 0x00000000U, 0x66F56DEAU }, /* XSUM_XXH32_testdata[7326] */\n    { 3663, 0x9E3779B1U, 0xB1A96290U }, /* XSUM_XXH32_testdata[7327] */\n    { 3664, 0x00000000U, 0xD7C9727FU }, /* XSUM_XXH32_testdata[7328] */\n    { 3664, 0x9E3779B1U, 0x23D3D26EU }, /* XSUM_XXH32_testdata[7329] */\n    { 3665, 0x00000000U, 0xECEF42D3U }, /* XSUM_XXH32_testdata[7330] */\n    { 3665, 0x9E3779B1U, 0x3F7AF7EBU }, /* XSUM_XXH32_testdata[7331] */\n    { 3666, 0x00000000U, 0x8C1A3722U }, /* XSUM_XXH32_testdata[7332] */\n    { 3666, 0x9E3779B1U, 0x5053CF8BU }, /* XSUM_XXH32_testdata[7333] */\n    { 3667, 0x00000000U, 0xC0B70BF5U }, /* XSUM_XXH32_testdata[7334] */\n    { 3667, 0x9E3779B1U, 0xE9C1437BU }, /* XSUM_XXH32_testdata[7335] */\n    { 3668, 0x00000000U, 0xAFF57195U }, /* XSUM_XXH32_testdata[7336] */\n    { 3668, 0x9E3779B1U, 0x631E9AB7U }, /* XSUM_XXH32_testdata[7337] */\n    { 3669, 0x00000000U, 0xC7AAE176U }, /* XSUM_XXH32_testdata[7338] */\n    { 3669, 0x9E3779B1U, 0x221A00AAU }, /* XSUM_XXH32_testdata[7339] */\n    { 3670, 0x00000000U, 0x1352CD2BU }, /* XSUM_XXH32_testdata[7340] */\n    { 3670, 0x9E3779B1U, 0x82FE38E4U }, /* XSUM_XXH32_testdata[7341] */\n    { 3671, 0x00000000U, 0xF32EE209U }, /* XSUM_XXH32_testdata[7342] */\n    { 3671, 0x9E3779B1U, 0xEDB27D0BU }, /* XSUM_XXH32_testdata[7343] */\n    { 3672, 0x00000000U, 0x745030EEU }, /* XSUM_XXH32_testdata[7344] */\n    { 3672, 0x9E3779B1U, 0x0A815D11U }, /* XSUM_XXH32_testdata[7345] */\n    { 3673, 0x00000000U, 0x45973C5EU }, /* XSUM_XXH32_testdata[7346] */\n    { 3673, 0x9E3779B1U, 0x7E73FDC1U }, /* XSUM_XXH32_testdata[7347] */\n    { 3674, 0x00000000U, 0x031151AEU }, /* XSUM_XXH32_testdata[7348] */\n    { 3674, 0x9E3779B1U, 0x88D82AA3U }, /* XSUM_XXH32_testdata[7349] */\n    { 3675, 0x00000000U, 0x1AC982C5U }, /* XSUM_XXH32_testdata[7350] */\n    { 3675, 0x9E3779B1U, 0xC63D047FU }, /* XSUM_XXH32_testdata[7351] */\n    { 3676, 0x00000000U, 0x4C2E7260U }, /* XSUM_XXH32_testdata[7352] */\n    { 3676, 0x9E3779B1U, 0x33271915U }, /* XSUM_XXH32_testdata[7353] */\n    { 3677, 0x00000000U, 0x74A66944U }, /* XSUM_XXH32_testdata[7354] */\n    { 3677, 0x9E3779B1U, 0xB8EC2F48U }, /* XSUM_XXH32_testdata[7355] */\n    { 3678, 0x00000000U, 0xED58C98DU }, /* XSUM_XXH32_testdata[7356] */\n    { 3678, 0x9E3779B1U, 0x61D8E0C5U }, /* XSUM_XXH32_testdata[7357] */\n    { 3679, 0x00000000U, 0x5903CF0FU }, /* XSUM_XXH32_testdata[7358] */\n    { 3679, 0x9E3779B1U, 0x7F4C3174U }, /* XSUM_XXH32_testdata[7359] */\n    { 3680, 0x00000000U, 0x82CFC45FU }, /* XSUM_XXH32_testdata[7360] */\n    { 3680, 0x9E3779B1U, 0x1058A07EU }, /* XSUM_XXH32_testdata[7361] */\n    { 3681, 0x00000000U, 0x4D663B2DU }, /* XSUM_XXH32_testdata[7362] */\n    { 3681, 0x9E3779B1U, 0xFAA5E9A8U }, /* XSUM_XXH32_testdata[7363] */\n    { 3682, 0x00000000U, 0xA72C0F91U }, /* XSUM_XXH32_testdata[7364] */\n    { 3682, 0x9E3779B1U, 0x9FD90FFBU }, /* XSUM_XXH32_testdata[7365] */\n    { 3683, 0x00000000U, 0xA45A9480U }, /* XSUM_XXH32_testdata[7366] */\n    { 3683, 0x9E3779B1U, 0x34593515U }, /* XSUM_XXH32_testdata[7367] */\n    { 3684, 0x00000000U, 0xD9F22F8BU }, /* XSUM_XXH32_testdata[7368] */\n    { 3684, 0x9E3779B1U, 0xE6B8FE71U }, /* XSUM_XXH32_testdata[7369] */\n    { 3685, 0x00000000U, 0xEE13ABA8U }, /* XSUM_XXH32_testdata[7370] */\n    { 3685, 0x9E3779B1U, 0x804A8630U }, /* XSUM_XXH32_testdata[7371] */\n    { 3686, 0x00000000U, 0x6DFA7CE4U }, /* XSUM_XXH32_testdata[7372] */\n    { 3686, 0x9E3779B1U, 0x67D09C0DU }, /* XSUM_XXH32_testdata[7373] */\n    { 3687, 0x00000000U, 0x6EF8729AU }, /* XSUM_XXH32_testdata[7374] */\n    { 3687, 0x9E3779B1U, 0x7B09E3BBU }, /* XSUM_XXH32_testdata[7375] */\n    { 3688, 0x00000000U, 0x386E29C6U }, /* XSUM_XXH32_testdata[7376] */\n    { 3688, 0x9E3779B1U, 0x601345A1U }, /* XSUM_XXH32_testdata[7377] */\n    { 3689, 0x00000000U, 0xC36A10CCU }, /* XSUM_XXH32_testdata[7378] */\n    { 3689, 0x9E3779B1U, 0xE62B5109U }, /* XSUM_XXH32_testdata[7379] */\n    { 3690, 0x00000000U, 0x260FCC1BU }, /* XSUM_XXH32_testdata[7380] */\n    { 3690, 0x9E3779B1U, 0x2B7E8B72U }, /* XSUM_XXH32_testdata[7381] */\n    { 3691, 0x00000000U, 0xACA468F6U }, /* XSUM_XXH32_testdata[7382] */\n    { 3691, 0x9E3779B1U, 0x6069FDF5U }, /* XSUM_XXH32_testdata[7383] */\n    { 3692, 0x00000000U, 0x542352E4U }, /* XSUM_XXH32_testdata[7384] */\n    { 3692, 0x9E3779B1U, 0x0B605099U }, /* XSUM_XXH32_testdata[7385] */\n    { 3693, 0x00000000U, 0xA17F3D6EU }, /* XSUM_XXH32_testdata[7386] */\n    { 3693, 0x9E3779B1U, 0x8063C86CU }, /* XSUM_XXH32_testdata[7387] */\n    { 3694, 0x00000000U, 0x4F62B431U }, /* XSUM_XXH32_testdata[7388] */\n    { 3694, 0x9E3779B1U, 0xB2BEC7F3U }, /* XSUM_XXH32_testdata[7389] */\n    { 3695, 0x00000000U, 0xA8029317U }, /* XSUM_XXH32_testdata[7390] */\n    { 3695, 0x9E3779B1U, 0x43618226U }, /* XSUM_XXH32_testdata[7391] */\n    { 3696, 0x00000000U, 0x45706DF3U }, /* XSUM_XXH32_testdata[7392] */\n    { 3696, 0x9E3779B1U, 0x2F35E653U }, /* XSUM_XXH32_testdata[7393] */\n    { 3697, 0x00000000U, 0x5B284F60U }, /* XSUM_XXH32_testdata[7394] */\n    { 3697, 0x9E3779B1U, 0x9852317AU }, /* XSUM_XXH32_testdata[7395] */\n    { 3698, 0x00000000U, 0x758BF7CDU }, /* XSUM_XXH32_testdata[7396] */\n    { 3698, 0x9E3779B1U, 0xEB4568B2U }, /* XSUM_XXH32_testdata[7397] */\n    { 3699, 0x00000000U, 0x5D4C2318U }, /* XSUM_XXH32_testdata[7398] */\n    { 3699, 0x9E3779B1U, 0x2D32982BU }, /* XSUM_XXH32_testdata[7399] */\n    { 3700, 0x00000000U, 0x33C10122U }, /* XSUM_XXH32_testdata[7400] */\n    { 3700, 0x9E3779B1U, 0xA3651514U }, /* XSUM_XXH32_testdata[7401] */\n    { 3701, 0x00000000U, 0x83547B57U }, /* XSUM_XXH32_testdata[7402] */\n    { 3701, 0x9E3779B1U, 0x1C474766U }, /* XSUM_XXH32_testdata[7403] */\n    { 3702, 0x00000000U, 0xDA116714U }, /* XSUM_XXH32_testdata[7404] */\n    { 3702, 0x9E3779B1U, 0x5BD04190U }, /* XSUM_XXH32_testdata[7405] */\n    { 3703, 0x00000000U, 0x3065CE83U }, /* XSUM_XXH32_testdata[7406] */\n    { 3703, 0x9E3779B1U, 0xE016429DU }, /* XSUM_XXH32_testdata[7407] */\n    { 3704, 0x00000000U, 0xE1CCEF1BU }, /* XSUM_XXH32_testdata[7408] */\n    { 3704, 0x9E3779B1U, 0xE2B2E9FAU }, /* XSUM_XXH32_testdata[7409] */\n    { 3705, 0x00000000U, 0x6178948AU }, /* XSUM_XXH32_testdata[7410] */\n    { 3705, 0x9E3779B1U, 0x034FF7A6U }, /* XSUM_XXH32_testdata[7411] */\n    { 3706, 0x00000000U, 0xC843319DU }, /* XSUM_XXH32_testdata[7412] */\n    { 3706, 0x9E3779B1U, 0x4DD7EADBU }, /* XSUM_XXH32_testdata[7413] */\n    { 3707, 0x00000000U, 0x9DF614D2U }, /* XSUM_XXH32_testdata[7414] */\n    { 3707, 0x9E3779B1U, 0xF556E4DFU }, /* XSUM_XXH32_testdata[7415] */\n    { 3708, 0x00000000U, 0x65256DF7U }, /* XSUM_XXH32_testdata[7416] */\n    { 3708, 0x9E3779B1U, 0x0360C7BBU }, /* XSUM_XXH32_testdata[7417] */\n    { 3709, 0x00000000U, 0xC64ECC4EU }, /* XSUM_XXH32_testdata[7418] */\n    { 3709, 0x9E3779B1U, 0x1A9836B5U }, /* XSUM_XXH32_testdata[7419] */\n    { 3710, 0x00000000U, 0x2C4F1519U }, /* XSUM_XXH32_testdata[7420] */\n    { 3710, 0x9E3779B1U, 0x94413DBFU }, /* XSUM_XXH32_testdata[7421] */\n    { 3711, 0x00000000U, 0x7B951D8AU }, /* XSUM_XXH32_testdata[7422] */\n    { 3711, 0x9E3779B1U, 0x7A753A37U }, /* XSUM_XXH32_testdata[7423] */\n    { 3712, 0x00000000U, 0x94551EA8U }, /* XSUM_XXH32_testdata[7424] */\n    { 3712, 0x9E3779B1U, 0xC355F747U }, /* XSUM_XXH32_testdata[7425] */\n    { 3713, 0x00000000U, 0x7CC26887U }, /* XSUM_XXH32_testdata[7426] */\n    { 3713, 0x9E3779B1U, 0xDD12E48CU }, /* XSUM_XXH32_testdata[7427] */\n    { 3714, 0x00000000U, 0x42DDCC2AU }, /* XSUM_XXH32_testdata[7428] */\n    { 3714, 0x9E3779B1U, 0x1018E2A0U }, /* XSUM_XXH32_testdata[7429] */\n    { 3715, 0x00000000U, 0xA9C63B4EU }, /* XSUM_XXH32_testdata[7430] */\n    { 3715, 0x9E3779B1U, 0xC20D4B7BU }, /* XSUM_XXH32_testdata[7431] */\n    { 3716, 0x00000000U, 0x2655A769U }, /* XSUM_XXH32_testdata[7432] */\n    { 3716, 0x9E3779B1U, 0x76B93468U }, /* XSUM_XXH32_testdata[7433] */\n    { 3717, 0x00000000U, 0x58CDE87FU }, /* XSUM_XXH32_testdata[7434] */\n    { 3717, 0x9E3779B1U, 0x3C90FD52U }, /* XSUM_XXH32_testdata[7435] */\n    { 3718, 0x00000000U, 0xCE78CC65U }, /* XSUM_XXH32_testdata[7436] */\n    { 3718, 0x9E3779B1U, 0x06DA3AC6U }, /* XSUM_XXH32_testdata[7437] */\n    { 3719, 0x00000000U, 0xD1AD787DU }, /* XSUM_XXH32_testdata[7438] */\n    { 3719, 0x9E3779B1U, 0x86BD7E31U }, /* XSUM_XXH32_testdata[7439] */\n    { 3720, 0x00000000U, 0xCE8A56A4U }, /* XSUM_XXH32_testdata[7440] */\n    { 3720, 0x9E3779B1U, 0x76F383CBU }, /* XSUM_XXH32_testdata[7441] */\n    { 3721, 0x00000000U, 0xDC59A031U }, /* XSUM_XXH32_testdata[7442] */\n    { 3721, 0x9E3779B1U, 0x63EA3B1FU }, /* XSUM_XXH32_testdata[7443] */\n    { 3722, 0x00000000U, 0xD4705B0BU }, /* XSUM_XXH32_testdata[7444] */\n    { 3722, 0x9E3779B1U, 0x56FBC37BU }, /* XSUM_XXH32_testdata[7445] */\n    { 3723, 0x00000000U, 0xE62BD3C4U }, /* XSUM_XXH32_testdata[7446] */\n    { 3723, 0x9E3779B1U, 0x0B23AB6FU }, /* XSUM_XXH32_testdata[7447] */\n    { 3724, 0x00000000U, 0xE40798AEU }, /* XSUM_XXH32_testdata[7448] */\n    { 3724, 0x9E3779B1U, 0xEC2AC096U }, /* XSUM_XXH32_testdata[7449] */\n    { 3725, 0x00000000U, 0xC3396E38U }, /* XSUM_XXH32_testdata[7450] */\n    { 3725, 0x9E3779B1U, 0x983FAF13U }, /* XSUM_XXH32_testdata[7451] */\n    { 3726, 0x00000000U, 0x987997A1U }, /* XSUM_XXH32_testdata[7452] */\n    { 3726, 0x9E3779B1U, 0x9DC3BBBCU }, /* XSUM_XXH32_testdata[7453] */\n    { 3727, 0x00000000U, 0xE340542AU }, /* XSUM_XXH32_testdata[7454] */\n    { 3727, 0x9E3779B1U, 0xBF89855AU }, /* XSUM_XXH32_testdata[7455] */\n    { 3728, 0x00000000U, 0xCF6DD7D7U }, /* XSUM_XXH32_testdata[7456] */\n    { 3728, 0x9E3779B1U, 0x320DCDC9U }, /* XSUM_XXH32_testdata[7457] */\n    { 3729, 0x00000000U, 0x1D4EC2D6U }, /* XSUM_XXH32_testdata[7458] */\n    { 3729, 0x9E3779B1U, 0x4858512FU }, /* XSUM_XXH32_testdata[7459] */\n    { 3730, 0x00000000U, 0xB1C37596U }, /* XSUM_XXH32_testdata[7460] */\n    { 3730, 0x9E3779B1U, 0x510EC4C0U }, /* XSUM_XXH32_testdata[7461] */\n    { 3731, 0x00000000U, 0xF1148C52U }, /* XSUM_XXH32_testdata[7462] */\n    { 3731, 0x9E3779B1U, 0x6C7F9A14U }, /* XSUM_XXH32_testdata[7463] */\n    { 3732, 0x00000000U, 0x28583BAFU }, /* XSUM_XXH32_testdata[7464] */\n    { 3732, 0x9E3779B1U, 0x7EEABB00U }, /* XSUM_XXH32_testdata[7465] */\n    { 3733, 0x00000000U, 0xC21AD3E6U }, /* XSUM_XXH32_testdata[7466] */\n    { 3733, 0x9E3779B1U, 0x30102CDDU }, /* XSUM_XXH32_testdata[7467] */\n    { 3734, 0x00000000U, 0xD2817B73U }, /* XSUM_XXH32_testdata[7468] */\n    { 3734, 0x9E3779B1U, 0x5E22FAD0U }, /* XSUM_XXH32_testdata[7469] */\n    { 3735, 0x00000000U, 0x8A649B6DU }, /* XSUM_XXH32_testdata[7470] */\n    { 3735, 0x9E3779B1U, 0xD78309FDU }, /* XSUM_XXH32_testdata[7471] */\n    { 3736, 0x00000000U, 0xC45E2BFAU }, /* XSUM_XXH32_testdata[7472] */\n    { 3736, 0x9E3779B1U, 0xBF3DE1C6U }, /* XSUM_XXH32_testdata[7473] */\n    { 3737, 0x00000000U, 0x69636B85U }, /* XSUM_XXH32_testdata[7474] */\n    { 3737, 0x9E3779B1U, 0x5D086E83U }, /* XSUM_XXH32_testdata[7475] */\n    { 3738, 0x00000000U, 0x27896AF6U }, /* XSUM_XXH32_testdata[7476] */\n    { 3738, 0x9E3779B1U, 0xDC7033BEU }, /* XSUM_XXH32_testdata[7477] */\n    { 3739, 0x00000000U, 0xC06DD178U }, /* XSUM_XXH32_testdata[7478] */\n    { 3739, 0x9E3779B1U, 0x3293F1A1U }, /* XSUM_XXH32_testdata[7479] */\n    { 3740, 0x00000000U, 0x582BFEF5U }, /* XSUM_XXH32_testdata[7480] */\n    { 3740, 0x9E3779B1U, 0xA3943411U }, /* XSUM_XXH32_testdata[7481] */\n    { 3741, 0x00000000U, 0x9AA2E420U }, /* XSUM_XXH32_testdata[7482] */\n    { 3741, 0x9E3779B1U, 0x57C2A2BBU }, /* XSUM_XXH32_testdata[7483] */\n    { 3742, 0x00000000U, 0xF3A7CAABU }, /* XSUM_XXH32_testdata[7484] */\n    { 3742, 0x9E3779B1U, 0x282ECF0CU }, /* XSUM_XXH32_testdata[7485] */\n    { 3743, 0x00000000U, 0x1EAB3669U }, /* XSUM_XXH32_testdata[7486] */\n    { 3743, 0x9E3779B1U, 0xF735DC31U }, /* XSUM_XXH32_testdata[7487] */\n    { 3744, 0x00000000U, 0x0F98E12BU }, /* XSUM_XXH32_testdata[7488] */\n    { 3744, 0x9E3779B1U, 0xDDB74BD3U }, /* XSUM_XXH32_testdata[7489] */\n    { 3745, 0x00000000U, 0x2A215D59U }, /* XSUM_XXH32_testdata[7490] */\n    { 3745, 0x9E3779B1U, 0x1009D718U }, /* XSUM_XXH32_testdata[7491] */\n    { 3746, 0x00000000U, 0xD2BCF5A7U }, /* XSUM_XXH32_testdata[7492] */\n    { 3746, 0x9E3779B1U, 0x7CD00940U }, /* XSUM_XXH32_testdata[7493] */\n    { 3747, 0x00000000U, 0x6ACD349DU }, /* XSUM_XXH32_testdata[7494] */\n    { 3747, 0x9E3779B1U, 0x0E293019U }, /* XSUM_XXH32_testdata[7495] */\n    { 3748, 0x00000000U, 0x7FCC22EDU }, /* XSUM_XXH32_testdata[7496] */\n    { 3748, 0x9E3779B1U, 0xBE7BF9D8U }, /* XSUM_XXH32_testdata[7497] */\n    { 3749, 0x00000000U, 0xDE21C74CU }, /* XSUM_XXH32_testdata[7498] */\n    { 3749, 0x9E3779B1U, 0xC41A1848U }, /* XSUM_XXH32_testdata[7499] */\n    { 3750, 0x00000000U, 0x4721843AU }, /* XSUM_XXH32_testdata[7500] */\n    { 3750, 0x9E3779B1U, 0x2001D2FFU }, /* XSUM_XXH32_testdata[7501] */\n    { 3751, 0x00000000U, 0x72F4FA40U }, /* XSUM_XXH32_testdata[7502] */\n    { 3751, 0x9E3779B1U, 0xEBC00440U }, /* XSUM_XXH32_testdata[7503] */\n    { 3752, 0x00000000U, 0x36E7C784U }, /* XSUM_XXH32_testdata[7504] */\n    { 3752, 0x9E3779B1U, 0x6D483275U }, /* XSUM_XXH32_testdata[7505] */\n    { 3753, 0x00000000U, 0x0066FD36U }, /* XSUM_XXH32_testdata[7506] */\n    { 3753, 0x9E3779B1U, 0x88F76FBCU }, /* XSUM_XXH32_testdata[7507] */\n    { 3754, 0x00000000U, 0x8518918BU }, /* XSUM_XXH32_testdata[7508] */\n    { 3754, 0x9E3779B1U, 0x186D0EC1U }, /* XSUM_XXH32_testdata[7509] */\n    { 3755, 0x00000000U, 0x0DA7E4B3U }, /* XSUM_XXH32_testdata[7510] */\n    { 3755, 0x9E3779B1U, 0xF003D842U }, /* XSUM_XXH32_testdata[7511] */\n    { 3756, 0x00000000U, 0x4A2A9BACU }, /* XSUM_XXH32_testdata[7512] */\n    { 3756, 0x9E3779B1U, 0x014FE30AU }, /* XSUM_XXH32_testdata[7513] */\n    { 3757, 0x00000000U, 0xC8C74DADU }, /* XSUM_XXH32_testdata[7514] */\n    { 3757, 0x9E3779B1U, 0x3B03D198U }, /* XSUM_XXH32_testdata[7515] */\n    { 3758, 0x00000000U, 0x85394D70U }, /* XSUM_XXH32_testdata[7516] */\n    { 3758, 0x9E3779B1U, 0x79633D94U }, /* XSUM_XXH32_testdata[7517] */\n    { 3759, 0x00000000U, 0xA9AFA1F8U }, /* XSUM_XXH32_testdata[7518] */\n    { 3759, 0x9E3779B1U, 0x0C1AD4B0U }, /* XSUM_XXH32_testdata[7519] */\n    { 3760, 0x00000000U, 0x3FDBC6FCU }, /* XSUM_XXH32_testdata[7520] */\n    { 3760, 0x9E3779B1U, 0x7CE81D25U }, /* XSUM_XXH32_testdata[7521] */\n    { 3761, 0x00000000U, 0xAFB9F7D6U }, /* XSUM_XXH32_testdata[7522] */\n    { 3761, 0x9E3779B1U, 0xBF8B8874U }, /* XSUM_XXH32_testdata[7523] */\n    { 3762, 0x00000000U, 0xC6FDAD8EU }, /* XSUM_XXH32_testdata[7524] */\n    { 3762, 0x9E3779B1U, 0x7893396FU }, /* XSUM_XXH32_testdata[7525] */\n    { 3763, 0x00000000U, 0x01EDA010U }, /* XSUM_XXH32_testdata[7526] */\n    { 3763, 0x9E3779B1U, 0xCA04CD1AU }, /* XSUM_XXH32_testdata[7527] */\n    { 3764, 0x00000000U, 0xBA4019EAU }, /* XSUM_XXH32_testdata[7528] */\n    { 3764, 0x9E3779B1U, 0x9A4E4382U }, /* XSUM_XXH32_testdata[7529] */\n    { 3765, 0x00000000U, 0xA38F0B87U }, /* XSUM_XXH32_testdata[7530] */\n    { 3765, 0x9E3779B1U, 0xAC29BF75U }, /* XSUM_XXH32_testdata[7531] */\n    { 3766, 0x00000000U, 0x781A7878U }, /* XSUM_XXH32_testdata[7532] */\n    { 3766, 0x9E3779B1U, 0xE7BC06E5U }, /* XSUM_XXH32_testdata[7533] */\n    { 3767, 0x00000000U, 0x625E85B7U }, /* XSUM_XXH32_testdata[7534] */\n    { 3767, 0x9E3779B1U, 0xAF1024E5U }, /* XSUM_XXH32_testdata[7535] */\n    { 3768, 0x00000000U, 0xDEB97F02U }, /* XSUM_XXH32_testdata[7536] */\n    { 3768, 0x9E3779B1U, 0xA00DB23EU }, /* XSUM_XXH32_testdata[7537] */\n    { 3769, 0x00000000U, 0x7A62CC22U }, /* XSUM_XXH32_testdata[7538] */\n    { 3769, 0x9E3779B1U, 0x1F907841U }, /* XSUM_XXH32_testdata[7539] */\n    { 3770, 0x00000000U, 0xE0BDD2E2U }, /* XSUM_XXH32_testdata[7540] */\n    { 3770, 0x9E3779B1U, 0xE86684CAU }, /* XSUM_XXH32_testdata[7541] */\n    { 3771, 0x00000000U, 0xAF4703E1U }, /* XSUM_XXH32_testdata[7542] */\n    { 3771, 0x9E3779B1U, 0x9479705BU }, /* XSUM_XXH32_testdata[7543] */\n    { 3772, 0x00000000U, 0xB1BAD969U }, /* XSUM_XXH32_testdata[7544] */\n    { 3772, 0x9E3779B1U, 0x385EE455U }, /* XSUM_XXH32_testdata[7545] */\n    { 3773, 0x00000000U, 0x259496C2U }, /* XSUM_XXH32_testdata[7546] */\n    { 3773, 0x9E3779B1U, 0x40506A4DU }, /* XSUM_XXH32_testdata[7547] */\n    { 3774, 0x00000000U, 0xC617BBDBU }, /* XSUM_XXH32_testdata[7548] */\n    { 3774, 0x9E3779B1U, 0xC3DA4B56U }, /* XSUM_XXH32_testdata[7549] */\n    { 3775, 0x00000000U, 0x16887332U }, /* XSUM_XXH32_testdata[7550] */\n    { 3775, 0x9E3779B1U, 0xC76DD0CAU }, /* XSUM_XXH32_testdata[7551] */\n    { 3776, 0x00000000U, 0x4042E3EAU }, /* XSUM_XXH32_testdata[7552] */\n    { 3776, 0x9E3779B1U, 0x0B214C11U }, /* XSUM_XXH32_testdata[7553] */\n    { 3777, 0x00000000U, 0x2B97F997U }, /* XSUM_XXH32_testdata[7554] */\n    { 3777, 0x9E3779B1U, 0x7830BAECU }, /* XSUM_XXH32_testdata[7555] */\n    { 3778, 0x00000000U, 0x9CD1ECA8U }, /* XSUM_XXH32_testdata[7556] */\n    { 3778, 0x9E3779B1U, 0x2A17A4A8U }, /* XSUM_XXH32_testdata[7557] */\n    { 3779, 0x00000000U, 0x7A679A14U }, /* XSUM_XXH32_testdata[7558] */\n    { 3779, 0x9E3779B1U, 0xC2C58E4CU }, /* XSUM_XXH32_testdata[7559] */\n    { 3780, 0x00000000U, 0xDBE9D278U }, /* XSUM_XXH32_testdata[7560] */\n    { 3780, 0x9E3779B1U, 0xDD4BBC34U }, /* XSUM_XXH32_testdata[7561] */\n    { 3781, 0x00000000U, 0x671FAA61U }, /* XSUM_XXH32_testdata[7562] */\n    { 3781, 0x9E3779B1U, 0x8740D41EU }, /* XSUM_XXH32_testdata[7563] */\n    { 3782, 0x00000000U, 0xF6B28D11U }, /* XSUM_XXH32_testdata[7564] */\n    { 3782, 0x9E3779B1U, 0x5A6708FBU }, /* XSUM_XXH32_testdata[7565] */\n    { 3783, 0x00000000U, 0xBB097B12U }, /* XSUM_XXH32_testdata[7566] */\n    { 3783, 0x9E3779B1U, 0x2248392FU }, /* XSUM_XXH32_testdata[7567] */\n    { 3784, 0x00000000U, 0x36755952U }, /* XSUM_XXH32_testdata[7568] */\n    { 3784, 0x9E3779B1U, 0x8FFAE0DDU }, /* XSUM_XXH32_testdata[7569] */\n    { 3785, 0x00000000U, 0x4DCBDF78U }, /* XSUM_XXH32_testdata[7570] */\n    { 3785, 0x9E3779B1U, 0x3A50A1F1U }, /* XSUM_XXH32_testdata[7571] */\n    { 3786, 0x00000000U, 0x3464AA46U }, /* XSUM_XXH32_testdata[7572] */\n    { 3786, 0x9E3779B1U, 0x2BF1CB29U }, /* XSUM_XXH32_testdata[7573] */\n    { 3787, 0x00000000U, 0x9D818D4BU }, /* XSUM_XXH32_testdata[7574] */\n    { 3787, 0x9E3779B1U, 0x950296B4U }, /* XSUM_XXH32_testdata[7575] */\n    { 3788, 0x00000000U, 0x5B5E0AEEU }, /* XSUM_XXH32_testdata[7576] */\n    { 3788, 0x9E3779B1U, 0x5EE69D48U }, /* XSUM_XXH32_testdata[7577] */\n    { 3789, 0x00000000U, 0x93107692U }, /* XSUM_XXH32_testdata[7578] */\n    { 3789, 0x9E3779B1U, 0x3F119A9BU }, /* XSUM_XXH32_testdata[7579] */\n    { 3790, 0x00000000U, 0xFB077236U }, /* XSUM_XXH32_testdata[7580] */\n    { 3790, 0x9E3779B1U, 0x8F497AD8U }, /* XSUM_XXH32_testdata[7581] */\n    { 3791, 0x00000000U, 0x073F52A2U }, /* XSUM_XXH32_testdata[7582] */\n    { 3791, 0x9E3779B1U, 0x4CF022B4U }, /* XSUM_XXH32_testdata[7583] */\n    { 3792, 0x00000000U, 0xB0AC0606U }, /* XSUM_XXH32_testdata[7584] */\n    { 3792, 0x9E3779B1U, 0x57004481U }, /* XSUM_XXH32_testdata[7585] */\n    { 3793, 0x00000000U, 0xCC986268U }, /* XSUM_XXH32_testdata[7586] */\n    { 3793, 0x9E3779B1U, 0x7A84AE37U }, /* XSUM_XXH32_testdata[7587] */\n    { 3794, 0x00000000U, 0xAF087FC8U }, /* XSUM_XXH32_testdata[7588] */\n    { 3794, 0x9E3779B1U, 0x0D7BDB8CU }, /* XSUM_XXH32_testdata[7589] */\n    { 3795, 0x00000000U, 0xA08FDF3FU }, /* XSUM_XXH32_testdata[7590] */\n    { 3795, 0x9E3779B1U, 0xE5312F02U }, /* XSUM_XXH32_testdata[7591] */\n    { 3796, 0x00000000U, 0xD158C24EU }, /* XSUM_XXH32_testdata[7592] */\n    { 3796, 0x9E3779B1U, 0x1C34B816U }, /* XSUM_XXH32_testdata[7593] */\n    { 3797, 0x00000000U, 0xD14A0C71U }, /* XSUM_XXH32_testdata[7594] */\n    { 3797, 0x9E3779B1U, 0x98E2F625U }, /* XSUM_XXH32_testdata[7595] */\n    { 3798, 0x00000000U, 0x0ED185A9U }, /* XSUM_XXH32_testdata[7596] */\n    { 3798, 0x9E3779B1U, 0xD2B4209AU }, /* XSUM_XXH32_testdata[7597] */\n    { 3799, 0x00000000U, 0x16B4D836U }, /* XSUM_XXH32_testdata[7598] */\n    { 3799, 0x9E3779B1U, 0x6935896EU }, /* XSUM_XXH32_testdata[7599] */\n    { 3800, 0x00000000U, 0xBD7F5CF3U }, /* XSUM_XXH32_testdata[7600] */\n    { 3800, 0x9E3779B1U, 0x6BF1228DU }, /* XSUM_XXH32_testdata[7601] */\n    { 3801, 0x00000000U, 0xA9D604E6U }, /* XSUM_XXH32_testdata[7602] */\n    { 3801, 0x9E3779B1U, 0xB64EF668U }, /* XSUM_XXH32_testdata[7603] */\n    { 3802, 0x00000000U, 0x566C56C5U }, /* XSUM_XXH32_testdata[7604] */\n    { 3802, 0x9E3779B1U, 0xE65408A8U }, /* XSUM_XXH32_testdata[7605] */\n    { 3803, 0x00000000U, 0x2261D4C1U }, /* XSUM_XXH32_testdata[7606] */\n    { 3803, 0x9E3779B1U, 0xBE7B5254U }, /* XSUM_XXH32_testdata[7607] */\n    { 3804, 0x00000000U, 0xC3A4C591U }, /* XSUM_XXH32_testdata[7608] */\n    { 3804, 0x9E3779B1U, 0xABB60F26U }, /* XSUM_XXH32_testdata[7609] */\n    { 3805, 0x00000000U, 0x0808A5BCU }, /* XSUM_XXH32_testdata[7610] */\n    { 3805, 0x9E3779B1U, 0xDA62707BU }, /* XSUM_XXH32_testdata[7611] */\n    { 3806, 0x00000000U, 0x6D063B6FU }, /* XSUM_XXH32_testdata[7612] */\n    { 3806, 0x9E3779B1U, 0x9066E12FU }, /* XSUM_XXH32_testdata[7613] */\n    { 3807, 0x00000000U, 0xA5AF8879U }, /* XSUM_XXH32_testdata[7614] */\n    { 3807, 0x9E3779B1U, 0x6555225CU }, /* XSUM_XXH32_testdata[7615] */\n    { 3808, 0x00000000U, 0xA57B153DU }, /* XSUM_XXH32_testdata[7616] */\n    { 3808, 0x9E3779B1U, 0xF6C144DAU }, /* XSUM_XXH32_testdata[7617] */\n    { 3809, 0x00000000U, 0xF11EA55CU }, /* XSUM_XXH32_testdata[7618] */\n    { 3809, 0x9E3779B1U, 0x3B29FAF8U }, /* XSUM_XXH32_testdata[7619] */\n    { 3810, 0x00000000U, 0x9B122E12U }, /* XSUM_XXH32_testdata[7620] */\n    { 3810, 0x9E3779B1U, 0x9443C58AU }, /* XSUM_XXH32_testdata[7621] */\n    { 3811, 0x00000000U, 0x7EAD437FU }, /* XSUM_XXH32_testdata[7622] */\n    { 3811, 0x9E3779B1U, 0x8CE36F70U }, /* XSUM_XXH32_testdata[7623] */\n    { 3812, 0x00000000U, 0x8C581351U }, /* XSUM_XXH32_testdata[7624] */\n    { 3812, 0x9E3779B1U, 0xB0B57046U }, /* XSUM_XXH32_testdata[7625] */\n    { 3813, 0x00000000U, 0xF805D1E0U }, /* XSUM_XXH32_testdata[7626] */\n    { 3813, 0x9E3779B1U, 0x60660F61U }, /* XSUM_XXH32_testdata[7627] */\n    { 3814, 0x00000000U, 0xFA3ABD3FU }, /* XSUM_XXH32_testdata[7628] */\n    { 3814, 0x9E3779B1U, 0xD7010979U }, /* XSUM_XXH32_testdata[7629] */\n    { 3815, 0x00000000U, 0x3E9877B7U }, /* XSUM_XXH32_testdata[7630] */\n    { 3815, 0x9E3779B1U, 0xBB1A7C10U }, /* XSUM_XXH32_testdata[7631] */\n    { 3816, 0x00000000U, 0xE97C2563U }, /* XSUM_XXH32_testdata[7632] */\n    { 3816, 0x9E3779B1U, 0x3CF2051DU }, /* XSUM_XXH32_testdata[7633] */\n    { 3817, 0x00000000U, 0x512A015BU }, /* XSUM_XXH32_testdata[7634] */\n    { 3817, 0x9E3779B1U, 0x6396EE27U }, /* XSUM_XXH32_testdata[7635] */\n    { 3818, 0x00000000U, 0x268308C0U }, /* XSUM_XXH32_testdata[7636] */\n    { 3818, 0x9E3779B1U, 0x25CA8BF5U }, /* XSUM_XXH32_testdata[7637] */\n    { 3819, 0x00000000U, 0xFA027E7FU }, /* XSUM_XXH32_testdata[7638] */\n    { 3819, 0x9E3779B1U, 0x2178B807U }, /* XSUM_XXH32_testdata[7639] */\n    { 3820, 0x00000000U, 0x1A694F3BU }, /* XSUM_XXH32_testdata[7640] */\n    { 3820, 0x9E3779B1U, 0x5B528996U }, /* XSUM_XXH32_testdata[7641] */\n    { 3821, 0x00000000U, 0xE0D67F72U }, /* XSUM_XXH32_testdata[7642] */\n    { 3821, 0x9E3779B1U, 0x660ED706U }, /* XSUM_XXH32_testdata[7643] */\n    { 3822, 0x00000000U, 0x25F7F4C1U }, /* XSUM_XXH32_testdata[7644] */\n    { 3822, 0x9E3779B1U, 0x4D57BCC8U }, /* XSUM_XXH32_testdata[7645] */\n    { 3823, 0x00000000U, 0x13CF3B49U }, /* XSUM_XXH32_testdata[7646] */\n    { 3823, 0x9E3779B1U, 0xFB34077BU }, /* XSUM_XXH32_testdata[7647] */\n    { 3824, 0x00000000U, 0x7C963D51U }, /* XSUM_XXH32_testdata[7648] */\n    { 3824, 0x9E3779B1U, 0xC6EC5647U }, /* XSUM_XXH32_testdata[7649] */\n    { 3825, 0x00000000U, 0x6F471912U }, /* XSUM_XXH32_testdata[7650] */\n    { 3825, 0x9E3779B1U, 0x59897DA7U }, /* XSUM_XXH32_testdata[7651] */\n    { 3826, 0x00000000U, 0xD89CE092U }, /* XSUM_XXH32_testdata[7652] */\n    { 3826, 0x9E3779B1U, 0x3E629F91U }, /* XSUM_XXH32_testdata[7653] */\n    { 3827, 0x00000000U, 0xDDFAFBAFU }, /* XSUM_XXH32_testdata[7654] */\n    { 3827, 0x9E3779B1U, 0xF21FA718U }, /* XSUM_XXH32_testdata[7655] */\n    { 3828, 0x00000000U, 0x26D168AEU }, /* XSUM_XXH32_testdata[7656] */\n    { 3828, 0x9E3779B1U, 0xDF449306U }, /* XSUM_XXH32_testdata[7657] */\n    { 3829, 0x00000000U, 0x8482205CU }, /* XSUM_XXH32_testdata[7658] */\n    { 3829, 0x9E3779B1U, 0xD1CCF932U }, /* XSUM_XXH32_testdata[7659] */\n    { 3830, 0x00000000U, 0xA386DD25U }, /* XSUM_XXH32_testdata[7660] */\n    { 3830, 0x9E3779B1U, 0x4466D061U }, /* XSUM_XXH32_testdata[7661] */\n    { 3831, 0x00000000U, 0x29149F44U }, /* XSUM_XXH32_testdata[7662] */\n    { 3831, 0x9E3779B1U, 0xE1423FA6U }, /* XSUM_XXH32_testdata[7663] */\n    { 3832, 0x00000000U, 0xCC7C6F70U }, /* XSUM_XXH32_testdata[7664] */\n    { 3832, 0x9E3779B1U, 0x30CBCB2CU }, /* XSUM_XXH32_testdata[7665] */\n    { 3833, 0x00000000U, 0x4A008AB4U }, /* XSUM_XXH32_testdata[7666] */\n    { 3833, 0x9E3779B1U, 0xCDFB2F33U }, /* XSUM_XXH32_testdata[7667] */\n    { 3834, 0x00000000U, 0x80B74D26U }, /* XSUM_XXH32_testdata[7668] */\n    { 3834, 0x9E3779B1U, 0x5BB29910U }, /* XSUM_XXH32_testdata[7669] */\n    { 3835, 0x00000000U, 0x4155EB27U }, /* XSUM_XXH32_testdata[7670] */\n    { 3835, 0x9E3779B1U, 0xFFEFD30FU }, /* XSUM_XXH32_testdata[7671] */\n    { 3836, 0x00000000U, 0xF3D0515CU }, /* XSUM_XXH32_testdata[7672] */\n    { 3836, 0x9E3779B1U, 0x77030B2EU }, /* XSUM_XXH32_testdata[7673] */\n    { 3837, 0x00000000U, 0x603D19D6U }, /* XSUM_XXH32_testdata[7674] */\n    { 3837, 0x9E3779B1U, 0xCDE0AA3DU }, /* XSUM_XXH32_testdata[7675] */\n    { 3838, 0x00000000U, 0x1E970D29U }, /* XSUM_XXH32_testdata[7676] */\n    { 3838, 0x9E3779B1U, 0x72E45077U }, /* XSUM_XXH32_testdata[7677] */\n    { 3839, 0x00000000U, 0x4A13FC3EU }, /* XSUM_XXH32_testdata[7678] */\n    { 3839, 0x9E3779B1U, 0xA36D50B6U }, /* XSUM_XXH32_testdata[7679] */\n    { 3840, 0x00000000U, 0x64D71DADU }, /* XSUM_XXH32_testdata[7680] */\n    { 3840, 0x9E3779B1U, 0x6FAB21D5U }, /* XSUM_XXH32_testdata[7681] */\n    { 3841, 0x00000000U, 0x83A03B00U }, /* XSUM_XXH32_testdata[7682] */\n    { 3841, 0x9E3779B1U, 0xF97B1C8CU }, /* XSUM_XXH32_testdata[7683] */\n    { 3842, 0x00000000U, 0x830B4696U }, /* XSUM_XXH32_testdata[7684] */\n    { 3842, 0x9E3779B1U, 0xBC261080U }, /* XSUM_XXH32_testdata[7685] */\n    { 3843, 0x00000000U, 0x43F48F8FU }, /* XSUM_XXH32_testdata[7686] */\n    { 3843, 0x9E3779B1U, 0xC96C1B20U }, /* XSUM_XXH32_testdata[7687] */\n    { 3844, 0x00000000U, 0xB2B8692AU }, /* XSUM_XXH32_testdata[7688] */\n    { 3844, 0x9E3779B1U, 0xF84BCF24U }, /* XSUM_XXH32_testdata[7689] */\n    { 3845, 0x00000000U, 0x75280EB8U }, /* XSUM_XXH32_testdata[7690] */\n    { 3845, 0x9E3779B1U, 0xE8B4575EU }, /* XSUM_XXH32_testdata[7691] */\n    { 3846, 0x00000000U, 0x6B463EF9U }, /* XSUM_XXH32_testdata[7692] */\n    { 3846, 0x9E3779B1U, 0x1307B6EDU }, /* XSUM_XXH32_testdata[7693] */\n    { 3847, 0x00000000U, 0x66EE509EU }, /* XSUM_XXH32_testdata[7694] */\n    { 3847, 0x9E3779B1U, 0xDCF0B9CFU }, /* XSUM_XXH32_testdata[7695] */\n    { 3848, 0x00000000U, 0x488C3A77U }, /* XSUM_XXH32_testdata[7696] */\n    { 3848, 0x9E3779B1U, 0x8D622662U }, /* XSUM_XXH32_testdata[7697] */\n    { 3849, 0x00000000U, 0xA370F7D5U }, /* XSUM_XXH32_testdata[7698] */\n    { 3849, 0x9E3779B1U, 0xA4247CBCU }, /* XSUM_XXH32_testdata[7699] */\n    { 3850, 0x00000000U, 0x14665E34U }, /* XSUM_XXH32_testdata[7700] */\n    { 3850, 0x9E3779B1U, 0x5D5F50ADU }, /* XSUM_XXH32_testdata[7701] */\n    { 3851, 0x00000000U, 0xF10DCC81U }, /* XSUM_XXH32_testdata[7702] */\n    { 3851, 0x9E3779B1U, 0x291946B7U }, /* XSUM_XXH32_testdata[7703] */\n    { 3852, 0x00000000U, 0x54BA6F1EU }, /* XSUM_XXH32_testdata[7704] */\n    { 3852, 0x9E3779B1U, 0x51A1C613U }, /* XSUM_XXH32_testdata[7705] */\n    { 3853, 0x00000000U, 0x67B561A9U }, /* XSUM_XXH32_testdata[7706] */\n    { 3853, 0x9E3779B1U, 0xD13A6719U }, /* XSUM_XXH32_testdata[7707] */\n    { 3854, 0x00000000U, 0x99279AD5U }, /* XSUM_XXH32_testdata[7708] */\n    { 3854, 0x9E3779B1U, 0xD67F6BBBU }, /* XSUM_XXH32_testdata[7709] */\n    { 3855, 0x00000000U, 0xCCCC7C11U }, /* XSUM_XXH32_testdata[7710] */\n    { 3855, 0x9E3779B1U, 0x541B5801U }, /* XSUM_XXH32_testdata[7711] */\n    { 3856, 0x00000000U, 0x59FF8418U }, /* XSUM_XXH32_testdata[7712] */\n    { 3856, 0x9E3779B1U, 0xFE5C4262U }, /* XSUM_XXH32_testdata[7713] */\n    { 3857, 0x00000000U, 0x24A5A1F1U }, /* XSUM_XXH32_testdata[7714] */\n    { 3857, 0x9E3779B1U, 0x3ED6437EU }, /* XSUM_XXH32_testdata[7715] */\n    { 3858, 0x00000000U, 0xC835939BU }, /* XSUM_XXH32_testdata[7716] */\n    { 3858, 0x9E3779B1U, 0x12D23740U }, /* XSUM_XXH32_testdata[7717] */\n    { 3859, 0x00000000U, 0x9CBBF05FU }, /* XSUM_XXH32_testdata[7718] */\n    { 3859, 0x9E3779B1U, 0xCA6961F0U }, /* XSUM_XXH32_testdata[7719] */\n    { 3860, 0x00000000U, 0x47D3D358U }, /* XSUM_XXH32_testdata[7720] */\n    { 3860, 0x9E3779B1U, 0x81C043AFU }, /* XSUM_XXH32_testdata[7721] */\n    { 3861, 0x00000000U, 0xE6F8D009U }, /* XSUM_XXH32_testdata[7722] */\n    { 3861, 0x9E3779B1U, 0x2DB9D6BBU }, /* XSUM_XXH32_testdata[7723] */\n    { 3862, 0x00000000U, 0xEE9D8258U }, /* XSUM_XXH32_testdata[7724] */\n    { 3862, 0x9E3779B1U, 0x0AD8BB66U }, /* XSUM_XXH32_testdata[7725] */\n    { 3863, 0x00000000U, 0x17F39421U }, /* XSUM_XXH32_testdata[7726] */\n    { 3863, 0x9E3779B1U, 0x76FBB713U }, /* XSUM_XXH32_testdata[7727] */\n    { 3864, 0x00000000U, 0x7EB5E7ABU }, /* XSUM_XXH32_testdata[7728] */\n    { 3864, 0x9E3779B1U, 0x09DAB747U }, /* XSUM_XXH32_testdata[7729] */\n    { 3865, 0x00000000U, 0x6553C5DCU }, /* XSUM_XXH32_testdata[7730] */\n    { 3865, 0x9E3779B1U, 0x86094D79U }, /* XSUM_XXH32_testdata[7731] */\n    { 3866, 0x00000000U, 0x6F06720CU }, /* XSUM_XXH32_testdata[7732] */\n    { 3866, 0x9E3779B1U, 0x6BE9B218U }, /* XSUM_XXH32_testdata[7733] */\n    { 3867, 0x00000000U, 0x78D7B8B4U }, /* XSUM_XXH32_testdata[7734] */\n    { 3867, 0x9E3779B1U, 0x699D3157U }, /* XSUM_XXH32_testdata[7735] */\n    { 3868, 0x00000000U, 0xA32123A3U }, /* XSUM_XXH32_testdata[7736] */\n    { 3868, 0x9E3779B1U, 0x5520DC8DU }, /* XSUM_XXH32_testdata[7737] */\n    { 3869, 0x00000000U, 0x03A02F04U }, /* XSUM_XXH32_testdata[7738] */\n    { 3869, 0x9E3779B1U, 0x9F1F35F4U }, /* XSUM_XXH32_testdata[7739] */\n    { 3870, 0x00000000U, 0x2E556B27U }, /* XSUM_XXH32_testdata[7740] */\n    { 3870, 0x9E3779B1U, 0xFB34034EU }, /* XSUM_XXH32_testdata[7741] */\n    { 3871, 0x00000000U, 0x9BE507B0U }, /* XSUM_XXH32_testdata[7742] */\n    { 3871, 0x9E3779B1U, 0x77D459E3U }, /* XSUM_XXH32_testdata[7743] */\n    { 3872, 0x00000000U, 0xF8867EF6U }, /* XSUM_XXH32_testdata[7744] */\n    { 3872, 0x9E3779B1U, 0xAAB8F729U }, /* XSUM_XXH32_testdata[7745] */\n    { 3873, 0x00000000U, 0xB86F54E8U }, /* XSUM_XXH32_testdata[7746] */\n    { 3873, 0x9E3779B1U, 0xADEA6037U }, /* XSUM_XXH32_testdata[7747] */\n    { 3874, 0x00000000U, 0xF0F47855U }, /* XSUM_XXH32_testdata[7748] */\n    { 3874, 0x9E3779B1U, 0xAD8A0372U }, /* XSUM_XXH32_testdata[7749] */\n    { 3875, 0x00000000U, 0x4BFE45F6U }, /* XSUM_XXH32_testdata[7750] */\n    { 3875, 0x9E3779B1U, 0xE9A92812U }, /* XSUM_XXH32_testdata[7751] */\n    { 3876, 0x00000000U, 0x85664BBDU }, /* XSUM_XXH32_testdata[7752] */\n    { 3876, 0x9E3779B1U, 0x475BCD1CU }, /* XSUM_XXH32_testdata[7753] */\n    { 3877, 0x00000000U, 0x08B6213CU }, /* XSUM_XXH32_testdata[7754] */\n    { 3877, 0x9E3779B1U, 0x1C8A380BU }, /* XSUM_XXH32_testdata[7755] */\n    { 3878, 0x00000000U, 0xFC13434DU }, /* XSUM_XXH32_testdata[7756] */\n    { 3878, 0x9E3779B1U, 0x50D6DEC6U }, /* XSUM_XXH32_testdata[7757] */\n    { 3879, 0x00000000U, 0xAF9F3EF2U }, /* XSUM_XXH32_testdata[7758] */\n    { 3879, 0x9E3779B1U, 0xAA199D3FU }, /* XSUM_XXH32_testdata[7759] */\n    { 3880, 0x00000000U, 0x0FB75606U }, /* XSUM_XXH32_testdata[7760] */\n    { 3880, 0x9E3779B1U, 0xFF0F8F02U }, /* XSUM_XXH32_testdata[7761] */\n    { 3881, 0x00000000U, 0x7895EC0AU }, /* XSUM_XXH32_testdata[7762] */\n    { 3881, 0x9E3779B1U, 0x7E7178EDU }, /* XSUM_XXH32_testdata[7763] */\n    { 3882, 0x00000000U, 0xE5093ED9U }, /* XSUM_XXH32_testdata[7764] */\n    { 3882, 0x9E3779B1U, 0x79C61301U }, /* XSUM_XXH32_testdata[7765] */\n    { 3883, 0x00000000U, 0x3E9FF4E9U }, /* XSUM_XXH32_testdata[7766] */\n    { 3883, 0x9E3779B1U, 0x4812F2BAU }, /* XSUM_XXH32_testdata[7767] */\n    { 3884, 0x00000000U, 0xC5D7B46BU }, /* XSUM_XXH32_testdata[7768] */\n    { 3884, 0x9E3779B1U, 0x1FD4AEA0U }, /* XSUM_XXH32_testdata[7769] */\n    { 3885, 0x00000000U, 0xACCFF8B2U }, /* XSUM_XXH32_testdata[7770] */\n    { 3885, 0x9E3779B1U, 0xB0D6E70DU }, /* XSUM_XXH32_testdata[7771] */\n    { 3886, 0x00000000U, 0xD883BCFEU }, /* XSUM_XXH32_testdata[7772] */\n    { 3886, 0x9E3779B1U, 0x8B5A2BA1U }, /* XSUM_XXH32_testdata[7773] */\n    { 3887, 0x00000000U, 0x2D8E54D0U }, /* XSUM_XXH32_testdata[7774] */\n    { 3887, 0x9E3779B1U, 0x9C204837U }, /* XSUM_XXH32_testdata[7775] */\n    { 3888, 0x00000000U, 0x83CD7601U }, /* XSUM_XXH32_testdata[7776] */\n    { 3888, 0x9E3779B1U, 0x15F8C4A8U }, /* XSUM_XXH32_testdata[7777] */\n    { 3889, 0x00000000U, 0xCE768A19U }, /* XSUM_XXH32_testdata[7778] */\n    { 3889, 0x9E3779B1U, 0xE06D4D94U }, /* XSUM_XXH32_testdata[7779] */\n    { 3890, 0x00000000U, 0xD90533A1U }, /* XSUM_XXH32_testdata[7780] */\n    { 3890, 0x9E3779B1U, 0x56FD9684U }, /* XSUM_XXH32_testdata[7781] */\n    { 3891, 0x00000000U, 0xEC927BDDU }, /* XSUM_XXH32_testdata[7782] */\n    { 3891, 0x9E3779B1U, 0xAA9D091FU }, /* XSUM_XXH32_testdata[7783] */\n    { 3892, 0x00000000U, 0x1E6EF7E6U }, /* XSUM_XXH32_testdata[7784] */\n    { 3892, 0x9E3779B1U, 0x7565B2A7U }, /* XSUM_XXH32_testdata[7785] */\n    { 3893, 0x00000000U, 0xD01A9944U }, /* XSUM_XXH32_testdata[7786] */\n    { 3893, 0x9E3779B1U, 0x46811809U }, /* XSUM_XXH32_testdata[7787] */\n    { 3894, 0x00000000U, 0x68D85B5CU }, /* XSUM_XXH32_testdata[7788] */\n    { 3894, 0x9E3779B1U, 0x792D991FU }, /* XSUM_XXH32_testdata[7789] */\n    { 3895, 0x00000000U, 0x7A269257U }, /* XSUM_XXH32_testdata[7790] */\n    { 3895, 0x9E3779B1U, 0xEF7146FDU }, /* XSUM_XXH32_testdata[7791] */\n    { 3896, 0x00000000U, 0x61AE98B1U }, /* XSUM_XXH32_testdata[7792] */\n    { 3896, 0x9E3779B1U, 0xCD2B36A1U }, /* XSUM_XXH32_testdata[7793] */\n    { 3897, 0x00000000U, 0x92ED305CU }, /* XSUM_XXH32_testdata[7794] */\n    { 3897, 0x9E3779B1U, 0xD8ABAA0EU }, /* XSUM_XXH32_testdata[7795] */\n    { 3898, 0x00000000U, 0x07C20D7CU }, /* XSUM_XXH32_testdata[7796] */\n    { 3898, 0x9E3779B1U, 0xC1063B7FU }, /* XSUM_XXH32_testdata[7797] */\n    { 3899, 0x00000000U, 0xDD9669A3U }, /* XSUM_XXH32_testdata[7798] */\n    { 3899, 0x9E3779B1U, 0xA57E9460U }, /* XSUM_XXH32_testdata[7799] */\n    { 3900, 0x00000000U, 0xBD5481DFU }, /* XSUM_XXH32_testdata[7800] */\n    { 3900, 0x9E3779B1U, 0x87A60CCFU }, /* XSUM_XXH32_testdata[7801] */\n    { 3901, 0x00000000U, 0x7FB1EEE6U }, /* XSUM_XXH32_testdata[7802] */\n    { 3901, 0x9E3779B1U, 0x4F7549F0U }, /* XSUM_XXH32_testdata[7803] */\n    { 3902, 0x00000000U, 0xCB8ED671U }, /* XSUM_XXH32_testdata[7804] */\n    { 3902, 0x9E3779B1U, 0x2DE0C434U }, /* XSUM_XXH32_testdata[7805] */\n    { 3903, 0x00000000U, 0x38873EFCU }, /* XSUM_XXH32_testdata[7806] */\n    { 3903, 0x9E3779B1U, 0x447605A5U }, /* XSUM_XXH32_testdata[7807] */\n    { 3904, 0x00000000U, 0x46A2EE4AU }, /* XSUM_XXH32_testdata[7808] */\n    { 3904, 0x9E3779B1U, 0xA6D803FDU }, /* XSUM_XXH32_testdata[7809] */\n    { 3905, 0x00000000U, 0x97E737CCU }, /* XSUM_XXH32_testdata[7810] */\n    { 3905, 0x9E3779B1U, 0x894E7EE9U }, /* XSUM_XXH32_testdata[7811] */\n    { 3906, 0x00000000U, 0x1713685FU }, /* XSUM_XXH32_testdata[7812] */\n    { 3906, 0x9E3779B1U, 0xEC134F11U }, /* XSUM_XXH32_testdata[7813] */\n    { 3907, 0x00000000U, 0x5DF44D5AU }, /* XSUM_XXH32_testdata[7814] */\n    { 3907, 0x9E3779B1U, 0x25DEE6CBU }, /* XSUM_XXH32_testdata[7815] */\n    { 3908, 0x00000000U, 0xB7A8E6E6U }, /* XSUM_XXH32_testdata[7816] */\n    { 3908, 0x9E3779B1U, 0xAA650AD6U }, /* XSUM_XXH32_testdata[7817] */\n    { 3909, 0x00000000U, 0xD63DF9F8U }, /* XSUM_XXH32_testdata[7818] */\n    { 3909, 0x9E3779B1U, 0x266C114FU }, /* XSUM_XXH32_testdata[7819] */\n    { 3910, 0x00000000U, 0xC710C6DEU }, /* XSUM_XXH32_testdata[7820] */\n    { 3910, 0x9E3779B1U, 0x2A41CE4BU }, /* XSUM_XXH32_testdata[7821] */\n    { 3911, 0x00000000U, 0x4BF1284FU }, /* XSUM_XXH32_testdata[7822] */\n    { 3911, 0x9E3779B1U, 0x10E356B0U }, /* XSUM_XXH32_testdata[7823] */\n    { 3912, 0x00000000U, 0x54348B47U }, /* XSUM_XXH32_testdata[7824] */\n    { 3912, 0x9E3779B1U, 0xDBF14B37U }, /* XSUM_XXH32_testdata[7825] */\n    { 3913, 0x00000000U, 0xDA2E2CADU }, /* XSUM_XXH32_testdata[7826] */\n    { 3913, 0x9E3779B1U, 0xB4777FA0U }, /* XSUM_XXH32_testdata[7827] */\n    { 3914, 0x00000000U, 0x4BCD511EU }, /* XSUM_XXH32_testdata[7828] */\n    { 3914, 0x9E3779B1U, 0xEAA2A15AU }, /* XSUM_XXH32_testdata[7829] */\n    { 3915, 0x00000000U, 0xC2D02485U }, /* XSUM_XXH32_testdata[7830] */\n    { 3915, 0x9E3779B1U, 0x0F51CB6CU }, /* XSUM_XXH32_testdata[7831] */\n    { 3916, 0x00000000U, 0xAD53BE44U }, /* XSUM_XXH32_testdata[7832] */\n    { 3916, 0x9E3779B1U, 0xEB0D8BE7U }, /* XSUM_XXH32_testdata[7833] */\n    { 3917, 0x00000000U, 0x8D170B53U }, /* XSUM_XXH32_testdata[7834] */\n    { 3917, 0x9E3779B1U, 0xF5CDEE73U }, /* XSUM_XXH32_testdata[7835] */\n    { 3918, 0x00000000U, 0x12B42C2BU }, /* XSUM_XXH32_testdata[7836] */\n    { 3918, 0x9E3779B1U, 0xB844C9A8U }, /* XSUM_XXH32_testdata[7837] */\n    { 3919, 0x00000000U, 0x94AE50ECU }, /* XSUM_XXH32_testdata[7838] */\n    { 3919, 0x9E3779B1U, 0x7B615242U }, /* XSUM_XXH32_testdata[7839] */\n    { 3920, 0x00000000U, 0x57849A04U }, /* XSUM_XXH32_testdata[7840] */\n    { 3920, 0x9E3779B1U, 0x6D1542C2U }, /* XSUM_XXH32_testdata[7841] */\n    { 3921, 0x00000000U, 0x96A96FD8U }, /* XSUM_XXH32_testdata[7842] */\n    { 3921, 0x9E3779B1U, 0xE12C8EEFU }, /* XSUM_XXH32_testdata[7843] */\n    { 3922, 0x00000000U, 0xF71871BEU }, /* XSUM_XXH32_testdata[7844] */\n    { 3922, 0x9E3779B1U, 0x8F550F7BU }, /* XSUM_XXH32_testdata[7845] */\n    { 3923, 0x00000000U, 0x515B05FFU }, /* XSUM_XXH32_testdata[7846] */\n    { 3923, 0x9E3779B1U, 0x4232D861U }, /* XSUM_XXH32_testdata[7847] */\n    { 3924, 0x00000000U, 0x62186A5FU }, /* XSUM_XXH32_testdata[7848] */\n    { 3924, 0x9E3779B1U, 0x4BF60E1BU }, /* XSUM_XXH32_testdata[7849] */\n    { 3925, 0x00000000U, 0x1C04CC6BU }, /* XSUM_XXH32_testdata[7850] */\n    { 3925, 0x9E3779B1U, 0x8FC09811U }, /* XSUM_XXH32_testdata[7851] */\n    { 3926, 0x00000000U, 0xB38B7CF9U }, /* XSUM_XXH32_testdata[7852] */\n    { 3926, 0x9E3779B1U, 0x098EE93AU }, /* XSUM_XXH32_testdata[7853] */\n    { 3927, 0x00000000U, 0x80BBC3AAU }, /* XSUM_XXH32_testdata[7854] */\n    { 3927, 0x9E3779B1U, 0x477A7F6BU }, /* XSUM_XXH32_testdata[7855] */\n    { 3928, 0x00000000U, 0xC01A0F3FU }, /* XSUM_XXH32_testdata[7856] */\n    { 3928, 0x9E3779B1U, 0x129F6D8DU }, /* XSUM_XXH32_testdata[7857] */\n    { 3929, 0x00000000U, 0x30349E91U }, /* XSUM_XXH32_testdata[7858] */\n    { 3929, 0x9E3779B1U, 0xE38A368AU }, /* XSUM_XXH32_testdata[7859] */\n    { 3930, 0x00000000U, 0xBAF0D68EU }, /* XSUM_XXH32_testdata[7860] */\n    { 3930, 0x9E3779B1U, 0xEBD52E84U }, /* XSUM_XXH32_testdata[7861] */\n    { 3931, 0x00000000U, 0x0E54AD93U }, /* XSUM_XXH32_testdata[7862] */\n    { 3931, 0x9E3779B1U, 0x7771D682U }, /* XSUM_XXH32_testdata[7863] */\n    { 3932, 0x00000000U, 0x70120C61U }, /* XSUM_XXH32_testdata[7864] */\n    { 3932, 0x9E3779B1U, 0xF323E4D6U }, /* XSUM_XXH32_testdata[7865] */\n    { 3933, 0x00000000U, 0x5A195A5CU }, /* XSUM_XXH32_testdata[7866] */\n    { 3933, 0x9E3779B1U, 0x58A3D0A0U }, /* XSUM_XXH32_testdata[7867] */\n    { 3934, 0x00000000U, 0xFD5D41A3U }, /* XSUM_XXH32_testdata[7868] */\n    { 3934, 0x9E3779B1U, 0x74E5A0B1U }, /* XSUM_XXH32_testdata[7869] */\n    { 3935, 0x00000000U, 0xB8A50FC6U }, /* XSUM_XXH32_testdata[7870] */\n    { 3935, 0x9E3779B1U, 0xAF48DB2FU }, /* XSUM_XXH32_testdata[7871] */\n    { 3936, 0x00000000U, 0xD2E8CD3AU }, /* XSUM_XXH32_testdata[7872] */\n    { 3936, 0x9E3779B1U, 0x65B29308U }, /* XSUM_XXH32_testdata[7873] */\n    { 3937, 0x00000000U, 0x15DD43EBU }, /* XSUM_XXH32_testdata[7874] */\n    { 3937, 0x9E3779B1U, 0xB22163F3U }, /* XSUM_XXH32_testdata[7875] */\n    { 3938, 0x00000000U, 0xE03CAE50U }, /* XSUM_XXH32_testdata[7876] */\n    { 3938, 0x9E3779B1U, 0x0AF06A23U }, /* XSUM_XXH32_testdata[7877] */\n    { 3939, 0x00000000U, 0xD9BDF54BU }, /* XSUM_XXH32_testdata[7878] */\n    { 3939, 0x9E3779B1U, 0xC642397DU }, /* XSUM_XXH32_testdata[7879] */\n    { 3940, 0x00000000U, 0x3D38D03DU }, /* XSUM_XXH32_testdata[7880] */\n    { 3940, 0x9E3779B1U, 0x5FEEE2C6U }, /* XSUM_XXH32_testdata[7881] */\n    { 3941, 0x00000000U, 0xE6E32787U }, /* XSUM_XXH32_testdata[7882] */\n    { 3941, 0x9E3779B1U, 0xFFF4B40EU }, /* XSUM_XXH32_testdata[7883] */\n    { 3942, 0x00000000U, 0x2F4D6A83U }, /* XSUM_XXH32_testdata[7884] */\n    { 3942, 0x9E3779B1U, 0x784F3FDCU }, /* XSUM_XXH32_testdata[7885] */\n    { 3943, 0x00000000U, 0x1861DBEAU }, /* XSUM_XXH32_testdata[7886] */\n    { 3943, 0x9E3779B1U, 0xE65491B0U }, /* XSUM_XXH32_testdata[7887] */\n    { 3944, 0x00000000U, 0xED77B61DU }, /* XSUM_XXH32_testdata[7888] */\n    { 3944, 0x9E3779B1U, 0xDF5998F8U }, /* XSUM_XXH32_testdata[7889] */\n    { 3945, 0x00000000U, 0x3DFEDD18U }, /* XSUM_XXH32_testdata[7890] */\n    { 3945, 0x9E3779B1U, 0x98A63717U }, /* XSUM_XXH32_testdata[7891] */\n    { 3946, 0x00000000U, 0xD30679BCU }, /* XSUM_XXH32_testdata[7892] */\n    { 3946, 0x9E3779B1U, 0x47FFDD09U }, /* XSUM_XXH32_testdata[7893] */\n    { 3947, 0x00000000U, 0xBBF4185CU }, /* XSUM_XXH32_testdata[7894] */\n    { 3947, 0x9E3779B1U, 0x2A5BE174U }, /* XSUM_XXH32_testdata[7895] */\n    { 3948, 0x00000000U, 0xBBF7C3ACU }, /* XSUM_XXH32_testdata[7896] */\n    { 3948, 0x9E3779B1U, 0x739B0E6DU }, /* XSUM_XXH32_testdata[7897] */\n    { 3949, 0x00000000U, 0xFDEF3CD4U }, /* XSUM_XXH32_testdata[7898] */\n    { 3949, 0x9E3779B1U, 0xD7F204B5U }, /* XSUM_XXH32_testdata[7899] */\n    { 3950, 0x00000000U, 0xD6077D53U }, /* XSUM_XXH32_testdata[7900] */\n    { 3950, 0x9E3779B1U, 0xD71B24FCU }, /* XSUM_XXH32_testdata[7901] */\n    { 3951, 0x00000000U, 0x02183811U }, /* XSUM_XXH32_testdata[7902] */\n    { 3951, 0x9E3779B1U, 0x6EB8E187U }, /* XSUM_XXH32_testdata[7903] */\n    { 3952, 0x00000000U, 0x91A2A9D7U }, /* XSUM_XXH32_testdata[7904] */\n    { 3952, 0x9E3779B1U, 0xAEB507EBU }, /* XSUM_XXH32_testdata[7905] */\n    { 3953, 0x00000000U, 0x009FD0ABU }, /* XSUM_XXH32_testdata[7906] */\n    { 3953, 0x9E3779B1U, 0x379C3117U }, /* XSUM_XXH32_testdata[7907] */\n    { 3954, 0x00000000U, 0xF43CF27BU }, /* XSUM_XXH32_testdata[7908] */\n    { 3954, 0x9E3779B1U, 0x041CED72U }, /* XSUM_XXH32_testdata[7909] */\n    { 3955, 0x00000000U, 0xB8E4417DU }, /* XSUM_XXH32_testdata[7910] */\n    { 3955, 0x9E3779B1U, 0x2D607114U }, /* XSUM_XXH32_testdata[7911] */\n    { 3956, 0x00000000U, 0xED6BB1E7U }, /* XSUM_XXH32_testdata[7912] */\n    { 3956, 0x9E3779B1U, 0xBC5E1C33U }, /* XSUM_XXH32_testdata[7913] */\n    { 3957, 0x00000000U, 0xA5DBB09CU }, /* XSUM_XXH32_testdata[7914] */\n    { 3957, 0x9E3779B1U, 0x5D23CCD5U }, /* XSUM_XXH32_testdata[7915] */\n    { 3958, 0x00000000U, 0x546EB3A1U }, /* XSUM_XXH32_testdata[7916] */\n    { 3958, 0x9E3779B1U, 0x996CC849U }, /* XSUM_XXH32_testdata[7917] */\n    { 3959, 0x00000000U, 0x129F18C6U }, /* XSUM_XXH32_testdata[7918] */\n    { 3959, 0x9E3779B1U, 0x0C81A2F7U }, /* XSUM_XXH32_testdata[7919] */\n    { 3960, 0x00000000U, 0x4C9C18FCU }, /* XSUM_XXH32_testdata[7920] */\n    { 3960, 0x9E3779B1U, 0x93EC97C6U }, /* XSUM_XXH32_testdata[7921] */\n    { 3961, 0x00000000U, 0xB130E577U }, /* XSUM_XXH32_testdata[7922] */\n    { 3961, 0x9E3779B1U, 0x8399678EU }, /* XSUM_XXH32_testdata[7923] */\n    { 3962, 0x00000000U, 0x16815988U }, /* XSUM_XXH32_testdata[7924] */\n    { 3962, 0x9E3779B1U, 0x37CEA8F9U }, /* XSUM_XXH32_testdata[7925] */\n    { 3963, 0x00000000U, 0x5F727B8BU }, /* XSUM_XXH32_testdata[7926] */\n    { 3963, 0x9E3779B1U, 0x94EF49EBU }, /* XSUM_XXH32_testdata[7927] */\n    { 3964, 0x00000000U, 0x005FE263U }, /* XSUM_XXH32_testdata[7928] */\n    { 3964, 0x9E3779B1U, 0x3509DBD5U }, /* XSUM_XXH32_testdata[7929] */\n    { 3965, 0x00000000U, 0xFA8A772DU }, /* XSUM_XXH32_testdata[7930] */\n    { 3965, 0x9E3779B1U, 0x374BF0C0U }, /* XSUM_XXH32_testdata[7931] */\n    { 3966, 0x00000000U, 0x340C8BD0U }, /* XSUM_XXH32_testdata[7932] */\n    { 3966, 0x9E3779B1U, 0x8809F49EU }, /* XSUM_XXH32_testdata[7933] */\n    { 3967, 0x00000000U, 0x8469698DU }, /* XSUM_XXH32_testdata[7934] */\n    { 3967, 0x9E3779B1U, 0x2689C53EU }, /* XSUM_XXH32_testdata[7935] */\n    { 3968, 0x00000000U, 0x4AA457D5U }, /* XSUM_XXH32_testdata[7936] */\n    { 3968, 0x9E3779B1U, 0x7D34F283U }, /* XSUM_XXH32_testdata[7937] */\n    { 3969, 0x00000000U, 0xBC3DD886U }, /* XSUM_XXH32_testdata[7938] */\n    { 3969, 0x9E3779B1U, 0xE76AF62EU }, /* XSUM_XXH32_testdata[7939] */\n    { 3970, 0x00000000U, 0xDEF74F9FU }, /* XSUM_XXH32_testdata[7940] */\n    { 3970, 0x9E3779B1U, 0xF1CCA937U }, /* XSUM_XXH32_testdata[7941] */\n    { 3971, 0x00000000U, 0xA06416ADU }, /* XSUM_XXH32_testdata[7942] */\n    { 3971, 0x9E3779B1U, 0x8E5F9379U }, /* XSUM_XXH32_testdata[7943] */\n    { 3972, 0x00000000U, 0xF56A5888U }, /* XSUM_XXH32_testdata[7944] */\n    { 3972, 0x9E3779B1U, 0x4FC281A3U }, /* XSUM_XXH32_testdata[7945] */\n    { 3973, 0x00000000U, 0x9A4D2068U }, /* XSUM_XXH32_testdata[7946] */\n    { 3973, 0x9E3779B1U, 0x757745DDU }, /* XSUM_XXH32_testdata[7947] */\n    { 3974, 0x00000000U, 0x349B228AU }, /* XSUM_XXH32_testdata[7948] */\n    { 3974, 0x9E3779B1U, 0x4051D17AU }, /* XSUM_XXH32_testdata[7949] */\n    { 3975, 0x00000000U, 0x82E47D9BU }, /* XSUM_XXH32_testdata[7950] */\n    { 3975, 0x9E3779B1U, 0x4E14B2E8U }, /* XSUM_XXH32_testdata[7951] */\n    { 3976, 0x00000000U, 0x994667A4U }, /* XSUM_XXH32_testdata[7952] */\n    { 3976, 0x9E3779B1U, 0x0D7851F9U }, /* XSUM_XXH32_testdata[7953] */\n    { 3977, 0x00000000U, 0x469709EFU }, /* XSUM_XXH32_testdata[7954] */\n    { 3977, 0x9E3779B1U, 0xB18B1384U }, /* XSUM_XXH32_testdata[7955] */\n    { 3978, 0x00000000U, 0x8D55D7C5U }, /* XSUM_XXH32_testdata[7956] */\n    { 3978, 0x9E3779B1U, 0xCE7564AEU }, /* XSUM_XXH32_testdata[7957] */\n    { 3979, 0x00000000U, 0x159A2019U }, /* XSUM_XXH32_testdata[7958] */\n    { 3979, 0x9E3779B1U, 0xBF610D39U }, /* XSUM_XXH32_testdata[7959] */\n    { 3980, 0x00000000U, 0xF245B84DU }, /* XSUM_XXH32_testdata[7960] */\n    { 3980, 0x9E3779B1U, 0xCBBC6035U }, /* XSUM_XXH32_testdata[7961] */\n    { 3981, 0x00000000U, 0x0B7121F2U }, /* XSUM_XXH32_testdata[7962] */\n    { 3981, 0x9E3779B1U, 0xEAB0A310U }, /* XSUM_XXH32_testdata[7963] */\n    { 3982, 0x00000000U, 0xFBD15931U }, /* XSUM_XXH32_testdata[7964] */\n    { 3982, 0x9E3779B1U, 0xDB262017U }, /* XSUM_XXH32_testdata[7965] */\n    { 3983, 0x00000000U, 0x30CF793EU }, /* XSUM_XXH32_testdata[7966] */\n    { 3983, 0x9E3779B1U, 0x1B7B6BB1U }, /* XSUM_XXH32_testdata[7967] */\n    { 3984, 0x00000000U, 0x43672487U }, /* XSUM_XXH32_testdata[7968] */\n    { 3984, 0x9E3779B1U, 0x9F640EBDU }, /* XSUM_XXH32_testdata[7969] */\n    { 3985, 0x00000000U, 0x45177CD5U }, /* XSUM_XXH32_testdata[7970] */\n    { 3985, 0x9E3779B1U, 0x5DE8E756U }, /* XSUM_XXH32_testdata[7971] */\n    { 3986, 0x00000000U, 0xF894E893U }, /* XSUM_XXH32_testdata[7972] */\n    { 3986, 0x9E3779B1U, 0xABC53110U }, /* XSUM_XXH32_testdata[7973] */\n    { 3987, 0x00000000U, 0x279056D5U }, /* XSUM_XXH32_testdata[7974] */\n    { 3987, 0x9E3779B1U, 0x749207ADU }, /* XSUM_XXH32_testdata[7975] */\n    { 3988, 0x00000000U, 0x95BF77B3U }, /* XSUM_XXH32_testdata[7976] */\n    { 3988, 0x9E3779B1U, 0xF627095EU }, /* XSUM_XXH32_testdata[7977] */\n    { 3989, 0x00000000U, 0x24E19A4EU }, /* XSUM_XXH32_testdata[7978] */\n    { 3989, 0x9E3779B1U, 0x83E75840U }, /* XSUM_XXH32_testdata[7979] */\n    { 3990, 0x00000000U, 0x59D793D9U }, /* XSUM_XXH32_testdata[7980] */\n    { 3990, 0x9E3779B1U, 0x17A72D02U }, /* XSUM_XXH32_testdata[7981] */\n    { 3991, 0x00000000U, 0xBD090BCBU }, /* XSUM_XXH32_testdata[7982] */\n    { 3991, 0x9E3779B1U, 0x939877B5U }, /* XSUM_XXH32_testdata[7983] */\n    { 3992, 0x00000000U, 0x67E8E064U }, /* XSUM_XXH32_testdata[7984] */\n    { 3992, 0x9E3779B1U, 0x6060328CU }, /* XSUM_XXH32_testdata[7985] */\n    { 3993, 0x00000000U, 0x48D8FDAEU }, /* XSUM_XXH32_testdata[7986] */\n    { 3993, 0x9E3779B1U, 0x7311B50CU }, /* XSUM_XXH32_testdata[7987] */\n    { 3994, 0x00000000U, 0x1BE7A43EU }, /* XSUM_XXH32_testdata[7988] */\n    { 3994, 0x9E3779B1U, 0xC3A4718BU }, /* XSUM_XXH32_testdata[7989] */\n    { 3995, 0x00000000U, 0x4BF31EBEU }, /* XSUM_XXH32_testdata[7990] */\n    { 3995, 0x9E3779B1U, 0xBD9BA34CU }, /* XSUM_XXH32_testdata[7991] */\n    { 3996, 0x00000000U, 0x838F4913U }, /* XSUM_XXH32_testdata[7992] */\n    { 3996, 0x9E3779B1U, 0x73E4E8D2U }, /* XSUM_XXH32_testdata[7993] */\n    { 3997, 0x00000000U, 0x815D59F1U }, /* XSUM_XXH32_testdata[7994] */\n    { 3997, 0x9E3779B1U, 0x77177E48U }, /* XSUM_XXH32_testdata[7995] */\n    { 3998, 0x00000000U, 0xD6870B9CU }, /* XSUM_XXH32_testdata[7996] */\n    { 3998, 0x9E3779B1U, 0x46C13DA0U }, /* XSUM_XXH32_testdata[7997] */\n    { 3999, 0x00000000U, 0xB8303538U }, /* XSUM_XXH32_testdata[7998] */\n    { 3999, 0x9E3779B1U, 0x90C2C4CEU }, /* XSUM_XXH32_testdata[7999] */\n    { 4000, 0x00000000U, 0x27407F75U }, /* XSUM_XXH32_testdata[8000] */\n    { 4000, 0x9E3779B1U, 0x9F60B3E1U }, /* XSUM_XXH32_testdata[8001] */\n    { 4001, 0x00000000U, 0x8C75FC02U }, /* XSUM_XXH32_testdata[8002] */\n    { 4001, 0x9E3779B1U, 0x075FE27BU }, /* XSUM_XXH32_testdata[8003] */\n    { 4002, 0x00000000U, 0x668757FAU }, /* XSUM_XXH32_testdata[8004] */\n    { 4002, 0x9E3779B1U, 0x9A5616C3U }, /* XSUM_XXH32_testdata[8005] */\n    { 4003, 0x00000000U, 0x10D1AD83U }, /* XSUM_XXH32_testdata[8006] */\n    { 4003, 0x9E3779B1U, 0x20A8D9BDU }, /* XSUM_XXH32_testdata[8007] */\n    { 4004, 0x00000000U, 0xE31D6BD4U }, /* XSUM_XXH32_testdata[8008] */\n    { 4004, 0x9E3779B1U, 0x4DE21981U }, /* XSUM_XXH32_testdata[8009] */\n    { 4005, 0x00000000U, 0xC41F6246U }, /* XSUM_XXH32_testdata[8010] */\n    { 4005, 0x9E3779B1U, 0x54D65F89U }, /* XSUM_XXH32_testdata[8011] */\n    { 4006, 0x00000000U, 0xEEF158DDU }, /* XSUM_XXH32_testdata[8012] */\n    { 4006, 0x9E3779B1U, 0x4CE9BE5CU }, /* XSUM_XXH32_testdata[8013] */\n    { 4007, 0x00000000U, 0xAAB85330U }, /* XSUM_XXH32_testdata[8014] */\n    { 4007, 0x9E3779B1U, 0xF35F8C3FU }, /* XSUM_XXH32_testdata[8015] */\n    { 4008, 0x00000000U, 0x4B0AD61FU }, /* XSUM_XXH32_testdata[8016] */\n    { 4008, 0x9E3779B1U, 0xCE41BE43U }, /* XSUM_XXH32_testdata[8017] */\n    { 4009, 0x00000000U, 0xBD7AB7C8U }, /* XSUM_XXH32_testdata[8018] */\n    { 4009, 0x9E3779B1U, 0x5F212BA3U }, /* XSUM_XXH32_testdata[8019] */\n    { 4010, 0x00000000U, 0x7A529E7BU }, /* XSUM_XXH32_testdata[8020] */\n    { 4010, 0x9E3779B1U, 0xE12B9138U }, /* XSUM_XXH32_testdata[8021] */\n    { 4011, 0x00000000U, 0x3315EE74U }, /* XSUM_XXH32_testdata[8022] */\n    { 4011, 0x9E3779B1U, 0x5509D419U }, /* XSUM_XXH32_testdata[8023] */\n    { 4012, 0x00000000U, 0x5DF1D007U }, /* XSUM_XXH32_testdata[8024] */\n    { 4012, 0x9E3779B1U, 0x5CE608C5U }, /* XSUM_XXH32_testdata[8025] */\n    { 4013, 0x00000000U, 0x10D81114U }, /* XSUM_XXH32_testdata[8026] */\n    { 4013, 0x9E3779B1U, 0x8D7E4E9AU }, /* XSUM_XXH32_testdata[8027] */\n    { 4014, 0x00000000U, 0xE141A08CU }, /* XSUM_XXH32_testdata[8028] */\n    { 4014, 0x9E3779B1U, 0xD3CD9162U }, /* XSUM_XXH32_testdata[8029] */\n    { 4015, 0x00000000U, 0x785E18CEU }, /* XSUM_XXH32_testdata[8030] */\n    { 4015, 0x9E3779B1U, 0x2B4422DEU }, /* XSUM_XXH32_testdata[8031] */\n    { 4016, 0x00000000U, 0x74DD10AAU }, /* XSUM_XXH32_testdata[8032] */\n    { 4016, 0x9E3779B1U, 0xB009AEB1U }, /* XSUM_XXH32_testdata[8033] */\n    { 4017, 0x00000000U, 0xF52E9BA0U }, /* XSUM_XXH32_testdata[8034] */\n    { 4017, 0x9E3779B1U, 0x5DFE3133U }, /* XSUM_XXH32_testdata[8035] */\n    { 4018, 0x00000000U, 0x00D05915U }, /* XSUM_XXH32_testdata[8036] */\n    { 4018, 0x9E3779B1U, 0x5A1BE64AU }, /* XSUM_XXH32_testdata[8037] */\n    { 4019, 0x00000000U, 0x729F4B02U }, /* XSUM_XXH32_testdata[8038] */\n    { 4019, 0x9E3779B1U, 0x34F450B5U }, /* XSUM_XXH32_testdata[8039] */\n    { 4020, 0x00000000U, 0x355A8E3FU }, /* XSUM_XXH32_testdata[8040] */\n    { 4020, 0x9E3779B1U, 0xFBCECC94U }, /* XSUM_XXH32_testdata[8041] */\n    { 4021, 0x00000000U, 0x3BB86C47U }, /* XSUM_XXH32_testdata[8042] */\n    { 4021, 0x9E3779B1U, 0x333F75E3U }, /* XSUM_XXH32_testdata[8043] */\n    { 4022, 0x00000000U, 0x1858F728U }, /* XSUM_XXH32_testdata[8044] */\n    { 4022, 0x9E3779B1U, 0x6CB1F916U }, /* XSUM_XXH32_testdata[8045] */\n    { 4023, 0x00000000U, 0x94A2212CU }, /* XSUM_XXH32_testdata[8046] */\n    { 4023, 0x9E3779B1U, 0x5E99258AU }, /* XSUM_XXH32_testdata[8047] */\n    { 4024, 0x00000000U, 0xD01C1181U }, /* XSUM_XXH32_testdata[8048] */\n    { 4024, 0x9E3779B1U, 0x9DAE3749U }, /* XSUM_XXH32_testdata[8049] */\n    { 4025, 0x00000000U, 0x333E547CU }, /* XSUM_XXH32_testdata[8050] */\n    { 4025, 0x9E3779B1U, 0x2BC8BF53U }, /* XSUM_XXH32_testdata[8051] */\n    { 4026, 0x00000000U, 0xD4EB535CU }, /* XSUM_XXH32_testdata[8052] */\n    { 4026, 0x9E3779B1U, 0xC8DEB70FU }, /* XSUM_XXH32_testdata[8053] */\n    { 4027, 0x00000000U, 0x609CBC4CU }, /* XSUM_XXH32_testdata[8054] */\n    { 4027, 0x9E3779B1U, 0x7C9D1E6AU }, /* XSUM_XXH32_testdata[8055] */\n    { 4028, 0x00000000U, 0xEF78537DU }, /* XSUM_XXH32_testdata[8056] */\n    { 4028, 0x9E3779B1U, 0xD8FDF2FCU }, /* XSUM_XXH32_testdata[8057] */\n    { 4029, 0x00000000U, 0x2B6F86F1U }, /* XSUM_XXH32_testdata[8058] */\n    { 4029, 0x9E3779B1U, 0x5B3AC784U }, /* XSUM_XXH32_testdata[8059] */\n    { 4030, 0x00000000U, 0xB85A6678U }, /* XSUM_XXH32_testdata[8060] */\n    { 4030, 0x9E3779B1U, 0xDDF004C4U }, /* XSUM_XXH32_testdata[8061] */\n    { 4031, 0x00000000U, 0x6F14ADD5U }, /* XSUM_XXH32_testdata[8062] */\n    { 4031, 0x9E3779B1U, 0x1459C82CU }, /* XSUM_XXH32_testdata[8063] */\n    { 4032, 0x00000000U, 0x863FA53FU }, /* XSUM_XXH32_testdata[8064] */\n    { 4032, 0x9E3779B1U, 0x95987777U }, /* XSUM_XXH32_testdata[8065] */\n    { 4033, 0x00000000U, 0x46DE0517U }, /* XSUM_XXH32_testdata[8066] */\n    { 4033, 0x9E3779B1U, 0x32074119U }, /* XSUM_XXH32_testdata[8067] */\n    { 4034, 0x00000000U, 0xA5F02A8DU }, /* XSUM_XXH32_testdata[8068] */\n    { 4034, 0x9E3779B1U, 0x89779F09U }, /* XSUM_XXH32_testdata[8069] */\n    { 4035, 0x00000000U, 0xCC1ED34AU }, /* XSUM_XXH32_testdata[8070] */\n    { 4035, 0x9E3779B1U, 0x8422F396U }, /* XSUM_XXH32_testdata[8071] */\n    { 4036, 0x00000000U, 0xB7A415EBU }, /* XSUM_XXH32_testdata[8072] */\n    { 4036, 0x9E3779B1U, 0x0C0FF63DU }, /* XSUM_XXH32_testdata[8073] */\n    { 4037, 0x00000000U, 0x80B450EAU }, /* XSUM_XXH32_testdata[8074] */\n    { 4037, 0x9E3779B1U, 0xD8AE13BCU }, /* XSUM_XXH32_testdata[8075] */\n    { 4038, 0x00000000U, 0x122DEC1FU }, /* XSUM_XXH32_testdata[8076] */\n    { 4038, 0x9E3779B1U, 0x9BA31287U }, /* XSUM_XXH32_testdata[8077] */\n    { 4039, 0x00000000U, 0xC6C7FC76U }, /* XSUM_XXH32_testdata[8078] */\n    { 4039, 0x9E3779B1U, 0xB9415F2AU }, /* XSUM_XXH32_testdata[8079] */\n    { 4040, 0x00000000U, 0x84A802A6U }, /* XSUM_XXH32_testdata[8080] */\n    { 4040, 0x9E3779B1U, 0x9C9EEC4EU }, /* XSUM_XXH32_testdata[8081] */\n    { 4041, 0x00000000U, 0x2FED28BDU }, /* XSUM_XXH32_testdata[8082] */\n    { 4041, 0x9E3779B1U, 0x864352F3U }, /* XSUM_XXH32_testdata[8083] */\n    { 4042, 0x00000000U, 0x5CC559CEU }, /* XSUM_XXH32_testdata[8084] */\n    { 4042, 0x9E3779B1U, 0x41FF23D3U }, /* XSUM_XXH32_testdata[8085] */\n    { 4043, 0x00000000U, 0xAABE7A66U }, /* XSUM_XXH32_testdata[8086] */\n    { 4043, 0x9E3779B1U, 0x3F907706U }, /* XSUM_XXH32_testdata[8087] */\n    { 4044, 0x00000000U, 0x14EE8A88U }, /* XSUM_XXH32_testdata[8088] */\n    { 4044, 0x9E3779B1U, 0x63CA9945U }, /* XSUM_XXH32_testdata[8089] */\n    { 4045, 0x00000000U, 0xB87A99C1U }, /* XSUM_XXH32_testdata[8090] */\n    { 4045, 0x9E3779B1U, 0xB81E7D82U }, /* XSUM_XXH32_testdata[8091] */\n    { 4046, 0x00000000U, 0x5AB2D0F7U }, /* XSUM_XXH32_testdata[8092] */\n    { 4046, 0x9E3779B1U, 0x7ECE396FU }, /* XSUM_XXH32_testdata[8093] */\n    { 4047, 0x00000000U, 0x0EBE0F7FU }, /* XSUM_XXH32_testdata[8094] */\n    { 4047, 0x9E3779B1U, 0x402F64D8U }, /* XSUM_XXH32_testdata[8095] */\n    { 4048, 0x00000000U, 0xBDE1B276U }, /* XSUM_XXH32_testdata[8096] */\n    { 4048, 0x9E3779B1U, 0xD5E7985EU }, /* XSUM_XXH32_testdata[8097] */\n    { 4049, 0x00000000U, 0xA9015113U }, /* XSUM_XXH32_testdata[8098] */\n    { 4049, 0x9E3779B1U, 0xDEAA02E7U }, /* XSUM_XXH32_testdata[8099] */\n    { 4050, 0x00000000U, 0x9CA24240U }, /* XSUM_XXH32_testdata[8100] */\n    { 4050, 0x9E3779B1U, 0xE91714A1U }, /* XSUM_XXH32_testdata[8101] */\n    { 4051, 0x00000000U, 0x38CCE861U }, /* XSUM_XXH32_testdata[8102] */\n    { 4051, 0x9E3779B1U, 0x6C4924E9U }, /* XSUM_XXH32_testdata[8103] */\n    { 4052, 0x00000000U, 0x796669FAU }, /* XSUM_XXH32_testdata[8104] */\n    { 4052, 0x9E3779B1U, 0xA0522CE8U }, /* XSUM_XXH32_testdata[8105] */\n    { 4053, 0x00000000U, 0x7926AE74U }, /* XSUM_XXH32_testdata[8106] */\n    { 4053, 0x9E3779B1U, 0xDC82F8C5U }, /* XSUM_XXH32_testdata[8107] */\n    { 4054, 0x00000000U, 0xBEE9EA69U }, /* XSUM_XXH32_testdata[8108] */\n    { 4054, 0x9E3779B1U, 0x6F804B98U }, /* XSUM_XXH32_testdata[8109] */\n    { 4055, 0x00000000U, 0xA8274B12U }, /* XSUM_XXH32_testdata[8110] */\n    { 4055, 0x9E3779B1U, 0xEC8F3D79U }, /* XSUM_XXH32_testdata[8111] */\n    { 4056, 0x00000000U, 0xA348EED1U }, /* XSUM_XXH32_testdata[8112] */\n    { 4056, 0x9E3779B1U, 0x2AFBA006U }, /* XSUM_XXH32_testdata[8113] */\n    { 4057, 0x00000000U, 0xB7CE9F4FU }, /* XSUM_XXH32_testdata[8114] */\n    { 4057, 0x9E3779B1U, 0x6FD0BA10U }, /* XSUM_XXH32_testdata[8115] */\n    { 4058, 0x00000000U, 0x0D366AE5U }, /* XSUM_XXH32_testdata[8116] */\n    { 4058, 0x9E3779B1U, 0x0D29F3C7U }, /* XSUM_XXH32_testdata[8117] */\n    { 4059, 0x00000000U, 0x97351AF6U }, /* XSUM_XXH32_testdata[8118] */\n    { 4059, 0x9E3779B1U, 0x540BC27EU }, /* XSUM_XXH32_testdata[8119] */\n    { 4060, 0x00000000U, 0xF5ACE84CU }, /* XSUM_XXH32_testdata[8120] */\n    { 4060, 0x9E3779B1U, 0x9ED58AF6U }, /* XSUM_XXH32_testdata[8121] */\n    { 4061, 0x00000000U, 0x2F267ADEU }, /* XSUM_XXH32_testdata[8122] */\n    { 4061, 0x9E3779B1U, 0x045F43FDU }, /* XSUM_XXH32_testdata[8123] */\n    { 4062, 0x00000000U, 0xE515091BU }, /* XSUM_XXH32_testdata[8124] */\n    { 4062, 0x9E3779B1U, 0xC026D971U }, /* XSUM_XXH32_testdata[8125] */\n    { 4063, 0x00000000U, 0x68A4439CU }, /* XSUM_XXH32_testdata[8126] */\n    { 4063, 0x9E3779B1U, 0x7422AA11U }, /* XSUM_XXH32_testdata[8127] */\n    { 4064, 0x00000000U, 0x57AB14B9U }, /* XSUM_XXH32_testdata[8128] */\n    { 4064, 0x9E3779B1U, 0xD6529D78U }, /* XSUM_XXH32_testdata[8129] */\n    { 4065, 0x00000000U, 0x19F521CAU }, /* XSUM_XXH32_testdata[8130] */\n    { 4065, 0x9E3779B1U, 0xDD745494U }, /* XSUM_XXH32_testdata[8131] */\n    { 4066, 0x00000000U, 0xE41A92FDU }, /* XSUM_XXH32_testdata[8132] */\n    { 4066, 0x9E3779B1U, 0xDA97A4C3U }, /* XSUM_XXH32_testdata[8133] */\n    { 4067, 0x00000000U, 0xB6F50C6AU }, /* XSUM_XXH32_testdata[8134] */\n    { 4067, 0x9E3779B1U, 0x87752A24U }, /* XSUM_XXH32_testdata[8135] */\n    { 4068, 0x00000000U, 0x6A4E1762U }, /* XSUM_XXH32_testdata[8136] */\n    { 4068, 0x9E3779B1U, 0x507C48A6U }, /* XSUM_XXH32_testdata[8137] */\n    { 4069, 0x00000000U, 0xA31C6923U }, /* XSUM_XXH32_testdata[8138] */\n    { 4069, 0x9E3779B1U, 0xFBFC01CBU }, /* XSUM_XXH32_testdata[8139] */\n    { 4070, 0x00000000U, 0x57335D73U }, /* XSUM_XXH32_testdata[8140] */\n    { 4070, 0x9E3779B1U, 0x1CA5241CU }, /* XSUM_XXH32_testdata[8141] */\n    { 4071, 0x00000000U, 0xD984C0CDU }, /* XSUM_XXH32_testdata[8142] */\n    { 4071, 0x9E3779B1U, 0xE9FDD332U }, /* XSUM_XXH32_testdata[8143] */\n    { 4072, 0x00000000U, 0x2A66B234U }, /* XSUM_XXH32_testdata[8144] */\n    { 4072, 0x9E3779B1U, 0x490249A8U }, /* XSUM_XXH32_testdata[8145] */\n    { 4073, 0x00000000U, 0x37D2696AU }, /* XSUM_XXH32_testdata[8146] */\n    { 4073, 0x9E3779B1U, 0x193E992AU }, /* XSUM_XXH32_testdata[8147] */\n    { 4074, 0x00000000U, 0x50277800U }, /* XSUM_XXH32_testdata[8148] */\n    { 4074, 0x9E3779B1U, 0x8B52B126U }, /* XSUM_XXH32_testdata[8149] */\n    { 4075, 0x00000000U, 0x356B2944U }, /* XSUM_XXH32_testdata[8150] */\n    { 4075, 0x9E3779B1U, 0x7C61D14AU }, /* XSUM_XXH32_testdata[8151] */\n    { 4076, 0x00000000U, 0xDDA77E6FU }, /* XSUM_XXH32_testdata[8152] */\n    { 4076, 0x9E3779B1U, 0xB7294E5DU }, /* XSUM_XXH32_testdata[8153] */\n    { 4077, 0x00000000U, 0x7C52C919U }, /* XSUM_XXH32_testdata[8154] */\n    { 4077, 0x9E3779B1U, 0xCC94BCCDU }, /* XSUM_XXH32_testdata[8155] */\n    { 4078, 0x00000000U, 0xA76D48CEU }, /* XSUM_XXH32_testdata[8156] */\n    { 4078, 0x9E3779B1U, 0x201A68B0U }, /* XSUM_XXH32_testdata[8157] */\n    { 4079, 0x00000000U, 0x5A4DB117U }, /* XSUM_XXH32_testdata[8158] */\n    { 4079, 0x9E3779B1U, 0x8B78046DU }, /* XSUM_XXH32_testdata[8159] */\n    { 4080, 0x00000000U, 0x85A2345BU }, /* XSUM_XXH32_testdata[8160] */\n    { 4080, 0x9E3779B1U, 0x45092E05U }, /* XSUM_XXH32_testdata[8161] */\n    { 4081, 0x00000000U, 0x865AF0D2U }, /* XSUM_XXH32_testdata[8162] */\n    { 4081, 0x9E3779B1U, 0xE61764D9U }, /* XSUM_XXH32_testdata[8163] */\n    { 4082, 0x00000000U, 0x6ACB0408U }, /* XSUM_XXH32_testdata[8164] */\n    { 4082, 0x9E3779B1U, 0x173D774BU }, /* XSUM_XXH32_testdata[8165] */\n    { 4083, 0x00000000U, 0x31BC507AU }, /* XSUM_XXH32_testdata[8166] */\n    { 4083, 0x9E3779B1U, 0x5E9CB759U }, /* XSUM_XXH32_testdata[8167] */\n    { 4084, 0x00000000U, 0x73A3ADD3U }, /* XSUM_XXH32_testdata[8168] */\n    { 4084, 0x9E3779B1U, 0x6B00AF58U }, /* XSUM_XXH32_testdata[8169] */\n    { 4085, 0x00000000U, 0x8A21EEF2U }, /* XSUM_XXH32_testdata[8170] */\n    { 4085, 0x9E3779B1U, 0x87E6D65FU }, /* XSUM_XXH32_testdata[8171] */\n    { 4086, 0x00000000U, 0x5C9E19F3U }, /* XSUM_XXH32_testdata[8172] */\n    { 4086, 0x9E3779B1U, 0x0841C9C4U }, /* XSUM_XXH32_testdata[8173] */\n    { 4087, 0x00000000U, 0x3AF521C9U }, /* XSUM_XXH32_testdata[8174] */\n    { 4087, 0x9E3779B1U, 0x156EE57EU }, /* XSUM_XXH32_testdata[8175] */\n    { 4088, 0x00000000U, 0xBA4262C2U }, /* XSUM_XXH32_testdata[8176] */\n    { 4088, 0x9E3779B1U, 0x8DF52DDBU }, /* XSUM_XXH32_testdata[8177] */\n    { 4089, 0x00000000U, 0x47EEC3E1U }, /* XSUM_XXH32_testdata[8178] */\n    { 4089, 0x9E3779B1U, 0x91AD069EU }, /* XSUM_XXH32_testdata[8179] */\n    { 4090, 0x00000000U, 0x2ACC967DU }, /* XSUM_XXH32_testdata[8180] */\n    { 4090, 0x9E3779B1U, 0x168F6AF1U }, /* XSUM_XXH32_testdata[8181] */\n    { 4091, 0x00000000U, 0xFC796CBDU }, /* XSUM_XXH32_testdata[8182] */\n    { 4091, 0x9E3779B1U, 0x23C45836U }, /* XSUM_XXH32_testdata[8183] */\n    { 4092, 0x00000000U, 0xE43AD822U }, /* XSUM_XXH32_testdata[8184] */\n    { 4092, 0x9E3779B1U, 0x86F738C3U }, /* XSUM_XXH32_testdata[8185] */\n    { 4093, 0x00000000U, 0x36108F97U }, /* XSUM_XXH32_testdata[8186] */\n    { 4093, 0x9E3779B1U, 0x73933287U }, /* XSUM_XXH32_testdata[8187] */\n    { 4094, 0x00000000U, 0xDEA6DC51U }, /* XSUM_XXH32_testdata[8188] */\n    { 4094, 0x9E3779B1U, 0x6453B5F7U }, /* XSUM_XXH32_testdata[8189] */\n    { 4095, 0x00000000U, 0x26E3D566U }, /* XSUM_XXH32_testdata[8190] */\n    { 4095, 0x9E3779B1U, 0xEC26C02CU }, /* XSUM_XXH32_testdata[8191] */\n    { 4096, 0x00000000U, 0x20FC444FU }, /* XSUM_XXH32_testdata[8192] */\n    { 4096, 0x9E3779B1U, 0x102AD417U }, /* XSUM_XXH32_testdata[8193] */\n    { 4097, 0x00000000U, 0x4115D4E2U }, /* XSUM_XXH32_testdata[8194] */\n    { 4097, 0x9E3779B1U, 0xD0552AEDU }, /* XSUM_XXH32_testdata[8195] */\n    { 4098, 0x00000000U, 0x1E565A59U }, /* XSUM_XXH32_testdata[8196] */\n    { 4098, 0x9E3779B1U, 0x3E708270U }, /* XSUM_XXH32_testdata[8197] */\n    { 4099, 0x00000000U, 0x64E581B2U }, /* XSUM_XXH32_testdata[8198] */\n    { 4099, 0x9E3779B1U, 0x9D961E05U }, /* XSUM_XXH32_testdata[8199] */\n    { 4100, 0x00000000U, 0xB5468144U }, /* XSUM_XXH32_testdata[8200] */\n    { 4100, 0x9E3779B1U, 0x16BAD555U }, /* XSUM_XXH32_testdata[8201] */\n    { 4101, 0x00000000U, 0x591F0AE5U }, /* XSUM_XXH32_testdata[8202] */\n    { 4101, 0x9E3779B1U, 0x11021719U }, /* XSUM_XXH32_testdata[8203] */\n    { 4102, 0x00000000U, 0x370AB735U }, /* XSUM_XXH32_testdata[8204] */\n    { 4102, 0x9E3779B1U, 0xF4458FFFU }, /* XSUM_XXH32_testdata[8205] */\n    { 4103, 0x00000000U, 0x8C357473U }, /* XSUM_XXH32_testdata[8206] */\n    { 4103, 0x9E3779B1U, 0x0AB98C5AU }, /* XSUM_XXH32_testdata[8207] */\n    { 4104, 0x00000000U, 0x283E1806U }, /* XSUM_XXH32_testdata[8208] */\n    { 4104, 0x9E3779B1U, 0xFE797FC0U }, /* XSUM_XXH32_testdata[8209] */\n    { 4105, 0x00000000U, 0x1AF40E88U }, /* XSUM_XXH32_testdata[8210] */\n    { 4105, 0x9E3779B1U, 0x3C68E643U }, /* XSUM_XXH32_testdata[8211] */\n    { 4106, 0x00000000U, 0xF62C711BU }, /* XSUM_XXH32_testdata[8212] */\n    { 4106, 0x9E3779B1U, 0xDE75FF88U }, /* XSUM_XXH32_testdata[8213] */\n    { 4107, 0x00000000U, 0xF0717C1EU }, /* XSUM_XXH32_testdata[8214] */\n    { 4107, 0x9E3779B1U, 0xC4B3B75AU }, /* XSUM_XXH32_testdata[8215] */\n    { 4108, 0x00000000U, 0x28D9C58CU }, /* XSUM_XXH32_testdata[8216] */\n    { 4108, 0x9E3779B1U, 0xC7989E18U }, /* XSUM_XXH32_testdata[8217] */\n    { 4109, 0x00000000U, 0x078E1B73U }, /* XSUM_XXH32_testdata[8218] */\n    { 4109, 0x9E3779B1U, 0xCC0F8DF5U }, /* XSUM_XXH32_testdata[8219] */\n    { 4110, 0x00000000U, 0xE1122F9FU }, /* XSUM_XXH32_testdata[8220] */\n    { 4110, 0x9E3779B1U, 0xF194A1B1U }, /* XSUM_XXH32_testdata[8221] */\n    { 4111, 0x00000000U, 0x3BF2AEDDU }, /* XSUM_XXH32_testdata[8222] */\n    { 4111, 0x9E3779B1U, 0x9A333866U }, /* XSUM_XXH32_testdata[8223] */\n    { 4112, 0x00000000U, 0x904888B6U }, /* XSUM_XXH32_testdata[8224] */\n    { 4112, 0x9E3779B1U, 0xABED9738U }, /* XSUM_XXH32_testdata[8225] */\n    { 4113, 0x00000000U, 0xC373E6B2U }, /* XSUM_XXH32_testdata[8226] */\n    { 4113, 0x9E3779B1U, 0xCCB77D39U }, /* XSUM_XXH32_testdata[8227] */\n    { 4114, 0x00000000U, 0x341B9A96U }, /* XSUM_XXH32_testdata[8228] */\n    { 4114, 0x9E3779B1U, 0xF855A055U }, /* XSUM_XXH32_testdata[8229] */\n    { 4115, 0x00000000U, 0x3F4DCD64U }, /* XSUM_XXH32_testdata[8230] */\n    { 4115, 0x9E3779B1U, 0xA3931670U }, /* XSUM_XXH32_testdata[8231] */\n    { 4116, 0x00000000U, 0x540DAE3BU }, /* XSUM_XXH32_testdata[8232] */\n    { 4116, 0x9E3779B1U, 0x68BD730DU }, /* XSUM_XXH32_testdata[8233] */\n    { 4117, 0x00000000U, 0x903AD8BBU }, /* XSUM_XXH32_testdata[8234] */\n    { 4117, 0x9E3779B1U, 0x2AA39C72U }, /* XSUM_XXH32_testdata[8235] */\n    { 4118, 0x00000000U, 0x4C14E1EAU }, /* XSUM_XXH32_testdata[8236] */\n    { 4118, 0x9E3779B1U, 0x9A3AD35EU }, /* XSUM_XXH32_testdata[8237] */\n    { 4119, 0x00000000U, 0x3CAED5A3U }, /* XSUM_XXH32_testdata[8238] */\n    { 4119, 0x9E3779B1U, 0xF2676329U }, /* XSUM_XXH32_testdata[8239] */\n    { 4120, 0x00000000U, 0x7C84DE93U }, /* XSUM_XXH32_testdata[8240] */\n    { 4120, 0x9E3779B1U, 0xE2EBED75U }, /* XSUM_XXH32_testdata[8241] */\n    { 4121, 0x00000000U, 0x308FBD62U }, /* XSUM_XXH32_testdata[8242] */\n    { 4121, 0x9E3779B1U, 0x20FBC7F3U }, /* XSUM_XXH32_testdata[8243] */\n    { 4122, 0x00000000U, 0x758B8DD7U }, /* XSUM_XXH32_testdata[8244] */\n    { 4122, 0x9E3779B1U, 0x13AAFF2BU }, /* XSUM_XXH32_testdata[8245] */\n    { 4123, 0x00000000U, 0x8D1DF04EU }, /* XSUM_XXH32_testdata[8246] */\n    { 4123, 0x9E3779B1U, 0xC81AC618U }, /* XSUM_XXH32_testdata[8247] */\n    { 4124, 0x00000000U, 0x4DD18430U }, /* XSUM_XXH32_testdata[8248] */\n    { 4124, 0x9E3779B1U, 0x914C8A76U }, /* XSUM_XXH32_testdata[8249] */\n    { 4125, 0x00000000U, 0x97F719B8U }, /* XSUM_XXH32_testdata[8250] */\n    { 4125, 0x9E3779B1U, 0x6057F01AU }, /* XSUM_XXH32_testdata[8251] */\n    { 4126, 0x00000000U, 0x5B0750EEU }, /* XSUM_XXH32_testdata[8252] */\n    { 4126, 0x9E3779B1U, 0xC787DAA4U }, /* XSUM_XXH32_testdata[8253] */\n    { 4127, 0x00000000U, 0x85C97EB1U }, /* XSUM_XXH32_testdata[8254] */\n    { 4127, 0x9E3779B1U, 0x4897C062U }, /* XSUM_XXH32_testdata[8255] */\n    { 4128, 0x00000000U, 0x53423C9BU }, /* XSUM_XXH32_testdata[8256] */\n    { 4128, 0x9E3779B1U, 0xC869D009U }, /* XSUM_XXH32_testdata[8257] */\n    { 4129, 0x00000000U, 0x96EA42C3U }, /* XSUM_XXH32_testdata[8258] */\n    { 4129, 0x9E3779B1U, 0xF3BA51D5U }, /* XSUM_XXH32_testdata[8259] */\n    { 4130, 0x00000000U, 0xE8C15073U }, /* XSUM_XXH32_testdata[8260] */\n    { 4130, 0x9E3779B1U, 0xFFE5EDA2U }, /* XSUM_XXH32_testdata[8261] */\n    { 4131, 0x00000000U, 0x72C26EFCU }, /* XSUM_XXH32_testdata[8262] */\n    { 4131, 0x9E3779B1U, 0x4186C6F1U }, /* XSUM_XXH32_testdata[8263] */\n    { 4132, 0x00000000U, 0x30C2A80AU }, /* XSUM_XXH32_testdata[8264] */\n    { 4132, 0x9E3779B1U, 0x56EEE369U }, /* XSUM_XXH32_testdata[8265] */\n    { 4133, 0x00000000U, 0xEC136775U }, /* XSUM_XXH32_testdata[8266] */\n    { 4133, 0x9E3779B1U, 0x05B90E20U }, /* XSUM_XXH32_testdata[8267] */\n    { 4134, 0x00000000U, 0x55C86666U }, /* XSUM_XXH32_testdata[8268] */\n    { 4134, 0x9E3779B1U, 0x9D888733U }, /* XSUM_XXH32_testdata[8269] */\n    { 4135, 0x00000000U, 0xE33DCE33U }, /* XSUM_XXH32_testdata[8270] */\n    { 4135, 0x9E3779B1U, 0x4A21932AU }, /* XSUM_XXH32_testdata[8271] */\n    { 4136, 0x00000000U, 0x820CC721U }, /* XSUM_XXH32_testdata[8272] */\n    { 4136, 0x9E3779B1U, 0x3720E417U }, /* XSUM_XXH32_testdata[8273] */\n    { 4137, 0x00000000U, 0x91484716U }, /* XSUM_XXH32_testdata[8274] */\n    { 4137, 0x9E3779B1U, 0x8A2F206CU }, /* XSUM_XXH32_testdata[8275] */\n    { 4138, 0x00000000U, 0xB0BDDA46U }, /* XSUM_XXH32_testdata[8276] */\n    { 4138, 0x9E3779B1U, 0xF3D55FA1U }, /* XSUM_XXH32_testdata[8277] */\n    { 4139, 0x00000000U, 0x997CD6F3U }, /* XSUM_XXH32_testdata[8278] */\n    { 4139, 0x9E3779B1U, 0x13136455U }, /* XSUM_XXH32_testdata[8279] */\n    { 4140, 0x00000000U, 0x421FEE6EU }, /* XSUM_XXH32_testdata[8280] */\n    { 4140, 0x9E3779B1U, 0x30749385U }, /* XSUM_XXH32_testdata[8281] */\n    { 4141, 0x00000000U, 0xF1BBA08CU }, /* XSUM_XXH32_testdata[8282] */\n    { 4141, 0x9E3779B1U, 0x20778E8AU }, /* XSUM_XXH32_testdata[8283] */\n    { 4142, 0x00000000U, 0xE1843725U }, /* XSUM_XXH32_testdata[8284] */\n    { 4142, 0x9E3779B1U, 0x4999E467U }, /* XSUM_XXH32_testdata[8285] */\n    { 4143, 0x00000000U, 0x6E278223U }, /* XSUM_XXH32_testdata[8286] */\n    { 4143, 0x9E3779B1U, 0x60853FB5U }, /* XSUM_XXH32_testdata[8287] */\n    { 4144, 0x00000000U, 0xE3DF5E5EU }, /* XSUM_XXH32_testdata[8288] */\n    { 4144, 0x9E3779B1U, 0x32859AA0U }, /* XSUM_XXH32_testdata[8289] */\n    { 4145, 0x00000000U, 0xF17B8246U }, /* XSUM_XXH32_testdata[8290] */\n    { 4145, 0x9E3779B1U, 0x1F94021AU }, /* XSUM_XXH32_testdata[8291] */\n    { 4146, 0x00000000U, 0x059FE179U }, /* XSUM_XXH32_testdata[8292] */\n    { 4146, 0x9E3779B1U, 0x1A19570EU }, /* XSUM_XXH32_testdata[8293] */\n    { 4147, 0x00000000U, 0x1377A418U }, /* XSUM_XXH32_testdata[8294] */\n    { 4147, 0x9E3779B1U, 0x725131CAU }, /* XSUM_XXH32_testdata[8295] */\n    { 4148, 0x00000000U, 0x68F6D614U }, /* XSUM_XXH32_testdata[8296] */\n    { 4148, 0x9E3779B1U, 0x8D6DBDEAU }, /* XSUM_XXH32_testdata[8297] */\n    { 4149, 0x00000000U, 0xFAD39F40U }, /* XSUM_XXH32_testdata[8298] */\n    { 4149, 0x9E3779B1U, 0xF4A552D3U }, /* XSUM_XXH32_testdata[8299] */\n    { 4150, 0x00000000U, 0x0C4CC8C3U }, /* XSUM_XXH32_testdata[8300] */\n    { 4150, 0x9E3779B1U, 0xF48E8895U }, /* XSUM_XXH32_testdata[8301] */\n    { 4151, 0x00000000U, 0xB0753CE2U }, /* XSUM_XXH32_testdata[8302] */\n    { 4151, 0x9E3779B1U, 0x3641D63EU }, /* XSUM_XXH32_testdata[8303] */\n    { 4152, 0x00000000U, 0xC8CCFD46U }, /* XSUM_XXH32_testdata[8304] */\n    { 4152, 0x9E3779B1U, 0x26553A09U }, /* XSUM_XXH32_testdata[8305] */\n    { 4153, 0x00000000U, 0x798B4CFEU }, /* XSUM_XXH32_testdata[8306] */\n    { 4153, 0x9E3779B1U, 0x3B876753U }, /* XSUM_XXH32_testdata[8307] */\n    { 4154, 0x00000000U, 0x1CB63AABU }, /* XSUM_XXH32_testdata[8308] */\n    { 4154, 0x9E3779B1U, 0x8A16C774U }, /* XSUM_XXH32_testdata[8309] */\n    { 4155, 0x00000000U, 0x8280F4A8U }, /* XSUM_XXH32_testdata[8310] */\n    { 4155, 0x9E3779B1U, 0x7B81E441U }, /* XSUM_XXH32_testdata[8311] */\n    { 4156, 0x00000000U, 0xB870853EU }, /* XSUM_XXH32_testdata[8312] */\n    { 4156, 0x9E3779B1U, 0x3C16BA4EU }, /* XSUM_XXH32_testdata[8313] */\n    { 4157, 0x00000000U, 0xA8A1494BU }, /* XSUM_XXH32_testdata[8314] */\n    { 4157, 0x9E3779B1U, 0x1D297001U }, /* XSUM_XXH32_testdata[8315] */\n    { 4158, 0x00000000U, 0xF4F3E125U }, /* XSUM_XXH32_testdata[8316] */\n    { 4158, 0x9E3779B1U, 0x2D68E87BU }, /* XSUM_XXH32_testdata[8317] */\n    { 4159, 0x00000000U, 0x58A67826U }, /* XSUM_XXH32_testdata[8318] */\n    { 4159, 0x9E3779B1U, 0x1C86EDD0U }, /* XSUM_XXH32_testdata[8319] */\n    { 4160, 0x00000000U, 0xDB0D9141U }, /* XSUM_XXH32_testdata[8320] */\n    { 4160, 0x9E3779B1U, 0xCCA10DF5U }, /* XSUM_XXH32_testdata[8321] */\n};\nstatic const XSUM_testdata64_t XSUM_XXH64_testdata[] = {\n    {    0, 0x0000000000000000ULL, 0xEF46DB3751D8E999ULL }, /* XSUM_XXH64_testdata[0] */\n    {    0, 0x000000009E3779B1ULL, 0xAC75FDA2929B17EFULL }, /* XSUM_XXH64_testdata[1] */\n    {    1, 0x0000000000000000ULL, 0xE934A84ADB052768ULL }, /* XSUM_XXH64_testdata[2] */\n    {    1, 0x000000009E3779B1ULL, 0x5014607643A9B4C3ULL }, /* XSUM_XXH64_testdata[3] */\n    {    2, 0x0000000000000000ULL, 0x5D48CD60A77E23FFULL }, /* XSUM_XXH64_testdata[4] */\n    {    2, 0x000000009E3779B1ULL, 0x9E93152232D54A39ULL }, /* XSUM_XXH64_testdata[5] */\n    {    3, 0x0000000000000000ULL, 0xFF7E1959CB50794AULL }, /* XSUM_XXH64_testdata[6] */\n    {    3, 0x000000009E3779B1ULL, 0xAA8584E83660F7D1ULL }, /* XSUM_XXH64_testdata[7] */\n    {    4, 0x0000000000000000ULL, 0x9136A0DCA57457EEULL }, /* XSUM_XXH64_testdata[8] */\n    {    4, 0x000000009E3779B1ULL, 0xCAAB286BD8E9FDB5ULL }, /* XSUM_XXH64_testdata[9] */\n    {    5, 0x0000000000000000ULL, 0x9B046FB1397F09A5ULL }, /* XSUM_XXH64_testdata[10] */\n    {    5, 0x000000009E3779B1ULL, 0x2AF5249930F984ECULL }, /* XSUM_XXH64_testdata[11] */\n    {    6, 0x0000000000000000ULL, 0xC72565B7154268A8ULL }, /* XSUM_XXH64_testdata[12] */\n    {    6, 0x000000009E3779B1ULL, 0xCA4C6723580E8EF6ULL }, /* XSUM_XXH64_testdata[13] */\n    {    7, 0x0000000000000000ULL, 0x6C83909A9F01ED25ULL }, /* XSUM_XXH64_testdata[14] */\n    {    7, 0x000000009E3779B1ULL, 0xF98D03B1AD6F9293ULL }, /* XSUM_XXH64_testdata[15] */\n    {    8, 0x0000000000000000ULL, 0xCDBCF538E71D1348ULL }, /* XSUM_XXH64_testdata[16] */\n    {    8, 0x000000009E3779B1ULL, 0xFE0C047A5353CDACULL }, /* XSUM_XXH64_testdata[17] */\n    {    9, 0x0000000000000000ULL, 0x554B1AE991EDA6B6ULL }, /* XSUM_XXH64_testdata[18] */\n    {    9, 0x000000009E3779B1ULL, 0x7908265248F6D73FULL }, /* XSUM_XXH64_testdata[19] */\n    {   10, 0x0000000000000000ULL, 0x5D00E7351392EA84ULL }, /* XSUM_XXH64_testdata[20] */\n    {   10, 0x000000009E3779B1ULL, 0x2A8AE16B86CD2F12ULL }, /* XSUM_XXH64_testdata[21] */\n    {   11, 0x0000000000000000ULL, 0x6345D5746F35DA70ULL }, /* XSUM_XXH64_testdata[22] */\n    {   11, 0x000000009E3779B1ULL, 0xEAA08A8C8BE3CCCFULL }, /* XSUM_XXH64_testdata[23] */\n    {   12, 0x0000000000000000ULL, 0x0723BF50086EAD9AULL }, /* XSUM_XXH64_testdata[24] */\n    {   12, 0x000000009E3779B1ULL, 0x8252819F4E506951ULL }, /* XSUM_XXH64_testdata[25] */\n    {   13, 0x0000000000000000ULL, 0xC2E5013E3C40BCF7ULL }, /* XSUM_XXH64_testdata[26] */\n    {   13, 0x000000009E3779B1ULL, 0x4DF437A291CB1039ULL }, /* XSUM_XXH64_testdata[27] */\n    {   14, 0x0000000000000000ULL, 0x8282DCC4994E35C8ULL }, /* XSUM_XXH64_testdata[28] */\n    {   14, 0x000000009E3779B1ULL, 0xC3BD6BF63DEB6DF0ULL }, /* XSUM_XXH64_testdata[29] */\n    {   15, 0x0000000000000000ULL, 0x180719316D622D84ULL }, /* XSUM_XXH64_testdata[30] */\n    {   15, 0x000000009E3779B1ULL, 0xD61105C20E91F99FULL }, /* XSUM_XXH64_testdata[31] */\n    {   16, 0x0000000000000000ULL, 0x98C90B57FDFCB55CULL }, /* XSUM_XXH64_testdata[32] */\n    {   16, 0x000000009E3779B1ULL, 0xC900AD2D536B607EULL }, /* XSUM_XXH64_testdata[33] */\n    {   17, 0x0000000000000000ULL, 0x0D39A2D051A30C2CULL }, /* XSUM_XXH64_testdata[34] */\n    {   17, 0x000000009E3779B1ULL, 0x495CD68A647C7A22ULL }, /* XSUM_XXH64_testdata[35] */\n    {   18, 0x0000000000000000ULL, 0x33E84A4333B2B2EBULL }, /* XSUM_XXH64_testdata[36] */\n    {   18, 0x000000009E3779B1ULL, 0x2325A30CCA1A66DDULL }, /* XSUM_XXH64_testdata[37] */\n    {   19, 0x0000000000000000ULL, 0xE91C6EF31FC08F82ULL }, /* XSUM_XXH64_testdata[38] */\n    {   19, 0x000000009E3779B1ULL, 0x06809662799B7D6FULL }, /* XSUM_XXH64_testdata[39] */\n    {   20, 0x0000000000000000ULL, 0x5F8C68355769439EULL }, /* XSUM_XXH64_testdata[40] */\n    {   20, 0x000000009E3779B1ULL, 0x97218696C2D29602ULL }, /* XSUM_XXH64_testdata[41] */\n    {   21, 0x0000000000000000ULL, 0x42B0B8EE353AC461ULL }, /* XSUM_XXH64_testdata[42] */\n    {   21, 0x000000009E3779B1ULL, 0x7FC0BB451B83A633ULL }, /* XSUM_XXH64_testdata[43] */\n    {   22, 0x0000000000000000ULL, 0x65C935C6978098B1ULL }, /* XSUM_XXH64_testdata[44] */\n    {   22, 0x000000009E3779B1ULL, 0xC4A0DD14BF835C13ULL }, /* XSUM_XXH64_testdata[45] */\n    {   23, 0x0000000000000000ULL, 0xD2460ECC840B74DDULL }, /* XSUM_XXH64_testdata[46] */\n    {   23, 0x000000009E3779B1ULL, 0x4B44E8DE7A396773ULL }, /* XSUM_XXH64_testdata[47] */\n    {   24, 0x0000000000000000ULL, 0xF75A6DEA42DC5BF4ULL }, /* XSUM_XXH64_testdata[48] */\n    {   24, 0x000000009E3779B1ULL, 0x8B7C67EB59778E22ULL }, /* XSUM_XXH64_testdata[49] */\n    {   25, 0x0000000000000000ULL, 0x52FAA43C3F20B994ULL }, /* XSUM_XXH64_testdata[50] */\n    {   25, 0x000000009E3779B1ULL, 0xC4FEC92EAC2C3B8AULL }, /* XSUM_XXH64_testdata[51] */\n    {   26, 0x0000000000000000ULL, 0x8DB7831EC345F9A3ULL }, /* XSUM_XXH64_testdata[52] */\n    {   26, 0x000000009E3779B1ULL, 0x2C2A80BCAD321466ULL }, /* XSUM_XXH64_testdata[53] */\n    {   27, 0x0000000000000000ULL, 0x88945AA08051FC2DULL }, /* XSUM_XXH64_testdata[54] */\n    {   27, 0x000000009E3779B1ULL, 0x3401AF8EF28FD410ULL }, /* XSUM_XXH64_testdata[55] */\n    {   28, 0x0000000000000000ULL, 0x64CD9E8C96A9E2DDULL }, /* XSUM_XXH64_testdata[56] */\n    {   28, 0x000000009E3779B1ULL, 0x8160FB8C20B48287ULL }, /* XSUM_XXH64_testdata[57] */\n    {   29, 0x0000000000000000ULL, 0x8C8F345B634AC2B9ULL }, /* XSUM_XXH64_testdata[58] */\n    {   29, 0x000000009E3779B1ULL, 0x5A327C78E4AD6678ULL }, /* XSUM_XXH64_testdata[59] */\n    {   30, 0x0000000000000000ULL, 0xE2677241D4C46CAFULL }, /* XSUM_XXH64_testdata[60] */\n    {   30, 0x000000009E3779B1ULL, 0xB1B2B51C93AF4866ULL }, /* XSUM_XXH64_testdata[61] */\n    {   31, 0x0000000000000000ULL, 0x299B39A290E6D783ULL }, /* XSUM_XXH64_testdata[62] */\n    {   31, 0x000000009E3779B1ULL, 0xDA673D5FEB5C1D79ULL }, /* XSUM_XXH64_testdata[63] */\n    {   32, 0x0000000000000000ULL, 0x18B216492BB44B70ULL }, /* XSUM_XXH64_testdata[64] */\n    {   32, 0x000000009E3779B1ULL, 0xB3F33BDF93ADE409ULL }, /* XSUM_XXH64_testdata[65] */\n    {   33, 0x0000000000000000ULL, 0x55C8DC3E578F5B59ULL }, /* XSUM_XXH64_testdata[66] */\n    {   33, 0x000000009E3779B1ULL, 0xE92C292F64BC3071ULL }, /* XSUM_XXH64_testdata[67] */\n    {   34, 0x0000000000000000ULL, 0xD0CE7CBAE371BEB2ULL }, /* XSUM_XXH64_testdata[68] */\n    {   34, 0x000000009E3779B1ULL, 0xC509C460280BBB12ULL }, /* XSUM_XXH64_testdata[69] */\n    {   35, 0x0000000000000000ULL, 0xCB0AA8E2A7A29707ULL }, /* XSUM_XXH64_testdata[70] */\n    {   35, 0x000000009E3779B1ULL, 0xECE3515C236504C7ULL }, /* XSUM_XXH64_testdata[71] */\n    {   36, 0x0000000000000000ULL, 0x0AE67584084DC6A4ULL }, /* XSUM_XXH64_testdata[72] */\n    {   36, 0x000000009E3779B1ULL, 0x57C73F9E3A6FC2C6ULL }, /* XSUM_XXH64_testdata[73] */\n    {   37, 0x0000000000000000ULL, 0x292F5332C92B73CEULL }, /* XSUM_XXH64_testdata[74] */\n    {   37, 0x000000009E3779B1ULL, 0x7762425B2E89DAD3ULL }, /* XSUM_XXH64_testdata[75] */\n    {   38, 0x0000000000000000ULL, 0x5F398E2A8478BED3ULL }, /* XSUM_XXH64_testdata[76] */\n    {   38, 0x000000009E3779B1ULL, 0xE842D306DC53E621ULL }, /* XSUM_XXH64_testdata[77] */\n    {   39, 0x0000000000000000ULL, 0xB888CAF07592B1B3ULL }, /* XSUM_XXH64_testdata[78] */\n    {   39, 0x000000009E3779B1ULL, 0x602E74D43465AC3DULL }, /* XSUM_XXH64_testdata[79] */\n    {   40, 0x0000000000000000ULL, 0x23B3810D7D8B1731ULL }, /* XSUM_XXH64_testdata[80] */\n    {   40, 0x000000009E3779B1ULL, 0x5A57F246772BC540ULL }, /* XSUM_XXH64_testdata[81] */\n    {   41, 0x0000000000000000ULL, 0x5342C966C7F3D5F4ULL }, /* XSUM_XXH64_testdata[82] */\n    {   41, 0x000000009E3779B1ULL, 0xB213FFB25FEB1CCDULL }, /* XSUM_XXH64_testdata[83] */\n    {   42, 0x0000000000000000ULL, 0x77454B74F1DBBF63ULL }, /* XSUM_XXH64_testdata[84] */\n    {   42, 0x000000009E3779B1ULL, 0xAED0CE7EA4202741ULL }, /* XSUM_XXH64_testdata[85] */\n    {   43, 0x0000000000000000ULL, 0x9904C9350F597190ULL }, /* XSUM_XXH64_testdata[86] */\n    {   43, 0x000000009E3779B1ULL, 0xA071200735E57A6AULL }, /* XSUM_XXH64_testdata[87] */\n    {   44, 0x0000000000000000ULL, 0x24EC2B3D0E442641ULL }, /* XSUM_XXH64_testdata[88] */\n    {   44, 0x000000009E3779B1ULL, 0x831B7452E64EB328ULL }, /* XSUM_XXH64_testdata[89] */\n    {   45, 0x0000000000000000ULL, 0x4EC307EBE0A650A4ULL }, /* XSUM_XXH64_testdata[90] */\n    {   45, 0x000000009E3779B1ULL, 0x66BDA694A1FD3023ULL }, /* XSUM_XXH64_testdata[91] */\n    {   46, 0x0000000000000000ULL, 0x7DD1C5514B2240EFULL }, /* XSUM_XXH64_testdata[92] */\n    {   46, 0x000000009E3779B1ULL, 0xD238E617805EA9BBULL }, /* XSUM_XXH64_testdata[93] */\n    {   47, 0x0000000000000000ULL, 0x84A42E167CBD1FEFULL }, /* XSUM_XXH64_testdata[94] */\n    {   47, 0x000000009E3779B1ULL, 0xA474B31A5132A541ULL }, /* XSUM_XXH64_testdata[95] */\n    {   48, 0x0000000000000000ULL, 0xFD0FEEAC7A939933ULL }, /* XSUM_XXH64_testdata[96] */\n    {   48, 0x000000009E3779B1ULL, 0x6FFE2F43A24C2302ULL }, /* XSUM_XXH64_testdata[97] */\n    {   49, 0x0000000000000000ULL, 0xA91BFF78A7185B66ULL }, /* XSUM_XXH64_testdata[98] */\n    {   49, 0x000000009E3779B1ULL, 0xE858B13C918498ECULL }, /* XSUM_XXH64_testdata[99] */\n    {   50, 0x0000000000000000ULL, 0xDFFE9F293DDD101DULL }, /* XSUM_XXH64_testdata[100] */\n    {   50, 0x000000009E3779B1ULL, 0x46521A048859CE7AULL }, /* XSUM_XXH64_testdata[101] */\n    {   51, 0x0000000000000000ULL, 0x2332585C18D7483AULL }, /* XSUM_XXH64_testdata[102] */\n    {   51, 0x000000009E3779B1ULL, 0x788846B44826A5D1ULL }, /* XSUM_XXH64_testdata[103] */\n    {   52, 0x0000000000000000ULL, 0x5A0056511F9DD653ULL }, /* XSUM_XXH64_testdata[104] */\n    {   52, 0x000000009E3779B1ULL, 0x1C0081F84C6D32DBULL }, /* XSUM_XXH64_testdata[105] */\n    {   53, 0x0000000000000000ULL, 0x4426A2F5C8D59469ULL }, /* XSUM_XXH64_testdata[106] */\n    {   53, 0x000000009E3779B1ULL, 0x4270188315F2CC31ULL }, /* XSUM_XXH64_testdata[107] */\n    {   54, 0x0000000000000000ULL, 0x39EAF8893520636AULL }, /* XSUM_XXH64_testdata[108] */\n    {   54, 0x000000009E3779B1ULL, 0xB6D6E8B68C7EF7A2ULL }, /* XSUM_XXH64_testdata[109] */\n    {   55, 0x0000000000000000ULL, 0xAFEA98CC4E92F7E1ULL }, /* XSUM_XXH64_testdata[110] */\n    {   55, 0x000000009E3779B1ULL, 0xE6D5C88B9135E579ULL }, /* XSUM_XXH64_testdata[111] */\n    {   56, 0x0000000000000000ULL, 0xB7A6414B8D3E2597ULL }, /* XSUM_XXH64_testdata[112] */\n    {   56, 0x000000009E3779B1ULL, 0xB6BD2CBFB6A64017ULL }, /* XSUM_XXH64_testdata[113] */\n    {   57, 0x0000000000000000ULL, 0xF33D64569CD4B1C0ULL }, /* XSUM_XXH64_testdata[114] */\n    {   57, 0x000000009E3779B1ULL, 0xB9B235447E24CA28ULL }, /* XSUM_XXH64_testdata[115] */\n    {   58, 0x0000000000000000ULL, 0x93FA072F0E8FE7CAULL }, /* XSUM_XXH64_testdata[116] */\n    {   58, 0x000000009E3779B1ULL, 0xB8D0D6211B80EA15ULL }, /* XSUM_XXH64_testdata[117] */\n    {   59, 0x0000000000000000ULL, 0x4F2890576949D6EDULL }, /* XSUM_XXH64_testdata[118] */\n    {   59, 0x000000009E3779B1ULL, 0x11E586B470B7224EULL }, /* XSUM_XXH64_testdata[119] */\n    {   60, 0x0000000000000000ULL, 0x3378C44F459C290BULL }, /* XSUM_XXH64_testdata[120] */\n    {   60, 0x000000009E3779B1ULL, 0xA7C18F722446E5C8ULL }, /* XSUM_XXH64_testdata[121] */\n    {   61, 0x0000000000000000ULL, 0x40D486FDDDAD5CB7ULL }, /* XSUM_XXH64_testdata[122] */\n    {   61, 0x000000009E3779B1ULL, 0x980BDE3212E2F025ULL }, /* XSUM_XXH64_testdata[123] */\n    {   62, 0x0000000000000000ULL, 0x21664C60C551CC87ULL }, /* XSUM_XXH64_testdata[124] */\n    {   62, 0x000000009E3779B1ULL, 0x128AC6F704B8A0F7ULL }, /* XSUM_XXH64_testdata[125] */\n    {   63, 0x0000000000000000ULL, 0xA9EFBE0FA0F3F4E7ULL }, /* XSUM_XXH64_testdata[126] */\n    {   63, 0x000000009E3779B1ULL, 0x6C911FADB05B6FC2ULL }, /* XSUM_XXH64_testdata[127] */\n    {   64, 0x0000000000000000ULL, 0xEF558F8ACAC2B5CDULL }, /* XSUM_XXH64_testdata[128] */\n    {   64, 0x000000009E3779B1ULL, 0xB5EEBA99264CC44FULL }, /* XSUM_XXH64_testdata[129] */\n    {   65, 0x0000000000000000ULL, 0xDE0F20DC2631AF7AULL }, /* XSUM_XXH64_testdata[130] */\n    {   65, 0x000000009E3779B1ULL, 0xD3F6FF3941E310CAULL }, /* XSUM_XXH64_testdata[131] */\n    {   66, 0x0000000000000000ULL, 0xCF1E52EDE1C505C4ULL }, /* XSUM_XXH64_testdata[132] */\n    {   66, 0x000000009E3779B1ULL, 0xBCE7B3488A29EFB1ULL }, /* XSUM_XXH64_testdata[133] */\n    {   67, 0x0000000000000000ULL, 0x0965DF7219D2E741ULL }, /* XSUM_XXH64_testdata[134] */\n    {   67, 0x000000009E3779B1ULL, 0x1862E884ABDC704CULL }, /* XSUM_XXH64_testdata[135] */\n    {   68, 0x0000000000000000ULL, 0x1B8378E923B247A7ULL }, /* XSUM_XXH64_testdata[136] */\n    {   68, 0x000000009E3779B1ULL, 0x25E6F985E36492EFULL }, /* XSUM_XXH64_testdata[137] */\n    {   69, 0x0000000000000000ULL, 0x43F2B606AD9BA362ULL }, /* XSUM_XXH64_testdata[138] */\n    {   69, 0x000000009E3779B1ULL, 0x81F00574A346F668ULL }, /* XSUM_XXH64_testdata[139] */\n    {   70, 0x0000000000000000ULL, 0xD9C3413222F1DEA4ULL }, /* XSUM_XXH64_testdata[140] */\n    {   70, 0x000000009E3779B1ULL, 0xE01652426AA1774CULL }, /* XSUM_XXH64_testdata[141] */\n    {   71, 0x0000000000000000ULL, 0x3D6ECAB2BCFBE3FFULL }, /* XSUM_XXH64_testdata[142] */\n    {   71, 0x000000009E3779B1ULL, 0xAAB5C313DFAC5A44ULL }, /* XSUM_XXH64_testdata[143] */\n    {   72, 0x0000000000000000ULL, 0xEA8573B60D5A8800ULL }, /* XSUM_XXH64_testdata[144] */\n    {   72, 0x000000009E3779B1ULL, 0xBDEE6BA43947EB30ULL }, /* XSUM_XXH64_testdata[145] */\n    {   73, 0x0000000000000000ULL, 0xE372599E31F8CFFDULL }, /* XSUM_XXH64_testdata[146] */\n    {   73, 0x000000009E3779B1ULL, 0xF1597384DE9FBD93ULL }, /* XSUM_XXH64_testdata[147] */\n    {   74, 0x0000000000000000ULL, 0x02B86794A00BDBE8ULL }, /* XSUM_XXH64_testdata[148] */\n    {   74, 0x000000009E3779B1ULL, 0x5FB940B90D39A1E6ULL }, /* XSUM_XXH64_testdata[149] */\n    {   75, 0x0000000000000000ULL, 0xCA1A21FB24979810ULL }, /* XSUM_XXH64_testdata[150] */\n    {   75, 0x000000009E3779B1ULL, 0x76214D8E3B169CF5ULL }, /* XSUM_XXH64_testdata[151] */\n    {   76, 0x0000000000000000ULL, 0x60DFF17BEC07766DULL }, /* XSUM_XXH64_testdata[152] */\n    {   76, 0x000000009E3779B1ULL, 0x9A8133A1DDAF07DBULL }, /* XSUM_XXH64_testdata[153] */\n    {   77, 0x0000000000000000ULL, 0xF4AF74828DE6862DULL }, /* XSUM_XXH64_testdata[154] */\n    {   77, 0x000000009E3779B1ULL, 0xD73AEC54F785E384ULL }, /* XSUM_XXH64_testdata[155] */\n    {   78, 0x0000000000000000ULL, 0x828E4C8C5257CC15ULL }, /* XSUM_XXH64_testdata[156] */\n    {   78, 0x000000009E3779B1ULL, 0xD2317E57923E664CULL }, /* XSUM_XXH64_testdata[157] */\n    {   79, 0x0000000000000000ULL, 0x91F7F9D6008299A0ULL }, /* XSUM_XXH64_testdata[158] */\n    {   79, 0x000000009E3779B1ULL, 0xE863995625F7AD52ULL }, /* XSUM_XXH64_testdata[159] */\n    {   80, 0x0000000000000000ULL, 0x99BD5D25EB211099ULL }, /* XSUM_XXH64_testdata[160] */\n    {   80, 0x000000009E3779B1ULL, 0x5281D5357D0B8AC4ULL }, /* XSUM_XXH64_testdata[161] */\n    {   81, 0x0000000000000000ULL, 0xCB329A8F102F05BCULL }, /* XSUM_XXH64_testdata[162] */\n    {   81, 0x000000009E3779B1ULL, 0x7E77B483A01E4AEDULL }, /* XSUM_XXH64_testdata[163] */\n    {   82, 0x0000000000000000ULL, 0x993A0B6E6D5DF0CBULL }, /* XSUM_XXH64_testdata[164] */\n    {   82, 0x000000009E3779B1ULL, 0x6DBD4234F13A5DC1ULL }, /* XSUM_XXH64_testdata[165] */\n    {   83, 0x0000000000000000ULL, 0x818F4CEC407D8CF9ULL }, /* XSUM_XXH64_testdata[166] */\n    {   83, 0x000000009E3779B1ULL, 0x0367C5363E62AEC3ULL }, /* XSUM_XXH64_testdata[167] */\n    {   84, 0x0000000000000000ULL, 0xAF57F8CD340FB1B6ULL }, /* XSUM_XXH64_testdata[168] */\n    {   84, 0x000000009E3779B1ULL, 0xC7623B4C4E6844C1ULL }, /* XSUM_XXH64_testdata[169] */\n    {   85, 0x0000000000000000ULL, 0x50789F0F60EBAD3AULL }, /* XSUM_XXH64_testdata[170] */\n    {   85, 0x000000009E3779B1ULL, 0xB88DA3150AAF44BEULL }, /* XSUM_XXH64_testdata[171] */\n    {   86, 0x0000000000000000ULL, 0xF3214750C1A6455EULL }, /* XSUM_XXH64_testdata[172] */\n    {   86, 0x000000009E3779B1ULL, 0x56C1A7FB96DE0E82ULL }, /* XSUM_XXH64_testdata[173] */\n    {   87, 0x0000000000000000ULL, 0x8DBE8913BE346D20ULL }, /* XSUM_XXH64_testdata[174] */\n    {   87, 0x000000009E3779B1ULL, 0x899E381BD46D1409ULL }, /* XSUM_XXH64_testdata[175] */\n    {   88, 0x0000000000000000ULL, 0xA130814F81F87E43ULL }, /* XSUM_XXH64_testdata[176] */\n    {   88, 0x000000009E3779B1ULL, 0xA3BF96F3D593C759ULL }, /* XSUM_XXH64_testdata[177] */\n    {   89, 0x0000000000000000ULL, 0x0023276D258EDA58ULL }, /* XSUM_XXH64_testdata[178] */\n    {   89, 0x000000009E3779B1ULL, 0x6779DE8C67483444ULL }, /* XSUM_XXH64_testdata[179] */\n    {   90, 0x0000000000000000ULL, 0x0A0571F769B40C93ULL }, /* XSUM_XXH64_testdata[180] */\n    {   90, 0x000000009E3779B1ULL, 0x9C915D4DA4BE05A6ULL }, /* XSUM_XXH64_testdata[181] */\n    {   91, 0x0000000000000000ULL, 0x14A2F5051E8893C8ULL }, /* XSUM_XXH64_testdata[182] */\n    {   91, 0x000000009E3779B1ULL, 0x46F62B0B3D1B66AFULL }, /* XSUM_XXH64_testdata[183] */\n    {   92, 0x0000000000000000ULL, 0x4FBBE74E062367B0ULL }, /* XSUM_XXH64_testdata[184] */\n    {   92, 0x000000009E3779B1ULL, 0x3190419611427263ULL }, /* XSUM_XXH64_testdata[185] */\n    {   93, 0x0000000000000000ULL, 0x4B375CEF503586FCULL }, /* XSUM_XXH64_testdata[186] */\n    {   93, 0x000000009E3779B1ULL, 0x821D5495DDDC7C82ULL }, /* XSUM_XXH64_testdata[187] */\n    {   94, 0x0000000000000000ULL, 0x6AD4B96E4286EB70ULL }, /* XSUM_XXH64_testdata[188] */\n    {   94, 0x000000009E3779B1ULL, 0x553DDDB89F3CB523ULL }, /* XSUM_XXH64_testdata[189] */\n    {   95, 0x0000000000000000ULL, 0xFF9F46BDCC644624ULL }, /* XSUM_XXH64_testdata[190] */\n    {   95, 0x000000009E3779B1ULL, 0x72E75A560EF624A3ULL }, /* XSUM_XXH64_testdata[191] */\n    {   96, 0x0000000000000000ULL, 0x105064E743EDD1D9ULL }, /* XSUM_XXH64_testdata[192] */\n    {   96, 0x000000009E3779B1ULL, 0x8FF0B4ABEE6F03CCULL }, /* XSUM_XXH64_testdata[193] */\n    {   97, 0x0000000000000000ULL, 0x097B16E4E9B0A2E3ULL }, /* XSUM_XXH64_testdata[194] */\n    {   97, 0x000000009E3779B1ULL, 0x9704E5147FDCC4F4ULL }, /* XSUM_XXH64_testdata[195] */\n    {   98, 0x0000000000000000ULL, 0x06662519E8393FF2ULL }, /* XSUM_XXH64_testdata[196] */\n    {   98, 0x000000009E3779B1ULL, 0xB2889379EAD9C5CFULL }, /* XSUM_XXH64_testdata[197] */\n    {   99, 0x0000000000000000ULL, 0xB51CB5BA2957AB0BULL }, /* XSUM_XXH64_testdata[198] */\n    {   99, 0x000000009E3779B1ULL, 0x5C10E54DEC4B0FA9ULL }, /* XSUM_XXH64_testdata[199] */\n    {  100, 0x0000000000000000ULL, 0x4BFE019CD91D9EA4ULL }, /* XSUM_XXH64_testdata[200] */\n    {  100, 0x000000009E3779B1ULL, 0x4853706DC9625CAEULL }, /* XSUM_XXH64_testdata[201] */\n    {  101, 0x0000000000000000ULL, 0xA51EA2101B2D114CULL }, /* XSUM_XXH64_testdata[202] */\n    {  101, 0x000000009E3779B1ULL, 0x6B38A5BBBA1F049CULL }, /* XSUM_XXH64_testdata[203] */\n    {  102, 0x0000000000000000ULL, 0x26259500AD475ACFULL }, /* XSUM_XXH64_testdata[204] */\n    {  102, 0x000000009E3779B1ULL, 0x6CDC4C9926C04118ULL }, /* XSUM_XXH64_testdata[205] */\n    {  103, 0x0000000000000000ULL, 0x74A97F547BB8C845ULL }, /* XSUM_XXH64_testdata[206] */\n    {  103, 0x000000009E3779B1ULL, 0x6A027096FB146E74ULL }, /* XSUM_XXH64_testdata[207] */\n    {  104, 0x0000000000000000ULL, 0x23ED252F132DFA0FULL }, /* XSUM_XXH64_testdata[208] */\n    {  104, 0x000000009E3779B1ULL, 0x1683C40FE4F3EC6EULL }, /* XSUM_XXH64_testdata[209] */\n    {  105, 0x0000000000000000ULL, 0x1E03CFB52F4E43F2ULL }, /* XSUM_XXH64_testdata[210] */\n    {  105, 0x000000009E3779B1ULL, 0x8399AE3FAC887392ULL }, /* XSUM_XXH64_testdata[211] */\n    {  106, 0x0000000000000000ULL, 0xB3C7FBBF1E2E9E9FULL }, /* XSUM_XXH64_testdata[212] */\n    {  106, 0x000000009E3779B1ULL, 0x205158F71E4AD7DAULL }, /* XSUM_XXH64_testdata[213] */\n    {  107, 0x0000000000000000ULL, 0xC85AF48447573841ULL }, /* XSUM_XXH64_testdata[214] */\n    {  107, 0x000000009E3779B1ULL, 0x42BE4CF154BDCB6FULL }, /* XSUM_XXH64_testdata[215] */\n    {  108, 0x0000000000000000ULL, 0x395022FA4E7C679DULL }, /* XSUM_XXH64_testdata[216] */\n    {  108, 0x000000009E3779B1ULL, 0x76577A7F0C793723ULL }, /* XSUM_XXH64_testdata[217] */\n    {  109, 0x0000000000000000ULL, 0x931CE3A962248CB1ULL }, /* XSUM_XXH64_testdata[218] */\n    {  109, 0x000000009E3779B1ULL, 0x3F3AFDE1CBFB2D78ULL }, /* XSUM_XXH64_testdata[219] */\n    {  110, 0x0000000000000000ULL, 0x46A7A7126CE7D4E6ULL }, /* XSUM_XXH64_testdata[220] */\n    {  110, 0x000000009E3779B1ULL, 0x6CC264DBC30D3EDCULL }, /* XSUM_XXH64_testdata[221] */\n    {  111, 0x0000000000000000ULL, 0xB7AFFC461C9ECE18ULL }, /* XSUM_XXH64_testdata[222] */\n    {  111, 0x000000009E3779B1ULL, 0x7D83E9E9160317ECULL }, /* XSUM_XXH64_testdata[223] */\n    {  112, 0x0000000000000000ULL, 0xE5752EA6E2B34417ULL }, /* XSUM_XXH64_testdata[224] */\n    {  112, 0x000000009E3779B1ULL, 0xEECB8B56A5BD00DBULL }, /* XSUM_XXH64_testdata[225] */\n    {  113, 0x0000000000000000ULL, 0xFDA17FD84B50AD25ULL }, /* XSUM_XXH64_testdata[226] */\n    {  113, 0x000000009E3779B1ULL, 0x47E8C074796FD671ULL }, /* XSUM_XXH64_testdata[227] */\n    {  114, 0x0000000000000000ULL, 0x8751DAC0314381B6ULL }, /* XSUM_XXH64_testdata[228] */\n    {  114, 0x000000009E3779B1ULL, 0xB880FBDD4FB6B274ULL }, /* XSUM_XXH64_testdata[229] */\n    {  115, 0x0000000000000000ULL, 0xF7CB3E3DFCE93157ULL }, /* XSUM_XXH64_testdata[230] */\n    {  115, 0x000000009E3779B1ULL, 0x55033F2004F0E78CULL }, /* XSUM_XXH64_testdata[231] */\n    {  116, 0x0000000000000000ULL, 0x0A29AECEA5D8240FULL }, /* XSUM_XXH64_testdata[232] */\n    {  116, 0x000000009E3779B1ULL, 0xD85DE10D5AD4E0A2ULL }, /* XSUM_XXH64_testdata[233] */\n    {  117, 0x0000000000000000ULL, 0x6731FD15B033D86FULL }, /* XSUM_XXH64_testdata[234] */\n    {  117, 0x000000009E3779B1ULL, 0xFC63C52FB7E3C2F5ULL }, /* XSUM_XXH64_testdata[235] */\n    {  118, 0x0000000000000000ULL, 0x00BB7740D233CCA9ULL }, /* XSUM_XXH64_testdata[236] */\n    {  118, 0x000000009E3779B1ULL, 0x13B679C13A3D0514ULL }, /* XSUM_XXH64_testdata[237] */\n    {  119, 0x0000000000000000ULL, 0xC9577B1D5E99EADDULL }, /* XSUM_XXH64_testdata[238] */\n    {  119, 0x000000009E3779B1ULL, 0xF935B21C4FB17FA0ULL }, /* XSUM_XXH64_testdata[239] */\n    {  120, 0x0000000000000000ULL, 0x35E51D65936602F0ULL }, /* XSUM_XXH64_testdata[240] */\n    {  120, 0x000000009E3779B1ULL, 0x8F28106B8EDD0B62ULL }, /* XSUM_XXH64_testdata[241] */\n    {  121, 0x0000000000000000ULL, 0xD11761D6683C7490ULL }, /* XSUM_XXH64_testdata[242] */\n    {  121, 0x000000009E3779B1ULL, 0xE48065BAFEE225FFULL }, /* XSUM_XXH64_testdata[243] */\n    {  122, 0x0000000000000000ULL, 0xEC6AFA468D61B584ULL }, /* XSUM_XXH64_testdata[244] */\n    {  122, 0x000000009E3779B1ULL, 0x562C3376F70E4A29ULL }, /* XSUM_XXH64_testdata[245] */\n    {  123, 0x0000000000000000ULL, 0x147F4024677727ECULL }, /* XSUM_XXH64_testdata[246] */\n    {  123, 0x000000009E3779B1ULL, 0x4980EF3E9B77DC0CULL }, /* XSUM_XXH64_testdata[247] */\n    {  124, 0x0000000000000000ULL, 0x47FD33A91C14F035ULL }, /* XSUM_XXH64_testdata[248] */\n    {  124, 0x000000009E3779B1ULL, 0x89EEA88E5DFFEBBFULL }, /* XSUM_XXH64_testdata[249] */\n    {  125, 0x0000000000000000ULL, 0x7B385D8B837FAA3EULL }, /* XSUM_XXH64_testdata[250] */\n    {  125, 0x000000009E3779B1ULL, 0xFE949E5EF83C19B5ULL }, /* XSUM_XXH64_testdata[251] */\n    {  126, 0x0000000000000000ULL, 0xA0E5EC3ED6068228ULL }, /* XSUM_XXH64_testdata[252] */\n    {  126, 0x000000009E3779B1ULL, 0x27EDDF566EA1935CULL }, /* XSUM_XXH64_testdata[253] */\n    {  127, 0x0000000000000000ULL, 0x3C7A21119AA662B0ULL }, /* XSUM_XXH64_testdata[254] */\n    {  127, 0x000000009E3779B1ULL, 0xB0D6DC189C06CEEDULL }, /* XSUM_XXH64_testdata[255] */\n    {  128, 0x0000000000000000ULL, 0x90CA021457D96DC5ULL }, /* XSUM_XXH64_testdata[256] */\n    {  128, 0x000000009E3779B1ULL, 0xED9340A202BCD1CFULL }, /* XSUM_XXH64_testdata[257] */\n    {  129, 0x0000000000000000ULL, 0x41C280132D697ABAULL }, /* XSUM_XXH64_testdata[258] */\n    {  129, 0x000000009E3779B1ULL, 0x1668B87489935FF5ULL }, /* XSUM_XXH64_testdata[259] */\n    {  130, 0x0000000000000000ULL, 0xFCEB19904FA5852EULL }, /* XSUM_XXH64_testdata[260] */\n    {  130, 0x000000009E3779B1ULL, 0x531E7902F11E5233ULL }, /* XSUM_XXH64_testdata[261] */\n    {  131, 0x0000000000000000ULL, 0xA855AB9C545E3AA0ULL }, /* XSUM_XXH64_testdata[262] */\n    {  131, 0x000000009E3779B1ULL, 0x38EEF63349D48351ULL }, /* XSUM_XXH64_testdata[263] */\n    {  132, 0x0000000000000000ULL, 0x92FF5FE9DF03B47EULL }, /* XSUM_XXH64_testdata[264] */\n    {  132, 0x000000009E3779B1ULL, 0x25499A366A4F582AULL }, /* XSUM_XXH64_testdata[265] */\n    {  133, 0x0000000000000000ULL, 0xBEBABB79841EEFE3ULL }, /* XSUM_XXH64_testdata[266] */\n    {  133, 0x000000009E3779B1ULL, 0x086D173652FF2C7BULL }, /* XSUM_XXH64_testdata[267] */\n    {  134, 0x0000000000000000ULL, 0x83484B9261651B21ULL }, /* XSUM_XXH64_testdata[268] */\n    {  134, 0x000000009E3779B1ULL, 0xF6DF65E34A988A05ULL }, /* XSUM_XXH64_testdata[269] */\n    {  135, 0x0000000000000000ULL, 0x1FA13853B96095B6ULL }, /* XSUM_XXH64_testdata[270] */\n    {  135, 0x000000009E3779B1ULL, 0xAE76A9DBD7A050B5ULL }, /* XSUM_XXH64_testdata[271] */\n    {  136, 0x0000000000000000ULL, 0xDED15F1F9BA92FEFULL }, /* XSUM_XXH64_testdata[272] */\n    {  136, 0x000000009E3779B1ULL, 0xE0DC505D8B6C72AAULL }, /* XSUM_XXH64_testdata[273] */\n    {  137, 0x0000000000000000ULL, 0x413F6647912DD2EAULL }, /* XSUM_XXH64_testdata[274] */\n    {  137, 0x000000009E3779B1ULL, 0x49402EC5661AF438ULL }, /* XSUM_XXH64_testdata[275] */\n    {  138, 0x0000000000000000ULL, 0xBF93F15916B89700ULL }, /* XSUM_XXH64_testdata[276] */\n    {  138, 0x000000009E3779B1ULL, 0x5C8B85C8837C3FF6ULL }, /* XSUM_XXH64_testdata[277] */\n    {  139, 0x0000000000000000ULL, 0x9B4FD36F05521437ULL }, /* XSUM_XXH64_testdata[278] */\n    {  139, 0x000000009E3779B1ULL, 0x1A2A4E33EEA8A6CCULL }, /* XSUM_XXH64_testdata[279] */\n    {  140, 0x0000000000000000ULL, 0xAF1F8B36AFE6DF4FULL }, /* XSUM_XXH64_testdata[280] */\n    {  140, 0x000000009E3779B1ULL, 0xA001BF8A9FA78B49ULL }, /* XSUM_XXH64_testdata[281] */\n    {  141, 0x0000000000000000ULL, 0x6948F778B10726CBULL }, /* XSUM_XXH64_testdata[282] */\n    {  141, 0x000000009E3779B1ULL, 0x357064D8FE34DE45ULL }, /* XSUM_XXH64_testdata[283] */\n    {  142, 0x0000000000000000ULL, 0x57DE58AC79A084E8ULL }, /* XSUM_XXH64_testdata[284] */\n    {  142, 0x000000009E3779B1ULL, 0xBF0781313D72D5E8ULL }, /* XSUM_XXH64_testdata[285] */\n    {  143, 0x0000000000000000ULL, 0xD2CA0115A4F272AAULL }, /* XSUM_XXH64_testdata[286] */\n    {  143, 0x000000009E3779B1ULL, 0x7529563A8C6AAAD6ULL }, /* XSUM_XXH64_testdata[287] */\n    {  144, 0x0000000000000000ULL, 0x47999F1F28EC88A6ULL }, /* XSUM_XXH64_testdata[288] */\n    {  144, 0x000000009E3779B1ULL, 0x2221C4C0807FE0F4ULL }, /* XSUM_XXH64_testdata[289] */\n    {  145, 0x0000000000000000ULL, 0x18F519801BB62003ULL }, /* XSUM_XXH64_testdata[290] */\n    {  145, 0x000000009E3779B1ULL, 0x98022684CD4C5A22ULL }, /* XSUM_XXH64_testdata[291] */\n    {  146, 0x0000000000000000ULL, 0x15C761F415F97578ULL }, /* XSUM_XXH64_testdata[292] */\n    {  146, 0x000000009E3779B1ULL, 0xB193B77D0F63741CULL }, /* XSUM_XXH64_testdata[293] */\n    {  147, 0x0000000000000000ULL, 0x4BA2A072E1FF588FULL }, /* XSUM_XXH64_testdata[294] */\n    {  147, 0x000000009E3779B1ULL, 0xBF8E502C905E18F7ULL }, /* XSUM_XXH64_testdata[295] */\n    {  148, 0x0000000000000000ULL, 0xF2E4CB94F60F07D2ULL }, /* XSUM_XXH64_testdata[296] */\n    {  148, 0x000000009E3779B1ULL, 0x7838B9B817007E06ULL }, /* XSUM_XXH64_testdata[297] */\n    {  149, 0x0000000000000000ULL, 0xAFBD86DEE66EFE56ULL }, /* XSUM_XXH64_testdata[298] */\n    {  149, 0x000000009E3779B1ULL, 0xC39859A0DE79A89BULL }, /* XSUM_XXH64_testdata[299] */\n    {  150, 0x0000000000000000ULL, 0xC1B4E21FDB2FECE6ULL }, /* XSUM_XXH64_testdata[300] */\n    {  150, 0x000000009E3779B1ULL, 0xF1B1B1CDDB38FFC7ULL }, /* XSUM_XXH64_testdata[301] */\n    {  151, 0x0000000000000000ULL, 0x4DDEA4A0F2AA9CF8ULL }, /* XSUM_XXH64_testdata[302] */\n    {  151, 0x000000009E3779B1ULL, 0xDA1F611EB1C2BE56ULL }, /* XSUM_XXH64_testdata[303] */\n    {  152, 0x0000000000000000ULL, 0x62A15F4D530A7EA5ULL }, /* XSUM_XXH64_testdata[304] */\n    {  152, 0x000000009E3779B1ULL, 0x2F0F73C639D3BAB3ULL }, /* XSUM_XXH64_testdata[305] */\n    {  153, 0x0000000000000000ULL, 0x9B84F22525275E62ULL }, /* XSUM_XXH64_testdata[306] */\n    {  153, 0x000000009E3779B1ULL, 0x335D15302C3E1B23ULL }, /* XSUM_XXH64_testdata[307] */\n    {  154, 0x0000000000000000ULL, 0x2EEB0441C9451B1FULL }, /* XSUM_XXH64_testdata[308] */\n    {  154, 0x000000009E3779B1ULL, 0x97C17A5309E528DDULL }, /* XSUM_XXH64_testdata[309] */\n    {  155, 0x0000000000000000ULL, 0x1DE7F80736C5FD1FULL }, /* XSUM_XXH64_testdata[310] */\n    {  155, 0x000000009E3779B1ULL, 0x122D55162B11AA70ULL }, /* XSUM_XXH64_testdata[311] */\n    {  156, 0x0000000000000000ULL, 0x73745EC8FDABF21CULL }, /* XSUM_XXH64_testdata[312] */\n    {  156, 0x000000009E3779B1ULL, 0x4B29B9C80C11731EULL }, /* XSUM_XXH64_testdata[313] */\n    {  157, 0x0000000000000000ULL, 0x8A2890AE42E4DBC0ULL }, /* XSUM_XXH64_testdata[314] */\n    {  157, 0x000000009E3779B1ULL, 0x606C98DA0FFF5E99ULL }, /* XSUM_XXH64_testdata[315] */\n    {  158, 0x0000000000000000ULL, 0x6B4F62CFF8A43B80ULL }, /* XSUM_XXH64_testdata[316] */\n    {  158, 0x000000009E3779B1ULL, 0x71974C55ACE70505ULL }, /* XSUM_XXH64_testdata[317] */\n    {  159, 0x0000000000000000ULL, 0x5E02EFAF7ACDF19CULL }, /* XSUM_XXH64_testdata[318] */\n    {  159, 0x000000009E3779B1ULL, 0x0981A09CBBBEADFDULL }, /* XSUM_XXH64_testdata[319] */\n    {  160, 0x0000000000000000ULL, 0x5B11EFE8DE350A3BULL }, /* XSUM_XXH64_testdata[320] */\n    {  160, 0x000000009E3779B1ULL, 0x96C22CBA2A6BC16FULL }, /* XSUM_XXH64_testdata[321] */\n    {  161, 0x0000000000000000ULL, 0xAD813CA7B0D54781ULL }, /* XSUM_XXH64_testdata[322] */\n    {  161, 0x000000009E3779B1ULL, 0xF782F5A5F3183FC5ULL }, /* XSUM_XXH64_testdata[323] */\n    {  162, 0x0000000000000000ULL, 0xD2EC094A8B3CA48FULL }, /* XSUM_XXH64_testdata[324] */\n    {  162, 0x000000009E3779B1ULL, 0x6DE21A60EE5C4ED9ULL }, /* XSUM_XXH64_testdata[325] */\n    {  163, 0x0000000000000000ULL, 0x4BF3D48D5ACBF6ACULL }, /* XSUM_XXH64_testdata[326] */\n    {  163, 0x000000009E3779B1ULL, 0x3A4037A4F77B80F7ULL }, /* XSUM_XXH64_testdata[327] */\n    {  164, 0x0000000000000000ULL, 0xE41F05B876F996E6ULL }, /* XSUM_XXH64_testdata[328] */\n    {  164, 0x000000009E3779B1ULL, 0xDF59454C354263C0ULL }, /* XSUM_XXH64_testdata[329] */\n    {  165, 0x0000000000000000ULL, 0x46C8500698B33143ULL }, /* XSUM_XXH64_testdata[330] */\n    {  165, 0x000000009E3779B1ULL, 0xE61470FE106DAEB6ULL }, /* XSUM_XXH64_testdata[331] */\n    {  166, 0x0000000000000000ULL, 0x1FF837B89DFF74C6ULL }, /* XSUM_XXH64_testdata[332] */\n    {  166, 0x000000009E3779B1ULL, 0x35EF16A3CAB6DBD8ULL }, /* XSUM_XXH64_testdata[333] */\n    {  167, 0x0000000000000000ULL, 0x8A9FE53D0989B9DBULL }, /* XSUM_XXH64_testdata[334] */\n    {  167, 0x000000009E3779B1ULL, 0xF09AA4A5D0C8946AULL }, /* XSUM_XXH64_testdata[335] */\n    {  168, 0x0000000000000000ULL, 0x1AED20C477BA590AULL }, /* XSUM_XXH64_testdata[336] */\n    {  168, 0x000000009E3779B1ULL, 0xC4AF5415867E8187ULL }, /* XSUM_XXH64_testdata[337] */\n    {  169, 0x0000000000000000ULL, 0x5678A561F39E4B7FULL }, /* XSUM_XXH64_testdata[338] */\n    {  169, 0x000000009E3779B1ULL, 0x79174EB2FCB8E1B5ULL }, /* XSUM_XXH64_testdata[339] */\n    {  170, 0x0000000000000000ULL, 0x07BC9808A99E91CCULL }, /* XSUM_XXH64_testdata[340] */\n    {  170, 0x000000009E3779B1ULL, 0xA34F995ABD6E23E9ULL }, /* XSUM_XXH64_testdata[341] */\n    {  171, 0x0000000000000000ULL, 0x1A1E7EFCFC5A377FULL }, /* XSUM_XXH64_testdata[342] */\n    {  171, 0x000000009E3779B1ULL, 0xD47735EC5421D191ULL }, /* XSUM_XXH64_testdata[343] */\n    {  172, 0x0000000000000000ULL, 0x625449E505BB4352ULL }, /* XSUM_XXH64_testdata[344] */\n    {  172, 0x000000009E3779B1ULL, 0xCBB1E8F887B1A5E1ULL }, /* XSUM_XXH64_testdata[345] */\n    {  173, 0x0000000000000000ULL, 0x16D6028DF84F9C3FULL }, /* XSUM_XXH64_testdata[346] */\n    {  173, 0x000000009E3779B1ULL, 0xB0635E32B423501EULL }, /* XSUM_XXH64_testdata[347] */\n    {  174, 0x0000000000000000ULL, 0x10902519949F206EULL }, /* XSUM_XXH64_testdata[348] */\n    {  174, 0x000000009E3779B1ULL, 0xC39AFB66FBA93BE8ULL }, /* XSUM_XXH64_testdata[349] */\n    {  175, 0x0000000000000000ULL, 0x8B8F04B20E8F9322ULL }, /* XSUM_XXH64_testdata[350] */\n    {  175, 0x000000009E3779B1ULL, 0xD54B025F1F25CBA5ULL }, /* XSUM_XXH64_testdata[351] */\n    {  176, 0x0000000000000000ULL, 0xDF9F79B4EA272F55ULL }, /* XSUM_XXH64_testdata[352] */\n    {  176, 0x000000009E3779B1ULL, 0xBEB6CC6C04783A4DULL }, /* XSUM_XXH64_testdata[353] */\n    {  177, 0x0000000000000000ULL, 0x05E8B1B61DBD0B71ULL }, /* XSUM_XXH64_testdata[354] */\n    {  177, 0x000000009E3779B1ULL, 0xD71F05251A958C88ULL }, /* XSUM_XXH64_testdata[355] */\n    {  178, 0x0000000000000000ULL, 0xA046B4F8050FF19FULL }, /* XSUM_XXH64_testdata[356] */\n    {  178, 0x000000009E3779B1ULL, 0xF01A6ADA9BB9BB7FULL }, /* XSUM_XXH64_testdata[357] */\n    {  179, 0x0000000000000000ULL, 0xC3C9B9967B78F65EULL }, /* XSUM_XXH64_testdata[358] */\n    {  179, 0x000000009E3779B1ULL, 0x1766738809D8F120ULL }, /* XSUM_XXH64_testdata[359] */\n    {  180, 0x0000000000000000ULL, 0x07557C6E01438898ULL }, /* XSUM_XXH64_testdata[360] */\n    {  180, 0x000000009E3779B1ULL, 0xFFE5FEAB5B3B9BFDULL }, /* XSUM_XXH64_testdata[361] */\n    {  181, 0x0000000000000000ULL, 0x8EB6B9EA889592E4ULL }, /* XSUM_XXH64_testdata[362] */\n    {  181, 0x000000009E3779B1ULL, 0x1CB0DBF962768311ULL }, /* XSUM_XXH64_testdata[363] */\n    {  182, 0x0000000000000000ULL, 0xB563B680EAF93D1CULL }, /* XSUM_XXH64_testdata[364] */\n    {  182, 0x000000009E3779B1ULL, 0x8096F4E5CDAB3BA8ULL }, /* XSUM_XXH64_testdata[365] */\n    {  183, 0x0000000000000000ULL, 0xDC0A598546EEF8D5ULL }, /* XSUM_XXH64_testdata[366] */\n    {  183, 0x000000009E3779B1ULL, 0x6FE275B936FF8655ULL }, /* XSUM_XXH64_testdata[367] */\n    {  184, 0x0000000000000000ULL, 0x3DEAE67F2AF3D038ULL }, /* XSUM_XXH64_testdata[368] */\n    {  184, 0x000000009E3779B1ULL, 0xBF37C0A167A2A840ULL }, /* XSUM_XXH64_testdata[369] */\n    {  185, 0x0000000000000000ULL, 0xDFF0E8388895A23EULL }, /* XSUM_XXH64_testdata[370] */\n    {  185, 0x000000009E3779B1ULL, 0x36B6AF6C692E8CB9ULL }, /* XSUM_XXH64_testdata[371] */\n    {  186, 0x0000000000000000ULL, 0x984EF85C5A5328F2ULL }, /* XSUM_XXH64_testdata[372] */\n    {  186, 0x000000009E3779B1ULL, 0x2245AB8648BF626AULL }, /* XSUM_XXH64_testdata[373] */\n    {  187, 0x0000000000000000ULL, 0xFDAD135D4A190C32ULL }, /* XSUM_XXH64_testdata[374] */\n    {  187, 0x000000009E3779B1ULL, 0xD5C57A08C7C4BD87ULL }, /* XSUM_XXH64_testdata[375] */\n    {  188, 0x0000000000000000ULL, 0x891447ACCCE59C8AULL }, /* XSUM_XXH64_testdata[376] */\n    {  188, 0x000000009E3779B1ULL, 0xFC5497CD2A840F45ULL }, /* XSUM_XXH64_testdata[377] */\n    {  189, 0x0000000000000000ULL, 0x3C44BB5E8E0B8C55ULL }, /* XSUM_XXH64_testdata[378] */\n    {  189, 0x000000009E3779B1ULL, 0x918834CE94A648BAULL }, /* XSUM_XXH64_testdata[379] */\n    {  190, 0x0000000000000000ULL, 0xA6479C9DDC0E5E00ULL }, /* XSUM_XXH64_testdata[380] */\n    {  190, 0x000000009E3779B1ULL, 0x6A01F0D349AAD4D3ULL }, /* XSUM_XXH64_testdata[381] */\n    {  191, 0x0000000000000000ULL, 0xF8329DA3AD4249E8ULL }, /* XSUM_XXH64_testdata[382] */\n    {  191, 0x000000009E3779B1ULL, 0xE9CCF0337B2F9F6CULL }, /* XSUM_XXH64_testdata[383] */\n    {  192, 0x0000000000000000ULL, 0xB76A434AC1E4768BULL }, /* XSUM_XXH64_testdata[384] */\n    {  192, 0x000000009E3779B1ULL, 0xC12D08F273988FD5ULL }, /* XSUM_XXH64_testdata[385] */\n    {  193, 0x0000000000000000ULL, 0x2CDF52488C4A2F81ULL }, /* XSUM_XXH64_testdata[386] */\n    {  193, 0x000000009E3779B1ULL, 0x863D55C54A8D3ED1ULL }, /* XSUM_XXH64_testdata[387] */\n    {  194, 0x0000000000000000ULL, 0x46A382CC7B5D8281ULL }, /* XSUM_XXH64_testdata[388] */\n    {  194, 0x000000009E3779B1ULL, 0xFD7645CA691DFB7DULL }, /* XSUM_XXH64_testdata[389] */\n    {  195, 0x0000000000000000ULL, 0x52B73ECDB3EF30E4ULL }, /* XSUM_XXH64_testdata[390] */\n    {  195, 0x000000009E3779B1ULL, 0x9159A6288CD2ED9CULL }, /* XSUM_XXH64_testdata[391] */\n    {  196, 0x0000000000000000ULL, 0xEB9ACBEFC9258D5CULL }, /* XSUM_XXH64_testdata[392] */\n    {  196, 0x000000009E3779B1ULL, 0x935F16E68F6BD8EDULL }, /* XSUM_XXH64_testdata[393] */\n    {  197, 0x0000000000000000ULL, 0x3356A9D81CFB5929ULL }, /* XSUM_XXH64_testdata[394] */\n    {  197, 0x000000009E3779B1ULL, 0xDDAB613134C2333BULL }, /* XSUM_XXH64_testdata[395] */\n    {  198, 0x0000000000000000ULL, 0xE781C3C6402BEA01ULL }, /* XSUM_XXH64_testdata[396] */\n    {  198, 0x000000009E3779B1ULL, 0xF453BBAFAC16D837ULL }, /* XSUM_XXH64_testdata[397] */\n    {  199, 0x0000000000000000ULL, 0xE37FEF4496509A87ULL }, /* XSUM_XXH64_testdata[398] */\n    {  199, 0x000000009E3779B1ULL, 0xCC30E66C6A06D8F7ULL }, /* XSUM_XXH64_testdata[399] */\n    {  200, 0x0000000000000000ULL, 0x4D863378A2052D65ULL }, /* XSUM_XXH64_testdata[400] */\n    {  200, 0x000000009E3779B1ULL, 0x254AF7CA5C98A77EULL }, /* XSUM_XXH64_testdata[401] */\n    {  201, 0x0000000000000000ULL, 0xF24E8A1EFDFF290CULL }, /* XSUM_XXH64_testdata[402] */\n    {  201, 0x000000009E3779B1ULL, 0xB8D8C9E545CE2F59ULL }, /* XSUM_XXH64_testdata[403] */\n    {  202, 0x0000000000000000ULL, 0x5C98EE8DFA4EFCBFULL }, /* XSUM_XXH64_testdata[404] */\n    {  202, 0x000000009E3779B1ULL, 0x46517A8D9B9B7E59ULL }, /* XSUM_XXH64_testdata[405] */\n    {  203, 0x0000000000000000ULL, 0x836063377C48824AULL }, /* XSUM_XXH64_testdata[406] */\n    {  203, 0x000000009E3779B1ULL, 0x190AF984AAAAF457ULL }, /* XSUM_XXH64_testdata[407] */\n    {  204, 0x0000000000000000ULL, 0xAAB407230B8C829CULL }, /* XSUM_XXH64_testdata[408] */\n    {  204, 0x000000009E3779B1ULL, 0x8649C4337A9C12D8ULL }, /* XSUM_XXH64_testdata[409] */\n    {  205, 0x0000000000000000ULL, 0xAFA6E4AA2AE03314ULL }, /* XSUM_XXH64_testdata[410] */\n    {  205, 0x000000009E3779B1ULL, 0xFDB87A419B4094E3ULL }, /* XSUM_XXH64_testdata[411] */\n    {  206, 0x0000000000000000ULL, 0xB258FED114D4FBE6ULL }, /* XSUM_XXH64_testdata[412] */\n    {  206, 0x000000009E3779B1ULL, 0x2D3CA3EE5D2578C4ULL }, /* XSUM_XXH64_testdata[413] */\n    {  207, 0x0000000000000000ULL, 0xC7054B982C73EB13ULL }, /* XSUM_XXH64_testdata[414] */\n    {  207, 0x000000009E3779B1ULL, 0x4E0E7EA5A365B668ULL }, /* XSUM_XXH64_testdata[415] */\n    {  208, 0x0000000000000000ULL, 0x9EB4B1067F96C311ULL }, /* XSUM_XXH64_testdata[416] */\n    {  208, 0x000000009E3779B1ULL, 0x0DD3A0B6D0D0B379ULL }, /* XSUM_XXH64_testdata[417] */\n    {  209, 0x0000000000000000ULL, 0x7344195C54279951ULL }, /* XSUM_XXH64_testdata[418] */\n    {  209, 0x000000009E3779B1ULL, 0xFBB6E34768AF7349ULL }, /* XSUM_XXH64_testdata[419] */\n    {  210, 0x0000000000000000ULL, 0x84812698B4B8BF44ULL }, /* XSUM_XXH64_testdata[420] */\n    {  210, 0x000000009E3779B1ULL, 0xC18DC56C45886E5DULL }, /* XSUM_XXH64_testdata[421] */\n    {  211, 0x0000000000000000ULL, 0x821B3108CD99A5A8ULL }, /* XSUM_XXH64_testdata[422] */\n    {  211, 0x000000009E3779B1ULL, 0x33019E48E1DAFCCCULL }, /* XSUM_XXH64_testdata[423] */\n    {  212, 0x0000000000000000ULL, 0x8E8E68151D5E419DULL }, /* XSUM_XXH64_testdata[424] */\n    {  212, 0x000000009E3779B1ULL, 0x6366BDDFF5532071ULL }, /* XSUM_XXH64_testdata[425] */\n    {  213, 0x0000000000000000ULL, 0xFD0B5E2A5921C14AULL }, /* XSUM_XXH64_testdata[426] */\n    {  213, 0x000000009E3779B1ULL, 0xA064370AB08A06A3ULL }, /* XSUM_XXH64_testdata[427] */\n    {  214, 0x0000000000000000ULL, 0x87FA20EB6126D0CCULL }, /* XSUM_XXH64_testdata[428] */\n    {  214, 0x000000009E3779B1ULL, 0xC98AF5F597B2D97EULL }, /* XSUM_XXH64_testdata[429] */\n    {  215, 0x0000000000000000ULL, 0xA38BDC1F221B4DDCULL }, /* XSUM_XXH64_testdata[430] */\n    {  215, 0x000000009E3779B1ULL, 0x6A97D20B094B06CAULL }, /* XSUM_XXH64_testdata[431] */\n    {  216, 0x0000000000000000ULL, 0xD997AAAE88AE9C5FULL }, /* XSUM_XXH64_testdata[432] */\n    {  216, 0x000000009E3779B1ULL, 0xCAAB4027894BCCB2ULL }, /* XSUM_XXH64_testdata[433] */\n    {  217, 0x0000000000000000ULL, 0x8E031800E9DE75D5ULL }, /* XSUM_XXH64_testdata[434] */\n    {  217, 0x000000009E3779B1ULL, 0x5C20B9E6594A579EULL }, /* XSUM_XXH64_testdata[435] */\n    {  218, 0x0000000000000000ULL, 0x2EE2208AE332E79DULL }, /* XSUM_XXH64_testdata[436] */\n    {  218, 0x000000009E3779B1ULL, 0xAAF5F7238DDF1EE6ULL }, /* XSUM_XXH64_testdata[437] */\n    {  219, 0x0000000000000000ULL, 0x21B874601A4DAC92ULL }, /* XSUM_XXH64_testdata[438] */\n    {  219, 0x000000009E3779B1ULL, 0x0DD13A547AAB12B7ULL }, /* XSUM_XXH64_testdata[439] */\n    {  220, 0x0000000000000000ULL, 0xB44A85B423E04207ULL }, /* XSUM_XXH64_testdata[440] */\n    {  220, 0x000000009E3779B1ULL, 0x959091592F4A6B26ULL }, /* XSUM_XXH64_testdata[441] */\n    {  221, 0x0000000000000000ULL, 0x7C8CB92ECFE982DCULL }, /* XSUM_XXH64_testdata[442] */\n    {  221, 0x000000009E3779B1ULL, 0xBE6B813AF6B8657CULL }, /* XSUM_XXH64_testdata[443] */\n    {  222, 0x0000000000000000ULL, 0xB641AE8CB691C174ULL }, /* XSUM_XXH64_testdata[444] */\n    {  222, 0x000000009E3779B1ULL, 0x20CB8AB7AE10C14AULL }, /* XSUM_XXH64_testdata[445] */\n    {  223, 0x0000000000000000ULL, 0x3204FA238CB7A119ULL }, /* XSUM_XXH64_testdata[446] */\n    {  223, 0x000000009E3779B1ULL, 0x6976AE81215D0A31ULL }, /* XSUM_XXH64_testdata[447] */\n    {  224, 0x0000000000000000ULL, 0x560A22F68D44BAA4ULL }, /* XSUM_XXH64_testdata[448] */\n    {  224, 0x000000009E3779B1ULL, 0xCE6601FBB696A3CBULL }, /* XSUM_XXH64_testdata[449] */\n    {  225, 0x0000000000000000ULL, 0x26034ED8D4CAE4DCULL }, /* XSUM_XXH64_testdata[450] */\n    {  225, 0x000000009E3779B1ULL, 0x7721221845330B35ULL }, /* XSUM_XXH64_testdata[451] */\n    {  226, 0x0000000000000000ULL, 0x6C44B98E3A56766FULL }, /* XSUM_XXH64_testdata[452] */\n    {  226, 0x000000009E3779B1ULL, 0xBA55D8AAECB6D3F7ULL }, /* XSUM_XXH64_testdata[453] */\n    {  227, 0x0000000000000000ULL, 0x84D9943F84B3F48CULL }, /* XSUM_XXH64_testdata[454] */\n    {  227, 0x000000009E3779B1ULL, 0xA1EA6FD991AB6CAFULL }, /* XSUM_XXH64_testdata[455] */\n    {  228, 0x0000000000000000ULL, 0x07FBF61C952C73A0ULL }, /* XSUM_XXH64_testdata[456] */\n    {  228, 0x000000009E3779B1ULL, 0x2D1ADCE3A026DB2AULL }, /* XSUM_XXH64_testdata[457] */\n    {  229, 0x0000000000000000ULL, 0x7650089C595D1589ULL }, /* XSUM_XXH64_testdata[458] */\n    {  229, 0x000000009E3779B1ULL, 0x39EABB22FCAE07B7ULL }, /* XSUM_XXH64_testdata[459] */\n    {  230, 0x0000000000000000ULL, 0xA6E2C789AE523788ULL }, /* XSUM_XXH64_testdata[460] */\n    {  230, 0x000000009E3779B1ULL, 0x75964501197A7C29ULL }, /* XSUM_XXH64_testdata[461] */\n    {  231, 0x0000000000000000ULL, 0x1678FC0F21A2D189ULL }, /* XSUM_XXH64_testdata[462] */\n    {  231, 0x000000009E3779B1ULL, 0xC90DE1DD55859773ULL }, /* XSUM_XXH64_testdata[463] */\n    {  232, 0x0000000000000000ULL, 0x08837FC18CF9DC21ULL }, /* XSUM_XXH64_testdata[464] */\n    {  232, 0x000000009E3779B1ULL, 0x7ED72B5DAD65C52FULL }, /* XSUM_XXH64_testdata[465] */\n    {  233, 0x0000000000000000ULL, 0x2B8CBB3C1BE4B134ULL }, /* XSUM_XXH64_testdata[466] */\n    {  233, 0x000000009E3779B1ULL, 0x52A41D95CE99F400ULL }, /* XSUM_XXH64_testdata[467] */\n    {  234, 0x0000000000000000ULL, 0x48502CC375AEDE41ULL }, /* XSUM_XXH64_testdata[468] */\n    {  234, 0x000000009E3779B1ULL, 0x2D3525D1960F2D21ULL }, /* XSUM_XXH64_testdata[469] */\n    {  235, 0x0000000000000000ULL, 0xC9136721158E47F6ULL }, /* XSUM_XXH64_testdata[470] */\n    {  235, 0x000000009E3779B1ULL, 0x777C310AFC011284ULL }, /* XSUM_XXH64_testdata[471] */\n    {  236, 0x0000000000000000ULL, 0x6252A7317AF95FD4ULL }, /* XSUM_XXH64_testdata[472] */\n    {  236, 0x000000009E3779B1ULL, 0xD4B0539A256E0DB4ULL }, /* XSUM_XXH64_testdata[473] */\n    {  237, 0x0000000000000000ULL, 0x6FD0AAE0666C5A27ULL }, /* XSUM_XXH64_testdata[474] */\n    {  237, 0x000000009E3779B1ULL, 0x23E7D04D7E99A2B7ULL }, /* XSUM_XXH64_testdata[475] */\n    {  238, 0x0000000000000000ULL, 0x0C2CE719985CD28CULL }, /* XSUM_XXH64_testdata[476] */\n    {  238, 0x000000009E3779B1ULL, 0xCD34C05EA95F2F61ULL }, /* XSUM_XXH64_testdata[477] */\n    {  239, 0x0000000000000000ULL, 0xB93713464372DA03ULL }, /* XSUM_XXH64_testdata[478] */\n    {  239, 0x000000009E3779B1ULL, 0x4BFC609CBFAEED9BULL }, /* XSUM_XXH64_testdata[479] */\n    {  240, 0x0000000000000000ULL, 0xB81838D483BAEE53ULL }, /* XSUM_XXH64_testdata[480] */\n    {  240, 0x000000009E3779B1ULL, 0xA4B3F965B6FE67F8ULL }, /* XSUM_XXH64_testdata[481] */\n    {  241, 0x0000000000000000ULL, 0x95D76C8B4D8FC4D6ULL }, /* XSUM_XXH64_testdata[482] */\n    {  241, 0x000000009E3779B1ULL, 0x19D5AD5F4BD6CB9FULL }, /* XSUM_XXH64_testdata[483] */\n    {  242, 0x0000000000000000ULL, 0xF90D9317A58AACCAULL }, /* XSUM_XXH64_testdata[484] */\n    {  242, 0x000000009E3779B1ULL, 0x2B3D64CA68F954F6ULL }, /* XSUM_XXH64_testdata[485] */\n    {  243, 0x0000000000000000ULL, 0xDA027E06C3DAAC3FULL }, /* XSUM_XXH64_testdata[486] */\n    {  243, 0x000000009E3779B1ULL, 0xD36ED0285CC2C704ULL }, /* XSUM_XXH64_testdata[487] */\n    {  244, 0x0000000000000000ULL, 0x3DA619F5D6E8F158ULL }, /* XSUM_XXH64_testdata[488] */\n    {  244, 0x000000009E3779B1ULL, 0x10CD0F2DB5B8EDFFULL }, /* XSUM_XXH64_testdata[489] */\n    {  245, 0x0000000000000000ULL, 0x711082146B76E24FULL }, /* XSUM_XXH64_testdata[490] */\n    {  245, 0x000000009E3779B1ULL, 0xD24594468B28F2D1ULL }, /* XSUM_XXH64_testdata[491] */\n    {  246, 0x0000000000000000ULL, 0x598FBCF46F00187FULL }, /* XSUM_XXH64_testdata[492] */\n    {  246, 0x000000009E3779B1ULL, 0xBE543D6D5301F479ULL }, /* XSUM_XXH64_testdata[493] */\n    {  247, 0x0000000000000000ULL, 0x9E1B0082378B40CDULL }, /* XSUM_XXH64_testdata[494] */\n    {  247, 0x000000009E3779B1ULL, 0x1CC20CEC10C69CE0ULL }, /* XSUM_XXH64_testdata[495] */\n    {  248, 0x0000000000000000ULL, 0x6C8D0BD0802CEE09ULL }, /* XSUM_XXH64_testdata[496] */\n    {  248, 0x000000009E3779B1ULL, 0xE4E00E9C08E9D9BEULL }, /* XSUM_XXH64_testdata[497] */\n    {  249, 0x0000000000000000ULL, 0x902EECCB98DB38D7ULL }, /* XSUM_XXH64_testdata[498] */\n    {  249, 0x000000009E3779B1ULL, 0x826F17162AAE3546ULL }, /* XSUM_XXH64_testdata[499] */\n    {  250, 0x0000000000000000ULL, 0x98733C2D429FF9EEULL }, /* XSUM_XXH64_testdata[500] */\n    {  250, 0x000000009E3779B1ULL, 0xC00A5A94ADD5C591ULL }, /* XSUM_XXH64_testdata[501] */\n    {  251, 0x0000000000000000ULL, 0xD278B54D9FEC3B13ULL }, /* XSUM_XXH64_testdata[502] */\n    {  251, 0x000000009E3779B1ULL, 0x22E6DA603138549CULL }, /* XSUM_XXH64_testdata[503] */\n    {  252, 0x0000000000000000ULL, 0x502316D885591F05ULL }, /* XSUM_XXH64_testdata[504] */\n    {  252, 0x000000009E3779B1ULL, 0x365C19466B1CE6F6ULL }, /* XSUM_XXH64_testdata[505] */\n    {  253, 0x0000000000000000ULL, 0x4F27F34D5F7363B4ULL }, /* XSUM_XXH64_testdata[506] */\n    {  253, 0x000000009E3779B1ULL, 0x6598472FCB3C9FDDULL }, /* XSUM_XXH64_testdata[507] */\n    {  254, 0x0000000000000000ULL, 0xA8FA70BEAF15A0D5ULL }, /* XSUM_XXH64_testdata[508] */\n    {  254, 0x000000009E3779B1ULL, 0xA3D08118E33A36FBULL }, /* XSUM_XXH64_testdata[509] */\n    {  255, 0x0000000000000000ULL, 0xA80F35BB0DC8E3A7ULL }, /* XSUM_XXH64_testdata[510] */\n    {  255, 0x000000009E3779B1ULL, 0x8E7A59762640754FULL }, /* XSUM_XXH64_testdata[511] */\n    {  256, 0x0000000000000000ULL, 0x5E3F5BF94D574981ULL }, /* XSUM_XXH64_testdata[512] */\n    {  256, 0x000000009E3779B1ULL, 0x34733CBD9CC1B0D5ULL }, /* XSUM_XXH64_testdata[513] */\n    {  257, 0x0000000000000000ULL, 0xD36CF327DCF12221ULL }, /* XSUM_XXH64_testdata[514] */\n    {  257, 0x000000009E3779B1ULL, 0x0E59955420F8807BULL }, /* XSUM_XXH64_testdata[515] */\n    {  258, 0x0000000000000000ULL, 0x800D25DAF5B3E79DULL }, /* XSUM_XXH64_testdata[516] */\n    {  258, 0x000000009E3779B1ULL, 0xE72AEBE1FEAA93EEULL }, /* XSUM_XXH64_testdata[517] */\n    {  259, 0x0000000000000000ULL, 0x2099FA654952427CULL }, /* XSUM_XXH64_testdata[518] */\n    {  259, 0x000000009E3779B1ULL, 0xBB868FAB515A5C72ULL }, /* XSUM_XXH64_testdata[519] */\n    {  260, 0x0000000000000000ULL, 0xCF364A2C3982921FULL }, /* XSUM_XXH64_testdata[520] */\n    {  260, 0x000000009E3779B1ULL, 0x1731084B861DFD5DULL }, /* XSUM_XXH64_testdata[521] */\n    {  261, 0x0000000000000000ULL, 0x97105F1DC4406772ULL }, /* XSUM_XXH64_testdata[522] */\n    {  261, 0x000000009E3779B1ULL, 0xC8574A38FBEA058EULL }, /* XSUM_XXH64_testdata[523] */\n    {  262, 0x0000000000000000ULL, 0xE71A640DCC730EC5ULL }, /* XSUM_XXH64_testdata[524] */\n    {  262, 0x000000009E3779B1ULL, 0x7F76151B92A28B07ULL }, /* XSUM_XXH64_testdata[525] */\n    {  263, 0x0000000000000000ULL, 0xB872B62D16AE5FEEULL }, /* XSUM_XXH64_testdata[526] */\n    {  263, 0x000000009E3779B1ULL, 0x9E8A8BAC522A967AULL }, /* XSUM_XXH64_testdata[527] */\n    {  264, 0x0000000000000000ULL, 0xC6937E5613AACCFEULL }, /* XSUM_XXH64_testdata[528] */\n    {  264, 0x000000009E3779B1ULL, 0x7FE5F28BAC9B0E91ULL }, /* XSUM_XXH64_testdata[529] */\n    {  265, 0x0000000000000000ULL, 0x12471155ADA2E18EULL }, /* XSUM_XXH64_testdata[530] */\n    {  265, 0x000000009E3779B1ULL, 0xBE1A23BB9138EE34ULL }, /* XSUM_XXH64_testdata[531] */\n    {  266, 0x0000000000000000ULL, 0x601C8089C5387DCEULL }, /* XSUM_XXH64_testdata[532] */\n    {  266, 0x000000009E3779B1ULL, 0xC462F2DD5F793449ULL }, /* XSUM_XXH64_testdata[533] */\n    {  267, 0x0000000000000000ULL, 0x1352BBD50D07866DULL }, /* XSUM_XXH64_testdata[534] */\n    {  267, 0x000000009E3779B1ULL, 0x234608404DFCB571ULL }, /* XSUM_XXH64_testdata[535] */\n    {  268, 0x0000000000000000ULL, 0x04882F6EC3504AEEULL }, /* XSUM_XXH64_testdata[536] */\n    {  268, 0x000000009E3779B1ULL, 0xC746A0D7B2CAFC8DULL }, /* XSUM_XXH64_testdata[537] */\n    {  269, 0x0000000000000000ULL, 0x663D2CCDC3DB5BC9ULL }, /* XSUM_XXH64_testdata[538] */\n    {  269, 0x000000009E3779B1ULL, 0x1939299519486F59ULL }, /* XSUM_XXH64_testdata[539] */\n    {  270, 0x0000000000000000ULL, 0x340E8B9B5C26CA95ULL }, /* XSUM_XXH64_testdata[540] */\n    {  270, 0x000000009E3779B1ULL, 0x877F54E49EC58468ULL }, /* XSUM_XXH64_testdata[541] */\n    {  271, 0x0000000000000000ULL, 0xB7BD56BC66F72DA9ULL }, /* XSUM_XXH64_testdata[542] */\n    {  271, 0x000000009E3779B1ULL, 0x54D0A98978531FFBULL }, /* XSUM_XXH64_testdata[543] */\n    {  272, 0x0000000000000000ULL, 0xF3977B31ADA68DD8ULL }, /* XSUM_XXH64_testdata[544] */\n    {  272, 0x000000009E3779B1ULL, 0x887F590222AD2734ULL }, /* XSUM_XXH64_testdata[545] */\n    {  273, 0x0000000000000000ULL, 0x2C18D3B96A486E0CULL }, /* XSUM_XXH64_testdata[546] */\n    {  273, 0x000000009E3779B1ULL, 0x8258EA6B5E58AB4BULL }, /* XSUM_XXH64_testdata[547] */\n    {  274, 0x0000000000000000ULL, 0x969C6033EE1AF2D4ULL }, /* XSUM_XXH64_testdata[548] */\n    {  274, 0x000000009E3779B1ULL, 0x9490360BADD540EEULL }, /* XSUM_XXH64_testdata[549] */\n    {  275, 0x0000000000000000ULL, 0x530A8F55ED7C10B3ULL }, /* XSUM_XXH64_testdata[550] */\n    {  275, 0x000000009E3779B1ULL, 0x73D1E106641AA053ULL }, /* XSUM_XXH64_testdata[551] */\n    {  276, 0x0000000000000000ULL, 0x5A25F6FF03024991ULL }, /* XSUM_XXH64_testdata[552] */\n    {  276, 0x000000009E3779B1ULL, 0x8AB6A691AE70F34DULL }, /* XSUM_XXH64_testdata[553] */\n    {  277, 0x0000000000000000ULL, 0xF3CA1E4C597206CCULL }, /* XSUM_XXH64_testdata[554] */\n    {  277, 0x000000009E3779B1ULL, 0x0798F4E8A10FCE28ULL }, /* XSUM_XXH64_testdata[555] */\n    {  278, 0x0000000000000000ULL, 0xCAAC375345392108ULL }, /* XSUM_XXH64_testdata[556] */\n    {  278, 0x000000009E3779B1ULL, 0x5DFF0C04C19ADF91ULL }, /* XSUM_XXH64_testdata[557] */\n    {  279, 0x0000000000000000ULL, 0xCF3E45285F4C5CA9ULL }, /* XSUM_XXH64_testdata[558] */\n    {  279, 0x000000009E3779B1ULL, 0xDFD2B2FF6DD9FB76ULL }, /* XSUM_XXH64_testdata[559] */\n    {  280, 0x0000000000000000ULL, 0xA41A5712EB1CC987ULL }, /* XSUM_XXH64_testdata[560] */\n    {  280, 0x000000009E3779B1ULL, 0xF2486AE97DF0E3CEULL }, /* XSUM_XXH64_testdata[561] */\n    {  281, 0x0000000000000000ULL, 0xED5A862D4541F940ULL }, /* XSUM_XXH64_testdata[562] */\n    {  281, 0x000000009E3779B1ULL, 0xABE603FE4B35C536ULL }, /* XSUM_XXH64_testdata[563] */\n    {  282, 0x0000000000000000ULL, 0xA867E8D706EBA08BULL }, /* XSUM_XXH64_testdata[564] */\n    {  282, 0x000000009E3779B1ULL, 0x33CA320204412931ULL }, /* XSUM_XXH64_testdata[565] */\n    {  283, 0x0000000000000000ULL, 0x10B0AA9588751826ULL }, /* XSUM_XXH64_testdata[566] */\n    {  283, 0x000000009E3779B1ULL, 0x6EB2D706DA6DFEECULL }, /* XSUM_XXH64_testdata[567] */\n    {  284, 0x0000000000000000ULL, 0x93AD619F2B351D3FULL }, /* XSUM_XXH64_testdata[568] */\n    {  284, 0x000000009E3779B1ULL, 0x9A2AFEB1654E116BULL }, /* XSUM_XXH64_testdata[569] */\n    {  285, 0x0000000000000000ULL, 0x7CD2577EA97A138AULL }, /* XSUM_XXH64_testdata[570] */\n    {  285, 0x000000009E3779B1ULL, 0xEC346D3CD94C94EFULL }, /* XSUM_XXH64_testdata[571] */\n    {  286, 0x0000000000000000ULL, 0x345637D13E12AE04ULL }, /* XSUM_XXH64_testdata[572] */\n    {  286, 0x000000009E3779B1ULL, 0x15CE12FB9BBEBCC3ULL }, /* XSUM_XXH64_testdata[573] */\n    {  287, 0x0000000000000000ULL, 0x92EFB98F22F668D0ULL }, /* XSUM_XXH64_testdata[574] */\n    {  287, 0x000000009E3779B1ULL, 0x0FB316B3FA8B793AULL }, /* XSUM_XXH64_testdata[575] */\n    {  288, 0x0000000000000000ULL, 0x319C1E822541C647ULL }, /* XSUM_XXH64_testdata[576] */\n    {  288, 0x000000009E3779B1ULL, 0x9787CAEFEC335434ULL }, /* XSUM_XXH64_testdata[577] */\n    {  289, 0x0000000000000000ULL, 0xF7E6D446C8EF7C47ULL }, /* XSUM_XXH64_testdata[578] */\n    {  289, 0x000000009E3779B1ULL, 0x4A0A6E963C092DA4ULL }, /* XSUM_XXH64_testdata[579] */\n    {  290, 0x0000000000000000ULL, 0x585D390D6FDEF06AULL }, /* XSUM_XXH64_testdata[580] */\n    {  290, 0x000000009E3779B1ULL, 0xC6B32828386DA2E9ULL }, /* XSUM_XXH64_testdata[581] */\n    {  291, 0x0000000000000000ULL, 0x21F05A66A9EB9A58ULL }, /* XSUM_XXH64_testdata[582] */\n    {  291, 0x000000009E3779B1ULL, 0xD00817CB66D5CB2DULL }, /* XSUM_XXH64_testdata[583] */\n    {  292, 0x0000000000000000ULL, 0xBC9224537B00F4B6ULL }, /* XSUM_XXH64_testdata[584] */\n    {  292, 0x000000009E3779B1ULL, 0xF733A843A9ACA128ULL }, /* XSUM_XXH64_testdata[585] */\n    {  293, 0x0000000000000000ULL, 0x5979A617929E48D0ULL }, /* XSUM_XXH64_testdata[586] */\n    {  293, 0x000000009E3779B1ULL, 0x7C1017B8E9589375ULL }, /* XSUM_XXH64_testdata[587] */\n    {  294, 0x0000000000000000ULL, 0x4946824DD663797AULL }, /* XSUM_XXH64_testdata[588] */\n    {  294, 0x000000009E3779B1ULL, 0x0488AC62F9398C6FULL }, /* XSUM_XXH64_testdata[589] */\n    {  295, 0x0000000000000000ULL, 0xD9AA3E6E5ED4D24DULL }, /* XSUM_XXH64_testdata[590] */\n    {  295, 0x000000009E3779B1ULL, 0x159CEEF3E08C94F6ULL }, /* XSUM_XXH64_testdata[591] */\n    {  296, 0x0000000000000000ULL, 0xCC06B4824EB0D11CULL }, /* XSUM_XXH64_testdata[592] */\n    {  296, 0x000000009E3779B1ULL, 0xDD5CE847198C7FE1ULL }, /* XSUM_XXH64_testdata[593] */\n    {  297, 0x0000000000000000ULL, 0x4DB8E56BE4E55AC4ULL }, /* XSUM_XXH64_testdata[594] */\n    {  297, 0x000000009E3779B1ULL, 0x5C053B0CD2FA23A8ULL }, /* XSUM_XXH64_testdata[595] */\n    {  298, 0x0000000000000000ULL, 0x694A1B6625D43319ULL }, /* XSUM_XXH64_testdata[596] */\n    {  298, 0x000000009E3779B1ULL, 0x9048FE0F555AC1A7ULL }, /* XSUM_XXH64_testdata[597] */\n    {  299, 0x0000000000000000ULL, 0xD2EB28971B0A6A92ULL }, /* XSUM_XXH64_testdata[598] */\n    {  299, 0x000000009E3779B1ULL, 0x46FB015EDC4F13CEULL }, /* XSUM_XXH64_testdata[599] */\n    {  300, 0x0000000000000000ULL, 0x27D0E073EC12824FULL }, /* XSUM_XXH64_testdata[600] */\n    {  300, 0x000000009E3779B1ULL, 0x36CB189D9F3B6AD6ULL }, /* XSUM_XXH64_testdata[601] */\n    {  301, 0x0000000000000000ULL, 0xC30B134412F5070FULL }, /* XSUM_XXH64_testdata[602] */\n    {  301, 0x000000009E3779B1ULL, 0x779864C9F8A50F68ULL }, /* XSUM_XXH64_testdata[603] */\n    {  302, 0x0000000000000000ULL, 0x806071550D0D3FD1ULL }, /* XSUM_XXH64_testdata[604] */\n    {  302, 0x000000009E3779B1ULL, 0x56848E98C174FD5EULL }, /* XSUM_XXH64_testdata[605] */\n    {  303, 0x0000000000000000ULL, 0xAE4B7555B7E934ABULL }, /* XSUM_XXH64_testdata[606] */\n    {  303, 0x000000009E3779B1ULL, 0x8BE172D74D5D222EULL }, /* XSUM_XXH64_testdata[607] */\n    {  304, 0x0000000000000000ULL, 0xCD9F47E076057508ULL }, /* XSUM_XXH64_testdata[608] */\n    {  304, 0x000000009E3779B1ULL, 0x4CCFF45F9DEE4002ULL }, /* XSUM_XXH64_testdata[609] */\n    {  305, 0x0000000000000000ULL, 0xC254B8F12F935411ULL }, /* XSUM_XXH64_testdata[610] */\n    {  305, 0x000000009E3779B1ULL, 0x4D3FB6613D00FE12ULL }, /* XSUM_XXH64_testdata[611] */\n    {  306, 0x0000000000000000ULL, 0x8025085C29EA30FCULL }, /* XSUM_XXH64_testdata[612] */\n    {  306, 0x000000009E3779B1ULL, 0x75B4382E5391B03FULL }, /* XSUM_XXH64_testdata[613] */\n    {  307, 0x0000000000000000ULL, 0xD8F8D06F0951E5BEULL }, /* XSUM_XXH64_testdata[614] */\n    {  307, 0x000000009E3779B1ULL, 0xE6F3F862E8BBDA07ULL }, /* XSUM_XXH64_testdata[615] */\n    {  308, 0x0000000000000000ULL, 0xD77A53671A5277DDULL }, /* XSUM_XXH64_testdata[616] */\n    {  308, 0x000000009E3779B1ULL, 0xEFF507C34BD9988BULL }, /* XSUM_XXH64_testdata[617] */\n    {  309, 0x0000000000000000ULL, 0x165D2435E023D1C2ULL }, /* XSUM_XXH64_testdata[618] */\n    {  309, 0x000000009E3779B1ULL, 0x026DB09252D02941ULL }, /* XSUM_XXH64_testdata[619] */\n    {  310, 0x0000000000000000ULL, 0x58942C7734E43C86ULL }, /* XSUM_XXH64_testdata[620] */\n    {  310, 0x000000009E3779B1ULL, 0xEA5278E0A3CF506FULL }, /* XSUM_XXH64_testdata[621] */\n    {  311, 0x0000000000000000ULL, 0xF09F13BD4FB740EBULL }, /* XSUM_XXH64_testdata[622] */\n    {  311, 0x000000009E3779B1ULL, 0x9D3738BA96BB04F3ULL }, /* XSUM_XXH64_testdata[623] */\n    {  312, 0x0000000000000000ULL, 0xE183DB6F48250246ULL }, /* XSUM_XXH64_testdata[624] */\n    {  312, 0x000000009E3779B1ULL, 0x28FE2DF7C30D67C9ULL }, /* XSUM_XXH64_testdata[625] */\n    {  313, 0x0000000000000000ULL, 0x68A5156112811C33ULL }, /* XSUM_XXH64_testdata[626] */\n    {  313, 0x000000009E3779B1ULL, 0xDDC06A1B585C4789ULL }, /* XSUM_XXH64_testdata[627] */\n    {  314, 0x0000000000000000ULL, 0xA13A1BEC2CD910E4ULL }, /* XSUM_XXH64_testdata[628] */\n    {  314, 0x000000009E3779B1ULL, 0xBD6698A5440ABE1AULL }, /* XSUM_XXH64_testdata[629] */\n    {  315, 0x0000000000000000ULL, 0xCC2808E72EAC151BULL }, /* XSUM_XXH64_testdata[630] */\n    {  315, 0x000000009E3779B1ULL, 0x2746FA4F2A0F9416ULL }, /* XSUM_XXH64_testdata[631] */\n    {  316, 0x0000000000000000ULL, 0xAFBC014DCE3257E2ULL }, /* XSUM_XXH64_testdata[632] */\n    {  316, 0x000000009E3779B1ULL, 0x9BBD080ACAE33B5CULL }, /* XSUM_XXH64_testdata[633] */\n    {  317, 0x0000000000000000ULL, 0x4324504321847E60ULL }, /* XSUM_XXH64_testdata[634] */\n    {  317, 0x000000009E3779B1ULL, 0xEE59F87AF88DFE30ULL }, /* XSUM_XXH64_testdata[635] */\n    {  318, 0x0000000000000000ULL, 0x4CBA36B197D9BC3FULL }, /* XSUM_XXH64_testdata[636] */\n    {  318, 0x000000009E3779B1ULL, 0x1C789101AF5830C5ULL }, /* XSUM_XXH64_testdata[637] */\n    {  319, 0x0000000000000000ULL, 0x2AE10520FA6DE2E4ULL }, /* XSUM_XXH64_testdata[638] */\n    {  319, 0x000000009E3779B1ULL, 0x8410CB2FBE004576ULL }, /* XSUM_XXH64_testdata[639] */\n    {  320, 0x0000000000000000ULL, 0xE770CC78CD4C49D4ULL }, /* XSUM_XXH64_testdata[640] */\n    {  320, 0x000000009E3779B1ULL, 0x4652D88D496EE7ADULL }, /* XSUM_XXH64_testdata[641] */\n    {  321, 0x0000000000000000ULL, 0x191E5FAA4E98D58CULL }, /* XSUM_XXH64_testdata[642] */\n    {  321, 0x000000009E3779B1ULL, 0x3C28DB4679112EE5ULL }, /* XSUM_XXH64_testdata[643] */\n    {  322, 0x0000000000000000ULL, 0xA10BF168FB663D3EULL }, /* XSUM_XXH64_testdata[644] */\n    {  322, 0x000000009E3779B1ULL, 0x7606D121C819C6B6ULL }, /* XSUM_XXH64_testdata[645] */\n    {  323, 0x0000000000000000ULL, 0xD397D1291236CF7FULL }, /* XSUM_XXH64_testdata[646] */\n    {  323, 0x000000009E3779B1ULL, 0x1378631DC20BFF42ULL }, /* XSUM_XXH64_testdata[647] */\n    {  324, 0x0000000000000000ULL, 0x6E1A465CA0B8D8BEULL }, /* XSUM_XXH64_testdata[648] */\n    {  324, 0x000000009E3779B1ULL, 0xAFEF3035641946F9ULL }, /* XSUM_XXH64_testdata[649] */\n    {  325, 0x0000000000000000ULL, 0x966AC1912DA3CD24ULL }, /* XSUM_XXH64_testdata[650] */\n    {  325, 0x000000009E3779B1ULL, 0xD8AF365A4401EA55ULL }, /* XSUM_XXH64_testdata[651] */\n    {  326, 0x0000000000000000ULL, 0x3DE3C5C8F6E0A0A1ULL }, /* XSUM_XXH64_testdata[652] */\n    {  326, 0x000000009E3779B1ULL, 0x335FDF7E051D4A87ULL }, /* XSUM_XXH64_testdata[653] */\n    {  327, 0x0000000000000000ULL, 0xE8AE29289DA7F119ULL }, /* XSUM_XXH64_testdata[654] */\n    {  327, 0x000000009E3779B1ULL, 0x0F26E6096850CD15ULL }, /* XSUM_XXH64_testdata[655] */\n    {  328, 0x0000000000000000ULL, 0x4C35F169173D834CULL }, /* XSUM_XXH64_testdata[656] */\n    {  328, 0x000000009E3779B1ULL, 0x22762DF3D9B9DF31ULL }, /* XSUM_XXH64_testdata[657] */\n    {  329, 0x0000000000000000ULL, 0x5D481C44947F7A73ULL }, /* XSUM_XXH64_testdata[658] */\n    {  329, 0x000000009E3779B1ULL, 0x73E1E3B8E9F181BBULL }, /* XSUM_XXH64_testdata[659] */\n    {  330, 0x0000000000000000ULL, 0xC0A08CEF0DD56B16ULL }, /* XSUM_XXH64_testdata[660] */\n    {  330, 0x000000009E3779B1ULL, 0x6AA1FE1042A0F6A5ULL }, /* XSUM_XXH64_testdata[661] */\n    {  331, 0x0000000000000000ULL, 0x0D4449FCD664BB45ULL }, /* XSUM_XXH64_testdata[662] */\n    {  331, 0x000000009E3779B1ULL, 0x4296B5AEE7D960D4ULL }, /* XSUM_XXH64_testdata[663] */\n    {  332, 0x0000000000000000ULL, 0x7529CB2646E8601CULL }, /* XSUM_XXH64_testdata[664] */\n    {  332, 0x000000009E3779B1ULL, 0x70CDF1FAE1A878AFULL }, /* XSUM_XXH64_testdata[665] */\n    {  333, 0x0000000000000000ULL, 0x8CFBC1AF9BD2A321ULL }, /* XSUM_XXH64_testdata[666] */\n    {  333, 0x000000009E3779B1ULL, 0xF642F676F8CFF339ULL }, /* XSUM_XXH64_testdata[667] */\n    {  334, 0x0000000000000000ULL, 0x616AC7C331B6A379ULL }, /* XSUM_XXH64_testdata[668] */\n    {  334, 0x000000009E3779B1ULL, 0x8C29C7765F64AC97ULL }, /* XSUM_XXH64_testdata[669] */\n    {  335, 0x0000000000000000ULL, 0x5C3A4577DF83FB01ULL }, /* XSUM_XXH64_testdata[670] */\n    {  335, 0x000000009E3779B1ULL, 0x3CAD8492DFE500A4ULL }, /* XSUM_XXH64_testdata[671] */\n    {  336, 0x0000000000000000ULL, 0x0D0983F796109E3DULL }, /* XSUM_XXH64_testdata[672] */\n    {  336, 0x000000009E3779B1ULL, 0x06A6E12B6D47E200ULL }, /* XSUM_XXH64_testdata[673] */\n    {  337, 0x0000000000000000ULL, 0x375888A1F50EDEE0ULL }, /* XSUM_XXH64_testdata[674] */\n    {  337, 0x000000009E3779B1ULL, 0xBFF6310116784CE9ULL }, /* XSUM_XXH64_testdata[675] */\n    {  338, 0x0000000000000000ULL, 0xA9B57EAD56662EECULL }, /* XSUM_XXH64_testdata[676] */\n    {  338, 0x000000009E3779B1ULL, 0xEDFAA3154B5EE34BULL }, /* XSUM_XXH64_testdata[677] */\n    {  339, 0x0000000000000000ULL, 0x818B61D1D857C97DULL }, /* XSUM_XXH64_testdata[678] */\n    {  339, 0x000000009E3779B1ULL, 0x7B41B412D222608FULL }, /* XSUM_XXH64_testdata[679] */\n    {  340, 0x0000000000000000ULL, 0x2F55039F446BA2DFULL }, /* XSUM_XXH64_testdata[680] */\n    {  340, 0x000000009E3779B1ULL, 0x5EBDD5B7B6C5917BULL }, /* XSUM_XXH64_testdata[681] */\n    {  341, 0x0000000000000000ULL, 0x836263DF89FE557DULL }, /* XSUM_XXH64_testdata[682] */\n    {  341, 0x000000009E3779B1ULL, 0x12695533AB8FE708ULL }, /* XSUM_XXH64_testdata[683] */\n    {  342, 0x0000000000000000ULL, 0x4A9263DB83996FA5ULL }, /* XSUM_XXH64_testdata[684] */\n    {  342, 0x000000009E3779B1ULL, 0x0A34062AD2C76F1BULL }, /* XSUM_XXH64_testdata[685] */\n    {  343, 0x0000000000000000ULL, 0xE40DE98BA957A505ULL }, /* XSUM_XXH64_testdata[686] */\n    {  343, 0x000000009E3779B1ULL, 0x70506F583223C18CULL }, /* XSUM_XXH64_testdata[687] */\n    {  344, 0x0000000000000000ULL, 0x08DEF25D96644105ULL }, /* XSUM_XXH64_testdata[688] */\n    {  344, 0x000000009E3779B1ULL, 0x4D182E0D30243BFDULL }, /* XSUM_XXH64_testdata[689] */\n    {  345, 0x0000000000000000ULL, 0x430A1250DDCFD26AULL }, /* XSUM_XXH64_testdata[690] */\n    {  345, 0x000000009E3779B1ULL, 0x767C2332AE03BF1BULL }, /* XSUM_XXH64_testdata[691] */\n    {  346, 0x0000000000000000ULL, 0x6DE8E7F8FC988E06ULL }, /* XSUM_XXH64_testdata[692] */\n    {  346, 0x000000009E3779B1ULL, 0x6F0B8A6C503A5982ULL }, /* XSUM_XXH64_testdata[693] */\n    {  347, 0x0000000000000000ULL, 0x6EBE56879F51960FULL }, /* XSUM_XXH64_testdata[694] */\n    {  347, 0x000000009E3779B1ULL, 0x05F00C77B7FBCBCEULL }, /* XSUM_XXH64_testdata[695] */\n    {  348, 0x0000000000000000ULL, 0xBCC17D27EF9C445AULL }, /* XSUM_XXH64_testdata[696] */\n    {  348, 0x000000009E3779B1ULL, 0xAE5F3DEE5E85E080ULL }, /* XSUM_XXH64_testdata[697] */\n    {  349, 0x0000000000000000ULL, 0x3B2F742FD0129AAEULL }, /* XSUM_XXH64_testdata[698] */\n    {  349, 0x000000009E3779B1ULL, 0xEF74A89286BBE7F9ULL }, /* XSUM_XXH64_testdata[699] */\n    {  350, 0x0000000000000000ULL, 0xCBF689D13535396EULL }, /* XSUM_XXH64_testdata[700] */\n    {  350, 0x000000009E3779B1ULL, 0x06E946C3CFEE32A7ULL }, /* XSUM_XXH64_testdata[701] */\n    {  351, 0x0000000000000000ULL, 0x5A8B9393DD9C54ECULL }, /* XSUM_XXH64_testdata[702] */\n    {  351, 0x000000009E3779B1ULL, 0x6A1E24082412D6A4ULL }, /* XSUM_XXH64_testdata[703] */\n    {  352, 0x0000000000000000ULL, 0x2C7A4C67DCF81AF3ULL }, /* XSUM_XXH64_testdata[704] */\n    {  352, 0x000000009E3779B1ULL, 0x2C5D8C15D3D96C34ULL }, /* XSUM_XXH64_testdata[705] */\n    {  353, 0x0000000000000000ULL, 0xDC132C498167B6C6ULL }, /* XSUM_XXH64_testdata[706] */\n    {  353, 0x000000009E3779B1ULL, 0x0DBF72487E53B8B6ULL }, /* XSUM_XXH64_testdata[707] */\n    {  354, 0x0000000000000000ULL, 0xA73CE21C9CC96F7DULL }, /* XSUM_XXH64_testdata[708] */\n    {  354, 0x000000009E3779B1ULL, 0x1904A79793369265ULL }, /* XSUM_XXH64_testdata[709] */\n    {  355, 0x0000000000000000ULL, 0xA7BCA484D8B42B9DULL }, /* XSUM_XXH64_testdata[710] */\n    {  355, 0x000000009E3779B1ULL, 0x96FBEA063C7BA4F2ULL }, /* XSUM_XXH64_testdata[711] */\n    {  356, 0x0000000000000000ULL, 0x361759F3E6F9EC99ULL }, /* XSUM_XXH64_testdata[712] */\n    {  356, 0x000000009E3779B1ULL, 0x64D86C055445C97AULL }, /* XSUM_XXH64_testdata[713] */\n    {  357, 0x0000000000000000ULL, 0x9BF1088365B88CA3ULL }, /* XSUM_XXH64_testdata[714] */\n    {  357, 0x000000009E3779B1ULL, 0xA2B5B2F58A05693FULL }, /* XSUM_XXH64_testdata[715] */\n    {  358, 0x0000000000000000ULL, 0x44AC7D4F4A0C26C8ULL }, /* XSUM_XXH64_testdata[716] */\n    {  358, 0x000000009E3779B1ULL, 0x3F397BE0323EA4E0ULL }, /* XSUM_XXH64_testdata[717] */\n    {  359, 0x0000000000000000ULL, 0x51C7C0F6CC75485FULL }, /* XSUM_XXH64_testdata[718] */\n    {  359, 0x000000009E3779B1ULL, 0x04B53C70E8DBCC8BULL }, /* XSUM_XXH64_testdata[719] */\n    {  360, 0x0000000000000000ULL, 0x312CECE43F5ACA33ULL }, /* XSUM_XXH64_testdata[720] */\n    {  360, 0x000000009E3779B1ULL, 0x9AA901719AEEE25EULL }, /* XSUM_XXH64_testdata[721] */\n    {  361, 0x0000000000000000ULL, 0xA2B589598EFBBD69ULL }, /* XSUM_XXH64_testdata[722] */\n    {  361, 0x000000009E3779B1ULL, 0xC2CD9A769996D0E0ULL }, /* XSUM_XXH64_testdata[723] */\n    {  362, 0x0000000000000000ULL, 0x04E4833AF8933BDAULL }, /* XSUM_XXH64_testdata[724] */\n    {  362, 0x000000009E3779B1ULL, 0xE6B3E1DCCA12DF05ULL }, /* XSUM_XXH64_testdata[725] */\n    {  363, 0x0000000000000000ULL, 0xC84FCB24B5A21862ULL }, /* XSUM_XXH64_testdata[726] */\n    {  363, 0x000000009E3779B1ULL, 0x4B89934B473558EBULL }, /* XSUM_XXH64_testdata[727] */\n    {  364, 0x0000000000000000ULL, 0xF7471F5A29253EF2ULL }, /* XSUM_XXH64_testdata[728] */\n    {  364, 0x000000009E3779B1ULL, 0x6CEBAFE4C3BDCD21ULL }, /* XSUM_XXH64_testdata[729] */\n    {  365, 0x0000000000000000ULL, 0xC97282DCCFD2AC9EULL }, /* XSUM_XXH64_testdata[730] */\n    {  365, 0x000000009E3779B1ULL, 0xFFA92422FC37582DULL }, /* XSUM_XXH64_testdata[731] */\n    {  366, 0x0000000000000000ULL, 0x34ADF90A87D9BB7DULL }, /* XSUM_XXH64_testdata[732] */\n    {  366, 0x000000009E3779B1ULL, 0xAE168FF3C354DA52ULL }, /* XSUM_XXH64_testdata[733] */\n    {  367, 0x0000000000000000ULL, 0x3865884F1F2DBBB2ULL }, /* XSUM_XXH64_testdata[734] */\n    {  367, 0x000000009E3779B1ULL, 0x32B6B3F002D03F45ULL }, /* XSUM_XXH64_testdata[735] */\n    {  368, 0x0000000000000000ULL, 0xCEBBEF4F781C4FAEULL }, /* XSUM_XXH64_testdata[736] */\n    {  368, 0x000000009E3779B1ULL, 0x48BB98F0956C5C45ULL }, /* XSUM_XXH64_testdata[737] */\n    {  369, 0x0000000000000000ULL, 0x218BE4022357C2C5ULL }, /* XSUM_XXH64_testdata[738] */\n    {  369, 0x000000009E3779B1ULL, 0x506B06A33BB769A2ULL }, /* XSUM_XXH64_testdata[739] */\n    {  370, 0x0000000000000000ULL, 0xD0B8F04E8CB45BE2ULL }, /* XSUM_XXH64_testdata[740] */\n    {  370, 0x000000009E3779B1ULL, 0xD6681A2EE58347F9ULL }, /* XSUM_XXH64_testdata[741] */\n    {  371, 0x0000000000000000ULL, 0x21D5DF5AFD923E04ULL }, /* XSUM_XXH64_testdata[742] */\n    {  371, 0x000000009E3779B1ULL, 0xF1749A54F9A73D6FULL }, /* XSUM_XXH64_testdata[743] */\n    {  372, 0x0000000000000000ULL, 0xA1169572F334E450ULL }, /* XSUM_XXH64_testdata[744] */\n    {  372, 0x000000009E3779B1ULL, 0x23B8C35AD1D75D48ULL }, /* XSUM_XXH64_testdata[745] */\n    {  373, 0x0000000000000000ULL, 0x4BD2BB4765F571B7ULL }, /* XSUM_XXH64_testdata[746] */\n    {  373, 0x000000009E3779B1ULL, 0xD65A00D88A0E022AULL }, /* XSUM_XXH64_testdata[747] */\n    {  374, 0x0000000000000000ULL, 0x278416509AB11649ULL }, /* XSUM_XXH64_testdata[748] */\n    {  374, 0x000000009E3779B1ULL, 0x59BE56940BF9E73DULL }, /* XSUM_XXH64_testdata[749] */\n    {  375, 0x0000000000000000ULL, 0xA2F864D1E63B240AULL }, /* XSUM_XXH64_testdata[750] */\n    {  375, 0x000000009E3779B1ULL, 0x04D060D22C824ED2ULL }, /* XSUM_XXH64_testdata[751] */\n    {  376, 0x0000000000000000ULL, 0xC4DCB1D27FDE7788ULL }, /* XSUM_XXH64_testdata[752] */\n    {  376, 0x000000009E3779B1ULL, 0x0AD31776E94CBA79ULL }, /* XSUM_XXH64_testdata[753] */\n    {  377, 0x0000000000000000ULL, 0xC2F3DB934411070CULL }, /* XSUM_XXH64_testdata[754] */\n    {  377, 0x000000009E3779B1ULL, 0xC28025FBB8DFD75DULL }, /* XSUM_XXH64_testdata[755] */\n    {  378, 0x0000000000000000ULL, 0x0FDAEA3335593148ULL }, /* XSUM_XXH64_testdata[756] */\n    {  378, 0x000000009E3779B1ULL, 0xAECA4BDA06ED5D61ULL }, /* XSUM_XXH64_testdata[757] */\n    {  379, 0x0000000000000000ULL, 0x3175159612EA7796ULL }, /* XSUM_XXH64_testdata[758] */\n    {  379, 0x000000009E3779B1ULL, 0xE9376AFDEF694BEEULL }, /* XSUM_XXH64_testdata[759] */\n    {  380, 0x0000000000000000ULL, 0xF1C40441D14C95A5ULL }, /* XSUM_XXH64_testdata[760] */\n    {  380, 0x000000009E3779B1ULL, 0x1D7886AF1856F4B6ULL }, /* XSUM_XXH64_testdata[761] */\n    {  381, 0x0000000000000000ULL, 0x9B98BE37385CEB7BULL }, /* XSUM_XXH64_testdata[762] */\n    {  381, 0x000000009E3779B1ULL, 0xE57C93942ADF4947ULL }, /* XSUM_XXH64_testdata[763] */\n    {  382, 0x0000000000000000ULL, 0x31BFA4652E07BEB8ULL }, /* XSUM_XXH64_testdata[764] */\n    {  382, 0x000000009E3779B1ULL, 0x805635A220015E23ULL }, /* XSUM_XXH64_testdata[765] */\n    {  383, 0x0000000000000000ULL, 0xE612E19B7CC4D5ABULL }, /* XSUM_XXH64_testdata[766] */\n    {  383, 0x000000009E3779B1ULL, 0xDEF132C77950801EULL }, /* XSUM_XXH64_testdata[767] */\n    {  384, 0x0000000000000000ULL, 0xE0EFB85215C71C09ULL }, /* XSUM_XXH64_testdata[768] */\n    {  384, 0x000000009E3779B1ULL, 0x0A7FF923C9D036CDULL }, /* XSUM_XXH64_testdata[769] */\n    {  385, 0x0000000000000000ULL, 0xAEFC22C7F317BF44ULL }, /* XSUM_XXH64_testdata[770] */\n    {  385, 0x000000009E3779B1ULL, 0xE071B502D2531E63ULL }, /* XSUM_XXH64_testdata[771] */\n    {  386, 0x0000000000000000ULL, 0x21346B0FA207752DULL }, /* XSUM_XXH64_testdata[772] */\n    {  386, 0x000000009E3779B1ULL, 0x295A64CDEA6E786AULL }, /* XSUM_XXH64_testdata[773] */\n    {  387, 0x0000000000000000ULL, 0x7853D7E6049A5157ULL }, /* XSUM_XXH64_testdata[774] */\n    {  387, 0x000000009E3779B1ULL, 0xB6C4FCDAF2B28B72ULL }, /* XSUM_XXH64_testdata[775] */\n    {  388, 0x0000000000000000ULL, 0x0D44D47A8B8E172CULL }, /* XSUM_XXH64_testdata[776] */\n    {  388, 0x000000009E3779B1ULL, 0xF56543F493851BB7ULL }, /* XSUM_XXH64_testdata[777] */\n    {  389, 0x0000000000000000ULL, 0xBFCF76A043BEE0E5ULL }, /* XSUM_XXH64_testdata[778] */\n    {  389, 0x000000009E3779B1ULL, 0x48AEE947021D9686ULL }, /* XSUM_XXH64_testdata[779] */\n    {  390, 0x0000000000000000ULL, 0xFEB1F719F2BA4419ULL }, /* XSUM_XXH64_testdata[780] */\n    {  390, 0x000000009E3779B1ULL, 0x8A90FB918044D765ULL }, /* XSUM_XXH64_testdata[781] */\n    {  391, 0x0000000000000000ULL, 0x0B48DCCB968D6FB3ULL }, /* XSUM_XXH64_testdata[782] */\n    {  391, 0x000000009E3779B1ULL, 0x4E3EA393AECE6242ULL }, /* XSUM_XXH64_testdata[783] */\n    {  392, 0x0000000000000000ULL, 0x6ACEAB40DD45ECCDULL }, /* XSUM_XXH64_testdata[784] */\n    {  392, 0x000000009E3779B1ULL, 0x7E79892276BB1BA3ULL }, /* XSUM_XXH64_testdata[785] */\n    {  393, 0x0000000000000000ULL, 0xDB6C617D44B49B81ULL }, /* XSUM_XXH64_testdata[786] */\n    {  393, 0x000000009E3779B1ULL, 0x734D33A4E578EA33ULL }, /* XSUM_XXH64_testdata[787] */\n    {  394, 0x0000000000000000ULL, 0xD38D57BE8C1EFF36ULL }, /* XSUM_XXH64_testdata[788] */\n    {  394, 0x000000009E3779B1ULL, 0xF131EC2E96911189ULL }, /* XSUM_XXH64_testdata[789] */\n    {  395, 0x0000000000000000ULL, 0x55006129C21598FEULL }, /* XSUM_XXH64_testdata[790] */\n    {  395, 0x000000009E3779B1ULL, 0x01E693808CD6B787ULL }, /* XSUM_XXH64_testdata[791] */\n    {  396, 0x0000000000000000ULL, 0xDBBD4E2B7C59BEDBULL }, /* XSUM_XXH64_testdata[792] */\n    {  396, 0x000000009E3779B1ULL, 0x66A1F230AB0C46B7ULL }, /* XSUM_XXH64_testdata[793] */\n    {  397, 0x0000000000000000ULL, 0x2C92852B92663F53ULL }, /* XSUM_XXH64_testdata[794] */\n    {  397, 0x000000009E3779B1ULL, 0xC0B250BE62D42F4DULL }, /* XSUM_XXH64_testdata[795] */\n    {  398, 0x0000000000000000ULL, 0x9BD8C1E03800118DULL }, /* XSUM_XXH64_testdata[796] */\n    {  398, 0x000000009E3779B1ULL, 0x29CBE4CF16F108FBULL }, /* XSUM_XXH64_testdata[797] */\n    {  399, 0x0000000000000000ULL, 0xE7760069A9415F4FULL }, /* XSUM_XXH64_testdata[798] */\n    {  399, 0x000000009E3779B1ULL, 0x7F3C35AE058EED4CULL }, /* XSUM_XXH64_testdata[799] */\n    {  400, 0x0000000000000000ULL, 0x4581242DB7868377ULL }, /* XSUM_XXH64_testdata[800] */\n    {  400, 0x000000009E3779B1ULL, 0xE3D38D3FDE215586ULL }, /* XSUM_XXH64_testdata[801] */\n    {  401, 0x0000000000000000ULL, 0xE297524B7CD2F598ULL }, /* XSUM_XXH64_testdata[802] */\n    {  401, 0x000000009E3779B1ULL, 0x81A7F82E9D6D490CULL }, /* XSUM_XXH64_testdata[803] */\n    {  402, 0x0000000000000000ULL, 0xD479FDBC4B4D4793ULL }, /* XSUM_XXH64_testdata[804] */\n    {  402, 0x000000009E3779B1ULL, 0xFB789B6F1DB92E25ULL }, /* XSUM_XXH64_testdata[805] */\n    {  403, 0x0000000000000000ULL, 0xD99858FEE82283DFULL }, /* XSUM_XXH64_testdata[806] */\n    {  403, 0x000000009E3779B1ULL, 0xF66589734AD3CF7EULL }, /* XSUM_XXH64_testdata[807] */\n    {  404, 0x0000000000000000ULL, 0x404C0164C810B890ULL }, /* XSUM_XXH64_testdata[808] */\n    {  404, 0x000000009E3779B1ULL, 0x21DF4FB8D1B99324ULL }, /* XSUM_XXH64_testdata[809] */\n    {  405, 0x0000000000000000ULL, 0x0173F6874E867210ULL }, /* XSUM_XXH64_testdata[810] */\n    {  405, 0x000000009E3779B1ULL, 0x145D25DD60D253B9ULL }, /* XSUM_XXH64_testdata[811] */\n    {  406, 0x0000000000000000ULL, 0x68C576ADB1EBE2A3ULL }, /* XSUM_XXH64_testdata[812] */\n    {  406, 0x000000009E3779B1ULL, 0xFF2169289AA10522ULL }, /* XSUM_XXH64_testdata[813] */\n    {  407, 0x0000000000000000ULL, 0x6B44FA7F771A2E3EULL }, /* XSUM_XXH64_testdata[814] */\n    {  407, 0x000000009E3779B1ULL, 0x72664ECE337B7043ULL }, /* XSUM_XXH64_testdata[815] */\n    {  408, 0x0000000000000000ULL, 0xDD7E906896FDE2F9ULL }, /* XSUM_XXH64_testdata[816] */\n    {  408, 0x000000009E3779B1ULL, 0x7BCE9F34F477DBE1ULL }, /* XSUM_XXH64_testdata[817] */\n    {  409, 0x0000000000000000ULL, 0x51B9F33A8AF1319AULL }, /* XSUM_XXH64_testdata[818] */\n    {  409, 0x000000009E3779B1ULL, 0x75ABF9D8FB23947EULL }, /* XSUM_XXH64_testdata[819] */\n    {  410, 0x0000000000000000ULL, 0x9CD79D8A4344916BULL }, /* XSUM_XXH64_testdata[820] */\n    {  410, 0x000000009E3779B1ULL, 0x1243A2C29B5721AEULL }, /* XSUM_XXH64_testdata[821] */\n    {  411, 0x0000000000000000ULL, 0x40CE5A49AC1C190BULL }, /* XSUM_XXH64_testdata[822] */\n    {  411, 0x000000009E3779B1ULL, 0x01ECCE7208EC5F51ULL }, /* XSUM_XXH64_testdata[823] */\n    {  412, 0x0000000000000000ULL, 0x8EA0FA92E59FC1F1ULL }, /* XSUM_XXH64_testdata[824] */\n    {  412, 0x000000009E3779B1ULL, 0x24E0A17C768CB4FDULL }, /* XSUM_XXH64_testdata[825] */\n    {  413, 0x0000000000000000ULL, 0x091E8C2D14A662E0ULL }, /* XSUM_XXH64_testdata[826] */\n    {  413, 0x000000009E3779B1ULL, 0xB47F5C5528F3F634ULL }, /* XSUM_XXH64_testdata[827] */\n    {  414, 0x0000000000000000ULL, 0x00E32E71E9EF3717ULL }, /* XSUM_XXH64_testdata[828] */\n    {  414, 0x000000009E3779B1ULL, 0x759D6135223861C1ULL }, /* XSUM_XXH64_testdata[829] */\n    {  415, 0x0000000000000000ULL, 0xD21126D6F7FF3852ULL }, /* XSUM_XXH64_testdata[830] */\n    {  415, 0x000000009E3779B1ULL, 0x7AA162EC31C286EDULL }, /* XSUM_XXH64_testdata[831] */\n    {  416, 0x0000000000000000ULL, 0x7319F2B5C775AB3EULL }, /* XSUM_XXH64_testdata[832] */\n    {  416, 0x000000009E3779B1ULL, 0xD21E77D8AC120FFFULL }, /* XSUM_XXH64_testdata[833] */\n    {  417, 0x0000000000000000ULL, 0xF0DEB8D5833F3556ULL }, /* XSUM_XXH64_testdata[834] */\n    {  417, 0x000000009E3779B1ULL, 0x71F0FCA245F29550ULL }, /* XSUM_XXH64_testdata[835] */\n    {  418, 0x0000000000000000ULL, 0x3E6400FE386BF36FULL }, /* XSUM_XXH64_testdata[836] */\n    {  418, 0x000000009E3779B1ULL, 0x099A003EAD1CA662ULL }, /* XSUM_XXH64_testdata[837] */\n    {  419, 0x0000000000000000ULL, 0x46DCEAFF1EBC6577ULL }, /* XSUM_XXH64_testdata[838] */\n    {  419, 0x000000009E3779B1ULL, 0x45C133F35B871816ULL }, /* XSUM_XXH64_testdata[839] */\n    {  420, 0x0000000000000000ULL, 0x6127CB28225B3CB6ULL }, /* XSUM_XXH64_testdata[840] */\n    {  420, 0x000000009E3779B1ULL, 0x1D53D6AD66E9F1C3ULL }, /* XSUM_XXH64_testdata[841] */\n    {  421, 0x0000000000000000ULL, 0xCA87D1BA12B8D930ULL }, /* XSUM_XXH64_testdata[842] */\n    {  421, 0x000000009E3779B1ULL, 0x11F62E4EBE932275ULL }, /* XSUM_XXH64_testdata[843] */\n    {  422, 0x0000000000000000ULL, 0xFED2A07192168432ULL }, /* XSUM_XXH64_testdata[844] */\n    {  422, 0x000000009E3779B1ULL, 0x7455916DCEFBACE1ULL }, /* XSUM_XXH64_testdata[845] */\n    {  423, 0x0000000000000000ULL, 0x41196C0E245B0D9CULL }, /* XSUM_XXH64_testdata[846] */\n    {  423, 0x000000009E3779B1ULL, 0xD90B0BAFE79A67C5ULL }, /* XSUM_XXH64_testdata[847] */\n    {  424, 0x0000000000000000ULL, 0xDBA935092D6CC79FULL }, /* XSUM_XXH64_testdata[848] */\n    {  424, 0x000000009E3779B1ULL, 0xF2FDF5EADABD6ECCULL }, /* XSUM_XXH64_testdata[849] */\n    {  425, 0x0000000000000000ULL, 0x63655D005F220917ULL }, /* XSUM_XXH64_testdata[850] */\n    {  425, 0x000000009E3779B1ULL, 0x0B7A33C49D258122ULL }, /* XSUM_XXH64_testdata[851] */\n    {  426, 0x0000000000000000ULL, 0x42368F69311633D2ULL }, /* XSUM_XXH64_testdata[852] */\n    {  426, 0x000000009E3779B1ULL, 0x73A1B6D645252287ULL }, /* XSUM_XXH64_testdata[853] */\n    {  427, 0x0000000000000000ULL, 0x791554672DB58205ULL }, /* XSUM_XXH64_testdata[854] */\n    {  427, 0x000000009E3779B1ULL, 0x3D739071089B6F16ULL }, /* XSUM_XXH64_testdata[855] */\n    {  428, 0x0000000000000000ULL, 0xCE86BADA84179A50ULL }, /* XSUM_XXH64_testdata[856] */\n    {  428, 0x000000009E3779B1ULL, 0xA71BA1A04BACABC6ULL }, /* XSUM_XXH64_testdata[857] */\n    {  429, 0x0000000000000000ULL, 0x1B142012B60D624BULL }, /* XSUM_XXH64_testdata[858] */\n    {  429, 0x000000009E3779B1ULL, 0x9D9EF3D9162F92E8ULL }, /* XSUM_XXH64_testdata[859] */\n    {  430, 0x0000000000000000ULL, 0xFF2A20FBA8523036ULL }, /* XSUM_XXH64_testdata[860] */\n    {  430, 0x000000009E3779B1ULL, 0x8CCFAFAA584CF34DULL }, /* XSUM_XXH64_testdata[861] */\n    {  431, 0x0000000000000000ULL, 0x4F9F87B4591B0FBBULL }, /* XSUM_XXH64_testdata[862] */\n    {  431, 0x000000009E3779B1ULL, 0xE09B6C699939EFA2ULL }, /* XSUM_XXH64_testdata[863] */\n    {  432, 0x0000000000000000ULL, 0xF6D48B6DF8091F1EULL }, /* XSUM_XXH64_testdata[864] */\n    {  432, 0x000000009E3779B1ULL, 0x7C99553C30148610ULL }, /* XSUM_XXH64_testdata[865] */\n    {  433, 0x0000000000000000ULL, 0xF94E03AA24E6CF00ULL }, /* XSUM_XXH64_testdata[866] */\n    {  433, 0x000000009E3779B1ULL, 0x94EFD2E9E10439A9ULL }, /* XSUM_XXH64_testdata[867] */\n    {  434, 0x0000000000000000ULL, 0xF8E9464218ECE1B1ULL }, /* XSUM_XXH64_testdata[868] */\n    {  434, 0x000000009E3779B1ULL, 0x1CAA675030E23E0AULL }, /* XSUM_XXH64_testdata[869] */\n    {  435, 0x0000000000000000ULL, 0x945E7FFC4F72CB7AULL }, /* XSUM_XXH64_testdata[870] */\n    {  435, 0x000000009E3779B1ULL, 0x016819919A72D6D1ULL }, /* XSUM_XXH64_testdata[871] */\n    {  436, 0x0000000000000000ULL, 0xE5FF7BE5AD6B2401ULL }, /* XSUM_XXH64_testdata[872] */\n    {  436, 0x000000009E3779B1ULL, 0x7B600C69E72AEB87ULL }, /* XSUM_XXH64_testdata[873] */\n    {  437, 0x0000000000000000ULL, 0x378488B2F434ECCFULL }, /* XSUM_XXH64_testdata[874] */\n    {  437, 0x000000009E3779B1ULL, 0xF2BAF2947B71BEACULL }, /* XSUM_XXH64_testdata[875] */\n    {  438, 0x0000000000000000ULL, 0xAB608A8B906F7B02ULL }, /* XSUM_XXH64_testdata[876] */\n    {  438, 0x000000009E3779B1ULL, 0xD452A1154FFB4456ULL }, /* XSUM_XXH64_testdata[877] */\n    {  439, 0x0000000000000000ULL, 0x7AB6E12E2A2073FBULL }, /* XSUM_XXH64_testdata[878] */\n    {  439, 0x000000009E3779B1ULL, 0x89F275B2098CA649ULL }, /* XSUM_XXH64_testdata[879] */\n    {  440, 0x0000000000000000ULL, 0x01F8A9639790AC66ULL }, /* XSUM_XXH64_testdata[880] */\n    {  440, 0x000000009E3779B1ULL, 0x765CB9BD0A0B4968ULL }, /* XSUM_XXH64_testdata[881] */\n    {  441, 0x0000000000000000ULL, 0x8579DB651855FC52ULL }, /* XSUM_XXH64_testdata[882] */\n    {  441, 0x000000009E3779B1ULL, 0xD696CA959FC01D27ULL }, /* XSUM_XXH64_testdata[883] */\n    {  442, 0x0000000000000000ULL, 0xCB4348957960911AULL }, /* XSUM_XXH64_testdata[884] */\n    {  442, 0x000000009E3779B1ULL, 0x2E64B87578774199ULL }, /* XSUM_XXH64_testdata[885] */\n    {  443, 0x0000000000000000ULL, 0xD1F4906E8D06391EULL }, /* XSUM_XXH64_testdata[886] */\n    {  443, 0x000000009E3779B1ULL, 0x00B7AB143869613FULL }, /* XSUM_XXH64_testdata[887] */\n    {  444, 0x0000000000000000ULL, 0xA2DFAE5D5A67884FULL }, /* XSUM_XXH64_testdata[888] */\n    {  444, 0x000000009E3779B1ULL, 0x70857EC5BC9AEB3CULL }, /* XSUM_XXH64_testdata[889] */\n    {  445, 0x0000000000000000ULL, 0x6646E1735503A3C0ULL }, /* XSUM_XXH64_testdata[890] */\n    {  445, 0x000000009E3779B1ULL, 0xD9C49B6909F3636EULL }, /* XSUM_XXH64_testdata[891] */\n    {  446, 0x0000000000000000ULL, 0x8F03204478ACAF49ULL }, /* XSUM_XXH64_testdata[892] */\n    {  446, 0x000000009E3779B1ULL, 0x2FF81F47418A77F5ULL }, /* XSUM_XXH64_testdata[893] */\n    {  447, 0x0000000000000000ULL, 0x0EDC27091B085A82ULL }, /* XSUM_XXH64_testdata[894] */\n    {  447, 0x000000009E3779B1ULL, 0x135DE1C596499D0CULL }, /* XSUM_XXH64_testdata[895] */\n    {  448, 0x0000000000000000ULL, 0x465FBDC140F3780FULL }, /* XSUM_XXH64_testdata[896] */\n    {  448, 0x000000009E3779B1ULL, 0xCCAD9E903167223EULL }, /* XSUM_XXH64_testdata[897] */\n    {  449, 0x0000000000000000ULL, 0x51E2A5C66C3C7345ULL }, /* XSUM_XXH64_testdata[898] */\n    {  449, 0x000000009E3779B1ULL, 0x27B78EE3D6A73779ULL }, /* XSUM_XXH64_testdata[899] */\n    {  450, 0x0000000000000000ULL, 0x83D7FA2D0551B412ULL }, /* XSUM_XXH64_testdata[900] */\n    {  450, 0x000000009E3779B1ULL, 0x008C6A8908F2EDF3ULL }, /* XSUM_XXH64_testdata[901] */\n    {  451, 0x0000000000000000ULL, 0xABAFD3ABA227706EULL }, /* XSUM_XXH64_testdata[902] */\n    {  451, 0x000000009E3779B1ULL, 0x7F3B2B83DA239881ULL }, /* XSUM_XXH64_testdata[903] */\n    {  452, 0x0000000000000000ULL, 0x10F4E85F0D32CA78ULL }, /* XSUM_XXH64_testdata[904] */\n    {  452, 0x000000009E3779B1ULL, 0xD870BB8743C029F1ULL }, /* XSUM_XXH64_testdata[905] */\n    {  453, 0x0000000000000000ULL, 0xD88E868BB3172267ULL }, /* XSUM_XXH64_testdata[906] */\n    {  453, 0x000000009E3779B1ULL, 0x5994B79B64070DC4ULL }, /* XSUM_XXH64_testdata[907] */\n    {  454, 0x0000000000000000ULL, 0x8F7ADE427C362DEAULL }, /* XSUM_XXH64_testdata[908] */\n    {  454, 0x000000009E3779B1ULL, 0x0D2D3FB152C5059DULL }, /* XSUM_XXH64_testdata[909] */\n    {  455, 0x0000000000000000ULL, 0x9DD51DD63505C82DULL }, /* XSUM_XXH64_testdata[910] */\n    {  455, 0x000000009E3779B1ULL, 0xC752BA5B462F513EULL }, /* XSUM_XXH64_testdata[911] */\n    {  456, 0x0000000000000000ULL, 0xD68678A01FBF1CEDULL }, /* XSUM_XXH64_testdata[912] */\n    {  456, 0x000000009E3779B1ULL, 0xCBCC6C108F790420ULL }, /* XSUM_XXH64_testdata[913] */\n    {  457, 0x0000000000000000ULL, 0x4A8DFA47A5243AB4ULL }, /* XSUM_XXH64_testdata[914] */\n    {  457, 0x000000009E3779B1ULL, 0x609D3971A15C7CABULL }, /* XSUM_XXH64_testdata[915] */\n    {  458, 0x0000000000000000ULL, 0x60216DC8DBBEB687ULL }, /* XSUM_XXH64_testdata[916] */\n    {  458, 0x000000009E3779B1ULL, 0x0EEF86168490597EULL }, /* XSUM_XXH64_testdata[917] */\n    {  459, 0x0000000000000000ULL, 0x7E52C5716A1E2461ULL }, /* XSUM_XXH64_testdata[918] */\n    {  459, 0x000000009E3779B1ULL, 0x96EFF1C70AD8F962ULL }, /* XSUM_XXH64_testdata[919] */\n    {  460, 0x0000000000000000ULL, 0xDADEE2B3BC9207F5ULL }, /* XSUM_XXH64_testdata[920] */\n    {  460, 0x000000009E3779B1ULL, 0x02FF311FBFE92500ULL }, /* XSUM_XXH64_testdata[921] */\n    {  461, 0x0000000000000000ULL, 0x0B96DB78FF730BC9ULL }, /* XSUM_XXH64_testdata[922] */\n    {  461, 0x000000009E3779B1ULL, 0x4F89125C297A641CULL }, /* XSUM_XXH64_testdata[923] */\n    {  462, 0x0000000000000000ULL, 0x600B43E4F562B855ULL }, /* XSUM_XXH64_testdata[924] */\n    {  462, 0x000000009E3779B1ULL, 0x9A01F7838C7E76C1ULL }, /* XSUM_XXH64_testdata[925] */\n    {  463, 0x0000000000000000ULL, 0xAF11D3DA14ECEA77ULL }, /* XSUM_XXH64_testdata[926] */\n    {  463, 0x000000009E3779B1ULL, 0xD3EC40A69FCC3A01ULL }, /* XSUM_XXH64_testdata[927] */\n    {  464, 0x0000000000000000ULL, 0x63F9939CAF710AB3ULL }, /* XSUM_XXH64_testdata[928] */\n    {  464, 0x000000009E3779B1ULL, 0x27F1AE18B0000F32ULL }, /* XSUM_XXH64_testdata[929] */\n    {  465, 0x0000000000000000ULL, 0x9E3B6A4665E25791ULL }, /* XSUM_XXH64_testdata[930] */\n    {  465, 0x000000009E3779B1ULL, 0x392522093E3FB48CULL }, /* XSUM_XXH64_testdata[931] */\n    {  466, 0x0000000000000000ULL, 0x04D9792DD944E6FAULL }, /* XSUM_XXH64_testdata[932] */\n    {  466, 0x000000009E3779B1ULL, 0x26C2C96305BB5022ULL }, /* XSUM_XXH64_testdata[933] */\n    {  467, 0x0000000000000000ULL, 0x068711B25A6E0D92ULL }, /* XSUM_XXH64_testdata[934] */\n    {  467, 0x000000009E3779B1ULL, 0xBD83F17500969511ULL }, /* XSUM_XXH64_testdata[935] */\n    {  468, 0x0000000000000000ULL, 0x1B5A437C7788771FULL }, /* XSUM_XXH64_testdata[936] */\n    {  468, 0x000000009E3779B1ULL, 0x0C932D15E6922ABDULL }, /* XSUM_XXH64_testdata[937] */\n    {  469, 0x0000000000000000ULL, 0x59016F221D4813C4ULL }, /* XSUM_XXH64_testdata[938] */\n    {  469, 0x000000009E3779B1ULL, 0xE26458A377C9D1ABULL }, /* XSUM_XXH64_testdata[939] */\n    {  470, 0x0000000000000000ULL, 0x2663563FDE9F1831ULL }, /* XSUM_XXH64_testdata[940] */\n    {  470, 0x000000009E3779B1ULL, 0x5092D399CE4818FBULL }, /* XSUM_XXH64_testdata[941] */\n    {  471, 0x0000000000000000ULL, 0x0AB3383195958DFCULL }, /* XSUM_XXH64_testdata[942] */\n    {  471, 0x000000009E3779B1ULL, 0xC56EF2EB4CC708AAULL }, /* XSUM_XXH64_testdata[943] */\n    {  472, 0x0000000000000000ULL, 0x62059C47D32E4D90ULL }, /* XSUM_XXH64_testdata[944] */\n    {  472, 0x000000009E3779B1ULL, 0x8C30EEDEA66C724EULL }, /* XSUM_XXH64_testdata[945] */\n    {  473, 0x0000000000000000ULL, 0x2CB293E9758D5BECULL }, /* XSUM_XXH64_testdata[946] */\n    {  473, 0x000000009E3779B1ULL, 0xEE1698A529650FD2ULL }, /* XSUM_XXH64_testdata[947] */\n    {  474, 0x0000000000000000ULL, 0xCFADBE86FBA36BB3ULL }, /* XSUM_XXH64_testdata[948] */\n    {  474, 0x000000009E3779B1ULL, 0x35995964704111EBULL }, /* XSUM_XXH64_testdata[949] */\n    {  475, 0x0000000000000000ULL, 0x574C11EBD764D1DDULL }, /* XSUM_XXH64_testdata[950] */\n    {  475, 0x000000009E3779B1ULL, 0xFC3ADBB622E9B7DCULL }, /* XSUM_XXH64_testdata[951] */\n    {  476, 0x0000000000000000ULL, 0xE3D070118B3B303DULL }, /* XSUM_XXH64_testdata[952] */\n    {  476, 0x000000009E3779B1ULL, 0xA7FED066373DEE9FULL }, /* XSUM_XXH64_testdata[953] */\n    {  477, 0x0000000000000000ULL, 0xEA289911F5201680ULL }, /* XSUM_XXH64_testdata[954] */\n    {  477, 0x000000009E3779B1ULL, 0xEB390BFDC716AA91ULL }, /* XSUM_XXH64_testdata[955] */\n    {  478, 0x0000000000000000ULL, 0x8DA3DCA0B281372BULL }, /* XSUM_XXH64_testdata[956] */\n    {  478, 0x000000009E3779B1ULL, 0x4349FEE4D2B17020ULL }, /* XSUM_XXH64_testdata[957] */\n    {  479, 0x0000000000000000ULL, 0x02B1BBA6B8DC460BULL }, /* XSUM_XXH64_testdata[958] */\n    {  479, 0x000000009E3779B1ULL, 0xDB069B2D229E4780ULL }, /* XSUM_XXH64_testdata[959] */\n    {  480, 0x0000000000000000ULL, 0x40031EFCE44584AFULL }, /* XSUM_XXH64_testdata[960] */\n    {  480, 0x000000009E3779B1ULL, 0x1612CF8E737DD856ULL }, /* XSUM_XXH64_testdata[961] */\n    {  481, 0x0000000000000000ULL, 0x6AEC129F22336227ULL }, /* XSUM_XXH64_testdata[962] */\n    {  481, 0x000000009E3779B1ULL, 0xDA87FF4EB7992996ULL }, /* XSUM_XXH64_testdata[963] */\n    {  482, 0x0000000000000000ULL, 0x0843ED2BFCA993EAULL }, /* XSUM_XXH64_testdata[964] */\n    {  482, 0x000000009E3779B1ULL, 0x9821FC8DB9D8022EULL }, /* XSUM_XXH64_testdata[965] */\n    {  483, 0x0000000000000000ULL, 0x178E105C1B1E0134ULL }, /* XSUM_XXH64_testdata[966] */\n    {  483, 0x000000009E3779B1ULL, 0x86D480B7F76DFBE9ULL }, /* XSUM_XXH64_testdata[967] */\n    {  484, 0x0000000000000000ULL, 0x0DCA6F3508C285BAULL }, /* XSUM_XXH64_testdata[968] */\n    {  484, 0x000000009E3779B1ULL, 0xE6C29284FF7590C5ULL }, /* XSUM_XXH64_testdata[969] */\n    {  485, 0x0000000000000000ULL, 0xC023B1DB24605E35ULL }, /* XSUM_XXH64_testdata[970] */\n    {  485, 0x000000009E3779B1ULL, 0xE68814F0AB2B750AULL }, /* XSUM_XXH64_testdata[971] */\n    {  486, 0x0000000000000000ULL, 0x41E31D83E4F93D06ULL }, /* XSUM_XXH64_testdata[972] */\n    {  486, 0x000000009E3779B1ULL, 0xEF55AE9D5E5CEA59ULL }, /* XSUM_XXH64_testdata[973] */\n    {  487, 0x0000000000000000ULL, 0x093DA0BBAED7F232ULL }, /* XSUM_XXH64_testdata[974] */\n    {  487, 0x000000009E3779B1ULL, 0xD220B6221C6C63A4ULL }, /* XSUM_XXH64_testdata[975] */\n    {  488, 0x0000000000000000ULL, 0x761742AE716591FDULL }, /* XSUM_XXH64_testdata[976] */\n    {  488, 0x000000009E3779B1ULL, 0x793924E36DBEB9A7ULL }, /* XSUM_XXH64_testdata[977] */\n    {  489, 0x0000000000000000ULL, 0x0F1737AE93F62C74ULL }, /* XSUM_XXH64_testdata[978] */\n    {  489, 0x000000009E3779B1ULL, 0xC0A6A71FA00BF57CULL }, /* XSUM_XXH64_testdata[979] */\n    {  490, 0x0000000000000000ULL, 0xEB9D10098EF0CB74ULL }, /* XSUM_XXH64_testdata[980] */\n    {  490, 0x000000009E3779B1ULL, 0x3E6998ACEDA2EE67ULL }, /* XSUM_XXH64_testdata[981] */\n    {  491, 0x0000000000000000ULL, 0x5B9D47EABDA691FAULL }, /* XSUM_XXH64_testdata[982] */\n    {  491, 0x000000009E3779B1ULL, 0x4CF38592DC8904D6ULL }, /* XSUM_XXH64_testdata[983] */\n    {  492, 0x0000000000000000ULL, 0x6DC29C7B23F5F15EULL }, /* XSUM_XXH64_testdata[984] */\n    {  492, 0x000000009E3779B1ULL, 0x7F19DF774B1928D5ULL }, /* XSUM_XXH64_testdata[985] */\n    {  493, 0x0000000000000000ULL, 0x7F76280BB7FCE69FULL }, /* XSUM_XXH64_testdata[986] */\n    {  493, 0x000000009E3779B1ULL, 0x522AB77524338A16ULL }, /* XSUM_XXH64_testdata[987] */\n    {  494, 0x0000000000000000ULL, 0x3FC2B6A8DD5F66C4ULL }, /* XSUM_XXH64_testdata[988] */\n    {  494, 0x000000009E3779B1ULL, 0x00A39203BBE1E330ULL }, /* XSUM_XXH64_testdata[989] */\n    {  495, 0x0000000000000000ULL, 0xABE2CE0D9471F427ULL }, /* XSUM_XXH64_testdata[990] */\n    {  495, 0x000000009E3779B1ULL, 0x7E0DB81889B923E1ULL }, /* XSUM_XXH64_testdata[991] */\n    {  496, 0x0000000000000000ULL, 0x3985E21DBD3CDEF3ULL }, /* XSUM_XXH64_testdata[992] */\n    {  496, 0x000000009E3779B1ULL, 0x42F6DBAC22AD2A14ULL }, /* XSUM_XXH64_testdata[993] */\n    {  497, 0x0000000000000000ULL, 0x4CA22D526CAD42B4ULL }, /* XSUM_XXH64_testdata[994] */\n    {  497, 0x000000009E3779B1ULL, 0x7BF4B9AEA2185F63ULL }, /* XSUM_XXH64_testdata[995] */\n    {  498, 0x0000000000000000ULL, 0x1DC9E82F7DC4EE75ULL }, /* XSUM_XXH64_testdata[996] */\n    {  498, 0x000000009E3779B1ULL, 0xA0E9D167061A5ADCULL }, /* XSUM_XXH64_testdata[997] */\n    {  499, 0x0000000000000000ULL, 0x20667D1D1F953BF2ULL }, /* XSUM_XXH64_testdata[998] */\n    {  499, 0x000000009E3779B1ULL, 0x92B92E43DC4E26C6ULL }, /* XSUM_XXH64_testdata[999] */\n    {  500, 0x0000000000000000ULL, 0x0B5403D7FCC8AB6DULL }, /* XSUM_XXH64_testdata[1000] */\n    {  500, 0x000000009E3779B1ULL, 0xFF6DB0A01DEE34B4ULL }, /* XSUM_XXH64_testdata[1001] */\n    {  501, 0x0000000000000000ULL, 0x304D87F89595490BULL }, /* XSUM_XXH64_testdata[1002] */\n    {  501, 0x000000009E3779B1ULL, 0x75173066F3589C33ULL }, /* XSUM_XXH64_testdata[1003] */\n    {  502, 0x0000000000000000ULL, 0x298DB12D23F6EB97ULL }, /* XSUM_XXH64_testdata[1004] */\n    {  502, 0x000000009E3779B1ULL, 0x369BFC08CF1E6A34ULL }, /* XSUM_XXH64_testdata[1005] */\n    {  503, 0x0000000000000000ULL, 0xBC6611E986B7648FULL }, /* XSUM_XXH64_testdata[1006] */\n    {  503, 0x000000009E3779B1ULL, 0xAC9FB74CEDFA9A33ULL }, /* XSUM_XXH64_testdata[1007] */\n    {  504, 0x0000000000000000ULL, 0xA4811FB6290D19F9ULL }, /* XSUM_XXH64_testdata[1008] */\n    {  504, 0x000000009E3779B1ULL, 0x78D79342AAEF81B9ULL }, /* XSUM_XXH64_testdata[1009] */\n    {  505, 0x0000000000000000ULL, 0x1F791A9F0E20AD3AULL }, /* XSUM_XXH64_testdata[1010] */\n    {  505, 0x000000009E3779B1ULL, 0x85570A633C613AD7ULL }, /* XSUM_XXH64_testdata[1011] */\n    {  506, 0x0000000000000000ULL, 0x8AB2AE971FC81669ULL }, /* XSUM_XXH64_testdata[1012] */\n    {  506, 0x000000009E3779B1ULL, 0x0C27D432268D95C9ULL }, /* XSUM_XXH64_testdata[1013] */\n    {  507, 0x0000000000000000ULL, 0xA0FCE9F8B08AFAEBULL }, /* XSUM_XXH64_testdata[1014] */\n    {  507, 0x000000009E3779B1ULL, 0x0CA0718807CFCA08ULL }, /* XSUM_XXH64_testdata[1015] */\n    {  508, 0x0000000000000000ULL, 0xD1A9A871AD298D60ULL }, /* XSUM_XXH64_testdata[1016] */\n    {  508, 0x000000009E3779B1ULL, 0xB927B690D2AB5A51ULL }, /* XSUM_XXH64_testdata[1017] */\n    {  509, 0x0000000000000000ULL, 0x5CBF1E76AEF61ACFULL }, /* XSUM_XXH64_testdata[1018] */\n    {  509, 0x000000009E3779B1ULL, 0x0B7DAC8575664A12ULL }, /* XSUM_XXH64_testdata[1019] */\n    {  510, 0x0000000000000000ULL, 0xAB5553DFA36E8E31ULL }, /* XSUM_XXH64_testdata[1020] */\n    {  510, 0x000000009E3779B1ULL, 0x88C9D9A5B729CE18ULL }, /* XSUM_XXH64_testdata[1021] */\n    {  511, 0x0000000000000000ULL, 0xC049A218675DC378ULL }, /* XSUM_XXH64_testdata[1022] */\n    {  511, 0x000000009E3779B1ULL, 0x127FF202F0810F95ULL }, /* XSUM_XXH64_testdata[1023] */\n    {  512, 0x0000000000000000ULL, 0x4358D2FDD62B58A7ULL }, /* XSUM_XXH64_testdata[1024] */\n    {  512, 0x000000009E3779B1ULL, 0x0DED69C4804C47BAULL }, /* XSUM_XXH64_testdata[1025] */\n    {  513, 0x0000000000000000ULL, 0xC2240D6F6A431697ULL }, /* XSUM_XXH64_testdata[1026] */\n    {  513, 0x000000009E3779B1ULL, 0x88BFA9216A4D96C9ULL }, /* XSUM_XXH64_testdata[1027] */\n    {  514, 0x0000000000000000ULL, 0x901495B937ED3AE6ULL }, /* XSUM_XXH64_testdata[1028] */\n    {  514, 0x000000009E3779B1ULL, 0x8129269C8C7CE568ULL }, /* XSUM_XXH64_testdata[1029] */\n    {  515, 0x0000000000000000ULL, 0xC5B49EEF519A5AAEULL }, /* XSUM_XXH64_testdata[1030] */\n    {  515, 0x000000009E3779B1ULL, 0xA9B6E57E112DF80DULL }, /* XSUM_XXH64_testdata[1031] */\n    {  516, 0x0000000000000000ULL, 0x24BB9E47246405FBULL }, /* XSUM_XXH64_testdata[1032] */\n    {  516, 0x000000009E3779B1ULL, 0x5658E4997FAE1149ULL }, /* XSUM_XXH64_testdata[1033] */\n    {  517, 0x0000000000000000ULL, 0x5002F24B8C916818ULL }, /* XSUM_XXH64_testdata[1034] */\n    {  517, 0x000000009E3779B1ULL, 0x1E3BAEC8B3E92684ULL }, /* XSUM_XXH64_testdata[1035] */\n    {  518, 0x0000000000000000ULL, 0x98B0ED88B8DC1803ULL }, /* XSUM_XXH64_testdata[1036] */\n    {  518, 0x000000009E3779B1ULL, 0x1C6643C6D7C79888ULL }, /* XSUM_XXH64_testdata[1037] */\n    {  519, 0x0000000000000000ULL, 0x67A3E92CBC5AAEB8ULL }, /* XSUM_XXH64_testdata[1038] */\n    {  519, 0x000000009E3779B1ULL, 0xF6B6745DD2ABEED0ULL }, /* XSUM_XXH64_testdata[1039] */\n    {  520, 0x0000000000000000ULL, 0x3E765FC98AF555B2ULL }, /* XSUM_XXH64_testdata[1040] */\n    {  520, 0x000000009E3779B1ULL, 0x271854A81B1F55F5ULL }, /* XSUM_XXH64_testdata[1041] */\n    {  521, 0x0000000000000000ULL, 0x1481FAAE140DB52DULL }, /* XSUM_XXH64_testdata[1042] */\n    {  521, 0x000000009E3779B1ULL, 0xC9CD4CF70210991DULL }, /* XSUM_XXH64_testdata[1043] */\n    {  522, 0x0000000000000000ULL, 0x7076E5064B3D72D9ULL }, /* XSUM_XXH64_testdata[1044] */\n    {  522, 0x000000009E3779B1ULL, 0x0A0FE463D5D1F237ULL }, /* XSUM_XXH64_testdata[1045] */\n    {  523, 0x0000000000000000ULL, 0x5BFCF54F2C534E84ULL }, /* XSUM_XXH64_testdata[1046] */\n    {  523, 0x000000009E3779B1ULL, 0x5129D643B208FDA0ULL }, /* XSUM_XXH64_testdata[1047] */\n    {  524, 0x0000000000000000ULL, 0x6E26EA3B29E6865BULL }, /* XSUM_XXH64_testdata[1048] */\n    {  524, 0x000000009E3779B1ULL, 0x535354E5D22B7C5CULL }, /* XSUM_XXH64_testdata[1049] */\n    {  525, 0x0000000000000000ULL, 0x3478B4D8BC39B944ULL }, /* XSUM_XXH64_testdata[1050] */\n    {  525, 0x000000009E3779B1ULL, 0x259DCF1DB85D237EULL }, /* XSUM_XXH64_testdata[1051] */\n    {  526, 0x0000000000000000ULL, 0x3915A0F0D2A49F64ULL }, /* XSUM_XXH64_testdata[1052] */\n    {  526, 0x000000009E3779B1ULL, 0x5A3E939F7A624CF3ULL }, /* XSUM_XXH64_testdata[1053] */\n    {  527, 0x0000000000000000ULL, 0x24505C82F7CEFBB6ULL }, /* XSUM_XXH64_testdata[1054] */\n    {  527, 0x000000009E3779B1ULL, 0x922D119813FC4C0EULL }, /* XSUM_XXH64_testdata[1055] */\n    {  528, 0x0000000000000000ULL, 0x67B4C2454D384A60ULL }, /* XSUM_XXH64_testdata[1056] */\n    {  528, 0x000000009E3779B1ULL, 0xBCF3D6E31A6EE429ULL }, /* XSUM_XXH64_testdata[1057] */\n    {  529, 0x0000000000000000ULL, 0x5F59A1C17DDE57D7ULL }, /* XSUM_XXH64_testdata[1058] */\n    {  529, 0x000000009E3779B1ULL, 0xC46DD68E234BF321ULL }, /* XSUM_XXH64_testdata[1059] */\n    {  530, 0x0000000000000000ULL, 0xCCFBE89BF3BE2A25ULL }, /* XSUM_XXH64_testdata[1060] */\n    {  530, 0x000000009E3779B1ULL, 0xA25E7E65BB76FDBAULL }, /* XSUM_XXH64_testdata[1061] */\n    {  531, 0x0000000000000000ULL, 0xFD302CE018C30F51ULL }, /* XSUM_XXH64_testdata[1062] */\n    {  531, 0x000000009E3779B1ULL, 0x5E44DD12B585935FULL }, /* XSUM_XXH64_testdata[1063] */\n    {  532, 0x0000000000000000ULL, 0x4EF1804541C532FAULL }, /* XSUM_XXH64_testdata[1064] */\n    {  532, 0x000000009E3779B1ULL, 0x99EB3A06D5E6614BULL }, /* XSUM_XXH64_testdata[1065] */\n    {  533, 0x0000000000000000ULL, 0x74CC32C533C176DEULL }, /* XSUM_XXH64_testdata[1066] */\n    {  533, 0x000000009E3779B1ULL, 0x3C2E21FF7EBFE1A0ULL }, /* XSUM_XXH64_testdata[1067] */\n    {  534, 0x0000000000000000ULL, 0x7BB34158B6944958ULL }, /* XSUM_XXH64_testdata[1068] */\n    {  534, 0x000000009E3779B1ULL, 0x4E8CEBA257509C52ULL }, /* XSUM_XXH64_testdata[1069] */\n    {  535, 0x0000000000000000ULL, 0x94B0291AEC55F5BFULL }, /* XSUM_XXH64_testdata[1070] */\n    {  535, 0x000000009E3779B1ULL, 0xCB9727B59D579EF7ULL }, /* XSUM_XXH64_testdata[1071] */\n    {  536, 0x0000000000000000ULL, 0x514EF0CA1A6C2F67ULL }, /* XSUM_XXH64_testdata[1072] */\n    {  536, 0x000000009E3779B1ULL, 0x1BB7E00DA01F12C0ULL }, /* XSUM_XXH64_testdata[1073] */\n    {  537, 0x0000000000000000ULL, 0x5E457DC4B64AAE54ULL }, /* XSUM_XXH64_testdata[1074] */\n    {  537, 0x000000009E3779B1ULL, 0xEED370DEDD42FABDULL }, /* XSUM_XXH64_testdata[1075] */\n    {  538, 0x0000000000000000ULL, 0x666A59574A49612EULL }, /* XSUM_XXH64_testdata[1076] */\n    {  538, 0x000000009E3779B1ULL, 0xFDC8FB5DB3AE0F27ULL }, /* XSUM_XXH64_testdata[1077] */\n    {  539, 0x0000000000000000ULL, 0x943547AD457E482EULL }, /* XSUM_XXH64_testdata[1078] */\n    {  539, 0x000000009E3779B1ULL, 0x26D0A12D8B1C7873ULL }, /* XSUM_XXH64_testdata[1079] */\n    {  540, 0x0000000000000000ULL, 0xCEC717DEACCC2F1DULL }, /* XSUM_XXH64_testdata[1080] */\n    {  540, 0x000000009E3779B1ULL, 0x25EA3202F903390FULL }, /* XSUM_XXH64_testdata[1081] */\n    {  541, 0x0000000000000000ULL, 0xF9757DEF684219BBULL }, /* XSUM_XXH64_testdata[1082] */\n    {  541, 0x000000009E3779B1ULL, 0xB51832F75506A45EULL }, /* XSUM_XXH64_testdata[1083] */\n    {  542, 0x0000000000000000ULL, 0xF7FC4492A561E7DAULL }, /* XSUM_XXH64_testdata[1084] */\n    {  542, 0x000000009E3779B1ULL, 0x520BDFABB1884D86ULL }, /* XSUM_XXH64_testdata[1085] */\n    {  543, 0x0000000000000000ULL, 0x8CB6F74873BDF64DULL }, /* XSUM_XXH64_testdata[1086] */\n    {  543, 0x000000009E3779B1ULL, 0xC1299E715C3A18EBULL }, /* XSUM_XXH64_testdata[1087] */\n    {  544, 0x0000000000000000ULL, 0x1D91E7B1C88F52C1ULL }, /* XSUM_XXH64_testdata[1088] */\n    {  544, 0x000000009E3779B1ULL, 0xB5DF68D5A96BF409ULL }, /* XSUM_XXH64_testdata[1089] */\n    {  545, 0x0000000000000000ULL, 0x24A9D36A04E17F94ULL }, /* XSUM_XXH64_testdata[1090] */\n    {  545, 0x000000009E3779B1ULL, 0x2631158788B7FB7BULL }, /* XSUM_XXH64_testdata[1091] */\n    {  546, 0x0000000000000000ULL, 0xE9C08E1B73912007ULL }, /* XSUM_XXH64_testdata[1092] */\n    {  546, 0x000000009E3779B1ULL, 0x7B172914DFC09111ULL }, /* XSUM_XXH64_testdata[1093] */\n    {  547, 0x0000000000000000ULL, 0x75510DA9593070E1ULL }, /* XSUM_XXH64_testdata[1094] */\n    {  547, 0x000000009E3779B1ULL, 0x41964CCFD38F3137ULL }, /* XSUM_XXH64_testdata[1095] */\n    {  548, 0x0000000000000000ULL, 0x1677E77B436F885CULL }, /* XSUM_XXH64_testdata[1096] */\n    {  548, 0x000000009E3779B1ULL, 0xAA706D5BF3D8D95FULL }, /* XSUM_XXH64_testdata[1097] */\n    {  549, 0x0000000000000000ULL, 0x1A9F3999C9E39344ULL }, /* XSUM_XXH64_testdata[1098] */\n    {  549, 0x000000009E3779B1ULL, 0x9F68FF0B00AE68F2ULL }, /* XSUM_XXH64_testdata[1099] */\n    {  550, 0x0000000000000000ULL, 0x9D2016D72904F805ULL }, /* XSUM_XXH64_testdata[1100] */\n    {  550, 0x000000009E3779B1ULL, 0x0141F8BC73F52A90ULL }, /* XSUM_XXH64_testdata[1101] */\n    {  551, 0x0000000000000000ULL, 0x5CF03DF3A2F5D357ULL }, /* XSUM_XXH64_testdata[1102] */\n    {  551, 0x000000009E3779B1ULL, 0x559C544C2056D112ULL }, /* XSUM_XXH64_testdata[1103] */\n    {  552, 0x0000000000000000ULL, 0x01A97348A8EE6F91ULL }, /* XSUM_XXH64_testdata[1104] */\n    {  552, 0x000000009E3779B1ULL, 0xE3AEC5D553649427ULL }, /* XSUM_XXH64_testdata[1105] */\n    {  553, 0x0000000000000000ULL, 0x3F522FF45232CF2EULL }, /* XSUM_XXH64_testdata[1106] */\n    {  553, 0x000000009E3779B1ULL, 0x34503F23E309AFAFULL }, /* XSUM_XXH64_testdata[1107] */\n    {  554, 0x0000000000000000ULL, 0xA18266734BEE9F94ULL }, /* XSUM_XXH64_testdata[1108] */\n    {  554, 0x000000009E3779B1ULL, 0x3D24F99B1E3B76D8ULL }, /* XSUM_XXH64_testdata[1109] */\n    {  555, 0x0000000000000000ULL, 0xA0717DFB4A3B8E1EULL }, /* XSUM_XXH64_testdata[1110] */\n    {  555, 0x000000009E3779B1ULL, 0xEEE4A23C2D8F50EFULL }, /* XSUM_XXH64_testdata[1111] */\n    {  556, 0x0000000000000000ULL, 0x7F0F85DD67193185ULL }, /* XSUM_XXH64_testdata[1112] */\n    {  556, 0x000000009E3779B1ULL, 0xDB42BAEA785B2CB9ULL }, /* XSUM_XXH64_testdata[1113] */\n    {  557, 0x0000000000000000ULL, 0x56A244A82BC8FBB4ULL }, /* XSUM_XXH64_testdata[1114] */\n    {  557, 0x000000009E3779B1ULL, 0x7D0F150511B37485ULL }, /* XSUM_XXH64_testdata[1115] */\n    {  558, 0x0000000000000000ULL, 0x4E45075F05021681ULL }, /* XSUM_XXH64_testdata[1116] */\n    {  558, 0x000000009E3779B1ULL, 0x036D48A8992DB51EULL }, /* XSUM_XXH64_testdata[1117] */\n    {  559, 0x0000000000000000ULL, 0x5A9F9E3AD472B0DBULL }, /* XSUM_XXH64_testdata[1118] */\n    {  559, 0x000000009E3779B1ULL, 0x65ACD2DF8EE4A20AULL }, /* XSUM_XXH64_testdata[1119] */\n    {  560, 0x0000000000000000ULL, 0xDB6966B993245525ULL }, /* XSUM_XXH64_testdata[1120] */\n    {  560, 0x000000009E3779B1ULL, 0x9DCE7E5C13232340ULL }, /* XSUM_XXH64_testdata[1121] */\n    {  561, 0x0000000000000000ULL, 0xAD93CA30948BDB63ULL }, /* XSUM_XXH64_testdata[1122] */\n    {  561, 0x000000009E3779B1ULL, 0xEEF7F0283AA720D3ULL }, /* XSUM_XXH64_testdata[1123] */\n    {  562, 0x0000000000000000ULL, 0xE43B35E92AF3AED6ULL }, /* XSUM_XXH64_testdata[1124] */\n    {  562, 0x000000009E3779B1ULL, 0xCF95BF0F3A88C074ULL }, /* XSUM_XXH64_testdata[1125] */\n    {  563, 0x0000000000000000ULL, 0x8D5DC0F3EB4873F9ULL }, /* XSUM_XXH64_testdata[1126] */\n    {  563, 0x000000009E3779B1ULL, 0x45754281C1FD99F2ULL }, /* XSUM_XXH64_testdata[1127] */\n    {  564, 0x0000000000000000ULL, 0x6A293EBAB01624BCULL }, /* XSUM_XXH64_testdata[1128] */\n    {  564, 0x000000009E3779B1ULL, 0xC0FFC55AEE6317FAULL }, /* XSUM_XXH64_testdata[1129] */\n    {  565, 0x0000000000000000ULL, 0x04741407F8BBB92FULL }, /* XSUM_XXH64_testdata[1130] */\n    {  565, 0x000000009E3779B1ULL, 0x5899532191106E6EULL }, /* XSUM_XXH64_testdata[1131] */\n    {  566, 0x0000000000000000ULL, 0x9D090CF34641EA52ULL }, /* XSUM_XXH64_testdata[1132] */\n    {  566, 0x000000009E3779B1ULL, 0x4C746EC3F55074D9ULL }, /* XSUM_XXH64_testdata[1133] */\n    {  567, 0x0000000000000000ULL, 0x0955E5CEEA8A41C1ULL }, /* XSUM_XXH64_testdata[1134] */\n    {  567, 0x000000009E3779B1ULL, 0xE976A4DD31668716ULL }, /* XSUM_XXH64_testdata[1135] */\n    {  568, 0x0000000000000000ULL, 0x7E5B64DDD4B51173ULL }, /* XSUM_XXH64_testdata[1136] */\n    {  568, 0x000000009E3779B1ULL, 0xB346F41C71BE5806ULL }, /* XSUM_XXH64_testdata[1137] */\n    {  569, 0x0000000000000000ULL, 0xCCE1D2AA0FC3A229ULL }, /* XSUM_XXH64_testdata[1138] */\n    {  569, 0x000000009E3779B1ULL, 0x94EDCA9E6CE6743AULL }, /* XSUM_XXH64_testdata[1139] */\n    {  570, 0x0000000000000000ULL, 0xB8705873FE1AEB54ULL }, /* XSUM_XXH64_testdata[1140] */\n    {  570, 0x000000009E3779B1ULL, 0xEA45C5C50E85D3B7ULL }, /* XSUM_XXH64_testdata[1141] */\n    {  571, 0x0000000000000000ULL, 0x0DABE51C143E792AULL }, /* XSUM_XXH64_testdata[1142] */\n    {  571, 0x000000009E3779B1ULL, 0x1C56D10D1F87A8B0ULL }, /* XSUM_XXH64_testdata[1143] */\n    {  572, 0x0000000000000000ULL, 0x4AD363C1BC6EC5E1ULL }, /* XSUM_XXH64_testdata[1144] */\n    {  572, 0x000000009E3779B1ULL, 0xCE9FC944B8F09C8DULL }, /* XSUM_XXH64_testdata[1145] */\n    {  573, 0x0000000000000000ULL, 0x75FB48E97E37D8B8ULL }, /* XSUM_XXH64_testdata[1146] */\n    {  573, 0x000000009E3779B1ULL, 0x6BB43FB17FC5B762ULL }, /* XSUM_XXH64_testdata[1147] */\n    {  574, 0x0000000000000000ULL, 0xB3D328EB50D0CCF5ULL }, /* XSUM_XXH64_testdata[1148] */\n    {  574, 0x000000009E3779B1ULL, 0x035E5DC924C3C493ULL }, /* XSUM_XXH64_testdata[1149] */\n    {  575, 0x0000000000000000ULL, 0x31420D29B1218EE8ULL }, /* XSUM_XXH64_testdata[1150] */\n    {  575, 0x000000009E3779B1ULL, 0x277A0972E51FEAE4ULL }, /* XSUM_XXH64_testdata[1151] */\n    {  576, 0x0000000000000000ULL, 0x9A82A3688076DCA1ULL }, /* XSUM_XXH64_testdata[1152] */\n    {  576, 0x000000009E3779B1ULL, 0xA26BA461FC9451F1ULL }, /* XSUM_XXH64_testdata[1153] */\n    {  577, 0x0000000000000000ULL, 0xCD1C01B9E3F1FA6FULL }, /* XSUM_XXH64_testdata[1154] */\n    {  577, 0x000000009E3779B1ULL, 0xD9CE5187CF5048DDULL }, /* XSUM_XXH64_testdata[1155] */\n    {  578, 0x0000000000000000ULL, 0xDE91D2575FDAB0DBULL }, /* XSUM_XXH64_testdata[1156] */\n    {  578, 0x000000009E3779B1ULL, 0x61B5D02A3741CFC2ULL }, /* XSUM_XXH64_testdata[1157] */\n    {  579, 0x0000000000000000ULL, 0xB54C7DB3BB30256CULL }, /* XSUM_XXH64_testdata[1158] */\n    {  579, 0x000000009E3779B1ULL, 0xA6689FBB8F816805ULL }, /* XSUM_XXH64_testdata[1159] */\n    {  580, 0x0000000000000000ULL, 0x23530C044B342D2EULL }, /* XSUM_XXH64_testdata[1160] */\n    {  580, 0x000000009E3779B1ULL, 0x5FC0A8196624DB66ULL }, /* XSUM_XXH64_testdata[1161] */\n    {  581, 0x0000000000000000ULL, 0x839FB2088E05923FULL }, /* XSUM_XXH64_testdata[1162] */\n    {  581, 0x000000009E3779B1ULL, 0xD6FE4112CBF7C688ULL }, /* XSUM_XXH64_testdata[1163] */\n    {  582, 0x0000000000000000ULL, 0x677D89AEFB86101EULL }, /* XSUM_XXH64_testdata[1164] */\n    {  582, 0x000000009E3779B1ULL, 0xFF958987E17A9409ULL }, /* XSUM_XXH64_testdata[1165] */\n    {  583, 0x0000000000000000ULL, 0xDADE9284EBA56704ULL }, /* XSUM_XXH64_testdata[1166] */\n    {  583, 0x000000009E3779B1ULL, 0x739B92BAF2F89A1FULL }, /* XSUM_XXH64_testdata[1167] */\n    {  584, 0x0000000000000000ULL, 0x57209EFE0BAED0A7ULL }, /* XSUM_XXH64_testdata[1168] */\n    {  584, 0x000000009E3779B1ULL, 0x68C502B2E4B75E2FULL }, /* XSUM_XXH64_testdata[1169] */\n    {  585, 0x0000000000000000ULL, 0x0824099ACA7DEF3AULL }, /* XSUM_XXH64_testdata[1170] */\n    {  585, 0x000000009E3779B1ULL, 0x31FBE2758EA5B59DULL }, /* XSUM_XXH64_testdata[1171] */\n    {  586, 0x0000000000000000ULL, 0x2132D0949E6F7FDFULL }, /* XSUM_XXH64_testdata[1172] */\n    {  586, 0x000000009E3779B1ULL, 0x625DB41B865B407DULL }, /* XSUM_XXH64_testdata[1173] */\n    {  587, 0x0000000000000000ULL, 0x0E4746C2D50D5917ULL }, /* XSUM_XXH64_testdata[1174] */\n    {  587, 0x000000009E3779B1ULL, 0x6DD623628AAC1761ULL }, /* XSUM_XXH64_testdata[1175] */\n    {  588, 0x0000000000000000ULL, 0x77E3B32584EC50B4ULL }, /* XSUM_XXH64_testdata[1176] */\n    {  588, 0x000000009E3779B1ULL, 0x69BE02B1BD3E7D37ULL }, /* XSUM_XXH64_testdata[1177] */\n    {  589, 0x0000000000000000ULL, 0x3211124140F15B9DULL }, /* XSUM_XXH64_testdata[1178] */\n    {  589, 0x000000009E3779B1ULL, 0x22EF084D2775F861ULL }, /* XSUM_XXH64_testdata[1179] */\n    {  590, 0x0000000000000000ULL, 0xB4FA8435F567A322ULL }, /* XSUM_XXH64_testdata[1180] */\n    {  590, 0x000000009E3779B1ULL, 0x21555016402E2716ULL }, /* XSUM_XXH64_testdata[1181] */\n    {  591, 0x0000000000000000ULL, 0x3818FA95FE7ACB51ULL }, /* XSUM_XXH64_testdata[1182] */\n    {  591, 0x000000009E3779B1ULL, 0x0E3BECB4E1C24C8BULL }, /* XSUM_XXH64_testdata[1183] */\n    {  592, 0x0000000000000000ULL, 0x028C1C95C8857B29ULL }, /* XSUM_XXH64_testdata[1184] */\n    {  592, 0x000000009E3779B1ULL, 0xBD7D4EFBF0828800ULL }, /* XSUM_XXH64_testdata[1185] */\n    {  593, 0x0000000000000000ULL, 0x13C771779493B733ULL }, /* XSUM_XXH64_testdata[1186] */\n    {  593, 0x000000009E3779B1ULL, 0x1018A1A348C8529CULL }, /* XSUM_XXH64_testdata[1187] */\n    {  594, 0x0000000000000000ULL, 0xCDEBCA2E7F9D61E2ULL }, /* XSUM_XXH64_testdata[1188] */\n    {  594, 0x000000009E3779B1ULL, 0x8309751820BD5BD3ULL }, /* XSUM_XXH64_testdata[1189] */\n    {  595, 0x0000000000000000ULL, 0xE5478C3566BAB476ULL }, /* XSUM_XXH64_testdata[1190] */\n    {  595, 0x000000009E3779B1ULL, 0x2BF32F50757E7FC1ULL }, /* XSUM_XXH64_testdata[1191] */\n    {  596, 0x0000000000000000ULL, 0xF06A6CF2E8013156ULL }, /* XSUM_XXH64_testdata[1192] */\n    {  596, 0x000000009E3779B1ULL, 0xBEF2B245D5C55DCCULL }, /* XSUM_XXH64_testdata[1193] */\n    {  597, 0x0000000000000000ULL, 0x266F81CA0C23969BULL }, /* XSUM_XXH64_testdata[1194] */\n    {  597, 0x000000009E3779B1ULL, 0x43642EFFD2FF7FEBULL }, /* XSUM_XXH64_testdata[1195] */\n    {  598, 0x0000000000000000ULL, 0xA1BF901879F23F2AULL }, /* XSUM_XXH64_testdata[1196] */\n    {  598, 0x000000009E3779B1ULL, 0xD3B509D517D12EC2ULL }, /* XSUM_XXH64_testdata[1197] */\n    {  599, 0x0000000000000000ULL, 0x7C28CEDF6719474CULL }, /* XSUM_XXH64_testdata[1198] */\n    {  599, 0x000000009E3779B1ULL, 0x6C5EAF85A7EC336AULL }, /* XSUM_XXH64_testdata[1199] */\n    {  600, 0x0000000000000000ULL, 0x4CF9BF91EEB83F5EULL }, /* XSUM_XXH64_testdata[1200] */\n    {  600, 0x000000009E3779B1ULL, 0x8EB951D069F91173ULL }, /* XSUM_XXH64_testdata[1201] */\n    {  601, 0x0000000000000000ULL, 0x76E4539EA0EC590AULL }, /* XSUM_XXH64_testdata[1202] */\n    {  601, 0x000000009E3779B1ULL, 0x22D996A8C929BE36ULL }, /* XSUM_XXH64_testdata[1203] */\n    {  602, 0x0000000000000000ULL, 0x6FC0470B9D6EF4BEULL }, /* XSUM_XXH64_testdata[1204] */\n    {  602, 0x000000009E3779B1ULL, 0x732C159EF613A0AAULL }, /* XSUM_XXH64_testdata[1205] */\n    {  603, 0x0000000000000000ULL, 0xDDE052EA3BE2DACBULL }, /* XSUM_XXH64_testdata[1206] */\n    {  603, 0x000000009E3779B1ULL, 0xCD49648FB4255D9DULL }, /* XSUM_XXH64_testdata[1207] */\n    {  604, 0x0000000000000000ULL, 0xC90718CBA116E8EBULL }, /* XSUM_XXH64_testdata[1208] */\n    {  604, 0x000000009E3779B1ULL, 0x10D6EC864F249926ULL }, /* XSUM_XXH64_testdata[1209] */\n    {  605, 0x0000000000000000ULL, 0x1D58456BD464E73BULL }, /* XSUM_XXH64_testdata[1210] */\n    {  605, 0x000000009E3779B1ULL, 0x4E90CC7890B43AAFULL }, /* XSUM_XXH64_testdata[1211] */\n    {  606, 0x0000000000000000ULL, 0x597B6B3D90474AF9ULL }, /* XSUM_XXH64_testdata[1212] */\n    {  606, 0x000000009E3779B1ULL, 0xF194718DA7019B29ULL }, /* XSUM_XXH64_testdata[1213] */\n    {  607, 0x0000000000000000ULL, 0x33FCE41AECD21B33ULL }, /* XSUM_XXH64_testdata[1214] */\n    {  607, 0x000000009E3779B1ULL, 0x43A2FA652A93584FULL }, /* XSUM_XXH64_testdata[1215] */\n    {  608, 0x0000000000000000ULL, 0x2C0D59728FC01D2DULL }, /* XSUM_XXH64_testdata[1216] */\n    {  608, 0x000000009E3779B1ULL, 0x44658B1996C7C0BDULL }, /* XSUM_XXH64_testdata[1217] */\n    {  609, 0x0000000000000000ULL, 0xC7F6D6C4F5DC29E2ULL }, /* XSUM_XXH64_testdata[1218] */\n    {  609, 0x000000009E3779B1ULL, 0xEED87EFF534007FFULL }, /* XSUM_XXH64_testdata[1219] */\n    {  610, 0x0000000000000000ULL, 0x9AFB66E22BB9905FULL }, /* XSUM_XXH64_testdata[1220] */\n    {  610, 0x000000009E3779B1ULL, 0xE106E1D712DD0192ULL }, /* XSUM_XXH64_testdata[1221] */\n    {  611, 0x0000000000000000ULL, 0xF6B2DF840401FA0AULL }, /* XSUM_XXH64_testdata[1222] */\n    {  611, 0x000000009E3779B1ULL, 0xA28BFC4E5702604BULL }, /* XSUM_XXH64_testdata[1223] */\n    {  612, 0x0000000000000000ULL, 0xC8162570DC9FD003ULL }, /* XSUM_XXH64_testdata[1224] */\n    {  612, 0x000000009E3779B1ULL, 0xA3E7D200D05B2D62ULL }, /* XSUM_XXH64_testdata[1225] */\n    {  613, 0x0000000000000000ULL, 0x0286AC3D8F903D14ULL }, /* XSUM_XXH64_testdata[1226] */\n    {  613, 0x000000009E3779B1ULL, 0xA33D10BDF53F315FULL }, /* XSUM_XXH64_testdata[1227] */\n    {  614, 0x0000000000000000ULL, 0xBFF52353CB1757B4ULL }, /* XSUM_XXH64_testdata[1228] */\n    {  614, 0x000000009E3779B1ULL, 0x86A97CDCA9B5A477ULL }, /* XSUM_XXH64_testdata[1229] */\n    {  615, 0x0000000000000000ULL, 0x48B8C108F7D13A60ULL }, /* XSUM_XXH64_testdata[1230] */\n    {  615, 0x000000009E3779B1ULL, 0xE25292046D57587AULL }, /* XSUM_XXH64_testdata[1231] */\n    {  616, 0x0000000000000000ULL, 0x91D2D038C70D3A71ULL }, /* XSUM_XXH64_testdata[1232] */\n    {  616, 0x000000009E3779B1ULL, 0x3E83FEBD509A00F4ULL }, /* XSUM_XXH64_testdata[1233] */\n    {  617, 0x0000000000000000ULL, 0xCCB0593427579E67ULL }, /* XSUM_XXH64_testdata[1234] */\n    {  617, 0x000000009E3779B1ULL, 0x13666E020DA9824EULL }, /* XSUM_XXH64_testdata[1235] */\n    {  618, 0x0000000000000000ULL, 0x19ED6CED369FD9A3ULL }, /* XSUM_XXH64_testdata[1236] */\n    {  618, 0x000000009E3779B1ULL, 0xFBDBF98D38F54A6DULL }, /* XSUM_XXH64_testdata[1237] */\n    {  619, 0x0000000000000000ULL, 0xCBAB11A3AB6AF17BULL }, /* XSUM_XXH64_testdata[1238] */\n    {  619, 0x000000009E3779B1ULL, 0x3ED046C76C444D61ULL }, /* XSUM_XXH64_testdata[1239] */\n    {  620, 0x0000000000000000ULL, 0x5BD2185552367428ULL }, /* XSUM_XXH64_testdata[1240] */\n    {  620, 0x000000009E3779B1ULL, 0xA2F581AE68859F21ULL }, /* XSUM_XXH64_testdata[1241] */\n    {  621, 0x0000000000000000ULL, 0x47C5D42249D5D9B2ULL }, /* XSUM_XXH64_testdata[1242] */\n    {  621, 0x000000009E3779B1ULL, 0x5D6F07C76B82CCC5ULL }, /* XSUM_XXH64_testdata[1243] */\n    {  622, 0x0000000000000000ULL, 0x28488E1E8D7C584FULL }, /* XSUM_XXH64_testdata[1244] */\n    {  622, 0x000000009E3779B1ULL, 0xABEEE1826D2B7A8BULL }, /* XSUM_XXH64_testdata[1245] */\n    {  623, 0x0000000000000000ULL, 0xA55B551214AC23E0ULL }, /* XSUM_XXH64_testdata[1246] */\n    {  623, 0x000000009E3779B1ULL, 0x688F5CD0E04C6158ULL }, /* XSUM_XXH64_testdata[1247] */\n    {  624, 0x0000000000000000ULL, 0xAEB650EBD621F387ULL }, /* XSUM_XXH64_testdata[1248] */\n    {  624, 0x000000009E3779B1ULL, 0x33B2FE54265F02CFULL }, /* XSUM_XXH64_testdata[1249] */\n    {  625, 0x0000000000000000ULL, 0x897A1A0D4829023CULL }, /* XSUM_XXH64_testdata[1250] */\n    {  625, 0x000000009E3779B1ULL, 0x6683A75899BE3D91ULL }, /* XSUM_XXH64_testdata[1251] */\n    {  626, 0x0000000000000000ULL, 0x04884E809EB22519ULL }, /* XSUM_XXH64_testdata[1252] */\n    {  626, 0x000000009E3779B1ULL, 0x80BFEB79D9034898ULL }, /* XSUM_XXH64_testdata[1253] */\n    {  627, 0x0000000000000000ULL, 0xDC7E98BD10C22E76ULL }, /* XSUM_XXH64_testdata[1254] */\n    {  627, 0x000000009E3779B1ULL, 0x1E634DBF400D8600ULL }, /* XSUM_XXH64_testdata[1255] */\n    {  628, 0x0000000000000000ULL, 0x1E7241D5A438AFABULL }, /* XSUM_XXH64_testdata[1256] */\n    {  628, 0x000000009E3779B1ULL, 0xADEFCEE39DE12098ULL }, /* XSUM_XXH64_testdata[1257] */\n    {  629, 0x0000000000000000ULL, 0xD61E28979B7A48A1ULL }, /* XSUM_XXH64_testdata[1258] */\n    {  629, 0x000000009E3779B1ULL, 0x445F302C5BD6ED7AULL }, /* XSUM_XXH64_testdata[1259] */\n    {  630, 0x0000000000000000ULL, 0xF8260CCD2AC544A4ULL }, /* XSUM_XXH64_testdata[1260] */\n    {  630, 0x000000009E3779B1ULL, 0x9EC84ADBE50F237DULL }, /* XSUM_XXH64_testdata[1261] */\n    {  631, 0x0000000000000000ULL, 0xE6AA30BF55D14345ULL }, /* XSUM_XXH64_testdata[1262] */\n    {  631, 0x000000009E3779B1ULL, 0x67C96B811EF88722ULL }, /* XSUM_XXH64_testdata[1263] */\n    {  632, 0x0000000000000000ULL, 0x649255ED735C6898ULL }, /* XSUM_XXH64_testdata[1264] */\n    {  632, 0x000000009E3779B1ULL, 0x943C3B50B2F484B4ULL }, /* XSUM_XXH64_testdata[1265] */\n    {  633, 0x0000000000000000ULL, 0xCF71E354BD84268CULL }, /* XSUM_XXH64_testdata[1266] */\n    {  633, 0x000000009E3779B1ULL, 0xAF7DF853CDB8079DULL }, /* XSUM_XXH64_testdata[1267] */\n    {  634, 0x0000000000000000ULL, 0x46D4D303191EE5B0ULL }, /* XSUM_XXH64_testdata[1268] */\n    {  634, 0x000000009E3779B1ULL, 0xB609739F92C47F52ULL }, /* XSUM_XXH64_testdata[1269] */\n    {  635, 0x0000000000000000ULL, 0x1C9F320B91A6BB9EULL }, /* XSUM_XXH64_testdata[1270] */\n    {  635, 0x000000009E3779B1ULL, 0xA12B660719BE10E3ULL }, /* XSUM_XXH64_testdata[1271] */\n    {  636, 0x0000000000000000ULL, 0x26AC22CAE7CF5B0CULL }, /* XSUM_XXH64_testdata[1272] */\n    {  636, 0x000000009E3779B1ULL, 0xD9C080A364645562ULL }, /* XSUM_XXH64_testdata[1273] */\n    {  637, 0x0000000000000000ULL, 0xBCD103BB91439585ULL }, /* XSUM_XXH64_testdata[1274] */\n    {  637, 0x000000009E3779B1ULL, 0xAD2616E969EDA0EFULL }, /* XSUM_XXH64_testdata[1275] */\n    {  638, 0x0000000000000000ULL, 0xB1D101AC570CF57EULL }, /* XSUM_XXH64_testdata[1276] */\n    {  638, 0x000000009E3779B1ULL, 0xA0F62D7CBDFFD19CULL }, /* XSUM_XXH64_testdata[1277] */\n    {  639, 0x0000000000000000ULL, 0x7B534B7165B57FD2ULL }, /* XSUM_XXH64_testdata[1278] */\n    {  639, 0x000000009E3779B1ULL, 0x436F1881A21AE883ULL }, /* XSUM_XXH64_testdata[1279] */\n    {  640, 0x0000000000000000ULL, 0x05FF3E1DB4BB4690ULL }, /* XSUM_XXH64_testdata[1280] */\n    {  640, 0x000000009E3779B1ULL, 0xF03DB7272A4E48BCULL }, /* XSUM_XXH64_testdata[1281] */\n    {  641, 0x0000000000000000ULL, 0xA29AA8B123F0C7F1ULL }, /* XSUM_XXH64_testdata[1282] */\n    {  641, 0x000000009E3779B1ULL, 0x2B2A53BDE1F1B6F1ULL }, /* XSUM_XXH64_testdata[1283] */\n    {  642, 0x0000000000000000ULL, 0x4A2ACEC0CBF88F2BULL }, /* XSUM_XXH64_testdata[1284] */\n    {  642, 0x000000009E3779B1ULL, 0x01B05DE3AB4B6341ULL }, /* XSUM_XXH64_testdata[1285] */\n    {  643, 0x0000000000000000ULL, 0x56CB71243229B81AULL }, /* XSUM_XXH64_testdata[1286] */\n    {  643, 0x000000009E3779B1ULL, 0x827F91416F18F758ULL }, /* XSUM_XXH64_testdata[1287] */\n    {  644, 0x0000000000000000ULL, 0x59535655F5B6529FULL }, /* XSUM_XXH64_testdata[1288] */\n    {  644, 0x000000009E3779B1ULL, 0x8B72B8ACC3F15BB2ULL }, /* XSUM_XXH64_testdata[1289] */\n    {  645, 0x0000000000000000ULL, 0x19163BB1ACEBC103ULL }, /* XSUM_XXH64_testdata[1290] */\n    {  645, 0x000000009E3779B1ULL, 0x84C375B214BB34A2ULL }, /* XSUM_XXH64_testdata[1291] */\n    {  646, 0x0000000000000000ULL, 0x431590E65CE3BBE9ULL }, /* XSUM_XXH64_testdata[1292] */\n    {  646, 0x000000009E3779B1ULL, 0xA93010265389DB3AULL }, /* XSUM_XXH64_testdata[1293] */\n    {  647, 0x0000000000000000ULL, 0x55A15D30750F36CAULL }, /* XSUM_XXH64_testdata[1294] */\n    {  647, 0x000000009E3779B1ULL, 0x350FE3E8E02421DFULL }, /* XSUM_XXH64_testdata[1295] */\n    {  648, 0x0000000000000000ULL, 0x2D05962C50F073CBULL }, /* XSUM_XXH64_testdata[1296] */\n    {  648, 0x000000009E3779B1ULL, 0x067196515DD251BAULL }, /* XSUM_XXH64_testdata[1297] */\n    {  649, 0x0000000000000000ULL, 0xF72F7CCCF5391A99ULL }, /* XSUM_XXH64_testdata[1298] */\n    {  649, 0x000000009E3779B1ULL, 0x6047D16A8BC7DCCAULL }, /* XSUM_XXH64_testdata[1299] */\n    {  650, 0x0000000000000000ULL, 0x471707CBCF6299A1ULL }, /* XSUM_XXH64_testdata[1300] */\n    {  650, 0x000000009E3779B1ULL, 0x8A929579D2BED71EULL }, /* XSUM_XXH64_testdata[1301] */\n    {  651, 0x0000000000000000ULL, 0xECA5BBC4C934388AULL }, /* XSUM_XXH64_testdata[1302] */\n    {  651, 0x000000009E3779B1ULL, 0x26713BCB28E26A79ULL }, /* XSUM_XXH64_testdata[1303] */\n    {  652, 0x0000000000000000ULL, 0xB4772705B6696A70ULL }, /* XSUM_XXH64_testdata[1304] */\n    {  652, 0x000000009E3779B1ULL, 0xB3784B97F8AC34F5ULL }, /* XSUM_XXH64_testdata[1305] */\n    {  653, 0x0000000000000000ULL, 0x814AAD0468A8B2EFULL }, /* XSUM_XXH64_testdata[1306] */\n    {  653, 0x000000009E3779B1ULL, 0x4D1AA4C88DD2F9FDULL }, /* XSUM_XXH64_testdata[1307] */\n    {  654, 0x0000000000000000ULL, 0xE553302216B85C57ULL }, /* XSUM_XXH64_testdata[1308] */\n    {  654, 0x000000009E3779B1ULL, 0x369F72F1FB7D7B94ULL }, /* XSUM_XXH64_testdata[1309] */\n    {  655, 0x0000000000000000ULL, 0x70081023630B7CF1ULL }, /* XSUM_XXH64_testdata[1310] */\n    {  655, 0x000000009E3779B1ULL, 0x6CFAFD089A4295E9ULL }, /* XSUM_XXH64_testdata[1311] */\n    {  656, 0x0000000000000000ULL, 0x03DC7B218DF637FDULL }, /* XSUM_XXH64_testdata[1312] */\n    {  656, 0x000000009E3779B1ULL, 0xFD697A1126BB52AEULL }, /* XSUM_XXH64_testdata[1313] */\n    {  657, 0x0000000000000000ULL, 0xF57606558F42A829ULL }, /* XSUM_XXH64_testdata[1314] */\n    {  657, 0x000000009E3779B1ULL, 0xD0704822BBF6FCFAULL }, /* XSUM_XXH64_testdata[1315] */\n    {  658, 0x0000000000000000ULL, 0xDD9B01EA7E6EC4E4ULL }, /* XSUM_XXH64_testdata[1316] */\n    {  658, 0x000000009E3779B1ULL, 0x7EE41C884D6306A7ULL }, /* XSUM_XXH64_testdata[1317] */\n    {  659, 0x0000000000000000ULL, 0x57C8B061FA3665FEULL }, /* XSUM_XXH64_testdata[1318] */\n    {  659, 0x000000009E3779B1ULL, 0xF40AB81323746F5AULL }, /* XSUM_XXH64_testdata[1319] */\n    {  660, 0x0000000000000000ULL, 0xE02D3157266D7735ULL }, /* XSUM_XXH64_testdata[1320] */\n    {  660, 0x000000009E3779B1ULL, 0x5EC929E844079B91ULL }, /* XSUM_XXH64_testdata[1321] */\n    {  661, 0x0000000000000000ULL, 0x3CAA66663E9CFD4AULL }, /* XSUM_XXH64_testdata[1322] */\n    {  661, 0x000000009E3779B1ULL, 0xF95ED3862F7671BEULL }, /* XSUM_XXH64_testdata[1323] */\n    {  662, 0x0000000000000000ULL, 0xE5B2C7FAB00FB483ULL }, /* XSUM_XXH64_testdata[1324] */\n    {  662, 0x000000009E3779B1ULL, 0x296B751149F59309ULL }, /* XSUM_XXH64_testdata[1325] */\n    {  663, 0x0000000000000000ULL, 0xD6B2C560C538FB20ULL }, /* XSUM_XXH64_testdata[1326] */\n    {  663, 0x000000009E3779B1ULL, 0x95F844EFCBB88297ULL }, /* XSUM_XXH64_testdata[1327] */\n    {  664, 0x0000000000000000ULL, 0x2F3AB5ED460D5A41ULL }, /* XSUM_XXH64_testdata[1328] */\n    {  664, 0x000000009E3779B1ULL, 0x38B74AA4AB2849DDULL }, /* XSUM_XXH64_testdata[1329] */\n    {  665, 0x0000000000000000ULL, 0x8EDDAD24C85225B3ULL }, /* XSUM_XXH64_testdata[1330] */\n    {  665, 0x000000009E3779B1ULL, 0x31A63232E799EF65ULL }, /* XSUM_XXH64_testdata[1331] */\n    {  666, 0x0000000000000000ULL, 0x2281EA033306A216ULL }, /* XSUM_XXH64_testdata[1332] */\n    {  666, 0x000000009E3779B1ULL, 0xD6EE53C2002531F5ULL }, /* XSUM_XXH64_testdata[1333] */\n    {  667, 0x0000000000000000ULL, 0xC48A2E048533D300ULL }, /* XSUM_XXH64_testdata[1334] */\n    {  667, 0x000000009E3779B1ULL, 0x4372C9C6DD4EC657ULL }, /* XSUM_XXH64_testdata[1335] */\n    {  668, 0x0000000000000000ULL, 0x192DB67E9199A52EULL }, /* XSUM_XXH64_testdata[1336] */\n    {  668, 0x000000009E3779B1ULL, 0x0FE34901633955EBULL }, /* XSUM_XXH64_testdata[1337] */\n    {  669, 0x0000000000000000ULL, 0xE90A5997740C4248ULL }, /* XSUM_XXH64_testdata[1338] */\n    {  669, 0x000000009E3779B1ULL, 0x076611986F06BB7BULL }, /* XSUM_XXH64_testdata[1339] */\n    {  670, 0x0000000000000000ULL, 0x51E21FF885EE405BULL }, /* XSUM_XXH64_testdata[1340] */\n    {  670, 0x000000009E3779B1ULL, 0x49B0128D84D9EFDBULL }, /* XSUM_XXH64_testdata[1341] */\n    {  671, 0x0000000000000000ULL, 0xC5FDFD16766CAD4FULL }, /* XSUM_XXH64_testdata[1342] */\n    {  671, 0x000000009E3779B1ULL, 0x0B0C59B2630F465AULL }, /* XSUM_XXH64_testdata[1343] */\n    {  672, 0x0000000000000000ULL, 0x1BE3A090C1434100ULL }, /* XSUM_XXH64_testdata[1344] */\n    {  672, 0x000000009E3779B1ULL, 0x845A616FF80C3155ULL }, /* XSUM_XXH64_testdata[1345] */\n    {  673, 0x0000000000000000ULL, 0x490401AA5582784CULL }, /* XSUM_XXH64_testdata[1346] */\n    {  673, 0x000000009E3779B1ULL, 0x0E9BE22886BD6FC4ULL }, /* XSUM_XXH64_testdata[1347] */\n    {  674, 0x0000000000000000ULL, 0x0B104279E4777227ULL }, /* XSUM_XXH64_testdata[1348] */\n    {  674, 0x000000009E3779B1ULL, 0xE153FD5F3A568AB9ULL }, /* XSUM_XXH64_testdata[1349] */\n    {  675, 0x0000000000000000ULL, 0x7A1B59E94AD0BD16ULL }, /* XSUM_XXH64_testdata[1350] */\n    {  675, 0x000000009E3779B1ULL, 0xAA176933FF6DC264ULL }, /* XSUM_XXH64_testdata[1351] */\n    {  676, 0x0000000000000000ULL, 0xCBE6FA0E2978808AULL }, /* XSUM_XXH64_testdata[1352] */\n    {  676, 0x000000009E3779B1ULL, 0xA6746B4110BC5B8EULL }, /* XSUM_XXH64_testdata[1353] */\n    {  677, 0x0000000000000000ULL, 0x2AF1F2BAA896BF3FULL }, /* XSUM_XXH64_testdata[1354] */\n    {  677, 0x000000009E3779B1ULL, 0x1CDC19AA2BB2BFA1ULL }, /* XSUM_XXH64_testdata[1355] */\n    {  678, 0x0000000000000000ULL, 0xCF271A2B03E29283ULL }, /* XSUM_XXH64_testdata[1356] */\n    {  678, 0x000000009E3779B1ULL, 0xF60C189AA7559BD8ULL }, /* XSUM_XXH64_testdata[1357] */\n    {  679, 0x0000000000000000ULL, 0xB23EDF020B943EA0ULL }, /* XSUM_XXH64_testdata[1358] */\n    {  679, 0x000000009E3779B1ULL, 0x5425739195F5C00CULL }, /* XSUM_XXH64_testdata[1359] */\n    {  680, 0x0000000000000000ULL, 0xDA85E4B3126B21DBULL }, /* XSUM_XXH64_testdata[1360] */\n    {  680, 0x000000009E3779B1ULL, 0xD3665DDE6B323975ULL }, /* XSUM_XXH64_testdata[1361] */\n    {  681, 0x0000000000000000ULL, 0xB96F22C931B7A78BULL }, /* XSUM_XXH64_testdata[1362] */\n    {  681, 0x000000009E3779B1ULL, 0x737917FC9F3DFDBEULL }, /* XSUM_XXH64_testdata[1363] */\n    {  682, 0x0000000000000000ULL, 0x23D788241F7C70F4ULL }, /* XSUM_XXH64_testdata[1364] */\n    {  682, 0x000000009E3779B1ULL, 0x4609B4CED6A47DE3ULL }, /* XSUM_XXH64_testdata[1365] */\n    {  683, 0x0000000000000000ULL, 0x495242859DB54586ULL }, /* XSUM_XXH64_testdata[1366] */\n    {  683, 0x000000009E3779B1ULL, 0x29120312D672CDD9ULL }, /* XSUM_XXH64_testdata[1367] */\n    {  684, 0x0000000000000000ULL, 0x5BE5B8806940EBB1ULL }, /* XSUM_XXH64_testdata[1368] */\n    {  684, 0x000000009E3779B1ULL, 0xF58F2D336C043805ULL }, /* XSUM_XXH64_testdata[1369] */\n    {  685, 0x0000000000000000ULL, 0x4E2DCB4DF2BA078CULL }, /* XSUM_XXH64_testdata[1370] */\n    {  685, 0x000000009E3779B1ULL, 0x6BEC5D8411B5C5ABULL }, /* XSUM_XXH64_testdata[1371] */\n    {  686, 0x0000000000000000ULL, 0xC27F045E440D82E1ULL }, /* XSUM_XXH64_testdata[1372] */\n    {  686, 0x000000009E3779B1ULL, 0x6184A044E5F84F33ULL }, /* XSUM_XXH64_testdata[1373] */\n    {  687, 0x0000000000000000ULL, 0x45EB29A7913AFE09ULL }, /* XSUM_XXH64_testdata[1374] */\n    {  687, 0x000000009E3779B1ULL, 0x365B61CB3BE73A26ULL }, /* XSUM_XXH64_testdata[1375] */\n    {  688, 0x0000000000000000ULL, 0x8111415B9A605841ULL }, /* XSUM_XXH64_testdata[1376] */\n    {  688, 0x000000009E3779B1ULL, 0xD4365B0DBF613534ULL }, /* XSUM_XXH64_testdata[1377] */\n    {  689, 0x0000000000000000ULL, 0x203E45B644BDB08CULL }, /* XSUM_XXH64_testdata[1378] */\n    {  689, 0x000000009E3779B1ULL, 0x4DDFEF03E0077CD3ULL }, /* XSUM_XXH64_testdata[1379] */\n    {  690, 0x0000000000000000ULL, 0x23F495E0695600BBULL }, /* XSUM_XXH64_testdata[1380] */\n    {  690, 0x000000009E3779B1ULL, 0x4B9493FF4E180341ULL }, /* XSUM_XXH64_testdata[1381] */\n    {  691, 0x0000000000000000ULL, 0xF5DA20A3FA1CCBF0ULL }, /* XSUM_XXH64_testdata[1382] */\n    {  691, 0x000000009E3779B1ULL, 0x80DC95CB42AA3040ULL }, /* XSUM_XXH64_testdata[1383] */\n    {  692, 0x0000000000000000ULL, 0x6086216334B1099FULL }, /* XSUM_XXH64_testdata[1384] */\n    {  692, 0x000000009E3779B1ULL, 0x202D03318BB5C23EULL }, /* XSUM_XXH64_testdata[1385] */\n    {  693, 0x0000000000000000ULL, 0xA30002512E9FD4D6ULL }, /* XSUM_XXH64_testdata[1386] */\n    {  693, 0x000000009E3779B1ULL, 0xF3E418E8E77B26F2ULL }, /* XSUM_XXH64_testdata[1387] */\n    {  694, 0x0000000000000000ULL, 0x96828F3F86928C1BULL }, /* XSUM_XXH64_testdata[1388] */\n    {  694, 0x000000009E3779B1ULL, 0xD68CA98AF0A1C386ULL }, /* XSUM_XXH64_testdata[1389] */\n    {  695, 0x0000000000000000ULL, 0x1BB181CD4DBB454EULL }, /* XSUM_XXH64_testdata[1390] */\n    {  695, 0x000000009E3779B1ULL, 0x373BD8F68C3C46D7ULL }, /* XSUM_XXH64_testdata[1391] */\n    {  696, 0x0000000000000000ULL, 0xB0232C45D98C3FE2ULL }, /* XSUM_XXH64_testdata[1392] */\n    {  696, 0x000000009E3779B1ULL, 0x9B50610C42819A28ULL }, /* XSUM_XXH64_testdata[1393] */\n    {  697, 0x0000000000000000ULL, 0x9202956062E5FB18ULL }, /* XSUM_XXH64_testdata[1394] */\n    {  697, 0x000000009E3779B1ULL, 0x8E311C53E693B3E8ULL }, /* XSUM_XXH64_testdata[1395] */\n    {  698, 0x0000000000000000ULL, 0x8FC572079C9A24A4ULL }, /* XSUM_XXH64_testdata[1396] */\n    {  698, 0x000000009E3779B1ULL, 0xADFE770D69BF07C8ULL }, /* XSUM_XXH64_testdata[1397] */\n    {  699, 0x0000000000000000ULL, 0xA2B5A9750E746425ULL }, /* XSUM_XXH64_testdata[1398] */\n    {  699, 0x000000009E3779B1ULL, 0xD4EB32CD53EB3148ULL }, /* XSUM_XXH64_testdata[1399] */\n    {  700, 0x0000000000000000ULL, 0xC685236A544B5D40ULL }, /* XSUM_XXH64_testdata[1400] */\n    {  700, 0x000000009E3779B1ULL, 0x32478E6520378C30ULL }, /* XSUM_XXH64_testdata[1401] */\n    {  701, 0x0000000000000000ULL, 0x2D92BC4741267973ULL }, /* XSUM_XXH64_testdata[1402] */\n    {  701, 0x000000009E3779B1ULL, 0xB78789A086DECE21ULL }, /* XSUM_XXH64_testdata[1403] */\n    {  702, 0x0000000000000000ULL, 0x453111B594EF4545ULL }, /* XSUM_XXH64_testdata[1404] */\n    {  702, 0x000000009E3779B1ULL, 0xFAE1FA4060B2A98EULL }, /* XSUM_XXH64_testdata[1405] */\n    {  703, 0x0000000000000000ULL, 0x3BF9F17B5FBDBCA4ULL }, /* XSUM_XXH64_testdata[1406] */\n    {  703, 0x000000009E3779B1ULL, 0xE66E66041C5B5F87ULL }, /* XSUM_XXH64_testdata[1407] */\n    {  704, 0x0000000000000000ULL, 0x221C7CC7895C1B5AULL }, /* XSUM_XXH64_testdata[1408] */\n    {  704, 0x000000009E3779B1ULL, 0x5C2C536AFF933B18ULL }, /* XSUM_XXH64_testdata[1409] */\n    {  705, 0x0000000000000000ULL, 0x1027CEB18C4E43C4ULL }, /* XSUM_XXH64_testdata[1410] */\n    {  705, 0x000000009E3779B1ULL, 0x3C54F98CE994DEB3ULL }, /* XSUM_XXH64_testdata[1411] */\n    {  706, 0x0000000000000000ULL, 0x6B713027F4B7A434ULL }, /* XSUM_XXH64_testdata[1412] */\n    {  706, 0x000000009E3779B1ULL, 0x5EF378BC5519FC55ULL }, /* XSUM_XXH64_testdata[1413] */\n    {  707, 0x0000000000000000ULL, 0x07AF4FA7880E2DD5ULL }, /* XSUM_XXH64_testdata[1414] */\n    {  707, 0x000000009E3779B1ULL, 0xBAD0E90C34FBB62DULL }, /* XSUM_XXH64_testdata[1415] */\n    {  708, 0x0000000000000000ULL, 0xDD099BE5AD5AA854ULL }, /* XSUM_XXH64_testdata[1416] */\n    {  708, 0x000000009E3779B1ULL, 0x084D4A032981B899ULL }, /* XSUM_XXH64_testdata[1417] */\n    {  709, 0x0000000000000000ULL, 0x180DC3778B7A2100ULL }, /* XSUM_XXH64_testdata[1418] */\n    {  709, 0x000000009E3779B1ULL, 0xE4CF857778B079C5ULL }, /* XSUM_XXH64_testdata[1419] */\n    {  710, 0x0000000000000000ULL, 0x5561E952ABEB2F53ULL }, /* XSUM_XXH64_testdata[1420] */\n    {  710, 0x000000009E3779B1ULL, 0x238148B86DC01222ULL }, /* XSUM_XXH64_testdata[1421] */\n    {  711, 0x0000000000000000ULL, 0xC25EF08D840957C8ULL }, /* XSUM_XXH64_testdata[1422] */\n    {  711, 0x000000009E3779B1ULL, 0x145BCD25D86DE9A4ULL }, /* XSUM_XXH64_testdata[1423] */\n    {  712, 0x0000000000000000ULL, 0xDBA9489B8EA3BD12ULL }, /* XSUM_XXH64_testdata[1424] */\n    {  712, 0x000000009E3779B1ULL, 0x6B809097A99748E1ULL }, /* XSUM_XXH64_testdata[1425] */\n    {  713, 0x0000000000000000ULL, 0x2C78A12EE6FE7105ULL }, /* XSUM_XXH64_testdata[1426] */\n    {  713, 0x000000009E3779B1ULL, 0x7DAA11C6EB88B381ULL }, /* XSUM_XXH64_testdata[1427] */\n    {  714, 0x0000000000000000ULL, 0xD4482CCF3336E3A4ULL }, /* XSUM_XXH64_testdata[1428] */\n    {  714, 0x000000009E3779B1ULL, 0x0B30DEDD0A128848ULL }, /* XSUM_XXH64_testdata[1429] */\n    {  715, 0x0000000000000000ULL, 0x5EC939F5D2CE811EULL }, /* XSUM_XXH64_testdata[1430] */\n    {  715, 0x000000009E3779B1ULL, 0xBBF2EE793BE646CCULL }, /* XSUM_XXH64_testdata[1431] */\n    {  716, 0x0000000000000000ULL, 0xCEF19224A1B63059ULL }, /* XSUM_XXH64_testdata[1432] */\n    {  716, 0x000000009E3779B1ULL, 0x42B62A02271CAE3EULL }, /* XSUM_XXH64_testdata[1433] */\n    {  717, 0x0000000000000000ULL, 0xD1CDE6EAA8E955A4ULL }, /* XSUM_XXH64_testdata[1434] */\n    {  717, 0x000000009E3779B1ULL, 0xB05C5979A8EB4D8DULL }, /* XSUM_XXH64_testdata[1435] */\n    {  718, 0x0000000000000000ULL, 0x74FD5086482BDB49ULL }, /* XSUM_XXH64_testdata[1436] */\n    {  718, 0x000000009E3779B1ULL, 0xAC8628777E410441ULL }, /* XSUM_XXH64_testdata[1437] */\n    {  719, 0x0000000000000000ULL, 0x83BA9E556F56DE47ULL }, /* XSUM_XXH64_testdata[1438] */\n    {  719, 0x000000009E3779B1ULL, 0x41974491D12AE57DULL }, /* XSUM_XXH64_testdata[1439] */\n    {  720, 0x0000000000000000ULL, 0x41D78BFB072D6955ULL }, /* XSUM_XXH64_testdata[1440] */\n    {  720, 0x000000009E3779B1ULL, 0x6E56FC95B3CA8858ULL }, /* XSUM_XXH64_testdata[1441] */\n    {  721, 0x0000000000000000ULL, 0xDC1307F878A05384ULL }, /* XSUM_XXH64_testdata[1442] */\n    {  721, 0x000000009E3779B1ULL, 0xBBA5463D39D44606ULL }, /* XSUM_XXH64_testdata[1443] */\n    {  722, 0x0000000000000000ULL, 0x1A7901D614CEA7E4ULL }, /* XSUM_XXH64_testdata[1444] */\n    {  722, 0x000000009E3779B1ULL, 0xD195AB8D56B8C297ULL }, /* XSUM_XXH64_testdata[1445] */\n    {  723, 0x0000000000000000ULL, 0xE378D2D8F0A9D233ULL }, /* XSUM_XXH64_testdata[1446] */\n    {  723, 0x000000009E3779B1ULL, 0x3AAC7F8069B98068ULL }, /* XSUM_XXH64_testdata[1447] */\n    {  724, 0x0000000000000000ULL, 0xC5E98F64860ED0DEULL }, /* XSUM_XXH64_testdata[1448] */\n    {  724, 0x000000009E3779B1ULL, 0x1A16DA9A78A3D792ULL }, /* XSUM_XXH64_testdata[1449] */\n    {  725, 0x0000000000000000ULL, 0x2D548C668F4C9CC8ULL }, /* XSUM_XXH64_testdata[1450] */\n    {  725, 0x000000009E3779B1ULL, 0x72C2E7DAE390ECF5ULL }, /* XSUM_XXH64_testdata[1451] */\n    {  726, 0x0000000000000000ULL, 0x5BE3903DFCCAF22AULL }, /* XSUM_XXH64_testdata[1452] */\n    {  726, 0x000000009E3779B1ULL, 0x9D7678A1266E1D72ULL }, /* XSUM_XXH64_testdata[1453] */\n    {  727, 0x0000000000000000ULL, 0x6EBC13C6253B8B87ULL }, /* XSUM_XXH64_testdata[1454] */\n    {  727, 0x000000009E3779B1ULL, 0x6C80182322695419ULL }, /* XSUM_XXH64_testdata[1455] */\n    {  728, 0x0000000000000000ULL, 0xF0B1D686881496D0ULL }, /* XSUM_XXH64_testdata[1456] */\n    {  728, 0x000000009E3779B1ULL, 0xAC7388304F442298ULL }, /* XSUM_XXH64_testdata[1457] */\n    {  729, 0x0000000000000000ULL, 0xA8A6323813358307ULL }, /* XSUM_XXH64_testdata[1458] */\n    {  729, 0x000000009E3779B1ULL, 0x29E6255CAC3E756DULL }, /* XSUM_XXH64_testdata[1459] */\n    {  730, 0x0000000000000000ULL, 0xEAB6F0F43D64E0EBULL }, /* XSUM_XXH64_testdata[1460] */\n    {  730, 0x000000009E3779B1ULL, 0xC5D79ECC5A3DCE90ULL }, /* XSUM_XXH64_testdata[1461] */\n    {  731, 0x0000000000000000ULL, 0x3FFBEC0BA96E15DAULL }, /* XSUM_XXH64_testdata[1462] */\n    {  731, 0x000000009E3779B1ULL, 0xFD1DFB6EAFA6F941ULL }, /* XSUM_XXH64_testdata[1463] */\n    {  732, 0x0000000000000000ULL, 0xFA7F6D9816284150ULL }, /* XSUM_XXH64_testdata[1464] */\n    {  732, 0x000000009E3779B1ULL, 0xB505D90355732F73ULL }, /* XSUM_XXH64_testdata[1465] */\n    {  733, 0x0000000000000000ULL, 0xBF7712DE11B23D60ULL }, /* XSUM_XXH64_testdata[1466] */\n    {  733, 0x000000009E3779B1ULL, 0xD6D9778AB869F1A4ULL }, /* XSUM_XXH64_testdata[1467] */\n    {  734, 0x0000000000000000ULL, 0x93B0129C62CD6483ULL }, /* XSUM_XXH64_testdata[1468] */\n    {  734, 0x000000009E3779B1ULL, 0x71E33EA3FA54C82AULL }, /* XSUM_XXH64_testdata[1469] */\n    {  735, 0x0000000000000000ULL, 0xAF90158120DD29D6ULL }, /* XSUM_XXH64_testdata[1470] */\n    {  735, 0x000000009E3779B1ULL, 0x62B8A52E35675EFEULL }, /* XSUM_XXH64_testdata[1471] */\n    {  736, 0x0000000000000000ULL, 0xAC99EFF2DE436A5BULL }, /* XSUM_XXH64_testdata[1472] */\n    {  736, 0x000000009E3779B1ULL, 0x7956AC5141242D4BULL }, /* XSUM_XXH64_testdata[1473] */\n    {  737, 0x0000000000000000ULL, 0x3678E8F6C0821FD4ULL }, /* XSUM_XXH64_testdata[1474] */\n    {  737, 0x000000009E3779B1ULL, 0xE9616361A44679CEULL }, /* XSUM_XXH64_testdata[1475] */\n    {  738, 0x0000000000000000ULL, 0x8CD45A4EF5E7BFE5ULL }, /* XSUM_XXH64_testdata[1476] */\n    {  738, 0x000000009E3779B1ULL, 0x3B31AAA739321126ULL }, /* XSUM_XXH64_testdata[1477] */\n    {  739, 0x0000000000000000ULL, 0xD852E97DF516658BULL }, /* XSUM_XXH64_testdata[1478] */\n    {  739, 0x000000009E3779B1ULL, 0xD7568EE876CDB7C3ULL }, /* XSUM_XXH64_testdata[1479] */\n    {  740, 0x0000000000000000ULL, 0x10208312ED98A058ULL }, /* XSUM_XXH64_testdata[1480] */\n    {  740, 0x000000009E3779B1ULL, 0x89AD07BF20F746A7ULL }, /* XSUM_XXH64_testdata[1481] */\n    {  741, 0x0000000000000000ULL, 0x2A3406B22E762D03ULL }, /* XSUM_XXH64_testdata[1482] */\n    {  741, 0x000000009E3779B1ULL, 0xA2578EBFB90F4C86ULL }, /* XSUM_XXH64_testdata[1483] */\n    {  742, 0x0000000000000000ULL, 0x41012644AFCCE0E2ULL }, /* XSUM_XXH64_testdata[1484] */\n    {  742, 0x000000009E3779B1ULL, 0x47C71214AAB43236ULL }, /* XSUM_XXH64_testdata[1485] */\n    {  743, 0x0000000000000000ULL, 0xAFD2C945A23906BDULL }, /* XSUM_XXH64_testdata[1486] */\n    {  743, 0x000000009E3779B1ULL, 0xCAF53509CAD0E259ULL }, /* XSUM_XXH64_testdata[1487] */\n    {  744, 0x0000000000000000ULL, 0x40C4074DDD7A4199ULL }, /* XSUM_XXH64_testdata[1488] */\n    {  744, 0x000000009E3779B1ULL, 0x14392ED852039B17ULL }, /* XSUM_XXH64_testdata[1489] */\n    {  745, 0x0000000000000000ULL, 0x0E635EC64C432656ULL }, /* XSUM_XXH64_testdata[1490] */\n    {  745, 0x000000009E3779B1ULL, 0xB5041FAC4DAB2AB0ULL }, /* XSUM_XXH64_testdata[1491] */\n    {  746, 0x0000000000000000ULL, 0x12949B52C0D92A41ULL }, /* XSUM_XXH64_testdata[1492] */\n    {  746, 0x000000009E3779B1ULL, 0x9608DEE9DCA6F74EULL }, /* XSUM_XXH64_testdata[1493] */\n    {  747, 0x0000000000000000ULL, 0xAA84DA7017D17172ULL }, /* XSUM_XXH64_testdata[1494] */\n    {  747, 0x000000009E3779B1ULL, 0x87852EF7548AD5B8ULL }, /* XSUM_XXH64_testdata[1495] */\n    {  748, 0x0000000000000000ULL, 0xC6149B58A4E811F2ULL }, /* XSUM_XXH64_testdata[1496] */\n    {  748, 0x000000009E3779B1ULL, 0x8DEEFC88819EB751ULL }, /* XSUM_XXH64_testdata[1497] */\n    {  749, 0x0000000000000000ULL, 0xC0CF66EF7524697BULL }, /* XSUM_XXH64_testdata[1498] */\n    {  749, 0x000000009E3779B1ULL, 0x56FBFE7D523FDC0EULL }, /* XSUM_XXH64_testdata[1499] */\n    {  750, 0x0000000000000000ULL, 0x84442F5D7AC2D4D7ULL }, /* XSUM_XXH64_testdata[1500] */\n    {  750, 0x000000009E3779B1ULL, 0xE6C9014C67D770C9ULL }, /* XSUM_XXH64_testdata[1501] */\n    {  751, 0x0000000000000000ULL, 0x042BC7070FC1C626ULL }, /* XSUM_XXH64_testdata[1502] */\n    {  751, 0x000000009E3779B1ULL, 0xAE26CFD0D282BC95ULL }, /* XSUM_XXH64_testdata[1503] */\n    {  752, 0x0000000000000000ULL, 0xCB8763AD53DB25AEULL }, /* XSUM_XXH64_testdata[1504] */\n    {  752, 0x000000009E3779B1ULL, 0x5E2821B40151038EULL }, /* XSUM_XXH64_testdata[1505] */\n    {  753, 0x0000000000000000ULL, 0x51F94118E16AD413ULL }, /* XSUM_XXH64_testdata[1506] */\n    {  753, 0x000000009E3779B1ULL, 0x0151DFC5364A1F91ULL }, /* XSUM_XXH64_testdata[1507] */\n    {  754, 0x0000000000000000ULL, 0x3FDF1F3AC306E680ULL }, /* XSUM_XXH64_testdata[1508] */\n    {  754, 0x000000009E3779B1ULL, 0x36212321B09E9071ULL }, /* XSUM_XXH64_testdata[1509] */\n    {  755, 0x0000000000000000ULL, 0x0A7445F6011589ECULL }, /* XSUM_XXH64_testdata[1510] */\n    {  755, 0x000000009E3779B1ULL, 0x3FFFD038C2BC48C6ULL }, /* XSUM_XXH64_testdata[1511] */\n    {  756, 0x0000000000000000ULL, 0x627C2A6EA247B4E6ULL }, /* XSUM_XXH64_testdata[1512] */\n    {  756, 0x000000009E3779B1ULL, 0x3110EA20AC9FEBB0ULL }, /* XSUM_XXH64_testdata[1513] */\n    {  757, 0x0000000000000000ULL, 0x7ABBD897E50C6155ULL }, /* XSUM_XXH64_testdata[1514] */\n    {  757, 0x000000009E3779B1ULL, 0x05CCFF7801E0D207ULL }, /* XSUM_XXH64_testdata[1515] */\n    {  758, 0x0000000000000000ULL, 0xBABC92D700C378B8ULL }, /* XSUM_XXH64_testdata[1516] */\n    {  758, 0x000000009E3779B1ULL, 0x2E0D94DB0C5E777EULL }, /* XSUM_XXH64_testdata[1517] */\n    {  759, 0x0000000000000000ULL, 0xFDABE8AF396803F7ULL }, /* XSUM_XXH64_testdata[1518] */\n    {  759, 0x000000009E3779B1ULL, 0x09151F2D27F87BD3ULL }, /* XSUM_XXH64_testdata[1519] */\n    {  760, 0x0000000000000000ULL, 0xFCBE111F73F24456ULL }, /* XSUM_XXH64_testdata[1520] */\n    {  760, 0x000000009E3779B1ULL, 0xD76B618BA8891AA9ULL }, /* XSUM_XXH64_testdata[1521] */\n    {  761, 0x0000000000000000ULL, 0x9EB27A0CC2B6CE7FULL }, /* XSUM_XXH64_testdata[1522] */\n    {  761, 0x000000009E3779B1ULL, 0x6DFBE8E85472A47EULL }, /* XSUM_XXH64_testdata[1523] */\n    {  762, 0x0000000000000000ULL, 0xE364C7174EDBB495ULL }, /* XSUM_XXH64_testdata[1524] */\n    {  762, 0x000000009E3779B1ULL, 0xA818EF1E36FA4AEFULL }, /* XSUM_XXH64_testdata[1525] */\n    {  763, 0x0000000000000000ULL, 0x1965DA80EA08BB81ULL }, /* XSUM_XXH64_testdata[1526] */\n    {  763, 0x000000009E3779B1ULL, 0x40B75D3F3A5E2D29ULL }, /* XSUM_XXH64_testdata[1527] */\n    {  764, 0x0000000000000000ULL, 0xD23A065A7AA7C4A3ULL }, /* XSUM_XXH64_testdata[1528] */\n    {  764, 0x000000009E3779B1ULL, 0x5736DA672BE838E9ULL }, /* XSUM_XXH64_testdata[1529] */\n    {  765, 0x0000000000000000ULL, 0x1BFE99DED9A1BBA2ULL }, /* XSUM_XXH64_testdata[1530] */\n    {  765, 0x000000009E3779B1ULL, 0x99F69E39BB7B664DULL }, /* XSUM_XXH64_testdata[1531] */\n    {  766, 0x0000000000000000ULL, 0x833432C61A9ED439ULL }, /* XSUM_XXH64_testdata[1532] */\n    {  766, 0x000000009E3779B1ULL, 0x162BCE222B455C24ULL }, /* XSUM_XXH64_testdata[1533] */\n    {  767, 0x0000000000000000ULL, 0x4181C71628F08B1CULL }, /* XSUM_XXH64_testdata[1534] */\n    {  767, 0x000000009E3779B1ULL, 0xB1488838AA3F10DAULL }, /* XSUM_XXH64_testdata[1535] */\n    {  768, 0x0000000000000000ULL, 0x0E8BBB1F9B435E52ULL }, /* XSUM_XXH64_testdata[1536] */\n    {  768, 0x000000009E3779B1ULL, 0x1DC7319A8ADE3B81ULL }, /* XSUM_XXH64_testdata[1537] */\n    {  769, 0x0000000000000000ULL, 0xE860CAE272EA80B9ULL }, /* XSUM_XXH64_testdata[1538] */\n    {  769, 0x000000009E3779B1ULL, 0x23C04C46FC231044ULL }, /* XSUM_XXH64_testdata[1539] */\n    {  770, 0x0000000000000000ULL, 0x6236B3FB13743810ULL }, /* XSUM_XXH64_testdata[1540] */\n    {  770, 0x000000009E3779B1ULL, 0x67DF8E2782ABA69BULL }, /* XSUM_XXH64_testdata[1541] */\n    {  771, 0x0000000000000000ULL, 0xED4C203B6774E7CEULL }, /* XSUM_XXH64_testdata[1542] */\n    {  771, 0x000000009E3779B1ULL, 0x552052A7444466E6ULL }, /* XSUM_XXH64_testdata[1543] */\n    {  772, 0x0000000000000000ULL, 0x8CE6CDEF16AE6884ULL }, /* XSUM_XXH64_testdata[1544] */\n    {  772, 0x000000009E3779B1ULL, 0x48F644C568470FA1ULL }, /* XSUM_XXH64_testdata[1545] */\n    {  773, 0x0000000000000000ULL, 0x64C403D54E028867ULL }, /* XSUM_XXH64_testdata[1546] */\n    {  773, 0x000000009E3779B1ULL, 0xD16C062B043553D3ULL }, /* XSUM_XXH64_testdata[1547] */\n    {  774, 0x0000000000000000ULL, 0xF812CC33F77F2D44ULL }, /* XSUM_XXH64_testdata[1548] */\n    {  774, 0x000000009E3779B1ULL, 0xFBCCE522CB2B8F29ULL }, /* XSUM_XXH64_testdata[1549] */\n    {  775, 0x0000000000000000ULL, 0xFFF547F98ABF6895ULL }, /* XSUM_XXH64_testdata[1550] */\n    {  775, 0x000000009E3779B1ULL, 0x20105BF22CEF4FD0ULL }, /* XSUM_XXH64_testdata[1551] */\n    {  776, 0x0000000000000000ULL, 0x8B88372929BDEA9AULL }, /* XSUM_XXH64_testdata[1552] */\n    {  776, 0x000000009E3779B1ULL, 0xFC1C6E3B87A91E85ULL }, /* XSUM_XXH64_testdata[1553] */\n    {  777, 0x0000000000000000ULL, 0xF672F4ECB438B978ULL }, /* XSUM_XXH64_testdata[1554] */\n    {  777, 0x000000009E3779B1ULL, 0x21D821B6C3257703ULL }, /* XSUM_XXH64_testdata[1555] */\n    {  778, 0x0000000000000000ULL, 0x57B5CE95D2B999D9ULL }, /* XSUM_XXH64_testdata[1556] */\n    {  778, 0x000000009E3779B1ULL, 0xEC2F3620E8EA8F78ULL }, /* XSUM_XXH64_testdata[1557] */\n    {  779, 0x0000000000000000ULL, 0x9316E0487B446BD0ULL }, /* XSUM_XXH64_testdata[1558] */\n    {  779, 0x000000009E3779B1ULL, 0x827337D4BE47D7E5ULL }, /* XSUM_XXH64_testdata[1559] */\n    {  780, 0x0000000000000000ULL, 0xC3A2083FED8BB647ULL }, /* XSUM_XXH64_testdata[1560] */\n    {  780, 0x000000009E3779B1ULL, 0x0041BC77E1938345ULL }, /* XSUM_XXH64_testdata[1561] */\n    {  781, 0x0000000000000000ULL, 0xDBFBDA21100250E2ULL }, /* XSUM_XXH64_testdata[1562] */\n    {  781, 0x000000009E3779B1ULL, 0xA3E23F2210DCAE3AULL }, /* XSUM_XXH64_testdata[1563] */\n    {  782, 0x0000000000000000ULL, 0xB32650EC85A8E89FULL }, /* XSUM_XXH64_testdata[1564] */\n    {  782, 0x000000009E3779B1ULL, 0x0BBAB579A14A004EULL }, /* XSUM_XXH64_testdata[1565] */\n    {  783, 0x0000000000000000ULL, 0x0F8892E334EBFEDEULL }, /* XSUM_XXH64_testdata[1566] */\n    {  783, 0x000000009E3779B1ULL, 0xF8143EE621E4AB31ULL }, /* XSUM_XXH64_testdata[1567] */\n    {  784, 0x0000000000000000ULL, 0xBF068128DEE1921BULL }, /* XSUM_XXH64_testdata[1568] */\n    {  784, 0x000000009E3779B1ULL, 0x9B65026776A13013ULL }, /* XSUM_XXH64_testdata[1569] */\n    {  785, 0x0000000000000000ULL, 0x64CDF4EA244DF2B4ULL }, /* XSUM_XXH64_testdata[1570] */\n    {  785, 0x000000009E3779B1ULL, 0x10EAC153A44AD4DDULL }, /* XSUM_XXH64_testdata[1571] */\n    {  786, 0x0000000000000000ULL, 0x87B568D354323734ULL }, /* XSUM_XXH64_testdata[1572] */\n    {  786, 0x000000009E3779B1ULL, 0xD48FCD6C08DA914EULL }, /* XSUM_XXH64_testdata[1573] */\n    {  787, 0x0000000000000000ULL, 0x38C6ED425960C0E3ULL }, /* XSUM_XXH64_testdata[1574] */\n    {  787, 0x000000009E3779B1ULL, 0xEBB7C1C275F63D62ULL }, /* XSUM_XXH64_testdata[1575] */\n    {  788, 0x0000000000000000ULL, 0x8C44FE365B657772ULL }, /* XSUM_XXH64_testdata[1576] */\n    {  788, 0x000000009E3779B1ULL, 0xD1B95B6CFF78274DULL }, /* XSUM_XXH64_testdata[1577] */\n    {  789, 0x0000000000000000ULL, 0x3E3499D6967BAEE5ULL }, /* XSUM_XXH64_testdata[1578] */\n    {  789, 0x000000009E3779B1ULL, 0x441E0EEB1BF63691ULL }, /* XSUM_XXH64_testdata[1579] */\n    {  790, 0x0000000000000000ULL, 0x3C6390B33F391A0EULL }, /* XSUM_XXH64_testdata[1580] */\n    {  790, 0x000000009E3779B1ULL, 0x72B21F7207AE0919ULL }, /* XSUM_XXH64_testdata[1581] */\n    {  791, 0x0000000000000000ULL, 0x51D21456E0E73F66ULL }, /* XSUM_XXH64_testdata[1582] */\n    {  791, 0x000000009E3779B1ULL, 0x1BACAF65F7984266ULL }, /* XSUM_XXH64_testdata[1583] */\n    {  792, 0x0000000000000000ULL, 0x8C7368A49E49CC53ULL }, /* XSUM_XXH64_testdata[1584] */\n    {  792, 0x000000009E3779B1ULL, 0x0CB319EAD0DE8855ULL }, /* XSUM_XXH64_testdata[1585] */\n    {  793, 0x0000000000000000ULL, 0xCA68FA5D6F365ED0ULL }, /* XSUM_XXH64_testdata[1586] */\n    {  793, 0x000000009E3779B1ULL, 0x2DEC7894FA59249EULL }, /* XSUM_XXH64_testdata[1587] */\n    {  794, 0x0000000000000000ULL, 0x38C01A76599E30DEULL }, /* XSUM_XXH64_testdata[1588] */\n    {  794, 0x000000009E3779B1ULL, 0xCF66B041DCA10B35ULL }, /* XSUM_XXH64_testdata[1589] */\n    {  795, 0x0000000000000000ULL, 0xB0A8FC8D3F57896FULL }, /* XSUM_XXH64_testdata[1590] */\n    {  795, 0x000000009E3779B1ULL, 0x27A3200AD7C3DC6AULL }, /* XSUM_XXH64_testdata[1591] */\n    {  796, 0x0000000000000000ULL, 0xBA5D75B684F4BC67ULL }, /* XSUM_XXH64_testdata[1592] */\n    {  796, 0x000000009E3779B1ULL, 0xA66532CCF59A4609ULL }, /* XSUM_XXH64_testdata[1593] */\n    {  797, 0x0000000000000000ULL, 0x1BD78A442184A931ULL }, /* XSUM_XXH64_testdata[1594] */\n    {  797, 0x000000009E3779B1ULL, 0x7E00B4870724948BULL }, /* XSUM_XXH64_testdata[1595] */\n    {  798, 0x0000000000000000ULL, 0x6AFAB3B116CB725EULL }, /* XSUM_XXH64_testdata[1596] */\n    {  798, 0x000000009E3779B1ULL, 0x6540810BA11F814EULL }, /* XSUM_XXH64_testdata[1597] */\n    {  799, 0x0000000000000000ULL, 0x5A0EB3EF550813BAULL }, /* XSUM_XXH64_testdata[1598] */\n    {  799, 0x000000009E3779B1ULL, 0x854F440E0C3C0B35ULL }, /* XSUM_XXH64_testdata[1599] */\n    {  800, 0x0000000000000000ULL, 0x244E56B2868A0944ULL }, /* XSUM_XXH64_testdata[1600] */\n    {  800, 0x000000009E3779B1ULL, 0x56EF1FA810F64E8DULL }, /* XSUM_XXH64_testdata[1601] */\n    {  801, 0x0000000000000000ULL, 0xDA930E45B6312ECBULL }, /* XSUM_XXH64_testdata[1602] */\n    {  801, 0x000000009E3779B1ULL, 0x4E0D99BAE5F0886FULL }, /* XSUM_XXH64_testdata[1603] */\n    {  802, 0x0000000000000000ULL, 0xF6182C524C449150ULL }, /* XSUM_XXH64_testdata[1604] */\n    {  802, 0x000000009E3779B1ULL, 0x7CB2C154B4E3EC88ULL }, /* XSUM_XXH64_testdata[1605] */\n    {  803, 0x0000000000000000ULL, 0xCF26324B8DA162DFULL }, /* XSUM_XXH64_testdata[1606] */\n    {  803, 0x000000009E3779B1ULL, 0x78FB10568FCC433EULL }, /* XSUM_XXH64_testdata[1607] */\n    {  804, 0x0000000000000000ULL, 0x42C4682264A9671BULL }, /* XSUM_XXH64_testdata[1608] */\n    {  804, 0x000000009E3779B1ULL, 0x41CAC9D65E5A3DC1ULL }, /* XSUM_XXH64_testdata[1609] */\n    {  805, 0x0000000000000000ULL, 0xB0DD0D6AC91A338BULL }, /* XSUM_XXH64_testdata[1610] */\n    {  805, 0x000000009E3779B1ULL, 0x39E04426DC2028BBULL }, /* XSUM_XXH64_testdata[1611] */\n    {  806, 0x0000000000000000ULL, 0xA1CBC14F0F3C3470ULL }, /* XSUM_XXH64_testdata[1612] */\n    {  806, 0x000000009E3779B1ULL, 0x07FA9B7D8AE43063ULL }, /* XSUM_XXH64_testdata[1613] */\n    {  807, 0x0000000000000000ULL, 0x7ED2B5BF5CB35E5BULL }, /* XSUM_XXH64_testdata[1614] */\n    {  807, 0x000000009E3779B1ULL, 0xFC15449D36A6772BULL }, /* XSUM_XXH64_testdata[1615] */\n    {  808, 0x0000000000000000ULL, 0xD1DF37277BE7DFA2ULL }, /* XSUM_XXH64_testdata[1616] */\n    {  808, 0x000000009E3779B1ULL, 0xD49C8B4D78D976FEULL }, /* XSUM_XXH64_testdata[1617] */\n    {  809, 0x0000000000000000ULL, 0xF4F1B57FC8C040A8ULL }, /* XSUM_XXH64_testdata[1618] */\n    {  809, 0x000000009E3779B1ULL, 0x01F7D6B05F87A1ECULL }, /* XSUM_XXH64_testdata[1619] */\n    {  810, 0x0000000000000000ULL, 0x82EF84CF79BB87A4ULL }, /* XSUM_XXH64_testdata[1620] */\n    {  810, 0x000000009E3779B1ULL, 0x0ED3237E7B220E42ULL }, /* XSUM_XXH64_testdata[1621] */\n    {  811, 0x0000000000000000ULL, 0x443A0FF4897979D6ULL }, /* XSUM_XXH64_testdata[1622] */\n    {  811, 0x000000009E3779B1ULL, 0x2B903EF2F3BA86D0ULL }, /* XSUM_XXH64_testdata[1623] */\n    {  812, 0x0000000000000000ULL, 0x72BC3E80D2A90898ULL }, /* XSUM_XXH64_testdata[1624] */\n    {  812, 0x000000009E3779B1ULL, 0xF6B7CC07E96C2CE5ULL }, /* XSUM_XXH64_testdata[1625] */\n    {  813, 0x0000000000000000ULL, 0xB51DAA1C83EEF3F2ULL }, /* XSUM_XXH64_testdata[1626] */\n    {  813, 0x000000009E3779B1ULL, 0xDC6A3D3DB077BFC6ULL }, /* XSUM_XXH64_testdata[1627] */\n    {  814, 0x0000000000000000ULL, 0x881C1225846B1F06ULL }, /* XSUM_XXH64_testdata[1628] */\n    {  814, 0x000000009E3779B1ULL, 0xE38BBFD98A656883ULL }, /* XSUM_XXH64_testdata[1629] */\n    {  815, 0x0000000000000000ULL, 0x4E66F384826BD596ULL }, /* XSUM_XXH64_testdata[1630] */\n    {  815, 0x000000009E3779B1ULL, 0xF4A1FC10695C98A6ULL }, /* XSUM_XXH64_testdata[1631] */\n    {  816, 0x0000000000000000ULL, 0x353A363E0972420BULL }, /* XSUM_XXH64_testdata[1632] */\n    {  816, 0x000000009E3779B1ULL, 0x7D4B7B24CB16C5B0ULL }, /* XSUM_XXH64_testdata[1633] */\n    {  817, 0x0000000000000000ULL, 0x7A42B99973DFAB20ULL }, /* XSUM_XXH64_testdata[1634] */\n    {  817, 0x000000009E3779B1ULL, 0x5AE58B1762159F8BULL }, /* XSUM_XXH64_testdata[1635] */\n    {  818, 0x0000000000000000ULL, 0x2BB206E8538ACE55ULL }, /* XSUM_XXH64_testdata[1636] */\n    {  818, 0x000000009E3779B1ULL, 0xED2363516B645D7FULL }, /* XSUM_XXH64_testdata[1637] */\n    {  819, 0x0000000000000000ULL, 0x84B50FF7722D4142ULL }, /* XSUM_XXH64_testdata[1638] */\n    {  819, 0x000000009E3779B1ULL, 0x0811B5A596470497ULL }, /* XSUM_XXH64_testdata[1639] */\n    {  820, 0x0000000000000000ULL, 0xA0AD40767F613E0FULL }, /* XSUM_XXH64_testdata[1640] */\n    {  820, 0x000000009E3779B1ULL, 0x018E5F50754DE2D4ULL }, /* XSUM_XXH64_testdata[1641] */\n    {  821, 0x0000000000000000ULL, 0xA2B047AF06AE5BE2ULL }, /* XSUM_XXH64_testdata[1642] */\n    {  821, 0x000000009E3779B1ULL, 0xD9CC9EDDFF3E06E6ULL }, /* XSUM_XXH64_testdata[1643] */\n    {  822, 0x0000000000000000ULL, 0x0315BEEF76458DB0ULL }, /* XSUM_XXH64_testdata[1644] */\n    {  822, 0x000000009E3779B1ULL, 0x5E77353EC42C0616ULL }, /* XSUM_XXH64_testdata[1645] */\n    {  823, 0x0000000000000000ULL, 0xF5446208089F49D3ULL }, /* XSUM_XXH64_testdata[1646] */\n    {  823, 0x000000009E3779B1ULL, 0xC1EB228206F03473ULL }, /* XSUM_XXH64_testdata[1647] */\n    {  824, 0x0000000000000000ULL, 0xF0300A6A0C72D595ULL }, /* XSUM_XXH64_testdata[1648] */\n    {  824, 0x000000009E3779B1ULL, 0xB93F9E28D37ED75BULL }, /* XSUM_XXH64_testdata[1649] */\n    {  825, 0x0000000000000000ULL, 0xE38D4F27372C9836ULL }, /* XSUM_XXH64_testdata[1650] */\n    {  825, 0x000000009E3779B1ULL, 0xA6E982E62AB658DAULL }, /* XSUM_XXH64_testdata[1651] */\n    {  826, 0x0000000000000000ULL, 0x6A11FF2CB76790F6ULL }, /* XSUM_XXH64_testdata[1652] */\n    {  826, 0x000000009E3779B1ULL, 0x4C7256B58304E77DULL }, /* XSUM_XXH64_testdata[1653] */\n    {  827, 0x0000000000000000ULL, 0x878674A0772ED595ULL }, /* XSUM_XXH64_testdata[1654] */\n    {  827, 0x000000009E3779B1ULL, 0xF0F34E88479A2D89ULL }, /* XSUM_XXH64_testdata[1655] */\n    {  828, 0x0000000000000000ULL, 0x13E960559E0CE9B7ULL }, /* XSUM_XXH64_testdata[1656] */\n    {  828, 0x000000009E3779B1ULL, 0x1487F52D81EDF8DFULL }, /* XSUM_XXH64_testdata[1657] */\n    {  829, 0x0000000000000000ULL, 0xACEA80F8C6E44192ULL }, /* XSUM_XXH64_testdata[1658] */\n    {  829, 0x000000009E3779B1ULL, 0x52EA26606D24635CULL }, /* XSUM_XXH64_testdata[1659] */\n    {  830, 0x0000000000000000ULL, 0x2ED7C1D98D3AE131ULL }, /* XSUM_XXH64_testdata[1660] */\n    {  830, 0x000000009E3779B1ULL, 0xD76EAA945F2154B3ULL }, /* XSUM_XXH64_testdata[1661] */\n    {  831, 0x0000000000000000ULL, 0xCDB1D04F55C2F84BULL }, /* XSUM_XXH64_testdata[1662] */\n    {  831, 0x000000009E3779B1ULL, 0x447BFC74CBAB8F87ULL }, /* XSUM_XXH64_testdata[1663] */\n    {  832, 0x0000000000000000ULL, 0x3D5BAE42715B0A4DULL }, /* XSUM_XXH64_testdata[1664] */\n    {  832, 0x000000009E3779B1ULL, 0x2B7257C21CFC4A6EULL }, /* XSUM_XXH64_testdata[1665] */\n    {  833, 0x0000000000000000ULL, 0x14903D37319352FDULL }, /* XSUM_XXH64_testdata[1666] */\n    {  833, 0x000000009E3779B1ULL, 0x6A57053BF3B5FB80ULL }, /* XSUM_XXH64_testdata[1667] */\n    {  834, 0x0000000000000000ULL, 0x187F9B803814D2D1ULL }, /* XSUM_XXH64_testdata[1668] */\n    {  834, 0x000000009E3779B1ULL, 0x885529ECCED2ADA8ULL }, /* XSUM_XXH64_testdata[1669] */\n    {  835, 0x0000000000000000ULL, 0x644EE28E3AD57EEFULL }, /* XSUM_XXH64_testdata[1670] */\n    {  835, 0x000000009E3779B1ULL, 0xD7968228B0C69B5CULL }, /* XSUM_XXH64_testdata[1671] */\n    {  836, 0x0000000000000000ULL, 0xF19A2B5515B47595ULL }, /* XSUM_XXH64_testdata[1672] */\n    {  836, 0x000000009E3779B1ULL, 0xD72A1257C29B5741ULL }, /* XSUM_XXH64_testdata[1673] */\n    {  837, 0x0000000000000000ULL, 0x16389D633B41A832ULL }, /* XSUM_XXH64_testdata[1674] */\n    {  837, 0x000000009E3779B1ULL, 0xADD0AB275CDC5412ULL }, /* XSUM_XXH64_testdata[1675] */\n    {  838, 0x0000000000000000ULL, 0x24F087F628F098B7ULL }, /* XSUM_XXH64_testdata[1676] */\n    {  838, 0x000000009E3779B1ULL, 0x876D727FA2EC8878ULL }, /* XSUM_XXH64_testdata[1677] */\n    {  839, 0x0000000000000000ULL, 0x8BC940DB4A965289ULL }, /* XSUM_XXH64_testdata[1678] */\n    {  839, 0x000000009E3779B1ULL, 0x90D59D4D67730DF3ULL }, /* XSUM_XXH64_testdata[1679] */\n    {  840, 0x0000000000000000ULL, 0x13F577CF676D19EFULL }, /* XSUM_XXH64_testdata[1680] */\n    {  840, 0x000000009E3779B1ULL, 0x352763C726049A02ULL }, /* XSUM_XXH64_testdata[1681] */\n    {  841, 0x0000000000000000ULL, 0x22865F907214C8F1ULL }, /* XSUM_XXH64_testdata[1682] */\n    {  841, 0x000000009E3779B1ULL, 0xFD7850074C82CF88ULL }, /* XSUM_XXH64_testdata[1683] */\n    {  842, 0x0000000000000000ULL, 0xD0BADDA2D0D96347ULL }, /* XSUM_XXH64_testdata[1684] */\n    {  842, 0x000000009E3779B1ULL, 0xB818EFDB230697ACULL }, /* XSUM_XXH64_testdata[1685] */\n    {  843, 0x0000000000000000ULL, 0x0BEF1A213934ED65ULL }, /* XSUM_XXH64_testdata[1686] */\n    {  843, 0x000000009E3779B1ULL, 0xDA78886C69D7CBA5ULL }, /* XSUM_XXH64_testdata[1687] */\n    {  844, 0x0000000000000000ULL, 0xE10659BDCD007C7BULL }, /* XSUM_XXH64_testdata[1688] */\n    {  844, 0x000000009E3779B1ULL, 0xBC34E6853275F1D3ULL }, /* XSUM_XXH64_testdata[1689] */\n    {  845, 0x0000000000000000ULL, 0x618D077757488504ULL }, /* XSUM_XXH64_testdata[1690] */\n    {  845, 0x000000009E3779B1ULL, 0xB4FCE3B927B285D3ULL }, /* XSUM_XXH64_testdata[1691] */\n    {  846, 0x0000000000000000ULL, 0xBC3E4ECBCB0E099AULL }, /* XSUM_XXH64_testdata[1692] */\n    {  846, 0x000000009E3779B1ULL, 0xF58A5039F831A050ULL }, /* XSUM_XXH64_testdata[1693] */\n    {  847, 0x0000000000000000ULL, 0x2AF26B61A1340B8DULL }, /* XSUM_XXH64_testdata[1694] */\n    {  847, 0x000000009E3779B1ULL, 0x1EF4C8078AF7027BULL }, /* XSUM_XXH64_testdata[1695] */\n    {  848, 0x0000000000000000ULL, 0xF79ED3B2C96B1A54ULL }, /* XSUM_XXH64_testdata[1696] */\n    {  848, 0x000000009E3779B1ULL, 0x96FBFA709C8819BEULL }, /* XSUM_XXH64_testdata[1697] */\n    {  849, 0x0000000000000000ULL, 0x96756A37A3210EADULL }, /* XSUM_XXH64_testdata[1698] */\n    {  849, 0x000000009E3779B1ULL, 0xC29466933248138FULL }, /* XSUM_XXH64_testdata[1699] */\n    {  850, 0x0000000000000000ULL, 0x14F7DC8FC7D2E823ULL }, /* XSUM_XXH64_testdata[1700] */\n    {  850, 0x000000009E3779B1ULL, 0xD6B9613FC6CD622AULL }, /* XSUM_XXH64_testdata[1701] */\n    {  851, 0x0000000000000000ULL, 0x4623123A3E51EA8EULL }, /* XSUM_XXH64_testdata[1702] */\n    {  851, 0x000000009E3779B1ULL, 0x4C7610EDC37BC6FCULL }, /* XSUM_XXH64_testdata[1703] */\n    {  852, 0x0000000000000000ULL, 0x7A51C1212D0B090EULL }, /* XSUM_XXH64_testdata[1704] */\n    {  852, 0x000000009E3779B1ULL, 0xA59FEBF6A4C5DE71ULL }, /* XSUM_XXH64_testdata[1705] */\n    {  853, 0x0000000000000000ULL, 0x7A0E98E60EB6AAF8ULL }, /* XSUM_XXH64_testdata[1706] */\n    {  853, 0x000000009E3779B1ULL, 0x34DC1180870A5B26ULL }, /* XSUM_XXH64_testdata[1707] */\n    {  854, 0x0000000000000000ULL, 0xB102435DDFA595A1ULL }, /* XSUM_XXH64_testdata[1708] */\n    {  854, 0x000000009E3779B1ULL, 0xF0D311DEA553C143ULL }, /* XSUM_XXH64_testdata[1709] */\n    {  855, 0x0000000000000000ULL, 0x34FE3D73223764B1ULL }, /* XSUM_XXH64_testdata[1710] */\n    {  855, 0x000000009E3779B1ULL, 0x6BE2B2985F732D96ULL }, /* XSUM_XXH64_testdata[1711] */\n    {  856, 0x0000000000000000ULL, 0x20598ABFBD474FECULL }, /* XSUM_XXH64_testdata[1712] */\n    {  856, 0x000000009E3779B1ULL, 0x23EF0E301BD9C9F4ULL }, /* XSUM_XXH64_testdata[1713] */\n    {  857, 0x0000000000000000ULL, 0x78FA616B50E3AD85ULL }, /* XSUM_XXH64_testdata[1714] */\n    {  857, 0x000000009E3779B1ULL, 0xE6C6095C888BCCE7ULL }, /* XSUM_XXH64_testdata[1715] */\n    {  858, 0x0000000000000000ULL, 0xB01B0E699EB746EBULL }, /* XSUM_XXH64_testdata[1716] */\n    {  858, 0x000000009E3779B1ULL, 0xB28D543D22BF9F46ULL }, /* XSUM_XXH64_testdata[1717] */\n    {  859, 0x0000000000000000ULL, 0x00EDD4B3544BC2EBULL }, /* XSUM_XXH64_testdata[1718] */\n    {  859, 0x000000009E3779B1ULL, 0x7ABBBB750FA86995ULL }, /* XSUM_XXH64_testdata[1719] */\n    {  860, 0x0000000000000000ULL, 0x653CFAF1456F5C13ULL }, /* XSUM_XXH64_testdata[1720] */\n    {  860, 0x000000009E3779B1ULL, 0xD81F68EC451802ADULL }, /* XSUM_XXH64_testdata[1721] */\n    {  861, 0x0000000000000000ULL, 0x5AA0BA4E43D1C793ULL }, /* XSUM_XXH64_testdata[1722] */\n    {  861, 0x000000009E3779B1ULL, 0x862D2B34AB6D6026ULL }, /* XSUM_XXH64_testdata[1723] */\n    {  862, 0x0000000000000000ULL, 0x8FC68F658FE9A5CBULL }, /* XSUM_XXH64_testdata[1724] */\n    {  862, 0x000000009E3779B1ULL, 0xD1042671C598BBE5ULL }, /* XSUM_XXH64_testdata[1725] */\n    {  863, 0x0000000000000000ULL, 0xFA0BAC7815DF9FD5ULL }, /* XSUM_XXH64_testdata[1726] */\n    {  863, 0x000000009E3779B1ULL, 0xFD84DE08D873DD81ULL }, /* XSUM_XXH64_testdata[1727] */\n    {  864, 0x0000000000000000ULL, 0x6373353385388B37ULL }, /* XSUM_XXH64_testdata[1728] */\n    {  864, 0x000000009E3779B1ULL, 0x4FC416586122807FULL }, /* XSUM_XXH64_testdata[1729] */\n    {  865, 0x0000000000000000ULL, 0x835E5BC3000B56D9ULL }, /* XSUM_XXH64_testdata[1730] */\n    {  865, 0x000000009E3779B1ULL, 0xBBDB205A685690D8ULL }, /* XSUM_XXH64_testdata[1731] */\n    {  866, 0x0000000000000000ULL, 0xB707397892276BE4ULL }, /* XSUM_XXH64_testdata[1732] */\n    {  866, 0x000000009E3779B1ULL, 0x103F64ECB55F4F46ULL }, /* XSUM_XXH64_testdata[1733] */\n    {  867, 0x0000000000000000ULL, 0x9EA0EC20007A11B1ULL }, /* XSUM_XXH64_testdata[1734] */\n    {  867, 0x000000009E3779B1ULL, 0xA5E19F6A316EAB66ULL }, /* XSUM_XXH64_testdata[1735] */\n    {  868, 0x0000000000000000ULL, 0xB80C7041CCF517D6ULL }, /* XSUM_XXH64_testdata[1736] */\n    {  868, 0x000000009E3779B1ULL, 0xCE738A5D8C69D9B3ULL }, /* XSUM_XXH64_testdata[1737] */\n    {  869, 0x0000000000000000ULL, 0x11F02C4D181DB0C4ULL }, /* XSUM_XXH64_testdata[1738] */\n    {  869, 0x000000009E3779B1ULL, 0x1ABBF191C6AC687DULL }, /* XSUM_XXH64_testdata[1739] */\n    {  870, 0x0000000000000000ULL, 0x1D5062D6896F877BULL }, /* XSUM_XXH64_testdata[1740] */\n    {  870, 0x000000009E3779B1ULL, 0x1DCC8C9627E6FCB2ULL }, /* XSUM_XXH64_testdata[1741] */\n    {  871, 0x0000000000000000ULL, 0xD7AB279F53AE77E1ULL }, /* XSUM_XXH64_testdata[1742] */\n    {  871, 0x000000009E3779B1ULL, 0x52EE0D0915817876ULL }, /* XSUM_XXH64_testdata[1743] */\n    {  872, 0x0000000000000000ULL, 0x6100FBA816FBE4B7ULL }, /* XSUM_XXH64_testdata[1744] */\n    {  872, 0x000000009E3779B1ULL, 0x05F758578F82E391ULL }, /* XSUM_XXH64_testdata[1745] */\n    {  873, 0x0000000000000000ULL, 0x6DDA6AD4BA4323C2ULL }, /* XSUM_XXH64_testdata[1746] */\n    {  873, 0x000000009E3779B1ULL, 0xFCEC2E73753D4906ULL }, /* XSUM_XXH64_testdata[1747] */\n    {  874, 0x0000000000000000ULL, 0xEA548563BD01937AULL }, /* XSUM_XXH64_testdata[1748] */\n    {  874, 0x000000009E3779B1ULL, 0x90EAC483FD3859BEULL }, /* XSUM_XXH64_testdata[1749] */\n    {  875, 0x0000000000000000ULL, 0x30CC37EC769EFFFEULL }, /* XSUM_XXH64_testdata[1750] */\n    {  875, 0x000000009E3779B1ULL, 0xCD0C3D904462D60BULL }, /* XSUM_XXH64_testdata[1751] */\n    {  876, 0x0000000000000000ULL, 0x63353497BD23E476ULL }, /* XSUM_XXH64_testdata[1752] */\n    {  876, 0x000000009E3779B1ULL, 0x76AF9EAEA230D908ULL }, /* XSUM_XXH64_testdata[1753] */\n    {  877, 0x0000000000000000ULL, 0x0EC5420E89F88130ULL }, /* XSUM_XXH64_testdata[1754] */\n    {  877, 0x000000009E3779B1ULL, 0xE1BF1BE604D2B4C2ULL }, /* XSUM_XXH64_testdata[1755] */\n    {  878, 0x0000000000000000ULL, 0xBBE3953E2005F359ULL }, /* XSUM_XXH64_testdata[1756] */\n    {  878, 0x000000009E3779B1ULL, 0xDAAFEE6A0B433A74ULL }, /* XSUM_XXH64_testdata[1757] */\n    {  879, 0x0000000000000000ULL, 0x90D3F6F33135D83CULL }, /* XSUM_XXH64_testdata[1758] */\n    {  879, 0x000000009E3779B1ULL, 0x7C78584945F9D2A3ULL }, /* XSUM_XXH64_testdata[1759] */\n    {  880, 0x0000000000000000ULL, 0x2173BFC7F9032555ULL }, /* XSUM_XXH64_testdata[1760] */\n    {  880, 0x000000009E3779B1ULL, 0x902DC15CC0AA4C5AULL }, /* XSUM_XXH64_testdata[1761] */\n    {  881, 0x0000000000000000ULL, 0x2DED0B261F610F06ULL }, /* XSUM_XXH64_testdata[1762] */\n    {  881, 0x000000009E3779B1ULL, 0xA08653A777086DCEULL }, /* XSUM_XXH64_testdata[1763] */\n    {  882, 0x0000000000000000ULL, 0x0ACB705226711CA0ULL }, /* XSUM_XXH64_testdata[1764] */\n    {  882, 0x000000009E3779B1ULL, 0x67539F629AA80FCDULL }, /* XSUM_XXH64_testdata[1765] */\n    {  883, 0x0000000000000000ULL, 0xFB4F87330ACE424FULL }, /* XSUM_XXH64_testdata[1766] */\n    {  883, 0x000000009E3779B1ULL, 0xFBBF941BBD03CA43ULL }, /* XSUM_XXH64_testdata[1767] */\n    {  884, 0x0000000000000000ULL, 0xFD0C5105ACA1A57CULL }, /* XSUM_XXH64_testdata[1768] */\n    {  884, 0x000000009E3779B1ULL, 0x9162AAFE35995B6AULL }, /* XSUM_XXH64_testdata[1769] */\n    {  885, 0x0000000000000000ULL, 0x617C8D7EBF788394ULL }, /* XSUM_XXH64_testdata[1770] */\n    {  885, 0x000000009E3779B1ULL, 0xD0D668987E17D7A3ULL }, /* XSUM_XXH64_testdata[1771] */\n    {  886, 0x0000000000000000ULL, 0x8104F0CAB9035C58ULL }, /* XSUM_XXH64_testdata[1772] */\n    {  886, 0x000000009E3779B1ULL, 0x4942ACF21CD8A90DULL }, /* XSUM_XXH64_testdata[1773] */\n    {  887, 0x0000000000000000ULL, 0x2FADF9CA07A368FEULL }, /* XSUM_XXH64_testdata[1774] */\n    {  887, 0x000000009E3779B1ULL, 0xA350EC17F8C8EAD1ULL }, /* XSUM_XXH64_testdata[1775] */\n    {  888, 0x0000000000000000ULL, 0x51137DC208D0EB75ULL }, /* XSUM_XXH64_testdata[1776] */\n    {  888, 0x000000009E3779B1ULL, 0x46F46544CFC2FC22ULL }, /* XSUM_XXH64_testdata[1777] */\n    {  889, 0x0000000000000000ULL, 0x266CEF1EB52AF50CULL }, /* XSUM_XXH64_testdata[1778] */\n    {  889, 0x000000009E3779B1ULL, 0xE63F8CD1C1F84E55ULL }, /* XSUM_XXH64_testdata[1779] */\n    {  890, 0x0000000000000000ULL, 0xDDD3DCFD409BF671ULL }, /* XSUM_XXH64_testdata[1780] */\n    {  890, 0x000000009E3779B1ULL, 0xD6AF89F86CDAFE00ULL }, /* XSUM_XXH64_testdata[1781] */\n    {  891, 0x0000000000000000ULL, 0xA0F0F0A8BAF698BCULL }, /* XSUM_XXH64_testdata[1782] */\n    {  891, 0x000000009E3779B1ULL, 0x65A52A08268C9FA9ULL }, /* XSUM_XXH64_testdata[1783] */\n    {  892, 0x0000000000000000ULL, 0x948FAAF326AA6BC8ULL }, /* XSUM_XXH64_testdata[1784] */\n    {  892, 0x000000009E3779B1ULL, 0xD36A712FA68B81BCULL }, /* XSUM_XXH64_testdata[1785] */\n    {  893, 0x0000000000000000ULL, 0x9D1294E8EA5B2767ULL }, /* XSUM_XXH64_testdata[1786] */\n    {  893, 0x000000009E3779B1ULL, 0xC748D486CA7151A5ULL }, /* XSUM_XXH64_testdata[1787] */\n    {  894, 0x0000000000000000ULL, 0xEE40D26539640704ULL }, /* XSUM_XXH64_testdata[1788] */\n    {  894, 0x000000009E3779B1ULL, 0x463157CD339EF85DULL }, /* XSUM_XXH64_testdata[1789] */\n    {  895, 0x0000000000000000ULL, 0xB7D94BB4FB407B22ULL }, /* XSUM_XXH64_testdata[1790] */\n    {  895, 0x000000009E3779B1ULL, 0x6B4D2776EEE18DDFULL }, /* XSUM_XXH64_testdata[1791] */\n    {  896, 0x0000000000000000ULL, 0xACA27EEA7D739BABULL }, /* XSUM_XXH64_testdata[1792] */\n    {  896, 0x000000009E3779B1ULL, 0xD91B812648A1A30EULL }, /* XSUM_XXH64_testdata[1793] */\n    {  897, 0x0000000000000000ULL, 0xA9524B99C07C465CULL }, /* XSUM_XXH64_testdata[1794] */\n    {  897, 0x000000009E3779B1ULL, 0x30A74381F6CDEBAFULL }, /* XSUM_XXH64_testdata[1795] */\n    {  898, 0x0000000000000000ULL, 0x3F76A1A71AFF82FEULL }, /* XSUM_XXH64_testdata[1796] */\n    {  898, 0x000000009E3779B1ULL, 0xB6BE86367CAAA2A8ULL }, /* XSUM_XXH64_testdata[1797] */\n    {  899, 0x0000000000000000ULL, 0x48B60A2794AFDF38ULL }, /* XSUM_XXH64_testdata[1798] */\n    {  899, 0x000000009E3779B1ULL, 0xCF13844A85C42640ULL }, /* XSUM_XXH64_testdata[1799] */\n    {  900, 0x0000000000000000ULL, 0x34FC8153AD7AB930ULL }, /* XSUM_XXH64_testdata[1800] */\n    {  900, 0x000000009E3779B1ULL, 0x8F7622513B1D9DC2ULL }, /* XSUM_XXH64_testdata[1801] */\n    {  901, 0x0000000000000000ULL, 0xC3486BA9844E54A7ULL }, /* XSUM_XXH64_testdata[1802] */\n    {  901, 0x000000009E3779B1ULL, 0x47B809760623D391ULL }, /* XSUM_XXH64_testdata[1803] */\n    {  902, 0x0000000000000000ULL, 0x71853AD64F8289DAULL }, /* XSUM_XXH64_testdata[1804] */\n    {  902, 0x000000009E3779B1ULL, 0x90F5DD5F5F64F358ULL }, /* XSUM_XXH64_testdata[1805] */\n    {  903, 0x0000000000000000ULL, 0xC8E0F8220B712E0CULL }, /* XSUM_XXH64_testdata[1806] */\n    {  903, 0x000000009E3779B1ULL, 0xD6F6EC9CBAA986FEULL }, /* XSUM_XXH64_testdata[1807] */\n    {  904, 0x0000000000000000ULL, 0x872BB676473843EAULL }, /* XSUM_XXH64_testdata[1808] */\n    {  904, 0x000000009E3779B1ULL, 0xBCA66531B355FBA8ULL }, /* XSUM_XXH64_testdata[1809] */\n    {  905, 0x0000000000000000ULL, 0x91511FB251237F8AULL }, /* XSUM_XXH64_testdata[1810] */\n    {  905, 0x000000009E3779B1ULL, 0x732F8750B0A8C0DEULL }, /* XSUM_XXH64_testdata[1811] */\n    {  906, 0x0000000000000000ULL, 0x334A87FB35C0DCBFULL }, /* XSUM_XXH64_testdata[1812] */\n    {  906, 0x000000009E3779B1ULL, 0x3EF0B3C2B540234BULL }, /* XSUM_XXH64_testdata[1813] */\n    {  907, 0x0000000000000000ULL, 0xAB9CD37F1726884CULL }, /* XSUM_XXH64_testdata[1814] */\n    {  907, 0x000000009E3779B1ULL, 0x65C05C61A776363CULL }, /* XSUM_XXH64_testdata[1815] */\n    {  908, 0x0000000000000000ULL, 0x7E2163FB2CF4B65AULL }, /* XSUM_XXH64_testdata[1816] */\n    {  908, 0x000000009E3779B1ULL, 0xA053852AB27A3076ULL }, /* XSUM_XXH64_testdata[1817] */\n    {  909, 0x0000000000000000ULL, 0xF29A55BE01944078ULL }, /* XSUM_XXH64_testdata[1818] */\n    {  909, 0x000000009E3779B1ULL, 0xF63E99236BD744CCULL }, /* XSUM_XXH64_testdata[1819] */\n    {  910, 0x0000000000000000ULL, 0xC1C060207E6E3340ULL }, /* XSUM_XXH64_testdata[1820] */\n    {  910, 0x000000009E3779B1ULL, 0x132569AFF75C4781ULL }, /* XSUM_XXH64_testdata[1821] */\n    {  911, 0x0000000000000000ULL, 0xB854EDCBD1292F42ULL }, /* XSUM_XXH64_testdata[1822] */\n    {  911, 0x000000009E3779B1ULL, 0x9678D0C55D435CEBULL }, /* XSUM_XXH64_testdata[1823] */\n    {  912, 0x0000000000000000ULL, 0x3D2DCB63A651366CULL }, /* XSUM_XXH64_testdata[1824] */\n    {  912, 0x000000009E3779B1ULL, 0x866B93392C2CBE06ULL }, /* XSUM_XXH64_testdata[1825] */\n    {  913, 0x0000000000000000ULL, 0xD91CC0E55EB42EDAULL }, /* XSUM_XXH64_testdata[1826] */\n    {  913, 0x000000009E3779B1ULL, 0xC1A3DFD9745C4E38ULL }, /* XSUM_XXH64_testdata[1827] */\n    {  914, 0x0000000000000000ULL, 0x61431AC8BB741ED2ULL }, /* XSUM_XXH64_testdata[1828] */\n    {  914, 0x000000009E3779B1ULL, 0x1B60366055266CF4ULL }, /* XSUM_XXH64_testdata[1829] */\n    {  915, 0x0000000000000000ULL, 0xE743BE3F686C9A6AULL }, /* XSUM_XXH64_testdata[1830] */\n    {  915, 0x000000009E3779B1ULL, 0xA1E4CE411D17F0AEULL }, /* XSUM_XXH64_testdata[1831] */\n    {  916, 0x0000000000000000ULL, 0x1BC2C6AD98A4B8EBULL }, /* XSUM_XXH64_testdata[1832] */\n    {  916, 0x000000009E3779B1ULL, 0xBDB94942A6166561ULL }, /* XSUM_XXH64_testdata[1833] */\n    {  917, 0x0000000000000000ULL, 0x061C077FABCD4E19ULL }, /* XSUM_XXH64_testdata[1834] */\n    {  917, 0x000000009E3779B1ULL, 0xA9D76EFF6A1B71A7ULL }, /* XSUM_XXH64_testdata[1835] */\n    {  918, 0x0000000000000000ULL, 0xF64A0DD5B51C30E5ULL }, /* XSUM_XXH64_testdata[1836] */\n    {  918, 0x000000009E3779B1ULL, 0x32F10E67903A0CEAULL }, /* XSUM_XXH64_testdata[1837] */\n    {  919, 0x0000000000000000ULL, 0x6B41A712104E4FF4ULL }, /* XSUM_XXH64_testdata[1838] */\n    {  919, 0x000000009E3779B1ULL, 0xE1B719F756DA4F87ULL }, /* XSUM_XXH64_testdata[1839] */\n    {  920, 0x0000000000000000ULL, 0xB3C2A0619DEA5257ULL }, /* XSUM_XXH64_testdata[1840] */\n    {  920, 0x000000009E3779B1ULL, 0x56D919AF131CF2D0ULL }, /* XSUM_XXH64_testdata[1841] */\n    {  921, 0x0000000000000000ULL, 0x51D960A7EB378757ULL }, /* XSUM_XXH64_testdata[1842] */\n    {  921, 0x000000009E3779B1ULL, 0x34CBFFC317CEF49DULL }, /* XSUM_XXH64_testdata[1843] */\n    {  922, 0x0000000000000000ULL, 0x21636E83700D176AULL }, /* XSUM_XXH64_testdata[1844] */\n    {  922, 0x000000009E3779B1ULL, 0xCCD650B5D80B7A42ULL }, /* XSUM_XXH64_testdata[1845] */\n    {  923, 0x0000000000000000ULL, 0x9CBA9ADDA8FD08A0ULL }, /* XSUM_XXH64_testdata[1846] */\n    {  923, 0x000000009E3779B1ULL, 0x0019FD4DEAE8E468ULL }, /* XSUM_XXH64_testdata[1847] */\n    {  924, 0x0000000000000000ULL, 0x1A52459A2BA85BB9ULL }, /* XSUM_XXH64_testdata[1848] */\n    {  924, 0x000000009E3779B1ULL, 0x4F90992B6872BFC9ULL }, /* XSUM_XXH64_testdata[1849] */\n    {  925, 0x0000000000000000ULL, 0x3C288D42FD23A661ULL }, /* XSUM_XXH64_testdata[1850] */\n    {  925, 0x000000009E3779B1ULL, 0xE0C5567515568C70ULL }, /* XSUM_XXH64_testdata[1851] */\n    {  926, 0x0000000000000000ULL, 0xEB52082513C838E7ULL }, /* XSUM_XXH64_testdata[1852] */\n    {  926, 0x000000009E3779B1ULL, 0xC6ACA51B377583F2ULL }, /* XSUM_XXH64_testdata[1853] */\n    {  927, 0x0000000000000000ULL, 0xCFA52F73570DA102ULL }, /* XSUM_XXH64_testdata[1854] */\n    {  927, 0x000000009E3779B1ULL, 0x181B265D9E12C92AULL }, /* XSUM_XXH64_testdata[1855] */\n    {  928, 0x0000000000000000ULL, 0xB1D71859CCDC145CULL }, /* XSUM_XXH64_testdata[1856] */\n    {  928, 0x000000009E3779B1ULL, 0xD6CF4B6547EC69EEULL }, /* XSUM_XXH64_testdata[1857] */\n    {  929, 0x0000000000000000ULL, 0x875AA57CF1490668ULL }, /* XSUM_XXH64_testdata[1858] */\n    {  929, 0x000000009E3779B1ULL, 0x7EBEC9A7306FD4F9ULL }, /* XSUM_XXH64_testdata[1859] */\n    {  930, 0x0000000000000000ULL, 0x72F30568D01F232CULL }, /* XSUM_XXH64_testdata[1860] */\n    {  930, 0x000000009E3779B1ULL, 0x5A8008AC4C3FB332ULL }, /* XSUM_XXH64_testdata[1861] */\n    {  931, 0x0000000000000000ULL, 0xBCD03F6C010345C6ULL }, /* XSUM_XXH64_testdata[1862] */\n    {  931, 0x000000009E3779B1ULL, 0x7A2F074904B3B410ULL }, /* XSUM_XXH64_testdata[1863] */\n    {  932, 0x0000000000000000ULL, 0x8903490B16E17640ULL }, /* XSUM_XXH64_testdata[1864] */\n    {  932, 0x000000009E3779B1ULL, 0x223416F08376FDE5ULL }, /* XSUM_XXH64_testdata[1865] */\n    {  933, 0x0000000000000000ULL, 0xF1A6803FE1DDC5C9ULL }, /* XSUM_XXH64_testdata[1866] */\n    {  933, 0x000000009E3779B1ULL, 0xD15553FF4F1ED44CULL }, /* XSUM_XXH64_testdata[1867] */\n    {  934, 0x0000000000000000ULL, 0xA525D3097874B9A2ULL }, /* XSUM_XXH64_testdata[1868] */\n    {  934, 0x000000009E3779B1ULL, 0xAA2A747CD00B136FULL }, /* XSUM_XXH64_testdata[1869] */\n    {  935, 0x0000000000000000ULL, 0x7F0CF6FBE99304A9ULL }, /* XSUM_XXH64_testdata[1870] */\n    {  935, 0x000000009E3779B1ULL, 0xFBD72C7CC65544ADULL }, /* XSUM_XXH64_testdata[1871] */\n    {  936, 0x0000000000000000ULL, 0x271BA1F7BA69FDD6ULL }, /* XSUM_XXH64_testdata[1872] */\n    {  936, 0x000000009E3779B1ULL, 0xFCEAFEE0E7192C17ULL }, /* XSUM_XXH64_testdata[1873] */\n    {  937, 0x0000000000000000ULL, 0xE247C25676C513CBULL }, /* XSUM_XXH64_testdata[1874] */\n    {  937, 0x000000009E3779B1ULL, 0xE033EC0A4174FF52ULL }, /* XSUM_XXH64_testdata[1875] */\n    {  938, 0x0000000000000000ULL, 0xBEFB4A77652C56CCULL }, /* XSUM_XXH64_testdata[1876] */\n    {  938, 0x000000009E3779B1ULL, 0xC2B61FDD3ADF5FF7ULL }, /* XSUM_XXH64_testdata[1877] */\n    {  939, 0x0000000000000000ULL, 0x6DCDECDEAB57050CULL }, /* XSUM_XXH64_testdata[1878] */\n    {  939, 0x000000009E3779B1ULL, 0x92EFA9FA284D912AULL }, /* XSUM_XXH64_testdata[1879] */\n    {  940, 0x0000000000000000ULL, 0xE4E419CBB76D0043ULL }, /* XSUM_XXH64_testdata[1880] */\n    {  940, 0x000000009E3779B1ULL, 0x8839ADEFCB662FDFULL }, /* XSUM_XXH64_testdata[1881] */\n    {  941, 0x0000000000000000ULL, 0x3068ACB573BD2B6EULL }, /* XSUM_XXH64_testdata[1882] */\n    {  941, 0x000000009E3779B1ULL, 0x839D40868319A3C4ULL }, /* XSUM_XXH64_testdata[1883] */\n    {  942, 0x0000000000000000ULL, 0x344DEE28071338FBULL }, /* XSUM_XXH64_testdata[1884] */\n    {  942, 0x000000009E3779B1ULL, 0x83E70B9C55EF5493ULL }, /* XSUM_XXH64_testdata[1885] */\n    {  943, 0x0000000000000000ULL, 0xFDB4A05A196ED5EDULL }, /* XSUM_XXH64_testdata[1886] */\n    {  943, 0x000000009E3779B1ULL, 0xAED74734787C4863ULL }, /* XSUM_XXH64_testdata[1887] */\n    {  944, 0x0000000000000000ULL, 0xE722DCF003C977BAULL }, /* XSUM_XXH64_testdata[1888] */\n    {  944, 0x000000009E3779B1ULL, 0x895309BDF32FDDE3ULL }, /* XSUM_XXH64_testdata[1889] */\n    {  945, 0x0000000000000000ULL, 0x43B3463ABE9F927AULL }, /* XSUM_XXH64_testdata[1890] */\n    {  945, 0x000000009E3779B1ULL, 0x576727D13DE3DD5DULL }, /* XSUM_XXH64_testdata[1891] */\n    {  946, 0x0000000000000000ULL, 0x5B9767F7D6B88323ULL }, /* XSUM_XXH64_testdata[1892] */\n    {  946, 0x000000009E3779B1ULL, 0x3E216AC3955B31C0ULL }, /* XSUM_XXH64_testdata[1893] */\n    {  947, 0x0000000000000000ULL, 0xDA3134F286975C2FULL }, /* XSUM_XXH64_testdata[1894] */\n    {  947, 0x000000009E3779B1ULL, 0x3295559B81610B4BULL }, /* XSUM_XXH64_testdata[1895] */\n    {  948, 0x0000000000000000ULL, 0xA97793ACCF18126EULL }, /* XSUM_XXH64_testdata[1896] */\n    {  948, 0x000000009E3779B1ULL, 0x9B108BD762652A33ULL }, /* XSUM_XXH64_testdata[1897] */\n    {  949, 0x0000000000000000ULL, 0xF23C83E1404A8C17ULL }, /* XSUM_XXH64_testdata[1898] */\n    {  949, 0x000000009E3779B1ULL, 0x4716B3E039D6BFD9ULL }, /* XSUM_XXH64_testdata[1899] */\n    {  950, 0x0000000000000000ULL, 0x599BE2B47286251CULL }, /* XSUM_XXH64_testdata[1900] */\n    {  950, 0x000000009E3779B1ULL, 0x913010210E777D39ULL }, /* XSUM_XXH64_testdata[1901] */\n    {  951, 0x0000000000000000ULL, 0x5F0420471473F3BDULL }, /* XSUM_XXH64_testdata[1902] */\n    {  951, 0x000000009E3779B1ULL, 0xEA9D059F7016A352ULL }, /* XSUM_XXH64_testdata[1903] */\n    {  952, 0x0000000000000000ULL, 0x1AA24C2CFDFF7C48ULL }, /* XSUM_XXH64_testdata[1904] */\n    {  952, 0x000000009E3779B1ULL, 0x2E1A1CC2C2611FA7ULL }, /* XSUM_XXH64_testdata[1905] */\n    {  953, 0x0000000000000000ULL, 0xB5CA404C3C988EBBULL }, /* XSUM_XXH64_testdata[1906] */\n    {  953, 0x000000009E3779B1ULL, 0xA348801D1DF18709ULL }, /* XSUM_XXH64_testdata[1907] */\n    {  954, 0x0000000000000000ULL, 0x8046EC1FBE642994ULL }, /* XSUM_XXH64_testdata[1908] */\n    {  954, 0x000000009E3779B1ULL, 0x4238910281F31EDCULL }, /* XSUM_XXH64_testdata[1909] */\n    {  955, 0x0000000000000000ULL, 0x56649EB17A8DC510ULL }, /* XSUM_XXH64_testdata[1910] */\n    {  955, 0x000000009E3779B1ULL, 0x0750A96F3B397545ULL }, /* XSUM_XXH64_testdata[1911] */\n    {  956, 0x0000000000000000ULL, 0xEEDA845627F4B952ULL }, /* XSUM_XXH64_testdata[1912] */\n    {  956, 0x000000009E3779B1ULL, 0x538BB5300412CE68ULL }, /* XSUM_XXH64_testdata[1913] */\n    {  957, 0x0000000000000000ULL, 0x4696EADEEF6FBB6CULL }, /* XSUM_XXH64_testdata[1914] */\n    {  957, 0x000000009E3779B1ULL, 0x9B474549A6AC64E8ULL }, /* XSUM_XXH64_testdata[1915] */\n    {  958, 0x0000000000000000ULL, 0xEC5A49A32C3DC271ULL }, /* XSUM_XXH64_testdata[1916] */\n    {  958, 0x000000009E3779B1ULL, 0xB5F40B5A8E733749ULL }, /* XSUM_XXH64_testdata[1917] */\n    {  959, 0x0000000000000000ULL, 0x5939F158CAAEDA6EULL }, /* XSUM_XXH64_testdata[1918] */\n    {  959, 0x000000009E3779B1ULL, 0x69E7CA70696BC500ULL }, /* XSUM_XXH64_testdata[1919] */\n    {  960, 0x0000000000000000ULL, 0x750E09CF7E1CD3B8ULL }, /* XSUM_XXH64_testdata[1920] */\n    {  960, 0x000000009E3779B1ULL, 0x2DB5F46D063160B3ULL }, /* XSUM_XXH64_testdata[1921] */\n    {  961, 0x0000000000000000ULL, 0xE11E19248104134FULL }, /* XSUM_XXH64_testdata[1922] */\n    {  961, 0x000000009E3779B1ULL, 0x8989828CDDFD747BULL }, /* XSUM_XXH64_testdata[1923] */\n    {  962, 0x0000000000000000ULL, 0xF3454B991D6A8D90ULL }, /* XSUM_XXH64_testdata[1924] */\n    {  962, 0x000000009E3779B1ULL, 0xD35E5E9384812064ULL }, /* XSUM_XXH64_testdata[1925] */\n    {  963, 0x0000000000000000ULL, 0x8C2C92FDDA8B6524ULL }, /* XSUM_XXH64_testdata[1926] */\n    {  963, 0x000000009E3779B1ULL, 0xBAC996F4F66E2BDDULL }, /* XSUM_XXH64_testdata[1927] */\n    {  964, 0x0000000000000000ULL, 0xF6E54E080621A525ULL }, /* XSUM_XXH64_testdata[1928] */\n    {  964, 0x000000009E3779B1ULL, 0x112E799830BA167BULL }, /* XSUM_XXH64_testdata[1929] */\n    {  965, 0x0000000000000000ULL, 0x556DEB77E1B98F4CULL }, /* XSUM_XXH64_testdata[1930] */\n    {  965, 0x000000009E3779B1ULL, 0xBA1546C614ABD0BBULL }, /* XSUM_XXH64_testdata[1931] */\n    {  966, 0x0000000000000000ULL, 0xA2171D71218B9848ULL }, /* XSUM_XXH64_testdata[1932] */\n    {  966, 0x000000009E3779B1ULL, 0xC1C9BADEC2E1B280ULL }, /* XSUM_XXH64_testdata[1933] */\n    {  967, 0x0000000000000000ULL, 0xB7A00C303A4192B5ULL }, /* XSUM_XXH64_testdata[1934] */\n    {  967, 0x000000009E3779B1ULL, 0xD184F4CA5B2CC460ULL }, /* XSUM_XXH64_testdata[1935] */\n    {  968, 0x0000000000000000ULL, 0xF80B7C0CFBC3B4CDULL }, /* XSUM_XXH64_testdata[1936] */\n    {  968, 0x000000009E3779B1ULL, 0xFB099CFB0AD9D389ULL }, /* XSUM_XXH64_testdata[1937] */\n    {  969, 0x0000000000000000ULL, 0x742DC7518702E796ULL }, /* XSUM_XXH64_testdata[1938] */\n    {  969, 0x000000009E3779B1ULL, 0x5EE337A15CA15E00ULL }, /* XSUM_XXH64_testdata[1939] */\n    {  970, 0x0000000000000000ULL, 0xAE0EA7F413CA1EF5ULL }, /* XSUM_XXH64_testdata[1940] */\n    {  970, 0x000000009E3779B1ULL, 0xC353E324D2A28D0DULL }, /* XSUM_XXH64_testdata[1941] */\n    {  971, 0x0000000000000000ULL, 0xD26E87F51DA81652ULL }, /* XSUM_XXH64_testdata[1942] */\n    {  971, 0x000000009E3779B1ULL, 0xC0F3AFC9249B3637ULL }, /* XSUM_XXH64_testdata[1943] */\n    {  972, 0x0000000000000000ULL, 0xA9799503AF071AC9ULL }, /* XSUM_XXH64_testdata[1944] */\n    {  972, 0x000000009E3779B1ULL, 0xF24AF0EF07F25EB6ULL }, /* XSUM_XXH64_testdata[1945] */\n    {  973, 0x0000000000000000ULL, 0xC66DE0325C52A78DULL }, /* XSUM_XXH64_testdata[1946] */\n    {  973, 0x000000009E3779B1ULL, 0x8F7ED5FF94D75176ULL }, /* XSUM_XXH64_testdata[1947] */\n    {  974, 0x0000000000000000ULL, 0xD3FB599095E7A29FULL }, /* XSUM_XXH64_testdata[1948] */\n    {  974, 0x000000009E3779B1ULL, 0xFEC405E51028CA41ULL }, /* XSUM_XXH64_testdata[1949] */\n    {  975, 0x0000000000000000ULL, 0x99449A872FBB65DDULL }, /* XSUM_XXH64_testdata[1950] */\n    {  975, 0x000000009E3779B1ULL, 0x7DB3947E8EB8D55FULL }, /* XSUM_XXH64_testdata[1951] */\n    {  976, 0x0000000000000000ULL, 0x4A47B732F5E06E99ULL }, /* XSUM_XXH64_testdata[1952] */\n    {  976, 0x000000009E3779B1ULL, 0xB56FBA2825D13A23ULL }, /* XSUM_XXH64_testdata[1953] */\n    {  977, 0x0000000000000000ULL, 0x8C0847CAF410EA6DULL }, /* XSUM_XXH64_testdata[1954] */\n    {  977, 0x000000009E3779B1ULL, 0x39FEBA2B4BAA9F00ULL }, /* XSUM_XXH64_testdata[1955] */\n    {  978, 0x0000000000000000ULL, 0xF16D4BE3E3B511DCULL }, /* XSUM_XXH64_testdata[1956] */\n    {  978, 0x000000009E3779B1ULL, 0x6389B4C8B6BEA831ULL }, /* XSUM_XXH64_testdata[1957] */\n    {  979, 0x0000000000000000ULL, 0x2A296AC3FC625219ULL }, /* XSUM_XXH64_testdata[1958] */\n    {  979, 0x000000009E3779B1ULL, 0xAC9ADB163AA0D18EULL }, /* XSUM_XXH64_testdata[1959] */\n    {  980, 0x0000000000000000ULL, 0x6061CEB7EFF73662ULL }, /* XSUM_XXH64_testdata[1960] */\n    {  980, 0x000000009E3779B1ULL, 0x18034E6036C02D60ULL }, /* XSUM_XXH64_testdata[1961] */\n    {  981, 0x0000000000000000ULL, 0xE8F825B506A92E90ULL }, /* XSUM_XXH64_testdata[1962] */\n    {  981, 0x000000009E3779B1ULL, 0xF5ECF8C154445F4BULL }, /* XSUM_XXH64_testdata[1963] */\n    {  982, 0x0000000000000000ULL, 0x79E9D50DD462C193ULL }, /* XSUM_XXH64_testdata[1964] */\n    {  982, 0x000000009E3779B1ULL, 0xE0D4033A724A9A79ULL }, /* XSUM_XXH64_testdata[1965] */\n    {  983, 0x0000000000000000ULL, 0x98C1114F8ACBAB27ULL }, /* XSUM_XXH64_testdata[1966] */\n    {  983, 0x000000009E3779B1ULL, 0xB4C9B0F97A001F59ULL }, /* XSUM_XXH64_testdata[1967] */\n    {  984, 0x0000000000000000ULL, 0xF8C65A26261594B9ULL }, /* XSUM_XXH64_testdata[1968] */\n    {  984, 0x000000009E3779B1ULL, 0x8AD9570512182DDDULL }, /* XSUM_XXH64_testdata[1969] */\n    {  985, 0x0000000000000000ULL, 0x53C6D93F6D817304ULL }, /* XSUM_XXH64_testdata[1970] */\n    {  985, 0x000000009E3779B1ULL, 0x49FF2408C49B698CULL }, /* XSUM_XXH64_testdata[1971] */\n    {  986, 0x0000000000000000ULL, 0x0E9C26B081B5C0DCULL }, /* XSUM_XXH64_testdata[1972] */\n    {  986, 0x000000009E3779B1ULL, 0x914E0F78AFD29E54ULL }, /* XSUM_XXH64_testdata[1973] */\n    {  987, 0x0000000000000000ULL, 0xAF2249EC5A9D91ADULL }, /* XSUM_XXH64_testdata[1974] */\n    {  987, 0x000000009E3779B1ULL, 0xE23567B62D4EFE9FULL }, /* XSUM_XXH64_testdata[1975] */\n    {  988, 0x0000000000000000ULL, 0x30B27E44725B629AULL }, /* XSUM_XXH64_testdata[1976] */\n    {  988, 0x000000009E3779B1ULL, 0x0BD2A9B438B4B30FULL }, /* XSUM_XXH64_testdata[1977] */\n    {  989, 0x0000000000000000ULL, 0x9E9883AB49E285CCULL }, /* XSUM_XXH64_testdata[1978] */\n    {  989, 0x000000009E3779B1ULL, 0xE9C1EB98F3FE856DULL }, /* XSUM_XXH64_testdata[1979] */\n    {  990, 0x0000000000000000ULL, 0xC2579D0DF7A48C58ULL }, /* XSUM_XXH64_testdata[1980] */\n    {  990, 0x000000009E3779B1ULL, 0x4E470CD8DAF8A1C6ULL }, /* XSUM_XXH64_testdata[1981] */\n    {  991, 0x0000000000000000ULL, 0x8750F562170FF762ULL }, /* XSUM_XXH64_testdata[1982] */\n    {  991, 0x000000009E3779B1ULL, 0xF404CA139E272C7AULL }, /* XSUM_XXH64_testdata[1983] */\n    {  992, 0x0000000000000000ULL, 0x82625FC90DB9FC5EULL }, /* XSUM_XXH64_testdata[1984] */\n    {  992, 0x000000009E3779B1ULL, 0x207215F0735B9C0CULL }, /* XSUM_XXH64_testdata[1985] */\n    {  993, 0x0000000000000000ULL, 0x36C84A9DEAF54B57ULL }, /* XSUM_XXH64_testdata[1986] */\n    {  993, 0x000000009E3779B1ULL, 0x7AD5887EF9DFDB3DULL }, /* XSUM_XXH64_testdata[1987] */\n    {  994, 0x0000000000000000ULL, 0xBCA6A33B0126DCC6ULL }, /* XSUM_XXH64_testdata[1988] */\n    {  994, 0x000000009E3779B1ULL, 0x254933D9522A4338ULL }, /* XSUM_XXH64_testdata[1989] */\n    {  995, 0x0000000000000000ULL, 0xCC817C7754AC069BULL }, /* XSUM_XXH64_testdata[1990] */\n    {  995, 0x000000009E3779B1ULL, 0x6C6D7066AC64843BULL }, /* XSUM_XXH64_testdata[1991] */\n    {  996, 0x0000000000000000ULL, 0x69D1CFAB4B334AD9ULL }, /* XSUM_XXH64_testdata[1992] */\n    {  996, 0x000000009E3779B1ULL, 0x7506295E03E5E62AULL }, /* XSUM_XXH64_testdata[1993] */\n    {  997, 0x0000000000000000ULL, 0x6A00AAEDCE614EE0ULL }, /* XSUM_XXH64_testdata[1994] */\n    {  997, 0x000000009E3779B1ULL, 0xF14BBA7E77A4116AULL }, /* XSUM_XXH64_testdata[1995] */\n    {  998, 0x0000000000000000ULL, 0xE62B6467D2FDE480ULL }, /* XSUM_XXH64_testdata[1996] */\n    {  998, 0x000000009E3779B1ULL, 0x94CCD1F6294C3BCDULL }, /* XSUM_XXH64_testdata[1997] */\n    {  999, 0x0000000000000000ULL, 0x22EAC650671B0AA7ULL }, /* XSUM_XXH64_testdata[1998] */\n    {  999, 0x000000009E3779B1ULL, 0x66285FFFD248F989ULL }, /* XSUM_XXH64_testdata[1999] */\n    { 1000, 0x0000000000000000ULL, 0x52BD1358F22E9EF7ULL }, /* XSUM_XXH64_testdata[2000] */\n    { 1000, 0x000000009E3779B1ULL, 0x72751A2408017E26ULL }, /* XSUM_XXH64_testdata[2001] */\n    { 1001, 0x0000000000000000ULL, 0xB480E8B7515D04DDULL }, /* XSUM_XXH64_testdata[2002] */\n    { 1001, 0x000000009E3779B1ULL, 0xEDE672D0F1EA02AAULL }, /* XSUM_XXH64_testdata[2003] */\n    { 1002, 0x0000000000000000ULL, 0x84F40BC5966C5FABULL }, /* XSUM_XXH64_testdata[2004] */\n    { 1002, 0x000000009E3779B1ULL, 0x1D0A524CA46775BBULL }, /* XSUM_XXH64_testdata[2005] */\n    { 1003, 0x0000000000000000ULL, 0xBF6A62F786B68292ULL }, /* XSUM_XXH64_testdata[2006] */\n    { 1003, 0x000000009E3779B1ULL, 0x03998F6F4F74F640ULL }, /* XSUM_XXH64_testdata[2007] */\n    { 1004, 0x0000000000000000ULL, 0xFB534827BF545747ULL }, /* XSUM_XXH64_testdata[2008] */\n    { 1004, 0x000000009E3779B1ULL, 0x677EAF30B29F2891ULL }, /* XSUM_XXH64_testdata[2009] */\n    { 1005, 0x0000000000000000ULL, 0xB5E4615A2184A07FULL }, /* XSUM_XXH64_testdata[2010] */\n    { 1005, 0x000000009E3779B1ULL, 0x9E6062FC87389D70ULL }, /* XSUM_XXH64_testdata[2011] */\n    { 1006, 0x0000000000000000ULL, 0xFF6939DED1FF7ED2ULL }, /* XSUM_XXH64_testdata[2012] */\n    { 1006, 0x000000009E3779B1ULL, 0xE53E5A582CA4C1C5ULL }, /* XSUM_XXH64_testdata[2013] */\n    { 1007, 0x0000000000000000ULL, 0xA8D82A9AE2D6E8DCULL }, /* XSUM_XXH64_testdata[2014] */\n    { 1007, 0x000000009E3779B1ULL, 0xDB3B18216E4DB05DULL }, /* XSUM_XXH64_testdata[2015] */\n    { 1008, 0x0000000000000000ULL, 0x448D96F74D9C48EFULL }, /* XSUM_XXH64_testdata[2016] */\n    { 1008, 0x000000009E3779B1ULL, 0x1B7D1895174728EBULL }, /* XSUM_XXH64_testdata[2017] */\n    { 1009, 0x0000000000000000ULL, 0xACF2E9D6BAC53EC4ULL }, /* XSUM_XXH64_testdata[2018] */\n    { 1009, 0x000000009E3779B1ULL, 0x8B93A579D90FA20FULL }, /* XSUM_XXH64_testdata[2019] */\n    { 1010, 0x0000000000000000ULL, 0x3836C816BD0EFA4FULL }, /* XSUM_XXH64_testdata[2020] */\n    { 1010, 0x000000009E3779B1ULL, 0xD9E2AA4EFB329F75ULL }, /* XSUM_XXH64_testdata[2021] */\n    { 1011, 0x0000000000000000ULL, 0x0C2C0B4BA7A25E09ULL }, /* XSUM_XXH64_testdata[2022] */\n    { 1011, 0x000000009E3779B1ULL, 0x2606C925EE0F0419ULL }, /* XSUM_XXH64_testdata[2023] */\n    { 1012, 0x0000000000000000ULL, 0x62AC5C1F4CB7928CULL }, /* XSUM_XXH64_testdata[2024] */\n    { 1012, 0x000000009E3779B1ULL, 0x24D52EAC502F74F7ULL }, /* XSUM_XXH64_testdata[2025] */\n    { 1013, 0x0000000000000000ULL, 0x786BB0D229F29B54ULL }, /* XSUM_XXH64_testdata[2026] */\n    { 1013, 0x000000009E3779B1ULL, 0x747E6DFAE1FF2BBCULL }, /* XSUM_XXH64_testdata[2027] */\n    { 1014, 0x0000000000000000ULL, 0xDBFE59C341076FA5ULL }, /* XSUM_XXH64_testdata[2028] */\n    { 1014, 0x000000009E3779B1ULL, 0xCB68F2361C5AD1FBULL }, /* XSUM_XXH64_testdata[2029] */\n    { 1015, 0x0000000000000000ULL, 0x931E78AA3285CAFFULL }, /* XSUM_XXH64_testdata[2030] */\n    { 1015, 0x000000009E3779B1ULL, 0x78236895F00A5AA5ULL }, /* XSUM_XXH64_testdata[2031] */\n    { 1016, 0x0000000000000000ULL, 0xF26CB2AB4B1409CEULL }, /* XSUM_XXH64_testdata[2032] */\n    { 1016, 0x000000009E3779B1ULL, 0xE9199F83511D52E5ULL }, /* XSUM_XXH64_testdata[2033] */\n    { 1017, 0x0000000000000000ULL, 0x5E13E01057523404ULL }, /* XSUM_XXH64_testdata[2034] */\n    { 1017, 0x000000009E3779B1ULL, 0x7A28922AECB03E49ULL }, /* XSUM_XXH64_testdata[2035] */\n    { 1018, 0x0000000000000000ULL, 0x92274DAF25DCFCBBULL }, /* XSUM_XXH64_testdata[2036] */\n    { 1018, 0x000000009E3779B1ULL, 0x4D436A00DB8CB24EULL }, /* XSUM_XXH64_testdata[2037] */\n    { 1019, 0x0000000000000000ULL, 0x491D3C12E9452FECULL }, /* XSUM_XXH64_testdata[2038] */\n    { 1019, 0x000000009E3779B1ULL, 0xBDE075C6FEA8DE02ULL }, /* XSUM_XXH64_testdata[2039] */\n    { 1020, 0x0000000000000000ULL, 0x2EE1FABEA33935D6ULL }, /* XSUM_XXH64_testdata[2040] */\n    { 1020, 0x000000009E3779B1ULL, 0x26737225155A83FEULL }, /* XSUM_XXH64_testdata[2041] */\n    { 1021, 0x0000000000000000ULL, 0xA1B09D2D377A1D66ULL }, /* XSUM_XXH64_testdata[2042] */\n    { 1021, 0x000000009E3779B1ULL, 0x92DEEB2EF1083DCAULL }, /* XSUM_XXH64_testdata[2043] */\n    { 1022, 0x0000000000000000ULL, 0x791952F3D2A33E0AULL }, /* XSUM_XXH64_testdata[2044] */\n    { 1022, 0x000000009E3779B1ULL, 0x663E52964338A17DULL }, /* XSUM_XXH64_testdata[2045] */\n    { 1023, 0x0000000000000000ULL, 0xAAC72718B7620924ULL }, /* XSUM_XXH64_testdata[2046] */\n    { 1023, 0x000000009E3779B1ULL, 0xE0935AF8C59B7E98ULL }, /* XSUM_XXH64_testdata[2047] */\n    { 1024, 0x0000000000000000ULL, 0x4775BF7CACE4D177ULL }, /* XSUM_XXH64_testdata[2048] */\n    { 1024, 0x000000009E3779B1ULL, 0x238CF9296898B465ULL }, /* XSUM_XXH64_testdata[2049] */\n    { 1025, 0x0000000000000000ULL, 0x847FA6006D7C2AC0ULL }, /* XSUM_XXH64_testdata[2050] */\n    { 1025, 0x000000009E3779B1ULL, 0xB2A65F21FB8D0F5EULL }, /* XSUM_XXH64_testdata[2051] */\n    { 1026, 0x0000000000000000ULL, 0x9400810EBDD39C5AULL }, /* XSUM_XXH64_testdata[2052] */\n    { 1026, 0x000000009E3779B1ULL, 0x82E3F353C6A49DF3ULL }, /* XSUM_XXH64_testdata[2053] */\n    { 1027, 0x0000000000000000ULL, 0x2DE816315ECE98EDULL }, /* XSUM_XXH64_testdata[2054] */\n    { 1027, 0x000000009E3779B1ULL, 0xF76930161775C1AAULL }, /* XSUM_XXH64_testdata[2055] */\n    { 1028, 0x0000000000000000ULL, 0x2F727A3F02CF40ACULL }, /* XSUM_XXH64_testdata[2056] */\n    { 1028, 0x000000009E3779B1ULL, 0xACC9532D67E1F412ULL }, /* XSUM_XXH64_testdata[2057] */\n    { 1029, 0x0000000000000000ULL, 0x1FAEED43381CC350ULL }, /* XSUM_XXH64_testdata[2058] */\n    { 1029, 0x000000009E3779B1ULL, 0x4A59E208A708A00EULL }, /* XSUM_XXH64_testdata[2059] */\n    { 1030, 0x0000000000000000ULL, 0xA9A789D6B3ED2AB5ULL }, /* XSUM_XXH64_testdata[2060] */\n    { 1030, 0x000000009E3779B1ULL, 0x4FC79BE7BADF83C8ULL }, /* XSUM_XXH64_testdata[2061] */\n    { 1031, 0x0000000000000000ULL, 0x7ED4616339789533ULL }, /* XSUM_XXH64_testdata[2062] */\n    { 1031, 0x000000009E3779B1ULL, 0xF4E55A1CA96AA533ULL }, /* XSUM_XXH64_testdata[2063] */\n    { 1032, 0x0000000000000000ULL, 0x50A67DFFCFE9DCA9ULL }, /* XSUM_XXH64_testdata[2064] */\n    { 1032, 0x000000009E3779B1ULL, 0x20C6042F883EE813ULL }, /* XSUM_XXH64_testdata[2065] */\n    { 1033, 0x0000000000000000ULL, 0x4C267E0F8B0394BAULL }, /* XSUM_XXH64_testdata[2066] */\n    { 1033, 0x000000009E3779B1ULL, 0xB5368D1175B5F4A3ULL }, /* XSUM_XXH64_testdata[2067] */\n    { 1034, 0x0000000000000000ULL, 0x9A6F2DAE8F28DD5DULL }, /* XSUM_XXH64_testdata[2068] */\n    { 1034, 0x000000009E3779B1ULL, 0x58A4412A0EC58060ULL }, /* XSUM_XXH64_testdata[2069] */\n    { 1035, 0x0000000000000000ULL, 0xE353FDB7C8FC8D15ULL }, /* XSUM_XXH64_testdata[2070] */\n    { 1035, 0x000000009E3779B1ULL, 0xD05C111B7F5DBB91ULL }, /* XSUM_XXH64_testdata[2071] */\n    { 1036, 0x0000000000000000ULL, 0xC1DA0CC2EB62B342ULL }, /* XSUM_XXH64_testdata[2072] */\n    { 1036, 0x000000009E3779B1ULL, 0xEE69BDE57BE759A4ULL }, /* XSUM_XXH64_testdata[2073] */\n    { 1037, 0x0000000000000000ULL, 0xF7B88F7002C5A4A4ULL }, /* XSUM_XXH64_testdata[2074] */\n    { 1037, 0x000000009E3779B1ULL, 0xECB187C58898BCE0ULL }, /* XSUM_XXH64_testdata[2075] */\n    { 1038, 0x0000000000000000ULL, 0xC3FB1D1518ECC87EULL }, /* XSUM_XXH64_testdata[2076] */\n    { 1038, 0x000000009E3779B1ULL, 0xBBA21C6E6134ECBFULL }, /* XSUM_XXH64_testdata[2077] */\n    { 1039, 0x0000000000000000ULL, 0xE5B4095F61120E36ULL }, /* XSUM_XXH64_testdata[2078] */\n    { 1039, 0x000000009E3779B1ULL, 0xB504E4EF8CBCCF5DULL }, /* XSUM_XXH64_testdata[2079] */\n    { 1040, 0x0000000000000000ULL, 0x1B53D42AA76BD71AULL }, /* XSUM_XXH64_testdata[2080] */\n    { 1040, 0x000000009E3779B1ULL, 0x3ECA620E8CA0E162ULL }, /* XSUM_XXH64_testdata[2081] */\n    { 1041, 0x0000000000000000ULL, 0x473D4779C838A069ULL }, /* XSUM_XXH64_testdata[2082] */\n    { 1041, 0x000000009E3779B1ULL, 0xFF807BE46C510E36ULL }, /* XSUM_XXH64_testdata[2083] */\n    { 1042, 0x0000000000000000ULL, 0x1D9940A24B80F97FULL }, /* XSUM_XXH64_testdata[2084] */\n    { 1042, 0x000000009E3779B1ULL, 0xBD60D6ED58A888C3ULL }, /* XSUM_XXH64_testdata[2085] */\n    { 1043, 0x0000000000000000ULL, 0x35252855430B9A3AULL }, /* XSUM_XXH64_testdata[2086] */\n    { 1043, 0x000000009E3779B1ULL, 0x12394E6629A2394FULL }, /* XSUM_XXH64_testdata[2087] */\n    { 1044, 0x0000000000000000ULL, 0x04EDD587E551081DULL }, /* XSUM_XXH64_testdata[2088] */\n    { 1044, 0x000000009E3779B1ULL, 0x1AE86BF0CABD862BULL }, /* XSUM_XXH64_testdata[2089] */\n    { 1045, 0x0000000000000000ULL, 0xB8F2D42D37481FA5ULL }, /* XSUM_XXH64_testdata[2090] */\n    { 1045, 0x000000009E3779B1ULL, 0x250AB92B17C7DD2EULL }, /* XSUM_XXH64_testdata[2091] */\n    { 1046, 0x0000000000000000ULL, 0x004A1C0FA3C6CD18ULL }, /* XSUM_XXH64_testdata[2092] */\n    { 1046, 0x000000009E3779B1ULL, 0x807402EA52F8EFF7ULL }, /* XSUM_XXH64_testdata[2093] */\n    { 1047, 0x0000000000000000ULL, 0xB034FAD5832FB8C0ULL }, /* XSUM_XXH64_testdata[2094] */\n    { 1047, 0x000000009E3779B1ULL, 0x53274E56DE083226ULL }, /* XSUM_XXH64_testdata[2095] */\n    { 1048, 0x0000000000000000ULL, 0x17542E3F48CFD64EULL }, /* XSUM_XXH64_testdata[2096] */\n    { 1048, 0x000000009E3779B1ULL, 0xB2C45D680285EACBULL }, /* XSUM_XXH64_testdata[2097] */\n    { 1049, 0x0000000000000000ULL, 0x7BA19DF2AE6AFBA2ULL }, /* XSUM_XXH64_testdata[2098] */\n    { 1049, 0x000000009E3779B1ULL, 0x0709B30BB9936974ULL }, /* XSUM_XXH64_testdata[2099] */\n    { 1050, 0x0000000000000000ULL, 0xC1DF9499D4B9556EULL }, /* XSUM_XXH64_testdata[2100] */\n    { 1050, 0x000000009E3779B1ULL, 0x5E335FADC2BC52EBULL }, /* XSUM_XXH64_testdata[2101] */\n    { 1051, 0x0000000000000000ULL, 0x85D1DD53E32148C0ULL }, /* XSUM_XXH64_testdata[2102] */\n    { 1051, 0x000000009E3779B1ULL, 0xA65B59B05420991AULL }, /* XSUM_XXH64_testdata[2103] */\n    { 1052, 0x0000000000000000ULL, 0x18D6BEE1C8D19D55ULL }, /* XSUM_XXH64_testdata[2104] */\n    { 1052, 0x000000009E3779B1ULL, 0x405C984C9EC5674CULL }, /* XSUM_XXH64_testdata[2105] */\n    { 1053, 0x0000000000000000ULL, 0x73BFFE4CF55749FAULL }, /* XSUM_XXH64_testdata[2106] */\n    { 1053, 0x000000009E3779B1ULL, 0x4047C36707DA2790ULL }, /* XSUM_XXH64_testdata[2107] */\n    { 1054, 0x0000000000000000ULL, 0xD8F7B9A27877D772ULL }, /* XSUM_XXH64_testdata[2108] */\n    { 1054, 0x000000009E3779B1ULL, 0x7BDB2E27BC8F53ECULL }, /* XSUM_XXH64_testdata[2109] */\n    { 1055, 0x0000000000000000ULL, 0x8B856CFA292934DAULL }, /* XSUM_XXH64_testdata[2110] */\n    { 1055, 0x000000009E3779B1ULL, 0xF2EB44BED91BD79EULL }, /* XSUM_XXH64_testdata[2111] */\n    { 1056, 0x0000000000000000ULL, 0x1F97894F15918722ULL }, /* XSUM_XXH64_testdata[2112] */\n    { 1056, 0x000000009E3779B1ULL, 0x910D84B7344C3A34ULL }, /* XSUM_XXH64_testdata[2113] */\n    { 1057, 0x0000000000000000ULL, 0x68A161AB02FA67BDULL }, /* XSUM_XXH64_testdata[2114] */\n    { 1057, 0x000000009E3779B1ULL, 0x9FBB3C4E81B805C9ULL }, /* XSUM_XXH64_testdata[2115] */\n    { 1058, 0x0000000000000000ULL, 0x0F169E5CA75D12A7ULL }, /* XSUM_XXH64_testdata[2116] */\n    { 1058, 0x000000009E3779B1ULL, 0xAF84CC9EACA77C82ULL }, /* XSUM_XXH64_testdata[2117] */\n    { 1059, 0x0000000000000000ULL, 0xE45264695EBCA721ULL }, /* XSUM_XXH64_testdata[2118] */\n    { 1059, 0x000000009E3779B1ULL, 0xFB6D5AB1BA69E123ULL }, /* XSUM_XXH64_testdata[2119] */\n    { 1060, 0x0000000000000000ULL, 0x235E2A1946DE1C9BULL }, /* XSUM_XXH64_testdata[2120] */\n    { 1060, 0x000000009E3779B1ULL, 0x87B2A8A0FE63C375ULL }, /* XSUM_XXH64_testdata[2121] */\n    { 1061, 0x0000000000000000ULL, 0xBF9C20F217025612ULL }, /* XSUM_XXH64_testdata[2122] */\n    { 1061, 0x000000009E3779B1ULL, 0x41197864FF94B0B5ULL }, /* XSUM_XXH64_testdata[2123] */\n    { 1062, 0x0000000000000000ULL, 0x515EAE35A8201954ULL }, /* XSUM_XXH64_testdata[2124] */\n    { 1062, 0x000000009E3779B1ULL, 0xD84D1477C3289A04ULL }, /* XSUM_XXH64_testdata[2125] */\n    { 1063, 0x0000000000000000ULL, 0xFC6AF0AC0CBBDE96ULL }, /* XSUM_XXH64_testdata[2126] */\n    { 1063, 0x000000009E3779B1ULL, 0x68DAD59819FB9704ULL }, /* XSUM_XXH64_testdata[2127] */\n    { 1064, 0x0000000000000000ULL, 0x9E00693AED5C571FULL }, /* XSUM_XXH64_testdata[2128] */\n    { 1064, 0x000000009E3779B1ULL, 0xB90ADE1CFD9DE43FULL }, /* XSUM_XXH64_testdata[2129] */\n    { 1065, 0x0000000000000000ULL, 0x99866D8AFB9F261EULL }, /* XSUM_XXH64_testdata[2130] */\n    { 1065, 0x000000009E3779B1ULL, 0x8F2886A69BC0DA49ULL }, /* XSUM_XXH64_testdata[2131] */\n    { 1066, 0x0000000000000000ULL, 0x8E32E6D4CE722645ULL }, /* XSUM_XXH64_testdata[2132] */\n    { 1066, 0x000000009E3779B1ULL, 0xAF0C5BD253C608DEULL }, /* XSUM_XXH64_testdata[2133] */\n    { 1067, 0x0000000000000000ULL, 0x763B7C6F61794267ULL }, /* XSUM_XXH64_testdata[2134] */\n    { 1067, 0x000000009E3779B1ULL, 0x710D42A53E21F189ULL }, /* XSUM_XXH64_testdata[2135] */\n    { 1068, 0x0000000000000000ULL, 0x2AAF42B037E263D2ULL }, /* XSUM_XXH64_testdata[2136] */\n    { 1068, 0x000000009E3779B1ULL, 0xE75A9C9818B8E9A2ULL }, /* XSUM_XXH64_testdata[2137] */\n    { 1069, 0x0000000000000000ULL, 0xD0B124FEAA8BC17CULL }, /* XSUM_XXH64_testdata[2138] */\n    { 1069, 0x000000009E3779B1ULL, 0x2C447E9FB310EEFEULL }, /* XSUM_XXH64_testdata[2139] */\n    { 1070, 0x0000000000000000ULL, 0x811421D866CFE3A3ULL }, /* XSUM_XXH64_testdata[2140] */\n    { 1070, 0x000000009E3779B1ULL, 0x3BE32827DD550FA2ULL }, /* XSUM_XXH64_testdata[2141] */\n    { 1071, 0x0000000000000000ULL, 0xE50EF5BA589F2FC3ULL }, /* XSUM_XXH64_testdata[2142] */\n    { 1071, 0x000000009E3779B1ULL, 0xE19F7B8C367E5887ULL }, /* XSUM_XXH64_testdata[2143] */\n    { 1072, 0x0000000000000000ULL, 0x737EFC7B06D47CBDULL }, /* XSUM_XXH64_testdata[2144] */\n    { 1072, 0x000000009E3779B1ULL, 0xC081A3138E6D55AAULL }, /* XSUM_XXH64_testdata[2145] */\n    { 1073, 0x0000000000000000ULL, 0xDE1791F5A69D7BEDULL }, /* XSUM_XXH64_testdata[2146] */\n    { 1073, 0x000000009E3779B1ULL, 0x14507D40277164EBULL }, /* XSUM_XXH64_testdata[2147] */\n    { 1074, 0x0000000000000000ULL, 0x544D569F180718FAULL }, /* XSUM_XXH64_testdata[2148] */\n    { 1074, 0x000000009E3779B1ULL, 0x69DD83FEECAE8C7CULL }, /* XSUM_XXH64_testdata[2149] */\n    { 1075, 0x0000000000000000ULL, 0x5BBDA56F78F9E485ULL }, /* XSUM_XXH64_testdata[2150] */\n    { 1075, 0x000000009E3779B1ULL, 0x0AD509D729D0FB11ULL }, /* XSUM_XXH64_testdata[2151] */\n    { 1076, 0x0000000000000000ULL, 0x68A91DF67CF9D691ULL }, /* XSUM_XXH64_testdata[2152] */\n    { 1076, 0x000000009E3779B1ULL, 0xE4F216B27A707FD6ULL }, /* XSUM_XXH64_testdata[2153] */\n    { 1077, 0x0000000000000000ULL, 0x647E9EBB14A16875ULL }, /* XSUM_XXH64_testdata[2154] */\n    { 1077, 0x000000009E3779B1ULL, 0xD361DEC7B3FD8447ULL }, /* XSUM_XXH64_testdata[2155] */\n    { 1078, 0x0000000000000000ULL, 0x6BCCC123273D16DDULL }, /* XSUM_XXH64_testdata[2156] */\n    { 1078, 0x000000009E3779B1ULL, 0x2A2D1667E8534641ULL }, /* XSUM_XXH64_testdata[2157] */\n    { 1079, 0x0000000000000000ULL, 0x0469DF5210B0A319ULL }, /* XSUM_XXH64_testdata[2158] */\n    { 1079, 0x000000009E3779B1ULL, 0x8ED90D0C1A1A55F7ULL }, /* XSUM_XXH64_testdata[2159] */\n    { 1080, 0x0000000000000000ULL, 0xBBB4D377BC41D40CULL }, /* XSUM_XXH64_testdata[2160] */\n    { 1080, 0x000000009E3779B1ULL, 0x56EEA659CBFE6C71ULL }, /* XSUM_XXH64_testdata[2161] */\n    { 1081, 0x0000000000000000ULL, 0x795A4C700E6DA14FULL }, /* XSUM_XXH64_testdata[2162] */\n    { 1081, 0x000000009E3779B1ULL, 0x112E11E4FA4F38A1ULL }, /* XSUM_XXH64_testdata[2163] */\n    { 1082, 0x0000000000000000ULL, 0x4B6E46F3FFD5BBDBULL }, /* XSUM_XXH64_testdata[2164] */\n    { 1082, 0x000000009E3779B1ULL, 0xB0AC59178769887DULL }, /* XSUM_XXH64_testdata[2165] */\n    { 1083, 0x0000000000000000ULL, 0x94E9689B67388F6FULL }, /* XSUM_XXH64_testdata[2166] */\n    { 1083, 0x000000009E3779B1ULL, 0x2E94DA5C4AA8C222ULL }, /* XSUM_XXH64_testdata[2167] */\n    { 1084, 0x0000000000000000ULL, 0xDCD358B889D0E2DCULL }, /* XSUM_XXH64_testdata[2168] */\n    { 1084, 0x000000009E3779B1ULL, 0x60BB19C570953807ULL }, /* XSUM_XXH64_testdata[2169] */\n    { 1085, 0x0000000000000000ULL, 0x1DD076F36B610A34ULL }, /* XSUM_XXH64_testdata[2170] */\n    { 1085, 0x000000009E3779B1ULL, 0x0E388F4CE044B784ULL }, /* XSUM_XXH64_testdata[2171] */\n    { 1086, 0x0000000000000000ULL, 0xA0D41FB4573E4663ULL }, /* XSUM_XXH64_testdata[2172] */\n    { 1086, 0x000000009E3779B1ULL, 0x19B04148C5762DE0ULL }, /* XSUM_XXH64_testdata[2173] */\n    { 1087, 0x0000000000000000ULL, 0x2ED91C113ADEB4E2ULL }, /* XSUM_XXH64_testdata[2174] */\n    { 1087, 0x000000009E3779B1ULL, 0x990F97AC0A97687BULL }, /* XSUM_XXH64_testdata[2175] */\n    { 1088, 0x0000000000000000ULL, 0xFD460A306F72CB1BULL }, /* XSUM_XXH64_testdata[2176] */\n    { 1088, 0x000000009E3779B1ULL, 0xADC92E18954D9DE3ULL }, /* XSUM_XXH64_testdata[2177] */\n    { 1089, 0x0000000000000000ULL, 0x760381BAB3D0091EULL }, /* XSUM_XXH64_testdata[2178] */\n    { 1089, 0x000000009E3779B1ULL, 0x8E2D2D722A6305EEULL }, /* XSUM_XXH64_testdata[2179] */\n    { 1090, 0x0000000000000000ULL, 0xAD195A94E1A4181BULL }, /* XSUM_XXH64_testdata[2180] */\n    { 1090, 0x000000009E3779B1ULL, 0xE28BFA2C7B79AA88ULL }, /* XSUM_XXH64_testdata[2181] */\n    { 1091, 0x0000000000000000ULL, 0x7ECE1AD155B15433ULL }, /* XSUM_XXH64_testdata[2182] */\n    { 1091, 0x000000009E3779B1ULL, 0xF0E411DC6DE53E8CULL }, /* XSUM_XXH64_testdata[2183] */\n    { 1092, 0x0000000000000000ULL, 0x1C52AF648C034FD3ULL }, /* XSUM_XXH64_testdata[2184] */\n    { 1092, 0x000000009E3779B1ULL, 0x92879E26235BDDE5ULL }, /* XSUM_XXH64_testdata[2185] */\n    { 1093, 0x0000000000000000ULL, 0x78F1C0D5738C5B7BULL }, /* XSUM_XXH64_testdata[2186] */\n    { 1093, 0x000000009E3779B1ULL, 0x194884189103099EULL }, /* XSUM_XXH64_testdata[2187] */\n    { 1094, 0x0000000000000000ULL, 0x094F82164FC2F627ULL }, /* XSUM_XXH64_testdata[2188] */\n    { 1094, 0x000000009E3779B1ULL, 0x3E19EF4057FD11FFULL }, /* XSUM_XXH64_testdata[2189] */\n    { 1095, 0x0000000000000000ULL, 0x54BEC413CC381E17ULL }, /* XSUM_XXH64_testdata[2190] */\n    { 1095, 0x000000009E3779B1ULL, 0x34DA38067783BF0CULL }, /* XSUM_XXH64_testdata[2191] */\n    { 1096, 0x0000000000000000ULL, 0xF5D1EAFEB0E65349ULL }, /* XSUM_XXH64_testdata[2192] */\n    { 1096, 0x000000009E3779B1ULL, 0x55BCD771E3C2205FULL }, /* XSUM_XXH64_testdata[2193] */\n    { 1097, 0x0000000000000000ULL, 0xC516358FA266550FULL }, /* XSUM_XXH64_testdata[2194] */\n    { 1097, 0x000000009E3779B1ULL, 0x29DDD72541A268E4ULL }, /* XSUM_XXH64_testdata[2195] */\n    { 1098, 0x0000000000000000ULL, 0xFA68CB989E20C255ULL }, /* XSUM_XXH64_testdata[2196] */\n    { 1098, 0x000000009E3779B1ULL, 0x87F38CE2E7ABDAE6ULL }, /* XSUM_XXH64_testdata[2197] */\n    { 1099, 0x0000000000000000ULL, 0x367D1901C5FCF67FULL }, /* XSUM_XXH64_testdata[2198] */\n    { 1099, 0x000000009E3779B1ULL, 0xC92DB29414420FF7ULL }, /* XSUM_XXH64_testdata[2199] */\n    { 1100, 0x0000000000000000ULL, 0x12D589E96BF39DE3ULL }, /* XSUM_XXH64_testdata[2200] */\n    { 1100, 0x000000009E3779B1ULL, 0x668C0582557401FEULL }, /* XSUM_XXH64_testdata[2201] */\n    { 1101, 0x0000000000000000ULL, 0x5595F02F28A75172ULL }, /* XSUM_XXH64_testdata[2202] */\n    { 1101, 0x000000009E3779B1ULL, 0x38382D209D505743ULL }, /* XSUM_XXH64_testdata[2203] */\n    { 1102, 0x0000000000000000ULL, 0xD4A991EF58C4FF7EULL }, /* XSUM_XXH64_testdata[2204] */\n    { 1102, 0x000000009E3779B1ULL, 0x2EF0CD65E3434824ULL }, /* XSUM_XXH64_testdata[2205] */\n    { 1103, 0x0000000000000000ULL, 0x6CDE39F1651D3864ULL }, /* XSUM_XXH64_testdata[2206] */\n    { 1103, 0x000000009E3779B1ULL, 0xA952A8112F3F1C6FULL }, /* XSUM_XXH64_testdata[2207] */\n    { 1104, 0x0000000000000000ULL, 0xE907C2A215074EACULL }, /* XSUM_XXH64_testdata[2208] */\n    { 1104, 0x000000009E3779B1ULL, 0x372CCCC9380C4522ULL }, /* XSUM_XXH64_testdata[2209] */\n    { 1105, 0x0000000000000000ULL, 0x3E7461E33C9C35E7ULL }, /* XSUM_XXH64_testdata[2210] */\n    { 1105, 0x000000009E3779B1ULL, 0x2C4184886BB73F25ULL }, /* XSUM_XXH64_testdata[2211] */\n    { 1106, 0x0000000000000000ULL, 0x0E30173DD9269D5DULL }, /* XSUM_XXH64_testdata[2212] */\n    { 1106, 0x000000009E3779B1ULL, 0x637FDD34CF4F27EEULL }, /* XSUM_XXH64_testdata[2213] */\n    { 1107, 0x0000000000000000ULL, 0xB7C113A6FF4307D7ULL }, /* XSUM_XXH64_testdata[2214] */\n    { 1107, 0x000000009E3779B1ULL, 0x87D2A6B45D4AB6FFULL }, /* XSUM_XXH64_testdata[2215] */\n    { 1108, 0x0000000000000000ULL, 0x78FDDCB965009322ULL }, /* XSUM_XXH64_testdata[2216] */\n    { 1108, 0x000000009E3779B1ULL, 0xB19EBDCE7BB2ADDDULL }, /* XSUM_XXH64_testdata[2217] */\n    { 1109, 0x0000000000000000ULL, 0x0D0889E52A5C010CULL }, /* XSUM_XXH64_testdata[2218] */\n    { 1109, 0x000000009E3779B1ULL, 0xAF1004C57A6F9DE0ULL }, /* XSUM_XXH64_testdata[2219] */\n    { 1110, 0x0000000000000000ULL, 0x3B9DC9C1F4E9DE7AULL }, /* XSUM_XXH64_testdata[2220] */\n    { 1110, 0x000000009E3779B1ULL, 0x527752B49538B0F2ULL }, /* XSUM_XXH64_testdata[2221] */\n    { 1111, 0x0000000000000000ULL, 0xF859004CA4B1561AULL }, /* XSUM_XXH64_testdata[2222] */\n    { 1111, 0x000000009E3779B1ULL, 0x6AB43BEFD21472E2ULL }, /* XSUM_XXH64_testdata[2223] */\n    { 1112, 0x0000000000000000ULL, 0x4752619FE11B12C1ULL }, /* XSUM_XXH64_testdata[2224] */\n    { 1112, 0x000000009E3779B1ULL, 0x579C10B3F6468855ULL }, /* XSUM_XXH64_testdata[2225] */\n    { 1113, 0x0000000000000000ULL, 0xF445865A468E2559ULL }, /* XSUM_XXH64_testdata[2226] */\n    { 1113, 0x000000009E3779B1ULL, 0x879B0858BF9F8B12ULL }, /* XSUM_XXH64_testdata[2227] */\n    { 1114, 0x0000000000000000ULL, 0x188FC1F04125E582ULL }, /* XSUM_XXH64_testdata[2228] */\n    { 1114, 0x000000009E3779B1ULL, 0x4B3B438A7FE86BDBULL }, /* XSUM_XXH64_testdata[2229] */\n    { 1115, 0x0000000000000000ULL, 0x2757DE9950DB7B34ULL }, /* XSUM_XXH64_testdata[2230] */\n    { 1115, 0x000000009E3779B1ULL, 0xE0277B35CFDF8FC9ULL }, /* XSUM_XXH64_testdata[2231] */\n    { 1116, 0x0000000000000000ULL, 0x2432631A9914E56DULL }, /* XSUM_XXH64_testdata[2232] */\n    { 1116, 0x000000009E3779B1ULL, 0xE1ECA45CBFC450D1ULL }, /* XSUM_XXH64_testdata[2233] */\n    { 1117, 0x0000000000000000ULL, 0x784986E0B24A7B76ULL }, /* XSUM_XXH64_testdata[2234] */\n    { 1117, 0x000000009E3779B1ULL, 0xF79A46B492BD36F5ULL }, /* XSUM_XXH64_testdata[2235] */\n    { 1118, 0x0000000000000000ULL, 0x334AF852416C3E51ULL }, /* XSUM_XXH64_testdata[2236] */\n    { 1118, 0x000000009E3779B1ULL, 0x4377DC81D3C0709EULL }, /* XSUM_XXH64_testdata[2237] */\n    { 1119, 0x0000000000000000ULL, 0xB92AD21BC4B87A72ULL }, /* XSUM_XXH64_testdata[2238] */\n    { 1119, 0x000000009E3779B1ULL, 0x65E4A386510740ACULL }, /* XSUM_XXH64_testdata[2239] */\n    { 1120, 0x0000000000000000ULL, 0x95617FD81C67DCC5ULL }, /* XSUM_XXH64_testdata[2240] */\n    { 1120, 0x000000009E3779B1ULL, 0x22B02A44A9800701ULL }, /* XSUM_XXH64_testdata[2241] */\n    { 1121, 0x0000000000000000ULL, 0xA811DFF2AD0B59FCULL }, /* XSUM_XXH64_testdata[2242] */\n    { 1121, 0x000000009E3779B1ULL, 0x8CE4D290DAD5AC1AULL }, /* XSUM_XXH64_testdata[2243] */\n    { 1122, 0x0000000000000000ULL, 0x1F3E5BD6C132B6E7ULL }, /* XSUM_XXH64_testdata[2244] */\n    { 1122, 0x000000009E3779B1ULL, 0x7B6B1A0DCA9A79FEULL }, /* XSUM_XXH64_testdata[2245] */\n    { 1123, 0x0000000000000000ULL, 0xBABFE4C7669A7A10ULL }, /* XSUM_XXH64_testdata[2246] */\n    { 1123, 0x000000009E3779B1ULL, 0x1700A80B4222D0D9ULL }, /* XSUM_XXH64_testdata[2247] */\n    { 1124, 0x0000000000000000ULL, 0x600135D9B1CD6D10ULL }, /* XSUM_XXH64_testdata[2248] */\n    { 1124, 0x000000009E3779B1ULL, 0x3703C7E34E5C0F81ULL }, /* XSUM_XXH64_testdata[2249] */\n    { 1125, 0x0000000000000000ULL, 0x272EFE5F1BE54486ULL }, /* XSUM_XXH64_testdata[2250] */\n    { 1125, 0x000000009E3779B1ULL, 0x9B10466FEE9AA53CULL }, /* XSUM_XXH64_testdata[2251] */\n    { 1126, 0x0000000000000000ULL, 0x6E68BC9459FDF676ULL }, /* XSUM_XXH64_testdata[2252] */\n    { 1126, 0x000000009E3779B1ULL, 0x7F012D428795FECFULL }, /* XSUM_XXH64_testdata[2253] */\n    { 1127, 0x0000000000000000ULL, 0x36354AAF87F918B0ULL }, /* XSUM_XXH64_testdata[2254] */\n    { 1127, 0x000000009E3779B1ULL, 0x39CDE43E8781C078ULL }, /* XSUM_XXH64_testdata[2255] */\n    { 1128, 0x0000000000000000ULL, 0x400E307D555C9833ULL }, /* XSUM_XXH64_testdata[2256] */\n    { 1128, 0x000000009E3779B1ULL, 0x583DBE10736315E8ULL }, /* XSUM_XXH64_testdata[2257] */\n    { 1129, 0x0000000000000000ULL, 0x05EA9E6AC9B27A81ULL }, /* XSUM_XXH64_testdata[2258] */\n    { 1129, 0x000000009E3779B1ULL, 0x6A692E0C09AEF41CULL }, /* XSUM_XXH64_testdata[2259] */\n    { 1130, 0x0000000000000000ULL, 0xDC58A6438477CAACULL }, /* XSUM_XXH64_testdata[2260] */\n    { 1130, 0x000000009E3779B1ULL, 0x8388F7B4F0802E67ULL }, /* XSUM_XXH64_testdata[2261] */\n    { 1131, 0x0000000000000000ULL, 0xC574095AA26C05A0ULL }, /* XSUM_XXH64_testdata[2262] */\n    { 1131, 0x000000009E3779B1ULL, 0xDC2383D39CFBF56DULL }, /* XSUM_XXH64_testdata[2263] */\n    { 1132, 0x0000000000000000ULL, 0x94064E01CD2A6FE0ULL }, /* XSUM_XXH64_testdata[2264] */\n    { 1132, 0x000000009E3779B1ULL, 0x6A9067CE69D02464ULL }, /* XSUM_XXH64_testdata[2265] */\n    { 1133, 0x0000000000000000ULL, 0x884EF021B54F562AULL }, /* XSUM_XXH64_testdata[2266] */\n    { 1133, 0x000000009E3779B1ULL, 0xE5DC362A735474C2ULL }, /* XSUM_XXH64_testdata[2267] */\n    { 1134, 0x0000000000000000ULL, 0x591662DDD26BFC25ULL }, /* XSUM_XXH64_testdata[2268] */\n    { 1134, 0x000000009E3779B1ULL, 0x3054E14A201DD8AFULL }, /* XSUM_XXH64_testdata[2269] */\n    { 1135, 0x0000000000000000ULL, 0xE1A61BA71F2A3D5CULL }, /* XSUM_XXH64_testdata[2270] */\n    { 1135, 0x000000009E3779B1ULL, 0xCC8FD2796D352F91ULL }, /* XSUM_XXH64_testdata[2271] */\n    { 1136, 0x0000000000000000ULL, 0x57251DDEA62C943BULL }, /* XSUM_XXH64_testdata[2272] */\n    { 1136, 0x000000009E3779B1ULL, 0xA3C18F7908E93DCAULL }, /* XSUM_XXH64_testdata[2273] */\n    { 1137, 0x0000000000000000ULL, 0xE616EE8FCC325DD9ULL }, /* XSUM_XXH64_testdata[2274] */\n    { 1137, 0x000000009E3779B1ULL, 0x14B5984BA4854C63ULL }, /* XSUM_XXH64_testdata[2275] */\n    { 1138, 0x0000000000000000ULL, 0x0D39F4FC469C0357ULL }, /* XSUM_XXH64_testdata[2276] */\n    { 1138, 0x000000009E3779B1ULL, 0x5E931C3934A4E81CULL }, /* XSUM_XXH64_testdata[2277] */\n    { 1139, 0x0000000000000000ULL, 0x15CF3D6F0E7255E7ULL }, /* XSUM_XXH64_testdata[2278] */\n    { 1139, 0x000000009E3779B1ULL, 0xBF60E1ADBF19203AULL }, /* XSUM_XXH64_testdata[2279] */\n    { 1140, 0x0000000000000000ULL, 0xA64D34B6C8F3EFC1ULL }, /* XSUM_XXH64_testdata[2280] */\n    { 1140, 0x000000009E3779B1ULL, 0x6C47E635AE407E84ULL }, /* XSUM_XXH64_testdata[2281] */\n    { 1141, 0x0000000000000000ULL, 0xACF821860B451FCEULL }, /* XSUM_XXH64_testdata[2282] */\n    { 1141, 0x000000009E3779B1ULL, 0x71F4165B85DAA4F4ULL }, /* XSUM_XXH64_testdata[2283] */\n    { 1142, 0x0000000000000000ULL, 0x99BDECD90D1C556FULL }, /* XSUM_XXH64_testdata[2284] */\n    { 1142, 0x000000009E3779B1ULL, 0x336571C12EC4D692ULL }, /* XSUM_XXH64_testdata[2285] */\n    { 1143, 0x0000000000000000ULL, 0x259E2BDD0BE78EAFULL }, /* XSUM_XXH64_testdata[2286] */\n    { 1143, 0x000000009E3779B1ULL, 0x188F8DA02C1FC2ECULL }, /* XSUM_XXH64_testdata[2287] */\n    { 1144, 0x0000000000000000ULL, 0x1EE5F1941FC489BEULL }, /* XSUM_XXH64_testdata[2288] */\n    { 1144, 0x000000009E3779B1ULL, 0xFD2302544F9E3F28ULL }, /* XSUM_XXH64_testdata[2289] */\n    { 1145, 0x0000000000000000ULL, 0xC1DCDCBB7AEFF4A0ULL }, /* XSUM_XXH64_testdata[2290] */\n    { 1145, 0x000000009E3779B1ULL, 0x7825C283C62D149BULL }, /* XSUM_XXH64_testdata[2291] */\n    { 1146, 0x0000000000000000ULL, 0xFE00C6F8B53471A4ULL }, /* XSUM_XXH64_testdata[2292] */\n    { 1146, 0x000000009E3779B1ULL, 0x1A4AA51ABFFCF0D9ULL }, /* XSUM_XXH64_testdata[2293] */\n    { 1147, 0x0000000000000000ULL, 0x2A168E528A7AF3B2ULL }, /* XSUM_XXH64_testdata[2294] */\n    { 1147, 0x000000009E3779B1ULL, 0x087D47D143B332A7ULL }, /* XSUM_XXH64_testdata[2295] */\n    { 1148, 0x0000000000000000ULL, 0x015FCA9C7C890189ULL }, /* XSUM_XXH64_testdata[2296] */\n    { 1148, 0x000000009E3779B1ULL, 0x9C4815A4F92DA120ULL }, /* XSUM_XXH64_testdata[2297] */\n    { 1149, 0x0000000000000000ULL, 0x7B0353BD972DC808ULL }, /* XSUM_XXH64_testdata[2298] */\n    { 1149, 0x000000009E3779B1ULL, 0xB5BBC5E9063D325EULL }, /* XSUM_XXH64_testdata[2299] */\n    { 1150, 0x0000000000000000ULL, 0x1DD0D8B978883013ULL }, /* XSUM_XXH64_testdata[2300] */\n    { 1150, 0x000000009E3779B1ULL, 0x9A3DD1A5571A33F6ULL }, /* XSUM_XXH64_testdata[2301] */\n    { 1151, 0x0000000000000000ULL, 0xB41A8F0808C8F74FULL }, /* XSUM_XXH64_testdata[2302] */\n    { 1151, 0x000000009E3779B1ULL, 0x7F89F5FC585C35F2ULL }, /* XSUM_XXH64_testdata[2303] */\n    { 1152, 0x0000000000000000ULL, 0x19299073B367095BULL }, /* XSUM_XXH64_testdata[2304] */\n    { 1152, 0x000000009E3779B1ULL, 0xC9B3C9DFDD08DFDAULL }, /* XSUM_XXH64_testdata[2305] */\n    { 1153, 0x0000000000000000ULL, 0x5932E340EC7286BFULL }, /* XSUM_XXH64_testdata[2306] */\n    { 1153, 0x000000009E3779B1ULL, 0x851B8D860BC35C79ULL }, /* XSUM_XXH64_testdata[2307] */\n    { 1154, 0x0000000000000000ULL, 0x06F2A17411E8A3EBULL }, /* XSUM_XXH64_testdata[2308] */\n    { 1154, 0x000000009E3779B1ULL, 0x9932BDD1CDE62B64ULL }, /* XSUM_XXH64_testdata[2309] */\n    { 1155, 0x0000000000000000ULL, 0x88D143F288A22EDFULL }, /* XSUM_XXH64_testdata[2310] */\n    { 1155, 0x000000009E3779B1ULL, 0x03231A1762E1AABEULL }, /* XSUM_XXH64_testdata[2311] */\n    { 1156, 0x0000000000000000ULL, 0x5D85DEC090DF9397ULL }, /* XSUM_XXH64_testdata[2312] */\n    { 1156, 0x000000009E3779B1ULL, 0x178C30FF5FC153DDULL }, /* XSUM_XXH64_testdata[2313] */\n    { 1157, 0x0000000000000000ULL, 0x05FFA1FA6F91696EULL }, /* XSUM_XXH64_testdata[2314] */\n    { 1157, 0x000000009E3779B1ULL, 0x5CB67BAA9C962418ULL }, /* XSUM_XXH64_testdata[2315] */\n    { 1158, 0x0000000000000000ULL, 0xC80FB4BFAB1B9084ULL }, /* XSUM_XXH64_testdata[2316] */\n    { 1158, 0x000000009E3779B1ULL, 0x412066FE4F363F24ULL }, /* XSUM_XXH64_testdata[2317] */\n    { 1159, 0x0000000000000000ULL, 0xEF36F48EE689911EULL }, /* XSUM_XXH64_testdata[2318] */\n    { 1159, 0x000000009E3779B1ULL, 0x4839BA4B8E17E0C8ULL }, /* XSUM_XXH64_testdata[2319] */\n    { 1160, 0x0000000000000000ULL, 0x6D61FCBAA6DB87A4ULL }, /* XSUM_XXH64_testdata[2320] */\n    { 1160, 0x000000009E3779B1ULL, 0x16A4E424A4FA0453ULL }, /* XSUM_XXH64_testdata[2321] */\n    { 1161, 0x0000000000000000ULL, 0xBED318F98DB4C4E8ULL }, /* XSUM_XXH64_testdata[2322] */\n    { 1161, 0x000000009E3779B1ULL, 0x23668F33B18A4BEBULL }, /* XSUM_XXH64_testdata[2323] */\n    { 1162, 0x0000000000000000ULL, 0xFD31ACBCFBC6AD11ULL }, /* XSUM_XXH64_testdata[2324] */\n    { 1162, 0x000000009E3779B1ULL, 0x050D8302FEAFB128ULL }, /* XSUM_XXH64_testdata[2325] */\n    { 1163, 0x0000000000000000ULL, 0xCA568513811EF5BBULL }, /* XSUM_XXH64_testdata[2326] */\n    { 1163, 0x000000009E3779B1ULL, 0x265BE8CF72F7AC15ULL }, /* XSUM_XXH64_testdata[2327] */\n    { 1164, 0x0000000000000000ULL, 0x27F4365CEB48E09DULL }, /* XSUM_XXH64_testdata[2328] */\n    { 1164, 0x000000009E3779B1ULL, 0x6EA0E954F8CC9F28ULL }, /* XSUM_XXH64_testdata[2329] */\n    { 1165, 0x0000000000000000ULL, 0xC4BAA96C8811F3A8ULL }, /* XSUM_XXH64_testdata[2330] */\n    { 1165, 0x000000009E3779B1ULL, 0x6E1CDCC80574DA15ULL }, /* XSUM_XXH64_testdata[2331] */\n    { 1166, 0x0000000000000000ULL, 0xD929F2B0CBC2D114ULL }, /* XSUM_XXH64_testdata[2332] */\n    { 1166, 0x000000009E3779B1ULL, 0x8BB7D3CC05EC477AULL }, /* XSUM_XXH64_testdata[2333] */\n    { 1167, 0x0000000000000000ULL, 0x07CDEC2DC1D4F277ULL }, /* XSUM_XXH64_testdata[2334] */\n    { 1167, 0x000000009E3779B1ULL, 0x224D339D5431A954ULL }, /* XSUM_XXH64_testdata[2335] */\n    { 1168, 0x0000000000000000ULL, 0x61F0F00477994DA9ULL }, /* XSUM_XXH64_testdata[2336] */\n    { 1168, 0x000000009E3779B1ULL, 0x17A041B59D2A3095ULL }, /* XSUM_XXH64_testdata[2337] */\n    { 1169, 0x0000000000000000ULL, 0x11D00BAC17A2CCBCULL }, /* XSUM_XXH64_testdata[2338] */\n    { 1169, 0x000000009E3779B1ULL, 0xD3D1406E4C63388DULL }, /* XSUM_XXH64_testdata[2339] */\n    { 1170, 0x0000000000000000ULL, 0xF32C0F3CBE07DB46ULL }, /* XSUM_XXH64_testdata[2340] */\n    { 1170, 0x000000009E3779B1ULL, 0x784B0288B54047F3ULL }, /* XSUM_XXH64_testdata[2341] */\n    { 1171, 0x0000000000000000ULL, 0x83B6BF8C214040C4ULL }, /* XSUM_XXH64_testdata[2342] */\n    { 1171, 0x000000009E3779B1ULL, 0x33D255BCE663322AULL }, /* XSUM_XXH64_testdata[2343] */\n    { 1172, 0x0000000000000000ULL, 0xD0488365B79E9B3EULL }, /* XSUM_XXH64_testdata[2344] */\n    { 1172, 0x000000009E3779B1ULL, 0xDC1741BBC24625C0ULL }, /* XSUM_XXH64_testdata[2345] */\n    { 1173, 0x0000000000000000ULL, 0xF6EB55C349B2D4E9ULL }, /* XSUM_XXH64_testdata[2346] */\n    { 1173, 0x000000009E3779B1ULL, 0x9D98A4C8A46FBD91ULL }, /* XSUM_XXH64_testdata[2347] */\n    { 1174, 0x0000000000000000ULL, 0x3797AFA18CA75B65ULL }, /* XSUM_XXH64_testdata[2348] */\n    { 1174, 0x000000009E3779B1ULL, 0xE2A7BA7D2E0507F1ULL }, /* XSUM_XXH64_testdata[2349] */\n    { 1175, 0x0000000000000000ULL, 0x60019E1F20F136ABULL }, /* XSUM_XXH64_testdata[2350] */\n    { 1175, 0x000000009E3779B1ULL, 0x8A49874B1CF28677ULL }, /* XSUM_XXH64_testdata[2351] */\n    { 1176, 0x0000000000000000ULL, 0x16733C73052055DCULL }, /* XSUM_XXH64_testdata[2352] */\n    { 1176, 0x000000009E3779B1ULL, 0xDA424093EE2A4003ULL }, /* XSUM_XXH64_testdata[2353] */\n    { 1177, 0x0000000000000000ULL, 0xAA5A32E8F609A8BEULL }, /* XSUM_XXH64_testdata[2354] */\n    { 1177, 0x000000009E3779B1ULL, 0xBFD91A5EB0FE6C8CULL }, /* XSUM_XXH64_testdata[2355] */\n    { 1178, 0x0000000000000000ULL, 0x6B83C2851782FF4AULL }, /* XSUM_XXH64_testdata[2356] */\n    { 1178, 0x000000009E3779B1ULL, 0x49342F0F95C2EEE4ULL }, /* XSUM_XXH64_testdata[2357] */\n    { 1179, 0x0000000000000000ULL, 0x954B1ADBA2381E5FULL }, /* XSUM_XXH64_testdata[2358] */\n    { 1179, 0x000000009E3779B1ULL, 0xA20D6149D5427C1AULL }, /* XSUM_XXH64_testdata[2359] */\n    { 1180, 0x0000000000000000ULL, 0x603B9A19DCFF5CB2ULL }, /* XSUM_XXH64_testdata[2360] */\n    { 1180, 0x000000009E3779B1ULL, 0xB841AC8384BB8411ULL }, /* XSUM_XXH64_testdata[2361] */\n    { 1181, 0x0000000000000000ULL, 0x51691426D289A80FULL }, /* XSUM_XXH64_testdata[2362] */\n    { 1181, 0x000000009E3779B1ULL, 0x7F8A490E89A3BF94ULL }, /* XSUM_XXH64_testdata[2363] */\n    { 1182, 0x0000000000000000ULL, 0xFEBFD0B41A829058ULL }, /* XSUM_XXH64_testdata[2364] */\n    { 1182, 0x000000009E3779B1ULL, 0x14B98F8A153E1C30ULL }, /* XSUM_XXH64_testdata[2365] */\n    { 1183, 0x0000000000000000ULL, 0x25AF016AE33CBD1AULL }, /* XSUM_XXH64_testdata[2366] */\n    { 1183, 0x000000009E3779B1ULL, 0xC75FCDB74B967884ULL }, /* XSUM_XXH64_testdata[2367] */\n    { 1184, 0x0000000000000000ULL, 0x8CBA134148EC71F9ULL }, /* XSUM_XXH64_testdata[2368] */\n    { 1184, 0x000000009E3779B1ULL, 0x5DB47CCDF0979822ULL }, /* XSUM_XXH64_testdata[2369] */\n    { 1185, 0x0000000000000000ULL, 0x9E8F0A368CB1C464ULL }, /* XSUM_XXH64_testdata[2370] */\n    { 1185, 0x000000009E3779B1ULL, 0x419591366CD6E563ULL }, /* XSUM_XXH64_testdata[2371] */\n    { 1186, 0x0000000000000000ULL, 0xB474F625CC1A199AULL }, /* XSUM_XXH64_testdata[2372] */\n    { 1186, 0x000000009E3779B1ULL, 0x89146F83CE0A3E62ULL }, /* XSUM_XXH64_testdata[2373] */\n    { 1187, 0x0000000000000000ULL, 0x16D86EAE8BDE1ADFULL }, /* XSUM_XXH64_testdata[2374] */\n    { 1187, 0x000000009E3779B1ULL, 0xDC1A57B254C5CA1AULL }, /* XSUM_XXH64_testdata[2375] */\n    { 1188, 0x0000000000000000ULL, 0x7EFE00D599C5D016ULL }, /* XSUM_XXH64_testdata[2376] */\n    { 1188, 0x000000009E3779B1ULL, 0x8A21FBD75CA322F6ULL }, /* XSUM_XXH64_testdata[2377] */\n    { 1189, 0x0000000000000000ULL, 0x67FAF88309EDF12BULL }, /* XSUM_XXH64_testdata[2378] */\n    { 1189, 0x000000009E3779B1ULL, 0xAEBE493AFE2A6936ULL }, /* XSUM_XXH64_testdata[2379] */\n    { 1190, 0x0000000000000000ULL, 0x29B4A61FEEE3442DULL }, /* XSUM_XXH64_testdata[2380] */\n    { 1190, 0x000000009E3779B1ULL, 0xACC85878200FE439ULL }, /* XSUM_XXH64_testdata[2381] */\n    { 1191, 0x0000000000000000ULL, 0x9D502E7F7FA7C40FULL }, /* XSUM_XXH64_testdata[2382] */\n    { 1191, 0x000000009E3779B1ULL, 0x640172B0CA181D3BULL }, /* XSUM_XXH64_testdata[2383] */\n    { 1192, 0x0000000000000000ULL, 0xF910BB146476145AULL }, /* XSUM_XXH64_testdata[2384] */\n    { 1192, 0x000000009E3779B1ULL, 0xA7D3E542B5D7FBD5ULL }, /* XSUM_XXH64_testdata[2385] */\n    { 1193, 0x0000000000000000ULL, 0xEE6EDC237138173AULL }, /* XSUM_XXH64_testdata[2386] */\n    { 1193, 0x000000009E3779B1ULL, 0xD43F10425C748F89ULL }, /* XSUM_XXH64_testdata[2387] */\n    { 1194, 0x0000000000000000ULL, 0xE24B4A7F0E76E783ULL }, /* XSUM_XXH64_testdata[2388] */\n    { 1194, 0x000000009E3779B1ULL, 0x2320E33A5302A4D5ULL }, /* XSUM_XXH64_testdata[2389] */\n    { 1195, 0x0000000000000000ULL, 0x7978C40AEFC877D0ULL }, /* XSUM_XXH64_testdata[2390] */\n    { 1195, 0x000000009E3779B1ULL, 0x8D73ABDFA5720846ULL }, /* XSUM_XXH64_testdata[2391] */\n    { 1196, 0x0000000000000000ULL, 0xE691FED11EDFF221ULL }, /* XSUM_XXH64_testdata[2392] */\n    { 1196, 0x000000009E3779B1ULL, 0x8EAB2E32B082FC73ULL }, /* XSUM_XXH64_testdata[2393] */\n    { 1197, 0x0000000000000000ULL, 0x3E9542A45384F0F6ULL }, /* XSUM_XXH64_testdata[2394] */\n    { 1197, 0x000000009E3779B1ULL, 0x4A2E556C5707C4F5ULL }, /* XSUM_XXH64_testdata[2395] */\n    { 1198, 0x0000000000000000ULL, 0xF802820EB3AD6070ULL }, /* XSUM_XXH64_testdata[2396] */\n    { 1198, 0x000000009E3779B1ULL, 0x5718062EBB4800CDULL }, /* XSUM_XXH64_testdata[2397] */\n    { 1199, 0x0000000000000000ULL, 0x9D2D4751EF93B51CULL }, /* XSUM_XXH64_testdata[2398] */\n    { 1199, 0x000000009E3779B1ULL, 0x3CC9E217D7BD6672ULL }, /* XSUM_XXH64_testdata[2399] */\n    { 1200, 0x0000000000000000ULL, 0x73CDFEC0002BC5E1ULL }, /* XSUM_XXH64_testdata[2400] */\n    { 1200, 0x000000009E3779B1ULL, 0x155B5DE4EE0A0D69ULL }, /* XSUM_XXH64_testdata[2401] */\n    { 1201, 0x0000000000000000ULL, 0xC9517C4AAA35A42AULL }, /* XSUM_XXH64_testdata[2402] */\n    { 1201, 0x000000009E3779B1ULL, 0xE76B0F144E7074CAULL }, /* XSUM_XXH64_testdata[2403] */\n    { 1202, 0x0000000000000000ULL, 0x0E5C02541611F938ULL }, /* XSUM_XXH64_testdata[2404] */\n    { 1202, 0x000000009E3779B1ULL, 0x06640F4567E510C8ULL }, /* XSUM_XXH64_testdata[2405] */\n    { 1203, 0x0000000000000000ULL, 0x526346FC056B4ECCULL }, /* XSUM_XXH64_testdata[2406] */\n    { 1203, 0x000000009E3779B1ULL, 0x62166B520E3472B9ULL }, /* XSUM_XXH64_testdata[2407] */\n    { 1204, 0x0000000000000000ULL, 0xF05E21326F4C017AULL }, /* XSUM_XXH64_testdata[2408] */\n    { 1204, 0x000000009E3779B1ULL, 0xA2A6CE0C2C6ED983ULL }, /* XSUM_XXH64_testdata[2409] */\n    { 1205, 0x0000000000000000ULL, 0xC46EEBBC8B7C1603ULL }, /* XSUM_XXH64_testdata[2410] */\n    { 1205, 0x000000009E3779B1ULL, 0xBAE8603180B08E2BULL }, /* XSUM_XXH64_testdata[2411] */\n    { 1206, 0x0000000000000000ULL, 0x51A55AAC52816910ULL }, /* XSUM_XXH64_testdata[2412] */\n    { 1206, 0x000000009E3779B1ULL, 0x2387042F1109188DULL }, /* XSUM_XXH64_testdata[2413] */\n    { 1207, 0x0000000000000000ULL, 0x26198421168E2E66ULL }, /* XSUM_XXH64_testdata[2414] */\n    { 1207, 0x000000009E3779B1ULL, 0x23A27911E90F259AULL }, /* XSUM_XXH64_testdata[2415] */\n    { 1208, 0x0000000000000000ULL, 0x9A99D5A5C9343767ULL }, /* XSUM_XXH64_testdata[2416] */\n    { 1208, 0x000000009E3779B1ULL, 0xFB830D9101644EECULL }, /* XSUM_XXH64_testdata[2417] */\n    { 1209, 0x0000000000000000ULL, 0xA2E2D8A60B7FF51FULL }, /* XSUM_XXH64_testdata[2418] */\n    { 1209, 0x000000009E3779B1ULL, 0xCFBED9FCC3B850C9ULL }, /* XSUM_XXH64_testdata[2419] */\n    { 1210, 0x0000000000000000ULL, 0xF1ADA080F3C3C553ULL }, /* XSUM_XXH64_testdata[2420] */\n    { 1210, 0x000000009E3779B1ULL, 0xF0834836F99E1490ULL }, /* XSUM_XXH64_testdata[2421] */\n    { 1211, 0x0000000000000000ULL, 0x7CDBE0F7EA5B896EULL }, /* XSUM_XXH64_testdata[2422] */\n    { 1211, 0x000000009E3779B1ULL, 0x70D4AE6F9E51886BULL }, /* XSUM_XXH64_testdata[2423] */\n    { 1212, 0x0000000000000000ULL, 0xCE770894F4D5D15DULL }, /* XSUM_XXH64_testdata[2424] */\n    { 1212, 0x000000009E3779B1ULL, 0x755452B89ED9F2D1ULL }, /* XSUM_XXH64_testdata[2425] */\n    { 1213, 0x0000000000000000ULL, 0xBB83E0EFFA7DFA54ULL }, /* XSUM_XXH64_testdata[2426] */\n    { 1213, 0x000000009E3779B1ULL, 0x58FB723E54294F76ULL }, /* XSUM_XXH64_testdata[2427] */\n    { 1214, 0x0000000000000000ULL, 0x54C03BCFC0E5458BULL }, /* XSUM_XXH64_testdata[2428] */\n    { 1214, 0x000000009E3779B1ULL, 0xEAB3B6A957D1DF6FULL }, /* XSUM_XXH64_testdata[2429] */\n    { 1215, 0x0000000000000000ULL, 0xB5E8FDA67A9FA240ULL }, /* XSUM_XXH64_testdata[2430] */\n    { 1215, 0x000000009E3779B1ULL, 0x56E89D36D1AB6C1DULL }, /* XSUM_XXH64_testdata[2431] */\n    { 1216, 0x0000000000000000ULL, 0xDE77182C65201337ULL }, /* XSUM_XXH64_testdata[2432] */\n    { 1216, 0x000000009E3779B1ULL, 0x28975264E8B4E338ULL }, /* XSUM_XXH64_testdata[2433] */\n    { 1217, 0x0000000000000000ULL, 0x9BEE0EB2647A7EEBULL }, /* XSUM_XXH64_testdata[2434] */\n    { 1217, 0x000000009E3779B1ULL, 0x2E8CBA0CDC387C20ULL }, /* XSUM_XXH64_testdata[2435] */\n    { 1218, 0x0000000000000000ULL, 0xB62D99439AFDAEDBULL }, /* XSUM_XXH64_testdata[2436] */\n    { 1218, 0x000000009E3779B1ULL, 0xA4DB5D64DDD956BBULL }, /* XSUM_XXH64_testdata[2437] */\n    { 1219, 0x0000000000000000ULL, 0xE8D11AC02B8EAB7BULL }, /* XSUM_XXH64_testdata[2438] */\n    { 1219, 0x000000009E3779B1ULL, 0x2DBE469FA220C472ULL }, /* XSUM_XXH64_testdata[2439] */\n    { 1220, 0x0000000000000000ULL, 0xCBAD51EEDD66816DULL }, /* XSUM_XXH64_testdata[2440] */\n    { 1220, 0x000000009E3779B1ULL, 0xBA02659904B857E0ULL }, /* XSUM_XXH64_testdata[2441] */\n    { 1221, 0x0000000000000000ULL, 0x93EA7CF6DCB8AD89ULL }, /* XSUM_XXH64_testdata[2442] */\n    { 1221, 0x000000009E3779B1ULL, 0xED8BA7BA701C9FFEULL }, /* XSUM_XXH64_testdata[2443] */\n    { 1222, 0x0000000000000000ULL, 0x3E659462BCDB4687ULL }, /* XSUM_XXH64_testdata[2444] */\n    { 1222, 0x000000009E3779B1ULL, 0xF6E9E66FE5D72528ULL }, /* XSUM_XXH64_testdata[2445] */\n    { 1223, 0x0000000000000000ULL, 0xC50CB9759B1EF03DULL }, /* XSUM_XXH64_testdata[2446] */\n    { 1223, 0x000000009E3779B1ULL, 0x0D5298DFA1E249D0ULL }, /* XSUM_XXH64_testdata[2447] */\n    { 1224, 0x0000000000000000ULL, 0xEC928828A817C2A7ULL }, /* XSUM_XXH64_testdata[2448] */\n    { 1224, 0x000000009E3779B1ULL, 0xFAF833E82E2D9640ULL }, /* XSUM_XXH64_testdata[2449] */\n    { 1225, 0x0000000000000000ULL, 0x76B7DC3535DA6818ULL }, /* XSUM_XXH64_testdata[2450] */\n    { 1225, 0x000000009E3779B1ULL, 0x065AFF3ACD0996B8ULL }, /* XSUM_XXH64_testdata[2451] */\n    { 1226, 0x0000000000000000ULL, 0x06383BC6E3D960A7ULL }, /* XSUM_XXH64_testdata[2452] */\n    { 1226, 0x000000009E3779B1ULL, 0xCBE4D0EE4ABA90F7ULL }, /* XSUM_XXH64_testdata[2453] */\n    { 1227, 0x0000000000000000ULL, 0xC68FF1A111675934ULL }, /* XSUM_XXH64_testdata[2454] */\n    { 1227, 0x000000009E3779B1ULL, 0xC31BAFCB29D08595ULL }, /* XSUM_XXH64_testdata[2455] */\n    { 1228, 0x0000000000000000ULL, 0x2C26E822520C7733ULL }, /* XSUM_XXH64_testdata[2456] */\n    { 1228, 0x000000009E3779B1ULL, 0x2D125AC8523AAB2CULL }, /* XSUM_XXH64_testdata[2457] */\n    { 1229, 0x0000000000000000ULL, 0xC00294B5D505B24FULL }, /* XSUM_XXH64_testdata[2458] */\n    { 1229, 0x000000009E3779B1ULL, 0x7540334EDC7C1BF0ULL }, /* XSUM_XXH64_testdata[2459] */\n    { 1230, 0x0000000000000000ULL, 0x10E88D954C31D7F0ULL }, /* XSUM_XXH64_testdata[2460] */\n    { 1230, 0x000000009E3779B1ULL, 0x2F6F2890F1D3C877ULL }, /* XSUM_XXH64_testdata[2461] */\n    { 1231, 0x0000000000000000ULL, 0xCA6D15CAFAEA0146ULL }, /* XSUM_XXH64_testdata[2462] */\n    { 1231, 0x000000009E3779B1ULL, 0xA3D94C473B19D016ULL }, /* XSUM_XXH64_testdata[2463] */\n    { 1232, 0x0000000000000000ULL, 0x640B2E1F424F09FAULL }, /* XSUM_XXH64_testdata[2464] */\n    { 1232, 0x000000009E3779B1ULL, 0x1DCCFB4B6FE20C99ULL }, /* XSUM_XXH64_testdata[2465] */\n    { 1233, 0x0000000000000000ULL, 0xB4790504226D3011ULL }, /* XSUM_XXH64_testdata[2466] */\n    { 1233, 0x000000009E3779B1ULL, 0xFF1DD978AD406AC1ULL }, /* XSUM_XXH64_testdata[2467] */\n    { 1234, 0x0000000000000000ULL, 0x3A4525188BB049C2ULL }, /* XSUM_XXH64_testdata[2468] */\n    { 1234, 0x000000009E3779B1ULL, 0x12E61CAA320BD366ULL }, /* XSUM_XXH64_testdata[2469] */\n    { 1235, 0x0000000000000000ULL, 0x993465458AA35087ULL }, /* XSUM_XXH64_testdata[2470] */\n    { 1235, 0x000000009E3779B1ULL, 0x178B9FFD8135E6FEULL }, /* XSUM_XXH64_testdata[2471] */\n    { 1236, 0x0000000000000000ULL, 0xCD6BBCA73EA4BE8BULL }, /* XSUM_XXH64_testdata[2472] */\n    { 1236, 0x000000009E3779B1ULL, 0xEE2B003F9D074AE6ULL }, /* XSUM_XXH64_testdata[2473] */\n    { 1237, 0x0000000000000000ULL, 0x90A512E03AFCD3E9ULL }, /* XSUM_XXH64_testdata[2474] */\n    { 1237, 0x000000009E3779B1ULL, 0x7C04E47203E1752EULL }, /* XSUM_XXH64_testdata[2475] */\n    { 1238, 0x0000000000000000ULL, 0x9F8C688C51ADDEB9ULL }, /* XSUM_XXH64_testdata[2476] */\n    { 1238, 0x000000009E3779B1ULL, 0x60C6FEF44E7BF23FULL }, /* XSUM_XXH64_testdata[2477] */\n    { 1239, 0x0000000000000000ULL, 0xD6D6BC345847890EULL }, /* XSUM_XXH64_testdata[2478] */\n    { 1239, 0x000000009E3779B1ULL, 0x21AB7B16F663A955ULL }, /* XSUM_XXH64_testdata[2479] */\n    { 1240, 0x0000000000000000ULL, 0x12A0469391C4DA89ULL }, /* XSUM_XXH64_testdata[2480] */\n    { 1240, 0x000000009E3779B1ULL, 0xBA448958A73046ACULL }, /* XSUM_XXH64_testdata[2481] */\n    { 1241, 0x0000000000000000ULL, 0xB5A18E47A7361A03ULL }, /* XSUM_XXH64_testdata[2482] */\n    { 1241, 0x000000009E3779B1ULL, 0xFF8A6D2D8C8066FFULL }, /* XSUM_XXH64_testdata[2483] */\n    { 1242, 0x0000000000000000ULL, 0x1BB832B76D7ED273ULL }, /* XSUM_XXH64_testdata[2484] */\n    { 1242, 0x000000009E3779B1ULL, 0xCE8B78067B96E1DAULL }, /* XSUM_XXH64_testdata[2485] */\n    { 1243, 0x0000000000000000ULL, 0x5D5C95147DF7BAB7ULL }, /* XSUM_XXH64_testdata[2486] */\n    { 1243, 0x000000009E3779B1ULL, 0x9CC5328E65DFC6BCULL }, /* XSUM_XXH64_testdata[2487] */\n    { 1244, 0x0000000000000000ULL, 0xBA1913F9F322F428ULL }, /* XSUM_XXH64_testdata[2488] */\n    { 1244, 0x000000009E3779B1ULL, 0x59347B04EEAC3308ULL }, /* XSUM_XXH64_testdata[2489] */\n    { 1245, 0x0000000000000000ULL, 0x258263D261040E96ULL }, /* XSUM_XXH64_testdata[2490] */\n    { 1245, 0x000000009E3779B1ULL, 0x8D389AEAE6B4F1C1ULL }, /* XSUM_XXH64_testdata[2491] */\n    { 1246, 0x0000000000000000ULL, 0x760FF274356E9C5FULL }, /* XSUM_XXH64_testdata[2492] */\n    { 1246, 0x000000009E3779B1ULL, 0x7783C41F0339CCDAULL }, /* XSUM_XXH64_testdata[2493] */\n    { 1247, 0x0000000000000000ULL, 0xAF849E2A261EB492ULL }, /* XSUM_XXH64_testdata[2494] */\n    { 1247, 0x000000009E3779B1ULL, 0xACC69D37544594A8ULL }, /* XSUM_XXH64_testdata[2495] */\n    { 1248, 0x0000000000000000ULL, 0x0DE54E89CB210CDCULL }, /* XSUM_XXH64_testdata[2496] */\n    { 1248, 0x000000009E3779B1ULL, 0x61E849CA2EBEF9FFULL }, /* XSUM_XXH64_testdata[2497] */\n    { 1249, 0x0000000000000000ULL, 0x5A3C8D08EB806BCEULL }, /* XSUM_XXH64_testdata[2498] */\n    { 1249, 0x000000009E3779B1ULL, 0x379DC4974782BDD9ULL }, /* XSUM_XXH64_testdata[2499] */\n    { 1250, 0x0000000000000000ULL, 0x368DC1131379B9FEULL }, /* XSUM_XXH64_testdata[2500] */\n    { 1250, 0x000000009E3779B1ULL, 0x13325A3E8F165C63ULL }, /* XSUM_XXH64_testdata[2501] */\n    { 1251, 0x0000000000000000ULL, 0x0F27CA33D9737A85ULL }, /* XSUM_XXH64_testdata[2502] */\n    { 1251, 0x000000009E3779B1ULL, 0xC9A06B73A3CD97BCULL }, /* XSUM_XXH64_testdata[2503] */\n    { 1252, 0x0000000000000000ULL, 0xF7138A9DA0358357ULL }, /* XSUM_XXH64_testdata[2504] */\n    { 1252, 0x000000009E3779B1ULL, 0x483D37B4699A0BA5ULL }, /* XSUM_XXH64_testdata[2505] */\n    { 1253, 0x0000000000000000ULL, 0xBB6044EAFE2A37DDULL }, /* XSUM_XXH64_testdata[2506] */\n    { 1253, 0x000000009E3779B1ULL, 0xE832E33610F21528ULL }, /* XSUM_XXH64_testdata[2507] */\n    { 1254, 0x0000000000000000ULL, 0x93F9A5C948795368ULL }, /* XSUM_XXH64_testdata[2508] */\n    { 1254, 0x000000009E3779B1ULL, 0x9B5F496CB9421EBFULL }, /* XSUM_XXH64_testdata[2509] */\n    { 1255, 0x0000000000000000ULL, 0x50BCB44F97A7E98EULL }, /* XSUM_XXH64_testdata[2510] */\n    { 1255, 0x000000009E3779B1ULL, 0x89449A81F35B0468ULL }, /* XSUM_XXH64_testdata[2511] */\n    { 1256, 0x0000000000000000ULL, 0xA300597AED91639AULL }, /* XSUM_XXH64_testdata[2512] */\n    { 1256, 0x000000009E3779B1ULL, 0x612B85ADF15F21D6ULL }, /* XSUM_XXH64_testdata[2513] */\n    { 1257, 0x0000000000000000ULL, 0x368F340A4488595CULL }, /* XSUM_XXH64_testdata[2514] */\n    { 1257, 0x000000009E3779B1ULL, 0x669D33F4ABDF123CULL }, /* XSUM_XXH64_testdata[2515] */\n    { 1258, 0x0000000000000000ULL, 0xABDFE2C1351C975CULL }, /* XSUM_XXH64_testdata[2516] */\n    { 1258, 0x000000009E3779B1ULL, 0xD62D73141A7B16D3ULL }, /* XSUM_XXH64_testdata[2517] */\n    { 1259, 0x0000000000000000ULL, 0x80E36E7DF86965A4ULL }, /* XSUM_XXH64_testdata[2518] */\n    { 1259, 0x000000009E3779B1ULL, 0x4625C93A0EA7D013ULL }, /* XSUM_XXH64_testdata[2519] */\n    { 1260, 0x0000000000000000ULL, 0xFB4CBD33B3DF9999ULL }, /* XSUM_XXH64_testdata[2520] */\n    { 1260, 0x000000009E3779B1ULL, 0x363E4DFFEAFD4E6BULL }, /* XSUM_XXH64_testdata[2521] */\n    { 1261, 0x0000000000000000ULL, 0x0E91C1D363780BBAULL }, /* XSUM_XXH64_testdata[2522] */\n    { 1261, 0x000000009E3779B1ULL, 0x79DAFA2A931AA790ULL }, /* XSUM_XXH64_testdata[2523] */\n    { 1262, 0x0000000000000000ULL, 0xB598E511B92FA54DULL }, /* XSUM_XXH64_testdata[2524] */\n    { 1262, 0x000000009E3779B1ULL, 0x7452FF1D15408118ULL }, /* XSUM_XXH64_testdata[2525] */\n    { 1263, 0x0000000000000000ULL, 0x6619E94FE3900A83ULL }, /* XSUM_XXH64_testdata[2526] */\n    { 1263, 0x000000009E3779B1ULL, 0x4FB18DBBE813F3E0ULL }, /* XSUM_XXH64_testdata[2527] */\n    { 1264, 0x0000000000000000ULL, 0xD06D2CBB6A4B4E8CULL }, /* XSUM_XXH64_testdata[2528] */\n    { 1264, 0x000000009E3779B1ULL, 0x9AF61B3055DDFE08ULL }, /* XSUM_XXH64_testdata[2529] */\n    { 1265, 0x0000000000000000ULL, 0xD1900B0CC6086C0EULL }, /* XSUM_XXH64_testdata[2530] */\n    { 1265, 0x000000009E3779B1ULL, 0xE4063D30E4B884C2ULL }, /* XSUM_XXH64_testdata[2531] */\n    { 1266, 0x0000000000000000ULL, 0x98AA9D73F2DAC51FULL }, /* XSUM_XXH64_testdata[2532] */\n    { 1266, 0x000000009E3779B1ULL, 0x2E7DA66C23F348FDULL }, /* XSUM_XXH64_testdata[2533] */\n    { 1267, 0x0000000000000000ULL, 0xA4EE1CAA73D39420ULL }, /* XSUM_XXH64_testdata[2534] */\n    { 1267, 0x000000009E3779B1ULL, 0xB4D806D4A19DE853ULL }, /* XSUM_XXH64_testdata[2535] */\n    { 1268, 0x0000000000000000ULL, 0x94AB4731B858F960ULL }, /* XSUM_XXH64_testdata[2536] */\n    { 1268, 0x000000009E3779B1ULL, 0x5A8A9DC20D29F6BFULL }, /* XSUM_XXH64_testdata[2537] */\n    { 1269, 0x0000000000000000ULL, 0x3876F287061992F2ULL }, /* XSUM_XXH64_testdata[2538] */\n    { 1269, 0x000000009E3779B1ULL, 0xFC975910A170AA4AULL }, /* XSUM_XXH64_testdata[2539] */\n    { 1270, 0x0000000000000000ULL, 0x5FD5A4DB54952F6CULL }, /* XSUM_XXH64_testdata[2540] */\n    { 1270, 0x000000009E3779B1ULL, 0x036428121B4923F4ULL }, /* XSUM_XXH64_testdata[2541] */\n    { 1271, 0x0000000000000000ULL, 0x6829473CA97E14F9ULL }, /* XSUM_XXH64_testdata[2542] */\n    { 1271, 0x000000009E3779B1ULL, 0x01B5CD722CC40F2AULL }, /* XSUM_XXH64_testdata[2543] */\n    { 1272, 0x0000000000000000ULL, 0xBE8A58BE020D3230ULL }, /* XSUM_XXH64_testdata[2544] */\n    { 1272, 0x000000009E3779B1ULL, 0x6DAF9D0FE539903FULL }, /* XSUM_XXH64_testdata[2545] */\n    { 1273, 0x0000000000000000ULL, 0x72AB5959633F5E27ULL }, /* XSUM_XXH64_testdata[2546] */\n    { 1273, 0x000000009E3779B1ULL, 0x7D6F1923C6515C62ULL }, /* XSUM_XXH64_testdata[2547] */\n    { 1274, 0x0000000000000000ULL, 0x8061916A374A52D9ULL }, /* XSUM_XXH64_testdata[2548] */\n    { 1274, 0x000000009E3779B1ULL, 0x658A01111D5ACD46ULL }, /* XSUM_XXH64_testdata[2549] */\n    { 1275, 0x0000000000000000ULL, 0xB7824002D110E264ULL }, /* XSUM_XXH64_testdata[2550] */\n    { 1275, 0x000000009E3779B1ULL, 0xED42D01CB92B156CULL }, /* XSUM_XXH64_testdata[2551] */\n    { 1276, 0x0000000000000000ULL, 0x0DBB0A3AEAD70D92ULL }, /* XSUM_XXH64_testdata[2552] */\n    { 1276, 0x000000009E3779B1ULL, 0xAA81164963B74FD9ULL }, /* XSUM_XXH64_testdata[2553] */\n    { 1277, 0x0000000000000000ULL, 0x601AD4BD37F3E98AULL }, /* XSUM_XXH64_testdata[2554] */\n    { 1277, 0x000000009E3779B1ULL, 0x5E3395B8DE13A1AFULL }, /* XSUM_XXH64_testdata[2555] */\n    { 1278, 0x0000000000000000ULL, 0x090F1C6FAB3195D0ULL }, /* XSUM_XXH64_testdata[2556] */\n    { 1278, 0x000000009E3779B1ULL, 0x270DA22809FB4A56ULL }, /* XSUM_XXH64_testdata[2557] */\n    { 1279, 0x0000000000000000ULL, 0x5522EF6FB953BBB7ULL }, /* XSUM_XXH64_testdata[2558] */\n    { 1279, 0x000000009E3779B1ULL, 0xE0D3915752724221ULL }, /* XSUM_XXH64_testdata[2559] */\n    { 1280, 0x0000000000000000ULL, 0x620780F4DA000BA0ULL }, /* XSUM_XXH64_testdata[2560] */\n    { 1280, 0x000000009E3779B1ULL, 0x411FCE4EC0CD4D04ULL }, /* XSUM_XXH64_testdata[2561] */\n    { 1281, 0x0000000000000000ULL, 0x8BE240B151E4AFB4ULL }, /* XSUM_XXH64_testdata[2562] */\n    { 1281, 0x000000009E3779B1ULL, 0x5BC1006A8ECC7A82ULL }, /* XSUM_XXH64_testdata[2563] */\n    { 1282, 0x0000000000000000ULL, 0x393728DEF8661B73ULL }, /* XSUM_XXH64_testdata[2564] */\n    { 1282, 0x000000009E3779B1ULL, 0xFE7B502FFA49EF1AULL }, /* XSUM_XXH64_testdata[2565] */\n    { 1283, 0x0000000000000000ULL, 0x96216CB0767E98B0ULL }, /* XSUM_XXH64_testdata[2566] */\n    { 1283, 0x000000009E3779B1ULL, 0x5F796F16052AEC6BULL }, /* XSUM_XXH64_testdata[2567] */\n    { 1284, 0x0000000000000000ULL, 0x4A72C5266407E593ULL }, /* XSUM_XXH64_testdata[2568] */\n    { 1284, 0x000000009E3779B1ULL, 0xEBB729E300EC6656ULL }, /* XSUM_XXH64_testdata[2569] */\n    { 1285, 0x0000000000000000ULL, 0x45BF8D6F7DC8DD11ULL }, /* XSUM_XXH64_testdata[2570] */\n    { 1285, 0x000000009E3779B1ULL, 0x0FD93C9A526ED216ULL }, /* XSUM_XXH64_testdata[2571] */\n    { 1286, 0x0000000000000000ULL, 0x7D95824B549B71CBULL }, /* XSUM_XXH64_testdata[2572] */\n    { 1286, 0x000000009E3779B1ULL, 0xC2401042E5370568ULL }, /* XSUM_XXH64_testdata[2573] */\n    { 1287, 0x0000000000000000ULL, 0x2CBFD6B6589C2905ULL }, /* XSUM_XXH64_testdata[2574] */\n    { 1287, 0x000000009E3779B1ULL, 0x45C807941C51E844ULL }, /* XSUM_XXH64_testdata[2575] */\n    { 1288, 0x0000000000000000ULL, 0x161BF2E173FFE0A0ULL }, /* XSUM_XXH64_testdata[2576] */\n    { 1288, 0x000000009E3779B1ULL, 0x4BA7064E1EE3ABABULL }, /* XSUM_XXH64_testdata[2577] */\n    { 1289, 0x0000000000000000ULL, 0x96EBFEDE5314C917ULL }, /* XSUM_XXH64_testdata[2578] */\n    { 1289, 0x000000009E3779B1ULL, 0xC41857D925B1C574ULL }, /* XSUM_XXH64_testdata[2579] */\n    { 1290, 0x0000000000000000ULL, 0xD3DBD1B2793B3913ULL }, /* XSUM_XXH64_testdata[2580] */\n    { 1290, 0x000000009E3779B1ULL, 0x1BB19D4D9BC8C1EFULL }, /* XSUM_XXH64_testdata[2581] */\n    { 1291, 0x0000000000000000ULL, 0x504C62B822A74FEDULL }, /* XSUM_XXH64_testdata[2582] */\n    { 1291, 0x000000009E3779B1ULL, 0xD74421D8EF71F824ULL }, /* XSUM_XXH64_testdata[2583] */\n    { 1292, 0x0000000000000000ULL, 0x0420AE710D4369F1ULL }, /* XSUM_XXH64_testdata[2584] */\n    { 1292, 0x000000009E3779B1ULL, 0x6F9E7625EBB09291ULL }, /* XSUM_XXH64_testdata[2585] */\n    { 1293, 0x0000000000000000ULL, 0x625A4E46766C5A3CULL }, /* XSUM_XXH64_testdata[2586] */\n    { 1293, 0x000000009E3779B1ULL, 0xA9AE6496FE24B1CDULL }, /* XSUM_XXH64_testdata[2587] */\n    { 1294, 0x0000000000000000ULL, 0x6D2D56B92F532AA1ULL }, /* XSUM_XXH64_testdata[2588] */\n    { 1294, 0x000000009E3779B1ULL, 0xA365E105007B3D4BULL }, /* XSUM_XXH64_testdata[2589] */\n    { 1295, 0x0000000000000000ULL, 0x6CE423EEB218BA1EULL }, /* XSUM_XXH64_testdata[2590] */\n    { 1295, 0x000000009E3779B1ULL, 0x362275B2201E775DULL }, /* XSUM_XXH64_testdata[2591] */\n    { 1296, 0x0000000000000000ULL, 0x57E7A8881FE5AE81ULL }, /* XSUM_XXH64_testdata[2592] */\n    { 1296, 0x000000009E3779B1ULL, 0xF0A74F821C1AD1C1ULL }, /* XSUM_XXH64_testdata[2593] */\n    { 1297, 0x0000000000000000ULL, 0xF1303BE97BB4A246ULL }, /* XSUM_XXH64_testdata[2594] */\n    { 1297, 0x000000009E3779B1ULL, 0xC5DC38AFF72A9152ULL }, /* XSUM_XXH64_testdata[2595] */\n    { 1298, 0x0000000000000000ULL, 0x9F66761CFFCB45B1ULL }, /* XSUM_XXH64_testdata[2596] */\n    { 1298, 0x000000009E3779B1ULL, 0x046041DA0532975AULL }, /* XSUM_XXH64_testdata[2597] */\n    { 1299, 0x0000000000000000ULL, 0x251386907EF2F085ULL }, /* XSUM_XXH64_testdata[2598] */\n    { 1299, 0x000000009E3779B1ULL, 0x0BF0ADBD09C1AC4EULL }, /* XSUM_XXH64_testdata[2599] */\n    { 1300, 0x0000000000000000ULL, 0x0A02074E30FC36FFULL }, /* XSUM_XXH64_testdata[2600] */\n    { 1300, 0x000000009E3779B1ULL, 0x1AA00DE7FB6AB7DDULL }, /* XSUM_XXH64_testdata[2601] */\n    { 1301, 0x0000000000000000ULL, 0x4B39E4D9BFA370EAULL }, /* XSUM_XXH64_testdata[2602] */\n    { 1301, 0x000000009E3779B1ULL, 0xF4F19AD9A6F4277AULL }, /* XSUM_XXH64_testdata[2603] */\n    { 1302, 0x0000000000000000ULL, 0x4672255174D95AF2ULL }, /* XSUM_XXH64_testdata[2604] */\n    { 1302, 0x000000009E3779B1ULL, 0x9B8F68A596C484DBULL }, /* XSUM_XXH64_testdata[2605] */\n    { 1303, 0x0000000000000000ULL, 0x0B3FA19454D12CDCULL }, /* XSUM_XXH64_testdata[2606] */\n    { 1303, 0x000000009E3779B1ULL, 0xDE31CEA673ABFB4AULL }, /* XSUM_XXH64_testdata[2607] */\n    { 1304, 0x0000000000000000ULL, 0x5AD5DD0AECCD49D6ULL }, /* XSUM_XXH64_testdata[2608] */\n    { 1304, 0x000000009E3779B1ULL, 0x1CB9C7C2176B6770ULL }, /* XSUM_XXH64_testdata[2609] */\n    { 1305, 0x0000000000000000ULL, 0xA5577C5E9001E583ULL }, /* XSUM_XXH64_testdata[2610] */\n    { 1305, 0x000000009E3779B1ULL, 0xE9E3B6DE8FA67E13ULL }, /* XSUM_XXH64_testdata[2611] */\n    { 1306, 0x0000000000000000ULL, 0x0F74C89D25ECBA2EULL }, /* XSUM_XXH64_testdata[2612] */\n    { 1306, 0x000000009E3779B1ULL, 0x77A114AD8C9712BBULL }, /* XSUM_XXH64_testdata[2613] */\n    { 1307, 0x0000000000000000ULL, 0x8F12CD107793E8ACULL }, /* XSUM_XXH64_testdata[2614] */\n    { 1307, 0x000000009E3779B1ULL, 0x78D700D966328A18ULL }, /* XSUM_XXH64_testdata[2615] */\n    { 1308, 0x0000000000000000ULL, 0xFD0109A81B799CFFULL }, /* XSUM_XXH64_testdata[2616] */\n    { 1308, 0x000000009E3779B1ULL, 0x5EEBECB070F7B11CULL }, /* XSUM_XXH64_testdata[2617] */\n    { 1309, 0x0000000000000000ULL, 0x9CBB8CE45E0B230AULL }, /* XSUM_XXH64_testdata[2618] */\n    { 1309, 0x000000009E3779B1ULL, 0x6B756934FB7B7EDDULL }, /* XSUM_XXH64_testdata[2619] */\n    { 1310, 0x0000000000000000ULL, 0x1DCD7B65323353C2ULL }, /* XSUM_XXH64_testdata[2620] */\n    { 1310, 0x000000009E3779B1ULL, 0xAF699F491E0422D0ULL }, /* XSUM_XXH64_testdata[2621] */\n    { 1311, 0x0000000000000000ULL, 0xACBDD24166A3D165ULL }, /* XSUM_XXH64_testdata[2622] */\n    { 1311, 0x000000009E3779B1ULL, 0x048EA11D235CC86AULL }, /* XSUM_XXH64_testdata[2623] */\n    { 1312, 0x0000000000000000ULL, 0x86C56523EB82696FULL }, /* XSUM_XXH64_testdata[2624] */\n    { 1312, 0x000000009E3779B1ULL, 0x9A7B448CE5801A12ULL }, /* XSUM_XXH64_testdata[2625] */\n    { 1313, 0x0000000000000000ULL, 0x1CE9B1FF5C0DF599ULL }, /* XSUM_XXH64_testdata[2626] */\n    { 1313, 0x000000009E3779B1ULL, 0x1B23F0FD44BB34B8ULL }, /* XSUM_XXH64_testdata[2627] */\n    { 1314, 0x0000000000000000ULL, 0xD5BF5A00BCBAC10CULL }, /* XSUM_XXH64_testdata[2628] */\n    { 1314, 0x000000009E3779B1ULL, 0x9D4D890FA4E2EDA9ULL }, /* XSUM_XXH64_testdata[2629] */\n    { 1315, 0x0000000000000000ULL, 0x6114C5E7EA3AD99DULL }, /* XSUM_XXH64_testdata[2630] */\n    { 1315, 0x000000009E3779B1ULL, 0x3157827C67062E52ULL }, /* XSUM_XXH64_testdata[2631] */\n    { 1316, 0x0000000000000000ULL, 0xC19238B4711F0A91ULL }, /* XSUM_XXH64_testdata[2632] */\n    { 1316, 0x000000009E3779B1ULL, 0x3218A499FC46F348ULL }, /* XSUM_XXH64_testdata[2633] */\n    { 1317, 0x0000000000000000ULL, 0xD424E17CF418A27EULL }, /* XSUM_XXH64_testdata[2634] */\n    { 1317, 0x000000009E3779B1ULL, 0x9298929DB8C68228ULL }, /* XSUM_XXH64_testdata[2635] */\n    { 1318, 0x0000000000000000ULL, 0xDA58D90A8397A6E7ULL }, /* XSUM_XXH64_testdata[2636] */\n    { 1318, 0x000000009E3779B1ULL, 0x895B8F957AF9E3B0ULL }, /* XSUM_XXH64_testdata[2637] */\n    { 1319, 0x0000000000000000ULL, 0xA9AC97A1B9A9C335ULL }, /* XSUM_XXH64_testdata[2638] */\n    { 1319, 0x000000009E3779B1ULL, 0x44069E8EC3A9AE46ULL }, /* XSUM_XXH64_testdata[2639] */\n    { 1320, 0x0000000000000000ULL, 0xB05F1E644ED3F09AULL }, /* XSUM_XXH64_testdata[2640] */\n    { 1320, 0x000000009E3779B1ULL, 0x2741CB1FB955D529ULL }, /* XSUM_XXH64_testdata[2641] */\n    { 1321, 0x0000000000000000ULL, 0x636235DE7AD43328ULL }, /* XSUM_XXH64_testdata[2642] */\n    { 1321, 0x000000009E3779B1ULL, 0x1FDC0680D864142DULL }, /* XSUM_XXH64_testdata[2643] */\n    { 1322, 0x0000000000000000ULL, 0x821690F2B23DD596ULL }, /* XSUM_XXH64_testdata[2644] */\n    { 1322, 0x000000009E3779B1ULL, 0x8EFC06CACA6C24D1ULL }, /* XSUM_XXH64_testdata[2645] */\n    { 1323, 0x0000000000000000ULL, 0xDD18B16D27A40B8CULL }, /* XSUM_XXH64_testdata[2646] */\n    { 1323, 0x000000009E3779B1ULL, 0xB6044F19A110EE6AULL }, /* XSUM_XXH64_testdata[2647] */\n    { 1324, 0x0000000000000000ULL, 0x3A038D0F25729ED8ULL }, /* XSUM_XXH64_testdata[2648] */\n    { 1324, 0x000000009E3779B1ULL, 0x5A3FC610059044EBULL }, /* XSUM_XXH64_testdata[2649] */\n    { 1325, 0x0000000000000000ULL, 0x35DC34B52F743250ULL }, /* XSUM_XXH64_testdata[2650] */\n    { 1325, 0x000000009E3779B1ULL, 0xFF15107CAF2EF318ULL }, /* XSUM_XXH64_testdata[2651] */\n    { 1326, 0x0000000000000000ULL, 0x1F2499166B03FD84ULL }, /* XSUM_XXH64_testdata[2652] */\n    { 1326, 0x000000009E3779B1ULL, 0x8C304B194F9E4407ULL }, /* XSUM_XXH64_testdata[2653] */\n    { 1327, 0x0000000000000000ULL, 0xD1D3D9937F31EBB3ULL }, /* XSUM_XXH64_testdata[2654] */\n    { 1327, 0x000000009E3779B1ULL, 0x79B78D9E74862661ULL }, /* XSUM_XXH64_testdata[2655] */\n    { 1328, 0x0000000000000000ULL, 0xE709EE1A35098365ULL }, /* XSUM_XXH64_testdata[2656] */\n    { 1328, 0x000000009E3779B1ULL, 0xE1CFAFF78C6B23D2ULL }, /* XSUM_XXH64_testdata[2657] */\n    { 1329, 0x0000000000000000ULL, 0xB12C7D1FBF2660FDULL }, /* XSUM_XXH64_testdata[2658] */\n    { 1329, 0x000000009E3779B1ULL, 0x0EB7314B42C4782DULL }, /* XSUM_XXH64_testdata[2659] */\n    { 1330, 0x0000000000000000ULL, 0x45E695DC6211BF44ULL }, /* XSUM_XXH64_testdata[2660] */\n    { 1330, 0x000000009E3779B1ULL, 0x449D2A747B882733ULL }, /* XSUM_XXH64_testdata[2661] */\n    { 1331, 0x0000000000000000ULL, 0x51BFFC24CED5C05DULL }, /* XSUM_XXH64_testdata[2662] */\n    { 1331, 0x000000009E3779B1ULL, 0x4C643504A0EA9A5CULL }, /* XSUM_XXH64_testdata[2663] */\n    { 1332, 0x0000000000000000ULL, 0x0C0F3DD79316A847ULL }, /* XSUM_XXH64_testdata[2664] */\n    { 1332, 0x000000009E3779B1ULL, 0x54F568721DE3221DULL }, /* XSUM_XXH64_testdata[2665] */\n    { 1333, 0x0000000000000000ULL, 0x6CE58BECEE8FEDB8ULL }, /* XSUM_XXH64_testdata[2666] */\n    { 1333, 0x000000009E3779B1ULL, 0xDEE477768D9FAB72ULL }, /* XSUM_XXH64_testdata[2667] */\n    { 1334, 0x0000000000000000ULL, 0x438579D86A9C15ACULL }, /* XSUM_XXH64_testdata[2668] */\n    { 1334, 0x000000009E3779B1ULL, 0x16B36B7128883832ULL }, /* XSUM_XXH64_testdata[2669] */\n    { 1335, 0x0000000000000000ULL, 0x0CBE8973D7F46722ULL }, /* XSUM_XXH64_testdata[2670] */\n    { 1335, 0x000000009E3779B1ULL, 0xAB6A2F42B23D166FULL }, /* XSUM_XXH64_testdata[2671] */\n    { 1336, 0x0000000000000000ULL, 0xD59552DAA0FA53B7ULL }, /* XSUM_XXH64_testdata[2672] */\n    { 1336, 0x000000009E3779B1ULL, 0x548AB163F16CCAE5ULL }, /* XSUM_XXH64_testdata[2673] */\n    { 1337, 0x0000000000000000ULL, 0xF46DD30316E0C084ULL }, /* XSUM_XXH64_testdata[2674] */\n    { 1337, 0x000000009E3779B1ULL, 0xEDEA0A122A6A072BULL }, /* XSUM_XXH64_testdata[2675] */\n    { 1338, 0x0000000000000000ULL, 0x452088C712C624D5ULL }, /* XSUM_XXH64_testdata[2676] */\n    { 1338, 0x000000009E3779B1ULL, 0x83540FF52504F1B8ULL }, /* XSUM_XXH64_testdata[2677] */\n    { 1339, 0x0000000000000000ULL, 0xA560912E46111B7FULL }, /* XSUM_XXH64_testdata[2678] */\n    { 1339, 0x000000009E3779B1ULL, 0x2D6BB8E5263346E6ULL }, /* XSUM_XXH64_testdata[2679] */\n    { 1340, 0x0000000000000000ULL, 0x6DA14D62717846D8ULL }, /* XSUM_XXH64_testdata[2680] */\n    { 1340, 0x000000009E3779B1ULL, 0x114E2AE65121AD4DULL }, /* XSUM_XXH64_testdata[2681] */\n    { 1341, 0x0000000000000000ULL, 0x918717AC22073D5BULL }, /* XSUM_XXH64_testdata[2682] */\n    { 1341, 0x000000009E3779B1ULL, 0x6BC0B407F5C02975ULL }, /* XSUM_XXH64_testdata[2683] */\n    { 1342, 0x0000000000000000ULL, 0x57444473A4A9CC90ULL }, /* XSUM_XXH64_testdata[2684] */\n    { 1342, 0x000000009E3779B1ULL, 0x276AD11CD9F35079ULL }, /* XSUM_XXH64_testdata[2685] */\n    { 1343, 0x0000000000000000ULL, 0x7AEE235559D4C0C8ULL }, /* XSUM_XXH64_testdata[2686] */\n    { 1343, 0x000000009E3779B1ULL, 0x5D1427663CCB9705ULL }, /* XSUM_XXH64_testdata[2687] */\n    { 1344, 0x0000000000000000ULL, 0x15DC7B5D5799797DULL }, /* XSUM_XXH64_testdata[2688] */\n    { 1344, 0x000000009E3779B1ULL, 0x2B4E77316D560D11ULL }, /* XSUM_XXH64_testdata[2689] */\n    { 1345, 0x0000000000000000ULL, 0x769B557586674FE0ULL }, /* XSUM_XXH64_testdata[2690] */\n    { 1345, 0x000000009E3779B1ULL, 0x5D1B1868C61F2FB8ULL }, /* XSUM_XXH64_testdata[2691] */\n    { 1346, 0x0000000000000000ULL, 0xF9ACBC483F6B3B7AULL }, /* XSUM_XXH64_testdata[2692] */\n    { 1346, 0x000000009E3779B1ULL, 0x0C3B4817F0C6B1DBULL }, /* XSUM_XXH64_testdata[2693] */\n    { 1347, 0x0000000000000000ULL, 0x501B6E21E12B9E60ULL }, /* XSUM_XXH64_testdata[2694] */\n    { 1347, 0x000000009E3779B1ULL, 0x227D23F3803B24CDULL }, /* XSUM_XXH64_testdata[2695] */\n    { 1348, 0x0000000000000000ULL, 0x54E43E94FB42C61EULL }, /* XSUM_XXH64_testdata[2696] */\n    { 1348, 0x000000009E3779B1ULL, 0x04AF23C4A0B4EB7FULL }, /* XSUM_XXH64_testdata[2697] */\n    { 1349, 0x0000000000000000ULL, 0x197CC234355FD003ULL }, /* XSUM_XXH64_testdata[2698] */\n    { 1349, 0x000000009E3779B1ULL, 0xBEB7DF3E0B8F389AULL }, /* XSUM_XXH64_testdata[2699] */\n    { 1350, 0x0000000000000000ULL, 0x8E6D5D488D4DD6E3ULL }, /* XSUM_XXH64_testdata[2700] */\n    { 1350, 0x000000009E3779B1ULL, 0xE7BE820CD7CEE527ULL }, /* XSUM_XXH64_testdata[2701] */\n    { 1351, 0x0000000000000000ULL, 0x1CBB77C52C65DA71ULL }, /* XSUM_XXH64_testdata[2702] */\n    { 1351, 0x000000009E3779B1ULL, 0x9B6867A790593D53ULL }, /* XSUM_XXH64_testdata[2703] */\n    { 1352, 0x0000000000000000ULL, 0x6DFB8558EA5E0582ULL }, /* XSUM_XXH64_testdata[2704] */\n    { 1352, 0x000000009E3779B1ULL, 0x27E3CED0D26CE4CBULL }, /* XSUM_XXH64_testdata[2705] */\n    { 1353, 0x0000000000000000ULL, 0xF378009D91F1DCB5ULL }, /* XSUM_XXH64_testdata[2706] */\n    { 1353, 0x000000009E3779B1ULL, 0x47C62E6F224B1F7AULL }, /* XSUM_XXH64_testdata[2707] */\n    { 1354, 0x0000000000000000ULL, 0x927F840AE002C3F2ULL }, /* XSUM_XXH64_testdata[2708] */\n    { 1354, 0x000000009E3779B1ULL, 0x2317F37121D094C8ULL }, /* XSUM_XXH64_testdata[2709] */\n    { 1355, 0x0000000000000000ULL, 0xC6E08DB10CE995E1ULL }, /* XSUM_XXH64_testdata[2710] */\n    { 1355, 0x000000009E3779B1ULL, 0x6F44B118D871357DULL }, /* XSUM_XXH64_testdata[2711] */\n    { 1356, 0x0000000000000000ULL, 0x1393620564EC0EB1ULL }, /* XSUM_XXH64_testdata[2712] */\n    { 1356, 0x000000009E3779B1ULL, 0x622FFF1D7F8177E8ULL }, /* XSUM_XXH64_testdata[2713] */\n    { 1357, 0x0000000000000000ULL, 0x983262A18B586007ULL }, /* XSUM_XXH64_testdata[2714] */\n    { 1357, 0x000000009E3779B1ULL, 0xBF042E03A98F6AE4ULL }, /* XSUM_XXH64_testdata[2715] */\n    { 1358, 0x0000000000000000ULL, 0x859C256485F976E7ULL }, /* XSUM_XXH64_testdata[2716] */\n    { 1358, 0x000000009E3779B1ULL, 0x6503CE93831EC22EULL }, /* XSUM_XXH64_testdata[2717] */\n    { 1359, 0x0000000000000000ULL, 0x1D100ED534A2B810ULL }, /* XSUM_XXH64_testdata[2718] */\n    { 1359, 0x000000009E3779B1ULL, 0xA8C9E649EB779358ULL }, /* XSUM_XXH64_testdata[2719] */\n    { 1360, 0x0000000000000000ULL, 0x695F3D196CEEC9DDULL }, /* XSUM_XXH64_testdata[2720] */\n    { 1360, 0x000000009E3779B1ULL, 0x961139EEE9C207DAULL }, /* XSUM_XXH64_testdata[2721] */\n    { 1361, 0x0000000000000000ULL, 0xA3AC9A161CE70ADDULL }, /* XSUM_XXH64_testdata[2722] */\n    { 1361, 0x000000009E3779B1ULL, 0x766B37641FF3F02BULL }, /* XSUM_XXH64_testdata[2723] */\n    { 1362, 0x0000000000000000ULL, 0x36222398650CAC27ULL }, /* XSUM_XXH64_testdata[2724] */\n    { 1362, 0x000000009E3779B1ULL, 0x05E749AF5E2B7653ULL }, /* XSUM_XXH64_testdata[2725] */\n    { 1363, 0x0000000000000000ULL, 0x92379CCF5DA590BCULL }, /* XSUM_XXH64_testdata[2726] */\n    { 1363, 0x000000009E3779B1ULL, 0x9ACD63E8D7AF8CB5ULL }, /* XSUM_XXH64_testdata[2727] */\n    { 1364, 0x0000000000000000ULL, 0x1380DE1F0C1F2EF6ULL }, /* XSUM_XXH64_testdata[2728] */\n    { 1364, 0x000000009E3779B1ULL, 0x3E66D65956E4E057ULL }, /* XSUM_XXH64_testdata[2729] */\n    { 1365, 0x0000000000000000ULL, 0x2781F7BF3D5E0C02ULL }, /* XSUM_XXH64_testdata[2730] */\n    { 1365, 0x000000009E3779B1ULL, 0x763FBFD7344F4B5CULL }, /* XSUM_XXH64_testdata[2731] */\n    { 1366, 0x0000000000000000ULL, 0x52B1CD098243A478ULL }, /* XSUM_XXH64_testdata[2732] */\n    { 1366, 0x000000009E3779B1ULL, 0xE989DD600715A8B2ULL }, /* XSUM_XXH64_testdata[2733] */\n    { 1367, 0x0000000000000000ULL, 0xAB8832B33745668DULL }, /* XSUM_XXH64_testdata[2734] */\n    { 1367, 0x000000009E3779B1ULL, 0xF2DB0271B62431EEULL }, /* XSUM_XXH64_testdata[2735] */\n    { 1368, 0x0000000000000000ULL, 0x3E10A789EF2DE6B5ULL }, /* XSUM_XXH64_testdata[2736] */\n    { 1368, 0x000000009E3779B1ULL, 0x3ACEDB96AA1231A4ULL }, /* XSUM_XXH64_testdata[2737] */\n    { 1369, 0x0000000000000000ULL, 0x718FA0567EF47573ULL }, /* XSUM_XXH64_testdata[2738] */\n    { 1369, 0x000000009E3779B1ULL, 0x0495FC84A8D0A331ULL }, /* XSUM_XXH64_testdata[2739] */\n    { 1370, 0x0000000000000000ULL, 0xD508D60043853DE7ULL }, /* XSUM_XXH64_testdata[2740] */\n    { 1370, 0x000000009E3779B1ULL, 0xBD970E64AB9E7DA5ULL }, /* XSUM_XXH64_testdata[2741] */\n    { 1371, 0x0000000000000000ULL, 0xFEC8D842F5B0DFEBULL }, /* XSUM_XXH64_testdata[2742] */\n    { 1371, 0x000000009E3779B1ULL, 0xC0CEBE8A2FB49D51ULL }, /* XSUM_XXH64_testdata[2743] */\n    { 1372, 0x0000000000000000ULL, 0x80A3B95D583AA0B2ULL }, /* XSUM_XXH64_testdata[2744] */\n    { 1372, 0x000000009E3779B1ULL, 0x420BE2BCA48D8E97ULL }, /* XSUM_XXH64_testdata[2745] */\n    { 1373, 0x0000000000000000ULL, 0xB79CCFDC858203FFULL }, /* XSUM_XXH64_testdata[2746] */\n    { 1373, 0x000000009E3779B1ULL, 0x1DC28B3C9F574291ULL }, /* XSUM_XXH64_testdata[2747] */\n    { 1374, 0x0000000000000000ULL, 0x1BAA88C3B3C9655FULL }, /* XSUM_XXH64_testdata[2748] */\n    { 1374, 0x000000009E3779B1ULL, 0x9EE63A79A32A3662ULL }, /* XSUM_XXH64_testdata[2749] */\n    { 1375, 0x0000000000000000ULL, 0xA2AC5951A4B81E9AULL }, /* XSUM_XXH64_testdata[2750] */\n    { 1375, 0x000000009E3779B1ULL, 0xB605B0B60623303DULL }, /* XSUM_XXH64_testdata[2751] */\n    { 1376, 0x0000000000000000ULL, 0x05105AD85ED25464ULL }, /* XSUM_XXH64_testdata[2752] */\n    { 1376, 0x000000009E3779B1ULL, 0x1B3486DF856CA7EAULL }, /* XSUM_XXH64_testdata[2753] */\n    { 1377, 0x0000000000000000ULL, 0x9B980D34293F34CAULL }, /* XSUM_XXH64_testdata[2754] */\n    { 1377, 0x000000009E3779B1ULL, 0xC8C8C18F611F229CULL }, /* XSUM_XXH64_testdata[2755] */\n    { 1378, 0x0000000000000000ULL, 0x9E22C0A652672D0BULL }, /* XSUM_XXH64_testdata[2756] */\n    { 1378, 0x000000009E3779B1ULL, 0x6BFAB8641B1E621CULL }, /* XSUM_XXH64_testdata[2757] */\n    { 1379, 0x0000000000000000ULL, 0x5086E3821CC8406CULL }, /* XSUM_XXH64_testdata[2758] */\n    { 1379, 0x000000009E3779B1ULL, 0xCFBF4F87BB412E3BULL }, /* XSUM_XXH64_testdata[2759] */\n    { 1380, 0x0000000000000000ULL, 0x7BE9601EBCC8286CULL }, /* XSUM_XXH64_testdata[2760] */\n    { 1380, 0x000000009E3779B1ULL, 0x4C80BA36A25C0399ULL }, /* XSUM_XXH64_testdata[2761] */\n    { 1381, 0x0000000000000000ULL, 0x3C89911C7DA656CDULL }, /* XSUM_XXH64_testdata[2762] */\n    { 1381, 0x000000009E3779B1ULL, 0xCE71438C1CC0C506ULL }, /* XSUM_XXH64_testdata[2763] */\n    { 1382, 0x0000000000000000ULL, 0x2C3784F266003B55ULL }, /* XSUM_XXH64_testdata[2764] */\n    { 1382, 0x000000009E3779B1ULL, 0x49AAE7ECA652DF1DULL }, /* XSUM_XXH64_testdata[2765] */\n    { 1383, 0x0000000000000000ULL, 0x4F25B23A35CA6D18ULL }, /* XSUM_XXH64_testdata[2766] */\n    { 1383, 0x000000009E3779B1ULL, 0xA5CAAD495EC98DBEULL }, /* XSUM_XXH64_testdata[2767] */\n    { 1384, 0x0000000000000000ULL, 0x55FD1C3883B8E6E7ULL }, /* XSUM_XXH64_testdata[2768] */\n    { 1384, 0x000000009E3779B1ULL, 0x3F9B9CE0F835FF7AULL }, /* XSUM_XXH64_testdata[2769] */\n    { 1385, 0x0000000000000000ULL, 0x8CA9E11FCAFEE78EULL }, /* XSUM_XXH64_testdata[2770] */\n    { 1385, 0x000000009E3779B1ULL, 0x1773739BA321ECF7ULL }, /* XSUM_XXH64_testdata[2771] */\n    { 1386, 0x0000000000000000ULL, 0x4A3412EB728E91AEULL }, /* XSUM_XXH64_testdata[2772] */\n    { 1386, 0x000000009E3779B1ULL, 0x64440665090CEF4CULL }, /* XSUM_XXH64_testdata[2773] */\n    { 1387, 0x0000000000000000ULL, 0xFCB0771B2EB57A0AULL }, /* XSUM_XXH64_testdata[2774] */\n    { 1387, 0x000000009E3779B1ULL, 0x426FCFEBF3D6E5E8ULL }, /* XSUM_XXH64_testdata[2775] */\n    { 1388, 0x0000000000000000ULL, 0x2F30B02AA699CBE8ULL }, /* XSUM_XXH64_testdata[2776] */\n    { 1388, 0x000000009E3779B1ULL, 0x64A446AB9B571DD2ULL }, /* XSUM_XXH64_testdata[2777] */\n    { 1389, 0x0000000000000000ULL, 0x9DA2036562427656ULL }, /* XSUM_XXH64_testdata[2778] */\n    { 1389, 0x000000009E3779B1ULL, 0xF1AEE90EAE91F957ULL }, /* XSUM_XXH64_testdata[2779] */\n    { 1390, 0x0000000000000000ULL, 0xB2B8977223C5D2C1ULL }, /* XSUM_XXH64_testdata[2780] */\n    { 1390, 0x000000009E3779B1ULL, 0x9462EFF8DE381453ULL }, /* XSUM_XXH64_testdata[2781] */\n    { 1391, 0x0000000000000000ULL, 0x4C42F170AAD91664ULL }, /* XSUM_XXH64_testdata[2782] */\n    { 1391, 0x000000009E3779B1ULL, 0x50AE4C1857E9ADD3ULL }, /* XSUM_XXH64_testdata[2783] */\n    { 1392, 0x0000000000000000ULL, 0x69303B567524C0A3ULL }, /* XSUM_XXH64_testdata[2784] */\n    { 1392, 0x000000009E3779B1ULL, 0x92374DE46EACAFE2ULL }, /* XSUM_XXH64_testdata[2785] */\n    { 1393, 0x0000000000000000ULL, 0x7FB292558526C18EULL }, /* XSUM_XXH64_testdata[2786] */\n    { 1393, 0x000000009E3779B1ULL, 0x162A2B64E1C9C595ULL }, /* XSUM_XXH64_testdata[2787] */\n    { 1394, 0x0000000000000000ULL, 0xAF95D1BFD104F5AAULL }, /* XSUM_XXH64_testdata[2788] */\n    { 1394, 0x000000009E3779B1ULL, 0x8F14240BD0721EC1ULL }, /* XSUM_XXH64_testdata[2789] */\n    { 1395, 0x0000000000000000ULL, 0xDDF9460952022AC9ULL }, /* XSUM_XXH64_testdata[2790] */\n    { 1395, 0x000000009E3779B1ULL, 0x9BD0060C13A38E86ULL }, /* XSUM_XXH64_testdata[2791] */\n    { 1396, 0x0000000000000000ULL, 0xED4C2D524DC349FEULL }, /* XSUM_XXH64_testdata[2792] */\n    { 1396, 0x000000009E3779B1ULL, 0x1941F5B34399C0CDULL }, /* XSUM_XXH64_testdata[2793] */\n    { 1397, 0x0000000000000000ULL, 0xFA075133A00FB771ULL }, /* XSUM_XXH64_testdata[2794] */\n    { 1397, 0x000000009E3779B1ULL, 0x140CCF6A98392415ULL }, /* XSUM_XXH64_testdata[2795] */\n    { 1398, 0x0000000000000000ULL, 0xD3EFE91A84274D6CULL }, /* XSUM_XXH64_testdata[2796] */\n    { 1398, 0x000000009E3779B1ULL, 0x85C4C7E082426AE9ULL }, /* XSUM_XXH64_testdata[2797] */\n    { 1399, 0x0000000000000000ULL, 0x35F2EF47A529872BULL }, /* XSUM_XXH64_testdata[2798] */\n    { 1399, 0x000000009E3779B1ULL, 0xA41F8535D0C66086ULL }, /* XSUM_XXH64_testdata[2799] */\n    { 1400, 0x0000000000000000ULL, 0x2764EB1CFCCB0F47ULL }, /* XSUM_XXH64_testdata[2800] */\n    { 1400, 0x000000009E3779B1ULL, 0x0729A7AEF3131B33ULL }, /* XSUM_XXH64_testdata[2801] */\n    { 1401, 0x0000000000000000ULL, 0x434C8FAC341BAB69ULL }, /* XSUM_XXH64_testdata[2802] */\n    { 1401, 0x000000009E3779B1ULL, 0xDBA0C947AACE6DE8ULL }, /* XSUM_XXH64_testdata[2803] */\n    { 1402, 0x0000000000000000ULL, 0x8515BF3CB931F6ADULL }, /* XSUM_XXH64_testdata[2804] */\n    { 1402, 0x000000009E3779B1ULL, 0x70BE88885AA321D6ULL }, /* XSUM_XXH64_testdata[2805] */\n    { 1403, 0x0000000000000000ULL, 0x31F9D7532FC60CFCULL }, /* XSUM_XXH64_testdata[2806] */\n    { 1403, 0x000000009E3779B1ULL, 0xB316CD5AC2EB3017ULL }, /* XSUM_XXH64_testdata[2807] */\n    { 1404, 0x0000000000000000ULL, 0x9D5FF3DA416DCDA2ULL }, /* XSUM_XXH64_testdata[2808] */\n    { 1404, 0x000000009E3779B1ULL, 0x1A55EC8281BF14D8ULL }, /* XSUM_XXH64_testdata[2809] */\n    { 1405, 0x0000000000000000ULL, 0x52AFE94D8A457BDAULL }, /* XSUM_XXH64_testdata[2810] */\n    { 1405, 0x000000009E3779B1ULL, 0x9A5FE08630205E30ULL }, /* XSUM_XXH64_testdata[2811] */\n    { 1406, 0x0000000000000000ULL, 0x89FA771920AB788DULL }, /* XSUM_XXH64_testdata[2812] */\n    { 1406, 0x000000009E3779B1ULL, 0xABCF86246F306DC7ULL }, /* XSUM_XXH64_testdata[2813] */\n    { 1407, 0x0000000000000000ULL, 0xBD3CED06760E9D9DULL }, /* XSUM_XXH64_testdata[2814] */\n    { 1407, 0x000000009E3779B1ULL, 0xBCB2C1C8334FD29DULL }, /* XSUM_XXH64_testdata[2815] */\n    { 1408, 0x0000000000000000ULL, 0xB8ED29057DB3F656ULL }, /* XSUM_XXH64_testdata[2816] */\n    { 1408, 0x000000009E3779B1ULL, 0x96B558FE2F7EC951ULL }, /* XSUM_XXH64_testdata[2817] */\n    { 1409, 0x0000000000000000ULL, 0x387FB5D4FE9557F1ULL }, /* XSUM_XXH64_testdata[2818] */\n    { 1409, 0x000000009E3779B1ULL, 0xBBC531AECA8C2299ULL }, /* XSUM_XXH64_testdata[2819] */\n    { 1410, 0x0000000000000000ULL, 0x6B67D1773FBAC3A4ULL }, /* XSUM_XXH64_testdata[2820] */\n    { 1410, 0x000000009E3779B1ULL, 0xAAA8764F5D162926ULL }, /* XSUM_XXH64_testdata[2821] */\n    { 1411, 0x0000000000000000ULL, 0xAA9D378A0E424E33ULL }, /* XSUM_XXH64_testdata[2822] */\n    { 1411, 0x000000009E3779B1ULL, 0xB5DE4BFAEDA569BBULL }, /* XSUM_XXH64_testdata[2823] */\n    { 1412, 0x0000000000000000ULL, 0xD8ED1C02753A0C2AULL }, /* XSUM_XXH64_testdata[2824] */\n    { 1412, 0x000000009E3779B1ULL, 0xBCF9F94C5EADD3C4ULL }, /* XSUM_XXH64_testdata[2825] */\n    { 1413, 0x0000000000000000ULL, 0x930DCAE693006F34ULL }, /* XSUM_XXH64_testdata[2826] */\n    { 1413, 0x000000009E3779B1ULL, 0x10885D81C03734B8ULL }, /* XSUM_XXH64_testdata[2827] */\n    { 1414, 0x0000000000000000ULL, 0x7671A5E7871645B3ULL }, /* XSUM_XXH64_testdata[2828] */\n    { 1414, 0x000000009E3779B1ULL, 0x38ACBF3BA2708BADULL }, /* XSUM_XXH64_testdata[2829] */\n    { 1415, 0x0000000000000000ULL, 0x62C922A90C9D4771ULL }, /* XSUM_XXH64_testdata[2830] */\n    { 1415, 0x000000009E3779B1ULL, 0x3314D5D248121BE8ULL }, /* XSUM_XXH64_testdata[2831] */\n    { 1416, 0x0000000000000000ULL, 0x7FCFC2B8D7A05E7EULL }, /* XSUM_XXH64_testdata[2832] */\n    { 1416, 0x000000009E3779B1ULL, 0xD3E65C430D8FED2BULL }, /* XSUM_XXH64_testdata[2833] */\n    { 1417, 0x0000000000000000ULL, 0x05384040B0FFAE41ULL }, /* XSUM_XXH64_testdata[2834] */\n    { 1417, 0x000000009E3779B1ULL, 0xCAB435B84527AA8DULL }, /* XSUM_XXH64_testdata[2835] */\n    { 1418, 0x0000000000000000ULL, 0x14C7773C9211B772ULL }, /* XSUM_XXH64_testdata[2836] */\n    { 1418, 0x000000009E3779B1ULL, 0x75D192F74DF1E368ULL }, /* XSUM_XXH64_testdata[2837] */\n    { 1419, 0x0000000000000000ULL, 0x7BBDAEB0D052C59FULL }, /* XSUM_XXH64_testdata[2838] */\n    { 1419, 0x000000009E3779B1ULL, 0x2F77DF0021087209ULL }, /* XSUM_XXH64_testdata[2839] */\n    { 1420, 0x0000000000000000ULL, 0x5AB24699346A8A33ULL }, /* XSUM_XXH64_testdata[2840] */\n    { 1420, 0x000000009E3779B1ULL, 0x8C007172379EB0E3ULL }, /* XSUM_XXH64_testdata[2841] */\n    { 1421, 0x0000000000000000ULL, 0x88F6070327945BE5ULL }, /* XSUM_XXH64_testdata[2842] */\n    { 1421, 0x000000009E3779B1ULL, 0xCA801BBAF31272C9ULL }, /* XSUM_XXH64_testdata[2843] */\n    { 1422, 0x0000000000000000ULL, 0x51A1B2F87302C6D8ULL }, /* XSUM_XXH64_testdata[2844] */\n    { 1422, 0x000000009E3779B1ULL, 0x5C16264DA6393D7DULL }, /* XSUM_XXH64_testdata[2845] */\n    { 1423, 0x0000000000000000ULL, 0x5A0AF8D5F6D877BAULL }, /* XSUM_XXH64_testdata[2846] */\n    { 1423, 0x000000009E3779B1ULL, 0xEF006D3E22294420ULL }, /* XSUM_XXH64_testdata[2847] */\n    { 1424, 0x0000000000000000ULL, 0x1035CD2451591B7EULL }, /* XSUM_XXH64_testdata[2848] */\n    { 1424, 0x000000009E3779B1ULL, 0xEA6BB73F47B12F70ULL }, /* XSUM_XXH64_testdata[2849] */\n    { 1425, 0x0000000000000000ULL, 0x31B4370AECA70AF0ULL }, /* XSUM_XXH64_testdata[2850] */\n    { 1425, 0x000000009E3779B1ULL, 0xD85F64E7BD1AEFB1ULL }, /* XSUM_XXH64_testdata[2851] */\n    { 1426, 0x0000000000000000ULL, 0x8A5128B550E364E4ULL }, /* XSUM_XXH64_testdata[2852] */\n    { 1426, 0x000000009E3779B1ULL, 0x8E9FC61253F0B806ULL }, /* XSUM_XXH64_testdata[2853] */\n    { 1427, 0x0000000000000000ULL, 0x49D52BC80042A3C9ULL }, /* XSUM_XXH64_testdata[2854] */\n    { 1427, 0x000000009E3779B1ULL, 0xBEF93A8BF95E29B2ULL }, /* XSUM_XXH64_testdata[2855] */\n    { 1428, 0x0000000000000000ULL, 0x9AFAFC896AF5135AULL }, /* XSUM_XXH64_testdata[2856] */\n    { 1428, 0x000000009E3779B1ULL, 0xEF0E6C08921028E0ULL }, /* XSUM_XXH64_testdata[2857] */\n    { 1429, 0x0000000000000000ULL, 0xD716A4A02703FCD6ULL }, /* XSUM_XXH64_testdata[2858] */\n    { 1429, 0x000000009E3779B1ULL, 0x2DEA819EEF6B4595ULL }, /* XSUM_XXH64_testdata[2859] */\n    { 1430, 0x0000000000000000ULL, 0xEA46BF1375B51E01ULL }, /* XSUM_XXH64_testdata[2860] */\n    { 1430, 0x000000009E3779B1ULL, 0x10E8697EA20375CDULL }, /* XSUM_XXH64_testdata[2861] */\n    { 1431, 0x0000000000000000ULL, 0xD1677286E49D7AE9ULL }, /* XSUM_XXH64_testdata[2862] */\n    { 1431, 0x000000009E3779B1ULL, 0x4684D4C0C84A53A7ULL }, /* XSUM_XXH64_testdata[2863] */\n    { 1432, 0x0000000000000000ULL, 0xB8443E3175950346ULL }, /* XSUM_XXH64_testdata[2864] */\n    { 1432, 0x000000009E3779B1ULL, 0x393277B05E885C65ULL }, /* XSUM_XXH64_testdata[2865] */\n    { 1433, 0x0000000000000000ULL, 0x3C09ACEBA05DDEF4ULL }, /* XSUM_XXH64_testdata[2866] */\n    { 1433, 0x000000009E3779B1ULL, 0x4A00F39B99CE0EA0ULL }, /* XSUM_XXH64_testdata[2867] */\n    { 1434, 0x0000000000000000ULL, 0x269F19470CAE3C69ULL }, /* XSUM_XXH64_testdata[2868] */\n    { 1434, 0x000000009E3779B1ULL, 0x6C690DC42C3A9A43ULL }, /* XSUM_XXH64_testdata[2869] */\n    { 1435, 0x0000000000000000ULL, 0x347414263504B8C2ULL }, /* XSUM_XXH64_testdata[2870] */\n    { 1435, 0x000000009E3779B1ULL, 0x62412B4D4DC300C8ULL }, /* XSUM_XXH64_testdata[2871] */\n    { 1436, 0x0000000000000000ULL, 0x540681AD51327B7EULL }, /* XSUM_XXH64_testdata[2872] */\n    { 1436, 0x000000009E3779B1ULL, 0x7632FBF9FD453F12ULL }, /* XSUM_XXH64_testdata[2873] */\n    { 1437, 0x0000000000000000ULL, 0xA25FC78176580D43ULL }, /* XSUM_XXH64_testdata[2874] */\n    { 1437, 0x000000009E3779B1ULL, 0xE088E98CDF324070ULL }, /* XSUM_XXH64_testdata[2875] */\n    { 1438, 0x0000000000000000ULL, 0x2DDB228C75DB7167ULL }, /* XSUM_XXH64_testdata[2876] */\n    { 1438, 0x000000009E3779B1ULL, 0xA867E2DCDC56505BULL }, /* XSUM_XXH64_testdata[2877] */\n    { 1439, 0x0000000000000000ULL, 0x34A7198C97C57F64ULL }, /* XSUM_XXH64_testdata[2878] */\n    { 1439, 0x000000009E3779B1ULL, 0x6ECEA6835BC51709ULL }, /* XSUM_XXH64_testdata[2879] */\n    { 1440, 0x0000000000000000ULL, 0x8566C095BF096EA9ULL }, /* XSUM_XXH64_testdata[2880] */\n    { 1440, 0x000000009E3779B1ULL, 0xE716D1071B5C5BA9ULL }, /* XSUM_XXH64_testdata[2881] */\n    { 1441, 0x0000000000000000ULL, 0x3140D9FE67215224ULL }, /* XSUM_XXH64_testdata[2882] */\n    { 1441, 0x000000009E3779B1ULL, 0x747696972CAD69FAULL }, /* XSUM_XXH64_testdata[2883] */\n    { 1442, 0x0000000000000000ULL, 0xBAFFEBF129E5962FULL }, /* XSUM_XXH64_testdata[2884] */\n    { 1442, 0x000000009E3779B1ULL, 0xF3CD672ADDC8AED5ULL }, /* XSUM_XXH64_testdata[2885] */\n    { 1443, 0x0000000000000000ULL, 0xAE9E2011F52A8A64ULL }, /* XSUM_XXH64_testdata[2886] */\n    { 1443, 0x000000009E3779B1ULL, 0xC7A6748860A43455ULL }, /* XSUM_XXH64_testdata[2887] */\n    { 1444, 0x0000000000000000ULL, 0x92FE8E709EE3B9EAULL }, /* XSUM_XXH64_testdata[2888] */\n    { 1444, 0x000000009E3779B1ULL, 0xFCE8A337561D1A7BULL }, /* XSUM_XXH64_testdata[2889] */\n    { 1445, 0x0000000000000000ULL, 0x261231C0CF704346ULL }, /* XSUM_XXH64_testdata[2890] */\n    { 1445, 0x000000009E3779B1ULL, 0x68215EE9EB5B80DAULL }, /* XSUM_XXH64_testdata[2891] */\n    { 1446, 0x0000000000000000ULL, 0x7719D7F38F357225ULL }, /* XSUM_XXH64_testdata[2892] */\n    { 1446, 0x000000009E3779B1ULL, 0x45D4AB2DF7BEC909ULL }, /* XSUM_XXH64_testdata[2893] */\n    { 1447, 0x0000000000000000ULL, 0x4FD64C4CD3E8675BULL }, /* XSUM_XXH64_testdata[2894] */\n    { 1447, 0x000000009E3779B1ULL, 0x76D0FA7C6F361546ULL }, /* XSUM_XXH64_testdata[2895] */\n    { 1448, 0x0000000000000000ULL, 0x4C299D06102A101EULL }, /* XSUM_XXH64_testdata[2896] */\n    { 1448, 0x000000009E3779B1ULL, 0xE91228A4672BF68EULL }, /* XSUM_XXH64_testdata[2897] */\n    { 1449, 0x0000000000000000ULL, 0x0DE12AFCC005F1E1ULL }, /* XSUM_XXH64_testdata[2898] */\n    { 1449, 0x000000009E3779B1ULL, 0x48A847A19C7DEFA6ULL }, /* XSUM_XXH64_testdata[2899] */\n    { 1450, 0x0000000000000000ULL, 0xED52DD144A739FBCULL }, /* XSUM_XXH64_testdata[2900] */\n    { 1450, 0x000000009E3779B1ULL, 0xFDF107770AF5E161ULL }, /* XSUM_XXH64_testdata[2901] */\n    { 1451, 0x0000000000000000ULL, 0xBADF26C68BC84826ULL }, /* XSUM_XXH64_testdata[2902] */\n    { 1451, 0x000000009E3779B1ULL, 0x9D3308507D63B6F7ULL }, /* XSUM_XXH64_testdata[2903] */\n    { 1452, 0x0000000000000000ULL, 0x7FA6FFA49A4A597FULL }, /* XSUM_XXH64_testdata[2904] */\n    { 1452, 0x000000009E3779B1ULL, 0x7B13FC644B3772EBULL }, /* XSUM_XXH64_testdata[2905] */\n    { 1453, 0x0000000000000000ULL, 0xF39D65107F93CB0FULL }, /* XSUM_XXH64_testdata[2906] */\n    { 1453, 0x000000009E3779B1ULL, 0xA48CAD1CA608E6B7ULL }, /* XSUM_XXH64_testdata[2907] */\n    { 1454, 0x0000000000000000ULL, 0x101EFEAB0DCB65D3ULL }, /* XSUM_XXH64_testdata[2908] */\n    { 1454, 0x000000009E3779B1ULL, 0xC7FA192E41805983ULL }, /* XSUM_XXH64_testdata[2909] */\n    { 1455, 0x0000000000000000ULL, 0x8833E666865F2E5FULL }, /* XSUM_XXH64_testdata[2910] */\n    { 1455, 0x000000009E3779B1ULL, 0x8278069ED1F682CBULL }, /* XSUM_XXH64_testdata[2911] */\n    { 1456, 0x0000000000000000ULL, 0x2F01BD0C433E5550ULL }, /* XSUM_XXH64_testdata[2912] */\n    { 1456, 0x000000009E3779B1ULL, 0xBD143DC1B73859B4ULL }, /* XSUM_XXH64_testdata[2913] */\n    { 1457, 0x0000000000000000ULL, 0x272159E114DAB7EBULL }, /* XSUM_XXH64_testdata[2914] */\n    { 1457, 0x000000009E3779B1ULL, 0x97E408F3690958EDULL }, /* XSUM_XXH64_testdata[2915] */\n    { 1458, 0x0000000000000000ULL, 0x1045EEFF406CBEDEULL }, /* XSUM_XXH64_testdata[2916] */\n    { 1458, 0x000000009E3779B1ULL, 0xFB2CAC5E57A0B6F1ULL }, /* XSUM_XXH64_testdata[2917] */\n    { 1459, 0x0000000000000000ULL, 0x32211FA3D50BA16DULL }, /* XSUM_XXH64_testdata[2918] */\n    { 1459, 0x000000009E3779B1ULL, 0xD1E9E3DDD13972C0ULL }, /* XSUM_XXH64_testdata[2919] */\n    { 1460, 0x0000000000000000ULL, 0x3009626300D1513EULL }, /* XSUM_XXH64_testdata[2920] */\n    { 1460, 0x000000009E3779B1ULL, 0xDB1A55314DFB90A1ULL }, /* XSUM_XXH64_testdata[2921] */\n    { 1461, 0x0000000000000000ULL, 0x456D11EF8FC39F93ULL }, /* XSUM_XXH64_testdata[2922] */\n    { 1461, 0x000000009E3779B1ULL, 0x4B2A5A2199951E7EULL }, /* XSUM_XXH64_testdata[2923] */\n    { 1462, 0x0000000000000000ULL, 0x125C836BF1538374ULL }, /* XSUM_XXH64_testdata[2924] */\n    { 1462, 0x000000009E3779B1ULL, 0x5BD1ED70A5E5E950ULL }, /* XSUM_XXH64_testdata[2925] */\n    { 1463, 0x0000000000000000ULL, 0xD569E05067BE5FA6ULL }, /* XSUM_XXH64_testdata[2926] */\n    { 1463, 0x000000009E3779B1ULL, 0x103170624ACB74ABULL }, /* XSUM_XXH64_testdata[2927] */\n    { 1464, 0x0000000000000000ULL, 0x2B4483710726096CULL }, /* XSUM_XXH64_testdata[2928] */\n    { 1464, 0x000000009E3779B1ULL, 0xA13F3D60CD7133E4ULL }, /* XSUM_XXH64_testdata[2929] */\n    { 1465, 0x0000000000000000ULL, 0xDF0C24A1FA0470F3ULL }, /* XSUM_XXH64_testdata[2930] */\n    { 1465, 0x000000009E3779B1ULL, 0x39A95CB70B9EAE27ULL }, /* XSUM_XXH64_testdata[2931] */\n    { 1466, 0x0000000000000000ULL, 0x8E29827A525351CBULL }, /* XSUM_XXH64_testdata[2932] */\n    { 1466, 0x000000009E3779B1ULL, 0xE1E83603AE96EA0EULL }, /* XSUM_XXH64_testdata[2933] */\n    { 1467, 0x0000000000000000ULL, 0x79F1FA1757DC13FFULL }, /* XSUM_XXH64_testdata[2934] */\n    { 1467, 0x000000009E3779B1ULL, 0x172D6678D6609F86ULL }, /* XSUM_XXH64_testdata[2935] */\n    { 1468, 0x0000000000000000ULL, 0x0FD8ADA93856A4A6ULL }, /* XSUM_XXH64_testdata[2936] */\n    { 1468, 0x000000009E3779B1ULL, 0xE246CD70954E2E67ULL }, /* XSUM_XXH64_testdata[2937] */\n    { 1469, 0x0000000000000000ULL, 0x09ED73602ECE33F0ULL }, /* XSUM_XXH64_testdata[2938] */\n    { 1469, 0x000000009E3779B1ULL, 0x0482AAB6C267ED20ULL }, /* XSUM_XXH64_testdata[2939] */\n    { 1470, 0x0000000000000000ULL, 0x44F7890CFD1AF2BEULL }, /* XSUM_XXH64_testdata[2940] */\n    { 1470, 0x000000009E3779B1ULL, 0xB20C1E6581F2C18DULL }, /* XSUM_XXH64_testdata[2941] */\n    { 1471, 0x0000000000000000ULL, 0x3D3D725CA5A2DA86ULL }, /* XSUM_XXH64_testdata[2942] */\n    { 1471, 0x000000009E3779B1ULL, 0x1562DCAD2E6FD432ULL }, /* XSUM_XXH64_testdata[2943] */\n    { 1472, 0x0000000000000000ULL, 0xEDDF8EAA95CE1B30ULL }, /* XSUM_XXH64_testdata[2944] */\n    { 1472, 0x000000009E3779B1ULL, 0x39B4C49D392F7522ULL }, /* XSUM_XXH64_testdata[2945] */\n    { 1473, 0x0000000000000000ULL, 0xE1CFBD74D188ACC2ULL }, /* XSUM_XXH64_testdata[2946] */\n    { 1473, 0x000000009E3779B1ULL, 0xCBF75E181751BF3BULL }, /* XSUM_XXH64_testdata[2947] */\n    { 1474, 0x0000000000000000ULL, 0xC20EAB96671D3FBAULL }, /* XSUM_XXH64_testdata[2948] */\n    { 1474, 0x000000009E3779B1ULL, 0x9099CABD8C20F483ULL }, /* XSUM_XXH64_testdata[2949] */\n    { 1475, 0x0000000000000000ULL, 0x7FB5C672D39D8864ULL }, /* XSUM_XXH64_testdata[2950] */\n    { 1475, 0x000000009E3779B1ULL, 0x2227B1D484DA4061ULL }, /* XSUM_XXH64_testdata[2951] */\n    { 1476, 0x0000000000000000ULL, 0x7433E07CCD9FAA25ULL }, /* XSUM_XXH64_testdata[2952] */\n    { 1476, 0x000000009E3779B1ULL, 0x980331CE0A840E3FULL }, /* XSUM_XXH64_testdata[2953] */\n    { 1477, 0x0000000000000000ULL, 0x8B91EDB08E1B72A3ULL }, /* XSUM_XXH64_testdata[2954] */\n    { 1477, 0x000000009E3779B1ULL, 0x5D0A2226FAFC9E03ULL }, /* XSUM_XXH64_testdata[2955] */\n    { 1478, 0x0000000000000000ULL, 0xB3B50DB7128872C6ULL }, /* XSUM_XXH64_testdata[2956] */\n    { 1478, 0x000000009E3779B1ULL, 0x061A1F8E4F13FB16ULL }, /* XSUM_XXH64_testdata[2957] */\n    { 1479, 0x0000000000000000ULL, 0x70F03B127FD08568ULL }, /* XSUM_XXH64_testdata[2958] */\n    { 1479, 0x000000009E3779B1ULL, 0x499DD506010B6EA9ULL }, /* XSUM_XXH64_testdata[2959] */\n    { 1480, 0x0000000000000000ULL, 0x4840230663D42556ULL }, /* XSUM_XXH64_testdata[2960] */\n    { 1480, 0x000000009E3779B1ULL, 0x466F19B2D39C2627ULL }, /* XSUM_XXH64_testdata[2961] */\n    { 1481, 0x0000000000000000ULL, 0x60617B08B4FF6838ULL }, /* XSUM_XXH64_testdata[2962] */\n    { 1481, 0x000000009E3779B1ULL, 0x7922EF1E30FFABABULL }, /* XSUM_XXH64_testdata[2963] */\n    { 1482, 0x0000000000000000ULL, 0xE9D77667FA81C7E5ULL }, /* XSUM_XXH64_testdata[2964] */\n    { 1482, 0x000000009E3779B1ULL, 0xFAF7EE8CA5BEAF83ULL }, /* XSUM_XXH64_testdata[2965] */\n    { 1483, 0x0000000000000000ULL, 0xF33B1A5501ADF046ULL }, /* XSUM_XXH64_testdata[2966] */\n    { 1483, 0x000000009E3779B1ULL, 0xB3C0C8D4B5DAF9CAULL }, /* XSUM_XXH64_testdata[2967] */\n    { 1484, 0x0000000000000000ULL, 0x5418DB822BB143E5ULL }, /* XSUM_XXH64_testdata[2968] */\n    { 1484, 0x000000009E3779B1ULL, 0x1091DA12D1F48071ULL }, /* XSUM_XXH64_testdata[2969] */\n    { 1485, 0x0000000000000000ULL, 0x3A11E24EC8CB7555ULL }, /* XSUM_XXH64_testdata[2970] */\n    { 1485, 0x000000009E3779B1ULL, 0x39D3027FDE2D55A6ULL }, /* XSUM_XXH64_testdata[2971] */\n    { 1486, 0x0000000000000000ULL, 0x6E51DA2B6722709EULL }, /* XSUM_XXH64_testdata[2972] */\n    { 1486, 0x000000009E3779B1ULL, 0x863BED60E6ED9AD0ULL }, /* XSUM_XXH64_testdata[2973] */\n    { 1487, 0x0000000000000000ULL, 0x4D9DFD5C2924D020ULL }, /* XSUM_XXH64_testdata[2974] */\n    { 1487, 0x000000009E3779B1ULL, 0x29BB8A2629150931ULL }, /* XSUM_XXH64_testdata[2975] */\n    { 1488, 0x0000000000000000ULL, 0xAA5704F96972733BULL }, /* XSUM_XXH64_testdata[2976] */\n    { 1488, 0x000000009E3779B1ULL, 0x337B4425C4848725ULL }, /* XSUM_XXH64_testdata[2977] */\n    { 1489, 0x0000000000000000ULL, 0x8AF06779F20C39DEULL }, /* XSUM_XXH64_testdata[2978] */\n    { 1489, 0x000000009E3779B1ULL, 0xDE53377A6AD53842ULL }, /* XSUM_XXH64_testdata[2979] */\n    { 1490, 0x0000000000000000ULL, 0xF1288F7B9DF99262ULL }, /* XSUM_XXH64_testdata[2980] */\n    { 1490, 0x000000009E3779B1ULL, 0x3C915FE67DD9348BULL }, /* XSUM_XXH64_testdata[2981] */\n    { 1491, 0x0000000000000000ULL, 0x5BDCF7CD9ECF3DCEULL }, /* XSUM_XXH64_testdata[2982] */\n    { 1491, 0x000000009E3779B1ULL, 0x7F29B947A05EA0DAULL }, /* XSUM_XXH64_testdata[2983] */\n    { 1492, 0x0000000000000000ULL, 0xCB901C6DA9D69A57ULL }, /* XSUM_XXH64_testdata[2984] */\n    { 1492, 0x000000009E3779B1ULL, 0x8B83F2BC74BEAFA6ULL }, /* XSUM_XXH64_testdata[2985] */\n    { 1493, 0x0000000000000000ULL, 0x23FB34D375386B32ULL }, /* XSUM_XXH64_testdata[2986] */\n    { 1493, 0x000000009E3779B1ULL, 0xFCFF53156B0A9FAEULL }, /* XSUM_XXH64_testdata[2987] */\n    { 1494, 0x0000000000000000ULL, 0x47583913FCEB818DULL }, /* XSUM_XXH64_testdata[2988] */\n    { 1494, 0x000000009E3779B1ULL, 0xA59F8BB05241C034ULL }, /* XSUM_XXH64_testdata[2989] */\n    { 1495, 0x0000000000000000ULL, 0x3E827FBDE37ACFCEULL }, /* XSUM_XXH64_testdata[2990] */\n    { 1495, 0x000000009E3779B1ULL, 0x591486946B610E70ULL }, /* XSUM_XXH64_testdata[2991] */\n    { 1496, 0x0000000000000000ULL, 0x9F48EF32A6B79352ULL }, /* XSUM_XXH64_testdata[2992] */\n    { 1496, 0x000000009E3779B1ULL, 0xEAC2A17B2E1FA603ULL }, /* XSUM_XXH64_testdata[2993] */\n    { 1497, 0x0000000000000000ULL, 0x12C974795020ACD6ULL }, /* XSUM_XXH64_testdata[2994] */\n    { 1497, 0x000000009E3779B1ULL, 0xB6B3EE57D83EB29BULL }, /* XSUM_XXH64_testdata[2995] */\n    { 1498, 0x0000000000000000ULL, 0x022E0F7E3F965FC9ULL }, /* XSUM_XXH64_testdata[2996] */\n    { 1498, 0x000000009E3779B1ULL, 0x8CF81EA9ACE4AB66ULL }, /* XSUM_XXH64_testdata[2997] */\n    { 1499, 0x0000000000000000ULL, 0xE4626BF4E5922AF6ULL }, /* XSUM_XXH64_testdata[2998] */\n    { 1499, 0x000000009E3779B1ULL, 0x28928FAAA1160219ULL }, /* XSUM_XXH64_testdata[2999] */\n    { 1500, 0x0000000000000000ULL, 0x49560C97A8F0B46DULL }, /* XSUM_XXH64_testdata[3000] */\n    { 1500, 0x000000009E3779B1ULL, 0xBE35D3678E4AEDF0ULL }, /* XSUM_XXH64_testdata[3001] */\n    { 1501, 0x0000000000000000ULL, 0xF8F70D98A391B902ULL }, /* XSUM_XXH64_testdata[3002] */\n    { 1501, 0x000000009E3779B1ULL, 0x35D59E740161C82EULL }, /* XSUM_XXH64_testdata[3003] */\n    { 1502, 0x0000000000000000ULL, 0xDCC846D54234A2A9ULL }, /* XSUM_XXH64_testdata[3004] */\n    { 1502, 0x000000009E3779B1ULL, 0x57001FF0F0ED9F15ULL }, /* XSUM_XXH64_testdata[3005] */\n    { 1503, 0x0000000000000000ULL, 0x1945AF0AB4941D24ULL }, /* XSUM_XXH64_testdata[3006] */\n    { 1503, 0x000000009E3779B1ULL, 0xC297BE0E382A662AULL }, /* XSUM_XXH64_testdata[3007] */\n    { 1504, 0x0000000000000000ULL, 0x140DAF514AAD15B2ULL }, /* XSUM_XXH64_testdata[3008] */\n    { 1504, 0x000000009E3779B1ULL, 0x9EF4891CA7E01BD0ULL }, /* XSUM_XXH64_testdata[3009] */\n    { 1505, 0x0000000000000000ULL, 0x9561D082D9630409ULL }, /* XSUM_XXH64_testdata[3010] */\n    { 1505, 0x000000009E3779B1ULL, 0x5D00D4D29A7BF531ULL }, /* XSUM_XXH64_testdata[3011] */\n    { 1506, 0x0000000000000000ULL, 0x5190DC70ACD67724ULL }, /* XSUM_XXH64_testdata[3012] */\n    { 1506, 0x000000009E3779B1ULL, 0xA96FDC925CE8F8FCULL }, /* XSUM_XXH64_testdata[3013] */\n    { 1507, 0x0000000000000000ULL, 0x8E2BF8EACF31556AULL }, /* XSUM_XXH64_testdata[3014] */\n    { 1507, 0x000000009E3779B1ULL, 0x03C9362F5DAB21E9ULL }, /* XSUM_XXH64_testdata[3015] */\n    { 1508, 0x0000000000000000ULL, 0x217DB2B9AFAAD59BULL }, /* XSUM_XXH64_testdata[3016] */\n    { 1508, 0x000000009E3779B1ULL, 0xCF853125C93523BFULL }, /* XSUM_XXH64_testdata[3017] */\n    { 1509, 0x0000000000000000ULL, 0xF77FE60B27C52651ULL }, /* XSUM_XXH64_testdata[3018] */\n    { 1509, 0x000000009E3779B1ULL, 0xC614821DCC4F07CCULL }, /* XSUM_XXH64_testdata[3019] */\n    { 1510, 0x0000000000000000ULL, 0xEFE0D0198C565516ULL }, /* XSUM_XXH64_testdata[3020] */\n    { 1510, 0x000000009E3779B1ULL, 0xA0887694F684205FULL }, /* XSUM_XXH64_testdata[3021] */\n    { 1511, 0x0000000000000000ULL, 0x9E614D0CA40E1302ULL }, /* XSUM_XXH64_testdata[3022] */\n    { 1511, 0x000000009E3779B1ULL, 0x52ED8B09FC3CF69CULL }, /* XSUM_XXH64_testdata[3023] */\n    { 1512, 0x0000000000000000ULL, 0x19A560C966281136ULL }, /* XSUM_XXH64_testdata[3024] */\n    { 1512, 0x000000009E3779B1ULL, 0xDE06A3D32E757E63ULL }, /* XSUM_XXH64_testdata[3025] */\n    { 1513, 0x0000000000000000ULL, 0x5C7D84A24F21BD7AULL }, /* XSUM_XXH64_testdata[3026] */\n    { 1513, 0x000000009E3779B1ULL, 0x68C92B8E68FE37C1ULL }, /* XSUM_XXH64_testdata[3027] */\n    { 1514, 0x0000000000000000ULL, 0x549A43A8DF101AB2ULL }, /* XSUM_XXH64_testdata[3028] */\n    { 1514, 0x000000009E3779B1ULL, 0x84570A879E8BDE41ULL }, /* XSUM_XXH64_testdata[3029] */\n    { 1515, 0x0000000000000000ULL, 0x261A16A715DD3A2CULL }, /* XSUM_XXH64_testdata[3030] */\n    { 1515, 0x000000009E3779B1ULL, 0xDB81470AAB634064ULL }, /* XSUM_XXH64_testdata[3031] */\n    { 1516, 0x0000000000000000ULL, 0x99205CC8604F4359ULL }, /* XSUM_XXH64_testdata[3032] */\n    { 1516, 0x000000009E3779B1ULL, 0xEFFFF995FE389291ULL }, /* XSUM_XXH64_testdata[3033] */\n    { 1517, 0x0000000000000000ULL, 0xB80FD45BD6EFAA4FULL }, /* XSUM_XXH64_testdata[3034] */\n    { 1517, 0x000000009E3779B1ULL, 0x487E7F148DCDAA5CULL }, /* XSUM_XXH64_testdata[3035] */\n    { 1518, 0x0000000000000000ULL, 0x7D89BBEE9BBEF1C2ULL }, /* XSUM_XXH64_testdata[3036] */\n    { 1518, 0x000000009E3779B1ULL, 0xD829A4AFE2E74E6AULL }, /* XSUM_XXH64_testdata[3037] */\n    { 1519, 0x0000000000000000ULL, 0x25D1A26DBB0DC766ULL }, /* XSUM_XXH64_testdata[3038] */\n    { 1519, 0x000000009E3779B1ULL, 0x51564685DEC4644DULL }, /* XSUM_XXH64_testdata[3039] */\n    { 1520, 0x0000000000000000ULL, 0x0410748EEB5D5C22ULL }, /* XSUM_XXH64_testdata[3040] */\n    { 1520, 0x000000009E3779B1ULL, 0x75CE75D294B3D04EULL }, /* XSUM_XXH64_testdata[3041] */\n    { 1521, 0x0000000000000000ULL, 0xA8DFCD137707184EULL }, /* XSUM_XXH64_testdata[3042] */\n    { 1521, 0x000000009E3779B1ULL, 0x6C0F885BFE39671EULL }, /* XSUM_XXH64_testdata[3043] */\n    { 1522, 0x0000000000000000ULL, 0xDDC03FE01448EF49ULL }, /* XSUM_XXH64_testdata[3044] */\n    { 1522, 0x000000009E3779B1ULL, 0xF3DE000FD7CCA6C8ULL }, /* XSUM_XXH64_testdata[3045] */\n    { 1523, 0x0000000000000000ULL, 0xB4DF1A01C919AC8EULL }, /* XSUM_XXH64_testdata[3046] */\n    { 1523, 0x000000009E3779B1ULL, 0x3AA57E8D2536BE21ULL }, /* XSUM_XXH64_testdata[3047] */\n    { 1524, 0x0000000000000000ULL, 0xCD95EC15CB6D6E8DULL }, /* XSUM_XXH64_testdata[3048] */\n    { 1524, 0x000000009E3779B1ULL, 0xE017E1103B241C15ULL }, /* XSUM_XXH64_testdata[3049] */\n    { 1525, 0x0000000000000000ULL, 0xD2ECF6A326B27053ULL }, /* XSUM_XXH64_testdata[3050] */\n    { 1525, 0x000000009E3779B1ULL, 0xE92ED4414E528E5AULL }, /* XSUM_XXH64_testdata[3051] */\n    { 1526, 0x0000000000000000ULL, 0xD3FDC6B4B5A4EF92ULL }, /* XSUM_XXH64_testdata[3052] */\n    { 1526, 0x000000009E3779B1ULL, 0x67E70AF6B2EFDE98ULL }, /* XSUM_XXH64_testdata[3053] */\n    { 1527, 0x0000000000000000ULL, 0xE33B29BC261879F4ULL }, /* XSUM_XXH64_testdata[3054] */\n    { 1527, 0x000000009E3779B1ULL, 0xC83AF2EE8BD9C666ULL }, /* XSUM_XXH64_testdata[3055] */\n    { 1528, 0x0000000000000000ULL, 0xB1F1AB2114E0467EULL }, /* XSUM_XXH64_testdata[3056] */\n    { 1528, 0x000000009E3779B1ULL, 0x5A0E27DD8B0DEB6BULL }, /* XSUM_XXH64_testdata[3057] */\n    { 1529, 0x0000000000000000ULL, 0xE5B01782BD8D2103ULL }, /* XSUM_XXH64_testdata[3058] */\n    { 1529, 0x000000009E3779B1ULL, 0x42ECC0C12EC1C396ULL }, /* XSUM_XXH64_testdata[3059] */\n    { 1530, 0x0000000000000000ULL, 0x646670CF7FB6B60AULL }, /* XSUM_XXH64_testdata[3060] */\n    { 1530, 0x000000009E3779B1ULL, 0x211B9A0BD0481ECAULL }, /* XSUM_XXH64_testdata[3061] */\n    { 1531, 0x0000000000000000ULL, 0xD3930BB3B9FAC74AULL }, /* XSUM_XXH64_testdata[3062] */\n    { 1531, 0x000000009E3779B1ULL, 0x08267ED1D7853CB2ULL }, /* XSUM_XXH64_testdata[3063] */\n    { 1532, 0x0000000000000000ULL, 0x2069C958E2831898ULL }, /* XSUM_XXH64_testdata[3064] */\n    { 1532, 0x000000009E3779B1ULL, 0xB5B8F1289B0974D0ULL }, /* XSUM_XXH64_testdata[3065] */\n    { 1533, 0x0000000000000000ULL, 0xF6B03D02363C8B8DULL }, /* XSUM_XXH64_testdata[3066] */\n    { 1533, 0x000000009E3779B1ULL, 0x95B05185B655D15BULL }, /* XSUM_XXH64_testdata[3067] */\n    { 1534, 0x0000000000000000ULL, 0x54BA2E9539684FEBULL }, /* XSUM_XXH64_testdata[3068] */\n    { 1534, 0x000000009E3779B1ULL, 0xFE4A363F9830E8F7ULL }, /* XSUM_XXH64_testdata[3069] */\n    { 1535, 0x0000000000000000ULL, 0xB0A26C84A6D11794ULL }, /* XSUM_XXH64_testdata[3070] */\n    { 1535, 0x000000009E3779B1ULL, 0xCEC2818C895599C7ULL }, /* XSUM_XXH64_testdata[3071] */\n    { 1536, 0x0000000000000000ULL, 0x93BF99716366979FULL }, /* XSUM_XXH64_testdata[3072] */\n    { 1536, 0x000000009E3779B1ULL, 0x7E445D56CB1C8732ULL }, /* XSUM_XXH64_testdata[3073] */\n    { 1537, 0x0000000000000000ULL, 0x9FC5D763D81BD858ULL }, /* XSUM_XXH64_testdata[3074] */\n    { 1537, 0x000000009E3779B1ULL, 0x52068B9CCF4C0277ULL }, /* XSUM_XXH64_testdata[3075] */\n    { 1538, 0x0000000000000000ULL, 0x286A6D3BCE9EB9E5ULL }, /* XSUM_XXH64_testdata[3076] */\n    { 1538, 0x000000009E3779B1ULL, 0xC04C9A4F363F6E29ULL }, /* XSUM_XXH64_testdata[3077] */\n    { 1539, 0x0000000000000000ULL, 0x9610AFA59919D4BAULL }, /* XSUM_XXH64_testdata[3078] */\n    { 1539, 0x000000009E3779B1ULL, 0x4F4929DF19379AAFULL }, /* XSUM_XXH64_testdata[3079] */\n    { 1540, 0x0000000000000000ULL, 0xEEEC97C382795547ULL }, /* XSUM_XXH64_testdata[3080] */\n    { 1540, 0x000000009E3779B1ULL, 0x2EAA8EC92FF8606DULL }, /* XSUM_XXH64_testdata[3081] */\n    { 1541, 0x0000000000000000ULL, 0xC377BAA07CE1DD52ULL }, /* XSUM_XXH64_testdata[3082] */\n    { 1541, 0x000000009E3779B1ULL, 0xEB796C83C9161003ULL }, /* XSUM_XXH64_testdata[3083] */\n    { 1542, 0x0000000000000000ULL, 0x6189163679466377ULL }, /* XSUM_XXH64_testdata[3084] */\n    { 1542, 0x000000009E3779B1ULL, 0xC795510F3036FF96ULL }, /* XSUM_XXH64_testdata[3085] */\n    { 1543, 0x0000000000000000ULL, 0x8C0B48F97001490AULL }, /* XSUM_XXH64_testdata[3086] */\n    { 1543, 0x000000009E3779B1ULL, 0x6C55158C1900B04BULL }, /* XSUM_XXH64_testdata[3087] */\n    { 1544, 0x0000000000000000ULL, 0x10848522BA467A66ULL }, /* XSUM_XXH64_testdata[3088] */\n    { 1544, 0x000000009E3779B1ULL, 0xAEBF7D36EEFC2568ULL }, /* XSUM_XXH64_testdata[3089] */\n    { 1545, 0x0000000000000000ULL, 0xC36279AFB7971084ULL }, /* XSUM_XXH64_testdata[3090] */\n    { 1545, 0x000000009E3779B1ULL, 0xBB09452E4DBC5D4FULL }, /* XSUM_XXH64_testdata[3091] */\n    { 1546, 0x0000000000000000ULL, 0xF45A7E196D676EACULL }, /* XSUM_XXH64_testdata[3092] */\n    { 1546, 0x000000009E3779B1ULL, 0xA58E3E21633C2833ULL }, /* XSUM_XXH64_testdata[3093] */\n    { 1547, 0x0000000000000000ULL, 0x005C53B4E2B5F377ULL }, /* XSUM_XXH64_testdata[3094] */\n    { 1547, 0x000000009E3779B1ULL, 0x943C7C8DDB84A1D2ULL }, /* XSUM_XXH64_testdata[3095] */\n    { 1548, 0x0000000000000000ULL, 0x7D01D4EE629526A4ULL }, /* XSUM_XXH64_testdata[3096] */\n    { 1548, 0x000000009E3779B1ULL, 0x11FC97DD54BFFF8FULL }, /* XSUM_XXH64_testdata[3097] */\n    { 1549, 0x0000000000000000ULL, 0x0E4043E8E33564C7ULL }, /* XSUM_XXH64_testdata[3098] */\n    { 1549, 0x000000009E3779B1ULL, 0x2C995886C7EA17E7ULL }, /* XSUM_XXH64_testdata[3099] */\n    { 1550, 0x0000000000000000ULL, 0xF8021D46BA65DF46ULL }, /* XSUM_XXH64_testdata[3100] */\n    { 1550, 0x000000009E3779B1ULL, 0x91E0272C80001330ULL }, /* XSUM_XXH64_testdata[3101] */\n    { 1551, 0x0000000000000000ULL, 0xA1E2458DA689D9E0ULL }, /* XSUM_XXH64_testdata[3102] */\n    { 1551, 0x000000009E3779B1ULL, 0xA6B710E397E83EE2ULL }, /* XSUM_XXH64_testdata[3103] */\n    { 1552, 0x0000000000000000ULL, 0xC2B34609E3A5DC14ULL }, /* XSUM_XXH64_testdata[3104] */\n    { 1552, 0x000000009E3779B1ULL, 0xF320C3DE0B1EAB67ULL }, /* XSUM_XXH64_testdata[3105] */\n    { 1553, 0x0000000000000000ULL, 0xB43D8867AEE8AB7FULL }, /* XSUM_XXH64_testdata[3106] */\n    { 1553, 0x000000009E3779B1ULL, 0xA52347876530CFD9ULL }, /* XSUM_XXH64_testdata[3107] */\n    { 1554, 0x0000000000000000ULL, 0x16FF1F94505413E3ULL }, /* XSUM_XXH64_testdata[3108] */\n    { 1554, 0x000000009E3779B1ULL, 0xB2496CB93C48C094ULL }, /* XSUM_XXH64_testdata[3109] */\n    { 1555, 0x0000000000000000ULL, 0x189FCC4C4E4781BAULL }, /* XSUM_XXH64_testdata[3110] */\n    { 1555, 0x000000009E3779B1ULL, 0xA7759F8B7D2DCABBULL }, /* XSUM_XXH64_testdata[3111] */\n    { 1556, 0x0000000000000000ULL, 0x51C94AF7D2982AD7ULL }, /* XSUM_XXH64_testdata[3112] */\n    { 1556, 0x000000009E3779B1ULL, 0xB8BDBF48798BF342ULL }, /* XSUM_XXH64_testdata[3113] */\n    { 1557, 0x0000000000000000ULL, 0x8F07C1447350EC53ULL }, /* XSUM_XXH64_testdata[3114] */\n    { 1557, 0x000000009E3779B1ULL, 0x07523DED634377B7ULL }, /* XSUM_XXH64_testdata[3115] */\n    { 1558, 0x0000000000000000ULL, 0x64A8CDEC92FAD967ULL }, /* XSUM_XXH64_testdata[3116] */\n    { 1558, 0x000000009E3779B1ULL, 0x67FE403B54CDDC5FULL }, /* XSUM_XXH64_testdata[3117] */\n    { 1559, 0x0000000000000000ULL, 0x8D623B73C2F588A0ULL }, /* XSUM_XXH64_testdata[3118] */\n    { 1559, 0x000000009E3779B1ULL, 0x451D946E1A1FB9DFULL }, /* XSUM_XXH64_testdata[3119] */\n    { 1560, 0x0000000000000000ULL, 0x60C695F43F54B472ULL }, /* XSUM_XXH64_testdata[3120] */\n    { 1560, 0x000000009E3779B1ULL, 0x453847F38F311A8CULL }, /* XSUM_XXH64_testdata[3121] */\n    { 1561, 0x0000000000000000ULL, 0xAE980B4DDFD44E42ULL }, /* XSUM_XXH64_testdata[3122] */\n    { 1561, 0x000000009E3779B1ULL, 0x1C2992ED0ECD4EF3ULL }, /* XSUM_XXH64_testdata[3123] */\n    { 1562, 0x0000000000000000ULL, 0x585C095BEFD8EAC9ULL }, /* XSUM_XXH64_testdata[3124] */\n    { 1562, 0x000000009E3779B1ULL, 0x3F9984D7A7167C0DULL }, /* XSUM_XXH64_testdata[3125] */\n    { 1563, 0x0000000000000000ULL, 0x743C525FEC711C01ULL }, /* XSUM_XXH64_testdata[3126] */\n    { 1563, 0x000000009E3779B1ULL, 0xAB26476612988EFFULL }, /* XSUM_XXH64_testdata[3127] */\n    { 1564, 0x0000000000000000ULL, 0x42A4CB3320FF979AULL }, /* XSUM_XXH64_testdata[3128] */\n    { 1564, 0x000000009E3779B1ULL, 0x106B29B01FF34ED4ULL }, /* XSUM_XXH64_testdata[3129] */\n    { 1565, 0x0000000000000000ULL, 0xB0F830C7FA264EDFULL }, /* XSUM_XXH64_testdata[3130] */\n    { 1565, 0x000000009E3779B1ULL, 0x4DAD9D8019E55A12ULL }, /* XSUM_XXH64_testdata[3131] */\n    { 1566, 0x0000000000000000ULL, 0xEB1F580DDB952B6CULL }, /* XSUM_XXH64_testdata[3132] */\n    { 1566, 0x000000009E3779B1ULL, 0x171CF524B44C545BULL }, /* XSUM_XXH64_testdata[3133] */\n    { 1567, 0x0000000000000000ULL, 0xBEA76E6CFBF6D8A4ULL }, /* XSUM_XXH64_testdata[3134] */\n    { 1567, 0x000000009E3779B1ULL, 0x55FFA73D711616A4ULL }, /* XSUM_XXH64_testdata[3135] */\n    { 1568, 0x0000000000000000ULL, 0x0C56F9DC52C64626ULL }, /* XSUM_XXH64_testdata[3136] */\n    { 1568, 0x000000009E3779B1ULL, 0x9ED44FAD3502E08BULL }, /* XSUM_XXH64_testdata[3137] */\n    { 1569, 0x0000000000000000ULL, 0x74BB475D124451F2ULL }, /* XSUM_XXH64_testdata[3138] */\n    { 1569, 0x000000009E3779B1ULL, 0x6D5697379E50ABDDULL }, /* XSUM_XXH64_testdata[3139] */\n    { 1570, 0x0000000000000000ULL, 0x3459CFA4C466B401ULL }, /* XSUM_XXH64_testdata[3140] */\n    { 1570, 0x000000009E3779B1ULL, 0x58AF1D4DE8A081E9ULL }, /* XSUM_XXH64_testdata[3141] */\n    { 1571, 0x0000000000000000ULL, 0x42EE4433929FB9C6ULL }, /* XSUM_XXH64_testdata[3142] */\n    { 1571, 0x000000009E3779B1ULL, 0x6D23E9AC6BD0804EULL }, /* XSUM_XXH64_testdata[3143] */\n    { 1572, 0x0000000000000000ULL, 0xBE6AB6819A1B14B9ULL }, /* XSUM_XXH64_testdata[3144] */\n    { 1572, 0x000000009E3779B1ULL, 0x27D38A33FDBB2AE5ULL }, /* XSUM_XXH64_testdata[3145] */\n    { 1573, 0x0000000000000000ULL, 0xA2D8D1C4B8CEBFAEULL }, /* XSUM_XXH64_testdata[3146] */\n    { 1573, 0x000000009E3779B1ULL, 0xF2A66ABD6B0145E9ULL }, /* XSUM_XXH64_testdata[3147] */\n    { 1574, 0x0000000000000000ULL, 0xF8EAAA44A6BFD85CULL }, /* XSUM_XXH64_testdata[3148] */\n    { 1574, 0x000000009E3779B1ULL, 0xE440BFD46148B50CULL }, /* XSUM_XXH64_testdata[3149] */\n    { 1575, 0x0000000000000000ULL, 0xCC43F254AFBF800EULL }, /* XSUM_XXH64_testdata[3150] */\n    { 1575, 0x000000009E3779B1ULL, 0x5495F19D53F7D925ULL }, /* XSUM_XXH64_testdata[3151] */\n    { 1576, 0x0000000000000000ULL, 0xB8D18F5980CEC6BEULL }, /* XSUM_XXH64_testdata[3152] */\n    { 1576, 0x000000009E3779B1ULL, 0x40B27A51F0B3E7DEULL }, /* XSUM_XXH64_testdata[3153] */\n    { 1577, 0x0000000000000000ULL, 0x4CD7B81A400F8189ULL }, /* XSUM_XXH64_testdata[3154] */\n    { 1577, 0x000000009E3779B1ULL, 0xF50C038651B4F7A0ULL }, /* XSUM_XXH64_testdata[3155] */\n    { 1578, 0x0000000000000000ULL, 0xEF03C71CB8F2D000ULL }, /* XSUM_XXH64_testdata[3156] */\n    { 1578, 0x000000009E3779B1ULL, 0x8B5FD6C755A68609ULL }, /* XSUM_XXH64_testdata[3157] */\n    { 1579, 0x0000000000000000ULL, 0x62B67C941C552C28ULL }, /* XSUM_XXH64_testdata[3158] */\n    { 1579, 0x000000009E3779B1ULL, 0x3C0789BB1801D2DEULL }, /* XSUM_XXH64_testdata[3159] */\n    { 1580, 0x0000000000000000ULL, 0xF33379DC817BF81BULL }, /* XSUM_XXH64_testdata[3160] */\n    { 1580, 0x000000009E3779B1ULL, 0xBD9393A65FCAC2FFULL }, /* XSUM_XXH64_testdata[3161] */\n    { 1581, 0x0000000000000000ULL, 0xF9715C825CE09491ULL }, /* XSUM_XXH64_testdata[3162] */\n    { 1581, 0x000000009E3779B1ULL, 0xBAAFD2B30168DE05ULL }, /* XSUM_XXH64_testdata[3163] */\n    { 1582, 0x0000000000000000ULL, 0x4B314D195D75CC70ULL }, /* XSUM_XXH64_testdata[3164] */\n    { 1582, 0x000000009E3779B1ULL, 0x6AE7B8E9F9C615E2ULL }, /* XSUM_XXH64_testdata[3165] */\n    { 1583, 0x0000000000000000ULL, 0x46382D7DFAFCA254ULL }, /* XSUM_XXH64_testdata[3166] */\n    { 1583, 0x000000009E3779B1ULL, 0xD9FB78478622157CULL }, /* XSUM_XXH64_testdata[3167] */\n    { 1584, 0x0000000000000000ULL, 0x193C567AFDCE3DECULL }, /* XSUM_XXH64_testdata[3168] */\n    { 1584, 0x000000009E3779B1ULL, 0x4564C95AB688D1B5ULL }, /* XSUM_XXH64_testdata[3169] */\n    { 1585, 0x0000000000000000ULL, 0xCC54A68E3551DAB2ULL }, /* XSUM_XXH64_testdata[3170] */\n    { 1585, 0x000000009E3779B1ULL, 0x8EB928FC7D44A911ULL }, /* XSUM_XXH64_testdata[3171] */\n    { 1586, 0x0000000000000000ULL, 0x090FCEF6F92B0F3FULL }, /* XSUM_XXH64_testdata[3172] */\n    { 1586, 0x000000009E3779B1ULL, 0x103F7599B36BD36DULL }, /* XSUM_XXH64_testdata[3173] */\n    { 1587, 0x0000000000000000ULL, 0x05796452679CEA0DULL }, /* XSUM_XXH64_testdata[3174] */\n    { 1587, 0x000000009E3779B1ULL, 0x7D92BC205561E616ULL }, /* XSUM_XXH64_testdata[3175] */\n    { 1588, 0x0000000000000000ULL, 0x02253E746FC15B3FULL }, /* XSUM_XXH64_testdata[3176] */\n    { 1588, 0x000000009E3779B1ULL, 0x3A35E5AAEFD3EB40ULL }, /* XSUM_XXH64_testdata[3177] */\n    { 1589, 0x0000000000000000ULL, 0x2307DC21C2837496ULL }, /* XSUM_XXH64_testdata[3178] */\n    { 1589, 0x000000009E3779B1ULL, 0x695ED2350A995E40ULL }, /* XSUM_XXH64_testdata[3179] */\n    { 1590, 0x0000000000000000ULL, 0xFC7711C90DE93C22ULL }, /* XSUM_XXH64_testdata[3180] */\n    { 1590, 0x000000009E3779B1ULL, 0x14D1EAD13B3F5219ULL }, /* XSUM_XXH64_testdata[3181] */\n    { 1591, 0x0000000000000000ULL, 0x7FD3951CDDBE0BE9ULL }, /* XSUM_XXH64_testdata[3182] */\n    { 1591, 0x000000009E3779B1ULL, 0xEA6B0D12249D4D56ULL }, /* XSUM_XXH64_testdata[3183] */\n    { 1592, 0x0000000000000000ULL, 0xB9D5C6943B50DFE2ULL }, /* XSUM_XXH64_testdata[3184] */\n    { 1592, 0x000000009E3779B1ULL, 0x7842AF14A4F83CFBULL }, /* XSUM_XXH64_testdata[3185] */\n    { 1593, 0x0000000000000000ULL, 0xBC180FE1656F115CULL }, /* XSUM_XXH64_testdata[3186] */\n    { 1593, 0x000000009E3779B1ULL, 0xF049D5310D20D841ULL }, /* XSUM_XXH64_testdata[3187] */\n    { 1594, 0x0000000000000000ULL, 0xEF818D5332AEE3F9ULL }, /* XSUM_XXH64_testdata[3188] */\n    { 1594, 0x000000009E3779B1ULL, 0x55F7DFCA9870A7BCULL }, /* XSUM_XXH64_testdata[3189] */\n    { 1595, 0x0000000000000000ULL, 0x9A2E28E971D74BAFULL }, /* XSUM_XXH64_testdata[3190] */\n    { 1595, 0x000000009E3779B1ULL, 0x1C0143F3594AED4BULL }, /* XSUM_XXH64_testdata[3191] */\n    { 1596, 0x0000000000000000ULL, 0x2B35448A45DF6294ULL }, /* XSUM_XXH64_testdata[3192] */\n    { 1596, 0x000000009E3779B1ULL, 0x00FAAA174712FF8AULL }, /* XSUM_XXH64_testdata[3193] */\n    { 1597, 0x0000000000000000ULL, 0xCBCEEB8DDEF9CCB4ULL }, /* XSUM_XXH64_testdata[3194] */\n    { 1597, 0x000000009E3779B1ULL, 0xD79C67A53A94CA38ULL }, /* XSUM_XXH64_testdata[3195] */\n    { 1598, 0x0000000000000000ULL, 0xC60F8FB2BE7D4317ULL }, /* XSUM_XXH64_testdata[3196] */\n    { 1598, 0x000000009E3779B1ULL, 0x1CF14314FE8BE210ULL }, /* XSUM_XXH64_testdata[3197] */\n    { 1599, 0x0000000000000000ULL, 0x37AE9CF7A5E15FA5ULL }, /* XSUM_XXH64_testdata[3198] */\n    { 1599, 0x000000009E3779B1ULL, 0x3791ADC4DE86513BULL }, /* XSUM_XXH64_testdata[3199] */\n    { 1600, 0x0000000000000000ULL, 0x6C6DD95327AD9AB8ULL }, /* XSUM_XXH64_testdata[3200] */\n    { 1600, 0x000000009E3779B1ULL, 0x3E37F89EC2EFB644ULL }, /* XSUM_XXH64_testdata[3201] */\n    { 1601, 0x0000000000000000ULL, 0x907803F3AA9FB862ULL }, /* XSUM_XXH64_testdata[3202] */\n    { 1601, 0x000000009E3779B1ULL, 0xD6FDB6B002A596C3ULL }, /* XSUM_XXH64_testdata[3203] */\n    { 1602, 0x0000000000000000ULL, 0x64537A0034130DA7ULL }, /* XSUM_XXH64_testdata[3204] */\n    { 1602, 0x000000009E3779B1ULL, 0x35A80F8EA516EDBAULL }, /* XSUM_XXH64_testdata[3205] */\n    { 1603, 0x0000000000000000ULL, 0x0450A0D72CCBAD01ULL }, /* XSUM_XXH64_testdata[3206] */\n    { 1603, 0x000000009E3779B1ULL, 0x1A2987931EFF8C26ULL }, /* XSUM_XXH64_testdata[3207] */\n    { 1604, 0x0000000000000000ULL, 0xA44A0FED7FD8A11DULL }, /* XSUM_XXH64_testdata[3208] */\n    { 1604, 0x000000009E3779B1ULL, 0x178A03C8E664AE08ULL }, /* XSUM_XXH64_testdata[3209] */\n    { 1605, 0x0000000000000000ULL, 0x21536C43FA9ABAECULL }, /* XSUM_XXH64_testdata[3210] */\n    { 1605, 0x000000009E3779B1ULL, 0xDC9B93185FFCF61FULL }, /* XSUM_XXH64_testdata[3211] */\n    { 1606, 0x0000000000000000ULL, 0x200300F3BDECE679ULL }, /* XSUM_XXH64_testdata[3212] */\n    { 1606, 0x000000009E3779B1ULL, 0x8A977089E14004DCULL }, /* XSUM_XXH64_testdata[3213] */\n    { 1607, 0x0000000000000000ULL, 0xEF11D3D95E4E9294ULL }, /* XSUM_XXH64_testdata[3214] */\n    { 1607, 0x000000009E3779B1ULL, 0xFDD068F60B2BC87EULL }, /* XSUM_XXH64_testdata[3215] */\n    { 1608, 0x0000000000000000ULL, 0xFB6D69DD48D705A6ULL }, /* XSUM_XXH64_testdata[3216] */\n    { 1608, 0x000000009E3779B1ULL, 0x5388ACBE24785350ULL }, /* XSUM_XXH64_testdata[3217] */\n    { 1609, 0x0000000000000000ULL, 0x1E8A12632A3E3559ULL }, /* XSUM_XXH64_testdata[3218] */\n    { 1609, 0x000000009E3779B1ULL, 0x5B4560D30A34F10CULL }, /* XSUM_XXH64_testdata[3219] */\n    { 1610, 0x0000000000000000ULL, 0x9F86E451D3613F2DULL }, /* XSUM_XXH64_testdata[3220] */\n    { 1610, 0x000000009E3779B1ULL, 0x96E9B33D44BF5D32ULL }, /* XSUM_XXH64_testdata[3221] */\n    { 1611, 0x0000000000000000ULL, 0x7061A3E327AAB9A0ULL }, /* XSUM_XXH64_testdata[3222] */\n    { 1611, 0x000000009E3779B1ULL, 0x2BB881112C9614F5ULL }, /* XSUM_XXH64_testdata[3223] */\n    { 1612, 0x0000000000000000ULL, 0xAB8BA282F8F8AC43ULL }, /* XSUM_XXH64_testdata[3224] */\n    { 1612, 0x000000009E3779B1ULL, 0x5264565685763403ULL }, /* XSUM_XXH64_testdata[3225] */\n    { 1613, 0x0000000000000000ULL, 0x99C51EC586C4E8DFULL }, /* XSUM_XXH64_testdata[3226] */\n    { 1613, 0x000000009E3779B1ULL, 0x3C2F8F920CB53EDCULL }, /* XSUM_XXH64_testdata[3227] */\n    { 1614, 0x0000000000000000ULL, 0x49B3A0D6F1B619FAULL }, /* XSUM_XXH64_testdata[3228] */\n    { 1614, 0x000000009E3779B1ULL, 0xC17BE04BBEEA1E89ULL }, /* XSUM_XXH64_testdata[3229] */\n    { 1615, 0x0000000000000000ULL, 0x54EE93FDA11B6508ULL }, /* XSUM_XXH64_testdata[3230] */\n    { 1615, 0x000000009E3779B1ULL, 0x2850CF718384D587ULL }, /* XSUM_XXH64_testdata[3231] */\n    { 1616, 0x0000000000000000ULL, 0xC0A298ABFCAF2D99ULL }, /* XSUM_XXH64_testdata[3232] */\n    { 1616, 0x000000009E3779B1ULL, 0x8912F04097F3062BULL }, /* XSUM_XXH64_testdata[3233] */\n    { 1617, 0x0000000000000000ULL, 0x9565A5026C4A889DULL }, /* XSUM_XXH64_testdata[3234] */\n    { 1617, 0x000000009E3779B1ULL, 0xBB1B629837C85C8EULL }, /* XSUM_XXH64_testdata[3235] */\n    { 1618, 0x0000000000000000ULL, 0xB09CA9A19B1CB2A7ULL }, /* XSUM_XXH64_testdata[3236] */\n    { 1618, 0x000000009E3779B1ULL, 0x0F65114B5A7292B0ULL }, /* XSUM_XXH64_testdata[3237] */\n    { 1619, 0x0000000000000000ULL, 0xC16ABB4F5D05D510ULL }, /* XSUM_XXH64_testdata[3238] */\n    { 1619, 0x000000009E3779B1ULL, 0x02D429A89937808DULL }, /* XSUM_XXH64_testdata[3239] */\n    { 1620, 0x0000000000000000ULL, 0x3BB888CA930151C2ULL }, /* XSUM_XXH64_testdata[3240] */\n    { 1620, 0x000000009E3779B1ULL, 0x3776AE69D3929F2EULL }, /* XSUM_XXH64_testdata[3241] */\n    { 1621, 0x0000000000000000ULL, 0x6B161AF813DE14E0ULL }, /* XSUM_XXH64_testdata[3242] */\n    { 1621, 0x000000009E3779B1ULL, 0xE4E901EB765CC055ULL }, /* XSUM_XXH64_testdata[3243] */\n    { 1622, 0x0000000000000000ULL, 0x229C1A5F35070B6AULL }, /* XSUM_XXH64_testdata[3244] */\n    { 1622, 0x000000009E3779B1ULL, 0x3BC4DD9FAD5D4E0EULL }, /* XSUM_XXH64_testdata[3245] */\n    { 1623, 0x0000000000000000ULL, 0x94E1A54B5F09482DULL }, /* XSUM_XXH64_testdata[3246] */\n    { 1623, 0x000000009E3779B1ULL, 0x8B8361A4293F42E3ULL }, /* XSUM_XXH64_testdata[3247] */\n    { 1624, 0x0000000000000000ULL, 0xB79965DAA3E11D8FULL }, /* XSUM_XXH64_testdata[3248] */\n    { 1624, 0x000000009E3779B1ULL, 0x39D9421CAB673FE0ULL }, /* XSUM_XXH64_testdata[3249] */\n    { 1625, 0x0000000000000000ULL, 0x636C06CDA0161CB0ULL }, /* XSUM_XXH64_testdata[3250] */\n    { 1625, 0x000000009E3779B1ULL, 0x771061B116642DDEULL }, /* XSUM_XXH64_testdata[3251] */\n    { 1626, 0x0000000000000000ULL, 0xDA3F8A4D83AF7E97ULL }, /* XSUM_XXH64_testdata[3252] */\n    { 1626, 0x000000009E3779B1ULL, 0x638E932AE98CCCA8ULL }, /* XSUM_XXH64_testdata[3253] */\n    { 1627, 0x0000000000000000ULL, 0xB1C532D9C70C068BULL }, /* XSUM_XXH64_testdata[3254] */\n    { 1627, 0x000000009E3779B1ULL, 0x048D897FC8BDE7BAULL }, /* XSUM_XXH64_testdata[3255] */\n    { 1628, 0x0000000000000000ULL, 0x6ACCADAB0F8EF249ULL }, /* XSUM_XXH64_testdata[3256] */\n    { 1628, 0x000000009E3779B1ULL, 0x3D5FD981B4CC16D3ULL }, /* XSUM_XXH64_testdata[3257] */\n    { 1629, 0x0000000000000000ULL, 0x207F623CE92C4BD3ULL }, /* XSUM_XXH64_testdata[3258] */\n    { 1629, 0x000000009E3779B1ULL, 0x34179AE45B7510AEULL }, /* XSUM_XXH64_testdata[3259] */\n    { 1630, 0x0000000000000000ULL, 0xE96B777D4D364C96ULL }, /* XSUM_XXH64_testdata[3260] */\n    { 1630, 0x000000009E3779B1ULL, 0x18ED908117AE1D73ULL }, /* XSUM_XXH64_testdata[3261] */\n    { 1631, 0x0000000000000000ULL, 0x204424CE5002EAA5ULL }, /* XSUM_XXH64_testdata[3262] */\n    { 1631, 0x000000009E3779B1ULL, 0xAC3539D300323399ULL }, /* XSUM_XXH64_testdata[3263] */\n    { 1632, 0x0000000000000000ULL, 0xCE58A2CBA4494E66ULL }, /* XSUM_XXH64_testdata[3264] */\n    { 1632, 0x000000009E3779B1ULL, 0xD722A1D00AC10A2FULL }, /* XSUM_XXH64_testdata[3265] */\n    { 1633, 0x0000000000000000ULL, 0x49053FC53A197E2BULL }, /* XSUM_XXH64_testdata[3266] */\n    { 1633, 0x000000009E3779B1ULL, 0x520A424E8E369406ULL }, /* XSUM_XXH64_testdata[3267] */\n    { 1634, 0x0000000000000000ULL, 0x4F80E0D668BED51DULL }, /* XSUM_XXH64_testdata[3268] */\n    { 1634, 0x000000009E3779B1ULL, 0x35F901BE3880E537ULL }, /* XSUM_XXH64_testdata[3269] */\n    { 1635, 0x0000000000000000ULL, 0xC581E64E62BE5EB7ULL }, /* XSUM_XXH64_testdata[3270] */\n    { 1635, 0x000000009E3779B1ULL, 0xAEBB7AD8588E0E56ULL }, /* XSUM_XXH64_testdata[3271] */\n    { 1636, 0x0000000000000000ULL, 0xB4B8AAD2EBCAF803ULL }, /* XSUM_XXH64_testdata[3272] */\n    { 1636, 0x000000009E3779B1ULL, 0xBD8DA8D6D5BBFF9FULL }, /* XSUM_XXH64_testdata[3273] */\n    { 1637, 0x0000000000000000ULL, 0xF55828797D67A8ADULL }, /* XSUM_XXH64_testdata[3274] */\n    { 1637, 0x000000009E3779B1ULL, 0x3DD0DC30CBE981BCULL }, /* XSUM_XXH64_testdata[3275] */\n    { 1638, 0x0000000000000000ULL, 0x6DD7D9CBFC80A384ULL }, /* XSUM_XXH64_testdata[3276] */\n    { 1638, 0x000000009E3779B1ULL, 0x93006E8C54C2CC8EULL }, /* XSUM_XXH64_testdata[3277] */\n    { 1639, 0x0000000000000000ULL, 0x5BF801F38EA6C087ULL }, /* XSUM_XXH64_testdata[3278] */\n    { 1639, 0x000000009E3779B1ULL, 0x5174BCB31752426AULL }, /* XSUM_XXH64_testdata[3279] */\n    { 1640, 0x0000000000000000ULL, 0x0F233B0C0B128CA8ULL }, /* XSUM_XXH64_testdata[3280] */\n    { 1640, 0x000000009E3779B1ULL, 0x7B14BAC52D3DD748ULL }, /* XSUM_XXH64_testdata[3281] */\n    { 1641, 0x0000000000000000ULL, 0xD70D9B2CF3BD8665ULL }, /* XSUM_XXH64_testdata[3282] */\n    { 1641, 0x000000009E3779B1ULL, 0xB443706BB2658309ULL }, /* XSUM_XXH64_testdata[3283] */\n    { 1642, 0x0000000000000000ULL, 0x9FF8A37309F256E7ULL }, /* XSUM_XXH64_testdata[3284] */\n    { 1642, 0x000000009E3779B1ULL, 0xD36A1438415D306EULL }, /* XSUM_XXH64_testdata[3285] */\n    { 1643, 0x0000000000000000ULL, 0x9E120470D0779E8CULL }, /* XSUM_XXH64_testdata[3286] */\n    { 1643, 0x000000009E3779B1ULL, 0x9AF8535DCACEC23FULL }, /* XSUM_XXH64_testdata[3287] */\n    { 1644, 0x0000000000000000ULL, 0x2E8F3258593AF633ULL }, /* XSUM_XXH64_testdata[3288] */\n    { 1644, 0x000000009E3779B1ULL, 0xC17FDCC70B62469FULL }, /* XSUM_XXH64_testdata[3289] */\n    { 1645, 0x0000000000000000ULL, 0xE00ED1D3307E2D7BULL }, /* XSUM_XXH64_testdata[3290] */\n    { 1645, 0x000000009E3779B1ULL, 0x95871F1F52636B14ULL }, /* XSUM_XXH64_testdata[3291] */\n    { 1646, 0x0000000000000000ULL, 0x255B902A051238C1ULL }, /* XSUM_XXH64_testdata[3292] */\n    { 1646, 0x000000009E3779B1ULL, 0x9F132DAFBE6BC93EULL }, /* XSUM_XXH64_testdata[3293] */\n    { 1647, 0x0000000000000000ULL, 0xEF26A09CFB3F1706ULL }, /* XSUM_XXH64_testdata[3294] */\n    { 1647, 0x000000009E3779B1ULL, 0x63AF896134E96129ULL }, /* XSUM_XXH64_testdata[3295] */\n    { 1648, 0x0000000000000000ULL, 0x41E287447C7ACA72ULL }, /* XSUM_XXH64_testdata[3296] */\n    { 1648, 0x000000009E3779B1ULL, 0x1201E1D2C55E4388ULL }, /* XSUM_XXH64_testdata[3297] */\n    { 1649, 0x0000000000000000ULL, 0xD004CEDEF08B501CULL }, /* XSUM_XXH64_testdata[3298] */\n    { 1649, 0x000000009E3779B1ULL, 0xD26C59D4578D32E2ULL }, /* XSUM_XXH64_testdata[3299] */\n    { 1650, 0x0000000000000000ULL, 0x5269130062237423ULL }, /* XSUM_XXH64_testdata[3300] */\n    { 1650, 0x000000009E3779B1ULL, 0x7E6C88EDADE17465ULL }, /* XSUM_XXH64_testdata[3301] */\n    { 1651, 0x0000000000000000ULL, 0xD295B04F2893D550ULL }, /* XSUM_XXH64_testdata[3302] */\n    { 1651, 0x000000009E3779B1ULL, 0x46551AA2C8EC7618ULL }, /* XSUM_XXH64_testdata[3303] */\n    { 1652, 0x0000000000000000ULL, 0x00C565D934FBC073ULL }, /* XSUM_XXH64_testdata[3304] */\n    { 1652, 0x000000009E3779B1ULL, 0xF335B0CB382444A1ULL }, /* XSUM_XXH64_testdata[3305] */\n    { 1653, 0x0000000000000000ULL, 0x8972311D0FB8650BULL }, /* XSUM_XXH64_testdata[3306] */\n    { 1653, 0x000000009E3779B1ULL, 0x544FF9079E902640ULL }, /* XSUM_XXH64_testdata[3307] */\n    { 1654, 0x0000000000000000ULL, 0xF5586D62BB829B6FULL }, /* XSUM_XXH64_testdata[3308] */\n    { 1654, 0x000000009E3779B1ULL, 0x7A3BA876138968C6ULL }, /* XSUM_XXH64_testdata[3309] */\n    { 1655, 0x0000000000000000ULL, 0x6E0D7273096BD6EEULL }, /* XSUM_XXH64_testdata[3310] */\n    { 1655, 0x000000009E3779B1ULL, 0x35EA8EC77D2F786CULL }, /* XSUM_XXH64_testdata[3311] */\n    { 1656, 0x0000000000000000ULL, 0x7733E29A2C88DDA4ULL }, /* XSUM_XXH64_testdata[3312] */\n    { 1656, 0x000000009E3779B1ULL, 0x2E4FC9EB0FEACCB9ULL }, /* XSUM_XXH64_testdata[3313] */\n    { 1657, 0x0000000000000000ULL, 0xF5F186833A8EEC6FULL }, /* XSUM_XXH64_testdata[3314] */\n    { 1657, 0x000000009E3779B1ULL, 0x828D4948F7B6A583ULL }, /* XSUM_XXH64_testdata[3315] */\n    { 1658, 0x0000000000000000ULL, 0x68A818B7C263F74AULL }, /* XSUM_XXH64_testdata[3316] */\n    { 1658, 0x000000009E3779B1ULL, 0x4A005BB85D0A79F7ULL }, /* XSUM_XXH64_testdata[3317] */\n    { 1659, 0x0000000000000000ULL, 0x018B356CA3C9A9F1ULL }, /* XSUM_XXH64_testdata[3318] */\n    { 1659, 0x000000009E3779B1ULL, 0x388F3CA3346F2B33ULL }, /* XSUM_XXH64_testdata[3319] */\n    { 1660, 0x0000000000000000ULL, 0xEB801C9F3FBA55D1ULL }, /* XSUM_XXH64_testdata[3320] */\n    { 1660, 0x000000009E3779B1ULL, 0x1B596F329DF90548ULL }, /* XSUM_XXH64_testdata[3321] */\n    { 1661, 0x0000000000000000ULL, 0x1D2D873ADE00A4A1ULL }, /* XSUM_XXH64_testdata[3322] */\n    { 1661, 0x000000009E3779B1ULL, 0x973B0041FA5B0DF4ULL }, /* XSUM_XXH64_testdata[3323] */\n    { 1662, 0x0000000000000000ULL, 0x3FA2D1ADA4259173ULL }, /* XSUM_XXH64_testdata[3324] */\n    { 1662, 0x000000009E3779B1ULL, 0xC4EFA6F2BA28926AULL }, /* XSUM_XXH64_testdata[3325] */\n    { 1663, 0x0000000000000000ULL, 0x60BE83EC5E5F9868ULL }, /* XSUM_XXH64_testdata[3326] */\n    { 1663, 0x000000009E3779B1ULL, 0x2EFF0EB2F239950EULL }, /* XSUM_XXH64_testdata[3327] */\n    { 1664, 0x0000000000000000ULL, 0x5FAA366ACE68C4F9ULL }, /* XSUM_XXH64_testdata[3328] */\n    { 1664, 0x000000009E3779B1ULL, 0x4FEE07A316F52D4FULL }, /* XSUM_XXH64_testdata[3329] */\n    { 1665, 0x0000000000000000ULL, 0x04CAB9B038E28DB8ULL }, /* XSUM_XXH64_testdata[3330] */\n    { 1665, 0x000000009E3779B1ULL, 0xB71811C91CA5D8C9ULL }, /* XSUM_XXH64_testdata[3331] */\n    { 1666, 0x0000000000000000ULL, 0xD75FD910B590EF87ULL }, /* XSUM_XXH64_testdata[3332] */\n    { 1666, 0x000000009E3779B1ULL, 0xE5FCABDA6312565FULL }, /* XSUM_XXH64_testdata[3333] */\n    { 1667, 0x0000000000000000ULL, 0xAD550BC55A9A0F10ULL }, /* XSUM_XXH64_testdata[3334] */\n    { 1667, 0x000000009E3779B1ULL, 0xD3D8AD861DEDB7ABULL }, /* XSUM_XXH64_testdata[3335] */\n    { 1668, 0x0000000000000000ULL, 0xAC77F130F26CEBBFULL }, /* XSUM_XXH64_testdata[3336] */\n    { 1668, 0x000000009E3779B1ULL, 0x7858391A2B46D82EULL }, /* XSUM_XXH64_testdata[3337] */\n    { 1669, 0x0000000000000000ULL, 0x2244FA4B806CE1EBULL }, /* XSUM_XXH64_testdata[3338] */\n    { 1669, 0x000000009E3779B1ULL, 0x3736AC22C458A0E4ULL }, /* XSUM_XXH64_testdata[3339] */\n    { 1670, 0x0000000000000000ULL, 0x8638660334868725ULL }, /* XSUM_XXH64_testdata[3340] */\n    { 1670, 0x000000009E3779B1ULL, 0x1C4496255C405FA6ULL }, /* XSUM_XXH64_testdata[3341] */\n    { 1671, 0x0000000000000000ULL, 0x604D3DE86B3F1083ULL }, /* XSUM_XXH64_testdata[3342] */\n    { 1671, 0x000000009E3779B1ULL, 0xF7A76A7454BD3A80ULL }, /* XSUM_XXH64_testdata[3343] */\n    { 1672, 0x0000000000000000ULL, 0xE8287C45CA4FF145ULL }, /* XSUM_XXH64_testdata[3344] */\n    { 1672, 0x000000009E3779B1ULL, 0x3BF83A8D746BAEB6ULL }, /* XSUM_XXH64_testdata[3345] */\n    { 1673, 0x0000000000000000ULL, 0x54ACE1C76FEF5A27ULL }, /* XSUM_XXH64_testdata[3346] */\n    { 1673, 0x000000009E3779B1ULL, 0x1C8B2E909DBEEB02ULL }, /* XSUM_XXH64_testdata[3347] */\n    { 1674, 0x0000000000000000ULL, 0x2ECCDD3A05EA6AFCULL }, /* XSUM_XXH64_testdata[3348] */\n    { 1674, 0x000000009E3779B1ULL, 0xBCD32AFAA9714D34ULL }, /* XSUM_XXH64_testdata[3349] */\n    { 1675, 0x0000000000000000ULL, 0x837A229C386F65A6ULL }, /* XSUM_XXH64_testdata[3350] */\n    { 1675, 0x000000009E3779B1ULL, 0xC1A1D814697E54D0ULL }, /* XSUM_XXH64_testdata[3351] */\n    { 1676, 0x0000000000000000ULL, 0x5571732C93A2FE8BULL }, /* XSUM_XXH64_testdata[3352] */\n    { 1676, 0x000000009E3779B1ULL, 0xCEBAC1E61ADF2DD4ULL }, /* XSUM_XXH64_testdata[3353] */\n    { 1677, 0x0000000000000000ULL, 0xB8E3F65B4B00D676ULL }, /* XSUM_XXH64_testdata[3354] */\n    { 1677, 0x000000009E3779B1ULL, 0x30482500656C48D8ULL }, /* XSUM_XXH64_testdata[3355] */\n    { 1678, 0x0000000000000000ULL, 0xEB5EA8EB33DF1260ULL }, /* XSUM_XXH64_testdata[3356] */\n    { 1678, 0x000000009E3779B1ULL, 0x60F5E62863A90828ULL }, /* XSUM_XXH64_testdata[3357] */\n    { 1679, 0x0000000000000000ULL, 0x873F74310484F3E2ULL }, /* XSUM_XXH64_testdata[3358] */\n    { 1679, 0x000000009E3779B1ULL, 0xB3FE1D83C98D4018ULL }, /* XSUM_XXH64_testdata[3359] */\n    { 1680, 0x0000000000000000ULL, 0x0E314B095320C272ULL }, /* XSUM_XXH64_testdata[3360] */\n    { 1680, 0x000000009E3779B1ULL, 0xA037C4F60E8E8C53ULL }, /* XSUM_XXH64_testdata[3361] */\n    { 1681, 0x0000000000000000ULL, 0x9EB8189409EAFE58ULL }, /* XSUM_XXH64_testdata[3362] */\n    { 1681, 0x000000009E3779B1ULL, 0xF1511B15429BC2EDULL }, /* XSUM_XXH64_testdata[3363] */\n    { 1682, 0x0000000000000000ULL, 0xCD1A7CBA6D35158EULL }, /* XSUM_XXH64_testdata[3364] */\n    { 1682, 0x000000009E3779B1ULL, 0xE0ECD12A13D6F323ULL }, /* XSUM_XXH64_testdata[3365] */\n    { 1683, 0x0000000000000000ULL, 0xA1E6031EDAA25021ULL }, /* XSUM_XXH64_testdata[3366] */\n    { 1683, 0x000000009E3779B1ULL, 0x16431DA2D43D7E83ULL }, /* XSUM_XXH64_testdata[3367] */\n    { 1684, 0x0000000000000000ULL, 0x68B9E7598EEE21CAULL }, /* XSUM_XXH64_testdata[3368] */\n    { 1684, 0x000000009E3779B1ULL, 0xADBA4CF078501597ULL }, /* XSUM_XXH64_testdata[3369] */\n    { 1685, 0x0000000000000000ULL, 0x07CBF0A892F18C8CULL }, /* XSUM_XXH64_testdata[3370] */\n    { 1685, 0x000000009E3779B1ULL, 0x4239A4DC9DE3B36FULL }, /* XSUM_XXH64_testdata[3371] */\n    { 1686, 0x0000000000000000ULL, 0x3BBC196D8E9799B1ULL }, /* XSUM_XXH64_testdata[3372] */\n    { 1686, 0x000000009E3779B1ULL, 0x767056D4CAD16E3AULL }, /* XSUM_XXH64_testdata[3373] */\n    { 1687, 0x0000000000000000ULL, 0x5CBC8DBE3E6EF374ULL }, /* XSUM_XXH64_testdata[3374] */\n    { 1687, 0x000000009E3779B1ULL, 0x8EBA46CA3F79A2E6ULL }, /* XSUM_XXH64_testdata[3375] */\n    { 1688, 0x0000000000000000ULL, 0x7990C9FB13C5F12FULL }, /* XSUM_XXH64_testdata[3376] */\n    { 1688, 0x000000009E3779B1ULL, 0xD8AEE7B73A86B131ULL }, /* XSUM_XXH64_testdata[3377] */\n    { 1689, 0x0000000000000000ULL, 0xF22ADB86330554B4ULL }, /* XSUM_XXH64_testdata[3378] */\n    { 1689, 0x000000009E3779B1ULL, 0x566E072DD513F8F6ULL }, /* XSUM_XXH64_testdata[3379] */\n    { 1690, 0x0000000000000000ULL, 0xE4AC9CCE0113D3EBULL }, /* XSUM_XXH64_testdata[3380] */\n    { 1690, 0x000000009E3779B1ULL, 0xDC18EFF19F4BFD31ULL }, /* XSUM_XXH64_testdata[3381] */\n    { 1691, 0x0000000000000000ULL, 0x38115722334A3A66ULL }, /* XSUM_XXH64_testdata[3382] */\n    { 1691, 0x000000009E3779B1ULL, 0xD4AD1B7F5C71DAC5ULL }, /* XSUM_XXH64_testdata[3383] */\n    { 1692, 0x0000000000000000ULL, 0xE3276958E27BD95BULL }, /* XSUM_XXH64_testdata[3384] */\n    { 1692, 0x000000009E3779B1ULL, 0xD74995A3CE7105B2ULL }, /* XSUM_XXH64_testdata[3385] */\n    { 1693, 0x0000000000000000ULL, 0xC124BF02CD1FE936ULL }, /* XSUM_XXH64_testdata[3386] */\n    { 1693, 0x000000009E3779B1ULL, 0x92F385A153692D0EULL }, /* XSUM_XXH64_testdata[3387] */\n    { 1694, 0x0000000000000000ULL, 0xB0AF477397845F74ULL }, /* XSUM_XXH64_testdata[3388] */\n    { 1694, 0x000000009E3779B1ULL, 0x04A7686B95001DD1ULL }, /* XSUM_XXH64_testdata[3389] */\n    { 1695, 0x0000000000000000ULL, 0x7E05C9BE12CCE045ULL }, /* XSUM_XXH64_testdata[3390] */\n    { 1695, 0x000000009E3779B1ULL, 0xCD6751AF8425EFD1ULL }, /* XSUM_XXH64_testdata[3391] */\n    { 1696, 0x0000000000000000ULL, 0x4D2DB77F05A32425ULL }, /* XSUM_XXH64_testdata[3392] */\n    { 1696, 0x000000009E3779B1ULL, 0x7732D72F5C76B1ECULL }, /* XSUM_XXH64_testdata[3393] */\n    { 1697, 0x0000000000000000ULL, 0x09B9647CD1788055ULL }, /* XSUM_XXH64_testdata[3394] */\n    { 1697, 0x000000009E3779B1ULL, 0xAF6E876FF2859051ULL }, /* XSUM_XXH64_testdata[3395] */\n    { 1698, 0x0000000000000000ULL, 0xB3DE9C30D8CE5026ULL }, /* XSUM_XXH64_testdata[3396] */\n    { 1698, 0x000000009E3779B1ULL, 0x6F06D8990008C3CBULL }, /* XSUM_XXH64_testdata[3397] */\n    { 1699, 0x0000000000000000ULL, 0x342F47AC47AB3006ULL }, /* XSUM_XXH64_testdata[3398] */\n    { 1699, 0x000000009E3779B1ULL, 0x1D1A6133D0FF4C28ULL }, /* XSUM_XXH64_testdata[3399] */\n    { 1700, 0x0000000000000000ULL, 0xA3F8F2A97AB4543FULL }, /* XSUM_XXH64_testdata[3400] */\n    { 1700, 0x000000009E3779B1ULL, 0xDE1F6E4CC71FAD03ULL }, /* XSUM_XXH64_testdata[3401] */\n    { 1701, 0x0000000000000000ULL, 0xCC9C82EE8B57E96EULL }, /* XSUM_XXH64_testdata[3402] */\n    { 1701, 0x000000009E3779B1ULL, 0x5BC8EFDB884B44ACULL }, /* XSUM_XXH64_testdata[3403] */\n    { 1702, 0x0000000000000000ULL, 0xACCF70A9F06D4370ULL }, /* XSUM_XXH64_testdata[3404] */\n    { 1702, 0x000000009E3779B1ULL, 0xE93D7A098026AE00ULL }, /* XSUM_XXH64_testdata[3405] */\n    { 1703, 0x0000000000000000ULL, 0xC4F6C35ED815945BULL }, /* XSUM_XXH64_testdata[3406] */\n    { 1703, 0x000000009E3779B1ULL, 0x8D8BEA6F4860E769ULL }, /* XSUM_XXH64_testdata[3407] */\n    { 1704, 0x0000000000000000ULL, 0xDB47BC574089F55EULL }, /* XSUM_XXH64_testdata[3408] */\n    { 1704, 0x000000009E3779B1ULL, 0x37D6D08840E3EF1EULL }, /* XSUM_XXH64_testdata[3409] */\n    { 1705, 0x0000000000000000ULL, 0x2699F136DC53C798ULL }, /* XSUM_XXH64_testdata[3410] */\n    { 1705, 0x000000009E3779B1ULL, 0x824255446F2EE361ULL }, /* XSUM_XXH64_testdata[3411] */\n    { 1706, 0x0000000000000000ULL, 0xD62A889F292EC17EULL }, /* XSUM_XXH64_testdata[3412] */\n    { 1706, 0x000000009E3779B1ULL, 0x1702CF9052C58735ULL }, /* XSUM_XXH64_testdata[3413] */\n    { 1707, 0x0000000000000000ULL, 0x123BBAD844BBBC53ULL }, /* XSUM_XXH64_testdata[3414] */\n    { 1707, 0x000000009E3779B1ULL, 0x89E311328DE51A98ULL }, /* XSUM_XXH64_testdata[3415] */\n    { 1708, 0x0000000000000000ULL, 0x986AF39AF32D574BULL }, /* XSUM_XXH64_testdata[3416] */\n    { 1708, 0x000000009E3779B1ULL, 0x70CC35BDA77D6ADEULL }, /* XSUM_XXH64_testdata[3417] */\n    { 1709, 0x0000000000000000ULL, 0x1A023DD314C33689ULL }, /* XSUM_XXH64_testdata[3418] */\n    { 1709, 0x000000009E3779B1ULL, 0xF50BEDE2B839A5C7ULL }, /* XSUM_XXH64_testdata[3419] */\n    { 1710, 0x0000000000000000ULL, 0x60156579D9C1682EULL }, /* XSUM_XXH64_testdata[3420] */\n    { 1710, 0x000000009E3779B1ULL, 0xBD1260444B1116DEULL }, /* XSUM_XXH64_testdata[3421] */\n    { 1711, 0x0000000000000000ULL, 0x6C75FE0558CEF727ULL }, /* XSUM_XXH64_testdata[3422] */\n    { 1711, 0x000000009E3779B1ULL, 0xA58E6DF0E53E819BULL }, /* XSUM_XXH64_testdata[3423] */\n    { 1712, 0x0000000000000000ULL, 0x26A14DF448C0EBFBULL }, /* XSUM_XXH64_testdata[3424] */\n    { 1712, 0x000000009E3779B1ULL, 0xC3BF20CA60750F16ULL }, /* XSUM_XXH64_testdata[3425] */\n    { 1713, 0x0000000000000000ULL, 0xA3232BB3E7D13BF6ULL }, /* XSUM_XXH64_testdata[3426] */\n    { 1713, 0x000000009E3779B1ULL, 0xEF838C8BF19BA816ULL }, /* XSUM_XXH64_testdata[3427] */\n    { 1714, 0x0000000000000000ULL, 0x40EC017D27585BDCULL }, /* XSUM_XXH64_testdata[3428] */\n    { 1714, 0x000000009E3779B1ULL, 0xBA76ECA3CA312676ULL }, /* XSUM_XXH64_testdata[3429] */\n    { 1715, 0x0000000000000000ULL, 0xC202F3FA97954C32ULL }, /* XSUM_XXH64_testdata[3430] */\n    { 1715, 0x000000009E3779B1ULL, 0x1DD23BA390FCFD77ULL }, /* XSUM_XXH64_testdata[3431] */\n    { 1716, 0x0000000000000000ULL, 0x2D5BDA0248D035E2ULL }, /* XSUM_XXH64_testdata[3432] */\n    { 1716, 0x000000009E3779B1ULL, 0x4F18A2F451223D88ULL }, /* XSUM_XXH64_testdata[3433] */\n    { 1717, 0x0000000000000000ULL, 0xCC629A50E1667D14ULL }, /* XSUM_XXH64_testdata[3434] */\n    { 1717, 0x000000009E3779B1ULL, 0x5730B39D7267ACF9ULL }, /* XSUM_XXH64_testdata[3435] */\n    { 1718, 0x0000000000000000ULL, 0x5DCD78358AA3F8FAULL }, /* XSUM_XXH64_testdata[3436] */\n    { 1718, 0x000000009E3779B1ULL, 0x4B071F9361A8B85EULL }, /* XSUM_XXH64_testdata[3437] */\n    { 1719, 0x0000000000000000ULL, 0x6E80D2B9D82AEC43ULL }, /* XSUM_XXH64_testdata[3438] */\n    { 1719, 0x000000009E3779B1ULL, 0x9ABD21AF82BC2D22ULL }, /* XSUM_XXH64_testdata[3439] */\n    { 1720, 0x0000000000000000ULL, 0x2E9BC0FD5B1144FAULL }, /* XSUM_XXH64_testdata[3440] */\n    { 1720, 0x000000009E3779B1ULL, 0xAD26D0AADFF06BC0ULL }, /* XSUM_XXH64_testdata[3441] */\n    { 1721, 0x0000000000000000ULL, 0xB20B4A6727108B05ULL }, /* XSUM_XXH64_testdata[3442] */\n    { 1721, 0x000000009E3779B1ULL, 0xB4BF4FF0CCC60866ULL }, /* XSUM_XXH64_testdata[3443] */\n    { 1722, 0x0000000000000000ULL, 0x4240A18611B1D564ULL }, /* XSUM_XXH64_testdata[3444] */\n    { 1722, 0x000000009E3779B1ULL, 0x44C1A81F8C0FB9F3ULL }, /* XSUM_XXH64_testdata[3445] */\n    { 1723, 0x0000000000000000ULL, 0x5A7E212678293D5EULL }, /* XSUM_XXH64_testdata[3446] */\n    { 1723, 0x000000009E3779B1ULL, 0x636EAFEF598703C5ULL }, /* XSUM_XXH64_testdata[3447] */\n    { 1724, 0x0000000000000000ULL, 0x7D24EDD7355947F3ULL }, /* XSUM_XXH64_testdata[3448] */\n    { 1724, 0x000000009E3779B1ULL, 0xEACFEE7DC598917CULL }, /* XSUM_XXH64_testdata[3449] */\n    { 1725, 0x0000000000000000ULL, 0xF701ACF26677B7CDULL }, /* XSUM_XXH64_testdata[3450] */\n    { 1725, 0x000000009E3779B1ULL, 0x18BB5E518BB85FF0ULL }, /* XSUM_XXH64_testdata[3451] */\n    { 1726, 0x0000000000000000ULL, 0x1A46F2A428198B34ULL }, /* XSUM_XXH64_testdata[3452] */\n    { 1726, 0x000000009E3779B1ULL, 0x08FB0151F8801A5AULL }, /* XSUM_XXH64_testdata[3453] */\n    { 1727, 0x0000000000000000ULL, 0x915235E50A57D275ULL }, /* XSUM_XXH64_testdata[3454] */\n    { 1727, 0x000000009E3779B1ULL, 0xEF705C921F5F1D28ULL }, /* XSUM_XXH64_testdata[3455] */\n    { 1728, 0x0000000000000000ULL, 0x56E2C19A75F9E8BFULL }, /* XSUM_XXH64_testdata[3456] */\n    { 1728, 0x000000009E3779B1ULL, 0xC02056594E646313ULL }, /* XSUM_XXH64_testdata[3457] */\n    { 1729, 0x0000000000000000ULL, 0x3F8E58DFE327BD04ULL }, /* XSUM_XXH64_testdata[3458] */\n    { 1729, 0x000000009E3779B1ULL, 0x590DD51947592217ULL }, /* XSUM_XXH64_testdata[3459] */\n    { 1730, 0x0000000000000000ULL, 0xAD89489011AE7DFBULL }, /* XSUM_XXH64_testdata[3460] */\n    { 1730, 0x000000009E3779B1ULL, 0x640EB7CE43ABA139ULL }, /* XSUM_XXH64_testdata[3461] */\n    { 1731, 0x0000000000000000ULL, 0x70D754BAB814C9A3ULL }, /* XSUM_XXH64_testdata[3462] */\n    { 1731, 0x000000009E3779B1ULL, 0xDD95E3F13F98049CULL }, /* XSUM_XXH64_testdata[3463] */\n    { 1732, 0x0000000000000000ULL, 0xD80046DF363DC0FAULL }, /* XSUM_XXH64_testdata[3464] */\n    { 1732, 0x000000009E3779B1ULL, 0xB0E778FF4B6E1568ULL }, /* XSUM_XXH64_testdata[3465] */\n    { 1733, 0x0000000000000000ULL, 0xA1E4A4E0D47FFFA7ULL }, /* XSUM_XXH64_testdata[3466] */\n    { 1733, 0x000000009E3779B1ULL, 0x6698FD93B0670C93ULL }, /* XSUM_XXH64_testdata[3467] */\n    { 1734, 0x0000000000000000ULL, 0xB6DD5980B566FC2FULL }, /* XSUM_XXH64_testdata[3468] */\n    { 1734, 0x000000009E3779B1ULL, 0x9DF21FF82ECAEF8BULL }, /* XSUM_XXH64_testdata[3469] */\n    { 1735, 0x0000000000000000ULL, 0x9CCA793DAEC20CD8ULL }, /* XSUM_XXH64_testdata[3470] */\n    { 1735, 0x000000009E3779B1ULL, 0x82EE3D976B3AF857ULL }, /* XSUM_XXH64_testdata[3471] */\n    { 1736, 0x0000000000000000ULL, 0x9993E1397960F0DCULL }, /* XSUM_XXH64_testdata[3472] */\n    { 1736, 0x000000009E3779B1ULL, 0xABB404039B73356CULL }, /* XSUM_XXH64_testdata[3473] */\n    { 1737, 0x0000000000000000ULL, 0x35365EFD5C4471E2ULL }, /* XSUM_XXH64_testdata[3474] */\n    { 1737, 0x000000009E3779B1ULL, 0x3257BDA08CC6ADAFULL }, /* XSUM_XXH64_testdata[3475] */\n    { 1738, 0x0000000000000000ULL, 0x25F45BFE56B5CA9FULL }, /* XSUM_XXH64_testdata[3476] */\n    { 1738, 0x000000009E3779B1ULL, 0x38ECE062CDC477A9ULL }, /* XSUM_XXH64_testdata[3477] */\n    { 1739, 0x0000000000000000ULL, 0x8A38339E51186E6CULL }, /* XSUM_XXH64_testdata[3478] */\n    { 1739, 0x000000009E3779B1ULL, 0xBD31F2E8AD9CD7A1ULL }, /* XSUM_XXH64_testdata[3479] */\n    { 1740, 0x0000000000000000ULL, 0x12EF7936960AA308ULL }, /* XSUM_XXH64_testdata[3480] */\n    { 1740, 0x000000009E3779B1ULL, 0x520B9AE652F337FCULL }, /* XSUM_XXH64_testdata[3481] */\n    { 1741, 0x0000000000000000ULL, 0x6920C0FE251C374AULL }, /* XSUM_XXH64_testdata[3482] */\n    { 1741, 0x000000009E3779B1ULL, 0x21654D8CF6D1A26DULL }, /* XSUM_XXH64_testdata[3483] */\n    { 1742, 0x0000000000000000ULL, 0xB42CB16FC4BDAD49ULL }, /* XSUM_XXH64_testdata[3484] */\n    { 1742, 0x000000009E3779B1ULL, 0x67E081A036D992D4ULL }, /* XSUM_XXH64_testdata[3485] */\n    { 1743, 0x0000000000000000ULL, 0x0B5CD16F4CD4C660ULL }, /* XSUM_XXH64_testdata[3486] */\n    { 1743, 0x000000009E3779B1ULL, 0x6E0E44C0AD41A008ULL }, /* XSUM_XXH64_testdata[3487] */\n    { 1744, 0x0000000000000000ULL, 0x96E48BC1BBD85CF2ULL }, /* XSUM_XXH64_testdata[3488] */\n    { 1744, 0x000000009E3779B1ULL, 0xC3F71B97D808D9C7ULL }, /* XSUM_XXH64_testdata[3489] */\n    { 1745, 0x0000000000000000ULL, 0xE54F350E6AA7BCE9ULL }, /* XSUM_XXH64_testdata[3490] */\n    { 1745, 0x000000009E3779B1ULL, 0x9AEFC9FC7BF6B0B9ULL }, /* XSUM_XXH64_testdata[3491] */\n    { 1746, 0x0000000000000000ULL, 0x2971C6B8B26DCB67ULL }, /* XSUM_XXH64_testdata[3492] */\n    { 1746, 0x000000009E3779B1ULL, 0xFD0BDBD97F50A52CULL }, /* XSUM_XXH64_testdata[3493] */\n    { 1747, 0x0000000000000000ULL, 0x4FA4323493ACF24EULL }, /* XSUM_XXH64_testdata[3494] */\n    { 1747, 0x000000009E3779B1ULL, 0x261F1370DD014DBDULL }, /* XSUM_XXH64_testdata[3495] */\n    { 1748, 0x0000000000000000ULL, 0xDBA05A1AF9C1851AULL }, /* XSUM_XXH64_testdata[3496] */\n    { 1748, 0x000000009E3779B1ULL, 0x3E12342B2B1A44F2ULL }, /* XSUM_XXH64_testdata[3497] */\n    { 1749, 0x0000000000000000ULL, 0x0B9E82AC9F549857ULL }, /* XSUM_XXH64_testdata[3498] */\n    { 1749, 0x000000009E3779B1ULL, 0x57170AED497AA965ULL }, /* XSUM_XXH64_testdata[3499] */\n    { 1750, 0x0000000000000000ULL, 0xFC04C903251ED260ULL }, /* XSUM_XXH64_testdata[3500] */\n    { 1750, 0x000000009E3779B1ULL, 0x24DB576773E75308ULL }, /* XSUM_XXH64_testdata[3501] */\n    { 1751, 0x0000000000000000ULL, 0x50FF5014BD62F3DCULL }, /* XSUM_XXH64_testdata[3502] */\n    { 1751, 0x000000009E3779B1ULL, 0x4E4A900C0F31FE5CULL }, /* XSUM_XXH64_testdata[3503] */\n    { 1752, 0x0000000000000000ULL, 0x04FBB508FE01A73FULL }, /* XSUM_XXH64_testdata[3504] */\n    { 1752, 0x000000009E3779B1ULL, 0x73C9C4B50A322B1EULL }, /* XSUM_XXH64_testdata[3505] */\n    { 1753, 0x0000000000000000ULL, 0x8062F35168DFB18BULL }, /* XSUM_XXH64_testdata[3506] */\n    { 1753, 0x000000009E3779B1ULL, 0x70B9D085B260C9ADULL }, /* XSUM_XXH64_testdata[3507] */\n    { 1754, 0x0000000000000000ULL, 0x06E0EB228BB7ACBFULL }, /* XSUM_XXH64_testdata[3508] */\n    { 1754, 0x000000009E3779B1ULL, 0x9518BB6476D67689ULL }, /* XSUM_XXH64_testdata[3509] */\n    { 1755, 0x0000000000000000ULL, 0x37B87425B1FAA058ULL }, /* XSUM_XXH64_testdata[3510] */\n    { 1755, 0x000000009E3779B1ULL, 0xB1955FAE0B147711ULL }, /* XSUM_XXH64_testdata[3511] */\n    { 1756, 0x0000000000000000ULL, 0xF65468407B4553E1ULL }, /* XSUM_XXH64_testdata[3512] */\n    { 1756, 0x000000009E3779B1ULL, 0x00F053BF395B2106ULL }, /* XSUM_XXH64_testdata[3513] */\n    { 1757, 0x0000000000000000ULL, 0xFFB10BB605C9110EULL }, /* XSUM_XXH64_testdata[3514] */\n    { 1757, 0x000000009E3779B1ULL, 0x1640DD5715A690F4ULL }, /* XSUM_XXH64_testdata[3515] */\n    { 1758, 0x0000000000000000ULL, 0x5DEE77F59466D50BULL }, /* XSUM_XXH64_testdata[3516] */\n    { 1758, 0x000000009E3779B1ULL, 0x8AA5DE5E6985EB84ULL }, /* XSUM_XXH64_testdata[3517] */\n    { 1759, 0x0000000000000000ULL, 0x6DF102C54A4FAB83ULL }, /* XSUM_XXH64_testdata[3518] */\n    { 1759, 0x000000009E3779B1ULL, 0x08FE7F7878532F68ULL }, /* XSUM_XXH64_testdata[3519] */\n    { 1760, 0x0000000000000000ULL, 0xEF2CF03EDE2830EAULL }, /* XSUM_XXH64_testdata[3520] */\n    { 1760, 0x000000009E3779B1ULL, 0x754AC7CE9010BD9CULL }, /* XSUM_XXH64_testdata[3521] */\n    { 1761, 0x0000000000000000ULL, 0xCB7D1DFB7B2DB3BFULL }, /* XSUM_XXH64_testdata[3522] */\n    { 1761, 0x000000009E3779B1ULL, 0x4247787E1084A707ULL }, /* XSUM_XXH64_testdata[3523] */\n    { 1762, 0x0000000000000000ULL, 0x9D8A3065B8D7CBA0ULL }, /* XSUM_XXH64_testdata[3524] */\n    { 1762, 0x000000009E3779B1ULL, 0x9B5DDCAE88071197ULL }, /* XSUM_XXH64_testdata[3525] */\n    { 1763, 0x0000000000000000ULL, 0x193834739464B2BEULL }, /* XSUM_XXH64_testdata[3526] */\n    { 1763, 0x000000009E3779B1ULL, 0x1C1D93E5112B6E9FULL }, /* XSUM_XXH64_testdata[3527] */\n    { 1764, 0x0000000000000000ULL, 0x7494E37B90846CC1ULL }, /* XSUM_XXH64_testdata[3528] */\n    { 1764, 0x000000009E3779B1ULL, 0x4F0FD3084E953A93ULL }, /* XSUM_XXH64_testdata[3529] */\n    { 1765, 0x0000000000000000ULL, 0xC56C38A579B304A3ULL }, /* XSUM_XXH64_testdata[3530] */\n    { 1765, 0x000000009E3779B1ULL, 0x48742B364F37C808ULL }, /* XSUM_XXH64_testdata[3531] */\n    { 1766, 0x0000000000000000ULL, 0x153DB0985BE55DBDULL }, /* XSUM_XXH64_testdata[3532] */\n    { 1766, 0x000000009E3779B1ULL, 0x02993D14529623B8ULL }, /* XSUM_XXH64_testdata[3533] */\n    { 1767, 0x0000000000000000ULL, 0x493FC92A4186CB01ULL }, /* XSUM_XXH64_testdata[3534] */\n    { 1767, 0x000000009E3779B1ULL, 0xF9C334FFA2FB7CECULL }, /* XSUM_XXH64_testdata[3535] */\n    { 1768, 0x0000000000000000ULL, 0x502140C5FC4E24ECULL }, /* XSUM_XXH64_testdata[3536] */\n    { 1768, 0x000000009E3779B1ULL, 0xF86DE152E0F26681ULL }, /* XSUM_XXH64_testdata[3537] */\n    { 1769, 0x0000000000000000ULL, 0x84A97F4662C50091ULL }, /* XSUM_XXH64_testdata[3538] */\n    { 1769, 0x000000009E3779B1ULL, 0x77D9E20B45659C55ULL }, /* XSUM_XXH64_testdata[3539] */\n    { 1770, 0x0000000000000000ULL, 0xD00AC20E8B16543FULL }, /* XSUM_XXH64_testdata[3540] */\n    { 1770, 0x000000009E3779B1ULL, 0x5FD0E9B86F32AF5AULL }, /* XSUM_XXH64_testdata[3541] */\n    { 1771, 0x0000000000000000ULL, 0xA7F827B58C969A73ULL }, /* XSUM_XXH64_testdata[3542] */\n    { 1771, 0x000000009E3779B1ULL, 0xA2A0F0E3BBF1149BULL }, /* XSUM_XXH64_testdata[3543] */\n    { 1772, 0x0000000000000000ULL, 0x9364429C55E2B620ULL }, /* XSUM_XXH64_testdata[3544] */\n    { 1772, 0x000000009E3779B1ULL, 0xE2D9CF031122FEE6ULL }, /* XSUM_XXH64_testdata[3545] */\n    { 1773, 0x0000000000000000ULL, 0x4A75DEDCB338134FULL }, /* XSUM_XXH64_testdata[3546] */\n    { 1773, 0x000000009E3779B1ULL, 0xABC8F48D7763BB2EULL }, /* XSUM_XXH64_testdata[3547] */\n    { 1774, 0x0000000000000000ULL, 0xB2CFCD53A763AE9DULL }, /* XSUM_XXH64_testdata[3548] */\n    { 1774, 0x000000009E3779B1ULL, 0x3ADD0CEE6C14D479ULL }, /* XSUM_XXH64_testdata[3549] */\n    { 1775, 0x0000000000000000ULL, 0x6EC4D430924F55D4ULL }, /* XSUM_XXH64_testdata[3550] */\n    { 1775, 0x000000009E3779B1ULL, 0xB90CB8273928BE7AULL }, /* XSUM_XXH64_testdata[3551] */\n    { 1776, 0x0000000000000000ULL, 0x2BD368A7FC564A38ULL }, /* XSUM_XXH64_testdata[3552] */\n    { 1776, 0x000000009E3779B1ULL, 0x23E7EF417A8811CAULL }, /* XSUM_XXH64_testdata[3553] */\n    { 1777, 0x0000000000000000ULL, 0x24CC01996464C9EFULL }, /* XSUM_XXH64_testdata[3554] */\n    { 1777, 0x000000009E3779B1ULL, 0xBFD73DB7C55CB28DULL }, /* XSUM_XXH64_testdata[3555] */\n    { 1778, 0x0000000000000000ULL, 0xEB932D3915FE55F9ULL }, /* XSUM_XXH64_testdata[3556] */\n    { 1778, 0x000000009E3779B1ULL, 0xEFC0BA40F2927379ULL }, /* XSUM_XXH64_testdata[3557] */\n    { 1779, 0x0000000000000000ULL, 0xDB3C509D1A756424ULL }, /* XSUM_XXH64_testdata[3558] */\n    { 1779, 0x000000009E3779B1ULL, 0x082688D72DD818EBULL }, /* XSUM_XXH64_testdata[3559] */\n    { 1780, 0x0000000000000000ULL, 0x56F36053787856BEULL }, /* XSUM_XXH64_testdata[3560] */\n    { 1780, 0x000000009E3779B1ULL, 0x63DCA8789B8F6C87ULL }, /* XSUM_XXH64_testdata[3561] */\n    { 1781, 0x0000000000000000ULL, 0xAA4E0A7E6030B219ULL }, /* XSUM_XXH64_testdata[3562] */\n    { 1781, 0x000000009E3779B1ULL, 0xD60D910581742446ULL }, /* XSUM_XXH64_testdata[3563] */\n    { 1782, 0x0000000000000000ULL, 0x3105DE21BB957E66ULL }, /* XSUM_XXH64_testdata[3564] */\n    { 1782, 0x000000009E3779B1ULL, 0x9E1C3E19EE168BE2ULL }, /* XSUM_XXH64_testdata[3565] */\n    { 1783, 0x0000000000000000ULL, 0xB283E1DC6A55B445ULL }, /* XSUM_XXH64_testdata[3566] */\n    { 1783, 0x000000009E3779B1ULL, 0x04F503CBEA9F2228ULL }, /* XSUM_XXH64_testdata[3567] */\n    { 1784, 0x0000000000000000ULL, 0xB4D8AFD6504D88BCULL }, /* XSUM_XXH64_testdata[3568] */\n    { 1784, 0x000000009E3779B1ULL, 0x18F18EB1F72820E0ULL }, /* XSUM_XXH64_testdata[3569] */\n    { 1785, 0x0000000000000000ULL, 0x9D77A31559648691ULL }, /* XSUM_XXH64_testdata[3570] */\n    { 1785, 0x000000009E3779B1ULL, 0xB583BDCB829E1064ULL }, /* XSUM_XXH64_testdata[3571] */\n    { 1786, 0x0000000000000000ULL, 0xFCFC3C66D9B1FB0BULL }, /* XSUM_XXH64_testdata[3572] */\n    { 1786, 0x000000009E3779B1ULL, 0xB1DD390373C80DCDULL }, /* XSUM_XXH64_testdata[3573] */\n    { 1787, 0x0000000000000000ULL, 0xE5EBB1B705841BF8ULL }, /* XSUM_XXH64_testdata[3574] */\n    { 1787, 0x000000009E3779B1ULL, 0x0C7566581024DAF4ULL }, /* XSUM_XXH64_testdata[3575] */\n    { 1788, 0x0000000000000000ULL, 0xF286AA4EDF5166A3ULL }, /* XSUM_XXH64_testdata[3576] */\n    { 1788, 0x000000009E3779B1ULL, 0xDC7964276E9FD51AULL }, /* XSUM_XXH64_testdata[3577] */\n    { 1789, 0x0000000000000000ULL, 0x927D938D54E2D0BAULL }, /* XSUM_XXH64_testdata[3578] */\n    { 1789, 0x000000009E3779B1ULL, 0x299905EE59AD6AD7ULL }, /* XSUM_XXH64_testdata[3579] */\n    { 1790, 0x0000000000000000ULL, 0xA240FF78B36282EBULL }, /* XSUM_XXH64_testdata[3580] */\n    { 1790, 0x000000009E3779B1ULL, 0x1912DED7D855378BULL }, /* XSUM_XXH64_testdata[3581] */\n    { 1791, 0x0000000000000000ULL, 0xBB569C0D13C72242ULL }, /* XSUM_XXH64_testdata[3582] */\n    { 1791, 0x000000009E3779B1ULL, 0xF926FD9CE3306EAEULL }, /* XSUM_XXH64_testdata[3583] */\n    { 1792, 0x0000000000000000ULL, 0x3594A8E12E7A2590ULL }, /* XSUM_XXH64_testdata[3584] */\n    { 1792, 0x000000009E3779B1ULL, 0xFE7F8AC76E5222C7ULL }, /* XSUM_XXH64_testdata[3585] */\n    { 1793, 0x0000000000000000ULL, 0xDA50DDCB0825B3A6ULL }, /* XSUM_XXH64_testdata[3586] */\n    { 1793, 0x000000009E3779B1ULL, 0xA1AB5CD29A3E14A9ULL }, /* XSUM_XXH64_testdata[3587] */\n    { 1794, 0x0000000000000000ULL, 0x3F624E16FA68231FULL }, /* XSUM_XXH64_testdata[3588] */\n    { 1794, 0x000000009E3779B1ULL, 0x7A0A78827045F625ULL }, /* XSUM_XXH64_testdata[3589] */\n    { 1795, 0x0000000000000000ULL, 0x60305DA92FE860C1ULL }, /* XSUM_XXH64_testdata[3590] */\n    { 1795, 0x000000009E3779B1ULL, 0xB21F264C0BF1D7D3ULL }, /* XSUM_XXH64_testdata[3591] */\n    { 1796, 0x0000000000000000ULL, 0x826CF8B3BA1621DEULL }, /* XSUM_XXH64_testdata[3592] */\n    { 1796, 0x000000009E3779B1ULL, 0xC2C476B658F20AF5ULL }, /* XSUM_XXH64_testdata[3593] */\n    { 1797, 0x0000000000000000ULL, 0x72028C29B2FF8EF0ULL }, /* XSUM_XXH64_testdata[3594] */\n    { 1797, 0x000000009E3779B1ULL, 0x0FA8FC5021DA98E1ULL }, /* XSUM_XXH64_testdata[3595] */\n    { 1798, 0x0000000000000000ULL, 0x889AD4971681649AULL }, /* XSUM_XXH64_testdata[3596] */\n    { 1798, 0x000000009E3779B1ULL, 0x01072B1F6245DB87ULL }, /* XSUM_XXH64_testdata[3597] */\n    { 1799, 0x0000000000000000ULL, 0xE51F50DAC98D2CBBULL }, /* XSUM_XXH64_testdata[3598] */\n    { 1799, 0x000000009E3779B1ULL, 0xF6999B80038E33D4ULL }, /* XSUM_XXH64_testdata[3599] */\n    { 1800, 0x0000000000000000ULL, 0x075F283A158F02A9ULL }, /* XSUM_XXH64_testdata[3600] */\n    { 1800, 0x000000009E3779B1ULL, 0xD80B80BACD6F6F53ULL }, /* XSUM_XXH64_testdata[3601] */\n    { 1801, 0x0000000000000000ULL, 0xA993ACFF34C9D4CFULL }, /* XSUM_XXH64_testdata[3602] */\n    { 1801, 0x000000009E3779B1ULL, 0xEB84D07671DABBA8ULL }, /* XSUM_XXH64_testdata[3603] */\n    { 1802, 0x0000000000000000ULL, 0x9C37159086DA00E1ULL }, /* XSUM_XXH64_testdata[3604] */\n    { 1802, 0x000000009E3779B1ULL, 0xFCC389D22B416502ULL }, /* XSUM_XXH64_testdata[3605] */\n    { 1803, 0x0000000000000000ULL, 0x73219CD3384CCCC6ULL }, /* XSUM_XXH64_testdata[3606] */\n    { 1803, 0x000000009E3779B1ULL, 0x8B5B8A7C3D14378EULL }, /* XSUM_XXH64_testdata[3607] */\n    { 1804, 0x0000000000000000ULL, 0xF38DD0C046F408ADULL }, /* XSUM_XXH64_testdata[3608] */\n    { 1804, 0x000000009E3779B1ULL, 0x4A8F1C4377DC0166ULL }, /* XSUM_XXH64_testdata[3609] */\n    { 1805, 0x0000000000000000ULL, 0x8E791C1AD85881B5ULL }, /* XSUM_XXH64_testdata[3610] */\n    { 1805, 0x000000009E3779B1ULL, 0x3F9DC16100D4FEB1ULL }, /* XSUM_XXH64_testdata[3611] */\n    { 1806, 0x0000000000000000ULL, 0x2949624FB4CF675BULL }, /* XSUM_XXH64_testdata[3612] */\n    { 1806, 0x000000009E3779B1ULL, 0xDC5D223E234BCB17ULL }, /* XSUM_XXH64_testdata[3613] */\n    { 1807, 0x0000000000000000ULL, 0xC78DDFCD803DDFB3ULL }, /* XSUM_XXH64_testdata[3614] */\n    { 1807, 0x000000009E3779B1ULL, 0x66C95C37EA43F8E9ULL }, /* XSUM_XXH64_testdata[3615] */\n    { 1808, 0x0000000000000000ULL, 0x514782D24DD9D675ULL }, /* XSUM_XXH64_testdata[3616] */\n    { 1808, 0x000000009E3779B1ULL, 0x8AE9E4457A74112AULL }, /* XSUM_XXH64_testdata[3617] */\n    { 1809, 0x0000000000000000ULL, 0x8E0056C99BA79308ULL }, /* XSUM_XXH64_testdata[3618] */\n    { 1809, 0x000000009E3779B1ULL, 0x90AA3F44B95C0790ULL }, /* XSUM_XXH64_testdata[3619] */\n    { 1810, 0x0000000000000000ULL, 0x8CA329CC8E73179EULL }, /* XSUM_XXH64_testdata[3620] */\n    { 1810, 0x000000009E3779B1ULL, 0x20FBEB6D64A2A9D7ULL }, /* XSUM_XXH64_testdata[3621] */\n    { 1811, 0x0000000000000000ULL, 0x84694CD3D1CE1919ULL }, /* XSUM_XXH64_testdata[3622] */\n    { 1811, 0x000000009E3779B1ULL, 0xDD8D80CF51F72CFAULL }, /* XSUM_XXH64_testdata[3623] */\n    { 1812, 0x0000000000000000ULL, 0x785A195F3A0B95ACULL }, /* XSUM_XXH64_testdata[3624] */\n    { 1812, 0x000000009E3779B1ULL, 0x35C8FFAD7F518909ULL }, /* XSUM_XXH64_testdata[3625] */\n    { 1813, 0x0000000000000000ULL, 0x7AF977910D4CFF53ULL }, /* XSUM_XXH64_testdata[3626] */\n    { 1813, 0x000000009E3779B1ULL, 0x02588030BA682EABULL }, /* XSUM_XXH64_testdata[3627] */\n    { 1814, 0x0000000000000000ULL, 0x767DE7936A4FE947ULL }, /* XSUM_XXH64_testdata[3628] */\n    { 1814, 0x000000009E3779B1ULL, 0x8AB1FD1128031449ULL }, /* XSUM_XXH64_testdata[3629] */\n    { 1815, 0x0000000000000000ULL, 0xE8749E9ADB914ABEULL }, /* XSUM_XXH64_testdata[3630] */\n    { 1815, 0x000000009E3779B1ULL, 0x03D39D7F57862FE6ULL }, /* XSUM_XXH64_testdata[3631] */\n    { 1816, 0x0000000000000000ULL, 0x641C019CE87F8B88ULL }, /* XSUM_XXH64_testdata[3632] */\n    { 1816, 0x000000009E3779B1ULL, 0x46E2D2FA5D3DF9F6ULL }, /* XSUM_XXH64_testdata[3633] */\n    { 1817, 0x0000000000000000ULL, 0x1B7679A6B712C9A4ULL }, /* XSUM_XXH64_testdata[3634] */\n    { 1817, 0x000000009E3779B1ULL, 0xEFC59F59C75060AAULL }, /* XSUM_XXH64_testdata[3635] */\n    { 1818, 0x0000000000000000ULL, 0x8E7AD231C665EE44ULL }, /* XSUM_XXH64_testdata[3636] */\n    { 1818, 0x000000009E3779B1ULL, 0x489A400AAA27FB83ULL }, /* XSUM_XXH64_testdata[3637] */\n    { 1819, 0x0000000000000000ULL, 0x6C5631CF03ED9F59ULL }, /* XSUM_XXH64_testdata[3638] */\n    { 1819, 0x000000009E3779B1ULL, 0x6751FB633FA15C59ULL }, /* XSUM_XXH64_testdata[3639] */\n    { 1820, 0x0000000000000000ULL, 0x5DA956031BF8C94AULL }, /* XSUM_XXH64_testdata[3640] */\n    { 1820, 0x000000009E3779B1ULL, 0x77D9BF48CD0BAA03ULL }, /* XSUM_XXH64_testdata[3641] */\n    { 1821, 0x0000000000000000ULL, 0xB0A0E37C71B862AAULL }, /* XSUM_XXH64_testdata[3642] */\n    { 1821, 0x000000009E3779B1ULL, 0x24687C4E7EE4CC59ULL }, /* XSUM_XXH64_testdata[3643] */\n    { 1822, 0x0000000000000000ULL, 0xE42477D88E0F5AF7ULL }, /* XSUM_XXH64_testdata[3644] */\n    { 1822, 0x000000009E3779B1ULL, 0x55EA10EFFA49BD8FULL }, /* XSUM_XXH64_testdata[3645] */\n    { 1823, 0x0000000000000000ULL, 0xA13F57925BAC9F89ULL }, /* XSUM_XXH64_testdata[3646] */\n    { 1823, 0x000000009E3779B1ULL, 0xA4D92E0E33FDA69EULL }, /* XSUM_XXH64_testdata[3647] */\n    { 1824, 0x0000000000000000ULL, 0x8FA8E11212591F35ULL }, /* XSUM_XXH64_testdata[3648] */\n    { 1824, 0x000000009E3779B1ULL, 0xB0F6C86A9EC4D627ULL }, /* XSUM_XXH64_testdata[3649] */\n    { 1825, 0x0000000000000000ULL, 0xD0450465C595F872ULL }, /* XSUM_XXH64_testdata[3650] */\n    { 1825, 0x000000009E3779B1ULL, 0xAA7E7064DF30CBE7ULL }, /* XSUM_XXH64_testdata[3651] */\n    { 1826, 0x0000000000000000ULL, 0x97963B0EA0A1F5D0ULL }, /* XSUM_XXH64_testdata[3652] */\n    { 1826, 0x000000009E3779B1ULL, 0x5A01CBA7BEF40882ULL }, /* XSUM_XXH64_testdata[3653] */\n    { 1827, 0x0000000000000000ULL, 0xB40DBEEBBCB8D8ABULL }, /* XSUM_XXH64_testdata[3654] */\n    { 1827, 0x000000009E3779B1ULL, 0x9AFBAD78FD7A1C7DULL }, /* XSUM_XXH64_testdata[3655] */\n    { 1828, 0x0000000000000000ULL, 0x7053541B0C1AB395ULL }, /* XSUM_XXH64_testdata[3656] */\n    { 1828, 0x000000009E3779B1ULL, 0x581F636679AF086BULL }, /* XSUM_XXH64_testdata[3657] */\n    { 1829, 0x0000000000000000ULL, 0x7EC791BA03FCE492ULL }, /* XSUM_XXH64_testdata[3658] */\n    { 1829, 0x000000009E3779B1ULL, 0x60B0DDDA8A70DF86ULL }, /* XSUM_XXH64_testdata[3659] */\n    { 1830, 0x0000000000000000ULL, 0x67A2D183F5D03E2FULL }, /* XSUM_XXH64_testdata[3660] */\n    { 1830, 0x000000009E3779B1ULL, 0xD528B12BD0B8D672ULL }, /* XSUM_XXH64_testdata[3661] */\n    { 1831, 0x0000000000000000ULL, 0x67095D4F93F6E553ULL }, /* XSUM_XXH64_testdata[3662] */\n    { 1831, 0x000000009E3779B1ULL, 0x304B433FA638E8BFULL }, /* XSUM_XXH64_testdata[3663] */\n    { 1832, 0x0000000000000000ULL, 0x4C24C4C869106A95ULL }, /* XSUM_XXH64_testdata[3664] */\n    { 1832, 0x000000009E3779B1ULL, 0xA180123F5C90E7A6ULL }, /* XSUM_XXH64_testdata[3665] */\n    { 1833, 0x0000000000000000ULL, 0x21CE8B9EF29D0F98ULL }, /* XSUM_XXH64_testdata[3666] */\n    { 1833, 0x000000009E3779B1ULL, 0xD7DE264A3846C875ULL }, /* XSUM_XXH64_testdata[3667] */\n    { 1834, 0x0000000000000000ULL, 0xC50213C47C9958FBULL }, /* XSUM_XXH64_testdata[3668] */\n    { 1834, 0x000000009E3779B1ULL, 0x42F6D146EFCE1583ULL }, /* XSUM_XXH64_testdata[3669] */\n    { 1835, 0x0000000000000000ULL, 0x7E0E1533A208D7ECULL }, /* XSUM_XXH64_testdata[3670] */\n    { 1835, 0x000000009E3779B1ULL, 0x0A07445114390317ULL }, /* XSUM_XXH64_testdata[3671] */\n    { 1836, 0x0000000000000000ULL, 0xFBDD009852DE3524ULL }, /* XSUM_XXH64_testdata[3672] */\n    { 1836, 0x000000009E3779B1ULL, 0x618838F56C9E5AB5ULL }, /* XSUM_XXH64_testdata[3673] */\n    { 1837, 0x0000000000000000ULL, 0x676676CA10702072ULL }, /* XSUM_XXH64_testdata[3674] */\n    { 1837, 0x000000009E3779B1ULL, 0xF179132BDD4BDAABULL }, /* XSUM_XXH64_testdata[3675] */\n    { 1838, 0x0000000000000000ULL, 0xA4CBF37225582A90ULL }, /* XSUM_XXH64_testdata[3676] */\n    { 1838, 0x000000009E3779B1ULL, 0x15BE563CC879BA7CULL }, /* XSUM_XXH64_testdata[3677] */\n    { 1839, 0x0000000000000000ULL, 0x2F3ADF19315F7B23ULL }, /* XSUM_XXH64_testdata[3678] */\n    { 1839, 0x000000009E3779B1ULL, 0x54405A06065FFD92ULL }, /* XSUM_XXH64_testdata[3679] */\n    { 1840, 0x0000000000000000ULL, 0x83C859C0BACD65C2ULL }, /* XSUM_XXH64_testdata[3680] */\n    { 1840, 0x000000009E3779B1ULL, 0x93AEBE7C2F426C81ULL }, /* XSUM_XXH64_testdata[3681] */\n    { 1841, 0x0000000000000000ULL, 0x2E2E0354DB51681EULL }, /* XSUM_XXH64_testdata[3682] */\n    { 1841, 0x000000009E3779B1ULL, 0x53A91CDED50F56E5ULL }, /* XSUM_XXH64_testdata[3683] */\n    { 1842, 0x0000000000000000ULL, 0x8DE944AC4FA75183ULL }, /* XSUM_XXH64_testdata[3684] */\n    { 1842, 0x000000009E3779B1ULL, 0x39C8893E34B9E6EFULL }, /* XSUM_XXH64_testdata[3685] */\n    { 1843, 0x0000000000000000ULL, 0x0A23FBE54BCA92FAULL }, /* XSUM_XXH64_testdata[3686] */\n    { 1843, 0x000000009E3779B1ULL, 0x95DDEB83526CB960ULL }, /* XSUM_XXH64_testdata[3687] */\n    { 1844, 0x0000000000000000ULL, 0xC8A92677F1B07BC6ULL }, /* XSUM_XXH64_testdata[3688] */\n    { 1844, 0x000000009E3779B1ULL, 0x640867D93ABFC476ULL }, /* XSUM_XXH64_testdata[3689] */\n    { 1845, 0x0000000000000000ULL, 0xA648255EB632C796ULL }, /* XSUM_XXH64_testdata[3690] */\n    { 1845, 0x000000009E3779B1ULL, 0x9F6CDE95BFDDCBB1ULL }, /* XSUM_XXH64_testdata[3691] */\n    { 1846, 0x0000000000000000ULL, 0x30E382C8BCE8B80EULL }, /* XSUM_XXH64_testdata[3692] */\n    { 1846, 0x000000009E3779B1ULL, 0xB5E55AD6BDF29F97ULL }, /* XSUM_XXH64_testdata[3693] */\n    { 1847, 0x0000000000000000ULL, 0x8FD8106336630653ULL }, /* XSUM_XXH64_testdata[3694] */\n    { 1847, 0x000000009E3779B1ULL, 0x0629F6712228ED3DULL }, /* XSUM_XXH64_testdata[3695] */\n    { 1848, 0x0000000000000000ULL, 0x79B1CD7DAA94A618ULL }, /* XSUM_XXH64_testdata[3696] */\n    { 1848, 0x000000009E3779B1ULL, 0x4114CA65265D35A8ULL }, /* XSUM_XXH64_testdata[3697] */\n    { 1849, 0x0000000000000000ULL, 0x3AB01D69EB0EC09BULL }, /* XSUM_XXH64_testdata[3698] */\n    { 1849, 0x000000009E3779B1ULL, 0x67ED35FD7918B8D9ULL }, /* XSUM_XXH64_testdata[3699] */\n    { 1850, 0x0000000000000000ULL, 0xF62C3364D92DB928ULL }, /* XSUM_XXH64_testdata[3700] */\n    { 1850, 0x000000009E3779B1ULL, 0x77B5F04363801A45ULL }, /* XSUM_XXH64_testdata[3701] */\n    { 1851, 0x0000000000000000ULL, 0x098DD4D5B1ACF93CULL }, /* XSUM_XXH64_testdata[3702] */\n    { 1851, 0x000000009E3779B1ULL, 0x60E13D42467485CEULL }, /* XSUM_XXH64_testdata[3703] */\n    { 1852, 0x0000000000000000ULL, 0x00A4CC77EB00DD8CULL }, /* XSUM_XXH64_testdata[3704] */\n    { 1852, 0x000000009E3779B1ULL, 0x264CB5B9B244E326ULL }, /* XSUM_XXH64_testdata[3705] */\n    { 1853, 0x0000000000000000ULL, 0x368BD39B027D2F55ULL }, /* XSUM_XXH64_testdata[3706] */\n    { 1853, 0x000000009E3779B1ULL, 0x7D5B5C6BB7248846ULL }, /* XSUM_XXH64_testdata[3707] */\n    { 1854, 0x0000000000000000ULL, 0xC21D8794C543BBD3ULL }, /* XSUM_XXH64_testdata[3708] */\n    { 1854, 0x000000009E3779B1ULL, 0x6C9849FC2608223CULL }, /* XSUM_XXH64_testdata[3709] */\n    { 1855, 0x0000000000000000ULL, 0xB6540CCCF144B408ULL }, /* XSUM_XXH64_testdata[3710] */\n    { 1855, 0x000000009E3779B1ULL, 0xB3FF3C8C9BB34DB2ULL }, /* XSUM_XXH64_testdata[3711] */\n    { 1856, 0x0000000000000000ULL, 0x1FD57CC3A28B8B2FULL }, /* XSUM_XXH64_testdata[3712] */\n    { 1856, 0x000000009E3779B1ULL, 0x0AC9224B7A7DE1A3ULL }, /* XSUM_XXH64_testdata[3713] */\n    { 1857, 0x0000000000000000ULL, 0x8E5BEF30C4CCCE13ULL }, /* XSUM_XXH64_testdata[3714] */\n    { 1857, 0x000000009E3779B1ULL, 0x0DC284EF18A34E94ULL }, /* XSUM_XXH64_testdata[3715] */\n    { 1858, 0x0000000000000000ULL, 0xD183A589101F350DULL }, /* XSUM_XXH64_testdata[3716] */\n    { 1858, 0x000000009E3779B1ULL, 0x6974B50A5ED9C55EULL }, /* XSUM_XXH64_testdata[3717] */\n    { 1859, 0x0000000000000000ULL, 0x8A760EA06A32DCA4ULL }, /* XSUM_XXH64_testdata[3718] */\n    { 1859, 0x000000009E3779B1ULL, 0x279374754D9ACB15ULL }, /* XSUM_XXH64_testdata[3719] */\n    { 1860, 0x0000000000000000ULL, 0x67A71611B4E28F90ULL }, /* XSUM_XXH64_testdata[3720] */\n    { 1860, 0x000000009E3779B1ULL, 0x46E1ADAAD0C971C7ULL }, /* XSUM_XXH64_testdata[3721] */\n    { 1861, 0x0000000000000000ULL, 0xA2DEFC2A9887F526ULL }, /* XSUM_XXH64_testdata[3722] */\n    { 1861, 0x000000009E3779B1ULL, 0x3BF6FC439ED5CBB4ULL }, /* XSUM_XXH64_testdata[3723] */\n    { 1862, 0x0000000000000000ULL, 0x3FDA4CB9D1B4E91FULL }, /* XSUM_XXH64_testdata[3724] */\n    { 1862, 0x000000009E3779B1ULL, 0x9A414C868F5DA835ULL }, /* XSUM_XXH64_testdata[3725] */\n    { 1863, 0x0000000000000000ULL, 0xDB51F7445602B84FULL }, /* XSUM_XXH64_testdata[3726] */\n    { 1863, 0x000000009E3779B1ULL, 0x5F1CEC7931D75D05ULL }, /* XSUM_XXH64_testdata[3727] */\n    { 1864, 0x0000000000000000ULL, 0x0F58BB727F134477ULL }, /* XSUM_XXH64_testdata[3728] */\n    { 1864, 0x000000009E3779B1ULL, 0xDF6DD5AB012398DAULL }, /* XSUM_XXH64_testdata[3729] */\n    { 1865, 0x0000000000000000ULL, 0x74671FC0F2F2353CULL }, /* XSUM_XXH64_testdata[3730] */\n    { 1865, 0x000000009E3779B1ULL, 0x34C10B2DC838DE09ULL }, /* XSUM_XXH64_testdata[3731] */\n    { 1866, 0x0000000000000000ULL, 0xD15EF99D440333D1ULL }, /* XSUM_XXH64_testdata[3732] */\n    { 1866, 0x000000009E3779B1ULL, 0xD6C76CB377C44611ULL }, /* XSUM_XXH64_testdata[3733] */\n    { 1867, 0x0000000000000000ULL, 0xE32B4DCEAB692564ULL }, /* XSUM_XXH64_testdata[3734] */\n    { 1867, 0x000000009E3779B1ULL, 0x9C31B2522984FD1FULL }, /* XSUM_XXH64_testdata[3735] */\n    { 1868, 0x0000000000000000ULL, 0x12E8A18B72B4EB64ULL }, /* XSUM_XXH64_testdata[3736] */\n    { 1868, 0x000000009E3779B1ULL, 0x210B2AC415D693BEULL }, /* XSUM_XXH64_testdata[3737] */\n    { 1869, 0x0000000000000000ULL, 0x4707734110EF4F89ULL }, /* XSUM_XXH64_testdata[3738] */\n    { 1869, 0x000000009E3779B1ULL, 0x573E3DACBFA62409ULL }, /* XSUM_XXH64_testdata[3739] */\n    { 1870, 0x0000000000000000ULL, 0xE33A3E826B08855FULL }, /* XSUM_XXH64_testdata[3740] */\n    { 1870, 0x000000009E3779B1ULL, 0x57EC447641925F48ULL }, /* XSUM_XXH64_testdata[3741] */\n    { 1871, 0x0000000000000000ULL, 0x91F75B9458D06D71ULL }, /* XSUM_XXH64_testdata[3742] */\n    { 1871, 0x000000009E3779B1ULL, 0x75A44826FFAB2417ULL }, /* XSUM_XXH64_testdata[3743] */\n    { 1872, 0x0000000000000000ULL, 0x67F9F3BCA1F98F91ULL }, /* XSUM_XXH64_testdata[3744] */\n    { 1872, 0x000000009E3779B1ULL, 0x7140DE7D50A0F686ULL }, /* XSUM_XXH64_testdata[3745] */\n    { 1873, 0x0000000000000000ULL, 0x29FB2618263CC7A5ULL }, /* XSUM_XXH64_testdata[3746] */\n    { 1873, 0x000000009E3779B1ULL, 0x390F98420FB3744FULL }, /* XSUM_XXH64_testdata[3747] */\n    { 1874, 0x0000000000000000ULL, 0x2FEF3A35EA158263ULL }, /* XSUM_XXH64_testdata[3748] */\n    { 1874, 0x000000009E3779B1ULL, 0x47B812A89C42F79FULL }, /* XSUM_XXH64_testdata[3749] */\n    { 1875, 0x0000000000000000ULL, 0xD35E467343E1C3EBULL }, /* XSUM_XXH64_testdata[3750] */\n    { 1875, 0x000000009E3779B1ULL, 0x470C019EC0977AEBULL }, /* XSUM_XXH64_testdata[3751] */\n    { 1876, 0x0000000000000000ULL, 0xD866F27E7D33E219ULL }, /* XSUM_XXH64_testdata[3752] */\n    { 1876, 0x000000009E3779B1ULL, 0x7B9C180CDE847FBFULL }, /* XSUM_XXH64_testdata[3753] */\n    { 1877, 0x0000000000000000ULL, 0x2F4FE98177598E11ULL }, /* XSUM_XXH64_testdata[3754] */\n    { 1877, 0x000000009E3779B1ULL, 0xAB02B72BF07B98D3ULL }, /* XSUM_XXH64_testdata[3755] */\n    { 1878, 0x0000000000000000ULL, 0x2A420724B7DFB3B4ULL }, /* XSUM_XXH64_testdata[3756] */\n    { 1878, 0x000000009E3779B1ULL, 0x2220B4D002F11057ULL }, /* XSUM_XXH64_testdata[3757] */\n    { 1879, 0x0000000000000000ULL, 0x975DA402B27ACDB9ULL }, /* XSUM_XXH64_testdata[3758] */\n    { 1879, 0x000000009E3779B1ULL, 0x5A444D678026DE66ULL }, /* XSUM_XXH64_testdata[3759] */\n    { 1880, 0x0000000000000000ULL, 0x6454317F3170F18FULL }, /* XSUM_XXH64_testdata[3760] */\n    { 1880, 0x000000009E3779B1ULL, 0x0BF5C212FBBFB2B9ULL }, /* XSUM_XXH64_testdata[3761] */\n    { 1881, 0x0000000000000000ULL, 0x1996DEE2EE0411F4ULL }, /* XSUM_XXH64_testdata[3762] */\n    { 1881, 0x000000009E3779B1ULL, 0xF07AAC423BD2698FULL }, /* XSUM_XXH64_testdata[3763] */\n    { 1882, 0x0000000000000000ULL, 0xE3DA0CA62EB2881DULL }, /* XSUM_XXH64_testdata[3764] */\n    { 1882, 0x000000009E3779B1ULL, 0xDF5429E239AA2430ULL }, /* XSUM_XXH64_testdata[3765] */\n    { 1883, 0x0000000000000000ULL, 0xBEDD401C30B15316ULL }, /* XSUM_XXH64_testdata[3766] */\n    { 1883, 0x000000009E3779B1ULL, 0x54AF0513CEF2A9FCULL }, /* XSUM_XXH64_testdata[3767] */\n    { 1884, 0x0000000000000000ULL, 0x9E5CB412E4FB4F2CULL }, /* XSUM_XXH64_testdata[3768] */\n    { 1884, 0x000000009E3779B1ULL, 0x7380BEC5F8F6BCBEULL }, /* XSUM_XXH64_testdata[3769] */\n    { 1885, 0x0000000000000000ULL, 0xBCC7A7AAF9189A73ULL }, /* XSUM_XXH64_testdata[3770] */\n    { 1885, 0x000000009E3779B1ULL, 0xD916FB038C5B8A56ULL }, /* XSUM_XXH64_testdata[3771] */\n    { 1886, 0x0000000000000000ULL, 0xFF1F7499DA4C60BFULL }, /* XSUM_XXH64_testdata[3772] */\n    { 1886, 0x000000009E3779B1ULL, 0x1D69724F18C1D7A0ULL }, /* XSUM_XXH64_testdata[3773] */\n    { 1887, 0x0000000000000000ULL, 0xE04F9872D49D7344ULL }, /* XSUM_XXH64_testdata[3774] */\n    { 1887, 0x000000009E3779B1ULL, 0xAC821F6DF95BB2B1ULL }, /* XSUM_XXH64_testdata[3775] */\n    { 1888, 0x0000000000000000ULL, 0xC5C66830F2119D9EULL }, /* XSUM_XXH64_testdata[3776] */\n    { 1888, 0x000000009E3779B1ULL, 0xA4FC5298D9EBB759ULL }, /* XSUM_XXH64_testdata[3777] */\n    { 1889, 0x0000000000000000ULL, 0x681BA4449171958CULL }, /* XSUM_XXH64_testdata[3778] */\n    { 1889, 0x000000009E3779B1ULL, 0x12E0521ED047B501ULL }, /* XSUM_XXH64_testdata[3779] */\n    { 1890, 0x0000000000000000ULL, 0x4E9510238C49AD2FULL }, /* XSUM_XXH64_testdata[3780] */\n    { 1890, 0x000000009E3779B1ULL, 0xBA954E0BF88B5829ULL }, /* XSUM_XXH64_testdata[3781] */\n    { 1891, 0x0000000000000000ULL, 0xFB5221E42BB0C833ULL }, /* XSUM_XXH64_testdata[3782] */\n    { 1891, 0x000000009E3779B1ULL, 0x2AA5F1095C25A2BCULL }, /* XSUM_XXH64_testdata[3783] */\n    { 1892, 0x0000000000000000ULL, 0x8E970A1906282CFAULL }, /* XSUM_XXH64_testdata[3784] */\n    { 1892, 0x000000009E3779B1ULL, 0xBFC9EBEAF7BA9C55ULL }, /* XSUM_XXH64_testdata[3785] */\n    { 1893, 0x0000000000000000ULL, 0x4575D188C3A5152CULL }, /* XSUM_XXH64_testdata[3786] */\n    { 1893, 0x000000009E3779B1ULL, 0x42AA1A42C891711AULL }, /* XSUM_XXH64_testdata[3787] */\n    { 1894, 0x0000000000000000ULL, 0x4F68CCD0752A3DBBULL }, /* XSUM_XXH64_testdata[3788] */\n    { 1894, 0x000000009E3779B1ULL, 0x71E062B6046D5CB9ULL }, /* XSUM_XXH64_testdata[3789] */\n    { 1895, 0x0000000000000000ULL, 0xB224B2F6630C6397ULL }, /* XSUM_XXH64_testdata[3790] */\n    { 1895, 0x000000009E3779B1ULL, 0xD8CCCD3D84F09463ULL }, /* XSUM_XXH64_testdata[3791] */\n    { 1896, 0x0000000000000000ULL, 0x409D41078E0B8250ULL }, /* XSUM_XXH64_testdata[3792] */\n    { 1896, 0x000000009E3779B1ULL, 0x469F0A5A48B3AA1EULL }, /* XSUM_XXH64_testdata[3793] */\n    { 1897, 0x0000000000000000ULL, 0xEA88E6A7BE7CE0EFULL }, /* XSUM_XXH64_testdata[3794] */\n    { 1897, 0x000000009E3779B1ULL, 0xB27CD3B095339B9CULL }, /* XSUM_XXH64_testdata[3795] */\n    { 1898, 0x0000000000000000ULL, 0x29D39C1B14C470F8ULL }, /* XSUM_XXH64_testdata[3796] */\n    { 1898, 0x000000009E3779B1ULL, 0x0A7CCABF2F95AB4FULL }, /* XSUM_XXH64_testdata[3797] */\n    { 1899, 0x0000000000000000ULL, 0x7276FC8C2732236AULL }, /* XSUM_XXH64_testdata[3798] */\n    { 1899, 0x000000009E3779B1ULL, 0x0CC2058938976D69ULL }, /* XSUM_XXH64_testdata[3799] */\n    { 1900, 0x0000000000000000ULL, 0xA193F2EFD70BA805ULL }, /* XSUM_XXH64_testdata[3800] */\n    { 1900, 0x000000009E3779B1ULL, 0x5D0CDC160A8675DDULL }, /* XSUM_XXH64_testdata[3801] */\n    { 1901, 0x0000000000000000ULL, 0x61CC8DAE752C620EULL }, /* XSUM_XXH64_testdata[3802] */\n    { 1901, 0x000000009E3779B1ULL, 0x973ABA1FD4F6A337ULL }, /* XSUM_XXH64_testdata[3803] */\n    { 1902, 0x0000000000000000ULL, 0xA0A19AB5E1E3B64AULL }, /* XSUM_XXH64_testdata[3804] */\n    { 1902, 0x000000009E3779B1ULL, 0xC50B5833783C2774ULL }, /* XSUM_XXH64_testdata[3805] */\n    { 1903, 0x0000000000000000ULL, 0xE8299E51B678F032ULL }, /* XSUM_XXH64_testdata[3806] */\n    { 1903, 0x000000009E3779B1ULL, 0xE1EE9F03CB62A3C6ULL }, /* XSUM_XXH64_testdata[3807] */\n    { 1904, 0x0000000000000000ULL, 0x4A30720C9E532B7DULL }, /* XSUM_XXH64_testdata[3808] */\n    { 1904, 0x000000009E3779B1ULL, 0x950B36638292336EULL }, /* XSUM_XXH64_testdata[3809] */\n    { 1905, 0x0000000000000000ULL, 0x8732252AF5EA79CFULL }, /* XSUM_XXH64_testdata[3810] */\n    { 1905, 0x000000009E3779B1ULL, 0xE34EEEEE1668D061ULL }, /* XSUM_XXH64_testdata[3811] */\n    { 1906, 0x0000000000000000ULL, 0xECDDE30992D9DEC1ULL }, /* XSUM_XXH64_testdata[3812] */\n    { 1906, 0x000000009E3779B1ULL, 0x53A447722B822E76ULL }, /* XSUM_XXH64_testdata[3813] */\n    { 1907, 0x0000000000000000ULL, 0xB7E5AADB1BC4AC8BULL }, /* XSUM_XXH64_testdata[3814] */\n    { 1907, 0x000000009E3779B1ULL, 0x82F497683FEACCD8ULL }, /* XSUM_XXH64_testdata[3815] */\n    { 1908, 0x0000000000000000ULL, 0xD7311D87C9F93721ULL }, /* XSUM_XXH64_testdata[3816] */\n    { 1908, 0x000000009E3779B1ULL, 0x51BF57BB18AFFAB4ULL }, /* XSUM_XXH64_testdata[3817] */\n    { 1909, 0x0000000000000000ULL, 0x893B2C069A06A810ULL }, /* XSUM_XXH64_testdata[3818] */\n    { 1909, 0x000000009E3779B1ULL, 0x0A450D1442501FD1ULL }, /* XSUM_XXH64_testdata[3819] */\n    { 1910, 0x0000000000000000ULL, 0x38CB9156B3DE406EULL }, /* XSUM_XXH64_testdata[3820] */\n    { 1910, 0x000000009E3779B1ULL, 0xCECCEBA93C6318D6ULL }, /* XSUM_XXH64_testdata[3821] */\n    { 1911, 0x0000000000000000ULL, 0x2DA4871734515E8DULL }, /* XSUM_XXH64_testdata[3822] */\n    { 1911, 0x000000009E3779B1ULL, 0x5644DD2251463DEEULL }, /* XSUM_XXH64_testdata[3823] */\n    { 1912, 0x0000000000000000ULL, 0xD1216FF4E187173BULL }, /* XSUM_XXH64_testdata[3824] */\n    { 1912, 0x000000009E3779B1ULL, 0x75F6605758F96652ULL }, /* XSUM_XXH64_testdata[3825] */\n    { 1913, 0x0000000000000000ULL, 0xA55106AD72FF20F7ULL }, /* XSUM_XXH64_testdata[3826] */\n    { 1913, 0x000000009E3779B1ULL, 0x4C4E77E22AC19C68ULL }, /* XSUM_XXH64_testdata[3827] */\n    { 1914, 0x0000000000000000ULL, 0xF2475FD5C8971EDEULL }, /* XSUM_XXH64_testdata[3828] */\n    { 1914, 0x000000009E3779B1ULL, 0x7350C8F7A15C7BFBULL }, /* XSUM_XXH64_testdata[3829] */\n    { 1915, 0x0000000000000000ULL, 0x9E3EB7DB43AAACC3ULL }, /* XSUM_XXH64_testdata[3830] */\n    { 1915, 0x000000009E3779B1ULL, 0x6510016F6BD747CAULL }, /* XSUM_XXH64_testdata[3831] */\n    { 1916, 0x0000000000000000ULL, 0xD20A8FC57EABF467ULL }, /* XSUM_XXH64_testdata[3832] */\n    { 1916, 0x000000009E3779B1ULL, 0xEFEEC3C059548C34ULL }, /* XSUM_XXH64_testdata[3833] */\n    { 1917, 0x0000000000000000ULL, 0x537B84A9E4A2CFC7ULL }, /* XSUM_XXH64_testdata[3834] */\n    { 1917, 0x000000009E3779B1ULL, 0xA2201494985BC745ULL }, /* XSUM_XXH64_testdata[3835] */\n    { 1918, 0x0000000000000000ULL, 0x5294A1D07CC928B2ULL }, /* XSUM_XXH64_testdata[3836] */\n    { 1918, 0x000000009E3779B1ULL, 0xFE7492D9CC08EE91ULL }, /* XSUM_XXH64_testdata[3837] */\n    { 1919, 0x0000000000000000ULL, 0xD888A0374241D67DULL }, /* XSUM_XXH64_testdata[3838] */\n    { 1919, 0x000000009E3779B1ULL, 0x52F7BE1192F8B0ABULL }, /* XSUM_XXH64_testdata[3839] */\n    { 1920, 0x0000000000000000ULL, 0xAA3A4331FBFB9253ULL }, /* XSUM_XXH64_testdata[3840] */\n    { 1920, 0x000000009E3779B1ULL, 0xB78B7AC8C44DC573ULL }, /* XSUM_XXH64_testdata[3841] */\n    { 1921, 0x0000000000000000ULL, 0x8A55562623C20B73ULL }, /* XSUM_XXH64_testdata[3842] */\n    { 1921, 0x000000009E3779B1ULL, 0xD920F4EDFE36E3F5ULL }, /* XSUM_XXH64_testdata[3843] */\n    { 1922, 0x0000000000000000ULL, 0x1244034630E45543ULL }, /* XSUM_XXH64_testdata[3844] */\n    { 1922, 0x000000009E3779B1ULL, 0x50F2479E6884A940ULL }, /* XSUM_XXH64_testdata[3845] */\n    { 1923, 0x0000000000000000ULL, 0xE887672177AC3D01ULL }, /* XSUM_XXH64_testdata[3846] */\n    { 1923, 0x000000009E3779B1ULL, 0x049C7CDB2AC31032ULL }, /* XSUM_XXH64_testdata[3847] */\n    { 1924, 0x0000000000000000ULL, 0x1ADAC6C8C8DAD1DCULL }, /* XSUM_XXH64_testdata[3848] */\n    { 1924, 0x000000009E3779B1ULL, 0x4D40152D5A550466ULL }, /* XSUM_XXH64_testdata[3849] */\n    { 1925, 0x0000000000000000ULL, 0x999E55C1CBBB589BULL }, /* XSUM_XXH64_testdata[3850] */\n    { 1925, 0x000000009E3779B1ULL, 0x9C0AA49DE94A3E94ULL }, /* XSUM_XXH64_testdata[3851] */\n    { 1926, 0x0000000000000000ULL, 0xEDA1333D6075BB82ULL }, /* XSUM_XXH64_testdata[3852] */\n    { 1926, 0x000000009E3779B1ULL, 0x144C5654454EF3F9ULL }, /* XSUM_XXH64_testdata[3853] */\n    { 1927, 0x0000000000000000ULL, 0xA912F39DDF660890ULL }, /* XSUM_XXH64_testdata[3854] */\n    { 1927, 0x000000009E3779B1ULL, 0x117170CF22EB5CAAULL }, /* XSUM_XXH64_testdata[3855] */\n    { 1928, 0x0000000000000000ULL, 0xF39D5BCE889B4EF8ULL }, /* XSUM_XXH64_testdata[3856] */\n    { 1928, 0x000000009E3779B1ULL, 0x8473A57B4487767DULL }, /* XSUM_XXH64_testdata[3857] */\n    { 1929, 0x0000000000000000ULL, 0x78B0C0B645BE305FULL }, /* XSUM_XXH64_testdata[3858] */\n    { 1929, 0x000000009E3779B1ULL, 0x4F878D6CDAB1AAE9ULL }, /* XSUM_XXH64_testdata[3859] */\n    { 1930, 0x0000000000000000ULL, 0x2E57F3980656C1E4ULL }, /* XSUM_XXH64_testdata[3860] */\n    { 1930, 0x000000009E3779B1ULL, 0xD5CCAFD481116352ULL }, /* XSUM_XXH64_testdata[3861] */\n    { 1931, 0x0000000000000000ULL, 0x4516616F1D35FF2DULL }, /* XSUM_XXH64_testdata[3862] */\n    { 1931, 0x000000009E3779B1ULL, 0xDA186B536C18DCDEULL }, /* XSUM_XXH64_testdata[3863] */\n    { 1932, 0x0000000000000000ULL, 0x98DBC2BE1A771D87ULL }, /* XSUM_XXH64_testdata[3864] */\n    { 1932, 0x000000009E3779B1ULL, 0xC202F6422D28EF77ULL }, /* XSUM_XXH64_testdata[3865] */\n    { 1933, 0x0000000000000000ULL, 0xE9EAC37CF11571CCULL }, /* XSUM_XXH64_testdata[3866] */\n    { 1933, 0x000000009E3779B1ULL, 0xA70CB2C1A5CC87EDULL }, /* XSUM_XXH64_testdata[3867] */\n    { 1934, 0x0000000000000000ULL, 0x85155A8728EC7D6DULL }, /* XSUM_XXH64_testdata[3868] */\n    { 1934, 0x000000009E3779B1ULL, 0x176EA6806965497EULL }, /* XSUM_XXH64_testdata[3869] */\n    { 1935, 0x0000000000000000ULL, 0xCF04A6647082FE76ULL }, /* XSUM_XXH64_testdata[3870] */\n    { 1935, 0x000000009E3779B1ULL, 0x26A991B9518896C7ULL }, /* XSUM_XXH64_testdata[3871] */\n    { 1936, 0x0000000000000000ULL, 0x23D3266C6C71FF2AULL }, /* XSUM_XXH64_testdata[3872] */\n    { 1936, 0x000000009E3779B1ULL, 0xEEF61E4054BD033AULL }, /* XSUM_XXH64_testdata[3873] */\n    { 1937, 0x0000000000000000ULL, 0x8428AC7F24DAC012ULL }, /* XSUM_XXH64_testdata[3874] */\n    { 1937, 0x000000009E3779B1ULL, 0xA3951A07D9E6417DULL }, /* XSUM_XXH64_testdata[3875] */\n    { 1938, 0x0000000000000000ULL, 0x688DBBD59ABD11E0ULL }, /* XSUM_XXH64_testdata[3876] */\n    { 1938, 0x000000009E3779B1ULL, 0x09780B80B2A7B063ULL }, /* XSUM_XXH64_testdata[3877] */\n    { 1939, 0x0000000000000000ULL, 0x89D94BFD2170692FULL }, /* XSUM_XXH64_testdata[3878] */\n    { 1939, 0x000000009E3779B1ULL, 0x61E2AE56DA6B4DF8ULL }, /* XSUM_XXH64_testdata[3879] */\n    { 1940, 0x0000000000000000ULL, 0x2EAE10D307800B7CULL }, /* XSUM_XXH64_testdata[3880] */\n    { 1940, 0x000000009E3779B1ULL, 0x4BA2D93551E4276EULL }, /* XSUM_XXH64_testdata[3881] */\n    { 1941, 0x0000000000000000ULL, 0x20AB4C7DC9ADD088ULL }, /* XSUM_XXH64_testdata[3882] */\n    { 1941, 0x000000009E3779B1ULL, 0x0B8F7EF29FD0F005ULL }, /* XSUM_XXH64_testdata[3883] */\n    { 1942, 0x0000000000000000ULL, 0xA4B7BA7CC53C3F67ULL }, /* XSUM_XXH64_testdata[3884] */\n    { 1942, 0x000000009E3779B1ULL, 0xF82EABF938492265ULL }, /* XSUM_XXH64_testdata[3885] */\n    { 1943, 0x0000000000000000ULL, 0x6DBF7A2FBCC0D6EFULL }, /* XSUM_XXH64_testdata[3886] */\n    { 1943, 0x000000009E3779B1ULL, 0x910DA317A1674C64ULL }, /* XSUM_XXH64_testdata[3887] */\n    { 1944, 0x0000000000000000ULL, 0xC817FCD2CBAFE750ULL }, /* XSUM_XXH64_testdata[3888] */\n    { 1944, 0x000000009E3779B1ULL, 0xAA77E3610948AC81ULL }, /* XSUM_XXH64_testdata[3889] */\n    { 1945, 0x0000000000000000ULL, 0x5FE7345255630096ULL }, /* XSUM_XXH64_testdata[3890] */\n    { 1945, 0x000000009E3779B1ULL, 0xE749917062D92DE7ULL }, /* XSUM_XXH64_testdata[3891] */\n    { 1946, 0x0000000000000000ULL, 0xE331D9E9299AADE8ULL }, /* XSUM_XXH64_testdata[3892] */\n    { 1946, 0x000000009E3779B1ULL, 0x7BB4C81772B72580ULL }, /* XSUM_XXH64_testdata[3893] */\n    { 1947, 0x0000000000000000ULL, 0x6AD92255D909ADFEULL }, /* XSUM_XXH64_testdata[3894] */\n    { 1947, 0x000000009E3779B1ULL, 0x705C8D49236F29EDULL }, /* XSUM_XXH64_testdata[3895] */\n    { 1948, 0x0000000000000000ULL, 0xAF80A33543B24E74ULL }, /* XSUM_XXH64_testdata[3896] */\n    { 1948, 0x000000009E3779B1ULL, 0x8CE985712CDED01DULL }, /* XSUM_XXH64_testdata[3897] */\n    { 1949, 0x0000000000000000ULL, 0x1A9A50D9743F2CFBULL }, /* XSUM_XXH64_testdata[3898] */\n    { 1949, 0x000000009E3779B1ULL, 0xDD1B5EDF471B43AEULL }, /* XSUM_XXH64_testdata[3899] */\n    { 1950, 0x0000000000000000ULL, 0xB23316DCFC81CCE9ULL }, /* XSUM_XXH64_testdata[3900] */\n    { 1950, 0x000000009E3779B1ULL, 0x65A71ED6591E8982ULL }, /* XSUM_XXH64_testdata[3901] */\n    { 1951, 0x0000000000000000ULL, 0x02ECCECBB39F953EULL }, /* XSUM_XXH64_testdata[3902] */\n    { 1951, 0x000000009E3779B1ULL, 0x352A3F5F8390B079ULL }, /* XSUM_XXH64_testdata[3903] */\n    { 1952, 0x0000000000000000ULL, 0x4B9DBE938BE2BBC2ULL }, /* XSUM_XXH64_testdata[3904] */\n    { 1952, 0x000000009E3779B1ULL, 0xBF092C83744F1D7BULL }, /* XSUM_XXH64_testdata[3905] */\n    { 1953, 0x0000000000000000ULL, 0xC85DB2749C4ACC47ULL }, /* XSUM_XXH64_testdata[3906] */\n    { 1953, 0x000000009E3779B1ULL, 0xC5AA2240F4A7991CULL }, /* XSUM_XXH64_testdata[3907] */\n    { 1954, 0x0000000000000000ULL, 0x83296B902D443812ULL }, /* XSUM_XXH64_testdata[3908] */\n    { 1954, 0x000000009E3779B1ULL, 0x7D7A444F595EE483ULL }, /* XSUM_XXH64_testdata[3909] */\n    { 1955, 0x0000000000000000ULL, 0x1ACC00E9129B7D59ULL }, /* XSUM_XXH64_testdata[3910] */\n    { 1955, 0x000000009E3779B1ULL, 0x05BE7458D58E40A4ULL }, /* XSUM_XXH64_testdata[3911] */\n    { 1956, 0x0000000000000000ULL, 0x2D994C6301AC08ACULL }, /* XSUM_XXH64_testdata[3912] */\n    { 1956, 0x000000009E3779B1ULL, 0x15E6435017A01DE2ULL }, /* XSUM_XXH64_testdata[3913] */\n    { 1957, 0x0000000000000000ULL, 0xD9EA1E578DC991B5ULL }, /* XSUM_XXH64_testdata[3914] */\n    { 1957, 0x000000009E3779B1ULL, 0x94E049848E9F64C9ULL }, /* XSUM_XXH64_testdata[3915] */\n    { 1958, 0x0000000000000000ULL, 0x78CEF1BA0440649BULL }, /* XSUM_XXH64_testdata[3916] */\n    { 1958, 0x000000009E3779B1ULL, 0x6C882F0C1CF8028EULL }, /* XSUM_XXH64_testdata[3917] */\n    { 1959, 0x0000000000000000ULL, 0x329FB8413C9058DBULL }, /* XSUM_XXH64_testdata[3918] */\n    { 1959, 0x000000009E3779B1ULL, 0x78C774AB8CFFFD21ULL }, /* XSUM_XXH64_testdata[3919] */\n    { 1960, 0x0000000000000000ULL, 0x17428B7B845AC341ULL }, /* XSUM_XXH64_testdata[3920] */\n    { 1960, 0x000000009E3779B1ULL, 0xDD61181F6611204CULL }, /* XSUM_XXH64_testdata[3921] */\n    { 1961, 0x0000000000000000ULL, 0xD745F8EF20D58947ULL }, /* XSUM_XXH64_testdata[3922] */\n    { 1961, 0x000000009E3779B1ULL, 0xF46BF355CCACFBDCULL }, /* XSUM_XXH64_testdata[3923] */\n    { 1962, 0x0000000000000000ULL, 0x58DC08544B290C03ULL }, /* XSUM_XXH64_testdata[3924] */\n    { 1962, 0x000000009E3779B1ULL, 0x0D7F75871539BFA0ULL }, /* XSUM_XXH64_testdata[3925] */\n    { 1963, 0x0000000000000000ULL, 0x5580F80FE25E642DULL }, /* XSUM_XXH64_testdata[3926] */\n    { 1963, 0x000000009E3779B1ULL, 0x2866096338373E52ULL }, /* XSUM_XXH64_testdata[3927] */\n    { 1964, 0x0000000000000000ULL, 0x5CCA0BC526A9C3BDULL }, /* XSUM_XXH64_testdata[3928] */\n    { 1964, 0x000000009E3779B1ULL, 0x614943C253C46CC1ULL }, /* XSUM_XXH64_testdata[3929] */\n    { 1965, 0x0000000000000000ULL, 0x3D80DFF7A798BE56ULL }, /* XSUM_XXH64_testdata[3930] */\n    { 1965, 0x000000009E3779B1ULL, 0x200D8CC2426C8C6EULL }, /* XSUM_XXH64_testdata[3931] */\n    { 1966, 0x0000000000000000ULL, 0x09509DE6E6B24C25ULL }, /* XSUM_XXH64_testdata[3932] */\n    { 1966, 0x000000009E3779B1ULL, 0x750D6423ABB6BE0CULL }, /* XSUM_XXH64_testdata[3933] */\n    { 1967, 0x0000000000000000ULL, 0x302C505B14EF6D5DULL }, /* XSUM_XXH64_testdata[3934] */\n    { 1967, 0x000000009E3779B1ULL, 0xBE588C12741DF4FDULL }, /* XSUM_XXH64_testdata[3935] */\n    { 1968, 0x0000000000000000ULL, 0xBBEFAE279DA04E62ULL }, /* XSUM_XXH64_testdata[3936] */\n    { 1968, 0x000000009E3779B1ULL, 0x87FE20E0B3EDE474ULL }, /* XSUM_XXH64_testdata[3937] */\n    { 1969, 0x0000000000000000ULL, 0xD37E7E583D7775E2ULL }, /* XSUM_XXH64_testdata[3938] */\n    { 1969, 0x000000009E3779B1ULL, 0x4AB1C29A196EE7FFULL }, /* XSUM_XXH64_testdata[3939] */\n    { 1970, 0x0000000000000000ULL, 0x809FBD5697D7D9AAULL }, /* XSUM_XXH64_testdata[3940] */\n    { 1970, 0x000000009E3779B1ULL, 0xCF4FC79D89D9CA91ULL }, /* XSUM_XXH64_testdata[3941] */\n    { 1971, 0x0000000000000000ULL, 0xE68AACB19FA51DBFULL }, /* XSUM_XXH64_testdata[3942] */\n    { 1971, 0x000000009E3779B1ULL, 0xC89AF0ABBB0B5079ULL }, /* XSUM_XXH64_testdata[3943] */\n    { 1972, 0x0000000000000000ULL, 0x8AEBA0D906EA87DCULL }, /* XSUM_XXH64_testdata[3944] */\n    { 1972, 0x000000009E3779B1ULL, 0xE232F48721B619F7ULL }, /* XSUM_XXH64_testdata[3945] */\n    { 1973, 0x0000000000000000ULL, 0xDD791CC66475568EULL }, /* XSUM_XXH64_testdata[3946] */\n    { 1973, 0x000000009E3779B1ULL, 0xCEEF7A9275FBA21CULL }, /* XSUM_XXH64_testdata[3947] */\n    { 1974, 0x0000000000000000ULL, 0x904F000BA52402B4ULL }, /* XSUM_XXH64_testdata[3948] */\n    { 1974, 0x000000009E3779B1ULL, 0x9414203BBEC1C96FULL }, /* XSUM_XXH64_testdata[3949] */\n    { 1975, 0x0000000000000000ULL, 0x4C0F3B496D570402ULL }, /* XSUM_XXH64_testdata[3950] */\n    { 1975, 0x000000009E3779B1ULL, 0x06EEC96A1DD0B4E6ULL }, /* XSUM_XXH64_testdata[3951] */\n    { 1976, 0x0000000000000000ULL, 0x78A0A17A42C2D78AULL }, /* XSUM_XXH64_testdata[3952] */\n    { 1976, 0x000000009E3779B1ULL, 0x50BFA0D736C207BEULL }, /* XSUM_XXH64_testdata[3953] */\n    { 1977, 0x0000000000000000ULL, 0xCC92F434D4F6AAACULL }, /* XSUM_XXH64_testdata[3954] */\n    { 1977, 0x000000009E3779B1ULL, 0xC892260DEFC04D2DULL }, /* XSUM_XXH64_testdata[3955] */\n    { 1978, 0x0000000000000000ULL, 0xAE8BCDEA8C45C2FAULL }, /* XSUM_XXH64_testdata[3956] */\n    { 1978, 0x000000009E3779B1ULL, 0x3E98A1573B2DCF2BULL }, /* XSUM_XXH64_testdata[3957] */\n    { 1979, 0x0000000000000000ULL, 0xACA3FFFA93EA3C50ULL }, /* XSUM_XXH64_testdata[3958] */\n    { 1979, 0x000000009E3779B1ULL, 0x9DB5CDE739411A64ULL }, /* XSUM_XXH64_testdata[3959] */\n    { 1980, 0x0000000000000000ULL, 0x96C2D9479421FE62ULL }, /* XSUM_XXH64_testdata[3960] */\n    { 1980, 0x000000009E3779B1ULL, 0xAD212FC0F390B219ULL }, /* XSUM_XXH64_testdata[3961] */\n    { 1981, 0x0000000000000000ULL, 0xE98226F8F02EFD75ULL }, /* XSUM_XXH64_testdata[3962] */\n    { 1981, 0x000000009E3779B1ULL, 0x7E9FA16D1DD08599ULL }, /* XSUM_XXH64_testdata[3963] */\n    { 1982, 0x0000000000000000ULL, 0xA65E553BD359B07EULL }, /* XSUM_XXH64_testdata[3964] */\n    { 1982, 0x000000009E3779B1ULL, 0x965C1A012957492EULL }, /* XSUM_XXH64_testdata[3965] */\n    { 1983, 0x0000000000000000ULL, 0x88C25C2A304214F8ULL }, /* XSUM_XXH64_testdata[3966] */\n    { 1983, 0x000000009E3779B1ULL, 0x09D47FC7FAD17081ULL }, /* XSUM_XXH64_testdata[3967] */\n    { 1984, 0x0000000000000000ULL, 0xD67A96D6F1D56487ULL }, /* XSUM_XXH64_testdata[3968] */\n    { 1984, 0x000000009E3779B1ULL, 0x332368D129DB8298ULL }, /* XSUM_XXH64_testdata[3969] */\n    { 1985, 0x0000000000000000ULL, 0xCD3E5C6902A97395ULL }, /* XSUM_XXH64_testdata[3970] */\n    { 1985, 0x000000009E3779B1ULL, 0xE9B7E0E8F2959B87ULL }, /* XSUM_XXH64_testdata[3971] */\n    { 1986, 0x0000000000000000ULL, 0x1FC418BBB40177DAULL }, /* XSUM_XXH64_testdata[3972] */\n    { 1986, 0x000000009E3779B1ULL, 0x193738968EBD6626ULL }, /* XSUM_XXH64_testdata[3973] */\n    { 1987, 0x0000000000000000ULL, 0x1889E59C0549E0B0ULL }, /* XSUM_XXH64_testdata[3974] */\n    { 1987, 0x000000009E3779B1ULL, 0x115F75C5C1F6A537ULL }, /* XSUM_XXH64_testdata[3975] */\n    { 1988, 0x0000000000000000ULL, 0x2BF40954EAF218EAULL }, /* XSUM_XXH64_testdata[3976] */\n    { 1988, 0x000000009E3779B1ULL, 0x4F739C5580C0F3E3ULL }, /* XSUM_XXH64_testdata[3977] */\n    { 1989, 0x0000000000000000ULL, 0x0A4828AF9D5B8AFDULL }, /* XSUM_XXH64_testdata[3978] */\n    { 1989, 0x000000009E3779B1ULL, 0x9EAFAE02A89A4AF2ULL }, /* XSUM_XXH64_testdata[3979] */\n    { 1990, 0x0000000000000000ULL, 0x66AE938ABE8C0CC5ULL }, /* XSUM_XXH64_testdata[3980] */\n    { 1990, 0x000000009E3779B1ULL, 0xB5DC6233ABF8B4BCULL }, /* XSUM_XXH64_testdata[3981] */\n    { 1991, 0x0000000000000000ULL, 0xFA8FB6CC100885E3ULL }, /* XSUM_XXH64_testdata[3982] */\n    { 1991, 0x000000009E3779B1ULL, 0x6E02C0E3382D578CULL }, /* XSUM_XXH64_testdata[3983] */\n    { 1992, 0x0000000000000000ULL, 0x749C36F3AEFA2C1EULL }, /* XSUM_XXH64_testdata[3984] */\n    { 1992, 0x000000009E3779B1ULL, 0xC4F641C0C8D5F970ULL }, /* XSUM_XXH64_testdata[3985] */\n    { 1993, 0x0000000000000000ULL, 0xC9CD385C074B4222ULL }, /* XSUM_XXH64_testdata[3986] */\n    { 1993, 0x000000009E3779B1ULL, 0x2D45B405309A44D2ULL }, /* XSUM_XXH64_testdata[3987] */\n    { 1994, 0x0000000000000000ULL, 0xB7E091603B400C8FULL }, /* XSUM_XXH64_testdata[3988] */\n    { 1994, 0x000000009E3779B1ULL, 0xB93DD93AB556697DULL }, /* XSUM_XXH64_testdata[3989] */\n    { 1995, 0x0000000000000000ULL, 0xFE0A6A79BB0C0EFDULL }, /* XSUM_XXH64_testdata[3990] */\n    { 1995, 0x000000009E3779B1ULL, 0x642687CAE0CCA424ULL }, /* XSUM_XXH64_testdata[3991] */\n    { 1996, 0x0000000000000000ULL, 0xDC49CAF48A9AFEF6ULL }, /* XSUM_XXH64_testdata[3992] */\n    { 1996, 0x000000009E3779B1ULL, 0x7466B8231FB6C767ULL }, /* XSUM_XXH64_testdata[3993] */\n    { 1997, 0x0000000000000000ULL, 0x6269E02B71E7624EULL }, /* XSUM_XXH64_testdata[3994] */\n    { 1997, 0x000000009E3779B1ULL, 0x8FD9E352DCC5C664ULL }, /* XSUM_XXH64_testdata[3995] */\n    { 1998, 0x0000000000000000ULL, 0x50C7D18C6AFAD885ULL }, /* XSUM_XXH64_testdata[3996] */\n    { 1998, 0x000000009E3779B1ULL, 0xF4C7282BD3EC8313ULL }, /* XSUM_XXH64_testdata[3997] */\n    { 1999, 0x0000000000000000ULL, 0xD153742553898C04ULL }, /* XSUM_XXH64_testdata[3998] */\n    { 1999, 0x000000009E3779B1ULL, 0xC3DBDEEE307F5628ULL }, /* XSUM_XXH64_testdata[3999] */\n    { 2000, 0x0000000000000000ULL, 0x62654B255049664BULL }, /* XSUM_XXH64_testdata[4000] */\n    { 2000, 0x000000009E3779B1ULL, 0x9BA1C02E581B8E86ULL }, /* XSUM_XXH64_testdata[4001] */\n    { 2001, 0x0000000000000000ULL, 0x769143921AA83703ULL }, /* XSUM_XXH64_testdata[4002] */\n    { 2001, 0x000000009E3779B1ULL, 0xD7871173B036D41EULL }, /* XSUM_XXH64_testdata[4003] */\n    { 2002, 0x0000000000000000ULL, 0xF8F15E36A0BA9379ULL }, /* XSUM_XXH64_testdata[4004] */\n    { 2002, 0x000000009E3779B1ULL, 0x6F77C90391E133E3ULL }, /* XSUM_XXH64_testdata[4005] */\n    { 2003, 0x0000000000000000ULL, 0xF4753A24B037ADEEULL }, /* XSUM_XXH64_testdata[4006] */\n    { 2003, 0x000000009E3779B1ULL, 0xF635B761B94B7AB0ULL }, /* XSUM_XXH64_testdata[4007] */\n    { 2004, 0x0000000000000000ULL, 0x82A636472C34B9CEULL }, /* XSUM_XXH64_testdata[4008] */\n    { 2004, 0x000000009E3779B1ULL, 0x8AB07CA205817C51ULL }, /* XSUM_XXH64_testdata[4009] */\n    { 2005, 0x0000000000000000ULL, 0x3F9121198180FAE5ULL }, /* XSUM_XXH64_testdata[4010] */\n    { 2005, 0x000000009E3779B1ULL, 0xB775561D23D7C05DULL }, /* XSUM_XXH64_testdata[4011] */\n    { 2006, 0x0000000000000000ULL, 0xB9D32E9BE873529CULL }, /* XSUM_XXH64_testdata[4012] */\n    { 2006, 0x000000009E3779B1ULL, 0xCC5B1AD22833E947ULL }, /* XSUM_XXH64_testdata[4013] */\n    { 2007, 0x0000000000000000ULL, 0x0C932553C82F899CULL }, /* XSUM_XXH64_testdata[4014] */\n    { 2007, 0x000000009E3779B1ULL, 0xF6251CA5EFC71C4DULL }, /* XSUM_XXH64_testdata[4015] */\n    { 2008, 0x0000000000000000ULL, 0xCEEC6128C3F727ABULL }, /* XSUM_XXH64_testdata[4016] */\n    { 2008, 0x000000009E3779B1ULL, 0x7CEB10301B8AAF9CULL }, /* XSUM_XXH64_testdata[4017] */\n    { 2009, 0x0000000000000000ULL, 0xB4064FE1B4D918BFULL }, /* XSUM_XXH64_testdata[4018] */\n    { 2009, 0x000000009E3779B1ULL, 0x496D3FFFE987FE93ULL }, /* XSUM_XXH64_testdata[4019] */\n    { 2010, 0x0000000000000000ULL, 0x2E63AAFBE6D4236FULL }, /* XSUM_XXH64_testdata[4020] */\n    { 2010, 0x000000009E3779B1ULL, 0xFA118923A1211202ULL }, /* XSUM_XXH64_testdata[4021] */\n    { 2011, 0x0000000000000000ULL, 0xEBB9A25FBE1B2793ULL }, /* XSUM_XXH64_testdata[4022] */\n    { 2011, 0x000000009E3779B1ULL, 0xF1C55CB6255ADE6EULL }, /* XSUM_XXH64_testdata[4023] */\n    { 2012, 0x0000000000000000ULL, 0xABAF4AE292BF3613ULL }, /* XSUM_XXH64_testdata[4024] */\n    { 2012, 0x000000009E3779B1ULL, 0xE5F7F374402B1E63ULL }, /* XSUM_XXH64_testdata[4025] */\n    { 2013, 0x0000000000000000ULL, 0xC52E8E4828D404E5ULL }, /* XSUM_XXH64_testdata[4026] */\n    { 2013, 0x000000009E3779B1ULL, 0x68B92FBFD9DB16E5ULL }, /* XSUM_XXH64_testdata[4027] */\n    { 2014, 0x0000000000000000ULL, 0x0CF0D3FF2E7A281EULL }, /* XSUM_XXH64_testdata[4028] */\n    { 2014, 0x000000009E3779B1ULL, 0x9C0F43C768EB5913ULL }, /* XSUM_XXH64_testdata[4029] */\n    { 2015, 0x0000000000000000ULL, 0xE89A5F20ABEBE285ULL }, /* XSUM_XXH64_testdata[4030] */\n    { 2015, 0x000000009E3779B1ULL, 0x0D56487C1EE09E3AULL }, /* XSUM_XXH64_testdata[4031] */\n    { 2016, 0x0000000000000000ULL, 0x5F64A682689F51B2ULL }, /* XSUM_XXH64_testdata[4032] */\n    { 2016, 0x000000009E3779B1ULL, 0xDF3FE4AE31B14AE2ULL }, /* XSUM_XXH64_testdata[4033] */\n    { 2017, 0x0000000000000000ULL, 0x861F1A605A776FE5ULL }, /* XSUM_XXH64_testdata[4034] */\n    { 2017, 0x000000009E3779B1ULL, 0x1D89140B4E17FF8FULL }, /* XSUM_XXH64_testdata[4035] */\n    { 2018, 0x0000000000000000ULL, 0x8B89AE50463E5002ULL }, /* XSUM_XXH64_testdata[4036] */\n    { 2018, 0x000000009E3779B1ULL, 0xFB200A46D72495DFULL }, /* XSUM_XXH64_testdata[4037] */\n    { 2019, 0x0000000000000000ULL, 0x48E95E7E0DC0718FULL }, /* XSUM_XXH64_testdata[4038] */\n    { 2019, 0x000000009E3779B1ULL, 0xE93B4484585B45EBULL }, /* XSUM_XXH64_testdata[4039] */\n    { 2020, 0x0000000000000000ULL, 0xEED08765D07D8EEAULL }, /* XSUM_XXH64_testdata[4040] */\n    { 2020, 0x000000009E3779B1ULL, 0xF262B86DC747B84AULL }, /* XSUM_XXH64_testdata[4041] */\n    { 2021, 0x0000000000000000ULL, 0xF8B301686BFD6BC4ULL }, /* XSUM_XXH64_testdata[4042] */\n    { 2021, 0x000000009E3779B1ULL, 0x0B6749E914F6116FULL }, /* XSUM_XXH64_testdata[4043] */\n    { 2022, 0x0000000000000000ULL, 0x84B34BA156A0FB3DULL }, /* XSUM_XXH64_testdata[4044] */\n    { 2022, 0x000000009E3779B1ULL, 0x64EEC7F22F613130ULL }, /* XSUM_XXH64_testdata[4045] */\n    { 2023, 0x0000000000000000ULL, 0xD70DBB507CB28689ULL }, /* XSUM_XXH64_testdata[4046] */\n    { 2023, 0x000000009E3779B1ULL, 0xF23DDD59C8B8FF0FULL }, /* XSUM_XXH64_testdata[4047] */\n    { 2024, 0x0000000000000000ULL, 0xD169C56FBCB4C80AULL }, /* XSUM_XXH64_testdata[4048] */\n    { 2024, 0x000000009E3779B1ULL, 0x5DAE692A30FB7A95ULL }, /* XSUM_XXH64_testdata[4049] */\n    { 2025, 0x0000000000000000ULL, 0x65273D02D09FC508ULL }, /* XSUM_XXH64_testdata[4050] */\n    { 2025, 0x000000009E3779B1ULL, 0xB3E3ED1BECDC13E5ULL }, /* XSUM_XXH64_testdata[4051] */\n    { 2026, 0x0000000000000000ULL, 0xA57A15E674AD9C18ULL }, /* XSUM_XXH64_testdata[4052] */\n    { 2026, 0x000000009E3779B1ULL, 0xFD9F0F8647CA0488ULL }, /* XSUM_XXH64_testdata[4053] */\n    { 2027, 0x0000000000000000ULL, 0x0836EFECCAD6CDE6ULL }, /* XSUM_XXH64_testdata[4054] */\n    { 2027, 0x000000009E3779B1ULL, 0xC704F8E26F95456BULL }, /* XSUM_XXH64_testdata[4055] */\n    { 2028, 0x0000000000000000ULL, 0x5109653FB07433C4ULL }, /* XSUM_XXH64_testdata[4056] */\n    { 2028, 0x000000009E3779B1ULL, 0xF86EC1FB54DEA364ULL }, /* XSUM_XXH64_testdata[4057] */\n    { 2029, 0x0000000000000000ULL, 0xDE17AD18E05B5D9FULL }, /* XSUM_XXH64_testdata[4058] */\n    { 2029, 0x000000009E3779B1ULL, 0xC7D54E5E728CD2ABULL }, /* XSUM_XXH64_testdata[4059] */\n    { 2030, 0x0000000000000000ULL, 0x8FA6E3EC12FC2614ULL }, /* XSUM_XXH64_testdata[4060] */\n    { 2030, 0x000000009E3779B1ULL, 0xE8069626E1A34CFAULL }, /* XSUM_XXH64_testdata[4061] */\n    { 2031, 0x0000000000000000ULL, 0x53A7FB12D7C29015ULL }, /* XSUM_XXH64_testdata[4062] */\n    { 2031, 0x000000009E3779B1ULL, 0xF31EE53CA68855B1ULL }, /* XSUM_XXH64_testdata[4063] */\n    { 2032, 0x0000000000000000ULL, 0x5037DAC3E92AF969ULL }, /* XSUM_XXH64_testdata[4064] */\n    { 2032, 0x000000009E3779B1ULL, 0xFCC3E06DAC012EB5ULL }, /* XSUM_XXH64_testdata[4065] */\n    { 2033, 0x0000000000000000ULL, 0xFB2923BD783FEDA5ULL }, /* XSUM_XXH64_testdata[4066] */\n    { 2033, 0x000000009E3779B1ULL, 0xE05D022642B48D13ULL }, /* XSUM_XXH64_testdata[4067] */\n    { 2034, 0x0000000000000000ULL, 0xDFB31A67FB10933EULL }, /* XSUM_XXH64_testdata[4068] */\n    { 2034, 0x000000009E3779B1ULL, 0x852CF923EF8BE2F0ULL }, /* XSUM_XXH64_testdata[4069] */\n    { 2035, 0x0000000000000000ULL, 0x08527FCC79A4DFBFULL }, /* XSUM_XXH64_testdata[4070] */\n    { 2035, 0x000000009E3779B1ULL, 0xFD570904132AA5E3ULL }, /* XSUM_XXH64_testdata[4071] */\n    { 2036, 0x0000000000000000ULL, 0x144C7742AAB6A290ULL }, /* XSUM_XXH64_testdata[4072] */\n    { 2036, 0x000000009E3779B1ULL, 0xF55A2D158DE6EC7DULL }, /* XSUM_XXH64_testdata[4073] */\n    { 2037, 0x0000000000000000ULL, 0x4E1EC8207BFBEBB7ULL }, /* XSUM_XXH64_testdata[4074] */\n    { 2037, 0x000000009E3779B1ULL, 0xFFB8A8934DBCAF36ULL }, /* XSUM_XXH64_testdata[4075] */\n    { 2038, 0x0000000000000000ULL, 0xA9B1B6F67D7C4816ULL }, /* XSUM_XXH64_testdata[4076] */\n    { 2038, 0x000000009E3779B1ULL, 0xDD890F871F5693B5ULL }, /* XSUM_XXH64_testdata[4077] */\n    { 2039, 0x0000000000000000ULL, 0x29007A28BF5318F7ULL }, /* XSUM_XXH64_testdata[4078] */\n    { 2039, 0x000000009E3779B1ULL, 0x3A4120FEA87D4E21ULL }, /* XSUM_XXH64_testdata[4079] */\n    { 2040, 0x0000000000000000ULL, 0x5A05EF977D7BC520ULL }, /* XSUM_XXH64_testdata[4080] */\n    { 2040, 0x000000009E3779B1ULL, 0x2CC20C74CF6B0E02ULL }, /* XSUM_XXH64_testdata[4081] */\n    { 2041, 0x0000000000000000ULL, 0x619A7CACBED025DEULL }, /* XSUM_XXH64_testdata[4082] */\n    { 2041, 0x000000009E3779B1ULL, 0x1A59057461DD07CAULL }, /* XSUM_XXH64_testdata[4083] */\n    { 2042, 0x0000000000000000ULL, 0x90727221C4FE5BC5ULL }, /* XSUM_XXH64_testdata[4084] */\n    { 2042, 0x000000009E3779B1ULL, 0x223094D8DBB3B150ULL }, /* XSUM_XXH64_testdata[4085] */\n    { 2043, 0x0000000000000000ULL, 0xBE189C3B1A1ED2BEULL }, /* XSUM_XXH64_testdata[4086] */\n    { 2043, 0x000000009E3779B1ULL, 0xA6C67750B09F8BABULL }, /* XSUM_XXH64_testdata[4087] */\n    { 2044, 0x0000000000000000ULL, 0xB0A69EF01EF46139ULL }, /* XSUM_XXH64_testdata[4088] */\n    { 2044, 0x000000009E3779B1ULL, 0xD939082D6D712291ULL }, /* XSUM_XXH64_testdata[4089] */\n    { 2045, 0x0000000000000000ULL, 0x0CCC28FE6CDBF1A1ULL }, /* XSUM_XXH64_testdata[4090] */\n    { 2045, 0x000000009E3779B1ULL, 0x73AE77047960B98CULL }, /* XSUM_XXH64_testdata[4091] */\n    { 2046, 0x0000000000000000ULL, 0x478701CD7434C1F8ULL }, /* XSUM_XXH64_testdata[4092] */\n    { 2046, 0x000000009E3779B1ULL, 0x1C03B8F3FDEE6D82ULL }, /* XSUM_XXH64_testdata[4093] */\n    { 2047, 0x0000000000000000ULL, 0xF3A36F0A22C9E50AULL }, /* XSUM_XXH64_testdata[4094] */\n    { 2047, 0x000000009E3779B1ULL, 0x2B5F2FBEA26C36DDULL }, /* XSUM_XXH64_testdata[4095] */\n    { 2048, 0x0000000000000000ULL, 0x5940F2752BC04387ULL }, /* XSUM_XXH64_testdata[4096] */\n    { 2048, 0x000000009E3779B1ULL, 0xAA26F33C2898013BULL }, /* XSUM_XXH64_testdata[4097] */\n    { 2049, 0x0000000000000000ULL, 0x3BAC0FEF077CBFB5ULL }, /* XSUM_XXH64_testdata[4098] */\n    { 2049, 0x000000009E3779B1ULL, 0x30123FD816C47DB7ULL }, /* XSUM_XXH64_testdata[4099] */\n    { 2050, 0x0000000000000000ULL, 0x0044521A47BD8036ULL }, /* XSUM_XXH64_testdata[4100] */\n    { 2050, 0x000000009E3779B1ULL, 0x6AC6CB2EBF59FD14ULL }, /* XSUM_XXH64_testdata[4101] */\n    { 2051, 0x0000000000000000ULL, 0x84CB9FF208C3DE57ULL }, /* XSUM_XXH64_testdata[4102] */\n    { 2051, 0x000000009E3779B1ULL, 0x6152B5430967FF6FULL }, /* XSUM_XXH64_testdata[4103] */\n    { 2052, 0x0000000000000000ULL, 0x9D7CFAEECDC80D1AULL }, /* XSUM_XXH64_testdata[4104] */\n    { 2052, 0x000000009E3779B1ULL, 0x181A17301EF72248ULL }, /* XSUM_XXH64_testdata[4105] */\n    { 2053, 0x0000000000000000ULL, 0x0033894BA28C94FDULL }, /* XSUM_XXH64_testdata[4106] */\n    { 2053, 0x000000009E3779B1ULL, 0x52A8A9E1B840782AULL }, /* XSUM_XXH64_testdata[4107] */\n    { 2054, 0x0000000000000000ULL, 0x23DBA47C635F0B49ULL }, /* XSUM_XXH64_testdata[4108] */\n    { 2054, 0x000000009E3779B1ULL, 0x3E92E5CA81EC20E6ULL }, /* XSUM_XXH64_testdata[4109] */\n    { 2055, 0x0000000000000000ULL, 0x72207DF802398ED1ULL }, /* XSUM_XXH64_testdata[4110] */\n    { 2055, 0x000000009E3779B1ULL, 0xFAA76E7407555C3CULL }, /* XSUM_XXH64_testdata[4111] */\n    { 2056, 0x0000000000000000ULL, 0xBA34840EDA22A84BULL }, /* XSUM_XXH64_testdata[4112] */\n    { 2056, 0x000000009E3779B1ULL, 0x839C2E5D42D7B646ULL }, /* XSUM_XXH64_testdata[4113] */\n    { 2057, 0x0000000000000000ULL, 0xA821C86122AA5E90ULL }, /* XSUM_XXH64_testdata[4114] */\n    { 2057, 0x000000009E3779B1ULL, 0x6CCEFE4854DE62A1ULL }, /* XSUM_XXH64_testdata[4115] */\n    { 2058, 0x0000000000000000ULL, 0xAA54141DD94F60F4ULL }, /* XSUM_XXH64_testdata[4116] */\n    { 2058, 0x000000009E3779B1ULL, 0x3EBBF00BA988AAA9ULL }, /* XSUM_XXH64_testdata[4117] */\n    { 2059, 0x0000000000000000ULL, 0x9CFFA3E6D4EF856BULL }, /* XSUM_XXH64_testdata[4118] */\n    { 2059, 0x000000009E3779B1ULL, 0xE97359B7C016054DULL }, /* XSUM_XXH64_testdata[4119] */\n    { 2060, 0x0000000000000000ULL, 0x1096E5FEF0CEF2B7ULL }, /* XSUM_XXH64_testdata[4120] */\n    { 2060, 0x000000009E3779B1ULL, 0x91674731DCAC45A9ULL }, /* XSUM_XXH64_testdata[4121] */\n    { 2061, 0x0000000000000000ULL, 0x58645B5EBB1C5E86ULL }, /* XSUM_XXH64_testdata[4122] */\n    { 2061, 0x000000009E3779B1ULL, 0xA1D8C75667515C1BULL }, /* XSUM_XXH64_testdata[4123] */\n    { 2062, 0x0000000000000000ULL, 0x6F2FF264D5C53AE8ULL }, /* XSUM_XXH64_testdata[4124] */\n    { 2062, 0x000000009E3779B1ULL, 0x2DF76774F2617CB8ULL }, /* XSUM_XXH64_testdata[4125] */\n    { 2063, 0x0000000000000000ULL, 0x70C18AD3E99FBE72ULL }, /* XSUM_XXH64_testdata[4126] */\n    { 2063, 0x000000009E3779B1ULL, 0x13698B043F04D8D6ULL }, /* XSUM_XXH64_testdata[4127] */\n    { 2064, 0x0000000000000000ULL, 0xEE7AC386AA60384FULL }, /* XSUM_XXH64_testdata[4128] */\n    { 2064, 0x000000009E3779B1ULL, 0x1F1FCC4810B765D0ULL }, /* XSUM_XXH64_testdata[4129] */\n    { 2065, 0x0000000000000000ULL, 0x87EA9FCAE40E32C9ULL }, /* XSUM_XXH64_testdata[4130] */\n    { 2065, 0x000000009E3779B1ULL, 0x0CA6EFB8FFA8A0DBULL }, /* XSUM_XXH64_testdata[4131] */\n    { 2066, 0x0000000000000000ULL, 0x4AAF81185FAE54E2ULL }, /* XSUM_XXH64_testdata[4132] */\n    { 2066, 0x000000009E3779B1ULL, 0x518BDE7776E23DE8ULL }, /* XSUM_XXH64_testdata[4133] */\n    { 2067, 0x0000000000000000ULL, 0xC520996D5467D052ULL }, /* XSUM_XXH64_testdata[4134] */\n    { 2067, 0x000000009E3779B1ULL, 0x87E959537D4EA858ULL }, /* XSUM_XXH64_testdata[4135] */\n    { 2068, 0x0000000000000000ULL, 0x1282D865F4671573ULL }, /* XSUM_XXH64_testdata[4136] */\n    { 2068, 0x000000009E3779B1ULL, 0x222605DA134EED25ULL }, /* XSUM_XXH64_testdata[4137] */\n    { 2069, 0x0000000000000000ULL, 0xD77C60EA52421421ULL }, /* XSUM_XXH64_testdata[4138] */\n    { 2069, 0x000000009E3779B1ULL, 0x1CF2197CEA4E73D0ULL }, /* XSUM_XXH64_testdata[4139] */\n    { 2070, 0x0000000000000000ULL, 0x820745C3450FD7A6ULL }, /* XSUM_XXH64_testdata[4140] */\n    { 2070, 0x000000009E3779B1ULL, 0xC81986FB4E1655F3ULL }, /* XSUM_XXH64_testdata[4141] */\n    { 2071, 0x0000000000000000ULL, 0xD3CD04D7E49E6A7FULL }, /* XSUM_XXH64_testdata[4142] */\n    { 2071, 0x000000009E3779B1ULL, 0x6804392508ABDA6DULL }, /* XSUM_XXH64_testdata[4143] */\n    { 2072, 0x0000000000000000ULL, 0x49223E338D9581D8ULL }, /* XSUM_XXH64_testdata[4144] */\n    { 2072, 0x000000009E3779B1ULL, 0x0564A719A29B44E9ULL }, /* XSUM_XXH64_testdata[4145] */\n    { 2073, 0x0000000000000000ULL, 0xE12FD1AB308CF5EFULL }, /* XSUM_XXH64_testdata[4146] */\n    { 2073, 0x000000009E3779B1ULL, 0x51A14BBFEEF3F96AULL }, /* XSUM_XXH64_testdata[4147] */\n    { 2074, 0x0000000000000000ULL, 0x24E77388D9DEC52AULL }, /* XSUM_XXH64_testdata[4148] */\n    { 2074, 0x000000009E3779B1ULL, 0x84961EE5CA565A4BULL }, /* XSUM_XXH64_testdata[4149] */\n    { 2075, 0x0000000000000000ULL, 0x2D9F4D697BFC7818ULL }, /* XSUM_XXH64_testdata[4150] */\n    { 2075, 0x000000009E3779B1ULL, 0xDB9E0F73E0E36113ULL }, /* XSUM_XXH64_testdata[4151] */\n    { 2076, 0x0000000000000000ULL, 0x6985BAF864405429ULL }, /* XSUM_XXH64_testdata[4152] */\n    { 2076, 0x000000009E3779B1ULL, 0x74A430F99F7E7D59ULL }, /* XSUM_XXH64_testdata[4153] */\n    { 2077, 0x0000000000000000ULL, 0xD1FF0FB6DE762B65ULL }, /* XSUM_XXH64_testdata[4154] */\n    { 2077, 0x000000009E3779B1ULL, 0x08925355BD02BEBEULL }, /* XSUM_XXH64_testdata[4155] */\n    { 2078, 0x0000000000000000ULL, 0xE1AA4852C2F2D90FULL }, /* XSUM_XXH64_testdata[4156] */\n    { 2078, 0x000000009E3779B1ULL, 0xE3EBF6643B95B8E0ULL }, /* XSUM_XXH64_testdata[4157] */\n    { 2079, 0x0000000000000000ULL, 0x62A2B14D4A8CC547ULL }, /* XSUM_XXH64_testdata[4158] */\n    { 2079, 0x000000009E3779B1ULL, 0xFDF336EEC6017DB9ULL }, /* XSUM_XXH64_testdata[4159] */\n    { 2080, 0x0000000000000000ULL, 0x6799587A76386B65ULL }, /* XSUM_XXH64_testdata[4160] */\n    { 2080, 0x000000009E3779B1ULL, 0xEE9AF077BF53BB21ULL }, /* XSUM_XXH64_testdata[4161] */\n    { 2081, 0x0000000000000000ULL, 0x6C123C1D7A5F313AULL }, /* XSUM_XXH64_testdata[4162] */\n    { 2081, 0x000000009E3779B1ULL, 0xDF1885BA2212AFA6ULL }, /* XSUM_XXH64_testdata[4163] */\n    { 2082, 0x0000000000000000ULL, 0x86D404E83ECC772DULL }, /* XSUM_XXH64_testdata[4164] */\n    { 2082, 0x000000009E3779B1ULL, 0x314A7511C6152CBDULL }, /* XSUM_XXH64_testdata[4165] */\n    { 2083, 0x0000000000000000ULL, 0x41078C62E4CDBE9BULL }, /* XSUM_XXH64_testdata[4166] */\n    { 2083, 0x000000009E3779B1ULL, 0x6474085CF26373E2ULL }, /* XSUM_XXH64_testdata[4167] */\n    { 2084, 0x0000000000000000ULL, 0x89351FFED714F97AULL }, /* XSUM_XXH64_testdata[4168] */\n    { 2084, 0x000000009E3779B1ULL, 0x14F34ACE8159FFCFULL }, /* XSUM_XXH64_testdata[4169] */\n    { 2085, 0x0000000000000000ULL, 0x3B4394508B1B5A75ULL }, /* XSUM_XXH64_testdata[4170] */\n    { 2085, 0x000000009E3779B1ULL, 0x806592BA26AA3EA9ULL }, /* XSUM_XXH64_testdata[4171] */\n    { 2086, 0x0000000000000000ULL, 0x3A2FD0C243F9BB37ULL }, /* XSUM_XXH64_testdata[4172] */\n    { 2086, 0x000000009E3779B1ULL, 0xD3351709697FC986ULL }, /* XSUM_XXH64_testdata[4173] */\n    { 2087, 0x0000000000000000ULL, 0x780857FE80A34A08ULL }, /* XSUM_XXH64_testdata[4174] */\n    { 2087, 0x000000009E3779B1ULL, 0xEAAD5FF6ECEF154CULL }, /* XSUM_XXH64_testdata[4175] */\n    { 2088, 0x0000000000000000ULL, 0x8C92A97AB0A8AC7BULL }, /* XSUM_XXH64_testdata[4176] */\n    { 2088, 0x000000009E3779B1ULL, 0x7B516808A34A2ECFULL }, /* XSUM_XXH64_testdata[4177] */\n    { 2089, 0x0000000000000000ULL, 0xA55F7709B3E7B01DULL }, /* XSUM_XXH64_testdata[4178] */\n    { 2089, 0x000000009E3779B1ULL, 0x4569B849606B8502ULL }, /* XSUM_XXH64_testdata[4179] */\n    { 2090, 0x0000000000000000ULL, 0xD8BDC1D39CE0752EULL }, /* XSUM_XXH64_testdata[4180] */\n    { 2090, 0x000000009E3779B1ULL, 0x9F2BC68076C09D7BULL }, /* XSUM_XXH64_testdata[4181] */\n    { 2091, 0x0000000000000000ULL, 0x398E12B9780E0BA1ULL }, /* XSUM_XXH64_testdata[4182] */\n    { 2091, 0x000000009E3779B1ULL, 0x62EB8E954AC92C8DULL }, /* XSUM_XXH64_testdata[4183] */\n    { 2092, 0x0000000000000000ULL, 0x2142BCE894671761ULL }, /* XSUM_XXH64_testdata[4184] */\n    { 2092, 0x000000009E3779B1ULL, 0x0A193CDDFF220C96ULL }, /* XSUM_XXH64_testdata[4185] */\n    { 2093, 0x0000000000000000ULL, 0x9487066C0B904136ULL }, /* XSUM_XXH64_testdata[4186] */\n    { 2093, 0x000000009E3779B1ULL, 0x9F6DEC10197482CCULL }, /* XSUM_XXH64_testdata[4187] */\n    { 2094, 0x0000000000000000ULL, 0x72954797A955B808ULL }, /* XSUM_XXH64_testdata[4188] */\n    { 2094, 0x000000009E3779B1ULL, 0xE6DA9081618333ABULL }, /* XSUM_XXH64_testdata[4189] */\n    { 2095, 0x0000000000000000ULL, 0x09011C01FB315E1EULL }, /* XSUM_XXH64_testdata[4190] */\n    { 2095, 0x000000009E3779B1ULL, 0x220EC8C4E5D46FBBULL }, /* XSUM_XXH64_testdata[4191] */\n    { 2096, 0x0000000000000000ULL, 0x14652DD6033BE533ULL }, /* XSUM_XXH64_testdata[4192] */\n    { 2096, 0x000000009E3779B1ULL, 0x2A78CFC91C228839ULL }, /* XSUM_XXH64_testdata[4193] */\n    { 2097, 0x0000000000000000ULL, 0x9237135C5B1C656EULL }, /* XSUM_XXH64_testdata[4194] */\n    { 2097, 0x000000009E3779B1ULL, 0xF2EBCA6F07120BE4ULL }, /* XSUM_XXH64_testdata[4195] */\n    { 2098, 0x0000000000000000ULL, 0xC26062D31FFF67C3ULL }, /* XSUM_XXH64_testdata[4196] */\n    { 2098, 0x000000009E3779B1ULL, 0x7AF3934AFFADC60CULL }, /* XSUM_XXH64_testdata[4197] */\n    { 2099, 0x0000000000000000ULL, 0x3301C88334AFD200ULL }, /* XSUM_XXH64_testdata[4198] */\n    { 2099, 0x000000009E3779B1ULL, 0x6C7912A7CF157428ULL }, /* XSUM_XXH64_testdata[4199] */\n    { 2100, 0x0000000000000000ULL, 0xCE0A716B6C313392ULL }, /* XSUM_XXH64_testdata[4200] */\n    { 2100, 0x000000009E3779B1ULL, 0x2860586DDA840F0CULL }, /* XSUM_XXH64_testdata[4201] */\n    { 2101, 0x0000000000000000ULL, 0x1186E7E20799442DULL }, /* XSUM_XXH64_testdata[4202] */\n    { 2101, 0x000000009E3779B1ULL, 0x444E38FAA5CFCD4EULL }, /* XSUM_XXH64_testdata[4203] */\n    { 2102, 0x0000000000000000ULL, 0x7EACC755EE3137A5ULL }, /* XSUM_XXH64_testdata[4204] */\n    { 2102, 0x000000009E3779B1ULL, 0x5B2115372C72793CULL }, /* XSUM_XXH64_testdata[4205] */\n    { 2103, 0x0000000000000000ULL, 0x6B9762647B56CD52ULL }, /* XSUM_XXH64_testdata[4206] */\n    { 2103, 0x000000009E3779B1ULL, 0x4F8E8560D5A7C7CFULL }, /* XSUM_XXH64_testdata[4207] */\n    { 2104, 0x0000000000000000ULL, 0x74C601BB31E0DF08ULL }, /* XSUM_XXH64_testdata[4208] */\n    { 2104, 0x000000009E3779B1ULL, 0x2383AEF86CA8A3CDULL }, /* XSUM_XXH64_testdata[4209] */\n    { 2105, 0x0000000000000000ULL, 0xAF3345348D1009B5ULL }, /* XSUM_XXH64_testdata[4210] */\n    { 2105, 0x000000009E3779B1ULL, 0x9E85C04B850EE216ULL }, /* XSUM_XXH64_testdata[4211] */\n    { 2106, 0x0000000000000000ULL, 0xAFE877C6FD7C563BULL }, /* XSUM_XXH64_testdata[4212] */\n    { 2106, 0x000000009E3779B1ULL, 0x4CB18BBE4045EB30ULL }, /* XSUM_XXH64_testdata[4213] */\n    { 2107, 0x0000000000000000ULL, 0xA409FF6AF28DC820ULL }, /* XSUM_XXH64_testdata[4214] */\n    { 2107, 0x000000009E3779B1ULL, 0xC9CA4D9C25C84B99ULL }, /* XSUM_XXH64_testdata[4215] */\n    { 2108, 0x0000000000000000ULL, 0xA27F38B662E03C79ULL }, /* XSUM_XXH64_testdata[4216] */\n    { 2108, 0x000000009E3779B1ULL, 0xD648D7BB80D814FEULL }, /* XSUM_XXH64_testdata[4217] */\n    { 2109, 0x0000000000000000ULL, 0x5AC552E981AE8B24ULL }, /* XSUM_XXH64_testdata[4218] */\n    { 2109, 0x000000009E3779B1ULL, 0x6D6A9FCAC6B03F2EULL }, /* XSUM_XXH64_testdata[4219] */\n    { 2110, 0x0000000000000000ULL, 0x504E7C8643949EEFULL }, /* XSUM_XXH64_testdata[4220] */\n    { 2110, 0x000000009E3779B1ULL, 0xFF3EE5A60DDBE095ULL }, /* XSUM_XXH64_testdata[4221] */\n    { 2111, 0x0000000000000000ULL, 0xBE7DC56D5383A688ULL }, /* XSUM_XXH64_testdata[4222] */\n    { 2111, 0x000000009E3779B1ULL, 0x9F4D200C77861730ULL }, /* XSUM_XXH64_testdata[4223] */\n    { 2112, 0x0000000000000000ULL, 0x834C20C1D1CDDDE3ULL }, /* XSUM_XXH64_testdata[4224] */\n    { 2112, 0x000000009E3779B1ULL, 0x84D3DE364520C70BULL }, /* XSUM_XXH64_testdata[4225] */\n    { 2113, 0x0000000000000000ULL, 0xF4C8E415579EE594ULL }, /* XSUM_XXH64_testdata[4226] */\n    { 2113, 0x000000009E3779B1ULL, 0x8D515665D403DC73ULL }, /* XSUM_XXH64_testdata[4227] */\n    { 2114, 0x0000000000000000ULL, 0xA53B6D27612B9B51ULL }, /* XSUM_XXH64_testdata[4228] */\n    { 2114, 0x000000009E3779B1ULL, 0x8C14F008F4132919ULL }, /* XSUM_XXH64_testdata[4229] */\n    { 2115, 0x0000000000000000ULL, 0x47130CCABE4095E5ULL }, /* XSUM_XXH64_testdata[4230] */\n    { 2115, 0x000000009E3779B1ULL, 0xC2D80E3E8B53222FULL }, /* XSUM_XXH64_testdata[4231] */\n    { 2116, 0x0000000000000000ULL, 0xD6197D649A921D36ULL }, /* XSUM_XXH64_testdata[4232] */\n    { 2116, 0x000000009E3779B1ULL, 0x2FE3E5AA6224198AULL }, /* XSUM_XXH64_testdata[4233] */\n    { 2117, 0x0000000000000000ULL, 0xAAED01318EB254EDULL }, /* XSUM_XXH64_testdata[4234] */\n    { 2117, 0x000000009E3779B1ULL, 0x8E439C09761E8132ULL }, /* XSUM_XXH64_testdata[4235] */\n    { 2118, 0x0000000000000000ULL, 0x3F38EE9A3391DD62ULL }, /* XSUM_XXH64_testdata[4236] */\n    { 2118, 0x000000009E3779B1ULL, 0xC3125F364FA13A87ULL }, /* XSUM_XXH64_testdata[4237] */\n    { 2119, 0x0000000000000000ULL, 0x3E34DB0E06852641ULL }, /* XSUM_XXH64_testdata[4238] */\n    { 2119, 0x000000009E3779B1ULL, 0x262FCBF508B5B3B7ULL }, /* XSUM_XXH64_testdata[4239] */\n    { 2120, 0x0000000000000000ULL, 0xC5AE3CF484FA43B1ULL }, /* XSUM_XXH64_testdata[4240] */\n    { 2120, 0x000000009E3779B1ULL, 0x76F8A12780996C81ULL }, /* XSUM_XXH64_testdata[4241] */\n    { 2121, 0x0000000000000000ULL, 0x2443FF05EFC9ED92ULL }, /* XSUM_XXH64_testdata[4242] */\n    { 2121, 0x000000009E3779B1ULL, 0x84FD6ED0A2E8F6BBULL }, /* XSUM_XXH64_testdata[4243] */\n    { 2122, 0x0000000000000000ULL, 0x60BF6BE620291068ULL }, /* XSUM_XXH64_testdata[4244] */\n    { 2122, 0x000000009E3779B1ULL, 0x2A4406CBBD6BABE5ULL }, /* XSUM_XXH64_testdata[4245] */\n    { 2123, 0x0000000000000000ULL, 0x7B35FA5307533583ULL }, /* XSUM_XXH64_testdata[4246] */\n    { 2123, 0x000000009E3779B1ULL, 0x3499FC630E4E282DULL }, /* XSUM_XXH64_testdata[4247] */\n    { 2124, 0x0000000000000000ULL, 0xA6EF8CD6F5ED65C5ULL }, /* XSUM_XXH64_testdata[4248] */\n    { 2124, 0x000000009E3779B1ULL, 0xA8EFFB4312F09C95ULL }, /* XSUM_XXH64_testdata[4249] */\n    { 2125, 0x0000000000000000ULL, 0x7FFDFAE1632AEDE1ULL }, /* XSUM_XXH64_testdata[4250] */\n    { 2125, 0x000000009E3779B1ULL, 0xBA808A1B7D5202E8ULL }, /* XSUM_XXH64_testdata[4251] */\n    { 2126, 0x0000000000000000ULL, 0x1EA9E14D815B0E15ULL }, /* XSUM_XXH64_testdata[4252] */\n    { 2126, 0x000000009E3779B1ULL, 0xCDB8A44CBAA78FA4ULL }, /* XSUM_XXH64_testdata[4253] */\n    { 2127, 0x0000000000000000ULL, 0xF29148C17974794BULL }, /* XSUM_XXH64_testdata[4254] */\n    { 2127, 0x000000009E3779B1ULL, 0x7FB7B39F13C2A6EBULL }, /* XSUM_XXH64_testdata[4255] */\n    { 2128, 0x0000000000000000ULL, 0xD91E468DD5A9E938ULL }, /* XSUM_XXH64_testdata[4256] */\n    { 2128, 0x000000009E3779B1ULL, 0xAAAD4A6FC44F967FULL }, /* XSUM_XXH64_testdata[4257] */\n    { 2129, 0x0000000000000000ULL, 0x4F7A5955B9D5A37AULL }, /* XSUM_XXH64_testdata[4258] */\n    { 2129, 0x000000009E3779B1ULL, 0x86969D6057AC0A5BULL }, /* XSUM_XXH64_testdata[4259] */\n    { 2130, 0x0000000000000000ULL, 0x7EC790F0E5C01DBEULL }, /* XSUM_XXH64_testdata[4260] */\n    { 2130, 0x000000009E3779B1ULL, 0x18991A7DF8F8CABAULL }, /* XSUM_XXH64_testdata[4261] */\n    { 2131, 0x0000000000000000ULL, 0x07F65E66C773DDDAULL }, /* XSUM_XXH64_testdata[4262] */\n    { 2131, 0x000000009E3779B1ULL, 0xD742E5B5D10066A7ULL }, /* XSUM_XXH64_testdata[4263] */\n    { 2132, 0x0000000000000000ULL, 0xACD1F8F28C590CD4ULL }, /* XSUM_XXH64_testdata[4264] */\n    { 2132, 0x000000009E3779B1ULL, 0x6CB8902519564A66ULL }, /* XSUM_XXH64_testdata[4265] */\n    { 2133, 0x0000000000000000ULL, 0xE4D6A70BCB1A245EULL }, /* XSUM_XXH64_testdata[4266] */\n    { 2133, 0x000000009E3779B1ULL, 0xF7529A659F22D37AULL }, /* XSUM_XXH64_testdata[4267] */\n    { 2134, 0x0000000000000000ULL, 0xF312A484DFA93AFBULL }, /* XSUM_XXH64_testdata[4268] */\n    { 2134, 0x000000009E3779B1ULL, 0xE6E1D440C014677EULL }, /* XSUM_XXH64_testdata[4269] */\n    { 2135, 0x0000000000000000ULL, 0x8148BBE3013AA9E7ULL }, /* XSUM_XXH64_testdata[4270] */\n    { 2135, 0x000000009E3779B1ULL, 0x198B1BB13B57A427ULL }, /* XSUM_XXH64_testdata[4271] */\n    { 2136, 0x0000000000000000ULL, 0xA27C235275417E09ULL }, /* XSUM_XXH64_testdata[4272] */\n    { 2136, 0x000000009E3779B1ULL, 0xD039DDDC08FB6B9DULL }, /* XSUM_XXH64_testdata[4273] */\n    { 2137, 0x0000000000000000ULL, 0x0898F85EBE67332AULL }, /* XSUM_XXH64_testdata[4274] */\n    { 2137, 0x000000009E3779B1ULL, 0xB80710F9DB9F327DULL }, /* XSUM_XXH64_testdata[4275] */\n    { 2138, 0x0000000000000000ULL, 0xB51E48C7981571F4ULL }, /* XSUM_XXH64_testdata[4276] */\n    { 2138, 0x000000009E3779B1ULL, 0x5BC03D99D9369EBCULL }, /* XSUM_XXH64_testdata[4277] */\n    { 2139, 0x0000000000000000ULL, 0xD5B2D4AFF43F38ADULL }, /* XSUM_XXH64_testdata[4278] */\n    { 2139, 0x000000009E3779B1ULL, 0x27CF28C671F98AFCULL }, /* XSUM_XXH64_testdata[4279] */\n    { 2140, 0x0000000000000000ULL, 0x45EDBD88E2265690ULL }, /* XSUM_XXH64_testdata[4280] */\n    { 2140, 0x000000009E3779B1ULL, 0xD8F82B9893BD894CULL }, /* XSUM_XXH64_testdata[4281] */\n    { 2141, 0x0000000000000000ULL, 0xA0BBBEDF99503B3BULL }, /* XSUM_XXH64_testdata[4282] */\n    { 2141, 0x000000009E3779B1ULL, 0x7686CA86FD044DF0ULL }, /* XSUM_XXH64_testdata[4283] */\n    { 2142, 0x0000000000000000ULL, 0xD765F1EF7D2059C5ULL }, /* XSUM_XXH64_testdata[4284] */\n    { 2142, 0x000000009E3779B1ULL, 0xFE6FBCF07AABC4CCULL }, /* XSUM_XXH64_testdata[4285] */\n    { 2143, 0x0000000000000000ULL, 0x58175E7E13EAA9D8ULL }, /* XSUM_XXH64_testdata[4286] */\n    { 2143, 0x000000009E3779B1ULL, 0xE546DB18393B277DULL }, /* XSUM_XXH64_testdata[4287] */\n    { 2144, 0x0000000000000000ULL, 0x8990BB7C5F7480E5ULL }, /* XSUM_XXH64_testdata[4288] */\n    { 2144, 0x000000009E3779B1ULL, 0x1A730E6F65DF72DBULL }, /* XSUM_XXH64_testdata[4289] */\n    { 2145, 0x0000000000000000ULL, 0xBEC9CDFE264CEDA6ULL }, /* XSUM_XXH64_testdata[4290] */\n    { 2145, 0x000000009E3779B1ULL, 0xCCAA93F2CC103401ULL }, /* XSUM_XXH64_testdata[4291] */\n    { 2146, 0x0000000000000000ULL, 0x3C03458ACA57F868ULL }, /* XSUM_XXH64_testdata[4292] */\n    { 2146, 0x000000009E3779B1ULL, 0x10676C21FF394B3BULL }, /* XSUM_XXH64_testdata[4293] */\n    { 2147, 0x0000000000000000ULL, 0x0553858EE7DA568BULL }, /* XSUM_XXH64_testdata[4294] */\n    { 2147, 0x000000009E3779B1ULL, 0x0BB4B9EAFF9440D2ULL }, /* XSUM_XXH64_testdata[4295] */\n    { 2148, 0x0000000000000000ULL, 0x4916EF58834A3252ULL }, /* XSUM_XXH64_testdata[4296] */\n    { 2148, 0x000000009E3779B1ULL, 0xEA0D33FC9C243A5DULL }, /* XSUM_XXH64_testdata[4297] */\n    { 2149, 0x0000000000000000ULL, 0xFAE135CEDB95E7CEULL }, /* XSUM_XXH64_testdata[4298] */\n    { 2149, 0x000000009E3779B1ULL, 0x90482F79FC1CA9F1ULL }, /* XSUM_XXH64_testdata[4299] */\n    { 2150, 0x0000000000000000ULL, 0x6F1AEEBDD0E1823BULL }, /* XSUM_XXH64_testdata[4300] */\n    { 2150, 0x000000009E3779B1ULL, 0xFFD07A254B97BACCULL }, /* XSUM_XXH64_testdata[4301] */\n    { 2151, 0x0000000000000000ULL, 0x43EDE3066FDA0040ULL }, /* XSUM_XXH64_testdata[4302] */\n    { 2151, 0x000000009E3779B1ULL, 0xAF7336B4D1853C7EULL }, /* XSUM_XXH64_testdata[4303] */\n    { 2152, 0x0000000000000000ULL, 0x861FCE7AE8678941ULL }, /* XSUM_XXH64_testdata[4304] */\n    { 2152, 0x000000009E3779B1ULL, 0x0F9C545750101511ULL }, /* XSUM_XXH64_testdata[4305] */\n    { 2153, 0x0000000000000000ULL, 0x51870C634310F32AULL }, /* XSUM_XXH64_testdata[4306] */\n    { 2153, 0x000000009E3779B1ULL, 0x0326BD661840DD86ULL }, /* XSUM_XXH64_testdata[4307] */\n    { 2154, 0x0000000000000000ULL, 0x3DF958E2B948A48CULL }, /* XSUM_XXH64_testdata[4308] */\n    { 2154, 0x000000009E3779B1ULL, 0x0F2B3E16806DF639ULL }, /* XSUM_XXH64_testdata[4309] */\n    { 2155, 0x0000000000000000ULL, 0x4536713B86E9564DULL }, /* XSUM_XXH64_testdata[4310] */\n    { 2155, 0x000000009E3779B1ULL, 0xD976733D8F9E0619ULL }, /* XSUM_XXH64_testdata[4311] */\n    { 2156, 0x0000000000000000ULL, 0xD10F3C77932333EEULL }, /* XSUM_XXH64_testdata[4312] */\n    { 2156, 0x000000009E3779B1ULL, 0xB93E27EFF2953E52ULL }, /* XSUM_XXH64_testdata[4313] */\n    { 2157, 0x0000000000000000ULL, 0x5509CFEC5E92713FULL }, /* XSUM_XXH64_testdata[4314] */\n    { 2157, 0x000000009E3779B1ULL, 0x3FA08BB4F066778EULL }, /* XSUM_XXH64_testdata[4315] */\n    { 2158, 0x0000000000000000ULL, 0x47C128A5EFF25028ULL }, /* XSUM_XXH64_testdata[4316] */\n    { 2158, 0x000000009E3779B1ULL, 0xC482683096EC165EULL }, /* XSUM_XXH64_testdata[4317] */\n    { 2159, 0x0000000000000000ULL, 0xB16525A1BE2ACB88ULL }, /* XSUM_XXH64_testdata[4318] */\n    { 2159, 0x000000009E3779B1ULL, 0xD4312DC78F979738ULL }, /* XSUM_XXH64_testdata[4319] */\n    { 2160, 0x0000000000000000ULL, 0x86C3F4858ABD1937ULL }, /* XSUM_XXH64_testdata[4320] */\n    { 2160, 0x000000009E3779B1ULL, 0x1A4B93C9621A6D29ULL }, /* XSUM_XXH64_testdata[4321] */\n    { 2161, 0x0000000000000000ULL, 0xD763296BCDB7E927ULL }, /* XSUM_XXH64_testdata[4322] */\n    { 2161, 0x000000009E3779B1ULL, 0x07D70A2A6A58B83FULL }, /* XSUM_XXH64_testdata[4323] */\n    { 2162, 0x0000000000000000ULL, 0x3A9B0CFE29777F3CULL }, /* XSUM_XXH64_testdata[4324] */\n    { 2162, 0x000000009E3779B1ULL, 0xD2AFEDD47D0451E7ULL }, /* XSUM_XXH64_testdata[4325] */\n    { 2163, 0x0000000000000000ULL, 0x3FC71F79F6675489ULL }, /* XSUM_XXH64_testdata[4326] */\n    { 2163, 0x000000009E3779B1ULL, 0x11222423ABFCF05AULL }, /* XSUM_XXH64_testdata[4327] */\n    { 2164, 0x0000000000000000ULL, 0xD0EA8E4BCF7929F7ULL }, /* XSUM_XXH64_testdata[4328] */\n    { 2164, 0x000000009E3779B1ULL, 0x8B337ABF3E1434D9ULL }, /* XSUM_XXH64_testdata[4329] */\n    { 2165, 0x0000000000000000ULL, 0x5DCD8820A0E2E462ULL }, /* XSUM_XXH64_testdata[4330] */\n    { 2165, 0x000000009E3779B1ULL, 0xC044B75DCC5D4DAAULL }, /* XSUM_XXH64_testdata[4331] */\n    { 2166, 0x0000000000000000ULL, 0x8B57F38045CC69D7ULL }, /* XSUM_XXH64_testdata[4332] */\n    { 2166, 0x000000009E3779B1ULL, 0xBEC998DED9EDCAA6ULL }, /* XSUM_XXH64_testdata[4333] */\n    { 2167, 0x0000000000000000ULL, 0x6C3878F759B3E106ULL }, /* XSUM_XXH64_testdata[4334] */\n    { 2167, 0x000000009E3779B1ULL, 0x7A9FE47D20942215ULL }, /* XSUM_XXH64_testdata[4335] */\n    { 2168, 0x0000000000000000ULL, 0x874038A6E4222EF0ULL }, /* XSUM_XXH64_testdata[4336] */\n    { 2168, 0x000000009E3779B1ULL, 0x2E7EAD2589A83B92ULL }, /* XSUM_XXH64_testdata[4337] */\n    { 2169, 0x0000000000000000ULL, 0xFF8803E169EFD2A8ULL }, /* XSUM_XXH64_testdata[4338] */\n    { 2169, 0x000000009E3779B1ULL, 0x79B3159B040EE36CULL }, /* XSUM_XXH64_testdata[4339] */\n    { 2170, 0x0000000000000000ULL, 0x9D0E380D955C6317ULL }, /* XSUM_XXH64_testdata[4340] */\n    { 2170, 0x000000009E3779B1ULL, 0xDFE68AC88309395DULL }, /* XSUM_XXH64_testdata[4341] */\n    { 2171, 0x0000000000000000ULL, 0x2008B4A47392D513ULL }, /* XSUM_XXH64_testdata[4342] */\n    { 2171, 0x000000009E3779B1ULL, 0x67FCB44E010AB0C9ULL }, /* XSUM_XXH64_testdata[4343] */\n    { 2172, 0x0000000000000000ULL, 0xDC969F9C747067EAULL }, /* XSUM_XXH64_testdata[4344] */\n    { 2172, 0x000000009E3779B1ULL, 0x7BD46D2827AAE44CULL }, /* XSUM_XXH64_testdata[4345] */\n    { 2173, 0x0000000000000000ULL, 0x58BC7150352BA58FULL }, /* XSUM_XXH64_testdata[4346] */\n    { 2173, 0x000000009E3779B1ULL, 0xBD32A63B9AF1786EULL }, /* XSUM_XXH64_testdata[4347] */\n    { 2174, 0x0000000000000000ULL, 0xA925D126BE7B6462ULL }, /* XSUM_XXH64_testdata[4348] */\n    { 2174, 0x000000009E3779B1ULL, 0xD7D50D29E043C558ULL }, /* XSUM_XXH64_testdata[4349] */\n    { 2175, 0x0000000000000000ULL, 0x2BAF6491DCF87362ULL }, /* XSUM_XXH64_testdata[4350] */\n    { 2175, 0x000000009E3779B1ULL, 0x95AFC2F6DA50A5E4ULL }, /* XSUM_XXH64_testdata[4351] */\n    { 2176, 0x0000000000000000ULL, 0xD15101A732424692ULL }, /* XSUM_XXH64_testdata[4352] */\n    { 2176, 0x000000009E3779B1ULL, 0x82FD009AA26EFF4FULL }, /* XSUM_XXH64_testdata[4353] */\n    { 2177, 0x0000000000000000ULL, 0x9B9FACB2392017C8ULL }, /* XSUM_XXH64_testdata[4354] */\n    { 2177, 0x000000009E3779B1ULL, 0x0F2DC2B9FB9D03DDULL }, /* XSUM_XXH64_testdata[4355] */\n    { 2178, 0x0000000000000000ULL, 0x3B57E051C347FCBEULL }, /* XSUM_XXH64_testdata[4356] */\n    { 2178, 0x000000009E3779B1ULL, 0x454C8FC8C2B75DB3ULL }, /* XSUM_XXH64_testdata[4357] */\n    { 2179, 0x0000000000000000ULL, 0x2E90998F0F1F9E64ULL }, /* XSUM_XXH64_testdata[4358] */\n    { 2179, 0x000000009E3779B1ULL, 0x198CA081782AAC42ULL }, /* XSUM_XXH64_testdata[4359] */\n    { 2180, 0x0000000000000000ULL, 0x204C5B3AF52DC25CULL }, /* XSUM_XXH64_testdata[4360] */\n    { 2180, 0x000000009E3779B1ULL, 0x88D79503E461DEE3ULL }, /* XSUM_XXH64_testdata[4361] */\n    { 2181, 0x0000000000000000ULL, 0x078DA5447DFC0395ULL }, /* XSUM_XXH64_testdata[4362] */\n    { 2181, 0x000000009E3779B1ULL, 0x2065CDFBCD1900C8ULL }, /* XSUM_XXH64_testdata[4363] */\n    { 2182, 0x0000000000000000ULL, 0xEE9725992BCC2292ULL }, /* XSUM_XXH64_testdata[4364] */\n    { 2182, 0x000000009E3779B1ULL, 0x63A828CB16339365ULL }, /* XSUM_XXH64_testdata[4365] */\n    { 2183, 0x0000000000000000ULL, 0x13A0DDEAC067C804ULL }, /* XSUM_XXH64_testdata[4366] */\n    { 2183, 0x000000009E3779B1ULL, 0x3BCBD977B1D8FC17ULL }, /* XSUM_XXH64_testdata[4367] */\n    { 2184, 0x0000000000000000ULL, 0x2828598F4CC5CA5AULL }, /* XSUM_XXH64_testdata[4368] */\n    { 2184, 0x000000009E3779B1ULL, 0x612B4B0D9E2BF6C1ULL }, /* XSUM_XXH64_testdata[4369] */\n    { 2185, 0x0000000000000000ULL, 0x4E5D8F1A7298695EULL }, /* XSUM_XXH64_testdata[4370] */\n    { 2185, 0x000000009E3779B1ULL, 0xB595A31711A62559ULL }, /* XSUM_XXH64_testdata[4371] */\n    { 2186, 0x0000000000000000ULL, 0x0E61D730286A3963ULL }, /* XSUM_XXH64_testdata[4372] */\n    { 2186, 0x000000009E3779B1ULL, 0xA890A0CD18D07DAFULL }, /* XSUM_XXH64_testdata[4373] */\n    { 2187, 0x0000000000000000ULL, 0xB670D14D8E421128ULL }, /* XSUM_XXH64_testdata[4374] */\n    { 2187, 0x000000009E3779B1ULL, 0x06151A5E9C9C6A10ULL }, /* XSUM_XXH64_testdata[4375] */\n    { 2188, 0x0000000000000000ULL, 0x6E485FF901F48B6EULL }, /* XSUM_XXH64_testdata[4376] */\n    { 2188, 0x000000009E3779B1ULL, 0x4E05588B09066C49ULL }, /* XSUM_XXH64_testdata[4377] */\n    { 2189, 0x0000000000000000ULL, 0xE683F71431065B01ULL }, /* XSUM_XXH64_testdata[4378] */\n    { 2189, 0x000000009E3779B1ULL, 0x24750B60F988EA46ULL }, /* XSUM_XXH64_testdata[4379] */\n    { 2190, 0x0000000000000000ULL, 0x98F67B6433B31850ULL }, /* XSUM_XXH64_testdata[4380] */\n    { 2190, 0x000000009E3779B1ULL, 0xBAD9DF32E5477CA0ULL }, /* XSUM_XXH64_testdata[4381] */\n    { 2191, 0x0000000000000000ULL, 0x34F7DC76604CEE7CULL }, /* XSUM_XXH64_testdata[4382] */\n    { 2191, 0x000000009E3779B1ULL, 0xD2B1EC5C72412B93ULL }, /* XSUM_XXH64_testdata[4383] */\n    { 2192, 0x0000000000000000ULL, 0x923D788C103917B0ULL }, /* XSUM_XXH64_testdata[4384] */\n    { 2192, 0x000000009E3779B1ULL, 0xC98D3E689CDAE34AULL }, /* XSUM_XXH64_testdata[4385] */\n    { 2193, 0x0000000000000000ULL, 0x84FB695651BCEF50ULL }, /* XSUM_XXH64_testdata[4386] */\n    { 2193, 0x000000009E3779B1ULL, 0x3C7332396DA63C0CULL }, /* XSUM_XXH64_testdata[4387] */\n    { 2194, 0x0000000000000000ULL, 0xEB89464C2622AF12ULL }, /* XSUM_XXH64_testdata[4388] */\n    { 2194, 0x000000009E3779B1ULL, 0x1ED1885839BDAD24ULL }, /* XSUM_XXH64_testdata[4389] */\n    { 2195, 0x0000000000000000ULL, 0x1830E0625482F65DULL }, /* XSUM_XXH64_testdata[4390] */\n    { 2195, 0x000000009E3779B1ULL, 0xAF9B9E10C0D4639FULL }, /* XSUM_XXH64_testdata[4391] */\n    { 2196, 0x0000000000000000ULL, 0xA5A21E8ABE2FDC26ULL }, /* XSUM_XXH64_testdata[4392] */\n    { 2196, 0x000000009E3779B1ULL, 0xE7B6A83604355DADULL }, /* XSUM_XXH64_testdata[4393] */\n    { 2197, 0x0000000000000000ULL, 0x2B4A32A9AE6C7C36ULL }, /* XSUM_XXH64_testdata[4394] */\n    { 2197, 0x000000009E3779B1ULL, 0xE2431DB9D16CA930ULL }, /* XSUM_XXH64_testdata[4395] */\n    { 2198, 0x0000000000000000ULL, 0x3020272389CDAE15ULL }, /* XSUM_XXH64_testdata[4396] */\n    { 2198, 0x000000009E3779B1ULL, 0x547E977C6EFBDE00ULL }, /* XSUM_XXH64_testdata[4397] */\n    { 2199, 0x0000000000000000ULL, 0x2703F391C3C7E8B2ULL }, /* XSUM_XXH64_testdata[4398] */\n    { 2199, 0x000000009E3779B1ULL, 0xD3B907D01F0B44DFULL }, /* XSUM_XXH64_testdata[4399] */\n    { 2200, 0x0000000000000000ULL, 0x8005FB09BE31836FULL }, /* XSUM_XXH64_testdata[4400] */\n    { 2200, 0x000000009E3779B1ULL, 0x1EA1BF1B7891F032ULL }, /* XSUM_XXH64_testdata[4401] */\n    { 2201, 0x0000000000000000ULL, 0xBD61E79200ECF868ULL }, /* XSUM_XXH64_testdata[4402] */\n    { 2201, 0x000000009E3779B1ULL, 0x2C737497D86EC4D5ULL }, /* XSUM_XXH64_testdata[4403] */\n    { 2202, 0x0000000000000000ULL, 0x31CA91FDF6DAB2BDULL }, /* XSUM_XXH64_testdata[4404] */\n    { 2202, 0x000000009E3779B1ULL, 0xCA5F0726649E986DULL }, /* XSUM_XXH64_testdata[4405] */\n    { 2203, 0x0000000000000000ULL, 0xCDD2B743C52CC17EULL }, /* XSUM_XXH64_testdata[4406] */\n    { 2203, 0x000000009E3779B1ULL, 0xF8F3942AE8BA9156ULL }, /* XSUM_XXH64_testdata[4407] */\n    { 2204, 0x0000000000000000ULL, 0x1EF6A18106C2B10AULL }, /* XSUM_XXH64_testdata[4408] */\n    { 2204, 0x000000009E3779B1ULL, 0x379F732EBCB0A9C1ULL }, /* XSUM_XXH64_testdata[4409] */\n    { 2205, 0x0000000000000000ULL, 0xF50219BCA1C470B1ULL }, /* XSUM_XXH64_testdata[4410] */\n    { 2205, 0x000000009E3779B1ULL, 0x579AAFCD9BE7BD98ULL }, /* XSUM_XXH64_testdata[4411] */\n    { 2206, 0x0000000000000000ULL, 0x59E24265CB7ECB9DULL }, /* XSUM_XXH64_testdata[4412] */\n    { 2206, 0x000000009E3779B1ULL, 0x749C5B407D39C828ULL }, /* XSUM_XXH64_testdata[4413] */\n    { 2207, 0x0000000000000000ULL, 0x7980AC4E7AE52CDBULL }, /* XSUM_XXH64_testdata[4414] */\n    { 2207, 0x000000009E3779B1ULL, 0x3AC6B48F03673E9AULL }, /* XSUM_XXH64_testdata[4415] */\n    { 2208, 0x0000000000000000ULL, 0x686A6AC846EA5DDDULL }, /* XSUM_XXH64_testdata[4416] */\n    { 2208, 0x000000009E3779B1ULL, 0x38439DC67510FF8FULL }, /* XSUM_XXH64_testdata[4417] */\n    { 2209, 0x0000000000000000ULL, 0x72A03CDEB74E2163ULL }, /* XSUM_XXH64_testdata[4418] */\n    { 2209, 0x000000009E3779B1ULL, 0x0D000BE93DCC5ECFULL }, /* XSUM_XXH64_testdata[4419] */\n    { 2210, 0x0000000000000000ULL, 0x8F59F4BE0347F6A0ULL }, /* XSUM_XXH64_testdata[4420] */\n    { 2210, 0x000000009E3779B1ULL, 0x55DE8A937DAD0E26ULL }, /* XSUM_XXH64_testdata[4421] */\n    { 2211, 0x0000000000000000ULL, 0xEDB688D677917862ULL }, /* XSUM_XXH64_testdata[4422] */\n    { 2211, 0x000000009E3779B1ULL, 0x364EAA64EFD02B0EULL }, /* XSUM_XXH64_testdata[4423] */\n    { 2212, 0x0000000000000000ULL, 0x12A9B0FA531142CFULL }, /* XSUM_XXH64_testdata[4424] */\n    { 2212, 0x000000009E3779B1ULL, 0x68588E4852100B96ULL }, /* XSUM_XXH64_testdata[4425] */\n    { 2213, 0x0000000000000000ULL, 0xEF8777562697F6DCULL }, /* XSUM_XXH64_testdata[4426] */\n    { 2213, 0x000000009E3779B1ULL, 0xEAA94DCA7908F92EULL }, /* XSUM_XXH64_testdata[4427] */\n    { 2214, 0x0000000000000000ULL, 0x521EF066ED29DFC9ULL }, /* XSUM_XXH64_testdata[4428] */\n    { 2214, 0x000000009E3779B1ULL, 0xD732A6BDE5983D8DULL }, /* XSUM_XXH64_testdata[4429] */\n    { 2215, 0x0000000000000000ULL, 0x777A961AEC5931BBULL }, /* XSUM_XXH64_testdata[4430] */\n    { 2215, 0x000000009E3779B1ULL, 0x9DEDA8D94A361626ULL }, /* XSUM_XXH64_testdata[4431] */\n    { 2216, 0x0000000000000000ULL, 0x2CC5A283D151DA9CULL }, /* XSUM_XXH64_testdata[4432] */\n    { 2216, 0x000000009E3779B1ULL, 0xDF2A034C237DF27AULL }, /* XSUM_XXH64_testdata[4433] */\n    { 2217, 0x0000000000000000ULL, 0x686031883ECC15E1ULL }, /* XSUM_XXH64_testdata[4434] */\n    { 2217, 0x000000009E3779B1ULL, 0xEC4AF6D7AA66AFE9ULL }, /* XSUM_XXH64_testdata[4435] */\n    { 2218, 0x0000000000000000ULL, 0x250E94EE2C79A08DULL }, /* XSUM_XXH64_testdata[4436] */\n    { 2218, 0x000000009E3779B1ULL, 0xBA172B88DD0B77FCULL }, /* XSUM_XXH64_testdata[4437] */\n    { 2219, 0x0000000000000000ULL, 0x1ADFC1AFF2AD1D17ULL }, /* XSUM_XXH64_testdata[4438] */\n    { 2219, 0x000000009E3779B1ULL, 0xB23B8908EC0D1ACCULL }, /* XSUM_XXH64_testdata[4439] */\n    { 2220, 0x0000000000000000ULL, 0x4B47FF662925324DULL }, /* XSUM_XXH64_testdata[4440] */\n    { 2220, 0x000000009E3779B1ULL, 0x0CA3FD8AABB69609ULL }, /* XSUM_XXH64_testdata[4441] */\n    { 2221, 0x0000000000000000ULL, 0x82BE792EB4CB8D65ULL }, /* XSUM_XXH64_testdata[4442] */\n    { 2221, 0x000000009E3779B1ULL, 0xB0A8EEB2C5D5299CULL }, /* XSUM_XXH64_testdata[4443] */\n    { 2222, 0x0000000000000000ULL, 0x7885414D0B49795CULL }, /* XSUM_XXH64_testdata[4444] */\n    { 2222, 0x000000009E3779B1ULL, 0x910B794EF197A7BBULL }, /* XSUM_XXH64_testdata[4445] */\n    { 2223, 0x0000000000000000ULL, 0xFF497304FD166727ULL }, /* XSUM_XXH64_testdata[4446] */\n    { 2223, 0x000000009E3779B1ULL, 0xAC73280C18A80AEFULL }, /* XSUM_XXH64_testdata[4447] */\n    { 2224, 0x0000000000000000ULL, 0x069E6032BEF38FBDULL }, /* XSUM_XXH64_testdata[4448] */\n    { 2224, 0x000000009E3779B1ULL, 0x797D9C366E7ABA47ULL }, /* XSUM_XXH64_testdata[4449] */\n    { 2225, 0x0000000000000000ULL, 0xC1A1CC0697A3E69AULL }, /* XSUM_XXH64_testdata[4450] */\n    { 2225, 0x000000009E3779B1ULL, 0xDCE1BA39A6851E4FULL }, /* XSUM_XXH64_testdata[4451] */\n    { 2226, 0x0000000000000000ULL, 0xCFEBACA9082F6824ULL }, /* XSUM_XXH64_testdata[4452] */\n    { 2226, 0x000000009E3779B1ULL, 0x0500FFBF161E2029ULL }, /* XSUM_XXH64_testdata[4453] */\n    { 2227, 0x0000000000000000ULL, 0xDAA7C0ECC87410A9ULL }, /* XSUM_XXH64_testdata[4454] */\n    { 2227, 0x000000009E3779B1ULL, 0xB75D9A6C59DD1906ULL }, /* XSUM_XXH64_testdata[4455] */\n    { 2228, 0x0000000000000000ULL, 0x7ECD3344438775D0ULL }, /* XSUM_XXH64_testdata[4456] */\n    { 2228, 0x000000009E3779B1ULL, 0xE87B88569A25C114ULL }, /* XSUM_XXH64_testdata[4457] */\n    { 2229, 0x0000000000000000ULL, 0x7BD53548999459D8ULL }, /* XSUM_XXH64_testdata[4458] */\n    { 2229, 0x000000009E3779B1ULL, 0x41BBC84E86B684C0ULL }, /* XSUM_XXH64_testdata[4459] */\n    { 2230, 0x0000000000000000ULL, 0x0BC2981F2195C8DEULL }, /* XSUM_XXH64_testdata[4460] */\n    { 2230, 0x000000009E3779B1ULL, 0x2E5BFCCBF9FE8B53ULL }, /* XSUM_XXH64_testdata[4461] */\n    { 2231, 0x0000000000000000ULL, 0x2A9AD19F8C6ACE5EULL }, /* XSUM_XXH64_testdata[4462] */\n    { 2231, 0x000000009E3779B1ULL, 0x66A740081CAE9DFDULL }, /* XSUM_XXH64_testdata[4463] */\n    { 2232, 0x0000000000000000ULL, 0x8C5E37424C013BBAULL }, /* XSUM_XXH64_testdata[4464] */\n    { 2232, 0x000000009E3779B1ULL, 0x10AF83BCE220CE28ULL }, /* XSUM_XXH64_testdata[4465] */\n    { 2233, 0x0000000000000000ULL, 0x5B96FF5892DF3413ULL }, /* XSUM_XXH64_testdata[4466] */\n    { 2233, 0x000000009E3779B1ULL, 0x75E7776881D9404DULL }, /* XSUM_XXH64_testdata[4467] */\n    { 2234, 0x0000000000000000ULL, 0xD6CEED4B716B2951ULL }, /* XSUM_XXH64_testdata[4468] */\n    { 2234, 0x000000009E3779B1ULL, 0x9C0CFFC209619D87ULL }, /* XSUM_XXH64_testdata[4469] */\n    { 2235, 0x0000000000000000ULL, 0xB7BB9524613C192DULL }, /* XSUM_XXH64_testdata[4470] */\n    { 2235, 0x000000009E3779B1ULL, 0x3F0CF500A8184665ULL }, /* XSUM_XXH64_testdata[4471] */\n    { 2236, 0x0000000000000000ULL, 0x853FBF6ADC430171ULL }, /* XSUM_XXH64_testdata[4472] */\n    { 2236, 0x000000009E3779B1ULL, 0xC3A9B3578006AA1DULL }, /* XSUM_XXH64_testdata[4473] */\n    { 2237, 0x0000000000000000ULL, 0x339BF4AC6C40F8C7ULL }, /* XSUM_XXH64_testdata[4474] */\n    { 2237, 0x000000009E3779B1ULL, 0xBCE48D8B50E4B03DULL }, /* XSUM_XXH64_testdata[4475] */\n    { 2238, 0x0000000000000000ULL, 0x8F430FC26D3C50CAULL }, /* XSUM_XXH64_testdata[4476] */\n    { 2238, 0x000000009E3779B1ULL, 0x8570C928FF4DCC6EULL }, /* XSUM_XXH64_testdata[4477] */\n    { 2239, 0x0000000000000000ULL, 0x8BDC993521552A4AULL }, /* XSUM_XXH64_testdata[4478] */\n    { 2239, 0x000000009E3779B1ULL, 0xD7855CB6D758CDA4ULL }, /* XSUM_XXH64_testdata[4479] */\n    { 2240, 0x0000000000000000ULL, 0xA4EDB3C85B99B1D9ULL }, /* XSUM_XXH64_testdata[4480] */\n    { 2240, 0x000000009E3779B1ULL, 0x060E004CF6EA043BULL }, /* XSUM_XXH64_testdata[4481] */\n    { 2241, 0x0000000000000000ULL, 0x8B78225179C821F2ULL }, /* XSUM_XXH64_testdata[4482] */\n    { 2241, 0x000000009E3779B1ULL, 0xBB23610C9E557801ULL }, /* XSUM_XXH64_testdata[4483] */\n    { 2242, 0x0000000000000000ULL, 0x120EDB07A2C80708ULL }, /* XSUM_XXH64_testdata[4484] */\n    { 2242, 0x000000009E3779B1ULL, 0x761ACDCD301B7D63ULL }, /* XSUM_XXH64_testdata[4485] */\n    { 2243, 0x0000000000000000ULL, 0x6580659B3A2FD03DULL }, /* XSUM_XXH64_testdata[4486] */\n    { 2243, 0x000000009E3779B1ULL, 0x7E2E7265EBD87AE5ULL }, /* XSUM_XXH64_testdata[4487] */\n    { 2244, 0x0000000000000000ULL, 0x52E7519B104065DBULL }, /* XSUM_XXH64_testdata[4488] */\n    { 2244, 0x000000009E3779B1ULL, 0x9DCCA1CE5EC6CFFBULL }, /* XSUM_XXH64_testdata[4489] */\n    { 2245, 0x0000000000000000ULL, 0x88292BA16A129A82ULL }, /* XSUM_XXH64_testdata[4490] */\n    { 2245, 0x000000009E3779B1ULL, 0xF5B9C2C00EBD4D9FULL }, /* XSUM_XXH64_testdata[4491] */\n    { 2246, 0x0000000000000000ULL, 0xDA42C29076CD459FULL }, /* XSUM_XXH64_testdata[4492] */\n    { 2246, 0x000000009E3779B1ULL, 0x20303C8FB691C26FULL }, /* XSUM_XXH64_testdata[4493] */\n    { 2247, 0x0000000000000000ULL, 0x99940E63B89F4099ULL }, /* XSUM_XXH64_testdata[4494] */\n    { 2247, 0x000000009E3779B1ULL, 0xED2AFF25ADF263F4ULL }, /* XSUM_XXH64_testdata[4495] */\n    { 2248, 0x0000000000000000ULL, 0x2330F68891304F45ULL }, /* XSUM_XXH64_testdata[4496] */\n    { 2248, 0x000000009E3779B1ULL, 0x32856C4B0A8D113FULL }, /* XSUM_XXH64_testdata[4497] */\n    { 2249, 0x0000000000000000ULL, 0x9054C2259FF9F3D1ULL }, /* XSUM_XXH64_testdata[4498] */\n    { 2249, 0x000000009E3779B1ULL, 0x1A712C61064E34F0ULL }, /* XSUM_XXH64_testdata[4499] */\n    { 2250, 0x0000000000000000ULL, 0xD9F20ACEB8E742AEULL }, /* XSUM_XXH64_testdata[4500] */\n    { 2250, 0x000000009E3779B1ULL, 0xC85024E946BB658FULL }, /* XSUM_XXH64_testdata[4501] */\n    { 2251, 0x0000000000000000ULL, 0x257EF7380625ECC2ULL }, /* XSUM_XXH64_testdata[4502] */\n    { 2251, 0x000000009E3779B1ULL, 0x880CF61E5BD4F4C3ULL }, /* XSUM_XXH64_testdata[4503] */\n    { 2252, 0x0000000000000000ULL, 0x585150AF2B8B0F15ULL }, /* XSUM_XXH64_testdata[4504] */\n    { 2252, 0x000000009E3779B1ULL, 0xF7FBD1070B8620C9ULL }, /* XSUM_XXH64_testdata[4505] */\n    { 2253, 0x0000000000000000ULL, 0xD948F40B62F2CA3CULL }, /* XSUM_XXH64_testdata[4506] */\n    { 2253, 0x000000009E3779B1ULL, 0x3EB8CD810585DB47ULL }, /* XSUM_XXH64_testdata[4507] */\n    { 2254, 0x0000000000000000ULL, 0x36959B85694CDF82ULL }, /* XSUM_XXH64_testdata[4508] */\n    { 2254, 0x000000009E3779B1ULL, 0x3410D647B060BC1CULL }, /* XSUM_XXH64_testdata[4509] */\n    { 2255, 0x0000000000000000ULL, 0xE971A77229021E09ULL }, /* XSUM_XXH64_testdata[4510] */\n    { 2255, 0x000000009E3779B1ULL, 0x6A5125A7251676BDULL }, /* XSUM_XXH64_testdata[4511] */\n    { 2256, 0x0000000000000000ULL, 0xACFF0BC6A1CCF55AULL }, /* XSUM_XXH64_testdata[4512] */\n    { 2256, 0x000000009E3779B1ULL, 0xC517D3822BD73533ULL }, /* XSUM_XXH64_testdata[4513] */\n    { 2257, 0x0000000000000000ULL, 0x7712ECAEA7E06536ULL }, /* XSUM_XXH64_testdata[4514] */\n    { 2257, 0x000000009E3779B1ULL, 0x784ACD0A4BE584A0ULL }, /* XSUM_XXH64_testdata[4515] */\n    { 2258, 0x0000000000000000ULL, 0x2B3263AFF5F7AA1EULL }, /* XSUM_XXH64_testdata[4516] */\n    { 2258, 0x000000009E3779B1ULL, 0x9F765071B78D21D3ULL }, /* XSUM_XXH64_testdata[4517] */\n    { 2259, 0x0000000000000000ULL, 0xB6629C678F4F0E36ULL }, /* XSUM_XXH64_testdata[4518] */\n    { 2259, 0x000000009E3779B1ULL, 0xFDBC862495A9B08CULL }, /* XSUM_XXH64_testdata[4519] */\n    { 2260, 0x0000000000000000ULL, 0xDB9244AB9E3F3D47ULL }, /* XSUM_XXH64_testdata[4520] */\n    { 2260, 0x000000009E3779B1ULL, 0xE015673D5D4F4717ULL }, /* XSUM_XXH64_testdata[4521] */\n    { 2261, 0x0000000000000000ULL, 0x153DA280668EF8E3ULL }, /* XSUM_XXH64_testdata[4522] */\n    { 2261, 0x000000009E3779B1ULL, 0x428415636FFC608AULL }, /* XSUM_XXH64_testdata[4523] */\n    { 2262, 0x0000000000000000ULL, 0x3C78690CA99786C3ULL }, /* XSUM_XXH64_testdata[4524] */\n    { 2262, 0x000000009E3779B1ULL, 0xD99C1CC39A29D546ULL }, /* XSUM_XXH64_testdata[4525] */\n    { 2263, 0x0000000000000000ULL, 0xF3BB118C5F9FDD8EULL }, /* XSUM_XXH64_testdata[4526] */\n    { 2263, 0x000000009E3779B1ULL, 0x96E3E5EA0D2981C5ULL }, /* XSUM_XXH64_testdata[4527] */\n    { 2264, 0x0000000000000000ULL, 0xA1E82D83E64FA8F6ULL }, /* XSUM_XXH64_testdata[4528] */\n    { 2264, 0x000000009E3779B1ULL, 0x671647C20BD276C6ULL }, /* XSUM_XXH64_testdata[4529] */\n    { 2265, 0x0000000000000000ULL, 0xB08D6D91C32499DCULL }, /* XSUM_XXH64_testdata[4530] */\n    { 2265, 0x000000009E3779B1ULL, 0x8039AFB80DA01CB8ULL }, /* XSUM_XXH64_testdata[4531] */\n    { 2266, 0x0000000000000000ULL, 0x6D58CE0AC948A08DULL }, /* XSUM_XXH64_testdata[4532] */\n    { 2266, 0x000000009E3779B1ULL, 0x2D3ADE22573C6A42ULL }, /* XSUM_XXH64_testdata[4533] */\n    { 2267, 0x0000000000000000ULL, 0xD0D3DBAD82E89255ULL }, /* XSUM_XXH64_testdata[4534] */\n    { 2267, 0x000000009E3779B1ULL, 0x4C59144B31D9484CULL }, /* XSUM_XXH64_testdata[4535] */\n    { 2268, 0x0000000000000000ULL, 0xF933EC3E29F41FA2ULL }, /* XSUM_XXH64_testdata[4536] */\n    { 2268, 0x000000009E3779B1ULL, 0x000CF95EFC6B201FULL }, /* XSUM_XXH64_testdata[4537] */\n    { 2269, 0x0000000000000000ULL, 0x4D796029C1E45F38ULL }, /* XSUM_XXH64_testdata[4538] */\n    { 2269, 0x000000009E3779B1ULL, 0xC54833FEAE801299ULL }, /* XSUM_XXH64_testdata[4539] */\n    { 2270, 0x0000000000000000ULL, 0xE65833FC49951FF1ULL }, /* XSUM_XXH64_testdata[4540] */\n    { 2270, 0x000000009E3779B1ULL, 0xB2A27F1560831924ULL }, /* XSUM_XXH64_testdata[4541] */\n    { 2271, 0x0000000000000000ULL, 0x5E69F9F89370B53BULL }, /* XSUM_XXH64_testdata[4542] */\n    { 2271, 0x000000009E3779B1ULL, 0x2D376C111831D238ULL }, /* XSUM_XXH64_testdata[4543] */\n    { 2272, 0x0000000000000000ULL, 0x328C7DE3F3D1BA5CULL }, /* XSUM_XXH64_testdata[4544] */\n    { 2272, 0x000000009E3779B1ULL, 0x0B98153EDE6651E1ULL }, /* XSUM_XXH64_testdata[4545] */\n    { 2273, 0x0000000000000000ULL, 0x84ED20B9FE9A5CAFULL }, /* XSUM_XXH64_testdata[4546] */\n    { 2273, 0x000000009E3779B1ULL, 0xFB70A28FCA7850EEULL }, /* XSUM_XXH64_testdata[4547] */\n    { 2274, 0x0000000000000000ULL, 0x38CD3A8EA92E56D8ULL }, /* XSUM_XXH64_testdata[4548] */\n    { 2274, 0x000000009E3779B1ULL, 0xB841B29491DE9441ULL }, /* XSUM_XXH64_testdata[4549] */\n    { 2275, 0x0000000000000000ULL, 0x2BB9FF4361F2B036ULL }, /* XSUM_XXH64_testdata[4550] */\n    { 2275, 0x000000009E3779B1ULL, 0x89B85A221E0C2F41ULL }, /* XSUM_XXH64_testdata[4551] */\n    { 2276, 0x0000000000000000ULL, 0xF6920A2B4E032F47ULL }, /* XSUM_XXH64_testdata[4552] */\n    { 2276, 0x000000009E3779B1ULL, 0x500F59F6905B78A4ULL }, /* XSUM_XXH64_testdata[4553] */\n    { 2277, 0x0000000000000000ULL, 0xBD8E83C8E680AC2DULL }, /* XSUM_XXH64_testdata[4554] */\n    { 2277, 0x000000009E3779B1ULL, 0x42643127FD68B9F5ULL }, /* XSUM_XXH64_testdata[4555] */\n    { 2278, 0x0000000000000000ULL, 0x9DB7C2198A819D29ULL }, /* XSUM_XXH64_testdata[4556] */\n    { 2278, 0x000000009E3779B1ULL, 0x1B9F4D2633BFFDA1ULL }, /* XSUM_XXH64_testdata[4557] */\n    { 2279, 0x0000000000000000ULL, 0x1C2FC333986267B3ULL }, /* XSUM_XXH64_testdata[4558] */\n    { 2279, 0x000000009E3779B1ULL, 0xE86F68BA001578B0ULL }, /* XSUM_XXH64_testdata[4559] */\n    { 2280, 0x0000000000000000ULL, 0x00F74103C42AE49FULL }, /* XSUM_XXH64_testdata[4560] */\n    { 2280, 0x000000009E3779B1ULL, 0x468B3278B42D9504ULL }, /* XSUM_XXH64_testdata[4561] */\n    { 2281, 0x0000000000000000ULL, 0x1A45F40ED25EEA36ULL }, /* XSUM_XXH64_testdata[4562] */\n    { 2281, 0x000000009E3779B1ULL, 0xB5FE42710AA3865FULL }, /* XSUM_XXH64_testdata[4563] */\n    { 2282, 0x0000000000000000ULL, 0x2E965632A7687B1FULL }, /* XSUM_XXH64_testdata[4564] */\n    { 2282, 0x000000009E3779B1ULL, 0x522BE2C22DF0CCB6ULL }, /* XSUM_XXH64_testdata[4565] */\n    { 2283, 0x0000000000000000ULL, 0x8695C242C8AB1C4BULL }, /* XSUM_XXH64_testdata[4566] */\n    { 2283, 0x000000009E3779B1ULL, 0x5D4FA6EF65F0D89DULL }, /* XSUM_XXH64_testdata[4567] */\n    { 2284, 0x0000000000000000ULL, 0x6A176CFC0D6D7DEDULL }, /* XSUM_XXH64_testdata[4568] */\n    { 2284, 0x000000009E3779B1ULL, 0x4AFF9EE348EB6C37ULL }, /* XSUM_XXH64_testdata[4569] */\n    { 2285, 0x0000000000000000ULL, 0x0DB394C249F78008ULL }, /* XSUM_XXH64_testdata[4570] */\n    { 2285, 0x000000009E3779B1ULL, 0x5F3A025A50EB5675ULL }, /* XSUM_XXH64_testdata[4571] */\n    { 2286, 0x0000000000000000ULL, 0x5B3B9F42D12B961FULL }, /* XSUM_XXH64_testdata[4572] */\n    { 2286, 0x000000009E3779B1ULL, 0xFF04B09D1B4B205BULL }, /* XSUM_XXH64_testdata[4573] */\n    { 2287, 0x0000000000000000ULL, 0xA46616A9180B9099ULL }, /* XSUM_XXH64_testdata[4574] */\n    { 2287, 0x000000009E3779B1ULL, 0x4CCA2D97D1A40B96ULL }, /* XSUM_XXH64_testdata[4575] */\n    { 2288, 0x0000000000000000ULL, 0xD3685B2F6B3441F6ULL }, /* XSUM_XXH64_testdata[4576] */\n    { 2288, 0x000000009E3779B1ULL, 0x435369E5718E9FD4ULL }, /* XSUM_XXH64_testdata[4577] */\n    { 2289, 0x0000000000000000ULL, 0xE488DE01C7C023FFULL }, /* XSUM_XXH64_testdata[4578] */\n    { 2289, 0x000000009E3779B1ULL, 0x52CEFF0006731117ULL }, /* XSUM_XXH64_testdata[4579] */\n    { 2290, 0x0000000000000000ULL, 0x3F48D4817F6425A5ULL }, /* XSUM_XXH64_testdata[4580] */\n    { 2290, 0x000000009E3779B1ULL, 0x7A9FCC625884992EULL }, /* XSUM_XXH64_testdata[4581] */\n    { 2291, 0x0000000000000000ULL, 0xB61CC3BCD8F244DAULL }, /* XSUM_XXH64_testdata[4582] */\n    { 2291, 0x000000009E3779B1ULL, 0x47D7831F6F4B00B2ULL }, /* XSUM_XXH64_testdata[4583] */\n    { 2292, 0x0000000000000000ULL, 0x7322E733802E54CCULL }, /* XSUM_XXH64_testdata[4584] */\n    { 2292, 0x000000009E3779B1ULL, 0xF245C8A07F342C46ULL }, /* XSUM_XXH64_testdata[4585] */\n    { 2293, 0x0000000000000000ULL, 0xD3CA56FBE296AFF7ULL }, /* XSUM_XXH64_testdata[4586] */\n    { 2293, 0x000000009E3779B1ULL, 0xDFF15313D1D8EEE0ULL }, /* XSUM_XXH64_testdata[4587] */\n    { 2294, 0x0000000000000000ULL, 0xE84887694E12ED24ULL }, /* XSUM_XXH64_testdata[4588] */\n    { 2294, 0x000000009E3779B1ULL, 0x722CA0E074483A6BULL }, /* XSUM_XXH64_testdata[4589] */\n    { 2295, 0x0000000000000000ULL, 0x2E91150AEAAF9341ULL }, /* XSUM_XXH64_testdata[4590] */\n    { 2295, 0x000000009E3779B1ULL, 0xCE2C75ECB4539C55ULL }, /* XSUM_XXH64_testdata[4591] */\n    { 2296, 0x0000000000000000ULL, 0x86CB76ED9254BA05ULL }, /* XSUM_XXH64_testdata[4592] */\n    { 2296, 0x000000009E3779B1ULL, 0xF80CA10AA03250F2ULL }, /* XSUM_XXH64_testdata[4593] */\n    { 2297, 0x0000000000000000ULL, 0x1E74D1A3940FE53AULL }, /* XSUM_XXH64_testdata[4594] */\n    { 2297, 0x000000009E3779B1ULL, 0x1B042027757C3E38ULL }, /* XSUM_XXH64_testdata[4595] */\n    { 2298, 0x0000000000000000ULL, 0x14C8DAA3B36274D3ULL }, /* XSUM_XXH64_testdata[4596] */\n    { 2298, 0x000000009E3779B1ULL, 0x937BED19A474172DULL }, /* XSUM_XXH64_testdata[4597] */\n    { 2299, 0x0000000000000000ULL, 0x23DA1625E34EB6B1ULL }, /* XSUM_XXH64_testdata[4598] */\n    { 2299, 0x000000009E3779B1ULL, 0xC942EDFB4BE3D8F8ULL }, /* XSUM_XXH64_testdata[4599] */\n    { 2300, 0x0000000000000000ULL, 0xE0325038B32C31B2ULL }, /* XSUM_XXH64_testdata[4600] */\n    { 2300, 0x000000009E3779B1ULL, 0xE3EEADF724ACFD9CULL }, /* XSUM_XXH64_testdata[4601] */\n    { 2301, 0x0000000000000000ULL, 0x94A319C971C6E2BDULL }, /* XSUM_XXH64_testdata[4602] */\n    { 2301, 0x000000009E3779B1ULL, 0xC8221C5AF7DE5BA8ULL }, /* XSUM_XXH64_testdata[4603] */\n    { 2302, 0x0000000000000000ULL, 0xF892D0A36889CF34ULL }, /* XSUM_XXH64_testdata[4604] */\n    { 2302, 0x000000009E3779B1ULL, 0x2A3BFB8C3EC5EC05ULL }, /* XSUM_XXH64_testdata[4605] */\n    { 2303, 0x0000000000000000ULL, 0xB4F5B60780F7B602ULL }, /* XSUM_XXH64_testdata[4606] */\n    { 2303, 0x000000009E3779B1ULL, 0xB181F3BAEEE93EEDULL }, /* XSUM_XXH64_testdata[4607] */\n    { 2304, 0x0000000000000000ULL, 0x8E3B4456E9920D23ULL }, /* XSUM_XXH64_testdata[4608] */\n    { 2304, 0x000000009E3779B1ULL, 0xB3F18FE1DEB2D1ADULL }, /* XSUM_XXH64_testdata[4609] */\n    { 2305, 0x0000000000000000ULL, 0xF9EC904A33F25C08ULL }, /* XSUM_XXH64_testdata[4610] */\n    { 2305, 0x000000009E3779B1ULL, 0x1C06E518AB5B6AC2ULL }, /* XSUM_XXH64_testdata[4611] */\n    { 2306, 0x0000000000000000ULL, 0x9993A96C6581FFB9ULL }, /* XSUM_XXH64_testdata[4612] */\n    { 2306, 0x000000009E3779B1ULL, 0xD5945BAAEFD49C0FULL }, /* XSUM_XXH64_testdata[4613] */\n    { 2307, 0x0000000000000000ULL, 0x8B10505229730C95ULL }, /* XSUM_XXH64_testdata[4614] */\n    { 2307, 0x000000009E3779B1ULL, 0xCC0DDBA53037E4BEULL }, /* XSUM_XXH64_testdata[4615] */\n    { 2308, 0x0000000000000000ULL, 0xE75F22D62B979100ULL }, /* XSUM_XXH64_testdata[4616] */\n    { 2308, 0x000000009E3779B1ULL, 0xAF2D012DC220FC61ULL }, /* XSUM_XXH64_testdata[4617] */\n    { 2309, 0x0000000000000000ULL, 0xD5978DEA6C2FC7FCULL }, /* XSUM_XXH64_testdata[4618] */\n    { 2309, 0x000000009E3779B1ULL, 0xB8D6A282385A2F73ULL }, /* XSUM_XXH64_testdata[4619] */\n    { 2310, 0x0000000000000000ULL, 0x4AC7284EB5DCDB92ULL }, /* XSUM_XXH64_testdata[4620] */\n    { 2310, 0x000000009E3779B1ULL, 0xD1C2CA7D21D419D5ULL }, /* XSUM_XXH64_testdata[4621] */\n    { 2311, 0x0000000000000000ULL, 0x0D8E9BBB3DAD6A70ULL }, /* XSUM_XXH64_testdata[4622] */\n    { 2311, 0x000000009E3779B1ULL, 0x2F11A240628784EFULL }, /* XSUM_XXH64_testdata[4623] */\n    { 2312, 0x0000000000000000ULL, 0xC664B9EE8D092515ULL }, /* XSUM_XXH64_testdata[4624] */\n    { 2312, 0x000000009E3779B1ULL, 0xC0AA15CDE0E11EDCULL }, /* XSUM_XXH64_testdata[4625] */\n    { 2313, 0x0000000000000000ULL, 0x6CC3D3D5E8601E0FULL }, /* XSUM_XXH64_testdata[4626] */\n    { 2313, 0x000000009E3779B1ULL, 0x03A456C7C66E6BC7ULL }, /* XSUM_XXH64_testdata[4627] */\n    { 2314, 0x0000000000000000ULL, 0x4629325F62C7F2A4ULL }, /* XSUM_XXH64_testdata[4628] */\n    { 2314, 0x000000009E3779B1ULL, 0x0669A42F7CE8A9E0ULL }, /* XSUM_XXH64_testdata[4629] */\n    { 2315, 0x0000000000000000ULL, 0x91E089E8C0C6039AULL }, /* XSUM_XXH64_testdata[4630] */\n    { 2315, 0x000000009E3779B1ULL, 0xDBB0732A662EFFA1ULL }, /* XSUM_XXH64_testdata[4631] */\n    { 2316, 0x0000000000000000ULL, 0x6FF296F1AEA06FC2ULL }, /* XSUM_XXH64_testdata[4632] */\n    { 2316, 0x000000009E3779B1ULL, 0x23ABE9C7FAC1A6A9ULL }, /* XSUM_XXH64_testdata[4633] */\n    { 2317, 0x0000000000000000ULL, 0xC82580359645B2BFULL }, /* XSUM_XXH64_testdata[4634] */\n    { 2317, 0x000000009E3779B1ULL, 0xA7901B5AADDAD889ULL }, /* XSUM_XXH64_testdata[4635] */\n    { 2318, 0x0000000000000000ULL, 0xCB742ADF0C8939CFULL }, /* XSUM_XXH64_testdata[4636] */\n    { 2318, 0x000000009E3779B1ULL, 0x84DA994B4CCAB214ULL }, /* XSUM_XXH64_testdata[4637] */\n    { 2319, 0x0000000000000000ULL, 0xA8207CE6E5363827ULL }, /* XSUM_XXH64_testdata[4638] */\n    { 2319, 0x000000009E3779B1ULL, 0x6158A08BE1D71591ULL }, /* XSUM_XXH64_testdata[4639] */\n    { 2320, 0x0000000000000000ULL, 0xA1FF7D9145B440F3ULL }, /* XSUM_XXH64_testdata[4640] */\n    { 2320, 0x000000009E3779B1ULL, 0x20E3D4E00D0F2B4EULL }, /* XSUM_XXH64_testdata[4641] */\n    { 2321, 0x0000000000000000ULL, 0xC7E837B48A46B624ULL }, /* XSUM_XXH64_testdata[4642] */\n    { 2321, 0x000000009E3779B1ULL, 0x0067B5C1A3303D11ULL }, /* XSUM_XXH64_testdata[4643] */\n    { 2322, 0x0000000000000000ULL, 0xC0B1F14CA509F6BEULL }, /* XSUM_XXH64_testdata[4644] */\n    { 2322, 0x000000009E3779B1ULL, 0xF5BB7E25CB0C97B3ULL }, /* XSUM_XXH64_testdata[4645] */\n    { 2323, 0x0000000000000000ULL, 0x54956F7DBFC0E0F0ULL }, /* XSUM_XXH64_testdata[4646] */\n    { 2323, 0x000000009E3779B1ULL, 0x6864C7F182E55680ULL }, /* XSUM_XXH64_testdata[4647] */\n    { 2324, 0x0000000000000000ULL, 0xF551D783676A4264ULL }, /* XSUM_XXH64_testdata[4648] */\n    { 2324, 0x000000009E3779B1ULL, 0x79AA6EB9CF94F6DDULL }, /* XSUM_XXH64_testdata[4649] */\n    { 2325, 0x0000000000000000ULL, 0xC651194A47049BA6ULL }, /* XSUM_XXH64_testdata[4650] */\n    { 2325, 0x000000009E3779B1ULL, 0x32498A87773862D5ULL }, /* XSUM_XXH64_testdata[4651] */\n    { 2326, 0x0000000000000000ULL, 0x98A277D70004DA42ULL }, /* XSUM_XXH64_testdata[4652] */\n    { 2326, 0x000000009E3779B1ULL, 0xCDBDB7A4BA95F214ULL }, /* XSUM_XXH64_testdata[4653] */\n    { 2327, 0x0000000000000000ULL, 0x0CFB97EAD40EE853ULL }, /* XSUM_XXH64_testdata[4654] */\n    { 2327, 0x000000009E3779B1ULL, 0x3F74888FE852A265ULL }, /* XSUM_XXH64_testdata[4655] */\n    { 2328, 0x0000000000000000ULL, 0xA97947FA2B0CB6AEULL }, /* XSUM_XXH64_testdata[4656] */\n    { 2328, 0x000000009E3779B1ULL, 0x5EDB0D23A0FECF0AULL }, /* XSUM_XXH64_testdata[4657] */\n    { 2329, 0x0000000000000000ULL, 0x226C1785A067AA47ULL }, /* XSUM_XXH64_testdata[4658] */\n    { 2329, 0x000000009E3779B1ULL, 0xAD334DB5FDAE7DC4ULL }, /* XSUM_XXH64_testdata[4659] */\n    { 2330, 0x0000000000000000ULL, 0x562735D0DDD955E2ULL }, /* XSUM_XXH64_testdata[4660] */\n    { 2330, 0x000000009E3779B1ULL, 0x74334E63A80ED46CULL }, /* XSUM_XXH64_testdata[4661] */\n    { 2331, 0x0000000000000000ULL, 0x0133C3CDC9C6A8E4ULL }, /* XSUM_XXH64_testdata[4662] */\n    { 2331, 0x000000009E3779B1ULL, 0x6573DCC9FA1EB96FULL }, /* XSUM_XXH64_testdata[4663] */\n    { 2332, 0x0000000000000000ULL, 0xE8456F16D665C396ULL }, /* XSUM_XXH64_testdata[4664] */\n    { 2332, 0x000000009E3779B1ULL, 0x8084F3B58F2ABA0FULL }, /* XSUM_XXH64_testdata[4665] */\n    { 2333, 0x0000000000000000ULL, 0x45DCCF397E3A7DDBULL }, /* XSUM_XXH64_testdata[4666] */\n    { 2333, 0x000000009E3779B1ULL, 0x68BD55C35FDE2330ULL }, /* XSUM_XXH64_testdata[4667] */\n    { 2334, 0x0000000000000000ULL, 0x85702F6BE7CCEBEEULL }, /* XSUM_XXH64_testdata[4668] */\n    { 2334, 0x000000009E3779B1ULL, 0xC3377D4BD150FB5EULL }, /* XSUM_XXH64_testdata[4669] */\n    { 2335, 0x0000000000000000ULL, 0x71CF09894726BDC5ULL }, /* XSUM_XXH64_testdata[4670] */\n    { 2335, 0x000000009E3779B1ULL, 0xEBB9A19C5BE6088BULL }, /* XSUM_XXH64_testdata[4671] */\n    { 2336, 0x0000000000000000ULL, 0x7AFEED22ED1FDDA3ULL }, /* XSUM_XXH64_testdata[4672] */\n    { 2336, 0x000000009E3779B1ULL, 0x9A0B1942215FA443ULL }, /* XSUM_XXH64_testdata[4673] */\n    { 2337, 0x0000000000000000ULL, 0x75AE7F37074A8718ULL }, /* XSUM_XXH64_testdata[4674] */\n    { 2337, 0x000000009E3779B1ULL, 0x5D8C2AD83914674EULL }, /* XSUM_XXH64_testdata[4675] */\n    { 2338, 0x0000000000000000ULL, 0x271F577E67DF0ECAULL }, /* XSUM_XXH64_testdata[4676] */\n    { 2338, 0x000000009E3779B1ULL, 0x522453CD6F5A9E1CULL }, /* XSUM_XXH64_testdata[4677] */\n    { 2339, 0x0000000000000000ULL, 0x53DD28DD9182963CULL }, /* XSUM_XXH64_testdata[4678] */\n    { 2339, 0x000000009E3779B1ULL, 0x5D763D3190130286ULL }, /* XSUM_XXH64_testdata[4679] */\n    { 2340, 0x0000000000000000ULL, 0xF1A4D5C9B1E2947BULL }, /* XSUM_XXH64_testdata[4680] */\n    { 2340, 0x000000009E3779B1ULL, 0x8E25600C8FBD8E61ULL }, /* XSUM_XXH64_testdata[4681] */\n    { 2341, 0x0000000000000000ULL, 0x2D94A90F0FF0F5D8ULL }, /* XSUM_XXH64_testdata[4682] */\n    { 2341, 0x000000009E3779B1ULL, 0xDB59CB161A258E4AULL }, /* XSUM_XXH64_testdata[4683] */\n    { 2342, 0x0000000000000000ULL, 0x430109A504BF6F2EULL }, /* XSUM_XXH64_testdata[4684] */\n    { 2342, 0x000000009E3779B1ULL, 0x709B74596605093DULL }, /* XSUM_XXH64_testdata[4685] */\n    { 2343, 0x0000000000000000ULL, 0xB7AA0FC2C4BCDB26ULL }, /* XSUM_XXH64_testdata[4686] */\n    { 2343, 0x000000009E3779B1ULL, 0x0141733CFDA3A919ULL }, /* XSUM_XXH64_testdata[4687] */\n    { 2344, 0x0000000000000000ULL, 0x053A9FB945BB2FB0ULL }, /* XSUM_XXH64_testdata[4688] */\n    { 2344, 0x000000009E3779B1ULL, 0x54F43B3530ED4138ULL }, /* XSUM_XXH64_testdata[4689] */\n    { 2345, 0x0000000000000000ULL, 0x87065BE673B092CDULL }, /* XSUM_XXH64_testdata[4690] */\n    { 2345, 0x000000009E3779B1ULL, 0x2748BE6BC5F70F7CULL }, /* XSUM_XXH64_testdata[4691] */\n    { 2346, 0x0000000000000000ULL, 0xB7B58B64CF18A9CBULL }, /* XSUM_XXH64_testdata[4692] */\n    { 2346, 0x000000009E3779B1ULL, 0x5E1ED5187289DC26ULL }, /* XSUM_XXH64_testdata[4693] */\n    { 2347, 0x0000000000000000ULL, 0xE29A984F90681413ULL }, /* XSUM_XXH64_testdata[4694] */\n    { 2347, 0x000000009E3779B1ULL, 0x2EE50E23630CA8F2ULL }, /* XSUM_XXH64_testdata[4695] */\n    { 2348, 0x0000000000000000ULL, 0xD3084805FDA4CC3FULL }, /* XSUM_XXH64_testdata[4696] */\n    { 2348, 0x000000009E3779B1ULL, 0xFB84C6264B3E58EAULL }, /* XSUM_XXH64_testdata[4697] */\n    { 2349, 0x0000000000000000ULL, 0x7323FF7A3BAFB58BULL }, /* XSUM_XXH64_testdata[4698] */\n    { 2349, 0x000000009E3779B1ULL, 0xA191E02F43D5786CULL }, /* XSUM_XXH64_testdata[4699] */\n    { 2350, 0x0000000000000000ULL, 0xDE7BE0B2E00DD72CULL }, /* XSUM_XXH64_testdata[4700] */\n    { 2350, 0x000000009E3779B1ULL, 0xB5971C9DC0E2F341ULL }, /* XSUM_XXH64_testdata[4701] */\n    { 2351, 0x0000000000000000ULL, 0x617D28B0A6F5EF38ULL }, /* XSUM_XXH64_testdata[4702] */\n    { 2351, 0x000000009E3779B1ULL, 0x6140C9FBD7674F6AULL }, /* XSUM_XXH64_testdata[4703] */\n    { 2352, 0x0000000000000000ULL, 0x446602E39C8DF6DFULL }, /* XSUM_XXH64_testdata[4704] */\n    { 2352, 0x000000009E3779B1ULL, 0xD4F8F9384CCB7408ULL }, /* XSUM_XXH64_testdata[4705] */\n    { 2353, 0x0000000000000000ULL, 0xBD02CDCB7ECD85ACULL }, /* XSUM_XXH64_testdata[4706] */\n    { 2353, 0x000000009E3779B1ULL, 0x8C6C145B17F33740ULL }, /* XSUM_XXH64_testdata[4707] */\n    { 2354, 0x0000000000000000ULL, 0xF5E4EF40913621C3ULL }, /* XSUM_XXH64_testdata[4708] */\n    { 2354, 0x000000009E3779B1ULL, 0x9BB5C26E646A6773ULL }, /* XSUM_XXH64_testdata[4709] */\n    { 2355, 0x0000000000000000ULL, 0xCB954D7B7E4CF6F6ULL }, /* XSUM_XXH64_testdata[4710] */\n    { 2355, 0x000000009E3779B1ULL, 0xFEC05106ABBF3DB4ULL }, /* XSUM_XXH64_testdata[4711] */\n    { 2356, 0x0000000000000000ULL, 0x11844FC5DBBA5457ULL }, /* XSUM_XXH64_testdata[4712] */\n    { 2356, 0x000000009E3779B1ULL, 0xC619CC1F604B47D9ULL }, /* XSUM_XXH64_testdata[4713] */\n    { 2357, 0x0000000000000000ULL, 0xDB39970D51DDD2B8ULL }, /* XSUM_XXH64_testdata[4714] */\n    { 2357, 0x000000009E3779B1ULL, 0x4618C5D5FDD17F7BULL }, /* XSUM_XXH64_testdata[4715] */\n    { 2358, 0x0000000000000000ULL, 0x3B1B73B6CC669AB9ULL }, /* XSUM_XXH64_testdata[4716] */\n    { 2358, 0x000000009E3779B1ULL, 0x86320F20DAB62244ULL }, /* XSUM_XXH64_testdata[4717] */\n    { 2359, 0x0000000000000000ULL, 0x281C1B488188CB17ULL }, /* XSUM_XXH64_testdata[4718] */\n    { 2359, 0x000000009E3779B1ULL, 0x225EFFFA3406AABCULL }, /* XSUM_XXH64_testdata[4719] */\n    { 2360, 0x0000000000000000ULL, 0x17534E3D95F9FF8AULL }, /* XSUM_XXH64_testdata[4720] */\n    { 2360, 0x000000009E3779B1ULL, 0x9B016AAA37A3509AULL }, /* XSUM_XXH64_testdata[4721] */\n    { 2361, 0x0000000000000000ULL, 0xE41946A38094AFE0ULL }, /* XSUM_XXH64_testdata[4722] */\n    { 2361, 0x000000009E3779B1ULL, 0x4D7C4AB8116DA2C6ULL }, /* XSUM_XXH64_testdata[4723] */\n    { 2362, 0x0000000000000000ULL, 0xE33F9D21881422DFULL }, /* XSUM_XXH64_testdata[4724] */\n    { 2362, 0x000000009E3779B1ULL, 0x16872B377B08297CULL }, /* XSUM_XXH64_testdata[4725] */\n    { 2363, 0x0000000000000000ULL, 0x92ACCB102883B68BULL }, /* XSUM_XXH64_testdata[4726] */\n    { 2363, 0x000000009E3779B1ULL, 0x86756DE0DD22CF88ULL }, /* XSUM_XXH64_testdata[4727] */\n    { 2364, 0x0000000000000000ULL, 0x6D56138FBB3AA9B2ULL }, /* XSUM_XXH64_testdata[4728] */\n    { 2364, 0x000000009E3779B1ULL, 0x7C5133B340FBCA4DULL }, /* XSUM_XXH64_testdata[4729] */\n    { 2365, 0x0000000000000000ULL, 0xEBA1559EA3D144D8ULL }, /* XSUM_XXH64_testdata[4730] */\n    { 2365, 0x000000009E3779B1ULL, 0x52617C9F6377575DULL }, /* XSUM_XXH64_testdata[4731] */\n    { 2366, 0x0000000000000000ULL, 0xD699E1684AE8AC2CULL }, /* XSUM_XXH64_testdata[4732] */\n    { 2366, 0x000000009E3779B1ULL, 0x5ADF3092CFB6B2D3ULL }, /* XSUM_XXH64_testdata[4733] */\n    { 2367, 0x0000000000000000ULL, 0xA82418DDEC0EA581ULL }, /* XSUM_XXH64_testdata[4734] */\n    { 2367, 0x000000009E3779B1ULL, 0xA36A93C18052673AULL }, /* XSUM_XXH64_testdata[4735] */\n    { 2368, 0x0000000000000000ULL, 0xAF8CF8D10D309C36ULL }, /* XSUM_XXH64_testdata[4736] */\n    { 2368, 0x000000009E3779B1ULL, 0xA2074F4A3C812B8CULL }, /* XSUM_XXH64_testdata[4737] */\n    { 2369, 0x0000000000000000ULL, 0x2560D93B7CEA8730ULL }, /* XSUM_XXH64_testdata[4738] */\n    { 2369, 0x000000009E3779B1ULL, 0x8D864AADE0625064ULL }, /* XSUM_XXH64_testdata[4739] */\n    { 2370, 0x0000000000000000ULL, 0x63FF121E1D2FAEF9ULL }, /* XSUM_XXH64_testdata[4740] */\n    { 2370, 0x000000009E3779B1ULL, 0x9CE357AA8A949492ULL }, /* XSUM_XXH64_testdata[4741] */\n    { 2371, 0x0000000000000000ULL, 0x24EC730E22E0493CULL }, /* XSUM_XXH64_testdata[4742] */\n    { 2371, 0x000000009E3779B1ULL, 0xBC465E83A799264EULL }, /* XSUM_XXH64_testdata[4743] */\n    { 2372, 0x0000000000000000ULL, 0x8B437F9B0CA010A4ULL }, /* XSUM_XXH64_testdata[4744] */\n    { 2372, 0x000000009E3779B1ULL, 0xADFBA870D3B03A77ULL }, /* XSUM_XXH64_testdata[4745] */\n    { 2373, 0x0000000000000000ULL, 0x4664E7BF2E7485C4ULL }, /* XSUM_XXH64_testdata[4746] */\n    { 2373, 0x000000009E3779B1ULL, 0x62C33084E0FA0AB8ULL }, /* XSUM_XXH64_testdata[4747] */\n    { 2374, 0x0000000000000000ULL, 0x09E007472D99580EULL }, /* XSUM_XXH64_testdata[4748] */\n    { 2374, 0x000000009E3779B1ULL, 0x049262DE82A33C54ULL }, /* XSUM_XXH64_testdata[4749] */\n    { 2375, 0x0000000000000000ULL, 0x0A2E9EA2E271595AULL }, /* XSUM_XXH64_testdata[4750] */\n    { 2375, 0x000000009E3779B1ULL, 0xDF92131548D7E6B4ULL }, /* XSUM_XXH64_testdata[4751] */\n    { 2376, 0x0000000000000000ULL, 0x2CE9D41F4F9534B9ULL }, /* XSUM_XXH64_testdata[4752] */\n    { 2376, 0x000000009E3779B1ULL, 0x2F8AB336468A6136ULL }, /* XSUM_XXH64_testdata[4753] */\n    { 2377, 0x0000000000000000ULL, 0xF0F7822D1BE0F90CULL }, /* XSUM_XXH64_testdata[4754] */\n    { 2377, 0x000000009E3779B1ULL, 0xC4FCA5356F27558CULL }, /* XSUM_XXH64_testdata[4755] */\n    { 2378, 0x0000000000000000ULL, 0x39E6873AF37024B4ULL }, /* XSUM_XXH64_testdata[4756] */\n    { 2378, 0x000000009E3779B1ULL, 0x2A2B5F669B2654D1ULL }, /* XSUM_XXH64_testdata[4757] */\n    { 2379, 0x0000000000000000ULL, 0x2ABA7585D8E36D73ULL }, /* XSUM_XXH64_testdata[4758] */\n    { 2379, 0x000000009E3779B1ULL, 0x0DAFE476AB1F2E3AULL }, /* XSUM_XXH64_testdata[4759] */\n    { 2380, 0x0000000000000000ULL, 0x3DC4757380DC323EULL }, /* XSUM_XXH64_testdata[4760] */\n    { 2380, 0x000000009E3779B1ULL, 0xDAC9B8257FD450FDULL }, /* XSUM_XXH64_testdata[4761] */\n    { 2381, 0x0000000000000000ULL, 0xA7B2D6EB875F8A17ULL }, /* XSUM_XXH64_testdata[4762] */\n    { 2381, 0x000000009E3779B1ULL, 0x1CE00144C4AEED26ULL }, /* XSUM_XXH64_testdata[4763] */\n    { 2382, 0x0000000000000000ULL, 0x9D7F7E8A03304113ULL }, /* XSUM_XXH64_testdata[4764] */\n    { 2382, 0x000000009E3779B1ULL, 0xB9391DC54AB527B1ULL }, /* XSUM_XXH64_testdata[4765] */\n    { 2383, 0x0000000000000000ULL, 0x07AC9F9E61EFC1E3ULL }, /* XSUM_XXH64_testdata[4766] */\n    { 2383, 0x000000009E3779B1ULL, 0xA8E9FBF11BA6E602ULL }, /* XSUM_XXH64_testdata[4767] */\n    { 2384, 0x0000000000000000ULL, 0x67852151713F7E7BULL }, /* XSUM_XXH64_testdata[4768] */\n    { 2384, 0x000000009E3779B1ULL, 0xFB635A9F92B7EAFDULL }, /* XSUM_XXH64_testdata[4769] */\n    { 2385, 0x0000000000000000ULL, 0x37A9F95E3CE03096ULL }, /* XSUM_XXH64_testdata[4770] */\n    { 2385, 0x000000009E3779B1ULL, 0x7D78521C1406ED9FULL }, /* XSUM_XXH64_testdata[4771] */\n    { 2386, 0x0000000000000000ULL, 0x8239E678942C4AC5ULL }, /* XSUM_XXH64_testdata[4772] */\n    { 2386, 0x000000009E3779B1ULL, 0xCE1979E27C7D3C85ULL }, /* XSUM_XXH64_testdata[4773] */\n    { 2387, 0x0000000000000000ULL, 0xA94BF04DEC91D5B4ULL }, /* XSUM_XXH64_testdata[4774] */\n    { 2387, 0x000000009E3779B1ULL, 0x29E52166A719608BULL }, /* XSUM_XXH64_testdata[4775] */\n    { 2388, 0x0000000000000000ULL, 0x7DCD4E53C2782F5FULL }, /* XSUM_XXH64_testdata[4776] */\n    { 2388, 0x000000009E3779B1ULL, 0x46B540E3C85EA70EULL }, /* XSUM_XXH64_testdata[4777] */\n    { 2389, 0x0000000000000000ULL, 0xAF6F3413330735EEULL }, /* XSUM_XXH64_testdata[4778] */\n    { 2389, 0x000000009E3779B1ULL, 0x5299FF4B1ECBC382ULL }, /* XSUM_XXH64_testdata[4779] */\n    { 2390, 0x0000000000000000ULL, 0x4B356E58C6EB8D67ULL }, /* XSUM_XXH64_testdata[4780] */\n    { 2390, 0x000000009E3779B1ULL, 0x27B266BF7CFBC4BBULL }, /* XSUM_XXH64_testdata[4781] */\n    { 2391, 0x0000000000000000ULL, 0x2B083C41FCA99623ULL }, /* XSUM_XXH64_testdata[4782] */\n    { 2391, 0x000000009E3779B1ULL, 0x6A2F2A2710749A71ULL }, /* XSUM_XXH64_testdata[4783] */\n    { 2392, 0x0000000000000000ULL, 0xD84013EF70E95859ULL }, /* XSUM_XXH64_testdata[4784] */\n    { 2392, 0x000000009E3779B1ULL, 0x177F5970EC77F5B3ULL }, /* XSUM_XXH64_testdata[4785] */\n    { 2393, 0x0000000000000000ULL, 0x7ACA4CF93ED98678ULL }, /* XSUM_XXH64_testdata[4786] */\n    { 2393, 0x000000009E3779B1ULL, 0x5A904D3C35F6E94AULL }, /* XSUM_XXH64_testdata[4787] */\n    { 2394, 0x0000000000000000ULL, 0x4326DE179EF99DD3ULL }, /* XSUM_XXH64_testdata[4788] */\n    { 2394, 0x000000009E3779B1ULL, 0x48981D4F068BAA7AULL }, /* XSUM_XXH64_testdata[4789] */\n    { 2395, 0x0000000000000000ULL, 0xB16F97FDCAAB95FAULL }, /* XSUM_XXH64_testdata[4790] */\n    { 2395, 0x000000009E3779B1ULL, 0xE3F92AE9F9ED5F4CULL }, /* XSUM_XXH64_testdata[4791] */\n    { 2396, 0x0000000000000000ULL, 0x9CEED7B2F9ECF099ULL }, /* XSUM_XXH64_testdata[4792] */\n    { 2396, 0x000000009E3779B1ULL, 0xA5B41A47D3898A4FULL }, /* XSUM_XXH64_testdata[4793] */\n    { 2397, 0x0000000000000000ULL, 0x8FF922A11B1124FEULL }, /* XSUM_XXH64_testdata[4794] */\n    { 2397, 0x000000009E3779B1ULL, 0xB64BDA6A68E974D3ULL }, /* XSUM_XXH64_testdata[4795] */\n    { 2398, 0x0000000000000000ULL, 0x8D40AB4B96C56150ULL }, /* XSUM_XXH64_testdata[4796] */\n    { 2398, 0x000000009E3779B1ULL, 0x9BC4C7C36558F614ULL }, /* XSUM_XXH64_testdata[4797] */\n    { 2399, 0x0000000000000000ULL, 0xA560FF29FD1BB5A9ULL }, /* XSUM_XXH64_testdata[4798] */\n    { 2399, 0x000000009E3779B1ULL, 0xF85C0081934DEF96ULL }, /* XSUM_XXH64_testdata[4799] */\n    { 2400, 0x0000000000000000ULL, 0x694A1631F983C649ULL }, /* XSUM_XXH64_testdata[4800] */\n    { 2400, 0x000000009E3779B1ULL, 0x0BFEC3DCC5A0AD58ULL }, /* XSUM_XXH64_testdata[4801] */\n    { 2401, 0x0000000000000000ULL, 0x02B021BC76EA4747ULL }, /* XSUM_XXH64_testdata[4802] */\n    { 2401, 0x000000009E3779B1ULL, 0x78F1CAF370A2EA39ULL }, /* XSUM_XXH64_testdata[4803] */\n    { 2402, 0x0000000000000000ULL, 0x17F348C75875A5D2ULL }, /* XSUM_XXH64_testdata[4804] */\n    { 2402, 0x000000009E3779B1ULL, 0x67B68416C5E6AF81ULL }, /* XSUM_XXH64_testdata[4805] */\n    { 2403, 0x0000000000000000ULL, 0x271B0247C4D63AD6ULL }, /* XSUM_XXH64_testdata[4806] */\n    { 2403, 0x000000009E3779B1ULL, 0x52A9593FD9F07420ULL }, /* XSUM_XXH64_testdata[4807] */\n    { 2404, 0x0000000000000000ULL, 0xA595E49C67003159ULL }, /* XSUM_XXH64_testdata[4808] */\n    { 2404, 0x000000009E3779B1ULL, 0x1ED6DEFA3C16E191ULL }, /* XSUM_XXH64_testdata[4809] */\n    { 2405, 0x0000000000000000ULL, 0x4A27B4127A915EADULL }, /* XSUM_XXH64_testdata[4810] */\n    { 2405, 0x000000009E3779B1ULL, 0x59F4985FC36DBC86ULL }, /* XSUM_XXH64_testdata[4811] */\n    { 2406, 0x0000000000000000ULL, 0xDC2CB1D75146944FULL }, /* XSUM_XXH64_testdata[4812] */\n    { 2406, 0x000000009E3779B1ULL, 0xCE1A9B15D4546334ULL }, /* XSUM_XXH64_testdata[4813] */\n    { 2407, 0x0000000000000000ULL, 0x6DEF146307EC190CULL }, /* XSUM_XXH64_testdata[4814] */\n    { 2407, 0x000000009E3779B1ULL, 0x15AE945F860BB7EFULL }, /* XSUM_XXH64_testdata[4815] */\n    { 2408, 0x0000000000000000ULL, 0x22AC3520C190F04AULL }, /* XSUM_XXH64_testdata[4816] */\n    { 2408, 0x000000009E3779B1ULL, 0x96FEF050B8315504ULL }, /* XSUM_XXH64_testdata[4817] */\n    { 2409, 0x0000000000000000ULL, 0xBE02E7DC27E42086ULL }, /* XSUM_XXH64_testdata[4818] */\n    { 2409, 0x000000009E3779B1ULL, 0xE1E0E88AA6821AB4ULL }, /* XSUM_XXH64_testdata[4819] */\n    { 2410, 0x0000000000000000ULL, 0xD8C4EA400B61156AULL }, /* XSUM_XXH64_testdata[4820] */\n    { 2410, 0x000000009E3779B1ULL, 0x5783629355A8D035ULL }, /* XSUM_XXH64_testdata[4821] */\n    { 2411, 0x0000000000000000ULL, 0x07D5490F7DDD14A3ULL }, /* XSUM_XXH64_testdata[4822] */\n    { 2411, 0x000000009E3779B1ULL, 0xD96B2F10C7B3242BULL }, /* XSUM_XXH64_testdata[4823] */\n    { 2412, 0x0000000000000000ULL, 0x0A1F1A1599B73DF3ULL }, /* XSUM_XXH64_testdata[4824] */\n    { 2412, 0x000000009E3779B1ULL, 0xEB8B69A7E923A109ULL }, /* XSUM_XXH64_testdata[4825] */\n    { 2413, 0x0000000000000000ULL, 0xEE61D221910FDF73ULL }, /* XSUM_XXH64_testdata[4826] */\n    { 2413, 0x000000009E3779B1ULL, 0x1D7BCC8859386AA4ULL }, /* XSUM_XXH64_testdata[4827] */\n    { 2414, 0x0000000000000000ULL, 0xE5750967B3970820ULL }, /* XSUM_XXH64_testdata[4828] */\n    { 2414, 0x000000009E3779B1ULL, 0xBFB454E94EE8330FULL }, /* XSUM_XXH64_testdata[4829] */\n    { 2415, 0x0000000000000000ULL, 0x3845B2AB9975CEC3ULL }, /* XSUM_XXH64_testdata[4830] */\n    { 2415, 0x000000009E3779B1ULL, 0xC49CCD486DE432BAULL }, /* XSUM_XXH64_testdata[4831] */\n    { 2416, 0x0000000000000000ULL, 0xC05CC6FF1C9AB447ULL }, /* XSUM_XXH64_testdata[4832] */\n    { 2416, 0x000000009E3779B1ULL, 0xE8C0FD4299A3FA3AULL }, /* XSUM_XXH64_testdata[4833] */\n    { 2417, 0x0000000000000000ULL, 0x915EEB98F3616241ULL }, /* XSUM_XXH64_testdata[4834] */\n    { 2417, 0x000000009E3779B1ULL, 0x37AB4D37304EBD54ULL }, /* XSUM_XXH64_testdata[4835] */\n    { 2418, 0x0000000000000000ULL, 0x1CECB330A9E0A948ULL }, /* XSUM_XXH64_testdata[4836] */\n    { 2418, 0x000000009E3779B1ULL, 0xFF5467C4F2C9F932ULL }, /* XSUM_XXH64_testdata[4837] */\n    { 2419, 0x0000000000000000ULL, 0xC9BF101D39DC0EB7ULL }, /* XSUM_XXH64_testdata[4838] */\n    { 2419, 0x000000009E3779B1ULL, 0xE7B1779761AFB5E3ULL }, /* XSUM_XXH64_testdata[4839] */\n    { 2420, 0x0000000000000000ULL, 0x801B0BA36739D39AULL }, /* XSUM_XXH64_testdata[4840] */\n    { 2420, 0x000000009E3779B1ULL, 0x2480FD0EC657D06BULL }, /* XSUM_XXH64_testdata[4841] */\n    { 2421, 0x0000000000000000ULL, 0x8DEF1C59819570ADULL }, /* XSUM_XXH64_testdata[4842] */\n    { 2421, 0x000000009E3779B1ULL, 0xB1A69E704B9858CEULL }, /* XSUM_XXH64_testdata[4843] */\n    { 2422, 0x0000000000000000ULL, 0x05FC2C6C90CB8D6CULL }, /* XSUM_XXH64_testdata[4844] */\n    { 2422, 0x000000009E3779B1ULL, 0xE45A743C5D581BFFULL }, /* XSUM_XXH64_testdata[4845] */\n    { 2423, 0x0000000000000000ULL, 0x83C51E22CA7625D0ULL }, /* XSUM_XXH64_testdata[4846] */\n    { 2423, 0x000000009E3779B1ULL, 0x47BFBA5355DEF04AULL }, /* XSUM_XXH64_testdata[4847] */\n    { 2424, 0x0000000000000000ULL, 0x4ABED4B91A9EE861ULL }, /* XSUM_XXH64_testdata[4848] */\n    { 2424, 0x000000009E3779B1ULL, 0x42D7640BD9B2A83AULL }, /* XSUM_XXH64_testdata[4849] */\n    { 2425, 0x0000000000000000ULL, 0x24A8187187392767ULL }, /* XSUM_XXH64_testdata[4850] */\n    { 2425, 0x000000009E3779B1ULL, 0x203794E561E31142ULL }, /* XSUM_XXH64_testdata[4851] */\n    { 2426, 0x0000000000000000ULL, 0x3616D90229EE0974ULL }, /* XSUM_XXH64_testdata[4852] */\n    { 2426, 0x000000009E3779B1ULL, 0x19684C4F55C85CE9ULL }, /* XSUM_XXH64_testdata[4853] */\n    { 2427, 0x0000000000000000ULL, 0x68CD181A6F11B10CULL }, /* XSUM_XXH64_testdata[4854] */\n    { 2427, 0x000000009E3779B1ULL, 0xC864F684D69AABA5ULL }, /* XSUM_XXH64_testdata[4855] */\n    { 2428, 0x0000000000000000ULL, 0x2A7D75B671FCCDEEULL }, /* XSUM_XXH64_testdata[4856] */\n    { 2428, 0x000000009E3779B1ULL, 0xA9476E448D525013ULL }, /* XSUM_XXH64_testdata[4857] */\n    { 2429, 0x0000000000000000ULL, 0x71C15FD39BF17F23ULL }, /* XSUM_XXH64_testdata[4858] */\n    { 2429, 0x000000009E3779B1ULL, 0x969704E21B4CC6D5ULL }, /* XSUM_XXH64_testdata[4859] */\n    { 2430, 0x0000000000000000ULL, 0xA72B7080C7F9F03AULL }, /* XSUM_XXH64_testdata[4860] */\n    { 2430, 0x000000009E3779B1ULL, 0xE4AFBF1AA2F0701BULL }, /* XSUM_XXH64_testdata[4861] */\n    { 2431, 0x0000000000000000ULL, 0x3088967F568CD683ULL }, /* XSUM_XXH64_testdata[4862] */\n    { 2431, 0x000000009E3779B1ULL, 0x1BC3BD44AAC35EF9ULL }, /* XSUM_XXH64_testdata[4863] */\n    { 2432, 0x0000000000000000ULL, 0xCBD11730223F67C6ULL }, /* XSUM_XXH64_testdata[4864] */\n    { 2432, 0x000000009E3779B1ULL, 0x213A2E1A0C8904D8ULL }, /* XSUM_XXH64_testdata[4865] */\n    { 2433, 0x0000000000000000ULL, 0xC6B42608EC856946ULL }, /* XSUM_XXH64_testdata[4866] */\n    { 2433, 0x000000009E3779B1ULL, 0x003DC0F6EDEC531EULL }, /* XSUM_XXH64_testdata[4867] */\n    { 2434, 0x0000000000000000ULL, 0x3BA3699FBCB3C297ULL }, /* XSUM_XXH64_testdata[4868] */\n    { 2434, 0x000000009E3779B1ULL, 0x8240EE675DF29A12ULL }, /* XSUM_XXH64_testdata[4869] */\n    { 2435, 0x0000000000000000ULL, 0x7AAB1AE8C3807095ULL }, /* XSUM_XXH64_testdata[4870] */\n    { 2435, 0x000000009E3779B1ULL, 0xD0510D743BAAA37CULL }, /* XSUM_XXH64_testdata[4871] */\n    { 2436, 0x0000000000000000ULL, 0x8EE2DD6CD70E0D0DULL }, /* XSUM_XXH64_testdata[4872] */\n    { 2436, 0x000000009E3779B1ULL, 0x183E3EA8DF792509ULL }, /* XSUM_XXH64_testdata[4873] */\n    { 2437, 0x0000000000000000ULL, 0xB0576474996258BDULL }, /* XSUM_XXH64_testdata[4874] */\n    { 2437, 0x000000009E3779B1ULL, 0x68031014C2F43722ULL }, /* XSUM_XXH64_testdata[4875] */\n    { 2438, 0x0000000000000000ULL, 0x2524B25AACFB7EADULL }, /* XSUM_XXH64_testdata[4876] */\n    { 2438, 0x000000009E3779B1ULL, 0x722D2F0D81E91D11ULL }, /* XSUM_XXH64_testdata[4877] */\n    { 2439, 0x0000000000000000ULL, 0xD030BD47C1C03CADULL }, /* XSUM_XXH64_testdata[4878] */\n    { 2439, 0x000000009E3779B1ULL, 0x8859C919A9433659ULL }, /* XSUM_XXH64_testdata[4879] */\n    { 2440, 0x0000000000000000ULL, 0x17128689665AB686ULL }, /* XSUM_XXH64_testdata[4880] */\n    { 2440, 0x000000009E3779B1ULL, 0x46072D41B60460B3ULL }, /* XSUM_XXH64_testdata[4881] */\n    { 2441, 0x0000000000000000ULL, 0x4B72F827F22591CDULL }, /* XSUM_XXH64_testdata[4882] */\n    { 2441, 0x000000009E3779B1ULL, 0xF1EFF59A44F7B617ULL }, /* XSUM_XXH64_testdata[4883] */\n    { 2442, 0x0000000000000000ULL, 0x80E5410C3A0CDC22ULL }, /* XSUM_XXH64_testdata[4884] */\n    { 2442, 0x000000009E3779B1ULL, 0xC91E48090B04E298ULL }, /* XSUM_XXH64_testdata[4885] */\n    { 2443, 0x0000000000000000ULL, 0x4EDD5E11BC8E19A8ULL }, /* XSUM_XXH64_testdata[4886] */\n    { 2443, 0x000000009E3779B1ULL, 0xE4F8304B59B6791DULL }, /* XSUM_XXH64_testdata[4887] */\n    { 2444, 0x0000000000000000ULL, 0x2BCE89C62691D85DULL }, /* XSUM_XXH64_testdata[4888] */\n    { 2444, 0x000000009E3779B1ULL, 0x86E3AA4D7470DB8EULL }, /* XSUM_XXH64_testdata[4889] */\n    { 2445, 0x0000000000000000ULL, 0xB6D1874278EDA5E2ULL }, /* XSUM_XXH64_testdata[4890] */\n    { 2445, 0x000000009E3779B1ULL, 0x48038CFD210C4C6AULL }, /* XSUM_XXH64_testdata[4891] */\n    { 2446, 0x0000000000000000ULL, 0x33EAFB6C7897FC9EULL }, /* XSUM_XXH64_testdata[4892] */\n    { 2446, 0x000000009E3779B1ULL, 0x8FD3CA10498AD59DULL }, /* XSUM_XXH64_testdata[4893] */\n    { 2447, 0x0000000000000000ULL, 0x02F024F2F280F326ULL }, /* XSUM_XXH64_testdata[4894] */\n    { 2447, 0x000000009E3779B1ULL, 0x0C4BD4C235D92D26ULL }, /* XSUM_XXH64_testdata[4895] */\n    { 2448, 0x0000000000000000ULL, 0xE811E3914D08C6C6ULL }, /* XSUM_XXH64_testdata[4896] */\n    { 2448, 0x000000009E3779B1ULL, 0xAAE9C08B612E31CEULL }, /* XSUM_XXH64_testdata[4897] */\n    { 2449, 0x0000000000000000ULL, 0x1B80FC7087650669ULL }, /* XSUM_XXH64_testdata[4898] */\n    { 2449, 0x000000009E3779B1ULL, 0x4E0F289DC90518F2ULL }, /* XSUM_XXH64_testdata[4899] */\n    { 2450, 0x0000000000000000ULL, 0xBA1BBBA215078FFBULL }, /* XSUM_XXH64_testdata[4900] */\n    { 2450, 0x000000009E3779B1ULL, 0x0C7B7F126DC21DA2ULL }, /* XSUM_XXH64_testdata[4901] */\n    { 2451, 0x0000000000000000ULL, 0xD88DD047F14A7D79ULL }, /* XSUM_XXH64_testdata[4902] */\n    { 2451, 0x000000009E3779B1ULL, 0x8A7BB4D024FF588CULL }, /* XSUM_XXH64_testdata[4903] */\n    { 2452, 0x0000000000000000ULL, 0x2C0E5DA26E632184ULL }, /* XSUM_XXH64_testdata[4904] */\n    { 2452, 0x000000009E3779B1ULL, 0xB3FF64D46FE4E545ULL }, /* XSUM_XXH64_testdata[4905] */\n    { 2453, 0x0000000000000000ULL, 0xDAA454D75585EDE9ULL }, /* XSUM_XXH64_testdata[4906] */\n    { 2453, 0x000000009E3779B1ULL, 0xE731D5C255547E22ULL }, /* XSUM_XXH64_testdata[4907] */\n    { 2454, 0x0000000000000000ULL, 0xE2C925DEB32E6EE1ULL }, /* XSUM_XXH64_testdata[4908] */\n    { 2454, 0x000000009E3779B1ULL, 0x2443617CF4A4C64EULL }, /* XSUM_XXH64_testdata[4909] */\n    { 2455, 0x0000000000000000ULL, 0x3BFBDD8160A1B103ULL }, /* XSUM_XXH64_testdata[4910] */\n    { 2455, 0x000000009E3779B1ULL, 0x5B31B7F20E875EADULL }, /* XSUM_XXH64_testdata[4911] */\n    { 2456, 0x0000000000000000ULL, 0x7AF6D8626A70AE5DULL }, /* XSUM_XXH64_testdata[4912] */\n    { 2456, 0x000000009E3779B1ULL, 0xE0AA228B4D774D10ULL }, /* XSUM_XXH64_testdata[4913] */\n    { 2457, 0x0000000000000000ULL, 0xF0A88A24038169EDULL }, /* XSUM_XXH64_testdata[4914] */\n    { 2457, 0x000000009E3779B1ULL, 0x7E58F73BF8784A4CULL }, /* XSUM_XXH64_testdata[4915] */\n    { 2458, 0x0000000000000000ULL, 0xFEEC78A15366CF38ULL }, /* XSUM_XXH64_testdata[4916] */\n    { 2458, 0x000000009E3779B1ULL, 0x3A6BDFBB7660728FULL }, /* XSUM_XXH64_testdata[4917] */\n    { 2459, 0x0000000000000000ULL, 0x1B60EE4E795E9535ULL }, /* XSUM_XXH64_testdata[4918] */\n    { 2459, 0x000000009E3779B1ULL, 0x4A84D726CA0DA8B4ULL }, /* XSUM_XXH64_testdata[4919] */\n    { 2460, 0x0000000000000000ULL, 0x941735C88AB2BCC6ULL }, /* XSUM_XXH64_testdata[4920] */\n    { 2460, 0x000000009E3779B1ULL, 0xF667141A54F560F3ULL }, /* XSUM_XXH64_testdata[4921] */\n    { 2461, 0x0000000000000000ULL, 0xFCCDCF96385216C7ULL }, /* XSUM_XXH64_testdata[4922] */\n    { 2461, 0x000000009E3779B1ULL, 0x6A2F1E48758C6DC7ULL }, /* XSUM_XXH64_testdata[4923] */\n    { 2462, 0x0000000000000000ULL, 0xFFCBEAD39F9750A7ULL }, /* XSUM_XXH64_testdata[4924] */\n    { 2462, 0x000000009E3779B1ULL, 0xE740CC2A1BAFD8EAULL }, /* XSUM_XXH64_testdata[4925] */\n    { 2463, 0x0000000000000000ULL, 0xA2C621CEB83AB7F6ULL }, /* XSUM_XXH64_testdata[4926] */\n    { 2463, 0x000000009E3779B1ULL, 0xF09943B1F4D4C4E7ULL }, /* XSUM_XXH64_testdata[4927] */\n    { 2464, 0x0000000000000000ULL, 0x31CFD7D80770B38EULL }, /* XSUM_XXH64_testdata[4928] */\n    { 2464, 0x000000009E3779B1ULL, 0xB4646B78E397D700ULL }, /* XSUM_XXH64_testdata[4929] */\n    { 2465, 0x0000000000000000ULL, 0x10255A2D392A3FACULL }, /* XSUM_XXH64_testdata[4930] */\n    { 2465, 0x000000009E3779B1ULL, 0xC199F003D8B0E198ULL }, /* XSUM_XXH64_testdata[4931] */\n    { 2466, 0x0000000000000000ULL, 0x4571670719F5FD48ULL }, /* XSUM_XXH64_testdata[4932] */\n    { 2466, 0x000000009E3779B1ULL, 0x737CB52B236D4F57ULL }, /* XSUM_XXH64_testdata[4933] */\n    { 2467, 0x0000000000000000ULL, 0xC05F4DB807477825ULL }, /* XSUM_XXH64_testdata[4934] */\n    { 2467, 0x000000009E3779B1ULL, 0x6D744AB8862BB69EULL }, /* XSUM_XXH64_testdata[4935] */\n    { 2468, 0x0000000000000000ULL, 0xE5277B8D84582CAFULL }, /* XSUM_XXH64_testdata[4936] */\n    { 2468, 0x000000009E3779B1ULL, 0x06856E9678B2B660ULL }, /* XSUM_XXH64_testdata[4937] */\n    { 2469, 0x0000000000000000ULL, 0x6ABC00331A122F79ULL }, /* XSUM_XXH64_testdata[4938] */\n    { 2469, 0x000000009E3779B1ULL, 0xD4C8F26C5EF74E2EULL }, /* XSUM_XXH64_testdata[4939] */\n    { 2470, 0x0000000000000000ULL, 0x2B667AD27BE660B6ULL }, /* XSUM_XXH64_testdata[4940] */\n    { 2470, 0x000000009E3779B1ULL, 0x603DD9A78AF0BEEDULL }, /* XSUM_XXH64_testdata[4941] */\n    { 2471, 0x0000000000000000ULL, 0x2FA57372957D73D3ULL }, /* XSUM_XXH64_testdata[4942] */\n    { 2471, 0x000000009E3779B1ULL, 0x3D716BFC1D5BBDEAULL }, /* XSUM_XXH64_testdata[4943] */\n    { 2472, 0x0000000000000000ULL, 0x1919DC786DC18BFBULL }, /* XSUM_XXH64_testdata[4944] */\n    { 2472, 0x000000009E3779B1ULL, 0xF8AA42A020F5928EULL }, /* XSUM_XXH64_testdata[4945] */\n    { 2473, 0x0000000000000000ULL, 0xB6A86870C20964C1ULL }, /* XSUM_XXH64_testdata[4946] */\n    { 2473, 0x000000009E3779B1ULL, 0xC705B8A05E200AFAULL }, /* XSUM_XXH64_testdata[4947] */\n    { 2474, 0x0000000000000000ULL, 0x9D7B0ECD1DB9DB5BULL }, /* XSUM_XXH64_testdata[4948] */\n    { 2474, 0x000000009E3779B1ULL, 0x5711DB38AE9A56D4ULL }, /* XSUM_XXH64_testdata[4949] */\n    { 2475, 0x0000000000000000ULL, 0xC24C7501C214A3E6ULL }, /* XSUM_XXH64_testdata[4950] */\n    { 2475, 0x000000009E3779B1ULL, 0x2228DF6651B0553BULL }, /* XSUM_XXH64_testdata[4951] */\n    { 2476, 0x0000000000000000ULL, 0x7EEB260CBF06F708ULL }, /* XSUM_XXH64_testdata[4952] */\n    { 2476, 0x000000009E3779B1ULL, 0xC992968948495F68ULL }, /* XSUM_XXH64_testdata[4953] */\n    { 2477, 0x0000000000000000ULL, 0x53D72BDB3F69A314ULL }, /* XSUM_XXH64_testdata[4954] */\n    { 2477, 0x000000009E3779B1ULL, 0x1D98A52F8FE267F5ULL }, /* XSUM_XXH64_testdata[4955] */\n    { 2478, 0x0000000000000000ULL, 0xF3C6F0E2B1DC6533ULL }, /* XSUM_XXH64_testdata[4956] */\n    { 2478, 0x000000009E3779B1ULL, 0x8E5AA693A0AF5D53ULL }, /* XSUM_XXH64_testdata[4957] */\n    { 2479, 0x0000000000000000ULL, 0x977C8404E1407C44ULL }, /* XSUM_XXH64_testdata[4958] */\n    { 2479, 0x000000009E3779B1ULL, 0x8E1D984BAE2B2407ULL }, /* XSUM_XXH64_testdata[4959] */\n    { 2480, 0x0000000000000000ULL, 0xA4AB92232E967B55ULL }, /* XSUM_XXH64_testdata[4960] */\n    { 2480, 0x000000009E3779B1ULL, 0xD342BC7A977B0863ULL }, /* XSUM_XXH64_testdata[4961] */\n    { 2481, 0x0000000000000000ULL, 0x7AD7E7A1848F5C72ULL }, /* XSUM_XXH64_testdata[4962] */\n    { 2481, 0x000000009E3779B1ULL, 0xEB0ED071ED4AC4C6ULL }, /* XSUM_XXH64_testdata[4963] */\n    { 2482, 0x0000000000000000ULL, 0x695DEFDC470F5E66ULL }, /* XSUM_XXH64_testdata[4964] */\n    { 2482, 0x000000009E3779B1ULL, 0xAF69B94E01343304ULL }, /* XSUM_XXH64_testdata[4965] */\n    { 2483, 0x0000000000000000ULL, 0x890F990C259BDCB0ULL }, /* XSUM_XXH64_testdata[4966] */\n    { 2483, 0x000000009E3779B1ULL, 0x2CC3666DB81204D4ULL }, /* XSUM_XXH64_testdata[4967] */\n    { 2484, 0x0000000000000000ULL, 0x925803BCD5E4420CULL }, /* XSUM_XXH64_testdata[4968] */\n    { 2484, 0x000000009E3779B1ULL, 0x3D5FBB640DCE3AC9ULL }, /* XSUM_XXH64_testdata[4969] */\n    { 2485, 0x0000000000000000ULL, 0x69417E512FE29C7FULL }, /* XSUM_XXH64_testdata[4970] */\n    { 2485, 0x000000009E3779B1ULL, 0x508E409A17E01C5DULL }, /* XSUM_XXH64_testdata[4971] */\n    { 2486, 0x0000000000000000ULL, 0x2A54A9ED565F11DDULL }, /* XSUM_XXH64_testdata[4972] */\n    { 2486, 0x000000009E3779B1ULL, 0xCFEC0ED2EB495BACULL }, /* XSUM_XXH64_testdata[4973] */\n    { 2487, 0x0000000000000000ULL, 0xE304C98C2DA89AFBULL }, /* XSUM_XXH64_testdata[4974] */\n    { 2487, 0x000000009E3779B1ULL, 0xECB59396954529F3ULL }, /* XSUM_XXH64_testdata[4975] */\n    { 2488, 0x0000000000000000ULL, 0x628E2977C5FC2F1EULL }, /* XSUM_XXH64_testdata[4976] */\n    { 2488, 0x000000009E3779B1ULL, 0xE4FBFF74DC4143D6ULL }, /* XSUM_XXH64_testdata[4977] */\n    { 2489, 0x0000000000000000ULL, 0x45B0627D2842E6D2ULL }, /* XSUM_XXH64_testdata[4978] */\n    { 2489, 0x000000009E3779B1ULL, 0xD8E1A3A1758BFD18ULL }, /* XSUM_XXH64_testdata[4979] */\n    { 2490, 0x0000000000000000ULL, 0xE137CF864151F9C3ULL }, /* XSUM_XXH64_testdata[4980] */\n    { 2490, 0x000000009E3779B1ULL, 0xA8D0360937FF5AB4ULL }, /* XSUM_XXH64_testdata[4981] */\n    { 2491, 0x0000000000000000ULL, 0x6638694668D34445ULL }, /* XSUM_XXH64_testdata[4982] */\n    { 2491, 0x000000009E3779B1ULL, 0xAB3C1163A3AAF41EULL }, /* XSUM_XXH64_testdata[4983] */\n    { 2492, 0x0000000000000000ULL, 0xF6A831A95FFE61BAULL }, /* XSUM_XXH64_testdata[4984] */\n    { 2492, 0x000000009E3779B1ULL, 0x4D66E15172692ADAULL }, /* XSUM_XXH64_testdata[4985] */\n    { 2493, 0x0000000000000000ULL, 0xBC6490941C9696D2ULL }, /* XSUM_XXH64_testdata[4986] */\n    { 2493, 0x000000009E3779B1ULL, 0xF5A1972F181AA776ULL }, /* XSUM_XXH64_testdata[4987] */\n    { 2494, 0x0000000000000000ULL, 0x804A54FC7666040BULL }, /* XSUM_XXH64_testdata[4988] */\n    { 2494, 0x000000009E3779B1ULL, 0xF124C248CE33CB6BULL }, /* XSUM_XXH64_testdata[4989] */\n    { 2495, 0x0000000000000000ULL, 0x3228BC4AACF4A08DULL }, /* XSUM_XXH64_testdata[4990] */\n    { 2495, 0x000000009E3779B1ULL, 0x35955875CD45A0FDULL }, /* XSUM_XXH64_testdata[4991] */\n    { 2496, 0x0000000000000000ULL, 0x443CA51632E0DDD5ULL }, /* XSUM_XXH64_testdata[4992] */\n    { 2496, 0x000000009E3779B1ULL, 0x7F9743C7FDECC5C1ULL }, /* XSUM_XXH64_testdata[4993] */\n    { 2497, 0x0000000000000000ULL, 0x15F4AA245DFBFC83ULL }, /* XSUM_XXH64_testdata[4994] */\n    { 2497, 0x000000009E3779B1ULL, 0x2D07C93CDA5FCDD2ULL }, /* XSUM_XXH64_testdata[4995] */\n    { 2498, 0x0000000000000000ULL, 0xBD3FDF3F68ABE719ULL }, /* XSUM_XXH64_testdata[4996] */\n    { 2498, 0x000000009E3779B1ULL, 0x17F25EB7572DA9DDULL }, /* XSUM_XXH64_testdata[4997] */\n    { 2499, 0x0000000000000000ULL, 0x64C8307EB325D376ULL }, /* XSUM_XXH64_testdata[4998] */\n    { 2499, 0x000000009E3779B1ULL, 0x0318F5BFCE446D55ULL }, /* XSUM_XXH64_testdata[4999] */\n    { 2500, 0x0000000000000000ULL, 0x13ADF0CB8CCE3661ULL }, /* XSUM_XXH64_testdata[5000] */\n    { 2500, 0x000000009E3779B1ULL, 0x0D9DA38E856DC26EULL }, /* XSUM_XXH64_testdata[5001] */\n    { 2501, 0x0000000000000000ULL, 0xDA22B241787571E9ULL }, /* XSUM_XXH64_testdata[5002] */\n    { 2501, 0x000000009E3779B1ULL, 0xC9F15C9E067E2586ULL }, /* XSUM_XXH64_testdata[5003] */\n    { 2502, 0x0000000000000000ULL, 0xC4AEB31800B88A2AULL }, /* XSUM_XXH64_testdata[5004] */\n    { 2502, 0x000000009E3779B1ULL, 0xE0562555CCC7798AULL }, /* XSUM_XXH64_testdata[5005] */\n    { 2503, 0x0000000000000000ULL, 0x89F3CCF3087E5A14ULL }, /* XSUM_XXH64_testdata[5006] */\n    { 2503, 0x000000009E3779B1ULL, 0xD143CFA4E2578694ULL }, /* XSUM_XXH64_testdata[5007] */\n    { 2504, 0x0000000000000000ULL, 0xB20FA4C246F512F7ULL }, /* XSUM_XXH64_testdata[5008] */\n    { 2504, 0x000000009E3779B1ULL, 0x4387BD09FB07AEEAULL }, /* XSUM_XXH64_testdata[5009] */\n    { 2505, 0x0000000000000000ULL, 0xD7E1B4F919DB4941ULL }, /* XSUM_XXH64_testdata[5010] */\n    { 2505, 0x000000009E3779B1ULL, 0xF1C98EAB15B574C8ULL }, /* XSUM_XXH64_testdata[5011] */\n    { 2506, 0x0000000000000000ULL, 0x6BA313BD1DD0EF52ULL }, /* XSUM_XXH64_testdata[5012] */\n    { 2506, 0x000000009E3779B1ULL, 0x23E430C9A045F6C3ULL }, /* XSUM_XXH64_testdata[5013] */\n    { 2507, 0x0000000000000000ULL, 0xEF17618A79DDBB1DULL }, /* XSUM_XXH64_testdata[5014] */\n    { 2507, 0x000000009E3779B1ULL, 0xA81E20C0409FE325ULL }, /* XSUM_XXH64_testdata[5015] */\n    { 2508, 0x0000000000000000ULL, 0x7798AD0126DC18CFULL }, /* XSUM_XXH64_testdata[5016] */\n    { 2508, 0x000000009E3779B1ULL, 0x8630480CB22F36D0ULL }, /* XSUM_XXH64_testdata[5017] */\n    { 2509, 0x0000000000000000ULL, 0x205D46C33656C728ULL }, /* XSUM_XXH64_testdata[5018] */\n    { 2509, 0x000000009E3779B1ULL, 0x274537B075E0FFB7ULL }, /* XSUM_XXH64_testdata[5019] */\n    { 2510, 0x0000000000000000ULL, 0x4E7F04858550369AULL }, /* XSUM_XXH64_testdata[5020] */\n    { 2510, 0x000000009E3779B1ULL, 0x542AEF16DC23E45DULL }, /* XSUM_XXH64_testdata[5021] */\n    { 2511, 0x0000000000000000ULL, 0x318A08435B64D70BULL }, /* XSUM_XXH64_testdata[5022] */\n    { 2511, 0x000000009E3779B1ULL, 0x4181DE76A5B43BBBULL }, /* XSUM_XXH64_testdata[5023] */\n    { 2512, 0x0000000000000000ULL, 0x84D2B271F72F3A4CULL }, /* XSUM_XXH64_testdata[5024] */\n    { 2512, 0x000000009E3779B1ULL, 0x65FDA5391DE0C77AULL }, /* XSUM_XXH64_testdata[5025] */\n    { 2513, 0x0000000000000000ULL, 0x89BCD13121CCF10BULL }, /* XSUM_XXH64_testdata[5026] */\n    { 2513, 0x000000009E3779B1ULL, 0x3A0A7D36B71D4A5EULL }, /* XSUM_XXH64_testdata[5027] */\n    { 2514, 0x0000000000000000ULL, 0xA69049D429E30469ULL }, /* XSUM_XXH64_testdata[5028] */\n    { 2514, 0x000000009E3779B1ULL, 0x6AB7143DF38DA60FULL }, /* XSUM_XXH64_testdata[5029] */\n    { 2515, 0x0000000000000000ULL, 0x45AAB393356C0794ULL }, /* XSUM_XXH64_testdata[5030] */\n    { 2515, 0x000000009E3779B1ULL, 0xE14551135EBC4E11ULL }, /* XSUM_XXH64_testdata[5031] */\n    { 2516, 0x0000000000000000ULL, 0x040B403621A34D00ULL }, /* XSUM_XXH64_testdata[5032] */\n    { 2516, 0x000000009E3779B1ULL, 0x4D214F0F63C8CC8CULL }, /* XSUM_XXH64_testdata[5033] */\n    { 2517, 0x0000000000000000ULL, 0xE60D269D847ADA6BULL }, /* XSUM_XXH64_testdata[5034] */\n    { 2517, 0x000000009E3779B1ULL, 0x8C8426B0CBEA2F31ULL }, /* XSUM_XXH64_testdata[5035] */\n    { 2518, 0x0000000000000000ULL, 0x61D1A7BE0B3B2EE5ULL }, /* XSUM_XXH64_testdata[5036] */\n    { 2518, 0x000000009E3779B1ULL, 0x3C1A9ECEF5393D0FULL }, /* XSUM_XXH64_testdata[5037] */\n    { 2519, 0x0000000000000000ULL, 0x17FF3E00888176BCULL }, /* XSUM_XXH64_testdata[5038] */\n    { 2519, 0x000000009E3779B1ULL, 0xF316C2050F52BFB8ULL }, /* XSUM_XXH64_testdata[5039] */\n    { 2520, 0x0000000000000000ULL, 0x7C0A8F4BCA3E4914ULL }, /* XSUM_XXH64_testdata[5040] */\n    { 2520, 0x000000009E3779B1ULL, 0x1DF8F6FD3F65ABB7ULL }, /* XSUM_XXH64_testdata[5041] */\n    { 2521, 0x0000000000000000ULL, 0x1C87424C4CF9FCA2ULL }, /* XSUM_XXH64_testdata[5042] */\n    { 2521, 0x000000009E3779B1ULL, 0x0D6DB088748DA08AULL }, /* XSUM_XXH64_testdata[5043] */\n    { 2522, 0x0000000000000000ULL, 0xEA6D674D75242D35ULL }, /* XSUM_XXH64_testdata[5044] */\n    { 2522, 0x000000009E3779B1ULL, 0x7C26F59AE26E1A17ULL }, /* XSUM_XXH64_testdata[5045] */\n    { 2523, 0x0000000000000000ULL, 0x4D5F7BD25078923CULL }, /* XSUM_XXH64_testdata[5046] */\n    { 2523, 0x000000009E3779B1ULL, 0xFA465932034B0D81ULL }, /* XSUM_XXH64_testdata[5047] */\n    { 2524, 0x0000000000000000ULL, 0xBA9284686B42BAB7ULL }, /* XSUM_XXH64_testdata[5048] */\n    { 2524, 0x000000009E3779B1ULL, 0x812DBF4134B5FF3FULL }, /* XSUM_XXH64_testdata[5049] */\n    { 2525, 0x0000000000000000ULL, 0x3CB2F7A3BC0DF684ULL }, /* XSUM_XXH64_testdata[5050] */\n    { 2525, 0x000000009E3779B1ULL, 0x6EF42421916D35A1ULL }, /* XSUM_XXH64_testdata[5051] */\n    { 2526, 0x0000000000000000ULL, 0x7F718ED648664F95ULL }, /* XSUM_XXH64_testdata[5052] */\n    { 2526, 0x000000009E3779B1ULL, 0x1BCDC97D470BF6C7ULL }, /* XSUM_XXH64_testdata[5053] */\n    { 2527, 0x0000000000000000ULL, 0xDC298C93B649DD3CULL }, /* XSUM_XXH64_testdata[5054] */\n    { 2527, 0x000000009E3779B1ULL, 0x79F9C6750D3B5509ULL }, /* XSUM_XXH64_testdata[5055] */\n    { 2528, 0x0000000000000000ULL, 0xD3CF1E2EDFD1CE55ULL }, /* XSUM_XXH64_testdata[5056] */\n    { 2528, 0x000000009E3779B1ULL, 0x57E04A1024FB8033ULL }, /* XSUM_XXH64_testdata[5057] */\n    { 2529, 0x0000000000000000ULL, 0x4A5F754265A3C4D5ULL }, /* XSUM_XXH64_testdata[5058] */\n    { 2529, 0x000000009E3779B1ULL, 0x485ECB5F3600E564ULL }, /* XSUM_XXH64_testdata[5059] */\n    { 2530, 0x0000000000000000ULL, 0x9112AAE1174A926DULL }, /* XSUM_XXH64_testdata[5060] */\n    { 2530, 0x000000009E3779B1ULL, 0xD9534D0C5C61B7D4ULL }, /* XSUM_XXH64_testdata[5061] */\n    { 2531, 0x0000000000000000ULL, 0x54CF97E24E3E39FFULL }, /* XSUM_XXH64_testdata[5062] */\n    { 2531, 0x000000009E3779B1ULL, 0x887367AD17EA3049ULL }, /* XSUM_XXH64_testdata[5063] */\n    { 2532, 0x0000000000000000ULL, 0xE1A71D0B527DB3BCULL }, /* XSUM_XXH64_testdata[5064] */\n    { 2532, 0x000000009E3779B1ULL, 0xDF0C5F764D6AEC53ULL }, /* XSUM_XXH64_testdata[5065] */\n    { 2533, 0x0000000000000000ULL, 0xBE5A9B6BF1DBCD82ULL }, /* XSUM_XXH64_testdata[5066] */\n    { 2533, 0x000000009E3779B1ULL, 0x289B8B993F3940E5ULL }, /* XSUM_XXH64_testdata[5067] */\n    { 2534, 0x0000000000000000ULL, 0x6B3EAF964BB46A8DULL }, /* XSUM_XXH64_testdata[5068] */\n    { 2534, 0x000000009E3779B1ULL, 0x351CB8787D4EDFE9ULL }, /* XSUM_XXH64_testdata[5069] */\n    { 2535, 0x0000000000000000ULL, 0x0A1A6879F4CEE680ULL }, /* XSUM_XXH64_testdata[5070] */\n    { 2535, 0x000000009E3779B1ULL, 0xD0C6FFD71F2A194FULL }, /* XSUM_XXH64_testdata[5071] */\n    { 2536, 0x0000000000000000ULL, 0x8CF419F9C6197562ULL }, /* XSUM_XXH64_testdata[5072] */\n    { 2536, 0x000000009E3779B1ULL, 0x7A4FFCCB7359E91EULL }, /* XSUM_XXH64_testdata[5073] */\n    { 2537, 0x0000000000000000ULL, 0x42900A6838860C7BULL }, /* XSUM_XXH64_testdata[5074] */\n    { 2537, 0x000000009E3779B1ULL, 0x5E0C4BDAF80D53C2ULL }, /* XSUM_XXH64_testdata[5075] */\n    { 2538, 0x0000000000000000ULL, 0x570EC6A0C80C0865ULL }, /* XSUM_XXH64_testdata[5076] */\n    { 2538, 0x000000009E3779B1ULL, 0x8BBECBE0E1D97204ULL }, /* XSUM_XXH64_testdata[5077] */\n    { 2539, 0x0000000000000000ULL, 0x184A6C2244CDBEA6ULL }, /* XSUM_XXH64_testdata[5078] */\n    { 2539, 0x000000009E3779B1ULL, 0x3382D7BC436843E6ULL }, /* XSUM_XXH64_testdata[5079] */\n    { 2540, 0x0000000000000000ULL, 0x2948FA794E5C52B0ULL }, /* XSUM_XXH64_testdata[5080] */\n    { 2540, 0x000000009E3779B1ULL, 0x3CCDF15220CCA5E3ULL }, /* XSUM_XXH64_testdata[5081] */\n    { 2541, 0x0000000000000000ULL, 0x76898C9B504A1506ULL }, /* XSUM_XXH64_testdata[5082] */\n    { 2541, 0x000000009E3779B1ULL, 0x4275B753D091358AULL }, /* XSUM_XXH64_testdata[5083] */\n    { 2542, 0x0000000000000000ULL, 0x8DF9EA5E24D6A1CFULL }, /* XSUM_XXH64_testdata[5084] */\n    { 2542, 0x000000009E3779B1ULL, 0x8BBA889A5C70C9AAULL }, /* XSUM_XXH64_testdata[5085] */\n    { 2543, 0x0000000000000000ULL, 0x1EA753D4E7887275ULL }, /* XSUM_XXH64_testdata[5086] */\n    { 2543, 0x000000009E3779B1ULL, 0xB06DA69852D87D1BULL }, /* XSUM_XXH64_testdata[5087] */\n    { 2544, 0x0000000000000000ULL, 0x609BF370328543D1ULL }, /* XSUM_XXH64_testdata[5088] */\n    { 2544, 0x000000009E3779B1ULL, 0x81D124FCDE0D4813ULL }, /* XSUM_XXH64_testdata[5089] */\n    { 2545, 0x0000000000000000ULL, 0xB014AA75BAE63D76ULL }, /* XSUM_XXH64_testdata[5090] */\n    { 2545, 0x000000009E3779B1ULL, 0xDEAD2DD420898D95ULL }, /* XSUM_XXH64_testdata[5091] */\n    { 2546, 0x0000000000000000ULL, 0xEF577003924C6FC8ULL }, /* XSUM_XXH64_testdata[5092] */\n    { 2546, 0x000000009E3779B1ULL, 0x2587DAC124341A5DULL }, /* XSUM_XXH64_testdata[5093] */\n    { 2547, 0x0000000000000000ULL, 0x90650FE1782E38A0ULL }, /* XSUM_XXH64_testdata[5094] */\n    { 2547, 0x000000009E3779B1ULL, 0x2661A63FFEA69022ULL }, /* XSUM_XXH64_testdata[5095] */\n    { 2548, 0x0000000000000000ULL, 0x0CE0EE73800CFBCAULL }, /* XSUM_XXH64_testdata[5096] */\n    { 2548, 0x000000009E3779B1ULL, 0x2D8EE2C27304B41FULL }, /* XSUM_XXH64_testdata[5097] */\n    { 2549, 0x0000000000000000ULL, 0xF84E510009CA8385ULL }, /* XSUM_XXH64_testdata[5098] */\n    { 2549, 0x000000009E3779B1ULL, 0xC0EFC262C28B5BA2ULL }, /* XSUM_XXH64_testdata[5099] */\n    { 2550, 0x0000000000000000ULL, 0x4A631E2AFA49B471ULL }, /* XSUM_XXH64_testdata[5100] */\n    { 2550, 0x000000009E3779B1ULL, 0x0B30E574AB7E36AFULL }, /* XSUM_XXH64_testdata[5101] */\n    { 2551, 0x0000000000000000ULL, 0xF20574833D40AD77ULL }, /* XSUM_XXH64_testdata[5102] */\n    { 2551, 0x000000009E3779B1ULL, 0x889FF8860EE36AFEULL }, /* XSUM_XXH64_testdata[5103] */\n    { 2552, 0x0000000000000000ULL, 0x70BA1EEA0107565AULL }, /* XSUM_XXH64_testdata[5104] */\n    { 2552, 0x000000009E3779B1ULL, 0xA054AEF606630A5AULL }, /* XSUM_XXH64_testdata[5105] */\n    { 2553, 0x0000000000000000ULL, 0x418A9F6CE1AEBEB3ULL }, /* XSUM_XXH64_testdata[5106] */\n    { 2553, 0x000000009E3779B1ULL, 0x3C7984A1BB90805AULL }, /* XSUM_XXH64_testdata[5107] */\n    { 2554, 0x0000000000000000ULL, 0x0757A0D5B7AFFF36ULL }, /* XSUM_XXH64_testdata[5108] */\n    { 2554, 0x000000009E3779B1ULL, 0xEED63607EB18DA54ULL }, /* XSUM_XXH64_testdata[5109] */\n    { 2555, 0x0000000000000000ULL, 0x270E08132777881AULL }, /* XSUM_XXH64_testdata[5110] */\n    { 2555, 0x000000009E3779B1ULL, 0xD00314EB5486C90CULL }, /* XSUM_XXH64_testdata[5111] */\n    { 2556, 0x0000000000000000ULL, 0x59CEC4774BA8E113ULL }, /* XSUM_XXH64_testdata[5112] */\n    { 2556, 0x000000009E3779B1ULL, 0x0ED2DD0577B9F3A2ULL }, /* XSUM_XXH64_testdata[5113] */\n    { 2557, 0x0000000000000000ULL, 0x21ED52DA46C6FEDCULL }, /* XSUM_XXH64_testdata[5114] */\n    { 2557, 0x000000009E3779B1ULL, 0xAC3DB390CB1DDF2BULL }, /* XSUM_XXH64_testdata[5115] */\n    { 2558, 0x0000000000000000ULL, 0xC8B3A2247A1D8F74ULL }, /* XSUM_XXH64_testdata[5116] */\n    { 2558, 0x000000009E3779B1ULL, 0x0D3D74F492DC8DEBULL }, /* XSUM_XXH64_testdata[5117] */\n    { 2559, 0x0000000000000000ULL, 0x5D584F587FC5D3B1ULL }, /* XSUM_XXH64_testdata[5118] */\n    { 2559, 0x000000009E3779B1ULL, 0x67A80025FD7E3700ULL }, /* XSUM_XXH64_testdata[5119] */\n    { 2560, 0x0000000000000000ULL, 0x83F99CC087B22635ULL }, /* XSUM_XXH64_testdata[5120] */\n    { 2560, 0x000000009E3779B1ULL, 0x85A74D89E67ADBE2ULL }, /* XSUM_XXH64_testdata[5121] */\n    { 2561, 0x0000000000000000ULL, 0x19BDFB430AA38FE4ULL }, /* XSUM_XXH64_testdata[5122] */\n    { 2561, 0x000000009E3779B1ULL, 0xBBFD4F1422A01B77ULL }, /* XSUM_XXH64_testdata[5123] */\n    { 2562, 0x0000000000000000ULL, 0x36E06919A9B51285ULL }, /* XSUM_XXH64_testdata[5124] */\n    { 2562, 0x000000009E3779B1ULL, 0xCD9BF49F71655F76ULL }, /* XSUM_XXH64_testdata[5125] */\n    { 2563, 0x0000000000000000ULL, 0xC11D32484BBA42E5ULL }, /* XSUM_XXH64_testdata[5126] */\n    { 2563, 0x000000009E3779B1ULL, 0xA6A45E5BEC1DB406ULL }, /* XSUM_XXH64_testdata[5127] */\n    { 2564, 0x0000000000000000ULL, 0xF31F6D5469A0ED15ULL }, /* XSUM_XXH64_testdata[5128] */\n    { 2564, 0x000000009E3779B1ULL, 0x32789A4E9AA3843CULL }, /* XSUM_XXH64_testdata[5129] */\n    { 2565, 0x0000000000000000ULL, 0x89DC8056830F4602ULL }, /* XSUM_XXH64_testdata[5130] */\n    { 2565, 0x000000009E3779B1ULL, 0x10F7304C7A13874CULL }, /* XSUM_XXH64_testdata[5131] */\n    { 2566, 0x0000000000000000ULL, 0x8BC21D605C444202ULL }, /* XSUM_XXH64_testdata[5132] */\n    { 2566, 0x000000009E3779B1ULL, 0x3C6E42458D0A0737ULL }, /* XSUM_XXH64_testdata[5133] */\n    { 2567, 0x0000000000000000ULL, 0xB1CA71BB284DA7C6ULL }, /* XSUM_XXH64_testdata[5134] */\n    { 2567, 0x000000009E3779B1ULL, 0x3C235DFB011059D2ULL }, /* XSUM_XXH64_testdata[5135] */\n    { 2568, 0x0000000000000000ULL, 0x3D1773565BA468E7ULL }, /* XSUM_XXH64_testdata[5136] */\n    { 2568, 0x000000009E3779B1ULL, 0x3C2EA3E2B7454522ULL }, /* XSUM_XXH64_testdata[5137] */\n    { 2569, 0x0000000000000000ULL, 0x3497C95ACD9DCDE4ULL }, /* XSUM_XXH64_testdata[5138] */\n    { 2569, 0x000000009E3779B1ULL, 0x5D28609B6C907B77ULL }, /* XSUM_XXH64_testdata[5139] */\n    { 2570, 0x0000000000000000ULL, 0x96F9AB4EC3DE2AB6ULL }, /* XSUM_XXH64_testdata[5140] */\n    { 2570, 0x000000009E3779B1ULL, 0x017991788C519CBDULL }, /* XSUM_XXH64_testdata[5141] */\n    { 2571, 0x0000000000000000ULL, 0x0D1501EA587D47D7ULL }, /* XSUM_XXH64_testdata[5142] */\n    { 2571, 0x000000009E3779B1ULL, 0x3277DB66D62CF81DULL }, /* XSUM_XXH64_testdata[5143] */\n    { 2572, 0x0000000000000000ULL, 0x7948F0265F7CE1BCULL }, /* XSUM_XXH64_testdata[5144] */\n    { 2572, 0x000000009E3779B1ULL, 0x5D64768B0522DD72ULL }, /* XSUM_XXH64_testdata[5145] */\n    { 2573, 0x0000000000000000ULL, 0xD45E1A66C64578DDULL }, /* XSUM_XXH64_testdata[5146] */\n    { 2573, 0x000000009E3779B1ULL, 0x339FF5AC0080679EULL }, /* XSUM_XXH64_testdata[5147] */\n    { 2574, 0x0000000000000000ULL, 0x5A32935DCD95B67EULL }, /* XSUM_XXH64_testdata[5148] */\n    { 2574, 0x000000009E3779B1ULL, 0x5E630C2F9ED18861ULL }, /* XSUM_XXH64_testdata[5149] */\n    { 2575, 0x0000000000000000ULL, 0x16E048DB63EAC2ABULL }, /* XSUM_XXH64_testdata[5150] */\n    { 2575, 0x000000009E3779B1ULL, 0x46DBD4D46BDBBB17ULL }, /* XSUM_XXH64_testdata[5151] */\n    { 2576, 0x0000000000000000ULL, 0x6AE023408A5E95EFULL }, /* XSUM_XXH64_testdata[5152] */\n    { 2576, 0x000000009E3779B1ULL, 0x650D105F97A515E4ULL }, /* XSUM_XXH64_testdata[5153] */\n    { 2577, 0x0000000000000000ULL, 0xD98E2183FD03F4CBULL }, /* XSUM_XXH64_testdata[5154] */\n    { 2577, 0x000000009E3779B1ULL, 0x0A535CF061C39882ULL }, /* XSUM_XXH64_testdata[5155] */\n    { 2578, 0x0000000000000000ULL, 0x74B82315411204CBULL }, /* XSUM_XXH64_testdata[5156] */\n    { 2578, 0x000000009E3779B1ULL, 0x3E823B36E834B40DULL }, /* XSUM_XXH64_testdata[5157] */\n    { 2579, 0x0000000000000000ULL, 0x4D2C74325DCF07C3ULL }, /* XSUM_XXH64_testdata[5158] */\n    { 2579, 0x000000009E3779B1ULL, 0x9E2D79DBDD1FB0D6ULL }, /* XSUM_XXH64_testdata[5159] */\n    { 2580, 0x0000000000000000ULL, 0xB337F642C83A364BULL }, /* XSUM_XXH64_testdata[5160] */\n    { 2580, 0x000000009E3779B1ULL, 0xF01454455DEDFFAEULL }, /* XSUM_XXH64_testdata[5161] */\n    { 2581, 0x0000000000000000ULL, 0xB02F23F9EC5EAC8BULL }, /* XSUM_XXH64_testdata[5162] */\n    { 2581, 0x000000009E3779B1ULL, 0xAEA837D286313274ULL }, /* XSUM_XXH64_testdata[5163] */\n    { 2582, 0x0000000000000000ULL, 0xB0633E618F4C0037ULL }, /* XSUM_XXH64_testdata[5164] */\n    { 2582, 0x000000009E3779B1ULL, 0x988688983C677A6DULL }, /* XSUM_XXH64_testdata[5165] */\n    { 2583, 0x0000000000000000ULL, 0xD3440E3FD0542718ULL }, /* XSUM_XXH64_testdata[5166] */\n    { 2583, 0x000000009E3779B1ULL, 0xEF7B191FC954F572ULL }, /* XSUM_XXH64_testdata[5167] */\n    { 2584, 0x0000000000000000ULL, 0xB199D4292F17F4ABULL }, /* XSUM_XXH64_testdata[5168] */\n    { 2584, 0x000000009E3779B1ULL, 0xBE7BA4F26719649DULL }, /* XSUM_XXH64_testdata[5169] */\n    { 2585, 0x0000000000000000ULL, 0xC5B5E073D6C9A083ULL }, /* XSUM_XXH64_testdata[5170] */\n    { 2585, 0x000000009E3779B1ULL, 0xC544B9B576D5F9F1ULL }, /* XSUM_XXH64_testdata[5171] */\n    { 2586, 0x0000000000000000ULL, 0x4129A9ACAAB95CA9ULL }, /* XSUM_XXH64_testdata[5172] */\n    { 2586, 0x000000009E3779B1ULL, 0xD1F9CD621EFD55DAULL }, /* XSUM_XXH64_testdata[5173] */\n    { 2587, 0x0000000000000000ULL, 0x8D251DBE8CC868EBULL }, /* XSUM_XXH64_testdata[5174] */\n    { 2587, 0x000000009E3779B1ULL, 0x4760D804633EEE29ULL }, /* XSUM_XXH64_testdata[5175] */\n    { 2588, 0x0000000000000000ULL, 0xE53EBF32FE8A64E0ULL }, /* XSUM_XXH64_testdata[5176] */\n    { 2588, 0x000000009E3779B1ULL, 0xB6D908963BDFD21EULL }, /* XSUM_XXH64_testdata[5177] */\n    { 2589, 0x0000000000000000ULL, 0x6149B9BFCC0055E2ULL }, /* XSUM_XXH64_testdata[5178] */\n    { 2589, 0x000000009E3779B1ULL, 0x671E494723FD1EA2ULL }, /* XSUM_XXH64_testdata[5179] */\n    { 2590, 0x0000000000000000ULL, 0x415D17FE6FC4FF62ULL }, /* XSUM_XXH64_testdata[5180] */\n    { 2590, 0x000000009E3779B1ULL, 0x0DDBA09EDD313121ULL }, /* XSUM_XXH64_testdata[5181] */\n    { 2591, 0x0000000000000000ULL, 0x6951F8737C8516D5ULL }, /* XSUM_XXH64_testdata[5182] */\n    { 2591, 0x000000009E3779B1ULL, 0xF41164BFC92C65DEULL }, /* XSUM_XXH64_testdata[5183] */\n    { 2592, 0x0000000000000000ULL, 0x4B2B6F6AD0870BFBULL }, /* XSUM_XXH64_testdata[5184] */\n    { 2592, 0x000000009E3779B1ULL, 0xFA266125AB4E59CDULL }, /* XSUM_XXH64_testdata[5185] */\n    { 2593, 0x0000000000000000ULL, 0xC99FFC1394CF58D5ULL }, /* XSUM_XXH64_testdata[5186] */\n    { 2593, 0x000000009E3779B1ULL, 0x0D90ADE91FBB1B6DULL }, /* XSUM_XXH64_testdata[5187] */\n    { 2594, 0x0000000000000000ULL, 0xAECE588915B4A956ULL }, /* XSUM_XXH64_testdata[5188] */\n    { 2594, 0x000000009E3779B1ULL, 0x548FE53719A4B473ULL }, /* XSUM_XXH64_testdata[5189] */\n    { 2595, 0x0000000000000000ULL, 0x082C8F1D873EB72FULL }, /* XSUM_XXH64_testdata[5190] */\n    { 2595, 0x000000009E3779B1ULL, 0xDEE41DB58C22ADBEULL }, /* XSUM_XXH64_testdata[5191] */\n    { 2596, 0x0000000000000000ULL, 0x1C67F310E2E4DDB3ULL }, /* XSUM_XXH64_testdata[5192] */\n    { 2596, 0x000000009E3779B1ULL, 0x8CC90EEEE829F990ULL }, /* XSUM_XXH64_testdata[5193] */\n    { 2597, 0x0000000000000000ULL, 0x2F6A517341919CBBULL }, /* XSUM_XXH64_testdata[5194] */\n    { 2597, 0x000000009E3779B1ULL, 0x3F46620F6E7530AAULL }, /* XSUM_XXH64_testdata[5195] */\n    { 2598, 0x0000000000000000ULL, 0xA338B83A2B305A49ULL }, /* XSUM_XXH64_testdata[5196] */\n    { 2598, 0x000000009E3779B1ULL, 0xA20C596E07029955ULL }, /* XSUM_XXH64_testdata[5197] */\n    { 2599, 0x0000000000000000ULL, 0x60A66179E4C7F851ULL }, /* XSUM_XXH64_testdata[5198] */\n    { 2599, 0x000000009E3779B1ULL, 0xC85A278F2F864E3AULL }, /* XSUM_XXH64_testdata[5199] */\n    { 2600, 0x0000000000000000ULL, 0x5934FB023B7DBD2CULL }, /* XSUM_XXH64_testdata[5200] */\n    { 2600, 0x000000009E3779B1ULL, 0x08F03493F2A42D4FULL }, /* XSUM_XXH64_testdata[5201] */\n    { 2601, 0x0000000000000000ULL, 0xC3C9986C593CA5F2ULL }, /* XSUM_XXH64_testdata[5202] */\n    { 2601, 0x000000009E3779B1ULL, 0x26451FFDB3A5ACC4ULL }, /* XSUM_XXH64_testdata[5203] */\n    { 2602, 0x0000000000000000ULL, 0x5EBDFC05AD6046DBULL }, /* XSUM_XXH64_testdata[5204] */\n    { 2602, 0x000000009E3779B1ULL, 0x25F6BD83F3AA1DA8ULL }, /* XSUM_XXH64_testdata[5205] */\n    { 2603, 0x0000000000000000ULL, 0x02E60218FF14CDA6ULL }, /* XSUM_XXH64_testdata[5206] */\n    { 2603, 0x000000009E3779B1ULL, 0xD6305D0118B4DC81ULL }, /* XSUM_XXH64_testdata[5207] */\n    { 2604, 0x0000000000000000ULL, 0xD6E4F790D368EEDCULL }, /* XSUM_XXH64_testdata[5208] */\n    { 2604, 0x000000009E3779B1ULL, 0xE417CE06D85ED712ULL }, /* XSUM_XXH64_testdata[5209] */\n    { 2605, 0x0000000000000000ULL, 0x763DF2348E14F86EULL }, /* XSUM_XXH64_testdata[5210] */\n    { 2605, 0x000000009E3779B1ULL, 0xD381FBF2226410D7ULL }, /* XSUM_XXH64_testdata[5211] */\n    { 2606, 0x0000000000000000ULL, 0x4DA2BCD504B251CBULL }, /* XSUM_XXH64_testdata[5212] */\n    { 2606, 0x000000009E3779B1ULL, 0x09F5E497A4F5B64AULL }, /* XSUM_XXH64_testdata[5213] */\n    { 2607, 0x0000000000000000ULL, 0x7E670C46EDB7A4D2ULL }, /* XSUM_XXH64_testdata[5214] */\n    { 2607, 0x000000009E3779B1ULL, 0x3EB80050462F35FAULL }, /* XSUM_XXH64_testdata[5215] */\n    { 2608, 0x0000000000000000ULL, 0xE98AB9693CE03323ULL }, /* XSUM_XXH64_testdata[5216] */\n    { 2608, 0x000000009E3779B1ULL, 0x42B26210B863396FULL }, /* XSUM_XXH64_testdata[5217] */\n    { 2609, 0x0000000000000000ULL, 0x3C7FEECBDE529FACULL }, /* XSUM_XXH64_testdata[5218] */\n    { 2609, 0x000000009E3779B1ULL, 0x9F3E59ABAA34E1C3ULL }, /* XSUM_XXH64_testdata[5219] */\n    { 2610, 0x0000000000000000ULL, 0xFB9CEDAA3C8D98FFULL }, /* XSUM_XXH64_testdata[5220] */\n    { 2610, 0x000000009E3779B1ULL, 0xCC14DD0608AF5B35ULL }, /* XSUM_XXH64_testdata[5221] */\n    { 2611, 0x0000000000000000ULL, 0xD82F0EE08177134CULL }, /* XSUM_XXH64_testdata[5222] */\n    { 2611, 0x000000009E3779B1ULL, 0xDD5B2B53FB3C5019ULL }, /* XSUM_XXH64_testdata[5223] */\n    { 2612, 0x0000000000000000ULL, 0x1B5D28466084694BULL }, /* XSUM_XXH64_testdata[5224] */\n    { 2612, 0x000000009E3779B1ULL, 0x8E9B4C69C13FF035ULL }, /* XSUM_XXH64_testdata[5225] */\n    { 2613, 0x0000000000000000ULL, 0xF4DA8B2FE91C4292ULL }, /* XSUM_XXH64_testdata[5226] */\n    { 2613, 0x000000009E3779B1ULL, 0xA8F5292EE97A6E51ULL }, /* XSUM_XXH64_testdata[5227] */\n    { 2614, 0x0000000000000000ULL, 0x6C7094F47C3217C0ULL }, /* XSUM_XXH64_testdata[5228] */\n    { 2614, 0x000000009E3779B1ULL, 0x359831901D882179ULL }, /* XSUM_XXH64_testdata[5229] */\n    { 2615, 0x0000000000000000ULL, 0x667A56EC43D229FEULL }, /* XSUM_XXH64_testdata[5230] */\n    { 2615, 0x000000009E3779B1ULL, 0x1D5CAC6F11FB958DULL }, /* XSUM_XXH64_testdata[5231] */\n    { 2616, 0x0000000000000000ULL, 0x1520962D2AA2899AULL }, /* XSUM_XXH64_testdata[5232] */\n    { 2616, 0x000000009E3779B1ULL, 0x7347200C5877690FULL }, /* XSUM_XXH64_testdata[5233] */\n    { 2617, 0x0000000000000000ULL, 0x8C43F5DC146DD9D0ULL }, /* XSUM_XXH64_testdata[5234] */\n    { 2617, 0x000000009E3779B1ULL, 0xF5568AF254DB5EC3ULL }, /* XSUM_XXH64_testdata[5235] */\n    { 2618, 0x0000000000000000ULL, 0x9288D12766618256ULL }, /* XSUM_XXH64_testdata[5236] */\n    { 2618, 0x000000009E3779B1ULL, 0xB26D042F0ADE546BULL }, /* XSUM_XXH64_testdata[5237] */\n    { 2619, 0x0000000000000000ULL, 0x769FD7FDCD4417CAULL }, /* XSUM_XXH64_testdata[5238] */\n    { 2619, 0x000000009E3779B1ULL, 0x05A60D279BF5899AULL }, /* XSUM_XXH64_testdata[5239] */\n    { 2620, 0x0000000000000000ULL, 0xF9D63094BDE28AC0ULL }, /* XSUM_XXH64_testdata[5240] */\n    { 2620, 0x000000009E3779B1ULL, 0x24C9A4539AA9FD71ULL }, /* XSUM_XXH64_testdata[5241] */\n    { 2621, 0x0000000000000000ULL, 0x8813D604210E2A45ULL }, /* XSUM_XXH64_testdata[5242] */\n    { 2621, 0x000000009E3779B1ULL, 0x3CBE1DBFD7CFDE07ULL }, /* XSUM_XXH64_testdata[5243] */\n    { 2622, 0x0000000000000000ULL, 0x463EBA3D6220F130ULL }, /* XSUM_XXH64_testdata[5244] */\n    { 2622, 0x000000009E3779B1ULL, 0x4A7D6DAEC093414FULL }, /* XSUM_XXH64_testdata[5245] */\n    { 2623, 0x0000000000000000ULL, 0x10BA4C061B2AAD4BULL }, /* XSUM_XXH64_testdata[5246] */\n    { 2623, 0x000000009E3779B1ULL, 0x0D999AF8EC61497AULL }, /* XSUM_XXH64_testdata[5247] */\n    { 2624, 0x0000000000000000ULL, 0x8F467C17E14498E4ULL }, /* XSUM_XXH64_testdata[5248] */\n    { 2624, 0x000000009E3779B1ULL, 0x0173F4E8BFBE354AULL }, /* XSUM_XXH64_testdata[5249] */\n    { 2625, 0x0000000000000000ULL, 0xA63C9815F6E9E7DAULL }, /* XSUM_XXH64_testdata[5250] */\n    { 2625, 0x000000009E3779B1ULL, 0x91D55F64CD86D519ULL }, /* XSUM_XXH64_testdata[5251] */\n    { 2626, 0x0000000000000000ULL, 0xFBB80C02CB53455CULL }, /* XSUM_XXH64_testdata[5252] */\n    { 2626, 0x000000009E3779B1ULL, 0xD67E4AA1E113CBC0ULL }, /* XSUM_XXH64_testdata[5253] */\n    { 2627, 0x0000000000000000ULL, 0x4A69EEE4D2B7E077ULL }, /* XSUM_XXH64_testdata[5254] */\n    { 2627, 0x000000009E3779B1ULL, 0xF45035BC81E651F6ULL }, /* XSUM_XXH64_testdata[5255] */\n    { 2628, 0x0000000000000000ULL, 0x91B179FB13DB9E2DULL }, /* XSUM_XXH64_testdata[5256] */\n    { 2628, 0x000000009E3779B1ULL, 0x59B1AFC0C06DBA22ULL }, /* XSUM_XXH64_testdata[5257] */\n    { 2629, 0x0000000000000000ULL, 0x03F7C5ED4DABBF1FULL }, /* XSUM_XXH64_testdata[5258] */\n    { 2629, 0x000000009E3779B1ULL, 0x042292ECF4B9CC9EULL }, /* XSUM_XXH64_testdata[5259] */\n    { 2630, 0x0000000000000000ULL, 0x9B0C117E3F84A12FULL }, /* XSUM_XXH64_testdata[5260] */\n    { 2630, 0x000000009E3779B1ULL, 0x2041FA9235B91B53ULL }, /* XSUM_XXH64_testdata[5261] */\n    { 2631, 0x0000000000000000ULL, 0x43AC65D9BFE824CBULL }, /* XSUM_XXH64_testdata[5262] */\n    { 2631, 0x000000009E3779B1ULL, 0x2041F4FE0FA0E97AULL }, /* XSUM_XXH64_testdata[5263] */\n    { 2632, 0x0000000000000000ULL, 0xE2C27C928AFBA65CULL }, /* XSUM_XXH64_testdata[5264] */\n    { 2632, 0x000000009E3779B1ULL, 0x6E21087DF1F8A6F0ULL }, /* XSUM_XXH64_testdata[5265] */\n    { 2633, 0x0000000000000000ULL, 0x3D0108B4B85473CDULL }, /* XSUM_XXH64_testdata[5266] */\n    { 2633, 0x000000009E3779B1ULL, 0x31FF9082BAF019B3ULL }, /* XSUM_XXH64_testdata[5267] */\n    { 2634, 0x0000000000000000ULL, 0x844CD36FB8DC639AULL }, /* XSUM_XXH64_testdata[5268] */\n    { 2634, 0x000000009E3779B1ULL, 0x7E7EF2B3AEE2A301ULL }, /* XSUM_XXH64_testdata[5269] */\n    { 2635, 0x0000000000000000ULL, 0x017E4D9D35557979ULL }, /* XSUM_XXH64_testdata[5270] */\n    { 2635, 0x000000009E3779B1ULL, 0x0B16F5B82BEDDC90ULL }, /* XSUM_XXH64_testdata[5271] */\n    { 2636, 0x0000000000000000ULL, 0x9FA2C8C44D878826ULL }, /* XSUM_XXH64_testdata[5272] */\n    { 2636, 0x000000009E3779B1ULL, 0xE05EBC6710F1CACEULL }, /* XSUM_XXH64_testdata[5273] */\n    { 2637, 0x0000000000000000ULL, 0x77C983C6385DEE11ULL }, /* XSUM_XXH64_testdata[5274] */\n    { 2637, 0x000000009E3779B1ULL, 0x4AC3B5A700C024A8ULL }, /* XSUM_XXH64_testdata[5275] */\n    { 2638, 0x0000000000000000ULL, 0x0AAFCD36F0F2A5EFULL }, /* XSUM_XXH64_testdata[5276] */\n    { 2638, 0x000000009E3779B1ULL, 0xBA21B39252F411A4ULL }, /* XSUM_XXH64_testdata[5277] */\n    { 2639, 0x0000000000000000ULL, 0xB667333E66722078ULL }, /* XSUM_XXH64_testdata[5278] */\n    { 2639, 0x000000009E3779B1ULL, 0xCD87A79875228B9DULL }, /* XSUM_XXH64_testdata[5279] */\n    { 2640, 0x0000000000000000ULL, 0x89FD20259313E855ULL }, /* XSUM_XXH64_testdata[5280] */\n    { 2640, 0x000000009E3779B1ULL, 0xF4145A269EC7BD79ULL }, /* XSUM_XXH64_testdata[5281] */\n    { 2641, 0x0000000000000000ULL, 0xFBC40C15329C8222ULL }, /* XSUM_XXH64_testdata[5282] */\n    { 2641, 0x000000009E3779B1ULL, 0x93A5C34ADDED7879ULL }, /* XSUM_XXH64_testdata[5283] */\n    { 2642, 0x0000000000000000ULL, 0x549F96ADD845CAACULL }, /* XSUM_XXH64_testdata[5284] */\n    { 2642, 0x000000009E3779B1ULL, 0x5B5FD31C800C2C6CULL }, /* XSUM_XXH64_testdata[5285] */\n    { 2643, 0x0000000000000000ULL, 0x395EBC5D181D1CD1ULL }, /* XSUM_XXH64_testdata[5286] */\n    { 2643, 0x000000009E3779B1ULL, 0x8654344D995D12E4ULL }, /* XSUM_XXH64_testdata[5287] */\n    { 2644, 0x0000000000000000ULL, 0x2E00C8B2D0ACDE9AULL }, /* XSUM_XXH64_testdata[5288] */\n    { 2644, 0x000000009E3779B1ULL, 0x0CD62CE8866CD2CFULL }, /* XSUM_XXH64_testdata[5289] */\n    { 2645, 0x0000000000000000ULL, 0xE8A6703DFE7279D3ULL }, /* XSUM_XXH64_testdata[5290] */\n    { 2645, 0x000000009E3779B1ULL, 0x87262AEFE486A286ULL }, /* XSUM_XXH64_testdata[5291] */\n    { 2646, 0x0000000000000000ULL, 0x988915B106F8D70DULL }, /* XSUM_XXH64_testdata[5292] */\n    { 2646, 0x000000009E3779B1ULL, 0x63619819F8BCD9F6ULL }, /* XSUM_XXH64_testdata[5293] */\n    { 2647, 0x0000000000000000ULL, 0xDD0712DC553F0FD8ULL }, /* XSUM_XXH64_testdata[5294] */\n    { 2647, 0x000000009E3779B1ULL, 0xA96292255EDE4F0FULL }, /* XSUM_XXH64_testdata[5295] */\n    { 2648, 0x0000000000000000ULL, 0x6AA1CCEBDC2C201BULL }, /* XSUM_XXH64_testdata[5296] */\n    { 2648, 0x000000009E3779B1ULL, 0x12D897F7689C686AULL }, /* XSUM_XXH64_testdata[5297] */\n    { 2649, 0x0000000000000000ULL, 0x7C0F079363ECF519ULL }, /* XSUM_XXH64_testdata[5298] */\n    { 2649, 0x000000009E3779B1ULL, 0xB416D464C80C6535ULL }, /* XSUM_XXH64_testdata[5299] */\n    { 2650, 0x0000000000000000ULL, 0xA2D9698DD8C96DC6ULL }, /* XSUM_XXH64_testdata[5300] */\n    { 2650, 0x000000009E3779B1ULL, 0xE23647CCC5492549ULL }, /* XSUM_XXH64_testdata[5301] */\n    { 2651, 0x0000000000000000ULL, 0x613F397CA5BAEC4AULL }, /* XSUM_XXH64_testdata[5302] */\n    { 2651, 0x000000009E3779B1ULL, 0x0E2A17D8B1C8ABDEULL }, /* XSUM_XXH64_testdata[5303] */\n    { 2652, 0x0000000000000000ULL, 0xC487EEE98764070DULL }, /* XSUM_XXH64_testdata[5304] */\n    { 2652, 0x000000009E3779B1ULL, 0xCD52370E3DB1A704ULL }, /* XSUM_XXH64_testdata[5305] */\n    { 2653, 0x0000000000000000ULL, 0xCCEE803E4CDAA2FAULL }, /* XSUM_XXH64_testdata[5306] */\n    { 2653, 0x000000009E3779B1ULL, 0xB39508DAA0E44E51ULL }, /* XSUM_XXH64_testdata[5307] */\n    { 2654, 0x0000000000000000ULL, 0xD55AA0D63C19C6F3ULL }, /* XSUM_XXH64_testdata[5308] */\n    { 2654, 0x000000009E3779B1ULL, 0x4BB06DD09E776011ULL }, /* XSUM_XXH64_testdata[5309] */\n    { 2655, 0x0000000000000000ULL, 0x7B0C4253A0EA3866ULL }, /* XSUM_XXH64_testdata[5310] */\n    { 2655, 0x000000009E3779B1ULL, 0x2A91742CAA534523ULL }, /* XSUM_XXH64_testdata[5311] */\n    { 2656, 0x0000000000000000ULL, 0x0F305E07162AA67BULL }, /* XSUM_XXH64_testdata[5312] */\n    { 2656, 0x000000009E3779B1ULL, 0xE921F36E22F9CE55ULL }, /* XSUM_XXH64_testdata[5313] */\n    { 2657, 0x0000000000000000ULL, 0x33F79984714E8B8EULL }, /* XSUM_XXH64_testdata[5314] */\n    { 2657, 0x000000009E3779B1ULL, 0x0CDE36E72BAFE48BULL }, /* XSUM_XXH64_testdata[5315] */\n    { 2658, 0x0000000000000000ULL, 0x6AD140997C752ACBULL }, /* XSUM_XXH64_testdata[5316] */\n    { 2658, 0x000000009E3779B1ULL, 0x7206E261FF078AACULL }, /* XSUM_XXH64_testdata[5317] */\n    { 2659, 0x0000000000000000ULL, 0x1827BDA7AB265D3FULL }, /* XSUM_XXH64_testdata[5318] */\n    { 2659, 0x000000009E3779B1ULL, 0x90FC4F031086C5C7ULL }, /* XSUM_XXH64_testdata[5319] */\n    { 2660, 0x0000000000000000ULL, 0xB3B5D0990492E6FAULL }, /* XSUM_XXH64_testdata[5320] */\n    { 2660, 0x000000009E3779B1ULL, 0xF370B1C33CBE7CEDULL }, /* XSUM_XXH64_testdata[5321] */\n    { 2661, 0x0000000000000000ULL, 0x70E81380C2888613ULL }, /* XSUM_XXH64_testdata[5322] */\n    { 2661, 0x000000009E3779B1ULL, 0x4637639F608D233AULL }, /* XSUM_XXH64_testdata[5323] */\n    { 2662, 0x0000000000000000ULL, 0x663C7752A6BDDA70ULL }, /* XSUM_XXH64_testdata[5324] */\n    { 2662, 0x000000009E3779B1ULL, 0x9512C334D0B0CB8EULL }, /* XSUM_XXH64_testdata[5325] */\n    { 2663, 0x0000000000000000ULL, 0xE3CAC100BB5A2051ULL }, /* XSUM_XXH64_testdata[5326] */\n    { 2663, 0x000000009E3779B1ULL, 0xD57C633DFE7C4182ULL }, /* XSUM_XXH64_testdata[5327] */\n    { 2664, 0x0000000000000000ULL, 0xD193570CEBF9B373ULL }, /* XSUM_XXH64_testdata[5328] */\n    { 2664, 0x000000009E3779B1ULL, 0x2A981EB758C23653ULL }, /* XSUM_XXH64_testdata[5329] */\n    { 2665, 0x0000000000000000ULL, 0x3ADDB3CD79250F6CULL }, /* XSUM_XXH64_testdata[5330] */\n    { 2665, 0x000000009E3779B1ULL, 0x8600AC8BE53281FAULL }, /* XSUM_XXH64_testdata[5331] */\n    { 2666, 0x0000000000000000ULL, 0xE05D37B2E931832CULL }, /* XSUM_XXH64_testdata[5332] */\n    { 2666, 0x000000009E3779B1ULL, 0xACDE2F0F002CDC10ULL }, /* XSUM_XXH64_testdata[5333] */\n    { 2667, 0x0000000000000000ULL, 0x4C56D2C8FAD01640ULL }, /* XSUM_XXH64_testdata[5334] */\n    { 2667, 0x000000009E3779B1ULL, 0xD61CFA56FEB07884ULL }, /* XSUM_XXH64_testdata[5335] */\n    { 2668, 0x0000000000000000ULL, 0x9225D320A8C44FA0ULL }, /* XSUM_XXH64_testdata[5336] */\n    { 2668, 0x000000009E3779B1ULL, 0x5ABE09FE0F3F56B6ULL }, /* XSUM_XXH64_testdata[5337] */\n    { 2669, 0x0000000000000000ULL, 0x5BD44EAB7496875DULL }, /* XSUM_XXH64_testdata[5338] */\n    { 2669, 0x000000009E3779B1ULL, 0xAF434D8F323D816FULL }, /* XSUM_XXH64_testdata[5339] */\n    { 2670, 0x0000000000000000ULL, 0x0B20E298A82CC4CEULL }, /* XSUM_XXH64_testdata[5340] */\n    { 2670, 0x000000009E3779B1ULL, 0x57193651765AB793ULL }, /* XSUM_XXH64_testdata[5341] */\n    { 2671, 0x0000000000000000ULL, 0xBAD03280CF5667ACULL }, /* XSUM_XXH64_testdata[5342] */\n    { 2671, 0x000000009E3779B1ULL, 0x786EE36A1E3148EDULL }, /* XSUM_XXH64_testdata[5343] */\n    { 2672, 0x0000000000000000ULL, 0x7196A61190D02110ULL }, /* XSUM_XXH64_testdata[5344] */\n    { 2672, 0x000000009E3779B1ULL, 0x6C0AC59B9C1C0096ULL }, /* XSUM_XXH64_testdata[5345] */\n    { 2673, 0x0000000000000000ULL, 0x3456AF9F456A731EULL }, /* XSUM_XXH64_testdata[5346] */\n    { 2673, 0x000000009E3779B1ULL, 0xB07992625E938B09ULL }, /* XSUM_XXH64_testdata[5347] */\n    { 2674, 0x0000000000000000ULL, 0x080ED8859D98385AULL }, /* XSUM_XXH64_testdata[5348] */\n    { 2674, 0x000000009E3779B1ULL, 0x390342FB527495ECULL }, /* XSUM_XXH64_testdata[5349] */\n    { 2675, 0x0000000000000000ULL, 0x16533A20A1C8764FULL }, /* XSUM_XXH64_testdata[5350] */\n    { 2675, 0x000000009E3779B1ULL, 0xA9E28B30C5E307E7ULL }, /* XSUM_XXH64_testdata[5351] */\n    { 2676, 0x0000000000000000ULL, 0x167BA5525461A3F2ULL }, /* XSUM_XXH64_testdata[5352] */\n    { 2676, 0x000000009E3779B1ULL, 0xED448F9A0A945211ULL }, /* XSUM_XXH64_testdata[5353] */\n    { 2677, 0x0000000000000000ULL, 0xF628935AC66BB6C6ULL }, /* XSUM_XXH64_testdata[5354] */\n    { 2677, 0x000000009E3779B1ULL, 0xC9E7838495BBE71CULL }, /* XSUM_XXH64_testdata[5355] */\n    { 2678, 0x0000000000000000ULL, 0x2D3B36BE929C6D6AULL }, /* XSUM_XXH64_testdata[5356] */\n    { 2678, 0x000000009E3779B1ULL, 0x91C90F3F0565C673ULL }, /* XSUM_XXH64_testdata[5357] */\n    { 2679, 0x0000000000000000ULL, 0x68B9562720C00072ULL }, /* XSUM_XXH64_testdata[5358] */\n    { 2679, 0x000000009E3779B1ULL, 0x5261710AC54DF6F0ULL }, /* XSUM_XXH64_testdata[5359] */\n    { 2680, 0x0000000000000000ULL, 0x86DD5AFB404028DEULL }, /* XSUM_XXH64_testdata[5360] */\n    { 2680, 0x000000009E3779B1ULL, 0x601887F21245CCA7ULL }, /* XSUM_XXH64_testdata[5361] */\n    { 2681, 0x0000000000000000ULL, 0x330471DCE75C180FULL }, /* XSUM_XXH64_testdata[5362] */\n    { 2681, 0x000000009E3779B1ULL, 0x58E21FD212C0629FULL }, /* XSUM_XXH64_testdata[5363] */\n    { 2682, 0x0000000000000000ULL, 0x9877A4B98F1B3FEEULL }, /* XSUM_XXH64_testdata[5364] */\n    { 2682, 0x000000009E3779B1ULL, 0x8514C3FCBD5FE0C7ULL }, /* XSUM_XXH64_testdata[5365] */\n    { 2683, 0x0000000000000000ULL, 0x5F66B8A3C9DA0E9DULL }, /* XSUM_XXH64_testdata[5366] */\n    { 2683, 0x000000009E3779B1ULL, 0x580CDCA978608001ULL }, /* XSUM_XXH64_testdata[5367] */\n    { 2684, 0x0000000000000000ULL, 0xB1B04607AC4CFCB2ULL }, /* XSUM_XXH64_testdata[5368] */\n    { 2684, 0x000000009E3779B1ULL, 0x3DEEBA595E536F88ULL }, /* XSUM_XXH64_testdata[5369] */\n    { 2685, 0x0000000000000000ULL, 0x89061C6498705235ULL }, /* XSUM_XXH64_testdata[5370] */\n    { 2685, 0x000000009E3779B1ULL, 0x576FFDCED4157FB6ULL }, /* XSUM_XXH64_testdata[5371] */\n    { 2686, 0x0000000000000000ULL, 0x64227E6A409E326AULL }, /* XSUM_XXH64_testdata[5372] */\n    { 2686, 0x000000009E3779B1ULL, 0x753511B3D56ACEB3ULL }, /* XSUM_XXH64_testdata[5373] */\n    { 2687, 0x0000000000000000ULL, 0x1B61A9FFE074F81CULL }, /* XSUM_XXH64_testdata[5374] */\n    { 2687, 0x000000009E3779B1ULL, 0x2BA11D20F2564954ULL }, /* XSUM_XXH64_testdata[5375] */\n    { 2688, 0x0000000000000000ULL, 0xD98B2098D717BD03ULL }, /* XSUM_XXH64_testdata[5376] */\n    { 2688, 0x000000009E3779B1ULL, 0xFB84E91EAE1A4CC2ULL }, /* XSUM_XXH64_testdata[5377] */\n    { 2689, 0x0000000000000000ULL, 0x80E5DFA899A6F7A4ULL }, /* XSUM_XXH64_testdata[5378] */\n    { 2689, 0x000000009E3779B1ULL, 0x71E7A44665EF67A5ULL }, /* XSUM_XXH64_testdata[5379] */\n    { 2690, 0x0000000000000000ULL, 0xC98076B6FFF01245ULL }, /* XSUM_XXH64_testdata[5380] */\n    { 2690, 0x000000009E3779B1ULL, 0x2DF344C02FCFEE4BULL }, /* XSUM_XXH64_testdata[5381] */\n    { 2691, 0x0000000000000000ULL, 0x413625C9D00E64D9ULL }, /* XSUM_XXH64_testdata[5382] */\n    { 2691, 0x000000009E3779B1ULL, 0x5F792330E530E4B4ULL }, /* XSUM_XXH64_testdata[5383] */\n    { 2692, 0x0000000000000000ULL, 0xACA7B716575B1D4EULL }, /* XSUM_XXH64_testdata[5384] */\n    { 2692, 0x000000009E3779B1ULL, 0xF803C34827B379F8ULL }, /* XSUM_XXH64_testdata[5385] */\n    { 2693, 0x0000000000000000ULL, 0xEE3540E360882585ULL }, /* XSUM_XXH64_testdata[5386] */\n    { 2693, 0x000000009E3779B1ULL, 0x545A705F09C71769ULL }, /* XSUM_XXH64_testdata[5387] */\n    { 2694, 0x0000000000000000ULL, 0x86766A5138C80F5FULL }, /* XSUM_XXH64_testdata[5388] */\n    { 2694, 0x000000009E3779B1ULL, 0x643CC69E8C0C732CULL }, /* XSUM_XXH64_testdata[5389] */\n    { 2695, 0x0000000000000000ULL, 0x084085526D3FFE9DULL }, /* XSUM_XXH64_testdata[5390] */\n    { 2695, 0x000000009E3779B1ULL, 0x2160224648B9FFD1ULL }, /* XSUM_XXH64_testdata[5391] */\n    { 2696, 0x0000000000000000ULL, 0x9D884DABF83B982EULL }, /* XSUM_XXH64_testdata[5392] */\n    { 2696, 0x000000009E3779B1ULL, 0x3A8122761B5D70CDULL }, /* XSUM_XXH64_testdata[5393] */\n    { 2697, 0x0000000000000000ULL, 0xB851B7E262C1F756ULL }, /* XSUM_XXH64_testdata[5394] */\n    { 2697, 0x000000009E3779B1ULL, 0x48905F3A7F8B5BE6ULL }, /* XSUM_XXH64_testdata[5395] */\n    { 2698, 0x0000000000000000ULL, 0x1A76A449398A1D41ULL }, /* XSUM_XXH64_testdata[5396] */\n    { 2698, 0x000000009E3779B1ULL, 0x5EF74E8EFE36E080ULL }, /* XSUM_XXH64_testdata[5397] */\n    { 2699, 0x0000000000000000ULL, 0x1ABDDC0B0F1BDF1EULL }, /* XSUM_XXH64_testdata[5398] */\n    { 2699, 0x000000009E3779B1ULL, 0x29609C0854CD9D11ULL }, /* XSUM_XXH64_testdata[5399] */\n    { 2700, 0x0000000000000000ULL, 0xB20EC3D53B332DF3ULL }, /* XSUM_XXH64_testdata[5400] */\n    { 2700, 0x000000009E3779B1ULL, 0x00450D755519E1F1ULL }, /* XSUM_XXH64_testdata[5401] */\n    { 2701, 0x0000000000000000ULL, 0xEA8710015BAFDDFFULL }, /* XSUM_XXH64_testdata[5402] */\n    { 2701, 0x000000009E3779B1ULL, 0x0925A9FBB93DB997ULL }, /* XSUM_XXH64_testdata[5403] */\n    { 2702, 0x0000000000000000ULL, 0xA4B8D248ECF402EAULL }, /* XSUM_XXH64_testdata[5404] */\n    { 2702, 0x000000009E3779B1ULL, 0x8D8F4B8DAE6A5B08ULL }, /* XSUM_XXH64_testdata[5405] */\n    { 2703, 0x0000000000000000ULL, 0x745E9262603F0F00ULL }, /* XSUM_XXH64_testdata[5406] */\n    { 2703, 0x000000009E3779B1ULL, 0xBAC749A8F3AF1D69ULL }, /* XSUM_XXH64_testdata[5407] */\n    { 2704, 0x0000000000000000ULL, 0xEF5B849012A29DBCULL }, /* XSUM_XXH64_testdata[5408] */\n    { 2704, 0x000000009E3779B1ULL, 0xB48440AE4AF2E9A7ULL }, /* XSUM_XXH64_testdata[5409] */\n    { 2705, 0x0000000000000000ULL, 0xFFCDC29BBCA8117CULL }, /* XSUM_XXH64_testdata[5410] */\n    { 2705, 0x000000009E3779B1ULL, 0x24F85DC5F9747418ULL }, /* XSUM_XXH64_testdata[5411] */\n    { 2706, 0x0000000000000000ULL, 0x076E87140E7EA883ULL }, /* XSUM_XXH64_testdata[5412] */\n    { 2706, 0x000000009E3779B1ULL, 0xD02EC0A9F57B989DULL }, /* XSUM_XXH64_testdata[5413] */\n    { 2707, 0x0000000000000000ULL, 0xE3C22032C03E4501ULL }, /* XSUM_XXH64_testdata[5414] */\n    { 2707, 0x000000009E3779B1ULL, 0xC2C5F78167E77C63ULL }, /* XSUM_XXH64_testdata[5415] */\n    { 2708, 0x0000000000000000ULL, 0x770B0ECBF2E10CC6ULL }, /* XSUM_XXH64_testdata[5416] */\n    { 2708, 0x000000009E3779B1ULL, 0x921911A6D213DCC1ULL }, /* XSUM_XXH64_testdata[5417] */\n    { 2709, 0x0000000000000000ULL, 0xAD6DCC60CEECEACEULL }, /* XSUM_XXH64_testdata[5418] */\n    { 2709, 0x000000009E3779B1ULL, 0xFDDF6CB5915E289EULL }, /* XSUM_XXH64_testdata[5419] */\n    { 2710, 0x0000000000000000ULL, 0x6728377CCED8CF89ULL }, /* XSUM_XXH64_testdata[5420] */\n    { 2710, 0x000000009E3779B1ULL, 0x3AD576A0954C0DEAULL }, /* XSUM_XXH64_testdata[5421] */\n    { 2711, 0x0000000000000000ULL, 0x11DC529411B5E017ULL }, /* XSUM_XXH64_testdata[5422] */\n    { 2711, 0x000000009E3779B1ULL, 0x121221F029BC9977ULL }, /* XSUM_XXH64_testdata[5423] */\n    { 2712, 0x0000000000000000ULL, 0xF7F2C8BA02E5BA73ULL }, /* XSUM_XXH64_testdata[5424] */\n    { 2712, 0x000000009E3779B1ULL, 0x367ECCA834A57093ULL }, /* XSUM_XXH64_testdata[5425] */\n    { 2713, 0x0000000000000000ULL, 0xCEBC36D72E9BF06AULL }, /* XSUM_XXH64_testdata[5426] */\n    { 2713, 0x000000009E3779B1ULL, 0xC8365B9763C264C2ULL }, /* XSUM_XXH64_testdata[5427] */\n    { 2714, 0x0000000000000000ULL, 0xAA11A0E7EFDDA1CCULL }, /* XSUM_XXH64_testdata[5428] */\n    { 2714, 0x000000009E3779B1ULL, 0x04E69C921B6EED5BULL }, /* XSUM_XXH64_testdata[5429] */\n    { 2715, 0x0000000000000000ULL, 0x9FD3098521645FC5ULL }, /* XSUM_XXH64_testdata[5430] */\n    { 2715, 0x000000009E3779B1ULL, 0x3CC78AA080297D6FULL }, /* XSUM_XXH64_testdata[5431] */\n    { 2716, 0x0000000000000000ULL, 0x16A1F0DAEDE1B06CULL }, /* XSUM_XXH64_testdata[5432] */\n    { 2716, 0x000000009E3779B1ULL, 0x1AA5B9C6DA32E4A7ULL }, /* XSUM_XXH64_testdata[5433] */\n    { 2717, 0x0000000000000000ULL, 0x86C886AAB05A00E3ULL }, /* XSUM_XXH64_testdata[5434] */\n    { 2717, 0x000000009E3779B1ULL, 0xAF9EC015F2757642ULL }, /* XSUM_XXH64_testdata[5435] */\n    { 2718, 0x0000000000000000ULL, 0xEE437AF8C5F4A30FULL }, /* XSUM_XXH64_testdata[5436] */\n    { 2718, 0x000000009E3779B1ULL, 0x82D315A1001625DAULL }, /* XSUM_XXH64_testdata[5437] */\n    { 2719, 0x0000000000000000ULL, 0xAB5D9ED800E5D8DBULL }, /* XSUM_XXH64_testdata[5438] */\n    { 2719, 0x000000009E3779B1ULL, 0x13E554D742D4D640ULL }, /* XSUM_XXH64_testdata[5439] */\n    { 2720, 0x0000000000000000ULL, 0x74DC0CD729CD226AULL }, /* XSUM_XXH64_testdata[5440] */\n    { 2720, 0x000000009E3779B1ULL, 0xF8808D2C9B19308EULL }, /* XSUM_XXH64_testdata[5441] */\n    { 2721, 0x0000000000000000ULL, 0x84727B4DFBEF7E66ULL }, /* XSUM_XXH64_testdata[5442] */\n    { 2721, 0x000000009E3779B1ULL, 0x77AD527413D6A5C3ULL }, /* XSUM_XXH64_testdata[5443] */\n    { 2722, 0x0000000000000000ULL, 0xDAA31E1223B00447ULL }, /* XSUM_XXH64_testdata[5444] */\n    { 2722, 0x000000009E3779B1ULL, 0xDF4AAC2AA73680A6ULL }, /* XSUM_XXH64_testdata[5445] */\n    { 2723, 0x0000000000000000ULL, 0x607668A2BC6B318CULL }, /* XSUM_XXH64_testdata[5446] */\n    { 2723, 0x000000009E3779B1ULL, 0x00DD477B2A142478ULL }, /* XSUM_XXH64_testdata[5447] */\n    { 2724, 0x0000000000000000ULL, 0xCCC674D7CBD6A3FFULL }, /* XSUM_XXH64_testdata[5448] */\n    { 2724, 0x000000009E3779B1ULL, 0x6F5757E61B7C40F4ULL }, /* XSUM_XXH64_testdata[5449] */\n    { 2725, 0x0000000000000000ULL, 0x36C89133B51B8735ULL }, /* XSUM_XXH64_testdata[5450] */\n    { 2725, 0x000000009E3779B1ULL, 0xCC9056B5D271C355ULL }, /* XSUM_XXH64_testdata[5451] */\n    { 2726, 0x0000000000000000ULL, 0x90BF10B3E9F52186ULL }, /* XSUM_XXH64_testdata[5452] */\n    { 2726, 0x000000009E3779B1ULL, 0x816CC4364BE94BB4ULL }, /* XSUM_XXH64_testdata[5453] */\n    { 2727, 0x0000000000000000ULL, 0xCBB5E17B0B20A6D4ULL }, /* XSUM_XXH64_testdata[5454] */\n    { 2727, 0x000000009E3779B1ULL, 0x43DD1B6F0E41CC05ULL }, /* XSUM_XXH64_testdata[5455] */\n    { 2728, 0x0000000000000000ULL, 0xACFA07806D3A6433ULL }, /* XSUM_XXH64_testdata[5456] */\n    { 2728, 0x000000009E3779B1ULL, 0x7FB5E6E2BF98C131ULL }, /* XSUM_XXH64_testdata[5457] */\n    { 2729, 0x0000000000000000ULL, 0x39C7E75BD4A5F06AULL }, /* XSUM_XXH64_testdata[5458] */\n    { 2729, 0x000000009E3779B1ULL, 0xBCA33467CC5A6E53ULL }, /* XSUM_XXH64_testdata[5459] */\n    { 2730, 0x0000000000000000ULL, 0xD8472FD3A3C43BC9ULL }, /* XSUM_XXH64_testdata[5460] */\n    { 2730, 0x000000009E3779B1ULL, 0x44657C0FE2A47DCCULL }, /* XSUM_XXH64_testdata[5461] */\n    { 2731, 0x0000000000000000ULL, 0x52D8EF194B75B28AULL }, /* XSUM_XXH64_testdata[5462] */\n    { 2731, 0x000000009E3779B1ULL, 0x961F93CE3C6B2BC5ULL }, /* XSUM_XXH64_testdata[5463] */\n    { 2732, 0x0000000000000000ULL, 0xB07CA76D9405EEFFULL }, /* XSUM_XXH64_testdata[5464] */\n    { 2732, 0x000000009E3779B1ULL, 0x6C751DB330B24AA9ULL }, /* XSUM_XXH64_testdata[5465] */\n    { 2733, 0x0000000000000000ULL, 0x3C9623866A9DEA54ULL }, /* XSUM_XXH64_testdata[5466] */\n    { 2733, 0x000000009E3779B1ULL, 0x3155523F0157EE1AULL }, /* XSUM_XXH64_testdata[5467] */\n    { 2734, 0x0000000000000000ULL, 0x5B34B4F5A89DA21BULL }, /* XSUM_XXH64_testdata[5468] */\n    { 2734, 0x000000009E3779B1ULL, 0x13C472A50030EAE5ULL }, /* XSUM_XXH64_testdata[5469] */\n    { 2735, 0x0000000000000000ULL, 0xE783988272A6DBDBULL }, /* XSUM_XXH64_testdata[5470] */\n    { 2735, 0x000000009E3779B1ULL, 0x384E3C4C5F45F3BBULL }, /* XSUM_XXH64_testdata[5471] */\n    { 2736, 0x0000000000000000ULL, 0x1C2AA7A98CF52E58ULL }, /* XSUM_XXH64_testdata[5472] */\n    { 2736, 0x000000009E3779B1ULL, 0x41F9DCDBCADED49EULL }, /* XSUM_XXH64_testdata[5473] */\n    { 2737, 0x0000000000000000ULL, 0x3EB459238E0DF66FULL }, /* XSUM_XXH64_testdata[5474] */\n    { 2737, 0x000000009E3779B1ULL, 0x1272290FEEE7786FULL }, /* XSUM_XXH64_testdata[5475] */\n    { 2738, 0x0000000000000000ULL, 0x707FEE8CFA293055ULL }, /* XSUM_XXH64_testdata[5476] */\n    { 2738, 0x000000009E3779B1ULL, 0xB1A2376F169AB9FAULL }, /* XSUM_XXH64_testdata[5477] */\n    { 2739, 0x0000000000000000ULL, 0xB18EDEB4FBBE355BULL }, /* XSUM_XXH64_testdata[5478] */\n    { 2739, 0x000000009E3779B1ULL, 0x375B016743D3FE55ULL }, /* XSUM_XXH64_testdata[5479] */\n    { 2740, 0x0000000000000000ULL, 0xA4F1703D6A391092ULL }, /* XSUM_XXH64_testdata[5480] */\n    { 2740, 0x000000009E3779B1ULL, 0x341AE1FA491CAE89ULL }, /* XSUM_XXH64_testdata[5481] */\n    { 2741, 0x0000000000000000ULL, 0xAAC51A59DFE29D5CULL }, /* XSUM_XXH64_testdata[5482] */\n    { 2741, 0x000000009E3779B1ULL, 0x0B28F9D9635DC2B2ULL }, /* XSUM_XXH64_testdata[5483] */\n    { 2742, 0x0000000000000000ULL, 0x3450A5D763119EDCULL }, /* XSUM_XXH64_testdata[5484] */\n    { 2742, 0x000000009E3779B1ULL, 0xFC3D9E0AC6631D7BULL }, /* XSUM_XXH64_testdata[5485] */\n    { 2743, 0x0000000000000000ULL, 0x4AF141747FB0F2D2ULL }, /* XSUM_XXH64_testdata[5486] */\n    { 2743, 0x000000009E3779B1ULL, 0x1AEFB8F2FC078381ULL }, /* XSUM_XXH64_testdata[5487] */\n    { 2744, 0x0000000000000000ULL, 0x1AD40AEFE2E43A82ULL }, /* XSUM_XXH64_testdata[5488] */\n    { 2744, 0x000000009E3779B1ULL, 0x9A156FDB14E362F6ULL }, /* XSUM_XXH64_testdata[5489] */\n    { 2745, 0x0000000000000000ULL, 0xB85D48F67CCD2161ULL }, /* XSUM_XXH64_testdata[5490] */\n    { 2745, 0x000000009E3779B1ULL, 0xB770A9A3491E2ED3ULL }, /* XSUM_XXH64_testdata[5491] */\n    { 2746, 0x0000000000000000ULL, 0xE6F1D209FB39BCADULL }, /* XSUM_XXH64_testdata[5492] */\n    { 2746, 0x000000009E3779B1ULL, 0xAB26E3D3ECBA0716ULL }, /* XSUM_XXH64_testdata[5493] */\n    { 2747, 0x0000000000000000ULL, 0xD5CA78065DC757A8ULL }, /* XSUM_XXH64_testdata[5494] */\n    { 2747, 0x000000009E3779B1ULL, 0x27AB66CCD851AE6CULL }, /* XSUM_XXH64_testdata[5495] */\n    { 2748, 0x0000000000000000ULL, 0x3CB1566F2FE57916ULL }, /* XSUM_XXH64_testdata[5496] */\n    { 2748, 0x000000009E3779B1ULL, 0xA82B78FA74AB9DB9ULL }, /* XSUM_XXH64_testdata[5497] */\n    { 2749, 0x0000000000000000ULL, 0x8614C28C20F8813BULL }, /* XSUM_XXH64_testdata[5498] */\n    { 2749, 0x000000009E3779B1ULL, 0x77D89C69EE99EACBULL }, /* XSUM_XXH64_testdata[5499] */\n    { 2750, 0x0000000000000000ULL, 0xF925B3843DA4D189ULL }, /* XSUM_XXH64_testdata[5500] */\n    { 2750, 0x000000009E3779B1ULL, 0x6E304C463FD16CE6ULL }, /* XSUM_XXH64_testdata[5501] */\n    { 2751, 0x0000000000000000ULL, 0x5F0F31DBA8C7916AULL }, /* XSUM_XXH64_testdata[5502] */\n    { 2751, 0x000000009E3779B1ULL, 0x0B3573B4ED458C54ULL }, /* XSUM_XXH64_testdata[5503] */\n    { 2752, 0x0000000000000000ULL, 0x2BD4F5DA61B6102CULL }, /* XSUM_XXH64_testdata[5504] */\n    { 2752, 0x000000009E3779B1ULL, 0x9E6ED12EC8463123ULL }, /* XSUM_XXH64_testdata[5505] */\n    { 2753, 0x0000000000000000ULL, 0xD6066C9A538965ADULL }, /* XSUM_XXH64_testdata[5506] */\n    { 2753, 0x000000009E3779B1ULL, 0x4F4A464B4404E865ULL }, /* XSUM_XXH64_testdata[5507] */\n    { 2754, 0x0000000000000000ULL, 0x749BF9071A4AB5D6ULL }, /* XSUM_XXH64_testdata[5508] */\n    { 2754, 0x000000009E3779B1ULL, 0x37C5AF66BDCBBB8BULL }, /* XSUM_XXH64_testdata[5509] */\n    { 2755, 0x0000000000000000ULL, 0xE5F08BA0B923EE17ULL }, /* XSUM_XXH64_testdata[5510] */\n    { 2755, 0x000000009E3779B1ULL, 0x4B3D407C89688B40ULL }, /* XSUM_XXH64_testdata[5511] */\n    { 2756, 0x0000000000000000ULL, 0x70C0CBE55C9D4120ULL }, /* XSUM_XXH64_testdata[5512] */\n    { 2756, 0x000000009E3779B1ULL, 0x144741D4EC8A6B5EULL }, /* XSUM_XXH64_testdata[5513] */\n    { 2757, 0x0000000000000000ULL, 0x73DEB2BC68BE614AULL }, /* XSUM_XXH64_testdata[5514] */\n    { 2757, 0x000000009E3779B1ULL, 0x784303AE0FC452DFULL }, /* XSUM_XXH64_testdata[5515] */\n    { 2758, 0x0000000000000000ULL, 0x20D26EBEA5D6440FULL }, /* XSUM_XXH64_testdata[5516] */\n    { 2758, 0x000000009E3779B1ULL, 0xA26935CA4905DD5EULL }, /* XSUM_XXH64_testdata[5517] */\n    { 2759, 0x0000000000000000ULL, 0x192429F0FF4F26ACULL }, /* XSUM_XXH64_testdata[5518] */\n    { 2759, 0x000000009E3779B1ULL, 0x8A40939EB6E272E3ULL }, /* XSUM_XXH64_testdata[5519] */\n    { 2760, 0x0000000000000000ULL, 0xE70129B62A2F4254ULL }, /* XSUM_XXH64_testdata[5520] */\n    { 2760, 0x000000009E3779B1ULL, 0x300D71A3C84B2AA4ULL }, /* XSUM_XXH64_testdata[5521] */\n    { 2761, 0x0000000000000000ULL, 0xD7680B7FC0AEC06CULL }, /* XSUM_XXH64_testdata[5522] */\n    { 2761, 0x000000009E3779B1ULL, 0xA4B85E26165FE4F2ULL }, /* XSUM_XXH64_testdata[5523] */\n    { 2762, 0x0000000000000000ULL, 0x19F2082A92E00DD8ULL }, /* XSUM_XXH64_testdata[5524] */\n    { 2762, 0x000000009E3779B1ULL, 0x2AB4C82405F4F94EULL }, /* XSUM_XXH64_testdata[5525] */\n    { 2763, 0x0000000000000000ULL, 0xE81888447C98A9DFULL }, /* XSUM_XXH64_testdata[5526] */\n    { 2763, 0x000000009E3779B1ULL, 0x89C5D91F3DD0AA42ULL }, /* XSUM_XXH64_testdata[5527] */\n    { 2764, 0x0000000000000000ULL, 0xA795DDC8C01FA9C4ULL }, /* XSUM_XXH64_testdata[5528] */\n    { 2764, 0x000000009E3779B1ULL, 0x1347C9404F8B3EEDULL }, /* XSUM_XXH64_testdata[5529] */\n    { 2765, 0x0000000000000000ULL, 0xD37209B5B44D8D20ULL }, /* XSUM_XXH64_testdata[5530] */\n    { 2765, 0x000000009E3779B1ULL, 0x01FE11C7FB2BFD66ULL }, /* XSUM_XXH64_testdata[5531] */\n    { 2766, 0x0000000000000000ULL, 0x3C6940902510C460ULL }, /* XSUM_XXH64_testdata[5532] */\n    { 2766, 0x000000009E3779B1ULL, 0x02EAA3DA703820FCULL }, /* XSUM_XXH64_testdata[5533] */\n    { 2767, 0x0000000000000000ULL, 0xB384F6A72DBF326FULL }, /* XSUM_XXH64_testdata[5534] */\n    { 2767, 0x000000009E3779B1ULL, 0xB974BDD82DD9848CULL }, /* XSUM_XXH64_testdata[5535] */\n    { 2768, 0x0000000000000000ULL, 0x3B8B1365ABE69D55ULL }, /* XSUM_XXH64_testdata[5536] */\n    { 2768, 0x000000009E3779B1ULL, 0xB106859A1EB232C1ULL }, /* XSUM_XXH64_testdata[5537] */\n    { 2769, 0x0000000000000000ULL, 0xFE31D6ED1F03B0A8ULL }, /* XSUM_XXH64_testdata[5538] */\n    { 2769, 0x000000009E3779B1ULL, 0x7E289CABC06D2265ULL }, /* XSUM_XXH64_testdata[5539] */\n    { 2770, 0x0000000000000000ULL, 0x503EA081FF21683DULL }, /* XSUM_XXH64_testdata[5540] */\n    { 2770, 0x000000009E3779B1ULL, 0xB6E3257D8AF155E0ULL }, /* XSUM_XXH64_testdata[5541] */\n    { 2771, 0x0000000000000000ULL, 0xB8C21BCF145B4F78ULL }, /* XSUM_XXH64_testdata[5542] */\n    { 2771, 0x000000009E3779B1ULL, 0xB2A7707DCD2CAC21ULL }, /* XSUM_XXH64_testdata[5543] */\n    { 2772, 0x0000000000000000ULL, 0x0B0C22F0B88ACA49ULL }, /* XSUM_XXH64_testdata[5544] */\n    { 2772, 0x000000009E3779B1ULL, 0x6F16DBC2FF2C5E5FULL }, /* XSUM_XXH64_testdata[5545] */\n    { 2773, 0x0000000000000000ULL, 0x9E2A46B198F2551CULL }, /* XSUM_XXH64_testdata[5546] */\n    { 2773, 0x000000009E3779B1ULL, 0x0DB4BC9FE41C37CDULL }, /* XSUM_XXH64_testdata[5547] */\n    { 2774, 0x0000000000000000ULL, 0x8E50DBD4636E044DULL }, /* XSUM_XXH64_testdata[5548] */\n    { 2774, 0x000000009E3779B1ULL, 0xB632751411065268ULL }, /* XSUM_XXH64_testdata[5549] */\n    { 2775, 0x0000000000000000ULL, 0xC12BB26AC9A2F8A9ULL }, /* XSUM_XXH64_testdata[5550] */\n    { 2775, 0x000000009E3779B1ULL, 0x005DC7A61AD290B0ULL }, /* XSUM_XXH64_testdata[5551] */\n    { 2776, 0x0000000000000000ULL, 0x561AACD4D502AB58ULL }, /* XSUM_XXH64_testdata[5552] */\n    { 2776, 0x000000009E3779B1ULL, 0xAC9BE4899E92BAB5ULL }, /* XSUM_XXH64_testdata[5553] */\n    { 2777, 0x0000000000000000ULL, 0x81E48634CE53279DULL }, /* XSUM_XXH64_testdata[5554] */\n    { 2777, 0x000000009E3779B1ULL, 0x3B087D7C87B16CDEULL }, /* XSUM_XXH64_testdata[5555] */\n    { 2778, 0x0000000000000000ULL, 0x0A7C8E23B0A07B95ULL }, /* XSUM_XXH64_testdata[5556] */\n    { 2778, 0x000000009E3779B1ULL, 0x0E6A03AF3E939BD9ULL }, /* XSUM_XXH64_testdata[5557] */\n    { 2779, 0x0000000000000000ULL, 0xD3882E1C194E1799ULL }, /* XSUM_XXH64_testdata[5558] */\n    { 2779, 0x000000009E3779B1ULL, 0xCCB60973FE1521CEULL }, /* XSUM_XXH64_testdata[5559] */\n    { 2780, 0x0000000000000000ULL, 0x5070B5194D53F6FFULL }, /* XSUM_XXH64_testdata[5560] */\n    { 2780, 0x000000009E3779B1ULL, 0x0ED70CD9B396A444ULL }, /* XSUM_XXH64_testdata[5561] */\n    { 2781, 0x0000000000000000ULL, 0xDD4616EAA639E2BAULL }, /* XSUM_XXH64_testdata[5562] */\n    { 2781, 0x000000009E3779B1ULL, 0x8717975AAA9AD0B8ULL }, /* XSUM_XXH64_testdata[5563] */\n    { 2782, 0x0000000000000000ULL, 0x45E3B4BB4A040C8DULL }, /* XSUM_XXH64_testdata[5564] */\n    { 2782, 0x000000009E3779B1ULL, 0x7012ADCD3706E651ULL }, /* XSUM_XXH64_testdata[5565] */\n    { 2783, 0x0000000000000000ULL, 0xBD25F4F2D96C383AULL }, /* XSUM_XXH64_testdata[5566] */\n    { 2783, 0x000000009E3779B1ULL, 0x5158579F711E56C2ULL }, /* XSUM_XXH64_testdata[5567] */\n    { 2784, 0x0000000000000000ULL, 0x4C3900F6B818E27FULL }, /* XSUM_XXH64_testdata[5568] */\n    { 2784, 0x000000009E3779B1ULL, 0x2E2EEDCC72FD81CFULL }, /* XSUM_XXH64_testdata[5569] */\n    { 2785, 0x0000000000000000ULL, 0xEF3D60DA364160C1ULL }, /* XSUM_XXH64_testdata[5570] */\n    { 2785, 0x000000009E3779B1ULL, 0xD7D4397E3C0E9D59ULL }, /* XSUM_XXH64_testdata[5571] */\n    { 2786, 0x0000000000000000ULL, 0x0FB54F3A40D8F1B5ULL }, /* XSUM_XXH64_testdata[5572] */\n    { 2786, 0x000000009E3779B1ULL, 0x120B7540074A00C3ULL }, /* XSUM_XXH64_testdata[5573] */\n    { 2787, 0x0000000000000000ULL, 0xB8B742263DDE1EC1ULL }, /* XSUM_XXH64_testdata[5574] */\n    { 2787, 0x000000009E3779B1ULL, 0x39D105D394045039ULL }, /* XSUM_XXH64_testdata[5575] */\n    { 2788, 0x0000000000000000ULL, 0xE8377ADD12863983ULL }, /* XSUM_XXH64_testdata[5576] */\n    { 2788, 0x000000009E3779B1ULL, 0xDF34D77F43CC5086ULL }, /* XSUM_XXH64_testdata[5577] */\n    { 2789, 0x0000000000000000ULL, 0xAE745E88CCE25306ULL }, /* XSUM_XXH64_testdata[5578] */\n    { 2789, 0x000000009E3779B1ULL, 0xB6E32954B2185D61ULL }, /* XSUM_XXH64_testdata[5579] */\n    { 2790, 0x0000000000000000ULL, 0xC7C24A27B0E57448ULL }, /* XSUM_XXH64_testdata[5580] */\n    { 2790, 0x000000009E3779B1ULL, 0x864F08718231A2B1ULL }, /* XSUM_XXH64_testdata[5581] */\n    { 2791, 0x0000000000000000ULL, 0x7238F7309B045178ULL }, /* XSUM_XXH64_testdata[5582] */\n    { 2791, 0x000000009E3779B1ULL, 0xAA91853DF0C3BAC8ULL }, /* XSUM_XXH64_testdata[5583] */\n    { 2792, 0x0000000000000000ULL, 0x80D31FC807D693FDULL }, /* XSUM_XXH64_testdata[5584] */\n    { 2792, 0x000000009E3779B1ULL, 0x1BD5EFA3C77ED3C4ULL }, /* XSUM_XXH64_testdata[5585] */\n    { 2793, 0x0000000000000000ULL, 0x744958FF825F8733ULL }, /* XSUM_XXH64_testdata[5586] */\n    { 2793, 0x000000009E3779B1ULL, 0x1957AD12000BFEF8ULL }, /* XSUM_XXH64_testdata[5587] */\n    { 2794, 0x0000000000000000ULL, 0xEF7BFC60A714360AULL }, /* XSUM_XXH64_testdata[5588] */\n    { 2794, 0x000000009E3779B1ULL, 0x06150CDCDF43AEA9ULL }, /* XSUM_XXH64_testdata[5589] */\n    { 2795, 0x0000000000000000ULL, 0x4E243F49CD29DC34ULL }, /* XSUM_XXH64_testdata[5590] */\n    { 2795, 0x000000009E3779B1ULL, 0xFABC556ED0EF2D13ULL }, /* XSUM_XXH64_testdata[5591] */\n    { 2796, 0x0000000000000000ULL, 0x7535589BFA923ED9ULL }, /* XSUM_XXH64_testdata[5592] */\n    { 2796, 0x000000009E3779B1ULL, 0x47CB30CE1D249A00ULL }, /* XSUM_XXH64_testdata[5593] */\n    { 2797, 0x0000000000000000ULL, 0xD1E7E3A62A8FAB91ULL }, /* XSUM_XXH64_testdata[5594] */\n    { 2797, 0x000000009E3779B1ULL, 0xF751B7BD3C1B99F1ULL }, /* XSUM_XXH64_testdata[5595] */\n    { 2798, 0x0000000000000000ULL, 0x37AA88BC2E5C6D6DULL }, /* XSUM_XXH64_testdata[5596] */\n    { 2798, 0x000000009E3779B1ULL, 0xD4322B685035EC79ULL }, /* XSUM_XXH64_testdata[5597] */\n    { 2799, 0x0000000000000000ULL, 0xD9FB19209A8758E4ULL }, /* XSUM_XXH64_testdata[5598] */\n    { 2799, 0x000000009E3779B1ULL, 0x1C1FA7452B031596ULL }, /* XSUM_XXH64_testdata[5599] */\n    { 2800, 0x0000000000000000ULL, 0xEA1487BAFF11850EULL }, /* XSUM_XXH64_testdata[5600] */\n    { 2800, 0x000000009E3779B1ULL, 0x950A556A887819B8ULL }, /* XSUM_XXH64_testdata[5601] */\n    { 2801, 0x0000000000000000ULL, 0x421C71A58A8537B3ULL }, /* XSUM_XXH64_testdata[5602] */\n    { 2801, 0x000000009E3779B1ULL, 0x511C46C5C6CD42DDULL }, /* XSUM_XXH64_testdata[5603] */\n    { 2802, 0x0000000000000000ULL, 0x9F137E7BEB5F07CBULL }, /* XSUM_XXH64_testdata[5604] */\n    { 2802, 0x000000009E3779B1ULL, 0x2E9BBA3927EEA483ULL }, /* XSUM_XXH64_testdata[5605] */\n    { 2803, 0x0000000000000000ULL, 0xCE3E55F6C55885A8ULL }, /* XSUM_XXH64_testdata[5606] */\n    { 2803, 0x000000009E3779B1ULL, 0x55866847C81E7947ULL }, /* XSUM_XXH64_testdata[5607] */\n    { 2804, 0x0000000000000000ULL, 0x7BFE2A2D36ED51C9ULL }, /* XSUM_XXH64_testdata[5608] */\n    { 2804, 0x000000009E3779B1ULL, 0xC4756FD9CE44C476ULL }, /* XSUM_XXH64_testdata[5609] */\n    { 2805, 0x0000000000000000ULL, 0x3D48CC8A631EE9D3ULL }, /* XSUM_XXH64_testdata[5610] */\n    { 2805, 0x000000009E3779B1ULL, 0xB73325D46E1EBD46ULL }, /* XSUM_XXH64_testdata[5611] */\n    { 2806, 0x0000000000000000ULL, 0xB8FEC8C281B9668DULL }, /* XSUM_XXH64_testdata[5612] */\n    { 2806, 0x000000009E3779B1ULL, 0x3DA4E38E9E3C7337ULL }, /* XSUM_XXH64_testdata[5613] */\n    { 2807, 0x0000000000000000ULL, 0xBA563BF381DF6FABULL }, /* XSUM_XXH64_testdata[5614] */\n    { 2807, 0x000000009E3779B1ULL, 0x09CDDC827D2DC0D3ULL }, /* XSUM_XXH64_testdata[5615] */\n    { 2808, 0x0000000000000000ULL, 0x8FE5B7B997B6DE1BULL }, /* XSUM_XXH64_testdata[5616] */\n    { 2808, 0x000000009E3779B1ULL, 0x36CD101220E02ADFULL }, /* XSUM_XXH64_testdata[5617] */\n    { 2809, 0x0000000000000000ULL, 0x700ADC22A73E3FB8ULL }, /* XSUM_XXH64_testdata[5618] */\n    { 2809, 0x000000009E3779B1ULL, 0xE01E0B514A7F66FAULL }, /* XSUM_XXH64_testdata[5619] */\n    { 2810, 0x0000000000000000ULL, 0x029F1B0B9CDB9F14ULL }, /* XSUM_XXH64_testdata[5620] */\n    { 2810, 0x000000009E3779B1ULL, 0xD44DA0158AD2612AULL }, /* XSUM_XXH64_testdata[5621] */\n    { 2811, 0x0000000000000000ULL, 0xC7054D0F5111ACEFULL }, /* XSUM_XXH64_testdata[5622] */\n    { 2811, 0x000000009E3779B1ULL, 0x2B21908EA9AC3632ULL }, /* XSUM_XXH64_testdata[5623] */\n    { 2812, 0x0000000000000000ULL, 0x143228FD66498D9CULL }, /* XSUM_XXH64_testdata[5624] */\n    { 2812, 0x000000009E3779B1ULL, 0xA33325C328F99953ULL }, /* XSUM_XXH64_testdata[5625] */\n    { 2813, 0x0000000000000000ULL, 0xA6044D50EE325E05ULL }, /* XSUM_XXH64_testdata[5626] */\n    { 2813, 0x000000009E3779B1ULL, 0x665086679AE7008DULL }, /* XSUM_XXH64_testdata[5627] */\n    { 2814, 0x0000000000000000ULL, 0x82B269A3D4EC5AD8ULL }, /* XSUM_XXH64_testdata[5628] */\n    { 2814, 0x000000009E3779B1ULL, 0x91F1CEBDF19BEBDCULL }, /* XSUM_XXH64_testdata[5629] */\n    { 2815, 0x0000000000000000ULL, 0x7F950A51B1BCE3ABULL }, /* XSUM_XXH64_testdata[5630] */\n    { 2815, 0x000000009E3779B1ULL, 0x56585650E1B3B2BBULL }, /* XSUM_XXH64_testdata[5631] */\n    { 2816, 0x0000000000000000ULL, 0x897E94EBF02B91A7ULL }, /* XSUM_XXH64_testdata[5632] */\n    { 2816, 0x000000009E3779B1ULL, 0xAA86E74719BC4DF9ULL }, /* XSUM_XXH64_testdata[5633] */\n    { 2817, 0x0000000000000000ULL, 0x25B8F9EAD1707367ULL }, /* XSUM_XXH64_testdata[5634] */\n    { 2817, 0x000000009E3779B1ULL, 0xF0775FD1BF8119EDULL }, /* XSUM_XXH64_testdata[5635] */\n    { 2818, 0x0000000000000000ULL, 0x316648D01FB04A3FULL }, /* XSUM_XXH64_testdata[5636] */\n    { 2818, 0x000000009E3779B1ULL, 0xBC9462F5E9029F82ULL }, /* XSUM_XXH64_testdata[5637] */\n    { 2819, 0x0000000000000000ULL, 0xB05A39BE1B0F01CBULL }, /* XSUM_XXH64_testdata[5638] */\n    { 2819, 0x000000009E3779B1ULL, 0x450A223B8347D3E7ULL }, /* XSUM_XXH64_testdata[5639] */\n    { 2820, 0x0000000000000000ULL, 0xC7F53C2FE99F17E2ULL }, /* XSUM_XXH64_testdata[5640] */\n    { 2820, 0x000000009E3779B1ULL, 0x0E75CF383B5879EAULL }, /* XSUM_XXH64_testdata[5641] */\n    { 2821, 0x0000000000000000ULL, 0x9B5B1375077D3527ULL }, /* XSUM_XXH64_testdata[5642] */\n    { 2821, 0x000000009E3779B1ULL, 0x6F15AA6326EFF184ULL }, /* XSUM_XXH64_testdata[5643] */\n    { 2822, 0x0000000000000000ULL, 0x6CCAFFBEFAE30C84ULL }, /* XSUM_XXH64_testdata[5644] */\n    { 2822, 0x000000009E3779B1ULL, 0xEB83A6698B5DD395ULL }, /* XSUM_XXH64_testdata[5645] */\n    { 2823, 0x0000000000000000ULL, 0x5CFED9C0BA8B42D5ULL }, /* XSUM_XXH64_testdata[5646] */\n    { 2823, 0x000000009E3779B1ULL, 0x43E21EEFFE09AA78ULL }, /* XSUM_XXH64_testdata[5647] */\n    { 2824, 0x0000000000000000ULL, 0x77D44D47E3CDED58ULL }, /* XSUM_XXH64_testdata[5648] */\n    { 2824, 0x000000009E3779B1ULL, 0x7D131D579C3F709FULL }, /* XSUM_XXH64_testdata[5649] */\n    { 2825, 0x0000000000000000ULL, 0xEB4D3306499519ADULL }, /* XSUM_XXH64_testdata[5650] */\n    { 2825, 0x000000009E3779B1ULL, 0xE0825BE185296636ULL }, /* XSUM_XXH64_testdata[5651] */\n    { 2826, 0x0000000000000000ULL, 0xC98B151B38796583ULL }, /* XSUM_XXH64_testdata[5652] */\n    { 2826, 0x000000009E3779B1ULL, 0xEA20200D5FA525FEULL }, /* XSUM_XXH64_testdata[5653] */\n    { 2827, 0x0000000000000000ULL, 0x0EDFF0BBBEEBC907ULL }, /* XSUM_XXH64_testdata[5654] */\n    { 2827, 0x000000009E3779B1ULL, 0xF71176D6D8FE8392ULL }, /* XSUM_XXH64_testdata[5655] */\n    { 2828, 0x0000000000000000ULL, 0x542351940A5B7B43ULL }, /* XSUM_XXH64_testdata[5656] */\n    { 2828, 0x000000009E3779B1ULL, 0x0ED667372E81963EULL }, /* XSUM_XXH64_testdata[5657] */\n    { 2829, 0x0000000000000000ULL, 0xEEC305F00C2B0C83ULL }, /* XSUM_XXH64_testdata[5658] */\n    { 2829, 0x000000009E3779B1ULL, 0x07791190DC026192ULL }, /* XSUM_XXH64_testdata[5659] */\n    { 2830, 0x0000000000000000ULL, 0x998F19CAEDEAF2E7ULL }, /* XSUM_XXH64_testdata[5660] */\n    { 2830, 0x000000009E3779B1ULL, 0x460801FAB7269F6BULL }, /* XSUM_XXH64_testdata[5661] */\n    { 2831, 0x0000000000000000ULL, 0xC655ADE25A02EEF5ULL }, /* XSUM_XXH64_testdata[5662] */\n    { 2831, 0x000000009E3779B1ULL, 0x635259A50D6BA7F8ULL }, /* XSUM_XXH64_testdata[5663] */\n    { 2832, 0x0000000000000000ULL, 0x363DF0706B3D15D4ULL }, /* XSUM_XXH64_testdata[5664] */\n    { 2832, 0x000000009E3779B1ULL, 0xA4571FFD9DEE0806ULL }, /* XSUM_XXH64_testdata[5665] */\n    { 2833, 0x0000000000000000ULL, 0xCCEF17577D510AAAULL }, /* XSUM_XXH64_testdata[5666] */\n    { 2833, 0x000000009E3779B1ULL, 0xA47ED96C7B06B138ULL }, /* XSUM_XXH64_testdata[5667] */\n    { 2834, 0x0000000000000000ULL, 0x3E80FA25180F0AD2ULL }, /* XSUM_XXH64_testdata[5668] */\n    { 2834, 0x000000009E3779B1ULL, 0xD01DA3F7A19DE791ULL }, /* XSUM_XXH64_testdata[5669] */\n    { 2835, 0x0000000000000000ULL, 0x93547DC685D9714EULL }, /* XSUM_XXH64_testdata[5670] */\n    { 2835, 0x000000009E3779B1ULL, 0x860FF14C03860F79ULL }, /* XSUM_XXH64_testdata[5671] */\n    { 2836, 0x0000000000000000ULL, 0xB3A49B633B454BBDULL }, /* XSUM_XXH64_testdata[5672] */\n    { 2836, 0x000000009E3779B1ULL, 0xAEDECF3BD04CE286ULL }, /* XSUM_XXH64_testdata[5673] */\n    { 2837, 0x0000000000000000ULL, 0x066A2B3AEE8784E1ULL }, /* XSUM_XXH64_testdata[5674] */\n    { 2837, 0x000000009E3779B1ULL, 0x9460AE6BC46D4FC1ULL }, /* XSUM_XXH64_testdata[5675] */\n    { 2838, 0x0000000000000000ULL, 0x7E117D839E812552ULL }, /* XSUM_XXH64_testdata[5676] */\n    { 2838, 0x000000009E3779B1ULL, 0x1BA80E6AFAA4F389ULL }, /* XSUM_XXH64_testdata[5677] */\n    { 2839, 0x0000000000000000ULL, 0x52C6A3438648ABDEULL }, /* XSUM_XXH64_testdata[5678] */\n    { 2839, 0x000000009E3779B1ULL, 0x5ECC856DA9524C81ULL }, /* XSUM_XXH64_testdata[5679] */\n    { 2840, 0x0000000000000000ULL, 0x2E35DEBAE053A6EDULL }, /* XSUM_XXH64_testdata[5680] */\n    { 2840, 0x000000009E3779B1ULL, 0xA6017CAB068FDDB9ULL }, /* XSUM_XXH64_testdata[5681] */\n    { 2841, 0x0000000000000000ULL, 0x85F0F2C8A9FA6EACULL }, /* XSUM_XXH64_testdata[5682] */\n    { 2841, 0x000000009E3779B1ULL, 0xB4AAC5FE3A1A44C0ULL }, /* XSUM_XXH64_testdata[5683] */\n    { 2842, 0x0000000000000000ULL, 0x9D32CF8DB18406B4ULL }, /* XSUM_XXH64_testdata[5684] */\n    { 2842, 0x000000009E3779B1ULL, 0x55C3229A04D0CE14ULL }, /* XSUM_XXH64_testdata[5685] */\n    { 2843, 0x0000000000000000ULL, 0x562530C55CD9DA1DULL }, /* XSUM_XXH64_testdata[5686] */\n    { 2843, 0x000000009E3779B1ULL, 0x3CEB237714957C18ULL }, /* XSUM_XXH64_testdata[5687] */\n    { 2844, 0x0000000000000000ULL, 0x6A57BF38721E0D2EULL }, /* XSUM_XXH64_testdata[5688] */\n    { 2844, 0x000000009E3779B1ULL, 0x53DC9AA42EE98EFAULL }, /* XSUM_XXH64_testdata[5689] */\n    { 2845, 0x0000000000000000ULL, 0xF813C93FFF44504EULL }, /* XSUM_XXH64_testdata[5690] */\n    { 2845, 0x000000009E3779B1ULL, 0xFD62B18C9658F3C6ULL }, /* XSUM_XXH64_testdata[5691] */\n    { 2846, 0x0000000000000000ULL, 0xBC855FAC339AEF47ULL }, /* XSUM_XXH64_testdata[5692] */\n    { 2846, 0x000000009E3779B1ULL, 0xA95187603DB07D07ULL }, /* XSUM_XXH64_testdata[5693] */\n    { 2847, 0x0000000000000000ULL, 0xCDD5771B9917F3EAULL }, /* XSUM_XXH64_testdata[5694] */\n    { 2847, 0x000000009E3779B1ULL, 0x1C101A2732AF5FC1ULL }, /* XSUM_XXH64_testdata[5695] */\n    { 2848, 0x0000000000000000ULL, 0x828FF48B51CF77B5ULL }, /* XSUM_XXH64_testdata[5696] */\n    { 2848, 0x000000009E3779B1ULL, 0x7328FF4D4C0630D6ULL }, /* XSUM_XXH64_testdata[5697] */\n    { 2849, 0x0000000000000000ULL, 0xADBE577229739AEEULL }, /* XSUM_XXH64_testdata[5698] */\n    { 2849, 0x000000009E3779B1ULL, 0x87A8C42FAD9F0BECULL }, /* XSUM_XXH64_testdata[5699] */\n    { 2850, 0x0000000000000000ULL, 0xCDC9BDD8A8DDD7DBULL }, /* XSUM_XXH64_testdata[5700] */\n    { 2850, 0x000000009E3779B1ULL, 0x51C2603A64BBE88FULL }, /* XSUM_XXH64_testdata[5701] */\n    { 2851, 0x0000000000000000ULL, 0xE937797296F479A9ULL }, /* XSUM_XXH64_testdata[5702] */\n    { 2851, 0x000000009E3779B1ULL, 0xB0463495709EE8A9ULL }, /* XSUM_XXH64_testdata[5703] */\n    { 2852, 0x0000000000000000ULL, 0xCA79A61503ACEECAULL }, /* XSUM_XXH64_testdata[5704] */\n    { 2852, 0x000000009E3779B1ULL, 0xB7D5362A3F288485ULL }, /* XSUM_XXH64_testdata[5705] */\n    { 2853, 0x0000000000000000ULL, 0x1099CD1322EC7894ULL }, /* XSUM_XXH64_testdata[5706] */\n    { 2853, 0x000000009E3779B1ULL, 0xACDCB2771E45DDA7ULL }, /* XSUM_XXH64_testdata[5707] */\n    { 2854, 0x0000000000000000ULL, 0x4C22E69D572D8499ULL }, /* XSUM_XXH64_testdata[5708] */\n    { 2854, 0x000000009E3779B1ULL, 0x732C5929B8B05546ULL }, /* XSUM_XXH64_testdata[5709] */\n    { 2855, 0x0000000000000000ULL, 0xEBABBD58FB890221ULL }, /* XSUM_XXH64_testdata[5710] */\n    { 2855, 0x000000009E3779B1ULL, 0xFC8365730C126BE9ULL }, /* XSUM_XXH64_testdata[5711] */\n    { 2856, 0x0000000000000000ULL, 0xC8A97B885681D71BULL }, /* XSUM_XXH64_testdata[5712] */\n    { 2856, 0x000000009E3779B1ULL, 0xAD3AAC20FF4D2BBBULL }, /* XSUM_XXH64_testdata[5713] */\n    { 2857, 0x0000000000000000ULL, 0xAD742DEA0334D83BULL }, /* XSUM_XXH64_testdata[5714] */\n    { 2857, 0x000000009E3779B1ULL, 0x6BA68DF3D1960B68ULL }, /* XSUM_XXH64_testdata[5715] */\n    { 2858, 0x0000000000000000ULL, 0xAEE81E41A6447BB4ULL }, /* XSUM_XXH64_testdata[5716] */\n    { 2858, 0x000000009E3779B1ULL, 0x3465E0759D033756ULL }, /* XSUM_XXH64_testdata[5717] */\n    { 2859, 0x0000000000000000ULL, 0x14A46E77A2766451ULL }, /* XSUM_XXH64_testdata[5718] */\n    { 2859, 0x000000009E3779B1ULL, 0x4C24F512BA7E7BC4ULL }, /* XSUM_XXH64_testdata[5719] */\n    { 2860, 0x0000000000000000ULL, 0xBC72209610C88FD5ULL }, /* XSUM_XXH64_testdata[5720] */\n    { 2860, 0x000000009E3779B1ULL, 0x8E2A2BDF87D50814ULL }, /* XSUM_XXH64_testdata[5721] */\n    { 2861, 0x0000000000000000ULL, 0xC82C364D688F94C0ULL }, /* XSUM_XXH64_testdata[5722] */\n    { 2861, 0x000000009E3779B1ULL, 0x6464FA556FD33EB5ULL }, /* XSUM_XXH64_testdata[5723] */\n    { 2862, 0x0000000000000000ULL, 0xA6E739D074170ED0ULL }, /* XSUM_XXH64_testdata[5724] */\n    { 2862, 0x000000009E3779B1ULL, 0x087FA743FD095CABULL }, /* XSUM_XXH64_testdata[5725] */\n    { 2863, 0x0000000000000000ULL, 0xC34F0315FBD2D354ULL }, /* XSUM_XXH64_testdata[5726] */\n    { 2863, 0x000000009E3779B1ULL, 0xF9594B1F3F04CE22ULL }, /* XSUM_XXH64_testdata[5727] */\n    { 2864, 0x0000000000000000ULL, 0xC2EABCF0EB15A56FULL }, /* XSUM_XXH64_testdata[5728] */\n    { 2864, 0x000000009E3779B1ULL, 0x4F99D411D938624DULL }, /* XSUM_XXH64_testdata[5729] */\n    { 2865, 0x0000000000000000ULL, 0x46EC42C8ECBAA715ULL }, /* XSUM_XXH64_testdata[5730] */\n    { 2865, 0x000000009E3779B1ULL, 0x92CC44DF03EDEA99ULL }, /* XSUM_XXH64_testdata[5731] */\n    { 2866, 0x0000000000000000ULL, 0x32A744251DE91701ULL }, /* XSUM_XXH64_testdata[5732] */\n    { 2866, 0x000000009E3779B1ULL, 0xB94DC798CFE78ACFULL }, /* XSUM_XXH64_testdata[5733] */\n    { 2867, 0x0000000000000000ULL, 0x9442C15E5CC37CE6ULL }, /* XSUM_XXH64_testdata[5734] */\n    { 2867, 0x000000009E3779B1ULL, 0xDCCD635D3DAA19CCULL }, /* XSUM_XXH64_testdata[5735] */\n    { 2868, 0x0000000000000000ULL, 0xD72B1259F9DFA75DULL }, /* XSUM_XXH64_testdata[5736] */\n    { 2868, 0x000000009E3779B1ULL, 0x865703518CED7F0EULL }, /* XSUM_XXH64_testdata[5737] */\n    { 2869, 0x0000000000000000ULL, 0x5C8E1A837C2FCC65ULL }, /* XSUM_XXH64_testdata[5738] */\n    { 2869, 0x000000009E3779B1ULL, 0xB263E347704AC6FFULL }, /* XSUM_XXH64_testdata[5739] */\n    { 2870, 0x0000000000000000ULL, 0x3CFBEA248FC8C1B8ULL }, /* XSUM_XXH64_testdata[5740] */\n    { 2870, 0x000000009E3779B1ULL, 0x84870021E925BE9AULL }, /* XSUM_XXH64_testdata[5741] */\n    { 2871, 0x0000000000000000ULL, 0x2F2114D4B75D87ABULL }, /* XSUM_XXH64_testdata[5742] */\n    { 2871, 0x000000009E3779B1ULL, 0x7E84BD79C7EB6DA5ULL }, /* XSUM_XXH64_testdata[5743] */\n    { 2872, 0x0000000000000000ULL, 0x38B418B4E5B7F667ULL }, /* XSUM_XXH64_testdata[5744] */\n    { 2872, 0x000000009E3779B1ULL, 0x101CE15BC0756307ULL }, /* XSUM_XXH64_testdata[5745] */\n    { 2873, 0x0000000000000000ULL, 0x225AECD766F237D9ULL }, /* XSUM_XXH64_testdata[5746] */\n    { 2873, 0x000000009E3779B1ULL, 0xF55255862264D05BULL }, /* XSUM_XXH64_testdata[5747] */\n    { 2874, 0x0000000000000000ULL, 0x6181962ECA42C826ULL }, /* XSUM_XXH64_testdata[5748] */\n    { 2874, 0x000000009E3779B1ULL, 0xB36877B47DEB801AULL }, /* XSUM_XXH64_testdata[5749] */\n    { 2875, 0x0000000000000000ULL, 0x5BAA2AA33E08617FULL }, /* XSUM_XXH64_testdata[5750] */\n    { 2875, 0x000000009E3779B1ULL, 0xC95F26EDA15245A4ULL }, /* XSUM_XXH64_testdata[5751] */\n    { 2876, 0x0000000000000000ULL, 0x559E72577929AE9CULL }, /* XSUM_XXH64_testdata[5752] */\n    { 2876, 0x000000009E3779B1ULL, 0x687F78550FAE811EULL }, /* XSUM_XXH64_testdata[5753] */\n    { 2877, 0x0000000000000000ULL, 0x014C25F2C0CA90ADULL }, /* XSUM_XXH64_testdata[5754] */\n    { 2877, 0x000000009E3779B1ULL, 0x265E68669606EBAEULL }, /* XSUM_XXH64_testdata[5755] */\n    { 2878, 0x0000000000000000ULL, 0xF98E47B96D55EC3AULL }, /* XSUM_XXH64_testdata[5756] */\n    { 2878, 0x000000009E3779B1ULL, 0x284C2C7F3D435EA3ULL }, /* XSUM_XXH64_testdata[5757] */\n    { 2879, 0x0000000000000000ULL, 0xD38EBD0A6851F51CULL }, /* XSUM_XXH64_testdata[5758] */\n    { 2879, 0x000000009E3779B1ULL, 0xB89F927F874BB2C2ULL }, /* XSUM_XXH64_testdata[5759] */\n    { 2880, 0x0000000000000000ULL, 0x6685F0C96B4F7033ULL }, /* XSUM_XXH64_testdata[5760] */\n    { 2880, 0x000000009E3779B1ULL, 0xB1132A683B6D4DE8ULL }, /* XSUM_XXH64_testdata[5761] */\n    { 2881, 0x0000000000000000ULL, 0x530FA7337FDED941ULL }, /* XSUM_XXH64_testdata[5762] */\n    { 2881, 0x000000009E3779B1ULL, 0xFF7F63F0D2B15708ULL }, /* XSUM_XXH64_testdata[5763] */\n    { 2882, 0x0000000000000000ULL, 0xEB91B17388F67992ULL }, /* XSUM_XXH64_testdata[5764] */\n    { 2882, 0x000000009E3779B1ULL, 0x5AB27031A5D95074ULL }, /* XSUM_XXH64_testdata[5765] */\n    { 2883, 0x0000000000000000ULL, 0x1666998B270D29BAULL }, /* XSUM_XXH64_testdata[5766] */\n    { 2883, 0x000000009E3779B1ULL, 0x585487A176246806ULL }, /* XSUM_XXH64_testdata[5767] */\n    { 2884, 0x0000000000000000ULL, 0x4FFACD0E9761EF0AULL }, /* XSUM_XXH64_testdata[5768] */\n    { 2884, 0x000000009E3779B1ULL, 0x4A3F75FDC039A08FULL }, /* XSUM_XXH64_testdata[5769] */\n    { 2885, 0x0000000000000000ULL, 0xB73E4AE17EC3C98CULL }, /* XSUM_XXH64_testdata[5770] */\n    { 2885, 0x000000009E3779B1ULL, 0x593CCC6E2C79B478ULL }, /* XSUM_XXH64_testdata[5771] */\n    { 2886, 0x0000000000000000ULL, 0x7CFBEAD4FE3C6FEBULL }, /* XSUM_XXH64_testdata[5772] */\n    { 2886, 0x000000009E3779B1ULL, 0x3600A6EDD168D1FBULL }, /* XSUM_XXH64_testdata[5773] */\n    { 2887, 0x0000000000000000ULL, 0x6D33675205B94BBDULL }, /* XSUM_XXH64_testdata[5774] */\n    { 2887, 0x000000009E3779B1ULL, 0x21370DA75735938CULL }, /* XSUM_XXH64_testdata[5775] */\n    { 2888, 0x0000000000000000ULL, 0x5FA63A0ACCC74441ULL }, /* XSUM_XXH64_testdata[5776] */\n    { 2888, 0x000000009E3779B1ULL, 0xA8353F929DE231DDULL }, /* XSUM_XXH64_testdata[5777] */\n    { 2889, 0x0000000000000000ULL, 0x1CD3C3879CFE1550ULL }, /* XSUM_XXH64_testdata[5778] */\n    { 2889, 0x000000009E3779B1ULL, 0x460B590DD01D2986ULL }, /* XSUM_XXH64_testdata[5779] */\n    { 2890, 0x0000000000000000ULL, 0xD36622563FB8C41BULL }, /* XSUM_XXH64_testdata[5780] */\n    { 2890, 0x000000009E3779B1ULL, 0x4036C3C6248B97EDULL }, /* XSUM_XXH64_testdata[5781] */\n    { 2891, 0x0000000000000000ULL, 0x9C4C3254862E7838ULL }, /* XSUM_XXH64_testdata[5782] */\n    { 2891, 0x000000009E3779B1ULL, 0x394A26D45726A0D1ULL }, /* XSUM_XXH64_testdata[5783] */\n    { 2892, 0x0000000000000000ULL, 0x8570BE2A6AA76EA0ULL }, /* XSUM_XXH64_testdata[5784] */\n    { 2892, 0x000000009E3779B1ULL, 0x092BBA850FA001E3ULL }, /* XSUM_XXH64_testdata[5785] */\n    { 2893, 0x0000000000000000ULL, 0x2FA4D345F2262022ULL }, /* XSUM_XXH64_testdata[5786] */\n    { 2893, 0x000000009E3779B1ULL, 0x0ED34DC560501E5AULL }, /* XSUM_XXH64_testdata[5787] */\n    { 2894, 0x0000000000000000ULL, 0x5775143FF9FE2D63ULL }, /* XSUM_XXH64_testdata[5788] */\n    { 2894, 0x000000009E3779B1ULL, 0xD9086ACC28F36C23ULL }, /* XSUM_XXH64_testdata[5789] */\n    { 2895, 0x0000000000000000ULL, 0xCC15D32388F97795ULL }, /* XSUM_XXH64_testdata[5790] */\n    { 2895, 0x000000009E3779B1ULL, 0x6D6AE00D01EE966AULL }, /* XSUM_XXH64_testdata[5791] */\n    { 2896, 0x0000000000000000ULL, 0x053182AE5D3917FEULL }, /* XSUM_XXH64_testdata[5792] */\n    { 2896, 0x000000009E3779B1ULL, 0x842CA712A58A4E1AULL }, /* XSUM_XXH64_testdata[5793] */\n    { 2897, 0x0000000000000000ULL, 0x7611E9854B474790ULL }, /* XSUM_XXH64_testdata[5794] */\n    { 2897, 0x000000009E3779B1ULL, 0x3EF3F314F49F9381ULL }, /* XSUM_XXH64_testdata[5795] */\n    { 2898, 0x0000000000000000ULL, 0xD3C8AEBE5A873BA4ULL }, /* XSUM_XXH64_testdata[5796] */\n    { 2898, 0x000000009E3779B1ULL, 0xA1D4112F9D15C5CDULL }, /* XSUM_XXH64_testdata[5797] */\n    { 2899, 0x0000000000000000ULL, 0x173C57528DC00912ULL }, /* XSUM_XXH64_testdata[5798] */\n    { 2899, 0x000000009E3779B1ULL, 0x87E0B89B12BC1C2BULL }, /* XSUM_XXH64_testdata[5799] */\n    { 2900, 0x0000000000000000ULL, 0x621273AFC4ACD00FULL }, /* XSUM_XXH64_testdata[5800] */\n    { 2900, 0x000000009E3779B1ULL, 0xD4641910FB5F047DULL }, /* XSUM_XXH64_testdata[5801] */\n    { 2901, 0x0000000000000000ULL, 0x97CA47A204F2636AULL }, /* XSUM_XXH64_testdata[5802] */\n    { 2901, 0x000000009E3779B1ULL, 0x45224284E30FBD8BULL }, /* XSUM_XXH64_testdata[5803] */\n    { 2902, 0x0000000000000000ULL, 0xDAF822B2DBD2E89BULL }, /* XSUM_XXH64_testdata[5804] */\n    { 2902, 0x000000009E3779B1ULL, 0x7407CA5ED36D2736ULL }, /* XSUM_XXH64_testdata[5805] */\n    { 2903, 0x0000000000000000ULL, 0x6ACC2CDB091128ACULL }, /* XSUM_XXH64_testdata[5806] */\n    { 2903, 0x000000009E3779B1ULL, 0xD7A5A6B69DA94882ULL }, /* XSUM_XXH64_testdata[5807] */\n    { 2904, 0x0000000000000000ULL, 0x64F06D2D1E87F3DDULL }, /* XSUM_XXH64_testdata[5808] */\n    { 2904, 0x000000009E3779B1ULL, 0x20DC3E15FD3DB19AULL }, /* XSUM_XXH64_testdata[5809] */\n    { 2905, 0x0000000000000000ULL, 0x6D584322FEA19381ULL }, /* XSUM_XXH64_testdata[5810] */\n    { 2905, 0x000000009E3779B1ULL, 0x9D4CD84E4547A50CULL }, /* XSUM_XXH64_testdata[5811] */\n    { 2906, 0x0000000000000000ULL, 0x6F1CB797FA16FAEFULL }, /* XSUM_XXH64_testdata[5812] */\n    { 2906, 0x000000009E3779B1ULL, 0x60C44AC1EE1BEE4DULL }, /* XSUM_XXH64_testdata[5813] */\n    { 2907, 0x0000000000000000ULL, 0xDC6C1C0B98323435ULL }, /* XSUM_XXH64_testdata[5814] */\n    { 2907, 0x000000009E3779B1ULL, 0xB41F87A25A798600ULL }, /* XSUM_XXH64_testdata[5815] */\n    { 2908, 0x0000000000000000ULL, 0x5C81C155130E3567ULL }, /* XSUM_XXH64_testdata[5816] */\n    { 2908, 0x000000009E3779B1ULL, 0x7A4E40BDE592F7B0ULL }, /* XSUM_XXH64_testdata[5817] */\n    { 2909, 0x0000000000000000ULL, 0x5194837BE61A5903ULL }, /* XSUM_XXH64_testdata[5818] */\n    { 2909, 0x000000009E3779B1ULL, 0x57CE250B69E23DE9ULL }, /* XSUM_XXH64_testdata[5819] */\n    { 2910, 0x0000000000000000ULL, 0xC3A953BD15193838ULL }, /* XSUM_XXH64_testdata[5820] */\n    { 2910, 0x000000009E3779B1ULL, 0x18644DD76F0E9424ULL }, /* XSUM_XXH64_testdata[5821] */\n    { 2911, 0x0000000000000000ULL, 0x08ADC66E2958CBDFULL }, /* XSUM_XXH64_testdata[5822] */\n    { 2911, 0x000000009E3779B1ULL, 0x65E8F8334B032E41ULL }, /* XSUM_XXH64_testdata[5823] */\n    { 2912, 0x0000000000000000ULL, 0xB83BB4ACA4A6A3F4ULL }, /* XSUM_XXH64_testdata[5824] */\n    { 2912, 0x000000009E3779B1ULL, 0x712CE1FF4AE08ED1ULL }, /* XSUM_XXH64_testdata[5825] */\n    { 2913, 0x0000000000000000ULL, 0x433A8512E4DDEF66ULL }, /* XSUM_XXH64_testdata[5826] */\n    { 2913, 0x000000009E3779B1ULL, 0x8817F85DE8A3E18DULL }, /* XSUM_XXH64_testdata[5827] */\n    { 2914, 0x0000000000000000ULL, 0x8C956F2106E3094CULL }, /* XSUM_XXH64_testdata[5828] */\n    { 2914, 0x000000009E3779B1ULL, 0x3EE2635D3B62B8A8ULL }, /* XSUM_XXH64_testdata[5829] */\n    { 2915, 0x0000000000000000ULL, 0x61747324F774E12BULL }, /* XSUM_XXH64_testdata[5830] */\n    { 2915, 0x000000009E3779B1ULL, 0x829D901D22453277ULL }, /* XSUM_XXH64_testdata[5831] */\n    { 2916, 0x0000000000000000ULL, 0xF177C336FBFE3C1CULL }, /* XSUM_XXH64_testdata[5832] */\n    { 2916, 0x000000009E3779B1ULL, 0xF1A2956D1F2129CFULL }, /* XSUM_XXH64_testdata[5833] */\n    { 2917, 0x0000000000000000ULL, 0xD059E4F8577B4326ULL }, /* XSUM_XXH64_testdata[5834] */\n    { 2917, 0x000000009E3779B1ULL, 0x822A2FD64EC7125BULL }, /* XSUM_XXH64_testdata[5835] */\n    { 2918, 0x0000000000000000ULL, 0x85D9CD5A2FAC227EULL }, /* XSUM_XXH64_testdata[5836] */\n    { 2918, 0x000000009E3779B1ULL, 0x8EC3D7B6142D7B08ULL }, /* XSUM_XXH64_testdata[5837] */\n    { 2919, 0x0000000000000000ULL, 0xB032646D8188C772ULL }, /* XSUM_XXH64_testdata[5838] */\n    { 2919, 0x000000009E3779B1ULL, 0x1CD3782576E63503ULL }, /* XSUM_XXH64_testdata[5839] */\n    { 2920, 0x0000000000000000ULL, 0x88F7057705AD83F5ULL }, /* XSUM_XXH64_testdata[5840] */\n    { 2920, 0x000000009E3779B1ULL, 0x0F9D3EAF1BD72117ULL }, /* XSUM_XXH64_testdata[5841] */\n    { 2921, 0x0000000000000000ULL, 0xEC698C2DF27F530EULL }, /* XSUM_XXH64_testdata[5842] */\n    { 2921, 0x000000009E3779B1ULL, 0xD3355484E67BDD80ULL }, /* XSUM_XXH64_testdata[5843] */\n    { 2922, 0x0000000000000000ULL, 0xC187338AD48E1345ULL }, /* XSUM_XXH64_testdata[5844] */\n    { 2922, 0x000000009E3779B1ULL, 0xD0A8F693950DD98EULL }, /* XSUM_XXH64_testdata[5845] */\n    { 2923, 0x0000000000000000ULL, 0xF8F76481977069C1ULL }, /* XSUM_XXH64_testdata[5846] */\n    { 2923, 0x000000009E3779B1ULL, 0x80291F0B43B405BBULL }, /* XSUM_XXH64_testdata[5847] */\n    { 2924, 0x0000000000000000ULL, 0xBB6493A48C09A4E8ULL }, /* XSUM_XXH64_testdata[5848] */\n    { 2924, 0x000000009E3779B1ULL, 0x973DA8FB91C11681ULL }, /* XSUM_XXH64_testdata[5849] */\n    { 2925, 0x0000000000000000ULL, 0x618D278A35F92C68ULL }, /* XSUM_XXH64_testdata[5850] */\n    { 2925, 0x000000009E3779B1ULL, 0x7E2BF9AD66929A6AULL }, /* XSUM_XXH64_testdata[5851] */\n    { 2926, 0x0000000000000000ULL, 0x691509D601157213ULL }, /* XSUM_XXH64_testdata[5852] */\n    { 2926, 0x000000009E3779B1ULL, 0xDB2E311504746B97ULL }, /* XSUM_XXH64_testdata[5853] */\n    { 2927, 0x0000000000000000ULL, 0x65BE4C2E9A35B901ULL }, /* XSUM_XXH64_testdata[5854] */\n    { 2927, 0x000000009E3779B1ULL, 0xA39323BA83D6CC23ULL }, /* XSUM_XXH64_testdata[5855] */\n    { 2928, 0x0000000000000000ULL, 0x7A47FBCE717ECF69ULL }, /* XSUM_XXH64_testdata[5856] */\n    { 2928, 0x000000009E3779B1ULL, 0xCFB559247F290C93ULL }, /* XSUM_XXH64_testdata[5857] */\n    { 2929, 0x0000000000000000ULL, 0x419BF372F4678C5BULL }, /* XSUM_XXH64_testdata[5858] */\n    { 2929, 0x000000009E3779B1ULL, 0x01913E4328A109CAULL }, /* XSUM_XXH64_testdata[5859] */\n    { 2930, 0x0000000000000000ULL, 0x8614B70E7CEB1013ULL }, /* XSUM_XXH64_testdata[5860] */\n    { 2930, 0x000000009E3779B1ULL, 0xCA9EF9F917972FCBULL }, /* XSUM_XXH64_testdata[5861] */\n    { 2931, 0x0000000000000000ULL, 0x17AF2B3E4B9704C2ULL }, /* XSUM_XXH64_testdata[5862] */\n    { 2931, 0x000000009E3779B1ULL, 0xA04A4CCE29140A6AULL }, /* XSUM_XXH64_testdata[5863] */\n    { 2932, 0x0000000000000000ULL, 0xCB1D5A12BDB7D89DULL }, /* XSUM_XXH64_testdata[5864] */\n    { 2932, 0x000000009E3779B1ULL, 0x558720AFD15FCA5BULL }, /* XSUM_XXH64_testdata[5865] */\n    { 2933, 0x0000000000000000ULL, 0xEA6C352331222A92ULL }, /* XSUM_XXH64_testdata[5866] */\n    { 2933, 0x000000009E3779B1ULL, 0xA8CD9D3E55F42817ULL }, /* XSUM_XXH64_testdata[5867] */\n    { 2934, 0x0000000000000000ULL, 0xDDEDABA90D3F64D0ULL }, /* XSUM_XXH64_testdata[5868] */\n    { 2934, 0x000000009E3779B1ULL, 0x7621185DFB48F93FULL }, /* XSUM_XXH64_testdata[5869] */\n    { 2935, 0x0000000000000000ULL, 0x3BF8035ACA9C0906ULL }, /* XSUM_XXH64_testdata[5870] */\n    { 2935, 0x000000009E3779B1ULL, 0xEBCCB9FB93A7FBE0ULL }, /* XSUM_XXH64_testdata[5871] */\n    { 2936, 0x0000000000000000ULL, 0xE439D7BF439E6780ULL }, /* XSUM_XXH64_testdata[5872] */\n    { 2936, 0x000000009E3779B1ULL, 0x8EE76C0E7DFFD9F0ULL }, /* XSUM_XXH64_testdata[5873] */\n    { 2937, 0x0000000000000000ULL, 0xD4CBC3FAB84B77F8ULL }, /* XSUM_XXH64_testdata[5874] */\n    { 2937, 0x000000009E3779B1ULL, 0x99C32092CBEBD096ULL }, /* XSUM_XXH64_testdata[5875] */\n    { 2938, 0x0000000000000000ULL, 0x6B76B110D87BB405ULL }, /* XSUM_XXH64_testdata[5876] */\n    { 2938, 0x000000009E3779B1ULL, 0x406C7FB2AC9CDC64ULL }, /* XSUM_XXH64_testdata[5877] */\n    { 2939, 0x0000000000000000ULL, 0x15C58E78DB898194ULL }, /* XSUM_XXH64_testdata[5878] */\n    { 2939, 0x000000009E3779B1ULL, 0x5262D4D54D045CFAULL }, /* XSUM_XXH64_testdata[5879] */\n    { 2940, 0x0000000000000000ULL, 0x5E27B34F37032E88ULL }, /* XSUM_XXH64_testdata[5880] */\n    { 2940, 0x000000009E3779B1ULL, 0x2F1A86360FA0C21FULL }, /* XSUM_XXH64_testdata[5881] */\n    { 2941, 0x0000000000000000ULL, 0x9040573B28170672ULL }, /* XSUM_XXH64_testdata[5882] */\n    { 2941, 0x000000009E3779B1ULL, 0x8B0DEFF7C022F2B5ULL }, /* XSUM_XXH64_testdata[5883] */\n    { 2942, 0x0000000000000000ULL, 0x8666A913D286D0B7ULL }, /* XSUM_XXH64_testdata[5884] */\n    { 2942, 0x000000009E3779B1ULL, 0x088DE4B0D942DD9BULL }, /* XSUM_XXH64_testdata[5885] */\n    { 2943, 0x0000000000000000ULL, 0x2A7050BE9819B2A9ULL }, /* XSUM_XXH64_testdata[5886] */\n    { 2943, 0x000000009E3779B1ULL, 0x57CC221B615CD845ULL }, /* XSUM_XXH64_testdata[5887] */\n    { 2944, 0x0000000000000000ULL, 0x2ED91A7D8FDBAD90ULL }, /* XSUM_XXH64_testdata[5888] */\n    { 2944, 0x000000009E3779B1ULL, 0xAB8174ECA924C2D2ULL }, /* XSUM_XXH64_testdata[5889] */\n    { 2945, 0x0000000000000000ULL, 0xD22225DB9F930D53ULL }, /* XSUM_XXH64_testdata[5890] */\n    { 2945, 0x000000009E3779B1ULL, 0xBF5838432F214309ULL }, /* XSUM_XXH64_testdata[5891] */\n    { 2946, 0x0000000000000000ULL, 0x8E794F7E80C46D6AULL }, /* XSUM_XXH64_testdata[5892] */\n    { 2946, 0x000000009E3779B1ULL, 0x49D8E307DC599EEAULL }, /* XSUM_XXH64_testdata[5893] */\n    { 2947, 0x0000000000000000ULL, 0x9B39B384F471B7D7ULL }, /* XSUM_XXH64_testdata[5894] */\n    { 2947, 0x000000009E3779B1ULL, 0x41C8A3962310D4B4ULL }, /* XSUM_XXH64_testdata[5895] */\n    { 2948, 0x0000000000000000ULL, 0xB6EDCE22AD116D09ULL }, /* XSUM_XXH64_testdata[5896] */\n    { 2948, 0x000000009E3779B1ULL, 0x932845C30AAD0BE5ULL }, /* XSUM_XXH64_testdata[5897] */\n    { 2949, 0x0000000000000000ULL, 0xD7C9FD1A328D0F25ULL }, /* XSUM_XXH64_testdata[5898] */\n    { 2949, 0x000000009E3779B1ULL, 0x9B58522178EC8E88ULL }, /* XSUM_XXH64_testdata[5899] */\n    { 2950, 0x0000000000000000ULL, 0xF7A1A61715AD04FCULL }, /* XSUM_XXH64_testdata[5900] */\n    { 2950, 0x000000009E3779B1ULL, 0x940440D6BE158DCDULL }, /* XSUM_XXH64_testdata[5901] */\n    { 2951, 0x0000000000000000ULL, 0x0B4F83F0B47AC3DCULL }, /* XSUM_XXH64_testdata[5902] */\n    { 2951, 0x000000009E3779B1ULL, 0x59CBD6CD831C1705ULL }, /* XSUM_XXH64_testdata[5903] */\n    { 2952, 0x0000000000000000ULL, 0xD2FB338C4AE00DD7ULL }, /* XSUM_XXH64_testdata[5904] */\n    { 2952, 0x000000009E3779B1ULL, 0x396753538D59E916ULL }, /* XSUM_XXH64_testdata[5905] */\n    { 2953, 0x0000000000000000ULL, 0xA2EB1F2672DFC11AULL }, /* XSUM_XXH64_testdata[5906] */\n    { 2953, 0x000000009E3779B1ULL, 0x04C88E51299C7450ULL }, /* XSUM_XXH64_testdata[5907] */\n    { 2954, 0x0000000000000000ULL, 0x9FAB47D2C02E586AULL }, /* XSUM_XXH64_testdata[5908] */\n    { 2954, 0x000000009E3779B1ULL, 0x38C892B3F8B8A2EAULL }, /* XSUM_XXH64_testdata[5909] */\n    { 2955, 0x0000000000000000ULL, 0xD8AAB7960C35DF99ULL }, /* XSUM_XXH64_testdata[5910] */\n    { 2955, 0x000000009E3779B1ULL, 0x4F262DA1218ED145ULL }, /* XSUM_XXH64_testdata[5911] */\n    { 2956, 0x0000000000000000ULL, 0xD8D695CEB1594234ULL }, /* XSUM_XXH64_testdata[5912] */\n    { 2956, 0x000000009E3779B1ULL, 0x2618622874EFE075ULL }, /* XSUM_XXH64_testdata[5913] */\n    { 2957, 0x0000000000000000ULL, 0x1395A552D066394BULL }, /* XSUM_XXH64_testdata[5914] */\n    { 2957, 0x000000009E3779B1ULL, 0x627E47161C5D4F79ULL }, /* XSUM_XXH64_testdata[5915] */\n    { 2958, 0x0000000000000000ULL, 0xFFAA5B327E50D8FAULL }, /* XSUM_XXH64_testdata[5916] */\n    { 2958, 0x000000009E3779B1ULL, 0x544BB3F6FCB9510DULL }, /* XSUM_XXH64_testdata[5917] */\n    { 2959, 0x0000000000000000ULL, 0x00531F06D95A490CULL }, /* XSUM_XXH64_testdata[5918] */\n    { 2959, 0x000000009E3779B1ULL, 0x4B21BB476DD2E59DULL }, /* XSUM_XXH64_testdata[5919] */\n    { 2960, 0x0000000000000000ULL, 0xEA9D346682E2722CULL }, /* XSUM_XXH64_testdata[5920] */\n    { 2960, 0x000000009E3779B1ULL, 0xD73725D67BC99773ULL }, /* XSUM_XXH64_testdata[5921] */\n    { 2961, 0x0000000000000000ULL, 0x2E142758222FE06AULL }, /* XSUM_XXH64_testdata[5922] */\n    { 2961, 0x000000009E3779B1ULL, 0x16CBA3C74356511FULL }, /* XSUM_XXH64_testdata[5923] */\n    { 2962, 0x0000000000000000ULL, 0x3D153375B03094B3ULL }, /* XSUM_XXH64_testdata[5924] */\n    { 2962, 0x000000009E3779B1ULL, 0xD72C1A8823589547ULL }, /* XSUM_XXH64_testdata[5925] */\n    { 2963, 0x0000000000000000ULL, 0x1E0FE4442E7774B4ULL }, /* XSUM_XXH64_testdata[5926] */\n    { 2963, 0x000000009E3779B1ULL, 0xE05BB5DBEB7D36EAULL }, /* XSUM_XXH64_testdata[5927] */\n    { 2964, 0x0000000000000000ULL, 0xEB3560C96135925FULL }, /* XSUM_XXH64_testdata[5928] */\n    { 2964, 0x000000009E3779B1ULL, 0x8E3C48BC4C99026DULL }, /* XSUM_XXH64_testdata[5929] */\n    { 2965, 0x0000000000000000ULL, 0x4E1E2C1A7474D4C3ULL }, /* XSUM_XXH64_testdata[5930] */\n    { 2965, 0x000000009E3779B1ULL, 0x2762DBB29BDD9B14ULL }, /* XSUM_XXH64_testdata[5931] */\n    { 2966, 0x0000000000000000ULL, 0xAA5775793FB3C3A1ULL }, /* XSUM_XXH64_testdata[5932] */\n    { 2966, 0x000000009E3779B1ULL, 0x35BCE39DD060B260ULL }, /* XSUM_XXH64_testdata[5933] */\n    { 2967, 0x0000000000000000ULL, 0x15ADA96859805577ULL }, /* XSUM_XXH64_testdata[5934] */\n    { 2967, 0x000000009E3779B1ULL, 0xDACF2B06E665444AULL }, /* XSUM_XXH64_testdata[5935] */\n    { 2968, 0x0000000000000000ULL, 0x88AD0078B33271A5ULL }, /* XSUM_XXH64_testdata[5936] */\n    { 2968, 0x000000009E3779B1ULL, 0xAECA858979E2D7ACULL }, /* XSUM_XXH64_testdata[5937] */\n    { 2969, 0x0000000000000000ULL, 0x22D8BCE67078B98BULL }, /* XSUM_XXH64_testdata[5938] */\n    { 2969, 0x000000009E3779B1ULL, 0x3BCBA48A4939A260ULL }, /* XSUM_XXH64_testdata[5939] */\n    { 2970, 0x0000000000000000ULL, 0xF9BBBDDB4095D203ULL }, /* XSUM_XXH64_testdata[5940] */\n    { 2970, 0x000000009E3779B1ULL, 0xBC85EFA0D5903602ULL }, /* XSUM_XXH64_testdata[5941] */\n    { 2971, 0x0000000000000000ULL, 0xC693F7F685AA8FA9ULL }, /* XSUM_XXH64_testdata[5942] */\n    { 2971, 0x000000009E3779B1ULL, 0x4CE8F381EBF4CCFDULL }, /* XSUM_XXH64_testdata[5943] */\n    { 2972, 0x0000000000000000ULL, 0xD2DB23CCA0C6767CULL }, /* XSUM_XXH64_testdata[5944] */\n    { 2972, 0x000000009E3779B1ULL, 0xCA67468147A198FBULL }, /* XSUM_XXH64_testdata[5945] */\n    { 2973, 0x0000000000000000ULL, 0x92AAADDC0FEC858FULL }, /* XSUM_XXH64_testdata[5946] */\n    { 2973, 0x000000009E3779B1ULL, 0x51D06DBC0E69BA09ULL }, /* XSUM_XXH64_testdata[5947] */\n    { 2974, 0x0000000000000000ULL, 0x3F64903347E7A25EULL }, /* XSUM_XXH64_testdata[5948] */\n    { 2974, 0x000000009E3779B1ULL, 0x81260842A5405514ULL }, /* XSUM_XXH64_testdata[5949] */\n    { 2975, 0x0000000000000000ULL, 0xD0F4BBD53BEBEDAEULL }, /* XSUM_XXH64_testdata[5950] */\n    { 2975, 0x000000009E3779B1ULL, 0x0B5475BE84EC613FULL }, /* XSUM_XXH64_testdata[5951] */\n    { 2976, 0x0000000000000000ULL, 0x0D5E72F642CADE74ULL }, /* XSUM_XXH64_testdata[5952] */\n    { 2976, 0x000000009E3779B1ULL, 0xEACE78F5E7058ABEULL }, /* XSUM_XXH64_testdata[5953] */\n    { 2977, 0x0000000000000000ULL, 0xD50AC8DE3CB1E75BULL }, /* XSUM_XXH64_testdata[5954] */\n    { 2977, 0x000000009E3779B1ULL, 0xCEE8CA895CBDC66FULL }, /* XSUM_XXH64_testdata[5955] */\n    { 2978, 0x0000000000000000ULL, 0x7395C398EFA13F9BULL }, /* XSUM_XXH64_testdata[5956] */\n    { 2978, 0x000000009E3779B1ULL, 0xF5DB34BAC37EB5F4ULL }, /* XSUM_XXH64_testdata[5957] */\n    { 2979, 0x0000000000000000ULL, 0x73ADE808B47A2D7BULL }, /* XSUM_XXH64_testdata[5958] */\n    { 2979, 0x000000009E3779B1ULL, 0x6BB8A09D1FD48699ULL }, /* XSUM_XXH64_testdata[5959] */\n    { 2980, 0x0000000000000000ULL, 0x058447CE1A5211F1ULL }, /* XSUM_XXH64_testdata[5960] */\n    { 2980, 0x000000009E3779B1ULL, 0x848B9FE94C9194B9ULL }, /* XSUM_XXH64_testdata[5961] */\n    { 2981, 0x0000000000000000ULL, 0x4E188E3969B1C83CULL }, /* XSUM_XXH64_testdata[5962] */\n    { 2981, 0x000000009E3779B1ULL, 0xEE289117BFD7E750ULL }, /* XSUM_XXH64_testdata[5963] */\n    { 2982, 0x0000000000000000ULL, 0x5A85B550523BC73AULL }, /* XSUM_XXH64_testdata[5964] */\n    { 2982, 0x000000009E3779B1ULL, 0x5AFE43F3097D4A2FULL }, /* XSUM_XXH64_testdata[5965] */\n    { 2983, 0x0000000000000000ULL, 0x499769190F89C03FULL }, /* XSUM_XXH64_testdata[5966] */\n    { 2983, 0x000000009E3779B1ULL, 0x2079781F995BEC2CULL }, /* XSUM_XXH64_testdata[5967] */\n    { 2984, 0x0000000000000000ULL, 0x629EE336E061069AULL }, /* XSUM_XXH64_testdata[5968] */\n    { 2984, 0x000000009E3779B1ULL, 0x4B2222BCFDE6A245ULL }, /* XSUM_XXH64_testdata[5969] */\n    { 2985, 0x0000000000000000ULL, 0x7DF8FF0F4616DC30ULL }, /* XSUM_XXH64_testdata[5970] */\n    { 2985, 0x000000009E3779B1ULL, 0x1D9E087ADF42DEEAULL }, /* XSUM_XXH64_testdata[5971] */\n    { 2986, 0x0000000000000000ULL, 0xD33DA2CF66F31A6BULL }, /* XSUM_XXH64_testdata[5972] */\n    { 2986, 0x000000009E3779B1ULL, 0xAEFD32C8527CC49BULL }, /* XSUM_XXH64_testdata[5973] */\n    { 2987, 0x0000000000000000ULL, 0x25DF46E5DD0DB6FFULL }, /* XSUM_XXH64_testdata[5974] */\n    { 2987, 0x000000009E3779B1ULL, 0xDD1EDA274C59CDA8ULL }, /* XSUM_XXH64_testdata[5975] */\n    { 2988, 0x0000000000000000ULL, 0x039FCC888531F1F4ULL }, /* XSUM_XXH64_testdata[5976] */\n    { 2988, 0x000000009E3779B1ULL, 0xBAFF58308A312750ULL }, /* XSUM_XXH64_testdata[5977] */\n    { 2989, 0x0000000000000000ULL, 0x3ADCA236069EE037ULL }, /* XSUM_XXH64_testdata[5978] */\n    { 2989, 0x000000009E3779B1ULL, 0x89B6B4901CF23031ULL }, /* XSUM_XXH64_testdata[5979] */\n    { 2990, 0x0000000000000000ULL, 0x08107C472F3D2E7CULL }, /* XSUM_XXH64_testdata[5980] */\n    { 2990, 0x000000009E3779B1ULL, 0x20E3ADC897B109EEULL }, /* XSUM_XXH64_testdata[5981] */\n    { 2991, 0x0000000000000000ULL, 0x3CBB5F72AA84959FULL }, /* XSUM_XXH64_testdata[5982] */\n    { 2991, 0x000000009E3779B1ULL, 0x90B52738A4702205ULL }, /* XSUM_XXH64_testdata[5983] */\n    { 2992, 0x0000000000000000ULL, 0x0328504AEE9915CFULL }, /* XSUM_XXH64_testdata[5984] */\n    { 2992, 0x000000009E3779B1ULL, 0xBAC2FCF5A34E05CFULL }, /* XSUM_XXH64_testdata[5985] */\n    { 2993, 0x0000000000000000ULL, 0xA085B2AB2742CC15ULL }, /* XSUM_XXH64_testdata[5986] */\n    { 2993, 0x000000009E3779B1ULL, 0xDD726E765FFFC814ULL }, /* XSUM_XXH64_testdata[5987] */\n    { 2994, 0x0000000000000000ULL, 0xBBC26F352BB6D69FULL }, /* XSUM_XXH64_testdata[5988] */\n    { 2994, 0x000000009E3779B1ULL, 0x19431E7E4D68CD2DULL }, /* XSUM_XXH64_testdata[5989] */\n    { 2995, 0x0000000000000000ULL, 0xD0379B5EED62D17FULL }, /* XSUM_XXH64_testdata[5990] */\n    { 2995, 0x000000009E3779B1ULL, 0xDAFBBC87F3F4841AULL }, /* XSUM_XXH64_testdata[5991] */\n    { 2996, 0x0000000000000000ULL, 0xAE384F5A2F96A5E2ULL }, /* XSUM_XXH64_testdata[5992] */\n    { 2996, 0x000000009E3779B1ULL, 0x7E3A803E1CF5B421ULL }, /* XSUM_XXH64_testdata[5993] */\n    { 2997, 0x0000000000000000ULL, 0x7C4C0612C4AF9E77ULL }, /* XSUM_XXH64_testdata[5994] */\n    { 2997, 0x000000009E3779B1ULL, 0x98D0D53B19AD79F1ULL }, /* XSUM_XXH64_testdata[5995] */\n    { 2998, 0x0000000000000000ULL, 0x108298ED03059648ULL }, /* XSUM_XXH64_testdata[5996] */\n    { 2998, 0x000000009E3779B1ULL, 0x4DCB45BC69D5D81BULL }, /* XSUM_XXH64_testdata[5997] */\n    { 2999, 0x0000000000000000ULL, 0x8F705B33108F3013ULL }, /* XSUM_XXH64_testdata[5998] */\n    { 2999, 0x000000009E3779B1ULL, 0xF1F4221D879D678BULL }, /* XSUM_XXH64_testdata[5999] */\n    { 3000, 0x0000000000000000ULL, 0xE684FF60FCE43966ULL }, /* XSUM_XXH64_testdata[6000] */\n    { 3000, 0x000000009E3779B1ULL, 0xF8CB728F857BE375ULL }, /* XSUM_XXH64_testdata[6001] */\n    { 3001, 0x0000000000000000ULL, 0x330583CB67983EDFULL }, /* XSUM_XXH64_testdata[6002] */\n    { 3001, 0x000000009E3779B1ULL, 0x940FE2322E395671ULL }, /* XSUM_XXH64_testdata[6003] */\n    { 3002, 0x0000000000000000ULL, 0x573F01283C899522ULL }, /* XSUM_XXH64_testdata[6004] */\n    { 3002, 0x000000009E3779B1ULL, 0xC1EA7E5F60E5F603ULL }, /* XSUM_XXH64_testdata[6005] */\n    { 3003, 0x0000000000000000ULL, 0xC1AB75DCB5B0C521ULL }, /* XSUM_XXH64_testdata[6006] */\n    { 3003, 0x000000009E3779B1ULL, 0x8575FB7CC71523BDULL }, /* XSUM_XXH64_testdata[6007] */\n    { 3004, 0x0000000000000000ULL, 0xA010009C6ED178DAULL }, /* XSUM_XXH64_testdata[6008] */\n    { 3004, 0x000000009E3779B1ULL, 0xB65425C7EB8C6748ULL }, /* XSUM_XXH64_testdata[6009] */\n    { 3005, 0x0000000000000000ULL, 0xF3EC857BE8653E4FULL }, /* XSUM_XXH64_testdata[6010] */\n    { 3005, 0x000000009E3779B1ULL, 0x5B91ECA6F6A223A6ULL }, /* XSUM_XXH64_testdata[6011] */\n    { 3006, 0x0000000000000000ULL, 0xA1CBBDDFF795D5AAULL }, /* XSUM_XXH64_testdata[6012] */\n    { 3006, 0x000000009E3779B1ULL, 0x313377941F2EE286ULL }, /* XSUM_XXH64_testdata[6013] */\n    { 3007, 0x0000000000000000ULL, 0x20FCC612A8B93AE1ULL }, /* XSUM_XXH64_testdata[6014] */\n    { 3007, 0x000000009E3779B1ULL, 0x25A3E2D9F16C7FA2ULL }, /* XSUM_XXH64_testdata[6015] */\n    { 3008, 0x0000000000000000ULL, 0xD8E6FA63056B6DB8ULL }, /* XSUM_XXH64_testdata[6016] */\n    { 3008, 0x000000009E3779B1ULL, 0x4DB1D534054ED7F7ULL }, /* XSUM_XXH64_testdata[6017] */\n    { 3009, 0x0000000000000000ULL, 0x1C6EEEDB37C610A8ULL }, /* XSUM_XXH64_testdata[6018] */\n    { 3009, 0x000000009E3779B1ULL, 0x877D954066DC77C3ULL }, /* XSUM_XXH64_testdata[6019] */\n    { 3010, 0x0000000000000000ULL, 0xC869507C179685BDULL }, /* XSUM_XXH64_testdata[6020] */\n    { 3010, 0x000000009E3779B1ULL, 0xB160957ADB72B1FCULL }, /* XSUM_XXH64_testdata[6021] */\n    { 3011, 0x0000000000000000ULL, 0x52C28D89FE574F24ULL }, /* XSUM_XXH64_testdata[6022] */\n    { 3011, 0x000000009E3779B1ULL, 0x4F8F4734B6FEA2C9ULL }, /* XSUM_XXH64_testdata[6023] */\n    { 3012, 0x0000000000000000ULL, 0x9BA78B1DF3E688CAULL }, /* XSUM_XXH64_testdata[6024] */\n    { 3012, 0x000000009E3779B1ULL, 0x36EEC844F966131CULL }, /* XSUM_XXH64_testdata[6025] */\n    { 3013, 0x0000000000000000ULL, 0x9AE5A0EB3E181F56ULL }, /* XSUM_XXH64_testdata[6026] */\n    { 3013, 0x000000009E3779B1ULL, 0xCAEAA7F632C86F76ULL }, /* XSUM_XXH64_testdata[6027] */\n    { 3014, 0x0000000000000000ULL, 0xA18AF4A683B620DAULL }, /* XSUM_XXH64_testdata[6028] */\n    { 3014, 0x000000009E3779B1ULL, 0x14AD7A52DD482A71ULL }, /* XSUM_XXH64_testdata[6029] */\n    { 3015, 0x0000000000000000ULL, 0x4CD09E92624BD760ULL }, /* XSUM_XXH64_testdata[6030] */\n    { 3015, 0x000000009E3779B1ULL, 0x667EC630D7752CDAULL }, /* XSUM_XXH64_testdata[6031] */\n    { 3016, 0x0000000000000000ULL, 0x4F8288F2354486DEULL }, /* XSUM_XXH64_testdata[6032] */\n    { 3016, 0x000000009E3779B1ULL, 0xBFC9579C7C14EDADULL }, /* XSUM_XXH64_testdata[6033] */\n    { 3017, 0x0000000000000000ULL, 0xF43521A363DEF108ULL }, /* XSUM_XXH64_testdata[6034] */\n    { 3017, 0x000000009E3779B1ULL, 0x03A918F92A54CC66ULL }, /* XSUM_XXH64_testdata[6035] */\n    { 3018, 0x0000000000000000ULL, 0xE67B478F1B98881BULL }, /* XSUM_XXH64_testdata[6036] */\n    { 3018, 0x000000009E3779B1ULL, 0x0CA01F747E5DA7CBULL }, /* XSUM_XXH64_testdata[6037] */\n    { 3019, 0x0000000000000000ULL, 0x926012291F4056C7ULL }, /* XSUM_XXH64_testdata[6038] */\n    { 3019, 0x000000009E3779B1ULL, 0x4ED0E4901EB0BC9BULL }, /* XSUM_XXH64_testdata[6039] */\n    { 3020, 0x0000000000000000ULL, 0xB414E63BD01167DCULL }, /* XSUM_XXH64_testdata[6040] */\n    { 3020, 0x000000009E3779B1ULL, 0x077877540832C8FDULL }, /* XSUM_XXH64_testdata[6041] */\n    { 3021, 0x0000000000000000ULL, 0xCF16CC88D853E3DDULL }, /* XSUM_XXH64_testdata[6042] */\n    { 3021, 0x000000009E3779B1ULL, 0xD7D29A02B3FCE2F8ULL }, /* XSUM_XXH64_testdata[6043] */\n    { 3022, 0x0000000000000000ULL, 0xA456F74799F0C1F1ULL }, /* XSUM_XXH64_testdata[6044] */\n    { 3022, 0x000000009E3779B1ULL, 0xD6865E378E5C5C13ULL }, /* XSUM_XXH64_testdata[6045] */\n    { 3023, 0x0000000000000000ULL, 0x7D1D41206AB7855AULL }, /* XSUM_XXH64_testdata[6046] */\n    { 3023, 0x000000009E3779B1ULL, 0xEEE4594AF8AD3EE1ULL }, /* XSUM_XXH64_testdata[6047] */\n    { 3024, 0x0000000000000000ULL, 0x9F718A897F7E0AEDULL }, /* XSUM_XXH64_testdata[6048] */\n    { 3024, 0x000000009E3779B1ULL, 0xFD7D764122793DC6ULL }, /* XSUM_XXH64_testdata[6049] */\n    { 3025, 0x0000000000000000ULL, 0x991F3F7A495B8E04ULL }, /* XSUM_XXH64_testdata[6050] */\n    { 3025, 0x000000009E3779B1ULL, 0xC91AB60505847BF3ULL }, /* XSUM_XXH64_testdata[6051] */\n    { 3026, 0x0000000000000000ULL, 0x793720EE76661C69ULL }, /* XSUM_XXH64_testdata[6052] */\n    { 3026, 0x000000009E3779B1ULL, 0x6A9D8207601C4759ULL }, /* XSUM_XXH64_testdata[6053] */\n    { 3027, 0x0000000000000000ULL, 0xA7D50B910233520AULL }, /* XSUM_XXH64_testdata[6054] */\n    { 3027, 0x000000009E3779B1ULL, 0x19636AE67A11FE83ULL }, /* XSUM_XXH64_testdata[6055] */\n    { 3028, 0x0000000000000000ULL, 0xAB8DFC98782FE42AULL }, /* XSUM_XXH64_testdata[6056] */\n    { 3028, 0x000000009E3779B1ULL, 0x8DB67A4ADB318B52ULL }, /* XSUM_XXH64_testdata[6057] */\n    { 3029, 0x0000000000000000ULL, 0xCF95E5B98C32170FULL }, /* XSUM_XXH64_testdata[6058] */\n    { 3029, 0x000000009E3779B1ULL, 0x34A272E6C7561A48ULL }, /* XSUM_XXH64_testdata[6059] */\n    { 3030, 0x0000000000000000ULL, 0xBF6134F365BE8FF6ULL }, /* XSUM_XXH64_testdata[6060] */\n    { 3030, 0x000000009E3779B1ULL, 0x4CD31F482EDDFA77ULL }, /* XSUM_XXH64_testdata[6061] */\n    { 3031, 0x0000000000000000ULL, 0xCB88BD89AFEEE1DFULL }, /* XSUM_XXH64_testdata[6062] */\n    { 3031, 0x000000009E3779B1ULL, 0x404314EC48C68FA6ULL }, /* XSUM_XXH64_testdata[6063] */\n    { 3032, 0x0000000000000000ULL, 0x59C6670F33A16BD8ULL }, /* XSUM_XXH64_testdata[6064] */\n    { 3032, 0x000000009E3779B1ULL, 0x9D6DD2FEE7CA9CFEULL }, /* XSUM_XXH64_testdata[6065] */\n    { 3033, 0x0000000000000000ULL, 0xCA4274EDB69239F7ULL }, /* XSUM_XXH64_testdata[6066] */\n    { 3033, 0x000000009E3779B1ULL, 0xE2B3ED780D087EC5ULL }, /* XSUM_XXH64_testdata[6067] */\n    { 3034, 0x0000000000000000ULL, 0x535B7C1D53F3B1D9ULL }, /* XSUM_XXH64_testdata[6068] */\n    { 3034, 0x000000009E3779B1ULL, 0x025268448308B265ULL }, /* XSUM_XXH64_testdata[6069] */\n    { 3035, 0x0000000000000000ULL, 0xBB74AD7F14535724ULL }, /* XSUM_XXH64_testdata[6070] */\n    { 3035, 0x000000009E3779B1ULL, 0xA6B6956E0E36FBCFULL }, /* XSUM_XXH64_testdata[6071] */\n    { 3036, 0x0000000000000000ULL, 0x180AD49A85D61888ULL }, /* XSUM_XXH64_testdata[6072] */\n    { 3036, 0x000000009E3779B1ULL, 0x203AEF1EEC215EE1ULL }, /* XSUM_XXH64_testdata[6073] */\n    { 3037, 0x0000000000000000ULL, 0x4F3A245A009A543DULL }, /* XSUM_XXH64_testdata[6074] */\n    { 3037, 0x000000009E3779B1ULL, 0x67F678BD489BE987ULL }, /* XSUM_XXH64_testdata[6075] */\n    { 3038, 0x0000000000000000ULL, 0x8C712DB6DD4F36BEULL }, /* XSUM_XXH64_testdata[6076] */\n    { 3038, 0x000000009E3779B1ULL, 0x3A1394EEC865462DULL }, /* XSUM_XXH64_testdata[6077] */\n    { 3039, 0x0000000000000000ULL, 0x10790C1C33FFF84AULL }, /* XSUM_XXH64_testdata[6078] */\n    { 3039, 0x000000009E3779B1ULL, 0xE9BFC7950F2AE30DULL }, /* XSUM_XXH64_testdata[6079] */\n    { 3040, 0x0000000000000000ULL, 0x632FBE8B0D57A80EULL }, /* XSUM_XXH64_testdata[6080] */\n    { 3040, 0x000000009E3779B1ULL, 0x426E4209479CE0ECULL }, /* XSUM_XXH64_testdata[6081] */\n    { 3041, 0x0000000000000000ULL, 0xD3951C2C53808953ULL }, /* XSUM_XXH64_testdata[6082] */\n    { 3041, 0x000000009E3779B1ULL, 0xAEA87F99785030F2ULL }, /* XSUM_XXH64_testdata[6083] */\n    { 3042, 0x0000000000000000ULL, 0x3CF6EB5CE31302EDULL }, /* XSUM_XXH64_testdata[6084] */\n    { 3042, 0x000000009E3779B1ULL, 0x586411B01ABEF789ULL }, /* XSUM_XXH64_testdata[6085] */\n    { 3043, 0x0000000000000000ULL, 0x3A22A7948F07FF2CULL }, /* XSUM_XXH64_testdata[6086] */\n    { 3043, 0x000000009E3779B1ULL, 0xF0563BA396A90A73ULL }, /* XSUM_XXH64_testdata[6087] */\n    { 3044, 0x0000000000000000ULL, 0xA8141E1884975690ULL }, /* XSUM_XXH64_testdata[6088] */\n    { 3044, 0x000000009E3779B1ULL, 0x376D8DB113497DA4ULL }, /* XSUM_XXH64_testdata[6089] */\n    { 3045, 0x0000000000000000ULL, 0x7CA8440AD75DFDCFULL }, /* XSUM_XXH64_testdata[6090] */\n    { 3045, 0x000000009E3779B1ULL, 0x5C51614EFFCC171CULL }, /* XSUM_XXH64_testdata[6091] */\n    { 3046, 0x0000000000000000ULL, 0x07B164EBADD8C25DULL }, /* XSUM_XXH64_testdata[6092] */\n    { 3046, 0x000000009E3779B1ULL, 0x70D5688E8D783865ULL }, /* XSUM_XXH64_testdata[6093] */\n    { 3047, 0x0000000000000000ULL, 0x27E4465A71137428ULL }, /* XSUM_XXH64_testdata[6094] */\n    { 3047, 0x000000009E3779B1ULL, 0xB78B7F7EB1A496C5ULL }, /* XSUM_XXH64_testdata[6095] */\n    { 3048, 0x0000000000000000ULL, 0x368081F9EB43E430ULL }, /* XSUM_XXH64_testdata[6096] */\n    { 3048, 0x000000009E3779B1ULL, 0x866BB62F79173FACULL }, /* XSUM_XXH64_testdata[6097] */\n    { 3049, 0x0000000000000000ULL, 0xBA27845D35F1597FULL }, /* XSUM_XXH64_testdata[6098] */\n    { 3049, 0x000000009E3779B1ULL, 0xEBBB81D6DA9A134EULL }, /* XSUM_XXH64_testdata[6099] */\n    { 3050, 0x0000000000000000ULL, 0x450AC0E86EF411F7ULL }, /* XSUM_XXH64_testdata[6100] */\n    { 3050, 0x000000009E3779B1ULL, 0x3E727CD390432B73ULL }, /* XSUM_XXH64_testdata[6101] */\n    { 3051, 0x0000000000000000ULL, 0x34CE2564F23304AFULL }, /* XSUM_XXH64_testdata[6102] */\n    { 3051, 0x000000009E3779B1ULL, 0xBF745E5E74FD62F6ULL }, /* XSUM_XXH64_testdata[6103] */\n    { 3052, 0x0000000000000000ULL, 0x74231DB6A33BE634ULL }, /* XSUM_XXH64_testdata[6104] */\n    { 3052, 0x000000009E3779B1ULL, 0xD08A345FC6198451ULL }, /* XSUM_XXH64_testdata[6105] */\n    { 3053, 0x0000000000000000ULL, 0x5DFA36390438B53BULL }, /* XSUM_XXH64_testdata[6106] */\n    { 3053, 0x000000009E3779B1ULL, 0x8F5E552BD3E8CD18ULL }, /* XSUM_XXH64_testdata[6107] */\n    { 3054, 0x0000000000000000ULL, 0xB934098469FFED79ULL }, /* XSUM_XXH64_testdata[6108] */\n    { 3054, 0x000000009E3779B1ULL, 0x5FEFB12A046DE9B9ULL }, /* XSUM_XXH64_testdata[6109] */\n    { 3055, 0x0000000000000000ULL, 0x1A8A987150D99B56ULL }, /* XSUM_XXH64_testdata[6110] */\n    { 3055, 0x000000009E3779B1ULL, 0x5E3011983A065BDAULL }, /* XSUM_XXH64_testdata[6111] */\n    { 3056, 0x0000000000000000ULL, 0x37EF552D630529C7ULL }, /* XSUM_XXH64_testdata[6112] */\n    { 3056, 0x000000009E3779B1ULL, 0x62A48E8A8D391A43ULL }, /* XSUM_XXH64_testdata[6113] */\n    { 3057, 0x0000000000000000ULL, 0xE7C45AE157E50D12ULL }, /* XSUM_XXH64_testdata[6114] */\n    { 3057, 0x000000009E3779B1ULL, 0x01906C95DE0EF2E2ULL }, /* XSUM_XXH64_testdata[6115] */\n    { 3058, 0x0000000000000000ULL, 0xA92B3C3367D77C48ULL }, /* XSUM_XXH64_testdata[6116] */\n    { 3058, 0x000000009E3779B1ULL, 0x4B0F090B28CD17CFULL }, /* XSUM_XXH64_testdata[6117] */\n    { 3059, 0x0000000000000000ULL, 0x94E8DB680FCC88E9ULL }, /* XSUM_XXH64_testdata[6118] */\n    { 3059, 0x000000009E3779B1ULL, 0x4B935297B9F3F7D2ULL }, /* XSUM_XXH64_testdata[6119] */\n    { 3060, 0x0000000000000000ULL, 0xA3454DFD5B62769DULL }, /* XSUM_XXH64_testdata[6120] */\n    { 3060, 0x000000009E3779B1ULL, 0x5EEB43F43A71C5F6ULL }, /* XSUM_XXH64_testdata[6121] */\n    { 3061, 0x0000000000000000ULL, 0xDC57A8CB89E6C537ULL }, /* XSUM_XXH64_testdata[6122] */\n    { 3061, 0x000000009E3779B1ULL, 0x1A05FA5915D6B0FDULL }, /* XSUM_XXH64_testdata[6123] */\n    { 3062, 0x0000000000000000ULL, 0x3858E1AC149FEACCULL }, /* XSUM_XXH64_testdata[6124] */\n    { 3062, 0x000000009E3779B1ULL, 0x395348643524CBEDULL }, /* XSUM_XXH64_testdata[6125] */\n    { 3063, 0x0000000000000000ULL, 0xF121116F835D2FF5ULL }, /* XSUM_XXH64_testdata[6126] */\n    { 3063, 0x000000009E3779B1ULL, 0x74052838E8B4C967ULL }, /* XSUM_XXH64_testdata[6127] */\n    { 3064, 0x0000000000000000ULL, 0xB39C41CEE1CAE728ULL }, /* XSUM_XXH64_testdata[6128] */\n    { 3064, 0x000000009E3779B1ULL, 0xEBF18C9B1DD18195ULL }, /* XSUM_XXH64_testdata[6129] */\n    { 3065, 0x0000000000000000ULL, 0xB947D1681ECD85DAULL }, /* XSUM_XXH64_testdata[6130] */\n    { 3065, 0x000000009E3779B1ULL, 0x20F9750A1E3E7C6CULL }, /* XSUM_XXH64_testdata[6131] */\n    { 3066, 0x0000000000000000ULL, 0x5131B98A23A664BCULL }, /* XSUM_XXH64_testdata[6132] */\n    { 3066, 0x000000009E3779B1ULL, 0x811DE85E0F1AEF8AULL }, /* XSUM_XXH64_testdata[6133] */\n    { 3067, 0x0000000000000000ULL, 0x112014B2C0CE5B58ULL }, /* XSUM_XXH64_testdata[6134] */\n    { 3067, 0x000000009E3779B1ULL, 0x2BDE05A4716851D7ULL }, /* XSUM_XXH64_testdata[6135] */\n    { 3068, 0x0000000000000000ULL, 0xB7B64FD55D8744E4ULL }, /* XSUM_XXH64_testdata[6136] */\n    { 3068, 0x000000009E3779B1ULL, 0x7C849F7EF6C5D58EULL }, /* XSUM_XXH64_testdata[6137] */\n    { 3069, 0x0000000000000000ULL, 0x330896FA0A24FAAAULL }, /* XSUM_XXH64_testdata[6138] */\n    { 3069, 0x000000009E3779B1ULL, 0x42552BD332AF9FDEULL }, /* XSUM_XXH64_testdata[6139] */\n    { 3070, 0x0000000000000000ULL, 0x6D3B2B83814C9738ULL }, /* XSUM_XXH64_testdata[6140] */\n    { 3070, 0x000000009E3779B1ULL, 0x6643EEFC412A286AULL }, /* XSUM_XXH64_testdata[6141] */\n    { 3071, 0x0000000000000000ULL, 0x4A1158460984590AULL }, /* XSUM_XXH64_testdata[6142] */\n    { 3071, 0x000000009E3779B1ULL, 0xBD27A37D5ACDBD7CULL }, /* XSUM_XXH64_testdata[6143] */\n    { 3072, 0x0000000000000000ULL, 0xD4E565F7525ED7D6ULL }, /* XSUM_XXH64_testdata[6144] */\n    { 3072, 0x000000009E3779B1ULL, 0xA58818CB61D7D3C5ULL }, /* XSUM_XXH64_testdata[6145] */\n    { 3073, 0x0000000000000000ULL, 0x4C1983B3DAB0C4BDULL }, /* XSUM_XXH64_testdata[6146] */\n    { 3073, 0x000000009E3779B1ULL, 0xB2A5767C85AE8C5EULL }, /* XSUM_XXH64_testdata[6147] */\n    { 3074, 0x0000000000000000ULL, 0xF7ABBAEE1D95088BULL }, /* XSUM_XXH64_testdata[6148] */\n    { 3074, 0x000000009E3779B1ULL, 0x8D8A1A381693FF29ULL }, /* XSUM_XXH64_testdata[6149] */\n    { 3075, 0x0000000000000000ULL, 0xF747DC4F1C4BA673ULL }, /* XSUM_XXH64_testdata[6150] */\n    { 3075, 0x000000009E3779B1ULL, 0x02F27B47D3C11917ULL }, /* XSUM_XXH64_testdata[6151] */\n    { 3076, 0x0000000000000000ULL, 0xA7C8B1E470CD7F6FULL }, /* XSUM_XXH64_testdata[6152] */\n    { 3076, 0x000000009E3779B1ULL, 0x5E62237464327250ULL }, /* XSUM_XXH64_testdata[6153] */\n    { 3077, 0x0000000000000000ULL, 0xF7889802DBBB44C2ULL }, /* XSUM_XXH64_testdata[6154] */\n    { 3077, 0x000000009E3779B1ULL, 0x00EE52655CA0C911ULL }, /* XSUM_XXH64_testdata[6155] */\n    { 3078, 0x0000000000000000ULL, 0x9605144CB45195C7ULL }, /* XSUM_XXH64_testdata[6156] */\n    { 3078, 0x000000009E3779B1ULL, 0xFDCB89E45CE1AA58ULL }, /* XSUM_XXH64_testdata[6157] */\n    { 3079, 0x0000000000000000ULL, 0x085D1362C08A9AA8ULL }, /* XSUM_XXH64_testdata[6158] */\n    { 3079, 0x000000009E3779B1ULL, 0xE7F12C33269B0812ULL }, /* XSUM_XXH64_testdata[6159] */\n    { 3080, 0x0000000000000000ULL, 0xE47C24C654B6FA83ULL }, /* XSUM_XXH64_testdata[6160] */\n    { 3080, 0x000000009E3779B1ULL, 0xBEAB791B5AE43A1CULL }, /* XSUM_XXH64_testdata[6161] */\n    { 3081, 0x0000000000000000ULL, 0x5B81143A3BF0EFDAULL }, /* XSUM_XXH64_testdata[6162] */\n    { 3081, 0x000000009E3779B1ULL, 0xA751814B1719A456ULL }, /* XSUM_XXH64_testdata[6163] */\n    { 3082, 0x0000000000000000ULL, 0x67A5375E989F206CULL }, /* XSUM_XXH64_testdata[6164] */\n    { 3082, 0x000000009E3779B1ULL, 0x5127D2F98852F302ULL }, /* XSUM_XXH64_testdata[6165] */\n    { 3083, 0x0000000000000000ULL, 0x7527F85125554091ULL }, /* XSUM_XXH64_testdata[6166] */\n    { 3083, 0x000000009E3779B1ULL, 0x08728D57C165A995ULL }, /* XSUM_XXH64_testdata[6167] */\n    { 3084, 0x0000000000000000ULL, 0x31DFAB90F3D16FE8ULL }, /* XSUM_XXH64_testdata[6168] */\n    { 3084, 0x000000009E3779B1ULL, 0xFD6E8953BCB89F17ULL }, /* XSUM_XXH64_testdata[6169] */\n    { 3085, 0x0000000000000000ULL, 0xD1DEA7BFE896594DULL }, /* XSUM_XXH64_testdata[6170] */\n    { 3085, 0x000000009E3779B1ULL, 0x120FBA469476A034ULL }, /* XSUM_XXH64_testdata[6171] */\n    { 3086, 0x0000000000000000ULL, 0xC61D2F45AD7C4424ULL }, /* XSUM_XXH64_testdata[6172] */\n    { 3086, 0x000000009E3779B1ULL, 0xA695C11689E60744ULL }, /* XSUM_XXH64_testdata[6173] */\n    { 3087, 0x0000000000000000ULL, 0x62C46CC95FF68AE5ULL }, /* XSUM_XXH64_testdata[6174] */\n    { 3087, 0x000000009E3779B1ULL, 0x5C8F1510909B6B35ULL }, /* XSUM_XXH64_testdata[6175] */\n    { 3088, 0x0000000000000000ULL, 0x499F5A9B2464045AULL }, /* XSUM_XXH64_testdata[6176] */\n    { 3088, 0x000000009E3779B1ULL, 0x094B563E76732498ULL }, /* XSUM_XXH64_testdata[6177] */\n    { 3089, 0x0000000000000000ULL, 0x1112FF8B52451A96ULL }, /* XSUM_XXH64_testdata[6178] */\n    { 3089, 0x000000009E3779B1ULL, 0xE88599D66586F003ULL }, /* XSUM_XXH64_testdata[6179] */\n    { 3090, 0x0000000000000000ULL, 0x520F2548A1803420ULL }, /* XSUM_XXH64_testdata[6180] */\n    { 3090, 0x000000009E3779B1ULL, 0x96C6145017664572ULL }, /* XSUM_XXH64_testdata[6181] */\n    { 3091, 0x0000000000000000ULL, 0x99A5B7007990D642ULL }, /* XSUM_XXH64_testdata[6182] */\n    { 3091, 0x000000009E3779B1ULL, 0x46D5DA3C693A5FE7ULL }, /* XSUM_XXH64_testdata[6183] */\n    { 3092, 0x0000000000000000ULL, 0x3C96BCE0E4FC8DC9ULL }, /* XSUM_XXH64_testdata[6184] */\n    { 3092, 0x000000009E3779B1ULL, 0xC468DE887CCA53C0ULL }, /* XSUM_XXH64_testdata[6185] */\n    { 3093, 0x0000000000000000ULL, 0x2FCE6E18E632FC11ULL }, /* XSUM_XXH64_testdata[6186] */\n    { 3093, 0x000000009E3779B1ULL, 0xCCFE6B4A56ABA439ULL }, /* XSUM_XXH64_testdata[6187] */\n    { 3094, 0x0000000000000000ULL, 0xE400FC592C96B711ULL }, /* XSUM_XXH64_testdata[6188] */\n    { 3094, 0x000000009E3779B1ULL, 0xD4909BD7DBFF8BD7ULL }, /* XSUM_XXH64_testdata[6189] */\n    { 3095, 0x0000000000000000ULL, 0x030F757279B918EFULL }, /* XSUM_XXH64_testdata[6190] */\n    { 3095, 0x000000009E3779B1ULL, 0x1CD0B44DD2BB7080ULL }, /* XSUM_XXH64_testdata[6191] */\n    { 3096, 0x0000000000000000ULL, 0xD3EA547BC89A82D9ULL }, /* XSUM_XXH64_testdata[6192] */\n    { 3096, 0x000000009E3779B1ULL, 0x4625A176048C52C5ULL }, /* XSUM_XXH64_testdata[6193] */\n    { 3097, 0x0000000000000000ULL, 0xD4B2C10A9A2B9848ULL }, /* XSUM_XXH64_testdata[6194] */\n    { 3097, 0x000000009E3779B1ULL, 0x59FA35565A6A6739ULL }, /* XSUM_XXH64_testdata[6195] */\n    { 3098, 0x0000000000000000ULL, 0xDA79FB8119504D7CULL }, /* XSUM_XXH64_testdata[6196] */\n    { 3098, 0x000000009E3779B1ULL, 0x89047DA06D3D4AB4ULL }, /* XSUM_XXH64_testdata[6197] */\n    { 3099, 0x0000000000000000ULL, 0xEFEF2E02E098D91FULL }, /* XSUM_XXH64_testdata[6198] */\n    { 3099, 0x000000009E3779B1ULL, 0x47583674DA2A6CD0ULL }, /* XSUM_XXH64_testdata[6199] */\n    { 3100, 0x0000000000000000ULL, 0x4CDBEFBEA273EC06ULL }, /* XSUM_XXH64_testdata[6200] */\n    { 3100, 0x000000009E3779B1ULL, 0xD6A64C890FDF2D89ULL }, /* XSUM_XXH64_testdata[6201] */\n    { 3101, 0x0000000000000000ULL, 0xB81A32EE5035D36FULL }, /* XSUM_XXH64_testdata[6202] */\n    { 3101, 0x000000009E3779B1ULL, 0x8F5C848ABDD39FC9ULL }, /* XSUM_XXH64_testdata[6203] */\n    { 3102, 0x0000000000000000ULL, 0xC2B00EC6FCCDA0DAULL }, /* XSUM_XXH64_testdata[6204] */\n    { 3102, 0x000000009E3779B1ULL, 0xA914EEEAB7DB9644ULL }, /* XSUM_XXH64_testdata[6205] */\n    { 3103, 0x0000000000000000ULL, 0x9D373A8F49EA6F40ULL }, /* XSUM_XXH64_testdata[6206] */\n    { 3103, 0x000000009E3779B1ULL, 0x7D6BB7F79B28AF67ULL }, /* XSUM_XXH64_testdata[6207] */\n    { 3104, 0x0000000000000000ULL, 0xB80F47F900E36643ULL }, /* XSUM_XXH64_testdata[6208] */\n    { 3104, 0x000000009E3779B1ULL, 0x3B5475F93339CF0FULL }, /* XSUM_XXH64_testdata[6209] */\n    { 3105, 0x0000000000000000ULL, 0x1200DE0B229F76F6ULL }, /* XSUM_XXH64_testdata[6210] */\n    { 3105, 0x000000009E3779B1ULL, 0x16A42CC569B07F59ULL }, /* XSUM_XXH64_testdata[6211] */\n    { 3106, 0x0000000000000000ULL, 0x061DB6A12EFB382EULL }, /* XSUM_XXH64_testdata[6212] */\n    { 3106, 0x000000009E3779B1ULL, 0xEB5030F049E1954BULL }, /* XSUM_XXH64_testdata[6213] */\n    { 3107, 0x0000000000000000ULL, 0x3EA2504ED4C5788BULL }, /* XSUM_XXH64_testdata[6214] */\n    { 3107, 0x000000009E3779B1ULL, 0x4CC162BA116601B3ULL }, /* XSUM_XXH64_testdata[6215] */\n    { 3108, 0x0000000000000000ULL, 0x9E8AA0E513138E1FULL }, /* XSUM_XXH64_testdata[6216] */\n    { 3108, 0x000000009E3779B1ULL, 0x1516F4B6374C5221ULL }, /* XSUM_XXH64_testdata[6217] */\n    { 3109, 0x0000000000000000ULL, 0xB8D0A8DFC61AF496ULL }, /* XSUM_XXH64_testdata[6218] */\n    { 3109, 0x000000009E3779B1ULL, 0x81839F54918BEAB4ULL }, /* XSUM_XXH64_testdata[6219] */\n    { 3110, 0x0000000000000000ULL, 0x47C2B3C13293CC5CULL }, /* XSUM_XXH64_testdata[6220] */\n    { 3110, 0x000000009E3779B1ULL, 0x5E218BF944E9562AULL }, /* XSUM_XXH64_testdata[6221] */\n    { 3111, 0x0000000000000000ULL, 0xFAA449C87191FB01ULL }, /* XSUM_XXH64_testdata[6222] */\n    { 3111, 0x000000009E3779B1ULL, 0xB01E0743DF39CC46ULL }, /* XSUM_XXH64_testdata[6223] */\n    { 3112, 0x0000000000000000ULL, 0x98B1A93EC4BA606EULL }, /* XSUM_XXH64_testdata[6224] */\n    { 3112, 0x000000009E3779B1ULL, 0x6BED37EA392245A8ULL }, /* XSUM_XXH64_testdata[6225] */\n    { 3113, 0x0000000000000000ULL, 0xAD5333D69E184F9CULL }, /* XSUM_XXH64_testdata[6226] */\n    { 3113, 0x000000009E3779B1ULL, 0xB0FDFB02E1003797ULL }, /* XSUM_XXH64_testdata[6227] */\n    { 3114, 0x0000000000000000ULL, 0xB322867E4DDDB3BAULL }, /* XSUM_XXH64_testdata[6228] */\n    { 3114, 0x000000009E3779B1ULL, 0xAE0E757D26148D87ULL }, /* XSUM_XXH64_testdata[6229] */\n    { 3115, 0x0000000000000000ULL, 0x62C73537DFC024B3ULL }, /* XSUM_XXH64_testdata[6230] */\n    { 3115, 0x000000009E3779B1ULL, 0xE22F8F42ACCF05A7ULL }, /* XSUM_XXH64_testdata[6231] */\n    { 3116, 0x0000000000000000ULL, 0x9D6D9B6CB64E2E2AULL }, /* XSUM_XXH64_testdata[6232] */\n    { 3116, 0x000000009E3779B1ULL, 0x0A8EB746E6563E72ULL }, /* XSUM_XXH64_testdata[6233] */\n    { 3117, 0x0000000000000000ULL, 0x5795C027E58BBD29ULL }, /* XSUM_XXH64_testdata[6234] */\n    { 3117, 0x000000009E3779B1ULL, 0x8CAE73BD71E4348DULL }, /* XSUM_XXH64_testdata[6235] */\n    { 3118, 0x0000000000000000ULL, 0x011B2709078ABCD6ULL }, /* XSUM_XXH64_testdata[6236] */\n    { 3118, 0x000000009E3779B1ULL, 0xF61F4D8D7EA53A1EULL }, /* XSUM_XXH64_testdata[6237] */\n    { 3119, 0x0000000000000000ULL, 0xDD1F924B99FB56FBULL }, /* XSUM_XXH64_testdata[6238] */\n    { 3119, 0x000000009E3779B1ULL, 0x8F5662E8AA6D1634ULL }, /* XSUM_XXH64_testdata[6239] */\n    { 3120, 0x0000000000000000ULL, 0xCBF5E319169C3E95ULL }, /* XSUM_XXH64_testdata[6240] */\n    { 3120, 0x000000009E3779B1ULL, 0xAE1B65BF155A0F46ULL }, /* XSUM_XXH64_testdata[6241] */\n    { 3121, 0x0000000000000000ULL, 0x425DEC257FBCF04BULL }, /* XSUM_XXH64_testdata[6242] */\n    { 3121, 0x000000009E3779B1ULL, 0x5FB3D573A895DAF2ULL }, /* XSUM_XXH64_testdata[6243] */\n    { 3122, 0x0000000000000000ULL, 0xADCA5D9969137BE4ULL }, /* XSUM_XXH64_testdata[6244] */\n    { 3122, 0x000000009E3779B1ULL, 0xBEF9ED108308B403ULL }, /* XSUM_XXH64_testdata[6245] */\n    { 3123, 0x0000000000000000ULL, 0xEDBA0D77E57A64C8ULL }, /* XSUM_XXH64_testdata[6246] */\n    { 3123, 0x000000009E3779B1ULL, 0x6BEFCF3885959F75ULL }, /* XSUM_XXH64_testdata[6247] */\n    { 3124, 0x0000000000000000ULL, 0x3A5FF1A7C125495BULL }, /* XSUM_XXH64_testdata[6248] */\n    { 3124, 0x000000009E3779B1ULL, 0x62D8EAC06605CF29ULL }, /* XSUM_XXH64_testdata[6249] */\n    { 3125, 0x0000000000000000ULL, 0x7E744549D9EFB618ULL }, /* XSUM_XXH64_testdata[6250] */\n    { 3125, 0x000000009E3779B1ULL, 0x61CB63FDAD288528ULL }, /* XSUM_XXH64_testdata[6251] */\n    { 3126, 0x0000000000000000ULL, 0x56DCBF17C822BF9FULL }, /* XSUM_XXH64_testdata[6252] */\n    { 3126, 0x000000009E3779B1ULL, 0x43BC6FDEAA202BB1ULL }, /* XSUM_XXH64_testdata[6253] */\n    { 3127, 0x0000000000000000ULL, 0xCB67B1E45FCBAA23ULL }, /* XSUM_XXH64_testdata[6254] */\n    { 3127, 0x000000009E3779B1ULL, 0xE088D72C68FE2685ULL }, /* XSUM_XXH64_testdata[6255] */\n    { 3128, 0x0000000000000000ULL, 0x6C80D556D179EB90ULL }, /* XSUM_XXH64_testdata[6256] */\n    { 3128, 0x000000009E3779B1ULL, 0x73118C9C693C41C8ULL }, /* XSUM_XXH64_testdata[6257] */\n    { 3129, 0x0000000000000000ULL, 0xE9971B0B0C574512ULL }, /* XSUM_XXH64_testdata[6258] */\n    { 3129, 0x000000009E3779B1ULL, 0x38EE6F50142F2BFFULL }, /* XSUM_XXH64_testdata[6259] */\n    { 3130, 0x0000000000000000ULL, 0x6D3C98A992999915ULL }, /* XSUM_XXH64_testdata[6260] */\n    { 3130, 0x000000009E3779B1ULL, 0xD8E70A78CB307915ULL }, /* XSUM_XXH64_testdata[6261] */\n    { 3131, 0x0000000000000000ULL, 0x8DADE8C63464AA58ULL }, /* XSUM_XXH64_testdata[6262] */\n    { 3131, 0x000000009E3779B1ULL, 0xA96234E38190D622ULL }, /* XSUM_XXH64_testdata[6263] */\n    { 3132, 0x0000000000000000ULL, 0xF2470B27B77B62A4ULL }, /* XSUM_XXH64_testdata[6264] */\n    { 3132, 0x000000009E3779B1ULL, 0xE9337E1BB0111A42ULL }, /* XSUM_XXH64_testdata[6265] */\n    { 3133, 0x0000000000000000ULL, 0x683555884E773A85ULL }, /* XSUM_XXH64_testdata[6266] */\n    { 3133, 0x000000009E3779B1ULL, 0xE671C0AA5D1517D6ULL }, /* XSUM_XXH64_testdata[6267] */\n    { 3134, 0x0000000000000000ULL, 0x8EC3382D16C0C1B0ULL }, /* XSUM_XXH64_testdata[6268] */\n    { 3134, 0x000000009E3779B1ULL, 0xFBFC2F4375CD9361ULL }, /* XSUM_XXH64_testdata[6269] */\n    { 3135, 0x0000000000000000ULL, 0x5A439F66F179D582ULL }, /* XSUM_XXH64_testdata[6270] */\n    { 3135, 0x000000009E3779B1ULL, 0x4BA653791BF134DFULL }, /* XSUM_XXH64_testdata[6271] */\n    { 3136, 0x0000000000000000ULL, 0x5B683630A1563DE3ULL }, /* XSUM_XXH64_testdata[6272] */\n    { 3136, 0x000000009E3779B1ULL, 0xB5799EA19D4C347CULL }, /* XSUM_XXH64_testdata[6273] */\n    { 3137, 0x0000000000000000ULL, 0x885B03C5C677F626ULL }, /* XSUM_XXH64_testdata[6274] */\n    { 3137, 0x000000009E3779B1ULL, 0xEE307421C7BAC686ULL }, /* XSUM_XXH64_testdata[6275] */\n    { 3138, 0x0000000000000000ULL, 0x5C13B061DC32F50AULL }, /* XSUM_XXH64_testdata[6276] */\n    { 3138, 0x000000009E3779B1ULL, 0x61AE19E2519657E1ULL }, /* XSUM_XXH64_testdata[6277] */\n    { 3139, 0x0000000000000000ULL, 0x7D400106156F9745ULL }, /* XSUM_XXH64_testdata[6278] */\n    { 3139, 0x000000009E3779B1ULL, 0x2F0F37675E24D1E7ULL }, /* XSUM_XXH64_testdata[6279] */\n    { 3140, 0x0000000000000000ULL, 0xA966A25960D218B7ULL }, /* XSUM_XXH64_testdata[6280] */\n    { 3140, 0x000000009E3779B1ULL, 0x38037A9D9524FAA2ULL }, /* XSUM_XXH64_testdata[6281] */\n    { 3141, 0x0000000000000000ULL, 0x4AC3BA5E30E880F6ULL }, /* XSUM_XXH64_testdata[6282] */\n    { 3141, 0x000000009E3779B1ULL, 0xBFFB987575DC3B06ULL }, /* XSUM_XXH64_testdata[6283] */\n    { 3142, 0x0000000000000000ULL, 0x56005D6EA7631CB7ULL }, /* XSUM_XXH64_testdata[6284] */\n    { 3142, 0x000000009E3779B1ULL, 0x2F8C1E7E6F988C54ULL }, /* XSUM_XXH64_testdata[6285] */\n    { 3143, 0x0000000000000000ULL, 0x0E2C41E9E9EF723EULL }, /* XSUM_XXH64_testdata[6286] */\n    { 3143, 0x000000009E3779B1ULL, 0x38EC5DC08C9ACFAAULL }, /* XSUM_XXH64_testdata[6287] */\n    { 3144, 0x0000000000000000ULL, 0x369971A9F1C91E87ULL }, /* XSUM_XXH64_testdata[6288] */\n    { 3144, 0x000000009E3779B1ULL, 0x4E7627A14D7C2138ULL }, /* XSUM_XXH64_testdata[6289] */\n    { 3145, 0x0000000000000000ULL, 0xC3888F0BD7EB9251ULL }, /* XSUM_XXH64_testdata[6290] */\n    { 3145, 0x000000009E3779B1ULL, 0x27BFBF7E1C86E599ULL }, /* XSUM_XXH64_testdata[6291] */\n    { 3146, 0x0000000000000000ULL, 0x85B6CE11FBF0108CULL }, /* XSUM_XXH64_testdata[6292] */\n    { 3146, 0x000000009E3779B1ULL, 0x232E1737EF527768ULL }, /* XSUM_XXH64_testdata[6293] */\n    { 3147, 0x0000000000000000ULL, 0x01D7F4F742051E56ULL }, /* XSUM_XXH64_testdata[6294] */\n    { 3147, 0x000000009E3779B1ULL, 0x8370C4E4B3AAB21DULL }, /* XSUM_XXH64_testdata[6295] */\n    { 3148, 0x0000000000000000ULL, 0x2E35F5ECFE316030ULL }, /* XSUM_XXH64_testdata[6296] */\n    { 3148, 0x000000009E3779B1ULL, 0x74C3D151A05A62AFULL }, /* XSUM_XXH64_testdata[6297] */\n    { 3149, 0x0000000000000000ULL, 0xABCC8DFC2B4A84FDULL }, /* XSUM_XXH64_testdata[6298] */\n    { 3149, 0x000000009E3779B1ULL, 0x5CC944EF852B55F3ULL }, /* XSUM_XXH64_testdata[6299] */\n    { 3150, 0x0000000000000000ULL, 0xD7D831361AF6A6B1ULL }, /* XSUM_XXH64_testdata[6300] */\n    { 3150, 0x000000009E3779B1ULL, 0x165B476915240C9FULL }, /* XSUM_XXH64_testdata[6301] */\n    { 3151, 0x0000000000000000ULL, 0xF5B9A189A2ED10D7ULL }, /* XSUM_XXH64_testdata[6302] */\n    { 3151, 0x000000009E3779B1ULL, 0x85F154D15E9E9268ULL }, /* XSUM_XXH64_testdata[6303] */\n    { 3152, 0x0000000000000000ULL, 0x01101E6AE3CC156BULL }, /* XSUM_XXH64_testdata[6304] */\n    { 3152, 0x000000009E3779B1ULL, 0xE0A1A051AA7F2ED4ULL }, /* XSUM_XXH64_testdata[6305] */\n    { 3153, 0x0000000000000000ULL, 0xAFB96A3E32F1992EULL }, /* XSUM_XXH64_testdata[6306] */\n    { 3153, 0x000000009E3779B1ULL, 0x2C3E548A44D75F14ULL }, /* XSUM_XXH64_testdata[6307] */\n    { 3154, 0x0000000000000000ULL, 0x8DA474766F089D03ULL }, /* XSUM_XXH64_testdata[6308] */\n    { 3154, 0x000000009E3779B1ULL, 0xE66781FF6CC8073BULL }, /* XSUM_XXH64_testdata[6309] */\n    { 3155, 0x0000000000000000ULL, 0xFCA1B14385126CE0ULL }, /* XSUM_XXH64_testdata[6310] */\n    { 3155, 0x000000009E3779B1ULL, 0x50A8E4C374008B37ULL }, /* XSUM_XXH64_testdata[6311] */\n    { 3156, 0x0000000000000000ULL, 0x6B1980DE3E8C17B3ULL }, /* XSUM_XXH64_testdata[6312] */\n    { 3156, 0x000000009E3779B1ULL, 0x47DF5484F8D22D0FULL }, /* XSUM_XXH64_testdata[6313] */\n    { 3157, 0x0000000000000000ULL, 0x998D7FEB267EE547ULL }, /* XSUM_XXH64_testdata[6314] */\n    { 3157, 0x000000009E3779B1ULL, 0xF02C62C2AD94FFE8ULL }, /* XSUM_XXH64_testdata[6315] */\n    { 3158, 0x0000000000000000ULL, 0xBA9DF9ABFB77CC65ULL }, /* XSUM_XXH64_testdata[6316] */\n    { 3158, 0x000000009E3779B1ULL, 0x4C2B8AC747B9F47FULL }, /* XSUM_XXH64_testdata[6317] */\n    { 3159, 0x0000000000000000ULL, 0xF6D20F7B9933DC59ULL }, /* XSUM_XXH64_testdata[6318] */\n    { 3159, 0x000000009E3779B1ULL, 0x0E25857362A6084AULL }, /* XSUM_XXH64_testdata[6319] */\n    { 3160, 0x0000000000000000ULL, 0x260B55E17C61F03AULL }, /* XSUM_XXH64_testdata[6320] */\n    { 3160, 0x000000009E3779B1ULL, 0x152F18699CE421BFULL }, /* XSUM_XXH64_testdata[6321] */\n    { 3161, 0x0000000000000000ULL, 0x887449DCAE67C09EULL }, /* XSUM_XXH64_testdata[6322] */\n    { 3161, 0x000000009E3779B1ULL, 0x004E6D8154EDC62BULL }, /* XSUM_XXH64_testdata[6323] */\n    { 3162, 0x0000000000000000ULL, 0xD0943DFD0F28D578ULL }, /* XSUM_XXH64_testdata[6324] */\n    { 3162, 0x000000009E3779B1ULL, 0x91101C838C3B198FULL }, /* XSUM_XXH64_testdata[6325] */\n    { 3163, 0x0000000000000000ULL, 0x39B7DCA54DC94C64ULL }, /* XSUM_XXH64_testdata[6326] */\n    { 3163, 0x000000009E3779B1ULL, 0x709CBAE286EA8E4AULL }, /* XSUM_XXH64_testdata[6327] */\n    { 3164, 0x0000000000000000ULL, 0x092E9A9CB49E5AC7ULL }, /* XSUM_XXH64_testdata[6328] */\n    { 3164, 0x000000009E3779B1ULL, 0xBB3DDCD7AB631EA6ULL }, /* XSUM_XXH64_testdata[6329] */\n    { 3165, 0x0000000000000000ULL, 0xBBA047DFCDAB36FAULL }, /* XSUM_XXH64_testdata[6330] */\n    { 3165, 0x000000009E3779B1ULL, 0xA585F5B0504CCF27ULL }, /* XSUM_XXH64_testdata[6331] */\n    { 3166, 0x0000000000000000ULL, 0x1F12D81E1C43ED94ULL }, /* XSUM_XXH64_testdata[6332] */\n    { 3166, 0x000000009E3779B1ULL, 0x9EE74305EDB9C3D7ULL }, /* XSUM_XXH64_testdata[6333] */\n    { 3167, 0x0000000000000000ULL, 0x4005F367369BB8D8ULL }, /* XSUM_XXH64_testdata[6334] */\n    { 3167, 0x000000009E3779B1ULL, 0x2DFF1B86299B0CBBULL }, /* XSUM_XXH64_testdata[6335] */\n    { 3168, 0x0000000000000000ULL, 0x975A0466798F6CDBULL }, /* XSUM_XXH64_testdata[6336] */\n    { 3168, 0x000000009E3779B1ULL, 0x07FB804BDF37BBF5ULL }, /* XSUM_XXH64_testdata[6337] */\n    { 3169, 0x0000000000000000ULL, 0x455B0E99427F80A8ULL }, /* XSUM_XXH64_testdata[6338] */\n    { 3169, 0x000000009E3779B1ULL, 0x8F1E419365BC174AULL }, /* XSUM_XXH64_testdata[6339] */\n    { 3170, 0x0000000000000000ULL, 0x2DA4B6D9D1B34FE4ULL }, /* XSUM_XXH64_testdata[6340] */\n    { 3170, 0x000000009E3779B1ULL, 0xE96EC0888A1ED74FULL }, /* XSUM_XXH64_testdata[6341] */\n    { 3171, 0x0000000000000000ULL, 0x415C29E9BF8DF391ULL }, /* XSUM_XXH64_testdata[6342] */\n    { 3171, 0x000000009E3779B1ULL, 0x4741DA170730164DULL }, /* XSUM_XXH64_testdata[6343] */\n    { 3172, 0x0000000000000000ULL, 0xED982FEA11A9033DULL }, /* XSUM_XXH64_testdata[6344] */\n    { 3172, 0x000000009E3779B1ULL, 0xD70E5E40EE6208E0ULL }, /* XSUM_XXH64_testdata[6345] */\n    { 3173, 0x0000000000000000ULL, 0xE2C1201A62037128ULL }, /* XSUM_XXH64_testdata[6346] */\n    { 3173, 0x000000009E3779B1ULL, 0xC2E8618D89171F46ULL }, /* XSUM_XXH64_testdata[6347] */\n    { 3174, 0x0000000000000000ULL, 0x22435ED7AF45D633ULL }, /* XSUM_XXH64_testdata[6348] */\n    { 3174, 0x000000009E3779B1ULL, 0x4B55161A5F5A429CULL }, /* XSUM_XXH64_testdata[6349] */\n    { 3175, 0x0000000000000000ULL, 0x8E460E12F3F36051ULL }, /* XSUM_XXH64_testdata[6350] */\n    { 3175, 0x000000009E3779B1ULL, 0xEBD8A192C86B208DULL }, /* XSUM_XXH64_testdata[6351] */\n    { 3176, 0x0000000000000000ULL, 0x075CE6BAEA411AF1ULL }, /* XSUM_XXH64_testdata[6352] */\n    { 3176, 0x000000009E3779B1ULL, 0x99520D56353AF0F5ULL }, /* XSUM_XXH64_testdata[6353] */\n    { 3177, 0x0000000000000000ULL, 0xA2E9F8D1CBA4C135ULL }, /* XSUM_XXH64_testdata[6354] */\n    { 3177, 0x000000009E3779B1ULL, 0x4CD8E1A89B5A2353ULL }, /* XSUM_XXH64_testdata[6355] */\n    { 3178, 0x0000000000000000ULL, 0x5928B2BA76C78F7AULL }, /* XSUM_XXH64_testdata[6356] */\n    { 3178, 0x000000009E3779B1ULL, 0xBE7257D800DBCD93ULL }, /* XSUM_XXH64_testdata[6357] */\n    { 3179, 0x0000000000000000ULL, 0xF821D99BA3837FBFULL }, /* XSUM_XXH64_testdata[6358] */\n    { 3179, 0x000000009E3779B1ULL, 0x8973B57DD2167373ULL }, /* XSUM_XXH64_testdata[6359] */\n    { 3180, 0x0000000000000000ULL, 0x250ACD969ABC8BA1ULL }, /* XSUM_XXH64_testdata[6360] */\n    { 3180, 0x000000009E3779B1ULL, 0xE05FCCE66F019CA7ULL }, /* XSUM_XXH64_testdata[6361] */\n    { 3181, 0x0000000000000000ULL, 0x20EE24791C5A58ACULL }, /* XSUM_XXH64_testdata[6362] */\n    { 3181, 0x000000009E3779B1ULL, 0xBACF461AC5A55023ULL }, /* XSUM_XXH64_testdata[6363] */\n    { 3182, 0x0000000000000000ULL, 0x4AFEC0B0C0B2BF78ULL }, /* XSUM_XXH64_testdata[6364] */\n    { 3182, 0x000000009E3779B1ULL, 0x2784F1B6FB52FC00ULL }, /* XSUM_XXH64_testdata[6365] */\n    { 3183, 0x0000000000000000ULL, 0x02E8EAFD126B541CULL }, /* XSUM_XXH64_testdata[6366] */\n    { 3183, 0x000000009E3779B1ULL, 0xFFD776F4CA2D8E6FULL }, /* XSUM_XXH64_testdata[6367] */\n    { 3184, 0x0000000000000000ULL, 0x53E0B30057387802ULL }, /* XSUM_XXH64_testdata[6368] */\n    { 3184, 0x000000009E3779B1ULL, 0xD92CC489B8FA90E8ULL }, /* XSUM_XXH64_testdata[6369] */\n    { 3185, 0x0000000000000000ULL, 0x8456858BCF263173ULL }, /* XSUM_XXH64_testdata[6370] */\n    { 3185, 0x000000009E3779B1ULL, 0xD30CD067692D0B50ULL }, /* XSUM_XXH64_testdata[6371] */\n    { 3186, 0x0000000000000000ULL, 0x144EC031C70DCB54ULL }, /* XSUM_XXH64_testdata[6372] */\n    { 3186, 0x000000009E3779B1ULL, 0xD4797FAC5C2DACF1ULL }, /* XSUM_XXH64_testdata[6373] */\n    { 3187, 0x0000000000000000ULL, 0x98A951106B9DE390ULL }, /* XSUM_XXH64_testdata[6374] */\n    { 3187, 0x000000009E3779B1ULL, 0x463F750C20AC75F8ULL }, /* XSUM_XXH64_testdata[6375] */\n    { 3188, 0x0000000000000000ULL, 0x3F490ED8C1762467ULL }, /* XSUM_XXH64_testdata[6376] */\n    { 3188, 0x000000009E3779B1ULL, 0x988BB66C13E51D19ULL }, /* XSUM_XXH64_testdata[6377] */\n    { 3189, 0x0000000000000000ULL, 0x75523F83F86DBE86ULL }, /* XSUM_XXH64_testdata[6378] */\n    { 3189, 0x000000009E3779B1ULL, 0x832FC3DB0C00AB7EULL }, /* XSUM_XXH64_testdata[6379] */\n    { 3190, 0x0000000000000000ULL, 0x4FECD0C72C3E4716ULL }, /* XSUM_XXH64_testdata[6380] */\n    { 3190, 0x000000009E3779B1ULL, 0xEE7BCFA74566A76BULL }, /* XSUM_XXH64_testdata[6381] */\n    { 3191, 0x0000000000000000ULL, 0x3A1F21FF9209978DULL }, /* XSUM_XXH64_testdata[6382] */\n    { 3191, 0x000000009E3779B1ULL, 0x7EA7A378AF38632AULL }, /* XSUM_XXH64_testdata[6383] */\n    { 3192, 0x0000000000000000ULL, 0xDD583859F0AFF667ULL }, /* XSUM_XXH64_testdata[6384] */\n    { 3192, 0x000000009E3779B1ULL, 0x57E627DCB8B81ED7ULL }, /* XSUM_XXH64_testdata[6385] */\n    { 3193, 0x0000000000000000ULL, 0x19F6F29CBCD61FC5ULL }, /* XSUM_XXH64_testdata[6386] */\n    { 3193, 0x000000009E3779B1ULL, 0xF72D092940F33FC5ULL }, /* XSUM_XXH64_testdata[6387] */\n    { 3194, 0x0000000000000000ULL, 0x9346CDB5BD2B2F51ULL }, /* XSUM_XXH64_testdata[6388] */\n    { 3194, 0x000000009E3779B1ULL, 0x8F4473E1660E6521ULL }, /* XSUM_XXH64_testdata[6389] */\n    { 3195, 0x0000000000000000ULL, 0xC1AFA3511D44A21FULL }, /* XSUM_XXH64_testdata[6390] */\n    { 3195, 0x000000009E3779B1ULL, 0x9B1B427318C12940ULL }, /* XSUM_XXH64_testdata[6391] */\n    { 3196, 0x0000000000000000ULL, 0x620BBD0E75803042ULL }, /* XSUM_XXH64_testdata[6392] */\n    { 3196, 0x000000009E3779B1ULL, 0x93AA5F46FAED5333ULL }, /* XSUM_XXH64_testdata[6393] */\n    { 3197, 0x0000000000000000ULL, 0xD02C6A69BC64CA6FULL }, /* XSUM_XXH64_testdata[6394] */\n    { 3197, 0x000000009E3779B1ULL, 0x2CD8E833B90DAC75ULL }, /* XSUM_XXH64_testdata[6395] */\n    { 3198, 0x0000000000000000ULL, 0x86871F6C73146396ULL }, /* XSUM_XXH64_testdata[6396] */\n    { 3198, 0x000000009E3779B1ULL, 0xE4345057635E8BA4ULL }, /* XSUM_XXH64_testdata[6397] */\n    { 3199, 0x0000000000000000ULL, 0x375D99F419844280ULL }, /* XSUM_XXH64_testdata[6398] */\n    { 3199, 0x000000009E3779B1ULL, 0x8D480FEDDCDC47D8ULL }, /* XSUM_XXH64_testdata[6399] */\n    { 3200, 0x0000000000000000ULL, 0xE0CBCA0A52536870ULL }, /* XSUM_XXH64_testdata[6400] */\n    { 3200, 0x000000009E3779B1ULL, 0x217F1EC828E97854ULL }, /* XSUM_XXH64_testdata[6401] */\n    { 3201, 0x0000000000000000ULL, 0xE97FB9081A34F05EULL }, /* XSUM_XXH64_testdata[6402] */\n    { 3201, 0x000000009E3779B1ULL, 0xF2B5EF77EFEE2CB6ULL }, /* XSUM_XXH64_testdata[6403] */\n    { 3202, 0x0000000000000000ULL, 0x4A4E5C1390D1A0ADULL }, /* XSUM_XXH64_testdata[6404] */\n    { 3202, 0x000000009E3779B1ULL, 0x2C3DCF95AEABC674ULL }, /* XSUM_XXH64_testdata[6405] */\n    { 3203, 0x0000000000000000ULL, 0xAB1DC1335AB75943ULL }, /* XSUM_XXH64_testdata[6406] */\n    { 3203, 0x000000009E3779B1ULL, 0x1484E667BB8E615AULL }, /* XSUM_XXH64_testdata[6407] */\n    { 3204, 0x0000000000000000ULL, 0xA1EF2223FC53ADC5ULL }, /* XSUM_XXH64_testdata[6408] */\n    { 3204, 0x000000009E3779B1ULL, 0xF9AF56D1EA05CB3CULL }, /* XSUM_XXH64_testdata[6409] */\n    { 3205, 0x0000000000000000ULL, 0x91C006FFDFA12649ULL }, /* XSUM_XXH64_testdata[6410] */\n    { 3205, 0x000000009E3779B1ULL, 0xE77F0A78EC402716ULL }, /* XSUM_XXH64_testdata[6411] */\n    { 3206, 0x0000000000000000ULL, 0x5E4ADCC47100F4E0ULL }, /* XSUM_XXH64_testdata[6412] */\n    { 3206, 0x000000009E3779B1ULL, 0x7E767412FC47D6A2ULL }, /* XSUM_XXH64_testdata[6413] */\n    { 3207, 0x0000000000000000ULL, 0x73065EFBE25BB1B1ULL }, /* XSUM_XXH64_testdata[6414] */\n    { 3207, 0x000000009E3779B1ULL, 0x0AB2355124618612ULL }, /* XSUM_XXH64_testdata[6415] */\n    { 3208, 0x0000000000000000ULL, 0x9EAA3EC892E44D9EULL }, /* XSUM_XXH64_testdata[6416] */\n    { 3208, 0x000000009E3779B1ULL, 0x4CC9BECD0A235635ULL }, /* XSUM_XXH64_testdata[6417] */\n    { 3209, 0x0000000000000000ULL, 0xF4CC10DEFE26D43FULL }, /* XSUM_XXH64_testdata[6418] */\n    { 3209, 0x000000009E3779B1ULL, 0xC0A38A5270CE3DF8ULL }, /* XSUM_XXH64_testdata[6419] */\n    { 3210, 0x0000000000000000ULL, 0x1E2DC5BC55A82CAAULL }, /* XSUM_XXH64_testdata[6420] */\n    { 3210, 0x000000009E3779B1ULL, 0x3EA5EEBB7C10B7D0ULL }, /* XSUM_XXH64_testdata[6421] */\n    { 3211, 0x0000000000000000ULL, 0xF9DC4EFC76F9AD9EULL }, /* XSUM_XXH64_testdata[6422] */\n    { 3211, 0x000000009E3779B1ULL, 0x9B0609A4E614EE5EULL }, /* XSUM_XXH64_testdata[6423] */\n    { 3212, 0x0000000000000000ULL, 0x3747EC71682F29C5ULL }, /* XSUM_XXH64_testdata[6424] */\n    { 3212, 0x000000009E3779B1ULL, 0xE9DEBF51FA2AB48AULL }, /* XSUM_XXH64_testdata[6425] */\n    { 3213, 0x0000000000000000ULL, 0x711CF1948F4D114FULL }, /* XSUM_XXH64_testdata[6426] */\n    { 3213, 0x000000009E3779B1ULL, 0xAF18DB718264D5A5ULL }, /* XSUM_XXH64_testdata[6427] */\n    { 3214, 0x0000000000000000ULL, 0x6ADF4EA7153305E2ULL }, /* XSUM_XXH64_testdata[6428] */\n    { 3214, 0x000000009E3779B1ULL, 0xB3C55C7B30D680BAULL }, /* XSUM_XXH64_testdata[6429] */\n    { 3215, 0x0000000000000000ULL, 0x870BD9691AB4BC0BULL }, /* XSUM_XXH64_testdata[6430] */\n    { 3215, 0x000000009E3779B1ULL, 0xF7AB1CA99FAAE8C0ULL }, /* XSUM_XXH64_testdata[6431] */\n    { 3216, 0x0000000000000000ULL, 0x064CBA75062C1059ULL }, /* XSUM_XXH64_testdata[6432] */\n    { 3216, 0x000000009E3779B1ULL, 0x98BCCE5522245123ULL }, /* XSUM_XXH64_testdata[6433] */\n    { 3217, 0x0000000000000000ULL, 0xF638255018ED9271ULL }, /* XSUM_XXH64_testdata[6434] */\n    { 3217, 0x000000009E3779B1ULL, 0x112641563CDEB48DULL }, /* XSUM_XXH64_testdata[6435] */\n    { 3218, 0x0000000000000000ULL, 0x7A5DFD96186E9787ULL }, /* XSUM_XXH64_testdata[6436] */\n    { 3218, 0x000000009E3779B1ULL, 0xB38B7D7667E12F35ULL }, /* XSUM_XXH64_testdata[6437] */\n    { 3219, 0x0000000000000000ULL, 0x3551F5E982AC71A0ULL }, /* XSUM_XXH64_testdata[6438] */\n    { 3219, 0x000000009E3779B1ULL, 0x3AE4453B2D158C91ULL }, /* XSUM_XXH64_testdata[6439] */\n    { 3220, 0x0000000000000000ULL, 0xCF21F94C514F26E1ULL }, /* XSUM_XXH64_testdata[6440] */\n    { 3220, 0x000000009E3779B1ULL, 0x6F53AFC39ACF5AA6ULL }, /* XSUM_XXH64_testdata[6441] */\n    { 3221, 0x0000000000000000ULL, 0x428D532C4475F882ULL }, /* XSUM_XXH64_testdata[6442] */\n    { 3221, 0x000000009E3779B1ULL, 0x5B8ED9F8D6A0DF08ULL }, /* XSUM_XXH64_testdata[6443] */\n    { 3222, 0x0000000000000000ULL, 0x6EE80E55D7345E75ULL }, /* XSUM_XXH64_testdata[6444] */\n    { 3222, 0x000000009E3779B1ULL, 0xEC8384AE0C0796B0ULL }, /* XSUM_XXH64_testdata[6445] */\n    { 3223, 0x0000000000000000ULL, 0x00F6DF3E8527D24EULL }, /* XSUM_XXH64_testdata[6446] */\n    { 3223, 0x000000009E3779B1ULL, 0x400E9D36EB441B49ULL }, /* XSUM_XXH64_testdata[6447] */\n    { 3224, 0x0000000000000000ULL, 0xE2CF4F4A902D40E0ULL }, /* XSUM_XXH64_testdata[6448] */\n    { 3224, 0x000000009E3779B1ULL, 0xCB10674480B4B240ULL }, /* XSUM_XXH64_testdata[6449] */\n    { 3225, 0x0000000000000000ULL, 0x66071396FC650921ULL }, /* XSUM_XXH64_testdata[6450] */\n    { 3225, 0x000000009E3779B1ULL, 0xBE9502AC99CCB62AULL }, /* XSUM_XXH64_testdata[6451] */\n    { 3226, 0x0000000000000000ULL, 0x0FCCF06321540D98ULL }, /* XSUM_XXH64_testdata[6452] */\n    { 3226, 0x000000009E3779B1ULL, 0x5B89D702BC08173EULL }, /* XSUM_XXH64_testdata[6453] */\n    { 3227, 0x0000000000000000ULL, 0x7AD06C8367E1548FULL }, /* XSUM_XXH64_testdata[6454] */\n    { 3227, 0x000000009E3779B1ULL, 0x5456FC2A428DDE04ULL }, /* XSUM_XXH64_testdata[6455] */\n    { 3228, 0x0000000000000000ULL, 0x1BFF2226AC299D1CULL }, /* XSUM_XXH64_testdata[6456] */\n    { 3228, 0x000000009E3779B1ULL, 0x99DCD348916EE2A9ULL }, /* XSUM_XXH64_testdata[6457] */\n    { 3229, 0x0000000000000000ULL, 0x2D7669E223B49279ULL }, /* XSUM_XXH64_testdata[6458] */\n    { 3229, 0x000000009E3779B1ULL, 0xF85A58AF8B41745DULL }, /* XSUM_XXH64_testdata[6459] */\n    { 3230, 0x0000000000000000ULL, 0x4350485F791B4C78ULL }, /* XSUM_XXH64_testdata[6460] */\n    { 3230, 0x000000009E3779B1ULL, 0xF0F6E0A07D10B16BULL }, /* XSUM_XXH64_testdata[6461] */\n    { 3231, 0x0000000000000000ULL, 0x476E7706A03E95FFULL }, /* XSUM_XXH64_testdata[6462] */\n    { 3231, 0x000000009E3779B1ULL, 0xC8CB2664C515DEC6ULL }, /* XSUM_XXH64_testdata[6463] */\n    { 3232, 0x0000000000000000ULL, 0x7EC36F2D704F701FULL }, /* XSUM_XXH64_testdata[6464] */\n    { 3232, 0x000000009E3779B1ULL, 0x99F67FC49C0980CDULL }, /* XSUM_XXH64_testdata[6465] */\n    { 3233, 0x0000000000000000ULL, 0x8935AC8E1CB2AD3AULL }, /* XSUM_XXH64_testdata[6466] */\n    { 3233, 0x000000009E3779B1ULL, 0x642C8770655F6560ULL }, /* XSUM_XXH64_testdata[6467] */\n    { 3234, 0x0000000000000000ULL, 0x2CA82EF664EFA7CFULL }, /* XSUM_XXH64_testdata[6468] */\n    { 3234, 0x000000009E3779B1ULL, 0x48530305E6507035ULL }, /* XSUM_XXH64_testdata[6469] */\n    { 3235, 0x0000000000000000ULL, 0x8551B264AE84B3D5ULL }, /* XSUM_XXH64_testdata[6470] */\n    { 3235, 0x000000009E3779B1ULL, 0x82AA2F6B8C63A2A0ULL }, /* XSUM_XXH64_testdata[6471] */\n    { 3236, 0x0000000000000000ULL, 0x7FB0C87377C67B80ULL }, /* XSUM_XXH64_testdata[6472] */\n    { 3236, 0x000000009E3779B1ULL, 0x738F88AA927297C9ULL }, /* XSUM_XXH64_testdata[6473] */\n    { 3237, 0x0000000000000000ULL, 0x433305F7CD36C56FULL }, /* XSUM_XXH64_testdata[6474] */\n    { 3237, 0x000000009E3779B1ULL, 0xBE07EF20BC923E79ULL }, /* XSUM_XXH64_testdata[6475] */\n    { 3238, 0x0000000000000000ULL, 0x30656A4CBB55278FULL }, /* XSUM_XXH64_testdata[6476] */\n    { 3238, 0x000000009E3779B1ULL, 0x8DF2FFDCA3860F0CULL }, /* XSUM_XXH64_testdata[6477] */\n    { 3239, 0x0000000000000000ULL, 0xF22134607E8DAE65ULL }, /* XSUM_XXH64_testdata[6478] */\n    { 3239, 0x000000009E3779B1ULL, 0x0FAEEE1346B58FA3ULL }, /* XSUM_XXH64_testdata[6479] */\n    { 3240, 0x0000000000000000ULL, 0xB47AA3B7D8FF0B74ULL }, /* XSUM_XXH64_testdata[6480] */\n    { 3240, 0x000000009E3779B1ULL, 0x880B20CBC92AB7DCULL }, /* XSUM_XXH64_testdata[6481] */\n    { 3241, 0x0000000000000000ULL, 0x7DF5CAE541E8C54FULL }, /* XSUM_XXH64_testdata[6482] */\n    { 3241, 0x000000009E3779B1ULL, 0xE5B78D4CDC79D758ULL }, /* XSUM_XXH64_testdata[6483] */\n    { 3242, 0x0000000000000000ULL, 0x3139481AB3D50A94ULL }, /* XSUM_XXH64_testdata[6484] */\n    { 3242, 0x000000009E3779B1ULL, 0xA1283366009D866EULL }, /* XSUM_XXH64_testdata[6485] */\n    { 3243, 0x0000000000000000ULL, 0x247E9925BCAC1D74ULL }, /* XSUM_XXH64_testdata[6486] */\n    { 3243, 0x000000009E3779B1ULL, 0x6A2A54E6CCE14669ULL }, /* XSUM_XXH64_testdata[6487] */\n    { 3244, 0x0000000000000000ULL, 0x9031722355C66B90ULL }, /* XSUM_XXH64_testdata[6488] */\n    { 3244, 0x000000009E3779B1ULL, 0x1DE17031419FB764ULL }, /* XSUM_XXH64_testdata[6489] */\n    { 3245, 0x0000000000000000ULL, 0x5235D947018B203AULL }, /* XSUM_XXH64_testdata[6490] */\n    { 3245, 0x000000009E3779B1ULL, 0x94BEE2ED38E858E6ULL }, /* XSUM_XXH64_testdata[6491] */\n    { 3246, 0x0000000000000000ULL, 0x779C5AB5C945411DULL }, /* XSUM_XXH64_testdata[6492] */\n    { 3246, 0x000000009E3779B1ULL, 0x45A7DF84A8FD3248ULL }, /* XSUM_XXH64_testdata[6493] */\n    { 3247, 0x0000000000000000ULL, 0xC4BDA5A8FAE0666EULL }, /* XSUM_XXH64_testdata[6494] */\n    { 3247, 0x000000009E3779B1ULL, 0xAEADC2DFC8235746ULL }, /* XSUM_XXH64_testdata[6495] */\n    { 3248, 0x0000000000000000ULL, 0x5304D05DDEA300F5ULL }, /* XSUM_XXH64_testdata[6496] */\n    { 3248, 0x000000009E3779B1ULL, 0x88B1008717F0B41FULL }, /* XSUM_XXH64_testdata[6497] */\n    { 3249, 0x0000000000000000ULL, 0xED11EBEFC2D9EDDBULL }, /* XSUM_XXH64_testdata[6498] */\n    { 3249, 0x000000009E3779B1ULL, 0xAA18358C0C95E321ULL }, /* XSUM_XXH64_testdata[6499] */\n    { 3250, 0x0000000000000000ULL, 0x636EE6D9306438B3ULL }, /* XSUM_XXH64_testdata[6500] */\n    { 3250, 0x000000009E3779B1ULL, 0xF8FDD325E12A8372ULL }, /* XSUM_XXH64_testdata[6501] */\n    { 3251, 0x0000000000000000ULL, 0x1BD2B12643ABAD80ULL }, /* XSUM_XXH64_testdata[6502] */\n    { 3251, 0x000000009E3779B1ULL, 0xB7B3515131754B6BULL }, /* XSUM_XXH64_testdata[6503] */\n    { 3252, 0x0000000000000000ULL, 0x2E90B07B2DDBD29AULL }, /* XSUM_XXH64_testdata[6504] */\n    { 3252, 0x000000009E3779B1ULL, 0xB594DCD05A3982E2ULL }, /* XSUM_XXH64_testdata[6505] */\n    { 3253, 0x0000000000000000ULL, 0x87296063C0C7055CULL }, /* XSUM_XXH64_testdata[6506] */\n    { 3253, 0x000000009E3779B1ULL, 0xD346D5326F523E86ULL }, /* XSUM_XXH64_testdata[6507] */\n    { 3254, 0x0000000000000000ULL, 0x99A1C8393628EDC7ULL }, /* XSUM_XXH64_testdata[6508] */\n    { 3254, 0x000000009E3779B1ULL, 0x3132FD0A559A713DULL }, /* XSUM_XXH64_testdata[6509] */\n    { 3255, 0x0000000000000000ULL, 0x17E102907CBE93DDULL }, /* XSUM_XXH64_testdata[6510] */\n    { 3255, 0x000000009E3779B1ULL, 0x7642BB016DF35875ULL }, /* XSUM_XXH64_testdata[6511] */\n    { 3256, 0x0000000000000000ULL, 0x69D67C8A6CE4E3EDULL }, /* XSUM_XXH64_testdata[6512] */\n    { 3256, 0x000000009E3779B1ULL, 0x7FA66CCCBED38E6AULL }, /* XSUM_XXH64_testdata[6513] */\n    { 3257, 0x0000000000000000ULL, 0xC3EDF2F679EA0A43ULL }, /* XSUM_XXH64_testdata[6514] */\n    { 3257, 0x000000009E3779B1ULL, 0x10BA8CFB91BE0999ULL }, /* XSUM_XXH64_testdata[6515] */\n    { 3258, 0x0000000000000000ULL, 0x0B50FB381759AEDEULL }, /* XSUM_XXH64_testdata[6516] */\n    { 3258, 0x000000009E3779B1ULL, 0x3FF90173896F368DULL }, /* XSUM_XXH64_testdata[6517] */\n    { 3259, 0x0000000000000000ULL, 0x905240DA50EDB004ULL }, /* XSUM_XXH64_testdata[6518] */\n    { 3259, 0x000000009E3779B1ULL, 0xFD8CEB01ACE30553ULL }, /* XSUM_XXH64_testdata[6519] */\n    { 3260, 0x0000000000000000ULL, 0x207363776314F104ULL }, /* XSUM_XXH64_testdata[6520] */\n    { 3260, 0x000000009E3779B1ULL, 0x67442103D458212EULL }, /* XSUM_XXH64_testdata[6521] */\n    { 3261, 0x0000000000000000ULL, 0xE96F33D8473F1481ULL }, /* XSUM_XXH64_testdata[6522] */\n    { 3261, 0x000000009E3779B1ULL, 0x0878957EE5C20FFCULL }, /* XSUM_XXH64_testdata[6523] */\n    { 3262, 0x0000000000000000ULL, 0x7BAEABF33DD99F5BULL }, /* XSUM_XXH64_testdata[6524] */\n    { 3262, 0x000000009E3779B1ULL, 0x59B33100E737EE9EULL }, /* XSUM_XXH64_testdata[6525] */\n    { 3263, 0x0000000000000000ULL, 0x1C77E95F0EA6EFBFULL }, /* XSUM_XXH64_testdata[6526] */\n    { 3263, 0x000000009E3779B1ULL, 0x12D0B4B4EBAD9AB4ULL }, /* XSUM_XXH64_testdata[6527] */\n    { 3264, 0x0000000000000000ULL, 0x3BA865D469BBF635ULL }, /* XSUM_XXH64_testdata[6528] */\n    { 3264, 0x000000009E3779B1ULL, 0x12ACC8220FCDB48FULL }, /* XSUM_XXH64_testdata[6529] */\n    { 3265, 0x0000000000000000ULL, 0x5E090C280875A447ULL }, /* XSUM_XXH64_testdata[6530] */\n    { 3265, 0x000000009E3779B1ULL, 0xA5B398217C1E3085ULL }, /* XSUM_XXH64_testdata[6531] */\n    { 3266, 0x0000000000000000ULL, 0x5B179D9379588995ULL }, /* XSUM_XXH64_testdata[6532] */\n    { 3266, 0x000000009E3779B1ULL, 0x4B9199C898393895ULL }, /* XSUM_XXH64_testdata[6533] */\n    { 3267, 0x0000000000000000ULL, 0xCCBBC80D6868E4EBULL }, /* XSUM_XXH64_testdata[6534] */\n    { 3267, 0x000000009E3779B1ULL, 0x99ABF4FCCD6BD1BEULL }, /* XSUM_XXH64_testdata[6535] */\n    { 3268, 0x0000000000000000ULL, 0x063A1936C60C28E8ULL }, /* XSUM_XXH64_testdata[6536] */\n    { 3268, 0x000000009E3779B1ULL, 0xAA4C849E33DD926EULL }, /* XSUM_XXH64_testdata[6537] */\n    { 3269, 0x0000000000000000ULL, 0x3FE9EB0BDB571405ULL }, /* XSUM_XXH64_testdata[6538] */\n    { 3269, 0x000000009E3779B1ULL, 0x4031F97E083D2AD3ULL }, /* XSUM_XXH64_testdata[6539] */\n    { 3270, 0x0000000000000000ULL, 0xA8E2323166B4977DULL }, /* XSUM_XXH64_testdata[6540] */\n    { 3270, 0x000000009E3779B1ULL, 0xE3DD0E61FA29FD57ULL }, /* XSUM_XXH64_testdata[6541] */\n    { 3271, 0x0000000000000000ULL, 0xE8708952573DBC9AULL }, /* XSUM_XXH64_testdata[6542] */\n    { 3271, 0x000000009E3779B1ULL, 0x70BDCF6A0A1D8AC5ULL }, /* XSUM_XXH64_testdata[6543] */\n    { 3272, 0x0000000000000000ULL, 0xD9BF8A25EE08F32DULL }, /* XSUM_XXH64_testdata[6544] */\n    { 3272, 0x000000009E3779B1ULL, 0xC7FD7D7B3D4EC92AULL }, /* XSUM_XXH64_testdata[6545] */\n    { 3273, 0x0000000000000000ULL, 0x22AE6FD0F2EC0CD2ULL }, /* XSUM_XXH64_testdata[6546] */\n    { 3273, 0x000000009E3779B1ULL, 0xA03E39B776AC4F94ULL }, /* XSUM_XXH64_testdata[6547] */\n    { 3274, 0x0000000000000000ULL, 0x702D000812A5247DULL }, /* XSUM_XXH64_testdata[6548] */\n    { 3274, 0x000000009E3779B1ULL, 0x6A5FE1E64310D98EULL }, /* XSUM_XXH64_testdata[6549] */\n    { 3275, 0x0000000000000000ULL, 0xD03E4FD07C387E9CULL }, /* XSUM_XXH64_testdata[6550] */\n    { 3275, 0x000000009E3779B1ULL, 0x43E7EC29BB7ADDD1ULL }, /* XSUM_XXH64_testdata[6551] */\n    { 3276, 0x0000000000000000ULL, 0x7B0C236B953D1AE8ULL }, /* XSUM_XXH64_testdata[6552] */\n    { 3276, 0x000000009E3779B1ULL, 0x800E954EF8041EFEULL }, /* XSUM_XXH64_testdata[6553] */\n    { 3277, 0x0000000000000000ULL, 0x9BFC5DE4C8C53D3CULL }, /* XSUM_XXH64_testdata[6554] */\n    { 3277, 0x000000009E3779B1ULL, 0x5D7FD251302E05D2ULL }, /* XSUM_XXH64_testdata[6555] */\n    { 3278, 0x0000000000000000ULL, 0x47853482464F6FD0ULL }, /* XSUM_XXH64_testdata[6556] */\n    { 3278, 0x000000009E3779B1ULL, 0xA8FA5899392321BBULL }, /* XSUM_XXH64_testdata[6557] */\n    { 3279, 0x0000000000000000ULL, 0x265DC7775594F0DFULL }, /* XSUM_XXH64_testdata[6558] */\n    { 3279, 0x000000009E3779B1ULL, 0x95395D304C1BD7DCULL }, /* XSUM_XXH64_testdata[6559] */\n    { 3280, 0x0000000000000000ULL, 0x000A39EDE914E35BULL }, /* XSUM_XXH64_testdata[6560] */\n    { 3280, 0x000000009E3779B1ULL, 0xA71B763944C876D5ULL }, /* XSUM_XXH64_testdata[6561] */\n    { 3281, 0x0000000000000000ULL, 0xDE8C3F1D5FEEDE96ULL }, /* XSUM_XXH64_testdata[6562] */\n    { 3281, 0x000000009E3779B1ULL, 0x5F1BAFDC88CCE2A3ULL }, /* XSUM_XXH64_testdata[6563] */\n    { 3282, 0x0000000000000000ULL, 0x85605BE23C01DEF6ULL }, /* XSUM_XXH64_testdata[6564] */\n    { 3282, 0x000000009E3779B1ULL, 0x359D7F0F5DE017AAULL }, /* XSUM_XXH64_testdata[6565] */\n    { 3283, 0x0000000000000000ULL, 0xE4E741C950DF82A6ULL }, /* XSUM_XXH64_testdata[6566] */\n    { 3283, 0x000000009E3779B1ULL, 0xEC6115159CFA3163ULL }, /* XSUM_XXH64_testdata[6567] */\n    { 3284, 0x0000000000000000ULL, 0xA788B04FC8732046ULL }, /* XSUM_XXH64_testdata[6568] */\n    { 3284, 0x000000009E3779B1ULL, 0x8827A71F6B396D78ULL }, /* XSUM_XXH64_testdata[6569] */\n    { 3285, 0x0000000000000000ULL, 0xEA122D7047D41305ULL }, /* XSUM_XXH64_testdata[6570] */\n    { 3285, 0x000000009E3779B1ULL, 0x995DB93FEE2AF5F0ULL }, /* XSUM_XXH64_testdata[6571] */\n    { 3286, 0x0000000000000000ULL, 0x4134CBCE5D8DA221ULL }, /* XSUM_XXH64_testdata[6572] */\n    { 3286, 0x000000009E3779B1ULL, 0x9CDE5B8518A90B39ULL }, /* XSUM_XXH64_testdata[6573] */\n    { 3287, 0x0000000000000000ULL, 0x44BC1A55CB82E44EULL }, /* XSUM_XXH64_testdata[6574] */\n    { 3287, 0x000000009E3779B1ULL, 0x8ED26E68A5E37466ULL }, /* XSUM_XXH64_testdata[6575] */\n    { 3288, 0x0000000000000000ULL, 0x69CAECDEB9900C07ULL }, /* XSUM_XXH64_testdata[6576] */\n    { 3288, 0x000000009E3779B1ULL, 0xC770A6347377DFACULL }, /* XSUM_XXH64_testdata[6577] */\n    { 3289, 0x0000000000000000ULL, 0xC8CA57DD95D9CDBDULL }, /* XSUM_XXH64_testdata[6578] */\n    { 3289, 0x000000009E3779B1ULL, 0xC8B0C0878989784CULL }, /* XSUM_XXH64_testdata[6579] */\n    { 3290, 0x0000000000000000ULL, 0x367C53C330335FEBULL }, /* XSUM_XXH64_testdata[6580] */\n    { 3290, 0x000000009E3779B1ULL, 0x64F0F37350EA76A8ULL }, /* XSUM_XXH64_testdata[6581] */\n    { 3291, 0x0000000000000000ULL, 0x0AFCE12F22B424DEULL }, /* XSUM_XXH64_testdata[6582] */\n    { 3291, 0x000000009E3779B1ULL, 0x04DBC72F67458FE0ULL }, /* XSUM_XXH64_testdata[6583] */\n    { 3292, 0x0000000000000000ULL, 0xF64A7A867A98E9F9ULL }, /* XSUM_XXH64_testdata[6584] */\n    { 3292, 0x000000009E3779B1ULL, 0x97C531798FD3F227ULL }, /* XSUM_XXH64_testdata[6585] */\n    { 3293, 0x0000000000000000ULL, 0x001823D97F29828CULL }, /* XSUM_XXH64_testdata[6586] */\n    { 3293, 0x000000009E3779B1ULL, 0x6320E45E4ACD6374ULL }, /* XSUM_XXH64_testdata[6587] */\n    { 3294, 0x0000000000000000ULL, 0x56F5093D4E9ADDCCULL }, /* XSUM_XXH64_testdata[6588] */\n    { 3294, 0x000000009E3779B1ULL, 0x4F7370FEF270D861ULL }, /* XSUM_XXH64_testdata[6589] */\n    { 3295, 0x0000000000000000ULL, 0xDEFB12178556B9D0ULL }, /* XSUM_XXH64_testdata[6590] */\n    { 3295, 0x000000009E3779B1ULL, 0xE0872B428B3F3511ULL }, /* XSUM_XXH64_testdata[6591] */\n    { 3296, 0x0000000000000000ULL, 0x71950EE24ADC08A2ULL }, /* XSUM_XXH64_testdata[6592] */\n    { 3296, 0x000000009E3779B1ULL, 0x9878811F6E956E51ULL }, /* XSUM_XXH64_testdata[6593] */\n    { 3297, 0x0000000000000000ULL, 0x3067897063688C2FULL }, /* XSUM_XXH64_testdata[6594] */\n    { 3297, 0x000000009E3779B1ULL, 0x4EC4510716E61EB5ULL }, /* XSUM_XXH64_testdata[6595] */\n    { 3298, 0x0000000000000000ULL, 0xC4D09DE8C0BABD8BULL }, /* XSUM_XXH64_testdata[6596] */\n    { 3298, 0x000000009E3779B1ULL, 0xC294F8F677E3DE51ULL }, /* XSUM_XXH64_testdata[6597] */\n    { 3299, 0x0000000000000000ULL, 0xB52D718B0FFA529AULL }, /* XSUM_XXH64_testdata[6598] */\n    { 3299, 0x000000009E3779B1ULL, 0xD34A3C9409623773ULL }, /* XSUM_XXH64_testdata[6599] */\n    { 3300, 0x0000000000000000ULL, 0xF64B51195E194D98ULL }, /* XSUM_XXH64_testdata[6600] */\n    { 3300, 0x000000009E3779B1ULL, 0x56AB9D28B0FC79C1ULL }, /* XSUM_XXH64_testdata[6601] */\n    { 3301, 0x0000000000000000ULL, 0xE4F463E14A54FCA6ULL }, /* XSUM_XXH64_testdata[6602] */\n    { 3301, 0x000000009E3779B1ULL, 0x0963595DC8D2AA0CULL }, /* XSUM_XXH64_testdata[6603] */\n    { 3302, 0x0000000000000000ULL, 0x37C41D859E8CD3AAULL }, /* XSUM_XXH64_testdata[6604] */\n    { 3302, 0x000000009E3779B1ULL, 0x730AB5C3DDEA01A8ULL }, /* XSUM_XXH64_testdata[6605] */\n    { 3303, 0x0000000000000000ULL, 0xEEDD276D00D5167FULL }, /* XSUM_XXH64_testdata[6606] */\n    { 3303, 0x000000009E3779B1ULL, 0xAC63FB1DB2B20E79ULL }, /* XSUM_XXH64_testdata[6607] */\n    { 3304, 0x0000000000000000ULL, 0xC8FE8933C9B954FCULL }, /* XSUM_XXH64_testdata[6608] */\n    { 3304, 0x000000009E3779B1ULL, 0x81FD7B0870FD909FULL }, /* XSUM_XXH64_testdata[6609] */\n    { 3305, 0x0000000000000000ULL, 0x06FD829F51EADB1AULL }, /* XSUM_XXH64_testdata[6610] */\n    { 3305, 0x000000009E3779B1ULL, 0x980BB7A2F3A3A3F6ULL }, /* XSUM_XXH64_testdata[6611] */\n    { 3306, 0x0000000000000000ULL, 0xB0930EEBA336004AULL }, /* XSUM_XXH64_testdata[6612] */\n    { 3306, 0x000000009E3779B1ULL, 0xC1EF9F21B1E60858ULL }, /* XSUM_XXH64_testdata[6613] */\n    { 3307, 0x0000000000000000ULL, 0x97983C34EF0D589EULL }, /* XSUM_XXH64_testdata[6614] */\n    { 3307, 0x000000009E3779B1ULL, 0x8EBB5A5CB9BCE3E2ULL }, /* XSUM_XXH64_testdata[6615] */\n    { 3308, 0x0000000000000000ULL, 0x47D416E52FC13654ULL }, /* XSUM_XXH64_testdata[6616] */\n    { 3308, 0x000000009E3779B1ULL, 0x4158AA0B0C592D08ULL }, /* XSUM_XXH64_testdata[6617] */\n    { 3309, 0x0000000000000000ULL, 0x09CE63E6633E343CULL }, /* XSUM_XXH64_testdata[6618] */\n    { 3309, 0x000000009E3779B1ULL, 0xCB313E4075931542ULL }, /* XSUM_XXH64_testdata[6619] */\n    { 3310, 0x0000000000000000ULL, 0x9EF3044DB34F0FE3ULL }, /* XSUM_XXH64_testdata[6620] */\n    { 3310, 0x000000009E3779B1ULL, 0x05ADFD1156A3C785ULL }, /* XSUM_XXH64_testdata[6621] */\n    { 3311, 0x0000000000000000ULL, 0xE367603EAFE0E290ULL }, /* XSUM_XXH64_testdata[6622] */\n    { 3311, 0x000000009E3779B1ULL, 0x9E07F0C875EC98BDULL }, /* XSUM_XXH64_testdata[6623] */\n    { 3312, 0x0000000000000000ULL, 0x90DE0FAE175E060DULL }, /* XSUM_XXH64_testdata[6624] */\n    { 3312, 0x000000009E3779B1ULL, 0x847B97F5F2DCB059ULL }, /* XSUM_XXH64_testdata[6625] */\n    { 3313, 0x0000000000000000ULL, 0x9A347C9BB7ECEA8EULL }, /* XSUM_XXH64_testdata[6626] */\n    { 3313, 0x000000009E3779B1ULL, 0x8810FCA8D8BC4EDEULL }, /* XSUM_XXH64_testdata[6627] */\n    { 3314, 0x0000000000000000ULL, 0x84C7C248DC0501C4ULL }, /* XSUM_XXH64_testdata[6628] */\n    { 3314, 0x000000009E3779B1ULL, 0xC605EC6CC657BD46ULL }, /* XSUM_XXH64_testdata[6629] */\n    { 3315, 0x0000000000000000ULL, 0x432D797192AF7E2DULL }, /* XSUM_XXH64_testdata[6630] */\n    { 3315, 0x000000009E3779B1ULL, 0xBFECC75BEE01F9A1ULL }, /* XSUM_XXH64_testdata[6631] */\n    { 3316, 0x0000000000000000ULL, 0xC472BDF12815D499ULL }, /* XSUM_XXH64_testdata[6632] */\n    { 3316, 0x000000009E3779B1ULL, 0xC1630931D58F442EULL }, /* XSUM_XXH64_testdata[6633] */\n    { 3317, 0x0000000000000000ULL, 0xDD543610CFC183EAULL }, /* XSUM_XXH64_testdata[6634] */\n    { 3317, 0x000000009E3779B1ULL, 0x7DD49D637B2F723CULL }, /* XSUM_XXH64_testdata[6635] */\n    { 3318, 0x0000000000000000ULL, 0xA708B98E5F38A4DEULL }, /* XSUM_XXH64_testdata[6636] */\n    { 3318, 0x000000009E3779B1ULL, 0xFC9136F9A5D4741BULL }, /* XSUM_XXH64_testdata[6637] */\n    { 3319, 0x0000000000000000ULL, 0x1B87CC060C9C05FCULL }, /* XSUM_XXH64_testdata[6638] */\n    { 3319, 0x000000009E3779B1ULL, 0xC227B865D6587030ULL }, /* XSUM_XXH64_testdata[6639] */\n    { 3320, 0x0000000000000000ULL, 0xCB6A480877EC4684ULL }, /* XSUM_XXH64_testdata[6640] */\n    { 3320, 0x000000009E3779B1ULL, 0xE715AA953B2CC6A3ULL }, /* XSUM_XXH64_testdata[6641] */\n    { 3321, 0x0000000000000000ULL, 0x07F1FD053AD4D34FULL }, /* XSUM_XXH64_testdata[6642] */\n    { 3321, 0x000000009E3779B1ULL, 0x143AE1264EFFB926ULL }, /* XSUM_XXH64_testdata[6643] */\n    { 3322, 0x0000000000000000ULL, 0x9051839DE97E9B9AULL }, /* XSUM_XXH64_testdata[6644] */\n    { 3322, 0x000000009E3779B1ULL, 0x7432D9F895B4F72FULL }, /* XSUM_XXH64_testdata[6645] */\n    { 3323, 0x0000000000000000ULL, 0x7C8020028CA340D0ULL }, /* XSUM_XXH64_testdata[6646] */\n    { 3323, 0x000000009E3779B1ULL, 0x6DE020F560D0609CULL }, /* XSUM_XXH64_testdata[6647] */\n    { 3324, 0x0000000000000000ULL, 0x28BAE4C5614EAB02ULL }, /* XSUM_XXH64_testdata[6648] */\n    { 3324, 0x000000009E3779B1ULL, 0xF338842A99280EABULL }, /* XSUM_XXH64_testdata[6649] */\n    { 3325, 0x0000000000000000ULL, 0x04E5670188568DDAULL }, /* XSUM_XXH64_testdata[6650] */\n    { 3325, 0x000000009E3779B1ULL, 0x8896ED9A8DF6F6D4ULL }, /* XSUM_XXH64_testdata[6651] */\n    { 3326, 0x0000000000000000ULL, 0x168337D48FF6193BULL }, /* XSUM_XXH64_testdata[6652] */\n    { 3326, 0x000000009E3779B1ULL, 0xB54C0196963577FCULL }, /* XSUM_XXH64_testdata[6653] */\n    { 3327, 0x0000000000000000ULL, 0xC7E5E034EB61C293ULL }, /* XSUM_XXH64_testdata[6654] */\n    { 3327, 0x000000009E3779B1ULL, 0x11D34C4118E49E20ULL }, /* XSUM_XXH64_testdata[6655] */\n    { 3328, 0x0000000000000000ULL, 0x8710D5007806F873ULL }, /* XSUM_XXH64_testdata[6656] */\n    { 3328, 0x000000009E3779B1ULL, 0x5E2D07B517F0362DULL }, /* XSUM_XXH64_testdata[6657] */\n    { 3329, 0x0000000000000000ULL, 0x0D399DBB05E6E702ULL }, /* XSUM_XXH64_testdata[6658] */\n    { 3329, 0x000000009E3779B1ULL, 0x19F101651E1650BBULL }, /* XSUM_XXH64_testdata[6659] */\n    { 3330, 0x0000000000000000ULL, 0xAF83DE43B25A47CDULL }, /* XSUM_XXH64_testdata[6660] */\n    { 3330, 0x000000009E3779B1ULL, 0xF871A30D77349F2FULL }, /* XSUM_XXH64_testdata[6661] */\n    { 3331, 0x0000000000000000ULL, 0x02476DC09836068AULL }, /* XSUM_XXH64_testdata[6662] */\n    { 3331, 0x000000009E3779B1ULL, 0xF6C6DCFC220266FEULL }, /* XSUM_XXH64_testdata[6663] */\n    { 3332, 0x0000000000000000ULL, 0x7F77D4917AC51280ULL }, /* XSUM_XXH64_testdata[6664] */\n    { 3332, 0x000000009E3779B1ULL, 0x43C37FE334C61654ULL }, /* XSUM_XXH64_testdata[6665] */\n    { 3333, 0x0000000000000000ULL, 0xFAC72363B506C69CULL }, /* XSUM_XXH64_testdata[6666] */\n    { 3333, 0x000000009E3779B1ULL, 0x5F4E679800DA2137ULL }, /* XSUM_XXH64_testdata[6667] */\n    { 3334, 0x0000000000000000ULL, 0xC7D80BDE9AA3C3DFULL }, /* XSUM_XXH64_testdata[6668] */\n    { 3334, 0x000000009E3779B1ULL, 0x9A04484FCEC73E9DULL }, /* XSUM_XXH64_testdata[6669] */\n    { 3335, 0x0000000000000000ULL, 0x60921BD7A69C0307ULL }, /* XSUM_XXH64_testdata[6670] */\n    { 3335, 0x000000009E3779B1ULL, 0x9873A3E893927B2DULL }, /* XSUM_XXH64_testdata[6671] */\n    { 3336, 0x0000000000000000ULL, 0xEB02A1D4E569CAEEULL }, /* XSUM_XXH64_testdata[6672] */\n    { 3336, 0x000000009E3779B1ULL, 0x9EA84F26D8585A52ULL }, /* XSUM_XXH64_testdata[6673] */\n    { 3337, 0x0000000000000000ULL, 0x47EF296FD060389EULL }, /* XSUM_XXH64_testdata[6674] */\n    { 3337, 0x000000009E3779B1ULL, 0x600BDCD5ADCC286AULL }, /* XSUM_XXH64_testdata[6675] */\n    { 3338, 0x0000000000000000ULL, 0x16C1FA830D7844E6ULL }, /* XSUM_XXH64_testdata[6676] */\n    { 3338, 0x000000009E3779B1ULL, 0x7E92621EBB2C2B59ULL }, /* XSUM_XXH64_testdata[6677] */\n    { 3339, 0x0000000000000000ULL, 0x75F35C0BD723E5CFULL }, /* XSUM_XXH64_testdata[6678] */\n    { 3339, 0x000000009E3779B1ULL, 0xB918BE49C7964C7FULL }, /* XSUM_XXH64_testdata[6679] */\n    { 3340, 0x0000000000000000ULL, 0x311D3FC9E024D0C6ULL }, /* XSUM_XXH64_testdata[6680] */\n    { 3340, 0x000000009E3779B1ULL, 0xE994E30D6EE2307EULL }, /* XSUM_XXH64_testdata[6681] */\n    { 3341, 0x0000000000000000ULL, 0xE182DB1D31D53193ULL }, /* XSUM_XXH64_testdata[6682] */\n    { 3341, 0x000000009E3779B1ULL, 0x8520D4A50292E3A9ULL }, /* XSUM_XXH64_testdata[6683] */\n    { 3342, 0x0000000000000000ULL, 0x4F58BEA27AD13F99ULL }, /* XSUM_XXH64_testdata[6684] */\n    { 3342, 0x000000009E3779B1ULL, 0xDE756B04CAFBBA57ULL }, /* XSUM_XXH64_testdata[6685] */\n    { 3343, 0x0000000000000000ULL, 0xD6ABD0BD0FF9757AULL }, /* XSUM_XXH64_testdata[6686] */\n    { 3343, 0x000000009E3779B1ULL, 0x2A71E994B10E9A95ULL }, /* XSUM_XXH64_testdata[6687] */\n    { 3344, 0x0000000000000000ULL, 0x15480D9E5CCE8AE4ULL }, /* XSUM_XXH64_testdata[6688] */\n    { 3344, 0x000000009E3779B1ULL, 0x0280C626E780A84AULL }, /* XSUM_XXH64_testdata[6689] */\n    { 3345, 0x0000000000000000ULL, 0x426727E79FFAB1FAULL }, /* XSUM_XXH64_testdata[6690] */\n    { 3345, 0x000000009E3779B1ULL, 0xFE1B09D7CECB37E5ULL }, /* XSUM_XXH64_testdata[6691] */\n    { 3346, 0x0000000000000000ULL, 0xFE47F585738F1B3BULL }, /* XSUM_XXH64_testdata[6692] */\n    { 3346, 0x000000009E3779B1ULL, 0x07B6A852428540B1ULL }, /* XSUM_XXH64_testdata[6693] */\n    { 3347, 0x0000000000000000ULL, 0x1F838FBBA71E1CFCULL }, /* XSUM_XXH64_testdata[6694] */\n    { 3347, 0x000000009E3779B1ULL, 0x1D54EE18473C7455ULL }, /* XSUM_XXH64_testdata[6695] */\n    { 3348, 0x0000000000000000ULL, 0xDD20427217BB132CULL }, /* XSUM_XXH64_testdata[6696] */\n    { 3348, 0x000000009E3779B1ULL, 0xAD0294006CE00001ULL }, /* XSUM_XXH64_testdata[6697] */\n    { 3349, 0x0000000000000000ULL, 0x0DFB26A85C88EBFBULL }, /* XSUM_XXH64_testdata[6698] */\n    { 3349, 0x000000009E3779B1ULL, 0xB09DF1A1562C743BULL }, /* XSUM_XXH64_testdata[6699] */\n    { 3350, 0x0000000000000000ULL, 0x9B9EB2E0C44E15D9ULL }, /* XSUM_XXH64_testdata[6700] */\n    { 3350, 0x000000009E3779B1ULL, 0x4BE4A9EE1D7D7341ULL }, /* XSUM_XXH64_testdata[6701] */\n    { 3351, 0x0000000000000000ULL, 0x1087F88E60253CACULL }, /* XSUM_XXH64_testdata[6702] */\n    { 3351, 0x000000009E3779B1ULL, 0x8F9B7E6ED17DAC9EULL }, /* XSUM_XXH64_testdata[6703] */\n    { 3352, 0x0000000000000000ULL, 0x7F08F9773BC2D826ULL }, /* XSUM_XXH64_testdata[6704] */\n    { 3352, 0x000000009E3779B1ULL, 0xB22C1D997C380393ULL }, /* XSUM_XXH64_testdata[6705] */\n    { 3353, 0x0000000000000000ULL, 0x38557140168F9851ULL }, /* XSUM_XXH64_testdata[6706] */\n    { 3353, 0x000000009E3779B1ULL, 0x1F9BFFEBF835FA22ULL }, /* XSUM_XXH64_testdata[6707] */\n    { 3354, 0x0000000000000000ULL, 0x0F19C77891CECF19ULL }, /* XSUM_XXH64_testdata[6708] */\n    { 3354, 0x000000009E3779B1ULL, 0x61751AC454DF5DE3ULL }, /* XSUM_XXH64_testdata[6709] */\n    { 3355, 0x0000000000000000ULL, 0xF307A33B8636A755ULL }, /* XSUM_XXH64_testdata[6710] */\n    { 3355, 0x000000009E3779B1ULL, 0x23C0DDB18D792125ULL }, /* XSUM_XXH64_testdata[6711] */\n    { 3356, 0x0000000000000000ULL, 0x7A2E68AAB006317BULL }, /* XSUM_XXH64_testdata[6712] */\n    { 3356, 0x000000009E3779B1ULL, 0x458D71CDCE30E683ULL }, /* XSUM_XXH64_testdata[6713] */\n    { 3357, 0x0000000000000000ULL, 0xC7E2BA47F101F87EULL }, /* XSUM_XXH64_testdata[6714] */\n    { 3357, 0x000000009E3779B1ULL, 0x0127D490A06FADD0ULL }, /* XSUM_XXH64_testdata[6715] */\n    { 3358, 0x0000000000000000ULL, 0x4AE3F216D3E09927ULL }, /* XSUM_XXH64_testdata[6716] */\n    { 3358, 0x000000009E3779B1ULL, 0x77E4309A4D544D52ULL }, /* XSUM_XXH64_testdata[6717] */\n    { 3359, 0x0000000000000000ULL, 0xBCD6624F1BD5555CULL }, /* XSUM_XXH64_testdata[6718] */\n    { 3359, 0x000000009E3779B1ULL, 0x00FF3B842694F236ULL }, /* XSUM_XXH64_testdata[6719] */\n    { 3360, 0x0000000000000000ULL, 0x542E85D99F08EE48ULL }, /* XSUM_XXH64_testdata[6720] */\n    { 3360, 0x000000009E3779B1ULL, 0x2EE194644F0735C0ULL }, /* XSUM_XXH64_testdata[6721] */\n    { 3361, 0x0000000000000000ULL, 0x22211C11AF6993ADULL }, /* XSUM_XXH64_testdata[6722] */\n    { 3361, 0x000000009E3779B1ULL, 0xF4FB4475CCAC32EBULL }, /* XSUM_XXH64_testdata[6723] */\n    { 3362, 0x0000000000000000ULL, 0x8041F1A9CD36C590ULL }, /* XSUM_XXH64_testdata[6724] */\n    { 3362, 0x000000009E3779B1ULL, 0x905ADB5A33517F2AULL }, /* XSUM_XXH64_testdata[6725] */\n    { 3363, 0x0000000000000000ULL, 0xB203F987C8C409D7ULL }, /* XSUM_XXH64_testdata[6726] */\n    { 3363, 0x000000009E3779B1ULL, 0xA849CED180FD66A9ULL }, /* XSUM_XXH64_testdata[6727] */\n    { 3364, 0x0000000000000000ULL, 0x38CA393534072EE5ULL }, /* XSUM_XXH64_testdata[6728] */\n    { 3364, 0x000000009E3779B1ULL, 0x1A3C8C340AA1E0B3ULL }, /* XSUM_XXH64_testdata[6729] */\n    { 3365, 0x0000000000000000ULL, 0xA4A47B4ADF87F577ULL }, /* XSUM_XXH64_testdata[6730] */\n    { 3365, 0x000000009E3779B1ULL, 0x47C6E221DCED0B3BULL }, /* XSUM_XXH64_testdata[6731] */\n    { 3366, 0x0000000000000000ULL, 0x7E9DB5F33133F6CCULL }, /* XSUM_XXH64_testdata[6732] */\n    { 3366, 0x000000009E3779B1ULL, 0x16D39A05FBA9A75BULL }, /* XSUM_XXH64_testdata[6733] */\n    { 3367, 0x0000000000000000ULL, 0x9828B35836CC58DFULL }, /* XSUM_XXH64_testdata[6734] */\n    { 3367, 0x000000009E3779B1ULL, 0x670D2D0343D11DF1ULL }, /* XSUM_XXH64_testdata[6735] */\n    { 3368, 0x0000000000000000ULL, 0x81BDD4AC21E21226ULL }, /* XSUM_XXH64_testdata[6736] */\n    { 3368, 0x000000009E3779B1ULL, 0xB4F033B5F2B00B48ULL }, /* XSUM_XXH64_testdata[6737] */\n    { 3369, 0x0000000000000000ULL, 0x09DEEC88D28A1398ULL }, /* XSUM_XXH64_testdata[6738] */\n    { 3369, 0x000000009E3779B1ULL, 0x1E26078DEAC57745ULL }, /* XSUM_XXH64_testdata[6739] */\n    { 3370, 0x0000000000000000ULL, 0x30C74C02ACDC8B33ULL }, /* XSUM_XXH64_testdata[6740] */\n    { 3370, 0x000000009E3779B1ULL, 0x3AA94A5BCDD76807ULL }, /* XSUM_XXH64_testdata[6741] */\n    { 3371, 0x0000000000000000ULL, 0x98053900C9FAAA6AULL }, /* XSUM_XXH64_testdata[6742] */\n    { 3371, 0x000000009E3779B1ULL, 0x2614332CF19689E0ULL }, /* XSUM_XXH64_testdata[6743] */\n    { 3372, 0x0000000000000000ULL, 0xC987552C4554A9CFULL }, /* XSUM_XXH64_testdata[6744] */\n    { 3372, 0x000000009E3779B1ULL, 0x0E3267FEE2488D2BULL }, /* XSUM_XXH64_testdata[6745] */\n    { 3373, 0x0000000000000000ULL, 0x27CB7FACEE06BD1CULL }, /* XSUM_XXH64_testdata[6746] */\n    { 3373, 0x000000009E3779B1ULL, 0x966E73086D34244DULL }, /* XSUM_XXH64_testdata[6747] */\n    { 3374, 0x0000000000000000ULL, 0x8398E2C8F2753DABULL }, /* XSUM_XXH64_testdata[6748] */\n    { 3374, 0x000000009E3779B1ULL, 0x8F87DB90855AC39FULL }, /* XSUM_XXH64_testdata[6749] */\n    { 3375, 0x0000000000000000ULL, 0x8FD3A3ADF90AECCEULL }, /* XSUM_XXH64_testdata[6750] */\n    { 3375, 0x000000009E3779B1ULL, 0xB07007A69026B6CAULL }, /* XSUM_XXH64_testdata[6751] */\n    { 3376, 0x0000000000000000ULL, 0xF6BAC4B88EF747E2ULL }, /* XSUM_XXH64_testdata[6752] */\n    { 3376, 0x000000009E3779B1ULL, 0x5B98A7BCE2CF71B0ULL }, /* XSUM_XXH64_testdata[6753] */\n    { 3377, 0x0000000000000000ULL, 0x9B9EEDFEA84D6837ULL }, /* XSUM_XXH64_testdata[6754] */\n    { 3377, 0x000000009E3779B1ULL, 0xC0CB1FD1CA965EC5ULL }, /* XSUM_XXH64_testdata[6755] */\n    { 3378, 0x0000000000000000ULL, 0x486C9AF9C2B1CE90ULL }, /* XSUM_XXH64_testdata[6756] */\n    { 3378, 0x000000009E3779B1ULL, 0xF419C1F9E2D7DC10ULL }, /* XSUM_XXH64_testdata[6757] */\n    { 3379, 0x0000000000000000ULL, 0x7AF60C8FB8C85057ULL }, /* XSUM_XXH64_testdata[6758] */\n    { 3379, 0x000000009E3779B1ULL, 0x9A5855BED0646CF7ULL }, /* XSUM_XXH64_testdata[6759] */\n    { 3380, 0x0000000000000000ULL, 0xC67A41C5D83FF699ULL }, /* XSUM_XXH64_testdata[6760] */\n    { 3380, 0x000000009E3779B1ULL, 0xA01D548BEA3651D3ULL }, /* XSUM_XXH64_testdata[6761] */\n    { 3381, 0x0000000000000000ULL, 0x61FE1C442A24E725ULL }, /* XSUM_XXH64_testdata[6762] */\n    { 3381, 0x000000009E3779B1ULL, 0x6ABDABC14468734FULL }, /* XSUM_XXH64_testdata[6763] */\n    { 3382, 0x0000000000000000ULL, 0x990FBC0D7E4CBD9EULL }, /* XSUM_XXH64_testdata[6764] */\n    { 3382, 0x000000009E3779B1ULL, 0x6DD8CE25FE8C549EULL }, /* XSUM_XXH64_testdata[6765] */\n    { 3383, 0x0000000000000000ULL, 0xD4BCFF1D1541CD58ULL }, /* XSUM_XXH64_testdata[6766] */\n    { 3383, 0x000000009E3779B1ULL, 0xA5F466E4F3DD3C1FULL }, /* XSUM_XXH64_testdata[6767] */\n    { 3384, 0x0000000000000000ULL, 0x4ECCA29B582D1D8AULL }, /* XSUM_XXH64_testdata[6768] */\n    { 3384, 0x000000009E3779B1ULL, 0x9E5D62B90FF0A641ULL }, /* XSUM_XXH64_testdata[6769] */\n    { 3385, 0x0000000000000000ULL, 0x1D6216035764609EULL }, /* XSUM_XXH64_testdata[6770] */\n    { 3385, 0x000000009E3779B1ULL, 0x1ABAF5F745DA5C9BULL }, /* XSUM_XXH64_testdata[6771] */\n    { 3386, 0x0000000000000000ULL, 0x1E1B20F8FF3F32D8ULL }, /* XSUM_XXH64_testdata[6772] */\n    { 3386, 0x000000009E3779B1ULL, 0x8DAB51A68D3468B6ULL }, /* XSUM_XXH64_testdata[6773] */\n    { 3387, 0x0000000000000000ULL, 0x2709E4CD6135D6FCULL }, /* XSUM_XXH64_testdata[6774] */\n    { 3387, 0x000000009E3779B1ULL, 0xF4308B7E230ABBA2ULL }, /* XSUM_XXH64_testdata[6775] */\n    { 3388, 0x0000000000000000ULL, 0x0A239DB36B193344ULL }, /* XSUM_XXH64_testdata[6776] */\n    { 3388, 0x000000009E3779B1ULL, 0xA93C507116DB8272ULL }, /* XSUM_XXH64_testdata[6777] */\n    { 3389, 0x0000000000000000ULL, 0x38195E4A732E4FA3ULL }, /* XSUM_XXH64_testdata[6778] */\n    { 3389, 0x000000009E3779B1ULL, 0xDECC45B7155517F3ULL }, /* XSUM_XXH64_testdata[6779] */\n    { 3390, 0x0000000000000000ULL, 0x60BC2BE5DFF1BC62ULL }, /* XSUM_XXH64_testdata[6780] */\n    { 3390, 0x000000009E3779B1ULL, 0xF2CDBDF1BE0486A8ULL }, /* XSUM_XXH64_testdata[6781] */\n    { 3391, 0x0000000000000000ULL, 0x4FF15DC235E0577BULL }, /* XSUM_XXH64_testdata[6782] */\n    { 3391, 0x000000009E3779B1ULL, 0x5B0E412FDBA553DBULL }, /* XSUM_XXH64_testdata[6783] */\n    { 3392, 0x0000000000000000ULL, 0x6F8F3D1528BA7ECDULL }, /* XSUM_XXH64_testdata[6784] */\n    { 3392, 0x000000009E3779B1ULL, 0xC40B7E2094CA8DDCULL }, /* XSUM_XXH64_testdata[6785] */\n    { 3393, 0x0000000000000000ULL, 0xD65892882A77C97FULL }, /* XSUM_XXH64_testdata[6786] */\n    { 3393, 0x000000009E3779B1ULL, 0xB52F9CD407D28BFFULL }, /* XSUM_XXH64_testdata[6787] */\n    { 3394, 0x0000000000000000ULL, 0x75DCC4B4FF0C6300ULL }, /* XSUM_XXH64_testdata[6788] */\n    { 3394, 0x000000009E3779B1ULL, 0x94620C419E02B5CFULL }, /* XSUM_XXH64_testdata[6789] */\n    { 3395, 0x0000000000000000ULL, 0x953AE6548C75295AULL }, /* XSUM_XXH64_testdata[6790] */\n    { 3395, 0x000000009E3779B1ULL, 0x795EC3327BC0D54DULL }, /* XSUM_XXH64_testdata[6791] */\n    { 3396, 0x0000000000000000ULL, 0xE46340D055CD4645ULL }, /* XSUM_XXH64_testdata[6792] */\n    { 3396, 0x000000009E3779B1ULL, 0x73A0752800833C4FULL }, /* XSUM_XXH64_testdata[6793] */\n    { 3397, 0x0000000000000000ULL, 0x01237F81E2AAB480ULL }, /* XSUM_XXH64_testdata[6794] */\n    { 3397, 0x000000009E3779B1ULL, 0x62DC3F3B8CBB3758ULL }, /* XSUM_XXH64_testdata[6795] */\n    { 3398, 0x0000000000000000ULL, 0xD881AC282610868DULL }, /* XSUM_XXH64_testdata[6796] */\n    { 3398, 0x000000009E3779B1ULL, 0xBF13A0681EE16727ULL }, /* XSUM_XXH64_testdata[6797] */\n    { 3399, 0x0000000000000000ULL, 0xA406D1EE41D9126DULL }, /* XSUM_XXH64_testdata[6798] */\n    { 3399, 0x000000009E3779B1ULL, 0xD1BBA5CE6BE4F971ULL }, /* XSUM_XXH64_testdata[6799] */\n    { 3400, 0x0000000000000000ULL, 0xFC925D320870DE31ULL }, /* XSUM_XXH64_testdata[6800] */\n    { 3400, 0x000000009E3779B1ULL, 0x235115390916C7C7ULL }, /* XSUM_XXH64_testdata[6801] */\n    { 3401, 0x0000000000000000ULL, 0x08987536121CBDD9ULL }, /* XSUM_XXH64_testdata[6802] */\n    { 3401, 0x000000009E3779B1ULL, 0xCCBFA459F07BAA3FULL }, /* XSUM_XXH64_testdata[6803] */\n    { 3402, 0x0000000000000000ULL, 0x84911E59E091D894ULL }, /* XSUM_XXH64_testdata[6804] */\n    { 3402, 0x000000009E3779B1ULL, 0x6C4F56AE6EFC08FEULL }, /* XSUM_XXH64_testdata[6805] */\n    { 3403, 0x0000000000000000ULL, 0x786BDECE5F347EDFULL }, /* XSUM_XXH64_testdata[6806] */\n    { 3403, 0x000000009E3779B1ULL, 0x79F555476308F2DEULL }, /* XSUM_XXH64_testdata[6807] */\n    { 3404, 0x0000000000000000ULL, 0xAF58230EB9FFCD57ULL }, /* XSUM_XXH64_testdata[6808] */\n    { 3404, 0x000000009E3779B1ULL, 0x63B7DC29FEA3180FULL }, /* XSUM_XXH64_testdata[6809] */\n    { 3405, 0x0000000000000000ULL, 0x065B6D0AB02049E9ULL }, /* XSUM_XXH64_testdata[6810] */\n    { 3405, 0x000000009E3779B1ULL, 0x269FE824C2ED8F80ULL }, /* XSUM_XXH64_testdata[6811] */\n    { 3406, 0x0000000000000000ULL, 0xAAA95BF5C7C03CF3ULL }, /* XSUM_XXH64_testdata[6812] */\n    { 3406, 0x000000009E3779B1ULL, 0x79276BC84050DCD7ULL }, /* XSUM_XXH64_testdata[6813] */\n    { 3407, 0x0000000000000000ULL, 0x2250F48182E9FE9BULL }, /* XSUM_XXH64_testdata[6814] */\n    { 3407, 0x000000009E3779B1ULL, 0xC79338E441109D65ULL }, /* XSUM_XXH64_testdata[6815] */\n    { 3408, 0x0000000000000000ULL, 0x2EFDA8055A7AED01ULL }, /* XSUM_XXH64_testdata[6816] */\n    { 3408, 0x000000009E3779B1ULL, 0xA41BAD39695C4370ULL }, /* XSUM_XXH64_testdata[6817] */\n    { 3409, 0x0000000000000000ULL, 0x1CA43A5C427E98B1ULL }, /* XSUM_XXH64_testdata[6818] */\n    { 3409, 0x000000009E3779B1ULL, 0x0BD76C09547B1A22ULL }, /* XSUM_XXH64_testdata[6819] */\n    { 3410, 0x0000000000000000ULL, 0x0F07F40992270CF0ULL }, /* XSUM_XXH64_testdata[6820] */\n    { 3410, 0x000000009E3779B1ULL, 0x9FC04A6FF9492D7EULL }, /* XSUM_XXH64_testdata[6821] */\n    { 3411, 0x0000000000000000ULL, 0x08F8FDC031764035ULL }, /* XSUM_XXH64_testdata[6822] */\n    { 3411, 0x000000009E3779B1ULL, 0x2DF01822BE31F783ULL }, /* XSUM_XXH64_testdata[6823] */\n    { 3412, 0x0000000000000000ULL, 0x6F8500F14325C79DULL }, /* XSUM_XXH64_testdata[6824] */\n    { 3412, 0x000000009E3779B1ULL, 0x1384CE56A75FD120ULL }, /* XSUM_XXH64_testdata[6825] */\n    { 3413, 0x0000000000000000ULL, 0x6503C3AA31113A32ULL }, /* XSUM_XXH64_testdata[6826] */\n    { 3413, 0x000000009E3779B1ULL, 0x2BBA8AE83458982BULL }, /* XSUM_XXH64_testdata[6827] */\n    { 3414, 0x0000000000000000ULL, 0xAD1EE0FA04D1F4DBULL }, /* XSUM_XXH64_testdata[6828] */\n    { 3414, 0x000000009E3779B1ULL, 0xB053F74654E35E16ULL }, /* XSUM_XXH64_testdata[6829] */\n    { 3415, 0x0000000000000000ULL, 0x0DC39A7CDA2784CCULL }, /* XSUM_XXH64_testdata[6830] */\n    { 3415, 0x000000009E3779B1ULL, 0x2481CF673980A325ULL }, /* XSUM_XXH64_testdata[6831] */\n    { 3416, 0x0000000000000000ULL, 0xE07B93CEFA4C50ECULL }, /* XSUM_XXH64_testdata[6832] */\n    { 3416, 0x000000009E3779B1ULL, 0x8618E5C3332A0FD6ULL }, /* XSUM_XXH64_testdata[6833] */\n    { 3417, 0x0000000000000000ULL, 0x0E5E48EF223E3DFBULL }, /* XSUM_XXH64_testdata[6834] */\n    { 3417, 0x000000009E3779B1ULL, 0x46DD3DF34B1CD288ULL }, /* XSUM_XXH64_testdata[6835] */\n    { 3418, 0x0000000000000000ULL, 0x167305AD49E389CBULL }, /* XSUM_XXH64_testdata[6836] */\n    { 3418, 0x000000009E3779B1ULL, 0x432435A02C9847CDULL }, /* XSUM_XXH64_testdata[6837] */\n    { 3419, 0x0000000000000000ULL, 0xCBB8301E38157DD2ULL }, /* XSUM_XXH64_testdata[6838] */\n    { 3419, 0x000000009E3779B1ULL, 0x8163B9422D1DF6F3ULL }, /* XSUM_XXH64_testdata[6839] */\n    { 3420, 0x0000000000000000ULL, 0x23534474E375FF7EULL }, /* XSUM_XXH64_testdata[6840] */\n    { 3420, 0x000000009E3779B1ULL, 0xB843B0CCE2214807ULL }, /* XSUM_XXH64_testdata[6841] */\n    { 3421, 0x0000000000000000ULL, 0x5375130C749D4D36ULL }, /* XSUM_XXH64_testdata[6842] */\n    { 3421, 0x000000009E3779B1ULL, 0xAD7DFC6F22BC8907ULL }, /* XSUM_XXH64_testdata[6843] */\n    { 3422, 0x0000000000000000ULL, 0x035A2D01842F52ACULL }, /* XSUM_XXH64_testdata[6844] */\n    { 3422, 0x000000009E3779B1ULL, 0xB3675C7ADA974735ULL }, /* XSUM_XXH64_testdata[6845] */\n    { 3423, 0x0000000000000000ULL, 0xC139E97DFDA9AF28ULL }, /* XSUM_XXH64_testdata[6846] */\n    { 3423, 0x000000009E3779B1ULL, 0xB84A8ECA78313447ULL }, /* XSUM_XXH64_testdata[6847] */\n    { 3424, 0x0000000000000000ULL, 0xC335D57E8262ECBEULL }, /* XSUM_XXH64_testdata[6848] */\n    { 3424, 0x000000009E3779B1ULL, 0xE3CB054018F82596ULL }, /* XSUM_XXH64_testdata[6849] */\n    { 3425, 0x0000000000000000ULL, 0x939CC9D915BE8A44ULL }, /* XSUM_XXH64_testdata[6850] */\n    { 3425, 0x000000009E3779B1ULL, 0x8B6E232633409B57ULL }, /* XSUM_XXH64_testdata[6851] */\n    { 3426, 0x0000000000000000ULL, 0x475B907CDFE1FBE2ULL }, /* XSUM_XXH64_testdata[6852] */\n    { 3426, 0x000000009E3779B1ULL, 0x8934A118AE7AE4AAULL }, /* XSUM_XXH64_testdata[6853] */\n    { 3427, 0x0000000000000000ULL, 0x0E29B1503E5DB3FFULL }, /* XSUM_XXH64_testdata[6854] */\n    { 3427, 0x000000009E3779B1ULL, 0x89E494DD08E205A6ULL }, /* XSUM_XXH64_testdata[6855] */\n    { 3428, 0x0000000000000000ULL, 0xB53CEE742F82286FULL }, /* XSUM_XXH64_testdata[6856] */\n    { 3428, 0x000000009E3779B1ULL, 0x6AADA048563F35CCULL }, /* XSUM_XXH64_testdata[6857] */\n    { 3429, 0x0000000000000000ULL, 0x5636DBC6EE3F29EEULL }, /* XSUM_XXH64_testdata[6858] */\n    { 3429, 0x000000009E3779B1ULL, 0xB3EFB37788709642ULL }, /* XSUM_XXH64_testdata[6859] */\n    { 3430, 0x0000000000000000ULL, 0x525C5344F31843BDULL }, /* XSUM_XXH64_testdata[6860] */\n    { 3430, 0x000000009E3779B1ULL, 0x4E69C90D18DD5DBCULL }, /* XSUM_XXH64_testdata[6861] */\n    { 3431, 0x0000000000000000ULL, 0x5DACA055BB7AFD92ULL }, /* XSUM_XXH64_testdata[6862] */\n    { 3431, 0x000000009E3779B1ULL, 0x0EA112410719131AULL }, /* XSUM_XXH64_testdata[6863] */\n    { 3432, 0x0000000000000000ULL, 0x9B8649B0AA800103ULL }, /* XSUM_XXH64_testdata[6864] */\n    { 3432, 0x000000009E3779B1ULL, 0x1BA99096009C806FULL }, /* XSUM_XXH64_testdata[6865] */\n    { 3433, 0x0000000000000000ULL, 0x94B3D2ADFA118C38ULL }, /* XSUM_XXH64_testdata[6866] */\n    { 3433, 0x000000009E3779B1ULL, 0x69AC2B5666FFD4B6ULL }, /* XSUM_XXH64_testdata[6867] */\n    { 3434, 0x0000000000000000ULL, 0xF0A79614651CB5A9ULL }, /* XSUM_XXH64_testdata[6868] */\n    { 3434, 0x000000009E3779B1ULL, 0xED98DEC514EEEB9EULL }, /* XSUM_XXH64_testdata[6869] */\n    { 3435, 0x0000000000000000ULL, 0xADF4655B940CE7CFULL }, /* XSUM_XXH64_testdata[6870] */\n    { 3435, 0x000000009E3779B1ULL, 0x1B50D08BBCFE8604ULL }, /* XSUM_XXH64_testdata[6871] */\n    { 3436, 0x0000000000000000ULL, 0x6D4A695B5F8E7B73ULL }, /* XSUM_XXH64_testdata[6872] */\n    { 3436, 0x000000009E3779B1ULL, 0x4060ADB4F0A1EECDULL }, /* XSUM_XXH64_testdata[6873] */\n    { 3437, 0x0000000000000000ULL, 0xB0986E79F7483CE4ULL }, /* XSUM_XXH64_testdata[6874] */\n    { 3437, 0x000000009E3779B1ULL, 0xED21F1E7C04AE6E2ULL }, /* XSUM_XXH64_testdata[6875] */\n    { 3438, 0x0000000000000000ULL, 0x4A6D3866036805EDULL }, /* XSUM_XXH64_testdata[6876] */\n    { 3438, 0x000000009E3779B1ULL, 0xF9CC70B50F1F89BCULL }, /* XSUM_XXH64_testdata[6877] */\n    { 3439, 0x0000000000000000ULL, 0x39939C8F8202160FULL }, /* XSUM_XXH64_testdata[6878] */\n    { 3439, 0x000000009E3779B1ULL, 0xBBAF658D20776273ULL }, /* XSUM_XXH64_testdata[6879] */\n    { 3440, 0x0000000000000000ULL, 0xBA7EE4C6011EB34DULL }, /* XSUM_XXH64_testdata[6880] */\n    { 3440, 0x000000009E3779B1ULL, 0xBD690516B2B7807DULL }, /* XSUM_XXH64_testdata[6881] */\n    { 3441, 0x0000000000000000ULL, 0x0B465B9A47FCBCCEULL }, /* XSUM_XXH64_testdata[6882] */\n    { 3441, 0x000000009E3779B1ULL, 0x7B4B66EF96259778ULL }, /* XSUM_XXH64_testdata[6883] */\n    { 3442, 0x0000000000000000ULL, 0xA85200C407EAE878ULL }, /* XSUM_XXH64_testdata[6884] */\n    { 3442, 0x000000009E3779B1ULL, 0xA24014C6DF63F856ULL }, /* XSUM_XXH64_testdata[6885] */\n    { 3443, 0x0000000000000000ULL, 0xA13BC051C0EF77FAULL }, /* XSUM_XXH64_testdata[6886] */\n    { 3443, 0x000000009E3779B1ULL, 0x3948A962B0BC2070ULL }, /* XSUM_XXH64_testdata[6887] */\n    { 3444, 0x0000000000000000ULL, 0xA0EE012AE118927BULL }, /* XSUM_XXH64_testdata[6888] */\n    { 3444, 0x000000009E3779B1ULL, 0xBD7451379163A75BULL }, /* XSUM_XXH64_testdata[6889] */\n    { 3445, 0x0000000000000000ULL, 0x79EC35D8F8C7E860ULL }, /* XSUM_XXH64_testdata[6890] */\n    { 3445, 0x000000009E3779B1ULL, 0x7D5A334001FF54D8ULL }, /* XSUM_XXH64_testdata[6891] */\n    { 3446, 0x0000000000000000ULL, 0x1DBAC18C8016262BULL }, /* XSUM_XXH64_testdata[6892] */\n    { 3446, 0x000000009E3779B1ULL, 0x511FC1C00CAFD5DFULL }, /* XSUM_XXH64_testdata[6893] */\n    { 3447, 0x0000000000000000ULL, 0x98BF7F8039272362ULL }, /* XSUM_XXH64_testdata[6894] */\n    { 3447, 0x000000009E3779B1ULL, 0x1B9430A5C286DD2CULL }, /* XSUM_XXH64_testdata[6895] */\n    { 3448, 0x0000000000000000ULL, 0xDD84834204467580ULL }, /* XSUM_XXH64_testdata[6896] */\n    { 3448, 0x000000009E3779B1ULL, 0x0CED7BC8D6B9D1B4ULL }, /* XSUM_XXH64_testdata[6897] */\n    { 3449, 0x0000000000000000ULL, 0xA8B0DAEAD3E4EB9FULL }, /* XSUM_XXH64_testdata[6898] */\n    { 3449, 0x000000009E3779B1ULL, 0x404EFA10F504A853ULL }, /* XSUM_XXH64_testdata[6899] */\n    { 3450, 0x0000000000000000ULL, 0x36F4BA8859BC2D42ULL }, /* XSUM_XXH64_testdata[6900] */\n    { 3450, 0x000000009E3779B1ULL, 0xECBA958127FDA294ULL }, /* XSUM_XXH64_testdata[6901] */\n    { 3451, 0x0000000000000000ULL, 0x89EF742547488B13ULL }, /* XSUM_XXH64_testdata[6902] */\n    { 3451, 0x000000009E3779B1ULL, 0x80A8ADF296C9D680ULL }, /* XSUM_XXH64_testdata[6903] */\n    { 3452, 0x0000000000000000ULL, 0x583DDAE4EF2AC68EULL }, /* XSUM_XXH64_testdata[6904] */\n    { 3452, 0x000000009E3779B1ULL, 0x4609C5258FF9F675ULL }, /* XSUM_XXH64_testdata[6905] */\n    { 3453, 0x0000000000000000ULL, 0xE5B333C37FB42C1CULL }, /* XSUM_XXH64_testdata[6906] */\n    { 3453, 0x000000009E3779B1ULL, 0xA99A111022825EE5ULL }, /* XSUM_XXH64_testdata[6907] */\n    { 3454, 0x0000000000000000ULL, 0x724EE6AD6455B098ULL }, /* XSUM_XXH64_testdata[6908] */\n    { 3454, 0x000000009E3779B1ULL, 0x99EF409B713E60A4ULL }, /* XSUM_XXH64_testdata[6909] */\n    { 3455, 0x0000000000000000ULL, 0x1CE38A1E0980F6B7ULL }, /* XSUM_XXH64_testdata[6910] */\n    { 3455, 0x000000009E3779B1ULL, 0x27E12CEE4CE4F894ULL }, /* XSUM_XXH64_testdata[6911] */\n    { 3456, 0x0000000000000000ULL, 0x5F0D6A1FAAB49751ULL }, /* XSUM_XXH64_testdata[6912] */\n    { 3456, 0x000000009E3779B1ULL, 0x446CEA9E3F7FA37DULL }, /* XSUM_XXH64_testdata[6913] */\n    { 3457, 0x0000000000000000ULL, 0x3850FEE3C9E3F173ULL }, /* XSUM_XXH64_testdata[6914] */\n    { 3457, 0x000000009E3779B1ULL, 0x97ABA3B49D6F56A5ULL }, /* XSUM_XXH64_testdata[6915] */\n    { 3458, 0x0000000000000000ULL, 0x1998098076D3AFD4ULL }, /* XSUM_XXH64_testdata[6916] */\n    { 3458, 0x000000009E3779B1ULL, 0xC54BA80317EBE695ULL }, /* XSUM_XXH64_testdata[6917] */\n    { 3459, 0x0000000000000000ULL, 0x9499DB03BE6BB40BULL }, /* XSUM_XXH64_testdata[6918] */\n    { 3459, 0x000000009E3779B1ULL, 0x4D52921B4D1E5A93ULL }, /* XSUM_XXH64_testdata[6919] */\n    { 3460, 0x0000000000000000ULL, 0x217F04D5A8BDB010ULL }, /* XSUM_XXH64_testdata[6920] */\n    { 3460, 0x000000009E3779B1ULL, 0xFB005F37946BEFDEULL }, /* XSUM_XXH64_testdata[6921] */\n    { 3461, 0x0000000000000000ULL, 0x84FAFA5EBD63A84AULL }, /* XSUM_XXH64_testdata[6922] */\n    { 3461, 0x000000009E3779B1ULL, 0x4806C10CE9E2F910ULL }, /* XSUM_XXH64_testdata[6923] */\n    { 3462, 0x0000000000000000ULL, 0xA586829EDC67D00FULL }, /* XSUM_XXH64_testdata[6924] */\n    { 3462, 0x000000009E3779B1ULL, 0xBD8009F16447A000ULL }, /* XSUM_XXH64_testdata[6925] */\n    { 3463, 0x0000000000000000ULL, 0x84FE742CAE50DD3BULL }, /* XSUM_XXH64_testdata[6926] */\n    { 3463, 0x000000009E3779B1ULL, 0x704D284BC7050926ULL }, /* XSUM_XXH64_testdata[6927] */\n    { 3464, 0x0000000000000000ULL, 0xFC8B600653677666ULL }, /* XSUM_XXH64_testdata[6928] */\n    { 3464, 0x000000009E3779B1ULL, 0xBE690D31D4F751ADULL }, /* XSUM_XXH64_testdata[6929] */\n    { 3465, 0x0000000000000000ULL, 0x5F88BD33643BDF72ULL }, /* XSUM_XXH64_testdata[6930] */\n    { 3465, 0x000000009E3779B1ULL, 0xD4DA9DADE451989EULL }, /* XSUM_XXH64_testdata[6931] */\n    { 3466, 0x0000000000000000ULL, 0x6AA4FBF098F6D5D2ULL }, /* XSUM_XXH64_testdata[6932] */\n    { 3466, 0x000000009E3779B1ULL, 0x0A3EA25F18543277ULL }, /* XSUM_XXH64_testdata[6933] */\n    { 3467, 0x0000000000000000ULL, 0xFEA3683D26B3C7BFULL }, /* XSUM_XXH64_testdata[6934] */\n    { 3467, 0x000000009E3779B1ULL, 0x4C4D58D53A69EC73ULL }, /* XSUM_XXH64_testdata[6935] */\n    { 3468, 0x0000000000000000ULL, 0xDBA1BB28C3C620ADULL }, /* XSUM_XXH64_testdata[6936] */\n    { 3468, 0x000000009E3779B1ULL, 0x9CEFCCF50AD98122ULL }, /* XSUM_XXH64_testdata[6937] */\n    { 3469, 0x0000000000000000ULL, 0xFD5ED88860FED174ULL }, /* XSUM_XXH64_testdata[6938] */\n    { 3469, 0x000000009E3779B1ULL, 0xF21994C0B95E7BC9ULL }, /* XSUM_XXH64_testdata[6939] */\n    { 3470, 0x0000000000000000ULL, 0xDD488728A790AAF1ULL }, /* XSUM_XXH64_testdata[6940] */\n    { 3470, 0x000000009E3779B1ULL, 0x9C4467381271BAB9ULL }, /* XSUM_XXH64_testdata[6941] */\n    { 3471, 0x0000000000000000ULL, 0xB0DEDEC43DDFB9D5ULL }, /* XSUM_XXH64_testdata[6942] */\n    { 3471, 0x000000009E3779B1ULL, 0x522DAF4905F12C99ULL }, /* XSUM_XXH64_testdata[6943] */\n    { 3472, 0x0000000000000000ULL, 0x35C81AEA2F7E3994ULL }, /* XSUM_XXH64_testdata[6944] */\n    { 3472, 0x000000009E3779B1ULL, 0x7031FFB850713BF6ULL }, /* XSUM_XXH64_testdata[6945] */\n    { 3473, 0x0000000000000000ULL, 0xE55657B9EB11AAD6ULL }, /* XSUM_XXH64_testdata[6946] */\n    { 3473, 0x000000009E3779B1ULL, 0x5D865E8D64289E5CULL }, /* XSUM_XXH64_testdata[6947] */\n    { 3474, 0x0000000000000000ULL, 0x22E14FD598C19672ULL }, /* XSUM_XXH64_testdata[6948] */\n    { 3474, 0x000000009E3779B1ULL, 0xB7946055700E0155ULL }, /* XSUM_XXH64_testdata[6949] */\n    { 3475, 0x0000000000000000ULL, 0x04D739AFD8F4A3B0ULL }, /* XSUM_XXH64_testdata[6950] */\n    { 3475, 0x000000009E3779B1ULL, 0xF20A2603538E671EULL }, /* XSUM_XXH64_testdata[6951] */\n    { 3476, 0x0000000000000000ULL, 0xF8A3781630038513ULL }, /* XSUM_XXH64_testdata[6952] */\n    { 3476, 0x000000009E3779B1ULL, 0xC3E7A711FE0DCC46ULL }, /* XSUM_XXH64_testdata[6953] */\n    { 3477, 0x0000000000000000ULL, 0x1E4CAAC68B9E0D7BULL }, /* XSUM_XXH64_testdata[6954] */\n    { 3477, 0x000000009E3779B1ULL, 0x4D67177F55998FCFULL }, /* XSUM_XXH64_testdata[6955] */\n    { 3478, 0x0000000000000000ULL, 0x8BA954A163FFB576ULL }, /* XSUM_XXH64_testdata[6956] */\n    { 3478, 0x000000009E3779B1ULL, 0xF1B02671C4CA7B07ULL }, /* XSUM_XXH64_testdata[6957] */\n    { 3479, 0x0000000000000000ULL, 0x17D6ACB8D66D8196ULL }, /* XSUM_XXH64_testdata[6958] */\n    { 3479, 0x000000009E3779B1ULL, 0x30B475CB60808309ULL }, /* XSUM_XXH64_testdata[6959] */\n    { 3480, 0x0000000000000000ULL, 0x2874D0CE3DB35CA2ULL }, /* XSUM_XXH64_testdata[6960] */\n    { 3480, 0x000000009E3779B1ULL, 0x5A953E545322C088ULL }, /* XSUM_XXH64_testdata[6961] */\n    { 3481, 0x0000000000000000ULL, 0x0A7C8EADCCFDE2EDULL }, /* XSUM_XXH64_testdata[6962] */\n    { 3481, 0x000000009E3779B1ULL, 0xF896B8F17D5F6604ULL }, /* XSUM_XXH64_testdata[6963] */\n    { 3482, 0x0000000000000000ULL, 0x45598F2E87A1960BULL }, /* XSUM_XXH64_testdata[6964] */\n    { 3482, 0x000000009E3779B1ULL, 0x63E35A12DED8F09CULL }, /* XSUM_XXH64_testdata[6965] */\n    { 3483, 0x0000000000000000ULL, 0xD4778490F3274C36ULL }, /* XSUM_XXH64_testdata[6966] */\n    { 3483, 0x000000009E3779B1ULL, 0xD7CA29D1A0CA1125ULL }, /* XSUM_XXH64_testdata[6967] */\n    { 3484, 0x0000000000000000ULL, 0x6029C8690BF1EA67ULL }, /* XSUM_XXH64_testdata[6968] */\n    { 3484, 0x000000009E3779B1ULL, 0x280C48012EB3CF27ULL }, /* XSUM_XXH64_testdata[6969] */\n    { 3485, 0x0000000000000000ULL, 0x0675BC370AAB9D8EULL }, /* XSUM_XXH64_testdata[6970] */\n    { 3485, 0x000000009E3779B1ULL, 0x0AEC1D2F2FCB7A8FULL }, /* XSUM_XXH64_testdata[6971] */\n    { 3486, 0x0000000000000000ULL, 0xF00C1193A440E2F1ULL }, /* XSUM_XXH64_testdata[6972] */\n    { 3486, 0x000000009E3779B1ULL, 0xF1BFF92693732237ULL }, /* XSUM_XXH64_testdata[6973] */\n    { 3487, 0x0000000000000000ULL, 0x3DE10F662E8740D1ULL }, /* XSUM_XXH64_testdata[6974] */\n    { 3487, 0x000000009E3779B1ULL, 0x109745FF6287BC41ULL }, /* XSUM_XXH64_testdata[6975] */\n    { 3488, 0x0000000000000000ULL, 0xDC211DE9381C51B6ULL }, /* XSUM_XXH64_testdata[6976] */\n    { 3488, 0x000000009E3779B1ULL, 0xE2AE702886A03923ULL }, /* XSUM_XXH64_testdata[6977] */\n    { 3489, 0x0000000000000000ULL, 0x08D618A7C0EAE601ULL }, /* XSUM_XXH64_testdata[6978] */\n    { 3489, 0x000000009E3779B1ULL, 0xC9913FBE1D8E5BB3ULL }, /* XSUM_XXH64_testdata[6979] */\n    { 3490, 0x0000000000000000ULL, 0x48316FF37DAAD72FULL }, /* XSUM_XXH64_testdata[6980] */\n    { 3490, 0x000000009E3779B1ULL, 0x11B10211BF8538FAULL }, /* XSUM_XXH64_testdata[6981] */\n    { 3491, 0x0000000000000000ULL, 0x5B75F1CFDACAF557ULL }, /* XSUM_XXH64_testdata[6982] */\n    { 3491, 0x000000009E3779B1ULL, 0x934FA1DD51724B81ULL }, /* XSUM_XXH64_testdata[6983] */\n    { 3492, 0x0000000000000000ULL, 0xFDA9B2DBF6AB2656ULL }, /* XSUM_XXH64_testdata[6984] */\n    { 3492, 0x000000009E3779B1ULL, 0x2E6030FC5467FF32ULL }, /* XSUM_XXH64_testdata[6985] */\n    { 3493, 0x0000000000000000ULL, 0x50B8BF65953BD16AULL }, /* XSUM_XXH64_testdata[6986] */\n    { 3493, 0x000000009E3779B1ULL, 0xD2C8951203C1C15DULL }, /* XSUM_XXH64_testdata[6987] */\n    { 3494, 0x0000000000000000ULL, 0xA0C2A283EAE15487ULL }, /* XSUM_XXH64_testdata[6988] */\n    { 3494, 0x000000009E3779B1ULL, 0x8B9D43430237910DULL }, /* XSUM_XXH64_testdata[6989] */\n    { 3495, 0x0000000000000000ULL, 0x5ACEA62837A59896ULL }, /* XSUM_XXH64_testdata[6990] */\n    { 3495, 0x000000009E3779B1ULL, 0xD46F9DB4B78FFAB8ULL }, /* XSUM_XXH64_testdata[6991] */\n    { 3496, 0x0000000000000000ULL, 0xBB19D46A91E070C9ULL }, /* XSUM_XXH64_testdata[6992] */\n    { 3496, 0x000000009E3779B1ULL, 0xEC2237E9470E739CULL }, /* XSUM_XXH64_testdata[6993] */\n    { 3497, 0x0000000000000000ULL, 0xF9AF49826B056FEFULL }, /* XSUM_XXH64_testdata[6994] */\n    { 3497, 0x000000009E3779B1ULL, 0x4525FED6367119C7ULL }, /* XSUM_XXH64_testdata[6995] */\n    { 3498, 0x0000000000000000ULL, 0x9077F7074556E72CULL }, /* XSUM_XXH64_testdata[6996] */\n    { 3498, 0x000000009E3779B1ULL, 0xA3E312742677D94DULL }, /* XSUM_XXH64_testdata[6997] */\n    { 3499, 0x0000000000000000ULL, 0xFAB59575A637AAA3ULL }, /* XSUM_XXH64_testdata[6998] */\n    { 3499, 0x000000009E3779B1ULL, 0xB970E40ECDCFEC64ULL }, /* XSUM_XXH64_testdata[6999] */\n    { 3500, 0x0000000000000000ULL, 0x412E70EDA7D80C67ULL }, /* XSUM_XXH64_testdata[7000] */\n    { 3500, 0x000000009E3779B1ULL, 0x87E8D6F941223F8DULL }, /* XSUM_XXH64_testdata[7001] */\n    { 3501, 0x0000000000000000ULL, 0x601A0F00FEBD3655ULL }, /* XSUM_XXH64_testdata[7002] */\n    { 3501, 0x000000009E3779B1ULL, 0xBFD11D042A1EF759ULL }, /* XSUM_XXH64_testdata[7003] */\n    { 3502, 0x0000000000000000ULL, 0x9D24561EFEEB9279ULL }, /* XSUM_XXH64_testdata[7004] */\n    { 3502, 0x000000009E3779B1ULL, 0x2C802095A94A60D2ULL }, /* XSUM_XXH64_testdata[7005] */\n    { 3503, 0x0000000000000000ULL, 0xF9050BA3198C24B2ULL }, /* XSUM_XXH64_testdata[7006] */\n    { 3503, 0x000000009E3779B1ULL, 0xEBF760E64F37DF55ULL }, /* XSUM_XXH64_testdata[7007] */\n    { 3504, 0x0000000000000000ULL, 0x2B6EE7B2E8681FD5ULL }, /* XSUM_XXH64_testdata[7008] */\n    { 3504, 0x000000009E3779B1ULL, 0xF56F4D80FDBBBD9AULL }, /* XSUM_XXH64_testdata[7009] */\n    { 3505, 0x0000000000000000ULL, 0x94A17F386950D333ULL }, /* XSUM_XXH64_testdata[7010] */\n    { 3505, 0x000000009E3779B1ULL, 0xE62B08B97041EF75ULL }, /* XSUM_XXH64_testdata[7011] */\n    { 3506, 0x0000000000000000ULL, 0xBE036D9DF122D1D3ULL }, /* XSUM_XXH64_testdata[7012] */\n    { 3506, 0x000000009E3779B1ULL, 0x794808727C2B07AAULL }, /* XSUM_XXH64_testdata[7013] */\n    { 3507, 0x0000000000000000ULL, 0xE442F070EC6EC083ULL }, /* XSUM_XXH64_testdata[7014] */\n    { 3507, 0x000000009E3779B1ULL, 0xA36193541C6FDA04ULL }, /* XSUM_XXH64_testdata[7015] */\n    { 3508, 0x0000000000000000ULL, 0x3B0F6F163AF062C2ULL }, /* XSUM_XXH64_testdata[7016] */\n    { 3508, 0x000000009E3779B1ULL, 0xB6C6D77EDC3771D8ULL }, /* XSUM_XXH64_testdata[7017] */\n    { 3509, 0x0000000000000000ULL, 0xF9EF2ABB0423266EULL }, /* XSUM_XXH64_testdata[7018] */\n    { 3509, 0x000000009E3779B1ULL, 0x6943E515677AB452ULL }, /* XSUM_XXH64_testdata[7019] */\n    { 3510, 0x0000000000000000ULL, 0xB0B84CEFD8FE6340ULL }, /* XSUM_XXH64_testdata[7020] */\n    { 3510, 0x000000009E3779B1ULL, 0x08737D8DDC8120AEULL }, /* XSUM_XXH64_testdata[7021] */\n    { 3511, 0x0000000000000000ULL, 0x933520C087EB1251ULL }, /* XSUM_XXH64_testdata[7022] */\n    { 3511, 0x000000009E3779B1ULL, 0x42F36808B4BA4A84ULL }, /* XSUM_XXH64_testdata[7023] */\n    { 3512, 0x0000000000000000ULL, 0xF500957EFD5826CFULL }, /* XSUM_XXH64_testdata[7024] */\n    { 3512, 0x000000009E3779B1ULL, 0x07F27423CFFEB907ULL }, /* XSUM_XXH64_testdata[7025] */\n    { 3513, 0x0000000000000000ULL, 0xA073D00F51FA370FULL }, /* XSUM_XXH64_testdata[7026] */\n    { 3513, 0x000000009E3779B1ULL, 0x8BCA01E064347E13ULL }, /* XSUM_XXH64_testdata[7027] */\n    { 3514, 0x0000000000000000ULL, 0xA509D39D3D41B160ULL }, /* XSUM_XXH64_testdata[7028] */\n    { 3514, 0x000000009E3779B1ULL, 0x03AD6B263276CF25ULL }, /* XSUM_XXH64_testdata[7029] */\n    { 3515, 0x0000000000000000ULL, 0x6D05820E225928E6ULL }, /* XSUM_XXH64_testdata[7030] */\n    { 3515, 0x000000009E3779B1ULL, 0xF944F8CE371EA6B2ULL }, /* XSUM_XXH64_testdata[7031] */\n    { 3516, 0x0000000000000000ULL, 0xACAD0AEA6312CD29ULL }, /* XSUM_XXH64_testdata[7032] */\n    { 3516, 0x000000009E3779B1ULL, 0x0DCB0767C513A0FCULL }, /* XSUM_XXH64_testdata[7033] */\n    { 3517, 0x0000000000000000ULL, 0x227EC6DE80B6B529ULL }, /* XSUM_XXH64_testdata[7034] */\n    { 3517, 0x000000009E3779B1ULL, 0x1A7002046866C06EULL }, /* XSUM_XXH64_testdata[7035] */\n    { 3518, 0x0000000000000000ULL, 0xCED19EBFBA55E1F5ULL }, /* XSUM_XXH64_testdata[7036] */\n    { 3518, 0x000000009E3779B1ULL, 0xB09F5F1AE07C9815ULL }, /* XSUM_XXH64_testdata[7037] */\n    { 3519, 0x0000000000000000ULL, 0xB98833762EE1B7D7ULL }, /* XSUM_XXH64_testdata[7038] */\n    { 3519, 0x000000009E3779B1ULL, 0x6128C517E4B55EC9ULL }, /* XSUM_XXH64_testdata[7039] */\n    { 3520, 0x0000000000000000ULL, 0xA47787E9C6EEDC87ULL }, /* XSUM_XXH64_testdata[7040] */\n    { 3520, 0x000000009E3779B1ULL, 0xC38A874875CD07B8ULL }, /* XSUM_XXH64_testdata[7041] */\n    { 3521, 0x0000000000000000ULL, 0xE0B94226A2A57EBEULL }, /* XSUM_XXH64_testdata[7042] */\n    { 3521, 0x000000009E3779B1ULL, 0x9302C1E217CA5722ULL }, /* XSUM_XXH64_testdata[7043] */\n    { 3522, 0x0000000000000000ULL, 0x0C184784E80525CDULL }, /* XSUM_XXH64_testdata[7044] */\n    { 3522, 0x000000009E3779B1ULL, 0x9E9AF48BDCE69A9FULL }, /* XSUM_XXH64_testdata[7045] */\n    { 3523, 0x0000000000000000ULL, 0xE1C76DD43F07F23FULL }, /* XSUM_XXH64_testdata[7046] */\n    { 3523, 0x000000009E3779B1ULL, 0xABEBF784DF811BD6ULL }, /* XSUM_XXH64_testdata[7047] */\n    { 3524, 0x0000000000000000ULL, 0x09219D2A72005F96ULL }, /* XSUM_XXH64_testdata[7048] */\n    { 3524, 0x000000009E3779B1ULL, 0xF4EDA92DDBB5BDA4ULL }, /* XSUM_XXH64_testdata[7049] */\n    { 3525, 0x0000000000000000ULL, 0x69E3BE476347871CULL }, /* XSUM_XXH64_testdata[7050] */\n    { 3525, 0x000000009E3779B1ULL, 0x8501BCD6CB8F9BBCULL }, /* XSUM_XXH64_testdata[7051] */\n    { 3526, 0x0000000000000000ULL, 0x519091412F11F828ULL }, /* XSUM_XXH64_testdata[7052] */\n    { 3526, 0x000000009E3779B1ULL, 0x7F608D522965BCD3ULL }, /* XSUM_XXH64_testdata[7053] */\n    { 3527, 0x0000000000000000ULL, 0xEA147D23534A4996ULL }, /* XSUM_XXH64_testdata[7054] */\n    { 3527, 0x000000009E3779B1ULL, 0xB4BFF826AA1E13E5ULL }, /* XSUM_XXH64_testdata[7055] */\n    { 3528, 0x0000000000000000ULL, 0x1777C4B4A499C25CULL }, /* XSUM_XXH64_testdata[7056] */\n    { 3528, 0x000000009E3779B1ULL, 0x3BBF6DAE6C7BC1DBULL }, /* XSUM_XXH64_testdata[7057] */\n    { 3529, 0x0000000000000000ULL, 0x03D857E19995B564ULL }, /* XSUM_XXH64_testdata[7058] */\n    { 3529, 0x000000009E3779B1ULL, 0x337EDDBCFA20F771ULL }, /* XSUM_XXH64_testdata[7059] */\n    { 3530, 0x0000000000000000ULL, 0xA28CC557AF44A2A8ULL }, /* XSUM_XXH64_testdata[7060] */\n    { 3530, 0x000000009E3779B1ULL, 0x321F9CC679B9B829ULL }, /* XSUM_XXH64_testdata[7061] */\n    { 3531, 0x0000000000000000ULL, 0x84C96E245D893C3EULL }, /* XSUM_XXH64_testdata[7062] */\n    { 3531, 0x000000009E3779B1ULL, 0x70034B4C8182B07DULL }, /* XSUM_XXH64_testdata[7063] */\n    { 3532, 0x0000000000000000ULL, 0x1F07CB136AF0F28BULL }, /* XSUM_XXH64_testdata[7064] */\n    { 3532, 0x000000009E3779B1ULL, 0xCD65D4416CF08762ULL }, /* XSUM_XXH64_testdata[7065] */\n    { 3533, 0x0000000000000000ULL, 0x073109B115390747ULL }, /* XSUM_XXH64_testdata[7066] */\n    { 3533, 0x000000009E3779B1ULL, 0xFF2A6DF46D94D8A7ULL }, /* XSUM_XXH64_testdata[7067] */\n    { 3534, 0x0000000000000000ULL, 0xA8E2AF72ACDAAD60ULL }, /* XSUM_XXH64_testdata[7068] */\n    { 3534, 0x000000009E3779B1ULL, 0x747980C588745E92ULL }, /* XSUM_XXH64_testdata[7069] */\n    { 3535, 0x0000000000000000ULL, 0x2C97747E2A9BE0EAULL }, /* XSUM_XXH64_testdata[7070] */\n    { 3535, 0x000000009E3779B1ULL, 0xE430743516771AFAULL }, /* XSUM_XXH64_testdata[7071] */\n    { 3536, 0x0000000000000000ULL, 0x7C327DF86232D809ULL }, /* XSUM_XXH64_testdata[7072] */\n    { 3536, 0x000000009E3779B1ULL, 0x0C1BCEC2C5223360ULL }, /* XSUM_XXH64_testdata[7073] */\n    { 3537, 0x0000000000000000ULL, 0x65707A5BB439C306ULL }, /* XSUM_XXH64_testdata[7074] */\n    { 3537, 0x000000009E3779B1ULL, 0x53E4B2D67C7BCE4EULL }, /* XSUM_XXH64_testdata[7075] */\n    { 3538, 0x0000000000000000ULL, 0xC668524AAA7649EDULL }, /* XSUM_XXH64_testdata[7076] */\n    { 3538, 0x000000009E3779B1ULL, 0xBB9B3FD6A4FB5303ULL }, /* XSUM_XXH64_testdata[7077] */\n    { 3539, 0x0000000000000000ULL, 0x1A2B5086E3E478A4ULL }, /* XSUM_XXH64_testdata[7078] */\n    { 3539, 0x000000009E3779B1ULL, 0x95DCFC674E79D4F9ULL }, /* XSUM_XXH64_testdata[7079] */\n    { 3540, 0x0000000000000000ULL, 0x49C190C80A4706F2ULL }, /* XSUM_XXH64_testdata[7080] */\n    { 3540, 0x000000009E3779B1ULL, 0x616D1CEF7C60DA9BULL }, /* XSUM_XXH64_testdata[7081] */\n    { 3541, 0x0000000000000000ULL, 0x11213AFFB0979CAFULL }, /* XSUM_XXH64_testdata[7082] */\n    { 3541, 0x000000009E3779B1ULL, 0xD21F8C1F4CBAEEBAULL }, /* XSUM_XXH64_testdata[7083] */\n    { 3542, 0x0000000000000000ULL, 0x22ACDFE3EB80EB5DULL }, /* XSUM_XXH64_testdata[7084] */\n    { 3542, 0x000000009E3779B1ULL, 0xF463F000BE1C6751ULL }, /* XSUM_XXH64_testdata[7085] */\n    { 3543, 0x0000000000000000ULL, 0x8CEC304E06B9D325ULL }, /* XSUM_XXH64_testdata[7086] */\n    { 3543, 0x000000009E3779B1ULL, 0xCA62DDBBBCED01E0ULL }, /* XSUM_XXH64_testdata[7087] */\n    { 3544, 0x0000000000000000ULL, 0x4A8DD9E109B16AF6ULL }, /* XSUM_XXH64_testdata[7088] */\n    { 3544, 0x000000009E3779B1ULL, 0xE63BADCC25966E96ULL }, /* XSUM_XXH64_testdata[7089] */\n    { 3545, 0x0000000000000000ULL, 0x5ABF68CDF6819BEEULL }, /* XSUM_XXH64_testdata[7090] */\n    { 3545, 0x000000009E3779B1ULL, 0x38531F97DA429BBFULL }, /* XSUM_XXH64_testdata[7091] */\n    { 3546, 0x0000000000000000ULL, 0x9EBB58EDD5952834ULL }, /* XSUM_XXH64_testdata[7092] */\n    { 3546, 0x000000009E3779B1ULL, 0x5448A905D2F89654ULL }, /* XSUM_XXH64_testdata[7093] */\n    { 3547, 0x0000000000000000ULL, 0x4EF88E7EAE161312ULL }, /* XSUM_XXH64_testdata[7094] */\n    { 3547, 0x000000009E3779B1ULL, 0x5E7C94FDD7DE9311ULL }, /* XSUM_XXH64_testdata[7095] */\n    { 3548, 0x0000000000000000ULL, 0xD010D682FCF537AFULL }, /* XSUM_XXH64_testdata[7096] */\n    { 3548, 0x000000009E3779B1ULL, 0xE8CD3B884E6A6F21ULL }, /* XSUM_XXH64_testdata[7097] */\n    { 3549, 0x0000000000000000ULL, 0x86BE9BB4BEB04B03ULL }, /* XSUM_XXH64_testdata[7098] */\n    { 3549, 0x000000009E3779B1ULL, 0x06063968D0F80876ULL }, /* XSUM_XXH64_testdata[7099] */\n    { 3550, 0x0000000000000000ULL, 0xDCCE82CA577F2BB4ULL }, /* XSUM_XXH64_testdata[7100] */\n    { 3550, 0x000000009E3779B1ULL, 0x86A8E302B9E4DC53ULL }, /* XSUM_XXH64_testdata[7101] */\n    { 3551, 0x0000000000000000ULL, 0x33399BCFC00F3C61ULL }, /* XSUM_XXH64_testdata[7102] */\n    { 3551, 0x000000009E3779B1ULL, 0x5DB7BA974BFA3FE3ULL }, /* XSUM_XXH64_testdata[7103] */\n    { 3552, 0x0000000000000000ULL, 0xFF931344D16E6B0DULL }, /* XSUM_XXH64_testdata[7104] */\n    { 3552, 0x000000009E3779B1ULL, 0x6DE057EE28136E61ULL }, /* XSUM_XXH64_testdata[7105] */\n    { 3553, 0x0000000000000000ULL, 0xBF689F2B79570BD0ULL }, /* XSUM_XXH64_testdata[7106] */\n    { 3553, 0x000000009E3779B1ULL, 0x83D6E9B609B9B4C6ULL }, /* XSUM_XXH64_testdata[7107] */\n    { 3554, 0x0000000000000000ULL, 0x560B7704D8C75085ULL }, /* XSUM_XXH64_testdata[7108] */\n    { 3554, 0x000000009E3779B1ULL, 0x8DE205EAFCADB4DDULL }, /* XSUM_XXH64_testdata[7109] */\n    { 3555, 0x0000000000000000ULL, 0x62DB29345C269169ULL }, /* XSUM_XXH64_testdata[7110] */\n    { 3555, 0x000000009E3779B1ULL, 0x2F5837794863A037ULL }, /* XSUM_XXH64_testdata[7111] */\n    { 3556, 0x0000000000000000ULL, 0xE20B27BC85703E29ULL }, /* XSUM_XXH64_testdata[7112] */\n    { 3556, 0x000000009E3779B1ULL, 0xC0225CFA97AD5C0AULL }, /* XSUM_XXH64_testdata[7113] */\n    { 3557, 0x0000000000000000ULL, 0x1AE417BD64FC834EULL }, /* XSUM_XXH64_testdata[7114] */\n    { 3557, 0x000000009E3779B1ULL, 0x9B9EBB0F641DF890ULL }, /* XSUM_XXH64_testdata[7115] */\n    { 3558, 0x0000000000000000ULL, 0x90D30EE1ADB14704ULL }, /* XSUM_XXH64_testdata[7116] */\n    { 3558, 0x000000009E3779B1ULL, 0x69AC1D92F90C25B6ULL }, /* XSUM_XXH64_testdata[7117] */\n    { 3559, 0x0000000000000000ULL, 0x877971D10A9E606CULL }, /* XSUM_XXH64_testdata[7118] */\n    { 3559, 0x000000009E3779B1ULL, 0xC5547B81570ED0F8ULL }, /* XSUM_XXH64_testdata[7119] */\n    { 3560, 0x0000000000000000ULL, 0xD0512D7F554F3A18ULL }, /* XSUM_XXH64_testdata[7120] */\n    { 3560, 0x000000009E3779B1ULL, 0xD5853AEBECC30DDEULL }, /* XSUM_XXH64_testdata[7121] */\n    { 3561, 0x0000000000000000ULL, 0x79F5804AB1AE261BULL }, /* XSUM_XXH64_testdata[7122] */\n    { 3561, 0x000000009E3779B1ULL, 0x6D5780785B48C2A0ULL }, /* XSUM_XXH64_testdata[7123] */\n    { 3562, 0x0000000000000000ULL, 0xB78068E708986E49ULL }, /* XSUM_XXH64_testdata[7124] */\n    { 3562, 0x000000009E3779B1ULL, 0xB60F8882A4177EECULL }, /* XSUM_XXH64_testdata[7125] */\n    { 3563, 0x0000000000000000ULL, 0xD8851796AF730E3EULL }, /* XSUM_XXH64_testdata[7126] */\n    { 3563, 0x000000009E3779B1ULL, 0x1A63CC72662F29A4ULL }, /* XSUM_XXH64_testdata[7127] */\n    { 3564, 0x0000000000000000ULL, 0x487D85DBA3601068ULL }, /* XSUM_XXH64_testdata[7128] */\n    { 3564, 0x000000009E3779B1ULL, 0x408E49E163131B96ULL }, /* XSUM_XXH64_testdata[7129] */\n    { 3565, 0x0000000000000000ULL, 0x4FBC01ABE4626283ULL }, /* XSUM_XXH64_testdata[7130] */\n    { 3565, 0x000000009E3779B1ULL, 0x3EEEE140AD50C317ULL }, /* XSUM_XXH64_testdata[7131] */\n    { 3566, 0x0000000000000000ULL, 0x94278B4842DA0460ULL }, /* XSUM_XXH64_testdata[7132] */\n    { 3566, 0x000000009E3779B1ULL, 0x128E6229563639E1ULL }, /* XSUM_XXH64_testdata[7133] */\n    { 3567, 0x0000000000000000ULL, 0x06532D9566BCBC57ULL }, /* XSUM_XXH64_testdata[7134] */\n    { 3567, 0x000000009E3779B1ULL, 0x2D443DCC2A555FB2ULL }, /* XSUM_XXH64_testdata[7135] */\n    { 3568, 0x0000000000000000ULL, 0xAF89C71F14ACBB67ULL }, /* XSUM_XXH64_testdata[7136] */\n    { 3568, 0x000000009E3779B1ULL, 0x91E9FCBCEF9AF016ULL }, /* XSUM_XXH64_testdata[7137] */\n    { 3569, 0x0000000000000000ULL, 0x6F3C1B9909FEDFABULL }, /* XSUM_XXH64_testdata[7138] */\n    { 3569, 0x000000009E3779B1ULL, 0x0AD450ADA26FF483ULL }, /* XSUM_XXH64_testdata[7139] */\n    { 3570, 0x0000000000000000ULL, 0xAC23D7A53D8B57A3ULL }, /* XSUM_XXH64_testdata[7140] */\n    { 3570, 0x000000009E3779B1ULL, 0xBD9FCD06B5086151ULL }, /* XSUM_XXH64_testdata[7141] */\n    { 3571, 0x0000000000000000ULL, 0x6B506671E514B30CULL }, /* XSUM_XXH64_testdata[7142] */\n    { 3571, 0x000000009E3779B1ULL, 0x15F0A855B84247F2ULL }, /* XSUM_XXH64_testdata[7143] */\n    { 3572, 0x0000000000000000ULL, 0x491FB762957A9D65ULL }, /* XSUM_XXH64_testdata[7144] */\n    { 3572, 0x000000009E3779B1ULL, 0x0308443C3E93694CULL }, /* XSUM_XXH64_testdata[7145] */\n    { 3573, 0x0000000000000000ULL, 0x9404BE50A44AE27EULL }, /* XSUM_XXH64_testdata[7146] */\n    { 3573, 0x000000009E3779B1ULL, 0xB0B3646B943E86B9ULL }, /* XSUM_XXH64_testdata[7147] */\n    { 3574, 0x0000000000000000ULL, 0x0706739DA0FF247CULL }, /* XSUM_XXH64_testdata[7148] */\n    { 3574, 0x000000009E3779B1ULL, 0xA117ED2EF01640E4ULL }, /* XSUM_XXH64_testdata[7149] */\n    { 3575, 0x0000000000000000ULL, 0x88875D225629DDE7ULL }, /* XSUM_XXH64_testdata[7150] */\n    { 3575, 0x000000009E3779B1ULL, 0xD8CE71C163A69180ULL }, /* XSUM_XXH64_testdata[7151] */\n    { 3576, 0x0000000000000000ULL, 0x26FC74BEF40A2511ULL }, /* XSUM_XXH64_testdata[7152] */\n    { 3576, 0x000000009E3779B1ULL, 0xE7E52C6AB8D2736AULL }, /* XSUM_XXH64_testdata[7153] */\n    { 3577, 0x0000000000000000ULL, 0x1A34F73CC5BA6FC7ULL }, /* XSUM_XXH64_testdata[7154] */\n    { 3577, 0x000000009E3779B1ULL, 0xF8CD6524C4092DFAULL }, /* XSUM_XXH64_testdata[7155] */\n    { 3578, 0x0000000000000000ULL, 0x192FCF58BA2C2B81ULL }, /* XSUM_XXH64_testdata[7156] */\n    { 3578, 0x000000009E3779B1ULL, 0x40225817B8632730ULL }, /* XSUM_XXH64_testdata[7157] */\n    { 3579, 0x0000000000000000ULL, 0x6ED3513BB21D4832ULL }, /* XSUM_XXH64_testdata[7158] */\n    { 3579, 0x000000009E3779B1ULL, 0x7D60A85828F6AC7AULL }, /* XSUM_XXH64_testdata[7159] */\n    { 3580, 0x0000000000000000ULL, 0x074FA7C9FF3184ADULL }, /* XSUM_XXH64_testdata[7160] */\n    { 3580, 0x000000009E3779B1ULL, 0x9C1E9A2308019777ULL }, /* XSUM_XXH64_testdata[7161] */\n    { 3581, 0x0000000000000000ULL, 0x41B18545823FC6B4ULL }, /* XSUM_XXH64_testdata[7162] */\n    { 3581, 0x000000009E3779B1ULL, 0xA6F30667E9228820ULL }, /* XSUM_XXH64_testdata[7163] */\n    { 3582, 0x0000000000000000ULL, 0x50DCB3BBA2580250ULL }, /* XSUM_XXH64_testdata[7164] */\n    { 3582, 0x000000009E3779B1ULL, 0xB467F2788E3E00E3ULL }, /* XSUM_XXH64_testdata[7165] */\n    { 3583, 0x0000000000000000ULL, 0xE24A9D2FEC424C1FULL }, /* XSUM_XXH64_testdata[7166] */\n    { 3583, 0x000000009E3779B1ULL, 0x70397EFF03269FD6ULL }, /* XSUM_XXH64_testdata[7167] */\n    { 3584, 0x0000000000000000ULL, 0xD72A79D8FE59F840ULL }, /* XSUM_XXH64_testdata[7168] */\n    { 3584, 0x000000009E3779B1ULL, 0xD9934ED3A2C52118ULL }, /* XSUM_XXH64_testdata[7169] */\n    { 3585, 0x0000000000000000ULL, 0x2D11C8FFAFD22AC1ULL }, /* XSUM_XXH64_testdata[7170] */\n    { 3585, 0x000000009E3779B1ULL, 0x96212DD404163058ULL }, /* XSUM_XXH64_testdata[7171] */\n    { 3586, 0x0000000000000000ULL, 0x1A34B5751CA1F361ULL }, /* XSUM_XXH64_testdata[7172] */\n    { 3586, 0x000000009E3779B1ULL, 0x259B682F62FAD489ULL }, /* XSUM_XXH64_testdata[7173] */\n    { 3587, 0x0000000000000000ULL, 0x47B928C4AABCEFD0ULL }, /* XSUM_XXH64_testdata[7174] */\n    { 3587, 0x000000009E3779B1ULL, 0x188F8904CFAB3512ULL }, /* XSUM_XXH64_testdata[7175] */\n    { 3588, 0x0000000000000000ULL, 0x53F16CB55EE4891EULL }, /* XSUM_XXH64_testdata[7176] */\n    { 3588, 0x000000009E3779B1ULL, 0x150A05D720F5C036ULL }, /* XSUM_XXH64_testdata[7177] */\n    { 3589, 0x0000000000000000ULL, 0xBD99836324DE5C7CULL }, /* XSUM_XXH64_testdata[7178] */\n    { 3589, 0x000000009E3779B1ULL, 0x88258B1E5E330ED1ULL }, /* XSUM_XXH64_testdata[7179] */\n    { 3590, 0x0000000000000000ULL, 0x1E1CCAA72ABE21BDULL }, /* XSUM_XXH64_testdata[7180] */\n    { 3590, 0x000000009E3779B1ULL, 0x86E66B99654F64BBULL }, /* XSUM_XXH64_testdata[7181] */\n    { 3591, 0x0000000000000000ULL, 0x65DE4317BA517C4CULL }, /* XSUM_XXH64_testdata[7182] */\n    { 3591, 0x000000009E3779B1ULL, 0x054BE401B8901D1AULL }, /* XSUM_XXH64_testdata[7183] */\n    { 3592, 0x0000000000000000ULL, 0x652608703633DB6CULL }, /* XSUM_XXH64_testdata[7184] */\n    { 3592, 0x000000009E3779B1ULL, 0xEE40FAAA260AE897ULL }, /* XSUM_XXH64_testdata[7185] */\n    { 3593, 0x0000000000000000ULL, 0x20C1AB97FAE80E05ULL }, /* XSUM_XXH64_testdata[7186] */\n    { 3593, 0x000000009E3779B1ULL, 0xA8F652661BACC4D0ULL }, /* XSUM_XXH64_testdata[7187] */\n    { 3594, 0x0000000000000000ULL, 0x579C3E059DFF8786ULL }, /* XSUM_XXH64_testdata[7188] */\n    { 3594, 0x000000009E3779B1ULL, 0xF1EA67F97B10FA31ULL }, /* XSUM_XXH64_testdata[7189] */\n    { 3595, 0x0000000000000000ULL, 0x2E1D7C9497F5DF15ULL }, /* XSUM_XXH64_testdata[7190] */\n    { 3595, 0x000000009E3779B1ULL, 0x20EE0C4893767B38ULL }, /* XSUM_XXH64_testdata[7191] */\n    { 3596, 0x0000000000000000ULL, 0x0B48F9C885C7FC90ULL }, /* XSUM_XXH64_testdata[7192] */\n    { 3596, 0x000000009E3779B1ULL, 0xED2F847B6A235B5CULL }, /* XSUM_XXH64_testdata[7193] */\n    { 3597, 0x0000000000000000ULL, 0xFAA4601FB524BBE9ULL }, /* XSUM_XXH64_testdata[7194] */\n    { 3597, 0x000000009E3779B1ULL, 0x6305F2914891FB4AULL }, /* XSUM_XXH64_testdata[7195] */\n    { 3598, 0x0000000000000000ULL, 0x0CDF84C9D9C76183ULL }, /* XSUM_XXH64_testdata[7196] */\n    { 3598, 0x000000009E3779B1ULL, 0x350CACD3FF15689BULL }, /* XSUM_XXH64_testdata[7197] */\n    { 3599, 0x0000000000000000ULL, 0xED498867002DE453ULL }, /* XSUM_XXH64_testdata[7198] */\n    { 3599, 0x000000009E3779B1ULL, 0xC137725F8BC87D57ULL }, /* XSUM_XXH64_testdata[7199] */\n    { 3600, 0x0000000000000000ULL, 0x0E85273E55802E7AULL }, /* XSUM_XXH64_testdata[7200] */\n    { 3600, 0x000000009E3779B1ULL, 0xE7A83F5E592A189EULL }, /* XSUM_XXH64_testdata[7201] */\n    { 3601, 0x0000000000000000ULL, 0xE422DC8806D7A1DCULL }, /* XSUM_XXH64_testdata[7202] */\n    { 3601, 0x000000009E3779B1ULL, 0x5A42AF83C20606A5ULL }, /* XSUM_XXH64_testdata[7203] */\n    { 3602, 0x0000000000000000ULL, 0x8537A5F33A4F2E20ULL }, /* XSUM_XXH64_testdata[7204] */\n    { 3602, 0x000000009E3779B1ULL, 0x254149E6C194B729ULL }, /* XSUM_XXH64_testdata[7205] */\n    { 3603, 0x0000000000000000ULL, 0x69F953B605AEED3BULL }, /* XSUM_XXH64_testdata[7206] */\n    { 3603, 0x000000009E3779B1ULL, 0xCB83DBECBA82DDAAULL }, /* XSUM_XXH64_testdata[7207] */\n    { 3604, 0x0000000000000000ULL, 0xC1D622BC9FF28B23ULL }, /* XSUM_XXH64_testdata[7208] */\n    { 3604, 0x000000009E3779B1ULL, 0xFA104FB63342ACA9ULL }, /* XSUM_XXH64_testdata[7209] */\n    { 3605, 0x0000000000000000ULL, 0x035D6A1DBFF96FABULL }, /* XSUM_XXH64_testdata[7210] */\n    { 3605, 0x000000009E3779B1ULL, 0xB14AA464FD40AA60ULL }, /* XSUM_XXH64_testdata[7211] */\n    { 3606, 0x0000000000000000ULL, 0xB535443CA5910E56ULL }, /* XSUM_XXH64_testdata[7212] */\n    { 3606, 0x000000009E3779B1ULL, 0x6D3DA52AC46A5099ULL }, /* XSUM_XXH64_testdata[7213] */\n    { 3607, 0x0000000000000000ULL, 0x0644E75762030357ULL }, /* XSUM_XXH64_testdata[7214] */\n    { 3607, 0x000000009E3779B1ULL, 0x82916041CACC1F80ULL }, /* XSUM_XXH64_testdata[7215] */\n    { 3608, 0x0000000000000000ULL, 0x04506D08D4F289E4ULL }, /* XSUM_XXH64_testdata[7216] */\n    { 3608, 0x000000009E3779B1ULL, 0xA5AD8ECD9CAF87BAULL }, /* XSUM_XXH64_testdata[7217] */\n    { 3609, 0x0000000000000000ULL, 0xF599B933809492EBULL }, /* XSUM_XXH64_testdata[7218] */\n    { 3609, 0x000000009E3779B1ULL, 0x1D009D8CA1ABA2F5ULL }, /* XSUM_XXH64_testdata[7219] */\n    { 3610, 0x0000000000000000ULL, 0x65AD85A4D3D3DAE4ULL }, /* XSUM_XXH64_testdata[7220] */\n    { 3610, 0x000000009E3779B1ULL, 0x752D57433F3833C2ULL }, /* XSUM_XXH64_testdata[7221] */\n    { 3611, 0x0000000000000000ULL, 0x99F34CF83DEB6E39ULL }, /* XSUM_XXH64_testdata[7222] */\n    { 3611, 0x000000009E3779B1ULL, 0x34926508A2A765BFULL }, /* XSUM_XXH64_testdata[7223] */\n    { 3612, 0x0000000000000000ULL, 0xC4DA4B26BD0EC6CBULL }, /* XSUM_XXH64_testdata[7224] */\n    { 3612, 0x000000009E3779B1ULL, 0xEF07BF0B462AC020ULL }, /* XSUM_XXH64_testdata[7225] */\n    { 3613, 0x0000000000000000ULL, 0x69949C14D65AC396ULL }, /* XSUM_XXH64_testdata[7226] */\n    { 3613, 0x000000009E3779B1ULL, 0x6F4D310058AE4716ULL }, /* XSUM_XXH64_testdata[7227] */\n    { 3614, 0x0000000000000000ULL, 0xA321AAD0E6C53D9EULL }, /* XSUM_XXH64_testdata[7228] */\n    { 3614, 0x000000009E3779B1ULL, 0xE1C0B6F86472ED7BULL }, /* XSUM_XXH64_testdata[7229] */\n    { 3615, 0x0000000000000000ULL, 0x8E2AE8CD638340FBULL }, /* XSUM_XXH64_testdata[7230] */\n    { 3615, 0x000000009E3779B1ULL, 0x42A4572EE50D9C81ULL }, /* XSUM_XXH64_testdata[7231] */\n    { 3616, 0x0000000000000000ULL, 0x29C2502BD0EF9DC2ULL }, /* XSUM_XXH64_testdata[7232] */\n    { 3616, 0x000000009E3779B1ULL, 0xFA4B69A908B6C5A2ULL }, /* XSUM_XXH64_testdata[7233] */\n    { 3617, 0x0000000000000000ULL, 0x2168F90FAA5A5447ULL }, /* XSUM_XXH64_testdata[7234] */\n    { 3617, 0x000000009E3779B1ULL, 0xEB81E41E731AE802ULL }, /* XSUM_XXH64_testdata[7235] */\n    { 3618, 0x0000000000000000ULL, 0xBB5FC739DC0A51A1ULL }, /* XSUM_XXH64_testdata[7236] */\n    { 3618, 0x000000009E3779B1ULL, 0x11E1EB8FF4912623ULL }, /* XSUM_XXH64_testdata[7237] */\n    { 3619, 0x0000000000000000ULL, 0x75FF9BB0A8FB2415ULL }, /* XSUM_XXH64_testdata[7238] */\n    { 3619, 0x000000009E3779B1ULL, 0xCFB4696294AEBFF6ULL }, /* XSUM_XXH64_testdata[7239] */\n    { 3620, 0x0000000000000000ULL, 0xFA115AF36854BB84ULL }, /* XSUM_XXH64_testdata[7240] */\n    { 3620, 0x000000009E3779B1ULL, 0x0E257FA889BCF57CULL }, /* XSUM_XXH64_testdata[7241] */\n    { 3621, 0x0000000000000000ULL, 0x9F14CC74139EAE29ULL }, /* XSUM_XXH64_testdata[7242] */\n    { 3621, 0x000000009E3779B1ULL, 0xC5249E98EC1E5ECDULL }, /* XSUM_XXH64_testdata[7243] */\n    { 3622, 0x0000000000000000ULL, 0x6E622C07CAB35DC5ULL }, /* XSUM_XXH64_testdata[7244] */\n    { 3622, 0x000000009E3779B1ULL, 0xAD3442D01298E8E5ULL }, /* XSUM_XXH64_testdata[7245] */\n    { 3623, 0x0000000000000000ULL, 0xABB5A5D924A4B6B8ULL }, /* XSUM_XXH64_testdata[7246] */\n    { 3623, 0x000000009E3779B1ULL, 0x91449D1F3DCE0415ULL }, /* XSUM_XXH64_testdata[7247] */\n    { 3624, 0x0000000000000000ULL, 0xE0D4BF74CE466530ULL }, /* XSUM_XXH64_testdata[7248] */\n    { 3624, 0x000000009E3779B1ULL, 0xEF1CE83B22BF8D51ULL }, /* XSUM_XXH64_testdata[7249] */\n    { 3625, 0x0000000000000000ULL, 0x312872E9B42CD186ULL }, /* XSUM_XXH64_testdata[7250] */\n    { 3625, 0x000000009E3779B1ULL, 0x38F959A23EF2A5B2ULL }, /* XSUM_XXH64_testdata[7251] */\n    { 3626, 0x0000000000000000ULL, 0xC52753AA928E5771ULL }, /* XSUM_XXH64_testdata[7252] */\n    { 3626, 0x000000009E3779B1ULL, 0xA644F6DD2389009BULL }, /* XSUM_XXH64_testdata[7253] */\n    { 3627, 0x0000000000000000ULL, 0xFEF84A99D1F1EE48ULL }, /* XSUM_XXH64_testdata[7254] */\n    { 3627, 0x000000009E3779B1ULL, 0xB9589A6FF1E70D5FULL }, /* XSUM_XXH64_testdata[7255] */\n    { 3628, 0x0000000000000000ULL, 0x7622439E4262E96BULL }, /* XSUM_XXH64_testdata[7256] */\n    { 3628, 0x000000009E3779B1ULL, 0x31744B377F81D9E8ULL }, /* XSUM_XXH64_testdata[7257] */\n    { 3629, 0x0000000000000000ULL, 0x4D4A1414351AAFE6ULL }, /* XSUM_XXH64_testdata[7258] */\n    { 3629, 0x000000009E3779B1ULL, 0xF6BEE4CEA97E38D6ULL }, /* XSUM_XXH64_testdata[7259] */\n    { 3630, 0x0000000000000000ULL, 0x0C95AC52C7590FA4ULL }, /* XSUM_XXH64_testdata[7260] */\n    { 3630, 0x000000009E3779B1ULL, 0x2B40658D307BB53BULL }, /* XSUM_XXH64_testdata[7261] */\n    { 3631, 0x0000000000000000ULL, 0x894665325080243AULL }, /* XSUM_XXH64_testdata[7262] */\n    { 3631, 0x000000009E3779B1ULL, 0x0F7AC9C63CE8A66BULL }, /* XSUM_XXH64_testdata[7263] */\n    { 3632, 0x0000000000000000ULL, 0x4D9D7356FEB13A4CULL }, /* XSUM_XXH64_testdata[7264] */\n    { 3632, 0x000000009E3779B1ULL, 0x78AB48276C4AE553ULL }, /* XSUM_XXH64_testdata[7265] */\n    { 3633, 0x0000000000000000ULL, 0x74631382B4C2AF39ULL }, /* XSUM_XXH64_testdata[7266] */\n    { 3633, 0x000000009E3779B1ULL, 0x1B9D08B024FAC5D1ULL }, /* XSUM_XXH64_testdata[7267] */\n    { 3634, 0x0000000000000000ULL, 0x5B0D246F9128924CULL }, /* XSUM_XXH64_testdata[7268] */\n    { 3634, 0x000000009E3779B1ULL, 0x269C64CD8FB309D8ULL }, /* XSUM_XXH64_testdata[7269] */\n    { 3635, 0x0000000000000000ULL, 0xF053015BE643D6B0ULL }, /* XSUM_XXH64_testdata[7270] */\n    { 3635, 0x000000009E3779B1ULL, 0x71076537848A0554ULL }, /* XSUM_XXH64_testdata[7271] */\n    { 3636, 0x0000000000000000ULL, 0xB790F5B24425B4FBULL }, /* XSUM_XXH64_testdata[7272] */\n    { 3636, 0x000000009E3779B1ULL, 0xCD6EC5334159CD50ULL }, /* XSUM_XXH64_testdata[7273] */\n    { 3637, 0x0000000000000000ULL, 0x4718A52A461D5063ULL }, /* XSUM_XXH64_testdata[7274] */\n    { 3637, 0x000000009E3779B1ULL, 0xB10D2149A960ABB0ULL }, /* XSUM_XXH64_testdata[7275] */\n    { 3638, 0x0000000000000000ULL, 0x176F9C698695D4EFULL }, /* XSUM_XXH64_testdata[7276] */\n    { 3638, 0x000000009E3779B1ULL, 0xC37F39FF93668CAFULL }, /* XSUM_XXH64_testdata[7277] */\n    { 3639, 0x0000000000000000ULL, 0xA63D9341F16CDF3EULL }, /* XSUM_XXH64_testdata[7278] */\n    { 3639, 0x000000009E3779B1ULL, 0x988D299876F89271ULL }, /* XSUM_XXH64_testdata[7279] */\n    { 3640, 0x0000000000000000ULL, 0xA10691A921B5E944ULL }, /* XSUM_XXH64_testdata[7280] */\n    { 3640, 0x000000009E3779B1ULL, 0x955C79DD60610E80ULL }, /* XSUM_XXH64_testdata[7281] */\n    { 3641, 0x0000000000000000ULL, 0xE2EFBD20EA72A8BAULL }, /* XSUM_XXH64_testdata[7282] */\n    { 3641, 0x000000009E3779B1ULL, 0xEF16C6570AADDC5EULL }, /* XSUM_XXH64_testdata[7283] */\n    { 3642, 0x0000000000000000ULL, 0x7C182F0704016487ULL }, /* XSUM_XXH64_testdata[7284] */\n    { 3642, 0x000000009E3779B1ULL, 0x89FAD96BDEE7329FULL }, /* XSUM_XXH64_testdata[7285] */\n    { 3643, 0x0000000000000000ULL, 0x193C8FECA1900EBDULL }, /* XSUM_XXH64_testdata[7286] */\n    { 3643, 0x000000009E3779B1ULL, 0x9C662C584F1BD447ULL }, /* XSUM_XXH64_testdata[7287] */\n    { 3644, 0x0000000000000000ULL, 0x3091C771A52F84C5ULL }, /* XSUM_XXH64_testdata[7288] */\n    { 3644, 0x000000009E3779B1ULL, 0x020AA49588392803ULL }, /* XSUM_XXH64_testdata[7289] */\n    { 3645, 0x0000000000000000ULL, 0x730474C468DA4D9BULL }, /* XSUM_XXH64_testdata[7290] */\n    { 3645, 0x000000009E3779B1ULL, 0x7E52DBA8965A88DBULL }, /* XSUM_XXH64_testdata[7291] */\n    { 3646, 0x0000000000000000ULL, 0x73CD3ECFEF7526D3ULL }, /* XSUM_XXH64_testdata[7292] */\n    { 3646, 0x000000009E3779B1ULL, 0xEF7EBED82C6F9840ULL }, /* XSUM_XXH64_testdata[7293] */\n    { 3647, 0x0000000000000000ULL, 0x8E6F17A47F3C864BULL }, /* XSUM_XXH64_testdata[7294] */\n    { 3647, 0x000000009E3779B1ULL, 0x003359F9C41321A3ULL }, /* XSUM_XXH64_testdata[7295] */\n    { 3648, 0x0000000000000000ULL, 0x4E7ABDC64ACF4A1FULL }, /* XSUM_XXH64_testdata[7296] */\n    { 3648, 0x000000009E3779B1ULL, 0x97D2F84886343E01ULL }, /* XSUM_XXH64_testdata[7297] */\n    { 3649, 0x0000000000000000ULL, 0x2BE5D5536F9C4219ULL }, /* XSUM_XXH64_testdata[7298] */\n    { 3649, 0x000000009E3779B1ULL, 0x2924C0DA8460FCABULL }, /* XSUM_XXH64_testdata[7299] */\n    { 3650, 0x0000000000000000ULL, 0xCA2CD9A61736F8D8ULL }, /* XSUM_XXH64_testdata[7300] */\n    { 3650, 0x000000009E3779B1ULL, 0xCD325BFCF83385F6ULL }, /* XSUM_XXH64_testdata[7301] */\n    { 3651, 0x0000000000000000ULL, 0x87BA6F5CF4C92A92ULL }, /* XSUM_XXH64_testdata[7302] */\n    { 3651, 0x000000009E3779B1ULL, 0x11705FBB323F18B6ULL }, /* XSUM_XXH64_testdata[7303] */\n    { 3652, 0x0000000000000000ULL, 0xCBE8ED4901035674ULL }, /* XSUM_XXH64_testdata[7304] */\n    { 3652, 0x000000009E3779B1ULL, 0x6293C2C7A4BDFD05ULL }, /* XSUM_XXH64_testdata[7305] */\n    { 3653, 0x0000000000000000ULL, 0x7EA69200FE527EC5ULL }, /* XSUM_XXH64_testdata[7306] */\n    { 3653, 0x000000009E3779B1ULL, 0x654BC1CCE27832C2ULL }, /* XSUM_XXH64_testdata[7307] */\n    { 3654, 0x0000000000000000ULL, 0x5ED27C0F6B5FC517ULL }, /* XSUM_XXH64_testdata[7308] */\n    { 3654, 0x000000009E3779B1ULL, 0x8D76FD8C7F6BC3C7ULL }, /* XSUM_XXH64_testdata[7309] */\n    { 3655, 0x0000000000000000ULL, 0x8FCDB22F745957A3ULL }, /* XSUM_XXH64_testdata[7310] */\n    { 3655, 0x000000009E3779B1ULL, 0xD8D2F5213DC3F453ULL }, /* XSUM_XXH64_testdata[7311] */\n    { 3656, 0x0000000000000000ULL, 0x04376CD3D4233EA2ULL }, /* XSUM_XXH64_testdata[7312] */\n    { 3656, 0x000000009E3779B1ULL, 0xE455CCEE30D380E5ULL }, /* XSUM_XXH64_testdata[7313] */\n    { 3657, 0x0000000000000000ULL, 0xEA4DC21B73C16C45ULL }, /* XSUM_XXH64_testdata[7314] */\n    { 3657, 0x000000009E3779B1ULL, 0x69C0FB3C0788E3EEULL }, /* XSUM_XXH64_testdata[7315] */\n    { 3658, 0x0000000000000000ULL, 0x13D445AFC6CE2BA3ULL }, /* XSUM_XXH64_testdata[7316] */\n    { 3658, 0x000000009E3779B1ULL, 0xC5BE658587AEC331ULL }, /* XSUM_XXH64_testdata[7317] */\n    { 3659, 0x0000000000000000ULL, 0x2B5DF4569E912323ULL }, /* XSUM_XXH64_testdata[7318] */\n    { 3659, 0x000000009E3779B1ULL, 0x571DCA5EC5FED99AULL }, /* XSUM_XXH64_testdata[7319] */\n    { 3660, 0x0000000000000000ULL, 0xC9FAED347179FB4CULL }, /* XSUM_XXH64_testdata[7320] */\n    { 3660, 0x000000009E3779B1ULL, 0x65E817E81B5F1943ULL }, /* XSUM_XXH64_testdata[7321] */\n    { 3661, 0x0000000000000000ULL, 0xC5E13E539BC53E81ULL }, /* XSUM_XXH64_testdata[7322] */\n    { 3661, 0x000000009E3779B1ULL, 0xCF6E097C4A3A59AFULL }, /* XSUM_XXH64_testdata[7323] */\n    { 3662, 0x0000000000000000ULL, 0xEB75A7E3EC5C70F5ULL }, /* XSUM_XXH64_testdata[7324] */\n    { 3662, 0x000000009E3779B1ULL, 0xEFF7BAD68471D17DULL }, /* XSUM_XXH64_testdata[7325] */\n    { 3663, 0x0000000000000000ULL, 0x9008DD83611490A1ULL }, /* XSUM_XXH64_testdata[7326] */\n    { 3663, 0x000000009E3779B1ULL, 0x0214A64ED40F8CCEULL }, /* XSUM_XXH64_testdata[7327] */\n    { 3664, 0x0000000000000000ULL, 0x7848AF3CACEBD96FULL }, /* XSUM_XXH64_testdata[7328] */\n    { 3664, 0x000000009E3779B1ULL, 0x6C92790AC27791A8ULL }, /* XSUM_XXH64_testdata[7329] */\n    { 3665, 0x0000000000000000ULL, 0xEE16E3738A447E33ULL }, /* XSUM_XXH64_testdata[7330] */\n    { 3665, 0x000000009E3779B1ULL, 0x7360A3655B571685ULL }, /* XSUM_XXH64_testdata[7331] */\n    { 3666, 0x0000000000000000ULL, 0xFDE4A6C46FD75C8AULL }, /* XSUM_XXH64_testdata[7332] */\n    { 3666, 0x000000009E3779B1ULL, 0xACCDC78AB3EAFB12ULL }, /* XSUM_XXH64_testdata[7333] */\n    { 3667, 0x0000000000000000ULL, 0x89C2F9A7ED5ADBF6ULL }, /* XSUM_XXH64_testdata[7334] */\n    { 3667, 0x000000009E3779B1ULL, 0xD0FE1788FDF1DDBFULL }, /* XSUM_XXH64_testdata[7335] */\n    { 3668, 0x0000000000000000ULL, 0x79655B0723CBC862ULL }, /* XSUM_XXH64_testdata[7336] */\n    { 3668, 0x000000009E3779B1ULL, 0x026FC37BB041E570ULL }, /* XSUM_XXH64_testdata[7337] */\n    { 3669, 0x0000000000000000ULL, 0x918931336EA8363EULL }, /* XSUM_XXH64_testdata[7338] */\n    { 3669, 0x000000009E3779B1ULL, 0x56370886E674B097ULL }, /* XSUM_XXH64_testdata[7339] */\n    { 3670, 0x0000000000000000ULL, 0x4C053447AFB4D680ULL }, /* XSUM_XXH64_testdata[7340] */\n    { 3670, 0x000000009E3779B1ULL, 0xE2AC3443C3A7976FULL }, /* XSUM_XXH64_testdata[7341] */\n    { 3671, 0x0000000000000000ULL, 0x361B34B6FFC029D8ULL }, /* XSUM_XXH64_testdata[7342] */\n    { 3671, 0x000000009E3779B1ULL, 0x824E22E34E4FB034ULL }, /* XSUM_XXH64_testdata[7343] */\n    { 3672, 0x0000000000000000ULL, 0x73689BD8AA14AFE7ULL }, /* XSUM_XXH64_testdata[7344] */\n    { 3672, 0x000000009E3779B1ULL, 0xF816E1BF1E98A371ULL }, /* XSUM_XXH64_testdata[7345] */\n    { 3673, 0x0000000000000000ULL, 0x300BE0248F7F1180ULL }, /* XSUM_XXH64_testdata[7346] */\n    { 3673, 0x000000009E3779B1ULL, 0x728EB31FC44CF641ULL }, /* XSUM_XXH64_testdata[7347] */\n    { 3674, 0x0000000000000000ULL, 0x78B5EC74E9FBD422ULL }, /* XSUM_XXH64_testdata[7348] */\n    { 3674, 0x000000009E3779B1ULL, 0x013B7A46C02C93A1ULL }, /* XSUM_XXH64_testdata[7349] */\n    { 3675, 0x0000000000000000ULL, 0x119C7C53D5BB8261ULL }, /* XSUM_XXH64_testdata[7350] */\n    { 3675, 0x000000009E3779B1ULL, 0x9E729BE04B2495E3ULL }, /* XSUM_XXH64_testdata[7351] */\n    { 3676, 0x0000000000000000ULL, 0x6762D2528229BDF0ULL }, /* XSUM_XXH64_testdata[7352] */\n    { 3676, 0x000000009E3779B1ULL, 0x4CF7F38D5103008EULL }, /* XSUM_XXH64_testdata[7353] */\n    { 3677, 0x0000000000000000ULL, 0x913DB39D8A005471ULL }, /* XSUM_XXH64_testdata[7354] */\n    { 3677, 0x000000009E3779B1ULL, 0xCFC1FB16B1B28C06ULL }, /* XSUM_XXH64_testdata[7355] */\n    { 3678, 0x0000000000000000ULL, 0x2AD94B81BF47FD9AULL }, /* XSUM_XXH64_testdata[7356] */\n    { 3678, 0x000000009E3779B1ULL, 0xF40FEB74FDC5044AULL }, /* XSUM_XXH64_testdata[7357] */\n    { 3679, 0x0000000000000000ULL, 0xFA24EB2877031782ULL }, /* XSUM_XXH64_testdata[7358] */\n    { 3679, 0x000000009E3779B1ULL, 0x9860334FA52A814CULL }, /* XSUM_XXH64_testdata[7359] */\n    { 3680, 0x0000000000000000ULL, 0x28FEA24FB3C321FDULL }, /* XSUM_XXH64_testdata[7360] */\n    { 3680, 0x000000009E3779B1ULL, 0xFED061ED8ECC0736ULL }, /* XSUM_XXH64_testdata[7361] */\n    { 3681, 0x0000000000000000ULL, 0x8E6C392983777F5FULL }, /* XSUM_XXH64_testdata[7362] */\n    { 3681, 0x000000009E3779B1ULL, 0x8E251050DA04085BULL }, /* XSUM_XXH64_testdata[7363] */\n    { 3682, 0x0000000000000000ULL, 0x4CA60BD7874EEA91ULL }, /* XSUM_XXH64_testdata[7364] */\n    { 3682, 0x000000009E3779B1ULL, 0xCA90C1AAF1F9757EULL }, /* XSUM_XXH64_testdata[7365] */\n    { 3683, 0x0000000000000000ULL, 0xBD05215804B82411ULL }, /* XSUM_XXH64_testdata[7366] */\n    { 3683, 0x000000009E3779B1ULL, 0xB3DC92D42F3EA151ULL }, /* XSUM_XXH64_testdata[7367] */\n    { 3684, 0x0000000000000000ULL, 0x519A59A46EAC5FEAULL }, /* XSUM_XXH64_testdata[7368] */\n    { 3684, 0x000000009E3779B1ULL, 0xC8DBA4C2E73EE8A7ULL }, /* XSUM_XXH64_testdata[7369] */\n    { 3685, 0x0000000000000000ULL, 0x035F75D3ECB6B228ULL }, /* XSUM_XXH64_testdata[7370] */\n    { 3685, 0x000000009E3779B1ULL, 0x0A61A02C224B011DULL }, /* XSUM_XXH64_testdata[7371] */\n    { 3686, 0x0000000000000000ULL, 0x8028658D7FE5BAD3ULL }, /* XSUM_XXH64_testdata[7372] */\n    { 3686, 0x000000009E3779B1ULL, 0x48C8D3C29C5F2979ULL }, /* XSUM_XXH64_testdata[7373] */\n    { 3687, 0x0000000000000000ULL, 0x3C2F628B953455BDULL }, /* XSUM_XXH64_testdata[7374] */\n    { 3687, 0x000000009E3779B1ULL, 0x262FF3733ECF4B9AULL }, /* XSUM_XXH64_testdata[7375] */\n    { 3688, 0x0000000000000000ULL, 0x15920B9C0F3B0822ULL }, /* XSUM_XXH64_testdata[7376] */\n    { 3688, 0x000000009E3779B1ULL, 0xCAE90A0477210681ULL }, /* XSUM_XXH64_testdata[7377] */\n    { 3689, 0x0000000000000000ULL, 0x9762979B1CE5D015ULL }, /* XSUM_XXH64_testdata[7378] */\n    { 3689, 0x000000009E3779B1ULL, 0xD896DE5F2956D4FEULL }, /* XSUM_XXH64_testdata[7379] */\n    { 3690, 0x0000000000000000ULL, 0x871577712504B652ULL }, /* XSUM_XXH64_testdata[7380] */\n    { 3690, 0x000000009E3779B1ULL, 0xFDB320DAE5F4B7E1ULL }, /* XSUM_XXH64_testdata[7381] */\n    { 3691, 0x0000000000000000ULL, 0x2C6C649386C3D439ULL }, /* XSUM_XXH64_testdata[7382] */\n    { 3691, 0x000000009E3779B1ULL, 0x0BEC1F5275E4908AULL }, /* XSUM_XXH64_testdata[7383] */\n    { 3692, 0x0000000000000000ULL, 0xEF79B2FD16D16960ULL }, /* XSUM_XXH64_testdata[7384] */\n    { 3692, 0x000000009E3779B1ULL, 0x55B72555047F2BDEULL }, /* XSUM_XXH64_testdata[7385] */\n    { 3693, 0x0000000000000000ULL, 0x78D705AA9A2C28F9ULL }, /* XSUM_XXH64_testdata[7386] */\n    { 3693, 0x000000009E3779B1ULL, 0xD37E9B60DC207243ULL }, /* XSUM_XXH64_testdata[7387] */\n    { 3694, 0x0000000000000000ULL, 0x79F36AD4AF75183AULL }, /* XSUM_XXH64_testdata[7388] */\n    { 3694, 0x000000009E3779B1ULL, 0x4F10240371FF761EULL }, /* XSUM_XXH64_testdata[7389] */\n    { 3695, 0x0000000000000000ULL, 0x2211CF5198088CDCULL }, /* XSUM_XXH64_testdata[7390] */\n    { 3695, 0x000000009E3779B1ULL, 0x01A860FDB04E4A05ULL }, /* XSUM_XXH64_testdata[7391] */\n    { 3696, 0x0000000000000000ULL, 0x44B213D3B8D28436ULL }, /* XSUM_XXH64_testdata[7392] */\n    { 3696, 0x000000009E3779B1ULL, 0x2BAEE3F521CB09AFULL }, /* XSUM_XXH64_testdata[7393] */\n    { 3697, 0x0000000000000000ULL, 0xE45A77798CB26F0AULL }, /* XSUM_XXH64_testdata[7394] */\n    { 3697, 0x000000009E3779B1ULL, 0x1617A63AA2A84A46ULL }, /* XSUM_XXH64_testdata[7395] */\n    { 3698, 0x0000000000000000ULL, 0x8040B906ED5AB977ULL }, /* XSUM_XXH64_testdata[7396] */\n    { 3698, 0x000000009E3779B1ULL, 0x95C9786883893E65ULL }, /* XSUM_XXH64_testdata[7397] */\n    { 3699, 0x0000000000000000ULL, 0xC3E8E89435BFFF17ULL }, /* XSUM_XXH64_testdata[7398] */\n    { 3699, 0x000000009E3779B1ULL, 0xDFDEE7839B5839E8ULL }, /* XSUM_XXH64_testdata[7399] */\n    { 3700, 0x0000000000000000ULL, 0xC5BC9E1CD3897537ULL }, /* XSUM_XXH64_testdata[7400] */\n    { 3700, 0x000000009E3779B1ULL, 0xA7CDE75A29551A8CULL }, /* XSUM_XXH64_testdata[7401] */\n    { 3701, 0x0000000000000000ULL, 0x2D70A1BD8C35D964ULL }, /* XSUM_XXH64_testdata[7402] */\n    { 3701, 0x000000009E3779B1ULL, 0x969DF4152E6627AEULL }, /* XSUM_XXH64_testdata[7403] */\n    { 3702, 0x0000000000000000ULL, 0xC7B337097B1E05B7ULL }, /* XSUM_XXH64_testdata[7404] */\n    { 3702, 0x000000009E3779B1ULL, 0xDE2AC6707CAF897BULL }, /* XSUM_XXH64_testdata[7405] */\n    { 3703, 0x0000000000000000ULL, 0xE9F2BB817912913EULL }, /* XSUM_XXH64_testdata[7406] */\n    { 3703, 0x000000009E3779B1ULL, 0x63ABB8B60589C6FEULL }, /* XSUM_XXH64_testdata[7407] */\n    { 3704, 0x0000000000000000ULL, 0x1CBF6F0D780BB809ULL }, /* XSUM_XXH64_testdata[7408] */\n    { 3704, 0x000000009E3779B1ULL, 0x507B28B4478DD8B7ULL }, /* XSUM_XXH64_testdata[7409] */\n    { 3705, 0x0000000000000000ULL, 0xC6134562A95F79E7ULL }, /* XSUM_XXH64_testdata[7410] */\n    { 3705, 0x000000009E3779B1ULL, 0xCBEE81CF253F0CAFULL }, /* XSUM_XXH64_testdata[7411] */\n    { 3706, 0x0000000000000000ULL, 0x69BDA66619584041ULL }, /* XSUM_XXH64_testdata[7412] */\n    { 3706, 0x000000009E3779B1ULL, 0xB412DD55A8377C75ULL }, /* XSUM_XXH64_testdata[7413] */\n    { 3707, 0x0000000000000000ULL, 0x060204EABEC512EDULL }, /* XSUM_XXH64_testdata[7414] */\n    { 3707, 0x000000009E3779B1ULL, 0x5F8678FE4DE9C528ULL }, /* XSUM_XXH64_testdata[7415] */\n    { 3708, 0x0000000000000000ULL, 0x11878E94C0162278ULL }, /* XSUM_XXH64_testdata[7416] */\n    { 3708, 0x000000009E3779B1ULL, 0xC61E27B0544CC737ULL }, /* XSUM_XXH64_testdata[7417] */\n    { 3709, 0x0000000000000000ULL, 0xF645136A9C26905BULL }, /* XSUM_XXH64_testdata[7418] */\n    { 3709, 0x000000009E3779B1ULL, 0xF965522429F521B6ULL }, /* XSUM_XXH64_testdata[7419] */\n    { 3710, 0x0000000000000000ULL, 0x4DDE8F18A7D6ADD2ULL }, /* XSUM_XXH64_testdata[7420] */\n    { 3710, 0x000000009E3779B1ULL, 0x0281E48041A794E0ULL }, /* XSUM_XXH64_testdata[7421] */\n    { 3711, 0x0000000000000000ULL, 0x58593E9C350365AAULL }, /* XSUM_XXH64_testdata[7422] */\n    { 3711, 0x000000009E3779B1ULL, 0x79EEEE4593551F1FULL }, /* XSUM_XXH64_testdata[7423] */\n    { 3712, 0x0000000000000000ULL, 0x0E206A2AA052224AULL }, /* XSUM_XXH64_testdata[7424] */\n    { 3712, 0x000000009E3779B1ULL, 0x0BB9DA17AEFE5704ULL }, /* XSUM_XXH64_testdata[7425] */\n    { 3713, 0x0000000000000000ULL, 0xD36238644B7B86C6ULL }, /* XSUM_XXH64_testdata[7426] */\n    { 3713, 0x000000009E3779B1ULL, 0xCC7EE9AE1DB1313CULL }, /* XSUM_XXH64_testdata[7427] */\n    { 3714, 0x0000000000000000ULL, 0x1D3EFC3700847A74ULL }, /* XSUM_XXH64_testdata[7428] */\n    { 3714, 0x000000009E3779B1ULL, 0x8388690AC31655FFULL }, /* XSUM_XXH64_testdata[7429] */\n    { 3715, 0x0000000000000000ULL, 0xE9102409F7F9851AULL }, /* XSUM_XXH64_testdata[7430] */\n    { 3715, 0x000000009E3779B1ULL, 0xACC0ECF27BC0F5F7ULL }, /* XSUM_XXH64_testdata[7431] */\n    { 3716, 0x0000000000000000ULL, 0x2C61081EEB745AD3ULL }, /* XSUM_XXH64_testdata[7432] */\n    { 3716, 0x000000009E3779B1ULL, 0xA0D912A8150D6C2AULL }, /* XSUM_XXH64_testdata[7433] */\n    { 3717, 0x0000000000000000ULL, 0xDEA11F07ECFBE311ULL }, /* XSUM_XXH64_testdata[7434] */\n    { 3717, 0x000000009E3779B1ULL, 0xE756D2262966BE70ULL }, /* XSUM_XXH64_testdata[7435] */\n    { 3718, 0x0000000000000000ULL, 0x634E41678C50EB66ULL }, /* XSUM_XXH64_testdata[7436] */\n    { 3718, 0x000000009E3779B1ULL, 0x27EF0172AEC26D2FULL }, /* XSUM_XXH64_testdata[7437] */\n    { 3719, 0x0000000000000000ULL, 0xFAA0C88E80DED9D5ULL }, /* XSUM_XXH64_testdata[7438] */\n    { 3719, 0x000000009E3779B1ULL, 0xEC4E1DA894D80B7EULL }, /* XSUM_XXH64_testdata[7439] */\n    { 3720, 0x0000000000000000ULL, 0x04CB8EF3FA4CADCCULL }, /* XSUM_XXH64_testdata[7440] */\n    { 3720, 0x000000009E3779B1ULL, 0x2A037D40BA9B4773ULL }, /* XSUM_XXH64_testdata[7441] */\n    { 3721, 0x0000000000000000ULL, 0xFCFDD48275385D69ULL }, /* XSUM_XXH64_testdata[7442] */\n    { 3721, 0x000000009E3779B1ULL, 0x688D0FCBB136B7F9ULL }, /* XSUM_XXH64_testdata[7443] */\n    { 3722, 0x0000000000000000ULL, 0xDF40ECBABCF8E595ULL }, /* XSUM_XXH64_testdata[7444] */\n    { 3722, 0x000000009E3779B1ULL, 0x4D046D706E65E729ULL }, /* XSUM_XXH64_testdata[7445] */\n    { 3723, 0x0000000000000000ULL, 0xC4527A02881104ADULL }, /* XSUM_XXH64_testdata[7446] */\n    { 3723, 0x000000009E3779B1ULL, 0x5571BDAFAC51CDBFULL }, /* XSUM_XXH64_testdata[7447] */\n    { 3724, 0x0000000000000000ULL, 0x67BD956E5527F315ULL }, /* XSUM_XXH64_testdata[7448] */\n    { 3724, 0x000000009E3779B1ULL, 0xB9753D7971683F85ULL }, /* XSUM_XXH64_testdata[7449] */\n    { 3725, 0x0000000000000000ULL, 0x21004595AA447AF7ULL }, /* XSUM_XXH64_testdata[7450] */\n    { 3725, 0x000000009E3779B1ULL, 0x4CD4D6348BACD3D0ULL }, /* XSUM_XXH64_testdata[7451] */\n    { 3726, 0x0000000000000000ULL, 0xC8CD86E6B90E367DULL }, /* XSUM_XXH64_testdata[7452] */\n    { 3726, 0x000000009E3779B1ULL, 0x38AEDF4903325397ULL }, /* XSUM_XXH64_testdata[7453] */\n    { 3727, 0x0000000000000000ULL, 0xB73A083620E73BAFULL }, /* XSUM_XXH64_testdata[7454] */\n    { 3727, 0x000000009E3779B1ULL, 0x224717FED615BE2AULL }, /* XSUM_XXH64_testdata[7455] */\n    { 3728, 0x0000000000000000ULL, 0x1A902047AF492EBEULL }, /* XSUM_XXH64_testdata[7456] */\n    { 3728, 0x000000009E3779B1ULL, 0xFC7F2CFC0BF810DDULL }, /* XSUM_XXH64_testdata[7457] */\n    { 3729, 0x0000000000000000ULL, 0xC46065273CC65F32ULL }, /* XSUM_XXH64_testdata[7458] */\n    { 3729, 0x000000009E3779B1ULL, 0xE7571EF61DB5E70CULL }, /* XSUM_XXH64_testdata[7459] */\n    { 3730, 0x0000000000000000ULL, 0xA416900DE4DA153DULL }, /* XSUM_XXH64_testdata[7460] */\n    { 3730, 0x000000009E3779B1ULL, 0x34F11A1F91E0F3DEULL }, /* XSUM_XXH64_testdata[7461] */\n    { 3731, 0x0000000000000000ULL, 0x51627E4DC84F3738ULL }, /* XSUM_XXH64_testdata[7462] */\n    { 3731, 0x000000009E3779B1ULL, 0x88D0EB700C438772ULL }, /* XSUM_XXH64_testdata[7463] */\n    { 3732, 0x0000000000000000ULL, 0x82989926C070EC00ULL }, /* XSUM_XXH64_testdata[7464] */\n    { 3732, 0x000000009E3779B1ULL, 0x64CC2FB5794D0DBEULL }, /* XSUM_XXH64_testdata[7465] */\n    { 3733, 0x0000000000000000ULL, 0x51480C63D149DE45ULL }, /* XSUM_XXH64_testdata[7466] */\n    { 3733, 0x000000009E3779B1ULL, 0xBD0C7AF665AD514DULL }, /* XSUM_XXH64_testdata[7467] */\n    { 3734, 0x0000000000000000ULL, 0xA3D8709AB9242031ULL }, /* XSUM_XXH64_testdata[7468] */\n    { 3734, 0x000000009E3779B1ULL, 0x96A158D8510BC871ULL }, /* XSUM_XXH64_testdata[7469] */\n    { 3735, 0x0000000000000000ULL, 0x4329651B0DF10BBBULL }, /* XSUM_XXH64_testdata[7470] */\n    { 3735, 0x000000009E3779B1ULL, 0x093A620FB01DF2D7ULL }, /* XSUM_XXH64_testdata[7471] */\n    { 3736, 0x0000000000000000ULL, 0x8F7728D4A7A55B2DULL }, /* XSUM_XXH64_testdata[7472] */\n    { 3736, 0x000000009E3779B1ULL, 0x3EC68BD954F08A2CULL }, /* XSUM_XXH64_testdata[7473] */\n    { 3737, 0x0000000000000000ULL, 0xE0A7D1DE1E291466ULL }, /* XSUM_XXH64_testdata[7474] */\n    { 3737, 0x000000009E3779B1ULL, 0x0B70937325A56B9EULL }, /* XSUM_XXH64_testdata[7475] */\n    { 3738, 0x0000000000000000ULL, 0x3645BE033C971C85ULL }, /* XSUM_XXH64_testdata[7476] */\n    { 3738, 0x000000009E3779B1ULL, 0xB5E661297D1BE4F8ULL }, /* XSUM_XXH64_testdata[7477] */\n    { 3739, 0x0000000000000000ULL, 0xCD6FDBBF6A5CF1F9ULL }, /* XSUM_XXH64_testdata[7478] */\n    { 3739, 0x000000009E3779B1ULL, 0x39F7B31F439332B2ULL }, /* XSUM_XXH64_testdata[7479] */\n    { 3740, 0x0000000000000000ULL, 0xE1599403FB967D71ULL }, /* XSUM_XXH64_testdata[7480] */\n    { 3740, 0x000000009E3779B1ULL, 0xB7A2EA37FE4D46DEULL }, /* XSUM_XXH64_testdata[7481] */\n    { 3741, 0x0000000000000000ULL, 0x3FBA63EB417B8A14ULL }, /* XSUM_XXH64_testdata[7482] */\n    { 3741, 0x000000009E3779B1ULL, 0xD9EE28399CDB520BULL }, /* XSUM_XXH64_testdata[7483] */\n    { 3742, 0x0000000000000000ULL, 0xDF6F54618601BF98ULL }, /* XSUM_XXH64_testdata[7484] */\n    { 3742, 0x000000009E3779B1ULL, 0x8180F2BC1EA5A9E9ULL }, /* XSUM_XXH64_testdata[7485] */\n    { 3743, 0x0000000000000000ULL, 0x56A23D81D6D88637ULL }, /* XSUM_XXH64_testdata[7486] */\n    { 3743, 0x000000009E3779B1ULL, 0x676E38B4FFFE7A75ULL }, /* XSUM_XXH64_testdata[7487] */\n    { 3744, 0x0000000000000000ULL, 0xEBFFC4AE3FABA5E7ULL }, /* XSUM_XXH64_testdata[7488] */\n    { 3744, 0x000000009E3779B1ULL, 0xE0CCBAED790C7199ULL }, /* XSUM_XXH64_testdata[7489] */\n    { 3745, 0x0000000000000000ULL, 0x470BA8548A70528FULL }, /* XSUM_XXH64_testdata[7490] */\n    { 3745, 0x000000009E3779B1ULL, 0x82515FFE94ECA053ULL }, /* XSUM_XXH64_testdata[7491] */\n    { 3746, 0x0000000000000000ULL, 0xC0D62110C3A34D40ULL }, /* XSUM_XXH64_testdata[7492] */\n    { 3746, 0x000000009E3779B1ULL, 0x9BF2F4D220BFC27FULL }, /* XSUM_XXH64_testdata[7493] */\n    { 3747, 0x0000000000000000ULL, 0x7C26066F0C0CC692ULL }, /* XSUM_XXH64_testdata[7494] */\n    { 3747, 0x000000009E3779B1ULL, 0x43A3AA137C6A0166ULL }, /* XSUM_XXH64_testdata[7495] */\n    { 3748, 0x0000000000000000ULL, 0x82651A33EADF8141ULL }, /* XSUM_XXH64_testdata[7496] */\n    { 3748, 0x000000009E3779B1ULL, 0xD5E880A785F3A924ULL }, /* XSUM_XXH64_testdata[7497] */\n    { 3749, 0x0000000000000000ULL, 0xACA3871D26D7FB7CULL }, /* XSUM_XXH64_testdata[7498] */\n    { 3749, 0x000000009E3779B1ULL, 0x2D761FC93C139AA0ULL }, /* XSUM_XXH64_testdata[7499] */\n    { 3750, 0x0000000000000000ULL, 0x425B92D7E123AE17ULL }, /* XSUM_XXH64_testdata[7500] */\n    { 3750, 0x000000009E3779B1ULL, 0x5392397D97129280ULL }, /* XSUM_XXH64_testdata[7501] */\n    { 3751, 0x0000000000000000ULL, 0x27AE536C7B38E843ULL }, /* XSUM_XXH64_testdata[7502] */\n    { 3751, 0x000000009E3779B1ULL, 0x1EF11592999C6026ULL }, /* XSUM_XXH64_testdata[7503] */\n    { 3752, 0x0000000000000000ULL, 0x29AAF9A858A933E7ULL }, /* XSUM_XXH64_testdata[7504] */\n    { 3752, 0x000000009E3779B1ULL, 0x969F89A99D1F9236ULL }, /* XSUM_XXH64_testdata[7505] */\n    { 3753, 0x0000000000000000ULL, 0x00A789E2F0F7F2E5ULL }, /* XSUM_XXH64_testdata[7506] */\n    { 3753, 0x000000009E3779B1ULL, 0x45089C59D286C749ULL }, /* XSUM_XXH64_testdata[7507] */\n    { 3754, 0x0000000000000000ULL, 0xE26F0759D4BBE9EEULL }, /* XSUM_XXH64_testdata[7508] */\n    { 3754, 0x000000009E3779B1ULL, 0x0A1CEA21B94C2965ULL }, /* XSUM_XXH64_testdata[7509] */\n    { 3755, 0x0000000000000000ULL, 0x3C06419B84B4F1EBULL }, /* XSUM_XXH64_testdata[7510] */\n    { 3755, 0x000000009E3779B1ULL, 0xB231FB96682EE02DULL }, /* XSUM_XXH64_testdata[7511] */\n    { 3756, 0x0000000000000000ULL, 0x31CD5F53848846FDULL }, /* XSUM_XXH64_testdata[7512] */\n    { 3756, 0x000000009E3779B1ULL, 0x42FAD29D2F93340EULL }, /* XSUM_XXH64_testdata[7513] */\n    { 3757, 0x0000000000000000ULL, 0x63FDAB5A023A0C4BULL }, /* XSUM_XXH64_testdata[7514] */\n    { 3757, 0x000000009E3779B1ULL, 0xEA93A5EED4350696ULL }, /* XSUM_XXH64_testdata[7515] */\n    { 3758, 0x0000000000000000ULL, 0x6CE394EFA1AA4C18ULL }, /* XSUM_XXH64_testdata[7516] */\n    { 3758, 0x000000009E3779B1ULL, 0x0A250F8BDB9F8225ULL }, /* XSUM_XXH64_testdata[7517] */\n    { 3759, 0x0000000000000000ULL, 0x8C85F07ACFFBA411ULL }, /* XSUM_XXH64_testdata[7518] */\n    { 3759, 0x000000009E3779B1ULL, 0x309709D5ADCC9E0CULL }, /* XSUM_XXH64_testdata[7519] */\n    { 3760, 0x0000000000000000ULL, 0x5B08C6D3A2C9C6BBULL }, /* XSUM_XXH64_testdata[7520] */\n    { 3760, 0x000000009E3779B1ULL, 0x3CDDBBFE528C6765ULL }, /* XSUM_XXH64_testdata[7521] */\n    { 3761, 0x0000000000000000ULL, 0x41A183EEB3757D34ULL }, /* XSUM_XXH64_testdata[7522] */\n    { 3761, 0x000000009E3779B1ULL, 0x61D0736E4E93A52AULL }, /* XSUM_XXH64_testdata[7523] */\n    { 3762, 0x0000000000000000ULL, 0x321FC374C19AB799ULL }, /* XSUM_XXH64_testdata[7524] */\n    { 3762, 0x000000009E3779B1ULL, 0x2BFCD670AE648D4BULL }, /* XSUM_XXH64_testdata[7525] */\n    { 3763, 0x0000000000000000ULL, 0xA0A70501A4E64172ULL }, /* XSUM_XXH64_testdata[7526] */\n    { 3763, 0x000000009E3779B1ULL, 0x4F60E972194C489BULL }, /* XSUM_XXH64_testdata[7527] */\n    { 3764, 0x0000000000000000ULL, 0x08A97974AEB5151EULL }, /* XSUM_XXH64_testdata[7528] */\n    { 3764, 0x000000009E3779B1ULL, 0xEDA0124C5692DBF3ULL }, /* XSUM_XXH64_testdata[7529] */\n    { 3765, 0x0000000000000000ULL, 0x130D740E72014992ULL }, /* XSUM_XXH64_testdata[7530] */\n    { 3765, 0x000000009E3779B1ULL, 0xDEC713B1E305AFB4ULL }, /* XSUM_XXH64_testdata[7531] */\n    { 3766, 0x0000000000000000ULL, 0x47EC4FB6150DCE9AULL }, /* XSUM_XXH64_testdata[7532] */\n    { 3766, 0x000000009E3779B1ULL, 0xD62EA7182CE03526ULL }, /* XSUM_XXH64_testdata[7533] */\n    { 3767, 0x0000000000000000ULL, 0x942CD058CE1A7349ULL }, /* XSUM_XXH64_testdata[7534] */\n    { 3767, 0x000000009E3779B1ULL, 0xFF9B5D8CA5B1ABE3ULL }, /* XSUM_XXH64_testdata[7535] */\n    { 3768, 0x0000000000000000ULL, 0x3B8BEB75D3B4260BULL }, /* XSUM_XXH64_testdata[7536] */\n    { 3768, 0x000000009E3779B1ULL, 0xC30B6C94A70FBE18ULL }, /* XSUM_XXH64_testdata[7537] */\n    { 3769, 0x0000000000000000ULL, 0x5CAFC9B46F1DE835ULL }, /* XSUM_XXH64_testdata[7538] */\n    { 3769, 0x000000009E3779B1ULL, 0x46E23120FCCD82A8ULL }, /* XSUM_XXH64_testdata[7539] */\n    { 3770, 0x0000000000000000ULL, 0x12FE2DDA1686FBDCULL }, /* XSUM_XXH64_testdata[7540] */\n    { 3770, 0x000000009E3779B1ULL, 0x80CE0F7D543E417BULL }, /* XSUM_XXH64_testdata[7541] */\n    { 3771, 0x0000000000000000ULL, 0x34FD16216F7A5693ULL }, /* XSUM_XXH64_testdata[7542] */\n    { 3771, 0x000000009E3779B1ULL, 0x3A4965D4A1F7B90DULL }, /* XSUM_XXH64_testdata[7543] */\n    { 3772, 0x0000000000000000ULL, 0x6E71B853542B84AAULL }, /* XSUM_XXH64_testdata[7544] */\n    { 3772, 0x000000009E3779B1ULL, 0xFA7AB5B37A0C6756ULL }, /* XSUM_XXH64_testdata[7545] */\n    { 3773, 0x0000000000000000ULL, 0x62D315074A9BA433ULL }, /* XSUM_XXH64_testdata[7546] */\n    { 3773, 0x000000009E3779B1ULL, 0xA80C6C2BF850278EULL }, /* XSUM_XXH64_testdata[7547] */\n    { 3774, 0x0000000000000000ULL, 0x2876679BBE30A470ULL }, /* XSUM_XXH64_testdata[7548] */\n    { 3774, 0x000000009E3779B1ULL, 0xC47A1CE45B6317B1ULL }, /* XSUM_XXH64_testdata[7549] */\n    { 3775, 0x0000000000000000ULL, 0x1926499BAC716AF6ULL }, /* XSUM_XXH64_testdata[7550] */\n    { 3775, 0x000000009E3779B1ULL, 0x22D5FA8083F1C653ULL }, /* XSUM_XXH64_testdata[7551] */\n    { 3776, 0x0000000000000000ULL, 0x28DABBF9DB4423FFULL }, /* XSUM_XXH64_testdata[7552] */\n    { 3776, 0x000000009E3779B1ULL, 0x9CB6BF77DA9DA979ULL }, /* XSUM_XXH64_testdata[7553] */\n    { 3777, 0x0000000000000000ULL, 0xB3DB9E830D96C2F6ULL }, /* XSUM_XXH64_testdata[7554] */\n    { 3777, 0x000000009E3779B1ULL, 0x3935336832A1F82EULL }, /* XSUM_XXH64_testdata[7555] */\n    { 3778, 0x0000000000000000ULL, 0x7AD17F350B8C34BFULL }, /* XSUM_XXH64_testdata[7556] */\n    { 3778, 0x000000009E3779B1ULL, 0xD13693C4DD1B054DULL }, /* XSUM_XXH64_testdata[7557] */\n    { 3779, 0x0000000000000000ULL, 0x38609FEEEE44875EULL }, /* XSUM_XXH64_testdata[7558] */\n    { 3779, 0x000000009E3779B1ULL, 0x1AE2B9C8D34BD565ULL }, /* XSUM_XXH64_testdata[7559] */\n    { 3780, 0x0000000000000000ULL, 0x9D418C8E53BAE5EBULL }, /* XSUM_XXH64_testdata[7560] */\n    { 3780, 0x000000009E3779B1ULL, 0x948939A1DBA6DC69ULL }, /* XSUM_XXH64_testdata[7561] */\n    { 3781, 0x0000000000000000ULL, 0x33152B6275463B15ULL }, /* XSUM_XXH64_testdata[7562] */\n    { 3781, 0x000000009E3779B1ULL, 0xB62A7080066AB26CULL }, /* XSUM_XXH64_testdata[7563] */\n    { 3782, 0x0000000000000000ULL, 0xFE8830373FFC5922ULL }, /* XSUM_XXH64_testdata[7564] */\n    { 3782, 0x000000009E3779B1ULL, 0xE086B86BFCF85A59ULL }, /* XSUM_XXH64_testdata[7565] */\n    { 3783, 0x0000000000000000ULL, 0xBF7F5ED284FCE6ABULL }, /* XSUM_XXH64_testdata[7566] */\n    { 3783, 0x000000009E3779B1ULL, 0xC5EF1C16EF49B92CULL }, /* XSUM_XXH64_testdata[7567] */\n    { 3784, 0x0000000000000000ULL, 0x26E99F1E4A9339EDULL }, /* XSUM_XXH64_testdata[7568] */\n    { 3784, 0x000000009E3779B1ULL, 0x9A1A683B182B4834ULL }, /* XSUM_XXH64_testdata[7569] */\n    { 3785, 0x0000000000000000ULL, 0xC9A4072357F56A81ULL }, /* XSUM_XXH64_testdata[7570] */\n    { 3785, 0x000000009E3779B1ULL, 0xF5D031317E4386EDULL }, /* XSUM_XXH64_testdata[7571] */\n    { 3786, 0x0000000000000000ULL, 0xFB7FEF7190165EE6ULL }, /* XSUM_XXH64_testdata[7572] */\n    { 3786, 0x000000009E3779B1ULL, 0xB9523AB7BD7DBA87ULL }, /* XSUM_XXH64_testdata[7573] */\n    { 3787, 0x0000000000000000ULL, 0xBD38046165A101A2ULL }, /* XSUM_XXH64_testdata[7574] */\n    { 3787, 0x000000009E3779B1ULL, 0x9A5AC3B8490AD04CULL }, /* XSUM_XXH64_testdata[7575] */\n    { 3788, 0x0000000000000000ULL, 0x90963B6FB5EA5B97ULL }, /* XSUM_XXH64_testdata[7576] */\n    { 3788, 0x000000009E3779B1ULL, 0xA4EFE60A2BB83438ULL }, /* XSUM_XXH64_testdata[7577] */\n    { 3789, 0x0000000000000000ULL, 0x816755F26BF27D69ULL }, /* XSUM_XXH64_testdata[7578] */\n    { 3789, 0x000000009E3779B1ULL, 0x549238EECFCCAAF6ULL }, /* XSUM_XXH64_testdata[7579] */\n    { 3790, 0x0000000000000000ULL, 0x076D80C5F5D815C8ULL }, /* XSUM_XXH64_testdata[7580] */\n    { 3790, 0x000000009E3779B1ULL, 0x595283F2B6DB5768ULL }, /* XSUM_XXH64_testdata[7581] */\n    { 3791, 0x0000000000000000ULL, 0x89FAD3B8C46E1ABBULL }, /* XSUM_XXH64_testdata[7582] */\n    { 3791, 0x000000009E3779B1ULL, 0x5B0FD9C6F8C4DBD5ULL }, /* XSUM_XXH64_testdata[7583] */\n    { 3792, 0x0000000000000000ULL, 0xB0B01CB8C62C2635ULL }, /* XSUM_XXH64_testdata[7584] */\n    { 3792, 0x000000009E3779B1ULL, 0x62A098A713B1DF04ULL }, /* XSUM_XXH64_testdata[7585] */\n    { 3793, 0x0000000000000000ULL, 0xF941C9CA23C17E2EULL }, /* XSUM_XXH64_testdata[7586] */\n    { 3793, 0x000000009E3779B1ULL, 0x81193BA8079357ACULL }, /* XSUM_XXH64_testdata[7587] */\n    { 3794, 0x0000000000000000ULL, 0xD0AA23A2D64125CDULL }, /* XSUM_XXH64_testdata[7588] */\n    { 3794, 0x000000009E3779B1ULL, 0x0CAD221458852ECFULL }, /* XSUM_XXH64_testdata[7589] */\n    { 3795, 0x0000000000000000ULL, 0xEF0B815DC382C99CULL }, /* XSUM_XXH64_testdata[7590] */\n    { 3795, 0x000000009E3779B1ULL, 0x645C70B839517900ULL }, /* XSUM_XXH64_testdata[7591] */\n    { 3796, 0x0000000000000000ULL, 0x841E3BC73C24B1AFULL }, /* XSUM_XXH64_testdata[7592] */\n    { 3796, 0x000000009E3779B1ULL, 0x497294DB34D34ECCULL }, /* XSUM_XXH64_testdata[7593] */\n    { 3797, 0x0000000000000000ULL, 0xB2D22FC2BF6D7A5DULL }, /* XSUM_XXH64_testdata[7594] */\n    { 3797, 0x000000009E3779B1ULL, 0x8C981DAF18C8B95AULL }, /* XSUM_XXH64_testdata[7595] */\n    { 3798, 0x0000000000000000ULL, 0x29A916D04348833BULL }, /* XSUM_XXH64_testdata[7596] */\n    { 3798, 0x000000009E3779B1ULL, 0x6B04BB74D7C7B932ULL }, /* XSUM_XXH64_testdata[7597] */\n    { 3799, 0x0000000000000000ULL, 0x61ACAE9191DBD896ULL }, /* XSUM_XXH64_testdata[7598] */\n    { 3799, 0x000000009E3779B1ULL, 0x38463DE99666CB3AULL }, /* XSUM_XXH64_testdata[7599] */\n    { 3800, 0x0000000000000000ULL, 0x5FECB36ABB0E6D5DULL }, /* XSUM_XXH64_testdata[7600] */\n    { 3800, 0x000000009E3779B1ULL, 0xFC24459A52C0A0F6ULL }, /* XSUM_XXH64_testdata[7601] */\n    { 3801, 0x0000000000000000ULL, 0xCE6C18A903EF1C2DULL }, /* XSUM_XXH64_testdata[7602] */\n    { 3801, 0x000000009E3779B1ULL, 0xDE8C65B3BB401B7FULL }, /* XSUM_XXH64_testdata[7603] */\n    { 3802, 0x0000000000000000ULL, 0x465FEC0C14D010CFULL }, /* XSUM_XXH64_testdata[7604] */\n    { 3802, 0x000000009E3779B1ULL, 0xB4601CF490F363EFULL }, /* XSUM_XXH64_testdata[7605] */\n    { 3803, 0x0000000000000000ULL, 0xD3375C89B4314985ULL }, /* XSUM_XXH64_testdata[7606] */\n    { 3803, 0x000000009E3779B1ULL, 0x049B532FB770D301ULL }, /* XSUM_XXH64_testdata[7607] */\n    { 3804, 0x0000000000000000ULL, 0x74164531A3BA0077ULL }, /* XSUM_XXH64_testdata[7608] */\n    { 3804, 0x000000009E3779B1ULL, 0xA6AC41191966832DULL }, /* XSUM_XXH64_testdata[7609] */\n    { 3805, 0x0000000000000000ULL, 0x161201F11A3BC5D4ULL }, /* XSUM_XXH64_testdata[7610] */\n    { 3805, 0x000000009E3779B1ULL, 0x859DCFC5946ECCA6ULL }, /* XSUM_XXH64_testdata[7611] */\n    { 3806, 0x0000000000000000ULL, 0x6E5225C0A24B08AAULL }, /* XSUM_XXH64_testdata[7612] */\n    { 3806, 0x000000009E3779B1ULL, 0x084D6E8DD7B2B814ULL }, /* XSUM_XXH64_testdata[7613] */\n    { 3807, 0x0000000000000000ULL, 0xA9079E8B592EC8E7ULL }, /* XSUM_XXH64_testdata[7614] */\n    { 3807, 0x000000009E3779B1ULL, 0x13889FAFD51BA725ULL }, /* XSUM_XXH64_testdata[7615] */\n    { 3808, 0x0000000000000000ULL, 0xBD899FED7D3AC107ULL }, /* XSUM_XXH64_testdata[7616] */\n    { 3808, 0x000000009E3779B1ULL, 0x5D6F608B8164F7D6ULL }, /* XSUM_XXH64_testdata[7617] */\n    { 3809, 0x0000000000000000ULL, 0x933D29BA19C175C7ULL }, /* XSUM_XXH64_testdata[7618] */\n    { 3809, 0x000000009E3779B1ULL, 0xE36D26BD4D51328AULL }, /* XSUM_XXH64_testdata[7619] */\n    { 3810, 0x0000000000000000ULL, 0xDF7714F6326ED6C0ULL }, /* XSUM_XXH64_testdata[7620] */\n    { 3810, 0x000000009E3779B1ULL, 0xF37D3A7B9A3E6B5BULL }, /* XSUM_XXH64_testdata[7621] */\n    { 3811, 0x0000000000000000ULL, 0x6E87507DFD692896ULL }, /* XSUM_XXH64_testdata[7622] */\n    { 3811, 0x000000009E3779B1ULL, 0x7BE4AB0147AEE64BULL }, /* XSUM_XXH64_testdata[7623] */\n    { 3812, 0x0000000000000000ULL, 0xFFBEBBA78956C74FULL }, /* XSUM_XXH64_testdata[7624] */\n    { 3812, 0x000000009E3779B1ULL, 0xC437ED9D6F3B30DEULL }, /* XSUM_XXH64_testdata[7625] */\n    { 3813, 0x0000000000000000ULL, 0x24BFB5AB04F81007ULL }, /* XSUM_XXH64_testdata[7626] */\n    { 3813, 0x000000009E3779B1ULL, 0xB1A314947318FB42ULL }, /* XSUM_XXH64_testdata[7627] */\n    { 3814, 0x0000000000000000ULL, 0xE0CED2864BD3C1FCULL }, /* XSUM_XXH64_testdata[7628] */\n    { 3814, 0x000000009E3779B1ULL, 0xBAF33B4830278268ULL }, /* XSUM_XXH64_testdata[7629] */\n    { 3815, 0x0000000000000000ULL, 0xBD72A881F0835C75ULL }, /* XSUM_XXH64_testdata[7630] */\n    { 3815, 0x000000009E3779B1ULL, 0x5357F5EFA0259106ULL }, /* XSUM_XXH64_testdata[7631] */\n    { 3816, 0x0000000000000000ULL, 0x42CCB6C938ED767AULL }, /* XSUM_XXH64_testdata[7632] */\n    { 3816, 0x000000009E3779B1ULL, 0x8C448C018FE66807ULL }, /* XSUM_XXH64_testdata[7633] */\n    { 3817, 0x0000000000000000ULL, 0x3705BC697561CEB1ULL }, /* XSUM_XXH64_testdata[7634] */\n    { 3817, 0x000000009E3779B1ULL, 0x686EA7D0F1566C12ULL }, /* XSUM_XXH64_testdata[7635] */\n    { 3818, 0x0000000000000000ULL, 0xAC70EBF7F3D23551ULL }, /* XSUM_XXH64_testdata[7636] */\n    { 3818, 0x000000009E3779B1ULL, 0x63934113E313911CULL }, /* XSUM_XXH64_testdata[7637] */\n    { 3819, 0x0000000000000000ULL, 0x4BA11B6BC8B5B5E1ULL }, /* XSUM_XXH64_testdata[7638] */\n    { 3819, 0x000000009E3779B1ULL, 0xD0E9567DBB2F547FULL }, /* XSUM_XXH64_testdata[7639] */\n    { 3820, 0x0000000000000000ULL, 0x2F71A829EBB3B867ULL }, /* XSUM_XXH64_testdata[7640] */\n    { 3820, 0x000000009E3779B1ULL, 0xD293D68E88FC3B01ULL }, /* XSUM_XXH64_testdata[7641] */\n    { 3821, 0x0000000000000000ULL, 0x28F31B7DBB3B639DULL }, /* XSUM_XXH64_testdata[7642] */\n    { 3821, 0x000000009E3779B1ULL, 0xBC6FAD33E40F0A80ULL }, /* XSUM_XXH64_testdata[7643] */\n    { 3822, 0x0000000000000000ULL, 0x2F3A9BD188B341A7ULL }, /* XSUM_XXH64_testdata[7644] */\n    { 3822, 0x000000009E3779B1ULL, 0x0E27F9E56059A388ULL }, /* XSUM_XXH64_testdata[7645] */\n    { 3823, 0x0000000000000000ULL, 0xA888B7F44043A06CULL }, /* XSUM_XXH64_testdata[7646] */\n    { 3823, 0x000000009E3779B1ULL, 0x7BFABCD0CA5DB00EULL }, /* XSUM_XXH64_testdata[7647] */\n    { 3824, 0x0000000000000000ULL, 0xB8699AEC15615EE5ULL }, /* XSUM_XXH64_testdata[7648] */\n    { 3824, 0x000000009E3779B1ULL, 0x12D2433C9D28AF76ULL }, /* XSUM_XXH64_testdata[7649] */\n    { 3825, 0x0000000000000000ULL, 0x43B55CBBCF35EE24ULL }, /* XSUM_XXH64_testdata[7650] */\n    { 3825, 0x000000009E3779B1ULL, 0x2BD581201CA540BBULL }, /* XSUM_XXH64_testdata[7651] */\n    { 3826, 0x0000000000000000ULL, 0x456B9303B9128083ULL }, /* XSUM_XXH64_testdata[7652] */\n    { 3826, 0x000000009E3779B1ULL, 0xB34A4743241D07D1ULL }, /* XSUM_XXH64_testdata[7653] */\n    { 3827, 0x0000000000000000ULL, 0x9F293A3A808E93B6ULL }, /* XSUM_XXH64_testdata[7654] */\n    { 3827, 0x000000009E3779B1ULL, 0x8808ADEDF547DFBCULL }, /* XSUM_XXH64_testdata[7655] */\n    { 3828, 0x0000000000000000ULL, 0x0A91236F17B45090ULL }, /* XSUM_XXH64_testdata[7656] */\n    { 3828, 0x000000009E3779B1ULL, 0xCDD10217E03B4475ULL }, /* XSUM_XXH64_testdata[7657] */\n    { 3829, 0x0000000000000000ULL, 0x39506226E350DDFBULL }, /* XSUM_XXH64_testdata[7658] */\n    { 3829, 0x000000009E3779B1ULL, 0x804029E25C5B7B88ULL }, /* XSUM_XXH64_testdata[7659] */\n    { 3830, 0x0000000000000000ULL, 0xF6B37D87B3CCDA56ULL }, /* XSUM_XXH64_testdata[7660] */\n    { 3830, 0x000000009E3779B1ULL, 0x229BC9A8AD4E6A6CULL }, /* XSUM_XXH64_testdata[7661] */\n    { 3831, 0x0000000000000000ULL, 0x16BA2DEAA6A22735ULL }, /* XSUM_XXH64_testdata[7662] */\n    { 3831, 0x000000009E3779B1ULL, 0xD726C82E97DAC846ULL }, /* XSUM_XXH64_testdata[7663] */\n    { 3832, 0x0000000000000000ULL, 0xAFA61B1EA34B32FDULL }, /* XSUM_XXH64_testdata[7664] */\n    { 3832, 0x000000009E3779B1ULL, 0x1195D2361AC389BAULL }, /* XSUM_XXH64_testdata[7665] */\n    { 3833, 0x0000000000000000ULL, 0xB0758F331ED49666ULL }, /* XSUM_XXH64_testdata[7666] */\n    { 3833, 0x000000009E3779B1ULL, 0x70886DD5B8660E6EULL }, /* XSUM_XXH64_testdata[7667] */\n    { 3834, 0x0000000000000000ULL, 0x04A033FEC1917F63ULL }, /* XSUM_XXH64_testdata[7668] */\n    { 3834, 0x000000009E3779B1ULL, 0xE2A0209A7A544DA5ULL }, /* XSUM_XXH64_testdata[7669] */\n    { 3835, 0x0000000000000000ULL, 0x71130431A73C5558ULL }, /* XSUM_XXH64_testdata[7670] */\n    { 3835, 0x000000009E3779B1ULL, 0x9015BE92ED34E6B7ULL }, /* XSUM_XXH64_testdata[7671] */\n    { 3836, 0x0000000000000000ULL, 0xBCAFA05F0EE79435ULL }, /* XSUM_XXH64_testdata[7672] */\n    { 3836, 0x000000009E3779B1ULL, 0xFEC7F34B34FC23B1ULL }, /* XSUM_XXH64_testdata[7673] */\n    { 3837, 0x0000000000000000ULL, 0xAD4EB29A498AD39BULL }, /* XSUM_XXH64_testdata[7674] */\n    { 3837, 0x000000009E3779B1ULL, 0x5F1A3146E16FD664ULL }, /* XSUM_XXH64_testdata[7675] */\n    { 3838, 0x0000000000000000ULL, 0xF79F884902A9F7CDULL }, /* XSUM_XXH64_testdata[7676] */\n    { 3838, 0x000000009E3779B1ULL, 0xB545AFE6BF6CBBE4ULL }, /* XSUM_XXH64_testdata[7677] */\n    { 3839, 0x0000000000000000ULL, 0x33FDF7B3C3B86707ULL }, /* XSUM_XXH64_testdata[7678] */\n    { 3839, 0x000000009E3779B1ULL, 0x2EB4795B6CAE29A6ULL }, /* XSUM_XXH64_testdata[7679] */\n    { 3840, 0x0000000000000000ULL, 0xB1CA1C3ACC9AFB57ULL }, /* XSUM_XXH64_testdata[7680] */\n    { 3840, 0x000000009E3779B1ULL, 0x524F06B6FF09FCB0ULL }, /* XSUM_XXH64_testdata[7681] */\n    { 3841, 0x0000000000000000ULL, 0x9ED9FB7F590E1430ULL }, /* XSUM_XXH64_testdata[7682] */\n    { 3841, 0x000000009E3779B1ULL, 0xBD0EB5B3BBBC7162ULL }, /* XSUM_XXH64_testdata[7683] */\n    { 3842, 0x0000000000000000ULL, 0x4B2FFB9995528710ULL }, /* XSUM_XXH64_testdata[7684] */\n    { 3842, 0x000000009E3779B1ULL, 0x3130C9FAC79C65BAULL }, /* XSUM_XXH64_testdata[7685] */\n    { 3843, 0x0000000000000000ULL, 0xA09213FB934E0EC1ULL }, /* XSUM_XXH64_testdata[7686] */\n    { 3843, 0x000000009E3779B1ULL, 0x8E7825648B67AC12ULL }, /* XSUM_XXH64_testdata[7687] */\n    { 3844, 0x0000000000000000ULL, 0xCB9D6B6E0CAE5E5EULL }, /* XSUM_XXH64_testdata[7688] */\n    { 3844, 0x000000009E3779B1ULL, 0x7F675D0485E2FF85ULL }, /* XSUM_XXH64_testdata[7689] */\n    { 3845, 0x0000000000000000ULL, 0xE362D9757219B39AULL }, /* XSUM_XXH64_testdata[7690] */\n    { 3845, 0x000000009E3779B1ULL, 0xEBDA24F8AC2BCD6BULL }, /* XSUM_XXH64_testdata[7691] */\n    { 3846, 0x0000000000000000ULL, 0xAE65776510DCD385ULL }, /* XSUM_XXH64_testdata[7692] */\n    { 3846, 0x000000009E3779B1ULL, 0x15AA75C6FAD71D1EULL }, /* XSUM_XXH64_testdata[7693] */\n    { 3847, 0x0000000000000000ULL, 0x96A28B8D0A83EC25ULL }, /* XSUM_XXH64_testdata[7694] */\n    { 3847, 0x000000009E3779B1ULL, 0x56394E1CD07F9AFDULL }, /* XSUM_XXH64_testdata[7695] */\n    { 3848, 0x0000000000000000ULL, 0x0DF51074E5A212DCULL }, /* XSUM_XXH64_testdata[7696] */\n    { 3848, 0x000000009E3779B1ULL, 0x800AF05D8826066EULL }, /* XSUM_XXH64_testdata[7697] */\n    { 3849, 0x0000000000000000ULL, 0x812D94DAB0B62DD4ULL }, /* XSUM_XXH64_testdata[7698] */\n    { 3849, 0x000000009E3779B1ULL, 0x14B34EDD4296CE0FULL }, /* XSUM_XXH64_testdata[7699] */\n    { 3850, 0x0000000000000000ULL, 0x24618FD19CFE6463ULL }, /* XSUM_XXH64_testdata[7700] */\n    { 3850, 0x000000009E3779B1ULL, 0x2C1759A1CC26B0D9ULL }, /* XSUM_XXH64_testdata[7701] */\n    { 3851, 0x0000000000000000ULL, 0x4484D6D6A93B57C9ULL }, /* XSUM_XXH64_testdata[7702] */\n    { 3851, 0x000000009E3779B1ULL, 0x4771F049FAD17A50ULL }, /* XSUM_XXH64_testdata[7703] */\n    { 3852, 0x0000000000000000ULL, 0xD70C34ECFA68ECE7ULL }, /* XSUM_XXH64_testdata[7704] */\n    { 3852, 0x000000009E3779B1ULL, 0xAA62F409123A36E7ULL }, /* XSUM_XXH64_testdata[7705] */\n    { 3853, 0x0000000000000000ULL, 0x8A885F7657AB818EULL }, /* XSUM_XXH64_testdata[7706] */\n    { 3853, 0x000000009E3779B1ULL, 0xDDB474ECF4233E6CULL }, /* XSUM_XXH64_testdata[7707] */\n    { 3854, 0x0000000000000000ULL, 0x687E7FF564F9D0EFULL }, /* XSUM_XXH64_testdata[7708] */\n    { 3854, 0x000000009E3779B1ULL, 0x204F705F9DC16C19ULL }, /* XSUM_XXH64_testdata[7709] */\n    { 3855, 0x0000000000000000ULL, 0x6275B20058A2EDD5ULL }, /* XSUM_XXH64_testdata[7710] */\n    { 3855, 0x000000009E3779B1ULL, 0x6B8351AC704335CAULL }, /* XSUM_XXH64_testdata[7711] */\n    { 3856, 0x0000000000000000ULL, 0x10002B6D56B76C58ULL }, /* XSUM_XXH64_testdata[7712] */\n    { 3856, 0x000000009E3779B1ULL, 0x4EA865FABE9C381BULL }, /* XSUM_XXH64_testdata[7713] */\n    { 3857, 0x0000000000000000ULL, 0x3765007D4597F71EULL }, /* XSUM_XXH64_testdata[7714] */\n    { 3857, 0x000000009E3779B1ULL, 0x653D10A5FB6CB574ULL }, /* XSUM_XXH64_testdata[7715] */\n    { 3858, 0x0000000000000000ULL, 0x01637C5474D031C5ULL }, /* XSUM_XXH64_testdata[7716] */\n    { 3858, 0x000000009E3779B1ULL, 0x34CD24F246C55FFDULL }, /* XSUM_XXH64_testdata[7717] */\n    { 3859, 0x0000000000000000ULL, 0xE4EE0E781CBBC2D6ULL }, /* XSUM_XXH64_testdata[7718] */\n    { 3859, 0x000000009E3779B1ULL, 0x570567D3A823DE5CULL }, /* XSUM_XXH64_testdata[7719] */\n    { 3860, 0x0000000000000000ULL, 0xFB708A056EFD93ADULL }, /* XSUM_XXH64_testdata[7720] */\n    { 3860, 0x000000009E3779B1ULL, 0x928D923DAAF2C3D4ULL }, /* XSUM_XXH64_testdata[7721] */\n    { 3861, 0x0000000000000000ULL, 0xC910CCEE52A69B00ULL }, /* XSUM_XXH64_testdata[7722] */\n    { 3861, 0x000000009E3779B1ULL, 0x0026A57A4A3B3617ULL }, /* XSUM_XXH64_testdata[7723] */\n    { 3862, 0x0000000000000000ULL, 0x84D87EA6F4685D11ULL }, /* XSUM_XXH64_testdata[7724] */\n    { 3862, 0x000000009E3779B1ULL, 0x0D68119C3E528B3EULL }, /* XSUM_XXH64_testdata[7725] */\n    { 3863, 0x0000000000000000ULL, 0x04B84E9E4AD6B09CULL }, /* XSUM_XXH64_testdata[7726] */\n    { 3863, 0x000000009E3779B1ULL, 0xB8BE97A0E8E2DA40ULL }, /* XSUM_XXH64_testdata[7727] */\n    { 3864, 0x0000000000000000ULL, 0x45C3E4C96D5928D6ULL }, /* XSUM_XXH64_testdata[7728] */\n    { 3864, 0x000000009E3779B1ULL, 0x45D55C31B49787BAULL }, /* XSUM_XXH64_testdata[7729] */\n    { 3865, 0x0000000000000000ULL, 0x71C13CAEEEF7D7BFULL }, /* XSUM_XXH64_testdata[7730] */\n    { 3865, 0x000000009E3779B1ULL, 0xF088D0F40112A71EULL }, /* XSUM_XXH64_testdata[7731] */\n    { 3866, 0x0000000000000000ULL, 0x7B3D7B0B7A9F4B69ULL }, /* XSUM_XXH64_testdata[7732] */\n    { 3866, 0x000000009E3779B1ULL, 0xB5A7BE87BEB1FE35ULL }, /* XSUM_XXH64_testdata[7733] */\n    { 3867, 0x0000000000000000ULL, 0xEC3BAC3FA30A8727ULL }, /* XSUM_XXH64_testdata[7734] */\n    { 3867, 0x000000009E3779B1ULL, 0xD89268EC01CAA9CBULL }, /* XSUM_XXH64_testdata[7735] */\n    { 3868, 0x0000000000000000ULL, 0x457AAAC4990A78CEULL }, /* XSUM_XXH64_testdata[7736] */\n    { 3868, 0x000000009E3779B1ULL, 0xBDE2967DCF594FD7ULL }, /* XSUM_XXH64_testdata[7737] */\n    { 3869, 0x0000000000000000ULL, 0xE8507085D741EA98ULL }, /* XSUM_XXH64_testdata[7738] */\n    { 3869, 0x000000009E3779B1ULL, 0x58C9A07F6F9E2BF3ULL }, /* XSUM_XXH64_testdata[7739] */\n    { 3870, 0x0000000000000000ULL, 0x2FF3AA0863155991ULL }, /* XSUM_XXH64_testdata[7740] */\n    { 3870, 0x000000009E3779B1ULL, 0xAF9926DF03E04ABEULL }, /* XSUM_XXH64_testdata[7741] */\n    { 3871, 0x0000000000000000ULL, 0x4374F85CAD23ED0BULL }, /* XSUM_XXH64_testdata[7742] */\n    { 3871, 0x000000009E3779B1ULL, 0x3E203F2E7D7DDF87ULL }, /* XSUM_XXH64_testdata[7743] */\n    { 3872, 0x0000000000000000ULL, 0xB74469DA59E55C4EULL }, /* XSUM_XXH64_testdata[7744] */\n    { 3872, 0x000000009E3779B1ULL, 0x6499EB804CC251A5ULL }, /* XSUM_XXH64_testdata[7745] */\n    { 3873, 0x0000000000000000ULL, 0x3803A4C77D45A9CCULL }, /* XSUM_XXH64_testdata[7746] */\n    { 3873, 0x000000009E3779B1ULL, 0xC711C5D664333B52ULL }, /* XSUM_XXH64_testdata[7747] */\n    { 3874, 0x0000000000000000ULL, 0xBB3E2C6292822DDEULL }, /* XSUM_XXH64_testdata[7748] */\n    { 3874, 0x000000009E3779B1ULL, 0xB3AB956CC125570DULL }, /* XSUM_XXH64_testdata[7749] */\n    { 3875, 0x0000000000000000ULL, 0x62F9699A3F4C59A7ULL }, /* XSUM_XXH64_testdata[7750] */\n    { 3875, 0x000000009E3779B1ULL, 0x542EFBA978A60F9FULL }, /* XSUM_XXH64_testdata[7751] */\n    { 3876, 0x0000000000000000ULL, 0x1D958B37C7CCF3C3ULL }, /* XSUM_XXH64_testdata[7752] */\n    { 3876, 0x000000009E3779B1ULL, 0xCBD5C407745492DFULL }, /* XSUM_XXH64_testdata[7753] */\n    { 3877, 0x0000000000000000ULL, 0xC7FA352C731A0F1BULL }, /* XSUM_XXH64_testdata[7754] */\n    { 3877, 0x000000009E3779B1ULL, 0xABACFAD6E9315772ULL }, /* XSUM_XXH64_testdata[7755] */\n    { 3878, 0x0000000000000000ULL, 0xBEBC1FD4981EC6D8ULL }, /* XSUM_XXH64_testdata[7756] */\n    { 3878, 0x000000009E3779B1ULL, 0x9959AB275DB57CD3ULL }, /* XSUM_XXH64_testdata[7757] */\n    { 3879, 0x0000000000000000ULL, 0x89C47A616D5D18C0ULL }, /* XSUM_XXH64_testdata[7758] */\n    { 3879, 0x000000009E3779B1ULL, 0x6D25E5BD0F2C7FE6ULL }, /* XSUM_XXH64_testdata[7759] */\n    { 3880, 0x0000000000000000ULL, 0x924B33F9E207D662ULL }, /* XSUM_XXH64_testdata[7760] */\n    { 3880, 0x000000009E3779B1ULL, 0x79C5FF639D5FC2A7ULL }, /* XSUM_XXH64_testdata[7761] */\n    { 3881, 0x0000000000000000ULL, 0x98D21F9A210F1B84ULL }, /* XSUM_XXH64_testdata[7762] */\n    { 3881, 0x000000009E3779B1ULL, 0x1CF6D5A474802C41ULL }, /* XSUM_XXH64_testdata[7763] */\n    { 3882, 0x0000000000000000ULL, 0x344F174A82765F8BULL }, /* XSUM_XXH64_testdata[7764] */\n    { 3882, 0x000000009E3779B1ULL, 0x91E180ABA39DBE55ULL }, /* XSUM_XXH64_testdata[7765] */\n    { 3883, 0x0000000000000000ULL, 0xFCF08F9B8F82449AULL }, /* XSUM_XXH64_testdata[7766] */\n    { 3883, 0x000000009E3779B1ULL, 0x9A463FF0091E5BD7ULL }, /* XSUM_XXH64_testdata[7767] */\n    { 3884, 0x0000000000000000ULL, 0x9500C46BBEB52D46ULL }, /* XSUM_XXH64_testdata[7768] */\n    { 3884, 0x000000009E3779B1ULL, 0x042FD1117AA50A43ULL }, /* XSUM_XXH64_testdata[7769] */\n    { 3885, 0x0000000000000000ULL, 0x2A6E015F9CCC419DULL }, /* XSUM_XXH64_testdata[7770] */\n    { 3885, 0x000000009E3779B1ULL, 0x515E8D069B382AF9ULL }, /* XSUM_XXH64_testdata[7771] */\n    { 3886, 0x0000000000000000ULL, 0x6800627EAE8D0F20ULL }, /* XSUM_XXH64_testdata[7772] */\n    { 3886, 0x000000009E3779B1ULL, 0xAABE483F3979BF91ULL }, /* XSUM_XXH64_testdata[7773] */\n    { 3887, 0x0000000000000000ULL, 0x00BF08AD7C17FF2CULL }, /* XSUM_XXH64_testdata[7774] */\n    { 3887, 0x000000009E3779B1ULL, 0xE4DD3A165E6814C8ULL }, /* XSUM_XXH64_testdata[7775] */\n    { 3888, 0x0000000000000000ULL, 0xDEE517F865234315ULL }, /* XSUM_XXH64_testdata[7776] */\n    { 3888, 0x000000009E3779B1ULL, 0xC264F68752BE5A35ULL }, /* XSUM_XXH64_testdata[7777] */\n    { 3889, 0x0000000000000000ULL, 0xDAC78A64E68050D9ULL }, /* XSUM_XXH64_testdata[7778] */\n    { 3889, 0x000000009E3779B1ULL, 0xC63525F79BD016C6ULL }, /* XSUM_XXH64_testdata[7779] */\n    { 3890, 0x0000000000000000ULL, 0x46E5E46DD4E5510BULL }, /* XSUM_XXH64_testdata[7780] */\n    { 3890, 0x000000009E3779B1ULL, 0xDA4BEE7FDEE2A2EDULL }, /* XSUM_XXH64_testdata[7781] */\n    { 3891, 0x0000000000000000ULL, 0xC44F5A1075BDBF15ULL }, /* XSUM_XXH64_testdata[7782] */\n    { 3891, 0x000000009E3779B1ULL, 0x4FE15DB2459DEEA7ULL }, /* XSUM_XXH64_testdata[7783] */\n    { 3892, 0x0000000000000000ULL, 0xBA443934DB56E9B0ULL }, /* XSUM_XXH64_testdata[7784] */\n    { 3892, 0x000000009E3779B1ULL, 0x90D5875B83AF9357ULL }, /* XSUM_XXH64_testdata[7785] */\n    { 3893, 0x0000000000000000ULL, 0xF8700C341492FE7DULL }, /* XSUM_XXH64_testdata[7786] */\n    { 3893, 0x000000009E3779B1ULL, 0x5E26FD598A1ADD2AULL }, /* XSUM_XXH64_testdata[7787] */\n    { 3894, 0x0000000000000000ULL, 0x848899B2767F18FFULL }, /* XSUM_XXH64_testdata[7788] */\n    { 3894, 0x000000009E3779B1ULL, 0x538709F369DD7CEDULL }, /* XSUM_XXH64_testdata[7789] */\n    { 3895, 0x0000000000000000ULL, 0xFAF9C654A539DB27ULL }, /* XSUM_XXH64_testdata[7790] */\n    { 3895, 0x000000009E3779B1ULL, 0x91F93371DC04D4F2ULL }, /* XSUM_XXH64_testdata[7791] */\n    { 3896, 0x0000000000000000ULL, 0xED62B8A1DF1E900CULL }, /* XSUM_XXH64_testdata[7792] */\n    { 3896, 0x000000009E3779B1ULL, 0xB43CB5BFF41A3523ULL }, /* XSUM_XXH64_testdata[7793] */\n    { 3897, 0x0000000000000000ULL, 0xF17267B88EED3C86ULL }, /* XSUM_XXH64_testdata[7794] */\n    { 3897, 0x000000009E3779B1ULL, 0x073C47ED869D052FULL }, /* XSUM_XXH64_testdata[7795] */\n    { 3898, 0x0000000000000000ULL, 0x54D361CC02C6C60FULL }, /* XSUM_XXH64_testdata[7796] */\n    { 3898, 0x000000009E3779B1ULL, 0xBD452E8BD8EA722EULL }, /* XSUM_XXH64_testdata[7797] */\n    { 3899, 0x0000000000000000ULL, 0x47B04A98CD524D3CULL }, /* XSUM_XXH64_testdata[7798] */\n    { 3899, 0x000000009E3779B1ULL, 0xAC43A5ED23C6ED09ULL }, /* XSUM_XXH64_testdata[7799] */\n    { 3900, 0x0000000000000000ULL, 0x8F6B9156AD07CEB4ULL }, /* XSUM_XXH64_testdata[7800] */\n    { 3900, 0x000000009E3779B1ULL, 0x9FD6D391418A8D49ULL }, /* XSUM_XXH64_testdata[7801] */\n    { 3901, 0x0000000000000000ULL, 0x8FFE5AD36E0B9D68ULL }, /* XSUM_XXH64_testdata[7802] */\n    { 3901, 0x000000009E3779B1ULL, 0xAC4576B3CF350B55ULL }, /* XSUM_XXH64_testdata[7803] */\n    { 3902, 0x0000000000000000ULL, 0xD481856260AECEEEULL }, /* XSUM_XXH64_testdata[7804] */\n    { 3902, 0x000000009E3779B1ULL, 0x5E75301170141456ULL }, /* XSUM_XXH64_testdata[7805] */\n    { 3903, 0x0000000000000000ULL, 0x353C99556B5FE3A2ULL }, /* XSUM_XXH64_testdata[7806] */\n    { 3903, 0x000000009E3779B1ULL, 0xC2C565817F89893FULL }, /* XSUM_XXH64_testdata[7807] */\n    { 3904, 0x0000000000000000ULL, 0xB630683C34CF81E3ULL }, /* XSUM_XXH64_testdata[7808] */\n    { 3904, 0x000000009E3779B1ULL, 0x39D2D8EB2A69C508ULL }, /* XSUM_XXH64_testdata[7809] */\n    { 3905, 0x0000000000000000ULL, 0xA15B22B69D34FEDDULL }, /* XSUM_XXH64_testdata[7810] */\n    { 3905, 0x000000009E3779B1ULL, 0x72934FAC1B32022EULL }, /* XSUM_XXH64_testdata[7811] */\n    { 3906, 0x0000000000000000ULL, 0x1583D7AF8E4813FDULL }, /* XSUM_XXH64_testdata[7812] */\n    { 3906, 0x000000009E3779B1ULL, 0x19F28F4A3225BD23ULL }, /* XSUM_XXH64_testdata[7813] */\n    { 3907, 0x0000000000000000ULL, 0x93857F12B6E7B4CDULL }, /* XSUM_XXH64_testdata[7814] */\n    { 3907, 0x000000009E3779B1ULL, 0xDE3B0953A5C27257ULL }, /* XSUM_XXH64_testdata[7815] */\n    { 3908, 0x0000000000000000ULL, 0x4D34FB29FA15D233ULL }, /* XSUM_XXH64_testdata[7816] */\n    { 3908, 0x000000009E3779B1ULL, 0x7ADD0C4106663958ULL }, /* XSUM_XXH64_testdata[7817] */\n    { 3909, 0x0000000000000000ULL, 0x4232F9A9E3C22281ULL }, /* XSUM_XXH64_testdata[7818] */\n    { 3909, 0x000000009E3779B1ULL, 0xF17E91CB9B78578CULL }, /* XSUM_XXH64_testdata[7819] */\n    { 3910, 0x0000000000000000ULL, 0x99176E5C87E62DF7ULL }, /* XSUM_XXH64_testdata[7820] */\n    { 3910, 0x000000009E3779B1ULL, 0x9C1A29D0199775D4ULL }, /* XSUM_XXH64_testdata[7821] */\n    { 3911, 0x0000000000000000ULL, 0x75EE820AE9333BE7ULL }, /* XSUM_XXH64_testdata[7822] */\n    { 3911, 0x000000009E3779B1ULL, 0x3FE15BA3B3644386ULL }, /* XSUM_XXH64_testdata[7823] */\n    { 3912, 0x0000000000000000ULL, 0xEC745EE3151533F1ULL }, /* XSUM_XXH64_testdata[7824] */\n    { 3912, 0x000000009E3779B1ULL, 0x3DB7C4BBAC37BA7AULL }, /* XSUM_XXH64_testdata[7825] */\n    { 3913, 0x0000000000000000ULL, 0xADC190530AA91F6AULL }, /* XSUM_XXH64_testdata[7826] */\n    { 3913, 0x000000009E3779B1ULL, 0xB654D233526D4B1EULL }, /* XSUM_XXH64_testdata[7827] */\n    { 3914, 0x0000000000000000ULL, 0xC72364F0A1ACF39FULL }, /* XSUM_XXH64_testdata[7828] */\n    { 3914, 0x000000009E3779B1ULL, 0x9BC4025A790E7A17ULL }, /* XSUM_XXH64_testdata[7829] */\n    { 3915, 0x0000000000000000ULL, 0x3D8F3DB0444120D8ULL }, /* XSUM_XXH64_testdata[7830] */\n    { 3915, 0x000000009E3779B1ULL, 0x8E4990610FF05582ULL }, /* XSUM_XXH64_testdata[7831] */\n    { 3916, 0x0000000000000000ULL, 0xFE5F1568139CC72BULL }, /* XSUM_XXH64_testdata[7832] */\n    { 3916, 0x000000009E3779B1ULL, 0x19715F510D940B58ULL }, /* XSUM_XXH64_testdata[7833] */\n    { 3917, 0x0000000000000000ULL, 0x601AB90F32290E66ULL }, /* XSUM_XXH64_testdata[7834] */\n    { 3917, 0x000000009E3779B1ULL, 0xD9CDAF533FF7619DULL }, /* XSUM_XXH64_testdata[7835] */\n    { 3918, 0x0000000000000000ULL, 0x1CEAE5B0AB24B9DEULL }, /* XSUM_XXH64_testdata[7836] */\n    { 3918, 0x000000009E3779B1ULL, 0x17302FB8381E8A57ULL }, /* XSUM_XXH64_testdata[7837] */\n    { 3919, 0x0000000000000000ULL, 0xA733E2E8A459036DULL }, /* XSUM_XXH64_testdata[7838] */\n    { 3919, 0x000000009E3779B1ULL, 0x8928E9567BFDCC20ULL }, /* XSUM_XXH64_testdata[7839] */\n    { 3920, 0x0000000000000000ULL, 0xEB04D68D7D30A820ULL }, /* XSUM_XXH64_testdata[7840] */\n    { 3920, 0x000000009E3779B1ULL, 0xFF61E66564B36DFFULL }, /* XSUM_XXH64_testdata[7841] */\n    { 3921, 0x0000000000000000ULL, 0x053F251C41187B17ULL }, /* XSUM_XXH64_testdata[7842] */\n    { 3921, 0x000000009E3779B1ULL, 0x84485A2E0172AB99ULL }, /* XSUM_XXH64_testdata[7843] */\n    { 3922, 0x0000000000000000ULL, 0x376340351081B471ULL }, /* XSUM_XXH64_testdata[7844] */\n    { 3922, 0x000000009E3779B1ULL, 0xC30FD3B991F93DE1ULL }, /* XSUM_XXH64_testdata[7845] */\n    { 3923, 0x0000000000000000ULL, 0x78CF1EAC32EE45E2ULL }, /* XSUM_XXH64_testdata[7846] */\n    { 3923, 0x000000009E3779B1ULL, 0xE7A5976ED0268FE5ULL }, /* XSUM_XXH64_testdata[7847] */\n    { 3924, 0x0000000000000000ULL, 0x3CFB6E4226067566ULL }, /* XSUM_XXH64_testdata[7848] */\n    { 3924, 0x000000009E3779B1ULL, 0xBED7A3F46367777CULL }, /* XSUM_XXH64_testdata[7849] */\n    { 3925, 0x0000000000000000ULL, 0xF8C76B89F3442497ULL }, /* XSUM_XXH64_testdata[7850] */\n    { 3925, 0x000000009E3779B1ULL, 0x41369BD205492A6FULL }, /* XSUM_XXH64_testdata[7851] */\n    { 3926, 0x0000000000000000ULL, 0x41717D7030C89C99ULL }, /* XSUM_XXH64_testdata[7852] */\n    { 3926, 0x000000009E3779B1ULL, 0x79DE31FE66D4C3DCULL }, /* XSUM_XXH64_testdata[7853] */\n    { 3927, 0x0000000000000000ULL, 0x30725284DE55C22FULL }, /* XSUM_XXH64_testdata[7854] */\n    { 3927, 0x000000009E3779B1ULL, 0x42CA06F99292F845ULL }, /* XSUM_XXH64_testdata[7855] */\n    { 3928, 0x0000000000000000ULL, 0x98BA2928DEF46016ULL }, /* XSUM_XXH64_testdata[7856] */\n    { 3928, 0x000000009E3779B1ULL, 0xD41941C521DF251FULL }, /* XSUM_XXH64_testdata[7857] */\n    { 3929, 0x0000000000000000ULL, 0xE0421C98D1660E9FULL }, /* XSUM_XXH64_testdata[7858] */\n    { 3929, 0x000000009E3779B1ULL, 0xB1FC5561A972B6B2ULL }, /* XSUM_XXH64_testdata[7859] */\n    { 3930, 0x0000000000000000ULL, 0x2BDC94252C8414FAULL }, /* XSUM_XXH64_testdata[7860] */\n    { 3930, 0x000000009E3779B1ULL, 0x4C80CCB5CF571781ULL }, /* XSUM_XXH64_testdata[7861] */\n    { 3931, 0x0000000000000000ULL, 0x325AF27AC80EFCADULL }, /* XSUM_XXH64_testdata[7862] */\n    { 3931, 0x000000009E3779B1ULL, 0x33BC0E725BAAB5E1ULL }, /* XSUM_XXH64_testdata[7863] */\n    { 3932, 0x0000000000000000ULL, 0xF840A0BBBDD83EFDULL }, /* XSUM_XXH64_testdata[7864] */\n    { 3932, 0x000000009E3779B1ULL, 0x5C17ADAC1D45F4EBULL }, /* XSUM_XXH64_testdata[7865] */\n    { 3933, 0x0000000000000000ULL, 0x2BDDFFDE681494D7ULL }, /* XSUM_XXH64_testdata[7866] */\n    { 3933, 0x000000009E3779B1ULL, 0xCB72E7E4F76BB65DULL }, /* XSUM_XXH64_testdata[7867] */\n    { 3934, 0x0000000000000000ULL, 0x62CE13FD1885B954ULL }, /* XSUM_XXH64_testdata[7868] */\n    { 3934, 0x000000009E3779B1ULL, 0x0BD4E9B140A3FBC8ULL }, /* XSUM_XXH64_testdata[7869] */\n    { 3935, 0x0000000000000000ULL, 0x15FCA576ABC7566AULL }, /* XSUM_XXH64_testdata[7870] */\n    { 3935, 0x000000009E3779B1ULL, 0x29069959F3CDDB71ULL }, /* XSUM_XXH64_testdata[7871] */\n    { 3936, 0x0000000000000000ULL, 0x44FA36745A62FC49ULL }, /* XSUM_XXH64_testdata[7872] */\n    { 3936, 0x000000009E3779B1ULL, 0x1364CD2118435ACAULL }, /* XSUM_XXH64_testdata[7873] */\n    { 3937, 0x0000000000000000ULL, 0x4D4D6F8F12ADA1EFULL }, /* XSUM_XXH64_testdata[7874] */\n    { 3937, 0x000000009E3779B1ULL, 0x2A6D6F9B0667F6DAULL }, /* XSUM_XXH64_testdata[7875] */\n    { 3938, 0x0000000000000000ULL, 0x6ADC7EC077182698ULL }, /* XSUM_XXH64_testdata[7876] */\n    { 3938, 0x000000009E3779B1ULL, 0x543A3A5CB66930C9ULL }, /* XSUM_XXH64_testdata[7877] */\n    { 3939, 0x0000000000000000ULL, 0x2AE2A8E57684ED7BULL }, /* XSUM_XXH64_testdata[7878] */\n    { 3939, 0x000000009E3779B1ULL, 0x4A39B120244DAA8DULL }, /* XSUM_XXH64_testdata[7879] */\n    { 3940, 0x0000000000000000ULL, 0x13D0EE9B5294DE48ULL }, /* XSUM_XXH64_testdata[7880] */\n    { 3940, 0x000000009E3779B1ULL, 0x93F1B314F350C57FULL }, /* XSUM_XXH64_testdata[7881] */\n    { 3941, 0x0000000000000000ULL, 0x2B89A41B60C6E168ULL }, /* XSUM_XXH64_testdata[7882] */\n    { 3941, 0x000000009E3779B1ULL, 0xC8701B56BA88358CULL }, /* XSUM_XXH64_testdata[7883] */\n    { 3942, 0x0000000000000000ULL, 0xEA03F8A8284A507DULL }, /* XSUM_XXH64_testdata[7884] */\n    { 3942, 0x000000009E3779B1ULL, 0x63A8B5B192337F85ULL }, /* XSUM_XXH64_testdata[7885] */\n    { 3943, 0x0000000000000000ULL, 0x5E0D144B32B80503ULL }, /* XSUM_XXH64_testdata[7886] */\n    { 3943, 0x000000009E3779B1ULL, 0xAAF4FC5E3F174410ULL }, /* XSUM_XXH64_testdata[7887] */\n    { 3944, 0x0000000000000000ULL, 0xC6929AB741D4F250ULL }, /* XSUM_XXH64_testdata[7888] */\n    { 3944, 0x000000009E3779B1ULL, 0x9916904CC317CCE8ULL }, /* XSUM_XXH64_testdata[7889] */\n    { 3945, 0x0000000000000000ULL, 0x13FE32EBCA4E2E2DULL }, /* XSUM_XXH64_testdata[7890] */\n    { 3945, 0x000000009E3779B1ULL, 0x5107D87D89FF93F5ULL }, /* XSUM_XXH64_testdata[7891] */\n    { 3946, 0x0000000000000000ULL, 0x17402CC0CEB984BBULL }, /* XSUM_XXH64_testdata[7892] */\n    { 3946, 0x000000009E3779B1ULL, 0x0B314E4B15A92399ULL }, /* XSUM_XXH64_testdata[7893] */\n    { 3947, 0x0000000000000000ULL, 0xDF35648C8FDB8A27ULL }, /* XSUM_XXH64_testdata[7894] */\n    { 3947, 0x000000009E3779B1ULL, 0x95A1E01EEBFD75A6ULL }, /* XSUM_XXH64_testdata[7895] */\n    { 3948, 0x0000000000000000ULL, 0xE373AF28B0D58AF5ULL }, /* XSUM_XXH64_testdata[7896] */\n    { 3948, 0x000000009E3779B1ULL, 0x8D264F09BEB46642ULL }, /* XSUM_XXH64_testdata[7897] */\n    { 3949, 0x0000000000000000ULL, 0x001D88144D43F841ULL }, /* XSUM_XXH64_testdata[7898] */\n    { 3949, 0x000000009E3779B1ULL, 0x89A165A6A868C122ULL }, /* XSUM_XXH64_testdata[7899] */\n    { 3950, 0x0000000000000000ULL, 0x13BE7B4CDED817D9ULL }, /* XSUM_XXH64_testdata[7900] */\n    { 3950, 0x000000009E3779B1ULL, 0x3E1581DCA2C374F6ULL }, /* XSUM_XXH64_testdata[7901] */\n    { 3951, 0x0000000000000000ULL, 0x17D93735295EE289ULL }, /* XSUM_XXH64_testdata[7902] */\n    { 3951, 0x000000009E3779B1ULL, 0xFE2F55E191FFE975ULL }, /* XSUM_XXH64_testdata[7903] */\n    { 3952, 0x0000000000000000ULL, 0x70F43B541337F522ULL }, /* XSUM_XXH64_testdata[7904] */\n    { 3952, 0x000000009E3779B1ULL, 0xDC048D2183067141ULL }, /* XSUM_XXH64_testdata[7905] */\n    { 3953, 0x0000000000000000ULL, 0x88B5C6DFBB3D304BULL }, /* XSUM_XXH64_testdata[7906] */\n    { 3953, 0x000000009E3779B1ULL, 0xB0D0E943C7BE5B8BULL }, /* XSUM_XXH64_testdata[7907] */\n    { 3954, 0x0000000000000000ULL, 0x8499858A1C889CB6ULL }, /* XSUM_XXH64_testdata[7908] */\n    { 3954, 0x000000009E3779B1ULL, 0xA32F76E6FFD18DA8ULL }, /* XSUM_XXH64_testdata[7909] */\n    { 3955, 0x0000000000000000ULL, 0x25F551ECE40BBAB6ULL }, /* XSUM_XXH64_testdata[7910] */\n    { 3955, 0x000000009E3779B1ULL, 0xC4D9046B48F80B1FULL }, /* XSUM_XXH64_testdata[7911] */\n    { 3956, 0x0000000000000000ULL, 0x478C1C0F051B3C52ULL }, /* XSUM_XXH64_testdata[7912] */\n    { 3956, 0x000000009E3779B1ULL, 0x30E2A247BB69631EULL }, /* XSUM_XXH64_testdata[7913] */\n    { 3957, 0x0000000000000000ULL, 0x08D67AEF7C0D37ABULL }, /* XSUM_XXH64_testdata[7914] */\n    { 3957, 0x000000009E3779B1ULL, 0x92B03B1873304A64ULL }, /* XSUM_XXH64_testdata[7915] */\n    { 3958, 0x0000000000000000ULL, 0xEAF76B5261BEACD7ULL }, /* XSUM_XXH64_testdata[7916] */\n    { 3958, 0x000000009E3779B1ULL, 0x8A9AA00246AC44ADULL }, /* XSUM_XXH64_testdata[7917] */\n    { 3959, 0x0000000000000000ULL, 0xD08A69770300B38FULL }, /* XSUM_XXH64_testdata[7918] */\n    { 3959, 0x000000009E3779B1ULL, 0x9A4565E18887B56AULL }, /* XSUM_XXH64_testdata[7919] */\n    { 3960, 0x0000000000000000ULL, 0x48409FB0EA8D6A68ULL }, /* XSUM_XXH64_testdata[7920] */\n    { 3960, 0x000000009E3779B1ULL, 0x0471F2174ACF46DDULL }, /* XSUM_XXH64_testdata[7921] */\n    { 3961, 0x0000000000000000ULL, 0x4F2EBDA831408442ULL }, /* XSUM_XXH64_testdata[7922] */\n    { 3961, 0x000000009E3779B1ULL, 0x9399761A0583EA7AULL }, /* XSUM_XXH64_testdata[7923] */\n    { 3962, 0x0000000000000000ULL, 0xAE44B86C06C19B11ULL }, /* XSUM_XXH64_testdata[7924] */\n    { 3962, 0x000000009E3779B1ULL, 0x6E8E4AA49DCE1AF0ULL }, /* XSUM_XXH64_testdata[7925] */\n    { 3963, 0x0000000000000000ULL, 0xB1BEA1BA827F7581ULL }, /* XSUM_XXH64_testdata[7926] */\n    { 3963, 0x000000009E3779B1ULL, 0x6414543260A5F17BULL }, /* XSUM_XXH64_testdata[7927] */\n    { 3964, 0x0000000000000000ULL, 0xFDC7F121F9EB0058ULL }, /* XSUM_XXH64_testdata[7928] */\n    { 3964, 0x000000009E3779B1ULL, 0xADFCC2AEDFF58CC3ULL }, /* XSUM_XXH64_testdata[7929] */\n    { 3965, 0x0000000000000000ULL, 0x3EA8559D30981650ULL }, /* XSUM_XXH64_testdata[7930] */\n    { 3965, 0x000000009E3779B1ULL, 0x8DCCC74E4BA09EDBULL }, /* XSUM_XXH64_testdata[7931] */\n    { 3966, 0x0000000000000000ULL, 0x8E8191ADA30BFBF1ULL }, /* XSUM_XXH64_testdata[7932] */\n    { 3966, 0x000000009E3779B1ULL, 0x9EE6C76B1948F554ULL }, /* XSUM_XXH64_testdata[7933] */\n    { 3967, 0x0000000000000000ULL, 0x9C42FE5248948AAEULL }, /* XSUM_XXH64_testdata[7934] */\n    { 3967, 0x000000009E3779B1ULL, 0x6E2A6A711A848F76ULL }, /* XSUM_XXH64_testdata[7935] */\n    { 3968, 0x0000000000000000ULL, 0xDCE40D3069489BA9ULL }, /* XSUM_XXH64_testdata[7936] */\n    { 3968, 0x000000009E3779B1ULL, 0xBF637145773FE1B5ULL }, /* XSUM_XXH64_testdata[7937] */\n    { 3969, 0x0000000000000000ULL, 0x0C545D80CEA45459ULL }, /* XSUM_XXH64_testdata[7938] */\n    { 3969, 0x000000009E3779B1ULL, 0x4F4ADADAF2CAA48BULL }, /* XSUM_XXH64_testdata[7939] */\n    { 3970, 0x0000000000000000ULL, 0x060B5952B6A4C254ULL }, /* XSUM_XXH64_testdata[7940] */\n    { 3970, 0x000000009E3779B1ULL, 0x01BC58A577814210ULL }, /* XSUM_XXH64_testdata[7941] */\n    { 3971, 0x0000000000000000ULL, 0xC48160A8666D5247ULL }, /* XSUM_XXH64_testdata[7942] */\n    { 3971, 0x000000009E3779B1ULL, 0x6795B97110707DAAULL }, /* XSUM_XXH64_testdata[7943] */\n    { 3972, 0x0000000000000000ULL, 0xF4079F57CBB025BCULL }, /* XSUM_XXH64_testdata[7944] */\n    { 3972, 0x000000009E3779B1ULL, 0xB90BEDFBC75D7789ULL }, /* XSUM_XXH64_testdata[7945] */\n    { 3973, 0x0000000000000000ULL, 0x6ACD5786A6444A67ULL }, /* XSUM_XXH64_testdata[7946] */\n    { 3973, 0x000000009E3779B1ULL, 0xDFABBDBB6F754EF2ULL }, /* XSUM_XXH64_testdata[7947] */\n    { 3974, 0x0000000000000000ULL, 0xFCF3493995E606D0ULL }, /* XSUM_XXH64_testdata[7948] */\n    { 3974, 0x000000009E3779B1ULL, 0x173DEC4AF33E317AULL }, /* XSUM_XXH64_testdata[7949] */\n    { 3975, 0x0000000000000000ULL, 0x833D7DD8686035EFULL }, /* XSUM_XXH64_testdata[7950] */\n    { 3975, 0x000000009E3779B1ULL, 0x7D37B55194C4991CULL }, /* XSUM_XXH64_testdata[7951] */\n    { 3976, 0x0000000000000000ULL, 0x15A225AAAD6AEB27ULL }, /* XSUM_XXH64_testdata[7952] */\n    { 3976, 0x000000009E3779B1ULL, 0x50FC9051B00BD0F9ULL }, /* XSUM_XXH64_testdata[7953] */\n    { 3977, 0x0000000000000000ULL, 0x1EBE45FA4E08AFD5ULL }, /* XSUM_XXH64_testdata[7954] */\n    { 3977, 0x000000009E3779B1ULL, 0x326AB719F17CB03BULL }, /* XSUM_XXH64_testdata[7955] */\n    { 3978, 0x0000000000000000ULL, 0xAF7CF4D02A3DBB9EULL }, /* XSUM_XXH64_testdata[7956] */\n    { 3978, 0x000000009E3779B1ULL, 0xC14282179D4622CFULL }, /* XSUM_XXH64_testdata[7957] */\n    { 3979, 0x0000000000000000ULL, 0x5DFE69B1F135EC69ULL }, /* XSUM_XXH64_testdata[7958] */\n    { 3979, 0x000000009E3779B1ULL, 0xEB6C109AD2C72AE6ULL }, /* XSUM_XXH64_testdata[7959] */\n    { 3980, 0x0000000000000000ULL, 0xF2C204F559591735ULL }, /* XSUM_XXH64_testdata[7960] */\n    { 3980, 0x000000009E3779B1ULL, 0x8722AF97530D1B7FULL }, /* XSUM_XXH64_testdata[7961] */\n    { 3981, 0x0000000000000000ULL, 0x0118A5C1E8354944ULL }, /* XSUM_XXH64_testdata[7962] */\n    { 3981, 0x000000009E3779B1ULL, 0x4D53DB23077E5909ULL }, /* XSUM_XXH64_testdata[7963] */\n    { 3982, 0x0000000000000000ULL, 0x8FB82825071D5865ULL }, /* XSUM_XXH64_testdata[7964] */\n    { 3982, 0x000000009E3779B1ULL, 0x1D8A1A7DD86F5B4BULL }, /* XSUM_XXH64_testdata[7965] */\n    { 3983, 0x0000000000000000ULL, 0xD6E221E7B65220C5ULL }, /* XSUM_XXH64_testdata[7966] */\n    { 3983, 0x000000009E3779B1ULL, 0xE3FDBBE94FE9ADD1ULL }, /* XSUM_XXH64_testdata[7967] */\n    { 3984, 0x0000000000000000ULL, 0xB7B010C70049C157ULL }, /* XSUM_XXH64_testdata[7968] */\n    { 3984, 0x000000009E3779B1ULL, 0x7D9EAC85B7543BA2ULL }, /* XSUM_XXH64_testdata[7969] */\n    { 3985, 0x0000000000000000ULL, 0x95F610607B7CB310ULL }, /* XSUM_XXH64_testdata[7970] */\n    { 3985, 0x000000009E3779B1ULL, 0x0E59011ECDE23202ULL }, /* XSUM_XXH64_testdata[7971] */\n    { 3986, 0x0000000000000000ULL, 0xE2FF26CA0B938520ULL }, /* XSUM_XXH64_testdata[7972] */\n    { 3986, 0x000000009E3779B1ULL, 0xC4B5EF4AA73D0934ULL }, /* XSUM_XXH64_testdata[7973] */\n    { 3987, 0x0000000000000000ULL, 0x617D00F9C3CD91C5ULL }, /* XSUM_XXH64_testdata[7974] */\n    { 3987, 0x000000009E3779B1ULL, 0x774CF1B692C91F9BULL }, /* XSUM_XXH64_testdata[7975] */\n    { 3988, 0x0000000000000000ULL, 0x7E411639ADE4D5F7ULL }, /* XSUM_XXH64_testdata[7976] */\n    { 3988, 0x000000009E3779B1ULL, 0x77774801DA40F3DEULL }, /* XSUM_XXH64_testdata[7977] */\n    { 3989, 0x0000000000000000ULL, 0x85D580023232C4B3ULL }, /* XSUM_XXH64_testdata[7978] */\n    { 3989, 0x000000009E3779B1ULL, 0x2A9C643D0FB82888ULL }, /* XSUM_XXH64_testdata[7979] */\n    { 3990, 0x0000000000000000ULL, 0x8F613454FF7ED58DULL }, /* XSUM_XXH64_testdata[7980] */\n    { 3990, 0x000000009E3779B1ULL, 0x4F76AB39FE0A5BA5ULL }, /* XSUM_XXH64_testdata[7981] */\n    { 3991, 0x0000000000000000ULL, 0x10592976833AD8E5ULL }, /* XSUM_XXH64_testdata[7982] */\n    { 3991, 0x000000009E3779B1ULL, 0x09848DFC5ECCC3CEULL }, /* XSUM_XXH64_testdata[7983] */\n    { 3992, 0x0000000000000000ULL, 0xD3D640E78BDF02E7ULL }, /* XSUM_XXH64_testdata[7984] */\n    { 3992, 0x000000009E3779B1ULL, 0x8C1AC46C726966AEULL }, /* XSUM_XXH64_testdata[7985] */\n    { 3993, 0x0000000000000000ULL, 0x7842CC40674E3459ULL }, /* XSUM_XXH64_testdata[7986] */\n    { 3993, 0x000000009E3779B1ULL, 0x2FECCD404E28D9D1ULL }, /* XSUM_XXH64_testdata[7987] */\n    { 3994, 0x0000000000000000ULL, 0x73D932569DE80332ULL }, /* XSUM_XXH64_testdata[7988] */\n    { 3994, 0x000000009E3779B1ULL, 0x0356F5FC11001526ULL }, /* XSUM_XXH64_testdata[7989] */\n    { 3995, 0x0000000000000000ULL, 0xD32797454E215501ULL }, /* XSUM_XXH64_testdata[7990] */\n    { 3995, 0x000000009E3779B1ULL, 0x110C2B3648F12754ULL }, /* XSUM_XXH64_testdata[7991] */\n    { 3996, 0x0000000000000000ULL, 0xD04594B72B516481ULL }, /* XSUM_XXH64_testdata[7992] */\n    { 3996, 0x000000009E3779B1ULL, 0x015FD921A512545CULL }, /* XSUM_XXH64_testdata[7993] */\n    { 3997, 0x0000000000000000ULL, 0x990AB891ADF6676CULL }, /* XSUM_XXH64_testdata[7994] */\n    { 3997, 0x000000009E3779B1ULL, 0x3028D36A65BFAAB6ULL }, /* XSUM_XXH64_testdata[7995] */\n    { 3998, 0x0000000000000000ULL, 0xA700CFA83A59E02CULL }, /* XSUM_XXH64_testdata[7996] */\n    { 3998, 0x000000009E3779B1ULL, 0x83A85456AA086228ULL }, /* XSUM_XXH64_testdata[7997] */\n    { 3999, 0x0000000000000000ULL, 0x8F3A633D22FDDA5CULL }, /* XSUM_XXH64_testdata[7998] */\n    { 3999, 0x000000009E3779B1ULL, 0xCC3F6E7AA02039D5ULL }, /* XSUM_XXH64_testdata[7999] */\n    { 4000, 0x0000000000000000ULL, 0x90C007A4F73556D1ULL }, /* XSUM_XXH64_testdata[8000] */\n    { 4000, 0x000000009E3779B1ULL, 0xC6E9248BC08D6488ULL }, /* XSUM_XXH64_testdata[8001] */\n    { 4001, 0x0000000000000000ULL, 0x692784BC38CD28A7ULL }, /* XSUM_XXH64_testdata[8002] */\n    { 4001, 0x000000009E3779B1ULL, 0x256455ED53A994BEULL }, /* XSUM_XXH64_testdata[8003] */\n    { 4002, 0x0000000000000000ULL, 0x40E409384AF582ACULL }, /* XSUM_XXH64_testdata[8004] */\n    { 4002, 0x000000009E3779B1ULL, 0xBE3D23C452CC769FULL }, /* XSUM_XXH64_testdata[8005] */\n    { 4003, 0x0000000000000000ULL, 0xB21655A3D6BE4CF2ULL }, /* XSUM_XXH64_testdata[8006] */\n    { 4003, 0x000000009E3779B1ULL, 0x5AAA57D882C7E022ULL }, /* XSUM_XXH64_testdata[8007] */\n    { 4004, 0x0000000000000000ULL, 0xF7BE83C70B79E595ULL }, /* XSUM_XXH64_testdata[8008] */\n    { 4004, 0x000000009E3779B1ULL, 0x2B5234E567713393ULL }, /* XSUM_XXH64_testdata[8009] */\n    { 4005, 0x0000000000000000ULL, 0x9BD38D1BB3566B15ULL }, /* XSUM_XXH64_testdata[8010] */\n    { 4005, 0x000000009E3779B1ULL, 0x50043BB8D82192EDULL }, /* XSUM_XXH64_testdata[8011] */\n    { 4006, 0x0000000000000000ULL, 0x2BF1A8B6F357420DULL }, /* XSUM_XXH64_testdata[8012] */\n    { 4006, 0x000000009E3779B1ULL, 0xCFB7C237207414CFULL }, /* XSUM_XXH64_testdata[8013] */\n    { 4007, 0x0000000000000000ULL, 0xCA2C8565FDCA1AADULL }, /* XSUM_XXH64_testdata[8014] */\n    { 4007, 0x000000009E3779B1ULL, 0xCE6637339E7C861BULL }, /* XSUM_XXH64_testdata[8015] */\n    { 4008, 0x0000000000000000ULL, 0x31D86687B2F5A17EULL }, /* XSUM_XXH64_testdata[8016] */\n    { 4008, 0x000000009E3779B1ULL, 0xDDEE147AA1E32C33ULL }, /* XSUM_XXH64_testdata[8017] */\n    { 4009, 0x0000000000000000ULL, 0xCBD473C065BA5D54ULL }, /* XSUM_XXH64_testdata[8018] */\n    { 4009, 0x000000009E3779B1ULL, 0x663091138BEB319EULL }, /* XSUM_XXH64_testdata[8019] */\n    { 4010, 0x0000000000000000ULL, 0x51FA5B416B4829A3ULL }, /* XSUM_XXH64_testdata[8020] */\n    { 4010, 0x000000009E3779B1ULL, 0x62DFD8D9CF229A5BULL }, /* XSUM_XXH64_testdata[8021] */\n    { 4011, 0x0000000000000000ULL, 0x3479737558D4847BULL }, /* XSUM_XXH64_testdata[8022] */\n    { 4011, 0x000000009E3779B1ULL, 0x3D7B05AA65C0416CULL }, /* XSUM_XXH64_testdata[8023] */\n    { 4012, 0x0000000000000000ULL, 0x049D886E31AC1362ULL }, /* XSUM_XXH64_testdata[8024] */\n    { 4012, 0x000000009E3779B1ULL, 0xB2007C8DB9BC4F0BULL }, /* XSUM_XXH64_testdata[8025] */\n    { 4013, 0x0000000000000000ULL, 0xC01F1903ACEF8204ULL }, /* XSUM_XXH64_testdata[8026] */\n    { 4013, 0x000000009E3779B1ULL, 0xA920A23C0B4EECDBULL }, /* XSUM_XXH64_testdata[8027] */\n    { 4014, 0x0000000000000000ULL, 0xFC46CAF1ED2FD890ULL }, /* XSUM_XXH64_testdata[8028] */\n    { 4014, 0x000000009E3779B1ULL, 0xC240BBA786D9DD7DULL }, /* XSUM_XXH64_testdata[8029] */\n    { 4015, 0x0000000000000000ULL, 0x80F7800685F3DB4BULL }, /* XSUM_XXH64_testdata[8030] */\n    { 4015, 0x000000009E3779B1ULL, 0x98B6BDA8045D73E1ULL }, /* XSUM_XXH64_testdata[8031] */\n    { 4016, 0x0000000000000000ULL, 0x2696F9A318DBAD92ULL }, /* XSUM_XXH64_testdata[8032] */\n    { 4016, 0x000000009E3779B1ULL, 0xB053EA689B891F95ULL }, /* XSUM_XXH64_testdata[8033] */\n    { 4017, 0x0000000000000000ULL, 0x746F9E6F17780D98ULL }, /* XSUM_XXH64_testdata[8034] */\n    { 4017, 0x000000009E3779B1ULL, 0x0BE4EBFCD912DC9DULL }, /* XSUM_XXH64_testdata[8035] */\n    { 4018, 0x0000000000000000ULL, 0xECDF912875361666ULL }, /* XSUM_XXH64_testdata[8036] */\n    { 4018, 0x000000009E3779B1ULL, 0xF922C4AEF9D6B93DULL }, /* XSUM_XXH64_testdata[8037] */\n    { 4019, 0x0000000000000000ULL, 0x8AE84070A2164010ULL }, /* XSUM_XXH64_testdata[8038] */\n    { 4019, 0x000000009E3779B1ULL, 0x772BACAECFBA67DDULL }, /* XSUM_XXH64_testdata[8039] */\n    { 4020, 0x0000000000000000ULL, 0x7722B4FD182BE35AULL }, /* XSUM_XXH64_testdata[8040] */\n    { 4020, 0x000000009E3779B1ULL, 0x4482C3CC1893119FULL }, /* XSUM_XXH64_testdata[8041] */\n    { 4021, 0x0000000000000000ULL, 0x704E3234F7DE73F3ULL }, /* XSUM_XXH64_testdata[8042] */\n    { 4021, 0x000000009E3779B1ULL, 0xBC85B1183AD3928DULL }, /* XSUM_XXH64_testdata[8043] */\n    { 4022, 0x0000000000000000ULL, 0x24D0838307445FC8ULL }, /* XSUM_XXH64_testdata[8044] */\n    { 4022, 0x000000009E3779B1ULL, 0xBF89C8FD67D3A49CULL }, /* XSUM_XXH64_testdata[8045] */\n    { 4023, 0x0000000000000000ULL, 0xD4D5E6CB1C69978CULL }, /* XSUM_XXH64_testdata[8046] */\n    { 4023, 0x000000009E3779B1ULL, 0xAC2FA91127C9BADCULL }, /* XSUM_XXH64_testdata[8047] */\n    { 4024, 0x0000000000000000ULL, 0x2DDAB5327185B20BULL }, /* XSUM_XXH64_testdata[8048] */\n    { 4024, 0x000000009E3779B1ULL, 0xAE348C0F9FC7D1A7ULL }, /* XSUM_XXH64_testdata[8049] */\n    { 4025, 0x0000000000000000ULL, 0x96506FE26BBCBCC5ULL }, /* XSUM_XXH64_testdata[8050] */\n    { 4025, 0x000000009E3779B1ULL, 0x284E8B473F4DA22EULL }, /* XSUM_XXH64_testdata[8051] */\n    { 4026, 0x0000000000000000ULL, 0x62A6D15E9C9AB8ECULL }, /* XSUM_XXH64_testdata[8052] */\n    { 4026, 0x000000009E3779B1ULL, 0x24F324DB49AA0E55ULL }, /* XSUM_XXH64_testdata[8053] */\n    { 4027, 0x0000000000000000ULL, 0x0A0AFC2C557A4479ULL }, /* XSUM_XXH64_testdata[8054] */\n    { 4027, 0x000000009E3779B1ULL, 0x5AA617C2A43E2EDCULL }, /* XSUM_XXH64_testdata[8055] */\n    { 4028, 0x0000000000000000ULL, 0x1E3D67AD22073383ULL }, /* XSUM_XXH64_testdata[8056] */\n    { 4028, 0x000000009E3779B1ULL, 0x679513AE5CD49675ULL }, /* XSUM_XXH64_testdata[8057] */\n    { 4029, 0x0000000000000000ULL, 0xEC94C1004820C1DEULL }, /* XSUM_XXH64_testdata[8058] */\n    { 4029, 0x000000009E3779B1ULL, 0x413CCFAFD9C2A0A8ULL }, /* XSUM_XXH64_testdata[8059] */\n    { 4030, 0x0000000000000000ULL, 0xF60D3FAED32689EEULL }, /* XSUM_XXH64_testdata[8060] */\n    { 4030, 0x000000009E3779B1ULL, 0xD20201045EBE1B17ULL }, /* XSUM_XXH64_testdata[8061] */\n    { 4031, 0x0000000000000000ULL, 0x47CEB1434470EB1CULL }, /* XSUM_XXH64_testdata[8062] */\n    { 4031, 0x000000009E3779B1ULL, 0x66F88313EC53E688ULL }, /* XSUM_XXH64_testdata[8063] */\n    { 4032, 0x0000000000000000ULL, 0x6F52ECC459D782BBULL }, /* XSUM_XXH64_testdata[8064] */\n    { 4032, 0x000000009E3779B1ULL, 0xDCD097CED8214287ULL }, /* XSUM_XXH64_testdata[8065] */\n    { 4033, 0x0000000000000000ULL, 0x188671E63DF6BFAEULL }, /* XSUM_XXH64_testdata[8066] */\n    { 4033, 0x000000009E3779B1ULL, 0x54727CDDB9E40BCEULL }, /* XSUM_XXH64_testdata[8067] */\n    { 4034, 0x0000000000000000ULL, 0x4053F2D063DD8ABAULL }, /* XSUM_XXH64_testdata[8068] */\n    { 4034, 0x000000009E3779B1ULL, 0x4D6D802355D21406ULL }, /* XSUM_XXH64_testdata[8069] */\n    { 4035, 0x0000000000000000ULL, 0x2080C6F3D3374171ULL }, /* XSUM_XXH64_testdata[8070] */\n    { 4035, 0x000000009E3779B1ULL, 0xBD8A643376DBC7E1ULL }, /* XSUM_XXH64_testdata[8071] */\n    { 4036, 0x0000000000000000ULL, 0x83F0F6AE0EA7BF01ULL }, /* XSUM_XXH64_testdata[8072] */\n    { 4036, 0x000000009E3779B1ULL, 0xBFCED31BA76BDBFBULL }, /* XSUM_XXH64_testdata[8073] */\n    { 4037, 0x0000000000000000ULL, 0xC5395E22533548C5ULL }, /* XSUM_XXH64_testdata[8074] */\n    { 4037, 0x000000009E3779B1ULL, 0x5A001693D7B7AF40ULL }, /* XSUM_XXH64_testdata[8075] */\n    { 4038, 0x0000000000000000ULL, 0xC226D9C7991FF778ULL }, /* XSUM_XXH64_testdata[8076] */\n    { 4038, 0x000000009E3779B1ULL, 0x9C6877CEAE4406DBULL }, /* XSUM_XXH64_testdata[8077] */\n    { 4039, 0x0000000000000000ULL, 0xC3A6361AB4E9C123ULL }, /* XSUM_XXH64_testdata[8078] */\n    { 4039, 0x000000009E3779B1ULL, 0x824561D83749061DULL }, /* XSUM_XXH64_testdata[8079] */\n    { 4040, 0x0000000000000000ULL, 0xBB2628736C0B33CEULL }, /* XSUM_XXH64_testdata[8080] */\n    { 4040, 0x000000009E3779B1ULL, 0x4A39C7DB1F4994B6ULL }, /* XSUM_XXH64_testdata[8081] */\n    { 4041, 0x0000000000000000ULL, 0x47A8ADCA0E855A16ULL }, /* XSUM_XXH64_testdata[8082] */\n    { 4041, 0x000000009E3779B1ULL, 0xACAD4424055950B0ULL }, /* XSUM_XXH64_testdata[8083] */\n    { 4042, 0x0000000000000000ULL, 0x929C51BD93444720ULL }, /* XSUM_XXH64_testdata[8084] */\n    { 4042, 0x000000009E3779B1ULL, 0x583874E5D1A0EDB5ULL }, /* XSUM_XXH64_testdata[8085] */\n    { 4043, 0x0000000000000000ULL, 0xCF3FFDE3CCF41C84ULL }, /* XSUM_XXH64_testdata[8086] */\n    { 4043, 0x000000009E3779B1ULL, 0xFEC86DD93345C0AAULL }, /* XSUM_XXH64_testdata[8087] */\n    { 4044, 0x0000000000000000ULL, 0x630DBA38F22CB342ULL }, /* XSUM_XXH64_testdata[8088] */\n    { 4044, 0x000000009E3779B1ULL, 0x5B78D9830DA38B76ULL }, /* XSUM_XXH64_testdata[8089] */\n    { 4045, 0x0000000000000000ULL, 0xE715ED35C6A5A6DBULL }, /* XSUM_XXH64_testdata[8090] */\n    { 4045, 0x000000009E3779B1ULL, 0x7B424B81E833E6B0ULL }, /* XSUM_XXH64_testdata[8091] */\n    { 4046, 0x0000000000000000ULL, 0x43CA59C81E83498AULL }, /* XSUM_XXH64_testdata[8092] */\n    { 4046, 0x000000009E3779B1ULL, 0x0F2E9D429150943FULL }, /* XSUM_XXH64_testdata[8093] */\n    { 4047, 0x0000000000000000ULL, 0x1A24DB18A1292BF5ULL }, /* XSUM_XXH64_testdata[8094] */\n    { 4047, 0x000000009E3779B1ULL, 0x68DF522684C65366ULL }, /* XSUM_XXH64_testdata[8095] */\n    { 4048, 0x0000000000000000ULL, 0xDC2D4281642B96EDULL }, /* XSUM_XXH64_testdata[8096] */\n    { 4048, 0x000000009E3779B1ULL, 0x5FAD0C102C389E5CULL }, /* XSUM_XXH64_testdata[8097] */\n    { 4049, 0x0000000000000000ULL, 0x1F1DCB503FC94208ULL }, /* XSUM_XXH64_testdata[8098] */\n    { 4049, 0x000000009E3779B1ULL, 0xAF2085D1666AC962ULL }, /* XSUM_XXH64_testdata[8099] */\n    { 4050, 0x0000000000000000ULL, 0xE31518B002D8238AULL }, /* XSUM_XXH64_testdata[8100] */\n    { 4050, 0x000000009E3779B1ULL, 0xCF66BA6EFC701801ULL }, /* XSUM_XXH64_testdata[8101] */\n    { 4051, 0x0000000000000000ULL, 0xCCA119E0DA17FFF0ULL }, /* XSUM_XXH64_testdata[8102] */\n    { 4051, 0x000000009E3779B1ULL, 0x6A8CF0C08C7872C8ULL }, /* XSUM_XXH64_testdata[8103] */\n    { 4052, 0x0000000000000000ULL, 0x6B14D3C36A16BE1EULL }, /* XSUM_XXH64_testdata[8104] */\n    { 4052, 0x000000009E3779B1ULL, 0x1915F82CE8F967B2ULL }, /* XSUM_XXH64_testdata[8105] */\n    { 4053, 0x0000000000000000ULL, 0x08D5963DA776CE54ULL }, /* XSUM_XXH64_testdata[8106] */\n    { 4053, 0x000000009E3779B1ULL, 0x26EB28291524A70EULL }, /* XSUM_XXH64_testdata[8107] */\n    { 4054, 0x0000000000000000ULL, 0x36A484B5680E29CDULL }, /* XSUM_XXH64_testdata[8108] */\n    { 4054, 0x000000009E3779B1ULL, 0x53C197CC36839A69ULL }, /* XSUM_XXH64_testdata[8109] */\n    { 4055, 0x0000000000000000ULL, 0x78E00D72336053B5ULL }, /* XSUM_XXH64_testdata[8110] */\n    { 4055, 0x000000009E3779B1ULL, 0x0D5190BDD99352FFULL }, /* XSUM_XXH64_testdata[8111] */\n    { 4056, 0x0000000000000000ULL, 0x4B209C54F197D459ULL }, /* XSUM_XXH64_testdata[8112] */\n    { 4056, 0x000000009E3779B1ULL, 0x84CBA43CD01FE1B5ULL }, /* XSUM_XXH64_testdata[8113] */\n    { 4057, 0x0000000000000000ULL, 0x15301E4472CA272CULL }, /* XSUM_XXH64_testdata[8114] */\n    { 4057, 0x000000009E3779B1ULL, 0x580A5761F5276F12ULL }, /* XSUM_XXH64_testdata[8115] */\n    { 4058, 0x0000000000000000ULL, 0x6DE53E730A657BA4ULL }, /* XSUM_XXH64_testdata[8116] */\n    { 4058, 0x000000009E3779B1ULL, 0xA87F49BF1E8E5E4CULL }, /* XSUM_XXH64_testdata[8117] */\n    { 4059, 0x0000000000000000ULL, 0x5E8066C8413B9BA8ULL }, /* XSUM_XXH64_testdata[8118] */\n    { 4059, 0x000000009E3779B1ULL, 0xCCC75D5B8C25FB12ULL }, /* XSUM_XXH64_testdata[8119] */\n    { 4060, 0x0000000000000000ULL, 0x9DDCA1A9A31EDACEULL }, /* XSUM_XXH64_testdata[8120] */\n    { 4060, 0x000000009E3779B1ULL, 0x9557E73E80D121CDULL }, /* XSUM_XXH64_testdata[8121] */\n    { 4061, 0x0000000000000000ULL, 0x21DDD14C2C1BEA08ULL }, /* XSUM_XXH64_testdata[8122] */\n    { 4061, 0x000000009E3779B1ULL, 0x82BF54E49EF1EEDEULL }, /* XSUM_XXH64_testdata[8123] */\n    { 4062, 0x0000000000000000ULL, 0x1FAF972521A9AA91ULL }, /* XSUM_XXH64_testdata[8124] */\n    { 4062, 0x000000009E3779B1ULL, 0x020AA0FC46FF91D9ULL }, /* XSUM_XXH64_testdata[8125] */\n    { 4063, 0x0000000000000000ULL, 0xE34C3C6A7F56EBDEULL }, /* XSUM_XXH64_testdata[8126] */\n    { 4063, 0x000000009E3779B1ULL, 0x33A54B3DC8603FABULL }, /* XSUM_XXH64_testdata[8127] */\n    { 4064, 0x0000000000000000ULL, 0x2D3594F5DA50CB02ULL }, /* XSUM_XXH64_testdata[8128] */\n    { 4064, 0x000000009E3779B1ULL, 0xC2231934570A971EULL }, /* XSUM_XXH64_testdata[8129] */\n    { 4065, 0x0000000000000000ULL, 0x3732D7559634A341ULL }, /* XSUM_XXH64_testdata[8130] */\n    { 4065, 0x000000009E3779B1ULL, 0xAED8A91F38010606ULL }, /* XSUM_XXH64_testdata[8131] */\n    { 4066, 0x0000000000000000ULL, 0x5D5BF492B1C73B75ULL }, /* XSUM_XXH64_testdata[8132] */\n    { 4066, 0x000000009E3779B1ULL, 0xC0E7F4CB228197E2ULL }, /* XSUM_XXH64_testdata[8133] */\n    { 4067, 0x0000000000000000ULL, 0xAA7311C102DCE86BULL }, /* XSUM_XXH64_testdata[8134] */\n    { 4067, 0x000000009E3779B1ULL, 0xB9DA748FB617D1D3ULL }, /* XSUM_XXH64_testdata[8135] */\n    { 4068, 0x0000000000000000ULL, 0xD5000B7825DBCA69ULL }, /* XSUM_XXH64_testdata[8136] */\n    { 4068, 0x000000009E3779B1ULL, 0x982FB203CD12F16CULL }, /* XSUM_XXH64_testdata[8137] */\n    { 4069, 0x0000000000000000ULL, 0xBFD5A3F3884815C4ULL }, /* XSUM_XXH64_testdata[8138] */\n    { 4069, 0x000000009E3779B1ULL, 0x4C9F535507154E24ULL }, /* XSUM_XXH64_testdata[8139] */\n    { 4070, 0x0000000000000000ULL, 0xF64323EF662F6E46ULL }, /* XSUM_XXH64_testdata[8140] */\n    { 4070, 0x000000009E3779B1ULL, 0x15D2F5C52800BD85ULL }, /* XSUM_XXH64_testdata[8141] */\n    { 4071, 0x0000000000000000ULL, 0x7A8ED28DF7B1AF79ULL }, /* XSUM_XXH64_testdata[8142] */\n    { 4071, 0x000000009E3779B1ULL, 0xF241DE311242EB87ULL }, /* XSUM_XXH64_testdata[8143] */\n    { 4072, 0x0000000000000000ULL, 0xFB47A3CB83561B32ULL }, /* XSUM_XXH64_testdata[8144] */\n    { 4072, 0x000000009E3779B1ULL, 0x842E272330A377AEULL }, /* XSUM_XXH64_testdata[8145] */\n    { 4073, 0x0000000000000000ULL, 0x333FF4343E2B34A3ULL }, /* XSUM_XXH64_testdata[8146] */\n    { 4073, 0x000000009E3779B1ULL, 0x1FEA17851B97FB48ULL }, /* XSUM_XXH64_testdata[8147] */\n    { 4074, 0x0000000000000000ULL, 0x548410F24A4A46C6ULL }, /* XSUM_XXH64_testdata[8148] */\n    { 4074, 0x000000009E3779B1ULL, 0xCF161A4407045D93ULL }, /* XSUM_XXH64_testdata[8149] */\n    { 4075, 0x0000000000000000ULL, 0x13D886068FD1DC72ULL }, /* XSUM_XXH64_testdata[8150] */\n    { 4075, 0x000000009E3779B1ULL, 0xB9DA91762F6CF967ULL }, /* XSUM_XXH64_testdata[8151] */\n    { 4076, 0x0000000000000000ULL, 0x1B40A74F55F0CA72ULL }, /* XSUM_XXH64_testdata[8152] */\n    { 4076, 0x000000009E3779B1ULL, 0x45DAAE16A129665BULL }, /* XSUM_XXH64_testdata[8153] */\n    { 4077, 0x0000000000000000ULL, 0xF46C23EA2D688B49ULL }, /* XSUM_XXH64_testdata[8154] */\n    { 4077, 0x000000009E3779B1ULL, 0xDA6E67C3CF530A9DULL }, /* XSUM_XXH64_testdata[8155] */\n    { 4078, 0x0000000000000000ULL, 0xB47060FD9B028C79ULL }, /* XSUM_XXH64_testdata[8156] */\n    { 4078, 0x000000009E3779B1ULL, 0x8C077A05E2E3FAC8ULL }, /* XSUM_XXH64_testdata[8157] */\n    { 4079, 0x0000000000000000ULL, 0x98F5EC35F8F2909DULL }, /* XSUM_XXH64_testdata[8158] */\n    { 4079, 0x000000009E3779B1ULL, 0xF18C0686B87806D4ULL }, /* XSUM_XXH64_testdata[8159] */\n    { 4080, 0x0000000000000000ULL, 0xC8B83C0B7B6732F8ULL }, /* XSUM_XXH64_testdata[8160] */\n    { 4080, 0x000000009E3779B1ULL, 0x868CA7977B762524ULL }, /* XSUM_XXH64_testdata[8161] */\n    { 4081, 0x0000000000000000ULL, 0x2C5CC2F3F5D02D1EULL }, /* XSUM_XXH64_testdata[8162] */\n    { 4081, 0x000000009E3779B1ULL, 0x02F47C41C95692C8ULL }, /* XSUM_XXH64_testdata[8163] */\n    { 4082, 0x0000000000000000ULL, 0x973D854ED70A408BULL }, /* XSUM_XXH64_testdata[8164] */\n    { 4082, 0x000000009E3779B1ULL, 0x519E265E8ECE9294ULL }, /* XSUM_XXH64_testdata[8165] */\n    { 4083, 0x0000000000000000ULL, 0x13460FC4DCCB3434ULL }, /* XSUM_XXH64_testdata[8166] */\n    { 4083, 0x000000009E3779B1ULL, 0xC8FC637BC17232A4ULL }, /* XSUM_XXH64_testdata[8167] */\n    { 4084, 0x0000000000000000ULL, 0xED14D75A091FE674ULL }, /* XSUM_XXH64_testdata[8168] */\n    { 4084, 0x000000009E3779B1ULL, 0x0048AAB4FF95BA90ULL }, /* XSUM_XXH64_testdata[8169] */\n    { 4085, 0x0000000000000000ULL, 0x650DF94DF15674C5ULL }, /* XSUM_XXH64_testdata[8170] */\n    { 4085, 0x000000009E3779B1ULL, 0xF030F38644940B54ULL }, /* XSUM_XXH64_testdata[8171] */\n    { 4086, 0x0000000000000000ULL, 0x65D46DBFD457731DULL }, /* XSUM_XXH64_testdata[8172] */\n    { 4086, 0x000000009E3779B1ULL, 0x5F8B6B8B6A533BFFULL }, /* XSUM_XXH64_testdata[8173] */\n    { 4087, 0x0000000000000000ULL, 0x4B6EA1D18619EF09ULL }, /* XSUM_XXH64_testdata[8174] */\n    { 4087, 0x000000009E3779B1ULL, 0x5A7ABBFCD538E252ULL }, /* XSUM_XXH64_testdata[8175] */\n    { 4088, 0x0000000000000000ULL, 0x7CEB172052D9E610ULL }, /* XSUM_XXH64_testdata[8176] */\n    { 4088, 0x000000009E3779B1ULL, 0x4F08B47E9E745585ULL }, /* XSUM_XXH64_testdata[8177] */\n    { 4089, 0x0000000000000000ULL, 0x4A08B85F5D97E895ULL }, /* XSUM_XXH64_testdata[8178] */\n    { 4089, 0x000000009E3779B1ULL, 0xC68B362CD5D8ADC1ULL }, /* XSUM_XXH64_testdata[8179] */\n    { 4090, 0x0000000000000000ULL, 0x84378FB5DB1D2DC0ULL }, /* XSUM_XXH64_testdata[8180] */\n    { 4090, 0x000000009E3779B1ULL, 0x9FD16BAB358DCB73ULL }, /* XSUM_XXH64_testdata[8181] */\n    { 4091, 0x0000000000000000ULL, 0xFAA2FD0B2E24BDD3ULL }, /* XSUM_XXH64_testdata[8182] */\n    { 4091, 0x000000009E3779B1ULL, 0x06D7ADADA05CCAA1ULL }, /* XSUM_XXH64_testdata[8183] */\n    { 4092, 0x0000000000000000ULL, 0xCF16DC0C077710A9ULL }, /* XSUM_XXH64_testdata[8184] */\n    { 4092, 0x000000009E3779B1ULL, 0xD48FC1BDEA8DE050ULL }, /* XSUM_XXH64_testdata[8185] */\n    { 4093, 0x0000000000000000ULL, 0x44DDB6E5702D093CULL }, /* XSUM_XXH64_testdata[8186] */\n    { 4093, 0x000000009E3779B1ULL, 0xE4BE077DBBCE7A63ULL }, /* XSUM_XXH64_testdata[8187] */\n    { 4094, 0x0000000000000000ULL, 0x9261AC32B68E7FBCULL }, /* XSUM_XXH64_testdata[8188] */\n    { 4094, 0x000000009E3779B1ULL, 0xEE828ECB3F62F0A0ULL }, /* XSUM_XXH64_testdata[8189] */\n    { 4095, 0x0000000000000000ULL, 0xF7CFAAA03BE2ABF0ULL }, /* XSUM_XXH64_testdata[8190] */\n    { 4095, 0x000000009E3779B1ULL, 0x6A128F7F02591E57ULL }, /* XSUM_XXH64_testdata[8191] */\n    { 4096, 0x0000000000000000ULL, 0xAB77F4AF85F4E70BULL }, /* XSUM_XXH64_testdata[8192] */\n    { 4096, 0x000000009E3779B1ULL, 0xCB8B60CBA513125DULL }, /* XSUM_XXH64_testdata[8193] */\n    { 4097, 0x0000000000000000ULL, 0xF617DE30F1C0ABB6ULL }, /* XSUM_XXH64_testdata[8194] */\n    { 4097, 0x000000009E3779B1ULL, 0x10C7D31644C76787ULL }, /* XSUM_XXH64_testdata[8195] */\n    { 4098, 0x0000000000000000ULL, 0xA70FDB06E7E77E59ULL }, /* XSUM_XXH64_testdata[8196] */\n    { 4098, 0x000000009E3779B1ULL, 0xA068C088EF5D1E16ULL }, /* XSUM_XXH64_testdata[8197] */\n    { 4099, 0x0000000000000000ULL, 0xF5D6AEE1D10D6BFDULL }, /* XSUM_XXH64_testdata[8198] */\n    { 4099, 0x000000009E3779B1ULL, 0x3526D4FD3184E7FCULL }, /* XSUM_XXH64_testdata[8199] */\n    { 4100, 0x0000000000000000ULL, 0x5356C4654E296FD1ULL }, /* XSUM_XXH64_testdata[8200] */\n    { 4100, 0x000000009E3779B1ULL, 0xF183449A95BBDC26ULL }, /* XSUM_XXH64_testdata[8201] */\n    { 4101, 0x0000000000000000ULL, 0x42C187B2F88CD6F8ULL }, /* XSUM_XXH64_testdata[8202] */\n    { 4101, 0x000000009E3779B1ULL, 0x46B6F57256685878ULL }, /* XSUM_XXH64_testdata[8203] */\n    { 4102, 0x0000000000000000ULL, 0x82D895CD84B0F37DULL }, /* XSUM_XXH64_testdata[8204] */\n    { 4102, 0x000000009E3779B1ULL, 0xD4A0C5F0C40C18C5ULL }, /* XSUM_XXH64_testdata[8205] */\n    { 4103, 0x0000000000000000ULL, 0xAAAFA9B492392879ULL }, /* XSUM_XXH64_testdata[8206] */\n    { 4103, 0x000000009E3779B1ULL, 0x380AE91CC372F32FULL }, /* XSUM_XXH64_testdata[8207] */\n    { 4104, 0x0000000000000000ULL, 0x66FFC6308C6EE945ULL }, /* XSUM_XXH64_testdata[8208] */\n    { 4104, 0x000000009E3779B1ULL, 0x4C4D6ECAB6B407DEULL }, /* XSUM_XXH64_testdata[8209] */\n    { 4105, 0x0000000000000000ULL, 0x315639DA92D17B9CULL }, /* XSUM_XXH64_testdata[8210] */\n    { 4105, 0x000000009E3779B1ULL, 0x3E463FD3D976BFC4ULL }, /* XSUM_XXH64_testdata[8211] */\n    { 4106, 0x0000000000000000ULL, 0x3127F24CF8A96824ULL }, /* XSUM_XXH64_testdata[8212] */\n    { 4106, 0x000000009E3779B1ULL, 0x60668C265EA0FA15ULL }, /* XSUM_XXH64_testdata[8213] */\n    { 4107, 0x0000000000000000ULL, 0x68489A86256CEE59ULL }, /* XSUM_XXH64_testdata[8214] */\n    { 4107, 0x000000009E3779B1ULL, 0x097CF0DAA2E6086DULL }, /* XSUM_XXH64_testdata[8215] */\n    { 4108, 0x0000000000000000ULL, 0xB76A19460BC12D18ULL }, /* XSUM_XXH64_testdata[8216] */\n    { 4108, 0x000000009E3779B1ULL, 0xD18E0A89A760B2AEULL }, /* XSUM_XXH64_testdata[8217] */\n    { 4109, 0x0000000000000000ULL, 0x07385293D966B468ULL }, /* XSUM_XXH64_testdata[8218] */\n    { 4109, 0x000000009E3779B1ULL, 0xB7F4D9B1207BACEDULL }, /* XSUM_XXH64_testdata[8219] */\n    { 4110, 0x0000000000000000ULL, 0x4DDD11582449D60CULL }, /* XSUM_XXH64_testdata[8220] */\n    { 4110, 0x000000009E3779B1ULL, 0xED53350B67670CC9ULL }, /* XSUM_XXH64_testdata[8221] */\n    { 4111, 0x0000000000000000ULL, 0xDFC88DC5AEFDC120ULL }, /* XSUM_XXH64_testdata[8222] */\n    { 4111, 0x000000009E3779B1ULL, 0xB1CFB861FC7ABCA7ULL }, /* XSUM_XXH64_testdata[8223] */\n    { 4112, 0x0000000000000000ULL, 0x50BC7144EADAE92EULL }, /* XSUM_XXH64_testdata[8224] */\n    { 4112, 0x000000009E3779B1ULL, 0x410922D3712BB7C9ULL }, /* XSUM_XXH64_testdata[8225] */\n    { 4113, 0x0000000000000000ULL, 0x76D9D24771FE08FCULL }, /* XSUM_XXH64_testdata[8226] */\n    { 4113, 0x000000009E3779B1ULL, 0x963353AC41789F2BULL }, /* XSUM_XXH64_testdata[8227] */\n    { 4114, 0x0000000000000000ULL, 0x86ABAC7D98EC100CULL }, /* XSUM_XXH64_testdata[8228] */\n    { 4114, 0x000000009E3779B1ULL, 0xAD4A3C8244C46BF6ULL }, /* XSUM_XXH64_testdata[8229] */\n    { 4115, 0x0000000000000000ULL, 0xBF51C1D33C8A534CULL }, /* XSUM_XXH64_testdata[8230] */\n    { 4115, 0x000000009E3779B1ULL, 0x80081946E56ED2DDULL }, /* XSUM_XXH64_testdata[8231] */\n    { 4116, 0x0000000000000000ULL, 0x283C38D7F07D40D6ULL }, /* XSUM_XXH64_testdata[8232] */\n    { 4116, 0x000000009E3779B1ULL, 0xA599EDD617182CD2ULL }, /* XSUM_XXH64_testdata[8233] */\n    { 4117, 0x0000000000000000ULL, 0x220B744BE3AA74CFULL }, /* XSUM_XXH64_testdata[8234] */\n    { 4117, 0x000000009E3779B1ULL, 0xBE1FAAFDEC2062CFULL }, /* XSUM_XXH64_testdata[8235] */\n    { 4118, 0x0000000000000000ULL, 0x7240D06D46F33F5EULL }, /* XSUM_XXH64_testdata[8236] */\n    { 4118, 0x000000009E3779B1ULL, 0xE9B781094B30BE1BULL }, /* XSUM_XXH64_testdata[8237] */\n    { 4119, 0x0000000000000000ULL, 0x1CF9A0A60BF2AB5AULL }, /* XSUM_XXH64_testdata[8238] */\n    { 4119, 0x000000009E3779B1ULL, 0x860ACFA73489CF62ULL }, /* XSUM_XXH64_testdata[8239] */\n    { 4120, 0x0000000000000000ULL, 0x7FBA05F3E30C4ED1ULL }, /* XSUM_XXH64_testdata[8240] */\n    { 4120, 0x000000009E3779B1ULL, 0x92FA02841C207F92ULL }, /* XSUM_XXH64_testdata[8241] */\n    { 4121, 0x0000000000000000ULL, 0xB43D33C041CF5C3CULL }, /* XSUM_XXH64_testdata[8242] */\n    { 4121, 0x000000009E3779B1ULL, 0x0CBDE8FF8AF3BF83ULL }, /* XSUM_XXH64_testdata[8243] */\n    { 4122, 0x0000000000000000ULL, 0xBD39CD71F21868EFULL }, /* XSUM_XXH64_testdata[8244] */\n    { 4122, 0x000000009E3779B1ULL, 0x30318A47844C1DBCULL }, /* XSUM_XXH64_testdata[8245] */\n    { 4123, 0x0000000000000000ULL, 0x724688C6C7F42EFFULL }, /* XSUM_XXH64_testdata[8246] */\n    { 4123, 0x000000009E3779B1ULL, 0xE52886F44DFB76D4ULL }, /* XSUM_XXH64_testdata[8247] */\n    { 4124, 0x0000000000000000ULL, 0x49453128D4D16EA1ULL }, /* XSUM_XXH64_testdata[8248] */\n    { 4124, 0x000000009E3779B1ULL, 0xEAB833BE258F1B51ULL }, /* XSUM_XXH64_testdata[8249] */\n    { 4125, 0x0000000000000000ULL, 0x6BB373FB69CC7A32ULL }, /* XSUM_XXH64_testdata[8250] */\n    { 4125, 0x000000009E3779B1ULL, 0x74CE0B68038F9267ULL }, /* XSUM_XXH64_testdata[8251] */\n    { 4126, 0x0000000000000000ULL, 0x2C900E52375B8221ULL }, /* XSUM_XXH64_testdata[8252] */\n    { 4126, 0x000000009E3779B1ULL, 0xA65B7A72B914F67CULL }, /* XSUM_XXH64_testdata[8253] */\n    { 4127, 0x0000000000000000ULL, 0x0016F37C688572E2ULL }, /* XSUM_XXH64_testdata[8254] */\n    { 4127, 0x000000009E3779B1ULL, 0xC440732EA6CB5D99ULL }, /* XSUM_XXH64_testdata[8255] */\n    { 4128, 0x0000000000000000ULL, 0xF56730FF25767EEFULL }, /* XSUM_XXH64_testdata[8256] */\n    { 4128, 0x000000009E3779B1ULL, 0x14068AE20F8BDA5CULL }, /* XSUM_XXH64_testdata[8257] */\n    { 4129, 0x0000000000000000ULL, 0x7A9A8DF85C54CA17ULL }, /* XSUM_XXH64_testdata[8258] */\n    { 4129, 0x000000009E3779B1ULL, 0xDECA8AD3A479A8CBULL }, /* XSUM_XXH64_testdata[8259] */\n    { 4130, 0x0000000000000000ULL, 0xBB48991B63969AF5ULL }, /* XSUM_XXH64_testdata[8260] */\n    { 4130, 0x000000009E3779B1ULL, 0x4A301822BC87DAF3ULL }, /* XSUM_XXH64_testdata[8261] */\n    { 4131, 0x0000000000000000ULL, 0x18BE5A69F054C6AAULL }, /* XSUM_XXH64_testdata[8262] */\n    { 4131, 0x000000009E3779B1ULL, 0xEE4A52292DFC3EFEULL }, /* XSUM_XXH64_testdata[8263] */\n    { 4132, 0x0000000000000000ULL, 0x6851838FAE8519DCULL }, /* XSUM_XXH64_testdata[8264] */\n    { 4132, 0x000000009E3779B1ULL, 0xD76340BF3AD21CDBULL }, /* XSUM_XXH64_testdata[8265] */\n    { 4133, 0x0000000000000000ULL, 0xD5F494621ABC8C4CULL }, /* XSUM_XXH64_testdata[8266] */\n    { 4133, 0x000000009E3779B1ULL, 0x8D98329C11F4A0FCULL }, /* XSUM_XXH64_testdata[8267] */\n    { 4134, 0x0000000000000000ULL, 0x5E405AFC587493B8ULL }, /* XSUM_XXH64_testdata[8268] */\n    { 4134, 0x000000009E3779B1ULL, 0x07DBC2BF87E089BFULL }, /* XSUM_XXH64_testdata[8269] */\n    { 4135, 0x0000000000000000ULL, 0xD6F8B197CB41DCC0ULL }, /* XSUM_XXH64_testdata[8270] */\n    { 4135, 0x000000009E3779B1ULL, 0xE119F374A566E415ULL }, /* XSUM_XXH64_testdata[8271] */\n    { 4136, 0x0000000000000000ULL, 0x893D35B0F57CD5C0ULL }, /* XSUM_XXH64_testdata[8272] */\n    { 4136, 0x000000009E3779B1ULL, 0x5FEBF496FC0AF6A2ULL }, /* XSUM_XXH64_testdata[8273] */\n    { 4137, 0x0000000000000000ULL, 0xFA4AAA1FD044BFACULL }, /* XSUM_XXH64_testdata[8274] */\n    { 4137, 0x000000009E3779B1ULL, 0x9FA3B0DEAE2A80C8ULL }, /* XSUM_XXH64_testdata[8275] */\n    { 4138, 0x0000000000000000ULL, 0x6D670DEBD8BC06B7ULL }, /* XSUM_XXH64_testdata[8276] */\n    { 4138, 0x000000009E3779B1ULL, 0x6DD6F9CD2DD2312DULL }, /* XSUM_XXH64_testdata[8277] */\n    { 4139, 0x0000000000000000ULL, 0x6D7292BFBC67E4A6ULL }, /* XSUM_XXH64_testdata[8278] */\n    { 4139, 0x000000009E3779B1ULL, 0x9D8DAC1E22B3E997ULL }, /* XSUM_XXH64_testdata[8279] */\n    { 4140, 0x0000000000000000ULL, 0xE788AA97A7ADBDF2ULL }, /* XSUM_XXH64_testdata[8280] */\n    { 4140, 0x000000009E3779B1ULL, 0xEEF8E9A5CC82EAD4ULL }, /* XSUM_XXH64_testdata[8281] */\n    { 4141, 0x0000000000000000ULL, 0x7939ACFB1A6FDFE7ULL }, /* XSUM_XXH64_testdata[8282] */\n    { 4141, 0x000000009E3779B1ULL, 0xAD278DCB5DAFE76EULL }, /* XSUM_XXH64_testdata[8283] */\n    { 4142, 0x0000000000000000ULL, 0xA2C724EFEC2395B2ULL }, /* XSUM_XXH64_testdata[8284] */\n    { 4142, 0x000000009E3779B1ULL, 0x38EC41E665989C5DULL }, /* XSUM_XXH64_testdata[8285] */\n    { 4143, 0x0000000000000000ULL, 0xB45AC98A59EFFB9CULL }, /* XSUM_XXH64_testdata[8286] */\n    { 4143, 0x000000009E3779B1ULL, 0x3AFFCA163742F4C5ULL }, /* XSUM_XXH64_testdata[8287] */\n    { 4144, 0x0000000000000000ULL, 0xC8AD9B33CA256BABULL }, /* XSUM_XXH64_testdata[8288] */\n    { 4144, 0x000000009E3779B1ULL, 0x8AE6A1A64457DA9AULL }, /* XSUM_XXH64_testdata[8289] */\n    { 4145, 0x0000000000000000ULL, 0xBBA859231EF5ADA2ULL }, /* XSUM_XXH64_testdata[8290] */\n    { 4145, 0x000000009E3779B1ULL, 0x287AB11FE134A5BDULL }, /* XSUM_XXH64_testdata[8291] */\n    { 4146, 0x0000000000000000ULL, 0x4B64C3BB9F81AD5FULL }, /* XSUM_XXH64_testdata[8292] */\n    { 4146, 0x000000009E3779B1ULL, 0xEAE3FB2EC1FAB3C9ULL }, /* XSUM_XXH64_testdata[8293] */\n    { 4147, 0x0000000000000000ULL, 0xC8173F4979794318ULL }, /* XSUM_XXH64_testdata[8294] */\n    { 4147, 0x000000009E3779B1ULL, 0xF200A48FCFCCCB32ULL }, /* XSUM_XXH64_testdata[8295] */\n    { 4148, 0x0000000000000000ULL, 0xED060FAE81A0AA55ULL }, /* XSUM_XXH64_testdata[8296] */\n    { 4148, 0x000000009E3779B1ULL, 0x2F2BE45DE6DF8F2BULL }, /* XSUM_XXH64_testdata[8297] */\n    { 4149, 0x0000000000000000ULL, 0x67EE2C9F3760D4DAULL }, /* XSUM_XXH64_testdata[8298] */\n    { 4149, 0x000000009E3779B1ULL, 0xC6FF67580E677A9EULL }, /* XSUM_XXH64_testdata[8299] */\n    { 4150, 0x0000000000000000ULL, 0x3DE0DC79813C560CULL }, /* XSUM_XXH64_testdata[8300] */\n    { 4150, 0x000000009E3779B1ULL, 0x79F00D9164150189ULL }, /* XSUM_XXH64_testdata[8301] */\n    { 4151, 0x0000000000000000ULL, 0xD78CB32DFABB537FULL }, /* XSUM_XXH64_testdata[8302] */\n    { 4151, 0x000000009E3779B1ULL, 0x763E1BC684496B86ULL }, /* XSUM_XXH64_testdata[8303] */\n    { 4152, 0x0000000000000000ULL, 0x9B28848F75F29F4AULL }, /* XSUM_XXH64_testdata[8304] */\n    { 4152, 0x000000009E3779B1ULL, 0x16CB1ACD120838E8ULL }, /* XSUM_XXH64_testdata[8305] */\n    { 4153, 0x0000000000000000ULL, 0x7D6AAE101570B5C8ULL }, /* XSUM_XXH64_testdata[8306] */\n    { 4153, 0x000000009E3779B1ULL, 0xF1AF4C7990DA5D1CULL }, /* XSUM_XXH64_testdata[8307] */\n    { 4154, 0x0000000000000000ULL, 0x8245FC835B7FB340ULL }, /* XSUM_XXH64_testdata[8308] */\n    { 4154, 0x000000009E3779B1ULL, 0x997572C2DAEF058FULL }, /* XSUM_XXH64_testdata[8309] */\n    { 4155, 0x0000000000000000ULL, 0xA9747C8B569C2AD4ULL }, /* XSUM_XXH64_testdata[8310] */\n    { 4155, 0x000000009E3779B1ULL, 0xEE95EEC9D54EF501ULL }, /* XSUM_XXH64_testdata[8311] */\n    { 4156, 0x0000000000000000ULL, 0x1F0A2B2A0F1DE3CEULL }, /* XSUM_XXH64_testdata[8312] */\n    { 4156, 0x000000009E3779B1ULL, 0xBA7FCFC24EE435E1ULL }, /* XSUM_XXH64_testdata[8313] */\n    { 4157, 0x0000000000000000ULL, 0x87863E8AC72FC9AAULL }, /* XSUM_XXH64_testdata[8314] */\n    { 4157, 0x000000009E3779B1ULL, 0x7183C86EBAA1BEC4ULL }, /* XSUM_XXH64_testdata[8315] */\n    { 4158, 0x0000000000000000ULL, 0xE422B5D761EB88F7ULL }, /* XSUM_XXH64_testdata[8316] */\n    { 4158, 0x000000009E3779B1ULL, 0x01636ABF2071199CULL }, /* XSUM_XXH64_testdata[8317] */\n    { 4159, 0x0000000000000000ULL, 0xB291C2E614CF5684ULL }, /* XSUM_XXH64_testdata[8318] */\n    { 4159, 0x000000009E3779B1ULL, 0x3A9BF57DFF788781ULL }, /* XSUM_XXH64_testdata[8319] */\n    { 4160, 0x0000000000000000ULL, 0xEEE6A4E2AC952A5EULL }, /* XSUM_XXH64_testdata[8320] */\n    { 4160, 0x000000009E3779B1ULL, 0xA4CB59E19D6A35F9ULL }, /* XSUM_XXH64_testdata[8321] */\n};\nstatic const XSUM_testdata64_t XSUM_XXH3_testdata[] = {\n    {    0, 0x0000000000000000ULL, 0x2D06800538D394C2ULL }, /* XSUM_XXH3_testdata[0] */\n    {    0, 0x9E3779B185EBCA8DULL, 0xA8A6B918B2F0364AULL }, /* XSUM_XXH3_testdata[1] */\n    {    1, 0x0000000000000000ULL, 0xC44BDFF4074EECDBULL }, /* XSUM_XXH3_testdata[2] */\n    {    1, 0x9E3779B185EBCA8DULL, 0x032BE332DD766EF8ULL }, /* XSUM_XXH3_testdata[3] */\n    {    2, 0x0000000000000000ULL, 0x7A9978044CB8A8BBULL }, /* XSUM_XXH3_testdata[4] */\n    {    2, 0x9E3779B185EBCA8DULL, 0x764B35C90519AD88ULL }, /* XSUM_XXH3_testdata[5] */\n    {    3, 0x0000000000000000ULL, 0x54247382A8D6B94DULL }, /* XSUM_XXH3_testdata[6] */\n    {    3, 0x9E3779B185EBCA8DULL, 0x634B8990B4976373ULL }, /* XSUM_XXH3_testdata[7] */\n    {    4, 0x0000000000000000ULL, 0xE5DC74BC51848A51ULL }, /* XSUM_XXH3_testdata[8] */\n    {    4, 0x9E3779B185EBCA8DULL, 0xAA2E7ECCB0C8F747ULL }, /* XSUM_XXH3_testdata[9] */\n    {    5, 0x0000000000000000ULL, 0xE4243F00720306BBULL }, /* XSUM_XXH3_testdata[10] */\n    {    5, 0x9E3779B185EBCA8DULL, 0x5A67C87E50ED80EDULL }, /* XSUM_XXH3_testdata[11] */\n    {    6, 0x0000000000000000ULL, 0x27B56A84CD2D7325ULL }, /* XSUM_XXH3_testdata[12] */\n    {    6, 0x9E3779B185EBCA8DULL, 0x84589C116AB59AB9ULL }, /* XSUM_XXH3_testdata[13] */\n    {    7, 0x0000000000000000ULL, 0x9941E0007F555E50ULL }, /* XSUM_XXH3_testdata[14] */\n    {    7, 0x9E3779B185EBCA8DULL, 0x75BDAB43463F0151ULL }, /* XSUM_XXH3_testdata[15] */\n    {    8, 0x0000000000000000ULL, 0x24CCC9ACAA9F65E4ULL }, /* XSUM_XXH3_testdata[16] */\n    {    8, 0x9E3779B185EBCA8DULL, 0x8F973410999B8F6BULL }, /* XSUM_XXH3_testdata[17] */\n    {    9, 0x0000000000000000ULL, 0x14D5001C15DD3F2BULL }, /* XSUM_XXH3_testdata[18] */\n    {    9, 0x9E3779B185EBCA8DULL, 0xB3AE7333D9013F60ULL }, /* XSUM_XXH3_testdata[19] */\n    {   10, 0x0000000000000000ULL, 0x1C117F233FBC3C14ULL }, /* XSUM_XXH3_testdata[20] */\n    {   10, 0x9E3779B185EBCA8DULL, 0x5B8A62DB39366886ULL }, /* XSUM_XXH3_testdata[21] */\n    {   11, 0x0000000000000000ULL, 0x889839B4C796DDD6ULL }, /* XSUM_XXH3_testdata[22] */\n    {   11, 0x9E3779B185EBCA8DULL, 0x72D41CE6ECFFAA96ULL }, /* XSUM_XXH3_testdata[23] */\n    {   12, 0x0000000000000000ULL, 0xA713DAF0DFBB77E7ULL }, /* XSUM_XXH3_testdata[24] */\n    {   12, 0x9E3779B185EBCA8DULL, 0xE7303E1B2336DE0EULL }, /* XSUM_XXH3_testdata[25] */\n    {   13, 0x0000000000000000ULL, 0x2EB03C6E66BA6524ULL }, /* XSUM_XXH3_testdata[26] */\n    {   13, 0x9E3779B185EBCA8DULL, 0x0D7ECCE7A8C882EFULL }, /* XSUM_XXH3_testdata[27] */\n    {   14, 0x0000000000000000ULL, 0x1AC0BBDA2B9FCF03ULL }, /* XSUM_XXH3_testdata[28] */\n    {   14, 0x9E3779B185EBCA8DULL, 0xA7F68521581B173FULL }, /* XSUM_XXH3_testdata[29] */\n    {   15, 0x0000000000000000ULL, 0x45556D4D6E1798BCULL }, /* XSUM_XXH3_testdata[30] */\n    {   15, 0x9E3779B185EBCA8DULL, 0x710DD5318F6F16D5ULL }, /* XSUM_XXH3_testdata[31] */\n    {   16, 0x0000000000000000ULL, 0x981B17D36C7498C9ULL }, /* XSUM_XXH3_testdata[32] */\n    {   16, 0x9E3779B185EBCA8DULL, 0x663F29333B4DB6B1ULL }, /* XSUM_XXH3_testdata[33] */\n    {   17, 0x0000000000000000ULL, 0x796F5ACD3A60F862ULL }, /* XSUM_XXH3_testdata[34] */\n    {   17, 0x9E3779B185EBCA8DULL, 0xF3EC5067F4306DB3ULL }, /* XSUM_XXH3_testdata[35] */\n    {   18, 0x0000000000000000ULL, 0x6CFEAA845E6EBCD1ULL }, /* XSUM_XXH3_testdata[36] */\n    {   18, 0x9E3779B185EBCA8DULL, 0x603FDA3D472CBC69ULL }, /* XSUM_XXH3_testdata[37] */\n    {   19, 0x0000000000000000ULL, 0x750D97933D2DC370ULL }, /* XSUM_XXH3_testdata[38] */\n    {   19, 0x9E3779B185EBCA8DULL, 0xBD2FDA5B437EB249ULL }, /* XSUM_XXH3_testdata[39] */\n    {   20, 0x0000000000000000ULL, 0x4BC18275FB46F223ULL }, /* XSUM_XXH3_testdata[40] */\n    {   20, 0x9E3779B185EBCA8DULL, 0x933117EFBE73C5FAULL }, /* XSUM_XXH3_testdata[41] */\n    {   21, 0x0000000000000000ULL, 0xCE0376AB8CDD7F20ULL }, /* XSUM_XXH3_testdata[42] */\n    {   21, 0x9E3779B185EBCA8DULL, 0x405B0DE8FD0356A0ULL }, /* XSUM_XXH3_testdata[43] */\n    {   22, 0x0000000000000000ULL, 0x85552B609DB72220ULL }, /* XSUM_XXH3_testdata[44] */\n    {   22, 0x9E3779B185EBCA8DULL, 0xEDC5A811942FEC01ULL }, /* XSUM_XXH3_testdata[45] */\n    {   23, 0x0000000000000000ULL, 0xE070C50BE9861FF8ULL }, /* XSUM_XXH3_testdata[46] */\n    {   23, 0x9E3779B185EBCA8DULL, 0x06C667D9B49CD1F3ULL }, /* XSUM_XXH3_testdata[47] */\n    {   24, 0x0000000000000000ULL, 0xA3FE70BF9D3510EBULL }, /* XSUM_XXH3_testdata[48] */\n    {   24, 0x9E3779B185EBCA8DULL, 0x850E80FC35BDD690ULL }, /* XSUM_XXH3_testdata[49] */\n    {   25, 0x0000000000000000ULL, 0x9E41329ED21A1D6DULL }, /* XSUM_XXH3_testdata[50] */\n    {   25, 0x9E3779B185EBCA8DULL, 0x338FCFA5ECAB533AULL }, /* XSUM_XXH3_testdata[51] */\n    {   26, 0x0000000000000000ULL, 0x667D3AAA920C9A05ULL }, /* XSUM_XXH3_testdata[52] */\n    {   26, 0x9E3779B185EBCA8DULL, 0xCE0F4463ECABCC17ULL }, /* XSUM_XXH3_testdata[53] */\n    {   27, 0x0000000000000000ULL, 0xF54AF525A7B4D3B9ULL }, /* XSUM_XXH3_testdata[54] */\n    {   27, 0x9E3779B185EBCA8DULL, 0xC7D492AEB591CA2BULL }, /* XSUM_XXH3_testdata[55] */\n    {   28, 0x0000000000000000ULL, 0x61D5D60DFED01688ULL }, /* XSUM_XXH3_testdata[56] */\n    {   28, 0x9E3779B185EBCA8DULL, 0xED4786CC627A8EA5ULL }, /* XSUM_XXH3_testdata[57] */\n    {   29, 0x0000000000000000ULL, 0xA375819F83DDCCE6ULL }, /* XSUM_XXH3_testdata[58] */\n    {   29, 0x9E3779B185EBCA8DULL, 0x34C2EE35CF8F6CE1ULL }, /* XSUM_XXH3_testdata[59] */\n    {   30, 0x0000000000000000ULL, 0xDA4953A393E8B1F3ULL }, /* XSUM_XXH3_testdata[60] */\n    {   30, 0x9E3779B185EBCA8DULL, 0xA6AC4B422338BDD8ULL }, /* XSUM_XXH3_testdata[61] */\n    {   31, 0x0000000000000000ULL, 0x5D516692CA764C50ULL }, /* XSUM_XXH3_testdata[62] */\n    {   31, 0x9E3779B185EBCA8DULL, 0x9B37274259C549C6ULL }, /* XSUM_XXH3_testdata[63] */\n    {   32, 0x0000000000000000ULL, 0x9FEADDBDBF57EED3ULL }, /* XSUM_XXH3_testdata[64] */\n    {   32, 0x9E3779B185EBCA8DULL, 0x2199FAB1534893D9ULL }, /* XSUM_XXH3_testdata[65] */\n    {   33, 0x0000000000000000ULL, 0xABFB2D081B400A10ULL }, /* XSUM_XXH3_testdata[66] */\n    {   33, 0x9E3779B185EBCA8DULL, 0xAD56348DA574BB6DULL }, /* XSUM_XXH3_testdata[67] */\n    {   34, 0x0000000000000000ULL, 0xBAA04607C7A24977ULL }, /* XSUM_XXH3_testdata[68] */\n    {   34, 0x9E3779B185EBCA8DULL, 0xFE0B68C2455484B3ULL }, /* XSUM_XXH3_testdata[69] */\n    {   35, 0x0000000000000000ULL, 0xD1A58161FDB7B1A6ULL }, /* XSUM_XXH3_testdata[70] */\n    {   35, 0x9E3779B185EBCA8DULL, 0x517E90702EDAB0F6ULL }, /* XSUM_XXH3_testdata[71] */\n    {   36, 0x0000000000000000ULL, 0xEF099B53BC7530C0ULL }, /* XSUM_XXH3_testdata[72] */\n    {   36, 0x9E3779B185EBCA8DULL, 0xA8C3D8C22D432D05ULL }, /* XSUM_XXH3_testdata[73] */\n    {   37, 0x0000000000000000ULL, 0xDC785F67BBA35B29ULL }, /* XSUM_XXH3_testdata[74] */\n    {   37, 0x9E3779B185EBCA8DULL, 0x912BF90ACD949A01ULL }, /* XSUM_XXH3_testdata[75] */\n    {   38, 0x0000000000000000ULL, 0x635F55CF00144E48ULL }, /* XSUM_XXH3_testdata[76] */\n    {   38, 0x9E3779B185EBCA8DULL, 0xED870798D287DA66ULL }, /* XSUM_XXH3_testdata[77] */\n    {   39, 0x0000000000000000ULL, 0x297B5E4CD9E19E20ULL }, /* XSUM_XXH3_testdata[78] */\n    {   39, 0x9E3779B185EBCA8DULL, 0x0ECA3FA2F5336A09ULL }, /* XSUM_XXH3_testdata[79] */\n    {   40, 0x0000000000000000ULL, 0x70FB5C84CB108B82ULL }, /* XSUM_XXH3_testdata[80] */\n    {   40, 0x9E3779B185EBCA8DULL, 0xD95E230876A77847ULL }, /* XSUM_XXH3_testdata[81] */\n    {   41, 0x0000000000000000ULL, 0xD2BF629FB3E8D2E2ULL }, /* XSUM_XXH3_testdata[82] */\n    {   41, 0x9E3779B185EBCA8DULL, 0xBC1FB433171D42E5ULL }, /* XSUM_XXH3_testdata[83] */\n    {   42, 0x0000000000000000ULL, 0x776094ACB05E4DB5ULL }, /* XSUM_XXH3_testdata[84] */\n    {   42, 0x9E3779B185EBCA8DULL, 0x282C3046789F9748ULL }, /* XSUM_XXH3_testdata[85] */\n    {   43, 0x0000000000000000ULL, 0xAFC6E07DC196E76BULL }, /* XSUM_XXH3_testdata[86] */\n    {   43, 0x9E3779B185EBCA8DULL, 0x1709B03E1CCAE947ULL }, /* XSUM_XXH3_testdata[87] */\n    {   44, 0x0000000000000000ULL, 0x439A593B7CC881BAULL }, /* XSUM_XXH3_testdata[88] */\n    {   44, 0x9E3779B185EBCA8DULL, 0x47F3CC44D8B36C42ULL }, /* XSUM_XXH3_testdata[89] */\n    {   45, 0x0000000000000000ULL, 0x234D270351B2D8F4ULL }, /* XSUM_XXH3_testdata[90] */\n    {   45, 0x9E3779B185EBCA8DULL, 0x79E2692F8B5E81C9ULL }, /* XSUM_XXH3_testdata[91] */\n    {   46, 0x0000000000000000ULL, 0x84BC1ACAE3D8054AULL }, /* XSUM_XXH3_testdata[92] */\n    {   46, 0x9E3779B185EBCA8DULL, 0xE5B2F0CD84F11F3FULL }, /* XSUM_XXH3_testdata[93] */\n    {   47, 0x0000000000000000ULL, 0x050B544C7C6147BDULL }, /* XSUM_XXH3_testdata[94] */\n    {   47, 0x9E3779B185EBCA8DULL, 0xCC386369175F3F22ULL }, /* XSUM_XXH3_testdata[95] */\n    {   48, 0x0000000000000000ULL, 0x397DA259ECBA1F11ULL }, /* XSUM_XXH3_testdata[96] */\n    {   48, 0x9E3779B185EBCA8DULL, 0xADC2CBAA44ACC616ULL }, /* XSUM_XXH3_testdata[97] */\n    {   49, 0x0000000000000000ULL, 0x982095B2470B49A1ULL }, /* XSUM_XXH3_testdata[98] */\n    {   49, 0x9E3779B185EBCA8DULL, 0x19FF5DC215265958ULL }, /* XSUM_XXH3_testdata[99] */\n    {   50, 0x0000000000000000ULL, 0xBA1BF720F0154AFAULL }, /* XSUM_XXH3_testdata[100] */\n    {   50, 0x9E3779B185EBCA8DULL, 0x8C28C07C18CC59EBULL }, /* XSUM_XXH3_testdata[101] */\n    {   51, 0x0000000000000000ULL, 0x9A3D051F2B259E4DULL }, /* XSUM_XXH3_testdata[102] */\n    {   51, 0x9E3779B185EBCA8DULL, 0xC4C7EE7D764BDDF1ULL }, /* XSUM_XXH3_testdata[103] */\n    {   52, 0x0000000000000000ULL, 0x161957B35E29FA55ULL }, /* XSUM_XXH3_testdata[104] */\n    {   52, 0x9E3779B185EBCA8DULL, 0xA4338D0DDB1F46F4ULL }, /* XSUM_XXH3_testdata[105] */\n    {   53, 0x0000000000000000ULL, 0x7A45D6260BA428CDULL }, /* XSUM_XXH3_testdata[106] */\n    {   53, 0x9E3779B185EBCA8DULL, 0xA7EA211DD3B5D41DULL }, /* XSUM_XXH3_testdata[107] */\n    {   54, 0x0000000000000000ULL, 0x3262E22B4806E20CULL }, /* XSUM_XXH3_testdata[108] */\n    {   54, 0x9E3779B185EBCA8DULL, 0xE49C331013B550F2ULL }, /* XSUM_XXH3_testdata[109] */\n    {   55, 0x0000000000000000ULL, 0x999D4AB41E43CB33ULL }, /* XSUM_XXH3_testdata[110] */\n    {   55, 0x9E3779B185EBCA8DULL, 0xAE4D1D25308F2E4DULL }, /* XSUM_XXH3_testdata[111] */\n    {   56, 0x0000000000000000ULL, 0xF3F207A03F7545A9ULL }, /* XSUM_XXH3_testdata[112] */\n    {   56, 0x9E3779B185EBCA8DULL, 0x58E196E68FC3D5D0ULL }, /* XSUM_XXH3_testdata[113] */\n    {   57, 0x0000000000000000ULL, 0x75960B83FA69BEE3ULL }, /* XSUM_XXH3_testdata[114] */\n    {   57, 0x9E3779B185EBCA8DULL, 0x1BF31EA0E4F6C3C9ULL }, /* XSUM_XXH3_testdata[115] */\n    {   58, 0x0000000000000000ULL, 0xC710DC393A81EA6BULL }, /* XSUM_XXH3_testdata[116] */\n    {   58, 0x9E3779B185EBCA8DULL, 0x7B11229CCDE3DF4BULL }, /* XSUM_XXH3_testdata[117] */\n    {   59, 0x0000000000000000ULL, 0x9C24C0A40C315772ULL }, /* XSUM_XXH3_testdata[118] */\n    {   59, 0x9E3779B185EBCA8DULL, 0xB33C636F42BA05C2ULL }, /* XSUM_XXH3_testdata[119] */\n    {   60, 0x0000000000000000ULL, 0x5082D84DA251D03DULL }, /* XSUM_XXH3_testdata[120] */\n    {   60, 0x9E3779B185EBCA8DULL, 0x420695DA3D00159EULL }, /* XSUM_XXH3_testdata[121] */\n    {   61, 0x0000000000000000ULL, 0xAED61F74CFAA2B50ULL }, /* XSUM_XXH3_testdata[122] */\n    {   61, 0x9E3779B185EBCA8DULL, 0xBEC01CF3CAFF10FEULL }, /* XSUM_XXH3_testdata[123] */\n    {   62, 0x0000000000000000ULL, 0x3D938554571B8602ULL }, /* XSUM_XXH3_testdata[124] */\n    {   62, 0x9E3779B185EBCA8DULL, 0xAFB89B723B8B9468ULL }, /* XSUM_XXH3_testdata[125] */\n    {   63, 0x0000000000000000ULL, 0x83D74A75F2C2577AULL }, /* XSUM_XXH3_testdata[126] */\n    {   63, 0x9E3779B185EBCA8DULL, 0xC3AB9C8B53960DC7ULL }, /* XSUM_XXH3_testdata[127] */\n    {   64, 0x0000000000000000ULL, 0x9CB48487720EC49DULL }, /* XSUM_XXH3_testdata[128] */\n    {   64, 0x9E3779B185EBCA8DULL, 0x4FE8895DB9B8C077ULL }, /* XSUM_XXH3_testdata[129] */\n    {   65, 0x0000000000000000ULL, 0xFD81AAC4BEBC3883ULL }, /* XSUM_XXH3_testdata[130] */\n    {   65, 0x9E3779B185EBCA8DULL, 0xAD80AEEC1FC9E0A7ULL }, /* XSUM_XXH3_testdata[131] */\n    {   66, 0x0000000000000000ULL, 0x7F26BCF1F992AF71ULL }, /* XSUM_XXH3_testdata[132] */\n    {   66, 0x9E3779B185EBCA8DULL, 0x319C8AD503670CE4ULL }, /* XSUM_XXH3_testdata[133] */\n    {   67, 0x0000000000000000ULL, 0x4B78ED7047BD2B73ULL }, /* XSUM_XXH3_testdata[134] */\n    {   67, 0x9E3779B185EBCA8DULL, 0xBE2B751302505496ULL }, /* XSUM_XXH3_testdata[135] */\n    {   68, 0x0000000000000000ULL, 0x21730DB71A517AA6ULL }, /* XSUM_XXH3_testdata[136] */\n    {   68, 0x9E3779B185EBCA8DULL, 0x4FAD7FFBD7619E3BULL }, /* XSUM_XXH3_testdata[137] */\n    {   69, 0x0000000000000000ULL, 0x63C9771501E038ABULL }, /* XSUM_XXH3_testdata[138] */\n    {   69, 0x9E3779B185EBCA8DULL, 0x3E23DA8823E3D7A7ULL }, /* XSUM_XXH3_testdata[139] */\n    {   70, 0x0000000000000000ULL, 0x1A51A6A46D536407ULL }, /* XSUM_XXH3_testdata[140] */\n    {   70, 0x9E3779B185EBCA8DULL, 0x94F5A110B077F6AEULL }, /* XSUM_XXH3_testdata[141] */\n    {   71, 0x0000000000000000ULL, 0xD7221C2C7C1F6BB1ULL }, /* XSUM_XXH3_testdata[142] */\n    {   71, 0x9E3779B185EBCA8DULL, 0xC91A3D11B94F821CULL }, /* XSUM_XXH3_testdata[143] */\n    {   72, 0x0000000000000000ULL, 0x6D1BEBA7F3BCC617ULL }, /* XSUM_XXH3_testdata[144] */\n    {   72, 0x9E3779B185EBCA8DULL, 0xC08A43C4EA15A51EULL }, /* XSUM_XXH3_testdata[145] */\n    {   73, 0x0000000000000000ULL, 0x1302AD1F7C0DB9EDULL }, /* XSUM_XXH3_testdata[146] */\n    {   73, 0x9E3779B185EBCA8DULL, 0x5DFEEAAD123CEB0EULL }, /* XSUM_XXH3_testdata[147] */\n    {   74, 0x0000000000000000ULL, 0x116FFD2730EA3701ULL }, /* XSUM_XXH3_testdata[148] */\n    {   74, 0x9E3779B185EBCA8DULL, 0xAE0190B4F68D05B4ULL }, /* XSUM_XXH3_testdata[149] */\n    {   75, 0x0000000000000000ULL, 0xD92B5E921EB81C14ULL }, /* XSUM_XXH3_testdata[150] */\n    {   75, 0x9E3779B185EBCA8DULL, 0x4BA1970BE430F397ULL }, /* XSUM_XXH3_testdata[151] */\n    {   76, 0x0000000000000000ULL, 0x029A8F4B7F2D3B7FULL }, /* XSUM_XXH3_testdata[152] */\n    {   76, 0x9E3779B185EBCA8DULL, 0xD7AAA2EED9730C25ULL }, /* XSUM_XXH3_testdata[153] */\n    {   77, 0x0000000000000000ULL, 0x1CF862AAA02C9D06ULL }, /* XSUM_XXH3_testdata[154] */\n    {   77, 0x9E3779B185EBCA8DULL, 0x5A72D9B1AA6E9B0CULL }, /* XSUM_XXH3_testdata[155] */\n    {   78, 0x0000000000000000ULL, 0xB972D2CD416B0BF9ULL }, /* XSUM_XXH3_testdata[156] */\n    {   78, 0x9E3779B185EBCA8DULL, 0xF66F6ED777572FC7ULL }, /* XSUM_XXH3_testdata[157] */\n    {   79, 0x0000000000000000ULL, 0x2326B51BBAA6405CULL }, /* XSUM_XXH3_testdata[158] */\n    {   79, 0x9E3779B185EBCA8DULL, 0x58A75AA25D8C7BB2ULL }, /* XSUM_XXH3_testdata[159] */\n    {   80, 0x0000000000000000ULL, 0xBCDEFBBB2C47C90AULL }, /* XSUM_XXH3_testdata[160] */\n    {   80, 0x9E3779B185EBCA8DULL, 0xC6DD0CB699532E73ULL }, /* XSUM_XXH3_testdata[161] */\n    {   81, 0x0000000000000000ULL, 0x7BC96F2EE88DF87DULL }, /* XSUM_XXH3_testdata[162] */\n    {   81, 0x9E3779B185EBCA8DULL, 0xBDC37ED9F6EF4B8EULL }, /* XSUM_XXH3_testdata[163] */\n    {   82, 0x0000000000000000ULL, 0x452E73C5EA08CB8EULL }, /* XSUM_XXH3_testdata[164] */\n    {   82, 0x9E3779B185EBCA8DULL, 0x062B9E052A91F0A7ULL }, /* XSUM_XXH3_testdata[165] */\n    {   83, 0x0000000000000000ULL, 0x1B605ED2F4FEB570ULL }, /* XSUM_XXH3_testdata[166] */\n    {   83, 0x9E3779B185EBCA8DULL, 0xADAB976FC9FAA59CULL }, /* XSUM_XXH3_testdata[167] */\n    {   84, 0x0000000000000000ULL, 0xF85FEE70BA146DC5ULL }, /* XSUM_XXH3_testdata[168] */\n    {   84, 0x9E3779B185EBCA8DULL, 0x5D9649713E127367ULL }, /* XSUM_XXH3_testdata[169] */\n    {   85, 0x0000000000000000ULL, 0x2E2C323A4B6C083BULL }, /* XSUM_XXH3_testdata[170] */\n    {   85, 0x9E3779B185EBCA8DULL, 0xCFE94FDD7B441829ULL }, /* XSUM_XXH3_testdata[171] */\n    {   86, 0x0000000000000000ULL, 0xDF34623ECC4AEA67ULL }, /* XSUM_XXH3_testdata[172] */\n    {   86, 0x9E3779B185EBCA8DULL, 0x489D38096352FC59ULL }, /* XSUM_XXH3_testdata[173] */\n    {   87, 0x0000000000000000ULL, 0xD29A38D29593F21DULL }, /* XSUM_XXH3_testdata[174] */\n    {   87, 0x9E3779B185EBCA8DULL, 0x910059E884F20BA1ULL }, /* XSUM_XXH3_testdata[175] */\n    {   88, 0x0000000000000000ULL, 0x36D476C3DA1CEC52ULL }, /* XSUM_XXH3_testdata[176] */\n    {   88, 0x9E3779B185EBCA8DULL, 0x9E24F0F8A25624ADULL }, /* XSUM_XXH3_testdata[177] */\n    {   89, 0x0000000000000000ULL, 0x9DBDF18FBD92E53CULL }, /* XSUM_XXH3_testdata[178] */\n    {   89, 0x9E3779B185EBCA8DULL, 0x179D449BBFC7FEC9ULL }, /* XSUM_XXH3_testdata[179] */\n    {   90, 0x0000000000000000ULL, 0xD3B8BA0002A9FC1EULL }, /* XSUM_XXH3_testdata[180] */\n    {   90, 0x9E3779B185EBCA8DULL, 0x0233FAC1497A5229ULL }, /* XSUM_XXH3_testdata[181] */\n    {   91, 0x0000000000000000ULL, 0xD0C75607A91B59F0ULL }, /* XSUM_XXH3_testdata[182] */\n    {   91, 0x9E3779B185EBCA8DULL, 0xBC1C911BA85B99A6ULL }, /* XSUM_XXH3_testdata[183] */\n    {   92, 0x0000000000000000ULL, 0x8890CAAC1DD48270ULL }, /* XSUM_XXH3_testdata[184] */\n    {   92, 0x9E3779B185EBCA8DULL, 0x562BDD5D77EC915CULL }, /* XSUM_XXH3_testdata[185] */\n    {   93, 0x0000000000000000ULL, 0x8F1EC4DC439BCA2FULL }, /* XSUM_XXH3_testdata[186] */\n    {   93, 0x9E3779B185EBCA8DULL, 0x2B3927A06A1B2E51ULL }, /* XSUM_XXH3_testdata[187] */\n    {   94, 0x0000000000000000ULL, 0xD555AF8B0640752BULL }, /* XSUM_XXH3_testdata[188] */\n    {   94, 0x9E3779B185EBCA8DULL, 0x74C34D6C7E05760FULL }, /* XSUM_XXH3_testdata[189] */\n    {   95, 0x0000000000000000ULL, 0xC0DD460B48116CDAULL }, /* XSUM_XXH3_testdata[190] */\n    {   95, 0x9E3779B185EBCA8DULL, 0xC81D7C3A751D3B94ULL }, /* XSUM_XXH3_testdata[191] */\n    {   96, 0x0000000000000000ULL, 0x935A769A7F94776FULL }, /* XSUM_XXH3_testdata[192] */\n    {   96, 0x9E3779B185EBCA8DULL, 0x70CF51937E500540ULL }, /* XSUM_XXH3_testdata[193] */\n    {   97, 0x0000000000000000ULL, 0xCA4CA268FD3C3A6CULL }, /* XSUM_XXH3_testdata[194] */\n    {   97, 0x9E3779B185EBCA8DULL, 0xEE461D3ADD7EE6C9ULL }, /* XSUM_XXH3_testdata[195] */\n    {   98, 0x0000000000000000ULL, 0x46C01A26445FC381ULL }, /* XSUM_XXH3_testdata[196] */\n    {   98, 0x9E3779B185EBCA8DULL, 0x60EB95BD03C256D6ULL }, /* XSUM_XXH3_testdata[197] */\n    {   99, 0x0000000000000000ULL, 0xAB93C68C0F63D288ULL }, /* XSUM_XXH3_testdata[198] */\n    {   99, 0x9E3779B185EBCA8DULL, 0x859966E3C0E9AACAULL }, /* XSUM_XXH3_testdata[199] */\n    {  100, 0x0000000000000000ULL, 0x93CD95432B7D483FULL }, /* XSUM_XXH3_testdata[200] */\n    {  100, 0x9E3779B185EBCA8DULL, 0xEA932549A3D7FB01ULL }, /* XSUM_XXH3_testdata[201] */\n    {  101, 0x0000000000000000ULL, 0xB7F2A5219A6ADCD6ULL }, /* XSUM_XXH3_testdata[202] */\n    {  101, 0x9E3779B185EBCA8DULL, 0x3F0B78B11279E491ULL }, /* XSUM_XXH3_testdata[203] */\n    {  102, 0x0000000000000000ULL, 0x5C1130E14B3EE1E0ULL }, /* XSUM_XXH3_testdata[204] */\n    {  102, 0x9E3779B185EBCA8DULL, 0x290D3E69F4A52B57ULL }, /* XSUM_XXH3_testdata[205] */\n    {  103, 0x0000000000000000ULL, 0x680C75DB844A28EEULL }, /* XSUM_XXH3_testdata[206] */\n    {  103, 0x9E3779B185EBCA8DULL, 0x6DBFF09BB20972E8ULL }, /* XSUM_XXH3_testdata[207] */\n    {  104, 0x0000000000000000ULL, 0x3DB12308BC1358D7ULL }, /* XSUM_XXH3_testdata[208] */\n    {  104, 0x9E3779B185EBCA8DULL, 0x0791A52650A5EEB9ULL }, /* XSUM_XXH3_testdata[209] */\n    {  105, 0x0000000000000000ULL, 0x3233C69A02F1F0B4ULL }, /* XSUM_XXH3_testdata[210] */\n    {  105, 0x9E3779B185EBCA8DULL, 0x4914AEAA4F1144C2ULL }, /* XSUM_XXH3_testdata[211] */\n    {  106, 0x0000000000000000ULL, 0x37E5D95ABD87CED2ULL }, /* XSUM_XXH3_testdata[212] */\n    {  106, 0x9E3779B185EBCA8DULL, 0x402975D930B3C585ULL }, /* XSUM_XXH3_testdata[213] */\n    {  107, 0x0000000000000000ULL, 0x9ED226EEDB40C181ULL }, /* XSUM_XXH3_testdata[214] */\n    {  107, 0x9E3779B185EBCA8DULL, 0x37D6489BE3EBD4EBULL }, /* XSUM_XXH3_testdata[215] */\n    {  108, 0x0000000000000000ULL, 0x9BD9D7F308AC8B25ULL }, /* XSUM_XXH3_testdata[216] */\n    {  108, 0x9E3779B185EBCA8DULL, 0xA3B5A552EFDD7CCBULL }, /* XSUM_XXH3_testdata[217] */\n    {  109, 0x0000000000000000ULL, 0x55BBF3F9DA5BABD4ULL }, /* XSUM_XXH3_testdata[218] */\n    {  109, 0x9E3779B185EBCA8DULL, 0xCF413FC785E35330ULL }, /* XSUM_XXH3_testdata[219] */\n    {  110, 0x0000000000000000ULL, 0x762CCA332C33532BULL }, /* XSUM_XXH3_testdata[220] */\n    {  110, 0x9E3779B185EBCA8DULL, 0x56314A5E52DA5B47ULL }, /* XSUM_XXH3_testdata[221] */\n    {  111, 0x0000000000000000ULL, 0x678DBD7CD8EF8F5CULL }, /* XSUM_XXH3_testdata[222] */\n    {  111, 0x9E3779B185EBCA8DULL, 0x04529DFAD46B27BFULL }, /* XSUM_XXH3_testdata[223] */\n    {  112, 0x0000000000000000ULL, 0xD13D8F57931EEF19ULL }, /* XSUM_XXH3_testdata[224] */\n    {  112, 0x9E3779B185EBCA8DULL, 0xA276B2E306E77FE5ULL }, /* XSUM_XXH3_testdata[225] */\n    {  113, 0x0000000000000000ULL, 0xBE550B209B8053F4ULL }, /* XSUM_XXH3_testdata[226] */\n    {  113, 0x9E3779B185EBCA8DULL, 0xF5F9BD8CF6B81D20ULL }, /* XSUM_XXH3_testdata[227] */\n    {  114, 0x0000000000000000ULL, 0x4DA974ECA68B8FFCULL }, /* XSUM_XXH3_testdata[228] */\n    {  114, 0x9E3779B185EBCA8DULL, 0x20286B3C34CB0BDDULL }, /* XSUM_XXH3_testdata[229] */\n    {  115, 0x0000000000000000ULL, 0xA0B797A411F7B6CBULL }, /* XSUM_XXH3_testdata[230] */\n    {  115, 0x9E3779B185EBCA8DULL, 0x52D1245D3849841AULL }, /* XSUM_XXH3_testdata[231] */\n    {  116, 0x0000000000000000ULL, 0x7A8FC0C2AAF79688ULL }, /* XSUM_XXH3_testdata[232] */\n    {  116, 0x9E3779B185EBCA8DULL, 0x6D9B1B844D62AC31ULL }, /* XSUM_XXH3_testdata[233] */\n    {  117, 0x0000000000000000ULL, 0xA1D5ADD8960E60D2ULL }, /* XSUM_XXH3_testdata[234] */\n    {  117, 0x9E3779B185EBCA8DULL, 0x0FA7782A243E7C15ULL }, /* XSUM_XXH3_testdata[235] */\n    {  118, 0x0000000000000000ULL, 0x6F36F196DEC9B226ULL }, /* XSUM_XXH3_testdata[236] */\n    {  118, 0x9E3779B185EBCA8DULL, 0x35D6EB2523BE860FULL }, /* XSUM_XXH3_testdata[237] */\n    {  119, 0x0000000000000000ULL, 0x744F5B932E23C7EFULL }, /* XSUM_XXH3_testdata[238] */\n    {  119, 0x9E3779B185EBCA8DULL, 0xA95D631EC75E5F6EULL }, /* XSUM_XXH3_testdata[239] */\n    {  120, 0x0000000000000000ULL, 0x540FB66724A6AE19ULL }, /* XSUM_XXH3_testdata[240] */\n    {  120, 0x9E3779B185EBCA8DULL, 0xFEC11DAB8EE17453ULL }, /* XSUM_XXH3_testdata[241] */\n    {  121, 0x0000000000000000ULL, 0x50BB29C6C0549FC0ULL }, /* XSUM_XXH3_testdata[242] */\n    {  121, 0x9E3779B185EBCA8DULL, 0x65AEAEF9E9931BA2ULL }, /* XSUM_XXH3_testdata[243] */\n    {  122, 0x0000000000000000ULL, 0xBE347793D1995DEFULL }, /* XSUM_XXH3_testdata[244] */\n    {  122, 0x9E3779B185EBCA8DULL, 0xC888B2E141FDA6A7ULL }, /* XSUM_XXH3_testdata[245] */\n    {  123, 0x0000000000000000ULL, 0x4172D20074B58F83ULL }, /* XSUM_XXH3_testdata[246] */\n    {  123, 0x9E3779B185EBCA8DULL, 0x82ED5A5EA70AB807ULL }, /* XSUM_XXH3_testdata[247] */\n    {  124, 0x0000000000000000ULL, 0x6E64960D24933378ULL }, /* XSUM_XXH3_testdata[248] */\n    {  124, 0x9E3779B185EBCA8DULL, 0x86974F4DDDAD4A3DULL }, /* XSUM_XXH3_testdata[249] */\n    {  125, 0x0000000000000000ULL, 0xA44FC0AC7F57FEDBULL }, /* XSUM_XXH3_testdata[250] */\n    {  125, 0x9E3779B185EBCA8DULL, 0xDF7CE17073BFA339ULL }, /* XSUM_XXH3_testdata[251] */\n    {  126, 0x0000000000000000ULL, 0xA1F71F67AE173EB7ULL }, /* XSUM_XXH3_testdata[252] */\n    {  126, 0x9E3779B185EBCA8DULL, 0x0222D32F731BA7FBULL }, /* XSUM_XXH3_testdata[253] */\n    {  127, 0x0000000000000000ULL, 0x2408ED71323D6096ULL }, /* XSUM_XXH3_testdata[254] */\n    {  127, 0x9E3779B185EBCA8DULL, 0x41D2F0C3F483208FULL }, /* XSUM_XXH3_testdata[255] */\n    {  128, 0x0000000000000000ULL, 0xFCFF24126754D861ULL }, /* XSUM_XXH3_testdata[256] */\n    {  128, 0x9E3779B185EBCA8DULL, 0x73FDE75280646649ULL }, /* XSUM_XXH3_testdata[257] */\n    {  129, 0x0000000000000000ULL, 0x98F1B0A679A2CA29ULL }, /* XSUM_XXH3_testdata[258] */\n    {  129, 0x9E3779B185EBCA8DULL, 0x21FFFDBCA099C844ULL }, /* XSUM_XXH3_testdata[259] */\n    {  130, 0x0000000000000000ULL, 0x7F6C531CF53EEB30ULL }, /* XSUM_XXH3_testdata[260] */\n    {  130, 0x9E3779B185EBCA8DULL, 0xF1450CA53F2203E1ULL }, /* XSUM_XXH3_testdata[261] */\n    {  131, 0x0000000000000000ULL, 0x9B4FA7D0B15E0A57ULL }, /* XSUM_XXH3_testdata[262] */\n    {  131, 0x9E3779B185EBCA8DULL, 0x9F5752AC8EF77AACULL }, /* XSUM_XXH3_testdata[263] */\n    {  132, 0x0000000000000000ULL, 0x3A38439A30B3C4CCULL }, /* XSUM_XXH3_testdata[264] */\n    {  132, 0x9E3779B185EBCA8DULL, 0xB27D306C98996FE6ULL }, /* XSUM_XXH3_testdata[265] */\n    {  133, 0x0000000000000000ULL, 0xA0699D046C5C5362ULL }, /* XSUM_XXH3_testdata[266] */\n    {  133, 0x9E3779B185EBCA8DULL, 0x763DD6652B6C34EDULL }, /* XSUM_XXH3_testdata[267] */\n    {  134, 0x0000000000000000ULL, 0x84A906EC5FA118A0ULL }, /* XSUM_XXH3_testdata[268] */\n    {  134, 0x9E3779B185EBCA8DULL, 0x46FF4D8E7E37CA25ULL }, /* XSUM_XXH3_testdata[269] */\n    {  135, 0x0000000000000000ULL, 0x6758FDC6D9906706ULL }, /* XSUM_XXH3_testdata[270] */\n    {  135, 0x9E3779B185EBCA8DULL, 0x92FDFBDAC216EB79ULL }, /* XSUM_XXH3_testdata[271] */\n    {  136, 0x0000000000000000ULL, 0x663DF5809A9645EEULL }, /* XSUM_XXH3_testdata[272] */\n    {  136, 0x9E3779B185EBCA8DULL, 0xB8891527E8C1FBC2ULL }, /* XSUM_XXH3_testdata[273] */\n    {  137, 0x0000000000000000ULL, 0x03E54245D16B0B4CULL }, /* XSUM_XXH3_testdata[274] */\n    {  137, 0x9E3779B185EBCA8DULL, 0xD0E671A9F60ECBA7ULL }, /* XSUM_XXH3_testdata[275] */\n    {  138, 0x0000000000000000ULL, 0xEA3FE83E2FF48610ULL }, /* XSUM_XXH3_testdata[276] */\n    {  138, 0x9E3779B185EBCA8DULL, 0x939CD4FE1C054F3AULL }, /* XSUM_XXH3_testdata[277] */\n    {  139, 0x0000000000000000ULL, 0x7D93965F3E0E3DFDULL }, /* XSUM_XXH3_testdata[278] */\n    {  139, 0x9E3779B185EBCA8DULL, 0x8D78D1FD9D0A8EE3ULL }, /* XSUM_XXH3_testdata[279] */\n    {  140, 0x0000000000000000ULL, 0xCA0D611F4C6D0492ULL }, /* XSUM_XXH3_testdata[280] */\n    {  140, 0x9E3779B185EBCA8DULL, 0x0EE6E507ED38899CULL }, /* XSUM_XXH3_testdata[281] */\n    {  141, 0x0000000000000000ULL, 0xFCFC9295B140E881ULL }, /* XSUM_XXH3_testdata[282] */\n    {  141, 0x9E3779B185EBCA8DULL, 0xD8A88F327D66CC9BULL }, /* XSUM_XXH3_testdata[283] */\n    {  142, 0x0000000000000000ULL, 0x7564A4E9782E2B1AULL }, /* XSUM_XXH3_testdata[284] */\n    {  142, 0x9E3779B185EBCA8DULL, 0x0BF86CA5CB4A3000ULL }, /* XSUM_XXH3_testdata[285] */\n    {  143, 0x0000000000000000ULL, 0x7A7813693F1F4EDBULL }, /* XSUM_XXH3_testdata[286] */\n    {  143, 0x9E3779B185EBCA8DULL, 0x43B3274AE68D5742ULL }, /* XSUM_XXH3_testdata[287] */\n    {  144, 0x0000000000000000ULL, 0xC440D47E5F03FE58ULL }, /* XSUM_XXH3_testdata[288] */\n    {  144, 0x9E3779B185EBCA8DULL, 0x858D16B71F4DD859ULL }, /* XSUM_XXH3_testdata[289] */\n    {  145, 0x0000000000000000ULL, 0x6B0A35A6CB2DA39DULL }, /* XSUM_XXH3_testdata[290] */\n    {  145, 0x9E3779B185EBCA8DULL, 0x82AA49A77E3DC26FULL }, /* XSUM_XXH3_testdata[291] */\n    {  146, 0x0000000000000000ULL, 0xCD519D5D390192F2ULL }, /* XSUM_XXH3_testdata[292] */\n    {  146, 0x9E3779B185EBCA8DULL, 0x42E2E13AB27DB0A0ULL }, /* XSUM_XXH3_testdata[293] */\n    {  147, 0x0000000000000000ULL, 0xF3B25AC47BD6E81EULL }, /* XSUM_XXH3_testdata[294] */\n    {  147, 0x9E3779B185EBCA8DULL, 0x0FC6AAC279201900ULL }, /* XSUM_XXH3_testdata[295] */\n    {  148, 0x0000000000000000ULL, 0xA57C549BCA723453ULL }, /* XSUM_XXH3_testdata[296] */\n    {  148, 0x9E3779B185EBCA8DULL, 0x68161B922ED9A946ULL }, /* XSUM_XXH3_testdata[297] */\n    {  149, 0x0000000000000000ULL, 0x466973FFC71B4B5DULL }, /* XSUM_XXH3_testdata[298] */\n    {  149, 0x9E3779B185EBCA8DULL, 0x4C3A019E1CFB23AAULL }, /* XSUM_XXH3_testdata[299] */\n    {  150, 0x0000000000000000ULL, 0xF37B3081C8DF11F6ULL }, /* XSUM_XXH3_testdata[300] */\n    {  150, 0x9E3779B185EBCA8DULL, 0x608B69EF63F8C716ULL }, /* XSUM_XXH3_testdata[301] */\n    {  151, 0x0000000000000000ULL, 0x909835AEA62BD752ULL }, /* XSUM_XXH3_testdata[302] */\n    {  151, 0x9E3779B185EBCA8DULL, 0x7735A32D2EF001DCULL }, /* XSUM_XXH3_testdata[303] */\n    {  152, 0x0000000000000000ULL, 0xE11B4A1098AD4B8BULL }, /* XSUM_XXH3_testdata[304] */\n    {  152, 0x9E3779B185EBCA8DULL, 0x6291A0D978D5C565ULL }, /* XSUM_XXH3_testdata[305] */\n    {  153, 0x0000000000000000ULL, 0x98BF35A509DBAEABULL }, /* XSUM_XXH3_testdata[306] */\n    {  153, 0x9E3779B185EBCA8DULL, 0x1804F3B0AEB1F981ULL }, /* XSUM_XXH3_testdata[307] */\n    {  154, 0x0000000000000000ULL, 0x70BBF262D1B53F51ULL }, /* XSUM_XXH3_testdata[308] */\n    {  154, 0x9E3779B185EBCA8DULL, 0xFCEA63D51474CDF0ULL }, /* XSUM_XXH3_testdata[309] */\n    {  155, 0x0000000000000000ULL, 0xB6D7C54AFFF3684BULL }, /* XSUM_XXH3_testdata[310] */\n    {  155, 0x9E3779B185EBCA8DULL, 0x6783D00565D9D687ULL }, /* XSUM_XXH3_testdata[311] */\n    {  156, 0x0000000000000000ULL, 0x9DCFF5B3B7447702ULL }, /* XSUM_XXH3_testdata[312] */\n    {  156, 0x9E3779B185EBCA8DULL, 0xED931D3F44416CCDULL }, /* XSUM_XXH3_testdata[313] */\n    {  157, 0x0000000000000000ULL, 0x2A959079A3F984B7ULL }, /* XSUM_XXH3_testdata[314] */\n    {  157, 0x9E3779B185EBCA8DULL, 0x6272761ED82135DEULL }, /* XSUM_XXH3_testdata[315] */\n    {  158, 0x0000000000000000ULL, 0x9F93B18D6C70E091ULL }, /* XSUM_XXH3_testdata[316] */\n    {  158, 0x9E3779B185EBCA8DULL, 0x67532B69EEA9F165ULL }, /* XSUM_XXH3_testdata[317] */\n    {  159, 0x0000000000000000ULL, 0x7CB32A6ECDEBAF1CULL }, /* XSUM_XXH3_testdata[318] */\n    {  159, 0x9E3779B185EBCA8DULL, 0xACFF1F7B6CC1FDC9ULL }, /* XSUM_XXH3_testdata[319] */\n    {  160, 0x0000000000000000ULL, 0x9D03A319ED4CBD2BULL }, /* XSUM_XXH3_testdata[320] */\n    {  160, 0x9E3779B185EBCA8DULL, 0x3825C75FFE70FDE0ULL }, /* XSUM_XXH3_testdata[321] */\n    {  161, 0x0000000000000000ULL, 0x7F8A89C6BE63F006ULL }, /* XSUM_XXH3_testdata[322] */\n    {  161, 0x9E3779B185EBCA8DULL, 0xEE122D625550ADB5ULL }, /* XSUM_XXH3_testdata[323] */\n    {  162, 0x0000000000000000ULL, 0x2474A16D1E7EB282ULL }, /* XSUM_XXH3_testdata[324] */\n    {  162, 0x9E3779B185EBCA8DULL, 0x9BB5F1FDF209F6E6ULL }, /* XSUM_XXH3_testdata[325] */\n    {  163, 0x0000000000000000ULL, 0x8DB1E66EC827C3D9ULL }, /* XSUM_XXH3_testdata[326] */\n    {  163, 0x9E3779B185EBCA8DULL, 0x39151D86B74D6357ULL }, /* XSUM_XXH3_testdata[327] */\n    {  164, 0x0000000000000000ULL, 0x32DCB8A53DC0C161ULL }, /* XSUM_XXH3_testdata[328] */\n    {  164, 0x9E3779B185EBCA8DULL, 0x699179710733B633ULL }, /* XSUM_XXH3_testdata[329] */\n    {  165, 0x0000000000000000ULL, 0x3EC4094D7BB7628DULL }, /* XSUM_XXH3_testdata[330] */\n    {  165, 0x9E3779B185EBCA8DULL, 0xFB33609F8B3BE2C2ULL }, /* XSUM_XXH3_testdata[331] */\n    {  166, 0x0000000000000000ULL, 0xB6A472574D1F8503ULL }, /* XSUM_XXH3_testdata[332] */\n    {  166, 0x9E3779B185EBCA8DULL, 0x77B4550D54BD15B4ULL }, /* XSUM_XXH3_testdata[333] */\n    {  167, 0x0000000000000000ULL, 0xA56A74F7014B726AULL }, /* XSUM_XXH3_testdata[334] */\n    {  167, 0x9E3779B185EBCA8DULL, 0x13FEF783CA42491BULL }, /* XSUM_XXH3_testdata[335] */\n    {  168, 0x0000000000000000ULL, 0x49DA18CA1C8530B6ULL }, /* XSUM_XXH3_testdata[336] */\n    {  168, 0x9E3779B185EBCA8DULL, 0x609F4FA16DBFF2F0ULL }, /* XSUM_XXH3_testdata[337] */\n    {  169, 0x0000000000000000ULL, 0xBE73D1D17DBA9D7BULL }, /* XSUM_XXH3_testdata[338] */\n    {  169, 0x9E3779B185EBCA8DULL, 0x984614799ADF185DULL }, /* XSUM_XXH3_testdata[339] */\n    {  170, 0x0000000000000000ULL, 0x81D2F5665A40BE4CULL }, /* XSUM_XXH3_testdata[340] */\n    {  170, 0x9E3779B185EBCA8DULL, 0xD673758E56F598E1ULL }, /* XSUM_XXH3_testdata[341] */\n    {  171, 0x0000000000000000ULL, 0x3720366743BF39B1ULL }, /* XSUM_XXH3_testdata[342] */\n    {  171, 0x9E3779B185EBCA8DULL, 0xC4AC6C4773E09C8BULL }, /* XSUM_XXH3_testdata[343] */\n    {  172, 0x0000000000000000ULL, 0x59828CD9838E43E8ULL }, /* XSUM_XXH3_testdata[344] */\n    {  172, 0x9E3779B185EBCA8DULL, 0xBCBAD7AA03D9CA97ULL }, /* XSUM_XXH3_testdata[345] */\n    {  173, 0x0000000000000000ULL, 0x423FCB5A1FE143EDULL }, /* XSUM_XXH3_testdata[346] */\n    {  173, 0x9E3779B185EBCA8DULL, 0x78D025F167A41D1BULL }, /* XSUM_XXH3_testdata[347] */\n    {  174, 0x0000000000000000ULL, 0xD29DEB0ECD352D5CULL }, /* XSUM_XXH3_testdata[348] */\n    {  174, 0x9E3779B185EBCA8DULL, 0x74EDE1BCDB8412DCULL }, /* XSUM_XXH3_testdata[349] */\n    {  175, 0x0000000000000000ULL, 0xA414B77DF2FDABAEULL }, /* XSUM_XXH3_testdata[350] */\n    {  175, 0x9E3779B185EBCA8DULL, 0x8F19B0614DB0B814ULL }, /* XSUM_XXH3_testdata[351] */\n    {  176, 0x0000000000000000ULL, 0x6A79C99804538253ULL }, /* XSUM_XXH3_testdata[352] */\n    {  176, 0x9E3779B185EBCA8DULL, 0x25B3750065BA47EFULL }, /* XSUM_XXH3_testdata[353] */\n    {  177, 0x0000000000000000ULL, 0x6FC0E6E420B6629BULL }, /* XSUM_XXH3_testdata[354] */\n    {  177, 0x9E3779B185EBCA8DULL, 0xB1D1D87EEE7672DFULL }, /* XSUM_XXH3_testdata[355] */\n    {  178, 0x0000000000000000ULL, 0x46331B1DF91C423FULL }, /* XSUM_XXH3_testdata[356] */\n    {  178, 0x9E3779B185EBCA8DULL, 0xD735A55A58764CA4ULL }, /* XSUM_XXH3_testdata[357] */\n    {  179, 0x0000000000000000ULL, 0x2F07114318B350BCULL }, /* XSUM_XXH3_testdata[358] */\n    {  179, 0x9E3779B185EBCA8DULL, 0x1D5BE67985C1A686ULL }, /* XSUM_XXH3_testdata[359] */\n    {  180, 0x0000000000000000ULL, 0xC801EF90CE0E5482ULL }, /* XSUM_XXH3_testdata[360] */\n    {  180, 0x9E3779B185EBCA8DULL, 0x46E2C5CDA8C31D49ULL }, /* XSUM_XXH3_testdata[361] */\n    {  181, 0x0000000000000000ULL, 0x0FB3D9F3FB6159C2ULL }, /* XSUM_XXH3_testdata[362] */\n    {  181, 0x9E3779B185EBCA8DULL, 0x653F3124125D03A8ULL }, /* XSUM_XXH3_testdata[363] */\n    {  182, 0x0000000000000000ULL, 0xC4C2A22A0A17AE1DULL }, /* XSUM_XXH3_testdata[364] */\n    {  182, 0x9E3779B185EBCA8DULL, 0xFF709C491D108570ULL }, /* XSUM_XXH3_testdata[365] */\n    {  183, 0x0000000000000000ULL, 0xED4887E95B6DDEEAULL }, /* XSUM_XXH3_testdata[366] */\n    {  183, 0x9E3779B185EBCA8DULL, 0x248ED7F1F3FD278BULL }, /* XSUM_XXH3_testdata[367] */\n    {  184, 0x0000000000000000ULL, 0x26ACC2AABEBE7708ULL }, /* XSUM_XXH3_testdata[368] */\n    {  184, 0x9E3779B185EBCA8DULL, 0xE6385CF95A3B2527ULL }, /* XSUM_XXH3_testdata[369] */\n    {  185, 0x0000000000000000ULL, 0x04499AD14A01CDFAULL }, /* XSUM_XXH3_testdata[370] */\n    {  185, 0x9E3779B185EBCA8DULL, 0x7C602A71149BCF8DULL }, /* XSUM_XXH3_testdata[371] */\n    {  186, 0x0000000000000000ULL, 0x9C76CA622DFD0557ULL }, /* XSUM_XXH3_testdata[372] */\n    {  186, 0x9E3779B185EBCA8DULL, 0x0F2444A4EADA96A4ULL }, /* XSUM_XXH3_testdata[373] */\n    {  187, 0x0000000000000000ULL, 0x41A93EE0800CAAF9ULL }, /* XSUM_XXH3_testdata[374] */\n    {  187, 0x9E3779B185EBCA8DULL, 0x90A15B89F499F00DULL }, /* XSUM_XXH3_testdata[375] */\n    {  188, 0x0000000000000000ULL, 0x511144B10FEFDA3AULL }, /* XSUM_XXH3_testdata[376] */\n    {  188, 0x9E3779B185EBCA8DULL, 0xDB7EA67AB226CD9AULL }, /* XSUM_XXH3_testdata[377] */\n    {  189, 0x0000000000000000ULL, 0xEE03BB33DA3ED624ULL }, /* XSUM_XXH3_testdata[378] */\n    {  189, 0x9E3779B185EBCA8DULL, 0xC6FC08280035A2C7ULL }, /* XSUM_XXH3_testdata[379] */\n    {  190, 0x0000000000000000ULL, 0x24ED6F75412D1E43ULL }, /* XSUM_XXH3_testdata[380] */\n    {  190, 0x9E3779B185EBCA8DULL, 0x47BEC6016CC3E54AULL }, /* XSUM_XXH3_testdata[381] */\n    {  191, 0x0000000000000000ULL, 0x759FFC8FF8FB94BDULL }, /* XSUM_XXH3_testdata[382] */\n    {  191, 0x9E3779B185EBCA8DULL, 0xABCD155AD6E9F3B6ULL }, /* XSUM_XXH3_testdata[383] */\n    {  192, 0x0000000000000000ULL, 0xAF9F58E78B8D3587ULL }, /* XSUM_XXH3_testdata[384] */\n    {  192, 0x9E3779B185EBCA8DULL, 0x69E006AA2156C999ULL }, /* XSUM_XXH3_testdata[385] */\n    {  193, 0x0000000000000000ULL, 0x32FAB2ADCAE0D00DULL }, /* XSUM_XXH3_testdata[386] */\n    {  193, 0x9E3779B185EBCA8DULL, 0x52D31C60ADC3D7B3ULL }, /* XSUM_XXH3_testdata[387] */\n    {  194, 0x0000000000000000ULL, 0x49EB64C2E5D65FA7ULL }, /* XSUM_XXH3_testdata[388] */\n    {  194, 0x9E3779B185EBCA8DULL, 0xC2FEDA6D9221BEAFULL }, /* XSUM_XXH3_testdata[389] */\n    {  195, 0x0000000000000000ULL, 0xCD94217EE362EC3AULL }, /* XSUM_XXH3_testdata[390] */\n    {  195, 0x9E3779B185EBCA8DULL, 0xBA68003D370CB3D9ULL }, /* XSUM_XXH3_testdata[391] */\n    {  196, 0x0000000000000000ULL, 0xF5783F1A3C6F6E11ULL }, /* XSUM_XXH3_testdata[392] */\n    {  196, 0x9E3779B185EBCA8DULL, 0x7868BDD61AF9BE3DULL }, /* XSUM_XXH3_testdata[393] */\n    {  197, 0x0000000000000000ULL, 0x894BBC1DD7E5674FULL }, /* XSUM_XXH3_testdata[394] */\n    {  197, 0x9E3779B185EBCA8DULL, 0x652C9AB1C8D39D5EULL }, /* XSUM_XXH3_testdata[395] */\n    {  198, 0x0000000000000000ULL, 0xE2689C6CB4D31AAAULL }, /* XSUM_XXH3_testdata[396] */\n    {  198, 0x9E3779B185EBCA8DULL, 0x6DD1D6DF5511FAA7ULL }, /* XSUM_XXH3_testdata[397] */\n    {  199, 0x0000000000000000ULL, 0x673AD58BFD993705ULL }, /* XSUM_XXH3_testdata[398] */\n    {  199, 0x9E3779B185EBCA8DULL, 0xCCA3F1CD19A25150ULL }, /* XSUM_XXH3_testdata[399] */\n    {  200, 0x0000000000000000ULL, 0xBDDCA58935D7C038ULL }, /* XSUM_XXH3_testdata[400] */\n    {  200, 0x9E3779B185EBCA8DULL, 0x5B899E984B88DB8DULL }, /* XSUM_XXH3_testdata[401] */\n    {  201, 0x0000000000000000ULL, 0x1A37E8AEA84C276FULL }, /* XSUM_XXH3_testdata[402] */\n    {  201, 0x9E3779B185EBCA8DULL, 0xDF67E6D40736EED4ULL }, /* XSUM_XXH3_testdata[403] */\n    {  202, 0x0000000000000000ULL, 0x7133A9B6DAA64C4FULL }, /* XSUM_XXH3_testdata[404] */\n    {  202, 0x9E3779B185EBCA8DULL, 0xB4877CEF4D15A60CULL }, /* XSUM_XXH3_testdata[405] */\n    {  203, 0x0000000000000000ULL, 0xB8A63260A11F1047ULL }, /* XSUM_XXH3_testdata[406] */\n    {  203, 0x9E3779B185EBCA8DULL, 0xA9DEBF6A44D6C343ULL }, /* XSUM_XXH3_testdata[407] */\n    {  204, 0x0000000000000000ULL, 0xF81ED05ED82A5F64ULL }, /* XSUM_XXH3_testdata[408] */\n    {  204, 0x9E3779B185EBCA8DULL, 0x00A56571768FC3B1ULL }, /* XSUM_XXH3_testdata[409] */\n    {  205, 0x0000000000000000ULL, 0x9AAF89A02B341B4DULL }, /* XSUM_XXH3_testdata[410] */\n    {  205, 0x9E3779B185EBCA8DULL, 0xB8CFB9B3C7272312ULL }, /* XSUM_XXH3_testdata[411] */\n    {  206, 0x0000000000000000ULL, 0xE5E6D6FCA7EE38B9ULL }, /* XSUM_XXH3_testdata[412] */\n    {  206, 0x9E3779B185EBCA8DULL, 0x3957A991E22D881BULL }, /* XSUM_XXH3_testdata[413] */\n    {  207, 0x0000000000000000ULL, 0x56FFE054ABC6F401ULL }, /* XSUM_XXH3_testdata[414] */\n    {  207, 0x9E3779B185EBCA8DULL, 0x056F05B3D4F7BCEFULL }, /* XSUM_XXH3_testdata[415] */\n    {  208, 0x0000000000000000ULL, 0x2CF1E5EB7433AA4DULL }, /* XSUM_XXH3_testdata[416] */\n    {  208, 0x9E3779B185EBCA8DULL, 0xA351C8376638C444ULL }, /* XSUM_XXH3_testdata[417] */\n    {  209, 0x0000000000000000ULL, 0x55D4B044757B2153ULL }, /* XSUM_XXH3_testdata[418] */\n    {  209, 0x9E3779B185EBCA8DULL, 0x87D10DE06020D17DULL }, /* XSUM_XXH3_testdata[419] */\n    {  210, 0x0000000000000000ULL, 0x1F69D7786B302B2CULL }, /* XSUM_XXH3_testdata[420] */\n    {  210, 0x9E3779B185EBCA8DULL, 0x6132710E50E40A5CULL }, /* XSUM_XXH3_testdata[421] */\n    {  211, 0x0000000000000000ULL, 0x3E33C814B1D6A382ULL }, /* XSUM_XXH3_testdata[422] */\n    {  211, 0x9E3779B185EBCA8DULL, 0xCB64E9EA84CB28C5ULL }, /* XSUM_XXH3_testdata[423] */\n    {  212, 0x0000000000000000ULL, 0x7E49ADD5E90DB2B5ULL }, /* XSUM_XXH3_testdata[424] */\n    {  212, 0x9E3779B185EBCA8DULL, 0xDE9B97DF13D80B9DULL }, /* XSUM_XXH3_testdata[425] */\n    {  213, 0x0000000000000000ULL, 0xA829342475F34565ULL }, /* XSUM_XXH3_testdata[426] */\n    {  213, 0x9E3779B185EBCA8DULL, 0x8EE174C9B237F8AFULL }, /* XSUM_XXH3_testdata[427] */\n    {  214, 0x0000000000000000ULL, 0x5FF1756998E2DE58ULL }, /* XSUM_XXH3_testdata[428] */\n    {  214, 0x9E3779B185EBCA8DULL, 0x13C52F2A2E1D5992ULL }, /* XSUM_XXH3_testdata[429] */\n    {  215, 0x0000000000000000ULL, 0x2DC9EC2DFA977D2DULL }, /* XSUM_XXH3_testdata[430] */\n    {  215, 0x9E3779B185EBCA8DULL, 0x4DEFCFD87DEB6DEBULL }, /* XSUM_XXH3_testdata[431] */\n    {  216, 0x0000000000000000ULL, 0x80C06422DA6B2014ULL }, /* XSUM_XXH3_testdata[432] */\n    {  216, 0x9E3779B185EBCA8DULL, 0x4DE3FAC5A41BF995ULL }, /* XSUM_XXH3_testdata[433] */\n    {  217, 0x0000000000000000ULL, 0xAE20A79CAB85BDD9ULL }, /* XSUM_XXH3_testdata[434] */\n    {  217, 0x9E3779B185EBCA8DULL, 0x9F30A3800E1E8A2AULL }, /* XSUM_XXH3_testdata[435] */\n    {  218, 0x0000000000000000ULL, 0x3C9DBA381565379DULL }, /* XSUM_XXH3_testdata[436] */\n    {  218, 0x9E3779B185EBCA8DULL, 0xD7EA324A7DCBA190ULL }, /* XSUM_XXH3_testdata[437] */\n    {  219, 0x0000000000000000ULL, 0xB14F87797A8D4E11ULL }, /* XSUM_XXH3_testdata[438] */\n    {  219, 0x9E3779B185EBCA8DULL, 0xB048E218EB663459ULL }, /* XSUM_XXH3_testdata[439] */\n    {  220, 0x0000000000000000ULL, 0x85906CC9B50AAD58ULL }, /* XSUM_XXH3_testdata[440] */\n    {  220, 0x9E3779B185EBCA8DULL, 0x9F92416B7A9BE313ULL }, /* XSUM_XXH3_testdata[441] */\n    {  221, 0x0000000000000000ULL, 0xE1879D3FB79D634CULL }, /* XSUM_XXH3_testdata[442] */\n    {  221, 0x9E3779B185EBCA8DULL, 0xCBDDC9D69E2C6628ULL }, /* XSUM_XXH3_testdata[443] */\n    {  222, 0x0000000000000000ULL, 0xB9163B558664D356ULL }, /* XSUM_XXH3_testdata[444] */\n    {  222, 0x9E3779B185EBCA8DULL, 0xCD627E7CA214EBFDULL }, /* XSUM_XXH3_testdata[445] */\n    {  223, 0x0000000000000000ULL, 0x6E495316B983036EULL }, /* XSUM_XXH3_testdata[446] */\n    {  223, 0x9E3779B185EBCA8DULL, 0x9F9CEFACCFEE917DULL }, /* XSUM_XXH3_testdata[447] */\n    {  224, 0x0000000000000000ULL, 0x3F3250C7E92C871AULL }, /* XSUM_XXH3_testdata[448] */\n    {  224, 0x9E3779B185EBCA8DULL, 0x17023A9A6F1156DBULL }, /* XSUM_XXH3_testdata[449] */\n    {  225, 0x0000000000000000ULL, 0x1E93DC9165079888ULL }, /* XSUM_XXH3_testdata[450] */\n    {  225, 0x9E3779B185EBCA8DULL, 0xCC6043CF5EB743ECULL }, /* XSUM_XXH3_testdata[451] */\n    {  226, 0x0000000000000000ULL, 0x1079CBA535D0645FULL }, /* XSUM_XXH3_testdata[452] */\n    {  226, 0x9E3779B185EBCA8DULL, 0x103B79310DD8559DULL }, /* XSUM_XXH3_testdata[453] */\n    {  227, 0x0000000000000000ULL, 0x6512697FC21CBF8CULL }, /* XSUM_XXH3_testdata[454] */\n    {  227, 0x9E3779B185EBCA8DULL, 0xF5843A5E1CF14646ULL }, /* XSUM_XXH3_testdata[455] */\n    {  228, 0x0000000000000000ULL, 0x08F56302C634EDC6ULL }, /* XSUM_XXH3_testdata[456] */\n    {  228, 0x9E3779B185EBCA8DULL, 0x9EFB771D3B4C7AF9ULL }, /* XSUM_XXH3_testdata[457] */\n    {  229, 0x0000000000000000ULL, 0x0FA5055AB340134DULL }, /* XSUM_XXH3_testdata[458] */\n    {  229, 0x9E3779B185EBCA8DULL, 0xD9418C945BD23B5DULL }, /* XSUM_XXH3_testdata[459] */\n    {  230, 0x0000000000000000ULL, 0x358940707397C206ULL }, /* XSUM_XXH3_testdata[460] */\n    {  230, 0x9E3779B185EBCA8DULL, 0x7D15402DDA9BA222ULL }, /* XSUM_XXH3_testdata[461] */\n    {  231, 0x0000000000000000ULL, 0x95CAC1AA565CA0EEULL }, /* XSUM_XXH3_testdata[462] */\n    {  231, 0x9E3779B185EBCA8DULL, 0x1BD48A08ABD40673ULL }, /* XSUM_XXH3_testdata[463] */\n    {  232, 0x0000000000000000ULL, 0xC087038879A68C72ULL }, /* XSUM_XXH3_testdata[464] */\n    {  232, 0x9E3779B185EBCA8DULL, 0x6BC086B684ECC59BULL }, /* XSUM_XXH3_testdata[465] */\n    {  233, 0x0000000000000000ULL, 0xCC5DFD5F26F2007BULL }, /* XSUM_XXH3_testdata[466] */\n    {  233, 0x9E3779B185EBCA8DULL, 0xDAA0803A50AF57BCULL }, /* XSUM_XXH3_testdata[467] */\n    {  234, 0x0000000000000000ULL, 0xDF618B5211DE4C44ULL }, /* XSUM_XXH3_testdata[468] */\n    {  234, 0x9E3779B185EBCA8DULL, 0x6AE5A200DEB230F6ULL }, /* XSUM_XXH3_testdata[469] */\n    {  235, 0x0000000000000000ULL, 0x75F3FF407516816BULL }, /* XSUM_XXH3_testdata[470] */\n    {  235, 0x9E3779B185EBCA8DULL, 0xCAACD909A07B2CDEULL }, /* XSUM_XXH3_testdata[471] */\n    {  236, 0x0000000000000000ULL, 0xD551D984066EA00AULL }, /* XSUM_XXH3_testdata[472] */\n    {  236, 0x9E3779B185EBCA8DULL, 0xE265DA4B7010F56CULL }, /* XSUM_XXH3_testdata[473] */\n    {  237, 0x0000000000000000ULL, 0x86F6EC327E7FC887ULL }, /* XSUM_XXH3_testdata[474] */\n    {  237, 0x9E3779B185EBCA8DULL, 0x50D19364E2ED470AULL }, /* XSUM_XXH3_testdata[475] */\n    {  238, 0x0000000000000000ULL, 0x267B67B37098FF8EULL }, /* XSUM_XXH3_testdata[476] */\n    {  238, 0x9E3779B185EBCA8DULL, 0x43C23D8A13D3212AULL }, /* XSUM_XXH3_testdata[477] */\n    {  239, 0x0000000000000000ULL, 0x16CE2B9D3B28805DULL }, /* XSUM_XXH3_testdata[478] */\n    {  239, 0x9E3779B185EBCA8DULL, 0xF59F5C23FCEBD3B7ULL }, /* XSUM_XXH3_testdata[479] */\n    {  240, 0x0000000000000000ULL, 0x81C3C2B67F568CCFULL }, /* XSUM_XXH3_testdata[480] */\n    {  240, 0x9E3779B185EBCA8DULL, 0xCC0F58C27EF3D8EEULL }, /* XSUM_XXH3_testdata[481] */\n    {  241, 0x0000000000000000ULL, 0xC5A639ECD2030E5EULL }, /* XSUM_XXH3_testdata[482] */\n    {  241, 0x9E3779B185EBCA8DULL, 0xDDA9B0A161D4829AULL }, /* XSUM_XXH3_testdata[483] */\n    {  242, 0x0000000000000000ULL, 0x967344E78CB4B723ULL }, /* XSUM_XXH3_testdata[484] */\n    {  242, 0x9E3779B185EBCA8DULL, 0x5811A132DBCB4C75ULL }, /* XSUM_XXH3_testdata[485] */\n    {  243, 0x0000000000000000ULL, 0xE988DAEF24A33188ULL }, /* XSUM_XXH3_testdata[486] */\n    {  243, 0x9E3779B185EBCA8DULL, 0x608C899C17491898ULL }, /* XSUM_XXH3_testdata[487] */\n    {  244, 0x0000000000000000ULL, 0x207BF1DB073E4932ULL }, /* XSUM_XXH3_testdata[488] */\n    {  244, 0x9E3779B185EBCA8DULL, 0x7E4E1ED6A0116446ULL }, /* XSUM_XXH3_testdata[489] */\n    {  245, 0x0000000000000000ULL, 0xB2494882657D1610ULL }, /* XSUM_XXH3_testdata[490] */\n    {  245, 0x9E3779B185EBCA8DULL, 0x8853314E454EEB9BULL }, /* XSUM_XXH3_testdata[491] */\n    {  246, 0x0000000000000000ULL, 0x09BA721476ECA776ULL }, /* XSUM_XXH3_testdata[492] */\n    {  246, 0x9E3779B185EBCA8DULL, 0xF096F24C090E8B28ULL }, /* XSUM_XXH3_testdata[493] */\n    {  247, 0x0000000000000000ULL, 0x2336B969899E627DULL }, /* XSUM_XXH3_testdata[494] */\n    {  247, 0x9E3779B185EBCA8DULL, 0x2FCE53405D7FC73FULL }, /* XSUM_XXH3_testdata[495] */\n    {  248, 0x0000000000000000ULL, 0x675A39222277D0B0ULL }, /* XSUM_XXH3_testdata[496] */\n    {  248, 0x9E3779B185EBCA8DULL, 0xA7EA866DD4EC2B64ULL }, /* XSUM_XXH3_testdata[497] */\n    {  249, 0x0000000000000000ULL, 0x2FC4F84AB35D73A2ULL }, /* XSUM_XXH3_testdata[498] */\n    {  249, 0x9E3779B185EBCA8DULL, 0x8F448C1B7A4004F8ULL }, /* XSUM_XXH3_testdata[499] */\n    {  250, 0x0000000000000000ULL, 0x92FE7370568187CCULL }, /* XSUM_XXH3_testdata[500] */\n    {  250, 0x9E3779B185EBCA8DULL, 0x538997F3170A6253ULL }, /* XSUM_XXH3_testdata[501] */\n    {  251, 0x0000000000000000ULL, 0xC8979538455865E1ULL }, /* XSUM_XXH3_testdata[502] */\n    {  251, 0x9E3779B185EBCA8DULL, 0x81DBBD7E7B9D1517ULL }, /* XSUM_XXH3_testdata[503] */\n    {  252, 0x0000000000000000ULL, 0x517E9BFBF584B49CULL }, /* XSUM_XXH3_testdata[504] */\n    {  252, 0x9E3779B185EBCA8DULL, 0xDA61F0C55F7F37CDULL }, /* XSUM_XXH3_testdata[505] */\n    {  253, 0x0000000000000000ULL, 0x126CDADFC2AF595AULL }, /* XSUM_XXH3_testdata[506] */\n    {  253, 0x9E3779B185EBCA8DULL, 0xA495566991B63EFCULL }, /* XSUM_XXH3_testdata[507] */\n    {  254, 0x0000000000000000ULL, 0xC6ADC7E5504153FAULL }, /* XSUM_XXH3_testdata[508] */\n    {  254, 0x9E3779B185EBCA8DULL, 0x8204DFA4A557CBB5ULL }, /* XSUM_XXH3_testdata[509] */\n    {  255, 0x0000000000000000ULL, 0xE98F979F4ED8A197ULL }, /* XSUM_XXH3_testdata[510] */\n    {  255, 0x9E3779B185EBCA8DULL, 0x2ACA7901D9538C75ULL }, /* XSUM_XXH3_testdata[511] */\n    {  256, 0x0000000000000000ULL, 0x55DE574AD89D0AC5ULL }, /* XSUM_XXH3_testdata[512] */\n    {  256, 0x9E3779B185EBCA8DULL, 0x4D30234B7A3AA61CULL }, /* XSUM_XXH3_testdata[513] */\n    {  257, 0x0000000000000000ULL, 0xB17FD5A8AE75BB0BULL }, /* XSUM_XXH3_testdata[514] */\n    {  257, 0x9E3779B185EBCA8DULL, 0x802A6FBF3CACD97CULL }, /* XSUM_XXH3_testdata[515] */\n    {  258, 0x0000000000000000ULL, 0x597C26D615CCF5D2ULL }, /* XSUM_XXH3_testdata[516] */\n    {  258, 0x9E3779B185EBCA8DULL, 0xB3A4A6F75E9D895FULL }, /* XSUM_XXH3_testdata[517] */\n    {  259, 0x0000000000000000ULL, 0x96FE56AAA5CE16F7ULL }, /* XSUM_XXH3_testdata[518] */\n    {  259, 0x9E3779B185EBCA8DULL, 0x026072B81C892FD0ULL }, /* XSUM_XXH3_testdata[519] */\n    {  260, 0x0000000000000000ULL, 0x6434C3B4B191597FULL }, /* XSUM_XXH3_testdata[520] */\n    {  260, 0x9E3779B185EBCA8DULL, 0xBD2F19B13A895785ULL }, /* XSUM_XXH3_testdata[521] */\n    {  261, 0x0000000000000000ULL, 0x622B69F5713E3274ULL }, /* XSUM_XXH3_testdata[522] */\n    {  261, 0x9E3779B185EBCA8DULL, 0xB550374C5BB46917ULL }, /* XSUM_XXH3_testdata[523] */\n    {  262, 0x0000000000000000ULL, 0x3131B78E8EDB2AD2ULL }, /* XSUM_XXH3_testdata[524] */\n    {  262, 0x9E3779B185EBCA8DULL, 0x728D3D77F1BB62FAULL }, /* XSUM_XXH3_testdata[525] */\n    {  263, 0x0000000000000000ULL, 0xD9DF9C2FC42E0238ULL }, /* XSUM_XXH3_testdata[526] */\n    {  263, 0x9E3779B185EBCA8DULL, 0x90777D0F22DD4753ULL }, /* XSUM_XXH3_testdata[527] */\n    {  264, 0x0000000000000000ULL, 0x84603BD8C0D6611BULL }, /* XSUM_XXH3_testdata[528] */\n    {  264, 0x9E3779B185EBCA8DULL, 0x6D179A435DD3ADEFULL }, /* XSUM_XXH3_testdata[529] */\n    {  265, 0x0000000000000000ULL, 0x3E689724BD2BCF46ULL }, /* XSUM_XXH3_testdata[530] */\n    {  265, 0x9E3779B185EBCA8DULL, 0xFC84D97265A20FADULL }, /* XSUM_XXH3_testdata[531] */\n    {  266, 0x0000000000000000ULL, 0x74E4B8041F481162ULL }, /* XSUM_XXH3_testdata[532] */\n    {  266, 0x9E3779B185EBCA8DULL, 0x65ABFBAECBC200C4ULL }, /* XSUM_XXH3_testdata[533] */\n    {  267, 0x0000000000000000ULL, 0x75EA9B12AF18FA87ULL }, /* XSUM_XXH3_testdata[534] */\n    {  267, 0x9E3779B185EBCA8DULL, 0x0A217005537F0186ULL }, /* XSUM_XXH3_testdata[535] */\n    {  268, 0x0000000000000000ULL, 0x215E27CCEE7C81FEULL }, /* XSUM_XXH3_testdata[536] */\n    {  268, 0x9E3779B185EBCA8DULL, 0xA75ADAB112131070ULL }, /* XSUM_XXH3_testdata[537] */\n    {  269, 0x0000000000000000ULL, 0xCDB22F74254DEB8BULL }, /* XSUM_XXH3_testdata[538] */\n    {  269, 0x9E3779B185EBCA8DULL, 0xCE40B2E4012A8BA2ULL }, /* XSUM_XXH3_testdata[539] */\n    {  270, 0x0000000000000000ULL, 0xE634D8664D685397ULL }, /* XSUM_XXH3_testdata[540] */\n    {  270, 0x9E3779B185EBCA8DULL, 0x9B7B8CAA8808A81FULL }, /* XSUM_XXH3_testdata[541] */\n    {  271, 0x0000000000000000ULL, 0x4B367EF9DF9DEA94ULL }, /* XSUM_XXH3_testdata[542] */\n    {  271, 0x9E3779B185EBCA8DULL, 0xF97A1A53C95C4E11ULL }, /* XSUM_XXH3_testdata[543] */\n    {  272, 0x0000000000000000ULL, 0xD74D68D5D03119B3ULL }, /* XSUM_XXH3_testdata[544] */\n    {  272, 0x9E3779B185EBCA8DULL, 0x10BD868ACB6D6FA9ULL }, /* XSUM_XXH3_testdata[545] */\n    {  273, 0x0000000000000000ULL, 0x65E1FFF6E3002DAFULL }, /* XSUM_XXH3_testdata[546] */\n    {  273, 0x9E3779B185EBCA8DULL, 0xB80F7A672C201B85ULL }, /* XSUM_XXH3_testdata[547] */\n    {  274, 0x0000000000000000ULL, 0x389595A06A55E2E1ULL }, /* XSUM_XXH3_testdata[548] */\n    {  274, 0x9E3779B185EBCA8DULL, 0xB9AEA6AC34EEA74BULL }, /* XSUM_XXH3_testdata[549] */\n    {  275, 0x0000000000000000ULL, 0x4E29525A452E797FULL }, /* XSUM_XXH3_testdata[550] */\n    {  275, 0x9E3779B185EBCA8DULL, 0xBC6AD5649DBFF613ULL }, /* XSUM_XXH3_testdata[551] */\n    {  276, 0x0000000000000000ULL, 0x65DCAB6FC5BBF7FFULL }, /* XSUM_XXH3_testdata[552] */\n    {  276, 0x9E3779B185EBCA8DULL, 0x3504897BCA1D4F66ULL }, /* XSUM_XXH3_testdata[553] */\n    {  277, 0x0000000000000000ULL, 0x013F79E2E571C3A1ULL }, /* XSUM_XXH3_testdata[554] */\n    {  277, 0x9E3779B185EBCA8DULL, 0x449C80F974E1B6F1ULL }, /* XSUM_XXH3_testdata[555] */\n    {  278, 0x0000000000000000ULL, 0x57BF715F3AA64DF2ULL }, /* XSUM_XXH3_testdata[556] */\n    {  278, 0x9E3779B185EBCA8DULL, 0x1F05B7AA1370AF21ULL }, /* XSUM_XXH3_testdata[557] */\n    {  279, 0x0000000000000000ULL, 0x295056DC98A9526CULL }, /* XSUM_XXH3_testdata[558] */\n    {  279, 0x9E3779B185EBCA8DULL, 0x43B1C69843725589ULL }, /* XSUM_XXH3_testdata[559] */\n    {  280, 0x0000000000000000ULL, 0x952AEF533EAF359BULL }, /* XSUM_XXH3_testdata[560] */\n    {  280, 0x9E3779B185EBCA8DULL, 0xE4627DFF9E8B6849ULL }, /* XSUM_XXH3_testdata[561] */\n    {  281, 0x0000000000000000ULL, 0xEA6959C34EB32E09ULL }, /* XSUM_XXH3_testdata[562] */\n    {  281, 0x9E3779B185EBCA8DULL, 0xE8F69EDE556ACDD5ULL }, /* XSUM_XXH3_testdata[563] */\n    {  282, 0x0000000000000000ULL, 0x59D901EB07316669ULL }, /* XSUM_XXH3_testdata[564] */\n    {  282, 0x9E3779B185EBCA8DULL, 0xE2865EB1C796FD80ULL }, /* XSUM_XXH3_testdata[565] */\n    {  283, 0x0000000000000000ULL, 0x2FD10CEF1C56661AULL }, /* XSUM_XXH3_testdata[566] */\n    {  283, 0x9E3779B185EBCA8DULL, 0x4C551113F85ADE1EULL }, /* XSUM_XXH3_testdata[567] */\n    {  284, 0x0000000000000000ULL, 0x5E80B417D943A6D2ULL }, /* XSUM_XXH3_testdata[568] */\n    {  284, 0x9E3779B185EBCA8DULL, 0xF8CDAB4759BFEC9CULL }, /* XSUM_XXH3_testdata[569] */\n    {  285, 0x0000000000000000ULL, 0xC6499EC47E983831ULL }, /* XSUM_XXH3_testdata[570] */\n    {  285, 0x9E3779B185EBCA8DULL, 0x68A990E36FD9E7D9ULL }, /* XSUM_XXH3_testdata[571] */\n    {  286, 0x0000000000000000ULL, 0x80AF5CFF653B80C8ULL }, /* XSUM_XXH3_testdata[572] */\n    {  286, 0x9E3779B185EBCA8DULL, 0x57A7FB462EB4E44AULL }, /* XSUM_XXH3_testdata[573] */\n    {  287, 0x0000000000000000ULL, 0xFD9A5D6CB012B7CFULL }, /* XSUM_XXH3_testdata[574] */\n    {  287, 0x9E3779B185EBCA8DULL, 0x2AE096D435B28E60ULL }, /* XSUM_XXH3_testdata[575] */\n    {  288, 0x0000000000000000ULL, 0x347640D6208A9759ULL }, /* XSUM_XXH3_testdata[576] */\n    {  288, 0x9E3779B185EBCA8DULL, 0xA7E5D2D6A42CE280ULL }, /* XSUM_XXH3_testdata[577] */\n    {  289, 0x0000000000000000ULL, 0xBD78E8F346C3A6F8ULL }, /* XSUM_XXH3_testdata[578] */\n    {  289, 0x9E3779B185EBCA8DULL, 0x42C31C16CDE0CB93ULL }, /* XSUM_XXH3_testdata[579] */\n    {  290, 0x0000000000000000ULL, 0x0204AAB22D8EAA99ULL }, /* XSUM_XXH3_testdata[580] */\n    {  290, 0x9E3779B185EBCA8DULL, 0x83B99E15E752ABDAULL }, /* XSUM_XXH3_testdata[581] */\n    {  291, 0x0000000000000000ULL, 0x59131C26508F9EC8ULL }, /* XSUM_XXH3_testdata[582] */\n    {  291, 0x9E3779B185EBCA8DULL, 0x5E0AC32BE4E9D932ULL }, /* XSUM_XXH3_testdata[583] */\n    {  292, 0x0000000000000000ULL, 0x152B51807477888FULL }, /* XSUM_XXH3_testdata[584] */\n    {  292, 0x9E3779B185EBCA8DULL, 0x6B0C4D15682F3E3DULL }, /* XSUM_XXH3_testdata[585] */\n    {  293, 0x0000000000000000ULL, 0x05686974668B34F7ULL }, /* XSUM_XXH3_testdata[586] */\n    {  293, 0x9E3779B185EBCA8DULL, 0x52AE5AE6FB0817C8ULL }, /* XSUM_XXH3_testdata[587] */\n    {  294, 0x0000000000000000ULL, 0x19113494008391ABULL }, /* XSUM_XXH3_testdata[588] */\n    {  294, 0x9E3779B185EBCA8DULL, 0xE675C79778EE4793ULL }, /* XSUM_XXH3_testdata[589] */\n    {  295, 0x0000000000000000ULL, 0x3EFAC1DC10E238A4ULL }, /* XSUM_XXH3_testdata[590] */\n    {  295, 0x9E3779B185EBCA8DULL, 0xAF2BA7DCEFC70CA8ULL }, /* XSUM_XXH3_testdata[591] */\n    {  296, 0x0000000000000000ULL, 0x5F4643F3D41C8764ULL }, /* XSUM_XXH3_testdata[592] */\n    {  296, 0x9E3779B185EBCA8DULL, 0x41502D41C73D0567ULL }, /* XSUM_XXH3_testdata[593] */\n    {  297, 0x0000000000000000ULL, 0x118968A8B54B2A15ULL }, /* XSUM_XXH3_testdata[594] */\n    {  297, 0x9E3779B185EBCA8DULL, 0xA4591A1ADAB38B25ULL }, /* XSUM_XXH3_testdata[595] */\n    {  298, 0x0000000000000000ULL, 0x2B2CFEA1E201D3ACULL }, /* XSUM_XXH3_testdata[596] */\n    {  298, 0x9E3779B185EBCA8DULL, 0x3D27B64E0A4A5887ULL }, /* XSUM_XXH3_testdata[597] */\n    {  299, 0x0000000000000000ULL, 0x1AB22BB41D28E478ULL }, /* XSUM_XXH3_testdata[598] */\n    {  299, 0x9E3779B185EBCA8DULL, 0x8E0A8E8D5C430085ULL }, /* XSUM_XXH3_testdata[599] */\n    {  300, 0x0000000000000000ULL, 0x7F371220466C4A1AULL }, /* XSUM_XXH3_testdata[600] */\n    {  300, 0x9E3779B185EBCA8DULL, 0x1C886C664C4D81C4ULL }, /* XSUM_XXH3_testdata[601] */\n    {  301, 0x0000000000000000ULL, 0x69956645B30B3D03ULL }, /* XSUM_XXH3_testdata[602] */\n    {  301, 0x9E3779B185EBCA8DULL, 0xC3314BB184586528ULL }, /* XSUM_XXH3_testdata[603] */\n    {  302, 0x0000000000000000ULL, 0xC9775577787FAC4BULL }, /* XSUM_XXH3_testdata[604] */\n    {  302, 0x9E3779B185EBCA8DULL, 0x0F10E728CA0B206DULL }, /* XSUM_XXH3_testdata[605] */\n    {  303, 0x0000000000000000ULL, 0x9B88FAF2C535DB33ULL }, /* XSUM_XXH3_testdata[606] */\n    {  303, 0x9E3779B185EBCA8DULL, 0xC05073F3497D23D6ULL }, /* XSUM_XXH3_testdata[607] */\n    {  304, 0x0000000000000000ULL, 0xCB1FB32DE8603D38ULL }, /* XSUM_XXH3_testdata[608] */\n    {  304, 0x9E3779B185EBCA8DULL, 0xC932730EB0F57280ULL }, /* XSUM_XXH3_testdata[609] */\n    {  305, 0x0000000000000000ULL, 0x96C7F9915951C55FULL }, /* XSUM_XXH3_testdata[610] */\n    {  305, 0x9E3779B185EBCA8DULL, 0x099D504612C1C3D3ULL }, /* XSUM_XXH3_testdata[611] */\n    {  306, 0x0000000000000000ULL, 0x30AB2B22A729B0B0ULL }, /* XSUM_XXH3_testdata[612] */\n    {  306, 0x9E3779B185EBCA8DULL, 0x3882FFEB3971E2AAULL }, /* XSUM_XXH3_testdata[613] */\n    {  307, 0x0000000000000000ULL, 0x1203D0A98E057A63ULL }, /* XSUM_XXH3_testdata[614] */\n    {  307, 0x9E3779B185EBCA8DULL, 0xCCCC1F21C9C38955ULL }, /* XSUM_XXH3_testdata[615] */\n    {  308, 0x0000000000000000ULL, 0x5FE7A4E31AA01D1DULL }, /* XSUM_XXH3_testdata[616] */\n    {  308, 0x9E3779B185EBCA8DULL, 0x24D6AB786E6DC5DCULL }, /* XSUM_XXH3_testdata[617] */\n    {  309, 0x0000000000000000ULL, 0x61EB6DCB5461BC22ULL }, /* XSUM_XXH3_testdata[618] */\n    {  309, 0x9E3779B185EBCA8DULL, 0x829A233AB8802F5BULL }, /* XSUM_XXH3_testdata[619] */\n    {  310, 0x0000000000000000ULL, 0xC373303BCFE79C7CULL }, /* XSUM_XXH3_testdata[620] */\n    {  310, 0x9E3779B185EBCA8DULL, 0x03AF173FEE6164EEULL }, /* XSUM_XXH3_testdata[621] */\n    {  311, 0x0000000000000000ULL, 0x5D49DFEAFFEC1516ULL }, /* XSUM_XXH3_testdata[622] */\n    {  311, 0x9E3779B185EBCA8DULL, 0xF33B315CCBED8F5FULL }, /* XSUM_XXH3_testdata[623] */\n    {  312, 0x0000000000000000ULL, 0x9B69B6E825CB842EULL }, /* XSUM_XXH3_testdata[624] */\n    {  312, 0x9E3779B185EBCA8DULL, 0x641BB90692349562ULL }, /* XSUM_XXH3_testdata[625] */\n    {  313, 0x0000000000000000ULL, 0x175528876AADCD25ULL }, /* XSUM_XXH3_testdata[626] */\n    {  313, 0x9E3779B185EBCA8DULL, 0x2178617919926E81ULL }, /* XSUM_XXH3_testdata[627] */\n    {  314, 0x0000000000000000ULL, 0x760A4A825703F2EEULL }, /* XSUM_XXH3_testdata[628] */\n    {  314, 0x9E3779B185EBCA8DULL, 0xBEA3F478303CA866ULL }, /* XSUM_XXH3_testdata[629] */\n    {  315, 0x0000000000000000ULL, 0x236712F8295DC8C5ULL }, /* XSUM_XXH3_testdata[630] */\n    {  315, 0x9E3779B185EBCA8DULL, 0xECDC8B1C138EFF7CULL }, /* XSUM_XXH3_testdata[631] */\n    {  316, 0x0000000000000000ULL, 0x7E0D2210E4B43FD4ULL }, /* XSUM_XXH3_testdata[632] */\n    {  316, 0x9E3779B185EBCA8DULL, 0xCDE6DF03B9FF13A8ULL }, /* XSUM_XXH3_testdata[633] */\n    {  317, 0x0000000000000000ULL, 0x0812693CCEDB7A83ULL }, /* XSUM_XXH3_testdata[634] */\n    {  317, 0x9E3779B185EBCA8DULL, 0x6C89B1AC74E2A842ULL }, /* XSUM_XXH3_testdata[635] */\n    {  318, 0x0000000000000000ULL, 0x249F29F2EFF9128CULL }, /* XSUM_XXH3_testdata[636] */\n    {  318, 0x9E3779B185EBCA8DULL, 0xCACCB88CE9D2648AULL }, /* XSUM_XXH3_testdata[637] */\n    {  319, 0x0000000000000000ULL, 0x0FCAA9E59EC5A883ULL }, /* XSUM_XXH3_testdata[638] */\n    {  319, 0x9E3779B185EBCA8DULL, 0xDFAF7A1B8B2DB390ULL }, /* XSUM_XXH3_testdata[639] */\n    {  320, 0x0000000000000000ULL, 0x75620D350FF5C694ULL }, /* XSUM_XXH3_testdata[640] */\n    {  320, 0x9E3779B185EBCA8DULL, 0x19171DE40C928F07ULL }, /* XSUM_XXH3_testdata[641] */\n    {  321, 0x0000000000000000ULL, 0x2D8C7E2634AB900AULL }, /* XSUM_XXH3_testdata[642] */\n    {  321, 0x9E3779B185EBCA8DULL, 0x14AB0056CC187827ULL }, /* XSUM_XXH3_testdata[643] */\n    {  322, 0x0000000000000000ULL, 0xA0DDC9DC085BC472ULL }, /* XSUM_XXH3_testdata[644] */\n    {  322, 0x9E3779B185EBCA8DULL, 0x0A37284F6B829CA9ULL }, /* XSUM_XXH3_testdata[645] */\n    {  323, 0x0000000000000000ULL, 0x141D6EF253EAB278ULL }, /* XSUM_XXH3_testdata[646] */\n    {  323, 0x9E3779B185EBCA8DULL, 0xDB4E00A0E6C2440CULL }, /* XSUM_XXH3_testdata[647] */\n    {  324, 0x0000000000000000ULL, 0x46033B0653C32026ULL }, /* XSUM_XXH3_testdata[648] */\n    {  324, 0x9E3779B185EBCA8DULL, 0xF8F7E4A13FD0C762ULL }, /* XSUM_XXH3_testdata[649] */\n    {  325, 0x0000000000000000ULL, 0x9783E6F884F9C3EEULL }, /* XSUM_XXH3_testdata[650] */\n    {  325, 0x9E3779B185EBCA8DULL, 0x38FB4170FEC5D1F5ULL }, /* XSUM_XXH3_testdata[651] */\n    {  326, 0x0000000000000000ULL, 0x30D17CB374CC76A1ULL }, /* XSUM_XXH3_testdata[652] */\n    {  326, 0x9E3779B185EBCA8DULL, 0x40E89C75F444E468ULL }, /* XSUM_XXH3_testdata[653] */\n    {  327, 0x0000000000000000ULL, 0x8917F6B5E2510EF2ULL }, /* XSUM_XXH3_testdata[654] */\n    {  327, 0x9E3779B185EBCA8DULL, 0xCE4C72C7D9F66CB8ULL }, /* XSUM_XXH3_testdata[655] */\n    {  328, 0x0000000000000000ULL, 0x4A40757A80E28484ULL }, /* XSUM_XXH3_testdata[656] */\n    {  328, 0x9E3779B185EBCA8DULL, 0xBA5941F2C9148DC1ULL }, /* XSUM_XXH3_testdata[657] */\n    {  329, 0x0000000000000000ULL, 0xF8C7161544010C5AULL }, /* XSUM_XXH3_testdata[658] */\n    {  329, 0x9E3779B185EBCA8DULL, 0x24B1D84FE7244B61ULL }, /* XSUM_XXH3_testdata[659] */\n    {  330, 0x0000000000000000ULL, 0xE72B9958E036078AULL }, /* XSUM_XXH3_testdata[660] */\n    {  330, 0x9E3779B185EBCA8DULL, 0xBE30B55DC980DB1EULL }, /* XSUM_XXH3_testdata[661] */\n    {  331, 0x0000000000000000ULL, 0x442E0D1FD80248FCULL }, /* XSUM_XXH3_testdata[662] */\n    {  331, 0x9E3779B185EBCA8DULL, 0x2A6EF8B6395B6E1FULL }, /* XSUM_XXH3_testdata[663] */\n    {  332, 0x0000000000000000ULL, 0xE64066C1FEFE4314ULL }, /* XSUM_XXH3_testdata[664] */\n    {  332, 0x9E3779B185EBCA8DULL, 0xD575491B1369F423ULL }, /* XSUM_XXH3_testdata[665] */\n    {  333, 0x0000000000000000ULL, 0xF80DC8E14BBD6D07ULL }, /* XSUM_XXH3_testdata[666] */\n    {  333, 0x9E3779B185EBCA8DULL, 0x490D275952EBC0F0ULL }, /* XSUM_XXH3_testdata[667] */\n    {  334, 0x0000000000000000ULL, 0x05A390D29F6A054AULL }, /* XSUM_XXH3_testdata[668] */\n    {  334, 0x9E3779B185EBCA8DULL, 0x306CB1E3B8D155CBULL }, /* XSUM_XXH3_testdata[669] */\n    {  335, 0x0000000000000000ULL, 0xB337A624E2A2ADB0ULL }, /* XSUM_XXH3_testdata[670] */\n    {  335, 0x9E3779B185EBCA8DULL, 0xC1396645408E6BC0ULL }, /* XSUM_XXH3_testdata[671] */\n    {  336, 0x0000000000000000ULL, 0x5A38ED04BF508E7FULL }, /* XSUM_XXH3_testdata[672] */\n    {  336, 0x9E3779B185EBCA8DULL, 0x0BEA662D759BA2EDULL }, /* XSUM_XXH3_testdata[673] */\n    {  337, 0x0000000000000000ULL, 0x050BA6EB5632DB62ULL }, /* XSUM_XXH3_testdata[674] */\n    {  337, 0x9E3779B185EBCA8DULL, 0x4E862E4034934DC9ULL }, /* XSUM_XXH3_testdata[675] */\n    {  338, 0x0000000000000000ULL, 0x1811F916B865B860ULL }, /* XSUM_XXH3_testdata[676] */\n    {  338, 0x9E3779B185EBCA8DULL, 0x7BBC087180D4823FULL }, /* XSUM_XXH3_testdata[677] */\n    {  339, 0x0000000000000000ULL, 0x6690999CE07A1E8EULL }, /* XSUM_XXH3_testdata[678] */\n    {  339, 0x9E3779B185EBCA8DULL, 0xA273568067213D0DULL }, /* XSUM_XXH3_testdata[679] */\n    {  340, 0x0000000000000000ULL, 0xA351535A71F4582BULL }, /* XSUM_XXH3_testdata[680] */\n    {  340, 0x9E3779B185EBCA8DULL, 0x142398F3E722FCDBULL }, /* XSUM_XXH3_testdata[681] */\n    {  341, 0x0000000000000000ULL, 0x2ED4C42D9BF9EF7EULL }, /* XSUM_XXH3_testdata[682] */\n    {  341, 0x9E3779B185EBCA8DULL, 0x1424231A7C813FA7ULL }, /* XSUM_XXH3_testdata[683] */\n    {  342, 0x0000000000000000ULL, 0xC28197021E7B3D09ULL }, /* XSUM_XXH3_testdata[684] */\n    {  342, 0x9E3779B185EBCA8DULL, 0x3C8312E82E55D3E5ULL }, /* XSUM_XXH3_testdata[685] */\n    {  343, 0x0000000000000000ULL, 0x18AD1812D3FDBF32ULL }, /* XSUM_XXH3_testdata[686] */\n    {  343, 0x9E3779B185EBCA8DULL, 0x5E89058684C6D863ULL }, /* XSUM_XXH3_testdata[687] */\n    {  344, 0x0000000000000000ULL, 0x06F60422B9DA6E7DULL }, /* XSUM_XXH3_testdata[688] */\n    {  344, 0x9E3779B185EBCA8DULL, 0xEDFAAEC0A5BC66F9ULL }, /* XSUM_XXH3_testdata[689] */\n    {  345, 0x0000000000000000ULL, 0xC91F092A0D5BE3BEULL }, /* XSUM_XXH3_testdata[690] */\n    {  345, 0x9E3779B185EBCA8DULL, 0xA11B94283398F91DULL }, /* XSUM_XXH3_testdata[691] */\n    {  346, 0x0000000000000000ULL, 0xD4CCD2EE25CBE5B0ULL }, /* XSUM_XXH3_testdata[692] */\n    {  346, 0x9E3779B185EBCA8DULL, 0x3C81706ECA21BC7DULL }, /* XSUM_XXH3_testdata[693] */\n    {  347, 0x0000000000000000ULL, 0x6B5289DA0ACD5BBFULL }, /* XSUM_XXH3_testdata[694] */\n    {  347, 0x9E3779B185EBCA8DULL, 0x55D376673F5026AEULL }, /* XSUM_XXH3_testdata[695] */\n    {  348, 0x0000000000000000ULL, 0xE6162B73B28EB205ULL }, /* XSUM_XXH3_testdata[696] */\n    {  348, 0x9E3779B185EBCA8DULL, 0x0AAE09BDCF8FD99EULL }, /* XSUM_XXH3_testdata[697] */\n    {  349, 0x0000000000000000ULL, 0x9357F7E9DE083C47ULL }, /* XSUM_XXH3_testdata[698] */\n    {  349, 0x9E3779B185EBCA8DULL, 0xB2AD4B3CBC09451DULL }, /* XSUM_XXH3_testdata[699] */\n    {  350, 0x0000000000000000ULL, 0xD097B966C4C4E964ULL }, /* XSUM_XXH3_testdata[700] */\n    {  350, 0x9E3779B185EBCA8DULL, 0xFCDE6E432D40421CULL }, /* XSUM_XXH3_testdata[701] */\n    {  351, 0x0000000000000000ULL, 0x2F10A562E85CBED8ULL }, /* XSUM_XXH3_testdata[702] */\n    {  351, 0x9E3779B185EBCA8DULL, 0x37C28859C95AF762ULL }, /* XSUM_XXH3_testdata[703] */\n    {  352, 0x0000000000000000ULL, 0x0A72390BFB1873B9ULL }, /* XSUM_XXH3_testdata[704] */\n    {  352, 0x9E3779B185EBCA8DULL, 0xD533F779497D9415ULL }, /* XSUM_XXH3_testdata[705] */\n    {  353, 0x0000000000000000ULL, 0x7B11C6784AC00CFBULL }, /* XSUM_XXH3_testdata[706] */\n    {  353, 0x9E3779B185EBCA8DULL, 0xD9AC0BDE567EA98EULL }, /* XSUM_XXH3_testdata[707] */\n    {  354, 0x0000000000000000ULL, 0x38371A361827DDF8ULL }, /* XSUM_XXH3_testdata[708] */\n    {  354, 0x9E3779B185EBCA8DULL, 0x0F5EABDFD0AAADE5ULL }, /* XSUM_XXH3_testdata[709] */\n    {  355, 0x0000000000000000ULL, 0xFED1244A20C5D95EULL }, /* XSUM_XXH3_testdata[710] */\n    {  355, 0x9E3779B185EBCA8DULL, 0x86BAC8C9DA725C98ULL }, /* XSUM_XXH3_testdata[711] */\n    {  356, 0x0000000000000000ULL, 0x6758D5737F8EE218ULL }, /* XSUM_XXH3_testdata[712] */\n    {  356, 0x9E3779B185EBCA8DULL, 0xC7BF8A1EF7442E3AULL }, /* XSUM_XXH3_testdata[713] */\n    {  357, 0x0000000000000000ULL, 0x0A8EF0DC9CD19128ULL }, /* XSUM_XXH3_testdata[714] */\n    {  357, 0x9E3779B185EBCA8DULL, 0x89662B16B4CA80CEULL }, /* XSUM_XXH3_testdata[715] */\n    {  358, 0x0000000000000000ULL, 0x356710A360FE6D37ULL }, /* XSUM_XXH3_testdata[716] */\n    {  358, 0x9E3779B185EBCA8DULL, 0xC3DF10584D452FB5ULL }, /* XSUM_XXH3_testdata[717] */\n    {  359, 0x0000000000000000ULL, 0x689E083407BDA77AULL }, /* XSUM_XXH3_testdata[718] */\n    {  359, 0x9E3779B185EBCA8DULL, 0xB6A2FCB2E192C8BFULL }, /* XSUM_XXH3_testdata[719] */\n    {  360, 0x0000000000000000ULL, 0xE67BA7A185827EC1ULL }, /* XSUM_XXH3_testdata[720] */\n    {  360, 0x9E3779B185EBCA8DULL, 0xF8FCCE52BFC4BF16ULL }, /* XSUM_XXH3_testdata[721] */\n    {  361, 0x0000000000000000ULL, 0xF9B729ADAAD2CD4AULL }, /* XSUM_XXH3_testdata[722] */\n    {  361, 0x9E3779B185EBCA8DULL, 0xEC259DEBCE39D391ULL }, /* XSUM_XXH3_testdata[723] */\n    {  362, 0x0000000000000000ULL, 0x3E6F14A1C5714D82ULL }, /* XSUM_XXH3_testdata[724] */\n    {  362, 0x9E3779B185EBCA8DULL, 0x178E0A6F73D397C3ULL }, /* XSUM_XXH3_testdata[725] */\n    {  363, 0x0000000000000000ULL, 0xA48FD81FDF6DDFFFULL }, /* XSUM_XXH3_testdata[726] */\n    {  363, 0x9E3779B185EBCA8DULL, 0xBB2E607EB6D70F5FULL }, /* XSUM_XXH3_testdata[727] */\n    {  364, 0x0000000000000000ULL, 0xCCAAE62E73DC5F07ULL }, /* XSUM_XXH3_testdata[728] */\n    {  364, 0x9E3779B185EBCA8DULL, 0x967509C003FFCBFBULL }, /* XSUM_XXH3_testdata[729] */\n    {  365, 0x0000000000000000ULL, 0x40B4623FC1E2CCB4ULL }, /* XSUM_XXH3_testdata[730] */\n    {  365, 0x9E3779B185EBCA8DULL, 0x664821A370168EC6ULL }, /* XSUM_XXH3_testdata[731] */\n    {  366, 0x0000000000000000ULL, 0x2C07776DF175DC52ULL }, /* XSUM_XXH3_testdata[732] */\n    {  366, 0x9E3779B185EBCA8DULL, 0xA9B71EB2AB8DAE07ULL }, /* XSUM_XXH3_testdata[733] */\n    {  367, 0x0000000000000000ULL, 0x0A5E4DDBA6B9B799ULL }, /* XSUM_XXH3_testdata[734] */\n    {  367, 0x9E3779B185EBCA8DULL, 0x63BFA87876C717E1ULL }, /* XSUM_XXH3_testdata[735] */\n    {  368, 0x0000000000000000ULL, 0xEB08A13C50A28D90ULL }, /* XSUM_XXH3_testdata[736] */\n    {  368, 0x9E3779B185EBCA8DULL, 0x8D4B6207901AFE7FULL }, /* XSUM_XXH3_testdata[737] */\n    {  369, 0x0000000000000000ULL, 0x243028D92185A27FULL }, /* XSUM_XXH3_testdata[738] */\n    {  369, 0x9E3779B185EBCA8DULL, 0x188181E0EB235BEFULL }, /* XSUM_XXH3_testdata[739] */\n    {  370, 0x0000000000000000ULL, 0xB03A6034965EB95AULL }, /* XSUM_XXH3_testdata[740] */\n    {  370, 0x9E3779B185EBCA8DULL, 0x3658112343986D03ULL }, /* XSUM_XXH3_testdata[741] */\n    {  371, 0x0000000000000000ULL, 0xFDAD032ECFF8F81BULL }, /* XSUM_XXH3_testdata[742] */\n    {  371, 0x9E3779B185EBCA8DULL, 0xB7B21856F80476EAULL }, /* XSUM_XXH3_testdata[743] */\n    {  372, 0x0000000000000000ULL, 0x3DF375D22F30175EULL }, /* XSUM_XXH3_testdata[744] */\n    {  372, 0x9E3779B185EBCA8DULL, 0x895C965C270CB32EULL }, /* XSUM_XXH3_testdata[745] */\n    {  373, 0x0000000000000000ULL, 0x457A2E06A96B5EF9ULL }, /* XSUM_XXH3_testdata[746] */\n    {  373, 0x9E3779B185EBCA8DULL, 0x465C4F58755A8D6AULL }, /* XSUM_XXH3_testdata[747] */\n    {  374, 0x0000000000000000ULL, 0xF975DEE7247758C4ULL }, /* XSUM_XXH3_testdata[748] */\n    {  374, 0x9E3779B185EBCA8DULL, 0x222B1690A8184124ULL }, /* XSUM_XXH3_testdata[749] */\n    {  375, 0x0000000000000000ULL, 0x1CE867A9DD80AC40ULL }, /* XSUM_XXH3_testdata[750] */\n    {  375, 0x9E3779B185EBCA8DULL, 0xE17A6C6BD03728F8ULL }, /* XSUM_XXH3_testdata[751] */\n    {  376, 0x0000000000000000ULL, 0x8BC2341CD63EA0E2ULL }, /* XSUM_XXH3_testdata[752] */\n    {  376, 0x9E3779B185EBCA8DULL, 0xF08CA859CBF039DFULL }, /* XSUM_XXH3_testdata[753] */\n    {  377, 0x0000000000000000ULL, 0x1E23A8EC4F2C6FD0ULL }, /* XSUM_XXH3_testdata[754] */\n    {  377, 0x9E3779B185EBCA8DULL, 0x3520A61AFD050718ULL }, /* XSUM_XXH3_testdata[755] */\n    {  378, 0x0000000000000000ULL, 0x2695FDF58F22BDCFULL }, /* XSUM_XXH3_testdata[756] */\n    {  378, 0x9E3779B185EBCA8DULL, 0x00D5CD7953DFD3CEULL }, /* XSUM_XXH3_testdata[757] */\n    {  379, 0x0000000000000000ULL, 0xE9D2B64D0D9185BCULL }, /* XSUM_XXH3_testdata[758] */\n    {  379, 0x9E3779B185EBCA8DULL, 0xF5C5EFEE146FF373ULL }, /* XSUM_XXH3_testdata[759] */\n    {  380, 0x0000000000000000ULL, 0xE0040A13B2B8DE1EULL }, /* XSUM_XXH3_testdata[760] */\n    {  380, 0x9E3779B185EBCA8DULL, 0x274C9D311170A0D4ULL }, /* XSUM_XXH3_testdata[761] */\n    {  381, 0x0000000000000000ULL, 0x3CD53A3EEA1BFCCAULL }, /* XSUM_XXH3_testdata[762] */\n    {  381, 0x9E3779B185EBCA8DULL, 0x58ED6D239F63C2C2ULL }, /* XSUM_XXH3_testdata[763] */\n    {  382, 0x0000000000000000ULL, 0x58BB4C31BBD2771DULL }, /* XSUM_XXH3_testdata[764] */\n    {  382, 0x9E3779B185EBCA8DULL, 0x5F10DEFD207C6C5DULL }, /* XSUM_XXH3_testdata[765] */\n    {  383, 0x0000000000000000ULL, 0xEFF81E7006EF8ADDULL }, /* XSUM_XXH3_testdata[766] */\n    {  383, 0x9E3779B185EBCA8DULL, 0x8A9AC5D71B4A0221ULL }, /* XSUM_XXH3_testdata[767] */\n    {  384, 0x0000000000000000ULL, 0xBFA4BA14B8819D81ULL }, /* XSUM_XXH3_testdata[768] */\n    {  384, 0x9E3779B185EBCA8DULL, 0x10CABACF1434DB28ULL }, /* XSUM_XXH3_testdata[769] */\n    {  385, 0x0000000000000000ULL, 0x9C71E10B185A00BCULL }, /* XSUM_XXH3_testdata[770] */\n    {  385, 0x9E3779B185EBCA8DULL, 0x04E7D79392ED571BULL }, /* XSUM_XXH3_testdata[771] */\n    {  386, 0x0000000000000000ULL, 0x973F73776BD1E095ULL }, /* XSUM_XXH3_testdata[772] */\n    {  386, 0x9E3779B185EBCA8DULL, 0xD83E09472C25BB0AULL }, /* XSUM_XXH3_testdata[773] */\n    {  387, 0x0000000000000000ULL, 0x5B40DFCCAD16CE4DULL }, /* XSUM_XXH3_testdata[774] */\n    {  387, 0x9E3779B185EBCA8DULL, 0x86E3EBBCBC2AB1ACULL }, /* XSUM_XXH3_testdata[775] */\n    {  388, 0x0000000000000000ULL, 0x0C8FC0CB7907B1C7ULL }, /* XSUM_XXH3_testdata[776] */\n    {  388, 0x9E3779B185EBCA8DULL, 0xD4D858791A82B65BULL }, /* XSUM_XXH3_testdata[777] */\n    {  389, 0x0000000000000000ULL, 0x819B7162F492B772ULL }, /* XSUM_XXH3_testdata[778] */\n    {  389, 0x9E3779B185EBCA8DULL, 0x728977393847BE8EULL }, /* XSUM_XXH3_testdata[779] */\n    {  390, 0x0000000000000000ULL, 0x5C15DB645CF180EDULL }, /* XSUM_XXH3_testdata[780] */\n    {  390, 0x9E3779B185EBCA8DULL, 0x292F3F07CCE6C3D6ULL }, /* XSUM_XXH3_testdata[781] */\n    {  391, 0x0000000000000000ULL, 0x8F62CCED6640F4EAULL }, /* XSUM_XXH3_testdata[782] */\n    {  391, 0x9E3779B185EBCA8DULL, 0x686F156F45F4566EULL }, /* XSUM_XXH3_testdata[783] */\n    {  392, 0x0000000000000000ULL, 0xEF4815662FD37717ULL }, /* XSUM_XXH3_testdata[784] */\n    {  392, 0x9E3779B185EBCA8DULL, 0xA6160EC75886933CULL }, /* XSUM_XXH3_testdata[785] */\n    {  393, 0x0000000000000000ULL, 0xC75EA17287C05EC1ULL }, /* XSUM_XXH3_testdata[786] */\n    {  393, 0x9E3779B185EBCA8DULL, 0xB2CDCFE8958ACCBAULL }, /* XSUM_XXH3_testdata[787] */\n    {  394, 0x0000000000000000ULL, 0x38369087E260FDD5ULL }, /* XSUM_XXH3_testdata[788] */\n    {  394, 0x9E3779B185EBCA8DULL, 0xF739CEEF793B6AD9ULL }, /* XSUM_XXH3_testdata[789] */\n    {  395, 0x0000000000000000ULL, 0xA002E75BA958F3ABULL }, /* XSUM_XXH3_testdata[790] */\n    {  395, 0x9E3779B185EBCA8DULL, 0x00148733D393906FULL }, /* XSUM_XXH3_testdata[791] */\n    {  396, 0x0000000000000000ULL, 0xD38FF0C18C469384ULL }, /* XSUM_XXH3_testdata[792] */\n    {  396, 0x9E3779B185EBCA8DULL, 0x03E1D3CAD75D86E8ULL }, /* XSUM_XXH3_testdata[793] */\n    {  397, 0x0000000000000000ULL, 0x8E724CDB123B0F76ULL }, /* XSUM_XXH3_testdata[794] */\n    {  397, 0x9E3779B185EBCA8DULL, 0xB8BA0BF9A6B82F34ULL }, /* XSUM_XXH3_testdata[795] */\n    {  398, 0x0000000000000000ULL, 0x84B3C899F7AC4965ULL }, /* XSUM_XXH3_testdata[796] */\n    {  398, 0x9E3779B185EBCA8DULL, 0x6670B58B7F0CDE77ULL }, /* XSUM_XXH3_testdata[797] */\n    {  399, 0x0000000000000000ULL, 0x45A2DB2DCCC36D0AULL }, /* XSUM_XXH3_testdata[798] */\n    {  399, 0x9E3779B185EBCA8DULL, 0xCAE4E40D9EE9667EULL }, /* XSUM_XXH3_testdata[799] */\n    {  400, 0x0000000000000000ULL, 0xFE72257EB83FE803ULL }, /* XSUM_XXH3_testdata[800] */\n    {  400, 0x9E3779B185EBCA8DULL, 0x70703E5792C59B52ULL }, /* XSUM_XXH3_testdata[801] */\n    {  401, 0x0000000000000000ULL, 0x3D8B47914B075022ULL }, /* XSUM_XXH3_testdata[802] */\n    {  401, 0x9E3779B185EBCA8DULL, 0xFC91804BC832CDCCULL }, /* XSUM_XXH3_testdata[803] */\n    {  402, 0x0000000000000000ULL, 0xABEF11224F231FB9ULL }, /* XSUM_XXH3_testdata[804] */\n    {  402, 0x9E3779B185EBCA8DULL, 0x9846605865B48634ULL }, /* XSUM_XXH3_testdata[805] */\n    {  403, 0x0000000000000000ULL, 0xCDEB804D65C6DEA4ULL }, /* XSUM_XXH3_testdata[806] */\n    {  403, 0x9E3779B185EBCA8DULL, 0x6259F6ECFD6443FDULL }, /* XSUM_XXH3_testdata[807] */\n    {  404, 0x0000000000000000ULL, 0x31FD8D78674068E6ULL }, /* XSUM_XXH3_testdata[808] */\n    {  404, 0x9E3779B185EBCA8DULL, 0x9EBB2664037CB2E7ULL }, /* XSUM_XXH3_testdata[809] */\n    {  405, 0x0000000000000000ULL, 0x4C5D6FBB720EA4E5ULL }, /* XSUM_XXH3_testdata[810] */\n    {  405, 0x9E3779B185EBCA8DULL, 0xEFD0A92560F75477ULL }, /* XSUM_XXH3_testdata[811] */\n    {  406, 0x0000000000000000ULL, 0xCDA5AB92635D07D6ULL }, /* XSUM_XXH3_testdata[812] */\n    {  406, 0x9E3779B185EBCA8DULL, 0xC1E33EBC893925ABULL }, /* XSUM_XXH3_testdata[813] */\n    {  407, 0x0000000000000000ULL, 0x6D8FA971FA046171ULL }, /* XSUM_XXH3_testdata[814] */\n    {  407, 0x9E3779B185EBCA8DULL, 0x4663687A434D08D7ULL }, /* XSUM_XXH3_testdata[815] */\n    {  408, 0x0000000000000000ULL, 0x65D015B8B40535F6ULL }, /* XSUM_XXH3_testdata[816] */\n    {  408, 0x9E3779B185EBCA8DULL, 0xA53ABE5EB64DF88AULL }, /* XSUM_XXH3_testdata[817] */\n    {  409, 0x0000000000000000ULL, 0x191E9B04AFBF9592ULL }, /* XSUM_XXH3_testdata[818] */\n    {  409, 0x9E3779B185EBCA8DULL, 0x9A0403349926D4C3ULL }, /* XSUM_XXH3_testdata[819] */\n    {  410, 0x0000000000000000ULL, 0x6E19D5D185218E5EULL }, /* XSUM_XXH3_testdata[820] */\n    {  410, 0x9E3779B185EBCA8DULL, 0x4ABD4B9474C3F244ULL }, /* XSUM_XXH3_testdata[821] */\n    {  411, 0x0000000000000000ULL, 0xBD9ABCF40761A552ULL }, /* XSUM_XXH3_testdata[822] */\n    {  411, 0x9E3779B185EBCA8DULL, 0x04D39E24EDF5A1F2ULL }, /* XSUM_XXH3_testdata[823] */\n    {  412, 0x0000000000000000ULL, 0xE0B2A8EB2FF315E1ULL }, /* XSUM_XXH3_testdata[824] */\n    {  412, 0x9E3779B185EBCA8DULL, 0xE1DE2A762EB136EFULL }, /* XSUM_XXH3_testdata[825] */\n    {  413, 0x0000000000000000ULL, 0x56FA90C681958CA8ULL }, /* XSUM_XXH3_testdata[826] */\n    {  413, 0x9E3779B185EBCA8DULL, 0x166194994BD30447ULL }, /* XSUM_XXH3_testdata[827] */\n    {  414, 0x0000000000000000ULL, 0x3623BFBB213985E6ULL }, /* XSUM_XXH3_testdata[828] */\n    {  414, 0x9E3779B185EBCA8DULL, 0x8850D31DF9B93187ULL }, /* XSUM_XXH3_testdata[829] */\n    {  415, 0x0000000000000000ULL, 0xE09B132B8B7F3B81ULL }, /* XSUM_XXH3_testdata[830] */\n    {  415, 0x9E3779B185EBCA8DULL, 0xE0BA8BE7090D7EC4ULL }, /* XSUM_XXH3_testdata[831] */\n    {  416, 0x0000000000000000ULL, 0x58ED1148D17FD5B0ULL }, /* XSUM_XXH3_testdata[832] */\n    {  416, 0x9E3779B185EBCA8DULL, 0x1419610BC97E45DBULL }, /* XSUM_XXH3_testdata[833] */\n    {  417, 0x0000000000000000ULL, 0x7692303E4C6EBBCBULL }, /* XSUM_XXH3_testdata[834] */\n    {  417, 0x9E3779B185EBCA8DULL, 0x8656C4A593876D39ULL }, /* XSUM_XXH3_testdata[835] */\n    {  418, 0x0000000000000000ULL, 0x9C3A84CCA97AF51BULL }, /* XSUM_XXH3_testdata[836] */\n    {  418, 0x9E3779B185EBCA8DULL, 0xAAC65129D16BA2F2ULL }, /* XSUM_XXH3_testdata[837] */\n    {  419, 0x0000000000000000ULL, 0x9BC1DB1F1F2DAC58ULL }, /* XSUM_XXH3_testdata[838] */\n    {  419, 0x9E3779B185EBCA8DULL, 0x43F1C55F8899EBF8ULL }, /* XSUM_XXH3_testdata[839] */\n    {  420, 0x0000000000000000ULL, 0x43B08566487BCC11ULL }, /* XSUM_XXH3_testdata[840] */\n    {  420, 0x9E3779B185EBCA8DULL, 0x594FCB76CF4F675CULL }, /* XSUM_XXH3_testdata[841] */\n    {  421, 0x0000000000000000ULL, 0x10865DE3AC70A56FULL }, /* XSUM_XXH3_testdata[842] */\n    {  421, 0x9E3779B185EBCA8DULL, 0x446A962722657007ULL }, /* XSUM_XXH3_testdata[843] */\n    {  422, 0x0000000000000000ULL, 0x7EB63CE889495361ULL }, /* XSUM_XXH3_testdata[844] */\n    {  422, 0x9E3779B185EBCA8DULL, 0xEACD288521441B28ULL }, /* XSUM_XXH3_testdata[845] */\n    {  423, 0x0000000000000000ULL, 0xFF15414E6B63375CULL }, /* XSUM_XXH3_testdata[846] */\n    {  423, 0x9E3779B185EBCA8DULL, 0xCFC85AFD75504C0AULL }, /* XSUM_XXH3_testdata[847] */\n    {  424, 0x0000000000000000ULL, 0x817BF4D37E8C0B65ULL }, /* XSUM_XXH3_testdata[848] */\n    {  424, 0x9E3779B185EBCA8DULL, 0x43CCC1F8DA0619C6ULL }, /* XSUM_XXH3_testdata[849] */\n    {  425, 0x0000000000000000ULL, 0x2C89A0ED03199F8CULL }, /* XSUM_XXH3_testdata[850] */\n    {  425, 0x9E3779B185EBCA8DULL, 0x857765D17605164CULL }, /* XSUM_XXH3_testdata[851] */\n    {  426, 0x0000000000000000ULL, 0xF230464BB98EDC3BULL }, /* XSUM_XXH3_testdata[852] */\n    {  426, 0x9E3779B185EBCA8DULL, 0xBF929B79F25B4809ULL }, /* XSUM_XXH3_testdata[853] */\n    {  427, 0x0000000000000000ULL, 0xA2A423B19E704FABULL }, /* XSUM_XXH3_testdata[854] */\n    {  427, 0x9E3779B185EBCA8DULL, 0x3ED7F4BF67A5C831ULL }, /* XSUM_XXH3_testdata[855] */\n    {  428, 0x0000000000000000ULL, 0x9AFB077F996B7613ULL }, /* XSUM_XXH3_testdata[856] */\n    {  428, 0x9E3779B185EBCA8DULL, 0x1549BE27144F50A1ULL }, /* XSUM_XXH3_testdata[857] */\n    {  429, 0x0000000000000000ULL, 0x9D47BF94445A3213ULL }, /* XSUM_XXH3_testdata[858] */\n    {  429, 0x9E3779B185EBCA8DULL, 0xF746039AC39675AEULL }, /* XSUM_XXH3_testdata[859] */\n    {  430, 0x0000000000000000ULL, 0xE9C48257D575B8CEULL }, /* XSUM_XXH3_testdata[860] */\n    {  430, 0x9E3779B185EBCA8DULL, 0x45D0EA104A11D392ULL }, /* XSUM_XXH3_testdata[861] */\n    {  431, 0x0000000000000000ULL, 0x6F79AE872AC2F64CULL }, /* XSUM_XXH3_testdata[862] */\n    {  431, 0x9E3779B185EBCA8DULL, 0x905C53D2BF759D9AULL }, /* XSUM_XXH3_testdata[863] */\n    {  432, 0x0000000000000000ULL, 0x2F3209EA7B782DC2ULL }, /* XSUM_XXH3_testdata[864] */\n    {  432, 0x9E3779B185EBCA8DULL, 0x9A4BE7D1E0A85C15ULL }, /* XSUM_XXH3_testdata[865] */\n    {  433, 0x0000000000000000ULL, 0x8DE541AFDA73B1B1ULL }, /* XSUM_XXH3_testdata[866] */\n    {  433, 0x9E3779B185EBCA8DULL, 0x6C2B360F7791F77FULL }, /* XSUM_XXH3_testdata[867] */\n    {  434, 0x0000000000000000ULL, 0x09D24711A5DA385BULL }, /* XSUM_XXH3_testdata[868] */\n    {  434, 0x9E3779B185EBCA8DULL, 0x5030A098EF830C27ULL }, /* XSUM_XXH3_testdata[869] */\n    {  435, 0x0000000000000000ULL, 0x2127D7E8E4E79978ULL }, /* XSUM_XXH3_testdata[870] */\n    {  435, 0x9E3779B185EBCA8DULL, 0xA5D29C2D0876F429ULL }, /* XSUM_XXH3_testdata[871] */\n    {  436, 0x0000000000000000ULL, 0x7EB98ACB0AB2C56DULL }, /* XSUM_XXH3_testdata[872] */\n    {  436, 0x9E3779B185EBCA8DULL, 0xBE084C3BAFAC5EA2ULL }, /* XSUM_XXH3_testdata[873] */\n    {  437, 0x0000000000000000ULL, 0x2140A7FD78990231ULL }, /* XSUM_XXH3_testdata[874] */\n    {  437, 0x9E3779B185EBCA8DULL, 0x42E35A4458568455ULL }, /* XSUM_XXH3_testdata[875] */\n    {  438, 0x0000000000000000ULL, 0x970A8482BCB629C5ULL }, /* XSUM_XXH3_testdata[876] */\n    {  438, 0x9E3779B185EBCA8DULL, 0x73A540D66204C2A4ULL }, /* XSUM_XXH3_testdata[877] */\n    {  439, 0x0000000000000000ULL, 0x692EA222FBE72AEDULL }, /* XSUM_XXH3_testdata[878] */\n    {  439, 0x9E3779B185EBCA8DULL, 0x2E3F726921308EB9ULL }, /* XSUM_XXH3_testdata[879] */\n    {  440, 0x0000000000000000ULL, 0x6CC17B0280576E1CULL }, /* XSUM_XXH3_testdata[880] */\n    {  440, 0x9E3779B185EBCA8DULL, 0xB1434D3CDDDCEFDAULL }, /* XSUM_XXH3_testdata[881] */\n    {  441, 0x0000000000000000ULL, 0x6FADB76E8BB1DFD9ULL }, /* XSUM_XXH3_testdata[882] */\n    {  441, 0x9E3779B185EBCA8DULL, 0x60760B3FD4F72780ULL }, /* XSUM_XXH3_testdata[883] */\n    {  442, 0x0000000000000000ULL, 0x8F0AD64BD811D908ULL }, /* XSUM_XXH3_testdata[884] */\n    {  442, 0x9E3779B185EBCA8DULL, 0x6864251320FDFCFEULL }, /* XSUM_XXH3_testdata[885] */\n    {  443, 0x0000000000000000ULL, 0xA5470A2ADAC472C9ULL }, /* XSUM_XXH3_testdata[886] */\n    {  443, 0x9E3779B185EBCA8DULL, 0x15C21C58E17003B6ULL }, /* XSUM_XXH3_testdata[887] */\n    {  444, 0x0000000000000000ULL, 0x8FC224C40EC49D28ULL }, /* XSUM_XXH3_testdata[888] */\n    {  444, 0x9E3779B185EBCA8DULL, 0x2C1EEF8E4007C6B0ULL }, /* XSUM_XXH3_testdata[889] */\n    {  445, 0x0000000000000000ULL, 0xDCBA55F9F43377DCULL }, /* XSUM_XXH3_testdata[890] */\n    {  445, 0x9E3779B185EBCA8DULL, 0x32ED9F8013B53EF8ULL }, /* XSUM_XXH3_testdata[891] */\n    {  446, 0x0000000000000000ULL, 0x551BC6C0D60451EFULL }, /* XSUM_XXH3_testdata[892] */\n    {  446, 0x9E3779B185EBCA8DULL, 0xA0816EA37EC52357ULL }, /* XSUM_XXH3_testdata[893] */\n    {  447, 0x0000000000000000ULL, 0x1DC9B62A18B3C8F9ULL }, /* XSUM_XXH3_testdata[894] */\n    {  447, 0x9E3779B185EBCA8DULL, 0xF9A3B4DAD6BAFCD2ULL }, /* XSUM_XXH3_testdata[895] */\n    {  448, 0x0000000000000000ULL, 0xCBB14EA4B925B28EULL }, /* XSUM_XXH3_testdata[896] */\n    {  448, 0x9E3779B185EBCA8DULL, 0x4E1F337F772EA804ULL }, /* XSUM_XXH3_testdata[897] */\n    {  449, 0x0000000000000000ULL, 0x1204E7DA3777E3F0ULL }, /* XSUM_XXH3_testdata[898] */\n    {  449, 0x9E3779B185EBCA8DULL, 0xC2B8D68EF0F24196ULL }, /* XSUM_XXH3_testdata[899] */\n    {  450, 0x0000000000000000ULL, 0x30F95E9006D65F68ULL }, /* XSUM_XXH3_testdata[900] */\n    {  450, 0x9E3779B185EBCA8DULL, 0x83A805BD09941B9AULL }, /* XSUM_XXH3_testdata[901] */\n    {  451, 0x0000000000000000ULL, 0x81F603B9628E8292ULL }, /* XSUM_XXH3_testdata[902] */\n    {  451, 0x9E3779B185EBCA8DULL, 0xAC92C1D2B3A4CCCDULL }, /* XSUM_XXH3_testdata[903] */\n    {  452, 0x0000000000000000ULL, 0xD422314982847B14ULL }, /* XSUM_XXH3_testdata[904] */\n    {  452, 0x9E3779B185EBCA8DULL, 0x69FFB99A51FD2A7FULL }, /* XSUM_XXH3_testdata[905] */\n    {  453, 0x0000000000000000ULL, 0x8F457C62ECE0AF36ULL }, /* XSUM_XXH3_testdata[906] */\n    {  453, 0x9E3779B185EBCA8DULL, 0x7A8A9DA647B54209ULL }, /* XSUM_XXH3_testdata[907] */\n    {  454, 0x0000000000000000ULL, 0x657580AF76460CA5ULL }, /* XSUM_XXH3_testdata[908] */\n    {  454, 0x9E3779B185EBCA8DULL, 0x9C7F4A11F01617F5ULL }, /* XSUM_XXH3_testdata[909] */\n    {  455, 0x0000000000000000ULL, 0x471B30BFD9213CD2ULL }, /* XSUM_XXH3_testdata[910] */\n    {  455, 0x9E3779B185EBCA8DULL, 0x3791406C5DE1DD68ULL }, /* XSUM_XXH3_testdata[911] */\n    {  456, 0x0000000000000000ULL, 0x4F815C9C87995778ULL }, /* XSUM_XXH3_testdata[912] */\n    {  456, 0x9E3779B185EBCA8DULL, 0x58B35D938C1F53CAULL }, /* XSUM_XXH3_testdata[913] */\n    {  457, 0x0000000000000000ULL, 0x85D3E3AFB3451E9CULL }, /* XSUM_XXH3_testdata[914] */\n    {  457, 0x9E3779B185EBCA8DULL, 0xF4BE2D5E9D6E6B21ULL }, /* XSUM_XXH3_testdata[915] */\n    {  458, 0x0000000000000000ULL, 0x75F5CD8DFB9AD755ULL }, /* XSUM_XXH3_testdata[916] */\n    {  458, 0x9E3779B185EBCA8DULL, 0xA8FEA2F2B1012E31ULL }, /* XSUM_XXH3_testdata[917] */\n    {  459, 0x0000000000000000ULL, 0xACFACC0109E7B2ADULL }, /* XSUM_XXH3_testdata[918] */\n    {  459, 0x9E3779B185EBCA8DULL, 0x5C7318DA5E667A88ULL }, /* XSUM_XXH3_testdata[919] */\n    {  460, 0x0000000000000000ULL, 0x52FAAE91FB875AB9ULL }, /* XSUM_XXH3_testdata[920] */\n    {  460, 0x9E3779B185EBCA8DULL, 0xD675FF2127E59493ULL }, /* XSUM_XXH3_testdata[921] */\n    {  461, 0x0000000000000000ULL, 0x547E13490C95E75AULL }, /* XSUM_XXH3_testdata[922] */\n    {  461, 0x9E3779B185EBCA8DULL, 0x712CE8537166A856ULL }, /* XSUM_XXH3_testdata[923] */\n    {  462, 0x0000000000000000ULL, 0x72CF15CFAEFD5200ULL }, /* XSUM_XXH3_testdata[924] */\n    {  462, 0x9E3779B185EBCA8DULL, 0x2D4C4326518A767BULL }, /* XSUM_XXH3_testdata[925] */\n    {  463, 0x0000000000000000ULL, 0x2D7C641C000C8F93ULL }, /* XSUM_XXH3_testdata[926] */\n    {  463, 0x9E3779B185EBCA8DULL, 0xE08B26D522C9541BULL }, /* XSUM_XXH3_testdata[927] */\n    {  464, 0x0000000000000000ULL, 0xA779170A3A016B5BULL }, /* XSUM_XXH3_testdata[928] */\n    {  464, 0x9E3779B185EBCA8DULL, 0xFE30CD988EA1BD7EULL }, /* XSUM_XXH3_testdata[929] */\n    {  465, 0x0000000000000000ULL, 0x82D6577E2DD44946ULL }, /* XSUM_XXH3_testdata[930] */\n    {  465, 0x9E3779B185EBCA8DULL, 0xEE89A34CB86CFC63ULL }, /* XSUM_XXH3_testdata[931] */\n    {  466, 0x0000000000000000ULL, 0x7A538D4BF06B3529ULL }, /* XSUM_XXH3_testdata[932] */\n    {  466, 0x9E3779B185EBCA8DULL, 0x3DA22BE4D85CE818ULL }, /* XSUM_XXH3_testdata[933] */\n    {  467, 0x0000000000000000ULL, 0x7F5638FD02E586D9ULL }, /* XSUM_XXH3_testdata[934] */\n    {  467, 0x9E3779B185EBCA8DULL, 0x5A4F312059334990ULL }, /* XSUM_XXH3_testdata[935] */\n    {  468, 0x0000000000000000ULL, 0xFCFDBCCF4C625BD1ULL }, /* XSUM_XXH3_testdata[936] */\n    {  468, 0x9E3779B185EBCA8DULL, 0xAA255B5CF577171BULL }, /* XSUM_XXH3_testdata[937] */\n    {  469, 0x0000000000000000ULL, 0xACC4CE635F59D564ULL }, /* XSUM_XXH3_testdata[938] */\n    {  469, 0x9E3779B185EBCA8DULL, 0xBA1277E16F3D0F7EULL }, /* XSUM_XXH3_testdata[939] */\n    {  470, 0x0000000000000000ULL, 0xAF32C3D3E5C96826ULL }, /* XSUM_XXH3_testdata[940] */\n    {  470, 0x9E3779B185EBCA8DULL, 0xB5902BA4883A0AC7ULL }, /* XSUM_XXH3_testdata[941] */\n    {  471, 0x0000000000000000ULL, 0x2A549F3506C157F7ULL }, /* XSUM_XXH3_testdata[942] */\n    {  471, 0x9E3779B185EBCA8DULL, 0x19107317BB46B43FULL }, /* XSUM_XXH3_testdata[943] */\n    {  472, 0x0000000000000000ULL, 0x5E13DB5A6EC9AC17ULL }, /* XSUM_XXH3_testdata[944] */\n    {  472, 0x9E3779B185EBCA8DULL, 0x96D80A21750B1B90ULL }, /* XSUM_XXH3_testdata[945] */\n    {  473, 0x0000000000000000ULL, 0x4BFB3C69FCEECE7FULL }, /* XSUM_XXH3_testdata[946] */\n    {  473, 0x9E3779B185EBCA8DULL, 0x7DE8627EB0718D81ULL }, /* XSUM_XXH3_testdata[947] */\n    {  474, 0x0000000000000000ULL, 0x16D6CD341FE6C64EULL }, /* XSUM_XXH3_testdata[948] */\n    {  474, 0x9E3779B185EBCA8DULL, 0x2D862EA0AE3A8DBDULL }, /* XSUM_XXH3_testdata[949] */\n    {  475, 0x0000000000000000ULL, 0xDB59963FF1FC1465ULL }, /* XSUM_XXH3_testdata[950] */\n    {  475, 0x9E3779B185EBCA8DULL, 0x300D11B3F436F442ULL }, /* XSUM_XXH3_testdata[951] */\n    {  476, 0x0000000000000000ULL, 0x4A76BE44A1317EA8ULL }, /* XSUM_XXH3_testdata[952] */\n    {  476, 0x9E3779B185EBCA8DULL, 0x22D425519D2A32B6ULL }, /* XSUM_XXH3_testdata[953] */\n    {  477, 0x0000000000000000ULL, 0x66B195B99D35E394ULL }, /* XSUM_XXH3_testdata[954] */\n    {  477, 0x9E3779B185EBCA8DULL, 0x81E74D402EE78D93ULL }, /* XSUM_XXH3_testdata[955] */\n    {  478, 0x0000000000000000ULL, 0x0C920F66078C27A8ULL }, /* XSUM_XXH3_testdata[956] */\n    {  478, 0x9E3779B185EBCA8DULL, 0xA8FE3B7613D9DBBBULL }, /* XSUM_XXH3_testdata[957] */\n    {  479, 0x0000000000000000ULL, 0x0C10DDBEDF0F68FEULL }, /* XSUM_XXH3_testdata[958] */\n    {  479, 0x9E3779B185EBCA8DULL, 0xF35D3280A168FC1CULL }, /* XSUM_XXH3_testdata[959] */\n    {  480, 0x0000000000000000ULL, 0xB2A644E90D66B68AULL }, /* XSUM_XXH3_testdata[960] */\n    {  480, 0x9E3779B185EBCA8DULL, 0x1BEC09D4C1FAFE29ULL }, /* XSUM_XXH3_testdata[961] */\n    {  481, 0x0000000000000000ULL, 0x37CF71FFFAA3DB8EULL }, /* XSUM_XXH3_testdata[962] */\n    {  481, 0x9E3779B185EBCA8DULL, 0xC25B65F5CCC72AE6ULL }, /* XSUM_XXH3_testdata[963] */\n    {  482, 0x0000000000000000ULL, 0x04357549339CBEB2ULL }, /* XSUM_XXH3_testdata[964] */\n    {  482, 0x9E3779B185EBCA8DULL, 0x47CE0A0A7B8CFB40ULL }, /* XSUM_XXH3_testdata[965] */\n    {  483, 0x0000000000000000ULL, 0x90B090913EEBFB2BULL }, /* XSUM_XXH3_testdata[966] */\n    {  483, 0x9E3779B185EBCA8DULL, 0xF2F1E5793864A111ULL }, /* XSUM_XXH3_testdata[967] */\n    {  484, 0x0000000000000000ULL, 0x37664441826F862BULL }, /* XSUM_XXH3_testdata[968] */\n    {  484, 0x9E3779B185EBCA8DULL, 0xA804820D478313ABULL }, /* XSUM_XXH3_testdata[969] */\n    {  485, 0x0000000000000000ULL, 0x6D910B2F3066BB50ULL }, /* XSUM_XXH3_testdata[970] */\n    {  485, 0x9E3779B185EBCA8DULL, 0x8F90C3511B256A6EULL }, /* XSUM_XXH3_testdata[971] */\n    {  486, 0x0000000000000000ULL, 0x86CE5E6EA6F98C28ULL }, /* XSUM_XXH3_testdata[972] */\n    {  486, 0x9E3779B185EBCA8DULL, 0xB35AD59403FDED90ULL }, /* XSUM_XXH3_testdata[973] */\n    {  487, 0x0000000000000000ULL, 0x2C99E1392A36DF28ULL }, /* XSUM_XXH3_testdata[974] */\n    {  487, 0x9E3779B185EBCA8DULL, 0x0A877CFAA0803A37ULL }, /* XSUM_XXH3_testdata[975] */\n    {  488, 0x0000000000000000ULL, 0x108C4CB805213EEAULL }, /* XSUM_XXH3_testdata[976] */\n    {  488, 0x9E3779B185EBCA8DULL, 0x8D7E49020FBC0021ULL }, /* XSUM_XXH3_testdata[977] */\n    {  489, 0x0000000000000000ULL, 0x8F53B54D164A815AULL }, /* XSUM_XXH3_testdata[978] */\n    {  489, 0x9E3779B185EBCA8DULL, 0xCC1DDAB79D352C8EULL }, /* XSUM_XXH3_testdata[979] */\n    {  490, 0x0000000000000000ULL, 0x601AE9308B2F65C0ULL }, /* XSUM_XXH3_testdata[980] */\n    {  490, 0x9E3779B185EBCA8DULL, 0xF977A75FBEEF07C0ULL }, /* XSUM_XXH3_testdata[981] */\n    {  491, 0x0000000000000000ULL, 0xC3BD335D6F4D7E2CULL }, /* XSUM_XXH3_testdata[982] */\n    {  491, 0x9E3779B185EBCA8DULL, 0x3BE1894D59B97DF5ULL }, /* XSUM_XXH3_testdata[983] */\n    {  492, 0x0000000000000000ULL, 0x6EE462A1F4F6A75FULL }, /* XSUM_XXH3_testdata[984] */\n    {  492, 0x9E3779B185EBCA8DULL, 0x639C27C90261E018ULL }, /* XSUM_XXH3_testdata[985] */\n    {  493, 0x0000000000000000ULL, 0xFB89382799CE1D19ULL }, /* XSUM_XXH3_testdata[986] */\n    {  493, 0x9E3779B185EBCA8DULL, 0x5ACF651002134352ULL }, /* XSUM_XXH3_testdata[987] */\n    {  494, 0x0000000000000000ULL, 0xE5126B06554B1262ULL }, /* XSUM_XXH3_testdata[988] */\n    {  494, 0x9E3779B185EBCA8DULL, 0x61FE12C33EFD590FULL }, /* XSUM_XXH3_testdata[989] */\n    {  495, 0x0000000000000000ULL, 0x0C1C2EF59CD4710BULL }, /* XSUM_XXH3_testdata[990] */\n    {  495, 0x9E3779B185EBCA8DULL, 0xDFA65EF745749DF3ULL }, /* XSUM_XXH3_testdata[991] */\n    {  496, 0x0000000000000000ULL, 0x01720698FF6887B5ULL }, /* XSUM_XXH3_testdata[992] */\n    {  496, 0x9E3779B185EBCA8DULL, 0x830FCACF8532CA2FULL }, /* XSUM_XXH3_testdata[993] */\n    {  497, 0x0000000000000000ULL, 0x9163F218B8DB7CE8ULL }, /* XSUM_XXH3_testdata[994] */\n    {  497, 0x9E3779B185EBCA8DULL, 0x00294873E8062E82ULL }, /* XSUM_XXH3_testdata[995] */\n    {  498, 0x0000000000000000ULL, 0xE847DF198ADDF0B5ULL }, /* XSUM_XXH3_testdata[996] */\n    {  498, 0x9E3779B185EBCA8DULL, 0x6BBCFBF57ED078E1ULL }, /* XSUM_XXH3_testdata[997] */\n    {  499, 0x0000000000000000ULL, 0xB03C576F748BD8ABULL }, /* XSUM_XXH3_testdata[998] */\n    {  499, 0x9E3779B185EBCA8DULL, 0x1128A0882B31D65DULL }, /* XSUM_XXH3_testdata[999] */\n    {  500, 0x0000000000000000ULL, 0xEF35ACEB3B341A05ULL }, /* XSUM_XXH3_testdata[1000] */\n    {  500, 0x9E3779B185EBCA8DULL, 0x0A70F89473B2E134ULL }, /* XSUM_XXH3_testdata[1001] */\n    {  501, 0x0000000000000000ULL, 0x51D54B811465F86AULL }, /* XSUM_XXH3_testdata[1002] */\n    {  501, 0x9E3779B185EBCA8DULL, 0x5C628FAAC61E981EULL }, /* XSUM_XXH3_testdata[1003] */\n    {  502, 0x0000000000000000ULL, 0xC532F6A413F0E42CULL }, /* XSUM_XXH3_testdata[1004] */\n    {  502, 0x9E3779B185EBCA8DULL, 0x69A13F41C275C165ULL }, /* XSUM_XXH3_testdata[1005] */\n    {  503, 0x0000000000000000ULL, 0xF61FB7AC0A4FC5C2ULL }, /* XSUM_XXH3_testdata[1006] */\n    {  503, 0x9E3779B185EBCA8DULL, 0xB46D36F91993597CULL }, /* XSUM_XXH3_testdata[1007] */\n    {  504, 0x0000000000000000ULL, 0x7442F18AC6D61B1DULL }, /* XSUM_XXH3_testdata[1008] */\n    {  504, 0x9E3779B185EBCA8DULL, 0x4853942F88841332ULL }, /* XSUM_XXH3_testdata[1009] */\n    {  505, 0x0000000000000000ULL, 0xF3FF1DE56CF1CAD9ULL }, /* XSUM_XXH3_testdata[1010] */\n    {  505, 0x9E3779B185EBCA8DULL, 0x4710E442BEAC49C7ULL }, /* XSUM_XXH3_testdata[1011] */\n    {  506, 0x0000000000000000ULL, 0xF1D2DF0316771A7CULL }, /* XSUM_XXH3_testdata[1012] */\n    {  506, 0x9E3779B185EBCA8DULL, 0x455B6CEC8F1E8350ULL }, /* XSUM_XXH3_testdata[1013] */\n    {  507, 0x0000000000000000ULL, 0x5C05AD7DBF2A4547ULL }, /* XSUM_XXH3_testdata[1014] */\n    {  507, 0x9E3779B185EBCA8DULL, 0x184B4C63C3A00D02ULL }, /* XSUM_XXH3_testdata[1015] */\n    {  508, 0x0000000000000000ULL, 0x365199C55EAAD05BULL }, /* XSUM_XXH3_testdata[1016] */\n    {  508, 0x9E3779B185EBCA8DULL, 0xE9E7D170BADB2BA9ULL }, /* XSUM_XXH3_testdata[1017] */\n    {  509, 0x0000000000000000ULL, 0x5DBCACDAA1F7566BULL }, /* XSUM_XXH3_testdata[1018] */\n    {  509, 0x9E3779B185EBCA8DULL, 0x6D60CAF6ED6D03E3ULL }, /* XSUM_XXH3_testdata[1019] */\n    {  510, 0x0000000000000000ULL, 0x337D49DDF223AC10ULL }, /* XSUM_XXH3_testdata[1020] */\n    {  510, 0x9E3779B185EBCA8DULL, 0x5E1C79CAF9AE2635ULL }, /* XSUM_XXH3_testdata[1021] */\n    {  511, 0x0000000000000000ULL, 0x8089715B163E7FC0ULL }, /* XSUM_XXH3_testdata[1022] */\n    {  511, 0x9E3779B185EBCA8DULL, 0x90EC0377BA8D6002ULL }, /* XSUM_XXH3_testdata[1023] */\n    {  512, 0x0000000000000000ULL, 0x617E49599013CB6BULL }, /* XSUM_XXH3_testdata[1024] */\n    {  512, 0x9E3779B185EBCA8DULL, 0x3CE457DE14C27708ULL }, /* XSUM_XXH3_testdata[1025] */\n    {  513, 0x0000000000000000ULL, 0xF7037D3B6722AEECULL }, /* XSUM_XXH3_testdata[1026] */\n    {  513, 0x9E3779B185EBCA8DULL, 0x78494A42FDE49F35ULL }, /* XSUM_XXH3_testdata[1027] */\n    {  514, 0x0000000000000000ULL, 0xD6D133F802EC8DE9ULL }, /* XSUM_XXH3_testdata[1028] */\n    {  514, 0x9E3779B185EBCA8DULL, 0x4A9476602727653BULL }, /* XSUM_XXH3_testdata[1029] */\n    {  515, 0x0000000000000000ULL, 0x916FD663EE7A2B40ULL }, /* XSUM_XXH3_testdata[1030] */\n    {  515, 0x9E3779B185EBCA8DULL, 0x2E49A56A3E907479ULL }, /* XSUM_XXH3_testdata[1031] */\n    {  516, 0x0000000000000000ULL, 0x296884B4F289C9E2ULL }, /* XSUM_XXH3_testdata[1032] */\n    {  516, 0x9E3779B185EBCA8DULL, 0xCF06989B231DCBA2ULL }, /* XSUM_XXH3_testdata[1033] */\n    {  517, 0x0000000000000000ULL, 0x0F780D32AF5B93E7ULL }, /* XSUM_XXH3_testdata[1034] */\n    {  517, 0x9E3779B185EBCA8DULL, 0xB958BFAD729A407CULL }, /* XSUM_XXH3_testdata[1035] */\n    {  518, 0x0000000000000000ULL, 0xF9515F008BFBF090ULL }, /* XSUM_XXH3_testdata[1036] */\n    {  518, 0x9E3779B185EBCA8DULL, 0x6071E3513A8C56FFULL }, /* XSUM_XXH3_testdata[1037] */\n    {  519, 0x0000000000000000ULL, 0x437449649192D1D5ULL }, /* XSUM_XXH3_testdata[1038] */\n    {  519, 0x9E3779B185EBCA8DULL, 0x4895C7042BCEBF60ULL }, /* XSUM_XXH3_testdata[1039] */\n    {  520, 0x0000000000000000ULL, 0x798FE0ED55307DCEULL }, /* XSUM_XXH3_testdata[1040] */\n    {  520, 0x9E3779B185EBCA8DULL, 0xF836A2DBFCE75330ULL }, /* XSUM_XXH3_testdata[1041] */\n    {  521, 0x0000000000000000ULL, 0x1EDC6FB72413D07CULL }, /* XSUM_XXH3_testdata[1042] */\n    {  521, 0x9E3779B185EBCA8DULL, 0x5B411EAA9D9D2DABULL }, /* XSUM_XXH3_testdata[1043] */\n    {  522, 0x0000000000000000ULL, 0x2323999887285691ULL }, /* XSUM_XXH3_testdata[1044] */\n    {  522, 0x9E3779B185EBCA8DULL, 0x7CED862B19471EC0ULL }, /* XSUM_XXH3_testdata[1045] */\n    {  523, 0x0000000000000000ULL, 0x900F8EF3FA04553CULL }, /* XSUM_XXH3_testdata[1046] */\n    {  523, 0x9E3779B185EBCA8DULL, 0x7A0A14A37231FFB7ULL }, /* XSUM_XXH3_testdata[1047] */\n    {  524, 0x0000000000000000ULL, 0xF018B3E98DFFB9DBULL }, /* XSUM_XXH3_testdata[1048] */\n    {  524, 0x9E3779B185EBCA8DULL, 0xE76E428270018A74ULL }, /* XSUM_XXH3_testdata[1049] */\n    {  525, 0x0000000000000000ULL, 0x91009968A59F5DE1ULL }, /* XSUM_XXH3_testdata[1050] */\n    {  525, 0x9E3779B185EBCA8DULL, 0x651738F8F8E2EAE6ULL }, /* XSUM_XXH3_testdata[1051] */\n    {  526, 0x0000000000000000ULL, 0x9D919B6E918D457FULL }, /* XSUM_XXH3_testdata[1052] */\n    {  526, 0x9E3779B185EBCA8DULL, 0x929A9B839E9E5DACULL }, /* XSUM_XXH3_testdata[1053] */\n    {  527, 0x0000000000000000ULL, 0xBD9253EF067D4827ULL }, /* XSUM_XXH3_testdata[1054] */\n    {  527, 0x9E3779B185EBCA8DULL, 0x110D0A0EEF0E1DE0ULL }, /* XSUM_XXH3_testdata[1055] */\n    {  528, 0x0000000000000000ULL, 0xA4FF4CE1E6E3B0F6ULL }, /* XSUM_XXH3_testdata[1056] */\n    {  528, 0x9E3779B185EBCA8DULL, 0x102CA5FC88E4ACDBULL }, /* XSUM_XXH3_testdata[1057] */\n    {  529, 0x0000000000000000ULL, 0x5A9BD96F099D3A05ULL }, /* XSUM_XXH3_testdata[1058] */\n    {  529, 0x9E3779B185EBCA8DULL, 0x55AA573781F0E6C3ULL }, /* XSUM_XXH3_testdata[1059] */\n    {  530, 0x0000000000000000ULL, 0x10F4AEF9ED1662FEULL }, /* XSUM_XXH3_testdata[1060] */\n    {  530, 0x9E3779B185EBCA8DULL, 0x3A77F93A9C084E39ULL }, /* XSUM_XXH3_testdata[1061] */\n    {  531, 0x0000000000000000ULL, 0x953266DCF6F64DD8ULL }, /* XSUM_XXH3_testdata[1062] */\n    {  531, 0x9E3779B185EBCA8DULL, 0xF29DB077DCA0A65FULL }, /* XSUM_XXH3_testdata[1063] */\n    {  532, 0x0000000000000000ULL, 0x7FC33AF735826264ULL }, /* XSUM_XXH3_testdata[1064] */\n    {  532, 0x9E3779B185EBCA8DULL, 0x8DAC890EE966D7D7ULL }, /* XSUM_XXH3_testdata[1065] */\n    {  533, 0x0000000000000000ULL, 0x4AA6FD454B20A62CULL }, /* XSUM_XXH3_testdata[1066] */\n    {  533, 0x9E3779B185EBCA8DULL, 0x868747A5FD700CCEULL }, /* XSUM_XXH3_testdata[1067] */\n    {  534, 0x0000000000000000ULL, 0x622F04DD0CBD4D28ULL }, /* XSUM_XXH3_testdata[1068] */\n    {  534, 0x9E3779B185EBCA8DULL, 0x582385BB15C93A83ULL }, /* XSUM_XXH3_testdata[1069] */\n    {  535, 0x0000000000000000ULL, 0x70A29B295E97E82EULL }, /* XSUM_XXH3_testdata[1070] */\n    {  535, 0x9E3779B185EBCA8DULL, 0x30FB3DBBF088E816ULL }, /* XSUM_XXH3_testdata[1071] */\n    {  536, 0x0000000000000000ULL, 0xCF41D4BD8DE08418ULL }, /* XSUM_XXH3_testdata[1072] */\n    {  536, 0x9E3779B185EBCA8DULL, 0xF37C777F1A7DBB41ULL }, /* XSUM_XXH3_testdata[1073] */\n    {  537, 0x0000000000000000ULL, 0x394062779EDA7FD1ULL }, /* XSUM_XXH3_testdata[1074] */\n    {  537, 0x9E3779B185EBCA8DULL, 0x6D6070C24379CFDFULL }, /* XSUM_XXH3_testdata[1075] */\n    {  538, 0x0000000000000000ULL, 0x7DACA4ACB0BE611EULL }, /* XSUM_XXH3_testdata[1076] */\n    {  538, 0x9E3779B185EBCA8DULL, 0x8B093E8DF3C0A94DULL }, /* XSUM_XXH3_testdata[1077] */\n    {  539, 0x0000000000000000ULL, 0xB759B66ED325D90BULL }, /* XSUM_XXH3_testdata[1078] */\n    {  539, 0x9E3779B185EBCA8DULL, 0x92C6CD9D754DA170ULL }, /* XSUM_XXH3_testdata[1079] */\n    {  540, 0x0000000000000000ULL, 0x1CE1ECB6F2EA3C08ULL }, /* XSUM_XXH3_testdata[1080] */\n    {  540, 0x9E3779B185EBCA8DULL, 0xF8254785EF9BF776ULL }, /* XSUM_XXH3_testdata[1081] */\n    {  541, 0x0000000000000000ULL, 0x4A683D8C0191DB06ULL }, /* XSUM_XXH3_testdata[1082] */\n    {  541, 0x9E3779B185EBCA8DULL, 0xA0A37DAD4F2A8703ULL }, /* XSUM_XXH3_testdata[1083] */\n    {  542, 0x0000000000000000ULL, 0xD4A94AFE1D60AF7CULL }, /* XSUM_XXH3_testdata[1084] */\n    {  542, 0x9E3779B185EBCA8DULL, 0x1AC6DBBF0E1AD2BFULL }, /* XSUM_XXH3_testdata[1085] */\n    {  543, 0x0000000000000000ULL, 0x335ED4269537AE98ULL }, /* XSUM_XXH3_testdata[1086] */\n    {  543, 0x9E3779B185EBCA8DULL, 0xEA591E76B5F58023ULL }, /* XSUM_XXH3_testdata[1087] */\n    {  544, 0x0000000000000000ULL, 0xEE0F3ED48AE98EAAULL }, /* XSUM_XXH3_testdata[1088] */\n    {  544, 0x9E3779B185EBCA8DULL, 0xEFA52007CF2B08E9ULL }, /* XSUM_XXH3_testdata[1089] */\n    {  545, 0x0000000000000000ULL, 0xD3C23550ACAC379AULL }, /* XSUM_XXH3_testdata[1090] */\n    {  545, 0x9E3779B185EBCA8DULL, 0x3A372A67ED04F20EULL }, /* XSUM_XXH3_testdata[1091] */\n    {  546, 0x0000000000000000ULL, 0x8766C1E7E90ECC53ULL }, /* XSUM_XXH3_testdata[1092] */\n    {  546, 0x9E3779B185EBCA8DULL, 0x557B6D382216C9C8ULL }, /* XSUM_XXH3_testdata[1093] */\n    {  547, 0x0000000000000000ULL, 0xFD4BA223E822FA02ULL }, /* XSUM_XXH3_testdata[1094] */\n    {  547, 0x9E3779B185EBCA8DULL, 0xDFF8551585E4E635ULL }, /* XSUM_XXH3_testdata[1095] */\n    {  548, 0x0000000000000000ULL, 0x1FA4D5286396145EULL }, /* XSUM_XXH3_testdata[1096] */\n    {  548, 0x9E3779B185EBCA8DULL, 0x19DC860F95E9E300ULL }, /* XSUM_XXH3_testdata[1097] */\n    {  549, 0x0000000000000000ULL, 0x8FB9DB46DB18B81EULL }, /* XSUM_XXH3_testdata[1098] */\n    {  549, 0x9E3779B185EBCA8DULL, 0x94DCB36B2A353435ULL }, /* XSUM_XXH3_testdata[1099] */\n    {  550, 0x0000000000000000ULL, 0x83DD946E679275ECULL }, /* XSUM_XXH3_testdata[1100] */\n    {  550, 0x9E3779B185EBCA8DULL, 0xED59520EF54C28E1ULL }, /* XSUM_XXH3_testdata[1101] */\n    {  551, 0x0000000000000000ULL, 0x4483944094799E09ULL }, /* XSUM_XXH3_testdata[1102] */\n    {  551, 0x9E3779B185EBCA8DULL, 0x4893FC5F3BF47AF8ULL }, /* XSUM_XXH3_testdata[1103] */\n    {  552, 0x0000000000000000ULL, 0x166D9ADCD1580EE6ULL }, /* XSUM_XXH3_testdata[1104] */\n    {  552, 0x9E3779B185EBCA8DULL, 0xD8FE769808678DDEULL }, /* XSUM_XXH3_testdata[1105] */\n    {  553, 0x0000000000000000ULL, 0x76094EAA527CF3BDULL }, /* XSUM_XXH3_testdata[1106] */\n    {  553, 0x9E3779B185EBCA8DULL, 0xBA20D5A6026C47B1ULL }, /* XSUM_XXH3_testdata[1107] */\n    {  554, 0x0000000000000000ULL, 0x8F27383CF09A76B3ULL }, /* XSUM_XXH3_testdata[1108] */\n    {  554, 0x9E3779B185EBCA8DULL, 0x5D1B841D161A1193ULL }, /* XSUM_XXH3_testdata[1109] */\n    {  555, 0x0000000000000000ULL, 0x8AD49BC31E7A4427ULL }, /* XSUM_XXH3_testdata[1110] */\n    {  555, 0x9E3779B185EBCA8DULL, 0x681841730B9E5E84ULL }, /* XSUM_XXH3_testdata[1111] */\n    {  556, 0x0000000000000000ULL, 0x2EEEEFB3A80CD68EULL }, /* XSUM_XXH3_testdata[1112] */\n    {  556, 0x9E3779B185EBCA8DULL, 0x4EE3FC2C8D8E138BULL }, /* XSUM_XXH3_testdata[1113] */\n    {  557, 0x0000000000000000ULL, 0xF0D8D5132E115CA5ULL }, /* XSUM_XXH3_testdata[1114] */\n    {  557, 0x9E3779B185EBCA8DULL, 0x417506C6F736F51EULL }, /* XSUM_XXH3_testdata[1115] */\n    {  558, 0x0000000000000000ULL, 0xFE4FC52E0D5697CEULL }, /* XSUM_XXH3_testdata[1116] */\n    {  558, 0x9E3779B185EBCA8DULL, 0x1FB0668F3F5C72FFULL }, /* XSUM_XXH3_testdata[1117] */\n    {  559, 0x0000000000000000ULL, 0x6C09584BC80BC143ULL }, /* XSUM_XXH3_testdata[1118] */\n    {  559, 0x9E3779B185EBCA8DULL, 0x453418ECEAA73D98ULL }, /* XSUM_XXH3_testdata[1119] */\n    {  560, 0x0000000000000000ULL, 0x0AF326979F3BA818ULL }, /* XSUM_XXH3_testdata[1120] */\n    {  560, 0x9E3779B185EBCA8DULL, 0x404AEF8839775F17ULL }, /* XSUM_XXH3_testdata[1121] */\n    {  561, 0x0000000000000000ULL, 0x9598B245C6CCE432ULL }, /* XSUM_XXH3_testdata[1122] */\n    {  561, 0x9E3779B185EBCA8DULL, 0x2728DEA648CED887ULL }, /* XSUM_XXH3_testdata[1123] */\n    {  562, 0x0000000000000000ULL, 0xE3AD4D6D3D0E075BULL }, /* XSUM_XXH3_testdata[1124] */\n    {  562, 0x9E3779B185EBCA8DULL, 0x997790DB7268C105ULL }, /* XSUM_XXH3_testdata[1125] */\n    {  563, 0x0000000000000000ULL, 0x8C6DB00EBD173B30ULL }, /* XSUM_XXH3_testdata[1126] */\n    {  563, 0x9E3779B185EBCA8DULL, 0x5A3760C73090003AULL }, /* XSUM_XXH3_testdata[1127] */\n    {  564, 0x0000000000000000ULL, 0x2005C80D14575E30ULL }, /* XSUM_XXH3_testdata[1128] */\n    {  564, 0x9E3779B185EBCA8DULL, 0xD9C3BC69EAED2309ULL }, /* XSUM_XXH3_testdata[1129] */\n    {  565, 0x0000000000000000ULL, 0xE89A727244704FF7ULL }, /* XSUM_XXH3_testdata[1130] */\n    {  565, 0x9E3779B185EBCA8DULL, 0x9825A8F132990034ULL }, /* XSUM_XXH3_testdata[1131] */\n    {  566, 0x0000000000000000ULL, 0x1A52AB32251C9557ULL }, /* XSUM_XXH3_testdata[1132] */\n    {  566, 0x9E3779B185EBCA8DULL, 0x1DCE347E35CC8FEFULL }, /* XSUM_XXH3_testdata[1133] */\n    {  567, 0x0000000000000000ULL, 0xB4D8818D6B110074ULL }, /* XSUM_XXH3_testdata[1134] */\n    {  567, 0x9E3779B185EBCA8DULL, 0xC400C7C2511ADED4ULL }, /* XSUM_XXH3_testdata[1135] */\n    {  568, 0x0000000000000000ULL, 0x4567D04C81F74410ULL }, /* XSUM_XXH3_testdata[1136] */\n    {  568, 0x9E3779B185EBCA8DULL, 0x82C9D3E937A4D202ULL }, /* XSUM_XXH3_testdata[1137] */\n    {  569, 0x0000000000000000ULL, 0x9F46FCDE4E694129ULL }, /* XSUM_XXH3_testdata[1138] */\n    {  569, 0x9E3779B185EBCA8DULL, 0x5478F1C83171B116ULL }, /* XSUM_XXH3_testdata[1139] */\n    {  570, 0x0000000000000000ULL, 0x7E9832CB3B263913ULL }, /* XSUM_XXH3_testdata[1140] */\n    {  570, 0x9E3779B185EBCA8DULL, 0x36B3BC18FAF26B57ULL }, /* XSUM_XXH3_testdata[1141] */\n    {  571, 0x0000000000000000ULL, 0x06E35D397BC959CAULL }, /* XSUM_XXH3_testdata[1142] */\n    {  571, 0x9E3779B185EBCA8DULL, 0x1FAB1A95B96CC502ULL }, /* XSUM_XXH3_testdata[1143] */\n    {  572, 0x0000000000000000ULL, 0x8D2A4A846742E2BAULL }, /* XSUM_XXH3_testdata[1144] */\n    {  572, 0x9E3779B185EBCA8DULL, 0x02448E4981CDE029ULL }, /* XSUM_XXH3_testdata[1145] */\n    {  573, 0x0000000000000000ULL, 0xCBE7A3979FF1FC62ULL }, /* XSUM_XXH3_testdata[1146] */\n    {  573, 0x9E3779B185EBCA8DULL, 0x3E25E8223804D14CULL }, /* XSUM_XXH3_testdata[1147] */\n    {  574, 0x0000000000000000ULL, 0xB502D9D56515C069ULL }, /* XSUM_XXH3_testdata[1148] */\n    {  574, 0x9E3779B185EBCA8DULL, 0xB4D56D31E1E8CF11ULL }, /* XSUM_XXH3_testdata[1149] */\n    {  575, 0x0000000000000000ULL, 0xB00BEEA09D518435ULL }, /* XSUM_XXH3_testdata[1150] */\n    {  575, 0x9E3779B185EBCA8DULL, 0x431D4573CE93CA64ULL }, /* XSUM_XXH3_testdata[1151] */\n    {  576, 0x0000000000000000ULL, 0x9C875962CB39ACF8ULL }, /* XSUM_XXH3_testdata[1152] */\n    {  576, 0x9E3779B185EBCA8DULL, 0x6E01EE5662C31F8FULL }, /* XSUM_XXH3_testdata[1153] */\n    {  577, 0x0000000000000000ULL, 0x5807930E9516B291ULL }, /* XSUM_XXH3_testdata[1154] */\n    {  577, 0x9E3779B185EBCA8DULL, 0x8F9641AFEB4CD5D0ULL }, /* XSUM_XXH3_testdata[1155] */\n    {  578, 0x0000000000000000ULL, 0xDE1728000629CA10ULL }, /* XSUM_XXH3_testdata[1156] */\n    {  578, 0x9E3779B185EBCA8DULL, 0xE3748D92F7F15D4DULL }, /* XSUM_XXH3_testdata[1157] */\n    {  579, 0x0000000000000000ULL, 0x51DD9598B443A519ULL }, /* XSUM_XXH3_testdata[1158] */\n    {  579, 0x9E3779B185EBCA8DULL, 0x5886E7F04DE25E68ULL }, /* XSUM_XXH3_testdata[1159] */\n    {  580, 0x0000000000000000ULL, 0xBF2197B313975A9EULL }, /* XSUM_XXH3_testdata[1160] */\n    {  580, 0x9E3779B185EBCA8DULL, 0x281615EDE4D279F7ULL }, /* XSUM_XXH3_testdata[1161] */\n    {  581, 0x0000000000000000ULL, 0x3A9CD35B97C37ACCULL }, /* XSUM_XXH3_testdata[1162] */\n    {  581, 0x9E3779B185EBCA8DULL, 0xC6BDAC18533F698AULL }, /* XSUM_XXH3_testdata[1163] */\n    {  582, 0x0000000000000000ULL, 0xCC477503244591EAULL }, /* XSUM_XXH3_testdata[1164] */\n    {  582, 0x9E3779B185EBCA8DULL, 0x5ADA79DD285FEACAULL }, /* XSUM_XXH3_testdata[1165] */\n    {  583, 0x0000000000000000ULL, 0x570BFCEB0A2E29FDULL }, /* XSUM_XXH3_testdata[1166] */\n    {  583, 0x9E3779B185EBCA8DULL, 0xECD1C7A797AF9205ULL }, /* XSUM_XXH3_testdata[1167] */\n    {  584, 0x0000000000000000ULL, 0xEE31779866989C18ULL }, /* XSUM_XXH3_testdata[1168] */\n    {  584, 0x9E3779B185EBCA8DULL, 0x8FD7F54E85F3D98FULL }, /* XSUM_XXH3_testdata[1169] */\n    {  585, 0x0000000000000000ULL, 0xC30C69BD67C5ECACULL }, /* XSUM_XXH3_testdata[1170] */\n    {  585, 0x9E3779B185EBCA8DULL, 0xBF4B0483CFA8C409ULL }, /* XSUM_XXH3_testdata[1171] */\n    {  586, 0x0000000000000000ULL, 0x29B9D3DDE40F0AB6ULL }, /* XSUM_XXH3_testdata[1172] */\n    {  586, 0x9E3779B185EBCA8DULL, 0xFC17FD5172E2134AULL }, /* XSUM_XXH3_testdata[1173] */\n    {  587, 0x0000000000000000ULL, 0xCC9C6FC419758916ULL }, /* XSUM_XXH3_testdata[1174] */\n    {  587, 0x9E3779B185EBCA8DULL, 0xE36C621E2EF52F4AULL }, /* XSUM_XXH3_testdata[1175] */\n    {  588, 0x0000000000000000ULL, 0xE82416D6E4A38F1EULL }, /* XSUM_XXH3_testdata[1176] */\n    {  588, 0x9E3779B185EBCA8DULL, 0x9796FEEF63D6A1F9ULL }, /* XSUM_XXH3_testdata[1177] */\n    {  589, 0x0000000000000000ULL, 0x7784A4EDF1CAB9F2ULL }, /* XSUM_XXH3_testdata[1178] */\n    {  589, 0x9E3779B185EBCA8DULL, 0x65C3F6BACEDF9F19ULL }, /* XSUM_XXH3_testdata[1179] */\n    {  590, 0x0000000000000000ULL, 0x51E14499A5DFDFFDULL }, /* XSUM_XXH3_testdata[1180] */\n    {  590, 0x9E3779B185EBCA8DULL, 0x3BF4C198955532FFULL }, /* XSUM_XXH3_testdata[1181] */\n    {  591, 0x0000000000000000ULL, 0x30D3F0BC9778B4FCULL }, /* XSUM_XXH3_testdata[1182] */\n    {  591, 0x9E3779B185EBCA8DULL, 0x59924F04807B6C24ULL }, /* XSUM_XXH3_testdata[1183] */\n    {  592, 0x0000000000000000ULL, 0x52C035B4068830C8ULL }, /* XSUM_XXH3_testdata[1184] */\n    {  592, 0x9E3779B185EBCA8DULL, 0xF025B3903ED116E2ULL }, /* XSUM_XXH3_testdata[1185] */\n    {  593, 0x0000000000000000ULL, 0x93612FB9A62606C6ULL }, /* XSUM_XXH3_testdata[1186] */\n    {  593, 0x9E3779B185EBCA8DULL, 0xDA45DA0B9A293E98ULL }, /* XSUM_XXH3_testdata[1187] */\n    {  594, 0x0000000000000000ULL, 0xB615A34D0D4BC90DULL }, /* XSUM_XXH3_testdata[1188] */\n    {  594, 0x9E3779B185EBCA8DULL, 0x9C6B259A26DF3E48ULL }, /* XSUM_XXH3_testdata[1189] */\n    {  595, 0x0000000000000000ULL, 0x263689E084A32D7AULL }, /* XSUM_XXH3_testdata[1190] */\n    {  595, 0x9E3779B185EBCA8DULL, 0xD784DE18F3D17A46ULL }, /* XSUM_XXH3_testdata[1191] */\n    {  596, 0x0000000000000000ULL, 0x52B178D2628DD9EDULL }, /* XSUM_XXH3_testdata[1192] */\n    {  596, 0x9E3779B185EBCA8DULL, 0xCE7C32792F452855ULL }, /* XSUM_XXH3_testdata[1193] */\n    {  597, 0x0000000000000000ULL, 0x199A00792322556FULL }, /* XSUM_XXH3_testdata[1194] */\n    {  597, 0x9E3779B185EBCA8DULL, 0x6A08469D57D39795ULL }, /* XSUM_XXH3_testdata[1195] */\n    {  598, 0x0000000000000000ULL, 0x2CFBF6705B9693D2ULL }, /* XSUM_XXH3_testdata[1196] */\n    {  598, 0x9E3779B185EBCA8DULL, 0x68D4E452C95CA39AULL }, /* XSUM_XXH3_testdata[1197] */\n    {  599, 0x0000000000000000ULL, 0x96E4AF71C89C294FULL }, /* XSUM_XXH3_testdata[1198] */\n    {  599, 0x9E3779B185EBCA8DULL, 0x8FD2DF72FDBEB423ULL }, /* XSUM_XXH3_testdata[1199] */\n    {  600, 0x0000000000000000ULL, 0xC0605FE191A5E128ULL }, /* XSUM_XXH3_testdata[1200] */\n    {  600, 0x9E3779B185EBCA8DULL, 0x061A23845807828DULL }, /* XSUM_XXH3_testdata[1201] */\n    {  601, 0x0000000000000000ULL, 0xB9B52AB20DCFA2F0ULL }, /* XSUM_XXH3_testdata[1202] */\n    {  601, 0x9E3779B185EBCA8DULL, 0xA10C9021FBF86BDCULL }, /* XSUM_XXH3_testdata[1203] */\n    {  602, 0x0000000000000000ULL, 0x1E681FF1711A71ECULL }, /* XSUM_XXH3_testdata[1204] */\n    {  602, 0x9E3779B185EBCA8DULL, 0x77D303A800879170ULL }, /* XSUM_XXH3_testdata[1205] */\n    {  603, 0x0000000000000000ULL, 0x274CC56B3599F0FCULL }, /* XSUM_XXH3_testdata[1206] */\n    {  603, 0x9E3779B185EBCA8DULL, 0x21A9015EDF9C798FULL }, /* XSUM_XXH3_testdata[1207] */\n    {  604, 0x0000000000000000ULL, 0x2DB7105D277670F9ULL }, /* XSUM_XXH3_testdata[1208] */\n    {  604, 0x9E3779B185EBCA8DULL, 0x5C54F9021DD5483BULL }, /* XSUM_XXH3_testdata[1209] */\n    {  605, 0x0000000000000000ULL, 0xEF875CCA274645EBULL }, /* XSUM_XXH3_testdata[1210] */\n    {  605, 0x9E3779B185EBCA8DULL, 0xA87B24AE041D5072ULL }, /* XSUM_XXH3_testdata[1211] */\n    {  606, 0x0000000000000000ULL, 0x6095086311E06EBCULL }, /* XSUM_XXH3_testdata[1212] */\n    {  606, 0x9E3779B185EBCA8DULL, 0x93B481E1668D07E1ULL }, /* XSUM_XXH3_testdata[1213] */\n    {  607, 0x0000000000000000ULL, 0x9BE5048018448255ULL }, /* XSUM_XXH3_testdata[1214] */\n    {  607, 0x9E3779B185EBCA8DULL, 0xD5C064AC0461CDEAULL }, /* XSUM_XXH3_testdata[1215] */\n    {  608, 0x0000000000000000ULL, 0xE2F2E44992786982ULL }, /* XSUM_XXH3_testdata[1216] */\n    {  608, 0x9E3779B185EBCA8DULL, 0x9C9880AF03E8A1E2ULL }, /* XSUM_XXH3_testdata[1217] */\n    {  609, 0x0000000000000000ULL, 0x969FA5C5D49A88F6ULL }, /* XSUM_XXH3_testdata[1218] */\n    {  609, 0x9E3779B185EBCA8DULL, 0x911FCC4A7ED41156ULL }, /* XSUM_XXH3_testdata[1219] */\n    {  610, 0x0000000000000000ULL, 0x69382E0FA6AC3416ULL }, /* XSUM_XXH3_testdata[1220] */\n    {  610, 0x9E3779B185EBCA8DULL, 0x2CB911C877F198C1ULL }, /* XSUM_XXH3_testdata[1221] */\n    {  611, 0x0000000000000000ULL, 0xA24AC0AD6789B294ULL }, /* XSUM_XXH3_testdata[1222] */\n    {  611, 0x9E3779B185EBCA8DULL, 0xDB739ED7A7DB4B64ULL }, /* XSUM_XXH3_testdata[1223] */\n    {  612, 0x0000000000000000ULL, 0xAB306415318BF16CULL }, /* XSUM_XXH3_testdata[1224] */\n    {  612, 0x9E3779B185EBCA8DULL, 0x572F5BA4414B6021ULL }, /* XSUM_XXH3_testdata[1225] */\n    {  613, 0x0000000000000000ULL, 0x928ED52A15B31530ULL }, /* XSUM_XXH3_testdata[1226] */\n    {  613, 0x9E3779B185EBCA8DULL, 0x863CEC68751B6645ULL }, /* XSUM_XXH3_testdata[1227] */\n    {  614, 0x0000000000000000ULL, 0x11C8C7ACC6789D36ULL }, /* XSUM_XXH3_testdata[1228] */\n    {  614, 0x9E3779B185EBCA8DULL, 0x25119504F8C045A1ULL }, /* XSUM_XXH3_testdata[1229] */\n    {  615, 0x0000000000000000ULL, 0x3731AE1CEDF5C793ULL }, /* XSUM_XXH3_testdata[1230] */\n    {  615, 0x9E3779B185EBCA8DULL, 0x2DE364890B5BAF7CULL }, /* XSUM_XXH3_testdata[1231] */\n    {  616, 0x0000000000000000ULL, 0x31EEEFA193131A8CULL }, /* XSUM_XXH3_testdata[1232] */\n    {  616, 0x9E3779B185EBCA8DULL, 0xAA10CEDACEAA47AAULL }, /* XSUM_XXH3_testdata[1233] */\n    {  617, 0x0000000000000000ULL, 0xFE134367327E31B5ULL }, /* XSUM_XXH3_testdata[1234] */\n    {  617, 0x9E3779B185EBCA8DULL, 0x8203304E6842AC80ULL }, /* XSUM_XXH3_testdata[1235] */\n    {  618, 0x0000000000000000ULL, 0x2DC6F2E1248E829AULL }, /* XSUM_XXH3_testdata[1236] */\n    {  618, 0x9E3779B185EBCA8DULL, 0xE49683C589D9C054ULL }, /* XSUM_XXH3_testdata[1237] */\n    {  619, 0x0000000000000000ULL, 0x510613BA8891C1E7ULL }, /* XSUM_XXH3_testdata[1238] */\n    {  619, 0x9E3779B185EBCA8DULL, 0x6AFFDCD2935018B4ULL }, /* XSUM_XXH3_testdata[1239] */\n    {  620, 0x0000000000000000ULL, 0xED6D6926F7B60375ULL }, /* XSUM_XXH3_testdata[1240] */\n    {  620, 0x9E3779B185EBCA8DULL, 0x6541696753FAC9A2ULL }, /* XSUM_XXH3_testdata[1241] */\n    {  621, 0x0000000000000000ULL, 0xA0CC39F66497B27FULL }, /* XSUM_XXH3_testdata[1242] */\n    {  621, 0x9E3779B185EBCA8DULL, 0xE258768426AD7457ULL }, /* XSUM_XXH3_testdata[1243] */\n    {  622, 0x0000000000000000ULL, 0x04F9559C71C5B5A0ULL }, /* XSUM_XXH3_testdata[1244] */\n    {  622, 0x9E3779B185EBCA8DULL, 0xB593A3CBBF11D3ADULL }, /* XSUM_XXH3_testdata[1245] */\n    {  623, 0x0000000000000000ULL, 0x2883715F1954DEC5ULL }, /* XSUM_XXH3_testdata[1246] */\n    {  623, 0x9E3779B185EBCA8DULL, 0xD9A88DC52418885EULL }, /* XSUM_XXH3_testdata[1247] */\n    {  624, 0x0000000000000000ULL, 0x7DBD97E325B2A6A7ULL }, /* XSUM_XXH3_testdata[1248] */\n    {  624, 0x9E3779B185EBCA8DULL, 0x26CC497601B10736ULL }, /* XSUM_XXH3_testdata[1249] */\n    {  625, 0x0000000000000000ULL, 0x1A93910D2CD6D526ULL }, /* XSUM_XXH3_testdata[1250] */\n    {  625, 0x9E3779B185EBCA8DULL, 0x571552D3E0744C50ULL }, /* XSUM_XXH3_testdata[1251] */\n    {  626, 0x0000000000000000ULL, 0x8CD297D30C025358ULL }, /* XSUM_XXH3_testdata[1252] */\n    {  626, 0x9E3779B185EBCA8DULL, 0x0B018AAECFC50E25ULL }, /* XSUM_XXH3_testdata[1253] */\n    {  627, 0x0000000000000000ULL, 0x8A26D3B875BC2BB0ULL }, /* XSUM_XXH3_testdata[1254] */\n    {  627, 0x9E3779B185EBCA8DULL, 0x7DEC6393395B7F1EULL }, /* XSUM_XXH3_testdata[1255] */\n    {  628, 0x0000000000000000ULL, 0x6084625CE9FE419CULL }, /* XSUM_XXH3_testdata[1256] */\n    {  628, 0x9E3779B185EBCA8DULL, 0x5B22E55A223B81DAULL }, /* XSUM_XXH3_testdata[1257] */\n    {  629, 0x0000000000000000ULL, 0x100D70F4679F9BD3ULL }, /* XSUM_XXH3_testdata[1258] */\n    {  629, 0x9E3779B185EBCA8DULL, 0xF48929F1B6A7BCDCULL }, /* XSUM_XXH3_testdata[1259] */\n    {  630, 0x0000000000000000ULL, 0xE3D4F6F959A36913ULL }, /* XSUM_XXH3_testdata[1260] */\n    {  630, 0x9E3779B185EBCA8DULL, 0x186793413BF41E97ULL }, /* XSUM_XXH3_testdata[1261] */\n    {  631, 0x0000000000000000ULL, 0x182716B04D4641A5ULL }, /* XSUM_XXH3_testdata[1262] */\n    {  631, 0x9E3779B185EBCA8DULL, 0xF207013BBEA556D9ULL }, /* XSUM_XXH3_testdata[1263] */\n    {  632, 0x0000000000000000ULL, 0x710CC7DE160F15FAULL }, /* XSUM_XXH3_testdata[1264] */\n    {  632, 0x9E3779B185EBCA8DULL, 0xDB6AB689686906EFULL }, /* XSUM_XXH3_testdata[1265] */\n    {  633, 0x0000000000000000ULL, 0x36ACB22C98F2647FULL }, /* XSUM_XXH3_testdata[1266] */\n    {  633, 0x9E3779B185EBCA8DULL, 0x8F509869A202DBCFULL }, /* XSUM_XXH3_testdata[1267] */\n    {  634, 0x0000000000000000ULL, 0x9164849B45760F60ULL }, /* XSUM_XXH3_testdata[1268] */\n    {  634, 0x9E3779B185EBCA8DULL, 0xC9C40A581D114295ULL }, /* XSUM_XXH3_testdata[1269] */\n    {  635, 0x0000000000000000ULL, 0x6DA37640B986D7A3ULL }, /* XSUM_XXH3_testdata[1270] */\n    {  635, 0x9E3779B185EBCA8DULL, 0x7FAF2E611B096C47ULL }, /* XSUM_XXH3_testdata[1271] */\n    {  636, 0x0000000000000000ULL, 0x59BA932720702C98ULL }, /* XSUM_XXH3_testdata[1272] */\n    {  636, 0x9E3779B185EBCA8DULL, 0x5EB76A057E164347ULL }, /* XSUM_XXH3_testdata[1273] */\n    {  637, 0x0000000000000000ULL, 0x91FA6DEA0E5BE52DULL }, /* XSUM_XXH3_testdata[1274] */\n    {  637, 0x9E3779B185EBCA8DULL, 0x6C611F46BA1235BEULL }, /* XSUM_XXH3_testdata[1275] */\n    {  638, 0x0000000000000000ULL, 0x4BC1B99ABD8C9B73ULL }, /* XSUM_XXH3_testdata[1276] */\n    {  638, 0x9E3779B185EBCA8DULL, 0xFA8DF2479F6BB0AFULL }, /* XSUM_XXH3_testdata[1277] */\n    {  639, 0x0000000000000000ULL, 0x035D671E9674A633ULL }, /* XSUM_XXH3_testdata[1278] */\n    {  639, 0x9E3779B185EBCA8DULL, 0x9B8EF3F04B909513ULL }, /* XSUM_XXH3_testdata[1279] */\n    {  640, 0x0000000000000000ULL, 0xAF4193ABDC5994B3ULL }, /* XSUM_XXH3_testdata[1280] */\n    {  640, 0x9E3779B185EBCA8DULL, 0xBCF9335F2DD501DEULL }, /* XSUM_XXH3_testdata[1281] */\n    {  641, 0x0000000000000000ULL, 0xE7BA1B930AEEB87DULL }, /* XSUM_XXH3_testdata[1282] */\n    {  641, 0x9E3779B185EBCA8DULL, 0x6AF70D9EF44C03C4ULL }, /* XSUM_XXH3_testdata[1283] */\n    {  642, 0x0000000000000000ULL, 0x065E9966C6E4276BULL }, /* XSUM_XXH3_testdata[1284] */\n    {  642, 0x9E3779B185EBCA8DULL, 0x72A68771C0145270ULL }, /* XSUM_XXH3_testdata[1285] */\n    {  643, 0x0000000000000000ULL, 0xD29405F69936AB10ULL }, /* XSUM_XXH3_testdata[1286] */\n    {  643, 0x9E3779B185EBCA8DULL, 0xC112DD24C82BE004ULL }, /* XSUM_XXH3_testdata[1287] */\n    {  644, 0x0000000000000000ULL, 0x68303D1BCAAEBB23ULL }, /* XSUM_XXH3_testdata[1288] */\n    {  644, 0x9E3779B185EBCA8DULL, 0xB1A8A8C331ABF2EFULL }, /* XSUM_XXH3_testdata[1289] */\n    {  645, 0x0000000000000000ULL, 0x3801BF30E6386242ULL }, /* XSUM_XXH3_testdata[1290] */\n    {  645, 0x9E3779B185EBCA8DULL, 0x688D55D2B4826CD8ULL }, /* XSUM_XXH3_testdata[1291] */\n    {  646, 0x0000000000000000ULL, 0x27C2E21CA1AD0BB4ULL }, /* XSUM_XXH3_testdata[1292] */\n    {  646, 0x9E3779B185EBCA8DULL, 0xE4FBDF7428E36986ULL }, /* XSUM_XXH3_testdata[1293] */\n    {  647, 0x0000000000000000ULL, 0x359159902F4339F9ULL }, /* XSUM_XXH3_testdata[1294] */\n    {  647, 0x9E3779B185EBCA8DULL, 0x50E157E377554E5AULL }, /* XSUM_XXH3_testdata[1295] */\n    {  648, 0x0000000000000000ULL, 0x901087DE7D84E343ULL }, /* XSUM_XXH3_testdata[1296] */\n    {  648, 0x9E3779B185EBCA8DULL, 0x3730E38DCCA57107ULL }, /* XSUM_XXH3_testdata[1297] */\n    {  649, 0x0000000000000000ULL, 0xE21B333C11B071ECULL }, /* XSUM_XXH3_testdata[1298] */\n    {  649, 0x9E3779B185EBCA8DULL, 0xB69D9DEE1403CCE5ULL }, /* XSUM_XXH3_testdata[1299] */\n    {  650, 0x0000000000000000ULL, 0xCC858F79A2DC1D8CULL }, /* XSUM_XXH3_testdata[1300] */\n    {  650, 0x9E3779B185EBCA8DULL, 0x9A2C632A20524886ULL }, /* XSUM_XXH3_testdata[1301] */\n    {  651, 0x0000000000000000ULL, 0x1D511DBC696D9235ULL }, /* XSUM_XXH3_testdata[1302] */\n    {  651, 0x9E3779B185EBCA8DULL, 0xD725252CD3469098ULL }, /* XSUM_XXH3_testdata[1303] */\n    {  652, 0x0000000000000000ULL, 0xCDD3E08C5A2DBD5FULL }, /* XSUM_XXH3_testdata[1304] */\n    {  652, 0x9E3779B185EBCA8DULL, 0xC14E73EC3F3FD40EULL }, /* XSUM_XXH3_testdata[1305] */\n    {  653, 0x0000000000000000ULL, 0x4CC60A74EDFDC4A1ULL }, /* XSUM_XXH3_testdata[1306] */\n    {  653, 0x9E3779B185EBCA8DULL, 0x2E3E4D6216BE0652ULL }, /* XSUM_XXH3_testdata[1307] */\n    {  654, 0x0000000000000000ULL, 0x61075A6A563EA507ULL }, /* XSUM_XXH3_testdata[1308] */\n    {  654, 0x9E3779B185EBCA8DULL, 0x61BCB8DB78710FFFULL }, /* XSUM_XXH3_testdata[1309] */\n    {  655, 0x0000000000000000ULL, 0x552CCAB07F52777BULL }, /* XSUM_XXH3_testdata[1310] */\n    {  655, 0x9E3779B185EBCA8DULL, 0x7DB56551A2409867ULL }, /* XSUM_XXH3_testdata[1311] */\n    {  656, 0x0000000000000000ULL, 0x4ACDE78203A11415ULL }, /* XSUM_XXH3_testdata[1312] */\n    {  656, 0x9E3779B185EBCA8DULL, 0x2641A2A30324B9D6ULL }, /* XSUM_XXH3_testdata[1313] */\n    {  657, 0x0000000000000000ULL, 0xB5497EA549768344ULL }, /* XSUM_XXH3_testdata[1314] */\n    {  657, 0x9E3779B185EBCA8DULL, 0x03174EAE8FAA0FC7ULL }, /* XSUM_XXH3_testdata[1315] */\n    {  658, 0x0000000000000000ULL, 0xDC50AEFA830D25A4ULL }, /* XSUM_XXH3_testdata[1316] */\n    {  658, 0x9E3779B185EBCA8DULL, 0xA5A8205C97D473BAULL }, /* XSUM_XXH3_testdata[1317] */\n    {  659, 0x0000000000000000ULL, 0x9160DC39BA6D1C83ULL }, /* XSUM_XXH3_testdata[1318] */\n    {  659, 0x9E3779B185EBCA8DULL, 0x475480CCC8AF958AULL }, /* XSUM_XXH3_testdata[1319] */\n    {  660, 0x0000000000000000ULL, 0xA9CA3EF4146E6E9FULL }, /* XSUM_XXH3_testdata[1320] */\n    {  660, 0x9E3779B185EBCA8DULL, 0x1682C066F3A8823FULL }, /* XSUM_XXH3_testdata[1321] */\n    {  661, 0x0000000000000000ULL, 0x7460AC3EBDB0CC91ULL }, /* XSUM_XXH3_testdata[1322] */\n    {  661, 0x9E3779B185EBCA8DULL, 0xF2D25854D8C709DBULL }, /* XSUM_XXH3_testdata[1323] */\n    {  662, 0x0000000000000000ULL, 0xECEC3F9135C75502ULL }, /* XSUM_XXH3_testdata[1324] */\n    {  662, 0x9E3779B185EBCA8DULL, 0x62499E1401ADE872ULL }, /* XSUM_XXH3_testdata[1325] */\n    {  663, 0x0000000000000000ULL, 0x7B127A5A5E93BCD4ULL }, /* XSUM_XXH3_testdata[1326] */\n    {  663, 0x9E3779B185EBCA8DULL, 0x89254435FC56ED38ULL }, /* XSUM_XXH3_testdata[1327] */\n    {  664, 0x0000000000000000ULL, 0xEB047D893EECD24AULL }, /* XSUM_XXH3_testdata[1328] */\n    {  664, 0x9E3779B185EBCA8DULL, 0x1FDDABDB0C5E4364ULL }, /* XSUM_XXH3_testdata[1329] */\n    {  665, 0x0000000000000000ULL, 0xF0A35228227E28E3ULL }, /* XSUM_XXH3_testdata[1330] */\n    {  665, 0x9E3779B185EBCA8DULL, 0x8B8F8139678108C4ULL }, /* XSUM_XXH3_testdata[1331] */\n    {  666, 0x0000000000000000ULL, 0x3D4AA64ECD0C04E8ULL }, /* XSUM_XXH3_testdata[1332] */\n    {  666, 0x9E3779B185EBCA8DULL, 0x0ADCCABEAF0D5B84ULL }, /* XSUM_XXH3_testdata[1333] */\n    {  667, 0x0000000000000000ULL, 0x744BE46CFA49B58CULL }, /* XSUM_XXH3_testdata[1334] */\n    {  667, 0x9E3779B185EBCA8DULL, 0x2B17BF1FEB2FC217ULL }, /* XSUM_XXH3_testdata[1335] */\n    {  668, 0x0000000000000000ULL, 0x216603F52972D093ULL }, /* XSUM_XXH3_testdata[1336] */\n    {  668, 0x9E3779B185EBCA8DULL, 0x59BA1CD43FFB532BULL }, /* XSUM_XXH3_testdata[1337] */\n    {  669, 0x0000000000000000ULL, 0xECAB0778974C7ED3ULL }, /* XSUM_XXH3_testdata[1338] */\n    {  669, 0x9E3779B185EBCA8DULL, 0xE835F55EC75A62FFULL }, /* XSUM_XXH3_testdata[1339] */\n    {  670, 0x0000000000000000ULL, 0xD605CF61B5D3778CULL }, /* XSUM_XXH3_testdata[1340] */\n    {  670, 0x9E3779B185EBCA8DULL, 0x07CFA96D6253A1CFULL }, /* XSUM_XXH3_testdata[1341] */\n    {  671, 0x0000000000000000ULL, 0x3894273709446570ULL }, /* XSUM_XXH3_testdata[1342] */\n    {  671, 0x9E3779B185EBCA8DULL, 0x2E0B4B534B7AB5B1ULL }, /* XSUM_XXH3_testdata[1343] */\n    {  672, 0x0000000000000000ULL, 0x18A8759DD6C8A127ULL }, /* XSUM_XXH3_testdata[1344] */\n    {  672, 0x9E3779B185EBCA8DULL, 0xB8729212E63A2B15ULL }, /* XSUM_XXH3_testdata[1345] */\n    {  673, 0x0000000000000000ULL, 0xB88636AB6CD1D60EULL }, /* XSUM_XXH3_testdata[1346] */\n    {  673, 0x9E3779B185EBCA8DULL, 0x4507642B43344489ULL }, /* XSUM_XXH3_testdata[1347] */\n    {  674, 0x0000000000000000ULL, 0x7F252CDA25AD432CULL }, /* XSUM_XXH3_testdata[1348] */\n    {  674, 0x9E3779B185EBCA8DULL, 0x254986B183AB63A9ULL }, /* XSUM_XXH3_testdata[1349] */\n    {  675, 0x0000000000000000ULL, 0x2DDEA1F39436EC1EULL }, /* XSUM_XXH3_testdata[1350] */\n    {  675, 0x9E3779B185EBCA8DULL, 0x97AD2BFD2BF47E12ULL }, /* XSUM_XXH3_testdata[1351] */\n    {  676, 0x0000000000000000ULL, 0x51A7EBC85A37A7D8ULL }, /* XSUM_XXH3_testdata[1352] */\n    {  676, 0x9E3779B185EBCA8DULL, 0xC7D27F5FDED0BDD7ULL }, /* XSUM_XXH3_testdata[1353] */\n    {  677, 0x0000000000000000ULL, 0xCDEACACD82B7D79BULL }, /* XSUM_XXH3_testdata[1354] */\n    {  677, 0x9E3779B185EBCA8DULL, 0xBEFB40A4A0A42B54ULL }, /* XSUM_XXH3_testdata[1355] */\n    {  678, 0x0000000000000000ULL, 0xCEB3E9F656FF4511ULL }, /* XSUM_XXH3_testdata[1356] */\n    {  678, 0x9E3779B185EBCA8DULL, 0x0CD1CB4E9E9311E1ULL }, /* XSUM_XXH3_testdata[1357] */\n    {  679, 0x0000000000000000ULL, 0xB7CD9FA73E39ADB4ULL }, /* XSUM_XXH3_testdata[1358] */\n    {  679, 0x9E3779B185EBCA8DULL, 0x8BDE0F97D38CD1F1ULL }, /* XSUM_XXH3_testdata[1359] */\n    {  680, 0x0000000000000000ULL, 0xD46F82961FFA71E9ULL }, /* XSUM_XXH3_testdata[1360] */\n    {  680, 0x9E3779B185EBCA8DULL, 0x5072064A59E7A4BCULL }, /* XSUM_XXH3_testdata[1361] */\n    {  681, 0x0000000000000000ULL, 0xE30C10E5DF46B182ULL }, /* XSUM_XXH3_testdata[1362] */\n    {  681, 0x9E3779B185EBCA8DULL, 0x9D00A687A910BAF2ULL }, /* XSUM_XXH3_testdata[1363] */\n    {  682, 0x0000000000000000ULL, 0x035D625495342A66ULL }, /* XSUM_XXH3_testdata[1364] */\n    {  682, 0x9E3779B185EBCA8DULL, 0x9EDE8647E875F7CEULL }, /* XSUM_XXH3_testdata[1365] */\n    {  683, 0x0000000000000000ULL, 0xEA3F1217472DC43AULL }, /* XSUM_XXH3_testdata[1366] */\n    {  683, 0x9E3779B185EBCA8DULL, 0x9F5B331577B6BFFDULL }, /* XSUM_XXH3_testdata[1367] */\n    {  684, 0x0000000000000000ULL, 0xA224A6AD2382D9E4ULL }, /* XSUM_XXH3_testdata[1368] */\n    {  684, 0x9E3779B185EBCA8DULL, 0x157C90988CBE0040ULL }, /* XSUM_XXH3_testdata[1369] */\n    {  685, 0x0000000000000000ULL, 0x09FE95398CF92B6EULL }, /* XSUM_XXH3_testdata[1370] */\n    {  685, 0x9E3779B185EBCA8DULL, 0x53469E830A47BC69ULL }, /* XSUM_XXH3_testdata[1371] */\n    {  686, 0x0000000000000000ULL, 0xD60979352D528294ULL }, /* XSUM_XXH3_testdata[1372] */\n    {  686, 0x9E3779B185EBCA8DULL, 0x95750C1628B29CAAULL }, /* XSUM_XXH3_testdata[1373] */\n    {  687, 0x0000000000000000ULL, 0x70030ABE1BCF260BULL }, /* XSUM_XXH3_testdata[1374] */\n    {  687, 0x9E3779B185EBCA8DULL, 0xEBF7C42A6A29302CULL }, /* XSUM_XXH3_testdata[1375] */\n    {  688, 0x0000000000000000ULL, 0x28018B42C285A3C0ULL }, /* XSUM_XXH3_testdata[1376] */\n    {  688, 0x9E3779B185EBCA8DULL, 0x7C5B9E4E3A833CB7ULL }, /* XSUM_XXH3_testdata[1377] */\n    {  689, 0x0000000000000000ULL, 0x751575E6F3102F35ULL }, /* XSUM_XXH3_testdata[1378] */\n    {  689, 0x9E3779B185EBCA8DULL, 0xFBED8D0AA15FD5F9ULL }, /* XSUM_XXH3_testdata[1379] */\n    {  690, 0x0000000000000000ULL, 0x0760F9D20A8C0124ULL }, /* XSUM_XXH3_testdata[1380] */\n    {  690, 0x9E3779B185EBCA8DULL, 0x54C40A8A572FE172ULL }, /* XSUM_XXH3_testdata[1381] */\n    {  691, 0x0000000000000000ULL, 0xB43AB84B58366A46ULL }, /* XSUM_XXH3_testdata[1382] */\n    {  691, 0x9E3779B185EBCA8DULL, 0xF76B92FA4B5C1EFEULL }, /* XSUM_XXH3_testdata[1383] */\n    {  692, 0x0000000000000000ULL, 0x89AD8A04565BF9DFULL }, /* XSUM_XXH3_testdata[1384] */\n    {  692, 0x9E3779B185EBCA8DULL, 0xF7662E1884DD2DECULL }, /* XSUM_XXH3_testdata[1385] */\n    {  693, 0x0000000000000000ULL, 0x69B4173B5E5C2F1CULL }, /* XSUM_XXH3_testdata[1386] */\n    {  693, 0x9E3779B185EBCA8DULL, 0xEC2A35776A1789A3ULL }, /* XSUM_XXH3_testdata[1387] */\n    {  694, 0x0000000000000000ULL, 0x6A1A315A4ECC8C20ULL }, /* XSUM_XXH3_testdata[1388] */\n    {  694, 0x9E3779B185EBCA8DULL, 0x2BDA8F63EA106A05ULL }, /* XSUM_XXH3_testdata[1389] */\n    {  695, 0x0000000000000000ULL, 0x211027A807ED2265ULL }, /* XSUM_XXH3_testdata[1390] */\n    {  695, 0x9E3779B185EBCA8DULL, 0x0628573BF1549F0BULL }, /* XSUM_XXH3_testdata[1391] */\n    {  696, 0x0000000000000000ULL, 0xEC70CA0661F26C32ULL }, /* XSUM_XXH3_testdata[1392] */\n    {  696, 0x9E3779B185EBCA8DULL, 0x041227AC12C6EF7BULL }, /* XSUM_XXH3_testdata[1393] */\n    {  697, 0x0000000000000000ULL, 0x92FB87A7D3291AAAULL }, /* XSUM_XXH3_testdata[1394] */\n    {  697, 0x9E3779B185EBCA8DULL, 0x654875EB06391799ULL }, /* XSUM_XXH3_testdata[1395] */\n    {  698, 0x0000000000000000ULL, 0x4C444C9791D6D5F0ULL }, /* XSUM_XXH3_testdata[1396] */\n    {  698, 0x9E3779B185EBCA8DULL, 0xF1A5E46734BDC2A7ULL }, /* XSUM_XXH3_testdata[1397] */\n    {  699, 0x0000000000000000ULL, 0x3BC8DF475C4A531FULL }, /* XSUM_XXH3_testdata[1398] */\n    {  699, 0x9E3779B185EBCA8DULL, 0x47773131B0B339A2ULL }, /* XSUM_XXH3_testdata[1399] */\n    {  700, 0x0000000000000000ULL, 0xFA90F040F92A7E71ULL }, /* XSUM_XXH3_testdata[1400] */\n    {  700, 0x9E3779B185EBCA8DULL, 0x8E93D45B99763DE8ULL }, /* XSUM_XXH3_testdata[1401] */\n    {  701, 0x0000000000000000ULL, 0x22730147C96C49C1ULL }, /* XSUM_XXH3_testdata[1402] */\n    {  701, 0x9E3779B185EBCA8DULL, 0x07D7225D37BE56B6ULL }, /* XSUM_XXH3_testdata[1403] */\n    {  702, 0x0000000000000000ULL, 0x1C9A22BD51A0F347ULL }, /* XSUM_XXH3_testdata[1404] */\n    {  702, 0x9E3779B185EBCA8DULL, 0x3979E3CCB74F6B99ULL }, /* XSUM_XXH3_testdata[1405] */\n    {  703, 0x0000000000000000ULL, 0x683E5E6D58E06485ULL }, /* XSUM_XXH3_testdata[1406] */\n    {  703, 0x9E3779B185EBCA8DULL, 0x69E61408E3346451ULL }, /* XSUM_XXH3_testdata[1407] */\n    {  704, 0x0000000000000000ULL, 0x53D0007023B75557ULL }, /* XSUM_XXH3_testdata[1408] */\n    {  704, 0x9E3779B185EBCA8DULL, 0x2B2D21E690DC3E11ULL }, /* XSUM_XXH3_testdata[1409] */\n    {  705, 0x0000000000000000ULL, 0xBA8F3D7D77F20C8EULL }, /* XSUM_XXH3_testdata[1410] */\n    {  705, 0x9E3779B185EBCA8DULL, 0x88D85FCD88755E7DULL }, /* XSUM_XXH3_testdata[1411] */\n    {  706, 0x0000000000000000ULL, 0xA695E503AEE57121ULL }, /* XSUM_XXH3_testdata[1412] */\n    {  706, 0x9E3779B185EBCA8DULL, 0x78DA7B809A94BCFEULL }, /* XSUM_XXH3_testdata[1413] */\n    {  707, 0x0000000000000000ULL, 0x95433111932AF80EULL }, /* XSUM_XXH3_testdata[1414] */\n    {  707, 0x9E3779B185EBCA8DULL, 0x9FA9DAABD6433C76ULL }, /* XSUM_XXH3_testdata[1415] */\n    {  708, 0x0000000000000000ULL, 0x497AF37942A68AAEULL }, /* XSUM_XXH3_testdata[1416] */\n    {  708, 0x9E3779B185EBCA8DULL, 0xA3EEF16DFEBBE660ULL }, /* XSUM_XXH3_testdata[1417] */\n    {  709, 0x0000000000000000ULL, 0xB361F79C5F877D03ULL }, /* XSUM_XXH3_testdata[1418] */\n    {  709, 0x9E3779B185EBCA8DULL, 0xA7814A983164B859ULL }, /* XSUM_XXH3_testdata[1419] */\n    {  710, 0x0000000000000000ULL, 0xEF085BFFE73EF728ULL }, /* XSUM_XXH3_testdata[1420] */\n    {  710, 0x9E3779B185EBCA8DULL, 0xBB3A16860A419A09ULL }, /* XSUM_XXH3_testdata[1421] */\n    {  711, 0x0000000000000000ULL, 0xE9CB41A0C8A5344BULL }, /* XSUM_XXH3_testdata[1422] */\n    {  711, 0x9E3779B185EBCA8DULL, 0x3BF91CBBD165BF19ULL }, /* XSUM_XXH3_testdata[1423] */\n    {  712, 0x0000000000000000ULL, 0x094B75D2DCC59B16ULL }, /* XSUM_XXH3_testdata[1424] */\n    {  712, 0x9E3779B185EBCA8DULL, 0xC953ADD65FC87D28ULL }, /* XSUM_XXH3_testdata[1425] */\n    {  713, 0x0000000000000000ULL, 0x687E011056B168DFULL }, /* XSUM_XXH3_testdata[1426] */\n    {  713, 0x9E3779B185EBCA8DULL, 0x7D0E2509C09FF864ULL }, /* XSUM_XXH3_testdata[1427] */\n    {  714, 0x0000000000000000ULL, 0x216776767DE94CCDULL }, /* XSUM_XXH3_testdata[1428] */\n    {  714, 0x9E3779B185EBCA8DULL, 0x7B3B463549FC1B73ULL }, /* XSUM_XXH3_testdata[1429] */\n    {  715, 0x0000000000000000ULL, 0x8FE72DFB0BBC68AAULL }, /* XSUM_XXH3_testdata[1430] */\n    {  715, 0x9E3779B185EBCA8DULL, 0x335630133E190194ULL }, /* XSUM_XXH3_testdata[1431] */\n    {  716, 0x0000000000000000ULL, 0xC21F5B936CBB11A1ULL }, /* XSUM_XXH3_testdata[1432] */\n    {  716, 0x9E3779B185EBCA8DULL, 0x5F2ED15F53E8FA00ULL }, /* XSUM_XXH3_testdata[1433] */\n    {  717, 0x0000000000000000ULL, 0xF59584C3D5568930ULL }, /* XSUM_XXH3_testdata[1434] */\n    {  717, 0x9E3779B185EBCA8DULL, 0x7D8EC8EC3A31B3F9ULL }, /* XSUM_XXH3_testdata[1435] */\n    {  718, 0x0000000000000000ULL, 0x02E45FA9460EEC70ULL }, /* XSUM_XXH3_testdata[1436] */\n    {  718, 0x9E3779B185EBCA8DULL, 0x3C53E9098C60D822ULL }, /* XSUM_XXH3_testdata[1437] */\n    {  719, 0x0000000000000000ULL, 0x14B1E4306412BA03ULL }, /* XSUM_XXH3_testdata[1438] */\n    {  719, 0x9E3779B185EBCA8DULL, 0xE8B262397EA54296ULL }, /* XSUM_XXH3_testdata[1439] */\n    {  720, 0x0000000000000000ULL, 0xED83840F58017914ULL }, /* XSUM_XXH3_testdata[1440] */\n    {  720, 0x9E3779B185EBCA8DULL, 0x85788A34A91DC62EULL }, /* XSUM_XXH3_testdata[1441] */\n    {  721, 0x0000000000000000ULL, 0x7EA1D2F1FF21A780ULL }, /* XSUM_XXH3_testdata[1442] */\n    {  721, 0x9E3779B185EBCA8DULL, 0xA0F80C3300C72A56ULL }, /* XSUM_XXH3_testdata[1443] */\n    {  722, 0x0000000000000000ULL, 0xEE7B0C11265C6606ULL }, /* XSUM_XXH3_testdata[1444] */\n    {  722, 0x9E3779B185EBCA8DULL, 0x6BCC91CE53889314ULL }, /* XSUM_XXH3_testdata[1445] */\n    {  723, 0x0000000000000000ULL, 0x4B0C248133CD0BD2ULL }, /* XSUM_XXH3_testdata[1446] */\n    {  723, 0x9E3779B185EBCA8DULL, 0x5CDA80B8B9BF45C6ULL }, /* XSUM_XXH3_testdata[1447] */\n    {  724, 0x0000000000000000ULL, 0x16EC32EFED4168F5ULL }, /* XSUM_XXH3_testdata[1448] */\n    {  724, 0x9E3779B185EBCA8DULL, 0xED554AA6AF697924ULL }, /* XSUM_XXH3_testdata[1449] */\n    {  725, 0x0000000000000000ULL, 0xA406E09172F9EB13ULL }, /* XSUM_XXH3_testdata[1450] */\n    {  725, 0x9E3779B185EBCA8DULL, 0x4C6E9261B76B7E85ULL }, /* XSUM_XXH3_testdata[1451] */\n    {  726, 0x0000000000000000ULL, 0x8CD030D1E9BC0811ULL }, /* XSUM_XXH3_testdata[1452] */\n    {  726, 0x9E3779B185EBCA8DULL, 0x4727049FFBF3E305ULL }, /* XSUM_XXH3_testdata[1453] */\n    {  727, 0x0000000000000000ULL, 0xEC28AFAE764DD4DEULL }, /* XSUM_XXH3_testdata[1454] */\n    {  727, 0x9E3779B185EBCA8DULL, 0xA4786C7FAE624BC1ULL }, /* XSUM_XXH3_testdata[1455] */\n    {  728, 0x0000000000000000ULL, 0xFEF967AEF2EDDC63ULL }, /* XSUM_XXH3_testdata[1456] */\n    {  728, 0x9E3779B185EBCA8DULL, 0x1E193FA0B4F380EDULL }, /* XSUM_XXH3_testdata[1457] */\n    {  729, 0x0000000000000000ULL, 0x96ED3CD548BA4C5BULL }, /* XSUM_XXH3_testdata[1458] */\n    {  729, 0x9E3779B185EBCA8DULL, 0x7F02264499CCCB02ULL }, /* XSUM_XXH3_testdata[1459] */\n    {  730, 0x0000000000000000ULL, 0x1D81621D1F630AE2ULL }, /* XSUM_XXH3_testdata[1460] */\n    {  730, 0x9E3779B185EBCA8DULL, 0x681572B9DBB3A148ULL }, /* XSUM_XXH3_testdata[1461] */\n    {  731, 0x0000000000000000ULL, 0x4C272DA966A67BBCULL }, /* XSUM_XXH3_testdata[1462] */\n    {  731, 0x9E3779B185EBCA8DULL, 0xCB23E03A22F5BE9DULL }, /* XSUM_XXH3_testdata[1463] */\n    {  732, 0x0000000000000000ULL, 0xDF2A8961367E9B90ULL }, /* XSUM_XXH3_testdata[1464] */\n    {  732, 0x9E3779B185EBCA8DULL, 0x26C503C936FAD341ULL }, /* XSUM_XXH3_testdata[1465] */\n    {  733, 0x0000000000000000ULL, 0x52ACA8E777AADC52ULL }, /* XSUM_XXH3_testdata[1466] */\n    {  733, 0x9E3779B185EBCA8DULL, 0xAB4A761E1084A54FULL }, /* XSUM_XXH3_testdata[1467] */\n    {  734, 0x0000000000000000ULL, 0xC315DE7F85E665C2ULL }, /* XSUM_XXH3_testdata[1468] */\n    {  734, 0x9E3779B185EBCA8DULL, 0x2EEF83B7CE5B97B7ULL }, /* XSUM_XXH3_testdata[1469] */\n    {  735, 0x0000000000000000ULL, 0x696742B385A6E2BAULL }, /* XSUM_XXH3_testdata[1470] */\n    {  735, 0x9E3779B185EBCA8DULL, 0x4B696374DA543441ULL }, /* XSUM_XXH3_testdata[1471] */\n    {  736, 0x0000000000000000ULL, 0xD7B4138320D23C84ULL }, /* XSUM_XXH3_testdata[1472] */\n    {  736, 0x9E3779B185EBCA8DULL, 0x32DF5CA9FD07BF2FULL }, /* XSUM_XXH3_testdata[1473] */\n    {  737, 0x0000000000000000ULL, 0xDC92E52B55C9CA42ULL }, /* XSUM_XXH3_testdata[1474] */\n    {  737, 0x9E3779B185EBCA8DULL, 0x7BF34A46BE8900C8ULL }, /* XSUM_XXH3_testdata[1475] */\n    {  738, 0x0000000000000000ULL, 0x35F7C8B6785F65C6ULL }, /* XSUM_XXH3_testdata[1476] */\n    {  738, 0x9E3779B185EBCA8DULL, 0x3D0C9FB3364ED126ULL }, /* XSUM_XXH3_testdata[1477] */\n    {  739, 0x0000000000000000ULL, 0x9F242314D208AD5FULL }, /* XSUM_XXH3_testdata[1478] */\n    {  739, 0x9E3779B185EBCA8DULL, 0x6484D8248103312AULL }, /* XSUM_XXH3_testdata[1479] */\n    {  740, 0x0000000000000000ULL, 0x08DE90C5C2B1ADCEULL }, /* XSUM_XXH3_testdata[1480] */\n    {  740, 0x9E3779B185EBCA8DULL, 0x07BFDFEB324E0895ULL }, /* XSUM_XXH3_testdata[1481] */\n    {  741, 0x0000000000000000ULL, 0x2C25953F4B532728ULL }, /* XSUM_XXH3_testdata[1482] */\n    {  741, 0x9E3779B185EBCA8DULL, 0xFB971F5525E36290ULL }, /* XSUM_XXH3_testdata[1483] */\n    {  742, 0x0000000000000000ULL, 0xACB071F7BD83FBBDULL }, /* XSUM_XXH3_testdata[1484] */\n    {  742, 0x9E3779B185EBCA8DULL, 0x1713A948F45BF88FULL }, /* XSUM_XXH3_testdata[1485] */\n    {  743, 0x0000000000000000ULL, 0xA5DF5074C7438126ULL }, /* XSUM_XXH3_testdata[1486] */\n    {  743, 0x9E3779B185EBCA8DULL, 0xF250DDBB481132FAULL }, /* XSUM_XXH3_testdata[1487] */\n    {  744, 0x0000000000000000ULL, 0x23853C8A2E481D04ULL }, /* XSUM_XXH3_testdata[1488] */\n    {  744, 0x9E3779B185EBCA8DULL, 0x6FED3CD988EA71E7ULL }, /* XSUM_XXH3_testdata[1489] */\n    {  745, 0x0000000000000000ULL, 0xD53322CC8C5F41F9ULL }, /* XSUM_XXH3_testdata[1490] */\n    {  745, 0x9E3779B185EBCA8DULL, 0xD50525326BE0114EULL }, /* XSUM_XXH3_testdata[1491] */\n    {  746, 0x0000000000000000ULL, 0x34B8A165AAE2C20AULL }, /* XSUM_XXH3_testdata[1492] */\n    {  746, 0x9E3779B185EBCA8DULL, 0x619061F495722A00ULL }, /* XSUM_XXH3_testdata[1493] */\n    {  747, 0x0000000000000000ULL, 0x12741F5AFC125FF4ULL }, /* XSUM_XXH3_testdata[1494] */\n    {  747, 0x9E3779B185EBCA8DULL, 0x9D160E881BB7E460ULL }, /* XSUM_XXH3_testdata[1495] */\n    {  748, 0x0000000000000000ULL, 0xDFD5F9C3C7FAADE8ULL }, /* XSUM_XXH3_testdata[1496] */\n    {  748, 0x9E3779B185EBCA8DULL, 0xEC730BDE394EADBFULL }, /* XSUM_XXH3_testdata[1497] */\n    {  749, 0x0000000000000000ULL, 0xA2FDB44EBA93CABEULL }, /* XSUM_XXH3_testdata[1498] */\n    {  749, 0x9E3779B185EBCA8DULL, 0xF5BD8056B5542799ULL }, /* XSUM_XXH3_testdata[1499] */\n    {  750, 0x0000000000000000ULL, 0x2FE3032178562F37ULL }, /* XSUM_XXH3_testdata[1500] */\n    {  750, 0x9E3779B185EBCA8DULL, 0x5FCC94427E030C74ULL }, /* XSUM_XXH3_testdata[1501] */\n    {  751, 0x0000000000000000ULL, 0x7805A2A5D1955490ULL }, /* XSUM_XXH3_testdata[1502] */\n    {  751, 0x9E3779B185EBCA8DULL, 0x3E7AD96124FF9130ULL }, /* XSUM_XXH3_testdata[1503] */\n    {  752, 0x0000000000000000ULL, 0xF712ADB98B36CB0CULL }, /* XSUM_XXH3_testdata[1504] */\n    {  752, 0x9E3779B185EBCA8DULL, 0xD21680D87EA3DC86ULL }, /* XSUM_XXH3_testdata[1505] */\n    {  753, 0x0000000000000000ULL, 0x95A99222BCDD6791ULL }, /* XSUM_XXH3_testdata[1506] */\n    {  753, 0x9E3779B185EBCA8DULL, 0xC86EDAB23BFFDC95ULL }, /* XSUM_XXH3_testdata[1507] */\n    {  754, 0x0000000000000000ULL, 0x607E9BA59C234233ULL }, /* XSUM_XXH3_testdata[1508] */\n    {  754, 0x9E3779B185EBCA8DULL, 0x50B63817B74F84EBULL }, /* XSUM_XXH3_testdata[1509] */\n    {  755, 0x0000000000000000ULL, 0x38A1FCEADBD7C9B1ULL }, /* XSUM_XXH3_testdata[1510] */\n    {  755, 0x9E3779B185EBCA8DULL, 0x159E0FF2771D4013ULL }, /* XSUM_XXH3_testdata[1511] */\n    {  756, 0x0000000000000000ULL, 0x78C7F2E16DB1BAF2ULL }, /* XSUM_XXH3_testdata[1512] */\n    {  756, 0x9E3779B185EBCA8DULL, 0x11A054CB984490EEULL }, /* XSUM_XXH3_testdata[1513] */\n    {  757, 0x0000000000000000ULL, 0xCB66A77F29B9F0E6ULL }, /* XSUM_XXH3_testdata[1514] */\n    {  757, 0x9E3779B185EBCA8DULL, 0xE7F79D2B525A67BDULL }, /* XSUM_XXH3_testdata[1515] */\n    {  758, 0x0000000000000000ULL, 0xDFBE16056C872D93ULL }, /* XSUM_XXH3_testdata[1516] */\n    {  758, 0x9E3779B185EBCA8DULL, 0x9766A2F001002D4CULL }, /* XSUM_XXH3_testdata[1517] */\n    {  759, 0x0000000000000000ULL, 0xAB6F81845F5D0F86ULL }, /* XSUM_XXH3_testdata[1518] */\n    {  759, 0x9E3779B185EBCA8DULL, 0x382DEEBBAF4F431EULL }, /* XSUM_XXH3_testdata[1519] */\n    {  760, 0x0000000000000000ULL, 0x10C0A37BDCCD259AULL }, /* XSUM_XXH3_testdata[1520] */\n    {  760, 0x9E3779B185EBCA8DULL, 0xDD9BDF9CF4E59946ULL }, /* XSUM_XXH3_testdata[1521] */\n    {  761, 0x0000000000000000ULL, 0xF7CEBE29B198FD30ULL }, /* XSUM_XXH3_testdata[1522] */\n    {  761, 0x9E3779B185EBCA8DULL, 0xA869E57FDB1C8060ULL }, /* XSUM_XXH3_testdata[1523] */\n    {  762, 0x0000000000000000ULL, 0x2907C6DB629AAD4EULL }, /* XSUM_XXH3_testdata[1524] */\n    {  762, 0x9E3779B185EBCA8DULL, 0x76AED4086B1D9AE8ULL }, /* XSUM_XXH3_testdata[1525] */\n    {  763, 0x0000000000000000ULL, 0x89384DD94BF93B2CULL }, /* XSUM_XXH3_testdata[1526] */\n    {  763, 0x9E3779B185EBCA8DULL, 0x48DC2511E0721282ULL }, /* XSUM_XXH3_testdata[1527] */\n    {  764, 0x0000000000000000ULL, 0x6C584E8B8F0D56C5ULL }, /* XSUM_XXH3_testdata[1528] */\n    {  764, 0x9E3779B185EBCA8DULL, 0xB235C4DEC2AC7B59ULL }, /* XSUM_XXH3_testdata[1529] */\n    {  765, 0x0000000000000000ULL, 0x9D329F204D5B9C7AULL }, /* XSUM_XXH3_testdata[1530] */\n    {  765, 0x9E3779B185EBCA8DULL, 0x60A6B3319C706215ULL }, /* XSUM_XXH3_testdata[1531] */\n    {  766, 0x0000000000000000ULL, 0x526A03E0F4B121FDULL }, /* XSUM_XXH3_testdata[1532] */\n    {  766, 0x9E3779B185EBCA8DULL, 0x6B18AC32399D2335ULL }, /* XSUM_XXH3_testdata[1533] */\n    {  767, 0x0000000000000000ULL, 0xA8D2D803378C6FC2ULL }, /* XSUM_XXH3_testdata[1534] */\n    {  767, 0x9E3779B185EBCA8DULL, 0x8CFC6C461EF19D9AULL }, /* XSUM_XXH3_testdata[1535] */\n    {  768, 0x0000000000000000ULL, 0x6CBE42E950F7426BULL }, /* XSUM_XXH3_testdata[1536] */\n    {  768, 0x9E3779B185EBCA8DULL, 0x641FB8CA9341034CULL }, /* XSUM_XXH3_testdata[1537] */\n    {  769, 0x0000000000000000ULL, 0x32302CBB53D45781ULL }, /* XSUM_XXH3_testdata[1538] */\n    {  769, 0x9E3779B185EBCA8DULL, 0x46F363023665B8E2ULL }, /* XSUM_XXH3_testdata[1539] */\n    {  770, 0x0000000000000000ULL, 0xA7C29FBEB87D7D05ULL }, /* XSUM_XXH3_testdata[1540] */\n    {  770, 0x9E3779B185EBCA8DULL, 0x9EBEC5CF3343DCB9ULL }, /* XSUM_XXH3_testdata[1541] */\n    {  771, 0x0000000000000000ULL, 0xA2B5189BB35568A3ULL }, /* XSUM_XXH3_testdata[1542] */\n    {  771, 0x9E3779B185EBCA8DULL, 0xA02674257CE7D16FULL }, /* XSUM_XXH3_testdata[1543] */\n    {  772, 0x0000000000000000ULL, 0xFD17411AF7196623ULL }, /* XSUM_XXH3_testdata[1544] */\n    {  772, 0x9E3779B185EBCA8DULL, 0x387E340E383DF06CULL }, /* XSUM_XXH3_testdata[1545] */\n    {  773, 0x0000000000000000ULL, 0xF55C3823F812FC79ULL }, /* XSUM_XXH3_testdata[1546] */\n    {  773, 0x9E3779B185EBCA8DULL, 0x4925C59F27F294A6ULL }, /* XSUM_XXH3_testdata[1547] */\n    {  774, 0x0000000000000000ULL, 0xB6CA494D3B2F1B1CULL }, /* XSUM_XXH3_testdata[1548] */\n    {  774, 0x9E3779B185EBCA8DULL, 0xF81CD4D37406771DULL }, /* XSUM_XXH3_testdata[1549] */\n    {  775, 0x0000000000000000ULL, 0xECC23F92B06220D0ULL }, /* XSUM_XXH3_testdata[1550] */\n    {  775, 0x9E3779B185EBCA8DULL, 0x3948E4E207032161ULL }, /* XSUM_XXH3_testdata[1551] */\n    {  776, 0x0000000000000000ULL, 0x0221379DCD811436ULL }, /* XSUM_XXH3_testdata[1552] */\n    {  776, 0x9E3779B185EBCA8DULL, 0x043D961C4F99EB6CULL }, /* XSUM_XXH3_testdata[1553] */\n    {  777, 0x0000000000000000ULL, 0x26496DD8CABB9F7CULL }, /* XSUM_XXH3_testdata[1554] */\n    {  777, 0x9E3779B185EBCA8DULL, 0x2EF9ADA4949E4655ULL }, /* XSUM_XXH3_testdata[1555] */\n    {  778, 0x0000000000000000ULL, 0xA7CEE75345E7EDD8ULL }, /* XSUM_XXH3_testdata[1556] */\n    {  778, 0x9E3779B185EBCA8DULL, 0xC2AB2FAB6FB83FAEULL }, /* XSUM_XXH3_testdata[1557] */\n    {  779, 0x0000000000000000ULL, 0x696C9B045F8B19CCULL }, /* XSUM_XXH3_testdata[1558] */\n    {  779, 0x9E3779B185EBCA8DULL, 0x2C184694FC2E8D5FULL }, /* XSUM_XXH3_testdata[1559] */\n    {  780, 0x0000000000000000ULL, 0x9BA5278D85378C52ULL }, /* XSUM_XXH3_testdata[1560] */\n    {  780, 0x9E3779B185EBCA8DULL, 0xEB6CBC00BCA659D7ULL }, /* XSUM_XXH3_testdata[1561] */\n    {  781, 0x0000000000000000ULL, 0xF9184209248E82E3ULL }, /* XSUM_XXH3_testdata[1562] */\n    {  781, 0x9E3779B185EBCA8DULL, 0x5F4A4AA5AEFE2931ULL }, /* XSUM_XXH3_testdata[1563] */\n    {  782, 0x0000000000000000ULL, 0x6B7FC3325D489F56ULL }, /* XSUM_XXH3_testdata[1564] */\n    {  782, 0x9E3779B185EBCA8DULL, 0xDDBFA453013EDC74ULL }, /* XSUM_XXH3_testdata[1565] */\n    {  783, 0x0000000000000000ULL, 0x1774F59A1F9C5338ULL }, /* XSUM_XXH3_testdata[1566] */\n    {  783, 0x9E3779B185EBCA8DULL, 0x0F11F6B0AFA9CC8DULL }, /* XSUM_XXH3_testdata[1567] */\n    {  784, 0x0000000000000000ULL, 0xB57CCEA58F2CC788ULL }, /* XSUM_XXH3_testdata[1568] */\n    {  784, 0x9E3779B185EBCA8DULL, 0xD43B4680051F86E8ULL }, /* XSUM_XXH3_testdata[1569] */\n    {  785, 0x0000000000000000ULL, 0x00DC4E5CE55E70E8ULL }, /* XSUM_XXH3_testdata[1570] */\n    {  785, 0x9E3779B185EBCA8DULL, 0x909F2A3E6FB89892ULL }, /* XSUM_XXH3_testdata[1571] */\n    {  786, 0x0000000000000000ULL, 0xE06ABD80AAB54EBCULL }, /* XSUM_XXH3_testdata[1572] */\n    {  786, 0x9E3779B185EBCA8DULL, 0xDBD9B4BD30764A2AULL }, /* XSUM_XXH3_testdata[1573] */\n    {  787, 0x0000000000000000ULL, 0x06FC7F68ACEA72D7ULL }, /* XSUM_XXH3_testdata[1574] */\n    {  787, 0x9E3779B185EBCA8DULL, 0xA59443084988D4BBULL }, /* XSUM_XXH3_testdata[1575] */\n    {  788, 0x0000000000000000ULL, 0x20C615B56B541F1EULL }, /* XSUM_XXH3_testdata[1576] */\n    {  788, 0x9E3779B185EBCA8DULL, 0x0A131B8A3F37A8B5ULL }, /* XSUM_XXH3_testdata[1577] */\n    {  789, 0x0000000000000000ULL, 0x8A4F76B84730D76AULL }, /* XSUM_XXH3_testdata[1578] */\n    {  789, 0x9E3779B185EBCA8DULL, 0x727463C5A35EAB18ULL }, /* XSUM_XXH3_testdata[1579] */\n    {  790, 0x0000000000000000ULL, 0xB43FAECFB4DED4C6ULL }, /* XSUM_XXH3_testdata[1580] */\n    {  790, 0x9E3779B185EBCA8DULL, 0x97A2FCAAF259E7F0ULL }, /* XSUM_XXH3_testdata[1581] */\n    {  791, 0x0000000000000000ULL, 0x87DB4CC16F8F9834ULL }, /* XSUM_XXH3_testdata[1582] */\n    {  791, 0x9E3779B185EBCA8DULL, 0xF0ED99F6368E86B4ULL }, /* XSUM_XXH3_testdata[1583] */\n    {  792, 0x0000000000000000ULL, 0x397EC5B31E863D4EULL }, /* XSUM_XXH3_testdata[1584] */\n    {  792, 0x9E3779B185EBCA8DULL, 0x4F1F799401E2560FULL }, /* XSUM_XXH3_testdata[1585] */\n    {  793, 0x0000000000000000ULL, 0x63C07847897714FAULL }, /* XSUM_XXH3_testdata[1586] */\n    {  793, 0x9E3779B185EBCA8DULL, 0xA3644EB4E9170C70ULL }, /* XSUM_XXH3_testdata[1587] */\n    {  794, 0x0000000000000000ULL, 0x0EDFD2BFC590389DULL }, /* XSUM_XXH3_testdata[1588] */\n    {  794, 0x9E3779B185EBCA8DULL, 0x3D759DC347BBB21CULL }, /* XSUM_XXH3_testdata[1589] */\n    {  795, 0x0000000000000000ULL, 0x1AB2EC32F024F822ULL }, /* XSUM_XXH3_testdata[1590] */\n    {  795, 0x9E3779B185EBCA8DULL, 0x734CC4590C829DBEULL }, /* XSUM_XXH3_testdata[1591] */\n    {  796, 0x0000000000000000ULL, 0x5BE1AC90F9DE8DA8ULL }, /* XSUM_XXH3_testdata[1592] */\n    {  796, 0x9E3779B185EBCA8DULL, 0x78B04E7613AFD46CULL }, /* XSUM_XXH3_testdata[1593] */\n    {  797, 0x0000000000000000ULL, 0xB4066986444208B4ULL }, /* XSUM_XXH3_testdata[1594] */\n    {  797, 0x9E3779B185EBCA8DULL, 0xEEA265C3C3AFDD45ULL }, /* XSUM_XXH3_testdata[1595] */\n    {  798, 0x0000000000000000ULL, 0x1815460B80B6EB6CULL }, /* XSUM_XXH3_testdata[1596] */\n    {  798, 0x9E3779B185EBCA8DULL, 0x3C89DBB3A59579F1ULL }, /* XSUM_XXH3_testdata[1597] */\n    {  799, 0x0000000000000000ULL, 0x86BB41D5B99C19DCULL }, /* XSUM_XXH3_testdata[1598] */\n    {  799, 0x9E3779B185EBCA8DULL, 0x5501F8646ADF4F5DULL }, /* XSUM_XXH3_testdata[1599] */\n    {  800, 0x0000000000000000ULL, 0x5B095CEB58C8784CULL }, /* XSUM_XXH3_testdata[1600] */\n    {  800, 0x9E3779B185EBCA8DULL, 0x643775681D53EF59ULL }, /* XSUM_XXH3_testdata[1601] */\n    {  801, 0x0000000000000000ULL, 0x2F828D114D494E29ULL }, /* XSUM_XXH3_testdata[1602] */\n    {  801, 0x9E3779B185EBCA8DULL, 0x4EB392F9A436ECE5ULL }, /* XSUM_XXH3_testdata[1603] */\n    {  802, 0x0000000000000000ULL, 0x846819585B282067ULL }, /* XSUM_XXH3_testdata[1604] */\n    {  802, 0x9E3779B185EBCA8DULL, 0xF0838E955138892DULL }, /* XSUM_XXH3_testdata[1605] */\n    {  803, 0x0000000000000000ULL, 0x4812CC768ECBB73FULL }, /* XSUM_XXH3_testdata[1606] */\n    {  803, 0x9E3779B185EBCA8DULL, 0x374E89D7FA22ECD4ULL }, /* XSUM_XXH3_testdata[1607] */\n    {  804, 0x0000000000000000ULL, 0x22137EFB3AC27524ULL }, /* XSUM_XXH3_testdata[1608] */\n    {  804, 0x9E3779B185EBCA8DULL, 0xE836C6165D3830FEULL }, /* XSUM_XXH3_testdata[1609] */\n    {  805, 0x0000000000000000ULL, 0xB4BB8B42141FA5D0ULL }, /* XSUM_XXH3_testdata[1610] */\n    {  805, 0x9E3779B185EBCA8DULL, 0x0E55700B1E667558ULL }, /* XSUM_XXH3_testdata[1611] */\n    {  806, 0x0000000000000000ULL, 0x6D4EF8C4EC4075E2ULL }, /* XSUM_XXH3_testdata[1612] */\n    {  806, 0x9E3779B185EBCA8DULL, 0x934F16B568FE179AULL }, /* XSUM_XXH3_testdata[1613] */\n    {  807, 0x0000000000000000ULL, 0x206A0792F4FCCCACULL }, /* XSUM_XXH3_testdata[1614] */\n    {  807, 0x9E3779B185EBCA8DULL, 0xEB6796CE25E33E6AULL }, /* XSUM_XXH3_testdata[1615] */\n    {  808, 0x0000000000000000ULL, 0x68957C67C4333426ULL }, /* XSUM_XXH3_testdata[1616] */\n    {  808, 0x9E3779B185EBCA8DULL, 0x9E97369B7C0A90F1ULL }, /* XSUM_XXH3_testdata[1617] */\n    {  809, 0x0000000000000000ULL, 0xC17753BA8D4E5CB2ULL }, /* XSUM_XXH3_testdata[1618] */\n    {  809, 0x9E3779B185EBCA8DULL, 0xDCC4A9FD8373CA8AULL }, /* XSUM_XXH3_testdata[1619] */\n    {  810, 0x0000000000000000ULL, 0x8A616D90630A4988ULL }, /* XSUM_XXH3_testdata[1620] */\n    {  810, 0x9E3779B185EBCA8DULL, 0x2144D13C73C4CA74ULL }, /* XSUM_XXH3_testdata[1621] */\n    {  811, 0x0000000000000000ULL, 0x536C6DCDFFD6E969ULL }, /* XSUM_XXH3_testdata[1622] */\n    {  811, 0x9E3779B185EBCA8DULL, 0xAF2825AFCA7BB3D0ULL }, /* XSUM_XXH3_testdata[1623] */\n    {  812, 0x0000000000000000ULL, 0xD7A63BB3914CD718ULL }, /* XSUM_XXH3_testdata[1624] */\n    {  812, 0x9E3779B185EBCA8DULL, 0x427AC245CBD3B44CULL }, /* XSUM_XXH3_testdata[1625] */\n    {  813, 0x0000000000000000ULL, 0x9528DE76FF428FFFULL }, /* XSUM_XXH3_testdata[1626] */\n    {  813, 0x9E3779B185EBCA8DULL, 0x1E230E5B3323E74AULL }, /* XSUM_XXH3_testdata[1627] */\n    {  814, 0x0000000000000000ULL, 0x849CACB6C4106DDFULL }, /* XSUM_XXH3_testdata[1628] */\n    {  814, 0x9E3779B185EBCA8DULL, 0x553BE499122C7C0CULL }, /* XSUM_XXH3_testdata[1629] */\n    {  815, 0x0000000000000000ULL, 0x0D5B97EB8BBB2507ULL }, /* XSUM_XXH3_testdata[1630] */\n    {  815, 0x9E3779B185EBCA8DULL, 0xC342A288F90B93BBULL }, /* XSUM_XXH3_testdata[1631] */\n    {  816, 0x0000000000000000ULL, 0xBF54F04EDDCA5768ULL }, /* XSUM_XXH3_testdata[1632] */\n    {  816, 0x9E3779B185EBCA8DULL, 0x7770F5499A4E0728ULL }, /* XSUM_XXH3_testdata[1633] */\n    {  817, 0x0000000000000000ULL, 0xD91C52C448D3CA0DULL }, /* XSUM_XXH3_testdata[1634] */\n    {  817, 0x9E3779B185EBCA8DULL, 0x45F34B3A94984950ULL }, /* XSUM_XXH3_testdata[1635] */\n    {  818, 0x0000000000000000ULL, 0x4EBDCA54797F28FCULL }, /* XSUM_XXH3_testdata[1636] */\n    {  818, 0x9E3779B185EBCA8DULL, 0x9C760841EAEFFDC9ULL }, /* XSUM_XXH3_testdata[1637] */\n    {  819, 0x0000000000000000ULL, 0xF70945EB101515BFULL }, /* XSUM_XXH3_testdata[1638] */\n    {  819, 0x9E3779B185EBCA8DULL, 0xB227D91F6B12C133ULL }, /* XSUM_XXH3_testdata[1639] */\n    {  820, 0x0000000000000000ULL, 0xCDC89E5577C1A2A8ULL }, /* XSUM_XXH3_testdata[1640] */\n    {  820, 0x9E3779B185EBCA8DULL, 0xEEAC670EA532F45EULL }, /* XSUM_XXH3_testdata[1641] */\n    {  821, 0x0000000000000000ULL, 0x344199F7B654360DULL }, /* XSUM_XXH3_testdata[1642] */\n    {  821, 0x9E3779B185EBCA8DULL, 0x0A9B5D01499EC0CAULL }, /* XSUM_XXH3_testdata[1643] */\n    {  822, 0x0000000000000000ULL, 0x5A5531E107B85BC4ULL }, /* XSUM_XXH3_testdata[1644] */\n    {  822, 0x9E3779B185EBCA8DULL, 0x6128B1D109BA73D5ULL }, /* XSUM_XXH3_testdata[1645] */\n    {  823, 0x0000000000000000ULL, 0x8880C79B625256F8ULL }, /* XSUM_XXH3_testdata[1646] */\n    {  823, 0x9E3779B185EBCA8DULL, 0xFF6BE9029AE0895CULL }, /* XSUM_XXH3_testdata[1647] */\n    {  824, 0x0000000000000000ULL, 0x4147D273F26FE781ULL }, /* XSUM_XXH3_testdata[1648] */\n    {  824, 0x9E3779B185EBCA8DULL, 0x618098027E17A0A0ULL }, /* XSUM_XXH3_testdata[1649] */\n    {  825, 0x0000000000000000ULL, 0x160D37087AB92A86ULL }, /* XSUM_XXH3_testdata[1650] */\n    {  825, 0x9E3779B185EBCA8DULL, 0x1C9796C8BE1CCBEFULL }, /* XSUM_XXH3_testdata[1651] */\n    {  826, 0x0000000000000000ULL, 0xACD13537639F6E2CULL }, /* XSUM_XXH3_testdata[1652] */\n    {  826, 0x9E3779B185EBCA8DULL, 0xA9A04297D3F6EE2AULL }, /* XSUM_XXH3_testdata[1653] */\n    {  827, 0x0000000000000000ULL, 0xD35377738FD403A5ULL }, /* XSUM_XXH3_testdata[1654] */\n    {  827, 0x9E3779B185EBCA8DULL, 0x082EBC1AAA053BFDULL }, /* XSUM_XXH3_testdata[1655] */\n    {  828, 0x0000000000000000ULL, 0x2E9D98BE64D509E1ULL }, /* XSUM_XXH3_testdata[1656] */\n    {  828, 0x9E3779B185EBCA8DULL, 0x53E88588AF191AF0ULL }, /* XSUM_XXH3_testdata[1657] */\n    {  829, 0x0000000000000000ULL, 0x345221D1DF80DE65ULL }, /* XSUM_XXH3_testdata[1658] */\n    {  829, 0x9E3779B185EBCA8DULL, 0xF6A17453C43DF45EULL }, /* XSUM_XXH3_testdata[1659] */\n    {  830, 0x0000000000000000ULL, 0x9BA2617F5A684FABULL }, /* XSUM_XXH3_testdata[1660] */\n    {  830, 0x9E3779B185EBCA8DULL, 0x898EDE976C4053FAULL }, /* XSUM_XXH3_testdata[1661] */\n    {  831, 0x0000000000000000ULL, 0x61B8D4254F92B112ULL }, /* XSUM_XXH3_testdata[1662] */\n    {  831, 0x9E3779B185EBCA8DULL, 0xDBA75D8F1D69BB43ULL }, /* XSUM_XXH3_testdata[1663] */\n    {  832, 0x0000000000000000ULL, 0xAFE6259BB7E82719ULL }, /* XSUM_XXH3_testdata[1664] */\n    {  832, 0x9E3779B185EBCA8DULL, 0xE3114F2B93221DA1ULL }, /* XSUM_XXH3_testdata[1665] */\n    {  833, 0x0000000000000000ULL, 0x90A398DB62F4700AULL }, /* XSUM_XXH3_testdata[1666] */\n    {  833, 0x9E3779B185EBCA8DULL, 0x22B16D152E53363BULL }, /* XSUM_XXH3_testdata[1667] */\n    {  834, 0x0000000000000000ULL, 0x1D102D3B3A811A53ULL }, /* XSUM_XXH3_testdata[1668] */\n    {  834, 0x9E3779B185EBCA8DULL, 0x9B504609CE528AEBULL }, /* XSUM_XXH3_testdata[1669] */\n    {  835, 0x0000000000000000ULL, 0xEFEB7FECE3799DD9ULL }, /* XSUM_XXH3_testdata[1670] */\n    {  835, 0x9E3779B185EBCA8DULL, 0x050797525A33E488ULL }, /* XSUM_XXH3_testdata[1671] */\n    {  836, 0x0000000000000000ULL, 0x78FB3B11A836CE75ULL }, /* XSUM_XXH3_testdata[1672] */\n    {  836, 0x9E3779B185EBCA8DULL, 0xD192EB96418DC6DBULL }, /* XSUM_XXH3_testdata[1673] */\n    {  837, 0x0000000000000000ULL, 0x4D88D78137833F01ULL }, /* XSUM_XXH3_testdata[1674] */\n    {  837, 0x9E3779B185EBCA8DULL, 0x09D6DAEDC3A0869CULL }, /* XSUM_XXH3_testdata[1675] */\n    {  838, 0x0000000000000000ULL, 0x4BD49C3A51933BE0ULL }, /* XSUM_XXH3_testdata[1676] */\n    {  838, 0x9E3779B185EBCA8DULL, 0x58930BCAE3E3A184ULL }, /* XSUM_XXH3_testdata[1677] */\n    {  839, 0x0000000000000000ULL, 0x54F7F848A1913FF5ULL }, /* XSUM_XXH3_testdata[1678] */\n    {  839, 0x9E3779B185EBCA8DULL, 0x33ABE251569EB133ULL }, /* XSUM_XXH3_testdata[1679] */\n    {  840, 0x0000000000000000ULL, 0x106712127B9D230CULL }, /* XSUM_XXH3_testdata[1680] */\n    {  840, 0x9E3779B185EBCA8DULL, 0xB5E8BC576AEA8BA4ULL }, /* XSUM_XXH3_testdata[1681] */\n    {  841, 0x0000000000000000ULL, 0x18070CF1879F1977ULL }, /* XSUM_XXH3_testdata[1682] */\n    {  841, 0x9E3779B185EBCA8DULL, 0x1FADBB600D162135ULL }, /* XSUM_XXH3_testdata[1683] */\n    {  842, 0x0000000000000000ULL, 0x83397F11D484A571ULL }, /* XSUM_XXH3_testdata[1684] */\n    {  842, 0x9E3779B185EBCA8DULL, 0x9EFF0FD8F3152F8AULL }, /* XSUM_XXH3_testdata[1685] */\n    {  843, 0x0000000000000000ULL, 0xCE992E147CE99E40ULL }, /* XSUM_XXH3_testdata[1686] */\n    {  843, 0x9E3779B185EBCA8DULL, 0x641FEE7F734F5C28ULL }, /* XSUM_XXH3_testdata[1687] */\n    {  844, 0x0000000000000000ULL, 0x136A5AD87FB1F3C5ULL }, /* XSUM_XXH3_testdata[1688] */\n    {  844, 0x9E3779B185EBCA8DULL, 0xBF94331CE9448890ULL }, /* XSUM_XXH3_testdata[1689] */\n    {  845, 0x0000000000000000ULL, 0x7F01AB2D9DF65DC3ULL }, /* XSUM_XXH3_testdata[1690] */\n    {  845, 0x9E3779B185EBCA8DULL, 0x5EED94F76EB3A6C8ULL }, /* XSUM_XXH3_testdata[1691] */\n    {  846, 0x0000000000000000ULL, 0x4F0DF98A62744869ULL }, /* XSUM_XXH3_testdata[1692] */\n    {  846, 0x9E3779B185EBCA8DULL, 0xFD4DE9380591A06EULL }, /* XSUM_XXH3_testdata[1693] */\n    {  847, 0x0000000000000000ULL, 0x9F0A5D405E382663ULL }, /* XSUM_XXH3_testdata[1694] */\n    {  847, 0x9E3779B185EBCA8DULL, 0xE47F9D04CD36BBADULL }, /* XSUM_XXH3_testdata[1695] */\n    {  848, 0x0000000000000000ULL, 0x180BB00A39D5EC5AULL }, /* XSUM_XXH3_testdata[1696] */\n    {  848, 0x9E3779B185EBCA8DULL, 0xDE5A14F15157E51EULL }, /* XSUM_XXH3_testdata[1697] */\n    {  849, 0x0000000000000000ULL, 0xF4BE363521B6A2C6ULL }, /* XSUM_XXH3_testdata[1698] */\n    {  849, 0x9E3779B185EBCA8DULL, 0x8D1797C2052BFE82ULL }, /* XSUM_XXH3_testdata[1699] */\n    {  850, 0x0000000000000000ULL, 0x86C780FD0CE8BF78ULL }, /* XSUM_XXH3_testdata[1700] */\n    {  850, 0x9E3779B185EBCA8DULL, 0xAD01A1D5CC629CD5ULL }, /* XSUM_XXH3_testdata[1701] */\n    {  851, 0x0000000000000000ULL, 0xB3F7DB8C1B281BFDULL }, /* XSUM_XXH3_testdata[1702] */\n    {  851, 0x9E3779B185EBCA8DULL, 0x3E0C5DC2505E9FEEULL }, /* XSUM_XXH3_testdata[1703] */\n    {  852, 0x0000000000000000ULL, 0xF921BC2813B654C5ULL }, /* XSUM_XXH3_testdata[1704] */\n    {  852, 0x9E3779B185EBCA8DULL, 0xE1ABC48311801DE5ULL }, /* XSUM_XXH3_testdata[1705] */\n    {  853, 0x0000000000000000ULL, 0xAC60F24E6BB9314CULL }, /* XSUM_XXH3_testdata[1706] */\n    {  853, 0x9E3779B185EBCA8DULL, 0x8323286894810D00ULL }, /* XSUM_XXH3_testdata[1707] */\n    {  854, 0x0000000000000000ULL, 0x22731EEACE036B70ULL }, /* XSUM_XXH3_testdata[1708] */\n    {  854, 0x9E3779B185EBCA8DULL, 0x53111315216E6E05ULL }, /* XSUM_XXH3_testdata[1709] */\n    {  855, 0x0000000000000000ULL, 0xAEC9AAF7BD2AF359ULL }, /* XSUM_XXH3_testdata[1710] */\n    {  855, 0x9E3779B185EBCA8DULL, 0x2AB74C5CFD15B3AEULL }, /* XSUM_XXH3_testdata[1711] */\n    {  856, 0x0000000000000000ULL, 0x2205D490BEBCC708ULL }, /* XSUM_XXH3_testdata[1712] */\n    {  856, 0x9E3779B185EBCA8DULL, 0x311BB4AC9FB9FD3EULL }, /* XSUM_XXH3_testdata[1713] */\n    {  857, 0x0000000000000000ULL, 0xA2DDF9996C06CB02ULL }, /* XSUM_XXH3_testdata[1714] */\n    {  857, 0x9E3779B185EBCA8DULL, 0x57E4EC23A8A1ACCBULL }, /* XSUM_XXH3_testdata[1715] */\n    {  858, 0x0000000000000000ULL, 0x8DB85910823CCFF9ULL }, /* XSUM_XXH3_testdata[1716] */\n    {  858, 0x9E3779B185EBCA8DULL, 0x3360E621581CB408ULL }, /* XSUM_XXH3_testdata[1717] */\n    {  859, 0x0000000000000000ULL, 0x0020D5DDB96FF188ULL }, /* XSUM_XXH3_testdata[1718] */\n    {  859, 0x9E3779B185EBCA8DULL, 0x32D27A0B45A43231ULL }, /* XSUM_XXH3_testdata[1719] */\n    {  860, 0x0000000000000000ULL, 0x6E0260DD43742DF4ULL }, /* XSUM_XXH3_testdata[1720] */\n    {  860, 0x9E3779B185EBCA8DULL, 0x617926484A47AA64ULL }, /* XSUM_XXH3_testdata[1721] */\n    {  861, 0x0000000000000000ULL, 0x998F39A94253AF75ULL }, /* XSUM_XXH3_testdata[1722] */\n    {  861, 0x9E3779B185EBCA8DULL, 0x8FAA1AE17209850CULL }, /* XSUM_XXH3_testdata[1723] */\n    {  862, 0x0000000000000000ULL, 0x9C3CA9F498794551ULL }, /* XSUM_XXH3_testdata[1724] */\n    {  862, 0x9E3779B185EBCA8DULL, 0xA9E1257DB5D93D57ULL }, /* XSUM_XXH3_testdata[1725] */\n    {  863, 0x0000000000000000ULL, 0xD4AB596FA5B43697ULL }, /* XSUM_XXH3_testdata[1726] */\n    {  863, 0x9E3779B185EBCA8DULL, 0x77A4A22D9975994DULL }, /* XSUM_XXH3_testdata[1727] */\n    {  864, 0x0000000000000000ULL, 0xAECA70EC1A19053CULL }, /* XSUM_XXH3_testdata[1728] */\n    {  864, 0x9E3779B185EBCA8DULL, 0x62864C38E63F2DBFULL }, /* XSUM_XXH3_testdata[1729] */\n    {  865, 0x0000000000000000ULL, 0x920BE4DA2EE72450ULL }, /* XSUM_XXH3_testdata[1730] */\n    {  865, 0x9E3779B185EBCA8DULL, 0x679D32790A35B02AULL }, /* XSUM_XXH3_testdata[1731] */\n    {  866, 0x0000000000000000ULL, 0xB0AE8C8931036064ULL }, /* XSUM_XXH3_testdata[1732] */\n    {  866, 0x9E3779B185EBCA8DULL, 0xFF70578E60774C95ULL }, /* XSUM_XXH3_testdata[1733] */\n    {  867, 0x0000000000000000ULL, 0x204497CC1D90FFE3ULL }, /* XSUM_XXH3_testdata[1734] */\n    {  867, 0x9E3779B185EBCA8DULL, 0x249388B8EE2A692EULL }, /* XSUM_XXH3_testdata[1735] */\n    {  868, 0x0000000000000000ULL, 0xCC7D891B3841AEA2ULL }, /* XSUM_XXH3_testdata[1736] */\n    {  868, 0x9E3779B185EBCA8DULL, 0x4A1094F278CD47FBULL }, /* XSUM_XXH3_testdata[1737] */\n    {  869, 0x0000000000000000ULL, 0x6F28F68421F6E239ULL }, /* XSUM_XXH3_testdata[1738] */\n    {  869, 0x9E3779B185EBCA8DULL, 0x7F4400B6740AF6C9ULL }, /* XSUM_XXH3_testdata[1739] */\n    {  870, 0x0000000000000000ULL, 0xA4E36B16E55D8471ULL }, /* XSUM_XXH3_testdata[1740] */\n    {  870, 0x9E3779B185EBCA8DULL, 0x051FC97AD46E2D89ULL }, /* XSUM_XXH3_testdata[1741] */\n    {  871, 0x0000000000000000ULL, 0x1D795DD6A022F3F2ULL }, /* XSUM_XXH3_testdata[1742] */\n    {  871, 0x9E3779B185EBCA8DULL, 0xDA17BFCD5421D4ECULL }, /* XSUM_XXH3_testdata[1743] */\n    {  872, 0x0000000000000000ULL, 0x5390B479AD9BFF1DULL }, /* XSUM_XXH3_testdata[1744] */\n    {  872, 0x9E3779B185EBCA8DULL, 0xA021AA74FC1AE49AULL }, /* XSUM_XXH3_testdata[1745] */\n    {  873, 0x0000000000000000ULL, 0x9CFE87FA820B89F5ULL }, /* XSUM_XXH3_testdata[1746] */\n    {  873, 0x9E3779B185EBCA8DULL, 0xB44A4C7912BDD7FFULL }, /* XSUM_XXH3_testdata[1747] */\n    {  874, 0x0000000000000000ULL, 0x670D930CF6A5CA58ULL }, /* XSUM_XXH3_testdata[1748] */\n    {  874, 0x9E3779B185EBCA8DULL, 0x097D5B727BDAC8E7ULL }, /* XSUM_XXH3_testdata[1749] */\n    {  875, 0x0000000000000000ULL, 0x3268191F1A35F955ULL }, /* XSUM_XXH3_testdata[1750] */\n    {  875, 0x9E3779B185EBCA8DULL, 0xFB57D6BBCADCA138ULL }, /* XSUM_XXH3_testdata[1751] */\n    {  876, 0x0000000000000000ULL, 0x16B613946323F178ULL }, /* XSUM_XXH3_testdata[1752] */\n    {  876, 0x9E3779B185EBCA8DULL, 0x720DA302255D6B3CULL }, /* XSUM_XXH3_testdata[1753] */\n    {  877, 0x0000000000000000ULL, 0xD5D45FAB9D869310ULL }, /* XSUM_XXH3_testdata[1754] */\n    {  877, 0x9E3779B185EBCA8DULL, 0x9DD738725E07D61AULL }, /* XSUM_XXH3_testdata[1755] */\n    {  878, 0x0000000000000000ULL, 0x7BBEA66E7FD64EEEULL }, /* XSUM_XXH3_testdata[1756] */\n    {  878, 0x9E3779B185EBCA8DULL, 0xC5911D65D313D0D4ULL }, /* XSUM_XXH3_testdata[1757] */\n    {  879, 0x0000000000000000ULL, 0xCC9E1F621CEB5CB7ULL }, /* XSUM_XXH3_testdata[1758] */\n    {  879, 0x9E3779B185EBCA8DULL, 0x9A2250D02FE3633CULL }, /* XSUM_XXH3_testdata[1759] */\n    {  880, 0x0000000000000000ULL, 0xA1D25334FA04F008ULL }, /* XSUM_XXH3_testdata[1760] */\n    {  880, 0x9E3779B185EBCA8DULL, 0x4E33561D714D981CULL }, /* XSUM_XXH3_testdata[1761] */\n    {  881, 0x0000000000000000ULL, 0xF4315D7612F5987DULL }, /* XSUM_XXH3_testdata[1762] */\n    {  881, 0x9E3779B185EBCA8DULL, 0x6D3745E180F80558ULL }, /* XSUM_XXH3_testdata[1763] */\n    {  882, 0x0000000000000000ULL, 0x3645B0BF88B738DEULL }, /* XSUM_XXH3_testdata[1764] */\n    {  882, 0x9E3779B185EBCA8DULL, 0x1472A4D0F250D3C1ULL }, /* XSUM_XXH3_testdata[1765] */\n    {  883, 0x0000000000000000ULL, 0x0D60690DC6B281CDULL }, /* XSUM_XXH3_testdata[1766] */\n    {  883, 0x9E3779B185EBCA8DULL, 0xBF80AA58B601D3ECULL }, /* XSUM_XXH3_testdata[1767] */\n    {  884, 0x0000000000000000ULL, 0x4F06C5E4BC84D817ULL }, /* XSUM_XXH3_testdata[1768] */\n    {  884, 0x9E3779B185EBCA8DULL, 0x50CD721756F80806ULL }, /* XSUM_XXH3_testdata[1769] */\n    {  885, 0x0000000000000000ULL, 0x0CF4D69F9BCBB028ULL }, /* XSUM_XXH3_testdata[1770] */\n    {  885, 0x9E3779B185EBCA8DULL, 0x6A873765C3253682ULL }, /* XSUM_XXH3_testdata[1771] */\n    {  886, 0x0000000000000000ULL, 0x33D3B47E5F0C1FEAULL }, /* XSUM_XXH3_testdata[1772] */\n    {  886, 0x9E3779B185EBCA8DULL, 0x569343E1255B1999ULL }, /* XSUM_XXH3_testdata[1773] */\n    {  887, 0x0000000000000000ULL, 0xB1EF8AC1E7FCCD2EULL }, /* XSUM_XXH3_testdata[1774] */\n    {  887, 0x9E3779B185EBCA8DULL, 0x664107083E169A21ULL }, /* XSUM_XXH3_testdata[1775] */\n    {  888, 0x0000000000000000ULL, 0xDFBC2F185FA2CB61ULL }, /* XSUM_XXH3_testdata[1776] */\n    {  888, 0x9E3779B185EBCA8DULL, 0x5720284D8DAC6716ULL }, /* XSUM_XXH3_testdata[1777] */\n    {  889, 0x0000000000000000ULL, 0xA695A95B654DBBE8ULL }, /* XSUM_XXH3_testdata[1778] */\n    {  889, 0x9E3779B185EBCA8DULL, 0x16269F2A5D26D293ULL }, /* XSUM_XXH3_testdata[1779] */\n    {  890, 0x0000000000000000ULL, 0x228EB6664629C43FULL }, /* XSUM_XXH3_testdata[1780] */\n    {  890, 0x9E3779B185EBCA8DULL, 0x48490F5C2AE2C3DAULL }, /* XSUM_XXH3_testdata[1781] */\n    {  891, 0x0000000000000000ULL, 0xF85745C98A2DFD73ULL }, /* XSUM_XXH3_testdata[1782] */\n    {  891, 0x9E3779B185EBCA8DULL, 0x51E26ECF6A11FC9FULL }, /* XSUM_XXH3_testdata[1783] */\n    {  892, 0x0000000000000000ULL, 0x1952503F7EA0927EULL }, /* XSUM_XXH3_testdata[1784] */\n    {  892, 0x9E3779B185EBCA8DULL, 0xF3E80A84EB3AC555ULL }, /* XSUM_XXH3_testdata[1785] */\n    {  893, 0x0000000000000000ULL, 0x7A66A9CAFD803854ULL }, /* XSUM_XXH3_testdata[1786] */\n    {  893, 0x9E3779B185EBCA8DULL, 0x80978CEDB4F12674ULL }, /* XSUM_XXH3_testdata[1787] */\n    {  894, 0x0000000000000000ULL, 0xB999B8C782978E87ULL }, /* XSUM_XXH3_testdata[1788] */\n    {  894, 0x9E3779B185EBCA8DULL, 0x1525D7EB13039E6FULL }, /* XSUM_XXH3_testdata[1789] */\n    {  895, 0x0000000000000000ULL, 0xB12EA692EC2B62C5ULL }, /* XSUM_XXH3_testdata[1790] */\n    {  895, 0x9E3779B185EBCA8DULL, 0x600CC0C92B11A232ULL }, /* XSUM_XXH3_testdata[1791] */\n    {  896, 0x0000000000000000ULL, 0xEB301FCAE547B530ULL }, /* XSUM_XXH3_testdata[1792] */\n    {  896, 0x9E3779B185EBCA8DULL, 0xE484EED3AE3F7B4AULL }, /* XSUM_XXH3_testdata[1793] */\n    {  897, 0x0000000000000000ULL, 0x3FE21A655967FAABULL }, /* XSUM_XXH3_testdata[1794] */\n    {  897, 0x9E3779B185EBCA8DULL, 0xEC34975953EAA864ULL }, /* XSUM_XXH3_testdata[1795] */\n    {  898, 0x0000000000000000ULL, 0x62DF6C1B622F8D08ULL }, /* XSUM_XXH3_testdata[1796] */\n    {  898, 0x9E3779B185EBCA8DULL, 0x7343CCBDE198051FULL }, /* XSUM_XXH3_testdata[1797] */\n    {  899, 0x0000000000000000ULL, 0xE0660A9CC7B6FF93ULL }, /* XSUM_XXH3_testdata[1798] */\n    {  899, 0x9E3779B185EBCA8DULL, 0x2D0B46C0D37409D6ULL }, /* XSUM_XXH3_testdata[1799] */\n    {  900, 0x0000000000000000ULL, 0x43A535685D650A1DULL }, /* XSUM_XXH3_testdata[1800] */\n    {  900, 0x9E3779B185EBCA8DULL, 0x9AA0F5DE9F232AE3ULL }, /* XSUM_XXH3_testdata[1801] */\n    {  901, 0x0000000000000000ULL, 0xF10B28C4A5F1D834ULL }, /* XSUM_XXH3_testdata[1802] */\n    {  901, 0x9E3779B185EBCA8DULL, 0xDCB25A5484361112ULL }, /* XSUM_XXH3_testdata[1803] */\n    {  902, 0x0000000000000000ULL, 0xF78121EBCC58B064ULL }, /* XSUM_XXH3_testdata[1804] */\n    {  902, 0x9E3779B185EBCA8DULL, 0xB07E3F3CFE793C40ULL }, /* XSUM_XXH3_testdata[1805] */\n    {  903, 0x0000000000000000ULL, 0x39020A97794C2E78ULL }, /* XSUM_XXH3_testdata[1806] */\n    {  903, 0x9E3779B185EBCA8DULL, 0xEF9157C276C8A510ULL }, /* XSUM_XXH3_testdata[1807] */\n    {  904, 0x0000000000000000ULL, 0x3CD1DC80F8017C63ULL }, /* XSUM_XXH3_testdata[1808] */\n    {  904, 0x9E3779B185EBCA8DULL, 0x28BF86B604D416C8ULL }, /* XSUM_XXH3_testdata[1809] */\n    {  905, 0x0000000000000000ULL, 0x2A749BB33C70892FULL }, /* XSUM_XXH3_testdata[1810] */\n    {  905, 0x9E3779B185EBCA8DULL, 0x03806DC4CE1C026BULL }, /* XSUM_XXH3_testdata[1811] */\n    {  906, 0x0000000000000000ULL, 0x08924B7FB5A00477ULL }, /* XSUM_XXH3_testdata[1812] */\n    {  906, 0x9E3779B185EBCA8DULL, 0x8F5985423A9AB05AULL }, /* XSUM_XXH3_testdata[1813] */\n    {  907, 0x0000000000000000ULL, 0x706A6A5F8534ED41ULL }, /* XSUM_XXH3_testdata[1814] */\n    {  907, 0x9E3779B185EBCA8DULL, 0x07EF945CA2C9BBA9ULL }, /* XSUM_XXH3_testdata[1815] */\n    {  908, 0x0000000000000000ULL, 0xB8A4DB648697F221ULL }, /* XSUM_XXH3_testdata[1816] */\n    {  908, 0x9E3779B185EBCA8DULL, 0xE46FA8E96335AB05ULL }, /* XSUM_XXH3_testdata[1817] */\n    {  909, 0x0000000000000000ULL, 0x0D9D86B2E61E86C9ULL }, /* XSUM_XXH3_testdata[1818] */\n    {  909, 0x9E3779B185EBCA8DULL, 0x526D4E68604C4B94ULL }, /* XSUM_XXH3_testdata[1819] */\n    {  910, 0x0000000000000000ULL, 0xF2B877B46D63623AULL }, /* XSUM_XXH3_testdata[1820] */\n    {  910, 0x9E3779B185EBCA8DULL, 0xF37A6ECF8FD2FE7EULL }, /* XSUM_XXH3_testdata[1821] */\n    {  911, 0x0000000000000000ULL, 0x01EF8AF310173CEFULL }, /* XSUM_XXH3_testdata[1822] */\n    {  911, 0x9E3779B185EBCA8DULL, 0x8E28E708BD090493ULL }, /* XSUM_XXH3_testdata[1823] */\n    {  912, 0x0000000000000000ULL, 0xFAE2DFBAAA25F72FULL }, /* XSUM_XXH3_testdata[1824] */\n    {  912, 0x9E3779B185EBCA8DULL, 0xC9B6670513781477ULL }, /* XSUM_XXH3_testdata[1825] */\n    {  913, 0x0000000000000000ULL, 0x0F887DF943467AECULL }, /* XSUM_XXH3_testdata[1826] */\n    {  913, 0x9E3779B185EBCA8DULL, 0x52476A601F434F73ULL }, /* XSUM_XXH3_testdata[1827] */\n    {  914, 0x0000000000000000ULL, 0x5167A6FE26B8AAE7ULL }, /* XSUM_XXH3_testdata[1828] */\n    {  914, 0x9E3779B185EBCA8DULL, 0x62234A2F13194C83ULL }, /* XSUM_XXH3_testdata[1829] */\n    {  915, 0x0000000000000000ULL, 0xC0A5ED24EB5DB096ULL }, /* XSUM_XXH3_testdata[1830] */\n    {  915, 0x9E3779B185EBCA8DULL, 0x1CF98E391B72DD0DULL }, /* XSUM_XXH3_testdata[1831] */\n    {  916, 0x0000000000000000ULL, 0x6479E62533BDD5EBULL }, /* XSUM_XXH3_testdata[1832] */\n    {  916, 0x9E3779B185EBCA8DULL, 0xBF125B8684945E35ULL }, /* XSUM_XXH3_testdata[1833] */\n    {  917, 0x0000000000000000ULL, 0xC2F0B86031A0F801ULL }, /* XSUM_XXH3_testdata[1834] */\n    {  917, 0x9E3779B185EBCA8DULL, 0xF8598497B749DEACULL }, /* XSUM_XXH3_testdata[1835] */\n    {  918, 0x0000000000000000ULL, 0x93DC4E8E9C05BB21ULL }, /* XSUM_XXH3_testdata[1836] */\n    {  918, 0x9E3779B185EBCA8DULL, 0xDEDC0CB3439B9699ULL }, /* XSUM_XXH3_testdata[1837] */\n    {  919, 0x0000000000000000ULL, 0x94BC6E4CDEC216D4ULL }, /* XSUM_XXH3_testdata[1838] */\n    {  919, 0x9E3779B185EBCA8DULL, 0xA8B6770050EE599BULL }, /* XSUM_XXH3_testdata[1839] */\n    {  920, 0x0000000000000000ULL, 0xE653BE122CE7A2CDULL }, /* XSUM_XXH3_testdata[1840] */\n    {  920, 0x9E3779B185EBCA8DULL, 0x8B3A5165B6C84D2BULL }, /* XSUM_XXH3_testdata[1841] */\n    {  921, 0x0000000000000000ULL, 0x1323F1B07FF3DEACULL }, /* XSUM_XXH3_testdata[1842] */\n    {  921, 0x9E3779B185EBCA8DULL, 0x8E14FC108078B608ULL }, /* XSUM_XXH3_testdata[1843] */\n    {  922, 0x0000000000000000ULL, 0xA98AC6B852D82AABULL }, /* XSUM_XXH3_testdata[1844] */\n    {  922, 0x9E3779B185EBCA8DULL, 0x95C5DF89A2BD069FULL }, /* XSUM_XXH3_testdata[1845] */\n    {  923, 0x0000000000000000ULL, 0x9D686372D8B0617AULL }, /* XSUM_XXH3_testdata[1846] */\n    {  923, 0x9E3779B185EBCA8DULL, 0xEDFD83FABDDDBC8BULL }, /* XSUM_XXH3_testdata[1847] */\n    {  924, 0x0000000000000000ULL, 0x5F978BEF6DE12D27ULL }, /* XSUM_XXH3_testdata[1848] */\n    {  924, 0x9E3779B185EBCA8DULL, 0xE488654B9218CD99ULL }, /* XSUM_XXH3_testdata[1849] */\n    {  925, 0x0000000000000000ULL, 0xFA6D5149FA2D1F6AULL }, /* XSUM_XXH3_testdata[1850] */\n    {  925, 0x9E3779B185EBCA8DULL, 0xB84A15EAE6E992BAULL }, /* XSUM_XXH3_testdata[1851] */\n    {  926, 0x0000000000000000ULL, 0x9BB97F3BD2CD307BULL }, /* XSUM_XXH3_testdata[1852] */\n    {  926, 0x9E3779B185EBCA8DULL, 0x2622E4C4AAA4FD07ULL }, /* XSUM_XXH3_testdata[1853] */\n    {  927, 0x0000000000000000ULL, 0x36078B5DD5914CEBULL }, /* XSUM_XXH3_testdata[1854] */\n    {  927, 0x9E3779B185EBCA8DULL, 0x26D68DB45FF74F0EULL }, /* XSUM_XXH3_testdata[1855] */\n    {  928, 0x0000000000000000ULL, 0xBD54D90ADD4F9E19ULL }, /* XSUM_XXH3_testdata[1856] */\n    {  928, 0x9E3779B185EBCA8DULL, 0x49F9C3EA8E5EF802ULL }, /* XSUM_XXH3_testdata[1857] */\n    {  929, 0x0000000000000000ULL, 0x5DBA3CAEC1DBDF12ULL }, /* XSUM_XXH3_testdata[1858] */\n    {  929, 0x9E3779B185EBCA8DULL, 0x9B2D2B4E1558FF19ULL }, /* XSUM_XXH3_testdata[1859] */\n    {  930, 0x0000000000000000ULL, 0x7DCE91B0CE47F963ULL }, /* XSUM_XXH3_testdata[1860] */\n    {  930, 0x9E3779B185EBCA8DULL, 0x6ABFB039DEE45CE2ULL }, /* XSUM_XXH3_testdata[1861] */\n    {  931, 0x0000000000000000ULL, 0x371A894FD8074EBBULL }, /* XSUM_XXH3_testdata[1862] */\n    {  931, 0x9E3779B185EBCA8DULL, 0x31D6447D326D6B32ULL }, /* XSUM_XXH3_testdata[1863] */\n    {  932, 0x0000000000000000ULL, 0x8495ACB80721BB37ULL }, /* XSUM_XXH3_testdata[1864] */\n    {  932, 0x9E3779B185EBCA8DULL, 0x31C1E3EED31EF4E7ULL }, /* XSUM_XXH3_testdata[1865] */\n    {  933, 0x0000000000000000ULL, 0x6D91845A2A2BB1DBULL }, /* XSUM_XXH3_testdata[1866] */\n    {  933, 0x9E3779B185EBCA8DULL, 0x790732AA889611E7ULL }, /* XSUM_XXH3_testdata[1867] */\n    {  934, 0x0000000000000000ULL, 0xC21D749AA1EAFF14ULL }, /* XSUM_XXH3_testdata[1868] */\n    {  934, 0x9E3779B185EBCA8DULL, 0xAED572A2CC21B33DULL }, /* XSUM_XXH3_testdata[1869] */\n    {  935, 0x0000000000000000ULL, 0xBCC4C1401CB5F8E9ULL }, /* XSUM_XXH3_testdata[1870] */\n    {  935, 0x9E3779B185EBCA8DULL, 0x432A10F5AB90C1C2ULL }, /* XSUM_XXH3_testdata[1871] */\n    {  936, 0x0000000000000000ULL, 0x444796D6AD1567C5ULL }, /* XSUM_XXH3_testdata[1872] */\n    {  936, 0x9E3779B185EBCA8DULL, 0x29541667E8C08536ULL }, /* XSUM_XXH3_testdata[1873] */\n    {  937, 0x0000000000000000ULL, 0xCB76E240E83972D6ULL }, /* XSUM_XXH3_testdata[1874] */\n    {  937, 0x9E3779B185EBCA8DULL, 0x7280116BD4511CC7ULL }, /* XSUM_XXH3_testdata[1875] */\n    {  938, 0x0000000000000000ULL, 0x824916E17BACABF0ULL }, /* XSUM_XXH3_testdata[1876] */\n    {  938, 0x9E3779B185EBCA8DULL, 0xA6BF5C3E53C802DBULL }, /* XSUM_XXH3_testdata[1877] */\n    {  939, 0x0000000000000000ULL, 0xED6D1032D38614FDULL }, /* XSUM_XXH3_testdata[1878] */\n    {  939, 0x9E3779B185EBCA8DULL, 0x2DB0AC3D03C26BFAULL }, /* XSUM_XXH3_testdata[1879] */\n    {  940, 0x0000000000000000ULL, 0x148DC4872BB44686ULL }, /* XSUM_XXH3_testdata[1880] */\n    {  940, 0x9E3779B185EBCA8DULL, 0xBDDD7BEA37E2D08CULL }, /* XSUM_XXH3_testdata[1881] */\n    {  941, 0x0000000000000000ULL, 0x9E113AF44A0C8A70ULL }, /* XSUM_XXH3_testdata[1882] */\n    {  941, 0x9E3779B185EBCA8DULL, 0xEAAE0F49DCE8ADCAULL }, /* XSUM_XXH3_testdata[1883] */\n    {  942, 0x0000000000000000ULL, 0x90A91675BEC9FA4EULL }, /* XSUM_XXH3_testdata[1884] */\n    {  942, 0x9E3779B185EBCA8DULL, 0x1879758BA0BB13EAULL }, /* XSUM_XXH3_testdata[1885] */\n    {  943, 0x0000000000000000ULL, 0xEC8CEBB06CD11A8AULL }, /* XSUM_XXH3_testdata[1886] */\n    {  943, 0x9E3779B185EBCA8DULL, 0xC21ACB495A981932ULL }, /* XSUM_XXH3_testdata[1887] */\n    {  944, 0x0000000000000000ULL, 0x6A7091244E534E3CULL }, /* XSUM_XXH3_testdata[1888] */\n    {  944, 0x9E3779B185EBCA8DULL, 0x5D1E70B86A49B980ULL }, /* XSUM_XXH3_testdata[1889] */\n    {  945, 0x0000000000000000ULL, 0x82EA22FB35891761ULL }, /* XSUM_XXH3_testdata[1890] */\n    {  945, 0x9E3779B185EBCA8DULL, 0xF4B220EE80259595ULL }, /* XSUM_XXH3_testdata[1891] */\n    {  946, 0x0000000000000000ULL, 0xACF35CB8E8FED358ULL }, /* XSUM_XXH3_testdata[1892] */\n    {  946, 0x9E3779B185EBCA8DULL, 0xF9958FDE6CB21BB5ULL }, /* XSUM_XXH3_testdata[1893] */\n    {  947, 0x0000000000000000ULL, 0x5C6EFE1FF72335D7ULL }, /* XSUM_XXH3_testdata[1894] */\n    {  947, 0x9E3779B185EBCA8DULL, 0x9520A8144A7FF689ULL }, /* XSUM_XXH3_testdata[1895] */\n    {  948, 0x0000000000000000ULL, 0x567DF9A42493FDB3ULL }, /* XSUM_XXH3_testdata[1896] */\n    {  948, 0x9E3779B185EBCA8DULL, 0xFA4DFA8B65E1EAAFULL }, /* XSUM_XXH3_testdata[1897] */\n    {  949, 0x0000000000000000ULL, 0xC508DD9AF56985D5ULL }, /* XSUM_XXH3_testdata[1898] */\n    {  949, 0x9E3779B185EBCA8DULL, 0x3A0562B2FCC5C0EBULL }, /* XSUM_XXH3_testdata[1899] */\n    {  950, 0x0000000000000000ULL, 0x41186209BD02FADDULL }, /* XSUM_XXH3_testdata[1900] */\n    {  950, 0x9E3779B185EBCA8DULL, 0x5D4937DA6AA3A2FEULL }, /* XSUM_XXH3_testdata[1901] */\n    {  951, 0x0000000000000000ULL, 0x783914173F2EB8E7ULL }, /* XSUM_XXH3_testdata[1902] */\n    {  951, 0x9E3779B185EBCA8DULL, 0xDA422CA94957EAEBULL }, /* XSUM_XXH3_testdata[1903] */\n    {  952, 0x0000000000000000ULL, 0xEB9DF3662F675040ULL }, /* XSUM_XXH3_testdata[1904] */\n    {  952, 0x9E3779B185EBCA8DULL, 0x73B56133DF93401EULL }, /* XSUM_XXH3_testdata[1905] */\n    {  953, 0x0000000000000000ULL, 0xF00743FE9E460004ULL }, /* XSUM_XXH3_testdata[1906] */\n    {  953, 0x9E3779B185EBCA8DULL, 0x1866ED8CBABE1A3DULL }, /* XSUM_XXH3_testdata[1907] */\n    {  954, 0x0000000000000000ULL, 0xB2596BFE9CEC1895ULL }, /* XSUM_XXH3_testdata[1908] */\n    {  954, 0x9E3779B185EBCA8DULL, 0xAFF4254FA818A82FULL }, /* XSUM_XXH3_testdata[1909] */\n    {  955, 0x0000000000000000ULL, 0xF916C57C73ED1F99ULL }, /* XSUM_XXH3_testdata[1910] */\n    {  955, 0x9E3779B185EBCA8DULL, 0xEB8A95E822A203E8ULL }, /* XSUM_XXH3_testdata[1911] */\n    {  956, 0x0000000000000000ULL, 0x754A1B63E490233DULL }, /* XSUM_XXH3_testdata[1912] */\n    {  956, 0x9E3779B185EBCA8DULL, 0xF00CFC6E19CB39A5ULL }, /* XSUM_XXH3_testdata[1913] */\n    {  957, 0x0000000000000000ULL, 0x1665CAC964F7F2A9ULL }, /* XSUM_XXH3_testdata[1914] */\n    {  957, 0x9E3779B185EBCA8DULL, 0x1F6A2B1236C582BDULL }, /* XSUM_XXH3_testdata[1915] */\n    {  958, 0x0000000000000000ULL, 0x759223EB7E626920ULL }, /* XSUM_XXH3_testdata[1916] */\n    {  958, 0x9E3779B185EBCA8DULL, 0x7EFE66A40789FE53ULL }, /* XSUM_XXH3_testdata[1917] */\n    {  959, 0x0000000000000000ULL, 0x513AF05AC8DD8178ULL }, /* XSUM_XXH3_testdata[1918] */\n    {  959, 0x9E3779B185EBCA8DULL, 0x8C264637730C8DA7ULL }, /* XSUM_XXH3_testdata[1919] */\n    {  960, 0x0000000000000000ULL, 0xFE24A9D0DDDF9D8AULL }, /* XSUM_XXH3_testdata[1920] */\n    {  960, 0x9E3779B185EBCA8DULL, 0xD9C532F2683CB21FULL }, /* XSUM_XXH3_testdata[1921] */\n    {  961, 0x0000000000000000ULL, 0x1CD144EFE4A034B5ULL }, /* XSUM_XXH3_testdata[1922] */\n    {  961, 0x9E3779B185EBCA8DULL, 0x7858A817512ED8D9ULL }, /* XSUM_XXH3_testdata[1923] */\n    {  962, 0x0000000000000000ULL, 0x2BD047984C5C5A81ULL }, /* XSUM_XXH3_testdata[1924] */\n    {  962, 0x9E3779B185EBCA8DULL, 0x8045BAB642C21C9FULL }, /* XSUM_XXH3_testdata[1925] */\n    {  963, 0x0000000000000000ULL, 0x2831D5630D734EA0ULL }, /* XSUM_XXH3_testdata[1926] */\n    {  963, 0x9E3779B185EBCA8DULL, 0xF5BACD92232D0A62ULL }, /* XSUM_XXH3_testdata[1927] */\n    {  964, 0x0000000000000000ULL, 0xD533B0E90916E484ULL }, /* XSUM_XXH3_testdata[1928] */\n    {  964, 0x9E3779B185EBCA8DULL, 0xB4289BD6EF7DF749ULL }, /* XSUM_XXH3_testdata[1929] */\n    {  965, 0x0000000000000000ULL, 0x4B44F43FC25AD87FULL }, /* XSUM_XXH3_testdata[1930] */\n    {  965, 0x9E3779B185EBCA8DULL, 0xDD12B4CB85317708ULL }, /* XSUM_XXH3_testdata[1931] */\n    {  966, 0x0000000000000000ULL, 0xFE4B70BD9F2DF5EDULL }, /* XSUM_XXH3_testdata[1932] */\n    {  966, 0x9E3779B185EBCA8DULL, 0x6F3913836220D1F8ULL }, /* XSUM_XXH3_testdata[1933] */\n    {  967, 0x0000000000000000ULL, 0x439BFC10070D916AULL }, /* XSUM_XXH3_testdata[1934] */\n    {  967, 0x9E3779B185EBCA8DULL, 0x587614E299F460B0ULL }, /* XSUM_XXH3_testdata[1935] */\n    {  968, 0x0000000000000000ULL, 0xB052046C8A9324BDULL }, /* XSUM_XXH3_testdata[1936] */\n    {  968, 0x9E3779B185EBCA8DULL, 0x46E202D4E5756772ULL }, /* XSUM_XXH3_testdata[1937] */\n    {  969, 0x0000000000000000ULL, 0x2806F44CE1246DDEULL }, /* XSUM_XXH3_testdata[1938] */\n    {  969, 0x9E3779B185EBCA8DULL, 0xA77A7EA17119CAC3ULL }, /* XSUM_XXH3_testdata[1939] */\n    {  970, 0x0000000000000000ULL, 0x25F0AF189799E631ULL }, /* XSUM_XXH3_testdata[1940] */\n    {  970, 0x9E3779B185EBCA8DULL, 0x9C9B5C0F36454D7CULL }, /* XSUM_XXH3_testdata[1941] */\n    {  971, 0x0000000000000000ULL, 0xF50246B95ECDA9E4ULL }, /* XSUM_XXH3_testdata[1942] */\n    {  971, 0x9E3779B185EBCA8DULL, 0xE9ACF6D87169767DULL }, /* XSUM_XXH3_testdata[1943] */\n    {  972, 0x0000000000000000ULL, 0x3EF86FEA3341E42EULL }, /* XSUM_XXH3_testdata[1944] */\n    {  972, 0x9E3779B185EBCA8DULL, 0x58F574C8DEB88D36ULL }, /* XSUM_XXH3_testdata[1945] */\n    {  973, 0x0000000000000000ULL, 0xFD473154ADC32463ULL }, /* XSUM_XXH3_testdata[1946] */\n    {  973, 0x9E3779B185EBCA8DULL, 0x74FA64423D24BD54ULL }, /* XSUM_XXH3_testdata[1947] */\n    {  974, 0x0000000000000000ULL, 0x79D7095057FB1A01ULL }, /* XSUM_XXH3_testdata[1948] */\n    {  974, 0x9E3779B185EBCA8DULL, 0x910CD3E6487021B6ULL }, /* XSUM_XXH3_testdata[1949] */\n    {  975, 0x0000000000000000ULL, 0x2C191A1968EAE2A5ULL }, /* XSUM_XXH3_testdata[1950] */\n    {  975, 0x9E3779B185EBCA8DULL, 0xC7BE6591F89CB029ULL }, /* XSUM_XXH3_testdata[1951] */\n    {  976, 0x0000000000000000ULL, 0x847930F68C337E18ULL }, /* XSUM_XXH3_testdata[1952] */\n    {  976, 0x9E3779B185EBCA8DULL, 0x37BAEA0B6E5FF98BULL }, /* XSUM_XXH3_testdata[1953] */\n    {  977, 0x0000000000000000ULL, 0x5CCB2E293A449EF5ULL }, /* XSUM_XXH3_testdata[1954] */\n    {  977, 0x9E3779B185EBCA8DULL, 0x3D029A1FADD33504ULL }, /* XSUM_XXH3_testdata[1955] */\n    {  978, 0x0000000000000000ULL, 0x5BE8E278B6C809D3ULL }, /* XSUM_XXH3_testdata[1956] */\n    {  978, 0x9E3779B185EBCA8DULL, 0xC287AC22226D2098ULL }, /* XSUM_XXH3_testdata[1957] */\n    {  979, 0x0000000000000000ULL, 0x42B7B8DF99998767ULL }, /* XSUM_XXH3_testdata[1958] */\n    {  979, 0x9E3779B185EBCA8DULL, 0x8DA15029F74AB2DEULL }, /* XSUM_XXH3_testdata[1959] */\n    {  980, 0x0000000000000000ULL, 0x68F9C7FE0AC0FF69ULL }, /* XSUM_XXH3_testdata[1960] */\n    {  980, 0x9E3779B185EBCA8DULL, 0x37995AA9D23FD7E3ULL }, /* XSUM_XXH3_testdata[1961] */\n    {  981, 0x0000000000000000ULL, 0xB67A3268F002C6CBULL }, /* XSUM_XXH3_testdata[1962] */\n    {  981, 0x9E3779B185EBCA8DULL, 0x82703E08CCCEDC61ULL }, /* XSUM_XXH3_testdata[1963] */\n    {  982, 0x0000000000000000ULL, 0xC047953EAE93E73CULL }, /* XSUM_XXH3_testdata[1964] */\n    {  982, 0x9E3779B185EBCA8DULL, 0xE60DA263894C9E34ULL }, /* XSUM_XXH3_testdata[1965] */\n    {  983, 0x0000000000000000ULL, 0xE08022B8696243A0ULL }, /* XSUM_XXH3_testdata[1966] */\n    {  983, 0x9E3779B185EBCA8DULL, 0x6E9D9A802898AC15ULL }, /* XSUM_XXH3_testdata[1967] */\n    {  984, 0x0000000000000000ULL, 0x7F68AD9E65D86585ULL }, /* XSUM_XXH3_testdata[1968] */\n    {  984, 0x9E3779B185EBCA8DULL, 0xED88D56ECC065575ULL }, /* XSUM_XXH3_testdata[1969] */\n    {  985, 0x0000000000000000ULL, 0xF6A5C3B386A60BBFULL }, /* XSUM_XXH3_testdata[1970] */\n    {  985, 0x9E3779B185EBCA8DULL, 0x77A345A5E3F88709ULL }, /* XSUM_XXH3_testdata[1971] */\n    {  986, 0x0000000000000000ULL, 0x58CC3E909FA9F5BDULL }, /* XSUM_XXH3_testdata[1972] */\n    {  986, 0x9E3779B185EBCA8DULL, 0x011D6945236E2C0CULL }, /* XSUM_XXH3_testdata[1973] */\n    {  987, 0x0000000000000000ULL, 0x0D47523883F69FA9ULL }, /* XSUM_XXH3_testdata[1974] */\n    {  987, 0x9E3779B185EBCA8DULL, 0x570D1E7719E41DC2ULL }, /* XSUM_XXH3_testdata[1975] */\n    {  988, 0x0000000000000000ULL, 0x1A1AC46CBBEAAAD1ULL }, /* XSUM_XXH3_testdata[1976] */\n    {  988, 0x9E3779B185EBCA8DULL, 0x9AED37FD61F9A416ULL }, /* XSUM_XXH3_testdata[1977] */\n    {  989, 0x0000000000000000ULL, 0x8E93C4B050966BB1ULL }, /* XSUM_XXH3_testdata[1978] */\n    {  989, 0x9E3779B185EBCA8DULL, 0x108C8174101F0EACULL }, /* XSUM_XXH3_testdata[1979] */\n    {  990, 0x0000000000000000ULL, 0xC2EDA1B6BD6749BCULL }, /* XSUM_XXH3_testdata[1980] */\n    {  990, 0x9E3779B185EBCA8DULL, 0xEC6BAD1C8B34102DULL }, /* XSUM_XXH3_testdata[1981] */\n    {  991, 0x0000000000000000ULL, 0xC7B1972C9C921032ULL }, /* XSUM_XXH3_testdata[1982] */\n    {  991, 0x9E3779B185EBCA8DULL, 0xEA5BCA1A20CEDB3EULL }, /* XSUM_XXH3_testdata[1983] */\n    {  992, 0x0000000000000000ULL, 0x18C85CB4A2C9A620ULL }, /* XSUM_XXH3_testdata[1984] */\n    {  992, 0x9E3779B185EBCA8DULL, 0xB449E17F4B0FDD67ULL }, /* XSUM_XXH3_testdata[1985] */\n    {  993, 0x0000000000000000ULL, 0xFEEDE161A30CA03AULL }, /* XSUM_XXH3_testdata[1986] */\n    {  993, 0x9E3779B185EBCA8DULL, 0x9F67135085013538ULL }, /* XSUM_XXH3_testdata[1987] */\n    {  994, 0x0000000000000000ULL, 0xF6B293974CB25B1AULL }, /* XSUM_XXH3_testdata[1988] */\n    {  994, 0x9E3779B185EBCA8DULL, 0x24528E293048D44AULL }, /* XSUM_XXH3_testdata[1989] */\n    {  995, 0x0000000000000000ULL, 0x746034558D6E91DEULL }, /* XSUM_XXH3_testdata[1990] */\n    {  995, 0x9E3779B185EBCA8DULL, 0x5C3241656A5ACEE4ULL }, /* XSUM_XXH3_testdata[1991] */\n    {  996, 0x0000000000000000ULL, 0x2DE3D36B702237AEULL }, /* XSUM_XXH3_testdata[1992] */\n    {  996, 0x9E3779B185EBCA8DULL, 0x76F1F1A3E234DE7BULL }, /* XSUM_XXH3_testdata[1993] */\n    {  997, 0x0000000000000000ULL, 0x6192470CD9AD6E76ULL }, /* XSUM_XXH3_testdata[1994] */\n    {  997, 0x9E3779B185EBCA8DULL, 0x0E079ABD2F1B1C45ULL }, /* XSUM_XXH3_testdata[1995] */\n    {  998, 0x0000000000000000ULL, 0x7734E47623D6B685ULL }, /* XSUM_XXH3_testdata[1996] */\n    {  998, 0x9E3779B185EBCA8DULL, 0xE3434BA35184F2C1ULL }, /* XSUM_XXH3_testdata[1997] */\n    {  999, 0x0000000000000000ULL, 0x55A65708067ACEDCULL }, /* XSUM_XXH3_testdata[1998] */\n    {  999, 0x9E3779B185EBCA8DULL, 0x27CC8E3AE8EE40D8ULL }, /* XSUM_XXH3_testdata[1999] */\n    { 1000, 0x0000000000000000ULL, 0xACA2DDE0F1951B9AULL }, /* XSUM_XXH3_testdata[2000] */\n    { 1000, 0x9E3779B185EBCA8DULL, 0xF4DD9ADF00FFB410ULL }, /* XSUM_XXH3_testdata[2001] */\n    { 1001, 0x0000000000000000ULL, 0xE9101423F454BD38ULL }, /* XSUM_XXH3_testdata[2002] */\n    { 1001, 0x9E3779B185EBCA8DULL, 0xC68210B5AC8E382BULL }, /* XSUM_XXH3_testdata[2003] */\n    { 1002, 0x0000000000000000ULL, 0xF49D4971CEA05084ULL }, /* XSUM_XXH3_testdata[2004] */\n    { 1002, 0x9E3779B185EBCA8DULL, 0x3D2A97C8F19264B1ULL }, /* XSUM_XXH3_testdata[2005] */\n    { 1003, 0x0000000000000000ULL, 0xBEBD123678D098EDULL }, /* XSUM_XXH3_testdata[2006] */\n    { 1003, 0x9E3779B185EBCA8DULL, 0x36DDC18A5C58CB6BULL }, /* XSUM_XXH3_testdata[2007] */\n    { 1004, 0x0000000000000000ULL, 0xD386DFEFE995B490ULL }, /* XSUM_XXH3_testdata[2008] */\n    { 1004, 0x9E3779B185EBCA8DULL, 0x2F3BC3AA5EF7DC03ULL }, /* XSUM_XXH3_testdata[2009] */\n    { 1005, 0x0000000000000000ULL, 0x4E1A567D14E33DE3ULL }, /* XSUM_XXH3_testdata[2010] */\n    { 1005, 0x9E3779B185EBCA8DULL, 0xA031BB7B4EB59BB4ULL }, /* XSUM_XXH3_testdata[2011] */\n    { 1006, 0x0000000000000000ULL, 0xFC95AF5EB710D6E2ULL }, /* XSUM_XXH3_testdata[2012] */\n    { 1006, 0x9E3779B185EBCA8DULL, 0x8AE9398B0A28B5A6ULL }, /* XSUM_XXH3_testdata[2013] */\n    { 1007, 0x0000000000000000ULL, 0x3C94D3B1BE27DF09ULL }, /* XSUM_XXH3_testdata[2014] */\n    { 1007, 0x9E3779B185EBCA8DULL, 0x1AFF90CE06456B96ULL }, /* XSUM_XXH3_testdata[2015] */\n    { 1008, 0x0000000000000000ULL, 0x7443AF3E66764D1EULL }, /* XSUM_XXH3_testdata[2016] */\n    { 1008, 0x9E3779B185EBCA8DULL, 0x3F58BAB1AA894D38ULL }, /* XSUM_XXH3_testdata[2017] */\n    { 1009, 0x0000000000000000ULL, 0x4380AF6AD92B433CULL }, /* XSUM_XXH3_testdata[2018] */\n    { 1009, 0x9E3779B185EBCA8DULL, 0xF32A8F872502E567ULL }, /* XSUM_XXH3_testdata[2019] */\n    { 1010, 0x0000000000000000ULL, 0x320660076851588DULL }, /* XSUM_XXH3_testdata[2020] */\n    { 1010, 0x9E3779B185EBCA8DULL, 0xA0EA89CBE904A81DULL }, /* XSUM_XXH3_testdata[2021] */\n    { 1011, 0x0000000000000000ULL, 0xA9B11CA20334C7EDULL }, /* XSUM_XXH3_testdata[2022] */\n    { 1011, 0x9E3779B185EBCA8DULL, 0x58D0282A68653B68ULL }, /* XSUM_XXH3_testdata[2023] */\n    { 1012, 0x0000000000000000ULL, 0xC434B9AD89D8BFBAULL }, /* XSUM_XXH3_testdata[2024] */\n    { 1012, 0x9E3779B185EBCA8DULL, 0x0653B8DDDF575EA5ULL }, /* XSUM_XXH3_testdata[2025] */\n    { 1013, 0x0000000000000000ULL, 0x5791552B6B00AECCULL }, /* XSUM_XXH3_testdata[2026] */\n    { 1013, 0x9E3779B185EBCA8DULL, 0x69069D993E0CE6ABULL }, /* XSUM_XXH3_testdata[2027] */\n    { 1014, 0x0000000000000000ULL, 0xF74095848CED1A23ULL }, /* XSUM_XXH3_testdata[2028] */\n    { 1014, 0x9E3779B185EBCA8DULL, 0x346F7032D6AC56D8ULL }, /* XSUM_XXH3_testdata[2029] */\n    { 1015, 0x0000000000000000ULL, 0xBF0615AAE6F0E1D9ULL }, /* XSUM_XXH3_testdata[2030] */\n    { 1015, 0x9E3779B185EBCA8DULL, 0xABBA2C176705503BULL }, /* XSUM_XXH3_testdata[2031] */\n    { 1016, 0x0000000000000000ULL, 0xC5DBE5C1E77C6B4AULL }, /* XSUM_XXH3_testdata[2032] */\n    { 1016, 0x9E3779B185EBCA8DULL, 0x5D66B028CDDB8081ULL }, /* XSUM_XXH3_testdata[2033] */\n    { 1017, 0x0000000000000000ULL, 0xFCC3D23FCA4F2F34ULL }, /* XSUM_XXH3_testdata[2034] */\n    { 1017, 0x9E3779B185EBCA8DULL, 0xE6F90A0F39E023A0ULL }, /* XSUM_XXH3_testdata[2035] */\n    { 1018, 0x0000000000000000ULL, 0x9AB47ADA8C071173ULL }, /* XSUM_XXH3_testdata[2036] */\n    { 1018, 0x9E3779B185EBCA8DULL, 0x6D49E13111072E23ULL }, /* XSUM_XXH3_testdata[2037] */\n    { 1019, 0x0000000000000000ULL, 0x5C4B1CCBE7064BAAULL }, /* XSUM_XXH3_testdata[2038] */\n    { 1019, 0x9E3779B185EBCA8DULL, 0x1F6737EEC7BD8C58ULL }, /* XSUM_XXH3_testdata[2039] */\n    { 1020, 0x0000000000000000ULL, 0x0FBE1CF65215FDE2ULL }, /* XSUM_XXH3_testdata[2040] */\n    { 1020, 0x9E3779B185EBCA8DULL, 0xE9C7080F15D87D03ULL }, /* XSUM_XXH3_testdata[2041] */\n    { 1021, 0x0000000000000000ULL, 0x8770C599A57B5E49ULL }, /* XSUM_XXH3_testdata[2042] */\n    { 1021, 0x9E3779B185EBCA8DULL, 0xA3E7956E4C5003B5ULL }, /* XSUM_XXH3_testdata[2043] */\n    { 1022, 0x0000000000000000ULL, 0x2086CA2AFA9691C3ULL }, /* XSUM_XXH3_testdata[2044] */\n    { 1022, 0x9E3779B185EBCA8DULL, 0x9EE4476C3178A9C6ULL }, /* XSUM_XXH3_testdata[2045] */\n    { 1023, 0x0000000000000000ULL, 0x87A8F7B2F2E22496ULL }, /* XSUM_XXH3_testdata[2046] */\n    { 1023, 0x9E3779B185EBCA8DULL, 0x0F0F02DE8590E1B5ULL }, /* XSUM_XXH3_testdata[2047] */\n    { 1024, 0x0000000000000000ULL, 0xDD85C9B5C1109C5CULL }, /* XSUM_XXH3_testdata[2048] */\n    { 1024, 0x9E3779B185EBCA8DULL, 0xEF368A8A2EBABAEFULL }, /* XSUM_XXH3_testdata[2049] */\n    { 1025, 0x0000000000000000ULL, 0xD870C0FA13211C6AULL }, /* XSUM_XXH3_testdata[2050] */\n    { 1025, 0x9E3779B185EBCA8DULL, 0x96792BCF9AF88519ULL }, /* XSUM_XXH3_testdata[2051] */\n    { 1026, 0x0000000000000000ULL, 0x98CE9E9675649F1BULL }, /* XSUM_XXH3_testdata[2052] */\n    { 1026, 0x9E3779B185EBCA8DULL, 0x8B5475338DDAF953ULL }, /* XSUM_XXH3_testdata[2053] */\n    { 1027, 0x0000000000000000ULL, 0x1DB6A5ED5D936883ULL }, /* XSUM_XXH3_testdata[2054] */\n    { 1027, 0x9E3779B185EBCA8DULL, 0xCEF217D93E959D1AULL }, /* XSUM_XXH3_testdata[2055] */\n    { 1028, 0x0000000000000000ULL, 0x9C9AD07A2A115FA7ULL }, /* XSUM_XXH3_testdata[2056] */\n    { 1028, 0x9E3779B185EBCA8DULL, 0x5D36EACAADB1279BULL }, /* XSUM_XXH3_testdata[2057] */\n    { 1029, 0x0000000000000000ULL, 0x155F9CDB78CD7842ULL }, /* XSUM_XXH3_testdata[2058] */\n    { 1029, 0x9E3779B185EBCA8DULL, 0xFAA98C40D531E1DEULL }, /* XSUM_XXH3_testdata[2059] */\n    { 1030, 0x0000000000000000ULL, 0x7A956CA41E99B600ULL }, /* XSUM_XXH3_testdata[2060] */\n    { 1030, 0x9E3779B185EBCA8DULL, 0x0B5360BD1D404FDEULL }, /* XSUM_XXH3_testdata[2061] */\n    { 1031, 0x0000000000000000ULL, 0x69DABF166D51A277ULL }, /* XSUM_XXH3_testdata[2062] */\n    { 1031, 0x9E3779B185EBCA8DULL, 0x8CA6A3E7C08A8FC3ULL }, /* XSUM_XXH3_testdata[2063] */\n    { 1032, 0x0000000000000000ULL, 0x971F86A1BDCFE566ULL }, /* XSUM_XXH3_testdata[2064] */\n    { 1032, 0x9E3779B185EBCA8DULL, 0x2E881BB43B229931ULL }, /* XSUM_XXH3_testdata[2065] */\n    { 1033, 0x0000000000000000ULL, 0xBE464C7E96B871BAULL }, /* XSUM_XXH3_testdata[2066] */\n    { 1033, 0x9E3779B185EBCA8DULL, 0x6F43FF0A9C9EA244ULL }, /* XSUM_XXH3_testdata[2067] */\n    { 1034, 0x0000000000000000ULL, 0xC02521049DF92CB8ULL }, /* XSUM_XXH3_testdata[2068] */\n    { 1034, 0x9E3779B185EBCA8DULL, 0x3F06DEBD338EA1A5ULL }, /* XSUM_XXH3_testdata[2069] */\n    { 1035, 0x0000000000000000ULL, 0x06BBBE5C26B7CB77ULL }, /* XSUM_XXH3_testdata[2070] */\n    { 1035, 0x9E3779B185EBCA8DULL, 0xC250E703CD1FBE84ULL }, /* XSUM_XXH3_testdata[2071] */\n    { 1036, 0x0000000000000000ULL, 0x01D826626E65A2EEULL }, /* XSUM_XXH3_testdata[2072] */\n    { 1036, 0x9E3779B185EBCA8DULL, 0x69A7882D6C8BDE53ULL }, /* XSUM_XXH3_testdata[2073] */\n    { 1037, 0x0000000000000000ULL, 0xF063CB9CD4578A55ULL }, /* XSUM_XXH3_testdata[2074] */\n    { 1037, 0x9E3779B185EBCA8DULL, 0x3FD4F7F303870465ULL }, /* XSUM_XXH3_testdata[2075] */\n    { 1038, 0x0000000000000000ULL, 0x8E349F3D8D9F2F90ULL }, /* XSUM_XXH3_testdata[2076] */\n    { 1038, 0x9E3779B185EBCA8DULL, 0x391C8D2CFE8B4B34ULL }, /* XSUM_XXH3_testdata[2077] */\n    { 1039, 0x0000000000000000ULL, 0xF1116C1D2A9292B2ULL }, /* XSUM_XXH3_testdata[2078] */\n    { 1039, 0x9E3779B185EBCA8DULL, 0xD06F9DAB13FE02D2ULL }, /* XSUM_XXH3_testdata[2079] */\n    { 1040, 0x0000000000000000ULL, 0xA76D74A9DE8985A1ULL }, /* XSUM_XXH3_testdata[2080] */\n    { 1040, 0x9E3779B185EBCA8DULL, 0x5A4223F66103555EULL }, /* XSUM_XXH3_testdata[2081] */\n    { 1041, 0x0000000000000000ULL, 0x3CEFA31E899356DAULL }, /* XSUM_XXH3_testdata[2082] */\n    { 1041, 0x9E3779B185EBCA8DULL, 0xF56CAFC19E330D25ULL }, /* XSUM_XXH3_testdata[2083] */\n    { 1042, 0x0000000000000000ULL, 0xB6DD00ABD69F904DULL }, /* XSUM_XXH3_testdata[2084] */\n    { 1042, 0x9E3779B185EBCA8DULL, 0x8A1A4C162B4E6894ULL }, /* XSUM_XXH3_testdata[2085] */\n    { 1043, 0x0000000000000000ULL, 0x8E91C0D2A6A52133ULL }, /* XSUM_XXH3_testdata[2086] */\n    { 1043, 0x9E3779B185EBCA8DULL, 0xCC9CAA0268B76274ULL }, /* XSUM_XXH3_testdata[2087] */\n    { 1044, 0x0000000000000000ULL, 0xB8C3C0659B2FE068ULL }, /* XSUM_XXH3_testdata[2088] */\n    { 1044, 0x9E3779B185EBCA8DULL, 0xBA33A9EA471FDC10ULL }, /* XSUM_XXH3_testdata[2089] */\n    { 1045, 0x0000000000000000ULL, 0x2BECBE68662B71E0ULL }, /* XSUM_XXH3_testdata[2090] */\n    { 1045, 0x9E3779B185EBCA8DULL, 0x6A8FD42845F6A964ULL }, /* XSUM_XXH3_testdata[2091] */\n    { 1046, 0x0000000000000000ULL, 0x4D5C08103EADC069ULL }, /* XSUM_XXH3_testdata[2092] */\n    { 1046, 0x9E3779B185EBCA8DULL, 0x25E533F4C6E77AF2ULL }, /* XSUM_XXH3_testdata[2093] */\n    { 1047, 0x0000000000000000ULL, 0x76713E6C64770146ULL }, /* XSUM_XXH3_testdata[2094] */\n    { 1047, 0x9E3779B185EBCA8DULL, 0x01ECB772F5B9494FULL }, /* XSUM_XXH3_testdata[2095] */\n    { 1048, 0x0000000000000000ULL, 0xE052326CFD55516EULL }, /* XSUM_XXH3_testdata[2096] */\n    { 1048, 0x9E3779B185EBCA8DULL, 0x676DD5995DED903AULL }, /* XSUM_XXH3_testdata[2097] */\n    { 1049, 0x0000000000000000ULL, 0xF7D3712B50172434ULL }, /* XSUM_XXH3_testdata[2098] */\n    { 1049, 0x9E3779B185EBCA8DULL, 0x75EE9355894644BDULL }, /* XSUM_XXH3_testdata[2099] */\n    { 1050, 0x0000000000000000ULL, 0x8A40AD467C7AEA14ULL }, /* XSUM_XXH3_testdata[2100] */\n    { 1050, 0x9E3779B185EBCA8DULL, 0xF5EA7D72E1FD129AULL }, /* XSUM_XXH3_testdata[2101] */\n    { 1051, 0x0000000000000000ULL, 0xBCA7110967265077ULL }, /* XSUM_XXH3_testdata[2102] */\n    { 1051, 0x9E3779B185EBCA8DULL, 0x4FE88A33E2612E11ULL }, /* XSUM_XXH3_testdata[2103] */\n    { 1052, 0x0000000000000000ULL, 0x5B33B788EAD4AD6EULL }, /* XSUM_XXH3_testdata[2104] */\n    { 1052, 0x9E3779B185EBCA8DULL, 0xCE71C2965772443BULL }, /* XSUM_XXH3_testdata[2105] */\n    { 1053, 0x0000000000000000ULL, 0xA5955CEE33323105ULL }, /* XSUM_XXH3_testdata[2106] */\n    { 1053, 0x9E3779B185EBCA8DULL, 0x57A968DEB59A1A8FULL }, /* XSUM_XXH3_testdata[2107] */\n    { 1054, 0x0000000000000000ULL, 0x00C093D5578529D4ULL }, /* XSUM_XXH3_testdata[2108] */\n    { 1054, 0x9E3779B185EBCA8DULL, 0xCCA75C47DCFF1A43ULL }, /* XSUM_XXH3_testdata[2109] */\n    { 1055, 0x0000000000000000ULL, 0xC574284022BCF09BULL }, /* XSUM_XXH3_testdata[2110] */\n    { 1055, 0x9E3779B185EBCA8DULL, 0x2A22F1BC3CDC5A70ULL }, /* XSUM_XXH3_testdata[2111] */\n    { 1056, 0x0000000000000000ULL, 0xA394C3F1F7C215F1ULL }, /* XSUM_XXH3_testdata[2112] */\n    { 1056, 0x9E3779B185EBCA8DULL, 0x7A6839FC8587F140ULL }, /* XSUM_XXH3_testdata[2113] */\n    { 1057, 0x0000000000000000ULL, 0x36E45F0DDC00F0C5ULL }, /* XSUM_XXH3_testdata[2114] */\n    { 1057, 0x9E3779B185EBCA8DULL, 0xF2219916F1A03E0BULL }, /* XSUM_XXH3_testdata[2115] */\n    { 1058, 0x0000000000000000ULL, 0x4E18A246FF6AAB29ULL }, /* XSUM_XXH3_testdata[2116] */\n    { 1058, 0x9E3779B185EBCA8DULL, 0xD0B5D80ABCB8BB3CULL }, /* XSUM_XXH3_testdata[2117] */\n    { 1059, 0x0000000000000000ULL, 0x424271DBB727328DULL }, /* XSUM_XXH3_testdata[2118] */\n    { 1059, 0x9E3779B185EBCA8DULL, 0xE9C25F7ADF790E5BULL }, /* XSUM_XXH3_testdata[2119] */\n    { 1060, 0x0000000000000000ULL, 0xE1E6A2BAADFD5436ULL }, /* XSUM_XXH3_testdata[2120] */\n    { 1060, 0x9E3779B185EBCA8DULL, 0x707E4C8B5557992BULL }, /* XSUM_XXH3_testdata[2121] */\n    { 1061, 0x0000000000000000ULL, 0x6B23AAE562F38052ULL }, /* XSUM_XXH3_testdata[2122] */\n    { 1061, 0x9E3779B185EBCA8DULL, 0x8F51CA25CD06EE06ULL }, /* XSUM_XXH3_testdata[2123] */\n    { 1062, 0x0000000000000000ULL, 0x922F0B0A6821EC73ULL }, /* XSUM_XXH3_testdata[2124] */\n    { 1062, 0x9E3779B185EBCA8DULL, 0x6F02284C71B0553DULL }, /* XSUM_XXH3_testdata[2125] */\n    { 1063, 0x0000000000000000ULL, 0x21CE5A98ADE6EC74ULL }, /* XSUM_XXH3_testdata[2126] */\n    { 1063, 0x9E3779B185EBCA8DULL, 0xE5E240032388491DULL }, /* XSUM_XXH3_testdata[2127] */\n    { 1064, 0x0000000000000000ULL, 0x226089CE44092546ULL }, /* XSUM_XXH3_testdata[2128] */\n    { 1064, 0x9E3779B185EBCA8DULL, 0xFA0F692527A8AACAULL }, /* XSUM_XXH3_testdata[2129] */\n    { 1065, 0x0000000000000000ULL, 0xF83D6BCACA56EF8DULL }, /* XSUM_XXH3_testdata[2130] */\n    { 1065, 0x9E3779B185EBCA8DULL, 0xA25F4EFAF8AE785BULL }, /* XSUM_XXH3_testdata[2131] */\n    { 1066, 0x0000000000000000ULL, 0xA5780B150D253C20ULL }, /* XSUM_XXH3_testdata[2132] */\n    { 1066, 0x9E3779B185EBCA8DULL, 0x39A8B561DF5E62C7ULL }, /* XSUM_XXH3_testdata[2133] */\n    { 1067, 0x0000000000000000ULL, 0x9E3EA16A1A56EAF4ULL }, /* XSUM_XXH3_testdata[2134] */\n    { 1067, 0x9E3779B185EBCA8DULL, 0xD91162AE17557C82ULL }, /* XSUM_XXH3_testdata[2135] */\n    { 1068, 0x0000000000000000ULL, 0x5E348E5F8475647CULL }, /* XSUM_XXH3_testdata[2136] */\n    { 1068, 0x9E3779B185EBCA8DULL, 0x177B8B886C394ABFULL }, /* XSUM_XXH3_testdata[2137] */\n    { 1069, 0x0000000000000000ULL, 0xCC930082EA2B699DULL }, /* XSUM_XXH3_testdata[2138] */\n    { 1069, 0x9E3779B185EBCA8DULL, 0xD0634BFF738E64ABULL }, /* XSUM_XXH3_testdata[2139] */\n    { 1070, 0x0000000000000000ULL, 0x2E7BCEAE98217341ULL }, /* XSUM_XXH3_testdata[2140] */\n    { 1070, 0x9E3779B185EBCA8DULL, 0x06042D86277FF953ULL }, /* XSUM_XXH3_testdata[2141] */\n    { 1071, 0x0000000000000000ULL, 0x04EB23B8ACA687A0ULL }, /* XSUM_XXH3_testdata[2142] */\n    { 1071, 0x9E3779B185EBCA8DULL, 0xD8AD2ECEE6693D59ULL }, /* XSUM_XXH3_testdata[2143] */\n    { 1072, 0x0000000000000000ULL, 0xF9D9E49384694B5CULL }, /* XSUM_XXH3_testdata[2144] */\n    { 1072, 0x9E3779B185EBCA8DULL, 0x06858C7D4097A8FDULL }, /* XSUM_XXH3_testdata[2145] */\n    { 1073, 0x0000000000000000ULL, 0xFCFC273C1C3CFB70ULL }, /* XSUM_XXH3_testdata[2146] */\n    { 1073, 0x9E3779B185EBCA8DULL, 0x298D6455960EDC32ULL }, /* XSUM_XXH3_testdata[2147] */\n    { 1074, 0x0000000000000000ULL, 0x4C838F49AB57B711ULL }, /* XSUM_XXH3_testdata[2148] */\n    { 1074, 0x9E3779B185EBCA8DULL, 0x76902BE06AA3A02CULL }, /* XSUM_XXH3_testdata[2149] */\n    { 1075, 0x0000000000000000ULL, 0x6CD6B8F2FDF983FCULL }, /* XSUM_XXH3_testdata[2150] */\n    { 1075, 0x9E3779B185EBCA8DULL, 0xF4E4814148E4D8E6ULL }, /* XSUM_XXH3_testdata[2151] */\n    { 1076, 0x0000000000000000ULL, 0x3EFD3A63B144CFA8ULL }, /* XSUM_XXH3_testdata[2152] */\n    { 1076, 0x9E3779B185EBCA8DULL, 0x1A340811E276CE1DULL }, /* XSUM_XXH3_testdata[2153] */\n    { 1077, 0x0000000000000000ULL, 0x416950898625678DULL }, /* XSUM_XXH3_testdata[2154] */\n    { 1077, 0x9E3779B185EBCA8DULL, 0xBF32A6D767D50C3AULL }, /* XSUM_XXH3_testdata[2155] */\n    { 1078, 0x0000000000000000ULL, 0x8F783EA38EC1D973ULL }, /* XSUM_XXH3_testdata[2156] */\n    { 1078, 0x9E3779B185EBCA8DULL, 0x236D3512BB1A8A4DULL }, /* XSUM_XXH3_testdata[2157] */\n    { 1079, 0x0000000000000000ULL, 0xC97A3FE9CE7D4D19ULL }, /* XSUM_XXH3_testdata[2158] */\n    { 1079, 0x9E3779B185EBCA8DULL, 0xF2BF4205B22DE248ULL }, /* XSUM_XXH3_testdata[2159] */\n    { 1080, 0x0000000000000000ULL, 0x88EE634F95763B2EULL }, /* XSUM_XXH3_testdata[2160] */\n    { 1080, 0x9E3779B185EBCA8DULL, 0x0FCB8B82F171CC63ULL }, /* XSUM_XXH3_testdata[2161] */\n    { 1081, 0x0000000000000000ULL, 0x1B214241194C97A8ULL }, /* XSUM_XXH3_testdata[2162] */\n    { 1081, 0x9E3779B185EBCA8DULL, 0xCC5FD4B0D510ABD7ULL }, /* XSUM_XXH3_testdata[2163] */\n    { 1082, 0x0000000000000000ULL, 0x1480A22110AD0CA8ULL }, /* XSUM_XXH3_testdata[2164] */\n    { 1082, 0x9E3779B185EBCA8DULL, 0x62B1C2F035D5819CULL }, /* XSUM_XXH3_testdata[2165] */\n    { 1083, 0x0000000000000000ULL, 0xA90E39E7A1DC5288ULL }, /* XSUM_XXH3_testdata[2166] */\n    { 1083, 0x9E3779B185EBCA8DULL, 0x4F125217DFE431E8ULL }, /* XSUM_XXH3_testdata[2167] */\n    { 1084, 0x0000000000000000ULL, 0xB3D8CF0593E45180ULL }, /* XSUM_XXH3_testdata[2168] */\n    { 1084, 0x9E3779B185EBCA8DULL, 0xA08D501EED801F54ULL }, /* XSUM_XXH3_testdata[2169] */\n    { 1085, 0x0000000000000000ULL, 0xCD2309AD6918F6F2ULL }, /* XSUM_XXH3_testdata[2170] */\n    { 1085, 0x9E3779B185EBCA8DULL, 0x2D64ED1AAB430EA6ULL }, /* XSUM_XXH3_testdata[2171] */\n    { 1086, 0x0000000000000000ULL, 0x34E17D2E5B1E92B5ULL }, /* XSUM_XXH3_testdata[2172] */\n    { 1086, 0x9E3779B185EBCA8DULL, 0x20DA04F2065565C4ULL }, /* XSUM_XXH3_testdata[2173] */\n    { 1087, 0x0000000000000000ULL, 0x047F181E7C8A41B9ULL }, /* XSUM_XXH3_testdata[2174] */\n    { 1087, 0x9E3779B185EBCA8DULL, 0x9DDA30BBBF69BF13ULL }, /* XSUM_XXH3_testdata[2175] */\n    { 1088, 0x0000000000000000ULL, 0xCC1450EA6B52A8F4ULL }, /* XSUM_XXH3_testdata[2176] */\n    { 1088, 0x9E3779B185EBCA8DULL, 0x542632D046F3DDE4ULL }, /* XSUM_XXH3_testdata[2177] */\n    { 1089, 0x0000000000000000ULL, 0xEF727B2EFFC4CC8CULL }, /* XSUM_XXH3_testdata[2178] */\n    { 1089, 0x9E3779B185EBCA8DULL, 0xFF8423D886707134ULL }, /* XSUM_XXH3_testdata[2179] */\n    { 1090, 0x0000000000000000ULL, 0x89F412FD6ED3162DULL }, /* XSUM_XXH3_testdata[2180] */\n    { 1090, 0x9E3779B185EBCA8DULL, 0x9401D08008982DEEULL }, /* XSUM_XXH3_testdata[2181] */\n    { 1091, 0x0000000000000000ULL, 0x35ACEEEADFE96151ULL }, /* XSUM_XXH3_testdata[2182] */\n    { 1091, 0x9E3779B185EBCA8DULL, 0x55D5220408C11995ULL }, /* XSUM_XXH3_testdata[2183] */\n    { 1092, 0x0000000000000000ULL, 0xCE09B91AD5477E4FULL }, /* XSUM_XXH3_testdata[2184] */\n    { 1092, 0x9E3779B185EBCA8DULL, 0x09E625B5CA2769E9ULL }, /* XSUM_XXH3_testdata[2185] */\n    { 1093, 0x0000000000000000ULL, 0x934DA47BA7D6BA54ULL }, /* XSUM_XXH3_testdata[2186] */\n    { 1093, 0x9E3779B185EBCA8DULL, 0x88E0DD3E5B1F5097ULL }, /* XSUM_XXH3_testdata[2187] */\n    { 1094, 0x0000000000000000ULL, 0xF8B5D69781586327ULL }, /* XSUM_XXH3_testdata[2188] */\n    { 1094, 0x9E3779B185EBCA8DULL, 0x4ECC1C9119FB5B6DULL }, /* XSUM_XXH3_testdata[2189] */\n    { 1095, 0x0000000000000000ULL, 0x23F7942250DDDC49ULL }, /* XSUM_XXH3_testdata[2190] */\n    { 1095, 0x9E3779B185EBCA8DULL, 0x8D2E379DC1BBB0B6ULL }, /* XSUM_XXH3_testdata[2191] */\n    { 1096, 0x0000000000000000ULL, 0xC3FFA06BC20EC335ULL }, /* XSUM_XXH3_testdata[2192] */\n    { 1096, 0x9E3779B185EBCA8DULL, 0x29F3F7B49529DFBAULL }, /* XSUM_XXH3_testdata[2193] */\n    { 1097, 0x0000000000000000ULL, 0x0FDB704FE2D24016ULL }, /* XSUM_XXH3_testdata[2194] */\n    { 1097, 0x9E3779B185EBCA8DULL, 0xEF7EA7F97634AA97ULL }, /* XSUM_XXH3_testdata[2195] */\n    { 1098, 0x0000000000000000ULL, 0x267345655DF0F5BAULL }, /* XSUM_XXH3_testdata[2196] */\n    { 1098, 0x9E3779B185EBCA8DULL, 0x23FDC7F3BB95FA27ULL }, /* XSUM_XXH3_testdata[2197] */\n    { 1099, 0x0000000000000000ULL, 0x08DC1E6E3BE4AE5EULL }, /* XSUM_XXH3_testdata[2198] */\n    { 1099, 0x9E3779B185EBCA8DULL, 0x3AAB786A79D625C6ULL }, /* XSUM_XXH3_testdata[2199] */\n    { 1100, 0x0000000000000000ULL, 0xA2E4365683A60391ULL }, /* XSUM_XXH3_testdata[2200] */\n    { 1100, 0x9E3779B185EBCA8DULL, 0xC91EE43AE9B51D71ULL }, /* XSUM_XXH3_testdata[2201] */\n    { 1101, 0x0000000000000000ULL, 0xA42E215373B168AEULL }, /* XSUM_XXH3_testdata[2202] */\n    { 1101, 0x9E3779B185EBCA8DULL, 0xD08292BB94F66639ULL }, /* XSUM_XXH3_testdata[2203] */\n    { 1102, 0x0000000000000000ULL, 0x151F8D631922BAF2ULL }, /* XSUM_XXH3_testdata[2204] */\n    { 1102, 0x9E3779B185EBCA8DULL, 0x1251E29366620135ULL }, /* XSUM_XXH3_testdata[2205] */\n    { 1103, 0x0000000000000000ULL, 0x6CA10D173172CE90ULL }, /* XSUM_XXH3_testdata[2206] */\n    { 1103, 0x9E3779B185EBCA8DULL, 0x31A6B88EC2171A6AULL }, /* XSUM_XXH3_testdata[2207] */\n    { 1104, 0x0000000000000000ULL, 0xFDB6BFA13BEA50FEULL }, /* XSUM_XXH3_testdata[2208] */\n    { 1104, 0x9E3779B185EBCA8DULL, 0x3E23E34491EB0A37ULL }, /* XSUM_XXH3_testdata[2209] */\n    { 1105, 0x0000000000000000ULL, 0xDB5AAD73409F3CA7ULL }, /* XSUM_XXH3_testdata[2210] */\n    { 1105, 0x9E3779B185EBCA8DULL, 0x936B96924E95975EULL }, /* XSUM_XXH3_testdata[2211] */\n    { 1106, 0x0000000000000000ULL, 0x8EA70DDBFBFFB140ULL }, /* XSUM_XXH3_testdata[2212] */\n    { 1106, 0x9E3779B185EBCA8DULL, 0x50E07E50BE70454CULL }, /* XSUM_XXH3_testdata[2213] */\n    { 1107, 0x0000000000000000ULL, 0x2CB3D9534FC396ECULL }, /* XSUM_XXH3_testdata[2214] */\n    { 1107, 0x9E3779B185EBCA8DULL, 0xE59E31F8D0400D3DULL }, /* XSUM_XXH3_testdata[2215] */\n    { 1108, 0x0000000000000000ULL, 0xD29D3A025A1690E4ULL }, /* XSUM_XXH3_testdata[2216] */\n    { 1108, 0x9E3779B185EBCA8DULL, 0x37288A9CB07E3D96ULL }, /* XSUM_XXH3_testdata[2217] */\n    { 1109, 0x0000000000000000ULL, 0x3D01DAA3D4BD963EULL }, /* XSUM_XXH3_testdata[2218] */\n    { 1109, 0x9E3779B185EBCA8DULL, 0xB526662C90236A2DULL }, /* XSUM_XXH3_testdata[2219] */\n    { 1110, 0x0000000000000000ULL, 0x20274CB54F3E997EULL }, /* XSUM_XXH3_testdata[2220] */\n    { 1110, 0x9E3779B185EBCA8DULL, 0x18BB398F2D7573BFULL }, /* XSUM_XXH3_testdata[2221] */\n    { 1111, 0x0000000000000000ULL, 0x535C077415D1946DULL }, /* XSUM_XXH3_testdata[2222] */\n    { 1111, 0x9E3779B185EBCA8DULL, 0xDC251C067D8BD955ULL }, /* XSUM_XXH3_testdata[2223] */\n    { 1112, 0x0000000000000000ULL, 0x65C3CBC5E82A6835ULL }, /* XSUM_XXH3_testdata[2224] */\n    { 1112, 0x9E3779B185EBCA8DULL, 0x07BFDF0D944A5C57ULL }, /* XSUM_XXH3_testdata[2225] */\n    { 1113, 0x0000000000000000ULL, 0x68D7660406B2EDC4ULL }, /* XSUM_XXH3_testdata[2226] */\n    { 1113, 0x9E3779B185EBCA8DULL, 0x95418F648D646CA3ULL }, /* XSUM_XXH3_testdata[2227] */\n    { 1114, 0x0000000000000000ULL, 0x1F244DA0A9F0EBE3ULL }, /* XSUM_XXH3_testdata[2228] */\n    { 1114, 0x9E3779B185EBCA8DULL, 0xB3E9095AF38024DFULL }, /* XSUM_XXH3_testdata[2229] */\n    { 1115, 0x0000000000000000ULL, 0xD9621C941623B268ULL }, /* XSUM_XXH3_testdata[2230] */\n    { 1115, 0x9E3779B185EBCA8DULL, 0x2C45FEF9EF363D5AULL }, /* XSUM_XXH3_testdata[2231] */\n    { 1116, 0x0000000000000000ULL, 0x41AF96D52DCB9BF8ULL }, /* XSUM_XXH3_testdata[2232] */\n    { 1116, 0x9E3779B185EBCA8DULL, 0x6F201C12240137D9ULL }, /* XSUM_XXH3_testdata[2233] */\n    { 1117, 0x0000000000000000ULL, 0xA2149B7CE171D9B1ULL }, /* XSUM_XXH3_testdata[2234] */\n    { 1117, 0x9E3779B185EBCA8DULL, 0x11394E35AC357B5CULL }, /* XSUM_XXH3_testdata[2235] */\n    { 1118, 0x0000000000000000ULL, 0xA3A1E85D4187AB76ULL }, /* XSUM_XXH3_testdata[2236] */\n    { 1118, 0x9E3779B185EBCA8DULL, 0x670D7249F1A3FCF1ULL }, /* XSUM_XXH3_testdata[2237] */\n    { 1119, 0x0000000000000000ULL, 0xA831366CE6D0A015ULL }, /* XSUM_XXH3_testdata[2238] */\n    { 1119, 0x9E3779B185EBCA8DULL, 0x90C64A736F00FE4FULL }, /* XSUM_XXH3_testdata[2239] */\n    { 1120, 0x0000000000000000ULL, 0xCB2A01BE10913FE8ULL }, /* XSUM_XXH3_testdata[2240] */\n    { 1120, 0x9E3779B185EBCA8DULL, 0x1B9BDB62E75C91F8ULL }, /* XSUM_XXH3_testdata[2241] */\n    { 1121, 0x0000000000000000ULL, 0x926B4876BA26C868ULL }, /* XSUM_XXH3_testdata[2242] */\n    { 1121, 0x9E3779B185EBCA8DULL, 0x67046D7374E193D8ULL }, /* XSUM_XXH3_testdata[2243] */\n    { 1122, 0x0000000000000000ULL, 0x1DED852A9AF3BDDDULL }, /* XSUM_XXH3_testdata[2244] */\n    { 1122, 0x9E3779B185EBCA8DULL, 0xED4D97245B36909FULL }, /* XSUM_XXH3_testdata[2245] */\n    { 1123, 0x0000000000000000ULL, 0x567A4339BF18DCD3ULL }, /* XSUM_XXH3_testdata[2246] */\n    { 1123, 0x9E3779B185EBCA8DULL, 0x2C4C54BAB4E0D7AEULL }, /* XSUM_XXH3_testdata[2247] */\n    { 1124, 0x0000000000000000ULL, 0x25FEE25F53DBE3A8ULL }, /* XSUM_XXH3_testdata[2248] */\n    { 1124, 0x9E3779B185EBCA8DULL, 0x405315AE00B8A986ULL }, /* XSUM_XXH3_testdata[2249] */\n    { 1125, 0x0000000000000000ULL, 0x3FE1721559FFBC72ULL }, /* XSUM_XXH3_testdata[2250] */\n    { 1125, 0x9E3779B185EBCA8DULL, 0xB8F5C2BEF091AC93ULL }, /* XSUM_XXH3_testdata[2251] */\n    { 1126, 0x0000000000000000ULL, 0x50DF0CE31B152CB0ULL }, /* XSUM_XXH3_testdata[2252] */\n    { 1126, 0x9E3779B185EBCA8DULL, 0x5B30F80DD455185BULL }, /* XSUM_XXH3_testdata[2253] */\n    { 1127, 0x0000000000000000ULL, 0x47BED516867314E4ULL }, /* XSUM_XXH3_testdata[2254] */\n    { 1127, 0x9E3779B185EBCA8DULL, 0x3CC4B630893CE8E6ULL }, /* XSUM_XXH3_testdata[2255] */\n    { 1128, 0x0000000000000000ULL, 0x1EF8A6EE399E57D0ULL }, /* XSUM_XXH3_testdata[2256] */\n    { 1128, 0x9E3779B185EBCA8DULL, 0x84913A2F69B5E095ULL }, /* XSUM_XXH3_testdata[2257] */\n    { 1129, 0x0000000000000000ULL, 0x2B6BF915D838BA37ULL }, /* XSUM_XXH3_testdata[2258] */\n    { 1129, 0x9E3779B185EBCA8DULL, 0x9F7F65EB9F75BBBCULL }, /* XSUM_XXH3_testdata[2259] */\n    { 1130, 0x0000000000000000ULL, 0xE3899E185F0E6802ULL }, /* XSUM_XXH3_testdata[2260] */\n    { 1130, 0x9E3779B185EBCA8DULL, 0x1499DD150136E7E1ULL }, /* XSUM_XXH3_testdata[2261] */\n    { 1131, 0x0000000000000000ULL, 0xE1D1B784229995DEULL }, /* XSUM_XXH3_testdata[2262] */\n    { 1131, 0x9E3779B185EBCA8DULL, 0x51A5FE1716C1F1D6ULL }, /* XSUM_XXH3_testdata[2263] */\n    { 1132, 0x0000000000000000ULL, 0x87901B4D8E92F707ULL }, /* XSUM_XXH3_testdata[2264] */\n    { 1132, 0x9E3779B185EBCA8DULL, 0x33AC4E72130C886AULL }, /* XSUM_XXH3_testdata[2265] */\n    { 1133, 0x0000000000000000ULL, 0x714C8A36A1DC2505ULL }, /* XSUM_XXH3_testdata[2266] */\n    { 1133, 0x9E3779B185EBCA8DULL, 0xF833FAA2E9F8B356ULL }, /* XSUM_XXH3_testdata[2267] */\n    { 1134, 0x0000000000000000ULL, 0xF7DCA61CB5BC30D6ULL }, /* XSUM_XXH3_testdata[2268] */\n    { 1134, 0x9E3779B185EBCA8DULL, 0xB0327515BE8AD7D7ULL }, /* XSUM_XXH3_testdata[2269] */\n    { 1135, 0x0000000000000000ULL, 0xF69A9C5CCA2DF6E7ULL }, /* XSUM_XXH3_testdata[2270] */\n    { 1135, 0x9E3779B185EBCA8DULL, 0xF77C95BD632E961EULL }, /* XSUM_XXH3_testdata[2271] */\n    { 1136, 0x0000000000000000ULL, 0xB66FDAC8A6FA8971ULL }, /* XSUM_XXH3_testdata[2272] */\n    { 1136, 0x9E3779B185EBCA8DULL, 0x192181B62FABCA63ULL }, /* XSUM_XXH3_testdata[2273] */\n    { 1137, 0x0000000000000000ULL, 0x0D5273B6C4D4C5ACULL }, /* XSUM_XXH3_testdata[2274] */\n    { 1137, 0x9E3779B185EBCA8DULL, 0x18482773977A216BULL }, /* XSUM_XXH3_testdata[2275] */\n    { 1138, 0x0000000000000000ULL, 0xE966D7C30A58470AULL }, /* XSUM_XXH3_testdata[2276] */\n    { 1138, 0x9E3779B185EBCA8DULL, 0x0DFA80657CFB01A4ULL }, /* XSUM_XXH3_testdata[2277] */\n    { 1139, 0x0000000000000000ULL, 0x5259C45D43DBE53EULL }, /* XSUM_XXH3_testdata[2278] */\n    { 1139, 0x9E3779B185EBCA8DULL, 0x6C18EE35FC320C14ULL }, /* XSUM_XXH3_testdata[2279] */\n    { 1140, 0x0000000000000000ULL, 0xFB9AFE9E8341A37AULL }, /* XSUM_XXH3_testdata[2280] */\n    { 1140, 0x9E3779B185EBCA8DULL, 0x7EACD8D28F36F2DBULL }, /* XSUM_XXH3_testdata[2281] */\n    { 1141, 0x0000000000000000ULL, 0xA5A57C3AB93B041EULL }, /* XSUM_XXH3_testdata[2282] */\n    { 1141, 0x9E3779B185EBCA8DULL, 0x1C9C1190FA766E90ULL }, /* XSUM_XXH3_testdata[2283] */\n    { 1142, 0x0000000000000000ULL, 0x4FA60243C1D9CFC7ULL }, /* XSUM_XXH3_testdata[2284] */\n    { 1142, 0x9E3779B185EBCA8DULL, 0x87DC592B1BE2BF3EULL }, /* XSUM_XXH3_testdata[2285] */\n    { 1143, 0x0000000000000000ULL, 0x2A2F9060C75659ABULL }, /* XSUM_XXH3_testdata[2286] */\n    { 1143, 0x9E3779B185EBCA8DULL, 0x21FBFB1EF1D23899ULL }, /* XSUM_XXH3_testdata[2287] */\n    { 1144, 0x0000000000000000ULL, 0x95A486382492BF45ULL }, /* XSUM_XXH3_testdata[2288] */\n    { 1144, 0x9E3779B185EBCA8DULL, 0xB20CCD731AF9E696ULL }, /* XSUM_XXH3_testdata[2289] */\n    { 1145, 0x0000000000000000ULL, 0x58CE092D9AAB9B92ULL }, /* XSUM_XXH3_testdata[2290] */\n    { 1145, 0x9E3779B185EBCA8DULL, 0x86C5C6FE0D4772C7ULL }, /* XSUM_XXH3_testdata[2291] */\n    { 1146, 0x0000000000000000ULL, 0x2B667E781A3E3B39ULL }, /* XSUM_XXH3_testdata[2292] */\n    { 1146, 0x9E3779B185EBCA8DULL, 0x30E430D337512CABULL }, /* XSUM_XXH3_testdata[2293] */\n    { 1147, 0x0000000000000000ULL, 0xE3FDBC1329BC7311ULL }, /* XSUM_XXH3_testdata[2294] */\n    { 1147, 0x9E3779B185EBCA8DULL, 0x5148F9DD7AFCB065ULL }, /* XSUM_XXH3_testdata[2295] */\n    { 1148, 0x0000000000000000ULL, 0xCF6D44DEAE45F6C1ULL }, /* XSUM_XXH3_testdata[2296] */\n    { 1148, 0x9E3779B185EBCA8DULL, 0x52981C66CC0CA09DULL }, /* XSUM_XXH3_testdata[2297] */\n    { 1149, 0x0000000000000000ULL, 0x9FA5149C1E410A10ULL }, /* XSUM_XXH3_testdata[2298] */\n    { 1149, 0x9E3779B185EBCA8DULL, 0x3C0AEE0E925A6134ULL }, /* XSUM_XXH3_testdata[2299] */\n    { 1150, 0x0000000000000000ULL, 0xA3F61AC5C9AC2CB4ULL }, /* XSUM_XXH3_testdata[2300] */\n    { 1150, 0x9E3779B185EBCA8DULL, 0x834BA906F8130A85ULL }, /* XSUM_XXH3_testdata[2301] */\n    { 1151, 0x0000000000000000ULL, 0x7153F50FED4BA56AULL }, /* XSUM_XXH3_testdata[2302] */\n    { 1151, 0x9E3779B185EBCA8DULL, 0x0AE7204E79BBEB04ULL }, /* XSUM_XXH3_testdata[2303] */\n    { 1152, 0x0000000000000000ULL, 0x8D10F861683EB1DDULL }, /* XSUM_XXH3_testdata[2304] */\n    { 1152, 0x9E3779B185EBCA8DULL, 0xCFE2924BF8DDE23FULL }, /* XSUM_XXH3_testdata[2305] */\n    { 1153, 0x0000000000000000ULL, 0x252E89C8B0620818ULL }, /* XSUM_XXH3_testdata[2306] */\n    { 1153, 0x9E3779B185EBCA8DULL, 0xC6DC90A02641B916ULL }, /* XSUM_XXH3_testdata[2307] */\n    { 1154, 0x0000000000000000ULL, 0x311FA7F0D2EDF339ULL }, /* XSUM_XXH3_testdata[2308] */\n    { 1154, 0x9E3779B185EBCA8DULL, 0xB8E4C7A1170A3DAFULL }, /* XSUM_XXH3_testdata[2309] */\n    { 1155, 0x0000000000000000ULL, 0x4169E14522944D4BULL }, /* XSUM_XXH3_testdata[2310] */\n    { 1155, 0x9E3779B185EBCA8DULL, 0x5F2A1BA5122ECCB3ULL }, /* XSUM_XXH3_testdata[2311] */\n    { 1156, 0x0000000000000000ULL, 0xA7FC6341379A1C87ULL }, /* XSUM_XXH3_testdata[2312] */\n    { 1156, 0x9E3779B185EBCA8DULL, 0xFE49682AA0CEF4B7ULL }, /* XSUM_XXH3_testdata[2313] */\n    { 1157, 0x0000000000000000ULL, 0x73F986F4372BEBB0ULL }, /* XSUM_XXH3_testdata[2314] */\n    { 1157, 0x9E3779B185EBCA8DULL, 0x9002BED3D9E0A393ULL }, /* XSUM_XXH3_testdata[2315] */\n    { 1158, 0x0000000000000000ULL, 0x4E1447A6BE5E402CULL }, /* XSUM_XXH3_testdata[2316] */\n    { 1158, 0x9E3779B185EBCA8DULL, 0xDD545BD05F40925EULL }, /* XSUM_XXH3_testdata[2317] */\n    { 1159, 0x0000000000000000ULL, 0xA3D95CC9126FE6DFULL }, /* XSUM_XXH3_testdata[2318] */\n    { 1159, 0x9E3779B185EBCA8DULL, 0x03A8D27CA2B2D76AULL }, /* XSUM_XXH3_testdata[2319] */\n    { 1160, 0x0000000000000000ULL, 0x33C5E608FD1DCAACULL }, /* XSUM_XXH3_testdata[2320] */\n    { 1160, 0x9E3779B185EBCA8DULL, 0x40688062F1E7B6FFULL }, /* XSUM_XXH3_testdata[2321] */\n    { 1161, 0x0000000000000000ULL, 0x6B02FA3CCF0807B9ULL }, /* XSUM_XXH3_testdata[2322] */\n    { 1161, 0x9E3779B185EBCA8DULL, 0x43F4ECDD94066F7DULL }, /* XSUM_XXH3_testdata[2323] */\n    { 1162, 0x0000000000000000ULL, 0xE1AD8D763CC16027ULL }, /* XSUM_XXH3_testdata[2324] */\n    { 1162, 0x9E3779B185EBCA8DULL, 0xC6700710D9B395B0ULL }, /* XSUM_XXH3_testdata[2325] */\n    { 1163, 0x0000000000000000ULL, 0x573093F71A1634B7ULL }, /* XSUM_XXH3_testdata[2326] */\n    { 1163, 0x9E3779B185EBCA8DULL, 0x68E92EB26219F13FULL }, /* XSUM_XXH3_testdata[2327] */\n    { 1164, 0x0000000000000000ULL, 0x9DEBD4109474D726ULL }, /* XSUM_XXH3_testdata[2328] */\n    { 1164, 0x9E3779B185EBCA8DULL, 0x5A6788F657CD633BULL }, /* XSUM_XXH3_testdata[2329] */\n    { 1165, 0x0000000000000000ULL, 0x1FF83F00B1BA6967ULL }, /* XSUM_XXH3_testdata[2330] */\n    { 1165, 0x9E3779B185EBCA8DULL, 0xE699B831D005AA77ULL }, /* XSUM_XXH3_testdata[2331] */\n    { 1166, 0x0000000000000000ULL, 0xADF8173CC6FC46F1ULL }, /* XSUM_XXH3_testdata[2332] */\n    { 1166, 0x9E3779B185EBCA8DULL, 0xC594148173266FDAULL }, /* XSUM_XXH3_testdata[2333] */\n    { 1167, 0x0000000000000000ULL, 0xB9D3BAD7E7FC06D6ULL }, /* XSUM_XXH3_testdata[2334] */\n    { 1167, 0x9E3779B185EBCA8DULL, 0xF8A28AE7386C9CA6ULL }, /* XSUM_XXH3_testdata[2335] */\n    { 1168, 0x0000000000000000ULL, 0x2481831BA46F2CADULL }, /* XSUM_XXH3_testdata[2336] */\n    { 1168, 0x9E3779B185EBCA8DULL, 0xB335B696CA795EE7ULL }, /* XSUM_XXH3_testdata[2337] */\n    { 1169, 0x0000000000000000ULL, 0x02DC7BCE7DCAE4A8ULL }, /* XSUM_XXH3_testdata[2338] */\n    { 1169, 0x9E3779B185EBCA8DULL, 0xE348E8AA3E73F106ULL }, /* XSUM_XXH3_testdata[2339] */\n    { 1170, 0x0000000000000000ULL, 0x79061966F462DCDAULL }, /* XSUM_XXH3_testdata[2340] */\n    { 1170, 0x9E3779B185EBCA8DULL, 0x4991A0E944442A33ULL }, /* XSUM_XXH3_testdata[2341] */\n    { 1171, 0x0000000000000000ULL, 0xAAB7B2C920767186ULL }, /* XSUM_XXH3_testdata[2342] */\n    { 1171, 0x9E3779B185EBCA8DULL, 0x1644853718A82C48ULL }, /* XSUM_XXH3_testdata[2343] */\n    { 1172, 0x0000000000000000ULL, 0x377984BBDC972C61ULL }, /* XSUM_XXH3_testdata[2344] */\n    { 1172, 0x9E3779B185EBCA8DULL, 0xBFCC79B556D0FAD1ULL }, /* XSUM_XXH3_testdata[2345] */\n    { 1173, 0x0000000000000000ULL, 0x0B774EDF492C83B0ULL }, /* XSUM_XXH3_testdata[2346] */\n    { 1173, 0x9E3779B185EBCA8DULL, 0x3B7CE54D4FF74975ULL }, /* XSUM_XXH3_testdata[2347] */\n    { 1174, 0x0000000000000000ULL, 0xD9956AE7D21B2F84ULL }, /* XSUM_XXH3_testdata[2348] */\n    { 1174, 0x9E3779B185EBCA8DULL, 0xB73ACE5844F5D7AAULL }, /* XSUM_XXH3_testdata[2349] */\n    { 1175, 0x0000000000000000ULL, 0x254AC4049415B36EULL }, /* XSUM_XXH3_testdata[2350] */\n    { 1175, 0x9E3779B185EBCA8DULL, 0xDA2B6F4CFD587974ULL }, /* XSUM_XXH3_testdata[2351] */\n    { 1176, 0x0000000000000000ULL, 0x763F66686DCB793EULL }, /* XSUM_XXH3_testdata[2352] */\n    { 1176, 0x9E3779B185EBCA8DULL, 0x043904FCE497378FULL }, /* XSUM_XXH3_testdata[2353] */\n    { 1177, 0x0000000000000000ULL, 0x7497A217A28DCC72ULL }, /* XSUM_XXH3_testdata[2354] */\n    { 1177, 0x9E3779B185EBCA8DULL, 0x532A929B311E60ECULL }, /* XSUM_XXH3_testdata[2355] */\n    { 1178, 0x0000000000000000ULL, 0x253D013B8D280C37ULL }, /* XSUM_XXH3_testdata[2356] */\n    { 1178, 0x9E3779B185EBCA8DULL, 0xE25B82B4BC5D331EULL }, /* XSUM_XXH3_testdata[2357] */\n    { 1179, 0x0000000000000000ULL, 0x030F0AEA67DB5C79ULL }, /* XSUM_XXH3_testdata[2358] */\n    { 1179, 0x9E3779B185EBCA8DULL, 0x7131DB7933A9CAAEULL }, /* XSUM_XXH3_testdata[2359] */\n    { 1180, 0x0000000000000000ULL, 0x5F5C759A10D1AF03ULL }, /* XSUM_XXH3_testdata[2360] */\n    { 1180, 0x9E3779B185EBCA8DULL, 0x0D36C9BB287F117BULL }, /* XSUM_XXH3_testdata[2361] */\n    { 1181, 0x0000000000000000ULL, 0x97AC67580FD4C886ULL }, /* XSUM_XXH3_testdata[2362] */\n    { 1181, 0x9E3779B185EBCA8DULL, 0x7602370EC794621BULL }, /* XSUM_XXH3_testdata[2363] */\n    { 1182, 0x0000000000000000ULL, 0xDF9B39788BABDDAFULL }, /* XSUM_XXH3_testdata[2364] */\n    { 1182, 0x9E3779B185EBCA8DULL, 0x7C09B5F543FA2583ULL }, /* XSUM_XXH3_testdata[2365] */\n    { 1183, 0x0000000000000000ULL, 0x94CF2A6D670BD114ULL }, /* XSUM_XXH3_testdata[2366] */\n    { 1183, 0x9E3779B185EBCA8DULL, 0xA708E0A87286116BULL }, /* XSUM_XXH3_testdata[2367] */\n    { 1184, 0x0000000000000000ULL, 0x76B645800E737E45ULL }, /* XSUM_XXH3_testdata[2368] */\n    { 1184, 0x9E3779B185EBCA8DULL, 0xFB3C8BCA9776922BULL }, /* XSUM_XXH3_testdata[2369] */\n    { 1185, 0x0000000000000000ULL, 0x596A8828CE2B8ED9ULL }, /* XSUM_XXH3_testdata[2370] */\n    { 1185, 0x9E3779B185EBCA8DULL, 0x016272A320784820ULL }, /* XSUM_XXH3_testdata[2371] */\n    { 1186, 0x0000000000000000ULL, 0x65A6DE268E6B1931ULL }, /* XSUM_XXH3_testdata[2372] */\n    { 1186, 0x9E3779B185EBCA8DULL, 0x126CF07FE3A547F7ULL }, /* XSUM_XXH3_testdata[2373] */\n    { 1187, 0x0000000000000000ULL, 0x43F7BC2C8C631282ULL }, /* XSUM_XXH3_testdata[2374] */\n    { 1187, 0x9E3779B185EBCA8DULL, 0x1F6351FEF142B5F1ULL }, /* XSUM_XXH3_testdata[2375] */\n    { 1188, 0x0000000000000000ULL, 0xE1851CC71FC6FD60ULL }, /* XSUM_XXH3_testdata[2376] */\n    { 1188, 0x9E3779B185EBCA8DULL, 0x2319155DCA7F781EULL }, /* XSUM_XXH3_testdata[2377] */\n    { 1189, 0x0000000000000000ULL, 0xF3B7E0EED66D8AB7ULL }, /* XSUM_XXH3_testdata[2378] */\n    { 1189, 0x9E3779B185EBCA8DULL, 0xFFD2FEA9DCDA49C8ULL }, /* XSUM_XXH3_testdata[2379] */\n    { 1190, 0x0000000000000000ULL, 0x4543A9DAADC78B77ULL }, /* XSUM_XXH3_testdata[2380] */\n    { 1190, 0x9E3779B185EBCA8DULL, 0xD52DA73BDEAD7097ULL }, /* XSUM_XXH3_testdata[2381] */\n    { 1191, 0x0000000000000000ULL, 0xBBA0CCC91A773F43ULL }, /* XSUM_XXH3_testdata[2382] */\n    { 1191, 0x9E3779B185EBCA8DULL, 0xFA7D0878F0E42D52ULL }, /* XSUM_XXH3_testdata[2383] */\n    { 1192, 0x0000000000000000ULL, 0xCC7D840BCE9BAC5EULL }, /* XSUM_XXH3_testdata[2384] */\n    { 1192, 0x9E3779B185EBCA8DULL, 0x1A5684985BBD433EULL }, /* XSUM_XXH3_testdata[2385] */\n    { 1193, 0x0000000000000000ULL, 0x39E9ABD8764C36FAULL }, /* XSUM_XXH3_testdata[2386] */\n    { 1193, 0x9E3779B185EBCA8DULL, 0xB35ECC57D2A66C11ULL }, /* XSUM_XXH3_testdata[2387] */\n    { 1194, 0x0000000000000000ULL, 0x30BD41F718E2D454ULL }, /* XSUM_XXH3_testdata[2388] */\n    { 1194, 0x9E3779B185EBCA8DULL, 0x51A49CBB02557472ULL }, /* XSUM_XXH3_testdata[2389] */\n    { 1195, 0x0000000000000000ULL, 0x0914B04B3B4D335EULL }, /* XSUM_XXH3_testdata[2390] */\n    { 1195, 0x9E3779B185EBCA8DULL, 0x3B51F879AEA1BE77ULL }, /* XSUM_XXH3_testdata[2391] */\n    { 1196, 0x0000000000000000ULL, 0xCC0CE7BA422B55CFULL }, /* XSUM_XXH3_testdata[2392] */\n    { 1196, 0x9E3779B185EBCA8DULL, 0x0F06EC5AC1D04855ULL }, /* XSUM_XXH3_testdata[2393] */\n    { 1197, 0x0000000000000000ULL, 0xD91DF662BC7D84C9ULL }, /* XSUM_XXH3_testdata[2394] */\n    { 1197, 0x9E3779B185EBCA8DULL, 0xBE419090E56BB293ULL }, /* XSUM_XXH3_testdata[2395] */\n    { 1198, 0x0000000000000000ULL, 0x0D0DFBCD20029D56ULL }, /* XSUM_XXH3_testdata[2396] */\n    { 1198, 0x9E3779B185EBCA8DULL, 0x7F9233AF2D2A09B3ULL }, /* XSUM_XXH3_testdata[2397] */\n    { 1199, 0x0000000000000000ULL, 0xB11D0BAAD822491AULL }, /* XSUM_XXH3_testdata[2398] */\n    { 1199, 0x9E3779B185EBCA8DULL, 0xC2620E0E0D1AB3F3ULL }, /* XSUM_XXH3_testdata[2399] */\n    { 1200, 0x0000000000000000ULL, 0x203BF68D0CB40248ULL }, /* XSUM_XXH3_testdata[2400] */\n    { 1200, 0x9E3779B185EBCA8DULL, 0xC782C87F8C12981EULL }, /* XSUM_XXH3_testdata[2401] */\n    { 1201, 0x0000000000000000ULL, 0x27AC93A13B0441EAULL }, /* XSUM_XXH3_testdata[2402] */\n    { 1201, 0x9E3779B185EBCA8DULL, 0x00322A94AD07FE4CULL }, /* XSUM_XXH3_testdata[2403] */\n    { 1202, 0x0000000000000000ULL, 0xCA123B3DB28A833FULL }, /* XSUM_XXH3_testdata[2404] */\n    { 1202, 0x9E3779B185EBCA8DULL, 0xD85795992279DC35ULL }, /* XSUM_XXH3_testdata[2405] */\n    { 1203, 0x0000000000000000ULL, 0x1F9522CE4E8A3569ULL }, /* XSUM_XXH3_testdata[2406] */\n    { 1203, 0x9E3779B185EBCA8DULL, 0xE801BBE0C28C37A5ULL }, /* XSUM_XXH3_testdata[2407] */\n    { 1204, 0x0000000000000000ULL, 0x5D59E44EAA3FA1A2ULL }, /* XSUM_XXH3_testdata[2408] */\n    { 1204, 0x9E3779B185EBCA8DULL, 0x2FFEC7EDE4C35A95ULL }, /* XSUM_XXH3_testdata[2409] */\n    { 1205, 0x0000000000000000ULL, 0x0785920A1E8E65FBULL }, /* XSUM_XXH3_testdata[2410] */\n    { 1205, 0x9E3779B185EBCA8DULL, 0xD9534F0920956617ULL }, /* XSUM_XXH3_testdata[2411] */\n    { 1206, 0x0000000000000000ULL, 0xBCBB1735D914A75BULL }, /* XSUM_XXH3_testdata[2412] */\n    { 1206, 0x9E3779B185EBCA8DULL, 0xB5D845E610439EC3ULL }, /* XSUM_XXH3_testdata[2413] */\n    { 1207, 0x0000000000000000ULL, 0x4F834DD477E34CA1ULL }, /* XSUM_XXH3_testdata[2414] */\n    { 1207, 0x9E3779B185EBCA8DULL, 0xF043EC3B6AFF48F2ULL }, /* XSUM_XXH3_testdata[2415] */\n    { 1208, 0x0000000000000000ULL, 0xF819C4DA04BE8BFFULL }, /* XSUM_XXH3_testdata[2416] */\n    { 1208, 0x9E3779B185EBCA8DULL, 0x10770E2138DB91E7ULL }, /* XSUM_XXH3_testdata[2417] */\n    { 1209, 0x0000000000000000ULL, 0x471FD17969E5C08EULL }, /* XSUM_XXH3_testdata[2418] */\n    { 1209, 0x9E3779B185EBCA8DULL, 0x95228F4333CA7537ULL }, /* XSUM_XXH3_testdata[2419] */\n    { 1210, 0x0000000000000000ULL, 0x4BD9860726BF5B55ULL }, /* XSUM_XXH3_testdata[2420] */\n    { 1210, 0x9E3779B185EBCA8DULL, 0xA2E35D62CDDFC4C2ULL }, /* XSUM_XXH3_testdata[2421] */\n    { 1211, 0x0000000000000000ULL, 0xF01EB0C5F58E4BD7ULL }, /* XSUM_XXH3_testdata[2422] */\n    { 1211, 0x9E3779B185EBCA8DULL, 0xA795DF56C4A70D09ULL }, /* XSUM_XXH3_testdata[2423] */\n    { 1212, 0x0000000000000000ULL, 0xA66DAA355D58FB75ULL }, /* XSUM_XXH3_testdata[2424] */\n    { 1212, 0x9E3779B185EBCA8DULL, 0x5717E813E2BF8BA3ULL }, /* XSUM_XXH3_testdata[2425] */\n    { 1213, 0x0000000000000000ULL, 0xECDC982B4F911BB1ULL }, /* XSUM_XXH3_testdata[2426] */\n    { 1213, 0x9E3779B185EBCA8DULL, 0xD8762F676DA901FCULL }, /* XSUM_XXH3_testdata[2427] */\n    { 1214, 0x0000000000000000ULL, 0xE048972A53CAB698ULL }, /* XSUM_XXH3_testdata[2428] */\n    { 1214, 0x9E3779B185EBCA8DULL, 0x17117BC29230BC57ULL }, /* XSUM_XXH3_testdata[2429] */\n    { 1215, 0x0000000000000000ULL, 0xE930426227BAD1BCULL }, /* XSUM_XXH3_testdata[2430] */\n    { 1215, 0x9E3779B185EBCA8DULL, 0x9E886B47FF351E95ULL }, /* XSUM_XXH3_testdata[2431] */\n    { 1216, 0x0000000000000000ULL, 0xFE0C4B62F3111B46ULL }, /* XSUM_XXH3_testdata[2432] */\n    { 1216, 0x9E3779B185EBCA8DULL, 0x81DB6085A96B2900ULL }, /* XSUM_XXH3_testdata[2433] */\n    { 1217, 0x0000000000000000ULL, 0x253D5AB8AAE1CADBULL }, /* XSUM_XXH3_testdata[2434] */\n    { 1217, 0x9E3779B185EBCA8DULL, 0xF3ED7CC23687AF94ULL }, /* XSUM_XXH3_testdata[2435] */\n    { 1218, 0x0000000000000000ULL, 0x1F997933C417290EULL }, /* XSUM_XXH3_testdata[2436] */\n    { 1218, 0x9E3779B185EBCA8DULL, 0xB76BD5C9B4311FDBULL }, /* XSUM_XXH3_testdata[2437] */\n    { 1219, 0x0000000000000000ULL, 0xEDE8E2A4179E0A79ULL }, /* XSUM_XXH3_testdata[2438] */\n    { 1219, 0x9E3779B185EBCA8DULL, 0xA606C217B1D3B5C6ULL }, /* XSUM_XXH3_testdata[2439] */\n    { 1220, 0x0000000000000000ULL, 0x16DDEBA258E5BEC7ULL }, /* XSUM_XXH3_testdata[2440] */\n    { 1220, 0x9E3779B185EBCA8DULL, 0x618115D34B8140C8ULL }, /* XSUM_XXH3_testdata[2441] */\n    { 1221, 0x0000000000000000ULL, 0x434F9B679E3E3131ULL }, /* XSUM_XXH3_testdata[2442] */\n    { 1221, 0x9E3779B185EBCA8DULL, 0x204DACFA0F41B777ULL }, /* XSUM_XXH3_testdata[2443] */\n    { 1222, 0x0000000000000000ULL, 0x40C68C7EB6E9987CULL }, /* XSUM_XXH3_testdata[2444] */\n    { 1222, 0x9E3779B185EBCA8DULL, 0xA000201050DAED60ULL }, /* XSUM_XXH3_testdata[2445] */\n    { 1223, 0x0000000000000000ULL, 0xC426E8B70AA0FF54ULL }, /* XSUM_XXH3_testdata[2446] */\n    { 1223, 0x9E3779B185EBCA8DULL, 0x826C1746F4379357ULL }, /* XSUM_XXH3_testdata[2447] */\n    { 1224, 0x0000000000000000ULL, 0x4141EABAAF368238ULL }, /* XSUM_XXH3_testdata[2448] */\n    { 1224, 0x9E3779B185EBCA8DULL, 0xC91E8334C06455F2ULL }, /* XSUM_XXH3_testdata[2449] */\n    { 1225, 0x0000000000000000ULL, 0x9A43EA1ED266BBD2ULL }, /* XSUM_XXH3_testdata[2450] */\n    { 1225, 0x9E3779B185EBCA8DULL, 0x59BE464BF88208C7ULL }, /* XSUM_XXH3_testdata[2451] */\n    { 1226, 0x0000000000000000ULL, 0xB157921B389112F6ULL }, /* XSUM_XXH3_testdata[2452] */\n    { 1226, 0x9E3779B185EBCA8DULL, 0xA678A815C95467C4ULL }, /* XSUM_XXH3_testdata[2453] */\n    { 1227, 0x0000000000000000ULL, 0x86C60450E50A39F2ULL }, /* XSUM_XXH3_testdata[2454] */\n    { 1227, 0x9E3779B185EBCA8DULL, 0xDAD9B7E9A7DCEAB4ULL }, /* XSUM_XXH3_testdata[2455] */\n    { 1228, 0x0000000000000000ULL, 0x4EC249E9E22BB8F6ULL }, /* XSUM_XXH3_testdata[2456] */\n    { 1228, 0x9E3779B185EBCA8DULL, 0x35B07B350D67A81DULL }, /* XSUM_XXH3_testdata[2457] */\n    { 1229, 0x0000000000000000ULL, 0xB4AC47456204F4A0ULL }, /* XSUM_XXH3_testdata[2458] */\n    { 1229, 0x9E3779B185EBCA8DULL, 0xFB8751E1C34FB61EULL }, /* XSUM_XXH3_testdata[2459] */\n    { 1230, 0x0000000000000000ULL, 0xF0FFD70477192DD9ULL }, /* XSUM_XXH3_testdata[2460] */\n    { 1230, 0x9E3779B185EBCA8DULL, 0xF398B52063DA612AULL }, /* XSUM_XXH3_testdata[2461] */\n    { 1231, 0x0000000000000000ULL, 0x1798FEF09B569C74ULL }, /* XSUM_XXH3_testdata[2462] */\n    { 1231, 0x9E3779B185EBCA8DULL, 0x26029163BA88839CULL }, /* XSUM_XXH3_testdata[2463] */\n    { 1232, 0x0000000000000000ULL, 0x7DDCBA4664E066E2ULL }, /* XSUM_XXH3_testdata[2464] */\n    { 1232, 0x9E3779B185EBCA8DULL, 0x29030F6B251137D7ULL }, /* XSUM_XXH3_testdata[2465] */\n    { 1233, 0x0000000000000000ULL, 0x2BE6E506324653A7ULL }, /* XSUM_XXH3_testdata[2466] */\n    { 1233, 0x9E3779B185EBCA8DULL, 0x9D9F04986C320F67ULL }, /* XSUM_XXH3_testdata[2467] */\n    { 1234, 0x0000000000000000ULL, 0x7E5DEDE89C4CAA7CULL }, /* XSUM_XXH3_testdata[2468] */\n    { 1234, 0x9E3779B185EBCA8DULL, 0x69B306E989DA7A62ULL }, /* XSUM_XXH3_testdata[2469] */\n    { 1235, 0x0000000000000000ULL, 0x7973D357ED85BC0EULL }, /* XSUM_XXH3_testdata[2470] */\n    { 1235, 0x9E3779B185EBCA8DULL, 0x6FC8A0DF4CF10E1CULL }, /* XSUM_XXH3_testdata[2471] */\n    { 1236, 0x0000000000000000ULL, 0xDD441332B08A607CULL }, /* XSUM_XXH3_testdata[2472] */\n    { 1236, 0x9E3779B185EBCA8DULL, 0x0FAC91C503DF1FEBULL }, /* XSUM_XXH3_testdata[2473] */\n    { 1237, 0x0000000000000000ULL, 0xA9775BE3A9A6131AULL }, /* XSUM_XXH3_testdata[2474] */\n    { 1237, 0x9E3779B185EBCA8DULL, 0xC9B0A287954E8012ULL }, /* XSUM_XXH3_testdata[2475] */\n    { 1238, 0x0000000000000000ULL, 0x9E35169670FBE108ULL }, /* XSUM_XXH3_testdata[2476] */\n    { 1238, 0x9E3779B185EBCA8DULL, 0x2023A156E28139E3ULL }, /* XSUM_XXH3_testdata[2477] */\n    { 1239, 0x0000000000000000ULL, 0x4E4DEE9735CB4055ULL }, /* XSUM_XXH3_testdata[2478] */\n    { 1239, 0x9E3779B185EBCA8DULL, 0xC364A0E39E616DB7ULL }, /* XSUM_XXH3_testdata[2479] */\n    { 1240, 0x0000000000000000ULL, 0x2A7C85DC0BC3EE8BULL }, /* XSUM_XXH3_testdata[2480] */\n    { 1240, 0x9E3779B185EBCA8DULL, 0x0F6F41015CE14325ULL }, /* XSUM_XXH3_testdata[2481] */\n    { 1241, 0x0000000000000000ULL, 0xD00F1254DF165FECULL }, /* XSUM_XXH3_testdata[2482] */\n    { 1241, 0x9E3779B185EBCA8DULL, 0x2A56A2294B2F6CBAULL }, /* XSUM_XXH3_testdata[2483] */\n    { 1242, 0x0000000000000000ULL, 0x1C4440B970A3869FULL }, /* XSUM_XXH3_testdata[2484] */\n    { 1242, 0x9E3779B185EBCA8DULL, 0x1236ECEFF72C441DULL }, /* XSUM_XXH3_testdata[2485] */\n    { 1243, 0x0000000000000000ULL, 0xDA895EE4B9E61D29ULL }, /* XSUM_XXH3_testdata[2486] */\n    { 1243, 0x9E3779B185EBCA8DULL, 0x3A2ED287B663F086ULL }, /* XSUM_XXH3_testdata[2487] */\n    { 1244, 0x0000000000000000ULL, 0xED2C73920717377BULL }, /* XSUM_XXH3_testdata[2488] */\n    { 1244, 0x9E3779B185EBCA8DULL, 0xBCA105ED165CA4A9ULL }, /* XSUM_XXH3_testdata[2489] */\n    { 1245, 0x0000000000000000ULL, 0x5DADE3B4EE279DAEULL }, /* XSUM_XXH3_testdata[2490] */\n    { 1245, 0x9E3779B185EBCA8DULL, 0x955927A20535B98AULL }, /* XSUM_XXH3_testdata[2491] */\n    { 1246, 0x0000000000000000ULL, 0xD160A5D5495D5E8CULL }, /* XSUM_XXH3_testdata[2492] */\n    { 1246, 0x9E3779B185EBCA8DULL, 0xD9A9BBC486C1B8D8ULL }, /* XSUM_XXH3_testdata[2493] */\n    { 1247, 0x0000000000000000ULL, 0xF0C39DC1539E6BCCULL }, /* XSUM_XXH3_testdata[2494] */\n    { 1247, 0x9E3779B185EBCA8DULL, 0xAC3AE69C884E7729ULL }, /* XSUM_XXH3_testdata[2495] */\n    { 1248, 0x0000000000000000ULL, 0xFE73761A4AF65FFDULL }, /* XSUM_XXH3_testdata[2496] */\n    { 1248, 0x9E3779B185EBCA8DULL, 0x010BF71F84A0C44FULL }, /* XSUM_XXH3_testdata[2497] */\n    { 1249, 0x0000000000000000ULL, 0x386B0F3E8F5B15EBULL }, /* XSUM_XXH3_testdata[2498] */\n    { 1249, 0x9E3779B185EBCA8DULL, 0x64154E718064ECD3ULL }, /* XSUM_XXH3_testdata[2499] */\n    { 1250, 0x0000000000000000ULL, 0x70114FAE28466327ULL }, /* XSUM_XXH3_testdata[2500] */\n    { 1250, 0x9E3779B185EBCA8DULL, 0x520C8028328EB353ULL }, /* XSUM_XXH3_testdata[2501] */\n    { 1251, 0x0000000000000000ULL, 0x0D9448C1A8756C97ULL }, /* XSUM_XXH3_testdata[2502] */\n    { 1251, 0x9E3779B185EBCA8DULL, 0x85323C6AD404615AULL }, /* XSUM_XXH3_testdata[2503] */\n    { 1252, 0x0000000000000000ULL, 0x4239C017A3B04AA8ULL }, /* XSUM_XXH3_testdata[2504] */\n    { 1252, 0x9E3779B185EBCA8DULL, 0xDF199CE2F05DFE16ULL }, /* XSUM_XXH3_testdata[2505] */\n    { 1253, 0x0000000000000000ULL, 0x00808A16F8A038DAULL }, /* XSUM_XXH3_testdata[2506] */\n    { 1253, 0x9E3779B185EBCA8DULL, 0x0065087E8B3B068CULL }, /* XSUM_XXH3_testdata[2507] */\n    { 1254, 0x0000000000000000ULL, 0xD5B487EE0149EB19ULL }, /* XSUM_XXH3_testdata[2508] */\n    { 1254, 0x9E3779B185EBCA8DULL, 0x0105641B56851E82ULL }, /* XSUM_XXH3_testdata[2509] */\n    { 1255, 0x0000000000000000ULL, 0xF069561740DF20F8ULL }, /* XSUM_XXH3_testdata[2510] */\n    { 1255, 0x9E3779B185EBCA8DULL, 0xB172B433AAE01598ULL }, /* XSUM_XXH3_testdata[2511] */\n    { 1256, 0x0000000000000000ULL, 0x0D7E791B04F5AB45ULL }, /* XSUM_XXH3_testdata[2512] */\n    { 1256, 0x9E3779B185EBCA8DULL, 0xA8D61EF9EF7BE7A8ULL }, /* XSUM_XXH3_testdata[2513] */\n    { 1257, 0x0000000000000000ULL, 0xE179C25DD03710A6ULL }, /* XSUM_XXH3_testdata[2514] */\n    { 1257, 0x9E3779B185EBCA8DULL, 0xAB9A2396EECCC42BULL }, /* XSUM_XXH3_testdata[2515] */\n    { 1258, 0x0000000000000000ULL, 0x3207A5EBFDC8367DULL }, /* XSUM_XXH3_testdata[2516] */\n    { 1258, 0x9E3779B185EBCA8DULL, 0x36BD16996362DC72ULL }, /* XSUM_XXH3_testdata[2517] */\n    { 1259, 0x0000000000000000ULL, 0x0585488A8CC7957BULL }, /* XSUM_XXH3_testdata[2518] */\n    { 1259, 0x9E3779B185EBCA8DULL, 0x5A37270C5ED0F342ULL }, /* XSUM_XXH3_testdata[2519] */\n    { 1260, 0x0000000000000000ULL, 0x4A20DAD887D6BBD4ULL }, /* XSUM_XXH3_testdata[2520] */\n    { 1260, 0x9E3779B185EBCA8DULL, 0x219B38C0687FD368ULL }, /* XSUM_XXH3_testdata[2521] */\n    { 1261, 0x0000000000000000ULL, 0x8B23B25F1596E89FULL }, /* XSUM_XXH3_testdata[2522] */\n    { 1261, 0x9E3779B185EBCA8DULL, 0x853FB0FBB427FB45ULL }, /* XSUM_XXH3_testdata[2523] */\n    { 1262, 0x0000000000000000ULL, 0xF416AF45D2BC98D9ULL }, /* XSUM_XXH3_testdata[2524] */\n    { 1262, 0x9E3779B185EBCA8DULL, 0xE94CBC9B85C6FE67ULL }, /* XSUM_XXH3_testdata[2525] */\n    { 1263, 0x0000000000000000ULL, 0x7EFC38C2AE4165F4ULL }, /* XSUM_XXH3_testdata[2526] */\n    { 1263, 0x9E3779B185EBCA8DULL, 0x1AD06110E21D4B37ULL }, /* XSUM_XXH3_testdata[2527] */\n    { 1264, 0x0000000000000000ULL, 0x7BBE54D17E33A670ULL }, /* XSUM_XXH3_testdata[2528] */\n    { 1264, 0x9E3779B185EBCA8DULL, 0x8A3D80012A575A84ULL }, /* XSUM_XXH3_testdata[2529] */\n    { 1265, 0x0000000000000000ULL, 0xC26D468B31A4CBE8ULL }, /* XSUM_XXH3_testdata[2530] */\n    { 1265, 0x9E3779B185EBCA8DULL, 0x080096652CC35FE9ULL }, /* XSUM_XXH3_testdata[2531] */\n    { 1266, 0x0000000000000000ULL, 0x4F712CFA55178726ULL }, /* XSUM_XXH3_testdata[2532] */\n    { 1266, 0x9E3779B185EBCA8DULL, 0xC85B4AADEAC26FE7ULL }, /* XSUM_XXH3_testdata[2533] */\n    { 1267, 0x0000000000000000ULL, 0xD0C33CAC8994145FULL }, /* XSUM_XXH3_testdata[2534] */\n    { 1267, 0x9E3779B185EBCA8DULL, 0xD43DDD757597A517ULL }, /* XSUM_XXH3_testdata[2535] */\n    { 1268, 0x0000000000000000ULL, 0xCC704F88D818DC14ULL }, /* XSUM_XXH3_testdata[2536] */\n    { 1268, 0x9E3779B185EBCA8DULL, 0xD65BDF74F55AAFCAULL }, /* XSUM_XXH3_testdata[2537] */\n    { 1269, 0x0000000000000000ULL, 0x87BDF6D964C49064ULL }, /* XSUM_XXH3_testdata[2538] */\n    { 1269, 0x9E3779B185EBCA8DULL, 0x4E22180AA9458D41ULL }, /* XSUM_XXH3_testdata[2539] */\n    { 1270, 0x0000000000000000ULL, 0xF8776976C5F32A3AULL }, /* XSUM_XXH3_testdata[2540] */\n    { 1270, 0x9E3779B185EBCA8DULL, 0x3C82A2476CC6A087ULL }, /* XSUM_XXH3_testdata[2541] */\n    { 1271, 0x0000000000000000ULL, 0xDF02E3A0949B78A2ULL }, /* XSUM_XXH3_testdata[2542] */\n    { 1271, 0x9E3779B185EBCA8DULL, 0x454545571E047733ULL }, /* XSUM_XXH3_testdata[2543] */\n    { 1272, 0x0000000000000000ULL, 0x2508A670FDFA5CE2ULL }, /* XSUM_XXH3_testdata[2544] */\n    { 1272, 0x9E3779B185EBCA8DULL, 0x596350B94FA7666BULL }, /* XSUM_XXH3_testdata[2545] */\n    { 1273, 0x0000000000000000ULL, 0x43737066DC3F2DE0ULL }, /* XSUM_XXH3_testdata[2546] */\n    { 1273, 0x9E3779B185EBCA8DULL, 0x155BF59E7C86E6F2ULL }, /* XSUM_XXH3_testdata[2547] */\n    { 1274, 0x0000000000000000ULL, 0x8A027A19AB8DF30DULL }, /* XSUM_XXH3_testdata[2548] */\n    { 1274, 0x9E3779B185EBCA8DULL, 0x3AE260AF75AF8633ULL }, /* XSUM_XXH3_testdata[2549] */\n    { 1275, 0x0000000000000000ULL, 0x139E04FD5326D80AULL }, /* XSUM_XXH3_testdata[2550] */\n    { 1275, 0x9E3779B185EBCA8DULL, 0x7C1726C8DFF75F70ULL }, /* XSUM_XXH3_testdata[2551] */\n    { 1276, 0x0000000000000000ULL, 0x1EF47D47884A52C4ULL }, /* XSUM_XXH3_testdata[2552] */\n    { 1276, 0x9E3779B185EBCA8DULL, 0xF4414C700D2BF87CULL }, /* XSUM_XXH3_testdata[2553] */\n    { 1277, 0x0000000000000000ULL, 0x22CEB5C9918B106EULL }, /* XSUM_XXH3_testdata[2554] */\n    { 1277, 0x9E3779B185EBCA8DULL, 0xCC35EDD26C8EA6E3ULL }, /* XSUM_XXH3_testdata[2555] */\n    { 1278, 0x0000000000000000ULL, 0xB3A97FDEB34B151CULL }, /* XSUM_XXH3_testdata[2556] */\n    { 1278, 0x9E3779B185EBCA8DULL, 0x4EF9F624C3E6B0F2ULL }, /* XSUM_XXH3_testdata[2557] */\n    { 1279, 0x0000000000000000ULL, 0x5D6D044F9D287AB3ULL }, /* XSUM_XXH3_testdata[2558] */\n    { 1279, 0x9E3779B185EBCA8DULL, 0x24DF7B6B7B4FDCB1ULL }, /* XSUM_XXH3_testdata[2559] */\n    { 1280, 0x0000000000000000ULL, 0xA052007A1ED81B4BULL }, /* XSUM_XXH3_testdata[2560] */\n    { 1280, 0x9E3779B185EBCA8DULL, 0x2B5ABFE77739F266ULL }, /* XSUM_XXH3_testdata[2561] */\n    { 1281, 0x0000000000000000ULL, 0x706FE95B5ED1F1ECULL }, /* XSUM_XXH3_testdata[2562] */\n    { 1281, 0x9E3779B185EBCA8DULL, 0x028F3EE15B5B1926ULL }, /* XSUM_XXH3_testdata[2563] */\n    { 1282, 0x0000000000000000ULL, 0xB8CB4A6E4330BFACULL }, /* XSUM_XXH3_testdata[2564] */\n    { 1282, 0x9E3779B185EBCA8DULL, 0x8F710D9E899E52CFULL }, /* XSUM_XXH3_testdata[2565] */\n    { 1283, 0x0000000000000000ULL, 0xAD5AF3E0E638F01BULL }, /* XSUM_XXH3_testdata[2566] */\n    { 1283, 0x9E3779B185EBCA8DULL, 0x2B473D9BB34B2639ULL }, /* XSUM_XXH3_testdata[2567] */\n    { 1284, 0x0000000000000000ULL, 0x8BDA723C64F22E78ULL }, /* XSUM_XXH3_testdata[2568] */\n    { 1284, 0x9E3779B185EBCA8DULL, 0x5D35928D7F4C773AULL }, /* XSUM_XXH3_testdata[2569] */\n    { 1285, 0x0000000000000000ULL, 0x33B3411728DB89DEULL }, /* XSUM_XXH3_testdata[2570] */\n    { 1285, 0x9E3779B185EBCA8DULL, 0x07CC92BD8DAFD59EULL }, /* XSUM_XXH3_testdata[2571] */\n    { 1286, 0x0000000000000000ULL, 0xB34C5AA46E8214C9ULL }, /* XSUM_XXH3_testdata[2572] */\n    { 1286, 0x9E3779B185EBCA8DULL, 0x02F507EBDBEAD2D5ULL }, /* XSUM_XXH3_testdata[2573] */\n    { 1287, 0x0000000000000000ULL, 0x711B95523A6055B5ULL }, /* XSUM_XXH3_testdata[2574] */\n    { 1287, 0x9E3779B185EBCA8DULL, 0x40F0841C17D1E7B3ULL }, /* XSUM_XXH3_testdata[2575] */\n    { 1288, 0x0000000000000000ULL, 0x7A27E619D3B0F975ULL }, /* XSUM_XXH3_testdata[2576] */\n    { 1288, 0x9E3779B185EBCA8DULL, 0x0FB143356DAFDBA7ULL }, /* XSUM_XXH3_testdata[2577] */\n    { 1289, 0x0000000000000000ULL, 0x2C1689F34787C3E2ULL }, /* XSUM_XXH3_testdata[2578] */\n    { 1289, 0x9E3779B185EBCA8DULL, 0xB7FFB0F20474B963ULL }, /* XSUM_XXH3_testdata[2579] */\n    { 1290, 0x0000000000000000ULL, 0x4E713D3477E39CFDULL }, /* XSUM_XXH3_testdata[2580] */\n    { 1290, 0x9E3779B185EBCA8DULL, 0xD4B17540BCA57D4CULL }, /* XSUM_XXH3_testdata[2581] */\n    { 1291, 0x0000000000000000ULL, 0x106EF57335080984ULL }, /* XSUM_XXH3_testdata[2582] */\n    { 1291, 0x9E3779B185EBCA8DULL, 0x61AF13E44002E0BDULL }, /* XSUM_XXH3_testdata[2583] */\n    { 1292, 0x0000000000000000ULL, 0xBE3B0728915B4399ULL }, /* XSUM_XXH3_testdata[2584] */\n    { 1292, 0x9E3779B185EBCA8DULL, 0xC74E6AD1C2B89F66ULL }, /* XSUM_XXH3_testdata[2585] */\n    { 1293, 0x0000000000000000ULL, 0x02AA4409F8DA8359ULL }, /* XSUM_XXH3_testdata[2586] */\n    { 1293, 0x9E3779B185EBCA8DULL, 0xBC5A11D25B5B33A4ULL }, /* XSUM_XXH3_testdata[2587] */\n    { 1294, 0x0000000000000000ULL, 0x86E73C822ECEEEF7ULL }, /* XSUM_XXH3_testdata[2588] */\n    { 1294, 0x9E3779B185EBCA8DULL, 0x480DBAB2F3AC062FULL }, /* XSUM_XXH3_testdata[2589] */\n    { 1295, 0x0000000000000000ULL, 0x122A037B3AFF18B3ULL }, /* XSUM_XXH3_testdata[2590] */\n    { 1295, 0x9E3779B185EBCA8DULL, 0x31D2AC865DE8ABCCULL }, /* XSUM_XXH3_testdata[2591] */\n    { 1296, 0x0000000000000000ULL, 0xAA4F241696FD6EACULL }, /* XSUM_XXH3_testdata[2592] */\n    { 1296, 0x9E3779B185EBCA8DULL, 0x6F8CBF15644E57ECULL }, /* XSUM_XXH3_testdata[2593] */\n    { 1297, 0x0000000000000000ULL, 0xFBEB130E6B67E9F9ULL }, /* XSUM_XXH3_testdata[2594] */\n    { 1297, 0x9E3779B185EBCA8DULL, 0x25322F0248CC7AA2ULL }, /* XSUM_XXH3_testdata[2595] */\n    { 1298, 0x0000000000000000ULL, 0xA1407DC529CD23DFULL }, /* XSUM_XXH3_testdata[2596] */\n    { 1298, 0x9E3779B185EBCA8DULL, 0xD383F937F6419641ULL }, /* XSUM_XXH3_testdata[2597] */\n    { 1299, 0x0000000000000000ULL, 0x765F502DF20DC49EULL }, /* XSUM_XXH3_testdata[2598] */\n    { 1299, 0x9E3779B185EBCA8DULL, 0x95784B95CA2EE2AFULL }, /* XSUM_XXH3_testdata[2599] */\n    { 1300, 0x0000000000000000ULL, 0x2E312D65217E00C6ULL }, /* XSUM_XXH3_testdata[2600] */\n    { 1300, 0x9E3779B185EBCA8DULL, 0x73B3A23E757FD725ULL }, /* XSUM_XXH3_testdata[2601] */\n    { 1301, 0x0000000000000000ULL, 0xBFCAA107E96D496CULL }, /* XSUM_XXH3_testdata[2602] */\n    { 1301, 0x9E3779B185EBCA8DULL, 0x1752171113E51492ULL }, /* XSUM_XXH3_testdata[2603] */\n    { 1302, 0x0000000000000000ULL, 0x4A14045C5D89824EULL }, /* XSUM_XXH3_testdata[2604] */\n    { 1302, 0x9E3779B185EBCA8DULL, 0xC4982E354FD226E5ULL }, /* XSUM_XXH3_testdata[2605] */\n    { 1303, 0x0000000000000000ULL, 0xEA3514B0E1197A04ULL }, /* XSUM_XXH3_testdata[2606] */\n    { 1303, 0x9E3779B185EBCA8DULL, 0x6AE4B901B790ED3CULL }, /* XSUM_XXH3_testdata[2607] */\n    { 1304, 0x0000000000000000ULL, 0xA138B765D214CE09ULL }, /* XSUM_XXH3_testdata[2608] */\n    { 1304, 0x9E3779B185EBCA8DULL, 0x559B3C09BAE652E9ULL }, /* XSUM_XXH3_testdata[2609] */\n    { 1305, 0x0000000000000000ULL, 0x15E0EADCA67CCFA8ULL }, /* XSUM_XXH3_testdata[2610] */\n    { 1305, 0x9E3779B185EBCA8DULL, 0xF6CA119E0EA4FDB0ULL }, /* XSUM_XXH3_testdata[2611] */\n    { 1306, 0x0000000000000000ULL, 0x48C0AC8100A77315ULL }, /* XSUM_XXH3_testdata[2612] */\n    { 1306, 0x9E3779B185EBCA8DULL, 0x3776AFB679FA3D19ULL }, /* XSUM_XXH3_testdata[2613] */\n    { 1307, 0x0000000000000000ULL, 0xE20038DD97EE905AULL }, /* XSUM_XXH3_testdata[2614] */\n    { 1307, 0x9E3779B185EBCA8DULL, 0x874525080EFA9D8FULL }, /* XSUM_XXH3_testdata[2615] */\n    { 1308, 0x0000000000000000ULL, 0xF635B857A2E91F86ULL }, /* XSUM_XXH3_testdata[2616] */\n    { 1308, 0x9E3779B185EBCA8DULL, 0x3A6B8B0AB31B8052ULL }, /* XSUM_XXH3_testdata[2617] */\n    { 1309, 0x0000000000000000ULL, 0x6ACEA1D97A14D732ULL }, /* XSUM_XXH3_testdata[2618] */\n    { 1309, 0x9E3779B185EBCA8DULL, 0x412819DDA017A594ULL }, /* XSUM_XXH3_testdata[2619] */\n    { 1310, 0x0000000000000000ULL, 0xE35CB9A7A97781F1ULL }, /* XSUM_XXH3_testdata[2620] */\n    { 1310, 0x9E3779B185EBCA8DULL, 0xECB208A93C18C0CAULL }, /* XSUM_XXH3_testdata[2621] */\n    { 1311, 0x0000000000000000ULL, 0xE6ADABBE2EF32E4FULL }, /* XSUM_XXH3_testdata[2622] */\n    { 1311, 0x9E3779B185EBCA8DULL, 0xBFCC09E11B207515ULL }, /* XSUM_XXH3_testdata[2623] */\n    { 1312, 0x0000000000000000ULL, 0x5A524056A59C39FAULL }, /* XSUM_XXH3_testdata[2624] */\n    { 1312, 0x9E3779B185EBCA8DULL, 0x931114ABC3DC32E8ULL }, /* XSUM_XXH3_testdata[2625] */\n    { 1313, 0x0000000000000000ULL, 0x348713C223BEDAFCULL }, /* XSUM_XXH3_testdata[2626] */\n    { 1313, 0x9E3779B185EBCA8DULL, 0x1A83FA881795CBBCULL }, /* XSUM_XXH3_testdata[2627] */\n    { 1314, 0x0000000000000000ULL, 0x31D349060630B50AULL }, /* XSUM_XXH3_testdata[2628] */\n    { 1314, 0x9E3779B185EBCA8DULL, 0x77E1CB3EF4DDBB61ULL }, /* XSUM_XXH3_testdata[2629] */\n    { 1315, 0x0000000000000000ULL, 0x3C62C7DDD34E3A6CULL }, /* XSUM_XXH3_testdata[2630] */\n    { 1315, 0x9E3779B185EBCA8DULL, 0x30104F41CE30A159ULL }, /* XSUM_XXH3_testdata[2631] */\n    { 1316, 0x0000000000000000ULL, 0x963A7C670708591EULL }, /* XSUM_XXH3_testdata[2632] */\n    { 1316, 0x9E3779B185EBCA8DULL, 0xF50E0A55D013DBFCULL }, /* XSUM_XXH3_testdata[2633] */\n    { 1317, 0x0000000000000000ULL, 0xB2419B4144391552ULL }, /* XSUM_XXH3_testdata[2634] */\n    { 1317, 0x9E3779B185EBCA8DULL, 0x780D130EE1B881ACULL }, /* XSUM_XXH3_testdata[2635] */\n    { 1318, 0x0000000000000000ULL, 0x9DF4A7E827BDC174ULL }, /* XSUM_XXH3_testdata[2636] */\n    { 1318, 0x9E3779B185EBCA8DULL, 0xA82A0482BE55D5B6ULL }, /* XSUM_XXH3_testdata[2637] */\n    { 1319, 0x0000000000000000ULL, 0x2ACD45BB72294061ULL }, /* XSUM_XXH3_testdata[2638] */\n    { 1319, 0x9E3779B185EBCA8DULL, 0x9395401BD5483F23ULL }, /* XSUM_XXH3_testdata[2639] */\n    { 1320, 0x0000000000000000ULL, 0x0AEF011F90C1E41DULL }, /* XSUM_XXH3_testdata[2640] */\n    { 1320, 0x9E3779B185EBCA8DULL, 0x596CBB319F2C596EULL }, /* XSUM_XXH3_testdata[2641] */\n    { 1321, 0x0000000000000000ULL, 0x80460A7A97F367BDULL }, /* XSUM_XXH3_testdata[2642] */\n    { 1321, 0x9E3779B185EBCA8DULL, 0xE2D6AD55B6F5D0CFULL }, /* XSUM_XXH3_testdata[2643] */\n    { 1322, 0x0000000000000000ULL, 0x89B95EF219277ED4ULL }, /* XSUM_XXH3_testdata[2644] */\n    { 1322, 0x9E3779B185EBCA8DULL, 0x2F4E770670C952E8ULL }, /* XSUM_XXH3_testdata[2645] */\n    { 1323, 0x0000000000000000ULL, 0x2DD88C30A443D7D7ULL }, /* XSUM_XXH3_testdata[2646] */\n    { 1323, 0x9E3779B185EBCA8DULL, 0x85F0EC0DF35B17D4ULL }, /* XSUM_XXH3_testdata[2647] */\n    { 1324, 0x0000000000000000ULL, 0xF0BE5E244A57175FULL }, /* XSUM_XXH3_testdata[2648] */\n    { 1324, 0x9E3779B185EBCA8DULL, 0xECD94321D78E8F02ULL }, /* XSUM_XXH3_testdata[2649] */\n    { 1325, 0x0000000000000000ULL, 0x2A2016610FD63EE6ULL }, /* XSUM_XXH3_testdata[2650] */\n    { 1325, 0x9E3779B185EBCA8DULL, 0x3C55DEB660FE27B9ULL }, /* XSUM_XXH3_testdata[2651] */\n    { 1326, 0x0000000000000000ULL, 0xB128119374CE78F9ULL }, /* XSUM_XXH3_testdata[2652] */\n    { 1326, 0x9E3779B185EBCA8DULL, 0x2085E106ADECF1B2ULL }, /* XSUM_XXH3_testdata[2653] */\n    { 1327, 0x0000000000000000ULL, 0xD192FD7CBF097AC7ULL }, /* XSUM_XXH3_testdata[2654] */\n    { 1327, 0x9E3779B185EBCA8DULL, 0xDF8C82D3D28D27B7ULL }, /* XSUM_XXH3_testdata[2655] */\n    { 1328, 0x0000000000000000ULL, 0xD431613BD81D3AB0ULL }, /* XSUM_XXH3_testdata[2656] */\n    { 1328, 0x9E3779B185EBCA8DULL, 0xABC8A0FCA92A635CULL }, /* XSUM_XXH3_testdata[2657] */\n    { 1329, 0x0000000000000000ULL, 0x17CC6274E7945D88ULL }, /* XSUM_XXH3_testdata[2658] */\n    { 1329, 0x9E3779B185EBCA8DULL, 0xBF869D913272410CULL }, /* XSUM_XXH3_testdata[2659] */\n    { 1330, 0x0000000000000000ULL, 0xA67F9F7FF59914F1ULL }, /* XSUM_XXH3_testdata[2660] */\n    { 1330, 0x9E3779B185EBCA8DULL, 0x82FBBBA32BEC1877ULL }, /* XSUM_XXH3_testdata[2661] */\n    { 1331, 0x0000000000000000ULL, 0xC028954DD075245BULL }, /* XSUM_XXH3_testdata[2662] */\n    { 1331, 0x9E3779B185EBCA8DULL, 0x03F65BD9C4C7FE3DULL }, /* XSUM_XXH3_testdata[2663] */\n    { 1332, 0x0000000000000000ULL, 0x9BEBCAC3C85B315EULL }, /* XSUM_XXH3_testdata[2664] */\n    { 1332, 0x9E3779B185EBCA8DULL, 0x49D4CF6B712D5C3EULL }, /* XSUM_XXH3_testdata[2665] */\n    { 1333, 0x0000000000000000ULL, 0xB2EB79B747A26D08ULL }, /* XSUM_XXH3_testdata[2666] */\n    { 1333, 0x9E3779B185EBCA8DULL, 0xACDAB80EBF5A8917ULL }, /* XSUM_XXH3_testdata[2667] */\n    { 1334, 0x0000000000000000ULL, 0x489CC739652506E7ULL }, /* XSUM_XXH3_testdata[2668] */\n    { 1334, 0x9E3779B185EBCA8DULL, 0x1AB9D545728CEBE0ULL }, /* XSUM_XXH3_testdata[2669] */\n    { 1335, 0x0000000000000000ULL, 0xEF30237B5B64111EULL }, /* XSUM_XXH3_testdata[2670] */\n    { 1335, 0x9E3779B185EBCA8DULL, 0xB17E403458E586ADULL }, /* XSUM_XXH3_testdata[2671] */\n    { 1336, 0x0000000000000000ULL, 0x50BC61865CD999A7ULL }, /* XSUM_XXH3_testdata[2672] */\n    { 1336, 0x9E3779B185EBCA8DULL, 0xB87D6B59E0354933ULL }, /* XSUM_XXH3_testdata[2673] */\n    { 1337, 0x0000000000000000ULL, 0x9F9A750C6A44F106ULL }, /* XSUM_XXH3_testdata[2674] */\n    { 1337, 0x9E3779B185EBCA8DULL, 0x14070E973B3175A2ULL }, /* XSUM_XXH3_testdata[2675] */\n    { 1338, 0x0000000000000000ULL, 0x0CCD61FDF237FD29ULL }, /* XSUM_XXH3_testdata[2676] */\n    { 1338, 0x9E3779B185EBCA8DULL, 0x4E381AF0B5DFBF40ULL }, /* XSUM_XXH3_testdata[2677] */\n    { 1339, 0x0000000000000000ULL, 0xB32803C680833A42ULL }, /* XSUM_XXH3_testdata[2678] */\n    { 1339, 0x9E3779B185EBCA8DULL, 0x2B7A79478BDC64F7ULL }, /* XSUM_XXH3_testdata[2679] */\n    { 1340, 0x0000000000000000ULL, 0x6D3515923BFD0E5FULL }, /* XSUM_XXH3_testdata[2680] */\n    { 1340, 0x9E3779B185EBCA8DULL, 0xD9701B31913C2D4DULL }, /* XSUM_XXH3_testdata[2681] */\n    { 1341, 0x0000000000000000ULL, 0x48D8EC79E90A0EFDULL }, /* XSUM_XXH3_testdata[2682] */\n    { 1341, 0x9E3779B185EBCA8DULL, 0x594875400B329F1DULL }, /* XSUM_XXH3_testdata[2683] */\n    { 1342, 0x0000000000000000ULL, 0x0918BCD2A85A11A3ULL }, /* XSUM_XXH3_testdata[2684] */\n    { 1342, 0x9E3779B185EBCA8DULL, 0x50617EC3AD9E6FBEULL }, /* XSUM_XXH3_testdata[2685] */\n    { 1343, 0x0000000000000000ULL, 0x47B4B996ACBCA272ULL }, /* XSUM_XXH3_testdata[2686] */\n    { 1343, 0x9E3779B185EBCA8DULL, 0x78E1BF70B413C5A2ULL }, /* XSUM_XXH3_testdata[2687] */\n    { 1344, 0x0000000000000000ULL, 0x013CE932DAF959CDULL }, /* XSUM_XXH3_testdata[2688] */\n    { 1344, 0x9E3779B185EBCA8DULL, 0x4D72828634546D2AULL }, /* XSUM_XXH3_testdata[2689] */\n    { 1345, 0x0000000000000000ULL, 0x2C8E44982DF991F6ULL }, /* XSUM_XXH3_testdata[2690] */\n    { 1345, 0x9E3779B185EBCA8DULL, 0xBC54FDBF323BBE36ULL }, /* XSUM_XXH3_testdata[2691] */\n    { 1346, 0x0000000000000000ULL, 0x545BC34A73452297ULL }, /* XSUM_XXH3_testdata[2692] */\n    { 1346, 0x9E3779B185EBCA8DULL, 0x4FA571EA68EF0EDEULL }, /* XSUM_XXH3_testdata[2693] */\n    { 1347, 0x0000000000000000ULL, 0x4E37934066623E92ULL }, /* XSUM_XXH3_testdata[2694] */\n    { 1347, 0x9E3779B185EBCA8DULL, 0x644C5D2147A8F740ULL }, /* XSUM_XXH3_testdata[2695] */\n    { 1348, 0x0000000000000000ULL, 0xCD4F19DD0DB10EFBULL }, /* XSUM_XXH3_testdata[2696] */\n    { 1348, 0x9E3779B185EBCA8DULL, 0x7DFE56ABB035254AULL }, /* XSUM_XXH3_testdata[2697] */\n    { 1349, 0x0000000000000000ULL, 0x2100DF530D1E9080ULL }, /* XSUM_XXH3_testdata[2698] */\n    { 1349, 0x9E3779B185EBCA8DULL, 0xC50323EF416AA038ULL }, /* XSUM_XXH3_testdata[2699] */\n    { 1350, 0x0000000000000000ULL, 0xB9B2CF49EC2FB54AULL }, /* XSUM_XXH3_testdata[2700] */\n    { 1350, 0x9E3779B185EBCA8DULL, 0xD2F4FF62CC375D83ULL }, /* XSUM_XXH3_testdata[2701] */\n    { 1351, 0x0000000000000000ULL, 0x0BCCBE7B56310000ULL }, /* XSUM_XXH3_testdata[2702] */\n    { 1351, 0x9E3779B185EBCA8DULL, 0x833F2097408DEB25ULL }, /* XSUM_XXH3_testdata[2703] */\n    { 1352, 0x0000000000000000ULL, 0xD46A300F00BF77ACULL }, /* XSUM_XXH3_testdata[2704] */\n    { 1352, 0x9E3779B185EBCA8DULL, 0x7BB6491930D53D56ULL }, /* XSUM_XXH3_testdata[2705] */\n    { 1353, 0x0000000000000000ULL, 0xAC88733AE865906AULL }, /* XSUM_XXH3_testdata[2706] */\n    { 1353, 0x9E3779B185EBCA8DULL, 0xD9F702821DE7D0D1ULL }, /* XSUM_XXH3_testdata[2707] */\n    { 1354, 0x0000000000000000ULL, 0xA5FEF51672F13422ULL }, /* XSUM_XXH3_testdata[2708] */\n    { 1354, 0x9E3779B185EBCA8DULL, 0x22FB18918E9D4B13ULL }, /* XSUM_XXH3_testdata[2709] */\n    { 1355, 0x0000000000000000ULL, 0x4005197CEECF38A2ULL }, /* XSUM_XXH3_testdata[2710] */\n    { 1355, 0x9E3779B185EBCA8DULL, 0x871C7BC841BF8CEAULL }, /* XSUM_XXH3_testdata[2711] */\n    { 1356, 0x0000000000000000ULL, 0x6EC4DD07A7E36E9AULL }, /* XSUM_XXH3_testdata[2712] */\n    { 1356, 0x9E3779B185EBCA8DULL, 0xC0F936987C1DCAF3ULL }, /* XSUM_XXH3_testdata[2713] */\n    { 1357, 0x0000000000000000ULL, 0x45D8E48A5773C59DULL }, /* XSUM_XXH3_testdata[2714] */\n    { 1357, 0x9E3779B185EBCA8DULL, 0xCAD350498527761CULL }, /* XSUM_XXH3_testdata[2715] */\n    { 1358, 0x0000000000000000ULL, 0xF34F31F8ECAD2143ULL }, /* XSUM_XXH3_testdata[2716] */\n    { 1358, 0x9E3779B185EBCA8DULL, 0xA22B0347980DA2A2ULL }, /* XSUM_XXH3_testdata[2717] */\n    { 1359, 0x0000000000000000ULL, 0x84EDC4E7BF4E5B18ULL }, /* XSUM_XXH3_testdata[2718] */\n    { 1359, 0x9E3779B185EBCA8DULL, 0xB4EE44ACBAA9AEEDULL }, /* XSUM_XXH3_testdata[2719] */\n    { 1360, 0x0000000000000000ULL, 0x51117C6E1E37F76BULL }, /* XSUM_XXH3_testdata[2720] */\n    { 1360, 0x9E3779B185EBCA8DULL, 0xDE39242E68E96791ULL }, /* XSUM_XXH3_testdata[2721] */\n    { 1361, 0x0000000000000000ULL, 0xFAFE998DF0B50089ULL }, /* XSUM_XXH3_testdata[2722] */\n    { 1361, 0x9E3779B185EBCA8DULL, 0x491FD31A6C5E4C5AULL }, /* XSUM_XXH3_testdata[2723] */\n    { 1362, 0x0000000000000000ULL, 0x9CD51FE9344A44CCULL }, /* XSUM_XXH3_testdata[2724] */\n    { 1362, 0x9E3779B185EBCA8DULL, 0x707038848851FC82ULL }, /* XSUM_XXH3_testdata[2725] */\n    { 1363, 0x0000000000000000ULL, 0x8689EEAB84ADF7B2ULL }, /* XSUM_XXH3_testdata[2726] */\n    { 1363, 0x9E3779B185EBCA8DULL, 0xB4FF0F3BAABCCEFBULL }, /* XSUM_XXH3_testdata[2727] */\n    { 1364, 0x0000000000000000ULL, 0xD8A9BD68C7CC6E1EULL }, /* XSUM_XXH3_testdata[2728] */\n    { 1364, 0x9E3779B185EBCA8DULL, 0xD40E9878CF8B320DULL }, /* XSUM_XXH3_testdata[2729] */\n    { 1365, 0x0000000000000000ULL, 0x9E8CDD6FD3212339ULL }, /* XSUM_XXH3_testdata[2730] */\n    { 1365, 0x9E3779B185EBCA8DULL, 0x4491397CAE591664ULL }, /* XSUM_XXH3_testdata[2731] */\n    { 1366, 0x0000000000000000ULL, 0x7F393536B14CBE53ULL }, /* XSUM_XXH3_testdata[2732] */\n    { 1366, 0x9E3779B185EBCA8DULL, 0x563CB0DDCFB26BC1ULL }, /* XSUM_XXH3_testdata[2733] */\n    { 1367, 0x0000000000000000ULL, 0x9430E26767DF1D3EULL }, /* XSUM_XXH3_testdata[2734] */\n    { 1367, 0x9E3779B185EBCA8DULL, 0xEF72A6CB89577251ULL }, /* XSUM_XXH3_testdata[2735] */\n    { 1368, 0x0000000000000000ULL, 0x891A102E719B14CDULL }, /* XSUM_XXH3_testdata[2736] */\n    { 1368, 0x9E3779B185EBCA8DULL, 0xBDE60050A6A51CFDULL }, /* XSUM_XXH3_testdata[2737] */\n    { 1369, 0x0000000000000000ULL, 0xEFB2528D9B81371AULL }, /* XSUM_XXH3_testdata[2738] */\n    { 1369, 0x9E3779B185EBCA8DULL, 0xA3D60B20FFA4D538ULL }, /* XSUM_XXH3_testdata[2739] */\n    { 1370, 0x0000000000000000ULL, 0x1F1B7AC192DA87BCULL }, /* XSUM_XXH3_testdata[2740] */\n    { 1370, 0x9E3779B185EBCA8DULL, 0x8960BB3D1F06D6ADULL }, /* XSUM_XXH3_testdata[2741] */\n    { 1371, 0x0000000000000000ULL, 0x3AC2E3D1D3110DE2ULL }, /* XSUM_XXH3_testdata[2742] */\n    { 1371, 0x9E3779B185EBCA8DULL, 0xA4984AC23440FCC0ULL }, /* XSUM_XXH3_testdata[2743] */\n    { 1372, 0x0000000000000000ULL, 0xFC287592522AA7EAULL }, /* XSUM_XXH3_testdata[2744] */\n    { 1372, 0x9E3779B185EBCA8DULL, 0xE8883E3691A64403ULL }, /* XSUM_XXH3_testdata[2745] */\n    { 1373, 0x0000000000000000ULL, 0x07D5764EFA3C28F8ULL }, /* XSUM_XXH3_testdata[2746] */\n    { 1373, 0x9E3779B185EBCA8DULL, 0x63B086ADA02C05EEULL }, /* XSUM_XXH3_testdata[2747] */\n    { 1374, 0x0000000000000000ULL, 0x692E010AACBBDD83ULL }, /* XSUM_XXH3_testdata[2748] */\n    { 1374, 0x9E3779B185EBCA8DULL, 0x356F67E7E6882972ULL }, /* XSUM_XXH3_testdata[2749] */\n    { 1375, 0x0000000000000000ULL, 0x918BCEDA7771D693ULL }, /* XSUM_XXH3_testdata[2750] */\n    { 1375, 0x9E3779B185EBCA8DULL, 0x27DD289F1FF7E712ULL }, /* XSUM_XXH3_testdata[2751] */\n    { 1376, 0x0000000000000000ULL, 0xF5F2C67F0A407FEFULL }, /* XSUM_XXH3_testdata[2752] */\n    { 1376, 0x9E3779B185EBCA8DULL, 0x79D4CA65FA84EB33ULL }, /* XSUM_XXH3_testdata[2753] */\n    { 1377, 0x0000000000000000ULL, 0x232F5E84CBA74A2BULL }, /* XSUM_XXH3_testdata[2754] */\n    { 1377, 0x9E3779B185EBCA8DULL, 0x57F9DB3D6629D224ULL }, /* XSUM_XXH3_testdata[2755] */\n    { 1378, 0x0000000000000000ULL, 0x18EC462AFF076DF2ULL }, /* XSUM_XXH3_testdata[2756] */\n    { 1378, 0x9E3779B185EBCA8DULL, 0x65A838B3EC37187DULL }, /* XSUM_XXH3_testdata[2757] */\n    { 1379, 0x0000000000000000ULL, 0x608525D658F939D3ULL }, /* XSUM_XXH3_testdata[2758] */\n    { 1379, 0x9E3779B185EBCA8DULL, 0x788376FB391AB04FULL }, /* XSUM_XXH3_testdata[2759] */\n    { 1380, 0x0000000000000000ULL, 0x8B3AFE1BAC0FB533ULL }, /* XSUM_XXH3_testdata[2760] */\n    { 1380, 0x9E3779B185EBCA8DULL, 0x3298317AA71EF9F9ULL }, /* XSUM_XXH3_testdata[2761] */\n    { 1381, 0x0000000000000000ULL, 0xD88FA62E105EB767ULL }, /* XSUM_XXH3_testdata[2762] */\n    { 1381, 0x9E3779B185EBCA8DULL, 0xD537F267D2EF8B65ULL }, /* XSUM_XXH3_testdata[2763] */\n    { 1382, 0x0000000000000000ULL, 0xDD5FB8861BE2649CULL }, /* XSUM_XXH3_testdata[2764] */\n    { 1382, 0x9E3779B185EBCA8DULL, 0xA478AC159FA2C385ULL }, /* XSUM_XXH3_testdata[2765] */\n    { 1383, 0x0000000000000000ULL, 0x0D9D6E0B91B185EDULL }, /* XSUM_XXH3_testdata[2766] */\n    { 1383, 0x9E3779B185EBCA8DULL, 0xF0EC3D66A74F4B28ULL }, /* XSUM_XXH3_testdata[2767] */\n    { 1384, 0x0000000000000000ULL, 0xC99D8710C21F05EEULL }, /* XSUM_XXH3_testdata[2768] */\n    { 1384, 0x9E3779B185EBCA8DULL, 0x25CDB598192DF8FCULL }, /* XSUM_XXH3_testdata[2769] */\n    { 1385, 0x0000000000000000ULL, 0x439FD60BEA838A0FULL }, /* XSUM_XXH3_testdata[2770] */\n    { 1385, 0x9E3779B185EBCA8DULL, 0xB3A834E9936D2D1AULL }, /* XSUM_XXH3_testdata[2771] */\n    { 1386, 0x0000000000000000ULL, 0x880E9297A45F41F0ULL }, /* XSUM_XXH3_testdata[2772] */\n    { 1386, 0x9E3779B185EBCA8DULL, 0xE0BA11F31B01B255ULL }, /* XSUM_XXH3_testdata[2773] */\n    { 1387, 0x0000000000000000ULL, 0x7C62397B9BFBB320ULL }, /* XSUM_XXH3_testdata[2774] */\n    { 1387, 0x9E3779B185EBCA8DULL, 0x345576A37765439FULL }, /* XSUM_XXH3_testdata[2775] */\n    { 1388, 0x0000000000000000ULL, 0x54D1CEDD46CC5E95ULL }, /* XSUM_XXH3_testdata[2776] */\n    { 1388, 0x9E3779B185EBCA8DULL, 0xFCA3CCFDCF6AF513ULL }, /* XSUM_XXH3_testdata[2777] */\n    { 1389, 0x0000000000000000ULL, 0x06D8FE21D778AAB9ULL }, /* XSUM_XXH3_testdata[2778] */\n    { 1389, 0x9E3779B185EBCA8DULL, 0xBAA587CD7AE898BBULL }, /* XSUM_XXH3_testdata[2779] */\n    { 1390, 0x0000000000000000ULL, 0x892662096E518CC2ULL }, /* XSUM_XXH3_testdata[2780] */\n    { 1390, 0x9E3779B185EBCA8DULL, 0x0E765E19FFE64E7FULL }, /* XSUM_XXH3_testdata[2781] */\n    { 1391, 0x0000000000000000ULL, 0x7A85690BFD330103ULL }, /* XSUM_XXH3_testdata[2782] */\n    { 1391, 0x9E3779B185EBCA8DULL, 0xC528D0268830BD69ULL }, /* XSUM_XXH3_testdata[2783] */\n    { 1392, 0x0000000000000000ULL, 0xA25DB11855B24D5AULL }, /* XSUM_XXH3_testdata[2784] */\n    { 1392, 0x9E3779B185EBCA8DULL, 0x21157B53701A3A07ULL }, /* XSUM_XXH3_testdata[2785] */\n    { 1393, 0x0000000000000000ULL, 0x8EE466F3114B1006ULL }, /* XSUM_XXH3_testdata[2786] */\n    { 1393, 0x9E3779B185EBCA8DULL, 0x4711090ED966E57CULL }, /* XSUM_XXH3_testdata[2787] */\n    { 1394, 0x0000000000000000ULL, 0x169F9D539694E361ULL }, /* XSUM_XXH3_testdata[2788] */\n    { 1394, 0x9E3779B185EBCA8DULL, 0xE1962C3129A85215ULL }, /* XSUM_XXH3_testdata[2789] */\n    { 1395, 0x0000000000000000ULL, 0x3CC434DCAF0A0B99ULL }, /* XSUM_XXH3_testdata[2790] */\n    { 1395, 0x9E3779B185EBCA8DULL, 0xE7E837D0081BA4E0ULL }, /* XSUM_XXH3_testdata[2791] */\n    { 1396, 0x0000000000000000ULL, 0x59922D1610ACF94BULL }, /* XSUM_XXH3_testdata[2792] */\n    { 1396, 0x9E3779B185EBCA8DULL, 0x11521545078B6367ULL }, /* XSUM_XXH3_testdata[2793] */\n    { 1397, 0x0000000000000000ULL, 0x4BB9F5EFD3033344ULL }, /* XSUM_XXH3_testdata[2794] */\n    { 1397, 0x9E3779B185EBCA8DULL, 0xEED83CCAAF3788D8ULL }, /* XSUM_XXH3_testdata[2795] */\n    { 1398, 0x0000000000000000ULL, 0xCB23BE297181BCFDULL }, /* XSUM_XXH3_testdata[2796] */\n    { 1398, 0x9E3779B185EBCA8DULL, 0x69847059506D2C9FULL }, /* XSUM_XXH3_testdata[2797] */\n    { 1399, 0x0000000000000000ULL, 0x325BB710E26DF0FCULL }, /* XSUM_XXH3_testdata[2798] */\n    { 1399, 0x9E3779B185EBCA8DULL, 0xF647B2920BE132BAULL }, /* XSUM_XXH3_testdata[2799] */\n    { 1400, 0x0000000000000000ULL, 0x1BFB88704DE4E438ULL }, /* XSUM_XXH3_testdata[2800] */\n    { 1400, 0x9E3779B185EBCA8DULL, 0x20D9F4B075164F01ULL }, /* XSUM_XXH3_testdata[2801] */\n    { 1401, 0x0000000000000000ULL, 0x6E4007192C7E5477ULL }, /* XSUM_XXH3_testdata[2802] */\n    { 1401, 0x9E3779B185EBCA8DULL, 0xA7D1BBA89BDE98DEULL }, /* XSUM_XXH3_testdata[2803] */\n    { 1402, 0x0000000000000000ULL, 0x793FF88589F05AA2ULL }, /* XSUM_XXH3_testdata[2804] */\n    { 1402, 0x9E3779B185EBCA8DULL, 0xDBA14086CDB9BFE2ULL }, /* XSUM_XXH3_testdata[2805] */\n    { 1403, 0x0000000000000000ULL, 0x13CEECC554A7370AULL }, /* XSUM_XXH3_testdata[2806] */\n    { 1403, 0x9E3779B185EBCA8DULL, 0x4E9EAE32CBDB6224ULL }, /* XSUM_XXH3_testdata[2807] */\n    { 1404, 0x0000000000000000ULL, 0xF258680A2E1B12F1ULL }, /* XSUM_XXH3_testdata[2808] */\n    { 1404, 0x9E3779B185EBCA8DULL, 0x8200673C5037CCABULL }, /* XSUM_XXH3_testdata[2809] */\n    { 1405, 0x0000000000000000ULL, 0x141D9483A8195CDBULL }, /* XSUM_XXH3_testdata[2810] */\n    { 1405, 0x9E3779B185EBCA8DULL, 0xE1A8D72971376B0AULL }, /* XSUM_XXH3_testdata[2811] */\n    { 1406, 0x0000000000000000ULL, 0xC4608F1B395D7C61ULL }, /* XSUM_XXH3_testdata[2812] */\n    { 1406, 0x9E3779B185EBCA8DULL, 0x46009F40B052DB04ULL }, /* XSUM_XXH3_testdata[2813] */\n    { 1407, 0x0000000000000000ULL, 0x921CDB3E8E19798AULL }, /* XSUM_XXH3_testdata[2814] */\n    { 1407, 0x9E3779B185EBCA8DULL, 0xF5AD8F6C0B798283ULL }, /* XSUM_XXH3_testdata[2815] */\n    { 1408, 0x0000000000000000ULL, 0xF1AA40024272BF80ULL }, /* XSUM_XXH3_testdata[2816] */\n    { 1408, 0x9E3779B185EBCA8DULL, 0xDE4DF8A29F45B9E0ULL }, /* XSUM_XXH3_testdata[2817] */\n    { 1409, 0x0000000000000000ULL, 0x5C6F59BD9E2B8E96ULL }, /* XSUM_XXH3_testdata[2818] */\n    { 1409, 0x9E3779B185EBCA8DULL, 0x3358B1D4BE22F75FULL }, /* XSUM_XXH3_testdata[2819] */\n    { 1410, 0x0000000000000000ULL, 0xA1CEA58F6C781CC7ULL }, /* XSUM_XXH3_testdata[2820] */\n    { 1410, 0x9E3779B185EBCA8DULL, 0x2DE90C2DF28E7DFEULL }, /* XSUM_XXH3_testdata[2821] */\n    { 1411, 0x0000000000000000ULL, 0x8059B60348A48EBFULL }, /* XSUM_XXH3_testdata[2822] */\n    { 1411, 0x9E3779B185EBCA8DULL, 0x8EE711ABBC7D9DC4ULL }, /* XSUM_XXH3_testdata[2823] */\n    { 1412, 0x0000000000000000ULL, 0x2BFDA33D3D40EFF9ULL }, /* XSUM_XXH3_testdata[2824] */\n    { 1412, 0x9E3779B185EBCA8DULL, 0x3D6A9CD83D92A2F9ULL }, /* XSUM_XXH3_testdata[2825] */\n    { 1413, 0x0000000000000000ULL, 0x55EFC5AC3A8F3996ULL }, /* XSUM_XXH3_testdata[2826] */\n    { 1413, 0x9E3779B185EBCA8DULL, 0xD33CDDFDECFC586BULL }, /* XSUM_XXH3_testdata[2827] */\n    { 1414, 0x0000000000000000ULL, 0x00476283A35F00BEULL }, /* XSUM_XXH3_testdata[2828] */\n    { 1414, 0x9E3779B185EBCA8DULL, 0xA905C757E0386BB7ULL }, /* XSUM_XXH3_testdata[2829] */\n    { 1415, 0x0000000000000000ULL, 0x848284B30D19EE3BULL }, /* XSUM_XXH3_testdata[2830] */\n    { 1415, 0x9E3779B185EBCA8DULL, 0x893645A441AFD7B9ULL }, /* XSUM_XXH3_testdata[2831] */\n    { 1416, 0x0000000000000000ULL, 0x2EB8DF3D270569EEULL }, /* XSUM_XXH3_testdata[2832] */\n    { 1416, 0x9E3779B185EBCA8DULL, 0xDA7F2D825BBACCE7ULL }, /* XSUM_XXH3_testdata[2833] */\n    { 1417, 0x0000000000000000ULL, 0x15E3A46C9BCC31B7ULL }, /* XSUM_XXH3_testdata[2834] */\n    { 1417, 0x9E3779B185EBCA8DULL, 0x606BFE3757B52831ULL }, /* XSUM_XXH3_testdata[2835] */\n    { 1418, 0x0000000000000000ULL, 0x1940C0475A90665AULL }, /* XSUM_XXH3_testdata[2836] */\n    { 1418, 0x9E3779B185EBCA8DULL, 0xD070C303B5A0F467ULL }, /* XSUM_XXH3_testdata[2837] */\n    { 1419, 0x0000000000000000ULL, 0x85ADBC4FCC10049EULL }, /* XSUM_XXH3_testdata[2838] */\n    { 1419, 0x9E3779B185EBCA8DULL, 0xD6838508DE64D4D3ULL }, /* XSUM_XXH3_testdata[2839] */\n    { 1420, 0x0000000000000000ULL, 0xB02A4A4C485139EBULL }, /* XSUM_XXH3_testdata[2840] */\n    { 1420, 0x9E3779B185EBCA8DULL, 0x038FC5270157BE6CULL }, /* XSUM_XXH3_testdata[2841] */\n    { 1421, 0x0000000000000000ULL, 0x80E5B14774A6E3DEULL }, /* XSUM_XXH3_testdata[2842] */\n    { 1421, 0x9E3779B185EBCA8DULL, 0xF63639714BB765F8ULL }, /* XSUM_XXH3_testdata[2843] */\n    { 1422, 0x0000000000000000ULL, 0x940D6F8AFC3E5FE2ULL }, /* XSUM_XXH3_testdata[2844] */\n    { 1422, 0x9E3779B185EBCA8DULL, 0xC994312948C52D3EULL }, /* XSUM_XXH3_testdata[2845] */\n    { 1423, 0x0000000000000000ULL, 0x8FCDA6A6E0DC7A52ULL }, /* XSUM_XXH3_testdata[2846] */\n    { 1423, 0x9E3779B185EBCA8DULL, 0xE0BA243293EFD78AULL }, /* XSUM_XXH3_testdata[2847] */\n    { 1424, 0x0000000000000000ULL, 0xEAE22F34BD769AB7ULL }, /* XSUM_XXH3_testdata[2848] */\n    { 1424, 0x9E3779B185EBCA8DULL, 0x058F19EB59C50BC2ULL }, /* XSUM_XXH3_testdata[2849] */\n    { 1425, 0x0000000000000000ULL, 0xC722483D6C8D78F2ULL }, /* XSUM_XXH3_testdata[2850] */\n    { 1425, 0x9E3779B185EBCA8DULL, 0xC3E70A47E1740CDAULL }, /* XSUM_XXH3_testdata[2851] */\n    { 1426, 0x0000000000000000ULL, 0xC3ED57E85DFC3DCFULL }, /* XSUM_XXH3_testdata[2852] */\n    { 1426, 0x9E3779B185EBCA8DULL, 0x8508106B8B812CA9ULL }, /* XSUM_XXH3_testdata[2853] */\n    { 1427, 0x0000000000000000ULL, 0x3C8B0BE1563E4FC6ULL }, /* XSUM_XXH3_testdata[2854] */\n    { 1427, 0x9E3779B185EBCA8DULL, 0x0479E1F1A517E19DULL }, /* XSUM_XXH3_testdata[2855] */\n    { 1428, 0x0000000000000000ULL, 0x63A69B05FBCC9402ULL }, /* XSUM_XXH3_testdata[2856] */\n    { 1428, 0x9E3779B185EBCA8DULL, 0xE7F613868AA95648ULL }, /* XSUM_XXH3_testdata[2857] */\n    { 1429, 0x0000000000000000ULL, 0x21EBCAFFD57F2956ULL }, /* XSUM_XXH3_testdata[2858] */\n    { 1429, 0x9E3779B185EBCA8DULL, 0x2447CC428E1293DCULL }, /* XSUM_XXH3_testdata[2859] */\n    { 1430, 0x0000000000000000ULL, 0x5E104F68A70661BEULL }, /* XSUM_XXH3_testdata[2860] */\n    { 1430, 0x9E3779B185EBCA8DULL, 0x393522B30920D796ULL }, /* XSUM_XXH3_testdata[2861] */\n    { 1431, 0x0000000000000000ULL, 0x2B6669B122112FF1ULL }, /* XSUM_XXH3_testdata[2862] */\n    { 1431, 0x9E3779B185EBCA8DULL, 0xC3567F2F7E4629AEULL }, /* XSUM_XXH3_testdata[2863] */\n    { 1432, 0x0000000000000000ULL, 0x03CC3AFF607E56B6ULL }, /* XSUM_XXH3_testdata[2864] */\n    { 1432, 0x9E3779B185EBCA8DULL, 0xB1644A59218014A3ULL }, /* XSUM_XXH3_testdata[2865] */\n    { 1433, 0x0000000000000000ULL, 0xED897754BF1BB643ULL }, /* XSUM_XXH3_testdata[2866] */\n    { 1433, 0x9E3779B185EBCA8DULL, 0x89AC2C7514B7094EULL }, /* XSUM_XXH3_testdata[2867] */\n    { 1434, 0x0000000000000000ULL, 0x1E6146A8C2663D38ULL }, /* XSUM_XXH3_testdata[2868] */\n    { 1434, 0x9E3779B185EBCA8DULL, 0x104E86E354C91BAAULL }, /* XSUM_XXH3_testdata[2869] */\n    { 1435, 0x0000000000000000ULL, 0xEA4A52BF4A45BF2AULL }, /* XSUM_XXH3_testdata[2870] */\n    { 1435, 0x9E3779B185EBCA8DULL, 0x32A2D9C12A144029ULL }, /* XSUM_XXH3_testdata[2871] */\n    { 1436, 0x0000000000000000ULL, 0x72EE45F76D09715DULL }, /* XSUM_XXH3_testdata[2872] */\n    { 1436, 0x9E3779B185EBCA8DULL, 0x63127F6A73DC254CULL }, /* XSUM_XXH3_testdata[2873] */\n    { 1437, 0x0000000000000000ULL, 0x06C24FB6DF4AB655ULL }, /* XSUM_XXH3_testdata[2874] */\n    { 1437, 0x9E3779B185EBCA8DULL, 0xA82117607BBF2E21ULL }, /* XSUM_XXH3_testdata[2875] */\n    { 1438, 0x0000000000000000ULL, 0xCAC79B306F1064CDULL }, /* XSUM_XXH3_testdata[2876] */\n    { 1438, 0x9E3779B185EBCA8DULL, 0x312B5316313F08DCULL }, /* XSUM_XXH3_testdata[2877] */\n    { 1439, 0x0000000000000000ULL, 0xE3602478268DB39BULL }, /* XSUM_XXH3_testdata[2878] */\n    { 1439, 0x9E3779B185EBCA8DULL, 0xF9E83E68AA8FC5BDULL }, /* XSUM_XXH3_testdata[2879] */\n    { 1440, 0x0000000000000000ULL, 0xD7934FC97AB126FFULL }, /* XSUM_XXH3_testdata[2880] */\n    { 1440, 0x9E3779B185EBCA8DULL, 0x3F08BAC07209501EULL }, /* XSUM_XXH3_testdata[2881] */\n    { 1441, 0x0000000000000000ULL, 0xFCBAA4F5A7241C67ULL }, /* XSUM_XXH3_testdata[2882] */\n    { 1441, 0x9E3779B185EBCA8DULL, 0xD94ED4BAB6EA7453ULL }, /* XSUM_XXH3_testdata[2883] */\n    { 1442, 0x0000000000000000ULL, 0xE76C27C6CA4BE8BEULL }, /* XSUM_XXH3_testdata[2884] */\n    { 1442, 0x9E3779B185EBCA8DULL, 0xAAE2ECC4A650576DULL }, /* XSUM_XXH3_testdata[2885] */\n    { 1443, 0x0000000000000000ULL, 0xE21B11C1BBEF493BULL }, /* XSUM_XXH3_testdata[2886] */\n    { 1443, 0x9E3779B185EBCA8DULL, 0x7F0A0CA77337B6DDULL }, /* XSUM_XXH3_testdata[2887] */\n    { 1444, 0x0000000000000000ULL, 0xED46566D24575C36ULL }, /* XSUM_XXH3_testdata[2888] */\n    { 1444, 0x9E3779B185EBCA8DULL, 0x9875F54079C58BE0ULL }, /* XSUM_XXH3_testdata[2889] */\n    { 1445, 0x0000000000000000ULL, 0x3021E8B6EE5E412DULL }, /* XSUM_XXH3_testdata[2890] */\n    { 1445, 0x9E3779B185EBCA8DULL, 0x51590DA933C29CE4ULL }, /* XSUM_XXH3_testdata[2891] */\n    { 1446, 0x0000000000000000ULL, 0x5DAC63789A9A5CF8ULL }, /* XSUM_XXH3_testdata[2892] */\n    { 1446, 0x9E3779B185EBCA8DULL, 0xD25978C5B20C501AULL }, /* XSUM_XXH3_testdata[2893] */\n    { 1447, 0x0000000000000000ULL, 0x2623F8B9FA9144FFULL }, /* XSUM_XXH3_testdata[2894] */\n    { 1447, 0x9E3779B185EBCA8DULL, 0x4A970D000F478705ULL }, /* XSUM_XXH3_testdata[2895] */\n    { 1448, 0x0000000000000000ULL, 0x4D76CE7CF9FBAB5CULL }, /* XSUM_XXH3_testdata[2896] */\n    { 1448, 0x9E3779B185EBCA8DULL, 0x00DB1D4D082EC71AULL }, /* XSUM_XXH3_testdata[2897] */\n    { 1449, 0x0000000000000000ULL, 0x06688FEC0772674DULL }, /* XSUM_XXH3_testdata[2898] */\n    { 1449, 0x9E3779B185EBCA8DULL, 0xE988345D128FC527ULL }, /* XSUM_XXH3_testdata[2899] */\n    { 1450, 0x0000000000000000ULL, 0xF4E59132522B56FDULL }, /* XSUM_XXH3_testdata[2900] */\n    { 1450, 0x9E3779B185EBCA8DULL, 0xD8D4B2687F22F6A9ULL }, /* XSUM_XXH3_testdata[2901] */\n    { 1451, 0x0000000000000000ULL, 0x54462278DA1DA4B8ULL }, /* XSUM_XXH3_testdata[2902] */\n    { 1451, 0x9E3779B185EBCA8DULL, 0x2224F0ABB8490DF3ULL }, /* XSUM_XXH3_testdata[2903] */\n    { 1452, 0x0000000000000000ULL, 0xB3A19773EEAC82A7ULL }, /* XSUM_XXH3_testdata[2904] */\n    { 1452, 0x9E3779B185EBCA8DULL, 0xB99C5F0B89671EA4ULL }, /* XSUM_XXH3_testdata[2905] */\n    { 1453, 0x0000000000000000ULL, 0x1AFB91A51D617EEEULL }, /* XSUM_XXH3_testdata[2906] */\n    { 1453, 0x9E3779B185EBCA8DULL, 0xD21CE74CA12BBD50ULL }, /* XSUM_XXH3_testdata[2907] */\n    { 1454, 0x0000000000000000ULL, 0xCE4632E7365279ADULL }, /* XSUM_XXH3_testdata[2908] */\n    { 1454, 0x9E3779B185EBCA8DULL, 0x12B4779302392D0BULL }, /* XSUM_XXH3_testdata[2909] */\n    { 1455, 0x0000000000000000ULL, 0xC29098E5A3A25E75ULL }, /* XSUM_XXH3_testdata[2910] */\n    { 1455, 0x9E3779B185EBCA8DULL, 0x2D375331BC9B3F24ULL }, /* XSUM_XXH3_testdata[2911] */\n    { 1456, 0x0000000000000000ULL, 0x5FFB14BD3D509415ULL }, /* XSUM_XXH3_testdata[2912] */\n    { 1456, 0x9E3779B185EBCA8DULL, 0xA8D557A5145B471BULL }, /* XSUM_XXH3_testdata[2913] */\n    { 1457, 0x0000000000000000ULL, 0x85D5CCCE24F8797AULL }, /* XSUM_XXH3_testdata[2914] */\n    { 1457, 0x9E3779B185EBCA8DULL, 0x0668F51F65318559ULL }, /* XSUM_XXH3_testdata[2915] */\n    { 1458, 0x0000000000000000ULL, 0xBDC9FBA2A2AE6050ULL }, /* XSUM_XXH3_testdata[2916] */\n    { 1458, 0x9E3779B185EBCA8DULL, 0x16A4C29F94CA66EAULL }, /* XSUM_XXH3_testdata[2917] */\n    { 1459, 0x0000000000000000ULL, 0x811A9CBAED802D8BULL }, /* XSUM_XXH3_testdata[2918] */\n    { 1459, 0x9E3779B185EBCA8DULL, 0xB6E74313E859C393ULL }, /* XSUM_XXH3_testdata[2919] */\n    { 1460, 0x0000000000000000ULL, 0x6AD8A4148AC21A54ULL }, /* XSUM_XXH3_testdata[2920] */\n    { 1460, 0x9E3779B185EBCA8DULL, 0x149507C74DC85025ULL }, /* XSUM_XXH3_testdata[2921] */\n    { 1461, 0x0000000000000000ULL, 0xFFBADF33A137B1A5ULL }, /* XSUM_XXH3_testdata[2922] */\n    { 1461, 0x9E3779B185EBCA8DULL, 0xE484358F190B97ABULL }, /* XSUM_XXH3_testdata[2923] */\n    { 1462, 0x0000000000000000ULL, 0x30F78921C660D6C9ULL }, /* XSUM_XXH3_testdata[2924] */\n    { 1462, 0x9E3779B185EBCA8DULL, 0xD854E89102D7F820ULL }, /* XSUM_XXH3_testdata[2925] */\n    { 1463, 0x0000000000000000ULL, 0x979DD668D22ACD1BULL }, /* XSUM_XXH3_testdata[2926] */\n    { 1463, 0x9E3779B185EBCA8DULL, 0x84F358112A7A9A9DULL }, /* XSUM_XXH3_testdata[2927] */\n    { 1464, 0x0000000000000000ULL, 0xF5016DB3AE992C23ULL }, /* XSUM_XXH3_testdata[2928] */\n    { 1464, 0x9E3779B185EBCA8DULL, 0xC7BEAD8B36AFD2A1ULL }, /* XSUM_XXH3_testdata[2929] */\n    { 1465, 0x0000000000000000ULL, 0x7EB14336702690E8ULL }, /* XSUM_XXH3_testdata[2930] */\n    { 1465, 0x9E3779B185EBCA8DULL, 0x508C9253021A59B7ULL }, /* XSUM_XXH3_testdata[2931] */\n    { 1466, 0x0000000000000000ULL, 0x2892C34695634315ULL }, /* XSUM_XXH3_testdata[2932] */\n    { 1466, 0x9E3779B185EBCA8DULL, 0x6C4447F74073B981ULL }, /* XSUM_XXH3_testdata[2933] */\n    { 1467, 0x0000000000000000ULL, 0x293047331A699254ULL }, /* XSUM_XXH3_testdata[2934] */\n    { 1467, 0x9E3779B185EBCA8DULL, 0xA5165A4043BA66A9ULL }, /* XSUM_XXH3_testdata[2935] */\n    { 1468, 0x0000000000000000ULL, 0xE4DC1418E120908CULL }, /* XSUM_XXH3_testdata[2936] */\n    { 1468, 0x9E3779B185EBCA8DULL, 0x0DC5731C7B6AD8D0ULL }, /* XSUM_XXH3_testdata[2937] */\n    { 1469, 0x0000000000000000ULL, 0x4642D4D698A17F79ULL }, /* XSUM_XXH3_testdata[2938] */\n    { 1469, 0x9E3779B185EBCA8DULL, 0xD8AF9E9DE8B28A4FULL }, /* XSUM_XXH3_testdata[2939] */\n    { 1470, 0x0000000000000000ULL, 0xCB98A643075C06C9ULL }, /* XSUM_XXH3_testdata[2940] */\n    { 1470, 0x9E3779B185EBCA8DULL, 0x5DF1BAB3FEF00B22ULL }, /* XSUM_XXH3_testdata[2941] */\n    { 1471, 0x0000000000000000ULL, 0x79B1BB9B9D6BE112ULL }, /* XSUM_XXH3_testdata[2942] */\n    { 1471, 0x9E3779B185EBCA8DULL, 0x19B0A6B12B2D48FFULL }, /* XSUM_XXH3_testdata[2943] */\n    { 1472, 0x0000000000000000ULL, 0x74BC4C2C12AC495EULL }, /* XSUM_XXH3_testdata[2944] */\n    { 1472, 0x9E3779B185EBCA8DULL, 0x12B583A1EA56608DULL }, /* XSUM_XXH3_testdata[2945] */\n    { 1473, 0x0000000000000000ULL, 0xE051FE60AEDCF9AEULL }, /* XSUM_XXH3_testdata[2946] */\n    { 1473, 0x9E3779B185EBCA8DULL, 0x6C18643991DD1604ULL }, /* XSUM_XXH3_testdata[2947] */\n    { 1474, 0x0000000000000000ULL, 0x09003EF11C39F08DULL }, /* XSUM_XXH3_testdata[2948] */\n    { 1474, 0x9E3779B185EBCA8DULL, 0xF0ED526263798652ULL }, /* XSUM_XXH3_testdata[2949] */\n    { 1475, 0x0000000000000000ULL, 0x9936DBC1FDD89AE9ULL }, /* XSUM_XXH3_testdata[2950] */\n    { 1475, 0x9E3779B185EBCA8DULL, 0x5BE18236A136D55AULL }, /* XSUM_XXH3_testdata[2951] */\n    { 1476, 0x0000000000000000ULL, 0x1D8C65FE0EF623C5ULL }, /* XSUM_XXH3_testdata[2952] */\n    { 1476, 0x9E3779B185EBCA8DULL, 0x04B3474EB1616A70ULL }, /* XSUM_XXH3_testdata[2953] */\n    { 1477, 0x0000000000000000ULL, 0x2F7C6F94146B62DEULL }, /* XSUM_XXH3_testdata[2954] */\n    { 1477, 0x9E3779B185EBCA8DULL, 0xD8444BA66D29A5D1ULL }, /* XSUM_XXH3_testdata[2955] */\n    { 1478, 0x0000000000000000ULL, 0xCD55942E733C8DE0ULL }, /* XSUM_XXH3_testdata[2956] */\n    { 1478, 0x9E3779B185EBCA8DULL, 0xD71D23526A3E272BULL }, /* XSUM_XXH3_testdata[2957] */\n    { 1479, 0x0000000000000000ULL, 0x8C2429B7DCE7F860ULL }, /* XSUM_XXH3_testdata[2958] */\n    { 1479, 0x9E3779B185EBCA8DULL, 0x0473B8054CD908FDULL }, /* XSUM_XXH3_testdata[2959] */\n    { 1480, 0x0000000000000000ULL, 0xE21FD7795401C634ULL }, /* XSUM_XXH3_testdata[2960] */\n    { 1480, 0x9E3779B185EBCA8DULL, 0x47C114BB0C7D7EDBULL }, /* XSUM_XXH3_testdata[2961] */\n    { 1481, 0x0000000000000000ULL, 0xF096DD223E26115FULL }, /* XSUM_XXH3_testdata[2962] */\n    { 1481, 0x9E3779B185EBCA8DULL, 0x8A69CF11AA97BC34ULL }, /* XSUM_XXH3_testdata[2963] */\n    { 1482, 0x0000000000000000ULL, 0xA9FA0742AC0FD4F7ULL }, /* XSUM_XXH3_testdata[2964] */\n    { 1482, 0x9E3779B185EBCA8DULL, 0x766AF0B6A5BD3DCBULL }, /* XSUM_XXH3_testdata[2965] */\n    { 1483, 0x0000000000000000ULL, 0x4092AA711BFA938AULL }, /* XSUM_XXH3_testdata[2966] */\n    { 1483, 0x9E3779B185EBCA8DULL, 0x47763A99757174A8ULL }, /* XSUM_XXH3_testdata[2967] */\n    { 1484, 0x0000000000000000ULL, 0xD5005D2548949930ULL }, /* XSUM_XXH3_testdata[2968] */\n    { 1484, 0x9E3779B185EBCA8DULL, 0x6630EFBD744FB866ULL }, /* XSUM_XXH3_testdata[2969] */\n    { 1485, 0x0000000000000000ULL, 0x4E7A0172C536C828ULL }, /* XSUM_XXH3_testdata[2970] */\n    { 1485, 0x9E3779B185EBCA8DULL, 0x933E1A4ADDE0BF1FULL }, /* XSUM_XXH3_testdata[2971] */\n    { 1486, 0x0000000000000000ULL, 0x4AECD3EB1D90FFF5ULL }, /* XSUM_XXH3_testdata[2972] */\n    { 1486, 0x9E3779B185EBCA8DULL, 0xDE9AA36BEA3A70AEULL }, /* XSUM_XXH3_testdata[2973] */\n    { 1487, 0x0000000000000000ULL, 0x7B05488EC3CDF4D5ULL }, /* XSUM_XXH3_testdata[2974] */\n    { 1487, 0x9E3779B185EBCA8DULL, 0x27A7A69A624AD291ULL }, /* XSUM_XXH3_testdata[2975] */\n    { 1488, 0x0000000000000000ULL, 0xD3380C038A278925ULL }, /* XSUM_XXH3_testdata[2976] */\n    { 1488, 0x9E3779B185EBCA8DULL, 0x55E8264E8D659620ULL }, /* XSUM_XXH3_testdata[2977] */\n    { 1489, 0x0000000000000000ULL, 0xE19CEE4A952E1CA0ULL }, /* XSUM_XXH3_testdata[2978] */\n    { 1489, 0x9E3779B185EBCA8DULL, 0x3582584D628E05EEULL }, /* XSUM_XXH3_testdata[2979] */\n    { 1490, 0x0000000000000000ULL, 0x4D35BFCF407857E1ULL }, /* XSUM_XXH3_testdata[2980] */\n    { 1490, 0x9E3779B185EBCA8DULL, 0x4189A85073F06185ULL }, /* XSUM_XXH3_testdata[2981] */\n    { 1491, 0x0000000000000000ULL, 0xD130B31D73F3FD81ULL }, /* XSUM_XXH3_testdata[2982] */\n    { 1491, 0x9E3779B185EBCA8DULL, 0xE605EE721E5FDE0BULL }, /* XSUM_XXH3_testdata[2983] */\n    { 1492, 0x0000000000000000ULL, 0x01CEBBB047583AEAULL }, /* XSUM_XXH3_testdata[2984] */\n    { 1492, 0x9E3779B185EBCA8DULL, 0x94F6C7631CA71A2CULL }, /* XSUM_XXH3_testdata[2985] */\n    { 1493, 0x0000000000000000ULL, 0xDA85838A26F331A5ULL }, /* XSUM_XXH3_testdata[2986] */\n    { 1493, 0x9E3779B185EBCA8DULL, 0xE01B5B4A1037713CULL }, /* XSUM_XXH3_testdata[2987] */\n    { 1494, 0x0000000000000000ULL, 0xA39241F8DFA65384ULL }, /* XSUM_XXH3_testdata[2988] */\n    { 1494, 0x9E3779B185EBCA8DULL, 0xE248BEBC53F14552ULL }, /* XSUM_XXH3_testdata[2989] */\n    { 1495, 0x0000000000000000ULL, 0xF543D7718BAAFD5DULL }, /* XSUM_XXH3_testdata[2990] */\n    { 1495, 0x9E3779B185EBCA8DULL, 0xE47639D49B6835C1ULL }, /* XSUM_XXH3_testdata[2991] */\n    { 1496, 0x0000000000000000ULL, 0xA229AE8D10488082ULL }, /* XSUM_XXH3_testdata[2992] */\n    { 1496, 0x9E3779B185EBCA8DULL, 0xAE8E2E41674BFF94ULL }, /* XSUM_XXH3_testdata[2993] */\n    { 1497, 0x0000000000000000ULL, 0xFE77233C02698E38ULL }, /* XSUM_XXH3_testdata[2994] */\n    { 1497, 0x9E3779B185EBCA8DULL, 0x16C1DF3C6949E62CULL }, /* XSUM_XXH3_testdata[2995] */\n    { 1498, 0x0000000000000000ULL, 0x117FA8A945161AB7ULL }, /* XSUM_XXH3_testdata[2996] */\n    { 1498, 0x9E3779B185EBCA8DULL, 0x535EC6C1E6113586ULL }, /* XSUM_XXH3_testdata[2997] */\n    { 1499, 0x0000000000000000ULL, 0xB293E66F31FF809DULL }, /* XSUM_XXH3_testdata[2998] */\n    { 1499, 0x9E3779B185EBCA8DULL, 0x2CDF051F4679B89DULL }, /* XSUM_XXH3_testdata[2999] */\n    { 1500, 0x0000000000000000ULL, 0xE81D866A4E684A3BULL }, /* XSUM_XXH3_testdata[3000] */\n    { 1500, 0x9E3779B185EBCA8DULL, 0x5765B72338ACC0CAULL }, /* XSUM_XXH3_testdata[3001] */\n    { 1501, 0x0000000000000000ULL, 0xAB92157E238DD5DCULL }, /* XSUM_XXH3_testdata[3002] */\n    { 1501, 0x9E3779B185EBCA8DULL, 0xA6E5A4190CB2C3B4ULL }, /* XSUM_XXH3_testdata[3003] */\n    { 1502, 0x0000000000000000ULL, 0xB005DD78C3CF30BCULL }, /* XSUM_XXH3_testdata[3004] */\n    { 1502, 0x9E3779B185EBCA8DULL, 0x70D60DE25EED0BDEULL }, /* XSUM_XXH3_testdata[3005] */\n    { 1503, 0x0000000000000000ULL, 0x0C683B1518B8FE2FULL }, /* XSUM_XXH3_testdata[3006] */\n    { 1503, 0x9E3779B185EBCA8DULL, 0xA7A4BDC4FE0A70CDULL }, /* XSUM_XXH3_testdata[3007] */\n    { 1504, 0x0000000000000000ULL, 0x56BD12C5E82AE2E3ULL }, /* XSUM_XXH3_testdata[3008] */\n    { 1504, 0x9E3779B185EBCA8DULL, 0x54B56D8804E18459ULL }, /* XSUM_XXH3_testdata[3009] */\n    { 1505, 0x0000000000000000ULL, 0x0E339E1EA59A7ECDULL }, /* XSUM_XXH3_testdata[3010] */\n    { 1505, 0x9E3779B185EBCA8DULL, 0x100F6BD1A03D7D36ULL }, /* XSUM_XXH3_testdata[3011] */\n    { 1506, 0x0000000000000000ULL, 0xF7CE8A9373EC98ACULL }, /* XSUM_XXH3_testdata[3012] */\n    { 1506, 0x9E3779B185EBCA8DULL, 0x545EEB55F12926ECULL }, /* XSUM_XXH3_testdata[3013] */\n    { 1507, 0x0000000000000000ULL, 0x53758D1F2109D846ULL }, /* XSUM_XXH3_testdata[3014] */\n    { 1507, 0x9E3779B185EBCA8DULL, 0x2FC5EDF558CE04D7ULL }, /* XSUM_XXH3_testdata[3015] */\n    { 1508, 0x0000000000000000ULL, 0x5E532C193D4B62BFULL }, /* XSUM_XXH3_testdata[3016] */\n    { 1508, 0x9E3779B185EBCA8DULL, 0x23C6ED7D10BCF6DEULL }, /* XSUM_XXH3_testdata[3017] */\n    { 1509, 0x0000000000000000ULL, 0xC45828EF5AE2513AULL }, /* XSUM_XXH3_testdata[3018] */\n    { 1509, 0x9E3779B185EBCA8DULL, 0x5687B04DC1DE930DULL }, /* XSUM_XXH3_testdata[3019] */\n    { 1510, 0x0000000000000000ULL, 0x977A95A6D18ADBECULL }, /* XSUM_XXH3_testdata[3020] */\n    { 1510, 0x9E3779B185EBCA8DULL, 0xB8C8FFD3F4F31603ULL }, /* XSUM_XXH3_testdata[3021] */\n    { 1511, 0x0000000000000000ULL, 0x47920EE11E511CB2ULL }, /* XSUM_XXH3_testdata[3022] */\n    { 1511, 0x9E3779B185EBCA8DULL, 0xBD9A0732D413FFB6ULL }, /* XSUM_XXH3_testdata[3023] */\n    { 1512, 0x0000000000000000ULL, 0x8C0DD31A0220F411ULL }, /* XSUM_XXH3_testdata[3024] */\n    { 1512, 0x9E3779B185EBCA8DULL, 0x16DD87D0B3C13707ULL }, /* XSUM_XXH3_testdata[3025] */\n    { 1513, 0x0000000000000000ULL, 0x3D12AA0B29777D6FULL }, /* XSUM_XXH3_testdata[3026] */\n    { 1513, 0x9E3779B185EBCA8DULL, 0x5BF9C8569971E6F5ULL }, /* XSUM_XXH3_testdata[3027] */\n    { 1514, 0x0000000000000000ULL, 0x112F5BA7BF0636C4ULL }, /* XSUM_XXH3_testdata[3028] */\n    { 1514, 0x9E3779B185EBCA8DULL, 0xB4A0B58609A78117ULL }, /* XSUM_XXH3_testdata[3029] */\n    { 1515, 0x0000000000000000ULL, 0x6D44D3CF18C1335DULL }, /* XSUM_XXH3_testdata[3030] */\n    { 1515, 0x9E3779B185EBCA8DULL, 0xA732C10D56D0F0F5ULL }, /* XSUM_XXH3_testdata[3031] */\n    { 1516, 0x0000000000000000ULL, 0x4ED102F971A4663BULL }, /* XSUM_XXH3_testdata[3032] */\n    { 1516, 0x9E3779B185EBCA8DULL, 0x7EF8D696D908064BULL }, /* XSUM_XXH3_testdata[3033] */\n    { 1517, 0x0000000000000000ULL, 0x5E2B19AA9F43ECA7ULL }, /* XSUM_XXH3_testdata[3034] */\n    { 1517, 0x9E3779B185EBCA8DULL, 0xB01D9E184848CD4AULL }, /* XSUM_XXH3_testdata[3035] */\n    { 1518, 0x0000000000000000ULL, 0x145ED9B2C279EF7DULL }, /* XSUM_XXH3_testdata[3036] */\n    { 1518, 0x9E3779B185EBCA8DULL, 0xCAC9CD8B6DF6E473ULL }, /* XSUM_XXH3_testdata[3037] */\n    { 1519, 0x0000000000000000ULL, 0xC266AD258BC02F59ULL }, /* XSUM_XXH3_testdata[3038] */\n    { 1519, 0x9E3779B185EBCA8DULL, 0x06EA6CFCFFD67490ULL }, /* XSUM_XXH3_testdata[3039] */\n    { 1520, 0x0000000000000000ULL, 0xA601E0E6624AA703ULL }, /* XSUM_XXH3_testdata[3040] */\n    { 1520, 0x9E3779B185EBCA8DULL, 0xCA5CDC82A62D97E2ULL }, /* XSUM_XXH3_testdata[3041] */\n    { 1521, 0x0000000000000000ULL, 0x589BE8D5050257C2ULL }, /* XSUM_XXH3_testdata[3042] */\n    { 1521, 0x9E3779B185EBCA8DULL, 0xC1CBF0A646D8BB14ULL }, /* XSUM_XXH3_testdata[3043] */\n    { 1522, 0x0000000000000000ULL, 0xC70EEDF28BBD665AULL }, /* XSUM_XXH3_testdata[3044] */\n    { 1522, 0x9E3779B185EBCA8DULL, 0xA200829E1237F71CULL }, /* XSUM_XXH3_testdata[3045] */\n    { 1523, 0x0000000000000000ULL, 0xB2C5EFEA1A95B309ULL }, /* XSUM_XXH3_testdata[3046] */\n    { 1523, 0x9E3779B185EBCA8DULL, 0x4210AAC799206AABULL }, /* XSUM_XXH3_testdata[3047] */\n    { 1524, 0x0000000000000000ULL, 0x7999AA564264C984ULL }, /* XSUM_XXH3_testdata[3048] */\n    { 1524, 0x9E3779B185EBCA8DULL, 0xD29CF91C87606278ULL }, /* XSUM_XXH3_testdata[3049] */\n    { 1525, 0x0000000000000000ULL, 0x592527E8D34BAA1FULL }, /* XSUM_XXH3_testdata[3050] */\n    { 1525, 0x9E3779B185EBCA8DULL, 0xA7D655F3D758D2DDULL }, /* XSUM_XXH3_testdata[3051] */\n    { 1526, 0x0000000000000000ULL, 0xB0E0DA5EA984D823ULL }, /* XSUM_XXH3_testdata[3052] */\n    { 1526, 0x9E3779B185EBCA8DULL, 0x46D0E44753D033BBULL }, /* XSUM_XXH3_testdata[3053] */\n    { 1527, 0x0000000000000000ULL, 0xAF9421BDAB7DE566ULL }, /* XSUM_XXH3_testdata[3054] */\n    { 1527, 0x9E3779B185EBCA8DULL, 0xCB318F6E507A110FULL }, /* XSUM_XXH3_testdata[3055] */\n    { 1528, 0x0000000000000000ULL, 0xDDE69757FC45453FULL }, /* XSUM_XXH3_testdata[3056] */\n    { 1528, 0x9E3779B185EBCA8DULL, 0x6E89C3764D284D03ULL }, /* XSUM_XXH3_testdata[3057] */\n    { 1529, 0x0000000000000000ULL, 0x790B2802BF5B6CA5ULL }, /* XSUM_XXH3_testdata[3058] */\n    { 1529, 0x9E3779B185EBCA8DULL, 0x330356E0FD650D8DULL }, /* XSUM_XXH3_testdata[3059] */\n    { 1530, 0x0000000000000000ULL, 0x1CBA0D20E1D49A9EULL }, /* XSUM_XXH3_testdata[3060] */\n    { 1530, 0x9E3779B185EBCA8DULL, 0xA73387A0D00C9B49ULL }, /* XSUM_XXH3_testdata[3061] */\n    { 1531, 0x0000000000000000ULL, 0xCBA1D8BBCE62F3CCULL }, /* XSUM_XXH3_testdata[3062] */\n    { 1531, 0x9E3779B185EBCA8DULL, 0x1955AA7C05619D60ULL }, /* XSUM_XXH3_testdata[3063] */\n    { 1532, 0x0000000000000000ULL, 0xC05CDA3641633E71ULL }, /* XSUM_XXH3_testdata[3064] */\n    { 1532, 0x9E3779B185EBCA8DULL, 0x0DBA8ACDD35665AAULL }, /* XSUM_XXH3_testdata[3065] */\n    { 1533, 0x0000000000000000ULL, 0x12E82077408AA01FULL }, /* XSUM_XXH3_testdata[3066] */\n    { 1533, 0x9E3779B185EBCA8DULL, 0xE55F59BDE2B73BA6ULL }, /* XSUM_XXH3_testdata[3067] */\n    { 1534, 0x0000000000000000ULL, 0x666B68328DA7CF55ULL }, /* XSUM_XXH3_testdata[3068] */\n    { 1534, 0x9E3779B185EBCA8DULL, 0xB798085F0C7EA859ULL }, /* XSUM_XXH3_testdata[3069] */\n    { 1535, 0x0000000000000000ULL, 0x1B107DA31572D1E4ULL }, /* XSUM_XXH3_testdata[3070] */\n    { 1535, 0x9E3779B185EBCA8DULL, 0xC27684F8BDFFCD9BULL }, /* XSUM_XXH3_testdata[3071] */\n    { 1536, 0x0000000000000000ULL, 0x8DAA8C2ECCABB68BULL }, /* XSUM_XXH3_testdata[3072] */\n    { 1536, 0x9E3779B185EBCA8DULL, 0x672E8F732C4E55D7ULL }, /* XSUM_XXH3_testdata[3073] */\n    { 1537, 0x0000000000000000ULL, 0x57C8DBD143F74C9DULL }, /* XSUM_XXH3_testdata[3074] */\n    { 1537, 0x9E3779B185EBCA8DULL, 0x93A05689A5758F46ULL }, /* XSUM_XXH3_testdata[3075] */\n    { 1538, 0x0000000000000000ULL, 0x48D172D3BC18AB8FULL }, /* XSUM_XXH3_testdata[3076] */\n    { 1538, 0x9E3779B185EBCA8DULL, 0x9E4A2D20455D1889ULL }, /* XSUM_XXH3_testdata[3077] */\n    { 1539, 0x0000000000000000ULL, 0xD901F594BDE7ADCEULL }, /* XSUM_XXH3_testdata[3078] */\n    { 1539, 0x9E3779B185EBCA8DULL, 0x228B8162736F98E3ULL }, /* XSUM_XXH3_testdata[3079] */\n    { 1540, 0x0000000000000000ULL, 0x8EE07EB9737A9276ULL }, /* XSUM_XXH3_testdata[3080] */\n    { 1540, 0x9E3779B185EBCA8DULL, 0xC2CF4E587BB9AA6BULL }, /* XSUM_XXH3_testdata[3081] */\n    { 1541, 0x0000000000000000ULL, 0xBB1F926D73745C78ULL }, /* XSUM_XXH3_testdata[3082] */\n    { 1541, 0x9E3779B185EBCA8DULL, 0x24CF9F8CF02B76DBULL }, /* XSUM_XXH3_testdata[3083] */\n    { 1542, 0x0000000000000000ULL, 0x781EB0D61C859FDBULL }, /* XSUM_XXH3_testdata[3084] */\n    { 1542, 0x9E3779B185EBCA8DULL, 0xB586961CEFB728F2ULL }, /* XSUM_XXH3_testdata[3085] */\n    { 1543, 0x0000000000000000ULL, 0xFCF91E6E9B54D87AULL }, /* XSUM_XXH3_testdata[3086] */\n    { 1543, 0x9E3779B185EBCA8DULL, 0x972A5BBB45E4C1C2ULL }, /* XSUM_XXH3_testdata[3087] */\n    { 1544, 0x0000000000000000ULL, 0xC731201E159A152EULL }, /* XSUM_XXH3_testdata[3088] */\n    { 1544, 0x9E3779B185EBCA8DULL, 0x7750BDF397E400B1ULL }, /* XSUM_XXH3_testdata[3089] */\n    { 1545, 0x0000000000000000ULL, 0xE1FDBC5884EABEB6ULL }, /* XSUM_XXH3_testdata[3090] */\n    { 1545, 0x9E3779B185EBCA8DULL, 0xAA93DFFD978594ABULL }, /* XSUM_XXH3_testdata[3091] */\n    { 1546, 0x0000000000000000ULL, 0x713A314F08EF6D14ULL }, /* XSUM_XXH3_testdata[3092] */\n    { 1546, 0x9E3779B185EBCA8DULL, 0x7680659B3474F11DULL }, /* XSUM_XXH3_testdata[3093] */\n    { 1547, 0x0000000000000000ULL, 0x14493E1DAADA1DCAULL }, /* XSUM_XXH3_testdata[3094] */\n    { 1547, 0x9E3779B185EBCA8DULL, 0xA4782ECAE48EB7A4ULL }, /* XSUM_XXH3_testdata[3095] */\n    { 1548, 0x0000000000000000ULL, 0x73FEB39FA6622479ULL }, /* XSUM_XXH3_testdata[3096] */\n    { 1548, 0x9E3779B185EBCA8DULL, 0x7FC2A81151FF1554ULL }, /* XSUM_XXH3_testdata[3097] */\n    { 1549, 0x0000000000000000ULL, 0x8B7BAC177B06229FULL }, /* XSUM_XXH3_testdata[3098] */\n    { 1549, 0x9E3779B185EBCA8DULL, 0x0945E5E7E5EB282AULL }, /* XSUM_XXH3_testdata[3099] */\n    { 1550, 0x0000000000000000ULL, 0xB0929D573881C869ULL }, /* XSUM_XXH3_testdata[3100] */\n    { 1550, 0x9E3779B185EBCA8DULL, 0xB7725D34E26E7E2EULL }, /* XSUM_XXH3_testdata[3101] */\n    { 1551, 0x0000000000000000ULL, 0x8C8C1AFE32561877ULL }, /* XSUM_XXH3_testdata[3102] */\n    { 1551, 0x9E3779B185EBCA8DULL, 0xF8C8F4C40D6F1C42ULL }, /* XSUM_XXH3_testdata[3103] */\n    { 1552, 0x0000000000000000ULL, 0xB7A14AE288A42F2FULL }, /* XSUM_XXH3_testdata[3104] */\n    { 1552, 0x9E3779B185EBCA8DULL, 0x9B588CD6323138E6ULL }, /* XSUM_XXH3_testdata[3105] */\n    { 1553, 0x0000000000000000ULL, 0xA96E61B2E7B2B195ULL }, /* XSUM_XXH3_testdata[3106] */\n    { 1553, 0x9E3779B185EBCA8DULL, 0x882F797F9E56DDD8ULL }, /* XSUM_XXH3_testdata[3107] */\n    { 1554, 0x0000000000000000ULL, 0xBBFEE59943556FAFULL }, /* XSUM_XXH3_testdata[3108] */\n    { 1554, 0x9E3779B185EBCA8DULL, 0xB46DC0C868791E04ULL }, /* XSUM_XXH3_testdata[3109] */\n    { 1555, 0x0000000000000000ULL, 0xAFFDA6A79337FA79ULL }, /* XSUM_XXH3_testdata[3110] */\n    { 1555, 0x9E3779B185EBCA8DULL, 0xD21D1599C67C84D9ULL }, /* XSUM_XXH3_testdata[3111] */\n    { 1556, 0x0000000000000000ULL, 0x2D3DF3731171ABA9ULL }, /* XSUM_XXH3_testdata[3112] */\n    { 1556, 0x9E3779B185EBCA8DULL, 0x21D04224388027B0ULL }, /* XSUM_XXH3_testdata[3113] */\n    { 1557, 0x0000000000000000ULL, 0xF7D0F61D0B2D6148ULL }, /* XSUM_XXH3_testdata[3114] */\n    { 1557, 0x9E3779B185EBCA8DULL, 0x77883AA22EFE233EULL }, /* XSUM_XXH3_testdata[3115] */\n    { 1558, 0x0000000000000000ULL, 0x64B4F355C78AA20AULL }, /* XSUM_XXH3_testdata[3116] */\n    { 1558, 0x9E3779B185EBCA8DULL, 0x992C1816C34EF8DEULL }, /* XSUM_XXH3_testdata[3117] */\n    { 1559, 0x0000000000000000ULL, 0x44552248B6A83EBAULL }, /* XSUM_XXH3_testdata[3118] */\n    { 1559, 0x9E3779B185EBCA8DULL, 0x5E53CB3CFBA3F8F9ULL }, /* XSUM_XXH3_testdata[3119] */\n    { 1560, 0x0000000000000000ULL, 0x1483FBF2F918B422ULL }, /* XSUM_XXH3_testdata[3120] */\n    { 1560, 0x9E3779B185EBCA8DULL, 0x70A300CB25C29A0BULL }, /* XSUM_XXH3_testdata[3121] */\n    { 1561, 0x0000000000000000ULL, 0xCB99139C837D2084ULL }, /* XSUM_XXH3_testdata[3122] */\n    { 1561, 0x9E3779B185EBCA8DULL, 0x1EDAC8DFFBBE5BC0ULL }, /* XSUM_XXH3_testdata[3123] */\n    { 1562, 0x0000000000000000ULL, 0xA82C249FB4C794DDULL }, /* XSUM_XXH3_testdata[3124] */\n    { 1562, 0x9E3779B185EBCA8DULL, 0x6400F980D9D85712ULL }, /* XSUM_XXH3_testdata[3125] */\n    { 1563, 0x0000000000000000ULL, 0xD67895EEA2D79EEAULL }, /* XSUM_XXH3_testdata[3126] */\n    { 1563, 0x9E3779B185EBCA8DULL, 0x7BE7BA43179D95BBULL }, /* XSUM_XXH3_testdata[3127] */\n    { 1564, 0x0000000000000000ULL, 0x7609AE3DDA24A26DULL }, /* XSUM_XXH3_testdata[3128] */\n    { 1564, 0x9E3779B185EBCA8DULL, 0xDDABC1FE67E41194ULL }, /* XSUM_XXH3_testdata[3129] */\n    { 1565, 0x0000000000000000ULL, 0x67E28DAFA4DE6B19ULL }, /* XSUM_XXH3_testdata[3130] */\n    { 1565, 0x9E3779B185EBCA8DULL, 0xB7E466CAE746467EULL }, /* XSUM_XXH3_testdata[3131] */\n    { 1566, 0x0000000000000000ULL, 0x2F1A9DB823B5224AULL }, /* XSUM_XXH3_testdata[3132] */\n    { 1566, 0x9E3779B185EBCA8DULL, 0x84E1EB43F2FBC3F9ULL }, /* XSUM_XXH3_testdata[3133] */\n    { 1567, 0x0000000000000000ULL, 0x7D796B8C64CA888AULL }, /* XSUM_XXH3_testdata[3134] */\n    { 1567, 0x9E3779B185EBCA8DULL, 0x2F19C51E51D4AB81ULL }, /* XSUM_XXH3_testdata[3135] */\n    { 1568, 0x0000000000000000ULL, 0x69DA97B583DEC845ULL }, /* XSUM_XXH3_testdata[3136] */\n    { 1568, 0x9E3779B185EBCA8DULL, 0x9E11AC222EE21E1AULL }, /* XSUM_XXH3_testdata[3137] */\n    { 1569, 0x0000000000000000ULL, 0x815C5D1E89ED7407ULL }, /* XSUM_XXH3_testdata[3138] */\n    { 1569, 0x9E3779B185EBCA8DULL, 0x52C01F40EDCB723EULL }, /* XSUM_XXH3_testdata[3139] */\n    { 1570, 0x0000000000000000ULL, 0xDD1C36027DCD186FULL }, /* XSUM_XXH3_testdata[3140] */\n    { 1570, 0x9E3779B185EBCA8DULL, 0xB0B201368B2BEC76ULL }, /* XSUM_XXH3_testdata[3141] */\n    { 1571, 0x0000000000000000ULL, 0x58883470165C7DA3ULL }, /* XSUM_XXH3_testdata[3142] */\n    { 1571, 0x9E3779B185EBCA8DULL, 0x1619BE2824FDD4F9ULL }, /* XSUM_XXH3_testdata[3143] */\n    { 1572, 0x0000000000000000ULL, 0xC940C303F9CBEABCULL }, /* XSUM_XXH3_testdata[3144] */\n    { 1572, 0x9E3779B185EBCA8DULL, 0xFE77A4E168E65690ULL }, /* XSUM_XXH3_testdata[3145] */\n    { 1573, 0x0000000000000000ULL, 0xA9E2DC206A9288B9ULL }, /* XSUM_XXH3_testdata[3146] */\n    { 1573, 0x9E3779B185EBCA8DULL, 0xEA89C3A24A345C43ULL }, /* XSUM_XXH3_testdata[3147] */\n    { 1574, 0x0000000000000000ULL, 0xF9178CB0888E6943ULL }, /* XSUM_XXH3_testdata[3148] */\n    { 1574, 0x9E3779B185EBCA8DULL, 0x9E31837E985F353EULL }, /* XSUM_XXH3_testdata[3149] */\n    { 1575, 0x0000000000000000ULL, 0x83C0F764EFF0AD9BULL }, /* XSUM_XXH3_testdata[3150] */\n    { 1575, 0x9E3779B185EBCA8DULL, 0xF3CD0D6F71B8B8ACULL }, /* XSUM_XXH3_testdata[3151] */\n    { 1576, 0x0000000000000000ULL, 0xD05C1CB5990DD48EULL }, /* XSUM_XXH3_testdata[3152] */\n    { 1576, 0x9E3779B185EBCA8DULL, 0xFFC0ED23DC372AEDULL }, /* XSUM_XXH3_testdata[3153] */\n    { 1577, 0x0000000000000000ULL, 0xD05B8448D4A4C37FULL }, /* XSUM_XXH3_testdata[3154] */\n    { 1577, 0x9E3779B185EBCA8DULL, 0x6AB0B55BAEC26ED0ULL }, /* XSUM_XXH3_testdata[3155] */\n    { 1578, 0x0000000000000000ULL, 0xF2E07A2139BBB81FULL }, /* XSUM_XXH3_testdata[3156] */\n    { 1578, 0x9E3779B185EBCA8DULL, 0x4E69AE6DC4D111B1ULL }, /* XSUM_XXH3_testdata[3157] */\n    { 1579, 0x0000000000000000ULL, 0x34C565FFFC42CE11ULL }, /* XSUM_XXH3_testdata[3158] */\n    { 1579, 0x9E3779B185EBCA8DULL, 0x698082A359102999ULL }, /* XSUM_XXH3_testdata[3159] */\n    { 1580, 0x0000000000000000ULL, 0x3963318475805AF5ULL }, /* XSUM_XXH3_testdata[3160] */\n    { 1580, 0x9E3779B185EBCA8DULL, 0xC1EED8DDAAE46BC7ULL }, /* XSUM_XXH3_testdata[3161] */\n    { 1581, 0x0000000000000000ULL, 0x84D1EC769B21AF34ULL }, /* XSUM_XXH3_testdata[3162] */\n    { 1581, 0x9E3779B185EBCA8DULL, 0x2998D1C9AE709AF6ULL }, /* XSUM_XXH3_testdata[3163] */\n    { 1582, 0x0000000000000000ULL, 0x8AC3925462820D1AULL }, /* XSUM_XXH3_testdata[3164] */\n    { 1582, 0x9E3779B185EBCA8DULL, 0x6C4206FE79F48927ULL }, /* XSUM_XXH3_testdata[3165] */\n    { 1583, 0x0000000000000000ULL, 0x320B91A78829FD61ULL }, /* XSUM_XXH3_testdata[3166] */\n    { 1583, 0x9E3779B185EBCA8DULL, 0x99D8E29048DFF054ULL }, /* XSUM_XXH3_testdata[3167] */\n    { 1584, 0x0000000000000000ULL, 0x112D360DABC99809ULL }, /* XSUM_XXH3_testdata[3168] */\n    { 1584, 0x9E3779B185EBCA8DULL, 0x69BFB77290E9E380ULL }, /* XSUM_XXH3_testdata[3169] */\n    { 1585, 0x0000000000000000ULL, 0x16B8F188490984EFULL }, /* XSUM_XXH3_testdata[3170] */\n    { 1585, 0x9E3779B185EBCA8DULL, 0x974160CE63804BF2ULL }, /* XSUM_XXH3_testdata[3171] */\n    { 1586, 0x0000000000000000ULL, 0x0D4E515CA984876DULL }, /* XSUM_XXH3_testdata[3172] */\n    { 1586, 0x9E3779B185EBCA8DULL, 0x1D24D2E86F9CEB03ULL }, /* XSUM_XXH3_testdata[3173] */\n    { 1587, 0x0000000000000000ULL, 0xEA40D4F216011220ULL }, /* XSUM_XXH3_testdata[3174] */\n    { 1587, 0x9E3779B185EBCA8DULL, 0x4C9D21C5C10274C0ULL }, /* XSUM_XXH3_testdata[3175] */\n    { 1588, 0x0000000000000000ULL, 0x10E0750B26E84A86ULL }, /* XSUM_XXH3_testdata[3176] */\n    { 1588, 0x9E3779B185EBCA8DULL, 0xB75D8AEB8E40B44FULL }, /* XSUM_XXH3_testdata[3177] */\n    { 1589, 0x0000000000000000ULL, 0xDCC57A0AB1580C5BULL }, /* XSUM_XXH3_testdata[3178] */\n    { 1589, 0x9E3779B185EBCA8DULL, 0xB0C608AD7843BF68ULL }, /* XSUM_XXH3_testdata[3179] */\n    { 1590, 0x0000000000000000ULL, 0xE15F4B8D47E84506ULL }, /* XSUM_XXH3_testdata[3180] */\n    { 1590, 0x9E3779B185EBCA8DULL, 0xAE5AA10BB05F0E6DULL }, /* XSUM_XXH3_testdata[3181] */\n    { 1591, 0x0000000000000000ULL, 0xD863C7852DDB5F10ULL }, /* XSUM_XXH3_testdata[3182] */\n    { 1591, 0x9E3779B185EBCA8DULL, 0xFE9C2267D9503D0FULL }, /* XSUM_XXH3_testdata[3183] */\n    { 1592, 0x0000000000000000ULL, 0x2022B8A266768AC2ULL }, /* XSUM_XXH3_testdata[3184] */\n    { 1592, 0x9E3779B185EBCA8DULL, 0xC662236FD63B5820ULL }, /* XSUM_XXH3_testdata[3185] */\n    { 1593, 0x0000000000000000ULL, 0xBA04DF2747C3E87BULL }, /* XSUM_XXH3_testdata[3186] */\n    { 1593, 0x9E3779B185EBCA8DULL, 0x74E98904F9C426C7ULL }, /* XSUM_XXH3_testdata[3187] */\n    { 1594, 0x0000000000000000ULL, 0x68779DC926FC7E52ULL }, /* XSUM_XXH3_testdata[3188] */\n    { 1594, 0x9E3779B185EBCA8DULL, 0x80DD4F7449DC2620ULL }, /* XSUM_XXH3_testdata[3189] */\n    { 1595, 0x0000000000000000ULL, 0x2A599C5CCD84D18BULL }, /* XSUM_XXH3_testdata[3190] */\n    { 1595, 0x9E3779B185EBCA8DULL, 0x8191AD0EBF33CE41ULL }, /* XSUM_XXH3_testdata[3191] */\n    { 1596, 0x0000000000000000ULL, 0xA995602BA643AB19ULL }, /* XSUM_XXH3_testdata[3192] */\n    { 1596, 0x9E3779B185EBCA8DULL, 0xF373DF9D9F20E755ULL }, /* XSUM_XXH3_testdata[3193] */\n    { 1597, 0x0000000000000000ULL, 0x6E38B17B9962B35BULL }, /* XSUM_XXH3_testdata[3194] */\n    { 1597, 0x9E3779B185EBCA8DULL, 0x145F6E75FAAEC511ULL }, /* XSUM_XXH3_testdata[3195] */\n    { 1598, 0x0000000000000000ULL, 0x2E423B8EBC700658ULL }, /* XSUM_XXH3_testdata[3196] */\n    { 1598, 0x9E3779B185EBCA8DULL, 0x78A51671DC129C26ULL }, /* XSUM_XXH3_testdata[3197] */\n    { 1599, 0x0000000000000000ULL, 0x4250EA93B2DB41F0ULL }, /* XSUM_XXH3_testdata[3198] */\n    { 1599, 0x9E3779B185EBCA8DULL, 0xF1EEE97E41EAAB59ULL }, /* XSUM_XXH3_testdata[3199] */\n    { 1600, 0x0000000000000000ULL, 0x71FF997900401775ULL }, /* XSUM_XXH3_testdata[3200] */\n    { 1600, 0x9E3779B185EBCA8DULL, 0x5984E7BDFEEF8AF9ULL }, /* XSUM_XXH3_testdata[3201] */\n    { 1601, 0x0000000000000000ULL, 0x22E47641F3402193ULL }, /* XSUM_XXH3_testdata[3202] */\n    { 1601, 0x9E3779B185EBCA8DULL, 0xB624402888163BA7ULL }, /* XSUM_XXH3_testdata[3203] */\n    { 1602, 0x0000000000000000ULL, 0xA50DDE1B67EA934FULL }, /* XSUM_XXH3_testdata[3204] */\n    { 1602, 0x9E3779B185EBCA8DULL, 0xF5C10997A1A43E57ULL }, /* XSUM_XXH3_testdata[3205] */\n    { 1603, 0x0000000000000000ULL, 0x94938C01F4D09D24ULL }, /* XSUM_XXH3_testdata[3206] */\n    { 1603, 0x9E3779B185EBCA8DULL, 0x2711DB4DDF2692E2ULL }, /* XSUM_XXH3_testdata[3207] */\n    { 1604, 0x0000000000000000ULL, 0xB1F4EDFF84361AD4ULL }, /* XSUM_XXH3_testdata[3208] */\n    { 1604, 0x9E3779B185EBCA8DULL, 0xF52B9AC7BA89D7EDULL }, /* XSUM_XXH3_testdata[3209] */\n    { 1605, 0x0000000000000000ULL, 0xA6E594E6C06C0199ULL }, /* XSUM_XXH3_testdata[3210] */\n    { 1605, 0x9E3779B185EBCA8DULL, 0x12E6ED29DB7AC71CULL }, /* XSUM_XXH3_testdata[3211] */\n    { 1606, 0x0000000000000000ULL, 0x87697AA039DF4CB7ULL }, /* XSUM_XXH3_testdata[3212] */\n    { 1606, 0x9E3779B185EBCA8DULL, 0x979313367467A225ULL }, /* XSUM_XXH3_testdata[3213] */\n    { 1607, 0x0000000000000000ULL, 0x47AE8754657B2C1FULL }, /* XSUM_XXH3_testdata[3214] */\n    { 1607, 0x9E3779B185EBCA8DULL, 0x48337844D7C78DBAULL }, /* XSUM_XXH3_testdata[3215] */\n    { 1608, 0x0000000000000000ULL, 0x12271A02E802A432ULL }, /* XSUM_XXH3_testdata[3216] */\n    { 1608, 0x9E3779B185EBCA8DULL, 0xE0FB066273556224ULL }, /* XSUM_XXH3_testdata[3217] */\n    { 1609, 0x0000000000000000ULL, 0x1297AD9988374E37ULL }, /* XSUM_XXH3_testdata[3218] */\n    { 1609, 0x9E3779B185EBCA8DULL, 0x139B0231FA6AFBBBULL }, /* XSUM_XXH3_testdata[3219] */\n    { 1610, 0x0000000000000000ULL, 0x14B7882A424AE188ULL }, /* XSUM_XXH3_testdata[3220] */\n    { 1610, 0x9E3779B185EBCA8DULL, 0xD1391165C4114251ULL }, /* XSUM_XXH3_testdata[3221] */\n    { 1611, 0x0000000000000000ULL, 0x765420480C733AA5ULL }, /* XSUM_XXH3_testdata[3222] */\n    { 1611, 0x9E3779B185EBCA8DULL, 0x0981C72C51AFC089ULL }, /* XSUM_XXH3_testdata[3223] */\n    { 1612, 0x0000000000000000ULL, 0xA7A2E1C6B74DF5B2ULL }, /* XSUM_XXH3_testdata[3224] */\n    { 1612, 0x9E3779B185EBCA8DULL, 0xAB31848E7F122EEBULL }, /* XSUM_XXH3_testdata[3225] */\n    { 1613, 0x0000000000000000ULL, 0x67E105DE318E43BAULL }, /* XSUM_XXH3_testdata[3226] */\n    { 1613, 0x9E3779B185EBCA8DULL, 0xCF882ACCB3F0F8F7ULL }, /* XSUM_XXH3_testdata[3227] */\n    { 1614, 0x0000000000000000ULL, 0x99A0079B783E73B6ULL }, /* XSUM_XXH3_testdata[3228] */\n    { 1614, 0x9E3779B185EBCA8DULL, 0x8FCFA40C58CDE8A6ULL }, /* XSUM_XXH3_testdata[3229] */\n    { 1615, 0x0000000000000000ULL, 0x0858FEE83C484F6CULL }, /* XSUM_XXH3_testdata[3230] */\n    { 1615, 0x9E3779B185EBCA8DULL, 0x0818C90CD2F2F4FDULL }, /* XSUM_XXH3_testdata[3231] */\n    { 1616, 0x0000000000000000ULL, 0x3B8A4AB709227959ULL }, /* XSUM_XXH3_testdata[3232] */\n    { 1616, 0x9E3779B185EBCA8DULL, 0x058048EAE6C53033ULL }, /* XSUM_XXH3_testdata[3233] */\n    { 1617, 0x0000000000000000ULL, 0xAA6A5396B6B40848ULL }, /* XSUM_XXH3_testdata[3234] */\n    { 1617, 0x9E3779B185EBCA8DULL, 0xE1CAEDB3665A1933ULL }, /* XSUM_XXH3_testdata[3235] */\n    { 1618, 0x0000000000000000ULL, 0x30C6D76861300D5AULL }, /* XSUM_XXH3_testdata[3236] */\n    { 1618, 0x9E3779B185EBCA8DULL, 0x5B6C1E42371F2CEDULL }, /* XSUM_XXH3_testdata[3237] */\n    { 1619, 0x0000000000000000ULL, 0x41C32C29046DFB1BULL }, /* XSUM_XXH3_testdata[3238] */\n    { 1619, 0x9E3779B185EBCA8DULL, 0x8B03BBBF38A73028ULL }, /* XSUM_XXH3_testdata[3239] */\n    { 1620, 0x0000000000000000ULL, 0xAFF70C02F131727AULL }, /* XSUM_XXH3_testdata[3240] */\n    { 1620, 0x9E3779B185EBCA8DULL, 0x37ECE73A63C9C6E7ULL }, /* XSUM_XXH3_testdata[3241] */\n    { 1621, 0x0000000000000000ULL, 0x50DA203DB32C676CULL }, /* XSUM_XXH3_testdata[3242] */\n    { 1621, 0x9E3779B185EBCA8DULL, 0x5311BE5731F735A4ULL }, /* XSUM_XXH3_testdata[3243] */\n    { 1622, 0x0000000000000000ULL, 0x075E01320DD1A984ULL }, /* XSUM_XXH3_testdata[3244] */\n    { 1622, 0x9E3779B185EBCA8DULL, 0x83F5BFCA88648CA4ULL }, /* XSUM_XXH3_testdata[3245] */\n    { 1623, 0x0000000000000000ULL, 0xC17245BEB95F51CCULL }, /* XSUM_XXH3_testdata[3246] */\n    { 1623, 0x9E3779B185EBCA8DULL, 0xFB3B4E6C9B25BB52ULL }, /* XSUM_XXH3_testdata[3247] */\n    { 1624, 0x0000000000000000ULL, 0x7C4E6FD45D040135ULL }, /* XSUM_XXH3_testdata[3248] */\n    { 1624, 0x9E3779B185EBCA8DULL, 0xF3E579FAE8BEAE00ULL }, /* XSUM_XXH3_testdata[3249] */\n    { 1625, 0x0000000000000000ULL, 0xB19353267D0B0A9BULL }, /* XSUM_XXH3_testdata[3250] */\n    { 1625, 0x9E3779B185EBCA8DULL, 0x307746B475A22529ULL }, /* XSUM_XXH3_testdata[3251] */\n    { 1626, 0x0000000000000000ULL, 0x76749D9B41C79BBFULL }, /* XSUM_XXH3_testdata[3252] */\n    { 1626, 0x9E3779B185EBCA8DULL, 0x4BF36CBFD5929113ULL }, /* XSUM_XXH3_testdata[3253] */\n    { 1627, 0x0000000000000000ULL, 0xD6E04C9EF0D9EAE0ULL }, /* XSUM_XXH3_testdata[3254] */\n    { 1627, 0x9E3779B185EBCA8DULL, 0x57C9CDC8EC7799F6ULL }, /* XSUM_XXH3_testdata[3255] */\n    { 1628, 0x0000000000000000ULL, 0x65C8FF68B614224DULL }, /* XSUM_XXH3_testdata[3256] */\n    { 1628, 0x9E3779B185EBCA8DULL, 0x14C70C1230F3E37DULL }, /* XSUM_XXH3_testdata[3257] */\n    { 1629, 0x0000000000000000ULL, 0xD6A1C15797266322ULL }, /* XSUM_XXH3_testdata[3258] */\n    { 1629, 0x9E3779B185EBCA8DULL, 0x48CA0737C2DAE640ULL }, /* XSUM_XXH3_testdata[3259] */\n    { 1630, 0x0000000000000000ULL, 0x4E1F343CC83DC406ULL }, /* XSUM_XXH3_testdata[3260] */\n    { 1630, 0x9E3779B185EBCA8DULL, 0x66E0DB150C7A7C1FULL }, /* XSUM_XXH3_testdata[3261] */\n    { 1631, 0x0000000000000000ULL, 0xAF66891B587A8E00ULL }, /* XSUM_XXH3_testdata[3262] */\n    { 1631, 0x9E3779B185EBCA8DULL, 0xB82DC2CE06D93DA0ULL }, /* XSUM_XXH3_testdata[3263] */\n    { 1632, 0x0000000000000000ULL, 0xAF73A17D73A67E4FULL }, /* XSUM_XXH3_testdata[3264] */\n    { 1632, 0x9E3779B185EBCA8DULL, 0x114DE89BE9154238ULL }, /* XSUM_XXH3_testdata[3265] */\n    { 1633, 0x0000000000000000ULL, 0xCBAAF0DF2B180938ULL }, /* XSUM_XXH3_testdata[3266] */\n    { 1633, 0x9E3779B185EBCA8DULL, 0x0B72E53782CAA73AULL }, /* XSUM_XXH3_testdata[3267] */\n    { 1634, 0x0000000000000000ULL, 0x9527CB7715757627ULL }, /* XSUM_XXH3_testdata[3268] */\n    { 1634, 0x9E3779B185EBCA8DULL, 0xA732AF53D04AB047ULL }, /* XSUM_XXH3_testdata[3269] */\n    { 1635, 0x0000000000000000ULL, 0xF3506A787F72DC49ULL }, /* XSUM_XXH3_testdata[3270] */\n    { 1635, 0x9E3779B185EBCA8DULL, 0xFF6B5F5D0B526102ULL }, /* XSUM_XXH3_testdata[3271] */\n    { 1636, 0x0000000000000000ULL, 0xF01532579D0BA6D9ULL }, /* XSUM_XXH3_testdata[3272] */\n    { 1636, 0x9E3779B185EBCA8DULL, 0x6B68A4D5AD606A8AULL }, /* XSUM_XXH3_testdata[3273] */\n    { 1637, 0x0000000000000000ULL, 0xB69DE7BA82EFD875ULL }, /* XSUM_XXH3_testdata[3274] */\n    { 1637, 0x9E3779B185EBCA8DULL, 0xBBF9D11E0B127B7BULL }, /* XSUM_XXH3_testdata[3275] */\n    { 1638, 0x0000000000000000ULL, 0x9E759E7D2EA04907ULL }, /* XSUM_XXH3_testdata[3276] */\n    { 1638, 0x9E3779B185EBCA8DULL, 0x1450D25D3E22B389ULL }, /* XSUM_XXH3_testdata[3277] */\n    { 1639, 0x0000000000000000ULL, 0x01269D1AC5DC8866ULL }, /* XSUM_XXH3_testdata[3278] */\n    { 1639, 0x9E3779B185EBCA8DULL, 0xEEE6A6FA68BFD87AULL }, /* XSUM_XXH3_testdata[3279] */\n    { 1640, 0x0000000000000000ULL, 0x8F5B615C253FC230ULL }, /* XSUM_XXH3_testdata[3280] */\n    { 1640, 0x9E3779B185EBCA8DULL, 0x6478EDFD1874F981ULL }, /* XSUM_XXH3_testdata[3281] */\n    { 1641, 0x0000000000000000ULL, 0xD3703DB9BB6EF8FFULL }, /* XSUM_XXH3_testdata[3282] */\n    { 1641, 0x9E3779B185EBCA8DULL, 0x62D010D1C4F5576DULL }, /* XSUM_XXH3_testdata[3283] */\n    { 1642, 0x0000000000000000ULL, 0x3C81BC738A8E8163ULL }, /* XSUM_XXH3_testdata[3284] */\n    { 1642, 0x9E3779B185EBCA8DULL, 0xA50FCCD23CB089ADULL }, /* XSUM_XXH3_testdata[3285] */\n    { 1643, 0x0000000000000000ULL, 0x5F5445667F780B4AULL }, /* XSUM_XXH3_testdata[3286] */\n    { 1643, 0x9E3779B185EBCA8DULL, 0xCD803F4570D469D0ULL }, /* XSUM_XXH3_testdata[3287] */\n    { 1644, 0x0000000000000000ULL, 0xE2BDF51648BBA936ULL }, /* XSUM_XXH3_testdata[3288] */\n    { 1644, 0x9E3779B185EBCA8DULL, 0x35B1A3249ECF3464ULL }, /* XSUM_XXH3_testdata[3289] */\n    { 1645, 0x0000000000000000ULL, 0x8D98BFBEEF6C3CC7ULL }, /* XSUM_XXH3_testdata[3290] */\n    { 1645, 0x9E3779B185EBCA8DULL, 0xA90FCAF5D4A644E7ULL }, /* XSUM_XXH3_testdata[3291] */\n    { 1646, 0x0000000000000000ULL, 0x67E887DFAEF4DAB2ULL }, /* XSUM_XXH3_testdata[3292] */\n    { 1646, 0x9E3779B185EBCA8DULL, 0x8A00FCF5A57F6B2AULL }, /* XSUM_XXH3_testdata[3293] */\n    { 1647, 0x0000000000000000ULL, 0x0C424D06E1B35917ULL }, /* XSUM_XXH3_testdata[3294] */\n    { 1647, 0x9E3779B185EBCA8DULL, 0x2CDF0C10241732C0ULL }, /* XSUM_XXH3_testdata[3295] */\n    { 1648, 0x0000000000000000ULL, 0x4EF489B5D71A4003ULL }, /* XSUM_XXH3_testdata[3296] */\n    { 1648, 0x9E3779B185EBCA8DULL, 0x77B9713EEC425B81ULL }, /* XSUM_XXH3_testdata[3297] */\n    { 1649, 0x0000000000000000ULL, 0xC29F4F6458B40232ULL }, /* XSUM_XXH3_testdata[3298] */\n    { 1649, 0x9E3779B185EBCA8DULL, 0x90F4D5B5908D43E3ULL }, /* XSUM_XXH3_testdata[3299] */\n    { 1650, 0x0000000000000000ULL, 0xAA6465C49BF0B5C6ULL }, /* XSUM_XXH3_testdata[3300] */\n    { 1650, 0x9E3779B185EBCA8DULL, 0xA1D1F284DECA2C8EULL }, /* XSUM_XXH3_testdata[3301] */\n    { 1651, 0x0000000000000000ULL, 0xC8401D2FC2B52852ULL }, /* XSUM_XXH3_testdata[3302] */\n    { 1651, 0x9E3779B185EBCA8DULL, 0x992C175AD669C528ULL }, /* XSUM_XXH3_testdata[3303] */\n    { 1652, 0x0000000000000000ULL, 0x893BF660E7D10AC0ULL }, /* XSUM_XXH3_testdata[3304] */\n    { 1652, 0x9E3779B185EBCA8DULL, 0xA4A0679F2E0C8A4FULL }, /* XSUM_XXH3_testdata[3305] */\n    { 1653, 0x0000000000000000ULL, 0x8763E5C3902926A6ULL }, /* XSUM_XXH3_testdata[3306] */\n    { 1653, 0x9E3779B185EBCA8DULL, 0x7F184DE567358F30ULL }, /* XSUM_XXH3_testdata[3307] */\n    { 1654, 0x0000000000000000ULL, 0xB0A10F0E35C22309ULL }, /* XSUM_XXH3_testdata[3308] */\n    { 1654, 0x9E3779B185EBCA8DULL, 0x3BFD1B41229251F7ULL }, /* XSUM_XXH3_testdata[3309] */\n    { 1655, 0x0000000000000000ULL, 0x47A4A388520B2D06ULL }, /* XSUM_XXH3_testdata[3310] */\n    { 1655, 0x9E3779B185EBCA8DULL, 0xAA0804050E3C54B0ULL }, /* XSUM_XXH3_testdata[3311] */\n    { 1656, 0x0000000000000000ULL, 0xA5F5C1240239878CULL }, /* XSUM_XXH3_testdata[3312] */\n    { 1656, 0x9E3779B185EBCA8DULL, 0x6F92386CEE0B255EULL }, /* XSUM_XXH3_testdata[3313] */\n    { 1657, 0x0000000000000000ULL, 0xF78E73264BD347E5ULL }, /* XSUM_XXH3_testdata[3314] */\n    { 1657, 0x9E3779B185EBCA8DULL, 0xB906F1EBE6B73016ULL }, /* XSUM_XXH3_testdata[3315] */\n    { 1658, 0x0000000000000000ULL, 0x892BDCED877DE45CULL }, /* XSUM_XXH3_testdata[3316] */\n    { 1658, 0x9E3779B185EBCA8DULL, 0x1F87EAD446661AE5ULL }, /* XSUM_XXH3_testdata[3317] */\n    { 1659, 0x0000000000000000ULL, 0xBAA08E5BEA937434ULL }, /* XSUM_XXH3_testdata[3318] */\n    { 1659, 0x9E3779B185EBCA8DULL, 0x3533F879AA51BB0AULL }, /* XSUM_XXH3_testdata[3319] */\n    { 1660, 0x0000000000000000ULL, 0xF99BC5586AE8F084ULL }, /* XSUM_XXH3_testdata[3320] */\n    { 1660, 0x9E3779B185EBCA8DULL, 0xA4A58945B90F8025ULL }, /* XSUM_XXH3_testdata[3321] */\n    { 1661, 0x0000000000000000ULL, 0x4821F4141C3CAFF1ULL }, /* XSUM_XXH3_testdata[3322] */\n    { 1661, 0x9E3779B185EBCA8DULL, 0x6DC45E039BC0FD99ULL }, /* XSUM_XXH3_testdata[3323] */\n    { 1662, 0x0000000000000000ULL, 0xAC0F5BF2D6BB23EDULL }, /* XSUM_XXH3_testdata[3324] */\n    { 1662, 0x9E3779B185EBCA8DULL, 0x4A2FAE9ADD0AF634ULL }, /* XSUM_XXH3_testdata[3325] */\n    { 1663, 0x0000000000000000ULL, 0x0BB65AE615658F7EULL }, /* XSUM_XXH3_testdata[3326] */\n    { 1663, 0x9E3779B185EBCA8DULL, 0xA5F3DC0D801A84DCULL }, /* XSUM_XXH3_testdata[3327] */\n    { 1664, 0x0000000000000000ULL, 0xDC8EE644ACBF2296ULL }, /* XSUM_XXH3_testdata[3328] */\n    { 1664, 0x9E3779B185EBCA8DULL, 0x0C1F83E678A50DCAULL }, /* XSUM_XXH3_testdata[3329] */\n    { 1665, 0x0000000000000000ULL, 0x014559DF7B3BCE5EULL }, /* XSUM_XXH3_testdata[3330] */\n    { 1665, 0x9E3779B185EBCA8DULL, 0x9B5B643B44FB2BD8ULL }, /* XSUM_XXH3_testdata[3331] */\n    { 1666, 0x0000000000000000ULL, 0x9292914EF2E7DF06ULL }, /* XSUM_XXH3_testdata[3332] */\n    { 1666, 0x9E3779B185EBCA8DULL, 0xC53EBCB771C28F31ULL }, /* XSUM_XXH3_testdata[3333] */\n    { 1667, 0x0000000000000000ULL, 0x6319CCBAFF5746EBULL }, /* XSUM_XXH3_testdata[3334] */\n    { 1667, 0x9E3779B185EBCA8DULL, 0x3B78F255E325D32AULL }, /* XSUM_XXH3_testdata[3335] */\n    { 1668, 0x0000000000000000ULL, 0x7C020819254B1D09ULL }, /* XSUM_XXH3_testdata[3336] */\n    { 1668, 0x9E3779B185EBCA8DULL, 0x300D3932D739495EULL }, /* XSUM_XXH3_testdata[3337] */\n    { 1669, 0x0000000000000000ULL, 0x9F79BB9126872BD3ULL }, /* XSUM_XXH3_testdata[3338] */\n    { 1669, 0x9E3779B185EBCA8DULL, 0xA5A7359367C0103BULL }, /* XSUM_XXH3_testdata[3339] */\n    { 1670, 0x0000000000000000ULL, 0xFB48C25F3BDA21CFULL }, /* XSUM_XXH3_testdata[3340] */\n    { 1670, 0x9E3779B185EBCA8DULL, 0x23AA179A02C66BDFULL }, /* XSUM_XXH3_testdata[3341] */\n    { 1671, 0x0000000000000000ULL, 0xA5CE283DD784296AULL }, /* XSUM_XXH3_testdata[3342] */\n    { 1671, 0x9E3779B185EBCA8DULL, 0x84A0B9F6703042E7ULL }, /* XSUM_XXH3_testdata[3343] */\n    { 1672, 0x0000000000000000ULL, 0x1A72E2F2B48C2615ULL }, /* XSUM_XXH3_testdata[3344] */\n    { 1672, 0x9E3779B185EBCA8DULL, 0xFB7361C7BDDDFE5FULL }, /* XSUM_XXH3_testdata[3345] */\n    { 1673, 0x0000000000000000ULL, 0x65A5121142E2BE9CULL }, /* XSUM_XXH3_testdata[3346] */\n    { 1673, 0x9E3779B185EBCA8DULL, 0x6B49D15017288741ULL }, /* XSUM_XXH3_testdata[3347] */\n    { 1674, 0x0000000000000000ULL, 0x3C80D630C9D18076ULL }, /* XSUM_XXH3_testdata[3348] */\n    { 1674, 0x9E3779B185EBCA8DULL, 0x97E2B18D6520EC8BULL }, /* XSUM_XXH3_testdata[3349] */\n    { 1675, 0x0000000000000000ULL, 0x8C49D14ECB693501ULL }, /* XSUM_XXH3_testdata[3350] */\n    { 1675, 0x9E3779B185EBCA8DULL, 0xA6646B75FE02BB12ULL }, /* XSUM_XXH3_testdata[3351] */\n    { 1676, 0x0000000000000000ULL, 0x4A71996DA2703AA2ULL }, /* XSUM_XXH3_testdata[3352] */\n    { 1676, 0x9E3779B185EBCA8DULL, 0x8A82052F3E2A7775ULL }, /* XSUM_XXH3_testdata[3353] */\n    { 1677, 0x0000000000000000ULL, 0x7C13B730BFB06745ULL }, /* XSUM_XXH3_testdata[3354] */\n    { 1677, 0x9E3779B185EBCA8DULL, 0x5ECB30648A07C440ULL }, /* XSUM_XXH3_testdata[3355] */\n    { 1678, 0x0000000000000000ULL, 0xB8FC2127B368C28DULL }, /* XSUM_XXH3_testdata[3356] */\n    { 1678, 0x9E3779B185EBCA8DULL, 0x23D8232F426474B0ULL }, /* XSUM_XXH3_testdata[3357] */\n    { 1679, 0x0000000000000000ULL, 0xC27A6F17D271D67FULL }, /* XSUM_XXH3_testdata[3358] */\n    { 1679, 0x9E3779B185EBCA8DULL, 0xF63AEC58CBDC4A05ULL }, /* XSUM_XXH3_testdata[3359] */\n    { 1680, 0x0000000000000000ULL, 0x5BD2201FEEFBF2D8ULL }, /* XSUM_XXH3_testdata[3360] */\n    { 1680, 0x9E3779B185EBCA8DULL, 0xE86AD5E291F27C27ULL }, /* XSUM_XXH3_testdata[3361] */\n    { 1681, 0x0000000000000000ULL, 0xDD992FD8D1588751ULL }, /* XSUM_XXH3_testdata[3362] */\n    { 1681, 0x9E3779B185EBCA8DULL, 0x505DDB442932F139ULL }, /* XSUM_XXH3_testdata[3363] */\n    { 1682, 0x0000000000000000ULL, 0x5A11F9CECF0A742BULL }, /* XSUM_XXH3_testdata[3364] */\n    { 1682, 0x9E3779B185EBCA8DULL, 0x69EBBEFE26FC011EULL }, /* XSUM_XXH3_testdata[3365] */\n    { 1683, 0x0000000000000000ULL, 0xCB713E69A99DA847ULL }, /* XSUM_XXH3_testdata[3366] */\n    { 1683, 0x9E3779B185EBCA8DULL, 0x8D6606AC9FD32978ULL }, /* XSUM_XXH3_testdata[3367] */\n    { 1684, 0x0000000000000000ULL, 0x2678A2C83F2FFE65ULL }, /* XSUM_XXH3_testdata[3368] */\n    { 1684, 0x9E3779B185EBCA8DULL, 0xDF10EC5B417F2A6DULL }, /* XSUM_XXH3_testdata[3369] */\n    { 1685, 0x0000000000000000ULL, 0x187EEB97E80FA75DULL }, /* XSUM_XXH3_testdata[3370] */\n    { 1685, 0x9E3779B185EBCA8DULL, 0xF344B102FBB78C5CULL }, /* XSUM_XXH3_testdata[3371] */\n    { 1686, 0x0000000000000000ULL, 0x94A6908662A06FDFULL }, /* XSUM_XXH3_testdata[3372] */\n    { 1686, 0x9E3779B185EBCA8DULL, 0x30129847B7F8E487ULL }, /* XSUM_XXH3_testdata[3373] */\n    { 1687, 0x0000000000000000ULL, 0x6A895C80F46F85CDULL }, /* XSUM_XXH3_testdata[3374] */\n    { 1687, 0x9E3779B185EBCA8DULL, 0x42AE31207908CC48ULL }, /* XSUM_XXH3_testdata[3375] */\n    { 1688, 0x0000000000000000ULL, 0x87BCA4695B2DDE93ULL }, /* XSUM_XXH3_testdata[3376] */\n    { 1688, 0x9E3779B185EBCA8DULL, 0xBFB1490777061F65ULL }, /* XSUM_XXH3_testdata[3377] */\n    { 1689, 0x0000000000000000ULL, 0xF6E6E4CC2E17EBA0ULL }, /* XSUM_XXH3_testdata[3378] */\n    { 1689, 0x9E3779B185EBCA8DULL, 0x0BF130EAE0CF0AB8ULL }, /* XSUM_XXH3_testdata[3379] */\n    { 1690, 0x0000000000000000ULL, 0x0380D89B487C0FB3ULL }, /* XSUM_XXH3_testdata[3380] */\n    { 1690, 0x9E3779B185EBCA8DULL, 0xBC9398A56DFD3815ULL }, /* XSUM_XXH3_testdata[3381] */\n    { 1691, 0x0000000000000000ULL, 0xA59785EE66C08AA9ULL }, /* XSUM_XXH3_testdata[3382] */\n    { 1691, 0x9E3779B185EBCA8DULL, 0x35666ACBF09F4EB9ULL }, /* XSUM_XXH3_testdata[3383] */\n    { 1692, 0x0000000000000000ULL, 0xBC427B4C7F5256D8ULL }, /* XSUM_XXH3_testdata[3384] */\n    { 1692, 0x9E3779B185EBCA8DULL, 0x14E5B49F2E28B5C5ULL }, /* XSUM_XXH3_testdata[3385] */\n    { 1693, 0x0000000000000000ULL, 0x4472B38397711962ULL }, /* XSUM_XXH3_testdata[3386] */\n    { 1693, 0x9E3779B185EBCA8DULL, 0xE1FC2B1250738986ULL }, /* XSUM_XXH3_testdata[3387] */\n    { 1694, 0x0000000000000000ULL, 0x0712FDD21FF67C14ULL }, /* XSUM_XXH3_testdata[3388] */\n    { 1694, 0x9E3779B185EBCA8DULL, 0x799AB06A78FF90E6ULL }, /* XSUM_XXH3_testdata[3389] */\n    { 1695, 0x0000000000000000ULL, 0xF64A2BBD33693E84ULL }, /* XSUM_XXH3_testdata[3390] */\n    { 1695, 0x9E3779B185EBCA8DULL, 0xAA3CC89E1064D0FAULL }, /* XSUM_XXH3_testdata[3391] */\n    { 1696, 0x0000000000000000ULL, 0x52677BEB2139CC5DULL }, /* XSUM_XXH3_testdata[3392] */\n    { 1696, 0x9E3779B185EBCA8DULL, 0x7AFE2676EDD1ECECULL }, /* XSUM_XXH3_testdata[3393] */\n    { 1697, 0x0000000000000000ULL, 0x300D981F56D14BA1ULL }, /* XSUM_XXH3_testdata[3394] */\n    { 1697, 0x9E3779B185EBCA8DULL, 0x25C739BECECD9EB5ULL }, /* XSUM_XXH3_testdata[3395] */\n    { 1698, 0x0000000000000000ULL, 0x79063E6F759B2CF4ULL }, /* XSUM_XXH3_testdata[3396] */\n    { 1698, 0x9E3779B185EBCA8DULL, 0x7CF876987D597B26ULL }, /* XSUM_XXH3_testdata[3397] */\n    { 1699, 0x0000000000000000ULL, 0xD4D8A31F46547D15ULL }, /* XSUM_XXH3_testdata[3398] */\n    { 1699, 0x9E3779B185EBCA8DULL, 0xACB693DB1AE30757ULL }, /* XSUM_XXH3_testdata[3399] */\n    { 1700, 0x0000000000000000ULL, 0xBA2D1AED6D3F1291ULL }, /* XSUM_XXH3_testdata[3400] */\n    { 1700, 0x9E3779B185EBCA8DULL, 0xE295316275003170ULL }, /* XSUM_XXH3_testdata[3401] */\n    { 1701, 0x0000000000000000ULL, 0x51CEFCA43F9471BFULL }, /* XSUM_XXH3_testdata[3402] */\n    { 1701, 0x9E3779B185EBCA8DULL, 0x74616698F5BE5948ULL }, /* XSUM_XXH3_testdata[3403] */\n    { 1702, 0x0000000000000000ULL, 0x18808689370AAD8EULL }, /* XSUM_XXH3_testdata[3404] */\n    { 1702, 0x9E3779B185EBCA8DULL, 0x79EDF381D1BC98EEULL }, /* XSUM_XXH3_testdata[3405] */\n    { 1703, 0x0000000000000000ULL, 0x280FA24BA3BFDC30ULL }, /* XSUM_XXH3_testdata[3406] */\n    { 1703, 0x9E3779B185EBCA8DULL, 0x3A7238C526B090CBULL }, /* XSUM_XXH3_testdata[3407] */\n    { 1704, 0x0000000000000000ULL, 0x9A13BBF8D5AB9FA0ULL }, /* XSUM_XXH3_testdata[3408] */\n    { 1704, 0x9E3779B185EBCA8DULL, 0x4E7097F99B0219DEULL }, /* XSUM_XXH3_testdata[3409] */\n    { 1705, 0x0000000000000000ULL, 0x751149F530F23B3DULL }, /* XSUM_XXH3_testdata[3410] */\n    { 1705, 0x9E3779B185EBCA8DULL, 0x1B2347FA6FAC3095ULL }, /* XSUM_XXH3_testdata[3411] */\n    { 1706, 0x0000000000000000ULL, 0x5E7A6FCEEEA405DDULL }, /* XSUM_XXH3_testdata[3412] */\n    { 1706, 0x9E3779B185EBCA8DULL, 0xAF6FE163245BC7A1ULL }, /* XSUM_XXH3_testdata[3413] */\n    { 1707, 0x0000000000000000ULL, 0xF3E6115DF0F23C7AULL }, /* XSUM_XXH3_testdata[3414] */\n    { 1707, 0x9E3779B185EBCA8DULL, 0x3A24873941B5E49AULL }, /* XSUM_XXH3_testdata[3415] */\n    { 1708, 0x0000000000000000ULL, 0x16F8B128EADB9EF1ULL }, /* XSUM_XXH3_testdata[3416] */\n    { 1708, 0x9E3779B185EBCA8DULL, 0x063F9C194C8EC62CULL }, /* XSUM_XXH3_testdata[3417] */\n    { 1709, 0x0000000000000000ULL, 0xB16E53B1ABCBD5F6ULL }, /* XSUM_XXH3_testdata[3418] */\n    { 1709, 0x9E3779B185EBCA8DULL, 0x8FA0AFEF906A3B08ULL }, /* XSUM_XXH3_testdata[3419] */\n    { 1710, 0x0000000000000000ULL, 0x91AE6F2A4E04CE2FULL }, /* XSUM_XXH3_testdata[3420] */\n    { 1710, 0x9E3779B185EBCA8DULL, 0x5E641D6DFC36F2E4ULL }, /* XSUM_XXH3_testdata[3421] */\n    { 1711, 0x0000000000000000ULL, 0x72AA744E3224B21CULL }, /* XSUM_XXH3_testdata[3422] */\n    { 1711, 0x9E3779B185EBCA8DULL, 0xE808026D23323001ULL }, /* XSUM_XXH3_testdata[3423] */\n    { 1712, 0x0000000000000000ULL, 0x5E84D67DB3CB690CULL }, /* XSUM_XXH3_testdata[3424] */\n    { 1712, 0x9E3779B185EBCA8DULL, 0x92A2AF0F6F556626ULL }, /* XSUM_XXH3_testdata[3425] */\n    { 1713, 0x0000000000000000ULL, 0xEA01D1C732815D95ULL }, /* XSUM_XXH3_testdata[3426] */\n    { 1713, 0x9E3779B185EBCA8DULL, 0x990416FA99E3583EULL }, /* XSUM_XXH3_testdata[3427] */\n    { 1714, 0x0000000000000000ULL, 0x2E7119639E3D4D35ULL }, /* XSUM_XXH3_testdata[3428] */\n    { 1714, 0x9E3779B185EBCA8DULL, 0x73AD703E2219297EULL }, /* XSUM_XXH3_testdata[3429] */\n    { 1715, 0x0000000000000000ULL, 0x51C9DC72F6C1EEA8ULL }, /* XSUM_XXH3_testdata[3430] */\n    { 1715, 0x9E3779B185EBCA8DULL, 0x81B6D259D25EB2BCULL }, /* XSUM_XXH3_testdata[3431] */\n    { 1716, 0x0000000000000000ULL, 0x45D2F1C6B036F1CDULL }, /* XSUM_XXH3_testdata[3432] */\n    { 1716, 0x9E3779B185EBCA8DULL, 0x0DF5F8958B4D3DAAULL }, /* XSUM_XXH3_testdata[3433] */\n    { 1717, 0x0000000000000000ULL, 0x61FBCD5F366792D7ULL }, /* XSUM_XXH3_testdata[3434] */\n    { 1717, 0x9E3779B185EBCA8DULL, 0x6365F06DC899C90BULL }, /* XSUM_XXH3_testdata[3435] */\n    { 1718, 0x0000000000000000ULL, 0xABA05CE4BA47455FULL }, /* XSUM_XXH3_testdata[3436] */\n    { 1718, 0x9E3779B185EBCA8DULL, 0x2F3C96BADC8EC27AULL }, /* XSUM_XXH3_testdata[3437] */\n    { 1719, 0x0000000000000000ULL, 0x2D3FF1E8B05F4E9AULL }, /* XSUM_XXH3_testdata[3438] */\n    { 1719, 0x9E3779B185EBCA8DULL, 0x991F60E4CD736A13ULL }, /* XSUM_XXH3_testdata[3439] */\n    { 1720, 0x0000000000000000ULL, 0xDFF2D0888B0C99F4ULL }, /* XSUM_XXH3_testdata[3440] */\n    { 1720, 0x9E3779B185EBCA8DULL, 0x9352C645DFFDA421ULL }, /* XSUM_XXH3_testdata[3441] */\n    { 1721, 0x0000000000000000ULL, 0x8E05C59E1219124DULL }, /* XSUM_XXH3_testdata[3442] */\n    { 1721, 0x9E3779B185EBCA8DULL, 0x5C1F24B984ABB5F6ULL }, /* XSUM_XXH3_testdata[3443] */\n    { 1722, 0x0000000000000000ULL, 0x312DEB25A28BD45EULL }, /* XSUM_XXH3_testdata[3444] */\n    { 1722, 0x9E3779B185EBCA8DULL, 0xDDE6A17CCD3EDB8CULL }, /* XSUM_XXH3_testdata[3445] */\n    { 1723, 0x0000000000000000ULL, 0x99735C6A00896EA9ULL }, /* XSUM_XXH3_testdata[3446] */\n    { 1723, 0x9E3779B185EBCA8DULL, 0x659A7B5EFC7F69F4ULL }, /* XSUM_XXH3_testdata[3447] */\n    { 1724, 0x0000000000000000ULL, 0xDA70A7331C758A11ULL }, /* XSUM_XXH3_testdata[3448] */\n    { 1724, 0x9E3779B185EBCA8DULL, 0xE587F2DB4B7C28B2ULL }, /* XSUM_XXH3_testdata[3449] */\n    { 1725, 0x0000000000000000ULL, 0x671AC2B05CD1E93EULL }, /* XSUM_XXH3_testdata[3450] */\n    { 1725, 0x9E3779B185EBCA8DULL, 0x0FD6460344094D86ULL }, /* XSUM_XXH3_testdata[3451] */\n    { 1726, 0x0000000000000000ULL, 0x1AC66A5AA86E9E25ULL }, /* XSUM_XXH3_testdata[3452] */\n    { 1726, 0x9E3779B185EBCA8DULL, 0x1EC51F9ABB08B913ULL }, /* XSUM_XXH3_testdata[3453] */\n    { 1727, 0x0000000000000000ULL, 0xF78173A923B84753ULL }, /* XSUM_XXH3_testdata[3454] */\n    { 1727, 0x9E3779B185EBCA8DULL, 0x745FF5546F2C23DCULL }, /* XSUM_XXH3_testdata[3455] */\n    { 1728, 0x0000000000000000ULL, 0x220DAC2E47871091ULL }, /* XSUM_XXH3_testdata[3456] */\n    { 1728, 0x9E3779B185EBCA8DULL, 0x79501CDE4D247902ULL }, /* XSUM_XXH3_testdata[3457] */\n    { 1729, 0x0000000000000000ULL, 0x5F27B880EB82CBE3ULL }, /* XSUM_XXH3_testdata[3458] */\n    { 1729, 0x9E3779B185EBCA8DULL, 0x3ABE71821453D8A0ULL }, /* XSUM_XXH3_testdata[3459] */\n    { 1730, 0x0000000000000000ULL, 0x13F5358188C8C705ULL }, /* XSUM_XXH3_testdata[3460] */\n    { 1730, 0x9E3779B185EBCA8DULL, 0x5DEBDA86C8CCAD56ULL }, /* XSUM_XXH3_testdata[3461] */\n    { 1731, 0x0000000000000000ULL, 0x252BB54C35412507ULL }, /* XSUM_XXH3_testdata[3462] */\n    { 1731, 0x9E3779B185EBCA8DULL, 0xD3B16569E6073E74ULL }, /* XSUM_XXH3_testdata[3463] */\n    { 1732, 0x0000000000000000ULL, 0x64A5B23189ABCB8CULL }, /* XSUM_XXH3_testdata[3464] */\n    { 1732, 0x9E3779B185EBCA8DULL, 0x975A4B394E3570A6ULL }, /* XSUM_XXH3_testdata[3465] */\n    { 1733, 0x0000000000000000ULL, 0xDA3EBB58E0F0DA51ULL }, /* XSUM_XXH3_testdata[3466] */\n    { 1733, 0x9E3779B185EBCA8DULL, 0xCECBA4F5BDBA8B2AULL }, /* XSUM_XXH3_testdata[3467] */\n    { 1734, 0x0000000000000000ULL, 0xB7043A69655059E3ULL }, /* XSUM_XXH3_testdata[3468] */\n    { 1734, 0x9E3779B185EBCA8DULL, 0xAAD8EE22B3DE900FULL }, /* XSUM_XXH3_testdata[3469] */\n    { 1735, 0x0000000000000000ULL, 0xBECA2F499E761EB3ULL }, /* XSUM_XXH3_testdata[3470] */\n    { 1735, 0x9E3779B185EBCA8DULL, 0x8AE05D359FC8BB7CULL }, /* XSUM_XXH3_testdata[3471] */\n    { 1736, 0x0000000000000000ULL, 0xD9DC33599AFF2D43ULL }, /* XSUM_XXH3_testdata[3472] */\n    { 1736, 0x9E3779B185EBCA8DULL, 0x6CC9042D5E4EADDCULL }, /* XSUM_XXH3_testdata[3473] */\n    { 1737, 0x0000000000000000ULL, 0x7FFA441E5FAC309FULL }, /* XSUM_XXH3_testdata[3474] */\n    { 1737, 0x9E3779B185EBCA8DULL, 0x58ADA79F6B44D126ULL }, /* XSUM_XXH3_testdata[3475] */\n    { 1738, 0x0000000000000000ULL, 0x22CD0F38FB521217ULL }, /* XSUM_XXH3_testdata[3476] */\n    { 1738, 0x9E3779B185EBCA8DULL, 0x9738D4E754A33DA1ULL }, /* XSUM_XXH3_testdata[3477] */\n    { 1739, 0x0000000000000000ULL, 0x4A5A3B33E78E44D4ULL }, /* XSUM_XXH3_testdata[3478] */\n    { 1739, 0x9E3779B185EBCA8DULL, 0x422E0C601DCA7742ULL }, /* XSUM_XXH3_testdata[3479] */\n    { 1740, 0x0000000000000000ULL, 0xF03EB59E770E4CF9ULL }, /* XSUM_XXH3_testdata[3480] */\n    { 1740, 0x9E3779B185EBCA8DULL, 0x8229CD6F18DACC95ULL }, /* XSUM_XXH3_testdata[3481] */\n    { 1741, 0x0000000000000000ULL, 0xDBE3D19DE2B85FDBULL }, /* XSUM_XXH3_testdata[3482] */\n    { 1741, 0x9E3779B185EBCA8DULL, 0xE3BDD3ECB58B0EE4ULL }, /* XSUM_XXH3_testdata[3483] */\n    { 1742, 0x0000000000000000ULL, 0x7BDF6208541D8766ULL }, /* XSUM_XXH3_testdata[3484] */\n    { 1742, 0x9E3779B185EBCA8DULL, 0x724C23B0BCE23E84ULL }, /* XSUM_XXH3_testdata[3485] */\n    { 1743, 0x0000000000000000ULL, 0x06D1B3351E6AC466ULL }, /* XSUM_XXH3_testdata[3486] */\n    { 1743, 0x9E3779B185EBCA8DULL, 0xB46EF27E6A19B6A2ULL }, /* XSUM_XXH3_testdata[3487] */\n    { 1744, 0x0000000000000000ULL, 0xD4EDA665DC3A4B65ULL }, /* XSUM_XXH3_testdata[3488] */\n    { 1744, 0x9E3779B185EBCA8DULL, 0x630F4F4C2359C63EULL }, /* XSUM_XXH3_testdata[3489] */\n    { 1745, 0x0000000000000000ULL, 0xA108D968D8A4DDC9ULL }, /* XSUM_XXH3_testdata[3490] */\n    { 1745, 0x9E3779B185EBCA8DULL, 0x28D998B9855C3E18ULL }, /* XSUM_XXH3_testdata[3491] */\n    { 1746, 0x0000000000000000ULL, 0x4988F7F0BE937CAEULL }, /* XSUM_XXH3_testdata[3492] */\n    { 1746, 0x9E3779B185EBCA8DULL, 0xA48FD8C5BB2CD9E1ULL }, /* XSUM_XXH3_testdata[3493] */\n    { 1747, 0x0000000000000000ULL, 0xD6FB12FDB1622503ULL }, /* XSUM_XXH3_testdata[3494] */\n    { 1747, 0x9E3779B185EBCA8DULL, 0x81586448DE7D2F8CULL }, /* XSUM_XXH3_testdata[3495] */\n    { 1748, 0x0000000000000000ULL, 0x27D8CEF8702F3CFBULL }, /* XSUM_XXH3_testdata[3496] */\n    { 1748, 0x9E3779B185EBCA8DULL, 0x0B15BF0DC38C1EAEULL }, /* XSUM_XXH3_testdata[3497] */\n    { 1749, 0x0000000000000000ULL, 0xD155F7437A01C3E5ULL }, /* XSUM_XXH3_testdata[3498] */\n    { 1749, 0x9E3779B185EBCA8DULL, 0x6B86F11A836810B7ULL }, /* XSUM_XXH3_testdata[3499] */\n    { 1750, 0x0000000000000000ULL, 0xC8E020F2F9E8C469ULL }, /* XSUM_XXH3_testdata[3500] */\n    { 1750, 0x9E3779B185EBCA8DULL, 0x89557BC08A51F05CULL }, /* XSUM_XXH3_testdata[3501] */\n    { 1751, 0x0000000000000000ULL, 0x1A92033D8555F351ULL }, /* XSUM_XXH3_testdata[3502] */\n    { 1751, 0x9E3779B185EBCA8DULL, 0x37330043BC14621EULL }, /* XSUM_XXH3_testdata[3503] */\n    { 1752, 0x0000000000000000ULL, 0x96BBF5198F92D2E0ULL }, /* XSUM_XXH3_testdata[3504] */\n    { 1752, 0x9E3779B185EBCA8DULL, 0x915B3EE331B9EF6EULL }, /* XSUM_XXH3_testdata[3505] */\n    { 1753, 0x0000000000000000ULL, 0x8FEBB23093609094ULL }, /* XSUM_XXH3_testdata[3506] */\n    { 1753, 0x9E3779B185EBCA8DULL, 0x9D99AFB6EDDE01C3ULL }, /* XSUM_XXH3_testdata[3507] */\n    { 1754, 0x0000000000000000ULL, 0xB7EF3E6F6A42082CULL }, /* XSUM_XXH3_testdata[3508] */\n    { 1754, 0x9E3779B185EBCA8DULL, 0xC156FB0ED9A0B574ULL }, /* XSUM_XXH3_testdata[3509] */\n    { 1755, 0x0000000000000000ULL, 0x856CF1FF067B3ADEULL }, /* XSUM_XXH3_testdata[3510] */\n    { 1755, 0x9E3779B185EBCA8DULL, 0x7E059FB1914BD3FBULL }, /* XSUM_XXH3_testdata[3511] */\n    { 1756, 0x0000000000000000ULL, 0x3D1F07BED79EB024ULL }, /* XSUM_XXH3_testdata[3512] */\n    { 1756, 0x9E3779B185EBCA8DULL, 0x9E8C8B897181AEC9ULL }, /* XSUM_XXH3_testdata[3513] */\n    { 1757, 0x0000000000000000ULL, 0x6CECD5D2CD92708CULL }, /* XSUM_XXH3_testdata[3514] */\n    { 1757, 0x9E3779B185EBCA8DULL, 0x5545085298AA4C71ULL }, /* XSUM_XXH3_testdata[3515] */\n    { 1758, 0x0000000000000000ULL, 0x8E6BF225FD7F3FA1ULL }, /* XSUM_XXH3_testdata[3516] */\n    { 1758, 0x9E3779B185EBCA8DULL, 0xB486909C53F163B1ULL }, /* XSUM_XXH3_testdata[3517] */\n    { 1759, 0x0000000000000000ULL, 0x7BF5430C9E06389AULL }, /* XSUM_XXH3_testdata[3518] */\n    { 1759, 0x9E3779B185EBCA8DULL, 0x5AC6791A15235D18ULL }, /* XSUM_XXH3_testdata[3519] */\n    { 1760, 0x0000000000000000ULL, 0x49733C9DDE946FB4ULL }, /* XSUM_XXH3_testdata[3520] */\n    { 1760, 0x9E3779B185EBCA8DULL, 0x20D21AC0B3025E9BULL }, /* XSUM_XXH3_testdata[3521] */\n    { 1761, 0x0000000000000000ULL, 0x7BD8D88D0D402CC8ULL }, /* XSUM_XXH3_testdata[3522] */\n    { 1761, 0x9E3779B185EBCA8DULL, 0xCB34E8082EA11948ULL }, /* XSUM_XXH3_testdata[3523] */\n    { 1762, 0x0000000000000000ULL, 0xAAF2103EAD4F67DEULL }, /* XSUM_XXH3_testdata[3524] */\n    { 1762, 0x9E3779B185EBCA8DULL, 0x6D2C80A8A7B34A4AULL }, /* XSUM_XXH3_testdata[3525] */\n    { 1763, 0x0000000000000000ULL, 0xF64BA24F6F2C7671ULL }, /* XSUM_XXH3_testdata[3526] */\n    { 1763, 0x9E3779B185EBCA8DULL, 0xD98C1890DFE1418FULL }, /* XSUM_XXH3_testdata[3527] */\n    { 1764, 0x0000000000000000ULL, 0xA097BC4C9DC93D8FULL }, /* XSUM_XXH3_testdata[3528] */\n    { 1764, 0x9E3779B185EBCA8DULL, 0xF2C2AC304979B5A6ULL }, /* XSUM_XXH3_testdata[3529] */\n    { 1765, 0x0000000000000000ULL, 0x03E739F4A58A210EULL }, /* XSUM_XXH3_testdata[3530] */\n    { 1765, 0x9E3779B185EBCA8DULL, 0x149D280829B49700ULL }, /* XSUM_XXH3_testdata[3531] */\n    { 1766, 0x0000000000000000ULL, 0x2389D9082B242983ULL }, /* XSUM_XXH3_testdata[3532] */\n    { 1766, 0x9E3779B185EBCA8DULL, 0x602BBC51A33FC7AAULL }, /* XSUM_XXH3_testdata[3533] */\n    { 1767, 0x0000000000000000ULL, 0x4C19748B9519F6E5ULL }, /* XSUM_XXH3_testdata[3534] */\n    { 1767, 0x9E3779B185EBCA8DULL, 0xCDD26659C7C05FF5ULL }, /* XSUM_XXH3_testdata[3535] */\n    { 1768, 0x0000000000000000ULL, 0x872F5C85F902B2E6ULL }, /* XSUM_XXH3_testdata[3536] */\n    { 1768, 0x9E3779B185EBCA8DULL, 0x26AA174D954F2498ULL }, /* XSUM_XXH3_testdata[3537] */\n    { 1769, 0x0000000000000000ULL, 0xF04114F5FB2E7219ULL }, /* XSUM_XXH3_testdata[3538] */\n    { 1769, 0x9E3779B185EBCA8DULL, 0x3E59BF2B3D0CA878ULL }, /* XSUM_XXH3_testdata[3539] */\n    { 1770, 0x0000000000000000ULL, 0xDC493AD0E7E20665ULL }, /* XSUM_XXH3_testdata[3540] */\n    { 1770, 0x9E3779B185EBCA8DULL, 0x3800DC833B5C18B9ULL }, /* XSUM_XXH3_testdata[3541] */\n    { 1771, 0x0000000000000000ULL, 0x9113DF900D00D5CBULL }, /* XSUM_XXH3_testdata[3542] */\n    { 1771, 0x9E3779B185EBCA8DULL, 0xB279ED197A6809C4ULL }, /* XSUM_XXH3_testdata[3543] */\n    { 1772, 0x0000000000000000ULL, 0xBA3E2263E19706AAULL }, /* XSUM_XXH3_testdata[3544] */\n    { 1772, 0x9E3779B185EBCA8DULL, 0x4A94DFE3951D5816ULL }, /* XSUM_XXH3_testdata[3545] */\n    { 1773, 0x0000000000000000ULL, 0x005C77B9B80C4E8FULL }, /* XSUM_XXH3_testdata[3546] */\n    { 1773, 0x9E3779B185EBCA8DULL, 0x239B0A1EB5ECEB81ULL }, /* XSUM_XXH3_testdata[3547] */\n    { 1774, 0x0000000000000000ULL, 0x70B9E7F2520F30EEULL }, /* XSUM_XXH3_testdata[3548] */\n    { 1774, 0x9E3779B185EBCA8DULL, 0x55AE8F34701876CBULL }, /* XSUM_XXH3_testdata[3549] */\n    { 1775, 0x0000000000000000ULL, 0x4EC99C083B39FD2BULL }, /* XSUM_XXH3_testdata[3550] */\n    { 1775, 0x9E3779B185EBCA8DULL, 0x726C3C05200E1B87ULL }, /* XSUM_XXH3_testdata[3551] */\n    { 1776, 0x0000000000000000ULL, 0x346ACEAFA0F4C865ULL }, /* XSUM_XXH3_testdata[3552] */\n    { 1776, 0x9E3779B185EBCA8DULL, 0x8D64F6CEBB88E55BULL }, /* XSUM_XXH3_testdata[3553] */\n    { 1777, 0x0000000000000000ULL, 0xEEB0D93FC377A9B4ULL }, /* XSUM_XXH3_testdata[3554] */\n    { 1777, 0x9E3779B185EBCA8DULL, 0x446FADB53542D92EULL }, /* XSUM_XXH3_testdata[3555] */\n    { 1778, 0x0000000000000000ULL, 0x28545D09486B0EDEULL }, /* XSUM_XXH3_testdata[3556] */\n    { 1778, 0x9E3779B185EBCA8DULL, 0x3CA002D070E98821ULL }, /* XSUM_XXH3_testdata[3557] */\n    { 1779, 0x0000000000000000ULL, 0xF0CA94F97D50BBFEULL }, /* XSUM_XXH3_testdata[3558] */\n    { 1779, 0x9E3779B185EBCA8DULL, 0xF59AE48D6BDD5E0AULL }, /* XSUM_XXH3_testdata[3559] */\n    { 1780, 0x0000000000000000ULL, 0x1B418E8757E55B1CULL }, /* XSUM_XXH3_testdata[3560] */\n    { 1780, 0x9E3779B185EBCA8DULL, 0x02EAF2FA4ECE6DEEULL }, /* XSUM_XXH3_testdata[3561] */\n    { 1781, 0x0000000000000000ULL, 0x76EE9AAE93299118ULL }, /* XSUM_XXH3_testdata[3562] */\n    { 1781, 0x9E3779B185EBCA8DULL, 0xC7B9D76F32FDC14FULL }, /* XSUM_XXH3_testdata[3563] */\n    { 1782, 0x0000000000000000ULL, 0x30A587DC4F623029ULL }, /* XSUM_XXH3_testdata[3564] */\n    { 1782, 0x9E3779B185EBCA8DULL, 0x8C443094A526F96EULL }, /* XSUM_XXH3_testdata[3565] */\n    { 1783, 0x0000000000000000ULL, 0xC98D9F8922FE6D86ULL }, /* XSUM_XXH3_testdata[3566] */\n    { 1783, 0x9E3779B185EBCA8DULL, 0xD84F0298549F96D5ULL }, /* XSUM_XXH3_testdata[3567] */\n    { 1784, 0x0000000000000000ULL, 0xB605BE989491FC40ULL }, /* XSUM_XXH3_testdata[3568] */\n    { 1784, 0x9E3779B185EBCA8DULL, 0xC367EC49E1BF23F3ULL }, /* XSUM_XXH3_testdata[3569] */\n    { 1785, 0x0000000000000000ULL, 0x9D80AD9032C9486DULL }, /* XSUM_XXH3_testdata[3570] */\n    { 1785, 0x9E3779B185EBCA8DULL, 0xAED7D00BED5E8263ULL }, /* XSUM_XXH3_testdata[3571] */\n    { 1786, 0x0000000000000000ULL, 0x2124A0F278C2B392ULL }, /* XSUM_XXH3_testdata[3572] */\n    { 1786, 0x9E3779B185EBCA8DULL, 0x1E972898A06F3147ULL }, /* XSUM_XXH3_testdata[3573] */\n    { 1787, 0x0000000000000000ULL, 0x75E335BE40042A57ULL }, /* XSUM_XXH3_testdata[3574] */\n    { 1787, 0x9E3779B185EBCA8DULL, 0x8E60B89DCD3F45ECULL }, /* XSUM_XXH3_testdata[3575] */\n    { 1788, 0x0000000000000000ULL, 0x137D7CCB6D40ABE2ULL }, /* XSUM_XXH3_testdata[3576] */\n    { 1788, 0x9E3779B185EBCA8DULL, 0x227A5D232641DF7AULL }, /* XSUM_XXH3_testdata[3577] */\n    { 1789, 0x0000000000000000ULL, 0x0D7D2C85BC8340EAULL }, /* XSUM_XXH3_testdata[3578] */\n    { 1789, 0x9E3779B185EBCA8DULL, 0x2822DA21F08795C5ULL }, /* XSUM_XXH3_testdata[3579] */\n    { 1790, 0x0000000000000000ULL, 0x59082F65C4BE2301ULL }, /* XSUM_XXH3_testdata[3580] */\n    { 1790, 0x9E3779B185EBCA8DULL, 0x5B83834233EA8169ULL }, /* XSUM_XXH3_testdata[3581] */\n    { 1791, 0x0000000000000000ULL, 0x1CABC296AE13AFC9ULL }, /* XSUM_XXH3_testdata[3582] */\n    { 1791, 0x9E3779B185EBCA8DULL, 0x4337C8383334571BULL }, /* XSUM_XXH3_testdata[3583] */\n    { 1792, 0x0000000000000000ULL, 0x1600BFD22906D6D3ULL }, /* XSUM_XXH3_testdata[3584] */\n    { 1792, 0x9E3779B185EBCA8DULL, 0xE9D76D35B96143DBULL }, /* XSUM_XXH3_testdata[3585] */\n    { 1793, 0x0000000000000000ULL, 0x7442C5CFB64761CDULL }, /* XSUM_XXH3_testdata[3586] */\n    { 1793, 0x9E3779B185EBCA8DULL, 0x4DD3F5933ACDF470ULL }, /* XSUM_XXH3_testdata[3587] */\n    { 1794, 0x0000000000000000ULL, 0xB5CE87CEBA63C5D5ULL }, /* XSUM_XXH3_testdata[3588] */\n    { 1794, 0x9E3779B185EBCA8DULL, 0x1B6FDCDBF614B44CULL }, /* XSUM_XXH3_testdata[3589] */\n    { 1795, 0x0000000000000000ULL, 0x203458291AFCB92EULL }, /* XSUM_XXH3_testdata[3590] */\n    { 1795, 0x9E3779B185EBCA8DULL, 0x90E814F41CB31E27ULL }, /* XSUM_XXH3_testdata[3591] */\n    { 1796, 0x0000000000000000ULL, 0x6662DCB7A0C70C62ULL }, /* XSUM_XXH3_testdata[3592] */\n    { 1796, 0x9E3779B185EBCA8DULL, 0x11F227B612D8D3F1ULL }, /* XSUM_XXH3_testdata[3593] */\n    { 1797, 0x0000000000000000ULL, 0xE7CD93B7BBE19A89ULL }, /* XSUM_XXH3_testdata[3594] */\n    { 1797, 0x9E3779B185EBCA8DULL, 0x9DB0C9AF8CB16E95ULL }, /* XSUM_XXH3_testdata[3595] */\n    { 1798, 0x0000000000000000ULL, 0x4239EC2E79A4A17BULL }, /* XSUM_XXH3_testdata[3596] */\n    { 1798, 0x9E3779B185EBCA8DULL, 0x82622B15DE9DE4F4ULL }, /* XSUM_XXH3_testdata[3597] */\n    { 1799, 0x0000000000000000ULL, 0x19712A44419FBB0EULL }, /* XSUM_XXH3_testdata[3598] */\n    { 1799, 0x9E3779B185EBCA8DULL, 0x41AC7FC823CE85FEULL }, /* XSUM_XXH3_testdata[3599] */\n    { 1800, 0x0000000000000000ULL, 0x09138FDB0A328971ULL }, /* XSUM_XXH3_testdata[3600] */\n    { 1800, 0x9E3779B185EBCA8DULL, 0xBA962ED162D0CD51ULL }, /* XSUM_XXH3_testdata[3601] */\n    { 1801, 0x0000000000000000ULL, 0x60BB2E0AE238E080ULL }, /* XSUM_XXH3_testdata[3602] */\n    { 1801, 0x9E3779B185EBCA8DULL, 0xCF9D2A442939067AULL }, /* XSUM_XXH3_testdata[3603] */\n    { 1802, 0x0000000000000000ULL, 0x5C7BE39A4D166B11ULL }, /* XSUM_XXH3_testdata[3604] */\n    { 1802, 0x9E3779B185EBCA8DULL, 0xBE8B6B2210FE8928ULL }, /* XSUM_XXH3_testdata[3605] */\n    { 1803, 0x0000000000000000ULL, 0xA8112FDF1FE59564ULL }, /* XSUM_XXH3_testdata[3606] */\n    { 1803, 0x9E3779B185EBCA8DULL, 0xABDAAC610AC20E1AULL }, /* XSUM_XXH3_testdata[3607] */\n    { 1804, 0x0000000000000000ULL, 0xD3D8FF0B3F208BCBULL }, /* XSUM_XXH3_testdata[3608] */\n    { 1804, 0x9E3779B185EBCA8DULL, 0x2DD6D5156249E5FBULL }, /* XSUM_XXH3_testdata[3609] */\n    { 1805, 0x0000000000000000ULL, 0x055F42CC1C378003ULL }, /* XSUM_XXH3_testdata[3610] */\n    { 1805, 0x9E3779B185EBCA8DULL, 0x842ED122359E4A02ULL }, /* XSUM_XXH3_testdata[3611] */\n    { 1806, 0x0000000000000000ULL, 0xCD607DBA7AD99830ULL }, /* XSUM_XXH3_testdata[3612] */\n    { 1806, 0x9E3779B185EBCA8DULL, 0x9E68ED4EB7B5DA31ULL }, /* XSUM_XXH3_testdata[3613] */\n    { 1807, 0x0000000000000000ULL, 0x6F3CBAB3D64C7DC1ULL }, /* XSUM_XXH3_testdata[3614] */\n    { 1807, 0x9E3779B185EBCA8DULL, 0x6B29605C4425F727ULL }, /* XSUM_XXH3_testdata[3615] */\n    { 1808, 0x0000000000000000ULL, 0xD6C0644F3EE9057EULL }, /* XSUM_XXH3_testdata[3616] */\n    { 1808, 0x9E3779B185EBCA8DULL, 0x6095DA16E23ABCE7ULL }, /* XSUM_XXH3_testdata[3617] */\n    { 1809, 0x0000000000000000ULL, 0xCC323714241418F9ULL }, /* XSUM_XXH3_testdata[3618] */\n    { 1809, 0x9E3779B185EBCA8DULL, 0x08439A6E0F41E972ULL }, /* XSUM_XXH3_testdata[3619] */\n    { 1810, 0x0000000000000000ULL, 0xA2ADC107689E8EA8ULL }, /* XSUM_XXH3_testdata[3620] */\n    { 1810, 0x9E3779B185EBCA8DULL, 0xAD99623A0186EA0CULL }, /* XSUM_XXH3_testdata[3621] */\n    { 1811, 0x0000000000000000ULL, 0x906A2880DC1BF8BEULL }, /* XSUM_XXH3_testdata[3622] */\n    { 1811, 0x9E3779B185EBCA8DULL, 0x26B1549538E80D59ULL }, /* XSUM_XXH3_testdata[3623] */\n    { 1812, 0x0000000000000000ULL, 0xB668F76405AA3171ULL }, /* XSUM_XXH3_testdata[3624] */\n    { 1812, 0x9E3779B185EBCA8DULL, 0x029C0FD70CBE3722ULL }, /* XSUM_XXH3_testdata[3625] */\n    { 1813, 0x0000000000000000ULL, 0x4DDF364B72D57724ULL }, /* XSUM_XXH3_testdata[3626] */\n    { 1813, 0x9E3779B185EBCA8DULL, 0xD12A4F2EBF788B64ULL }, /* XSUM_XXH3_testdata[3627] */\n    { 1814, 0x0000000000000000ULL, 0x3ACCD4A8FC7EDB52ULL }, /* XSUM_XXH3_testdata[3628] */\n    { 1814, 0x9E3779B185EBCA8DULL, 0x56E573B5D8466C25ULL }, /* XSUM_XXH3_testdata[3629] */\n    { 1815, 0x0000000000000000ULL, 0x86BEA08138DF8496ULL }, /* XSUM_XXH3_testdata[3630] */\n    { 1815, 0x9E3779B185EBCA8DULL, 0x94F9EB73D3671373ULL }, /* XSUM_XXH3_testdata[3631] */\n    { 1816, 0x0000000000000000ULL, 0xEB9B23A4064CA4F1ULL }, /* XSUM_XXH3_testdata[3632] */\n    { 1816, 0x9E3779B185EBCA8DULL, 0xEB3591CFA85FBF19ULL }, /* XSUM_XXH3_testdata[3633] */\n    { 1817, 0x0000000000000000ULL, 0xA19C89C1644C79CDULL }, /* XSUM_XXH3_testdata[3634] */\n    { 1817, 0x9E3779B185EBCA8DULL, 0x097868EDA1665A24ULL }, /* XSUM_XXH3_testdata[3635] */\n    { 1818, 0x0000000000000000ULL, 0x874B6E4172150EEFULL }, /* XSUM_XXH3_testdata[3636] */\n    { 1818, 0x9E3779B185EBCA8DULL, 0x026DC926C3652C4EULL }, /* XSUM_XXH3_testdata[3637] */\n    { 1819, 0x0000000000000000ULL, 0x96812576E01F3B8CULL }, /* XSUM_XXH3_testdata[3638] */\n    { 1819, 0x9E3779B185EBCA8DULL, 0xA09C4E9F4F6B933EULL }, /* XSUM_XXH3_testdata[3639] */\n    { 1820, 0x0000000000000000ULL, 0xF4B08FFD3703291CULL }, /* XSUM_XXH3_testdata[3640] */\n    { 1820, 0x9E3779B185EBCA8DULL, 0xA84511296432A978ULL }, /* XSUM_XXH3_testdata[3641] */\n    { 1821, 0x0000000000000000ULL, 0x55161D50DBDC33B2ULL }, /* XSUM_XXH3_testdata[3642] */\n    { 1821, 0x9E3779B185EBCA8DULL, 0x089AA97A0461F0B9ULL }, /* XSUM_XXH3_testdata[3643] */\n    { 1822, 0x0000000000000000ULL, 0xF323F26709AD9FFEULL }, /* XSUM_XXH3_testdata[3644] */\n    { 1822, 0x9E3779B185EBCA8DULL, 0x7FB6FC17345F3C04ULL }, /* XSUM_XXH3_testdata[3645] */\n    { 1823, 0x0000000000000000ULL, 0x87F8777310FFB883ULL }, /* XSUM_XXH3_testdata[3646] */\n    { 1823, 0x9E3779B185EBCA8DULL, 0xD5AA462301EE9512ULL }, /* XSUM_XXH3_testdata[3647] */\n    { 1824, 0x0000000000000000ULL, 0x1F380E20231D0A25ULL }, /* XSUM_XXH3_testdata[3648] */\n    { 1824, 0x9E3779B185EBCA8DULL, 0xF4FA50A56CFEFC9DULL }, /* XSUM_XXH3_testdata[3649] */\n    { 1825, 0x0000000000000000ULL, 0xB3D9C2891C916519ULL }, /* XSUM_XXH3_testdata[3650] */\n    { 1825, 0x9E3779B185EBCA8DULL, 0x173D0678A2A672ECULL }, /* XSUM_XXH3_testdata[3651] */\n    { 1826, 0x0000000000000000ULL, 0x2125C4D653CF7620ULL }, /* XSUM_XXH3_testdata[3652] */\n    { 1826, 0x9E3779B185EBCA8DULL, 0x92A0B4B951D045E4ULL }, /* XSUM_XXH3_testdata[3653] */\n    { 1827, 0x0000000000000000ULL, 0x4C9DA977D414FE62ULL }, /* XSUM_XXH3_testdata[3654] */\n    { 1827, 0x9E3779B185EBCA8DULL, 0xEB7A8EAC6B438ACBULL }, /* XSUM_XXH3_testdata[3655] */\n    { 1828, 0x0000000000000000ULL, 0xE69D3DEAD3A1D13AULL }, /* XSUM_XXH3_testdata[3656] */\n    { 1828, 0x9E3779B185EBCA8DULL, 0x61D68F5DEF64FAE9ULL }, /* XSUM_XXH3_testdata[3657] */\n    { 1829, 0x0000000000000000ULL, 0xB60AD19AE1577634ULL }, /* XSUM_XXH3_testdata[3658] */\n    { 1829, 0x9E3779B185EBCA8DULL, 0x157BB6F64A0F8673ULL }, /* XSUM_XXH3_testdata[3659] */\n    { 1830, 0x0000000000000000ULL, 0x23F7D3D78C9541A1ULL }, /* XSUM_XXH3_testdata[3660] */\n    { 1830, 0x9E3779B185EBCA8DULL, 0x9AD85BDDCB257D60ULL }, /* XSUM_XXH3_testdata[3661] */\n    { 1831, 0x0000000000000000ULL, 0x847C49F72E712CA0ULL }, /* XSUM_XXH3_testdata[3662] */\n    { 1831, 0x9E3779B185EBCA8DULL, 0x21252068A044D273ULL }, /* XSUM_XXH3_testdata[3663] */\n    { 1832, 0x0000000000000000ULL, 0x7E8D288D7E0903F5ULL }, /* XSUM_XXH3_testdata[3664] */\n    { 1832, 0x9E3779B185EBCA8DULL, 0x52E4DFEE75669F66ULL }, /* XSUM_XXH3_testdata[3665] */\n    { 1833, 0x0000000000000000ULL, 0x5B5035E08D3F74D5ULL }, /* XSUM_XXH3_testdata[3666] */\n    { 1833, 0x9E3779B185EBCA8DULL, 0x0E0C589755838AC9ULL }, /* XSUM_XXH3_testdata[3667] */\n    { 1834, 0x0000000000000000ULL, 0xE445EAFCAE8B614AULL }, /* XSUM_XXH3_testdata[3668] */\n    { 1834, 0x9E3779B185EBCA8DULL, 0x95B44CB99239E72FULL }, /* XSUM_XXH3_testdata[3669] */\n    { 1835, 0x0000000000000000ULL, 0xC8C5C290B847E543ULL }, /* XSUM_XXH3_testdata[3670] */\n    { 1835, 0x9E3779B185EBCA8DULL, 0xA586269BB62C5529ULL }, /* XSUM_XXH3_testdata[3671] */\n    { 1836, 0x0000000000000000ULL, 0x422C3F03566DF5ECULL }, /* XSUM_XXH3_testdata[3672] */\n    { 1836, 0x9E3779B185EBCA8DULL, 0x89681B08FA4BE38BULL }, /* XSUM_XXH3_testdata[3673] */\n    { 1837, 0x0000000000000000ULL, 0x771B68394D919D8AULL }, /* XSUM_XXH3_testdata[3674] */\n    { 1837, 0x9E3779B185EBCA8DULL, 0x03C1D8F4A811E3DAULL }, /* XSUM_XXH3_testdata[3675] */\n    { 1838, 0x0000000000000000ULL, 0xF40433C00031EA14ULL }, /* XSUM_XXH3_testdata[3676] */\n    { 1838, 0x9E3779B185EBCA8DULL, 0xF4B53B2D1BB1D68BULL }, /* XSUM_XXH3_testdata[3677] */\n    { 1839, 0x0000000000000000ULL, 0xC9CC543789796BAAULL }, /* XSUM_XXH3_testdata[3678] */\n    { 1839, 0x9E3779B185EBCA8DULL, 0x7105D5BB6B8A528BULL }, /* XSUM_XXH3_testdata[3679] */\n    { 1840, 0x0000000000000000ULL, 0xF33AED1F8EFD7B58ULL }, /* XSUM_XXH3_testdata[3680] */\n    { 1840, 0x9E3779B185EBCA8DULL, 0xBE71CFF42EF4CFC8ULL }, /* XSUM_XXH3_testdata[3681] */\n    { 1841, 0x0000000000000000ULL, 0x28ADBCC8145E1508ULL }, /* XSUM_XXH3_testdata[3682] */\n    { 1841, 0x9E3779B185EBCA8DULL, 0x7E6E24EB1DADEDA6ULL }, /* XSUM_XXH3_testdata[3683] */\n    { 1842, 0x0000000000000000ULL, 0x002E212FC7B05498ULL }, /* XSUM_XXH3_testdata[3684] */\n    { 1842, 0x9E3779B185EBCA8DULL, 0x864A0B7A16D0DA18ULL }, /* XSUM_XXH3_testdata[3685] */\n    { 1843, 0x0000000000000000ULL, 0x6BC99F64CD6F41C8ULL }, /* XSUM_XXH3_testdata[3686] */\n    { 1843, 0x9E3779B185EBCA8DULL, 0xF2083C66596207F2ULL }, /* XSUM_XXH3_testdata[3687] */\n    { 1844, 0x0000000000000000ULL, 0x2AD9AF1C60BF6D09ULL }, /* XSUM_XXH3_testdata[3688] */\n    { 1844, 0x9E3779B185EBCA8DULL, 0xC652993AE2A03D4AULL }, /* XSUM_XXH3_testdata[3689] */\n    { 1845, 0x0000000000000000ULL, 0x5A8D3D6113045AE5ULL }, /* XSUM_XXH3_testdata[3690] */\n    { 1845, 0x9E3779B185EBCA8DULL, 0x1FD1717FD92B2C72ULL }, /* XSUM_XXH3_testdata[3691] */\n    { 1846, 0x0000000000000000ULL, 0xF067AA10F9E0D8B4ULL }, /* XSUM_XXH3_testdata[3692] */\n    { 1846, 0x9E3779B185EBCA8DULL, 0xFFDCFF68824087D2ULL }, /* XSUM_XXH3_testdata[3693] */\n    { 1847, 0x0000000000000000ULL, 0x772F594F5ABEF00BULL }, /* XSUM_XXH3_testdata[3694] */\n    { 1847, 0x9E3779B185EBCA8DULL, 0xA47B236BA4A955F9ULL }, /* XSUM_XXH3_testdata[3695] */\n    { 1848, 0x0000000000000000ULL, 0xA32FF4FEAC75EEE7ULL }, /* XSUM_XXH3_testdata[3696] */\n    { 1848, 0x9E3779B185EBCA8DULL, 0x8719FDF3277BADF9ULL }, /* XSUM_XXH3_testdata[3697] */\n    { 1849, 0x0000000000000000ULL, 0x899A02F04A493E0CULL }, /* XSUM_XXH3_testdata[3698] */\n    { 1849, 0x9E3779B185EBCA8DULL, 0x34E15C9E62826DFDULL }, /* XSUM_XXH3_testdata[3699] */\n    { 1850, 0x0000000000000000ULL, 0x5FCE4519F7BA538DULL }, /* XSUM_XXH3_testdata[3700] */\n    { 1850, 0x9E3779B185EBCA8DULL, 0x9AEEED50A300AE2BULL }, /* XSUM_XXH3_testdata[3701] */\n    { 1851, 0x0000000000000000ULL, 0x95E54665921E36CAULL }, /* XSUM_XXH3_testdata[3702] */\n    { 1851, 0x9E3779B185EBCA8DULL, 0xC815E5A3764647F5ULL }, /* XSUM_XXH3_testdata[3703] */\n    { 1852, 0x0000000000000000ULL, 0x43E506A9B7C094C0ULL }, /* XSUM_XXH3_testdata[3704] */\n    { 1852, 0x9E3779B185EBCA8DULL, 0xFBF266164EABEF0AULL }, /* XSUM_XXH3_testdata[3705] */\n    { 1853, 0x0000000000000000ULL, 0x2DB4211DD510E86EULL }, /* XSUM_XXH3_testdata[3706] */\n    { 1853, 0x9E3779B185EBCA8DULL, 0x2CEEB5600B4BCC1CULL }, /* XSUM_XXH3_testdata[3707] */\n    { 1854, 0x0000000000000000ULL, 0xB2CA6E3EE5C50494ULL }, /* XSUM_XXH3_testdata[3708] */\n    { 1854, 0x9E3779B185EBCA8DULL, 0xF15C1AD85681921DULL }, /* XSUM_XXH3_testdata[3709] */\n    { 1855, 0x0000000000000000ULL, 0x3DEB6C55F0891670ULL }, /* XSUM_XXH3_testdata[3710] */\n    { 1855, 0x9E3779B185EBCA8DULL, 0xA105D4D854F1E3D9ULL }, /* XSUM_XXH3_testdata[3711] */\n    { 1856, 0x0000000000000000ULL, 0x9FA7215524A44729ULL }, /* XSUM_XXH3_testdata[3712] */\n    { 1856, 0x9E3779B185EBCA8DULL, 0xB3B482DD93C605DCULL }, /* XSUM_XXH3_testdata[3713] */\n    { 1857, 0x0000000000000000ULL, 0xF9AA0C2B77C7B098ULL }, /* XSUM_XXH3_testdata[3714] */\n    { 1857, 0x9E3779B185EBCA8DULL, 0xA27D279C1F375EEBULL }, /* XSUM_XXH3_testdata[3715] */\n    { 1858, 0x0000000000000000ULL, 0xDD47A0E487120F5DULL }, /* XSUM_XXH3_testdata[3716] */\n    { 1858, 0x9E3779B185EBCA8DULL, 0x1478152E6CF1E737ULL }, /* XSUM_XXH3_testdata[3717] */\n    { 1859, 0x0000000000000000ULL, 0x67CBC7046EBC929DULL }, /* XSUM_XXH3_testdata[3718] */\n    { 1859, 0x9E3779B185EBCA8DULL, 0x1C83F3A23E47D4B9ULL }, /* XSUM_XXH3_testdata[3719] */\n    { 1860, 0x0000000000000000ULL, 0xA46136157CF8C9F9ULL }, /* XSUM_XXH3_testdata[3720] */\n    { 1860, 0x9E3779B185EBCA8DULL, 0xE48744287FB4D5C5ULL }, /* XSUM_XXH3_testdata[3721] */\n    { 1861, 0x0000000000000000ULL, 0xC129EE2298A73F50ULL }, /* XSUM_XXH3_testdata[3722] */\n    { 1861, 0x9E3779B185EBCA8DULL, 0xF262838AABBAD4DEULL }, /* XSUM_XXH3_testdata[3723] */\n    { 1862, 0x0000000000000000ULL, 0x189A180ED477ACCCULL }, /* XSUM_XXH3_testdata[3724] */\n    { 1862, 0x9E3779B185EBCA8DULL, 0xEAB7668F179E94B7ULL }, /* XSUM_XXH3_testdata[3725] */\n    { 1863, 0x0000000000000000ULL, 0xB83E7242C9564BC7ULL }, /* XSUM_XXH3_testdata[3726] */\n    { 1863, 0x9E3779B185EBCA8DULL, 0xFF76ED1FFA07DEDDULL }, /* XSUM_XXH3_testdata[3727] */\n    { 1864, 0x0000000000000000ULL, 0x7E9B57A9205CA6D9ULL }, /* XSUM_XXH3_testdata[3728] */\n    { 1864, 0x9E3779B185EBCA8DULL, 0x4B386CAB0DFAAA63ULL }, /* XSUM_XXH3_testdata[3729] */\n    { 1865, 0x0000000000000000ULL, 0x4F20A2A31D556868ULL }, /* XSUM_XXH3_testdata[3730] */\n    { 1865, 0x9E3779B185EBCA8DULL, 0x957575A3A566C448ULL }, /* XSUM_XXH3_testdata[3731] */\n    { 1866, 0x0000000000000000ULL, 0xB80B9FDE4CC5E09EULL }, /* XSUM_XXH3_testdata[3732] */\n    { 1866, 0x9E3779B185EBCA8DULL, 0x1926A559E960EEEBULL }, /* XSUM_XXH3_testdata[3733] */\n    { 1867, 0x0000000000000000ULL, 0xABE4CFBD11F4C967ULL }, /* XSUM_XXH3_testdata[3734] */\n    { 1867, 0x9E3779B185EBCA8DULL, 0x694405A422DA369BULL }, /* XSUM_XXH3_testdata[3735] */\n    { 1868, 0x0000000000000000ULL, 0x752F23F575A73F89ULL }, /* XSUM_XXH3_testdata[3736] */\n    { 1868, 0x9E3779B185EBCA8DULL, 0x60AD7DCD42AA4935ULL }, /* XSUM_XXH3_testdata[3737] */\n    { 1869, 0x0000000000000000ULL, 0xFE8DC867E8A911E3ULL }, /* XSUM_XXH3_testdata[3738] */\n    { 1869, 0x9E3779B185EBCA8DULL, 0xEF407DFF2E16475FULL }, /* XSUM_XXH3_testdata[3739] */\n    { 1870, 0x0000000000000000ULL, 0xF26A15D6413E94DFULL }, /* XSUM_XXH3_testdata[3740] */\n    { 1870, 0x9E3779B185EBCA8DULL, 0x98BB3A10DD853FA5ULL }, /* XSUM_XXH3_testdata[3741] */\n    { 1871, 0x0000000000000000ULL, 0xA703FFFF8195BEA8ULL }, /* XSUM_XXH3_testdata[3742] */\n    { 1871, 0x9E3779B185EBCA8DULL, 0x2EDFB2573E68AD84ULL }, /* XSUM_XXH3_testdata[3743] */\n    { 1872, 0x0000000000000000ULL, 0x766D01020C397240ULL }, /* XSUM_XXH3_testdata[3744] */\n    { 1872, 0x9E3779B185EBCA8DULL, 0x39B6B2DD5697BEE8ULL }, /* XSUM_XXH3_testdata[3745] */\n    { 1873, 0x0000000000000000ULL, 0x1AC1619971B93634ULL }, /* XSUM_XXH3_testdata[3746] */\n    { 1873, 0x9E3779B185EBCA8DULL, 0x4C0F85D7CBA25BC9ULL }, /* XSUM_XXH3_testdata[3747] */\n    { 1874, 0x0000000000000000ULL, 0x722BFE7BA7F0B4A5ULL }, /* XSUM_XXH3_testdata[3748] */\n    { 1874, 0x9E3779B185EBCA8DULL, 0x230BFCBD3C00DFD6ULL }, /* XSUM_XXH3_testdata[3749] */\n    { 1875, 0x0000000000000000ULL, 0xB5128F81C9D02F72ULL }, /* XSUM_XXH3_testdata[3750] */\n    { 1875, 0x9E3779B185EBCA8DULL, 0xC5597711385BC7BBULL }, /* XSUM_XXH3_testdata[3751] */\n    { 1876, 0x0000000000000000ULL, 0xEAA9648EDD03C318ULL }, /* XSUM_XXH3_testdata[3752] */\n    { 1876, 0x9E3779B185EBCA8DULL, 0xC3A99B3C5489E336ULL }, /* XSUM_XXH3_testdata[3753] */\n    { 1877, 0x0000000000000000ULL, 0xB0E510F8207273ADULL }, /* XSUM_XXH3_testdata[3754] */\n    { 1877, 0x9E3779B185EBCA8DULL, 0xD030F0F96F813BEBULL }, /* XSUM_XXH3_testdata[3755] */\n    { 1878, 0x0000000000000000ULL, 0x5E5576D46AF9C904ULL }, /* XSUM_XXH3_testdata[3756] */\n    { 1878, 0x9E3779B185EBCA8DULL, 0x17583BBF412503FCULL }, /* XSUM_XXH3_testdata[3757] */\n    { 1879, 0x0000000000000000ULL, 0x5EB81FCAEA965C85ULL }, /* XSUM_XXH3_testdata[3758] */\n    { 1879, 0x9E3779B185EBCA8DULL, 0xAA1BE1BD283937EAULL }, /* XSUM_XXH3_testdata[3759] */\n    { 1880, 0x0000000000000000ULL, 0xAA63CE3CA93376D2ULL }, /* XSUM_XXH3_testdata[3760] */\n    { 1880, 0x9E3779B185EBCA8DULL, 0x354CBFC83B83AB2EULL }, /* XSUM_XXH3_testdata[3761] */\n    { 1881, 0x0000000000000000ULL, 0x3431D6AFE9D6D74CULL }, /* XSUM_XXH3_testdata[3762] */\n    { 1881, 0x9E3779B185EBCA8DULL, 0x70BF6609A6D4A4D9ULL }, /* XSUM_XXH3_testdata[3763] */\n    { 1882, 0x0000000000000000ULL, 0x27999F5F999B61EEULL }, /* XSUM_XXH3_testdata[3764] */\n    { 1882, 0x9E3779B185EBCA8DULL, 0xD366661DF9D4BBC5ULL }, /* XSUM_XXH3_testdata[3765] */\n    { 1883, 0x0000000000000000ULL, 0x04953291B73FE8A9ULL }, /* XSUM_XXH3_testdata[3766] */\n    { 1883, 0x9E3779B185EBCA8DULL, 0x5C1C9106539ADEC1ULL }, /* XSUM_XXH3_testdata[3767] */\n    { 1884, 0x0000000000000000ULL, 0xDA9A634B3F4FD842ULL }, /* XSUM_XXH3_testdata[3768] */\n    { 1884, 0x9E3779B185EBCA8DULL, 0x785C24B03B223273ULL }, /* XSUM_XXH3_testdata[3769] */\n    { 1885, 0x0000000000000000ULL, 0x1E7707FB2259E2DFULL }, /* XSUM_XXH3_testdata[3770] */\n    { 1885, 0x9E3779B185EBCA8DULL, 0xA9E4A34986CBAA36ULL }, /* XSUM_XXH3_testdata[3771] */\n    { 1886, 0x0000000000000000ULL, 0x873AE950C9AE1884ULL }, /* XSUM_XXH3_testdata[3772] */\n    { 1886, 0x9E3779B185EBCA8DULL, 0x87813B855C1EABE6ULL }, /* XSUM_XXH3_testdata[3773] */\n    { 1887, 0x0000000000000000ULL, 0x2AE6F56A9E3BAC52ULL }, /* XSUM_XXH3_testdata[3774] */\n    { 1887, 0x9E3779B185EBCA8DULL, 0x58F979CE3AE3F648ULL }, /* XSUM_XXH3_testdata[3775] */\n    { 1888, 0x0000000000000000ULL, 0x00D3E57E5091E324ULL }, /* XSUM_XXH3_testdata[3776] */\n    { 1888, 0x9E3779B185EBCA8DULL, 0xF5F12441DF3AFC4EULL }, /* XSUM_XXH3_testdata[3777] */\n    { 1889, 0x0000000000000000ULL, 0x45E9E33D7423F328ULL }, /* XSUM_XXH3_testdata[3778] */\n    { 1889, 0x9E3779B185EBCA8DULL, 0x4D7D63CA388066DCULL }, /* XSUM_XXH3_testdata[3779] */\n    { 1890, 0x0000000000000000ULL, 0xCA83E06BECA16192ULL }, /* XSUM_XXH3_testdata[3780] */\n    { 1890, 0x9E3779B185EBCA8DULL, 0x924E356BE74971A7ULL }, /* XSUM_XXH3_testdata[3781] */\n    { 1891, 0x0000000000000000ULL, 0x368A8B7FC030C715ULL }, /* XSUM_XXH3_testdata[3782] */\n    { 1891, 0x9E3779B185EBCA8DULL, 0x2DE1521B82474633ULL }, /* XSUM_XXH3_testdata[3783] */\n    { 1892, 0x0000000000000000ULL, 0xE61A3B7031938F5DULL }, /* XSUM_XXH3_testdata[3784] */\n    { 1892, 0x9E3779B185EBCA8DULL, 0x6EB843F22F82EF19ULL }, /* XSUM_XXH3_testdata[3785] */\n    { 1893, 0x0000000000000000ULL, 0xD0C5FD191971A365ULL }, /* XSUM_XXH3_testdata[3786] */\n    { 1893, 0x9E3779B185EBCA8DULL, 0x4CD6C97E1F0F7FD8ULL }, /* XSUM_XXH3_testdata[3787] */\n    { 1894, 0x0000000000000000ULL, 0x09789EFF6ABA0913ULL }, /* XSUM_XXH3_testdata[3788] */\n    { 1894, 0x9E3779B185EBCA8DULL, 0x81F68FB173855297ULL }, /* XSUM_XXH3_testdata[3789] */\n    { 1895, 0x0000000000000000ULL, 0x5D2D99D528130792ULL }, /* XSUM_XXH3_testdata[3790] */\n    { 1895, 0x9E3779B185EBCA8DULL, 0xFC66260FD442A50DULL }, /* XSUM_XXH3_testdata[3791] */\n    { 1896, 0x0000000000000000ULL, 0x0896D937983ED0FFULL }, /* XSUM_XXH3_testdata[3792] */\n    { 1896, 0x9E3779B185EBCA8DULL, 0xF8EE063306B3A591ULL }, /* XSUM_XXH3_testdata[3793] */\n    { 1897, 0x0000000000000000ULL, 0x976FDED61A373B5FULL }, /* XSUM_XXH3_testdata[3794] */\n    { 1897, 0x9E3779B185EBCA8DULL, 0xC4D3803ECC16C1CFULL }, /* XSUM_XXH3_testdata[3795] */\n    { 1898, 0x0000000000000000ULL, 0xE434D792D95E6506ULL }, /* XSUM_XXH3_testdata[3796] */\n    { 1898, 0x9E3779B185EBCA8DULL, 0xA0A8262D8842A468ULL }, /* XSUM_XXH3_testdata[3797] */\n    { 1899, 0x0000000000000000ULL, 0x7F8A795DCCF902F9ULL }, /* XSUM_XXH3_testdata[3798] */\n    { 1899, 0x9E3779B185EBCA8DULL, 0x0FD59F584C5547BCULL }, /* XSUM_XXH3_testdata[3799] */\n    { 1900, 0x0000000000000000ULL, 0x3360ED3DE59C7D92ULL }, /* XSUM_XXH3_testdata[3800] */\n    { 1900, 0x9E3779B185EBCA8DULL, 0x7AA5BC6D3D07DCC3ULL }, /* XSUM_XXH3_testdata[3801] */\n    { 1901, 0x0000000000000000ULL, 0x919932A3369ADA54ULL }, /* XSUM_XXH3_testdata[3802] */\n    { 1901, 0x9E3779B185EBCA8DULL, 0x0458A2B338491AC8ULL }, /* XSUM_XXH3_testdata[3803] */\n    { 1902, 0x0000000000000000ULL, 0xB83B1B9968AEE18BULL }, /* XSUM_XXH3_testdata[3804] */\n    { 1902, 0x9E3779B185EBCA8DULL, 0x84DB804F3D99B348ULL }, /* XSUM_XXH3_testdata[3805] */\n    { 1903, 0x0000000000000000ULL, 0x0354BB280D4691CFULL }, /* XSUM_XXH3_testdata[3806] */\n    { 1903, 0x9E3779B185EBCA8DULL, 0x0FBA9E0F80E2FFCEULL }, /* XSUM_XXH3_testdata[3807] */\n    { 1904, 0x0000000000000000ULL, 0x9A4FAF3574E774C7ULL }, /* XSUM_XXH3_testdata[3808] */\n    { 1904, 0x9E3779B185EBCA8DULL, 0x5BBADF72D1AF73DDULL }, /* XSUM_XXH3_testdata[3809] */\n    { 1905, 0x0000000000000000ULL, 0xA0BE0F26F6859F41ULL }, /* XSUM_XXH3_testdata[3810] */\n    { 1905, 0x9E3779B185EBCA8DULL, 0xC3644C218B16EE74ULL }, /* XSUM_XXH3_testdata[3811] */\n    { 1906, 0x0000000000000000ULL, 0x835FE0870E1F50ACULL }, /* XSUM_XXH3_testdata[3812] */\n    { 1906, 0x9E3779B185EBCA8DULL, 0x12668D958327E17EULL }, /* XSUM_XXH3_testdata[3813] */\n    { 1907, 0x0000000000000000ULL, 0x14C1BDF6BF0838E7ULL }, /* XSUM_XXH3_testdata[3814] */\n    { 1907, 0x9E3779B185EBCA8DULL, 0x9808FA64F8C43DCCULL }, /* XSUM_XXH3_testdata[3815] */\n    { 1908, 0x0000000000000000ULL, 0x2777D49152560322ULL }, /* XSUM_XXH3_testdata[3816] */\n    { 1908, 0x9E3779B185EBCA8DULL, 0xF9D863CC2EAA8645ULL }, /* XSUM_XXH3_testdata[3817] */\n    { 1909, 0x0000000000000000ULL, 0xF3C16FACEAC5439BULL }, /* XSUM_XXH3_testdata[3818] */\n    { 1909, 0x9E3779B185EBCA8DULL, 0x97A1E6A6762D1DDBULL }, /* XSUM_XXH3_testdata[3819] */\n    { 1910, 0x0000000000000000ULL, 0x0A392BBC27FDBF98ULL }, /* XSUM_XXH3_testdata[3820] */\n    { 1910, 0x9E3779B185EBCA8DULL, 0x37C04E987336EDA6ULL }, /* XSUM_XXH3_testdata[3821] */\n    { 1911, 0x0000000000000000ULL, 0x3F6D662DCBC36DA0ULL }, /* XSUM_XXH3_testdata[3822] */\n    { 1911, 0x9E3779B185EBCA8DULL, 0x7099B12412BF2F7BULL }, /* XSUM_XXH3_testdata[3823] */\n    { 1912, 0x0000000000000000ULL, 0xB3DD8A6812F31E0CULL }, /* XSUM_XXH3_testdata[3824] */\n    { 1912, 0x9E3779B185EBCA8DULL, 0x2D13EB5B4D9B4FC8ULL }, /* XSUM_XXH3_testdata[3825] */\n    { 1913, 0x0000000000000000ULL, 0x37306315E558B82BULL }, /* XSUM_XXH3_testdata[3826] */\n    { 1913, 0x9E3779B185EBCA8DULL, 0x238A8982B9E8E871ULL }, /* XSUM_XXH3_testdata[3827] */\n    { 1914, 0x0000000000000000ULL, 0xAF3B2494587FDF48ULL }, /* XSUM_XXH3_testdata[3828] */\n    { 1914, 0x9E3779B185EBCA8DULL, 0x305D0629AD8F4388ULL }, /* XSUM_XXH3_testdata[3829] */\n    { 1915, 0x0000000000000000ULL, 0x865B3906323DA850ULL }, /* XSUM_XXH3_testdata[3830] */\n    { 1915, 0x9E3779B185EBCA8DULL, 0x4162EEA8EDBA1E21ULL }, /* XSUM_XXH3_testdata[3831] */\n    { 1916, 0x0000000000000000ULL, 0xBB0EB0C7C8E0D486ULL }, /* XSUM_XXH3_testdata[3832] */\n    { 1916, 0x9E3779B185EBCA8DULL, 0x350BA3C51E6C98A9ULL }, /* XSUM_XXH3_testdata[3833] */\n    { 1917, 0x0000000000000000ULL, 0x2FFE17BAF474B808ULL }, /* XSUM_XXH3_testdata[3834] */\n    { 1917, 0x9E3779B185EBCA8DULL, 0x1032DFBCE2ECE9CEULL }, /* XSUM_XXH3_testdata[3835] */\n    { 1918, 0x0000000000000000ULL, 0x2DDC81ACBC637995ULL }, /* XSUM_XXH3_testdata[3836] */\n    { 1918, 0x9E3779B185EBCA8DULL, 0xAF01E545CFF1AA6EULL }, /* XSUM_XXH3_testdata[3837] */\n    { 1919, 0x0000000000000000ULL, 0x9D7578BBBE43A0FBULL }, /* XSUM_XXH3_testdata[3838] */\n    { 1919, 0x9E3779B185EBCA8DULL, 0xCF9BB65DBDC2A633ULL }, /* XSUM_XXH3_testdata[3839] */\n    { 1920, 0x0000000000000000ULL, 0xA6E801F9E975D684ULL }, /* XSUM_XXH3_testdata[3840] */\n    { 1920, 0x9E3779B185EBCA8DULL, 0x8BBEE5F1AA06521EULL }, /* XSUM_XXH3_testdata[3841] */\n    { 1921, 0x0000000000000000ULL, 0x425BD2F47593A7DDULL }, /* XSUM_XXH3_testdata[3842] */\n    { 1921, 0x9E3779B185EBCA8DULL, 0x00D38A9FCCE4BDD8ULL }, /* XSUM_XXH3_testdata[3843] */\n    { 1922, 0x0000000000000000ULL, 0x7C712A084EA39B08ULL }, /* XSUM_XXH3_testdata[3844] */\n    { 1922, 0x9E3779B185EBCA8DULL, 0x9396761C649047ACULL }, /* XSUM_XXH3_testdata[3845] */\n    { 1923, 0x0000000000000000ULL, 0x7FADD2CCED07887AULL }, /* XSUM_XXH3_testdata[3846] */\n    { 1923, 0x9E3779B185EBCA8DULL, 0xA3C5D6FD9F5A6039ULL }, /* XSUM_XXH3_testdata[3847] */\n    { 1924, 0x0000000000000000ULL, 0x4D43B69CEF7F96E4ULL }, /* XSUM_XXH3_testdata[3848] */\n    { 1924, 0x9E3779B185EBCA8DULL, 0xC17248AE907D7638ULL }, /* XSUM_XXH3_testdata[3849] */\n    { 1925, 0x0000000000000000ULL, 0x9CF28859FABC409CULL }, /* XSUM_XXH3_testdata[3850] */\n    { 1925, 0x9E3779B185EBCA8DULL, 0x29BAE4393EC02830ULL }, /* XSUM_XXH3_testdata[3851] */\n    { 1926, 0x0000000000000000ULL, 0x87AE82A722CC651EULL }, /* XSUM_XXH3_testdata[3852] */\n    { 1926, 0x9E3779B185EBCA8DULL, 0x2D446AC4C7B2183CULL }, /* XSUM_XXH3_testdata[3853] */\n    { 1927, 0x0000000000000000ULL, 0x22864029998C8DCCULL }, /* XSUM_XXH3_testdata[3854] */\n    { 1927, 0x9E3779B185EBCA8DULL, 0xF6E995A376FDE0BFULL }, /* XSUM_XXH3_testdata[3855] */\n    { 1928, 0x0000000000000000ULL, 0x1297094001BEAB91ULL }, /* XSUM_XXH3_testdata[3856] */\n    { 1928, 0x9E3779B185EBCA8DULL, 0x995E4F3E2717100EULL }, /* XSUM_XXH3_testdata[3857] */\n    { 1929, 0x0000000000000000ULL, 0x11A056A3E27BF8DBULL }, /* XSUM_XXH3_testdata[3858] */\n    { 1929, 0x9E3779B185EBCA8DULL, 0xCDDE483316829F76ULL }, /* XSUM_XXH3_testdata[3859] */\n    { 1930, 0x0000000000000000ULL, 0x504734057003512DULL }, /* XSUM_XXH3_testdata[3860] */\n    { 1930, 0x9E3779B185EBCA8DULL, 0x490C42431DBE8CC8ULL }, /* XSUM_XXH3_testdata[3861] */\n    { 1931, 0x0000000000000000ULL, 0x1CB5E6EFAC6E4E63ULL }, /* XSUM_XXH3_testdata[3862] */\n    { 1931, 0x9E3779B185EBCA8DULL, 0xC2F750FABD205E94ULL }, /* XSUM_XXH3_testdata[3863] */\n    { 1932, 0x0000000000000000ULL, 0x6B7812A64BD91368ULL }, /* XSUM_XXH3_testdata[3864] */\n    { 1932, 0x9E3779B185EBCA8DULL, 0xC25F2743431082ECULL }, /* XSUM_XXH3_testdata[3865] */\n    { 1933, 0x0000000000000000ULL, 0xE1283D2931CD27EFULL }, /* XSUM_XXH3_testdata[3866] */\n    { 1933, 0x9E3779B185EBCA8DULL, 0x31F20A19301F485EULL }, /* XSUM_XXH3_testdata[3867] */\n    { 1934, 0x0000000000000000ULL, 0x640B44E7233CD7B5ULL }, /* XSUM_XXH3_testdata[3868] */\n    { 1934, 0x9E3779B185EBCA8DULL, 0x42C3703CE5E02828ULL }, /* XSUM_XXH3_testdata[3869] */\n    { 1935, 0x0000000000000000ULL, 0x7DCDD089C207F052ULL }, /* XSUM_XXH3_testdata[3870] */\n    { 1935, 0x9E3779B185EBCA8DULL, 0x97EB7CB9F13AE976ULL }, /* XSUM_XXH3_testdata[3871] */\n    { 1936, 0x0000000000000000ULL, 0xF3D245265FAA9991ULL }, /* XSUM_XXH3_testdata[3872] */\n    { 1936, 0x9E3779B185EBCA8DULL, 0x55FEE708A75B7E34ULL }, /* XSUM_XXH3_testdata[3873] */\n    { 1937, 0x0000000000000000ULL, 0xC239370CC5CE1B28ULL }, /* XSUM_XXH3_testdata[3874] */\n    { 1937, 0x9E3779B185EBCA8DULL, 0x73499D53BC365C32ULL }, /* XSUM_XXH3_testdata[3875] */\n    { 1938, 0x0000000000000000ULL, 0xE6FB9BEDD99FCF8DULL }, /* XSUM_XXH3_testdata[3876] */\n    { 1938, 0x9E3779B185EBCA8DULL, 0xE9DDE1CF171E8CD8ULL }, /* XSUM_XXH3_testdata[3877] */\n    { 1939, 0x0000000000000000ULL, 0x1E29637C57820A30ULL }, /* XSUM_XXH3_testdata[3878] */\n    { 1939, 0x9E3779B185EBCA8DULL, 0x8F40C42CF2E44B6CULL }, /* XSUM_XXH3_testdata[3879] */\n    { 1940, 0x0000000000000000ULL, 0xABF025831D6ED30EULL }, /* XSUM_XXH3_testdata[3880] */\n    { 1940, 0x9E3779B185EBCA8DULL, 0xCEF6FA8C19F861E4ULL }, /* XSUM_XXH3_testdata[3881] */\n    { 1941, 0x0000000000000000ULL, 0x282F14ADD9FEB282ULL }, /* XSUM_XXH3_testdata[3882] */\n    { 1941, 0x9E3779B185EBCA8DULL, 0x4017524529E35BD8ULL }, /* XSUM_XXH3_testdata[3883] */\n    { 1942, 0x0000000000000000ULL, 0x527F417340C0F012ULL }, /* XSUM_XXH3_testdata[3884] */\n    { 1942, 0x9E3779B185EBCA8DULL, 0xEB885704B63C9BBCULL }, /* XSUM_XXH3_testdata[3885] */\n    { 1943, 0x0000000000000000ULL, 0xB213031B62D44FF8ULL }, /* XSUM_XXH3_testdata[3886] */\n    { 1943, 0x9E3779B185EBCA8DULL, 0x47FB300EB53CF271ULL }, /* XSUM_XXH3_testdata[3887] */\n    { 1944, 0x0000000000000000ULL, 0x3DB7F3DAA5CF5975ULL }, /* XSUM_XXH3_testdata[3888] */\n    { 1944, 0x9E3779B185EBCA8DULL, 0x52E86537BAB05598ULL }, /* XSUM_XXH3_testdata[3889] */\n    { 1945, 0x0000000000000000ULL, 0x840658A5716284C9ULL }, /* XSUM_XXH3_testdata[3890] */\n    { 1945, 0x9E3779B185EBCA8DULL, 0x3CDB39929E37AA06ULL }, /* XSUM_XXH3_testdata[3891] */\n    { 1946, 0x0000000000000000ULL, 0xEB5F75B38181CF28ULL }, /* XSUM_XXH3_testdata[3892] */\n    { 1946, 0x9E3779B185EBCA8DULL, 0x356AD1AC369381DFULL }, /* XSUM_XXH3_testdata[3893] */\n    { 1947, 0x0000000000000000ULL, 0x2CB27006CF774852ULL }, /* XSUM_XXH3_testdata[3894] */\n    { 1947, 0x9E3779B185EBCA8DULL, 0x003C04ACA46EE27FULL }, /* XSUM_XXH3_testdata[3895] */\n    { 1948, 0x0000000000000000ULL, 0x03545653D2365723ULL }, /* XSUM_XXH3_testdata[3896] */\n    { 1948, 0x9E3779B185EBCA8DULL, 0xDC18F3AC5BC13200ULL }, /* XSUM_XXH3_testdata[3897] */\n    { 1949, 0x0000000000000000ULL, 0x9CF72BF218CFEC9BULL }, /* XSUM_XXH3_testdata[3898] */\n    { 1949, 0x9E3779B185EBCA8DULL, 0x276C49361D2E49D7ULL }, /* XSUM_XXH3_testdata[3899] */\n    { 1950, 0x0000000000000000ULL, 0x3B41F6C3526966F9ULL }, /* XSUM_XXH3_testdata[3900] */\n    { 1950, 0x9E3779B185EBCA8DULL, 0xEE511A62306A4A89ULL }, /* XSUM_XXH3_testdata[3901] */\n    { 1951, 0x0000000000000000ULL, 0xC4365505457F718CULL }, /* XSUM_XXH3_testdata[3902] */\n    { 1951, 0x9E3779B185EBCA8DULL, 0x5EC0F8F1B23D7D85ULL }, /* XSUM_XXH3_testdata[3903] */\n    { 1952, 0x0000000000000000ULL, 0x5DDB1030B7232D1FULL }, /* XSUM_XXH3_testdata[3904] */\n    { 1952, 0x9E3779B185EBCA8DULL, 0xA268820F12B866FAULL }, /* XSUM_XXH3_testdata[3905] */\n    { 1953, 0x0000000000000000ULL, 0x7FF90349002641B7ULL }, /* XSUM_XXH3_testdata[3906] */\n    { 1953, 0x9E3779B185EBCA8DULL, 0xEF06F23A1D869CDDULL }, /* XSUM_XXH3_testdata[3907] */\n    { 1954, 0x0000000000000000ULL, 0xC1558AF0C93D89CDULL }, /* XSUM_XXH3_testdata[3908] */\n    { 1954, 0x9E3779B185EBCA8DULL, 0xDE4FAB755C44BB20ULL }, /* XSUM_XXH3_testdata[3909] */\n    { 1955, 0x0000000000000000ULL, 0x3FDA69020153BEA9ULL }, /* XSUM_XXH3_testdata[3910] */\n    { 1955, 0x9E3779B185EBCA8DULL, 0x27B6372C52BC90C3ULL }, /* XSUM_XXH3_testdata[3911] */\n    { 1956, 0x0000000000000000ULL, 0x6E064C75A51650B1ULL }, /* XSUM_XXH3_testdata[3912] */\n    { 1956, 0x9E3779B185EBCA8DULL, 0xBEBB2584D460BD29ULL }, /* XSUM_XXH3_testdata[3913] */\n    { 1957, 0x0000000000000000ULL, 0xC366A7C357FFEF0BULL }, /* XSUM_XXH3_testdata[3914] */\n    { 1957, 0x9E3779B185EBCA8DULL, 0xB57E9DC331ED3EF3ULL }, /* XSUM_XXH3_testdata[3915] */\n    { 1958, 0x0000000000000000ULL, 0x8F06933F34934B99ULL }, /* XSUM_XXH3_testdata[3916] */\n    { 1958, 0x9E3779B185EBCA8DULL, 0x2E9B0E4BEA0FD06CULL }, /* XSUM_XXH3_testdata[3917] */\n    { 1959, 0x0000000000000000ULL, 0xF12971CE1F74C048ULL }, /* XSUM_XXH3_testdata[3918] */\n    { 1959, 0x9E3779B185EBCA8DULL, 0x0CC667CEB5F97FC8ULL }, /* XSUM_XXH3_testdata[3919] */\n    { 1960, 0x0000000000000000ULL, 0x004A99DC027F4F6AULL }, /* XSUM_XXH3_testdata[3920] */\n    { 1960, 0x9E3779B185EBCA8DULL, 0x77E9A7955331A07CULL }, /* XSUM_XXH3_testdata[3921] */\n    { 1961, 0x0000000000000000ULL, 0xFC9E3E034471B0B1ULL }, /* XSUM_XXH3_testdata[3922] */\n    { 1961, 0x9E3779B185EBCA8DULL, 0xEEB603E711A16ECFULL }, /* XSUM_XXH3_testdata[3923] */\n    { 1962, 0x0000000000000000ULL, 0xE15EAEB8E35FA693ULL }, /* XSUM_XXH3_testdata[3924] */\n    { 1962, 0x9E3779B185EBCA8DULL, 0x494F4A97DEB9DEC2ULL }, /* XSUM_XXH3_testdata[3925] */\n    { 1963, 0x0000000000000000ULL, 0x0520FEC1D624BD75ULL }, /* XSUM_XXH3_testdata[3926] */\n    { 1963, 0x9E3779B185EBCA8DULL, 0xF4FE41CC1C78E92EULL }, /* XSUM_XXH3_testdata[3927] */\n    { 1964, 0x0000000000000000ULL, 0x188EAA4B37E8886EULL }, /* XSUM_XXH3_testdata[3928] */\n    { 1964, 0x9E3779B185EBCA8DULL, 0xB25E366558EAAC28ULL }, /* XSUM_XXH3_testdata[3929] */\n    { 1965, 0x0000000000000000ULL, 0xEFF8375D71EA92D4ULL }, /* XSUM_XXH3_testdata[3930] */\n    { 1965, 0x9E3779B185EBCA8DULL, 0xE8F4D7DD66D4A35BULL }, /* XSUM_XXH3_testdata[3931] */\n    { 1966, 0x0000000000000000ULL, 0x368D2A130B64710FULL }, /* XSUM_XXH3_testdata[3932] */\n    { 1966, 0x9E3779B185EBCA8DULL, 0xBE0FA933D7FD6001ULL }, /* XSUM_XXH3_testdata[3933] */\n    { 1967, 0x0000000000000000ULL, 0xDE5E1FF7BF3E9F55ULL }, /* XSUM_XXH3_testdata[3934] */\n    { 1967, 0x9E3779B185EBCA8DULL, 0xD00C19EE6414778DULL }, /* XSUM_XXH3_testdata[3935] */\n    { 1968, 0x0000000000000000ULL, 0x27CD7EA8B820E3F8ULL }, /* XSUM_XXH3_testdata[3936] */\n    { 1968, 0x9E3779B185EBCA8DULL, 0x97EB78821BC00C9FULL }, /* XSUM_XXH3_testdata[3937] */\n    { 1969, 0x0000000000000000ULL, 0x3819844D9D7EA49BULL }, /* XSUM_XXH3_testdata[3938] */\n    { 1969, 0x9E3779B185EBCA8DULL, 0xE5F841A89A45610DULL }, /* XSUM_XXH3_testdata[3939] */\n    { 1970, 0x0000000000000000ULL, 0x113F378BABB8D222ULL }, /* XSUM_XXH3_testdata[3940] */\n    { 1970, 0x9E3779B185EBCA8DULL, 0xCF4641E5FF36CD1FULL }, /* XSUM_XXH3_testdata[3941] */\n    { 1971, 0x0000000000000000ULL, 0x9E48DB0D4CEC7023ULL }, /* XSUM_XXH3_testdata[3942] */\n    { 1971, 0x9E3779B185EBCA8DULL, 0x27DCBB1B5C554B88ULL }, /* XSUM_XXH3_testdata[3943] */\n    { 1972, 0x0000000000000000ULL, 0xDA2A9985D0E6AF05ULL }, /* XSUM_XXH3_testdata[3944] */\n    { 1972, 0x9E3779B185EBCA8DULL, 0x725D63AB0031FBD9ULL }, /* XSUM_XXH3_testdata[3945] */\n    { 1973, 0x0000000000000000ULL, 0x2FD8A1FADBE01596ULL }, /* XSUM_XXH3_testdata[3946] */\n    { 1973, 0x9E3779B185EBCA8DULL, 0x6FA07F9987D2ECDCULL }, /* XSUM_XXH3_testdata[3947] */\n    { 1974, 0x0000000000000000ULL, 0xD3A2F52B332A2A0BULL }, /* XSUM_XXH3_testdata[3948] */\n    { 1974, 0x9E3779B185EBCA8DULL, 0x76C832BF7344FCDEULL }, /* XSUM_XXH3_testdata[3949] */\n    { 1975, 0x0000000000000000ULL, 0xDC36A1336C937579ULL }, /* XSUM_XXH3_testdata[3950] */\n    { 1975, 0x9E3779B185EBCA8DULL, 0xD08CE0443333A2A7ULL }, /* XSUM_XXH3_testdata[3951] */\n    { 1976, 0x0000000000000000ULL, 0xAD661BDAC1B79FA4ULL }, /* XSUM_XXH3_testdata[3952] */\n    { 1976, 0x9E3779B185EBCA8DULL, 0x5B5A77C1083D92F2ULL }, /* XSUM_XXH3_testdata[3953] */\n    { 1977, 0x0000000000000000ULL, 0x1AE078E65B90BDC7ULL }, /* XSUM_XXH3_testdata[3954] */\n    { 1977, 0x9E3779B185EBCA8DULL, 0x8973E397727E94E8ULL }, /* XSUM_XXH3_testdata[3955] */\n    { 1978, 0x0000000000000000ULL, 0x2B0EF2DEBF6905C9ULL }, /* XSUM_XXH3_testdata[3956] */\n    { 1978, 0x9E3779B185EBCA8DULL, 0xD6E2399A90B12AACULL }, /* XSUM_XXH3_testdata[3957] */\n    { 1979, 0x0000000000000000ULL, 0x058D6790B1E8B641ULL }, /* XSUM_XXH3_testdata[3958] */\n    { 1979, 0x9E3779B185EBCA8DULL, 0x281131D3DABF1AF3ULL }, /* XSUM_XXH3_testdata[3959] */\n    { 1980, 0x0000000000000000ULL, 0x562B194F83DA7A62ULL }, /* XSUM_XXH3_testdata[3960] */\n    { 1980, 0x9E3779B185EBCA8DULL, 0xDCBA1086B2BB7606ULL }, /* XSUM_XXH3_testdata[3961] */\n    { 1981, 0x0000000000000000ULL, 0x07C8B39420943D33ULL }, /* XSUM_XXH3_testdata[3962] */\n    { 1981, 0x9E3779B185EBCA8DULL, 0x05694B9506E958BDULL }, /* XSUM_XXH3_testdata[3963] */\n    { 1982, 0x0000000000000000ULL, 0xC18F07D9E25725B9ULL }, /* XSUM_XXH3_testdata[3964] */\n    { 1982, 0x9E3779B185EBCA8DULL, 0xEB5734AF6F449CF3ULL }, /* XSUM_XXH3_testdata[3965] */\n    { 1983, 0x0000000000000000ULL, 0x5F9FA6455DED3D7DULL }, /* XSUM_XXH3_testdata[3966] */\n    { 1983, 0x9E3779B185EBCA8DULL, 0x3311F0370651A269ULL }, /* XSUM_XXH3_testdata[3967] */\n    { 1984, 0x0000000000000000ULL, 0x67F7098725D64EFBULL }, /* XSUM_XXH3_testdata[3968] */\n    { 1984, 0x9E3779B185EBCA8DULL, 0x9EA022F9495C6EAEULL }, /* XSUM_XXH3_testdata[3969] */\n    { 1985, 0x0000000000000000ULL, 0xD7E199EAF2C77E2FULL }, /* XSUM_XXH3_testdata[3970] */\n    { 1985, 0x9E3779B185EBCA8DULL, 0x8177A5B7825B3C18ULL }, /* XSUM_XXH3_testdata[3971] */\n    { 1986, 0x0000000000000000ULL, 0x1D8ED4C85F51E2B3ULL }, /* XSUM_XXH3_testdata[3972] */\n    { 1986, 0x9E3779B185EBCA8DULL, 0x6AA78118C3472702ULL }, /* XSUM_XXH3_testdata[3973] */\n    { 1987, 0x0000000000000000ULL, 0xEAF6F48977C9F687ULL }, /* XSUM_XXH3_testdata[3974] */\n    { 1987, 0x9E3779B185EBCA8DULL, 0x42FDED3727B7302EULL }, /* XSUM_XXH3_testdata[3975] */\n    { 1988, 0x0000000000000000ULL, 0x767F809C56CFAB14ULL }, /* XSUM_XXH3_testdata[3976] */\n    { 1988, 0x9E3779B185EBCA8DULL, 0xBDE437D976206DBCULL }, /* XSUM_XXH3_testdata[3977] */\n    { 1989, 0x0000000000000000ULL, 0x888CEFE06213FCA3ULL }, /* XSUM_XXH3_testdata[3978] */\n    { 1989, 0x9E3779B185EBCA8DULL, 0x41A2B968B085D690ULL }, /* XSUM_XXH3_testdata[3979] */\n    { 1990, 0x0000000000000000ULL, 0xB169E18197F5DC9EULL }, /* XSUM_XXH3_testdata[3980] */\n    { 1990, 0x9E3779B185EBCA8DULL, 0xEB63FBD3AE339EA3ULL }, /* XSUM_XXH3_testdata[3981] */\n    { 1991, 0x0000000000000000ULL, 0xFAD4E62400E73579ULL }, /* XSUM_XXH3_testdata[3982] */\n    { 1991, 0x9E3779B185EBCA8DULL, 0x16A527D69EE9489AULL }, /* XSUM_XXH3_testdata[3983] */\n    { 1992, 0x0000000000000000ULL, 0x1E827B8BA221E555ULL }, /* XSUM_XXH3_testdata[3984] */\n    { 1992, 0x9E3779B185EBCA8DULL, 0x1C31224954EAF715ULL }, /* XSUM_XXH3_testdata[3985] */\n    { 1993, 0x0000000000000000ULL, 0x87C424B6FF539845ULL }, /* XSUM_XXH3_testdata[3986] */\n    { 1993, 0x9E3779B185EBCA8DULL, 0xCCD894F35873EE67ULL }, /* XSUM_XXH3_testdata[3987] */\n    { 1994, 0x0000000000000000ULL, 0x94F1B7BA2BA62F72ULL }, /* XSUM_XXH3_testdata[3988] */\n    { 1994, 0x9E3779B185EBCA8DULL, 0x8E7A8E6E14BA57E6ULL }, /* XSUM_XXH3_testdata[3989] */\n    { 1995, 0x0000000000000000ULL, 0xE40874ED5070A9D2ULL }, /* XSUM_XXH3_testdata[3990] */\n    { 1995, 0x9E3779B185EBCA8DULL, 0x83D414781EB5C843ULL }, /* XSUM_XXH3_testdata[3991] */\n    { 1996, 0x0000000000000000ULL, 0xE66ECF80A62A9B4EULL }, /* XSUM_XXH3_testdata[3992] */\n    { 1996, 0x9E3779B185EBCA8DULL, 0xB6AD15FEDE29D715ULL }, /* XSUM_XXH3_testdata[3993] */\n    { 1997, 0x0000000000000000ULL, 0xC74E7760D7362526ULL }, /* XSUM_XXH3_testdata[3994] */\n    { 1997, 0x9E3779B185EBCA8DULL, 0xA860AEED4A0A0D52ULL }, /* XSUM_XXH3_testdata[3995] */\n    { 1998, 0x0000000000000000ULL, 0x13D55387CE54E1FFULL }, /* XSUM_XXH3_testdata[3996] */\n    { 1998, 0x9E3779B185EBCA8DULL, 0xE7956FF8D3AB8D98ULL }, /* XSUM_XXH3_testdata[3997] */\n    { 1999, 0x0000000000000000ULL, 0x7264D216CE954BC8ULL }, /* XSUM_XXH3_testdata[3998] */\n    { 1999, 0x9E3779B185EBCA8DULL, 0xAC51184AD530F754ULL }, /* XSUM_XXH3_testdata[3999] */\n    { 2000, 0x0000000000000000ULL, 0xCB004B57E2C68C3CULL }, /* XSUM_XXH3_testdata[4000] */\n    { 2000, 0x9E3779B185EBCA8DULL, 0xA42E90FB128E2048ULL }, /* XSUM_XXH3_testdata[4001] */\n    { 2001, 0x0000000000000000ULL, 0x1E1F42B1994C1879ULL }, /* XSUM_XXH3_testdata[4002] */\n    { 2001, 0x9E3779B185EBCA8DULL, 0x03DA0D7A9420CF61ULL }, /* XSUM_XXH3_testdata[4003] */\n    { 2002, 0x0000000000000000ULL, 0x664FA560D857B113ULL }, /* XSUM_XXH3_testdata[4004] */\n    { 2002, 0x9E3779B185EBCA8DULL, 0x05C79467E8C02D61ULL }, /* XSUM_XXH3_testdata[4005] */\n    { 2003, 0x0000000000000000ULL, 0xE079D54B05F58408ULL }, /* XSUM_XXH3_testdata[4006] */\n    { 2003, 0x9E3779B185EBCA8DULL, 0x834B08E509012644ULL }, /* XSUM_XXH3_testdata[4007] */\n    { 2004, 0x0000000000000000ULL, 0x52DF2A94AD538041ULL }, /* XSUM_XXH3_testdata[4008] */\n    { 2004, 0x9E3779B185EBCA8DULL, 0x504B2AA2E2217292ULL }, /* XSUM_XXH3_testdata[4009] */\n    { 2005, 0x0000000000000000ULL, 0x6AE5C974231CF0EBULL }, /* XSUM_XXH3_testdata[4010] */\n    { 2005, 0x9E3779B185EBCA8DULL, 0xEE5B63536540CCA8ULL }, /* XSUM_XXH3_testdata[4011] */\n    { 2006, 0x0000000000000000ULL, 0xB3D3F97A23341F2BULL }, /* XSUM_XXH3_testdata[4012] */\n    { 2006, 0x9E3779B185EBCA8DULL, 0x3539ACA03EA1E19FULL }, /* XSUM_XXH3_testdata[4013] */\n    { 2007, 0x0000000000000000ULL, 0x14496363E69C4C5BULL }, /* XSUM_XXH3_testdata[4014] */\n    { 2007, 0x9E3779B185EBCA8DULL, 0xC19C6F8FD60CCEFDULL }, /* XSUM_XXH3_testdata[4015] */\n    { 2008, 0x0000000000000000ULL, 0xFCCDF239ED44A88EULL }, /* XSUM_XXH3_testdata[4016] */\n    { 2008, 0x9E3779B185EBCA8DULL, 0x2EC7A1B0B82533F0ULL }, /* XSUM_XXH3_testdata[4017] */\n    { 2009, 0x0000000000000000ULL, 0x6876FDB5237590AFULL }, /* XSUM_XXH3_testdata[4018] */\n    { 2009, 0x9E3779B185EBCA8DULL, 0xC72D0F20062CCDB8ULL }, /* XSUM_XXH3_testdata[4019] */\n    { 2010, 0x0000000000000000ULL, 0xE2C785419211E98DULL }, /* XSUM_XXH3_testdata[4020] */\n    { 2010, 0x9E3779B185EBCA8DULL, 0x5622588346C1BC8BULL }, /* XSUM_XXH3_testdata[4021] */\n    { 2011, 0x0000000000000000ULL, 0xA3D767040F0D0661ULL }, /* XSUM_XXH3_testdata[4022] */\n    { 2011, 0x9E3779B185EBCA8DULL, 0xFCA2FA56B540FADBULL }, /* XSUM_XXH3_testdata[4023] */\n    { 2012, 0x0000000000000000ULL, 0xC049B2DC7838F936ULL }, /* XSUM_XXH3_testdata[4024] */\n    { 2012, 0x9E3779B185EBCA8DULL, 0x4CACB3E58EE6C22AULL }, /* XSUM_XXH3_testdata[4025] */\n    { 2013, 0x0000000000000000ULL, 0xB6E73B07D480F818ULL }, /* XSUM_XXH3_testdata[4026] */\n    { 2013, 0x9E3779B185EBCA8DULL, 0xFD34BCF6A3482135ULL }, /* XSUM_XXH3_testdata[4027] */\n    { 2014, 0x0000000000000000ULL, 0x8A3B04C52FC9AA23ULL }, /* XSUM_XXH3_testdata[4028] */\n    { 2014, 0x9E3779B185EBCA8DULL, 0x8139A1C6391CE7E2ULL }, /* XSUM_XXH3_testdata[4029] */\n    { 2015, 0x0000000000000000ULL, 0x1A239D5BD68C460FULL }, /* XSUM_XXH3_testdata[4030] */\n    { 2015, 0x9E3779B185EBCA8DULL, 0xF9F0BC793F9ECFE2ULL }, /* XSUM_XXH3_testdata[4031] */\n    { 2016, 0x0000000000000000ULL, 0x534519D72E407E0CULL }, /* XSUM_XXH3_testdata[4032] */\n    { 2016, 0x9E3779B185EBCA8DULL, 0x725AE54533395887ULL }, /* XSUM_XXH3_testdata[4033] */\n    { 2017, 0x0000000000000000ULL, 0xDAA50B3EA23ADC34ULL }, /* XSUM_XXH3_testdata[4034] */\n    { 2017, 0x9E3779B185EBCA8DULL, 0x40530C9B13FBD31BULL }, /* XSUM_XXH3_testdata[4035] */\n    { 2018, 0x0000000000000000ULL, 0x39D77B2F9DF4CE40ULL }, /* XSUM_XXH3_testdata[4036] */\n    { 2018, 0x9E3779B185EBCA8DULL, 0x31F74B0ADE0693F0ULL }, /* XSUM_XXH3_testdata[4037] */\n    { 2019, 0x0000000000000000ULL, 0x413C806DA2DF48BAULL }, /* XSUM_XXH3_testdata[4038] */\n    { 2019, 0x9E3779B185EBCA8DULL, 0x5C2BADA6E6CBBE9FULL }, /* XSUM_XXH3_testdata[4039] */\n    { 2020, 0x0000000000000000ULL, 0x275A4C696DF53E8AULL }, /* XSUM_XXH3_testdata[4040] */\n    { 2020, 0x9E3779B185EBCA8DULL, 0x28B2677EB66CA5B4ULL }, /* XSUM_XXH3_testdata[4041] */\n    { 2021, 0x0000000000000000ULL, 0x8959B2E089954F49ULL }, /* XSUM_XXH3_testdata[4042] */\n    { 2021, 0x9E3779B185EBCA8DULL, 0xBD19EE9F34E838FBULL }, /* XSUM_XXH3_testdata[4043] */\n    { 2022, 0x0000000000000000ULL, 0x88DEE9BC3FDE452FULL }, /* XSUM_XXH3_testdata[4044] */\n    { 2022, 0x9E3779B185EBCA8DULL, 0x9646A86F11CBB0FEULL }, /* XSUM_XXH3_testdata[4045] */\n    { 2023, 0x0000000000000000ULL, 0xB8F94EB2217B0BEFULL }, /* XSUM_XXH3_testdata[4046] */\n    { 2023, 0x9E3779B185EBCA8DULL, 0xC13EC440EB36532DULL }, /* XSUM_XXH3_testdata[4047] */\n    { 2024, 0x0000000000000000ULL, 0x558CD9D489374445ULL }, /* XSUM_XXH3_testdata[4048] */\n    { 2024, 0x9E3779B185EBCA8DULL, 0xC709BAD6A00BD0A6ULL }, /* XSUM_XXH3_testdata[4049] */\n    { 2025, 0x0000000000000000ULL, 0x4A1BE4E9C58D67B0ULL }, /* XSUM_XXH3_testdata[4050] */\n    { 2025, 0x9E3779B185EBCA8DULL, 0xE712E350253C4F20ULL }, /* XSUM_XXH3_testdata[4051] */\n    { 2026, 0x0000000000000000ULL, 0xD60CDF85EB17A41DULL }, /* XSUM_XXH3_testdata[4052] */\n    { 2026, 0x9E3779B185EBCA8DULL, 0x8BD9EC91AEC9506CULL }, /* XSUM_XXH3_testdata[4053] */\n    { 2027, 0x0000000000000000ULL, 0x34030D2C2BD3620EULL }, /* XSUM_XXH3_testdata[4054] */\n    { 2027, 0x9E3779B185EBCA8DULL, 0x1E6AADC5ACC59368ULL }, /* XSUM_XXH3_testdata[4055] */\n    { 2028, 0x0000000000000000ULL, 0x0482AD00A9BEA4DFULL }, /* XSUM_XXH3_testdata[4056] */\n    { 2028, 0x9E3779B185EBCA8DULL, 0x64B42B215687F156ULL }, /* XSUM_XXH3_testdata[4057] */\n    { 2029, 0x0000000000000000ULL, 0x43F8BAF5DCE60762ULL }, /* XSUM_XXH3_testdata[4058] */\n    { 2029, 0x9E3779B185EBCA8DULL, 0x3076B5F774B774ABULL }, /* XSUM_XXH3_testdata[4059] */\n    { 2030, 0x0000000000000000ULL, 0x7F3A75C5F47372BFULL }, /* XSUM_XXH3_testdata[4060] */\n    { 2030, 0x9E3779B185EBCA8DULL, 0xA41F7DE911B9388DULL }, /* XSUM_XXH3_testdata[4061] */\n    { 2031, 0x0000000000000000ULL, 0x0F07C63F0A64FB6BULL }, /* XSUM_XXH3_testdata[4062] */\n    { 2031, 0x9E3779B185EBCA8DULL, 0xD7AA163A998F94FFULL }, /* XSUM_XXH3_testdata[4063] */\n    { 2032, 0x0000000000000000ULL, 0x730334D88E3E042EULL }, /* XSUM_XXH3_testdata[4064] */\n    { 2032, 0x9E3779B185EBCA8DULL, 0x43E3404431F6B57BULL }, /* XSUM_XXH3_testdata[4065] */\n    { 2033, 0x0000000000000000ULL, 0x820AB0168AD91F9CULL }, /* XSUM_XXH3_testdata[4066] */\n    { 2033, 0x9E3779B185EBCA8DULL, 0xA2FA5B655AC4CF82ULL }, /* XSUM_XXH3_testdata[4067] */\n    { 2034, 0x0000000000000000ULL, 0x5983231050374BE5ULL }, /* XSUM_XXH3_testdata[4068] */\n    { 2034, 0x9E3779B185EBCA8DULL, 0x463BA881AF792E27ULL }, /* XSUM_XXH3_testdata[4069] */\n    { 2035, 0x0000000000000000ULL, 0x64138A1310FB44C1ULL }, /* XSUM_XXH3_testdata[4070] */\n    { 2035, 0x9E3779B185EBCA8DULL, 0xC567DEEA44BB2339ULL }, /* XSUM_XXH3_testdata[4071] */\n    { 2036, 0x0000000000000000ULL, 0xED8983739724FB6DULL }, /* XSUM_XXH3_testdata[4072] */\n    { 2036, 0x9E3779B185EBCA8DULL, 0x01E77A05708AFEB9ULL }, /* XSUM_XXH3_testdata[4073] */\n    { 2037, 0x0000000000000000ULL, 0x92054F5E50441F45ULL }, /* XSUM_XXH3_testdata[4074] */\n    { 2037, 0x9E3779B185EBCA8DULL, 0x434B0B08AFC1ECF6ULL }, /* XSUM_XXH3_testdata[4075] */\n    { 2038, 0x0000000000000000ULL, 0xE87C4A31666DD254ULL }, /* XSUM_XXH3_testdata[4076] */\n    { 2038, 0x9E3779B185EBCA8DULL, 0x732C503DE5D66BFAULL }, /* XSUM_XXH3_testdata[4077] */\n    { 2039, 0x0000000000000000ULL, 0x4977DEF98DA8CDDBULL }, /* XSUM_XXH3_testdata[4078] */\n    { 2039, 0x9E3779B185EBCA8DULL, 0x39AB97AAA1B56323ULL }, /* XSUM_XXH3_testdata[4079] */\n    { 2040, 0x0000000000000000ULL, 0xEEF5DBB6649AA0E3ULL }, /* XSUM_XXH3_testdata[4080] */\n    { 2040, 0x9E3779B185EBCA8DULL, 0x836669341AF0DB7EULL }, /* XSUM_XXH3_testdata[4081] */\n    { 2041, 0x0000000000000000ULL, 0x08D6503AD6329A06ULL }, /* XSUM_XXH3_testdata[4082] */\n    { 2041, 0x9E3779B185EBCA8DULL, 0xEF60C7E28ECDCFD8ULL }, /* XSUM_XXH3_testdata[4083] */\n    { 2042, 0x0000000000000000ULL, 0xEF868C71CFEB56FEULL }, /* XSUM_XXH3_testdata[4084] */\n    { 2042, 0x9E3779B185EBCA8DULL, 0xE0D951BBF943A865ULL }, /* XSUM_XXH3_testdata[4085] */\n    { 2043, 0x0000000000000000ULL, 0x8E1FE7164D991205ULL }, /* XSUM_XXH3_testdata[4086] */\n    { 2043, 0x9E3779B185EBCA8DULL, 0x4E4FCF6E540BD98CULL }, /* XSUM_XXH3_testdata[4087] */\n    { 2044, 0x0000000000000000ULL, 0x430EDA1712B71273ULL }, /* XSUM_XXH3_testdata[4088] */\n    { 2044, 0x9E3779B185EBCA8DULL, 0xD5CB570B453EA1EEULL }, /* XSUM_XXH3_testdata[4089] */\n    { 2045, 0x0000000000000000ULL, 0x0AC7FFEC88CB2C74ULL }, /* XSUM_XXH3_testdata[4090] */\n    { 2045, 0x9E3779B185EBCA8DULL, 0x826B102E8728882AULL }, /* XSUM_XXH3_testdata[4091] */\n    { 2046, 0x0000000000000000ULL, 0x2FCD8606F9959DEDULL }, /* XSUM_XXH3_testdata[4092] */\n    { 2046, 0x9E3779B185EBCA8DULL, 0x251CA99F31B16336ULL }, /* XSUM_XXH3_testdata[4093] */\n    { 2047, 0x0000000000000000ULL, 0xB36ECE19FCA2197FULL }, /* XSUM_XXH3_testdata[4094] */\n    { 2047, 0x9E3779B185EBCA8DULL, 0x8111BB82842ED0AEULL }, /* XSUM_XXH3_testdata[4095] */\n    { 2048, 0x0000000000000000ULL, 0xDD59E2C3A5F038E0ULL }, /* XSUM_XXH3_testdata[4096] */\n    { 2048, 0x9E3779B185EBCA8DULL, 0x66F81670669ABABCULL }, /* XSUM_XXH3_testdata[4097] */\n    { 2049, 0x0000000000000000ULL, 0xD3AFA4329779B921ULL }, /* XSUM_XXH3_testdata[4098] */\n    { 2049, 0x9E3779B185EBCA8DULL, 0xE48083836CD58024ULL }, /* XSUM_XXH3_testdata[4099] */\n    { 2050, 0x0000000000000000ULL, 0x0532360C2902A5BDULL }, /* XSUM_XXH3_testdata[4100] */\n    { 2050, 0x9E3779B185EBCA8DULL, 0x662EC20AC24778FAULL }, /* XSUM_XXH3_testdata[4101] */\n    { 2051, 0x0000000000000000ULL, 0xE62F2E2BF20AAAC7ULL }, /* XSUM_XXH3_testdata[4102] */\n    { 2051, 0x9E3779B185EBCA8DULL, 0x243368F8E121EE9CULL }, /* XSUM_XXH3_testdata[4103] */\n    { 2052, 0x0000000000000000ULL, 0x77E97B48DFD9C3A4ULL }, /* XSUM_XXH3_testdata[4104] */\n    { 2052, 0x9E3779B185EBCA8DULL, 0x1383D08E9F71026CULL }, /* XSUM_XXH3_testdata[4105] */\n    { 2053, 0x0000000000000000ULL, 0x76A13FAD4EE49BB6ULL }, /* XSUM_XXH3_testdata[4106] */\n    { 2053, 0x9E3779B185EBCA8DULL, 0x7D4B20F87FB1D4C6ULL }, /* XSUM_XXH3_testdata[4107] */\n    { 2054, 0x0000000000000000ULL, 0xDFA75E9C69C94236ULL }, /* XSUM_XXH3_testdata[4108] */\n    { 2054, 0x9E3779B185EBCA8DULL, 0x4BAEE244F77B4556ULL }, /* XSUM_XXH3_testdata[4109] */\n    { 2055, 0x0000000000000000ULL, 0x78F2A62C67FCE789ULL }, /* XSUM_XXH3_testdata[4110] */\n    { 2055, 0x9E3779B185EBCA8DULL, 0x00C87FA2B31D9A7EULL }, /* XSUM_XXH3_testdata[4111] */\n    { 2056, 0x0000000000000000ULL, 0x85673DCE828BB176ULL }, /* XSUM_XXH3_testdata[4112] */\n    { 2056, 0x9E3779B185EBCA8DULL, 0x639BBCB43B120051ULL }, /* XSUM_XXH3_testdata[4113] */\n    { 2057, 0x0000000000000000ULL, 0x5603E2339F4F826EULL }, /* XSUM_XXH3_testdata[4114] */\n    { 2057, 0x9E3779B185EBCA8DULL, 0x3EE81E2EEDA78865ULL }, /* XSUM_XXH3_testdata[4115] */\n    { 2058, 0x0000000000000000ULL, 0x8B79E2C538071EE1ULL }, /* XSUM_XXH3_testdata[4116] */\n    { 2058, 0x9E3779B185EBCA8DULL, 0x45D764AEA3909E3CULL }, /* XSUM_XXH3_testdata[4117] */\n    { 2059, 0x0000000000000000ULL, 0x029818F64365392BULL }, /* XSUM_XXH3_testdata[4118] */\n    { 2059, 0x9E3779B185EBCA8DULL, 0xB3DB05F5273BE806ULL }, /* XSUM_XXH3_testdata[4119] */\n    { 2060, 0x0000000000000000ULL, 0xD839C817BB6637E6ULL }, /* XSUM_XXH3_testdata[4120] */\n    { 2060, 0x9E3779B185EBCA8DULL, 0x0A5E09622DA857AAULL }, /* XSUM_XXH3_testdata[4121] */\n    { 2061, 0x0000000000000000ULL, 0x4FD8B89CE6A4728AULL }, /* XSUM_XXH3_testdata[4122] */\n    { 2061, 0x9E3779B185EBCA8DULL, 0xCE450DDB8CB7585EULL }, /* XSUM_XXH3_testdata[4123] */\n    { 2062, 0x0000000000000000ULL, 0xB8FB834F453F1CA4ULL }, /* XSUM_XXH3_testdata[4124] */\n    { 2062, 0x9E3779B185EBCA8DULL, 0x800978E7099890B7ULL }, /* XSUM_XXH3_testdata[4125] */\n    { 2063, 0x0000000000000000ULL, 0xA17842CF3E1F5965ULL }, /* XSUM_XXH3_testdata[4126] */\n    { 2063, 0x9E3779B185EBCA8DULL, 0xA62021E903E62AFEULL }, /* XSUM_XXH3_testdata[4127] */\n    { 2064, 0x0000000000000000ULL, 0x8F49404347CC5423ULL }, /* XSUM_XXH3_testdata[4128] */\n    { 2064, 0x9E3779B185EBCA8DULL, 0x7331ED58FB0DA04BULL }, /* XSUM_XXH3_testdata[4129] */\n    { 2065, 0x0000000000000000ULL, 0x9B78591A9560D69FULL }, /* XSUM_XXH3_testdata[4130] */\n    { 2065, 0x9E3779B185EBCA8DULL, 0xD2E52479743D758DULL }, /* XSUM_XXH3_testdata[4131] */\n    { 2066, 0x0000000000000000ULL, 0x7D91DCA73A96F9ADULL }, /* XSUM_XXH3_testdata[4132] */\n    { 2066, 0x9E3779B185EBCA8DULL, 0x73C5BE19951D450FULL }, /* XSUM_XXH3_testdata[4133] */\n    { 2067, 0x0000000000000000ULL, 0x093A7A97CB2C0C8BULL }, /* XSUM_XXH3_testdata[4134] */\n    { 2067, 0x9E3779B185EBCA8DULL, 0x81DF286213071C56ULL }, /* XSUM_XXH3_testdata[4135] */\n    { 2068, 0x0000000000000000ULL, 0xAA0061F7D290C673ULL }, /* XSUM_XXH3_testdata[4136] */\n    { 2068, 0x9E3779B185EBCA8DULL, 0xD7E52F51A9FA96A3ULL }, /* XSUM_XXH3_testdata[4137] */\n    { 2069, 0x0000000000000000ULL, 0x19FDD32DE4083EE9ULL }, /* XSUM_XXH3_testdata[4138] */\n    { 2069, 0x9E3779B185EBCA8DULL, 0xD5747C100812CFC0ULL }, /* XSUM_XXH3_testdata[4139] */\n    { 2070, 0x0000000000000000ULL, 0x40DB06A00B5816C3ULL }, /* XSUM_XXH3_testdata[4140] */\n    { 2070, 0x9E3779B185EBCA8DULL, 0x9B3B101D222A4784ULL }, /* XSUM_XXH3_testdata[4141] */\n    { 2071, 0x0000000000000000ULL, 0xA6C20034362C665CULL }, /* XSUM_XXH3_testdata[4142] */\n    { 2071, 0x9E3779B185EBCA8DULL, 0x81C4A52B28BBCF84ULL }, /* XSUM_XXH3_testdata[4143] */\n    { 2072, 0x0000000000000000ULL, 0xBC3968C3659D703AULL }, /* XSUM_XXH3_testdata[4144] */\n    { 2072, 0x9E3779B185EBCA8DULL, 0xC0C0889D17F84BBBULL }, /* XSUM_XXH3_testdata[4145] */\n    { 2073, 0x0000000000000000ULL, 0x80472139673A5CD7ULL }, /* XSUM_XXH3_testdata[4146] */\n    { 2073, 0x9E3779B185EBCA8DULL, 0x3F97DB063DA7BEE4ULL }, /* XSUM_XXH3_testdata[4147] */\n    { 2074, 0x0000000000000000ULL, 0xFD34D0DA49DA6D7DULL }, /* XSUM_XXH3_testdata[4148] */\n    { 2074, 0x9E3779B185EBCA8DULL, 0x3E68AD6D11319979ULL }, /* XSUM_XXH3_testdata[4149] */\n    { 2075, 0x0000000000000000ULL, 0x7BD1D5B89A83155AULL }, /* XSUM_XXH3_testdata[4150] */\n    { 2075, 0x9E3779B185EBCA8DULL, 0x1A6BD0206FB411A9ULL }, /* XSUM_XXH3_testdata[4151] */\n    { 2076, 0x0000000000000000ULL, 0xDA10BBEC348E2389ULL }, /* XSUM_XXH3_testdata[4152] */\n    { 2076, 0x9E3779B185EBCA8DULL, 0xE2330C860120AEACULL }, /* XSUM_XXH3_testdata[4153] */\n    { 2077, 0x0000000000000000ULL, 0xAF3D4127CBF9214EULL }, /* XSUM_XXH3_testdata[4154] */\n    { 2077, 0x9E3779B185EBCA8DULL, 0x4F7C2583D69E104DULL }, /* XSUM_XXH3_testdata[4155] */\n    { 2078, 0x0000000000000000ULL, 0x308E1748E8FD7BABULL }, /* XSUM_XXH3_testdata[4156] */\n    { 2078, 0x9E3779B185EBCA8DULL, 0xDBDDC679BD81D759ULL }, /* XSUM_XXH3_testdata[4157] */\n    { 2079, 0x0000000000000000ULL, 0xD7B03414F25CC611ULL }, /* XSUM_XXH3_testdata[4158] */\n    { 2079, 0x9E3779B185EBCA8DULL, 0xE2613ED5DDF8DBC2ULL }, /* XSUM_XXH3_testdata[4159] */\n    { 2080, 0x0000000000000000ULL, 0xC2A81FB74CEFD2BAULL }, /* XSUM_XXH3_testdata[4160] */\n    { 2080, 0x9E3779B185EBCA8DULL, 0x655245AC6C0DCDB3ULL }, /* XSUM_XXH3_testdata[4161] */\n    { 2081, 0x0000000000000000ULL, 0x9962F6C0C859565CULL }, /* XSUM_XXH3_testdata[4162] */\n    { 2081, 0x9E3779B185EBCA8DULL, 0x9B9FB1A37896DF4DULL }, /* XSUM_XXH3_testdata[4163] */\n    { 2082, 0x0000000000000000ULL, 0x525341066666BA5AULL }, /* XSUM_XXH3_testdata[4164] */\n    { 2082, 0x9E3779B185EBCA8DULL, 0x3EFF2BB5FC448FE4ULL }, /* XSUM_XXH3_testdata[4165] */\n    { 2083, 0x0000000000000000ULL, 0x36B8B23A64BC0BFEULL }, /* XSUM_XXH3_testdata[4166] */\n    { 2083, 0x9E3779B185EBCA8DULL, 0xD61D1388A367C6FFULL }, /* XSUM_XXH3_testdata[4167] */\n    { 2084, 0x0000000000000000ULL, 0x71CB8A8E594C1595ULL }, /* XSUM_XXH3_testdata[4168] */\n    { 2084, 0x9E3779B185EBCA8DULL, 0x2A95CE9C889F2A77ULL }, /* XSUM_XXH3_testdata[4169] */\n    { 2085, 0x0000000000000000ULL, 0x12C8C4DC92EC613EULL }, /* XSUM_XXH3_testdata[4170] */\n    { 2085, 0x9E3779B185EBCA8DULL, 0x94B61038AB08733EULL }, /* XSUM_XXH3_testdata[4171] */\n    { 2086, 0x0000000000000000ULL, 0xB2DF30FBDB219EE1ULL }, /* XSUM_XXH3_testdata[4172] */\n    { 2086, 0x9E3779B185EBCA8DULL, 0x23C0CEFFC455E0D7ULL }, /* XSUM_XXH3_testdata[4173] */\n    { 2087, 0x0000000000000000ULL, 0xE5F168DADC1D1412ULL }, /* XSUM_XXH3_testdata[4174] */\n    { 2087, 0x9E3779B185EBCA8DULL, 0xB76FC418A3663ACCULL }, /* XSUM_XXH3_testdata[4175] */\n    { 2088, 0x0000000000000000ULL, 0x4605E9A359439A0AULL }, /* XSUM_XXH3_testdata[4176] */\n    { 2088, 0x9E3779B185EBCA8DULL, 0xF5C043EDD0AAB1BFULL }, /* XSUM_XXH3_testdata[4177] */\n    { 2089, 0x0000000000000000ULL, 0xC975BD5F02A26C46ULL }, /* XSUM_XXH3_testdata[4178] */\n    { 2089, 0x9E3779B185EBCA8DULL, 0x71AB75BD28471867ULL }, /* XSUM_XXH3_testdata[4179] */\n    { 2090, 0x0000000000000000ULL, 0x486A48B0AC95CEAEULL }, /* XSUM_XXH3_testdata[4180] */\n    { 2090, 0x9E3779B185EBCA8DULL, 0xA94D39ED402F7DD8ULL }, /* XSUM_XXH3_testdata[4181] */\n    { 2091, 0x0000000000000000ULL, 0xF1374E8DDFF89DA9ULL }, /* XSUM_XXH3_testdata[4182] */\n    { 2091, 0x9E3779B185EBCA8DULL, 0x6E49515D91B82E7BULL }, /* XSUM_XXH3_testdata[4183] */\n    { 2092, 0x0000000000000000ULL, 0x455DD31697D63F7BULL }, /* XSUM_XXH3_testdata[4184] */\n    { 2092, 0x9E3779B185EBCA8DULL, 0xC56E1C2C10929BBEULL }, /* XSUM_XXH3_testdata[4185] */\n    { 2093, 0x0000000000000000ULL, 0x9E269F2E5C9FB3E6ULL }, /* XSUM_XXH3_testdata[4186] */\n    { 2093, 0x9E3779B185EBCA8DULL, 0x24341F87A9B010C3ULL }, /* XSUM_XXH3_testdata[4187] */\n    { 2094, 0x0000000000000000ULL, 0x4D9F684C2328F60FULL }, /* XSUM_XXH3_testdata[4188] */\n    { 2094, 0x9E3779B185EBCA8DULL, 0x8D5BA10F136BBBDEULL }, /* XSUM_XXH3_testdata[4189] */\n    { 2095, 0x0000000000000000ULL, 0xB4E9526C757FB3E0ULL }, /* XSUM_XXH3_testdata[4190] */\n    { 2095, 0x9E3779B185EBCA8DULL, 0x6704B0AA74D6E9D8ULL }, /* XSUM_XXH3_testdata[4191] */\n    { 2096, 0x0000000000000000ULL, 0xDC98D78702F8D241ULL }, /* XSUM_XXH3_testdata[4192] */\n    { 2096, 0x9E3779B185EBCA8DULL, 0xC176C1D45D3D3F78ULL }, /* XSUM_XXH3_testdata[4193] */\n    { 2097, 0x0000000000000000ULL, 0x3EB8B58346323505ULL }, /* XSUM_XXH3_testdata[4194] */\n    { 2097, 0x9E3779B185EBCA8DULL, 0x34C3281A05464634ULL }, /* XSUM_XXH3_testdata[4195] */\n    { 2098, 0x0000000000000000ULL, 0xD88C0787632D5D70ULL }, /* XSUM_XXH3_testdata[4196] */\n    { 2098, 0x9E3779B185EBCA8DULL, 0xDFE1DB342D29C290ULL }, /* XSUM_XXH3_testdata[4197] */\n    { 2099, 0x0000000000000000ULL, 0xC6B9D9B3FC9AC765ULL }, /* XSUM_XXH3_testdata[4198] */\n    { 2099, 0x9E3779B185EBCA8DULL, 0x184F316843663974ULL }, /* XSUM_XXH3_testdata[4199] */\n    { 2100, 0x0000000000000000ULL, 0xBE3D249D76B7F785ULL }, /* XSUM_XXH3_testdata[4200] */\n    { 2100, 0x9E3779B185EBCA8DULL, 0x77EBCB5E10693AA4ULL }, /* XSUM_XXH3_testdata[4201] */\n    { 2101, 0x0000000000000000ULL, 0x581217AD4076A60DULL }, /* XSUM_XXH3_testdata[4202] */\n    { 2101, 0x9E3779B185EBCA8DULL, 0xE0038FDEB381E113ULL }, /* XSUM_XXH3_testdata[4203] */\n    { 2102, 0x0000000000000000ULL, 0xF4892859B6CEA530ULL }, /* XSUM_XXH3_testdata[4204] */\n    { 2102, 0x9E3779B185EBCA8DULL, 0x26585E897E7ED9D9ULL }, /* XSUM_XXH3_testdata[4205] */\n    { 2103, 0x0000000000000000ULL, 0xBE7381B819FACD77ULL }, /* XSUM_XXH3_testdata[4206] */\n    { 2103, 0x9E3779B185EBCA8DULL, 0x7BC39431F4923940ULL }, /* XSUM_XXH3_testdata[4207] */\n    { 2104, 0x0000000000000000ULL, 0x818322F0EA0E23CBULL }, /* XSUM_XXH3_testdata[4208] */\n    { 2104, 0x9E3779B185EBCA8DULL, 0xC8CF92ABAD383682ULL }, /* XSUM_XXH3_testdata[4209] */\n    { 2105, 0x0000000000000000ULL, 0xB39F7FE5BBEDC6F9ULL }, /* XSUM_XXH3_testdata[4210] */\n    { 2105, 0x9E3779B185EBCA8DULL, 0xCB42EB694CEED592ULL }, /* XSUM_XXH3_testdata[4211] */\n    { 2106, 0x0000000000000000ULL, 0x042E6EC5695BE98BULL }, /* XSUM_XXH3_testdata[4212] */\n    { 2106, 0x9E3779B185EBCA8DULL, 0xA221F9494506A44EULL }, /* XSUM_XXH3_testdata[4213] */\n    { 2107, 0x0000000000000000ULL, 0xC0D47A01E5589883ULL }, /* XSUM_XXH3_testdata[4214] */\n    { 2107, 0x9E3779B185EBCA8DULL, 0x5FA98BEE4E230E1EULL }, /* XSUM_XXH3_testdata[4215] */\n    { 2108, 0x0000000000000000ULL, 0x9497E3F05B3CCAEDULL }, /* XSUM_XXH3_testdata[4216] */\n    { 2108, 0x9E3779B185EBCA8DULL, 0xD58EA5004F550F86ULL }, /* XSUM_XXH3_testdata[4217] */\n    { 2109, 0x0000000000000000ULL, 0xDA51073DBF6CD9A1ULL }, /* XSUM_XXH3_testdata[4218] */\n    { 2109, 0x9E3779B185EBCA8DULL, 0x45BE1DFC68CD3B56ULL }, /* XSUM_XXH3_testdata[4219] */\n    { 2110, 0x0000000000000000ULL, 0xD3E69C0BE984921DULL }, /* XSUM_XXH3_testdata[4220] */\n    { 2110, 0x9E3779B185EBCA8DULL, 0x88140AA8A0FCE957ULL }, /* XSUM_XXH3_testdata[4221] */\n    { 2111, 0x0000000000000000ULL, 0x161BC831576C278AULL }, /* XSUM_XXH3_testdata[4222] */\n    { 2111, 0x9E3779B185EBCA8DULL, 0x7DF29981A9D61E52ULL }, /* XSUM_XXH3_testdata[4223] */\n    { 2112, 0x0000000000000000ULL, 0x7C33C86D9E6A8C39ULL }, /* XSUM_XXH3_testdata[4224] */\n    { 2112, 0x9E3779B185EBCA8DULL, 0x084352D520AF2E0CULL }, /* XSUM_XXH3_testdata[4225] */\n    { 2113, 0x0000000000000000ULL, 0x30A8AA601425D0BCULL }, /* XSUM_XXH3_testdata[4226] */\n    { 2113, 0x9E3779B185EBCA8DULL, 0x59803CBF83152382ULL }, /* XSUM_XXH3_testdata[4227] */\n    { 2114, 0x0000000000000000ULL, 0x7E7FDCCEB5A269A5ULL }, /* XSUM_XXH3_testdata[4228] */\n    { 2114, 0x9E3779B185EBCA8DULL, 0x337DE3C45901BC85ULL }, /* XSUM_XXH3_testdata[4229] */\n    { 2115, 0x0000000000000000ULL, 0xE819B9E23816758CULL }, /* XSUM_XXH3_testdata[4230] */\n    { 2115, 0x9E3779B185EBCA8DULL, 0xDD75D078BAEE864DULL }, /* XSUM_XXH3_testdata[4231] */\n    { 2116, 0x0000000000000000ULL, 0x0C443A18F53B58DEULL }, /* XSUM_XXH3_testdata[4232] */\n    { 2116, 0x9E3779B185EBCA8DULL, 0xDF99C6BF79C66AB8ULL }, /* XSUM_XXH3_testdata[4233] */\n    { 2117, 0x0000000000000000ULL, 0xCD60C473A00CF1ABULL }, /* XSUM_XXH3_testdata[4234] */\n    { 2117, 0x9E3779B185EBCA8DULL, 0xD00D04FBD50B0769ULL }, /* XSUM_XXH3_testdata[4235] */\n    { 2118, 0x0000000000000000ULL, 0x3FA47D531B86C5A6ULL }, /* XSUM_XXH3_testdata[4236] */\n    { 2118, 0x9E3779B185EBCA8DULL, 0xF0CF23296153A098ULL }, /* XSUM_XXH3_testdata[4237] */\n    { 2119, 0x0000000000000000ULL, 0x2B01DC788CB5E37AULL }, /* XSUM_XXH3_testdata[4238] */\n    { 2119, 0x9E3779B185EBCA8DULL, 0xE463ADDBA6510841ULL }, /* XSUM_XXH3_testdata[4239] */\n    { 2120, 0x0000000000000000ULL, 0x04771E39BE145D9AULL }, /* XSUM_XXH3_testdata[4240] */\n    { 2120, 0x9E3779B185EBCA8DULL, 0x751EC7E4FCAA6325ULL }, /* XSUM_XXH3_testdata[4241] */\n    { 2121, 0x0000000000000000ULL, 0xD633B712A74BE039ULL }, /* XSUM_XXH3_testdata[4242] */\n    { 2121, 0x9E3779B185EBCA8DULL, 0xF9724759FA9525B6ULL }, /* XSUM_XXH3_testdata[4243] */\n    { 2122, 0x0000000000000000ULL, 0x24AE72CDA733DF48ULL }, /* XSUM_XXH3_testdata[4244] */\n    { 2122, 0x9E3779B185EBCA8DULL, 0xBA2240309EC1C44CULL }, /* XSUM_XXH3_testdata[4245] */\n    { 2123, 0x0000000000000000ULL, 0x47102F1ED6BB4FE4ULL }, /* XSUM_XXH3_testdata[4246] */\n    { 2123, 0x9E3779B185EBCA8DULL, 0x20D846BBF8E4C6ABULL }, /* XSUM_XXH3_testdata[4247] */\n    { 2124, 0x0000000000000000ULL, 0x71CBB4B220C0FFCEULL }, /* XSUM_XXH3_testdata[4248] */\n    { 2124, 0x9E3779B185EBCA8DULL, 0x1CEE7903F9FF9D6FULL }, /* XSUM_XXH3_testdata[4249] */\n    { 2125, 0x0000000000000000ULL, 0x85DF5C3938DF2DB0ULL }, /* XSUM_XXH3_testdata[4250] */\n    { 2125, 0x9E3779B185EBCA8DULL, 0xB9AD29A35A707ABDULL }, /* XSUM_XXH3_testdata[4251] */\n    { 2126, 0x0000000000000000ULL, 0x54B9B4C8D1D2F8E1ULL }, /* XSUM_XXH3_testdata[4252] */\n    { 2126, 0x9E3779B185EBCA8DULL, 0x9C159E298C16AF55ULL }, /* XSUM_XXH3_testdata[4253] */\n    { 2127, 0x0000000000000000ULL, 0xC4DA29D22439D9AAULL }, /* XSUM_XXH3_testdata[4254] */\n    { 2127, 0x9E3779B185EBCA8DULL, 0xC77E30862645CE42ULL }, /* XSUM_XXH3_testdata[4255] */\n    { 2128, 0x0000000000000000ULL, 0xFAD97E0CDDA51E95ULL }, /* XSUM_XXH3_testdata[4256] */\n    { 2128, 0x9E3779B185EBCA8DULL, 0xB9FC31CE38AFED3FULL }, /* XSUM_XXH3_testdata[4257] */\n    { 2129, 0x0000000000000000ULL, 0x5F33D37689AAAB61ULL }, /* XSUM_XXH3_testdata[4258] */\n    { 2129, 0x9E3779B185EBCA8DULL, 0xD4AF6B7AE8C90ABBULL }, /* XSUM_XXH3_testdata[4259] */\n    { 2130, 0x0000000000000000ULL, 0x4A6C83F4986D25ABULL }, /* XSUM_XXH3_testdata[4260] */\n    { 2130, 0x9E3779B185EBCA8DULL, 0xDA5B988675FEDBDCULL }, /* XSUM_XXH3_testdata[4261] */\n    { 2131, 0x0000000000000000ULL, 0xB2FA919BEF281372ULL }, /* XSUM_XXH3_testdata[4262] */\n    { 2131, 0x9E3779B185EBCA8DULL, 0x68F128D43DE48A69ULL }, /* XSUM_XXH3_testdata[4263] */\n    { 2132, 0x0000000000000000ULL, 0x8CA360DC297568D8ULL }, /* XSUM_XXH3_testdata[4264] */\n    { 2132, 0x9E3779B185EBCA8DULL, 0xD9EB5BFF99512869ULL }, /* XSUM_XXH3_testdata[4265] */\n    { 2133, 0x0000000000000000ULL, 0xCFCEFDAEACFA0B96ULL }, /* XSUM_XXH3_testdata[4266] */\n    { 2133, 0x9E3779B185EBCA8DULL, 0x1DB7821732C9B28DULL }, /* XSUM_XXH3_testdata[4267] */\n    { 2134, 0x0000000000000000ULL, 0xB2CED2B335371695ULL }, /* XSUM_XXH3_testdata[4268] */\n    { 2134, 0x9E3779B185EBCA8DULL, 0x0D4487991C690B4CULL }, /* XSUM_XXH3_testdata[4269] */\n    { 2135, 0x0000000000000000ULL, 0x10D459B4E7BB16F5ULL }, /* XSUM_XXH3_testdata[4270] */\n    { 2135, 0x9E3779B185EBCA8DULL, 0x474A36D98F36F4A0ULL }, /* XSUM_XXH3_testdata[4271] */\n    { 2136, 0x0000000000000000ULL, 0x259F3610C2E2A640ULL }, /* XSUM_XXH3_testdata[4272] */\n    { 2136, 0x9E3779B185EBCA8DULL, 0x9131CCB2D652847EULL }, /* XSUM_XXH3_testdata[4273] */\n    { 2137, 0x0000000000000000ULL, 0xF6E0287F54678C67ULL }, /* XSUM_XXH3_testdata[4274] */\n    { 2137, 0x9E3779B185EBCA8DULL, 0x34202D0AD2030DF8ULL }, /* XSUM_XXH3_testdata[4275] */\n    { 2138, 0x0000000000000000ULL, 0x20B9BD1B573C9654ULL }, /* XSUM_XXH3_testdata[4276] */\n    { 2138, 0x9E3779B185EBCA8DULL, 0x7B66F99550C2A5C0ULL }, /* XSUM_XXH3_testdata[4277] */\n    { 2139, 0x0000000000000000ULL, 0xE7ADB21AC122B16CULL }, /* XSUM_XXH3_testdata[4278] */\n    { 2139, 0x9E3779B185EBCA8DULL, 0xCC00DD72799C448CULL }, /* XSUM_XXH3_testdata[4279] */\n    { 2140, 0x0000000000000000ULL, 0x8E95E0CF5838AE78ULL }, /* XSUM_XXH3_testdata[4280] */\n    { 2140, 0x9E3779B185EBCA8DULL, 0x40F96A9363A78DD4ULL }, /* XSUM_XXH3_testdata[4281] */\n    { 2141, 0x0000000000000000ULL, 0x714ED906850A3420ULL }, /* XSUM_XXH3_testdata[4282] */\n    { 2141, 0x9E3779B185EBCA8DULL, 0xFBF9450C1D1078C0ULL }, /* XSUM_XXH3_testdata[4283] */\n    { 2142, 0x0000000000000000ULL, 0xD816E5FE3A8D6997ULL }, /* XSUM_XXH3_testdata[4284] */\n    { 2142, 0x9E3779B185EBCA8DULL, 0x80ACC2D477815904ULL }, /* XSUM_XXH3_testdata[4285] */\n    { 2143, 0x0000000000000000ULL, 0xD9319C8C99EDEDEFULL }, /* XSUM_XXH3_testdata[4286] */\n    { 2143, 0x9E3779B185EBCA8DULL, 0xA6569B7945AA5DDCULL }, /* XSUM_XXH3_testdata[4287] */\n    { 2144, 0x0000000000000000ULL, 0x9CAD5B2A41F4BC3DULL }, /* XSUM_XXH3_testdata[4288] */\n    { 2144, 0x9E3779B185EBCA8DULL, 0x61447524BEA2F61CULL }, /* XSUM_XXH3_testdata[4289] */\n    { 2145, 0x0000000000000000ULL, 0x334D53022734D39BULL }, /* XSUM_XXH3_testdata[4290] */\n    { 2145, 0x9E3779B185EBCA8DULL, 0x8025C93720D8B0B4ULL }, /* XSUM_XXH3_testdata[4291] */\n    { 2146, 0x0000000000000000ULL, 0xA72ED4637049BF03ULL }, /* XSUM_XXH3_testdata[4292] */\n    { 2146, 0x9E3779B185EBCA8DULL, 0x9A059D5FC680F3D5ULL }, /* XSUM_XXH3_testdata[4293] */\n    { 2147, 0x0000000000000000ULL, 0x410742B45CC91D39ULL }, /* XSUM_XXH3_testdata[4294] */\n    { 2147, 0x9E3779B185EBCA8DULL, 0x9F357FDE2081FEDCULL }, /* XSUM_XXH3_testdata[4295] */\n    { 2148, 0x0000000000000000ULL, 0x2793899CDB4D8987ULL }, /* XSUM_XXH3_testdata[4296] */\n    { 2148, 0x9E3779B185EBCA8DULL, 0xEEE157D27C8FE443ULL }, /* XSUM_XXH3_testdata[4297] */\n    { 2149, 0x0000000000000000ULL, 0x2B4C46687682EBC1ULL }, /* XSUM_XXH3_testdata[4298] */\n    { 2149, 0x9E3779B185EBCA8DULL, 0x7F3359436EA05077ULL }, /* XSUM_XXH3_testdata[4299] */\n    { 2150, 0x0000000000000000ULL, 0xE3D5AA26C630C09CULL }, /* XSUM_XXH3_testdata[4300] */\n    { 2150, 0x9E3779B185EBCA8DULL, 0x2A28BD92C2D4C989ULL }, /* XSUM_XXH3_testdata[4301] */\n    { 2151, 0x0000000000000000ULL, 0x0BB6A9EE880F6738ULL }, /* XSUM_XXH3_testdata[4302] */\n    { 2151, 0x9E3779B185EBCA8DULL, 0x3A86A292CE8A02F5ULL }, /* XSUM_XXH3_testdata[4303] */\n    { 2152, 0x0000000000000000ULL, 0xAB3F3D80E2CF4EC4ULL }, /* XSUM_XXH3_testdata[4304] */\n    { 2152, 0x9E3779B185EBCA8DULL, 0xE9674006478DFD18ULL }, /* XSUM_XXH3_testdata[4305] */\n    { 2153, 0x0000000000000000ULL, 0x18B3B66AD0EA2DA8ULL }, /* XSUM_XXH3_testdata[4306] */\n    { 2153, 0x9E3779B185EBCA8DULL, 0x8BAF8A5439623563ULL }, /* XSUM_XXH3_testdata[4307] */\n    { 2154, 0x0000000000000000ULL, 0x3F5F7F0DE2DAE083ULL }, /* XSUM_XXH3_testdata[4308] */\n    { 2154, 0x9E3779B185EBCA8DULL, 0x1A757E35E405E699ULL }, /* XSUM_XXH3_testdata[4309] */\n    { 2155, 0x0000000000000000ULL, 0x0E026BA8C61DF56AULL }, /* XSUM_XXH3_testdata[4310] */\n    { 2155, 0x9E3779B185EBCA8DULL, 0x471C27F9B37D6851ULL }, /* XSUM_XXH3_testdata[4311] */\n    { 2156, 0x0000000000000000ULL, 0x573B4C99862191A1ULL }, /* XSUM_XXH3_testdata[4312] */\n    { 2156, 0x9E3779B185EBCA8DULL, 0xDF061BCC7759C1E5ULL }, /* XSUM_XXH3_testdata[4313] */\n    { 2157, 0x0000000000000000ULL, 0x8E3349E34BBABB51ULL }, /* XSUM_XXH3_testdata[4314] */\n    { 2157, 0x9E3779B185EBCA8DULL, 0xE9CB28FA4F2B8F86ULL }, /* XSUM_XXH3_testdata[4315] */\n    { 2158, 0x0000000000000000ULL, 0x1DE9A6E944662A42ULL }, /* XSUM_XXH3_testdata[4316] */\n    { 2158, 0x9E3779B185EBCA8DULL, 0x31415F3C7C9E2538ULL }, /* XSUM_XXH3_testdata[4317] */\n    { 2159, 0x0000000000000000ULL, 0x3B2A7FA55BC6652BULL }, /* XSUM_XXH3_testdata[4318] */\n    { 2159, 0x9E3779B185EBCA8DULL, 0xBA13B27EF111BD0BULL }, /* XSUM_XXH3_testdata[4319] */\n    { 2160, 0x0000000000000000ULL, 0x95A2C385B4C5DF62ULL }, /* XSUM_XXH3_testdata[4320] */\n    { 2160, 0x9E3779B185EBCA8DULL, 0xE8A2054945537497ULL }, /* XSUM_XXH3_testdata[4321] */\n    { 2161, 0x0000000000000000ULL, 0xB6D672FBF2733519ULL }, /* XSUM_XXH3_testdata[4322] */\n    { 2161, 0x9E3779B185EBCA8DULL, 0xC43BFCD27780D6F5ULL }, /* XSUM_XXH3_testdata[4323] */\n    { 2162, 0x0000000000000000ULL, 0x5E14EF81BEAE2696ULL }, /* XSUM_XXH3_testdata[4324] */\n    { 2162, 0x9E3779B185EBCA8DULL, 0x04CB1436467C4B23ULL }, /* XSUM_XXH3_testdata[4325] */\n    { 2163, 0x0000000000000000ULL, 0xD105155AA83A2BCAULL }, /* XSUM_XXH3_testdata[4326] */\n    { 2163, 0x9E3779B185EBCA8DULL, 0x54952BBB7A3FAEBAULL }, /* XSUM_XXH3_testdata[4327] */\n    { 2164, 0x0000000000000000ULL, 0x7B1F07253D3C8CF3ULL }, /* XSUM_XXH3_testdata[4328] */\n    { 2164, 0x9E3779B185EBCA8DULL, 0x9484396B41B15FA8ULL }, /* XSUM_XXH3_testdata[4329] */\n    { 2165, 0x0000000000000000ULL, 0x93F755CFA42D919DULL }, /* XSUM_XXH3_testdata[4330] */\n    { 2165, 0x9E3779B185EBCA8DULL, 0x2D7EED0342EB2799ULL }, /* XSUM_XXH3_testdata[4331] */\n    { 2166, 0x0000000000000000ULL, 0x85298A8704907A54ULL }, /* XSUM_XXH3_testdata[4332] */\n    { 2166, 0x9E3779B185EBCA8DULL, 0xA751C559BA4417A5ULL }, /* XSUM_XXH3_testdata[4333] */\n    { 2167, 0x0000000000000000ULL, 0xE90C580C48DD9944ULL }, /* XSUM_XXH3_testdata[4334] */\n    { 2167, 0x9E3779B185EBCA8DULL, 0x69C8C5584B02DFD6ULL }, /* XSUM_XXH3_testdata[4335] */\n    { 2168, 0x0000000000000000ULL, 0x9C64AFEB984B1FFDULL }, /* XSUM_XXH3_testdata[4336] */\n    { 2168, 0x9E3779B185EBCA8DULL, 0x1304DF7E40B05E96ULL }, /* XSUM_XXH3_testdata[4337] */\n    { 2169, 0x0000000000000000ULL, 0x92CDC29C3D92503CULL }, /* XSUM_XXH3_testdata[4338] */\n    { 2169, 0x9E3779B185EBCA8DULL, 0x729B2A3E789A550CULL }, /* XSUM_XXH3_testdata[4339] */\n    { 2170, 0x0000000000000000ULL, 0x83BDFD869BAD1F44ULL }, /* XSUM_XXH3_testdata[4340] */\n    { 2170, 0x9E3779B185EBCA8DULL, 0x89E2B8D5F514680FULL }, /* XSUM_XXH3_testdata[4341] */\n    { 2171, 0x0000000000000000ULL, 0x50D5661F7461E211ULL }, /* XSUM_XXH3_testdata[4342] */\n    { 2171, 0x9E3779B185EBCA8DULL, 0x6AD13DDD0B545A8FULL }, /* XSUM_XXH3_testdata[4343] */\n    { 2172, 0x0000000000000000ULL, 0x6AF342AE4840FC12ULL }, /* XSUM_XXH3_testdata[4344] */\n    { 2172, 0x9E3779B185EBCA8DULL, 0x0E644A6A1D322111ULL }, /* XSUM_XXH3_testdata[4345] */\n    { 2173, 0x0000000000000000ULL, 0x29614FF197A1CEC8ULL }, /* XSUM_XXH3_testdata[4346] */\n    { 2173, 0x9E3779B185EBCA8DULL, 0x34319655235E1DF9ULL }, /* XSUM_XXH3_testdata[4347] */\n    { 2174, 0x0000000000000000ULL, 0x5851086F05ED5A93ULL }, /* XSUM_XXH3_testdata[4348] */\n    { 2174, 0x9E3779B185EBCA8DULL, 0x789E2E239B0D5889ULL }, /* XSUM_XXH3_testdata[4349] */\n    { 2175, 0x0000000000000000ULL, 0x50D01E3DB2EEB81BULL }, /* XSUM_XXH3_testdata[4350] */\n    { 2175, 0x9E3779B185EBCA8DULL, 0x11B67E942D0D7E67ULL }, /* XSUM_XXH3_testdata[4351] */\n    { 2176, 0x0000000000000000ULL, 0x29D2205BAFBD456BULL }, /* XSUM_XXH3_testdata[4352] */\n    { 2176, 0x9E3779B185EBCA8DULL, 0xFB7B4655AA6E39C8ULL }, /* XSUM_XXH3_testdata[4353] */\n    { 2177, 0x0000000000000000ULL, 0xA283CA0E29DC4F25ULL }, /* XSUM_XXH3_testdata[4354] */\n    { 2177, 0x9E3779B185EBCA8DULL, 0x45FC46C710C757C1ULL }, /* XSUM_XXH3_testdata[4355] */\n    { 2178, 0x0000000000000000ULL, 0xEE0C669CCC24E35BULL }, /* XSUM_XXH3_testdata[4356] */\n    { 2178, 0x9E3779B185EBCA8DULL, 0x6616E48AFBBE6B19ULL }, /* XSUM_XXH3_testdata[4357] */\n    { 2179, 0x0000000000000000ULL, 0xC22CBE7E53601416ULL }, /* XSUM_XXH3_testdata[4358] */\n    { 2179, 0x9E3779B185EBCA8DULL, 0xAC82506CCE12F79AULL }, /* XSUM_XXH3_testdata[4359] */\n    { 2180, 0x0000000000000000ULL, 0xD9E8B2340AD0AE45ULL }, /* XSUM_XXH3_testdata[4360] */\n    { 2180, 0x9E3779B185EBCA8DULL, 0xE9E8841DDA45B168ULL }, /* XSUM_XXH3_testdata[4361] */\n    { 2181, 0x0000000000000000ULL, 0x9715E4F64F6C87A7ULL }, /* XSUM_XXH3_testdata[4362] */\n    { 2181, 0x9E3779B185EBCA8DULL, 0xB5DF3C559501A8C0ULL }, /* XSUM_XXH3_testdata[4363] */\n    { 2182, 0x0000000000000000ULL, 0x8037071E726FFCF6ULL }, /* XSUM_XXH3_testdata[4364] */\n    { 2182, 0x9E3779B185EBCA8DULL, 0xE0DF7D2037EA35CDULL }, /* XSUM_XXH3_testdata[4365] */\n    { 2183, 0x0000000000000000ULL, 0xEFF8CC0E3F0641E4ULL }, /* XSUM_XXH3_testdata[4366] */\n    { 2183, 0x9E3779B185EBCA8DULL, 0x8044F342429D0F1EULL }, /* XSUM_XXH3_testdata[4367] */\n    { 2184, 0x0000000000000000ULL, 0xA9FCE36A54750A1FULL }, /* XSUM_XXH3_testdata[4368] */\n    { 2184, 0x9E3779B185EBCA8DULL, 0x6FDBF8F2D98BF87CULL }, /* XSUM_XXH3_testdata[4369] */\n    { 2185, 0x0000000000000000ULL, 0x8660BD25E39DB30AULL }, /* XSUM_XXH3_testdata[4370] */\n    { 2185, 0x9E3779B185EBCA8DULL, 0xDD5BD774387761EDULL }, /* XSUM_XXH3_testdata[4371] */\n    { 2186, 0x0000000000000000ULL, 0x19344704011B72D3ULL }, /* XSUM_XXH3_testdata[4372] */\n    { 2186, 0x9E3779B185EBCA8DULL, 0x0484D89689D09F20ULL }, /* XSUM_XXH3_testdata[4373] */\n    { 2187, 0x0000000000000000ULL, 0xE59CC4C985A720A2ULL }, /* XSUM_XXH3_testdata[4374] */\n    { 2187, 0x9E3779B185EBCA8DULL, 0x2C4966E8D7B3F5E8ULL }, /* XSUM_XXH3_testdata[4375] */\n    { 2188, 0x0000000000000000ULL, 0xB223195A579011ACULL }, /* XSUM_XXH3_testdata[4376] */\n    { 2188, 0x9E3779B185EBCA8DULL, 0xD43C8AE1C4766194ULL }, /* XSUM_XXH3_testdata[4377] */\n    { 2189, 0x0000000000000000ULL, 0xAF9E01D91A98738AULL }, /* XSUM_XXH3_testdata[4378] */\n    { 2189, 0x9E3779B185EBCA8DULL, 0xBE047B287C786011ULL }, /* XSUM_XXH3_testdata[4379] */\n    { 2190, 0x0000000000000000ULL, 0x9B2878B998461347ULL }, /* XSUM_XXH3_testdata[4380] */\n    { 2190, 0x9E3779B185EBCA8DULL, 0xD5FDCB465B9E2897ULL }, /* XSUM_XXH3_testdata[4381] */\n    { 2191, 0x0000000000000000ULL, 0x71B4CC7A01EF5656ULL }, /* XSUM_XXH3_testdata[4382] */\n    { 2191, 0x9E3779B185EBCA8DULL, 0x7A5C5E944C4D2499ULL }, /* XSUM_XXH3_testdata[4383] */\n    { 2192, 0x0000000000000000ULL, 0x84E6EBA02934072EULL }, /* XSUM_XXH3_testdata[4384] */\n    { 2192, 0x9E3779B185EBCA8DULL, 0x481D2585061FE7FDULL }, /* XSUM_XXH3_testdata[4385] */\n    { 2193, 0x0000000000000000ULL, 0x78B69BB4A862DB03ULL }, /* XSUM_XXH3_testdata[4386] */\n    { 2193, 0x9E3779B185EBCA8DULL, 0x767D20312ECBB69AULL }, /* XSUM_XXH3_testdata[4387] */\n    { 2194, 0x0000000000000000ULL, 0xC7AEF2FB42E6D43FULL }, /* XSUM_XXH3_testdata[4388] */\n    { 2194, 0x9E3779B185EBCA8DULL, 0xF441AC4B1766F7B1ULL }, /* XSUM_XXH3_testdata[4389] */\n    { 2195, 0x0000000000000000ULL, 0xEAC74EA8D924CA43ULL }, /* XSUM_XXH3_testdata[4390] */\n    { 2195, 0x9E3779B185EBCA8DULL, 0x49CC8123556CEF4EULL }, /* XSUM_XXH3_testdata[4391] */\n    { 2196, 0x0000000000000000ULL, 0xAD657634A1E509F8ULL }, /* XSUM_XXH3_testdata[4392] */\n    { 2196, 0x9E3779B185EBCA8DULL, 0x0F993C64851F9F19ULL }, /* XSUM_XXH3_testdata[4393] */\n    { 2197, 0x0000000000000000ULL, 0x63C87C3FB53F2903ULL }, /* XSUM_XXH3_testdata[4394] */\n    { 2197, 0x9E3779B185EBCA8DULL, 0x5C1B6EAC47E1080DULL }, /* XSUM_XXH3_testdata[4395] */\n    { 2198, 0x0000000000000000ULL, 0x6A7D831B5F4FE66DULL }, /* XSUM_XXH3_testdata[4396] */\n    { 2198, 0x9E3779B185EBCA8DULL, 0x1AAE97153C6D5C42ULL }, /* XSUM_XXH3_testdata[4397] */\n    { 2199, 0x0000000000000000ULL, 0x01B53846E0D4AC64ULL }, /* XSUM_XXH3_testdata[4398] */\n    { 2199, 0x9E3779B185EBCA8DULL, 0xEC90604F2829F411ULL }, /* XSUM_XXH3_testdata[4399] */\n    { 2200, 0x0000000000000000ULL, 0xF18C2A1C91B939AFULL }, /* XSUM_XXH3_testdata[4400] */\n    { 2200, 0x9E3779B185EBCA8DULL, 0x8AF27110B8519E3DULL }, /* XSUM_XXH3_testdata[4401] */\n    { 2201, 0x0000000000000000ULL, 0x4928A28948996E6DULL }, /* XSUM_XXH3_testdata[4402] */\n    { 2201, 0x9E3779B185EBCA8DULL, 0xA22D2855F0D85572ULL }, /* XSUM_XXH3_testdata[4403] */\n    { 2202, 0x0000000000000000ULL, 0xE948FCCAB5D2A3D7ULL }, /* XSUM_XXH3_testdata[4404] */\n    { 2202, 0x9E3779B185EBCA8DULL, 0x8F6E2928A92848E3ULL }, /* XSUM_XXH3_testdata[4405] */\n    { 2203, 0x0000000000000000ULL, 0xCBCC38906A5320E2ULL }, /* XSUM_XXH3_testdata[4406] */\n    { 2203, 0x9E3779B185EBCA8DULL, 0x3C54CBDE2AC16F9EULL }, /* XSUM_XXH3_testdata[4407] */\n    { 2204, 0x0000000000000000ULL, 0x5D48D592672E0092ULL }, /* XSUM_XXH3_testdata[4408] */\n    { 2204, 0x9E3779B185EBCA8DULL, 0x8A0BC0C14F9F13E3ULL }, /* XSUM_XXH3_testdata[4409] */\n    { 2205, 0x0000000000000000ULL, 0x46855E38CDED0819ULL }, /* XSUM_XXH3_testdata[4410] */\n    { 2205, 0x9E3779B185EBCA8DULL, 0x75A04D065ACD038CULL }, /* XSUM_XXH3_testdata[4411] */\n    { 2206, 0x0000000000000000ULL, 0x09358F24391EE1E7ULL }, /* XSUM_XXH3_testdata[4412] */\n    { 2206, 0x9E3779B185EBCA8DULL, 0x41B3BB406058BD6DULL }, /* XSUM_XXH3_testdata[4413] */\n    { 2207, 0x0000000000000000ULL, 0xF4C1F3BFB4B542A6ULL }, /* XSUM_XXH3_testdata[4414] */\n    { 2207, 0x9E3779B185EBCA8DULL, 0x20459DD50113E516ULL }, /* XSUM_XXH3_testdata[4415] */\n    { 2208, 0x0000000000000000ULL, 0x700315ED88C7E92AULL }, /* XSUM_XXH3_testdata[4416] */\n    { 2208, 0x9E3779B185EBCA8DULL, 0xFAD72D454B231E1FULL }, /* XSUM_XXH3_testdata[4417] */\n    { 2209, 0x0000000000000000ULL, 0xB4A84B3022803926ULL }, /* XSUM_XXH3_testdata[4418] */\n    { 2209, 0x9E3779B185EBCA8DULL, 0x04217C50D815E8D2ULL }, /* XSUM_XXH3_testdata[4419] */\n    { 2210, 0x0000000000000000ULL, 0xA240352B602854D2ULL }, /* XSUM_XXH3_testdata[4420] */\n    { 2210, 0x9E3779B185EBCA8DULL, 0xD37F02C28289A656ULL }, /* XSUM_XXH3_testdata[4421] */\n    { 2211, 0x0000000000000000ULL, 0x636FB1C6C3DBFE21ULL }, /* XSUM_XXH3_testdata[4422] */\n    { 2211, 0x9E3779B185EBCA8DULL, 0x922BC8C06F60CA05ULL }, /* XSUM_XXH3_testdata[4423] */\n    { 2212, 0x0000000000000000ULL, 0x8F7E08E639EE5396ULL }, /* XSUM_XXH3_testdata[4424] */\n    { 2212, 0x9E3779B185EBCA8DULL, 0x291E3802522C3B4CULL }, /* XSUM_XXH3_testdata[4425] */\n    { 2213, 0x0000000000000000ULL, 0x9687D287CCF00986ULL }, /* XSUM_XXH3_testdata[4426] */\n    { 2213, 0x9E3779B185EBCA8DULL, 0x44468F4841381E7CULL }, /* XSUM_XXH3_testdata[4427] */\n    { 2214, 0x0000000000000000ULL, 0xFC3AAB6F3C760BA7ULL }, /* XSUM_XXH3_testdata[4428] */\n    { 2214, 0x9E3779B185EBCA8DULL, 0x477AD85736CD6177ULL }, /* XSUM_XXH3_testdata[4429] */\n    { 2215, 0x0000000000000000ULL, 0x8E6365769D7FC136ULL }, /* XSUM_XXH3_testdata[4430] */\n    { 2215, 0x9E3779B185EBCA8DULL, 0xD9569AC3A784F21DULL }, /* XSUM_XXH3_testdata[4431] */\n    { 2216, 0x0000000000000000ULL, 0x3748F951EEE389F2ULL }, /* XSUM_XXH3_testdata[4432] */\n    { 2216, 0x9E3779B185EBCA8DULL, 0xEFE43D389C338830ULL }, /* XSUM_XXH3_testdata[4433] */\n    { 2217, 0x0000000000000000ULL, 0x34C121B698E9AF1FULL }, /* XSUM_XXH3_testdata[4434] */\n    { 2217, 0x9E3779B185EBCA8DULL, 0x178415CFDCB7E73CULL }, /* XSUM_XXH3_testdata[4435] */\n    { 2218, 0x0000000000000000ULL, 0xB51367FD5633A04EULL }, /* XSUM_XXH3_testdata[4436] */\n    { 2218, 0x9E3779B185EBCA8DULL, 0xBC3A63FBADB4B27AULL }, /* XSUM_XXH3_testdata[4437] */\n    { 2219, 0x0000000000000000ULL, 0x35D6A10601EBD042ULL }, /* XSUM_XXH3_testdata[4438] */\n    { 2219, 0x9E3779B185EBCA8DULL, 0x359E000DA9C69A8FULL }, /* XSUM_XXH3_testdata[4439] */\n    { 2220, 0x0000000000000000ULL, 0x4C283F09875945A8ULL }, /* XSUM_XXH3_testdata[4440] */\n    { 2220, 0x9E3779B185EBCA8DULL, 0xEDD00581331B3A2AULL }, /* XSUM_XXH3_testdata[4441] */\n    { 2221, 0x0000000000000000ULL, 0x27F10579DF439D79ULL }, /* XSUM_XXH3_testdata[4442] */\n    { 2221, 0x9E3779B185EBCA8DULL, 0x0FC6A3B4F4FA84AFULL }, /* XSUM_XXH3_testdata[4443] */\n    { 2222, 0x0000000000000000ULL, 0x1ADBD424A23E32DEULL }, /* XSUM_XXH3_testdata[4444] */\n    { 2222, 0x9E3779B185EBCA8DULL, 0x7B38DE2656BD891FULL }, /* XSUM_XXH3_testdata[4445] */\n    { 2223, 0x0000000000000000ULL, 0xDB429AE625C9FC6DULL }, /* XSUM_XXH3_testdata[4446] */\n    { 2223, 0x9E3779B185EBCA8DULL, 0x933CA63106E3A4F5ULL }, /* XSUM_XXH3_testdata[4447] */\n    { 2224, 0x0000000000000000ULL, 0x76F5F458101653A6ULL }, /* XSUM_XXH3_testdata[4448] */\n    { 2224, 0x9E3779B185EBCA8DULL, 0x817E67E9987F2F90ULL }, /* XSUM_XXH3_testdata[4449] */\n    { 2225, 0x0000000000000000ULL, 0x711540673D7438BBULL }, /* XSUM_XXH3_testdata[4450] */\n    { 2225, 0x9E3779B185EBCA8DULL, 0x8331311180B2BB75ULL }, /* XSUM_XXH3_testdata[4451] */\n    { 2226, 0x0000000000000000ULL, 0xEA382838600F6246ULL }, /* XSUM_XXH3_testdata[4452] */\n    { 2226, 0x9E3779B185EBCA8DULL, 0x6B3384DD94F74CA7ULL }, /* XSUM_XXH3_testdata[4453] */\n    { 2227, 0x0000000000000000ULL, 0x94AC31B78CBF3FD0ULL }, /* XSUM_XXH3_testdata[4454] */\n    { 2227, 0x9E3779B185EBCA8DULL, 0xC155AD752682B118ULL }, /* XSUM_XXH3_testdata[4455] */\n    { 2228, 0x0000000000000000ULL, 0x9CE739A7B0881A1DULL }, /* XSUM_XXH3_testdata[4456] */\n    { 2228, 0x9E3779B185EBCA8DULL, 0x9E815FDB9F67F4EFULL }, /* XSUM_XXH3_testdata[4457] */\n    { 2229, 0x0000000000000000ULL, 0x700388F67B075989ULL }, /* XSUM_XXH3_testdata[4458] */\n    { 2229, 0x9E3779B185EBCA8DULL, 0x1F4FF8D340256EBDULL }, /* XSUM_XXH3_testdata[4459] */\n    { 2230, 0x0000000000000000ULL, 0x6922538CFDE61217ULL }, /* XSUM_XXH3_testdata[4460] */\n    { 2230, 0x9E3779B185EBCA8DULL, 0xC2518F847B8B641DULL }, /* XSUM_XXH3_testdata[4461] */\n    { 2231, 0x0000000000000000ULL, 0xB683FC5049069978ULL }, /* XSUM_XXH3_testdata[4462] */\n    { 2231, 0x9E3779B185EBCA8DULL, 0x5336697F84525839ULL }, /* XSUM_XXH3_testdata[4463] */\n    { 2232, 0x0000000000000000ULL, 0xB1F34FE973A230AAULL }, /* XSUM_XXH3_testdata[4464] */\n    { 2232, 0x9E3779B185EBCA8DULL, 0x61C662A59D44EB71ULL }, /* XSUM_XXH3_testdata[4465] */\n    { 2233, 0x0000000000000000ULL, 0xB91B2F72A927AD7BULL }, /* XSUM_XXH3_testdata[4466] */\n    { 2233, 0x9E3779B185EBCA8DULL, 0xF43F1270175D6FD0ULL }, /* XSUM_XXH3_testdata[4467] */\n    { 2234, 0x0000000000000000ULL, 0x2E533EC105FE951FULL }, /* XSUM_XXH3_testdata[4468] */\n    { 2234, 0x9E3779B185EBCA8DULL, 0xAC51A60B038799ABULL }, /* XSUM_XXH3_testdata[4469] */\n    { 2235, 0x0000000000000000ULL, 0xB57A6D2663BD3318ULL }, /* XSUM_XXH3_testdata[4470] */\n    { 2235, 0x9E3779B185EBCA8DULL, 0x6236E2EB27003B98ULL }, /* XSUM_XXH3_testdata[4471] */\n    { 2236, 0x0000000000000000ULL, 0xACD57AC1C6A6751DULL }, /* XSUM_XXH3_testdata[4472] */\n    { 2236, 0x9E3779B185EBCA8DULL, 0x0A3B7C12DD58733DULL }, /* XSUM_XXH3_testdata[4473] */\n    { 2237, 0x0000000000000000ULL, 0xF403CEA1763CD9CCULL }, /* XSUM_XXH3_testdata[4474] */\n    { 2237, 0x9E3779B185EBCA8DULL, 0xF7A5385336BEF410ULL }, /* XSUM_XXH3_testdata[4475] */\n    { 2238, 0x0000000000000000ULL, 0xEEA5D3E6239E2D21ULL }, /* XSUM_XXH3_testdata[4476] */\n    { 2238, 0x9E3779B185EBCA8DULL, 0xCB29898047ACB7EFULL }, /* XSUM_XXH3_testdata[4477] */\n    { 2239, 0x0000000000000000ULL, 0xA72607BA9BB75B9BULL }, /* XSUM_XXH3_testdata[4478] */\n    { 2239, 0x9E3779B185EBCA8DULL, 0x017F09BFBB6474DAULL }, /* XSUM_XXH3_testdata[4479] */\n    { 2240, 0x0000000000000000ULL, 0x6E73A90539CF2948ULL }, /* XSUM_XXH3_testdata[4480] */\n    { 2240, 0x9E3779B185EBCA8DULL, 0x757BA8487D1B5247ULL }, /* XSUM_XXH3_testdata[4481] */\n    { 2241, 0x0000000000000000ULL, 0xE800ECA585FE92D9ULL }, /* XSUM_XXH3_testdata[4482] */\n    { 2241, 0x9E3779B185EBCA8DULL, 0x3B33BDEC09C21950ULL }, /* XSUM_XXH3_testdata[4483] */\n    { 2242, 0x0000000000000000ULL, 0x0FEB720613C813C3ULL }, /* XSUM_XXH3_testdata[4484] */\n    { 2242, 0x9E3779B185EBCA8DULL, 0x45883187E8068D6CULL }, /* XSUM_XXH3_testdata[4485] */\n    { 2243, 0x0000000000000000ULL, 0xFDD97DDF7A83E7A9ULL }, /* XSUM_XXH3_testdata[4486] */\n    { 2243, 0x9E3779B185EBCA8DULL, 0xA2115D49B6729AEDULL }, /* XSUM_XXH3_testdata[4487] */\n    { 2244, 0x0000000000000000ULL, 0x4171B56A25BAC312ULL }, /* XSUM_XXH3_testdata[4488] */\n    { 2244, 0x9E3779B185EBCA8DULL, 0x173F38DE0FB9118FULL }, /* XSUM_XXH3_testdata[4489] */\n    { 2245, 0x0000000000000000ULL, 0xC21734A280918825ULL }, /* XSUM_XXH3_testdata[4490] */\n    { 2245, 0x9E3779B185EBCA8DULL, 0x3F7757BEE2F1A6E0ULL }, /* XSUM_XXH3_testdata[4491] */\n    { 2246, 0x0000000000000000ULL, 0x982A35FE583FF9E2ULL }, /* XSUM_XXH3_testdata[4492] */\n    { 2246, 0x9E3779B185EBCA8DULL, 0x1091A8124BCF0EE7ULL }, /* XSUM_XXH3_testdata[4493] */\n    { 2247, 0x0000000000000000ULL, 0xFEE42592EF7949F4ULL }, /* XSUM_XXH3_testdata[4494] */\n    { 2247, 0x9E3779B185EBCA8DULL, 0x12E829B9589D157AULL }, /* XSUM_XXH3_testdata[4495] */\n    { 2248, 0x0000000000000000ULL, 0xF8D88BF42753ABEFULL }, /* XSUM_XXH3_testdata[4496] */\n    { 2248, 0x9E3779B185EBCA8DULL, 0x43D2B06987075096ULL }, /* XSUM_XXH3_testdata[4497] */\n    { 2249, 0x0000000000000000ULL, 0x433F7E65BABEFAE2ULL }, /* XSUM_XXH3_testdata[4498] */\n    { 2249, 0x9E3779B185EBCA8DULL, 0xEB03510641F3EAF5ULL }, /* XSUM_XXH3_testdata[4499] */\n    { 2250, 0x0000000000000000ULL, 0xCB6D8FCF1FBF3E2BULL }, /* XSUM_XXH3_testdata[4500] */\n    { 2250, 0x9E3779B185EBCA8DULL, 0xE405262636B96B7BULL }, /* XSUM_XXH3_testdata[4501] */\n    { 2251, 0x0000000000000000ULL, 0x88E4C80D03A165D4ULL }, /* XSUM_XXH3_testdata[4502] */\n    { 2251, 0x9E3779B185EBCA8DULL, 0xE6B07A12A77D3525ULL }, /* XSUM_XXH3_testdata[4503] */\n    { 2252, 0x0000000000000000ULL, 0x7EE028994641A9D0ULL }, /* XSUM_XXH3_testdata[4504] */\n    { 2252, 0x9E3779B185EBCA8DULL, 0x766BC25749111756ULL }, /* XSUM_XXH3_testdata[4505] */\n    { 2253, 0x0000000000000000ULL, 0xA9322E6F56357F96ULL }, /* XSUM_XXH3_testdata[4506] */\n    { 2253, 0x9E3779B185EBCA8DULL, 0x2D6E4A271DBBF521ULL }, /* XSUM_XXH3_testdata[4507] */\n    { 2254, 0x0000000000000000ULL, 0xD15B147C188AA2BBULL }, /* XSUM_XXH3_testdata[4508] */\n    { 2254, 0x9E3779B185EBCA8DULL, 0x7A4C01C9E6C70CCDULL }, /* XSUM_XXH3_testdata[4509] */\n    { 2255, 0x0000000000000000ULL, 0xDF32168D24541296ULL }, /* XSUM_XXH3_testdata[4510] */\n    { 2255, 0x9E3779B185EBCA8DULL, 0x4EF59C308318E6C4ULL }, /* XSUM_XXH3_testdata[4511] */\n    { 2256, 0x0000000000000000ULL, 0x73B27BE044941B9AULL }, /* XSUM_XXH3_testdata[4512] */\n    { 2256, 0x9E3779B185EBCA8DULL, 0xA95CC44C98A25F24ULL }, /* XSUM_XXH3_testdata[4513] */\n    { 2257, 0x0000000000000000ULL, 0xB7FF030FE002B07AULL }, /* XSUM_XXH3_testdata[4514] */\n    { 2257, 0x9E3779B185EBCA8DULL, 0xD5D5A36A92895385ULL }, /* XSUM_XXH3_testdata[4515] */\n    { 2258, 0x0000000000000000ULL, 0x3A79D49D11BC482DULL }, /* XSUM_XXH3_testdata[4516] */\n    { 2258, 0x9E3779B185EBCA8DULL, 0xA640B7A60386F7C4ULL }, /* XSUM_XXH3_testdata[4517] */\n    { 2259, 0x0000000000000000ULL, 0xEAA7DDE52003DB2BULL }, /* XSUM_XXH3_testdata[4518] */\n    { 2259, 0x9E3779B185EBCA8DULL, 0x0A9F761E2DA46512ULL }, /* XSUM_XXH3_testdata[4519] */\n    { 2260, 0x0000000000000000ULL, 0x806C898C78E7C075ULL }, /* XSUM_XXH3_testdata[4520] */\n    { 2260, 0x9E3779B185EBCA8DULL, 0xBF57DC6510BEFADEULL }, /* XSUM_XXH3_testdata[4521] */\n    { 2261, 0x0000000000000000ULL, 0x6B80C72796FD5086ULL }, /* XSUM_XXH3_testdata[4522] */\n    { 2261, 0x9E3779B185EBCA8DULL, 0x9A0504ADFE069F95ULL }, /* XSUM_XXH3_testdata[4523] */\n    { 2262, 0x0000000000000000ULL, 0xAD917992036A3B5AULL }, /* XSUM_XXH3_testdata[4524] */\n    { 2262, 0x9E3779B185EBCA8DULL, 0x3FAE6607A704C6FDULL }, /* XSUM_XXH3_testdata[4525] */\n    { 2263, 0x0000000000000000ULL, 0xD5C4096846EFC9FAULL }, /* XSUM_XXH3_testdata[4526] */\n    { 2263, 0x9E3779B185EBCA8DULL, 0xA59FC9AE584E4FFCULL }, /* XSUM_XXH3_testdata[4527] */\n    { 2264, 0x0000000000000000ULL, 0xC90E31857B03E2D8ULL }, /* XSUM_XXH3_testdata[4528] */\n    { 2264, 0x9E3779B185EBCA8DULL, 0x517AE8E7C0CA7721ULL }, /* XSUM_XXH3_testdata[4529] */\n    { 2265, 0x0000000000000000ULL, 0x0A338421E1E95A00ULL }, /* XSUM_XXH3_testdata[4530] */\n    { 2265, 0x9E3779B185EBCA8DULL, 0x49166C0E030CE3C2ULL }, /* XSUM_XXH3_testdata[4531] */\n    { 2266, 0x0000000000000000ULL, 0x442ACE25D6B1D5F9ULL }, /* XSUM_XXH3_testdata[4532] */\n    { 2266, 0x9E3779B185EBCA8DULL, 0x560649A1EE97FFECULL }, /* XSUM_XXH3_testdata[4533] */\n    { 2267, 0x0000000000000000ULL, 0x62832B7DC5917770ULL }, /* XSUM_XXH3_testdata[4534] */\n    { 2267, 0x9E3779B185EBCA8DULL, 0x9F21B3BC256217CDULL }, /* XSUM_XXH3_testdata[4535] */\n    { 2268, 0x0000000000000000ULL, 0x85E736777334BEB3ULL }, /* XSUM_XXH3_testdata[4536] */\n    { 2268, 0x9E3779B185EBCA8DULL, 0x085EB6DE430CBC01ULL }, /* XSUM_XXH3_testdata[4537] */\n    { 2269, 0x0000000000000000ULL, 0xB152650BDF04F3BDULL }, /* XSUM_XXH3_testdata[4538] */\n    { 2269, 0x9E3779B185EBCA8DULL, 0x59EE9A7FFA69591CULL }, /* XSUM_XXH3_testdata[4539] */\n    { 2270, 0x0000000000000000ULL, 0x7A78609851DB8E6CULL }, /* XSUM_XXH3_testdata[4540] */\n    { 2270, 0x9E3779B185EBCA8DULL, 0xA9DB0E062FA3A378ULL }, /* XSUM_XXH3_testdata[4541] */\n    { 2271, 0x0000000000000000ULL, 0x0DE4C74FC715BB66ULL }, /* XSUM_XXH3_testdata[4542] */\n    { 2271, 0x9E3779B185EBCA8DULL, 0x9667350BB9742CC2ULL }, /* XSUM_XXH3_testdata[4543] */\n    { 2272, 0x0000000000000000ULL, 0x205BA204206B1EA8ULL }, /* XSUM_XXH3_testdata[4544] */\n    { 2272, 0x9E3779B185EBCA8DULL, 0x65060EF03CA34352ULL }, /* XSUM_XXH3_testdata[4545] */\n    { 2273, 0x0000000000000000ULL, 0x78F18EA9AFB2BFA6ULL }, /* XSUM_XXH3_testdata[4546] */\n    { 2273, 0x9E3779B185EBCA8DULL, 0xE03E1E75C4F2ADC8ULL }, /* XSUM_XXH3_testdata[4547] */\n    { 2274, 0x0000000000000000ULL, 0xC95182F464F94C39ULL }, /* XSUM_XXH3_testdata[4548] */\n    { 2274, 0x9E3779B185EBCA8DULL, 0xF124B16F1B073F14ULL }, /* XSUM_XXH3_testdata[4549] */\n    { 2275, 0x0000000000000000ULL, 0x136A53CC1DAD378DULL }, /* XSUM_XXH3_testdata[4550] */\n    { 2275, 0x9E3779B185EBCA8DULL, 0xF3D85D25178CA3CEULL }, /* XSUM_XXH3_testdata[4551] */\n    { 2276, 0x0000000000000000ULL, 0x27C664F033387D11ULL }, /* XSUM_XXH3_testdata[4552] */\n    { 2276, 0x9E3779B185EBCA8DULL, 0x63F3842BC044F50CULL }, /* XSUM_XXH3_testdata[4553] */\n    { 2277, 0x0000000000000000ULL, 0x77B856EDB92FD06EULL }, /* XSUM_XXH3_testdata[4554] */\n    { 2277, 0x9E3779B185EBCA8DULL, 0x593AA4B7B0BAE338ULL }, /* XSUM_XXH3_testdata[4555] */\n    { 2278, 0x0000000000000000ULL, 0x1D47AFAB4DF2449BULL }, /* XSUM_XXH3_testdata[4556] */\n    { 2278, 0x9E3779B185EBCA8DULL, 0x8E5C48BB76EF91C6ULL }, /* XSUM_XXH3_testdata[4557] */\n    { 2279, 0x0000000000000000ULL, 0x0D7B7656E77FF387ULL }, /* XSUM_XXH3_testdata[4558] */\n    { 2279, 0x9E3779B185EBCA8DULL, 0x3B27C87292A3A4C6ULL }, /* XSUM_XXH3_testdata[4559] */\n    { 2280, 0x0000000000000000ULL, 0xBEDCDF7203D9E958ULL }, /* XSUM_XXH3_testdata[4560] */\n    { 2280, 0x9E3779B185EBCA8DULL, 0x06AC4295AE6C291BULL }, /* XSUM_XXH3_testdata[4561] */\n    { 2281, 0x0000000000000000ULL, 0xA1E08B2F1E533106ULL }, /* XSUM_XXH3_testdata[4562] */\n    { 2281, 0x9E3779B185EBCA8DULL, 0x53FA8D8EEF4A1C63ULL }, /* XSUM_XXH3_testdata[4563] */\n    { 2282, 0x0000000000000000ULL, 0x3EF3E8E701C0C7B4ULL }, /* XSUM_XXH3_testdata[4564] */\n    { 2282, 0x9E3779B185EBCA8DULL, 0xE0FD1C44964D8D77ULL }, /* XSUM_XXH3_testdata[4565] */\n    { 2283, 0x0000000000000000ULL, 0xC565B056636147AEULL }, /* XSUM_XXH3_testdata[4566] */\n    { 2283, 0x9E3779B185EBCA8DULL, 0x3B002D7D59F1A1B2ULL }, /* XSUM_XXH3_testdata[4567] */\n    { 2284, 0x0000000000000000ULL, 0x09A3D58C702C1043ULL }, /* XSUM_XXH3_testdata[4568] */\n    { 2284, 0x9E3779B185EBCA8DULL, 0x120E2516F3560387ULL }, /* XSUM_XXH3_testdata[4569] */\n    { 2285, 0x0000000000000000ULL, 0xBE7D2B875A7C12DFULL }, /* XSUM_XXH3_testdata[4570] */\n    { 2285, 0x9E3779B185EBCA8DULL, 0xC08D9B2134293E93ULL }, /* XSUM_XXH3_testdata[4571] */\n    { 2286, 0x0000000000000000ULL, 0x955BF3D2E94FD1FFULL }, /* XSUM_XXH3_testdata[4572] */\n    { 2286, 0x9E3779B185EBCA8DULL, 0xAA5CE1EDB06F7908ULL }, /* XSUM_XXH3_testdata[4573] */\n    { 2287, 0x0000000000000000ULL, 0xECD34428F06D5BFDULL }, /* XSUM_XXH3_testdata[4574] */\n    { 2287, 0x9E3779B185EBCA8DULL, 0x35880E98EEA5FF86ULL }, /* XSUM_XXH3_testdata[4575] */\n    { 2288, 0x0000000000000000ULL, 0xC945F58A3E11BBBFULL }, /* XSUM_XXH3_testdata[4576] */\n    { 2288, 0x9E3779B185EBCA8DULL, 0x99A70C813A3A8A06ULL }, /* XSUM_XXH3_testdata[4577] */\n    { 2289, 0x0000000000000000ULL, 0x2A1B1D4258A3EAD9ULL }, /* XSUM_XXH3_testdata[4578] */\n    { 2289, 0x9E3779B185EBCA8DULL, 0x026E77D4FFBBA3F7ULL }, /* XSUM_XXH3_testdata[4579] */\n    { 2290, 0x0000000000000000ULL, 0x737A11187E3CC729ULL }, /* XSUM_XXH3_testdata[4580] */\n    { 2290, 0x9E3779B185EBCA8DULL, 0xD890E8F23AC2243DULL }, /* XSUM_XXH3_testdata[4581] */\n    { 2291, 0x0000000000000000ULL, 0xD8B8D24905007477ULL }, /* XSUM_XXH3_testdata[4582] */\n    { 2291, 0x9E3779B185EBCA8DULL, 0xC612772E5EFD06FCULL }, /* XSUM_XXH3_testdata[4583] */\n    { 2292, 0x0000000000000000ULL, 0x75979C65433116DFULL }, /* XSUM_XXH3_testdata[4584] */\n    { 2292, 0x9E3779B185EBCA8DULL, 0xF6834E2FA35BF140ULL }, /* XSUM_XXH3_testdata[4585] */\n    { 2293, 0x0000000000000000ULL, 0xC6B24469C52F92F0ULL }, /* XSUM_XXH3_testdata[4586] */\n    { 2293, 0x9E3779B185EBCA8DULL, 0xDB3D609B07535CDAULL }, /* XSUM_XXH3_testdata[4587] */\n    { 2294, 0x0000000000000000ULL, 0x65BB90A9381B412AULL }, /* XSUM_XXH3_testdata[4588] */\n    { 2294, 0x9E3779B185EBCA8DULL, 0x9E48CE2F501345AFULL }, /* XSUM_XXH3_testdata[4589] */\n    { 2295, 0x0000000000000000ULL, 0x005CF4C4F7FEB7E7ULL }, /* XSUM_XXH3_testdata[4590] */\n    { 2295, 0x9E3779B185EBCA8DULL, 0x3012626B178A2890ULL }, /* XSUM_XXH3_testdata[4591] */\n    { 2296, 0x0000000000000000ULL, 0xD22B7B9D733C15EBULL }, /* XSUM_XXH3_testdata[4592] */\n    { 2296, 0x9E3779B185EBCA8DULL, 0xF1401C2EABBC67BFULL }, /* XSUM_XXH3_testdata[4593] */\n    { 2297, 0x0000000000000000ULL, 0x8BAF32C8CD870138ULL }, /* XSUM_XXH3_testdata[4594] */\n    { 2297, 0x9E3779B185EBCA8DULL, 0xDD48C8721FF0FF99ULL }, /* XSUM_XXH3_testdata[4595] */\n    { 2298, 0x0000000000000000ULL, 0xC39C343085640F78ULL }, /* XSUM_XXH3_testdata[4596] */\n    { 2298, 0x9E3779B185EBCA8DULL, 0x39263D88E4B12DECULL }, /* XSUM_XXH3_testdata[4597] */\n    { 2299, 0x0000000000000000ULL, 0x883DF03717BF1809ULL }, /* XSUM_XXH3_testdata[4598] */\n    { 2299, 0x9E3779B185EBCA8DULL, 0xAD7775D2C13889B7ULL }, /* XSUM_XXH3_testdata[4599] */\n    { 2300, 0x0000000000000000ULL, 0xE94780E1098E8AD5ULL }, /* XSUM_XXH3_testdata[4600] */\n    { 2300, 0x9E3779B185EBCA8DULL, 0x49C30E77841F419EULL }, /* XSUM_XXH3_testdata[4601] */\n    { 2301, 0x0000000000000000ULL, 0xB49F4AB400E3588BULL }, /* XSUM_XXH3_testdata[4602] */\n    { 2301, 0x9E3779B185EBCA8DULL, 0xC0B43B291C7D50E2ULL }, /* XSUM_XXH3_testdata[4603] */\n    { 2302, 0x0000000000000000ULL, 0xED4FE85093C1F085ULL }, /* XSUM_XXH3_testdata[4604] */\n    { 2302, 0x9E3779B185EBCA8DULL, 0x63AFDAE0A1025D7CULL }, /* XSUM_XXH3_testdata[4605] */\n    { 2303, 0x0000000000000000ULL, 0xF3DE079F959D331FULL }, /* XSUM_XXH3_testdata[4606] */\n    { 2303, 0x9E3779B185EBCA8DULL, 0xADC58DC8F5685791ULL }, /* XSUM_XXH3_testdata[4607] */\n    { 2304, 0x0000000000000000ULL, 0x16677470A0BCA896ULL }, /* XSUM_XXH3_testdata[4608] */\n    { 2304, 0x9E3779B185EBCA8DULL, 0x19DD85F7C3CD2427ULL }, /* XSUM_XXH3_testdata[4609] */\n    { 2305, 0x0000000000000000ULL, 0xEEDF43B5C7B9728CULL }, /* XSUM_XXH3_testdata[4610] */\n    { 2305, 0x9E3779B185EBCA8DULL, 0xC3ECE12FE8DC206EULL }, /* XSUM_XXH3_testdata[4611] */\n    { 2306, 0x0000000000000000ULL, 0x67586E22E7918464ULL }, /* XSUM_XXH3_testdata[4612] */\n    { 2306, 0x9E3779B185EBCA8DULL, 0x699DA7854C898E24ULL }, /* XSUM_XXH3_testdata[4613] */\n    { 2307, 0x0000000000000000ULL, 0xE6B9B555EC783F03ULL }, /* XSUM_XXH3_testdata[4614] */\n    { 2307, 0x9E3779B185EBCA8DULL, 0x85E3784DE2E5875BULL }, /* XSUM_XXH3_testdata[4615] */\n    { 2308, 0x0000000000000000ULL, 0x7C3C6B95D57777E4ULL }, /* XSUM_XXH3_testdata[4616] */\n    { 2308, 0x9E3779B185EBCA8DULL, 0x2BAF3E6A01143518ULL }, /* XSUM_XXH3_testdata[4617] */\n    { 2309, 0x0000000000000000ULL, 0xB2D2F7E9194C38C8ULL }, /* XSUM_XXH3_testdata[4618] */\n    { 2309, 0x9E3779B185EBCA8DULL, 0x08CFA0325B330C15ULL }, /* XSUM_XXH3_testdata[4619] */\n    { 2310, 0x0000000000000000ULL, 0x93BD3D647C099F3CULL }, /* XSUM_XXH3_testdata[4620] */\n    { 2310, 0x9E3779B185EBCA8DULL, 0xA31975D7871B3AE2ULL }, /* XSUM_XXH3_testdata[4621] */\n    { 2311, 0x0000000000000000ULL, 0x9DDB170614BB9FB5ULL }, /* XSUM_XXH3_testdata[4622] */\n    { 2311, 0x9E3779B185EBCA8DULL, 0x64EB1577898D85ABULL }, /* XSUM_XXH3_testdata[4623] */\n    { 2312, 0x0000000000000000ULL, 0x03510487528E3167ULL }, /* XSUM_XXH3_testdata[4624] */\n    { 2312, 0x9E3779B185EBCA8DULL, 0x569C5D84FBA7D5D8ULL }, /* XSUM_XXH3_testdata[4625] */\n    { 2313, 0x0000000000000000ULL, 0x83F66CE2C603CD7AULL }, /* XSUM_XXH3_testdata[4626] */\n    { 2313, 0x9E3779B185EBCA8DULL, 0x5FE69DBD86E8207CULL }, /* XSUM_XXH3_testdata[4627] */\n    { 2314, 0x0000000000000000ULL, 0x3E340E2AA806D580ULL }, /* XSUM_XXH3_testdata[4628] */\n    { 2314, 0x9E3779B185EBCA8DULL, 0xCCFDA55FF364E867ULL }, /* XSUM_XXH3_testdata[4629] */\n    { 2315, 0x0000000000000000ULL, 0x77948228CAAC839FULL }, /* XSUM_XXH3_testdata[4630] */\n    { 2315, 0x9E3779B185EBCA8DULL, 0xD867BD5C820D7CA4ULL }, /* XSUM_XXH3_testdata[4631] */\n    { 2316, 0x0000000000000000ULL, 0xA358FC1C95EDEFB1ULL }, /* XSUM_XXH3_testdata[4632] */\n    { 2316, 0x9E3779B185EBCA8DULL, 0xBE86C4D4964F616DULL }, /* XSUM_XXH3_testdata[4633] */\n    { 2317, 0x0000000000000000ULL, 0x592C2C674DBFA5E1ULL }, /* XSUM_XXH3_testdata[4634] */\n    { 2317, 0x9E3779B185EBCA8DULL, 0xB961DC246722DFE2ULL }, /* XSUM_XXH3_testdata[4635] */\n    { 2318, 0x0000000000000000ULL, 0x9D78B13CE3C7FE25ULL }, /* XSUM_XXH3_testdata[4636] */\n    { 2318, 0x9E3779B185EBCA8DULL, 0xE6B8F5ECDD2BEDE7ULL }, /* XSUM_XXH3_testdata[4637] */\n    { 2319, 0x0000000000000000ULL, 0xB93E58276543CBFEULL }, /* XSUM_XXH3_testdata[4638] */\n    { 2319, 0x9E3779B185EBCA8DULL, 0x7249F4DBA19A2F6BULL }, /* XSUM_XXH3_testdata[4639] */\n    { 2320, 0x0000000000000000ULL, 0xDEAD306DC84A30E3ULL }, /* XSUM_XXH3_testdata[4640] */\n    { 2320, 0x9E3779B185EBCA8DULL, 0x25A12038A67CF226ULL }, /* XSUM_XXH3_testdata[4641] */\n    { 2321, 0x0000000000000000ULL, 0x68C9AEEC565E82B9ULL }, /* XSUM_XXH3_testdata[4642] */\n    { 2321, 0x9E3779B185EBCA8DULL, 0x6FDC93837DB71F1FULL }, /* XSUM_XXH3_testdata[4643] */\n    { 2322, 0x0000000000000000ULL, 0xEF1D98CB4B1C4457ULL }, /* XSUM_XXH3_testdata[4644] */\n    { 2322, 0x9E3779B185EBCA8DULL, 0x56871B4AD7DE1080ULL }, /* XSUM_XXH3_testdata[4645] */\n    { 2323, 0x0000000000000000ULL, 0xB6163E363790B29BULL }, /* XSUM_XXH3_testdata[4646] */\n    { 2323, 0x9E3779B185EBCA8DULL, 0x005293AC1F8D8089ULL }, /* XSUM_XXH3_testdata[4647] */\n    { 2324, 0x0000000000000000ULL, 0x9F8BC517258F98E6ULL }, /* XSUM_XXH3_testdata[4648] */\n    { 2324, 0x9E3779B185EBCA8DULL, 0x7C4CE8558C514DDEULL }, /* XSUM_XXH3_testdata[4649] */\n    { 2325, 0x0000000000000000ULL, 0x177BEB437391C2B4ULL }, /* XSUM_XXH3_testdata[4650] */\n    { 2325, 0x9E3779B185EBCA8DULL, 0xA71D1BD2B3918CFCULL }, /* XSUM_XXH3_testdata[4651] */\n    { 2326, 0x0000000000000000ULL, 0x105176B2B29D46EDULL }, /* XSUM_XXH3_testdata[4652] */\n    { 2326, 0x9E3779B185EBCA8DULL, 0x44914594F5678B2BULL }, /* XSUM_XXH3_testdata[4653] */\n    { 2327, 0x0000000000000000ULL, 0x75F20D803272333FULL }, /* XSUM_XXH3_testdata[4654] */\n    { 2327, 0x9E3779B185EBCA8DULL, 0xC09622708F32C51DULL }, /* XSUM_XXH3_testdata[4655] */\n    { 2328, 0x0000000000000000ULL, 0xC9840B7DF3679DE5ULL }, /* XSUM_XXH3_testdata[4656] */\n    { 2328, 0x9E3779B185EBCA8DULL, 0x0628F71DEF9CA9B9ULL }, /* XSUM_XXH3_testdata[4657] */\n    { 2329, 0x0000000000000000ULL, 0x547CD6B9CC06F4E1ULL }, /* XSUM_XXH3_testdata[4658] */\n    { 2329, 0x9E3779B185EBCA8DULL, 0xFCD3AB14BE7B942BULL }, /* XSUM_XXH3_testdata[4659] */\n    { 2330, 0x0000000000000000ULL, 0x00DDC3B84881B56AULL }, /* XSUM_XXH3_testdata[4660] */\n    { 2330, 0x9E3779B185EBCA8DULL, 0xBCE205376DBCA1CEULL }, /* XSUM_XXH3_testdata[4661] */\n    { 2331, 0x0000000000000000ULL, 0xC6E1FB47CC10BD0CULL }, /* XSUM_XXH3_testdata[4662] */\n    { 2331, 0x9E3779B185EBCA8DULL, 0x5ED1015A48245D1AULL }, /* XSUM_XXH3_testdata[4663] */\n    { 2332, 0x0000000000000000ULL, 0xC203CF14C7812768ULL }, /* XSUM_XXH3_testdata[4664] */\n    { 2332, 0x9E3779B185EBCA8DULL, 0xAE6CED78162528BDULL }, /* XSUM_XXH3_testdata[4665] */\n    { 2333, 0x0000000000000000ULL, 0xDB94037DD38C9779ULL }, /* XSUM_XXH3_testdata[4666] */\n    { 2333, 0x9E3779B185EBCA8DULL, 0x0C4467D21B8A15B8ULL }, /* XSUM_XXH3_testdata[4667] */\n    { 2334, 0x0000000000000000ULL, 0x25219C6EACA8B876ULL }, /* XSUM_XXH3_testdata[4668] */\n    { 2334, 0x9E3779B185EBCA8DULL, 0x237F51AF413D775CULL }, /* XSUM_XXH3_testdata[4669] */\n    { 2335, 0x0000000000000000ULL, 0x84761CF8AD8FDCDCULL }, /* XSUM_XXH3_testdata[4670] */\n    { 2335, 0x9E3779B185EBCA8DULL, 0x51034B3E374768BEULL }, /* XSUM_XXH3_testdata[4671] */\n    { 2336, 0x0000000000000000ULL, 0x646ADDC91C20C0D1ULL }, /* XSUM_XXH3_testdata[4672] */\n    { 2336, 0x9E3779B185EBCA8DULL, 0x8A6FA9B4EE2D3EDCULL }, /* XSUM_XXH3_testdata[4673] */\n    { 2337, 0x0000000000000000ULL, 0x7C7CC3761B3E4ED1ULL }, /* XSUM_XXH3_testdata[4674] */\n    { 2337, 0x9E3779B185EBCA8DULL, 0x9773B70EEF4BE554ULL }, /* XSUM_XXH3_testdata[4675] */\n    { 2338, 0x0000000000000000ULL, 0xF8D4E0C09F0B9413ULL }, /* XSUM_XXH3_testdata[4676] */\n    { 2338, 0x9E3779B185EBCA8DULL, 0xC28F33A33B3C0D06ULL }, /* XSUM_XXH3_testdata[4677] */\n    { 2339, 0x0000000000000000ULL, 0xE90E496E95E28D0AULL }, /* XSUM_XXH3_testdata[4678] */\n    { 2339, 0x9E3779B185EBCA8DULL, 0xB73CB73CB16C6B32ULL }, /* XSUM_XXH3_testdata[4679] */\n    { 2340, 0x0000000000000000ULL, 0xB4671C7890A22982ULL }, /* XSUM_XXH3_testdata[4680] */\n    { 2340, 0x9E3779B185EBCA8DULL, 0xD09CFEC7F9E99B8AULL }, /* XSUM_XXH3_testdata[4681] */\n    { 2341, 0x0000000000000000ULL, 0x8165023FDB696528ULL }, /* XSUM_XXH3_testdata[4682] */\n    { 2341, 0x9E3779B185EBCA8DULL, 0xC75F1A3C09DC2EC0ULL }, /* XSUM_XXH3_testdata[4683] */\n    { 2342, 0x0000000000000000ULL, 0x3645D41D79592A95ULL }, /* XSUM_XXH3_testdata[4684] */\n    { 2342, 0x9E3779B185EBCA8DULL, 0x6F4452A6467783B0ULL }, /* XSUM_XXH3_testdata[4685] */\n    { 2343, 0x0000000000000000ULL, 0xF1ED40282C8884CBULL }, /* XSUM_XXH3_testdata[4686] */\n    { 2343, 0x9E3779B185EBCA8DULL, 0xC587035C7782FDDAULL }, /* XSUM_XXH3_testdata[4687] */\n    { 2344, 0x0000000000000000ULL, 0xA96F48DD5C721FBAULL }, /* XSUM_XXH3_testdata[4688] */\n    { 2344, 0x9E3779B185EBCA8DULL, 0xD0ABE3F8FD5C7916ULL }, /* XSUM_XXH3_testdata[4689] */\n    { 2345, 0x0000000000000000ULL, 0xC19A80FAAECE9A70ULL }, /* XSUM_XXH3_testdata[4690] */\n    { 2345, 0x9E3779B185EBCA8DULL, 0x6F2D171632F42DB9ULL }, /* XSUM_XXH3_testdata[4691] */\n    { 2346, 0x0000000000000000ULL, 0x897BE763FFB155DEULL }, /* XSUM_XXH3_testdata[4692] */\n    { 2346, 0x9E3779B185EBCA8DULL, 0xD63E55AE9C453BFBULL }, /* XSUM_XXH3_testdata[4693] */\n    { 2347, 0x0000000000000000ULL, 0x4D7CF54782AF36FCULL }, /* XSUM_XXH3_testdata[4694] */\n    { 2347, 0x9E3779B185EBCA8DULL, 0x9D7706F5DBC683A6ULL }, /* XSUM_XXH3_testdata[4695] */\n    { 2348, 0x0000000000000000ULL, 0x384DA1B1646A9E71ULL }, /* XSUM_XXH3_testdata[4696] */\n    { 2348, 0x9E3779B185EBCA8DULL, 0x8C629241D98ACC4EULL }, /* XSUM_XXH3_testdata[4697] */\n    { 2349, 0x0000000000000000ULL, 0x9B207D3155536F74ULL }, /* XSUM_XXH3_testdata[4698] */\n    { 2349, 0x9E3779B185EBCA8DULL, 0x89D7E8E4EC5494E3ULL }, /* XSUM_XXH3_testdata[4699] */\n    { 2350, 0x0000000000000000ULL, 0x8AA5382300DB7666ULL }, /* XSUM_XXH3_testdata[4700] */\n    { 2350, 0x9E3779B185EBCA8DULL, 0x2B8D20FA052D2516ULL }, /* XSUM_XXH3_testdata[4701] */\n    { 2351, 0x0000000000000000ULL, 0xE12F860E909E7476ULL }, /* XSUM_XXH3_testdata[4702] */\n    { 2351, 0x9E3779B185EBCA8DULL, 0x4A7D9E732CF06A13ULL }, /* XSUM_XXH3_testdata[4703] */\n    { 2352, 0x0000000000000000ULL, 0xE6E05AF95207F6D3ULL }, /* XSUM_XXH3_testdata[4704] */\n    { 2352, 0x9E3779B185EBCA8DULL, 0x5FF208793633440DULL }, /* XSUM_XXH3_testdata[4705] */\n    { 2353, 0x0000000000000000ULL, 0xC4B549BA270A8004ULL }, /* XSUM_XXH3_testdata[4706] */\n    { 2353, 0x9E3779B185EBCA8DULL, 0xC66B48806F287F63ULL }, /* XSUM_XXH3_testdata[4707] */\n    { 2354, 0x0000000000000000ULL, 0xC7803065E2803D31ULL }, /* XSUM_XXH3_testdata[4708] */\n    { 2354, 0x9E3779B185EBCA8DULL, 0xB2D6B5A38A32F560ULL }, /* XSUM_XXH3_testdata[4709] */\n    { 2355, 0x0000000000000000ULL, 0xC7500A98B2BFF9AEULL }, /* XSUM_XXH3_testdata[4710] */\n    { 2355, 0x9E3779B185EBCA8DULL, 0x562D14A99EAD5989ULL }, /* XSUM_XXH3_testdata[4711] */\n    { 2356, 0x0000000000000000ULL, 0x6CA7DF44BE47E963ULL }, /* XSUM_XXH3_testdata[4712] */\n    { 2356, 0x9E3779B185EBCA8DULL, 0x3AD492F595F77BAEULL }, /* XSUM_XXH3_testdata[4713] */\n    { 2357, 0x0000000000000000ULL, 0x26F4AC8EFB39794BULL }, /* XSUM_XXH3_testdata[4714] */\n    { 2357, 0x9E3779B185EBCA8DULL, 0xFDB28975A00FBF75ULL }, /* XSUM_XXH3_testdata[4715] */\n    { 2358, 0x0000000000000000ULL, 0x89396B87DA30246FULL }, /* XSUM_XXH3_testdata[4716] */\n    { 2358, 0x9E3779B185EBCA8DULL, 0x78C3FBE50A336A70ULL }, /* XSUM_XXH3_testdata[4717] */\n    { 2359, 0x0000000000000000ULL, 0x5F1D193EFE8747BDULL }, /* XSUM_XXH3_testdata[4718] */\n    { 2359, 0x9E3779B185EBCA8DULL, 0xF7DE5F7358D5A96FULL }, /* XSUM_XXH3_testdata[4719] */\n    { 2360, 0x0000000000000000ULL, 0xEF123E59AB08BFAFULL }, /* XSUM_XXH3_testdata[4720] */\n    { 2360, 0x9E3779B185EBCA8DULL, 0x235D1359CF0B0F68ULL }, /* XSUM_XXH3_testdata[4721] */\n    { 2361, 0x0000000000000000ULL, 0x400D81A69F810FCFULL }, /* XSUM_XXH3_testdata[4722] */\n    { 2361, 0x9E3779B185EBCA8DULL, 0x5A148B49DA75B74CULL }, /* XSUM_XXH3_testdata[4723] */\n    { 2362, 0x0000000000000000ULL, 0x0A3AC0A24D2ECAC1ULL }, /* XSUM_XXH3_testdata[4724] */\n    { 2362, 0x9E3779B185EBCA8DULL, 0xE01DE938B8193FE3ULL }, /* XSUM_XXH3_testdata[4725] */\n    { 2363, 0x0000000000000000ULL, 0x383581330EFB7EF0ULL }, /* XSUM_XXH3_testdata[4726] */\n    { 2363, 0x9E3779B185EBCA8DULL, 0xEADA25B2100BFCF8ULL }, /* XSUM_XXH3_testdata[4727] */\n    { 2364, 0x0000000000000000ULL, 0xBD10928B3A5C1EE5ULL }, /* XSUM_XXH3_testdata[4728] */\n    { 2364, 0x9E3779B185EBCA8DULL, 0xFDD30758359B8B48ULL }, /* XSUM_XXH3_testdata[4729] */\n    { 2365, 0x0000000000000000ULL, 0x4AD7F9F1BF8D2D6EULL }, /* XSUM_XXH3_testdata[4730] */\n    { 2365, 0x9E3779B185EBCA8DULL, 0xA267CE28E79A6282ULL }, /* XSUM_XXH3_testdata[4731] */\n    { 2366, 0x0000000000000000ULL, 0xAE5743D5B81D5B9EULL }, /* XSUM_XXH3_testdata[4732] */\n    { 2366, 0x9E3779B185EBCA8DULL, 0xFCEAD1CC5E07B6A9ULL }, /* XSUM_XXH3_testdata[4733] */\n    { 2367, 0x0000000000000000ULL, 0xCB37AEB9E5D361EDULL }, /* XSUM_XXH3_testdata[4734] */\n    { 2367, 0x9E3779B185EBCA8DULL, 0xD2DB3415B942B42AULL }, /* XSUM_XXH3_testdata[4735] */\n    { 2368, 0x0000000000000000ULL, 0x7BF80846CEB7121FULL }, /* XSUM_XXH3_testdata[4736] */\n    { 2368, 0x9E3779B185EBCA8DULL, 0xDAC21692ACD4E7B6ULL }, /* XSUM_XXH3_testdata[4737] */\n    { 2369, 0x0000000000000000ULL, 0xAC9EF0983F8A4E2DULL }, /* XSUM_XXH3_testdata[4738] */\n    { 2369, 0x9E3779B185EBCA8DULL, 0x1EC405082AC801E7ULL }, /* XSUM_XXH3_testdata[4739] */\n    { 2370, 0x0000000000000000ULL, 0x2D634985896B31D0ULL }, /* XSUM_XXH3_testdata[4740] */\n    { 2370, 0x9E3779B185EBCA8DULL, 0xD1917CFB6834266CULL }, /* XSUM_XXH3_testdata[4741] */\n    { 2371, 0x0000000000000000ULL, 0xAB602C01606BF9CCULL }, /* XSUM_XXH3_testdata[4742] */\n    { 2371, 0x9E3779B185EBCA8DULL, 0xEE3535106BCE8956ULL }, /* XSUM_XXH3_testdata[4743] */\n    { 2372, 0x0000000000000000ULL, 0x9FC8DCA3B47EA5ADULL }, /* XSUM_XXH3_testdata[4744] */\n    { 2372, 0x9E3779B185EBCA8DULL, 0x1418AD973790D956ULL }, /* XSUM_XXH3_testdata[4745] */\n    { 2373, 0x0000000000000000ULL, 0xF9AEEDEB5DBFFA68ULL }, /* XSUM_XXH3_testdata[4746] */\n    { 2373, 0x9E3779B185EBCA8DULL, 0x25FE2515747A5E12ULL }, /* XSUM_XXH3_testdata[4747] */\n    { 2374, 0x0000000000000000ULL, 0x8175A66989F79873ULL }, /* XSUM_XXH3_testdata[4748] */\n    { 2374, 0x9E3779B185EBCA8DULL, 0xFD3270C4714D82C8ULL }, /* XSUM_XXH3_testdata[4749] */\n    { 2375, 0x0000000000000000ULL, 0x275FF23CE3DC4593ULL }, /* XSUM_XXH3_testdata[4750] */\n    { 2375, 0x9E3779B185EBCA8DULL, 0x5C6AE4A0B8D3E584ULL }, /* XSUM_XXH3_testdata[4751] */\n    { 2376, 0x0000000000000000ULL, 0x297633E6D89244CEULL }, /* XSUM_XXH3_testdata[4752] */\n    { 2376, 0x9E3779B185EBCA8DULL, 0xF880C7918F0E8F6FULL }, /* XSUM_XXH3_testdata[4753] */\n    { 2377, 0x0000000000000000ULL, 0x7D01B42A26A3AA4FULL }, /* XSUM_XXH3_testdata[4754] */\n    { 2377, 0x9E3779B185EBCA8DULL, 0x9B3152CDB0E90B93ULL }, /* XSUM_XXH3_testdata[4755] */\n    { 2378, 0x0000000000000000ULL, 0x9A208842D0BB08F6ULL }, /* XSUM_XXH3_testdata[4756] */\n    { 2378, 0x9E3779B185EBCA8DULL, 0x3A2E4AEB216684ECULL }, /* XSUM_XXH3_testdata[4757] */\n    { 2379, 0x0000000000000000ULL, 0x40974B3BF1A11D89ULL }, /* XSUM_XXH3_testdata[4758] */\n    { 2379, 0x9E3779B185EBCA8DULL, 0xBA04552CCB5B3E3CULL }, /* XSUM_XXH3_testdata[4759] */\n    { 2380, 0x0000000000000000ULL, 0x2F3A828F6C4CDAA4ULL }, /* XSUM_XXH3_testdata[4760] */\n    { 2380, 0x9E3779B185EBCA8DULL, 0xAEEA8CD6166097B9ULL }, /* XSUM_XXH3_testdata[4761] */\n    { 2381, 0x0000000000000000ULL, 0x7A2AF424699B079CULL }, /* XSUM_XXH3_testdata[4762] */\n    { 2381, 0x9E3779B185EBCA8DULL, 0xC8D43B8870FD4CBBULL }, /* XSUM_XXH3_testdata[4763] */\n    { 2382, 0x0000000000000000ULL, 0x9304DE8DA31BD496ULL }, /* XSUM_XXH3_testdata[4764] */\n    { 2382, 0x9E3779B185EBCA8DULL, 0x34593C6BFFA5D569ULL }, /* XSUM_XXH3_testdata[4765] */\n    { 2383, 0x0000000000000000ULL, 0x80D3BA1CA3F56190ULL }, /* XSUM_XXH3_testdata[4766] */\n    { 2383, 0x9E3779B185EBCA8DULL, 0xDDB69D91088C128AULL }, /* XSUM_XXH3_testdata[4767] */\n    { 2384, 0x0000000000000000ULL, 0x441C9D94F2B9C0DFULL }, /* XSUM_XXH3_testdata[4768] */\n    { 2384, 0x9E3779B185EBCA8DULL, 0x55D3007BA3042A2AULL }, /* XSUM_XXH3_testdata[4769] */\n    { 2385, 0x0000000000000000ULL, 0xE33C4DD70CAEBEE7ULL }, /* XSUM_XXH3_testdata[4770] */\n    { 2385, 0x9E3779B185EBCA8DULL, 0x0FB197212BBB263CULL }, /* XSUM_XXH3_testdata[4771] */\n    { 2386, 0x0000000000000000ULL, 0x06B51492A0779957ULL }, /* XSUM_XXH3_testdata[4772] */\n    { 2386, 0x9E3779B185EBCA8DULL, 0xD1826B20858877D2ULL }, /* XSUM_XXH3_testdata[4773] */\n    { 2387, 0x0000000000000000ULL, 0x17382140103BDFA5ULL }, /* XSUM_XXH3_testdata[4774] */\n    { 2387, 0x9E3779B185EBCA8DULL, 0x7CDB9A8AB644F256ULL }, /* XSUM_XXH3_testdata[4775] */\n    { 2388, 0x0000000000000000ULL, 0xC90AC3182F1ABB4DULL }, /* XSUM_XXH3_testdata[4776] */\n    { 2388, 0x9E3779B185EBCA8DULL, 0xA399378375830CCEULL }, /* XSUM_XXH3_testdata[4777] */\n    { 2389, 0x0000000000000000ULL, 0x4BF7F88719686A38ULL }, /* XSUM_XXH3_testdata[4778] */\n    { 2389, 0x9E3779B185EBCA8DULL, 0x801FD351A856CED5ULL }, /* XSUM_XXH3_testdata[4779] */\n    { 2390, 0x0000000000000000ULL, 0x2A54054B3745B0E8ULL }, /* XSUM_XXH3_testdata[4780] */\n    { 2390, 0x9E3779B185EBCA8DULL, 0x32AC9D7484C16CFCULL }, /* XSUM_XXH3_testdata[4781] */\n    { 2391, 0x0000000000000000ULL, 0xB42E2F3FBF9C7FF6ULL }, /* XSUM_XXH3_testdata[4782] */\n    { 2391, 0x9E3779B185EBCA8DULL, 0x2ECCD134F6208ABAULL }, /* XSUM_XXH3_testdata[4783] */\n    { 2392, 0x0000000000000000ULL, 0xE29C067EEB709C6DULL }, /* XSUM_XXH3_testdata[4784] */\n    { 2392, 0x9E3779B185EBCA8DULL, 0x725625789A95FAA0ULL }, /* XSUM_XXH3_testdata[4785] */\n    { 2393, 0x0000000000000000ULL, 0x363009F768016562ULL }, /* XSUM_XXH3_testdata[4786] */\n    { 2393, 0x9E3779B185EBCA8DULL, 0x138C189F0AFE235FULL }, /* XSUM_XXH3_testdata[4787] */\n    { 2394, 0x0000000000000000ULL, 0xF1C5DC9942E866F8ULL }, /* XSUM_XXH3_testdata[4788] */\n    { 2394, 0x9E3779B185EBCA8DULL, 0xCBB7386F910F0A8EULL }, /* XSUM_XXH3_testdata[4789] */\n    { 2395, 0x0000000000000000ULL, 0x815C06F88504756EULL }, /* XSUM_XXH3_testdata[4790] */\n    { 2395, 0x9E3779B185EBCA8DULL, 0x781575D8B8AE688CULL }, /* XSUM_XXH3_testdata[4791] */\n    { 2396, 0x0000000000000000ULL, 0x0A94F1D7A46A7F11ULL }, /* XSUM_XXH3_testdata[4792] */\n    { 2396, 0x9E3779B185EBCA8DULL, 0xF3AF477BD3FDDFE3ULL }, /* XSUM_XXH3_testdata[4793] */\n    { 2397, 0x0000000000000000ULL, 0x7E46BD55D126BAB4ULL }, /* XSUM_XXH3_testdata[4794] */\n    { 2397, 0x9E3779B185EBCA8DULL, 0x530FCDA69E0755EEULL }, /* XSUM_XXH3_testdata[4795] */\n    { 2398, 0x0000000000000000ULL, 0x3D0260D2BD9CDCF8ULL }, /* XSUM_XXH3_testdata[4796] */\n    { 2398, 0x9E3779B185EBCA8DULL, 0x9E79B2ED95CC1C13ULL }, /* XSUM_XXH3_testdata[4797] */\n    { 2399, 0x0000000000000000ULL, 0x3E202057EEB160DCULL }, /* XSUM_XXH3_testdata[4798] */\n    { 2399, 0x9E3779B185EBCA8DULL, 0xFD61D2735B23807EULL }, /* XSUM_XXH3_testdata[4799] */\n    { 2400, 0x0000000000000000ULL, 0x7DF9FC66BF737FD6ULL }, /* XSUM_XXH3_testdata[4800] */\n    { 2400, 0x9E3779B185EBCA8DULL, 0xADA195576C66A546ULL }, /* XSUM_XXH3_testdata[4801] */\n    { 2401, 0x0000000000000000ULL, 0xE6DDEA16AEC1807AULL }, /* XSUM_XXH3_testdata[4802] */\n    { 2401, 0x9E3779B185EBCA8DULL, 0x03A77C66A1824D3EULL }, /* XSUM_XXH3_testdata[4803] */\n    { 2402, 0x0000000000000000ULL, 0xD881F94BA815ABC6ULL }, /* XSUM_XXH3_testdata[4804] */\n    { 2402, 0x9E3779B185EBCA8DULL, 0xDC8F9DA703D3AB56ULL }, /* XSUM_XXH3_testdata[4805] */\n    { 2403, 0x0000000000000000ULL, 0x517AFA5E367BB9D5ULL }, /* XSUM_XXH3_testdata[4806] */\n    { 2403, 0x9E3779B185EBCA8DULL, 0xBB4B3A775BD26BD9ULL }, /* XSUM_XXH3_testdata[4807] */\n    { 2404, 0x0000000000000000ULL, 0x28B4866679822E0AULL }, /* XSUM_XXH3_testdata[4808] */\n    { 2404, 0x9E3779B185EBCA8DULL, 0xAA51349D15CC0FDEULL }, /* XSUM_XXH3_testdata[4809] */\n    { 2405, 0x0000000000000000ULL, 0x3CE5C20DE2F5C897ULL }, /* XSUM_XXH3_testdata[4810] */\n    { 2405, 0x9E3779B185EBCA8DULL, 0xEEDCE89587FD1C51ULL }, /* XSUM_XXH3_testdata[4811] */\n    { 2406, 0x0000000000000000ULL, 0x2817C7FEB92F4ECCULL }, /* XSUM_XXH3_testdata[4812] */\n    { 2406, 0x9E3779B185EBCA8DULL, 0xF271D583D5C08D60ULL }, /* XSUM_XXH3_testdata[4813] */\n    { 2407, 0x0000000000000000ULL, 0x7138C004788FC3C5ULL }, /* XSUM_XXH3_testdata[4814] */\n    { 2407, 0x9E3779B185EBCA8DULL, 0x900C534E25F8EE8FULL }, /* XSUM_XXH3_testdata[4815] */\n    { 2408, 0x0000000000000000ULL, 0x0604E4B6EA6C24D5ULL }, /* XSUM_XXH3_testdata[4816] */\n    { 2408, 0x9E3779B185EBCA8DULL, 0x9531D4198EB93D16ULL }, /* XSUM_XXH3_testdata[4817] */\n    { 2409, 0x0000000000000000ULL, 0x6C65C2A586EDE755ULL }, /* XSUM_XXH3_testdata[4818] */\n    { 2409, 0x9E3779B185EBCA8DULL, 0x8CEEEE8B7F6A04B7ULL }, /* XSUM_XXH3_testdata[4819] */\n    { 2410, 0x0000000000000000ULL, 0x3A325C261826AEE7ULL }, /* XSUM_XXH3_testdata[4820] */\n    { 2410, 0x9E3779B185EBCA8DULL, 0x69A9A60F334C045DULL }, /* XSUM_XXH3_testdata[4821] */\n    { 2411, 0x0000000000000000ULL, 0x2BD1BD1E1D3B60A0ULL }, /* XSUM_XXH3_testdata[4822] */\n    { 2411, 0x9E3779B185EBCA8DULL, 0x878A04EDAC12EA22ULL }, /* XSUM_XXH3_testdata[4823] */\n    { 2412, 0x0000000000000000ULL, 0x7051EE180E0E02CBULL }, /* XSUM_XXH3_testdata[4824] */\n    { 2412, 0x9E3779B185EBCA8DULL, 0xF8BDAEBB507AC864ULL }, /* XSUM_XXH3_testdata[4825] */\n    { 2413, 0x0000000000000000ULL, 0x8DCDDD287F97CF14ULL }, /* XSUM_XXH3_testdata[4826] */\n    { 2413, 0x9E3779B185EBCA8DULL, 0x0B36D5B0FDA5985CULL }, /* XSUM_XXH3_testdata[4827] */\n    { 2414, 0x0000000000000000ULL, 0x3EE02E4436180A4FULL }, /* XSUM_XXH3_testdata[4828] */\n    { 2414, 0x9E3779B185EBCA8DULL, 0xC63FA36634A9AA30ULL }, /* XSUM_XXH3_testdata[4829] */\n    { 2415, 0x0000000000000000ULL, 0xBDEA754E7720A901ULL }, /* XSUM_XXH3_testdata[4830] */\n    { 2415, 0x9E3779B185EBCA8DULL, 0x5AFF8F9C6A0EFDC1ULL }, /* XSUM_XXH3_testdata[4831] */\n    { 2416, 0x0000000000000000ULL, 0x0DB29183CD25C6D5ULL }, /* XSUM_XXH3_testdata[4832] */\n    { 2416, 0x9E3779B185EBCA8DULL, 0x98B8811EA213EF90ULL }, /* XSUM_XXH3_testdata[4833] */\n    { 2417, 0x0000000000000000ULL, 0x9DC19422D90242D7ULL }, /* XSUM_XXH3_testdata[4834] */\n    { 2417, 0x9E3779B185EBCA8DULL, 0x40280F790E110E26ULL }, /* XSUM_XXH3_testdata[4835] */\n    { 2418, 0x0000000000000000ULL, 0xA82B1C76DE8149B2ULL }, /* XSUM_XXH3_testdata[4836] */\n    { 2418, 0x9E3779B185EBCA8DULL, 0x142A9DC28F9B34E1ULL }, /* XSUM_XXH3_testdata[4837] */\n    { 2419, 0x0000000000000000ULL, 0xD851B8B3E2B52CACULL }, /* XSUM_XXH3_testdata[4838] */\n    { 2419, 0x9E3779B185EBCA8DULL, 0xF5C9BBF4F167C0F7ULL }, /* XSUM_XXH3_testdata[4839] */\n    { 2420, 0x0000000000000000ULL, 0x8529E9FC2DAF0D5DULL }, /* XSUM_XXH3_testdata[4840] */\n    { 2420, 0x9E3779B185EBCA8DULL, 0x4EF21EF6AF152D63ULL }, /* XSUM_XXH3_testdata[4841] */\n    { 2421, 0x0000000000000000ULL, 0x5249697149FEC1F9ULL }, /* XSUM_XXH3_testdata[4842] */\n    { 2421, 0x9E3779B185EBCA8DULL, 0x65D35A4934C7603CULL }, /* XSUM_XXH3_testdata[4843] */\n    { 2422, 0x0000000000000000ULL, 0xF5D127B3552F2A4DULL }, /* XSUM_XXH3_testdata[4844] */\n    { 2422, 0x9E3779B185EBCA8DULL, 0xAF75261C2DB129A2ULL }, /* XSUM_XXH3_testdata[4845] */\n    { 2423, 0x0000000000000000ULL, 0x09AE23AE7ABE9D33ULL }, /* XSUM_XXH3_testdata[4846] */\n    { 2423, 0x9E3779B185EBCA8DULL, 0xC5C469E69AE9C75EULL }, /* XSUM_XXH3_testdata[4847] */\n    { 2424, 0x0000000000000000ULL, 0x9D5F8EC8EAA2F01BULL }, /* XSUM_XXH3_testdata[4848] */\n    { 2424, 0x9E3779B185EBCA8DULL, 0x4FB82BD884C0D7A3ULL }, /* XSUM_XXH3_testdata[4849] */\n    { 2425, 0x0000000000000000ULL, 0x48C09EBF46A108C7ULL }, /* XSUM_XXH3_testdata[4850] */\n    { 2425, 0x9E3779B185EBCA8DULL, 0x883A820B8C4B86A2ULL }, /* XSUM_XXH3_testdata[4851] */\n    { 2426, 0x0000000000000000ULL, 0x3C6DFD3F231240EDULL }, /* XSUM_XXH3_testdata[4852] */\n    { 2426, 0x9E3779B185EBCA8DULL, 0x542145FC300CEEBEULL }, /* XSUM_XXH3_testdata[4853] */\n    { 2427, 0x0000000000000000ULL, 0xF29C5ABE595973EAULL }, /* XSUM_XXH3_testdata[4854] */\n    { 2427, 0x9E3779B185EBCA8DULL, 0x4FEA334DD9B79E8DULL }, /* XSUM_XXH3_testdata[4855] */\n    { 2428, 0x0000000000000000ULL, 0x181F632921366CA0ULL }, /* XSUM_XXH3_testdata[4856] */\n    { 2428, 0x9E3779B185EBCA8DULL, 0xE56364DBE587A5A1ULL }, /* XSUM_XXH3_testdata[4857] */\n    { 2429, 0x0000000000000000ULL, 0xCD451D734527603DULL }, /* XSUM_XXH3_testdata[4858] */\n    { 2429, 0x9E3779B185EBCA8DULL, 0xE02AEC9CA72BCE50ULL }, /* XSUM_XXH3_testdata[4859] */\n    { 2430, 0x0000000000000000ULL, 0x9D2998805DBCA3B0ULL }, /* XSUM_XXH3_testdata[4860] */\n    { 2430, 0x9E3779B185EBCA8DULL, 0xD1E0757C87B4C04AULL }, /* XSUM_XXH3_testdata[4861] */\n    { 2431, 0x0000000000000000ULL, 0x23A692E3C69FC54DULL }, /* XSUM_XXH3_testdata[4862] */\n    { 2431, 0x9E3779B185EBCA8DULL, 0x4887EE15CCDA25D0ULL }, /* XSUM_XXH3_testdata[4863] */\n    { 2432, 0x0000000000000000ULL, 0x8DC7DF4949BF38DFULL }, /* XSUM_XXH3_testdata[4864] */\n    { 2432, 0x9E3779B185EBCA8DULL, 0x2979E98145138149ULL }, /* XSUM_XXH3_testdata[4865] */\n    { 2433, 0x0000000000000000ULL, 0xB8D09DA11BD7BB41ULL }, /* XSUM_XXH3_testdata[4866] */\n    { 2433, 0x9E3779B185EBCA8DULL, 0x09CF950068A3F8A7ULL }, /* XSUM_XXH3_testdata[4867] */\n    { 2434, 0x0000000000000000ULL, 0x602D368415842878ULL }, /* XSUM_XXH3_testdata[4868] */\n    { 2434, 0x9E3779B185EBCA8DULL, 0x05431A9CC10643C8ULL }, /* XSUM_XXH3_testdata[4869] */\n    { 2435, 0x0000000000000000ULL, 0x0D5A57C81AF12097ULL }, /* XSUM_XXH3_testdata[4870] */\n    { 2435, 0x9E3779B185EBCA8DULL, 0x2C570690D39384C4ULL }, /* XSUM_XXH3_testdata[4871] */\n    { 2436, 0x0000000000000000ULL, 0xABDAB965D51BE0A7ULL }, /* XSUM_XXH3_testdata[4872] */\n    { 2436, 0x9E3779B185EBCA8DULL, 0xB944CA075AE79E7CULL }, /* XSUM_XXH3_testdata[4873] */\n    { 2437, 0x0000000000000000ULL, 0xF9F7285746440004ULL }, /* XSUM_XXH3_testdata[4874] */\n    { 2437, 0x9E3779B185EBCA8DULL, 0xB26C26664D2A9600ULL }, /* XSUM_XXH3_testdata[4875] */\n    { 2438, 0x0000000000000000ULL, 0x41E0CB5498B910DCULL }, /* XSUM_XXH3_testdata[4876] */\n    { 2438, 0x9E3779B185EBCA8DULL, 0x9A9E28BC453B8DB5ULL }, /* XSUM_XXH3_testdata[4877] */\n    { 2439, 0x0000000000000000ULL, 0x4066C83ED65F4C42ULL }, /* XSUM_XXH3_testdata[4878] */\n    { 2439, 0x9E3779B185EBCA8DULL, 0xB20C91861C646670ULL }, /* XSUM_XXH3_testdata[4879] */\n    { 2440, 0x0000000000000000ULL, 0x28C42D7C1D7ADB58ULL }, /* XSUM_XXH3_testdata[4880] */\n    { 2440, 0x9E3779B185EBCA8DULL, 0x7ECC97D6D7A3B313ULL }, /* XSUM_XXH3_testdata[4881] */\n    { 2441, 0x0000000000000000ULL, 0x39B0DF7528EA6FF4ULL }, /* XSUM_XXH3_testdata[4882] */\n    { 2441, 0x9E3779B185EBCA8DULL, 0xE78D153ACA9FBCA9ULL }, /* XSUM_XXH3_testdata[4883] */\n    { 2442, 0x0000000000000000ULL, 0x15154D6AD175D54DULL }, /* XSUM_XXH3_testdata[4884] */\n    { 2442, 0x9E3779B185EBCA8DULL, 0xA61EE4A6487F4B71ULL }, /* XSUM_XXH3_testdata[4885] */\n    { 2443, 0x0000000000000000ULL, 0x8E8C8526F590986EULL }, /* XSUM_XXH3_testdata[4886] */\n    { 2443, 0x9E3779B185EBCA8DULL, 0xF727EC9ED02986A7ULL }, /* XSUM_XXH3_testdata[4887] */\n    { 2444, 0x0000000000000000ULL, 0x7C531BE3A6674EA0ULL }, /* XSUM_XXH3_testdata[4888] */\n    { 2444, 0x9E3779B185EBCA8DULL, 0x6D2D1FAC09361F28ULL }, /* XSUM_XXH3_testdata[4889] */\n    { 2445, 0x0000000000000000ULL, 0x4AAEA74B017E72F8ULL }, /* XSUM_XXH3_testdata[4890] */\n    { 2445, 0x9E3779B185EBCA8DULL, 0x35E7817B42766DCEULL }, /* XSUM_XXH3_testdata[4891] */\n    { 2446, 0x0000000000000000ULL, 0xC3F8C3084B712F01ULL }, /* XSUM_XXH3_testdata[4892] */\n    { 2446, 0x9E3779B185EBCA8DULL, 0x588951B04523ABCFULL }, /* XSUM_XXH3_testdata[4893] */\n    { 2447, 0x0000000000000000ULL, 0xF22E9F3E39912A2BULL }, /* XSUM_XXH3_testdata[4894] */\n    { 2447, 0x9E3779B185EBCA8DULL, 0x849BC016B76881E7ULL }, /* XSUM_XXH3_testdata[4895] */\n    { 2448, 0x0000000000000000ULL, 0x642CCF0761F30F6AULL }, /* XSUM_XXH3_testdata[4896] */\n    { 2448, 0x9E3779B185EBCA8DULL, 0x9FC2C7AB7B85313DULL }, /* XSUM_XXH3_testdata[4897] */\n    { 2449, 0x0000000000000000ULL, 0xD4E2D63D237029A9ULL }, /* XSUM_XXH3_testdata[4898] */\n    { 2449, 0x9E3779B185EBCA8DULL, 0xAF548A5F25D3F854ULL }, /* XSUM_XXH3_testdata[4899] */\n    { 2450, 0x0000000000000000ULL, 0x53F599D71297C443ULL }, /* XSUM_XXH3_testdata[4900] */\n    { 2450, 0x9E3779B185EBCA8DULL, 0xFEE1BDB8A8075A81ULL }, /* XSUM_XXH3_testdata[4901] */\n    { 2451, 0x0000000000000000ULL, 0xBCAA7FFECC0FCBC1ULL }, /* XSUM_XXH3_testdata[4902] */\n    { 2451, 0x9E3779B185EBCA8DULL, 0xE2B0FAF0CF5793F2ULL }, /* XSUM_XXH3_testdata[4903] */\n    { 2452, 0x0000000000000000ULL, 0x925FE275AFED3F64ULL }, /* XSUM_XXH3_testdata[4904] */\n    { 2452, 0x9E3779B185EBCA8DULL, 0x71873D6DEAACA142ULL }, /* XSUM_XXH3_testdata[4905] */\n    { 2453, 0x0000000000000000ULL, 0xDABED809BA99689FULL }, /* XSUM_XXH3_testdata[4906] */\n    { 2453, 0x9E3779B185EBCA8DULL, 0x170924333DB0395AULL }, /* XSUM_XXH3_testdata[4907] */\n    { 2454, 0x0000000000000000ULL, 0xB6220703B8544774ULL }, /* XSUM_XXH3_testdata[4908] */\n    { 2454, 0x9E3779B185EBCA8DULL, 0x601D674299EFE340ULL }, /* XSUM_XXH3_testdata[4909] */\n    { 2455, 0x0000000000000000ULL, 0xE23994D8DDA1F254ULL }, /* XSUM_XXH3_testdata[4910] */\n    { 2455, 0x9E3779B185EBCA8DULL, 0x0E19C8258C172708ULL }, /* XSUM_XXH3_testdata[4911] */\n    { 2456, 0x0000000000000000ULL, 0x1876B35C77339FCCULL }, /* XSUM_XXH3_testdata[4912] */\n    { 2456, 0x9E3779B185EBCA8DULL, 0xF22B8BC4422C4A49ULL }, /* XSUM_XXH3_testdata[4913] */\n    { 2457, 0x0000000000000000ULL, 0x313A6E1EA6811FD1ULL }, /* XSUM_XXH3_testdata[4914] */\n    { 2457, 0x9E3779B185EBCA8DULL, 0xB1EA861656EE51BCULL }, /* XSUM_XXH3_testdata[4915] */\n    { 2458, 0x0000000000000000ULL, 0x0498A44D87713BC7ULL }, /* XSUM_XXH3_testdata[4916] */\n    { 2458, 0x9E3779B185EBCA8DULL, 0x17205DEC8F82C2E7ULL }, /* XSUM_XXH3_testdata[4917] */\n    { 2459, 0x0000000000000000ULL, 0x406D73AAA0FF6D3FULL }, /* XSUM_XXH3_testdata[4918] */\n    { 2459, 0x9E3779B185EBCA8DULL, 0xE71DF2534C959D90ULL }, /* XSUM_XXH3_testdata[4919] */\n    { 2460, 0x0000000000000000ULL, 0xFD13A835848BFD82ULL }, /* XSUM_XXH3_testdata[4920] */\n    { 2460, 0x9E3779B185EBCA8DULL, 0xD3B50CA1421D3A51ULL }, /* XSUM_XXH3_testdata[4921] */\n    { 2461, 0x0000000000000000ULL, 0x82133237CB17D5AFULL }, /* XSUM_XXH3_testdata[4922] */\n    { 2461, 0x9E3779B185EBCA8DULL, 0xB2E52F0267163959ULL }, /* XSUM_XXH3_testdata[4923] */\n    { 2462, 0x0000000000000000ULL, 0x1D113E71BA2A0486ULL }, /* XSUM_XXH3_testdata[4924] */\n    { 2462, 0x9E3779B185EBCA8DULL, 0xE65EB4D0A760BC93ULL }, /* XSUM_XXH3_testdata[4925] */\n    { 2463, 0x0000000000000000ULL, 0xBFB5AB6F9BF505D3ULL }, /* XSUM_XXH3_testdata[4926] */\n    { 2463, 0x9E3779B185EBCA8DULL, 0xB13A757A0FE44631ULL }, /* XSUM_XXH3_testdata[4927] */\n    { 2464, 0x0000000000000000ULL, 0xB03059CD80210C92ULL }, /* XSUM_XXH3_testdata[4928] */\n    { 2464, 0x9E3779B185EBCA8DULL, 0x0918BBEBAF5DA807ULL }, /* XSUM_XXH3_testdata[4929] */\n    { 2465, 0x0000000000000000ULL, 0xE0BF0FD1C1967D68ULL }, /* XSUM_XXH3_testdata[4930] */\n    { 2465, 0x9E3779B185EBCA8DULL, 0x9F364253BBDF2D66ULL }, /* XSUM_XXH3_testdata[4931] */\n    { 2466, 0x0000000000000000ULL, 0xBA20A1D0EE4972DCULL }, /* XSUM_XXH3_testdata[4932] */\n    { 2466, 0x9E3779B185EBCA8DULL, 0xDD9FCF2B0F38C374ULL }, /* XSUM_XXH3_testdata[4933] */\n    { 2467, 0x0000000000000000ULL, 0xD0E4644C09C66D79ULL }, /* XSUM_XXH3_testdata[4934] */\n    { 2467, 0x9E3779B185EBCA8DULL, 0x9FD6101B524C3689ULL }, /* XSUM_XXH3_testdata[4935] */\n    { 2468, 0x0000000000000000ULL, 0xA72FF00D991C2BECULL }, /* XSUM_XXH3_testdata[4936] */\n    { 2468, 0x9E3779B185EBCA8DULL, 0x66B8057EA205D71EULL }, /* XSUM_XXH3_testdata[4937] */\n    { 2469, 0x0000000000000000ULL, 0xF0AE948DB61194C8ULL }, /* XSUM_XXH3_testdata[4938] */\n    { 2469, 0x9E3779B185EBCA8DULL, 0x50BE61DD641CB7B4ULL }, /* XSUM_XXH3_testdata[4939] */\n    { 2470, 0x0000000000000000ULL, 0x23DBBEEBF027DC17ULL }, /* XSUM_XXH3_testdata[4940] */\n    { 2470, 0x9E3779B185EBCA8DULL, 0x70B592CF49D038CAULL }, /* XSUM_XXH3_testdata[4941] */\n    { 2471, 0x0000000000000000ULL, 0x77017F8424BEA763ULL }, /* XSUM_XXH3_testdata[4942] */\n    { 2471, 0x9E3779B185EBCA8DULL, 0x084397E9E092B31EULL }, /* XSUM_XXH3_testdata[4943] */\n    { 2472, 0x0000000000000000ULL, 0xC39B583F82D5ED3AULL }, /* XSUM_XXH3_testdata[4944] */\n    { 2472, 0x9E3779B185EBCA8DULL, 0xAE4BAD1A9C5685E6ULL }, /* XSUM_XXH3_testdata[4945] */\n    { 2473, 0x0000000000000000ULL, 0x2C5AC1B00E9148A9ULL }, /* XSUM_XXH3_testdata[4946] */\n    { 2473, 0x9E3779B185EBCA8DULL, 0xFDFDA5F93706FB93ULL }, /* XSUM_XXH3_testdata[4947] */\n    { 2474, 0x0000000000000000ULL, 0x493526E0DB2924E9ULL }, /* XSUM_XXH3_testdata[4948] */\n    { 2474, 0x9E3779B185EBCA8DULL, 0x4935872F6757D6A5ULL }, /* XSUM_XXH3_testdata[4949] */\n    { 2475, 0x0000000000000000ULL, 0xB1F3BEF6F09D70A6ULL }, /* XSUM_XXH3_testdata[4950] */\n    { 2475, 0x9E3779B185EBCA8DULL, 0xFD35409753519FC5ULL }, /* XSUM_XXH3_testdata[4951] */\n    { 2476, 0x0000000000000000ULL, 0x298B771F429863C7ULL }, /* XSUM_XXH3_testdata[4952] */\n    { 2476, 0x9E3779B185EBCA8DULL, 0xF47455F43151E5EEULL }, /* XSUM_XXH3_testdata[4953] */\n    { 2477, 0x0000000000000000ULL, 0xED60585128E31E32ULL }, /* XSUM_XXH3_testdata[4954] */\n    { 2477, 0x9E3779B185EBCA8DULL, 0x7D42C1F3FE3D949AULL }, /* XSUM_XXH3_testdata[4955] */\n    { 2478, 0x0000000000000000ULL, 0x836FD57D7CE40CD5ULL }, /* XSUM_XXH3_testdata[4956] */\n    { 2478, 0x9E3779B185EBCA8DULL, 0x955BB327722E820FULL }, /* XSUM_XXH3_testdata[4957] */\n    { 2479, 0x0000000000000000ULL, 0x8B893C8E25356830ULL }, /* XSUM_XXH3_testdata[4958] */\n    { 2479, 0x9E3779B185EBCA8DULL, 0xFCA32DE531B8D7C4ULL }, /* XSUM_XXH3_testdata[4959] */\n    { 2480, 0x0000000000000000ULL, 0xAA801A1477B80024ULL }, /* XSUM_XXH3_testdata[4960] */\n    { 2480, 0x9E3779B185EBCA8DULL, 0x745B1264EC3EC79FULL }, /* XSUM_XXH3_testdata[4961] */\n    { 2481, 0x0000000000000000ULL, 0xFFC123CE2FEB19BBULL }, /* XSUM_XXH3_testdata[4962] */\n    { 2481, 0x9E3779B185EBCA8DULL, 0x3E1432A43C9B3B21ULL }, /* XSUM_XXH3_testdata[4963] */\n    { 2482, 0x0000000000000000ULL, 0x67A2F28FAB9489FCULL }, /* XSUM_XXH3_testdata[4964] */\n    { 2482, 0x9E3779B185EBCA8DULL, 0x646467775BC85519ULL }, /* XSUM_XXH3_testdata[4965] */\n    { 2483, 0x0000000000000000ULL, 0xF604D40AD38A735AULL }, /* XSUM_XXH3_testdata[4966] */\n    { 2483, 0x9E3779B185EBCA8DULL, 0x87F499EC7E7889C6ULL }, /* XSUM_XXH3_testdata[4967] */\n    { 2484, 0x0000000000000000ULL, 0x349E26D57FE46D76ULL }, /* XSUM_XXH3_testdata[4968] */\n    { 2484, 0x9E3779B185EBCA8DULL, 0xDB482692318A585AULL }, /* XSUM_XXH3_testdata[4969] */\n    { 2485, 0x0000000000000000ULL, 0x8F51D9BA3F224553ULL }, /* XSUM_XXH3_testdata[4970] */\n    { 2485, 0x9E3779B185EBCA8DULL, 0xC8542B2AFCB15DFAULL }, /* XSUM_XXH3_testdata[4971] */\n    { 2486, 0x0000000000000000ULL, 0x396E933986D5207FULL }, /* XSUM_XXH3_testdata[4972] */\n    { 2486, 0x9E3779B185EBCA8DULL, 0x0F51171332A16986ULL }, /* XSUM_XXH3_testdata[4973] */\n    { 2487, 0x0000000000000000ULL, 0x4D460642310AB50AULL }, /* XSUM_XXH3_testdata[4974] */\n    { 2487, 0x9E3779B185EBCA8DULL, 0x98286BAD4038A667ULL }, /* XSUM_XXH3_testdata[4975] */\n    { 2488, 0x0000000000000000ULL, 0x5C55E27FFD987D8BULL }, /* XSUM_XXH3_testdata[4976] */\n    { 2488, 0x9E3779B185EBCA8DULL, 0xABB686BCBCD600F3ULL }, /* XSUM_XXH3_testdata[4977] */\n    { 2489, 0x0000000000000000ULL, 0x7B13729245828F1BULL }, /* XSUM_XXH3_testdata[4978] */\n    { 2489, 0x9E3779B185EBCA8DULL, 0xAD9BD38D75CD546CULL }, /* XSUM_XXH3_testdata[4979] */\n    { 2490, 0x0000000000000000ULL, 0xA0B1DD56AE1089D0ULL }, /* XSUM_XXH3_testdata[4980] */\n    { 2490, 0x9E3779B185EBCA8DULL, 0x12BB22DF6959D027ULL }, /* XSUM_XXH3_testdata[4981] */\n    { 2491, 0x0000000000000000ULL, 0xEF32D3094C10D252ULL }, /* XSUM_XXH3_testdata[4982] */\n    { 2491, 0x9E3779B185EBCA8DULL, 0x0445C2D133C6FBAAULL }, /* XSUM_XXH3_testdata[4983] */\n    { 2492, 0x0000000000000000ULL, 0xFC31BEDF37B39F9AULL }, /* XSUM_XXH3_testdata[4984] */\n    { 2492, 0x9E3779B185EBCA8DULL, 0xE7412EB1ABF45B43ULL }, /* XSUM_XXH3_testdata[4985] */\n    { 2493, 0x0000000000000000ULL, 0x9BE368614DB83689ULL }, /* XSUM_XXH3_testdata[4986] */\n    { 2493, 0x9E3779B185EBCA8DULL, 0x7AA0EE00D9289322ULL }, /* XSUM_XXH3_testdata[4987] */\n    { 2494, 0x0000000000000000ULL, 0x8C969B282CDEF258ULL }, /* XSUM_XXH3_testdata[4988] */\n    { 2494, 0x9E3779B185EBCA8DULL, 0x0ED41F3E4DF0E8C3ULL }, /* XSUM_XXH3_testdata[4989] */\n    { 2495, 0x0000000000000000ULL, 0xE6A765D030454BFBULL }, /* XSUM_XXH3_testdata[4990] */\n    { 2495, 0x9E3779B185EBCA8DULL, 0x761DA60614C958BCULL }, /* XSUM_XXH3_testdata[4991] */\n    { 2496, 0x0000000000000000ULL, 0xB565B3202DEF23C1ULL }, /* XSUM_XXH3_testdata[4992] */\n    { 2496, 0x9E3779B185EBCA8DULL, 0x96E5D8A2B6CB4E50ULL }, /* XSUM_XXH3_testdata[4993] */\n    { 2497, 0x0000000000000000ULL, 0x31213BCB52410C9CULL }, /* XSUM_XXH3_testdata[4994] */\n    { 2497, 0x9E3779B185EBCA8DULL, 0xD6FF67DD99668F70ULL }, /* XSUM_XXH3_testdata[4995] */\n    { 2498, 0x0000000000000000ULL, 0x30046CF9FC40766EULL }, /* XSUM_XXH3_testdata[4996] */\n    { 2498, 0x9E3779B185EBCA8DULL, 0x2B783B4547273EF2ULL }, /* XSUM_XXH3_testdata[4997] */\n    { 2499, 0x0000000000000000ULL, 0xF7554227E0ACEB04ULL }, /* XSUM_XXH3_testdata[4998] */\n    { 2499, 0x9E3779B185EBCA8DULL, 0xD295304E2C26F07CULL }, /* XSUM_XXH3_testdata[4999] */\n    { 2500, 0x0000000000000000ULL, 0x26CB04F4741A52D1ULL }, /* XSUM_XXH3_testdata[5000] */\n    { 2500, 0x9E3779B185EBCA8DULL, 0x03AB853D8E6E77CDULL }, /* XSUM_XXH3_testdata[5001] */\n    { 2501, 0x0000000000000000ULL, 0x1F08882A1F7E1AE0ULL }, /* XSUM_XXH3_testdata[5002] */\n    { 2501, 0x9E3779B185EBCA8DULL, 0x6B89BDFBBA4A26C5ULL }, /* XSUM_XXH3_testdata[5003] */\n    { 2502, 0x0000000000000000ULL, 0x866571933B2D19BBULL }, /* XSUM_XXH3_testdata[5004] */\n    { 2502, 0x9E3779B185EBCA8DULL, 0x29C3D35675D12109ULL }, /* XSUM_XXH3_testdata[5005] */\n    { 2503, 0x0000000000000000ULL, 0x91CCE7766CCE8FE5ULL }, /* XSUM_XXH3_testdata[5006] */\n    { 2503, 0x9E3779B185EBCA8DULL, 0x992D977616FB9AE5ULL }, /* XSUM_XXH3_testdata[5007] */\n    { 2504, 0x0000000000000000ULL, 0x29B54766DE5E1E94ULL }, /* XSUM_XXH3_testdata[5008] */\n    { 2504, 0x9E3779B185EBCA8DULL, 0xA4D691B058080700ULL }, /* XSUM_XXH3_testdata[5009] */\n    { 2505, 0x0000000000000000ULL, 0x18F26802D56A53FEULL }, /* XSUM_XXH3_testdata[5010] */\n    { 2505, 0x9E3779B185EBCA8DULL, 0x37B621D8FECB486FULL }, /* XSUM_XXH3_testdata[5011] */\n    { 2506, 0x0000000000000000ULL, 0xC5FCE365B5D65ACEULL }, /* XSUM_XXH3_testdata[5012] */\n    { 2506, 0x9E3779B185EBCA8DULL, 0x73350B5F23B064AEULL }, /* XSUM_XXH3_testdata[5013] */\n    { 2507, 0x0000000000000000ULL, 0x213AF1A9B9E3410AULL }, /* XSUM_XXH3_testdata[5014] */\n    { 2507, 0x9E3779B185EBCA8DULL, 0x949E27B85A874B7BULL }, /* XSUM_XXH3_testdata[5015] */\n    { 2508, 0x0000000000000000ULL, 0x516645DA2D3011A4ULL }, /* XSUM_XXH3_testdata[5016] */\n    { 2508, 0x9E3779B185EBCA8DULL, 0xD46731FF4070FE06ULL }, /* XSUM_XXH3_testdata[5017] */\n    { 2509, 0x0000000000000000ULL, 0x6C4BDD4D39806795ULL }, /* XSUM_XXH3_testdata[5018] */\n    { 2509, 0x9E3779B185EBCA8DULL, 0x716550FFF0481238ULL }, /* XSUM_XXH3_testdata[5019] */\n    { 2510, 0x0000000000000000ULL, 0x5F866CD65285EB7AULL }, /* XSUM_XXH3_testdata[5020] */\n    { 2510, 0x9E3779B185EBCA8DULL, 0x0318A12DB7C9F162ULL }, /* XSUM_XXH3_testdata[5021] */\n    { 2511, 0x0000000000000000ULL, 0xEBA1A3DD90AEBFFFULL }, /* XSUM_XXH3_testdata[5022] */\n    { 2511, 0x9E3779B185EBCA8DULL, 0xBA953F31B3A00ECDULL }, /* XSUM_XXH3_testdata[5023] */\n    { 2512, 0x0000000000000000ULL, 0x74B3591496D9718BULL }, /* XSUM_XXH3_testdata[5024] */\n    { 2512, 0x9E3779B185EBCA8DULL, 0xF13D881703493E17ULL }, /* XSUM_XXH3_testdata[5025] */\n    { 2513, 0x0000000000000000ULL, 0xB6F86B89BCA03AC2ULL }, /* XSUM_XXH3_testdata[5026] */\n    { 2513, 0x9E3779B185EBCA8DULL, 0x43B7AE38B94866A5ULL }, /* XSUM_XXH3_testdata[5027] */\n    { 2514, 0x0000000000000000ULL, 0x86F1B452363281E9ULL }, /* XSUM_XXH3_testdata[5028] */\n    { 2514, 0x9E3779B185EBCA8DULL, 0xC55AD56621595369ULL }, /* XSUM_XXH3_testdata[5029] */\n    { 2515, 0x0000000000000000ULL, 0x9DFE8CFA5D090682ULL }, /* XSUM_XXH3_testdata[5030] */\n    { 2515, 0x9E3779B185EBCA8DULL, 0xC4763A2984855956ULL }, /* XSUM_XXH3_testdata[5031] */\n    { 2516, 0x0000000000000000ULL, 0xA4A3D0FA8DF914BBULL }, /* XSUM_XXH3_testdata[5032] */\n    { 2516, 0x9E3779B185EBCA8DULL, 0x55D9A21879096100ULL }, /* XSUM_XXH3_testdata[5033] */\n    { 2517, 0x0000000000000000ULL, 0x0C7E962BD2937142ULL }, /* XSUM_XXH3_testdata[5034] */\n    { 2517, 0x9E3779B185EBCA8DULL, 0xF56A061E20E1D9B7ULL }, /* XSUM_XXH3_testdata[5035] */\n    { 2518, 0x0000000000000000ULL, 0xEF0DA9D0D9C42F43ULL }, /* XSUM_XXH3_testdata[5036] */\n    { 2518, 0x9E3779B185EBCA8DULL, 0x06334992C2AD9ADCULL }, /* XSUM_XXH3_testdata[5037] */\n    { 2519, 0x0000000000000000ULL, 0x981C612186C18BD7ULL }, /* XSUM_XXH3_testdata[5038] */\n    { 2519, 0x9E3779B185EBCA8DULL, 0xE074A72E67FEEEB8ULL }, /* XSUM_XXH3_testdata[5039] */\n    { 2520, 0x0000000000000000ULL, 0x63D13F8020F2E70AULL }, /* XSUM_XXH3_testdata[5040] */\n    { 2520, 0x9E3779B185EBCA8DULL, 0x34FDDD40FF026698ULL }, /* XSUM_XXH3_testdata[5041] */\n    { 2521, 0x0000000000000000ULL, 0x11E6CCC6E9726646ULL }, /* XSUM_XXH3_testdata[5042] */\n    { 2521, 0x9E3779B185EBCA8DULL, 0xF56A02A1076B386BULL }, /* XSUM_XXH3_testdata[5043] */\n    { 2522, 0x0000000000000000ULL, 0x4D43554DFD39C5F1ULL }, /* XSUM_XXH3_testdata[5044] */\n    { 2522, 0x9E3779B185EBCA8DULL, 0x3263BFB2AFF8A291ULL }, /* XSUM_XXH3_testdata[5045] */\n    { 2523, 0x0000000000000000ULL, 0xCFAC84F889FF97B2ULL }, /* XSUM_XXH3_testdata[5046] */\n    { 2523, 0x9E3779B185EBCA8DULL, 0x8E8BCDE00512F9DBULL }, /* XSUM_XXH3_testdata[5047] */\n    { 2524, 0x0000000000000000ULL, 0xDF7FE6D07F66358DULL }, /* XSUM_XXH3_testdata[5048] */\n    { 2524, 0x9E3779B185EBCA8DULL, 0x06C77049AA50091BULL }, /* XSUM_XXH3_testdata[5049] */\n    { 2525, 0x0000000000000000ULL, 0x0DC047741CA34FD4ULL }, /* XSUM_XXH3_testdata[5050] */\n    { 2525, 0x9E3779B185EBCA8DULL, 0x2B2EC50F1C779ECFULL }, /* XSUM_XXH3_testdata[5051] */\n    { 2526, 0x0000000000000000ULL, 0xDA22F631491949A5ULL }, /* XSUM_XXH3_testdata[5052] */\n    { 2526, 0x9E3779B185EBCA8DULL, 0x303A45291FB57D33ULL }, /* XSUM_XXH3_testdata[5053] */\n    { 2527, 0x0000000000000000ULL, 0xDEA2B9CC46C5A5F1ULL }, /* XSUM_XXH3_testdata[5054] */\n    { 2527, 0x9E3779B185EBCA8DULL, 0x9C26E09E495DC82BULL }, /* XSUM_XXH3_testdata[5055] */\n    { 2528, 0x0000000000000000ULL, 0xDBA56F835255F96BULL }, /* XSUM_XXH3_testdata[5056] */\n    { 2528, 0x9E3779B185EBCA8DULL, 0x991A268378ACA738ULL }, /* XSUM_XXH3_testdata[5057] */\n    { 2529, 0x0000000000000000ULL, 0xE0CDFC8278598809ULL }, /* XSUM_XXH3_testdata[5058] */\n    { 2529, 0x9E3779B185EBCA8DULL, 0xD58FC1D2C92F0943ULL }, /* XSUM_XXH3_testdata[5059] */\n    { 2530, 0x0000000000000000ULL, 0xBA8BAF78823115A1ULL }, /* XSUM_XXH3_testdata[5060] */\n    { 2530, 0x9E3779B185EBCA8DULL, 0xDA2BE7BB589960C7ULL }, /* XSUM_XXH3_testdata[5061] */\n    { 2531, 0x0000000000000000ULL, 0x84147A051CD8405CULL }, /* XSUM_XXH3_testdata[5062] */\n    { 2531, 0x9E3779B185EBCA8DULL, 0xABD86C2E8CBF5471ULL }, /* XSUM_XXH3_testdata[5063] */\n    { 2532, 0x0000000000000000ULL, 0xA64FE619F33940FFULL }, /* XSUM_XXH3_testdata[5064] */\n    { 2532, 0x9E3779B185EBCA8DULL, 0xFB2312C177FDE048ULL }, /* XSUM_XXH3_testdata[5065] */\n    { 2533, 0x0000000000000000ULL, 0xA6F08816CF4BACF2ULL }, /* XSUM_XXH3_testdata[5066] */\n    { 2533, 0x9E3779B185EBCA8DULL, 0x2B81A778B504831CULL }, /* XSUM_XXH3_testdata[5067] */\n    { 2534, 0x0000000000000000ULL, 0x4155B18A540E04FEULL }, /* XSUM_XXH3_testdata[5068] */\n    { 2534, 0x9E3779B185EBCA8DULL, 0xE74CE315250E7713ULL }, /* XSUM_XXH3_testdata[5069] */\n    { 2535, 0x0000000000000000ULL, 0xA4F15D9A49D534CDULL }, /* XSUM_XXH3_testdata[5070] */\n    { 2535, 0x9E3779B185EBCA8DULL, 0x5E1998CF4EF8BB40ULL }, /* XSUM_XXH3_testdata[5071] */\n    { 2536, 0x0000000000000000ULL, 0x3513007897DFFAFAULL }, /* XSUM_XXH3_testdata[5072] */\n    { 2536, 0x9E3779B185EBCA8DULL, 0x566B64163FD4D5A2ULL }, /* XSUM_XXH3_testdata[5073] */\n    { 2537, 0x0000000000000000ULL, 0xFC3AD43F345DF501ULL }, /* XSUM_XXH3_testdata[5074] */\n    { 2537, 0x9E3779B185EBCA8DULL, 0x931558E8245B32A1ULL }, /* XSUM_XXH3_testdata[5075] */\n    { 2538, 0x0000000000000000ULL, 0x47AE535569E785C6ULL }, /* XSUM_XXH3_testdata[5076] */\n    { 2538, 0x9E3779B185EBCA8DULL, 0x269E2991E7F8E7ABULL }, /* XSUM_XXH3_testdata[5077] */\n    { 2539, 0x0000000000000000ULL, 0xC4F897E74397D2DBULL }, /* XSUM_XXH3_testdata[5078] */\n    { 2539, 0x9E3779B185EBCA8DULL, 0xCAE41E46D2B4D464ULL }, /* XSUM_XXH3_testdata[5079] */\n    { 2540, 0x0000000000000000ULL, 0xA5B0453FAD8F40ABULL }, /* XSUM_XXH3_testdata[5080] */\n    { 2540, 0x9E3779B185EBCA8DULL, 0xDA50A059C37DF89AULL }, /* XSUM_XXH3_testdata[5081] */\n    { 2541, 0x0000000000000000ULL, 0x2AD31C54C868E970ULL }, /* XSUM_XXH3_testdata[5082] */\n    { 2541, 0x9E3779B185EBCA8DULL, 0x8DC47215C1FAC750ULL }, /* XSUM_XXH3_testdata[5083] */\n    { 2542, 0x0000000000000000ULL, 0x1ECD99D927119426ULL }, /* XSUM_XXH3_testdata[5084] */\n    { 2542, 0x9E3779B185EBCA8DULL, 0xFE1270C2CD79B954ULL }, /* XSUM_XXH3_testdata[5085] */\n    { 2543, 0x0000000000000000ULL, 0x7536E78A4E103EB7ULL }, /* XSUM_XXH3_testdata[5086] */\n    { 2543, 0x9E3779B185EBCA8DULL, 0x561825DB5725EC05ULL }, /* XSUM_XXH3_testdata[5087] */\n    { 2544, 0x0000000000000000ULL, 0xF84DD2FB541DBF14ULL }, /* XSUM_XXH3_testdata[5088] */\n    { 2544, 0x9E3779B185EBCA8DULL, 0xEDB23E666D56D112ULL }, /* XSUM_XXH3_testdata[5089] */\n    { 2545, 0x0000000000000000ULL, 0xD80CBEE66D7975F5ULL }, /* XSUM_XXH3_testdata[5090] */\n    { 2545, 0x9E3779B185EBCA8DULL, 0x5AE5CF1BD53581EAULL }, /* XSUM_XXH3_testdata[5091] */\n    { 2546, 0x0000000000000000ULL, 0x74B79EB050C88A5BULL }, /* XSUM_XXH3_testdata[5092] */\n    { 2546, 0x9E3779B185EBCA8DULL, 0x9CA2C17DBF6403EBULL }, /* XSUM_XXH3_testdata[5093] */\n    { 2547, 0x0000000000000000ULL, 0xAB0E6EA9E0AC02C9ULL }, /* XSUM_XXH3_testdata[5094] */\n    { 2547, 0x9E3779B185EBCA8DULL, 0x1CC8952A920BE943ULL }, /* XSUM_XXH3_testdata[5095] */\n    { 2548, 0x0000000000000000ULL, 0x0BBF501CAB2045D0ULL }, /* XSUM_XXH3_testdata[5096] */\n    { 2548, 0x9E3779B185EBCA8DULL, 0x492E253BECC049B7ULL }, /* XSUM_XXH3_testdata[5097] */\n    { 2549, 0x0000000000000000ULL, 0x744CBAF9B66702C9ULL }, /* XSUM_XXH3_testdata[5098] */\n    { 2549, 0x9E3779B185EBCA8DULL, 0x089606A58D945131ULL }, /* XSUM_XXH3_testdata[5099] */\n    { 2550, 0x0000000000000000ULL, 0xD452D819CAAA8F64ULL }, /* XSUM_XXH3_testdata[5100] */\n    { 2550, 0x9E3779B185EBCA8DULL, 0x0060BFDE7C67FB8CULL }, /* XSUM_XXH3_testdata[5101] */\n    { 2551, 0x0000000000000000ULL, 0x7441813208320928ULL }, /* XSUM_XXH3_testdata[5102] */\n    { 2551, 0x9E3779B185EBCA8DULL, 0x78F88FB9DB734740ULL }, /* XSUM_XXH3_testdata[5103] */\n    { 2552, 0x0000000000000000ULL, 0x2417C3FB8183F331ULL }, /* XSUM_XXH3_testdata[5104] */\n    { 2552, 0x9E3779B185EBCA8DULL, 0x7C0E5F122AE82E10ULL }, /* XSUM_XXH3_testdata[5105] */\n    { 2553, 0x0000000000000000ULL, 0x245E2593E2467EF6ULL }, /* XSUM_XXH3_testdata[5106] */\n    { 2553, 0x9E3779B185EBCA8DULL, 0x78648D15B7FE9001ULL }, /* XSUM_XXH3_testdata[5107] */\n    { 2554, 0x0000000000000000ULL, 0xBCC23C16065715F6ULL }, /* XSUM_XXH3_testdata[5108] */\n    { 2554, 0x9E3779B185EBCA8DULL, 0x364DECBEF543F51DULL }, /* XSUM_XXH3_testdata[5109] */\n    { 2555, 0x0000000000000000ULL, 0xB095D4AD861C6D95ULL }, /* XSUM_XXH3_testdata[5110] */\n    { 2555, 0x9E3779B185EBCA8DULL, 0xC3F2906261781FB5ULL }, /* XSUM_XXH3_testdata[5111] */\n    { 2556, 0x0000000000000000ULL, 0xD8B36BB0F3742305ULL }, /* XSUM_XXH3_testdata[5112] */\n    { 2556, 0x9E3779B185EBCA8DULL, 0x576FBFE384D1F3DCULL }, /* XSUM_XXH3_testdata[5113] */\n    { 2557, 0x0000000000000000ULL, 0x7E5CBC4F08653A51ULL }, /* XSUM_XXH3_testdata[5114] */\n    { 2557, 0x9E3779B185EBCA8DULL, 0x40EE18F37D3A6A3DULL }, /* XSUM_XXH3_testdata[5115] */\n    { 2558, 0x0000000000000000ULL, 0x027AC279D3E059D5ULL }, /* XSUM_XXH3_testdata[5116] */\n    { 2558, 0x9E3779B185EBCA8DULL, 0x18655A56E8B5CEC7ULL }, /* XSUM_XXH3_testdata[5117] */\n    { 2559, 0x0000000000000000ULL, 0xDFB77052CA36F5FAULL }, /* XSUM_XXH3_testdata[5118] */\n    { 2559, 0x9E3779B185EBCA8DULL, 0x083D330A88FCC356ULL }, /* XSUM_XXH3_testdata[5119] */\n    { 2560, 0x0000000000000000ULL, 0xFE88B5D95CB0BA87ULL }, /* XSUM_XXH3_testdata[5120] */\n    { 2560, 0x9E3779B185EBCA8DULL, 0x9D718CB6BD910BA2ULL }, /* XSUM_XXH3_testdata[5121] */\n    { 2561, 0x0000000000000000ULL, 0xB417B3F1634546D4ULL }, /* XSUM_XXH3_testdata[5122] */\n    { 2561, 0x9E3779B185EBCA8DULL, 0x98B20C48B84C4B1AULL }, /* XSUM_XXH3_testdata[5123] */\n    { 2562, 0x0000000000000000ULL, 0xCD93768E3866191BULL }, /* XSUM_XXH3_testdata[5124] */\n    { 2562, 0x9E3779B185EBCA8DULL, 0xE4A51A83EED3D7B7ULL }, /* XSUM_XXH3_testdata[5125] */\n    { 2563, 0x0000000000000000ULL, 0x466B225ADC4EFCB8ULL }, /* XSUM_XXH3_testdata[5126] */\n    { 2563, 0x9E3779B185EBCA8DULL, 0xFC869FC17EE1ED47ULL }, /* XSUM_XXH3_testdata[5127] */\n    { 2564, 0x0000000000000000ULL, 0x97EEDCA68626A59AULL }, /* XSUM_XXH3_testdata[5128] */\n    { 2564, 0x9E3779B185EBCA8DULL, 0xB5AE71338EF75449ULL }, /* XSUM_XXH3_testdata[5129] */\n    { 2565, 0x0000000000000000ULL, 0xB4F3EB6590D89B7AULL }, /* XSUM_XXH3_testdata[5130] */\n    { 2565, 0x9E3779B185EBCA8DULL, 0xB5C10BDFE714DDE0ULL }, /* XSUM_XXH3_testdata[5131] */\n    { 2566, 0x0000000000000000ULL, 0x2ABCC0FC86100D8BULL }, /* XSUM_XXH3_testdata[5132] */\n    { 2566, 0x9E3779B185EBCA8DULL, 0xAD4F7612DA2A8D6AULL }, /* XSUM_XXH3_testdata[5133] */\n    { 2567, 0x0000000000000000ULL, 0xF7A5777064BB2E3AULL }, /* XSUM_XXH3_testdata[5134] */\n    { 2567, 0x9E3779B185EBCA8DULL, 0x2B809C5C59C1BA8CULL }, /* XSUM_XXH3_testdata[5135] */\n    { 2568, 0x0000000000000000ULL, 0xC37DE712755AF5A1ULL }, /* XSUM_XXH3_testdata[5136] */\n    { 2568, 0x9E3779B185EBCA8DULL, 0x59D9506FF4A1C59BULL }, /* XSUM_XXH3_testdata[5137] */\n    { 2569, 0x0000000000000000ULL, 0x771B2E56B82F9305ULL }, /* XSUM_XXH3_testdata[5138] */\n    { 2569, 0x9E3779B185EBCA8DULL, 0x602479761F075306ULL }, /* XSUM_XXH3_testdata[5139] */\n    { 2570, 0x0000000000000000ULL, 0xABD36BA52C8E93D7ULL }, /* XSUM_XXH3_testdata[5140] */\n    { 2570, 0x9E3779B185EBCA8DULL, 0x9BBEFFD3913419D9ULL }, /* XSUM_XXH3_testdata[5141] */\n    { 2571, 0x0000000000000000ULL, 0x1939BE0252324E1FULL }, /* XSUM_XXH3_testdata[5142] */\n    { 2571, 0x9E3779B185EBCA8DULL, 0x818A2AEE26B274D7ULL }, /* XSUM_XXH3_testdata[5143] */\n    { 2572, 0x0000000000000000ULL, 0xD43C14CE9E282A46ULL }, /* XSUM_XXH3_testdata[5144] */\n    { 2572, 0x9E3779B185EBCA8DULL, 0x5F373D933A5DB1C8ULL }, /* XSUM_XXH3_testdata[5145] */\n    { 2573, 0x0000000000000000ULL, 0x1B195DF3CD94DF95ULL }, /* XSUM_XXH3_testdata[5146] */\n    { 2573, 0x9E3779B185EBCA8DULL, 0x3A497628983CE0A2ULL }, /* XSUM_XXH3_testdata[5147] */\n    { 2574, 0x0000000000000000ULL, 0xBAD61B5DFEE4D9AEULL }, /* XSUM_XXH3_testdata[5148] */\n    { 2574, 0x9E3779B185EBCA8DULL, 0x9D2791365ABD4A7DULL }, /* XSUM_XXH3_testdata[5149] */\n    { 2575, 0x0000000000000000ULL, 0xAE9812064E359199ULL }, /* XSUM_XXH3_testdata[5150] */\n    { 2575, 0x9E3779B185EBCA8DULL, 0x097296A247EDF44AULL }, /* XSUM_XXH3_testdata[5151] */\n    { 2576, 0x0000000000000000ULL, 0x6C2FA6480D157458ULL }, /* XSUM_XXH3_testdata[5152] */\n    { 2576, 0x9E3779B185EBCA8DULL, 0x84CEB7F2EE585DC7ULL }, /* XSUM_XXH3_testdata[5153] */\n    { 2577, 0x0000000000000000ULL, 0x120D18D2B6CA2129ULL }, /* XSUM_XXH3_testdata[5154] */\n    { 2577, 0x9E3779B185EBCA8DULL, 0x5E9C2895D3EE0058ULL }, /* XSUM_XXH3_testdata[5155] */\n    { 2578, 0x0000000000000000ULL, 0xB641BFFA78F79264ULL }, /* XSUM_XXH3_testdata[5156] */\n    { 2578, 0x9E3779B185EBCA8DULL, 0xF1B40D4312F8C015ULL }, /* XSUM_XXH3_testdata[5157] */\n    { 2579, 0x0000000000000000ULL, 0xF795516B1D02A34DULL }, /* XSUM_XXH3_testdata[5158] */\n    { 2579, 0x9E3779B185EBCA8DULL, 0x1088748B21DC25C5ULL }, /* XSUM_XXH3_testdata[5159] */\n    { 2580, 0x0000000000000000ULL, 0xC8FB06691974FF06ULL }, /* XSUM_XXH3_testdata[5160] */\n    { 2580, 0x9E3779B185EBCA8DULL, 0x2402D2751DFA59FFULL }, /* XSUM_XXH3_testdata[5161] */\n    { 2581, 0x0000000000000000ULL, 0x9E3727290CF565DBULL }, /* XSUM_XXH3_testdata[5162] */\n    { 2581, 0x9E3779B185EBCA8DULL, 0xC6B39BCDB68D7521ULL }, /* XSUM_XXH3_testdata[5163] */\n    { 2582, 0x0000000000000000ULL, 0xECB9B7BE0D388A50ULL }, /* XSUM_XXH3_testdata[5164] */\n    { 2582, 0x9E3779B185EBCA8DULL, 0xB4A2DF2140BF045AULL }, /* XSUM_XXH3_testdata[5165] */\n    { 2583, 0x0000000000000000ULL, 0xADBB641E5C1A2DA7ULL }, /* XSUM_XXH3_testdata[5166] */\n    { 2583, 0x9E3779B185EBCA8DULL, 0x5962AEF99E1D82EDULL }, /* XSUM_XXH3_testdata[5167] */\n    { 2584, 0x0000000000000000ULL, 0x352D8CB9B5A57A57ULL }, /* XSUM_XXH3_testdata[5168] */\n    { 2584, 0x9E3779B185EBCA8DULL, 0x1E8D8C0D1C18DF5EULL }, /* XSUM_XXH3_testdata[5169] */\n    { 2585, 0x0000000000000000ULL, 0x27BD3C273D8D682CULL }, /* XSUM_XXH3_testdata[5170] */\n    { 2585, 0x9E3779B185EBCA8DULL, 0x3819D8CFCB6CCE7AULL }, /* XSUM_XXH3_testdata[5171] */\n    { 2586, 0x0000000000000000ULL, 0x713E8F363CB3E1ECULL }, /* XSUM_XXH3_testdata[5172] */\n    { 2586, 0x9E3779B185EBCA8DULL, 0x9D7ADB7C07AE3C05ULL }, /* XSUM_XXH3_testdata[5173] */\n    { 2587, 0x0000000000000000ULL, 0x511F33647D70DE7DULL }, /* XSUM_XXH3_testdata[5174] */\n    { 2587, 0x9E3779B185EBCA8DULL, 0x0B324080469F52BBULL }, /* XSUM_XXH3_testdata[5175] */\n    { 2588, 0x0000000000000000ULL, 0xDD3FEB274F4356C5ULL }, /* XSUM_XXH3_testdata[5176] */\n    { 2588, 0x9E3779B185EBCA8DULL, 0x1005F0A623F5543DULL }, /* XSUM_XXH3_testdata[5177] */\n    { 2589, 0x0000000000000000ULL, 0x6A45D690D397327CULL }, /* XSUM_XXH3_testdata[5178] */\n    { 2589, 0x9E3779B185EBCA8DULL, 0x5181ACBF3D01F5CBULL }, /* XSUM_XXH3_testdata[5179] */\n    { 2590, 0x0000000000000000ULL, 0x0F311BD0CE8CB7DCULL }, /* XSUM_XXH3_testdata[5180] */\n    { 2590, 0x9E3779B185EBCA8DULL, 0x0BAE41BB7EA97721ULL }, /* XSUM_XXH3_testdata[5181] */\n    { 2591, 0x0000000000000000ULL, 0x2D7E8992C887B638ULL }, /* XSUM_XXH3_testdata[5182] */\n    { 2591, 0x9E3779B185EBCA8DULL, 0xA28BA394DD194668ULL }, /* XSUM_XXH3_testdata[5183] */\n    { 2592, 0x0000000000000000ULL, 0xA0985AF7DB1C78DAULL }, /* XSUM_XXH3_testdata[5184] */\n    { 2592, 0x9E3779B185EBCA8DULL, 0xCD03D5EF50B7F641ULL }, /* XSUM_XXH3_testdata[5185] */\n    { 2593, 0x0000000000000000ULL, 0xC18A32BFAC492DA5ULL }, /* XSUM_XXH3_testdata[5186] */\n    { 2593, 0x9E3779B185EBCA8DULL, 0x8ACB50DDDBDC01A5ULL }, /* XSUM_XXH3_testdata[5187] */\n    { 2594, 0x0000000000000000ULL, 0xF64DA444EB493F68ULL }, /* XSUM_XXH3_testdata[5188] */\n    { 2594, 0x9E3779B185EBCA8DULL, 0xD4D6DC9610B09ED9ULL }, /* XSUM_XXH3_testdata[5189] */\n    { 2595, 0x0000000000000000ULL, 0xE52B406153967B5DULL }, /* XSUM_XXH3_testdata[5190] */\n    { 2595, 0x9E3779B185EBCA8DULL, 0x32D2229033C5E7E8ULL }, /* XSUM_XXH3_testdata[5191] */\n    { 2596, 0x0000000000000000ULL, 0xFD06FE5D8AB51DE0ULL }, /* XSUM_XXH3_testdata[5192] */\n    { 2596, 0x9E3779B185EBCA8DULL, 0xA3E51AB7B2578095ULL }, /* XSUM_XXH3_testdata[5193] */\n    { 2597, 0x0000000000000000ULL, 0x6AD78967B48D27B0ULL }, /* XSUM_XXH3_testdata[5194] */\n    { 2597, 0x9E3779B185EBCA8DULL, 0xB9EC608D42131699ULL }, /* XSUM_XXH3_testdata[5195] */\n    { 2598, 0x0000000000000000ULL, 0x5CF771A99E79B668ULL }, /* XSUM_XXH3_testdata[5196] */\n    { 2598, 0x9E3779B185EBCA8DULL, 0x12D534B6B541F6F2ULL }, /* XSUM_XXH3_testdata[5197] */\n    { 2599, 0x0000000000000000ULL, 0x84CDC90932783EB7ULL }, /* XSUM_XXH3_testdata[5198] */\n    { 2599, 0x9E3779B185EBCA8DULL, 0x6A81DD60A3513541ULL }, /* XSUM_XXH3_testdata[5199] */\n    { 2600, 0x0000000000000000ULL, 0x793556D83DF49115ULL }, /* XSUM_XXH3_testdata[5200] */\n    { 2600, 0x9E3779B185EBCA8DULL, 0x4A7FADFBD097FEF4ULL }, /* XSUM_XXH3_testdata[5201] */\n    { 2601, 0x0000000000000000ULL, 0x4DF044753E280E1BULL }, /* XSUM_XXH3_testdata[5202] */\n    { 2601, 0x9E3779B185EBCA8DULL, 0x7983257C51743B94ULL }, /* XSUM_XXH3_testdata[5203] */\n    { 2602, 0x0000000000000000ULL, 0x51C2F2A5AA9AC6EEULL }, /* XSUM_XXH3_testdata[5204] */\n    { 2602, 0x9E3779B185EBCA8DULL, 0xE34EFE3511F7B5DFULL }, /* XSUM_XXH3_testdata[5205] */\n    { 2603, 0x0000000000000000ULL, 0x577F4E5B8F4E89DDULL }, /* XSUM_XXH3_testdata[5206] */\n    { 2603, 0x9E3779B185EBCA8DULL, 0xFD32BEF84E7F1106ULL }, /* XSUM_XXH3_testdata[5207] */\n    { 2604, 0x0000000000000000ULL, 0x8902BC5E2A41B147ULL }, /* XSUM_XXH3_testdata[5208] */\n    { 2604, 0x9E3779B185EBCA8DULL, 0x706BFD376CC52DFFULL }, /* XSUM_XXH3_testdata[5209] */\n    { 2605, 0x0000000000000000ULL, 0x5FAE4460F3C39846ULL }, /* XSUM_XXH3_testdata[5210] */\n    { 2605, 0x9E3779B185EBCA8DULL, 0x9DED80F95A23BD06ULL }, /* XSUM_XXH3_testdata[5211] */\n    { 2606, 0x0000000000000000ULL, 0xF8E61A854B43505DULL }, /* XSUM_XXH3_testdata[5212] */\n    { 2606, 0x9E3779B185EBCA8DULL, 0x469072E7463A91F5ULL }, /* XSUM_XXH3_testdata[5213] */\n    { 2607, 0x0000000000000000ULL, 0xBF55E4C17172119FULL }, /* XSUM_XXH3_testdata[5214] */\n    { 2607, 0x9E3779B185EBCA8DULL, 0x83B3CF9D92F676FAULL }, /* XSUM_XXH3_testdata[5215] */\n    { 2608, 0x0000000000000000ULL, 0x9557766EF78170A7ULL }, /* XSUM_XXH3_testdata[5216] */\n    { 2608, 0x9E3779B185EBCA8DULL, 0x3DC22CB0B2E4E775ULL }, /* XSUM_XXH3_testdata[5217] */\n    { 2609, 0x0000000000000000ULL, 0xCF262555C32C1E2CULL }, /* XSUM_XXH3_testdata[5218] */\n    { 2609, 0x9E3779B185EBCA8DULL, 0x47ACA6B43896AD9CULL }, /* XSUM_XXH3_testdata[5219] */\n    { 2610, 0x0000000000000000ULL, 0xA6A5D0D502CD8978ULL }, /* XSUM_XXH3_testdata[5220] */\n    { 2610, 0x9E3779B185EBCA8DULL, 0xF01F3210CCF55F10ULL }, /* XSUM_XXH3_testdata[5221] */\n    { 2611, 0x0000000000000000ULL, 0x2C4DBEE8D8330A21ULL }, /* XSUM_XXH3_testdata[5222] */\n    { 2611, 0x9E3779B185EBCA8DULL, 0x7C1FA94B50C9F82DULL }, /* XSUM_XXH3_testdata[5223] */\n    { 2612, 0x0000000000000000ULL, 0x79DC7D9B0FCED621ULL }, /* XSUM_XXH3_testdata[5224] */\n    { 2612, 0x9E3779B185EBCA8DULL, 0x9F530ECF38A6A595ULL }, /* XSUM_XXH3_testdata[5225] */\n    { 2613, 0x0000000000000000ULL, 0xB0D601D09C8E2486ULL }, /* XSUM_XXH3_testdata[5226] */\n    { 2613, 0x9E3779B185EBCA8DULL, 0x168988B52DF66509ULL }, /* XSUM_XXH3_testdata[5227] */\n    { 2614, 0x0000000000000000ULL, 0x296703ED6B4E2196ULL }, /* XSUM_XXH3_testdata[5228] */\n    { 2614, 0x9E3779B185EBCA8DULL, 0x077FA33DF4E8106BULL }, /* XSUM_XXH3_testdata[5229] */\n    { 2615, 0x0000000000000000ULL, 0x3C129D5A06CD7375ULL }, /* XSUM_XXH3_testdata[5230] */\n    { 2615, 0x9E3779B185EBCA8DULL, 0x7FF5CFE58BD3D80FULL }, /* XSUM_XXH3_testdata[5231] */\n    { 2616, 0x0000000000000000ULL, 0xB7B4AC0A5B5946E3ULL }, /* XSUM_XXH3_testdata[5232] */\n    { 2616, 0x9E3779B185EBCA8DULL, 0xD34936D799A3ACF2ULL }, /* XSUM_XXH3_testdata[5233] */\n    { 2617, 0x0000000000000000ULL, 0xC692D17EAF1C1954ULL }, /* XSUM_XXH3_testdata[5234] */\n    { 2617, 0x9E3779B185EBCA8DULL, 0x17BE5362B26B02BEULL }, /* XSUM_XXH3_testdata[5235] */\n    { 2618, 0x0000000000000000ULL, 0x271B46700F1A8C6BULL }, /* XSUM_XXH3_testdata[5236] */\n    { 2618, 0x9E3779B185EBCA8DULL, 0x6EE5315756FC49CEULL }, /* XSUM_XXH3_testdata[5237] */\n    { 2619, 0x0000000000000000ULL, 0xA9C0AE3CC22EC8CEULL }, /* XSUM_XXH3_testdata[5238] */\n    { 2619, 0x9E3779B185EBCA8DULL, 0x76E30F2B751FDC75ULL }, /* XSUM_XXH3_testdata[5239] */\n    { 2620, 0x0000000000000000ULL, 0x9E54D2B87B91BE4FULL }, /* XSUM_XXH3_testdata[5240] */\n    { 2620, 0x9E3779B185EBCA8DULL, 0x847D5F2BEC873CD6ULL }, /* XSUM_XXH3_testdata[5241] */\n    { 2621, 0x0000000000000000ULL, 0x04DE572AD2A5375BULL }, /* XSUM_XXH3_testdata[5242] */\n    { 2621, 0x9E3779B185EBCA8DULL, 0x0686E8B46801DBCCULL }, /* XSUM_XXH3_testdata[5243] */\n    { 2622, 0x0000000000000000ULL, 0xADC6AE2C7840086EULL }, /* XSUM_XXH3_testdata[5244] */\n    { 2622, 0x9E3779B185EBCA8DULL, 0x9ABEE55D46148633ULL }, /* XSUM_XXH3_testdata[5245] */\n    { 2623, 0x0000000000000000ULL, 0x8E5BAC3A499DAED2ULL }, /* XSUM_XXH3_testdata[5246] */\n    { 2623, 0x9E3779B185EBCA8DULL, 0xC4EE815218C26490ULL }, /* XSUM_XXH3_testdata[5247] */\n    { 2624, 0x0000000000000000ULL, 0x79937D40FBEAE0EEULL }, /* XSUM_XXH3_testdata[5248] */\n    { 2624, 0x9E3779B185EBCA8DULL, 0xA2311717DEBB82A4ULL }, /* XSUM_XXH3_testdata[5249] */\n    { 2625, 0x0000000000000000ULL, 0xDD4481334E9FB9C2ULL }, /* XSUM_XXH3_testdata[5250] */\n    { 2625, 0x9E3779B185EBCA8DULL, 0xA19D3278B3193132ULL }, /* XSUM_XXH3_testdata[5251] */\n    { 2626, 0x0000000000000000ULL, 0x0241BB191BEEAA15ULL }, /* XSUM_XXH3_testdata[5252] */\n    { 2626, 0x9E3779B185EBCA8DULL, 0xC074D83A8C31BDBCULL }, /* XSUM_XXH3_testdata[5253] */\n    { 2627, 0x0000000000000000ULL, 0x1EB83BA0E95C1655ULL }, /* XSUM_XXH3_testdata[5254] */\n    { 2627, 0x9E3779B185EBCA8DULL, 0xC477C01EE6C3A537ULL }, /* XSUM_XXH3_testdata[5255] */\n    { 2628, 0x0000000000000000ULL, 0x0C4DD67BB0F562C8ULL }, /* XSUM_XXH3_testdata[5256] */\n    { 2628, 0x9E3779B185EBCA8DULL, 0x79EA32FD8F436AA2ULL }, /* XSUM_XXH3_testdata[5257] */\n    { 2629, 0x0000000000000000ULL, 0x737EBAEA0ADEFF70ULL }, /* XSUM_XXH3_testdata[5258] */\n    { 2629, 0x9E3779B185EBCA8DULL, 0xBC70DCF943FBCBD4ULL }, /* XSUM_XXH3_testdata[5259] */\n    { 2630, 0x0000000000000000ULL, 0x246BA432B5769B9EULL }, /* XSUM_XXH3_testdata[5260] */\n    { 2630, 0x9E3779B185EBCA8DULL, 0x9B3DF72E9DF51AA8ULL }, /* XSUM_XXH3_testdata[5261] */\n    { 2631, 0x0000000000000000ULL, 0x2C424F0EC27B9333ULL }, /* XSUM_XXH3_testdata[5262] */\n    { 2631, 0x9E3779B185EBCA8DULL, 0x24417D77C0E33AC6ULL }, /* XSUM_XXH3_testdata[5263] */\n    { 2632, 0x0000000000000000ULL, 0x1AD8B96CF5A303DAULL }, /* XSUM_XXH3_testdata[5264] */\n    { 2632, 0x9E3779B185EBCA8DULL, 0x5AAA8E098E454774ULL }, /* XSUM_XXH3_testdata[5265] */\n    { 2633, 0x0000000000000000ULL, 0xD2C83ED9155634FEULL }, /* XSUM_XXH3_testdata[5266] */\n    { 2633, 0x9E3779B185EBCA8DULL, 0x5C85BFCCF0926393ULL }, /* XSUM_XXH3_testdata[5267] */\n    { 2634, 0x0000000000000000ULL, 0xB26D421672653094ULL }, /* XSUM_XXH3_testdata[5268] */\n    { 2634, 0x9E3779B185EBCA8DULL, 0xC39EB9D4E889AC53ULL }, /* XSUM_XXH3_testdata[5269] */\n    { 2635, 0x0000000000000000ULL, 0xAE65782138999678ULL }, /* XSUM_XXH3_testdata[5270] */\n    { 2635, 0x9E3779B185EBCA8DULL, 0xD6DE637F2CF60651ULL }, /* XSUM_XXH3_testdata[5271] */\n    { 2636, 0x0000000000000000ULL, 0x8293E92420859F92ULL }, /* XSUM_XXH3_testdata[5272] */\n    { 2636, 0x9E3779B185EBCA8DULL, 0xAA98B201C1EB0FB2ULL }, /* XSUM_XXH3_testdata[5273] */\n    { 2637, 0x0000000000000000ULL, 0x463D5BB372D71DF8ULL }, /* XSUM_XXH3_testdata[5274] */\n    { 2637, 0x9E3779B185EBCA8DULL, 0x17A02B21B39C4518ULL }, /* XSUM_XXH3_testdata[5275] */\n    { 2638, 0x0000000000000000ULL, 0x2FABFE4DF1017EF5ULL }, /* XSUM_XXH3_testdata[5276] */\n    { 2638, 0x9E3779B185EBCA8DULL, 0x676D60830BF6C2A4ULL }, /* XSUM_XXH3_testdata[5277] */\n    { 2639, 0x0000000000000000ULL, 0x052B70E8495A8C5FULL }, /* XSUM_XXH3_testdata[5278] */\n    { 2639, 0x9E3779B185EBCA8DULL, 0xFDBDCE1EDA106F45ULL }, /* XSUM_XXH3_testdata[5279] */\n    { 2640, 0x0000000000000000ULL, 0x13B98550B2E1133AULL }, /* XSUM_XXH3_testdata[5280] */\n    { 2640, 0x9E3779B185EBCA8DULL, 0xA7C90E41655651CBULL }, /* XSUM_XXH3_testdata[5281] */\n    { 2641, 0x0000000000000000ULL, 0x993917249E53DD10ULL }, /* XSUM_XXH3_testdata[5282] */\n    { 2641, 0x9E3779B185EBCA8DULL, 0xA25D31BBF1522234ULL }, /* XSUM_XXH3_testdata[5283] */\n    { 2642, 0x0000000000000000ULL, 0x79DFAF4CDE4E7990ULL }, /* XSUM_XXH3_testdata[5284] */\n    { 2642, 0x9E3779B185EBCA8DULL, 0xC08961744B1C05A1ULL }, /* XSUM_XXH3_testdata[5285] */\n    { 2643, 0x0000000000000000ULL, 0x02F6E5D0B5E36602ULL }, /* XSUM_XXH3_testdata[5286] */\n    { 2643, 0x9E3779B185EBCA8DULL, 0x5DD5F86B860B983DULL }, /* XSUM_XXH3_testdata[5287] */\n    { 2644, 0x0000000000000000ULL, 0x59D7C04DCD7A9C31ULL }, /* XSUM_XXH3_testdata[5288] */\n    { 2644, 0x9E3779B185EBCA8DULL, 0x09727950E5C8FB44ULL }, /* XSUM_XXH3_testdata[5289] */\n    { 2645, 0x0000000000000000ULL, 0xA73A74733557657FULL }, /* XSUM_XXH3_testdata[5290] */\n    { 2645, 0x9E3779B185EBCA8DULL, 0xC4BD5D9640F75625ULL }, /* XSUM_XXH3_testdata[5291] */\n    { 2646, 0x0000000000000000ULL, 0x68772A55C9E56246ULL }, /* XSUM_XXH3_testdata[5292] */\n    { 2646, 0x9E3779B185EBCA8DULL, 0x1C50DD529DB79DC6ULL }, /* XSUM_XXH3_testdata[5293] */\n    { 2647, 0x0000000000000000ULL, 0x388AC2C4452446F5ULL }, /* XSUM_XXH3_testdata[5294] */\n    { 2647, 0x9E3779B185EBCA8DULL, 0xDFA71D727175FE54ULL }, /* XSUM_XXH3_testdata[5295] */\n    { 2648, 0x0000000000000000ULL, 0x17C777FE609883D9ULL }, /* XSUM_XXH3_testdata[5296] */\n    { 2648, 0x9E3779B185EBCA8DULL, 0x086F565F371F7BF5ULL }, /* XSUM_XXH3_testdata[5297] */\n    { 2649, 0x0000000000000000ULL, 0x29D915B6CDAF1576ULL }, /* XSUM_XXH3_testdata[5298] */\n    { 2649, 0x9E3779B185EBCA8DULL, 0x725766FA1F433305ULL }, /* XSUM_XXH3_testdata[5299] */\n    { 2650, 0x0000000000000000ULL, 0x4428A0F2F241E77CULL }, /* XSUM_XXH3_testdata[5300] */\n    { 2650, 0x9E3779B185EBCA8DULL, 0xD8837F9E84379EADULL }, /* XSUM_XXH3_testdata[5301] */\n    { 2651, 0x0000000000000000ULL, 0x50226B7D26F9FFEFULL }, /* XSUM_XXH3_testdata[5302] */\n    { 2651, 0x9E3779B185EBCA8DULL, 0xCDDFA7F0AAB17C21ULL }, /* XSUM_XXH3_testdata[5303] */\n    { 2652, 0x0000000000000000ULL, 0xAFDD18658C66F457ULL }, /* XSUM_XXH3_testdata[5304] */\n    { 2652, 0x9E3779B185EBCA8DULL, 0x0CA3F1A77FEB0AD0ULL }, /* XSUM_XXH3_testdata[5305] */\n    { 2653, 0x0000000000000000ULL, 0x90D6CB1D97A2C85AULL }, /* XSUM_XXH3_testdata[5306] */\n    { 2653, 0x9E3779B185EBCA8DULL, 0xE68075A9292A3EBEULL }, /* XSUM_XXH3_testdata[5307] */\n    { 2654, 0x0000000000000000ULL, 0x4E1FA4CEC6584CB9ULL }, /* XSUM_XXH3_testdata[5308] */\n    { 2654, 0x9E3779B185EBCA8DULL, 0x71A47E1A45F59D80ULL }, /* XSUM_XXH3_testdata[5309] */\n    { 2655, 0x0000000000000000ULL, 0x59AC02AC895A5379ULL }, /* XSUM_XXH3_testdata[5310] */\n    { 2655, 0x9E3779B185EBCA8DULL, 0xD83081AA95B4AA8EULL }, /* XSUM_XXH3_testdata[5311] */\n    { 2656, 0x0000000000000000ULL, 0x13981EC22DD78499ULL }, /* XSUM_XXH3_testdata[5312] */\n    { 2656, 0x9E3779B185EBCA8DULL, 0x76F0AD69CDFD0254ULL }, /* XSUM_XXH3_testdata[5313] */\n    { 2657, 0x0000000000000000ULL, 0xAACD492864D6B9E4ULL }, /* XSUM_XXH3_testdata[5314] */\n    { 2657, 0x9E3779B185EBCA8DULL, 0x6F8384F087AF019DULL }, /* XSUM_XXH3_testdata[5315] */\n    { 2658, 0x0000000000000000ULL, 0xDE0C44779FFEE002ULL }, /* XSUM_XXH3_testdata[5316] */\n    { 2658, 0x9E3779B185EBCA8DULL, 0x6338E397A813A3F9ULL }, /* XSUM_XXH3_testdata[5317] */\n    { 2659, 0x0000000000000000ULL, 0x89B7998E416EC5CDULL }, /* XSUM_XXH3_testdata[5318] */\n    { 2659, 0x9E3779B185EBCA8DULL, 0x1910B8DCBBDA7530ULL }, /* XSUM_XXH3_testdata[5319] */\n    { 2660, 0x0000000000000000ULL, 0x9FA812A12388E7A3ULL }, /* XSUM_XXH3_testdata[5320] */\n    { 2660, 0x9E3779B185EBCA8DULL, 0xAEE3667EB03F3485ULL }, /* XSUM_XXH3_testdata[5321] */\n    { 2661, 0x0000000000000000ULL, 0xC016F36D3412818FULL }, /* XSUM_XXH3_testdata[5322] */\n    { 2661, 0x9E3779B185EBCA8DULL, 0x25B163D739A0D36AULL }, /* XSUM_XXH3_testdata[5323] */\n    { 2662, 0x0000000000000000ULL, 0x8D1F596F263D9397ULL }, /* XSUM_XXH3_testdata[5324] */\n    { 2662, 0x9E3779B185EBCA8DULL, 0x6A8BB4C01177798DULL }, /* XSUM_XXH3_testdata[5325] */\n    { 2663, 0x0000000000000000ULL, 0x42D9F50DCE51E48FULL }, /* XSUM_XXH3_testdata[5326] */\n    { 2663, 0x9E3779B185EBCA8DULL, 0x568D106E7EB991DFULL }, /* XSUM_XXH3_testdata[5327] */\n    { 2664, 0x0000000000000000ULL, 0x9EE636034F83E51EULL }, /* XSUM_XXH3_testdata[5328] */\n    { 2664, 0x9E3779B185EBCA8DULL, 0xBDC01BEE7D7F6342ULL }, /* XSUM_XXH3_testdata[5329] */\n    { 2665, 0x0000000000000000ULL, 0x844C87FB2DBC28C1ULL }, /* XSUM_XXH3_testdata[5330] */\n    { 2665, 0x9E3779B185EBCA8DULL, 0x1B7B68C2FB38F0BFULL }, /* XSUM_XXH3_testdata[5331] */\n    { 2666, 0x0000000000000000ULL, 0xF38FC2659AFA13E7ULL }, /* XSUM_XXH3_testdata[5332] */\n    { 2666, 0x9E3779B185EBCA8DULL, 0xE85DEBAD6838BCF9ULL }, /* XSUM_XXH3_testdata[5333] */\n    { 2667, 0x0000000000000000ULL, 0x276FF5707C509A89ULL }, /* XSUM_XXH3_testdata[5334] */\n    { 2667, 0x9E3779B185EBCA8DULL, 0x5BCC923A6CE9D2E3ULL }, /* XSUM_XXH3_testdata[5335] */\n    { 2668, 0x0000000000000000ULL, 0x99A95EA696BD6785ULL }, /* XSUM_XXH3_testdata[5336] */\n    { 2668, 0x9E3779B185EBCA8DULL, 0x598FACDB1FC4FF31ULL }, /* XSUM_XXH3_testdata[5337] */\n    { 2669, 0x0000000000000000ULL, 0x587C1525793EAC83ULL }, /* XSUM_XXH3_testdata[5338] */\n    { 2669, 0x9E3779B185EBCA8DULL, 0xFE934DA8D6689EADULL }, /* XSUM_XXH3_testdata[5339] */\n    { 2670, 0x0000000000000000ULL, 0xAE625CFCC51CA5B6ULL }, /* XSUM_XXH3_testdata[5340] */\n    { 2670, 0x9E3779B185EBCA8DULL, 0x82203BFF0066A4D6ULL }, /* XSUM_XXH3_testdata[5341] */\n    { 2671, 0x0000000000000000ULL, 0xA87597FFB968B6E0ULL }, /* XSUM_XXH3_testdata[5342] */\n    { 2671, 0x9E3779B185EBCA8DULL, 0x5C87AE9CF5951A93ULL }, /* XSUM_XXH3_testdata[5343] */\n    { 2672, 0x0000000000000000ULL, 0x615BD5A28193AEF1ULL }, /* XSUM_XXH3_testdata[5344] */\n    { 2672, 0x9E3779B185EBCA8DULL, 0x495B718A1B4B8408ULL }, /* XSUM_XXH3_testdata[5345] */\n    { 2673, 0x0000000000000000ULL, 0x9D4E0BF6898776B0ULL }, /* XSUM_XXH3_testdata[5346] */\n    { 2673, 0x9E3779B185EBCA8DULL, 0xDEC8490ACBE435ADULL }, /* XSUM_XXH3_testdata[5347] */\n    { 2674, 0x0000000000000000ULL, 0xA5C43A054767C765ULL }, /* XSUM_XXH3_testdata[5348] */\n    { 2674, 0x9E3779B185EBCA8DULL, 0x8368867E1EA6FC99ULL }, /* XSUM_XXH3_testdata[5349] */\n    { 2675, 0x0000000000000000ULL, 0x16BBD0C10B5D2923ULL }, /* XSUM_XXH3_testdata[5350] */\n    { 2675, 0x9E3779B185EBCA8DULL, 0x164E8EE293E821BCULL }, /* XSUM_XXH3_testdata[5351] */\n    { 2676, 0x0000000000000000ULL, 0x84BC3B4237C011F0ULL }, /* XSUM_XXH3_testdata[5352] */\n    { 2676, 0x9E3779B185EBCA8DULL, 0xCA34B1C20B89EA14ULL }, /* XSUM_XXH3_testdata[5353] */\n    { 2677, 0x0000000000000000ULL, 0x85F78F29D4E96850ULL }, /* XSUM_XXH3_testdata[5354] */\n    { 2677, 0x9E3779B185EBCA8DULL, 0x391275578A5E0783ULL }, /* XSUM_XXH3_testdata[5355] */\n    { 2678, 0x0000000000000000ULL, 0xF3EFCA9185986EB0ULL }, /* XSUM_XXH3_testdata[5356] */\n    { 2678, 0x9E3779B185EBCA8DULL, 0x377E026296B6768DULL }, /* XSUM_XXH3_testdata[5357] */\n    { 2679, 0x0000000000000000ULL, 0x03308A07CDF022E0ULL }, /* XSUM_XXH3_testdata[5358] */\n    { 2679, 0x9E3779B185EBCA8DULL, 0xCC09B8CFA131A49CULL }, /* XSUM_XXH3_testdata[5359] */\n    { 2680, 0x0000000000000000ULL, 0xD90831B33475C6DCULL }, /* XSUM_XXH3_testdata[5360] */\n    { 2680, 0x9E3779B185EBCA8DULL, 0xD4954B2E7FDE32ACULL }, /* XSUM_XXH3_testdata[5361] */\n    { 2681, 0x0000000000000000ULL, 0xC1547AC0EE938EDDULL }, /* XSUM_XXH3_testdata[5362] */\n    { 2681, 0x9E3779B185EBCA8DULL, 0xBCCE8DD6ABF21DBFULL }, /* XSUM_XXH3_testdata[5363] */\n    { 2682, 0x0000000000000000ULL, 0xF4D2F97480A43A13ULL }, /* XSUM_XXH3_testdata[5364] */\n    { 2682, 0x9E3779B185EBCA8DULL, 0x79716517796A6054ULL }, /* XSUM_XXH3_testdata[5365] */\n    { 2683, 0x0000000000000000ULL, 0xC29DCF207A0AA424ULL }, /* XSUM_XXH3_testdata[5366] */\n    { 2683, 0x9E3779B185EBCA8DULL, 0xACB24D3AD0D98BCFULL }, /* XSUM_XXH3_testdata[5367] */\n    { 2684, 0x0000000000000000ULL, 0x13B268BDF2A4552BULL }, /* XSUM_XXH3_testdata[5368] */\n    { 2684, 0x9E3779B185EBCA8DULL, 0x027F4FDCE5AFB403ULL }, /* XSUM_XXH3_testdata[5369] */\n    { 2685, 0x0000000000000000ULL, 0xACE63EF23FB86E6AULL }, /* XSUM_XXH3_testdata[5370] */\n    { 2685, 0x9E3779B185EBCA8DULL, 0x3B0AFC1CCDA1C39FULL }, /* XSUM_XXH3_testdata[5371] */\n    { 2686, 0x0000000000000000ULL, 0x9A49DCE5BE630EAEULL }, /* XSUM_XXH3_testdata[5372] */\n    { 2686, 0x9E3779B185EBCA8DULL, 0x4574DA06250C1577ULL }, /* XSUM_XXH3_testdata[5373] */\n    { 2687, 0x0000000000000000ULL, 0xD871E9EE58D825F7ULL }, /* XSUM_XXH3_testdata[5374] */\n    { 2687, 0x9E3779B185EBCA8DULL, 0xFA3625BF5B009957ULL }, /* XSUM_XXH3_testdata[5375] */\n    { 2688, 0x0000000000000000ULL, 0x3266FF28F9519B04ULL }, /* XSUM_XXH3_testdata[5376] */\n    { 2688, 0x9E3779B185EBCA8DULL, 0x578B167B0CAAFFD2ULL }, /* XSUM_XXH3_testdata[5377] */\n    { 2689, 0x0000000000000000ULL, 0x101AC0C3B5522413ULL }, /* XSUM_XXH3_testdata[5378] */\n    { 2689, 0x9E3779B185EBCA8DULL, 0x7A06AFAA36487437ULL }, /* XSUM_XXH3_testdata[5379] */\n    { 2690, 0x0000000000000000ULL, 0xFADDE89B51C359C9ULL }, /* XSUM_XXH3_testdata[5380] */\n    { 2690, 0x9E3779B185EBCA8DULL, 0xE38E645BF761AC4DULL }, /* XSUM_XXH3_testdata[5381] */\n    { 2691, 0x0000000000000000ULL, 0x63506FAC4CBA52C1ULL }, /* XSUM_XXH3_testdata[5382] */\n    { 2691, 0x9E3779B185EBCA8DULL, 0xE27E0ABCCE7904DFULL }, /* XSUM_XXH3_testdata[5383] */\n    { 2692, 0x0000000000000000ULL, 0x71F53880758D7060ULL }, /* XSUM_XXH3_testdata[5384] */\n    { 2692, 0x9E3779B185EBCA8DULL, 0x78581FBA0A1144F3ULL }, /* XSUM_XXH3_testdata[5385] */\n    { 2693, 0x0000000000000000ULL, 0xDE9508CCD369CE41ULL }, /* XSUM_XXH3_testdata[5386] */\n    { 2693, 0x9E3779B185EBCA8DULL, 0x280431D740E85450ULL }, /* XSUM_XXH3_testdata[5387] */\n    { 2694, 0x0000000000000000ULL, 0x71DBA1E913B47BD6ULL }, /* XSUM_XXH3_testdata[5388] */\n    { 2694, 0x9E3779B185EBCA8DULL, 0xF19B1A1929F741AEULL }, /* XSUM_XXH3_testdata[5389] */\n    { 2695, 0x0000000000000000ULL, 0x55D2D49B1F2BD88CULL }, /* XSUM_XXH3_testdata[5390] */\n    { 2695, 0x9E3779B185EBCA8DULL, 0xA5801C01E48F00F9ULL }, /* XSUM_XXH3_testdata[5391] */\n    { 2696, 0x0000000000000000ULL, 0x1064CF1956972EB3ULL }, /* XSUM_XXH3_testdata[5392] */\n    { 2696, 0x9E3779B185EBCA8DULL, 0x9BAF49DC05ACE5D5ULL }, /* XSUM_XXH3_testdata[5393] */\n    { 2697, 0x0000000000000000ULL, 0x5889C462CEA8A71DULL }, /* XSUM_XXH3_testdata[5394] */\n    { 2697, 0x9E3779B185EBCA8DULL, 0x7CD2AA74EC82B7AFULL }, /* XSUM_XXH3_testdata[5395] */\n    { 2698, 0x0000000000000000ULL, 0x4517D3A546E2CDF8ULL }, /* XSUM_XXH3_testdata[5396] */\n    { 2698, 0x9E3779B185EBCA8DULL, 0x85D8B977234EEC88ULL }, /* XSUM_XXH3_testdata[5397] */\n    { 2699, 0x0000000000000000ULL, 0x26324B0C49D31CDCULL }, /* XSUM_XXH3_testdata[5398] */\n    { 2699, 0x9E3779B185EBCA8DULL, 0xD9624BAD327F76F3ULL }, /* XSUM_XXH3_testdata[5399] */\n    { 2700, 0x0000000000000000ULL, 0x770688060303A701ULL }, /* XSUM_XXH3_testdata[5400] */\n    { 2700, 0x9E3779B185EBCA8DULL, 0x6EE35FED0CE66F45ULL }, /* XSUM_XXH3_testdata[5401] */\n    { 2701, 0x0000000000000000ULL, 0x967A50209E1DB590ULL }, /* XSUM_XXH3_testdata[5402] */\n    { 2701, 0x9E3779B185EBCA8DULL, 0xE5654F6E586D4E45ULL }, /* XSUM_XXH3_testdata[5403] */\n    { 2702, 0x0000000000000000ULL, 0x8C5F324B88AFD79CULL }, /* XSUM_XXH3_testdata[5404] */\n    { 2702, 0x9E3779B185EBCA8DULL, 0xB8CFD42B4236EA07ULL }, /* XSUM_XXH3_testdata[5405] */\n    { 2703, 0x0000000000000000ULL, 0xCBD4632639DAB36DULL }, /* XSUM_XXH3_testdata[5406] */\n    { 2703, 0x9E3779B185EBCA8DULL, 0xE58EDC615C166AD5ULL }, /* XSUM_XXH3_testdata[5407] */\n    { 2704, 0x0000000000000000ULL, 0x49BC475C9EB2111CULL }, /* XSUM_XXH3_testdata[5408] */\n    { 2704, 0x9E3779B185EBCA8DULL, 0xB02A55F8B8CC1358ULL }, /* XSUM_XXH3_testdata[5409] */\n    { 2705, 0x0000000000000000ULL, 0x95FAC591C6986D3BULL }, /* XSUM_XXH3_testdata[5410] */\n    { 2705, 0x9E3779B185EBCA8DULL, 0xEEBAA21D62DB3FE2ULL }, /* XSUM_XXH3_testdata[5411] */\n    { 2706, 0x0000000000000000ULL, 0x792DF4D618BFEE49ULL }, /* XSUM_XXH3_testdata[5412] */\n    { 2706, 0x9E3779B185EBCA8DULL, 0x8D9B3B158B7B0A3AULL }, /* XSUM_XXH3_testdata[5413] */\n    { 2707, 0x0000000000000000ULL, 0x35E99A2BC3203AF2ULL }, /* XSUM_XXH3_testdata[5414] */\n    { 2707, 0x9E3779B185EBCA8DULL, 0x2AF059E8D350DCB9ULL }, /* XSUM_XXH3_testdata[5415] */\n    { 2708, 0x0000000000000000ULL, 0xB569AF88772A0683ULL }, /* XSUM_XXH3_testdata[5416] */\n    { 2708, 0x9E3779B185EBCA8DULL, 0x3D5378B9C7FC63B7ULL }, /* XSUM_XXH3_testdata[5417] */\n    { 2709, 0x0000000000000000ULL, 0x8D48AA0E64721261ULL }, /* XSUM_XXH3_testdata[5418] */\n    { 2709, 0x9E3779B185EBCA8DULL, 0x271CEA42E8444202ULL }, /* XSUM_XXH3_testdata[5419] */\n    { 2710, 0x0000000000000000ULL, 0xC6FF9D293A1AA329ULL }, /* XSUM_XXH3_testdata[5420] */\n    { 2710, 0x9E3779B185EBCA8DULL, 0x4C2CEA3B16BBB71FULL }, /* XSUM_XXH3_testdata[5421] */\n    { 2711, 0x0000000000000000ULL, 0x5F530CC8CBB57EE2ULL }, /* XSUM_XXH3_testdata[5422] */\n    { 2711, 0x9E3779B185EBCA8DULL, 0xD970F7003E55C31DULL }, /* XSUM_XXH3_testdata[5423] */\n    { 2712, 0x0000000000000000ULL, 0xBC54D452E46BC7D0ULL }, /* XSUM_XXH3_testdata[5424] */\n    { 2712, 0x9E3779B185EBCA8DULL, 0x8A22A690E83F1229ULL }, /* XSUM_XXH3_testdata[5425] */\n    { 2713, 0x0000000000000000ULL, 0xD72E6109D358D35AULL }, /* XSUM_XXH3_testdata[5426] */\n    { 2713, 0x9E3779B185EBCA8DULL, 0xB09F86C0560A7B30ULL }, /* XSUM_XXH3_testdata[5427] */\n    { 2714, 0x0000000000000000ULL, 0x953DE252454629D6ULL }, /* XSUM_XXH3_testdata[5428] */\n    { 2714, 0x9E3779B185EBCA8DULL, 0x25DCCEABA8C25758ULL }, /* XSUM_XXH3_testdata[5429] */\n    { 2715, 0x0000000000000000ULL, 0xF76715E5D4557FACULL }, /* XSUM_XXH3_testdata[5430] */\n    { 2715, 0x9E3779B185EBCA8DULL, 0x077ED657DB913C38ULL }, /* XSUM_XXH3_testdata[5431] */\n    { 2716, 0x0000000000000000ULL, 0x776E23A66AEB84B6ULL }, /* XSUM_XXH3_testdata[5432] */\n    { 2716, 0x9E3779B185EBCA8DULL, 0xEB50F50AF62FF0DDULL }, /* XSUM_XXH3_testdata[5433] */\n    { 2717, 0x0000000000000000ULL, 0x36D2B4C2D5F229B9ULL }, /* XSUM_XXH3_testdata[5434] */\n    { 2717, 0x9E3779B185EBCA8DULL, 0xE7257DB30D66F4ABULL }, /* XSUM_XXH3_testdata[5435] */\n    { 2718, 0x0000000000000000ULL, 0x3FCF289950CEE08AULL }, /* XSUM_XXH3_testdata[5436] */\n    { 2718, 0x9E3779B185EBCA8DULL, 0x419F3C320B5D1D8EULL }, /* XSUM_XXH3_testdata[5437] */\n    { 2719, 0x0000000000000000ULL, 0x4E9F78279B4602A1ULL }, /* XSUM_XXH3_testdata[5438] */\n    { 2719, 0x9E3779B185EBCA8DULL, 0x9548F72117A6EB81ULL }, /* XSUM_XXH3_testdata[5439] */\n    { 2720, 0x0000000000000000ULL, 0x753D8BF5C30B6F75ULL }, /* XSUM_XXH3_testdata[5440] */\n    { 2720, 0x9E3779B185EBCA8DULL, 0x7015D8EEB6AA4C5FULL }, /* XSUM_XXH3_testdata[5441] */\n    { 2721, 0x0000000000000000ULL, 0xE45A2972F797B027ULL }, /* XSUM_XXH3_testdata[5442] */\n    { 2721, 0x9E3779B185EBCA8DULL, 0x1EFE37D9156E2D85ULL }, /* XSUM_XXH3_testdata[5443] */\n    { 2722, 0x0000000000000000ULL, 0x720FA85611E358D7ULL }, /* XSUM_XXH3_testdata[5444] */\n    { 2722, 0x9E3779B185EBCA8DULL, 0xA5E64C7F065161F6ULL }, /* XSUM_XXH3_testdata[5445] */\n    { 2723, 0x0000000000000000ULL, 0x535D73EFBCEA79A7ULL }, /* XSUM_XXH3_testdata[5446] */\n    { 2723, 0x9E3779B185EBCA8DULL, 0x21E76579CA88C0B5ULL }, /* XSUM_XXH3_testdata[5447] */\n    { 2724, 0x0000000000000000ULL, 0x8951F4CB202A9A7BULL }, /* XSUM_XXH3_testdata[5448] */\n    { 2724, 0x9E3779B185EBCA8DULL, 0x6D5DE30B925BB243ULL }, /* XSUM_XXH3_testdata[5449] */\n    { 2725, 0x0000000000000000ULL, 0x02EA34C18E600923ULL }, /* XSUM_XXH3_testdata[5450] */\n    { 2725, 0x9E3779B185EBCA8DULL, 0x16E400B1E8002ECAULL }, /* XSUM_XXH3_testdata[5451] */\n    { 2726, 0x0000000000000000ULL, 0x2D861439B2387DA3ULL }, /* XSUM_XXH3_testdata[5452] */\n    { 2726, 0x9E3779B185EBCA8DULL, 0x466E61CDCECD8965ULL }, /* XSUM_XXH3_testdata[5453] */\n    { 2727, 0x0000000000000000ULL, 0x126BA5E1221D558EULL }, /* XSUM_XXH3_testdata[5454] */\n    { 2727, 0x9E3779B185EBCA8DULL, 0x6E2A5ACD0E5E94EAULL }, /* XSUM_XXH3_testdata[5455] */\n    { 2728, 0x0000000000000000ULL, 0x142E85167FC6F09EULL }, /* XSUM_XXH3_testdata[5456] */\n    { 2728, 0x9E3779B185EBCA8DULL, 0xDDBA453DB1CE4644ULL }, /* XSUM_XXH3_testdata[5457] */\n    { 2729, 0x0000000000000000ULL, 0x54E2E27AA70E87CDULL }, /* XSUM_XXH3_testdata[5458] */\n    { 2729, 0x9E3779B185EBCA8DULL, 0x133CD21C564974FEULL }, /* XSUM_XXH3_testdata[5459] */\n    { 2730, 0x0000000000000000ULL, 0x19F5A51C54B3A6D2ULL }, /* XSUM_XXH3_testdata[5460] */\n    { 2730, 0x9E3779B185EBCA8DULL, 0x1F6AF6A0CFA750B0ULL }, /* XSUM_XXH3_testdata[5461] */\n    { 2731, 0x0000000000000000ULL, 0xA6DFEEA3C262AADDULL }, /* XSUM_XXH3_testdata[5462] */\n    { 2731, 0x9E3779B185EBCA8DULL, 0x1CB91B67F8F2EE5DULL }, /* XSUM_XXH3_testdata[5463] */\n    { 2732, 0x0000000000000000ULL, 0x1130AA460B92A232ULL }, /* XSUM_XXH3_testdata[5464] */\n    { 2732, 0x9E3779B185EBCA8DULL, 0x2CF3E546D8821900ULL }, /* XSUM_XXH3_testdata[5465] */\n    { 2733, 0x0000000000000000ULL, 0xB2DCE0E3338954E8ULL }, /* XSUM_XXH3_testdata[5466] */\n    { 2733, 0x9E3779B185EBCA8DULL, 0xE0F0924F7EE26EB7ULL }, /* XSUM_XXH3_testdata[5467] */\n    { 2734, 0x0000000000000000ULL, 0xB7C5C80CB54C1AB8ULL }, /* XSUM_XXH3_testdata[5468] */\n    { 2734, 0x9E3779B185EBCA8DULL, 0xDB5C1FCC7A178F80ULL }, /* XSUM_XXH3_testdata[5469] */\n    { 2735, 0x0000000000000000ULL, 0x6EDDE6BB963333E4ULL }, /* XSUM_XXH3_testdata[5470] */\n    { 2735, 0x9E3779B185EBCA8DULL, 0x6E8710724AD69BC4ULL }, /* XSUM_XXH3_testdata[5471] */\n    { 2736, 0x0000000000000000ULL, 0x7A3DCFBA08DD2218ULL }, /* XSUM_XXH3_testdata[5472] */\n    { 2736, 0x9E3779B185EBCA8DULL, 0x13E8FEE1C71AAAC5ULL }, /* XSUM_XXH3_testdata[5473] */\n    { 2737, 0x0000000000000000ULL, 0xE236CBC86C3366C0ULL }, /* XSUM_XXH3_testdata[5474] */\n    { 2737, 0x9E3779B185EBCA8DULL, 0xB2FF2DD5FAD7D707ULL }, /* XSUM_XXH3_testdata[5475] */\n    { 2738, 0x0000000000000000ULL, 0x0740BABCB82C79E1ULL }, /* XSUM_XXH3_testdata[5476] */\n    { 2738, 0x9E3779B185EBCA8DULL, 0x053A090CB71D2A97ULL }, /* XSUM_XXH3_testdata[5477] */\n    { 2739, 0x0000000000000000ULL, 0x25B01CC08FA2F76CULL }, /* XSUM_XXH3_testdata[5478] */\n    { 2739, 0x9E3779B185EBCA8DULL, 0x06B6774E705B6F04ULL }, /* XSUM_XXH3_testdata[5479] */\n    { 2740, 0x0000000000000000ULL, 0x03B8F0D95A0503C9ULL }, /* XSUM_XXH3_testdata[5480] */\n    { 2740, 0x9E3779B185EBCA8DULL, 0x4EFBDC5FCC5FF48DULL }, /* XSUM_XXH3_testdata[5481] */\n    { 2741, 0x0000000000000000ULL, 0x2A3C8F37C50C5D4DULL }, /* XSUM_XXH3_testdata[5482] */\n    { 2741, 0x9E3779B185EBCA8DULL, 0xA7034CA7B8F00A87ULL }, /* XSUM_XXH3_testdata[5483] */\n    { 2742, 0x0000000000000000ULL, 0x19D39A92C8099D35ULL }, /* XSUM_XXH3_testdata[5484] */\n    { 2742, 0x9E3779B185EBCA8DULL, 0x18ED7073D3D37414ULL }, /* XSUM_XXH3_testdata[5485] */\n    { 2743, 0x0000000000000000ULL, 0xD6479A438E07F0BCULL }, /* XSUM_XXH3_testdata[5486] */\n    { 2743, 0x9E3779B185EBCA8DULL, 0xD569FCB2E3FE0526ULL }, /* XSUM_XXH3_testdata[5487] */\n    { 2744, 0x0000000000000000ULL, 0x25305373A50C2A9BULL }, /* XSUM_XXH3_testdata[5488] */\n    { 2744, 0x9E3779B185EBCA8DULL, 0xBBFC4F0BFD00D728ULL }, /* XSUM_XXH3_testdata[5489] */\n    { 2745, 0x0000000000000000ULL, 0x95C91E93B8FEC500ULL }, /* XSUM_XXH3_testdata[5490] */\n    { 2745, 0x9E3779B185EBCA8DULL, 0xE9EFACD2ED18C3ABULL }, /* XSUM_XXH3_testdata[5491] */\n    { 2746, 0x0000000000000000ULL, 0x077B587B5C5BD810ULL }, /* XSUM_XXH3_testdata[5492] */\n    { 2746, 0x9E3779B185EBCA8DULL, 0xC178F72E6F411074ULL }, /* XSUM_XXH3_testdata[5493] */\n    { 2747, 0x0000000000000000ULL, 0xCA8D3A0F2190E06FULL }, /* XSUM_XXH3_testdata[5494] */\n    { 2747, 0x9E3779B185EBCA8DULL, 0x5CF89C801F50BE4BULL }, /* XSUM_XXH3_testdata[5495] */\n    { 2748, 0x0000000000000000ULL, 0x59A9D5F7C3E59433ULL }, /* XSUM_XXH3_testdata[5496] */\n    { 2748, 0x9E3779B185EBCA8DULL, 0x0D438D59A0EE0295ULL }, /* XSUM_XXH3_testdata[5497] */\n    { 2749, 0x0000000000000000ULL, 0x7572D747C29A03FAULL }, /* XSUM_XXH3_testdata[5498] */\n    { 2749, 0x9E3779B185EBCA8DULL, 0xC25AEA9C6A74B873ULL }, /* XSUM_XXH3_testdata[5499] */\n    { 2750, 0x0000000000000000ULL, 0x1F0F0FDB414AEE14ULL }, /* XSUM_XXH3_testdata[5500] */\n    { 2750, 0x9E3779B185EBCA8DULL, 0x8F8DE9C001788984ULL }, /* XSUM_XXH3_testdata[5501] */\n    { 2751, 0x0000000000000000ULL, 0x30CA11D1D6F7D240ULL }, /* XSUM_XXH3_testdata[5502] */\n    { 2751, 0x9E3779B185EBCA8DULL, 0x336DC6720F051ECAULL }, /* XSUM_XXH3_testdata[5503] */\n    { 2752, 0x0000000000000000ULL, 0x458EE1F5CED1B45AULL }, /* XSUM_XXH3_testdata[5504] */\n    { 2752, 0x9E3779B185EBCA8DULL, 0xC66C6D0011AF599FULL }, /* XSUM_XXH3_testdata[5505] */\n    { 2753, 0x0000000000000000ULL, 0x55ADD9C7930867DBULL }, /* XSUM_XXH3_testdata[5506] */\n    { 2753, 0x9E3779B185EBCA8DULL, 0xD7E1D7F7D04E0FB0ULL }, /* XSUM_XXH3_testdata[5507] */\n    { 2754, 0x0000000000000000ULL, 0x21E57418A4ED11A2ULL }, /* XSUM_XXH3_testdata[5508] */\n    { 2754, 0x9E3779B185EBCA8DULL, 0xA0765E3336FEEA07ULL }, /* XSUM_XXH3_testdata[5509] */\n    { 2755, 0x0000000000000000ULL, 0x3D95DD744AD00F7CULL }, /* XSUM_XXH3_testdata[5510] */\n    { 2755, 0x9E3779B185EBCA8DULL, 0xE9AB7F5E0914C6C2ULL }, /* XSUM_XXH3_testdata[5511] */\n    { 2756, 0x0000000000000000ULL, 0x30B8DF382853F200ULL }, /* XSUM_XXH3_testdata[5512] */\n    { 2756, 0x9E3779B185EBCA8DULL, 0xE9247B49C5668B31ULL }, /* XSUM_XXH3_testdata[5513] */\n    { 2757, 0x0000000000000000ULL, 0x961656946CA43EEBULL }, /* XSUM_XXH3_testdata[5514] */\n    { 2757, 0x9E3779B185EBCA8DULL, 0xEC66FDE043F82FF6ULL }, /* XSUM_XXH3_testdata[5515] */\n    { 2758, 0x0000000000000000ULL, 0xDE25B87C2A769309ULL }, /* XSUM_XXH3_testdata[5516] */\n    { 2758, 0x9E3779B185EBCA8DULL, 0xF79A9EB6D410AD6DULL }, /* XSUM_XXH3_testdata[5517] */\n    { 2759, 0x0000000000000000ULL, 0xC68D576FAF60E351ULL }, /* XSUM_XXH3_testdata[5518] */\n    { 2759, 0x9E3779B185EBCA8DULL, 0xF45E1897BC935ED7ULL }, /* XSUM_XXH3_testdata[5519] */\n    { 2760, 0x0000000000000000ULL, 0xD4121E03DFE0B422ULL }, /* XSUM_XXH3_testdata[5520] */\n    { 2760, 0x9E3779B185EBCA8DULL, 0x6D63BC064A5AD595ULL }, /* XSUM_XXH3_testdata[5521] */\n    { 2761, 0x0000000000000000ULL, 0x6405876AF8FDA8DBULL }, /* XSUM_XXH3_testdata[5522] */\n    { 2761, 0x9E3779B185EBCA8DULL, 0x791A22C29E2A70A1ULL }, /* XSUM_XXH3_testdata[5523] */\n    { 2762, 0x0000000000000000ULL, 0x29FB0D9D51C5357CULL }, /* XSUM_XXH3_testdata[5524] */\n    { 2762, 0x9E3779B185EBCA8DULL, 0xA656D8D374F98FB2ULL }, /* XSUM_XXH3_testdata[5525] */\n    { 2763, 0x0000000000000000ULL, 0xD385572F3331434BULL }, /* XSUM_XXH3_testdata[5526] */\n    { 2763, 0x9E3779B185EBCA8DULL, 0x93F2DC4243EF4A0DULL }, /* XSUM_XXH3_testdata[5527] */\n    { 2764, 0x0000000000000000ULL, 0x6252F1B78A182579ULL }, /* XSUM_XXH3_testdata[5528] */\n    { 2764, 0x9E3779B185EBCA8DULL, 0x9CFAB6B1ED5BC767ULL }, /* XSUM_XXH3_testdata[5529] */\n    { 2765, 0x0000000000000000ULL, 0x608232243E88E9E8ULL }, /* XSUM_XXH3_testdata[5530] */\n    { 2765, 0x9E3779B185EBCA8DULL, 0x81BEC015284F9D0AULL }, /* XSUM_XXH3_testdata[5531] */\n    { 2766, 0x0000000000000000ULL, 0x4CA11F94AA9311FDULL }, /* XSUM_XXH3_testdata[5532] */\n    { 2766, 0x9E3779B185EBCA8DULL, 0x757BBBA8832A2596ULL }, /* XSUM_XXH3_testdata[5533] */\n    { 2767, 0x0000000000000000ULL, 0x89073CEAB2998F7DULL }, /* XSUM_XXH3_testdata[5534] */\n    { 2767, 0x9E3779B185EBCA8DULL, 0xF50449D89C506855ULL }, /* XSUM_XXH3_testdata[5535] */\n    { 2768, 0x0000000000000000ULL, 0xE1D5CC26D5DA41C4ULL }, /* XSUM_XXH3_testdata[5536] */\n    { 2768, 0x9E3779B185EBCA8DULL, 0x30E85E6688F63EE0ULL }, /* XSUM_XXH3_testdata[5537] */\n    { 2769, 0x0000000000000000ULL, 0x53123794A8B8D2C1ULL }, /* XSUM_XXH3_testdata[5538] */\n    { 2769, 0x9E3779B185EBCA8DULL, 0xEDED2614F1AAFCF2ULL }, /* XSUM_XXH3_testdata[5539] */\n    { 2770, 0x0000000000000000ULL, 0xA1AE5426E70C4FFCULL }, /* XSUM_XXH3_testdata[5540] */\n    { 2770, 0x9E3779B185EBCA8DULL, 0xB93D989BE8CD54CAULL }, /* XSUM_XXH3_testdata[5541] */\n    { 2771, 0x0000000000000000ULL, 0x1D4DA91632EF09EEULL }, /* XSUM_XXH3_testdata[5542] */\n    { 2771, 0x9E3779B185EBCA8DULL, 0xC34E628EC15481A5ULL }, /* XSUM_XXH3_testdata[5543] */\n    { 2772, 0x0000000000000000ULL, 0x9ECE7C8A98D7B2E7ULL }, /* XSUM_XXH3_testdata[5544] */\n    { 2772, 0x9E3779B185EBCA8DULL, 0x47F5821AAE0F7082ULL }, /* XSUM_XXH3_testdata[5545] */\n    { 2773, 0x0000000000000000ULL, 0x6BB09DD7198D07A2ULL }, /* XSUM_XXH3_testdata[5546] */\n    { 2773, 0x9E3779B185EBCA8DULL, 0xC4E207B5168826C0ULL }, /* XSUM_XXH3_testdata[5547] */\n    { 2774, 0x0000000000000000ULL, 0xE25C5745DA05D231ULL }, /* XSUM_XXH3_testdata[5548] */\n    { 2774, 0x9E3779B185EBCA8DULL, 0xE8D3435F6DF7CBEDULL }, /* XSUM_XXH3_testdata[5549] */\n    { 2775, 0x0000000000000000ULL, 0x1AA5E49A629B1132ULL }, /* XSUM_XXH3_testdata[5550] */\n    { 2775, 0x9E3779B185EBCA8DULL, 0xFBC9277E659170B6ULL }, /* XSUM_XXH3_testdata[5551] */\n    { 2776, 0x0000000000000000ULL, 0xDEF60C67EEF33AF9ULL }, /* XSUM_XXH3_testdata[5552] */\n    { 2776, 0x9E3779B185EBCA8DULL, 0x6BA7B30A047DA388ULL }, /* XSUM_XXH3_testdata[5553] */\n    { 2777, 0x0000000000000000ULL, 0xD693241CC8A8F08EULL }, /* XSUM_XXH3_testdata[5554] */\n    { 2777, 0x9E3779B185EBCA8DULL, 0xB72757341DD668F9ULL }, /* XSUM_XXH3_testdata[5555] */\n    { 2778, 0x0000000000000000ULL, 0xC241C02AB68275D1ULL }, /* XSUM_XXH3_testdata[5556] */\n    { 2778, 0x9E3779B185EBCA8DULL, 0xD939281132FB39B2ULL }, /* XSUM_XXH3_testdata[5557] */\n    { 2779, 0x0000000000000000ULL, 0x23980E87C0E6A1A8ULL }, /* XSUM_XXH3_testdata[5558] */\n    { 2779, 0x9E3779B185EBCA8DULL, 0xFCFFD0BDECDD5A4DULL }, /* XSUM_XXH3_testdata[5559] */\n    { 2780, 0x0000000000000000ULL, 0x4D6E1D1FEB019F6CULL }, /* XSUM_XXH3_testdata[5560] */\n    { 2780, 0x9E3779B185EBCA8DULL, 0xA7FBD57639340763ULL }, /* XSUM_XXH3_testdata[5561] */\n    { 2781, 0x0000000000000000ULL, 0xFAB2435B6EB9D069ULL }, /* XSUM_XXH3_testdata[5562] */\n    { 2781, 0x9E3779B185EBCA8DULL, 0x2248F2C9F0E1999BULL }, /* XSUM_XXH3_testdata[5563] */\n    { 2782, 0x0000000000000000ULL, 0x05EF981B41DEC457ULL }, /* XSUM_XXH3_testdata[5564] */\n    { 2782, 0x9E3779B185EBCA8DULL, 0xAFF4964A346B1121ULL }, /* XSUM_XXH3_testdata[5565] */\n    { 2783, 0x0000000000000000ULL, 0x64DCA626F718A945ULL }, /* XSUM_XXH3_testdata[5566] */\n    { 2783, 0x9E3779B185EBCA8DULL, 0x48DC7C4EA9F0995BULL }, /* XSUM_XXH3_testdata[5567] */\n    { 2784, 0x0000000000000000ULL, 0x6A0DECB019CD9D1FULL }, /* XSUM_XXH3_testdata[5568] */\n    { 2784, 0x9E3779B185EBCA8DULL, 0x28737B55D92BD60BULL }, /* XSUM_XXH3_testdata[5569] */\n    { 2785, 0x0000000000000000ULL, 0xC1FA2E1BB99625BAULL }, /* XSUM_XXH3_testdata[5570] */\n    { 2785, 0x9E3779B185EBCA8DULL, 0xB7882C698A0383C5ULL }, /* XSUM_XXH3_testdata[5571] */\n    { 2786, 0x0000000000000000ULL, 0xBF23BE2BA21C48D5ULL }, /* XSUM_XXH3_testdata[5572] */\n    { 2786, 0x9E3779B185EBCA8DULL, 0x1394CFA56A673081ULL }, /* XSUM_XXH3_testdata[5573] */\n    { 2787, 0x0000000000000000ULL, 0xADC591AF19B11864ULL }, /* XSUM_XXH3_testdata[5574] */\n    { 2787, 0x9E3779B185EBCA8DULL, 0x848CE896419C53E8ULL }, /* XSUM_XXH3_testdata[5575] */\n    { 2788, 0x0000000000000000ULL, 0xF4B7D076FEB765F9ULL }, /* XSUM_XXH3_testdata[5576] */\n    { 2788, 0x9E3779B185EBCA8DULL, 0x2D970A62183B59FAULL }, /* XSUM_XXH3_testdata[5577] */\n    { 2789, 0x0000000000000000ULL, 0xE3FAC33EEB9E4B43ULL }, /* XSUM_XXH3_testdata[5578] */\n    { 2789, 0x9E3779B185EBCA8DULL, 0xE51EA4FC3621CED4ULL }, /* XSUM_XXH3_testdata[5579] */\n    { 2790, 0x0000000000000000ULL, 0xA1BD080329CBF8B2ULL }, /* XSUM_XXH3_testdata[5580] */\n    { 2790, 0x9E3779B185EBCA8DULL, 0xD95400EEA98D4BC7ULL }, /* XSUM_XXH3_testdata[5581] */\n    { 2791, 0x0000000000000000ULL, 0x5858D025CF1FFC7AULL }, /* XSUM_XXH3_testdata[5582] */\n    { 2791, 0x9E3779B185EBCA8DULL, 0xEEB3C317B1750030ULL }, /* XSUM_XXH3_testdata[5583] */\n    { 2792, 0x0000000000000000ULL, 0xC3CDB2533D838FBAULL }, /* XSUM_XXH3_testdata[5584] */\n    { 2792, 0x9E3779B185EBCA8DULL, 0x45F3C5DF6BC55CBAULL }, /* XSUM_XXH3_testdata[5585] */\n    { 2793, 0x0000000000000000ULL, 0x6A1EED32A35708E9ULL }, /* XSUM_XXH3_testdata[5586] */\n    { 2793, 0x9E3779B185EBCA8DULL, 0x136058660CE27205ULL }, /* XSUM_XXH3_testdata[5587] */\n    { 2794, 0x0000000000000000ULL, 0x0AB420E5BAC8786BULL }, /* XSUM_XXH3_testdata[5588] */\n    { 2794, 0x9E3779B185EBCA8DULL, 0xD8481AA9976853A8ULL }, /* XSUM_XXH3_testdata[5589] */\n    { 2795, 0x0000000000000000ULL, 0x6C3292D057491B10ULL }, /* XSUM_XXH3_testdata[5590] */\n    { 2795, 0x9E3779B185EBCA8DULL, 0xD689615FD6EBDE33ULL }, /* XSUM_XXH3_testdata[5591] */\n    { 2796, 0x0000000000000000ULL, 0xEB47D4162112B62BULL }, /* XSUM_XXH3_testdata[5592] */\n    { 2796, 0x9E3779B185EBCA8DULL, 0xA2B84BB91016CBD3ULL }, /* XSUM_XXH3_testdata[5593] */\n    { 2797, 0x0000000000000000ULL, 0x6EBE41CBA6B32EBCULL }, /* XSUM_XXH3_testdata[5594] */\n    { 2797, 0x9E3779B185EBCA8DULL, 0xD8BFE83A2C863701ULL }, /* XSUM_XXH3_testdata[5595] */\n    { 2798, 0x0000000000000000ULL, 0x210D49A6879775D2ULL }, /* XSUM_XXH3_testdata[5596] */\n    { 2798, 0x9E3779B185EBCA8DULL, 0x116FCBE17C5A571CULL }, /* XSUM_XXH3_testdata[5597] */\n    { 2799, 0x0000000000000000ULL, 0x2F5FC4E20EADDE64ULL }, /* XSUM_XXH3_testdata[5598] */\n    { 2799, 0x9E3779B185EBCA8DULL, 0xE1C0130AB1E55D95ULL }, /* XSUM_XXH3_testdata[5599] */\n    { 2800, 0x0000000000000000ULL, 0x1B1671FFCE9AC043ULL }, /* XSUM_XXH3_testdata[5600] */\n    { 2800, 0x9E3779B185EBCA8DULL, 0x02BD1944F810DD92ULL }, /* XSUM_XXH3_testdata[5601] */\n    { 2801, 0x0000000000000000ULL, 0x9830CF8F663EC7EDULL }, /* XSUM_XXH3_testdata[5602] */\n    { 2801, 0x9E3779B185EBCA8DULL, 0xD472EFED50CEC5C4ULL }, /* XSUM_XXH3_testdata[5603] */\n    { 2802, 0x0000000000000000ULL, 0xABDD355871184D94ULL }, /* XSUM_XXH3_testdata[5604] */\n    { 2802, 0x9E3779B185EBCA8DULL, 0x198D10AA902453B7ULL }, /* XSUM_XXH3_testdata[5605] */\n    { 2803, 0x0000000000000000ULL, 0x9465C024549ACF59ULL }, /* XSUM_XXH3_testdata[5606] */\n    { 2803, 0x9E3779B185EBCA8DULL, 0x9DFFEAE566EFD06DULL }, /* XSUM_XXH3_testdata[5607] */\n    { 2804, 0x0000000000000000ULL, 0x19B8C0A283BAE743ULL }, /* XSUM_XXH3_testdata[5608] */\n    { 2804, 0x9E3779B185EBCA8DULL, 0x22582296967DA4F2ULL }, /* XSUM_XXH3_testdata[5609] */\n    { 2805, 0x0000000000000000ULL, 0xEA1789858301C007ULL }, /* XSUM_XXH3_testdata[5610] */\n    { 2805, 0x9E3779B185EBCA8DULL, 0x9DA7AED963685999ULL }, /* XSUM_XXH3_testdata[5611] */\n    { 2806, 0x0000000000000000ULL, 0x41469656B5D06BE5ULL }, /* XSUM_XXH3_testdata[5612] */\n    { 2806, 0x9E3779B185EBCA8DULL, 0x6CC73C1166A2ABA9ULL }, /* XSUM_XXH3_testdata[5613] */\n    { 2807, 0x0000000000000000ULL, 0x7273ED17287001B5ULL }, /* XSUM_XXH3_testdata[5614] */\n    { 2807, 0x9E3779B185EBCA8DULL, 0x831ADC73FFCDF6F9ULL }, /* XSUM_XXH3_testdata[5615] */\n    { 2808, 0x0000000000000000ULL, 0xB9DEA446174EB818ULL }, /* XSUM_XXH3_testdata[5616] */\n    { 2808, 0x9E3779B185EBCA8DULL, 0x84DDF73FDDCB5ED8ULL }, /* XSUM_XXH3_testdata[5617] */\n    { 2809, 0x0000000000000000ULL, 0x8AC31E45973AECC1ULL }, /* XSUM_XXH3_testdata[5618] */\n    { 2809, 0x9E3779B185EBCA8DULL, 0x51AA142CF757DBD0ULL }, /* XSUM_XXH3_testdata[5619] */\n    { 2810, 0x0000000000000000ULL, 0xB6B2435E7436BB07ULL }, /* XSUM_XXH3_testdata[5620] */\n    { 2810, 0x9E3779B185EBCA8DULL, 0x045F8087ED8F321FULL }, /* XSUM_XXH3_testdata[5621] */\n    { 2811, 0x0000000000000000ULL, 0x932BE6F1A5AFB020ULL }, /* XSUM_XXH3_testdata[5622] */\n    { 2811, 0x9E3779B185EBCA8DULL, 0x96480703F1516151ULL }, /* XSUM_XXH3_testdata[5623] */\n    { 2812, 0x0000000000000000ULL, 0x8E0EA93D3213FB93ULL }, /* XSUM_XXH3_testdata[5624] */\n    { 2812, 0x9E3779B185EBCA8DULL, 0xCE0158085EB13056ULL }, /* XSUM_XXH3_testdata[5625] */\n    { 2813, 0x0000000000000000ULL, 0x4BE7E6FB4F03AD46ULL }, /* XSUM_XXH3_testdata[5626] */\n    { 2813, 0x9E3779B185EBCA8DULL, 0x2EB0F58BCD59E94DULL }, /* XSUM_XXH3_testdata[5627] */\n    { 2814, 0x0000000000000000ULL, 0x63AC6B0C5EB8E548ULL }, /* XSUM_XXH3_testdata[5628] */\n    { 2814, 0x9E3779B185EBCA8DULL, 0xA4968260C0175247ULL }, /* XSUM_XXH3_testdata[5629] */\n    { 2815, 0x0000000000000000ULL, 0x7D160EA25A0BF263ULL }, /* XSUM_XXH3_testdata[5630] */\n    { 2815, 0x9E3779B185EBCA8DULL, 0x04C38423EDB1143DULL }, /* XSUM_XXH3_testdata[5631] */\n    { 2816, 0x0000000000000000ULL, 0x7DD9AD11BF74219BULL }, /* XSUM_XXH3_testdata[5632] */\n    { 2816, 0x9E3779B185EBCA8DULL, 0x5132595AB0718E60ULL }, /* XSUM_XXH3_testdata[5633] */\n    { 2817, 0x0000000000000000ULL, 0xACE84D8987BC9A3FULL }, /* XSUM_XXH3_testdata[5634] */\n    { 2817, 0x9E3779B185EBCA8DULL, 0x09F4E8C5970DFC0FULL }, /* XSUM_XXH3_testdata[5635] */\n    { 2818, 0x0000000000000000ULL, 0x782E18AA3283A000ULL }, /* XSUM_XXH3_testdata[5636] */\n    { 2818, 0x9E3779B185EBCA8DULL, 0xC1DC5000C515B924ULL }, /* XSUM_XXH3_testdata[5637] */\n    { 2819, 0x0000000000000000ULL, 0x506C12F0559AC04CULL }, /* XSUM_XXH3_testdata[5638] */\n    { 2819, 0x9E3779B185EBCA8DULL, 0xF5E0E9A9A29AD075ULL }, /* XSUM_XXH3_testdata[5639] */\n    { 2820, 0x0000000000000000ULL, 0xEFBC8B5CFA8BE0DDULL }, /* XSUM_XXH3_testdata[5640] */\n    { 2820, 0x9E3779B185EBCA8DULL, 0x49D6E8A233638F01ULL }, /* XSUM_XXH3_testdata[5641] */\n    { 2821, 0x0000000000000000ULL, 0x1CF5B9AD7407EBF6ULL }, /* XSUM_XXH3_testdata[5642] */\n    { 2821, 0x9E3779B185EBCA8DULL, 0x17B9E24D08DFE8AAULL }, /* XSUM_XXH3_testdata[5643] */\n    { 2822, 0x0000000000000000ULL, 0x449C2F455774B179ULL }, /* XSUM_XXH3_testdata[5644] */\n    { 2822, 0x9E3779B185EBCA8DULL, 0x31796BFCBBE3115CULL }, /* XSUM_XXH3_testdata[5645] */\n    { 2823, 0x0000000000000000ULL, 0x50AFDAA39AA339C2ULL }, /* XSUM_XXH3_testdata[5646] */\n    { 2823, 0x9E3779B185EBCA8DULL, 0x1F384BEE77C93C38ULL }, /* XSUM_XXH3_testdata[5647] */\n    { 2824, 0x0000000000000000ULL, 0xC2D49E3821E9E5F5ULL }, /* XSUM_XXH3_testdata[5648] */\n    { 2824, 0x9E3779B185EBCA8DULL, 0x8EDC26F2F9D932BBULL }, /* XSUM_XXH3_testdata[5649] */\n    { 2825, 0x0000000000000000ULL, 0xB672CE5DCEDBED8FULL }, /* XSUM_XXH3_testdata[5650] */\n    { 2825, 0x9E3779B185EBCA8DULL, 0x6782D661DF360E87ULL }, /* XSUM_XXH3_testdata[5651] */\n    { 2826, 0x0000000000000000ULL, 0x0020BE95E992DBD4ULL }, /* XSUM_XXH3_testdata[5652] */\n    { 2826, 0x9E3779B185EBCA8DULL, 0x383D0140E3C362EBULL }, /* XSUM_XXH3_testdata[5653] */\n    { 2827, 0x0000000000000000ULL, 0xDB0BB50E3BBA26C8ULL }, /* XSUM_XXH3_testdata[5654] */\n    { 2827, 0x9E3779B185EBCA8DULL, 0x9F59C9D3C5999E83ULL }, /* XSUM_XXH3_testdata[5655] */\n    { 2828, 0x0000000000000000ULL, 0xFE45A73BBC75F478ULL }, /* XSUM_XXH3_testdata[5656] */\n    { 2828, 0x9E3779B185EBCA8DULL, 0xCFFADC847709337EULL }, /* XSUM_XXH3_testdata[5657] */\n    { 2829, 0x0000000000000000ULL, 0x13B8EC0BAB66B4B3ULL }, /* XSUM_XXH3_testdata[5658] */\n    { 2829, 0x9E3779B185EBCA8DULL, 0x30834E9FDD028750ULL }, /* XSUM_XXH3_testdata[5659] */\n    { 2830, 0x0000000000000000ULL, 0x043869A252B753D6ULL }, /* XSUM_XXH3_testdata[5660] */\n    { 2830, 0x9E3779B185EBCA8DULL, 0x4A943340D1C8711FULL }, /* XSUM_XXH3_testdata[5661] */\n    { 2831, 0x0000000000000000ULL, 0xF6AFDECD4341D20DULL }, /* XSUM_XXH3_testdata[5662] */\n    { 2831, 0x9E3779B185EBCA8DULL, 0x3D75507F9F47D29DULL }, /* XSUM_XXH3_testdata[5663] */\n    { 2832, 0x0000000000000000ULL, 0xD83CA294E171861FULL }, /* XSUM_XXH3_testdata[5664] */\n    { 2832, 0x9E3779B185EBCA8DULL, 0x28687D3C9FC4DBBBULL }, /* XSUM_XXH3_testdata[5665] */\n    { 2833, 0x0000000000000000ULL, 0x2796F656449258E9ULL }, /* XSUM_XXH3_testdata[5666] */\n    { 2833, 0x9E3779B185EBCA8DULL, 0xF99981E1437C06CCULL }, /* XSUM_XXH3_testdata[5667] */\n    { 2834, 0x0000000000000000ULL, 0x26621BAC8504AAAAULL }, /* XSUM_XXH3_testdata[5668] */\n    { 2834, 0x9E3779B185EBCA8DULL, 0xB2E56CCABE2B5225ULL }, /* XSUM_XXH3_testdata[5669] */\n    { 2835, 0x0000000000000000ULL, 0x12E8A2F03E702055ULL }, /* XSUM_XXH3_testdata[5670] */\n    { 2835, 0x9E3779B185EBCA8DULL, 0xDF931C2E62D72D1EULL }, /* XSUM_XXH3_testdata[5671] */\n    { 2836, 0x0000000000000000ULL, 0xB319ECC965CA289FULL }, /* XSUM_XXH3_testdata[5672] */\n    { 2836, 0x9E3779B185EBCA8DULL, 0xD3EB886D9C44442DULL }, /* XSUM_XXH3_testdata[5673] */\n    { 2837, 0x0000000000000000ULL, 0xD23665D737269144ULL }, /* XSUM_XXH3_testdata[5674] */\n    { 2837, 0x9E3779B185EBCA8DULL, 0x0194403601289C2CULL }, /* XSUM_XXH3_testdata[5675] */\n    { 2838, 0x0000000000000000ULL, 0xE702BA54A74FA497ULL }, /* XSUM_XXH3_testdata[5676] */\n    { 2838, 0x9E3779B185EBCA8DULL, 0x5769316EF3DA366CULL }, /* XSUM_XXH3_testdata[5677] */\n    { 2839, 0x0000000000000000ULL, 0xBE4ECDF9E0A0E838ULL }, /* XSUM_XXH3_testdata[5678] */\n    { 2839, 0x9E3779B185EBCA8DULL, 0x5C887FAFDC1DC215ULL }, /* XSUM_XXH3_testdata[5679] */\n    { 2840, 0x0000000000000000ULL, 0x3FD70D2173444B7DULL }, /* XSUM_XXH3_testdata[5680] */\n    { 2840, 0x9E3779B185EBCA8DULL, 0xB3AE4E046EBB1950ULL }, /* XSUM_XXH3_testdata[5681] */\n    { 2841, 0x0000000000000000ULL, 0x6BC356BA1DAA80E8ULL }, /* XSUM_XXH3_testdata[5682] */\n    { 2841, 0x9E3779B185EBCA8DULL, 0x728EDAD0E00862BCULL }, /* XSUM_XXH3_testdata[5683] */\n    { 2842, 0x0000000000000000ULL, 0x7C9F96FA9AEFA04DULL }, /* XSUM_XXH3_testdata[5684] */\n    { 2842, 0x9E3779B185EBCA8DULL, 0xC18AF3EC4472D298ULL }, /* XSUM_XXH3_testdata[5685] */\n    { 2843, 0x0000000000000000ULL, 0x64E3B33E887DFBDAULL }, /* XSUM_XXH3_testdata[5686] */\n    { 2843, 0x9E3779B185EBCA8DULL, 0x64F8EA1F92A54193ULL }, /* XSUM_XXH3_testdata[5687] */\n    { 2844, 0x0000000000000000ULL, 0xCEB1C3EAA134F4E9ULL }, /* XSUM_XXH3_testdata[5688] */\n    { 2844, 0x9E3779B185EBCA8DULL, 0x896F0580B69753AAULL }, /* XSUM_XXH3_testdata[5689] */\n    { 2845, 0x0000000000000000ULL, 0x5DDA1A2241F53771ULL }, /* XSUM_XXH3_testdata[5690] */\n    { 2845, 0x9E3779B185EBCA8DULL, 0xEB8500517B953A49ULL }, /* XSUM_XXH3_testdata[5691] */\n    { 2846, 0x0000000000000000ULL, 0x37327FF81F7BA9C2ULL }, /* XSUM_XXH3_testdata[5692] */\n    { 2846, 0x9E3779B185EBCA8DULL, 0x0AF45F16D15A419DULL }, /* XSUM_XXH3_testdata[5693] */\n    { 2847, 0x0000000000000000ULL, 0xDE608449A6A9121BULL }, /* XSUM_XXH3_testdata[5694] */\n    { 2847, 0x9E3779B185EBCA8DULL, 0x8DCA4A69A796563FULL }, /* XSUM_XXH3_testdata[5695] */\n    { 2848, 0x0000000000000000ULL, 0x6D42B73340789D60ULL }, /* XSUM_XXH3_testdata[5696] */\n    { 2848, 0x9E3779B185EBCA8DULL, 0x44B45E0C589CCDDFULL }, /* XSUM_XXH3_testdata[5697] */\n    { 2849, 0x0000000000000000ULL, 0x8A3BB3A77A6748E5ULL }, /* XSUM_XXH3_testdata[5698] */\n    { 2849, 0x9E3779B185EBCA8DULL, 0x7118AB2C4762154CULL }, /* XSUM_XXH3_testdata[5699] */\n    { 2850, 0x0000000000000000ULL, 0x2C074FADAFB7E9CEULL }, /* XSUM_XXH3_testdata[5700] */\n    { 2850, 0x9E3779B185EBCA8DULL, 0x7294E9D3D4CD08FDULL }, /* XSUM_XXH3_testdata[5701] */\n    { 2851, 0x0000000000000000ULL, 0x8861A8A47A2F964BULL }, /* XSUM_XXH3_testdata[5702] */\n    { 2851, 0x9E3779B185EBCA8DULL, 0xBE0B90B85FF50DFAULL }, /* XSUM_XXH3_testdata[5703] */\n    { 2852, 0x0000000000000000ULL, 0x22E6F6001F4531EAULL }, /* XSUM_XXH3_testdata[5704] */\n    { 2852, 0x9E3779B185EBCA8DULL, 0x52F2F562BE1BE088ULL }, /* XSUM_XXH3_testdata[5705] */\n    { 2853, 0x0000000000000000ULL, 0x80E1EAB3C1F77681ULL }, /* XSUM_XXH3_testdata[5706] */\n    { 2853, 0x9E3779B185EBCA8DULL, 0xCAC7242BCDD7EB8EULL }, /* XSUM_XXH3_testdata[5707] */\n    { 2854, 0x0000000000000000ULL, 0x4A7671FDCE297BBEULL }, /* XSUM_XXH3_testdata[5708] */\n    { 2854, 0x9E3779B185EBCA8DULL, 0x259E93D62E7EF2A1ULL }, /* XSUM_XXH3_testdata[5709] */\n    { 2855, 0x0000000000000000ULL, 0x0A49C4ACDDA4DE33ULL }, /* XSUM_XXH3_testdata[5710] */\n    { 2855, 0x9E3779B185EBCA8DULL, 0x53E4DCD01C5D114EULL }, /* XSUM_XXH3_testdata[5711] */\n    { 2856, 0x0000000000000000ULL, 0x6A34FD012D7D379EULL }, /* XSUM_XXH3_testdata[5712] */\n    { 2856, 0x9E3779B185EBCA8DULL, 0x2A09BE56719E22FCULL }, /* XSUM_XXH3_testdata[5713] */\n    { 2857, 0x0000000000000000ULL, 0xE833105304C012B9ULL }, /* XSUM_XXH3_testdata[5714] */\n    { 2857, 0x9E3779B185EBCA8DULL, 0x50E134066756229AULL }, /* XSUM_XXH3_testdata[5715] */\n    { 2858, 0x0000000000000000ULL, 0xA084125D75F93750ULL }, /* XSUM_XXH3_testdata[5716] */\n    { 2858, 0x9E3779B185EBCA8DULL, 0x291177B5FD99AF4FULL }, /* XSUM_XXH3_testdata[5717] */\n    { 2859, 0x0000000000000000ULL, 0x697C9C5AA1DB3011ULL }, /* XSUM_XXH3_testdata[5718] */\n    { 2859, 0x9E3779B185EBCA8DULL, 0x9111A8EF08BDC86FULL }, /* XSUM_XXH3_testdata[5719] */\n    { 2860, 0x0000000000000000ULL, 0xC01BD3A9C8B676ACULL }, /* XSUM_XXH3_testdata[5720] */\n    { 2860, 0x9E3779B185EBCA8DULL, 0x065ED12B38BE9194ULL }, /* XSUM_XXH3_testdata[5721] */\n    { 2861, 0x0000000000000000ULL, 0xC438B94D48DCAB4EULL }, /* XSUM_XXH3_testdata[5722] */\n    { 2861, 0x9E3779B185EBCA8DULL, 0xB95538E5F009C012ULL }, /* XSUM_XXH3_testdata[5723] */\n    { 2862, 0x0000000000000000ULL, 0x8EC74AE7A04D1704ULL }, /* XSUM_XXH3_testdata[5724] */\n    { 2862, 0x9E3779B185EBCA8DULL, 0x414D2BF6C4ED9503ULL }, /* XSUM_XXH3_testdata[5725] */\n    { 2863, 0x0000000000000000ULL, 0x4CC8AC8D4DEC3B17ULL }, /* XSUM_XXH3_testdata[5726] */\n    { 2863, 0x9E3779B185EBCA8DULL, 0x86405A3ABAFD5616ULL }, /* XSUM_XXH3_testdata[5727] */\n    { 2864, 0x0000000000000000ULL, 0xAE4B62FFCAEC21CEULL }, /* XSUM_XXH3_testdata[5728] */\n    { 2864, 0x9E3779B185EBCA8DULL, 0x292AE79353E674ECULL }, /* XSUM_XXH3_testdata[5729] */\n    { 2865, 0x0000000000000000ULL, 0x7A1B24D068F5CBA4ULL }, /* XSUM_XXH3_testdata[5730] */\n    { 2865, 0x9E3779B185EBCA8DULL, 0xFDD9401FEC1AA869ULL }, /* XSUM_XXH3_testdata[5731] */\n    { 2866, 0x0000000000000000ULL, 0x45951F249262A503ULL }, /* XSUM_XXH3_testdata[5732] */\n    { 2866, 0x9E3779B185EBCA8DULL, 0xD0FA59F2B388526FULL }, /* XSUM_XXH3_testdata[5733] */\n    { 2867, 0x0000000000000000ULL, 0xF04016338B794411ULL }, /* XSUM_XXH3_testdata[5734] */\n    { 2867, 0x9E3779B185EBCA8DULL, 0xF959B4A6FD455DB0ULL }, /* XSUM_XXH3_testdata[5735] */\n    { 2868, 0x0000000000000000ULL, 0x33CD0CF2BFDDA8C7ULL }, /* XSUM_XXH3_testdata[5736] */\n    { 2868, 0x9E3779B185EBCA8DULL, 0xA7DCF401D957FC3DULL }, /* XSUM_XXH3_testdata[5737] */\n    { 2869, 0x0000000000000000ULL, 0xF6B73BDF3FD3F7C8ULL }, /* XSUM_XXH3_testdata[5738] */\n    { 2869, 0x9E3779B185EBCA8DULL, 0x87EFE8D4501CD8EFULL }, /* XSUM_XXH3_testdata[5739] */\n    { 2870, 0x0000000000000000ULL, 0x851146CFEFE7A86BULL }, /* XSUM_XXH3_testdata[5740] */\n    { 2870, 0x9E3779B185EBCA8DULL, 0xA79C2E2E22ACC8F5ULL }, /* XSUM_XXH3_testdata[5741] */\n    { 2871, 0x0000000000000000ULL, 0x3E4C9798133B8D0DULL }, /* XSUM_XXH3_testdata[5742] */\n    { 2871, 0x9E3779B185EBCA8DULL, 0x98EA874578066F8CULL }, /* XSUM_XXH3_testdata[5743] */\n    { 2872, 0x0000000000000000ULL, 0x8ED4D507B1D71E5FULL }, /* XSUM_XXH3_testdata[5744] */\n    { 2872, 0x9E3779B185EBCA8DULL, 0xCFA0AA9C4DC31B33ULL }, /* XSUM_XXH3_testdata[5745] */\n    { 2873, 0x0000000000000000ULL, 0xD7F745B00F4C99C6ULL }, /* XSUM_XXH3_testdata[5746] */\n    { 2873, 0x9E3779B185EBCA8DULL, 0xA15EE2B199D447DAULL }, /* XSUM_XXH3_testdata[5747] */\n    { 2874, 0x0000000000000000ULL, 0x360C5493162E6139ULL }, /* XSUM_XXH3_testdata[5748] */\n    { 2874, 0x9E3779B185EBCA8DULL, 0x0B4BA2E110C40A7DULL }, /* XSUM_XXH3_testdata[5749] */\n    { 2875, 0x0000000000000000ULL, 0x2C2C75069E5F0C87ULL }, /* XSUM_XXH3_testdata[5750] */\n    { 2875, 0x9E3779B185EBCA8DULL, 0x9E00E20A113A71F2ULL }, /* XSUM_XXH3_testdata[5751] */\n    { 2876, 0x0000000000000000ULL, 0xBAA009937EF7AB3DULL }, /* XSUM_XXH3_testdata[5752] */\n    { 2876, 0x9E3779B185EBCA8DULL, 0x434D361FD8FA5F90ULL }, /* XSUM_XXH3_testdata[5753] */\n    { 2877, 0x0000000000000000ULL, 0x1AC95EE241D9604DULL }, /* XSUM_XXH3_testdata[5754] */\n    { 2877, 0x9E3779B185EBCA8DULL, 0xA73A88A94D6AAEE3ULL }, /* XSUM_XXH3_testdata[5755] */\n    { 2878, 0x0000000000000000ULL, 0x0C97CAB6AA8AEFA1ULL }, /* XSUM_XXH3_testdata[5756] */\n    { 2878, 0x9E3779B185EBCA8DULL, 0x3C779BCB58A0A65DULL }, /* XSUM_XXH3_testdata[5757] */\n    { 2879, 0x0000000000000000ULL, 0xDD75425D038D346DULL }, /* XSUM_XXH3_testdata[5758] */\n    { 2879, 0x9E3779B185EBCA8DULL, 0x0A8B237C83DF1BAFULL }, /* XSUM_XXH3_testdata[5759] */\n    { 2880, 0x0000000000000000ULL, 0x1569AEC031E74877ULL }, /* XSUM_XXH3_testdata[5760] */\n    { 2880, 0x9E3779B185EBCA8DULL, 0x4312A84752DF1392ULL }, /* XSUM_XXH3_testdata[5761] */\n    { 2881, 0x0000000000000000ULL, 0x50F4C429EB0B5DA9ULL }, /* XSUM_XXH3_testdata[5762] */\n    { 2881, 0x9E3779B185EBCA8DULL, 0x80059CDACC9C58B2ULL }, /* XSUM_XXH3_testdata[5763] */\n    { 2882, 0x0000000000000000ULL, 0x3C51B37EE08390D9ULL }, /* XSUM_XXH3_testdata[5764] */\n    { 2882, 0x9E3779B185EBCA8DULL, 0xAD864F5AEE70A173ULL }, /* XSUM_XXH3_testdata[5765] */\n    { 2883, 0x0000000000000000ULL, 0x13F4EED17CD88548ULL }, /* XSUM_XXH3_testdata[5766] */\n    { 2883, 0x9E3779B185EBCA8DULL, 0xEF76EE2F31E05999ULL }, /* XSUM_XXH3_testdata[5767] */\n    { 2884, 0x0000000000000000ULL, 0x2533472603287D23ULL }, /* XSUM_XXH3_testdata[5768] */\n    { 2884, 0x9E3779B185EBCA8DULL, 0x554A64EF49681144ULL }, /* XSUM_XXH3_testdata[5769] */\n    { 2885, 0x0000000000000000ULL, 0x0E93D60C4AFE6A2BULL }, /* XSUM_XXH3_testdata[5770] */\n    { 2885, 0x9E3779B185EBCA8DULL, 0x4B301FEDB9B5441CULL }, /* XSUM_XXH3_testdata[5771] */\n    { 2886, 0x0000000000000000ULL, 0x01EB1A14E2478FACULL }, /* XSUM_XXH3_testdata[5772] */\n    { 2886, 0x9E3779B185EBCA8DULL, 0x512FDC6471997AB3ULL }, /* XSUM_XXH3_testdata[5773] */\n    { 2887, 0x0000000000000000ULL, 0x2765A5C100EA0266ULL }, /* XSUM_XXH3_testdata[5774] */\n    { 2887, 0x9E3779B185EBCA8DULL, 0x7BB842DB067D6F19ULL }, /* XSUM_XXH3_testdata[5775] */\n    { 2888, 0x0000000000000000ULL, 0xEE7819CD674E60D1ULL }, /* XSUM_XXH3_testdata[5776] */\n    { 2888, 0x9E3779B185EBCA8DULL, 0x0DACBB39F18EF099ULL }, /* XSUM_XXH3_testdata[5777] */\n    { 2889, 0x0000000000000000ULL, 0xFAF36DFB18B4F794ULL }, /* XSUM_XXH3_testdata[5778] */\n    { 2889, 0x9E3779B185EBCA8DULL, 0xFE8D0B026249AFB2ULL }, /* XSUM_XXH3_testdata[5779] */\n    { 2890, 0x0000000000000000ULL, 0x59A3D9A04057B014ULL }, /* XSUM_XXH3_testdata[5780] */\n    { 2890, 0x9E3779B185EBCA8DULL, 0x89711CA2BAAA440BULL }, /* XSUM_XXH3_testdata[5781] */\n    { 2891, 0x0000000000000000ULL, 0xCD08AD27BE784216ULL }, /* XSUM_XXH3_testdata[5782] */\n    { 2891, 0x9E3779B185EBCA8DULL, 0x62D6E6128B98A1A7ULL }, /* XSUM_XXH3_testdata[5783] */\n    { 2892, 0x0000000000000000ULL, 0xCEE4AF3CF43E2A5FULL }, /* XSUM_XXH3_testdata[5784] */\n    { 2892, 0x9E3779B185EBCA8DULL, 0x71DD0854DCF0C185ULL }, /* XSUM_XXH3_testdata[5785] */\n    { 2893, 0x0000000000000000ULL, 0x86FBBA87613F456FULL }, /* XSUM_XXH3_testdata[5786] */\n    { 2893, 0x9E3779B185EBCA8DULL, 0x4412BC45B5C45E0FULL }, /* XSUM_XXH3_testdata[5787] */\n    { 2894, 0x0000000000000000ULL, 0x2C6C34D4C16411D5ULL }, /* XSUM_XXH3_testdata[5788] */\n    { 2894, 0x9E3779B185EBCA8DULL, 0x9677ED6A93D72EBCULL }, /* XSUM_XXH3_testdata[5789] */\n    { 2895, 0x0000000000000000ULL, 0xE2B5DEB318801298ULL }, /* XSUM_XXH3_testdata[5790] */\n    { 2895, 0x9E3779B185EBCA8DULL, 0xE4448348C66AEA5BULL }, /* XSUM_XXH3_testdata[5791] */\n    { 2896, 0x0000000000000000ULL, 0xD2C49A2972FC88E3ULL }, /* XSUM_XXH3_testdata[5792] */\n    { 2896, 0x9E3779B185EBCA8DULL, 0xF80757E2A01C4068ULL }, /* XSUM_XXH3_testdata[5793] */\n    { 2897, 0x0000000000000000ULL, 0x141104A3E73DC453ULL }, /* XSUM_XXH3_testdata[5794] */\n    { 2897, 0x9E3779B185EBCA8DULL, 0x8A5866A43B23145AULL }, /* XSUM_XXH3_testdata[5795] */\n    { 2898, 0x0000000000000000ULL, 0x34DB3A72949DA213ULL }, /* XSUM_XXH3_testdata[5796] */\n    { 2898, 0x9E3779B185EBCA8DULL, 0x2424B5C3177D30F9ULL }, /* XSUM_XXH3_testdata[5797] */\n    { 2899, 0x0000000000000000ULL, 0x984AF7FBBCE247A3ULL }, /* XSUM_XXH3_testdata[5798] */\n    { 2899, 0x9E3779B185EBCA8DULL, 0x26F58F312DBB36F7ULL }, /* XSUM_XXH3_testdata[5799] */\n    { 2900, 0x0000000000000000ULL, 0x05A7E42E977AEFBFULL }, /* XSUM_XXH3_testdata[5800] */\n    { 2900, 0x9E3779B185EBCA8DULL, 0x2308BBFFE6CCAC11ULL }, /* XSUM_XXH3_testdata[5801] */\n    { 2901, 0x0000000000000000ULL, 0xD2276B6308652305ULL }, /* XSUM_XXH3_testdata[5802] */\n    { 2901, 0x9E3779B185EBCA8DULL, 0x9350ACC7278373F9ULL }, /* XSUM_XXH3_testdata[5803] */\n    { 2902, 0x0000000000000000ULL, 0x2CA93644EBCE42F5ULL }, /* XSUM_XXH3_testdata[5804] */\n    { 2902, 0x9E3779B185EBCA8DULL, 0xF0FE9E18372572D3ULL }, /* XSUM_XXH3_testdata[5805] */\n    { 2903, 0x0000000000000000ULL, 0xFE5CD7D2F3A38C0BULL }, /* XSUM_XXH3_testdata[5806] */\n    { 2903, 0x9E3779B185EBCA8DULL, 0x4C6A0DB668F82BEBULL }, /* XSUM_XXH3_testdata[5807] */\n    { 2904, 0x0000000000000000ULL, 0x21D867EBD5FC4E0AULL }, /* XSUM_XXH3_testdata[5808] */\n    { 2904, 0x9E3779B185EBCA8DULL, 0x008EF198EEF4C618ULL }, /* XSUM_XXH3_testdata[5809] */\n    { 2905, 0x0000000000000000ULL, 0x6D34EFAF31163CDCULL }, /* XSUM_XXH3_testdata[5810] */\n    { 2905, 0x9E3779B185EBCA8DULL, 0x1CD2ADD8BBD4E97EULL }, /* XSUM_XXH3_testdata[5811] */\n    { 2906, 0x0000000000000000ULL, 0xD663DB2BACEB027EULL }, /* XSUM_XXH3_testdata[5812] */\n    { 2906, 0x9E3779B185EBCA8DULL, 0x1CE37DAD30EEC2A5ULL }, /* XSUM_XXH3_testdata[5813] */\n    { 2907, 0x0000000000000000ULL, 0xBEA17878CE925885ULL }, /* XSUM_XXH3_testdata[5814] */\n    { 2907, 0x9E3779B185EBCA8DULL, 0x336315FBCEC44E62ULL }, /* XSUM_XXH3_testdata[5815] */\n    { 2908, 0x0000000000000000ULL, 0xF4EF93220B92BA40ULL }, /* XSUM_XXH3_testdata[5816] */\n    { 2908, 0x9E3779B185EBCA8DULL, 0xDB6BF0A4B49134AEULL }, /* XSUM_XXH3_testdata[5817] */\n    { 2909, 0x0000000000000000ULL, 0x436021B24F571768ULL }, /* XSUM_XXH3_testdata[5818] */\n    { 2909, 0x9E3779B185EBCA8DULL, 0x11A0401C050B4358ULL }, /* XSUM_XXH3_testdata[5819] */\n    { 2910, 0x0000000000000000ULL, 0x4BC346B3F9FF37A3ULL }, /* XSUM_XXH3_testdata[5820] */\n    { 2910, 0x9E3779B185EBCA8DULL, 0xC8B0154E930427FDULL }, /* XSUM_XXH3_testdata[5821] */\n    { 2911, 0x0000000000000000ULL, 0xDBFBE89DF1427DC9ULL }, /* XSUM_XXH3_testdata[5822] */\n    { 2911, 0x9E3779B185EBCA8DULL, 0x959C3EFE3A9FFBADULL }, /* XSUM_XXH3_testdata[5823] */\n    { 2912, 0x0000000000000000ULL, 0x6898B302FA2DE57FULL }, /* XSUM_XXH3_testdata[5824] */\n    { 2912, 0x9E3779B185EBCA8DULL, 0xEAD47BE6C4B72653ULL }, /* XSUM_XXH3_testdata[5825] */\n    { 2913, 0x0000000000000000ULL, 0x3A444D5877850E15ULL }, /* XSUM_XXH3_testdata[5826] */\n    { 2913, 0x9E3779B185EBCA8DULL, 0x8B8C8FE28D4AB564ULL }, /* XSUM_XXH3_testdata[5827] */\n    { 2914, 0x0000000000000000ULL, 0xB9BB6D96B866D954ULL }, /* XSUM_XXH3_testdata[5828] */\n    { 2914, 0x9E3779B185EBCA8DULL, 0xBF970B0F4FEAD08EULL }, /* XSUM_XXH3_testdata[5829] */\n    { 2915, 0x0000000000000000ULL, 0xB425E40BCAABF6F0ULL }, /* XSUM_XXH3_testdata[5830] */\n    { 2915, 0x9E3779B185EBCA8DULL, 0x184AE70EC6F480E8ULL }, /* XSUM_XXH3_testdata[5831] */\n    { 2916, 0x0000000000000000ULL, 0xC0980B081CAAC13EULL }, /* XSUM_XXH3_testdata[5832] */\n    { 2916, 0x9E3779B185EBCA8DULL, 0xAC4378B3BA949539ULL }, /* XSUM_XXH3_testdata[5833] */\n    { 2917, 0x0000000000000000ULL, 0xD81CF066572FC06DULL }, /* XSUM_XXH3_testdata[5834] */\n    { 2917, 0x9E3779B185EBCA8DULL, 0xE909FA49AD169084ULL }, /* XSUM_XXH3_testdata[5835] */\n    { 2918, 0x0000000000000000ULL, 0xFE97D61C77F33CA8ULL }, /* XSUM_XXH3_testdata[5836] */\n    { 2918, 0x9E3779B185EBCA8DULL, 0x9FD8690E59E936C0ULL }, /* XSUM_XXH3_testdata[5837] */\n    { 2919, 0x0000000000000000ULL, 0x90DE987789853E18ULL }, /* XSUM_XXH3_testdata[5838] */\n    { 2919, 0x9E3779B185EBCA8DULL, 0xEA97F43444968484ULL }, /* XSUM_XXH3_testdata[5839] */\n    { 2920, 0x0000000000000000ULL, 0x54EE786D33C130CCULL }, /* XSUM_XXH3_testdata[5840] */\n    { 2920, 0x9E3779B185EBCA8DULL, 0x3046EE02CCE9E480ULL }, /* XSUM_XXH3_testdata[5841] */\n    { 2921, 0x0000000000000000ULL, 0x7A2340581E6B8BBCULL }, /* XSUM_XXH3_testdata[5842] */\n    { 2921, 0x9E3779B185EBCA8DULL, 0x01CECA730C6FFF9BULL }, /* XSUM_XXH3_testdata[5843] */\n    { 2922, 0x0000000000000000ULL, 0x753BDAEC0C775A6CULL }, /* XSUM_XXH3_testdata[5844] */\n    { 2922, 0x9E3779B185EBCA8DULL, 0x8A8D2710D71D3533ULL }, /* XSUM_XXH3_testdata[5845] */\n    { 2923, 0x0000000000000000ULL, 0xAE2EB637BB2566B6ULL }, /* XSUM_XXH3_testdata[5846] */\n    { 2923, 0x9E3779B185EBCA8DULL, 0xAEBAC1FF4EFF8F81ULL }, /* XSUM_XXH3_testdata[5847] */\n    { 2924, 0x0000000000000000ULL, 0xF7C951FA76F91F04ULL }, /* XSUM_XXH3_testdata[5848] */\n    { 2924, 0x9E3779B185EBCA8DULL, 0xC5A60CBB19EA4578ULL }, /* XSUM_XXH3_testdata[5849] */\n    { 2925, 0x0000000000000000ULL, 0xABAB9443CD114538ULL }, /* XSUM_XXH3_testdata[5850] */\n    { 2925, 0x9E3779B185EBCA8DULL, 0x723E7E1D128C1E7BULL }, /* XSUM_XXH3_testdata[5851] */\n    { 2926, 0x0000000000000000ULL, 0x9EA70C87CBF18F54ULL }, /* XSUM_XXH3_testdata[5852] */\n    { 2926, 0x9E3779B185EBCA8DULL, 0xDBB8637F27CD02A6ULL }, /* XSUM_XXH3_testdata[5853] */\n    { 2927, 0x0000000000000000ULL, 0xEB0A44B1C78D5F39ULL }, /* XSUM_XXH3_testdata[5854] */\n    { 2927, 0x9E3779B185EBCA8DULL, 0x8D391F60755ADE6BULL }, /* XSUM_XXH3_testdata[5855] */\n    { 2928, 0x0000000000000000ULL, 0x133DCF49D8583460ULL }, /* XSUM_XXH3_testdata[5856] */\n    { 2928, 0x9E3779B185EBCA8DULL, 0x361CB85CA98D5525ULL }, /* XSUM_XXH3_testdata[5857] */\n    { 2929, 0x0000000000000000ULL, 0x0DE608C5C6CEFB45ULL }, /* XSUM_XXH3_testdata[5858] */\n    { 2929, 0x9E3779B185EBCA8DULL, 0xDB67D5C9E5BD578AULL }, /* XSUM_XXH3_testdata[5859] */\n    { 2930, 0x0000000000000000ULL, 0xB9ACAFD4BDA2772BULL }, /* XSUM_XXH3_testdata[5860] */\n    { 2930, 0x9E3779B185EBCA8DULL, 0xB24BE8EBD7FD2429ULL }, /* XSUM_XXH3_testdata[5861] */\n    { 2931, 0x0000000000000000ULL, 0x50506F8081CA14FEULL }, /* XSUM_XXH3_testdata[5862] */\n    { 2931, 0x9E3779B185EBCA8DULL, 0x3D1A9B131E8A82BAULL }, /* XSUM_XXH3_testdata[5863] */\n    { 2932, 0x0000000000000000ULL, 0x22ABBE6A3F4AACFAULL }, /* XSUM_XXH3_testdata[5864] */\n    { 2932, 0x9E3779B185EBCA8DULL, 0x3EAC1BADB7A35388ULL }, /* XSUM_XXH3_testdata[5865] */\n    { 2933, 0x0000000000000000ULL, 0x4B46B1DC6AF605DCULL }, /* XSUM_XXH3_testdata[5866] */\n    { 2933, 0x9E3779B185EBCA8DULL, 0x3F3A84CBB2EEA098ULL }, /* XSUM_XXH3_testdata[5867] */\n    { 2934, 0x0000000000000000ULL, 0x184CF0DFC8130466ULL }, /* XSUM_XXH3_testdata[5868] */\n    { 2934, 0x9E3779B185EBCA8DULL, 0x6912FBF0815C4D3BULL }, /* XSUM_XXH3_testdata[5869] */\n    { 2935, 0x0000000000000000ULL, 0x8C26A0D0B25E1825ULL }, /* XSUM_XXH3_testdata[5870] */\n    { 2935, 0x9E3779B185EBCA8DULL, 0x0FE45F1BFDB3A789ULL }, /* XSUM_XXH3_testdata[5871] */\n    { 2936, 0x0000000000000000ULL, 0x390CFD95463BF23DULL }, /* XSUM_XXH3_testdata[5872] */\n    { 2936, 0x9E3779B185EBCA8DULL, 0xCCBD1D191EBF98D9ULL }, /* XSUM_XXH3_testdata[5873] */\n    { 2937, 0x0000000000000000ULL, 0xED8496BFF6CB147AULL }, /* XSUM_XXH3_testdata[5874] */\n    { 2937, 0x9E3779B185EBCA8DULL, 0x1B714943D1FA7301ULL }, /* XSUM_XXH3_testdata[5875] */\n    { 2938, 0x0000000000000000ULL, 0x0518732D96C57B48ULL }, /* XSUM_XXH3_testdata[5876] */\n    { 2938, 0x9E3779B185EBCA8DULL, 0x1B6BE8BF3F1DDFB1ULL }, /* XSUM_XXH3_testdata[5877] */\n    { 2939, 0x0000000000000000ULL, 0xD261DBE24537BD6EULL }, /* XSUM_XXH3_testdata[5878] */\n    { 2939, 0x9E3779B185EBCA8DULL, 0x12D3216FAD9E2066ULL }, /* XSUM_XXH3_testdata[5879] */\n    { 2940, 0x0000000000000000ULL, 0x7BA59CE95AA839C3ULL }, /* XSUM_XXH3_testdata[5880] */\n    { 2940, 0x9E3779B185EBCA8DULL, 0xE75E35C9A2647D26ULL }, /* XSUM_XXH3_testdata[5881] */\n    { 2941, 0x0000000000000000ULL, 0x0CD6A1AB39128B86ULL }, /* XSUM_XXH3_testdata[5882] */\n    { 2941, 0x9E3779B185EBCA8DULL, 0x979B859D0D4BFB95ULL }, /* XSUM_XXH3_testdata[5883] */\n    { 2942, 0x0000000000000000ULL, 0x0943C31E81275520ULL }, /* XSUM_XXH3_testdata[5884] */\n    { 2942, 0x9E3779B185EBCA8DULL, 0xDC0CE937B0FA2A17ULL }, /* XSUM_XXH3_testdata[5885] */\n    { 2943, 0x0000000000000000ULL, 0x58DFE07CC7195D4BULL }, /* XSUM_XXH3_testdata[5886] */\n    { 2943, 0x9E3779B185EBCA8DULL, 0x7B69CA3D51C3C4FDULL }, /* XSUM_XXH3_testdata[5887] */\n    { 2944, 0x0000000000000000ULL, 0x4A76E054ADB05801ULL }, /* XSUM_XXH3_testdata[5888] */\n    { 2944, 0x9E3779B185EBCA8DULL, 0x8441D8DB8F90440DULL }, /* XSUM_XXH3_testdata[5889] */\n    { 2945, 0x0000000000000000ULL, 0x680E1F01F989965CULL }, /* XSUM_XXH3_testdata[5890] */\n    { 2945, 0x9E3779B185EBCA8DULL, 0xB95BD799C0DB1384ULL }, /* XSUM_XXH3_testdata[5891] */\n    { 2946, 0x0000000000000000ULL, 0xA4C06C959C025D2CULL }, /* XSUM_XXH3_testdata[5892] */\n    { 2946, 0x9E3779B185EBCA8DULL, 0x79C1D7ECA1AC6553ULL }, /* XSUM_XXH3_testdata[5893] */\n    { 2947, 0x0000000000000000ULL, 0xAB2AEFA418BC2546ULL }, /* XSUM_XXH3_testdata[5894] */\n    { 2947, 0x9E3779B185EBCA8DULL, 0x75FCA75B9FDF1FD2ULL }, /* XSUM_XXH3_testdata[5895] */\n    { 2948, 0x0000000000000000ULL, 0x16928BCCA1A24E72ULL }, /* XSUM_XXH3_testdata[5896] */\n    { 2948, 0x9E3779B185EBCA8DULL, 0x14BBCD4E631C60D4ULL }, /* XSUM_XXH3_testdata[5897] */\n    { 2949, 0x0000000000000000ULL, 0x7F406076F20DDB9EULL }, /* XSUM_XXH3_testdata[5898] */\n    { 2949, 0x9E3779B185EBCA8DULL, 0x4F833CECC66FAA63ULL }, /* XSUM_XXH3_testdata[5899] */\n    { 2950, 0x0000000000000000ULL, 0x006F8F1E8F0251C4ULL }, /* XSUM_XXH3_testdata[5900] */\n    { 2950, 0x9E3779B185EBCA8DULL, 0xFC6994E9E8C5B2C5ULL }, /* XSUM_XXH3_testdata[5901] */\n    { 2951, 0x0000000000000000ULL, 0xEFA253902662DB87ULL }, /* XSUM_XXH3_testdata[5902] */\n    { 2951, 0x9E3779B185EBCA8DULL, 0x7A570CD29CD1E2B7ULL }, /* XSUM_XXH3_testdata[5903] */\n    { 2952, 0x0000000000000000ULL, 0xEBB014405B806812ULL }, /* XSUM_XXH3_testdata[5904] */\n    { 2952, 0x9E3779B185EBCA8DULL, 0x3B46BBCAB608B2CAULL }, /* XSUM_XXH3_testdata[5905] */\n    { 2953, 0x0000000000000000ULL, 0x3B9A4BFF10FF6AE6ULL }, /* XSUM_XXH3_testdata[5906] */\n    { 2953, 0x9E3779B185EBCA8DULL, 0x72004CE62504F78DULL }, /* XSUM_XXH3_testdata[5907] */\n    { 2954, 0x0000000000000000ULL, 0x48ADBED331F6F056ULL }, /* XSUM_XXH3_testdata[5908] */\n    { 2954, 0x9E3779B185EBCA8DULL, 0x289BB372AA8BC4ABULL }, /* XSUM_XXH3_testdata[5909] */\n    { 2955, 0x0000000000000000ULL, 0xABE41E353F27CDD6ULL }, /* XSUM_XXH3_testdata[5910] */\n    { 2955, 0x9E3779B185EBCA8DULL, 0x7B96FF58A34CCC40ULL }, /* XSUM_XXH3_testdata[5911] */\n    { 2956, 0x0000000000000000ULL, 0xB3C1032D86F85248ULL }, /* XSUM_XXH3_testdata[5912] */\n    { 2956, 0x9E3779B185EBCA8DULL, 0x37AA261ABE5D9178ULL }, /* XSUM_XXH3_testdata[5913] */\n    { 2957, 0x0000000000000000ULL, 0xF54E143C8A968519ULL }, /* XSUM_XXH3_testdata[5914] */\n    { 2957, 0x9E3779B185EBCA8DULL, 0xC280CA2CF4268637ULL }, /* XSUM_XXH3_testdata[5915] */\n    { 2958, 0x0000000000000000ULL, 0x06E07E5DCFB1E33CULL }, /* XSUM_XXH3_testdata[5916] */\n    { 2958, 0x9E3779B185EBCA8DULL, 0xB3A571D5054CA644ULL }, /* XSUM_XXH3_testdata[5917] */\n    { 2959, 0x0000000000000000ULL, 0x6F5CA95AC200CD6CULL }, /* XSUM_XXH3_testdata[5918] */\n    { 2959, 0x9E3779B185EBCA8DULL, 0x69A0F7A810B65584ULL }, /* XSUM_XXH3_testdata[5919] */\n    { 2960, 0x0000000000000000ULL, 0x43FD02C0E22DA2DFULL }, /* XSUM_XXH3_testdata[5920] */\n    { 2960, 0x9E3779B185EBCA8DULL, 0x7CAB8C4CC74C30C8ULL }, /* XSUM_XXH3_testdata[5921] */\n    { 2961, 0x0000000000000000ULL, 0x1F227D712B0174FFULL }, /* XSUM_XXH3_testdata[5922] */\n    { 2961, 0x9E3779B185EBCA8DULL, 0xD9073AE57337F53CULL }, /* XSUM_XXH3_testdata[5923] */\n    { 2962, 0x0000000000000000ULL, 0xE258AC71EA94A519ULL }, /* XSUM_XXH3_testdata[5924] */\n    { 2962, 0x9E3779B185EBCA8DULL, 0x4B29A6C7737461E0ULL }, /* XSUM_XXH3_testdata[5925] */\n    { 2963, 0x0000000000000000ULL, 0x73821F123EAA5BCDULL }, /* XSUM_XXH3_testdata[5926] */\n    { 2963, 0x9E3779B185EBCA8DULL, 0xC216558938EF5BA1ULL }, /* XSUM_XXH3_testdata[5927] */\n    { 2964, 0x0000000000000000ULL, 0xB8670BFE99897050ULL }, /* XSUM_XXH3_testdata[5928] */\n    { 2964, 0x9E3779B185EBCA8DULL, 0x4B2339A54EF3C147ULL }, /* XSUM_XXH3_testdata[5929] */\n    { 2965, 0x0000000000000000ULL, 0x350AEDE785B8945FULL }, /* XSUM_XXH3_testdata[5930] */\n    { 2965, 0x9E3779B185EBCA8DULL, 0xD77179604E547276ULL }, /* XSUM_XXH3_testdata[5931] */\n    { 2966, 0x0000000000000000ULL, 0x01E9D910AA7B1E8AULL }, /* XSUM_XXH3_testdata[5932] */\n    { 2966, 0x9E3779B185EBCA8DULL, 0xB9F2F7F6A64C5F94ULL }, /* XSUM_XXH3_testdata[5933] */\n    { 2967, 0x0000000000000000ULL, 0x5F4FF3856B78A4FEULL }, /* XSUM_XXH3_testdata[5934] */\n    { 2967, 0x9E3779B185EBCA8DULL, 0x71C8AD9C2F67484EULL }, /* XSUM_XXH3_testdata[5935] */\n    { 2968, 0x0000000000000000ULL, 0x10A3909BD2B6FED3ULL }, /* XSUM_XXH3_testdata[5936] */\n    { 2968, 0x9E3779B185EBCA8DULL, 0x19B33D48681B4F8CULL }, /* XSUM_XXH3_testdata[5937] */\n    { 2969, 0x0000000000000000ULL, 0x891109FF2CD1F81AULL }, /* XSUM_XXH3_testdata[5938] */\n    { 2969, 0x9E3779B185EBCA8DULL, 0xAE5019A2ECCAC731ULL }, /* XSUM_XXH3_testdata[5939] */\n    { 2970, 0x0000000000000000ULL, 0x773DC838314988EEULL }, /* XSUM_XXH3_testdata[5940] */\n    { 2970, 0x9E3779B185EBCA8DULL, 0xAB15925E641C6538ULL }, /* XSUM_XXH3_testdata[5941] */\n    { 2971, 0x0000000000000000ULL, 0x55F595FDC543E155ULL }, /* XSUM_XXH3_testdata[5942] */\n    { 2971, 0x9E3779B185EBCA8DULL, 0x02C8C5C1900C7F1DULL }, /* XSUM_XXH3_testdata[5943] */\n    { 2972, 0x0000000000000000ULL, 0x10738BBD06F66724ULL }, /* XSUM_XXH3_testdata[5944] */\n    { 2972, 0x9E3779B185EBCA8DULL, 0x35B3371D7EB05CC4ULL }, /* XSUM_XXH3_testdata[5945] */\n    { 2973, 0x0000000000000000ULL, 0x4B7A87BA2A49557FULL }, /* XSUM_XXH3_testdata[5946] */\n    { 2973, 0x9E3779B185EBCA8DULL, 0xE27FF33B45CC8234ULL }, /* XSUM_XXH3_testdata[5947] */\n    { 2974, 0x0000000000000000ULL, 0xAC6BDA0C97618B0CULL }, /* XSUM_XXH3_testdata[5948] */\n    { 2974, 0x9E3779B185EBCA8DULL, 0xA1366887D230130DULL }, /* XSUM_XXH3_testdata[5949] */\n    { 2975, 0x0000000000000000ULL, 0xB04EF32B4BE0890DULL }, /* XSUM_XXH3_testdata[5950] */\n    { 2975, 0x9E3779B185EBCA8DULL, 0xBAEFD0D4E7EA0EBFULL }, /* XSUM_XXH3_testdata[5951] */\n    { 2976, 0x0000000000000000ULL, 0xFA45F5F6DD5D8913ULL }, /* XSUM_XXH3_testdata[5952] */\n    { 2976, 0x9E3779B185EBCA8DULL, 0xA58C343D872636C5ULL }, /* XSUM_XXH3_testdata[5953] */\n    { 2977, 0x0000000000000000ULL, 0x3DF4C00C299B3601ULL }, /* XSUM_XXH3_testdata[5954] */\n    { 2977, 0x9E3779B185EBCA8DULL, 0x0D6370493E3E3961ULL }, /* XSUM_XXH3_testdata[5955] */\n    { 2978, 0x0000000000000000ULL, 0x973ED2696A9742C9ULL }, /* XSUM_XXH3_testdata[5956] */\n    { 2978, 0x9E3779B185EBCA8DULL, 0xDD813B4FC767EB80ULL }, /* XSUM_XXH3_testdata[5957] */\n    { 2979, 0x0000000000000000ULL, 0xDDDB9B2A22EF8D7FULL }, /* XSUM_XXH3_testdata[5958] */\n    { 2979, 0x9E3779B185EBCA8DULL, 0xA025A99A14FD30A9ULL }, /* XSUM_XXH3_testdata[5959] */\n    { 2980, 0x0000000000000000ULL, 0x3E90C1E8E2F00671ULL }, /* XSUM_XXH3_testdata[5960] */\n    { 2980, 0x9E3779B185EBCA8DULL, 0x9357B6B8987937EFULL }, /* XSUM_XXH3_testdata[5961] */\n    { 2981, 0x0000000000000000ULL, 0x0DF4B30E83CDFAADULL }, /* XSUM_XXH3_testdata[5962] */\n    { 2981, 0x9E3779B185EBCA8DULL, 0x354FA2D2070B8EBFULL }, /* XSUM_XXH3_testdata[5963] */\n    { 2982, 0x0000000000000000ULL, 0xCD64CC85D330BB10ULL }, /* XSUM_XXH3_testdata[5964] */\n    { 2982, 0x9E3779B185EBCA8DULL, 0x76120161E0167446ULL }, /* XSUM_XXH3_testdata[5965] */\n    { 2983, 0x0000000000000000ULL, 0xE6442ADA820FDED9ULL }, /* XSUM_XXH3_testdata[5966] */\n    { 2983, 0x9E3779B185EBCA8DULL, 0x4A1A16B2DF9813EEULL }, /* XSUM_XXH3_testdata[5967] */\n    { 2984, 0x0000000000000000ULL, 0x1F1F8D1837A6E627ULL }, /* XSUM_XXH3_testdata[5968] */\n    { 2984, 0x9E3779B185EBCA8DULL, 0xF183248EF277F11FULL }, /* XSUM_XXH3_testdata[5969] */\n    { 2985, 0x0000000000000000ULL, 0xA54E84B3E626BC14ULL }, /* XSUM_XXH3_testdata[5970] */\n    { 2985, 0x9E3779B185EBCA8DULL, 0x5E570299E42A17ADULL }, /* XSUM_XXH3_testdata[5971] */\n    { 2986, 0x0000000000000000ULL, 0x729FE02D49B315F5ULL }, /* XSUM_XXH3_testdata[5972] */\n    { 2986, 0x9E3779B185EBCA8DULL, 0x78E1C8124E2B1FECULL }, /* XSUM_XXH3_testdata[5973] */\n    { 2987, 0x0000000000000000ULL, 0x74FED483ED5A315AULL }, /* XSUM_XXH3_testdata[5974] */\n    { 2987, 0x9E3779B185EBCA8DULL, 0x63780DA1AD3A7530ULL }, /* XSUM_XXH3_testdata[5975] */\n    { 2988, 0x0000000000000000ULL, 0x6EE24DA5C58D40EBULL }, /* XSUM_XXH3_testdata[5976] */\n    { 2988, 0x9E3779B185EBCA8DULL, 0x53B4A2299704976FULL }, /* XSUM_XXH3_testdata[5977] */\n    { 2989, 0x0000000000000000ULL, 0xDF9396E9CB33F25DULL }, /* XSUM_XXH3_testdata[5978] */\n    { 2989, 0x9E3779B185EBCA8DULL, 0xBE9AB6ADD058F5E5ULL }, /* XSUM_XXH3_testdata[5979] */\n    { 2990, 0x0000000000000000ULL, 0x488A3DB0190C2AF7ULL }, /* XSUM_XXH3_testdata[5980] */\n    { 2990, 0x9E3779B185EBCA8DULL, 0xE023AA8311308C98ULL }, /* XSUM_XXH3_testdata[5981] */\n    { 2991, 0x0000000000000000ULL, 0xE88A7AE31E1B3C03ULL }, /* XSUM_XXH3_testdata[5982] */\n    { 2991, 0x9E3779B185EBCA8DULL, 0x3AAE2857DD0842FDULL }, /* XSUM_XXH3_testdata[5983] */\n    { 2992, 0x0000000000000000ULL, 0xAAB44EC10D54893AULL }, /* XSUM_XXH3_testdata[5984] */\n    { 2992, 0x9E3779B185EBCA8DULL, 0x70D3504445732DBCULL }, /* XSUM_XXH3_testdata[5985] */\n    { 2993, 0x0000000000000000ULL, 0x0065EDB278F462B0ULL }, /* XSUM_XXH3_testdata[5986] */\n    { 2993, 0x9E3779B185EBCA8DULL, 0x7DB5A87970B6B6FDULL }, /* XSUM_XXH3_testdata[5987] */\n    { 2994, 0x0000000000000000ULL, 0x81D350FEF6FD05B7ULL }, /* XSUM_XXH3_testdata[5988] */\n    { 2994, 0x9E3779B185EBCA8DULL, 0x7E59DF9453895B26ULL }, /* XSUM_XXH3_testdata[5989] */\n    { 2995, 0x0000000000000000ULL, 0xBEB814BD7EFCDD21ULL }, /* XSUM_XXH3_testdata[5990] */\n    { 2995, 0x9E3779B185EBCA8DULL, 0x3872DF50F3B4D9A4ULL }, /* XSUM_XXH3_testdata[5991] */\n    { 2996, 0x0000000000000000ULL, 0xA4E7165D54A94B2CULL }, /* XSUM_XXH3_testdata[5992] */\n    { 2996, 0x9E3779B185EBCA8DULL, 0x83E8155E769985B4ULL }, /* XSUM_XXH3_testdata[5993] */\n    { 2997, 0x0000000000000000ULL, 0xF69CCD46A0C66AC5ULL }, /* XSUM_XXH3_testdata[5994] */\n    { 2997, 0x9E3779B185EBCA8DULL, 0x2152D5835CA1F62EULL }, /* XSUM_XXH3_testdata[5995] */\n    { 2998, 0x0000000000000000ULL, 0x13D37A8060290967ULL }, /* XSUM_XXH3_testdata[5996] */\n    { 2998, 0x9E3779B185EBCA8DULL, 0x00AA1AD532A9A220ULL }, /* XSUM_XXH3_testdata[5997] */\n    { 2999, 0x0000000000000000ULL, 0xFBF8E37174E7CBE0ULL }, /* XSUM_XXH3_testdata[5998] */\n    { 2999, 0x9E3779B185EBCA8DULL, 0xD0A29ADBC80300A4ULL }, /* XSUM_XXH3_testdata[5999] */\n    { 3000, 0x0000000000000000ULL, 0x120A15F4CBD5A736ULL }, /* XSUM_XXH3_testdata[6000] */\n    { 3000, 0x9E3779B185EBCA8DULL, 0xB84AA460C0E807F1ULL }, /* XSUM_XXH3_testdata[6001] */\n    { 3001, 0x0000000000000000ULL, 0x7D9993DA4C537BC5ULL }, /* XSUM_XXH3_testdata[6002] */\n    { 3001, 0x9E3779B185EBCA8DULL, 0xDE2FB45CBA95F913ULL }, /* XSUM_XXH3_testdata[6003] */\n    { 3002, 0x0000000000000000ULL, 0x54424A1161D69445ULL }, /* XSUM_XXH3_testdata[6004] */\n    { 3002, 0x9E3779B185EBCA8DULL, 0x5F2D667FA1A2146CULL }, /* XSUM_XXH3_testdata[6005] */\n    { 3003, 0x0000000000000000ULL, 0x9E513BFD6058A2A7ULL }, /* XSUM_XXH3_testdata[6006] */\n    { 3003, 0x9E3779B185EBCA8DULL, 0xCBF5BADE7FCB38FEULL }, /* XSUM_XXH3_testdata[6007] */\n    { 3004, 0x0000000000000000ULL, 0x289460C19CE6733BULL }, /* XSUM_XXH3_testdata[6008] */\n    { 3004, 0x9E3779B185EBCA8DULL, 0x1948A67656A4E2E2ULL }, /* XSUM_XXH3_testdata[6009] */\n    { 3005, 0x0000000000000000ULL, 0xB55D673EBCF611F6ULL }, /* XSUM_XXH3_testdata[6010] */\n    { 3005, 0x9E3779B185EBCA8DULL, 0xCE30C9FE31493EB3ULL }, /* XSUM_XXH3_testdata[6011] */\n    { 3006, 0x0000000000000000ULL, 0x079CAF50E31D73B0ULL }, /* XSUM_XXH3_testdata[6012] */\n    { 3006, 0x9E3779B185EBCA8DULL, 0x75638175D0ADD699ULL }, /* XSUM_XXH3_testdata[6013] */\n    { 3007, 0x0000000000000000ULL, 0x8D9A798A827FF464ULL }, /* XSUM_XXH3_testdata[6014] */\n    { 3007, 0x9E3779B185EBCA8DULL, 0xDF0F7D428DB03369ULL }, /* XSUM_XXH3_testdata[6015] */\n    { 3008, 0x0000000000000000ULL, 0x032A128E0003C6CCULL }, /* XSUM_XXH3_testdata[6016] */\n    { 3008, 0x9E3779B185EBCA8DULL, 0x1B392BBB2F4F7265ULL }, /* XSUM_XXH3_testdata[6017] */\n    { 3009, 0x0000000000000000ULL, 0x71B96ED13C84B7A6ULL }, /* XSUM_XXH3_testdata[6018] */\n    { 3009, 0x9E3779B185EBCA8DULL, 0x99198184E43578D1ULL }, /* XSUM_XXH3_testdata[6019] */\n    { 3010, 0x0000000000000000ULL, 0x8BCAB6A425108497ULL }, /* XSUM_XXH3_testdata[6020] */\n    { 3010, 0x9E3779B185EBCA8DULL, 0xF23991A244685F08ULL }, /* XSUM_XXH3_testdata[6021] */\n    { 3011, 0x0000000000000000ULL, 0x2A1C0F57BFC2D83AULL }, /* XSUM_XXH3_testdata[6022] */\n    { 3011, 0x9E3779B185EBCA8DULL, 0x2C6F1F48D5EF740FULL }, /* XSUM_XXH3_testdata[6023] */\n    { 3012, 0x0000000000000000ULL, 0x2727AE494F5A75FEULL }, /* XSUM_XXH3_testdata[6024] */\n    { 3012, 0x9E3779B185EBCA8DULL, 0xC69CB787B7281DF4ULL }, /* XSUM_XXH3_testdata[6025] */\n    { 3013, 0x0000000000000000ULL, 0x4DE3E131E4BD2EDFULL }, /* XSUM_XXH3_testdata[6026] */\n    { 3013, 0x9E3779B185EBCA8DULL, 0x78AEA8833E396C88ULL }, /* XSUM_XXH3_testdata[6027] */\n    { 3014, 0x0000000000000000ULL, 0xDDE4CAEA2A781517ULL }, /* XSUM_XXH3_testdata[6028] */\n    { 3014, 0x9E3779B185EBCA8DULL, 0xC0A851C6413BD17CULL }, /* XSUM_XXH3_testdata[6029] */\n    { 3015, 0x0000000000000000ULL, 0xF44B7A75661491C6ULL }, /* XSUM_XXH3_testdata[6030] */\n    { 3015, 0x9E3779B185EBCA8DULL, 0x6ADDF0491196D913ULL }, /* XSUM_XXH3_testdata[6031] */\n    { 3016, 0x0000000000000000ULL, 0x157BA455BB39FAB5ULL }, /* XSUM_XXH3_testdata[6032] */\n    { 3016, 0x9E3779B185EBCA8DULL, 0xA211324DF0557420ULL }, /* XSUM_XXH3_testdata[6033] */\n    { 3017, 0x0000000000000000ULL, 0x2F8C767875C1963BULL }, /* XSUM_XXH3_testdata[6034] */\n    { 3017, 0x9E3779B185EBCA8DULL, 0x32ED4EDDC3D0EBE9ULL }, /* XSUM_XXH3_testdata[6035] */\n    { 3018, 0x0000000000000000ULL, 0x3D2AC11529277793ULL }, /* XSUM_XXH3_testdata[6036] */\n    { 3018, 0x9E3779B185EBCA8DULL, 0xEFD99140F72AFA32ULL }, /* XSUM_XXH3_testdata[6037] */\n    { 3019, 0x0000000000000000ULL, 0x0F92385982E5763EULL }, /* XSUM_XXH3_testdata[6038] */\n    { 3019, 0x9E3779B185EBCA8DULL, 0xAA9CAC946BCFD58AULL }, /* XSUM_XXH3_testdata[6039] */\n    { 3020, 0x0000000000000000ULL, 0xFFCD172FC10CC01EULL }, /* XSUM_XXH3_testdata[6040] */\n    { 3020, 0x9E3779B185EBCA8DULL, 0x72BE9E8C15D00463ULL }, /* XSUM_XXH3_testdata[6041] */\n    { 3021, 0x0000000000000000ULL, 0xED5D86E0B3185A9CULL }, /* XSUM_XXH3_testdata[6042] */\n    { 3021, 0x9E3779B185EBCA8DULL, 0xFFF71150D904ADA0ULL }, /* XSUM_XXH3_testdata[6043] */\n    { 3022, 0x0000000000000000ULL, 0x7C4A57D1E819ECC0ULL }, /* XSUM_XXH3_testdata[6044] */\n    { 3022, 0x9E3779B185EBCA8DULL, 0xAA982C793CF4FE2CULL }, /* XSUM_XXH3_testdata[6045] */\n    { 3023, 0x0000000000000000ULL, 0x2604439004011CAAULL }, /* XSUM_XXH3_testdata[6046] */\n    { 3023, 0x9E3779B185EBCA8DULL, 0x6F49B7EA4BD6066EULL }, /* XSUM_XXH3_testdata[6047] */\n    { 3024, 0x0000000000000000ULL, 0x4BEF54052BE525D0ULL }, /* XSUM_XXH3_testdata[6048] */\n    { 3024, 0x9E3779B185EBCA8DULL, 0x2811E539BB44335EULL }, /* XSUM_XXH3_testdata[6049] */\n    { 3025, 0x0000000000000000ULL, 0xB8B5D14615D49784ULL }, /* XSUM_XXH3_testdata[6050] */\n    { 3025, 0x9E3779B185EBCA8DULL, 0xF6683BCA789C6AB6ULL }, /* XSUM_XXH3_testdata[6051] */\n    { 3026, 0x0000000000000000ULL, 0xE5ED2E4BC25ED4FEULL }, /* XSUM_XXH3_testdata[6052] */\n    { 3026, 0x9E3779B185EBCA8DULL, 0x746B882F7D2B6584ULL }, /* XSUM_XXH3_testdata[6053] */\n    { 3027, 0x0000000000000000ULL, 0x494D8A012B18DEA3ULL }, /* XSUM_XXH3_testdata[6054] */\n    { 3027, 0x9E3779B185EBCA8DULL, 0xD6C2BF6089B48362ULL }, /* XSUM_XXH3_testdata[6055] */\n    { 3028, 0x0000000000000000ULL, 0xE4FAB24810CF98EEULL }, /* XSUM_XXH3_testdata[6056] */\n    { 3028, 0x9E3779B185EBCA8DULL, 0xB3D503EF09864DCAULL }, /* XSUM_XXH3_testdata[6057] */\n    { 3029, 0x0000000000000000ULL, 0xFF05BDA59C8692F7ULL }, /* XSUM_XXH3_testdata[6058] */\n    { 3029, 0x9E3779B185EBCA8DULL, 0x5A169FD2CB2E3912ULL }, /* XSUM_XXH3_testdata[6059] */\n    { 3030, 0x0000000000000000ULL, 0xD74E824D71198E1BULL }, /* XSUM_XXH3_testdata[6060] */\n    { 3030, 0x9E3779B185EBCA8DULL, 0xE0B0FC1E68033657ULL }, /* XSUM_XXH3_testdata[6061] */\n    { 3031, 0x0000000000000000ULL, 0x52BC157813CA28FDULL }, /* XSUM_XXH3_testdata[6062] */\n    { 3031, 0x9E3779B185EBCA8DULL, 0xC2C8C146172EF2B6ULL }, /* XSUM_XXH3_testdata[6063] */\n    { 3032, 0x0000000000000000ULL, 0x0192F4C36C19F541ULL }, /* XSUM_XXH3_testdata[6064] */\n    { 3032, 0x9E3779B185EBCA8DULL, 0xB8680C299F8C2670ULL }, /* XSUM_XXH3_testdata[6065] */\n    { 3033, 0x0000000000000000ULL, 0xC1118A662B3E5381ULL }, /* XSUM_XXH3_testdata[6066] */\n    { 3033, 0x9E3779B185EBCA8DULL, 0x2617D6300D8B98AFULL }, /* XSUM_XXH3_testdata[6067] */\n    { 3034, 0x0000000000000000ULL, 0xC612DDA77A2B6739ULL }, /* XSUM_XXH3_testdata[6068] */\n    { 3034, 0x9E3779B185EBCA8DULL, 0xFF054E6A928BAE7FULL }, /* XSUM_XXH3_testdata[6069] */\n    { 3035, 0x0000000000000000ULL, 0x891E8F4349525A0EULL }, /* XSUM_XXH3_testdata[6070] */\n    { 3035, 0x9E3779B185EBCA8DULL, 0x2DDEE65737D657A8ULL }, /* XSUM_XXH3_testdata[6071] */\n    { 3036, 0x0000000000000000ULL, 0x52F254763AE93985ULL }, /* XSUM_XXH3_testdata[6072] */\n    { 3036, 0x9E3779B185EBCA8DULL, 0x448708C1C3DE9CFBULL }, /* XSUM_XXH3_testdata[6073] */\n    { 3037, 0x0000000000000000ULL, 0xC0FD98CDAF535969ULL }, /* XSUM_XXH3_testdata[6074] */\n    { 3037, 0x9E3779B185EBCA8DULL, 0x0084DA76277128B6ULL }, /* XSUM_XXH3_testdata[6075] */\n    { 3038, 0x0000000000000000ULL, 0xB4858BA14CC418E2ULL }, /* XSUM_XXH3_testdata[6076] */\n    { 3038, 0x9E3779B185EBCA8DULL, 0x522D3572219112D7ULL }, /* XSUM_XXH3_testdata[6077] */\n    { 3039, 0x0000000000000000ULL, 0x1569F693B70669F0ULL }, /* XSUM_XXH3_testdata[6078] */\n    { 3039, 0x9E3779B185EBCA8DULL, 0x60C5FD7C6FECE230ULL }, /* XSUM_XXH3_testdata[6079] */\n    { 3040, 0x0000000000000000ULL, 0x7FC80D9A5EFCC67DULL }, /* XSUM_XXH3_testdata[6080] */\n    { 3040, 0x9E3779B185EBCA8DULL, 0x9AB4B05D244B7B00ULL }, /* XSUM_XXH3_testdata[6081] */\n    { 3041, 0x0000000000000000ULL, 0x53E111516A359F39ULL }, /* XSUM_XXH3_testdata[6082] */\n    { 3041, 0x9E3779B185EBCA8DULL, 0x0A7FDF4A5152F876ULL }, /* XSUM_XXH3_testdata[6083] */\n    { 3042, 0x0000000000000000ULL, 0xE10FAA1FF256B134ULL }, /* XSUM_XXH3_testdata[6084] */\n    { 3042, 0x9E3779B185EBCA8DULL, 0x4685F5F0714BF906ULL }, /* XSUM_XXH3_testdata[6085] */\n    { 3043, 0x0000000000000000ULL, 0xE9DAA50EF33FAEE0ULL }, /* XSUM_XXH3_testdata[6086] */\n    { 3043, 0x9E3779B185EBCA8DULL, 0x5628D585CE6A2F71ULL }, /* XSUM_XXH3_testdata[6087] */\n    { 3044, 0x0000000000000000ULL, 0x3FB549E119A1DB0BULL }, /* XSUM_XXH3_testdata[6088] */\n    { 3044, 0x9E3779B185EBCA8DULL, 0x0EC5349117230073ULL }, /* XSUM_XXH3_testdata[6089] */\n    { 3045, 0x0000000000000000ULL, 0xC52C880527E7EE42ULL }, /* XSUM_XXH3_testdata[6090] */\n    { 3045, 0x9E3779B185EBCA8DULL, 0x79561D65F06AF1E4ULL }, /* XSUM_XXH3_testdata[6091] */\n    { 3046, 0x0000000000000000ULL, 0x85AF39ECC47380D6ULL }, /* XSUM_XXH3_testdata[6092] */\n    { 3046, 0x9E3779B185EBCA8DULL, 0x2F406936C9E75008ULL }, /* XSUM_XXH3_testdata[6093] */\n    { 3047, 0x0000000000000000ULL, 0xA17883ED34DF9C9CULL }, /* XSUM_XXH3_testdata[6094] */\n    { 3047, 0x9E3779B185EBCA8DULL, 0x3505A10DC45FAFF5ULL }, /* XSUM_XXH3_testdata[6095] */\n    { 3048, 0x0000000000000000ULL, 0x56FCB8BF621BC46CULL }, /* XSUM_XXH3_testdata[6096] */\n    { 3048, 0x9E3779B185EBCA8DULL, 0x135F0AD585E4B49BULL }, /* XSUM_XXH3_testdata[6097] */\n    { 3049, 0x0000000000000000ULL, 0xFCABF74067D91081ULL }, /* XSUM_XXH3_testdata[6098] */\n    { 3049, 0x9E3779B185EBCA8DULL, 0x63111E6E094071FBULL }, /* XSUM_XXH3_testdata[6099] */\n    { 3050, 0x0000000000000000ULL, 0xA6D55CB1163CBBAEULL }, /* XSUM_XXH3_testdata[6100] */\n    { 3050, 0x9E3779B185EBCA8DULL, 0xEA638F18EFD67488ULL }, /* XSUM_XXH3_testdata[6101] */\n    { 3051, 0x0000000000000000ULL, 0xEB24F505D0201A73ULL }, /* XSUM_XXH3_testdata[6102] */\n    { 3051, 0x9E3779B185EBCA8DULL, 0xDAB8124FE18205AFULL }, /* XSUM_XXH3_testdata[6103] */\n    { 3052, 0x0000000000000000ULL, 0x7987ACF1829352A3ULL }, /* XSUM_XXH3_testdata[6104] */\n    { 3052, 0x9E3779B185EBCA8DULL, 0x0DA619B29FEFD3AEULL }, /* XSUM_XXH3_testdata[6105] */\n    { 3053, 0x0000000000000000ULL, 0xF6DCAFED19C2110FULL }, /* XSUM_XXH3_testdata[6106] */\n    { 3053, 0x9E3779B185EBCA8DULL, 0xCE6F6D56D6B819A5ULL }, /* XSUM_XXH3_testdata[6107] */\n    { 3054, 0x0000000000000000ULL, 0x113BB1975695F267ULL }, /* XSUM_XXH3_testdata[6108] */\n    { 3054, 0x9E3779B185EBCA8DULL, 0x41BEB0A9045C46E9ULL }, /* XSUM_XXH3_testdata[6109] */\n    { 3055, 0x0000000000000000ULL, 0x31EC14CB1C6A64D4ULL }, /* XSUM_XXH3_testdata[6110] */\n    { 3055, 0x9E3779B185EBCA8DULL, 0x630502A72FC9F91BULL }, /* XSUM_XXH3_testdata[6111] */\n    { 3056, 0x0000000000000000ULL, 0xFC8D946315923718ULL }, /* XSUM_XXH3_testdata[6112] */\n    { 3056, 0x9E3779B185EBCA8DULL, 0x6DC4FDCC5C188187ULL }, /* XSUM_XXH3_testdata[6113] */\n    { 3057, 0x0000000000000000ULL, 0xA91700F13F1BBE4BULL }, /* XSUM_XXH3_testdata[6114] */\n    { 3057, 0x9E3779B185EBCA8DULL, 0x722795CBBFCE823FULL }, /* XSUM_XXH3_testdata[6115] */\n    { 3058, 0x0000000000000000ULL, 0xA6D433839C43C439ULL }, /* XSUM_XXH3_testdata[6116] */\n    { 3058, 0x9E3779B185EBCA8DULL, 0x131C0BBEC45BF54FULL }, /* XSUM_XXH3_testdata[6117] */\n    { 3059, 0x0000000000000000ULL, 0x719B83FD2D183A0FULL }, /* XSUM_XXH3_testdata[6118] */\n    { 3059, 0x9E3779B185EBCA8DULL, 0xADB87552F234D8B0ULL }, /* XSUM_XXH3_testdata[6119] */\n    { 3060, 0x0000000000000000ULL, 0x9324D8E772F6F02FULL }, /* XSUM_XXH3_testdata[6120] */\n    { 3060, 0x9E3779B185EBCA8DULL, 0x6909E806601A139CULL }, /* XSUM_XXH3_testdata[6121] */\n    { 3061, 0x0000000000000000ULL, 0x109A2D2288ACD199ULL }, /* XSUM_XXH3_testdata[6122] */\n    { 3061, 0x9E3779B185EBCA8DULL, 0x3385E38DD96DF2AFULL }, /* XSUM_XXH3_testdata[6123] */\n    { 3062, 0x0000000000000000ULL, 0x1BEE81BC69B566F6ULL }, /* XSUM_XXH3_testdata[6124] */\n    { 3062, 0x9E3779B185EBCA8DULL, 0xE6CADD5EA67A1DAEULL }, /* XSUM_XXH3_testdata[6125] */\n    { 3063, 0x0000000000000000ULL, 0xFBFB4557EC34D698ULL }, /* XSUM_XXH3_testdata[6126] */\n    { 3063, 0x9E3779B185EBCA8DULL, 0x3696BBD4171643A2ULL }, /* XSUM_XXH3_testdata[6127] */\n    { 3064, 0x0000000000000000ULL, 0x14E282185745F79CULL }, /* XSUM_XXH3_testdata[6128] */\n    { 3064, 0x9E3779B185EBCA8DULL, 0x96BC2B8FAD88A929ULL }, /* XSUM_XXH3_testdata[6129] */\n    { 3065, 0x0000000000000000ULL, 0x25C9F9879393E997ULL }, /* XSUM_XXH3_testdata[6130] */\n    { 3065, 0x9E3779B185EBCA8DULL, 0x1F0D9D4AFFE22D31ULL }, /* XSUM_XXH3_testdata[6131] */\n    { 3066, 0x0000000000000000ULL, 0x010325C9A4640B46ULL }, /* XSUM_XXH3_testdata[6132] */\n    { 3066, 0x9E3779B185EBCA8DULL, 0xC85B74B109ACF054ULL }, /* XSUM_XXH3_testdata[6133] */\n    { 3067, 0x0000000000000000ULL, 0xEF768413CBDAD45EULL }, /* XSUM_XXH3_testdata[6134] */\n    { 3067, 0x9E3779B185EBCA8DULL, 0xA32B4C15F274FC23ULL }, /* XSUM_XXH3_testdata[6135] */\n    { 3068, 0x0000000000000000ULL, 0xB5B5BE7F2181A7ABULL }, /* XSUM_XXH3_testdata[6136] */\n    { 3068, 0x9E3779B185EBCA8DULL, 0xEC3896CA46CFBEBCULL }, /* XSUM_XXH3_testdata[6137] */\n    { 3069, 0x0000000000000000ULL, 0x65B0891D197D8052ULL }, /* XSUM_XXH3_testdata[6138] */\n    { 3069, 0x9E3779B185EBCA8DULL, 0xEA5C229CE48A537AULL }, /* XSUM_XXH3_testdata[6139] */\n    { 3070, 0x0000000000000000ULL, 0xB4146D3B212234C3ULL }, /* XSUM_XXH3_testdata[6140] */\n    { 3070, 0x9E3779B185EBCA8DULL, 0x28DE1E99104CA396ULL }, /* XSUM_XXH3_testdata[6141] */\n    { 3071, 0x0000000000000000ULL, 0xEA91DBA6A78E984AULL }, /* XSUM_XXH3_testdata[6142] */\n    { 3071, 0x9E3779B185EBCA8DULL, 0xE031963E4476103AULL }, /* XSUM_XXH3_testdata[6143] */\n    { 3072, 0x0000000000000000ULL, 0x696BF231F32AB848ULL }, /* XSUM_XXH3_testdata[6144] */\n    { 3072, 0x9E3779B185EBCA8DULL, 0xFE150E487CFF7C10ULL }, /* XSUM_XXH3_testdata[6145] */\n    { 3073, 0x0000000000000000ULL, 0xBB5CD7893718D93DULL }, /* XSUM_XXH3_testdata[6146] */\n    { 3073, 0x9E3779B185EBCA8DULL, 0x5233345A92E0B7D2ULL }, /* XSUM_XXH3_testdata[6147] */\n    { 3074, 0x0000000000000000ULL, 0x4544D303A760BFFAULL }, /* XSUM_XXH3_testdata[6148] */\n    { 3074, 0x9E3779B185EBCA8DULL, 0x1667C4FDDA475558ULL }, /* XSUM_XXH3_testdata[6149] */\n    { 3075, 0x0000000000000000ULL, 0x20A0F9FB85F87027ULL }, /* XSUM_XXH3_testdata[6150] */\n    { 3075, 0x9E3779B185EBCA8DULL, 0x83F78721C54EA38CULL }, /* XSUM_XXH3_testdata[6151] */\n    { 3076, 0x0000000000000000ULL, 0x3A7D67C26ECD3469ULL }, /* XSUM_XXH3_testdata[6152] */\n    { 3076, 0x9E3779B185EBCA8DULL, 0xB5BE83A696B09303ULL }, /* XSUM_XXH3_testdata[6153] */\n    { 3077, 0x0000000000000000ULL, 0x2673E1EFA109AD4BULL }, /* XSUM_XXH3_testdata[6154] */\n    { 3077, 0x9E3779B185EBCA8DULL, 0x9027ED80737DB3C2ULL }, /* XSUM_XXH3_testdata[6155] */\n    { 3078, 0x0000000000000000ULL, 0x211FB4B295AC7DDEULL }, /* XSUM_XXH3_testdata[6156] */\n    { 3078, 0x9E3779B185EBCA8DULL, 0xDD74CF8FA750EAF3ULL }, /* XSUM_XXH3_testdata[6157] */\n    { 3079, 0x0000000000000000ULL, 0x394653F476FCE696ULL }, /* XSUM_XXH3_testdata[6158] */\n    { 3079, 0x9E3779B185EBCA8DULL, 0xABC82F2E8CA84916ULL }, /* XSUM_XXH3_testdata[6159] */\n    { 3080, 0x0000000000000000ULL, 0xDEC5003A5B3E0A29ULL }, /* XSUM_XXH3_testdata[6160] */\n    { 3080, 0x9E3779B185EBCA8DULL, 0x94C2C8873615DCF5ULL }, /* XSUM_XXH3_testdata[6161] */\n    { 3081, 0x0000000000000000ULL, 0x013EE3A30B2101F5ULL }, /* XSUM_XXH3_testdata[6162] */\n    { 3081, 0x9E3779B185EBCA8DULL, 0x41656992552CCC2AULL }, /* XSUM_XXH3_testdata[6163] */\n    { 3082, 0x0000000000000000ULL, 0x448827E84F765F4AULL }, /* XSUM_XXH3_testdata[6164] */\n    { 3082, 0x9E3779B185EBCA8DULL, 0x046BDD756789FA35ULL }, /* XSUM_XXH3_testdata[6165] */\n    { 3083, 0x0000000000000000ULL, 0xB3494BD4B2633F2BULL }, /* XSUM_XXH3_testdata[6166] */\n    { 3083, 0x9E3779B185EBCA8DULL, 0x916119ED75DE8D24ULL }, /* XSUM_XXH3_testdata[6167] */\n    { 3084, 0x0000000000000000ULL, 0x12579A5674B09B07ULL }, /* XSUM_XXH3_testdata[6168] */\n    { 3084, 0x9E3779B185EBCA8DULL, 0xFB07F8F25B5AE020ULL }, /* XSUM_XXH3_testdata[6169] */\n    { 3085, 0x0000000000000000ULL, 0x2757A7411AAA0AF5ULL }, /* XSUM_XXH3_testdata[6170] */\n    { 3085, 0x9E3779B185EBCA8DULL, 0x98832C78F0EEE15BULL }, /* XSUM_XXH3_testdata[6171] */\n    { 3086, 0x0000000000000000ULL, 0xF51AA9442403576AULL }, /* XSUM_XXH3_testdata[6172] */\n    { 3086, 0x9E3779B185EBCA8DULL, 0xD1E8E39ADAE2E67AULL }, /* XSUM_XXH3_testdata[6173] */\n    { 3087, 0x0000000000000000ULL, 0x4EFDFECD0C1218DAULL }, /* XSUM_XXH3_testdata[6174] */\n    { 3087, 0x9E3779B185EBCA8DULL, 0x566184AA59123BFFULL }, /* XSUM_XXH3_testdata[6175] */\n    { 3088, 0x0000000000000000ULL, 0x71453920FCFBDCB5ULL }, /* XSUM_XXH3_testdata[6176] */\n    { 3088, 0x9E3779B185EBCA8DULL, 0xB5ECA63537B8CAB6ULL }, /* XSUM_XXH3_testdata[6177] */\n    { 3089, 0x0000000000000000ULL, 0xB8DB9958E9F8DAF1ULL }, /* XSUM_XXH3_testdata[6178] */\n    { 3089, 0x9E3779B185EBCA8DULL, 0x4F1D1FAA85396B9CULL }, /* XSUM_XXH3_testdata[6179] */\n    { 3090, 0x0000000000000000ULL, 0xADDAEAC431A05F24ULL }, /* XSUM_XXH3_testdata[6180] */\n    { 3090, 0x9E3779B185EBCA8DULL, 0x99B4E9662E4CA04DULL }, /* XSUM_XXH3_testdata[6181] */\n    { 3091, 0x0000000000000000ULL, 0x6115EB504AD836EAULL }, /* XSUM_XXH3_testdata[6182] */\n    { 3091, 0x9E3779B185EBCA8DULL, 0x172CD5B6646EB12AULL }, /* XSUM_XXH3_testdata[6183] */\n    { 3092, 0x0000000000000000ULL, 0xDB3D25A94028892AULL }, /* XSUM_XXH3_testdata[6184] */\n    { 3092, 0x9E3779B185EBCA8DULL, 0xE337C680B9A11A0AULL }, /* XSUM_XXH3_testdata[6185] */\n    { 3093, 0x0000000000000000ULL, 0x11F008344CCFA92BULL }, /* XSUM_XXH3_testdata[6186] */\n    { 3093, 0x9E3779B185EBCA8DULL, 0xF63D77109C6E4C3DULL }, /* XSUM_XXH3_testdata[6187] */\n    { 3094, 0x0000000000000000ULL, 0x47B5D05EAF2979E3ULL }, /* XSUM_XXH3_testdata[6188] */\n    { 3094, 0x9E3779B185EBCA8DULL, 0xC9B7DFA126271448ULL }, /* XSUM_XXH3_testdata[6189] */\n    { 3095, 0x0000000000000000ULL, 0x29882EBDD91DC29CULL }, /* XSUM_XXH3_testdata[6190] */\n    { 3095, 0x9E3779B185EBCA8DULL, 0xBBD1B325B1DDD3A7ULL }, /* XSUM_XXH3_testdata[6191] */\n    { 3096, 0x0000000000000000ULL, 0xAB2D37B15F786F13ULL }, /* XSUM_XXH3_testdata[6192] */\n    { 3096, 0x9E3779B185EBCA8DULL, 0x5FAED81210AF3B2AULL }, /* XSUM_XXH3_testdata[6193] */\n    { 3097, 0x0000000000000000ULL, 0x5B9EE12B5CE61876ULL }, /* XSUM_XXH3_testdata[6194] */\n    { 3097, 0x9E3779B185EBCA8DULL, 0xDA856D0A3246871FULL }, /* XSUM_XXH3_testdata[6195] */\n    { 3098, 0x0000000000000000ULL, 0x0CA96524F2F351FDULL }, /* XSUM_XXH3_testdata[6196] */\n    { 3098, 0x9E3779B185EBCA8DULL, 0x33D31C4C4C9A192AULL }, /* XSUM_XXH3_testdata[6197] */\n    { 3099, 0x0000000000000000ULL, 0xBE9B42B9D7A7DE77ULL }, /* XSUM_XXH3_testdata[6198] */\n    { 3099, 0x9E3779B185EBCA8DULL, 0xC69BED9367D3CA12ULL }, /* XSUM_XXH3_testdata[6199] */\n    { 3100, 0x0000000000000000ULL, 0x53C9FC5F9E22A184ULL }, /* XSUM_XXH3_testdata[6200] */\n    { 3100, 0x9E3779B185EBCA8DULL, 0xE8D9012FD958628AULL }, /* XSUM_XXH3_testdata[6201] */\n    { 3101, 0x0000000000000000ULL, 0x5B827245B5450701ULL }, /* XSUM_XXH3_testdata[6202] */\n    { 3101, 0x9E3779B185EBCA8DULL, 0xD02A3FCA9A98DA37ULL }, /* XSUM_XXH3_testdata[6203] */\n    { 3102, 0x0000000000000000ULL, 0xB99D171D1373071EULL }, /* XSUM_XXH3_testdata[6204] */\n    { 3102, 0x9E3779B185EBCA8DULL, 0xFAACE1AD8099B9B9ULL }, /* XSUM_XXH3_testdata[6205] */\n    { 3103, 0x0000000000000000ULL, 0x0674140175B3E039ULL }, /* XSUM_XXH3_testdata[6206] */\n    { 3103, 0x9E3779B185EBCA8DULL, 0xE336F90201941233ULL }, /* XSUM_XXH3_testdata[6207] */\n    { 3104, 0x0000000000000000ULL, 0xADB58ED4D1193F58ULL }, /* XSUM_XXH3_testdata[6208] */\n    { 3104, 0x9E3779B185EBCA8DULL, 0xB45FE8D1E3ED3A79ULL }, /* XSUM_XXH3_testdata[6209] */\n    { 3105, 0x0000000000000000ULL, 0xDCEF77642A90D552ULL }, /* XSUM_XXH3_testdata[6210] */\n    { 3105, 0x9E3779B185EBCA8DULL, 0x3042D8FF87B76D4FULL }, /* XSUM_XXH3_testdata[6211] */\n    { 3106, 0x0000000000000000ULL, 0x8BF3C167F4FBFCAAULL }, /* XSUM_XXH3_testdata[6212] */\n    { 3106, 0x9E3779B185EBCA8DULL, 0xC457533DDAB1435AULL }, /* XSUM_XXH3_testdata[6213] */\n    { 3107, 0x0000000000000000ULL, 0xB198BD1563FFEDEAULL }, /* XSUM_XXH3_testdata[6214] */\n    { 3107, 0x9E3779B185EBCA8DULL, 0x8C02F5DB14AC6991ULL }, /* XSUM_XXH3_testdata[6215] */\n    { 3108, 0x0000000000000000ULL, 0xDE8A2527EF986A80ULL }, /* XSUM_XXH3_testdata[6216] */\n    { 3108, 0x9E3779B185EBCA8DULL, 0x323C46D327FBE997ULL }, /* XSUM_XXH3_testdata[6217] */\n    { 3109, 0x0000000000000000ULL, 0x3C9D70E9F3DCA228ULL }, /* XSUM_XXH3_testdata[6218] */\n    { 3109, 0x9E3779B185EBCA8DULL, 0x089743EA9952136AULL }, /* XSUM_XXH3_testdata[6219] */\n    { 3110, 0x0000000000000000ULL, 0x62549962E266F326ULL }, /* XSUM_XXH3_testdata[6220] */\n    { 3110, 0x9E3779B185EBCA8DULL, 0xF65C7D89EBFAF3ACULL }, /* XSUM_XXH3_testdata[6221] */\n    { 3111, 0x0000000000000000ULL, 0x084FF959C351B8F4ULL }, /* XSUM_XXH3_testdata[6222] */\n    { 3111, 0x9E3779B185EBCA8DULL, 0x3F8F287E03EEEB3DULL }, /* XSUM_XXH3_testdata[6223] */\n    { 3112, 0x0000000000000000ULL, 0x87D72D416F9C4F7FULL }, /* XSUM_XXH3_testdata[6224] */\n    { 3112, 0x9E3779B185EBCA8DULL, 0x94FCCB3682E44009ULL }, /* XSUM_XXH3_testdata[6225] */\n    { 3113, 0x0000000000000000ULL, 0xB9619D8F5FF431E3ULL }, /* XSUM_XXH3_testdata[6226] */\n    { 3113, 0x9E3779B185EBCA8DULL, 0xDA8D99E6A4FA9AFEULL }, /* XSUM_XXH3_testdata[6227] */\n    { 3114, 0x0000000000000000ULL, 0x94BD88FF1F6C585CULL }, /* XSUM_XXH3_testdata[6228] */\n    { 3114, 0x9E3779B185EBCA8DULL, 0xD73515514A35F44DULL }, /* XSUM_XXH3_testdata[6229] */\n    { 3115, 0x0000000000000000ULL, 0xFAF335BE4F829B6DULL }, /* XSUM_XXH3_testdata[6230] */\n    { 3115, 0x9E3779B185EBCA8DULL, 0x1ED29810523AEC23ULL }, /* XSUM_XXH3_testdata[6231] */\n    { 3116, 0x0000000000000000ULL, 0xC7ED0CDE7F354105ULL }, /* XSUM_XXH3_testdata[6232] */\n    { 3116, 0x9E3779B185EBCA8DULL, 0x27D90923B7D9848AULL }, /* XSUM_XXH3_testdata[6233] */\n    { 3117, 0x0000000000000000ULL, 0x687C760766487BDEULL }, /* XSUM_XXH3_testdata[6234] */\n    { 3117, 0x9E3779B185EBCA8DULL, 0x5090AA65123EBA67ULL }, /* XSUM_XXH3_testdata[6235] */\n    { 3118, 0x0000000000000000ULL, 0xC9FB98EB9A86E2A6ULL }, /* XSUM_XXH3_testdata[6236] */\n    { 3118, 0x9E3779B185EBCA8DULL, 0x175C7B5E6D8DEA25ULL }, /* XSUM_XXH3_testdata[6237] */\n    { 3119, 0x0000000000000000ULL, 0xDAA2C2AE0E315B6DULL }, /* XSUM_XXH3_testdata[6238] */\n    { 3119, 0x9E3779B185EBCA8DULL, 0x767646AE2C2EDA92ULL }, /* XSUM_XXH3_testdata[6239] */\n    { 3120, 0x0000000000000000ULL, 0xD98AFF362DB10D7AULL }, /* XSUM_XXH3_testdata[6240] */\n    { 3120, 0x9E3779B185EBCA8DULL, 0xD20C4D9D22CFACC6ULL }, /* XSUM_XXH3_testdata[6241] */\n    { 3121, 0x0000000000000000ULL, 0x038150265809A8B1ULL }, /* XSUM_XXH3_testdata[6242] */\n    { 3121, 0x9E3779B185EBCA8DULL, 0xBD3F3EF1214251DCULL }, /* XSUM_XXH3_testdata[6243] */\n    { 3122, 0x0000000000000000ULL, 0xABC349A9D25C1A31ULL }, /* XSUM_XXH3_testdata[6244] */\n    { 3122, 0x9E3779B185EBCA8DULL, 0x8EC920C51176CEB9ULL }, /* XSUM_XXH3_testdata[6245] */\n    { 3123, 0x0000000000000000ULL, 0xFB5A30A329BAA9E2ULL }, /* XSUM_XXH3_testdata[6246] */\n    { 3123, 0x9E3779B185EBCA8DULL, 0x749AC63A986C0D4FULL }, /* XSUM_XXH3_testdata[6247] */\n    { 3124, 0x0000000000000000ULL, 0x72CB4EC0BFE6F042ULL }, /* XSUM_XXH3_testdata[6248] */\n    { 3124, 0x9E3779B185EBCA8DULL, 0xA31BA4F7705CCAF1ULL }, /* XSUM_XXH3_testdata[6249] */\n    { 3125, 0x0000000000000000ULL, 0x6DCFB8D92E795FEBULL }, /* XSUM_XXH3_testdata[6250] */\n    { 3125, 0x9E3779B185EBCA8DULL, 0x42C04093BB99C195ULL }, /* XSUM_XXH3_testdata[6251] */\n    { 3126, 0x0000000000000000ULL, 0x076F4E299D242338ULL }, /* XSUM_XXH3_testdata[6252] */\n    { 3126, 0x9E3779B185EBCA8DULL, 0xD2ECA180AB8CC107ULL }, /* XSUM_XXH3_testdata[6253] */\n    { 3127, 0x0000000000000000ULL, 0x2781EAFBCC0DCCA7ULL }, /* XSUM_XXH3_testdata[6254] */\n    { 3127, 0x9E3779B185EBCA8DULL, 0x79EABFB5CEBF8F43ULL }, /* XSUM_XXH3_testdata[6255] */\n    { 3128, 0x0000000000000000ULL, 0xCE79CBB5A4B1BA89ULL }, /* XSUM_XXH3_testdata[6256] */\n    { 3128, 0x9E3779B185EBCA8DULL, 0xA75D571105EF80D1ULL }, /* XSUM_XXH3_testdata[6257] */\n    { 3129, 0x0000000000000000ULL, 0xC0C5D7AD380558DEULL }, /* XSUM_XXH3_testdata[6258] */\n    { 3129, 0x9E3779B185EBCA8DULL, 0xEE973E882E57C4AEULL }, /* XSUM_XXH3_testdata[6259] */\n    { 3130, 0x0000000000000000ULL, 0xD9104A6D1F3926F4ULL }, /* XSUM_XXH3_testdata[6260] */\n    { 3130, 0x9E3779B185EBCA8DULL, 0x67826953983AD136ULL }, /* XSUM_XXH3_testdata[6261] */\n    { 3131, 0x0000000000000000ULL, 0xA332A2D2C117EB73ULL }, /* XSUM_XXH3_testdata[6262] */\n    { 3131, 0x9E3779B185EBCA8DULL, 0x4288C89AFCACC083ULL }, /* XSUM_XXH3_testdata[6263] */\n    { 3132, 0x0000000000000000ULL, 0xC4B80ED5628A9CE9ULL }, /* XSUM_XXH3_testdata[6264] */\n    { 3132, 0x9E3779B185EBCA8DULL, 0xCA2292AF916BE54FULL }, /* XSUM_XXH3_testdata[6265] */\n    { 3133, 0x0000000000000000ULL, 0x98A8F8752190384EULL }, /* XSUM_XXH3_testdata[6266] */\n    { 3133, 0x9E3779B185EBCA8DULL, 0xD2FF66EF4A69D81AULL }, /* XSUM_XXH3_testdata[6267] */\n    { 3134, 0x0000000000000000ULL, 0xD4051CE8E22ACD38ULL }, /* XSUM_XXH3_testdata[6268] */\n    { 3134, 0x9E3779B185EBCA8DULL, 0xF514098C73AD1AB5ULL }, /* XSUM_XXH3_testdata[6269] */\n    { 3135, 0x0000000000000000ULL, 0x8141CD88F539D640ULL }, /* XSUM_XXH3_testdata[6270] */\n    { 3135, 0x9E3779B185EBCA8DULL, 0x663037A3D108C4EDULL }, /* XSUM_XXH3_testdata[6271] */\n    { 3136, 0x0000000000000000ULL, 0x5D9FB666D8DDDF57ULL }, /* XSUM_XXH3_testdata[6272] */\n    { 3136, 0x9E3779B185EBCA8DULL, 0x8BC253EDE067B042ULL }, /* XSUM_XXH3_testdata[6273] */\n    { 3137, 0x0000000000000000ULL, 0x8BD8A25724AE2167ULL }, /* XSUM_XXH3_testdata[6274] */\n    { 3137, 0x9E3779B185EBCA8DULL, 0x67EF3573D079A8EBULL }, /* XSUM_XXH3_testdata[6275] */\n    { 3138, 0x0000000000000000ULL, 0x466023E7FED1EBA0ULL }, /* XSUM_XXH3_testdata[6276] */\n    { 3138, 0x9E3779B185EBCA8DULL, 0xC3E25652D609F7E1ULL }, /* XSUM_XXH3_testdata[6277] */\n    { 3139, 0x0000000000000000ULL, 0xADDD3527A73D9A21ULL }, /* XSUM_XXH3_testdata[6278] */\n    { 3139, 0x9E3779B185EBCA8DULL, 0x2A754AB3FDFA7279ULL }, /* XSUM_XXH3_testdata[6279] */\n    { 3140, 0x0000000000000000ULL, 0xAAD5191EDC83C88BULL }, /* XSUM_XXH3_testdata[6280] */\n    { 3140, 0x9E3779B185EBCA8DULL, 0x883FF7F14EB52B56ULL }, /* XSUM_XXH3_testdata[6281] */\n    { 3141, 0x0000000000000000ULL, 0xA76A101D0ECB7CADULL }, /* XSUM_XXH3_testdata[6282] */\n    { 3141, 0x9E3779B185EBCA8DULL, 0xF0C7C97645AFA36CULL }, /* XSUM_XXH3_testdata[6283] */\n    { 3142, 0x0000000000000000ULL, 0x8EBE2C0D983672D1ULL }, /* XSUM_XXH3_testdata[6284] */\n    { 3142, 0x9E3779B185EBCA8DULL, 0x7BF659361A6376B3ULL }, /* XSUM_XXH3_testdata[6285] */\n    { 3143, 0x0000000000000000ULL, 0x7752767611545404ULL }, /* XSUM_XXH3_testdata[6286] */\n    { 3143, 0x9E3779B185EBCA8DULL, 0x260BFD3E65208182ULL }, /* XSUM_XXH3_testdata[6287] */\n    { 3144, 0x0000000000000000ULL, 0xBE7A4C7BED46B55BULL }, /* XSUM_XXH3_testdata[6288] */\n    { 3144, 0x9E3779B185EBCA8DULL, 0x92131DB8BF216CD6ULL }, /* XSUM_XXH3_testdata[6289] */\n    { 3145, 0x0000000000000000ULL, 0xF2500C96A26A435AULL }, /* XSUM_XXH3_testdata[6290] */\n    { 3145, 0x9E3779B185EBCA8DULL, 0x42B8DE92C6B1CF90ULL }, /* XSUM_XXH3_testdata[6291] */\n    { 3146, 0x0000000000000000ULL, 0x7283019679119DD4ULL }, /* XSUM_XXH3_testdata[6292] */\n    { 3146, 0x9E3779B185EBCA8DULL, 0xAC866D69D4189BE0ULL }, /* XSUM_XXH3_testdata[6293] */\n    { 3147, 0x0000000000000000ULL, 0xEE62C8434C674EFDULL }, /* XSUM_XXH3_testdata[6294] */\n    { 3147, 0x9E3779B185EBCA8DULL, 0xB8B22ADA709264B6ULL }, /* XSUM_XXH3_testdata[6295] */\n    { 3148, 0x0000000000000000ULL, 0x7D74E58E0BEFDB70ULL }, /* XSUM_XXH3_testdata[6296] */\n    { 3148, 0x9E3779B185EBCA8DULL, 0xF77695F5F393512DULL }, /* XSUM_XXH3_testdata[6297] */\n    { 3149, 0x0000000000000000ULL, 0x1FDDD0BAD4CE88C9ULL }, /* XSUM_XXH3_testdata[6298] */\n    { 3149, 0x9E3779B185EBCA8DULL, 0xB3EFE44467B32FEAULL }, /* XSUM_XXH3_testdata[6299] */\n    { 3150, 0x0000000000000000ULL, 0x38D6BCB4926F185CULL }, /* XSUM_XXH3_testdata[6300] */\n    { 3150, 0x9E3779B185EBCA8DULL, 0x0FC39459D2521D4EULL }, /* XSUM_XXH3_testdata[6301] */\n    { 3151, 0x0000000000000000ULL, 0x855665D5F6FA8D52ULL }, /* XSUM_XXH3_testdata[6302] */\n    { 3151, 0x9E3779B185EBCA8DULL, 0x2EA467EEF6193680ULL }, /* XSUM_XXH3_testdata[6303] */\n    { 3152, 0x0000000000000000ULL, 0xB1C8419925DC1A9AULL }, /* XSUM_XXH3_testdata[6304] */\n    { 3152, 0x9E3779B185EBCA8DULL, 0xE8946ACD5185D7FBULL }, /* XSUM_XXH3_testdata[6305] */\n    { 3153, 0x0000000000000000ULL, 0xBC151DA81698FCFEULL }, /* XSUM_XXH3_testdata[6306] */\n    { 3153, 0x9E3779B185EBCA8DULL, 0xAC962934E496454EULL }, /* XSUM_XXH3_testdata[6307] */\n    { 3154, 0x0000000000000000ULL, 0x4DEDCFFA68D5467EULL }, /* XSUM_XXH3_testdata[6308] */\n    { 3154, 0x9E3779B185EBCA8DULL, 0x8A019BF926F56AFCULL }, /* XSUM_XXH3_testdata[6309] */\n    { 3155, 0x0000000000000000ULL, 0xC5F668C2918366E7ULL }, /* XSUM_XXH3_testdata[6310] */\n    { 3155, 0x9E3779B185EBCA8DULL, 0x45D2A4EB35321947ULL }, /* XSUM_XXH3_testdata[6311] */\n    { 3156, 0x0000000000000000ULL, 0x67D816DEAC08D438ULL }, /* XSUM_XXH3_testdata[6312] */\n    { 3156, 0x9E3779B185EBCA8DULL, 0x79739B9941637BC9ULL }, /* XSUM_XXH3_testdata[6313] */\n    { 3157, 0x0000000000000000ULL, 0x32DC83E1F0CC21EDULL }, /* XSUM_XXH3_testdata[6314] */\n    { 3157, 0x9E3779B185EBCA8DULL, 0x7B527F237756C38DULL }, /* XSUM_XXH3_testdata[6315] */\n    { 3158, 0x0000000000000000ULL, 0x06D81FE3725F1B9CULL }, /* XSUM_XXH3_testdata[6316] */\n    { 3158, 0x9E3779B185EBCA8DULL, 0x0C08026E67295C55ULL }, /* XSUM_XXH3_testdata[6317] */\n    { 3159, 0x0000000000000000ULL, 0xDB8FA3B1AFB7ECBAULL }, /* XSUM_XXH3_testdata[6318] */\n    { 3159, 0x9E3779B185EBCA8DULL, 0x79EDA5CF3C973FDAULL }, /* XSUM_XXH3_testdata[6319] */\n    { 3160, 0x0000000000000000ULL, 0x5BBDE357F603F527ULL }, /* XSUM_XXH3_testdata[6320] */\n    { 3160, 0x9E3779B185EBCA8DULL, 0xB1A42426012B539AULL }, /* XSUM_XXH3_testdata[6321] */\n    { 3161, 0x0000000000000000ULL, 0xF8DCBC45A4C0C21EULL }, /* XSUM_XXH3_testdata[6322] */\n    { 3161, 0x9E3779B185EBCA8DULL, 0xDD6271CEEC1093A2ULL }, /* XSUM_XXH3_testdata[6323] */\n    { 3162, 0x0000000000000000ULL, 0x80FFBDF5A887CF78ULL }, /* XSUM_XXH3_testdata[6324] */\n    { 3162, 0x9E3779B185EBCA8DULL, 0x33A277578F7C70A7ULL }, /* XSUM_XXH3_testdata[6325] */\n    { 3163, 0x0000000000000000ULL, 0x7CB788B0AAD0217BULL }, /* XSUM_XXH3_testdata[6326] */\n    { 3163, 0x9E3779B185EBCA8DULL, 0xC227D2FF3DF3C920ULL }, /* XSUM_XXH3_testdata[6327] */\n    { 3164, 0x0000000000000000ULL, 0xAF2B32B04A995872ULL }, /* XSUM_XXH3_testdata[6328] */\n    { 3164, 0x9E3779B185EBCA8DULL, 0x7EE4CCD02886B51BULL }, /* XSUM_XXH3_testdata[6329] */\n    { 3165, 0x0000000000000000ULL, 0xCA116C1D32F16850ULL }, /* XSUM_XXH3_testdata[6330] */\n    { 3165, 0x9E3779B185EBCA8DULL, 0x40DFBFE05CD60823ULL }, /* XSUM_XXH3_testdata[6331] */\n    { 3166, 0x0000000000000000ULL, 0x721C1AF6E46B140BULL }, /* XSUM_XXH3_testdata[6332] */\n    { 3166, 0x9E3779B185EBCA8DULL, 0xB57F8B4F4981F8A8ULL }, /* XSUM_XXH3_testdata[6333] */\n    { 3167, 0x0000000000000000ULL, 0xDD4A21EB8827AFA9ULL }, /* XSUM_XXH3_testdata[6334] */\n    { 3167, 0x9E3779B185EBCA8DULL, 0xAC727DD105324DCFULL }, /* XSUM_XXH3_testdata[6335] */\n    { 3168, 0x0000000000000000ULL, 0xC5D7E262E4384AB3ULL }, /* XSUM_XXH3_testdata[6336] */\n    { 3168, 0x9E3779B185EBCA8DULL, 0xEEB067CADF77011EULL }, /* XSUM_XXH3_testdata[6337] */\n    { 3169, 0x0000000000000000ULL, 0x9218F4A889AA03D8ULL }, /* XSUM_XXH3_testdata[6338] */\n    { 3169, 0x9E3779B185EBCA8DULL, 0xCBEC7F6BBC8A85EBULL }, /* XSUM_XXH3_testdata[6339] */\n    { 3170, 0x0000000000000000ULL, 0xDE01D8F5378D481BULL }, /* XSUM_XXH3_testdata[6340] */\n    { 3170, 0x9E3779B185EBCA8DULL, 0xA8D425444A3E7BF5ULL }, /* XSUM_XXH3_testdata[6341] */\n    { 3171, 0x0000000000000000ULL, 0xBB4477B4F1092CAEULL }, /* XSUM_XXH3_testdata[6342] */\n    { 3171, 0x9E3779B185EBCA8DULL, 0xAF9138F57295DF4EULL }, /* XSUM_XXH3_testdata[6343] */\n    { 3172, 0x0000000000000000ULL, 0xCEF365E0B1653DD0ULL }, /* XSUM_XXH3_testdata[6344] */\n    { 3172, 0x9E3779B185EBCA8DULL, 0xF59389E7F8293C0BULL }, /* XSUM_XXH3_testdata[6345] */\n    { 3173, 0x0000000000000000ULL, 0xFA644D72D95371EBULL }, /* XSUM_XXH3_testdata[6346] */\n    { 3173, 0x9E3779B185EBCA8DULL, 0xC00024B7481AD55FULL }, /* XSUM_XXH3_testdata[6347] */\n    { 3174, 0x0000000000000000ULL, 0x1938F58C6870DDE4ULL }, /* XSUM_XXH3_testdata[6348] */\n    { 3174, 0x9E3779B185EBCA8DULL, 0x2AEF53C26297B485ULL }, /* XSUM_XXH3_testdata[6349] */\n    { 3175, 0x0000000000000000ULL, 0xA5B4D3ADA8247BE3ULL }, /* XSUM_XXH3_testdata[6350] */\n    { 3175, 0x9E3779B185EBCA8DULL, 0x69E247AC862672B7ULL }, /* XSUM_XXH3_testdata[6351] */\n    { 3176, 0x0000000000000000ULL, 0x6E0961238AD61E51ULL }, /* XSUM_XXH3_testdata[6352] */\n    { 3176, 0x9E3779B185EBCA8DULL, 0xCD569004C2B170DFULL }, /* XSUM_XXH3_testdata[6353] */\n    { 3177, 0x0000000000000000ULL, 0xCF91B2CA001D8F69ULL }, /* XSUM_XXH3_testdata[6354] */\n    { 3177, 0x9E3779B185EBCA8DULL, 0xB14BCA810E177D60ULL }, /* XSUM_XXH3_testdata[6355] */\n    { 3178, 0x0000000000000000ULL, 0x6E888E518A0F027FULL }, /* XSUM_XXH3_testdata[6356] */\n    { 3178, 0x9E3779B185EBCA8DULL, 0x79DA0978BE221017ULL }, /* XSUM_XXH3_testdata[6357] */\n    { 3179, 0x0000000000000000ULL, 0x99E992B164F58E57ULL }, /* XSUM_XXH3_testdata[6358] */\n    { 3179, 0x9E3779B185EBCA8DULL, 0xA990AB564E78F30DULL }, /* XSUM_XXH3_testdata[6359] */\n    { 3180, 0x0000000000000000ULL, 0xA7B031E2ABB1D9B9ULL }, /* XSUM_XXH3_testdata[6360] */\n    { 3180, 0x9E3779B185EBCA8DULL, 0xA4E61E865A7D5D3BULL }, /* XSUM_XXH3_testdata[6361] */\n    { 3181, 0x0000000000000000ULL, 0xB23CE7F2568B5811ULL }, /* XSUM_XXH3_testdata[6362] */\n    { 3181, 0x9E3779B185EBCA8DULL, 0x6B4F89A3C4EB7CE1ULL }, /* XSUM_XXH3_testdata[6363] */\n    { 3182, 0x0000000000000000ULL, 0x4EB82133191B1BB9ULL }, /* XSUM_XXH3_testdata[6364] */\n    { 3182, 0x9E3779B185EBCA8DULL, 0x34799BCBAE6F22EBULL }, /* XSUM_XXH3_testdata[6365] */\n    { 3183, 0x0000000000000000ULL, 0xEF646324A5097522ULL }, /* XSUM_XXH3_testdata[6366] */\n    { 3183, 0x9E3779B185EBCA8DULL, 0x84B2C177605C0E14ULL }, /* XSUM_XXH3_testdata[6367] */\n    { 3184, 0x0000000000000000ULL, 0x61F2380BEC36708BULL }, /* XSUM_XXH3_testdata[6368] */\n    { 3184, 0x9E3779B185EBCA8DULL, 0x6B395E53284250DDULL }, /* XSUM_XXH3_testdata[6369] */\n    { 3185, 0x0000000000000000ULL, 0x7B672597E5745924ULL }, /* XSUM_XXH3_testdata[6370] */\n    { 3185, 0x9E3779B185EBCA8DULL, 0x1B3B332DB85C89C6ULL }, /* XSUM_XXH3_testdata[6371] */\n    { 3186, 0x0000000000000000ULL, 0x57588E8652F646B3ULL }, /* XSUM_XXH3_testdata[6372] */\n    { 3186, 0x9E3779B185EBCA8DULL, 0x25B922125C9144C8ULL }, /* XSUM_XXH3_testdata[6373] */\n    { 3187, 0x0000000000000000ULL, 0xDF2FC9037E06173FULL }, /* XSUM_XXH3_testdata[6374] */\n    { 3187, 0x9E3779B185EBCA8DULL, 0x64138127DEC583E4ULL }, /* XSUM_XXH3_testdata[6375] */\n    { 3188, 0x0000000000000000ULL, 0xCD4A4AFCD0540A03ULL }, /* XSUM_XXH3_testdata[6376] */\n    { 3188, 0x9E3779B185EBCA8DULL, 0x766D05399B680371ULL }, /* XSUM_XXH3_testdata[6377] */\n    { 3189, 0x0000000000000000ULL, 0xE38C2538DFDFC867ULL }, /* XSUM_XXH3_testdata[6378] */\n    { 3189, 0x9E3779B185EBCA8DULL, 0xA51F716204993CE6ULL }, /* XSUM_XXH3_testdata[6379] */\n    { 3190, 0x0000000000000000ULL, 0x7B96AC539F64EC20ULL }, /* XSUM_XXH3_testdata[6380] */\n    { 3190, 0x9E3779B185EBCA8DULL, 0x171E356F3E050A39ULL }, /* XSUM_XXH3_testdata[6381] */\n    { 3191, 0x0000000000000000ULL, 0xBD29C98EFB036850ULL }, /* XSUM_XXH3_testdata[6382] */\n    { 3191, 0x9E3779B185EBCA8DULL, 0xAA1DC8EA46F5581BULL }, /* XSUM_XXH3_testdata[6383] */\n    { 3192, 0x0000000000000000ULL, 0x2CF893DB51A28DE4ULL }, /* XSUM_XXH3_testdata[6384] */\n    { 3192, 0x9E3779B185EBCA8DULL, 0xC47F8B7D70654B75ULL }, /* XSUM_XXH3_testdata[6385] */\n    { 3193, 0x0000000000000000ULL, 0x5333861320F7224CULL }, /* XSUM_XXH3_testdata[6386] */\n    { 3193, 0x9E3779B185EBCA8DULL, 0x8805977B05B510F7ULL }, /* XSUM_XXH3_testdata[6387] */\n    { 3194, 0x0000000000000000ULL, 0x71572463208AC824ULL }, /* XSUM_XXH3_testdata[6388] */\n    { 3194, 0x9E3779B185EBCA8DULL, 0xD738493B17010BE8ULL }, /* XSUM_XXH3_testdata[6389] */\n    { 3195, 0x0000000000000000ULL, 0xBB1F7B7CBDD9DE66ULL }, /* XSUM_XXH3_testdata[6390] */\n    { 3195, 0x9E3779B185EBCA8DULL, 0x63407B9EED2586E7ULL }, /* XSUM_XXH3_testdata[6391] */\n    { 3196, 0x0000000000000000ULL, 0xE3C8FE53CA50AC3BULL }, /* XSUM_XXH3_testdata[6392] */\n    { 3196, 0x9E3779B185EBCA8DULL, 0x7360FE7337E97DFAULL }, /* XSUM_XXH3_testdata[6393] */\n    { 3197, 0x0000000000000000ULL, 0x958B951AA7D6A602ULL }, /* XSUM_XXH3_testdata[6394] */\n    { 3197, 0x9E3779B185EBCA8DULL, 0x8D45E049E572DAC7ULL }, /* XSUM_XXH3_testdata[6395] */\n    { 3198, 0x0000000000000000ULL, 0xF721684AD49AD334ULL }, /* XSUM_XXH3_testdata[6396] */\n    { 3198, 0x9E3779B185EBCA8DULL, 0xB09F86AB41D114A5ULL }, /* XSUM_XXH3_testdata[6397] */\n    { 3199, 0x0000000000000000ULL, 0x10937A9EA8245551ULL }, /* XSUM_XXH3_testdata[6398] */\n    { 3199, 0x9E3779B185EBCA8DULL, 0x374C2BE03FF66B93ULL }, /* XSUM_XXH3_testdata[6399] */\n    { 3200, 0x0000000000000000ULL, 0xE4F44142422C90AEULL }, /* XSUM_XXH3_testdata[6400] */\n    { 3200, 0x9E3779B185EBCA8DULL, 0x87B4AA4EBCE160EAULL }, /* XSUM_XXH3_testdata[6401] */\n    { 3201, 0x0000000000000000ULL, 0x41CCAA0B3010027FULL }, /* XSUM_XXH3_testdata[6402] */\n    { 3201, 0x9E3779B185EBCA8DULL, 0x4D03036AAD73E5DEULL }, /* XSUM_XXH3_testdata[6403] */\n    { 3202, 0x0000000000000000ULL, 0x8D3755C9954B5747ULL }, /* XSUM_XXH3_testdata[6404] */\n    { 3202, 0x9E3779B185EBCA8DULL, 0x0CA71FD194BDE3A7ULL }, /* XSUM_XXH3_testdata[6405] */\n    { 3203, 0x0000000000000000ULL, 0x6666F844EBCE1C79ULL }, /* XSUM_XXH3_testdata[6406] */\n    { 3203, 0x9E3779B185EBCA8DULL, 0xD480ECFD26CE75A3ULL }, /* XSUM_XXH3_testdata[6407] */\n    { 3204, 0x0000000000000000ULL, 0x4D0200F714A6AD28ULL }, /* XSUM_XXH3_testdata[6408] */\n    { 3204, 0x9E3779B185EBCA8DULL, 0xA107631C511D1C36ULL }, /* XSUM_XXH3_testdata[6409] */\n    { 3205, 0x0000000000000000ULL, 0x794974AC9022F826ULL }, /* XSUM_XXH3_testdata[6410] */\n    { 3205, 0x9E3779B185EBCA8DULL, 0x1F908D5F57F7A269ULL }, /* XSUM_XXH3_testdata[6411] */\n    { 3206, 0x0000000000000000ULL, 0x9C40FCD5E16690FBULL }, /* XSUM_XXH3_testdata[6412] */\n    { 3206, 0x9E3779B185EBCA8DULL, 0xC6F7CCD7ACCDB0CFULL }, /* XSUM_XXH3_testdata[6413] */\n    { 3207, 0x0000000000000000ULL, 0xDE08B46FADEB1AB9ULL }, /* XSUM_XXH3_testdata[6414] */\n    { 3207, 0x9E3779B185EBCA8DULL, 0x514CF2CF2CBC93D1ULL }, /* XSUM_XXH3_testdata[6415] */\n    { 3208, 0x0000000000000000ULL, 0x8A7438A43529C222ULL }, /* XSUM_XXH3_testdata[6416] */\n    { 3208, 0x9E3779B185EBCA8DULL, 0x1A227D3389B55505ULL }, /* XSUM_XXH3_testdata[6417] */\n    { 3209, 0x0000000000000000ULL, 0x50DD979D54711E20ULL }, /* XSUM_XXH3_testdata[6418] */\n    { 3209, 0x9E3779B185EBCA8DULL, 0xBB983FBA9B8D6000ULL }, /* XSUM_XXH3_testdata[6419] */\n    { 3210, 0x0000000000000000ULL, 0x327FD7CC0801A0E2ULL }, /* XSUM_XXH3_testdata[6420] */\n    { 3210, 0x9E3779B185EBCA8DULL, 0xDC5196C9020C217CULL }, /* XSUM_XXH3_testdata[6421] */\n    { 3211, 0x0000000000000000ULL, 0x39E068DB5A6B02DBULL }, /* XSUM_XXH3_testdata[6422] */\n    { 3211, 0x9E3779B185EBCA8DULL, 0x75D4E560E34F1106ULL }, /* XSUM_XXH3_testdata[6423] */\n    { 3212, 0x0000000000000000ULL, 0x29A0143EDE45AEE1ULL }, /* XSUM_XXH3_testdata[6424] */\n    { 3212, 0x9E3779B185EBCA8DULL, 0xAF25DF4AAFEDF21AULL }, /* XSUM_XXH3_testdata[6425] */\n    { 3213, 0x0000000000000000ULL, 0x6343015E343C3D4FULL }, /* XSUM_XXH3_testdata[6426] */\n    { 3213, 0x9E3779B185EBCA8DULL, 0xB9664745FCAE35F9ULL }, /* XSUM_XXH3_testdata[6427] */\n    { 3214, 0x0000000000000000ULL, 0xE3463CBC2B13D590ULL }, /* XSUM_XXH3_testdata[6428] */\n    { 3214, 0x9E3779B185EBCA8DULL, 0xBFAE251499EA61C6ULL }, /* XSUM_XXH3_testdata[6429] */\n    { 3215, 0x0000000000000000ULL, 0xDA53BAC60D4D22FBULL }, /* XSUM_XXH3_testdata[6430] */\n    { 3215, 0x9E3779B185EBCA8DULL, 0xC330B390CBBB2745ULL }, /* XSUM_XXH3_testdata[6431] */\n    { 3216, 0x0000000000000000ULL, 0x33733C1897345AFEULL }, /* XSUM_XXH3_testdata[6432] */\n    { 3216, 0x9E3779B185EBCA8DULL, 0x8CC5892CC7A8149CULL }, /* XSUM_XXH3_testdata[6433] */\n    { 3217, 0x0000000000000000ULL, 0x1BCB0445A3CB7848ULL }, /* XSUM_XXH3_testdata[6434] */\n    { 3217, 0x9E3779B185EBCA8DULL, 0xB605E36385A53084ULL }, /* XSUM_XXH3_testdata[6435] */\n    { 3218, 0x0000000000000000ULL, 0xCB1AC0AA280D7940ULL }, /* XSUM_XXH3_testdata[6436] */\n    { 3218, 0x9E3779B185EBCA8DULL, 0x48A71403DDA6AA2AULL }, /* XSUM_XXH3_testdata[6437] */\n    { 3219, 0x0000000000000000ULL, 0x198618AAF11FD491ULL }, /* XSUM_XXH3_testdata[6438] */\n    { 3219, 0x9E3779B185EBCA8DULL, 0x3DE97BF2A3C67501ULL }, /* XSUM_XXH3_testdata[6439] */\n    { 3220, 0x0000000000000000ULL, 0xF3FF97A90BAAB6D2ULL }, /* XSUM_XXH3_testdata[6440] */\n    { 3220, 0x9E3779B185EBCA8DULL, 0xF99AC95EC5B45504ULL }, /* XSUM_XXH3_testdata[6441] */\n    { 3221, 0x0000000000000000ULL, 0x1C7A0A7A246C04EAULL }, /* XSUM_XXH3_testdata[6442] */\n    { 3221, 0x9E3779B185EBCA8DULL, 0xE76310623B1F8C4BULL }, /* XSUM_XXH3_testdata[6443] */\n    { 3222, 0x0000000000000000ULL, 0xA988BA83C7D83F50ULL }, /* XSUM_XXH3_testdata[6444] */\n    { 3222, 0x9E3779B185EBCA8DULL, 0x9439184E103217FDULL }, /* XSUM_XXH3_testdata[6445] */\n    { 3223, 0x0000000000000000ULL, 0x8F522D070E6B88CEULL }, /* XSUM_XXH3_testdata[6446] */\n    { 3223, 0x9E3779B185EBCA8DULL, 0xEA27D437295C59CEULL }, /* XSUM_XXH3_testdata[6447] */\n    { 3224, 0x0000000000000000ULL, 0xD02006011364318CULL }, /* XSUM_XXH3_testdata[6448] */\n    { 3224, 0x9E3779B185EBCA8DULL, 0xA62255EA71CE8F03ULL }, /* XSUM_XXH3_testdata[6449] */\n    { 3225, 0x0000000000000000ULL, 0xA0950D4312443264ULL }, /* XSUM_XXH3_testdata[6450] */\n    { 3225, 0x9E3779B185EBCA8DULL, 0xA388B1738E4DCE26ULL }, /* XSUM_XXH3_testdata[6451] */\n    { 3226, 0x0000000000000000ULL, 0x924AAF6E6E149E4BULL }, /* XSUM_XXH3_testdata[6452] */\n    { 3226, 0x9E3779B185EBCA8DULL, 0x3E205BEF5C51CBE5ULL }, /* XSUM_XXH3_testdata[6453] */\n    { 3227, 0x0000000000000000ULL, 0x7B79F55D2FCBCC2CULL }, /* XSUM_XXH3_testdata[6454] */\n    { 3227, 0x9E3779B185EBCA8DULL, 0xC967B942DE4F6B41ULL }, /* XSUM_XXH3_testdata[6455] */\n    { 3228, 0x0000000000000000ULL, 0x55A51FAB12C21F43ULL }, /* XSUM_XXH3_testdata[6456] */\n    { 3228, 0x9E3779B185EBCA8DULL, 0xA555BDC2254BB1A2ULL }, /* XSUM_XXH3_testdata[6457] */\n    { 3229, 0x0000000000000000ULL, 0x297D5667C2932EA7ULL }, /* XSUM_XXH3_testdata[6458] */\n    { 3229, 0x9E3779B185EBCA8DULL, 0x2E419470FD93628EULL }, /* XSUM_XXH3_testdata[6459] */\n    { 3230, 0x0000000000000000ULL, 0x348E764CE266D3A4ULL }, /* XSUM_XXH3_testdata[6460] */\n    { 3230, 0x9E3779B185EBCA8DULL, 0xBC4D6463962C0C16ULL }, /* XSUM_XXH3_testdata[6461] */\n    { 3231, 0x0000000000000000ULL, 0xF7DEAE36D4A13F7BULL }, /* XSUM_XXH3_testdata[6462] */\n    { 3231, 0x9E3779B185EBCA8DULL, 0x3AEF51CFBFBCFC23ULL }, /* XSUM_XXH3_testdata[6463] */\n    { 3232, 0x0000000000000000ULL, 0xAB1DA87080C2C0C9ULL }, /* XSUM_XXH3_testdata[6464] */\n    { 3232, 0x9E3779B185EBCA8DULL, 0x7888A6FC9DC02F45ULL }, /* XSUM_XXH3_testdata[6465] */\n    { 3233, 0x0000000000000000ULL, 0x28F2070C54DDE886ULL }, /* XSUM_XXH3_testdata[6466] */\n    { 3233, 0x9E3779B185EBCA8DULL, 0x518A60E025B9C80EULL }, /* XSUM_XXH3_testdata[6467] */\n    { 3234, 0x0000000000000000ULL, 0x5E1FA7815D4E3ADAULL }, /* XSUM_XXH3_testdata[6468] */\n    { 3234, 0x9E3779B185EBCA8DULL, 0x3FE12BF0DB2C4466ULL }, /* XSUM_XXH3_testdata[6469] */\n    { 3235, 0x0000000000000000ULL, 0x5981A86021DC4747ULL }, /* XSUM_XXH3_testdata[6470] */\n    { 3235, 0x9E3779B185EBCA8DULL, 0xE5E102BCAF8AE325ULL }, /* XSUM_XXH3_testdata[6471] */\n    { 3236, 0x0000000000000000ULL, 0xE859E6D7B3DBEDC1ULL }, /* XSUM_XXH3_testdata[6472] */\n    { 3236, 0x9E3779B185EBCA8DULL, 0x0AA3AF2339430811ULL }, /* XSUM_XXH3_testdata[6473] */\n    { 3237, 0x0000000000000000ULL, 0x8BF0287F66CF1B7DULL }, /* XSUM_XXH3_testdata[6474] */\n    { 3237, 0x9E3779B185EBCA8DULL, 0x2759B8065D0F6FAAULL }, /* XSUM_XXH3_testdata[6475] */\n    { 3238, 0x0000000000000000ULL, 0xF41F7674BB560D40ULL }, /* XSUM_XXH3_testdata[6476] */\n    { 3238, 0x9E3779B185EBCA8DULL, 0x1B20B5D920F3298CULL }, /* XSUM_XXH3_testdata[6477] */\n    { 3239, 0x0000000000000000ULL, 0xD3704CEE911EFC0DULL }, /* XSUM_XXH3_testdata[6478] */\n    { 3239, 0x9E3779B185EBCA8DULL, 0xEB835F6123188D7CULL }, /* XSUM_XXH3_testdata[6479] */\n    { 3240, 0x0000000000000000ULL, 0x57AF8FC2E141FE9FULL }, /* XSUM_XXH3_testdata[6480] */\n    { 3240, 0x9E3779B185EBCA8DULL, 0xF461FF724877E97FULL }, /* XSUM_XXH3_testdata[6481] */\n    { 3241, 0x0000000000000000ULL, 0x2FF3C47F857C7F56ULL }, /* XSUM_XXH3_testdata[6482] */\n    { 3241, 0x9E3779B185EBCA8DULL, 0x3394AA51E8E71D51ULL }, /* XSUM_XXH3_testdata[6483] */\n    { 3242, 0x0000000000000000ULL, 0xCD86E6710567AB9DULL }, /* XSUM_XXH3_testdata[6484] */\n    { 3242, 0x9E3779B185EBCA8DULL, 0x7AFCEB3D05B3F086ULL }, /* XSUM_XXH3_testdata[6485] */\n    { 3243, 0x0000000000000000ULL, 0x3ECD3DFB69A5A02FULL }, /* XSUM_XXH3_testdata[6486] */\n    { 3243, 0x9E3779B185EBCA8DULL, 0x11A366BFBA1B1FF6ULL }, /* XSUM_XXH3_testdata[6487] */\n    { 3244, 0x0000000000000000ULL, 0xC1836275539BBF33ULL }, /* XSUM_XXH3_testdata[6488] */\n    { 3244, 0x9E3779B185EBCA8DULL, 0x0913E9453F9040C3ULL }, /* XSUM_XXH3_testdata[6489] */\n    { 3245, 0x0000000000000000ULL, 0x7883530DE619F0BBULL }, /* XSUM_XXH3_testdata[6490] */\n    { 3245, 0x9E3779B185EBCA8DULL, 0xA8168205780B81D7ULL }, /* XSUM_XXH3_testdata[6491] */\n    { 3246, 0x0000000000000000ULL, 0x961D9ABC9110663CULL }, /* XSUM_XXH3_testdata[6492] */\n    { 3246, 0x9E3779B185EBCA8DULL, 0xC8044D5074ECEEA6ULL }, /* XSUM_XXH3_testdata[6493] */\n    { 3247, 0x0000000000000000ULL, 0xF1A4528F93427127ULL }, /* XSUM_XXH3_testdata[6494] */\n    { 3247, 0x9E3779B185EBCA8DULL, 0x595C2D7A7E8CC7D3ULL }, /* XSUM_XXH3_testdata[6495] */\n    { 3248, 0x0000000000000000ULL, 0x48B294E4222613AEULL }, /* XSUM_XXH3_testdata[6496] */\n    { 3248, 0x9E3779B185EBCA8DULL, 0x1C85BEBE8EC3E10AULL }, /* XSUM_XXH3_testdata[6497] */\n    { 3249, 0x0000000000000000ULL, 0x0B9195B0554CB009ULL }, /* XSUM_XXH3_testdata[6498] */\n    { 3249, 0x9E3779B185EBCA8DULL, 0xFB5E602F3FF2A4FAULL }, /* XSUM_XXH3_testdata[6499] */\n    { 3250, 0x0000000000000000ULL, 0x2BF68FE7F6AFE161ULL }, /* XSUM_XXH3_testdata[6500] */\n    { 3250, 0x9E3779B185EBCA8DULL, 0x6F697117A9DD8EF4ULL }, /* XSUM_XXH3_testdata[6501] */\n    { 3251, 0x0000000000000000ULL, 0x9D8C951C965C65D9ULL }, /* XSUM_XXH3_testdata[6502] */\n    { 3251, 0x9E3779B185EBCA8DULL, 0x25FC40DFE962BA9BULL }, /* XSUM_XXH3_testdata[6503] */\n    { 3252, 0x0000000000000000ULL, 0x636813F1D275647DULL }, /* XSUM_XXH3_testdata[6504] */\n    { 3252, 0x9E3779B185EBCA8DULL, 0xC16AC4E59B00949AULL }, /* XSUM_XXH3_testdata[6505] */\n    { 3253, 0x0000000000000000ULL, 0x79168EB9963AE95DULL }, /* XSUM_XXH3_testdata[6506] */\n    { 3253, 0x9E3779B185EBCA8DULL, 0x2B86B765967A725CULL }, /* XSUM_XXH3_testdata[6507] */\n    { 3254, 0x0000000000000000ULL, 0x4418D7EDCCA192CEULL }, /* XSUM_XXH3_testdata[6508] */\n    { 3254, 0x9E3779B185EBCA8DULL, 0xEADE7CC58ACD41E4ULL }, /* XSUM_XXH3_testdata[6509] */\n    { 3255, 0x0000000000000000ULL, 0xA440E3AD2D93FAB4ULL }, /* XSUM_XXH3_testdata[6510] */\n    { 3255, 0x9E3779B185EBCA8DULL, 0x16AFC580F8754A16ULL }, /* XSUM_XXH3_testdata[6511] */\n    { 3256, 0x0000000000000000ULL, 0x6EE7EF3CBF414EC5ULL }, /* XSUM_XXH3_testdata[6512] */\n    { 3256, 0x9E3779B185EBCA8DULL, 0x78D2D7BEC6CBE2A8ULL }, /* XSUM_XXH3_testdata[6513] */\n    { 3257, 0x0000000000000000ULL, 0xED2C0FE9F32BB2A8ULL }, /* XSUM_XXH3_testdata[6514] */\n    { 3257, 0x9E3779B185EBCA8DULL, 0x1FFC8441658EA638ULL }, /* XSUM_XXH3_testdata[6515] */\n    { 3258, 0x0000000000000000ULL, 0x7B47DC76E070E20FULL }, /* XSUM_XXH3_testdata[6516] */\n    { 3258, 0x9E3779B185EBCA8DULL, 0x746E32A296FC4368ULL }, /* XSUM_XXH3_testdata[6517] */\n    { 3259, 0x0000000000000000ULL, 0x91BA511409D2A7FAULL }, /* XSUM_XXH3_testdata[6518] */\n    { 3259, 0x9E3779B185EBCA8DULL, 0xE82A453ED103E49FULL }, /* XSUM_XXH3_testdata[6519] */\n    { 3260, 0x0000000000000000ULL, 0x8B401BB0AE7FE563ULL }, /* XSUM_XXH3_testdata[6520] */\n    { 3260, 0x9E3779B185EBCA8DULL, 0x2BD046201CE8C118ULL }, /* XSUM_XXH3_testdata[6521] */\n    { 3261, 0x0000000000000000ULL, 0x566A5A0C036794E6ULL }, /* XSUM_XXH3_testdata[6522] */\n    { 3261, 0x9E3779B185EBCA8DULL, 0x17B908EC0C3CE7BBULL }, /* XSUM_XXH3_testdata[6523] */\n    { 3262, 0x0000000000000000ULL, 0x1C013FA650289828ULL }, /* XSUM_XXH3_testdata[6524] */\n    { 3262, 0x9E3779B185EBCA8DULL, 0xD70F5E0594269646ULL }, /* XSUM_XXH3_testdata[6525] */\n    { 3263, 0x0000000000000000ULL, 0x5646399424235FFBULL }, /* XSUM_XXH3_testdata[6526] */\n    { 3263, 0x9E3779B185EBCA8DULL, 0x742383EE12CED5F1ULL }, /* XSUM_XXH3_testdata[6527] */\n    { 3264, 0x0000000000000000ULL, 0x9B8739702F078EAEULL }, /* XSUM_XXH3_testdata[6528] */\n    { 3264, 0x9E3779B185EBCA8DULL, 0x184E648FBA928D2CULL }, /* XSUM_XXH3_testdata[6529] */\n    { 3265, 0x0000000000000000ULL, 0x0EC956D8FE806B22ULL }, /* XSUM_XXH3_testdata[6530] */\n    { 3265, 0x9E3779B185EBCA8DULL, 0x3CAAE786AAFE1AF7ULL }, /* XSUM_XXH3_testdata[6531] */\n    { 3266, 0x0000000000000000ULL, 0x0A06674EBA2293F8ULL }, /* XSUM_XXH3_testdata[6532] */\n    { 3266, 0x9E3779B185EBCA8DULL, 0xBE2884F3D07394B1ULL }, /* XSUM_XXH3_testdata[6533] */\n    { 3267, 0x0000000000000000ULL, 0x2F6DFF8AD0994EADULL }, /* XSUM_XXH3_testdata[6534] */\n    { 3267, 0x9E3779B185EBCA8DULL, 0x6C4D1AB2AFA02DEAULL }, /* XSUM_XXH3_testdata[6535] */\n    { 3268, 0x0000000000000000ULL, 0x0D3D26B243410F6CULL }, /* XSUM_XXH3_testdata[6536] */\n    { 3268, 0x9E3779B185EBCA8DULL, 0x57C056432DD87495ULL }, /* XSUM_XXH3_testdata[6537] */\n    { 3269, 0x0000000000000000ULL, 0x237DD207AFF853D8ULL }, /* XSUM_XXH3_testdata[6538] */\n    { 3269, 0x9E3779B185EBCA8DULL, 0xE8AFB4AA2B702614ULL }, /* XSUM_XXH3_testdata[6539] */\n    { 3270, 0x0000000000000000ULL, 0x3F49BF7883FED811ULL }, /* XSUM_XXH3_testdata[6540] */\n    { 3270, 0x9E3779B185EBCA8DULL, 0x1C05DE58EC169FD6ULL }, /* XSUM_XXH3_testdata[6541] */\n    { 3271, 0x0000000000000000ULL, 0xC48D63F39B62F523ULL }, /* XSUM_XXH3_testdata[6542] */\n    { 3271, 0x9E3779B185EBCA8DULL, 0x7CEE441E3B41E236ULL }, /* XSUM_XXH3_testdata[6543] */\n    { 3272, 0x0000000000000000ULL, 0xE585B402C5B27728ULL }, /* XSUM_XXH3_testdata[6544] */\n    { 3272, 0x9E3779B185EBCA8DULL, 0x75335CFF84A6D040ULL }, /* XSUM_XXH3_testdata[6545] */\n    { 3273, 0x0000000000000000ULL, 0x17408941AA9636EDULL }, /* XSUM_XXH3_testdata[6546] */\n    { 3273, 0x9E3779B185EBCA8DULL, 0xB34CAA8293B0E8D8ULL }, /* XSUM_XXH3_testdata[6547] */\n    { 3274, 0x0000000000000000ULL, 0x4C1BFB3D06B5B19DULL }, /* XSUM_XXH3_testdata[6548] */\n    { 3274, 0x9E3779B185EBCA8DULL, 0x402C85067D5CFD99ULL }, /* XSUM_XXH3_testdata[6549] */\n    { 3275, 0x0000000000000000ULL, 0x7D07873053C9F239ULL }, /* XSUM_XXH3_testdata[6550] */\n    { 3275, 0x9E3779B185EBCA8DULL, 0xFE7CD26D019C5854ULL }, /* XSUM_XXH3_testdata[6551] */\n    { 3276, 0x0000000000000000ULL, 0x3AE4B482DAE90651ULL }, /* XSUM_XXH3_testdata[6552] */\n    { 3276, 0x9E3779B185EBCA8DULL, 0xD0773C5CD881FD75ULL }, /* XSUM_XXH3_testdata[6553] */\n    { 3277, 0x0000000000000000ULL, 0xB158E4DF2C1A8793ULL }, /* XSUM_XXH3_testdata[6554] */\n    { 3277, 0x9E3779B185EBCA8DULL, 0x685E3DC975295240ULL }, /* XSUM_XXH3_testdata[6555] */\n    { 3278, 0x0000000000000000ULL, 0x6A46EA0EF200F7CEULL }, /* XSUM_XXH3_testdata[6556] */\n    { 3278, 0x9E3779B185EBCA8DULL, 0x1A43B1238C6B6508ULL }, /* XSUM_XXH3_testdata[6557] */\n    { 3279, 0x0000000000000000ULL, 0xE43A423E305A8565ULL }, /* XSUM_XXH3_testdata[6558] */\n    { 3279, 0x9E3779B185EBCA8DULL, 0x8686418BF152D4DCULL }, /* XSUM_XXH3_testdata[6559] */\n    { 3280, 0x0000000000000000ULL, 0x290CA8866A12AFFEULL }, /* XSUM_XXH3_testdata[6560] */\n    { 3280, 0x9E3779B185EBCA8DULL, 0x6ACBB86F60374CF8ULL }, /* XSUM_XXH3_testdata[6561] */\n    { 3281, 0x0000000000000000ULL, 0x8DBD8B41922B5078ULL }, /* XSUM_XXH3_testdata[6562] */\n    { 3281, 0x9E3779B185EBCA8DULL, 0xFF09DEC6A3C20841ULL }, /* XSUM_XXH3_testdata[6563] */\n    { 3282, 0x0000000000000000ULL, 0xEE787FB6216E6011ULL }, /* XSUM_XXH3_testdata[6564] */\n    { 3282, 0x9E3779B185EBCA8DULL, 0x98E9EE8F5070942CULL }, /* XSUM_XXH3_testdata[6565] */\n    { 3283, 0x0000000000000000ULL, 0x953C27BDFDECF124ULL }, /* XSUM_XXH3_testdata[6566] */\n    { 3283, 0x9E3779B185EBCA8DULL, 0x10AC6D3D9DC372B2ULL }, /* XSUM_XXH3_testdata[6567] */\n    { 3284, 0x0000000000000000ULL, 0xE4234E6A0823E382ULL }, /* XSUM_XXH3_testdata[6568] */\n    { 3284, 0x9E3779B185EBCA8DULL, 0x8BA7CE4934FEB2E1ULL }, /* XSUM_XXH3_testdata[6569] */\n    { 3285, 0x0000000000000000ULL, 0x5C403AC86FC535BCULL }, /* XSUM_XXH3_testdata[6570] */\n    { 3285, 0x9E3779B185EBCA8DULL, 0x154C0CFAA9CCFD75ULL }, /* XSUM_XXH3_testdata[6571] */\n    { 3286, 0x0000000000000000ULL, 0xA429912EB2E28218ULL }, /* XSUM_XXH3_testdata[6572] */\n    { 3286, 0x9E3779B185EBCA8DULL, 0x72C6B7BD2A454604ULL }, /* XSUM_XXH3_testdata[6573] */\n    { 3287, 0x0000000000000000ULL, 0x9C06DC9435498F37ULL }, /* XSUM_XXH3_testdata[6574] */\n    { 3287, 0x9E3779B185EBCA8DULL, 0xC725960C2DE40EB7ULL }, /* XSUM_XXH3_testdata[6575] */\n    { 3288, 0x0000000000000000ULL, 0xFDC4819EF73EED40ULL }, /* XSUM_XXH3_testdata[6576] */\n    { 3288, 0x9E3779B185EBCA8DULL, 0x08F29DF35BB2DAE7ULL }, /* XSUM_XXH3_testdata[6577] */\n    { 3289, 0x0000000000000000ULL, 0xD5055BB66A0D37BBULL }, /* XSUM_XXH3_testdata[6578] */\n    { 3289, 0x9E3779B185EBCA8DULL, 0x19D5799BECE479F4ULL }, /* XSUM_XXH3_testdata[6579] */\n    { 3290, 0x0000000000000000ULL, 0x07382BB2BF607897ULL }, /* XSUM_XXH3_testdata[6580] */\n    { 3290, 0x9E3779B185EBCA8DULL, 0x0256F5995038CD26ULL }, /* XSUM_XXH3_testdata[6581] */\n    { 3291, 0x0000000000000000ULL, 0x22A55154436863B3ULL }, /* XSUM_XXH3_testdata[6582] */\n    { 3291, 0x9E3779B185EBCA8DULL, 0x404FE5667BAD1D13ULL }, /* XSUM_XXH3_testdata[6583] */\n    { 3292, 0x0000000000000000ULL, 0x8C92B6C0DBCE279EULL }, /* XSUM_XXH3_testdata[6584] */\n    { 3292, 0x9E3779B185EBCA8DULL, 0x2783832554DCF35FULL }, /* XSUM_XXH3_testdata[6585] */\n    { 3293, 0x0000000000000000ULL, 0x116C41EB4A23AC65ULL }, /* XSUM_XXH3_testdata[6586] */\n    { 3293, 0x9E3779B185EBCA8DULL, 0xD1F55F5515EA8C61ULL }, /* XSUM_XXH3_testdata[6587] */\n    { 3294, 0x0000000000000000ULL, 0xAC933622B1150321ULL }, /* XSUM_XXH3_testdata[6588] */\n    { 3294, 0x9E3779B185EBCA8DULL, 0xEFAEFE35789602DBULL }, /* XSUM_XXH3_testdata[6589] */\n    { 3295, 0x0000000000000000ULL, 0xBA6BB073CCE8DA46ULL }, /* XSUM_XXH3_testdata[6590] */\n    { 3295, 0x9E3779B185EBCA8DULL, 0xE2AD5B19AA401D1DULL }, /* XSUM_XXH3_testdata[6591] */\n    { 3296, 0x0000000000000000ULL, 0x3E897823507028D7ULL }, /* XSUM_XXH3_testdata[6592] */\n    { 3296, 0x9E3779B185EBCA8DULL, 0x6A143760E53496E1ULL }, /* XSUM_XXH3_testdata[6593] */\n    { 3297, 0x0000000000000000ULL, 0x09D42D669748D197ULL }, /* XSUM_XXH3_testdata[6594] */\n    { 3297, 0x9E3779B185EBCA8DULL, 0x20C2A979B1E7F622ULL }, /* XSUM_XXH3_testdata[6595] */\n    { 3298, 0x0000000000000000ULL, 0x68089737D023D610ULL }, /* XSUM_XXH3_testdata[6596] */\n    { 3298, 0x9E3779B185EBCA8DULL, 0x2FB5B00F9E1212C5ULL }, /* XSUM_XXH3_testdata[6597] */\n    { 3299, 0x0000000000000000ULL, 0x8726F55958B56B92ULL }, /* XSUM_XXH3_testdata[6598] */\n    { 3299, 0x9E3779B185EBCA8DULL, 0x558F3C38C9C7CBA8ULL }, /* XSUM_XXH3_testdata[6599] */\n    { 3300, 0x0000000000000000ULL, 0xFAB28032690FEE15ULL }, /* XSUM_XXH3_testdata[6600] */\n    { 3300, 0x9E3779B185EBCA8DULL, 0xCBF7403183AFC3BCULL }, /* XSUM_XXH3_testdata[6601] */\n    { 3301, 0x0000000000000000ULL, 0x4F06D3E08E04F544ULL }, /* XSUM_XXH3_testdata[6602] */\n    { 3301, 0x9E3779B185EBCA8DULL, 0xE5A8DCF9100C42D7ULL }, /* XSUM_XXH3_testdata[6603] */\n    { 3302, 0x0000000000000000ULL, 0x2F332C59D43FED19ULL }, /* XSUM_XXH3_testdata[6604] */\n    { 3302, 0x9E3779B185EBCA8DULL, 0x3A810A8B75CD3F70ULL }, /* XSUM_XXH3_testdata[6605] */\n    { 3303, 0x0000000000000000ULL, 0x830F21FF5337560EULL }, /* XSUM_XXH3_testdata[6606] */\n    { 3303, 0x9E3779B185EBCA8DULL, 0x45F7FBFBEE62E831ULL }, /* XSUM_XXH3_testdata[6607] */\n    { 3304, 0x0000000000000000ULL, 0xAB744FA69344997EULL }, /* XSUM_XXH3_testdata[6608] */\n    { 3304, 0x9E3779B185EBCA8DULL, 0xEC87E96EB9AA48BAULL }, /* XSUM_XXH3_testdata[6609] */\n    { 3305, 0x0000000000000000ULL, 0xD1FEAFB0C097B189ULL }, /* XSUM_XXH3_testdata[6610] */\n    { 3305, 0x9E3779B185EBCA8DULL, 0xC55659615D737704ULL }, /* XSUM_XXH3_testdata[6611] */\n    { 3306, 0x0000000000000000ULL, 0x85D7E7704DDA2F90ULL }, /* XSUM_XXH3_testdata[6612] */\n    { 3306, 0x9E3779B185EBCA8DULL, 0x9CFF0E41C30D3959ULL }, /* XSUM_XXH3_testdata[6613] */\n    { 3307, 0x0000000000000000ULL, 0xD4904AEFED3EDC1AULL }, /* XSUM_XXH3_testdata[6614] */\n    { 3307, 0x9E3779B185EBCA8DULL, 0xC7A984C32605B8ABULL }, /* XSUM_XXH3_testdata[6615] */\n    { 3308, 0x0000000000000000ULL, 0x78AB5906A8635550ULL }, /* XSUM_XXH3_testdata[6616] */\n    { 3308, 0x9E3779B185EBCA8DULL, 0x279FD3B95866FCF0ULL }, /* XSUM_XXH3_testdata[6617] */\n    { 3309, 0x0000000000000000ULL, 0x43F13CAD6A0C80EFULL }, /* XSUM_XXH3_testdata[6618] */\n    { 3309, 0x9E3779B185EBCA8DULL, 0x843065019A02EBE3ULL }, /* XSUM_XXH3_testdata[6619] */\n    { 3310, 0x0000000000000000ULL, 0xBC07FC109DF9428EULL }, /* XSUM_XXH3_testdata[6620] */\n    { 3310, 0x9E3779B185EBCA8DULL, 0xC52F7E06B2709FE6ULL }, /* XSUM_XXH3_testdata[6621] */\n    { 3311, 0x0000000000000000ULL, 0x2EED7825B3318277ULL }, /* XSUM_XXH3_testdata[6622] */\n    { 3311, 0x9E3779B185EBCA8DULL, 0xD4684FBB86410DC5ULL }, /* XSUM_XXH3_testdata[6623] */\n    { 3312, 0x0000000000000000ULL, 0x17AC8E090B8B0E1BULL }, /* XSUM_XXH3_testdata[6624] */\n    { 3312, 0x9E3779B185EBCA8DULL, 0xC42086CDDDEA61BCULL }, /* XSUM_XXH3_testdata[6625] */\n    { 3313, 0x0000000000000000ULL, 0x23F5784BBF9B1DF1ULL }, /* XSUM_XXH3_testdata[6626] */\n    { 3313, 0x9E3779B185EBCA8DULL, 0x3DA59CE11B907414ULL }, /* XSUM_XXH3_testdata[6627] */\n    { 3314, 0x0000000000000000ULL, 0x9695900D67CCD95EULL }, /* XSUM_XXH3_testdata[6628] */\n    { 3314, 0x9E3779B185EBCA8DULL, 0x1014606F1DD648A1ULL }, /* XSUM_XXH3_testdata[6629] */\n    { 3315, 0x0000000000000000ULL, 0x0C1C74544502BB15ULL }, /* XSUM_XXH3_testdata[6630] */\n    { 3315, 0x9E3779B185EBCA8DULL, 0x0583BE7443333A4DULL }, /* XSUM_XXH3_testdata[6631] */\n    { 3316, 0x0000000000000000ULL, 0x278D8FE0095296E4ULL }, /* XSUM_XXH3_testdata[6632] */\n    { 3316, 0x9E3779B185EBCA8DULL, 0xB1A0354E681F6578ULL }, /* XSUM_XXH3_testdata[6633] */\n    { 3317, 0x0000000000000000ULL, 0x02C89CFEDF3EC26DULL }, /* XSUM_XXH3_testdata[6634] */\n    { 3317, 0x9E3779B185EBCA8DULL, 0x9BFB13E995951D98ULL }, /* XSUM_XXH3_testdata[6635] */\n    { 3318, 0x0000000000000000ULL, 0xDC2FAA0D4B80D12BULL }, /* XSUM_XXH3_testdata[6636] */\n    { 3318, 0x9E3779B185EBCA8DULL, 0xCCD4BFFE0B66ECC7ULL }, /* XSUM_XXH3_testdata[6637] */\n    { 3319, 0x0000000000000000ULL, 0xFCCD4EB901FE69BEULL }, /* XSUM_XXH3_testdata[6638] */\n    { 3319, 0x9E3779B185EBCA8DULL, 0x1FFD3A5E3CB95033ULL }, /* XSUM_XXH3_testdata[6639] */\n    { 3320, 0x0000000000000000ULL, 0x0CAD253666032FD6ULL }, /* XSUM_XXH3_testdata[6640] */\n    { 3320, 0x9E3779B185EBCA8DULL, 0xDBAD1A09D40AFD8EULL }, /* XSUM_XXH3_testdata[6641] */\n    { 3321, 0x0000000000000000ULL, 0xE97362BD28AADE28ULL }, /* XSUM_XXH3_testdata[6642] */\n    { 3321, 0x9E3779B185EBCA8DULL, 0x6A1A5A4876C9ED06ULL }, /* XSUM_XXH3_testdata[6643] */\n    { 3322, 0x0000000000000000ULL, 0xE582F38E9D03E630ULL }, /* XSUM_XXH3_testdata[6644] */\n    { 3322, 0x9E3779B185EBCA8DULL, 0x9B1951C099D93D9BULL }, /* XSUM_XXH3_testdata[6645] */\n    { 3323, 0x0000000000000000ULL, 0x9BABE22F9703E396ULL }, /* XSUM_XXH3_testdata[6646] */\n    { 3323, 0x9E3779B185EBCA8DULL, 0x7266AE275DEB3628ULL }, /* XSUM_XXH3_testdata[6647] */\n    { 3324, 0x0000000000000000ULL, 0x5CD985B664FBDBAFULL }, /* XSUM_XXH3_testdata[6648] */\n    { 3324, 0x9E3779B185EBCA8DULL, 0x40DEA3B6DA6AF66DULL }, /* XSUM_XXH3_testdata[6649] */\n    { 3325, 0x0000000000000000ULL, 0xB5F91FFDCF207925ULL }, /* XSUM_XXH3_testdata[6650] */\n    { 3325, 0x9E3779B185EBCA8DULL, 0xD4343DD1B8076D6EULL }, /* XSUM_XXH3_testdata[6651] */\n    { 3326, 0x0000000000000000ULL, 0x01ADD999619CBD9FULL }, /* XSUM_XXH3_testdata[6652] */\n    { 3326, 0x9E3779B185EBCA8DULL, 0x2C5A15142FEC2FD8ULL }, /* XSUM_XXH3_testdata[6653] */\n    { 3327, 0x0000000000000000ULL, 0x08011836C094CA6BULL }, /* XSUM_XXH3_testdata[6654] */\n    { 3327, 0x9E3779B185EBCA8DULL, 0xA5CAE26D8B91D68DULL }, /* XSUM_XXH3_testdata[6655] */\n    { 3328, 0x0000000000000000ULL, 0xBA4A5091A9EEEBB5ULL }, /* XSUM_XXH3_testdata[6656] */\n    { 3328, 0x9E3779B185EBCA8DULL, 0xB13BEA7A298FB067ULL }, /* XSUM_XXH3_testdata[6657] */\n    { 3329, 0x0000000000000000ULL, 0x50D1FDCB976BE957ULL }, /* XSUM_XXH3_testdata[6658] */\n    { 3329, 0x9E3779B185EBCA8DULL, 0x7559494E41899903ULL }, /* XSUM_XXH3_testdata[6659] */\n    { 3330, 0x0000000000000000ULL, 0x75107DA44865BEB5ULL }, /* XSUM_XXH3_testdata[6660] */\n    { 3330, 0x9E3779B185EBCA8DULL, 0x5AAE1D66586FFDA2ULL }, /* XSUM_XXH3_testdata[6661] */\n    { 3331, 0x0000000000000000ULL, 0xAF58DBE70F0E263DULL }, /* XSUM_XXH3_testdata[6662] */\n    { 3331, 0x9E3779B185EBCA8DULL, 0x14692C98F9DAD48EULL }, /* XSUM_XXH3_testdata[6663] */\n    { 3332, 0x0000000000000000ULL, 0x6F617384900EEF25ULL }, /* XSUM_XXH3_testdata[6664] */\n    { 3332, 0x9E3779B185EBCA8DULL, 0x58B58C579F7E6D00ULL }, /* XSUM_XXH3_testdata[6665] */\n    { 3333, 0x0000000000000000ULL, 0x60C4155E452F5F87ULL }, /* XSUM_XXH3_testdata[6666] */\n    { 3333, 0x9E3779B185EBCA8DULL, 0xC96A96E04A3E849AULL }, /* XSUM_XXH3_testdata[6667] */\n    { 3334, 0x0000000000000000ULL, 0xBCAF54AB908B193DULL }, /* XSUM_XXH3_testdata[6668] */\n    { 3334, 0x9E3779B185EBCA8DULL, 0x54260454C2736A73ULL }, /* XSUM_XXH3_testdata[6669] */\n    { 3335, 0x0000000000000000ULL, 0xBBF027A0ADD25BBFULL }, /* XSUM_XXH3_testdata[6670] */\n    { 3335, 0x9E3779B185EBCA8DULL, 0x26E4D35633D2C8FDULL }, /* XSUM_XXH3_testdata[6671] */\n    { 3336, 0x0000000000000000ULL, 0xBB0ADB598F22AE91ULL }, /* XSUM_XXH3_testdata[6672] */\n    { 3336, 0x9E3779B185EBCA8DULL, 0xD90552E320AB9A00ULL }, /* XSUM_XXH3_testdata[6673] */\n    { 3337, 0x0000000000000000ULL, 0x02CFCE1529C38652ULL }, /* XSUM_XXH3_testdata[6674] */\n    { 3337, 0x9E3779B185EBCA8DULL, 0xCD6BA1C7A54511C5ULL }, /* XSUM_XXH3_testdata[6675] */\n    { 3338, 0x0000000000000000ULL, 0x13E3324E216C09F9ULL }, /* XSUM_XXH3_testdata[6676] */\n    { 3338, 0x9E3779B185EBCA8DULL, 0x312386F8BCB31407ULL }, /* XSUM_XXH3_testdata[6677] */\n    { 3339, 0x0000000000000000ULL, 0x29DA89CAA19A37FAULL }, /* XSUM_XXH3_testdata[6678] */\n    { 3339, 0x9E3779B185EBCA8DULL, 0x9485DED18A88C4AEULL }, /* XSUM_XXH3_testdata[6679] */\n    { 3340, 0x0000000000000000ULL, 0xA389A6247E5CB6F7ULL }, /* XSUM_XXH3_testdata[6680] */\n    { 3340, 0x9E3779B185EBCA8DULL, 0xEBF9E42F004427E0ULL }, /* XSUM_XXH3_testdata[6681] */\n    { 3341, 0x0000000000000000ULL, 0xD07406613E1B3E9CULL }, /* XSUM_XXH3_testdata[6682] */\n    { 3341, 0x9E3779B185EBCA8DULL, 0x872729C833153C1DULL }, /* XSUM_XXH3_testdata[6683] */\n    { 3342, 0x0000000000000000ULL, 0xC07FDF2155D4E7B6ULL }, /* XSUM_XXH3_testdata[6684] */\n    { 3342, 0x9E3779B185EBCA8DULL, 0x30679A03126AD5FDULL }, /* XSUM_XXH3_testdata[6685] */\n    { 3343, 0x0000000000000000ULL, 0x836CD924F0E9680CULL }, /* XSUM_XXH3_testdata[6686] */\n    { 3343, 0x9E3779B185EBCA8DULL, 0x776D5AAD3298CD2BULL }, /* XSUM_XXH3_testdata[6687] */\n    { 3344, 0x0000000000000000ULL, 0xC3956381E842E2DEULL }, /* XSUM_XXH3_testdata[6688] */\n    { 3344, 0x9E3779B185EBCA8DULL, 0x86C94661FF3B2BB8ULL }, /* XSUM_XXH3_testdata[6689] */\n    { 3345, 0x0000000000000000ULL, 0xB10484FA074AE206ULL }, /* XSUM_XXH3_testdata[6690] */\n    { 3345, 0x9E3779B185EBCA8DULL, 0x1C726988BBC91D6DULL }, /* XSUM_XXH3_testdata[6691] */\n    { 3346, 0x0000000000000000ULL, 0x3B608660818671B3ULL }, /* XSUM_XXH3_testdata[6692] */\n    { 3346, 0x9E3779B185EBCA8DULL, 0xF5CCFA1B960AF066ULL }, /* XSUM_XXH3_testdata[6693] */\n    { 3347, 0x0000000000000000ULL, 0x95FFFB7642F9E1EFULL }, /* XSUM_XXH3_testdata[6694] */\n    { 3347, 0x9E3779B185EBCA8DULL, 0xFE131ED5AD63D1B7ULL }, /* XSUM_XXH3_testdata[6695] */\n    { 3348, 0x0000000000000000ULL, 0x7869A6A32C26E54AULL }, /* XSUM_XXH3_testdata[6696] */\n    { 3348, 0x9E3779B185EBCA8DULL, 0x1E9C1E7CA1E6D5C1ULL }, /* XSUM_XXH3_testdata[6697] */\n    { 3349, 0x0000000000000000ULL, 0x51BDFE289C4066A9ULL }, /* XSUM_XXH3_testdata[6698] */\n    { 3349, 0x9E3779B185EBCA8DULL, 0xB7BE52394DE63E0EULL }, /* XSUM_XXH3_testdata[6699] */\n    { 3350, 0x0000000000000000ULL, 0xAA01801391E98925ULL }, /* XSUM_XXH3_testdata[6700] */\n    { 3350, 0x9E3779B185EBCA8DULL, 0x2E2A6D6E3F43CDB0ULL }, /* XSUM_XXH3_testdata[6701] */\n    { 3351, 0x0000000000000000ULL, 0xCF2A402353A99FE1ULL }, /* XSUM_XXH3_testdata[6702] */\n    { 3351, 0x9E3779B185EBCA8DULL, 0xAD52CCD11E3555DEULL }, /* XSUM_XXH3_testdata[6703] */\n    { 3352, 0x0000000000000000ULL, 0xB01D33C38F36DC5CULL }, /* XSUM_XXH3_testdata[6704] */\n    { 3352, 0x9E3779B185EBCA8DULL, 0x9E3FFE25B3EB2075ULL }, /* XSUM_XXH3_testdata[6705] */\n    { 3353, 0x0000000000000000ULL, 0x3FB85D3FFD9E06E8ULL }, /* XSUM_XXH3_testdata[6706] */\n    { 3353, 0x9E3779B185EBCA8DULL, 0xF27DEE2A8D630D4FULL }, /* XSUM_XXH3_testdata[6707] */\n    { 3354, 0x0000000000000000ULL, 0xC37FF70659119746ULL }, /* XSUM_XXH3_testdata[6708] */\n    { 3354, 0x9E3779B185EBCA8DULL, 0xEAF15F8417A1811FULL }, /* XSUM_XXH3_testdata[6709] */\n    { 3355, 0x0000000000000000ULL, 0xC5973EAD1F297A47ULL }, /* XSUM_XXH3_testdata[6710] */\n    { 3355, 0x9E3779B185EBCA8DULL, 0x054A37E362E960FFULL }, /* XSUM_XXH3_testdata[6711] */\n    { 3356, 0x0000000000000000ULL, 0x45132AD6742E601BULL }, /* XSUM_XXH3_testdata[6712] */\n    { 3356, 0x9E3779B185EBCA8DULL, 0xFF64C5779A13E1A8ULL }, /* XSUM_XXH3_testdata[6713] */\n    { 3357, 0x0000000000000000ULL, 0x4AD4D09228AE74EBULL }, /* XSUM_XXH3_testdata[6714] */\n    { 3357, 0x9E3779B185EBCA8DULL, 0xAB3C130407D8E34CULL }, /* XSUM_XXH3_testdata[6715] */\n    { 3358, 0x0000000000000000ULL, 0xBDE7F52D428B5626ULL }, /* XSUM_XXH3_testdata[6716] */\n    { 3358, 0x9E3779B185EBCA8DULL, 0x7FF63CE94956ABB8ULL }, /* XSUM_XXH3_testdata[6717] */\n    { 3359, 0x0000000000000000ULL, 0xFE2565182D1952EAULL }, /* XSUM_XXH3_testdata[6718] */\n    { 3359, 0x9E3779B185EBCA8DULL, 0x40A726019BC38DB4ULL }, /* XSUM_XXH3_testdata[6719] */\n    { 3360, 0x0000000000000000ULL, 0x4649D4969584C272ULL }, /* XSUM_XXH3_testdata[6720] */\n    { 3360, 0x9E3779B185EBCA8DULL, 0x29A9207541EEA68BULL }, /* XSUM_XXH3_testdata[6721] */\n    { 3361, 0x0000000000000000ULL, 0xD01EA1AB2CDC3528ULL }, /* XSUM_XXH3_testdata[6722] */\n    { 3361, 0x9E3779B185EBCA8DULL, 0xD92BA5B55FD6F780ULL }, /* XSUM_XXH3_testdata[6723] */\n    { 3362, 0x0000000000000000ULL, 0x070B61EF22A12393ULL }, /* XSUM_XXH3_testdata[6724] */\n    { 3362, 0x9E3779B185EBCA8DULL, 0xAB53607E21F191A9ULL }, /* XSUM_XXH3_testdata[6725] */\n    { 3363, 0x0000000000000000ULL, 0x4AE0136971A34E18ULL }, /* XSUM_XXH3_testdata[6726] */\n    { 3363, 0x9E3779B185EBCA8DULL, 0x004526D172BEC24BULL }, /* XSUM_XXH3_testdata[6727] */\n    { 3364, 0x0000000000000000ULL, 0x42A56637D7F0FA18ULL }, /* XSUM_XXH3_testdata[6728] */\n    { 3364, 0x9E3779B185EBCA8DULL, 0xA7C3097CF412264DULL }, /* XSUM_XXH3_testdata[6729] */\n    { 3365, 0x0000000000000000ULL, 0x21FE144D6968D4F2ULL }, /* XSUM_XXH3_testdata[6730] */\n    { 3365, 0x9E3779B185EBCA8DULL, 0xC4D1BE69C49EF35BULL }, /* XSUM_XXH3_testdata[6731] */\n    { 3366, 0x0000000000000000ULL, 0x12D77C635653B2B8ULL }, /* XSUM_XXH3_testdata[6732] */\n    { 3366, 0x9E3779B185EBCA8DULL, 0xB73F37C743862437ULL }, /* XSUM_XXH3_testdata[6733] */\n    { 3367, 0x0000000000000000ULL, 0x0752F2C4C8A25C1AULL }, /* XSUM_XXH3_testdata[6734] */\n    { 3367, 0x9E3779B185EBCA8DULL, 0xC983E99166B19B17ULL }, /* XSUM_XXH3_testdata[6735] */\n    { 3368, 0x0000000000000000ULL, 0x15AA8640193B2254ULL }, /* XSUM_XXH3_testdata[6736] */\n    { 3368, 0x9E3779B185EBCA8DULL, 0x53D54D74763AD4B2ULL }, /* XSUM_XXH3_testdata[6737] */\n    { 3369, 0x0000000000000000ULL, 0x3A2B1F7886668CC8ULL }, /* XSUM_XXH3_testdata[6738] */\n    { 3369, 0x9E3779B185EBCA8DULL, 0x5B0B2B5F227D1228ULL }, /* XSUM_XXH3_testdata[6739] */\n    { 3370, 0x0000000000000000ULL, 0x256280630F5EAFF2ULL }, /* XSUM_XXH3_testdata[6740] */\n    { 3370, 0x9E3779B185EBCA8DULL, 0xFD87C26C8883F638ULL }, /* XSUM_XXH3_testdata[6741] */\n    { 3371, 0x0000000000000000ULL, 0x8BC58F317FFE3E5AULL }, /* XSUM_XXH3_testdata[6742] */\n    { 3371, 0x9E3779B185EBCA8DULL, 0x724319694EDADAB3ULL }, /* XSUM_XXH3_testdata[6743] */\n    { 3372, 0x0000000000000000ULL, 0xB15A5B5D991811AFULL }, /* XSUM_XXH3_testdata[6744] */\n    { 3372, 0x9E3779B185EBCA8DULL, 0x11A111EE2A25D794ULL }, /* XSUM_XXH3_testdata[6745] */\n    { 3373, 0x0000000000000000ULL, 0xA07DF89EACE870B5ULL }, /* XSUM_XXH3_testdata[6746] */\n    { 3373, 0x9E3779B185EBCA8DULL, 0x575E9182CEFD992FULL }, /* XSUM_XXH3_testdata[6747] */\n    { 3374, 0x0000000000000000ULL, 0xF14876CD4E593F54ULL }, /* XSUM_XXH3_testdata[6748] */\n    { 3374, 0x9E3779B185EBCA8DULL, 0xD8E781A0A6F6D906ULL }, /* XSUM_XXH3_testdata[6749] */\n    { 3375, 0x0000000000000000ULL, 0x7566CE50C709787DULL }, /* XSUM_XXH3_testdata[6750] */\n    { 3375, 0x9E3779B185EBCA8DULL, 0xD41FF1B992AA75F9ULL }, /* XSUM_XXH3_testdata[6751] */\n    { 3376, 0x0000000000000000ULL, 0xD6BC865A0060E024ULL }, /* XSUM_XXH3_testdata[6752] */\n    { 3376, 0x9E3779B185EBCA8DULL, 0x6DBC027EE86B52F1ULL }, /* XSUM_XXH3_testdata[6753] */\n    { 3377, 0x0000000000000000ULL, 0x8852757DEF3F3AC7ULL }, /* XSUM_XXH3_testdata[6754] */\n    { 3377, 0x9E3779B185EBCA8DULL, 0x7CD92F439E03EBBBULL }, /* XSUM_XXH3_testdata[6755] */\n    { 3378, 0x0000000000000000ULL, 0x3CF6812DD0D09CB1ULL }, /* XSUM_XXH3_testdata[6756] */\n    { 3378, 0x9E3779B185EBCA8DULL, 0x626B10E13E9647AEULL }, /* XSUM_XXH3_testdata[6757] */\n    { 3379, 0x0000000000000000ULL, 0x5698A6D102F8C1F4ULL }, /* XSUM_XXH3_testdata[6758] */\n    { 3379, 0x9E3779B185EBCA8DULL, 0xA6E18A45A57807B6ULL }, /* XSUM_XXH3_testdata[6759] */\n    { 3380, 0x0000000000000000ULL, 0x96795C27D904C9CAULL }, /* XSUM_XXH3_testdata[6760] */\n    { 3380, 0x9E3779B185EBCA8DULL, 0x600BDE3FC41E808CULL }, /* XSUM_XXH3_testdata[6761] */\n    { 3381, 0x0000000000000000ULL, 0xF5EA6A3869DB8865ULL }, /* XSUM_XXH3_testdata[6762] */\n    { 3381, 0x9E3779B185EBCA8DULL, 0xF3386B856B7BF6B9ULL }, /* XSUM_XXH3_testdata[6763] */\n    { 3382, 0x0000000000000000ULL, 0x3E356A6CB2C2273CULL }, /* XSUM_XXH3_testdata[6764] */\n    { 3382, 0x9E3779B185EBCA8DULL, 0x938ED73AA86A3EA6ULL }, /* XSUM_XXH3_testdata[6765] */\n    { 3383, 0x0000000000000000ULL, 0x02A498021F3FE5DAULL }, /* XSUM_XXH3_testdata[6766] */\n    { 3383, 0x9E3779B185EBCA8DULL, 0x167408B658D97687ULL }, /* XSUM_XXH3_testdata[6767] */\n    { 3384, 0x0000000000000000ULL, 0x6F58654097A2362CULL }, /* XSUM_XXH3_testdata[6768] */\n    { 3384, 0x9E3779B185EBCA8DULL, 0xEAE046A15ECAF386ULL }, /* XSUM_XXH3_testdata[6769] */\n    { 3385, 0x0000000000000000ULL, 0x5ABE011F58851AC1ULL }, /* XSUM_XXH3_testdata[6770] */\n    { 3385, 0x9E3779B185EBCA8DULL, 0xA242766363ECFFD1ULL }, /* XSUM_XXH3_testdata[6771] */\n    { 3386, 0x0000000000000000ULL, 0x7D6FB06860923912ULL }, /* XSUM_XXH3_testdata[6772] */\n    { 3386, 0x9E3779B185EBCA8DULL, 0x721052AEF679D3ACULL }, /* XSUM_XXH3_testdata[6773] */\n    { 3387, 0x0000000000000000ULL, 0xA76665E0C3EF9A9BULL }, /* XSUM_XXH3_testdata[6774] */\n    { 3387, 0x9E3779B185EBCA8DULL, 0xF895B633A5B18B63ULL }, /* XSUM_XXH3_testdata[6775] */\n    { 3388, 0x0000000000000000ULL, 0x75DA9626A90ADA95ULL }, /* XSUM_XXH3_testdata[6776] */\n    { 3388, 0x9E3779B185EBCA8DULL, 0x51D970EBFE6D9BD2ULL }, /* XSUM_XXH3_testdata[6777] */\n    { 3389, 0x0000000000000000ULL, 0x387890C21988999AULL }, /* XSUM_XXH3_testdata[6778] */\n    { 3389, 0x9E3779B185EBCA8DULL, 0xFA3EB1B97303FB7DULL }, /* XSUM_XXH3_testdata[6779] */\n    { 3390, 0x0000000000000000ULL, 0xCC3B112F2C79A3A7ULL }, /* XSUM_XXH3_testdata[6780] */\n    { 3390, 0x9E3779B185EBCA8DULL, 0x472523F5CFCC6459ULL }, /* XSUM_XXH3_testdata[6781] */\n    { 3391, 0x0000000000000000ULL, 0x56FD48AD2C3F7AE2ULL }, /* XSUM_XXH3_testdata[6782] */\n    { 3391, 0x9E3779B185EBCA8DULL, 0x1954BEE13911BEF0ULL }, /* XSUM_XXH3_testdata[6783] */\n    { 3392, 0x0000000000000000ULL, 0x069C8A3CBB355320ULL }, /* XSUM_XXH3_testdata[6784] */\n    { 3392, 0x9E3779B185EBCA8DULL, 0x992366365E422669ULL }, /* XSUM_XXH3_testdata[6785] */\n    { 3393, 0x0000000000000000ULL, 0x2D6D9564C994E53CULL }, /* XSUM_XXH3_testdata[6786] */\n    { 3393, 0x9E3779B185EBCA8DULL, 0x061C4F86D60A20AFULL }, /* XSUM_XXH3_testdata[6787] */\n    { 3394, 0x0000000000000000ULL, 0xB0B37ECBEEA4EB83ULL }, /* XSUM_XXH3_testdata[6788] */\n    { 3394, 0x9E3779B185EBCA8DULL, 0xEDC67A98C8453C98ULL }, /* XSUM_XXH3_testdata[6789] */\n    { 3395, 0x0000000000000000ULL, 0x150198DF293C0A4BULL }, /* XSUM_XXH3_testdata[6790] */\n    { 3395, 0x9E3779B185EBCA8DULL, 0x6077B479F4DBB10DULL }, /* XSUM_XXH3_testdata[6791] */\n    { 3396, 0x0000000000000000ULL, 0x5DA9C28DBDE35D4AULL }, /* XSUM_XXH3_testdata[6792] */\n    { 3396, 0x9E3779B185EBCA8DULL, 0x792D8912B6067280ULL }, /* XSUM_XXH3_testdata[6793] */\n    { 3397, 0x0000000000000000ULL, 0x42819BD28C9C8BBBULL }, /* XSUM_XXH3_testdata[6794] */\n    { 3397, 0x9E3779B185EBCA8DULL, 0x987B8D15969B50CCULL }, /* XSUM_XXH3_testdata[6795] */\n    { 3398, 0x0000000000000000ULL, 0x230D4F0FB1F52D75ULL }, /* XSUM_XXH3_testdata[6796] */\n    { 3398, 0x9E3779B185EBCA8DULL, 0x8FD85DD189EF36AFULL }, /* XSUM_XXH3_testdata[6797] */\n    { 3399, 0x0000000000000000ULL, 0x556F3F29D18C0072ULL }, /* XSUM_XXH3_testdata[6798] */\n    { 3399, 0x9E3779B185EBCA8DULL, 0xFC79DD9F134BDE40ULL }, /* XSUM_XXH3_testdata[6799] */\n    { 3400, 0x0000000000000000ULL, 0x8667E4F6A9AE7D71ULL }, /* XSUM_XXH3_testdata[6800] */\n    { 3400, 0x9E3779B185EBCA8DULL, 0x442B3EA2542D3EC1ULL }, /* XSUM_XXH3_testdata[6801] */\n    { 3401, 0x0000000000000000ULL, 0xA45C652DA3612B31ULL }, /* XSUM_XXH3_testdata[6802] */\n    { 3401, 0x9E3779B185EBCA8DULL, 0xA1F6535133673725ULL }, /* XSUM_XXH3_testdata[6803] */\n    { 3402, 0x0000000000000000ULL, 0xC3393268BD9A580FULL }, /* XSUM_XXH3_testdata[6804] */\n    { 3402, 0x9E3779B185EBCA8DULL, 0x900537CE674E5C29ULL }, /* XSUM_XXH3_testdata[6805] */\n    { 3403, 0x0000000000000000ULL, 0x5EF6FB124B92471AULL }, /* XSUM_XXH3_testdata[6806] */\n    { 3403, 0x9E3779B185EBCA8DULL, 0xE9B203C1E1A13490ULL }, /* XSUM_XXH3_testdata[6807] */\n    { 3404, 0x0000000000000000ULL, 0xFEEF85FD8F064FB8ULL }, /* XSUM_XXH3_testdata[6808] */\n    { 3404, 0x9E3779B185EBCA8DULL, 0x36D403BFD873D29EULL }, /* XSUM_XXH3_testdata[6809] */\n    { 3405, 0x0000000000000000ULL, 0xAD4E16D2BCF13E91ULL }, /* XSUM_XXH3_testdata[6810] */\n    { 3405, 0x9E3779B185EBCA8DULL, 0xCA663C3422B8AC5AULL }, /* XSUM_XXH3_testdata[6811] */\n    { 3406, 0x0000000000000000ULL, 0x04C879B2B9C607D1ULL }, /* XSUM_XXH3_testdata[6812] */\n    { 3406, 0x9E3779B185EBCA8DULL, 0x3E18E39DD05AD200ULL }, /* XSUM_XXH3_testdata[6813] */\n    { 3407, 0x0000000000000000ULL, 0x3DC2FBCD16225841ULL }, /* XSUM_XXH3_testdata[6814] */\n    { 3407, 0x9E3779B185EBCA8DULL, 0xB0102B3A179982DFULL }, /* XSUM_XXH3_testdata[6815] */\n    { 3408, 0x0000000000000000ULL, 0xF5EA4DB56376A521ULL }, /* XSUM_XXH3_testdata[6816] */\n    { 3408, 0x9E3779B185EBCA8DULL, 0x76CBDCD851E1578DULL }, /* XSUM_XXH3_testdata[6817] */\n    { 3409, 0x0000000000000000ULL, 0xE987EBEEE1EECCD9ULL }, /* XSUM_XXH3_testdata[6818] */\n    { 3409, 0x9E3779B185EBCA8DULL, 0xA2B2B1828D920A8FULL }, /* XSUM_XXH3_testdata[6819] */\n    { 3410, 0x0000000000000000ULL, 0xA28A69165BC6201FULL }, /* XSUM_XXH3_testdata[6820] */\n    { 3410, 0x9E3779B185EBCA8DULL, 0x6D3E68040E28F068ULL }, /* XSUM_XXH3_testdata[6821] */\n    { 3411, 0x0000000000000000ULL, 0xD084835BE48582BAULL }, /* XSUM_XXH3_testdata[6822] */\n    { 3411, 0x9E3779B185EBCA8DULL, 0xFAE48A7F6D0EA3ADULL }, /* XSUM_XXH3_testdata[6823] */\n    { 3412, 0x0000000000000000ULL, 0x99FAC1585DA2979EULL }, /* XSUM_XXH3_testdata[6824] */\n    { 3412, 0x9E3779B185EBCA8DULL, 0x8A0946D812EC9930ULL }, /* XSUM_XXH3_testdata[6825] */\n    { 3413, 0x0000000000000000ULL, 0x9B7D110224DE3741ULL }, /* XSUM_XXH3_testdata[6826] */\n    { 3413, 0x9E3779B185EBCA8DULL, 0x512B43626433FFD5ULL }, /* XSUM_XXH3_testdata[6827] */\n    { 3414, 0x0000000000000000ULL, 0x068464F851726C21ULL }, /* XSUM_XXH3_testdata[6828] */\n    { 3414, 0x9E3779B185EBCA8DULL, 0x1B249FDF51CB749BULL }, /* XSUM_XXH3_testdata[6829] */\n    { 3415, 0x0000000000000000ULL, 0xFA428E8672E650F5ULL }, /* XSUM_XXH3_testdata[6830] */\n    { 3415, 0x9E3779B185EBCA8DULL, 0x30E2D66C047374EAULL }, /* XSUM_XXH3_testdata[6831] */\n    { 3416, 0x0000000000000000ULL, 0x537AE0407DA6E36EULL }, /* XSUM_XXH3_testdata[6832] */\n    { 3416, 0x9E3779B185EBCA8DULL, 0x3A2632845436AFA4ULL }, /* XSUM_XXH3_testdata[6833] */\n    { 3417, 0x0000000000000000ULL, 0xC78CBD900D0FA155ULL }, /* XSUM_XXH3_testdata[6834] */\n    { 3417, 0x9E3779B185EBCA8DULL, 0xEA043C3AE68F0072ULL }, /* XSUM_XXH3_testdata[6835] */\n    { 3418, 0x0000000000000000ULL, 0x16A5A54E8C5C26E1ULL }, /* XSUM_XXH3_testdata[6836] */\n    { 3418, 0x9E3779B185EBCA8DULL, 0xBCD3F01DC87BEACFULL }, /* XSUM_XXH3_testdata[6837] */\n    { 3419, 0x0000000000000000ULL, 0x99D4EE76AF195731ULL }, /* XSUM_XXH3_testdata[6838] */\n    { 3419, 0x9E3779B185EBCA8DULL, 0x4B4454EAE9502B87ULL }, /* XSUM_XXH3_testdata[6839] */\n    { 3420, 0x0000000000000000ULL, 0xBEED4A7672B35DA1ULL }, /* XSUM_XXH3_testdata[6840] */\n    { 3420, 0x9E3779B185EBCA8DULL, 0x9165EC9EFB91D063ULL }, /* XSUM_XXH3_testdata[6841] */\n    { 3421, 0x0000000000000000ULL, 0xD2B64EFAB2C7F3B6ULL }, /* XSUM_XXH3_testdata[6842] */\n    { 3421, 0x9E3779B185EBCA8DULL, 0x26F3512DBB64CCD6ULL }, /* XSUM_XXH3_testdata[6843] */\n    { 3422, 0x0000000000000000ULL, 0x16994ADC95C3DD59ULL }, /* XSUM_XXH3_testdata[6844] */\n    { 3422, 0x9E3779B185EBCA8DULL, 0x25DD06403D47B9E2ULL }, /* XSUM_XXH3_testdata[6845] */\n    { 3423, 0x0000000000000000ULL, 0x5F95506988F7A6E2ULL }, /* XSUM_XXH3_testdata[6846] */\n    { 3423, 0x9E3779B185EBCA8DULL, 0xBCF53EAAA0FAFE5BULL }, /* XSUM_XXH3_testdata[6847] */\n    { 3424, 0x0000000000000000ULL, 0xB82C4D58447071F6ULL }, /* XSUM_XXH3_testdata[6848] */\n    { 3424, 0x9E3779B185EBCA8DULL, 0x53C6A0C80A8CE03AULL }, /* XSUM_XXH3_testdata[6849] */\n    { 3425, 0x0000000000000000ULL, 0x51EC8660F7BE8073ULL }, /* XSUM_XXH3_testdata[6850] */\n    { 3425, 0x9E3779B185EBCA8DULL, 0x62287687188CEDD3ULL }, /* XSUM_XXH3_testdata[6851] */\n    { 3426, 0x0000000000000000ULL, 0x17CD1C93665A3EEAULL }, /* XSUM_XXH3_testdata[6852] */\n    { 3426, 0x9E3779B185EBCA8DULL, 0x85B611DDF5A748AEULL }, /* XSUM_XXH3_testdata[6853] */\n    { 3427, 0x0000000000000000ULL, 0x6807CC5D6956C70CULL }, /* XSUM_XXH3_testdata[6854] */\n    { 3427, 0x9E3779B185EBCA8DULL, 0x3D1F4E12503D6B0EULL }, /* XSUM_XXH3_testdata[6855] */\n    { 3428, 0x0000000000000000ULL, 0x49133B7C04546C61ULL }, /* XSUM_XXH3_testdata[6856] */\n    { 3428, 0x9E3779B185EBCA8DULL, 0xAAF1A828EC52CB6AULL }, /* XSUM_XXH3_testdata[6857] */\n    { 3429, 0x0000000000000000ULL, 0xEE23B02BF3D00EB6ULL }, /* XSUM_XXH3_testdata[6858] */\n    { 3429, 0x9E3779B185EBCA8DULL, 0xC4C9BA35282BF46AULL }, /* XSUM_XXH3_testdata[6859] */\n    { 3430, 0x0000000000000000ULL, 0x5923EB8CFFF27A78ULL }, /* XSUM_XXH3_testdata[6860] */\n    { 3430, 0x9E3779B185EBCA8DULL, 0x8B21E6279C861866ULL }, /* XSUM_XXH3_testdata[6861] */\n    { 3431, 0x0000000000000000ULL, 0x715B9D93A9515421ULL }, /* XSUM_XXH3_testdata[6862] */\n    { 3431, 0x9E3779B185EBCA8DULL, 0x5578E24B67696515ULL }, /* XSUM_XXH3_testdata[6863] */\n    { 3432, 0x0000000000000000ULL, 0x852C7D23D9C52C61ULL }, /* XSUM_XXH3_testdata[6864] */\n    { 3432, 0x9E3779B185EBCA8DULL, 0xF2860B377932F538ULL }, /* XSUM_XXH3_testdata[6865] */\n    { 3433, 0x0000000000000000ULL, 0x2CACD2411AA01EDFULL }, /* XSUM_XXH3_testdata[6866] */\n    { 3433, 0x9E3779B185EBCA8DULL, 0x293B3F36962943D9ULL }, /* XSUM_XXH3_testdata[6867] */\n    { 3434, 0x0000000000000000ULL, 0x7C19178BEF5EE94CULL }, /* XSUM_XXH3_testdata[6868] */\n    { 3434, 0x9E3779B185EBCA8DULL, 0x20E2E82BB895B8A1ULL }, /* XSUM_XXH3_testdata[6869] */\n    { 3435, 0x0000000000000000ULL, 0x3F781F8F6FF6355AULL }, /* XSUM_XXH3_testdata[6870] */\n    { 3435, 0x9E3779B185EBCA8DULL, 0x2BE5292F21AFAA55ULL }, /* XSUM_XXH3_testdata[6871] */\n    { 3436, 0x0000000000000000ULL, 0x6613D5C175439532ULL }, /* XSUM_XXH3_testdata[6872] */\n    { 3436, 0x9E3779B185EBCA8DULL, 0x14730479802AE13AULL }, /* XSUM_XXH3_testdata[6873] */\n    { 3437, 0x0000000000000000ULL, 0xB2F9827610AE5FD8ULL }, /* XSUM_XXH3_testdata[6874] */\n    { 3437, 0x9E3779B185EBCA8DULL, 0x9D9D6E47EEF46586ULL }, /* XSUM_XXH3_testdata[6875] */\n    { 3438, 0x0000000000000000ULL, 0x03608AC79778363EULL }, /* XSUM_XXH3_testdata[6876] */\n    { 3438, 0x9E3779B185EBCA8DULL, 0x81CF8D41A65F977EULL }, /* XSUM_XXH3_testdata[6877] */\n    { 3439, 0x0000000000000000ULL, 0x90729D66C715DFAFULL }, /* XSUM_XXH3_testdata[6878] */\n    { 3439, 0x9E3779B185EBCA8DULL, 0x3B6F4CD6BD92BE88ULL }, /* XSUM_XXH3_testdata[6879] */\n    { 3440, 0x0000000000000000ULL, 0x323981E33475BF91ULL }, /* XSUM_XXH3_testdata[6880] */\n    { 3440, 0x9E3779B185EBCA8DULL, 0x144B191EC86C3643ULL }, /* XSUM_XXH3_testdata[6881] */\n    { 3441, 0x0000000000000000ULL, 0x9A9ACC5955002DFDULL }, /* XSUM_XXH3_testdata[6882] */\n    { 3441, 0x9E3779B185EBCA8DULL, 0x021F71FC64158D63ULL }, /* XSUM_XXH3_testdata[6883] */\n    { 3442, 0x0000000000000000ULL, 0xDF539EAE3D64E04FULL }, /* XSUM_XXH3_testdata[6884] */\n    { 3442, 0x9E3779B185EBCA8DULL, 0x3BECB796BDA1FD82ULL }, /* XSUM_XXH3_testdata[6885] */\n    { 3443, 0x0000000000000000ULL, 0x336A96389E5FDFCEULL }, /* XSUM_XXH3_testdata[6886] */\n    { 3443, 0x9E3779B185EBCA8DULL, 0x1192397EC8E8CF2FULL }, /* XSUM_XXH3_testdata[6887] */\n    { 3444, 0x0000000000000000ULL, 0x556F1E7C93E809B7ULL }, /* XSUM_XXH3_testdata[6888] */\n    { 3444, 0x9E3779B185EBCA8DULL, 0x2ED343BD289B4E62ULL }, /* XSUM_XXH3_testdata[6889] */\n    { 3445, 0x0000000000000000ULL, 0x080D6F59003E4FC4ULL }, /* XSUM_XXH3_testdata[6890] */\n    { 3445, 0x9E3779B185EBCA8DULL, 0xFDAF46FCD54D5FD1ULL }, /* XSUM_XXH3_testdata[6891] */\n    { 3446, 0x0000000000000000ULL, 0x84A0088DB36E1F64ULL }, /* XSUM_XXH3_testdata[6892] */\n    { 3446, 0x9E3779B185EBCA8DULL, 0x4F8457DDCA33663DULL }, /* XSUM_XXH3_testdata[6893] */\n    { 3447, 0x0000000000000000ULL, 0xCED536C2D29C87EFULL }, /* XSUM_XXH3_testdata[6894] */\n    { 3447, 0x9E3779B185EBCA8DULL, 0x83F8E89E2E59F5D8ULL }, /* XSUM_XXH3_testdata[6895] */\n    { 3448, 0x0000000000000000ULL, 0x4B040A83B50A8CC0ULL }, /* XSUM_XXH3_testdata[6896] */\n    { 3448, 0x9E3779B185EBCA8DULL, 0xAD33E209B12DE98AULL }, /* XSUM_XXH3_testdata[6897] */\n    { 3449, 0x0000000000000000ULL, 0x742BF7496BB72640ULL }, /* XSUM_XXH3_testdata[6898] */\n    { 3449, 0x9E3779B185EBCA8DULL, 0xA763199E64F92DCCULL }, /* XSUM_XXH3_testdata[6899] */\n    { 3450, 0x0000000000000000ULL, 0xFD63BD7EFEDD98E3ULL }, /* XSUM_XXH3_testdata[6900] */\n    { 3450, 0x9E3779B185EBCA8DULL, 0xA42BEBCE3C653456ULL }, /* XSUM_XXH3_testdata[6901] */\n    { 3451, 0x0000000000000000ULL, 0x0538AAB855AF7831ULL }, /* XSUM_XXH3_testdata[6902] */\n    { 3451, 0x9E3779B185EBCA8DULL, 0xA973A0AA06A01C7DULL }, /* XSUM_XXH3_testdata[6903] */\n    { 3452, 0x0000000000000000ULL, 0x4CA97A96065818D5ULL }, /* XSUM_XXH3_testdata[6904] */\n    { 3452, 0x9E3779B185EBCA8DULL, 0x8AA10488C167A8D8ULL }, /* XSUM_XXH3_testdata[6905] */\n    { 3453, 0x0000000000000000ULL, 0xFCC4220563AD3B2DULL }, /* XSUM_XXH3_testdata[6906] */\n    { 3453, 0x9E3779B185EBCA8DULL, 0xADA3C779BAF99218ULL }, /* XSUM_XXH3_testdata[6907] */\n    { 3454, 0x0000000000000000ULL, 0x2BA0F086D16C658DULL }, /* XSUM_XXH3_testdata[6908] */\n    { 3454, 0x9E3779B185EBCA8DULL, 0x8D86FA4EDA6D474CULL }, /* XSUM_XXH3_testdata[6909] */\n    { 3455, 0x0000000000000000ULL, 0x5EB5CCCC2C59EA39ULL }, /* XSUM_XXH3_testdata[6910] */\n    { 3455, 0x9E3779B185EBCA8DULL, 0xF9F51AE372D23DC7ULL }, /* XSUM_XXH3_testdata[6911] */\n    { 3456, 0x0000000000000000ULL, 0xE57B9B091D086CFEULL }, /* XSUM_XXH3_testdata[6912] */\n    { 3456, 0x9E3779B185EBCA8DULL, 0xD59013D9A35564C3ULL }, /* XSUM_XXH3_testdata[6913] */\n    { 3457, 0x0000000000000000ULL, 0x7EB941A402BFEDB4ULL }, /* XSUM_XXH3_testdata[6914] */\n    { 3457, 0x9E3779B185EBCA8DULL, 0xCEF2BA119E1F2490ULL }, /* XSUM_XXH3_testdata[6915] */\n    { 3458, 0x0000000000000000ULL, 0x15A8595F20AB7869ULL }, /* XSUM_XXH3_testdata[6916] */\n    { 3458, 0x9E3779B185EBCA8DULL, 0x5F570F540BFB5D14ULL }, /* XSUM_XXH3_testdata[6917] */\n    { 3459, 0x0000000000000000ULL, 0x2BDB99769C00EF97ULL }, /* XSUM_XXH3_testdata[6918] */\n    { 3459, 0x9E3779B185EBCA8DULL, 0x1A6C238C35C7AB6AULL }, /* XSUM_XXH3_testdata[6919] */\n    { 3460, 0x0000000000000000ULL, 0xB13E92D074159621ULL }, /* XSUM_XXH3_testdata[6920] */\n    { 3460, 0x9E3779B185EBCA8DULL, 0xE12928F662EB9C09ULL }, /* XSUM_XXH3_testdata[6921] */\n    { 3461, 0x0000000000000000ULL, 0x7AA1893136ECA326ULL }, /* XSUM_XXH3_testdata[6922] */\n    { 3461, 0x9E3779B185EBCA8DULL, 0x189A347EEE5B44A7ULL }, /* XSUM_XXH3_testdata[6923] */\n    { 3462, 0x0000000000000000ULL, 0x444A65AE4ADAA185ULL }, /* XSUM_XXH3_testdata[6924] */\n    { 3462, 0x9E3779B185EBCA8DULL, 0x4D31B5EFA7943093ULL }, /* XSUM_XXH3_testdata[6925] */\n    { 3463, 0x0000000000000000ULL, 0x743C88E7E0808C6EULL }, /* XSUM_XXH3_testdata[6926] */\n    { 3463, 0x9E3779B185EBCA8DULL, 0x457B3C8C414C7E00ULL }, /* XSUM_XXH3_testdata[6927] */\n    { 3464, 0x0000000000000000ULL, 0x766A3D9A086BEEDCULL }, /* XSUM_XXH3_testdata[6928] */\n    { 3464, 0x9E3779B185EBCA8DULL, 0xD00BD9334F499621ULL }, /* XSUM_XXH3_testdata[6929] */\n    { 3465, 0x0000000000000000ULL, 0x5A9AF97390F2D336ULL }, /* XSUM_XXH3_testdata[6930] */\n    { 3465, 0x9E3779B185EBCA8DULL, 0xDD343FDD81C24DECULL }, /* XSUM_XXH3_testdata[6931] */\n    { 3466, 0x0000000000000000ULL, 0x299058CAE275128CULL }, /* XSUM_XXH3_testdata[6932] */\n    { 3466, 0x9E3779B185EBCA8DULL, 0x43D2E53F08DFAA8EULL }, /* XSUM_XXH3_testdata[6933] */\n    { 3467, 0x0000000000000000ULL, 0x8A9B1790BBBBE02EULL }, /* XSUM_XXH3_testdata[6934] */\n    { 3467, 0x9E3779B185EBCA8DULL, 0x850B34730EC56B2AULL }, /* XSUM_XXH3_testdata[6935] */\n    { 3468, 0x0000000000000000ULL, 0x4A61BD0288C15033ULL }, /* XSUM_XXH3_testdata[6936] */\n    { 3468, 0x9E3779B185EBCA8DULL, 0x0F7DB390A1AE23CFULL }, /* XSUM_XXH3_testdata[6937] */\n    { 3469, 0x0000000000000000ULL, 0x3174C25757772AB3ULL }, /* XSUM_XXH3_testdata[6938] */\n    { 3469, 0x9E3779B185EBCA8DULL, 0x297D151445B94380ULL }, /* XSUM_XXH3_testdata[6939] */\n    { 3470, 0x0000000000000000ULL, 0x5B6E6073547F45B6ULL }, /* XSUM_XXH3_testdata[6940] */\n    { 3470, 0x9E3779B185EBCA8DULL, 0x2FA021070D76E41FULL }, /* XSUM_XXH3_testdata[6941] */\n    { 3471, 0x0000000000000000ULL, 0x9ACF9C0E8A90C860ULL }, /* XSUM_XXH3_testdata[6942] */\n    { 3471, 0x9E3779B185EBCA8DULL, 0x01FF2388F7E6CC3AULL }, /* XSUM_XXH3_testdata[6943] */\n    { 3472, 0x0000000000000000ULL, 0x831D808CCFDCC740ULL }, /* XSUM_XXH3_testdata[6944] */\n    { 3472, 0x9E3779B185EBCA8DULL, 0x83D2BCB7E486903CULL }, /* XSUM_XXH3_testdata[6945] */\n    { 3473, 0x0000000000000000ULL, 0xA65DDD73B8B83E3FULL }, /* XSUM_XXH3_testdata[6946] */\n    { 3473, 0x9E3779B185EBCA8DULL, 0xE6E97D4164F67B46ULL }, /* XSUM_XXH3_testdata[6947] */\n    { 3474, 0x0000000000000000ULL, 0xD0289F03FB746F35ULL }, /* XSUM_XXH3_testdata[6948] */\n    { 3474, 0x9E3779B185EBCA8DULL, 0x4D27362F8B024FDDULL }, /* XSUM_XXH3_testdata[6949] */\n    { 3475, 0x0000000000000000ULL, 0xE5CE9E51C78660DAULL }, /* XSUM_XXH3_testdata[6950] */\n    { 3475, 0x9E3779B185EBCA8DULL, 0x6B7F4F6CDA082302ULL }, /* XSUM_XXH3_testdata[6951] */\n    { 3476, 0x0000000000000000ULL, 0xF04176F1CC863F0FULL }, /* XSUM_XXH3_testdata[6952] */\n    { 3476, 0x9E3779B185EBCA8DULL, 0xE77E97BAB81B8059ULL }, /* XSUM_XXH3_testdata[6953] */\n    { 3477, 0x0000000000000000ULL, 0x9638BDB097A6FA75ULL }, /* XSUM_XXH3_testdata[6954] */\n    { 3477, 0x9E3779B185EBCA8DULL, 0x7744A44DA3915EE1ULL }, /* XSUM_XXH3_testdata[6955] */\n    { 3478, 0x0000000000000000ULL, 0xA8D4FBA6FC32EFC1ULL }, /* XSUM_XXH3_testdata[6956] */\n    { 3478, 0x9E3779B185EBCA8DULL, 0xE6F333D64DD1810EULL }, /* XSUM_XXH3_testdata[6957] */\n    { 3479, 0x0000000000000000ULL, 0x1E94F229081009E8ULL }, /* XSUM_XXH3_testdata[6958] */\n    { 3479, 0x9E3779B185EBCA8DULL, 0xAB72B923B1CDA151ULL }, /* XSUM_XXH3_testdata[6959] */\n    { 3480, 0x0000000000000000ULL, 0xE2A83E16DE1CCCE6ULL }, /* XSUM_XXH3_testdata[6960] */\n    { 3480, 0x9E3779B185EBCA8DULL, 0x74335749B7ED9BFCULL }, /* XSUM_XXH3_testdata[6961] */\n    { 3481, 0x0000000000000000ULL, 0x1CD87893878D0190ULL }, /* XSUM_XXH3_testdata[6962] */\n    { 3481, 0x9E3779B185EBCA8DULL, 0x60F080CD5DC9A29BULL }, /* XSUM_XXH3_testdata[6963] */\n    { 3482, 0x0000000000000000ULL, 0xA24BBA3F25FB6D7CULL }, /* XSUM_XXH3_testdata[6964] */\n    { 3482, 0x9E3779B185EBCA8DULL, 0x4A8B8192A9BB035FULL }, /* XSUM_XXH3_testdata[6965] */\n    { 3483, 0x0000000000000000ULL, 0x217A994179A6BC5DULL }, /* XSUM_XXH3_testdata[6966] */\n    { 3483, 0x9E3779B185EBCA8DULL, 0x6BE650AFD14961D1ULL }, /* XSUM_XXH3_testdata[6967] */\n    { 3484, 0x0000000000000000ULL, 0x68F866F7D427B598ULL }, /* XSUM_XXH3_testdata[6968] */\n    { 3484, 0x9E3779B185EBCA8DULL, 0x2BEBE4EB94CA4FCEULL }, /* XSUM_XXH3_testdata[6969] */\n    { 3485, 0x0000000000000000ULL, 0x67FAB96FF6EEF146ULL }, /* XSUM_XXH3_testdata[6970] */\n    { 3485, 0x9E3779B185EBCA8DULL, 0xBFAF58FA7B05D347ULL }, /* XSUM_XXH3_testdata[6971] */\n    { 3486, 0x0000000000000000ULL, 0x4616EBD342D399DEULL }, /* XSUM_XXH3_testdata[6972] */\n    { 3486, 0x9E3779B185EBCA8DULL, 0x96FF3FF4EA1AF519ULL }, /* XSUM_XXH3_testdata[6973] */\n    { 3487, 0x0000000000000000ULL, 0x84B39B619C6CC1A7ULL }, /* XSUM_XXH3_testdata[6974] */\n    { 3487, 0x9E3779B185EBCA8DULL, 0xF2DCD7B641C34D59ULL }, /* XSUM_XXH3_testdata[6975] */\n    { 3488, 0x0000000000000000ULL, 0xB6EF7257B128E516ULL }, /* XSUM_XXH3_testdata[6976] */\n    { 3488, 0x9E3779B185EBCA8DULL, 0xA1E9A1B2B3A6A69DULL }, /* XSUM_XXH3_testdata[6977] */\n    { 3489, 0x0000000000000000ULL, 0x8950CBBD53A60547ULL }, /* XSUM_XXH3_testdata[6978] */\n    { 3489, 0x9E3779B185EBCA8DULL, 0x8074F486A6B47B13ULL }, /* XSUM_XXH3_testdata[6979] */\n    { 3490, 0x0000000000000000ULL, 0x5D5B88EAC0DC140BULL }, /* XSUM_XXH3_testdata[6980] */\n    { 3490, 0x9E3779B185EBCA8DULL, 0xE66929B48B91CF24ULL }, /* XSUM_XXH3_testdata[6981] */\n    { 3491, 0x0000000000000000ULL, 0xFC92F8F0AFEBFC33ULL }, /* XSUM_XXH3_testdata[6982] */\n    { 3491, 0x9E3779B185EBCA8DULL, 0xF34BCB5C3D7D3CC3ULL }, /* XSUM_XXH3_testdata[6983] */\n    { 3492, 0x0000000000000000ULL, 0xF0FFCA34C0BF3748ULL }, /* XSUM_XXH3_testdata[6984] */\n    { 3492, 0x9E3779B185EBCA8DULL, 0xB6639893A4C48798ULL }, /* XSUM_XXH3_testdata[6985] */\n    { 3493, 0x0000000000000000ULL, 0x1C5E70682A017652ULL }, /* XSUM_XXH3_testdata[6986] */\n    { 3493, 0x9E3779B185EBCA8DULL, 0x3A40431A3CBA8FF1ULL }, /* XSUM_XXH3_testdata[6987] */\n    { 3494, 0x0000000000000000ULL, 0x54D2299A8BE480D9ULL }, /* XSUM_XXH3_testdata[6988] */\n    { 3494, 0x9E3779B185EBCA8DULL, 0xF7182620D32B3A6AULL }, /* XSUM_XXH3_testdata[6989] */\n    { 3495, 0x0000000000000000ULL, 0x4A853ABFA346C31BULL }, /* XSUM_XXH3_testdata[6990] */\n    { 3495, 0x9E3779B185EBCA8DULL, 0x6F5A7ABEB7062D8CULL }, /* XSUM_XXH3_testdata[6991] */\n    { 3496, 0x0000000000000000ULL, 0x42E32DF7BCAB7B41ULL }, /* XSUM_XXH3_testdata[6992] */\n    { 3496, 0x9E3779B185EBCA8DULL, 0x64E2A123B21A2BF8ULL }, /* XSUM_XXH3_testdata[6993] */\n    { 3497, 0x0000000000000000ULL, 0xE55C51B036F73069ULL }, /* XSUM_XXH3_testdata[6994] */\n    { 3497, 0x9E3779B185EBCA8DULL, 0xFA13D0C4D3B50397ULL }, /* XSUM_XXH3_testdata[6995] */\n    { 3498, 0x0000000000000000ULL, 0x6A94E0A0CBBC011DULL }, /* XSUM_XXH3_testdata[6996] */\n    { 3498, 0x9E3779B185EBCA8DULL, 0xAB916A459F2BA77EULL }, /* XSUM_XXH3_testdata[6997] */\n    { 3499, 0x0000000000000000ULL, 0x8A31780B8FA49271ULL }, /* XSUM_XXH3_testdata[6998] */\n    { 3499, 0x9E3779B185EBCA8DULL, 0x3248502F7430CCB3ULL }, /* XSUM_XXH3_testdata[6999] */\n    { 3500, 0x0000000000000000ULL, 0x3F5C20E9C5BC30FCULL }, /* XSUM_XXH3_testdata[7000] */\n    { 3500, 0x9E3779B185EBCA8DULL, 0x52A0B718A327F78EULL }, /* XSUM_XXH3_testdata[7001] */\n    { 3501, 0x0000000000000000ULL, 0x0C557138EF665113ULL }, /* XSUM_XXH3_testdata[7002] */\n    { 3501, 0x9E3779B185EBCA8DULL, 0x32EF2B9798DAD279ULL }, /* XSUM_XXH3_testdata[7003] */\n    { 3502, 0x0000000000000000ULL, 0x11F297CF29906C4DULL }, /* XSUM_XXH3_testdata[7004] */\n    { 3502, 0x9E3779B185EBCA8DULL, 0x62D4F0C4295680C7ULL }, /* XSUM_XXH3_testdata[7005] */\n    { 3503, 0x0000000000000000ULL, 0xEDDDA0CFF6FF3EBDULL }, /* XSUM_XXH3_testdata[7006] */\n    { 3503, 0x9E3779B185EBCA8DULL, 0xF9B9B3D472878220ULL }, /* XSUM_XXH3_testdata[7007] */\n    { 3504, 0x0000000000000000ULL, 0x9C6FE29AABCD2FC1ULL }, /* XSUM_XXH3_testdata[7008] */\n    { 3504, 0x9E3779B185EBCA8DULL, 0xA0CFFC0B6B3AC754ULL }, /* XSUM_XXH3_testdata[7009] */\n    { 3505, 0x0000000000000000ULL, 0x2990C386E98E500DULL }, /* XSUM_XXH3_testdata[7010] */\n    { 3505, 0x9E3779B185EBCA8DULL, 0xB5D0853395C2AE0FULL }, /* XSUM_XXH3_testdata[7011] */\n    { 3506, 0x0000000000000000ULL, 0xFC2DD49ACEC84325ULL }, /* XSUM_XXH3_testdata[7012] */\n    { 3506, 0x9E3779B185EBCA8DULL, 0x2555D00473A5EC76ULL }, /* XSUM_XXH3_testdata[7013] */\n    { 3507, 0x0000000000000000ULL, 0x4219204CC3F19E86ULL }, /* XSUM_XXH3_testdata[7014] */\n    { 3507, 0x9E3779B185EBCA8DULL, 0x17301B4AFF1A12B3ULL }, /* XSUM_XXH3_testdata[7015] */\n    { 3508, 0x0000000000000000ULL, 0x531F5129E885FC1FULL }, /* XSUM_XXH3_testdata[7016] */\n    { 3508, 0x9E3779B185EBCA8DULL, 0x2D25FD09A8BCF3FCULL }, /* XSUM_XXH3_testdata[7017] */\n    { 3509, 0x0000000000000000ULL, 0xE30ED992B37CA5CFULL }, /* XSUM_XXH3_testdata[7018] */\n    { 3509, 0x9E3779B185EBCA8DULL, 0xACBF1DAEB4DEB0D1ULL }, /* XSUM_XXH3_testdata[7019] */\n    { 3510, 0x0000000000000000ULL, 0xF5C771258932B3F7ULL }, /* XSUM_XXH3_testdata[7020] */\n    { 3510, 0x9E3779B185EBCA8DULL, 0xC6CAC08CDFBF1E5EULL }, /* XSUM_XXH3_testdata[7021] */\n    { 3511, 0x0000000000000000ULL, 0xCA68DB7B3A40AB67ULL }, /* XSUM_XXH3_testdata[7022] */\n    { 3511, 0x9E3779B185EBCA8DULL, 0xE978EA397A49AD49ULL }, /* XSUM_XXH3_testdata[7023] */\n    { 3512, 0x0000000000000000ULL, 0x4BC21D7DBAB3335BULL }, /* XSUM_XXH3_testdata[7024] */\n    { 3512, 0x9E3779B185EBCA8DULL, 0x499821766185E65AULL }, /* XSUM_XXH3_testdata[7025] */\n    { 3513, 0x0000000000000000ULL, 0x3E83E1110CA570D7ULL }, /* XSUM_XXH3_testdata[7026] */\n    { 3513, 0x9E3779B185EBCA8DULL, 0x322C23FA880C25E9ULL }, /* XSUM_XXH3_testdata[7027] */\n    { 3514, 0x0000000000000000ULL, 0xD0EFE226CF83E639ULL }, /* XSUM_XXH3_testdata[7028] */\n    { 3514, 0x9E3779B185EBCA8DULL, 0xE6E965BD126DF290ULL }, /* XSUM_XXH3_testdata[7029] */\n    { 3515, 0x0000000000000000ULL, 0xAD4EE35B65B3E97DULL }, /* XSUM_XXH3_testdata[7030] */\n    { 3515, 0x9E3779B185EBCA8DULL, 0x59C43CEE47577A6FULL }, /* XSUM_XXH3_testdata[7031] */\n    { 3516, 0x0000000000000000ULL, 0x1CD8D79750245445ULL }, /* XSUM_XXH3_testdata[7032] */\n    { 3516, 0x9E3779B185EBCA8DULL, 0x106182CF4F44ECACULL }, /* XSUM_XXH3_testdata[7033] */\n    { 3517, 0x0000000000000000ULL, 0xF81CDF250458461FULL }, /* XSUM_XXH3_testdata[7034] */\n    { 3517, 0x9E3779B185EBCA8DULL, 0xCB300D8AFA2B9074ULL }, /* XSUM_XXH3_testdata[7035] */\n    { 3518, 0x0000000000000000ULL, 0x00B44D4311B0BDDDULL }, /* XSUM_XXH3_testdata[7036] */\n    { 3518, 0x9E3779B185EBCA8DULL, 0xED0ECE687F943E96ULL }, /* XSUM_XXH3_testdata[7037] */\n    { 3519, 0x0000000000000000ULL, 0xAD6884D76586C425ULL }, /* XSUM_XXH3_testdata[7038] */\n    { 3519, 0x9E3779B185EBCA8DULL, 0x3CCBE7697C09D027ULL }, /* XSUM_XXH3_testdata[7039] */\n    { 3520, 0x0000000000000000ULL, 0x4AE72B2CEC0154A4ULL }, /* XSUM_XXH3_testdata[7040] */\n    { 3520, 0x9E3779B185EBCA8DULL, 0x669A38E31F403AB3ULL }, /* XSUM_XXH3_testdata[7041] */\n    { 3521, 0x0000000000000000ULL, 0x1C2467C36A4A05FEULL }, /* XSUM_XXH3_testdata[7042] */\n    { 3521, 0x9E3779B185EBCA8DULL, 0x47C14D66AE006FE2ULL }, /* XSUM_XXH3_testdata[7043] */\n    { 3522, 0x0000000000000000ULL, 0x7D6785D29ABBC1E0ULL }, /* XSUM_XXH3_testdata[7044] */\n    { 3522, 0x9E3779B185EBCA8DULL, 0xAA6ECF8894E63171ULL }, /* XSUM_XXH3_testdata[7045] */\n    { 3523, 0x0000000000000000ULL, 0x02DE7A761E2005CAULL }, /* XSUM_XXH3_testdata[7046] */\n    { 3523, 0x9E3779B185EBCA8DULL, 0xB9DB1F14D2FEFB7CULL }, /* XSUM_XXH3_testdata[7047] */\n    { 3524, 0x0000000000000000ULL, 0x4F7155D176B1B538ULL }, /* XSUM_XXH3_testdata[7048] */\n    { 3524, 0x9E3779B185EBCA8DULL, 0xB99634196AF64BACULL }, /* XSUM_XXH3_testdata[7049] */\n    { 3525, 0x0000000000000000ULL, 0x31A4028F7190238CULL }, /* XSUM_XXH3_testdata[7050] */\n    { 3525, 0x9E3779B185EBCA8DULL, 0x78D2ADEF9ED92542ULL }, /* XSUM_XXH3_testdata[7051] */\n    { 3526, 0x0000000000000000ULL, 0xF57F055E22094776ULL }, /* XSUM_XXH3_testdata[7052] */\n    { 3526, 0x9E3779B185EBCA8DULL, 0x96E7802E11B04294ULL }, /* XSUM_XXH3_testdata[7053] */\n    { 3527, 0x0000000000000000ULL, 0x273C0105C788A7C5ULL }, /* XSUM_XXH3_testdata[7054] */\n    { 3527, 0x9E3779B185EBCA8DULL, 0x063F26B879C7FB5DULL }, /* XSUM_XXH3_testdata[7055] */\n    { 3528, 0x0000000000000000ULL, 0x788AFF64C26E40DDULL }, /* XSUM_XXH3_testdata[7056] */\n    { 3528, 0x9E3779B185EBCA8DULL, 0xC67BD3AEC2A767BAULL }, /* XSUM_XXH3_testdata[7057] */\n    { 3529, 0x0000000000000000ULL, 0x9A4C28EC5B274073ULL }, /* XSUM_XXH3_testdata[7058] */\n    { 3529, 0x9E3779B185EBCA8DULL, 0xD10F17D18AF09FC1ULL }, /* XSUM_XXH3_testdata[7059] */\n    { 3530, 0x0000000000000000ULL, 0x41EAF5870F1FAF02ULL }, /* XSUM_XXH3_testdata[7060] */\n    { 3530, 0x9E3779B185EBCA8DULL, 0x492DBEB2FA597712ULL }, /* XSUM_XXH3_testdata[7061] */\n    { 3531, 0x0000000000000000ULL, 0x060202E0CECDCD82ULL }, /* XSUM_XXH3_testdata[7062] */\n    { 3531, 0x9E3779B185EBCA8DULL, 0x85530139005E7679ULL }, /* XSUM_XXH3_testdata[7063] */\n    { 3532, 0x0000000000000000ULL, 0x670E724A3F1B6F46ULL }, /* XSUM_XXH3_testdata[7064] */\n    { 3532, 0x9E3779B185EBCA8DULL, 0x723E3D34E0272BF6ULL }, /* XSUM_XXH3_testdata[7065] */\n    { 3533, 0x0000000000000000ULL, 0xC89223A0DD16699EULL }, /* XSUM_XXH3_testdata[7066] */\n    { 3533, 0x9E3779B185EBCA8DULL, 0xFF5F9BE615303278ULL }, /* XSUM_XXH3_testdata[7067] */\n    { 3534, 0x0000000000000000ULL, 0x9037DF505832F655ULL }, /* XSUM_XXH3_testdata[7068] */\n    { 3534, 0x9E3779B185EBCA8DULL, 0xDFFA2D78C3B80F87ULL }, /* XSUM_XXH3_testdata[7069] */\n    { 3535, 0x0000000000000000ULL, 0x9C8539B53F903384ULL }, /* XSUM_XXH3_testdata[7070] */\n    { 3535, 0x9E3779B185EBCA8DULL, 0x56CC63E59E9A8784ULL }, /* XSUM_XXH3_testdata[7071] */\n    { 3536, 0x0000000000000000ULL, 0xDEBA0228DD563402ULL }, /* XSUM_XXH3_testdata[7072] */\n    { 3536, 0x9E3779B185EBCA8DULL, 0x24449B6E45030239ULL }, /* XSUM_XXH3_testdata[7073] */\n    { 3537, 0x0000000000000000ULL, 0xB01738BE6C965ED6ULL }, /* XSUM_XXH3_testdata[7074] */\n    { 3537, 0x9E3779B185EBCA8DULL, 0x908A583B0811DA9BULL }, /* XSUM_XXH3_testdata[7075] */\n    { 3538, 0x0000000000000000ULL, 0x4A4750E1AC27E245ULL }, /* XSUM_XXH3_testdata[7076] */\n    { 3538, 0x9E3779B185EBCA8DULL, 0x0965BFFEBDE28B60ULL }, /* XSUM_XXH3_testdata[7077] */\n    { 3539, 0x0000000000000000ULL, 0x8FF61D5636A8AAA2ULL }, /* XSUM_XXH3_testdata[7078] */\n    { 3539, 0x9E3779B185EBCA8DULL, 0x2670E92B26669470ULL }, /* XSUM_XXH3_testdata[7079] */\n    { 3540, 0x0000000000000000ULL, 0xA4542598B8184DAAULL }, /* XSUM_XXH3_testdata[7080] */\n    { 3540, 0x9E3779B185EBCA8DULL, 0x75B41EEE8678CEA1ULL }, /* XSUM_XXH3_testdata[7081] */\n    { 3541, 0x0000000000000000ULL, 0x7CCF736EE2195F4DULL }, /* XSUM_XXH3_testdata[7082] */\n    { 3541, 0x9E3779B185EBCA8DULL, 0x2D350B3D5CD557A7ULL }, /* XSUM_XXH3_testdata[7083] */\n    { 3542, 0x0000000000000000ULL, 0x0E1E5960452AA0D4ULL }, /* XSUM_XXH3_testdata[7084] */\n    { 3542, 0x9E3779B185EBCA8DULL, 0x6D0F8B676827E02CULL }, /* XSUM_XXH3_testdata[7085] */\n    { 3543, 0x0000000000000000ULL, 0xD3EBE6832A073A89ULL }, /* XSUM_XXH3_testdata[7086] */\n    { 3543, 0x9E3779B185EBCA8DULL, 0x2222E929AFE2DE90ULL }, /* XSUM_XXH3_testdata[7087] */\n    { 3544, 0x0000000000000000ULL, 0xA23BD60E84E52E11ULL }, /* XSUM_XXH3_testdata[7088] */\n    { 3544, 0x9E3779B185EBCA8DULL, 0x374DD01907BE5B27ULL }, /* XSUM_XXH3_testdata[7089] */\n    { 3545, 0x0000000000000000ULL, 0xE77FFA0FBB030992ULL }, /* XSUM_XXH3_testdata[7090] */\n    { 3545, 0x9E3779B185EBCA8DULL, 0xB3928F9C6C2344A7ULL }, /* XSUM_XXH3_testdata[7091] */\n    { 3546, 0x0000000000000000ULL, 0x479CF3EF2877688DULL }, /* XSUM_XXH3_testdata[7092] */\n    { 3546, 0x9E3779B185EBCA8DULL, 0xA74CA629D4DB9ED2ULL }, /* XSUM_XXH3_testdata[7093] */\n    { 3547, 0x0000000000000000ULL, 0x46A5D4538EEA1B1EULL }, /* XSUM_XXH3_testdata[7094] */\n    { 3547, 0x9E3779B185EBCA8DULL, 0x4A54B76E585FB369ULL }, /* XSUM_XXH3_testdata[7095] */\n    { 3548, 0x0000000000000000ULL, 0xDFC7639B53F79E1DULL }, /* XSUM_XXH3_testdata[7096] */\n    { 3548, 0x9E3779B185EBCA8DULL, 0xD7331396B0968C55ULL }, /* XSUM_XXH3_testdata[7097] */\n    { 3549, 0x0000000000000000ULL, 0x3A21E252457E09C2ULL }, /* XSUM_XXH3_testdata[7098] */\n    { 3549, 0x9E3779B185EBCA8DULL, 0x8F8A090028F047D4ULL }, /* XSUM_XXH3_testdata[7099] */\n    { 3550, 0x0000000000000000ULL, 0x5E081111B8168FABULL }, /* XSUM_XXH3_testdata[7100] */\n    { 3550, 0x9E3779B185EBCA8DULL, 0xD9CF0859AC3F0022ULL }, /* XSUM_XXH3_testdata[7101] */\n    { 3551, 0x0000000000000000ULL, 0x04A3ABF712732F54ULL }, /* XSUM_XXH3_testdata[7102] */\n    { 3551, 0x9E3779B185EBCA8DULL, 0x6962B7DBDB3007BEULL }, /* XSUM_XXH3_testdata[7103] */\n    { 3552, 0x0000000000000000ULL, 0xD4F34FB029E5E662ULL }, /* XSUM_XXH3_testdata[7104] */\n    { 3552, 0x9E3779B185EBCA8DULL, 0x2AE713A28FBBF1D8ULL }, /* XSUM_XXH3_testdata[7105] */\n    { 3553, 0x0000000000000000ULL, 0x5E31DE75F1C44D4EULL }, /* XSUM_XXH3_testdata[7106] */\n    { 3553, 0x9E3779B185EBCA8DULL, 0xB8E299521A9EADB6ULL }, /* XSUM_XXH3_testdata[7107] */\n    { 3554, 0x0000000000000000ULL, 0xDDC496EB0576A021ULL }, /* XSUM_XXH3_testdata[7108] */\n    { 3554, 0x9E3779B185EBCA8DULL, 0x2B6A8AE7E8273F4AULL }, /* XSUM_XXH3_testdata[7109] */\n    { 3555, 0x0000000000000000ULL, 0x294F75CD1E32C40FULL }, /* XSUM_XXH3_testdata[7110] */\n    { 3555, 0x9E3779B185EBCA8DULL, 0x0873DC3E634E1A9DULL }, /* XSUM_XXH3_testdata[7111] */\n    { 3556, 0x0000000000000000ULL, 0xA4237F94D2FD6D01ULL }, /* XSUM_XXH3_testdata[7112] */\n    { 3556, 0x9E3779B185EBCA8DULL, 0x2489A06A4DCF3103ULL }, /* XSUM_XXH3_testdata[7113] */\n    { 3557, 0x0000000000000000ULL, 0x722C2FCF3BE61AE1ULL }, /* XSUM_XXH3_testdata[7114] */\n    { 3557, 0x9E3779B185EBCA8DULL, 0x3C17B01F08ACA576ULL }, /* XSUM_XXH3_testdata[7115] */\n    { 3558, 0x0000000000000000ULL, 0x274F1DF2D2FD2D09ULL }, /* XSUM_XXH3_testdata[7116] */\n    { 3558, 0x9E3779B185EBCA8DULL, 0x0BF25086DFE92169ULL }, /* XSUM_XXH3_testdata[7117] */\n    { 3559, 0x0000000000000000ULL, 0x4E4E18771F4919FAULL }, /* XSUM_XXH3_testdata[7118] */\n    { 3559, 0x9E3779B185EBCA8DULL, 0xA07A5686E36F9F0BULL }, /* XSUM_XXH3_testdata[7119] */\n    { 3560, 0x0000000000000000ULL, 0xA9A7CEA7CC0D573DULL }, /* XSUM_XXH3_testdata[7120] */\n    { 3560, 0x9E3779B185EBCA8DULL, 0xAE3432EED2CEBD1FULL }, /* XSUM_XXH3_testdata[7121] */\n    { 3561, 0x0000000000000000ULL, 0x1487A53D57713BF5ULL }, /* XSUM_XXH3_testdata[7122] */\n    { 3561, 0x9E3779B185EBCA8DULL, 0x833DD631DC8E3D62ULL }, /* XSUM_XXH3_testdata[7123] */\n    { 3562, 0x0000000000000000ULL, 0x8B3F554DFB49918FULL }, /* XSUM_XXH3_testdata[7124] */\n    { 3562, 0x9E3779B185EBCA8DULL, 0x455250994E286120ULL }, /* XSUM_XXH3_testdata[7125] */\n    { 3563, 0x0000000000000000ULL, 0x42B18C25D75724DDULL }, /* XSUM_XXH3_testdata[7126] */\n    { 3563, 0x9E3779B185EBCA8DULL, 0xF4B14B16682AEE35ULL }, /* XSUM_XXH3_testdata[7127] */\n    { 3564, 0x0000000000000000ULL, 0xC45207103DFE5459ULL }, /* XSUM_XXH3_testdata[7128] */\n    { 3564, 0x9E3779B185EBCA8DULL, 0x268660893C6BE3FFULL }, /* XSUM_XXH3_testdata[7129] */\n    { 3565, 0x0000000000000000ULL, 0x7EA7440DA5DE1034ULL }, /* XSUM_XXH3_testdata[7130] */\n    { 3565, 0x9E3779B185EBCA8DULL, 0xEB34A9D3E86EC4E3ULL }, /* XSUM_XXH3_testdata[7131] */\n    { 3566, 0x0000000000000000ULL, 0x2554A811CA1AC6B2ULL }, /* XSUM_XXH3_testdata[7132] */\n    { 3566, 0x9E3779B185EBCA8DULL, 0x78A675E3834817A9ULL }, /* XSUM_XXH3_testdata[7133] */\n    { 3567, 0x0000000000000000ULL, 0x6CB83092A773C943ULL }, /* XSUM_XXH3_testdata[7134] */\n    { 3567, 0x9E3779B185EBCA8DULL, 0x892F392819A08B3FULL }, /* XSUM_XXH3_testdata[7135] */\n    { 3568, 0x0000000000000000ULL, 0xAFB74CB13F672C01ULL }, /* XSUM_XXH3_testdata[7136] */\n    { 3568, 0x9E3779B185EBCA8DULL, 0x6EBA646E3A553F11ULL }, /* XSUM_XXH3_testdata[7137] */\n    { 3569, 0x0000000000000000ULL, 0x32EDCFEE170F5043ULL }, /* XSUM_XXH3_testdata[7138] */\n    { 3569, 0x9E3779B185EBCA8DULL, 0x6505C4F15EAF3A39ULL }, /* XSUM_XXH3_testdata[7139] */\n    { 3570, 0x0000000000000000ULL, 0x79E2D6B25304F053ULL }, /* XSUM_XXH3_testdata[7140] */\n    { 3570, 0x9E3779B185EBCA8DULL, 0xF6F4D30AFDC033D3ULL }, /* XSUM_XXH3_testdata[7141] */\n    { 3571, 0x0000000000000000ULL, 0x2B1456214F2109C3ULL }, /* XSUM_XXH3_testdata[7142] */\n    { 3571, 0x9E3779B185EBCA8DULL, 0xF251B8C586DD62E3ULL }, /* XSUM_XXH3_testdata[7143] */\n    { 3572, 0x0000000000000000ULL, 0x0AAB88F1CB058429ULL }, /* XSUM_XXH3_testdata[7144] */\n    { 3572, 0x9E3779B185EBCA8DULL, 0xCEB65F6ED58BB8DDULL }, /* XSUM_XXH3_testdata[7145] */\n    { 3573, 0x0000000000000000ULL, 0x006B7E62560ED657ULL }, /* XSUM_XXH3_testdata[7146] */\n    { 3573, 0x9E3779B185EBCA8DULL, 0x166BFA47B059BA61ULL }, /* XSUM_XXH3_testdata[7147] */\n    { 3574, 0x0000000000000000ULL, 0xC3E729B2EE5CBBE9ULL }, /* XSUM_XXH3_testdata[7148] */\n    { 3574, 0x9E3779B185EBCA8DULL, 0x4AC6E31B52DC128DULL }, /* XSUM_XXH3_testdata[7149] */\n    { 3575, 0x0000000000000000ULL, 0xB07AD514C9CF88D9ULL }, /* XSUM_XXH3_testdata[7150] */\n    { 3575, 0x9E3779B185EBCA8DULL, 0xDB53F9E7492CE18FULL }, /* XSUM_XXH3_testdata[7151] */\n    { 3576, 0x0000000000000000ULL, 0x31DE82458FD07128ULL }, /* XSUM_XXH3_testdata[7152] */\n    { 3576, 0x9E3779B185EBCA8DULL, 0x1341859CD2A40C80ULL }, /* XSUM_XXH3_testdata[7153] */\n    { 3577, 0x0000000000000000ULL, 0xF82B20916E6E9457ULL }, /* XSUM_XXH3_testdata[7154] */\n    { 3577, 0x9E3779B185EBCA8DULL, 0xF9E394EEC271A1C8ULL }, /* XSUM_XXH3_testdata[7155] */\n    { 3578, 0x0000000000000000ULL, 0x9FB57A5DAAD860FFULL }, /* XSUM_XXH3_testdata[7156] */\n    { 3578, 0x9E3779B185EBCA8DULL, 0xD7CC947000BA8D58ULL }, /* XSUM_XXH3_testdata[7157] */\n    { 3579, 0x0000000000000000ULL, 0x25ABC08107A016BAULL }, /* XSUM_XXH3_testdata[7158] */\n    { 3579, 0x9E3779B185EBCA8DULL, 0x125F0504A2BA0106ULL }, /* XSUM_XXH3_testdata[7159] */\n    { 3580, 0x0000000000000000ULL, 0x34EA64F41B8E6927ULL }, /* XSUM_XXH3_testdata[7160] */\n    { 3580, 0x9E3779B185EBCA8DULL, 0xAE4C173EE0108EFFULL }, /* XSUM_XXH3_testdata[7161] */\n    { 3581, 0x0000000000000000ULL, 0x201F2EF77AB96730ULL }, /* XSUM_XXH3_testdata[7162] */\n    { 3581, 0x9E3779B185EBCA8DULL, 0x425ED79ADBC7D660ULL }, /* XSUM_XXH3_testdata[7163] */\n    { 3582, 0x0000000000000000ULL, 0x322C6A43F77EFFEFULL }, /* XSUM_XXH3_testdata[7164] */\n    { 3582, 0x9E3779B185EBCA8DULL, 0x1FFB384D89EA209BULL }, /* XSUM_XXH3_testdata[7165] */\n    { 3583, 0x0000000000000000ULL, 0xE86866EA3CC2CC43ULL }, /* XSUM_XXH3_testdata[7166] */\n    { 3583, 0x9E3779B185EBCA8DULL, 0x9B29185982068C91ULL }, /* XSUM_XXH3_testdata[7167] */\n    { 3584, 0x0000000000000000ULL, 0x2AF9EAD626D25D94ULL }, /* XSUM_XXH3_testdata[7168] */\n    { 3584, 0x9E3779B185EBCA8DULL, 0xB6FC9C8B10AAB2CFULL }, /* XSUM_XXH3_testdata[7169] */\n    { 3585, 0x0000000000000000ULL, 0xF0D334FE274B6A91ULL }, /* XSUM_XXH3_testdata[7170] */\n    { 3585, 0x9E3779B185EBCA8DULL, 0xFD4786CE9F6DFC03ULL }, /* XSUM_XXH3_testdata[7171] */\n    { 3586, 0x0000000000000000ULL, 0xB8DB9C3D608FDC8AULL }, /* XSUM_XXH3_testdata[7172] */\n    { 3586, 0x9E3779B185EBCA8DULL, 0x4171818A418960B0ULL }, /* XSUM_XXH3_testdata[7173] */\n    { 3587, 0x0000000000000000ULL, 0xCECD706FDDFEA151ULL }, /* XSUM_XXH3_testdata[7174] */\n    { 3587, 0x9E3779B185EBCA8DULL, 0x3BD04E90AB23DF55ULL }, /* XSUM_XXH3_testdata[7175] */\n    { 3588, 0x0000000000000000ULL, 0x86485AE18E893682ULL }, /* XSUM_XXH3_testdata[7176] */\n    { 3588, 0x9E3779B185EBCA8DULL, 0xB7F96EF6F2CD907FULL }, /* XSUM_XXH3_testdata[7177] */\n    { 3589, 0x0000000000000000ULL, 0xF798C9AAC4FFC627ULL }, /* XSUM_XXH3_testdata[7178] */\n    { 3589, 0x9E3779B185EBCA8DULL, 0x78983FD6CBFB1601ULL }, /* XSUM_XXH3_testdata[7179] */\n    { 3590, 0x0000000000000000ULL, 0xA141AA3FE418801FULL }, /* XSUM_XXH3_testdata[7180] */\n    { 3590, 0x9E3779B185EBCA8DULL, 0xB15EF590F1E955C8ULL }, /* XSUM_XXH3_testdata[7181] */\n    { 3591, 0x0000000000000000ULL, 0xA9DF21A4D35BB610ULL }, /* XSUM_XXH3_testdata[7182] */\n    { 3591, 0x9E3779B185EBCA8DULL, 0x563A23C9417E8CB4ULL }, /* XSUM_XXH3_testdata[7183] */\n    { 3592, 0x0000000000000000ULL, 0xC3FBFE7A73562CBCULL }, /* XSUM_XXH3_testdata[7184] */\n    { 3592, 0x9E3779B185EBCA8DULL, 0xDEEA695CDD3BFB9FULL }, /* XSUM_XXH3_testdata[7185] */\n    { 3593, 0x0000000000000000ULL, 0xD29E95DE693E9014ULL }, /* XSUM_XXH3_testdata[7186] */\n    { 3593, 0x9E3779B185EBCA8DULL, 0xC56E25C9764CC202ULL }, /* XSUM_XXH3_testdata[7187] */\n    { 3594, 0x0000000000000000ULL, 0x6C1E228FED5BECC8ULL }, /* XSUM_XXH3_testdata[7188] */\n    { 3594, 0x9E3779B185EBCA8DULL, 0xAE44EE3A0B3E8AB0ULL }, /* XSUM_XXH3_testdata[7189] */\n    { 3595, 0x0000000000000000ULL, 0xE935CC0325A6067FULL }, /* XSUM_XXH3_testdata[7190] */\n    { 3595, 0x9E3779B185EBCA8DULL, 0xD0A65CB862DEB411ULL }, /* XSUM_XXH3_testdata[7191] */\n    { 3596, 0x0000000000000000ULL, 0x98F22C7F63866CCFULL }, /* XSUM_XXH3_testdata[7192] */\n    { 3596, 0x9E3779B185EBCA8DULL, 0xCB9A83003440D127ULL }, /* XSUM_XXH3_testdata[7193] */\n    { 3597, 0x0000000000000000ULL, 0xC61982D4F98F6AD5ULL }, /* XSUM_XXH3_testdata[7194] */\n    { 3597, 0x9E3779B185EBCA8DULL, 0x71D6BCB2F4EFFE6BULL }, /* XSUM_XXH3_testdata[7195] */\n    { 3598, 0x0000000000000000ULL, 0x1F7BCE3664E5902FULL }, /* XSUM_XXH3_testdata[7196] */\n    { 3598, 0x9E3779B185EBCA8DULL, 0x48749CF945445E65ULL }, /* XSUM_XXH3_testdata[7197] */\n    { 3599, 0x0000000000000000ULL, 0x6E855514404372F2ULL }, /* XSUM_XXH3_testdata[7198] */\n    { 3599, 0x9E3779B185EBCA8DULL, 0xE34FA316A98BE161ULL }, /* XSUM_XXH3_testdata[7199] */\n    { 3600, 0x0000000000000000ULL, 0xEC24DBD259A92CF9ULL }, /* XSUM_XXH3_testdata[7200] */\n    { 3600, 0x9E3779B185EBCA8DULL, 0x8964C0ED9681AB0BULL }, /* XSUM_XXH3_testdata[7201] */\n    { 3601, 0x0000000000000000ULL, 0x0C80A31650CED06BULL }, /* XSUM_XXH3_testdata[7202] */\n    { 3601, 0x9E3779B185EBCA8DULL, 0x74B82B0E04787D8CULL }, /* XSUM_XXH3_testdata[7203] */\n    { 3602, 0x0000000000000000ULL, 0x4DE3483FC4182F48ULL }, /* XSUM_XXH3_testdata[7204] */\n    { 3602, 0x9E3779B185EBCA8DULL, 0x7161C533B05B5F24ULL }, /* XSUM_XXH3_testdata[7205] */\n    { 3603, 0x0000000000000000ULL, 0x6EBFCC95D71CE048ULL }, /* XSUM_XXH3_testdata[7206] */\n    { 3603, 0x9E3779B185EBCA8DULL, 0x83FD806AC13CC621ULL }, /* XSUM_XXH3_testdata[7207] */\n    { 3604, 0x0000000000000000ULL, 0x7C528E5DD889A5B7ULL }, /* XSUM_XXH3_testdata[7208] */\n    { 3604, 0x9E3779B185EBCA8DULL, 0x77E6D86EA7B9E60BULL }, /* XSUM_XXH3_testdata[7209] */\n    { 3605, 0x0000000000000000ULL, 0x1775BBA9945AB5C7ULL }, /* XSUM_XXH3_testdata[7210] */\n    { 3605, 0x9E3779B185EBCA8DULL, 0xC4611E1571038030ULL }, /* XSUM_XXH3_testdata[7211] */\n    { 3606, 0x0000000000000000ULL, 0x13FA2FF572F0F0D4ULL }, /* XSUM_XXH3_testdata[7212] */\n    { 3606, 0x9E3779B185EBCA8DULL, 0x78379AC100A01282ULL }, /* XSUM_XXH3_testdata[7213] */\n    { 3607, 0x0000000000000000ULL, 0xB38ABFE4157261E4ULL }, /* XSUM_XXH3_testdata[7214] */\n    { 3607, 0x9E3779B185EBCA8DULL, 0x44FE5B51DD645D59ULL }, /* XSUM_XXH3_testdata[7215] */\n    { 3608, 0x0000000000000000ULL, 0x1EA557EFB225BD55ULL }, /* XSUM_XXH3_testdata[7216] */\n    { 3608, 0x9E3779B185EBCA8DULL, 0xCF5B8E6399DC3E6DULL }, /* XSUM_XXH3_testdata[7217] */\n    { 3609, 0x0000000000000000ULL, 0x5DAEC0E322AA11ACULL }, /* XSUM_XXH3_testdata[7218] */\n    { 3609, 0x9E3779B185EBCA8DULL, 0xB97A05380B5E97F4ULL }, /* XSUM_XXH3_testdata[7219] */\n    { 3610, 0x0000000000000000ULL, 0x0618560527D8EE74ULL }, /* XSUM_XXH3_testdata[7220] */\n    { 3610, 0x9E3779B185EBCA8DULL, 0x810CFF0D5D82C499ULL }, /* XSUM_XXH3_testdata[7221] */\n    { 3611, 0x0000000000000000ULL, 0x428CB7AB1700986EULL }, /* XSUM_XXH3_testdata[7222] */\n    { 3611, 0x9E3779B185EBCA8DULL, 0xCDA885166AFAEA10ULL }, /* XSUM_XXH3_testdata[7223] */\n    { 3612, 0x0000000000000000ULL, 0xD8F050F264F8572FULL }, /* XSUM_XXH3_testdata[7224] */\n    { 3612, 0x9E3779B185EBCA8DULL, 0x23481BBD0BB290ACULL }, /* XSUM_XXH3_testdata[7225] */\n    { 3613, 0x0000000000000000ULL, 0x7D2FE80FC76388AFULL }, /* XSUM_XXH3_testdata[7226] */\n    { 3613, 0x9E3779B185EBCA8DULL, 0x63489215D53E7F36ULL }, /* XSUM_XXH3_testdata[7227] */\n    { 3614, 0x0000000000000000ULL, 0x9EE18D9CE70D3D81ULL }, /* XSUM_XXH3_testdata[7228] */\n    { 3614, 0x9E3779B185EBCA8DULL, 0x44A9E8E08BA4F358ULL }, /* XSUM_XXH3_testdata[7229] */\n    { 3615, 0x0000000000000000ULL, 0x805D0048FE2B4461ULL }, /* XSUM_XXH3_testdata[7230] */\n    { 3615, 0x9E3779B185EBCA8DULL, 0xB8793230EFE60C6CULL }, /* XSUM_XXH3_testdata[7231] */\n    { 3616, 0x0000000000000000ULL, 0xE224004BA5C50173ULL }, /* XSUM_XXH3_testdata[7232] */\n    { 3616, 0x9E3779B185EBCA8DULL, 0xC495BF75B748E46FULL }, /* XSUM_XXH3_testdata[7233] */\n    { 3617, 0x0000000000000000ULL, 0x60AD3345643EF778ULL }, /* XSUM_XXH3_testdata[7234] */\n    { 3617, 0x9E3779B185EBCA8DULL, 0xF5C0690CA81473FAULL }, /* XSUM_XXH3_testdata[7235] */\n    { 3618, 0x0000000000000000ULL, 0xA05FE941BED3C5A6ULL }, /* XSUM_XXH3_testdata[7236] */\n    { 3618, 0x9E3779B185EBCA8DULL, 0xDDAAFD89E60E967EULL }, /* XSUM_XXH3_testdata[7237] */\n    { 3619, 0x0000000000000000ULL, 0x2E1FABE6A10E014AULL }, /* XSUM_XXH3_testdata[7238] */\n    { 3619, 0x9E3779B185EBCA8DULL, 0x62B46AE80876FDFFULL }, /* XSUM_XXH3_testdata[7239] */\n    { 3620, 0x0000000000000000ULL, 0x819F6BD70A3D520AULL }, /* XSUM_XXH3_testdata[7240] */\n    { 3620, 0x9E3779B185EBCA8DULL, 0x996A04888536CCDFULL }, /* XSUM_XXH3_testdata[7241] */\n    { 3621, 0x0000000000000000ULL, 0xB51D2FDE94AC39C0ULL }, /* XSUM_XXH3_testdata[7242] */\n    { 3621, 0x9E3779B185EBCA8DULL, 0xA86FAE2B6048A1EAULL }, /* XSUM_XXH3_testdata[7243] */\n    { 3622, 0x0000000000000000ULL, 0x5FBAFF28E55997C2ULL }, /* XSUM_XXH3_testdata[7244] */\n    { 3622, 0x9E3779B185EBCA8DULL, 0x04EA2187B3EB8741ULL }, /* XSUM_XXH3_testdata[7245] */\n    { 3623, 0x0000000000000000ULL, 0xC15DD9F52DF74671ULL }, /* XSUM_XXH3_testdata[7246] */\n    { 3623, 0x9E3779B185EBCA8DULL, 0x9790921F255745AEULL }, /* XSUM_XXH3_testdata[7247] */\n    { 3624, 0x0000000000000000ULL, 0x4E7C46B2442D5DC7ULL }, /* XSUM_XXH3_testdata[7248] */\n    { 3624, 0x9E3779B185EBCA8DULL, 0xC52C4A382BA1F303ULL }, /* XSUM_XXH3_testdata[7249] */\n    { 3625, 0x0000000000000000ULL, 0x7D1C31F2A34070B3ULL }, /* XSUM_XXH3_testdata[7250] */\n    { 3625, 0x9E3779B185EBCA8DULL, 0xFC641C9B2410A120ULL }, /* XSUM_XXH3_testdata[7251] */\n    { 3626, 0x0000000000000000ULL, 0xB81891D504173694ULL }, /* XSUM_XXH3_testdata[7252] */\n    { 3626, 0x9E3779B185EBCA8DULL, 0xF2D50EDF58249D59ULL }, /* XSUM_XXH3_testdata[7253] */\n    { 3627, 0x0000000000000000ULL, 0xF63AF445777115FAULL }, /* XSUM_XXH3_testdata[7254] */\n    { 3627, 0x9E3779B185EBCA8DULL, 0xC173275130321B6EULL }, /* XSUM_XXH3_testdata[7255] */\n    { 3628, 0x0000000000000000ULL, 0xEC5927B6AD279E13ULL }, /* XSUM_XXH3_testdata[7256] */\n    { 3628, 0x9E3779B185EBCA8DULL, 0x9693A39017C2A9ACULL }, /* XSUM_XXH3_testdata[7257] */\n    { 3629, 0x0000000000000000ULL, 0x71651D7611EC2532ULL }, /* XSUM_XXH3_testdata[7258] */\n    { 3629, 0x9E3779B185EBCA8DULL, 0x9718A64B81FD5DE1ULL }, /* XSUM_XXH3_testdata[7259] */\n    { 3630, 0x0000000000000000ULL, 0x7C449AB2BD997001ULL }, /* XSUM_XXH3_testdata[7260] */\n    { 3630, 0x9E3779B185EBCA8DULL, 0x7EB44826101D0ED4ULL }, /* XSUM_XXH3_testdata[7261] */\n    { 3631, 0x0000000000000000ULL, 0xDA4282DB4571841EULL }, /* XSUM_XXH3_testdata[7262] */\n    { 3631, 0x9E3779B185EBCA8DULL, 0xD9F1F147717C384EULL }, /* XSUM_XXH3_testdata[7263] */\n    { 3632, 0x0000000000000000ULL, 0x2E18036391ED1627ULL }, /* XSUM_XXH3_testdata[7264] */\n    { 3632, 0x9E3779B185EBCA8DULL, 0x132C5DF528C31BB6ULL }, /* XSUM_XXH3_testdata[7265] */\n    { 3633, 0x0000000000000000ULL, 0x209115FAE7B80378ULL }, /* XSUM_XXH3_testdata[7266] */\n    { 3633, 0x9E3779B185EBCA8DULL, 0xE866A17FAB1F0AF8ULL }, /* XSUM_XXH3_testdata[7267] */\n    { 3634, 0x0000000000000000ULL, 0x7DE2CA817F381BC0ULL }, /* XSUM_XXH3_testdata[7268] */\n    { 3634, 0x9E3779B185EBCA8DULL, 0xF462694243DBE9B8ULL }, /* XSUM_XXH3_testdata[7269] */\n    { 3635, 0x0000000000000000ULL, 0x46485158EA4469B8ULL }, /* XSUM_XXH3_testdata[7270] */\n    { 3635, 0x9E3779B185EBCA8DULL, 0x50D200F9426AB0B8ULL }, /* XSUM_XXH3_testdata[7271] */\n    { 3636, 0x0000000000000000ULL, 0x7DD0DD3A7FBB7019ULL }, /* XSUM_XXH3_testdata[7272] */\n    { 3636, 0x9E3779B185EBCA8DULL, 0xE717E13C97FAABAFULL }, /* XSUM_XXH3_testdata[7273] */\n    { 3637, 0x0000000000000000ULL, 0x983F18C1468B2D10ULL }, /* XSUM_XXH3_testdata[7274] */\n    { 3637, 0x9E3779B185EBCA8DULL, 0x8DF8356CF393EFC0ULL }, /* XSUM_XXH3_testdata[7275] */\n    { 3638, 0x0000000000000000ULL, 0x717C350EB3CD9807ULL }, /* XSUM_XXH3_testdata[7276] */\n    { 3638, 0x9E3779B185EBCA8DULL, 0x41B956F428CCAB4CULL }, /* XSUM_XXH3_testdata[7277] */\n    { 3639, 0x0000000000000000ULL, 0xD64AB539E854D1FEULL }, /* XSUM_XXH3_testdata[7278] */\n    { 3639, 0x9E3779B185EBCA8DULL, 0xE67F4E3648D08E65ULL }, /* XSUM_XXH3_testdata[7279] */\n    { 3640, 0x0000000000000000ULL, 0x083B58BA720C4DF3ULL }, /* XSUM_XXH3_testdata[7280] */\n    { 3640, 0x9E3779B185EBCA8DULL, 0xD09854B17E7E765CULL }, /* XSUM_XXH3_testdata[7281] */\n    { 3641, 0x0000000000000000ULL, 0xA6010F7BCC7EDE24ULL }, /* XSUM_XXH3_testdata[7282] */\n    { 3641, 0x9E3779B185EBCA8DULL, 0xBD61E0A48814535CULL }, /* XSUM_XXH3_testdata[7283] */\n    { 3642, 0x0000000000000000ULL, 0xFDA39821B3F36757ULL }, /* XSUM_XXH3_testdata[7284] */\n    { 3642, 0x9E3779B185EBCA8DULL, 0x2546DF17F90A2192ULL }, /* XSUM_XXH3_testdata[7285] */\n    { 3643, 0x0000000000000000ULL, 0x8BCB3B6F54E7DBAEULL }, /* XSUM_XXH3_testdata[7286] */\n    { 3643, 0x9E3779B185EBCA8DULL, 0x0CDBE992BAC2E837ULL }, /* XSUM_XXH3_testdata[7287] */\n    { 3644, 0x0000000000000000ULL, 0x52B947E32C3D68DCULL }, /* XSUM_XXH3_testdata[7288] */\n    { 3644, 0x9E3779B185EBCA8DULL, 0xA67E8BCB1BA3AD03ULL }, /* XSUM_XXH3_testdata[7289] */\n    { 3645, 0x0000000000000000ULL, 0x88FE1049B811C230ULL }, /* XSUM_XXH3_testdata[7290] */\n    { 3645, 0x9E3779B185EBCA8DULL, 0xE9CF3FD2C327C16FULL }, /* XSUM_XXH3_testdata[7291] */\n    { 3646, 0x0000000000000000ULL, 0xD26C15C31BDBBAA2ULL }, /* XSUM_XXH3_testdata[7292] */\n    { 3646, 0x9E3779B185EBCA8DULL, 0x271AFF2D889CD83EULL }, /* XSUM_XXH3_testdata[7293] */\n    { 3647, 0x0000000000000000ULL, 0x76579FBF54975EF8ULL }, /* XSUM_XXH3_testdata[7294] */\n    { 3647, 0x9E3779B185EBCA8DULL, 0x391A5EDBFEC575E3ULL }, /* XSUM_XXH3_testdata[7295] */\n    { 3648, 0x0000000000000000ULL, 0x610A4475518EA93BULL }, /* XSUM_XXH3_testdata[7296] */\n    { 3648, 0x9E3779B185EBCA8DULL, 0xD1470284DFFCC536ULL }, /* XSUM_XXH3_testdata[7297] */\n    { 3649, 0x0000000000000000ULL, 0x7355EAEB71F2ADD7ULL }, /* XSUM_XXH3_testdata[7298] */\n    { 3649, 0x9E3779B185EBCA8DULL, 0x43F63766EB203184ULL }, /* XSUM_XXH3_testdata[7299] */\n    { 3650, 0x0000000000000000ULL, 0x49220BDC3DC68B25ULL }, /* XSUM_XXH3_testdata[7300] */\n    { 3650, 0x9E3779B185EBCA8DULL, 0x43669AC1AF931192ULL }, /* XSUM_XXH3_testdata[7301] */\n    { 3651, 0x0000000000000000ULL, 0xD0F53AF95EBB06B4ULL }, /* XSUM_XXH3_testdata[7302] */\n    { 3651, 0x9E3779B185EBCA8DULL, 0x4511BCD1E506D310ULL }, /* XSUM_XXH3_testdata[7303] */\n    { 3652, 0x0000000000000000ULL, 0xD468B155F10FB02DULL }, /* XSUM_XXH3_testdata[7304] */\n    { 3652, 0x9E3779B185EBCA8DULL, 0x1C337EC9BE934644ULL }, /* XSUM_XXH3_testdata[7305] */\n    { 3653, 0x0000000000000000ULL, 0x9E9025CDC2778AD2ULL }, /* XSUM_XXH3_testdata[7306] */\n    { 3653, 0x9E3779B185EBCA8DULL, 0x0B6F102F04CE0841ULL }, /* XSUM_XXH3_testdata[7307] */\n    { 3654, 0x0000000000000000ULL, 0x9792DB0C1F18EFC8ULL }, /* XSUM_XXH3_testdata[7308] */\n    { 3654, 0x9E3779B185EBCA8DULL, 0x2E43CCFC8CEB2824ULL }, /* XSUM_XXH3_testdata[7309] */\n    { 3655, 0x0000000000000000ULL, 0x3E0610AB1BFEE240ULL }, /* XSUM_XXH3_testdata[7310] */\n    { 3655, 0x9E3779B185EBCA8DULL, 0x1AF7E00CB6C71727ULL }, /* XSUM_XXH3_testdata[7311] */\n    { 3656, 0x0000000000000000ULL, 0xB31EE9E702342246ULL }, /* XSUM_XXH3_testdata[7312] */\n    { 3656, 0x9E3779B185EBCA8DULL, 0x563F9E869AF53FC2ULL }, /* XSUM_XXH3_testdata[7313] */\n    { 3657, 0x0000000000000000ULL, 0x714874FD55D5AB76ULL }, /* XSUM_XXH3_testdata[7314] */\n    { 3657, 0x9E3779B185EBCA8DULL, 0x991F0CDCE38857A4ULL }, /* XSUM_XXH3_testdata[7315] */\n    { 3658, 0x0000000000000000ULL, 0x7D2BBDA44E88C402ULL }, /* XSUM_XXH3_testdata[7316] */\n    { 3658, 0x9E3779B185EBCA8DULL, 0xC96E20000F45DC7AULL }, /* XSUM_XXH3_testdata[7317] */\n    { 3659, 0x0000000000000000ULL, 0x388FAC01BB9971E7ULL }, /* XSUM_XXH3_testdata[7318] */\n    { 3659, 0x9E3779B185EBCA8DULL, 0x409B353294E7250BULL }, /* XSUM_XXH3_testdata[7319] */\n    { 3660, 0x0000000000000000ULL, 0x6658D39A5794EC9EULL }, /* XSUM_XXH3_testdata[7320] */\n    { 3660, 0x9E3779B185EBCA8DULL, 0x877A001BA85CD57FULL }, /* XSUM_XXH3_testdata[7321] */\n    { 3661, 0x0000000000000000ULL, 0x9229DEFEB9C5CFCFULL }, /* XSUM_XXH3_testdata[7322] */\n    { 3661, 0x9E3779B185EBCA8DULL, 0x0A7AB1E105A88727ULL }, /* XSUM_XXH3_testdata[7323] */\n    { 3662, 0x0000000000000000ULL, 0x0DEA8A92E86777ECULL }, /* XSUM_XXH3_testdata[7324] */\n    { 3662, 0x9E3779B185EBCA8DULL, 0xDA9D525FC518C611ULL }, /* XSUM_XXH3_testdata[7325] */\n    { 3663, 0x0000000000000000ULL, 0x7645DFFB0345DC71ULL }, /* XSUM_XXH3_testdata[7326] */\n    { 3663, 0x9E3779B185EBCA8DULL, 0x1F14663C9906311FULL }, /* XSUM_XXH3_testdata[7327] */\n    { 3664, 0x0000000000000000ULL, 0x2B813BC349183AD8ULL }, /* XSUM_XXH3_testdata[7328] */\n    { 3664, 0x9E3779B185EBCA8DULL, 0x1C688F2BB8FEACA0ULL }, /* XSUM_XXH3_testdata[7329] */\n    { 3665, 0x0000000000000000ULL, 0x74E7A9D6B3E98D45ULL }, /* XSUM_XXH3_testdata[7330] */\n    { 3665, 0x9E3779B185EBCA8DULL, 0x334D7716485A5AEDULL }, /* XSUM_XXH3_testdata[7331] */\n    { 3666, 0x0000000000000000ULL, 0x057313555EE1643EULL }, /* XSUM_XXH3_testdata[7332] */\n    { 3666, 0x9E3779B185EBCA8DULL, 0x43EA2793D65754A1ULL }, /* XSUM_XXH3_testdata[7333] */\n    { 3667, 0x0000000000000000ULL, 0x472EC8CC0F5932EDULL }, /* XSUM_XXH3_testdata[7334] */\n    { 3667, 0x9E3779B185EBCA8DULL, 0xA1E9CB6FD03E99CCULL }, /* XSUM_XXH3_testdata[7335] */\n    { 3668, 0x0000000000000000ULL, 0x20A378B56457CC71ULL }, /* XSUM_XXH3_testdata[7336] */\n    { 3668, 0x9E3779B185EBCA8DULL, 0xDEF548BC96712061ULL }, /* XSUM_XXH3_testdata[7337] */\n    { 3669, 0x0000000000000000ULL, 0x5A4CABE2108EB0AEULL }, /* XSUM_XXH3_testdata[7338] */\n    { 3669, 0x9E3779B185EBCA8DULL, 0x0AFD1831FA89CFB4ULL }, /* XSUM_XXH3_testdata[7339] */\n    { 3670, 0x0000000000000000ULL, 0x82019D1F6C3E2E74ULL }, /* XSUM_XXH3_testdata[7340] */\n    { 3670, 0x9E3779B185EBCA8DULL, 0xD6D8C4CA9D0AB2C3ULL }, /* XSUM_XXH3_testdata[7341] */\n    { 3671, 0x0000000000000000ULL, 0xE47829572E431531ULL }, /* XSUM_XXH3_testdata[7342] */\n    { 3671, 0x9E3779B185EBCA8DULL, 0xE343EED75B07F8C0ULL }, /* XSUM_XXH3_testdata[7343] */\n    { 3672, 0x0000000000000000ULL, 0x8DDCAA138D9C6C24ULL }, /* XSUM_XXH3_testdata[7344] */\n    { 3672, 0x9E3779B185EBCA8DULL, 0xB77A7680E8EFB54CULL }, /* XSUM_XXH3_testdata[7345] */\n    { 3673, 0x0000000000000000ULL, 0x89DA001EE3A0B053ULL }, /* XSUM_XXH3_testdata[7346] */\n    { 3673, 0x9E3779B185EBCA8DULL, 0x0DF66A76DB3C0056ULL }, /* XSUM_XXH3_testdata[7347] */\n    { 3674, 0x0000000000000000ULL, 0xD81F9027F710D6E4ULL }, /* XSUM_XXH3_testdata[7348] */\n    { 3674, 0x9E3779B185EBCA8DULL, 0x2ED21B61A2F8840FULL }, /* XSUM_XXH3_testdata[7349] */\n    { 3675, 0x0000000000000000ULL, 0x82CBFF9D183E749FULL }, /* XSUM_XXH3_testdata[7350] */\n    { 3675, 0x9E3779B185EBCA8DULL, 0xDD56A057434E8529ULL }, /* XSUM_XXH3_testdata[7351] */\n    { 3676, 0x0000000000000000ULL, 0xF5AC5F41BBB7EE12ULL }, /* XSUM_XXH3_testdata[7352] */\n    { 3676, 0x9E3779B185EBCA8DULL, 0x4F0900B248D31555ULL }, /* XSUM_XXH3_testdata[7353] */\n    { 3677, 0x0000000000000000ULL, 0x68D21C5BC5A86459ULL }, /* XSUM_XXH3_testdata[7354] */\n    { 3677, 0x9E3779B185EBCA8DULL, 0xF5028F8358823812ULL }, /* XSUM_XXH3_testdata[7355] */\n    { 3678, 0x0000000000000000ULL, 0x30B49D06835F3AC3ULL }, /* XSUM_XXH3_testdata[7356] */\n    { 3678, 0x9E3779B185EBCA8DULL, 0x9817808DDC221565ULL }, /* XSUM_XXH3_testdata[7357] */\n    { 3679, 0x0000000000000000ULL, 0xB8E3272D2F06B449ULL }, /* XSUM_XXH3_testdata[7358] */\n    { 3679, 0x9E3779B185EBCA8DULL, 0x5736B2C5C03A0720ULL }, /* XSUM_XXH3_testdata[7359] */\n    { 3680, 0x0000000000000000ULL, 0xCEDB8AB1C347936EULL }, /* XSUM_XXH3_testdata[7360] */\n    { 3680, 0x9E3779B185EBCA8DULL, 0x2F50AC8E8F284017ULL }, /* XSUM_XXH3_testdata[7361] */\n    { 3681, 0x0000000000000000ULL, 0x6550E7E182454B71ULL }, /* XSUM_XXH3_testdata[7362] */\n    { 3681, 0x9E3779B185EBCA8DULL, 0x26C4F4D208002F53ULL }, /* XSUM_XXH3_testdata[7363] */\n    { 3682, 0x0000000000000000ULL, 0x1A3CE9C073D99D8FULL }, /* XSUM_XXH3_testdata[7364] */\n    { 3682, 0x9E3779B185EBCA8DULL, 0x01EEA2098BD2CB83ULL }, /* XSUM_XXH3_testdata[7365] */\n    { 3683, 0x0000000000000000ULL, 0x07B59DA40C98D2F1ULL }, /* XSUM_XXH3_testdata[7366] */\n    { 3683, 0x9E3779B185EBCA8DULL, 0xB53E0C157F767219ULL }, /* XSUM_XXH3_testdata[7367] */\n    { 3684, 0x0000000000000000ULL, 0x4E1C5A0C63E98879ULL }, /* XSUM_XXH3_testdata[7368] */\n    { 3684, 0x9E3779B185EBCA8DULL, 0x48A1B9C9EB852A95ULL }, /* XSUM_XXH3_testdata[7369] */\n    { 3685, 0x0000000000000000ULL, 0xAA83A3F5C90A9558ULL }, /* XSUM_XXH3_testdata[7370] */\n    { 3685, 0x9E3779B185EBCA8DULL, 0x4CD131EA08ACCDDCULL }, /* XSUM_XXH3_testdata[7371] */\n    { 3686, 0x0000000000000000ULL, 0x9903B927FE6E57DEULL }, /* XSUM_XXH3_testdata[7372] */\n    { 3686, 0x9E3779B185EBCA8DULL, 0x52D4FE4DCB866096ULL }, /* XSUM_XXH3_testdata[7373] */\n    { 3687, 0x0000000000000000ULL, 0x0EC74B98C8E26F7BULL }, /* XSUM_XXH3_testdata[7374] */\n    { 3687, 0x9E3779B185EBCA8DULL, 0x5BB8229D8A74E2EDULL }, /* XSUM_XXH3_testdata[7375] */\n    { 3688, 0x0000000000000000ULL, 0x9F78C9CFBAA50470ULL }, /* XSUM_XXH3_testdata[7376] */\n    { 3688, 0x9E3779B185EBCA8DULL, 0xAE63489AAE57AE33ULL }, /* XSUM_XXH3_testdata[7377] */\n    { 3689, 0x0000000000000000ULL, 0x2A952671D26A6FFAULL }, /* XSUM_XXH3_testdata[7378] */\n    { 3689, 0x9E3779B185EBCA8DULL, 0xE038C243D2CCA34EULL }, /* XSUM_XXH3_testdata[7379] */\n    { 3690, 0x0000000000000000ULL, 0x529F41A68EF2AA3EULL }, /* XSUM_XXH3_testdata[7380] */\n    { 3690, 0x9E3779B185EBCA8DULL, 0xEFD1AD4FCFC6FBBDULL }, /* XSUM_XXH3_testdata[7381] */\n    { 3691, 0x0000000000000000ULL, 0x3659D81C4A6C3DF6ULL }, /* XSUM_XXH3_testdata[7382] */\n    { 3691, 0x9E3779B185EBCA8DULL, 0xB3678284360EE813ULL }, /* XSUM_XXH3_testdata[7383] */\n    { 3692, 0x0000000000000000ULL, 0x7F3F4732C7238C59ULL }, /* XSUM_XXH3_testdata[7384] */\n    { 3692, 0x9E3779B185EBCA8DULL, 0x144CFF00565F45BAULL }, /* XSUM_XXH3_testdata[7385] */\n    { 3693, 0x0000000000000000ULL, 0x91ADED714C093708ULL }, /* XSUM_XXH3_testdata[7386] */\n    { 3693, 0x9E3779B185EBCA8DULL, 0xF29B4E6485A31250ULL }, /* XSUM_XXH3_testdata[7387] */\n    { 3694, 0x0000000000000000ULL, 0x6F0440F2434F1AECULL }, /* XSUM_XXH3_testdata[7388] */\n    { 3694, 0x9E3779B185EBCA8DULL, 0x6605B7A79602CB9DULL }, /* XSUM_XXH3_testdata[7389] */\n    { 3695, 0x0000000000000000ULL, 0x62396D74B3807469ULL }, /* XSUM_XXH3_testdata[7390] */\n    { 3695, 0x9E3779B185EBCA8DULL, 0xEB50F68A2F82600AULL }, /* XSUM_XXH3_testdata[7391] */\n    { 3696, 0x0000000000000000ULL, 0x9DEB9F6FCB13C1D1ULL }, /* XSUM_XXH3_testdata[7392] */\n    { 3696, 0x9E3779B185EBCA8DULL, 0xDFD8A81D57831F5AULL }, /* XSUM_XXH3_testdata[7393] */\n    { 3697, 0x0000000000000000ULL, 0x2BE03188E30F00BAULL }, /* XSUM_XXH3_testdata[7394] */\n    { 3697, 0x9E3779B185EBCA8DULL, 0x6092B3B0C7B588EFULL }, /* XSUM_XXH3_testdata[7395] */\n    { 3698, 0x0000000000000000ULL, 0x5ED20B63A3F94214ULL }, /* XSUM_XXH3_testdata[7396] */\n    { 3698, 0x9E3779B185EBCA8DULL, 0x864F42F85EFE0BBAULL }, /* XSUM_XXH3_testdata[7397] */\n    { 3699, 0x0000000000000000ULL, 0xC689706F998A00C3ULL }, /* XSUM_XXH3_testdata[7398] */\n    { 3699, 0x9E3779B185EBCA8DULL, 0x0D1883CBE5717F8FULL }, /* XSUM_XXH3_testdata[7399] */\n    { 3700, 0x0000000000000000ULL, 0xE6A90433FB2F086BULL }, /* XSUM_XXH3_testdata[7400] */\n    { 3700, 0x9E3779B185EBCA8DULL, 0x6AF73F6E9BE7EAD0ULL }, /* XSUM_XXH3_testdata[7401] */\n    { 3701, 0x0000000000000000ULL, 0xB81DABC129DE83F4ULL }, /* XSUM_XXH3_testdata[7402] */\n    { 3701, 0x9E3779B185EBCA8DULL, 0x29D4D6930E899D09ULL }, /* XSUM_XXH3_testdata[7403] */\n    { 3702, 0x0000000000000000ULL, 0xE6060A782BEE1FBCULL }, /* XSUM_XXH3_testdata[7404] */\n    { 3702, 0x9E3779B185EBCA8DULL, 0xF9BE6AAA96953CE4ULL }, /* XSUM_XXH3_testdata[7405] */\n    { 3703, 0x0000000000000000ULL, 0xE6F3FEB5D81374C0ULL }, /* XSUM_XXH3_testdata[7406] */\n    { 3703, 0x9E3779B185EBCA8DULL, 0x1BD0294C74993124ULL }, /* XSUM_XXH3_testdata[7407] */\n    { 3704, 0x0000000000000000ULL, 0xC338F23B324DBB9AULL }, /* XSUM_XXH3_testdata[7408] */\n    { 3704, 0x9E3779B185EBCA8DULL, 0x8F4146188F8CE740ULL }, /* XSUM_XXH3_testdata[7409] */\n    { 3705, 0x0000000000000000ULL, 0xA7A142E3469E3183ULL }, /* XSUM_XXH3_testdata[7410] */\n    { 3705, 0x9E3779B185EBCA8DULL, 0x0624F76D4D087EA7ULL }, /* XSUM_XXH3_testdata[7411] */\n    { 3706, 0x0000000000000000ULL, 0x7827841051328D85ULL }, /* XSUM_XXH3_testdata[7412] */\n    { 3706, 0x9E3779B185EBCA8DULL, 0xE84DA382E63CBC76ULL }, /* XSUM_XXH3_testdata[7413] */\n    { 3707, 0x0000000000000000ULL, 0xF1A2459F1B360D44ULL }, /* XSUM_XXH3_testdata[7414] */\n    { 3707, 0x9E3779B185EBCA8DULL, 0x91E6043E763B72ADULL }, /* XSUM_XXH3_testdata[7415] */\n    { 3708, 0x0000000000000000ULL, 0x693FE3C3A8505B5AULL }, /* XSUM_XXH3_testdata[7416] */\n    { 3708, 0x9E3779B185EBCA8DULL, 0x065560626340E3CEULL }, /* XSUM_XXH3_testdata[7417] */\n    { 3709, 0x0000000000000000ULL, 0xE652AD737192EBA9ULL }, /* XSUM_XXH3_testdata[7418] */\n    { 3709, 0x9E3779B185EBCA8DULL, 0x40800D8F73C138C6ULL }, /* XSUM_XXH3_testdata[7419] */\n    { 3710, 0x0000000000000000ULL, 0x0D0354875972AADAULL }, /* XSUM_XXH3_testdata[7420] */\n    { 3710, 0x9E3779B185EBCA8DULL, 0x6F84F6348BF70FACULL }, /* XSUM_XXH3_testdata[7421] */\n    { 3711, 0x0000000000000000ULL, 0x9485A0B8934E04EAULL }, /* XSUM_XXH3_testdata[7422] */\n    { 3711, 0x9E3779B185EBCA8DULL, 0x2B7E3B2F33D0CAB6ULL }, /* XSUM_XXH3_testdata[7423] */\n    { 3712, 0x0000000000000000ULL, 0x09A90CC714E0F0C3ULL }, /* XSUM_XXH3_testdata[7424] */\n    { 3712, 0x9E3779B185EBCA8DULL, 0xE2E4513A65CE25ACULL }, /* XSUM_XXH3_testdata[7425] */\n    { 3713, 0x0000000000000000ULL, 0x02CDD57D95AEEBC3ULL }, /* XSUM_XXH3_testdata[7426] */\n    { 3713, 0x9E3779B185EBCA8DULL, 0x5D2B0E22E2A986EAULL }, /* XSUM_XXH3_testdata[7427] */\n    { 3714, 0x0000000000000000ULL, 0xD98F7052D7F549F3ULL }, /* XSUM_XXH3_testdata[7428] */\n    { 3714, 0x9E3779B185EBCA8DULL, 0xFC8CC370A4791CD8ULL }, /* XSUM_XXH3_testdata[7429] */\n    { 3715, 0x0000000000000000ULL, 0x3FE8B5DBACBB95B0ULL }, /* XSUM_XXH3_testdata[7430] */\n    { 3715, 0x9E3779B185EBCA8DULL, 0x30CD4C3BD9D73599ULL }, /* XSUM_XXH3_testdata[7431] */\n    { 3716, 0x0000000000000000ULL, 0x513C9DABFD807F3CULL }, /* XSUM_XXH3_testdata[7432] */\n    { 3716, 0x9E3779B185EBCA8DULL, 0x4FC039FA36A3F823ULL }, /* XSUM_XXH3_testdata[7433] */\n    { 3717, 0x0000000000000000ULL, 0xB43EE4662B6EFCBEULL }, /* XSUM_XXH3_testdata[7434] */\n    { 3717, 0x9E3779B185EBCA8DULL, 0xDFF9F622B896974AULL }, /* XSUM_XXH3_testdata[7435] */\n    { 3718, 0x0000000000000000ULL, 0x4526037CC817421EULL }, /* XSUM_XXH3_testdata[7436] */\n    { 3718, 0x9E3779B185EBCA8DULL, 0x49D4604E10E46CA3ULL }, /* XSUM_XXH3_testdata[7437] */\n    { 3719, 0x0000000000000000ULL, 0xEF0783A5717C5158ULL }, /* XSUM_XXH3_testdata[7438] */\n    { 3719, 0x9E3779B185EBCA8DULL, 0x1CA3A0942FAA5299ULL }, /* XSUM_XXH3_testdata[7439] */\n    { 3720, 0x0000000000000000ULL, 0x89A84DDB6CD1153AULL }, /* XSUM_XXH3_testdata[7440] */\n    { 3720, 0x9E3779B185EBCA8DULL, 0x73897329F114958BULL }, /* XSUM_XXH3_testdata[7441] */\n    { 3721, 0x0000000000000000ULL, 0xCA31357C8308F48FULL }, /* XSUM_XXH3_testdata[7442] */\n    { 3721, 0x9E3779B185EBCA8DULL, 0x7F7547E6D51145B1ULL }, /* XSUM_XXH3_testdata[7443] */\n    { 3722, 0x0000000000000000ULL, 0x69FE031C6805ACA3ULL }, /* XSUM_XXH3_testdata[7444] */\n    { 3722, 0x9E3779B185EBCA8DULL, 0xDA8A4C35AE999E31ULL }, /* XSUM_XXH3_testdata[7445] */\n    { 3723, 0x0000000000000000ULL, 0x6B3D87A525E5D55AULL }, /* XSUM_XXH3_testdata[7446] */\n    { 3723, 0x9E3779B185EBCA8DULL, 0xA0D1DD5C643ACF76ULL }, /* XSUM_XXH3_testdata[7447] */\n    { 3724, 0x0000000000000000ULL, 0x78DFC979977ACE9CULL }, /* XSUM_XXH3_testdata[7448] */\n    { 3724, 0x9E3779B185EBCA8DULL, 0xA46DD8844CA63062ULL }, /* XSUM_XXH3_testdata[7449] */\n    { 3725, 0x0000000000000000ULL, 0x18F749CBAE11D021ULL }, /* XSUM_XXH3_testdata[7450] */\n    { 3725, 0x9E3779B185EBCA8DULL, 0xEA9174E9A43BD9A5ULL }, /* XSUM_XXH3_testdata[7451] */\n    { 3726, 0x0000000000000000ULL, 0xBA376D29BF143E24ULL }, /* XSUM_XXH3_testdata[7452] */\n    { 3726, 0x9E3779B185EBCA8DULL, 0x02E273037A8F35F0ULL }, /* XSUM_XXH3_testdata[7453] */\n    { 3727, 0x0000000000000000ULL, 0x55B8146358325573ULL }, /* XSUM_XXH3_testdata[7454] */\n    { 3727, 0x9E3779B185EBCA8DULL, 0x4462E034B0AD298BULL }, /* XSUM_XXH3_testdata[7455] */\n    { 3728, 0x0000000000000000ULL, 0x59BB474966976FECULL }, /* XSUM_XXH3_testdata[7456] */\n    { 3728, 0x9E3779B185EBCA8DULL, 0x8A40108D3EF3BAFFULL }, /* XSUM_XXH3_testdata[7457] */\n    { 3729, 0x0000000000000000ULL, 0xA0D47376DA73CF93ULL }, /* XSUM_XXH3_testdata[7458] */\n    { 3729, 0x9E3779B185EBCA8DULL, 0xDC635F4DC0D43A8EULL }, /* XSUM_XXH3_testdata[7459] */\n    { 3730, 0x0000000000000000ULL, 0x04BD448733D3769CULL }, /* XSUM_XXH3_testdata[7460] */\n    { 3730, 0x9E3779B185EBCA8DULL, 0x8B5411EE4654B2C5ULL }, /* XSUM_XXH3_testdata[7461] */\n    { 3731, 0x0000000000000000ULL, 0xC85ECC7AF5D2B2CBULL }, /* XSUM_XXH3_testdata[7462] */\n    { 3731, 0x9E3779B185EBCA8DULL, 0xF4834D9116B0DC17ULL }, /* XSUM_XXH3_testdata[7463] */\n    { 3732, 0x0000000000000000ULL, 0x32B2C45489FA7153ULL }, /* XSUM_XXH3_testdata[7464] */\n    { 3732, 0x9E3779B185EBCA8DULL, 0xE5690B05A6716E8DULL }, /* XSUM_XXH3_testdata[7465] */\n    { 3733, 0x0000000000000000ULL, 0x8CC202AF0213DB19ULL }, /* XSUM_XXH3_testdata[7466] */\n    { 3733, 0x9E3779B185EBCA8DULL, 0x739E0B6E01D50941ULL }, /* XSUM_XXH3_testdata[7467] */\n    { 3734, 0x0000000000000000ULL, 0x614262D97FABE3B1ULL }, /* XSUM_XXH3_testdata[7468] */\n    { 3734, 0x9E3779B185EBCA8DULL, 0x9E72B381D4C2B189ULL }, /* XSUM_XXH3_testdata[7469] */\n    { 3735, 0x0000000000000000ULL, 0xE5CCCB7DE403691DULL }, /* XSUM_XXH3_testdata[7470] */\n    { 3735, 0x9E3779B185EBCA8DULL, 0xAFC0C48AD1328C65ULL }, /* XSUM_XXH3_testdata[7471] */\n    { 3736, 0x0000000000000000ULL, 0x5502670C3FB7D016ULL }, /* XSUM_XXH3_testdata[7472] */\n    { 3736, 0x9E3779B185EBCA8DULL, 0x350691E72B4DD829ULL }, /* XSUM_XXH3_testdata[7473] */\n    { 3737, 0x0000000000000000ULL, 0x1C0D9132913AB65BULL }, /* XSUM_XXH3_testdata[7474] */\n    { 3737, 0x9E3779B185EBCA8DULL, 0x691AC974C80C9CB4ULL }, /* XSUM_XXH3_testdata[7475] */\n    { 3738, 0x0000000000000000ULL, 0x50928AD862FF5482ULL }, /* XSUM_XXH3_testdata[7476] */\n    { 3738, 0x9E3779B185EBCA8DULL, 0x791AB6E4E1D79DA5ULL }, /* XSUM_XXH3_testdata[7477] */\n    { 3739, 0x0000000000000000ULL, 0x788A893F3580DBB3ULL }, /* XSUM_XXH3_testdata[7478] */\n    { 3739, 0x9E3779B185EBCA8DULL, 0x35A7C64D137ED697ULL }, /* XSUM_XXH3_testdata[7479] */\n    { 3740, 0x0000000000000000ULL, 0xEF36F51A70E1176AULL }, /* XSUM_XXH3_testdata[7480] */\n    { 3740, 0x9E3779B185EBCA8DULL, 0xD79EB7C11F7D73C7ULL }, /* XSUM_XXH3_testdata[7481] */\n    { 3741, 0x0000000000000000ULL, 0x160D545C4F12D175ULL }, /* XSUM_XXH3_testdata[7482] */\n    { 3741, 0x9E3779B185EBCA8DULL, 0x23083B142A17BCCCULL }, /* XSUM_XXH3_testdata[7483] */\n    { 3742, 0x0000000000000000ULL, 0x048D23A67900441DULL }, /* XSUM_XXH3_testdata[7484] */\n    { 3742, 0x9E3779B185EBCA8DULL, 0x94858FFC745EDE56ULL }, /* XSUM_XXH3_testdata[7485] */\n    { 3743, 0x0000000000000000ULL, 0x8F8E421BB56A72D7ULL }, /* XSUM_XXH3_testdata[7486] */\n    { 3743, 0x9E3779B185EBCA8DULL, 0x211E8D9A2B00DFBEULL }, /* XSUM_XXH3_testdata[7487] */\n    { 3744, 0x0000000000000000ULL, 0x6FDA6CC50FFF775EULL }, /* XSUM_XXH3_testdata[7488] */\n    { 3744, 0x9E3779B185EBCA8DULL, 0x6B9BB526E508A2A4ULL }, /* XSUM_XXH3_testdata[7489] */\n    { 3745, 0x0000000000000000ULL, 0xCBE92041CADA6769ULL }, /* XSUM_XXH3_testdata[7490] */\n    { 3745, 0x9E3779B185EBCA8DULL, 0x7A374D815AD594DBULL }, /* XSUM_XXH3_testdata[7491] */\n    { 3746, 0x0000000000000000ULL, 0x196895C9869F0984ULL }, /* XSUM_XXH3_testdata[7492] */\n    { 3746, 0x9E3779B185EBCA8DULL, 0x8954653330AA1AEDULL }, /* XSUM_XXH3_testdata[7493] */\n    { 3747, 0x0000000000000000ULL, 0x21DAA55D79F707B1ULL }, /* XSUM_XXH3_testdata[7494] */\n    { 3747, 0x9E3779B185EBCA8DULL, 0x4066CC6D67A45999ULL }, /* XSUM_XXH3_testdata[7495] */\n    { 3748, 0x0000000000000000ULL, 0x216E93059BA46330ULL }, /* XSUM_XXH3_testdata[7496] */\n    { 3748, 0x9E3779B185EBCA8DULL, 0xA03B92EF3F4FCB50ULL }, /* XSUM_XXH3_testdata[7497] */\n    { 3749, 0x0000000000000000ULL, 0x17CC59CD036A9607ULL }, /* XSUM_XXH3_testdata[7498] */\n    { 3749, 0x9E3779B185EBCA8DULL, 0xC0F9FF0DD0F46AE4ULL }, /* XSUM_XXH3_testdata[7499] */\n    { 3750, 0x0000000000000000ULL, 0xE386F95CAF4835E8ULL }, /* XSUM_XXH3_testdata[7500] */\n    { 3750, 0x9E3779B185EBCA8DULL, 0xBA62D59E44DCBFA7ULL }, /* XSUM_XXH3_testdata[7501] */\n    { 3751, 0x0000000000000000ULL, 0xEF18B53F73CD64B5ULL }, /* XSUM_XXH3_testdata[7502] */\n    { 3751, 0x9E3779B185EBCA8DULL, 0xE9E2FDDFF4EB6712ULL }, /* XSUM_XXH3_testdata[7503] */\n    { 3752, 0x0000000000000000ULL, 0x5E536EED5442A058ULL }, /* XSUM_XXH3_testdata[7504] */\n    { 3752, 0x9E3779B185EBCA8DULL, 0xD56F640E0C162CF7ULL }, /* XSUM_XXH3_testdata[7505] */\n    { 3753, 0x0000000000000000ULL, 0x74EF504AF879B808ULL }, /* XSUM_XXH3_testdata[7506] */\n    { 3753, 0x9E3779B185EBCA8DULL, 0x709127F88C3DF13CULL }, /* XSUM_XXH3_testdata[7507] */\n    { 3754, 0x0000000000000000ULL, 0x31C9008085741884ULL }, /* XSUM_XXH3_testdata[7508] */\n    { 3754, 0x9E3779B185EBCA8DULL, 0x93365D974F825F2FULL }, /* XSUM_XXH3_testdata[7509] */\n    { 3755, 0x0000000000000000ULL, 0xF31CDEF874993121ULL }, /* XSUM_XXH3_testdata[7510] */\n    { 3755, 0x9E3779B185EBCA8DULL, 0x3A5237AB9C4B9DABULL }, /* XSUM_XXH3_testdata[7511] */\n    { 3756, 0x0000000000000000ULL, 0x875A6A708A10D7A5ULL }, /* XSUM_XXH3_testdata[7512] */\n    { 3756, 0x9E3779B185EBCA8DULL, 0x647D099636D67886ULL }, /* XSUM_XXH3_testdata[7513] */\n    { 3757, 0x0000000000000000ULL, 0xDA5F418C0C48B9F3ULL }, /* XSUM_XXH3_testdata[7514] */\n    { 3757, 0x9E3779B185EBCA8DULL, 0xDD5E0A89173AC558ULL }, /* XSUM_XXH3_testdata[7515] */\n    { 3758, 0x0000000000000000ULL, 0xE4FD66CE689C4C38ULL }, /* XSUM_XXH3_testdata[7516] */\n    { 3758, 0x9E3779B185EBCA8DULL, 0x6B1D2773AB1C257EULL }, /* XSUM_XXH3_testdata[7517] */\n    { 3759, 0x0000000000000000ULL, 0xA33D54DF0582FDD3ULL }, /* XSUM_XXH3_testdata[7518] */\n    { 3759, 0x9E3779B185EBCA8DULL, 0xBD4FD631EF67C7ACULL }, /* XSUM_XXH3_testdata[7519] */\n    { 3760, 0x0000000000000000ULL, 0xCE4B2BC11D0DD601ULL }, /* XSUM_XXH3_testdata[7520] */\n    { 3760, 0x9E3779B185EBCA8DULL, 0xE6D4C63D68AFE2E4ULL }, /* XSUM_XXH3_testdata[7521] */\n    { 3761, 0x0000000000000000ULL, 0xF3ACB5DDFDC8EC24ULL }, /* XSUM_XXH3_testdata[7522] */\n    { 3761, 0x9E3779B185EBCA8DULL, 0xC44120D54A8C985BULL }, /* XSUM_XXH3_testdata[7523] */\n    { 3762, 0x0000000000000000ULL, 0xE1DBF7FFD31762EDULL }, /* XSUM_XXH3_testdata[7524] */\n    { 3762, 0x9E3779B185EBCA8DULL, 0xDE71A2766082AF5CULL }, /* XSUM_XXH3_testdata[7525] */\n    { 3763, 0x0000000000000000ULL, 0x99D0CA424979CFC4ULL }, /* XSUM_XXH3_testdata[7526] */\n    { 3763, 0x9E3779B185EBCA8DULL, 0x77DE869DB10834A6ULL }, /* XSUM_XXH3_testdata[7527] */\n    { 3764, 0x0000000000000000ULL, 0x975000D6E24B65AAULL }, /* XSUM_XXH3_testdata[7528] */\n    { 3764, 0x9E3779B185EBCA8DULL, 0x27C414411195A2B6ULL }, /* XSUM_XXH3_testdata[7529] */\n    { 3765, 0x0000000000000000ULL, 0xA54B018E1EA523E1ULL }, /* XSUM_XXH3_testdata[7530] */\n    { 3765, 0x9E3779B185EBCA8DULL, 0x9A3775C8860D1647ULL }, /* XSUM_XXH3_testdata[7531] */\n    { 3766, 0x0000000000000000ULL, 0xF6CC319B0CE415ABULL }, /* XSUM_XXH3_testdata[7532] */\n    { 3766, 0x9E3779B185EBCA8DULL, 0x43D40AFB31D7B9A4ULL }, /* XSUM_XXH3_testdata[7533] */\n    { 3767, 0x0000000000000000ULL, 0xC92638F48F4B4B4AULL }, /* XSUM_XXH3_testdata[7534] */\n    { 3767, 0x9E3779B185EBCA8DULL, 0xC684479AE4E462D9ULL }, /* XSUM_XXH3_testdata[7535] */\n    { 3768, 0x0000000000000000ULL, 0xFAF863BB0FAB5D63ULL }, /* XSUM_XXH3_testdata[7536] */\n    { 3768, 0x9E3779B185EBCA8DULL, 0x531FEDD7E49D2C4BULL }, /* XSUM_XXH3_testdata[7537] */\n    { 3769, 0x0000000000000000ULL, 0x936B400D1810CBF7ULL }, /* XSUM_XXH3_testdata[7538] */\n    { 3769, 0x9E3779B185EBCA8DULL, 0x9489255C446C1ED3ULL }, /* XSUM_XXH3_testdata[7539] */\n    { 3770, 0x0000000000000000ULL, 0x36C6AE290EEB1E47ULL }, /* XSUM_XXH3_testdata[7540] */\n    { 3770, 0x9E3779B185EBCA8DULL, 0xC90A24A12D3173B1ULL }, /* XSUM_XXH3_testdata[7541] */\n    { 3771, 0x0000000000000000ULL, 0xBD2E90F967E0ECF0ULL }, /* XSUM_XXH3_testdata[7542] */\n    { 3771, 0x9E3779B185EBCA8DULL, 0xEEBCE2936136164DULL }, /* XSUM_XXH3_testdata[7543] */\n    { 3772, 0x0000000000000000ULL, 0xE2D79A3537258580ULL }, /* XSUM_XXH3_testdata[7544] */\n    { 3772, 0x9E3779B185EBCA8DULL, 0xB82F0C39B6C843BAULL }, /* XSUM_XXH3_testdata[7545] */\n    { 3773, 0x0000000000000000ULL, 0x62065EAA58ACED1FULL }, /* XSUM_XXH3_testdata[7546] */\n    { 3773, 0x9E3779B185EBCA8DULL, 0x7E043B40F0E105EDULL }, /* XSUM_XXH3_testdata[7547] */\n    { 3774, 0x0000000000000000ULL, 0x4CF30A36BCB03B2EULL }, /* XSUM_XXH3_testdata[7548] */\n    { 3774, 0x9E3779B185EBCA8DULL, 0x0113534F920D555BULL }, /* XSUM_XXH3_testdata[7549] */\n    { 3775, 0x0000000000000000ULL, 0x6100353633C7FE15ULL }, /* XSUM_XXH3_testdata[7550] */\n    { 3775, 0x9E3779B185EBCA8DULL, 0xC6BF443448301C81ULL }, /* XSUM_XXH3_testdata[7551] */\n    { 3776, 0x0000000000000000ULL, 0xE8420EE21D49B572ULL }, /* XSUM_XXH3_testdata[7552] */\n    { 3776, 0x9E3779B185EBCA8DULL, 0xE3B0A466F0E12001ULL }, /* XSUM_XXH3_testdata[7553] */\n    { 3777, 0x0000000000000000ULL, 0xAFAA257A326E94E4ULL }, /* XSUM_XXH3_testdata[7554] */\n    { 3777, 0x9E3779B185EBCA8DULL, 0xFD746ED0FC69F1E7ULL }, /* XSUM_XXH3_testdata[7555] */\n    { 3778, 0x0000000000000000ULL, 0xE9561BBFF4B01599ULL }, /* XSUM_XXH3_testdata[7556] */\n    { 3778, 0x9E3779B185EBCA8DULL, 0xBE1594C86FAC1BF5ULL }, /* XSUM_XXH3_testdata[7557] */\n    { 3779, 0x0000000000000000ULL, 0x7E8AB13F37EE7041ULL }, /* XSUM_XXH3_testdata[7558] */\n    { 3779, 0x9E3779B185EBCA8DULL, 0xD98F596960FACA4DULL }, /* XSUM_XXH3_testdata[7559] */\n    { 3780, 0x0000000000000000ULL, 0xA6BB97D10685E042ULL }, /* XSUM_XXH3_testdata[7560] */\n    { 3780, 0x9E3779B185EBCA8DULL, 0x77C69B6342E274D4ULL }, /* XSUM_XXH3_testdata[7561] */\n    { 3781, 0x0000000000000000ULL, 0xB82179D7EE7EAF5BULL }, /* XSUM_XXH3_testdata[7562] */\n    { 3781, 0x9E3779B185EBCA8DULL, 0xF87D2038BD1BC882ULL }, /* XSUM_XXH3_testdata[7563] */\n    { 3782, 0x0000000000000000ULL, 0x709C23CE41B289ACULL }, /* XSUM_XXH3_testdata[7564] */\n    { 3782, 0x9E3779B185EBCA8DULL, 0xA6602D9C1A23DC28ULL }, /* XSUM_XXH3_testdata[7565] */\n    { 3783, 0x0000000000000000ULL, 0x736F72A6C444DA78ULL }, /* XSUM_XXH3_testdata[7566] */\n    { 3783, 0x9E3779B185EBCA8DULL, 0x1CB370300838B920ULL }, /* XSUM_XXH3_testdata[7567] */\n    { 3784, 0x0000000000000000ULL, 0x0F0D57103217BA27ULL }, /* XSUM_XXH3_testdata[7568] */\n    { 3784, 0x9E3779B185EBCA8DULL, 0x64DA519F00FDA8D4ULL }, /* XSUM_XXH3_testdata[7569] */\n    { 3785, 0x0000000000000000ULL, 0x4FEE2E01ADA875C5ULL }, /* XSUM_XXH3_testdata[7570] */\n    { 3785, 0x9E3779B185EBCA8DULL, 0x4BD896C9647748E1ULL }, /* XSUM_XXH3_testdata[7571] */\n    { 3786, 0x0000000000000000ULL, 0x0B815A4597CC8A93ULL }, /* XSUM_XXH3_testdata[7572] */\n    { 3786, 0x9E3779B185EBCA8DULL, 0x179708F028180C05ULL }, /* XSUM_XXH3_testdata[7573] */\n    { 3787, 0x0000000000000000ULL, 0x5F3AC5FDB80B57A7ULL }, /* XSUM_XXH3_testdata[7574] */\n    { 3787, 0x9E3779B185EBCA8DULL, 0x37CF4C5F23A586CAULL }, /* XSUM_XXH3_testdata[7575] */\n    { 3788, 0x0000000000000000ULL, 0x1B1627FE3E596885ULL }, /* XSUM_XXH3_testdata[7576] */\n    { 3788, 0x9E3779B185EBCA8DULL, 0xBD6F7FC73C8E3F7EULL }, /* XSUM_XXH3_testdata[7577] */\n    { 3789, 0x0000000000000000ULL, 0x5DE097996C083E3FULL }, /* XSUM_XXH3_testdata[7578] */\n    { 3789, 0x9E3779B185EBCA8DULL, 0x06B38612D639C2E8ULL }, /* XSUM_XXH3_testdata[7579] */\n    { 3790, 0x0000000000000000ULL, 0x959D554BBC464D43ULL }, /* XSUM_XXH3_testdata[7580] */\n    { 3790, 0x9E3779B185EBCA8DULL, 0xE3DB7878B20B2A65ULL }, /* XSUM_XXH3_testdata[7581] */\n    { 3791, 0x0000000000000000ULL, 0x287E3D544D49AD56ULL }, /* XSUM_XXH3_testdata[7582] */\n    { 3791, 0x9E3779B185EBCA8DULL, 0x340C1FE8159512DCULL }, /* XSUM_XXH3_testdata[7583] */\n    { 3792, 0x0000000000000000ULL, 0xFCDCF7E2D3CED00EULL }, /* XSUM_XXH3_testdata[7584] */\n    { 3792, 0x9E3779B185EBCA8DULL, 0xF43E42D4F8E31503ULL }, /* XSUM_XXH3_testdata[7585] */\n    { 3793, 0x0000000000000000ULL, 0x96CF0C1327AD3362ULL }, /* XSUM_XXH3_testdata[7586] */\n    { 3793, 0x9E3779B185EBCA8DULL, 0x45F243F3B82BE91AULL }, /* XSUM_XXH3_testdata[7587] */\n    { 3794, 0x0000000000000000ULL, 0x3B565B2DE1CBABB5ULL }, /* XSUM_XXH3_testdata[7588] */\n    { 3794, 0x9E3779B185EBCA8DULL, 0x0BCAD4FB08542609ULL }, /* XSUM_XXH3_testdata[7589] */\n    { 3795, 0x0000000000000000ULL, 0xF4ED3DE0EB3AD21FULL }, /* XSUM_XXH3_testdata[7590] */\n    { 3795, 0x9E3779B185EBCA8DULL, 0x00E30C8255DB84C8ULL }, /* XSUM_XXH3_testdata[7591] */\n    { 3796, 0x0000000000000000ULL, 0x218713C9DF900B36ULL }, /* XSUM_XXH3_testdata[7592] */\n    { 3796, 0x9E3779B185EBCA8DULL, 0xE0E1C94010401A39ULL }, /* XSUM_XXH3_testdata[7593] */\n    { 3797, 0x0000000000000000ULL, 0x80041555230A1072ULL }, /* XSUM_XXH3_testdata[7594] */\n    { 3797, 0x9E3779B185EBCA8DULL, 0x0D49454DCCCE0D97ULL }, /* XSUM_XXH3_testdata[7595] */\n    { 3798, 0x0000000000000000ULL, 0x9DBF4F510B64A4B9ULL }, /* XSUM_XXH3_testdata[7596] */\n    { 3798, 0x9E3779B185EBCA8DULL, 0x80D908F2C666246CULL }, /* XSUM_XXH3_testdata[7597] */\n    { 3799, 0x0000000000000000ULL, 0xCD5831EB3FAC6C57ULL }, /* XSUM_XXH3_testdata[7598] */\n    { 3799, 0x9E3779B185EBCA8DULL, 0x8F65710EDCA4E40AULL }, /* XSUM_XXH3_testdata[7599] */\n    { 3800, 0x0000000000000000ULL, 0x55319685EA231551ULL }, /* XSUM_XXH3_testdata[7600] */\n    { 3800, 0x9E3779B185EBCA8DULL, 0x784A06EBD5A5170CULL }, /* XSUM_XXH3_testdata[7601] */\n    { 3801, 0x0000000000000000ULL, 0x50DE87E1C2576530ULL }, /* XSUM_XXH3_testdata[7602] */\n    { 3801, 0x9E3779B185EBCA8DULL, 0xDA8BA623A7F35CDBULL }, /* XSUM_XXH3_testdata[7603] */\n    { 3802, 0x0000000000000000ULL, 0xB74AA3DC57902ECFULL }, /* XSUM_XXH3_testdata[7604] */\n    { 3802, 0x9E3779B185EBCA8DULL, 0xBCA030E1B7BB43B0ULL }, /* XSUM_XXH3_testdata[7605] */\n    { 3803, 0x0000000000000000ULL, 0xEB098D224002D7F8ULL }, /* XSUM_XXH3_testdata[7606] */\n    { 3803, 0x9E3779B185EBCA8DULL, 0x6156A394E2C83E1AULL }, /* XSUM_XXH3_testdata[7607] */\n    { 3804, 0x0000000000000000ULL, 0xF3F724BAB2807C29ULL }, /* XSUM_XXH3_testdata[7608] */\n    { 3804, 0x9E3779B185EBCA8DULL, 0xAA319462EB330908ULL }, /* XSUM_XXH3_testdata[7609] */\n    { 3805, 0x0000000000000000ULL, 0x08BB557991858B15ULL }, /* XSUM_XXH3_testdata[7610] */\n    { 3805, 0x9E3779B185EBCA8DULL, 0x27E91D67BEDAB3D8ULL }, /* XSUM_XXH3_testdata[7611] */\n    { 3806, 0x0000000000000000ULL, 0xAC1E0A06014917C1ULL }, /* XSUM_XXH3_testdata[7612] */\n    { 3806, 0x9E3779B185EBCA8DULL, 0x1E20BBC3E6CBBA6AULL }, /* XSUM_XXH3_testdata[7613] */\n    { 3807, 0x0000000000000000ULL, 0x31B3D51B38C6F040ULL }, /* XSUM_XXH3_testdata[7614] */\n    { 3807, 0x9E3779B185EBCA8DULL, 0x66760B07932674DBULL }, /* XSUM_XXH3_testdata[7615] */\n    { 3808, 0x0000000000000000ULL, 0x83C42AA57DB30E65ULL }, /* XSUM_XXH3_testdata[7616] */\n    { 3808, 0x9E3779B185EBCA8DULL, 0xADB112A57B36D6E0ULL }, /* XSUM_XXH3_testdata[7617] */\n    { 3809, 0x0000000000000000ULL, 0xE7682750E2D6BC5AULL }, /* XSUM_XXH3_testdata[7618] */\n    { 3809, 0x9E3779B185EBCA8DULL, 0x4E16116791A49006ULL }, /* XSUM_XXH3_testdata[7619] */\n    { 3810, 0x0000000000000000ULL, 0xE06D01D13F1FA55AULL }, /* XSUM_XXH3_testdata[7620] */\n    { 3810, 0x9E3779B185EBCA8DULL, 0x8BD54EB7AB491CCEULL }, /* XSUM_XXH3_testdata[7621] */\n    { 3811, 0x0000000000000000ULL, 0x3E830041BB06B48DULL }, /* XSUM_XXH3_testdata[7622] */\n    { 3811, 0x9E3779B185EBCA8DULL, 0x40119B18809725E2ULL }, /* XSUM_XXH3_testdata[7623] */\n    { 3812, 0x0000000000000000ULL, 0x7CF9C48F6C725792ULL }, /* XSUM_XXH3_testdata[7624] */\n    { 3812, 0x9E3779B185EBCA8DULL, 0xAB4CD2FE7D072F0BULL }, /* XSUM_XXH3_testdata[7625] */\n    { 3813, 0x0000000000000000ULL, 0xF43595034D2753A3ULL }, /* XSUM_XXH3_testdata[7626] */\n    { 3813, 0x9E3779B185EBCA8DULL, 0xFFC30A49AD2CF413ULL }, /* XSUM_XXH3_testdata[7627] */\n    { 3814, 0x0000000000000000ULL, 0x0C6760FA6000CB2EULL }, /* XSUM_XXH3_testdata[7628] */\n    { 3814, 0x9E3779B185EBCA8DULL, 0x75E30859FAAB68C3ULL }, /* XSUM_XXH3_testdata[7629] */\n    { 3815, 0x0000000000000000ULL, 0x05CCA8A1304D5869ULL }, /* XSUM_XXH3_testdata[7630] */\n    { 3815, 0x9E3779B185EBCA8DULL, 0x982E92B57F6AB3CFULL }, /* XSUM_XXH3_testdata[7631] */\n    { 3816, 0x0000000000000000ULL, 0x04741578A20F332AULL }, /* XSUM_XXH3_testdata[7632] */\n    { 3816, 0x9E3779B185EBCA8DULL, 0x524404074ACDC1F9ULL }, /* XSUM_XXH3_testdata[7633] */\n    { 3817, 0x0000000000000000ULL, 0x64B6259CEF4C025DULL }, /* XSUM_XXH3_testdata[7634] */\n    { 3817, 0x9E3779B185EBCA8DULL, 0x95A71E8202E4ED0FULL }, /* XSUM_XXH3_testdata[7635] */\n    { 3818, 0x0000000000000000ULL, 0x9EAC34253F826437ULL }, /* XSUM_XXH3_testdata[7636] */\n    { 3818, 0x9E3779B185EBCA8DULL, 0x63154BA10CE16DDEULL }, /* XSUM_XXH3_testdata[7637] */\n    { 3819, 0x0000000000000000ULL, 0x9394E2746D5D50FDULL }, /* XSUM_XXH3_testdata[7638] */\n    { 3819, 0x9E3779B185EBCA8DULL, 0x26657E7C4D0966AFULL }, /* XSUM_XXH3_testdata[7639] */\n    { 3820, 0x0000000000000000ULL, 0xF49F95900FF0F64AULL }, /* XSUM_XXH3_testdata[7640] */\n    { 3820, 0x9E3779B185EBCA8DULL, 0x50DE1AF5E0A1786BULL }, /* XSUM_XXH3_testdata[7641] */\n    { 3821, 0x0000000000000000ULL, 0xA7C52B25579548CFULL }, /* XSUM_XXH3_testdata[7642] */\n    { 3821, 0x9E3779B185EBCA8DULL, 0x803445AC31701E5BULL }, /* XSUM_XXH3_testdata[7643] */\n    { 3822, 0x0000000000000000ULL, 0x129E4B9E7B9C4CC6ULL }, /* XSUM_XXH3_testdata[7644] */\n    { 3822, 0x9E3779B185EBCA8DULL, 0xDD63AE21F81D9051ULL }, /* XSUM_XXH3_testdata[7645] */\n    { 3823, 0x0000000000000000ULL, 0xA6B93533FCF6680FULL }, /* XSUM_XXH3_testdata[7646] */\n    { 3823, 0x9E3779B185EBCA8DULL, 0x238055088B737C05ULL }, /* XSUM_XXH3_testdata[7647] */\n    { 3824, 0x0000000000000000ULL, 0x15EEECA90C7D8E6CULL }, /* XSUM_XXH3_testdata[7648] */\n    { 3824, 0x9E3779B185EBCA8DULL, 0x276385508D5FE2C9ULL }, /* XSUM_XXH3_testdata[7649] */\n    { 3825, 0x0000000000000000ULL, 0x5B97424C3116BBF8ULL }, /* XSUM_XXH3_testdata[7650] */\n    { 3825, 0x9E3779B185EBCA8DULL, 0xF9E852C079609234ULL }, /* XSUM_XXH3_testdata[7651] */\n    { 3826, 0x0000000000000000ULL, 0x1E218240A9F6FFBFULL }, /* XSUM_XXH3_testdata[7652] */\n    { 3826, 0x9E3779B185EBCA8DULL, 0xEB605BFADC7BAD5EULL }, /* XSUM_XXH3_testdata[7653] */\n    { 3827, 0x0000000000000000ULL, 0x602CF49EB3FBEFB2ULL }, /* XSUM_XXH3_testdata[7654] */\n    { 3827, 0x9E3779B185EBCA8DULL, 0xBEA5339614684102ULL }, /* XSUM_XXH3_testdata[7655] */\n    { 3828, 0x0000000000000000ULL, 0x170EE6A51721F704ULL }, /* XSUM_XXH3_testdata[7656] */\n    { 3828, 0x9E3779B185EBCA8DULL, 0x8521AC2AEDFAF055ULL }, /* XSUM_XXH3_testdata[7657] */\n    { 3829, 0x0000000000000000ULL, 0x5DBF5C8A8B7A6394ULL }, /* XSUM_XXH3_testdata[7658] */\n    { 3829, 0x9E3779B185EBCA8DULL, 0x41BD4051EA4625BCULL }, /* XSUM_XXH3_testdata[7659] */\n    { 3830, 0x0000000000000000ULL, 0xBCD0DD9C11D29C74ULL }, /* XSUM_XXH3_testdata[7660] */\n    { 3830, 0x9E3779B185EBCA8DULL, 0x2B2C509F0EEBAEEDULL }, /* XSUM_XXH3_testdata[7661] */\n    { 3831, 0x0000000000000000ULL, 0x8E7D6D42DE080846ULL }, /* XSUM_XXH3_testdata[7662] */\n    { 3831, 0x9E3779B185EBCA8DULL, 0x381675387F62A07EULL }, /* XSUM_XXH3_testdata[7663] */\n    { 3832, 0x0000000000000000ULL, 0x427AEEED5B81FF59ULL }, /* XSUM_XXH3_testdata[7664] */\n    { 3832, 0x9E3779B185EBCA8DULL, 0xD62C95F791FD61D5ULL }, /* XSUM_XXH3_testdata[7665] */\n    { 3833, 0x0000000000000000ULL, 0x237BC2347EAC4315ULL }, /* XSUM_XXH3_testdata[7666] */\n    { 3833, 0x9E3779B185EBCA8DULL, 0x24206F13857AB874ULL }, /* XSUM_XXH3_testdata[7667] */\n    { 3834, 0x0000000000000000ULL, 0x52B2A1456A279CA8ULL }, /* XSUM_XXH3_testdata[7668] */\n    { 3834, 0x9E3779B185EBCA8DULL, 0xA4EAB214A87374DCULL }, /* XSUM_XXH3_testdata[7669] */\n    { 3835, 0x0000000000000000ULL, 0x509E1010C276C143ULL }, /* XSUM_XXH3_testdata[7670] */\n    { 3835, 0x9E3779B185EBCA8DULL, 0x0983CC6F9B4AAACCULL }, /* XSUM_XXH3_testdata[7671] */\n    { 3836, 0x0000000000000000ULL, 0xCC438962ABBABA3CULL }, /* XSUM_XXH3_testdata[7672] */\n    { 3836, 0x9E3779B185EBCA8DULL, 0x8251BE8005D1C985ULL }, /* XSUM_XXH3_testdata[7673] */\n    { 3837, 0x0000000000000000ULL, 0x92910933B68434EEULL }, /* XSUM_XXH3_testdata[7674] */\n    { 3837, 0x9E3779B185EBCA8DULL, 0xC47EED770A2B1125ULL }, /* XSUM_XXH3_testdata[7675] */\n    { 3838, 0x0000000000000000ULL, 0x4597957723960669ULL }, /* XSUM_XXH3_testdata[7676] */\n    { 3838, 0x9E3779B185EBCA8DULL, 0x0409143A4FBCF14EULL }, /* XSUM_XXH3_testdata[7677] */\n    { 3839, 0x0000000000000000ULL, 0x43E534929E376558ULL }, /* XSUM_XXH3_testdata[7678] */\n    { 3839, 0x9E3779B185EBCA8DULL, 0xFC440769C76D630FULL }, /* XSUM_XXH3_testdata[7679] */\n    { 3840, 0x0000000000000000ULL, 0xEC86F51892999868ULL }, /* XSUM_XXH3_testdata[7680] */\n    { 3840, 0x9E3779B185EBCA8DULL, 0xF59832040C6E571AULL }, /* XSUM_XXH3_testdata[7681] */\n    { 3841, 0x0000000000000000ULL, 0xA84A2444C316F722ULL }, /* XSUM_XXH3_testdata[7682] */\n    { 3841, 0x9E3779B185EBCA8DULL, 0xAE2D8BE6079C85CAULL }, /* XSUM_XXH3_testdata[7683] */\n    { 3842, 0x0000000000000000ULL, 0x62E5665E92C13BA8ULL }, /* XSUM_XXH3_testdata[7684] */\n    { 3842, 0x9E3779B185EBCA8DULL, 0x755E4A7DE36EC52BULL }, /* XSUM_XXH3_testdata[7685] */\n    { 3843, 0x0000000000000000ULL, 0xBE710E80296B648AULL }, /* XSUM_XXH3_testdata[7686] */\n    { 3843, 0x9E3779B185EBCA8DULL, 0x3EC0D18D655F9064ULL }, /* XSUM_XXH3_testdata[7687] */\n    { 3844, 0x0000000000000000ULL, 0x503F019B76F1B450ULL }, /* XSUM_XXH3_testdata[7688] */\n    { 3844, 0x9E3779B185EBCA8DULL, 0xC8657E063E5D093AULL }, /* XSUM_XXH3_testdata[7689] */\n    { 3845, 0x0000000000000000ULL, 0xA308A478CCBF13A7ULL }, /* XSUM_XXH3_testdata[7690] */\n    { 3845, 0x9E3779B185EBCA8DULL, 0x25D1CDAD516052B9ULL }, /* XSUM_XXH3_testdata[7691] */\n    { 3846, 0x0000000000000000ULL, 0x0E921949350C1841ULL }, /* XSUM_XXH3_testdata[7692] */\n    { 3846, 0x9E3779B185EBCA8DULL, 0xCCFCD31C9CB44682ULL }, /* XSUM_XXH3_testdata[7693] */\n    { 3847, 0x0000000000000000ULL, 0x383FE3A038136BC9ULL }, /* XSUM_XXH3_testdata[7694] */\n    { 3847, 0x9E3779B185EBCA8DULL, 0x7FB2EE65825CB40BULL }, /* XSUM_XXH3_testdata[7695] */\n    { 3848, 0x0000000000000000ULL, 0x234261DCB7E7BD4DULL }, /* XSUM_XXH3_testdata[7696] */\n    { 3848, 0x9E3779B185EBCA8DULL, 0x19102C68BB066747ULL }, /* XSUM_XXH3_testdata[7697] */\n    { 3849, 0x0000000000000000ULL, 0x8D2300E3BC207CB3ULL }, /* XSUM_XXH3_testdata[7698] */\n    { 3849, 0x9E3779B185EBCA8DULL, 0x36DC82A6B9B2642AULL }, /* XSUM_XXH3_testdata[7699] */\n    { 3850, 0x0000000000000000ULL, 0x8D186332CB70251CULL }, /* XSUM_XXH3_testdata[7700] */\n    { 3850, 0x9E3779B185EBCA8DULL, 0x3E65E06E355242C0ULL }, /* XSUM_XXH3_testdata[7701] */\n    { 3851, 0x0000000000000000ULL, 0x53204CE4BC1D9889ULL }, /* XSUM_XXH3_testdata[7702] */\n    { 3851, 0x9E3779B185EBCA8DULL, 0xAA81059143B50B2FULL }, /* XSUM_XXH3_testdata[7703] */\n    { 3852, 0x0000000000000000ULL, 0x4DAB8DEE06B52323ULL }, /* XSUM_XXH3_testdata[7704] */\n    { 3852, 0x9E3779B185EBCA8DULL, 0x31B0BBA5A6B97F98ULL }, /* XSUM_XXH3_testdata[7705] */\n    { 3853, 0x0000000000000000ULL, 0xC7FFE33A5C9C65ABULL }, /* XSUM_XXH3_testdata[7706] */\n    { 3853, 0x9E3779B185EBCA8DULL, 0xA0D8601BA5E49E14ULL }, /* XSUM_XXH3_testdata[7707] */\n    { 3854, 0x0000000000000000ULL, 0xAF15FAD96D19C7DDULL }, /* XSUM_XXH3_testdata[7708] */\n    { 3854, 0x9E3779B185EBCA8DULL, 0x83D33F7DA75CEF8CULL }, /* XSUM_XXH3_testdata[7709] */\n    { 3855, 0x0000000000000000ULL, 0x1B9BFCF0EA36721EULL }, /* XSUM_XXH3_testdata[7710] */\n    { 3855, 0x9E3779B185EBCA8DULL, 0xE4EF08783106A26BULL }, /* XSUM_XXH3_testdata[7711] */\n    { 3856, 0x0000000000000000ULL, 0x6AC4E1682A031581ULL }, /* XSUM_XXH3_testdata[7712] */\n    { 3856, 0x9E3779B185EBCA8DULL, 0x71E05AA4C1142514ULL }, /* XSUM_XXH3_testdata[7713] */\n    { 3857, 0x0000000000000000ULL, 0xD2C7E3B7B8F49DEEULL }, /* XSUM_XXH3_testdata[7714] */\n    { 3857, 0x9E3779B185EBCA8DULL, 0xA71331C8A5754119ULL }, /* XSUM_XXH3_testdata[7715] */\n    { 3858, 0x0000000000000000ULL, 0x7B3BABB696208617ULL }, /* XSUM_XXH3_testdata[7716] */\n    { 3858, 0x9E3779B185EBCA8DULL, 0x4A1B9140ECAC425BULL }, /* XSUM_XXH3_testdata[7717] */\n    { 3859, 0x0000000000000000ULL, 0xBA380F059564043FULL }, /* XSUM_XXH3_testdata[7718] */\n    { 3859, 0x9E3779B185EBCA8DULL, 0x494FD55DC8543FF6ULL }, /* XSUM_XXH3_testdata[7719] */\n    { 3860, 0x0000000000000000ULL, 0x045A951633C1CDF2ULL }, /* XSUM_XXH3_testdata[7720] */\n    { 3860, 0x9E3779B185EBCA8DULL, 0x10AD411F18864D72ULL }, /* XSUM_XXH3_testdata[7721] */\n    { 3861, 0x0000000000000000ULL, 0x2F50A14FCDC278B5ULL }, /* XSUM_XXH3_testdata[7722] */\n    { 3861, 0x9E3779B185EBCA8DULL, 0x6B1FD754B3F65F10ULL }, /* XSUM_XXH3_testdata[7723] */\n    { 3862, 0x0000000000000000ULL, 0x504228ACB96CBB3BULL }, /* XSUM_XXH3_testdata[7724] */\n    { 3862, 0x9E3779B185EBCA8DULL, 0xD0D7CED9AD49283FULL }, /* XSUM_XXH3_testdata[7725] */\n    { 3863, 0x0000000000000000ULL, 0xA57C24978D1C0DF7ULL }, /* XSUM_XXH3_testdata[7726] */\n    { 3863, 0x9E3779B185EBCA8DULL, 0x1F0092DE5DE373DDULL }, /* XSUM_XXH3_testdata[7727] */\n    { 3864, 0x0000000000000000ULL, 0x461A5717BB985B4DULL }, /* XSUM_XXH3_testdata[7728] */\n    { 3864, 0x9E3779B185EBCA8DULL, 0xD190B446241F3B38ULL }, /* XSUM_XXH3_testdata[7729] */\n    { 3865, 0x0000000000000000ULL, 0x6DC0045A88E940B6ULL }, /* XSUM_XXH3_testdata[7730] */\n    { 3865, 0x9E3779B185EBCA8DULL, 0xD57AEE654F6EB1BFULL }, /* XSUM_XXH3_testdata[7731] */\n    { 3866, 0x0000000000000000ULL, 0xEFE0DF87729BD807ULL }, /* XSUM_XXH3_testdata[7732] */\n    { 3866, 0x9E3779B185EBCA8DULL, 0xAF71173D60491A3CULL }, /* XSUM_XXH3_testdata[7733] */\n    { 3867, 0x0000000000000000ULL, 0xB3219BCAA7B285CFULL }, /* XSUM_XXH3_testdata[7734] */\n    { 3867, 0x9E3779B185EBCA8DULL, 0xADDE5EDD388DC62CULL }, /* XSUM_XXH3_testdata[7735] */\n    { 3868, 0x0000000000000000ULL, 0x9B933F677C078864ULL }, /* XSUM_XXH3_testdata[7736] */\n    { 3868, 0x9E3779B185EBCA8DULL, 0x07D9DBB0DC842CCBULL }, /* XSUM_XXH3_testdata[7737] */\n    { 3869, 0x0000000000000000ULL, 0x2D58E9727B802A55ULL }, /* XSUM_XXH3_testdata[7738] */\n    { 3869, 0x9E3779B185EBCA8DULL, 0x1A5D50C3938F2419ULL }, /* XSUM_XXH3_testdata[7739] */\n    { 3870, 0x0000000000000000ULL, 0xB3C17DD1E50D455EULL }, /* XSUM_XXH3_testdata[7740] */\n    { 3870, 0x9E3779B185EBCA8DULL, 0x8471229D76103349ULL }, /* XSUM_XXH3_testdata[7741] */\n    { 3871, 0x0000000000000000ULL, 0x5C174EC1D16D67FEULL }, /* XSUM_XXH3_testdata[7742] */\n    { 3871, 0x9E3779B185EBCA8DULL, 0x82C201E346AB9BA7ULL }, /* XSUM_XXH3_testdata[7743] */\n    { 3872, 0x0000000000000000ULL, 0xE0DD0C13C002BCE5ULL }, /* XSUM_XXH3_testdata[7744] */\n    { 3872, 0x9E3779B185EBCA8DULL, 0xC4233EEE0E37A52BULL }, /* XSUM_XXH3_testdata[7745] */\n    { 3873, 0x0000000000000000ULL, 0x8A696B168B580A84ULL }, /* XSUM_XXH3_testdata[7746] */\n    { 3873, 0x9E3779B185EBCA8DULL, 0x821158749EF3576EULL }, /* XSUM_XXH3_testdata[7747] */\n    { 3874, 0x0000000000000000ULL, 0xDFEBD1A1913389C2ULL }, /* XSUM_XXH3_testdata[7748] */\n    { 3874, 0x9E3779B185EBCA8DULL, 0x0F50D14692814C60ULL }, /* XSUM_XXH3_testdata[7749] */\n    { 3875, 0x0000000000000000ULL, 0x8B885A174EEADCF0ULL }, /* XSUM_XXH3_testdata[7750] */\n    { 3875, 0x9E3779B185EBCA8DULL, 0xBE08E4516752B35AULL }, /* XSUM_XXH3_testdata[7751] */\n    { 3876, 0x0000000000000000ULL, 0x09553D435DD83629ULL }, /* XSUM_XXH3_testdata[7752] */\n    { 3876, 0x9E3779B185EBCA8DULL, 0xB7C4E9607A887E62ULL }, /* XSUM_XXH3_testdata[7753] */\n    { 3877, 0x0000000000000000ULL, 0x6DC55AA026DF9FD3ULL }, /* XSUM_XXH3_testdata[7754] */\n    { 3877, 0x9E3779B185EBCA8DULL, 0x0F82F985D21275A8ULL }, /* XSUM_XXH3_testdata[7755] */\n    { 3878, 0x0000000000000000ULL, 0x0AB69E2D8FFDB433ULL }, /* XSUM_XXH3_testdata[7756] */\n    { 3878, 0x9E3779B185EBCA8DULL, 0xA0BDB20607B467B0ULL }, /* XSUM_XXH3_testdata[7757] */\n    { 3879, 0x0000000000000000ULL, 0xDC044E994F514388ULL }, /* XSUM_XXH3_testdata[7758] */\n    { 3879, 0x9E3779B185EBCA8DULL, 0xEE7FBF4DABA32D11ULL }, /* XSUM_XXH3_testdata[7759] */\n    { 3880, 0x0000000000000000ULL, 0x187666F80C00DD3BULL }, /* XSUM_XXH3_testdata[7760] */\n    { 3880, 0x9E3779B185EBCA8DULL, 0x4B4E138DB039E9A6ULL }, /* XSUM_XXH3_testdata[7761] */\n    { 3881, 0x0000000000000000ULL, 0x1B8C6170BA920F83ULL }, /* XSUM_XXH3_testdata[7762] */\n    { 3881, 0x9E3779B185EBCA8DULL, 0x791E308DBD22EFD9ULL }, /* XSUM_XXH3_testdata[7763] */\n    { 3882, 0x0000000000000000ULL, 0xF04B471039625B62ULL }, /* XSUM_XXH3_testdata[7764] */\n    { 3882, 0x9E3779B185EBCA8DULL, 0xB74488D33A785C73ULL }, /* XSUM_XXH3_testdata[7765] */\n    { 3883, 0x0000000000000000ULL, 0x4688B01A257F4566ULL }, /* XSUM_XXH3_testdata[7766] */\n    { 3883, 0x9E3779B185EBCA8DULL, 0xEDD8269066A13BBEULL }, /* XSUM_XXH3_testdata[7767] */\n    { 3884, 0x0000000000000000ULL, 0x7C8BE48761A9C3A5ULL }, /* XSUM_XXH3_testdata[7768] */\n    { 3884, 0x9E3779B185EBCA8DULL, 0x131209234A41D5ABULL }, /* XSUM_XXH3_testdata[7769] */\n    { 3885, 0x0000000000000000ULL, 0x9F9397B2208C2543ULL }, /* XSUM_XXH3_testdata[7770] */\n    { 3885, 0x9E3779B185EBCA8DULL, 0x6640AEFF006DF4A4ULL }, /* XSUM_XXH3_testdata[7771] */\n    { 3886, 0x0000000000000000ULL, 0xB8669BF8EF126845ULL }, /* XSUM_XXH3_testdata[7772] */\n    { 3886, 0x9E3779B185EBCA8DULL, 0x0A044609E706CDD7ULL }, /* XSUM_XXH3_testdata[7773] */\n    { 3887, 0x0000000000000000ULL, 0x4CFCD4413DD99027ULL }, /* XSUM_XXH3_testdata[7774] */\n    { 3887, 0x9E3779B185EBCA8DULL, 0xC44CF1C21F8CF592ULL }, /* XSUM_XXH3_testdata[7775] */\n    { 3888, 0x0000000000000000ULL, 0xE331E128DBB1D7D9ULL }, /* XSUM_XXH3_testdata[7776] */\n    { 3888, 0x9E3779B185EBCA8DULL, 0x6EFB06CE53DE9E24ULL }, /* XSUM_XXH3_testdata[7777] */\n    { 3889, 0x0000000000000000ULL, 0x11D44E6082CBE4E5ULL }, /* XSUM_XXH3_testdata[7778] */\n    { 3889, 0x9E3779B185EBCA8DULL, 0xE35CDE98F72C647FULL }, /* XSUM_XXH3_testdata[7779] */\n    { 3890, 0x0000000000000000ULL, 0xA1295DE3AF67B2A3ULL }, /* XSUM_XXH3_testdata[7780] */\n    { 3890, 0x9E3779B185EBCA8DULL, 0x3DA1793B4CED76FBULL }, /* XSUM_XXH3_testdata[7781] */\n    { 3891, 0x0000000000000000ULL, 0xBA73830B67A21E08ULL }, /* XSUM_XXH3_testdata[7782] */\n    { 3891, 0x9E3779B185EBCA8DULL, 0x3F2B72C5B004F19FULL }, /* XSUM_XXH3_testdata[7783] */\n    { 3892, 0x0000000000000000ULL, 0xAC94A1510989D9B1ULL }, /* XSUM_XXH3_testdata[7784] */\n    { 3892, 0x9E3779B185EBCA8DULL, 0x12858508E6900F2CULL }, /* XSUM_XXH3_testdata[7785] */\n    { 3893, 0x0000000000000000ULL, 0xF93FAEA85A65A233ULL }, /* XSUM_XXH3_testdata[7786] */\n    { 3893, 0x9E3779B185EBCA8DULL, 0x9BDB0D7C925A0E32ULL }, /* XSUM_XXH3_testdata[7787] */\n    { 3894, 0x0000000000000000ULL, 0x9CB7F6F5DA5CE644ULL }, /* XSUM_XXH3_testdata[7788] */\n    { 3894, 0x9E3779B185EBCA8DULL, 0xD579E994521A5D4BULL }, /* XSUM_XXH3_testdata[7789] */\n    { 3895, 0x0000000000000000ULL, 0x5325D38ABDF70B44ULL }, /* XSUM_XXH3_testdata[7790] */\n    { 3895, 0x9E3779B185EBCA8DULL, 0xE35BCE7BB70760E5ULL }, /* XSUM_XXH3_testdata[7791] */\n    { 3896, 0x0000000000000000ULL, 0x9BD58AC8EC762F16ULL }, /* XSUM_XXH3_testdata[7792] */\n    { 3896, 0x9E3779B185EBCA8DULL, 0x1359A61535C77027ULL }, /* XSUM_XXH3_testdata[7793] */\n    { 3897, 0x0000000000000000ULL, 0x4E0D77736DC183D2ULL }, /* XSUM_XXH3_testdata[7794] */\n    { 3897, 0x9E3779B185EBCA8DULL, 0x425C3F29DE942D3BULL }, /* XSUM_XXH3_testdata[7795] */\n    { 3898, 0x0000000000000000ULL, 0x24F2F622BF81A57EULL }, /* XSUM_XXH3_testdata[7796] */\n    { 3898, 0x9E3779B185EBCA8DULL, 0x2EF182AFF3828F57ULL }, /* XSUM_XXH3_testdata[7797] */\n    { 3899, 0x0000000000000000ULL, 0x99FFFA13BD4D2CD9ULL }, /* XSUM_XXH3_testdata[7798] */\n    { 3899, 0x9E3779B185EBCA8DULL, 0xA0E33190010A3EA7ULL }, /* XSUM_XXH3_testdata[7799] */\n    { 3900, 0x0000000000000000ULL, 0x19805A069F62A49AULL }, /* XSUM_XXH3_testdata[7800] */\n    { 3900, 0x9E3779B185EBCA8DULL, 0x14F3FF037E3009BDULL }, /* XSUM_XXH3_testdata[7801] */\n    { 3901, 0x0000000000000000ULL, 0xE09BAE0C7FFDF76EULL }, /* XSUM_XXH3_testdata[7802] */\n    { 3901, 0x9E3779B185EBCA8DULL, 0xD4D3B755157F2668ULL }, /* XSUM_XXH3_testdata[7803] */\n    { 3902, 0x0000000000000000ULL, 0xCE34D7FB7210BC00ULL }, /* XSUM_XXH3_testdata[7804] */\n    { 3902, 0x9E3779B185EBCA8DULL, 0x7C16164229315FB0ULL }, /* XSUM_XXH3_testdata[7805] */\n    { 3903, 0x0000000000000000ULL, 0x7B13DAF4971CF1FFULL }, /* XSUM_XXH3_testdata[7806] */\n    { 3903, 0x9E3779B185EBCA8DULL, 0x1C3A041D1102B153ULL }, /* XSUM_XXH3_testdata[7807] */\n    { 3904, 0x0000000000000000ULL, 0xBBE687851D63B3AFULL }, /* XSUM_XXH3_testdata[7808] */\n    { 3904, 0x9E3779B185EBCA8DULL, 0x5470D1C9A6CCA7EFULL }, /* XSUM_XXH3_testdata[7809] */\n    { 3905, 0x0000000000000000ULL, 0xC31F7A782896527AULL }, /* XSUM_XXH3_testdata[7810] */\n    { 3905, 0x9E3779B185EBCA8DULL, 0xA349F0FCFE77288AULL }, /* XSUM_XXH3_testdata[7811] */\n    { 3906, 0x0000000000000000ULL, 0xE87F7F6E7457F2EAULL }, /* XSUM_XXH3_testdata[7812] */\n    { 3906, 0x9E3779B185EBCA8DULL, 0xCF37E72730B3F6BFULL }, /* XSUM_XXH3_testdata[7813] */\n    { 3907, 0x0000000000000000ULL, 0xAF7BA8F0F6BDE866ULL }, /* XSUM_XXH3_testdata[7814] */\n    { 3907, 0x9E3779B185EBCA8DULL, 0xCAB66BE2356E26B7ULL }, /* XSUM_XXH3_testdata[7815] */\n    { 3908, 0x0000000000000000ULL, 0xBF921BD5317E4A34ULL }, /* XSUM_XXH3_testdata[7816] */\n    { 3908, 0x9E3779B185EBCA8DULL, 0x0B66F365D26D2B03ULL }, /* XSUM_XXH3_testdata[7817] */\n    { 3909, 0x0000000000000000ULL, 0x9CB57F78F4578087ULL }, /* XSUM_XXH3_testdata[7818] */\n    { 3909, 0x9E3779B185EBCA8DULL, 0x2CB9FE7B7E8EA2B3ULL }, /* XSUM_XXH3_testdata[7819] */\n    { 3910, 0x0000000000000000ULL, 0x3F9ECFE64F0200BCULL }, /* XSUM_XXH3_testdata[7820] */\n    { 3910, 0x9E3779B185EBCA8DULL, 0x141C8C489F2B039AULL }, /* XSUM_XXH3_testdata[7821] */\n    { 3911, 0x0000000000000000ULL, 0xB761FC9603EDC210ULL }, /* XSUM_XXH3_testdata[7822] */\n    { 3911, 0x9E3779B185EBCA8DULL, 0x1AA8771E12C97EEEULL }, /* XSUM_XXH3_testdata[7823] */\n    { 3912, 0x0000000000000000ULL, 0xCB369450ECBDBC90ULL }, /* XSUM_XXH3_testdata[7824] */\n    { 3912, 0x9E3779B185EBCA8DULL, 0x9E0687BFC2CF96CAULL }, /* XSUM_XXH3_testdata[7825] */\n    { 3913, 0x0000000000000000ULL, 0x431E499D64D673F6ULL }, /* XSUM_XXH3_testdata[7826] */\n    { 3913, 0x9E3779B185EBCA8DULL, 0x4FAF932DB8149ACCULL }, /* XSUM_XXH3_testdata[7827] */\n    { 3914, 0x0000000000000000ULL, 0xE6D911BC72C6AE51ULL }, /* XSUM_XXH3_testdata[7828] */\n    { 3914, 0x9E3779B185EBCA8DULL, 0xE2BF052CEF79FF47ULL }, /* XSUM_XXH3_testdata[7829] */\n    { 3915, 0x0000000000000000ULL, 0x79C6F6782413023AULL }, /* XSUM_XXH3_testdata[7830] */\n    { 3915, 0x9E3779B185EBCA8DULL, 0x1B3809FE35FE127EULL }, /* XSUM_XXH3_testdata[7831] */\n    { 3916, 0x0000000000000000ULL, 0xEF8F193FDB2112A3ULL }, /* XSUM_XXH3_testdata[7832] */\n    { 3916, 0x9E3779B185EBCA8DULL, 0x98AD7D5406A19295ULL }, /* XSUM_XXH3_testdata[7833] */\n    { 3917, 0x0000000000000000ULL, 0x69FB09EAA27F3706ULL }, /* XSUM_XXH3_testdata[7834] */\n    { 3917, 0x9E3779B185EBCA8DULL, 0x03163CABD1527F68ULL }, /* XSUM_XXH3_testdata[7835] */\n    { 3918, 0x0000000000000000ULL, 0x7D8DD4199BED3A35ULL }, /* XSUM_XXH3_testdata[7836] */\n    { 3918, 0x9E3779B185EBCA8DULL, 0xBC4F45AE3E4BEBE9ULL }, /* XSUM_XXH3_testdata[7837] */\n    { 3919, 0x0000000000000000ULL, 0x8C8101E9DF878947ULL }, /* XSUM_XXH3_testdata[7838] */\n    { 3919, 0x9E3779B185EBCA8DULL, 0x0D012DC456C35931ULL }, /* XSUM_XXH3_testdata[7839] */\n    { 3920, 0x0000000000000000ULL, 0x256E7D270201A5F8ULL }, /* XSUM_XXH3_testdata[7840] */\n    { 3920, 0x9E3779B185EBCA8DULL, 0x2594B97E220C378CULL }, /* XSUM_XXH3_testdata[7841] */\n    { 3921, 0x0000000000000000ULL, 0x2413C09AA63529D4ULL }, /* XSUM_XXH3_testdata[7842] */\n    { 3921, 0x9E3779B185EBCA8DULL, 0xAE6981E821162C41ULL }, /* XSUM_XXH3_testdata[7843] */\n    { 3922, 0x0000000000000000ULL, 0x1B4729EEA242B464ULL }, /* XSUM_XXH3_testdata[7844] */\n    { 3922, 0x9E3779B185EBCA8DULL, 0x2DE6748B08EF0008ULL }, /* XSUM_XXH3_testdata[7845] */\n    { 3923, 0x0000000000000000ULL, 0x5D3C90B72C299E81ULL }, /* XSUM_XXH3_testdata[7846] */\n    { 3923, 0x9E3779B185EBCA8DULL, 0xA080487A07FE5B1BULL }, /* XSUM_XXH3_testdata[7847] */\n    { 3924, 0x0000000000000000ULL, 0x7CABA0FF1828406EULL }, /* XSUM_XXH3_testdata[7848] */\n    { 3924, 0x9E3779B185EBCA8DULL, 0xAD0EB6A479FE5234ULL }, /* XSUM_XXH3_testdata[7849] */\n    { 3925, 0x0000000000000000ULL, 0x34849449A343A369ULL }, /* XSUM_XXH3_testdata[7850] */\n    { 3925, 0x9E3779B185EBCA8DULL, 0x1AB002D4AE5A96C6ULL }, /* XSUM_XXH3_testdata[7851] */\n    { 3926, 0x0000000000000000ULL, 0x821338A8BDB22901ULL }, /* XSUM_XXH3_testdata[7852] */\n    { 3926, 0x9E3779B185EBCA8DULL, 0xD9304221475D4F53ULL }, /* XSUM_XXH3_testdata[7853] */\n    { 3927, 0x0000000000000000ULL, 0x711649750101681CULL }, /* XSUM_XXH3_testdata[7854] */\n    { 3927, 0x9E3779B185EBCA8DULL, 0x6400186109233657ULL }, /* XSUM_XXH3_testdata[7855] */\n    { 3928, 0x0000000000000000ULL, 0x1EF643BB4D6280AEULL }, /* XSUM_XXH3_testdata[7856] */\n    { 3928, 0x9E3779B185EBCA8DULL, 0x45F6407A80B1B838ULL }, /* XSUM_XXH3_testdata[7857] */\n    { 3929, 0x0000000000000000ULL, 0x46AEB90D8F7ABFF1ULL }, /* XSUM_XXH3_testdata[7858] */\n    { 3929, 0x9E3779B185EBCA8DULL, 0xDFBD52053FEA117CULL }, /* XSUM_XXH3_testdata[7859] */\n    { 3930, 0x0000000000000000ULL, 0xF96C47244C8E68D9ULL }, /* XSUM_XXH3_testdata[7860] */\n    { 3930, 0x9E3779B185EBCA8DULL, 0xE94C4D97EB097F05ULL }, /* XSUM_XXH3_testdata[7861] */\n    { 3931, 0x0000000000000000ULL, 0x2D9755A556DC4C68ULL }, /* XSUM_XXH3_testdata[7862] */\n    { 3931, 0x9E3779B185EBCA8DULL, 0x356571D8B096CF77ULL }, /* XSUM_XXH3_testdata[7863] */\n    { 3932, 0x0000000000000000ULL, 0x2690DE96B8F122BFULL }, /* XSUM_XXH3_testdata[7864] */\n    { 3932, 0x9E3779B185EBCA8DULL, 0xD855005339822D9FULL }, /* XSUM_XXH3_testdata[7865] */\n    { 3933, 0x0000000000000000ULL, 0x03F17E5C69752446ULL }, /* XSUM_XXH3_testdata[7866] */\n    { 3933, 0x9E3779B185EBCA8DULL, 0x6DB8D83F02C4D6F4ULL }, /* XSUM_XXH3_testdata[7867] */\n    { 3934, 0x0000000000000000ULL, 0xAE5BAEE4A55FA92AULL }, /* XSUM_XXH3_testdata[7868] */\n    { 3934, 0x9E3779B185EBCA8DULL, 0xE84342F512CBB54CULL }, /* XSUM_XXH3_testdata[7869] */\n    { 3935, 0x0000000000000000ULL, 0x10C818EA41884D5DULL }, /* XSUM_XXH3_testdata[7870] */\n    { 3935, 0x9E3779B185EBCA8DULL, 0xB4712B7E5B822501ULL }, /* XSUM_XXH3_testdata[7871] */\n    { 3936, 0x0000000000000000ULL, 0xAA8A8708F5777330ULL }, /* XSUM_XXH3_testdata[7872] */\n    { 3936, 0x9E3779B185EBCA8DULL, 0xA4B6E3C721522422ULL }, /* XSUM_XXH3_testdata[7873] */\n    { 3937, 0x0000000000000000ULL, 0x067D12376D718DAFULL }, /* XSUM_XXH3_testdata[7874] */\n    { 3937, 0x9E3779B185EBCA8DULL, 0x36B8E2E811E9040AULL }, /* XSUM_XXH3_testdata[7875] */\n    { 3938, 0x0000000000000000ULL, 0xF98EC9412B15364FULL }, /* XSUM_XXH3_testdata[7876] */\n    { 3938, 0x9E3779B185EBCA8DULL, 0xF2069144A2208295ULL }, /* XSUM_XXH3_testdata[7877] */\n    { 3939, 0x0000000000000000ULL, 0x3F9E497288C054EEULL }, /* XSUM_XXH3_testdata[7878] */\n    { 3939, 0x9E3779B185EBCA8DULL, 0xC2509F473718907BULL }, /* XSUM_XXH3_testdata[7879] */\n    { 3940, 0x0000000000000000ULL, 0xBDEABE2B0DA048E9ULL }, /* XSUM_XXH3_testdata[7880] */\n    { 3940, 0x9E3779B185EBCA8DULL, 0x4668552A42C21C1AULL }, /* XSUM_XXH3_testdata[7881] */\n    { 3941, 0x0000000000000000ULL, 0x10AB1C99F00A85BEULL }, /* XSUM_XXH3_testdata[7882] */\n    { 3941, 0x9E3779B185EBCA8DULL, 0x817F51B557AE9312ULL }, /* XSUM_XXH3_testdata[7883] */\n    { 3942, 0x0000000000000000ULL, 0x532A1A1C827E3C32ULL }, /* XSUM_XXH3_testdata[7884] */\n    { 3942, 0x9E3779B185EBCA8DULL, 0xFC9E9A61C043F893ULL }, /* XSUM_XXH3_testdata[7885] */\n    { 3943, 0x0000000000000000ULL, 0x17DF5FEBAA199DDCULL }, /* XSUM_XXH3_testdata[7886] */\n    { 3943, 0x9E3779B185EBCA8DULL, 0xBF866768A90B586BULL }, /* XSUM_XXH3_testdata[7887] */\n    { 3944, 0x0000000000000000ULL, 0x71398075626A805FULL }, /* XSUM_XXH3_testdata[7888] */\n    { 3944, 0x9E3779B185EBCA8DULL, 0x2EAD63956448AC42ULL }, /* XSUM_XXH3_testdata[7889] */\n    { 3945, 0x0000000000000000ULL, 0x8B96C85B6B09AE09ULL }, /* XSUM_XXH3_testdata[7890] */\n    { 3945, 0x9E3779B185EBCA8DULL, 0x53945379415EEA57ULL }, /* XSUM_XXH3_testdata[7891] */\n    { 3946, 0x0000000000000000ULL, 0xBDD556FEB977EB7EULL }, /* XSUM_XXH3_testdata[7892] */\n    { 3946, 0x9E3779B185EBCA8DULL, 0x323281D91889CD49ULL }, /* XSUM_XXH3_testdata[7893] */\n    { 3947, 0x0000000000000000ULL, 0x64971C22DBC5527CULL }, /* XSUM_XXH3_testdata[7894] */\n    { 3947, 0x9E3779B185EBCA8DULL, 0x89022F7E2B8360A5ULL }, /* XSUM_XXH3_testdata[7895] */\n    { 3948, 0x0000000000000000ULL, 0xDD8BE1C1AA8ADD2DULL }, /* XSUM_XXH3_testdata[7896] */\n    { 3948, 0x9E3779B185EBCA8DULL, 0x5C30025D03808D2BULL }, /* XSUM_XXH3_testdata[7897] */\n    { 3949, 0x0000000000000000ULL, 0x8C07CF58AB41A74CULL }, /* XSUM_XXH3_testdata[7898] */\n    { 3949, 0x9E3779B185EBCA8DULL, 0xB1D01B95BAA92AABULL }, /* XSUM_XXH3_testdata[7899] */\n    { 3950, 0x0000000000000000ULL, 0xD02F3D99DAF12BFBULL }, /* XSUM_XXH3_testdata[7900] */\n    { 3950, 0x9E3779B185EBCA8DULL, 0xB51B642756A4A758ULL }, /* XSUM_XXH3_testdata[7901] */\n    { 3951, 0x0000000000000000ULL, 0x4348531E49C511F4ULL }, /* XSUM_XXH3_testdata[7902] */\n    { 3951, 0x9E3779B185EBCA8DULL, 0x18BD395AEEA58688ULL }, /* XSUM_XXH3_testdata[7903] */\n    { 3952, 0x0000000000000000ULL, 0x9D4C66540A962773ULL }, /* XSUM_XXH3_testdata[7904] */\n    { 3952, 0x9E3779B185EBCA8DULL, 0xE00964BE57FD3E66ULL }, /* XSUM_XXH3_testdata[7905] */\n    { 3953, 0x0000000000000000ULL, 0x7CE772BEA8E4786BULL }, /* XSUM_XXH3_testdata[7906] */\n    { 3953, 0x9E3779B185EBCA8DULL, 0xF61BB140BE5D765FULL }, /* XSUM_XXH3_testdata[7907] */\n    { 3954, 0x0000000000000000ULL, 0xEF207CADC1E1289DULL }, /* XSUM_XXH3_testdata[7908] */\n    { 3954, 0x9E3779B185EBCA8DULL, 0xFAE666B60898B751ULL }, /* XSUM_XXH3_testdata[7909] */\n    { 3955, 0x0000000000000000ULL, 0x26CC10398A6749B7ULL }, /* XSUM_XXH3_testdata[7910] */\n    { 3955, 0x9E3779B185EBCA8DULL, 0x92DE2797740DD6B7ULL }, /* XSUM_XXH3_testdata[7911] */\n    { 3956, 0x0000000000000000ULL, 0x242CFB81AFEB4A52ULL }, /* XSUM_XXH3_testdata[7912] */\n    { 3956, 0x9E3779B185EBCA8DULL, 0x52AC4FDC444D7946ULL }, /* XSUM_XXH3_testdata[7913] */\n    { 3957, 0x0000000000000000ULL, 0x281754EE7F02B5E8ULL }, /* XSUM_XXH3_testdata[7914] */\n    { 3957, 0x9E3779B185EBCA8DULL, 0x334BB05F13E21683ULL }, /* XSUM_XXH3_testdata[7915] */\n    { 3958, 0x0000000000000000ULL, 0x99422CCBED686E68ULL }, /* XSUM_XXH3_testdata[7916] */\n    { 3958, 0x9E3779B185EBCA8DULL, 0x37F7156BD866B0ADULL }, /* XSUM_XXH3_testdata[7917] */\n    { 3959, 0x0000000000000000ULL, 0x598741D332E3B68CULL }, /* XSUM_XXH3_testdata[7918] */\n    { 3959, 0x9E3779B185EBCA8DULL, 0x6586AE3B6DDACD16ULL }, /* XSUM_XXH3_testdata[7919] */\n    { 3960, 0x0000000000000000ULL, 0x4B628B36B33EC98CULL }, /* XSUM_XXH3_testdata[7920] */\n    { 3960, 0x9E3779B185EBCA8DULL, 0xA6C22E0382278A9BULL }, /* XSUM_XXH3_testdata[7921] */\n    { 3961, 0x0000000000000000ULL, 0x33EA7BB343EBBDB5ULL }, /* XSUM_XXH3_testdata[7922] */\n    { 3961, 0x9E3779B185EBCA8DULL, 0x75699EDC5951867DULL }, /* XSUM_XXH3_testdata[7923] */\n    { 3962, 0x0000000000000000ULL, 0x126AEA81F63590F4ULL }, /* XSUM_XXH3_testdata[7924] */\n    { 3962, 0x9E3779B185EBCA8DULL, 0x886FD5F60CD3E0EEULL }, /* XSUM_XXH3_testdata[7925] */\n    { 3963, 0x0000000000000000ULL, 0x7841B62776B307AAULL }, /* XSUM_XXH3_testdata[7926] */\n    { 3963, 0x9E3779B185EBCA8DULL, 0xF82E085079EC75FAULL }, /* XSUM_XXH3_testdata[7927] */\n    { 3964, 0x0000000000000000ULL, 0xECBF0B670679A0F6ULL }, /* XSUM_XXH3_testdata[7928] */\n    { 3964, 0x9E3779B185EBCA8DULL, 0x288522438415AC10ULL }, /* XSUM_XXH3_testdata[7929] */\n    { 3965, 0x0000000000000000ULL, 0x27A262BDF741056FULL }, /* XSUM_XXH3_testdata[7930] */\n    { 3965, 0x9E3779B185EBCA8DULL, 0x59897257B77D9E2CULL }, /* XSUM_XXH3_testdata[7931] */\n    { 3966, 0x0000000000000000ULL, 0x2F809602FE931B3CULL }, /* XSUM_XXH3_testdata[7932] */\n    { 3966, 0x9E3779B185EBCA8DULL, 0xCADC0F606616E761ULL }, /* XSUM_XXH3_testdata[7933] */\n    { 3967, 0x0000000000000000ULL, 0x141E1F3175F8052CULL }, /* XSUM_XXH3_testdata[7934] */\n    { 3967, 0x9E3779B185EBCA8DULL, 0x329CC677D6B63E01ULL }, /* XSUM_XXH3_testdata[7935] */\n    { 3968, 0x0000000000000000ULL, 0xE4BBC3788C0BDD64ULL }, /* XSUM_XXH3_testdata[7936] */\n    { 3968, 0x9E3779B185EBCA8DULL, 0x5DEB326944BE123EULL }, /* XSUM_XXH3_testdata[7937] */\n    { 3969, 0x0000000000000000ULL, 0xE31B53A785778F54ULL }, /* XSUM_XXH3_testdata[7938] */\n    { 3969, 0x9E3779B185EBCA8DULL, 0x6A2E262687B66653ULL }, /* XSUM_XXH3_testdata[7939] */\n    { 3970, 0x0000000000000000ULL, 0xE616BA7289AA5EBDULL }, /* XSUM_XXH3_testdata[7940] */\n    { 3970, 0x9E3779B185EBCA8DULL, 0x8780C20C605A6403ULL }, /* XSUM_XXH3_testdata[7941] */\n    { 3971, 0x0000000000000000ULL, 0x51921934B133BCBCULL }, /* XSUM_XXH3_testdata[7942] */\n    { 3971, 0x9E3779B185EBCA8DULL, 0x1491A8A669564D3DULL }, /* XSUM_XXH3_testdata[7943] */\n    { 3972, 0x0000000000000000ULL, 0x2FD77747DC1304CBULL }, /* XSUM_XXH3_testdata[7944] */\n    { 3972, 0x9E3779B185EBCA8DULL, 0x00E8B8F5C0C77E2FULL }, /* XSUM_XXH3_testdata[7945] */\n    { 3973, 0x0000000000000000ULL, 0xD5FA765B6B147CBCULL }, /* XSUM_XXH3_testdata[7946] */\n    { 3973, 0x9E3779B185EBCA8DULL, 0xB8A191D1D112F794ULL }, /* XSUM_XXH3_testdata[7947] */\n    { 3974, 0x0000000000000000ULL, 0x096E1E10CE979DF3ULL }, /* XSUM_XXH3_testdata[7948] */\n    { 3974, 0x9E3779B185EBCA8DULL, 0x25311F01B72B0F5DULL }, /* XSUM_XXH3_testdata[7949] */\n    { 3975, 0x0000000000000000ULL, 0x724CD26BCEE10D7DULL }, /* XSUM_XXH3_testdata[7950] */\n    { 3975, 0x9E3779B185EBCA8DULL, 0xFEFDAF2604950A59ULL }, /* XSUM_XXH3_testdata[7951] */\n    { 3976, 0x0000000000000000ULL, 0x624EB9ED7DA8BC8BULL }, /* XSUM_XXH3_testdata[7952] */\n    { 3976, 0x9E3779B185EBCA8DULL, 0xB1484E07468C6A87ULL }, /* XSUM_XXH3_testdata[7953] */\n    { 3977, 0x0000000000000000ULL, 0xB97681089D65E1B3ULL }, /* XSUM_XXH3_testdata[7954] */\n    { 3977, 0x9E3779B185EBCA8DULL, 0x995046795DDBFFA3ULL }, /* XSUM_XXH3_testdata[7955] */\n    { 3978, 0x0000000000000000ULL, 0x96CE1FD0B7BBB048ULL }, /* XSUM_XXH3_testdata[7956] */\n    { 3978, 0x9E3779B185EBCA8DULL, 0xE6A71D136860A7DEULL }, /* XSUM_XXH3_testdata[7957] */\n    { 3979, 0x0000000000000000ULL, 0x75DED1B9308B1928ULL }, /* XSUM_XXH3_testdata[7958] */\n    { 3979, 0x9E3779B185EBCA8DULL, 0xDED6EE6AC82110D1ULL }, /* XSUM_XXH3_testdata[7959] */\n    { 3980, 0x0000000000000000ULL, 0x74108B5207DA6495ULL }, /* XSUM_XXH3_testdata[7960] */\n    { 3980, 0x9E3779B185EBCA8DULL, 0xBCF1BB06F6F9F1D2ULL }, /* XSUM_XXH3_testdata[7961] */\n    { 3981, 0x0000000000000000ULL, 0x583132D445F6E764ULL }, /* XSUM_XXH3_testdata[7962] */\n    { 3981, 0x9E3779B185EBCA8DULL, 0xC5DD54DA32E1E97BULL }, /* XSUM_XXH3_testdata[7963] */\n    { 3982, 0x0000000000000000ULL, 0x9481AB87F0647F15ULL }, /* XSUM_XXH3_testdata[7964] */\n    { 3982, 0x9E3779B185EBCA8DULL, 0xF4477239172D8121ULL }, /* XSUM_XXH3_testdata[7965] */\n    { 3983, 0x0000000000000000ULL, 0xE200117CCB74CD9CULL }, /* XSUM_XXH3_testdata[7966] */\n    { 3983, 0x9E3779B185EBCA8DULL, 0x404ED3E5DB505D73ULL }, /* XSUM_XXH3_testdata[7967] */\n    { 3984, 0x0000000000000000ULL, 0xCE9467B900AEFA85ULL }, /* XSUM_XXH3_testdata[7968] */\n    { 3984, 0x9E3779B185EBCA8DULL, 0x42C043E3244AF7E8ULL }, /* XSUM_XXH3_testdata[7969] */\n    { 3985, 0x0000000000000000ULL, 0xB8FE9445B6FBF8C0ULL }, /* XSUM_XXH3_testdata[7970] */\n    { 3985, 0x9E3779B185EBCA8DULL, 0xDF322C15B737F0A8ULL }, /* XSUM_XXH3_testdata[7971] */\n    { 3986, 0x0000000000000000ULL, 0x983B40D937389E12ULL }, /* XSUM_XXH3_testdata[7972] */\n    { 3986, 0x9E3779B185EBCA8DULL, 0x85128DA1EFFEC291ULL }, /* XSUM_XXH3_testdata[7973] */\n    { 3987, 0x0000000000000000ULL, 0x022BDCA841C7E36AULL }, /* XSUM_XXH3_testdata[7974] */\n    { 3987, 0x9E3779B185EBCA8DULL, 0x01FE2ADABDCFC75CULL }, /* XSUM_XXH3_testdata[7975] */\n    { 3988, 0x0000000000000000ULL, 0xA2DBCDCFFDB287F2ULL }, /* XSUM_XXH3_testdata[7976] */\n    { 3988, 0x9E3779B185EBCA8DULL, 0x82D212A8FB8DBE03ULL }, /* XSUM_XXH3_testdata[7977] */\n    { 3989, 0x0000000000000000ULL, 0xE9E21701E2BB0AF7ULL }, /* XSUM_XXH3_testdata[7978] */\n    { 3989, 0x9E3779B185EBCA8DULL, 0xDF967A00E46837CCULL }, /* XSUM_XXH3_testdata[7979] */\n    { 3990, 0x0000000000000000ULL, 0xA3951EEAC572F24DULL }, /* XSUM_XXH3_testdata[7980] */\n    { 3990, 0x9E3779B185EBCA8DULL, 0x5FC170EF073D265DULL }, /* XSUM_XXH3_testdata[7981] */\n    { 3991, 0x0000000000000000ULL, 0x71B75CFBC5C7FF7AULL }, /* XSUM_XXH3_testdata[7982] */\n    { 3991, 0x9E3779B185EBCA8DULL, 0xE044F7B8115A2BEDULL }, /* XSUM_XXH3_testdata[7983] */\n    { 3992, 0x0000000000000000ULL, 0x560473B92CA66B06ULL }, /* XSUM_XXH3_testdata[7984] */\n    { 3992, 0x9E3779B185EBCA8DULL, 0x5420B09C1771B61AULL }, /* XSUM_XXH3_testdata[7985] */\n    { 3993, 0x0000000000000000ULL, 0xD10183EE95BA2333ULL }, /* XSUM_XXH3_testdata[7986] */\n    { 3993, 0x9E3779B185EBCA8DULL, 0x6FC53C76904E0CBBULL }, /* XSUM_XXH3_testdata[7987] */\n    { 3994, 0x0000000000000000ULL, 0xA137F43241A5B99DULL }, /* XSUM_XXH3_testdata[7988] */\n    { 3994, 0x9E3779B185EBCA8DULL, 0xD6421EA72D97B5B5ULL }, /* XSUM_XXH3_testdata[7989] */\n    { 3995, 0x0000000000000000ULL, 0x0B094A9A19E93FEAULL }, /* XSUM_XXH3_testdata[7990] */\n    { 3995, 0x9E3779B185EBCA8DULL, 0xDF5FF6C3F8F85DAEULL }, /* XSUM_XXH3_testdata[7991] */\n    { 3996, 0x0000000000000000ULL, 0xF7F1B9E355A56C78ULL }, /* XSUM_XXH3_testdata[7992] */\n    { 3996, 0x9E3779B185EBCA8DULL, 0x440D8BF0C28F2386ULL }, /* XSUM_XXH3_testdata[7993] */\n    { 3997, 0x0000000000000000ULL, 0xB59E0DA0D0AC15FAULL }, /* XSUM_XXH3_testdata[7994] */\n    { 3997, 0x9E3779B185EBCA8DULL, 0x4C1A420DB1CC198BULL }, /* XSUM_XXH3_testdata[7995] */\n    { 3998, 0x0000000000000000ULL, 0x3C921215EB653D1DULL }, /* XSUM_XXH3_testdata[7996] */\n    { 3998, 0x9E3779B185EBCA8DULL, 0x26E9B9483790551FULL }, /* XSUM_XXH3_testdata[7997] */\n    { 3999, 0x0000000000000000ULL, 0xA4A38A7850158E01ULL }, /* XSUM_XXH3_testdata[7998] */\n    { 3999, 0x9E3779B185EBCA8DULL, 0xC8A7D8FE1F072911ULL }, /* XSUM_XXH3_testdata[7999] */\n    { 4000, 0x0000000000000000ULL, 0xD4BBD44AE7A245D6ULL }, /* XSUM_XXH3_testdata[8000] */\n    { 4000, 0x9E3779B185EBCA8DULL, 0x14D1D38BF7F90929ULL }, /* XSUM_XXH3_testdata[8001] */\n    { 4001, 0x0000000000000000ULL, 0x40865A418C827014ULL }, /* XSUM_XXH3_testdata[8002] */\n    { 4001, 0x9E3779B185EBCA8DULL, 0xA2CE1E5EAAE13199ULL }, /* XSUM_XXH3_testdata[8003] */\n    { 4002, 0x0000000000000000ULL, 0xDED0BB8EB0E9E5BBULL }, /* XSUM_XXH3_testdata[8004] */\n    { 4002, 0x9E3779B185EBCA8DULL, 0xEDCD3A406D723DEAULL }, /* XSUM_XXH3_testdata[8005] */\n    { 4003, 0x0000000000000000ULL, 0xAA4AD1D0A48CB176ULL }, /* XSUM_XXH3_testdata[8006] */\n    { 4003, 0x9E3779B185EBCA8DULL, 0x880A5B734D046849ULL }, /* XSUM_XXH3_testdata[8007] */\n    { 4004, 0x0000000000000000ULL, 0xD58188ABC81D37C6ULL }, /* XSUM_XXH3_testdata[8008] */\n    { 4004, 0x9E3779B185EBCA8DULL, 0x712781E12FBEF921ULL }, /* XSUM_XXH3_testdata[8009] */\n    { 4005, 0x0000000000000000ULL, 0x5B06AA2C44621825ULL }, /* XSUM_XXH3_testdata[8010] */\n    { 4005, 0x9E3779B185EBCA8DULL, 0xD9C37C284E6A8216ULL }, /* XSUM_XXH3_testdata[8011] */\n    { 4006, 0x0000000000000000ULL, 0xEB57CC9F39C8879EULL }, /* XSUM_XXH3_testdata[8012] */\n    { 4006, 0x9E3779B185EBCA8DULL, 0x4F33FAAF2C4EC509ULL }, /* XSUM_XXH3_testdata[8013] */\n    { 4007, 0x0000000000000000ULL, 0x3DCDD807BD42EE26ULL }, /* XSUM_XXH3_testdata[8014] */\n    { 4007, 0x9E3779B185EBCA8DULL, 0xD8F0E8A6D8B9FB59ULL }, /* XSUM_XXH3_testdata[8015] */\n    { 4008, 0x0000000000000000ULL, 0xF6F0C51DDFE11B30ULL }, /* XSUM_XXH3_testdata[8016] */\n    { 4008, 0x9E3779B185EBCA8DULL, 0xA6DB86CDF49CDC24ULL }, /* XSUM_XXH3_testdata[8017] */\n    { 4009, 0x0000000000000000ULL, 0x5BED8336DA2E1B91ULL }, /* XSUM_XXH3_testdata[8018] */\n    { 4009, 0x9E3779B185EBCA8DULL, 0x80C78888E438C8E4ULL }, /* XSUM_XXH3_testdata[8019] */\n    { 4010, 0x0000000000000000ULL, 0x18B1FDDD465EA2C1ULL }, /* XSUM_XXH3_testdata[8020] */\n    { 4010, 0x9E3779B185EBCA8DULL, 0x44B5135B49E9F8C5ULL }, /* XSUM_XXH3_testdata[8021] */\n    { 4011, 0x0000000000000000ULL, 0xB5C12C9C61209F68ULL }, /* XSUM_XXH3_testdata[8022] */\n    { 4011, 0x9E3779B185EBCA8DULL, 0x282C356F51F01633ULL }, /* XSUM_XXH3_testdata[8023] */\n    { 4012, 0x0000000000000000ULL, 0x85C82A6C0F1274E3ULL }, /* XSUM_XXH3_testdata[8024] */\n    { 4012, 0x9E3779B185EBCA8DULL, 0x3F3CC56500850438ULL }, /* XSUM_XXH3_testdata[8025] */\n    { 4013, 0x0000000000000000ULL, 0x44AA6A2ECB850B99ULL }, /* XSUM_XXH3_testdata[8026] */\n    { 4013, 0x9E3779B185EBCA8DULL, 0xFC918DF96A2F9086ULL }, /* XSUM_XXH3_testdata[8027] */\n    { 4014, 0x0000000000000000ULL, 0x6CC9DA2929EBB547ULL }, /* XSUM_XXH3_testdata[8028] */\n    { 4014, 0x9E3779B185EBCA8DULL, 0x0FA30447394E3206ULL }, /* XSUM_XXH3_testdata[8029] */\n    { 4015, 0x0000000000000000ULL, 0x45D8135F5AEF31F4ULL }, /* XSUM_XXH3_testdata[8030] */\n    { 4015, 0x9E3779B185EBCA8DULL, 0x52BB0C869F802BE6ULL }, /* XSUM_XXH3_testdata[8031] */\n    { 4016, 0x0000000000000000ULL, 0x7620342B18B38037ULL }, /* XSUM_XXH3_testdata[8032] */\n    { 4016, 0x9E3779B185EBCA8DULL, 0xBD27FB07E38FFB89ULL }, /* XSUM_XXH3_testdata[8033] */\n    { 4017, 0x0000000000000000ULL, 0x19AA8582519EFB78ULL }, /* XSUM_XXH3_testdata[8034] */\n    { 4017, 0x9E3779B185EBCA8DULL, 0xF6AE9ED2299687ECULL }, /* XSUM_XXH3_testdata[8035] */\n    { 4018, 0x0000000000000000ULL, 0x18AB9343042FFD7BULL }, /* XSUM_XXH3_testdata[8036] */\n    { 4018, 0x9E3779B185EBCA8DULL, 0x9CA0D8345D0C1364ULL }, /* XSUM_XXH3_testdata[8037] */\n    { 4019, 0x0000000000000000ULL, 0x58240880A0D0C9DAULL }, /* XSUM_XXH3_testdata[8038] */\n    { 4019, 0x9E3779B185EBCA8DULL, 0x3084812F602A7184ULL }, /* XSUM_XXH3_testdata[8039] */\n    { 4020, 0x0000000000000000ULL, 0xC6BF91DBA283CBFDULL }, /* XSUM_XXH3_testdata[8040] */\n    { 4020, 0x9E3779B185EBCA8DULL, 0x7C966FE6D9E62F5FULL }, /* XSUM_XXH3_testdata[8041] */\n    { 4021, 0x0000000000000000ULL, 0x65BA8FAA88EE3FB6ULL }, /* XSUM_XXH3_testdata[8042] */\n    { 4021, 0x9E3779B185EBCA8DULL, 0x37826DE37F8188ADULL }, /* XSUM_XXH3_testdata[8043] */\n    { 4022, 0x0000000000000000ULL, 0xE54A695510735977ULL }, /* XSUM_XXH3_testdata[8044] */\n    { 4022, 0x9E3779B185EBCA8DULL, 0x55CCAA4287B96BAFULL }, /* XSUM_XXH3_testdata[8045] */\n    { 4023, 0x0000000000000000ULL, 0x8E04EDA3E75BF177ULL }, /* XSUM_XXH3_testdata[8046] */\n    { 4023, 0x9E3779B185EBCA8DULL, 0xE8DD69B31C7AA562ULL }, /* XSUM_XXH3_testdata[8047] */\n    { 4024, 0x0000000000000000ULL, 0x8A0F3CA734A6FE60ULL }, /* XSUM_XXH3_testdata[8048] */\n    { 4024, 0x9E3779B185EBCA8DULL, 0xBD6286044C530E55ULL }, /* XSUM_XXH3_testdata[8049] */\n    { 4025, 0x0000000000000000ULL, 0xD9ED85C42BB2F252ULL }, /* XSUM_XXH3_testdata[8050] */\n    { 4025, 0x9E3779B185EBCA8DULL, 0xD0ECFCBE239FDAE4ULL }, /* XSUM_XXH3_testdata[8051] */\n    { 4026, 0x0000000000000000ULL, 0xF8084F228EC4F387ULL }, /* XSUM_XXH3_testdata[8052] */\n    { 4026, 0x9E3779B185EBCA8DULL, 0x406784D868BF9889ULL }, /* XSUM_XXH3_testdata[8053] */\n    { 4027, 0x0000000000000000ULL, 0x1C9144339B38AA9AULL }, /* XSUM_XXH3_testdata[8054] */\n    { 4027, 0x9E3779B185EBCA8DULL, 0x416651D9DF1E676FULL }, /* XSUM_XXH3_testdata[8055] */\n    { 4028, 0x0000000000000000ULL, 0xED9E073AD05153EAULL }, /* XSUM_XXH3_testdata[8056] */\n    { 4028, 0x9E3779B185EBCA8DULL, 0xFBD66B77B585F7A0ULL }, /* XSUM_XXH3_testdata[8057] */\n    { 4029, 0x0000000000000000ULL, 0x4E8E5C7C933C15C7ULL }, /* XSUM_XXH3_testdata[8058] */\n    { 4029, 0x9E3779B185EBCA8DULL, 0xCF53A8E7C5B6C534ULL }, /* XSUM_XXH3_testdata[8059] */\n    { 4030, 0x0000000000000000ULL, 0x7AF4A9E0038F11F7ULL }, /* XSUM_XXH3_testdata[8060] */\n    { 4030, 0x9E3779B185EBCA8DULL, 0x8A017810F4FC9DEDULL }, /* XSUM_XXH3_testdata[8061] */\n    { 4031, 0x0000000000000000ULL, 0x8BD0CF454B28920EULL }, /* XSUM_XXH3_testdata[8062] */\n    { 4031, 0x9E3779B185EBCA8DULL, 0xAD5E5C4D36915D21ULL }, /* XSUM_XXH3_testdata[8063] */\n    { 4032, 0x0000000000000000ULL, 0x526C9E698660795FULL }, /* XSUM_XXH3_testdata[8064] */\n    { 4032, 0x9E3779B185EBCA8DULL, 0xEDFA9AF90A2570F4ULL }, /* XSUM_XXH3_testdata[8065] */\n    { 4033, 0x0000000000000000ULL, 0x5B78ACBA805C7A9DULL }, /* XSUM_XXH3_testdata[8066] */\n    { 4033, 0x9E3779B185EBCA8DULL, 0xE4FF46D5A5AD419BULL }, /* XSUM_XXH3_testdata[8067] */\n    { 4034, 0x0000000000000000ULL, 0xA102C5136A2E85B3ULL }, /* XSUM_XXH3_testdata[8068] */\n    { 4034, 0x9E3779B185EBCA8DULL, 0x395C36DE86C13BB0ULL }, /* XSUM_XXH3_testdata[8069] */\n    { 4035, 0x0000000000000000ULL, 0x4511241B19C0FA71ULL }, /* XSUM_XXH3_testdata[8070] */\n    { 4035, 0x9E3779B185EBCA8DULL, 0x5E7C04526A4CD6E9ULL }, /* XSUM_XXH3_testdata[8071] */\n    { 4036, 0x0000000000000000ULL, 0x313E19B2397F5306ULL }, /* XSUM_XXH3_testdata[8072] */\n    { 4036, 0x9E3779B185EBCA8DULL, 0x8E4378ADB6056F30ULL }, /* XSUM_XXH3_testdata[8073] */\n    { 4037, 0x0000000000000000ULL, 0xF45852F43FB45730ULL }, /* XSUM_XXH3_testdata[8074] */\n    { 4037, 0x9E3779B185EBCA8DULL, 0x9EABF4BCD1D9854DULL }, /* XSUM_XXH3_testdata[8075] */\n    { 4038, 0x0000000000000000ULL, 0xAEB3ED5AA3FAFBB3ULL }, /* XSUM_XXH3_testdata[8076] */\n    { 4038, 0x9E3779B185EBCA8DULL, 0xDD8ED04139CDA479ULL }, /* XSUM_XXH3_testdata[8077] */\n    { 4039, 0x0000000000000000ULL, 0x629A488F54BB9A5CULL }, /* XSUM_XXH3_testdata[8078] */\n    { 4039, 0x9E3779B185EBCA8DULL, 0x88D289E20F432896ULL }, /* XSUM_XXH3_testdata[8079] */\n    { 4040, 0x0000000000000000ULL, 0x302AC702D017AF48ULL }, /* XSUM_XXH3_testdata[8080] */\n    { 4040, 0x9E3779B185EBCA8DULL, 0x63B3EBA53DD3C7F3ULL }, /* XSUM_XXH3_testdata[8081] */\n    { 4041, 0x0000000000000000ULL, 0xF392BF0F187C48A3ULL }, /* XSUM_XXH3_testdata[8082] */\n    { 4041, 0x9E3779B185EBCA8DULL, 0x4B18A944D21F9E8FULL }, /* XSUM_XXH3_testdata[8083] */\n    { 4042, 0x0000000000000000ULL, 0x7E2E33EAE958DCF4ULL }, /* XSUM_XXH3_testdata[8084] */\n    { 4042, 0x9E3779B185EBCA8DULL, 0xDA44FEE50C8F5BB0ULL }, /* XSUM_XXH3_testdata[8085] */\n    { 4043, 0x0000000000000000ULL, 0x7955E4BB5942274AULL }, /* XSUM_XXH3_testdata[8086] */\n    { 4043, 0x9E3779B185EBCA8DULL, 0xC28A8539FECBA7EBULL }, /* XSUM_XXH3_testdata[8087] */\n    { 4044, 0x0000000000000000ULL, 0x7FFDDDE92A33E6F3ULL }, /* XSUM_XXH3_testdata[8088] */\n    { 4044, 0x9E3779B185EBCA8DULL, 0x51923CA9096E6215ULL }, /* XSUM_XXH3_testdata[8089] */\n    { 4045, 0x0000000000000000ULL, 0xE876C93C712F5CE6ULL }, /* XSUM_XXH3_testdata[8090] */\n    { 4045, 0x9E3779B185EBCA8DULL, 0xDC6FD6E67A34FED4ULL }, /* XSUM_XXH3_testdata[8091] */\n    { 4046, 0x0000000000000000ULL, 0xCC6D082EB77008E6ULL }, /* XSUM_XXH3_testdata[8092] */\n    { 4046, 0x9E3779B185EBCA8DULL, 0x791FEF31ACFE46C7ULL }, /* XSUM_XXH3_testdata[8093] */\n    { 4047, 0x0000000000000000ULL, 0xC4DA2A18C857B469ULL }, /* XSUM_XXH3_testdata[8094] */\n    { 4047, 0x9E3779B185EBCA8DULL, 0x6E5C68216122FB2BULL }, /* XSUM_XXH3_testdata[8095] */\n    { 4048, 0x0000000000000000ULL, 0x0AC08275816C6F95ULL }, /* XSUM_XXH3_testdata[8096] */\n    { 4048, 0x9E3779B185EBCA8DULL, 0x108827705704EFC6ULL }, /* XSUM_XXH3_testdata[8097] */\n    { 4049, 0x0000000000000000ULL, 0xB8E89026CB7C7029ULL }, /* XSUM_XXH3_testdata[8098] */\n    { 4049, 0x9E3779B185EBCA8DULL, 0xB61ABB09B081A25DULL }, /* XSUM_XXH3_testdata[8099] */\n    { 4050, 0x0000000000000000ULL, 0xEDF79795BF9144C8ULL }, /* XSUM_XXH3_testdata[8100] */\n    { 4050, 0x9E3779B185EBCA8DULL, 0xB74696F2CA2997D1ULL }, /* XSUM_XXH3_testdata[8101] */\n    { 4051, 0x0000000000000000ULL, 0xC729C7AC4BB14964ULL }, /* XSUM_XXH3_testdata[8102] */\n    { 4051, 0x9E3779B185EBCA8DULL, 0x9D1CABF0F0D96765ULL }, /* XSUM_XXH3_testdata[8103] */\n    { 4052, 0x0000000000000000ULL, 0x609A24843463E169ULL }, /* XSUM_XXH3_testdata[8104] */\n    { 4052, 0x9E3779B185EBCA8DULL, 0xB87E44998D71C162ULL }, /* XSUM_XXH3_testdata[8105] */\n    { 4053, 0x0000000000000000ULL, 0x1BED4238AF1CB24BULL }, /* XSUM_XXH3_testdata[8106] */\n    { 4053, 0x9E3779B185EBCA8DULL, 0x31D93BB2EA4F386FULL }, /* XSUM_XXH3_testdata[8107] */\n    { 4054, 0x0000000000000000ULL, 0x770B55A6A483BCA4ULL }, /* XSUM_XXH3_testdata[8108] */\n    { 4054, 0x9E3779B185EBCA8DULL, 0xBA70C2B74F653493ULL }, /* XSUM_XXH3_testdata[8109] */\n    { 4055, 0x0000000000000000ULL, 0x23D3E35D5AD116E8ULL }, /* XSUM_XXH3_testdata[8110] */\n    { 4055, 0x9E3779B185EBCA8DULL, 0xE340C14E0B16781EULL }, /* XSUM_XXH3_testdata[8111] */\n    { 4056, 0x0000000000000000ULL, 0x8F52A469B0314027ULL }, /* XSUM_XXH3_testdata[8112] */\n    { 4056, 0x9E3779B185EBCA8DULL, 0x42E9D3AABC86D1A3ULL }, /* XSUM_XXH3_testdata[8113] */\n    { 4057, 0x0000000000000000ULL, 0xE80E3D01DFC0DFAAULL }, /* XSUM_XXH3_testdata[8114] */\n    { 4057, 0x9E3779B185EBCA8DULL, 0x8331A93BCEA6A7E7ULL }, /* XSUM_XXH3_testdata[8115] */\n    { 4058, 0x0000000000000000ULL, 0xA46F0713D1D96AACULL }, /* XSUM_XXH3_testdata[8116] */\n    { 4058, 0x9E3779B185EBCA8DULL, 0x12226CE027536089ULL }, /* XSUM_XXH3_testdata[8117] */\n    { 4059, 0x0000000000000000ULL, 0x48AB03C22EA5B06FULL }, /* XSUM_XXH3_testdata[8118] */\n    { 4059, 0x9E3779B185EBCA8DULL, 0x781B9FE3805E8D49ULL }, /* XSUM_XXH3_testdata[8119] */\n    { 4060, 0x0000000000000000ULL, 0x1CF540D651D84B2CULL }, /* XSUM_XXH3_testdata[8120] */\n    { 4060, 0x9E3779B185EBCA8DULL, 0x9B2A4997E91BB32CULL }, /* XSUM_XXH3_testdata[8121] */\n    { 4061, 0x0000000000000000ULL, 0x395B9F1A3476D098ULL }, /* XSUM_XXH3_testdata[8122] */\n    { 4061, 0x9E3779B185EBCA8DULL, 0x00E4E50A72AE87DBULL }, /* XSUM_XXH3_testdata[8123] */\n    { 4062, 0x0000000000000000ULL, 0x613625FF381D6585ULL }, /* XSUM_XXH3_testdata[8124] */\n    { 4062, 0x9E3779B185EBCA8DULL, 0xDF96924A26842033ULL }, /* XSUM_XXH3_testdata[8125] */\n    { 4063, 0x0000000000000000ULL, 0x44A5F2DC91EFDB81ULL }, /* XSUM_XXH3_testdata[8126] */\n    { 4063, 0x9E3779B185EBCA8DULL, 0x5A763652DB9F7AA1ULL }, /* XSUM_XXH3_testdata[8127] */\n    { 4064, 0x0000000000000000ULL, 0xD005690B90F42B3DULL }, /* XSUM_XXH3_testdata[8128] */\n    { 4064, 0x9E3779B185EBCA8DULL, 0x6646113CF792EFCCULL }, /* XSUM_XXH3_testdata[8129] */\n    { 4065, 0x0000000000000000ULL, 0x2AABD3E749018693ULL }, /* XSUM_XXH3_testdata[8130] */\n    { 4065, 0x9E3779B185EBCA8DULL, 0x8F69704EFAFC7CE6ULL }, /* XSUM_XXH3_testdata[8131] */\n    { 4066, 0x0000000000000000ULL, 0xBD32EC6AC8590941ULL }, /* XSUM_XXH3_testdata[8132] */\n    { 4066, 0x9E3779B185EBCA8DULL, 0xAFDC666E089AD97FULL }, /* XSUM_XXH3_testdata[8133] */\n    { 4067, 0x0000000000000000ULL, 0x17F48E89EA383997ULL }, /* XSUM_XXH3_testdata[8134] */\n    { 4067, 0x9E3779B185EBCA8DULL, 0xE80949C6577D0B1DULL }, /* XSUM_XXH3_testdata[8135] */\n    { 4068, 0x0000000000000000ULL, 0x409EE52A6BB82E50ULL }, /* XSUM_XXH3_testdata[8136] */\n    { 4068, 0x9E3779B185EBCA8DULL, 0x83B486082089F055ULL }, /* XSUM_XXH3_testdata[8137] */\n    { 4069, 0x0000000000000000ULL, 0x2A37D8C283560A96ULL }, /* XSUM_XXH3_testdata[8138] */\n    { 4069, 0x9E3779B185EBCA8DULL, 0x9FFAAF61614F195BULL }, /* XSUM_XXH3_testdata[8139] */\n    { 4070, 0x0000000000000000ULL, 0xB6BD6711BD542608ULL }, /* XSUM_XXH3_testdata[8140] */\n    { 4070, 0x9E3779B185EBCA8DULL, 0xBA4BF117D8520CC6ULL }, /* XSUM_XXH3_testdata[8141] */\n    { 4071, 0x0000000000000000ULL, 0x0DED6A95422B54AAULL }, /* XSUM_XXH3_testdata[8142] */\n    { 4071, 0x9E3779B185EBCA8DULL, 0x73019662E3B7E5A5ULL }, /* XSUM_XXH3_testdata[8143] */\n    { 4072, 0x0000000000000000ULL, 0x617DBA28E3EF7CCFULL }, /* XSUM_XXH3_testdata[8144] */\n    { 4072, 0x9E3779B185EBCA8DULL, 0x42B5B0478A2F9F19ULL }, /* XSUM_XXH3_testdata[8145] */\n    { 4073, 0x0000000000000000ULL, 0x985E6670B051042DULL }, /* XSUM_XXH3_testdata[8146] */\n    { 4073, 0x9E3779B185EBCA8DULL, 0xF2271200229B7305ULL }, /* XSUM_XXH3_testdata[8147] */\n    { 4074, 0x0000000000000000ULL, 0x683A8A468EDB302EULL }, /* XSUM_XXH3_testdata[8148] */\n    { 4074, 0x9E3779B185EBCA8DULL, 0xAEFB4E179FED9C88ULL }, /* XSUM_XXH3_testdata[8149] */\n    { 4075, 0x0000000000000000ULL, 0xE00A8B375D31275AULL }, /* XSUM_XXH3_testdata[8150] */\n    { 4075, 0x9E3779B185EBCA8DULL, 0x9FA2D2CA8DDBBCF3ULL }, /* XSUM_XXH3_testdata[8151] */\n    { 4076, 0x0000000000000000ULL, 0x1D09F151EC8021E5ULL }, /* XSUM_XXH3_testdata[8152] */\n    { 4076, 0x9E3779B185EBCA8DULL, 0x73A09B83EE65723CULL }, /* XSUM_XXH3_testdata[8153] */\n    { 4077, 0x0000000000000000ULL, 0xA3C2A4A8FB52E329ULL }, /* XSUM_XXH3_testdata[8154] */\n    { 4077, 0x9E3779B185EBCA8DULL, 0x27701C5AF11C0069ULL }, /* XSUM_XXH3_testdata[8155] */\n    { 4078, 0x0000000000000000ULL, 0x6670C8D7DEC04183ULL }, /* XSUM_XXH3_testdata[8156] */\n    { 4078, 0x9E3779B185EBCA8DULL, 0x6AFE8BB05CA6B943ULL }, /* XSUM_XXH3_testdata[8157] */\n    { 4079, 0x0000000000000000ULL, 0x8A5BBE290F81A57EULL }, /* XSUM_XXH3_testdata[8158] */\n    { 4079, 0x9E3779B185EBCA8DULL, 0x7C522C7AE0D03876ULL }, /* XSUM_XXH3_testdata[8159] */\n    { 4080, 0x0000000000000000ULL, 0x7ED2234F362A97D5ULL }, /* XSUM_XXH3_testdata[8160] */\n    { 4080, 0x9E3779B185EBCA8DULL, 0x7F3D70A7E5B3F9A1ULL }, /* XSUM_XXH3_testdata[8161] */\n    { 4081, 0x0000000000000000ULL, 0x1B8EAFCDF80BBDFDULL }, /* XSUM_XXH3_testdata[8162] */\n    { 4081, 0x9E3779B185EBCA8DULL, 0x02E79635CCC002EEULL }, /* XSUM_XXH3_testdata[8163] */\n    { 4082, 0x0000000000000000ULL, 0x5013EF2EAA3C5683ULL }, /* XSUM_XXH3_testdata[8164] */\n    { 4082, 0x9E3779B185EBCA8DULL, 0x3C373EC1D9A78477ULL }, /* XSUM_XXH3_testdata[8165] */\n    { 4083, 0x0000000000000000ULL, 0x4981B6B6B69E0F80ULL }, /* XSUM_XXH3_testdata[8166] */\n    { 4083, 0x9E3779B185EBCA8DULL, 0x3058EC4F3EDDDA22ULL }, /* XSUM_XXH3_testdata[8167] */\n    { 4084, 0x0000000000000000ULL, 0x1EC74897CEDF2D47ULL }, /* XSUM_XXH3_testdata[8168] */\n    { 4084, 0x9E3779B185EBCA8DULL, 0xB212E516ADC3536BULL }, /* XSUM_XXH3_testdata[8169] */\n    { 4085, 0x0000000000000000ULL, 0x267430998005772AULL }, /* XSUM_XXH3_testdata[8170] */\n    { 4085, 0x9E3779B185EBCA8DULL, 0xDDA517E217ED7B80ULL }, /* XSUM_XXH3_testdata[8171] */\n    { 4086, 0x0000000000000000ULL, 0xC9DDE2A74BA8925FULL }, /* XSUM_XXH3_testdata[8172] */\n    { 4086, 0x9E3779B185EBCA8DULL, 0xB9C9D4582A006BEAULL }, /* XSUM_XXH3_testdata[8173] */\n    { 4087, 0x0000000000000000ULL, 0x563098BE90EC168FULL }, /* XSUM_XXH3_testdata[8174] */\n    { 4087, 0x9E3779B185EBCA8DULL, 0xDFA20FC688D0AF48ULL }, /* XSUM_XXH3_testdata[8175] */\n    { 4088, 0x0000000000000000ULL, 0xA36A687AAB49E554ULL }, /* XSUM_XXH3_testdata[8176] */\n    { 4088, 0x9E3779B185EBCA8DULL, 0x379BF665192E4775ULL }, /* XSUM_XXH3_testdata[8177] */\n    { 4089, 0x0000000000000000ULL, 0x34338C8FF9753005ULL }, /* XSUM_XXH3_testdata[8178] */\n    { 4089, 0x9E3779B185EBCA8DULL, 0x0A508219A77780C7ULL }, /* XSUM_XXH3_testdata[8179] */\n    { 4090, 0x0000000000000000ULL, 0x7614D500BBB0CB51ULL }, /* XSUM_XXH3_testdata[8180] */\n    { 4090, 0x9E3779B185EBCA8DULL, 0x9F2E62A9B61FDAD5ULL }, /* XSUM_XXH3_testdata[8181] */\n    { 4091, 0x0000000000000000ULL, 0x81DDA05D3E0F7E7DULL }, /* XSUM_XXH3_testdata[8182] */\n    { 4091, 0x9E3779B185EBCA8DULL, 0x37DACC934EF3BCF8ULL }, /* XSUM_XXH3_testdata[8183] */\n    { 4092, 0x0000000000000000ULL, 0xA1CB210DD29A93C4ULL }, /* XSUM_XXH3_testdata[8184] */\n    { 4092, 0x9E3779B185EBCA8DULL, 0xEFB39BD4EA2906AEULL }, /* XSUM_XXH3_testdata[8185] */\n    { 4093, 0x0000000000000000ULL, 0x43E2C26AF42C201AULL }, /* XSUM_XXH3_testdata[8186] */\n    { 4093, 0x9E3779B185EBCA8DULL, 0xF693A0588A836DD0ULL }, /* XSUM_XXH3_testdata[8187] */\n    { 4094, 0x0000000000000000ULL, 0x197717AFE7C9B73EULL }, /* XSUM_XXH3_testdata[8188] */\n    { 4094, 0x9E3779B185EBCA8DULL, 0x2F2B070D052B1D2DULL }, /* XSUM_XXH3_testdata[8189] */\n    { 4095, 0x0000000000000000ULL, 0x3044187222AB0EFBULL }, /* XSUM_XXH3_testdata[8190] */\n    { 4095, 0x9E3779B185EBCA8DULL, 0x9F7DDF29C377A8ECULL }, /* XSUM_XXH3_testdata[8191] */\n    { 4096, 0x0000000000000000ULL, 0xE91206429D1F48F9ULL }, /* XSUM_XXH3_testdata[8192] */\n    { 4096, 0x9E3779B185EBCA8DULL, 0x2A3BBB20A5439DCDULL }, /* XSUM_XXH3_testdata[8193] */\n    { 4097, 0x0000000000000000ULL, 0xDAC80D543E339451ULL }, /* XSUM_XXH3_testdata[8194] */\n    { 4097, 0x9E3779B185EBCA8DULL, 0xA78887A19A340214ULL }, /* XSUM_XXH3_testdata[8195] */\n    { 4098, 0x0000000000000000ULL, 0x536E2124F23DF4DCULL }, /* XSUM_XXH3_testdata[8196] */\n    { 4098, 0x9E3779B185EBCA8DULL, 0x63604DD99F9A0D25ULL }, /* XSUM_XXH3_testdata[8197] */\n    { 4099, 0x0000000000000000ULL, 0x318D235ABA648B01ULL }, /* XSUM_XXH3_testdata[8198] */\n    { 4099, 0x9E3779B185EBCA8DULL, 0x7849F825702B5C2FULL }, /* XSUM_XXH3_testdata[8199] */\n    { 4100, 0x0000000000000000ULL, 0x708DA8E991EA3767ULL }, /* XSUM_XXH3_testdata[8200] */\n    { 4100, 0x9E3779B185EBCA8DULL, 0x68C5E93C2C55D53FULL }, /* XSUM_XXH3_testdata[8201] */\n    { 4101, 0x0000000000000000ULL, 0x7B6E0277636B7D11ULL }, /* XSUM_XXH3_testdata[8202] */\n    { 4101, 0x9E3779B185EBCA8DULL, 0x0415084858687771ULL }, /* XSUM_XXH3_testdata[8203] */\n    { 4102, 0x0000000000000000ULL, 0x9B7212296B317024ULL }, /* XSUM_XXH3_testdata[8204] */\n    { 4102, 0x9E3779B185EBCA8DULL, 0xB508A2861AA205C7ULL }, /* XSUM_XXH3_testdata[8205] */\n    { 4103, 0x0000000000000000ULL, 0xD6E778C94923EA44ULL }, /* XSUM_XXH3_testdata[8206] */\n    { 4103, 0x9E3779B185EBCA8DULL, 0x917A70D1756179ADULL }, /* XSUM_XXH3_testdata[8207] */\n    { 4104, 0x0000000000000000ULL, 0x7E6885379F309E58ULL }, /* XSUM_XXH3_testdata[8208] */\n    { 4104, 0x9E3779B185EBCA8DULL, 0xDD8CBBA844976FDAULL }, /* XSUM_XXH3_testdata[8209] */\n    { 4105, 0x0000000000000000ULL, 0x01B01BA093BD2B56ULL }, /* XSUM_XXH3_testdata[8210] */\n    { 4105, 0x9E3779B185EBCA8DULL, 0x6831B8F9AF88C06EULL }, /* XSUM_XXH3_testdata[8211] */\n    { 4106, 0x0000000000000000ULL, 0x8E223FE2C8A6C523ULL }, /* XSUM_XXH3_testdata[8212] */\n    { 4106, 0x9E3779B185EBCA8DULL, 0x236C0B797A639A03ULL }, /* XSUM_XXH3_testdata[8213] */\n    { 4107, 0x0000000000000000ULL, 0xCB55589B16B7596EULL }, /* XSUM_XXH3_testdata[8214] */\n    { 4107, 0x9E3779B185EBCA8DULL, 0x822FD6CBD55DEAF3ULL }, /* XSUM_XXH3_testdata[8215] */\n    { 4108, 0x0000000000000000ULL, 0xD2B50F5E142497B9ULL }, /* XSUM_XXH3_testdata[8216] */\n    { 4108, 0x9E3779B185EBCA8DULL, 0xCC1DCFF11EE70755ULL }, /* XSUM_XXH3_testdata[8217] */\n    { 4109, 0x0000000000000000ULL, 0x54D5D3B1358B288AULL }, /* XSUM_XXH3_testdata[8218] */\n    { 4109, 0x9E3779B185EBCA8DULL, 0x7EE3373734321C73ULL }, /* XSUM_XXH3_testdata[8219] */\n    { 4110, 0x0000000000000000ULL, 0xC005E3BEDA002458ULL }, /* XSUM_XXH3_testdata[8220] */\n    { 4110, 0x9E3779B185EBCA8DULL, 0xABFAC6375AEC37C7ULL }, /* XSUM_XXH3_testdata[8221] */\n    { 4111, 0x0000000000000000ULL, 0xA7F37BEB267E36E5ULL }, /* XSUM_XXH3_testdata[8222] */\n    { 4111, 0x9E3779B185EBCA8DULL, 0x7E001F4B3ECFB1C9ULL }, /* XSUM_XXH3_testdata[8223] */\n    { 4112, 0x0000000000000000ULL, 0xE6C6754333B04AA6ULL }, /* XSUM_XXH3_testdata[8224] */\n    { 4112, 0x9E3779B185EBCA8DULL, 0x7568121A6F2E2F51ULL }, /* XSUM_XXH3_testdata[8225] */\n    { 4113, 0x0000000000000000ULL, 0x01F24DFB53ED6D89ULL }, /* XSUM_XXH3_testdata[8226] */\n    { 4113, 0x9E3779B185EBCA8DULL, 0x3912A517D7CB58BEULL }, /* XSUM_XXH3_testdata[8227] */\n    { 4114, 0x0000000000000000ULL, 0xDF151F68306972B7ULL }, /* XSUM_XXH3_testdata[8228] */\n    { 4114, 0x9E3779B185EBCA8DULL, 0x52FA1526770C4EC7ULL }, /* XSUM_XXH3_testdata[8229] */\n    { 4115, 0x0000000000000000ULL, 0xE98596DA3274CFBAULL }, /* XSUM_XXH3_testdata[8230] */\n    { 4115, 0x9E3779B185EBCA8DULL, 0x1C3B5137394A9482ULL }, /* XSUM_XXH3_testdata[8231] */\n    { 4116, 0x0000000000000000ULL, 0x44E1F7DD02552FB6ULL }, /* XSUM_XXH3_testdata[8232] */\n    { 4116, 0x9E3779B185EBCA8DULL, 0x08F4B72C651043BAULL }, /* XSUM_XXH3_testdata[8233] */\n    { 4117, 0x0000000000000000ULL, 0x28DF58954DE4025FULL }, /* XSUM_XXH3_testdata[8234] */\n    { 4117, 0x9E3779B185EBCA8DULL, 0xAB508A47A93BB882ULL }, /* XSUM_XXH3_testdata[8235] */\n    { 4118, 0x0000000000000000ULL, 0x2D6AD31EABD0EF8BULL }, /* XSUM_XXH3_testdata[8236] */\n    { 4118, 0x9E3779B185EBCA8DULL, 0x8352B0B7C75E5F9BULL }, /* XSUM_XXH3_testdata[8237] */\n    { 4119, 0x0000000000000000ULL, 0x29C77571022B3DFCULL }, /* XSUM_XXH3_testdata[8238] */\n    { 4119, 0x9E3779B185EBCA8DULL, 0xAA05BDB0FF756E28ULL }, /* XSUM_XXH3_testdata[8239] */\n    { 4120, 0x0000000000000000ULL, 0xF78F1E6B64FC4FAFULL }, /* XSUM_XXH3_testdata[8240] */\n    { 4120, 0x9E3779B185EBCA8DULL, 0x2AF071ED04DE3706ULL }, /* XSUM_XXH3_testdata[8241] */\n    { 4121, 0x0000000000000000ULL, 0x9F07644999D631FEULL }, /* XSUM_XXH3_testdata[8242] */\n    { 4121, 0x9E3779B185EBCA8DULL, 0x58D5AED23AC86D18ULL }, /* XSUM_XXH3_testdata[8243] */\n    { 4122, 0x0000000000000000ULL, 0xAB4CD24CD29D8970ULL }, /* XSUM_XXH3_testdata[8244] */\n    { 4122, 0x9E3779B185EBCA8DULL, 0x7BAD5355D287C703ULL }, /* XSUM_XXH3_testdata[8245] */\n    { 4123, 0x0000000000000000ULL, 0x2F9C1C05A78B37D8ULL }, /* XSUM_XXH3_testdata[8246] */\n    { 4123, 0x9E3779B185EBCA8DULL, 0x4A8959FCB1E4E4AFULL }, /* XSUM_XXH3_testdata[8247] */\n    { 4124, 0x0000000000000000ULL, 0x35AD8F65591B2C05ULL }, /* XSUM_XXH3_testdata[8248] */\n    { 4124, 0x9E3779B185EBCA8DULL, 0x603CCE1C74CED430ULL }, /* XSUM_XXH3_testdata[8249] */\n    { 4125, 0x0000000000000000ULL, 0xBEBE4BF06A34E0ADULL }, /* XSUM_XXH3_testdata[8250] */\n    { 4125, 0x9E3779B185EBCA8DULL, 0xB9DE0F8488404CE1ULL }, /* XSUM_XXH3_testdata[8251] */\n    { 4126, 0x0000000000000000ULL, 0xD5B0CFEE781B17F4ULL }, /* XSUM_XXH3_testdata[8252] */\n    { 4126, 0x9E3779B185EBCA8DULL, 0xEC08F7276FD854C4ULL }, /* XSUM_XXH3_testdata[8253] */\n    { 4127, 0x0000000000000000ULL, 0x60E4E4B2B75A028FULL }, /* XSUM_XXH3_testdata[8254] */\n    { 4127, 0x9E3779B185EBCA8DULL, 0x3640249C9E7F6A99ULL }, /* XSUM_XXH3_testdata[8255] */\n    { 4128, 0x0000000000000000ULL, 0x58F87C03A5109698ULL }, /* XSUM_XXH3_testdata[8256] */\n    { 4128, 0x9E3779B185EBCA8DULL, 0x099F06BA6D0AEA6EULL }, /* XSUM_XXH3_testdata[8257] */\n    { 4129, 0x0000000000000000ULL, 0xFD79517DA353C9C7ULL }, /* XSUM_XXH3_testdata[8258] */\n    { 4129, 0x9E3779B185EBCA8DULL, 0x1CFB7C71EE7A3874ULL }, /* XSUM_XXH3_testdata[8259] */\n    { 4130, 0x0000000000000000ULL, 0xD0F8D653F6C74FF0ULL }, /* XSUM_XXH3_testdata[8260] */\n    { 4130, 0x9E3779B185EBCA8DULL, 0x8031A56A7D2F92AEULL }, /* XSUM_XXH3_testdata[8261] */\n    { 4131, 0x0000000000000000ULL, 0x951F461DB8CD496CULL }, /* XSUM_XXH3_testdata[8262] */\n    { 4131, 0x9E3779B185EBCA8DULL, 0x7A407673EB490FF5ULL }, /* XSUM_XXH3_testdata[8263] */\n    { 4132, 0x0000000000000000ULL, 0x7645BA69A2B2FF52ULL }, /* XSUM_XXH3_testdata[8264] */\n    { 4132, 0x9E3779B185EBCA8DULL, 0x77B67ABE4C6842A2ULL }, /* XSUM_XXH3_testdata[8265] */\n    { 4133, 0x0000000000000000ULL, 0xB1793BB4317787F8ULL }, /* XSUM_XXH3_testdata[8266] */\n    { 4133, 0x9E3779B185EBCA8DULL, 0x13CDADE8147771D8ULL }, /* XSUM_XXH3_testdata[8267] */\n    { 4134, 0x0000000000000000ULL, 0x06DEEEE425EAEC97ULL }, /* XSUM_XXH3_testdata[8268] */\n    { 4134, 0x9E3779B185EBCA8DULL, 0x47410600B8A6DC30ULL }, /* XSUM_XXH3_testdata[8269] */\n    { 4135, 0x0000000000000000ULL, 0x07794C32F9ABB48FULL }, /* XSUM_XXH3_testdata[8270] */\n    { 4135, 0x9E3779B185EBCA8DULL, 0x965359AACAED70CDULL }, /* XSUM_XXH3_testdata[8271] */\n    { 4136, 0x0000000000000000ULL, 0xCFD131A86A9BAD5DULL }, /* XSUM_XXH3_testdata[8272] */\n    { 4136, 0x9E3779B185EBCA8DULL, 0x9D698ADA391EBBD6ULL }, /* XSUM_XXH3_testdata[8273] */\n    { 4137, 0x0000000000000000ULL, 0x609D2C8FFEDC356AULL }, /* XSUM_XXH3_testdata[8274] */\n    { 4137, 0x9E3779B185EBCA8DULL, 0xFC186A81B9635DA7ULL }, /* XSUM_XXH3_testdata[8275] */\n    { 4138, 0x0000000000000000ULL, 0x593FBE1328A081C8ULL }, /* XSUM_XXH3_testdata[8276] */\n    { 4138, 0x9E3779B185EBCA8DULL, 0x886E386B2E8BAF4FULL }, /* XSUM_XXH3_testdata[8277] */\n    { 4139, 0x0000000000000000ULL, 0x35C0267703DEB52AULL }, /* XSUM_XXH3_testdata[8278] */\n    { 4139, 0x9E3779B185EBCA8DULL, 0x1335705DF9DFF4AFULL }, /* XSUM_XXH3_testdata[8279] */\n    { 4140, 0x0000000000000000ULL, 0x5B9C2CCB1A190108ULL }, /* XSUM_XXH3_testdata[8280] */\n    { 4140, 0x9E3779B185EBCA8DULL, 0xB4460979100B3C8FULL }, /* XSUM_XXH3_testdata[8281] */\n    { 4141, 0x0000000000000000ULL, 0x3CE6D83750A87654ULL }, /* XSUM_XXH3_testdata[8282] */\n    { 4141, 0x9E3779B185EBCA8DULL, 0xDA80A64ABB430483ULL }, /* XSUM_XXH3_testdata[8283] */\n    { 4142, 0x0000000000000000ULL, 0x1162D413E7ED9194ULL }, /* XSUM_XXH3_testdata[8284] */\n    { 4142, 0x9E3779B185EBCA8DULL, 0xC7C177607C970768ULL }, /* XSUM_XXH3_testdata[8285] */\n    { 4143, 0x0000000000000000ULL, 0x8CE229BE4C9AAD31ULL }, /* XSUM_XXH3_testdata[8286] */\n    { 4143, 0x9E3779B185EBCA8DULL, 0xF68CF2EDEE66AA53ULL }, /* XSUM_XXH3_testdata[8287] */\n    { 4144, 0x0000000000000000ULL, 0xA360545F02F6A5ECULL }, /* XSUM_XXH3_testdata[8288] */\n    { 4144, 0x9E3779B185EBCA8DULL, 0xBEB893BE02633B6EULL }, /* XSUM_XXH3_testdata[8289] */\n    { 4145, 0x0000000000000000ULL, 0xABD8127787B83F8EULL }, /* XSUM_XXH3_testdata[8290] */\n    { 4145, 0x9E3779B185EBCA8DULL, 0xD452D7D8018971B4ULL }, /* XSUM_XXH3_testdata[8291] */\n    { 4146, 0x0000000000000000ULL, 0x5C926EB5DB8927D2ULL }, /* XSUM_XXH3_testdata[8292] */\n    { 4146, 0x9E3779B185EBCA8DULL, 0x7B4A283B13347765ULL }, /* XSUM_XXH3_testdata[8293] */\n    { 4147, 0x0000000000000000ULL, 0x53622CE56808C5A5ULL }, /* XSUM_XXH3_testdata[8294] */\n    { 4147, 0x9E3779B185EBCA8DULL, 0x540B305923998D7CULL }, /* XSUM_XXH3_testdata[8295] */\n    { 4148, 0x0000000000000000ULL, 0x4C76DFDDEE340812ULL }, /* XSUM_XXH3_testdata[8296] */\n    { 4148, 0x9E3779B185EBCA8DULL, 0x9015A06A74AAF7ADULL }, /* XSUM_XXH3_testdata[8297] */\n    { 4149, 0x0000000000000000ULL, 0xC8BC0D4587507A82ULL }, /* XSUM_XXH3_testdata[8298] */\n    { 4149, 0x9E3779B185EBCA8DULL, 0x49078EE634DAC055ULL }, /* XSUM_XXH3_testdata[8299] */\n    { 4150, 0x0000000000000000ULL, 0xF361427C856A2130ULL }, /* XSUM_XXH3_testdata[8300] */\n    { 4150, 0x9E3779B185EBCA8DULL, 0x2C274D3B17BDAB2BULL }, /* XSUM_XXH3_testdata[8301] */\n    { 4151, 0x0000000000000000ULL, 0x73C28767099B7F10ULL }, /* XSUM_XXH3_testdata[8302] */\n    { 4151, 0x9E3779B185EBCA8DULL, 0x50D6EF8D5079F59EULL }, /* XSUM_XXH3_testdata[8303] */\n    { 4152, 0x0000000000000000ULL, 0xCD366C29C2EFCBEEULL }, /* XSUM_XXH3_testdata[8304] */\n    { 4152, 0x9E3779B185EBCA8DULL, 0x788CA0DA89BA7994ULL }, /* XSUM_XXH3_testdata[8305] */\n    { 4153, 0x0000000000000000ULL, 0xDECDEB44E10C8AEDULL }, /* XSUM_XXH3_testdata[8306] */\n    { 4153, 0x9E3779B185EBCA8DULL, 0xF9EC4FC72ED3022BULL }, /* XSUM_XXH3_testdata[8307] */\n    { 4154, 0x0000000000000000ULL, 0x3D275C1B1AE8039BULL }, /* XSUM_XXH3_testdata[8308] */\n    { 4154, 0x9E3779B185EBCA8DULL, 0xA5102A522AA1A09FULL }, /* XSUM_XXH3_testdata[8309] */\n    { 4155, 0x0000000000000000ULL, 0xA4FDF77C6F559146ULL }, /* XSUM_XXH3_testdata[8310] */\n    { 4155, 0x9E3779B185EBCA8DULL, 0x35C840E2E19D43F2ULL }, /* XSUM_XXH3_testdata[8311] */\n    { 4156, 0x0000000000000000ULL, 0xF813FD5B27829876ULL }, /* XSUM_XXH3_testdata[8312] */\n    { 4156, 0x9E3779B185EBCA8DULL, 0xF7111F8114507DD9ULL }, /* XSUM_XXH3_testdata[8313] */\n    { 4157, 0x0000000000000000ULL, 0xF42176B56C73715FULL }, /* XSUM_XXH3_testdata[8314] */\n    { 4157, 0x9E3779B185EBCA8DULL, 0x077018E0E617CDEBULL }, /* XSUM_XXH3_testdata[8315] */\n    { 4158, 0x0000000000000000ULL, 0xEDBE4799591C4E15ULL }, /* XSUM_XXH3_testdata[8316] */\n    { 4158, 0x9E3779B185EBCA8DULL, 0xB2707B4590CF62F7ULL }, /* XSUM_XXH3_testdata[8317] */\n    { 4159, 0x0000000000000000ULL, 0x4414D090B4A6043FULL }, /* XSUM_XXH3_testdata[8318] */\n    { 4159, 0x9E3779B185EBCA8DULL, 0x19BC48EE50380E4DULL }, /* XSUM_XXH3_testdata[8319] */\n    { 4160, 0x0000000000000000ULL, 0x4F323B15321E94E1ULL }, /* XSUM_XXH3_testdata[8320] */\n    { 4160, 0x9E3779B185EBCA8DULL, 0x1BF6F5FAF9EECABDULL }, /* XSUM_XXH3_testdata[8321] */\n};\nstatic const XSUM_testdata64_t XSUM_XXH3_withSecret_testdata[] = {\n    {    0, 0x0000000000000000ULL, 0x3559D64878C5C66CULL }, /* XSUM_XXH3_withSecret_testdata[0] */\n    {    1, 0x0000000000000000ULL, 0x8A52451418B2DA4DULL }, /* XSUM_XXH3_withSecret_testdata[1] */\n    {    2, 0x0000000000000000ULL, 0x37F66AEA23328C98ULL }, /* XSUM_XXH3_withSecret_testdata[2] */\n    {    3, 0x0000000000000000ULL, 0xE9AF94712FFBC846ULL }, /* XSUM_XXH3_withSecret_testdata[3] */\n    {    4, 0x0000000000000000ULL, 0x95806659C700BBA1ULL }, /* XSUM_XXH3_withSecret_testdata[4] */\n    {    5, 0x0000000000000000ULL, 0xF330D2654243E681ULL }, /* XSUM_XXH3_withSecret_testdata[5] */\n    {    6, 0x0000000000000000ULL, 0x82C90AB0519369ADULL }, /* XSUM_XXH3_withSecret_testdata[6] */\n    {    7, 0x0000000000000000ULL, 0xB0DD580D8AE16969ULL }, /* XSUM_XXH3_withSecret_testdata[7] */\n    {    8, 0x0000000000000000ULL, 0x2A4B7E158EEA2325ULL }, /* XSUM_XXH3_withSecret_testdata[8] */\n    {    9, 0x0000000000000000ULL, 0x292020119372149AULL }, /* XSUM_XXH3_withSecret_testdata[9] */\n    {   10, 0x0000000000000000ULL, 0xBAE944C604D2F7E2ULL }, /* XSUM_XXH3_withSecret_testdata[10] */\n    {   11, 0x0000000000000000ULL, 0xE034868A5C3D79E1ULL }, /* XSUM_XXH3_withSecret_testdata[11] */\n    {   12, 0x0000000000000000ULL, 0x14631E773B78EC57ULL }, /* XSUM_XXH3_withSecret_testdata[12] */\n    {   13, 0x0000000000000000ULL, 0x046C4D0B259A8ED1ULL }, /* XSUM_XXH3_withSecret_testdata[13] */\n    {   14, 0x0000000000000000ULL, 0xD51F460536B5159FULL }, /* XSUM_XXH3_withSecret_testdata[14] */\n    {   15, 0x0000000000000000ULL, 0x5137DFDCDF711355ULL }, /* XSUM_XXH3_withSecret_testdata[15] */\n    {   16, 0x0000000000000000ULL, 0x62CBA613B281FF2EULL }, /* XSUM_XXH3_withSecret_testdata[16] */\n    {   17, 0x0000000000000000ULL, 0xDFFB6E4943FAC2A4ULL }, /* XSUM_XXH3_withSecret_testdata[17] */\n    {   18, 0x0000000000000000ULL, 0xDABD833C6B48BD26ULL }, /* XSUM_XXH3_withSecret_testdata[18] */\n    {   19, 0x0000000000000000ULL, 0x56DD3B238964D62BULL }, /* XSUM_XXH3_withSecret_testdata[19] */\n    {   20, 0x0000000000000000ULL, 0x5667955699533B4FULL }, /* XSUM_XXH3_withSecret_testdata[20] */\n    {   21, 0x0000000000000000ULL, 0x48B036105E5C5286ULL }, /* XSUM_XXH3_withSecret_testdata[21] */\n    {   22, 0x0000000000000000ULL, 0xDF70A3841C192C38ULL }, /* XSUM_XXH3_withSecret_testdata[22] */\n    {   23, 0x0000000000000000ULL, 0x9403DE49772A2DF2ULL }, /* XSUM_XXH3_withSecret_testdata[23] */\n    {   24, 0x0000000000000000ULL, 0xCDD5542E4A9D9FE8ULL }, /* XSUM_XXH3_withSecret_testdata[24] */\n    {   25, 0x0000000000000000ULL, 0xBA0BE98EE7AC4CCAULL }, /* XSUM_XXH3_withSecret_testdata[25] */\n    {   26, 0x0000000000000000ULL, 0xB7D9FAA673781DF8ULL }, /* XSUM_XXH3_withSecret_testdata[26] */\n    {   27, 0x0000000000000000ULL, 0x005313FE4BEE96D6ULL }, /* XSUM_XXH3_withSecret_testdata[27] */\n    {   28, 0x0000000000000000ULL, 0xAAE47D2CD16D3F2AULL }, /* XSUM_XXH3_withSecret_testdata[28] */\n    {   29, 0x0000000000000000ULL, 0xC86F13378C48F8DCULL }, /* XSUM_XXH3_withSecret_testdata[29] */\n    {   30, 0x0000000000000000ULL, 0x05130E166DD9422BULL }, /* XSUM_XXH3_withSecret_testdata[30] */\n    {   31, 0x0000000000000000ULL, 0xDA720D790C6EF860ULL }, /* XSUM_XXH3_withSecret_testdata[31] */\n    {   32, 0x0000000000000000ULL, 0x671C68B8271754F9ULL }, /* XSUM_XXH3_withSecret_testdata[32] */\n    {   33, 0x0000000000000000ULL, 0xADE168D383F3FD32ULL }, /* XSUM_XXH3_withSecret_testdata[33] */\n    {   34, 0x0000000000000000ULL, 0x23CBB39531AB8F3EULL }, /* XSUM_XXH3_withSecret_testdata[34] */\n    {   35, 0x0000000000000000ULL, 0x18C55343DAC1B386ULL }, /* XSUM_XXH3_withSecret_testdata[35] */\n    {   36, 0x0000000000000000ULL, 0xDC3693247AD848AEULL }, /* XSUM_XXH3_withSecret_testdata[36] */\n    {   37, 0x0000000000000000ULL, 0x5ABDD7FD663F3B7BULL }, /* XSUM_XXH3_withSecret_testdata[37] */\n    {   38, 0x0000000000000000ULL, 0xBF7348F86B6D4622ULL }, /* XSUM_XXH3_withSecret_testdata[38] */\n    {   39, 0x0000000000000000ULL, 0x646F1CFF8304EF22ULL }, /* XSUM_XXH3_withSecret_testdata[39] */\n    {   40, 0x0000000000000000ULL, 0x52CFB7EAF0E391CBULL }, /* XSUM_XXH3_withSecret_testdata[40] */\n    {   41, 0x0000000000000000ULL, 0x32D1852E7ECCFD48ULL }, /* XSUM_XXH3_withSecret_testdata[41] */\n    {   42, 0x0000000000000000ULL, 0x09159A6F181A9368ULL }, /* XSUM_XXH3_withSecret_testdata[42] */\n    {   43, 0x0000000000000000ULL, 0x55F8B6714943EB38ULL }, /* XSUM_XXH3_withSecret_testdata[43] */\n    {   44, 0x0000000000000000ULL, 0x09CD14E518260406ULL }, /* XSUM_XXH3_withSecret_testdata[44] */\n    {   45, 0x0000000000000000ULL, 0xD30F1C72440B7BB0ULL }, /* XSUM_XXH3_withSecret_testdata[45] */\n    {   46, 0x0000000000000000ULL, 0x8FEC73FBB7A21C5BULL }, /* XSUM_XXH3_withSecret_testdata[46] */\n    {   47, 0x0000000000000000ULL, 0x336C6496B997E855ULL }, /* XSUM_XXH3_withSecret_testdata[47] */\n    {   48, 0x0000000000000000ULL, 0x33ABD54D094B2534ULL }, /* XSUM_XXH3_withSecret_testdata[48] */\n    {   49, 0x0000000000000000ULL, 0x2B1CE6F959449BCDULL }, /* XSUM_XXH3_withSecret_testdata[49] */\n    {   50, 0x0000000000000000ULL, 0xF7DD058C0283330CULL }, /* XSUM_XXH3_withSecret_testdata[50] */\n    {   51, 0x0000000000000000ULL, 0x5D625EFDF535A046ULL }, /* XSUM_XXH3_withSecret_testdata[51] */\n    {   52, 0x0000000000000000ULL, 0x8DD49B20F9B3125CULL }, /* XSUM_XXH3_withSecret_testdata[52] */\n    {   53, 0x0000000000000000ULL, 0xF0FCEFB9D3F58F43ULL }, /* XSUM_XXH3_withSecret_testdata[53] */\n    {   54, 0x0000000000000000ULL, 0x5CCB29EE646DDEAEULL }, /* XSUM_XXH3_withSecret_testdata[54] */\n    {   55, 0x0000000000000000ULL, 0xB5DE9BA8EA4BB212ULL }, /* XSUM_XXH3_withSecret_testdata[55] */\n    {   56, 0x0000000000000000ULL, 0x04F51FE1A8A70F5DULL }, /* XSUM_XXH3_withSecret_testdata[56] */\n    {   57, 0x0000000000000000ULL, 0x71D8D5E44E590161ULL }, /* XSUM_XXH3_withSecret_testdata[57] */\n    {   58, 0x0000000000000000ULL, 0x7EEE1C9584B621BFULL }, /* XSUM_XXH3_withSecret_testdata[58] */\n    {   59, 0x0000000000000000ULL, 0x06D5FF5F54D5469EULL }, /* XSUM_XXH3_withSecret_testdata[59] */\n    {   60, 0x0000000000000000ULL, 0x2B8257D168E66C7BULL }, /* XSUM_XXH3_withSecret_testdata[60] */\n    {   61, 0x0000000000000000ULL, 0xA390B2C65A96D57DULL }, /* XSUM_XXH3_withSecret_testdata[61] */\n    {   62, 0x0000000000000000ULL, 0x7F9C891EC45E96C5ULL }, /* XSUM_XXH3_withSecret_testdata[62] */\n    {   63, 0x0000000000000000ULL, 0xD9D0ACB4CE3B9452ULL }, /* XSUM_XXH3_withSecret_testdata[63] */\n    {   64, 0x0000000000000000ULL, 0x65DD3890700E5F6BULL }, /* XSUM_XXH3_withSecret_testdata[64] */\n    {   65, 0x0000000000000000ULL, 0x0BC6DB31CCA62167ULL }, /* XSUM_XXH3_withSecret_testdata[65] */\n    {   66, 0x0000000000000000ULL, 0x64A5E1A3C12870FAULL }, /* XSUM_XXH3_withSecret_testdata[66] */\n    {   67, 0x0000000000000000ULL, 0x5D3CFA697D9E83F8ULL }, /* XSUM_XXH3_withSecret_testdata[67] */\n    {   68, 0x0000000000000000ULL, 0x15A8FD16AB4A73A1ULL }, /* XSUM_XXH3_withSecret_testdata[68] */\n    {   69, 0x0000000000000000ULL, 0xA310CDB5CBE63700ULL }, /* XSUM_XXH3_withSecret_testdata[69] */\n    {   70, 0x0000000000000000ULL, 0x5012B948823B8378ULL }, /* XSUM_XXH3_withSecret_testdata[70] */\n    {   71, 0x0000000000000000ULL, 0x346FBEA31AAA4CDFULL }, /* XSUM_XXH3_withSecret_testdata[71] */\n    {   72, 0x0000000000000000ULL, 0x8F217AA1765AB20FULL }, /* XSUM_XXH3_withSecret_testdata[72] */\n    {   73, 0x0000000000000000ULL, 0x5DF8C46D14F4D456ULL }, /* XSUM_XXH3_withSecret_testdata[73] */\n    {   74, 0x0000000000000000ULL, 0x7C86AAAFB905F4E8ULL }, /* XSUM_XXH3_withSecret_testdata[74] */\n    {   75, 0x0000000000000000ULL, 0x838A6D397FE89E48ULL }, /* XSUM_XXH3_withSecret_testdata[75] */\n    {   76, 0x0000000000000000ULL, 0xA2BD114C0B33F1E1ULL }, /* XSUM_XXH3_withSecret_testdata[76] */\n    {   77, 0x0000000000000000ULL, 0xF9D1EF170EAEE679ULL }, /* XSUM_XXH3_withSecret_testdata[77] */\n    {   78, 0x0000000000000000ULL, 0x1BA1541EF00D50D4ULL }, /* XSUM_XXH3_withSecret_testdata[78] */\n    {   79, 0x0000000000000000ULL, 0x55150B4191E34500ULL }, /* XSUM_XXH3_withSecret_testdata[79] */\n    {   80, 0x0000000000000000ULL, 0xE687BA1684965297ULL }, /* XSUM_XXH3_withSecret_testdata[80] */\n    {   81, 0x0000000000000000ULL, 0xEE3172013EB66468ULL }, /* XSUM_XXH3_withSecret_testdata[81] */\n    {   82, 0x0000000000000000ULL, 0x5B4CEC8C93C89F5EULL }, /* XSUM_XXH3_withSecret_testdata[82] */\n    {   83, 0x0000000000000000ULL, 0xCD0BB0C4FC4CE171ULL }, /* XSUM_XXH3_withSecret_testdata[83] */\n    {   84, 0x0000000000000000ULL, 0x0683F3148469EF78ULL }, /* XSUM_XXH3_withSecret_testdata[84] */\n    {   85, 0x0000000000000000ULL, 0xADD85B2564A7E2E3ULL }, /* XSUM_XXH3_withSecret_testdata[85] */\n    {   86, 0x0000000000000000ULL, 0x7075D61ACEA99708ULL }, /* XSUM_XXH3_withSecret_testdata[86] */\n    {   87, 0x0000000000000000ULL, 0xA16C803F7383626FULL }, /* XSUM_XXH3_withSecret_testdata[87] */\n    {   88, 0x0000000000000000ULL, 0x079222B9BE64FC95ULL }, /* XSUM_XXH3_withSecret_testdata[88] */\n    {   89, 0x0000000000000000ULL, 0x880A555C619764DFULL }, /* XSUM_XXH3_withSecret_testdata[89] */\n    {   90, 0x0000000000000000ULL, 0xB064D888F7D53387ULL }, /* XSUM_XXH3_withSecret_testdata[90] */\n    {   91, 0x0000000000000000ULL, 0xD5CECFB626C0F231ULL }, /* XSUM_XXH3_withSecret_testdata[91] */\n    {   92, 0x0000000000000000ULL, 0xC72318AB57807760ULL }, /* XSUM_XXH3_withSecret_testdata[92] */\n    {   93, 0x0000000000000000ULL, 0x32AD0E5F0E737AF3ULL }, /* XSUM_XXH3_withSecret_testdata[93] */\n    {   94, 0x0000000000000000ULL, 0x4BC4E25822C43EB7ULL }, /* XSUM_XXH3_withSecret_testdata[94] */\n    {   95, 0x0000000000000000ULL, 0x5EC2B13622C6DB03ULL }, /* XSUM_XXH3_withSecret_testdata[95] */\n    {   96, 0x0000000000000000ULL, 0x4A4022DD9B2C1DD8ULL }, /* XSUM_XXH3_withSecret_testdata[96] */\n    {   97, 0x0000000000000000ULL, 0x41439D447B314B71ULL }, /* XSUM_XXH3_withSecret_testdata[97] */\n    {   98, 0x0000000000000000ULL, 0xC651E76710932928ULL }, /* XSUM_XXH3_withSecret_testdata[98] */\n    {   99, 0x0000000000000000ULL, 0x820765F4F0A7908EULL }, /* XSUM_XXH3_withSecret_testdata[99] */\n    {  100, 0x0000000000000000ULL, 0x940931CF46582AD4ULL }, /* XSUM_XXH3_withSecret_testdata[100] */\n    {  101, 0x0000000000000000ULL, 0x25397176C5F1FDE5ULL }, /* XSUM_XXH3_withSecret_testdata[101] */\n    {  102, 0x0000000000000000ULL, 0xB8F1B168AF3C1A6BULL }, /* XSUM_XXH3_withSecret_testdata[102] */\n    {  103, 0x0000000000000000ULL, 0x5F6CA2B30813C0B2ULL }, /* XSUM_XXH3_withSecret_testdata[103] */\n    {  104, 0x0000000000000000ULL, 0xF761C075A13B0912ULL }, /* XSUM_XXH3_withSecret_testdata[104] */\n    {  105, 0x0000000000000000ULL, 0x8EEAB2036092CA61ULL }, /* XSUM_XXH3_withSecret_testdata[105] */\n    {  106, 0x0000000000000000ULL, 0xB166FD29B26850CBULL }, /* XSUM_XXH3_withSecret_testdata[106] */\n    {  107, 0x0000000000000000ULL, 0x964DC1A2BC5A511FULL }, /* XSUM_XXH3_withSecret_testdata[107] */\n    {  108, 0x0000000000000000ULL, 0x79A6999EB100E953ULL }, /* XSUM_XXH3_withSecret_testdata[108] */\n    {  109, 0x0000000000000000ULL, 0xC6F7174AE8D98E88ULL }, /* XSUM_XXH3_withSecret_testdata[109] */\n    {  110, 0x0000000000000000ULL, 0xFEA7AFD7BB5B80C8ULL }, /* XSUM_XXH3_withSecret_testdata[110] */\n    {  111, 0x0000000000000000ULL, 0x60042F9E13BE8CE2ULL }, /* XSUM_XXH3_withSecret_testdata[111] */\n    {  112, 0x0000000000000000ULL, 0x80850112800F968CULL }, /* XSUM_XXH3_withSecret_testdata[112] */\n    {  113, 0x0000000000000000ULL, 0xA2314B57764F59A9ULL }, /* XSUM_XXH3_withSecret_testdata[113] */\n    {  114, 0x0000000000000000ULL, 0xC686CB30245DD907ULL }, /* XSUM_XXH3_withSecret_testdata[114] */\n    {  115, 0x0000000000000000ULL, 0x5E43F990E73F9FF9ULL }, /* XSUM_XXH3_withSecret_testdata[115] */\n    {  116, 0x0000000000000000ULL, 0x4AB9BF2163581E5AULL }, /* XSUM_XXH3_withSecret_testdata[116] */\n    {  117, 0x0000000000000000ULL, 0x6BF8BA8293939B32ULL }, /* XSUM_XXH3_withSecret_testdata[117] */\n    {  118, 0x0000000000000000ULL, 0x3F4DAA314A699BE9ULL }, /* XSUM_XXH3_withSecret_testdata[118] */\n    {  119, 0x0000000000000000ULL, 0x8D6ECE9E2EE140E1ULL }, /* XSUM_XXH3_withSecret_testdata[119] */\n    {  120, 0x0000000000000000ULL, 0xA9E9B02C831AEAF3ULL }, /* XSUM_XXH3_withSecret_testdata[120] */\n    {  121, 0x0000000000000000ULL, 0x75CC20C04F04AD34ULL }, /* XSUM_XXH3_withSecret_testdata[121] */\n    {  122, 0x0000000000000000ULL, 0x98E948156B099B29ULL }, /* XSUM_XXH3_withSecret_testdata[122] */\n    {  123, 0x0000000000000000ULL, 0x0EFBFAF1F499C1B9ULL }, /* XSUM_XXH3_withSecret_testdata[123] */\n    {  124, 0x0000000000000000ULL, 0x90CB9F107046A243ULL }, /* XSUM_XXH3_withSecret_testdata[124] */\n    {  125, 0x0000000000000000ULL, 0x3CC4D53F3135046BULL }, /* XSUM_XXH3_withSecret_testdata[125] */\n    {  126, 0x0000000000000000ULL, 0x33622846747E6E2EULL }, /* XSUM_XXH3_withSecret_testdata[126] */\n    {  127, 0x0000000000000000ULL, 0xE321A829A7E1E731ULL }, /* XSUM_XXH3_withSecret_testdata[127] */\n    {  128, 0x0000000000000000ULL, 0xE6E3633DF5C718E2ULL }, /* XSUM_XXH3_withSecret_testdata[128] */\n    {  129, 0x0000000000000000ULL, 0x49E96035A8476DCFULL }, /* XSUM_XXH3_withSecret_testdata[129] */\n    {  130, 0x0000000000000000ULL, 0x0F54217B215FAF10ULL }, /* XSUM_XXH3_withSecret_testdata[130] */\n    {  131, 0x0000000000000000ULL, 0xC7FD822F2C024EEEULL }, /* XSUM_XXH3_withSecret_testdata[131] */\n    {  132, 0x0000000000000000ULL, 0x0B6A34A0254FD15FULL }, /* XSUM_XXH3_withSecret_testdata[132] */\n    {  133, 0x0000000000000000ULL, 0xDDBE2778A24A99F6ULL }, /* XSUM_XXH3_withSecret_testdata[133] */\n    {  134, 0x0000000000000000ULL, 0xA8A8DDB9D2295326ULL }, /* XSUM_XXH3_withSecret_testdata[134] */\n    {  135, 0x0000000000000000ULL, 0x50069E8601F96C4AULL }, /* XSUM_XXH3_withSecret_testdata[135] */\n    {  136, 0x0000000000000000ULL, 0x30CD83B406CE06A9ULL }, /* XSUM_XXH3_withSecret_testdata[136] */\n    {  137, 0x0000000000000000ULL, 0xF0B64D9CD7A03F81ULL }, /* XSUM_XXH3_withSecret_testdata[137] */\n    {  138, 0x0000000000000000ULL, 0x26775A0BC3C177E3ULL }, /* XSUM_XXH3_withSecret_testdata[138] */\n    {  139, 0x0000000000000000ULL, 0xBFC83B00B8FAF40AULL }, /* XSUM_XXH3_withSecret_testdata[139] */\n    {  140, 0x0000000000000000ULL, 0xF84F2A7C04B40E0BULL }, /* XSUM_XXH3_withSecret_testdata[140] */\n    {  141, 0x0000000000000000ULL, 0xDE144386A1E874F3ULL }, /* XSUM_XXH3_withSecret_testdata[141] */\n    {  142, 0x0000000000000000ULL, 0xBCEBC67CFEDC781EULL }, /* XSUM_XXH3_withSecret_testdata[142] */\n    {  143, 0x0000000000000000ULL, 0xEE59251686A6DE1DULL }, /* XSUM_XXH3_withSecret_testdata[143] */\n    {  144, 0x0000000000000000ULL, 0xEAC753BAC6E5C161ULL }, /* XSUM_XXH3_withSecret_testdata[144] */\n    {  145, 0x0000000000000000ULL, 0xAEDFD1CA5D274EB6ULL }, /* XSUM_XXH3_withSecret_testdata[145] */\n    {  146, 0x0000000000000000ULL, 0x1305E3B912E8F2C5ULL }, /* XSUM_XXH3_withSecret_testdata[146] */\n    {  147, 0x0000000000000000ULL, 0xC14E46AF9DE82E26ULL }, /* XSUM_XXH3_withSecret_testdata[147] */\n    {  148, 0x0000000000000000ULL, 0x16613834702B9352ULL }, /* XSUM_XXH3_withSecret_testdata[148] */\n    {  149, 0x0000000000000000ULL, 0xBC6380CBFC21BE1FULL }, /* XSUM_XXH3_withSecret_testdata[149] */\n    {  150, 0x0000000000000000ULL, 0x24C5FBB35E9D4ACFULL }, /* XSUM_XXH3_withSecret_testdata[150] */\n    {  151, 0x0000000000000000ULL, 0x431AC2CF1B37F412ULL }, /* XSUM_XXH3_withSecret_testdata[151] */\n    {  152, 0x0000000000000000ULL, 0x2D4681B595433958ULL }, /* XSUM_XXH3_withSecret_testdata[152] */\n    {  153, 0x0000000000000000ULL, 0x8A7A09FC5A5F2FCBULL }, /* XSUM_XXH3_withSecret_testdata[153] */\n    {  154, 0x0000000000000000ULL, 0xFD6E47EF7F003B13ULL }, /* XSUM_XXH3_withSecret_testdata[154] */\n    {  155, 0x0000000000000000ULL, 0x49C04D7603B975D4ULL }, /* XSUM_XXH3_withSecret_testdata[155] */\n    {  156, 0x0000000000000000ULL, 0x717BC695DD4BB69BULL }, /* XSUM_XXH3_withSecret_testdata[156] */\n    {  157, 0x0000000000000000ULL, 0x3E51A178BDDFF395ULL }, /* XSUM_XXH3_withSecret_testdata[157] */\n    {  158, 0x0000000000000000ULL, 0x513D7EE183C91046ULL }, /* XSUM_XXH3_withSecret_testdata[158] */\n    {  159, 0x0000000000000000ULL, 0x897CA43D1B27EC7FULL }, /* XSUM_XXH3_withSecret_testdata[159] */\n    {  160, 0x0000000000000000ULL, 0x639D6C91FE54CFBAULL }, /* XSUM_XXH3_withSecret_testdata[160] */\n    {  161, 0x0000000000000000ULL, 0x45740B4C5EBA4750ULL }, /* XSUM_XXH3_withSecret_testdata[161] */\n    {  162, 0x0000000000000000ULL, 0x444D4318B841442FULL }, /* XSUM_XXH3_withSecret_testdata[162] */\n    {  163, 0x0000000000000000ULL, 0xFE492F97F87F2F9EULL }, /* XSUM_XXH3_withSecret_testdata[163] */\n    {  164, 0x0000000000000000ULL, 0x18A274DB37F8AB56ULL }, /* XSUM_XXH3_withSecret_testdata[164] */\n    {  165, 0x0000000000000000ULL, 0xE3D89A15A84D3A8EULL }, /* XSUM_XXH3_withSecret_testdata[165] */\n    {  166, 0x0000000000000000ULL, 0xB0F778181638BC88ULL }, /* XSUM_XXH3_withSecret_testdata[166] */\n    {  167, 0x0000000000000000ULL, 0x29569C59C7DC86C4ULL }, /* XSUM_XXH3_withSecret_testdata[167] */\n    {  168, 0x0000000000000000ULL, 0x960DC7E93F76725CULL }, /* XSUM_XXH3_withSecret_testdata[168] */\n    {  169, 0x0000000000000000ULL, 0xD5B3DAB491EF2A5BULL }, /* XSUM_XXH3_withSecret_testdata[169] */\n    {  170, 0x0000000000000000ULL, 0x5C2D0414A95EA8BCULL }, /* XSUM_XXH3_withSecret_testdata[170] */\n    {  171, 0x0000000000000000ULL, 0x45EFA9F3E13071BEULL }, /* XSUM_XXH3_withSecret_testdata[171] */\n    {  172, 0x0000000000000000ULL, 0xB22593A198A4BFDAULL }, /* XSUM_XXH3_withSecret_testdata[172] */\n    {  173, 0x0000000000000000ULL, 0x0A466015EF16F9C2ULL }, /* XSUM_XXH3_withSecret_testdata[173] */\n    {  174, 0x0000000000000000ULL, 0x0F9B63F2F1169FD6ULL }, /* XSUM_XXH3_withSecret_testdata[174] */\n    {  175, 0x0000000000000000ULL, 0xF97D16F5A231BD2FULL }, /* XSUM_XXH3_withSecret_testdata[175] */\n    {  176, 0x0000000000000000ULL, 0xB67C4C0ADBE5C60BULL }, /* XSUM_XXH3_withSecret_testdata[176] */\n    {  177, 0x0000000000000000ULL, 0x9D7742F2D2CF406AULL }, /* XSUM_XXH3_withSecret_testdata[177] */\n    {  178, 0x0000000000000000ULL, 0x6D9067CFFC4479F4ULL }, /* XSUM_XXH3_withSecret_testdata[178] */\n    {  179, 0x0000000000000000ULL, 0x1F3A1A82A72C3127ULL }, /* XSUM_XXH3_withSecret_testdata[179] */\n    {  180, 0x0000000000000000ULL, 0x391009C1C1BE6A38ULL }, /* XSUM_XXH3_withSecret_testdata[180] */\n    {  181, 0x0000000000000000ULL, 0xA8F6F5ED126EA240ULL }, /* XSUM_XXH3_withSecret_testdata[181] */\n    {  182, 0x0000000000000000ULL, 0x29E84B449883E57FULL }, /* XSUM_XXH3_withSecret_testdata[182] */\n    {  183, 0x0000000000000000ULL, 0x094F79DB38E7EAF2ULL }, /* XSUM_XXH3_withSecret_testdata[183] */\n    {  184, 0x0000000000000000ULL, 0x0D9DF444951FCD8FULL }, /* XSUM_XXH3_withSecret_testdata[184] */\n    {  185, 0x0000000000000000ULL, 0x4CBACBDD6CF3D527ULL }, /* XSUM_XXH3_withSecret_testdata[185] */\n    {  186, 0x0000000000000000ULL, 0xB3E105A5424EA563ULL }, /* XSUM_XXH3_withSecret_testdata[186] */\n    {  187, 0x0000000000000000ULL, 0x4A4720DAC5CD5569ULL }, /* XSUM_XXH3_withSecret_testdata[187] */\n    {  188, 0x0000000000000000ULL, 0x4FFB35B8CDA70067ULL }, /* XSUM_XXH3_withSecret_testdata[188] */\n    {  189, 0x0000000000000000ULL, 0x68BD7D30FABAD5F5ULL }, /* XSUM_XXH3_withSecret_testdata[189] */\n    {  190, 0x0000000000000000ULL, 0x92368F0EFE9DAD35ULL }, /* XSUM_XXH3_withSecret_testdata[190] */\n    {  191, 0x0000000000000000ULL, 0xEC464261BDE45743ULL }, /* XSUM_XXH3_withSecret_testdata[191] */\n    {  192, 0x0000000000000000ULL, 0xD3B52D98311F0099ULL }, /* XSUM_XXH3_withSecret_testdata[192] */\n    {  193, 0x0000000000000000ULL, 0x5461503D055073DBULL }, /* XSUM_XXH3_withSecret_testdata[193] */\n    {  194, 0x0000000000000000ULL, 0xA8019455D232824CULL }, /* XSUM_XXH3_withSecret_testdata[194] */\n    {  195, 0x0000000000000000ULL, 0xA057273F5EECFB20ULL }, /* XSUM_XXH3_withSecret_testdata[195] */\n    {  196, 0x0000000000000000ULL, 0x36AA1B8DC8935D47ULL }, /* XSUM_XXH3_withSecret_testdata[196] */\n    {  197, 0x0000000000000000ULL, 0x32140D1B0D45BF1FULL }, /* XSUM_XXH3_withSecret_testdata[197] */\n    {  198, 0x0000000000000000ULL, 0x7AE7F2D48311C047ULL }, /* XSUM_XXH3_withSecret_testdata[198] */\n    {  199, 0x0000000000000000ULL, 0xB628E661C1F89FE2ULL }, /* XSUM_XXH3_withSecret_testdata[199] */\n    {  200, 0x0000000000000000ULL, 0x6CED3A686DDEB0BFULL }, /* XSUM_XXH3_withSecret_testdata[200] */\n    {  201, 0x0000000000000000ULL, 0x38E90E79DD978B86ULL }, /* XSUM_XXH3_withSecret_testdata[201] */\n    {  202, 0x0000000000000000ULL, 0x15069E1EC413EB4CULL }, /* XSUM_XXH3_withSecret_testdata[202] */\n    {  203, 0x0000000000000000ULL, 0xBAF155B1A42C9D6BULL }, /* XSUM_XXH3_withSecret_testdata[203] */\n    {  204, 0x0000000000000000ULL, 0x342C1F2757243380ULL }, /* XSUM_XXH3_withSecret_testdata[204] */\n    {  205, 0x0000000000000000ULL, 0x268123BE6505F199ULL }, /* XSUM_XXH3_withSecret_testdata[205] */\n    {  206, 0x0000000000000000ULL, 0xF6BB284D98FDAE50ULL }, /* XSUM_XXH3_withSecret_testdata[206] */\n    {  207, 0x0000000000000000ULL, 0x62B06C77BC4F999EULL }, /* XSUM_XXH3_withSecret_testdata[207] */\n    {  208, 0x0000000000000000ULL, 0x3B4E149CC3A0ABCBULL }, /* XSUM_XXH3_withSecret_testdata[208] */\n    {  209, 0x0000000000000000ULL, 0x7D36CB4331CEDD27ULL }, /* XSUM_XXH3_withSecret_testdata[209] */\n    {  210, 0x0000000000000000ULL, 0x385FB9528F8D39B4ULL }, /* XSUM_XXH3_withSecret_testdata[210] */\n    {  211, 0x0000000000000000ULL, 0x708152AEC91819B3ULL }, /* XSUM_XXH3_withSecret_testdata[211] */\n    {  212, 0x0000000000000000ULL, 0x1F52DFF004C8D97EULL }, /* XSUM_XXH3_withSecret_testdata[212] */\n    {  213, 0x0000000000000000ULL, 0xD06AE8533DBE90C1ULL }, /* XSUM_XXH3_withSecret_testdata[213] */\n    {  214, 0x0000000000000000ULL, 0xB15A78BA3D5F3A1AULL }, /* XSUM_XXH3_withSecret_testdata[214] */\n    {  215, 0x0000000000000000ULL, 0xC2311F9FEEF3E70DULL }, /* XSUM_XXH3_withSecret_testdata[215] */\n    {  216, 0x0000000000000000ULL, 0x838812EC7141B587ULL }, /* XSUM_XXH3_withSecret_testdata[216] */\n    {  217, 0x0000000000000000ULL, 0x783D541FC20C3B65ULL }, /* XSUM_XXH3_withSecret_testdata[217] */\n    {  218, 0x0000000000000000ULL, 0xA1DA36BCF900E761ULL }, /* XSUM_XXH3_withSecret_testdata[218] */\n    {  219, 0x0000000000000000ULL, 0x6C2C791A28599B78ULL }, /* XSUM_XXH3_withSecret_testdata[219] */\n    {  220, 0x0000000000000000ULL, 0x1C1DD1492C84173DULL }, /* XSUM_XXH3_withSecret_testdata[220] */\n    {  221, 0x0000000000000000ULL, 0xE4EF8CDD84A64A09ULL }, /* XSUM_XXH3_withSecret_testdata[221] */\n    {  222, 0x0000000000000000ULL, 0xCC16490371DAACACULL }, /* XSUM_XXH3_withSecret_testdata[222] */\n    {  223, 0x0000000000000000ULL, 0xCE2E2474FAD77EDCULL }, /* XSUM_XXH3_withSecret_testdata[223] */\n    {  224, 0x0000000000000000ULL, 0x516552B48A8BC2BAULL }, /* XSUM_XXH3_withSecret_testdata[224] */\n    {  225, 0x0000000000000000ULL, 0xAA49512F1D606966ULL }, /* XSUM_XXH3_withSecret_testdata[225] */\n    {  226, 0x0000000000000000ULL, 0x7E1C059F2B506DDBULL }, /* XSUM_XXH3_withSecret_testdata[226] */\n    {  227, 0x0000000000000000ULL, 0x8845C3CB18E7270EULL }, /* XSUM_XXH3_withSecret_testdata[227] */\n    {  228, 0x0000000000000000ULL, 0x27A756530591C0E5ULL }, /* XSUM_XXH3_withSecret_testdata[228] */\n    {  229, 0x0000000000000000ULL, 0x581097DFB5477719ULL }, /* XSUM_XXH3_withSecret_testdata[229] */\n    {  230, 0x0000000000000000ULL, 0x185CEA42A67B79B4ULL }, /* XSUM_XXH3_withSecret_testdata[230] */\n    {  231, 0x0000000000000000ULL, 0x96E8E0154A7FAA16ULL }, /* XSUM_XXH3_withSecret_testdata[231] */\n    {  232, 0x0000000000000000ULL, 0x8C4D597DD084F0EEULL }, /* XSUM_XXH3_withSecret_testdata[232] */\n    {  233, 0x0000000000000000ULL, 0xD55AF9EA50B5CB15ULL }, /* XSUM_XXH3_withSecret_testdata[233] */\n    {  234, 0x0000000000000000ULL, 0xA71693E14880BE6FULL }, /* XSUM_XXH3_withSecret_testdata[234] */\n    {  235, 0x0000000000000000ULL, 0x1B3E3FDB44797BBFULL }, /* XSUM_XXH3_withSecret_testdata[235] */\n    {  236, 0x0000000000000000ULL, 0x928BB3E43E14CA5BULL }, /* XSUM_XXH3_withSecret_testdata[236] */\n    {  237, 0x0000000000000000ULL, 0x3C5EE4A2EA7DAE9CULL }, /* XSUM_XXH3_withSecret_testdata[237] */\n    {  238, 0x0000000000000000ULL, 0x36CBC4DB3074FED3ULL }, /* XSUM_XXH3_withSecret_testdata[238] */\n    {  239, 0x0000000000000000ULL, 0xF2A4C1EC0A45BBBFULL }, /* XSUM_XXH3_withSecret_testdata[239] */\n    {  240, 0x0000000000000000ULL, 0xDD1F0FAF1A8164C0ULL }, /* XSUM_XXH3_withSecret_testdata[240] */\n    {  241, 0x0000000000000000ULL, 0x454805371DF98A91ULL }, /* XSUM_XXH3_withSecret_testdata[241] */\n    {  242, 0x0000000000000000ULL, 0x7A1D6CC9B38309B6ULL }, /* XSUM_XXH3_withSecret_testdata[242] */\n    {  243, 0x0000000000000000ULL, 0xA21530DBA67105A2ULL }, /* XSUM_XXH3_withSecret_testdata[243] */\n    {  244, 0x0000000000000000ULL, 0x338A6D6127CF7AA5ULL }, /* XSUM_XXH3_withSecret_testdata[244] */\n    {  245, 0x0000000000000000ULL, 0xD39B23A3496DE71FULL }, /* XSUM_XXH3_withSecret_testdata[245] */\n    {  246, 0x0000000000000000ULL, 0xC9D906953A05E2A0ULL }, /* XSUM_XXH3_withSecret_testdata[246] */\n    {  247, 0x0000000000000000ULL, 0xE6C99047FB256B39ULL }, /* XSUM_XXH3_withSecret_testdata[247] */\n    {  248, 0x0000000000000000ULL, 0xF07CCBDD8B5F77B8ULL }, /* XSUM_XXH3_withSecret_testdata[248] */\n    {  249, 0x0000000000000000ULL, 0xF645DD08AF66414BULL }, /* XSUM_XXH3_withSecret_testdata[249] */\n    {  250, 0x0000000000000000ULL, 0x9A4C8798F876F82BULL }, /* XSUM_XXH3_withSecret_testdata[250] */\n    {  251, 0x0000000000000000ULL, 0x649BC177D2142082ULL }, /* XSUM_XXH3_withSecret_testdata[251] */\n    {  252, 0x0000000000000000ULL, 0x1A271919C8C3E8B5ULL }, /* XSUM_XXH3_withSecret_testdata[252] */\n    {  253, 0x0000000000000000ULL, 0x92B0F8103137B547ULL }, /* XSUM_XXH3_withSecret_testdata[253] */\n    {  254, 0x0000000000000000ULL, 0xF6516FADBA34B6A8ULL }, /* XSUM_XXH3_withSecret_testdata[254] */\n    {  255, 0x0000000000000000ULL, 0xE1E3461712968B3EULL }, /* XSUM_XXH3_withSecret_testdata[255] */\n    {  256, 0x0000000000000000ULL, 0xD4CBA59E2E2CF9F0ULL }, /* XSUM_XXH3_withSecret_testdata[256] */\n    {  257, 0x0000000000000000ULL, 0x1E4B71E703D08492ULL }, /* XSUM_XXH3_withSecret_testdata[257] */\n    {  258, 0x0000000000000000ULL, 0x4644E9534017CF3CULL }, /* XSUM_XXH3_withSecret_testdata[258] */\n    {  259, 0x0000000000000000ULL, 0xC5211B50A170EF65ULL }, /* XSUM_XXH3_withSecret_testdata[259] */\n    {  260, 0x0000000000000000ULL, 0x8D89E78FAB4C8B4DULL }, /* XSUM_XXH3_withSecret_testdata[260] */\n    {  261, 0x0000000000000000ULL, 0x5445BC41965D9CB8ULL }, /* XSUM_XXH3_withSecret_testdata[261] */\n    {  262, 0x0000000000000000ULL, 0x1E18538BFD02BC10ULL }, /* XSUM_XXH3_withSecret_testdata[262] */\n    {  263, 0x0000000000000000ULL, 0x10BB0E32115E3989ULL }, /* XSUM_XXH3_withSecret_testdata[263] */\n    {  264, 0x0000000000000000ULL, 0xE481E99CB17FCFA7ULL }, /* XSUM_XXH3_withSecret_testdata[264] */\n    {  265, 0x0000000000000000ULL, 0x5719499F498B55F1ULL }, /* XSUM_XXH3_withSecret_testdata[265] */\n    {  266, 0x0000000000000000ULL, 0xF05D5811FC05A53BULL }, /* XSUM_XXH3_withSecret_testdata[266] */\n    {  267, 0x0000000000000000ULL, 0x692ED07D9D863E3BULL }, /* XSUM_XXH3_withSecret_testdata[267] */\n    {  268, 0x0000000000000000ULL, 0x8632AD27595A52E9ULL }, /* XSUM_XXH3_withSecret_testdata[268] */\n    {  269, 0x0000000000000000ULL, 0x2668F196EF76E609ULL }, /* XSUM_XXH3_withSecret_testdata[269] */\n    {  270, 0x0000000000000000ULL, 0x3FC93757FBF494ECULL }, /* XSUM_XXH3_withSecret_testdata[270] */\n    {  271, 0x0000000000000000ULL, 0x47FB222445B9AAF9ULL }, /* XSUM_XXH3_withSecret_testdata[271] */\n    {  272, 0x0000000000000000ULL, 0xD9376B102E3630D9ULL }, /* XSUM_XXH3_withSecret_testdata[272] */\n    {  273, 0x0000000000000000ULL, 0x65895492C94B9DE3ULL }, /* XSUM_XXH3_withSecret_testdata[273] */\n    {  274, 0x0000000000000000ULL, 0xE9E82F040E18DC8FULL }, /* XSUM_XXH3_withSecret_testdata[274] */\n    {  275, 0x0000000000000000ULL, 0x32D3679B0E9C6074ULL }, /* XSUM_XXH3_withSecret_testdata[275] */\n    {  276, 0x0000000000000000ULL, 0xF9F0E5709E4412C2ULL }, /* XSUM_XXH3_withSecret_testdata[276] */\n    {  277, 0x0000000000000000ULL, 0x3C62BC830C37A47BULL }, /* XSUM_XXH3_withSecret_testdata[277] */\n    {  278, 0x0000000000000000ULL, 0x1C46017F954A8887ULL }, /* XSUM_XXH3_withSecret_testdata[278] */\n    {  279, 0x0000000000000000ULL, 0x2821691C07FC0BF5ULL }, /* XSUM_XXH3_withSecret_testdata[279] */\n    {  280, 0x0000000000000000ULL, 0x13746F0595225BF8ULL }, /* XSUM_XXH3_withSecret_testdata[280] */\n    {  281, 0x0000000000000000ULL, 0xDBED1F02AFE46AB6ULL }, /* XSUM_XXH3_withSecret_testdata[281] */\n    {  282, 0x0000000000000000ULL, 0x8BEC42DB9CA3856AULL }, /* XSUM_XXH3_withSecret_testdata[282] */\n    {  283, 0x0000000000000000ULL, 0x7FC7D29CD3DC1077ULL }, /* XSUM_XXH3_withSecret_testdata[283] */\n    {  284, 0x0000000000000000ULL, 0x33F520321A07B375ULL }, /* XSUM_XXH3_withSecret_testdata[284] */\n    {  285, 0x0000000000000000ULL, 0x687B7AE99E7CB3BEULL }, /* XSUM_XXH3_withSecret_testdata[285] */\n    {  286, 0x0000000000000000ULL, 0x0F91BD5C4572144CULL }, /* XSUM_XXH3_withSecret_testdata[286] */\n    {  287, 0x0000000000000000ULL, 0x4EB562DCC46F44E3ULL }, /* XSUM_XXH3_withSecret_testdata[287] */\n    {  288, 0x0000000000000000ULL, 0x0D392C2BA4C1974CULL }, /* XSUM_XXH3_withSecret_testdata[288] */\n    {  289, 0x0000000000000000ULL, 0x23F0342FB15D6F76ULL }, /* XSUM_XXH3_withSecret_testdata[289] */\n    {  290, 0x0000000000000000ULL, 0x5F123B83B84089BFULL }, /* XSUM_XXH3_withSecret_testdata[290] */\n    {  291, 0x0000000000000000ULL, 0x889F2101629E55ADULL }, /* XSUM_XXH3_withSecret_testdata[291] */\n    {  292, 0x0000000000000000ULL, 0x2BCFEC3E258BFEEFULL }, /* XSUM_XXH3_withSecret_testdata[292] */\n    {  293, 0x0000000000000000ULL, 0x85CF2A67380C6897ULL }, /* XSUM_XXH3_withSecret_testdata[293] */\n    {  294, 0x0000000000000000ULL, 0x237B4672769369B7ULL }, /* XSUM_XXH3_withSecret_testdata[294] */\n    {  295, 0x0000000000000000ULL, 0x49BECA529E0108F8ULL }, /* XSUM_XXH3_withSecret_testdata[295] */\n    {  296, 0x0000000000000000ULL, 0xEE6FE33A46F9B8ABULL }, /* XSUM_XXH3_withSecret_testdata[296] */\n    {  297, 0x0000000000000000ULL, 0xAB5AD272C269CB84ULL }, /* XSUM_XXH3_withSecret_testdata[297] */\n    {  298, 0x0000000000000000ULL, 0x647D5B4FA1E77077ULL }, /* XSUM_XXH3_withSecret_testdata[298] */\n    {  299, 0x0000000000000000ULL, 0x08F146C57890970DULL }, /* XSUM_XXH3_withSecret_testdata[299] */\n    {  300, 0x0000000000000000ULL, 0xAD4EEFE44DA3771CULL }, /* XSUM_XXH3_withSecret_testdata[300] */\n    {  301, 0x0000000000000000ULL, 0x00795F9213CC7BEBULL }, /* XSUM_XXH3_withSecret_testdata[301] */\n    {  302, 0x0000000000000000ULL, 0xF712D99AB912CE71ULL }, /* XSUM_XXH3_withSecret_testdata[302] */\n    {  303, 0x0000000000000000ULL, 0x4964AB4691B49154ULL }, /* XSUM_XXH3_withSecret_testdata[303] */\n    {  304, 0x0000000000000000ULL, 0x1608E2A44BD97C89ULL }, /* XSUM_XXH3_withSecret_testdata[304] */\n    {  305, 0x0000000000000000ULL, 0x6472A585CF6668DFULL }, /* XSUM_XXH3_withSecret_testdata[305] */\n    {  306, 0x0000000000000000ULL, 0xD2BEAD64AB7F10A4ULL }, /* XSUM_XXH3_withSecret_testdata[306] */\n    {  307, 0x0000000000000000ULL, 0xF11A50ECA38C3575ULL }, /* XSUM_XXH3_withSecret_testdata[307] */\n    {  308, 0x0000000000000000ULL, 0x722A4F986419071AULL }, /* XSUM_XXH3_withSecret_testdata[308] */\n    {  309, 0x0000000000000000ULL, 0xC770E666D63849F9ULL }, /* XSUM_XXH3_withSecret_testdata[309] */\n    {  310, 0x0000000000000000ULL, 0xA626F5639A03A9B1ULL }, /* XSUM_XXH3_withSecret_testdata[310] */\n    {  311, 0x0000000000000000ULL, 0xD9CEE82AA29AED92ULL }, /* XSUM_XXH3_withSecret_testdata[311] */\n    {  312, 0x0000000000000000ULL, 0x96E7904694872669ULL }, /* XSUM_XXH3_withSecret_testdata[312] */\n    {  313, 0x0000000000000000ULL, 0xA14D3B0A5285F4ADULL }, /* XSUM_XXH3_withSecret_testdata[313] */\n    {  314, 0x0000000000000000ULL, 0xF5B6891890914AFFULL }, /* XSUM_XXH3_withSecret_testdata[314] */\n    {  315, 0x0000000000000000ULL, 0x999AB9F81AE460A9ULL }, /* XSUM_XXH3_withSecret_testdata[315] */\n    {  316, 0x0000000000000000ULL, 0x2636CB73B8310C34ULL }, /* XSUM_XXH3_withSecret_testdata[316] */\n    {  317, 0x0000000000000000ULL, 0x3F6B687ADE1EAEA8ULL }, /* XSUM_XXH3_withSecret_testdata[317] */\n    {  318, 0x0000000000000000ULL, 0x0B93FE00D04DF81EULL }, /* XSUM_XXH3_withSecret_testdata[318] */\n    {  319, 0x0000000000000000ULL, 0xDDA2B628C4879108ULL }, /* XSUM_XXH3_withSecret_testdata[319] */\n    {  320, 0x0000000000000000ULL, 0x194C2D1C4A993F3CULL }, /* XSUM_XXH3_withSecret_testdata[320] */\n    {  321, 0x0000000000000000ULL, 0xFD6049BC3D821B0BULL }, /* XSUM_XXH3_withSecret_testdata[321] */\n    {  322, 0x0000000000000000ULL, 0xAC4A5D33460A0D8FULL }, /* XSUM_XXH3_withSecret_testdata[322] */\n    {  323, 0x0000000000000000ULL, 0x52E8F6AEAF1B5E2EULL }, /* XSUM_XXH3_withSecret_testdata[323] */\n    {  324, 0x0000000000000000ULL, 0x0FC71062B04343A3ULL }, /* XSUM_XXH3_withSecret_testdata[324] */\n    {  325, 0x0000000000000000ULL, 0xA7FF1D6E81A588E4ULL }, /* XSUM_XXH3_withSecret_testdata[325] */\n    {  326, 0x0000000000000000ULL, 0xA77100819A31451CULL }, /* XSUM_XXH3_withSecret_testdata[326] */\n    {  327, 0x0000000000000000ULL, 0x3900B897CC037C54ULL }, /* XSUM_XXH3_withSecret_testdata[327] */\n    {  328, 0x0000000000000000ULL, 0x2CCC45D68CFCBE8DULL }, /* XSUM_XXH3_withSecret_testdata[328] */\n    {  329, 0x0000000000000000ULL, 0xC5D310D557FEF6C8ULL }, /* XSUM_XXH3_withSecret_testdata[329] */\n    {  330, 0x0000000000000000ULL, 0xED4CF75B85C7C208ULL }, /* XSUM_XXH3_withSecret_testdata[330] */\n    {  331, 0x0000000000000000ULL, 0x06C32247652F6E66ULL }, /* XSUM_XXH3_withSecret_testdata[331] */\n    {  332, 0x0000000000000000ULL, 0x0C5AAFD89A34F935ULL }, /* XSUM_XXH3_withSecret_testdata[332] */\n    {  333, 0x0000000000000000ULL, 0x5793D857574D7657ULL }, /* XSUM_XXH3_withSecret_testdata[333] */\n    {  334, 0x0000000000000000ULL, 0x6E7E849FBD00AA49ULL }, /* XSUM_XXH3_withSecret_testdata[334] */\n    {  335, 0x0000000000000000ULL, 0xBCDB86FB248DDF09ULL }, /* XSUM_XXH3_withSecret_testdata[335] */\n    {  336, 0x0000000000000000ULL, 0xC482729B771A98D6ULL }, /* XSUM_XXH3_withSecret_testdata[336] */\n    {  337, 0x0000000000000000ULL, 0x76A7E94E68306FD7ULL }, /* XSUM_XXH3_withSecret_testdata[337] */\n    {  338, 0x0000000000000000ULL, 0x99345B97606E0954ULL }, /* XSUM_XXH3_withSecret_testdata[338] */\n    {  339, 0x0000000000000000ULL, 0xEF8E23FD4925C9B5ULL }, /* XSUM_XXH3_withSecret_testdata[339] */\n    {  340, 0x0000000000000000ULL, 0x9C06E9F9E8F95A1BULL }, /* XSUM_XXH3_withSecret_testdata[340] */\n    {  341, 0x0000000000000000ULL, 0x7440FC10FFC82E30ULL }, /* XSUM_XXH3_withSecret_testdata[341] */\n    {  342, 0x0000000000000000ULL, 0xA9F13DA859FE0DD5ULL }, /* XSUM_XXH3_withSecret_testdata[342] */\n    {  343, 0x0000000000000000ULL, 0x8008021E109891BBULL }, /* XSUM_XXH3_withSecret_testdata[343] */\n    {  344, 0x0000000000000000ULL, 0x27A32662397B2B8EULL }, /* XSUM_XXH3_withSecret_testdata[344] */\n    {  345, 0x0000000000000000ULL, 0x42416962BB6568B0ULL }, /* XSUM_XXH3_withSecret_testdata[345] */\n    {  346, 0x0000000000000000ULL, 0x0F9E193156B85403ULL }, /* XSUM_XXH3_withSecret_testdata[346] */\n    {  347, 0x0000000000000000ULL, 0xACAEFA2E644AE0CCULL }, /* XSUM_XXH3_withSecret_testdata[347] */\n    {  348, 0x0000000000000000ULL, 0xB903628701269F0FULL }, /* XSUM_XXH3_withSecret_testdata[348] */\n    {  349, 0x0000000000000000ULL, 0x21F9F87CED7F59ECULL }, /* XSUM_XXH3_withSecret_testdata[349] */\n    {  350, 0x0000000000000000ULL, 0x510C00D6E6CA0292ULL }, /* XSUM_XXH3_withSecret_testdata[350] */\n    {  351, 0x0000000000000000ULL, 0x067C68EA7336F2BBULL }, /* XSUM_XXH3_withSecret_testdata[351] */\n    {  352, 0x0000000000000000ULL, 0x2FA1AA59DD588D9EULL }, /* XSUM_XXH3_withSecret_testdata[352] */\n    {  353, 0x0000000000000000ULL, 0x6427D4F16BB0B275ULL }, /* XSUM_XXH3_withSecret_testdata[353] */\n    {  354, 0x0000000000000000ULL, 0x945B95851BBF0CEBULL }, /* XSUM_XXH3_withSecret_testdata[354] */\n    {  355, 0x0000000000000000ULL, 0x4097F41CB9A6C7C0ULL }, /* XSUM_XXH3_withSecret_testdata[355] */\n    {  356, 0x0000000000000000ULL, 0x2B3DB75847E4D9A5ULL }, /* XSUM_XXH3_withSecret_testdata[356] */\n    {  357, 0x0000000000000000ULL, 0xC03244E03567B277ULL }, /* XSUM_XXH3_withSecret_testdata[357] */\n    {  358, 0x0000000000000000ULL, 0xEE4D73BC4AAFC328ULL }, /* XSUM_XXH3_withSecret_testdata[358] */\n    {  359, 0x0000000000000000ULL, 0x0A321BE91994A2B5ULL }, /* XSUM_XXH3_withSecret_testdata[359] */\n    {  360, 0x0000000000000000ULL, 0xA34661ED84F91D96ULL }, /* XSUM_XXH3_withSecret_testdata[360] */\n    {  361, 0x0000000000000000ULL, 0x2A79F41AC7E29D95ULL }, /* XSUM_XXH3_withSecret_testdata[361] */\n    {  362, 0x0000000000000000ULL, 0xB37D84C527A15E6CULL }, /* XSUM_XXH3_withSecret_testdata[362] */\n    {  363, 0x0000000000000000ULL, 0x1E7C1743806AD536ULL }, /* XSUM_XXH3_withSecret_testdata[363] */\n    {  364, 0x0000000000000000ULL, 0x7AF7CE01C75EE6FFULL }, /* XSUM_XXH3_withSecret_testdata[364] */\n    {  365, 0x0000000000000000ULL, 0xCFEB51C858A5622EULL }, /* XSUM_XXH3_withSecret_testdata[365] */\n    {  366, 0x0000000000000000ULL, 0xF58BBCA1C9747069ULL }, /* XSUM_XXH3_withSecret_testdata[366] */\n    {  367, 0x0000000000000000ULL, 0x1BA132260A257D3FULL }, /* XSUM_XXH3_withSecret_testdata[367] */\n    {  368, 0x0000000000000000ULL, 0x9219084B7F90DE95ULL }, /* XSUM_XXH3_withSecret_testdata[368] */\n    {  369, 0x0000000000000000ULL, 0xAA306A3323A36F10ULL }, /* XSUM_XXH3_withSecret_testdata[369] */\n    {  370, 0x0000000000000000ULL, 0x5E1E41A3EE73C4CAULL }, /* XSUM_XXH3_withSecret_testdata[370] */\n    {  371, 0x0000000000000000ULL, 0xC34FDC36198F74EDULL }, /* XSUM_XXH3_withSecret_testdata[371] */\n    {  372, 0x0000000000000000ULL, 0x3DA69079085A04E9ULL }, /* XSUM_XXH3_withSecret_testdata[372] */\n    {  373, 0x0000000000000000ULL, 0xA94B7213A0252AB3ULL }, /* XSUM_XXH3_withSecret_testdata[373] */\n    {  374, 0x0000000000000000ULL, 0xB8A38E5866DAA69AULL }, /* XSUM_XXH3_withSecret_testdata[374] */\n    {  375, 0x0000000000000000ULL, 0xD815C3B6A81D988AULL }, /* XSUM_XXH3_withSecret_testdata[375] */\n    {  376, 0x0000000000000000ULL, 0x48021E8BEF7C0F91ULL }, /* XSUM_XXH3_withSecret_testdata[376] */\n    {  377, 0x0000000000000000ULL, 0x2403D3B5EF2187C1ULL }, /* XSUM_XXH3_withSecret_testdata[377] */\n    {  378, 0x0000000000000000ULL, 0xB599C0DBFA7B38ABULL }, /* XSUM_XXH3_withSecret_testdata[378] */\n    {  379, 0x0000000000000000ULL, 0x3F1C230AE6A51A09ULL }, /* XSUM_XXH3_withSecret_testdata[379] */\n    {  380, 0x0000000000000000ULL, 0x1D947ED6C9B124BAULL }, /* XSUM_XXH3_withSecret_testdata[380] */\n    {  381, 0x0000000000000000ULL, 0x8AE2F1EDDC6FA197ULL }, /* XSUM_XXH3_withSecret_testdata[381] */\n    {  382, 0x0000000000000000ULL, 0x5686BC7B2C3699F0ULL }, /* XSUM_XXH3_withSecret_testdata[382] */\n    {  383, 0x0000000000000000ULL, 0x5B081C559D5A2691ULL }, /* XSUM_XXH3_withSecret_testdata[383] */\n    {  384, 0x0000000000000000ULL, 0x3E4ACFE089AAAC49ULL }, /* XSUM_XXH3_withSecret_testdata[384] */\n    {  385, 0x0000000000000000ULL, 0x68E16289A463A85CULL }, /* XSUM_XXH3_withSecret_testdata[385] */\n    {  386, 0x0000000000000000ULL, 0x8361384F1C833DBBULL }, /* XSUM_XXH3_withSecret_testdata[386] */\n    {  387, 0x0000000000000000ULL, 0x619589E8B878E5B1ULL }, /* XSUM_XXH3_withSecret_testdata[387] */\n    {  388, 0x0000000000000000ULL, 0xAA1FD2CDF886DB48ULL }, /* XSUM_XXH3_withSecret_testdata[388] */\n    {  389, 0x0000000000000000ULL, 0x4A691FB625C012D6ULL }, /* XSUM_XXH3_withSecret_testdata[389] */\n    {  390, 0x0000000000000000ULL, 0x4DF5BEE29D39A198ULL }, /* XSUM_XXH3_withSecret_testdata[390] */\n    {  391, 0x0000000000000000ULL, 0x8A1852777D68C286ULL }, /* XSUM_XXH3_withSecret_testdata[391] */\n    {  392, 0x0000000000000000ULL, 0x9E87BE43FBCBC9EBULL }, /* XSUM_XXH3_withSecret_testdata[392] */\n    {  393, 0x0000000000000000ULL, 0x6CA925A00CC82F84ULL }, /* XSUM_XXH3_withSecret_testdata[393] */\n    {  394, 0x0000000000000000ULL, 0xEDA2EA217928B5F5ULL }, /* XSUM_XXH3_withSecret_testdata[394] */\n    {  395, 0x0000000000000000ULL, 0x36015D830AFA1151ULL }, /* XSUM_XXH3_withSecret_testdata[395] */\n    {  396, 0x0000000000000000ULL, 0x2F6F98A51CB51691ULL }, /* XSUM_XXH3_withSecret_testdata[396] */\n    {  397, 0x0000000000000000ULL, 0xBBF2DC743F67DE36ULL }, /* XSUM_XXH3_withSecret_testdata[397] */\n    {  398, 0x0000000000000000ULL, 0x9742E652697AA2CFULL }, /* XSUM_XXH3_withSecret_testdata[398] */\n    {  399, 0x0000000000000000ULL, 0x4EB106A1AA40FA23ULL }, /* XSUM_XXH3_withSecret_testdata[399] */\n    {  400, 0x0000000000000000ULL, 0xAEA4953E8ADE0709ULL }, /* XSUM_XXH3_withSecret_testdata[400] */\n    {  401, 0x0000000000000000ULL, 0x0112CF533D114963ULL }, /* XSUM_XXH3_withSecret_testdata[401] */\n    {  402, 0x0000000000000000ULL, 0xF22A46521BB555DBULL }, /* XSUM_XXH3_withSecret_testdata[402] */\n    {  403, 0x0000000000000000ULL, 0x14546019124D43B8ULL }, /* XSUM_XXH3_withSecret_testdata[403] */\n    {  404, 0x0000000000000000ULL, 0xD7C6DB1687C9CCE4ULL }, /* XSUM_XXH3_withSecret_testdata[404] */\n    {  405, 0x0000000000000000ULL, 0xD9D0709DDDF7D8FDULL }, /* XSUM_XXH3_withSecret_testdata[405] */\n    {  406, 0x0000000000000000ULL, 0xFCCA387E865C2566ULL }, /* XSUM_XXH3_withSecret_testdata[406] */\n    {  407, 0x0000000000000000ULL, 0x64AF408F11B9217DULL }, /* XSUM_XXH3_withSecret_testdata[407] */\n    {  408, 0x0000000000000000ULL, 0xB9E9F14A1D9E0397ULL }, /* XSUM_XXH3_withSecret_testdata[408] */\n    {  409, 0x0000000000000000ULL, 0x99AFB4E6A523221BULL }, /* XSUM_XXH3_withSecret_testdata[409] */\n    {  410, 0x0000000000000000ULL, 0x5254EDB9EB3DBB94ULL }, /* XSUM_XXH3_withSecret_testdata[410] */\n    {  411, 0x0000000000000000ULL, 0xB6B23CD56A79121CULL }, /* XSUM_XXH3_withSecret_testdata[411] */\n    {  412, 0x0000000000000000ULL, 0x1BFB20FD55E49164ULL }, /* XSUM_XXH3_withSecret_testdata[412] */\n    {  413, 0x0000000000000000ULL, 0xF4CBBBA8889F9520ULL }, /* XSUM_XXH3_withSecret_testdata[413] */\n    {  414, 0x0000000000000000ULL, 0x1C4CBC873CCF23B7ULL }, /* XSUM_XXH3_withSecret_testdata[414] */\n    {  415, 0x0000000000000000ULL, 0xCBACAAE57B2FFCB4ULL }, /* XSUM_XXH3_withSecret_testdata[415] */\n    {  416, 0x0000000000000000ULL, 0xFEB5537A0E295659ULL }, /* XSUM_XXH3_withSecret_testdata[416] */\n    {  417, 0x0000000000000000ULL, 0x0047ADBB08006B06ULL }, /* XSUM_XXH3_withSecret_testdata[417] */\n    {  418, 0x0000000000000000ULL, 0xC610CC3AF8C4C9ECULL }, /* XSUM_XXH3_withSecret_testdata[418] */\n    {  419, 0x0000000000000000ULL, 0x3F7975EF1A922ED9ULL }, /* XSUM_XXH3_withSecret_testdata[419] */\n    {  420, 0x0000000000000000ULL, 0x21207F5F4B43C72EULL }, /* XSUM_XXH3_withSecret_testdata[420] */\n    {  421, 0x0000000000000000ULL, 0x2EDE601DC0BC9006ULL }, /* XSUM_XXH3_withSecret_testdata[421] */\n    {  422, 0x0000000000000000ULL, 0x0F4C0CF035A33F14ULL }, /* XSUM_XXH3_withSecret_testdata[422] */\n    {  423, 0x0000000000000000ULL, 0x4131CBFEF56B3263ULL }, /* XSUM_XXH3_withSecret_testdata[423] */\n    {  424, 0x0000000000000000ULL, 0xD2863D9CAE01FE62ULL }, /* XSUM_XXH3_withSecret_testdata[424] */\n    {  425, 0x0000000000000000ULL, 0xA6BB4DF2FC91FD60ULL }, /* XSUM_XXH3_withSecret_testdata[425] */\n    {  426, 0x0000000000000000ULL, 0x978D1CCF305BAE7DULL }, /* XSUM_XXH3_withSecret_testdata[426] */\n    {  427, 0x0000000000000000ULL, 0xA9FB094491E5FFBEULL }, /* XSUM_XXH3_withSecret_testdata[427] */\n    {  428, 0x0000000000000000ULL, 0x0EBE48BE365952CBULL }, /* XSUM_XXH3_withSecret_testdata[428] */\n    {  429, 0x0000000000000000ULL, 0x25237F7BE323FF7FULL }, /* XSUM_XXH3_withSecret_testdata[429] */\n    {  430, 0x0000000000000000ULL, 0x4B4F4FE9DE6B2E2CULL }, /* XSUM_XXH3_withSecret_testdata[430] */\n    {  431, 0x0000000000000000ULL, 0x74D082ED70E8A13FULL }, /* XSUM_XXH3_withSecret_testdata[431] */\n    {  432, 0x0000000000000000ULL, 0x4D084F04ABE7620EULL }, /* XSUM_XXH3_withSecret_testdata[432] */\n    {  433, 0x0000000000000000ULL, 0x6390929D32DB775AULL }, /* XSUM_XXH3_withSecret_testdata[433] */\n    {  434, 0x0000000000000000ULL, 0x86BC650A8AFFA1A4ULL }, /* XSUM_XXH3_withSecret_testdata[434] */\n    {  435, 0x0000000000000000ULL, 0x525B7109EB14DB23ULL }, /* XSUM_XXH3_withSecret_testdata[435] */\n    {  436, 0x0000000000000000ULL, 0x41A700E2DFEF822EULL }, /* XSUM_XXH3_withSecret_testdata[436] */\n    {  437, 0x0000000000000000ULL, 0x6CB4BEFFF28DF8ACULL }, /* XSUM_XXH3_withSecret_testdata[437] */\n    {  438, 0x0000000000000000ULL, 0x810C53827E409D0CULL }, /* XSUM_XXH3_withSecret_testdata[438] */\n    {  439, 0x0000000000000000ULL, 0x5E1A75786BC7D5EFULL }, /* XSUM_XXH3_withSecret_testdata[439] */\n    {  440, 0x0000000000000000ULL, 0x7B2FCA065E805463ULL }, /* XSUM_XXH3_withSecret_testdata[440] */\n    {  441, 0x0000000000000000ULL, 0xFE97333284356D7DULL }, /* XSUM_XXH3_withSecret_testdata[441] */\n    {  442, 0x0000000000000000ULL, 0x106231A1F8C0FFCCULL }, /* XSUM_XXH3_withSecret_testdata[442] */\n    {  443, 0x0000000000000000ULL, 0xF8FBD2920F51BF03ULL }, /* XSUM_XXH3_withSecret_testdata[443] */\n    {  444, 0x0000000000000000ULL, 0x6CD891B1A44EE649ULL }, /* XSUM_XXH3_withSecret_testdata[444] */\n    {  445, 0x0000000000000000ULL, 0xA0C07BC7005909B9ULL }, /* XSUM_XXH3_withSecret_testdata[445] */\n    {  446, 0x0000000000000000ULL, 0x184DC35A01F19A69ULL }, /* XSUM_XXH3_withSecret_testdata[446] */\n    {  447, 0x0000000000000000ULL, 0xE57C1002023987FEULL }, /* XSUM_XXH3_withSecret_testdata[447] */\n    {  448, 0x0000000000000000ULL, 0x8EA484E6F2659C6FULL }, /* XSUM_XXH3_withSecret_testdata[448] */\n    {  449, 0x0000000000000000ULL, 0xF260E6432FC489A2ULL }, /* XSUM_XXH3_withSecret_testdata[449] */\n    {  450, 0x0000000000000000ULL, 0xAE8D2868FE6AC4C4ULL }, /* XSUM_XXH3_withSecret_testdata[450] */\n    {  451, 0x0000000000000000ULL, 0x04099B3D6ACEB18BULL }, /* XSUM_XXH3_withSecret_testdata[451] */\n    {  452, 0x0000000000000000ULL, 0xDDB5426BF3E3EA19ULL }, /* XSUM_XXH3_withSecret_testdata[452] */\n    {  453, 0x0000000000000000ULL, 0xCCB0A8860651FEC0ULL }, /* XSUM_XXH3_withSecret_testdata[453] */\n    {  454, 0x0000000000000000ULL, 0x9617D50B4A3EF1B3ULL }, /* XSUM_XXH3_withSecret_testdata[454] */\n    {  455, 0x0000000000000000ULL, 0x6F2B8E3512F86464ULL }, /* XSUM_XXH3_withSecret_testdata[455] */\n    {  456, 0x0000000000000000ULL, 0x05A8D79A5ED7FC14ULL }, /* XSUM_XXH3_withSecret_testdata[456] */\n    {  457, 0x0000000000000000ULL, 0x8B10941099EF6821ULL }, /* XSUM_XXH3_withSecret_testdata[457] */\n    {  458, 0x0000000000000000ULL, 0x531E70FF6FAD7D8BULL }, /* XSUM_XXH3_withSecret_testdata[458] */\n    {  459, 0x0000000000000000ULL, 0x76489F7455586327ULL }, /* XSUM_XXH3_withSecret_testdata[459] */\n    {  460, 0x0000000000000000ULL, 0x564DF8086324198DULL }, /* XSUM_XXH3_withSecret_testdata[460] */\n    {  461, 0x0000000000000000ULL, 0x1C11818055102C22ULL }, /* XSUM_XXH3_withSecret_testdata[461] */\n    {  462, 0x0000000000000000ULL, 0xEBD34A4B973A81E7ULL }, /* XSUM_XXH3_withSecret_testdata[462] */\n    {  463, 0x0000000000000000ULL, 0x139366BA74F1922DULL }, /* XSUM_XXH3_withSecret_testdata[463] */\n    {  464, 0x0000000000000000ULL, 0x0D5E0CFA6D8177ECULL }, /* XSUM_XXH3_withSecret_testdata[464] */\n    {  465, 0x0000000000000000ULL, 0x696BB5F52A5A4D2AULL }, /* XSUM_XXH3_withSecret_testdata[465] */\n    {  466, 0x0000000000000000ULL, 0x1DA3384D51C3989EULL }, /* XSUM_XXH3_withSecret_testdata[466] */\n    {  467, 0x0000000000000000ULL, 0xEB1E8FB9E569B1BEULL }, /* XSUM_XXH3_withSecret_testdata[467] */\n    {  468, 0x0000000000000000ULL, 0xBE451DC21D6711F3ULL }, /* XSUM_XXH3_withSecret_testdata[468] */\n    {  469, 0x0000000000000000ULL, 0x9AA9F786DB7FB505ULL }, /* XSUM_XXH3_withSecret_testdata[469] */\n    {  470, 0x0000000000000000ULL, 0x05A05AF0D472D478ULL }, /* XSUM_XXH3_withSecret_testdata[470] */\n    {  471, 0x0000000000000000ULL, 0x74E2DACFF08AA645ULL }, /* XSUM_XXH3_withSecret_testdata[471] */\n    {  472, 0x0000000000000000ULL, 0xF85348C7CFB5B9EAULL }, /* XSUM_XXH3_withSecret_testdata[472] */\n    {  473, 0x0000000000000000ULL, 0xA883F3EB96291568ULL }, /* XSUM_XXH3_withSecret_testdata[473] */\n    {  474, 0x0000000000000000ULL, 0xC720FBE31C03664FULL }, /* XSUM_XXH3_withSecret_testdata[474] */\n    {  475, 0x0000000000000000ULL, 0x4D97B2885715A5AAULL }, /* XSUM_XXH3_withSecret_testdata[475] */\n    {  476, 0x0000000000000000ULL, 0x71A3B155E993C666ULL }, /* XSUM_XXH3_withSecret_testdata[476] */\n    {  477, 0x0000000000000000ULL, 0x06CE86D9F84391BAULL }, /* XSUM_XXH3_withSecret_testdata[477] */\n    {  478, 0x0000000000000000ULL, 0x0D7529EF6859BCE0ULL }, /* XSUM_XXH3_withSecret_testdata[478] */\n    {  479, 0x0000000000000000ULL, 0x788F89E922618A08ULL }, /* XSUM_XXH3_withSecret_testdata[479] */\n    {  480, 0x0000000000000000ULL, 0x7FADB159F9E17B6BULL }, /* XSUM_XXH3_withSecret_testdata[480] */\n    {  481, 0x0000000000000000ULL, 0x8DD9EFDDB2292E61ULL }, /* XSUM_XXH3_withSecret_testdata[481] */\n    {  482, 0x0000000000000000ULL, 0x9E3AD6DAEABABA39ULL }, /* XSUM_XXH3_withSecret_testdata[482] */\n    {  483, 0x0000000000000000ULL, 0x981222C1C613688DULL }, /* XSUM_XXH3_withSecret_testdata[483] */\n    {  484, 0x0000000000000000ULL, 0xB4F8AB78FEFEABB2ULL }, /* XSUM_XXH3_withSecret_testdata[484] */\n    {  485, 0x0000000000000000ULL, 0xB13480CA4EE9DFC4ULL }, /* XSUM_XXH3_withSecret_testdata[485] */\n    {  486, 0x0000000000000000ULL, 0x55E7EF4BE393F7D9ULL }, /* XSUM_XXH3_withSecret_testdata[486] */\n    {  487, 0x0000000000000000ULL, 0xAE4EA572FD01D019ULL }, /* XSUM_XXH3_withSecret_testdata[487] */\n    {  488, 0x0000000000000000ULL, 0xAF36559E92729487ULL }, /* XSUM_XXH3_withSecret_testdata[488] */\n    {  489, 0x0000000000000000ULL, 0x890D3420854C7C5AULL }, /* XSUM_XXH3_withSecret_testdata[489] */\n    {  490, 0x0000000000000000ULL, 0xCAE024633D1614D0ULL }, /* XSUM_XXH3_withSecret_testdata[490] */\n    {  491, 0x0000000000000000ULL, 0xEE8EECBBCB3E766BULL }, /* XSUM_XXH3_withSecret_testdata[491] */\n    {  492, 0x0000000000000000ULL, 0xAF71D10211457BB0ULL }, /* XSUM_XXH3_withSecret_testdata[492] */\n    {  493, 0x0000000000000000ULL, 0x12B1032FE1D490BCULL }, /* XSUM_XXH3_withSecret_testdata[493] */\n    {  494, 0x0000000000000000ULL, 0x496205F656F46869ULL }, /* XSUM_XXH3_withSecret_testdata[494] */\n    {  495, 0x0000000000000000ULL, 0xA6BEDED188B0D541ULL }, /* XSUM_XXH3_withSecret_testdata[495] */\n    {  496, 0x0000000000000000ULL, 0xB6C8E95F9ED250E1ULL }, /* XSUM_XXH3_withSecret_testdata[496] */\n    {  497, 0x0000000000000000ULL, 0x0DAF283FCCE83BA0ULL }, /* XSUM_XXH3_withSecret_testdata[497] */\n    {  498, 0x0000000000000000ULL, 0xC9C8BB888444FCDCULL }, /* XSUM_XXH3_withSecret_testdata[498] */\n    {  499, 0x0000000000000000ULL, 0xB09E0768B25AF325ULL }, /* XSUM_XXH3_withSecret_testdata[499] */\n    {  500, 0x0000000000000000ULL, 0x1E33D40CD0295252ULL }, /* XSUM_XXH3_withSecret_testdata[500] */\n    {  501, 0x0000000000000000ULL, 0xBBC2DDD4CDFB1D8FULL }, /* XSUM_XXH3_withSecret_testdata[501] */\n    {  502, 0x0000000000000000ULL, 0x390B3C654F27BA9BULL }, /* XSUM_XXH3_withSecret_testdata[502] */\n    {  503, 0x0000000000000000ULL, 0x5B4E4DA2D546AF16ULL }, /* XSUM_XXH3_withSecret_testdata[503] */\n    {  504, 0x0000000000000000ULL, 0x6188E7B007CB5BBEULL }, /* XSUM_XXH3_withSecret_testdata[504] */\n    {  505, 0x0000000000000000ULL, 0x66136B194844318CULL }, /* XSUM_XXH3_withSecret_testdata[505] */\n    {  506, 0x0000000000000000ULL, 0x6AE4F042EFE78B47ULL }, /* XSUM_XXH3_withSecret_testdata[506] */\n    {  507, 0x0000000000000000ULL, 0x9A0086AF00460BE4ULL }, /* XSUM_XXH3_withSecret_testdata[507] */\n    {  508, 0x0000000000000000ULL, 0x7C6304A187315EB8ULL }, /* XSUM_XXH3_withSecret_testdata[508] */\n    {  509, 0x0000000000000000ULL, 0x7F6C42510D7ACD65ULL }, /* XSUM_XXH3_withSecret_testdata[509] */\n    {  510, 0x0000000000000000ULL, 0x1BE1981EA82F7194ULL }, /* XSUM_XXH3_withSecret_testdata[510] */\n    {  511, 0x0000000000000000ULL, 0x13E7046BC1C1F16AULL }, /* XSUM_XXH3_withSecret_testdata[511] */\n    {  512, 0x0000000000000000ULL, 0x7564693DD526E28DULL }, /* XSUM_XXH3_withSecret_testdata[512] */\n    {  513, 0x0000000000000000ULL, 0x90ECD952A5E1DB2AULL }, /* XSUM_XXH3_withSecret_testdata[513] */\n    {  514, 0x0000000000000000ULL, 0x1AA64FBAC9FDA462ULL }, /* XSUM_XXH3_withSecret_testdata[514] */\n    {  515, 0x0000000000000000ULL, 0x6FCBB3CD2F992BA2ULL }, /* XSUM_XXH3_withSecret_testdata[515] */\n    {  516, 0x0000000000000000ULL, 0x91D589A1CC429931ULL }, /* XSUM_XXH3_withSecret_testdata[516] */\n    {  517, 0x0000000000000000ULL, 0x250BA0C99E63EB69ULL }, /* XSUM_XXH3_withSecret_testdata[517] */\n    {  518, 0x0000000000000000ULL, 0xB5806B40F35EBA8FULL }, /* XSUM_XXH3_withSecret_testdata[518] */\n    {  519, 0x0000000000000000ULL, 0x5E60CDD342A90D11ULL }, /* XSUM_XXH3_withSecret_testdata[519] */\n    {  520, 0x0000000000000000ULL, 0xB7E74BEB49229E4AULL }, /* XSUM_XXH3_withSecret_testdata[520] */\n    {  521, 0x0000000000000000ULL, 0x99BF1AD8A3848DCEULL }, /* XSUM_XXH3_withSecret_testdata[521] */\n    {  522, 0x0000000000000000ULL, 0xE829587F4E69AEF4ULL }, /* XSUM_XXH3_withSecret_testdata[522] */\n    {  523, 0x0000000000000000ULL, 0xB7FCF1AE6B935506ULL }, /* XSUM_XXH3_withSecret_testdata[523] */\n    {  524, 0x0000000000000000ULL, 0x0EBEE873C033D02BULL }, /* XSUM_XXH3_withSecret_testdata[524] */\n    {  525, 0x0000000000000000ULL, 0xD30F10C56CB2BA6CULL }, /* XSUM_XXH3_withSecret_testdata[525] */\n    {  526, 0x0000000000000000ULL, 0x3231AF77DE6BF16BULL }, /* XSUM_XXH3_withSecret_testdata[526] */\n    {  527, 0x0000000000000000ULL, 0x4DF21324B4C9D980ULL }, /* XSUM_XXH3_withSecret_testdata[527] */\n    {  528, 0x0000000000000000ULL, 0x116D8F2EEC17F844ULL }, /* XSUM_XXH3_withSecret_testdata[528] */\n    {  529, 0x0000000000000000ULL, 0x7A520D146D8EACC4ULL }, /* XSUM_XXH3_withSecret_testdata[529] */\n    {  530, 0x0000000000000000ULL, 0xCEF7415A2376AFF8ULL }, /* XSUM_XXH3_withSecret_testdata[530] */\n    {  531, 0x0000000000000000ULL, 0x593BEC9404885FE6ULL }, /* XSUM_XXH3_withSecret_testdata[531] */\n    {  532, 0x0000000000000000ULL, 0x3678DAE654D1BA14ULL }, /* XSUM_XXH3_withSecret_testdata[532] */\n    {  533, 0x0000000000000000ULL, 0xBC46CAD7E4A3A91DULL }, /* XSUM_XXH3_withSecret_testdata[533] */\n    {  534, 0x0000000000000000ULL, 0x22AAE7BE6E3CE69CULL }, /* XSUM_XXH3_withSecret_testdata[534] */\n    {  535, 0x0000000000000000ULL, 0xAFD83E6D60A03601ULL }, /* XSUM_XXH3_withSecret_testdata[535] */\n    {  536, 0x0000000000000000ULL, 0x4FEC4ECD4DF997D8ULL }, /* XSUM_XXH3_withSecret_testdata[536] */\n    {  537, 0x0000000000000000ULL, 0x7C678DC167B9FB60ULL }, /* XSUM_XXH3_withSecret_testdata[537] */\n    {  538, 0x0000000000000000ULL, 0xC878F611DE29F652ULL }, /* XSUM_XXH3_withSecret_testdata[538] */\n    {  539, 0x0000000000000000ULL, 0x6A1CD0BE28964327ULL }, /* XSUM_XXH3_withSecret_testdata[539] */\n    {  540, 0x0000000000000000ULL, 0x8FCA7332782D66CFULL }, /* XSUM_XXH3_withSecret_testdata[540] */\n    {  541, 0x0000000000000000ULL, 0xB8480536E3E32AE0ULL }, /* XSUM_XXH3_withSecret_testdata[541] */\n    {  542, 0x0000000000000000ULL, 0x94AC4ABBB2A84A0CULL }, /* XSUM_XXH3_withSecret_testdata[542] */\n    {  543, 0x0000000000000000ULL, 0x90517D8900279F68ULL }, /* XSUM_XXH3_withSecret_testdata[543] */\n    {  544, 0x0000000000000000ULL, 0x246A6757E15C8B12ULL }, /* XSUM_XXH3_withSecret_testdata[544] */\n    {  545, 0x0000000000000000ULL, 0x6C03DFBB0752B899ULL }, /* XSUM_XXH3_withSecret_testdata[545] */\n    {  546, 0x0000000000000000ULL, 0xABA2842DEAFF612FULL }, /* XSUM_XXH3_withSecret_testdata[546] */\n    {  547, 0x0000000000000000ULL, 0xBAB39E5A45FFC560ULL }, /* XSUM_XXH3_withSecret_testdata[547] */\n    {  548, 0x0000000000000000ULL, 0x38D42B0D8EF776F7ULL }, /* XSUM_XXH3_withSecret_testdata[548] */\n    {  549, 0x0000000000000000ULL, 0x0D9B4FA58442EFDBULL }, /* XSUM_XXH3_withSecret_testdata[549] */\n    {  550, 0x0000000000000000ULL, 0x42CB75A41891135DULL }, /* XSUM_XXH3_withSecret_testdata[550] */\n    {  551, 0x0000000000000000ULL, 0xE192FF04B2BEB969ULL }, /* XSUM_XXH3_withSecret_testdata[551] */\n    {  552, 0x0000000000000000ULL, 0xDD39E20665BF4C76ULL }, /* XSUM_XXH3_withSecret_testdata[552] */\n    {  553, 0x0000000000000000ULL, 0x2A33A053BDE45941ULL }, /* XSUM_XXH3_withSecret_testdata[553] */\n    {  554, 0x0000000000000000ULL, 0x0FF51ED801CA9663ULL }, /* XSUM_XXH3_withSecret_testdata[554] */\n    {  555, 0x0000000000000000ULL, 0x8EF39E398852DE24ULL }, /* XSUM_XXH3_withSecret_testdata[555] */\n    {  556, 0x0000000000000000ULL, 0x27F33BB18BBCAA58ULL }, /* XSUM_XXH3_withSecret_testdata[556] */\n    {  557, 0x0000000000000000ULL, 0x1D8EA93FD71B3AA6ULL }, /* XSUM_XXH3_withSecret_testdata[557] */\n    {  558, 0x0000000000000000ULL, 0x1756B0AEB6138559ULL }, /* XSUM_XXH3_withSecret_testdata[558] */\n    {  559, 0x0000000000000000ULL, 0x28C2ECC7A2F13035ULL }, /* XSUM_XXH3_withSecret_testdata[559] */\n    {  560, 0x0000000000000000ULL, 0x4D1629FBA22FF016ULL }, /* XSUM_XXH3_withSecret_testdata[560] */\n    {  561, 0x0000000000000000ULL, 0xF7637F2CF266B6B0ULL }, /* XSUM_XXH3_withSecret_testdata[561] */\n    {  562, 0x0000000000000000ULL, 0xAB32B43837B334B0ULL }, /* XSUM_XXH3_withSecret_testdata[562] */\n    {  563, 0x0000000000000000ULL, 0xBBBD33C2D61F089CULL }, /* XSUM_XXH3_withSecret_testdata[563] */\n    {  564, 0x0000000000000000ULL, 0xBFF15485EE081A17ULL }, /* XSUM_XXH3_withSecret_testdata[564] */\n    {  565, 0x0000000000000000ULL, 0x809C50B82ABABF38ULL }, /* XSUM_XXH3_withSecret_testdata[565] */\n    {  566, 0x0000000000000000ULL, 0xE61690E5F2BD778EULL }, /* XSUM_XXH3_withSecret_testdata[566] */\n    {  567, 0x0000000000000000ULL, 0xEA3888F2AAE96689ULL }, /* XSUM_XXH3_withSecret_testdata[567] */\n    {  568, 0x0000000000000000ULL, 0xCB4333286A2517EAULL }, /* XSUM_XXH3_withSecret_testdata[568] */\n    {  569, 0x0000000000000000ULL, 0xB0E94197F3C32AA4ULL }, /* XSUM_XXH3_withSecret_testdata[569] */\n    {  570, 0x0000000000000000ULL, 0xF0D81738946F5CE0ULL }, /* XSUM_XXH3_withSecret_testdata[570] */\n    {  571, 0x0000000000000000ULL, 0x1A9D7CF2D42FFEEAULL }, /* XSUM_XXH3_withSecret_testdata[571] */\n    {  572, 0x0000000000000000ULL, 0x26BB4CAFF1C913F2ULL }, /* XSUM_XXH3_withSecret_testdata[572] */\n    {  573, 0x0000000000000000ULL, 0xD5B00D056E5E1CD8ULL }, /* XSUM_XXH3_withSecret_testdata[573] */\n    {  574, 0x0000000000000000ULL, 0x7DC4689B61EA61E5ULL }, /* XSUM_XXH3_withSecret_testdata[574] */\n    {  575, 0x0000000000000000ULL, 0x467D25957A0F8C8FULL }, /* XSUM_XXH3_withSecret_testdata[575] */\n    {  576, 0x0000000000000000ULL, 0xFE07E9C6C4A371CAULL }, /* XSUM_XXH3_withSecret_testdata[576] */\n    {  577, 0x0000000000000000ULL, 0x84087F00F175E5DBULL }, /* XSUM_XXH3_withSecret_testdata[577] */\n    {  578, 0x0000000000000000ULL, 0x1BC927804009B88FULL }, /* XSUM_XXH3_withSecret_testdata[578] */\n    {  579, 0x0000000000000000ULL, 0x55BBF74F3DE64961ULL }, /* XSUM_XXH3_withSecret_testdata[579] */\n    {  580, 0x0000000000000000ULL, 0x7845B62245EAC6C9ULL }, /* XSUM_XXH3_withSecret_testdata[580] */\n    {  581, 0x0000000000000000ULL, 0x20D4D64D55285E23ULL }, /* XSUM_XXH3_withSecret_testdata[581] */\n    {  582, 0x0000000000000000ULL, 0x06549657D84B48F0ULL }, /* XSUM_XXH3_withSecret_testdata[582] */\n    {  583, 0x0000000000000000ULL, 0x66A6764AB8F52C8CULL }, /* XSUM_XXH3_withSecret_testdata[583] */\n    {  584, 0x0000000000000000ULL, 0x1DB3C57AE2A569F2ULL }, /* XSUM_XXH3_withSecret_testdata[584] */\n    {  585, 0x0000000000000000ULL, 0xFDC545403F1736A2ULL }, /* XSUM_XXH3_withSecret_testdata[585] */\n    {  586, 0x0000000000000000ULL, 0xB92C4D8DFF25AA4BULL }, /* XSUM_XXH3_withSecret_testdata[586] */\n    {  587, 0x0000000000000000ULL, 0x0EE24667615AAE8AULL }, /* XSUM_XXH3_withSecret_testdata[587] */\n    {  588, 0x0000000000000000ULL, 0x163CFA2B101E3E2EULL }, /* XSUM_XXH3_withSecret_testdata[588] */\n    {  589, 0x0000000000000000ULL, 0xD95A3ADA05D46BD8ULL }, /* XSUM_XXH3_withSecret_testdata[589] */\n    {  590, 0x0000000000000000ULL, 0xC50602315F6DCAC4ULL }, /* XSUM_XXH3_withSecret_testdata[590] */\n    {  591, 0x0000000000000000ULL, 0xD797827DFC7270E5ULL }, /* XSUM_XXH3_withSecret_testdata[591] */\n    {  592, 0x0000000000000000ULL, 0x39DF2CFEF1965140ULL }, /* XSUM_XXH3_withSecret_testdata[592] */\n    {  593, 0x0000000000000000ULL, 0x27A57312A8BF08AAULL }, /* XSUM_XXH3_withSecret_testdata[593] */\n    {  594, 0x0000000000000000ULL, 0x49884742F7161A91ULL }, /* XSUM_XXH3_withSecret_testdata[594] */\n    {  595, 0x0000000000000000ULL, 0x703F1C859BA43E85ULL }, /* XSUM_XXH3_withSecret_testdata[595] */\n    {  596, 0x0000000000000000ULL, 0xC99F5919077F1602ULL }, /* XSUM_XXH3_withSecret_testdata[596] */\n    {  597, 0x0000000000000000ULL, 0x3EBFE1A698C87150ULL }, /* XSUM_XXH3_withSecret_testdata[597] */\n    {  598, 0x0000000000000000ULL, 0xF52114FB53B42FA0ULL }, /* XSUM_XXH3_withSecret_testdata[598] */\n    {  599, 0x0000000000000000ULL, 0xF880FF0AA16AD7E5ULL }, /* XSUM_XXH3_withSecret_testdata[599] */\n    {  600, 0x0000000000000000ULL, 0x310F1CB6A2BD239FULL }, /* XSUM_XXH3_withSecret_testdata[600] */\n    {  601, 0x0000000000000000ULL, 0x3DDB0C6513545BBDULL }, /* XSUM_XXH3_withSecret_testdata[601] */\n    {  602, 0x0000000000000000ULL, 0xC5CD92FCB501617AULL }, /* XSUM_XXH3_withSecret_testdata[602] */\n    {  603, 0x0000000000000000ULL, 0xB6B4FFBB69CBC605ULL }, /* XSUM_XXH3_withSecret_testdata[603] */\n    {  604, 0x0000000000000000ULL, 0x7A6DAFA8F51949B1ULL }, /* XSUM_XXH3_withSecret_testdata[604] */\n    {  605, 0x0000000000000000ULL, 0x718A65EED805BF72ULL }, /* XSUM_XXH3_withSecret_testdata[605] */\n    {  606, 0x0000000000000000ULL, 0xFE312FFC698A2E0CULL }, /* XSUM_XXH3_withSecret_testdata[606] */\n    {  607, 0x0000000000000000ULL, 0x78E791990076D6B8ULL }, /* XSUM_XXH3_withSecret_testdata[607] */\n    {  608, 0x0000000000000000ULL, 0x4740522E691209B0ULL }, /* XSUM_XXH3_withSecret_testdata[608] */\n    {  609, 0x0000000000000000ULL, 0xF81A17580E4F9F64ULL }, /* XSUM_XXH3_withSecret_testdata[609] */\n    {  610, 0x0000000000000000ULL, 0x231C26FD3126B62FULL }, /* XSUM_XXH3_withSecret_testdata[610] */\n    {  611, 0x0000000000000000ULL, 0x527D43263D1CB17DULL }, /* XSUM_XXH3_withSecret_testdata[611] */\n    {  612, 0x0000000000000000ULL, 0x1F2B5E82293DF3DAULL }, /* XSUM_XXH3_withSecret_testdata[612] */\n    {  613, 0x0000000000000000ULL, 0xECCD21F291D58491ULL }, /* XSUM_XXH3_withSecret_testdata[613] */\n    {  614, 0x0000000000000000ULL, 0xDB58F6F0463116ABULL }, /* XSUM_XXH3_withSecret_testdata[614] */\n    {  615, 0x0000000000000000ULL, 0x7CCD180281A935DBULL }, /* XSUM_XXH3_withSecret_testdata[615] */\n    {  616, 0x0000000000000000ULL, 0xFE1BB71A72BD3FC0ULL }, /* XSUM_XXH3_withSecret_testdata[616] */\n    {  617, 0x0000000000000000ULL, 0xD8E4682F83685AC6ULL }, /* XSUM_XXH3_withSecret_testdata[617] */\n    {  618, 0x0000000000000000ULL, 0x2A097BE4ACF1CB3DULL }, /* XSUM_XXH3_withSecret_testdata[618] */\n    {  619, 0x0000000000000000ULL, 0x4BB0559191CD6694ULL }, /* XSUM_XXH3_withSecret_testdata[619] */\n    {  620, 0x0000000000000000ULL, 0x6AEEF8D74CB794ABULL }, /* XSUM_XXH3_withSecret_testdata[620] */\n    {  621, 0x0000000000000000ULL, 0x44D4F1955B2B77ABULL }, /* XSUM_XXH3_withSecret_testdata[621] */\n    {  622, 0x0000000000000000ULL, 0x19DB5915F3827B4EULL }, /* XSUM_XXH3_withSecret_testdata[622] */\n    {  623, 0x0000000000000000ULL, 0x14D765413927C1F7ULL }, /* XSUM_XXH3_withSecret_testdata[623] */\n    {  624, 0x0000000000000000ULL, 0xE9A2D756CD39BD67ULL }, /* XSUM_XXH3_withSecret_testdata[624] */\n    {  625, 0x0000000000000000ULL, 0xCE1568B11F19346EULL }, /* XSUM_XXH3_withSecret_testdata[625] */\n    {  626, 0x0000000000000000ULL, 0xEC3E07F1679E7153ULL }, /* XSUM_XXH3_withSecret_testdata[626] */\n    {  627, 0x0000000000000000ULL, 0xC1BBAB36A97BA650ULL }, /* XSUM_XXH3_withSecret_testdata[627] */\n    {  628, 0x0000000000000000ULL, 0xF40C6B258C2D2F59ULL }, /* XSUM_XXH3_withSecret_testdata[628] */\n    {  629, 0x0000000000000000ULL, 0x3ECEAFDE6185BC06ULL }, /* XSUM_XXH3_withSecret_testdata[629] */\n    {  630, 0x0000000000000000ULL, 0x2F7B8EB209344D00ULL }, /* XSUM_XXH3_withSecret_testdata[630] */\n    {  631, 0x0000000000000000ULL, 0x7EB108637364B0B0ULL }, /* XSUM_XXH3_withSecret_testdata[631] */\n    {  632, 0x0000000000000000ULL, 0x3F360E7FFE69F06CULL }, /* XSUM_XXH3_withSecret_testdata[632] */\n    {  633, 0x0000000000000000ULL, 0x1BDEB7800D9CF0BBULL }, /* XSUM_XXH3_withSecret_testdata[633] */\n    {  634, 0x0000000000000000ULL, 0x97E39550F9F0AA25ULL }, /* XSUM_XXH3_withSecret_testdata[634] */\n    {  635, 0x0000000000000000ULL, 0x5D773AA3022107D0ULL }, /* XSUM_XXH3_withSecret_testdata[635] */\n    {  636, 0x0000000000000000ULL, 0x7B3EBE0204A998D2ULL }, /* XSUM_XXH3_withSecret_testdata[636] */\n    {  637, 0x0000000000000000ULL, 0x04BAA36E1EAEE3BFULL }, /* XSUM_XXH3_withSecret_testdata[637] */\n    {  638, 0x0000000000000000ULL, 0x64BBFD74C721AAA3ULL }, /* XSUM_XXH3_withSecret_testdata[638] */\n    {  639, 0x0000000000000000ULL, 0x88C492DA2815EFDDULL }, /* XSUM_XXH3_withSecret_testdata[639] */\n    {  640, 0x0000000000000000ULL, 0x46679B44DB4DC036ULL }, /* XSUM_XXH3_withSecret_testdata[640] */\n    {  641, 0x0000000000000000ULL, 0xC0F26241C55DB4E6ULL }, /* XSUM_XXH3_withSecret_testdata[641] */\n    {  642, 0x0000000000000000ULL, 0x1B68CECD4E15423CULL }, /* XSUM_XXH3_withSecret_testdata[642] */\n    {  643, 0x0000000000000000ULL, 0x933C50D80ED75373ULL }, /* XSUM_XXH3_withSecret_testdata[643] */\n    {  644, 0x0000000000000000ULL, 0xCCCFB912FB0F29AAULL }, /* XSUM_XXH3_withSecret_testdata[644] */\n    {  645, 0x0000000000000000ULL, 0xCC48BA3862246859ULL }, /* XSUM_XXH3_withSecret_testdata[645] */\n    {  646, 0x0000000000000000ULL, 0x32FDBEADE5A50042ULL }, /* XSUM_XXH3_withSecret_testdata[646] */\n    {  647, 0x0000000000000000ULL, 0x489E5E8E2F383746ULL }, /* XSUM_XXH3_withSecret_testdata[647] */\n    {  648, 0x0000000000000000ULL, 0xE344D9ABFE602B22ULL }, /* XSUM_XXH3_withSecret_testdata[648] */\n    {  649, 0x0000000000000000ULL, 0x21531EF875D4FA29ULL }, /* XSUM_XXH3_withSecret_testdata[649] */\n    {  650, 0x0000000000000000ULL, 0x3B59069D9A2B8135ULL }, /* XSUM_XXH3_withSecret_testdata[650] */\n    {  651, 0x0000000000000000ULL, 0x78AB22FE4F0FBF0FULL }, /* XSUM_XXH3_withSecret_testdata[651] */\n    {  652, 0x0000000000000000ULL, 0xACB8C5400199B242ULL }, /* XSUM_XXH3_withSecret_testdata[652] */\n    {  653, 0x0000000000000000ULL, 0x71919508938CA38DULL }, /* XSUM_XXH3_withSecret_testdata[653] */\n    {  654, 0x0000000000000000ULL, 0x7633B021B9E6BCCCULL }, /* XSUM_XXH3_withSecret_testdata[654] */\n    {  655, 0x0000000000000000ULL, 0xD087E689A0489715ULL }, /* XSUM_XXH3_withSecret_testdata[655] */\n    {  656, 0x0000000000000000ULL, 0x0B76872649A7A181ULL }, /* XSUM_XXH3_withSecret_testdata[656] */\n    {  657, 0x0000000000000000ULL, 0x960389D3025ED64FULL }, /* XSUM_XXH3_withSecret_testdata[657] */\n    {  658, 0x0000000000000000ULL, 0x5EFB5D57310F3290ULL }, /* XSUM_XXH3_withSecret_testdata[658] */\n    {  659, 0x0000000000000000ULL, 0x4635C245BCC082F8ULL }, /* XSUM_XXH3_withSecret_testdata[659] */\n    {  660, 0x0000000000000000ULL, 0x1A44D63C80336D7CULL }, /* XSUM_XXH3_withSecret_testdata[660] */\n    {  661, 0x0000000000000000ULL, 0x4051FBAFDC0A9EE7ULL }, /* XSUM_XXH3_withSecret_testdata[661] */\n    {  662, 0x0000000000000000ULL, 0xEE1DC1BED1BBF340ULL }, /* XSUM_XXH3_withSecret_testdata[662] */\n    {  663, 0x0000000000000000ULL, 0x567732FFF10E10DDULL }, /* XSUM_XXH3_withSecret_testdata[663] */\n    {  664, 0x0000000000000000ULL, 0xCA0D4F910158778CULL }, /* XSUM_XXH3_withSecret_testdata[664] */\n    {  665, 0x0000000000000000ULL, 0x8CB80A374551419CULL }, /* XSUM_XXH3_withSecret_testdata[665] */\n    {  666, 0x0000000000000000ULL, 0x2EA34B279531E9A6ULL }, /* XSUM_XXH3_withSecret_testdata[666] */\n    {  667, 0x0000000000000000ULL, 0xFC3478CF609E74BFULL }, /* XSUM_XXH3_withSecret_testdata[667] */\n    {  668, 0x0000000000000000ULL, 0xF89675F751403E46ULL }, /* XSUM_XXH3_withSecret_testdata[668] */\n    {  669, 0x0000000000000000ULL, 0x002903C1251E2536ULL }, /* XSUM_XXH3_withSecret_testdata[669] */\n    {  670, 0x0000000000000000ULL, 0x48645513501B1AF2ULL }, /* XSUM_XXH3_withSecret_testdata[670] */\n    {  671, 0x0000000000000000ULL, 0x14B899EF06C56DCEULL }, /* XSUM_XXH3_withSecret_testdata[671] */\n    {  672, 0x0000000000000000ULL, 0xCCC02F5A3F2338A7ULL }, /* XSUM_XXH3_withSecret_testdata[672] */\n    {  673, 0x0000000000000000ULL, 0x29F8CB8B53ACA0F7ULL }, /* XSUM_XXH3_withSecret_testdata[673] */\n    {  674, 0x0000000000000000ULL, 0xBD15D6F15EC47EA2ULL }, /* XSUM_XXH3_withSecret_testdata[674] */\n    {  675, 0x0000000000000000ULL, 0xC89746EEF3F9AA1CULL }, /* XSUM_XXH3_withSecret_testdata[675] */\n    {  676, 0x0000000000000000ULL, 0x0C5BA69608ADCA74ULL }, /* XSUM_XXH3_withSecret_testdata[676] */\n    {  677, 0x0000000000000000ULL, 0x80BD5048EDAE6489ULL }, /* XSUM_XXH3_withSecret_testdata[677] */\n    {  678, 0x0000000000000000ULL, 0xAC744213B2F7172FULL }, /* XSUM_XXH3_withSecret_testdata[678] */\n    {  679, 0x0000000000000000ULL, 0xE9B82480B309EF6EULL }, /* XSUM_XXH3_withSecret_testdata[679] */\n    {  680, 0x0000000000000000ULL, 0xF83032CF5D84B833ULL }, /* XSUM_XXH3_withSecret_testdata[680] */\n    {  681, 0x0000000000000000ULL, 0x08AB6FB3C3C8D24DULL }, /* XSUM_XXH3_withSecret_testdata[681] */\n    {  682, 0x0000000000000000ULL, 0xF2A2C2154E58C9B4ULL }, /* XSUM_XXH3_withSecret_testdata[682] */\n    {  683, 0x0000000000000000ULL, 0xBD8D45E6543A8F07ULL }, /* XSUM_XXH3_withSecret_testdata[683] */\n    {  684, 0x0000000000000000ULL, 0x02010E1040D4A75EULL }, /* XSUM_XXH3_withSecret_testdata[684] */\n    {  685, 0x0000000000000000ULL, 0xD350EEA999B807F6ULL }, /* XSUM_XXH3_withSecret_testdata[685] */\n    {  686, 0x0000000000000000ULL, 0xF2D1DF6BFA7379B5ULL }, /* XSUM_XXH3_withSecret_testdata[686] */\n    {  687, 0x0000000000000000ULL, 0xE520648ACD33CAC8ULL }, /* XSUM_XXH3_withSecret_testdata[687] */\n    {  688, 0x0000000000000000ULL, 0x71BDE128795B979AULL }, /* XSUM_XXH3_withSecret_testdata[688] */\n    {  689, 0x0000000000000000ULL, 0xF314701CB0A2B713ULL }, /* XSUM_XXH3_withSecret_testdata[689] */\n    {  690, 0x0000000000000000ULL, 0x62F19C456C28BB9EULL }, /* XSUM_XXH3_withSecret_testdata[690] */\n    {  691, 0x0000000000000000ULL, 0xA3517F9E43BF2893ULL }, /* XSUM_XXH3_withSecret_testdata[691] */\n    {  692, 0x0000000000000000ULL, 0xC00D3D8ABCBB60F6ULL }, /* XSUM_XXH3_withSecret_testdata[692] */\n    {  693, 0x0000000000000000ULL, 0x3AFA9A6198D94AACULL }, /* XSUM_XXH3_withSecret_testdata[693] */\n    {  694, 0x0000000000000000ULL, 0xB2D00E56EDEA2069ULL }, /* XSUM_XXH3_withSecret_testdata[694] */\n    {  695, 0x0000000000000000ULL, 0xC23DFF8D4D99A8EBULL }, /* XSUM_XXH3_withSecret_testdata[695] */\n    {  696, 0x0000000000000000ULL, 0xE07B20DB4DF65B1AULL }, /* XSUM_XXH3_withSecret_testdata[696] */\n    {  697, 0x0000000000000000ULL, 0x659A6E34580198E9ULL }, /* XSUM_XXH3_withSecret_testdata[697] */\n    {  698, 0x0000000000000000ULL, 0x33F1B0918FCA5B70ULL }, /* XSUM_XXH3_withSecret_testdata[698] */\n    {  699, 0x0000000000000000ULL, 0x05E35B0C5159D052ULL }, /* XSUM_XXH3_withSecret_testdata[699] */\n    {  700, 0x0000000000000000ULL, 0x402EA3F681BF8779ULL }, /* XSUM_XXH3_withSecret_testdata[700] */\n    {  701, 0x0000000000000000ULL, 0x4EB4891136AE353AULL }, /* XSUM_XXH3_withSecret_testdata[701] */\n    {  702, 0x0000000000000000ULL, 0xD74670F74631927FULL }, /* XSUM_XXH3_withSecret_testdata[702] */\n    {  703, 0x0000000000000000ULL, 0x2B44C65E1573C013ULL }, /* XSUM_XXH3_withSecret_testdata[703] */\n    {  704, 0x0000000000000000ULL, 0xA41AB04CE9A2579FULL }, /* XSUM_XXH3_withSecret_testdata[704] */\n    {  705, 0x0000000000000000ULL, 0x10976DA8C629A1ADULL }, /* XSUM_XXH3_withSecret_testdata[705] */\n    {  706, 0x0000000000000000ULL, 0x969DEE0B318482B7ULL }, /* XSUM_XXH3_withSecret_testdata[706] */\n    {  707, 0x0000000000000000ULL, 0xBB9674583F7864EDULL }, /* XSUM_XXH3_withSecret_testdata[707] */\n    {  708, 0x0000000000000000ULL, 0x8789C8266AED0667ULL }, /* XSUM_XXH3_withSecret_testdata[708] */\n    {  709, 0x0000000000000000ULL, 0x48F472194E709005ULL }, /* XSUM_XXH3_withSecret_testdata[709] */\n    {  710, 0x0000000000000000ULL, 0x2D2D3E6DAF08044FULL }, /* XSUM_XXH3_withSecret_testdata[710] */\n    {  711, 0x0000000000000000ULL, 0xB48D7153CED1A82CULL }, /* XSUM_XXH3_withSecret_testdata[711] */\n    {  712, 0x0000000000000000ULL, 0x24DD7E127E91C3EBULL }, /* XSUM_XXH3_withSecret_testdata[712] */\n    {  713, 0x0000000000000000ULL, 0x8A62D86D2097F56FULL }, /* XSUM_XXH3_withSecret_testdata[713] */\n    {  714, 0x0000000000000000ULL, 0x5FEB5D0B5A459D5FULL }, /* XSUM_XXH3_withSecret_testdata[714] */\n    {  715, 0x0000000000000000ULL, 0x72DD0A1F49A494AEULL }, /* XSUM_XXH3_withSecret_testdata[715] */\n    {  716, 0x0000000000000000ULL, 0x56165D4F0AE93796ULL }, /* XSUM_XXH3_withSecret_testdata[716] */\n    {  717, 0x0000000000000000ULL, 0x32B453DC9A40536BULL }, /* XSUM_XXH3_withSecret_testdata[717] */\n    {  718, 0x0000000000000000ULL, 0xF9FF068AD17E12D4ULL }, /* XSUM_XXH3_withSecret_testdata[718] */\n    {  719, 0x0000000000000000ULL, 0xD6B57914B3051F9BULL }, /* XSUM_XXH3_withSecret_testdata[719] */\n    {  720, 0x0000000000000000ULL, 0xFE283636BB19F190ULL }, /* XSUM_XXH3_withSecret_testdata[720] */\n    {  721, 0x0000000000000000ULL, 0x0B7D684B7D87A90AULL }, /* XSUM_XXH3_withSecret_testdata[721] */\n    {  722, 0x0000000000000000ULL, 0xF033F9A6114B31DDULL }, /* XSUM_XXH3_withSecret_testdata[722] */\n    {  723, 0x0000000000000000ULL, 0x14D23747EAB0059DULL }, /* XSUM_XXH3_withSecret_testdata[723] */\n    {  724, 0x0000000000000000ULL, 0x53B7F60F9A96A4E2ULL }, /* XSUM_XXH3_withSecret_testdata[724] */\n    {  725, 0x0000000000000000ULL, 0x2DC466F5A1DB6334ULL }, /* XSUM_XXH3_withSecret_testdata[725] */\n    {  726, 0x0000000000000000ULL, 0x9F4037D5CD604912ULL }, /* XSUM_XXH3_withSecret_testdata[726] */\n    {  727, 0x0000000000000000ULL, 0xC6126C6BFCD9987CULL }, /* XSUM_XXH3_withSecret_testdata[727] */\n    {  728, 0x0000000000000000ULL, 0x70C6C6077CAB17CFULL }, /* XSUM_XXH3_withSecret_testdata[728] */\n    {  729, 0x0000000000000000ULL, 0x40F31F9E3DC11283ULL }, /* XSUM_XXH3_withSecret_testdata[729] */\n    {  730, 0x0000000000000000ULL, 0xA76292426E4D3721ULL }, /* XSUM_XXH3_withSecret_testdata[730] */\n    {  731, 0x0000000000000000ULL, 0x9C1E2F0357FDC2ADULL }, /* XSUM_XXH3_withSecret_testdata[731] */\n    {  732, 0x0000000000000000ULL, 0x6FCA7F5216355242ULL }, /* XSUM_XXH3_withSecret_testdata[732] */\n    {  733, 0x0000000000000000ULL, 0xECE8CF23AE474819ULL }, /* XSUM_XXH3_withSecret_testdata[733] */\n    {  734, 0x0000000000000000ULL, 0x38D3E24C911537B9ULL }, /* XSUM_XXH3_withSecret_testdata[734] */\n    {  735, 0x0000000000000000ULL, 0x28B2C70FC001D1B8ULL }, /* XSUM_XXH3_withSecret_testdata[735] */\n    {  736, 0x0000000000000000ULL, 0xDF81596452BB7BA0ULL }, /* XSUM_XXH3_withSecret_testdata[736] */\n    {  737, 0x0000000000000000ULL, 0x99659599BFFF1C8CULL }, /* XSUM_XXH3_withSecret_testdata[737] */\n    {  738, 0x0000000000000000ULL, 0x9BBF45234136AE76ULL }, /* XSUM_XXH3_withSecret_testdata[738] */\n    {  739, 0x0000000000000000ULL, 0xDB5F6A3B2009ED23ULL }, /* XSUM_XXH3_withSecret_testdata[739] */\n    {  740, 0x0000000000000000ULL, 0xF137E2C95EAFABEEULL }, /* XSUM_XXH3_withSecret_testdata[740] */\n    {  741, 0x0000000000000000ULL, 0x9EA9DCEA28C67283ULL }, /* XSUM_XXH3_withSecret_testdata[741] */\n    {  742, 0x0000000000000000ULL, 0x1D614D3FCEF1BFF2ULL }, /* XSUM_XXH3_withSecret_testdata[742] */\n    {  743, 0x0000000000000000ULL, 0x6505CDD578A13F90ULL }, /* XSUM_XXH3_withSecret_testdata[743] */\n    {  744, 0x0000000000000000ULL, 0xD9BD23E78D5FDB64ULL }, /* XSUM_XXH3_withSecret_testdata[744] */\n    {  745, 0x0000000000000000ULL, 0x16EB6BA76C662BD1ULL }, /* XSUM_XXH3_withSecret_testdata[745] */\n    {  746, 0x0000000000000000ULL, 0xB1B82DA246EDC970ULL }, /* XSUM_XXH3_withSecret_testdata[746] */\n    {  747, 0x0000000000000000ULL, 0xFD227BB3D813462CULL }, /* XSUM_XXH3_withSecret_testdata[747] */\n    {  748, 0x0000000000000000ULL, 0xCD8E446999810C93ULL }, /* XSUM_XXH3_withSecret_testdata[748] */\n    {  749, 0x0000000000000000ULL, 0x58BD25D1B692F670ULL }, /* XSUM_XXH3_withSecret_testdata[749] */\n    {  750, 0x0000000000000000ULL, 0xE61566F9D3ABEF07ULL }, /* XSUM_XXH3_withSecret_testdata[750] */\n    {  751, 0x0000000000000000ULL, 0x4CF9B93AE03C3DFDULL }, /* XSUM_XXH3_withSecret_testdata[751] */\n    {  752, 0x0000000000000000ULL, 0xDE22C47EDEC52203ULL }, /* XSUM_XXH3_withSecret_testdata[752] */\n    {  753, 0x0000000000000000ULL, 0x25D22BD3CFB1D0D1ULL }, /* XSUM_XXH3_withSecret_testdata[753] */\n    {  754, 0x0000000000000000ULL, 0x8BD7853928697AC6ULL }, /* XSUM_XXH3_withSecret_testdata[754] */\n    {  755, 0x0000000000000000ULL, 0x92E08C319A200940ULL }, /* XSUM_XXH3_withSecret_testdata[755] */\n    {  756, 0x0000000000000000ULL, 0x27AD06BDEAC44267ULL }, /* XSUM_XXH3_withSecret_testdata[756] */\n    {  757, 0x0000000000000000ULL, 0xA17D03CD9A632AE3ULL }, /* XSUM_XXH3_withSecret_testdata[757] */\n    {  758, 0x0000000000000000ULL, 0xF0FBB2A73E157F15ULL }, /* XSUM_XXH3_withSecret_testdata[758] */\n    {  759, 0x0000000000000000ULL, 0xDAF9B6534BD1921EULL }, /* XSUM_XXH3_withSecret_testdata[759] */\n    {  760, 0x0000000000000000ULL, 0xD4D0979DCE515AD9ULL }, /* XSUM_XXH3_withSecret_testdata[760] */\n    {  761, 0x0000000000000000ULL, 0x0FB5BC6999532331ULL }, /* XSUM_XXH3_withSecret_testdata[761] */\n    {  762, 0x0000000000000000ULL, 0xFB9F3A8FF62149B6ULL }, /* XSUM_XXH3_withSecret_testdata[762] */\n    {  763, 0x0000000000000000ULL, 0xDB70A13D62BC4863ULL }, /* XSUM_XXH3_withSecret_testdata[763] */\n    {  764, 0x0000000000000000ULL, 0x08E6397A0C6712D1ULL }, /* XSUM_XXH3_withSecret_testdata[764] */\n    {  765, 0x0000000000000000ULL, 0x1D0DF8656A195DD3ULL }, /* XSUM_XXH3_withSecret_testdata[765] */\n    {  766, 0x0000000000000000ULL, 0xFA9F107DAB90CF8EULL }, /* XSUM_XXH3_withSecret_testdata[766] */\n    {  767, 0x0000000000000000ULL, 0x35BC1AD6E243381BULL }, /* XSUM_XXH3_withSecret_testdata[767] */\n    {  768, 0x0000000000000000ULL, 0x07A458215F1F3BFFULL }, /* XSUM_XXH3_withSecret_testdata[768] */\n    {  769, 0x0000000000000000ULL, 0xC57164A8296F20C5ULL }, /* XSUM_XXH3_withSecret_testdata[769] */\n    {  770, 0x0000000000000000ULL, 0x881B664D5A8434CEULL }, /* XSUM_XXH3_withSecret_testdata[770] */\n    {  771, 0x0000000000000000ULL, 0xF682457611F25916ULL }, /* XSUM_XXH3_withSecret_testdata[771] */\n    {  772, 0x0000000000000000ULL, 0x62972939496F3809ULL }, /* XSUM_XXH3_withSecret_testdata[772] */\n    {  773, 0x0000000000000000ULL, 0x6EFA77B933151865ULL }, /* XSUM_XXH3_withSecret_testdata[773] */\n    {  774, 0x0000000000000000ULL, 0x4790D7FB3353945EULL }, /* XSUM_XXH3_withSecret_testdata[774] */\n    {  775, 0x0000000000000000ULL, 0x2069E9A0771D6E82ULL }, /* XSUM_XXH3_withSecret_testdata[775] */\n    {  776, 0x0000000000000000ULL, 0x825AB08463AC858DULL }, /* XSUM_XXH3_withSecret_testdata[776] */\n    {  777, 0x0000000000000000ULL, 0x0105B5B85B8A54F4ULL }, /* XSUM_XXH3_withSecret_testdata[777] */\n    {  778, 0x0000000000000000ULL, 0x29FC19B50DDDAAFFULL }, /* XSUM_XXH3_withSecret_testdata[778] */\n    {  779, 0x0000000000000000ULL, 0xAB7E1C73D5784D27ULL }, /* XSUM_XXH3_withSecret_testdata[779] */\n    {  780, 0x0000000000000000ULL, 0xD1FC314A124B6BC8ULL }, /* XSUM_XXH3_withSecret_testdata[780] */\n    {  781, 0x0000000000000000ULL, 0x68D85A5E8387D9CEULL }, /* XSUM_XXH3_withSecret_testdata[781] */\n    {  782, 0x0000000000000000ULL, 0x87166ECB309BA154ULL }, /* XSUM_XXH3_withSecret_testdata[782] */\n    {  783, 0x0000000000000000ULL, 0xAEA1BABA0D3E45AFULL }, /* XSUM_XXH3_withSecret_testdata[783] */\n    {  784, 0x0000000000000000ULL, 0x8D8496E2CC45886DULL }, /* XSUM_XXH3_withSecret_testdata[784] */\n    {  785, 0x0000000000000000ULL, 0x6C396D60F7A4F0A0ULL }, /* XSUM_XXH3_withSecret_testdata[785] */\n    {  786, 0x0000000000000000ULL, 0xEFFF37679BE15016ULL }, /* XSUM_XXH3_withSecret_testdata[786] */\n    {  787, 0x0000000000000000ULL, 0xB7CB3C488DB2E57AULL }, /* XSUM_XXH3_withSecret_testdata[787] */\n    {  788, 0x0000000000000000ULL, 0x65EC1669F2D5BAF0ULL }, /* XSUM_XXH3_withSecret_testdata[788] */\n    {  789, 0x0000000000000000ULL, 0xABE83EBA7E7F7F70ULL }, /* XSUM_XXH3_withSecret_testdata[789] */\n    {  790, 0x0000000000000000ULL, 0x31E138509E94325AULL }, /* XSUM_XXH3_withSecret_testdata[790] */\n    {  791, 0x0000000000000000ULL, 0x9318AC0BEEBCEECDULL }, /* XSUM_XXH3_withSecret_testdata[791] */\n    {  792, 0x0000000000000000ULL, 0x9D31670328859E39ULL }, /* XSUM_XXH3_withSecret_testdata[792] */\n    {  793, 0x0000000000000000ULL, 0x53F9B2069E2AE9BEULL }, /* XSUM_XXH3_withSecret_testdata[793] */\n    {  794, 0x0000000000000000ULL, 0x20A05E04DDFD2C43ULL }, /* XSUM_XXH3_withSecret_testdata[794] */\n    {  795, 0x0000000000000000ULL, 0xBFBC227CEEEB4FA7ULL }, /* XSUM_XXH3_withSecret_testdata[795] */\n    {  796, 0x0000000000000000ULL, 0x50A953955EE32C70ULL }, /* XSUM_XXH3_withSecret_testdata[796] */\n    {  797, 0x0000000000000000ULL, 0x0F09DBD59B27961DULL }, /* XSUM_XXH3_withSecret_testdata[797] */\n    {  798, 0x0000000000000000ULL, 0x3416F050549CAC60ULL }, /* XSUM_XXH3_withSecret_testdata[798] */\n    {  799, 0x0000000000000000ULL, 0x4BA29FA396DDBA98ULL }, /* XSUM_XXH3_withSecret_testdata[799] */\n    {  800, 0x0000000000000000ULL, 0x312B72B55C7208E2ULL }, /* XSUM_XXH3_withSecret_testdata[800] */\n    {  801, 0x0000000000000000ULL, 0x3D769F14101FE7C4ULL }, /* XSUM_XXH3_withSecret_testdata[801] */\n    {  802, 0x0000000000000000ULL, 0xD7250DEEB225E7D2ULL }, /* XSUM_XXH3_withSecret_testdata[802] */\n    {  803, 0x0000000000000000ULL, 0x1E39FD083C51CD90ULL }, /* XSUM_XXH3_withSecret_testdata[803] */\n    {  804, 0x0000000000000000ULL, 0xAA53D012095CE25DULL }, /* XSUM_XXH3_withSecret_testdata[804] */\n    {  805, 0x0000000000000000ULL, 0x3F8684552873B76AULL }, /* XSUM_XXH3_withSecret_testdata[805] */\n    {  806, 0x0000000000000000ULL, 0xFC18EA6A1819C626ULL }, /* XSUM_XXH3_withSecret_testdata[806] */\n    {  807, 0x0000000000000000ULL, 0xA5B2AF212A5D51AFULL }, /* XSUM_XXH3_withSecret_testdata[807] */\n    {  808, 0x0000000000000000ULL, 0xFB5512AF1C6871E2ULL }, /* XSUM_XXH3_withSecret_testdata[808] */\n    {  809, 0x0000000000000000ULL, 0xAC41F21A3CDC474AULL }, /* XSUM_XXH3_withSecret_testdata[809] */\n    {  810, 0x0000000000000000ULL, 0x3481CC77F6819677ULL }, /* XSUM_XXH3_withSecret_testdata[810] */\n    {  811, 0x0000000000000000ULL, 0x6428F11429383DEBULL }, /* XSUM_XXH3_withSecret_testdata[811] */\n    {  812, 0x0000000000000000ULL, 0x6E3B873C32B994ADULL }, /* XSUM_XXH3_withSecret_testdata[812] */\n    {  813, 0x0000000000000000ULL, 0xB2077E7E7D77A3F4ULL }, /* XSUM_XXH3_withSecret_testdata[813] */\n    {  814, 0x0000000000000000ULL, 0xCB9EB8F368116E1BULL }, /* XSUM_XXH3_withSecret_testdata[814] */\n    {  815, 0x0000000000000000ULL, 0x7CAD7B69251A2FF9ULL }, /* XSUM_XXH3_withSecret_testdata[815] */\n    {  816, 0x0000000000000000ULL, 0x8C0BB7585B99B11FULL }, /* XSUM_XXH3_withSecret_testdata[816] */\n    {  817, 0x0000000000000000ULL, 0xEDB0F9587C7765BBULL }, /* XSUM_XXH3_withSecret_testdata[817] */\n    {  818, 0x0000000000000000ULL, 0xEBD1CE0BFE187E21ULL }, /* XSUM_XXH3_withSecret_testdata[818] */\n    {  819, 0x0000000000000000ULL, 0xD72A43DA55C38C85ULL }, /* XSUM_XXH3_withSecret_testdata[819] */\n    {  820, 0x0000000000000000ULL, 0x2660C967923AC585ULL }, /* XSUM_XXH3_withSecret_testdata[820] */\n    {  821, 0x0000000000000000ULL, 0x6D4C89FF3B625CABULL }, /* XSUM_XXH3_withSecret_testdata[821] */\n    {  822, 0x0000000000000000ULL, 0x47E717BC6A8B5234ULL }, /* XSUM_XXH3_withSecret_testdata[822] */\n    {  823, 0x0000000000000000ULL, 0x1918AA521A7787C5ULL }, /* XSUM_XXH3_withSecret_testdata[823] */\n    {  824, 0x0000000000000000ULL, 0xF261C5AD66E4D972ULL }, /* XSUM_XXH3_withSecret_testdata[824] */\n    {  825, 0x0000000000000000ULL, 0x24C41F2E555A52CCULL }, /* XSUM_XXH3_withSecret_testdata[825] */\n    {  826, 0x0000000000000000ULL, 0x2DB2A30A92401FBFULL }, /* XSUM_XXH3_withSecret_testdata[826] */\n    {  827, 0x0000000000000000ULL, 0x31A31AD75A7323AFULL }, /* XSUM_XXH3_withSecret_testdata[827] */\n    {  828, 0x0000000000000000ULL, 0xCB76753807565B45ULL }, /* XSUM_XXH3_withSecret_testdata[828] */\n    {  829, 0x0000000000000000ULL, 0x17935EBAF156B066ULL }, /* XSUM_XXH3_withSecret_testdata[829] */\n    {  830, 0x0000000000000000ULL, 0x8AAA1B83562FDEB6ULL }, /* XSUM_XXH3_withSecret_testdata[830] */\n    {  831, 0x0000000000000000ULL, 0xE5C95A762CD150AEULL }, /* XSUM_XXH3_withSecret_testdata[831] */\n    {  832, 0x0000000000000000ULL, 0x2617FC698E497A38ULL }, /* XSUM_XXH3_withSecret_testdata[832] */\n    {  833, 0x0000000000000000ULL, 0x144F4AAA69C19F15ULL }, /* XSUM_XXH3_withSecret_testdata[833] */\n    {  834, 0x0000000000000000ULL, 0x99E7A94392A4EE2EULL }, /* XSUM_XXH3_withSecret_testdata[834] */\n    {  835, 0x0000000000000000ULL, 0xFB94A6E9B4643FE1ULL }, /* XSUM_XXH3_withSecret_testdata[835] */\n    {  836, 0x0000000000000000ULL, 0x2EEF25CD166EB0CFULL }, /* XSUM_XXH3_withSecret_testdata[836] */\n    {  837, 0x0000000000000000ULL, 0xFE9B761CAA13B66EULL }, /* XSUM_XXH3_withSecret_testdata[837] */\n    {  838, 0x0000000000000000ULL, 0x57B7874938141AAEULL }, /* XSUM_XXH3_withSecret_testdata[838] */\n    {  839, 0x0000000000000000ULL, 0xF79088ED2B43C60AULL }, /* XSUM_XXH3_withSecret_testdata[839] */\n    {  840, 0x0000000000000000ULL, 0x3AD79A82E659F12BULL }, /* XSUM_XXH3_withSecret_testdata[840] */\n    {  841, 0x0000000000000000ULL, 0x0DEC17391585DFDEULL }, /* XSUM_XXH3_withSecret_testdata[841] */\n    {  842, 0x0000000000000000ULL, 0x66299809E567E7F0ULL }, /* XSUM_XXH3_withSecret_testdata[842] */\n    {  843, 0x0000000000000000ULL, 0x752AACD314E756C6ULL }, /* XSUM_XXH3_withSecret_testdata[843] */\n    {  844, 0x0000000000000000ULL, 0x1AE014F08EBE2C6CULL }, /* XSUM_XXH3_withSecret_testdata[844] */\n    {  845, 0x0000000000000000ULL, 0xA9554E9F9E4394EFULL }, /* XSUM_XXH3_withSecret_testdata[845] */\n    {  846, 0x0000000000000000ULL, 0xF1A16B2C2F7DED2DULL }, /* XSUM_XXH3_withSecret_testdata[846] */\n    {  847, 0x0000000000000000ULL, 0x8AD8E776B573CC65ULL }, /* XSUM_XXH3_withSecret_testdata[847] */\n    {  848, 0x0000000000000000ULL, 0x28486CB33028023BULL }, /* XSUM_XXH3_withSecret_testdata[848] */\n    {  849, 0x0000000000000000ULL, 0xB677C580F80CAA74ULL }, /* XSUM_XXH3_withSecret_testdata[849] */\n    {  850, 0x0000000000000000ULL, 0x6563F9447F2DFAD7ULL }, /* XSUM_XXH3_withSecret_testdata[850] */\n    {  851, 0x0000000000000000ULL, 0x3F959D533722594AULL }, /* XSUM_XXH3_withSecret_testdata[851] */\n    {  852, 0x0000000000000000ULL, 0x4FECD02A4281A4DEULL }, /* XSUM_XXH3_withSecret_testdata[852] */\n    {  853, 0x0000000000000000ULL, 0xF80BFC68BAC87FE6ULL }, /* XSUM_XXH3_withSecret_testdata[853] */\n    {  854, 0x0000000000000000ULL, 0xADBB99110E3DC5C8ULL }, /* XSUM_XXH3_withSecret_testdata[854] */\n    {  855, 0x0000000000000000ULL, 0x1624DB70FABCF1BBULL }, /* XSUM_XXH3_withSecret_testdata[855] */\n    {  856, 0x0000000000000000ULL, 0x47D080213B5F6B7AULL }, /* XSUM_XXH3_withSecret_testdata[856] */\n    {  857, 0x0000000000000000ULL, 0x55E53C96F067ABD1ULL }, /* XSUM_XXH3_withSecret_testdata[857] */\n    {  858, 0x0000000000000000ULL, 0x96E4DA063B4BCD11ULL }, /* XSUM_XXH3_withSecret_testdata[858] */\n    {  859, 0x0000000000000000ULL, 0xF0DDE3E2E3F524B0ULL }, /* XSUM_XXH3_withSecret_testdata[859] */\n    {  860, 0x0000000000000000ULL, 0xBA387AEE58213E3AULL }, /* XSUM_XXH3_withSecret_testdata[860] */\n    {  861, 0x0000000000000000ULL, 0xE0802DAB34A6D5A6ULL }, /* XSUM_XXH3_withSecret_testdata[861] */\n    {  862, 0x0000000000000000ULL, 0x83D157DA4B3251B9ULL }, /* XSUM_XXH3_withSecret_testdata[862] */\n    {  863, 0x0000000000000000ULL, 0x0EB879E58C37A9BEULL }, /* XSUM_XXH3_withSecret_testdata[863] */\n    {  864, 0x0000000000000000ULL, 0x259A239831DF6B15ULL }, /* XSUM_XXH3_withSecret_testdata[864] */\n    {  865, 0x0000000000000000ULL, 0x27C4E3710EB7CFF6ULL }, /* XSUM_XXH3_withSecret_testdata[865] */\n    {  866, 0x0000000000000000ULL, 0xA026856BC1006D57ULL }, /* XSUM_XXH3_withSecret_testdata[866] */\n    {  867, 0x0000000000000000ULL, 0x76D72DB18A5872ABULL }, /* XSUM_XXH3_withSecret_testdata[867] */\n    {  868, 0x0000000000000000ULL, 0x0667DC0A5FF702CCULL }, /* XSUM_XXH3_withSecret_testdata[868] */\n    {  869, 0x0000000000000000ULL, 0xCB3D8D142F846DC8ULL }, /* XSUM_XXH3_withSecret_testdata[869] */\n    {  870, 0x0000000000000000ULL, 0x614791183BD261C4ULL }, /* XSUM_XXH3_withSecret_testdata[870] */\n    {  871, 0x0000000000000000ULL, 0xE6F68A1EB569851CULL }, /* XSUM_XXH3_withSecret_testdata[871] */\n    {  872, 0x0000000000000000ULL, 0x13B16E7916DE86A6ULL }, /* XSUM_XXH3_withSecret_testdata[872] */\n    {  873, 0x0000000000000000ULL, 0x312ACD8E47D79F6AULL }, /* XSUM_XXH3_withSecret_testdata[873] */\n    {  874, 0x0000000000000000ULL, 0x6581DFD36267EC93ULL }, /* XSUM_XXH3_withSecret_testdata[874] */\n    {  875, 0x0000000000000000ULL, 0x112D90A3A2790D2EULL }, /* XSUM_XXH3_withSecret_testdata[875] */\n    {  876, 0x0000000000000000ULL, 0x1474F4016B9F64A4ULL }, /* XSUM_XXH3_withSecret_testdata[876] */\n    {  877, 0x0000000000000000ULL, 0xF652765BC35398AFULL }, /* XSUM_XXH3_withSecret_testdata[877] */\n    {  878, 0x0000000000000000ULL, 0xCF4D914D0F5C6D82ULL }, /* XSUM_XXH3_withSecret_testdata[878] */\n    {  879, 0x0000000000000000ULL, 0x4F9849DA1E433123ULL }, /* XSUM_XXH3_withSecret_testdata[879] */\n    {  880, 0x0000000000000000ULL, 0x552EFFA215B076E6ULL }, /* XSUM_XXH3_withSecret_testdata[880] */\n    {  881, 0x0000000000000000ULL, 0x70550BE650B85D78ULL }, /* XSUM_XXH3_withSecret_testdata[881] */\n    {  882, 0x0000000000000000ULL, 0xA051A52D4FCF1196ULL }, /* XSUM_XXH3_withSecret_testdata[882] */\n    {  883, 0x0000000000000000ULL, 0x89A09140CFC09BEFULL }, /* XSUM_XXH3_withSecret_testdata[883] */\n    {  884, 0x0000000000000000ULL, 0xFABC1A2C1EEF0D88ULL }, /* XSUM_XXH3_withSecret_testdata[884] */\n    {  885, 0x0000000000000000ULL, 0xEDDD143E28EC9E3BULL }, /* XSUM_XXH3_withSecret_testdata[885] */\n    {  886, 0x0000000000000000ULL, 0xA0F647AE17840307ULL }, /* XSUM_XXH3_withSecret_testdata[886] */\n    {  887, 0x0000000000000000ULL, 0x66D27AF5585FBF7AULL }, /* XSUM_XXH3_withSecret_testdata[887] */\n    {  888, 0x0000000000000000ULL, 0x769CD692AE051FD5ULL }, /* XSUM_XXH3_withSecret_testdata[888] */\n    {  889, 0x0000000000000000ULL, 0x43E34DE3A0E1AC4FULL }, /* XSUM_XXH3_withSecret_testdata[889] */\n    {  890, 0x0000000000000000ULL, 0x842B3ADDF6124DAFULL }, /* XSUM_XXH3_withSecret_testdata[890] */\n    {  891, 0x0000000000000000ULL, 0x12B41F63EDF27FA4ULL }, /* XSUM_XXH3_withSecret_testdata[891] */\n    {  892, 0x0000000000000000ULL, 0x7D7E4308983537F5ULL }, /* XSUM_XXH3_withSecret_testdata[892] */\n    {  893, 0x0000000000000000ULL, 0x02DF99A1CFBC1485ULL }, /* XSUM_XXH3_withSecret_testdata[893] */\n    {  894, 0x0000000000000000ULL, 0xE69C8725E90BB200ULL }, /* XSUM_XXH3_withSecret_testdata[894] */\n    {  895, 0x0000000000000000ULL, 0x797F9C68E051A294ULL }, /* XSUM_XXH3_withSecret_testdata[895] */\n    {  896, 0x0000000000000000ULL, 0x0C4795BEAB61DA26ULL }, /* XSUM_XXH3_withSecret_testdata[896] */\n    {  897, 0x0000000000000000ULL, 0x9494865A708F647BULL }, /* XSUM_XXH3_withSecret_testdata[897] */\n    {  898, 0x0000000000000000ULL, 0xFB3CC76B89A8D3F9ULL }, /* XSUM_XXH3_withSecret_testdata[898] */\n    {  899, 0x0000000000000000ULL, 0x402DA935DC5F53C8ULL }, /* XSUM_XXH3_withSecret_testdata[899] */\n    {  900, 0x0000000000000000ULL, 0xD7C585B83D7F950CULL }, /* XSUM_XXH3_withSecret_testdata[900] */\n    {  901, 0x0000000000000000ULL, 0x7928B820B60BD25DULL }, /* XSUM_XXH3_withSecret_testdata[901] */\n    {  902, 0x0000000000000000ULL, 0x2AC0887A2885FD81ULL }, /* XSUM_XXH3_withSecret_testdata[902] */\n    {  903, 0x0000000000000000ULL, 0x71E1F757232B61AEULL }, /* XSUM_XXH3_withSecret_testdata[903] */\n    {  904, 0x0000000000000000ULL, 0x13C7D74D13E2BB04ULL }, /* XSUM_XXH3_withSecret_testdata[904] */\n    {  905, 0x0000000000000000ULL, 0xDDE0FFB62C3024E1ULL }, /* XSUM_XXH3_withSecret_testdata[905] */\n    {  906, 0x0000000000000000ULL, 0x4CC6D1E08062805CULL }, /* XSUM_XXH3_withSecret_testdata[906] */\n    {  907, 0x0000000000000000ULL, 0x1201BD7C8B743A35ULL }, /* XSUM_XXH3_withSecret_testdata[907] */\n    {  908, 0x0000000000000000ULL, 0xF1BEE9939AEC969CULL }, /* XSUM_XXH3_withSecret_testdata[908] */\n    {  909, 0x0000000000000000ULL, 0x98A7334BC1F88F07ULL }, /* XSUM_XXH3_withSecret_testdata[909] */\n    {  910, 0x0000000000000000ULL, 0xF626D98D61D57409ULL }, /* XSUM_XXH3_withSecret_testdata[910] */\n    {  911, 0x0000000000000000ULL, 0xE2EFC99122D59592ULL }, /* XSUM_XXH3_withSecret_testdata[911] */\n    {  912, 0x0000000000000000ULL, 0x50D2225C2BB125DBULL }, /* XSUM_XXH3_withSecret_testdata[912] */\n    {  913, 0x0000000000000000ULL, 0x4B640FC853FA2799ULL }, /* XSUM_XXH3_withSecret_testdata[913] */\n    {  914, 0x0000000000000000ULL, 0x9C14CB5B5514D1FDULL }, /* XSUM_XXH3_withSecret_testdata[914] */\n    {  915, 0x0000000000000000ULL, 0xB02845F8F73EDCB8ULL }, /* XSUM_XXH3_withSecret_testdata[915] */\n    {  916, 0x0000000000000000ULL, 0xF6589946632A567BULL }, /* XSUM_XXH3_withSecret_testdata[916] */\n    {  917, 0x0000000000000000ULL, 0xBA65AC9153533E7BULL }, /* XSUM_XXH3_withSecret_testdata[917] */\n    {  918, 0x0000000000000000ULL, 0xE4BF20D9EC0F91C8ULL }, /* XSUM_XXH3_withSecret_testdata[918] */\n    {  919, 0x0000000000000000ULL, 0x72E15B4C5522B974ULL }, /* XSUM_XXH3_withSecret_testdata[919] */\n    {  920, 0x0000000000000000ULL, 0x704A31FF18C45558ULL }, /* XSUM_XXH3_withSecret_testdata[920] */\n    {  921, 0x0000000000000000ULL, 0x3A3526958FA7690AULL }, /* XSUM_XXH3_withSecret_testdata[921] */\n    {  922, 0x0000000000000000ULL, 0x95094FB8FB21C56DULL }, /* XSUM_XXH3_withSecret_testdata[922] */\n    {  923, 0x0000000000000000ULL, 0x258F7A3E80BF68E9ULL }, /* XSUM_XXH3_withSecret_testdata[923] */\n    {  924, 0x0000000000000000ULL, 0x9D1AEEDFBAF6C740ULL }, /* XSUM_XXH3_withSecret_testdata[924] */\n    {  925, 0x0000000000000000ULL, 0x988BD124E6723286ULL }, /* XSUM_XXH3_withSecret_testdata[925] */\n    {  926, 0x0000000000000000ULL, 0x4660899B351D8A0CULL }, /* XSUM_XXH3_withSecret_testdata[926] */\n    {  927, 0x0000000000000000ULL, 0xBEF8BD2F821B14E2ULL }, /* XSUM_XXH3_withSecret_testdata[927] */\n    {  928, 0x0000000000000000ULL, 0x2EA82BC6D5D6721EULL }, /* XSUM_XXH3_withSecret_testdata[928] */\n    {  929, 0x0000000000000000ULL, 0xD329F24849343C53ULL }, /* XSUM_XXH3_withSecret_testdata[929] */\n    {  930, 0x0000000000000000ULL, 0x0F9B2C3C3AE9B86EULL }, /* XSUM_XXH3_withSecret_testdata[930] */\n    {  931, 0x0000000000000000ULL, 0xFBE3F4EC0CB70530ULL }, /* XSUM_XXH3_withSecret_testdata[931] */\n    {  932, 0x0000000000000000ULL, 0x59761EF490E2AF06ULL }, /* XSUM_XXH3_withSecret_testdata[932] */\n    {  933, 0x0000000000000000ULL, 0xA4738BF536A69E5BULL }, /* XSUM_XXH3_withSecret_testdata[933] */\n    {  934, 0x0000000000000000ULL, 0x911A75070974DA15ULL }, /* XSUM_XXH3_withSecret_testdata[934] */\n    {  935, 0x0000000000000000ULL, 0x67D5A83C1BE32956ULL }, /* XSUM_XXH3_withSecret_testdata[935] */\n    {  936, 0x0000000000000000ULL, 0x4A7A843C9FFDD50BULL }, /* XSUM_XXH3_withSecret_testdata[936] */\n    {  937, 0x0000000000000000ULL, 0x416AAB70DC9D34DBULL }, /* XSUM_XXH3_withSecret_testdata[937] */\n    {  938, 0x0000000000000000ULL, 0xD92D5D02BDEA9DA2ULL }, /* XSUM_XXH3_withSecret_testdata[938] */\n    {  939, 0x0000000000000000ULL, 0x30F6FAC94051EE6EULL }, /* XSUM_XXH3_withSecret_testdata[939] */\n    {  940, 0x0000000000000000ULL, 0x997D4B57DBBA2F39ULL }, /* XSUM_XXH3_withSecret_testdata[940] */\n    {  941, 0x0000000000000000ULL, 0x70F502215BDFFDCEULL }, /* XSUM_XXH3_withSecret_testdata[941] */\n    {  942, 0x0000000000000000ULL, 0xE7C5531B2F7AE75EULL }, /* XSUM_XXH3_withSecret_testdata[942] */\n    {  943, 0x0000000000000000ULL, 0xCF17531240C40A90ULL }, /* XSUM_XXH3_withSecret_testdata[943] */\n    {  944, 0x0000000000000000ULL, 0xE750D09A90109D46ULL }, /* XSUM_XXH3_withSecret_testdata[944] */\n    {  945, 0x0000000000000000ULL, 0x94D0792E4B037609ULL }, /* XSUM_XXH3_withSecret_testdata[945] */\n    {  946, 0x0000000000000000ULL, 0xC3C7213AA478A475ULL }, /* XSUM_XXH3_withSecret_testdata[946] */\n    {  947, 0x0000000000000000ULL, 0xEB17825A5AED3468ULL }, /* XSUM_XXH3_withSecret_testdata[947] */\n    {  948, 0x0000000000000000ULL, 0x1721AA31972F81E0ULL }, /* XSUM_XXH3_withSecret_testdata[948] */\n    {  949, 0x0000000000000000ULL, 0x0D05BBE4C710F623ULL }, /* XSUM_XXH3_withSecret_testdata[949] */\n    {  950, 0x0000000000000000ULL, 0x2FB6E7D26424E839ULL }, /* XSUM_XXH3_withSecret_testdata[950] */\n    {  951, 0x0000000000000000ULL, 0xC4F258AC43633CB3ULL }, /* XSUM_XXH3_withSecret_testdata[951] */\n    {  952, 0x0000000000000000ULL, 0x42CE2EA60A969C39ULL }, /* XSUM_XXH3_withSecret_testdata[952] */\n    {  953, 0x0000000000000000ULL, 0x1A1D5C18C52D900FULL }, /* XSUM_XXH3_withSecret_testdata[953] */\n    {  954, 0x0000000000000000ULL, 0x7B9C17FE518ED92BULL }, /* XSUM_XXH3_withSecret_testdata[954] */\n    {  955, 0x0000000000000000ULL, 0x72F37756AC8B4A0DULL }, /* XSUM_XXH3_withSecret_testdata[955] */\n    {  956, 0x0000000000000000ULL, 0xB67130D3C149B7DCULL }, /* XSUM_XXH3_withSecret_testdata[956] */\n    {  957, 0x0000000000000000ULL, 0x2F8716437A5DE917ULL }, /* XSUM_XXH3_withSecret_testdata[957] */\n    {  958, 0x0000000000000000ULL, 0xBC12F20F3357341FULL }, /* XSUM_XXH3_withSecret_testdata[958] */\n    {  959, 0x0000000000000000ULL, 0xBBE849D3D9DC3A49ULL }, /* XSUM_XXH3_withSecret_testdata[959] */\n    {  960, 0x0000000000000000ULL, 0x7D81FB44A2BEFC42ULL }, /* XSUM_XXH3_withSecret_testdata[960] */\n    {  961, 0x0000000000000000ULL, 0xAA83EC5BDF669D48ULL }, /* XSUM_XXH3_withSecret_testdata[961] */\n    {  962, 0x0000000000000000ULL, 0xE52EB07AB85F6463ULL }, /* XSUM_XXH3_withSecret_testdata[962] */\n    {  963, 0x0000000000000000ULL, 0xD3CBF2232C7F1596ULL }, /* XSUM_XXH3_withSecret_testdata[963] */\n    {  964, 0x0000000000000000ULL, 0x834ABC25322F6158ULL }, /* XSUM_XXH3_withSecret_testdata[964] */\n    {  965, 0x0000000000000000ULL, 0x4DABAB40E70A6CF9ULL }, /* XSUM_XXH3_withSecret_testdata[965] */\n    {  966, 0x0000000000000000ULL, 0x263B7CC10D692218ULL }, /* XSUM_XXH3_withSecret_testdata[966] */\n    {  967, 0x0000000000000000ULL, 0x6D7CB408F6B1A793ULL }, /* XSUM_XXH3_withSecret_testdata[967] */\n    {  968, 0x0000000000000000ULL, 0x7D8C4C23E27244A7ULL }, /* XSUM_XXH3_withSecret_testdata[968] */\n    {  969, 0x0000000000000000ULL, 0xC7990759FE3760E7ULL }, /* XSUM_XXH3_withSecret_testdata[969] */\n    {  970, 0x0000000000000000ULL, 0x771B0B4D873DF382ULL }, /* XSUM_XXH3_withSecret_testdata[970] */\n    {  971, 0x0000000000000000ULL, 0x2AF4ACD0FED451D2ULL }, /* XSUM_XXH3_withSecret_testdata[971] */\n    {  972, 0x0000000000000000ULL, 0x60D3E93119ED11E8ULL }, /* XSUM_XXH3_withSecret_testdata[972] */\n    {  973, 0x0000000000000000ULL, 0xEF6877FD70853DFDULL }, /* XSUM_XXH3_withSecret_testdata[973] */\n    {  974, 0x0000000000000000ULL, 0x37CDCEC9C8C4437DULL }, /* XSUM_XXH3_withSecret_testdata[974] */\n    {  975, 0x0000000000000000ULL, 0xED986901D8854950ULL }, /* XSUM_XXH3_withSecret_testdata[975] */\n    {  976, 0x0000000000000000ULL, 0xB0DF387E07094087ULL }, /* XSUM_XXH3_withSecret_testdata[976] */\n    {  977, 0x0000000000000000ULL, 0xB47AF4DE8A46B7D7ULL }, /* XSUM_XXH3_withSecret_testdata[977] */\n    {  978, 0x0000000000000000ULL, 0xD3F33C98F2A94C64ULL }, /* XSUM_XXH3_withSecret_testdata[978] */\n    {  979, 0x0000000000000000ULL, 0xED647406557A1D3FULL }, /* XSUM_XXH3_withSecret_testdata[979] */\n    {  980, 0x0000000000000000ULL, 0xCFB755BDA6749186ULL }, /* XSUM_XXH3_withSecret_testdata[980] */\n    {  981, 0x0000000000000000ULL, 0xD3420936F2F33C50ULL }, /* XSUM_XXH3_withSecret_testdata[981] */\n    {  982, 0x0000000000000000ULL, 0x5F89BBB695A43F39ULL }, /* XSUM_XXH3_withSecret_testdata[982] */\n    {  983, 0x0000000000000000ULL, 0xDE6398E9B9B34199ULL }, /* XSUM_XXH3_withSecret_testdata[983] */\n    {  984, 0x0000000000000000ULL, 0xEC02BAC4581D84E1ULL }, /* XSUM_XXH3_withSecret_testdata[984] */\n    {  985, 0x0000000000000000ULL, 0xE02AFC42D407D47EULL }, /* XSUM_XXH3_withSecret_testdata[985] */\n    {  986, 0x0000000000000000ULL, 0x3E887C56DBED03C3ULL }, /* XSUM_XXH3_withSecret_testdata[986] */\n    {  987, 0x0000000000000000ULL, 0x0F3D52819622EB53ULL }, /* XSUM_XXH3_withSecret_testdata[987] */\n    {  988, 0x0000000000000000ULL, 0x8B0C2867BE4548B7ULL }, /* XSUM_XXH3_withSecret_testdata[988] */\n    {  989, 0x0000000000000000ULL, 0x4DA94C69601A58AAULL }, /* XSUM_XXH3_withSecret_testdata[989] */\n    {  990, 0x0000000000000000ULL, 0x6C097F10DF3E086DULL }, /* XSUM_XXH3_withSecret_testdata[990] */\n    {  991, 0x0000000000000000ULL, 0xDA0B8C6098699C76ULL }, /* XSUM_XXH3_withSecret_testdata[991] */\n    {  992, 0x0000000000000000ULL, 0x21FBB67E7817E5DDULL }, /* XSUM_XXH3_withSecret_testdata[992] */\n    {  993, 0x0000000000000000ULL, 0x4B3798B3588D48AFULL }, /* XSUM_XXH3_withSecret_testdata[993] */\n    {  994, 0x0000000000000000ULL, 0xD5A9173C1BF8A85DULL }, /* XSUM_XXH3_withSecret_testdata[994] */\n    {  995, 0x0000000000000000ULL, 0x9B507C3291E239BAULL }, /* XSUM_XXH3_withSecret_testdata[995] */\n    {  996, 0x0000000000000000ULL, 0x068CDAA12DD978CCULL }, /* XSUM_XXH3_withSecret_testdata[996] */\n    {  997, 0x0000000000000000ULL, 0xD8E39798B8B939F9ULL }, /* XSUM_XXH3_withSecret_testdata[997] */\n    {  998, 0x0000000000000000ULL, 0x997F71C88F791884ULL }, /* XSUM_XXH3_withSecret_testdata[998] */\n    {  999, 0x0000000000000000ULL, 0xC9A7479FAF1BCB96ULL }, /* XSUM_XXH3_withSecret_testdata[999] */\n    { 1000, 0x0000000000000000ULL, 0xBDB88F3E40D1FF3AULL }, /* XSUM_XXH3_withSecret_testdata[1000] */\n    { 1001, 0x0000000000000000ULL, 0xD23F888FDE1DE9A2ULL }, /* XSUM_XXH3_withSecret_testdata[1001] */\n    { 1002, 0x0000000000000000ULL, 0x1C2F94B7DC6A27BCULL }, /* XSUM_XXH3_withSecret_testdata[1002] */\n    { 1003, 0x0000000000000000ULL, 0xAA5B5CCC0548887EULL }, /* XSUM_XXH3_withSecret_testdata[1003] */\n    { 1004, 0x0000000000000000ULL, 0x679D5AABC8FD60A3ULL }, /* XSUM_XXH3_withSecret_testdata[1004] */\n    { 1005, 0x0000000000000000ULL, 0x3452C8C86D780104ULL }, /* XSUM_XXH3_withSecret_testdata[1005] */\n    { 1006, 0x0000000000000000ULL, 0xA486F1DF1AC2259CULL }, /* XSUM_XXH3_withSecret_testdata[1006] */\n    { 1007, 0x0000000000000000ULL, 0xE6CD4A8CD269214FULL }, /* XSUM_XXH3_withSecret_testdata[1007] */\n    { 1008, 0x0000000000000000ULL, 0xC863AF1CD3EBB974ULL }, /* XSUM_XXH3_withSecret_testdata[1008] */\n    { 1009, 0x0000000000000000ULL, 0xE2D21BB3F1925A07ULL }, /* XSUM_XXH3_withSecret_testdata[1009] */\n    { 1010, 0x0000000000000000ULL, 0x131E2D3A7FAB0ABCULL }, /* XSUM_XXH3_withSecret_testdata[1010] */\n    { 1011, 0x0000000000000000ULL, 0x1F5FDE33C60EA32DULL }, /* XSUM_XXH3_withSecret_testdata[1011] */\n    { 1012, 0x0000000000000000ULL, 0x91CDBC421A3B8FCBULL }, /* XSUM_XXH3_withSecret_testdata[1012] */\n    { 1013, 0x0000000000000000ULL, 0x4538A7A320B450EEULL }, /* XSUM_XXH3_withSecret_testdata[1013] */\n    { 1014, 0x0000000000000000ULL, 0x26BF3D3957258C79ULL }, /* XSUM_XXH3_withSecret_testdata[1014] */\n    { 1015, 0x0000000000000000ULL, 0xBE646FBB26AE4B4EULL }, /* XSUM_XXH3_withSecret_testdata[1015] */\n    { 1016, 0x0000000000000000ULL, 0xC68689CCB079DAB9ULL }, /* XSUM_XXH3_withSecret_testdata[1016] */\n    { 1017, 0x0000000000000000ULL, 0x55C17A5AEF3BB64FULL }, /* XSUM_XXH3_withSecret_testdata[1017] */\n    { 1018, 0x0000000000000000ULL, 0xA220A164F62EE9AFULL }, /* XSUM_XXH3_withSecret_testdata[1018] */\n    { 1019, 0x0000000000000000ULL, 0x6E70B56151BE3B47ULL }, /* XSUM_XXH3_withSecret_testdata[1019] */\n    { 1020, 0x0000000000000000ULL, 0x87D210BA884EB95AULL }, /* XSUM_XXH3_withSecret_testdata[1020] */\n    { 1021, 0x0000000000000000ULL, 0x6A22585803D5C4CCULL }, /* XSUM_XXH3_withSecret_testdata[1021] */\n    { 1022, 0x0000000000000000ULL, 0x031260A84B3226E1ULL }, /* XSUM_XXH3_withSecret_testdata[1022] */\n    { 1023, 0x0000000000000000ULL, 0x6DF5A1773B876CFBULL }, /* XSUM_XXH3_withSecret_testdata[1023] */\n    { 1024, 0x0000000000000000ULL, 0x3538A2D1EA7410D0ULL }, /* XSUM_XXH3_withSecret_testdata[1024] */\n    { 1025, 0x0000000000000000ULL, 0xE33739F32D405604ULL }, /* XSUM_XXH3_withSecret_testdata[1025] */\n    { 1026, 0x0000000000000000ULL, 0x0382509E7F46E913ULL }, /* XSUM_XXH3_withSecret_testdata[1026] */\n    { 1027, 0x0000000000000000ULL, 0x8F628F9F34D9F295ULL }, /* XSUM_XXH3_withSecret_testdata[1027] */\n    { 1028, 0x0000000000000000ULL, 0xECDFA3F555AB23E6ULL }, /* XSUM_XXH3_withSecret_testdata[1028] */\n    { 1029, 0x0000000000000000ULL, 0x7C4838926C7A36F5ULL }, /* XSUM_XXH3_withSecret_testdata[1029] */\n    { 1030, 0x0000000000000000ULL, 0xBCA5C9202530B602ULL }, /* XSUM_XXH3_withSecret_testdata[1030] */\n    { 1031, 0x0000000000000000ULL, 0xC19526A62E0781A2ULL }, /* XSUM_XXH3_withSecret_testdata[1031] */\n    { 1032, 0x0000000000000000ULL, 0x50F02E1E977C8F24ULL }, /* XSUM_XXH3_withSecret_testdata[1032] */\n    { 1033, 0x0000000000000000ULL, 0xD7F050FE207D8801ULL }, /* XSUM_XXH3_withSecret_testdata[1033] */\n    { 1034, 0x0000000000000000ULL, 0xEACD71E313EBF530ULL }, /* XSUM_XXH3_withSecret_testdata[1034] */\n    { 1035, 0x0000000000000000ULL, 0xEBEC21F8305F93FEULL }, /* XSUM_XXH3_withSecret_testdata[1035] */\n    { 1036, 0x0000000000000000ULL, 0x35093262AC38CCB9ULL }, /* XSUM_XXH3_withSecret_testdata[1036] */\n    { 1037, 0x0000000000000000ULL, 0x1D1716FF6311DF8DULL }, /* XSUM_XXH3_withSecret_testdata[1037] */\n    { 1038, 0x0000000000000000ULL, 0xC7A90B83DECE449FULL }, /* XSUM_XXH3_withSecret_testdata[1038] */\n    { 1039, 0x0000000000000000ULL, 0x332FF74A20BBC9D5ULL }, /* XSUM_XXH3_withSecret_testdata[1039] */\n    { 1040, 0x0000000000000000ULL, 0x96565B90C44AC72AULL }, /* XSUM_XXH3_withSecret_testdata[1040] */\n    { 1041, 0x0000000000000000ULL, 0xFEB28E9ECA726E7AULL }, /* XSUM_XXH3_withSecret_testdata[1041] */\n    { 1042, 0x0000000000000000ULL, 0x4F481C37E0065F4FULL }, /* XSUM_XXH3_withSecret_testdata[1042] */\n    { 1043, 0x0000000000000000ULL, 0x19E1B83A3DE421CDULL }, /* XSUM_XXH3_withSecret_testdata[1043] */\n    { 1044, 0x0000000000000000ULL, 0x9048D93DC6B55296ULL }, /* XSUM_XXH3_withSecret_testdata[1044] */\n    { 1045, 0x0000000000000000ULL, 0xFC77E3D7F36DB5DBULL }, /* XSUM_XXH3_withSecret_testdata[1045] */\n    { 1046, 0x0000000000000000ULL, 0xCDB626AD4D6F0D93ULL }, /* XSUM_XXH3_withSecret_testdata[1046] */\n    { 1047, 0x0000000000000000ULL, 0x44AE225D80251F48ULL }, /* XSUM_XXH3_withSecret_testdata[1047] */\n    { 1048, 0x0000000000000000ULL, 0xADD9CD6ABE27EC88ULL }, /* XSUM_XXH3_withSecret_testdata[1048] */\n    { 1049, 0x0000000000000000ULL, 0x868CF613DA16B7D3ULL }, /* XSUM_XXH3_withSecret_testdata[1049] */\n    { 1050, 0x0000000000000000ULL, 0xB274B680AA452344ULL }, /* XSUM_XXH3_withSecret_testdata[1050] */\n    { 1051, 0x0000000000000000ULL, 0x77D6692B33D5D00EULL }, /* XSUM_XXH3_withSecret_testdata[1051] */\n    { 1052, 0x0000000000000000ULL, 0xB63ED5FDF8A3CB23ULL }, /* XSUM_XXH3_withSecret_testdata[1052] */\n    { 1053, 0x0000000000000000ULL, 0x3EF0EE07076FA410ULL }, /* XSUM_XXH3_withSecret_testdata[1053] */\n    { 1054, 0x0000000000000000ULL, 0xC783C4FB3E66DA50ULL }, /* XSUM_XXH3_withSecret_testdata[1054] */\n    { 1055, 0x0000000000000000ULL, 0x363A06FAC4681739ULL }, /* XSUM_XXH3_withSecret_testdata[1055] */\n    { 1056, 0x0000000000000000ULL, 0x55B66523B75E9169ULL }, /* XSUM_XXH3_withSecret_testdata[1056] */\n    { 1057, 0x0000000000000000ULL, 0x8DC21437F59A5090ULL }, /* XSUM_XXH3_withSecret_testdata[1057] */\n    { 1058, 0x0000000000000000ULL, 0xD8619D1AC4CCAFF9ULL }, /* XSUM_XXH3_withSecret_testdata[1058] */\n    { 1059, 0x0000000000000000ULL, 0xAED383D6427E91DDULL }, /* XSUM_XXH3_withSecret_testdata[1059] */\n    { 1060, 0x0000000000000000ULL, 0x75C86503D0551B28ULL }, /* XSUM_XXH3_withSecret_testdata[1060] */\n    { 1061, 0x0000000000000000ULL, 0x89895FE864841CFFULL }, /* XSUM_XXH3_withSecret_testdata[1061] */\n    { 1062, 0x0000000000000000ULL, 0xD577866EFB7E65B6ULL }, /* XSUM_XXH3_withSecret_testdata[1062] */\n    { 1063, 0x0000000000000000ULL, 0x696E4AE81F17E9E5ULL }, /* XSUM_XXH3_withSecret_testdata[1063] */\n    { 1064, 0x0000000000000000ULL, 0x20B4F5B6777B1D80ULL }, /* XSUM_XXH3_withSecret_testdata[1064] */\n    { 1065, 0x0000000000000000ULL, 0xF867D9CD9A5A0A5EULL }, /* XSUM_XXH3_withSecret_testdata[1065] */\n    { 1066, 0x0000000000000000ULL, 0x7184156D346568A9ULL }, /* XSUM_XXH3_withSecret_testdata[1066] */\n    { 1067, 0x0000000000000000ULL, 0x1FB3C2F8A211D614ULL }, /* XSUM_XXH3_withSecret_testdata[1067] */\n    { 1068, 0x0000000000000000ULL, 0xAEC09F84F474BEE6ULL }, /* XSUM_XXH3_withSecret_testdata[1068] */\n    { 1069, 0x0000000000000000ULL, 0xD0B736D98040E155ULL }, /* XSUM_XXH3_withSecret_testdata[1069] */\n    { 1070, 0x0000000000000000ULL, 0x5025C87B098698F3ULL }, /* XSUM_XXH3_withSecret_testdata[1070] */\n    { 1071, 0x0000000000000000ULL, 0xBAC1074155F2FD5CULL }, /* XSUM_XXH3_withSecret_testdata[1071] */\n    { 1072, 0x0000000000000000ULL, 0x674308AAD60BB6E0ULL }, /* XSUM_XXH3_withSecret_testdata[1072] */\n    { 1073, 0x0000000000000000ULL, 0xDFE0D4AB4893F42AULL }, /* XSUM_XXH3_withSecret_testdata[1073] */\n    { 1074, 0x0000000000000000ULL, 0x5C58E1AABA5CE5FBULL }, /* XSUM_XXH3_withSecret_testdata[1074] */\n    { 1075, 0x0000000000000000ULL, 0x1EFBEE56BF8BE2E5ULL }, /* XSUM_XXH3_withSecret_testdata[1075] */\n    { 1076, 0x0000000000000000ULL, 0x02AC1D1D06435355ULL }, /* XSUM_XXH3_withSecret_testdata[1076] */\n    { 1077, 0x0000000000000000ULL, 0xC9DDF826C9F08173ULL }, /* XSUM_XXH3_withSecret_testdata[1077] */\n    { 1078, 0x0000000000000000ULL, 0x7C3673BEA98FF744ULL }, /* XSUM_XXH3_withSecret_testdata[1078] */\n    { 1079, 0x0000000000000000ULL, 0xDEA45D59E46D986BULL }, /* XSUM_XXH3_withSecret_testdata[1079] */\n    { 1080, 0x0000000000000000ULL, 0xFCCC5B98BBF807A5ULL }, /* XSUM_XXH3_withSecret_testdata[1080] */\n    { 1081, 0x0000000000000000ULL, 0x5A6B2883A5549B3AULL }, /* XSUM_XXH3_withSecret_testdata[1081] */\n    { 1082, 0x0000000000000000ULL, 0xA7C90378E8783D1EULL }, /* XSUM_XXH3_withSecret_testdata[1082] */\n    { 1083, 0x0000000000000000ULL, 0x1D041CD8ECD51B06ULL }, /* XSUM_XXH3_withSecret_testdata[1083] */\n    { 1084, 0x0000000000000000ULL, 0xB092E24774DCD316ULL }, /* XSUM_XXH3_withSecret_testdata[1084] */\n    { 1085, 0x0000000000000000ULL, 0x14F716BD88451F4FULL }, /* XSUM_XXH3_withSecret_testdata[1085] */\n    { 1086, 0x0000000000000000ULL, 0x08AD7CC409755341ULL }, /* XSUM_XXH3_withSecret_testdata[1086] */\n    { 1087, 0x0000000000000000ULL, 0x9DF1DF0101707F29ULL }, /* XSUM_XXH3_withSecret_testdata[1087] */\n    { 1088, 0x0000000000000000ULL, 0x8BCAEDDF41F82A85ULL }, /* XSUM_XXH3_withSecret_testdata[1088] */\n    { 1089, 0x0000000000000000ULL, 0x396734BF79E3529AULL }, /* XSUM_XXH3_withSecret_testdata[1089] */\n    { 1090, 0x0000000000000000ULL, 0x1D42972E7F9069E4ULL }, /* XSUM_XXH3_withSecret_testdata[1090] */\n    { 1091, 0x0000000000000000ULL, 0x2BE62A7E5377A93DULL }, /* XSUM_XXH3_withSecret_testdata[1091] */\n    { 1092, 0x0000000000000000ULL, 0x29FEF2D065B79DC4ULL }, /* XSUM_XXH3_withSecret_testdata[1092] */\n    { 1093, 0x0000000000000000ULL, 0x9268870FE3CD0A28ULL }, /* XSUM_XXH3_withSecret_testdata[1093] */\n    { 1094, 0x0000000000000000ULL, 0x531A8BB86A48C172ULL }, /* XSUM_XXH3_withSecret_testdata[1094] */\n    { 1095, 0x0000000000000000ULL, 0x96F782DBD7F2EAFAULL }, /* XSUM_XXH3_withSecret_testdata[1095] */\n    { 1096, 0x0000000000000000ULL, 0x57709214A6291F2BULL }, /* XSUM_XXH3_withSecret_testdata[1096] */\n    { 1097, 0x0000000000000000ULL, 0xFB1FB5DF61A74DC0ULL }, /* XSUM_XXH3_withSecret_testdata[1097] */\n    { 1098, 0x0000000000000000ULL, 0xF13705687AC37277ULL }, /* XSUM_XXH3_withSecret_testdata[1098] */\n    { 1099, 0x0000000000000000ULL, 0x2E4F43DCAA8C1F8AULL }, /* XSUM_XXH3_withSecret_testdata[1099] */\n    { 1100, 0x0000000000000000ULL, 0x6C15FF4422D23ED8ULL }, /* XSUM_XXH3_withSecret_testdata[1100] */\n    { 1101, 0x0000000000000000ULL, 0xB2BC6B9EE59935A4ULL }, /* XSUM_XXH3_withSecret_testdata[1101] */\n    { 1102, 0x0000000000000000ULL, 0x2375A86A7F20B64AULL }, /* XSUM_XXH3_withSecret_testdata[1102] */\n    { 1103, 0x0000000000000000ULL, 0x9C48F9BD5EA51031ULL }, /* XSUM_XXH3_withSecret_testdata[1103] */\n    { 1104, 0x0000000000000000ULL, 0x1EFCFD356691F623ULL }, /* XSUM_XXH3_withSecret_testdata[1104] */\n    { 1105, 0x0000000000000000ULL, 0x6FC1B0A00982F5F1ULL }, /* XSUM_XXH3_withSecret_testdata[1105] */\n    { 1106, 0x0000000000000000ULL, 0x7A21C783934EDF22ULL }, /* XSUM_XXH3_withSecret_testdata[1106] */\n    { 1107, 0x0000000000000000ULL, 0x86F7D8CF19913C4AULL }, /* XSUM_XXH3_withSecret_testdata[1107] */\n    { 1108, 0x0000000000000000ULL, 0xC703E339E016D17CULL }, /* XSUM_XXH3_withSecret_testdata[1108] */\n    { 1109, 0x0000000000000000ULL, 0xE68EEBAF5A98A4B2ULL }, /* XSUM_XXH3_withSecret_testdata[1109] */\n    { 1110, 0x0000000000000000ULL, 0x7EA1C9918A69252EULL }, /* XSUM_XXH3_withSecret_testdata[1110] */\n    { 1111, 0x0000000000000000ULL, 0xD23D81E9D487B330ULL }, /* XSUM_XXH3_withSecret_testdata[1111] */\n    { 1112, 0x0000000000000000ULL, 0xDCF2B8168A1D2D59ULL }, /* XSUM_XXH3_withSecret_testdata[1112] */\n    { 1113, 0x0000000000000000ULL, 0xF4CA1A757145DC43ULL }, /* XSUM_XXH3_withSecret_testdata[1113] */\n    { 1114, 0x0000000000000000ULL, 0x73AB52221B088939ULL }, /* XSUM_XXH3_withSecret_testdata[1114] */\n    { 1115, 0x0000000000000000ULL, 0x8CBB9BA7EF78D775ULL }, /* XSUM_XXH3_withSecret_testdata[1115] */\n    { 1116, 0x0000000000000000ULL, 0x563C8E056CAF5FDDULL }, /* XSUM_XXH3_withSecret_testdata[1116] */\n    { 1117, 0x0000000000000000ULL, 0xF50811E87CE88663ULL }, /* XSUM_XXH3_withSecret_testdata[1117] */\n    { 1118, 0x0000000000000000ULL, 0xFFCEA770436C3AD2ULL }, /* XSUM_XXH3_withSecret_testdata[1118] */\n    { 1119, 0x0000000000000000ULL, 0xE281B61DF4C561DDULL }, /* XSUM_XXH3_withSecret_testdata[1119] */\n    { 1120, 0x0000000000000000ULL, 0xEED366622AAB0A63ULL }, /* XSUM_XXH3_withSecret_testdata[1120] */\n    { 1121, 0x0000000000000000ULL, 0x5DEE82EEA840A274ULL }, /* XSUM_XXH3_withSecret_testdata[1121] */\n    { 1122, 0x0000000000000000ULL, 0xD264D7263140C0C6ULL }, /* XSUM_XXH3_withSecret_testdata[1122] */\n    { 1123, 0x0000000000000000ULL, 0xABEA45EC624E1B97ULL }, /* XSUM_XXH3_withSecret_testdata[1123] */\n    { 1124, 0x0000000000000000ULL, 0x56F66AB1DE036491ULL }, /* XSUM_XXH3_withSecret_testdata[1124] */\n    { 1125, 0x0000000000000000ULL, 0x1DD9EDEFCDE3A24CULL }, /* XSUM_XXH3_withSecret_testdata[1125] */\n    { 1126, 0x0000000000000000ULL, 0x562ADB80BB93632FULL }, /* XSUM_XXH3_withSecret_testdata[1126] */\n    { 1127, 0x0000000000000000ULL, 0x1E1B819E3B623D82ULL }, /* XSUM_XXH3_withSecret_testdata[1127] */\n    { 1128, 0x0000000000000000ULL, 0x56A07C82F5CCB7A6ULL }, /* XSUM_XXH3_withSecret_testdata[1128] */\n    { 1129, 0x0000000000000000ULL, 0x82005C2A80B0149DULL }, /* XSUM_XXH3_withSecret_testdata[1129] */\n    { 1130, 0x0000000000000000ULL, 0x16DDB1C9DDF5C17BULL }, /* XSUM_XXH3_withSecret_testdata[1130] */\n    { 1131, 0x0000000000000000ULL, 0x7158F8CF26C94C16ULL }, /* XSUM_XXH3_withSecret_testdata[1131] */\n    { 1132, 0x0000000000000000ULL, 0x2C3A5709497CFF7CULL }, /* XSUM_XXH3_withSecret_testdata[1132] */\n    { 1133, 0x0000000000000000ULL, 0x6F680E3DD0D3A52BULL }, /* XSUM_XXH3_withSecret_testdata[1133] */\n    { 1134, 0x0000000000000000ULL, 0x196FB1546D757E6AULL }, /* XSUM_XXH3_withSecret_testdata[1134] */\n    { 1135, 0x0000000000000000ULL, 0x70BBF8E10A4030ACULL }, /* XSUM_XXH3_withSecret_testdata[1135] */\n    { 1136, 0x0000000000000000ULL, 0xFB83EFA18C82B830ULL }, /* XSUM_XXH3_withSecret_testdata[1136] */\n    { 1137, 0x0000000000000000ULL, 0x3ECB963BF6DB8E5CULL }, /* XSUM_XXH3_withSecret_testdata[1137] */\n    { 1138, 0x0000000000000000ULL, 0x9D88D48EB2CD97BDULL }, /* XSUM_XXH3_withSecret_testdata[1138] */\n    { 1139, 0x0000000000000000ULL, 0xF2AE9FEAFFC676A9ULL }, /* XSUM_XXH3_withSecret_testdata[1139] */\n    { 1140, 0x0000000000000000ULL, 0xA66D3138F7B07A23ULL }, /* XSUM_XXH3_withSecret_testdata[1140] */\n    { 1141, 0x0000000000000000ULL, 0x2EC6BB65849FFEFDULL }, /* XSUM_XXH3_withSecret_testdata[1141] */\n    { 1142, 0x0000000000000000ULL, 0x912EF74ADB55BF9CULL }, /* XSUM_XXH3_withSecret_testdata[1142] */\n    { 1143, 0x0000000000000000ULL, 0x69810688BDAAF761ULL }, /* XSUM_XXH3_withSecret_testdata[1143] */\n    { 1144, 0x0000000000000000ULL, 0x641CE096D569D437ULL }, /* XSUM_XXH3_withSecret_testdata[1144] */\n    { 1145, 0x0000000000000000ULL, 0x0BA2EF1F7D45150EULL }, /* XSUM_XXH3_withSecret_testdata[1145] */\n    { 1146, 0x0000000000000000ULL, 0xC81E3264CD6F765BULL }, /* XSUM_XXH3_withSecret_testdata[1146] */\n    { 1147, 0x0000000000000000ULL, 0x0E5CB6A65F043CE6ULL }, /* XSUM_XXH3_withSecret_testdata[1147] */\n    { 1148, 0x0000000000000000ULL, 0x94D9E6AC62497AC8ULL }, /* XSUM_XXH3_withSecret_testdata[1148] */\n    { 1149, 0x0000000000000000ULL, 0xD949C814CA42C692ULL }, /* XSUM_XXH3_withSecret_testdata[1149] */\n    { 1150, 0x0000000000000000ULL, 0x6B1E0A0FDD1220E8ULL }, /* XSUM_XXH3_withSecret_testdata[1150] */\n    { 1151, 0x0000000000000000ULL, 0x02156F6DB0CDBBB1ULL }, /* XSUM_XXH3_withSecret_testdata[1151] */\n    { 1152, 0x0000000000000000ULL, 0xDF4FE79C337C19C8ULL }, /* XSUM_XXH3_withSecret_testdata[1152] */\n    { 1153, 0x0000000000000000ULL, 0x2ECD944DEF155B3EULL }, /* XSUM_XXH3_withSecret_testdata[1153] */\n    { 1154, 0x0000000000000000ULL, 0xAB258F9CE50EC939ULL }, /* XSUM_XXH3_withSecret_testdata[1154] */\n    { 1155, 0x0000000000000000ULL, 0x4C86BB5973A6A74FULL }, /* XSUM_XXH3_withSecret_testdata[1155] */\n    { 1156, 0x0000000000000000ULL, 0xB3ADFA10F5CABB5BULL }, /* XSUM_XXH3_withSecret_testdata[1156] */\n    { 1157, 0x0000000000000000ULL, 0xD75426EA89F13149ULL }, /* XSUM_XXH3_withSecret_testdata[1157] */\n    { 1158, 0x0000000000000000ULL, 0xE84718A0766D310CULL }, /* XSUM_XXH3_withSecret_testdata[1158] */\n    { 1159, 0x0000000000000000ULL, 0x005B0C0DC58C246AULL }, /* XSUM_XXH3_withSecret_testdata[1159] */\n    { 1160, 0x0000000000000000ULL, 0x2009C20E994DADAFULL }, /* XSUM_XXH3_withSecret_testdata[1160] */\n    { 1161, 0x0000000000000000ULL, 0x0ED2F88BA0A38011ULL }, /* XSUM_XXH3_withSecret_testdata[1161] */\n    { 1162, 0x0000000000000000ULL, 0x0DD4C1E9C72AAF8AULL }, /* XSUM_XXH3_withSecret_testdata[1162] */\n    { 1163, 0x0000000000000000ULL, 0x03906A618FA58EC0ULL }, /* XSUM_XXH3_withSecret_testdata[1163] */\n    { 1164, 0x0000000000000000ULL, 0x896CD47C9D3E1A7BULL }, /* XSUM_XXH3_withSecret_testdata[1164] */\n    { 1165, 0x0000000000000000ULL, 0xEF3FF7FC0BA52A9BULL }, /* XSUM_XXH3_withSecret_testdata[1165] */\n    { 1166, 0x0000000000000000ULL, 0x5C0975D67B2B6EF6ULL }, /* XSUM_XXH3_withSecret_testdata[1166] */\n    { 1167, 0x0000000000000000ULL, 0xB7CB344311452280ULL }, /* XSUM_XXH3_withSecret_testdata[1167] */\n    { 1168, 0x0000000000000000ULL, 0xE2F6F9063E5205BBULL }, /* XSUM_XXH3_withSecret_testdata[1168] */\n    { 1169, 0x0000000000000000ULL, 0x856578127453CB3EULL }, /* XSUM_XXH3_withSecret_testdata[1169] */\n    { 1170, 0x0000000000000000ULL, 0xA55707FB47A3D31EULL }, /* XSUM_XXH3_withSecret_testdata[1170] */\n    { 1171, 0x0000000000000000ULL, 0xB06E2CDB12458F98ULL }, /* XSUM_XXH3_withSecret_testdata[1171] */\n    { 1172, 0x0000000000000000ULL, 0xACD1394078DCF1AAULL }, /* XSUM_XXH3_withSecret_testdata[1172] */\n    { 1173, 0x0000000000000000ULL, 0xD84CA8AE4D64CFE0ULL }, /* XSUM_XXH3_withSecret_testdata[1173] */\n    { 1174, 0x0000000000000000ULL, 0xAA55B791EF895214ULL }, /* XSUM_XXH3_withSecret_testdata[1174] */\n    { 1175, 0x0000000000000000ULL, 0x529383E16F813C4FULL }, /* XSUM_XXH3_withSecret_testdata[1175] */\n    { 1176, 0x0000000000000000ULL, 0xECA853EEDD2A2E54ULL }, /* XSUM_XXH3_withSecret_testdata[1176] */\n    { 1177, 0x0000000000000000ULL, 0x4002EB2DC543C39CULL }, /* XSUM_XXH3_withSecret_testdata[1177] */\n    { 1178, 0x0000000000000000ULL, 0x59C372FEE8837209ULL }, /* XSUM_XXH3_withSecret_testdata[1178] */\n    { 1179, 0x0000000000000000ULL, 0x44B1D065396DFE18ULL }, /* XSUM_XXH3_withSecret_testdata[1179] */\n    { 1180, 0x0000000000000000ULL, 0x87CDA611DF1416AEULL }, /* XSUM_XXH3_withSecret_testdata[1180] */\n    { 1181, 0x0000000000000000ULL, 0x45A0F65632F65AE8ULL }, /* XSUM_XXH3_withSecret_testdata[1181] */\n    { 1182, 0x0000000000000000ULL, 0x59DA218BAEEDCDC4ULL }, /* XSUM_XXH3_withSecret_testdata[1182] */\n    { 1183, 0x0000000000000000ULL, 0x7D8A93640511D6BBULL }, /* XSUM_XXH3_withSecret_testdata[1183] */\n    { 1184, 0x0000000000000000ULL, 0xF7A914AC3196E7AEULL }, /* XSUM_XXH3_withSecret_testdata[1184] */\n    { 1185, 0x0000000000000000ULL, 0xC1B5BECE599E7823ULL }, /* XSUM_XXH3_withSecret_testdata[1185] */\n    { 1186, 0x0000000000000000ULL, 0x5866D3A1E9235620ULL }, /* XSUM_XXH3_withSecret_testdata[1186] */\n    { 1187, 0x0000000000000000ULL, 0xDA1BD59F46500051ULL }, /* XSUM_XXH3_withSecret_testdata[1187] */\n    { 1188, 0x0000000000000000ULL, 0x28D7A6EB19297C11ULL }, /* XSUM_XXH3_withSecret_testdata[1188] */\n    { 1189, 0x0000000000000000ULL, 0xF1A423015A009AA1ULL }, /* XSUM_XXH3_withSecret_testdata[1189] */\n    { 1190, 0x0000000000000000ULL, 0xEAA47268810887FDULL }, /* XSUM_XXH3_withSecret_testdata[1190] */\n    { 1191, 0x0000000000000000ULL, 0x2507000374A67D69ULL }, /* XSUM_XXH3_withSecret_testdata[1191] */\n    { 1192, 0x0000000000000000ULL, 0x86B72482FE8CC0B4ULL }, /* XSUM_XXH3_withSecret_testdata[1192] */\n    { 1193, 0x0000000000000000ULL, 0xCCE29661119C453AULL }, /* XSUM_XXH3_withSecret_testdata[1193] */\n    { 1194, 0x0000000000000000ULL, 0x5718C15955D8E86EULL }, /* XSUM_XXH3_withSecret_testdata[1194] */\n    { 1195, 0x0000000000000000ULL, 0xA45DD6275981C651ULL }, /* XSUM_XXH3_withSecret_testdata[1195] */\n    { 1196, 0x0000000000000000ULL, 0xC31C3276F4711CD9ULL }, /* XSUM_XXH3_withSecret_testdata[1196] */\n    { 1197, 0x0000000000000000ULL, 0x7057D8D2E26A41C6ULL }, /* XSUM_XXH3_withSecret_testdata[1197] */\n    { 1198, 0x0000000000000000ULL, 0xB2B056A783B96CFBULL }, /* XSUM_XXH3_withSecret_testdata[1198] */\n    { 1199, 0x0000000000000000ULL, 0xC76ABEB7BC46B70BULL }, /* XSUM_XXH3_withSecret_testdata[1199] */\n    { 1200, 0x0000000000000000ULL, 0x73755FC8551A96C0ULL }, /* XSUM_XXH3_withSecret_testdata[1200] */\n    { 1201, 0x0000000000000000ULL, 0xB753309CFD6AE937ULL }, /* XSUM_XXH3_withSecret_testdata[1201] */\n    { 1202, 0x0000000000000000ULL, 0x59EBC9D68AB74308ULL }, /* XSUM_XXH3_withSecret_testdata[1202] */\n    { 1203, 0x0000000000000000ULL, 0xD30471451F8D7F23ULL }, /* XSUM_XXH3_withSecret_testdata[1203] */\n    { 1204, 0x0000000000000000ULL, 0x49D1C3584FE44DDBULL }, /* XSUM_XXH3_withSecret_testdata[1204] */\n    { 1205, 0x0000000000000000ULL, 0x243157916985F87BULL }, /* XSUM_XXH3_withSecret_testdata[1205] */\n    { 1206, 0x0000000000000000ULL, 0x202E01C447EE0F84ULL }, /* XSUM_XXH3_withSecret_testdata[1206] */\n    { 1207, 0x0000000000000000ULL, 0xA40C5DFD692473E8ULL }, /* XSUM_XXH3_withSecret_testdata[1207] */\n    { 1208, 0x0000000000000000ULL, 0x64FB4F94E14A516EULL }, /* XSUM_XXH3_withSecret_testdata[1208] */\n    { 1209, 0x0000000000000000ULL, 0xE549E2C3449F09FFULL }, /* XSUM_XXH3_withSecret_testdata[1209] */\n    { 1210, 0x0000000000000000ULL, 0x8F4F0A0652F62A6EULL }, /* XSUM_XXH3_withSecret_testdata[1210] */\n    { 1211, 0x0000000000000000ULL, 0x63FB3196D346A6B7ULL }, /* XSUM_XXH3_withSecret_testdata[1211] */\n    { 1212, 0x0000000000000000ULL, 0xF231B7882BB00AA5ULL }, /* XSUM_XXH3_withSecret_testdata[1212] */\n    { 1213, 0x0000000000000000ULL, 0x386A02178E23A5CAULL }, /* XSUM_XXH3_withSecret_testdata[1213] */\n    { 1214, 0x0000000000000000ULL, 0xD23493CD42EEDD55ULL }, /* XSUM_XXH3_withSecret_testdata[1214] */\n    { 1215, 0x0000000000000000ULL, 0x61438E729742F3E7ULL }, /* XSUM_XXH3_withSecret_testdata[1215] */\n    { 1216, 0x0000000000000000ULL, 0x92F607D509447369ULL }, /* XSUM_XXH3_withSecret_testdata[1216] */\n    { 1217, 0x0000000000000000ULL, 0x663DE7FFFE25062BULL }, /* XSUM_XXH3_withSecret_testdata[1217] */\n    { 1218, 0x0000000000000000ULL, 0x09224BF6696D0C87ULL }, /* XSUM_XXH3_withSecret_testdata[1218] */\n    { 1219, 0x0000000000000000ULL, 0x0DC6477ADA60C46EULL }, /* XSUM_XXH3_withSecret_testdata[1219] */\n    { 1220, 0x0000000000000000ULL, 0x1DBEAEE3D8B6AEE3ULL }, /* XSUM_XXH3_withSecret_testdata[1220] */\n    { 1221, 0x0000000000000000ULL, 0x9C04B23D21BFF9D4ULL }, /* XSUM_XXH3_withSecret_testdata[1221] */\n    { 1222, 0x0000000000000000ULL, 0xA55E3990D596F4F5ULL }, /* XSUM_XXH3_withSecret_testdata[1222] */\n    { 1223, 0x0000000000000000ULL, 0x393633C0019FA593ULL }, /* XSUM_XXH3_withSecret_testdata[1223] */\n    { 1224, 0x0000000000000000ULL, 0xCD109408C4096802ULL }, /* XSUM_XXH3_withSecret_testdata[1224] */\n    { 1225, 0x0000000000000000ULL, 0x234D3FFD498043ADULL }, /* XSUM_XXH3_withSecret_testdata[1225] */\n    { 1226, 0x0000000000000000ULL, 0xCC62B983E6E16175ULL }, /* XSUM_XXH3_withSecret_testdata[1226] */\n    { 1227, 0x0000000000000000ULL, 0x27B595365C29A97DULL }, /* XSUM_XXH3_withSecret_testdata[1227] */\n    { 1228, 0x0000000000000000ULL, 0xFFAD0D865E21BF53ULL }, /* XSUM_XXH3_withSecret_testdata[1228] */\n    { 1229, 0x0000000000000000ULL, 0x41CE386C213D93CEULL }, /* XSUM_XXH3_withSecret_testdata[1229] */\n    { 1230, 0x0000000000000000ULL, 0x284740FCD667DA17ULL }, /* XSUM_XXH3_withSecret_testdata[1230] */\n    { 1231, 0x0000000000000000ULL, 0x1B1D48F3B30A1884ULL }, /* XSUM_XXH3_withSecret_testdata[1231] */\n    { 1232, 0x0000000000000000ULL, 0xCDA4172D1A1DBDF0ULL }, /* XSUM_XXH3_withSecret_testdata[1232] */\n    { 1233, 0x0000000000000000ULL, 0xF90351A1085B9FA9ULL }, /* XSUM_XXH3_withSecret_testdata[1233] */\n    { 1234, 0x0000000000000000ULL, 0x343C0D92B24D640DULL }, /* XSUM_XXH3_withSecret_testdata[1234] */\n    { 1235, 0x0000000000000000ULL, 0x64A949C8B1108BFBULL }, /* XSUM_XXH3_withSecret_testdata[1235] */\n    { 1236, 0x0000000000000000ULL, 0x245919762B221E7FULL }, /* XSUM_XXH3_withSecret_testdata[1236] */\n    { 1237, 0x0000000000000000ULL, 0xFD9BB3384A8857F5ULL }, /* XSUM_XXH3_withSecret_testdata[1237] */\n    { 1238, 0x0000000000000000ULL, 0x9E133E37A83E21DBULL }, /* XSUM_XXH3_withSecret_testdata[1238] */\n    { 1239, 0x0000000000000000ULL, 0xF71278EFE523DB46ULL }, /* XSUM_XXH3_withSecret_testdata[1239] */\n    { 1240, 0x0000000000000000ULL, 0xC82413F84E6E3EC5ULL }, /* XSUM_XXH3_withSecret_testdata[1240] */\n    { 1241, 0x0000000000000000ULL, 0x166BD3C786FDECB0ULL }, /* XSUM_XXH3_withSecret_testdata[1241] */\n    { 1242, 0x0000000000000000ULL, 0x96F0738F94FD7CBAULL }, /* XSUM_XXH3_withSecret_testdata[1242] */\n    { 1243, 0x0000000000000000ULL, 0xD250E16AC85D91ABULL }, /* XSUM_XXH3_withSecret_testdata[1243] */\n    { 1244, 0x0000000000000000ULL, 0x785A62391800E61FULL }, /* XSUM_XXH3_withSecret_testdata[1244] */\n    { 1245, 0x0000000000000000ULL, 0x3FFB5401C9F7A3FFULL }, /* XSUM_XXH3_withSecret_testdata[1245] */\n    { 1246, 0x0000000000000000ULL, 0x2A29AC53000E997FULL }, /* XSUM_XXH3_withSecret_testdata[1246] */\n    { 1247, 0x0000000000000000ULL, 0xAE58D698404A2776ULL }, /* XSUM_XXH3_withSecret_testdata[1247] */\n    { 1248, 0x0000000000000000ULL, 0xA53C9031684A836CULL }, /* XSUM_XXH3_withSecret_testdata[1248] */\n    { 1249, 0x0000000000000000ULL, 0x6F3ABC5DCDD19D53ULL }, /* XSUM_XXH3_withSecret_testdata[1249] */\n    { 1250, 0x0000000000000000ULL, 0x75AD1818E82EC2FEULL }, /* XSUM_XXH3_withSecret_testdata[1250] */\n    { 1251, 0x0000000000000000ULL, 0x2C17F682AFC67F69ULL }, /* XSUM_XXH3_withSecret_testdata[1251] */\n    { 1252, 0x0000000000000000ULL, 0x8815882995B4B2B5ULL }, /* XSUM_XXH3_withSecret_testdata[1252] */\n    { 1253, 0x0000000000000000ULL, 0x24E082C698E1F0C5ULL }, /* XSUM_XXH3_withSecret_testdata[1253] */\n    { 1254, 0x0000000000000000ULL, 0xEDDE9C789512BA59ULL }, /* XSUM_XXH3_withSecret_testdata[1254] */\n    { 1255, 0x0000000000000000ULL, 0x189407CBCC7DA351ULL }, /* XSUM_XXH3_withSecret_testdata[1255] */\n    { 1256, 0x0000000000000000ULL, 0xA6B6B78A5B3BEDDAULL }, /* XSUM_XXH3_withSecret_testdata[1256] */\n    { 1257, 0x0000000000000000ULL, 0xB8748DD6087FD1B7ULL }, /* XSUM_XXH3_withSecret_testdata[1257] */\n    { 1258, 0x0000000000000000ULL, 0x30FF824085C7AC1FULL }, /* XSUM_XXH3_withSecret_testdata[1258] */\n    { 1259, 0x0000000000000000ULL, 0x01208E35DCBC5342ULL }, /* XSUM_XXH3_withSecret_testdata[1259] */\n    { 1260, 0x0000000000000000ULL, 0xBE93C8449B0F4D28ULL }, /* XSUM_XXH3_withSecret_testdata[1260] */\n    { 1261, 0x0000000000000000ULL, 0x2E61B5BB8D7312E2ULL }, /* XSUM_XXH3_withSecret_testdata[1261] */\n    { 1262, 0x0000000000000000ULL, 0x9005CF7F4A946D0DULL }, /* XSUM_XXH3_withSecret_testdata[1262] */\n    { 1263, 0x0000000000000000ULL, 0xFCB02DBE12CDCECDULL }, /* XSUM_XXH3_withSecret_testdata[1263] */\n    { 1264, 0x0000000000000000ULL, 0x77115021CC4B7E79ULL }, /* XSUM_XXH3_withSecret_testdata[1264] */\n    { 1265, 0x0000000000000000ULL, 0x45B53F7C10D68DF3ULL }, /* XSUM_XXH3_withSecret_testdata[1265] */\n    { 1266, 0x0000000000000000ULL, 0xEE9685A40F3894A5ULL }, /* XSUM_XXH3_withSecret_testdata[1266] */\n    { 1267, 0x0000000000000000ULL, 0x9ABF6ADB0E588970ULL }, /* XSUM_XXH3_withSecret_testdata[1267] */\n    { 1268, 0x0000000000000000ULL, 0x50A2DD1114B3A393ULL }, /* XSUM_XXH3_withSecret_testdata[1268] */\n    { 1269, 0x0000000000000000ULL, 0xFEEAA9C0D309D11DULL }, /* XSUM_XXH3_withSecret_testdata[1269] */\n    { 1270, 0x0000000000000000ULL, 0xDD86053FB8F3C843ULL }, /* XSUM_XXH3_withSecret_testdata[1270] */\n    { 1271, 0x0000000000000000ULL, 0xF607C259AD6046D2ULL }, /* XSUM_XXH3_withSecret_testdata[1271] */\n    { 1272, 0x0000000000000000ULL, 0x2308CEB57312D420ULL }, /* XSUM_XXH3_withSecret_testdata[1272] */\n    { 1273, 0x0000000000000000ULL, 0x42121BF4F0804A49ULL }, /* XSUM_XXH3_withSecret_testdata[1273] */\n    { 1274, 0x0000000000000000ULL, 0x788CC0A18468029BULL }, /* XSUM_XXH3_withSecret_testdata[1274] */\n    { 1275, 0x0000000000000000ULL, 0x6508C03B3657F8D4ULL }, /* XSUM_XXH3_withSecret_testdata[1275] */\n    { 1276, 0x0000000000000000ULL, 0x6C461606A62F6A67ULL }, /* XSUM_XXH3_withSecret_testdata[1276] */\n    { 1277, 0x0000000000000000ULL, 0x39282AFC7B3CDB3AULL }, /* XSUM_XXH3_withSecret_testdata[1277] */\n    { 1278, 0x0000000000000000ULL, 0x74076DD2F86447F5ULL }, /* XSUM_XXH3_withSecret_testdata[1278] */\n    { 1279, 0x0000000000000000ULL, 0xA8D717918A5784B2ULL }, /* XSUM_XXH3_withSecret_testdata[1279] */\n    { 1280, 0x0000000000000000ULL, 0x435F9EB1675EA225ULL }, /* XSUM_XXH3_withSecret_testdata[1280] */\n    { 1281, 0x0000000000000000ULL, 0xDC2DB93C9AE6807FULL }, /* XSUM_XXH3_withSecret_testdata[1281] */\n    { 1282, 0x0000000000000000ULL, 0xA1E2C0F65BE822C9ULL }, /* XSUM_XXH3_withSecret_testdata[1282] */\n    { 1283, 0x0000000000000000ULL, 0x1D95E563E3A8C9C3ULL }, /* XSUM_XXH3_withSecret_testdata[1283] */\n    { 1284, 0x0000000000000000ULL, 0xEBBB6C45226CA339ULL }, /* XSUM_XXH3_withSecret_testdata[1284] */\n    { 1285, 0x0000000000000000ULL, 0xC8C526B210C30578ULL }, /* XSUM_XXH3_withSecret_testdata[1285] */\n    { 1286, 0x0000000000000000ULL, 0x1630BC64A5B3F61AULL }, /* XSUM_XXH3_withSecret_testdata[1286] */\n    { 1287, 0x0000000000000000ULL, 0xDF062B18695B0AD8ULL }, /* XSUM_XXH3_withSecret_testdata[1287] */\n    { 1288, 0x0000000000000000ULL, 0x56698F4C67AE3002ULL }, /* XSUM_XXH3_withSecret_testdata[1288] */\n    { 1289, 0x0000000000000000ULL, 0xF4DCA376472FAE9DULL }, /* XSUM_XXH3_withSecret_testdata[1289] */\n    { 1290, 0x0000000000000000ULL, 0x2C4EEB0F1A3F2B74ULL }, /* XSUM_XXH3_withSecret_testdata[1290] */\n    { 1291, 0x0000000000000000ULL, 0x4F913E6E14087E32ULL }, /* XSUM_XXH3_withSecret_testdata[1291] */\n    { 1292, 0x0000000000000000ULL, 0x8E28F817714CCF9EULL }, /* XSUM_XXH3_withSecret_testdata[1292] */\n    { 1293, 0x0000000000000000ULL, 0x53A628FCC781B8C6ULL }, /* XSUM_XXH3_withSecret_testdata[1293] */\n    { 1294, 0x0000000000000000ULL, 0x20BDAB7E198554A1ULL }, /* XSUM_XXH3_withSecret_testdata[1294] */\n    { 1295, 0x0000000000000000ULL, 0x650BDEE530735691ULL }, /* XSUM_XXH3_withSecret_testdata[1295] */\n    { 1296, 0x0000000000000000ULL, 0x916FE213BA38F63FULL }, /* XSUM_XXH3_withSecret_testdata[1296] */\n    { 1297, 0x0000000000000000ULL, 0x1FC7BAB7BBB5FAF4ULL }, /* XSUM_XXH3_withSecret_testdata[1297] */\n    { 1298, 0x0000000000000000ULL, 0x8933CB240512BC03ULL }, /* XSUM_XXH3_withSecret_testdata[1298] */\n    { 1299, 0x0000000000000000ULL, 0xAA19796DAE123B34ULL }, /* XSUM_XXH3_withSecret_testdata[1299] */\n    { 1300, 0x0000000000000000ULL, 0xDEE64FF495E05965ULL }, /* XSUM_XXH3_withSecret_testdata[1300] */\n    { 1301, 0x0000000000000000ULL, 0x2E510FDCA174B8FFULL }, /* XSUM_XXH3_withSecret_testdata[1301] */\n    { 1302, 0x0000000000000000ULL, 0x08B033AE042B7134ULL }, /* XSUM_XXH3_withSecret_testdata[1302] */\n    { 1303, 0x0000000000000000ULL, 0x37B175392C8B7634ULL }, /* XSUM_XXH3_withSecret_testdata[1303] */\n    { 1304, 0x0000000000000000ULL, 0x0056F1F63D1624C1ULL }, /* XSUM_XXH3_withSecret_testdata[1304] */\n    { 1305, 0x0000000000000000ULL, 0x409073AF7B9FC7A8ULL }, /* XSUM_XXH3_withSecret_testdata[1305] */\n    { 1306, 0x0000000000000000ULL, 0x5106BD992B25FB60ULL }, /* XSUM_XXH3_withSecret_testdata[1306] */\n    { 1307, 0x0000000000000000ULL, 0x6EB2815B2767DDA2ULL }, /* XSUM_XXH3_withSecret_testdata[1307] */\n    { 1308, 0x0000000000000000ULL, 0xF92809041F943667ULL }, /* XSUM_XXH3_withSecret_testdata[1308] */\n    { 1309, 0x0000000000000000ULL, 0x2E9E667E6997DC6AULL }, /* XSUM_XXH3_withSecret_testdata[1309] */\n    { 1310, 0x0000000000000000ULL, 0xFA3298E8C2101F66ULL }, /* XSUM_XXH3_withSecret_testdata[1310] */\n    { 1311, 0x0000000000000000ULL, 0x367FB94648BD8EC4ULL }, /* XSUM_XXH3_withSecret_testdata[1311] */\n    { 1312, 0x0000000000000000ULL, 0xE295652DC945F248ULL }, /* XSUM_XXH3_withSecret_testdata[1312] */\n    { 1313, 0x0000000000000000ULL, 0x1497264F4AEE877BULL }, /* XSUM_XXH3_withSecret_testdata[1313] */\n    { 1314, 0x0000000000000000ULL, 0x097EA52B2F2CEC0FULL }, /* XSUM_XXH3_withSecret_testdata[1314] */\n    { 1315, 0x0000000000000000ULL, 0x7494E3D589BD925DULL }, /* XSUM_XXH3_withSecret_testdata[1315] */\n    { 1316, 0x0000000000000000ULL, 0x1BE7F1FAC69F2A96ULL }, /* XSUM_XXH3_withSecret_testdata[1316] */\n    { 1317, 0x0000000000000000ULL, 0x2D32EB078EB76499ULL }, /* XSUM_XXH3_withSecret_testdata[1317] */\n    { 1318, 0x0000000000000000ULL, 0x061AA905761C05FCULL }, /* XSUM_XXH3_withSecret_testdata[1318] */\n    { 1319, 0x0000000000000000ULL, 0x95574AF3902C9275ULL }, /* XSUM_XXH3_withSecret_testdata[1319] */\n    { 1320, 0x0000000000000000ULL, 0xE412CFFC01B99338ULL }, /* XSUM_XXH3_withSecret_testdata[1320] */\n    { 1321, 0x0000000000000000ULL, 0x9CB3BB605A83A497ULL }, /* XSUM_XXH3_withSecret_testdata[1321] */\n    { 1322, 0x0000000000000000ULL, 0x5FA866FF5B5E26E2ULL }, /* XSUM_XXH3_withSecret_testdata[1322] */\n    { 1323, 0x0000000000000000ULL, 0xC9EB8EBA6300B7B9ULL }, /* XSUM_XXH3_withSecret_testdata[1323] */\n    { 1324, 0x0000000000000000ULL, 0x4366ECBC2241CDCBULL }, /* XSUM_XXH3_withSecret_testdata[1324] */\n    { 1325, 0x0000000000000000ULL, 0xE81FE26D39C60C1AULL }, /* XSUM_XXH3_withSecret_testdata[1325] */\n    { 1326, 0x0000000000000000ULL, 0xA9FAC797AF26E3A3ULL }, /* XSUM_XXH3_withSecret_testdata[1326] */\n    { 1327, 0x0000000000000000ULL, 0xC73722D6E30D0314ULL }, /* XSUM_XXH3_withSecret_testdata[1327] */\n    { 1328, 0x0000000000000000ULL, 0x87D861475092E84EULL }, /* XSUM_XXH3_withSecret_testdata[1328] */\n    { 1329, 0x0000000000000000ULL, 0x7BD90034C6CA14E8ULL }, /* XSUM_XXH3_withSecret_testdata[1329] */\n    { 1330, 0x0000000000000000ULL, 0x11E710FAF368141DULL }, /* XSUM_XXH3_withSecret_testdata[1330] */\n    { 1331, 0x0000000000000000ULL, 0xB0D71F9C170851B9ULL }, /* XSUM_XXH3_withSecret_testdata[1331] */\n    { 1332, 0x0000000000000000ULL, 0x8E3E730800AD0365ULL }, /* XSUM_XXH3_withSecret_testdata[1332] */\n    { 1333, 0x0000000000000000ULL, 0x7EBF5F93F98E698DULL }, /* XSUM_XXH3_withSecret_testdata[1333] */\n    { 1334, 0x0000000000000000ULL, 0x9126271F39408106ULL }, /* XSUM_XXH3_withSecret_testdata[1334] */\n    { 1335, 0x0000000000000000ULL, 0xCD219896FED405EEULL }, /* XSUM_XXH3_withSecret_testdata[1335] */\n    { 1336, 0x0000000000000000ULL, 0x68B7D403FA534589ULL }, /* XSUM_XXH3_withSecret_testdata[1336] */\n    { 1337, 0x0000000000000000ULL, 0x4FB3E1315E622702ULL }, /* XSUM_XXH3_withSecret_testdata[1337] */\n    { 1338, 0x0000000000000000ULL, 0xC5DC08DF8C7EE533ULL }, /* XSUM_XXH3_withSecret_testdata[1338] */\n    { 1339, 0x0000000000000000ULL, 0x68E975F07090E13CULL }, /* XSUM_XXH3_withSecret_testdata[1339] */\n    { 1340, 0x0000000000000000ULL, 0x7C053AD6AE67606FULL }, /* XSUM_XXH3_withSecret_testdata[1340] */\n    { 1341, 0x0000000000000000ULL, 0xB9956077392BDDF9ULL }, /* XSUM_XXH3_withSecret_testdata[1341] */\n    { 1342, 0x0000000000000000ULL, 0xC86247A8DB10780DULL }, /* XSUM_XXH3_withSecret_testdata[1342] */\n    { 1343, 0x0000000000000000ULL, 0xB8287244C41F84CAULL }, /* XSUM_XXH3_withSecret_testdata[1343] */\n    { 1344, 0x0000000000000000ULL, 0xA4D4CD1EB538AAF2ULL }, /* XSUM_XXH3_withSecret_testdata[1344] */\n    { 1345, 0x0000000000000000ULL, 0x0B0ED86D8A98669CULL }, /* XSUM_XXH3_withSecret_testdata[1345] */\n    { 1346, 0x0000000000000000ULL, 0x4B045826F76D5C9BULL }, /* XSUM_XXH3_withSecret_testdata[1346] */\n    { 1347, 0x0000000000000000ULL, 0x0F352D87BD2D2A5EULL }, /* XSUM_XXH3_withSecret_testdata[1347] */\n    { 1348, 0x0000000000000000ULL, 0x0161262E6584CACEULL }, /* XSUM_XXH3_withSecret_testdata[1348] */\n    { 1349, 0x0000000000000000ULL, 0x3FD1CA8714F715BFULL }, /* XSUM_XXH3_withSecret_testdata[1349] */\n    { 1350, 0x0000000000000000ULL, 0x2889F452FF13791CULL }, /* XSUM_XXH3_withSecret_testdata[1350] */\n    { 1351, 0x0000000000000000ULL, 0x6658548D5D914D3EULL }, /* XSUM_XXH3_withSecret_testdata[1351] */\n    { 1352, 0x0000000000000000ULL, 0xCC30345A1184FA4DULL }, /* XSUM_XXH3_withSecret_testdata[1352] */\n    { 1353, 0x0000000000000000ULL, 0x32C9DB4DD75C3465ULL }, /* XSUM_XXH3_withSecret_testdata[1353] */\n    { 1354, 0x0000000000000000ULL, 0xA3314658723A788EULL }, /* XSUM_XXH3_withSecret_testdata[1354] */\n    { 1355, 0x0000000000000000ULL, 0x55E1274E9CBC37AFULL }, /* XSUM_XXH3_withSecret_testdata[1355] */\n    { 1356, 0x0000000000000000ULL, 0xDEEF4DC4B394BEDBULL }, /* XSUM_XXH3_withSecret_testdata[1356] */\n    { 1357, 0x0000000000000000ULL, 0x313BC7A45BED6865ULL }, /* XSUM_XXH3_withSecret_testdata[1357] */\n    { 1358, 0x0000000000000000ULL, 0x57297121D1B7D1E0ULL }, /* XSUM_XXH3_withSecret_testdata[1358] */\n    { 1359, 0x0000000000000000ULL, 0x913742F691445D60ULL }, /* XSUM_XXH3_withSecret_testdata[1359] */\n    { 1360, 0x0000000000000000ULL, 0x489983AE80D732ECULL }, /* XSUM_XXH3_withSecret_testdata[1360] */\n    { 1361, 0x0000000000000000ULL, 0x7213A1A7FD59E105ULL }, /* XSUM_XXH3_withSecret_testdata[1361] */\n    { 1362, 0x0000000000000000ULL, 0x2DD2971B61A24DDEULL }, /* XSUM_XXH3_withSecret_testdata[1362] */\n    { 1363, 0x0000000000000000ULL, 0x8CFC1ED61F2AFA6DULL }, /* XSUM_XXH3_withSecret_testdata[1363] */\n    { 1364, 0x0000000000000000ULL, 0x9A669204AD01AE3CULL }, /* XSUM_XXH3_withSecret_testdata[1364] */\n    { 1365, 0x0000000000000000ULL, 0xB43133C814D37F9BULL }, /* XSUM_XXH3_withSecret_testdata[1365] */\n    { 1366, 0x0000000000000000ULL, 0xF0607F89A0028E13ULL }, /* XSUM_XXH3_withSecret_testdata[1366] */\n    { 1367, 0x0000000000000000ULL, 0x02F95A6892D5FDF5ULL }, /* XSUM_XXH3_withSecret_testdata[1367] */\n    { 1368, 0x0000000000000000ULL, 0x1FC4256EDE0F7D5CULL }, /* XSUM_XXH3_withSecret_testdata[1368] */\n    { 1369, 0x0000000000000000ULL, 0x02348B5D138A22CDULL }, /* XSUM_XXH3_withSecret_testdata[1369] */\n    { 1370, 0x0000000000000000ULL, 0x769EB83BD8470425ULL }, /* XSUM_XXH3_withSecret_testdata[1370] */\n    { 1371, 0x0000000000000000ULL, 0x8E1F11C7BC124DCBULL }, /* XSUM_XXH3_withSecret_testdata[1371] */\n    { 1372, 0x0000000000000000ULL, 0xC7EEDADD53CD2C1FULL }, /* XSUM_XXH3_withSecret_testdata[1372] */\n    { 1373, 0x0000000000000000ULL, 0x7EE46BBE70E984F7ULL }, /* XSUM_XXH3_withSecret_testdata[1373] */\n    { 1374, 0x0000000000000000ULL, 0xF0CDEEEA3466E488ULL }, /* XSUM_XXH3_withSecret_testdata[1374] */\n    { 1375, 0x0000000000000000ULL, 0xD459006BAE6290B1ULL }, /* XSUM_XXH3_withSecret_testdata[1375] */\n    { 1376, 0x0000000000000000ULL, 0x14E4991605F37CD7ULL }, /* XSUM_XXH3_withSecret_testdata[1376] */\n    { 1377, 0x0000000000000000ULL, 0x4E6B79C2847AA59BULL }, /* XSUM_XXH3_withSecret_testdata[1377] */\n    { 1378, 0x0000000000000000ULL, 0xD6461CA4956C3204ULL }, /* XSUM_XXH3_withSecret_testdata[1378] */\n    { 1379, 0x0000000000000000ULL, 0xDDBA221F4BF6C519ULL }, /* XSUM_XXH3_withSecret_testdata[1379] */\n    { 1380, 0x0000000000000000ULL, 0x0B2230A1B569AA9BULL }, /* XSUM_XXH3_withSecret_testdata[1380] */\n    { 1381, 0x0000000000000000ULL, 0x25EF2299E0CBC6CAULL }, /* XSUM_XXH3_withSecret_testdata[1381] */\n    { 1382, 0x0000000000000000ULL, 0xC4B36FCBFA31C554ULL }, /* XSUM_XXH3_withSecret_testdata[1382] */\n    { 1383, 0x0000000000000000ULL, 0xD6D7671AF406DA16ULL }, /* XSUM_XXH3_withSecret_testdata[1383] */\n    { 1384, 0x0000000000000000ULL, 0x5BAE5DC9E6E5F381ULL }, /* XSUM_XXH3_withSecret_testdata[1384] */\n    { 1385, 0x0000000000000000ULL, 0x17DE1CA5FB745BFBULL }, /* XSUM_XXH3_withSecret_testdata[1385] */\n    { 1386, 0x0000000000000000ULL, 0xA1237AD4519070F8ULL }, /* XSUM_XXH3_withSecret_testdata[1386] */\n    { 1387, 0x0000000000000000ULL, 0xCCC5A02338D61784ULL }, /* XSUM_XXH3_withSecret_testdata[1387] */\n    { 1388, 0x0000000000000000ULL, 0x98E931D2B81745CEULL }, /* XSUM_XXH3_withSecret_testdata[1388] */\n    { 1389, 0x0000000000000000ULL, 0xAA114F0C757036E3ULL }, /* XSUM_XXH3_withSecret_testdata[1389] */\n    { 1390, 0x0000000000000000ULL, 0xAAB5D2F62EF80779ULL }, /* XSUM_XXH3_withSecret_testdata[1390] */\n    { 1391, 0x0000000000000000ULL, 0x63C03FFD8A52E4B2ULL }, /* XSUM_XXH3_withSecret_testdata[1391] */\n    { 1392, 0x0000000000000000ULL, 0x528D9C34036F69F3ULL }, /* XSUM_XXH3_withSecret_testdata[1392] */\n    { 1393, 0x0000000000000000ULL, 0x420ED6C9BAF1BD6CULL }, /* XSUM_XXH3_withSecret_testdata[1393] */\n    { 1394, 0x0000000000000000ULL, 0x9858FCBFF7AD61C7ULL }, /* XSUM_XXH3_withSecret_testdata[1394] */\n    { 1395, 0x0000000000000000ULL, 0x078D2E1BAEAC8ED3ULL }, /* XSUM_XXH3_withSecret_testdata[1395] */\n    { 1396, 0x0000000000000000ULL, 0x76CDEEB41FB0C12AULL }, /* XSUM_XXH3_withSecret_testdata[1396] */\n    { 1397, 0x0000000000000000ULL, 0xEACEEF02615156F9ULL }, /* XSUM_XXH3_withSecret_testdata[1397] */\n    { 1398, 0x0000000000000000ULL, 0xB8D39A816267F1DDULL }, /* XSUM_XXH3_withSecret_testdata[1398] */\n    { 1399, 0x0000000000000000ULL, 0x5994BF3CE38FB2E1ULL }, /* XSUM_XXH3_withSecret_testdata[1399] */\n    { 1400, 0x0000000000000000ULL, 0x6D91347F36D08F36ULL }, /* XSUM_XXH3_withSecret_testdata[1400] */\n    { 1401, 0x0000000000000000ULL, 0x1DE7C00E0969BDBEULL }, /* XSUM_XXH3_withSecret_testdata[1401] */\n    { 1402, 0x0000000000000000ULL, 0x583C26C46085BE1AULL }, /* XSUM_XXH3_withSecret_testdata[1402] */\n    { 1403, 0x0000000000000000ULL, 0xBEEC35ADCB348DAFULL }, /* XSUM_XXH3_withSecret_testdata[1403] */\n    { 1404, 0x0000000000000000ULL, 0xAFBD331DC6E4386EULL }, /* XSUM_XXH3_withSecret_testdata[1404] */\n    { 1405, 0x0000000000000000ULL, 0x9559937A90665EE5ULL }, /* XSUM_XXH3_withSecret_testdata[1405] */\n    { 1406, 0x0000000000000000ULL, 0x40116694DD7AAA11ULL }, /* XSUM_XXH3_withSecret_testdata[1406] */\n    { 1407, 0x0000000000000000ULL, 0xB82A445942E93521ULL }, /* XSUM_XXH3_withSecret_testdata[1407] */\n    { 1408, 0x0000000000000000ULL, 0x02C47388A3111151ULL }, /* XSUM_XXH3_withSecret_testdata[1408] */\n    { 1409, 0x0000000000000000ULL, 0xB8AA13002E7B2AD5ULL }, /* XSUM_XXH3_withSecret_testdata[1409] */\n    { 1410, 0x0000000000000000ULL, 0x25B30179D77075A2ULL }, /* XSUM_XXH3_withSecret_testdata[1410] */\n    { 1411, 0x0000000000000000ULL, 0x970C7B6FDB288922ULL }, /* XSUM_XXH3_withSecret_testdata[1411] */\n    { 1412, 0x0000000000000000ULL, 0xC4306C0F33D4E63BULL }, /* XSUM_XXH3_withSecret_testdata[1412] */\n    { 1413, 0x0000000000000000ULL, 0xF3E192D4034202A2ULL }, /* XSUM_XXH3_withSecret_testdata[1413] */\n    { 1414, 0x0000000000000000ULL, 0xE5E6820E28353565ULL }, /* XSUM_XXH3_withSecret_testdata[1414] */\n    { 1415, 0x0000000000000000ULL, 0x45F2455297796FB1ULL }, /* XSUM_XXH3_withSecret_testdata[1415] */\n    { 1416, 0x0000000000000000ULL, 0xBB08A3CD1068D556ULL }, /* XSUM_XXH3_withSecret_testdata[1416] */\n    { 1417, 0x0000000000000000ULL, 0x8A3267871B458F55ULL }, /* XSUM_XXH3_withSecret_testdata[1417] */\n    { 1418, 0x0000000000000000ULL, 0x1638764CF805F94FULL }, /* XSUM_XXH3_withSecret_testdata[1418] */\n    { 1419, 0x0000000000000000ULL, 0x34496200B255B27FULL }, /* XSUM_XXH3_withSecret_testdata[1419] */\n    { 1420, 0x0000000000000000ULL, 0xDD4BC2E2F82B1C2EULL }, /* XSUM_XXH3_withSecret_testdata[1420] */\n    { 1421, 0x0000000000000000ULL, 0xEB1A9397DFCFFD59ULL }, /* XSUM_XXH3_withSecret_testdata[1421] */\n    { 1422, 0x0000000000000000ULL, 0x1CB9BBFC1E6A953AULL }, /* XSUM_XXH3_withSecret_testdata[1422] */\n    { 1423, 0x0000000000000000ULL, 0x94D77548A18A149DULL }, /* XSUM_XXH3_withSecret_testdata[1423] */\n    { 1424, 0x0000000000000000ULL, 0x5B642D3E95D6C3FBULL }, /* XSUM_XXH3_withSecret_testdata[1424] */\n    { 1425, 0x0000000000000000ULL, 0x732EE523654D619DULL }, /* XSUM_XXH3_withSecret_testdata[1425] */\n    { 1426, 0x0000000000000000ULL, 0x08EE73C403588B89ULL }, /* XSUM_XXH3_withSecret_testdata[1426] */\n    { 1427, 0x0000000000000000ULL, 0xBC2120E7C3C28258ULL }, /* XSUM_XXH3_withSecret_testdata[1427] */\n    { 1428, 0x0000000000000000ULL, 0x323B99D646505E1BULL }, /* XSUM_XXH3_withSecret_testdata[1428] */\n    { 1429, 0x0000000000000000ULL, 0x04BB11F406DB02A5ULL }, /* XSUM_XXH3_withSecret_testdata[1429] */\n    { 1430, 0x0000000000000000ULL, 0x2CDAEB0037371D72ULL }, /* XSUM_XXH3_withSecret_testdata[1430] */\n    { 1431, 0x0000000000000000ULL, 0xDFE286A81E9CB8ADULL }, /* XSUM_XXH3_withSecret_testdata[1431] */\n    { 1432, 0x0000000000000000ULL, 0xFEB49ACC6A4BC21BULL }, /* XSUM_XXH3_withSecret_testdata[1432] */\n    { 1433, 0x0000000000000000ULL, 0xDA1B59366DDA2736ULL }, /* XSUM_XXH3_withSecret_testdata[1433] */\n    { 1434, 0x0000000000000000ULL, 0xB32AF872B9AD7B6FULL }, /* XSUM_XXH3_withSecret_testdata[1434] */\n    { 1435, 0x0000000000000000ULL, 0x941E87EB0AA89CE0ULL }, /* XSUM_XXH3_withSecret_testdata[1435] */\n    { 1436, 0x0000000000000000ULL, 0x4266A95A8D49739CULL }, /* XSUM_XXH3_withSecret_testdata[1436] */\n    { 1437, 0x0000000000000000ULL, 0xD2C604962750D4F5ULL }, /* XSUM_XXH3_withSecret_testdata[1437] */\n    { 1438, 0x0000000000000000ULL, 0xAD664A49281622EAULL }, /* XSUM_XXH3_withSecret_testdata[1438] */\n    { 1439, 0x0000000000000000ULL, 0x550E77E8A0DF4278ULL }, /* XSUM_XXH3_withSecret_testdata[1439] */\n    { 1440, 0x0000000000000000ULL, 0x84DCC5BCBBD6BFE1ULL }, /* XSUM_XXH3_withSecret_testdata[1440] */\n    { 1441, 0x0000000000000000ULL, 0xF171A82750101FB4ULL }, /* XSUM_XXH3_withSecret_testdata[1441] */\n    { 1442, 0x0000000000000000ULL, 0x7EE49B0C3C0A4AECULL }, /* XSUM_XXH3_withSecret_testdata[1442] */\n    { 1443, 0x0000000000000000ULL, 0x06B1CAF38CCFFA57ULL }, /* XSUM_XXH3_withSecret_testdata[1443] */\n    { 1444, 0x0000000000000000ULL, 0x6D26181748CC55FBULL }, /* XSUM_XXH3_withSecret_testdata[1444] */\n    { 1445, 0x0000000000000000ULL, 0x3AEA776E1F1770BFULL }, /* XSUM_XXH3_withSecret_testdata[1445] */\n    { 1446, 0x0000000000000000ULL, 0x755AB27728FCF4EFULL }, /* XSUM_XXH3_withSecret_testdata[1446] */\n    { 1447, 0x0000000000000000ULL, 0x1CA7EA1B4B7398F9ULL }, /* XSUM_XXH3_withSecret_testdata[1447] */\n    { 1448, 0x0000000000000000ULL, 0x02448134164C4068ULL }, /* XSUM_XXH3_withSecret_testdata[1448] */\n    { 1449, 0x0000000000000000ULL, 0xFD5B9CF13FE58C85ULL }, /* XSUM_XXH3_withSecret_testdata[1449] */\n    { 1450, 0x0000000000000000ULL, 0x9801D4DDCD3513BEULL }, /* XSUM_XXH3_withSecret_testdata[1450] */\n    { 1451, 0x0000000000000000ULL, 0x651340C38D9A1EEAULL }, /* XSUM_XXH3_withSecret_testdata[1451] */\n    { 1452, 0x0000000000000000ULL, 0x77EBF1883BBAC649ULL }, /* XSUM_XXH3_withSecret_testdata[1452] */\n    { 1453, 0x0000000000000000ULL, 0x4A3A724827460C8FULL }, /* XSUM_XXH3_withSecret_testdata[1453] */\n    { 1454, 0x0000000000000000ULL, 0x93AD20742E286C96ULL }, /* XSUM_XXH3_withSecret_testdata[1454] */\n    { 1455, 0x0000000000000000ULL, 0x4638CA4E88FE3480ULL }, /* XSUM_XXH3_withSecret_testdata[1455] */\n    { 1456, 0x0000000000000000ULL, 0xD363EE4842B69F4DULL }, /* XSUM_XXH3_withSecret_testdata[1456] */\n    { 1457, 0x0000000000000000ULL, 0x43E03B2471EAE066ULL }, /* XSUM_XXH3_withSecret_testdata[1457] */\n    { 1458, 0x0000000000000000ULL, 0x18E733421644F2EBULL }, /* XSUM_XXH3_withSecret_testdata[1458] */\n    { 1459, 0x0000000000000000ULL, 0x2BF5663715849BC0ULL }, /* XSUM_XXH3_withSecret_testdata[1459] */\n    { 1460, 0x0000000000000000ULL, 0x75C50907EFEF26EAULL }, /* XSUM_XXH3_withSecret_testdata[1460] */\n    { 1461, 0x0000000000000000ULL, 0xFEE3B16CDD0D7476ULL }, /* XSUM_XXH3_withSecret_testdata[1461] */\n    { 1462, 0x0000000000000000ULL, 0x962B8A19330A46F7ULL }, /* XSUM_XXH3_withSecret_testdata[1462] */\n    { 1463, 0x0000000000000000ULL, 0x6D87ECF619EDACA6ULL }, /* XSUM_XXH3_withSecret_testdata[1463] */\n    { 1464, 0x0000000000000000ULL, 0x602E6D6A3853CA99ULL }, /* XSUM_XXH3_withSecret_testdata[1464] */\n    { 1465, 0x0000000000000000ULL, 0x639C9DD50F215D37ULL }, /* XSUM_XXH3_withSecret_testdata[1465] */\n    { 1466, 0x0000000000000000ULL, 0xF81F9A2366D05732ULL }, /* XSUM_XXH3_withSecret_testdata[1466] */\n    { 1467, 0x0000000000000000ULL, 0x921B8FC56EFF4938ULL }, /* XSUM_XXH3_withSecret_testdata[1467] */\n    { 1468, 0x0000000000000000ULL, 0xF17BDFB887F43B8BULL }, /* XSUM_XXH3_withSecret_testdata[1468] */\n    { 1469, 0x0000000000000000ULL, 0x58795B2755E3C94BULL }, /* XSUM_XXH3_withSecret_testdata[1469] */\n    { 1470, 0x0000000000000000ULL, 0xE396B152BDEFE195ULL }, /* XSUM_XXH3_withSecret_testdata[1470] */\n    { 1471, 0x0000000000000000ULL, 0x842AB048580B7330ULL }, /* XSUM_XXH3_withSecret_testdata[1471] */\n    { 1472, 0x0000000000000000ULL, 0x156DEF4CAB5718C6ULL }, /* XSUM_XXH3_withSecret_testdata[1472] */\n    { 1473, 0x0000000000000000ULL, 0xF6CD1ECC31D2665FULL }, /* XSUM_XXH3_withSecret_testdata[1473] */\n    { 1474, 0x0000000000000000ULL, 0x0E2E2A87645BEA7FULL }, /* XSUM_XXH3_withSecret_testdata[1474] */\n    { 1475, 0x0000000000000000ULL, 0x10FC1D4A3AAFB892ULL }, /* XSUM_XXH3_withSecret_testdata[1475] */\n    { 1476, 0x0000000000000000ULL, 0x326FB3992B7C6656ULL }, /* XSUM_XXH3_withSecret_testdata[1476] */\n    { 1477, 0x0000000000000000ULL, 0x720055F94021470BULL }, /* XSUM_XXH3_withSecret_testdata[1477] */\n    { 1478, 0x0000000000000000ULL, 0x2C27EC8E23D4A26FULL }, /* XSUM_XXH3_withSecret_testdata[1478] */\n    { 1479, 0x0000000000000000ULL, 0x7C86FBA1CE126A67ULL }, /* XSUM_XXH3_withSecret_testdata[1479] */\n    { 1480, 0x0000000000000000ULL, 0xA2E3DD5CDB96E9B8ULL }, /* XSUM_XXH3_withSecret_testdata[1480] */\n    { 1481, 0x0000000000000000ULL, 0x9B6E8326AF521732ULL }, /* XSUM_XXH3_withSecret_testdata[1481] */\n    { 1482, 0x0000000000000000ULL, 0x0DD26DC26C67C870ULL }, /* XSUM_XXH3_withSecret_testdata[1482] */\n    { 1483, 0x0000000000000000ULL, 0xDF2EAD57662B2119ULL }, /* XSUM_XXH3_withSecret_testdata[1483] */\n    { 1484, 0x0000000000000000ULL, 0xF4F828C9432372F1ULL }, /* XSUM_XXH3_withSecret_testdata[1484] */\n    { 1485, 0x0000000000000000ULL, 0x2F87F791C7EEC150ULL }, /* XSUM_XXH3_withSecret_testdata[1485] */\n    { 1486, 0x0000000000000000ULL, 0xB8D09106EA4AF4EAULL }, /* XSUM_XXH3_withSecret_testdata[1486] */\n    { 1487, 0x0000000000000000ULL, 0x254E4EBABB62AB6AULL }, /* XSUM_XXH3_withSecret_testdata[1487] */\n    { 1488, 0x0000000000000000ULL, 0xA66C49C2052C3C32ULL }, /* XSUM_XXH3_withSecret_testdata[1488] */\n    { 1489, 0x0000000000000000ULL, 0x4BD128B01C399EA6ULL }, /* XSUM_XXH3_withSecret_testdata[1489] */\n    { 1490, 0x0000000000000000ULL, 0x41B5366204D791CBULL }, /* XSUM_XXH3_withSecret_testdata[1490] */\n    { 1491, 0x0000000000000000ULL, 0x5518478FD7F6D78FULL }, /* XSUM_XXH3_withSecret_testdata[1491] */\n    { 1492, 0x0000000000000000ULL, 0x144E7A95EE920229ULL }, /* XSUM_XXH3_withSecret_testdata[1492] */\n    { 1493, 0x0000000000000000ULL, 0x97310E5B1F4BCC47ULL }, /* XSUM_XXH3_withSecret_testdata[1493] */\n    { 1494, 0x0000000000000000ULL, 0xD06C471AADFA71BAULL }, /* XSUM_XXH3_withSecret_testdata[1494] */\n    { 1495, 0x0000000000000000ULL, 0x8165BE3BF3C8CB7AULL }, /* XSUM_XXH3_withSecret_testdata[1495] */\n    { 1496, 0x0000000000000000ULL, 0xC0A2AE3FC71C0DC9ULL }, /* XSUM_XXH3_withSecret_testdata[1496] */\n    { 1497, 0x0000000000000000ULL, 0x09795832DB2F7376ULL }, /* XSUM_XXH3_withSecret_testdata[1497] */\n    { 1498, 0x0000000000000000ULL, 0x82CF71C8BBC60BE1ULL }, /* XSUM_XXH3_withSecret_testdata[1498] */\n    { 1499, 0x0000000000000000ULL, 0xBB61264AD362D930ULL }, /* XSUM_XXH3_withSecret_testdata[1499] */\n    { 1500, 0x0000000000000000ULL, 0x3B38381C80B00F79ULL }, /* XSUM_XXH3_withSecret_testdata[1500] */\n    { 1501, 0x0000000000000000ULL, 0x02ED1B074BE91143ULL }, /* XSUM_XXH3_withSecret_testdata[1501] */\n    { 1502, 0x0000000000000000ULL, 0x0492A4AFAC8C52EDULL }, /* XSUM_XXH3_withSecret_testdata[1502] */\n    { 1503, 0x0000000000000000ULL, 0x41707564BEB2A166ULL }, /* XSUM_XXH3_withSecret_testdata[1503] */\n    { 1504, 0x0000000000000000ULL, 0x801B6844619FD6A4ULL }, /* XSUM_XXH3_withSecret_testdata[1504] */\n    { 1505, 0x0000000000000000ULL, 0x38EE44C5E7E6F350ULL }, /* XSUM_XXH3_withSecret_testdata[1505] */\n    { 1506, 0x0000000000000000ULL, 0x491383C0B1871230ULL }, /* XSUM_XXH3_withSecret_testdata[1506] */\n    { 1507, 0x0000000000000000ULL, 0x06DF1E6DB070BD15ULL }, /* XSUM_XXH3_withSecret_testdata[1507] */\n    { 1508, 0x0000000000000000ULL, 0xACC617BF22DAC0CAULL }, /* XSUM_XXH3_withSecret_testdata[1508] */\n    { 1509, 0x0000000000000000ULL, 0x27647763439B3B6FULL }, /* XSUM_XXH3_withSecret_testdata[1509] */\n    { 1510, 0x0000000000000000ULL, 0xFB388226E5E566DDULL }, /* XSUM_XXH3_withSecret_testdata[1510] */\n    { 1511, 0x0000000000000000ULL, 0xCFFAE0EE63D45CEBULL }, /* XSUM_XXH3_withSecret_testdata[1511] */\n    { 1512, 0x0000000000000000ULL, 0x0045C1ADFE33D115ULL }, /* XSUM_XXH3_withSecret_testdata[1512] */\n    { 1513, 0x0000000000000000ULL, 0x2041DE1902485870ULL }, /* XSUM_XXH3_withSecret_testdata[1513] */\n    { 1514, 0x0000000000000000ULL, 0x752ED0BFE64491E4ULL }, /* XSUM_XXH3_withSecret_testdata[1514] */\n    { 1515, 0x0000000000000000ULL, 0xACF6520478022AE3ULL }, /* XSUM_XXH3_withSecret_testdata[1515] */\n    { 1516, 0x0000000000000000ULL, 0xF92176A24CC1AC82ULL }, /* XSUM_XXH3_withSecret_testdata[1516] */\n    { 1517, 0x0000000000000000ULL, 0x972D0074898064AAULL }, /* XSUM_XXH3_withSecret_testdata[1517] */\n    { 1518, 0x0000000000000000ULL, 0x3BF9CDC5E8654E28ULL }, /* XSUM_XXH3_withSecret_testdata[1518] */\n    { 1519, 0x0000000000000000ULL, 0x0424912948892A2DULL }, /* XSUM_XXH3_withSecret_testdata[1519] */\n    { 1520, 0x0000000000000000ULL, 0x0C850FFD4E8D900AULL }, /* XSUM_XXH3_withSecret_testdata[1520] */\n    { 1521, 0x0000000000000000ULL, 0x30A4FB81E01891F6ULL }, /* XSUM_XXH3_withSecret_testdata[1521] */\n    { 1522, 0x0000000000000000ULL, 0xCA6B5F7264AC7212ULL }, /* XSUM_XXH3_withSecret_testdata[1522] */\n    { 1523, 0x0000000000000000ULL, 0x0459F2C51EAE2D8FULL }, /* XSUM_XXH3_withSecret_testdata[1523] */\n    { 1524, 0x0000000000000000ULL, 0x02F3F01168480D1DULL }, /* XSUM_XXH3_withSecret_testdata[1524] */\n    { 1525, 0x0000000000000000ULL, 0x5DA46A20A21BC416ULL }, /* XSUM_XXH3_withSecret_testdata[1525] */\n    { 1526, 0x0000000000000000ULL, 0x8761BB27E289006BULL }, /* XSUM_XXH3_withSecret_testdata[1526] */\n    { 1527, 0x0000000000000000ULL, 0x1FB705B86DFED16EULL }, /* XSUM_XXH3_withSecret_testdata[1527] */\n    { 1528, 0x0000000000000000ULL, 0xD84E37677B1A4025ULL }, /* XSUM_XXH3_withSecret_testdata[1528] */\n    { 1529, 0x0000000000000000ULL, 0x103CF494565CD699ULL }, /* XSUM_XXH3_withSecret_testdata[1529] */\n    { 1530, 0x0000000000000000ULL, 0x64FCC3AC7F95A3B6ULL }, /* XSUM_XXH3_withSecret_testdata[1530] */\n    { 1531, 0x0000000000000000ULL, 0xF3B0049664EC7806ULL }, /* XSUM_XXH3_withSecret_testdata[1531] */\n    { 1532, 0x0000000000000000ULL, 0x7622E26C33FF525CULL }, /* XSUM_XXH3_withSecret_testdata[1532] */\n    { 1533, 0x0000000000000000ULL, 0xF910057B2F72A925ULL }, /* XSUM_XXH3_withSecret_testdata[1533] */\n    { 1534, 0x0000000000000000ULL, 0xD6DE080F1BD67BB6ULL }, /* XSUM_XXH3_withSecret_testdata[1534] */\n    { 1535, 0x0000000000000000ULL, 0x010C1FC496F3D1C0ULL }, /* XSUM_XXH3_withSecret_testdata[1535] */\n    { 1536, 0x0000000000000000ULL, 0x5481CAC709A00547ULL }, /* XSUM_XXH3_withSecret_testdata[1536] */\n    { 1537, 0x0000000000000000ULL, 0x49142C7D411F3ABBULL }, /* XSUM_XXH3_withSecret_testdata[1537] */\n    { 1538, 0x0000000000000000ULL, 0xA87D244DFACBB7F7ULL }, /* XSUM_XXH3_withSecret_testdata[1538] */\n    { 1539, 0x0000000000000000ULL, 0x6E9DD1A63172A284ULL }, /* XSUM_XXH3_withSecret_testdata[1539] */\n    { 1540, 0x0000000000000000ULL, 0xE3E599C92E0E41BAULL }, /* XSUM_XXH3_withSecret_testdata[1540] */\n    { 1541, 0x0000000000000000ULL, 0xDDD5A3042B4832ABULL }, /* XSUM_XXH3_withSecret_testdata[1541] */\n    { 1542, 0x0000000000000000ULL, 0xADE9103FEED62C59ULL }, /* XSUM_XXH3_withSecret_testdata[1542] */\n    { 1543, 0x0000000000000000ULL, 0xB16127F2122E49F3ULL }, /* XSUM_XXH3_withSecret_testdata[1543] */\n    { 1544, 0x0000000000000000ULL, 0x5D5D8B07ECFC25DFULL }, /* XSUM_XXH3_withSecret_testdata[1544] */\n    { 1545, 0x0000000000000000ULL, 0xA1C0A4CB4424231BULL }, /* XSUM_XXH3_withSecret_testdata[1545] */\n    { 1546, 0x0000000000000000ULL, 0x747982BBE45543EFULL }, /* XSUM_XXH3_withSecret_testdata[1546] */\n    { 1547, 0x0000000000000000ULL, 0x9ECCEA6659D59EDCULL }, /* XSUM_XXH3_withSecret_testdata[1547] */\n    { 1548, 0x0000000000000000ULL, 0x38769A9591DD2D12ULL }, /* XSUM_XXH3_withSecret_testdata[1548] */\n    { 1549, 0x0000000000000000ULL, 0x027F6C6D14CCF327ULL }, /* XSUM_XXH3_withSecret_testdata[1549] */\n    { 1550, 0x0000000000000000ULL, 0xDE5498324B8F85A4ULL }, /* XSUM_XXH3_withSecret_testdata[1550] */\n    { 1551, 0x0000000000000000ULL, 0xB536DD44995AFC76ULL }, /* XSUM_XXH3_withSecret_testdata[1551] */\n    { 1552, 0x0000000000000000ULL, 0x770720AFAB500B79ULL }, /* XSUM_XXH3_withSecret_testdata[1552] */\n    { 1553, 0x0000000000000000ULL, 0x06D08A6EFB7981ACULL }, /* XSUM_XXH3_withSecret_testdata[1553] */\n    { 1554, 0x0000000000000000ULL, 0xB41B472B821086DDULL }, /* XSUM_XXH3_withSecret_testdata[1554] */\n    { 1555, 0x0000000000000000ULL, 0x242E5AE5EEF53F40ULL }, /* XSUM_XXH3_withSecret_testdata[1555] */\n    { 1556, 0x0000000000000000ULL, 0x35FAA23CCE3198F2ULL }, /* XSUM_XXH3_withSecret_testdata[1556] */\n    { 1557, 0x0000000000000000ULL, 0xD23B5C173B99B35BULL }, /* XSUM_XXH3_withSecret_testdata[1557] */\n    { 1558, 0x0000000000000000ULL, 0xA33782D76DDC38EBULL }, /* XSUM_XXH3_withSecret_testdata[1558] */\n    { 1559, 0x0000000000000000ULL, 0x9E5A86B789766272ULL }, /* XSUM_XXH3_withSecret_testdata[1559] */\n    { 1560, 0x0000000000000000ULL, 0xB507A75CF1020B56ULL }, /* XSUM_XXH3_withSecret_testdata[1560] */\n    { 1561, 0x0000000000000000ULL, 0x6124EB9E1634FC72ULL }, /* XSUM_XXH3_withSecret_testdata[1561] */\n    { 1562, 0x0000000000000000ULL, 0xEE3BD02C1CE375CAULL }, /* XSUM_XXH3_withSecret_testdata[1562] */\n    { 1563, 0x0000000000000000ULL, 0xECA0D51E89F2E7ECULL }, /* XSUM_XXH3_withSecret_testdata[1563] */\n    { 1564, 0x0000000000000000ULL, 0xCE30CFCB000C0C5FULL }, /* XSUM_XXH3_withSecret_testdata[1564] */\n    { 1565, 0x0000000000000000ULL, 0x14F3CDA1154E344DULL }, /* XSUM_XXH3_withSecret_testdata[1565] */\n    { 1566, 0x0000000000000000ULL, 0x116A649F8D9706A2ULL }, /* XSUM_XXH3_withSecret_testdata[1566] */\n    { 1567, 0x0000000000000000ULL, 0xA28D05E3EA45CA69ULL }, /* XSUM_XXH3_withSecret_testdata[1567] */\n    { 1568, 0x0000000000000000ULL, 0x710FD06512AA5BE8ULL }, /* XSUM_XXH3_withSecret_testdata[1568] */\n    { 1569, 0x0000000000000000ULL, 0x784391AF1A9BA1B7ULL }, /* XSUM_XXH3_withSecret_testdata[1569] */\n    { 1570, 0x0000000000000000ULL, 0x79FA23ABB58BBCFFULL }, /* XSUM_XXH3_withSecret_testdata[1570] */\n    { 1571, 0x0000000000000000ULL, 0x1DA468E8064598A5ULL }, /* XSUM_XXH3_withSecret_testdata[1571] */\n    { 1572, 0x0000000000000000ULL, 0xB4C4FD66D826C688ULL }, /* XSUM_XXH3_withSecret_testdata[1572] */\n    { 1573, 0x0000000000000000ULL, 0x35D164F09F1FB56DULL }, /* XSUM_XXH3_withSecret_testdata[1573] */\n    { 1574, 0x0000000000000000ULL, 0x448F80DC191044CEULL }, /* XSUM_XXH3_withSecret_testdata[1574] */\n    { 1575, 0x0000000000000000ULL, 0xECBE6AF44DED7706ULL }, /* XSUM_XXH3_withSecret_testdata[1575] */\n    { 1576, 0x0000000000000000ULL, 0xC7D9766F768E79A9ULL }, /* XSUM_XXH3_withSecret_testdata[1576] */\n    { 1577, 0x0000000000000000ULL, 0x4028751D1475BEE9ULL }, /* XSUM_XXH3_withSecret_testdata[1577] */\n    { 1578, 0x0000000000000000ULL, 0x17190FA37A712740ULL }, /* XSUM_XXH3_withSecret_testdata[1578] */\n    { 1579, 0x0000000000000000ULL, 0x5C433B8B127909A1ULL }, /* XSUM_XXH3_withSecret_testdata[1579] */\n    { 1580, 0x0000000000000000ULL, 0x734558FFEE5A74D2ULL }, /* XSUM_XXH3_withSecret_testdata[1580] */\n    { 1581, 0x0000000000000000ULL, 0xDF7A69D5C69D2389ULL }, /* XSUM_XXH3_withSecret_testdata[1581] */\n    { 1582, 0x0000000000000000ULL, 0x11C96BFB6DE24BE0ULL }, /* XSUM_XXH3_withSecret_testdata[1582] */\n    { 1583, 0x0000000000000000ULL, 0xD74F6A9969484337ULL }, /* XSUM_XXH3_withSecret_testdata[1583] */\n    { 1584, 0x0000000000000000ULL, 0x7A2527499384FBDDULL }, /* XSUM_XXH3_withSecret_testdata[1584] */\n    { 1585, 0x0000000000000000ULL, 0xA7DD5A711E85FC3FULL }, /* XSUM_XXH3_withSecret_testdata[1585] */\n    { 1586, 0x0000000000000000ULL, 0x771AD1F9E0EFDD27ULL }, /* XSUM_XXH3_withSecret_testdata[1586] */\n    { 1587, 0x0000000000000000ULL, 0xCD346BF1A2FC701BULL }, /* XSUM_XXH3_withSecret_testdata[1587] */\n    { 1588, 0x0000000000000000ULL, 0x2B2C5902B173E4D1ULL }, /* XSUM_XXH3_withSecret_testdata[1588] */\n    { 1589, 0x0000000000000000ULL, 0x7C4D63D009E0E16AULL }, /* XSUM_XXH3_withSecret_testdata[1589] */\n    { 1590, 0x0000000000000000ULL, 0x0BE8E14E1F1667C4ULL }, /* XSUM_XXH3_withSecret_testdata[1590] */\n    { 1591, 0x0000000000000000ULL, 0xDE41BB81852B1504ULL }, /* XSUM_XXH3_withSecret_testdata[1591] */\n    { 1592, 0x0000000000000000ULL, 0x42919116FF583596ULL }, /* XSUM_XXH3_withSecret_testdata[1592] */\n    { 1593, 0x0000000000000000ULL, 0xCB6BB1CDC70E944EULL }, /* XSUM_XXH3_withSecret_testdata[1593] */\n    { 1594, 0x0000000000000000ULL, 0xE6FB522266DB7768ULL }, /* XSUM_XXH3_withSecret_testdata[1594] */\n    { 1595, 0x0000000000000000ULL, 0x3077B5CE685507F9ULL }, /* XSUM_XXH3_withSecret_testdata[1595] */\n    { 1596, 0x0000000000000000ULL, 0x4C54EF7FD7168075ULL }, /* XSUM_XXH3_withSecret_testdata[1596] */\n    { 1597, 0x0000000000000000ULL, 0x8558C82444B27772ULL }, /* XSUM_XXH3_withSecret_testdata[1597] */\n    { 1598, 0x0000000000000000ULL, 0x93E87A5F083EE095ULL }, /* XSUM_XXH3_withSecret_testdata[1598] */\n    { 1599, 0x0000000000000000ULL, 0x23CA33AF6972592DULL }, /* XSUM_XXH3_withSecret_testdata[1599] */\n    { 1600, 0x0000000000000000ULL, 0x4CD10D6E0C2120FFULL }, /* XSUM_XXH3_withSecret_testdata[1600] */\n    { 1601, 0x0000000000000000ULL, 0x9B922B5C8DAEB98FULL }, /* XSUM_XXH3_withSecret_testdata[1601] */\n    { 1602, 0x0000000000000000ULL, 0x0018FD000AD87B0DULL }, /* XSUM_XXH3_withSecret_testdata[1602] */\n    { 1603, 0x0000000000000000ULL, 0x3D5FD5FF17C26FB9ULL }, /* XSUM_XXH3_withSecret_testdata[1603] */\n    { 1604, 0x0000000000000000ULL, 0x124D24DBBF79D2FBULL }, /* XSUM_XXH3_withSecret_testdata[1604] */\n    { 1605, 0x0000000000000000ULL, 0xBBD097F42CCC1414ULL }, /* XSUM_XXH3_withSecret_testdata[1605] */\n    { 1606, 0x0000000000000000ULL, 0x7A6DB19C8E6004F9ULL }, /* XSUM_XXH3_withSecret_testdata[1606] */\n    { 1607, 0x0000000000000000ULL, 0x3E9DD3BFF6393C7FULL }, /* XSUM_XXH3_withSecret_testdata[1607] */\n    { 1608, 0x0000000000000000ULL, 0xA1E2CEB3A64DD81BULL }, /* XSUM_XXH3_withSecret_testdata[1608] */\n    { 1609, 0x0000000000000000ULL, 0x60D5E04AB38C48D6ULL }, /* XSUM_XXH3_withSecret_testdata[1609] */\n    { 1610, 0x0000000000000000ULL, 0xAF05C39906A7D047ULL }, /* XSUM_XXH3_withSecret_testdata[1610] */\n    { 1611, 0x0000000000000000ULL, 0x1539BA514ED93D01ULL }, /* XSUM_XXH3_withSecret_testdata[1611] */\n    { 1612, 0x0000000000000000ULL, 0x1AED0B3FE9A4225AULL }, /* XSUM_XXH3_withSecret_testdata[1612] */\n    { 1613, 0x0000000000000000ULL, 0x28AA65B421E1EA27ULL }, /* XSUM_XXH3_withSecret_testdata[1613] */\n    { 1614, 0x0000000000000000ULL, 0x34E1C901C76FEEA4ULL }, /* XSUM_XXH3_withSecret_testdata[1614] */\n    { 1615, 0x0000000000000000ULL, 0x4833BF58602325C5ULL }, /* XSUM_XXH3_withSecret_testdata[1615] */\n    { 1616, 0x0000000000000000ULL, 0x8BBE98BDA7BC8B0EULL }, /* XSUM_XXH3_withSecret_testdata[1616] */\n    { 1617, 0x0000000000000000ULL, 0x95E2FC99C7236B83ULL }, /* XSUM_XXH3_withSecret_testdata[1617] */\n    { 1618, 0x0000000000000000ULL, 0x76E2F0B45C4F5599ULL }, /* XSUM_XXH3_withSecret_testdata[1618] */\n    { 1619, 0x0000000000000000ULL, 0x0A06FF738EDD1822ULL }, /* XSUM_XXH3_withSecret_testdata[1619] */\n    { 1620, 0x0000000000000000ULL, 0xEE02AF50A2EFA79CULL }, /* XSUM_XXH3_withSecret_testdata[1620] */\n    { 1621, 0x0000000000000000ULL, 0xC7BF41F42FDF6DADULL }, /* XSUM_XXH3_withSecret_testdata[1621] */\n    { 1622, 0x0000000000000000ULL, 0x36691EE554839BE8ULL }, /* XSUM_XXH3_withSecret_testdata[1622] */\n    { 1623, 0x0000000000000000ULL, 0x1817F64ED6B4307AULL }, /* XSUM_XXH3_withSecret_testdata[1623] */\n    { 1624, 0x0000000000000000ULL, 0xB0D50D4B178B6538ULL }, /* XSUM_XXH3_withSecret_testdata[1624] */\n    { 1625, 0x0000000000000000ULL, 0x5D5F2EF8171826E3ULL }, /* XSUM_XXH3_withSecret_testdata[1625] */\n    { 1626, 0x0000000000000000ULL, 0x545F8280EEC1AA1EULL }, /* XSUM_XXH3_withSecret_testdata[1626] */\n    { 1627, 0x0000000000000000ULL, 0x3F6E2E4A9259428AULL }, /* XSUM_XXH3_withSecret_testdata[1627] */\n    { 1628, 0x0000000000000000ULL, 0x5117B94804A0D3B5ULL }, /* XSUM_XXH3_withSecret_testdata[1628] */\n    { 1629, 0x0000000000000000ULL, 0x5206F42D911152A1ULL }, /* XSUM_XXH3_withSecret_testdata[1629] */\n    { 1630, 0x0000000000000000ULL, 0x6D53167B653D23A3ULL }, /* XSUM_XXH3_withSecret_testdata[1630] */\n    { 1631, 0x0000000000000000ULL, 0x61CF1FC1538031F9ULL }, /* XSUM_XXH3_withSecret_testdata[1631] */\n    { 1632, 0x0000000000000000ULL, 0xBC6E90CFA1602D65ULL }, /* XSUM_XXH3_withSecret_testdata[1632] */\n    { 1633, 0x0000000000000000ULL, 0xB98632BEADED0CF2ULL }, /* XSUM_XXH3_withSecret_testdata[1633] */\n    { 1634, 0x0000000000000000ULL, 0x0F251F190D9F95EFULL }, /* XSUM_XXH3_withSecret_testdata[1634] */\n    { 1635, 0x0000000000000000ULL, 0x99F9CDF97192A511ULL }, /* XSUM_XXH3_withSecret_testdata[1635] */\n    { 1636, 0x0000000000000000ULL, 0x30473897CAA4D5E4ULL }, /* XSUM_XXH3_withSecret_testdata[1636] */\n    { 1637, 0x0000000000000000ULL, 0xE921D35B983CD4DCULL }, /* XSUM_XXH3_withSecret_testdata[1637] */\n    { 1638, 0x0000000000000000ULL, 0x432796EED8D03163ULL }, /* XSUM_XXH3_withSecret_testdata[1638] */\n    { 1639, 0x0000000000000000ULL, 0xED5FDDE2580CFA2DULL }, /* XSUM_XXH3_withSecret_testdata[1639] */\n    { 1640, 0x0000000000000000ULL, 0x88B24FCACD224C33ULL }, /* XSUM_XXH3_withSecret_testdata[1640] */\n    { 1641, 0x0000000000000000ULL, 0x7AD61154D515D039ULL }, /* XSUM_XXH3_withSecret_testdata[1641] */\n    { 1642, 0x0000000000000000ULL, 0xBD453138BF7C74B4ULL }, /* XSUM_XXH3_withSecret_testdata[1642] */\n    { 1643, 0x0000000000000000ULL, 0x9C56497963AAE6CAULL }, /* XSUM_XXH3_withSecret_testdata[1643] */\n    { 1644, 0x0000000000000000ULL, 0x394A05C13E70EE7BULL }, /* XSUM_XXH3_withSecret_testdata[1644] */\n    { 1645, 0x0000000000000000ULL, 0x64C3F15471DBCB81ULL }, /* XSUM_XXH3_withSecret_testdata[1645] */\n    { 1646, 0x0000000000000000ULL, 0x0AE2FFAD636B5F1AULL }, /* XSUM_XXH3_withSecret_testdata[1646] */\n    { 1647, 0x0000000000000000ULL, 0xE57655AC00FEF568ULL }, /* XSUM_XXH3_withSecret_testdata[1647] */\n    { 1648, 0x0000000000000000ULL, 0xB2F7378B9D2E3678ULL }, /* XSUM_XXH3_withSecret_testdata[1648] */\n    { 1649, 0x0000000000000000ULL, 0x4750A565227FF789ULL }, /* XSUM_XXH3_withSecret_testdata[1649] */\n    { 1650, 0x0000000000000000ULL, 0xF29DF3F473111615ULL }, /* XSUM_XXH3_withSecret_testdata[1650] */\n    { 1651, 0x0000000000000000ULL, 0x1849FA7D03F17040ULL }, /* XSUM_XXH3_withSecret_testdata[1651] */\n    { 1652, 0x0000000000000000ULL, 0x6DAC844A0DE17D75ULL }, /* XSUM_XXH3_withSecret_testdata[1652] */\n    { 1653, 0x0000000000000000ULL, 0xE6E4CAD7D1E68B8BULL }, /* XSUM_XXH3_withSecret_testdata[1653] */\n    { 1654, 0x0000000000000000ULL, 0x3E9D32F021CDD06EULL }, /* XSUM_XXH3_withSecret_testdata[1654] */\n    { 1655, 0x0000000000000000ULL, 0xAE40EADE5A295701ULL }, /* XSUM_XXH3_withSecret_testdata[1655] */\n    { 1656, 0x0000000000000000ULL, 0x0DFAFD784832F12FULL }, /* XSUM_XXH3_withSecret_testdata[1656] */\n    { 1657, 0x0000000000000000ULL, 0xB53A09FE4BA3595DULL }, /* XSUM_XXH3_withSecret_testdata[1657] */\n    { 1658, 0x0000000000000000ULL, 0x35D3EFCD7A75BE8CULL }, /* XSUM_XXH3_withSecret_testdata[1658] */\n    { 1659, 0x0000000000000000ULL, 0x5FCDD6ACFE98BB96ULL }, /* XSUM_XXH3_withSecret_testdata[1659] */\n    { 1660, 0x0000000000000000ULL, 0xE3552314056A2927ULL }, /* XSUM_XXH3_withSecret_testdata[1660] */\n    { 1661, 0x0000000000000000ULL, 0x821AAEA79BDC7C91ULL }, /* XSUM_XXH3_withSecret_testdata[1661] */\n    { 1662, 0x0000000000000000ULL, 0xD165076A82DC0232ULL }, /* XSUM_XXH3_withSecret_testdata[1662] */\n    { 1663, 0x0000000000000000ULL, 0x0E65012F1826C7EBULL }, /* XSUM_XXH3_withSecret_testdata[1663] */\n    { 1664, 0x0000000000000000ULL, 0x6A6E3428C9890B5AULL }, /* XSUM_XXH3_withSecret_testdata[1664] */\n    { 1665, 0x0000000000000000ULL, 0x9ED6B48A75E0CF91ULL }, /* XSUM_XXH3_withSecret_testdata[1665] */\n    { 1666, 0x0000000000000000ULL, 0xF54699B3DAF2CD27ULL }, /* XSUM_XXH3_withSecret_testdata[1666] */\n    { 1667, 0x0000000000000000ULL, 0x6215FAF5576D64C6ULL }, /* XSUM_XXH3_withSecret_testdata[1667] */\n    { 1668, 0x0000000000000000ULL, 0x1F8EDBAC4C8F5E72ULL }, /* XSUM_XXH3_withSecret_testdata[1668] */\n    { 1669, 0x0000000000000000ULL, 0x285606E5D557A904ULL }, /* XSUM_XXH3_withSecret_testdata[1669] */\n    { 1670, 0x0000000000000000ULL, 0xE03302BF7677FC2AULL }, /* XSUM_XXH3_withSecret_testdata[1670] */\n    { 1671, 0x0000000000000000ULL, 0x1018E6584D733993ULL }, /* XSUM_XXH3_withSecret_testdata[1671] */\n    { 1672, 0x0000000000000000ULL, 0x9FC949445C23D3FDULL }, /* XSUM_XXH3_withSecret_testdata[1672] */\n    { 1673, 0x0000000000000000ULL, 0x98D13467937AE9B5ULL }, /* XSUM_XXH3_withSecret_testdata[1673] */\n    { 1674, 0x0000000000000000ULL, 0x021FC4717A1A5C29ULL }, /* XSUM_XXH3_withSecret_testdata[1674] */\n    { 1675, 0x0000000000000000ULL, 0xEC9DD872987A7305ULL }, /* XSUM_XXH3_withSecret_testdata[1675] */\n    { 1676, 0x0000000000000000ULL, 0x538C7C9BFF65F8DFULL }, /* XSUM_XXH3_withSecret_testdata[1676] */\n    { 1677, 0x0000000000000000ULL, 0x16098A7AEDE26A97ULL }, /* XSUM_XXH3_withSecret_testdata[1677] */\n    { 1678, 0x0000000000000000ULL, 0x4788AA014F8A7CE5ULL }, /* XSUM_XXH3_withSecret_testdata[1678] */\n    { 1679, 0x0000000000000000ULL, 0xB60E9D831D9A523AULL }, /* XSUM_XXH3_withSecret_testdata[1679] */\n    { 1680, 0x0000000000000000ULL, 0xA69CA251D7BAB81DULL }, /* XSUM_XXH3_withSecret_testdata[1680] */\n    { 1681, 0x0000000000000000ULL, 0x0A5C49F10F98DAB2ULL }, /* XSUM_XXH3_withSecret_testdata[1681] */\n    { 1682, 0x0000000000000000ULL, 0xBF8AD466578B929CULL }, /* XSUM_XXH3_withSecret_testdata[1682] */\n    { 1683, 0x0000000000000000ULL, 0xA3B49891EE338F11ULL }, /* XSUM_XXH3_withSecret_testdata[1683] */\n    { 1684, 0x0000000000000000ULL, 0x2B767F09C4073B50ULL }, /* XSUM_XXH3_withSecret_testdata[1684] */\n    { 1685, 0x0000000000000000ULL, 0xE44207E3D4A0F1A8ULL }, /* XSUM_XXH3_withSecret_testdata[1685] */\n    { 1686, 0x0000000000000000ULL, 0xB2963A7EF9647A12ULL }, /* XSUM_XXH3_withSecret_testdata[1686] */\n    { 1687, 0x0000000000000000ULL, 0x7B5D91DF290769D6ULL }, /* XSUM_XXH3_withSecret_testdata[1687] */\n    { 1688, 0x0000000000000000ULL, 0x5A4F1BCF6ED04EE1ULL }, /* XSUM_XXH3_withSecret_testdata[1688] */\n    { 1689, 0x0000000000000000ULL, 0xD98304DC00E59A9AULL }, /* XSUM_XXH3_withSecret_testdata[1689] */\n    { 1690, 0x0000000000000000ULL, 0x70E03BCE13B9D2F7ULL }, /* XSUM_XXH3_withSecret_testdata[1690] */\n    { 1691, 0x0000000000000000ULL, 0x9778670DA0C866DEULL }, /* XSUM_XXH3_withSecret_testdata[1691] */\n    { 1692, 0x0000000000000000ULL, 0x76DDF8E2E304FE1BULL }, /* XSUM_XXH3_withSecret_testdata[1692] */\n    { 1693, 0x0000000000000000ULL, 0xA93C2CEE9AAC9C51ULL }, /* XSUM_XXH3_withSecret_testdata[1693] */\n    { 1694, 0x0000000000000000ULL, 0xA191D1C7778C72B8ULL }, /* XSUM_XXH3_withSecret_testdata[1694] */\n    { 1695, 0x0000000000000000ULL, 0x9286563D24E83CF3ULL }, /* XSUM_XXH3_withSecret_testdata[1695] */\n    { 1696, 0x0000000000000000ULL, 0x30CB745D74507075ULL }, /* XSUM_XXH3_withSecret_testdata[1696] */\n    { 1697, 0x0000000000000000ULL, 0x1AD39F0EB4A14D62ULL }, /* XSUM_XXH3_withSecret_testdata[1697] */\n    { 1698, 0x0000000000000000ULL, 0x75E51A9F37A4DE9BULL }, /* XSUM_XXH3_withSecret_testdata[1698] */\n    { 1699, 0x0000000000000000ULL, 0xAFAE965CF499655AULL }, /* XSUM_XXH3_withSecret_testdata[1699] */\n    { 1700, 0x0000000000000000ULL, 0xA2C74FD12C5B9658ULL }, /* XSUM_XXH3_withSecret_testdata[1700] */\n    { 1701, 0x0000000000000000ULL, 0x03D678483CBA4A68ULL }, /* XSUM_XXH3_withSecret_testdata[1701] */\n    { 1702, 0x0000000000000000ULL, 0xA10387282F95641DULL }, /* XSUM_XXH3_withSecret_testdata[1702] */\n    { 1703, 0x0000000000000000ULL, 0x2F97A3C5F8B955FEULL }, /* XSUM_XXH3_withSecret_testdata[1703] */\n    { 1704, 0x0000000000000000ULL, 0x9F0ADFFC22A97C8AULL }, /* XSUM_XXH3_withSecret_testdata[1704] */\n    { 1705, 0x0000000000000000ULL, 0x1A00C96BC09EDDECULL }, /* XSUM_XXH3_withSecret_testdata[1705] */\n    { 1706, 0x0000000000000000ULL, 0x0AEEA8B351F7C655ULL }, /* XSUM_XXH3_withSecret_testdata[1706] */\n    { 1707, 0x0000000000000000ULL, 0x5146CA83E1B94E12ULL }, /* XSUM_XXH3_withSecret_testdata[1707] */\n    { 1708, 0x0000000000000000ULL, 0x5BBA3ED7929E5FA5ULL }, /* XSUM_XXH3_withSecret_testdata[1708] */\n    { 1709, 0x0000000000000000ULL, 0x3963D6E7C2185C10ULL }, /* XSUM_XXH3_withSecret_testdata[1709] */\n    { 1710, 0x0000000000000000ULL, 0x5A4C5E91EE8FA95BULL }, /* XSUM_XXH3_withSecret_testdata[1710] */\n    { 1711, 0x0000000000000000ULL, 0x9B8FAB3B30D5895EULL }, /* XSUM_XXH3_withSecret_testdata[1711] */\n    { 1712, 0x0000000000000000ULL, 0xE56728B6588CC4B1ULL }, /* XSUM_XXH3_withSecret_testdata[1712] */\n    { 1713, 0x0000000000000000ULL, 0xFB4E881A3E75AF1EULL }, /* XSUM_XXH3_withSecret_testdata[1713] */\n    { 1714, 0x0000000000000000ULL, 0xF57DFDF5902E14CDULL }, /* XSUM_XXH3_withSecret_testdata[1714] */\n    { 1715, 0x0000000000000000ULL, 0x82686F6DEE271950ULL }, /* XSUM_XXH3_withSecret_testdata[1715] */\n    { 1716, 0x0000000000000000ULL, 0x5CE3E44A78BCDC66ULL }, /* XSUM_XXH3_withSecret_testdata[1716] */\n    { 1717, 0x0000000000000000ULL, 0x27AC6414C2645329ULL }, /* XSUM_XXH3_withSecret_testdata[1717] */\n    { 1718, 0x0000000000000000ULL, 0x54C7D888E4BFE81AULL }, /* XSUM_XXH3_withSecret_testdata[1718] */\n    { 1719, 0x0000000000000000ULL, 0x38BAE8C8F5FF30C4ULL }, /* XSUM_XXH3_withSecret_testdata[1719] */\n    { 1720, 0x0000000000000000ULL, 0xB53E60907F8390D2ULL }, /* XSUM_XXH3_withSecret_testdata[1720] */\n    { 1721, 0x0000000000000000ULL, 0x932891E5ECFFC1E4ULL }, /* XSUM_XXH3_withSecret_testdata[1721] */\n    { 1722, 0x0000000000000000ULL, 0xCBF716940E4CE9CDULL }, /* XSUM_XXH3_withSecret_testdata[1722] */\n    { 1723, 0x0000000000000000ULL, 0xA3812CF5FC908675ULL }, /* XSUM_XXH3_withSecret_testdata[1723] */\n    { 1724, 0x0000000000000000ULL, 0x196ED6DDB482776DULL }, /* XSUM_XXH3_withSecret_testdata[1724] */\n    { 1725, 0x0000000000000000ULL, 0x9B70D5D56D68BCDAULL }, /* XSUM_XXH3_withSecret_testdata[1725] */\n    { 1726, 0x0000000000000000ULL, 0x89D41A820982DE7AULL }, /* XSUM_XXH3_withSecret_testdata[1726] */\n    { 1727, 0x0000000000000000ULL, 0x670B2B5F74D6B39DULL }, /* XSUM_XXH3_withSecret_testdata[1727] */\n    { 1728, 0x0000000000000000ULL, 0x4BF73CCEFD067D44ULL }, /* XSUM_XXH3_withSecret_testdata[1728] */\n    { 1729, 0x0000000000000000ULL, 0xF9E7E25E5F226055ULL }, /* XSUM_XXH3_withSecret_testdata[1729] */\n    { 1730, 0x0000000000000000ULL, 0x6F625819AB986B5FULL }, /* XSUM_XXH3_withSecret_testdata[1730] */\n    { 1731, 0x0000000000000000ULL, 0xDD0CA453D1D30B0EULL }, /* XSUM_XXH3_withSecret_testdata[1731] */\n    { 1732, 0x0000000000000000ULL, 0x61F29C66BFF1DC60ULL }, /* XSUM_XXH3_withSecret_testdata[1732] */\n    { 1733, 0x0000000000000000ULL, 0x79C26E766BF9C59CULL }, /* XSUM_XXH3_withSecret_testdata[1733] */\n    { 1734, 0x0000000000000000ULL, 0x7EC9B47E0552E6E0ULL }, /* XSUM_XXH3_withSecret_testdata[1734] */\n    { 1735, 0x0000000000000000ULL, 0xC6010C35C8CB4BCFULL }, /* XSUM_XXH3_withSecret_testdata[1735] */\n    { 1736, 0x0000000000000000ULL, 0xE99F407164825C89ULL }, /* XSUM_XXH3_withSecret_testdata[1736] */\n    { 1737, 0x0000000000000000ULL, 0x74523C6A58C7C381ULL }, /* XSUM_XXH3_withSecret_testdata[1737] */\n    { 1738, 0x0000000000000000ULL, 0x981CB1A9260139EFULL }, /* XSUM_XXH3_withSecret_testdata[1738] */\n    { 1739, 0x0000000000000000ULL, 0xA7472311411B7F44ULL }, /* XSUM_XXH3_withSecret_testdata[1739] */\n    { 1740, 0x0000000000000000ULL, 0x7772D0A69EA6B5C6ULL }, /* XSUM_XXH3_withSecret_testdata[1740] */\n    { 1741, 0x0000000000000000ULL, 0xA0910DEDF04A7D99ULL }, /* XSUM_XXH3_withSecret_testdata[1741] */\n    { 1742, 0x0000000000000000ULL, 0xC49241AE38755E89ULL }, /* XSUM_XXH3_withSecret_testdata[1742] */\n    { 1743, 0x0000000000000000ULL, 0xB5AB1F244DA833DDULL }, /* XSUM_XXH3_withSecret_testdata[1743] */\n    { 1744, 0x0000000000000000ULL, 0x567B28C34B63D694ULL }, /* XSUM_XXH3_withSecret_testdata[1744] */\n    { 1745, 0x0000000000000000ULL, 0x235CBE03E9E1E7F2ULL }, /* XSUM_XXH3_withSecret_testdata[1745] */\n    { 1746, 0x0000000000000000ULL, 0x76B3592B13BE309AULL }, /* XSUM_XXH3_withSecret_testdata[1746] */\n    { 1747, 0x0000000000000000ULL, 0x1529FE740A3AC230ULL }, /* XSUM_XXH3_withSecret_testdata[1747] */\n    { 1748, 0x0000000000000000ULL, 0xF5097CC1AAA76BD7ULL }, /* XSUM_XXH3_withSecret_testdata[1748] */\n    { 1749, 0x0000000000000000ULL, 0xD92584C1C9760C59ULL }, /* XSUM_XXH3_withSecret_testdata[1749] */\n    { 1750, 0x0000000000000000ULL, 0x35DFE8BF25B84863ULL }, /* XSUM_XXH3_withSecret_testdata[1750] */\n    { 1751, 0x0000000000000000ULL, 0x36158F70ACE15DD8ULL }, /* XSUM_XXH3_withSecret_testdata[1751] */\n    { 1752, 0x0000000000000000ULL, 0xBA23ACC7B52C06D0ULL }, /* XSUM_XXH3_withSecret_testdata[1752] */\n    { 1753, 0x0000000000000000ULL, 0x3307FFFC9BD358DFULL }, /* XSUM_XXH3_withSecret_testdata[1753] */\n    { 1754, 0x0000000000000000ULL, 0x979E3BBBA5E77CFEULL }, /* XSUM_XXH3_withSecret_testdata[1754] */\n    { 1755, 0x0000000000000000ULL, 0x36DE102859B0B962ULL }, /* XSUM_XXH3_withSecret_testdata[1755] */\n    { 1756, 0x0000000000000000ULL, 0x71BF2E2A55C5E814ULL }, /* XSUM_XXH3_withSecret_testdata[1756] */\n    { 1757, 0x0000000000000000ULL, 0xEBDA4FB991779C55ULL }, /* XSUM_XXH3_withSecret_testdata[1757] */\n    { 1758, 0x0000000000000000ULL, 0x1728848CF44E43A3ULL }, /* XSUM_XXH3_withSecret_testdata[1758] */\n    { 1759, 0x0000000000000000ULL, 0x593BB4D41BAFE16BULL }, /* XSUM_XXH3_withSecret_testdata[1759] */\n    { 1760, 0x0000000000000000ULL, 0x284CF892AE408A70ULL }, /* XSUM_XXH3_withSecret_testdata[1760] */\n    { 1761, 0x0000000000000000ULL, 0xEC09ABCEB857D071ULL }, /* XSUM_XXH3_withSecret_testdata[1761] */\n    { 1762, 0x0000000000000000ULL, 0xB871997236BF5AA8ULL }, /* XSUM_XXH3_withSecret_testdata[1762] */\n    { 1763, 0x0000000000000000ULL, 0x744E7DF18A4D7FA0ULL }, /* XSUM_XXH3_withSecret_testdata[1763] */\n    { 1764, 0x0000000000000000ULL, 0x2FE3A05D5D0E7D65ULL }, /* XSUM_XXH3_withSecret_testdata[1764] */\n    { 1765, 0x0000000000000000ULL, 0x9EA83E964E3E0AEDULL }, /* XSUM_XXH3_withSecret_testdata[1765] */\n    { 1766, 0x0000000000000000ULL, 0xBA912716E055FB61ULL }, /* XSUM_XXH3_withSecret_testdata[1766] */\n    { 1767, 0x0000000000000000ULL, 0x2CBF229C008619AAULL }, /* XSUM_XXH3_withSecret_testdata[1767] */\n    { 1768, 0x0000000000000000ULL, 0xAC0FABF720119D5DULL }, /* XSUM_XXH3_withSecret_testdata[1768] */\n    { 1769, 0x0000000000000000ULL, 0xCD9FEAF318CF59B0ULL }, /* XSUM_XXH3_withSecret_testdata[1769] */\n    { 1770, 0x0000000000000000ULL, 0x3362CC1D4116F147ULL }, /* XSUM_XXH3_withSecret_testdata[1770] */\n    { 1771, 0x0000000000000000ULL, 0x14AD4884FDCE337CULL }, /* XSUM_XXH3_withSecret_testdata[1771] */\n    { 1772, 0x0000000000000000ULL, 0x14D399478B7B428AULL }, /* XSUM_XXH3_withSecret_testdata[1772] */\n    { 1773, 0x0000000000000000ULL, 0xB11C4FE43B9C7293ULL }, /* XSUM_XXH3_withSecret_testdata[1773] */\n    { 1774, 0x0000000000000000ULL, 0x7AD9F263024DA989ULL }, /* XSUM_XXH3_withSecret_testdata[1774] */\n    { 1775, 0x0000000000000000ULL, 0xC51C01AC58688B36ULL }, /* XSUM_XXH3_withSecret_testdata[1775] */\n    { 1776, 0x0000000000000000ULL, 0xC440BB91EA4815DDULL }, /* XSUM_XXH3_withSecret_testdata[1776] */\n    { 1777, 0x0000000000000000ULL, 0x5BF91B033E1C28DBULL }, /* XSUM_XXH3_withSecret_testdata[1777] */\n    { 1778, 0x0000000000000000ULL, 0x3B11CE47991EEFD7ULL }, /* XSUM_XXH3_withSecret_testdata[1778] */\n    { 1779, 0x0000000000000000ULL, 0x7C15AC70C1714DC2ULL }, /* XSUM_XXH3_withSecret_testdata[1779] */\n    { 1780, 0x0000000000000000ULL, 0x82479F182059F91FULL }, /* XSUM_XXH3_withSecret_testdata[1780] */\n    { 1781, 0x0000000000000000ULL, 0x7B9678B2C21965ECULL }, /* XSUM_XXH3_withSecret_testdata[1781] */\n    { 1782, 0x0000000000000000ULL, 0x216FE3AF81D0FCBDULL }, /* XSUM_XXH3_withSecret_testdata[1782] */\n    { 1783, 0x0000000000000000ULL, 0xA207CCEE1D8AD5D2ULL }, /* XSUM_XXH3_withSecret_testdata[1783] */\n    { 1784, 0x0000000000000000ULL, 0x1EABEDCDD5F67A55ULL }, /* XSUM_XXH3_withSecret_testdata[1784] */\n    { 1785, 0x0000000000000000ULL, 0xE3AA024B094F9D33ULL }, /* XSUM_XXH3_withSecret_testdata[1785] */\n    { 1786, 0x0000000000000000ULL, 0x0617282894D26D61ULL }, /* XSUM_XXH3_withSecret_testdata[1786] */\n    { 1787, 0x0000000000000000ULL, 0xDC618587DDA8FC5FULL }, /* XSUM_XXH3_withSecret_testdata[1787] */\n    { 1788, 0x0000000000000000ULL, 0xC851676837A79E40ULL }, /* XSUM_XXH3_withSecret_testdata[1788] */\n    { 1789, 0x0000000000000000ULL, 0x91ED14D62BBFBCEDULL }, /* XSUM_XXH3_withSecret_testdata[1789] */\n    { 1790, 0x0000000000000000ULL, 0x8D4F8D0602285AB2ULL }, /* XSUM_XXH3_withSecret_testdata[1790] */\n    { 1791, 0x0000000000000000ULL, 0xCF44DFE6C083C272ULL }, /* XSUM_XXH3_withSecret_testdata[1791] */\n    { 1792, 0x0000000000000000ULL, 0x47DDC481F1DB095FULL }, /* XSUM_XXH3_withSecret_testdata[1792] */\n    { 1793, 0x0000000000000000ULL, 0xA10AE242C3A730EBULL }, /* XSUM_XXH3_withSecret_testdata[1793] */\n    { 1794, 0x0000000000000000ULL, 0xDB1E7B5DC72BDEC4ULL }, /* XSUM_XXH3_withSecret_testdata[1794] */\n    { 1795, 0x0000000000000000ULL, 0x988258BB7135C65BULL }, /* XSUM_XXH3_withSecret_testdata[1795] */\n    { 1796, 0x0000000000000000ULL, 0xB39D76C082AB8837ULL }, /* XSUM_XXH3_withSecret_testdata[1796] */\n    { 1797, 0x0000000000000000ULL, 0xE4606B36C8AC7379ULL }, /* XSUM_XXH3_withSecret_testdata[1797] */\n    { 1798, 0x0000000000000000ULL, 0x9B52580AAA9CDC0BULL }, /* XSUM_XXH3_withSecret_testdata[1798] */\n    { 1799, 0x0000000000000000ULL, 0xC961FA5351789300ULL }, /* XSUM_XXH3_withSecret_testdata[1799] */\n    { 1800, 0x0000000000000000ULL, 0xE7B46AB47D510BBBULL }, /* XSUM_XXH3_withSecret_testdata[1800] */\n    { 1801, 0x0000000000000000ULL, 0x4B6A8F15C17973F6ULL }, /* XSUM_XXH3_withSecret_testdata[1801] */\n    { 1802, 0x0000000000000000ULL, 0xEBE353EF65A651F6ULL }, /* XSUM_XXH3_withSecret_testdata[1802] */\n    { 1803, 0x0000000000000000ULL, 0x0FB0CAB2A8AD54C1ULL }, /* XSUM_XXH3_withSecret_testdata[1803] */\n    { 1804, 0x0000000000000000ULL, 0xB0FC1F6DDD75AD6DULL }, /* XSUM_XXH3_withSecret_testdata[1804] */\n    { 1805, 0x0000000000000000ULL, 0x9E6286E5DFBAE99EULL }, /* XSUM_XXH3_withSecret_testdata[1805] */\n    { 1806, 0x0000000000000000ULL, 0x3DF343EEBA68959AULL }, /* XSUM_XXH3_withSecret_testdata[1806] */\n    { 1807, 0x0000000000000000ULL, 0x6939F13CBCAEC0F6ULL }, /* XSUM_XXH3_withSecret_testdata[1807] */\n    { 1808, 0x0000000000000000ULL, 0x79806F82290A05D3ULL }, /* XSUM_XXH3_withSecret_testdata[1808] */\n    { 1809, 0x0000000000000000ULL, 0xF57C2DB3C71D1EC0ULL }, /* XSUM_XXH3_withSecret_testdata[1809] */\n    { 1810, 0x0000000000000000ULL, 0x1A05E375DD295438ULL }, /* XSUM_XXH3_withSecret_testdata[1810] */\n    { 1811, 0x0000000000000000ULL, 0xA74DBBE413B4E89BULL }, /* XSUM_XXH3_withSecret_testdata[1811] */\n    { 1812, 0x0000000000000000ULL, 0x971B8DD67515E5E0ULL }, /* XSUM_XXH3_withSecret_testdata[1812] */\n    { 1813, 0x0000000000000000ULL, 0x6610D45C74760EC4ULL }, /* XSUM_XXH3_withSecret_testdata[1813] */\n    { 1814, 0x0000000000000000ULL, 0xA593A38377386C31ULL }, /* XSUM_XXH3_withSecret_testdata[1814] */\n    { 1815, 0x0000000000000000ULL, 0xA9B45FF3A9192DDBULL }, /* XSUM_XXH3_withSecret_testdata[1815] */\n    { 1816, 0x0000000000000000ULL, 0xCCAFB051380D1E98ULL }, /* XSUM_XXH3_withSecret_testdata[1816] */\n    { 1817, 0x0000000000000000ULL, 0x203EE0860BF29DF7ULL }, /* XSUM_XXH3_withSecret_testdata[1817] */\n    { 1818, 0x0000000000000000ULL, 0xA76E0EBB41E17FD9ULL }, /* XSUM_XXH3_withSecret_testdata[1818] */\n    { 1819, 0x0000000000000000ULL, 0x6A159A6052A2166DULL }, /* XSUM_XXH3_withSecret_testdata[1819] */\n    { 1820, 0x0000000000000000ULL, 0x63A3361FD6F4C1A2ULL }, /* XSUM_XXH3_withSecret_testdata[1820] */\n    { 1821, 0x0000000000000000ULL, 0xC93683A587826A2CULL }, /* XSUM_XXH3_withSecret_testdata[1821] */\n    { 1822, 0x0000000000000000ULL, 0x02D5148F65DAF251ULL }, /* XSUM_XXH3_withSecret_testdata[1822] */\n    { 1823, 0x0000000000000000ULL, 0x25E1162FCFA75CA5ULL }, /* XSUM_XXH3_withSecret_testdata[1823] */\n    { 1824, 0x0000000000000000ULL, 0xBD5484CE7E50F07DULL }, /* XSUM_XXH3_withSecret_testdata[1824] */\n    { 1825, 0x0000000000000000ULL, 0x6EB6067839498B06ULL }, /* XSUM_XXH3_withSecret_testdata[1825] */\n    { 1826, 0x0000000000000000ULL, 0x52F20341A5DAD1E3ULL }, /* XSUM_XXH3_withSecret_testdata[1826] */\n    { 1827, 0x0000000000000000ULL, 0x50F562657386533FULL }, /* XSUM_XXH3_withSecret_testdata[1827] */\n    { 1828, 0x0000000000000000ULL, 0x1F10472FC2F01C96ULL }, /* XSUM_XXH3_withSecret_testdata[1828] */\n    { 1829, 0x0000000000000000ULL, 0x8C474EF701FB3909ULL }, /* XSUM_XXH3_withSecret_testdata[1829] */\n    { 1830, 0x0000000000000000ULL, 0x54BA08B1FA0D590AULL }, /* XSUM_XXH3_withSecret_testdata[1830] */\n    { 1831, 0x0000000000000000ULL, 0x652E59502189E111ULL }, /* XSUM_XXH3_withSecret_testdata[1831] */\n    { 1832, 0x0000000000000000ULL, 0x6877E92A32E2B991ULL }, /* XSUM_XXH3_withSecret_testdata[1832] */\n    { 1833, 0x0000000000000000ULL, 0x9C6831D78A76126DULL }, /* XSUM_XXH3_withSecret_testdata[1833] */\n    { 1834, 0x0000000000000000ULL, 0x26A22D43A7AE2EF6ULL }, /* XSUM_XXH3_withSecret_testdata[1834] */\n    { 1835, 0x0000000000000000ULL, 0x9DD7F5B61B8A8816ULL }, /* XSUM_XXH3_withSecret_testdata[1835] */\n    { 1836, 0x0000000000000000ULL, 0x4A01F6B43A1F053CULL }, /* XSUM_XXH3_withSecret_testdata[1836] */\n    { 1837, 0x0000000000000000ULL, 0xC7ED38842F51E59AULL }, /* XSUM_XXH3_withSecret_testdata[1837] */\n    { 1838, 0x0000000000000000ULL, 0x8B476BBB4ABE5430ULL }, /* XSUM_XXH3_withSecret_testdata[1838] */\n    { 1839, 0x0000000000000000ULL, 0x5FB0DFE505A82222ULL }, /* XSUM_XXH3_withSecret_testdata[1839] */\n    { 1840, 0x0000000000000000ULL, 0x81671324076187EEULL }, /* XSUM_XXH3_withSecret_testdata[1840] */\n    { 1841, 0x0000000000000000ULL, 0xD656A0AE18DB6402ULL }, /* XSUM_XXH3_withSecret_testdata[1841] */\n    { 1842, 0x0000000000000000ULL, 0x9356D1863E69A0DCULL }, /* XSUM_XXH3_withSecret_testdata[1842] */\n    { 1843, 0x0000000000000000ULL, 0x46269A68E2273394ULL }, /* XSUM_XXH3_withSecret_testdata[1843] */\n    { 1844, 0x0000000000000000ULL, 0x8F740F53C7BA8F35ULL }, /* XSUM_XXH3_withSecret_testdata[1844] */\n    { 1845, 0x0000000000000000ULL, 0xB05CFDCA7BA4531FULL }, /* XSUM_XXH3_withSecret_testdata[1845] */\n    { 1846, 0x0000000000000000ULL, 0x469325140F78A2DFULL }, /* XSUM_XXH3_withSecret_testdata[1846] */\n    { 1847, 0x0000000000000000ULL, 0x087ECF42F55D5E0DULL }, /* XSUM_XXH3_withSecret_testdata[1847] */\n    { 1848, 0x0000000000000000ULL, 0xDE3EE4E0EAC16ED4ULL }, /* XSUM_XXH3_withSecret_testdata[1848] */\n    { 1849, 0x0000000000000000ULL, 0x6FF2BB185054F40EULL }, /* XSUM_XXH3_withSecret_testdata[1849] */\n    { 1850, 0x0000000000000000ULL, 0xED2CF3EB5E728E1AULL }, /* XSUM_XXH3_withSecret_testdata[1850] */\n    { 1851, 0x0000000000000000ULL, 0xA7FAAD240ED4D3BDULL }, /* XSUM_XXH3_withSecret_testdata[1851] */\n    { 1852, 0x0000000000000000ULL, 0x843FFFB94BA6E942ULL }, /* XSUM_XXH3_withSecret_testdata[1852] */\n    { 1853, 0x0000000000000000ULL, 0xF3BAF1752618BB5BULL }, /* XSUM_XXH3_withSecret_testdata[1853] */\n    { 1854, 0x0000000000000000ULL, 0xE78D42311004927CULL }, /* XSUM_XXH3_withSecret_testdata[1854] */\n    { 1855, 0x0000000000000000ULL, 0x91EEBD8F732E178EULL }, /* XSUM_XXH3_withSecret_testdata[1855] */\n    { 1856, 0x0000000000000000ULL, 0xC99C980B41019B22ULL }, /* XSUM_XXH3_withSecret_testdata[1856] */\n    { 1857, 0x0000000000000000ULL, 0x16C6E879C8E235BEULL }, /* XSUM_XXH3_withSecret_testdata[1857] */\n    { 1858, 0x0000000000000000ULL, 0x0CECC7F3AB9C1F40ULL }, /* XSUM_XXH3_withSecret_testdata[1858] */\n    { 1859, 0x0000000000000000ULL, 0xFA8D2FD6D59DC280ULL }, /* XSUM_XXH3_withSecret_testdata[1859] */\n    { 1860, 0x0000000000000000ULL, 0x8562961C091342CEULL }, /* XSUM_XXH3_withSecret_testdata[1860] */\n    { 1861, 0x0000000000000000ULL, 0x62F62194E584CAF7ULL }, /* XSUM_XXH3_withSecret_testdata[1861] */\n    { 1862, 0x0000000000000000ULL, 0x4E92BB3A8BFEA159ULL }, /* XSUM_XXH3_withSecret_testdata[1862] */\n    { 1863, 0x0000000000000000ULL, 0x38365B5F64F64A98ULL }, /* XSUM_XXH3_withSecret_testdata[1863] */\n    { 1864, 0x0000000000000000ULL, 0xD147B36243C5C323ULL }, /* XSUM_XXH3_withSecret_testdata[1864] */\n    { 1865, 0x0000000000000000ULL, 0xE9ACE440CDB60441ULL }, /* XSUM_XXH3_withSecret_testdata[1865] */\n    { 1866, 0x0000000000000000ULL, 0x0A57F63533193ECAULL }, /* XSUM_XXH3_withSecret_testdata[1866] */\n    { 1867, 0x0000000000000000ULL, 0xE571EDBF602C3DA8ULL }, /* XSUM_XXH3_withSecret_testdata[1867] */\n    { 1868, 0x0000000000000000ULL, 0x0E9AAF89C2E43AB3ULL }, /* XSUM_XXH3_withSecret_testdata[1868] */\n    { 1869, 0x0000000000000000ULL, 0xBBEDAE93C8E71634ULL }, /* XSUM_XXH3_withSecret_testdata[1869] */\n    { 1870, 0x0000000000000000ULL, 0x893CBC1E009A0A03ULL }, /* XSUM_XXH3_withSecret_testdata[1870] */\n    { 1871, 0x0000000000000000ULL, 0xC6B24114B6F6E938ULL }, /* XSUM_XXH3_withSecret_testdata[1871] */\n    { 1872, 0x0000000000000000ULL, 0xEC60D1DD4E0B72EFULL }, /* XSUM_XXH3_withSecret_testdata[1872] */\n    { 1873, 0x0000000000000000ULL, 0xEE180979A8839059ULL }, /* XSUM_XXH3_withSecret_testdata[1873] */\n    { 1874, 0x0000000000000000ULL, 0xE79FC5C968E39F05ULL }, /* XSUM_XXH3_withSecret_testdata[1874] */\n    { 1875, 0x0000000000000000ULL, 0xD877733C14DE5624ULL }, /* XSUM_XXH3_withSecret_testdata[1875] */\n    { 1876, 0x0000000000000000ULL, 0xDC64CF1E1B3C621BULL }, /* XSUM_XXH3_withSecret_testdata[1876] */\n    { 1877, 0x0000000000000000ULL, 0xDE1EEDB9FEDF1B50ULL }, /* XSUM_XXH3_withSecret_testdata[1877] */\n    { 1878, 0x0000000000000000ULL, 0x5917DB36A8A1EC86ULL }, /* XSUM_XXH3_withSecret_testdata[1878] */\n    { 1879, 0x0000000000000000ULL, 0x31DCF9B84864E732ULL }, /* XSUM_XXH3_withSecret_testdata[1879] */\n    { 1880, 0x0000000000000000ULL, 0xA270D68EB626F81FULL }, /* XSUM_XXH3_withSecret_testdata[1880] */\n    { 1881, 0x0000000000000000ULL, 0x448CA992B405B478ULL }, /* XSUM_XXH3_withSecret_testdata[1881] */\n    { 1882, 0x0000000000000000ULL, 0xC687F7288F59642FULL }, /* XSUM_XXH3_withSecret_testdata[1882] */\n    { 1883, 0x0000000000000000ULL, 0x09904DB3F3073429ULL }, /* XSUM_XXH3_withSecret_testdata[1883] */\n    { 1884, 0x0000000000000000ULL, 0xBCFDF2A3E0EB5764ULL }, /* XSUM_XXH3_withSecret_testdata[1884] */\n    { 1885, 0x0000000000000000ULL, 0xE8AC4995374E498AULL }, /* XSUM_XXH3_withSecret_testdata[1885] */\n    { 1886, 0x0000000000000000ULL, 0x597CADBA4B5B8E18ULL }, /* XSUM_XXH3_withSecret_testdata[1886] */\n    { 1887, 0x0000000000000000ULL, 0x71B4E40C69AD0E85ULL }, /* XSUM_XXH3_withSecret_testdata[1887] */\n    { 1888, 0x0000000000000000ULL, 0x6BF88D864523E374ULL }, /* XSUM_XXH3_withSecret_testdata[1888] */\n    { 1889, 0x0000000000000000ULL, 0x9CA99D485C9FE5A9ULL }, /* XSUM_XXH3_withSecret_testdata[1889] */\n    { 1890, 0x0000000000000000ULL, 0x724E950BEE61D453ULL }, /* XSUM_XXH3_withSecret_testdata[1890] */\n    { 1891, 0x0000000000000000ULL, 0x32790EA97BB99A4AULL }, /* XSUM_XXH3_withSecret_testdata[1891] */\n    { 1892, 0x0000000000000000ULL, 0x653B234CAE064A5FULL }, /* XSUM_XXH3_withSecret_testdata[1892] */\n    { 1893, 0x0000000000000000ULL, 0x4872009907840C63ULL }, /* XSUM_XXH3_withSecret_testdata[1893] */\n    { 1894, 0x0000000000000000ULL, 0x6243D1800D7D75D0ULL }, /* XSUM_XXH3_withSecret_testdata[1894] */\n    { 1895, 0x0000000000000000ULL, 0x2E7980EAD2979C81ULL }, /* XSUM_XXH3_withSecret_testdata[1895] */\n    { 1896, 0x0000000000000000ULL, 0x0C5D37F9D498521BULL }, /* XSUM_XXH3_withSecret_testdata[1896] */\n    { 1897, 0x0000000000000000ULL, 0xBE22F8844228CA21ULL }, /* XSUM_XXH3_withSecret_testdata[1897] */\n    { 1898, 0x0000000000000000ULL, 0xA38E8323477AFDEBULL }, /* XSUM_XXH3_withSecret_testdata[1898] */\n    { 1899, 0x0000000000000000ULL, 0xD1F1A219688BFD74ULL }, /* XSUM_XXH3_withSecret_testdata[1899] */\n    { 1900, 0x0000000000000000ULL, 0x18FFC2BA99E13E26ULL }, /* XSUM_XXH3_withSecret_testdata[1900] */\n    { 1901, 0x0000000000000000ULL, 0x98DB456D96CA4A7CULL }, /* XSUM_XXH3_withSecret_testdata[1901] */\n    { 1902, 0x0000000000000000ULL, 0xBE521AFF481876BDULL }, /* XSUM_XXH3_withSecret_testdata[1902] */\n    { 1903, 0x0000000000000000ULL, 0x91F819C3C1F15995ULL }, /* XSUM_XXH3_withSecret_testdata[1903] */\n    { 1904, 0x0000000000000000ULL, 0xE738A023A9B0BA6DULL }, /* XSUM_XXH3_withSecret_testdata[1904] */\n    { 1905, 0x0000000000000000ULL, 0x34F3E5A9FAF610FDULL }, /* XSUM_XXH3_withSecret_testdata[1905] */\n    { 1906, 0x0000000000000000ULL, 0xC1D2B440968DD445ULL }, /* XSUM_XXH3_withSecret_testdata[1906] */\n    { 1907, 0x0000000000000000ULL, 0x603A8D4E0954F2ABULL }, /* XSUM_XXH3_withSecret_testdata[1907] */\n    { 1908, 0x0000000000000000ULL, 0x6163D84213C0D1CCULL }, /* XSUM_XXH3_withSecret_testdata[1908] */\n    { 1909, 0x0000000000000000ULL, 0x7EDA5DF9B18F6D30ULL }, /* XSUM_XXH3_withSecret_testdata[1909] */\n    { 1910, 0x0000000000000000ULL, 0xFF985775B462CAC9ULL }, /* XSUM_XXH3_withSecret_testdata[1910] */\n    { 1911, 0x0000000000000000ULL, 0x395DEE7376657B59ULL }, /* XSUM_XXH3_withSecret_testdata[1911] */\n    { 1912, 0x0000000000000000ULL, 0xEB4260FC7DD69737ULL }, /* XSUM_XXH3_withSecret_testdata[1912] */\n    { 1913, 0x0000000000000000ULL, 0x947F26C70E715B2FULL }, /* XSUM_XXH3_withSecret_testdata[1913] */\n    { 1914, 0x0000000000000000ULL, 0xC1DC1C9BC70A67C1ULL }, /* XSUM_XXH3_withSecret_testdata[1914] */\n    { 1915, 0x0000000000000000ULL, 0x08B572BCF56713CEULL }, /* XSUM_XXH3_withSecret_testdata[1915] */\n    { 1916, 0x0000000000000000ULL, 0x995E661AB54A9E8CULL }, /* XSUM_XXH3_withSecret_testdata[1916] */\n    { 1917, 0x0000000000000000ULL, 0x0C6630E181E66DEAULL }, /* XSUM_XXH3_withSecret_testdata[1917] */\n    { 1918, 0x0000000000000000ULL, 0x77F20A683428BE33ULL }, /* XSUM_XXH3_withSecret_testdata[1918] */\n    { 1919, 0x0000000000000000ULL, 0x74D2536C2C5D7259ULL }, /* XSUM_XXH3_withSecret_testdata[1919] */\n    { 1920, 0x0000000000000000ULL, 0x751D2EC54BC6038BULL }, /* XSUM_XXH3_withSecret_testdata[1920] */\n    { 1921, 0x0000000000000000ULL, 0x4AA03B6DB9DAFB6CULL }, /* XSUM_XXH3_withSecret_testdata[1921] */\n    { 1922, 0x0000000000000000ULL, 0x4399281D1A5B9E03ULL }, /* XSUM_XXH3_withSecret_testdata[1922] */\n    { 1923, 0x0000000000000000ULL, 0x4F39521CD6AD5E2AULL }, /* XSUM_XXH3_withSecret_testdata[1923] */\n    { 1924, 0x0000000000000000ULL, 0x86FE68ED8D696FAAULL }, /* XSUM_XXH3_withSecret_testdata[1924] */\n    { 1925, 0x0000000000000000ULL, 0x7D5B81AB9E3835EBULL }, /* XSUM_XXH3_withSecret_testdata[1925] */\n    { 1926, 0x0000000000000000ULL, 0x20CDCFF43C617248ULL }, /* XSUM_XXH3_withSecret_testdata[1926] */\n    { 1927, 0x0000000000000000ULL, 0x17EDC44C20536181ULL }, /* XSUM_XXH3_withSecret_testdata[1927] */\n    { 1928, 0x0000000000000000ULL, 0xEADDA2B5CD3C9E5DULL }, /* XSUM_XXH3_withSecret_testdata[1928] */\n    { 1929, 0x0000000000000000ULL, 0x268FB0850E2369ECULL }, /* XSUM_XXH3_withSecret_testdata[1929] */\n    { 1930, 0x0000000000000000ULL, 0x6F5BE676BB821FD0ULL }, /* XSUM_XXH3_withSecret_testdata[1930] */\n    { 1931, 0x0000000000000000ULL, 0xA8C578FCC34F7D60ULL }, /* XSUM_XXH3_withSecret_testdata[1931] */\n    { 1932, 0x0000000000000000ULL, 0x8EB8504FB4F00254ULL }, /* XSUM_XXH3_withSecret_testdata[1932] */\n    { 1933, 0x0000000000000000ULL, 0x00763B822214A7B0ULL }, /* XSUM_XXH3_withSecret_testdata[1933] */\n    { 1934, 0x0000000000000000ULL, 0x28165E0E06EBEFB5ULL }, /* XSUM_XXH3_withSecret_testdata[1934] */\n    { 1935, 0x0000000000000000ULL, 0x40665B23B5D5EBFEULL }, /* XSUM_XXH3_withSecret_testdata[1935] */\n    { 1936, 0x0000000000000000ULL, 0xAAE0C571AC56F9D4ULL }, /* XSUM_XXH3_withSecret_testdata[1936] */\n    { 1937, 0x0000000000000000ULL, 0x16E7AEE32C1D2511ULL }, /* XSUM_XXH3_withSecret_testdata[1937] */\n    { 1938, 0x0000000000000000ULL, 0x6FC1B6B272BA2D63ULL }, /* XSUM_XXH3_withSecret_testdata[1938] */\n    { 1939, 0x0000000000000000ULL, 0x30879A4A2DB0F19AULL }, /* XSUM_XXH3_withSecret_testdata[1939] */\n    { 1940, 0x0000000000000000ULL, 0xA1C75F5361E34F1EULL }, /* XSUM_XXH3_withSecret_testdata[1940] */\n    { 1941, 0x0000000000000000ULL, 0x50AB08C3D1B53756ULL }, /* XSUM_XXH3_withSecret_testdata[1941] */\n    { 1942, 0x0000000000000000ULL, 0x3E367154753FBACCULL }, /* XSUM_XXH3_withSecret_testdata[1942] */\n    { 1943, 0x0000000000000000ULL, 0x083A8F92DA030F2BULL }, /* XSUM_XXH3_withSecret_testdata[1943] */\n    { 1944, 0x0000000000000000ULL, 0xAEC52F821EA2D3B2ULL }, /* XSUM_XXH3_withSecret_testdata[1944] */\n    { 1945, 0x0000000000000000ULL, 0x300E70829CB7CB7CULL }, /* XSUM_XXH3_withSecret_testdata[1945] */\n    { 1946, 0x0000000000000000ULL, 0xAAB6F53BCBC50A11ULL }, /* XSUM_XXH3_withSecret_testdata[1946] */\n    { 1947, 0x0000000000000000ULL, 0x70645A7FE1D47DDAULL }, /* XSUM_XXH3_withSecret_testdata[1947] */\n    { 1948, 0x0000000000000000ULL, 0x55387B935C997944ULL }, /* XSUM_XXH3_withSecret_testdata[1948] */\n    { 1949, 0x0000000000000000ULL, 0x93D15D16187F8AD5ULL }, /* XSUM_XXH3_withSecret_testdata[1949] */\n    { 1950, 0x0000000000000000ULL, 0x45CEB57061DFAD2DULL }, /* XSUM_XXH3_withSecret_testdata[1950] */\n    { 1951, 0x0000000000000000ULL, 0x7CFA4E0F0C2371A3ULL }, /* XSUM_XXH3_withSecret_testdata[1951] */\n    { 1952, 0x0000000000000000ULL, 0xBA41CE761134E091ULL }, /* XSUM_XXH3_withSecret_testdata[1952] */\n    { 1953, 0x0000000000000000ULL, 0x25D634A52D0C6BAAULL }, /* XSUM_XXH3_withSecret_testdata[1953] */\n    { 1954, 0x0000000000000000ULL, 0xAAB9D4227FB7FF6AULL }, /* XSUM_XXH3_withSecret_testdata[1954] */\n    { 1955, 0x0000000000000000ULL, 0x570535A6A349A47DULL }, /* XSUM_XXH3_withSecret_testdata[1955] */\n    { 1956, 0x0000000000000000ULL, 0x2DC890196CBF71ACULL }, /* XSUM_XXH3_withSecret_testdata[1956] */\n    { 1957, 0x0000000000000000ULL, 0xDF8DF47F892B5E9CULL }, /* XSUM_XXH3_withSecret_testdata[1957] */\n    { 1958, 0x0000000000000000ULL, 0x4D4D1C063F97F8ACULL }, /* XSUM_XXH3_withSecret_testdata[1958] */\n    { 1959, 0x0000000000000000ULL, 0x26D28B5FE6A309F9ULL }, /* XSUM_XXH3_withSecret_testdata[1959] */\n    { 1960, 0x0000000000000000ULL, 0xDE6767AF345144A4ULL }, /* XSUM_XXH3_withSecret_testdata[1960] */\n    { 1961, 0x0000000000000000ULL, 0x66BD1E08C06BE67BULL }, /* XSUM_XXH3_withSecret_testdata[1961] */\n    { 1962, 0x0000000000000000ULL, 0xCFA6614E56565F1AULL }, /* XSUM_XXH3_withSecret_testdata[1962] */\n    { 1963, 0x0000000000000000ULL, 0xE1C87D4A9FFD7AB8ULL }, /* XSUM_XXH3_withSecret_testdata[1963] */\n    { 1964, 0x0000000000000000ULL, 0x1C40586BD0EEA8D1ULL }, /* XSUM_XXH3_withSecret_testdata[1964] */\n    { 1965, 0x0000000000000000ULL, 0x3532630E352A209DULL }, /* XSUM_XXH3_withSecret_testdata[1965] */\n    { 1966, 0x0000000000000000ULL, 0xE9DC7C827B0C99B0ULL }, /* XSUM_XXH3_withSecret_testdata[1966] */\n    { 1967, 0x0000000000000000ULL, 0x53D67F8ABE8DAEF5ULL }, /* XSUM_XXH3_withSecret_testdata[1967] */\n    { 1968, 0x0000000000000000ULL, 0xE854B14F5317D22AULL }, /* XSUM_XXH3_withSecret_testdata[1968] */\n    { 1969, 0x0000000000000000ULL, 0x8A2D2A82A3EB9933ULL }, /* XSUM_XXH3_withSecret_testdata[1969] */\n    { 1970, 0x0000000000000000ULL, 0x66BC8652E2FAB64BULL }, /* XSUM_XXH3_withSecret_testdata[1970] */\n    { 1971, 0x0000000000000000ULL, 0x323091C1E0318144ULL }, /* XSUM_XXH3_withSecret_testdata[1971] */\n    { 1972, 0x0000000000000000ULL, 0xABFFB27F0698185FULL }, /* XSUM_XXH3_withSecret_testdata[1972] */\n    { 1973, 0x0000000000000000ULL, 0xCE0BCC1DE702A8A2ULL }, /* XSUM_XXH3_withSecret_testdata[1973] */\n    { 1974, 0x0000000000000000ULL, 0xA891D776F1058526ULL }, /* XSUM_XXH3_withSecret_testdata[1974] */\n    { 1975, 0x0000000000000000ULL, 0xA07E0E04765D1A06ULL }, /* XSUM_XXH3_withSecret_testdata[1975] */\n    { 1976, 0x0000000000000000ULL, 0xD94B1CAA0A7C6CA6ULL }, /* XSUM_XXH3_withSecret_testdata[1976] */\n    { 1977, 0x0000000000000000ULL, 0x0DE7EC06A9D79A59ULL }, /* XSUM_XXH3_withSecret_testdata[1977] */\n    { 1978, 0x0000000000000000ULL, 0x83450511C21A36ABULL }, /* XSUM_XXH3_withSecret_testdata[1978] */\n    { 1979, 0x0000000000000000ULL, 0x20D014B8011E22A7ULL }, /* XSUM_XXH3_withSecret_testdata[1979] */\n    { 1980, 0x0000000000000000ULL, 0x4E183403B1E728D7ULL }, /* XSUM_XXH3_withSecret_testdata[1980] */\n    { 1981, 0x0000000000000000ULL, 0xA274442A270F7A2BULL }, /* XSUM_XXH3_withSecret_testdata[1981] */\n    { 1982, 0x0000000000000000ULL, 0xAA57D4C24A4C5A3CULL }, /* XSUM_XXH3_withSecret_testdata[1982] */\n    { 1983, 0x0000000000000000ULL, 0x3DA716FB6D15D010ULL }, /* XSUM_XXH3_withSecret_testdata[1983] */\n    { 1984, 0x0000000000000000ULL, 0xF0DBCAD3AF0FC637ULL }, /* XSUM_XXH3_withSecret_testdata[1984] */\n    { 1985, 0x0000000000000000ULL, 0x4F5012143EAA22EFULL }, /* XSUM_XXH3_withSecret_testdata[1985] */\n    { 1986, 0x0000000000000000ULL, 0x0A6569F03DDBCE77ULL }, /* XSUM_XXH3_withSecret_testdata[1986] */\n    { 1987, 0x0000000000000000ULL, 0x1F3EAEF95A8DF63EULL }, /* XSUM_XXH3_withSecret_testdata[1987] */\n    { 1988, 0x0000000000000000ULL, 0x979A6629B25EEC66ULL }, /* XSUM_XXH3_withSecret_testdata[1988] */\n    { 1989, 0x0000000000000000ULL, 0xAD1DE4B26AFDDC5AULL }, /* XSUM_XXH3_withSecret_testdata[1989] */\n    { 1990, 0x0000000000000000ULL, 0x02471AA9EC8F3FF7ULL }, /* XSUM_XXH3_withSecret_testdata[1990] */\n    { 1991, 0x0000000000000000ULL, 0x55C037ECD9007807ULL }, /* XSUM_XXH3_withSecret_testdata[1991] */\n    { 1992, 0x0000000000000000ULL, 0xA7B7E36C2F5CD2CDULL }, /* XSUM_XXH3_withSecret_testdata[1992] */\n    { 1993, 0x0000000000000000ULL, 0x6FFA0680FF416EE0ULL }, /* XSUM_XXH3_withSecret_testdata[1993] */\n    { 1994, 0x0000000000000000ULL, 0x43B362F86DD5E34FULL }, /* XSUM_XXH3_withSecret_testdata[1994] */\n    { 1995, 0x0000000000000000ULL, 0x68D3CE07A02C606BULL }, /* XSUM_XXH3_withSecret_testdata[1995] */\n    { 1996, 0x0000000000000000ULL, 0xD3F6021C2CC7C145ULL }, /* XSUM_XXH3_withSecret_testdata[1996] */\n    { 1997, 0x0000000000000000ULL, 0xF70238CF5D392572ULL }, /* XSUM_XXH3_withSecret_testdata[1997] */\n    { 1998, 0x0000000000000000ULL, 0x5F308D427071394CULL }, /* XSUM_XXH3_withSecret_testdata[1998] */\n    { 1999, 0x0000000000000000ULL, 0x57523F6650F55E0DULL }, /* XSUM_XXH3_withSecret_testdata[1999] */\n    { 2000, 0x0000000000000000ULL, 0x680E40011860C581ULL }, /* XSUM_XXH3_withSecret_testdata[2000] */\n    { 2001, 0x0000000000000000ULL, 0xD0B11AAD1F5C23C1ULL }, /* XSUM_XXH3_withSecret_testdata[2001] */\n    { 2002, 0x0000000000000000ULL, 0xA6A9688B992ED021ULL }, /* XSUM_XXH3_withSecret_testdata[2002] */\n    { 2003, 0x0000000000000000ULL, 0x50BC82C67C5B7A2AULL }, /* XSUM_XXH3_withSecret_testdata[2003] */\n    { 2004, 0x0000000000000000ULL, 0x13D22CED68E76785ULL }, /* XSUM_XXH3_withSecret_testdata[2004] */\n    { 2005, 0x0000000000000000ULL, 0x378EF2D33B8CC69DULL }, /* XSUM_XXH3_withSecret_testdata[2005] */\n    { 2006, 0x0000000000000000ULL, 0x60B89260458BDF90ULL }, /* XSUM_XXH3_withSecret_testdata[2006] */\n    { 2007, 0x0000000000000000ULL, 0xEF62145B4D67249BULL }, /* XSUM_XXH3_withSecret_testdata[2007] */\n    { 2008, 0x0000000000000000ULL, 0x0759C5A7E12CCF8BULL }, /* XSUM_XXH3_withSecret_testdata[2008] */\n    { 2009, 0x0000000000000000ULL, 0x83E9CD30677C2674ULL }, /* XSUM_XXH3_withSecret_testdata[2009] */\n    { 2010, 0x0000000000000000ULL, 0x00C92FEFD25FFB3FULL }, /* XSUM_XXH3_withSecret_testdata[2010] */\n    { 2011, 0x0000000000000000ULL, 0xA714A805852DD9EDULL }, /* XSUM_XXH3_withSecret_testdata[2011] */\n    { 2012, 0x0000000000000000ULL, 0x1AE6E24CC00EC603ULL }, /* XSUM_XXH3_withSecret_testdata[2012] */\n    { 2013, 0x0000000000000000ULL, 0x928ED8E2EE11805FULL }, /* XSUM_XXH3_withSecret_testdata[2013] */\n    { 2014, 0x0000000000000000ULL, 0xC12EB28602014B6AULL }, /* XSUM_XXH3_withSecret_testdata[2014] */\n    { 2015, 0x0000000000000000ULL, 0x7420C0D871AAF4DAULL }, /* XSUM_XXH3_withSecret_testdata[2015] */\n    { 2016, 0x0000000000000000ULL, 0xD11FEA4183B4ABBAULL }, /* XSUM_XXH3_withSecret_testdata[2016] */\n    { 2017, 0x0000000000000000ULL, 0xA1A8D9B0B2E816AEULL }, /* XSUM_XXH3_withSecret_testdata[2017] */\n    { 2018, 0x0000000000000000ULL, 0x7518F2FD9C9EB851ULL }, /* XSUM_XXH3_withSecret_testdata[2018] */\n    { 2019, 0x0000000000000000ULL, 0xBBFC3AD965E4F459ULL }, /* XSUM_XXH3_withSecret_testdata[2019] */\n    { 2020, 0x0000000000000000ULL, 0xEB96E630F1F12D5CULL }, /* XSUM_XXH3_withSecret_testdata[2020] */\n    { 2021, 0x0000000000000000ULL, 0x8AE95135640DB9AFULL }, /* XSUM_XXH3_withSecret_testdata[2021] */\n    { 2022, 0x0000000000000000ULL, 0xF0FD6C215C2FAB7DULL }, /* XSUM_XXH3_withSecret_testdata[2022] */\n    { 2023, 0x0000000000000000ULL, 0x22E379A68D4A26E8ULL }, /* XSUM_XXH3_withSecret_testdata[2023] */\n    { 2024, 0x0000000000000000ULL, 0x751D0B04BD155367ULL }, /* XSUM_XXH3_withSecret_testdata[2024] */\n    { 2025, 0x0000000000000000ULL, 0xBAF9A0F558671628ULL }, /* XSUM_XXH3_withSecret_testdata[2025] */\n    { 2026, 0x0000000000000000ULL, 0x2C98EDD28EB24A27ULL }, /* XSUM_XXH3_withSecret_testdata[2026] */\n    { 2027, 0x0000000000000000ULL, 0x39FF6BB04D78CECBULL }, /* XSUM_XXH3_withSecret_testdata[2027] */\n    { 2028, 0x0000000000000000ULL, 0x6C5B98692DA17DECULL }, /* XSUM_XXH3_withSecret_testdata[2028] */\n    { 2029, 0x0000000000000000ULL, 0xE3C17365A6225E2EULL }, /* XSUM_XXH3_withSecret_testdata[2029] */\n    { 2030, 0x0000000000000000ULL, 0x9679231B1AB02919ULL }, /* XSUM_XXH3_withSecret_testdata[2030] */\n    { 2031, 0x0000000000000000ULL, 0x9D6531F5C0D6BFBBULL }, /* XSUM_XXH3_withSecret_testdata[2031] */\n    { 2032, 0x0000000000000000ULL, 0x47D9A3AB7BB9557EULL }, /* XSUM_XXH3_withSecret_testdata[2032] */\n    { 2033, 0x0000000000000000ULL, 0xC8EE10B303E59B90ULL }, /* XSUM_XXH3_withSecret_testdata[2033] */\n    { 2034, 0x0000000000000000ULL, 0x7744087C5E09B4A0ULL }, /* XSUM_XXH3_withSecret_testdata[2034] */\n    { 2035, 0x0000000000000000ULL, 0x2320AF628CF370B9ULL }, /* XSUM_XXH3_withSecret_testdata[2035] */\n    { 2036, 0x0000000000000000ULL, 0xED1098FAB4D69854ULL }, /* XSUM_XXH3_withSecret_testdata[2036] */\n    { 2037, 0x0000000000000000ULL, 0x5C441874E06823A9ULL }, /* XSUM_XXH3_withSecret_testdata[2037] */\n    { 2038, 0x0000000000000000ULL, 0x88136156AC52E87AULL }, /* XSUM_XXH3_withSecret_testdata[2038] */\n    { 2039, 0x0000000000000000ULL, 0x357838F44B24482FULL }, /* XSUM_XXH3_withSecret_testdata[2039] */\n    { 2040, 0x0000000000000000ULL, 0x7EC986E34C09ACD8ULL }, /* XSUM_XXH3_withSecret_testdata[2040] */\n    { 2041, 0x0000000000000000ULL, 0x8219190DAE71BA9EULL }, /* XSUM_XXH3_withSecret_testdata[2041] */\n    { 2042, 0x0000000000000000ULL, 0x6D2A9F3B4B4E71F0ULL }, /* XSUM_XXH3_withSecret_testdata[2042] */\n    { 2043, 0x0000000000000000ULL, 0x8EC03594DB1AD0DAULL }, /* XSUM_XXH3_withSecret_testdata[2043] */\n    { 2044, 0x0000000000000000ULL, 0x59EED54EB42DE33AULL }, /* XSUM_XXH3_withSecret_testdata[2044] */\n    { 2045, 0x0000000000000000ULL, 0x13805D233DAD8790ULL }, /* XSUM_XXH3_withSecret_testdata[2045] */\n    { 2046, 0x0000000000000000ULL, 0x43676048065E159CULL }, /* XSUM_XXH3_withSecret_testdata[2046] */\n    { 2047, 0x0000000000000000ULL, 0x209243520DBDB300ULL }, /* XSUM_XXH3_withSecret_testdata[2047] */\n    { 2048, 0x0000000000000000ULL, 0xD32E975821D6519FULL }, /* XSUM_XXH3_withSecret_testdata[2048] */\n    { 2049, 0x0000000000000000ULL, 0xA21BE3A04630DEF3ULL }, /* XSUM_XXH3_withSecret_testdata[2049] */\n    { 2050, 0x0000000000000000ULL, 0x66C1DE03D1E73446ULL }, /* XSUM_XXH3_withSecret_testdata[2050] */\n    { 2051, 0x0000000000000000ULL, 0x6F919C733E968D5FULL }, /* XSUM_XXH3_withSecret_testdata[2051] */\n    { 2052, 0x0000000000000000ULL, 0x26C292BB2CE4A52BULL }, /* XSUM_XXH3_withSecret_testdata[2052] */\n    { 2053, 0x0000000000000000ULL, 0x38BC94F790714231ULL }, /* XSUM_XXH3_withSecret_testdata[2053] */\n    { 2054, 0x0000000000000000ULL, 0x1CC2A38D40B0B479ULL }, /* XSUM_XXH3_withSecret_testdata[2054] */\n    { 2055, 0x0000000000000000ULL, 0x1F88E6D332129AD7ULL }, /* XSUM_XXH3_withSecret_testdata[2055] */\n    { 2056, 0x0000000000000000ULL, 0xEB2297D9BC7DAB31ULL }, /* XSUM_XXH3_withSecret_testdata[2056] */\n    { 2057, 0x0000000000000000ULL, 0x5AD39A25C77470A7ULL }, /* XSUM_XXH3_withSecret_testdata[2057] */\n    { 2058, 0x0000000000000000ULL, 0xE2EBAE7AA5590976ULL }, /* XSUM_XXH3_withSecret_testdata[2058] */\n    { 2059, 0x0000000000000000ULL, 0xC95A7CE1FA9D862CULL }, /* XSUM_XXH3_withSecret_testdata[2059] */\n    { 2060, 0x0000000000000000ULL, 0x4164FD4B4B60A744ULL }, /* XSUM_XXH3_withSecret_testdata[2060] */\n    { 2061, 0x0000000000000000ULL, 0xD5EBADC52B3BE9B4ULL }, /* XSUM_XXH3_withSecret_testdata[2061] */\n    { 2062, 0x0000000000000000ULL, 0x911E0F903F1D33ADULL }, /* XSUM_XXH3_withSecret_testdata[2062] */\n    { 2063, 0x0000000000000000ULL, 0xE6672AD872CCD53FULL }, /* XSUM_XXH3_withSecret_testdata[2063] */\n    { 2064, 0x0000000000000000ULL, 0xEFB596ADA9519FDDULL }, /* XSUM_XXH3_withSecret_testdata[2064] */\n    { 2065, 0x0000000000000000ULL, 0xB46502B4C20DB573ULL }, /* XSUM_XXH3_withSecret_testdata[2065] */\n    { 2066, 0x0000000000000000ULL, 0xE96B5AA61BE76157ULL }, /* XSUM_XXH3_withSecret_testdata[2066] */\n    { 2067, 0x0000000000000000ULL, 0x6778895F05F19804ULL }, /* XSUM_XXH3_withSecret_testdata[2067] */\n    { 2068, 0x0000000000000000ULL, 0x81D3331F18F62106ULL }, /* XSUM_XXH3_withSecret_testdata[2068] */\n    { 2069, 0x0000000000000000ULL, 0x73B7E0205B9C8F02ULL }, /* XSUM_XXH3_withSecret_testdata[2069] */\n    { 2070, 0x0000000000000000ULL, 0xBC279DDACB497915ULL }, /* XSUM_XXH3_withSecret_testdata[2070] */\n    { 2071, 0x0000000000000000ULL, 0x26E6F63E802A0237ULL }, /* XSUM_XXH3_withSecret_testdata[2071] */\n    { 2072, 0x0000000000000000ULL, 0x6FDDA4A779C05513ULL }, /* XSUM_XXH3_withSecret_testdata[2072] */\n    { 2073, 0x0000000000000000ULL, 0x8C117EA6D5CB1D6AULL }, /* XSUM_XXH3_withSecret_testdata[2073] */\n    { 2074, 0x0000000000000000ULL, 0xBEF162C7599DB103ULL }, /* XSUM_XXH3_withSecret_testdata[2074] */\n    { 2075, 0x0000000000000000ULL, 0x99A8565C62D35B6BULL }, /* XSUM_XXH3_withSecret_testdata[2075] */\n    { 2076, 0x0000000000000000ULL, 0x8C09C893AA0745B4ULL }, /* XSUM_XXH3_withSecret_testdata[2076] */\n    { 2077, 0x0000000000000000ULL, 0x259D32B53BC5C483ULL }, /* XSUM_XXH3_withSecret_testdata[2077] */\n    { 2078, 0x0000000000000000ULL, 0xF34E587F40BA1DC4ULL }, /* XSUM_XXH3_withSecret_testdata[2078] */\n    { 2079, 0x0000000000000000ULL, 0x86EF0E042CD99677ULL }, /* XSUM_XXH3_withSecret_testdata[2079] */\n    { 2080, 0x0000000000000000ULL, 0xD50E1D4B97E7610DULL }, /* XSUM_XXH3_withSecret_testdata[2080] */\n    { 2081, 0x0000000000000000ULL, 0x8D79F9511D9BD6C8ULL }, /* XSUM_XXH3_withSecret_testdata[2081] */\n    { 2082, 0x0000000000000000ULL, 0xBD601351D0BA0291ULL }, /* XSUM_XXH3_withSecret_testdata[2082] */\n    { 2083, 0x0000000000000000ULL, 0x7A7871FDFED55F62ULL }, /* XSUM_XXH3_withSecret_testdata[2083] */\n    { 2084, 0x0000000000000000ULL, 0x1561798466C5452CULL }, /* XSUM_XXH3_withSecret_testdata[2084] */\n    { 2085, 0x0000000000000000ULL, 0x0D21BCE3EF6C5C55ULL }, /* XSUM_XXH3_withSecret_testdata[2085] */\n    { 2086, 0x0000000000000000ULL, 0xAAB4CE0A582B1E13ULL }, /* XSUM_XXH3_withSecret_testdata[2086] */\n    { 2087, 0x0000000000000000ULL, 0x7DF76FB93499EF9EULL }, /* XSUM_XXH3_withSecret_testdata[2087] */\n    { 2088, 0x0000000000000000ULL, 0x8C8786ECB7222674ULL }, /* XSUM_XXH3_withSecret_testdata[2088] */\n    { 2089, 0x0000000000000000ULL, 0x76F06F2C42B2BF52ULL }, /* XSUM_XXH3_withSecret_testdata[2089] */\n    { 2090, 0x0000000000000000ULL, 0xE819BD3C60E0DD3EULL }, /* XSUM_XXH3_withSecret_testdata[2090] */\n    { 2091, 0x0000000000000000ULL, 0xEECA6A591070079EULL }, /* XSUM_XXH3_withSecret_testdata[2091] */\n    { 2092, 0x0000000000000000ULL, 0xBB3BEA3E401EAD72ULL }, /* XSUM_XXH3_withSecret_testdata[2092] */\n    { 2093, 0x0000000000000000ULL, 0x844123209C9A55F9ULL }, /* XSUM_XXH3_withSecret_testdata[2093] */\n    { 2094, 0x0000000000000000ULL, 0x6E64CDD471315BB3ULL }, /* XSUM_XXH3_withSecret_testdata[2094] */\n    { 2095, 0x0000000000000000ULL, 0x3B457BD683D5C88BULL }, /* XSUM_XXH3_withSecret_testdata[2095] */\n    { 2096, 0x0000000000000000ULL, 0xF509FFB4B4B76710ULL }, /* XSUM_XXH3_withSecret_testdata[2096] */\n    { 2097, 0x0000000000000000ULL, 0x1573E7DE38373E65ULL }, /* XSUM_XXH3_withSecret_testdata[2097] */\n    { 2098, 0x0000000000000000ULL, 0xEBEB0F4DBB4C8377ULL }, /* XSUM_XXH3_withSecret_testdata[2098] */\n    { 2099, 0x0000000000000000ULL, 0x8DCD6D2487F34E24ULL }, /* XSUM_XXH3_withSecret_testdata[2099] */\n    { 2100, 0x0000000000000000ULL, 0xC4D66A26C8A2FDADULL }, /* XSUM_XXH3_withSecret_testdata[2100] */\n    { 2101, 0x0000000000000000ULL, 0x52712CF283F417CEULL }, /* XSUM_XXH3_withSecret_testdata[2101] */\n    { 2102, 0x0000000000000000ULL, 0x924F8C83442180D7ULL }, /* XSUM_XXH3_withSecret_testdata[2102] */\n    { 2103, 0x0000000000000000ULL, 0x343DE55494B2C245ULL }, /* XSUM_XXH3_withSecret_testdata[2103] */\n    { 2104, 0x0000000000000000ULL, 0x5CAF411F83BA19F6ULL }, /* XSUM_XXH3_withSecret_testdata[2104] */\n    { 2105, 0x0000000000000000ULL, 0x06EA3A8C72522C43ULL }, /* XSUM_XXH3_withSecret_testdata[2105] */\n    { 2106, 0x0000000000000000ULL, 0x2A0A7FC6FA02CBEAULL }, /* XSUM_XXH3_withSecret_testdata[2106] */\n    { 2107, 0x0000000000000000ULL, 0xBD81E26F559D5741ULL }, /* XSUM_XXH3_withSecret_testdata[2107] */\n    { 2108, 0x0000000000000000ULL, 0x8F2996F3DECAA2B9ULL }, /* XSUM_XXH3_withSecret_testdata[2108] */\n    { 2109, 0x0000000000000000ULL, 0xFBEC878C8A37DF88ULL }, /* XSUM_XXH3_withSecret_testdata[2109] */\n    { 2110, 0x0000000000000000ULL, 0xBB27B7BA8CD54B6DULL }, /* XSUM_XXH3_withSecret_testdata[2110] */\n    { 2111, 0x0000000000000000ULL, 0xADFD8F12387660C6ULL }, /* XSUM_XXH3_withSecret_testdata[2111] */\n    { 2112, 0x0000000000000000ULL, 0x7734C5CB42F4AA50ULL }, /* XSUM_XXH3_withSecret_testdata[2112] */\n    { 2113, 0x0000000000000000ULL, 0x37AAADC6FB38A58EULL }, /* XSUM_XXH3_withSecret_testdata[2113] */\n    { 2114, 0x0000000000000000ULL, 0x72822DA7E16EBD52ULL }, /* XSUM_XXH3_withSecret_testdata[2114] */\n    { 2115, 0x0000000000000000ULL, 0xF2514B8997F56ADAULL }, /* XSUM_XXH3_withSecret_testdata[2115] */\n    { 2116, 0x0000000000000000ULL, 0x7B0E13F461B450DCULL }, /* XSUM_XXH3_withSecret_testdata[2116] */\n    { 2117, 0x0000000000000000ULL, 0x6299C85970CB72F3ULL }, /* XSUM_XXH3_withSecret_testdata[2117] */\n    { 2118, 0x0000000000000000ULL, 0x9F00FEBF3293C5D2ULL }, /* XSUM_XXH3_withSecret_testdata[2118] */\n    { 2119, 0x0000000000000000ULL, 0x29F5866058BB82CFULL }, /* XSUM_XXH3_withSecret_testdata[2119] */\n    { 2120, 0x0000000000000000ULL, 0x7B68AC656D8544D3ULL }, /* XSUM_XXH3_withSecret_testdata[2120] */\n    { 2121, 0x0000000000000000ULL, 0x14676FD39C54BEC3ULL }, /* XSUM_XXH3_withSecret_testdata[2121] */\n    { 2122, 0x0000000000000000ULL, 0x74B2C201D6E3F634ULL }, /* XSUM_XXH3_withSecret_testdata[2122] */\n    { 2123, 0x0000000000000000ULL, 0xB784D3F03CDC62C5ULL }, /* XSUM_XXH3_withSecret_testdata[2123] */\n    { 2124, 0x0000000000000000ULL, 0x1071B2D025552CD9ULL }, /* XSUM_XXH3_withSecret_testdata[2124] */\n    { 2125, 0x0000000000000000ULL, 0x95B0032D43F512C3ULL }, /* XSUM_XXH3_withSecret_testdata[2125] */\n    { 2126, 0x0000000000000000ULL, 0xB089997C117D2050ULL }, /* XSUM_XXH3_withSecret_testdata[2126] */\n    { 2127, 0x0000000000000000ULL, 0x50F0CB60BD0A4454ULL }, /* XSUM_XXH3_withSecret_testdata[2127] */\n    { 2128, 0x0000000000000000ULL, 0x55B2F545EECC6289ULL }, /* XSUM_XXH3_withSecret_testdata[2128] */\n    { 2129, 0x0000000000000000ULL, 0xB9252EC3C2B99725ULL }, /* XSUM_XXH3_withSecret_testdata[2129] */\n    { 2130, 0x0000000000000000ULL, 0x01C577B1E6F49009ULL }, /* XSUM_XXH3_withSecret_testdata[2130] */\n    { 2131, 0x0000000000000000ULL, 0x3D09169CB408C167ULL }, /* XSUM_XXH3_withSecret_testdata[2131] */\n    { 2132, 0x0000000000000000ULL, 0x02114BEE3F68C72AULL }, /* XSUM_XXH3_withSecret_testdata[2132] */\n    { 2133, 0x0000000000000000ULL, 0x8E6428C72B768BD8ULL }, /* XSUM_XXH3_withSecret_testdata[2133] */\n    { 2134, 0x0000000000000000ULL, 0x8EE2E521028193B2ULL }, /* XSUM_XXH3_withSecret_testdata[2134] */\n    { 2135, 0x0000000000000000ULL, 0xC3242FE952F2409AULL }, /* XSUM_XXH3_withSecret_testdata[2135] */\n    { 2136, 0x0000000000000000ULL, 0xC884F8B40EA4D506ULL }, /* XSUM_XXH3_withSecret_testdata[2136] */\n    { 2137, 0x0000000000000000ULL, 0x61E514D4720C4879ULL }, /* XSUM_XXH3_withSecret_testdata[2137] */\n    { 2138, 0x0000000000000000ULL, 0xEDD2803ED3C69260ULL }, /* XSUM_XXH3_withSecret_testdata[2138] */\n    { 2139, 0x0000000000000000ULL, 0x7D410220AE855F6BULL }, /* XSUM_XXH3_withSecret_testdata[2139] */\n    { 2140, 0x0000000000000000ULL, 0xB585C3659C5134AAULL }, /* XSUM_XXH3_withSecret_testdata[2140] */\n    { 2141, 0x0000000000000000ULL, 0xE7A30A7EEBBE9FE5ULL }, /* XSUM_XXH3_withSecret_testdata[2141] */\n    { 2142, 0x0000000000000000ULL, 0x3D48856325430C1EULL }, /* XSUM_XXH3_withSecret_testdata[2142] */\n    { 2143, 0x0000000000000000ULL, 0xB6C9104D13537A3FULL }, /* XSUM_XXH3_withSecret_testdata[2143] */\n    { 2144, 0x0000000000000000ULL, 0x52432918B4F4334BULL }, /* XSUM_XXH3_withSecret_testdata[2144] */\n    { 2145, 0x0000000000000000ULL, 0x1E9DFCF70AFEA2C6ULL }, /* XSUM_XXH3_withSecret_testdata[2145] */\n    { 2146, 0x0000000000000000ULL, 0xDF53EC34725FEF8DULL }, /* XSUM_XXH3_withSecret_testdata[2146] */\n    { 2147, 0x0000000000000000ULL, 0xE02E5F9CED9796F5ULL }, /* XSUM_XXH3_withSecret_testdata[2147] */\n    { 2148, 0x0000000000000000ULL, 0x67C08B1347A9FBE6ULL }, /* XSUM_XXH3_withSecret_testdata[2148] */\n    { 2149, 0x0000000000000000ULL, 0x596ACD131E8324E6ULL }, /* XSUM_XXH3_withSecret_testdata[2149] */\n    { 2150, 0x0000000000000000ULL, 0x857B573F75AF45B3ULL }, /* XSUM_XXH3_withSecret_testdata[2150] */\n    { 2151, 0x0000000000000000ULL, 0xF621184FD7387501ULL }, /* XSUM_XXH3_withSecret_testdata[2151] */\n    { 2152, 0x0000000000000000ULL, 0xBF3DD7EA4DA7F9B3ULL }, /* XSUM_XXH3_withSecret_testdata[2152] */\n    { 2153, 0x0000000000000000ULL, 0xA778BD9689DA8D92ULL }, /* XSUM_XXH3_withSecret_testdata[2153] */\n    { 2154, 0x0000000000000000ULL, 0xF9F8714A7D2B38D8ULL }, /* XSUM_XXH3_withSecret_testdata[2154] */\n    { 2155, 0x0000000000000000ULL, 0x8F1D87FA7292F138ULL }, /* XSUM_XXH3_withSecret_testdata[2155] */\n    { 2156, 0x0000000000000000ULL, 0xC5545D2DAD173E28ULL }, /* XSUM_XXH3_withSecret_testdata[2156] */\n    { 2157, 0x0000000000000000ULL, 0xB51D09BF3D4A4F17ULL }, /* XSUM_XXH3_withSecret_testdata[2157] */\n    { 2158, 0x0000000000000000ULL, 0x3E4D380ABA6BBED3ULL }, /* XSUM_XXH3_withSecret_testdata[2158] */\n    { 2159, 0x0000000000000000ULL, 0xD87EDF8499C1EFCBULL }, /* XSUM_XXH3_withSecret_testdata[2159] */\n    { 2160, 0x0000000000000000ULL, 0x883CAFC7E6BDA01FULL }, /* XSUM_XXH3_withSecret_testdata[2160] */\n    { 2161, 0x0000000000000000ULL, 0xC2A0A8C60408CB03ULL }, /* XSUM_XXH3_withSecret_testdata[2161] */\n    { 2162, 0x0000000000000000ULL, 0x4FF2D7CF67B9D722ULL }, /* XSUM_XXH3_withSecret_testdata[2162] */\n    { 2163, 0x0000000000000000ULL, 0xC6A790AC7051FDA7ULL }, /* XSUM_XXH3_withSecret_testdata[2163] */\n    { 2164, 0x0000000000000000ULL, 0x290824A0B617FAA1ULL }, /* XSUM_XXH3_withSecret_testdata[2164] */\n    { 2165, 0x0000000000000000ULL, 0x70926C396EEF2312ULL }, /* XSUM_XXH3_withSecret_testdata[2165] */\n    { 2166, 0x0000000000000000ULL, 0xD1760A6B92C41E94ULL }, /* XSUM_XXH3_withSecret_testdata[2166] */\n    { 2167, 0x0000000000000000ULL, 0x6EF1770EA5C074AFULL }, /* XSUM_XXH3_withSecret_testdata[2167] */\n    { 2168, 0x0000000000000000ULL, 0xAEDE9A122E3DF1EDULL }, /* XSUM_XXH3_withSecret_testdata[2168] */\n    { 2169, 0x0000000000000000ULL, 0x97966969D62D7923ULL }, /* XSUM_XXH3_withSecret_testdata[2169] */\n    { 2170, 0x0000000000000000ULL, 0x1C92CB86837BA1EAULL }, /* XSUM_XXH3_withSecret_testdata[2170] */\n    { 2171, 0x0000000000000000ULL, 0x1CDC56581C55A9C6ULL }, /* XSUM_XXH3_withSecret_testdata[2171] */\n    { 2172, 0x0000000000000000ULL, 0x3636D7EA7BC90F01ULL }, /* XSUM_XXH3_withSecret_testdata[2172] */\n    { 2173, 0x0000000000000000ULL, 0x38048B8DEA0CA60AULL }, /* XSUM_XXH3_withSecret_testdata[2173] */\n    { 2174, 0x0000000000000000ULL, 0xD02B6B9E5AA664EAULL }, /* XSUM_XXH3_withSecret_testdata[2174] */\n    { 2175, 0x0000000000000000ULL, 0x0539B782E6DFBD35ULL }, /* XSUM_XXH3_withSecret_testdata[2175] */\n    { 2176, 0x0000000000000000ULL, 0xD6E73682701B5995ULL }, /* XSUM_XXH3_withSecret_testdata[2176] */\n    { 2177, 0x0000000000000000ULL, 0x60B860587E195139ULL }, /* XSUM_XXH3_withSecret_testdata[2177] */\n    { 2178, 0x0000000000000000ULL, 0x25EE8AEA8EEA3138ULL }, /* XSUM_XXH3_withSecret_testdata[2178] */\n    { 2179, 0x0000000000000000ULL, 0x50CB0FCF6C709664ULL }, /* XSUM_XXH3_withSecret_testdata[2179] */\n    { 2180, 0x0000000000000000ULL, 0xE174F4506DC059A0ULL }, /* XSUM_XXH3_withSecret_testdata[2180] */\n    { 2181, 0x0000000000000000ULL, 0x29F30375099FD331ULL }, /* XSUM_XXH3_withSecret_testdata[2181] */\n    { 2182, 0x0000000000000000ULL, 0x0911ED3330826D10ULL }, /* XSUM_XXH3_withSecret_testdata[2182] */\n    { 2183, 0x0000000000000000ULL, 0x09DB411B3F57F5EAULL }, /* XSUM_XXH3_withSecret_testdata[2183] */\n    { 2184, 0x0000000000000000ULL, 0x20E42F7D0F648E29ULL }, /* XSUM_XXH3_withSecret_testdata[2184] */\n    { 2185, 0x0000000000000000ULL, 0x26EEDE1A6CED9BDAULL }, /* XSUM_XXH3_withSecret_testdata[2185] */\n    { 2186, 0x0000000000000000ULL, 0x1BFFC9DF26D340F9ULL }, /* XSUM_XXH3_withSecret_testdata[2186] */\n    { 2187, 0x0000000000000000ULL, 0x2EDA55B6A2EF296AULL }, /* XSUM_XXH3_withSecret_testdata[2187] */\n    { 2188, 0x0000000000000000ULL, 0x4E36B8B0DE4FC569ULL }, /* XSUM_XXH3_withSecret_testdata[2188] */\n    { 2189, 0x0000000000000000ULL, 0xB3F247689FEA7D39ULL }, /* XSUM_XXH3_withSecret_testdata[2189] */\n    { 2190, 0x0000000000000000ULL, 0xAA5325019870AA88ULL }, /* XSUM_XXH3_withSecret_testdata[2190] */\n    { 2191, 0x0000000000000000ULL, 0xAF1F74B12B1598BCULL }, /* XSUM_XXH3_withSecret_testdata[2191] */\n    { 2192, 0x0000000000000000ULL, 0x3758717C3AEF2F7DULL }, /* XSUM_XXH3_withSecret_testdata[2192] */\n    { 2193, 0x0000000000000000ULL, 0x1F4624F680940704ULL }, /* XSUM_XXH3_withSecret_testdata[2193] */\n    { 2194, 0x0000000000000000ULL, 0x7A29300A4BFC4F98ULL }, /* XSUM_XXH3_withSecret_testdata[2194] */\n    { 2195, 0x0000000000000000ULL, 0x9BCA2AF8728075FDULL }, /* XSUM_XXH3_withSecret_testdata[2195] */\n    { 2196, 0x0000000000000000ULL, 0xAE4D849184AD3BDDULL }, /* XSUM_XXH3_withSecret_testdata[2196] */\n    { 2197, 0x0000000000000000ULL, 0xA1B5FAF56D9DFF7FULL }, /* XSUM_XXH3_withSecret_testdata[2197] */\n    { 2198, 0x0000000000000000ULL, 0xF06E29546BEB29FEULL }, /* XSUM_XXH3_withSecret_testdata[2198] */\n    { 2199, 0x0000000000000000ULL, 0x6899A86016F32CCCULL }, /* XSUM_XXH3_withSecret_testdata[2199] */\n    { 2200, 0x0000000000000000ULL, 0x336C1F494516C5CFULL }, /* XSUM_XXH3_withSecret_testdata[2200] */\n    { 2201, 0x0000000000000000ULL, 0x909390D4ECF72E10ULL }, /* XSUM_XXH3_withSecret_testdata[2201] */\n    { 2202, 0x0000000000000000ULL, 0x1D36F744CA69DEFDULL }, /* XSUM_XXH3_withSecret_testdata[2202] */\n    { 2203, 0x0000000000000000ULL, 0xFD829BB76B9D4869ULL }, /* XSUM_XXH3_withSecret_testdata[2203] */\n    { 2204, 0x0000000000000000ULL, 0x5C039EDB6334D64FULL }, /* XSUM_XXH3_withSecret_testdata[2204] */\n    { 2205, 0x0000000000000000ULL, 0xE5B34EBBF9D385B4ULL }, /* XSUM_XXH3_withSecret_testdata[2205] */\n    { 2206, 0x0000000000000000ULL, 0xCAE9F8B87FD48178ULL }, /* XSUM_XXH3_withSecret_testdata[2206] */\n    { 2207, 0x0000000000000000ULL, 0xE7C0334ED41AAD82ULL }, /* XSUM_XXH3_withSecret_testdata[2207] */\n    { 2208, 0x0000000000000000ULL, 0x25DB0183D11240A7ULL }, /* XSUM_XXH3_withSecret_testdata[2208] */\n    { 2209, 0x0000000000000000ULL, 0x25BE6E483CA29A06ULL }, /* XSUM_XXH3_withSecret_testdata[2209] */\n    { 2210, 0x0000000000000000ULL, 0x6EEC50B126409696ULL }, /* XSUM_XXH3_withSecret_testdata[2210] */\n    { 2211, 0x0000000000000000ULL, 0x28630B9216B6B1B5ULL }, /* XSUM_XXH3_withSecret_testdata[2211] */\n    { 2212, 0x0000000000000000ULL, 0xDD5F2BB4C8213D2CULL }, /* XSUM_XXH3_withSecret_testdata[2212] */\n    { 2213, 0x0000000000000000ULL, 0xF73FDB2ABD004047ULL }, /* XSUM_XXH3_withSecret_testdata[2213] */\n    { 2214, 0x0000000000000000ULL, 0x5FC59786B18C00A6ULL }, /* XSUM_XXH3_withSecret_testdata[2214] */\n    { 2215, 0x0000000000000000ULL, 0xF60C96501D50DFB6ULL }, /* XSUM_XXH3_withSecret_testdata[2215] */\n    { 2216, 0x0000000000000000ULL, 0x22E2D42C123565EDULL }, /* XSUM_XXH3_withSecret_testdata[2216] */\n    { 2217, 0x0000000000000000ULL, 0x9A708BA1C587E313ULL }, /* XSUM_XXH3_withSecret_testdata[2217] */\n    { 2218, 0x0000000000000000ULL, 0x39F4108425FE61D9ULL }, /* XSUM_XXH3_withSecret_testdata[2218] */\n    { 2219, 0x0000000000000000ULL, 0x28B00C7A4B8226A6ULL }, /* XSUM_XXH3_withSecret_testdata[2219] */\n    { 2220, 0x0000000000000000ULL, 0x7D1E4243181151E6ULL }, /* XSUM_XXH3_withSecret_testdata[2220] */\n    { 2221, 0x0000000000000000ULL, 0x79C7FAEB4BA041BEULL }, /* XSUM_XXH3_withSecret_testdata[2221] */\n    { 2222, 0x0000000000000000ULL, 0x6ED768A5652D7700ULL }, /* XSUM_XXH3_withSecret_testdata[2222] */\n    { 2223, 0x0000000000000000ULL, 0xF9A78935B335652DULL }, /* XSUM_XXH3_withSecret_testdata[2223] */\n    { 2224, 0x0000000000000000ULL, 0x5D7FF63F85C6ED9AULL }, /* XSUM_XXH3_withSecret_testdata[2224] */\n    { 2225, 0x0000000000000000ULL, 0xD8B9E693B3AAB45EULL }, /* XSUM_XXH3_withSecret_testdata[2225] */\n    { 2226, 0x0000000000000000ULL, 0xF413F7EFF888972FULL }, /* XSUM_XXH3_withSecret_testdata[2226] */\n    { 2227, 0x0000000000000000ULL, 0xC96DC8C5385F67D2ULL }, /* XSUM_XXH3_withSecret_testdata[2227] */\n    { 2228, 0x0000000000000000ULL, 0xAA1F998B9558EFFCULL }, /* XSUM_XXH3_withSecret_testdata[2228] */\n    { 2229, 0x0000000000000000ULL, 0xD3A161393EC9F87FULL }, /* XSUM_XXH3_withSecret_testdata[2229] */\n    { 2230, 0x0000000000000000ULL, 0xA0A3A55CF9468C9EULL }, /* XSUM_XXH3_withSecret_testdata[2230] */\n    { 2231, 0x0000000000000000ULL, 0x7C0D4337C9FDD88AULL }, /* XSUM_XXH3_withSecret_testdata[2231] */\n    { 2232, 0x0000000000000000ULL, 0xB6F588D74008E382ULL }, /* XSUM_XXH3_withSecret_testdata[2232] */\n    { 2233, 0x0000000000000000ULL, 0xD6079562C6E6FCB2ULL }, /* XSUM_XXH3_withSecret_testdata[2233] */\n    { 2234, 0x0000000000000000ULL, 0x226100ED97CBBDF4ULL }, /* XSUM_XXH3_withSecret_testdata[2234] */\n    { 2235, 0x0000000000000000ULL, 0xA4B6FE30750DD2DFULL }, /* XSUM_XXH3_withSecret_testdata[2235] */\n    { 2236, 0x0000000000000000ULL, 0x08B202BF52DDF891ULL }, /* XSUM_XXH3_withSecret_testdata[2236] */\n    { 2237, 0x0000000000000000ULL, 0xBD6A715D6EC4A2FEULL }, /* XSUM_XXH3_withSecret_testdata[2237] */\n    { 2238, 0x0000000000000000ULL, 0x83AF768E4FC9DCAEULL }, /* XSUM_XXH3_withSecret_testdata[2238] */\n    { 2239, 0x0000000000000000ULL, 0xC9A9023234565E91ULL }, /* XSUM_XXH3_withSecret_testdata[2239] */\n    { 2240, 0x0000000000000000ULL, 0xB26C938C7AF3A71FULL }, /* XSUM_XXH3_withSecret_testdata[2240] */\n    { 2241, 0x0000000000000000ULL, 0xBC5C9973093ED600ULL }, /* XSUM_XXH3_withSecret_testdata[2241] */\n    { 2242, 0x0000000000000000ULL, 0xC4A13D1873FFABCEULL }, /* XSUM_XXH3_withSecret_testdata[2242] */\n    { 2243, 0x0000000000000000ULL, 0x27BDD19F2D168989ULL }, /* XSUM_XXH3_withSecret_testdata[2243] */\n    { 2244, 0x0000000000000000ULL, 0xC77DEEBE4BF19064ULL }, /* XSUM_XXH3_withSecret_testdata[2244] */\n    { 2245, 0x0000000000000000ULL, 0x7EC103ADD9B43ADDULL }, /* XSUM_XXH3_withSecret_testdata[2245] */\n    { 2246, 0x0000000000000000ULL, 0xEF03C35D9751C6F4ULL }, /* XSUM_XXH3_withSecret_testdata[2246] */\n    { 2247, 0x0000000000000000ULL, 0x804531532668391EULL }, /* XSUM_XXH3_withSecret_testdata[2247] */\n    { 2248, 0x0000000000000000ULL, 0x5CBDBD17A3538DF8ULL }, /* XSUM_XXH3_withSecret_testdata[2248] */\n    { 2249, 0x0000000000000000ULL, 0x72C149715AD0517BULL }, /* XSUM_XXH3_withSecret_testdata[2249] */\n    { 2250, 0x0000000000000000ULL, 0xF3E97C36038D1D60ULL }, /* XSUM_XXH3_withSecret_testdata[2250] */\n    { 2251, 0x0000000000000000ULL, 0x5145D630BC5A53BFULL }, /* XSUM_XXH3_withSecret_testdata[2251] */\n    { 2252, 0x0000000000000000ULL, 0x59BA7CA921C1230DULL }, /* XSUM_XXH3_withSecret_testdata[2252] */\n    { 2253, 0x0000000000000000ULL, 0xC70763A3879EE91EULL }, /* XSUM_XXH3_withSecret_testdata[2253] */\n    { 2254, 0x0000000000000000ULL, 0x8199110ED9BBA114ULL }, /* XSUM_XXH3_withSecret_testdata[2254] */\n    { 2255, 0x0000000000000000ULL, 0x2354D7FE431DAE7AULL }, /* XSUM_XXH3_withSecret_testdata[2255] */\n    { 2256, 0x0000000000000000ULL, 0x09CD399A744FB965ULL }, /* XSUM_XXH3_withSecret_testdata[2256] */\n    { 2257, 0x0000000000000000ULL, 0x55D9C79A8AA3DA7BULL }, /* XSUM_XXH3_withSecret_testdata[2257] */\n    { 2258, 0x0000000000000000ULL, 0xFA30DE23B3836096ULL }, /* XSUM_XXH3_withSecret_testdata[2258] */\n    { 2259, 0x0000000000000000ULL, 0x713D5DB68DB30414ULL }, /* XSUM_XXH3_withSecret_testdata[2259] */\n    { 2260, 0x0000000000000000ULL, 0x4193437A072082D0ULL }, /* XSUM_XXH3_withSecret_testdata[2260] */\n    { 2261, 0x0000000000000000ULL, 0xC1BC64C4C4C9619CULL }, /* XSUM_XXH3_withSecret_testdata[2261] */\n    { 2262, 0x0000000000000000ULL, 0xAEE890BF51352B13ULL }, /* XSUM_XXH3_withSecret_testdata[2262] */\n    { 2263, 0x0000000000000000ULL, 0x6723CC64A6E66603ULL }, /* XSUM_XXH3_withSecret_testdata[2263] */\n    { 2264, 0x0000000000000000ULL, 0xAE56CAEA5D1B01C7ULL }, /* XSUM_XXH3_withSecret_testdata[2264] */\n    { 2265, 0x0000000000000000ULL, 0x6342032FC46E6EECULL }, /* XSUM_XXH3_withSecret_testdata[2265] */\n    { 2266, 0x0000000000000000ULL, 0x85C23DB28F6047E2ULL }, /* XSUM_XXH3_withSecret_testdata[2266] */\n    { 2267, 0x0000000000000000ULL, 0x4FCD32B63E1A64DAULL }, /* XSUM_XXH3_withSecret_testdata[2267] */\n    { 2268, 0x0000000000000000ULL, 0xE8C4F61E1DC023B4ULL }, /* XSUM_XXH3_withSecret_testdata[2268] */\n    { 2269, 0x0000000000000000ULL, 0x4471974B48134F1FULL }, /* XSUM_XXH3_withSecret_testdata[2269] */\n    { 2270, 0x0000000000000000ULL, 0x4B574C457CC748ACULL }, /* XSUM_XXH3_withSecret_testdata[2270] */\n    { 2271, 0x0000000000000000ULL, 0x8B961ABE89821A5BULL }, /* XSUM_XXH3_withSecret_testdata[2271] */\n    { 2272, 0x0000000000000000ULL, 0xB4F162F7476B02F8ULL }, /* XSUM_XXH3_withSecret_testdata[2272] */\n    { 2273, 0x0000000000000000ULL, 0xA8596A044226B4B5ULL }, /* XSUM_XXH3_withSecret_testdata[2273] */\n    { 2274, 0x0000000000000000ULL, 0xB46AE2C707E652EDULL }, /* XSUM_XXH3_withSecret_testdata[2274] */\n    { 2275, 0x0000000000000000ULL, 0x8998E0503123BD36ULL }, /* XSUM_XXH3_withSecret_testdata[2275] */\n    { 2276, 0x0000000000000000ULL, 0x6920D7B185CFA861ULL }, /* XSUM_XXH3_withSecret_testdata[2276] */\n    { 2277, 0x0000000000000000ULL, 0xD5382417A6B1CC5AULL }, /* XSUM_XXH3_withSecret_testdata[2277] */\n    { 2278, 0x0000000000000000ULL, 0x1FC5895FF42CFCFFULL }, /* XSUM_XXH3_withSecret_testdata[2278] */\n    { 2279, 0x0000000000000000ULL, 0xE3383CF25DFB4830ULL }, /* XSUM_XXH3_withSecret_testdata[2279] */\n    { 2280, 0x0000000000000000ULL, 0x1D7738B4E24E553BULL }, /* XSUM_XXH3_withSecret_testdata[2280] */\n    { 2281, 0x0000000000000000ULL, 0x13240DE7D612861EULL }, /* XSUM_XXH3_withSecret_testdata[2281] */\n    { 2282, 0x0000000000000000ULL, 0xFF572AB52662D912ULL }, /* XSUM_XXH3_withSecret_testdata[2282] */\n    { 2283, 0x0000000000000000ULL, 0xB7C29C229F6BE899ULL }, /* XSUM_XXH3_withSecret_testdata[2283] */\n    { 2284, 0x0000000000000000ULL, 0x0BBB745326479CDBULL }, /* XSUM_XXH3_withSecret_testdata[2284] */\n    { 2285, 0x0000000000000000ULL, 0x947D7531189C1D65ULL }, /* XSUM_XXH3_withSecret_testdata[2285] */\n    { 2286, 0x0000000000000000ULL, 0x9ABD6EF3250F1494ULL }, /* XSUM_XXH3_withSecret_testdata[2286] */\n    { 2287, 0x0000000000000000ULL, 0xCC3115D4324406D1ULL }, /* XSUM_XXH3_withSecret_testdata[2287] */\n    { 2288, 0x0000000000000000ULL, 0xD818495BF495BBB8ULL }, /* XSUM_XXH3_withSecret_testdata[2288] */\n    { 2289, 0x0000000000000000ULL, 0xE3F0E0CBDAA66C3DULL }, /* XSUM_XXH3_withSecret_testdata[2289] */\n    { 2290, 0x0000000000000000ULL, 0x93CFDB535AAEF8A6ULL }, /* XSUM_XXH3_withSecret_testdata[2290] */\n    { 2291, 0x0000000000000000ULL, 0xE824856FC547AED2ULL }, /* XSUM_XXH3_withSecret_testdata[2291] */\n    { 2292, 0x0000000000000000ULL, 0x1F24C86993C3DA02ULL }, /* XSUM_XXH3_withSecret_testdata[2292] */\n    { 2293, 0x0000000000000000ULL, 0xD101BD8752C5CA57ULL }, /* XSUM_XXH3_withSecret_testdata[2293] */\n    { 2294, 0x0000000000000000ULL, 0xE0F688D96576672CULL }, /* XSUM_XXH3_withSecret_testdata[2294] */\n    { 2295, 0x0000000000000000ULL, 0xB0BE8DAE214360EDULL }, /* XSUM_XXH3_withSecret_testdata[2295] */\n    { 2296, 0x0000000000000000ULL, 0xED767DDFE4DD76FBULL }, /* XSUM_XXH3_withSecret_testdata[2296] */\n    { 2297, 0x0000000000000000ULL, 0x1416BB25000457C6ULL }, /* XSUM_XXH3_withSecret_testdata[2297] */\n    { 2298, 0x0000000000000000ULL, 0x8D3763863C621A67ULL }, /* XSUM_XXH3_withSecret_testdata[2298] */\n    { 2299, 0x0000000000000000ULL, 0xBA806D61C6F26C17ULL }, /* XSUM_XXH3_withSecret_testdata[2299] */\n    { 2300, 0x0000000000000000ULL, 0x078884BAD7E55EECULL }, /* XSUM_XXH3_withSecret_testdata[2300] */\n    { 2301, 0x0000000000000000ULL, 0xF20409B35741CA4EULL }, /* XSUM_XXH3_withSecret_testdata[2301] */\n    { 2302, 0x0000000000000000ULL, 0xDD6DE3189F1F5F24ULL }, /* XSUM_XXH3_withSecret_testdata[2302] */\n    { 2303, 0x0000000000000000ULL, 0xD84AE042F62F6A58ULL }, /* XSUM_XXH3_withSecret_testdata[2303] */\n    { 2304, 0x0000000000000000ULL, 0x1EA95AF94ECBAF21ULL }, /* XSUM_XXH3_withSecret_testdata[2304] */\n    { 2305, 0x0000000000000000ULL, 0x32D8780451319123ULL }, /* XSUM_XXH3_withSecret_testdata[2305] */\n    { 2306, 0x0000000000000000ULL, 0xA67F9361F98F5946ULL }, /* XSUM_XXH3_withSecret_testdata[2306] */\n    { 2307, 0x0000000000000000ULL, 0x4D14CC2887932B7BULL }, /* XSUM_XXH3_withSecret_testdata[2307] */\n    { 2308, 0x0000000000000000ULL, 0xB6E4E4BD5025430FULL }, /* XSUM_XXH3_withSecret_testdata[2308] */\n    { 2309, 0x0000000000000000ULL, 0xB2DE0721E6E6D689ULL }, /* XSUM_XXH3_withSecret_testdata[2309] */\n    { 2310, 0x0000000000000000ULL, 0x2816A89C31EF1425ULL }, /* XSUM_XXH3_withSecret_testdata[2310] */\n    { 2311, 0x0000000000000000ULL, 0xC97BF984197E16AAULL }, /* XSUM_XXH3_withSecret_testdata[2311] */\n    { 2312, 0x0000000000000000ULL, 0x7A2F77A7BD35086DULL }, /* XSUM_XXH3_withSecret_testdata[2312] */\n    { 2313, 0x0000000000000000ULL, 0xC7FC1669D8D4501EULL }, /* XSUM_XXH3_withSecret_testdata[2313] */\n    { 2314, 0x0000000000000000ULL, 0xBA1B459E031C39DDULL }, /* XSUM_XXH3_withSecret_testdata[2314] */\n    { 2315, 0x0000000000000000ULL, 0x10A540C71BE0860FULL }, /* XSUM_XXH3_withSecret_testdata[2315] */\n    { 2316, 0x0000000000000000ULL, 0xF4B0C0B556056656ULL }, /* XSUM_XXH3_withSecret_testdata[2316] */\n    { 2317, 0x0000000000000000ULL, 0x7034B160B689BD8DULL }, /* XSUM_XXH3_withSecret_testdata[2317] */\n    { 2318, 0x0000000000000000ULL, 0x72ED1F0D11CA236EULL }, /* XSUM_XXH3_withSecret_testdata[2318] */\n    { 2319, 0x0000000000000000ULL, 0x91A5EDED19E6B21DULL }, /* XSUM_XXH3_withSecret_testdata[2319] */\n    { 2320, 0x0000000000000000ULL, 0x9D1DD02EBF7D1EACULL }, /* XSUM_XXH3_withSecret_testdata[2320] */\n    { 2321, 0x0000000000000000ULL, 0x4A96D43422E9788CULL }, /* XSUM_XXH3_withSecret_testdata[2321] */\n    { 2322, 0x0000000000000000ULL, 0x28A8AE128E2400E9ULL }, /* XSUM_XXH3_withSecret_testdata[2322] */\n    { 2323, 0x0000000000000000ULL, 0x7A8ADC44D0CE36A3ULL }, /* XSUM_XXH3_withSecret_testdata[2323] */\n    { 2324, 0x0000000000000000ULL, 0xA22FE5073B324209ULL }, /* XSUM_XXH3_withSecret_testdata[2324] */\n    { 2325, 0x0000000000000000ULL, 0x63EBA538567ABC9BULL }, /* XSUM_XXH3_withSecret_testdata[2325] */\n    { 2326, 0x0000000000000000ULL, 0xC5339DEFE5025E17ULL }, /* XSUM_XXH3_withSecret_testdata[2326] */\n    { 2327, 0x0000000000000000ULL, 0x3E4BD70D3109D5BDULL }, /* XSUM_XXH3_withSecret_testdata[2327] */\n    { 2328, 0x0000000000000000ULL, 0xE77E5092D3C9423DULL }, /* XSUM_XXH3_withSecret_testdata[2328] */\n    { 2329, 0x0000000000000000ULL, 0xAE061850019DBE99ULL }, /* XSUM_XXH3_withSecret_testdata[2329] */\n    { 2330, 0x0000000000000000ULL, 0xE1F39AB61B422293ULL }, /* XSUM_XXH3_withSecret_testdata[2330] */\n    { 2331, 0x0000000000000000ULL, 0x62DB49AFC1C4F8FDULL }, /* XSUM_XXH3_withSecret_testdata[2331] */\n    { 2332, 0x0000000000000000ULL, 0x0E15D12F409EAF30ULL }, /* XSUM_XXH3_withSecret_testdata[2332] */\n    { 2333, 0x0000000000000000ULL, 0xA6F5062EC3828EF0ULL }, /* XSUM_XXH3_withSecret_testdata[2333] */\n    { 2334, 0x0000000000000000ULL, 0x36B250A63D1C818BULL }, /* XSUM_XXH3_withSecret_testdata[2334] */\n    { 2335, 0x0000000000000000ULL, 0xDFABE5A2F7961DDFULL }, /* XSUM_XXH3_withSecret_testdata[2335] */\n    { 2336, 0x0000000000000000ULL, 0x67A437068B4C2600ULL }, /* XSUM_XXH3_withSecret_testdata[2336] */\n    { 2337, 0x0000000000000000ULL, 0x1BA587D9A6DB72C3ULL }, /* XSUM_XXH3_withSecret_testdata[2337] */\n    { 2338, 0x0000000000000000ULL, 0x538AEE8149587087ULL }, /* XSUM_XXH3_withSecret_testdata[2338] */\n    { 2339, 0x0000000000000000ULL, 0x3285AAB013567C5FULL }, /* XSUM_XXH3_withSecret_testdata[2339] */\n    { 2340, 0x0000000000000000ULL, 0xC26F3DEE44BF2EA9ULL }, /* XSUM_XXH3_withSecret_testdata[2340] */\n    { 2341, 0x0000000000000000ULL, 0x348A7241B6AD28A7ULL }, /* XSUM_XXH3_withSecret_testdata[2341] */\n    { 2342, 0x0000000000000000ULL, 0xDDF55A6756E09B30ULL }, /* XSUM_XXH3_withSecret_testdata[2342] */\n    { 2343, 0x0000000000000000ULL, 0x3E8B939249709C03ULL }, /* XSUM_XXH3_withSecret_testdata[2343] */\n    { 2344, 0x0000000000000000ULL, 0x91CF4DD9B8F8177EULL }, /* XSUM_XXH3_withSecret_testdata[2344] */\n    { 2345, 0x0000000000000000ULL, 0x41ECB4ED9F081942ULL }, /* XSUM_XXH3_withSecret_testdata[2345] */\n    { 2346, 0x0000000000000000ULL, 0xAEB871BD0869CDE0ULL }, /* XSUM_XXH3_withSecret_testdata[2346] */\n    { 2347, 0x0000000000000000ULL, 0x9038DEA18662CC53ULL }, /* XSUM_XXH3_withSecret_testdata[2347] */\n    { 2348, 0x0000000000000000ULL, 0xBDACB85FB4C86F0EULL }, /* XSUM_XXH3_withSecret_testdata[2348] */\n    { 2349, 0x0000000000000000ULL, 0x105F2CB1E1EC335EULL }, /* XSUM_XXH3_withSecret_testdata[2349] */\n    { 2350, 0x0000000000000000ULL, 0x090F11A76291D38DULL }, /* XSUM_XXH3_withSecret_testdata[2350] */\n    { 2351, 0x0000000000000000ULL, 0x237DE0A8D44955B6ULL }, /* XSUM_XXH3_withSecret_testdata[2351] */\n    { 2352, 0x0000000000000000ULL, 0x7E0F9D584CF5208AULL }, /* XSUM_XXH3_withSecret_testdata[2352] */\n    { 2353, 0x0000000000000000ULL, 0x7EF09D5885593DB0ULL }, /* XSUM_XXH3_withSecret_testdata[2353] */\n    { 2354, 0x0000000000000000ULL, 0xD6BE93AAA0B8A89FULL }, /* XSUM_XXH3_withSecret_testdata[2354] */\n    { 2355, 0x0000000000000000ULL, 0x7D15F8309D70544CULL }, /* XSUM_XXH3_withSecret_testdata[2355] */\n    { 2356, 0x0000000000000000ULL, 0xB5F14F5E7471A2B7ULL }, /* XSUM_XXH3_withSecret_testdata[2356] */\n    { 2357, 0x0000000000000000ULL, 0x334064923E684682ULL }, /* XSUM_XXH3_withSecret_testdata[2357] */\n    { 2358, 0x0000000000000000ULL, 0xFF30F03C59F38BBDULL }, /* XSUM_XXH3_withSecret_testdata[2358] */\n    { 2359, 0x0000000000000000ULL, 0x3A762E4100546EA4ULL }, /* XSUM_XXH3_withSecret_testdata[2359] */\n    { 2360, 0x0000000000000000ULL, 0xD9DDC565C9E9A0E7ULL }, /* XSUM_XXH3_withSecret_testdata[2360] */\n    { 2361, 0x0000000000000000ULL, 0x70F36B58887180BBULL }, /* XSUM_XXH3_withSecret_testdata[2361] */\n    { 2362, 0x0000000000000000ULL, 0x29BF285E3EBA4ED9ULL }, /* XSUM_XXH3_withSecret_testdata[2362] */\n    { 2363, 0x0000000000000000ULL, 0x14FC2BC449A6ECF0ULL }, /* XSUM_XXH3_withSecret_testdata[2363] */\n    { 2364, 0x0000000000000000ULL, 0xFE96956AB41CD859ULL }, /* XSUM_XXH3_withSecret_testdata[2364] */\n    { 2365, 0x0000000000000000ULL, 0xBB96D17D6E83D9C9ULL }, /* XSUM_XXH3_withSecret_testdata[2365] */\n    { 2366, 0x0000000000000000ULL, 0x6B4B68C062B0298AULL }, /* XSUM_XXH3_withSecret_testdata[2366] */\n    { 2367, 0x0000000000000000ULL, 0x293FA8E5173BB5E7ULL }, /* XSUM_XXH3_withSecret_testdata[2367] */\n    { 2368, 0x0000000000000000ULL, 0x1B882F5651079927ULL }, /* XSUM_XXH3_withSecret_testdata[2368] */\n    { 2369, 0x0000000000000000ULL, 0x6A188C171457CE57ULL }, /* XSUM_XXH3_withSecret_testdata[2369] */\n    { 2370, 0x0000000000000000ULL, 0xD3F44413B4D09324ULL }, /* XSUM_XXH3_withSecret_testdata[2370] */\n    { 2371, 0x0000000000000000ULL, 0x6C6CD3EA872E5A8CULL }, /* XSUM_XXH3_withSecret_testdata[2371] */\n    { 2372, 0x0000000000000000ULL, 0x79DFB0C0A6B634E0ULL }, /* XSUM_XXH3_withSecret_testdata[2372] */\n    { 2373, 0x0000000000000000ULL, 0xD1241D21D50CA4BAULL }, /* XSUM_XXH3_withSecret_testdata[2373] */\n    { 2374, 0x0000000000000000ULL, 0xF56B4D8A22A9B86FULL }, /* XSUM_XXH3_withSecret_testdata[2374] */\n    { 2375, 0x0000000000000000ULL, 0x87B5E3A9CD6C1B65ULL }, /* XSUM_XXH3_withSecret_testdata[2375] */\n    { 2376, 0x0000000000000000ULL, 0xFFC47ACC372230BFULL }, /* XSUM_XXH3_withSecret_testdata[2376] */\n    { 2377, 0x0000000000000000ULL, 0x5BED7B696B6C12F1ULL }, /* XSUM_XXH3_withSecret_testdata[2377] */\n    { 2378, 0x0000000000000000ULL, 0x18CE009FEDEE2156ULL }, /* XSUM_XXH3_withSecret_testdata[2378] */\n    { 2379, 0x0000000000000000ULL, 0xBDF6F810379417BAULL }, /* XSUM_XXH3_withSecret_testdata[2379] */\n    { 2380, 0x0000000000000000ULL, 0xC7F1AF342CE168D0ULL }, /* XSUM_XXH3_withSecret_testdata[2380] */\n    { 2381, 0x0000000000000000ULL, 0x0AAF181DD47DBB5DULL }, /* XSUM_XXH3_withSecret_testdata[2381] */\n    { 2382, 0x0000000000000000ULL, 0x1CF5DCB8CDB85907ULL }, /* XSUM_XXH3_withSecret_testdata[2382] */\n    { 2383, 0x0000000000000000ULL, 0x9E0F5C5CED32BE4FULL }, /* XSUM_XXH3_withSecret_testdata[2383] */\n    { 2384, 0x0000000000000000ULL, 0x522A7BA369A1B06AULL }, /* XSUM_XXH3_withSecret_testdata[2384] */\n    { 2385, 0x0000000000000000ULL, 0xEA13FB7B2DB0E8F7ULL }, /* XSUM_XXH3_withSecret_testdata[2385] */\n    { 2386, 0x0000000000000000ULL, 0x111C82EFEF4AC81CULL }, /* XSUM_XXH3_withSecret_testdata[2386] */\n    { 2387, 0x0000000000000000ULL, 0xD42417E6AB91AA73ULL }, /* XSUM_XXH3_withSecret_testdata[2387] */\n    { 2388, 0x0000000000000000ULL, 0xA5ED1CAE4267B139ULL }, /* XSUM_XXH3_withSecret_testdata[2388] */\n    { 2389, 0x0000000000000000ULL, 0x8B8F7C5BE746D545ULL }, /* XSUM_XXH3_withSecret_testdata[2389] */\n    { 2390, 0x0000000000000000ULL, 0xF1B79500277FA08CULL }, /* XSUM_XXH3_withSecret_testdata[2390] */\n    { 2391, 0x0000000000000000ULL, 0xAD9BD3DB0300687AULL }, /* XSUM_XXH3_withSecret_testdata[2391] */\n    { 2392, 0x0000000000000000ULL, 0x33D69ACF9C4FE222ULL }, /* XSUM_XXH3_withSecret_testdata[2392] */\n    { 2393, 0x0000000000000000ULL, 0x98A88A43B3E3CDBEULL }, /* XSUM_XXH3_withSecret_testdata[2393] */\n    { 2394, 0x0000000000000000ULL, 0x30A45D82B0F02EB7ULL }, /* XSUM_XXH3_withSecret_testdata[2394] */\n    { 2395, 0x0000000000000000ULL, 0x580A108EAD043AC9ULL }, /* XSUM_XXH3_withSecret_testdata[2395] */\n    { 2396, 0x0000000000000000ULL, 0x7429D8E3A53EE029ULL }, /* XSUM_XXH3_withSecret_testdata[2396] */\n    { 2397, 0x0000000000000000ULL, 0xEA9930AE2B2F60FBULL }, /* XSUM_XXH3_withSecret_testdata[2397] */\n    { 2398, 0x0000000000000000ULL, 0x0DA3DC8BCB20D64EULL }, /* XSUM_XXH3_withSecret_testdata[2398] */\n    { 2399, 0x0000000000000000ULL, 0x0C75205DB3508B7AULL }, /* XSUM_XXH3_withSecret_testdata[2399] */\n    { 2400, 0x0000000000000000ULL, 0x80D24D897A728551ULL }, /* XSUM_XXH3_withSecret_testdata[2400] */\n    { 2401, 0x0000000000000000ULL, 0xFE30EFE50F946152ULL }, /* XSUM_XXH3_withSecret_testdata[2401] */\n    { 2402, 0x0000000000000000ULL, 0x85E4BE18299D1285ULL }, /* XSUM_XXH3_withSecret_testdata[2402] */\n    { 2403, 0x0000000000000000ULL, 0xB2D074B0382F056EULL }, /* XSUM_XXH3_withSecret_testdata[2403] */\n    { 2404, 0x0000000000000000ULL, 0xA21EE5579EB5A4C9ULL }, /* XSUM_XXH3_withSecret_testdata[2404] */\n    { 2405, 0x0000000000000000ULL, 0xE790C026712CB55AULL }, /* XSUM_XXH3_withSecret_testdata[2405] */\n    { 2406, 0x0000000000000000ULL, 0x0F45A0AE8363254CULL }, /* XSUM_XXH3_withSecret_testdata[2406] */\n    { 2407, 0x0000000000000000ULL, 0xB3DA237C9CACA60EULL }, /* XSUM_XXH3_withSecret_testdata[2407] */\n    { 2408, 0x0000000000000000ULL, 0x70E33D72FA0DA509ULL }, /* XSUM_XXH3_withSecret_testdata[2408] */\n    { 2409, 0x0000000000000000ULL, 0x05EE5A65D7D947AFULL }, /* XSUM_XXH3_withSecret_testdata[2409] */\n    { 2410, 0x0000000000000000ULL, 0x4ECC270183F5940EULL }, /* XSUM_XXH3_withSecret_testdata[2410] */\n    { 2411, 0x0000000000000000ULL, 0x98CDFECB890A7AFFULL }, /* XSUM_XXH3_withSecret_testdata[2411] */\n    { 2412, 0x0000000000000000ULL, 0x895CA875DFC9CE10ULL }, /* XSUM_XXH3_withSecret_testdata[2412] */\n    { 2413, 0x0000000000000000ULL, 0xC6F78CB061FF6482ULL }, /* XSUM_XXH3_withSecret_testdata[2413] */\n    { 2414, 0x0000000000000000ULL, 0x8B1D3731F960D49CULL }, /* XSUM_XXH3_withSecret_testdata[2414] */\n    { 2415, 0x0000000000000000ULL, 0x7F0729071F504C31ULL }, /* XSUM_XXH3_withSecret_testdata[2415] */\n    { 2416, 0x0000000000000000ULL, 0xC6A780A664181A68ULL }, /* XSUM_XXH3_withSecret_testdata[2416] */\n    { 2417, 0x0000000000000000ULL, 0xE7715AD23570691DULL }, /* XSUM_XXH3_withSecret_testdata[2417] */\n    { 2418, 0x0000000000000000ULL, 0xBDCCF3236454FC8BULL }, /* XSUM_XXH3_withSecret_testdata[2418] */\n    { 2419, 0x0000000000000000ULL, 0x0932E0E9EDB1CD68ULL }, /* XSUM_XXH3_withSecret_testdata[2419] */\n    { 2420, 0x0000000000000000ULL, 0x433EE97B5C9631A8ULL }, /* XSUM_XXH3_withSecret_testdata[2420] */\n    { 2421, 0x0000000000000000ULL, 0xB6889338EC2C18E0ULL }, /* XSUM_XXH3_withSecret_testdata[2421] */\n    { 2422, 0x0000000000000000ULL, 0x8696A03271D1ECE7ULL }, /* XSUM_XXH3_withSecret_testdata[2422] */\n    { 2423, 0x0000000000000000ULL, 0xCEB3924AB5A6725FULL }, /* XSUM_XXH3_withSecret_testdata[2423] */\n    { 2424, 0x0000000000000000ULL, 0x20C9F0CD77CA41BCULL }, /* XSUM_XXH3_withSecret_testdata[2424] */\n    { 2425, 0x0000000000000000ULL, 0xC2505C37116B8B22ULL }, /* XSUM_XXH3_withSecret_testdata[2425] */\n    { 2426, 0x0000000000000000ULL, 0x70FD393B1C645A72ULL }, /* XSUM_XXH3_withSecret_testdata[2426] */\n    { 2427, 0x0000000000000000ULL, 0x07FFF1FA5AC85111ULL }, /* XSUM_XXH3_withSecret_testdata[2427] */\n    { 2428, 0x0000000000000000ULL, 0x8DEF2B5E61346C3CULL }, /* XSUM_XXH3_withSecret_testdata[2428] */\n    { 2429, 0x0000000000000000ULL, 0xD29906E134ECCBDEULL }, /* XSUM_XXH3_withSecret_testdata[2429] */\n    { 2430, 0x0000000000000000ULL, 0x9BFC0064C0007990ULL }, /* XSUM_XXH3_withSecret_testdata[2430] */\n    { 2431, 0x0000000000000000ULL, 0x4274443E4156CA77ULL }, /* XSUM_XXH3_withSecret_testdata[2431] */\n    { 2432, 0x0000000000000000ULL, 0x0D4D78D4EDF1FCB6ULL }, /* XSUM_XXH3_withSecret_testdata[2432] */\n    { 2433, 0x0000000000000000ULL, 0x2D55D642B7700A7CULL }, /* XSUM_XXH3_withSecret_testdata[2433] */\n    { 2434, 0x0000000000000000ULL, 0x24E462804F657DF5ULL }, /* XSUM_XXH3_withSecret_testdata[2434] */\n    { 2435, 0x0000000000000000ULL, 0x5D28B70B8FA63D27ULL }, /* XSUM_XXH3_withSecret_testdata[2435] */\n    { 2436, 0x0000000000000000ULL, 0x44F818945C47786DULL }, /* XSUM_XXH3_withSecret_testdata[2436] */\n    { 2437, 0x0000000000000000ULL, 0x281105C6C8092779ULL }, /* XSUM_XXH3_withSecret_testdata[2437] */\n    { 2438, 0x0000000000000000ULL, 0x869008B4D0AF7346ULL }, /* XSUM_XXH3_withSecret_testdata[2438] */\n    { 2439, 0x0000000000000000ULL, 0x3120496A0616B651ULL }, /* XSUM_XXH3_withSecret_testdata[2439] */\n    { 2440, 0x0000000000000000ULL, 0xD4DB81F310CEC01CULL }, /* XSUM_XXH3_withSecret_testdata[2440] */\n    { 2441, 0x0000000000000000ULL, 0x57362AF4E0DDF68AULL }, /* XSUM_XXH3_withSecret_testdata[2441] */\n    { 2442, 0x0000000000000000ULL, 0x95C96818627768E6ULL }, /* XSUM_XXH3_withSecret_testdata[2442] */\n    { 2443, 0x0000000000000000ULL, 0x2788FF564FEC3E57ULL }, /* XSUM_XXH3_withSecret_testdata[2443] */\n    { 2444, 0x0000000000000000ULL, 0x9C15B563D3265543ULL }, /* XSUM_XXH3_withSecret_testdata[2444] */\n    { 2445, 0x0000000000000000ULL, 0xFADBEF090BE12542ULL }, /* XSUM_XXH3_withSecret_testdata[2445] */\n    { 2446, 0x0000000000000000ULL, 0x3256859436D9DDF7ULL }, /* XSUM_XXH3_withSecret_testdata[2446] */\n    { 2447, 0x0000000000000000ULL, 0x8F5F40B4D39240A2ULL }, /* XSUM_XXH3_withSecret_testdata[2447] */\n    { 2448, 0x0000000000000000ULL, 0x0E00107DF805EB9CULL }, /* XSUM_XXH3_withSecret_testdata[2448] */\n    { 2449, 0x0000000000000000ULL, 0xAAFB5767B351AB41ULL }, /* XSUM_XXH3_withSecret_testdata[2449] */\n    { 2450, 0x0000000000000000ULL, 0x2D9FD1C8B0405917ULL }, /* XSUM_XXH3_withSecret_testdata[2450] */\n    { 2451, 0x0000000000000000ULL, 0x27308E0DDB72C823ULL }, /* XSUM_XXH3_withSecret_testdata[2451] */\n    { 2452, 0x0000000000000000ULL, 0xFB55B59AFFB43916ULL }, /* XSUM_XXH3_withSecret_testdata[2452] */\n    { 2453, 0x0000000000000000ULL, 0xC07DFEFCB5B2D5B6ULL }, /* XSUM_XXH3_withSecret_testdata[2453] */\n    { 2454, 0x0000000000000000ULL, 0x40879FA760711BAFULL }, /* XSUM_XXH3_withSecret_testdata[2454] */\n    { 2455, 0x0000000000000000ULL, 0x667ED3F019228B0CULL }, /* XSUM_XXH3_withSecret_testdata[2455] */\n    { 2456, 0x0000000000000000ULL, 0xEBE6ECAD9764AA3EULL }, /* XSUM_XXH3_withSecret_testdata[2456] */\n    { 2457, 0x0000000000000000ULL, 0x1246C8795EFE16D1ULL }, /* XSUM_XXH3_withSecret_testdata[2457] */\n    { 2458, 0x0000000000000000ULL, 0x88D31024FB5E683DULL }, /* XSUM_XXH3_withSecret_testdata[2458] */\n    { 2459, 0x0000000000000000ULL, 0xD96D0332AE7548C8ULL }, /* XSUM_XXH3_withSecret_testdata[2459] */\n    { 2460, 0x0000000000000000ULL, 0xAA5575DD95A6BA06ULL }, /* XSUM_XXH3_withSecret_testdata[2460] */\n    { 2461, 0x0000000000000000ULL, 0x5682F991E5BC5D8AULL }, /* XSUM_XXH3_withSecret_testdata[2461] */\n    { 2462, 0x0000000000000000ULL, 0xEDFE8BB51A687107ULL }, /* XSUM_XXH3_withSecret_testdata[2462] */\n    { 2463, 0x0000000000000000ULL, 0x1B38DBE4F651736FULL }, /* XSUM_XXH3_withSecret_testdata[2463] */\n    { 2464, 0x0000000000000000ULL, 0x1CC60A21BC604F8DULL }, /* XSUM_XXH3_withSecret_testdata[2464] */\n    { 2465, 0x0000000000000000ULL, 0x270053B3B13C42DAULL }, /* XSUM_XXH3_withSecret_testdata[2465] */\n    { 2466, 0x0000000000000000ULL, 0x2180A9FF32236AAFULL }, /* XSUM_XXH3_withSecret_testdata[2466] */\n    { 2467, 0x0000000000000000ULL, 0x85F2BD99858D5E6DULL }, /* XSUM_XXH3_withSecret_testdata[2467] */\n    { 2468, 0x0000000000000000ULL, 0xA168796BF2C8C114ULL }, /* XSUM_XXH3_withSecret_testdata[2468] */\n    { 2469, 0x0000000000000000ULL, 0xC818D608F9023AE9ULL }, /* XSUM_XXH3_withSecret_testdata[2469] */\n    { 2470, 0x0000000000000000ULL, 0x89B52704F5E3069FULL }, /* XSUM_XXH3_withSecret_testdata[2470] */\n    { 2471, 0x0000000000000000ULL, 0x56073CAA4FCABE72ULL }, /* XSUM_XXH3_withSecret_testdata[2471] */\n    { 2472, 0x0000000000000000ULL, 0x8E508BBE3198B900ULL }, /* XSUM_XXH3_withSecret_testdata[2472] */\n    { 2473, 0x0000000000000000ULL, 0x1677CCEC11C3F063ULL }, /* XSUM_XXH3_withSecret_testdata[2473] */\n    { 2474, 0x0000000000000000ULL, 0x8D85A95827FBFAD8ULL }, /* XSUM_XXH3_withSecret_testdata[2474] */\n    { 2475, 0x0000000000000000ULL, 0x7F7633ED9861DF1EULL }, /* XSUM_XXH3_withSecret_testdata[2475] */\n    { 2476, 0x0000000000000000ULL, 0xD348FAF7835D577AULL }, /* XSUM_XXH3_withSecret_testdata[2476] */\n    { 2477, 0x0000000000000000ULL, 0xF908BB63497C2945ULL }, /* XSUM_XXH3_withSecret_testdata[2477] */\n    { 2478, 0x0000000000000000ULL, 0x979518A224EB5E87ULL }, /* XSUM_XXH3_withSecret_testdata[2478] */\n    { 2479, 0x0000000000000000ULL, 0x3D203CC868768949ULL }, /* XSUM_XXH3_withSecret_testdata[2479] */\n    { 2480, 0x0000000000000000ULL, 0xF3101E499D73F4C8ULL }, /* XSUM_XXH3_withSecret_testdata[2480] */\n    { 2481, 0x0000000000000000ULL, 0x102F7AF08F61921CULL }, /* XSUM_XXH3_withSecret_testdata[2481] */\n    { 2482, 0x0000000000000000ULL, 0x208B7FF8E2D506EAULL }, /* XSUM_XXH3_withSecret_testdata[2482] */\n    { 2483, 0x0000000000000000ULL, 0x8D7F78B8EF6276CAULL }, /* XSUM_XXH3_withSecret_testdata[2483] */\n    { 2484, 0x0000000000000000ULL, 0xB088A088843D3809ULL }, /* XSUM_XXH3_withSecret_testdata[2484] */\n    { 2485, 0x0000000000000000ULL, 0x954FBFC5EC93F9B4ULL }, /* XSUM_XXH3_withSecret_testdata[2485] */\n    { 2486, 0x0000000000000000ULL, 0xCF57A7D34AECF59AULL }, /* XSUM_XXH3_withSecret_testdata[2486] */\n    { 2487, 0x0000000000000000ULL, 0xE2C95460AFE2B595ULL }, /* XSUM_XXH3_withSecret_testdata[2487] */\n    { 2488, 0x0000000000000000ULL, 0xB4CEE088A87489D8ULL }, /* XSUM_XXH3_withSecret_testdata[2488] */\n    { 2489, 0x0000000000000000ULL, 0x0F0E7C83FB06D9C5ULL }, /* XSUM_XXH3_withSecret_testdata[2489] */\n    { 2490, 0x0000000000000000ULL, 0xAF57F16C7833732DULL }, /* XSUM_XXH3_withSecret_testdata[2490] */\n    { 2491, 0x0000000000000000ULL, 0x8B1B9676501880D3ULL }, /* XSUM_XXH3_withSecret_testdata[2491] */\n    { 2492, 0x0000000000000000ULL, 0x12FC866CD78CE6DEULL }, /* XSUM_XXH3_withSecret_testdata[2492] */\n    { 2493, 0x0000000000000000ULL, 0x0EE4CDEF24E19E99ULL }, /* XSUM_XXH3_withSecret_testdata[2493] */\n    { 2494, 0x0000000000000000ULL, 0x6807875A1D02F65CULL }, /* XSUM_XXH3_withSecret_testdata[2494] */\n    { 2495, 0x0000000000000000ULL, 0x94A6BA9FD94FA3A6ULL }, /* XSUM_XXH3_withSecret_testdata[2495] */\n    { 2496, 0x0000000000000000ULL, 0x98C9DEF1F19EC98BULL }, /* XSUM_XXH3_withSecret_testdata[2496] */\n    { 2497, 0x0000000000000000ULL, 0xB0B6920A0649B742ULL }, /* XSUM_XXH3_withSecret_testdata[2497] */\n    { 2498, 0x0000000000000000ULL, 0xC9BECEBB737AB089ULL }, /* XSUM_XXH3_withSecret_testdata[2498] */\n    { 2499, 0x0000000000000000ULL, 0x571F9E81DFA87670ULL }, /* XSUM_XXH3_withSecret_testdata[2499] */\n    { 2500, 0x0000000000000000ULL, 0xC30E1D27E4245484ULL }, /* XSUM_XXH3_withSecret_testdata[2500] */\n    { 2501, 0x0000000000000000ULL, 0xB013E7F8FD67F03FULL }, /* XSUM_XXH3_withSecret_testdata[2501] */\n    { 2502, 0x0000000000000000ULL, 0x303BC518E2B05577ULL }, /* XSUM_XXH3_withSecret_testdata[2502] */\n    { 2503, 0x0000000000000000ULL, 0x150C8479B8B7AC06ULL }, /* XSUM_XXH3_withSecret_testdata[2503] */\n    { 2504, 0x0000000000000000ULL, 0x53E0E976AC861E3AULL }, /* XSUM_XXH3_withSecret_testdata[2504] */\n    { 2505, 0x0000000000000000ULL, 0xF46C5524FDC4D85EULL }, /* XSUM_XXH3_withSecret_testdata[2505] */\n    { 2506, 0x0000000000000000ULL, 0x3E890C313A5E3202ULL }, /* XSUM_XXH3_withSecret_testdata[2506] */\n    { 2507, 0x0000000000000000ULL, 0x893E6CA9065BEDD2ULL }, /* XSUM_XXH3_withSecret_testdata[2507] */\n    { 2508, 0x0000000000000000ULL, 0xD586CAA92858A4BDULL }, /* XSUM_XXH3_withSecret_testdata[2508] */\n    { 2509, 0x0000000000000000ULL, 0x84B0D3570788F93EULL }, /* XSUM_XXH3_withSecret_testdata[2509] */\n    { 2510, 0x0000000000000000ULL, 0xD61AFB9478BA478DULL }, /* XSUM_XXH3_withSecret_testdata[2510] */\n    { 2511, 0x0000000000000000ULL, 0x29607FF29311310EULL }, /* XSUM_XXH3_withSecret_testdata[2511] */\n    { 2512, 0x0000000000000000ULL, 0x0D808C86F2EF5F22ULL }, /* XSUM_XXH3_withSecret_testdata[2512] */\n    { 2513, 0x0000000000000000ULL, 0xF54FF2663629C10BULL }, /* XSUM_XXH3_withSecret_testdata[2513] */\n    { 2514, 0x0000000000000000ULL, 0x419D659851931A87ULL }, /* XSUM_XXH3_withSecret_testdata[2514] */\n    { 2515, 0x0000000000000000ULL, 0x1BD6867547C59B6DULL }, /* XSUM_XXH3_withSecret_testdata[2515] */\n    { 2516, 0x0000000000000000ULL, 0x6BAAB7CF89ADC0F7ULL }, /* XSUM_XXH3_withSecret_testdata[2516] */\n    { 2517, 0x0000000000000000ULL, 0x95EF25B5E3BD9EDFULL }, /* XSUM_XXH3_withSecret_testdata[2517] */\n    { 2518, 0x0000000000000000ULL, 0x86424658110D1E62ULL }, /* XSUM_XXH3_withSecret_testdata[2518] */\n    { 2519, 0x0000000000000000ULL, 0x6F9843416A88B93EULL }, /* XSUM_XXH3_withSecret_testdata[2519] */\n    { 2520, 0x0000000000000000ULL, 0xC809656F05AD6C8DULL }, /* XSUM_XXH3_withSecret_testdata[2520] */\n    { 2521, 0x0000000000000000ULL, 0xA026416073B3FBABULL }, /* XSUM_XXH3_withSecret_testdata[2521] */\n    { 2522, 0x0000000000000000ULL, 0xAFD0D8DD43FCD09FULL }, /* XSUM_XXH3_withSecret_testdata[2522] */\n    { 2523, 0x0000000000000000ULL, 0x2760C965119529F0ULL }, /* XSUM_XXH3_withSecret_testdata[2523] */\n    { 2524, 0x0000000000000000ULL, 0x83CAC7433219E867ULL }, /* XSUM_XXH3_withSecret_testdata[2524] */\n    { 2525, 0x0000000000000000ULL, 0x64E93944571E86C8ULL }, /* XSUM_XXH3_withSecret_testdata[2525] */\n    { 2526, 0x0000000000000000ULL, 0x2C19A96954E7A833ULL }, /* XSUM_XXH3_withSecret_testdata[2526] */\n    { 2527, 0x0000000000000000ULL, 0x543DFEDA890C39BBULL }, /* XSUM_XXH3_withSecret_testdata[2527] */\n    { 2528, 0x0000000000000000ULL, 0x5720CBADD0EFDCBEULL }, /* XSUM_XXH3_withSecret_testdata[2528] */\n    { 2529, 0x0000000000000000ULL, 0x4FD962132FEC0ED2ULL }, /* XSUM_XXH3_withSecret_testdata[2529] */\n    { 2530, 0x0000000000000000ULL, 0xCCD4FECCF1E8032EULL }, /* XSUM_XXH3_withSecret_testdata[2530] */\n    { 2531, 0x0000000000000000ULL, 0xB3AE392B45F6A37CULL }, /* XSUM_XXH3_withSecret_testdata[2531] */\n    { 2532, 0x0000000000000000ULL, 0x3C75320C9AD26401ULL }, /* XSUM_XXH3_withSecret_testdata[2532] */\n    { 2533, 0x0000000000000000ULL, 0xDC3F74F3D216386CULL }, /* XSUM_XXH3_withSecret_testdata[2533] */\n    { 2534, 0x0000000000000000ULL, 0x160EF753CB403670ULL }, /* XSUM_XXH3_withSecret_testdata[2534] */\n    { 2535, 0x0000000000000000ULL, 0x736C58212031C9F2ULL }, /* XSUM_XXH3_withSecret_testdata[2535] */\n    { 2536, 0x0000000000000000ULL, 0x840DF498666247B0ULL }, /* XSUM_XXH3_withSecret_testdata[2536] */\n    { 2537, 0x0000000000000000ULL, 0x974AA66890FC3B30ULL }, /* XSUM_XXH3_withSecret_testdata[2537] */\n    { 2538, 0x0000000000000000ULL, 0x04954981FB429374ULL }, /* XSUM_XXH3_withSecret_testdata[2538] */\n    { 2539, 0x0000000000000000ULL, 0x4A6304B4C047FF06ULL }, /* XSUM_XXH3_withSecret_testdata[2539] */\n    { 2540, 0x0000000000000000ULL, 0x2D9D745BCB5101F5ULL }, /* XSUM_XXH3_withSecret_testdata[2540] */\n    { 2541, 0x0000000000000000ULL, 0xC28C2179D0AC9E6BULL }, /* XSUM_XXH3_withSecret_testdata[2541] */\n    { 2542, 0x0000000000000000ULL, 0x7B33FE2A667B40D9ULL }, /* XSUM_XXH3_withSecret_testdata[2542] */\n    { 2543, 0x0000000000000000ULL, 0x018DD8A27F419088ULL }, /* XSUM_XXH3_withSecret_testdata[2543] */\n    { 2544, 0x0000000000000000ULL, 0x6B76AE9256EDF554ULL }, /* XSUM_XXH3_withSecret_testdata[2544] */\n    { 2545, 0x0000000000000000ULL, 0x18FEF311A3055CFAULL }, /* XSUM_XXH3_withSecret_testdata[2545] */\n    { 2546, 0x0000000000000000ULL, 0x41B142ADD315C08AULL }, /* XSUM_XXH3_withSecret_testdata[2546] */\n    { 2547, 0x0000000000000000ULL, 0x776E02A5C2BCCB16ULL }, /* XSUM_XXH3_withSecret_testdata[2547] */\n    { 2548, 0x0000000000000000ULL, 0x8B3568C5708894A7ULL }, /* XSUM_XXH3_withSecret_testdata[2548] */\n    { 2549, 0x0000000000000000ULL, 0xD5FBC5EC8C745887ULL }, /* XSUM_XXH3_withSecret_testdata[2549] */\n    { 2550, 0x0000000000000000ULL, 0x0D138006F0EFEBB6ULL }, /* XSUM_XXH3_withSecret_testdata[2550] */\n    { 2551, 0x0000000000000000ULL, 0xD81964889ACDA99CULL }, /* XSUM_XXH3_withSecret_testdata[2551] */\n    { 2552, 0x0000000000000000ULL, 0xF2DAE9DDB84211F1ULL }, /* XSUM_XXH3_withSecret_testdata[2552] */\n    { 2553, 0x0000000000000000ULL, 0xB682C5F44B0F4ADFULL }, /* XSUM_XXH3_withSecret_testdata[2553] */\n    { 2554, 0x0000000000000000ULL, 0x3F79622325944B3AULL }, /* XSUM_XXH3_withSecret_testdata[2554] */\n    { 2555, 0x0000000000000000ULL, 0xE1573557F70CC302ULL }, /* XSUM_XXH3_withSecret_testdata[2555] */\n    { 2556, 0x0000000000000000ULL, 0xDF8146D7E8F45BD6ULL }, /* XSUM_XXH3_withSecret_testdata[2556] */\n    { 2557, 0x0000000000000000ULL, 0xE556F3A899F3CECDULL }, /* XSUM_XXH3_withSecret_testdata[2557] */\n    { 2558, 0x0000000000000000ULL, 0xB2FD4B464AE294B6ULL }, /* XSUM_XXH3_withSecret_testdata[2558] */\n    { 2559, 0x0000000000000000ULL, 0x8DEF064E344B1567ULL }, /* XSUM_XXH3_withSecret_testdata[2559] */\n    { 2560, 0x0000000000000000ULL, 0x16EE80901F5FD360ULL }, /* XSUM_XXH3_withSecret_testdata[2560] */\n    { 2561, 0x0000000000000000ULL, 0x93212C53420EAB20ULL }, /* XSUM_XXH3_withSecret_testdata[2561] */\n    { 2562, 0x0000000000000000ULL, 0x4E97EBED9E7BB8ABULL }, /* XSUM_XXH3_withSecret_testdata[2562] */\n    { 2563, 0x0000000000000000ULL, 0x36A00A2095233FA5ULL }, /* XSUM_XXH3_withSecret_testdata[2563] */\n    { 2564, 0x0000000000000000ULL, 0x5FFB1980AB9EF7A5ULL }, /* XSUM_XXH3_withSecret_testdata[2564] */\n    { 2565, 0x0000000000000000ULL, 0xC7CF3B9AD3DFC66CULL }, /* XSUM_XXH3_withSecret_testdata[2565] */\n    { 2566, 0x0000000000000000ULL, 0x302798DF16BE571EULL }, /* XSUM_XXH3_withSecret_testdata[2566] */\n    { 2567, 0x0000000000000000ULL, 0xA96EF549FA2166CDULL }, /* XSUM_XXH3_withSecret_testdata[2567] */\n    { 2568, 0x0000000000000000ULL, 0xE87D4F0D2633710EULL }, /* XSUM_XXH3_withSecret_testdata[2568] */\n    { 2569, 0x0000000000000000ULL, 0x37C4DDC5E76B9552ULL }, /* XSUM_XXH3_withSecret_testdata[2569] */\n    { 2570, 0x0000000000000000ULL, 0x6730458D0BEC200CULL }, /* XSUM_XXH3_withSecret_testdata[2570] */\n    { 2571, 0x0000000000000000ULL, 0x7EB259A765331316ULL }, /* XSUM_XXH3_withSecret_testdata[2571] */\n    { 2572, 0x0000000000000000ULL, 0x9C7AA86195F57267ULL }, /* XSUM_XXH3_withSecret_testdata[2572] */\n    { 2573, 0x0000000000000000ULL, 0xF73FD42643DC849EULL }, /* XSUM_XXH3_withSecret_testdata[2573] */\n    { 2574, 0x0000000000000000ULL, 0x2A909E1A7BAE7038ULL }, /* XSUM_XXH3_withSecret_testdata[2574] */\n    { 2575, 0x0000000000000000ULL, 0xA368FC34F33D2775ULL }, /* XSUM_XXH3_withSecret_testdata[2575] */\n    { 2576, 0x0000000000000000ULL, 0x37A51C9E6EE2277BULL }, /* XSUM_XXH3_withSecret_testdata[2576] */\n    { 2577, 0x0000000000000000ULL, 0xD54B979F6DA0F96DULL }, /* XSUM_XXH3_withSecret_testdata[2577] */\n    { 2578, 0x0000000000000000ULL, 0x57FDF444EB565B36ULL }, /* XSUM_XXH3_withSecret_testdata[2578] */\n    { 2579, 0x0000000000000000ULL, 0xEC30F9C831A60851ULL }, /* XSUM_XXH3_withSecret_testdata[2579] */\n    { 2580, 0x0000000000000000ULL, 0x6E2D789FE72D6F4DULL }, /* XSUM_XXH3_withSecret_testdata[2580] */\n    { 2581, 0x0000000000000000ULL, 0x942E1D90CF6B9E18ULL }, /* XSUM_XXH3_withSecret_testdata[2581] */\n    { 2582, 0x0000000000000000ULL, 0x8AE3BE86A47DA957ULL }, /* XSUM_XXH3_withSecret_testdata[2582] */\n    { 2583, 0x0000000000000000ULL, 0xCCA4C892ADFE4F73ULL }, /* XSUM_XXH3_withSecret_testdata[2583] */\n    { 2584, 0x0000000000000000ULL, 0x833C06D264B01768ULL }, /* XSUM_XXH3_withSecret_testdata[2584] */\n    { 2585, 0x0000000000000000ULL, 0x6D1048FF62E9EB4AULL }, /* XSUM_XXH3_withSecret_testdata[2585] */\n    { 2586, 0x0000000000000000ULL, 0xD655BA7431A0912BULL }, /* XSUM_XXH3_withSecret_testdata[2586] */\n    { 2587, 0x0000000000000000ULL, 0x017B15C673D638F2ULL }, /* XSUM_XXH3_withSecret_testdata[2587] */\n    { 2588, 0x0000000000000000ULL, 0x060FF36A6F988FF4ULL }, /* XSUM_XXH3_withSecret_testdata[2588] */\n    { 2589, 0x0000000000000000ULL, 0xE7F046C6DEAD7BCFULL }, /* XSUM_XXH3_withSecret_testdata[2589] */\n    { 2590, 0x0000000000000000ULL, 0x55606B4202BAD261ULL }, /* XSUM_XXH3_withSecret_testdata[2590] */\n    { 2591, 0x0000000000000000ULL, 0x70B45508D2567155ULL }, /* XSUM_XXH3_withSecret_testdata[2591] */\n    { 2592, 0x0000000000000000ULL, 0xFDDBEB1AAB020A1AULL }, /* XSUM_XXH3_withSecret_testdata[2592] */\n    { 2593, 0x0000000000000000ULL, 0xADBBB1B29B1D5ACEULL }, /* XSUM_XXH3_withSecret_testdata[2593] */\n    { 2594, 0x0000000000000000ULL, 0xDD7F32DF066A745EULL }, /* XSUM_XXH3_withSecret_testdata[2594] */\n    { 2595, 0x0000000000000000ULL, 0xB495E5866461FE91ULL }, /* XSUM_XXH3_withSecret_testdata[2595] */\n    { 2596, 0x0000000000000000ULL, 0x8F53A734753051B8ULL }, /* XSUM_XXH3_withSecret_testdata[2596] */\n    { 2597, 0x0000000000000000ULL, 0xE2936E2F47754D48ULL }, /* XSUM_XXH3_withSecret_testdata[2597] */\n    { 2598, 0x0000000000000000ULL, 0x7DFFDDBB3380E963ULL }, /* XSUM_XXH3_withSecret_testdata[2598] */\n    { 2599, 0x0000000000000000ULL, 0x9D1CAD8EFEAAE47FULL }, /* XSUM_XXH3_withSecret_testdata[2599] */\n    { 2600, 0x0000000000000000ULL, 0xC8F4FF8AA05CF97BULL }, /* XSUM_XXH3_withSecret_testdata[2600] */\n    { 2601, 0x0000000000000000ULL, 0x664EB6E49571EA2DULL }, /* XSUM_XXH3_withSecret_testdata[2601] */\n    { 2602, 0x0000000000000000ULL, 0x692108073687893CULL }, /* XSUM_XXH3_withSecret_testdata[2602] */\n    { 2603, 0x0000000000000000ULL, 0x7BDF43C6D590A9D1ULL }, /* XSUM_XXH3_withSecret_testdata[2603] */\n    { 2604, 0x0000000000000000ULL, 0x7A91B2ABC5A49158ULL }, /* XSUM_XXH3_withSecret_testdata[2604] */\n    { 2605, 0x0000000000000000ULL, 0x88E7C28EA89E5B6DULL }, /* XSUM_XXH3_withSecret_testdata[2605] */\n    { 2606, 0x0000000000000000ULL, 0xCE5E9D6C768E31C8ULL }, /* XSUM_XXH3_withSecret_testdata[2606] */\n    { 2607, 0x0000000000000000ULL, 0x543A7FA1ADA6E389ULL }, /* XSUM_XXH3_withSecret_testdata[2607] */\n    { 2608, 0x0000000000000000ULL, 0xB1323D2F495C71EEULL }, /* XSUM_XXH3_withSecret_testdata[2608] */\n    { 2609, 0x0000000000000000ULL, 0x1137F916C416A5F0ULL }, /* XSUM_XXH3_withSecret_testdata[2609] */\n    { 2610, 0x0000000000000000ULL, 0xD9856B10DBF1F456ULL }, /* XSUM_XXH3_withSecret_testdata[2610] */\n    { 2611, 0x0000000000000000ULL, 0xB74F58BE5684931CULL }, /* XSUM_XXH3_withSecret_testdata[2611] */\n    { 2612, 0x0000000000000000ULL, 0xEDEA21DC494254DCULL }, /* XSUM_XXH3_withSecret_testdata[2612] */\n    { 2613, 0x0000000000000000ULL, 0x01B756211ABF146CULL }, /* XSUM_XXH3_withSecret_testdata[2613] */\n    { 2614, 0x0000000000000000ULL, 0x967C06CCEBB5A471ULL }, /* XSUM_XXH3_withSecret_testdata[2614] */\n    { 2615, 0x0000000000000000ULL, 0xF144F6B209875574ULL }, /* XSUM_XXH3_withSecret_testdata[2615] */\n    { 2616, 0x0000000000000000ULL, 0xC198AC39900B1793ULL }, /* XSUM_XXH3_withSecret_testdata[2616] */\n    { 2617, 0x0000000000000000ULL, 0xDA26311DFE811C2DULL }, /* XSUM_XXH3_withSecret_testdata[2617] */\n    { 2618, 0x0000000000000000ULL, 0x7F14937F6C7ED2A7ULL }, /* XSUM_XXH3_withSecret_testdata[2618] */\n    { 2619, 0x0000000000000000ULL, 0x4066C04C1DD840DBULL }, /* XSUM_XXH3_withSecret_testdata[2619] */\n    { 2620, 0x0000000000000000ULL, 0x1E2D0B4FA2C9824AULL }, /* XSUM_XXH3_withSecret_testdata[2620] */\n    { 2621, 0x0000000000000000ULL, 0xC73016F08F32DD84ULL }, /* XSUM_XXH3_withSecret_testdata[2621] */\n    { 2622, 0x0000000000000000ULL, 0xB8EBE60A20704C50ULL }, /* XSUM_XXH3_withSecret_testdata[2622] */\n    { 2623, 0x0000000000000000ULL, 0xD4D18BB02D843624ULL }, /* XSUM_XXH3_withSecret_testdata[2623] */\n    { 2624, 0x0000000000000000ULL, 0x9578A4EBD51BFF5AULL }, /* XSUM_XXH3_withSecret_testdata[2624] */\n    { 2625, 0x0000000000000000ULL, 0xB57F7BB909809262ULL }, /* XSUM_XXH3_withSecret_testdata[2625] */\n    { 2626, 0x0000000000000000ULL, 0x9372C2DC9DFCE366ULL }, /* XSUM_XXH3_withSecret_testdata[2626] */\n    { 2627, 0x0000000000000000ULL, 0x81EF7C0B63BC899FULL }, /* XSUM_XXH3_withSecret_testdata[2627] */\n    { 2628, 0x0000000000000000ULL, 0x190A38990E8A0DD0ULL }, /* XSUM_XXH3_withSecret_testdata[2628] */\n    { 2629, 0x0000000000000000ULL, 0x1BDA829E6225EAE3ULL }, /* XSUM_XXH3_withSecret_testdata[2629] */\n    { 2630, 0x0000000000000000ULL, 0xDDE9CBA47EA1D192ULL }, /* XSUM_XXH3_withSecret_testdata[2630] */\n    { 2631, 0x0000000000000000ULL, 0x0F0E82D98FCC1F93ULL }, /* XSUM_XXH3_withSecret_testdata[2631] */\n    { 2632, 0x0000000000000000ULL, 0x00A7DDF5CD8188D4ULL }, /* XSUM_XXH3_withSecret_testdata[2632] */\n    { 2633, 0x0000000000000000ULL, 0x02E7E82785C1E2A9ULL }, /* XSUM_XXH3_withSecret_testdata[2633] */\n    { 2634, 0x0000000000000000ULL, 0x0BC2BEA55AFD193BULL }, /* XSUM_XXH3_withSecret_testdata[2634] */\n    { 2635, 0x0000000000000000ULL, 0x439AD5248A2FB89FULL }, /* XSUM_XXH3_withSecret_testdata[2635] */\n    { 2636, 0x0000000000000000ULL, 0x58C9ADCB09BEC325ULL }, /* XSUM_XXH3_withSecret_testdata[2636] */\n    { 2637, 0x0000000000000000ULL, 0x5001BBC78E724B9DULL }, /* XSUM_XXH3_withSecret_testdata[2637] */\n    { 2638, 0x0000000000000000ULL, 0x0804A7BC3B216DB1ULL }, /* XSUM_XXH3_withSecret_testdata[2638] */\n    { 2639, 0x0000000000000000ULL, 0x8BBCCD92E34788DFULL }, /* XSUM_XXH3_withSecret_testdata[2639] */\n    { 2640, 0x0000000000000000ULL, 0xC41A91B7D8601816ULL }, /* XSUM_XXH3_withSecret_testdata[2640] */\n    { 2641, 0x0000000000000000ULL, 0x55BEE36549E0870BULL }, /* XSUM_XXH3_withSecret_testdata[2641] */\n    { 2642, 0x0000000000000000ULL, 0x16089A865A847A43ULL }, /* XSUM_XXH3_withSecret_testdata[2642] */\n    { 2643, 0x0000000000000000ULL, 0x8105DF0C7462BF52ULL }, /* XSUM_XXH3_withSecret_testdata[2643] */\n    { 2644, 0x0000000000000000ULL, 0xE71BA1F013FB3E10ULL }, /* XSUM_XXH3_withSecret_testdata[2644] */\n    { 2645, 0x0000000000000000ULL, 0x64A5697CB91C7206ULL }, /* XSUM_XXH3_withSecret_testdata[2645] */\n    { 2646, 0x0000000000000000ULL, 0x9E373E290C75846AULL }, /* XSUM_XXH3_withSecret_testdata[2646] */\n    { 2647, 0x0000000000000000ULL, 0xD1BBE5E4FCBDC2ADULL }, /* XSUM_XXH3_withSecret_testdata[2647] */\n    { 2648, 0x0000000000000000ULL, 0xFEE2E93D7FB4E975ULL }, /* XSUM_XXH3_withSecret_testdata[2648] */\n    { 2649, 0x0000000000000000ULL, 0x6876D7CB7DC9797FULL }, /* XSUM_XXH3_withSecret_testdata[2649] */\n    { 2650, 0x0000000000000000ULL, 0xD9B0BCDE3BF12705ULL }, /* XSUM_XXH3_withSecret_testdata[2650] */\n    { 2651, 0x0000000000000000ULL, 0x495250888BB32B49ULL }, /* XSUM_XXH3_withSecret_testdata[2651] */\n    { 2652, 0x0000000000000000ULL, 0xEE445EFDF52C0A42ULL }, /* XSUM_XXH3_withSecret_testdata[2652] */\n    { 2653, 0x0000000000000000ULL, 0x3164C3796738DAE1ULL }, /* XSUM_XXH3_withSecret_testdata[2653] */\n    { 2654, 0x0000000000000000ULL, 0x7AE6680348D45EFFULL }, /* XSUM_XXH3_withSecret_testdata[2654] */\n    { 2655, 0x0000000000000000ULL, 0x8E70038B332D3F54ULL }, /* XSUM_XXH3_withSecret_testdata[2655] */\n    { 2656, 0x0000000000000000ULL, 0x3E03BCB79DA50B2FULL }, /* XSUM_XXH3_withSecret_testdata[2656] */\n    { 2657, 0x0000000000000000ULL, 0x7386A16500321DAAULL }, /* XSUM_XXH3_withSecret_testdata[2657] */\n    { 2658, 0x0000000000000000ULL, 0x7918738CBE919FD2ULL }, /* XSUM_XXH3_withSecret_testdata[2658] */\n    { 2659, 0x0000000000000000ULL, 0x36B19C977E3D64F2ULL }, /* XSUM_XXH3_withSecret_testdata[2659] */\n    { 2660, 0x0000000000000000ULL, 0x672A654152793BF1ULL }, /* XSUM_XXH3_withSecret_testdata[2660] */\n    { 2661, 0x0000000000000000ULL, 0x91C67413D6E7609AULL }, /* XSUM_XXH3_withSecret_testdata[2661] */\n    { 2662, 0x0000000000000000ULL, 0x1EEFBAA7DFBEFFEBULL }, /* XSUM_XXH3_withSecret_testdata[2662] */\n    { 2663, 0x0000000000000000ULL, 0x9F436ADFD10DD39DULL }, /* XSUM_XXH3_withSecret_testdata[2663] */\n    { 2664, 0x0000000000000000ULL, 0x52B95946FB502CCEULL }, /* XSUM_XXH3_withSecret_testdata[2664] */\n    { 2665, 0x0000000000000000ULL, 0x00D500026F9AB861ULL }, /* XSUM_XXH3_withSecret_testdata[2665] */\n    { 2666, 0x0000000000000000ULL, 0xB967DD7695010DF6ULL }, /* XSUM_XXH3_withSecret_testdata[2666] */\n    { 2667, 0x0000000000000000ULL, 0x8E7606272F097FB8ULL }, /* XSUM_XXH3_withSecret_testdata[2667] */\n    { 2668, 0x0000000000000000ULL, 0x4C9A07056EC8C59AULL }, /* XSUM_XXH3_withSecret_testdata[2668] */\n    { 2669, 0x0000000000000000ULL, 0x5508DAD47A6CC2CBULL }, /* XSUM_XXH3_withSecret_testdata[2669] */\n    { 2670, 0x0000000000000000ULL, 0xEB6360E14EEE1610ULL }, /* XSUM_XXH3_withSecret_testdata[2670] */\n    { 2671, 0x0000000000000000ULL, 0xC6372020B33BFD65ULL }, /* XSUM_XXH3_withSecret_testdata[2671] */\n    { 2672, 0x0000000000000000ULL, 0x0F843F9C945C94E6ULL }, /* XSUM_XXH3_withSecret_testdata[2672] */\n    { 2673, 0x0000000000000000ULL, 0xBFDCB8BE05DD7A65ULL }, /* XSUM_XXH3_withSecret_testdata[2673] */\n    { 2674, 0x0000000000000000ULL, 0x25DE628289633226ULL }, /* XSUM_XXH3_withSecret_testdata[2674] */\n    { 2675, 0x0000000000000000ULL, 0x32688F8FE66182AEULL }, /* XSUM_XXH3_withSecret_testdata[2675] */\n    { 2676, 0x0000000000000000ULL, 0x84C8E782DDC3C81BULL }, /* XSUM_XXH3_withSecret_testdata[2676] */\n    { 2677, 0x0000000000000000ULL, 0x3B658359E7BACF1EULL }, /* XSUM_XXH3_withSecret_testdata[2677] */\n    { 2678, 0x0000000000000000ULL, 0xAD7CFACBC79F8003ULL }, /* XSUM_XXH3_withSecret_testdata[2678] */\n    { 2679, 0x0000000000000000ULL, 0xBD610924ED01294CULL }, /* XSUM_XXH3_withSecret_testdata[2679] */\n    { 2680, 0x0000000000000000ULL, 0x096AD93B09F09B17ULL }, /* XSUM_XXH3_withSecret_testdata[2680] */\n    { 2681, 0x0000000000000000ULL, 0xD8D202571A42DF76ULL }, /* XSUM_XXH3_withSecret_testdata[2681] */\n    { 2682, 0x0000000000000000ULL, 0x392D755A24555DA7ULL }, /* XSUM_XXH3_withSecret_testdata[2682] */\n    { 2683, 0x0000000000000000ULL, 0xFE625F185A910F2DULL }, /* XSUM_XXH3_withSecret_testdata[2683] */\n    { 2684, 0x0000000000000000ULL, 0xF782909443ACBABAULL }, /* XSUM_XXH3_withSecret_testdata[2684] */\n    { 2685, 0x0000000000000000ULL, 0xE0168A31A9DEA40CULL }, /* XSUM_XXH3_withSecret_testdata[2685] */\n    { 2686, 0x0000000000000000ULL, 0xAF0735145F93B14AULL }, /* XSUM_XXH3_withSecret_testdata[2686] */\n    { 2687, 0x0000000000000000ULL, 0x85E8513DC79A8724ULL }, /* XSUM_XXH3_withSecret_testdata[2687] */\n    { 2688, 0x0000000000000000ULL, 0x330F96D0DA8D3B4CULL }, /* XSUM_XXH3_withSecret_testdata[2688] */\n    { 2689, 0x0000000000000000ULL, 0x6AA04F0588D67194ULL }, /* XSUM_XXH3_withSecret_testdata[2689] */\n    { 2690, 0x0000000000000000ULL, 0xC51B098BBFA4637AULL }, /* XSUM_XXH3_withSecret_testdata[2690] */\n    { 2691, 0x0000000000000000ULL, 0x5787EC409CD94EC7ULL }, /* XSUM_XXH3_withSecret_testdata[2691] */\n    { 2692, 0x0000000000000000ULL, 0x3AF92D8FB21B10CFULL }, /* XSUM_XXH3_withSecret_testdata[2692] */\n    { 2693, 0x0000000000000000ULL, 0x47B7CA6CED64886DULL }, /* XSUM_XXH3_withSecret_testdata[2693] */\n    { 2694, 0x0000000000000000ULL, 0x812E544FD90EF1BAULL }, /* XSUM_XXH3_withSecret_testdata[2694] */\n    { 2695, 0x0000000000000000ULL, 0xA55D70EE8F02E8BDULL }, /* XSUM_XXH3_withSecret_testdata[2695] */\n    { 2696, 0x0000000000000000ULL, 0x233CD540E5FCC33CULL }, /* XSUM_XXH3_withSecret_testdata[2696] */\n    { 2697, 0x0000000000000000ULL, 0xFB9341114FA4CC29ULL }, /* XSUM_XXH3_withSecret_testdata[2697] */\n    { 2698, 0x0000000000000000ULL, 0xC29841FC3A675EF6ULL }, /* XSUM_XXH3_withSecret_testdata[2698] */\n    { 2699, 0x0000000000000000ULL, 0xC4EB0FE70A33F62FULL }, /* XSUM_XXH3_withSecret_testdata[2699] */\n    { 2700, 0x0000000000000000ULL, 0xA3AA5B1F50D9E77CULL }, /* XSUM_XXH3_withSecret_testdata[2700] */\n    { 2701, 0x0000000000000000ULL, 0x1A3A391DBBE402E5ULL }, /* XSUM_XXH3_withSecret_testdata[2701] */\n    { 2702, 0x0000000000000000ULL, 0xA4724F3C58FD0920ULL }, /* XSUM_XXH3_withSecret_testdata[2702] */\n    { 2703, 0x0000000000000000ULL, 0x0A71207441D9CC62ULL }, /* XSUM_XXH3_withSecret_testdata[2703] */\n    { 2704, 0x0000000000000000ULL, 0xB5AB2E664CC1F0E3ULL }, /* XSUM_XXH3_withSecret_testdata[2704] */\n    { 2705, 0x0000000000000000ULL, 0x28237936A1716622ULL }, /* XSUM_XXH3_withSecret_testdata[2705] */\n    { 2706, 0x0000000000000000ULL, 0x8FF7CB7CDFBE8552ULL }, /* XSUM_XXH3_withSecret_testdata[2706] */\n    { 2707, 0x0000000000000000ULL, 0x95D17737A4533EB1ULL }, /* XSUM_XXH3_withSecret_testdata[2707] */\n    { 2708, 0x0000000000000000ULL, 0x88CE7CAFDD755DA6ULL }, /* XSUM_XXH3_withSecret_testdata[2708] */\n    { 2709, 0x0000000000000000ULL, 0xA7A708CA9BE6603DULL }, /* XSUM_XXH3_withSecret_testdata[2709] */\n    { 2710, 0x0000000000000000ULL, 0x6CBC38D67BAE5390ULL }, /* XSUM_XXH3_withSecret_testdata[2710] */\n    { 2711, 0x0000000000000000ULL, 0xB7E1FB656B7422A3ULL }, /* XSUM_XXH3_withSecret_testdata[2711] */\n    { 2712, 0x0000000000000000ULL, 0x55D7049F9FF1CA3EULL }, /* XSUM_XXH3_withSecret_testdata[2712] */\n    { 2713, 0x0000000000000000ULL, 0xDBF632660DD99CB0ULL }, /* XSUM_XXH3_withSecret_testdata[2713] */\n    { 2714, 0x0000000000000000ULL, 0x4D3CD71295F6ABF8ULL }, /* XSUM_XXH3_withSecret_testdata[2714] */\n    { 2715, 0x0000000000000000ULL, 0x14092CBC6368A1FCULL }, /* XSUM_XXH3_withSecret_testdata[2715] */\n    { 2716, 0x0000000000000000ULL, 0x3A10DD5737B434B2ULL }, /* XSUM_XXH3_withSecret_testdata[2716] */\n    { 2717, 0x0000000000000000ULL, 0x253A2D1AC1138049ULL }, /* XSUM_XXH3_withSecret_testdata[2717] */\n    { 2718, 0x0000000000000000ULL, 0x2726706B5ED76122ULL }, /* XSUM_XXH3_withSecret_testdata[2718] */\n    { 2719, 0x0000000000000000ULL, 0x6DCB497FFE8EFDF0ULL }, /* XSUM_XXH3_withSecret_testdata[2719] */\n    { 2720, 0x0000000000000000ULL, 0xBFBE9DDD15CCA78BULL }, /* XSUM_XXH3_withSecret_testdata[2720] */\n    { 2721, 0x0000000000000000ULL, 0x93080165E74F2113ULL }, /* XSUM_XXH3_withSecret_testdata[2721] */\n    { 2722, 0x0000000000000000ULL, 0x34F93E545F17B00BULL }, /* XSUM_XXH3_withSecret_testdata[2722] */\n    { 2723, 0x0000000000000000ULL, 0x9FBF9134D52E17A8ULL }, /* XSUM_XXH3_withSecret_testdata[2723] */\n    { 2724, 0x0000000000000000ULL, 0x0095C26912C593CBULL }, /* XSUM_XXH3_withSecret_testdata[2724] */\n    { 2725, 0x0000000000000000ULL, 0x4295CA7092D53393ULL }, /* XSUM_XXH3_withSecret_testdata[2725] */\n    { 2726, 0x0000000000000000ULL, 0xBF2BF797289CCA26ULL }, /* XSUM_XXH3_withSecret_testdata[2726] */\n    { 2727, 0x0000000000000000ULL, 0xDE8896D86795A88FULL }, /* XSUM_XXH3_withSecret_testdata[2727] */\n    { 2728, 0x0000000000000000ULL, 0x98F44195153814DFULL }, /* XSUM_XXH3_withSecret_testdata[2728] */\n    { 2729, 0x0000000000000000ULL, 0xF95CFB8318C7728CULL }, /* XSUM_XXH3_withSecret_testdata[2729] */\n    { 2730, 0x0000000000000000ULL, 0xBB95647B025D4046ULL }, /* XSUM_XXH3_withSecret_testdata[2730] */\n    { 2731, 0x0000000000000000ULL, 0xCCC3908B111E3898ULL }, /* XSUM_XXH3_withSecret_testdata[2731] */\n    { 2732, 0x0000000000000000ULL, 0xBDEFCC0464C26D71ULL }, /* XSUM_XXH3_withSecret_testdata[2732] */\n    { 2733, 0x0000000000000000ULL, 0xAAB0EC47ED4C44B8ULL }, /* XSUM_XXH3_withSecret_testdata[2733] */\n    { 2734, 0x0000000000000000ULL, 0x1010BC3F4C8126CEULL }, /* XSUM_XXH3_withSecret_testdata[2734] */\n    { 2735, 0x0000000000000000ULL, 0x0DFE9A3A9921B584ULL }, /* XSUM_XXH3_withSecret_testdata[2735] */\n    { 2736, 0x0000000000000000ULL, 0xF0544A704E23132FULL }, /* XSUM_XXH3_withSecret_testdata[2736] */\n    { 2737, 0x0000000000000000ULL, 0x343DEE93E6A3B726ULL }, /* XSUM_XXH3_withSecret_testdata[2737] */\n    { 2738, 0x0000000000000000ULL, 0x3F739461D94B435EULL }, /* XSUM_XXH3_withSecret_testdata[2738] */\n    { 2739, 0x0000000000000000ULL, 0xA859C4CC314E13DCULL }, /* XSUM_XXH3_withSecret_testdata[2739] */\n    { 2740, 0x0000000000000000ULL, 0x4E8FFBF5D701FEBEULL }, /* XSUM_XXH3_withSecret_testdata[2740] */\n    { 2741, 0x0000000000000000ULL, 0x1EEA03B3C7D154B3ULL }, /* XSUM_XXH3_withSecret_testdata[2741] */\n    { 2742, 0x0000000000000000ULL, 0x2C034DFB36591DDDULL }, /* XSUM_XXH3_withSecret_testdata[2742] */\n    { 2743, 0x0000000000000000ULL, 0x97A3613150ACE4A6ULL }, /* XSUM_XXH3_withSecret_testdata[2743] */\n    { 2744, 0x0000000000000000ULL, 0x08F6AC5C1542135CULL }, /* XSUM_XXH3_withSecret_testdata[2744] */\n    { 2745, 0x0000000000000000ULL, 0x499AEA26832D3187ULL }, /* XSUM_XXH3_withSecret_testdata[2745] */\n    { 2746, 0x0000000000000000ULL, 0xCF1C3217B3FA96A5ULL }, /* XSUM_XXH3_withSecret_testdata[2746] */\n    { 2747, 0x0000000000000000ULL, 0x324E2BF9393F49C0ULL }, /* XSUM_XXH3_withSecret_testdata[2747] */\n    { 2748, 0x0000000000000000ULL, 0xE70F81395137C31EULL }, /* XSUM_XXH3_withSecret_testdata[2748] */\n    { 2749, 0x0000000000000000ULL, 0x93D5F5C4CC553B50ULL }, /* XSUM_XXH3_withSecret_testdata[2749] */\n    { 2750, 0x0000000000000000ULL, 0xBFFA783F1CBFF56DULL }, /* XSUM_XXH3_withSecret_testdata[2750] */\n    { 2751, 0x0000000000000000ULL, 0x1D78DE39E4B359A6ULL }, /* XSUM_XXH3_withSecret_testdata[2751] */\n    { 2752, 0x0000000000000000ULL, 0xBB287377235EDC08ULL }, /* XSUM_XXH3_withSecret_testdata[2752] */\n    { 2753, 0x0000000000000000ULL, 0x6C2456AD352C9554ULL }, /* XSUM_XXH3_withSecret_testdata[2753] */\n    { 2754, 0x0000000000000000ULL, 0x1BF4054BCCA27FD7ULL }, /* XSUM_XXH3_withSecret_testdata[2754] */\n    { 2755, 0x0000000000000000ULL, 0xAC7B608DDDB27358ULL }, /* XSUM_XXH3_withSecret_testdata[2755] */\n    { 2756, 0x0000000000000000ULL, 0x0235B968B50ACFEFULL }, /* XSUM_XXH3_withSecret_testdata[2756] */\n    { 2757, 0x0000000000000000ULL, 0xF6A70A14FC5BDD6BULL }, /* XSUM_XXH3_withSecret_testdata[2757] */\n    { 2758, 0x0000000000000000ULL, 0xE3DE3EBC2E388DCAULL }, /* XSUM_XXH3_withSecret_testdata[2758] */\n    { 2759, 0x0000000000000000ULL, 0xB0AE9AB15E900917ULL }, /* XSUM_XXH3_withSecret_testdata[2759] */\n    { 2760, 0x0000000000000000ULL, 0x66FA24FBF160B1FDULL }, /* XSUM_XXH3_withSecret_testdata[2760] */\n    { 2761, 0x0000000000000000ULL, 0xF353DF47B4F0EC48ULL }, /* XSUM_XXH3_withSecret_testdata[2761] */\n    { 2762, 0x0000000000000000ULL, 0xFB59B70C1578CF38ULL }, /* XSUM_XXH3_withSecret_testdata[2762] */\n    { 2763, 0x0000000000000000ULL, 0xE05DFF1C885A7D80ULL }, /* XSUM_XXH3_withSecret_testdata[2763] */\n    { 2764, 0x0000000000000000ULL, 0xE5EEA924203FA37DULL }, /* XSUM_XXH3_withSecret_testdata[2764] */\n    { 2765, 0x0000000000000000ULL, 0xCD6F7FB5C036ED16ULL }, /* XSUM_XXH3_withSecret_testdata[2765] */\n    { 2766, 0x0000000000000000ULL, 0x79A96F1D3B95841BULL }, /* XSUM_XXH3_withSecret_testdata[2766] */\n    { 2767, 0x0000000000000000ULL, 0x72DCFAFA56ABF4DFULL }, /* XSUM_XXH3_withSecret_testdata[2767] */\n    { 2768, 0x0000000000000000ULL, 0xF204B717392BD4D0ULL }, /* XSUM_XXH3_withSecret_testdata[2768] */\n    { 2769, 0x0000000000000000ULL, 0x6DE5C83C19B338BBULL }, /* XSUM_XXH3_withSecret_testdata[2769] */\n    { 2770, 0x0000000000000000ULL, 0xC5C567298EBFB60BULL }, /* XSUM_XXH3_withSecret_testdata[2770] */\n    { 2771, 0x0000000000000000ULL, 0xC788884D383D1896ULL }, /* XSUM_XXH3_withSecret_testdata[2771] */\n    { 2772, 0x0000000000000000ULL, 0x2C0FFBBFA9A79F05ULL }, /* XSUM_XXH3_withSecret_testdata[2772] */\n    { 2773, 0x0000000000000000ULL, 0x94797FAB3BAFBBB3ULL }, /* XSUM_XXH3_withSecret_testdata[2773] */\n    { 2774, 0x0000000000000000ULL, 0xC34B8C0729D4BE4CULL }, /* XSUM_XXH3_withSecret_testdata[2774] */\n    { 2775, 0x0000000000000000ULL, 0x8DF43637A9297CBAULL }, /* XSUM_XXH3_withSecret_testdata[2775] */\n    { 2776, 0x0000000000000000ULL, 0xCD5FA536464E2E65ULL }, /* XSUM_XXH3_withSecret_testdata[2776] */\n    { 2777, 0x0000000000000000ULL, 0xE9541F4387BD4A25ULL }, /* XSUM_XXH3_withSecret_testdata[2777] */\n    { 2778, 0x0000000000000000ULL, 0x9BFED168E94DDCA8ULL }, /* XSUM_XXH3_withSecret_testdata[2778] */\n    { 2779, 0x0000000000000000ULL, 0x9E7FCB267E30D861ULL }, /* XSUM_XXH3_withSecret_testdata[2779] */\n    { 2780, 0x0000000000000000ULL, 0x702DF6FC825656DEULL }, /* XSUM_XXH3_withSecret_testdata[2780] */\n    { 2781, 0x0000000000000000ULL, 0xE707780A7986FAB8ULL }, /* XSUM_XXH3_withSecret_testdata[2781] */\n    { 2782, 0x0000000000000000ULL, 0xC03C37E26F0934B9ULL }, /* XSUM_XXH3_withSecret_testdata[2782] */\n    { 2783, 0x0000000000000000ULL, 0xA09B4C7DC5CA5A3FULL }, /* XSUM_XXH3_withSecret_testdata[2783] */\n    { 2784, 0x0000000000000000ULL, 0xFC1E02A96E3343CCULL }, /* XSUM_XXH3_withSecret_testdata[2784] */\n    { 2785, 0x0000000000000000ULL, 0x24D2C545F6E3E6BEULL }, /* XSUM_XXH3_withSecret_testdata[2785] */\n    { 2786, 0x0000000000000000ULL, 0x8AFEB9BBFB72540DULL }, /* XSUM_XXH3_withSecret_testdata[2786] */\n    { 2787, 0x0000000000000000ULL, 0xC4E33683C40A9E77ULL }, /* XSUM_XXH3_withSecret_testdata[2787] */\n    { 2788, 0x0000000000000000ULL, 0xEE25F588F432B1ADULL }, /* XSUM_XXH3_withSecret_testdata[2788] */\n    { 2789, 0x0000000000000000ULL, 0xF9ED1427FE79DF11ULL }, /* XSUM_XXH3_withSecret_testdata[2789] */\n    { 2790, 0x0000000000000000ULL, 0x0A22E09ED079E537ULL }, /* XSUM_XXH3_withSecret_testdata[2790] */\n    { 2791, 0x0000000000000000ULL, 0xE999A877D8EC41FDULL }, /* XSUM_XXH3_withSecret_testdata[2791] */\n    { 2792, 0x0000000000000000ULL, 0x1FB3987DDC9EBB52ULL }, /* XSUM_XXH3_withSecret_testdata[2792] */\n    { 2793, 0x0000000000000000ULL, 0x9FF55CAB0FB3D20BULL }, /* XSUM_XXH3_withSecret_testdata[2793] */\n    { 2794, 0x0000000000000000ULL, 0x36DCFAEE4C766E66ULL }, /* XSUM_XXH3_withSecret_testdata[2794] */\n    { 2795, 0x0000000000000000ULL, 0xD7BC29A3A977EA17ULL }, /* XSUM_XXH3_withSecret_testdata[2795] */\n    { 2796, 0x0000000000000000ULL, 0x5377D82B7C001FC2ULL }, /* XSUM_XXH3_withSecret_testdata[2796] */\n    { 2797, 0x0000000000000000ULL, 0x5561318FC103405DULL }, /* XSUM_XXH3_withSecret_testdata[2797] */\n    { 2798, 0x0000000000000000ULL, 0xEEB4E2A60F230FBFULL }, /* XSUM_XXH3_withSecret_testdata[2798] */\n    { 2799, 0x0000000000000000ULL, 0x8BDB1E653E8A49C3ULL }, /* XSUM_XXH3_withSecret_testdata[2799] */\n    { 2800, 0x0000000000000000ULL, 0x12A204BF81E34B69ULL }, /* XSUM_XXH3_withSecret_testdata[2800] */\n    { 2801, 0x0000000000000000ULL, 0xCC3D2BA4D7D7005CULL }, /* XSUM_XXH3_withSecret_testdata[2801] */\n    { 2802, 0x0000000000000000ULL, 0x051EFE66635C5537ULL }, /* XSUM_XXH3_withSecret_testdata[2802] */\n    { 2803, 0x0000000000000000ULL, 0x7C95EF8AE5C78FCFULL }, /* XSUM_XXH3_withSecret_testdata[2803] */\n    { 2804, 0x0000000000000000ULL, 0x9C432F611839A1EBULL }, /* XSUM_XXH3_withSecret_testdata[2804] */\n    { 2805, 0x0000000000000000ULL, 0x6679AEABC3ADF699ULL }, /* XSUM_XXH3_withSecret_testdata[2805] */\n    { 2806, 0x0000000000000000ULL, 0x02D753654FE918E9ULL }, /* XSUM_XXH3_withSecret_testdata[2806] */\n    { 2807, 0x0000000000000000ULL, 0x210F9D87A85522C4ULL }, /* XSUM_XXH3_withSecret_testdata[2807] */\n    { 2808, 0x0000000000000000ULL, 0xB0CE9CFB1FEF7927ULL }, /* XSUM_XXH3_withSecret_testdata[2808] */\n    { 2809, 0x0000000000000000ULL, 0x8C2D9AF242C9863BULL }, /* XSUM_XXH3_withSecret_testdata[2809] */\n    { 2810, 0x0000000000000000ULL, 0xE0FF20BC9CE0A8E5ULL }, /* XSUM_XXH3_withSecret_testdata[2810] */\n    { 2811, 0x0000000000000000ULL, 0x3534E1CE731A2E86ULL }, /* XSUM_XXH3_withSecret_testdata[2811] */\n    { 2812, 0x0000000000000000ULL, 0xA26DF2A499A9871EULL }, /* XSUM_XXH3_withSecret_testdata[2812] */\n    { 2813, 0x0000000000000000ULL, 0x9F4B4AB7255B02B9ULL }, /* XSUM_XXH3_withSecret_testdata[2813] */\n    { 2814, 0x0000000000000000ULL, 0xBCAEBE57332E22F9ULL }, /* XSUM_XXH3_withSecret_testdata[2814] */\n    { 2815, 0x0000000000000000ULL, 0xE6277102A50222ECULL }, /* XSUM_XXH3_withSecret_testdata[2815] */\n    { 2816, 0x0000000000000000ULL, 0x999C2EB9E577279AULL }, /* XSUM_XXH3_withSecret_testdata[2816] */\n    { 2817, 0x0000000000000000ULL, 0x29C1DC459C9130C2ULL }, /* XSUM_XXH3_withSecret_testdata[2817] */\n    { 2818, 0x0000000000000000ULL, 0xC1CAC38ED190EE18ULL }, /* XSUM_XXH3_withSecret_testdata[2818] */\n    { 2819, 0x0000000000000000ULL, 0x9B1350B1B96661A2ULL }, /* XSUM_XXH3_withSecret_testdata[2819] */\n    { 2820, 0x0000000000000000ULL, 0x71CAED77C7200A2BULL }, /* XSUM_XXH3_withSecret_testdata[2820] */\n    { 2821, 0x0000000000000000ULL, 0xB2EB0F1B367D1F1CULL }, /* XSUM_XXH3_withSecret_testdata[2821] */\n    { 2822, 0x0000000000000000ULL, 0x705227E5AA6724C3ULL }, /* XSUM_XXH3_withSecret_testdata[2822] */\n    { 2823, 0x0000000000000000ULL, 0xD4774A063460F910ULL }, /* XSUM_XXH3_withSecret_testdata[2823] */\n    { 2824, 0x0000000000000000ULL, 0xF32D1692780E6408ULL }, /* XSUM_XXH3_withSecret_testdata[2824] */\n    { 2825, 0x0000000000000000ULL, 0xB73D40295D5D4EC4ULL }, /* XSUM_XXH3_withSecret_testdata[2825] */\n    { 2826, 0x0000000000000000ULL, 0x91240DFD2CA34842ULL }, /* XSUM_XXH3_withSecret_testdata[2826] */\n    { 2827, 0x0000000000000000ULL, 0x50220D292F064558ULL }, /* XSUM_XXH3_withSecret_testdata[2827] */\n    { 2828, 0x0000000000000000ULL, 0x7126AB3CAA1CBA42ULL }, /* XSUM_XXH3_withSecret_testdata[2828] */\n    { 2829, 0x0000000000000000ULL, 0x039BC018490153BFULL }, /* XSUM_XXH3_withSecret_testdata[2829] */\n    { 2830, 0x0000000000000000ULL, 0x39C5942416D59D64ULL }, /* XSUM_XXH3_withSecret_testdata[2830] */\n    { 2831, 0x0000000000000000ULL, 0xD1A57EE78B392178ULL }, /* XSUM_XXH3_withSecret_testdata[2831] */\n    { 2832, 0x0000000000000000ULL, 0xE50A80674449DB42ULL }, /* XSUM_XXH3_withSecret_testdata[2832] */\n    { 2833, 0x0000000000000000ULL, 0x7719C3795D06E89CULL }, /* XSUM_XXH3_withSecret_testdata[2833] */\n    { 2834, 0x0000000000000000ULL, 0x4A739CBF8E891946ULL }, /* XSUM_XXH3_withSecret_testdata[2834] */\n    { 2835, 0x0000000000000000ULL, 0x6D330BD9B1BF21E6ULL }, /* XSUM_XXH3_withSecret_testdata[2835] */\n    { 2836, 0x0000000000000000ULL, 0x9E5BB469D8D97558ULL }, /* XSUM_XXH3_withSecret_testdata[2836] */\n    { 2837, 0x0000000000000000ULL, 0x83BADC427E8FF272ULL }, /* XSUM_XXH3_withSecret_testdata[2837] */\n    { 2838, 0x0000000000000000ULL, 0x46B3AE7CEBB9A538ULL }, /* XSUM_XXH3_withSecret_testdata[2838] */\n    { 2839, 0x0000000000000000ULL, 0x425119385FAF41FDULL }, /* XSUM_XXH3_withSecret_testdata[2839] */\n    { 2840, 0x0000000000000000ULL, 0xF4B2C887B8BE31DCULL }, /* XSUM_XXH3_withSecret_testdata[2840] */\n    { 2841, 0x0000000000000000ULL, 0xF2756DFC7B95624AULL }, /* XSUM_XXH3_withSecret_testdata[2841] */\n    { 2842, 0x0000000000000000ULL, 0x3ECEFC1A76C19E67ULL }, /* XSUM_XXH3_withSecret_testdata[2842] */\n    { 2843, 0x0000000000000000ULL, 0xCD7C55019E788D6CULL }, /* XSUM_XXH3_withSecret_testdata[2843] */\n    { 2844, 0x0000000000000000ULL, 0x3DD559ACBFD56CC2ULL }, /* XSUM_XXH3_withSecret_testdata[2844] */\n    { 2845, 0x0000000000000000ULL, 0x6D469F7989A711A5ULL }, /* XSUM_XXH3_withSecret_testdata[2845] */\n    { 2846, 0x0000000000000000ULL, 0xDFDBE44FC2F9ED49ULL }, /* XSUM_XXH3_withSecret_testdata[2846] */\n    { 2847, 0x0000000000000000ULL, 0x3625AAB3C169708BULL }, /* XSUM_XXH3_withSecret_testdata[2847] */\n    { 2848, 0x0000000000000000ULL, 0x35C3F7C6D3486020ULL }, /* XSUM_XXH3_withSecret_testdata[2848] */\n    { 2849, 0x0000000000000000ULL, 0x0BEFA2238E9365ADULL }, /* XSUM_XXH3_withSecret_testdata[2849] */\n    { 2850, 0x0000000000000000ULL, 0x0696ABFA8C9BB130ULL }, /* XSUM_XXH3_withSecret_testdata[2850] */\n    { 2851, 0x0000000000000000ULL, 0x5850A42F4E854EBEULL }, /* XSUM_XXH3_withSecret_testdata[2851] */\n    { 2852, 0x0000000000000000ULL, 0x10B415F2D678A86AULL }, /* XSUM_XXH3_withSecret_testdata[2852] */\n    { 2853, 0x0000000000000000ULL, 0xD1C1749BE69AD494ULL }, /* XSUM_XXH3_withSecret_testdata[2853] */\n    { 2854, 0x0000000000000000ULL, 0xA46932A6C4B1953EULL }, /* XSUM_XXH3_withSecret_testdata[2854] */\n    { 2855, 0x0000000000000000ULL, 0x88CB1FED07729FECULL }, /* XSUM_XXH3_withSecret_testdata[2855] */\n    { 2856, 0x0000000000000000ULL, 0x3ADE9267084894AFULL }, /* XSUM_XXH3_withSecret_testdata[2856] */\n    { 2857, 0x0000000000000000ULL, 0xDF70FFEEB7F5DAE3ULL }, /* XSUM_XXH3_withSecret_testdata[2857] */\n    { 2858, 0x0000000000000000ULL, 0x02315C318359AFF1ULL }, /* XSUM_XXH3_withSecret_testdata[2858] */\n    { 2859, 0x0000000000000000ULL, 0x5B38CEEA2CB023C2ULL }, /* XSUM_XXH3_withSecret_testdata[2859] */\n    { 2860, 0x0000000000000000ULL, 0x4C067A257B0B9D80ULL }, /* XSUM_XXH3_withSecret_testdata[2860] */\n    { 2861, 0x0000000000000000ULL, 0x0B1A088D92171A91ULL }, /* XSUM_XXH3_withSecret_testdata[2861] */\n    { 2862, 0x0000000000000000ULL, 0xE009B2698AEEBADEULL }, /* XSUM_XXH3_withSecret_testdata[2862] */\n    { 2863, 0x0000000000000000ULL, 0x8924C02524FE7413ULL }, /* XSUM_XXH3_withSecret_testdata[2863] */\n    { 2864, 0x0000000000000000ULL, 0x34786BD34726328BULL }, /* XSUM_XXH3_withSecret_testdata[2864] */\n    { 2865, 0x0000000000000000ULL, 0x5D8F0CB1295702E6ULL }, /* XSUM_XXH3_withSecret_testdata[2865] */\n    { 2866, 0x0000000000000000ULL, 0xEB2DA9C9F3DA673EULL }, /* XSUM_XXH3_withSecret_testdata[2866] */\n    { 2867, 0x0000000000000000ULL, 0x5CA1165213EF818FULL }, /* XSUM_XXH3_withSecret_testdata[2867] */\n    { 2868, 0x0000000000000000ULL, 0x93C6848735D05D15ULL }, /* XSUM_XXH3_withSecret_testdata[2868] */\n    { 2869, 0x0000000000000000ULL, 0x8878647E504E661DULL }, /* XSUM_XXH3_withSecret_testdata[2869] */\n    { 2870, 0x0000000000000000ULL, 0x1D5F1DBEE675B24AULL }, /* XSUM_XXH3_withSecret_testdata[2870] */\n    { 2871, 0x0000000000000000ULL, 0x115D63E36B0F1FBEULL }, /* XSUM_XXH3_withSecret_testdata[2871] */\n    { 2872, 0x0000000000000000ULL, 0x4DF2F24A2E98D962ULL }, /* XSUM_XXH3_withSecret_testdata[2872] */\n    { 2873, 0x0000000000000000ULL, 0x3B1E3D0177F4B488ULL }, /* XSUM_XXH3_withSecret_testdata[2873] */\n    { 2874, 0x0000000000000000ULL, 0x49658533C6146A5EULL }, /* XSUM_XXH3_withSecret_testdata[2874] */\n    { 2875, 0x0000000000000000ULL, 0xB714BC9FFB355DB7ULL }, /* XSUM_XXH3_withSecret_testdata[2875] */\n    { 2876, 0x0000000000000000ULL, 0x5843138528F6CBD1ULL }, /* XSUM_XXH3_withSecret_testdata[2876] */\n    { 2877, 0x0000000000000000ULL, 0x3493D0BFCFDEE423ULL }, /* XSUM_XXH3_withSecret_testdata[2877] */\n    { 2878, 0x0000000000000000ULL, 0xC6893D3EE31368A3ULL }, /* XSUM_XXH3_withSecret_testdata[2878] */\n    { 2879, 0x0000000000000000ULL, 0xB13736A51649E9CFULL }, /* XSUM_XXH3_withSecret_testdata[2879] */\n    { 2880, 0x0000000000000000ULL, 0xB494AE6C2A905015ULL }, /* XSUM_XXH3_withSecret_testdata[2880] */\n    { 2881, 0x0000000000000000ULL, 0x27177CBAFBC37006ULL }, /* XSUM_XXH3_withSecret_testdata[2881] */\n    { 2882, 0x0000000000000000ULL, 0x04A94338FE7B046DULL }, /* XSUM_XXH3_withSecret_testdata[2882] */\n    { 2883, 0x0000000000000000ULL, 0x97630E06E0DFCEFEULL }, /* XSUM_XXH3_withSecret_testdata[2883] */\n    { 2884, 0x0000000000000000ULL, 0xFD38D6319F3B28DBULL }, /* XSUM_XXH3_withSecret_testdata[2884] */\n    { 2885, 0x0000000000000000ULL, 0x4EC1A9D59AC9AC98ULL }, /* XSUM_XXH3_withSecret_testdata[2885] */\n    { 2886, 0x0000000000000000ULL, 0x7710ECE049A1EE47ULL }, /* XSUM_XXH3_withSecret_testdata[2886] */\n    { 2887, 0x0000000000000000ULL, 0x0E87931145CC74DEULL }, /* XSUM_XXH3_withSecret_testdata[2887] */\n    { 2888, 0x0000000000000000ULL, 0x79C59FE86B852C41ULL }, /* XSUM_XXH3_withSecret_testdata[2888] */\n    { 2889, 0x0000000000000000ULL, 0x9FD3DFD399579356ULL }, /* XSUM_XXH3_withSecret_testdata[2889] */\n    { 2890, 0x0000000000000000ULL, 0x34B2D10D4B5421D7ULL }, /* XSUM_XXH3_withSecret_testdata[2890] */\n    { 2891, 0x0000000000000000ULL, 0xD5E4579B474E464EULL }, /* XSUM_XXH3_withSecret_testdata[2891] */\n    { 2892, 0x0000000000000000ULL, 0xF28C6770BFC26AC7ULL }, /* XSUM_XXH3_withSecret_testdata[2892] */\n    { 2893, 0x0000000000000000ULL, 0xD377046A26F17C89ULL }, /* XSUM_XXH3_withSecret_testdata[2893] */\n    { 2894, 0x0000000000000000ULL, 0xBD7E0363D136E7C8ULL }, /* XSUM_XXH3_withSecret_testdata[2894] */\n    { 2895, 0x0000000000000000ULL, 0x33A42E350F0D7A95ULL }, /* XSUM_XXH3_withSecret_testdata[2895] */\n    { 2896, 0x0000000000000000ULL, 0x692A55C8A2F34504ULL }, /* XSUM_XXH3_withSecret_testdata[2896] */\n    { 2897, 0x0000000000000000ULL, 0x8243CD9917D5888AULL }, /* XSUM_XXH3_withSecret_testdata[2897] */\n    { 2898, 0x0000000000000000ULL, 0x85C34825497D544DULL }, /* XSUM_XXH3_withSecret_testdata[2898] */\n    { 2899, 0x0000000000000000ULL, 0x1874C3A72EE520EFULL }, /* XSUM_XXH3_withSecret_testdata[2899] */\n    { 2900, 0x0000000000000000ULL, 0x6A2B9EF6A1B82F46ULL }, /* XSUM_XXH3_withSecret_testdata[2900] */\n    { 2901, 0x0000000000000000ULL, 0xC1FA8FD25D5522E5ULL }, /* XSUM_XXH3_withSecret_testdata[2901] */\n    { 2902, 0x0000000000000000ULL, 0xA46AEC4357A6A0A4ULL }, /* XSUM_XXH3_withSecret_testdata[2902] */\n    { 2903, 0x0000000000000000ULL, 0xA327142A63323D97ULL }, /* XSUM_XXH3_withSecret_testdata[2903] */\n    { 2904, 0x0000000000000000ULL, 0x7F59130823574970ULL }, /* XSUM_XXH3_withSecret_testdata[2904] */\n    { 2905, 0x0000000000000000ULL, 0xB7E62F19E6D0FDE6ULL }, /* XSUM_XXH3_withSecret_testdata[2905] */\n    { 2906, 0x0000000000000000ULL, 0x32530270AC8581A2ULL }, /* XSUM_XXH3_withSecret_testdata[2906] */\n    { 2907, 0x0000000000000000ULL, 0xEA4C04EFF7300831ULL }, /* XSUM_XXH3_withSecret_testdata[2907] */\n    { 2908, 0x0000000000000000ULL, 0x3271E6E36689C35CULL }, /* XSUM_XXH3_withSecret_testdata[2908] */\n    { 2909, 0x0000000000000000ULL, 0xD80C86B0A79FB06BULL }, /* XSUM_XXH3_withSecret_testdata[2909] */\n    { 2910, 0x0000000000000000ULL, 0x127ACC9F23D3DC82ULL }, /* XSUM_XXH3_withSecret_testdata[2910] */\n    { 2911, 0x0000000000000000ULL, 0x1940C66BF858A647ULL }, /* XSUM_XXH3_withSecret_testdata[2911] */\n    { 2912, 0x0000000000000000ULL, 0x9AB8A8D48E03336DULL }, /* XSUM_XXH3_withSecret_testdata[2912] */\n    { 2913, 0x0000000000000000ULL, 0xF55386F445650D8CULL }, /* XSUM_XXH3_withSecret_testdata[2913] */\n    { 2914, 0x0000000000000000ULL, 0x30C30B5A9CCBE11FULL }, /* XSUM_XXH3_withSecret_testdata[2914] */\n    { 2915, 0x0000000000000000ULL, 0xC9BE00FC4AD2E7F4ULL }, /* XSUM_XXH3_withSecret_testdata[2915] */\n    { 2916, 0x0000000000000000ULL, 0x17CDED5911477A60ULL }, /* XSUM_XXH3_withSecret_testdata[2916] */\n    { 2917, 0x0000000000000000ULL, 0xA75B0B9F5608BDD8ULL }, /* XSUM_XXH3_withSecret_testdata[2917] */\n    { 2918, 0x0000000000000000ULL, 0x8D037984687F5942ULL }, /* XSUM_XXH3_withSecret_testdata[2918] */\n    { 2919, 0x0000000000000000ULL, 0x2A5D8EEFEF26153CULL }, /* XSUM_XXH3_withSecret_testdata[2919] */\n    { 2920, 0x0000000000000000ULL, 0x2BFAB5944FE9C364ULL }, /* XSUM_XXH3_withSecret_testdata[2920] */\n    { 2921, 0x0000000000000000ULL, 0x89423403078D740EULL }, /* XSUM_XXH3_withSecret_testdata[2921] */\n    { 2922, 0x0000000000000000ULL, 0xAC3D0A9B2BD84C8BULL }, /* XSUM_XXH3_withSecret_testdata[2922] */\n    { 2923, 0x0000000000000000ULL, 0xFCCF992B8EE26854ULL }, /* XSUM_XXH3_withSecret_testdata[2923] */\n    { 2924, 0x0000000000000000ULL, 0x1A84D6CD10EAC49EULL }, /* XSUM_XXH3_withSecret_testdata[2924] */\n    { 2925, 0x0000000000000000ULL, 0xB52E848D2238CC49ULL }, /* XSUM_XXH3_withSecret_testdata[2925] */\n    { 2926, 0x0000000000000000ULL, 0x1E657C6CC7390AA9ULL }, /* XSUM_XXH3_withSecret_testdata[2926] */\n    { 2927, 0x0000000000000000ULL, 0xFD04D7D199782140ULL }, /* XSUM_XXH3_withSecret_testdata[2927] */\n    { 2928, 0x0000000000000000ULL, 0x0D646EDD4EA8E0B5ULL }, /* XSUM_XXH3_withSecret_testdata[2928] */\n    { 2929, 0x0000000000000000ULL, 0xFA68DF886EEED4BCULL }, /* XSUM_XXH3_withSecret_testdata[2929] */\n    { 2930, 0x0000000000000000ULL, 0xB82D60F9EC312618ULL }, /* XSUM_XXH3_withSecret_testdata[2930] */\n    { 2931, 0x0000000000000000ULL, 0x3B745EB2D5C98654ULL }, /* XSUM_XXH3_withSecret_testdata[2931] */\n    { 2932, 0x0000000000000000ULL, 0xB130D4CDF9F55D0AULL }, /* XSUM_XXH3_withSecret_testdata[2932] */\n    { 2933, 0x0000000000000000ULL, 0xA66A35D31AE1F395ULL }, /* XSUM_XXH3_withSecret_testdata[2933] */\n    { 2934, 0x0000000000000000ULL, 0x9FBB6F77F3A85EBEULL }, /* XSUM_XXH3_withSecret_testdata[2934] */\n    { 2935, 0x0000000000000000ULL, 0x3C3AA7EE1BB221D1ULL }, /* XSUM_XXH3_withSecret_testdata[2935] */\n    { 2936, 0x0000000000000000ULL, 0xDA79B8AE9B825249ULL }, /* XSUM_XXH3_withSecret_testdata[2936] */\n    { 2937, 0x0000000000000000ULL, 0x0FDFEF32A59627A6ULL }, /* XSUM_XXH3_withSecret_testdata[2937] */\n    { 2938, 0x0000000000000000ULL, 0x706F4AF597DBE5A1ULL }, /* XSUM_XXH3_withSecret_testdata[2938] */\n    { 2939, 0x0000000000000000ULL, 0xD91F82F858438339ULL }, /* XSUM_XXH3_withSecret_testdata[2939] */\n    { 2940, 0x0000000000000000ULL, 0x86E840A5F08BDC1CULL }, /* XSUM_XXH3_withSecret_testdata[2940] */\n    { 2941, 0x0000000000000000ULL, 0xE9BCEA2E8EAE5511ULL }, /* XSUM_XXH3_withSecret_testdata[2941] */\n    { 2942, 0x0000000000000000ULL, 0x49482DD0A8A66DFDULL }, /* XSUM_XXH3_withSecret_testdata[2942] */\n    { 2943, 0x0000000000000000ULL, 0x620B9D9636DD8BFEULL }, /* XSUM_XXH3_withSecret_testdata[2943] */\n    { 2944, 0x0000000000000000ULL, 0xBB78B6D00515DC1BULL }, /* XSUM_XXH3_withSecret_testdata[2944] */\n    { 2945, 0x0000000000000000ULL, 0x47EEEA42E2A9FDB3ULL }, /* XSUM_XXH3_withSecret_testdata[2945] */\n    { 2946, 0x0000000000000000ULL, 0x11FB56CA0236EE6FULL }, /* XSUM_XXH3_withSecret_testdata[2946] */\n    { 2947, 0x0000000000000000ULL, 0xAD90BD39650625DDULL }, /* XSUM_XXH3_withSecret_testdata[2947] */\n    { 2948, 0x0000000000000000ULL, 0x094C3B0244E78655ULL }, /* XSUM_XXH3_withSecret_testdata[2948] */\n    { 2949, 0x0000000000000000ULL, 0x11231A6A714E2F35ULL }, /* XSUM_XXH3_withSecret_testdata[2949] */\n    { 2950, 0x0000000000000000ULL, 0xFEC0654F83BB9C8DULL }, /* XSUM_XXH3_withSecret_testdata[2950] */\n    { 2951, 0x0000000000000000ULL, 0x295E1F606E5F54C1ULL }, /* XSUM_XXH3_withSecret_testdata[2951] */\n    { 2952, 0x0000000000000000ULL, 0x0FB5E42BE9E6E710ULL }, /* XSUM_XXH3_withSecret_testdata[2952] */\n    { 2953, 0x0000000000000000ULL, 0xC41F6CC6D803B236ULL }, /* XSUM_XXH3_withSecret_testdata[2953] */\n    { 2954, 0x0000000000000000ULL, 0xDA4D34D846086CC2ULL }, /* XSUM_XXH3_withSecret_testdata[2954] */\n    { 2955, 0x0000000000000000ULL, 0xB2B2C9CA61D494E1ULL }, /* XSUM_XXH3_withSecret_testdata[2955] */\n    { 2956, 0x0000000000000000ULL, 0x82F0178E124F477CULL }, /* XSUM_XXH3_withSecret_testdata[2956] */\n    { 2957, 0x0000000000000000ULL, 0x3FE22F0919C3D383ULL }, /* XSUM_XXH3_withSecret_testdata[2957] */\n    { 2958, 0x0000000000000000ULL, 0x781120F2D102450DULL }, /* XSUM_XXH3_withSecret_testdata[2958] */\n    { 2959, 0x0000000000000000ULL, 0x4581B8E8BA4B8E15ULL }, /* XSUM_XXH3_withSecret_testdata[2959] */\n    { 2960, 0x0000000000000000ULL, 0x5EF8BC6F614A1E38ULL }, /* XSUM_XXH3_withSecret_testdata[2960] */\n    { 2961, 0x0000000000000000ULL, 0x5584A7DA5704B8A5ULL }, /* XSUM_XXH3_withSecret_testdata[2961] */\n    { 2962, 0x0000000000000000ULL, 0x410E213C34BED8DAULL }, /* XSUM_XXH3_withSecret_testdata[2962] */\n    { 2963, 0x0000000000000000ULL, 0x3C06473A20355DF1ULL }, /* XSUM_XXH3_withSecret_testdata[2963] */\n    { 2964, 0x0000000000000000ULL, 0x46A4D368431E6F27ULL }, /* XSUM_XXH3_withSecret_testdata[2964] */\n    { 2965, 0x0000000000000000ULL, 0x0DAC2A7183236D55ULL }, /* XSUM_XXH3_withSecret_testdata[2965] */\n    { 2966, 0x0000000000000000ULL, 0x84E0448ECF502BD7ULL }, /* XSUM_XXH3_withSecret_testdata[2966] */\n    { 2967, 0x0000000000000000ULL, 0x3E3B324F1D7A67C0ULL }, /* XSUM_XXH3_withSecret_testdata[2967] */\n    { 2968, 0x0000000000000000ULL, 0x752D76BA546789B5ULL }, /* XSUM_XXH3_withSecret_testdata[2968] */\n    { 2969, 0x0000000000000000ULL, 0x6AF4416ADA64A6E8ULL }, /* XSUM_XXH3_withSecret_testdata[2969] */\n    { 2970, 0x0000000000000000ULL, 0xE51908F69CE5CB3CULL }, /* XSUM_XXH3_withSecret_testdata[2970] */\n    { 2971, 0x0000000000000000ULL, 0x07840A67B1220907ULL }, /* XSUM_XXH3_withSecret_testdata[2971] */\n    { 2972, 0x0000000000000000ULL, 0x9726EC41E319AE79ULL }, /* XSUM_XXH3_withSecret_testdata[2972] */\n    { 2973, 0x0000000000000000ULL, 0xB5AA05B6E09E6D52ULL }, /* XSUM_XXH3_withSecret_testdata[2973] */\n    { 2974, 0x0000000000000000ULL, 0xDEE4714EFE0D7D19ULL }, /* XSUM_XXH3_withSecret_testdata[2974] */\n    { 2975, 0x0000000000000000ULL, 0x8683B9609AD2BAD8ULL }, /* XSUM_XXH3_withSecret_testdata[2975] */\n    { 2976, 0x0000000000000000ULL, 0xE597E8277DB17FEEULL }, /* XSUM_XXH3_withSecret_testdata[2976] */\n    { 2977, 0x0000000000000000ULL, 0x8B9B29ACB557BFDFULL }, /* XSUM_XXH3_withSecret_testdata[2977] */\n    { 2978, 0x0000000000000000ULL, 0x6E5FD99A3502572CULL }, /* XSUM_XXH3_withSecret_testdata[2978] */\n    { 2979, 0x0000000000000000ULL, 0x5A98A81AF673BA24ULL }, /* XSUM_XXH3_withSecret_testdata[2979] */\n    { 2980, 0x0000000000000000ULL, 0x63F598A7EA196E5CULL }, /* XSUM_XXH3_withSecret_testdata[2980] */\n    { 2981, 0x0000000000000000ULL, 0x4313CB47CA9D3AE4ULL }, /* XSUM_XXH3_withSecret_testdata[2981] */\n    { 2982, 0x0000000000000000ULL, 0x7218A7ABC1937665ULL }, /* XSUM_XXH3_withSecret_testdata[2982] */\n    { 2983, 0x0000000000000000ULL, 0xF156732278FFF3CFULL }, /* XSUM_XXH3_withSecret_testdata[2983] */\n    { 2984, 0x0000000000000000ULL, 0xF7CC0418DC1C114BULL }, /* XSUM_XXH3_withSecret_testdata[2984] */\n    { 2985, 0x0000000000000000ULL, 0x0E0CA08644DD54C2ULL }, /* XSUM_XXH3_withSecret_testdata[2985] */\n    { 2986, 0x0000000000000000ULL, 0xAA74DEDCB1A81017ULL }, /* XSUM_XXH3_withSecret_testdata[2986] */\n    { 2987, 0x0000000000000000ULL, 0xF255D515D5E9EB26ULL }, /* XSUM_XXH3_withSecret_testdata[2987] */\n    { 2988, 0x0000000000000000ULL, 0x542F350CDA095756ULL }, /* XSUM_XXH3_withSecret_testdata[2988] */\n    { 2989, 0x0000000000000000ULL, 0x7BDDF1C94E03824FULL }, /* XSUM_XXH3_withSecret_testdata[2989] */\n    { 2990, 0x0000000000000000ULL, 0x9AE455D15AABC880ULL }, /* XSUM_XXH3_withSecret_testdata[2990] */\n    { 2991, 0x0000000000000000ULL, 0x33AB3BE4A89D3625ULL }, /* XSUM_XXH3_withSecret_testdata[2991] */\n    { 2992, 0x0000000000000000ULL, 0x6C63E6CF94383962ULL }, /* XSUM_XXH3_withSecret_testdata[2992] */\n    { 2993, 0x0000000000000000ULL, 0x8EDCD05B919EE191ULL }, /* XSUM_XXH3_withSecret_testdata[2993] */\n    { 2994, 0x0000000000000000ULL, 0xF67E7C8B2C9A4669ULL }, /* XSUM_XXH3_withSecret_testdata[2994] */\n    { 2995, 0x0000000000000000ULL, 0x39E4266FFC536EB8ULL }, /* XSUM_XXH3_withSecret_testdata[2995] */\n    { 2996, 0x0000000000000000ULL, 0x829ACE387570537AULL }, /* XSUM_XXH3_withSecret_testdata[2996] */\n    { 2997, 0x0000000000000000ULL, 0xDCFD4A34A8E6BD26ULL }, /* XSUM_XXH3_withSecret_testdata[2997] */\n    { 2998, 0x0000000000000000ULL, 0xEE34D3DCA438A74FULL }, /* XSUM_XXH3_withSecret_testdata[2998] */\n    { 2999, 0x0000000000000000ULL, 0x060D44F7CDD5904EULL }, /* XSUM_XXH3_withSecret_testdata[2999] */\n    { 3000, 0x0000000000000000ULL, 0x1250C48602594CBEULL }, /* XSUM_XXH3_withSecret_testdata[3000] */\n    { 3001, 0x0000000000000000ULL, 0x75B1B05BD9768D80ULL }, /* XSUM_XXH3_withSecret_testdata[3001] */\n    { 3002, 0x0000000000000000ULL, 0x8E1D4A3E93349F6AULL }, /* XSUM_XXH3_withSecret_testdata[3002] */\n    { 3003, 0x0000000000000000ULL, 0x317D33B5C2F3B1DFULL }, /* XSUM_XXH3_withSecret_testdata[3003] */\n    { 3004, 0x0000000000000000ULL, 0xFD4650A34245B96EULL }, /* XSUM_XXH3_withSecret_testdata[3004] */\n    { 3005, 0x0000000000000000ULL, 0x08BAA1559B83D5EBULL }, /* XSUM_XXH3_withSecret_testdata[3005] */\n    { 3006, 0x0000000000000000ULL, 0xBF782E901A3A9A8DULL }, /* XSUM_XXH3_withSecret_testdata[3006] */\n    { 3007, 0x0000000000000000ULL, 0xC5931ED0ABC4D964ULL }, /* XSUM_XXH3_withSecret_testdata[3007] */\n    { 3008, 0x0000000000000000ULL, 0x0BF450B3BF31E586ULL }, /* XSUM_XXH3_withSecret_testdata[3008] */\n    { 3009, 0x0000000000000000ULL, 0x4DBE698BD5B96DA0ULL }, /* XSUM_XXH3_withSecret_testdata[3009] */\n    { 3010, 0x0000000000000000ULL, 0x3E241D5756D85033ULL }, /* XSUM_XXH3_withSecret_testdata[3010] */\n    { 3011, 0x0000000000000000ULL, 0xD8D8FCB6AD17DB65ULL }, /* XSUM_XXH3_withSecret_testdata[3011] */\n    { 3012, 0x0000000000000000ULL, 0x979038EEB6FDBB23ULL }, /* XSUM_XXH3_withSecret_testdata[3012] */\n    { 3013, 0x0000000000000000ULL, 0x17C29623ACB086D2ULL }, /* XSUM_XXH3_withSecret_testdata[3013] */\n    { 3014, 0x0000000000000000ULL, 0x3398BF7A94E8965EULL }, /* XSUM_XXH3_withSecret_testdata[3014] */\n    { 3015, 0x0000000000000000ULL, 0x0AD193A4EA7A18E5ULL }, /* XSUM_XXH3_withSecret_testdata[3015] */\n    { 3016, 0x0000000000000000ULL, 0xF209082DA597AD24ULL }, /* XSUM_XXH3_withSecret_testdata[3016] */\n    { 3017, 0x0000000000000000ULL, 0x8AAD1032243F99E4ULL }, /* XSUM_XXH3_withSecret_testdata[3017] */\n    { 3018, 0x0000000000000000ULL, 0xA94CDBDACDF7A210ULL }, /* XSUM_XXH3_withSecret_testdata[3018] */\n    { 3019, 0x0000000000000000ULL, 0x6B62D320328C5AE1ULL }, /* XSUM_XXH3_withSecret_testdata[3019] */\n    { 3020, 0x0000000000000000ULL, 0xDA5E557F5E28DB8AULL }, /* XSUM_XXH3_withSecret_testdata[3020] */\n    { 3021, 0x0000000000000000ULL, 0xDAF472C7EAA50F9DULL }, /* XSUM_XXH3_withSecret_testdata[3021] */\n    { 3022, 0x0000000000000000ULL, 0xEF7DC5BDD4EFB484ULL }, /* XSUM_XXH3_withSecret_testdata[3022] */\n    { 3023, 0x0000000000000000ULL, 0x4273AEBD8F95C306ULL }, /* XSUM_XXH3_withSecret_testdata[3023] */\n    { 3024, 0x0000000000000000ULL, 0xE3535E7338CA8698ULL }, /* XSUM_XXH3_withSecret_testdata[3024] */\n    { 3025, 0x0000000000000000ULL, 0x6CD575AD5ED07DA4ULL }, /* XSUM_XXH3_withSecret_testdata[3025] */\n    { 3026, 0x0000000000000000ULL, 0x29276AE02486AD00ULL }, /* XSUM_XXH3_withSecret_testdata[3026] */\n    { 3027, 0x0000000000000000ULL, 0xA0B5CE2365382D03ULL }, /* XSUM_XXH3_withSecret_testdata[3027] */\n    { 3028, 0x0000000000000000ULL, 0x410F0E6B726FCDEBULL }, /* XSUM_XXH3_withSecret_testdata[3028] */\n    { 3029, 0x0000000000000000ULL, 0xA62AC30207B7C447ULL }, /* XSUM_XXH3_withSecret_testdata[3029] */\n    { 3030, 0x0000000000000000ULL, 0x92DACCF62A620D30ULL }, /* XSUM_XXH3_withSecret_testdata[3030] */\n    { 3031, 0x0000000000000000ULL, 0x6ABF0B99521E0E9DULL }, /* XSUM_XXH3_withSecret_testdata[3031] */\n    { 3032, 0x0000000000000000ULL, 0x3B0CD98E1372D43CULL }, /* XSUM_XXH3_withSecret_testdata[3032] */\n    { 3033, 0x0000000000000000ULL, 0x01E2872E1C17BDA7ULL }, /* XSUM_XXH3_withSecret_testdata[3033] */\n    { 3034, 0x0000000000000000ULL, 0x2D9E2633E53DB16CULL }, /* XSUM_XXH3_withSecret_testdata[3034] */\n    { 3035, 0x0000000000000000ULL, 0x368DD48533B9F31DULL }, /* XSUM_XXH3_withSecret_testdata[3035] */\n    { 3036, 0x0000000000000000ULL, 0x4F2E1EE3DDA45EE4ULL }, /* XSUM_XXH3_withSecret_testdata[3036] */\n    { 3037, 0x0000000000000000ULL, 0x30FF66799DA36614ULL }, /* XSUM_XXH3_withSecret_testdata[3037] */\n    { 3038, 0x0000000000000000ULL, 0x4AAFC20716828FF3ULL }, /* XSUM_XXH3_withSecret_testdata[3038] */\n    { 3039, 0x0000000000000000ULL, 0xF226B8DD54DA35E7ULL }, /* XSUM_XXH3_withSecret_testdata[3039] */\n    { 3040, 0x0000000000000000ULL, 0x6C1A227605D08804ULL }, /* XSUM_XXH3_withSecret_testdata[3040] */\n    { 3041, 0x0000000000000000ULL, 0x4ED822AEF5847837ULL }, /* XSUM_XXH3_withSecret_testdata[3041] */\n    { 3042, 0x0000000000000000ULL, 0x883B36AA1CD505BFULL }, /* XSUM_XXH3_withSecret_testdata[3042] */\n    { 3043, 0x0000000000000000ULL, 0x058963E8D54F90BEULL }, /* XSUM_XXH3_withSecret_testdata[3043] */\n    { 3044, 0x0000000000000000ULL, 0x9C29F0D4C28B90C7ULL }, /* XSUM_XXH3_withSecret_testdata[3044] */\n    { 3045, 0x0000000000000000ULL, 0x5FD9A0A4209B6F90ULL }, /* XSUM_XXH3_withSecret_testdata[3045] */\n    { 3046, 0x0000000000000000ULL, 0xF3E49B5D7B049C5EULL }, /* XSUM_XXH3_withSecret_testdata[3046] */\n    { 3047, 0x0000000000000000ULL, 0x98E9345AFA285850ULL }, /* XSUM_XXH3_withSecret_testdata[3047] */\n    { 3048, 0x0000000000000000ULL, 0x8D1129C3B9E67388ULL }, /* XSUM_XXH3_withSecret_testdata[3048] */\n    { 3049, 0x0000000000000000ULL, 0x855BB6F44F6A85F3ULL }, /* XSUM_XXH3_withSecret_testdata[3049] */\n    { 3050, 0x0000000000000000ULL, 0x9D78F527CAC4A3AEULL }, /* XSUM_XXH3_withSecret_testdata[3050] */\n    { 3051, 0x0000000000000000ULL, 0xDE61E8DA3F4D75FCULL }, /* XSUM_XXH3_withSecret_testdata[3051] */\n    { 3052, 0x0000000000000000ULL, 0x1AD45D5B6AB5D872ULL }, /* XSUM_XXH3_withSecret_testdata[3052] */\n    { 3053, 0x0000000000000000ULL, 0xE3F249B6B96D76D4ULL }, /* XSUM_XXH3_withSecret_testdata[3053] */\n    { 3054, 0x0000000000000000ULL, 0x79C8D995A0685F8BULL }, /* XSUM_XXH3_withSecret_testdata[3054] */\n    { 3055, 0x0000000000000000ULL, 0x68D85EAB36CB3870ULL }, /* XSUM_XXH3_withSecret_testdata[3055] */\n    { 3056, 0x0000000000000000ULL, 0x853590CBE8F7C06EULL }, /* XSUM_XXH3_withSecret_testdata[3056] */\n    { 3057, 0x0000000000000000ULL, 0xB19AD049A7D460D3ULL }, /* XSUM_XXH3_withSecret_testdata[3057] */\n    { 3058, 0x0000000000000000ULL, 0x4545D3E37516E8CBULL }, /* XSUM_XXH3_withSecret_testdata[3058] */\n    { 3059, 0x0000000000000000ULL, 0x0B73B87EF4753050ULL }, /* XSUM_XXH3_withSecret_testdata[3059] */\n    { 3060, 0x0000000000000000ULL, 0x4280EBDF257E215BULL }, /* XSUM_XXH3_withSecret_testdata[3060] */\n    { 3061, 0x0000000000000000ULL, 0x5ED37552FE3E09FFULL }, /* XSUM_XXH3_withSecret_testdata[3061] */\n    { 3062, 0x0000000000000000ULL, 0x3CEEB6B4D7839EF2ULL }, /* XSUM_XXH3_withSecret_testdata[3062] */\n    { 3063, 0x0000000000000000ULL, 0x9D74B7565FB68879ULL }, /* XSUM_XXH3_withSecret_testdata[3063] */\n    { 3064, 0x0000000000000000ULL, 0xBCC97275F418532BULL }, /* XSUM_XXH3_withSecret_testdata[3064] */\n    { 3065, 0x0000000000000000ULL, 0x9286EE8B29B7D677ULL }, /* XSUM_XXH3_withSecret_testdata[3065] */\n    { 3066, 0x0000000000000000ULL, 0x2D301FDD114930D5ULL }, /* XSUM_XXH3_withSecret_testdata[3066] */\n    { 3067, 0x0000000000000000ULL, 0xF4A5F0BA1AD09DFFULL }, /* XSUM_XXH3_withSecret_testdata[3067] */\n    { 3068, 0x0000000000000000ULL, 0x2445BA11D91914DAULL }, /* XSUM_XXH3_withSecret_testdata[3068] */\n    { 3069, 0x0000000000000000ULL, 0xDB217281B4AC796DULL }, /* XSUM_XXH3_withSecret_testdata[3069] */\n    { 3070, 0x0000000000000000ULL, 0x535E96FDD327B705ULL }, /* XSUM_XXH3_withSecret_testdata[3070] */\n    { 3071, 0x0000000000000000ULL, 0x8B57904DB74393D5ULL }, /* XSUM_XXH3_withSecret_testdata[3071] */\n    { 3072, 0x0000000000000000ULL, 0xF5A0D758BA06FCFEULL }, /* XSUM_XXH3_withSecret_testdata[3072] */\n    { 3073, 0x0000000000000000ULL, 0x70C7020C10282027ULL }, /* XSUM_XXH3_withSecret_testdata[3073] */\n    { 3074, 0x0000000000000000ULL, 0xFC72B1DF46FB974CULL }, /* XSUM_XXH3_withSecret_testdata[3074] */\n    { 3075, 0x0000000000000000ULL, 0x9C7919FFA900C172ULL }, /* XSUM_XXH3_withSecret_testdata[3075] */\n    { 3076, 0x0000000000000000ULL, 0xB37179BE95C6DA2CULL }, /* XSUM_XXH3_withSecret_testdata[3076] */\n    { 3077, 0x0000000000000000ULL, 0xB2F096B36193A13AULL }, /* XSUM_XXH3_withSecret_testdata[3077] */\n    { 3078, 0x0000000000000000ULL, 0xFE2E4C5796FEEF55ULL }, /* XSUM_XXH3_withSecret_testdata[3078] */\n    { 3079, 0x0000000000000000ULL, 0xFA51B9C142426A7CULL }, /* XSUM_XXH3_withSecret_testdata[3079] */\n    { 3080, 0x0000000000000000ULL, 0x8DC4F7C6C8E1141FULL }, /* XSUM_XXH3_withSecret_testdata[3080] */\n    { 3081, 0x0000000000000000ULL, 0x9FBE21513A0281D6ULL }, /* XSUM_XXH3_withSecret_testdata[3081] */\n    { 3082, 0x0000000000000000ULL, 0x46D73042AF729452ULL }, /* XSUM_XXH3_withSecret_testdata[3082] */\n    { 3083, 0x0000000000000000ULL, 0x8E50D0A1EB4555D7ULL }, /* XSUM_XXH3_withSecret_testdata[3083] */\n    { 3084, 0x0000000000000000ULL, 0x9C60BF2B5F53C3A8ULL }, /* XSUM_XXH3_withSecret_testdata[3084] */\n    { 3085, 0x0000000000000000ULL, 0xACFB0D25BE2473E4ULL }, /* XSUM_XXH3_withSecret_testdata[3085] */\n    { 3086, 0x0000000000000000ULL, 0x68F68D81C62DDDFAULL }, /* XSUM_XXH3_withSecret_testdata[3086] */\n    { 3087, 0x0000000000000000ULL, 0xA021287FC6E85E87ULL }, /* XSUM_XXH3_withSecret_testdata[3087] */\n    { 3088, 0x0000000000000000ULL, 0x9722CD9C66A0C16AULL }, /* XSUM_XXH3_withSecret_testdata[3088] */\n    { 3089, 0x0000000000000000ULL, 0x43F580D2A0F20E3CULL }, /* XSUM_XXH3_withSecret_testdata[3089] */\n    { 3090, 0x0000000000000000ULL, 0x5E45E938F19764A3ULL }, /* XSUM_XXH3_withSecret_testdata[3090] */\n    { 3091, 0x0000000000000000ULL, 0xFDDEABFF7F3808E6ULL }, /* XSUM_XXH3_withSecret_testdata[3091] */\n    { 3092, 0x0000000000000000ULL, 0xA2D965DB999F4B59ULL }, /* XSUM_XXH3_withSecret_testdata[3092] */\n    { 3093, 0x0000000000000000ULL, 0x7E75B21D76D4D7D3ULL }, /* XSUM_XXH3_withSecret_testdata[3093] */\n    { 3094, 0x0000000000000000ULL, 0xE28496279A4E4CCFULL }, /* XSUM_XXH3_withSecret_testdata[3094] */\n    { 3095, 0x0000000000000000ULL, 0xFA9EAC5C07C0D47BULL }, /* XSUM_XXH3_withSecret_testdata[3095] */\n    { 3096, 0x0000000000000000ULL, 0xF5DCB369B6A947E1ULL }, /* XSUM_XXH3_withSecret_testdata[3096] */\n    { 3097, 0x0000000000000000ULL, 0x55213D013BB9F51AULL }, /* XSUM_XXH3_withSecret_testdata[3097] */\n    { 3098, 0x0000000000000000ULL, 0xB09E9866DDD82727ULL }, /* XSUM_XXH3_withSecret_testdata[3098] */\n    { 3099, 0x0000000000000000ULL, 0xA4068525FE5AD786ULL }, /* XSUM_XXH3_withSecret_testdata[3099] */\n    { 3100, 0x0000000000000000ULL, 0x5769EBD2B8848612ULL }, /* XSUM_XXH3_withSecret_testdata[3100] */\n    { 3101, 0x0000000000000000ULL, 0x593AA572515D7990ULL }, /* XSUM_XXH3_withSecret_testdata[3101] */\n    { 3102, 0x0000000000000000ULL, 0x8895097FFF3EAFBBULL }, /* XSUM_XXH3_withSecret_testdata[3102] */\n    { 3103, 0x0000000000000000ULL, 0x4545E80628795066ULL }, /* XSUM_XXH3_withSecret_testdata[3103] */\n    { 3104, 0x0000000000000000ULL, 0xE2D95816794AF1C5ULL }, /* XSUM_XXH3_withSecret_testdata[3104] */\n    { 3105, 0x0000000000000000ULL, 0x0A8B6B98242FD79DULL }, /* XSUM_XXH3_withSecret_testdata[3105] */\n    { 3106, 0x0000000000000000ULL, 0xE8F63F15B49ADBDEULL }, /* XSUM_XXH3_withSecret_testdata[3106] */\n    { 3107, 0x0000000000000000ULL, 0xD305410E5F630498ULL }, /* XSUM_XXH3_withSecret_testdata[3107] */\n    { 3108, 0x0000000000000000ULL, 0x8D7C9A3E9593CE00ULL }, /* XSUM_XXH3_withSecret_testdata[3108] */\n    { 3109, 0x0000000000000000ULL, 0x2BC9BB427B8B5CF2ULL }, /* XSUM_XXH3_withSecret_testdata[3109] */\n    { 3110, 0x0000000000000000ULL, 0x3DC4AA81C295CDCCULL }, /* XSUM_XXH3_withSecret_testdata[3110] */\n    { 3111, 0x0000000000000000ULL, 0x6B87FC5DDBDEE26AULL }, /* XSUM_XXH3_withSecret_testdata[3111] */\n    { 3112, 0x0000000000000000ULL, 0xCA452A60E351B246ULL }, /* XSUM_XXH3_withSecret_testdata[3112] */\n    { 3113, 0x0000000000000000ULL, 0x9828C09D21790437ULL }, /* XSUM_XXH3_withSecret_testdata[3113] */\n    { 3114, 0x0000000000000000ULL, 0xBC7702DBF295E1F2ULL }, /* XSUM_XXH3_withSecret_testdata[3114] */\n    { 3115, 0x0000000000000000ULL, 0x24816B508733E6BFULL }, /* XSUM_XXH3_withSecret_testdata[3115] */\n    { 3116, 0x0000000000000000ULL, 0xEED74289728E004FULL }, /* XSUM_XXH3_withSecret_testdata[3116] */\n    { 3117, 0x0000000000000000ULL, 0xBD07A4B465E0B215ULL }, /* XSUM_XXH3_withSecret_testdata[3117] */\n    { 3118, 0x0000000000000000ULL, 0x85303ACEDDA3E876ULL }, /* XSUM_XXH3_withSecret_testdata[3118] */\n    { 3119, 0x0000000000000000ULL, 0x950EE5D649E02718ULL }, /* XSUM_XXH3_withSecret_testdata[3119] */\n    { 3120, 0x0000000000000000ULL, 0x44E13EB803569F36ULL }, /* XSUM_XXH3_withSecret_testdata[3120] */\n    { 3121, 0x0000000000000000ULL, 0x9052958C5F1AB505ULL }, /* XSUM_XXH3_withSecret_testdata[3121] */\n    { 3122, 0x0000000000000000ULL, 0xADFCDB64C1F35FF1ULL }, /* XSUM_XXH3_withSecret_testdata[3122] */\n    { 3123, 0x0000000000000000ULL, 0xC3A8337A16A60E97ULL }, /* XSUM_XXH3_withSecret_testdata[3123] */\n    { 3124, 0x0000000000000000ULL, 0xCB8A6BDF5CAB2CB6ULL }, /* XSUM_XXH3_withSecret_testdata[3124] */\n    { 3125, 0x0000000000000000ULL, 0x14701532B3149D63ULL }, /* XSUM_XXH3_withSecret_testdata[3125] */\n    { 3126, 0x0000000000000000ULL, 0xAD4936262BFB674DULL }, /* XSUM_XXH3_withSecret_testdata[3126] */\n    { 3127, 0x0000000000000000ULL, 0xCB4435C89BEE4D6DULL }, /* XSUM_XXH3_withSecret_testdata[3127] */\n    { 3128, 0x0000000000000000ULL, 0x319772CA8C513FC3ULL }, /* XSUM_XXH3_withSecret_testdata[3128] */\n    { 3129, 0x0000000000000000ULL, 0xB14F6E0D24FB425AULL }, /* XSUM_XXH3_withSecret_testdata[3129] */\n    { 3130, 0x0000000000000000ULL, 0xD8C42EABA81D5D74ULL }, /* XSUM_XXH3_withSecret_testdata[3130] */\n    { 3131, 0x0000000000000000ULL, 0xCC1BDC02061EFFC1ULL }, /* XSUM_XXH3_withSecret_testdata[3131] */\n    { 3132, 0x0000000000000000ULL, 0x53164136A7DAD369ULL }, /* XSUM_XXH3_withSecret_testdata[3132] */\n    { 3133, 0x0000000000000000ULL, 0x1CF7D5D6CFA19B84ULL }, /* XSUM_XXH3_withSecret_testdata[3133] */\n    { 3134, 0x0000000000000000ULL, 0x6F54091F0DC97503ULL }, /* XSUM_XXH3_withSecret_testdata[3134] */\n    { 3135, 0x0000000000000000ULL, 0x4FDF2B64A40B7D71ULL }, /* XSUM_XXH3_withSecret_testdata[3135] */\n    { 3136, 0x0000000000000000ULL, 0xD95623C151DE1B95ULL }, /* XSUM_XXH3_withSecret_testdata[3136] */\n    { 3137, 0x0000000000000000ULL, 0x7C68A24FC4BBFF0AULL }, /* XSUM_XXH3_withSecret_testdata[3137] */\n    { 3138, 0x0000000000000000ULL, 0x8D4A355AF955A352ULL }, /* XSUM_XXH3_withSecret_testdata[3138] */\n    { 3139, 0x0000000000000000ULL, 0x9506F8F6A8582A58ULL }, /* XSUM_XXH3_withSecret_testdata[3139] */\n    { 3140, 0x0000000000000000ULL, 0x6A2B11D6DE59D82CULL }, /* XSUM_XXH3_withSecret_testdata[3140] */\n    { 3141, 0x0000000000000000ULL, 0xB2C155DB1DDD708CULL }, /* XSUM_XXH3_withSecret_testdata[3141] */\n    { 3142, 0x0000000000000000ULL, 0x0BE121D269940379ULL }, /* XSUM_XXH3_withSecret_testdata[3142] */\n    { 3143, 0x0000000000000000ULL, 0x1864D6B09A67166AULL }, /* XSUM_XXH3_withSecret_testdata[3143] */\n    { 3144, 0x0000000000000000ULL, 0x99F7030C2A25BB9BULL }, /* XSUM_XXH3_withSecret_testdata[3144] */\n    { 3145, 0x0000000000000000ULL, 0x77ED4A9F6BEB8243ULL }, /* XSUM_XXH3_withSecret_testdata[3145] */\n    { 3146, 0x0000000000000000ULL, 0xBB093C1935EDA716ULL }, /* XSUM_XXH3_withSecret_testdata[3146] */\n    { 3147, 0x0000000000000000ULL, 0x7491E7B95E770CD0ULL }, /* XSUM_XXH3_withSecret_testdata[3147] */\n    { 3148, 0x0000000000000000ULL, 0x652DBD7D11D10C92ULL }, /* XSUM_XXH3_withSecret_testdata[3148] */\n    { 3149, 0x0000000000000000ULL, 0x800857B56BAA6999ULL }, /* XSUM_XXH3_withSecret_testdata[3149] */\n    { 3150, 0x0000000000000000ULL, 0xC7E4380E43DE0CE7ULL }, /* XSUM_XXH3_withSecret_testdata[3150] */\n    { 3151, 0x0000000000000000ULL, 0xFD7B186DF737F475ULL }, /* XSUM_XXH3_withSecret_testdata[3151] */\n    { 3152, 0x0000000000000000ULL, 0xA1760DFF2512F00BULL }, /* XSUM_XXH3_withSecret_testdata[3152] */\n    { 3153, 0x0000000000000000ULL, 0x293C0DB7672CFFA0ULL }, /* XSUM_XXH3_withSecret_testdata[3153] */\n    { 3154, 0x0000000000000000ULL, 0x1E7350299B820EC1ULL }, /* XSUM_XXH3_withSecret_testdata[3154] */\n    { 3155, 0x0000000000000000ULL, 0x396EFA75E8FC579BULL }, /* XSUM_XXH3_withSecret_testdata[3155] */\n    { 3156, 0x0000000000000000ULL, 0x310227B2DFEC0B08ULL }, /* XSUM_XXH3_withSecret_testdata[3156] */\n    { 3157, 0x0000000000000000ULL, 0xA1A80226C7A2CE9FULL }, /* XSUM_XXH3_withSecret_testdata[3157] */\n    { 3158, 0x0000000000000000ULL, 0x33ACF7C54F5BA9A2ULL }, /* XSUM_XXH3_withSecret_testdata[3158] */\n    { 3159, 0x0000000000000000ULL, 0x148730CA3B26F9DFULL }, /* XSUM_XXH3_withSecret_testdata[3159] */\n    { 3160, 0x0000000000000000ULL, 0xAE67E4D47D742A18ULL }, /* XSUM_XXH3_withSecret_testdata[3160] */\n    { 3161, 0x0000000000000000ULL, 0x690643FC05471E6DULL }, /* XSUM_XXH3_withSecret_testdata[3161] */\n    { 3162, 0x0000000000000000ULL, 0xDF4B703D708BF09FULL }, /* XSUM_XXH3_withSecret_testdata[3162] */\n    { 3163, 0x0000000000000000ULL, 0xBC2A9A17890539EBULL }, /* XSUM_XXH3_withSecret_testdata[3163] */\n    { 3164, 0x0000000000000000ULL, 0x8C7F7ED0164BC7D3ULL }, /* XSUM_XXH3_withSecret_testdata[3164] */\n    { 3165, 0x0000000000000000ULL, 0x495255725E29D9B2ULL }, /* XSUM_XXH3_withSecret_testdata[3165] */\n    { 3166, 0x0000000000000000ULL, 0x3083F54957C6159CULL }, /* XSUM_XXH3_withSecret_testdata[3166] */\n    { 3167, 0x0000000000000000ULL, 0xD2B819E0D63C599CULL }, /* XSUM_XXH3_withSecret_testdata[3167] */\n    { 3168, 0x0000000000000000ULL, 0xFD92D442AA13E961ULL }, /* XSUM_XXH3_withSecret_testdata[3168] */\n    { 3169, 0x0000000000000000ULL, 0x286AEE2983DB23BDULL }, /* XSUM_XXH3_withSecret_testdata[3169] */\n    { 3170, 0x0000000000000000ULL, 0x33DDFAEB4EBC48F6ULL }, /* XSUM_XXH3_withSecret_testdata[3170] */\n    { 3171, 0x0000000000000000ULL, 0xC48860DC6C0BB4C4ULL }, /* XSUM_XXH3_withSecret_testdata[3171] */\n    { 3172, 0x0000000000000000ULL, 0x9B74162796A02469ULL }, /* XSUM_XXH3_withSecret_testdata[3172] */\n    { 3173, 0x0000000000000000ULL, 0x3A1F72EEAAE2FF5CULL }, /* XSUM_XXH3_withSecret_testdata[3173] */\n    { 3174, 0x0000000000000000ULL, 0xFC2277998C3144BEULL }, /* XSUM_XXH3_withSecret_testdata[3174] */\n    { 3175, 0x0000000000000000ULL, 0x2AE9DD5B8FD328E3ULL }, /* XSUM_XXH3_withSecret_testdata[3175] */\n    { 3176, 0x0000000000000000ULL, 0xFC5A0B7233DB06B7ULL }, /* XSUM_XXH3_withSecret_testdata[3176] */\n    { 3177, 0x0000000000000000ULL, 0x665A0A09FFFFE390ULL }, /* XSUM_XXH3_withSecret_testdata[3177] */\n    { 3178, 0x0000000000000000ULL, 0x3BC5D322F3AA0932ULL }, /* XSUM_XXH3_withSecret_testdata[3178] */\n    { 3179, 0x0000000000000000ULL, 0xF44D1AB38E620FEBULL }, /* XSUM_XXH3_withSecret_testdata[3179] */\n    { 3180, 0x0000000000000000ULL, 0x14BD81EAB16E510EULL }, /* XSUM_XXH3_withSecret_testdata[3180] */\n    { 3181, 0x0000000000000000ULL, 0x6F56C6F9E8BB459EULL }, /* XSUM_XXH3_withSecret_testdata[3181] */\n    { 3182, 0x0000000000000000ULL, 0x97BD98B2A293810CULL }, /* XSUM_XXH3_withSecret_testdata[3182] */\n    { 3183, 0x0000000000000000ULL, 0x6F26D4EADE05ABF6ULL }, /* XSUM_XXH3_withSecret_testdata[3183] */\n    { 3184, 0x0000000000000000ULL, 0x1248E27C46185A24ULL }, /* XSUM_XXH3_withSecret_testdata[3184] */\n    { 3185, 0x0000000000000000ULL, 0xB17D2E2C98F3AF5CULL }, /* XSUM_XXH3_withSecret_testdata[3185] */\n    { 3186, 0x0000000000000000ULL, 0xA71E3F08DD214859ULL }, /* XSUM_XXH3_withSecret_testdata[3186] */\n    { 3187, 0x0000000000000000ULL, 0xC61C31200BDC48FAULL }, /* XSUM_XXH3_withSecret_testdata[3187] */\n    { 3188, 0x0000000000000000ULL, 0xD0E13FC28B2F9913ULL }, /* XSUM_XXH3_withSecret_testdata[3188] */\n    { 3189, 0x0000000000000000ULL, 0x917EBBA225F50792ULL }, /* XSUM_XXH3_withSecret_testdata[3189] */\n    { 3190, 0x0000000000000000ULL, 0xBEEB801645B5DBD4ULL }, /* XSUM_XXH3_withSecret_testdata[3190] */\n    { 3191, 0x0000000000000000ULL, 0xD5FDBBFCC774BB33ULL }, /* XSUM_XXH3_withSecret_testdata[3191] */\n    { 3192, 0x0000000000000000ULL, 0xB39010374D35AF77ULL }, /* XSUM_XXH3_withSecret_testdata[3192] */\n    { 3193, 0x0000000000000000ULL, 0xC79015AFC8B3B628ULL }, /* XSUM_XXH3_withSecret_testdata[3193] */\n    { 3194, 0x0000000000000000ULL, 0x65B4346F6BD4953DULL }, /* XSUM_XXH3_withSecret_testdata[3194] */\n    { 3195, 0x0000000000000000ULL, 0x64BE0D2EE2E286D0ULL }, /* XSUM_XXH3_withSecret_testdata[3195] */\n    { 3196, 0x0000000000000000ULL, 0x5059571289760C2AULL }, /* XSUM_XXH3_withSecret_testdata[3196] */\n    { 3197, 0x0000000000000000ULL, 0xE97995973A7CC660ULL }, /* XSUM_XXH3_withSecret_testdata[3197] */\n    { 3198, 0x0000000000000000ULL, 0xF0B90BF70B7105E4ULL }, /* XSUM_XXH3_withSecret_testdata[3198] */\n    { 3199, 0x0000000000000000ULL, 0xFF6A9D5D707A6F1CULL }, /* XSUM_XXH3_withSecret_testdata[3199] */\n    { 3200, 0x0000000000000000ULL, 0xD7200BA5B8275086ULL }, /* XSUM_XXH3_withSecret_testdata[3200] */\n    { 3201, 0x0000000000000000ULL, 0x40C880A6D9B3D3FAULL }, /* XSUM_XXH3_withSecret_testdata[3201] */\n    { 3202, 0x0000000000000000ULL, 0xE1AC910E7A8736E7ULL }, /* XSUM_XXH3_withSecret_testdata[3202] */\n    { 3203, 0x0000000000000000ULL, 0x2FB99866A4A515CCULL }, /* XSUM_XXH3_withSecret_testdata[3203] */\n    { 3204, 0x0000000000000000ULL, 0x3E62E8EFB0A503B8ULL }, /* XSUM_XXH3_withSecret_testdata[3204] */\n    { 3205, 0x0000000000000000ULL, 0xBBDD949C0182C902ULL }, /* XSUM_XXH3_withSecret_testdata[3205] */\n    { 3206, 0x0000000000000000ULL, 0xAD7FB51FA61A277BULL }, /* XSUM_XXH3_withSecret_testdata[3206] */\n    { 3207, 0x0000000000000000ULL, 0x6E991973891858B7ULL }, /* XSUM_XXH3_withSecret_testdata[3207] */\n    { 3208, 0x0000000000000000ULL, 0x997053F6C459F928ULL }, /* XSUM_XXH3_withSecret_testdata[3208] */\n    { 3209, 0x0000000000000000ULL, 0xEE41F7488F928DABULL }, /* XSUM_XXH3_withSecret_testdata[3209] */\n    { 3210, 0x0000000000000000ULL, 0x3E7E7CA24E05CC73ULL }, /* XSUM_XXH3_withSecret_testdata[3210] */\n    { 3211, 0x0000000000000000ULL, 0xE23E5E2F1C63B479ULL }, /* XSUM_XXH3_withSecret_testdata[3211] */\n    { 3212, 0x0000000000000000ULL, 0x14EC7278C8ECAE37ULL }, /* XSUM_XXH3_withSecret_testdata[3212] */\n    { 3213, 0x0000000000000000ULL, 0x5AA9E0AEBEC9477AULL }, /* XSUM_XXH3_withSecret_testdata[3213] */\n    { 3214, 0x0000000000000000ULL, 0x55CD91E1BBA19DFEULL }, /* XSUM_XXH3_withSecret_testdata[3214] */\n    { 3215, 0x0000000000000000ULL, 0xFF0BEE5FE295C1ABULL }, /* XSUM_XXH3_withSecret_testdata[3215] */\n    { 3216, 0x0000000000000000ULL, 0xDA59587CD473B873ULL }, /* XSUM_XXH3_withSecret_testdata[3216] */\n    { 3217, 0x0000000000000000ULL, 0xC1249BE859936A26ULL }, /* XSUM_XXH3_withSecret_testdata[3217] */\n    { 3218, 0x0000000000000000ULL, 0xA273BECC861BABA9ULL }, /* XSUM_XXH3_withSecret_testdata[3218] */\n    { 3219, 0x0000000000000000ULL, 0x21ABF4545EF8335BULL }, /* XSUM_XXH3_withSecret_testdata[3219] */\n    { 3220, 0x0000000000000000ULL, 0x9F35CFC3E0091E3CULL }, /* XSUM_XXH3_withSecret_testdata[3220] */\n    { 3221, 0x0000000000000000ULL, 0xC4136979A80FE8F0ULL }, /* XSUM_XXH3_withSecret_testdata[3221] */\n    { 3222, 0x0000000000000000ULL, 0x9F85920843FA1F7FULL }, /* XSUM_XXH3_withSecret_testdata[3222] */\n    { 3223, 0x0000000000000000ULL, 0xECCCB09DCDFBAE5EULL }, /* XSUM_XXH3_withSecret_testdata[3223] */\n    { 3224, 0x0000000000000000ULL, 0xAADB3A586BC7FE2CULL }, /* XSUM_XXH3_withSecret_testdata[3224] */\n    { 3225, 0x0000000000000000ULL, 0x86870DF14A65EE9AULL }, /* XSUM_XXH3_withSecret_testdata[3225] */\n    { 3226, 0x0000000000000000ULL, 0x0E4F7208A416DA59ULL }, /* XSUM_XXH3_withSecret_testdata[3226] */\n    { 3227, 0x0000000000000000ULL, 0x05D234FCE6387034ULL }, /* XSUM_XXH3_withSecret_testdata[3227] */\n    { 3228, 0x0000000000000000ULL, 0xCCEBE82EBCFF38DDULL }, /* XSUM_XXH3_withSecret_testdata[3228] */\n    { 3229, 0x0000000000000000ULL, 0x1D7576EAF2ED8398ULL }, /* XSUM_XXH3_withSecret_testdata[3229] */\n    { 3230, 0x0000000000000000ULL, 0xF6A84BDF1974F42EULL }, /* XSUM_XXH3_withSecret_testdata[3230] */\n    { 3231, 0x0000000000000000ULL, 0x8FE2D205D4EF2916ULL }, /* XSUM_XXH3_withSecret_testdata[3231] */\n    { 3232, 0x0000000000000000ULL, 0xCEE1E2241957271BULL }, /* XSUM_XXH3_withSecret_testdata[3232] */\n    { 3233, 0x0000000000000000ULL, 0xD4D39543A5EAC379ULL }, /* XSUM_XXH3_withSecret_testdata[3233] */\n    { 3234, 0x0000000000000000ULL, 0x07483EE0BECEB02DULL }, /* XSUM_XXH3_withSecret_testdata[3234] */\n    { 3235, 0x0000000000000000ULL, 0x9F79C88265C00AE5ULL }, /* XSUM_XXH3_withSecret_testdata[3235] */\n    { 3236, 0x0000000000000000ULL, 0xF4B64A31BB0925F3ULL }, /* XSUM_XXH3_withSecret_testdata[3236] */\n    { 3237, 0x0000000000000000ULL, 0x17629432F2AC5569ULL }, /* XSUM_XXH3_withSecret_testdata[3237] */\n    { 3238, 0x0000000000000000ULL, 0x75960AABB155EED0ULL }, /* XSUM_XXH3_withSecret_testdata[3238] */\n    { 3239, 0x0000000000000000ULL, 0x805586E578DA6070ULL }, /* XSUM_XXH3_withSecret_testdata[3239] */\n    { 3240, 0x0000000000000000ULL, 0x2B7A4B339E92DBB7ULL }, /* XSUM_XXH3_withSecret_testdata[3240] */\n    { 3241, 0x0000000000000000ULL, 0xDAC8041DADC13ABCULL }, /* XSUM_XXH3_withSecret_testdata[3241] */\n    { 3242, 0x0000000000000000ULL, 0x78278E639874DC18ULL }, /* XSUM_XXH3_withSecret_testdata[3242] */\n    { 3243, 0x0000000000000000ULL, 0xA80739581807C6A0ULL }, /* XSUM_XXH3_withSecret_testdata[3243] */\n    { 3244, 0x0000000000000000ULL, 0x06724F4774CC1152ULL }, /* XSUM_XXH3_withSecret_testdata[3244] */\n    { 3245, 0x0000000000000000ULL, 0xD29FFA0A3D696069ULL }, /* XSUM_XXH3_withSecret_testdata[3245] */\n    { 3246, 0x0000000000000000ULL, 0x7800F152663EC731ULL }, /* XSUM_XXH3_withSecret_testdata[3246] */\n    { 3247, 0x0000000000000000ULL, 0x7147FFB2AE7057E3ULL }, /* XSUM_XXH3_withSecret_testdata[3247] */\n    { 3248, 0x0000000000000000ULL, 0xF93CDDB9E4BDEEF3ULL }, /* XSUM_XXH3_withSecret_testdata[3248] */\n    { 3249, 0x0000000000000000ULL, 0xB26C47203FC0BA4AULL }, /* XSUM_XXH3_withSecret_testdata[3249] */\n    { 3250, 0x0000000000000000ULL, 0x30928BB6516AD8E9ULL }, /* XSUM_XXH3_withSecret_testdata[3250] */\n    { 3251, 0x0000000000000000ULL, 0xCD68EEB7FFEFEE77ULL }, /* XSUM_XXH3_withSecret_testdata[3251] */\n    { 3252, 0x0000000000000000ULL, 0x182D8D18B7DA7BAFULL }, /* XSUM_XXH3_withSecret_testdata[3252] */\n    { 3253, 0x0000000000000000ULL, 0xEC90638331FFE0EAULL }, /* XSUM_XXH3_withSecret_testdata[3253] */\n    { 3254, 0x0000000000000000ULL, 0x92136719A30FE7C3ULL }, /* XSUM_XXH3_withSecret_testdata[3254] */\n    { 3255, 0x0000000000000000ULL, 0x4188F703E8995151ULL }, /* XSUM_XXH3_withSecret_testdata[3255] */\n    { 3256, 0x0000000000000000ULL, 0x5FBCAB7C0F5A1A9AULL }, /* XSUM_XXH3_withSecret_testdata[3256] */\n    { 3257, 0x0000000000000000ULL, 0x3577B9297D0D93E0ULL }, /* XSUM_XXH3_withSecret_testdata[3257] */\n    { 3258, 0x0000000000000000ULL, 0xEEDDC51C0284D48CULL }, /* XSUM_XXH3_withSecret_testdata[3258] */\n    { 3259, 0x0000000000000000ULL, 0xAAE49BBB5A6C03B0ULL }, /* XSUM_XXH3_withSecret_testdata[3259] */\n    { 3260, 0x0000000000000000ULL, 0xE9847176A70B8B77ULL }, /* XSUM_XXH3_withSecret_testdata[3260] */\n    { 3261, 0x0000000000000000ULL, 0x451B1206F26996CFULL }, /* XSUM_XXH3_withSecret_testdata[3261] */\n    { 3262, 0x0000000000000000ULL, 0x96D2704A4EDF5ED9ULL }, /* XSUM_XXH3_withSecret_testdata[3262] */\n    { 3263, 0x0000000000000000ULL, 0xB78D78D2CEDA1298ULL }, /* XSUM_XXH3_withSecret_testdata[3263] */\n    { 3264, 0x0000000000000000ULL, 0x30E758251E3ABB42ULL }, /* XSUM_XXH3_withSecret_testdata[3264] */\n    { 3265, 0x0000000000000000ULL, 0xDC2EEF69D4E8EAE3ULL }, /* XSUM_XXH3_withSecret_testdata[3265] */\n    { 3266, 0x0000000000000000ULL, 0xC1CCE6D532429655ULL }, /* XSUM_XXH3_withSecret_testdata[3266] */\n    { 3267, 0x0000000000000000ULL, 0xB5365644227C182FULL }, /* XSUM_XXH3_withSecret_testdata[3267] */\n    { 3268, 0x0000000000000000ULL, 0x495ADC025DE4FE81ULL }, /* XSUM_XXH3_withSecret_testdata[3268] */\n    { 3269, 0x0000000000000000ULL, 0x59B76DB9F2595C4DULL }, /* XSUM_XXH3_withSecret_testdata[3269] */\n    { 3270, 0x0000000000000000ULL, 0x64F4B76BB4C42F3FULL }, /* XSUM_XXH3_withSecret_testdata[3270] */\n    { 3271, 0x0000000000000000ULL, 0xBB6ADA7A691FAFDFULL }, /* XSUM_XXH3_withSecret_testdata[3271] */\n    { 3272, 0x0000000000000000ULL, 0x7AFB04DA397BDB6EULL }, /* XSUM_XXH3_withSecret_testdata[3272] */\n    { 3273, 0x0000000000000000ULL, 0x3388D1D5A1BD43F2ULL }, /* XSUM_XXH3_withSecret_testdata[3273] */\n    { 3274, 0x0000000000000000ULL, 0xD4B44FC5D63B2CFDULL }, /* XSUM_XXH3_withSecret_testdata[3274] */\n    { 3275, 0x0000000000000000ULL, 0x1009E1BB12141C55ULL }, /* XSUM_XXH3_withSecret_testdata[3275] */\n    { 3276, 0x0000000000000000ULL, 0x1148520E5409A130ULL }, /* XSUM_XXH3_withSecret_testdata[3276] */\n    { 3277, 0x0000000000000000ULL, 0x07DD7D8893705506ULL }, /* XSUM_XXH3_withSecret_testdata[3277] */\n    { 3278, 0x0000000000000000ULL, 0x5A7E5EE9780970CDULL }, /* XSUM_XXH3_withSecret_testdata[3278] */\n    { 3279, 0x0000000000000000ULL, 0x8FE6E18067B39220ULL }, /* XSUM_XXH3_withSecret_testdata[3279] */\n    { 3280, 0x0000000000000000ULL, 0xEEF84C2AE2A5730EULL }, /* XSUM_XXH3_withSecret_testdata[3280] */\n    { 3281, 0x0000000000000000ULL, 0x92440C8DDB9D92B3ULL }, /* XSUM_XXH3_withSecret_testdata[3281] */\n    { 3282, 0x0000000000000000ULL, 0xC43FF10C2585ACDEULL }, /* XSUM_XXH3_withSecret_testdata[3282] */\n    { 3283, 0x0000000000000000ULL, 0xBB93E04E5654CDB9ULL }, /* XSUM_XXH3_withSecret_testdata[3283] */\n    { 3284, 0x0000000000000000ULL, 0xA495E819DA447A59ULL }, /* XSUM_XXH3_withSecret_testdata[3284] */\n    { 3285, 0x0000000000000000ULL, 0x85140AB1AB2056F2ULL }, /* XSUM_XXH3_withSecret_testdata[3285] */\n    { 3286, 0x0000000000000000ULL, 0xA7D605BD2B36A010ULL }, /* XSUM_XXH3_withSecret_testdata[3286] */\n    { 3287, 0x0000000000000000ULL, 0x9DF31DA867F80254ULL }, /* XSUM_XXH3_withSecret_testdata[3287] */\n    { 3288, 0x0000000000000000ULL, 0xE4C101854AD46B56ULL }, /* XSUM_XXH3_withSecret_testdata[3288] */\n    { 3289, 0x0000000000000000ULL, 0xE5B20108F51BC39CULL }, /* XSUM_XXH3_withSecret_testdata[3289] */\n    { 3290, 0x0000000000000000ULL, 0xD49B7388BDE1C27AULL }, /* XSUM_XXH3_withSecret_testdata[3290] */\n    { 3291, 0x0000000000000000ULL, 0x3B5930EDB0275616ULL }, /* XSUM_XXH3_withSecret_testdata[3291] */\n    { 3292, 0x0000000000000000ULL, 0x00D797ACF214994EULL }, /* XSUM_XXH3_withSecret_testdata[3292] */\n    { 3293, 0x0000000000000000ULL, 0x91119537BC88F950ULL }, /* XSUM_XXH3_withSecret_testdata[3293] */\n    { 3294, 0x0000000000000000ULL, 0x48287C9BB49C2670ULL }, /* XSUM_XXH3_withSecret_testdata[3294] */\n    { 3295, 0x0000000000000000ULL, 0x862AD932ED34EDAAULL }, /* XSUM_XXH3_withSecret_testdata[3295] */\n    { 3296, 0x0000000000000000ULL, 0xE3F9D6D114BBF9B7ULL }, /* XSUM_XXH3_withSecret_testdata[3296] */\n    { 3297, 0x0000000000000000ULL, 0x85B5773D9231AAC3ULL }, /* XSUM_XXH3_withSecret_testdata[3297] */\n    { 3298, 0x0000000000000000ULL, 0x254B00553E101FFEULL }, /* XSUM_XXH3_withSecret_testdata[3298] */\n    { 3299, 0x0000000000000000ULL, 0x4195D2FD420E6CCEULL }, /* XSUM_XXH3_withSecret_testdata[3299] */\n    { 3300, 0x0000000000000000ULL, 0xCCD350CD5CFB6ECBULL }, /* XSUM_XXH3_withSecret_testdata[3300] */\n    { 3301, 0x0000000000000000ULL, 0xC5ABBB0329F83D2DULL }, /* XSUM_XXH3_withSecret_testdata[3301] */\n    { 3302, 0x0000000000000000ULL, 0xF1F22B9E046FC2B0ULL }, /* XSUM_XXH3_withSecret_testdata[3302] */\n    { 3303, 0x0000000000000000ULL, 0x5A21565F187E49B2ULL }, /* XSUM_XXH3_withSecret_testdata[3303] */\n    { 3304, 0x0000000000000000ULL, 0xF8864AE64FD2E35EULL }, /* XSUM_XXH3_withSecret_testdata[3304] */\n    { 3305, 0x0000000000000000ULL, 0x0E0DF6F5AC512303ULL }, /* XSUM_XXH3_withSecret_testdata[3305] */\n    { 3306, 0x0000000000000000ULL, 0x241137A1E90532C2ULL }, /* XSUM_XXH3_withSecret_testdata[3306] */\n    { 3307, 0x0000000000000000ULL, 0x69131DBC1BCE80D5ULL }, /* XSUM_XXH3_withSecret_testdata[3307] */\n    { 3308, 0x0000000000000000ULL, 0x971AE3846A3E0DD8ULL }, /* XSUM_XXH3_withSecret_testdata[3308] */\n    { 3309, 0x0000000000000000ULL, 0xCC26928F2A3914EBULL }, /* XSUM_XXH3_withSecret_testdata[3309] */\n    { 3310, 0x0000000000000000ULL, 0x765885B0A2C43AD7ULL }, /* XSUM_XXH3_withSecret_testdata[3310] */\n    { 3311, 0x0000000000000000ULL, 0xA0AAF79C407D828FULL }, /* XSUM_XXH3_withSecret_testdata[3311] */\n    { 3312, 0x0000000000000000ULL, 0x58AED2BDC5A0501AULL }, /* XSUM_XXH3_withSecret_testdata[3312] */\n    { 3313, 0x0000000000000000ULL, 0x75B6E58CF5AEA735ULL }, /* XSUM_XXH3_withSecret_testdata[3313] */\n    { 3314, 0x0000000000000000ULL, 0xF5443445D5F02406ULL }, /* XSUM_XXH3_withSecret_testdata[3314] */\n    { 3315, 0x0000000000000000ULL, 0xC8AE4A0700F4BB6DULL }, /* XSUM_XXH3_withSecret_testdata[3315] */\n    { 3316, 0x0000000000000000ULL, 0xD1A2F329AA5E7186ULL }, /* XSUM_XXH3_withSecret_testdata[3316] */\n    { 3317, 0x0000000000000000ULL, 0x8474A93D2E092B76ULL }, /* XSUM_XXH3_withSecret_testdata[3317] */\n    { 3318, 0x0000000000000000ULL, 0xEFD2D9C0171BC450ULL }, /* XSUM_XXH3_withSecret_testdata[3318] */\n    { 3319, 0x0000000000000000ULL, 0xA8EAAD936EFC9644ULL }, /* XSUM_XXH3_withSecret_testdata[3319] */\n    { 3320, 0x0000000000000000ULL, 0x3154F45940979876ULL }, /* XSUM_XXH3_withSecret_testdata[3320] */\n    { 3321, 0x0000000000000000ULL, 0x6867827F42D85DA1ULL }, /* XSUM_XXH3_withSecret_testdata[3321] */\n    { 3322, 0x0000000000000000ULL, 0x27D35C66A2078647ULL }, /* XSUM_XXH3_withSecret_testdata[3322] */\n    { 3323, 0x0000000000000000ULL, 0x1FB48A7BB6C7E866ULL }, /* XSUM_XXH3_withSecret_testdata[3323] */\n    { 3324, 0x0000000000000000ULL, 0xACCF0955174A0FB6ULL }, /* XSUM_XXH3_withSecret_testdata[3324] */\n    { 3325, 0x0000000000000000ULL, 0xDBBBC8EA97F0AB5CULL }, /* XSUM_XXH3_withSecret_testdata[3325] */\n    { 3326, 0x0000000000000000ULL, 0x2E0B6A9C942F0179ULL }, /* XSUM_XXH3_withSecret_testdata[3326] */\n    { 3327, 0x0000000000000000ULL, 0xD9024DB1AB2DB04AULL }, /* XSUM_XXH3_withSecret_testdata[3327] */\n    { 3328, 0x0000000000000000ULL, 0x22BE7EC41F5881ACULL }, /* XSUM_XXH3_withSecret_testdata[3328] */\n    { 3329, 0x0000000000000000ULL, 0x5FDA9CB1BECAE68BULL }, /* XSUM_XXH3_withSecret_testdata[3329] */\n    { 3330, 0x0000000000000000ULL, 0xCBC6EA773CF5F46AULL }, /* XSUM_XXH3_withSecret_testdata[3330] */\n    { 3331, 0x0000000000000000ULL, 0x3289D61E07B72947ULL }, /* XSUM_XXH3_withSecret_testdata[3331] */\n    { 3332, 0x0000000000000000ULL, 0x1DA621CFECD5322AULL }, /* XSUM_XXH3_withSecret_testdata[3332] */\n    { 3333, 0x0000000000000000ULL, 0x581102C840775F6EULL }, /* XSUM_XXH3_withSecret_testdata[3333] */\n    { 3334, 0x0000000000000000ULL, 0xB7514DC2DCD88519ULL }, /* XSUM_XXH3_withSecret_testdata[3334] */\n    { 3335, 0x0000000000000000ULL, 0xD5148C3FFC895731ULL }, /* XSUM_XXH3_withSecret_testdata[3335] */\n    { 3336, 0x0000000000000000ULL, 0xDEBCC70AAE8E3F39ULL }, /* XSUM_XXH3_withSecret_testdata[3336] */\n    { 3337, 0x0000000000000000ULL, 0xDAFFE55F387D7D0BULL }, /* XSUM_XXH3_withSecret_testdata[3337] */\n    { 3338, 0x0000000000000000ULL, 0x4B31BD84C077BFF3ULL }, /* XSUM_XXH3_withSecret_testdata[3338] */\n    { 3339, 0x0000000000000000ULL, 0x69C7CFD19DE68375ULL }, /* XSUM_XXH3_withSecret_testdata[3339] */\n    { 3340, 0x0000000000000000ULL, 0x8A75EDF821F67D68ULL }, /* XSUM_XXH3_withSecret_testdata[3340] */\n    { 3341, 0x0000000000000000ULL, 0x72656CBBF2D41FE6ULL }, /* XSUM_XXH3_withSecret_testdata[3341] */\n    { 3342, 0x0000000000000000ULL, 0x01D34BADE4436B21ULL }, /* XSUM_XXH3_withSecret_testdata[3342] */\n    { 3343, 0x0000000000000000ULL, 0xE9DFCFC7698F5745ULL }, /* XSUM_XXH3_withSecret_testdata[3343] */\n    { 3344, 0x0000000000000000ULL, 0x86F52912C82257BBULL }, /* XSUM_XXH3_withSecret_testdata[3344] */\n    { 3345, 0x0000000000000000ULL, 0xDCD247235E0F57F4ULL }, /* XSUM_XXH3_withSecret_testdata[3345] */\n    { 3346, 0x0000000000000000ULL, 0x32962431CB54C379ULL }, /* XSUM_XXH3_withSecret_testdata[3346] */\n    { 3347, 0x0000000000000000ULL, 0xC6101795110831C5ULL }, /* XSUM_XXH3_withSecret_testdata[3347] */\n    { 3348, 0x0000000000000000ULL, 0xFCC02E23C7FE6354ULL }, /* XSUM_XXH3_withSecret_testdata[3348] */\n    { 3349, 0x0000000000000000ULL, 0x717E9FB2891FFCF2ULL }, /* XSUM_XXH3_withSecret_testdata[3349] */\n    { 3350, 0x0000000000000000ULL, 0x1A11A562F5D6FF4AULL }, /* XSUM_XXH3_withSecret_testdata[3350] */\n    { 3351, 0x0000000000000000ULL, 0x20E380F25BF86BCCULL }, /* XSUM_XXH3_withSecret_testdata[3351] */\n    { 3352, 0x0000000000000000ULL, 0xE1236EE4B1313B4EULL }, /* XSUM_XXH3_withSecret_testdata[3352] */\n    { 3353, 0x0000000000000000ULL, 0xCFC1CB67F77C950FULL }, /* XSUM_XXH3_withSecret_testdata[3353] */\n    { 3354, 0x0000000000000000ULL, 0xC44B23226042A290ULL }, /* XSUM_XXH3_withSecret_testdata[3354] */\n    { 3355, 0x0000000000000000ULL, 0x8EB724FDC15B92B9ULL }, /* XSUM_XXH3_withSecret_testdata[3355] */\n    { 3356, 0x0000000000000000ULL, 0xC3FB53E431E565D4ULL }, /* XSUM_XXH3_withSecret_testdata[3356] */\n    { 3357, 0x0000000000000000ULL, 0x2AAA176CF7123037ULL }, /* XSUM_XXH3_withSecret_testdata[3357] */\n    { 3358, 0x0000000000000000ULL, 0x9777A22355C740F0ULL }, /* XSUM_XXH3_withSecret_testdata[3358] */\n    { 3359, 0x0000000000000000ULL, 0xF1D1D1E98F215748ULL }, /* XSUM_XXH3_withSecret_testdata[3359] */\n    { 3360, 0x0000000000000000ULL, 0x37F269BD32EB4DF6ULL }, /* XSUM_XXH3_withSecret_testdata[3360] */\n    { 3361, 0x0000000000000000ULL, 0xC2948418FA69D5B0ULL }, /* XSUM_XXH3_withSecret_testdata[3361] */\n    { 3362, 0x0000000000000000ULL, 0xCDB58B11E43CE594ULL }, /* XSUM_XXH3_withSecret_testdata[3362] */\n    { 3363, 0x0000000000000000ULL, 0x7386CD87F857E8FFULL }, /* XSUM_XXH3_withSecret_testdata[3363] */\n    { 3364, 0x0000000000000000ULL, 0xCB908BBE4BF4115AULL }, /* XSUM_XXH3_withSecret_testdata[3364] */\n    { 3365, 0x0000000000000000ULL, 0xBC04E85A82136D9DULL }, /* XSUM_XXH3_withSecret_testdata[3365] */\n    { 3366, 0x0000000000000000ULL, 0xA074DFB34D9C8159ULL }, /* XSUM_XXH3_withSecret_testdata[3366] */\n    { 3367, 0x0000000000000000ULL, 0xE104838A3794A121ULL }, /* XSUM_XXH3_withSecret_testdata[3367] */\n    { 3368, 0x0000000000000000ULL, 0x8D9535A0589E87DEULL }, /* XSUM_XXH3_withSecret_testdata[3368] */\n    { 3369, 0x0000000000000000ULL, 0x8C7E2E952E9582E1ULL }, /* XSUM_XXH3_withSecret_testdata[3369] */\n    { 3370, 0x0000000000000000ULL, 0x36429AC325D34750ULL }, /* XSUM_XXH3_withSecret_testdata[3370] */\n    { 3371, 0x0000000000000000ULL, 0x337C994A4E29F517ULL }, /* XSUM_XXH3_withSecret_testdata[3371] */\n    { 3372, 0x0000000000000000ULL, 0x27A7DAF417F30136ULL }, /* XSUM_XXH3_withSecret_testdata[3372] */\n    { 3373, 0x0000000000000000ULL, 0x2BAFE1E23A552CC2ULL }, /* XSUM_XXH3_withSecret_testdata[3373] */\n    { 3374, 0x0000000000000000ULL, 0x24111ED11860681BULL }, /* XSUM_XXH3_withSecret_testdata[3374] */\n    { 3375, 0x0000000000000000ULL, 0xFF3E50967E0B68C5ULL }, /* XSUM_XXH3_withSecret_testdata[3375] */\n    { 3376, 0x0000000000000000ULL, 0x5F77AD45130555B9ULL }, /* XSUM_XXH3_withSecret_testdata[3376] */\n    { 3377, 0x0000000000000000ULL, 0x91EBB464DF8A0BB2ULL }, /* XSUM_XXH3_withSecret_testdata[3377] */\n    { 3378, 0x0000000000000000ULL, 0xE3F92F8355BC4A2BULL }, /* XSUM_XXH3_withSecret_testdata[3378] */\n    { 3379, 0x0000000000000000ULL, 0xB26A54C0DB52120FULL }, /* XSUM_XXH3_withSecret_testdata[3379] */\n    { 3380, 0x0000000000000000ULL, 0x236F061D731241E9ULL }, /* XSUM_XXH3_withSecret_testdata[3380] */\n    { 3381, 0x0000000000000000ULL, 0x80951F0AAF6F69F3ULL }, /* XSUM_XXH3_withSecret_testdata[3381] */\n    { 3382, 0x0000000000000000ULL, 0x8D4E6C9A4B81E8CEULL }, /* XSUM_XXH3_withSecret_testdata[3382] */\n    { 3383, 0x0000000000000000ULL, 0xDCF18FC251E124B4ULL }, /* XSUM_XXH3_withSecret_testdata[3383] */\n    { 3384, 0x0000000000000000ULL, 0x0BAFB9DF872E349AULL }, /* XSUM_XXH3_withSecret_testdata[3384] */\n    { 3385, 0x0000000000000000ULL, 0x991EBBFC2C40A6DDULL }, /* XSUM_XXH3_withSecret_testdata[3385] */\n    { 3386, 0x0000000000000000ULL, 0x3DEF4AAE67B96ECDULL }, /* XSUM_XXH3_withSecret_testdata[3386] */\n    { 3387, 0x0000000000000000ULL, 0x6845EC17968F7B7AULL }, /* XSUM_XXH3_withSecret_testdata[3387] */\n    { 3388, 0x0000000000000000ULL, 0x05849C1F2D68ECC0ULL }, /* XSUM_XXH3_withSecret_testdata[3388] */\n    { 3389, 0x0000000000000000ULL, 0x3DB3176DC226A032ULL }, /* XSUM_XXH3_withSecret_testdata[3389] */\n    { 3390, 0x0000000000000000ULL, 0xC81C6F3080B6E009ULL }, /* XSUM_XXH3_withSecret_testdata[3390] */\n    { 3391, 0x0000000000000000ULL, 0x42E42EB70B7207D1ULL }, /* XSUM_XXH3_withSecret_testdata[3391] */\n    { 3392, 0x0000000000000000ULL, 0x82FA4358B988550DULL }, /* XSUM_XXH3_withSecret_testdata[3392] */\n    { 3393, 0x0000000000000000ULL, 0x093C69D9241951C5ULL }, /* XSUM_XXH3_withSecret_testdata[3393] */\n    { 3394, 0x0000000000000000ULL, 0xB9782191AD905FA7ULL }, /* XSUM_XXH3_withSecret_testdata[3394] */\n    { 3395, 0x0000000000000000ULL, 0x5ACD4F5C19F7D7A8ULL }, /* XSUM_XXH3_withSecret_testdata[3395] */\n    { 3396, 0x0000000000000000ULL, 0xD78563937BE06A6CULL }, /* XSUM_XXH3_withSecret_testdata[3396] */\n    { 3397, 0x0000000000000000ULL, 0x7B583784D1ABF630ULL }, /* XSUM_XXH3_withSecret_testdata[3397] */\n    { 3398, 0x0000000000000000ULL, 0x34A3E1EDB4806DE4ULL }, /* XSUM_XXH3_withSecret_testdata[3398] */\n    { 3399, 0x0000000000000000ULL, 0x258BAD758E0FAC7CULL }, /* XSUM_XXH3_withSecret_testdata[3399] */\n    { 3400, 0x0000000000000000ULL, 0x79BA922E496E37A4ULL }, /* XSUM_XXH3_withSecret_testdata[3400] */\n    { 3401, 0x0000000000000000ULL, 0xD2C6D271ED08F4FBULL }, /* XSUM_XXH3_withSecret_testdata[3401] */\n    { 3402, 0x0000000000000000ULL, 0x777E2F00B8C6C6B1ULL }, /* XSUM_XXH3_withSecret_testdata[3402] */\n    { 3403, 0x0000000000000000ULL, 0xA33A36F54892C4C2ULL }, /* XSUM_XXH3_withSecret_testdata[3403] */\n    { 3404, 0x0000000000000000ULL, 0x83D54CC50F2B4C82ULL }, /* XSUM_XXH3_withSecret_testdata[3404] */\n    { 3405, 0x0000000000000000ULL, 0xB86A5DEAFA888777ULL }, /* XSUM_XXH3_withSecret_testdata[3405] */\n    { 3406, 0x0000000000000000ULL, 0x93394DCB88F3233CULL }, /* XSUM_XXH3_withSecret_testdata[3406] */\n    { 3407, 0x0000000000000000ULL, 0xAB29CE5CD9E87492ULL }, /* XSUM_XXH3_withSecret_testdata[3407] */\n    { 3408, 0x0000000000000000ULL, 0xD24C131AA2728CDFULL }, /* XSUM_XXH3_withSecret_testdata[3408] */\n    { 3409, 0x0000000000000000ULL, 0xEC1AA50643F6BEB4ULL }, /* XSUM_XXH3_withSecret_testdata[3409] */\n    { 3410, 0x0000000000000000ULL, 0xDC8CC90497C3070AULL }, /* XSUM_XXH3_withSecret_testdata[3410] */\n    { 3411, 0x0000000000000000ULL, 0xCDF848036CC2D584ULL }, /* XSUM_XXH3_withSecret_testdata[3411] */\n    { 3412, 0x0000000000000000ULL, 0xF5FF7497697376B5ULL }, /* XSUM_XXH3_withSecret_testdata[3412] */\n    { 3413, 0x0000000000000000ULL, 0x61AEB2965FC007F9ULL }, /* XSUM_XXH3_withSecret_testdata[3413] */\n    { 3414, 0x0000000000000000ULL, 0xC8331389EE21A290ULL }, /* XSUM_XXH3_withSecret_testdata[3414] */\n    { 3415, 0x0000000000000000ULL, 0xD25ACAD6E45BEC7EULL }, /* XSUM_XXH3_withSecret_testdata[3415] */\n    { 3416, 0x0000000000000000ULL, 0x9C79AD9A2989B5B0ULL }, /* XSUM_XXH3_withSecret_testdata[3416] */\n    { 3417, 0x0000000000000000ULL, 0x7B7A9186400259C3ULL }, /* XSUM_XXH3_withSecret_testdata[3417] */\n    { 3418, 0x0000000000000000ULL, 0xC090B82039D98D66ULL }, /* XSUM_XXH3_withSecret_testdata[3418] */\n    { 3419, 0x0000000000000000ULL, 0x1616EFC6B06CE942ULL }, /* XSUM_XXH3_withSecret_testdata[3419] */\n    { 3420, 0x0000000000000000ULL, 0x536959E69DDBDA4DULL }, /* XSUM_XXH3_withSecret_testdata[3420] */\n    { 3421, 0x0000000000000000ULL, 0x308BC74EAD14A59EULL }, /* XSUM_XXH3_withSecret_testdata[3421] */\n    { 3422, 0x0000000000000000ULL, 0xE9E96C5C85C6E33DULL }, /* XSUM_XXH3_withSecret_testdata[3422] */\n    { 3423, 0x0000000000000000ULL, 0x97B51867A23476C7ULL }, /* XSUM_XXH3_withSecret_testdata[3423] */\n    { 3424, 0x0000000000000000ULL, 0xDBA270BBD09D0382ULL }, /* XSUM_XXH3_withSecret_testdata[3424] */\n    { 3425, 0x0000000000000000ULL, 0x2B3A9E8D9890E5EDULL }, /* XSUM_XXH3_withSecret_testdata[3425] */\n    { 3426, 0x0000000000000000ULL, 0xB8AEDCB04D901184ULL }, /* XSUM_XXH3_withSecret_testdata[3426] */\n    { 3427, 0x0000000000000000ULL, 0x72973E93DD568423ULL }, /* XSUM_XXH3_withSecret_testdata[3427] */\n    { 3428, 0x0000000000000000ULL, 0x8642362E361F385BULL }, /* XSUM_XXH3_withSecret_testdata[3428] */\n    { 3429, 0x0000000000000000ULL, 0xEA93D41FC4BE6EF3ULL }, /* XSUM_XXH3_withSecret_testdata[3429] */\n    { 3430, 0x0000000000000000ULL, 0x53A9D7804532B024ULL }, /* XSUM_XXH3_withSecret_testdata[3430] */\n    { 3431, 0x0000000000000000ULL, 0x0D6669392B360D1AULL }, /* XSUM_XXH3_withSecret_testdata[3431] */\n    { 3432, 0x0000000000000000ULL, 0xD61A6DDFF9192A4AULL }, /* XSUM_XXH3_withSecret_testdata[3432] */\n    { 3433, 0x0000000000000000ULL, 0x258EF23516BA0AD6ULL }, /* XSUM_XXH3_withSecret_testdata[3433] */\n    { 3434, 0x0000000000000000ULL, 0x1D8F02DB1F6D895AULL }, /* XSUM_XXH3_withSecret_testdata[3434] */\n    { 3435, 0x0000000000000000ULL, 0x1731E194D0768893ULL }, /* XSUM_XXH3_withSecret_testdata[3435] */\n    { 3436, 0x0000000000000000ULL, 0xD5535C6A2B10C987ULL }, /* XSUM_XXH3_withSecret_testdata[3436] */\n    { 3437, 0x0000000000000000ULL, 0x283020A907CF151AULL }, /* XSUM_XXH3_withSecret_testdata[3437] */\n    { 3438, 0x0000000000000000ULL, 0xF70ACA1841EE13BEULL }, /* XSUM_XXH3_withSecret_testdata[3438] */\n    { 3439, 0x0000000000000000ULL, 0x4293F1911E7B457FULL }, /* XSUM_XXH3_withSecret_testdata[3439] */\n    { 3440, 0x0000000000000000ULL, 0xFFF9BF31E101EBF5ULL }, /* XSUM_XXH3_withSecret_testdata[3440] */\n    { 3441, 0x0000000000000000ULL, 0xFA3ACD1C15F4A837ULL }, /* XSUM_XXH3_withSecret_testdata[3441] */\n    { 3442, 0x0000000000000000ULL, 0x94CFFAD4CA5A5B35ULL }, /* XSUM_XXH3_withSecret_testdata[3442] */\n    { 3443, 0x0000000000000000ULL, 0xEFAC9A8E9C224383ULL }, /* XSUM_XXH3_withSecret_testdata[3443] */\n    { 3444, 0x0000000000000000ULL, 0x55F6012D99ADCC77ULL }, /* XSUM_XXH3_withSecret_testdata[3444] */\n    { 3445, 0x0000000000000000ULL, 0xF9D085CD6FD41AC1ULL }, /* XSUM_XXH3_withSecret_testdata[3445] */\n    { 3446, 0x0000000000000000ULL, 0x75EAF0D20198628BULL }, /* XSUM_XXH3_withSecret_testdata[3446] */\n    { 3447, 0x0000000000000000ULL, 0xC989C6AD9C5AF1E3ULL }, /* XSUM_XXH3_withSecret_testdata[3447] */\n    { 3448, 0x0000000000000000ULL, 0x684DF3EBFD7F9B21ULL }, /* XSUM_XXH3_withSecret_testdata[3448] */\n    { 3449, 0x0000000000000000ULL, 0x3EC4EEDFC8418706ULL }, /* XSUM_XXH3_withSecret_testdata[3449] */\n    { 3450, 0x0000000000000000ULL, 0x3C7F7AA726BFFCD3ULL }, /* XSUM_XXH3_withSecret_testdata[3450] */\n    { 3451, 0x0000000000000000ULL, 0x9F4A22AD503F31CCULL }, /* XSUM_XXH3_withSecret_testdata[3451] */\n    { 3452, 0x0000000000000000ULL, 0x5544A4478AB92340ULL }, /* XSUM_XXH3_withSecret_testdata[3452] */\n    { 3453, 0x0000000000000000ULL, 0x7913996FC7843BD6ULL }, /* XSUM_XXH3_withSecret_testdata[3453] */\n    { 3454, 0x0000000000000000ULL, 0x668F78CFD1C07BD1ULL }, /* XSUM_XXH3_withSecret_testdata[3454] */\n    { 3455, 0x0000000000000000ULL, 0xDC83E3831178BA1BULL }, /* XSUM_XXH3_withSecret_testdata[3455] */\n    { 3456, 0x0000000000000000ULL, 0xBD3FC86BB5AC2B3CULL }, /* XSUM_XXH3_withSecret_testdata[3456] */\n    { 3457, 0x0000000000000000ULL, 0xB5D6A0E431E5326FULL }, /* XSUM_XXH3_withSecret_testdata[3457] */\n    { 3458, 0x0000000000000000ULL, 0x3F96397D0AEE13FAULL }, /* XSUM_XXH3_withSecret_testdata[3458] */\n    { 3459, 0x0000000000000000ULL, 0xA057BB7D8FFBE4EFULL }, /* XSUM_XXH3_withSecret_testdata[3459] */\n    { 3460, 0x0000000000000000ULL, 0x0B5B3120716A277DULL }, /* XSUM_XXH3_withSecret_testdata[3460] */\n    { 3461, 0x0000000000000000ULL, 0x3ADD2BAED9FBB522ULL }, /* XSUM_XXH3_withSecret_testdata[3461] */\n    { 3462, 0x0000000000000000ULL, 0x9F5D67039AA7B20AULL }, /* XSUM_XXH3_withSecret_testdata[3462] */\n    { 3463, 0x0000000000000000ULL, 0xED541A1A74A8E0D6ULL }, /* XSUM_XXH3_withSecret_testdata[3463] */\n    { 3464, 0x0000000000000000ULL, 0x21A1B9C81F31BD56ULL }, /* XSUM_XXH3_withSecret_testdata[3464] */\n    { 3465, 0x0000000000000000ULL, 0x2AB63DF73A5FD82BULL }, /* XSUM_XXH3_withSecret_testdata[3465] */\n    { 3466, 0x0000000000000000ULL, 0xA13D48E366FE694FULL }, /* XSUM_XXH3_withSecret_testdata[3466] */\n    { 3467, 0x0000000000000000ULL, 0xCBC1A8BC9E23A2C8ULL }, /* XSUM_XXH3_withSecret_testdata[3467] */\n    { 3468, 0x0000000000000000ULL, 0xBE271DEE6955B1F8ULL }, /* XSUM_XXH3_withSecret_testdata[3468] */\n    { 3469, 0x0000000000000000ULL, 0xA4AC7A4DD33CB54EULL }, /* XSUM_XXH3_withSecret_testdata[3469] */\n    { 3470, 0x0000000000000000ULL, 0x7A33C76C43E97C63ULL }, /* XSUM_XXH3_withSecret_testdata[3470] */\n    { 3471, 0x0000000000000000ULL, 0x36098BE82B1D6630ULL }, /* XSUM_XXH3_withSecret_testdata[3471] */\n    { 3472, 0x0000000000000000ULL, 0x7F361C40279A7156ULL }, /* XSUM_XXH3_withSecret_testdata[3472] */\n    { 3473, 0x0000000000000000ULL, 0x2CC810852E1BB733ULL }, /* XSUM_XXH3_withSecret_testdata[3473] */\n    { 3474, 0x0000000000000000ULL, 0xC0CA765A630B30ADULL }, /* XSUM_XXH3_withSecret_testdata[3474] */\n    { 3475, 0x0000000000000000ULL, 0x1B97DC802A05F93EULL }, /* XSUM_XXH3_withSecret_testdata[3475] */\n    { 3476, 0x0000000000000000ULL, 0x9BE7B4728943211FULL }, /* XSUM_XXH3_withSecret_testdata[3476] */\n    { 3477, 0x0000000000000000ULL, 0x46024E5F8747440EULL }, /* XSUM_XXH3_withSecret_testdata[3477] */\n    { 3478, 0x0000000000000000ULL, 0x3611EB1A2CA4FE01ULL }, /* XSUM_XXH3_withSecret_testdata[3478] */\n    { 3479, 0x0000000000000000ULL, 0x3D5E5E1369724D8FULL }, /* XSUM_XXH3_withSecret_testdata[3479] */\n    { 3480, 0x0000000000000000ULL, 0x3777657FE0E2103AULL }, /* XSUM_XXH3_withSecret_testdata[3480] */\n    { 3481, 0x0000000000000000ULL, 0x1182DAAB985250A5ULL }, /* XSUM_XXH3_withSecret_testdata[3481] */\n    { 3482, 0x0000000000000000ULL, 0x9D72547E8773AA1FULL }, /* XSUM_XXH3_withSecret_testdata[3482] */\n    { 3483, 0x0000000000000000ULL, 0x022316F49083EEA8ULL }, /* XSUM_XXH3_withSecret_testdata[3483] */\n    { 3484, 0x0000000000000000ULL, 0xF4DD6BCAC532838CULL }, /* XSUM_XXH3_withSecret_testdata[3484] */\n    { 3485, 0x0000000000000000ULL, 0x0C1A9A078ADB82E6ULL }, /* XSUM_XXH3_withSecret_testdata[3485] */\n    { 3486, 0x0000000000000000ULL, 0xD063A1BE391CB91EULL }, /* XSUM_XXH3_withSecret_testdata[3486] */\n    { 3487, 0x0000000000000000ULL, 0x680EA488740E19F5ULL }, /* XSUM_XXH3_withSecret_testdata[3487] */\n    { 3488, 0x0000000000000000ULL, 0xBE9D44B1C25FF51DULL }, /* XSUM_XXH3_withSecret_testdata[3488] */\n    { 3489, 0x0000000000000000ULL, 0xC522140D7EB13068ULL }, /* XSUM_XXH3_withSecret_testdata[3489] */\n    { 3490, 0x0000000000000000ULL, 0x87D5F5143378E63AULL }, /* XSUM_XXH3_withSecret_testdata[3490] */\n    { 3491, 0x0000000000000000ULL, 0x2B5526EA89A862E9ULL }, /* XSUM_XXH3_withSecret_testdata[3491] */\n    { 3492, 0x0000000000000000ULL, 0xB0E4F51AE9532152ULL }, /* XSUM_XXH3_withSecret_testdata[3492] */\n    { 3493, 0x0000000000000000ULL, 0xF517E37DF40186A6ULL }, /* XSUM_XXH3_withSecret_testdata[3493] */\n    { 3494, 0x0000000000000000ULL, 0x9471C5B58399F14EULL }, /* XSUM_XXH3_withSecret_testdata[3494] */\n    { 3495, 0x0000000000000000ULL, 0x367DC8C13EA45D49ULL }, /* XSUM_XXH3_withSecret_testdata[3495] */\n    { 3496, 0x0000000000000000ULL, 0xFA63C29BD3E79A0BULL }, /* XSUM_XXH3_withSecret_testdata[3496] */\n    { 3497, 0x0000000000000000ULL, 0xF0D40F8AF56875DCULL }, /* XSUM_XXH3_withSecret_testdata[3497] */\n    { 3498, 0x0000000000000000ULL, 0x218260B595F251EDULL }, /* XSUM_XXH3_withSecret_testdata[3498] */\n    { 3499, 0x0000000000000000ULL, 0x5CD2D64184919EE1ULL }, /* XSUM_XXH3_withSecret_testdata[3499] */\n    { 3500, 0x0000000000000000ULL, 0xA8D6FFA8E88CAAC1ULL }, /* XSUM_XXH3_withSecret_testdata[3500] */\n    { 3501, 0x0000000000000000ULL, 0x00559483FB681A14ULL }, /* XSUM_XXH3_withSecret_testdata[3501] */\n    { 3502, 0x0000000000000000ULL, 0x7BB6A0499D828F3AULL }, /* XSUM_XXH3_withSecret_testdata[3502] */\n    { 3503, 0x0000000000000000ULL, 0xF54E38E392CDC9FFULL }, /* XSUM_XXH3_withSecret_testdata[3503] */\n    { 3504, 0x0000000000000000ULL, 0x68C8BED722F70F29ULL }, /* XSUM_XXH3_withSecret_testdata[3504] */\n    { 3505, 0x0000000000000000ULL, 0x8FAA3D530B78038BULL }, /* XSUM_XXH3_withSecret_testdata[3505] */\n    { 3506, 0x0000000000000000ULL, 0x7217EA896318D81BULL }, /* XSUM_XXH3_withSecret_testdata[3506] */\n    { 3507, 0x0000000000000000ULL, 0xD3329B5DB272AD1CULL }, /* XSUM_XXH3_withSecret_testdata[3507] */\n    { 3508, 0x0000000000000000ULL, 0x3F178629EAAA53E2ULL }, /* XSUM_XXH3_withSecret_testdata[3508] */\n    { 3509, 0x0000000000000000ULL, 0x0E880000C319A233ULL }, /* XSUM_XXH3_withSecret_testdata[3509] */\n    { 3510, 0x0000000000000000ULL, 0x5131CD8B7A9DA841ULL }, /* XSUM_XXH3_withSecret_testdata[3510] */\n    { 3511, 0x0000000000000000ULL, 0x116E9A3F1B0EAD60ULL }, /* XSUM_XXH3_withSecret_testdata[3511] */\n    { 3512, 0x0000000000000000ULL, 0x4D877B440F8C9E21ULL }, /* XSUM_XXH3_withSecret_testdata[3512] */\n    { 3513, 0x0000000000000000ULL, 0xB5A3F7DC5DB9B323ULL }, /* XSUM_XXH3_withSecret_testdata[3513] */\n    { 3514, 0x0000000000000000ULL, 0x7E57BB5FEA85F44BULL }, /* XSUM_XXH3_withSecret_testdata[3514] */\n    { 3515, 0x0000000000000000ULL, 0x7F5959414C7047A7ULL }, /* XSUM_XXH3_withSecret_testdata[3515] */\n    { 3516, 0x0000000000000000ULL, 0xA3080EE0954618B4ULL }, /* XSUM_XXH3_withSecret_testdata[3516] */\n    { 3517, 0x0000000000000000ULL, 0xFC144E068075D4A0ULL }, /* XSUM_XXH3_withSecret_testdata[3517] */\n    { 3518, 0x0000000000000000ULL, 0xBC4CFDDC25674520ULL }, /* XSUM_XXH3_withSecret_testdata[3518] */\n    { 3519, 0x0000000000000000ULL, 0x86484327D89DAF41ULL }, /* XSUM_XXH3_withSecret_testdata[3519] */\n    { 3520, 0x0000000000000000ULL, 0x68A2F0773F075633ULL }, /* XSUM_XXH3_withSecret_testdata[3520] */\n    { 3521, 0x0000000000000000ULL, 0xB69CC64FAADBB820ULL }, /* XSUM_XXH3_withSecret_testdata[3521] */\n    { 3522, 0x0000000000000000ULL, 0x492B501DEAEF4FF0ULL }, /* XSUM_XXH3_withSecret_testdata[3522] */\n    { 3523, 0x0000000000000000ULL, 0xC88BD6340BE8014DULL }, /* XSUM_XXH3_withSecret_testdata[3523] */\n    { 3524, 0x0000000000000000ULL, 0x942BE9E21E2A4D63ULL }, /* XSUM_XXH3_withSecret_testdata[3524] */\n    { 3525, 0x0000000000000000ULL, 0xF473FAD358FE75F8ULL }, /* XSUM_XXH3_withSecret_testdata[3525] */\n    { 3526, 0x0000000000000000ULL, 0x7BC0BAC88A27AEF6ULL }, /* XSUM_XXH3_withSecret_testdata[3526] */\n    { 3527, 0x0000000000000000ULL, 0x7649FD5EF3277B3BULL }, /* XSUM_XXH3_withSecret_testdata[3527] */\n    { 3528, 0x0000000000000000ULL, 0x145AB1F42B600E7FULL }, /* XSUM_XXH3_withSecret_testdata[3528] */\n    { 3529, 0x0000000000000000ULL, 0x563CEE44F6371D4EULL }, /* XSUM_XXH3_withSecret_testdata[3529] */\n    { 3530, 0x0000000000000000ULL, 0x4ABD41196F8910F4ULL }, /* XSUM_XXH3_withSecret_testdata[3530] */\n    { 3531, 0x0000000000000000ULL, 0xA407B860E9317657ULL }, /* XSUM_XXH3_withSecret_testdata[3531] */\n    { 3532, 0x0000000000000000ULL, 0x26EAA7780E207FBFULL }, /* XSUM_XXH3_withSecret_testdata[3532] */\n    { 3533, 0x0000000000000000ULL, 0xD7FFE10A171EDB54ULL }, /* XSUM_XXH3_withSecret_testdata[3533] */\n    { 3534, 0x0000000000000000ULL, 0x3A92D578E1BDA03DULL }, /* XSUM_XXH3_withSecret_testdata[3534] */\n    { 3535, 0x0000000000000000ULL, 0x0199237099517BEBULL }, /* XSUM_XXH3_withSecret_testdata[3535] */\n    { 3536, 0x0000000000000000ULL, 0xFBEE7D5E392C26D4ULL }, /* XSUM_XXH3_withSecret_testdata[3536] */\n    { 3537, 0x0000000000000000ULL, 0xBDFD0088D497ED2FULL }, /* XSUM_XXH3_withSecret_testdata[3537] */\n    { 3538, 0x0000000000000000ULL, 0x913ADB607F7346BAULL }, /* XSUM_XXH3_withSecret_testdata[3538] */\n    { 3539, 0x0000000000000000ULL, 0xAB338CEBDA365578ULL }, /* XSUM_XXH3_withSecret_testdata[3539] */\n    { 3540, 0x0000000000000000ULL, 0xC69DB27CB9AF675EULL }, /* XSUM_XXH3_withSecret_testdata[3540] */\n    { 3541, 0x0000000000000000ULL, 0xE2FBEAF26A98C333ULL }, /* XSUM_XXH3_withSecret_testdata[3541] */\n    { 3542, 0x0000000000000000ULL, 0x5CB786875FD33694ULL }, /* XSUM_XXH3_withSecret_testdata[3542] */\n    { 3543, 0x0000000000000000ULL, 0x093F890C691390C5ULL }, /* XSUM_XXH3_withSecret_testdata[3543] */\n    { 3544, 0x0000000000000000ULL, 0x779F918D25F304D2ULL }, /* XSUM_XXH3_withSecret_testdata[3544] */\n    { 3545, 0x0000000000000000ULL, 0xD1CCD84274C2157FULL }, /* XSUM_XXH3_withSecret_testdata[3545] */\n    { 3546, 0x0000000000000000ULL, 0xE503ADE933E1EBA7ULL }, /* XSUM_XXH3_withSecret_testdata[3546] */\n    { 3547, 0x0000000000000000ULL, 0x31D46CEB10F92FACULL }, /* XSUM_XXH3_withSecret_testdata[3547] */\n    { 3548, 0x0000000000000000ULL, 0x955A378CF5ACAB28ULL }, /* XSUM_XXH3_withSecret_testdata[3548] */\n    { 3549, 0x0000000000000000ULL, 0x67FB9B45D80BF422ULL }, /* XSUM_XXH3_withSecret_testdata[3549] */\n    { 3550, 0x0000000000000000ULL, 0x48913A9057BB25BBULL }, /* XSUM_XXH3_withSecret_testdata[3550] */\n    { 3551, 0x0000000000000000ULL, 0x2A9236D869059A44ULL }, /* XSUM_XXH3_withSecret_testdata[3551] */\n    { 3552, 0x0000000000000000ULL, 0x3F5EECA3B0516EB9ULL }, /* XSUM_XXH3_withSecret_testdata[3552] */\n    { 3553, 0x0000000000000000ULL, 0xD334174F750CF9AFULL }, /* XSUM_XXH3_withSecret_testdata[3553] */\n    { 3554, 0x0000000000000000ULL, 0x591884D8EC794875ULL }, /* XSUM_XXH3_withSecret_testdata[3554] */\n    { 3555, 0x0000000000000000ULL, 0x0FFC2DF8CE4AB956ULL }, /* XSUM_XXH3_withSecret_testdata[3555] */\n    { 3556, 0x0000000000000000ULL, 0xE1405F0654D54E5AULL }, /* XSUM_XXH3_withSecret_testdata[3556] */\n    { 3557, 0x0000000000000000ULL, 0x82FEDEB47FDDA9D7ULL }, /* XSUM_XXH3_withSecret_testdata[3557] */\n    { 3558, 0x0000000000000000ULL, 0xF5AC976F29F525EBULL }, /* XSUM_XXH3_withSecret_testdata[3558] */\n    { 3559, 0x0000000000000000ULL, 0x5E084976A1D92262ULL }, /* XSUM_XXH3_withSecret_testdata[3559] */\n    { 3560, 0x0000000000000000ULL, 0xDEDBFD6CB3BAD25BULL }, /* XSUM_XXH3_withSecret_testdata[3560] */\n    { 3561, 0x0000000000000000ULL, 0x4065E1690CA6B2D3ULL }, /* XSUM_XXH3_withSecret_testdata[3561] */\n    { 3562, 0x0000000000000000ULL, 0x4005ADBD239EAC3BULL }, /* XSUM_XXH3_withSecret_testdata[3562] */\n    { 3563, 0x0000000000000000ULL, 0x904933B2B60879C5ULL }, /* XSUM_XXH3_withSecret_testdata[3563] */\n    { 3564, 0x0000000000000000ULL, 0xAE8A4B93560A3CBAULL }, /* XSUM_XXH3_withSecret_testdata[3564] */\n    { 3565, 0x0000000000000000ULL, 0x85F5586B522C8B75ULL }, /* XSUM_XXH3_withSecret_testdata[3565] */\n    { 3566, 0x0000000000000000ULL, 0xB8626D8B20C2B1D8ULL }, /* XSUM_XXH3_withSecret_testdata[3566] */\n    { 3567, 0x0000000000000000ULL, 0x8BAE6D7ED0145D71ULL }, /* XSUM_XXH3_withSecret_testdata[3567] */\n    { 3568, 0x0000000000000000ULL, 0xCE2A3966C6EAB263ULL }, /* XSUM_XXH3_withSecret_testdata[3568] */\n    { 3569, 0x0000000000000000ULL, 0xC187A11B99654153ULL }, /* XSUM_XXH3_withSecret_testdata[3569] */\n    { 3570, 0x0000000000000000ULL, 0x7576A3857F02863BULL }, /* XSUM_XXH3_withSecret_testdata[3570] */\n    { 3571, 0x0000000000000000ULL, 0x7CE79F2F32812262ULL }, /* XSUM_XXH3_withSecret_testdata[3571] */\n    { 3572, 0x0000000000000000ULL, 0x0566340B25C7698CULL }, /* XSUM_XXH3_withSecret_testdata[3572] */\n    { 3573, 0x0000000000000000ULL, 0xCBB7CDE1F4A2629CULL }, /* XSUM_XXH3_withSecret_testdata[3573] */\n    { 3574, 0x0000000000000000ULL, 0x54A31560323CF6A8ULL }, /* XSUM_XXH3_withSecret_testdata[3574] */\n    { 3575, 0x0000000000000000ULL, 0x8B3C00FF37CFDC35ULL }, /* XSUM_XXH3_withSecret_testdata[3575] */\n    { 3576, 0x0000000000000000ULL, 0x6CBF4B6F2F663076ULL }, /* XSUM_XXH3_withSecret_testdata[3576] */\n    { 3577, 0x0000000000000000ULL, 0x744D2DEF804E02F6ULL }, /* XSUM_XXH3_withSecret_testdata[3577] */\n    { 3578, 0x0000000000000000ULL, 0xDBA8658D39D669E9ULL }, /* XSUM_XXH3_withSecret_testdata[3578] */\n    { 3579, 0x0000000000000000ULL, 0x9D6021A58F675AA8ULL }, /* XSUM_XXH3_withSecret_testdata[3579] */\n    { 3580, 0x0000000000000000ULL, 0xE5B1DDE4DD40BD1CULL }, /* XSUM_XXH3_withSecret_testdata[3580] */\n    { 3581, 0x0000000000000000ULL, 0x7E7919DD1258900DULL }, /* XSUM_XXH3_withSecret_testdata[3581] */\n    { 3582, 0x0000000000000000ULL, 0xCC13F7C38D17C331ULL }, /* XSUM_XXH3_withSecret_testdata[3582] */\n    { 3583, 0x0000000000000000ULL, 0xFA22827AF6C4BF5BULL }, /* XSUM_XXH3_withSecret_testdata[3583] */\n    { 3584, 0x0000000000000000ULL, 0x67FD740F19C06775ULL }, /* XSUM_XXH3_withSecret_testdata[3584] */\n    { 3585, 0x0000000000000000ULL, 0x2D56EA589DE0B5ADULL }, /* XSUM_XXH3_withSecret_testdata[3585] */\n    { 3586, 0x0000000000000000ULL, 0x83578517FB5732D3ULL }, /* XSUM_XXH3_withSecret_testdata[3586] */\n    { 3587, 0x0000000000000000ULL, 0x583F8A960F22B1D2ULL }, /* XSUM_XXH3_withSecret_testdata[3587] */\n    { 3588, 0x0000000000000000ULL, 0x29C57FE0F226E9C9ULL }, /* XSUM_XXH3_withSecret_testdata[3588] */\n    { 3589, 0x0000000000000000ULL, 0xD596D4108C1343A8ULL }, /* XSUM_XXH3_withSecret_testdata[3589] */\n    { 3590, 0x0000000000000000ULL, 0x33F576E3671AE132ULL }, /* XSUM_XXH3_withSecret_testdata[3590] */\n    { 3591, 0x0000000000000000ULL, 0x8685990709433B50ULL }, /* XSUM_XXH3_withSecret_testdata[3591] */\n    { 3592, 0x0000000000000000ULL, 0xD0BE36496EBDD162ULL }, /* XSUM_XXH3_withSecret_testdata[3592] */\n    { 3593, 0x0000000000000000ULL, 0x89CA224F64403215ULL }, /* XSUM_XXH3_withSecret_testdata[3593] */\n    { 3594, 0x0000000000000000ULL, 0x3FE5569B45626A3EULL }, /* XSUM_XXH3_withSecret_testdata[3594] */\n    { 3595, 0x0000000000000000ULL, 0x3C2BFDE5F55EEFBFULL }, /* XSUM_XXH3_withSecret_testdata[3595] */\n    { 3596, 0x0000000000000000ULL, 0x7A5608B2040F9B98ULL }, /* XSUM_XXH3_withSecret_testdata[3596] */\n    { 3597, 0x0000000000000000ULL, 0xAE3B0A88BD95C013ULL }, /* XSUM_XXH3_withSecret_testdata[3597] */\n    { 3598, 0x0000000000000000ULL, 0xEDDBEF70B16F362FULL }, /* XSUM_XXH3_withSecret_testdata[3598] */\n    { 3599, 0x0000000000000000ULL, 0xD66C5A019D495089ULL }, /* XSUM_XXH3_withSecret_testdata[3599] */\n    { 3600, 0x0000000000000000ULL, 0x12ECA429B130C61AULL }, /* XSUM_XXH3_withSecret_testdata[3600] */\n    { 3601, 0x0000000000000000ULL, 0xDD9D353BA9000578ULL }, /* XSUM_XXH3_withSecret_testdata[3601] */\n    { 3602, 0x0000000000000000ULL, 0x5825919EE11D0B9AULL }, /* XSUM_XXH3_withSecret_testdata[3602] */\n    { 3603, 0x0000000000000000ULL, 0x9DD38DC468658916ULL }, /* XSUM_XXH3_withSecret_testdata[3603] */\n    { 3604, 0x0000000000000000ULL, 0x21A36E3176D2F743ULL }, /* XSUM_XXH3_withSecret_testdata[3604] */\n    { 3605, 0x0000000000000000ULL, 0xF83B77A6680719FEULL }, /* XSUM_XXH3_withSecret_testdata[3605] */\n    { 3606, 0x0000000000000000ULL, 0xD4B1975280EB54F2ULL }, /* XSUM_XXH3_withSecret_testdata[3606] */\n    { 3607, 0x0000000000000000ULL, 0x602F4720DA49BDEAULL }, /* XSUM_XXH3_withSecret_testdata[3607] */\n    { 3608, 0x0000000000000000ULL, 0x59A285BCB4BBDBFBULL }, /* XSUM_XXH3_withSecret_testdata[3608] */\n    { 3609, 0x0000000000000000ULL, 0xD9519020FEF530A7ULL }, /* XSUM_XXH3_withSecret_testdata[3609] */\n    { 3610, 0x0000000000000000ULL, 0xAACF5921E6D501ECULL }, /* XSUM_XXH3_withSecret_testdata[3610] */\n    { 3611, 0x0000000000000000ULL, 0x07A636AF3271EBB6ULL }, /* XSUM_XXH3_withSecret_testdata[3611] */\n    { 3612, 0x0000000000000000ULL, 0x4013EA3FE665B0D5ULL }, /* XSUM_XXH3_withSecret_testdata[3612] */\n    { 3613, 0x0000000000000000ULL, 0x2EC368F9BB598D51ULL }, /* XSUM_XXH3_withSecret_testdata[3613] */\n    { 3614, 0x0000000000000000ULL, 0xBD2165F9606C8D61ULL }, /* XSUM_XXH3_withSecret_testdata[3614] */\n    { 3615, 0x0000000000000000ULL, 0xDFAF7B5D28668D5EULL }, /* XSUM_XXH3_withSecret_testdata[3615] */\n    { 3616, 0x0000000000000000ULL, 0x3D6FDCBF546F83D0ULL }, /* XSUM_XXH3_withSecret_testdata[3616] */\n    { 3617, 0x0000000000000000ULL, 0xF23C27847715A884ULL }, /* XSUM_XXH3_withSecret_testdata[3617] */\n    { 3618, 0x0000000000000000ULL, 0x240A3D3B1B06AD6FULL }, /* XSUM_XXH3_withSecret_testdata[3618] */\n    { 3619, 0x0000000000000000ULL, 0x5DE3B1263086D356ULL }, /* XSUM_XXH3_withSecret_testdata[3619] */\n    { 3620, 0x0000000000000000ULL, 0xACFAE3B137C0AF5AULL }, /* XSUM_XXH3_withSecret_testdata[3620] */\n    { 3621, 0x0000000000000000ULL, 0xA1B32A532E4AE965ULL }, /* XSUM_XXH3_withSecret_testdata[3621] */\n    { 3622, 0x0000000000000000ULL, 0x7803002806FE567DULL }, /* XSUM_XXH3_withSecret_testdata[3622] */\n    { 3623, 0x0000000000000000ULL, 0xE350F1C3D9B30327ULL }, /* XSUM_XXH3_withSecret_testdata[3623] */\n    { 3624, 0x0000000000000000ULL, 0xD3C100B30A2DF110ULL }, /* XSUM_XXH3_withSecret_testdata[3624] */\n    { 3625, 0x0000000000000000ULL, 0x4684AF31B6374A8DULL }, /* XSUM_XXH3_withSecret_testdata[3625] */\n    { 3626, 0x0000000000000000ULL, 0x4F1A0143A68B1CD5ULL }, /* XSUM_XXH3_withSecret_testdata[3626] */\n    { 3627, 0x0000000000000000ULL, 0xB086237B79F08F2AULL }, /* XSUM_XXH3_withSecret_testdata[3627] */\n    { 3628, 0x0000000000000000ULL, 0x61A6E3B6CB72D192ULL }, /* XSUM_XXH3_withSecret_testdata[3628] */\n    { 3629, 0x0000000000000000ULL, 0x13FB132F642B074FULL }, /* XSUM_XXH3_withSecret_testdata[3629] */\n    { 3630, 0x0000000000000000ULL, 0xC335AE03249A6F93ULL }, /* XSUM_XXH3_withSecret_testdata[3630] */\n    { 3631, 0x0000000000000000ULL, 0x86BB9D9B7810927CULL }, /* XSUM_XXH3_withSecret_testdata[3631] */\n    { 3632, 0x0000000000000000ULL, 0x97CF88EE83090D33ULL }, /* XSUM_XXH3_withSecret_testdata[3632] */\n    { 3633, 0x0000000000000000ULL, 0xAD7264DE0835485FULL }, /* XSUM_XXH3_withSecret_testdata[3633] */\n    { 3634, 0x0000000000000000ULL, 0xEB6874CDF40A6ADAULL }, /* XSUM_XXH3_withSecret_testdata[3634] */\n    { 3635, 0x0000000000000000ULL, 0xE4D8C29D2D21CDCDULL }, /* XSUM_XXH3_withSecret_testdata[3635] */\n    { 3636, 0x0000000000000000ULL, 0x2F70C55B1CE33DF2ULL }, /* XSUM_XXH3_withSecret_testdata[3636] */\n    { 3637, 0x0000000000000000ULL, 0x32CB28B1E0DC2AEFULL }, /* XSUM_XXH3_withSecret_testdata[3637] */\n    { 3638, 0x0000000000000000ULL, 0x1F8A763161F47771ULL }, /* XSUM_XXH3_withSecret_testdata[3638] */\n    { 3639, 0x0000000000000000ULL, 0x4B9E7F78ED95A2F9ULL }, /* XSUM_XXH3_withSecret_testdata[3639] */\n    { 3640, 0x0000000000000000ULL, 0x0330B8B4657E5D20ULL }, /* XSUM_XXH3_withSecret_testdata[3640] */\n    { 3641, 0x0000000000000000ULL, 0xCB5EB84AC49FCD38ULL }, /* XSUM_XXH3_withSecret_testdata[3641] */\n    { 3642, 0x0000000000000000ULL, 0x9954450CB7119880ULL }, /* XSUM_XXH3_withSecret_testdata[3642] */\n    { 3643, 0x0000000000000000ULL, 0x39A6D0CCD9D7334DULL }, /* XSUM_XXH3_withSecret_testdata[3643] */\n    { 3644, 0x0000000000000000ULL, 0x29F426ACE9922249ULL }, /* XSUM_XXH3_withSecret_testdata[3644] */\n    { 3645, 0x0000000000000000ULL, 0xD6BCCF95E17F5A5AULL }, /* XSUM_XXH3_withSecret_testdata[3645] */\n    { 3646, 0x0000000000000000ULL, 0x52E2F5BBA58DE285ULL }, /* XSUM_XXH3_withSecret_testdata[3646] */\n    { 3647, 0x0000000000000000ULL, 0x5C2F0AF653744211ULL }, /* XSUM_XXH3_withSecret_testdata[3647] */\n    { 3648, 0x0000000000000000ULL, 0x13D0266107F906FEULL }, /* XSUM_XXH3_withSecret_testdata[3648] */\n    { 3649, 0x0000000000000000ULL, 0x73B63D1E9267CBC3ULL }, /* XSUM_XXH3_withSecret_testdata[3649] */\n    { 3650, 0x0000000000000000ULL, 0x5AE4F695636FBDB3ULL }, /* XSUM_XXH3_withSecret_testdata[3650] */\n    { 3651, 0x0000000000000000ULL, 0xBE6F08CB4A10EA2DULL }, /* XSUM_XXH3_withSecret_testdata[3651] */\n    { 3652, 0x0000000000000000ULL, 0x9ECE66636DF61E30ULL }, /* XSUM_XXH3_withSecret_testdata[3652] */\n    { 3653, 0x0000000000000000ULL, 0x76897F6B48754D9CULL }, /* XSUM_XXH3_withSecret_testdata[3653] */\n    { 3654, 0x0000000000000000ULL, 0x96893F3A1625D67CULL }, /* XSUM_XXH3_withSecret_testdata[3654] */\n    { 3655, 0x0000000000000000ULL, 0x1BFA6342365DB03EULL }, /* XSUM_XXH3_withSecret_testdata[3655] */\n    { 3656, 0x0000000000000000ULL, 0x9CAEDFDC9E5BBC45ULL }, /* XSUM_XXH3_withSecret_testdata[3656] */\n    { 3657, 0x0000000000000000ULL, 0xEAD8C3DF0BC2B6EEULL }, /* XSUM_XXH3_withSecret_testdata[3657] */\n    { 3658, 0x0000000000000000ULL, 0x5F3510D10299D194ULL }, /* XSUM_XXH3_withSecret_testdata[3658] */\n    { 3659, 0x0000000000000000ULL, 0x4F7D6E007B2E2EE7ULL }, /* XSUM_XXH3_withSecret_testdata[3659] */\n    { 3660, 0x0000000000000000ULL, 0xD5F60C63C8EC5E09ULL }, /* XSUM_XXH3_withSecret_testdata[3660] */\n    { 3661, 0x0000000000000000ULL, 0x30959A76A7B20A41ULL }, /* XSUM_XXH3_withSecret_testdata[3661] */\n    { 3662, 0x0000000000000000ULL, 0x27F8DA0A1E12A2BDULL }, /* XSUM_XXH3_withSecret_testdata[3662] */\n    { 3663, 0x0000000000000000ULL, 0xEF629975E153E4CEULL }, /* XSUM_XXH3_withSecret_testdata[3663] */\n    { 3664, 0x0000000000000000ULL, 0x33F7BFE74C443E29ULL }, /* XSUM_XXH3_withSecret_testdata[3664] */\n    { 3665, 0x0000000000000000ULL, 0xE8A73C1DD4AB5D52ULL }, /* XSUM_XXH3_withSecret_testdata[3665] */\n    { 3666, 0x0000000000000000ULL, 0x63E3746CC32627BDULL }, /* XSUM_XXH3_withSecret_testdata[3666] */\n    { 3667, 0x0000000000000000ULL, 0x8872F8B441AE8026ULL }, /* XSUM_XXH3_withSecret_testdata[3667] */\n    { 3668, 0x0000000000000000ULL, 0x34E1FCC0E6FC205CULL }, /* XSUM_XXH3_withSecret_testdata[3668] */\n    { 3669, 0x0000000000000000ULL, 0xCC5BDD63DE4C9FA8ULL }, /* XSUM_XXH3_withSecret_testdata[3669] */\n    { 3670, 0x0000000000000000ULL, 0xA958069D7004AF42ULL }, /* XSUM_XXH3_withSecret_testdata[3670] */\n    { 3671, 0x0000000000000000ULL, 0x03C01B5A23891673ULL }, /* XSUM_XXH3_withSecret_testdata[3671] */\n    { 3672, 0x0000000000000000ULL, 0xFE4E34A64A5497BAULL }, /* XSUM_XXH3_withSecret_testdata[3672] */\n    { 3673, 0x0000000000000000ULL, 0xDB1DBA66C78E84DBULL }, /* XSUM_XXH3_withSecret_testdata[3673] */\n    { 3674, 0x0000000000000000ULL, 0x001F20363F2628DBULL }, /* XSUM_XXH3_withSecret_testdata[3674] */\n    { 3675, 0x0000000000000000ULL, 0xE03DD488BF20420DULL }, /* XSUM_XXH3_withSecret_testdata[3675] */\n    { 3676, 0x0000000000000000ULL, 0xE7A872FDEFCA807BULL }, /* XSUM_XXH3_withSecret_testdata[3676] */\n    { 3677, 0x0000000000000000ULL, 0x72B8216B72DFE57AULL }, /* XSUM_XXH3_withSecret_testdata[3677] */\n    { 3678, 0x0000000000000000ULL, 0x9B0B6D2B15023E94ULL }, /* XSUM_XXH3_withSecret_testdata[3678] */\n    { 3679, 0x0000000000000000ULL, 0x3C2A43ABE217905AULL }, /* XSUM_XXH3_withSecret_testdata[3679] */\n    { 3680, 0x0000000000000000ULL, 0x21A35114EC6CDAE8ULL }, /* XSUM_XXH3_withSecret_testdata[3680] */\n    { 3681, 0x0000000000000000ULL, 0x048CB0141AC4C76AULL }, /* XSUM_XXH3_withSecret_testdata[3681] */\n    { 3682, 0x0000000000000000ULL, 0xE5AFFACD2AC33F04ULL }, /* XSUM_XXH3_withSecret_testdata[3682] */\n    { 3683, 0x0000000000000000ULL, 0x2FEBC09FA68F6EDEULL }, /* XSUM_XXH3_withSecret_testdata[3683] */\n    { 3684, 0x0000000000000000ULL, 0x044907FA64CEBE97ULL }, /* XSUM_XXH3_withSecret_testdata[3684] */\n    { 3685, 0x0000000000000000ULL, 0x18B8803680479C1FULL }, /* XSUM_XXH3_withSecret_testdata[3685] */\n    { 3686, 0x0000000000000000ULL, 0x3B434DC270FFA40EULL }, /* XSUM_XXH3_withSecret_testdata[3686] */\n    { 3687, 0x0000000000000000ULL, 0x0E81B1243D4ECBA7ULL }, /* XSUM_XXH3_withSecret_testdata[3687] */\n    { 3688, 0x0000000000000000ULL, 0xDB48C5430E0E2B55ULL }, /* XSUM_XXH3_withSecret_testdata[3688] */\n    { 3689, 0x0000000000000000ULL, 0x4DA4C8361F09744CULL }, /* XSUM_XXH3_withSecret_testdata[3689] */\n    { 3690, 0x0000000000000000ULL, 0x4880F9B5A5272B75ULL }, /* XSUM_XXH3_withSecret_testdata[3690] */\n    { 3691, 0x0000000000000000ULL, 0xF9C814C22C0ADCF5ULL }, /* XSUM_XXH3_withSecret_testdata[3691] */\n    { 3692, 0x0000000000000000ULL, 0xDBCA1057366F2159ULL }, /* XSUM_XXH3_withSecret_testdata[3692] */\n    { 3693, 0x0000000000000000ULL, 0xC35907B3C5889075ULL }, /* XSUM_XXH3_withSecret_testdata[3693] */\n    { 3694, 0x0000000000000000ULL, 0x072767B99173763DULL }, /* XSUM_XXH3_withSecret_testdata[3694] */\n    { 3695, 0x0000000000000000ULL, 0x8F06E469E4C88337ULL }, /* XSUM_XXH3_withSecret_testdata[3695] */\n    { 3696, 0x0000000000000000ULL, 0xE37A69802CE42D43ULL }, /* XSUM_XXH3_withSecret_testdata[3696] */\n    { 3697, 0x0000000000000000ULL, 0x10EA5A56C4D77ABEULL }, /* XSUM_XXH3_withSecret_testdata[3697] */\n    { 3698, 0x0000000000000000ULL, 0xA26396BD4BCFF063ULL }, /* XSUM_XXH3_withSecret_testdata[3698] */\n    { 3699, 0x0000000000000000ULL, 0x5A128CB189F273E3ULL }, /* XSUM_XXH3_withSecret_testdata[3699] */\n    { 3700, 0x0000000000000000ULL, 0xE0D7D181B089D4FCULL }, /* XSUM_XXH3_withSecret_testdata[3700] */\n    { 3701, 0x0000000000000000ULL, 0xB0B1D7BD188AF12AULL }, /* XSUM_XXH3_withSecret_testdata[3701] */\n    { 3702, 0x0000000000000000ULL, 0x31C2116B4AC8C726ULL }, /* XSUM_XXH3_withSecret_testdata[3702] */\n    { 3703, 0x0000000000000000ULL, 0xC71F338F4647AFC5ULL }, /* XSUM_XXH3_withSecret_testdata[3703] */\n    { 3704, 0x0000000000000000ULL, 0xBDA992AD1A4CBF1BULL }, /* XSUM_XXH3_withSecret_testdata[3704] */\n    { 3705, 0x0000000000000000ULL, 0x63DC6F9CDE581FC3ULL }, /* XSUM_XXH3_withSecret_testdata[3705] */\n    { 3706, 0x0000000000000000ULL, 0xE71687229E8DC725ULL }, /* XSUM_XXH3_withSecret_testdata[3706] */\n    { 3707, 0x0000000000000000ULL, 0xF6267DED115F5C50ULL }, /* XSUM_XXH3_withSecret_testdata[3707] */\n    { 3708, 0x0000000000000000ULL, 0xED27136F285EECF5ULL }, /* XSUM_XXH3_withSecret_testdata[3708] */\n    { 3709, 0x0000000000000000ULL, 0x18A8AF1881FD9A23ULL }, /* XSUM_XXH3_withSecret_testdata[3709] */\n    { 3710, 0x0000000000000000ULL, 0x0E87706AAF47190DULL }, /* XSUM_XXH3_withSecret_testdata[3710] */\n    { 3711, 0x0000000000000000ULL, 0xC9ACE76107EA4689ULL }, /* XSUM_XXH3_withSecret_testdata[3711] */\n    { 3712, 0x0000000000000000ULL, 0x1DB32201CD76C745ULL }, /* XSUM_XXH3_withSecret_testdata[3712] */\n    { 3713, 0x0000000000000000ULL, 0xFFE21B586BF9A39AULL }, /* XSUM_XXH3_withSecret_testdata[3713] */\n    { 3714, 0x0000000000000000ULL, 0xF3F49E55DD107D6DULL }, /* XSUM_XXH3_withSecret_testdata[3714] */\n    { 3715, 0x0000000000000000ULL, 0xE9D9654ED3D54F89ULL }, /* XSUM_XXH3_withSecret_testdata[3715] */\n    { 3716, 0x0000000000000000ULL, 0x9CBECD831B45BB4CULL }, /* XSUM_XXH3_withSecret_testdata[3716] */\n    { 3717, 0x0000000000000000ULL, 0x485976A8B12D67BBULL }, /* XSUM_XXH3_withSecret_testdata[3717] */\n    { 3718, 0x0000000000000000ULL, 0xB7585765FC20C4A2ULL }, /* XSUM_XXH3_withSecret_testdata[3718] */\n    { 3719, 0x0000000000000000ULL, 0xB1DA481EDE8C3255ULL }, /* XSUM_XXH3_withSecret_testdata[3719] */\n    { 3720, 0x0000000000000000ULL, 0xB8C0A08B5E236251ULL }, /* XSUM_XXH3_withSecret_testdata[3720] */\n    { 3721, 0x0000000000000000ULL, 0x5A255FC9D278D00AULL }, /* XSUM_XXH3_withSecret_testdata[3721] */\n    { 3722, 0x0000000000000000ULL, 0x48F4BE2687506EA9ULL }, /* XSUM_XXH3_withSecret_testdata[3722] */\n    { 3723, 0x0000000000000000ULL, 0x2558380F89CAEB03ULL }, /* XSUM_XXH3_withSecret_testdata[3723] */\n    { 3724, 0x0000000000000000ULL, 0x0DC2E4D8D7ECA5E0ULL }, /* XSUM_XXH3_withSecret_testdata[3724] */\n    { 3725, 0x0000000000000000ULL, 0x05F606044236F491ULL }, /* XSUM_XXH3_withSecret_testdata[3725] */\n    { 3726, 0x0000000000000000ULL, 0x7406113BF7451CF1ULL }, /* XSUM_XXH3_withSecret_testdata[3726] */\n    { 3727, 0x0000000000000000ULL, 0x76FB9D866FAFB2BAULL }, /* XSUM_XXH3_withSecret_testdata[3727] */\n    { 3728, 0x0000000000000000ULL, 0x7E137B468B29D288ULL }, /* XSUM_XXH3_withSecret_testdata[3728] */\n    { 3729, 0x0000000000000000ULL, 0x7EF51369C118D410ULL }, /* XSUM_XXH3_withSecret_testdata[3729] */\n    { 3730, 0x0000000000000000ULL, 0xCA6DBC27D4DF0824ULL }, /* XSUM_XXH3_withSecret_testdata[3730] */\n    { 3731, 0x0000000000000000ULL, 0xAC173AD877A8B109ULL }, /* XSUM_XXH3_withSecret_testdata[3731] */\n    { 3732, 0x0000000000000000ULL, 0x3B23CCA050FDB25EULL }, /* XSUM_XXH3_withSecret_testdata[3732] */\n    { 3733, 0x0000000000000000ULL, 0x54992EA328E6A79AULL }, /* XSUM_XXH3_withSecret_testdata[3733] */\n    { 3734, 0x0000000000000000ULL, 0x1526C8960EA4823EULL }, /* XSUM_XXH3_withSecret_testdata[3734] */\n    { 3735, 0x0000000000000000ULL, 0xA94DD15791A710EFULL }, /* XSUM_XXH3_withSecret_testdata[3735] */\n    { 3736, 0x0000000000000000ULL, 0x0AE776D7B71B14EEULL }, /* XSUM_XXH3_withSecret_testdata[3736] */\n    { 3737, 0x0000000000000000ULL, 0x7A84970010538609ULL }, /* XSUM_XXH3_withSecret_testdata[3737] */\n    { 3738, 0x0000000000000000ULL, 0xAA6BCBD050ED92E3ULL }, /* XSUM_XXH3_withSecret_testdata[3738] */\n    { 3739, 0x0000000000000000ULL, 0xB61E295FBC27DC6FULL }, /* XSUM_XXH3_withSecret_testdata[3739] */\n    { 3740, 0x0000000000000000ULL, 0x9FE549999C1629FBULL }, /* XSUM_XXH3_withSecret_testdata[3740] */\n    { 3741, 0x0000000000000000ULL, 0x9230E380E452E7D5ULL }, /* XSUM_XXH3_withSecret_testdata[3741] */\n    { 3742, 0x0000000000000000ULL, 0x50C2D319AC1DAD66ULL }, /* XSUM_XXH3_withSecret_testdata[3742] */\n    { 3743, 0x0000000000000000ULL, 0x0A4AB987174866CBULL }, /* XSUM_XXH3_withSecret_testdata[3743] */\n    { 3744, 0x0000000000000000ULL, 0xEB1CA8391A884420ULL }, /* XSUM_XXH3_withSecret_testdata[3744] */\n    { 3745, 0x0000000000000000ULL, 0x1FFB61B556F72EE6ULL }, /* XSUM_XXH3_withSecret_testdata[3745] */\n    { 3746, 0x0000000000000000ULL, 0x75AA2A4413656C14ULL }, /* XSUM_XXH3_withSecret_testdata[3746] */\n    { 3747, 0x0000000000000000ULL, 0x4CDA01A88A2AA595ULL }, /* XSUM_XXH3_withSecret_testdata[3747] */\n    { 3748, 0x0000000000000000ULL, 0xF6DE07C01752A9BDULL }, /* XSUM_XXH3_withSecret_testdata[3748] */\n    { 3749, 0x0000000000000000ULL, 0xA8A8B0A39D2A1FC2ULL }, /* XSUM_XXH3_withSecret_testdata[3749] */\n    { 3750, 0x0000000000000000ULL, 0x5784AB60AEA1B6BCULL }, /* XSUM_XXH3_withSecret_testdata[3750] */\n    { 3751, 0x0000000000000000ULL, 0xD64C5CB2A53FDCCAULL }, /* XSUM_XXH3_withSecret_testdata[3751] */\n    { 3752, 0x0000000000000000ULL, 0x4DAFBC77C45F9225ULL }, /* XSUM_XXH3_withSecret_testdata[3752] */\n    { 3753, 0x0000000000000000ULL, 0xB075D911FFA1708FULL }, /* XSUM_XXH3_withSecret_testdata[3753] */\n    { 3754, 0x0000000000000000ULL, 0xB152C65017329C71ULL }, /* XSUM_XXH3_withSecret_testdata[3754] */\n    { 3755, 0x0000000000000000ULL, 0xECEDCDA57DA1D9B6ULL }, /* XSUM_XXH3_withSecret_testdata[3755] */\n    { 3756, 0x0000000000000000ULL, 0xF582183984FDB908ULL }, /* XSUM_XXH3_withSecret_testdata[3756] */\n    { 3757, 0x0000000000000000ULL, 0x94BEE11D8AAA2CE3ULL }, /* XSUM_XXH3_withSecret_testdata[3757] */\n    { 3758, 0x0000000000000000ULL, 0xE92ED29BFBB00F69ULL }, /* XSUM_XXH3_withSecret_testdata[3758] */\n    { 3759, 0x0000000000000000ULL, 0x666F41EC3C2B2965ULL }, /* XSUM_XXH3_withSecret_testdata[3759] */\n    { 3760, 0x0000000000000000ULL, 0x7B9E87883F93C2F9ULL }, /* XSUM_XXH3_withSecret_testdata[3760] */\n    { 3761, 0x0000000000000000ULL, 0xEDADD8EFEEA8A3A0ULL }, /* XSUM_XXH3_withSecret_testdata[3761] */\n    { 3762, 0x0000000000000000ULL, 0xF342739645FF0E44ULL }, /* XSUM_XXH3_withSecret_testdata[3762] */\n    { 3763, 0x0000000000000000ULL, 0x2B0C530C6BC98851ULL }, /* XSUM_XXH3_withSecret_testdata[3763] */\n    { 3764, 0x0000000000000000ULL, 0x8B612A3272D16644ULL }, /* XSUM_XXH3_withSecret_testdata[3764] */\n    { 3765, 0x0000000000000000ULL, 0xEA8BDCDEFCEF283CULL }, /* XSUM_XXH3_withSecret_testdata[3765] */\n    { 3766, 0x0000000000000000ULL, 0x6416BB5A98C1FB2AULL }, /* XSUM_XXH3_withSecret_testdata[3766] */\n    { 3767, 0x0000000000000000ULL, 0xB7F499E2B37496DCULL }, /* XSUM_XXH3_withSecret_testdata[3767] */\n    { 3768, 0x0000000000000000ULL, 0x33CB4D1B2ED8DC8DULL }, /* XSUM_XXH3_withSecret_testdata[3768] */\n    { 3769, 0x0000000000000000ULL, 0xEAC1D6CFE61BE787ULL }, /* XSUM_XXH3_withSecret_testdata[3769] */\n    { 3770, 0x0000000000000000ULL, 0x46C761EFDD47C86CULL }, /* XSUM_XXH3_withSecret_testdata[3770] */\n    { 3771, 0x0000000000000000ULL, 0xAB537E712965BA86ULL }, /* XSUM_XXH3_withSecret_testdata[3771] */\n    { 3772, 0x0000000000000000ULL, 0x02D305D648501AADULL }, /* XSUM_XXH3_withSecret_testdata[3772] */\n    { 3773, 0x0000000000000000ULL, 0xB17AD8CCD4BC7A04ULL }, /* XSUM_XXH3_withSecret_testdata[3773] */\n    { 3774, 0x0000000000000000ULL, 0xBCF6823A22C99244ULL }, /* XSUM_XXH3_withSecret_testdata[3774] */\n    { 3775, 0x0000000000000000ULL, 0x96EEEB261AF86AD9ULL }, /* XSUM_XXH3_withSecret_testdata[3775] */\n    { 3776, 0x0000000000000000ULL, 0x2C7A8443A839BA3AULL }, /* XSUM_XXH3_withSecret_testdata[3776] */\n    { 3777, 0x0000000000000000ULL, 0x0E474F9A93CCB242ULL }, /* XSUM_XXH3_withSecret_testdata[3777] */\n    { 3778, 0x0000000000000000ULL, 0xFDC63A0F211D3154ULL }, /* XSUM_XXH3_withSecret_testdata[3778] */\n    { 3779, 0x0000000000000000ULL, 0xE56BED521618B7BAULL }, /* XSUM_XXH3_withSecret_testdata[3779] */\n    { 3780, 0x0000000000000000ULL, 0xDA685DF97CA1506DULL }, /* XSUM_XXH3_withSecret_testdata[3780] */\n    { 3781, 0x0000000000000000ULL, 0x1C1FD38460B6F82AULL }, /* XSUM_XXH3_withSecret_testdata[3781] */\n    { 3782, 0x0000000000000000ULL, 0xF9DF2C7BBBF67FA1ULL }, /* XSUM_XXH3_withSecret_testdata[3782] */\n    { 3783, 0x0000000000000000ULL, 0x7BCFE3EF0B35C54FULL }, /* XSUM_XXH3_withSecret_testdata[3783] */\n    { 3784, 0x0000000000000000ULL, 0x77E909EC093B2113ULL }, /* XSUM_XXH3_withSecret_testdata[3784] */\n    { 3785, 0x0000000000000000ULL, 0xB74CAA8CBFC01E10ULL }, /* XSUM_XXH3_withSecret_testdata[3785] */\n    { 3786, 0x0000000000000000ULL, 0xDAC8D10D0862BCD5ULL }, /* XSUM_XXH3_withSecret_testdata[3786] */\n    { 3787, 0x0000000000000000ULL, 0xB9E4FAF7B370A187ULL }, /* XSUM_XXH3_withSecret_testdata[3787] */\n    { 3788, 0x0000000000000000ULL, 0x3D82B66B5D1BB880ULL }, /* XSUM_XXH3_withSecret_testdata[3788] */\n    { 3789, 0x0000000000000000ULL, 0x9304E5F1EBAFE4C7ULL }, /* XSUM_XXH3_withSecret_testdata[3789] */\n    { 3790, 0x0000000000000000ULL, 0xC7A9C2576FBD767DULL }, /* XSUM_XXH3_withSecret_testdata[3790] */\n    { 3791, 0x0000000000000000ULL, 0x14F01E3E28FC759DULL }, /* XSUM_XXH3_withSecret_testdata[3791] */\n    { 3792, 0x0000000000000000ULL, 0x76FD38736065BED7ULL }, /* XSUM_XXH3_withSecret_testdata[3792] */\n    { 3793, 0x0000000000000000ULL, 0x4E31D701EB7670D3ULL }, /* XSUM_XXH3_withSecret_testdata[3793] */\n    { 3794, 0x0000000000000000ULL, 0x340F87F84F06CC94ULL }, /* XSUM_XXH3_withSecret_testdata[3794] */\n    { 3795, 0x0000000000000000ULL, 0xDA2B3FBB4B61DB28ULL }, /* XSUM_XXH3_withSecret_testdata[3795] */\n    { 3796, 0x0000000000000000ULL, 0x63401C635E1CEFFFULL }, /* XSUM_XXH3_withSecret_testdata[3796] */\n    { 3797, 0x0000000000000000ULL, 0x07EA5DE2D1677BB5ULL }, /* XSUM_XXH3_withSecret_testdata[3797] */\n    { 3798, 0x0000000000000000ULL, 0x32882E6562EE4F9AULL }, /* XSUM_XXH3_withSecret_testdata[3798] */\n    { 3799, 0x0000000000000000ULL, 0x16D20325CB5BAFD0ULL }, /* XSUM_XXH3_withSecret_testdata[3799] */\n    { 3800, 0x0000000000000000ULL, 0xD1D2AE3C74F79A1DULL }, /* XSUM_XXH3_withSecret_testdata[3800] */\n    { 3801, 0x0000000000000000ULL, 0x58F0413920C56ADBULL }, /* XSUM_XXH3_withSecret_testdata[3801] */\n    { 3802, 0x0000000000000000ULL, 0x84B5A597342D2628ULL }, /* XSUM_XXH3_withSecret_testdata[3802] */\n    { 3803, 0x0000000000000000ULL, 0x49093794D9FC2868ULL }, /* XSUM_XXH3_withSecret_testdata[3803] */\n    { 3804, 0x0000000000000000ULL, 0x92FBA0D90B409409ULL }, /* XSUM_XXH3_withSecret_testdata[3804] */\n    { 3805, 0x0000000000000000ULL, 0x649EA52C223F577AULL }, /* XSUM_XXH3_withSecret_testdata[3805] */\n    { 3806, 0x0000000000000000ULL, 0x423C53D0087BFDD5ULL }, /* XSUM_XXH3_withSecret_testdata[3806] */\n    { 3807, 0x0000000000000000ULL, 0x613799A6F9D3F0C2ULL }, /* XSUM_XXH3_withSecret_testdata[3807] */\n    { 3808, 0x0000000000000000ULL, 0x1DD793160A191682ULL }, /* XSUM_XXH3_withSecret_testdata[3808] */\n    { 3809, 0x0000000000000000ULL, 0xE354257ACA462674ULL }, /* XSUM_XXH3_withSecret_testdata[3809] */\n    { 3810, 0x0000000000000000ULL, 0x7A90A29F197857D9ULL }, /* XSUM_XXH3_withSecret_testdata[3810] */\n    { 3811, 0x0000000000000000ULL, 0x479DDA084F200DD5ULL }, /* XSUM_XXH3_withSecret_testdata[3811] */\n    { 3812, 0x0000000000000000ULL, 0x1C8590EC97FD6CB5ULL }, /* XSUM_XXH3_withSecret_testdata[3812] */\n    { 3813, 0x0000000000000000ULL, 0x33D6C48753A38611ULL }, /* XSUM_XXH3_withSecret_testdata[3813] */\n    { 3814, 0x0000000000000000ULL, 0x40B740DFA545198BULL }, /* XSUM_XXH3_withSecret_testdata[3814] */\n    { 3815, 0x0000000000000000ULL, 0x8D1D8E8C352095D4ULL }, /* XSUM_XXH3_withSecret_testdata[3815] */\n    { 3816, 0x0000000000000000ULL, 0xC69121B15BFEA3CCULL }, /* XSUM_XXH3_withSecret_testdata[3816] */\n    { 3817, 0x0000000000000000ULL, 0x9B0CE9D9A00F332AULL }, /* XSUM_XXH3_withSecret_testdata[3817] */\n    { 3818, 0x0000000000000000ULL, 0xD4B48E6420DAD175ULL }, /* XSUM_XXH3_withSecret_testdata[3818] */\n    { 3819, 0x0000000000000000ULL, 0x9AF27DA42034A1AEULL }, /* XSUM_XXH3_withSecret_testdata[3819] */\n    { 3820, 0x0000000000000000ULL, 0xC8C71DEC751587A6ULL }, /* XSUM_XXH3_withSecret_testdata[3820] */\n    { 3821, 0x0000000000000000ULL, 0x0316EC3A75873436ULL }, /* XSUM_XXH3_withSecret_testdata[3821] */\n    { 3822, 0x0000000000000000ULL, 0x3B37690A367657FAULL }, /* XSUM_XXH3_withSecret_testdata[3822] */\n    { 3823, 0x0000000000000000ULL, 0xC09F52288854CAE0ULL }, /* XSUM_XXH3_withSecret_testdata[3823] */\n    { 3824, 0x0000000000000000ULL, 0xAC7D977DBFED7A45ULL }, /* XSUM_XXH3_withSecret_testdata[3824] */\n    { 3825, 0x0000000000000000ULL, 0x8F756E5031220FA0ULL }, /* XSUM_XXH3_withSecret_testdata[3825] */\n    { 3826, 0x0000000000000000ULL, 0x121FA696A8744068ULL }, /* XSUM_XXH3_withSecret_testdata[3826] */\n    { 3827, 0x0000000000000000ULL, 0x935280FAA6F76A56ULL }, /* XSUM_XXH3_withSecret_testdata[3827] */\n    { 3828, 0x0000000000000000ULL, 0x66211848A15A1541ULL }, /* XSUM_XXH3_withSecret_testdata[3828] */\n    { 3829, 0x0000000000000000ULL, 0x440A03E907D66571ULL }, /* XSUM_XXH3_withSecret_testdata[3829] */\n    { 3830, 0x0000000000000000ULL, 0x9491D55283A09C43ULL }, /* XSUM_XXH3_withSecret_testdata[3830] */\n    { 3831, 0x0000000000000000ULL, 0x308FD6DCD408AA5AULL }, /* XSUM_XXH3_withSecret_testdata[3831] */\n    { 3832, 0x0000000000000000ULL, 0x6F5D57109CA10AEAULL }, /* XSUM_XXH3_withSecret_testdata[3832] */\n    { 3833, 0x0000000000000000ULL, 0x0BB422616E2FF0F5ULL }, /* XSUM_XXH3_withSecret_testdata[3833] */\n    { 3834, 0x0000000000000000ULL, 0xF71FB6B3FABCC5B5ULL }, /* XSUM_XXH3_withSecret_testdata[3834] */\n    { 3835, 0x0000000000000000ULL, 0x0D077380BC66E5F8ULL }, /* XSUM_XXH3_withSecret_testdata[3835] */\n    { 3836, 0x0000000000000000ULL, 0x2D18821A1CE7A0D3ULL }, /* XSUM_XXH3_withSecret_testdata[3836] */\n    { 3837, 0x0000000000000000ULL, 0x89741346BBAF3616ULL }, /* XSUM_XXH3_withSecret_testdata[3837] */\n    { 3838, 0x0000000000000000ULL, 0x5BE5AE3674120F8EULL }, /* XSUM_XXH3_withSecret_testdata[3838] */\n    { 3839, 0x0000000000000000ULL, 0x83FC1E78888AEB54ULL }, /* XSUM_XXH3_withSecret_testdata[3839] */\n    { 3840, 0x0000000000000000ULL, 0xED8925DFA219FFB2ULL }, /* XSUM_XXH3_withSecret_testdata[3840] */\n    { 3841, 0x0000000000000000ULL, 0xBB51262335EFC2A7ULL }, /* XSUM_XXH3_withSecret_testdata[3841] */\n    { 3842, 0x0000000000000000ULL, 0xF781FFA8219D2D48ULL }, /* XSUM_XXH3_withSecret_testdata[3842] */\n    { 3843, 0x0000000000000000ULL, 0xF5AA718CEE24D232ULL }, /* XSUM_XXH3_withSecret_testdata[3843] */\n    { 3844, 0x0000000000000000ULL, 0x6F983BF6054906C1ULL }, /* XSUM_XXH3_withSecret_testdata[3844] */\n    { 3845, 0x0000000000000000ULL, 0xB9A4B25D6D15DD75ULL }, /* XSUM_XXH3_withSecret_testdata[3845] */\n    { 3846, 0x0000000000000000ULL, 0x03DFB187DE44D487ULL }, /* XSUM_XXH3_withSecret_testdata[3846] */\n    { 3847, 0x0000000000000000ULL, 0x77DA1F2A998FE3ABULL }, /* XSUM_XXH3_withSecret_testdata[3847] */\n    { 3848, 0x0000000000000000ULL, 0x26C8738103EF1A53ULL }, /* XSUM_XXH3_withSecret_testdata[3848] */\n    { 3849, 0x0000000000000000ULL, 0xA458541991D43DB4ULL }, /* XSUM_XXH3_withSecret_testdata[3849] */\n    { 3850, 0x0000000000000000ULL, 0x477DE4BF55A335CEULL }, /* XSUM_XXH3_withSecret_testdata[3850] */\n    { 3851, 0x0000000000000000ULL, 0x147708C7E1BE1F09ULL }, /* XSUM_XXH3_withSecret_testdata[3851] */\n    { 3852, 0x0000000000000000ULL, 0x4F80B172AD9704ECULL }, /* XSUM_XXH3_withSecret_testdata[3852] */\n    { 3853, 0x0000000000000000ULL, 0x0CA2B096526C33F9ULL }, /* XSUM_XXH3_withSecret_testdata[3853] */\n    { 3854, 0x0000000000000000ULL, 0x013AE1F7A29A617AULL }, /* XSUM_XXH3_withSecret_testdata[3854] */\n    { 3855, 0x0000000000000000ULL, 0x049FAA6D542D15CFULL }, /* XSUM_XXH3_withSecret_testdata[3855] */\n    { 3856, 0x0000000000000000ULL, 0x13039E7C64323905ULL }, /* XSUM_XXH3_withSecret_testdata[3856] */\n    { 3857, 0x0000000000000000ULL, 0x79D4917EA102D901ULL }, /* XSUM_XXH3_withSecret_testdata[3857] */\n    { 3858, 0x0000000000000000ULL, 0xDACB2985AEC67711ULL }, /* XSUM_XXH3_withSecret_testdata[3858] */\n    { 3859, 0x0000000000000000ULL, 0x601C42A33E2D0902ULL }, /* XSUM_XXH3_withSecret_testdata[3859] */\n    { 3860, 0x0000000000000000ULL, 0xF1FA5A2ADE2EE6C7ULL }, /* XSUM_XXH3_withSecret_testdata[3860] */\n    { 3861, 0x0000000000000000ULL, 0x8640BA9218BB17E9ULL }, /* XSUM_XXH3_withSecret_testdata[3861] */\n    { 3862, 0x0000000000000000ULL, 0x61364A17DAE52AE8ULL }, /* XSUM_XXH3_withSecret_testdata[3862] */\n    { 3863, 0x0000000000000000ULL, 0x8B8256DE86A83190ULL }, /* XSUM_XXH3_withSecret_testdata[3863] */\n    { 3864, 0x0000000000000000ULL, 0x0CE94D5DCE669515ULL }, /* XSUM_XXH3_withSecret_testdata[3864] */\n    { 3865, 0x0000000000000000ULL, 0x376563E1285C6D31ULL }, /* XSUM_XXH3_withSecret_testdata[3865] */\n    { 3866, 0x0000000000000000ULL, 0xC75FAC7CEF0E0B28ULL }, /* XSUM_XXH3_withSecret_testdata[3866] */\n    { 3867, 0x0000000000000000ULL, 0x15757DB615C48441ULL }, /* XSUM_XXH3_withSecret_testdata[3867] */\n    { 3868, 0x0000000000000000ULL, 0x3B900D93E2E69F82ULL }, /* XSUM_XXH3_withSecret_testdata[3868] */\n    { 3869, 0x0000000000000000ULL, 0xF3EB1C5CAC0AECA8ULL }, /* XSUM_XXH3_withSecret_testdata[3869] */\n    { 3870, 0x0000000000000000ULL, 0x6C6E7AD81742B826ULL }, /* XSUM_XXH3_withSecret_testdata[3870] */\n    { 3871, 0x0000000000000000ULL, 0xC951CB98838C3165ULL }, /* XSUM_XXH3_withSecret_testdata[3871] */\n    { 3872, 0x0000000000000000ULL, 0x7084FDE99B988E35ULL }, /* XSUM_XXH3_withSecret_testdata[3872] */\n    { 3873, 0x0000000000000000ULL, 0x21BA5B9DE45DEA90ULL }, /* XSUM_XXH3_withSecret_testdata[3873] */\n    { 3874, 0x0000000000000000ULL, 0x9F1607F01961CB5EULL }, /* XSUM_XXH3_withSecret_testdata[3874] */\n    { 3875, 0x0000000000000000ULL, 0x5E21F010B693F7DDULL }, /* XSUM_XXH3_withSecret_testdata[3875] */\n    { 3876, 0x0000000000000000ULL, 0xFD7A548ABFE10CBAULL }, /* XSUM_XXH3_withSecret_testdata[3876] */\n    { 3877, 0x0000000000000000ULL, 0x0F73AD12D922EF01ULL }, /* XSUM_XXH3_withSecret_testdata[3877] */\n    { 3878, 0x0000000000000000ULL, 0x552A4D2349FD8930ULL }, /* XSUM_XXH3_withSecret_testdata[3878] */\n    { 3879, 0x0000000000000000ULL, 0x3ED45EF89DDD1BEFULL }, /* XSUM_XXH3_withSecret_testdata[3879] */\n    { 3880, 0x0000000000000000ULL, 0x3968D05D6F1D061AULL }, /* XSUM_XXH3_withSecret_testdata[3880] */\n    { 3881, 0x0000000000000000ULL, 0x3344DBEEB28A34BEULL }, /* XSUM_XXH3_withSecret_testdata[3881] */\n    { 3882, 0x0000000000000000ULL, 0x60AD1E4CB1E6BE07ULL }, /* XSUM_XXH3_withSecret_testdata[3882] */\n    { 3883, 0x0000000000000000ULL, 0x1B803BE7A6EE325DULL }, /* XSUM_XXH3_withSecret_testdata[3883] */\n    { 3884, 0x0000000000000000ULL, 0xD4999587BCC54BA7ULL }, /* XSUM_XXH3_withSecret_testdata[3884] */\n    { 3885, 0x0000000000000000ULL, 0x685F7F3FCEFC0BDAULL }, /* XSUM_XXH3_withSecret_testdata[3885] */\n    { 3886, 0x0000000000000000ULL, 0x6372BF182DC55808ULL }, /* XSUM_XXH3_withSecret_testdata[3886] */\n    { 3887, 0x0000000000000000ULL, 0x3156503EA20E4BCAULL }, /* XSUM_XXH3_withSecret_testdata[3887] */\n    { 3888, 0x0000000000000000ULL, 0xDA2C23CD9B86B7CDULL }, /* XSUM_XXH3_withSecret_testdata[3888] */\n    { 3889, 0x0000000000000000ULL, 0x7F5FAA17E5806167ULL }, /* XSUM_XXH3_withSecret_testdata[3889] */\n    { 3890, 0x0000000000000000ULL, 0xB1096B3D48C20008ULL }, /* XSUM_XXH3_withSecret_testdata[3890] */\n    { 3891, 0x0000000000000000ULL, 0x4AD5418DD0EAC137ULL }, /* XSUM_XXH3_withSecret_testdata[3891] */\n    { 3892, 0x0000000000000000ULL, 0x466D3013825AE37CULL }, /* XSUM_XXH3_withSecret_testdata[3892] */\n    { 3893, 0x0000000000000000ULL, 0x042F95B677AB0DD5ULL }, /* XSUM_XXH3_withSecret_testdata[3893] */\n    { 3894, 0x0000000000000000ULL, 0xEA13C83EFEF8A615ULL }, /* XSUM_XXH3_withSecret_testdata[3894] */\n    { 3895, 0x0000000000000000ULL, 0x9E4A0F97E8D5666EULL }, /* XSUM_XXH3_withSecret_testdata[3895] */\n    { 3896, 0x0000000000000000ULL, 0x0D80D8CCE3ED4C48ULL }, /* XSUM_XXH3_withSecret_testdata[3896] */\n    { 3897, 0x0000000000000000ULL, 0xBF430BCD17E867B5ULL }, /* XSUM_XXH3_withSecret_testdata[3897] */\n    { 3898, 0x0000000000000000ULL, 0x9BB9BC9B675F788AULL }, /* XSUM_XXH3_withSecret_testdata[3898] */\n    { 3899, 0x0000000000000000ULL, 0x3774510B1E6E7F04ULL }, /* XSUM_XXH3_withSecret_testdata[3899] */\n    { 3900, 0x0000000000000000ULL, 0xDF7A7AD16BD22D35ULL }, /* XSUM_XXH3_withSecret_testdata[3900] */\n    { 3901, 0x0000000000000000ULL, 0x52B56258F36FB33DULL }, /* XSUM_XXH3_withSecret_testdata[3901] */\n    { 3902, 0x0000000000000000ULL, 0x0E1E913ADF08DF1FULL }, /* XSUM_XXH3_withSecret_testdata[3902] */\n    { 3903, 0x0000000000000000ULL, 0xB95B7C9F36356CD2ULL }, /* XSUM_XXH3_withSecret_testdata[3903] */\n    { 3904, 0x0000000000000000ULL, 0x1F90A3C3B9455555ULL }, /* XSUM_XXH3_withSecret_testdata[3904] */\n    { 3905, 0x0000000000000000ULL, 0x1DB6217A29421657ULL }, /* XSUM_XXH3_withSecret_testdata[3905] */\n    { 3906, 0x0000000000000000ULL, 0x5E1883B8DBCDBF1FULL }, /* XSUM_XXH3_withSecret_testdata[3906] */\n    { 3907, 0x0000000000000000ULL, 0x90C2FA82176C1BE2ULL }, /* XSUM_XXH3_withSecret_testdata[3907] */\n    { 3908, 0x0000000000000000ULL, 0x3C4AB5B9A1BE2EAFULL }, /* XSUM_XXH3_withSecret_testdata[3908] */\n    { 3909, 0x0000000000000000ULL, 0x0C8A9C33F8C25C1FULL }, /* XSUM_XXH3_withSecret_testdata[3909] */\n    { 3910, 0x0000000000000000ULL, 0xE8440A7A4D68B7ABULL }, /* XSUM_XXH3_withSecret_testdata[3910] */\n    { 3911, 0x0000000000000000ULL, 0xC52FD58F9FC58964ULL }, /* XSUM_XXH3_withSecret_testdata[3911] */\n    { 3912, 0x0000000000000000ULL, 0x9EC76C894C62DE08ULL }, /* XSUM_XXH3_withSecret_testdata[3912] */\n    { 3913, 0x0000000000000000ULL, 0x767105D328069CE7ULL }, /* XSUM_XXH3_withSecret_testdata[3913] */\n    { 3914, 0x0000000000000000ULL, 0x52D4745EC61C14EBULL }, /* XSUM_XXH3_withSecret_testdata[3914] */\n    { 3915, 0x0000000000000000ULL, 0x1E67F6E12B7F93CEULL }, /* XSUM_XXH3_withSecret_testdata[3915] */\n    { 3916, 0x0000000000000000ULL, 0x9ABB0531A9D44411ULL }, /* XSUM_XXH3_withSecret_testdata[3916] */\n    { 3917, 0x0000000000000000ULL, 0x040C7F9A4964F3F0ULL }, /* XSUM_XXH3_withSecret_testdata[3917] */\n    { 3918, 0x0000000000000000ULL, 0x6E17312BA20C938CULL }, /* XSUM_XXH3_withSecret_testdata[3918] */\n    { 3919, 0x0000000000000000ULL, 0x7D4C56E59201E07AULL }, /* XSUM_XXH3_withSecret_testdata[3919] */\n    { 3920, 0x0000000000000000ULL, 0x394E53379B160483ULL }, /* XSUM_XXH3_withSecret_testdata[3920] */\n    { 3921, 0x0000000000000000ULL, 0x0A0B7FE58C246440ULL }, /* XSUM_XXH3_withSecret_testdata[3921] */\n    { 3922, 0x0000000000000000ULL, 0x9ABAD672A06F8EC3ULL }, /* XSUM_XXH3_withSecret_testdata[3922] */\n    { 3923, 0x0000000000000000ULL, 0xED7857BE50F696EEULL }, /* XSUM_XXH3_withSecret_testdata[3923] */\n    { 3924, 0x0000000000000000ULL, 0x5BCBD2C839AF6810ULL }, /* XSUM_XXH3_withSecret_testdata[3924] */\n    { 3925, 0x0000000000000000ULL, 0x44886BAE5A33F6BDULL }, /* XSUM_XXH3_withSecret_testdata[3925] */\n    { 3926, 0x0000000000000000ULL, 0x6A716B87F0459627ULL }, /* XSUM_XXH3_withSecret_testdata[3926] */\n    { 3927, 0x0000000000000000ULL, 0x88E0523327EBC31BULL }, /* XSUM_XXH3_withSecret_testdata[3927] */\n    { 3928, 0x0000000000000000ULL, 0x0A0C83F05753D320ULL }, /* XSUM_XXH3_withSecret_testdata[3928] */\n    { 3929, 0x0000000000000000ULL, 0xB5BD6EF42352751EULL }, /* XSUM_XXH3_withSecret_testdata[3929] */\n    { 3930, 0x0000000000000000ULL, 0xF1B64D06A9674EC5ULL }, /* XSUM_XXH3_withSecret_testdata[3930] */\n    { 3931, 0x0000000000000000ULL, 0x2B77BADB2628D036ULL }, /* XSUM_XXH3_withSecret_testdata[3931] */\n    { 3932, 0x0000000000000000ULL, 0x826F2F97D7BFD76CULL }, /* XSUM_XXH3_withSecret_testdata[3932] */\n    { 3933, 0x0000000000000000ULL, 0xD667DA118A339719ULL }, /* XSUM_XXH3_withSecret_testdata[3933] */\n    { 3934, 0x0000000000000000ULL, 0x501E1D45774C0E55ULL }, /* XSUM_XXH3_withSecret_testdata[3934] */\n    { 3935, 0x0000000000000000ULL, 0xE4A479DA36C1CAB8ULL }, /* XSUM_XXH3_withSecret_testdata[3935] */\n    { 3936, 0x0000000000000000ULL, 0x3B0D3D4D2725B066ULL }, /* XSUM_XXH3_withSecret_testdata[3936] */\n    { 3937, 0x0000000000000000ULL, 0x9E0C63E6BACFC21CULL }, /* XSUM_XXH3_withSecret_testdata[3937] */\n    { 3938, 0x0000000000000000ULL, 0x4CE6D62F07031DB7ULL }, /* XSUM_XXH3_withSecret_testdata[3938] */\n    { 3939, 0x0000000000000000ULL, 0x0F4BEBD8BB21E5F1ULL }, /* XSUM_XXH3_withSecret_testdata[3939] */\n    { 3940, 0x0000000000000000ULL, 0xB67EF66C05DD3737ULL }, /* XSUM_XXH3_withSecret_testdata[3940] */\n    { 3941, 0x0000000000000000ULL, 0x3E225CA0833C7B24ULL }, /* XSUM_XXH3_withSecret_testdata[3941] */\n    { 3942, 0x0000000000000000ULL, 0xEC16404F1138A509ULL }, /* XSUM_XXH3_withSecret_testdata[3942] */\n    { 3943, 0x0000000000000000ULL, 0xD09524AA524FC24FULL }, /* XSUM_XXH3_withSecret_testdata[3943] */\n    { 3944, 0x0000000000000000ULL, 0xA57072D294086351ULL }, /* XSUM_XXH3_withSecret_testdata[3944] */\n    { 3945, 0x0000000000000000ULL, 0xB11118C50C185FF3ULL }, /* XSUM_XXH3_withSecret_testdata[3945] */\n    { 3946, 0x0000000000000000ULL, 0x5FD78C944C803E26ULL }, /* XSUM_XXH3_withSecret_testdata[3946] */\n    { 3947, 0x0000000000000000ULL, 0xEDA8B44313DA978FULL }, /* XSUM_XXH3_withSecret_testdata[3947] */\n    { 3948, 0x0000000000000000ULL, 0x265E621233257D37ULL }, /* XSUM_XXH3_withSecret_testdata[3948] */\n    { 3949, 0x0000000000000000ULL, 0x4E37AACED239559CULL }, /* XSUM_XXH3_withSecret_testdata[3949] */\n    { 3950, 0x0000000000000000ULL, 0x1BEDAF55A1905256ULL }, /* XSUM_XXH3_withSecret_testdata[3950] */\n    { 3951, 0x0000000000000000ULL, 0x35B4561FC0AFF903ULL }, /* XSUM_XXH3_withSecret_testdata[3951] */\n    { 3952, 0x0000000000000000ULL, 0x2B2E8D7ED978BF9BULL }, /* XSUM_XXH3_withSecret_testdata[3952] */\n    { 3953, 0x0000000000000000ULL, 0x851B421178EE4DEAULL }, /* XSUM_XXH3_withSecret_testdata[3953] */\n    { 3954, 0x0000000000000000ULL, 0xAD11DBE6D67810CFULL }, /* XSUM_XXH3_withSecret_testdata[3954] */\n    { 3955, 0x0000000000000000ULL, 0x832EFB6BE76C4917ULL }, /* XSUM_XXH3_withSecret_testdata[3955] */\n    { 3956, 0x0000000000000000ULL, 0x5AF2B3FE52A9644FULL }, /* XSUM_XXH3_withSecret_testdata[3956] */\n    { 3957, 0x0000000000000000ULL, 0x99C4F79C46EEA142ULL }, /* XSUM_XXH3_withSecret_testdata[3957] */\n    { 3958, 0x0000000000000000ULL, 0x8DF60D6BF156B9D8ULL }, /* XSUM_XXH3_withSecret_testdata[3958] */\n    { 3959, 0x0000000000000000ULL, 0xD2140DF6D84FDBC9ULL }, /* XSUM_XXH3_withSecret_testdata[3959] */\n    { 3960, 0x0000000000000000ULL, 0xF1B421A351DEEB31ULL }, /* XSUM_XXH3_withSecret_testdata[3960] */\n    { 3961, 0x0000000000000000ULL, 0xA88741587B91149FULL }, /* XSUM_XXH3_withSecret_testdata[3961] */\n    { 3962, 0x0000000000000000ULL, 0x573F1EBA59887F2DULL }, /* XSUM_XXH3_withSecret_testdata[3962] */\n    { 3963, 0x0000000000000000ULL, 0x80673C41C8A6DECBULL }, /* XSUM_XXH3_withSecret_testdata[3963] */\n    { 3964, 0x0000000000000000ULL, 0x126388575C84BD3FULL }, /* XSUM_XXH3_withSecret_testdata[3964] */\n    { 3965, 0x0000000000000000ULL, 0xFF6FFD276118DD59ULL }, /* XSUM_XXH3_withSecret_testdata[3965] */\n    { 3966, 0x0000000000000000ULL, 0xE28FBC0EBC9EC543ULL }, /* XSUM_XXH3_withSecret_testdata[3966] */\n    { 3967, 0x0000000000000000ULL, 0x478D04F28282DD16ULL }, /* XSUM_XXH3_withSecret_testdata[3967] */\n    { 3968, 0x0000000000000000ULL, 0x39A88CC5AEB672C6ULL }, /* XSUM_XXH3_withSecret_testdata[3968] */\n    { 3969, 0x0000000000000000ULL, 0x753907B13FB656ADULL }, /* XSUM_XXH3_withSecret_testdata[3969] */\n    { 3970, 0x0000000000000000ULL, 0x8A86D19768F6F8B2ULL }, /* XSUM_XXH3_withSecret_testdata[3970] */\n    { 3971, 0x0000000000000000ULL, 0xEF27D20E3A59A265ULL }, /* XSUM_XXH3_withSecret_testdata[3971] */\n    { 3972, 0x0000000000000000ULL, 0x599785FBACD3F5B2ULL }, /* XSUM_XXH3_withSecret_testdata[3972] */\n    { 3973, 0x0000000000000000ULL, 0x5E120D059DF126DFULL }, /* XSUM_XXH3_withSecret_testdata[3973] */\n    { 3974, 0x0000000000000000ULL, 0x323341DA425D5971ULL }, /* XSUM_XXH3_withSecret_testdata[3974] */\n    { 3975, 0x0000000000000000ULL, 0x66E9ED33A0FE926AULL }, /* XSUM_XXH3_withSecret_testdata[3975] */\n    { 3976, 0x0000000000000000ULL, 0xDAEBE9F14941E4B1ULL }, /* XSUM_XXH3_withSecret_testdata[3976] */\n    { 3977, 0x0000000000000000ULL, 0x69CB9F838670B8DDULL }, /* XSUM_XXH3_withSecret_testdata[3977] */\n    { 3978, 0x0000000000000000ULL, 0x1A230CA712BE6276ULL }, /* XSUM_XXH3_withSecret_testdata[3978] */\n    { 3979, 0x0000000000000000ULL, 0x1F1D2458C37728AFULL }, /* XSUM_XXH3_withSecret_testdata[3979] */\n    { 3980, 0x0000000000000000ULL, 0x6F1E017185E5AD9FULL }, /* XSUM_XXH3_withSecret_testdata[3980] */\n    { 3981, 0x0000000000000000ULL, 0x58DC29264CBBA138ULL }, /* XSUM_XXH3_withSecret_testdata[3981] */\n    { 3982, 0x0000000000000000ULL, 0x69BCCDFF30E140B3ULL }, /* XSUM_XXH3_withSecret_testdata[3982] */\n    { 3983, 0x0000000000000000ULL, 0xD4956F25E5E7F77BULL }, /* XSUM_XXH3_withSecret_testdata[3983] */\n    { 3984, 0x0000000000000000ULL, 0x61516A317A9423E3ULL }, /* XSUM_XXH3_withSecret_testdata[3984] */\n    { 3985, 0x0000000000000000ULL, 0x3CA5AD0A3FDE38FFULL }, /* XSUM_XXH3_withSecret_testdata[3985] */\n    { 3986, 0x0000000000000000ULL, 0xDC0FE42917D33C1CULL }, /* XSUM_XXH3_withSecret_testdata[3986] */\n    { 3987, 0x0000000000000000ULL, 0x552B5DD320E034F6ULL }, /* XSUM_XXH3_withSecret_testdata[3987] */\n    { 3988, 0x0000000000000000ULL, 0xB4D0495D78EB47F6ULL }, /* XSUM_XXH3_withSecret_testdata[3988] */\n    { 3989, 0x0000000000000000ULL, 0xD99543CC2F1660B2ULL }, /* XSUM_XXH3_withSecret_testdata[3989] */\n    { 3990, 0x0000000000000000ULL, 0x1D7E294B3E7BF0D5ULL }, /* XSUM_XXH3_withSecret_testdata[3990] */\n    { 3991, 0x0000000000000000ULL, 0x7FC8297D93F7C81FULL }, /* XSUM_XXH3_withSecret_testdata[3991] */\n    { 3992, 0x0000000000000000ULL, 0xB417170FF1E42E8DULL }, /* XSUM_XXH3_withSecret_testdata[3992] */\n    { 3993, 0x0000000000000000ULL, 0xFF8DDA8ADF2B6642ULL }, /* XSUM_XXH3_withSecret_testdata[3993] */\n    { 3994, 0x0000000000000000ULL, 0x08147B80B15B89FCULL }, /* XSUM_XXH3_withSecret_testdata[3994] */\n    { 3995, 0x0000000000000000ULL, 0x33ABD4C640F5BDC3ULL }, /* XSUM_XXH3_withSecret_testdata[3995] */\n    { 3996, 0x0000000000000000ULL, 0x1A11C60C3BA5BEB4ULL }, /* XSUM_XXH3_withSecret_testdata[3996] */\n    { 3997, 0x0000000000000000ULL, 0x9B9A5C7F0E7DF4EEULL }, /* XSUM_XXH3_withSecret_testdata[3997] */\n    { 3998, 0x0000000000000000ULL, 0x9ADE7A91058E6D7DULL }, /* XSUM_XXH3_withSecret_testdata[3998] */\n    { 3999, 0x0000000000000000ULL, 0x57F0B9FB8739989AULL }, /* XSUM_XXH3_withSecret_testdata[3999] */\n    { 4000, 0x0000000000000000ULL, 0xE184CBF1E98AD05EULL }, /* XSUM_XXH3_withSecret_testdata[4000] */\n    { 4001, 0x0000000000000000ULL, 0xE85B45D7683D9CE0ULL }, /* XSUM_XXH3_withSecret_testdata[4001] */\n    { 4002, 0x0000000000000000ULL, 0x074A0C2BAB5E950BULL }, /* XSUM_XXH3_withSecret_testdata[4002] */\n    { 4003, 0x0000000000000000ULL, 0xADABC1ADBC07D3AAULL }, /* XSUM_XXH3_withSecret_testdata[4003] */\n    { 4004, 0x0000000000000000ULL, 0xFCEC87DD9320E9EAULL }, /* XSUM_XXH3_withSecret_testdata[4004] */\n    { 4005, 0x0000000000000000ULL, 0x48BCD4503CB02471ULL }, /* XSUM_XXH3_withSecret_testdata[4005] */\n    { 4006, 0x0000000000000000ULL, 0x830D0A44B28510BDULL }, /* XSUM_XXH3_withSecret_testdata[4006] */\n    { 4007, 0x0000000000000000ULL, 0xD5F28186C763F8E7ULL }, /* XSUM_XXH3_withSecret_testdata[4007] */\n    { 4008, 0x0000000000000000ULL, 0xDF89B3916F9E329CULL }, /* XSUM_XXH3_withSecret_testdata[4008] */\n    { 4009, 0x0000000000000000ULL, 0xA77D92102028B930ULL }, /* XSUM_XXH3_withSecret_testdata[4009] */\n    { 4010, 0x0000000000000000ULL, 0x0907F224A3DB335FULL }, /* XSUM_XXH3_withSecret_testdata[4010] */\n    { 4011, 0x0000000000000000ULL, 0x39257686BB9BD6DBULL }, /* XSUM_XXH3_withSecret_testdata[4011] */\n    { 4012, 0x0000000000000000ULL, 0x1908A83C25A09B3EULL }, /* XSUM_XXH3_withSecret_testdata[4012] */\n    { 4013, 0x0000000000000000ULL, 0x1C228F0313F05621ULL }, /* XSUM_XXH3_withSecret_testdata[4013] */\n    { 4014, 0x0000000000000000ULL, 0xD29D4BB6C83B212FULL }, /* XSUM_XXH3_withSecret_testdata[4014] */\n    { 4015, 0x0000000000000000ULL, 0xA4EF22E7990EFCDCULL }, /* XSUM_XXH3_withSecret_testdata[4015] */\n    { 4016, 0x0000000000000000ULL, 0x10DC31A45CECDF06ULL }, /* XSUM_XXH3_withSecret_testdata[4016] */\n    { 4017, 0x0000000000000000ULL, 0xF8EC25F1FB6A58B9ULL }, /* XSUM_XXH3_withSecret_testdata[4017] */\n    { 4018, 0x0000000000000000ULL, 0xF7DA74361E4E6608ULL }, /* XSUM_XXH3_withSecret_testdata[4018] */\n    { 4019, 0x0000000000000000ULL, 0xE0D78070D8474ECDULL }, /* XSUM_XXH3_withSecret_testdata[4019] */\n    { 4020, 0x0000000000000000ULL, 0xD006A9834E2719CEULL }, /* XSUM_XXH3_withSecret_testdata[4020] */\n    { 4021, 0x0000000000000000ULL, 0x4B4D94054CEA6E1FULL }, /* XSUM_XXH3_withSecret_testdata[4021] */\n    { 4022, 0x0000000000000000ULL, 0x765FBFBA601A57BDULL }, /* XSUM_XXH3_withSecret_testdata[4022] */\n    { 4023, 0x0000000000000000ULL, 0xFBB6F86EFDEBC52DULL }, /* XSUM_XXH3_withSecret_testdata[4023] */\n    { 4024, 0x0000000000000000ULL, 0x82166375EA042B26ULL }, /* XSUM_XXH3_withSecret_testdata[4024] */\n    { 4025, 0x0000000000000000ULL, 0xEF3FEB717072EE91ULL }, /* XSUM_XXH3_withSecret_testdata[4025] */\n    { 4026, 0x0000000000000000ULL, 0x2DD6C3FBE072545BULL }, /* XSUM_XXH3_withSecret_testdata[4026] */\n    { 4027, 0x0000000000000000ULL, 0x6A2FDD401C94D1EBULL }, /* XSUM_XXH3_withSecret_testdata[4027] */\n    { 4028, 0x0000000000000000ULL, 0x18136EE230F0BE7DULL }, /* XSUM_XXH3_withSecret_testdata[4028] */\n    { 4029, 0x0000000000000000ULL, 0x69A9A1CF3A907C8FULL }, /* XSUM_XXH3_withSecret_testdata[4029] */\n    { 4030, 0x0000000000000000ULL, 0x74C1650BE5290626ULL }, /* XSUM_XXH3_withSecret_testdata[4030] */\n    { 4031, 0x0000000000000000ULL, 0x3C4D733B3DC00870ULL }, /* XSUM_XXH3_withSecret_testdata[4031] */\n    { 4032, 0x0000000000000000ULL, 0x695ACEBA82CCE59CULL }, /* XSUM_XXH3_withSecret_testdata[4032] */\n    { 4033, 0x0000000000000000ULL, 0x19533A9067D621E1ULL }, /* XSUM_XXH3_withSecret_testdata[4033] */\n    { 4034, 0x0000000000000000ULL, 0x7E43CBAE4E42C1FBULL }, /* XSUM_XXH3_withSecret_testdata[4034] */\n    { 4035, 0x0000000000000000ULL, 0xA0A7A7857C8B5B01ULL }, /* XSUM_XXH3_withSecret_testdata[4035] */\n    { 4036, 0x0000000000000000ULL, 0x92F3BA8EE6DF084BULL }, /* XSUM_XXH3_withSecret_testdata[4036] */\n    { 4037, 0x0000000000000000ULL, 0xAA7D2A090985E856ULL }, /* XSUM_XXH3_withSecret_testdata[4037] */\n    { 4038, 0x0000000000000000ULL, 0xCE5E19CA0ACE70AAULL }, /* XSUM_XXH3_withSecret_testdata[4038] */\n    { 4039, 0x0000000000000000ULL, 0x6A0DB81389E7EB64ULL }, /* XSUM_XXH3_withSecret_testdata[4039] */\n    { 4040, 0x0000000000000000ULL, 0x1C428423E92CB936ULL }, /* XSUM_XXH3_withSecret_testdata[4040] */\n    { 4041, 0x0000000000000000ULL, 0x2E94046589D1E6FDULL }, /* XSUM_XXH3_withSecret_testdata[4041] */\n    { 4042, 0x0000000000000000ULL, 0x593811EB10E67DE3ULL }, /* XSUM_XXH3_withSecret_testdata[4042] */\n    { 4043, 0x0000000000000000ULL, 0xB2D714E38B1E1C8EULL }, /* XSUM_XXH3_withSecret_testdata[4043] */\n    { 4044, 0x0000000000000000ULL, 0x9DD048F3866DAC6FULL }, /* XSUM_XXH3_withSecret_testdata[4044] */\n    { 4045, 0x0000000000000000ULL, 0x320CD8D172089096ULL }, /* XSUM_XXH3_withSecret_testdata[4045] */\n    { 4046, 0x0000000000000000ULL, 0x2A29BF44AF69A300ULL }, /* XSUM_XXH3_withSecret_testdata[4046] */\n    { 4047, 0x0000000000000000ULL, 0xC3D96538AD370D5EULL }, /* XSUM_XXH3_withSecret_testdata[4047] */\n    { 4048, 0x0000000000000000ULL, 0xE659FE2A37FDB433ULL }, /* XSUM_XXH3_withSecret_testdata[4048] */\n    { 4049, 0x0000000000000000ULL, 0xD66D84E01673DF06ULL }, /* XSUM_XXH3_withSecret_testdata[4049] */\n    { 4050, 0x0000000000000000ULL, 0xCFC21220DEA96813ULL }, /* XSUM_XXH3_withSecret_testdata[4050] */\n    { 4051, 0x0000000000000000ULL, 0x2EC201721E40001FULL }, /* XSUM_XXH3_withSecret_testdata[4051] */\n    { 4052, 0x0000000000000000ULL, 0xE5255D2DC8B240B6ULL }, /* XSUM_XXH3_withSecret_testdata[4052] */\n    { 4053, 0x0000000000000000ULL, 0x4444D1FC699709E0ULL }, /* XSUM_XXH3_withSecret_testdata[4053] */\n    { 4054, 0x0000000000000000ULL, 0xCD5F6DB7C0C22D88ULL }, /* XSUM_XXH3_withSecret_testdata[4054] */\n    { 4055, 0x0000000000000000ULL, 0x97C72BF132FC429AULL }, /* XSUM_XXH3_withSecret_testdata[4055] */\n    { 4056, 0x0000000000000000ULL, 0xF18A47875C8FDC63ULL }, /* XSUM_XXH3_withSecret_testdata[4056] */\n    { 4057, 0x0000000000000000ULL, 0x11A76F8B731BE563ULL }, /* XSUM_XXH3_withSecret_testdata[4057] */\n    { 4058, 0x0000000000000000ULL, 0xDA3D9AC8AC1BC359ULL }, /* XSUM_XXH3_withSecret_testdata[4058] */\n    { 4059, 0x0000000000000000ULL, 0xD050D2E1C6187F83ULL }, /* XSUM_XXH3_withSecret_testdata[4059] */\n    { 4060, 0x0000000000000000ULL, 0xA2B9C98FF937B9F2ULL }, /* XSUM_XXH3_withSecret_testdata[4060] */\n    { 4061, 0x0000000000000000ULL, 0xE824E15F45FCE2DFULL }, /* XSUM_XXH3_withSecret_testdata[4061] */\n    { 4062, 0x0000000000000000ULL, 0xF46BF3281D9C12CBULL }, /* XSUM_XXH3_withSecret_testdata[4062] */\n    { 4063, 0x0000000000000000ULL, 0xBA926F8C9CACD028ULL }, /* XSUM_XXH3_withSecret_testdata[4063] */\n    { 4064, 0x0000000000000000ULL, 0x974C54681B33886CULL }, /* XSUM_XXH3_withSecret_testdata[4064] */\n    { 4065, 0x0000000000000000ULL, 0x2A95F80B0C3CCCB1ULL }, /* XSUM_XXH3_withSecret_testdata[4065] */\n    { 4066, 0x0000000000000000ULL, 0x43B843C1A74C8DFAULL }, /* XSUM_XXH3_withSecret_testdata[4066] */\n    { 4067, 0x0000000000000000ULL, 0x32534850ECCF80FEULL }, /* XSUM_XXH3_withSecret_testdata[4067] */\n    { 4068, 0x0000000000000000ULL, 0xAD4E9636F7F31E69ULL }, /* XSUM_XXH3_withSecret_testdata[4068] */\n    { 4069, 0x0000000000000000ULL, 0xCD00CB1BE568FDE6ULL }, /* XSUM_XXH3_withSecret_testdata[4069] */\n    { 4070, 0x0000000000000000ULL, 0xE46940245DBB7272ULL }, /* XSUM_XXH3_withSecret_testdata[4070] */\n    { 4071, 0x0000000000000000ULL, 0x13D146F7570C6044ULL }, /* XSUM_XXH3_withSecret_testdata[4071] */\n    { 4072, 0x0000000000000000ULL, 0x7A956B6CB3576E14ULL }, /* XSUM_XXH3_withSecret_testdata[4072] */\n    { 4073, 0x0000000000000000ULL, 0xEC83FCBD3ACF3B26ULL }, /* XSUM_XXH3_withSecret_testdata[4073] */\n    { 4074, 0x0000000000000000ULL, 0x16AC17FD7088386EULL }, /* XSUM_XXH3_withSecret_testdata[4074] */\n    { 4075, 0x0000000000000000ULL, 0x83F54BB36686D6D9ULL }, /* XSUM_XXH3_withSecret_testdata[4075] */\n    { 4076, 0x0000000000000000ULL, 0xBE63E230272CA46AULL }, /* XSUM_XXH3_withSecret_testdata[4076] */\n    { 4077, 0x0000000000000000ULL, 0x28E6AEE6ACB9630BULL }, /* XSUM_XXH3_withSecret_testdata[4077] */\n    { 4078, 0x0000000000000000ULL, 0x1F9D0601A901C88BULL }, /* XSUM_XXH3_withSecret_testdata[4078] */\n    { 4079, 0x0000000000000000ULL, 0xAE20E4E718E23A10ULL }, /* XSUM_XXH3_withSecret_testdata[4079] */\n    { 4080, 0x0000000000000000ULL, 0xB25FC769707558F5ULL }, /* XSUM_XXH3_withSecret_testdata[4080] */\n    { 4081, 0x0000000000000000ULL, 0x1A21C8D19774A134ULL }, /* XSUM_XXH3_withSecret_testdata[4081] */\n    { 4082, 0x0000000000000000ULL, 0xED0038B9B1E99BCEULL }, /* XSUM_XXH3_withSecret_testdata[4082] */\n    { 4083, 0x0000000000000000ULL, 0x277C62825BFD4071ULL }, /* XSUM_XXH3_withSecret_testdata[4083] */\n    { 4084, 0x0000000000000000ULL, 0x02F57766E9409B19ULL }, /* XSUM_XXH3_withSecret_testdata[4084] */\n    { 4085, 0x0000000000000000ULL, 0xD7C6EF5A72071921ULL }, /* XSUM_XXH3_withSecret_testdata[4085] */\n    { 4086, 0x0000000000000000ULL, 0x83615114B601772EULL }, /* XSUM_XXH3_withSecret_testdata[4086] */\n    { 4087, 0x0000000000000000ULL, 0x625139954D12967FULL }, /* XSUM_XXH3_withSecret_testdata[4087] */\n    { 4088, 0x0000000000000000ULL, 0x20260B56D71BD17AULL }, /* XSUM_XXH3_withSecret_testdata[4088] */\n    { 4089, 0x0000000000000000ULL, 0x3ED7823D39AA50A9ULL }, /* XSUM_XXH3_withSecret_testdata[4089] */\n    { 4090, 0x0000000000000000ULL, 0xDEEB68EC8D3B620DULL }, /* XSUM_XXH3_withSecret_testdata[4090] */\n    { 4091, 0x0000000000000000ULL, 0xC043260D09205B7DULL }, /* XSUM_XXH3_withSecret_testdata[4091] */\n    { 4092, 0x0000000000000000ULL, 0xAC6A09090419D299ULL }, /* XSUM_XXH3_withSecret_testdata[4092] */\n    { 4093, 0x0000000000000000ULL, 0xC338BC98DE2FD265ULL }, /* XSUM_XXH3_withSecret_testdata[4093] */\n    { 4094, 0x0000000000000000ULL, 0x552205B28FB1448FULL }, /* XSUM_XXH3_withSecret_testdata[4094] */\n    { 4095, 0x0000000000000000ULL, 0xC2D888327F91A534ULL }, /* XSUM_XXH3_withSecret_testdata[4095] */\n    { 4096, 0x0000000000000000ULL, 0x80C043073074A679ULL }, /* XSUM_XXH3_withSecret_testdata[4096] */\n    { 4097, 0x0000000000000000ULL, 0x365C254DC189E688ULL }, /* XSUM_XXH3_withSecret_testdata[4097] */\n    { 4098, 0x0000000000000000ULL, 0x6E28FBB5DC82753AULL }, /* XSUM_XXH3_withSecret_testdata[4098] */\n    { 4099, 0x0000000000000000ULL, 0x1647C7E776D79A08ULL }, /* XSUM_XXH3_withSecret_testdata[4099] */\n    { 4100, 0x0000000000000000ULL, 0x75C6ED860F1F0A29ULL }, /* XSUM_XXH3_withSecret_testdata[4100] */\n    { 4101, 0x0000000000000000ULL, 0x9E4E03BED42CA656ULL }, /* XSUM_XXH3_withSecret_testdata[4101] */\n    { 4102, 0x0000000000000000ULL, 0xAA5368B6B20CA18AULL }, /* XSUM_XXH3_withSecret_testdata[4102] */\n    { 4103, 0x0000000000000000ULL, 0xE98606A8E305E53BULL }, /* XSUM_XXH3_withSecret_testdata[4103] */\n    { 4104, 0x0000000000000000ULL, 0x227F43A44EABCF0BULL }, /* XSUM_XXH3_withSecret_testdata[4104] */\n    { 4105, 0x0000000000000000ULL, 0x045E5F690BAE4E7BULL }, /* XSUM_XXH3_withSecret_testdata[4105] */\n    { 4106, 0x0000000000000000ULL, 0x0A17834E8D0D9A22ULL }, /* XSUM_XXH3_withSecret_testdata[4106] */\n    { 4107, 0x0000000000000000ULL, 0x3637F62A915BEA14ULL }, /* XSUM_XXH3_withSecret_testdata[4107] */\n    { 4108, 0x0000000000000000ULL, 0xCE88302E57251D0CULL }, /* XSUM_XXH3_withSecret_testdata[4108] */\n    { 4109, 0x0000000000000000ULL, 0xE4BE4F80013DBAE0ULL }, /* XSUM_XXH3_withSecret_testdata[4109] */\n    { 4110, 0x0000000000000000ULL, 0x6F1CF2ACD36F6174ULL }, /* XSUM_XXH3_withSecret_testdata[4110] */\n    { 4111, 0x0000000000000000ULL, 0x187CFF657B38CAEEULL }, /* XSUM_XXH3_withSecret_testdata[4111] */\n    { 4112, 0x0000000000000000ULL, 0xB7875A044BFBAF6FULL }, /* XSUM_XXH3_withSecret_testdata[4112] */\n    { 4113, 0x0000000000000000ULL, 0xAE64B4E0AA6D9082ULL }, /* XSUM_XXH3_withSecret_testdata[4113] */\n    { 4114, 0x0000000000000000ULL, 0xB9AC502202937977ULL }, /* XSUM_XXH3_withSecret_testdata[4114] */\n    { 4115, 0x0000000000000000ULL, 0x1E32D6F34229408EULL }, /* XSUM_XXH3_withSecret_testdata[4115] */\n    { 4116, 0x0000000000000000ULL, 0x96C8D36AFC955CF6ULL }, /* XSUM_XXH3_withSecret_testdata[4116] */\n    { 4117, 0x0000000000000000ULL, 0x8087ABF9BDAD6C57ULL }, /* XSUM_XXH3_withSecret_testdata[4117] */\n    { 4118, 0x0000000000000000ULL, 0xDB5EDE0ED22BF4BFULL }, /* XSUM_XXH3_withSecret_testdata[4118] */\n    { 4119, 0x0000000000000000ULL, 0xCC01A835D3DE330DULL }, /* XSUM_XXH3_withSecret_testdata[4119] */\n    { 4120, 0x0000000000000000ULL, 0x25A2490F71CC7B71ULL }, /* XSUM_XXH3_withSecret_testdata[4120] */\n    { 4121, 0x0000000000000000ULL, 0xEDF7047605F28040ULL }, /* XSUM_XXH3_withSecret_testdata[4121] */\n    { 4122, 0x0000000000000000ULL, 0x18AC9AC377A0EFC3ULL }, /* XSUM_XXH3_withSecret_testdata[4122] */\n    { 4123, 0x0000000000000000ULL, 0xBC2DF7ABA89807A3ULL }, /* XSUM_XXH3_withSecret_testdata[4123] */\n    { 4124, 0x0000000000000000ULL, 0x0E9843295ABA9534ULL }, /* XSUM_XXH3_withSecret_testdata[4124] */\n    { 4125, 0x0000000000000000ULL, 0xF63369AFF35C62A8ULL }, /* XSUM_XXH3_withSecret_testdata[4125] */\n    { 4126, 0x0000000000000000ULL, 0x144948966B9E5FB3ULL }, /* XSUM_XXH3_withSecret_testdata[4126] */\n    { 4127, 0x0000000000000000ULL, 0xFC3E5F7090065C0BULL }, /* XSUM_XXH3_withSecret_testdata[4127] */\n    { 4128, 0x0000000000000000ULL, 0x8764A90EAD5AAA4BULL }, /* XSUM_XXH3_withSecret_testdata[4128] */\n    { 4129, 0x0000000000000000ULL, 0x49037C823D75F316ULL }, /* XSUM_XXH3_withSecret_testdata[4129] */\n    { 4130, 0x0000000000000000ULL, 0xB7B87312F9AA9E2FULL }, /* XSUM_XXH3_withSecret_testdata[4130] */\n    { 4131, 0x0000000000000000ULL, 0x5A0216171E94CA70ULL }, /* XSUM_XXH3_withSecret_testdata[4131] */\n    { 4132, 0x0000000000000000ULL, 0x71B88242877B00CFULL }, /* XSUM_XXH3_withSecret_testdata[4132] */\n    { 4133, 0x0000000000000000ULL, 0x933452561A285618ULL }, /* XSUM_XXH3_withSecret_testdata[4133] */\n    { 4134, 0x0000000000000000ULL, 0xADC07705C8ECACF8ULL }, /* XSUM_XXH3_withSecret_testdata[4134] */\n    { 4135, 0x0000000000000000ULL, 0xDFE8C72B4BB06B17ULL }, /* XSUM_XXH3_withSecret_testdata[4135] */\n    { 4136, 0x0000000000000000ULL, 0xB494370C708119B7ULL }, /* XSUM_XXH3_withSecret_testdata[4136] */\n    { 4137, 0x0000000000000000ULL, 0x2521A15362F39765ULL }, /* XSUM_XXH3_withSecret_testdata[4137] */\n    { 4138, 0x0000000000000000ULL, 0xDA6491BE0377B78AULL }, /* XSUM_XXH3_withSecret_testdata[4138] */\n    { 4139, 0x0000000000000000ULL, 0xDDE3551DA0B0B16FULL }, /* XSUM_XXH3_withSecret_testdata[4139] */\n    { 4140, 0x0000000000000000ULL, 0x66EEEBDF6FBE67B5ULL }, /* XSUM_XXH3_withSecret_testdata[4140] */\n    { 4141, 0x0000000000000000ULL, 0xF69061DEB5B18F0DULL }, /* XSUM_XXH3_withSecret_testdata[4141] */\n    { 4142, 0x0000000000000000ULL, 0xEC0E8775C7613779ULL }, /* XSUM_XXH3_withSecret_testdata[4142] */\n    { 4143, 0x0000000000000000ULL, 0x1F46C226E82FC9A4ULL }, /* XSUM_XXH3_withSecret_testdata[4143] */\n    { 4144, 0x0000000000000000ULL, 0x11370EF7CCBDF4C2ULL }, /* XSUM_XXH3_withSecret_testdata[4144] */\n    { 4145, 0x0000000000000000ULL, 0x7CC7E7A1BE2D8411ULL }, /* XSUM_XXH3_withSecret_testdata[4145] */\n    { 4146, 0x0000000000000000ULL, 0xBA101C10F3ED8F3BULL }, /* XSUM_XXH3_withSecret_testdata[4146] */\n    { 4147, 0x0000000000000000ULL, 0x9927A22BB5DEF0F1ULL }, /* XSUM_XXH3_withSecret_testdata[4147] */\n    { 4148, 0x0000000000000000ULL, 0x77B2C7E8C3F7816DULL }, /* XSUM_XXH3_withSecret_testdata[4148] */\n    { 4149, 0x0000000000000000ULL, 0x04ED012D897B2195ULL }, /* XSUM_XXH3_withSecret_testdata[4149] */\n    { 4150, 0x0000000000000000ULL, 0x6815B6C81F5C6E09ULL }, /* XSUM_XXH3_withSecret_testdata[4150] */\n    { 4151, 0x0000000000000000ULL, 0xB7C436CAA4DAE17CULL }, /* XSUM_XXH3_withSecret_testdata[4151] */\n    { 4152, 0x0000000000000000ULL, 0x86D16BB9CECD85DEULL }, /* XSUM_XXH3_withSecret_testdata[4152] */\n    { 4153, 0x0000000000000000ULL, 0x4C0AF3A16D2D68D9ULL }, /* XSUM_XXH3_withSecret_testdata[4153] */\n    { 4154, 0x0000000000000000ULL, 0x93C1EDFD5C9BE932ULL }, /* XSUM_XXH3_withSecret_testdata[4154] */\n    { 4155, 0x0000000000000000ULL, 0xB6E82601450A902AULL }, /* XSUM_XXH3_withSecret_testdata[4155] */\n    { 4156, 0x0000000000000000ULL, 0x1A27D4B001A828A1ULL }, /* XSUM_XXH3_withSecret_testdata[4156] */\n    { 4157, 0x0000000000000000ULL, 0xC234BC46C88914E8ULL }, /* XSUM_XXH3_withSecret_testdata[4157] */\n    { 4158, 0x0000000000000000ULL, 0x6DEB5E1719BA9E57ULL }, /* XSUM_XXH3_withSecret_testdata[4158] */\n    { 4159, 0x0000000000000000ULL, 0xB12AB27B68460462ULL }, /* XSUM_XXH3_withSecret_testdata[4159] */\n    { 4160, 0x0000000000000000ULL, 0x7CD56BF8CB910475ULL }, /* XSUM_XXH3_withSecret_testdata[4160] */\n};\nstatic const XSUM_testdata128_t XSUM_XXH128_testdata[] = {\n    {    0, 0x0000000000000000ULL, { 0x6001C324468D497FULL, 0x99AA06D3014798D8ULL } }, /* XSUM_XXH128_testdata[0] */\n    {    0, 0x000000009E3779B1ULL, { 0x5444F7869C671AB0ULL, 0x92220AE55E14AB50ULL } }, /* XSUM_XXH128_testdata[1] */\n    {    0, 0x9E3779B185EBCA8DULL, { 0xA986DFC5D7605BFEULL, 0x00FEAA732A3CE25EULL } }, /* XSUM_XXH128_testdata[2] */\n    {    1, 0x0000000000000000ULL, { 0xC44BDFF4074EECDBULL, 0xA6CD5E9392000F6AULL } }, /* XSUM_XXH128_testdata[3] */\n    {    1, 0x000000009E3779B1ULL, { 0xB53D5557E7F76F8DULL, 0x89B99554BA22467CULL } }, /* XSUM_XXH128_testdata[4] */\n    {    1, 0x9E3779B185EBCA8DULL, { 0x032BE332DD766EF8ULL, 0x20E49ABCC53B3842ULL } }, /* XSUM_XXH128_testdata[5] */\n    {    2, 0x0000000000000000ULL, { 0x7A9978044CB8A8BBULL, 0x76750C3C7BF95668ULL } }, /* XSUM_XXH128_testdata[6] */\n    {    2, 0x000000009E3779B1ULL, { 0x8295910C7638B180ULL, 0x8B75A791EC034873ULL } }, /* XSUM_XXH128_testdata[7] */\n    {    2, 0x9E3779B185EBCA8DULL, { 0x764B35C90519AD88ULL, 0x7B96E6A600DAE67DULL } }, /* XSUM_XXH128_testdata[8] */\n    {    3, 0x0000000000000000ULL, { 0x54247382A8D6B94DULL, 0x20EFC49FF02422EAULL } }, /* XSUM_XXH128_testdata[9] */\n    {    3, 0x000000009E3779B1ULL, { 0xF173D14DAD53A5DCULL, 0x48F82C2FE0ABD468ULL } }, /* XSUM_XXH128_testdata[10] */\n    {    3, 0x9E3779B185EBCA8DULL, { 0x634B8990B4976373ULL, 0x1C7ECF6A308CF00EULL } }, /* XSUM_XXH128_testdata[11] */\n    {    4, 0x0000000000000000ULL, { 0x2E7D8D6876A39FE9ULL, 0x970D585AC632BF8EULL } }, /* XSUM_XXH128_testdata[12] */\n    {    4, 0x000000009E3779B1ULL, { 0xEF78D5C489CFE10BULL, 0x7170492A2AA08992ULL } }, /* XSUM_XXH128_testdata[13] */\n    {    4, 0x9E3779B185EBCA8DULL, { 0xBFAF51F1E67E0B0FULL, 0x3D53E5DFD837D927ULL } }, /* XSUM_XXH128_testdata[14] */\n    {    5, 0x0000000000000000ULL, { 0x057C7ED2C01FA1D1ULL, 0x62ED587687606B4EULL } }, /* XSUM_XXH128_testdata[15] */\n    {    5, 0x000000009E3779B1ULL, { 0xB1939271FE533C42ULL, 0xB36459AEB18B9C2AULL } }, /* XSUM_XXH128_testdata[16] */\n    {    5, 0x9E3779B185EBCA8DULL, { 0x67A0C170D32090D7ULL, 0xFAC738E8FEC37715ULL } }, /* XSUM_XXH128_testdata[17] */\n    {    6, 0x0000000000000000ULL, { 0x3E7039BDDA43CFC6ULL, 0x082AFE0B8162D12AULL } }, /* XSUM_XXH128_testdata[18] */\n    {    6, 0x000000009E3779B1ULL, { 0x269D8F70BE98856EULL, 0x5A865B5389ABD2B1ULL } }, /* XSUM_XXH128_testdata[19] */\n    {    6, 0x9E3779B185EBCA8DULL, { 0xC5B54D56038E4E40ULL, 0x014BD95A51CA5DDBULL } }, /* XSUM_XXH128_testdata[20] */\n    {    7, 0x0000000000000000ULL, { 0x081C22DD284A2F0AULL, 0xDD9B6039F79EC416ULL } }, /* XSUM_XXH128_testdata[21] */\n    {    7, 0x000000009E3779B1ULL, { 0x8BB545DD2D2C9C7AULL, 0x0BF1BE779AAC3093ULL } }, /* XSUM_XXH128_testdata[22] */\n    {    7, 0x9E3779B185EBCA8DULL, { 0xD5DA197923938E53ULL, 0x833CBA0282DD6619ULL } }, /* XSUM_XXH128_testdata[23] */\n    {    8, 0x0000000000000000ULL, { 0x64C69CAB4BB21DC5ULL, 0x47A7F080D82BB456ULL } }, /* XSUM_XXH128_testdata[24] */\n    {    8, 0x000000009E3779B1ULL, { 0x5F462F3DE2E8B940ULL, 0xF959013232655FF1ULL } }, /* XSUM_XXH128_testdata[25] */\n    {    8, 0x9E3779B185EBCA8DULL, { 0x7B29471DC729B5FFULL, 0xF50CEC145BCD5C5AULL } }, /* XSUM_XXH128_testdata[26] */\n    {    9, 0x0000000000000000ULL, { 0xED7CCBC501EB7501ULL, 0x564EF6078950D457ULL } }, /* XSUM_XXH128_testdata[27] */\n    {    9, 0x000000009E3779B1ULL, { 0x07DE00B45EEE033AULL, 0x75FB6D1BD353B45CULL } }, /* XSUM_XXH128_testdata[28] */\n    {    9, 0x9E3779B185EBCA8DULL, { 0xAEF5DFC0AC9F9044ULL, 0x6B380B43FFA61042ULL } }, /* XSUM_XXH128_testdata[29] */\n    {   10, 0x0000000000000000ULL, { 0x7A16D0A993B929B1ULL, 0xC6F795961D7A1955ULL } }, /* XSUM_XXH128_testdata[30] */\n    {   10, 0x000000009E3779B1ULL, { 0x933F24D3B1C7BFFEULL, 0xAF490E889502AEEEULL } }, /* XSUM_XXH128_testdata[31] */\n    {   10, 0x9E3779B185EBCA8DULL, { 0xFC69C7D7394CC927ULL, 0x977507C07D31FB34ULL } }, /* XSUM_XXH128_testdata[32] */\n    {   11, 0x0000000000000000ULL, { 0x58378517E765AE7CULL, 0x566645F72F871059ULL } }, /* XSUM_XXH128_testdata[33] */\n    {   11, 0x000000009E3779B1ULL, { 0xFA0B5146C8BEB4AEULL, 0xBC5F90B7F608A4C1ULL } }, /* XSUM_XXH128_testdata[34] */\n    {   11, 0x9E3779B185EBCA8DULL, { 0x70A352D765D412DFULL, 0x6CBBD3B333F3D9FDULL } }, /* XSUM_XXH128_testdata[35] */\n    {   12, 0x0000000000000000ULL, { 0x061A192713F69AD9ULL, 0x6E3EFD8FC7802B18ULL } }, /* XSUM_XXH128_testdata[36] */\n    {   12, 0x000000009E3779B1ULL, { 0x9BE9F9A67F3C7DFBULL, 0xD7E09D518A3405D3ULL } }, /* XSUM_XXH128_testdata[37] */\n    {   12, 0x9E3779B185EBCA8DULL, { 0x5D92B5D7190B12D1ULL, 0xFF0D60ACD02ED401ULL } }, /* XSUM_XXH128_testdata[38] */\n    {   13, 0x0000000000000000ULL, { 0x4CB46E6932D0BCE2ULL, 0x30D4B04DDA0E2514ULL } }, /* XSUM_XXH128_testdata[39] */\n    {   13, 0x000000009E3779B1ULL, { 0x78303CD93AEC2562ULL, 0x58F072146B6BBABAULL } }, /* XSUM_XXH128_testdata[40] */\n    {   13, 0x9E3779B185EBCA8DULL, { 0xAB0AF7C25373B4FDULL, 0x70F1E535CAE27ABCULL } }, /* XSUM_XXH128_testdata[41] */\n    {   14, 0x0000000000000000ULL, { 0x352B80797CDA6247ULL, 0xB2623398AA0BDA1EULL } }, /* XSUM_XXH128_testdata[42] */\n    {   14, 0x000000009E3779B1ULL, { 0x50A29C20D77793F9ULL, 0x269307BCF6EF20ADULL } }, /* XSUM_XXH128_testdata[43] */\n    {   14, 0x9E3779B185EBCA8DULL, { 0x0194C9941B36FDAAULL, 0xD335DBFEB5CF4521ULL } }, /* XSUM_XXH128_testdata[44] */\n    {   15, 0x0000000000000000ULL, { 0x958955DF1889E6BCULL, 0xC402609E57EE5772ULL } }, /* XSUM_XXH128_testdata[45] */\n    {   15, 0x000000009E3779B1ULL, { 0x69B291E8B041C577ULL, 0xCBF97D053781B18EULL } }, /* XSUM_XXH128_testdata[46] */\n    {   15, 0x9E3779B185EBCA8DULL, { 0x6A0A9CA5FD33CB9DULL, 0x48864EF580A95F6BULL } }, /* XSUM_XXH128_testdata[47] */\n    {   16, 0x0000000000000000ULL, { 0x562980258A998629ULL, 0xC68C368ECF8A9C05ULL } }, /* XSUM_XXH128_testdata[48] */\n    {   16, 0x000000009E3779B1ULL, { 0xB07EEEAB4C56392BULL, 0x3767C90D0CDBB93DULL } }, /* XSUM_XXH128_testdata[49] */\n    {   16, 0x9E3779B185EBCA8DULL, { 0x0346D13A7A5498C7ULL, 0x6FFCB80CD33085C8ULL } }, /* XSUM_XXH128_testdata[50] */\n    {   17, 0x0000000000000000ULL, { 0xABBC12D11973D7DBULL, 0x955FA78643ED3669ULL } }, /* XSUM_XXH128_testdata[51] */\n    {   17, 0x000000009E3779B1ULL, { 0x3CC9FF6CAE79ACCBULL, 0x99E7C628E75D6431ULL } }, /* XSUM_XXH128_testdata[52] */\n    {   17, 0x9E3779B185EBCA8DULL, { 0x980A14119985A7DFULL, 0xD77681219E464828ULL } }, /* XSUM_XXH128_testdata[53] */\n    {   18, 0x0000000000000000ULL, { 0xD272009BC1C018B9ULL, 0x99F724B66C8B4115ULL } }, /* XSUM_XXH128_testdata[54] */\n    {   18, 0x000000009E3779B1ULL, { 0xAC613C1A1D945851ULL, 0xEA7C95A5A507DA9FULL } }, /* XSUM_XXH128_testdata[55] */\n    {   18, 0x9E3779B185EBCA8DULL, { 0x0FD13EC2501CE593ULL, 0x59462EA2633F1C7DULL } }, /* XSUM_XXH128_testdata[56] */\n    {   19, 0x0000000000000000ULL, { 0x40D66843B45774ECULL, 0x33F5B051B2DF1F3AULL } }, /* XSUM_XXH128_testdata[57] */\n    {   19, 0x000000009E3779B1ULL, { 0x5A5B2D8E4E240C8AULL, 0x23430DE45038FE7BULL } }, /* XSUM_XXH128_testdata[58] */\n    {   19, 0x9E3779B185EBCA8DULL, { 0x827A46D263649996ULL, 0x3A49715B71BA3E38ULL } }, /* XSUM_XXH128_testdata[59] */\n    {   20, 0x0000000000000000ULL, { 0xD843A069A9634CAFULL, 0x4A508B9B1DFC7269ULL } }, /* XSUM_XXH128_testdata[60] */\n    {   20, 0x000000009E3779B1ULL, { 0x2CCB9CF1A241BC3EULL, 0x309B4E9C668606ACULL } }, /* XSUM_XXH128_testdata[61] */\n    {   20, 0x9E3779B185EBCA8DULL, { 0xF2161017D0069F63ULL, 0xE80C8802A9A424DBULL } }, /* XSUM_XXH128_testdata[62] */\n    {   21, 0x0000000000000000ULL, { 0xE77C143E68B66411ULL, 0xBCB0B59AA86A1B79ULL } }, /* XSUM_XXH128_testdata[63] */\n    {   21, 0x000000009E3779B1ULL, { 0xB929B8D8205EA898ULL, 0xBFA036B2ECDD284FULL } }, /* XSUM_XXH128_testdata[64] */\n    {   21, 0x9E3779B185EBCA8DULL, { 0xF1BECCFC27143576ULL, 0x10EC5336E3DDFEA5ULL } }, /* XSUM_XXH128_testdata[65] */\n    {   22, 0x0000000000000000ULL, { 0x82E0DE0C7C3D3DA7ULL, 0xA3CAB9714DC85D5AULL } }, /* XSUM_XXH128_testdata[66] */\n    {   22, 0x000000009E3779B1ULL, { 0x2C7D475989C580C6ULL, 0x3B92C4B460EFD478ULL } }, /* XSUM_XXH128_testdata[67] */\n    {   22, 0x9E3779B185EBCA8DULL, { 0x21D42AD97DE5910AULL, 0xFF5500907F902AA8ULL } }, /* XSUM_XXH128_testdata[68] */\n    {   23, 0x0000000000000000ULL, { 0x58C17078CBED59AAULL, 0x27C2B20399274F53ULL } }, /* XSUM_XXH128_testdata[69] */\n    {   23, 0x000000009E3779B1ULL, { 0x6AF3980FDF263433ULL, 0xDDE358EE2275EF89ULL } }, /* XSUM_XXH128_testdata[70] */\n    {   23, 0x9E3779B185EBCA8DULL, { 0xFA5EB6CD80D39652ULL, 0xB5AB4A1B01DB35EDULL } }, /* XSUM_XXH128_testdata[71] */\n    {   24, 0x0000000000000000ULL, { 0x1E7044D28B1B901DULL, 0x0CE966E4678D3761ULL } }, /* XSUM_XXH128_testdata[72] */\n    {   24, 0x000000009E3779B1ULL, { 0xD7304C54EBAD40A9ULL, 0x3162026714A6A243ULL } }, /* XSUM_XXH128_testdata[73] */\n    {   24, 0x9E3779B185EBCA8DULL, { 0xC6CBF92A70680B19ULL, 0xD7895DED1F62559DULL } }, /* XSUM_XXH128_testdata[74] */\n    {   25, 0x0000000000000000ULL, { 0x77211AE67471B0A7ULL, 0xA4BDB1865649AED0ULL } }, /* XSUM_XXH128_testdata[75] */\n    {   25, 0x000000009E3779B1ULL, { 0xFFCE4EB92CC44797ULL, 0x2120B240C1DC8D7EULL } }, /* XSUM_XXH128_testdata[76] */\n    {   25, 0x9E3779B185EBCA8DULL, { 0x2B80596429D95A2BULL, 0xCD6DABFB70717C25ULL } }, /* XSUM_XXH128_testdata[77] */\n    {   26, 0x0000000000000000ULL, { 0x81CAE35FBE6ABF9CULL, 0x84F1267259C7FC84ULL } }, /* XSUM_XXH128_testdata[78] */\n    {   26, 0x000000009E3779B1ULL, { 0xEFAFAAB665BEAE1EULL, 0xF2B054C222111CADULL } }, /* XSUM_XXH128_testdata[79] */\n    {   26, 0x9E3779B185EBCA8DULL, { 0x488502F1F20720D8ULL, 0xA1345C1453F528DEULL } }, /* XSUM_XXH128_testdata[80] */\n    {   27, 0x0000000000000000ULL, { 0xF78B016BC82D71FCULL, 0xAB3ADAF1F30AF503ULL } }, /* XSUM_XXH128_testdata[81] */\n    {   27, 0x000000009E3779B1ULL, { 0xCFDA513A7637EC48ULL, 0xD85E2A7059915184ULL } }, /* XSUM_XXH128_testdata[82] */\n    {   27, 0x9E3779B185EBCA8DULL, { 0x62A3EB7CC46654F5ULL, 0x6FFC100FDC24E063ULL } }, /* XSUM_XXH128_testdata[83] */\n    {   28, 0x0000000000000000ULL, { 0x39EEB5D6C8E9740DULL, 0xCD6D9A03F337B69CULL } }, /* XSUM_XXH128_testdata[84] */\n    {   28, 0x000000009E3779B1ULL, { 0x46FBFC81F7229D2CULL, 0x32453012F76F97CDULL } }, /* XSUM_XXH128_testdata[85] */\n    {   28, 0x9E3779B185EBCA8DULL, { 0xC0DE900869819B46ULL, 0xA3E8F398B5BCED4CULL } }, /* XSUM_XXH128_testdata[86] */\n    {   29, 0x0000000000000000ULL, { 0x0B277D446423E16BULL, 0x009DFA0AE42A877CULL } }, /* XSUM_XXH128_testdata[87] */\n    {   29, 0x000000009E3779B1ULL, { 0x962448A388905C28ULL, 0xA74133ECE5BD3B8DULL } }, /* XSUM_XXH128_testdata[88] */\n    {   29, 0x9E3779B185EBCA8DULL, { 0xC976FEC2FE296004ULL, 0x536B48553F9B9B5CULL } }, /* XSUM_XXH128_testdata[89] */\n    {   30, 0x0000000000000000ULL, { 0x732547CFF1735247ULL, 0xF28CE57053734D84ULL } }, /* XSUM_XXH128_testdata[90] */\n    {   30, 0x000000009E3779B1ULL, { 0x4C222160E2C53BD3ULL, 0x9C8389843CEA52DAULL } }, /* XSUM_XXH128_testdata[91] */\n    {   30, 0x9E3779B185EBCA8DULL, { 0x950FCD00FEDF0E67ULL, 0x06603225FB1F2D93ULL } }, /* XSUM_XXH128_testdata[92] */\n    {   31, 0x0000000000000000ULL, { 0xEC8365E74DC00653ULL, 0x301048A7AB476D21ULL } }, /* XSUM_XXH128_testdata[93] */\n    {   31, 0x000000009E3779B1ULL, { 0x43750505AA7694E2ULL, 0x767FCAF8AF696DA5ULL } }, /* XSUM_XXH128_testdata[94] */\n    {   31, 0x9E3779B185EBCA8DULL, { 0xD74750F8952360C3ULL, 0x4639CF7B77BA9096ULL } }, /* XSUM_XXH128_testdata[95] */\n    {   32, 0x0000000000000000ULL, { 0x278410A17595E3F9ULL, 0x98FC6458710DC2E8ULL } }, /* XSUM_XXH128_testdata[96] */\n    {   32, 0x000000009E3779B1ULL, { 0x3589C5CD99CD6267ULL, 0x326D21E5BCD395DEULL } }, /* XSUM_XXH128_testdata[97] */\n    {   32, 0x9E3779B185EBCA8DULL, { 0x0054E82631CEF166ULL, 0xCC587E4FCDB86BC5ULL } }, /* XSUM_XXH128_testdata[98] */\n    {   33, 0x0000000000000000ULL, { 0xE593BC4E5914C9D1ULL, 0x3103C192CEAA2DEDULL } }, /* XSUM_XXH128_testdata[99] */\n    {   33, 0x000000009E3779B1ULL, { 0x5A785FEC2AE2B28FULL, 0x1B9738AFBE6CBB38ULL } }, /* XSUM_XXH128_testdata[100] */\n    {   33, 0x9E3779B185EBCA8DULL, { 0xC361D36CEA597C31ULL, 0x21273C8190C645CDULL } }, /* XSUM_XXH128_testdata[101] */\n    {   34, 0x0000000000000000ULL, { 0x709408E618E1B8D4ULL, 0x85B0411F3A9AD312ULL } }, /* XSUM_XXH128_testdata[102] */\n    {   34, 0x000000009E3779B1ULL, { 0x3A28C693FBD9EF17ULL, 0x59F40DCD42C6BD3EULL } }, /* XSUM_XXH128_testdata[103] */\n    {   34, 0x9E3779B185EBCA8DULL, { 0xF1C0437227664C2FULL, 0x9BF21A6DF8F271E1ULL } }, /* XSUM_XXH128_testdata[104] */\n    {   35, 0x0000000000000000ULL, { 0x36A6128E66AB7184ULL, 0x6ADA4CDFD5C5717DULL } }, /* XSUM_XXH128_testdata[105] */\n    {   35, 0x000000009E3779B1ULL, { 0x40110189561672F7ULL, 0xDBCD571BE18D37C9ULL } }, /* XSUM_XXH128_testdata[106] */\n    {   35, 0x9E3779B185EBCA8DULL, { 0x79BB7678F5A48FDAULL, 0x87F71FD871F817E9ULL } }, /* XSUM_XXH128_testdata[107] */\n    {   36, 0x0000000000000000ULL, { 0x4622E1529B21F801ULL, 0xCB8AD67F89D54C67ULL } }, /* XSUM_XXH128_testdata[108] */\n    {   36, 0x000000009E3779B1ULL, { 0xFF9B9DBF32BDD23AULL, 0xB4B766F20A97C15CULL } }, /* XSUM_XXH128_testdata[109] */\n    {   36, 0x9E3779B185EBCA8DULL, { 0x5B0002161A671698ULL, 0xC74FC9E31CAF4DC1ULL } }, /* XSUM_XXH128_testdata[110] */\n    {   37, 0x0000000000000000ULL, { 0x37D26B72F2C5FE93ULL, 0x7FB8F8FD35869466ULL } }, /* XSUM_XXH128_testdata[111] */\n    {   37, 0x000000009E3779B1ULL, { 0x7AC8D944BD540F6FULL, 0x1A9FFD27435D4831ULL } }, /* XSUM_XXH128_testdata[112] */\n    {   37, 0x9E3779B185EBCA8DULL, { 0x5E6AA052B9150F3EULL, 0x6CB0EE29DA2A8081ULL } }, /* XSUM_XXH128_testdata[113] */\n    {   38, 0x0000000000000000ULL, { 0x0F582B6C4556EDA9ULL, 0x91BA1224B371928DULL } }, /* XSUM_XXH128_testdata[114] */\n    {   38, 0x000000009E3779B1ULL, { 0xC95DEDB60ADFB408ULL, 0xBD6CFE2665D51DD5ULL } }, /* XSUM_XXH128_testdata[115] */\n    {   38, 0x9E3779B185EBCA8DULL, { 0x24D68AC7F1C50340ULL, 0x3D2BE910B67BABE6ULL } }, /* XSUM_XXH128_testdata[116] */\n    {   39, 0x0000000000000000ULL, { 0x1C87EEA22AA873C2ULL, 0xC8F8B3373A2486EAULL } }, /* XSUM_XXH128_testdata[117] */\n    {   39, 0x000000009E3779B1ULL, { 0xEAE1F3A0C855F3BBULL, 0xD1530455FB46F508ULL } }, /* XSUM_XXH128_testdata[118] */\n    {   39, 0x9E3779B185EBCA8DULL, { 0x6C737E671D14099DULL, 0xB90085F8E8523F56ULL } }, /* XSUM_XXH128_testdata[119] */\n    {   40, 0x0000000000000000ULL, { 0xA21A469A948C526AULL, 0x7D58E84401489136ULL } }, /* XSUM_XXH128_testdata[120] */\n    {   40, 0x000000009E3779B1ULL, { 0xBB1413D0D210221DULL, 0x830F11A29FBD9433ULL } }, /* XSUM_XXH128_testdata[121] */\n    {   40, 0x9E3779B185EBCA8DULL, { 0x3AB06ED02F16FA7CULL, 0xA5996E81B1A20485ULL } }, /* XSUM_XXH128_testdata[122] */\n    {   41, 0x0000000000000000ULL, { 0x4F0BDA0170725278ULL, 0xDED80C517B8506F3ULL } }, /* XSUM_XXH128_testdata[123] */\n    {   41, 0x000000009E3779B1ULL, { 0x1FA227EBE1B57887ULL, 0xFA3DF2B1A096E782ULL } }, /* XSUM_XXH128_testdata[124] */\n    {   41, 0x9E3779B185EBCA8DULL, { 0x2F9FAE3A94D04C75ULL, 0x6796D3C6F9C44942ULL } }, /* XSUM_XXH128_testdata[125] */\n    {   42, 0x0000000000000000ULL, { 0x486081C6CAB0BAB5ULL, 0x84C996BE1DF5A96EULL } }, /* XSUM_XXH128_testdata[126] */\n    {   42, 0x000000009E3779B1ULL, { 0x47EC4A204D009E3AULL, 0x5F313FCE45949ADCULL } }, /* XSUM_XXH128_testdata[127] */\n    {   42, 0x9E3779B185EBCA8DULL, { 0xA07D6B7F6B0B4A06ULL, 0xFCCEAFB553C2C461ULL } }, /* XSUM_XXH128_testdata[128] */\n    {   43, 0x0000000000000000ULL, { 0x7E60573DE26665D6ULL, 0x7B57C2721F7E2140ULL } }, /* XSUM_XXH128_testdata[129] */\n    {   43, 0x000000009E3779B1ULL, { 0x022E331A26B108BEULL, 0xE1C41AA138103223ULL } }, /* XSUM_XXH128_testdata[130] */\n    {   43, 0x9E3779B185EBCA8DULL, { 0x83D828EB5AEA024BULL, 0x7AA74EF08BF8972AULL } }, /* XSUM_XXH128_testdata[131] */\n    {   44, 0x0000000000000000ULL, { 0x2FE8EAC5BC6611D4ULL, 0x55B3763ECE2A0CE5ULL } }, /* XSUM_XXH128_testdata[132] */\n    {   44, 0x000000009E3779B1ULL, { 0xD3AD4A93ED409AC9ULL, 0x0EEE35BBFA239037ULL } }, /* XSUM_XXH128_testdata[133] */\n    {   44, 0x9E3779B185EBCA8DULL, { 0x8B3CB7AD51EF2B31ULL, 0x02922C8D7BB954BFULL } }, /* XSUM_XXH128_testdata[134] */\n    {   45, 0x0000000000000000ULL, { 0x3DAB6D36EFB0A9F1ULL, 0xFB2ED4E6878F58EEULL } }, /* XSUM_XXH128_testdata[135] */\n    {   45, 0x000000009E3779B1ULL, { 0xB05B105614FAFD87ULL, 0xD40818CC7F4D44C2ULL } }, /* XSUM_XXH128_testdata[136] */\n    {   45, 0x9E3779B185EBCA8DULL, { 0x9666CF3207232F95ULL, 0x9180267871AD1D0EULL } }, /* XSUM_XXH128_testdata[137] */\n    {   46, 0x0000000000000000ULL, { 0xF63251243BA77A2AULL, 0x7EDCAF501392ECD9ULL } }, /* XSUM_XXH128_testdata[138] */\n    {   46, 0x000000009E3779B1ULL, { 0x63F97863E18BAA6AULL, 0xE9D717817053CCA2ULL } }, /* XSUM_XXH128_testdata[139] */\n    {   46, 0x9E3779B185EBCA8DULL, { 0xACDF103015B5ED9AULL, 0x9AB7D5F31B706BE0ULL } }, /* XSUM_XXH128_testdata[140] */\n    {   47, 0x0000000000000000ULL, { 0xE7371BE0E4295492ULL, 0xD3FABAB4EDF4C500ULL } }, /* XSUM_XXH128_testdata[141] */\n    {   47, 0x000000009E3779B1ULL, { 0xA9C1C90C70733EC4ULL, 0xF4CD223BB9191292ULL } }, /* XSUM_XXH128_testdata[142] */\n    {   47, 0x9E3779B185EBCA8DULL, { 0x77F2E315E4EBD1FEULL, 0x8876E7582465A24DULL } }, /* XSUM_XXH128_testdata[143] */\n    {   48, 0x0000000000000000ULL, { 0xF942219AED80F67BULL, 0xA002AC4E5478227EULL } }, /* XSUM_XXH128_testdata[144] */\n    {   48, 0x000000009E3779B1ULL, { 0x7BA3C3E453A1934EULL, 0x163ADDE36C072295ULL } }, /* XSUM_XXH128_testdata[145] */\n    {   48, 0x9E3779B185EBCA8DULL, { 0x3A94D91333ED395AULL, 0xBC689F4C0152FB44ULL } }, /* XSUM_XXH128_testdata[146] */\n    {   49, 0x0000000000000000ULL, { 0xF2B7B23CE6EC80AAULL, 0xECCF52474EC7D923ULL } }, /* XSUM_XXH128_testdata[147] */\n    {   49, 0x000000009E3779B1ULL, { 0x09303020B1C5A35CULL, 0xE7F33ACCB5FCB6D5ULL } }, /* XSUM_XXH128_testdata[148] */\n    {   49, 0x9E3779B185EBCA8DULL, { 0x13CAB3C8CC955F9CULL, 0x7A4EB66DA77F8484ULL } }, /* XSUM_XXH128_testdata[149] */\n    {   50, 0x0000000000000000ULL, { 0x482E8EC08214B6E1ULL, 0x058F885F795EF664ULL } }, /* XSUM_XXH128_testdata[150] */\n    {   50, 0x000000009E3779B1ULL, { 0xCC307EFA8B0EFCD5ULL, 0x97CB0CED8E6AEA21ULL } }, /* XSUM_XXH128_testdata[151] */\n    {   50, 0x9E3779B185EBCA8DULL, { 0x6BFD0C5DFCDEBD54ULL, 0x2247FD24E5F07409ULL } }, /* XSUM_XXH128_testdata[152] */\n    {   51, 0x0000000000000000ULL, { 0x1FD7D480F1B5EC52ULL, 0xE7BF618B4449AF2CULL } }, /* XSUM_XXH128_testdata[153] */\n    {   51, 0x000000009E3779B1ULL, { 0x65C226758C7292B5ULL, 0xBFB2A1F8E82FC8B8ULL } }, /* XSUM_XXH128_testdata[154] */\n    {   51, 0x9E3779B185EBCA8DULL, { 0x713E68E0604843E8ULL, 0xDB807E03958CE8E7ULL } }, /* XSUM_XXH128_testdata[155] */\n    {   52, 0x0000000000000000ULL, { 0x46B0FB5FE8208F2DULL, 0xDD9E141D6E878694ULL } }, /* XSUM_XXH128_testdata[156] */\n    {   52, 0x000000009E3779B1ULL, { 0x395EEB9E761C239AULL, 0xFD7DD57BE93512B7ULL } }, /* XSUM_XXH128_testdata[157] */\n    {   52, 0x9E3779B185EBCA8DULL, { 0xA24242902670612CULL, 0xCAA7142B4B9866B8ULL } }, /* XSUM_XXH128_testdata[158] */\n    {   53, 0x0000000000000000ULL, { 0x1DF9AB08DC5ECE89ULL, 0x3931079CC8E1A023ULL } }, /* XSUM_XXH128_testdata[159] */\n    {   53, 0x000000009E3779B1ULL, { 0x8A0D9257CC2029C8ULL, 0xC908C18865B60741ULL } }, /* XSUM_XXH128_testdata[160] */\n    {   53, 0x9E3779B185EBCA8DULL, { 0x758D5A8778E1C77CULL, 0xB9D0EF20F58768E5ULL } }, /* XSUM_XXH128_testdata[161] */\n    {   54, 0x0000000000000000ULL, { 0xAF4B9ECB26C15867ULL, 0x7404B76D483DFC4BULL } }, /* XSUM_XXH128_testdata[162] */\n    {   54, 0x000000009E3779B1ULL, { 0xC2FB5AF70A4167A6ULL, 0x3E5AFA5D15FE44C4ULL } }, /* XSUM_XXH128_testdata[163] */\n    {   54, 0x9E3779B185EBCA8DULL, { 0x39AA694631FC5C09ULL, 0xAB73D1BC5E1DE210ULL } }, /* XSUM_XXH128_testdata[164] */\n    {   55, 0x0000000000000000ULL, { 0xC81339770FA76C64ULL, 0x5BA1D6F62F23C6C2ULL } }, /* XSUM_XXH128_testdata[165] */\n    {   55, 0x000000009E3779B1ULL, { 0x4A573DEE0C8554D6ULL, 0x84167F0A3FFB2247ULL } }, /* XSUM_XXH128_testdata[166] */\n    {   55, 0x9E3779B185EBCA8DULL, { 0xFDE6BE9BFA6FD18CULL, 0x0ECC901637A328A6ULL } }, /* XSUM_XXH128_testdata[167] */\n    {   56, 0x0000000000000000ULL, { 0x8C8621520C96876DULL, 0x0B980EF5390C79D1ULL } }, /* XSUM_XXH128_testdata[168] */\n    {   56, 0x000000009E3779B1ULL, { 0x57A040B625B4F3F1ULL, 0x6EC9816287730E21ULL } }, /* XSUM_XXH128_testdata[169] */\n    {   56, 0x9E3779B185EBCA8DULL, { 0x3EDA65B4FBA3E2D3ULL, 0x4E81412CC059B620ULL } }, /* XSUM_XXH128_testdata[170] */\n    {   57, 0x0000000000000000ULL, { 0x20AB919DA8A5910EULL, 0x3E8383DE66780EA9ULL } }, /* XSUM_XXH128_testdata[171] */\n    {   57, 0x000000009E3779B1ULL, { 0xDFEFE35FB443EAA6ULL, 0x4E5A1A9522265704ULL } }, /* XSUM_XXH128_testdata[172] */\n    {   57, 0x9E3779B185EBCA8DULL, { 0x68DE73E96F81C670ULL, 0xF42B0844B0B274E8ULL } }, /* XSUM_XXH128_testdata[173] */\n    {   58, 0x0000000000000000ULL, { 0x8680237C700D53B3ULL, 0xD65DB1C26AD7F514ULL } }, /* XSUM_XXH128_testdata[174] */\n    {   58, 0x000000009E3779B1ULL, { 0x2C21A77A960DB0D5ULL, 0xF458D3AD20C2214CULL } }, /* XSUM_XXH128_testdata[175] */\n    {   58, 0x9E3779B185EBCA8DULL, { 0xECE14FD3089CE07CULL, 0xBAFA5A2F48F6D642ULL } }, /* XSUM_XXH128_testdata[176] */\n    {   59, 0x0000000000000000ULL, { 0x08340C518719170AULL, 0x4755ADB4ABADDF33ULL } }, /* XSUM_XXH128_testdata[177] */\n    {   59, 0x000000009E3779B1ULL, { 0xCD15887AA4881F3EULL, 0xD111896BD2015699ULL } }, /* XSUM_XXH128_testdata[178] */\n    {   59, 0x9E3779B185EBCA8DULL, { 0xD3B155A0854C92C7ULL, 0xD461819D5FA559ABULL } }, /* XSUM_XXH128_testdata[179] */\n    {   60, 0x0000000000000000ULL, { 0x3FC63264B97E66C4ULL, 0xDD23AB349B65191FULL } }, /* XSUM_XXH128_testdata[180] */\n    {   60, 0x000000009E3779B1ULL, { 0x9E1964E1E9EE0394ULL, 0xE348911C513B6EFBULL } }, /* XSUM_XXH128_testdata[181] */\n    {   60, 0x9E3779B185EBCA8DULL, { 0xFAC04392452FF40CULL, 0xB2430128EC04896AULL } }, /* XSUM_XXH128_testdata[182] */\n    {   61, 0x0000000000000000ULL, { 0xF28F0043168FA60FULL, 0xA690426D39B3239DULL } }, /* XSUM_XXH128_testdata[183] */\n    {   61, 0x000000009E3779B1ULL, { 0xD0273F68547265DFULL, 0x367C7AE92C2C5AB0ULL } }, /* XSUM_XXH128_testdata[184] */\n    {   61, 0x9E3779B185EBCA8DULL, { 0xA480D7AA9A0945AFULL, 0x821F11506902DA6DULL } }, /* XSUM_XXH128_testdata[185] */\n    {   62, 0x0000000000000000ULL, { 0x8ABE4AE9BA6B8970ULL, 0x0156A29EA822A61AULL } }, /* XSUM_XXH128_testdata[186] */\n    {   62, 0x000000009E3779B1ULL, { 0xE02180CCE6A533D2ULL, 0x6A74A53C1F2497E1ULL } }, /* XSUM_XXH128_testdata[187] */\n    {   62, 0x9E3779B185EBCA8DULL, { 0xC1221AEA58DF4E23ULL, 0xFA3BDB6DB68D85CBULL } }, /* XSUM_XXH128_testdata[188] */\n    {   63, 0x0000000000000000ULL, { 0x5E4CB79E9A8121D9ULL, 0x7FC0AE04A6D2BB0BULL } }, /* XSUM_XXH128_testdata[189] */\n    {   63, 0x000000009E3779B1ULL, { 0x32C0F908DA71D4FDULL, 0xE4DB72A4C9F178CFULL } }, /* XSUM_XXH128_testdata[190] */\n    {   63, 0x9E3779B185EBCA8DULL, { 0xC6EE481741654B12ULL, 0xAEC92695D77FEA89ULL } }, /* XSUM_XXH128_testdata[191] */\n    {   64, 0x0000000000000000ULL, { 0xEFDB6A44690721A9ULL, 0x6D90E81A9B0FD622ULL } }, /* XSUM_XXH128_testdata[192] */\n    {   64, 0x000000009E3779B1ULL, { 0x592B9762BBEBCEBBULL, 0x5F29E4EDBA49A7AEULL } }, /* XSUM_XXH128_testdata[193] */\n    {   64, 0x9E3779B185EBCA8DULL, { 0x9405BA2AFFA95CEBULL, 0x37B738968D40BDA5ULL } }, /* XSUM_XXH128_testdata[194] */\n    {   65, 0x0000000000000000ULL, { 0xFE2F650FA500EC6EULL, 0x6C074D65E54DB85AULL } }, /* XSUM_XXH128_testdata[195] */\n    {   65, 0x000000009E3779B1ULL, { 0xDB4D44A434CF6830ULL, 0xFD0EBD6E81275E11ULL } }, /* XSUM_XXH128_testdata[196] */\n    {   65, 0x9E3779B185EBCA8DULL, { 0x9D60C345E5C297CDULL, 0x72503A6FA8D07ADBULL } }, /* XSUM_XXH128_testdata[197] */\n    {   66, 0x0000000000000000ULL, { 0x863FB8517E58CB1CULL, 0x827CFA7E4762BD29ULL } }, /* XSUM_XXH128_testdata[198] */\n    {   66, 0x000000009E3779B1ULL, { 0x971A3AA3FAA16D5FULL, 0x05FC1974432D5F0CULL } }, /* XSUM_XXH128_testdata[199] */\n    {   66, 0x9E3779B185EBCA8DULL, { 0x1070C2DD52042589ULL, 0xE8608A61D0DA23D9ULL } }, /* XSUM_XXH128_testdata[200] */\n    {   67, 0x0000000000000000ULL, { 0x3DA90A343BC849B8ULL, 0x574B97190A0C3660ULL } }, /* XSUM_XXH128_testdata[201] */\n    {   67, 0x000000009E3779B1ULL, { 0x3D05D583C7297229ULL, 0x5DF20BF40A5D1E49ULL } }, /* XSUM_XXH128_testdata[202] */\n    {   67, 0x9E3779B185EBCA8DULL, { 0xE86BB07A853205FAULL, 0xFAB25BDDF4FF71E9ULL } }, /* XSUM_XXH128_testdata[203] */\n    {   68, 0x0000000000000000ULL, { 0xF2CDA392C0CFF262ULL, 0x41AC62E69A1F1A8EULL } }, /* XSUM_XXH128_testdata[204] */\n    {   68, 0x000000009E3779B1ULL, { 0x8EB929D29D71F23AULL, 0xAE21721DCC1FD2C0ULL } }, /* XSUM_XXH128_testdata[205] */\n    {   68, 0x9E3779B185EBCA8DULL, { 0x16275098D47357D5ULL, 0x47D704A0DF667D1CULL } }, /* XSUM_XXH128_testdata[206] */\n    {   69, 0x0000000000000000ULL, { 0x5B3B0A3263A4D209ULL, 0x40E25D295201EFCBULL } }, /* XSUM_XXH128_testdata[207] */\n    {   69, 0x000000009E3779B1ULL, { 0x4EC8F8F1F8121192ULL, 0xE27CC1022DC32736ULL } }, /* XSUM_XXH128_testdata[208] */\n    {   69, 0x9E3779B185EBCA8DULL, { 0x55764B8E5DA762CBULL, 0xF4D835DC07052745ULL } }, /* XSUM_XXH128_testdata[209] */\n    {   70, 0x0000000000000000ULL, { 0x4F19DAF393EA30DAULL, 0xA87D85EFCF64A099ULL } }, /* XSUM_XXH128_testdata[210] */\n    {   70, 0x000000009E3779B1ULL, { 0x00C5171308A65523ULL, 0x84358642B4F15B98ULL } }, /* XSUM_XXH128_testdata[211] */\n    {   70, 0x9E3779B185EBCA8DULL, { 0x7D79B472E035BEEAULL, 0x9E145B94B519FC24ULL } }, /* XSUM_XXH128_testdata[212] */\n    {   71, 0x0000000000000000ULL, { 0xDDB1840DA0322085ULL, 0xB1E8729F8767E7DCULL } }, /* XSUM_XXH128_testdata[213] */\n    {   71, 0x000000009E3779B1ULL, { 0x7835F405FEFCF6B2ULL, 0xBA1996AF40BF822FULL } }, /* XSUM_XXH128_testdata[214] */\n    {   71, 0x9E3779B185EBCA8DULL, { 0x81A0C3F5948D9E9EULL, 0x740F02FA562197B1ULL } }, /* XSUM_XXH128_testdata[215] */\n    {   72, 0x0000000000000000ULL, { 0xB93F3BC8B1ABDAE8ULL, 0x4CB3A9D9FC2426BDULL } }, /* XSUM_XXH128_testdata[216] */\n    {   72, 0x000000009E3779B1ULL, { 0xE6914D2249CEAFA2ULL, 0x795DCC16402684ACULL } }, /* XSUM_XXH128_testdata[217] */\n    {   72, 0x9E3779B185EBCA8DULL, { 0x33F9881DCD559392ULL, 0xB29B712B6C9C19CAULL } }, /* XSUM_XXH128_testdata[218] */\n    {   73, 0x0000000000000000ULL, { 0x7AFF04344348C616ULL, 0xF8E52E64367FC9A3ULL } }, /* XSUM_XXH128_testdata[219] */\n    {   73, 0x000000009E3779B1ULL, { 0x9CB1D121F1EFBE7DULL, 0x6B0A395448A0FB4DULL } }, /* XSUM_XXH128_testdata[220] */\n    {   73, 0x9E3779B185EBCA8DULL, { 0x38CD6248FF4069D8ULL, 0x335B7FA1CFD16892ULL } }, /* XSUM_XXH128_testdata[221] */\n    {   74, 0x0000000000000000ULL, { 0x385DF525223BB0EBULL, 0x152820865607D891ULL } }, /* XSUM_XXH128_testdata[222] */\n    {   74, 0x000000009E3779B1ULL, { 0x8E967E83D58779B9ULL, 0xCA4E0DB0FA131F46ULL } }, /* XSUM_XXH128_testdata[223] */\n    {   74, 0x9E3779B185EBCA8DULL, { 0x90F215FBC3F96FE3ULL, 0x5EC57405A2A1CB30ULL } }, /* XSUM_XXH128_testdata[224] */\n    {   75, 0x0000000000000000ULL, { 0x69D27CA670328CA7ULL, 0x855F6872024ADC3EULL } }, /* XSUM_XXH128_testdata[225] */\n    {   75, 0x000000009E3779B1ULL, { 0x0470E5FA3388D87EULL, 0xDDF4F2D1A0E4CCE0ULL } }, /* XSUM_XXH128_testdata[226] */\n    {   75, 0x9E3779B185EBCA8DULL, { 0xDFA226B9F547A3F5ULL, 0x6DD1D6DACB225BF8ULL } }, /* XSUM_XXH128_testdata[227] */\n    {   76, 0x0000000000000000ULL, { 0xDB3C2D454E98EB69ULL, 0x23AFF2D28829C76AULL } }, /* XSUM_XXH128_testdata[228] */\n    {   76, 0x000000009E3779B1ULL, { 0x412EDF75846A5231ULL, 0x308D5F738CEEE1FCULL } }, /* XSUM_XXH128_testdata[229] */\n    {   76, 0x9E3779B185EBCA8DULL, { 0x37B8049E70C01958ULL, 0xCE39E111B39A0676ULL } }, /* XSUM_XXH128_testdata[230] */\n    {   77, 0x0000000000000000ULL, { 0x456E782C01609F79ULL, 0x99AEE1C127CFC93DULL } }, /* XSUM_XXH128_testdata[231] */\n    {   77, 0x000000009E3779B1ULL, { 0x5B1B2BD01B2872CBULL, 0x920ECDEDA4C4F6C8ULL } }, /* XSUM_XXH128_testdata[232] */\n    {   77, 0x9E3779B185EBCA8DULL, { 0xCE7927676DB0739EULL, 0x1A42D5A7B187CAE3ULL } }, /* XSUM_XXH128_testdata[233] */\n    {   78, 0x0000000000000000ULL, { 0xBE10A0BF7AE1DDDAULL, 0xD8EF8850DBE394B0ULL } }, /* XSUM_XXH128_testdata[234] */\n    {   78, 0x000000009E3779B1ULL, { 0xA60FEAA020356E47ULL, 0x2E02A3B204DA6232ULL } }, /* XSUM_XXH128_testdata[235] */\n    {   78, 0x9E3779B185EBCA8DULL, { 0xCFB8E15A4E939003ULL, 0xC284F814A4951D25ULL } }, /* XSUM_XXH128_testdata[236] */\n    {   79, 0x0000000000000000ULL, { 0xD2C346E6A3744835ULL, 0x97DE558A8B63962AULL } }, /* XSUM_XXH128_testdata[237] */\n    {   79, 0x000000009E3779B1ULL, { 0x3C9B2441A9FA8564ULL, 0x630D53E80B3D1702ULL } }, /* XSUM_XXH128_testdata[238] */\n    {   79, 0x9E3779B185EBCA8DULL, { 0x2EC0F9D96042B5CCULL, 0xC3E90CCDCCCF5E7BULL } }, /* XSUM_XXH128_testdata[239] */\n    {   80, 0x0000000000000000ULL, { 0x454AE6BF7A8A532DULL, 0xFDF2CEFDE9EAAC8AULL } }, /* XSUM_XXH128_testdata[240] */\n    {   80, 0x000000009E3779B1ULL, { 0x7ABFEBDF2326DFF0ULL, 0x27F9BE94EF318D63ULL } }, /* XSUM_XXH128_testdata[241] */\n    {   80, 0x9E3779B185EBCA8DULL, { 0xA5EAC764D1FF1166ULL, 0x19BF02D69BC56833ULL } }, /* XSUM_XXH128_testdata[242] */\n    {   81, 0x0000000000000000ULL, { 0x5E8BAFB9F95FB803ULL, 0x4952F58181AB0042ULL } }, /* XSUM_XXH128_testdata[243] */\n    {   81, 0x000000009E3779B1ULL, { 0x703FBB3D7A5F755CULL, 0x2724EC7ADC750FB6ULL } }, /* XSUM_XXH128_testdata[244] */\n    {   81, 0x9E3779B185EBCA8DULL, { 0xDC50FEB227515233ULL, 0x941E9469C46EDD08ULL } }, /* XSUM_XXH128_testdata[245] */\n    {   82, 0x0000000000000000ULL, { 0x2C7F81D7D7E614DDULL, 0xFBAD8FB7476CFA55ULL } }, /* XSUM_XXH128_testdata[246] */\n    {   82, 0x000000009E3779B1ULL, { 0x749CC8D8920F2573ULL, 0xEA6B912FD4CF07BEULL } }, /* XSUM_XXH128_testdata[247] */\n    {   82, 0x9E3779B185EBCA8DULL, { 0xEF71C2FE2FB7433CULL, 0x8C6450D1FC66D4F4ULL } }, /* XSUM_XXH128_testdata[248] */\n    {   83, 0x0000000000000000ULL, { 0xAA6F9A3D43BAF97FULL, 0x56AE9D57AE12331DULL } }, /* XSUM_XXH128_testdata[249] */\n    {   83, 0x000000009E3779B1ULL, { 0x082A3351477BC807ULL, 0x4426E35839CAC633ULL } }, /* XSUM_XXH128_testdata[250] */\n    {   83, 0x9E3779B185EBCA8DULL, { 0xAB0CE99D8CAD075EULL, 0x2E78A15FB855451CULL } }, /* XSUM_XXH128_testdata[251] */\n    {   84, 0x0000000000000000ULL, { 0x6FB8E26A52CE6296ULL, 0x73C9F8A457C920CDULL } }, /* XSUM_XXH128_testdata[252] */\n    {   84, 0x000000009E3779B1ULL, { 0x9EB35CB5AA67A56EULL, 0x9C54E4D5A1378B20ULL } }, /* XSUM_XXH128_testdata[253] */\n    {   84, 0x9E3779B185EBCA8DULL, { 0x8B5CEDFC2CA33349ULL, 0x9B881877ACD4250BULL } }, /* XSUM_XXH128_testdata[254] */\n    {   85, 0x0000000000000000ULL, { 0x44B57A61395E11A1ULL, 0xB4D35E37BDCBEF71ULL } }, /* XSUM_XXH128_testdata[255] */\n    {   85, 0x000000009E3779B1ULL, { 0x164FE8DA6D280D51ULL, 0xD753421C78D92CD0ULL } }, /* XSUM_XXH128_testdata[256] */\n    {   85, 0x9E3779B185EBCA8DULL, { 0xA2F4CC657CE861A8ULL, 0xDB4365E74D8FE02AULL } }, /* XSUM_XXH128_testdata[257] */\n    {   86, 0x0000000000000000ULL, { 0x512CCA4146849683ULL, 0x08CF415300B62CC1ULL } }, /* XSUM_XXH128_testdata[258] */\n    {   86, 0x000000009E3779B1ULL, { 0x72886250C74D7041ULL, 0x9B3644E2F53739CBULL } }, /* XSUM_XXH128_testdata[259] */\n    {   86, 0x9E3779B185EBCA8DULL, { 0x839513D52B0E6EC6ULL, 0xEEE10EC32722887DULL } }, /* XSUM_XXH128_testdata[260] */\n    {   87, 0x0000000000000000ULL, { 0x4B81A69B1DFC0AB8ULL, 0xD338059119F22966ULL } }, /* XSUM_XXH128_testdata[261] */\n    {   87, 0x000000009E3779B1ULL, { 0x86DF7C4CD7CA6AAAULL, 0x5954F7D40730C83BULL } }, /* XSUM_XXH128_testdata[262] */\n    {   87, 0x9E3779B185EBCA8DULL, { 0x26B857FBDEC34FFEULL, 0x64095B05B4A07B3AULL } }, /* XSUM_XXH128_testdata[263] */\n    {   88, 0x0000000000000000ULL, { 0x756358A3F5990E14ULL, 0xF5CA57802A115321ULL } }, /* XSUM_XXH128_testdata[264] */\n    {   88, 0x000000009E3779B1ULL, { 0x40A7FDB3A953C066ULL, 0x46BBF4379321EAA2ULL } }, /* XSUM_XXH128_testdata[265] */\n    {   88, 0x9E3779B185EBCA8DULL, { 0xEA6780C6E9D045D5ULL, 0xA02DD4B81D57D780ULL } }, /* XSUM_XXH128_testdata[266] */\n    {   89, 0x0000000000000000ULL, { 0xCDCCDA68DACEAB49ULL, 0xB74CA6A618AA484FULL } }, /* XSUM_XXH128_testdata[267] */\n    {   89, 0x000000009E3779B1ULL, { 0x26EFB1C5D849C146ULL, 0x7F04C735F98F8AC8ULL } }, /* XSUM_XXH128_testdata[268] */\n    {   89, 0x9E3779B185EBCA8DULL, { 0xCEED128F9F83E572ULL, 0xC16E1C99C17BA562ULL } }, /* XSUM_XXH128_testdata[269] */\n    {   90, 0x0000000000000000ULL, { 0x7B4F690C439AAB0CULL, 0x3C99D16EB5C1FFD1ULL } }, /* XSUM_XXH128_testdata[270] */\n    {   90, 0x000000009E3779B1ULL, { 0xDE9EB456539B49D0ULL, 0x7FDF77332F672E42ULL } }, /* XSUM_XXH128_testdata[271] */\n    {   90, 0x9E3779B185EBCA8DULL, { 0x3F7BFC389289D0F0ULL, 0x2CEC8A4BF33F5546ULL } }, /* XSUM_XXH128_testdata[272] */\n    {   91, 0x0000000000000000ULL, { 0x3394F85F071F79EEULL, 0x7E2E49A56EE9D5D3ULL } }, /* XSUM_XXH128_testdata[273] */\n    {   91, 0x000000009E3779B1ULL, { 0x2F9C34D1BDFED912ULL, 0xD464C68583AFBA1BULL } }, /* XSUM_XXH128_testdata[274] */\n    {   91, 0x9E3779B185EBCA8DULL, { 0xA87239152A1882C5ULL, 0xCCFDFC0BFE2CEE38ULL } }, /* XSUM_XXH128_testdata[275] */\n    {   92, 0x0000000000000000ULL, { 0xA56E022F37A4B561ULL, 0x15E71215719066AEULL } }, /* XSUM_XXH128_testdata[276] */\n    {   92, 0x000000009E3779B1ULL, { 0x0B344F3D05164D2EULL, 0xD7D5CE55799AA759ULL } }, /* XSUM_XXH128_testdata[277] */\n    {   92, 0x9E3779B185EBCA8DULL, { 0xB5EE2570DCAB8BB6ULL, 0x21254CCC861F92A2ULL } }, /* XSUM_XXH128_testdata[278] */\n    {   93, 0x0000000000000000ULL, { 0xEEDBFD6A74706A57ULL, 0x7E58A41233082423ULL } }, /* XSUM_XXH128_testdata[279] */\n    {   93, 0x000000009E3779B1ULL, { 0x6BE0FDC6FF8AE460ULL, 0xF5A37B24C4CE2A3BULL } }, /* XSUM_XXH128_testdata[280] */\n    {   93, 0x9E3779B185EBCA8DULL, { 0xF8D3FE0CBEA2AE7AULL, 0x40B4B7AD3A29505AULL } }, /* XSUM_XXH128_testdata[281] */\n    {   94, 0x0000000000000000ULL, { 0xC1EACFF61E4523B6ULL, 0x597F76E06214BF99ULL } }, /* XSUM_XXH128_testdata[282] */\n    {   94, 0x000000009E3779B1ULL, { 0x0F4716F7E11A9CACULL, 0x7ED9075916850B87ULL } }, /* XSUM_XXH128_testdata[283] */\n    {   94, 0x9E3779B185EBCA8DULL, { 0x37BB76869147ECDFULL, 0x6551A719F596140DULL } }, /* XSUM_XXH128_testdata[284] */\n    {   95, 0x0000000000000000ULL, { 0xADC001500F36EFC7ULL, 0xA7565462F45E97B8ULL } }, /* XSUM_XXH128_testdata[285] */\n    {   95, 0x000000009E3779B1ULL, { 0xDBB07D40A082D463ULL, 0x2D2FBCD0422A5048ULL } }, /* XSUM_XXH128_testdata[286] */\n    {   95, 0x9E3779B185EBCA8DULL, { 0x252E82550C49368EULL, 0x3E81BAA40D7DEE28ULL } }, /* XSUM_XXH128_testdata[287] */\n    {   96, 0x0000000000000000ULL, { 0xE9324473EA9AFEBEULL, 0xD9D0B885F56C93F1ULL } }, /* XSUM_XXH128_testdata[288] */\n    {   96, 0x000000009E3779B1ULL, { 0x4F7CE88D5FF06796ULL, 0x326705F7850BAF1AULL } }, /* XSUM_XXH128_testdata[289] */\n    {   96, 0x9E3779B185EBCA8DULL, { 0xD61F3AB58705C405ULL, 0x6F9ED3C2008CB388ULL } }, /* XSUM_XXH128_testdata[290] */\n    {   97, 0x0000000000000000ULL, { 0x7C87228AE9671BA7ULL, 0x09DFF37FAA6B284CULL } }, /* XSUM_XXH128_testdata[291] */\n    {   97, 0x000000009E3779B1ULL, { 0x320C5A9B1F530A27ULL, 0x300800B50F2DB8D6ULL } }, /* XSUM_XXH128_testdata[292] */\n    {   97, 0x9E3779B185EBCA8DULL, { 0x49EA87F2AFE44F66ULL, 0x14E68F850B481ADAULL } }, /* XSUM_XXH128_testdata[293] */\n    {   98, 0x0000000000000000ULL, { 0x32E6A3426D34B47CULL, 0x27341C41B7B76C66ULL } }, /* XSUM_XXH128_testdata[294] */\n    {   98, 0x000000009E3779B1ULL, { 0x050A14447BF94EEAULL, 0x4E016589D055A22CULL } }, /* XSUM_XXH128_testdata[295] */\n    {   98, 0x9E3779B185EBCA8DULL, { 0x32C4C2A63D86C675ULL, 0x3FFC6EE314B4B1FCULL } }, /* XSUM_XXH128_testdata[296] */\n    {   99, 0x0000000000000000ULL, { 0xE424E0E30C017EF7ULL, 0x6167ACF34FF2030AULL } }, /* XSUM_XXH128_testdata[297] */\n    {   99, 0x000000009E3779B1ULL, { 0xB8CF2958C2E1C3AAULL, 0xF9F87F1F44F94B8BULL } }, /* XSUM_XXH128_testdata[298] */\n    {   99, 0x9E3779B185EBCA8DULL, { 0x75602D814E1EC7C9ULL, 0x513D6B0831749D0AULL } }, /* XSUM_XXH128_testdata[299] */\n    {  100, 0x0000000000000000ULL, { 0x5FCBC2E3295F2476ULL, 0x9B50B05817AB158EULL } }, /* XSUM_XXH128_testdata[300] */\n    {  100, 0x000000009E3779B1ULL, { 0xF180E5ADE770CDA1ULL, 0xEA59CFDBF37D3A07ULL } }, /* XSUM_XXH128_testdata[301] */\n    {  100, 0x9E3779B185EBCA8DULL, { 0xD5E0C2A715F11657ULL, 0x984CEC52A9A9A561ULL } }, /* XSUM_XXH128_testdata[302] */\n    {  101, 0x0000000000000000ULL, { 0x5E9E9ED01FC1F1CFULL, 0xF96034BF00411258ULL } }, /* XSUM_XXH128_testdata[303] */\n    {  101, 0x000000009E3779B1ULL, { 0xD57FC3372CC4EBABULL, 0x06A82AFCA3D7397CULL } }, /* XSUM_XXH128_testdata[304] */\n    {  101, 0x9E3779B185EBCA8DULL, { 0x7BCB4F88D5878616ULL, 0x67E2B3DF9AD4DFD0ULL } }, /* XSUM_XXH128_testdata[305] */\n    {  102, 0x0000000000000000ULL, { 0x219521C931A10218ULL, 0x5D3928DE5F7F69E4ULL } }, /* XSUM_XXH128_testdata[306] */\n    {  102, 0x000000009E3779B1ULL, { 0xDF8EADA46BE86460ULL, 0xB46737703E5CA346ULL } }, /* XSUM_XXH128_testdata[307] */\n    {  102, 0x9E3779B185EBCA8DULL, { 0x74A35381FEE77C8CULL, 0x0A3E3B51862CC26FULL } }, /* XSUM_XXH128_testdata[308] */\n    {  103, 0x0000000000000000ULL, { 0x6C8734B7D2DF189BULL, 0x00D0C82E60F68668ULL } }, /* XSUM_XXH128_testdata[309] */\n    {  103, 0x000000009E3779B1ULL, { 0xBD71CC768A749608ULL, 0x154A67045FFACED1ULL } }, /* XSUM_XXH128_testdata[310] */\n    {  103, 0x9E3779B185EBCA8DULL, { 0x258C671270A3CE86ULL, 0xD250D2427F132A4CULL } }, /* XSUM_XXH128_testdata[311] */\n    {  104, 0x0000000000000000ULL, { 0xD7A32A0F548AFCCFULL, 0x44E96646F3FD8C0BULL } }, /* XSUM_XXH128_testdata[312] */\n    {  104, 0x000000009E3779B1ULL, { 0x03D13D27A310E288ULL, 0xAE29AA0349556CB1ULL } }, /* XSUM_XXH128_testdata[313] */\n    {  104, 0x9E3779B185EBCA8DULL, { 0x0FD8157937B10B94ULL, 0x468DB2143F27D286ULL } }, /* XSUM_XXH128_testdata[314] */\n    {  105, 0x0000000000000000ULL, { 0x825DE9241F5B60B4ULL, 0x0D250E6EF601F830ULL } }, /* XSUM_XXH128_testdata[315] */\n    {  105, 0x000000009E3779B1ULL, { 0x8389DB867AA6A3BDULL, 0x9B9BE9B5D6A949BBULL } }, /* XSUM_XXH128_testdata[316] */\n    {  105, 0x9E3779B185EBCA8DULL, { 0x350C2F30BE6D79B5ULL, 0x24661FAAA9E01543ULL } }, /* XSUM_XXH128_testdata[317] */\n    {  106, 0x0000000000000000ULL, { 0x8A96683C302E417FULL, 0x0058C97B396098A8ULL } }, /* XSUM_XXH128_testdata[318] */\n    {  106, 0x000000009E3779B1ULL, { 0x4615F0DDFA3DF88DULL, 0x74657BCAB4D67E04ULL } }, /* XSUM_XXH128_testdata[319] */\n    {  106, 0x9E3779B185EBCA8DULL, { 0x17A512AB5EC7D00DULL, 0x67B5B410AB9240DAULL } }, /* XSUM_XXH128_testdata[320] */\n    {  107, 0x0000000000000000ULL, { 0x83B48BFC30EEFD9BULL, 0x179D6EF111C34D87ULL } }, /* XSUM_XXH128_testdata[321] */\n    {  107, 0x000000009E3779B1ULL, { 0x8437BD889622A8BDULL, 0xE1B08B38B2E504C0ULL } }, /* XSUM_XXH128_testdata[322] */\n    {  107, 0x9E3779B185EBCA8DULL, { 0x1B61C0FC3A21CE2AULL, 0x0BA9CE54CF9022A4ULL } }, /* XSUM_XXH128_testdata[323] */\n    {  108, 0x0000000000000000ULL, { 0xB8917CE2A446F19BULL, 0x35D6472A0FA3391AULL } }, /* XSUM_XXH128_testdata[324] */\n    {  108, 0x000000009E3779B1ULL, { 0x1B16C71B2714BE4AULL, 0x6F6560E75AC32328ULL } }, /* XSUM_XXH128_testdata[325] */\n    {  108, 0x9E3779B185EBCA8DULL, { 0x3C89B27502A0B0EDULL, 0x370B0A9A2DA8B6F7ULL } }, /* XSUM_XXH128_testdata[326] */\n    {  109, 0x0000000000000000ULL, { 0x267FA76A2E5C6B3CULL, 0x3CABED54B9174563ULL } }, /* XSUM_XXH128_testdata[327] */\n    {  109, 0x000000009E3779B1ULL, { 0x74D98118D4E7487AULL, 0x477A3E30989F5E51ULL } }, /* XSUM_XXH128_testdata[328] */\n    {  109, 0x9E3779B185EBCA8DULL, { 0x0880F4FBDFB0B3AEULL, 0xEBC7AE5E1385899EULL } }, /* XSUM_XXH128_testdata[329] */\n    {  110, 0x0000000000000000ULL, { 0xDF5363BED5A527F8ULL, 0xE28549D1F215769CULL } }, /* XSUM_XXH128_testdata[330] */\n    {  110, 0x000000009E3779B1ULL, { 0x6B9FF3832F5BBCDBULL, 0x94D87C929B21156EULL } }, /* XSUM_XXH128_testdata[331] */\n    {  110, 0x9E3779B185EBCA8DULL, { 0x4A7B315D222E3145ULL, 0x1619143ED10D5EC2ULL } }, /* XSUM_XXH128_testdata[332] */\n    {  111, 0x0000000000000000ULL, { 0xDAC51AF77C163256ULL, 0xB183359E38C9ECC9ULL } }, /* XSUM_XXH128_testdata[333] */\n    {  111, 0x000000009E3779B1ULL, { 0xBF8FDB057294034CULL, 0x3D7A5E9C7C6BB18DULL } }, /* XSUM_XXH128_testdata[334] */\n    {  111, 0x9E3779B185EBCA8DULL, { 0xAC416ED55CC25B7EULL, 0x418C06662D457994ULL } }, /* XSUM_XXH128_testdata[335] */\n    {  112, 0x0000000000000000ULL, { 0xCBFD9024E4B6C79DULL, 0xD1B2CF3831D419ADULL } }, /* XSUM_XXH128_testdata[336] */\n    {  112, 0x000000009E3779B1ULL, { 0xDFC76A523BDF8B8DULL, 0x4E1917E85E06099AULL } }, /* XSUM_XXH128_testdata[337] */\n    {  112, 0x9E3779B185EBCA8DULL, { 0x94DE4EB7F80E7448ULL, 0x431161E8EFC337F6ULL } }, /* XSUM_XXH128_testdata[338] */\n    {  113, 0x0000000000000000ULL, { 0xB772DA459AF0F09DULL, 0x8DF75B439F599436ULL } }, /* XSUM_XXH128_testdata[339] */\n    {  113, 0x000000009E3779B1ULL, { 0x585EE7F926DEF6F3ULL, 0x2C48D1F7A5464280ULL } }, /* XSUM_XXH128_testdata[340] */\n    {  113, 0x9E3779B185EBCA8DULL, { 0xF313D63BCD414EBCULL, 0x9183C10CFFB6AB05ULL } }, /* XSUM_XXH128_testdata[341] */\n    {  114, 0x0000000000000000ULL, { 0x5EEDFBC1C0839954ULL, 0xB2CB838112031C9BULL } }, /* XSUM_XXH128_testdata[342] */\n    {  114, 0x000000009E3779B1ULL, { 0x7FFBFBB6812C9729ULL, 0xD2CD8F0E9DE2B62EULL } }, /* XSUM_XXH128_testdata[343] */\n    {  114, 0x9E3779B185EBCA8DULL, { 0x120EB136CD7496F6ULL, 0xC2729C8A03161D17ULL } }, /* XSUM_XXH128_testdata[344] */\n    {  115, 0x0000000000000000ULL, { 0x5714F956FD4064B5ULL, 0x2859A57B23922110ULL } }, /* XSUM_XXH128_testdata[345] */\n    {  115, 0x000000009E3779B1ULL, { 0x01D26CD386874BF2ULL, 0x9B1769220DDAE4F8ULL } }, /* XSUM_XXH128_testdata[346] */\n    {  115, 0x9E3779B185EBCA8DULL, { 0x2E93079715F0DC14ULL, 0xC0F0672937D62F61ULL } }, /* XSUM_XXH128_testdata[347] */\n    {  116, 0x0000000000000000ULL, { 0xBDB6A5A47E8369F3ULL, 0xE106B48794CB3613ULL } }, /* XSUM_XXH128_testdata[348] */\n    {  116, 0x000000009E3779B1ULL, { 0xBFFB034A9F103B34ULL, 0xA88F3C177E0FA6BDULL } }, /* XSUM_XXH128_testdata[349] */\n    {  116, 0x9E3779B185EBCA8DULL, { 0xFC4E8970BA2D4559ULL, 0xE6ACBF296C964BB8ULL } }, /* XSUM_XXH128_testdata[350] */\n    {  117, 0x0000000000000000ULL, { 0x40993FC9647CF40AULL, 0x97DFCFA9CA849ACFULL } }, /* XSUM_XXH128_testdata[351] */\n    {  117, 0x000000009E3779B1ULL, { 0x83CC2575DB07BE63ULL, 0xCFA88658960DF697ULL } }, /* XSUM_XXH128_testdata[352] */\n    {  117, 0x9E3779B185EBCA8DULL, { 0x007F07A7A107F13BULL, 0x472C045735260B07ULL } }, /* XSUM_XXH128_testdata[353] */\n    {  118, 0x0000000000000000ULL, { 0x3ECE876C2F2F9AE2ULL, 0x98D838C4E899E9FFULL } }, /* XSUM_XXH128_testdata[354] */\n    {  118, 0x000000009E3779B1ULL, { 0xEEDA24FB54CFF471ULL, 0x47A4E949D47C7893ULL } }, /* XSUM_XXH128_testdata[355] */\n    {  118, 0x9E3779B185EBCA8DULL, { 0xE2ACFCA5DEF28243ULL, 0xEF14CA9FEAD097DEULL } }, /* XSUM_XXH128_testdata[356] */\n    {  119, 0x0000000000000000ULL, { 0x61BA532DD0839814ULL, 0x73C164AF6AA708F3ULL } }, /* XSUM_XXH128_testdata[357] */\n    {  119, 0x000000009E3779B1ULL, { 0x00931CF6E2E9748CULL, 0x6CFEC232B660B809ULL } }, /* XSUM_XXH128_testdata[358] */\n    {  119, 0x9E3779B185EBCA8DULL, { 0x9FFF7FB2ACA4650AULL, 0x7396510EEDA87CE5ULL } }, /* XSUM_XXH128_testdata[359] */\n    {  120, 0x0000000000000000ULL, { 0x77850360863089F4ULL, 0x45513F9E48B29D17ULL } }, /* XSUM_XXH128_testdata[360] */\n    {  120, 0x000000009E3779B1ULL, { 0x9CA36F2EF86AF0F3ULL, 0x77D9A27E3C4EC41EULL } }, /* XSUM_XXH128_testdata[361] */\n    {  120, 0x9E3779B185EBCA8DULL, { 0x133EE825605B8D1FULL, 0xC2CF6AD7439D57AEULL } }, /* XSUM_XXH128_testdata[362] */\n    {  121, 0x0000000000000000ULL, { 0x412EC7799F36079EULL, 0x27834778272F8A99ULL } }, /* XSUM_XXH128_testdata[363] */\n    {  121, 0x000000009E3779B1ULL, { 0xB2BE527B7F46D13CULL, 0xA62C1F3E0BC1DD04ULL } }, /* XSUM_XXH128_testdata[364] */\n    {  121, 0x9E3779B185EBCA8DULL, { 0xE3A49B56C546E8CDULL, 0x967BF61A4F436969ULL } }, /* XSUM_XXH128_testdata[365] */\n    {  122, 0x0000000000000000ULL, { 0x8DF0BDDC58F396BAULL, 0x67FE645202C69869ULL } }, /* XSUM_XXH128_testdata[366] */\n    {  122, 0x000000009E3779B1ULL, { 0x6821B9120F708BD4ULL, 0x0FFEAAC28194F960ULL } }, /* XSUM_XXH128_testdata[367] */\n    {  122, 0x9E3779B185EBCA8DULL, { 0x8FFD5C284F7A1EB4ULL, 0x9EC80D4B51634777ULL } }, /* XSUM_XXH128_testdata[368] */\n    {  123, 0x0000000000000000ULL, { 0x252A79CD274A3C06ULL, 0x66A3E2BF29901FCBULL } }, /* XSUM_XXH128_testdata[369] */\n    {  123, 0x000000009E3779B1ULL, { 0xCC4FE2E5DC62F35FULL, 0x4F9D6C8F83ADA268ULL } }, /* XSUM_XXH128_testdata[370] */\n    {  123, 0x9E3779B185EBCA8DULL, { 0x79490C337A510471ULL, 0x7FDC7DBD2827D1A5ULL } }, /* XSUM_XXH128_testdata[371] */\n    {  124, 0x0000000000000000ULL, { 0x4BD723E070B780BEULL, 0x7ABFEF3BCF703AF4ULL } }, /* XSUM_XXH128_testdata[372] */\n    {  124, 0x000000009E3779B1ULL, { 0x6FEA6C419CF974C0ULL, 0x937EB4762A3C0FDFULL } }, /* XSUM_XXH128_testdata[373] */\n    {  124, 0x9E3779B185EBCA8DULL, { 0x948FD10DF9B78298ULL, 0x99F89AA63A36F1E7ULL } }, /* XSUM_XXH128_testdata[374] */\n    {  125, 0x0000000000000000ULL, { 0x98E5D7D018FA2E32ULL, 0xA55B9F11F2EF2FF5ULL } }, /* XSUM_XXH128_testdata[375] */\n    {  125, 0x000000009E3779B1ULL, { 0xD24B148FEE6B8A87ULL, 0x5F351E780E634FE6ULL } }, /* XSUM_XXH128_testdata[376] */\n    {  125, 0x9E3779B185EBCA8DULL, { 0xD6A843154546F3A9ULL, 0x67301D5AC2EFE67CULL } }, /* XSUM_XXH128_testdata[377] */\n    {  126, 0x0000000000000000ULL, { 0x791F59F0254AF4D7ULL, 0x0D7DE2705733BF09ULL } }, /* XSUM_XXH128_testdata[378] */\n    {  126, 0x000000009E3779B1ULL, { 0x669D1673D8D23412ULL, 0xC1A5BE856D55D891ULL } }, /* XSUM_XXH128_testdata[379] */\n    {  126, 0x9E3779B185EBCA8DULL, { 0x51B423A9882C36A3ULL, 0xBB4F1FAC091D3E0DULL } }, /* XSUM_XXH128_testdata[380] */\n    {  127, 0x0000000000000000ULL, { 0x802A565A8A79A999ULL, 0xDCFAE8002712DB1CULL } }, /* XSUM_XXH128_testdata[381] */\n    {  127, 0x000000009E3779B1ULL, { 0x716A7D18E9019E45ULL, 0xFD507AF3EDE62925ULL } }, /* XSUM_XXH128_testdata[382] */\n    {  127, 0x9E3779B185EBCA8DULL, { 0x54C9D67F8B29DC74ULL, 0x37452E1967D3445BULL } }, /* XSUM_XXH128_testdata[383] */\n    {  128, 0x0000000000000000ULL, { 0xEBB15E34A7FB5AB1ULL, 0x39992220E045260AULL } }, /* XSUM_XXH128_testdata[384] */\n    {  128, 0x000000009E3779B1ULL, { 0x1453819941D93C1DULL, 0x98801187DF8D614DULL } }, /* XSUM_XXH128_testdata[385] */\n    {  128, 0x9E3779B185EBCA8DULL, { 0x8394F5C51F1D8246ULL, 0xA0F7CCB68EE02ADDULL } }, /* XSUM_XXH128_testdata[386] */\n    {  129, 0x0000000000000000ULL, { 0x86C9E3BC8F0A3B5CULL, 0x03815FC91F1B30B6ULL } }, /* XSUM_XXH128_testdata[387] */\n    {  129, 0x000000009E3779B1ULL, { 0xB37B716F66B40F02ULL, 0xB7F7349A47B39E56ULL } }, /* XSUM_XXH128_testdata[388] */\n    {  129, 0x9E3779B185EBCA8DULL, { 0xD4AAE26FCEC7DC03ULL, 0xAD559266067C0BF3ULL } }, /* XSUM_XXH128_testdata[389] */\n    {  130, 0x0000000000000000ULL, { 0xBE0500E135CD4B35ULL, 0x90E701A84D20072FULL } }, /* XSUM_XXH128_testdata[390] */\n    {  130, 0x000000009E3779B1ULL, { 0x9A57F1A0DAABA6EFULL, 0xDB12071B9DA3EFFEULL } }, /* XSUM_XXH128_testdata[391] */\n    {  130, 0x9E3779B185EBCA8DULL, { 0xC2822B8E003156EEULL, 0x2441E0A784D4545AULL } }, /* XSUM_XXH128_testdata[392] */\n    {  131, 0x0000000000000000ULL, { 0xA2A68E4E1A723CD9ULL, 0xDB6FD9480E25B28FULL } }, /* XSUM_XXH128_testdata[393] */\n    {  131, 0x000000009E3779B1ULL, { 0xE6623C11F08FEED9ULL, 0x04854D7A8DD8C887ULL } }, /* XSUM_XXH128_testdata[394] */\n    {  131, 0x9E3779B185EBCA8DULL, { 0x2EEE92A467C6BD9DULL, 0xD132FB363EE04A40ULL } }, /* XSUM_XXH128_testdata[395] */\n    {  132, 0x0000000000000000ULL, { 0xD3CD173CFE2A46F8ULL, 0x6FE6FF322C659EE4ULL } }, /* XSUM_XXH128_testdata[396] */\n    {  132, 0x000000009E3779B1ULL, { 0xECE4886A21B7B354ULL, 0x186AF2B80426D4F2ULL } }, /* XSUM_XXH128_testdata[397] */\n    {  132, 0x9E3779B185EBCA8DULL, { 0x76A0E934130952A4ULL, 0xD49012DD9657D5D3ULL } }, /* XSUM_XXH128_testdata[398] */\n    {  133, 0x0000000000000000ULL, { 0xFB05A39ED5ED0DC2ULL, 0xF28DB9BCFEDB59F4ULL } }, /* XSUM_XXH128_testdata[399] */\n    {  133, 0x000000009E3779B1ULL, { 0x322AAEA581D0BA3DULL, 0x3949FECEEEA6E47CULL } }, /* XSUM_XXH128_testdata[400] */\n    {  133, 0x9E3779B185EBCA8DULL, { 0x0E5BD21FA3DF3D7BULL, 0x787C341C196F469BULL } }, /* XSUM_XXH128_testdata[401] */\n    {  134, 0x0000000000000000ULL, { 0x60FDC3103789E42AULL, 0xA679218704C206F9ULL } }, /* XSUM_XXH128_testdata[402] */\n    {  134, 0x000000009E3779B1ULL, { 0xBA80A97CE0734F20ULL, 0xA712B539A6463AA0ULL } }, /* XSUM_XXH128_testdata[403] */\n    {  134, 0x9E3779B185EBCA8DULL, { 0xEBE3B585E22F2E80ULL, 0xBFF8880F4F9558C0ULL } }, /* XSUM_XXH128_testdata[404] */\n    {  135, 0x0000000000000000ULL, { 0x70CC82687B4D26A6ULL, 0xDA9588154C0D7D52ULL } }, /* XSUM_XXH128_testdata[405] */\n    {  135, 0x000000009E3779B1ULL, { 0x4B15D843CE698241ULL, 0xCD9C51CC85D232DCULL } }, /* XSUM_XXH128_testdata[406] */\n    {  135, 0x9E3779B185EBCA8DULL, { 0xC2E436E2F3911DFEULL, 0xA8CBD0B492FFAFCAULL } }, /* XSUM_XXH128_testdata[407] */\n    {  136, 0x0000000000000000ULL, { 0x2D7F5A0B8DE9DBE2ULL, 0x31559ABED93686A2ULL } }, /* XSUM_XXH128_testdata[408] */\n    {  136, 0x000000009E3779B1ULL, { 0x149894095C6349E6ULL, 0xE5F243F2750BB526ULL } }, /* XSUM_XXH128_testdata[409] */\n    {  136, 0x9E3779B185EBCA8DULL, { 0x839A54295AD0F8B4ULL, 0xF1BF48BF5E5EC565ULL } }, /* XSUM_XXH128_testdata[410] */\n    {  137, 0x0000000000000000ULL, { 0x77FFE53D6FF3A45EULL, 0x99FAF7552BD08FE5ULL } }, /* XSUM_XXH128_testdata[411] */\n    {  137, 0x000000009E3779B1ULL, { 0x5E2731670605BD8AULL, 0xC3EE83B78101DD03ULL } }, /* XSUM_XXH128_testdata[412] */\n    {  137, 0x9E3779B185EBCA8DULL, { 0xE632B29C97907EE4ULL, 0x99AF7A4F363622E2ULL } }, /* XSUM_XXH128_testdata[413] */\n    {  138, 0x0000000000000000ULL, { 0x0153EFF4BF147B2EULL, 0xA7284226C75879EFULL } }, /* XSUM_XXH128_testdata[414] */\n    {  138, 0x000000009E3779B1ULL, { 0x168B837889200687ULL, 0x34E4298980BBAF00ULL } }, /* XSUM_XXH128_testdata[415] */\n    {  138, 0x9E3779B185EBCA8DULL, { 0xB09E3F3BF356F386ULL, 0x75571836F57663DEULL } }, /* XSUM_XXH128_testdata[416] */\n    {  139, 0x0000000000000000ULL, { 0xC8469CA23996877EULL, 0x25FD71D22BB3C7AFULL } }, /* XSUM_XXH128_testdata[417] */\n    {  139, 0x000000009E3779B1ULL, { 0xACB1ED4C6D1752B8ULL, 0xF21E8C37D6DDBA51ULL } }, /* XSUM_XXH128_testdata[418] */\n    {  139, 0x9E3779B185EBCA8DULL, { 0x5F07BACF719B9F3FULL, 0x98DAB323D83C96AAULL } }, /* XSUM_XXH128_testdata[419] */\n    {  140, 0x0000000000000000ULL, { 0xED9989B70CE1316AULL, 0xE60F153CF2250422ULL } }, /* XSUM_XXH128_testdata[420] */\n    {  140, 0x000000009E3779B1ULL, { 0x323B5760491081C3ULL, 0x416FEE87188D80E0ULL } }, /* XSUM_XXH128_testdata[421] */\n    {  140, 0x9E3779B185EBCA8DULL, { 0x910D6E3506B4EF9FULL, 0xF6BE7B8D253D1B46ULL } }, /* XSUM_XXH128_testdata[422] */\n    {  141, 0x0000000000000000ULL, { 0x7C9EBD5A10698091ULL, 0xD742115330A660E1ULL } }, /* XSUM_XXH128_testdata[423] */\n    {  141, 0x000000009E3779B1ULL, { 0x7255C59EACAB5302ULL, 0x84560FA5E5E0669EULL } }, /* XSUM_XXH128_testdata[424] */\n    {  141, 0x9E3779B185EBCA8DULL, { 0xE132766C53493CD8ULL, 0xD9DC920DC9BE2BD8ULL } }, /* XSUM_XXH128_testdata[425] */\n    {  142, 0x0000000000000000ULL, { 0xA485A2E1A9CF87D4ULL, 0x1D2C8CC4C252E479ULL } }, /* XSUM_XXH128_testdata[426] */\n    {  142, 0x000000009E3779B1ULL, { 0xE7C72930BFFEB4EDULL, 0xFFB8094B29DD8505ULL } }, /* XSUM_XXH128_testdata[427] */\n    {  142, 0x9E3779B185EBCA8DULL, { 0xC7D31FAA957B1F88ULL, 0x0183A4BB6B82436FULL } }, /* XSUM_XXH128_testdata[428] */\n    {  143, 0x0000000000000000ULL, { 0xF78F1BA6D125F4CAULL, 0x50F51D7620BC4CCDULL } }, /* XSUM_XXH128_testdata[429] */\n    {  143, 0x000000009E3779B1ULL, { 0x690490F7B64D8034ULL, 0x81D07893DBB53EC1ULL } }, /* XSUM_XXH128_testdata[430] */\n    {  143, 0x9E3779B185EBCA8DULL, { 0xFDD8F2790B0B4892ULL, 0x52E8FE4E3B3D974DULL } }, /* XSUM_XXH128_testdata[431] */\n    {  144, 0x0000000000000000ULL, { 0x7A9080376C0E4B95ULL, 0x19A5EE4A79AA5123ULL } }, /* XSUM_XXH128_testdata[432] */\n    {  144, 0x000000009E3779B1ULL, { 0xCD02A5D75A538041ULL, 0x9CE270294A250167ULL } }, /* XSUM_XXH128_testdata[433] */\n    {  144, 0x9E3779B185EBCA8DULL, { 0x3F757AA797A6DFCCULL, 0xE93BF6D2478A9C7EULL } }, /* XSUM_XXH128_testdata[434] */\n    {  145, 0x0000000000000000ULL, { 0x9225A44C6C1C1C4FULL, 0x4A72A70815C6A1E3ULL } }, /* XSUM_XXH128_testdata[435] */\n    {  145, 0x000000009E3779B1ULL, { 0xF9A505AD35B1D1A1ULL, 0xD32603702F549CB2ULL } }, /* XSUM_XXH128_testdata[436] */\n    {  145, 0x9E3779B185EBCA8DULL, { 0xD7EE4677DA29E246ULL, 0xE5A0A526434820A7ULL } }, /* XSUM_XXH128_testdata[437] */\n    {  146, 0x0000000000000000ULL, { 0x40A15985719F30AFULL, 0x3AF89AB266FF47E9ULL } }, /* XSUM_XXH128_testdata[438] */\n    {  146, 0x000000009E3779B1ULL, { 0x70FDEE50043CA8CEULL, 0x2CADFCC11196EF12ULL } }, /* XSUM_XXH128_testdata[439] */\n    {  146, 0x9E3779B185EBCA8DULL, { 0xB44548C62B937522ULL, 0xC98DD5068F11BB62ULL } }, /* XSUM_XXH128_testdata[440] */\n    {  147, 0x0000000000000000ULL, { 0x21D82898DB0F38D6ULL, 0xF17CF18AB0FB1AD6ULL } }, /* XSUM_XXH128_testdata[441] */\n    {  147, 0x000000009E3779B1ULL, { 0x39380B0117C13CBAULL, 0xD22751DD43CFCBC2ULL } }, /* XSUM_XXH128_testdata[442] */\n    {  147, 0x9E3779B185EBCA8DULL, { 0x45E700951B437480ULL, 0x53891CB7D2D426C7ULL } }, /* XSUM_XXH128_testdata[443] */\n    {  148, 0x0000000000000000ULL, { 0xD839C7301D20E1FBULL, 0xF646940B63AB176DULL } }, /* XSUM_XXH128_testdata[444] */\n    {  148, 0x000000009E3779B1ULL, { 0xAE8251CCAEF02A36ULL, 0x3C56F1B980E8010DULL } }, /* XSUM_XXH128_testdata[445] */\n    {  148, 0x9E3779B185EBCA8DULL, { 0x35945EB4E874EAF2ULL, 0xCFEFF02FB2189151ULL } }, /* XSUM_XXH128_testdata[446] */\n    {  149, 0x0000000000000000ULL, { 0x0C445119F40CE6DEULL, 0x8DC51E994A0AC308ULL } }, /* XSUM_XXH128_testdata[447] */\n    {  149, 0x000000009E3779B1ULL, { 0xCFE993F724D8953DULL, 0x0F4481EB4D101766ULL } }, /* XSUM_XXH128_testdata[448] */\n    {  149, 0x9E3779B185EBCA8DULL, { 0x1D2361BF767A86B4ULL, 0x61DE05E593958AE9ULL } }, /* XSUM_XXH128_testdata[449] */\n    {  150, 0x0000000000000000ULL, { 0x709C3E3190C65781ULL, 0xCD033E3570AA7910ULL } }, /* XSUM_XXH128_testdata[450] */\n    {  150, 0x000000009E3779B1ULL, { 0xF7C5AA76AA724104ULL, 0x4397E341E4FC5863ULL } }, /* XSUM_XXH128_testdata[451] */\n    {  150, 0x9E3779B185EBCA8DULL, { 0x679FCCD06DFD8638ULL, 0x84A028E0DCE2F968ULL } }, /* XSUM_XXH128_testdata[452] */\n    {  151, 0x0000000000000000ULL, { 0x439E485CC84385ACULL, 0x96D3888A6C5D736FULL } }, /* XSUM_XXH128_testdata[453] */\n    {  151, 0x000000009E3779B1ULL, { 0xDFCE791E907DECD2ULL, 0x585718F8E4AF9957ULL } }, /* XSUM_XXH128_testdata[454] */\n    {  151, 0x9E3779B185EBCA8DULL, { 0x14159F21D8F49239ULL, 0xC347CDF51580405DULL } }, /* XSUM_XXH128_testdata[455] */\n    {  152, 0x0000000000000000ULL, { 0x9420B2B4CC4F9009ULL, 0xC6ED1B2965A019C7ULL } }, /* XSUM_XXH128_testdata[456] */\n    {  152, 0x000000009E3779B1ULL, { 0xF1320477F3A9D298ULL, 0x26BA6A67A3088EBDULL } }, /* XSUM_XXH128_testdata[457] */\n    {  152, 0x9E3779B185EBCA8DULL, { 0x93C0FF7874E89F39ULL, 0x33B15589CE260F4EULL } }, /* XSUM_XXH128_testdata[458] */\n    {  153, 0x0000000000000000ULL, { 0xFBE0A1AF66B5CB47ULL, 0x8038658C1A25843BULL } }, /* XSUM_XXH128_testdata[459] */\n    {  153, 0x000000009E3779B1ULL, { 0x6AE60E33B5C811BFULL, 0x8EC69441FAA270D3ULL } }, /* XSUM_XXH128_testdata[460] */\n    {  153, 0x9E3779B185EBCA8DULL, { 0x5E1A7144B96A690AULL, 0xE1B1D6D59CB7500BULL } }, /* XSUM_XXH128_testdata[461] */\n    {  154, 0x0000000000000000ULL, { 0x665B782DCCC04A28ULL, 0x86F010070B0F6168ULL } }, /* XSUM_XXH128_testdata[462] */\n    {  154, 0x000000009E3779B1ULL, { 0x8413DB8D4AC122C1ULL, 0x3B4010F3186BAA56ULL } }, /* XSUM_XXH128_testdata[463] */\n    {  154, 0x9E3779B185EBCA8DULL, { 0x911381B9D5057D1EULL, 0x552BA223F182F2B6ULL } }, /* XSUM_XXH128_testdata[464] */\n    {  155, 0x0000000000000000ULL, { 0xE5716C6BC16C0A12ULL, 0xF627B85C8BB33F39ULL } }, /* XSUM_XXH128_testdata[465] */\n    {  155, 0x000000009E3779B1ULL, { 0x0BA453CEC3BEA042ULL, 0x5A0154F2B2AC28E2ULL } }, /* XSUM_XXH128_testdata[466] */\n    {  155, 0x9E3779B185EBCA8DULL, { 0x77066AEF097D0399ULL, 0x4CF40129FD821538ULL } }, /* XSUM_XXH128_testdata[467] */\n    {  156, 0x0000000000000000ULL, { 0xEC07A411862810BCULL, 0xBA173954CCCAECBEULL } }, /* XSUM_XXH128_testdata[468] */\n    {  156, 0x000000009E3779B1ULL, { 0x6655545410859452ULL, 0x5354CFBC79F61730ULL } }, /* XSUM_XXH128_testdata[469] */\n    {  156, 0x9E3779B185EBCA8DULL, { 0x1C33D50FB905E0ECULL, 0x31B25BF842D0B6C6ULL } }, /* XSUM_XXH128_testdata[470] */\n    {  157, 0x0000000000000000ULL, { 0xF8CEFDC55ED68ACDULL, 0xBDB71850E0313847ULL } }, /* XSUM_XXH128_testdata[471] */\n    {  157, 0x000000009E3779B1ULL, { 0x04A423449A963BD7ULL, 0xC508E8FB5612B401ULL } }, /* XSUM_XXH128_testdata[472] */\n    {  157, 0x9E3779B185EBCA8DULL, { 0x0214B87F711AFBADULL, 0xB29D8E8A7E1A990EULL } }, /* XSUM_XXH128_testdata[473] */\n    {  158, 0x0000000000000000ULL, { 0x05FDEC4A362F5BB3ULL, 0x34D03563FF3494EFULL } }, /* XSUM_XXH128_testdata[474] */\n    {  158, 0x000000009E3779B1ULL, { 0x549E0F24FA709B1DULL, 0xE6C08FD28245F36DULL } }, /* XSUM_XXH128_testdata[475] */\n    {  158, 0x9E3779B185EBCA8DULL, { 0x109B72FAE88C0693ULL, 0x764D445CA5DD7B7BULL } }, /* XSUM_XXH128_testdata[476] */\n    {  159, 0x0000000000000000ULL, { 0x996ED46536CC0EF5ULL, 0x37562EA4AC14C650ULL } }, /* XSUM_XXH128_testdata[477] */\n    {  159, 0x000000009E3779B1ULL, { 0xD21A18E94171F9A8ULL, 0xE1B6E30FBE450D08ULL } }, /* XSUM_XXH128_testdata[478] */\n    {  159, 0x9E3779B185EBCA8DULL, { 0x9BB496BB4447B646ULL, 0xC6F19F9E4243B251ULL } }, /* XSUM_XXH128_testdata[479] */\n    {  160, 0x0000000000000000ULL, { 0x737126C8D7C09CEEULL, 0xBA5D218964B622ADULL } }, /* XSUM_XXH128_testdata[480] */\n    {  160, 0x000000009E3779B1ULL, { 0x1D704868FFB6EE1BULL, 0xA9BBBF6674F8D58BULL } }, /* XSUM_XXH128_testdata[481] */\n    {  160, 0x9E3779B185EBCA8DULL, { 0x46A4A3F67CCD556EULL, 0xC6B7ABC26DEF52ACULL } }, /* XSUM_XXH128_testdata[482] */\n    {  161, 0x0000000000000000ULL, { 0x524BF4F00D882C4EULL, 0x58621E54439EE75CULL } }, /* XSUM_XXH128_testdata[483] */\n    {  161, 0x000000009E3779B1ULL, { 0xA7363F022EAA59B7ULL, 0x8D2FFF2FC20AD14AULL } }, /* XSUM_XXH128_testdata[484] */\n    {  161, 0x9E3779B185EBCA8DULL, { 0x969723DC5EB12AEBULL, 0x940856FBF1AB951DULL } }, /* XSUM_XXH128_testdata[485] */\n    {  162, 0x0000000000000000ULL, { 0x7CF2E61CE6B123EBULL, 0xED96D13029A46949ULL } }, /* XSUM_XXH128_testdata[486] */\n    {  162, 0x000000009E3779B1ULL, { 0xACD232E85A29D7A4ULL, 0x9CF03D7B20A8E3B9ULL } }, /* XSUM_XXH128_testdata[487] */\n    {  162, 0x9E3779B185EBCA8DULL, { 0x9D81B8EFBD4CC484ULL, 0x62418816D0248021ULL } }, /* XSUM_XXH128_testdata[488] */\n    {  163, 0x0000000000000000ULL, { 0x604AAF2FC58B4F46ULL, 0x25CCC325ABFE2291ULL } }, /* XSUM_XXH128_testdata[489] */\n    {  163, 0x000000009E3779B1ULL, { 0xA4871DA417746C07ULL, 0x1F191FAEE13AB03AULL } }, /* XSUM_XXH128_testdata[490] */\n    {  163, 0x9E3779B185EBCA8DULL, { 0x12757D04DEDCE068ULL, 0x0C4A99631E46FCD2ULL } }, /* XSUM_XXH128_testdata[491] */\n    {  164, 0x0000000000000000ULL, { 0x139817F6A479DEAEULL, 0x90C51D4A01A92DD4ULL } }, /* XSUM_XXH128_testdata[492] */\n    {  164, 0x000000009E3779B1ULL, { 0x1FF333F07D6CDE89ULL, 0x286A4CDB24538FF5ULL } }, /* XSUM_XXH128_testdata[493] */\n    {  164, 0x9E3779B185EBCA8DULL, { 0xFC8B8C2F1DC7ECAFULL, 0x687D49C2D55209ACULL } }, /* XSUM_XXH128_testdata[494] */\n    {  165, 0x0000000000000000ULL, { 0x29D2E006C1272E59ULL, 0x38427C603A3C21FAULL } }, /* XSUM_XXH128_testdata[495] */\n    {  165, 0x000000009E3779B1ULL, { 0xB29EA958A48BEF2CULL, 0x1FCF3DFD2EDB2858ULL } }, /* XSUM_XXH128_testdata[496] */\n    {  165, 0x9E3779B185EBCA8DULL, { 0xEA25B077C6876685ULL, 0x7EA73F264B437B92ULL } }, /* XSUM_XXH128_testdata[497] */\n    {  166, 0x0000000000000000ULL, { 0x365D232548A2A000ULL, 0x88A32D78085046C8ULL } }, /* XSUM_XXH128_testdata[498] */\n    {  166, 0x000000009E3779B1ULL, { 0x9961177E0D732B3EULL, 0x37C667F5AECE020EULL } }, /* XSUM_XXH128_testdata[499] */\n    {  166, 0x9E3779B185EBCA8DULL, { 0xA52AA8E2351B26B6ULL, 0x729254B0E2E3BAF4ULL } }, /* XSUM_XXH128_testdata[500] */\n    {  167, 0x0000000000000000ULL, { 0xA420AA65E515D3E3ULL, 0x2E7FEE967056790FULL } }, /* XSUM_XXH128_testdata[501] */\n    {  167, 0x000000009E3779B1ULL, { 0x5F09A37F733347FCULL, 0xD58FC6CFB14CA8F0ULL } }, /* XSUM_XXH128_testdata[502] */\n    {  167, 0x9E3779B185EBCA8DULL, { 0xA0B93F3BDBBE82B3ULL, 0x0BFBAFC9ADE614B4ULL } }, /* XSUM_XXH128_testdata[503] */\n    {  168, 0x0000000000000000ULL, { 0xEB4270667F3E083DULL, 0x056D83D0E4962923ULL } }, /* XSUM_XXH128_testdata[504] */\n    {  168, 0x000000009E3779B1ULL, { 0x95C6A8076EC36C10ULL, 0xB893779E7B52FF67ULL } }, /* XSUM_XXH128_testdata[505] */\n    {  168, 0x9E3779B185EBCA8DULL, { 0xB4F88D42549E2934ULL, 0x6A47F866A0820F0AULL } }, /* XSUM_XXH128_testdata[506] */\n    {  169, 0x0000000000000000ULL, { 0xF087F6B500497312ULL, 0xCABE57F9E0561CD7ULL } }, /* XSUM_XXH128_testdata[507] */\n    {  169, 0x000000009E3779B1ULL, { 0xBCE27B985B884049ULL, 0x80BF0AFC4C9A6F74ULL } }, /* XSUM_XXH128_testdata[508] */\n    {  169, 0x9E3779B185EBCA8DULL, { 0x754D47CEE8F148DEULL, 0x489ADE6F4A1624EBULL } }, /* XSUM_XXH128_testdata[509] */\n    {  170, 0x0000000000000000ULL, { 0xD9F1E8DBA33B6C77ULL, 0xB8A6DD8655688E87ULL } }, /* XSUM_XXH128_testdata[510] */\n    {  170, 0x000000009E3779B1ULL, { 0x3F88520576385162ULL, 0x263C0A0550EFC688ULL } }, /* XSUM_XXH128_testdata[511] */\n    {  170, 0x9E3779B185EBCA8DULL, { 0x138351CCA0B62376ULL, 0x42DED80911FFD395ULL } }, /* XSUM_XXH128_testdata[512] */\n    {  171, 0x0000000000000000ULL, { 0xBFD80BD8594A6B78ULL, 0x4F69E052DCFE6262ULL } }, /* XSUM_XXH128_testdata[513] */\n    {  171, 0x000000009E3779B1ULL, { 0x8EAF49000D25B63BULL, 0x433E21488889A0A6ULL } }, /* XSUM_XXH128_testdata[514] */\n    {  171, 0x9E3779B185EBCA8DULL, { 0xDC8A3B8DE5E863B3ULL, 0x7090E116D95FC60EULL } }, /* XSUM_XXH128_testdata[515] */\n    {  172, 0x0000000000000000ULL, { 0x780C36739A852F25ULL, 0xA7E2EA094274B5D4ULL } }, /* XSUM_XXH128_testdata[516] */\n    {  172, 0x000000009E3779B1ULL, { 0x03A758619840572EULL, 0xF28DD093C5361280ULL } }, /* XSUM_XXH128_testdata[517] */\n    {  172, 0x9E3779B185EBCA8DULL, { 0x9FC412E027E7E358ULL, 0xA8C23B3130A5E17FULL } }, /* XSUM_XXH128_testdata[518] */\n    {  173, 0x0000000000000000ULL, { 0xAB2241924335A85AULL, 0x94D1A99001D5B6F1ULL } }, /* XSUM_XXH128_testdata[519] */\n    {  173, 0x000000009E3779B1ULL, { 0xBE8CAFA700F81F8EULL, 0x6323CDB5605D3056ULL } }, /* XSUM_XXH128_testdata[520] */\n    {  173, 0x9E3779B185EBCA8DULL, { 0x90A91C9F428DBFD3ULL, 0xCB3902983AB10509ULL } }, /* XSUM_XXH128_testdata[521] */\n    {  174, 0x0000000000000000ULL, { 0x574E6CDC0F7E41DEULL, 0x16C76F1384003D1BULL } }, /* XSUM_XXH128_testdata[522] */\n    {  174, 0x000000009E3779B1ULL, { 0x4746962EBFF89DCBULL, 0xE01A604288BF64BCULL } }, /* XSUM_XXH128_testdata[523] */\n    {  174, 0x9E3779B185EBCA8DULL, { 0x8893352EE38BD483ULL, 0x460837CB90F0E654ULL } }, /* XSUM_XXH128_testdata[524] */\n    {  175, 0x0000000000000000ULL, { 0x610FEEE7A8284D41ULL, 0x7C02129665C4658DULL } }, /* XSUM_XXH128_testdata[525] */\n    {  175, 0x000000009E3779B1ULL, { 0x7B6272DAE3EF46ACULL, 0xD1FD60FF78C0E440ULL } }, /* XSUM_XXH128_testdata[526] */\n    {  175, 0x9E3779B185EBCA8DULL, { 0x463691661D22B735ULL, 0x3CF14F9E62E44ED4ULL } }, /* XSUM_XXH128_testdata[527] */\n    {  176, 0x0000000000000000ULL, { 0x44D5606C76F151ADULL, 0xF90FFA43B3A4CD01ULL } }, /* XSUM_XXH128_testdata[528] */\n    {  176, 0x000000009E3779B1ULL, { 0x3A13B7E5DD45532CULL, 0xEB3BCDBA5C9BC40AULL } }, /* XSUM_XXH128_testdata[529] */\n    {  176, 0x9E3779B185EBCA8DULL, { 0x1D04BD13600700FCULL, 0x613A5CC0F6AC8C64ULL } }, /* XSUM_XXH128_testdata[530] */\n    {  177, 0x0000000000000000ULL, { 0xA4D10FBCDEBE1D87ULL, 0x5E0198288258C06AULL } }, /* XSUM_XXH128_testdata[531] */\n    {  177, 0x000000009E3779B1ULL, { 0x78FBC4B5458AC6D6ULL, 0x710D425E819F6FCFULL } }, /* XSUM_XXH128_testdata[532] */\n    {  177, 0x9E3779B185EBCA8DULL, { 0xE4701AA17FDA3CC6ULL, 0x047F78D87C17371AULL } }, /* XSUM_XXH128_testdata[533] */\n    {  178, 0x0000000000000000ULL, { 0xD530543C56325AA6ULL, 0x1C652FF1237BE271ULL } }, /* XSUM_XXH128_testdata[534] */\n    {  178, 0x000000009E3779B1ULL, { 0x7AD6FDCBF2D7E4FFULL, 0x0C6DCD2B4B9D05E4ULL } }, /* XSUM_XXH128_testdata[535] */\n    {  178, 0x9E3779B185EBCA8DULL, { 0x8B3253CD68130CEEULL, 0x1914781A48E3359AULL } }, /* XSUM_XXH128_testdata[536] */\n    {  179, 0x0000000000000000ULL, { 0xC1E251824DCFB5BDULL, 0x7425597A0ADC6F9EULL } }, /* XSUM_XXH128_testdata[537] */\n    {  179, 0x000000009E3779B1ULL, { 0x595DFD7B3905A785ULL, 0x126B55DBF414D7BBULL } }, /* XSUM_XXH128_testdata[538] */\n    {  179, 0x9E3779B185EBCA8DULL, { 0x9722F4368CF844FBULL, 0x73C788144D19B870ULL } }, /* XSUM_XXH128_testdata[539] */\n    {  180, 0x0000000000000000ULL, { 0xA0F944F6FD194D87ULL, 0x641CFBD57B394906ULL } }, /* XSUM_XXH128_testdata[540] */\n    {  180, 0x000000009E3779B1ULL, { 0xE3D7CED3B798C99BULL, 0x4F6DD26744C4473DULL } }, /* XSUM_XXH128_testdata[541] */\n    {  180, 0x9E3779B185EBCA8DULL, { 0x58EB13D0324FC412ULL, 0x94ECF18291ED3173ULL } }, /* XSUM_XXH128_testdata[542] */\n    {  181, 0x0000000000000000ULL, { 0x5B13ACA312A121F2ULL, 0xA0C08821C110495DULL } }, /* XSUM_XXH128_testdata[543] */\n    {  181, 0x000000009E3779B1ULL, { 0x179956EDA9DE7474ULL, 0x7CDBEB9A840C4CE8ULL } }, /* XSUM_XXH128_testdata[544] */\n    {  181, 0x9E3779B185EBCA8DULL, { 0x1E51B4B107A8EA5CULL, 0xD58B5078105870E4ULL } }, /* XSUM_XXH128_testdata[545] */\n    {  182, 0x0000000000000000ULL, { 0x1907A81E5F749F6CULL, 0xB983370C90BEF231ULL } }, /* XSUM_XXH128_testdata[546] */\n    {  182, 0x000000009E3779B1ULL, { 0x05E7F0B36DD8CB0CULL, 0x8398ADA57C556952ULL } }, /* XSUM_XXH128_testdata[547] */\n    {  182, 0x9E3779B185EBCA8DULL, { 0x23637A8450EDD0E0ULL, 0xBC5498F9F8943F4DULL } }, /* XSUM_XXH128_testdata[548] */\n    {  183, 0x0000000000000000ULL, { 0xB38F58407EC89D80ULL, 0x2287F3DF41CF01C1ULL } }, /* XSUM_XXH128_testdata[549] */\n    {  183, 0x000000009E3779B1ULL, { 0xFAFDDF7231A7570DULL, 0x682501379F6DA24EULL } }, /* XSUM_XXH128_testdata[550] */\n    {  183, 0x9E3779B185EBCA8DULL, { 0xA72F9A73DF88AFB0ULL, 0xB43A50EF2834272FULL } }, /* XSUM_XXH128_testdata[551] */\n    {  184, 0x0000000000000000ULL, { 0x349E98954831A5AAULL, 0x1EFD3521A871FED3ULL } }, /* XSUM_XXH128_testdata[552] */\n    {  184, 0x000000009E3779B1ULL, { 0xCA6E7A443E9ED871ULL, 0xB938434B41B405DEULL } }, /* XSUM_XXH128_testdata[553] */\n    {  184, 0x9E3779B185EBCA8DULL, { 0x9537C2CB7AC8DFE4ULL, 0xC3D45C0287753BC0ULL } }, /* XSUM_XXH128_testdata[554] */\n    {  185, 0x0000000000000000ULL, { 0x669EA6CC6E093E83ULL, 0x741ED464EB81E275ULL } }, /* XSUM_XXH128_testdata[555] */\n    {  185, 0x000000009E3779B1ULL, { 0x5A691A43A237D346ULL, 0x383092EAEFD29E97ULL } }, /* XSUM_XXH128_testdata[556] */\n    {  185, 0x9E3779B185EBCA8DULL, { 0x3560644D9962ABF7ULL, 0x7B58C133A0DC52AFULL } }, /* XSUM_XXH128_testdata[557] */\n    {  186, 0x0000000000000000ULL, { 0x38652877018DF616ULL, 0xB50ABA2B0481E617ULL } }, /* XSUM_XXH128_testdata[558] */\n    {  186, 0x000000009E3779B1ULL, { 0x78167CFA75FD08D1ULL, 0xB6F3C4ED0F162678ULL } }, /* XSUM_XXH128_testdata[559] */\n    {  186, 0x9E3779B185EBCA8DULL, { 0xC055F1E5FF617CDBULL, 0xEA02097AFA84D1B7ULL } }, /* XSUM_XXH128_testdata[560] */\n    {  187, 0x0000000000000000ULL, { 0xD0402B24F4B7498BULL, 0xDDB2644A68C1F2F9ULL } }, /* XSUM_XXH128_testdata[561] */\n    {  187, 0x000000009E3779B1ULL, { 0xC765757972E19A24ULL, 0x8EF7B4C2222887D5ULL } }, /* XSUM_XXH128_testdata[562] */\n    {  187, 0x9E3779B185EBCA8DULL, { 0x5C1C11DC6C472E99ULL, 0xC9E079094F9DD6C1ULL } }, /* XSUM_XXH128_testdata[563] */\n    {  188, 0x0000000000000000ULL, { 0x48F8A291FA8BAA16ULL, 0xD2AC8ECB6EBCE5DDULL } }, /* XSUM_XXH128_testdata[564] */\n    {  188, 0x000000009E3779B1ULL, { 0x6D5379F122993202ULL, 0x04F8193186A526CAULL } }, /* XSUM_XXH128_testdata[565] */\n    {  188, 0x9E3779B185EBCA8DULL, { 0x6226D8EDD603F185ULL, 0xFAF9061F16D1B574ULL } }, /* XSUM_XXH128_testdata[566] */\n    {  189, 0x0000000000000000ULL, { 0x3A77D72B528E0791ULL, 0xDF9226E66D8AD1F6ULL } }, /* XSUM_XXH128_testdata[567] */\n    {  189, 0x000000009E3779B1ULL, { 0x5F7B9E8AE77FA96FULL, 0x73165E30B7F20B89ULL } }, /* XSUM_XXH128_testdata[568] */\n    {  189, 0x9E3779B185EBCA8DULL, { 0xE25E71DF802A1016ULL, 0x67FBC92D331FA6F6ULL } }, /* XSUM_XXH128_testdata[569] */\n    {  190, 0x0000000000000000ULL, { 0x9C4FC4AE42F83107ULL, 0xB059519050F5449CULL } }, /* XSUM_XXH128_testdata[570] */\n    {  190, 0x000000009E3779B1ULL, { 0x50716926C52094AFULL, 0xB65DC4D25E9EE108ULL } }, /* XSUM_XXH128_testdata[571] */\n    {  190, 0x9E3779B185EBCA8DULL, { 0xEDDC4FBAF6D71544ULL, 0x082E83D0B88AEDA7ULL } }, /* XSUM_XXH128_testdata[572] */\n    {  191, 0x0000000000000000ULL, { 0xC4333111AB47A522ULL, 0xAA394FFEB17611EBULL } }, /* XSUM_XXH128_testdata[573] */\n    {  191, 0x000000009E3779B1ULL, { 0xBC38503BF6E9EFC0ULL, 0x0B6F255A93C05F6EULL } }, /* XSUM_XXH128_testdata[574] */\n    {  191, 0x9E3779B185EBCA8DULL, { 0x06F164304A859F69ULL, 0x43AABE2A06795E26ULL } }, /* XSUM_XXH128_testdata[575] */\n    {  192, 0x0000000000000000ULL, { 0x0679E7F625E389D9ULL, 0x064934DB40706C3DULL } }, /* XSUM_XXH128_testdata[576] */\n    {  192, 0x000000009E3779B1ULL, { 0x1F61A9EDE18471C0ULL, 0xE61EC432861AD07BULL } }, /* XSUM_XXH128_testdata[577] */\n    {  192, 0x9E3779B185EBCA8DULL, { 0xFD5412027E573A96ULL, 0xC1E549BAF8D0D863ULL } }, /* XSUM_XXH128_testdata[578] */\n    {  193, 0x0000000000000000ULL, { 0xF4DAF8B3794D1844ULL, 0x6FF6EAFCA24D9E4AULL } }, /* XSUM_XXH128_testdata[579] */\n    {  193, 0x000000009E3779B1ULL, { 0x0AA3E548F51ECC50ULL, 0x5377879A2A417498ULL } }, /* XSUM_XXH128_testdata[580] */\n    {  193, 0x9E3779B185EBCA8DULL, { 0xC1C5B9E605DD07D2ULL, 0x888253509EE437E7ULL } }, /* XSUM_XXH128_testdata[581] */\n    {  194, 0x0000000000000000ULL, { 0xE5F72E7BB645B7B2ULL, 0x322C6E246D38A4E8ULL } }, /* XSUM_XXH128_testdata[582] */\n    {  194, 0x000000009E3779B1ULL, { 0x0594A9F9F495D2A8ULL, 0x037D5951F31D1A81ULL } }, /* XSUM_XXH128_testdata[583] */\n    {  194, 0x9E3779B185EBCA8DULL, { 0xBEE4A1EF7B67B100ULL, 0xBB27727F8657DCB5ULL } }, /* XSUM_XXH128_testdata[584] */\n    {  195, 0x0000000000000000ULL, { 0x3FB593C086A66075ULL, 0x7729543A26B207EEULL } }, /* XSUM_XXH128_testdata[585] */\n    {  195, 0x000000009E3779B1ULL, { 0x6447716EBBD2DA99ULL, 0xC45384C328326617ULL } }, /* XSUM_XXH128_testdata[586] */\n    {  195, 0x9E3779B185EBCA8DULL, { 0xCF9D9EC2C8C9913FULL, 0x0326104C4D4849E7ULL } }, /* XSUM_XXH128_testdata[587] */\n    {  196, 0x0000000000000000ULL, { 0x7202316FA37C2B4BULL, 0xBB56E7FF41511773ULL } }, /* XSUM_XXH128_testdata[588] */\n    {  196, 0x000000009E3779B1ULL, { 0xFED6104A7769FFD2ULL, 0xC2C73AC782F50676ULL } }, /* XSUM_XXH128_testdata[589] */\n    {  196, 0x9E3779B185EBCA8DULL, { 0x9D7334E429A869E2ULL, 0x268279B1238A4929ULL } }, /* XSUM_XXH128_testdata[590] */\n    {  197, 0x0000000000000000ULL, { 0x648F6DEE25CE5A4FULL, 0x0BF8AC12828EEF8BULL } }, /* XSUM_XXH128_testdata[591] */\n    {  197, 0x000000009E3779B1ULL, { 0x51CA7E9FA1A70A14ULL, 0x53D2923F642D3AF5ULL } }, /* XSUM_XXH128_testdata[592] */\n    {  197, 0x9E3779B185EBCA8DULL, { 0x05421C68539C742BULL, 0xCCBC96BD632877F5ULL } }, /* XSUM_XXH128_testdata[593] */\n    {  198, 0x0000000000000000ULL, { 0x3640428F4FF482F6ULL, 0x476AC20CBCB5BA69ULL } }, /* XSUM_XXH128_testdata[594] */\n    {  198, 0x000000009E3779B1ULL, { 0x215D1CD9C8D883AEULL, 0xFA7936E491FD6C66ULL } }, /* XSUM_XXH128_testdata[595] */\n    {  198, 0x9E3779B185EBCA8DULL, { 0x29E640AC85E3C26FULL, 0x6EA4D73E87AD183FULL } }, /* XSUM_XXH128_testdata[596] */\n    {  199, 0x0000000000000000ULL, { 0xD7FF020BE2D49BAAULL, 0x7EC8A477B2E61AC8ULL } }, /* XSUM_XXH128_testdata[597] */\n    {  199, 0x000000009E3779B1ULL, { 0x8F2479788869E675ULL, 0xFC39FDE2BA5A99E6ULL } }, /* XSUM_XXH128_testdata[598] */\n    {  199, 0x9E3779B185EBCA8DULL, { 0x3204C3AABE0F5BF1ULL, 0x69C5BD6DAB502D65ULL } }, /* XSUM_XXH128_testdata[599] */\n    {  200, 0x0000000000000000ULL, { 0xEB060F1BB3126F5AULL, 0xE76FF4780FE18439ULL } }, /* XSUM_XXH128_testdata[600] */\n    {  200, 0x000000009E3779B1ULL, { 0xA2792C9130AFF570ULL, 0x319985508BBB649EULL } }, /* XSUM_XXH128_testdata[601] */\n    {  200, 0x9E3779B185EBCA8DULL, { 0x2236D1B483E8D9EBULL, 0xCF0349DD7CC2B545ULL } }, /* XSUM_XXH128_testdata[602] */\n    {  201, 0x0000000000000000ULL, { 0x196B192033D6D71BULL, 0xDC556E33BDDB0435ULL } }, /* XSUM_XXH128_testdata[603] */\n    {  201, 0x000000009E3779B1ULL, { 0x2CB23A9CDEA2FAC7ULL, 0x52F0FACD7A7B116EULL } }, /* XSUM_XXH128_testdata[604] */\n    {  201, 0x9E3779B185EBCA8DULL, { 0xFF71329E8B64B27CULL, 0x49F64FD995215F75ULL } }, /* XSUM_XXH128_testdata[605] */\n    {  202, 0x0000000000000000ULL, { 0x7D541C4E27354474ULL, 0x292ACB081A9327EEULL } }, /* XSUM_XXH128_testdata[606] */\n    {  202, 0x000000009E3779B1ULL, { 0xD8CF41771DCE562EULL, 0x94EE1876BD975F1FULL } }, /* XSUM_XXH128_testdata[607] */\n    {  202, 0x9E3779B185EBCA8DULL, { 0xBF6DC7CB965E24E4ULL, 0xA771B74BD020B7DBULL } }, /* XSUM_XXH128_testdata[608] */\n    {  203, 0x0000000000000000ULL, { 0x8CAE728419282756ULL, 0xA8CD6ED2761B41D3ULL } }, /* XSUM_XXH128_testdata[609] */\n    {  203, 0x000000009E3779B1ULL, { 0xD77E24040ECEB2AAULL, 0x9AEC7F2A672A8355ULL } }, /* XSUM_XXH128_testdata[610] */\n    {  203, 0x9E3779B185EBCA8DULL, { 0x0FC2DF722D89EC2FULL, 0xCE35D3DF95524433ULL } }, /* XSUM_XXH128_testdata[611] */\n    {  204, 0x0000000000000000ULL, { 0xD425AEB7A68E4254ULL, 0xEDB633774040E9E7ULL } }, /* XSUM_XXH128_testdata[612] */\n    {  204, 0x000000009E3779B1ULL, { 0x7ED024F58CB00380ULL, 0x96CE9D99809648EAULL } }, /* XSUM_XXH128_testdata[613] */\n    {  204, 0x9E3779B185EBCA8DULL, { 0x5A15853DF40D9B61ULL, 0xCDA7F82768D8B309ULL } }, /* XSUM_XXH128_testdata[614] */\n    {  205, 0x0000000000000000ULL, { 0xD8412697D56EC390ULL, 0x2B609A15DE4EBCCDULL } }, /* XSUM_XXH128_testdata[615] */\n    {  205, 0x000000009E3779B1ULL, { 0x7D89790E490E627BULL, 0x1B0904FBB3926467ULL } }, /* XSUM_XXH128_testdata[616] */\n    {  205, 0x9E3779B185EBCA8DULL, { 0xFD0296CA17422A0EULL, 0x9E0BEB82D92F1BC4ULL } }, /* XSUM_XXH128_testdata[617] */\n    {  206, 0x0000000000000000ULL, { 0x3250D56D3CD4CBCBULL, 0x444A30380A080665ULL } }, /* XSUM_XXH128_testdata[618] */\n    {  206, 0x000000009E3779B1ULL, { 0xFC8CB94F52C07CEFULL, 0x600E3AC4CDBBDEBAULL } }, /* XSUM_XXH128_testdata[619] */\n    {  206, 0x9E3779B185EBCA8DULL, { 0x1E2E8431F423F4BBULL, 0x7B0006D924A899E6ULL } }, /* XSUM_XXH128_testdata[620] */\n    {  207, 0x0000000000000000ULL, { 0x1EE196F58D1B1ED4ULL, 0x661F429EC4A2E30BULL } }, /* XSUM_XXH128_testdata[621] */\n    {  207, 0x000000009E3779B1ULL, { 0x1FB859F30296AFA4ULL, 0x45E8C6F8D3DB6872ULL } }, /* XSUM_XXH128_testdata[622] */\n    {  207, 0x9E3779B185EBCA8DULL, { 0xC535830B71656D64ULL, 0xB558FE48F7B7D6C5ULL } }, /* XSUM_XXH128_testdata[623] */\n    {  208, 0x0000000000000000ULL, { 0xFB2FC40F9B08B843ULL, 0x2A5EC86B307D8F43ULL } }, /* XSUM_XXH128_testdata[624] */\n    {  208, 0x000000009E3779B1ULL, { 0xD13CDE58B1DACA8DULL, 0x3A737A1DA5782079ULL } }, /* XSUM_XXH128_testdata[625] */\n    {  208, 0x9E3779B185EBCA8DULL, { 0xBB4307ACF0BDB079ULL, 0x3152BD6E90FF374EULL } }, /* XSUM_XXH128_testdata[626] */\n    {  209, 0x0000000000000000ULL, { 0x16958BDAFDB8DAD0ULL, 0xB0BAD3A0D6C4074EULL } }, /* XSUM_XXH128_testdata[627] */\n    {  209, 0x000000009E3779B1ULL, { 0x2514FC9B940063BFULL, 0x3C4CA16B3BA6B7B7ULL } }, /* XSUM_XXH128_testdata[628] */\n    {  209, 0x9E3779B185EBCA8DULL, { 0x95C0C7CB0979E56AULL, 0xF53A1D7DF9E5FDD6ULL } }, /* XSUM_XXH128_testdata[629] */\n    {  210, 0x0000000000000000ULL, { 0xA8447F3A5F8D05B9ULL, 0x15946C82333CB3BAULL } }, /* XSUM_XXH128_testdata[630] */\n    {  210, 0x000000009E3779B1ULL, { 0x8F9470C96D362604ULL, 0xD156E83FE84CDE43ULL } }, /* XSUM_XXH128_testdata[631] */\n    {  210, 0x9E3779B185EBCA8DULL, { 0xEBDF159A3B2CC44DULL, 0x1D0BC26B4A7AB5DDULL } }, /* XSUM_XXH128_testdata[632] */\n    {  211, 0x0000000000000000ULL, { 0x88CF5D2895CE0631ULL, 0x7B877FB7F79CD7CDULL } }, /* XSUM_XXH128_testdata[633] */\n    {  211, 0x000000009E3779B1ULL, { 0x459E982067B000DCULL, 0x2CF52D41B3EA1D52ULL } }, /* XSUM_XXH128_testdata[634] */\n    {  211, 0x9E3779B185EBCA8DULL, { 0xC5BA4ACC67759081ULL, 0xEA7C1B6EFDF3027EULL } }, /* XSUM_XXH128_testdata[635] */\n    {  212, 0x0000000000000000ULL, { 0x9355363A3825461EULL, 0xA2C5C6B10B593ECCULL } }, /* XSUM_XXH128_testdata[636] */\n    {  212, 0x000000009E3779B1ULL, { 0xBE024D81055A298FULL, 0x611716439C5D17C8ULL } }, /* XSUM_XXH128_testdata[637] */\n    {  212, 0x9E3779B185EBCA8DULL, { 0x2B43919679154F06ULL, 0x87A4F9CD9099FE4EULL } }, /* XSUM_XXH128_testdata[638] */\n    {  213, 0x0000000000000000ULL, { 0xDA4F46A32D13B2E4ULL, 0x4E064DA38F38404CULL } }, /* XSUM_XXH128_testdata[639] */\n    {  213, 0x000000009E3779B1ULL, { 0xDAE0C28F6970D29EULL, 0x39906FB0C881B547ULL } }, /* XSUM_XXH128_testdata[640] */\n    {  213, 0x9E3779B185EBCA8DULL, { 0x64DF8CAC26837F23ULL, 0x91BAA591FE0105EFULL } }, /* XSUM_XXH128_testdata[641] */\n    {  214, 0x0000000000000000ULL, { 0x26CB2A1E13347F4CULL, 0xE50939C5E90B5DF6ULL } }, /* XSUM_XXH128_testdata[642] */\n    {  214, 0x000000009E3779B1ULL, { 0x80AC9A568ECAE5BAULL, 0x224F991A7D613AF7ULL } }, /* XSUM_XXH128_testdata[643] */\n    {  214, 0x9E3779B185EBCA8DULL, { 0x856CC81578514863ULL, 0xFCE56A10C72C543CULL } }, /* XSUM_XXH128_testdata[644] */\n    {  215, 0x0000000000000000ULL, { 0x908A40668FA070C6ULL, 0x737C08E43A951E35ULL } }, /* XSUM_XXH128_testdata[645] */\n    {  215, 0x000000009E3779B1ULL, { 0x2D0B7BE38F8DBCFDULL, 0x4BF97DE456AC400FULL } }, /* XSUM_XXH128_testdata[646] */\n    {  215, 0x9E3779B185EBCA8DULL, { 0x76671B70B1856641ULL, 0xF6BCE338EF6D3E3DULL } }, /* XSUM_XXH128_testdata[647] */\n    {  216, 0x0000000000000000ULL, { 0xD53A560E2980C9D3ULL, 0x8DEF4B3606F25B69ULL } }, /* XSUM_XXH128_testdata[648] */\n    {  216, 0x000000009E3779B1ULL, { 0xBD6E3B7D1C5FBEF1ULL, 0x6ED6AB253FEB0BBAULL } }, /* XSUM_XXH128_testdata[649] */\n    {  216, 0x9E3779B185EBCA8DULL, { 0xA84EE814EB74DC68ULL, 0x5C28575727031D8FULL } }, /* XSUM_XXH128_testdata[650] */\n    {  217, 0x0000000000000000ULL, { 0x888D0E18B0E0BC36ULL, 0xC8C96F639F08FC59ULL } }, /* XSUM_XXH128_testdata[651] */\n    {  217, 0x000000009E3779B1ULL, { 0x58E6F72CD1973280ULL, 0xDD53A047B07B60B6ULL } }, /* XSUM_XXH128_testdata[652] */\n    {  217, 0x9E3779B185EBCA8DULL, { 0x965E54087A8CDE51ULL, 0x2070A232CE1304B4ULL } }, /* XSUM_XXH128_testdata[653] */\n    {  218, 0x0000000000000000ULL, { 0xA4775E70DB5276A9ULL, 0x4BD28FE40D081BF3ULL } }, /* XSUM_XXH128_testdata[654] */\n    {  218, 0x000000009E3779B1ULL, { 0xA74097DB0AA47AFBULL, 0xAFBF3B100F1DCCFBULL } }, /* XSUM_XXH128_testdata[655] */\n    {  218, 0x9E3779B185EBCA8DULL, { 0x47A549EECC1D2DE7ULL, 0xB63B736058FA55FAULL } }, /* XSUM_XXH128_testdata[656] */\n    {  219, 0x0000000000000000ULL, { 0xA39C17E47F31172DULL, 0x51905A18689B795EULL } }, /* XSUM_XXH128_testdata[657] */\n    {  219, 0x000000009E3779B1ULL, { 0xDB09280211E6D37CULL, 0x71B3C0BE56A79893ULL } }, /* XSUM_XXH128_testdata[658] */\n    {  219, 0x9E3779B185EBCA8DULL, { 0xB602B5DB70CA9154ULL, 0xBD905E0F0BAE36E6ULL } }, /* XSUM_XXH128_testdata[659] */\n    {  220, 0x0000000000000000ULL, { 0xD36657934EFDD975ULL, 0x43680A0FD753DD82ULL } }, /* XSUM_XXH128_testdata[660] */\n    {  220, 0x000000009E3779B1ULL, { 0x722C2C458E225E2DULL, 0xB80D9D281E2405D8ULL } }, /* XSUM_XXH128_testdata[661] */\n    {  220, 0x9E3779B185EBCA8DULL, { 0xE8A10E3232C559A0ULL, 0x1A42195DC46C7558ULL } }, /* XSUM_XXH128_testdata[662] */\n    {  221, 0x0000000000000000ULL, { 0xBC72CC6F1E3CBEB1ULL, 0xF6229D9BA7BB94E5ULL } }, /* XSUM_XXH128_testdata[663] */\n    {  221, 0x000000009E3779B1ULL, { 0x250482527190CF22ULL, 0x7F27936D7E5037F4ULL } }, /* XSUM_XXH128_testdata[664] */\n    {  221, 0x9E3779B185EBCA8DULL, { 0xC4EDABDD0498DB15ULL, 0x2873CD5A6630E4ABULL } }, /* XSUM_XXH128_testdata[665] */\n    {  222, 0x0000000000000000ULL, { 0xF1AEBD597CEC6B3AULL, 0x337E09641B948717ULL } }, /* XSUM_XXH128_testdata[666] */\n    {  222, 0x000000009E3779B1ULL, { 0xAE995BB8AF917A8DULL, 0x91820016621E97F1ULL } }, /* XSUM_XXH128_testdata[667] */\n    {  222, 0x9E3779B185EBCA8DULL, { 0xC5871B3BE4506A30ULL, 0x4740AF1AE0618B49ULL } }, /* XSUM_XXH128_testdata[668] */\n    {  223, 0x0000000000000000ULL, { 0x99A2091FBEC06CFAULL, 0x3F249A473E722801ULL } }, /* XSUM_XXH128_testdata[669] */\n    {  223, 0x000000009E3779B1ULL, { 0x0D729FA3BA738119ULL, 0xDC307EB931A6485AULL } }, /* XSUM_XXH128_testdata[670] */\n    {  223, 0x9E3779B185EBCA8DULL, { 0x3349FFB248EF0F0FULL, 0xD16EA4253F84294FULL } }, /* XSUM_XXH128_testdata[671] */\n    {  224, 0x0000000000000000ULL, { 0x8B5B0074A7EB57DAULL, 0xF20D710DDBFBCAB1ULL } }, /* XSUM_XXH128_testdata[672] */\n    {  224, 0x000000009E3779B1ULL, { 0xCA6C4F1C4A1DDEA8ULL, 0x3327579D3D360418ULL } }, /* XSUM_XXH128_testdata[673] */\n    {  224, 0x9E3779B185EBCA8DULL, { 0x70835854BE62CB58ULL, 0x04AC8278BF6BB7BCULL } }, /* XSUM_XXH128_testdata[674] */\n    {  225, 0x0000000000000000ULL, { 0x223FD4D3D9B67ADEULL, 0xB94473C76526D35EULL } }, /* XSUM_XXH128_testdata[675] */\n    {  225, 0x000000009E3779B1ULL, { 0x1481BCB13D3DFA10ULL, 0xDE32B87E77AA2E51ULL } }, /* XSUM_XXH128_testdata[676] */\n    {  225, 0x9E3779B185EBCA8DULL, { 0x22852B1C8D8F4AF9ULL, 0xD13A1D8F6B2A8F50ULL } }, /* XSUM_XXH128_testdata[677] */\n    {  226, 0x0000000000000000ULL, { 0x3ADB57E460FD4553ULL, 0x84020083AA4D4669ULL } }, /* XSUM_XXH128_testdata[678] */\n    {  226, 0x000000009E3779B1ULL, { 0x3CBADC7DB3EB955AULL, 0x276D72F9BEF1BA54ULL } }, /* XSUM_XXH128_testdata[679] */\n    {  226, 0x9E3779B185EBCA8DULL, { 0x68A237F0304E7F50ULL, 0xEE438E342388C4AAULL } }, /* XSUM_XXH128_testdata[680] */\n    {  227, 0x0000000000000000ULL, { 0xB89DF8AFC44136FBULL, 0x81698C91B19B4A33ULL } }, /* XSUM_XXH128_testdata[681] */\n    {  227, 0x000000009E3779B1ULL, { 0x64D6EA6AD8FD51B2ULL, 0xE4264878A00AE267ULL } }, /* XSUM_XXH128_testdata[682] */\n    {  227, 0x9E3779B185EBCA8DULL, { 0xA47A40AE88BC9F6AULL, 0x005529485F3DF947ULL } }, /* XSUM_XXH128_testdata[683] */\n    {  228, 0x0000000000000000ULL, { 0xD6C335329DD74841ULL, 0xF3F1FE67893A9717ULL } }, /* XSUM_XXH128_testdata[684] */\n    {  228, 0x000000009E3779B1ULL, { 0x21BC01B46ABA553DULL, 0x1F8D79C7523A68D7ULL } }, /* XSUM_XXH128_testdata[685] */\n    {  228, 0x9E3779B185EBCA8DULL, { 0x46FEBA8B2E852F10ULL, 0xE100CF818AC0C4E1ULL } }, /* XSUM_XXH128_testdata[686] */\n    {  229, 0x0000000000000000ULL, { 0x4D29799E2CFE2148ULL, 0x78176716CBEB5711ULL } }, /* XSUM_XXH128_testdata[687] */\n    {  229, 0x000000009E3779B1ULL, { 0x33C89592ED54E170ULL, 0xFDDD0BB0A6580BA0ULL } }, /* XSUM_XXH128_testdata[688] */\n    {  229, 0x9E3779B185EBCA8DULL, { 0xDF7262C04A06E232ULL, 0xB9D9CB3E95D0C305ULL } }, /* XSUM_XXH128_testdata[689] */\n    {  230, 0x0000000000000000ULL, { 0xACDEAFCE303E8439ULL, 0x4E7B2BB91627BC44ULL } }, /* XSUM_XXH128_testdata[690] */\n    {  230, 0x000000009E3779B1ULL, { 0xDF4EBE57FA284306ULL, 0x8BCD829A968A3E8AULL } }, /* XSUM_XXH128_testdata[691] */\n    {  230, 0x9E3779B185EBCA8DULL, { 0xA3390D5252B72F1BULL, 0x3796A6B355FC022BULL } }, /* XSUM_XXH128_testdata[692] */\n    {  231, 0x0000000000000000ULL, { 0x737D1E2B3CC34715ULL, 0x36BA608F3DD0EA10ULL } }, /* XSUM_XXH128_testdata[693] */\n    {  231, 0x000000009E3779B1ULL, { 0x8CE84D1D505A976AULL, 0xF646F15512675360ULL } }, /* XSUM_XXH128_testdata[694] */\n    {  231, 0x9E3779B185EBCA8DULL, { 0xD2CB41F6C4E6E9DAULL, 0x9DCD79C565B20BB4ULL } }, /* XSUM_XXH128_testdata[695] */\n    {  232, 0x0000000000000000ULL, { 0x4CDBCF3D3D310E09ULL, 0xE6FF568D437DB78DULL } }, /* XSUM_XXH128_testdata[696] */\n    {  232, 0x000000009E3779B1ULL, { 0x387F5AF007FB384AULL, 0x98E9572E4343E5B2ULL } }, /* XSUM_XXH128_testdata[697] */\n    {  232, 0x9E3779B185EBCA8DULL, { 0x65E95C8B0E618E77ULL, 0xEB85809A40E9B729ULL } }, /* XSUM_XXH128_testdata[698] */\n    {  233, 0x0000000000000000ULL, { 0xFC42A789C922EC0FULL, 0x07F3C9D9B7797906ULL } }, /* XSUM_XXH128_testdata[699] */\n    {  233, 0x000000009E3779B1ULL, { 0xF44281209A433C88ULL, 0x20C7944832AE78CDULL } }, /* XSUM_XXH128_testdata[700] */\n    {  233, 0x9E3779B185EBCA8DULL, { 0x8FFEC0C83D80AD60ULL, 0x3BED40ADE606A660ULL } }, /* XSUM_XXH128_testdata[701] */\n    {  234, 0x0000000000000000ULL, { 0xFFD625522F81759DULL, 0x6A0A584DD28F0713ULL } }, /* XSUM_XXH128_testdata[702] */\n    {  234, 0x000000009E3779B1ULL, { 0xA51093EC20F5C41DULL, 0x388ADD889F8AC66EULL } }, /* XSUM_XXH128_testdata[703] */\n    {  234, 0x9E3779B185EBCA8DULL, { 0x2A6514AFF7AA6F9CULL, 0x89F32C2F67E1D371ULL } }, /* XSUM_XXH128_testdata[704] */\n    {  235, 0x0000000000000000ULL, { 0x41A21BC8EE19DAF4ULL, 0x0905B6EC33C9FC0BULL } }, /* XSUM_XXH128_testdata[705] */\n    {  235, 0x000000009E3779B1ULL, { 0x7CB6D04F6D955B37ULL, 0x7607D3F77BD7872DULL } }, /* XSUM_XXH128_testdata[706] */\n    {  235, 0x9E3779B185EBCA8DULL, { 0x8D095B83BB361F34ULL, 0x240101BC7E33B55CULL } }, /* XSUM_XXH128_testdata[707] */\n    {  236, 0x0000000000000000ULL, { 0x2554D86CB3D6CBD8ULL, 0x4EB37B38C0FB7544ULL } }, /* XSUM_XXH128_testdata[708] */\n    {  236, 0x000000009E3779B1ULL, { 0x8D2122B237DCCE4EULL, 0x8172C22AD2841B33ULL } }, /* XSUM_XXH128_testdata[709] */\n    {  236, 0x9E3779B185EBCA8DULL, { 0x641C260104D1775DULL, 0xA02E7F541402B046ULL } }, /* XSUM_XXH128_testdata[710] */\n    {  237, 0x0000000000000000ULL, { 0xD5F6B3EB50A678F5ULL, 0x761AF4F987196CABULL } }, /* XSUM_XXH128_testdata[711] */\n    {  237, 0x000000009E3779B1ULL, { 0xF158E40DFA95CD57ULL, 0x5800A13FEE84C612ULL } }, /* XSUM_XXH128_testdata[712] */\n    {  237, 0x9E3779B185EBCA8DULL, { 0xD3B12BA6F4AC81C5ULL, 0xEF202647B79839F0ULL } }, /* XSUM_XXH128_testdata[713] */\n    {  238, 0x0000000000000000ULL, { 0x4A6BBFBC51926FC6ULL, 0x38E0F55591F10B3BULL } }, /* XSUM_XXH128_testdata[714] */\n    {  238, 0x000000009E3779B1ULL, { 0xBD9DAF2D3E260FF5ULL, 0x50DF91C9297AB400ULL } }, /* XSUM_XXH128_testdata[715] */\n    {  238, 0x9E3779B185EBCA8DULL, { 0xE5FC7F62360CE9B8ULL, 0x189724E6C5C7AADDULL } }, /* XSUM_XXH128_testdata[716] */\n    {  239, 0x0000000000000000ULL, { 0xF895E8B860B8A593ULL, 0xE59FC6554B5008BCULL } }, /* XSUM_XXH128_testdata[717] */\n    {  239, 0x000000009E3779B1ULL, { 0xA7FB18FAD4A94D5BULL, 0x9C5A8C766DF3E6E5ULL } }, /* XSUM_XXH128_testdata[718] */\n    {  239, 0x9E3779B185EBCA8DULL, { 0xC0A8B4C9698DB33DULL, 0xD6701EB51FC21716ULL } }, /* XSUM_XXH128_testdata[719] */\n    {  240, 0x0000000000000000ULL, { 0x5C9AAE94C8EBE5A0ULL, 0xAA4202DAA2769DC8ULL } }, /* XSUM_XXH128_testdata[720] */\n    {  240, 0x000000009E3779B1ULL, { 0xCA19087F1D335DAEULL, 0xDA888104BEAE5AE0ULL } }, /* XSUM_XXH128_testdata[721] */\n    {  240, 0x9E3779B185EBCA8DULL, { 0x604E98DB085C1864ULL, 0x29D2133D6EA58C5BULL } }, /* XSUM_XXH128_testdata[722] */\n    {  241, 0x0000000000000000ULL, { 0xC5A639ECD2030E5EULL, 0x99A80ECF0ECFC647ULL } }, /* XSUM_XXH128_testdata[723] */\n    {  241, 0x000000009E3779B1ULL, { 0x5927E3637BAC8149ULL, 0x4BF2229C3A8FC3C3ULL } }, /* XSUM_XXH128_testdata[724] */\n    {  241, 0x9E3779B185EBCA8DULL, { 0xDDA9B0A161D4829AULL, 0xEC64AFAE6A137582ULL } }, /* XSUM_XXH128_testdata[725] */\n    {  242, 0x0000000000000000ULL, { 0x967344E78CB4B723ULL, 0xAB227699336C197EULL } }, /* XSUM_XXH128_testdata[726] */\n    {  242, 0x000000009E3779B1ULL, { 0x79033D48BD686CA8ULL, 0x58EF4ABEC798052AULL } }, /* XSUM_XXH128_testdata[727] */\n    {  242, 0x9E3779B185EBCA8DULL, { 0x5811A132DBCB4C75ULL, 0xA9F0612BC894A6A6ULL } }, /* XSUM_XXH128_testdata[728] */\n    {  243, 0x0000000000000000ULL, { 0xE988DAEF24A33188ULL, 0xFE0D525629DED0ABULL } }, /* XSUM_XXH128_testdata[729] */\n    {  243, 0x000000009E3779B1ULL, { 0x46BDA0FC2C51E3CBULL, 0x28A2A8BCC9504B46ULL } }, /* XSUM_XXH128_testdata[730] */\n    {  243, 0x9E3779B185EBCA8DULL, { 0x608C899C17491898ULL, 0x9FA72A92DF64954BULL } }, /* XSUM_XXH128_testdata[731] */\n    {  244, 0x0000000000000000ULL, { 0x207BF1DB073E4932ULL, 0x3EE7BA330478ED8EULL } }, /* XSUM_XXH128_testdata[732] */\n    {  244, 0x000000009E3779B1ULL, { 0x1BE5B05B38745F4CULL, 0x2DAC4B4B44F51534ULL } }, /* XSUM_XXH128_testdata[733] */\n    {  244, 0x9E3779B185EBCA8DULL, { 0x7E4E1ED6A0116446ULL, 0xD65E5C2D2BE6293CULL } }, /* XSUM_XXH128_testdata[734] */\n    {  245, 0x0000000000000000ULL, { 0xB2494882657D1610ULL, 0x5C33A12D375EB2BBULL } }, /* XSUM_XXH128_testdata[735] */\n    {  245, 0x000000009E3779B1ULL, { 0x07213DCB846183C1ULL, 0x328785118061E3A2ULL } }, /* XSUM_XXH128_testdata[736] */\n    {  245, 0x9E3779B185EBCA8DULL, { 0x8853314E454EEB9BULL, 0x721FB1F02A18FA30ULL } }, /* XSUM_XXH128_testdata[737] */\n    {  246, 0x0000000000000000ULL, { 0x09BA721476ECA776ULL, 0x7D43CE1B24E86DA7ULL } }, /* XSUM_XXH128_testdata[738] */\n    {  246, 0x000000009E3779B1ULL, { 0xBD4964B7FB1E9B3EULL, 0xE2B769672F317942ULL } }, /* XSUM_XXH128_testdata[739] */\n    {  246, 0x9E3779B185EBCA8DULL, { 0xF096F24C090E8B28ULL, 0x502662D883025A47ULL } }, /* XSUM_XXH128_testdata[740] */\n    {  247, 0x0000000000000000ULL, { 0x2336B969899E627DULL, 0xD79240F5745D8890ULL } }, /* XSUM_XXH128_testdata[741] */\n    {  247, 0x000000009E3779B1ULL, { 0xBC96D049F07DFC65ULL, 0x4A68B17895917244ULL } }, /* XSUM_XXH128_testdata[742] */\n    {  247, 0x9E3779B185EBCA8DULL, { 0x2FCE53405D7FC73FULL, 0x8342D60A724CB2ECULL } }, /* XSUM_XXH128_testdata[743] */\n    {  248, 0x0000000000000000ULL, { 0x675A39222277D0B0ULL, 0x24F85C5B3DF874B2ULL } }, /* XSUM_XXH128_testdata[744] */\n    {  248, 0x000000009E3779B1ULL, { 0x3AA4CD56F7FEFEA5ULL, 0xFD8AC3412A82F904ULL } }, /* XSUM_XXH128_testdata[745] */\n    {  248, 0x9E3779B185EBCA8DULL, { 0xA7EA866DD4EC2B64ULL, 0xF9EB98A14E5B6112ULL } }, /* XSUM_XXH128_testdata[746] */\n    {  249, 0x0000000000000000ULL, { 0x2FC4F84AB35D73A2ULL, 0x13D7C50139517502ULL } }, /* XSUM_XXH128_testdata[747] */\n    {  249, 0x000000009E3779B1ULL, { 0x69D4808197683118ULL, 0xFAD8024CBD75DC72ULL } }, /* XSUM_XXH128_testdata[748] */\n    {  249, 0x9E3779B185EBCA8DULL, { 0x8F448C1B7A4004F8ULL, 0xAE92D5FD0B61B04BULL } }, /* XSUM_XXH128_testdata[749] */\n    {  250, 0x0000000000000000ULL, { 0x92FE7370568187CCULL, 0xE93F05F607D60370ULL } }, /* XSUM_XXH128_testdata[750] */\n    {  250, 0x000000009E3779B1ULL, { 0x32B4E87900BC06B3ULL, 0xDDA33FABEFF350F6ULL } }, /* XSUM_XXH128_testdata[751] */\n    {  250, 0x9E3779B185EBCA8DULL, { 0x538997F3170A6253ULL, 0xC76377FB75056B8DULL } }, /* XSUM_XXH128_testdata[752] */\n    {  251, 0x0000000000000000ULL, { 0xC8979538455865E1ULL, 0x60F35AA5DC0BAC30ULL } }, /* XSUM_XXH128_testdata[753] */\n    {  251, 0x000000009E3779B1ULL, { 0x86BFCAC29EFB41A9ULL, 0x98F6E755C8EA135AULL } }, /* XSUM_XXH128_testdata[754] */\n    {  251, 0x9E3779B185EBCA8DULL, { 0x81DBBD7E7B9D1517ULL, 0x6A8D93104492E5A8ULL } }, /* XSUM_XXH128_testdata[755] */\n    {  252, 0x0000000000000000ULL, { 0x517E9BFBF584B49CULL, 0xE95C9BD23AF60A14ULL } }, /* XSUM_XXH128_testdata[756] */\n    {  252, 0x000000009E3779B1ULL, { 0x7CA34BA9FAEFCD14ULL, 0xC3B4E8A7BF55DA8BULL } }, /* XSUM_XXH128_testdata[757] */\n    {  252, 0x9E3779B185EBCA8DULL, { 0xDA61F0C55F7F37CDULL, 0x072C2AA740D28A1EULL } }, /* XSUM_XXH128_testdata[758] */\n    {  253, 0x0000000000000000ULL, { 0x126CDADFC2AF595AULL, 0xA3B95DF5A20FA6A0ULL } }, /* XSUM_XXH128_testdata[759] */\n    {  253, 0x000000009E3779B1ULL, { 0x5BC65D4EA7084FE7ULL, 0x75256D4675DA5E88ULL } }, /* XSUM_XXH128_testdata[760] */\n    {  253, 0x9E3779B185EBCA8DULL, { 0xA495566991B63EFCULL, 0xE60C29D4B19E7C29ULL } }, /* XSUM_XXH128_testdata[761] */\n    {  254, 0x0000000000000000ULL, { 0xC6ADC7E5504153FAULL, 0xFF60C234A12EF68BULL } }, /* XSUM_XXH128_testdata[762] */\n    {  254, 0x000000009E3779B1ULL, { 0x5BA6ED3EE8471C58ULL, 0xB4AE1D5EF15D326DULL } }, /* XSUM_XXH128_testdata[763] */\n    {  254, 0x9E3779B185EBCA8DULL, { 0x8204DFA4A557CBB5ULL, 0x226E285B1ADF6CA5ULL } }, /* XSUM_XXH128_testdata[764] */\n    {  255, 0x0000000000000000ULL, { 0xE98F979F4ED8A197ULL, 0x961375C87E09EFBCULL } }, /* XSUM_XXH128_testdata[765] */\n    {  255, 0x000000009E3779B1ULL, { 0x437EA109CB7CE24DULL, 0xEE657E12607ADFFEULL } }, /* XSUM_XXH128_testdata[766] */\n    {  255, 0x9E3779B185EBCA8DULL, { 0x2ACA7901D9538C75ULL, 0xE72EC0137D62DF44ULL } }, /* XSUM_XXH128_testdata[767] */\n    {  256, 0x0000000000000000ULL, { 0x55DE574AD89D0AC5ULL, 0x8B1C66091423D288ULL } }, /* XSUM_XXH128_testdata[768] */\n    {  256, 0x000000009E3779B1ULL, { 0x443D04D43F60C57FULL, 0xD540CC8620D8DD65ULL } }, /* XSUM_XXH128_testdata[769] */\n    {  256, 0x9E3779B185EBCA8DULL, { 0x4D30234B7A3AA61CULL, 0xAAA57235B92D5E7CULL } }, /* XSUM_XXH128_testdata[770] */\n    {  257, 0x0000000000000000ULL, { 0xB17FD5A8AE75BB0BULL, 0xF15FEE7F9F457599ULL } }, /* XSUM_XXH128_testdata[771] */\n    {  257, 0x000000009E3779B1ULL, { 0x02F16A1476C65D95ULL, 0x52C36CA232FC662BULL } }, /* XSUM_XXH128_testdata[772] */\n    {  257, 0x9E3779B185EBCA8DULL, { 0x802A6FBF3CACD97CULL, 0x15C1F9C667C815BAULL } }, /* XSUM_XXH128_testdata[773] */\n    {  258, 0x0000000000000000ULL, { 0x597C26D615CCF5D2ULL, 0x1CDC3D0516B68A37ULL } }, /* XSUM_XXH128_testdata[774] */\n    {  258, 0x000000009E3779B1ULL, { 0x8DEB2D95EB7438E9ULL, 0xB34AE943B2054500ULL } }, /* XSUM_XXH128_testdata[775] */\n    {  258, 0x9E3779B185EBCA8DULL, { 0xB3A4A6F75E9D895FULL, 0xE8612F5799D90B47ULL } }, /* XSUM_XXH128_testdata[776] */\n    {  259, 0x0000000000000000ULL, { 0x96FE56AAA5CE16F7ULL, 0x2674F38D6A6E4C42ULL } }, /* XSUM_XXH128_testdata[777] */\n    {  259, 0x000000009E3779B1ULL, { 0x4C2B74D96B48D863ULL, 0x747DB171593D0377ULL } }, /* XSUM_XXH128_testdata[778] */\n    {  259, 0x9E3779B185EBCA8DULL, { 0x026072B81C892FD0ULL, 0x14EB388007591108ULL } }, /* XSUM_XXH128_testdata[779] */\n    {  260, 0x0000000000000000ULL, { 0x6434C3B4B191597FULL, 0xAF2B439670E01429ULL } }, /* XSUM_XXH128_testdata[780] */\n    {  260, 0x000000009E3779B1ULL, { 0x862D5730FEB4E932ULL, 0x95C877B4A249D30EULL } }, /* XSUM_XXH128_testdata[781] */\n    {  260, 0x9E3779B185EBCA8DULL, { 0xBD2F19B13A895785ULL, 0x5ED9162B37D010A3ULL } }, /* XSUM_XXH128_testdata[782] */\n    {  261, 0x0000000000000000ULL, { 0x622B69F5713E3274ULL, 0xA16B94C86BE30374ULL } }, /* XSUM_XXH128_testdata[783] */\n    {  261, 0x000000009E3779B1ULL, { 0xFCB099BD9903A6B8ULL, 0x178C92B58AF124BEULL } }, /* XSUM_XXH128_testdata[784] */\n    {  261, 0x9E3779B185EBCA8DULL, { 0xB550374C5BB46917ULL, 0x935274DB1F728D74ULL } }, /* XSUM_XXH128_testdata[785] */\n    {  262, 0x0000000000000000ULL, { 0x3131B78E8EDB2AD2ULL, 0xA3B404B9766C6EABULL } }, /* XSUM_XXH128_testdata[786] */\n    {  262, 0x000000009E3779B1ULL, { 0x1790ED7819FD1C18ULL, 0x57FBC72E12638981ULL } }, /* XSUM_XXH128_testdata[787] */\n    {  262, 0x9E3779B185EBCA8DULL, { 0x728D3D77F1BB62FAULL, 0x11C710022234561FULL } }, /* XSUM_XXH128_testdata[788] */\n    {  263, 0x0000000000000000ULL, { 0xD9DF9C2FC42E0238ULL, 0xF8772756BCD4965DULL } }, /* XSUM_XXH128_testdata[789] */\n    {  263, 0x000000009E3779B1ULL, { 0xDA52EB3F16A62965ULL, 0xF2ECA89521D4F080ULL } }, /* XSUM_XXH128_testdata[790] */\n    {  263, 0x9E3779B185EBCA8DULL, { 0x90777D0F22DD4753ULL, 0xE0B4B2D566213C2FULL } }, /* XSUM_XXH128_testdata[791] */\n    {  264, 0x0000000000000000ULL, { 0x84603BD8C0D6611BULL, 0x5CCD26D26B0CEECFULL } }, /* XSUM_XXH128_testdata[792] */\n    {  264, 0x000000009E3779B1ULL, { 0x3661F79BE6DF0015ULL, 0xAD907476DC6A78C5ULL } }, /* XSUM_XXH128_testdata[793] */\n    {  264, 0x9E3779B185EBCA8DULL, { 0x6D179A435DD3ADEFULL, 0xA4D105CF8F480436ULL } }, /* XSUM_XXH128_testdata[794] */\n    {  265, 0x0000000000000000ULL, { 0x3E689724BD2BCF46ULL, 0x55F87E0718B843E8ULL } }, /* XSUM_XXH128_testdata[795] */\n    {  265, 0x000000009E3779B1ULL, { 0x2DB4B1D4042ECDFDULL, 0xD78E73089F44B6F2ULL } }, /* XSUM_XXH128_testdata[796] */\n    {  265, 0x9E3779B185EBCA8DULL, { 0xFC84D97265A20FADULL, 0xB9C6AAC4334F1341ULL } }, /* XSUM_XXH128_testdata[797] */\n    {  266, 0x0000000000000000ULL, { 0x74E4B8041F481162ULL, 0x7D2E4588E72C7182ULL } }, /* XSUM_XXH128_testdata[798] */\n    {  266, 0x000000009E3779B1ULL, { 0x62E2EE897AEF58F0ULL, 0x9ACB207DEFFDD9ECULL } }, /* XSUM_XXH128_testdata[799] */\n    {  266, 0x9E3779B185EBCA8DULL, { 0x65ABFBAECBC200C4ULL, 0x866678F731D4FF60ULL } }, /* XSUM_XXH128_testdata[800] */\n    {  267, 0x0000000000000000ULL, { 0x75EA9B12AF18FA87ULL, 0x231CA895DDEBDCD4ULL } }, /* XSUM_XXH128_testdata[801] */\n    {  267, 0x000000009E3779B1ULL, { 0x804A6405F85CB270ULL, 0x80F23DC3834265D0ULL } }, /* XSUM_XXH128_testdata[802] */\n    {  267, 0x9E3779B185EBCA8DULL, { 0x0A217005537F0186ULL, 0xA1AE6F5CFBEE705CULL } }, /* XSUM_XXH128_testdata[803] */\n    {  268, 0x0000000000000000ULL, { 0x215E27CCEE7C81FEULL, 0x32B4C9C5E1BB1D0DULL } }, /* XSUM_XXH128_testdata[804] */\n    {  268, 0x000000009E3779B1ULL, { 0x6C9F4649E3C3D1CDULL, 0x5A6D9A745549BE28ULL } }, /* XSUM_XXH128_testdata[805] */\n    {  268, 0x9E3779B185EBCA8DULL, { 0xA75ADAB112131070ULL, 0xF59EBB11B5E89407ULL } }, /* XSUM_XXH128_testdata[806] */\n    {  269, 0x0000000000000000ULL, { 0xCDB22F74254DEB8BULL, 0xDA4D5316EF67EB39ULL } }, /* XSUM_XXH128_testdata[807] */\n    {  269, 0x000000009E3779B1ULL, { 0x10DBDCCA4CA30DA4ULL, 0xB6E80D151F5ECE85ULL } }, /* XSUM_XXH128_testdata[808] */\n    {  269, 0x9E3779B185EBCA8DULL, { 0xCE40B2E4012A8BA2ULL, 0xD8BF480C49D22FDAULL } }, /* XSUM_XXH128_testdata[809] */\n    {  270, 0x0000000000000000ULL, { 0xE634D8664D685397ULL, 0x7DAAFF75DAFF9F66ULL } }, /* XSUM_XXH128_testdata[810] */\n    {  270, 0x000000009E3779B1ULL, { 0x32A204A7ABAD7A7CULL, 0x2348A0B4DB2051A3ULL } }, /* XSUM_XXH128_testdata[811] */\n    {  270, 0x9E3779B185EBCA8DULL, { 0x9B7B8CAA8808A81FULL, 0xA56FAF515F36E0EFULL } }, /* XSUM_XXH128_testdata[812] */\n    {  271, 0x0000000000000000ULL, { 0x4B367EF9DF9DEA94ULL, 0x200B45E0D5645550ULL } }, /* XSUM_XXH128_testdata[813] */\n    {  271, 0x000000009E3779B1ULL, { 0xB49827597B23F239ULL, 0xA3A5B3381CF2BBB3ULL } }, /* XSUM_XXH128_testdata[814] */\n    {  271, 0x9E3779B185EBCA8DULL, { 0xF97A1A53C95C4E11ULL, 0x5E250F5AA9FCD4ADULL } }, /* XSUM_XXH128_testdata[815] */\n    {  272, 0x0000000000000000ULL, { 0xD74D68D5D03119B3ULL, 0x7F67100978A370CBULL } }, /* XSUM_XXH128_testdata[816] */\n    {  272, 0x000000009E3779B1ULL, { 0x0E8E193A63E6D0DBULL, 0xB88E2D6C5D64ED9CULL } }, /* XSUM_XXH128_testdata[817] */\n    {  272, 0x9E3779B185EBCA8DULL, { 0x10BD868ACB6D6FA9ULL, 0x353D6420EADC5665ULL } }, /* XSUM_XXH128_testdata[818] */\n    {  273, 0x0000000000000000ULL, { 0x65E1FFF6E3002DAFULL, 0xB2136675D29668CBULL } }, /* XSUM_XXH128_testdata[819] */\n    {  273, 0x000000009E3779B1ULL, { 0x8DA9D3E5C07DAD0CULL, 0x35164A5259BCA066ULL } }, /* XSUM_XXH128_testdata[820] */\n    {  273, 0x9E3779B185EBCA8DULL, { 0xB80F7A672C201B85ULL, 0x8E0636308C221C3BULL } }, /* XSUM_XXH128_testdata[821] */\n    {  274, 0x0000000000000000ULL, { 0x389595A06A55E2E1ULL, 0x18AC71267B770BFBULL } }, /* XSUM_XXH128_testdata[822] */\n    {  274, 0x000000009E3779B1ULL, { 0xE06F34EAB3F96107ULL, 0x68719550B2027792ULL } }, /* XSUM_XXH128_testdata[823] */\n    {  274, 0x9E3779B185EBCA8DULL, { 0xB9AEA6AC34EEA74BULL, 0xAA5A1160C584C899ULL } }, /* XSUM_XXH128_testdata[824] */\n    {  275, 0x0000000000000000ULL, { 0x4E29525A452E797FULL, 0x1DDA342A8EE97B78ULL } }, /* XSUM_XXH128_testdata[825] */\n    {  275, 0x000000009E3779B1ULL, { 0x505396AB5C042383ULL, 0x8A92FC807DDAF93FULL } }, /* XSUM_XXH128_testdata[826] */\n    {  275, 0x9E3779B185EBCA8DULL, { 0xBC6AD5649DBFF613ULL, 0x89E2E132626593B9ULL } }, /* XSUM_XXH128_testdata[827] */\n    {  276, 0x0000000000000000ULL, { 0x65DCAB6FC5BBF7FFULL, 0x6939701FE6EA5149ULL } }, /* XSUM_XXH128_testdata[828] */\n    {  276, 0x000000009E3779B1ULL, { 0xF7152B1D28780A87ULL, 0xDD4FA10656C229BBULL } }, /* XSUM_XXH128_testdata[829] */\n    {  276, 0x9E3779B185EBCA8DULL, { 0x3504897BCA1D4F66ULL, 0x15C86684E7F10CA0ULL } }, /* XSUM_XXH128_testdata[830] */\n    {  277, 0x0000000000000000ULL, { 0x013F79E2E571C3A1ULL, 0x1C5720F4D9451E5AULL } }, /* XSUM_XXH128_testdata[831] */\n    {  277, 0x000000009E3779B1ULL, { 0x29F3E5B9F9EB66FAULL, 0x3CCA7642F476F7A2ULL } }, /* XSUM_XXH128_testdata[832] */\n    {  277, 0x9E3779B185EBCA8DULL, { 0x449C80F974E1B6F1ULL, 0x3D4E84A0422DA717ULL } }, /* XSUM_XXH128_testdata[833] */\n    {  278, 0x0000000000000000ULL, { 0x57BF715F3AA64DF2ULL, 0x92CD17BDC5726C59ULL } }, /* XSUM_XXH128_testdata[834] */\n    {  278, 0x000000009E3779B1ULL, { 0x06FE4B4B4D262339ULL, 0x6D24A3392929E9A1ULL } }, /* XSUM_XXH128_testdata[835] */\n    {  278, 0x9E3779B185EBCA8DULL, { 0x1F05B7AA1370AF21ULL, 0xAC5EFC0DD122EB95ULL } }, /* XSUM_XXH128_testdata[836] */\n    {  279, 0x0000000000000000ULL, { 0x295056DC98A9526CULL, 0x8E190A915B529DE3ULL } }, /* XSUM_XXH128_testdata[837] */\n    {  279, 0x000000009E3779B1ULL, { 0x6127F23A67B3A14BULL, 0x3DA22C9B8F18988CULL } }, /* XSUM_XXH128_testdata[838] */\n    {  279, 0x9E3779B185EBCA8DULL, { 0x43B1C69843725589ULL, 0xEDAC9828CDC0D7CEULL } }, /* XSUM_XXH128_testdata[839] */\n    {  280, 0x0000000000000000ULL, { 0x952AEF533EAF359BULL, 0x8A2F789547645A4EULL } }, /* XSUM_XXH128_testdata[840] */\n    {  280, 0x000000009E3779B1ULL, { 0x7F74321B2CE121F1ULL, 0xB0F0B5BCA21CC80EULL } }, /* XSUM_XXH128_testdata[841] */\n    {  280, 0x9E3779B185EBCA8DULL, { 0xE4627DFF9E8B6849ULL, 0xA36701820521C01FULL } }, /* XSUM_XXH128_testdata[842] */\n    {  281, 0x0000000000000000ULL, { 0xEA6959C34EB32E09ULL, 0xDBC5BD8AB6998596ULL } }, /* XSUM_XXH128_testdata[843] */\n    {  281, 0x000000009E3779B1ULL, { 0x7F89C3C00451BD9EULL, 0x878A1BD329A51098ULL } }, /* XSUM_XXH128_testdata[844] */\n    {  281, 0x9E3779B185EBCA8DULL, { 0xE8F69EDE556ACDD5ULL, 0x57120F398500175EULL } }, /* XSUM_XXH128_testdata[845] */\n    {  282, 0x0000000000000000ULL, { 0x59D901EB07316669ULL, 0xC570F98282EC8A09ULL } }, /* XSUM_XXH128_testdata[846] */\n    {  282, 0x000000009E3779B1ULL, { 0x06CA49DEBE877FDFULL, 0xAD256A5571EBB8BAULL } }, /* XSUM_XXH128_testdata[847] */\n    {  282, 0x9E3779B185EBCA8DULL, { 0xE2865EB1C796FD80ULL, 0x3146C1DD7E60917EULL } }, /* XSUM_XXH128_testdata[848] */\n    {  283, 0x0000000000000000ULL, { 0x2FD10CEF1C56661AULL, 0x42949DA60D6A3F07ULL } }, /* XSUM_XXH128_testdata[849] */\n    {  283, 0x000000009E3779B1ULL, { 0xCA830ABB8C8B3CEFULL, 0xEA787D512F2DDBA8ULL } }, /* XSUM_XXH128_testdata[850] */\n    {  283, 0x9E3779B185EBCA8DULL, { 0x4C551113F85ADE1EULL, 0x34320431F6616CD9ULL } }, /* XSUM_XXH128_testdata[851] */\n    {  284, 0x0000000000000000ULL, { 0x5E80B417D943A6D2ULL, 0xE271A4A74855C020ULL } }, /* XSUM_XXH128_testdata[852] */\n    {  284, 0x000000009E3779B1ULL, { 0x662CA4576608A544ULL, 0xFAF631311E3FA2A7ULL } }, /* XSUM_XXH128_testdata[853] */\n    {  284, 0x9E3779B185EBCA8DULL, { 0xF8CDAB4759BFEC9CULL, 0xCAED5C15441FBE57ULL } }, /* XSUM_XXH128_testdata[854] */\n    {  285, 0x0000000000000000ULL, { 0xC6499EC47E983831ULL, 0xD23F10BEA11CEFD1ULL } }, /* XSUM_XXH128_testdata[855] */\n    {  285, 0x000000009E3779B1ULL, { 0xB97987F6C78DD113ULL, 0x0D2223100D72074BULL } }, /* XSUM_XXH128_testdata[856] */\n    {  285, 0x9E3779B185EBCA8DULL, { 0x68A990E36FD9E7D9ULL, 0xD8106BC604773204ULL } }, /* XSUM_XXH128_testdata[857] */\n    {  286, 0x0000000000000000ULL, { 0x80AF5CFF653B80C8ULL, 0xCF63F5BAB8F91368ULL } }, /* XSUM_XXH128_testdata[858] */\n    {  286, 0x000000009E3779B1ULL, { 0x7EF070AFFA812566ULL, 0x6735BDEA705CD34FULL } }, /* XSUM_XXH128_testdata[859] */\n    {  286, 0x9E3779B185EBCA8DULL, { 0x57A7FB462EB4E44AULL, 0x6CF00DC62C7B2621ULL } }, /* XSUM_XXH128_testdata[860] */\n    {  287, 0x0000000000000000ULL, { 0xFD9A5D6CB012B7CFULL, 0xF1575E985B39E792ULL } }, /* XSUM_XXH128_testdata[861] */\n    {  287, 0x000000009E3779B1ULL, { 0xA7ACCA9125DC98A4ULL, 0xF23DA07AE769EA09ULL } }, /* XSUM_XXH128_testdata[862] */\n    {  287, 0x9E3779B185EBCA8DULL, { 0x2AE096D435B28E60ULL, 0x1098B08DA4F58180ULL } }, /* XSUM_XXH128_testdata[863] */\n    {  288, 0x0000000000000000ULL, { 0x347640D6208A9759ULL, 0xA06D72DEEEEEBBA8ULL } }, /* XSUM_XXH128_testdata[864] */\n    {  288, 0x000000009E3779B1ULL, { 0xE41486E0DDF772D8ULL, 0xA75A060FEFABF500ULL } }, /* XSUM_XXH128_testdata[865] */\n    {  288, 0x9E3779B185EBCA8DULL, { 0xA7E5D2D6A42CE280ULL, 0x6FF138A3C75832BEULL } }, /* XSUM_XXH128_testdata[866] */\n    {  289, 0x0000000000000000ULL, { 0xBD78E8F346C3A6F8ULL, 0x20076F43DC7F53ABULL } }, /* XSUM_XXH128_testdata[867] */\n    {  289, 0x000000009E3779B1ULL, { 0x45728B6FE8821844ULL, 0xCE68388F48161ADBULL } }, /* XSUM_XXH128_testdata[868] */\n    {  289, 0x9E3779B185EBCA8DULL, { 0x42C31C16CDE0CB93ULL, 0x9C468D93CDBD132EULL } }, /* XSUM_XXH128_testdata[869] */\n    {  290, 0x0000000000000000ULL, { 0x0204AAB22D8EAA99ULL, 0x68E93E2931C0D78CULL } }, /* XSUM_XXH128_testdata[870] */\n    {  290, 0x000000009E3779B1ULL, { 0x0136B0DF7DD76F3EULL, 0x1B554BE2E6620747ULL } }, /* XSUM_XXH128_testdata[871] */\n    {  290, 0x9E3779B185EBCA8DULL, { 0x83B99E15E752ABDAULL, 0xB21CEEDAB50A5D26ULL } }, /* XSUM_XXH128_testdata[872] */\n    {  291, 0x0000000000000000ULL, { 0x59131C26508F9EC8ULL, 0xECFAC6704A3E6DBCULL } }, /* XSUM_XXH128_testdata[873] */\n    {  291, 0x000000009E3779B1ULL, { 0xE7B4E9D8440921F6ULL, 0x4161F41B6FCA7D4BULL } }, /* XSUM_XXH128_testdata[874] */\n    {  291, 0x9E3779B185EBCA8DULL, { 0x5E0AC32BE4E9D932ULL, 0x873ECF88D7ABD324ULL } }, /* XSUM_XXH128_testdata[875] */\n    {  292, 0x0000000000000000ULL, { 0x152B51807477888FULL, 0x1DF1209E78E8517AULL } }, /* XSUM_XXH128_testdata[876] */\n    {  292, 0x000000009E3779B1ULL, { 0x123E2ECE4545B00AULL, 0x5CFB596C6F1A62B9ULL } }, /* XSUM_XXH128_testdata[877] */\n    {  292, 0x9E3779B185EBCA8DULL, { 0x6B0C4D15682F3E3DULL, 0xC6339EC307283D7BULL } }, /* XSUM_XXH128_testdata[878] */\n    {  293, 0x0000000000000000ULL, { 0x05686974668B34F7ULL, 0xAD31CB162B98C471ULL } }, /* XSUM_XXH128_testdata[879] */\n    {  293, 0x000000009E3779B1ULL, { 0x28A81A190A5DA59BULL, 0xB305438B55D602EFULL } }, /* XSUM_XXH128_testdata[880] */\n    {  293, 0x9E3779B185EBCA8DULL, { 0x52AE5AE6FB0817C8ULL, 0xB7815477A7C4ECCDULL } }, /* XSUM_XXH128_testdata[881] */\n    {  294, 0x0000000000000000ULL, { 0x19113494008391ABULL, 0x85B2511B2CC6A9C3ULL } }, /* XSUM_XXH128_testdata[882] */\n    {  294, 0x000000009E3779B1ULL, { 0x540FE57C9DCE3EFBULL, 0x1E505E9FE89799B2ULL } }, /* XSUM_XXH128_testdata[883] */\n    {  294, 0x9E3779B185EBCA8DULL, { 0xE675C79778EE4793ULL, 0x6BB1A6BFE4B22746ULL } }, /* XSUM_XXH128_testdata[884] */\n    {  295, 0x0000000000000000ULL, { 0x3EFAC1DC10E238A4ULL, 0xE26C6E7CCE2CE239ULL } }, /* XSUM_XXH128_testdata[885] */\n    {  295, 0x000000009E3779B1ULL, { 0x056506A9613B74D8ULL, 0x1E1313FE0B89371DULL } }, /* XSUM_XXH128_testdata[886] */\n    {  295, 0x9E3779B185EBCA8DULL, { 0xAF2BA7DCEFC70CA8ULL, 0xCDE6D84AE8E71E12ULL } }, /* XSUM_XXH128_testdata[887] */\n    {  296, 0x0000000000000000ULL, { 0x5F4643F3D41C8764ULL, 0xD03886748B9BA85AULL } }, /* XSUM_XXH128_testdata[888] */\n    {  296, 0x000000009E3779B1ULL, { 0xDD089EC77BC77F35ULL, 0xD9EC3DA2ADF6B81AULL } }, /* XSUM_XXH128_testdata[889] */\n    {  296, 0x9E3779B185EBCA8DULL, { 0x41502D41C73D0567ULL, 0x02A00D0D86277988ULL } }, /* XSUM_XXH128_testdata[890] */\n    {  297, 0x0000000000000000ULL, { 0x118968A8B54B2A15ULL, 0xE4F607B3D8407CA5ULL } }, /* XSUM_XXH128_testdata[891] */\n    {  297, 0x000000009E3779B1ULL, { 0x5475D9165F23555EULL, 0x344C2578BD45106AULL } }, /* XSUM_XXH128_testdata[892] */\n    {  297, 0x9E3779B185EBCA8DULL, { 0xA4591A1ADAB38B25ULL, 0x2B1D851775007D3FULL } }, /* XSUM_XXH128_testdata[893] */\n    {  298, 0x0000000000000000ULL, { 0x2B2CFEA1E201D3ACULL, 0xD8F7E01F8BACFB05ULL } }, /* XSUM_XXH128_testdata[894] */\n    {  298, 0x000000009E3779B1ULL, { 0x424F7E63C1BE19B1ULL, 0x9AE3837D7509DD2CULL } }, /* XSUM_XXH128_testdata[895] */\n    {  298, 0x9E3779B185EBCA8DULL, { 0x3D27B64E0A4A5887ULL, 0xAB64F55806F4BB6CULL } }, /* XSUM_XXH128_testdata[896] */\n    {  299, 0x0000000000000000ULL, { 0x1AB22BB41D28E478ULL, 0xCE5E859FB9F5E79AULL } }, /* XSUM_XXH128_testdata[897] */\n    {  299, 0x000000009E3779B1ULL, { 0xCEE721B1DAFBA491ULL, 0x26751E1F9A915E5FULL } }, /* XSUM_XXH128_testdata[898] */\n    {  299, 0x9E3779B185EBCA8DULL, { 0x8E0A8E8D5C430085ULL, 0xF841A00EC7BEA777ULL } }, /* XSUM_XXH128_testdata[899] */\n    {  300, 0x0000000000000000ULL, { 0x7F371220466C4A1AULL, 0x8598507AD0B8FDE1ULL } }, /* XSUM_XXH128_testdata[900] */\n    {  300, 0x000000009E3779B1ULL, { 0x9F95EEAE253EEFCFULL, 0xBCAEF611BF9B2063ULL } }, /* XSUM_XXH128_testdata[901] */\n    {  300, 0x9E3779B185EBCA8DULL, { 0x1C886C664C4D81C4ULL, 0xD05510909C53A93CULL } }, /* XSUM_XXH128_testdata[902] */\n    {  301, 0x0000000000000000ULL, { 0x69956645B30B3D03ULL, 0x50460B80555A8624ULL } }, /* XSUM_XXH128_testdata[903] */\n    {  301, 0x000000009E3779B1ULL, { 0xAE11A4AB0451BA0AULL, 0x77324337B893AA1AULL } }, /* XSUM_XXH128_testdata[904] */\n    {  301, 0x9E3779B185EBCA8DULL, { 0xC3314BB184586528ULL, 0xEEFD9F3B65855F66ULL } }, /* XSUM_XXH128_testdata[905] */\n    {  302, 0x0000000000000000ULL, { 0xC9775577787FAC4BULL, 0x9853DA00C988B9D8ULL } }, /* XSUM_XXH128_testdata[906] */\n    {  302, 0x000000009E3779B1ULL, { 0x0BAC92F641F3F4ECULL, 0xA926650C5937B287ULL } }, /* XSUM_XXH128_testdata[907] */\n    {  302, 0x9E3779B185EBCA8DULL, { 0x0F10E728CA0B206DULL, 0xD1328E51245AE4FBULL } }, /* XSUM_XXH128_testdata[908] */\n    {  303, 0x0000000000000000ULL, { 0x9B88FAF2C535DB33ULL, 0x51D50CAF104CA808ULL } }, /* XSUM_XXH128_testdata[909] */\n    {  303, 0x000000009E3779B1ULL, { 0x41320BB673FB449CULL, 0x129F50D01EDF7ACFULL } }, /* XSUM_XXH128_testdata[910] */\n    {  303, 0x9E3779B185EBCA8DULL, { 0xC05073F3497D23D6ULL, 0x18CDCB099E810F88ULL } }, /* XSUM_XXH128_testdata[911] */\n    {  304, 0x0000000000000000ULL, { 0xCB1FB32DE8603D38ULL, 0xDBC84CA83689C7A9ULL } }, /* XSUM_XXH128_testdata[912] */\n    {  304, 0x000000009E3779B1ULL, { 0xF43462E56AF24403ULL, 0x51E4973BCFC1F08EULL } }, /* XSUM_XXH128_testdata[913] */\n    {  304, 0x9E3779B185EBCA8DULL, { 0xC932730EB0F57280ULL, 0x94B7D29773457392ULL } }, /* XSUM_XXH128_testdata[914] */\n    {  305, 0x0000000000000000ULL, { 0x96C7F9915951C55FULL, 0xA6109FCBDDBC645FULL } }, /* XSUM_XXH128_testdata[915] */\n    {  305, 0x000000009E3779B1ULL, { 0x152CD15D5FCF5391ULL, 0x03BA299B54F2D84CULL } }, /* XSUM_XXH128_testdata[916] */\n    {  305, 0x9E3779B185EBCA8DULL, { 0x099D504612C1C3D3ULL, 0xBC7BE7ACBDFED9B2ULL } }, /* XSUM_XXH128_testdata[917] */\n    {  306, 0x0000000000000000ULL, { 0x30AB2B22A729B0B0ULL, 0x11DD5CBB51A5CC12ULL } }, /* XSUM_XXH128_testdata[918] */\n    {  306, 0x000000009E3779B1ULL, { 0xE7D36EE2D081EB7FULL, 0xD0836797E776F362ULL } }, /* XSUM_XXH128_testdata[919] */\n    {  306, 0x9E3779B185EBCA8DULL, { 0x3882FFEB3971E2AAULL, 0x58BA5DBA8CF31230ULL } }, /* XSUM_XXH128_testdata[920] */\n    {  307, 0x0000000000000000ULL, { 0x1203D0A98E057A63ULL, 0x911A9F0C46005C1AULL } }, /* XSUM_XXH128_testdata[921] */\n    {  307, 0x000000009E3779B1ULL, { 0x877420B0D038BA55ULL, 0x641B0BBAD2E24F56ULL } }, /* XSUM_XXH128_testdata[922] */\n    {  307, 0x9E3779B185EBCA8DULL, { 0xCCCC1F21C9C38955ULL, 0x51A2825B7E4DE7CDULL } }, /* XSUM_XXH128_testdata[923] */\n    {  308, 0x0000000000000000ULL, { 0x5FE7A4E31AA01D1DULL, 0xE0EB118E567C95DAULL } }, /* XSUM_XXH128_testdata[924] */\n    {  308, 0x000000009E3779B1ULL, { 0x5745B78AC02232D4ULL, 0x5DEE99015E0E012DULL } }, /* XSUM_XXH128_testdata[925] */\n    {  308, 0x9E3779B185EBCA8DULL, { 0x24D6AB786E6DC5DCULL, 0x12DD67F17BCEECE0ULL } }, /* XSUM_XXH128_testdata[926] */\n    {  309, 0x0000000000000000ULL, { 0x61EB6DCB5461BC22ULL, 0xC9FA77541652802CULL } }, /* XSUM_XXH128_testdata[927] */\n    {  309, 0x000000009E3779B1ULL, { 0xF0C1B23D245BCED8ULL, 0x0029A669769E7766ULL } }, /* XSUM_XXH128_testdata[928] */\n    {  309, 0x9E3779B185EBCA8DULL, { 0x829A233AB8802F5BULL, 0xE9C6D7A0194443CCULL } }, /* XSUM_XXH128_testdata[929] */\n    {  310, 0x0000000000000000ULL, { 0xC373303BCFE79C7CULL, 0xB8AD8DE555D53C1FULL } }, /* XSUM_XXH128_testdata[930] */\n    {  310, 0x000000009E3779B1ULL, { 0xCEAD952144171664ULL, 0x9A251720D9BC2354ULL } }, /* XSUM_XXH128_testdata[931] */\n    {  310, 0x9E3779B185EBCA8DULL, { 0x03AF173FEE6164EEULL, 0xBC4CA2DF0D07C2EEULL } }, /* XSUM_XXH128_testdata[932] */\n    {  311, 0x0000000000000000ULL, { 0x5D49DFEAFFEC1516ULL, 0xFDBEE2150DC799CBULL } }, /* XSUM_XXH128_testdata[933] */\n    {  311, 0x000000009E3779B1ULL, { 0xC6DD4C0A44CDFACBULL, 0xF16ECB91F24EBA99ULL } }, /* XSUM_XXH128_testdata[934] */\n    {  311, 0x9E3779B185EBCA8DULL, { 0xF33B315CCBED8F5FULL, 0x6A3427018AB7CF84ULL } }, /* XSUM_XXH128_testdata[935] */\n    {  312, 0x0000000000000000ULL, { 0x9B69B6E825CB842EULL, 0xE82C4F29EB0741CAULL } }, /* XSUM_XXH128_testdata[936] */\n    {  312, 0x000000009E3779B1ULL, { 0x5BE4933DDEF5B3CBULL, 0x8415410D0880D3E9ULL } }, /* XSUM_XXH128_testdata[937] */\n    {  312, 0x9E3779B185EBCA8DULL, { 0x641BB90692349562ULL, 0xDED285D806F94A45ULL } }, /* XSUM_XXH128_testdata[938] */\n    {  313, 0x0000000000000000ULL, { 0x175528876AADCD25ULL, 0x9A6C1BFE2D319291ULL } }, /* XSUM_XXH128_testdata[939] */\n    {  313, 0x000000009E3779B1ULL, { 0x0B9AE72C9C5A059AULL, 0xA431C5B7D5BD2295ULL } }, /* XSUM_XXH128_testdata[940] */\n    {  313, 0x9E3779B185EBCA8DULL, { 0x2178617919926E81ULL, 0x0473F78603FB5FB6ULL } }, /* XSUM_XXH128_testdata[941] */\n    {  314, 0x0000000000000000ULL, { 0x760A4A825703F2EEULL, 0x6AE0AD0690ED55EFULL } }, /* XSUM_XXH128_testdata[942] */\n    {  314, 0x000000009E3779B1ULL, { 0xAD2E7894E164C5D3ULL, 0xF3B1AC05D45B7131ULL } }, /* XSUM_XXH128_testdata[943] */\n    {  314, 0x9E3779B185EBCA8DULL, { 0xBEA3F478303CA866ULL, 0xEDA75CA433BD88D4ULL } }, /* XSUM_XXH128_testdata[944] */\n    {  315, 0x0000000000000000ULL, { 0x236712F8295DC8C5ULL, 0x9DCF7D301849AC06ULL } }, /* XSUM_XXH128_testdata[945] */\n    {  315, 0x000000009E3779B1ULL, { 0xB74C8D4D95B8A968ULL, 0x8FC3863F28DCC692ULL } }, /* XSUM_XXH128_testdata[946] */\n    {  315, 0x9E3779B185EBCA8DULL, { 0xECDC8B1C138EFF7CULL, 0x7DC213357727F518ULL } }, /* XSUM_XXH128_testdata[947] */\n    {  316, 0x0000000000000000ULL, { 0x7E0D2210E4B43FD4ULL, 0xC2735B508B6F75FCULL } }, /* XSUM_XXH128_testdata[948] */\n    {  316, 0x000000009E3779B1ULL, { 0x9FF0B7FB0BBA7B8AULL, 0x4567BD3D56210911ULL } }, /* XSUM_XXH128_testdata[949] */\n    {  316, 0x9E3779B185EBCA8DULL, { 0xCDE6DF03B9FF13A8ULL, 0x9FFCF1846EA4D888ULL } }, /* XSUM_XXH128_testdata[950] */\n    {  317, 0x0000000000000000ULL, { 0x0812693CCEDB7A83ULL, 0xAAAD735ACFC0B9E3ULL } }, /* XSUM_XXH128_testdata[951] */\n    {  317, 0x000000009E3779B1ULL, { 0xCFD316FF5148B965ULL, 0x3C6155AE48EDCA5EULL } }, /* XSUM_XXH128_testdata[952] */\n    {  317, 0x9E3779B185EBCA8DULL, { 0x6C89B1AC74E2A842ULL, 0x440F67F6A0047178ULL } }, /* XSUM_XXH128_testdata[953] */\n    {  318, 0x0000000000000000ULL, { 0x249F29F2EFF9128CULL, 0x75049F4285A3B67EULL } }, /* XSUM_XXH128_testdata[954] */\n    {  318, 0x000000009E3779B1ULL, { 0x6DC80FD1C71C3BFBULL, 0xDFCA546F57A2B363ULL } }, /* XSUM_XXH128_testdata[955] */\n    {  318, 0x9E3779B185EBCA8DULL, { 0xCACCB88CE9D2648AULL, 0x1927A532C621E499ULL } }, /* XSUM_XXH128_testdata[956] */\n    {  319, 0x0000000000000000ULL, { 0x0FCAA9E59EC5A883ULL, 0x3F5E05AF8CE5DDA8ULL } }, /* XSUM_XXH128_testdata[957] */\n    {  319, 0x000000009E3779B1ULL, { 0xF2F6DD4E6A81C177ULL, 0xCC78EB92B759FD16ULL } }, /* XSUM_XXH128_testdata[958] */\n    {  319, 0x9E3779B185EBCA8DULL, { 0xDFAF7A1B8B2DB390ULL, 0x1D2128F8604CD3ECULL } }, /* XSUM_XXH128_testdata[959] */\n    {  320, 0x0000000000000000ULL, { 0x75620D350FF5C694ULL, 0x2C6021659F44E8D3ULL } }, /* XSUM_XXH128_testdata[960] */\n    {  320, 0x000000009E3779B1ULL, { 0xB9BA3E6E10EF64F0ULL, 0x1155A21ACAD989FAULL } }, /* XSUM_XXH128_testdata[961] */\n    {  320, 0x9E3779B185EBCA8DULL, { 0x19171DE40C928F07ULL, 0xB93ECA53885ABFBDULL } }, /* XSUM_XXH128_testdata[962] */\n    {  321, 0x0000000000000000ULL, { 0x2D8C7E2634AB900AULL, 0xB0A6157E8CCDB4A4ULL } }, /* XSUM_XXH128_testdata[963] */\n    {  321, 0x000000009E3779B1ULL, { 0xABA2726D09B77278ULL, 0x5168F805BD240D86ULL } }, /* XSUM_XXH128_testdata[964] */\n    {  321, 0x9E3779B185EBCA8DULL, { 0x14AB0056CC187827ULL, 0x221581C8665A8B28ULL } }, /* XSUM_XXH128_testdata[965] */\n    {  322, 0x0000000000000000ULL, { 0xA0DDC9DC085BC472ULL, 0x4E1B45CFDECCA66BULL } }, /* XSUM_XXH128_testdata[966] */\n    {  322, 0x000000009E3779B1ULL, { 0x1CD5AC2049E34698ULL, 0x7E30D9D1CD52FFD8ULL } }, /* XSUM_XXH128_testdata[967] */\n    {  322, 0x9E3779B185EBCA8DULL, { 0x0A37284F6B829CA9ULL, 0x3E62BD38C9318156ULL } }, /* XSUM_XXH128_testdata[968] */\n    {  323, 0x0000000000000000ULL, { 0x141D6EF253EAB278ULL, 0x79BA2CDCA05FD0DAULL } }, /* XSUM_XXH128_testdata[969] */\n    {  323, 0x000000009E3779B1ULL, { 0x81647DFF49E951D2ULL, 0x31733B70C2E7C2D3ULL } }, /* XSUM_XXH128_testdata[970] */\n    {  323, 0x9E3779B185EBCA8DULL, { 0xDB4E00A0E6C2440CULL, 0x23754C1E32E5E9ABULL } }, /* XSUM_XXH128_testdata[971] */\n    {  324, 0x0000000000000000ULL, { 0x46033B0653C32026ULL, 0x834E9EE33BF9BA44ULL } }, /* XSUM_XXH128_testdata[972] */\n    {  324, 0x000000009E3779B1ULL, { 0x5DF48B77931AFAD1ULL, 0xE6C0E74449570878ULL } }, /* XSUM_XXH128_testdata[973] */\n    {  324, 0x9E3779B185EBCA8DULL, { 0xF8F7E4A13FD0C762ULL, 0x4851DB74AE8A2D83ULL } }, /* XSUM_XXH128_testdata[974] */\n    {  325, 0x0000000000000000ULL, { 0x9783E6F884F9C3EEULL, 0x89BCF8710E0D4E41ULL } }, /* XSUM_XXH128_testdata[975] */\n    {  325, 0x000000009E3779B1ULL, { 0xD80F5373F1296BC9ULL, 0xAA8E10776B8615EBULL } }, /* XSUM_XXH128_testdata[976] */\n    {  325, 0x9E3779B185EBCA8DULL, { 0x38FB4170FEC5D1F5ULL, 0xC4CEAE832005496BULL } }, /* XSUM_XXH128_testdata[977] */\n    {  326, 0x0000000000000000ULL, { 0x30D17CB374CC76A1ULL, 0xF6A0735177F5D3A5ULL } }, /* XSUM_XXH128_testdata[978] */\n    {  326, 0x000000009E3779B1ULL, { 0xAB6A4A5950DBAF53ULL, 0x591C47DA64F9DD1AULL } }, /* XSUM_XXH128_testdata[979] */\n    {  326, 0x9E3779B185EBCA8DULL, { 0x40E89C75F444E468ULL, 0xF418D2CD4A5DF0AFULL } }, /* XSUM_XXH128_testdata[980] */\n    {  327, 0x0000000000000000ULL, { 0x8917F6B5E2510EF2ULL, 0x1C64401B73BEC382ULL } }, /* XSUM_XXH128_testdata[981] */\n    {  327, 0x000000009E3779B1ULL, { 0xC13523ABBC3CE6BCULL, 0x38E77A647114F1CFULL } }, /* XSUM_XXH128_testdata[982] */\n    {  327, 0x9E3779B185EBCA8DULL, { 0xCE4C72C7D9F66CB8ULL, 0x4F847F88962BB9DFULL } }, /* XSUM_XXH128_testdata[983] */\n    {  328, 0x0000000000000000ULL, { 0x4A40757A80E28484ULL, 0x46E122AC65B3E196ULL } }, /* XSUM_XXH128_testdata[984] */\n    {  328, 0x000000009E3779B1ULL, { 0xF5F1768B1FB36088ULL, 0x05E77E8D4EFCE72FULL } }, /* XSUM_XXH128_testdata[985] */\n    {  328, 0x9E3779B185EBCA8DULL, { 0xBA5941F2C9148DC1ULL, 0xE5D183B96A900A0EULL } }, /* XSUM_XXH128_testdata[986] */\n    {  329, 0x0000000000000000ULL, { 0xF8C7161544010C5AULL, 0x87EC4759EB38193BULL } }, /* XSUM_XXH128_testdata[987] */\n    {  329, 0x000000009E3779B1ULL, { 0xB1B136E7E4660F58ULL, 0x4BBA1ADF884B71CFULL } }, /* XSUM_XXH128_testdata[988] */\n    {  329, 0x9E3779B185EBCA8DULL, { 0x24B1D84FE7244B61ULL, 0x6B929AC3C76D2D3CULL } }, /* XSUM_XXH128_testdata[989] */\n    {  330, 0x0000000000000000ULL, { 0xE72B9958E036078AULL, 0x937D9B8A02E2CC58ULL } }, /* XSUM_XXH128_testdata[990] */\n    {  330, 0x000000009E3779B1ULL, { 0xC15E95AC0F3EC49DULL, 0x79848986AE1EF75EULL } }, /* XSUM_XXH128_testdata[991] */\n    {  330, 0x9E3779B185EBCA8DULL, { 0xBE30B55DC980DB1EULL, 0xF27DD456B49A2C97ULL } }, /* XSUM_XXH128_testdata[992] */\n    {  331, 0x0000000000000000ULL, { 0x442E0D1FD80248FCULL, 0xCF07485A4409F558ULL } }, /* XSUM_XXH128_testdata[993] */\n    {  331, 0x000000009E3779B1ULL, { 0xE24AC85BF3680116ULL, 0xB3A31092A187F549ULL } }, /* XSUM_XXH128_testdata[994] */\n    {  331, 0x9E3779B185EBCA8DULL, { 0x2A6EF8B6395B6E1FULL, 0x5606970E74CAFB16ULL } }, /* XSUM_XXH128_testdata[995] */\n    {  332, 0x0000000000000000ULL, { 0xE64066C1FEFE4314ULL, 0x6E0EE56E0B958D99ULL } }, /* XSUM_XXH128_testdata[996] */\n    {  332, 0x000000009E3779B1ULL, { 0x8E76136474EC6434ULL, 0x84CE3C3D9E9C46E1ULL } }, /* XSUM_XXH128_testdata[997] */\n    {  332, 0x9E3779B185EBCA8DULL, { 0xD575491B1369F423ULL, 0x85F79A2BABE49E33ULL } }, /* XSUM_XXH128_testdata[998] */\n    {  333, 0x0000000000000000ULL, { 0xF80DC8E14BBD6D07ULL, 0x94641789E3BA0E40ULL } }, /* XSUM_XXH128_testdata[999] */\n    {  333, 0x000000009E3779B1ULL, { 0xC9CCC48BC234271EULL, 0xE373F0627CC52A5CULL } }, /* XSUM_XXH128_testdata[1000] */\n    {  333, 0x9E3779B185EBCA8DULL, { 0x490D275952EBC0F0ULL, 0xFEF9881B397E81C9ULL } }, /* XSUM_XXH128_testdata[1001] */\n    {  334, 0x0000000000000000ULL, { 0x05A390D29F6A054AULL, 0x54CB240D98625A4FULL } }, /* XSUM_XXH128_testdata[1002] */\n    {  334, 0x000000009E3779B1ULL, { 0xE16F8CD1CABF4730ULL, 0x5F73BEA5BBC1958EULL } }, /* XSUM_XXH128_testdata[1003] */\n    {  334, 0x9E3779B185EBCA8DULL, { 0x306CB1E3B8D155CBULL, 0x58CD5CF40A2AF849ULL } }, /* XSUM_XXH128_testdata[1004] */\n    {  335, 0x0000000000000000ULL, { 0xB337A624E2A2ADB0ULL, 0x9129B8C0359C0AA9ULL } }, /* XSUM_XXH128_testdata[1005] */\n    {  335, 0x000000009E3779B1ULL, { 0x38837B6CE9C33C88ULL, 0xB0A01ACA85F284B7ULL } }, /* XSUM_XXH128_testdata[1006] */\n    {  335, 0x9E3779B185EBCA8DULL, { 0xC1396645408E6BC0ULL, 0x285ACACD19493C2AULL } }, /* XSUM_XXH128_testdata[1007] */\n    {  336, 0x0000000000000000ULL, { 0x5A38ED04BF508E7FULL, 0x1CB828735781F99CULL } }, /* XSUM_XXH128_testdata[1008] */\n    {  336, 0x000000009E3779B1ULL, { 0xE449B8B982915095ULL, 0x908D814968BA0C78ULL } }, /* XSUM_XXH128_testdata[1009] */\n    {  336, 0x9E3779B185EBCA8DULL, { 0x0BEA662D759BA2EDULL, 0x0736FF46B524B6B0ULL } }, /* XSUM_XXH128_testdata[1010] */\n    {  337, 0x0000000000000000ULL, { 0x050BA6EB5632DB62ULL, 0x9B3F10DD20F92ED6ULL } }, /* XSUM_XXH128_testdata[1011] */\n    {  337, 0x000000009E3779B1ULL, { 0x02E5ACD1F6E0A8FFULL, 0xE8751D7DA7E170DCULL } }, /* XSUM_XXH128_testdata[1012] */\n    {  337, 0x9E3779B185EBCA8DULL, { 0x4E862E4034934DC9ULL, 0x849F0D4EDC89C227ULL } }, /* XSUM_XXH128_testdata[1013] */\n    {  338, 0x0000000000000000ULL, { 0x1811F916B865B860ULL, 0x9504314AAD67455DULL } }, /* XSUM_XXH128_testdata[1014] */\n    {  338, 0x000000009E3779B1ULL, { 0xDD81DA51E6B1D9F8ULL, 0x13B7F8E03A7EDE9CULL } }, /* XSUM_XXH128_testdata[1015] */\n    {  338, 0x9E3779B185EBCA8DULL, { 0x7BBC087180D4823FULL, 0x3A213E0EC6515E3FULL } }, /* XSUM_XXH128_testdata[1016] */\n    {  339, 0x0000000000000000ULL, { 0x6690999CE07A1E8EULL, 0xDDB2E7FA4C315505ULL } }, /* XSUM_XXH128_testdata[1017] */\n    {  339, 0x000000009E3779B1ULL, { 0x12D4DF4F891B23D8ULL, 0x5951869BB791C1A9ULL } }, /* XSUM_XXH128_testdata[1018] */\n    {  339, 0x9E3779B185EBCA8DULL, { 0xA273568067213D0DULL, 0x62CE06AFD8D97942ULL } }, /* XSUM_XXH128_testdata[1019] */\n    {  340, 0x0000000000000000ULL, { 0xA351535A71F4582BULL, 0x4D3542769D4A893EULL } }, /* XSUM_XXH128_testdata[1020] */\n    {  340, 0x000000009E3779B1ULL, { 0x4DE55CD894398E6DULL, 0x17254BB0627017F2ULL } }, /* XSUM_XXH128_testdata[1021] */\n    {  340, 0x9E3779B185EBCA8DULL, { 0x142398F3E722FCDBULL, 0x4F99EF6879DC030AULL } }, /* XSUM_XXH128_testdata[1022] */\n    {  341, 0x0000000000000000ULL, { 0x2ED4C42D9BF9EF7EULL, 0x076FB63638ABE331ULL } }, /* XSUM_XXH128_testdata[1023] */\n    {  341, 0x000000009E3779B1ULL, { 0x5E4BCFF4AEEE78BDULL, 0x720A34D03D11AE58ULL } }, /* XSUM_XXH128_testdata[1024] */\n    {  341, 0x9E3779B185EBCA8DULL, { 0x1424231A7C813FA7ULL, 0x656FF11095B2B0AEULL } }, /* XSUM_XXH128_testdata[1025] */\n    {  342, 0x0000000000000000ULL, { 0xC28197021E7B3D09ULL, 0xCACBF52C6A29A707ULL } }, /* XSUM_XXH128_testdata[1026] */\n    {  342, 0x000000009E3779B1ULL, { 0x1C9B357D95126971ULL, 0xDB40C08B8EAA8EF6ULL } }, /* XSUM_XXH128_testdata[1027] */\n    {  342, 0x9E3779B185EBCA8DULL, { 0x3C8312E82E55D3E5ULL, 0x7BED740F638053D0ULL } }, /* XSUM_XXH128_testdata[1028] */\n    {  343, 0x0000000000000000ULL, { 0x18AD1812D3FDBF32ULL, 0x2F2DD7AFF2BF43FFULL } }, /* XSUM_XXH128_testdata[1029] */\n    {  343, 0x000000009E3779B1ULL, { 0xE5D4BB6826EE11B4ULL, 0x7E1AA6E40A388F3BULL } }, /* XSUM_XXH128_testdata[1030] */\n    {  343, 0x9E3779B185EBCA8DULL, { 0x5E89058684C6D863ULL, 0xEA5A491E81AFD4E6ULL } }, /* XSUM_XXH128_testdata[1031] */\n    {  344, 0x0000000000000000ULL, { 0x06F60422B9DA6E7DULL, 0x570BD3ECDC537804ULL } }, /* XSUM_XXH128_testdata[1032] */\n    {  344, 0x000000009E3779B1ULL, { 0x57F3C81E056E0A53ULL, 0x2C3D990AAE98E5D9ULL } }, /* XSUM_XXH128_testdata[1033] */\n    {  344, 0x9E3779B185EBCA8DULL, { 0xEDFAAEC0A5BC66F9ULL, 0x8547DE4990B37C50ULL } }, /* XSUM_XXH128_testdata[1034] */\n    {  345, 0x0000000000000000ULL, { 0xC91F092A0D5BE3BEULL, 0x0754D9DD0C4C37CCULL } }, /* XSUM_XXH128_testdata[1035] */\n    {  345, 0x000000009E3779B1ULL, { 0x5D7BDB9757BF0AF6ULL, 0x1FC3CA0034823665ULL } }, /* XSUM_XXH128_testdata[1036] */\n    {  345, 0x9E3779B185EBCA8DULL, { 0xA11B94283398F91DULL, 0x63B3234E0ECA6835ULL } }, /* XSUM_XXH128_testdata[1037] */\n    {  346, 0x0000000000000000ULL, { 0xD4CCD2EE25CBE5B0ULL, 0x4C49E5396DDBA5C2ULL } }, /* XSUM_XXH128_testdata[1038] */\n    {  346, 0x000000009E3779B1ULL, { 0x9D7D1E8CDA685C56ULL, 0xEAE1AACE407431B3ULL } }, /* XSUM_XXH128_testdata[1039] */\n    {  346, 0x9E3779B185EBCA8DULL, { 0x3C81706ECA21BC7DULL, 0x822BA48517BFB656ULL } }, /* XSUM_XXH128_testdata[1040] */\n    {  347, 0x0000000000000000ULL, { 0x6B5289DA0ACD5BBFULL, 0x102C5EDCA78EE10DULL } }, /* XSUM_XXH128_testdata[1041] */\n    {  347, 0x000000009E3779B1ULL, { 0x607FA44EBD1C6140ULL, 0x52E7FB4DAA6C8949ULL } }, /* XSUM_XXH128_testdata[1042] */\n    {  347, 0x9E3779B185EBCA8DULL, { 0x55D376673F5026AEULL, 0xB5BC2458E1103C8AULL } }, /* XSUM_XXH128_testdata[1043] */\n    {  348, 0x0000000000000000ULL, { 0xE6162B73B28EB205ULL, 0xEE0CB98DB5E79EFCULL } }, /* XSUM_XXH128_testdata[1044] */\n    {  348, 0x000000009E3779B1ULL, { 0xC57F0EEA31081141ULL, 0xAD27847DE0C2157FULL } }, /* XSUM_XXH128_testdata[1045] */\n    {  348, 0x9E3779B185EBCA8DULL, { 0x0AAE09BDCF8FD99EULL, 0xEC5DF4F7F0E17EAEULL } }, /* XSUM_XXH128_testdata[1046] */\n    {  349, 0x0000000000000000ULL, { 0x9357F7E9DE083C47ULL, 0x0C73ABE849499975ULL } }, /* XSUM_XXH128_testdata[1047] */\n    {  349, 0x000000009E3779B1ULL, { 0x1FD3E8425F930379ULL, 0x8BF46FACBD499B59ULL } }, /* XSUM_XXH128_testdata[1048] */\n    {  349, 0x9E3779B185EBCA8DULL, { 0xB2AD4B3CBC09451DULL, 0x3276AD4B9821C7EFULL } }, /* XSUM_XXH128_testdata[1049] */\n    {  350, 0x0000000000000000ULL, { 0xD097B966C4C4E964ULL, 0x2576C698D0A99B75ULL } }, /* XSUM_XXH128_testdata[1050] */\n    {  350, 0x000000009E3779B1ULL, { 0xE0945A4D592AC0CDULL, 0x9450AABA277D8255ULL } }, /* XSUM_XXH128_testdata[1051] */\n    {  350, 0x9E3779B185EBCA8DULL, { 0xFCDE6E432D40421CULL, 0x8FC1585475DCC018ULL } }, /* XSUM_XXH128_testdata[1052] */\n    {  351, 0x0000000000000000ULL, { 0x2F10A562E85CBED8ULL, 0x30DDD726C46C1BB4ULL } }, /* XSUM_XXH128_testdata[1053] */\n    {  351, 0x000000009E3779B1ULL, { 0x592ABE1A57641817ULL, 0x4F1907C042273419ULL } }, /* XSUM_XXH128_testdata[1054] */\n    {  351, 0x9E3779B185EBCA8DULL, { 0x37C28859C95AF762ULL, 0x6BB62D4B852F992DULL } }, /* XSUM_XXH128_testdata[1055] */\n    {  352, 0x0000000000000000ULL, { 0x0A72390BFB1873B9ULL, 0xB6364519C3B9E10CULL } }, /* XSUM_XXH128_testdata[1056] */\n    {  352, 0x000000009E3779B1ULL, { 0x034A4FFCDF58B2FDULL, 0x8C37F95B65E18DBEULL } }, /* XSUM_XXH128_testdata[1057] */\n    {  352, 0x9E3779B185EBCA8DULL, { 0xD533F779497D9415ULL, 0x44FBD702D3733C17ULL } }, /* XSUM_XXH128_testdata[1058] */\n    {  353, 0x0000000000000000ULL, { 0x7B11C6784AC00CFBULL, 0x63B970B140AE7013ULL } }, /* XSUM_XXH128_testdata[1059] */\n    {  353, 0x000000009E3779B1ULL, { 0xB02965D6B66E2A3EULL, 0x8E8796707FD59889ULL } }, /* XSUM_XXH128_testdata[1060] */\n    {  353, 0x9E3779B185EBCA8DULL, { 0xD9AC0BDE567EA98EULL, 0xECF15BFCB6DDD332ULL } }, /* XSUM_XXH128_testdata[1061] */\n    {  354, 0x0000000000000000ULL, { 0x38371A361827DDF8ULL, 0x21DEE5FA11EE3B0CULL } }, /* XSUM_XXH128_testdata[1062] */\n    {  354, 0x000000009E3779B1ULL, { 0x2D7B5BB198984F95ULL, 0xE1DAA64C28429017ULL } }, /* XSUM_XXH128_testdata[1063] */\n    {  354, 0x9E3779B185EBCA8DULL, { 0x0F5EABDFD0AAADE5ULL, 0x350599349EF4805EULL } }, /* XSUM_XXH128_testdata[1064] */\n    {  355, 0x0000000000000000ULL, { 0xFED1244A20C5D95EULL, 0x17C05D00865F5BBBULL } }, /* XSUM_XXH128_testdata[1065] */\n    {  355, 0x000000009E3779B1ULL, { 0x329BC6ECBFC2C8ADULL, 0x7C4AD6684C87254AULL } }, /* XSUM_XXH128_testdata[1066] */\n    {  355, 0x9E3779B185EBCA8DULL, { 0x86BAC8C9DA725C98ULL, 0x8483ECFED89D9AD8ULL } }, /* XSUM_XXH128_testdata[1067] */\n    {  356, 0x0000000000000000ULL, { 0x6758D5737F8EE218ULL, 0x63331AA64D4C2915ULL } }, /* XSUM_XXH128_testdata[1068] */\n    {  356, 0x000000009E3779B1ULL, { 0x4629AD59CC887727ULL, 0x1DBA4989D98A7613ULL } }, /* XSUM_XXH128_testdata[1069] */\n    {  356, 0x9E3779B185EBCA8DULL, { 0xC7BF8A1EF7442E3AULL, 0xA561869A36BC3AD0ULL } }, /* XSUM_XXH128_testdata[1070] */\n    {  357, 0x0000000000000000ULL, { 0x0A8EF0DC9CD19128ULL, 0xB8BCFE7A9514C95DULL } }, /* XSUM_XXH128_testdata[1071] */\n    {  357, 0x000000009E3779B1ULL, { 0x4AF5E35FB3F56181ULL, 0x98BC9A5577587257ULL } }, /* XSUM_XXH128_testdata[1072] */\n    {  357, 0x9E3779B185EBCA8DULL, { 0x89662B16B4CA80CEULL, 0x98A86E9E7DCC9A08ULL } }, /* XSUM_XXH128_testdata[1073] */\n    {  358, 0x0000000000000000ULL, { 0x356710A360FE6D37ULL, 0x4FB1519EA5C5D074ULL } }, /* XSUM_XXH128_testdata[1074] */\n    {  358, 0x000000009E3779B1ULL, { 0xC0C09E9FA5A790B2ULL, 0x314823A706B5E1C1ULL } }, /* XSUM_XXH128_testdata[1075] */\n    {  358, 0x9E3779B185EBCA8DULL, { 0xC3DF10584D452FB5ULL, 0x3844A7ED50C06BC1ULL } }, /* XSUM_XXH128_testdata[1076] */\n    {  359, 0x0000000000000000ULL, { 0x689E083407BDA77AULL, 0xF53BC92D984E1B5BULL } }, /* XSUM_XXH128_testdata[1077] */\n    {  359, 0x000000009E3779B1ULL, { 0xDB03B1E4028F1460ULL, 0x27122AF0B46E579DULL } }, /* XSUM_XXH128_testdata[1078] */\n    {  359, 0x9E3779B185EBCA8DULL, { 0xB6A2FCB2E192C8BFULL, 0xF40F371CD3C2B81AULL } }, /* XSUM_XXH128_testdata[1079] */\n    {  360, 0x0000000000000000ULL, { 0xE67BA7A185827EC1ULL, 0xCCD67450381DD276ULL } }, /* XSUM_XXH128_testdata[1080] */\n    {  360, 0x000000009E3779B1ULL, { 0xFF5E62B2088A8B46ULL, 0xA7702F53539AAEA1ULL } }, /* XSUM_XXH128_testdata[1081] */\n    {  360, 0x9E3779B185EBCA8DULL, { 0xF8FCCE52BFC4BF16ULL, 0x230141AB753BC332ULL } }, /* XSUM_XXH128_testdata[1082] */\n    {  361, 0x0000000000000000ULL, { 0xF9B729ADAAD2CD4AULL, 0x296D66E0621050C4ULL } }, /* XSUM_XXH128_testdata[1083] */\n    {  361, 0x000000009E3779B1ULL, { 0xB96A781B3758AB8EULL, 0x11D91B96B0DB4109ULL } }, /* XSUM_XXH128_testdata[1084] */\n    {  361, 0x9E3779B185EBCA8DULL, { 0xEC259DEBCE39D391ULL, 0xED39CC4376C67AE9ULL } }, /* XSUM_XXH128_testdata[1085] */\n    {  362, 0x0000000000000000ULL, { 0x3E6F14A1C5714D82ULL, 0x9E010E5DE54A1A39ULL } }, /* XSUM_XXH128_testdata[1086] */\n    {  362, 0x000000009E3779B1ULL, { 0xD62E0BC8EE12C124ULL, 0x0400BBC76E2E6F56ULL } }, /* XSUM_XXH128_testdata[1087] */\n    {  362, 0x9E3779B185EBCA8DULL, { 0x178E0A6F73D397C3ULL, 0x8E5440E3B6887D39ULL } }, /* XSUM_XXH128_testdata[1088] */\n    {  363, 0x0000000000000000ULL, { 0xA48FD81FDF6DDFFFULL, 0x338A59AEB76B845DULL } }, /* XSUM_XXH128_testdata[1089] */\n    {  363, 0x000000009E3779B1ULL, { 0xB77CD13A5C9A1A1FULL, 0x78F6AC815F90D86DULL } }, /* XSUM_XXH128_testdata[1090] */\n    {  363, 0x9E3779B185EBCA8DULL, { 0xBB2E607EB6D70F5FULL, 0xEB54DA1B2AE13BC7ULL } }, /* XSUM_XXH128_testdata[1091] */\n    {  364, 0x0000000000000000ULL, { 0xCCAAE62E73DC5F07ULL, 0xE4A4B75B5B267B45ULL } }, /* XSUM_XXH128_testdata[1092] */\n    {  364, 0x000000009E3779B1ULL, { 0xC555A50BB7F8D804ULL, 0x5C20D73A685C5736ULL } }, /* XSUM_XXH128_testdata[1093] */\n    {  364, 0x9E3779B185EBCA8DULL, { 0x967509C003FFCBFBULL, 0xD85C542761F32D26ULL } }, /* XSUM_XXH128_testdata[1094] */\n    {  365, 0x0000000000000000ULL, { 0x40B4623FC1E2CCB4ULL, 0x4BF8A8421D440E9BULL } }, /* XSUM_XXH128_testdata[1095] */\n    {  365, 0x000000009E3779B1ULL, { 0x281F3F48C4E56664ULL, 0x5550333B7273F4BCULL } }, /* XSUM_XXH128_testdata[1096] */\n    {  365, 0x9E3779B185EBCA8DULL, { 0x664821A370168EC6ULL, 0x7D3ACB3B2977D934ULL } }, /* XSUM_XXH128_testdata[1097] */\n    {  366, 0x0000000000000000ULL, { 0x2C07776DF175DC52ULL, 0x0813FEF02F6B3BF4ULL } }, /* XSUM_XXH128_testdata[1098] */\n    {  366, 0x000000009E3779B1ULL, { 0xADE0B87763010F6AULL, 0x15F14A5F01B9FD1FULL } }, /* XSUM_XXH128_testdata[1099] */\n    {  366, 0x9E3779B185EBCA8DULL, { 0xA9B71EB2AB8DAE07ULL, 0x35BE0567A0F09836ULL } }, /* XSUM_XXH128_testdata[1100] */\n    {  367, 0x0000000000000000ULL, { 0x0A5E4DDBA6B9B799ULL, 0x90A3638FD486ED37ULL } }, /* XSUM_XXH128_testdata[1101] */\n    {  367, 0x000000009E3779B1ULL, { 0x7C124C1441EF11FFULL, 0x81E03F2BE2870870ULL } }, /* XSUM_XXH128_testdata[1102] */\n    {  367, 0x9E3779B185EBCA8DULL, { 0x63BFA87876C717E1ULL, 0x6C492CBBDCCB5A1BULL } }, /* XSUM_XXH128_testdata[1103] */\n    {  368, 0x0000000000000000ULL, { 0xEB08A13C50A28D90ULL, 0x9822A230BC3D66FCULL } }, /* XSUM_XXH128_testdata[1104] */\n    {  368, 0x000000009E3779B1ULL, { 0x90B00997C06E3746ULL, 0x41B5C15E701513E5ULL } }, /* XSUM_XXH128_testdata[1105] */\n    {  368, 0x9E3779B185EBCA8DULL, { 0x8D4B6207901AFE7FULL, 0xF3CA2A49E2D5D85CULL } }, /* XSUM_XXH128_testdata[1106] */\n    {  369, 0x0000000000000000ULL, { 0x243028D92185A27FULL, 0x185EB48743B883ABULL } }, /* XSUM_XXH128_testdata[1107] */\n    {  369, 0x000000009E3779B1ULL, { 0x8F5CD39F83920FE1ULL, 0xA084A284E899B83BULL } }, /* XSUM_XXH128_testdata[1108] */\n    {  369, 0x9E3779B185EBCA8DULL, { 0x188181E0EB235BEFULL, 0xFCD1058D8CA68C9CULL } }, /* XSUM_XXH128_testdata[1109] */\n    {  370, 0x0000000000000000ULL, { 0xB03A6034965EB95AULL, 0x151030BD70C8E74EULL } }, /* XSUM_XXH128_testdata[1110] */\n    {  370, 0x000000009E3779B1ULL, { 0xE3E2525E9A9127F2ULL, 0x723396FE87E6D15AULL } }, /* XSUM_XXH128_testdata[1111] */\n    {  370, 0x9E3779B185EBCA8DULL, { 0x3658112343986D03ULL, 0x6D78BCA6EB1446EBULL } }, /* XSUM_XXH128_testdata[1112] */\n    {  371, 0x0000000000000000ULL, { 0xFDAD032ECFF8F81BULL, 0xF8F00359C7294BD1ULL } }, /* XSUM_XXH128_testdata[1113] */\n    {  371, 0x000000009E3779B1ULL, { 0xEB3D660AAA7B4D3AULL, 0x028BB5F599534289ULL } }, /* XSUM_XXH128_testdata[1114] */\n    {  371, 0x9E3779B185EBCA8DULL, { 0xB7B21856F80476EAULL, 0x37B805A72903D8AAULL } }, /* XSUM_XXH128_testdata[1115] */\n    {  372, 0x0000000000000000ULL, { 0x3DF375D22F30175EULL, 0x66432B76EBCDE9A8ULL } }, /* XSUM_XXH128_testdata[1116] */\n    {  372, 0x000000009E3779B1ULL, { 0xD3650F8196C65AEBULL, 0x563CB2A2B0A71C19ULL } }, /* XSUM_XXH128_testdata[1117] */\n    {  372, 0x9E3779B185EBCA8DULL, { 0x895C965C270CB32EULL, 0x2D19469679F3AE57ULL } }, /* XSUM_XXH128_testdata[1118] */\n    {  373, 0x0000000000000000ULL, { 0x457A2E06A96B5EF9ULL, 0xB2D55BBBFF54DC00ULL } }, /* XSUM_XXH128_testdata[1119] */\n    {  373, 0x000000009E3779B1ULL, { 0x24AE82EF1DAFA89DULL, 0x9108CE0BB725E663ULL } }, /* XSUM_XXH128_testdata[1120] */\n    {  373, 0x9E3779B185EBCA8DULL, { 0x465C4F58755A8D6AULL, 0x6BC398295A4174A8ULL } }, /* XSUM_XXH128_testdata[1121] */\n    {  374, 0x0000000000000000ULL, { 0xF975DEE7247758C4ULL, 0x4503DCC68D424164ULL } }, /* XSUM_XXH128_testdata[1122] */\n    {  374, 0x000000009E3779B1ULL, { 0x156EF5C9C724BA7DULL, 0xB45EB1AD392C72A1ULL } }, /* XSUM_XXH128_testdata[1123] */\n    {  374, 0x9E3779B185EBCA8DULL, { 0x222B1690A8184124ULL, 0x9FDB14BF0035B655ULL } }, /* XSUM_XXH128_testdata[1124] */\n    {  375, 0x0000000000000000ULL, { 0x1CE867A9DD80AC40ULL, 0xAFBB83EABC76A1B7ULL } }, /* XSUM_XXH128_testdata[1125] */\n    {  375, 0x000000009E3779B1ULL, { 0x38CB8C13F6ED9C24ULL, 0x03088CB73AF6737EULL } }, /* XSUM_XXH128_testdata[1126] */\n    {  375, 0x9E3779B185EBCA8DULL, { 0xE17A6C6BD03728F8ULL, 0x9D0F2CA05329BA1CULL } }, /* XSUM_XXH128_testdata[1127] */\n    {  376, 0x0000000000000000ULL, { 0x8BC2341CD63EA0E2ULL, 0x086DB4F0798DE341ULL } }, /* XSUM_XXH128_testdata[1128] */\n    {  376, 0x000000009E3779B1ULL, { 0xDC7FDA14DFD7EC44ULL, 0xF4058CBE888DE693ULL } }, /* XSUM_XXH128_testdata[1129] */\n    {  376, 0x9E3779B185EBCA8DULL, { 0xF08CA859CBF039DFULL, 0xE56A6C79F9F3F93CULL } }, /* XSUM_XXH128_testdata[1130] */\n    {  377, 0x0000000000000000ULL, { 0x1E23A8EC4F2C6FD0ULL, 0x9201824E8510A085ULL } }, /* XSUM_XXH128_testdata[1131] */\n    {  377, 0x000000009E3779B1ULL, { 0xB0C2E40F459B8D25ULL, 0xE8E234360E10D74AULL } }, /* XSUM_XXH128_testdata[1132] */\n    {  377, 0x9E3779B185EBCA8DULL, { 0x3520A61AFD050718ULL, 0xEACD6104C4D97A1AULL } }, /* XSUM_XXH128_testdata[1133] */\n    {  378, 0x0000000000000000ULL, { 0x2695FDF58F22BDCFULL, 0x6BB356ADEBFBB63DULL } }, /* XSUM_XXH128_testdata[1134] */\n    {  378, 0x000000009E3779B1ULL, { 0x9AD76FE587EF5E38ULL, 0x360760A0FADDE040ULL } }, /* XSUM_XXH128_testdata[1135] */\n    {  378, 0x9E3779B185EBCA8DULL, { 0x00D5CD7953DFD3CEULL, 0xB4B8019FFB3F9300ULL } }, /* XSUM_XXH128_testdata[1136] */\n    {  379, 0x0000000000000000ULL, { 0xE9D2B64D0D9185BCULL, 0x6C07802D92E1499FULL } }, /* XSUM_XXH128_testdata[1137] */\n    {  379, 0x000000009E3779B1ULL, { 0x6EA7C8E2700A3909ULL, 0x03A77BD67CC671F1ULL } }, /* XSUM_XXH128_testdata[1138] */\n    {  379, 0x9E3779B185EBCA8DULL, { 0xF5C5EFEE146FF373ULL, 0x133CB21F610A57F3ULL } }, /* XSUM_XXH128_testdata[1139] */\n    {  380, 0x0000000000000000ULL, { 0xE0040A13B2B8DE1EULL, 0x12FB3848E30CFCC5ULL } }, /* XSUM_XXH128_testdata[1140] */\n    {  380, 0x000000009E3779B1ULL, { 0x36715EA9B83DE53AULL, 0xF004B1210B0FDF42ULL } }, /* XSUM_XXH128_testdata[1141] */\n    {  380, 0x9E3779B185EBCA8DULL, { 0x274C9D311170A0D4ULL, 0x9973087A019100DAULL } }, /* XSUM_XXH128_testdata[1142] */\n    {  381, 0x0000000000000000ULL, { 0x3CD53A3EEA1BFCCAULL, 0x90305F05D3F01D3EULL } }, /* XSUM_XXH128_testdata[1143] */\n    {  381, 0x000000009E3779B1ULL, { 0x5E5AA20711BC1E1CULL, 0xA03D71CE04CAAD1CULL } }, /* XSUM_XXH128_testdata[1144] */\n    {  381, 0x9E3779B185EBCA8DULL, { 0x58ED6D239F63C2C2ULL, 0x23EEFDC0A9E909E4ULL } }, /* XSUM_XXH128_testdata[1145] */\n    {  382, 0x0000000000000000ULL, { 0x58BB4C31BBD2771DULL, 0x285DD0D45B155422ULL } }, /* XSUM_XXH128_testdata[1146] */\n    {  382, 0x000000009E3779B1ULL, { 0x8B42226BBAA9C949ULL, 0xAC6796BEBE130D39ULL } }, /* XSUM_XXH128_testdata[1147] */\n    {  382, 0x9E3779B185EBCA8DULL, { 0x5F10DEFD207C6C5DULL, 0x20ABBFBDA4DB2A4CULL } }, /* XSUM_XXH128_testdata[1148] */\n    {  383, 0x0000000000000000ULL, { 0xEFF81E7006EF8ADDULL, 0xBD3B403BA7FD5A9AULL } }, /* XSUM_XXH128_testdata[1149] */\n    {  383, 0x000000009E3779B1ULL, { 0x279879471B4CF132ULL, 0x319AA778D510E1AAULL } }, /* XSUM_XXH128_testdata[1150] */\n    {  383, 0x9E3779B185EBCA8DULL, { 0x8A9AC5D71B4A0221ULL, 0x72863637C74AB887ULL } }, /* XSUM_XXH128_testdata[1151] */\n    {  384, 0x0000000000000000ULL, { 0xBFA4BA14B8819D81ULL, 0x58588E7C8285AFB2ULL } }, /* XSUM_XXH128_testdata[1152] */\n    {  384, 0x000000009E3779B1ULL, { 0x503507D98CA33ADBULL, 0x00F82B59D41B65C9ULL } }, /* XSUM_XXH128_testdata[1153] */\n    {  384, 0x9E3779B185EBCA8DULL, { 0x10CABACF1434DB28ULL, 0x9111FC5B7EE63691ULL } }, /* XSUM_XXH128_testdata[1154] */\n    {  385, 0x0000000000000000ULL, { 0x9C71E10B185A00BCULL, 0x3D8C6F30C9728230ULL } }, /* XSUM_XXH128_testdata[1155] */\n    {  385, 0x000000009E3779B1ULL, { 0xEE025D4ABC0BB002ULL, 0xFD7FEC9793BD4C9CULL } }, /* XSUM_XXH128_testdata[1156] */\n    {  385, 0x9E3779B185EBCA8DULL, { 0x04E7D79392ED571BULL, 0x0E5F09728499A65FULL } }, /* XSUM_XXH128_testdata[1157] */\n    {  386, 0x0000000000000000ULL, { 0x973F73776BD1E095ULL, 0x91FEC8A158700D61ULL } }, /* XSUM_XXH128_testdata[1158] */\n    {  386, 0x000000009E3779B1ULL, { 0x5DFAEFD0C7478090ULL, 0x6C7A9803C6C58C04ULL } }, /* XSUM_XXH128_testdata[1159] */\n    {  386, 0x9E3779B185EBCA8DULL, { 0xD83E09472C25BB0AULL, 0x7636705679E7D927ULL } }, /* XSUM_XXH128_testdata[1160] */\n    {  387, 0x0000000000000000ULL, { 0x5B40DFCCAD16CE4DULL, 0x65D1EF3AE59BA221ULL } }, /* XSUM_XXH128_testdata[1161] */\n    {  387, 0x000000009E3779B1ULL, { 0x21044DDC18EE4F8AULL, 0xC67FBB69E603B7B7ULL } }, /* XSUM_XXH128_testdata[1162] */\n    {  387, 0x9E3779B185EBCA8DULL, { 0x86E3EBBCBC2AB1ACULL, 0xE0FF9F9030B9E6C8ULL } }, /* XSUM_XXH128_testdata[1163] */\n    {  388, 0x0000000000000000ULL, { 0x0C8FC0CB7907B1C7ULL, 0x66057CC67BC391B2ULL } }, /* XSUM_XXH128_testdata[1164] */\n    {  388, 0x000000009E3779B1ULL, { 0x37D8B890CF4FF3B2ULL, 0x1CEC4DB066E524EEULL } }, /* XSUM_XXH128_testdata[1165] */\n    {  388, 0x9E3779B185EBCA8DULL, { 0xD4D858791A82B65BULL, 0x44779F8AF93A98F8ULL } }, /* XSUM_XXH128_testdata[1166] */\n    {  389, 0x0000000000000000ULL, { 0x819B7162F492B772ULL, 0x7620A74E3F7705D8ULL } }, /* XSUM_XXH128_testdata[1167] */\n    {  389, 0x000000009E3779B1ULL, { 0xED518DAA32F1503BULL, 0x131E11967F26B5D3ULL } }, /* XSUM_XXH128_testdata[1168] */\n    {  389, 0x9E3779B185EBCA8DULL, { 0x728977393847BE8EULL, 0x1F887694274370BBULL } }, /* XSUM_XXH128_testdata[1169] */\n    {  390, 0x0000000000000000ULL, { 0x5C15DB645CF180EDULL, 0x78F8A13481059B7AULL } }, /* XSUM_XXH128_testdata[1170] */\n    {  390, 0x000000009E3779B1ULL, { 0xF73159B738B48558ULL, 0xF67A20E2BC4A6FD5ULL } }, /* XSUM_XXH128_testdata[1171] */\n    {  390, 0x9E3779B185EBCA8DULL, { 0x292F3F07CCE6C3D6ULL, 0xE284FDFF8F462C33ULL } }, /* XSUM_XXH128_testdata[1172] */\n    {  391, 0x0000000000000000ULL, { 0x8F62CCED6640F4EAULL, 0x89BDCC54B02634C9ULL } }, /* XSUM_XXH128_testdata[1173] */\n    {  391, 0x000000009E3779B1ULL, { 0x619D84CDC390DB17ULL, 0x3EB310BA00F0B437ULL } }, /* XSUM_XXH128_testdata[1174] */\n    {  391, 0x9E3779B185EBCA8DULL, { 0x686F156F45F4566EULL, 0x1DAED69C1BEDBE0DULL } }, /* XSUM_XXH128_testdata[1175] */\n    {  392, 0x0000000000000000ULL, { 0xEF4815662FD37717ULL, 0xC5E7A8EE4E3E814AULL } }, /* XSUM_XXH128_testdata[1176] */\n    {  392, 0x000000009E3779B1ULL, { 0xE6777EEC93A79371ULL, 0xC4EE611DF76F685FULL } }, /* XSUM_XXH128_testdata[1177] */\n    {  392, 0x9E3779B185EBCA8DULL, { 0xA6160EC75886933CULL, 0x2E5102295B6B8196ULL } }, /* XSUM_XXH128_testdata[1178] */\n    {  393, 0x0000000000000000ULL, { 0xC75EA17287C05EC1ULL, 0xA63E099CA0FB0EF8ULL } }, /* XSUM_XXH128_testdata[1179] */\n    {  393, 0x000000009E3779B1ULL, { 0xB81ABBD4B126ADFCULL, 0xB90848BB0AEDCCBCULL } }, /* XSUM_XXH128_testdata[1180] */\n    {  393, 0x9E3779B185EBCA8DULL, { 0xB2CDCFE8958ACCBAULL, 0x493A71FF826ED2E3ULL } }, /* XSUM_XXH128_testdata[1181] */\n    {  394, 0x0000000000000000ULL, { 0x38369087E260FDD5ULL, 0x2F0B1FA1198986D6ULL } }, /* XSUM_XXH128_testdata[1182] */\n    {  394, 0x000000009E3779B1ULL, { 0xF36BB333AA368D39ULL, 0x739DF8A573CE5FB1ULL } }, /* XSUM_XXH128_testdata[1183] */\n    {  394, 0x9E3779B185EBCA8DULL, { 0xF739CEEF793B6AD9ULL, 0x05658091C35C25DAULL } }, /* XSUM_XXH128_testdata[1184] */\n    {  395, 0x0000000000000000ULL, { 0xA002E75BA958F3ABULL, 0x17D48A2ED7FF175FULL } }, /* XSUM_XXH128_testdata[1185] */\n    {  395, 0x000000009E3779B1ULL, { 0xD001A9A6802B1336ULL, 0x136F669D1C617B8EULL } }, /* XSUM_XXH128_testdata[1186] */\n    {  395, 0x9E3779B185EBCA8DULL, { 0x00148733D393906FULL, 0xD16B23974691D783ULL } }, /* XSUM_XXH128_testdata[1187] */\n    {  396, 0x0000000000000000ULL, { 0xD38FF0C18C469384ULL, 0x5C56DDEDBD0BB26EULL } }, /* XSUM_XXH128_testdata[1188] */\n    {  396, 0x000000009E3779B1ULL, { 0x92443AB81D13256DULL, 0x4FFEA61899440703ULL } }, /* XSUM_XXH128_testdata[1189] */\n    {  396, 0x9E3779B185EBCA8DULL, { 0x03E1D3CAD75D86E8ULL, 0xEF4286FAB0AB4F26ULL } }, /* XSUM_XXH128_testdata[1190] */\n    {  397, 0x0000000000000000ULL, { 0x8E724CDB123B0F76ULL, 0xC3010484860CD9E1ULL } }, /* XSUM_XXH128_testdata[1191] */\n    {  397, 0x000000009E3779B1ULL, { 0xFCFDA2A772CCE982ULL, 0x704B674FF67FCB8DULL } }, /* XSUM_XXH128_testdata[1192] */\n    {  397, 0x9E3779B185EBCA8DULL, { 0xB8BA0BF9A6B82F34ULL, 0x7C3F9959E3D36174ULL } }, /* XSUM_XXH128_testdata[1193] */\n    {  398, 0x0000000000000000ULL, { 0x84B3C899F7AC4965ULL, 0xDC0BFDFC55782648ULL } }, /* XSUM_XXH128_testdata[1194] */\n    {  398, 0x000000009E3779B1ULL, { 0x8B1C440A6C2F74F0ULL, 0x93C8ACCDDEF8447EULL } }, /* XSUM_XXH128_testdata[1195] */\n    {  398, 0x9E3779B185EBCA8DULL, { 0x6670B58B7F0CDE77ULL, 0xEEC57E400CC69255ULL } }, /* XSUM_XXH128_testdata[1196] */\n    {  399, 0x0000000000000000ULL, { 0x45A2DB2DCCC36D0AULL, 0xCB753F982D48B642ULL } }, /* XSUM_XXH128_testdata[1197] */\n    {  399, 0x000000009E3779B1ULL, { 0x7A5E0DB26FA149A8ULL, 0x2031E6FF0B183F57ULL } }, /* XSUM_XXH128_testdata[1198] */\n    {  399, 0x9E3779B185EBCA8DULL, { 0xCAE4E40D9EE9667EULL, 0x7278C58DC066C091ULL } }, /* XSUM_XXH128_testdata[1199] */\n    {  400, 0x0000000000000000ULL, { 0xFE72257EB83FE803ULL, 0x1AD73F8BBEAF5028ULL } }, /* XSUM_XXH128_testdata[1200] */\n    {  400, 0x000000009E3779B1ULL, { 0x6920CD9C027D9FF2ULL, 0x1FAB9C15E7C59199ULL } }, /* XSUM_XXH128_testdata[1201] */\n    {  400, 0x9E3779B185EBCA8DULL, { 0x70703E5792C59B52ULL, 0xF04C6424124CB947ULL } }, /* XSUM_XXH128_testdata[1202] */\n    {  401, 0x0000000000000000ULL, { 0x3D8B47914B075022ULL, 0x27D98BE4724D58CBULL } }, /* XSUM_XXH128_testdata[1203] */\n    {  401, 0x000000009E3779B1ULL, { 0x97A3EEBB42CEE8DCULL, 0x822171A3B0036CD0ULL } }, /* XSUM_XXH128_testdata[1204] */\n    {  401, 0x9E3779B185EBCA8DULL, { 0xFC91804BC832CDCCULL, 0xE411FED583B6C6A0ULL } }, /* XSUM_XXH128_testdata[1205] */\n    {  402, 0x0000000000000000ULL, { 0xABEF11224F231FB9ULL, 0xF1B130A5F1F477CAULL } }, /* XSUM_XXH128_testdata[1206] */\n    {  402, 0x000000009E3779B1ULL, { 0x09217988D17AE3FCULL, 0xB1E3369C11BBACACULL } }, /* XSUM_XXH128_testdata[1207] */\n    {  402, 0x9E3779B185EBCA8DULL, { 0x9846605865B48634ULL, 0x2B766D8568320364ULL } }, /* XSUM_XXH128_testdata[1208] */\n    {  403, 0x0000000000000000ULL, { 0xCDEB804D65C6DEA4ULL, 0x1B6DE21E332DD73DULL } }, /* XSUM_XXH128_testdata[1209] */\n    {  403, 0x000000009E3779B1ULL, { 0x1FEF87BD75DBE404ULL, 0x1EF41459552CB839ULL } }, /* XSUM_XXH128_testdata[1210] */\n    {  403, 0x9E3779B185EBCA8DULL, { 0x6259F6ECFD6443FDULL, 0xBED311971E0BE8F2ULL } }, /* XSUM_XXH128_testdata[1211] */\n    {  404, 0x0000000000000000ULL, { 0x31FD8D78674068E6ULL, 0xBE3FD9F7C5F512FAULL } }, /* XSUM_XXH128_testdata[1212] */\n    {  404, 0x000000009E3779B1ULL, { 0x58FBDF771F16C9A9ULL, 0x35383595882E301CULL } }, /* XSUM_XXH128_testdata[1213] */\n    {  404, 0x9E3779B185EBCA8DULL, { 0x9EBB2664037CB2E7ULL, 0x55F468D067146E6EULL } }, /* XSUM_XXH128_testdata[1214] */\n    {  405, 0x0000000000000000ULL, { 0x4C5D6FBB720EA4E5ULL, 0x8BD04AE2F50D47FAULL } }, /* XSUM_XXH128_testdata[1215] */\n    {  405, 0x000000009E3779B1ULL, { 0xFB4A29C833E3C9E9ULL, 0x61D9E437448C0D13ULL } }, /* XSUM_XXH128_testdata[1216] */\n    {  405, 0x9E3779B185EBCA8DULL, { 0xEFD0A92560F75477ULL, 0xFBCF23D98076D0D6ULL } }, /* XSUM_XXH128_testdata[1217] */\n    {  406, 0x0000000000000000ULL, { 0xCDA5AB92635D07D6ULL, 0x7E0687FFFF72EC8BULL } }, /* XSUM_XXH128_testdata[1218] */\n    {  406, 0x000000009E3779B1ULL, { 0x825C2D7A842ACA75ULL, 0xE64342400C6FB2C9ULL } }, /* XSUM_XXH128_testdata[1219] */\n    {  406, 0x9E3779B185EBCA8DULL, { 0xC1E33EBC893925ABULL, 0xF4B4620CBCF33C94ULL } }, /* XSUM_XXH128_testdata[1220] */\n    {  407, 0x0000000000000000ULL, { 0x6D8FA971FA046171ULL, 0x97635D3F78878886ULL } }, /* XSUM_XXH128_testdata[1221] */\n    {  407, 0x000000009E3779B1ULL, { 0x935053DFEA0B88C9ULL, 0x8D533C2EC681EF45ULL } }, /* XSUM_XXH128_testdata[1222] */\n    {  407, 0x9E3779B185EBCA8DULL, { 0x4663687A434D08D7ULL, 0x2175EF1B740A4DE5ULL } }, /* XSUM_XXH128_testdata[1223] */\n    {  408, 0x0000000000000000ULL, { 0x65D015B8B40535F6ULL, 0xA71B75A44C895BF8ULL } }, /* XSUM_XXH128_testdata[1224] */\n    {  408, 0x000000009E3779B1ULL, { 0x71E1DA4F2F56C2C8ULL, 0xB73D7E6E6D1A7CC9ULL } }, /* XSUM_XXH128_testdata[1225] */\n    {  408, 0x9E3779B185EBCA8DULL, { 0xA53ABE5EB64DF88AULL, 0x781D7C8EBA3A5EA0ULL } }, /* XSUM_XXH128_testdata[1226] */\n    {  409, 0x0000000000000000ULL, { 0x191E9B04AFBF9592ULL, 0xB2AC1E73F79CFAE1ULL } }, /* XSUM_XXH128_testdata[1227] */\n    {  409, 0x000000009E3779B1ULL, { 0x99837885604CC865ULL, 0x8455974E8F97D5ADULL } }, /* XSUM_XXH128_testdata[1228] */\n    {  409, 0x9E3779B185EBCA8DULL, { 0x9A0403349926D4C3ULL, 0x8E0181ED25A94010ULL } }, /* XSUM_XXH128_testdata[1229] */\n    {  410, 0x0000000000000000ULL, { 0x6E19D5D185218E5EULL, 0xF23706E3FD76BFADULL } }, /* XSUM_XXH128_testdata[1230] */\n    {  410, 0x000000009E3779B1ULL, { 0x8DD3D63184362F48ULL, 0x74BAD79E098E2624ULL } }, /* XSUM_XXH128_testdata[1231] */\n    {  410, 0x9E3779B185EBCA8DULL, { 0x4ABD4B9474C3F244ULL, 0x1D8F340300D6B9C8ULL } }, /* XSUM_XXH128_testdata[1232] */\n    {  411, 0x0000000000000000ULL, { 0xBD9ABCF40761A552ULL, 0x0E454BD8350B4C6AULL } }, /* XSUM_XXH128_testdata[1233] */\n    {  411, 0x000000009E3779B1ULL, { 0xD93065254E396A66ULL, 0xDD9D72DA36453CD9ULL } }, /* XSUM_XXH128_testdata[1234] */\n    {  411, 0x9E3779B185EBCA8DULL, { 0x04D39E24EDF5A1F2ULL, 0x95AB62A03640E716ULL } }, /* XSUM_XXH128_testdata[1235] */\n    {  412, 0x0000000000000000ULL, { 0xE0B2A8EB2FF315E1ULL, 0x5D593610F1ECD852ULL } }, /* XSUM_XXH128_testdata[1236] */\n    {  412, 0x000000009E3779B1ULL, { 0x2489B90774BF5A12ULL, 0x144874C833229025ULL } }, /* XSUM_XXH128_testdata[1237] */\n    {  412, 0x9E3779B185EBCA8DULL, { 0xE1DE2A762EB136EFULL, 0x754F3917D78F6049ULL } }, /* XSUM_XXH128_testdata[1238] */\n    {  413, 0x0000000000000000ULL, { 0x56FA90C681958CA8ULL, 0x29B2DCD501C2A717ULL } }, /* XSUM_XXH128_testdata[1239] */\n    {  413, 0x000000009E3779B1ULL, { 0x63331524418F6B26ULL, 0x14FC4DB707F56C85ULL } }, /* XSUM_XXH128_testdata[1240] */\n    {  413, 0x9E3779B185EBCA8DULL, { 0x166194994BD30447ULL, 0xCB8867D5BCC1FF01ULL } }, /* XSUM_XXH128_testdata[1241] */\n    {  414, 0x0000000000000000ULL, { 0x3623BFBB213985E6ULL, 0x0CCFC87E8F80994AULL } }, /* XSUM_XXH128_testdata[1242] */\n    {  414, 0x000000009E3779B1ULL, { 0x59B004B108C11869ULL, 0x727DB854CC14B2E5ULL } }, /* XSUM_XXH128_testdata[1243] */\n    {  414, 0x9E3779B185EBCA8DULL, { 0x8850D31DF9B93187ULL, 0xAAE82B3627980855ULL } }, /* XSUM_XXH128_testdata[1244] */\n    {  415, 0x0000000000000000ULL, { 0xE09B132B8B7F3B81ULL, 0xD7A99DB7EFA87A28ULL } }, /* XSUM_XXH128_testdata[1245] */\n    {  415, 0x000000009E3779B1ULL, { 0x06482C491F8EEF33ULL, 0x5DF8FD1F4C199BCAULL } }, /* XSUM_XXH128_testdata[1246] */\n    {  415, 0x9E3779B185EBCA8DULL, { 0xE0BA8BE7090D7EC4ULL, 0x44BDF22AB96E6F05ULL } }, /* XSUM_XXH128_testdata[1247] */\n    {  416, 0x0000000000000000ULL, { 0x58ED1148D17FD5B0ULL, 0x2E2F3C527FA294CAULL } }, /* XSUM_XXH128_testdata[1248] */\n    {  416, 0x000000009E3779B1ULL, { 0x1B8E7DC2C6C407FDULL, 0x32546FB200599F76ULL } }, /* XSUM_XXH128_testdata[1249] */\n    {  416, 0x9E3779B185EBCA8DULL, { 0x1419610BC97E45DBULL, 0x1A50468B7D6BB3E9ULL } }, /* XSUM_XXH128_testdata[1250] */\n    {  417, 0x0000000000000000ULL, { 0x7692303E4C6EBBCBULL, 0xF766B067FF92BE45ULL } }, /* XSUM_XXH128_testdata[1251] */\n    {  417, 0x000000009E3779B1ULL, { 0xEAE1C4D9B49881FFULL, 0x8BECD745D933DF9CULL } }, /* XSUM_XXH128_testdata[1252] */\n    {  417, 0x9E3779B185EBCA8DULL, { 0x8656C4A593876D39ULL, 0x43BA3E0958A95EBFULL } }, /* XSUM_XXH128_testdata[1253] */\n    {  418, 0x0000000000000000ULL, { 0x9C3A84CCA97AF51BULL, 0x59BA7F1B2F021B80ULL } }, /* XSUM_XXH128_testdata[1254] */\n    {  418, 0x000000009E3779B1ULL, { 0x1F7541029DF783FCULL, 0x18F4C72B369E465DULL } }, /* XSUM_XXH128_testdata[1255] */\n    {  418, 0x9E3779B185EBCA8DULL, { 0xAAC65129D16BA2F2ULL, 0x3EBDB220D8B1C189ULL } }, /* XSUM_XXH128_testdata[1256] */\n    {  419, 0x0000000000000000ULL, { 0x9BC1DB1F1F2DAC58ULL, 0x2BAE25C5149248C4ULL } }, /* XSUM_XXH128_testdata[1257] */\n    {  419, 0x000000009E3779B1ULL, { 0x12B2746F6E304D2DULL, 0x84429AF9DE651199ULL } }, /* XSUM_XXH128_testdata[1258] */\n    {  419, 0x9E3779B185EBCA8DULL, { 0x43F1C55F8899EBF8ULL, 0x0CAA90AE43374254ULL } }, /* XSUM_XXH128_testdata[1259] */\n    {  420, 0x0000000000000000ULL, { 0x43B08566487BCC11ULL, 0x29152753B98D0360ULL } }, /* XSUM_XXH128_testdata[1260] */\n    {  420, 0x000000009E3779B1ULL, { 0x357A100177ABC711ULL, 0xECFAC900B8F14745ULL } }, /* XSUM_XXH128_testdata[1261] */\n    {  420, 0x9E3779B185EBCA8DULL, { 0x594FCB76CF4F675CULL, 0xB72FA3B5F8B45C55ULL } }, /* XSUM_XXH128_testdata[1262] */\n    {  421, 0x0000000000000000ULL, { 0x10865DE3AC70A56FULL, 0xB3491911D39CE1A9ULL } }, /* XSUM_XXH128_testdata[1263] */\n    {  421, 0x000000009E3779B1ULL, { 0x6E55FE455BAE58E3ULL, 0x4FFC6ED3CB70A643ULL } }, /* XSUM_XXH128_testdata[1264] */\n    {  421, 0x9E3779B185EBCA8DULL, { 0x446A962722657007ULL, 0xF467638F58DAD7C7ULL } }, /* XSUM_XXH128_testdata[1265] */\n    {  422, 0x0000000000000000ULL, { 0x7EB63CE889495361ULL, 0xB5592178AD4263ADULL } }, /* XSUM_XXH128_testdata[1266] */\n    {  422, 0x000000009E3779B1ULL, { 0x04D6FD632FFBAFFEULL, 0x32EFDD665FA2FE2CULL } }, /* XSUM_XXH128_testdata[1267] */\n    {  422, 0x9E3779B185EBCA8DULL, { 0xEACD288521441B28ULL, 0x2409DAE74AD479D4ULL } }, /* XSUM_XXH128_testdata[1268] */\n    {  423, 0x0000000000000000ULL, { 0xFF15414E6B63375CULL, 0x6747AFD655EA8ADBULL } }, /* XSUM_XXH128_testdata[1269] */\n    {  423, 0x000000009E3779B1ULL, { 0xA1F928D2DD4EAAA6ULL, 0xA1DE5711275DAC83ULL } }, /* XSUM_XXH128_testdata[1270] */\n    {  423, 0x9E3779B185EBCA8DULL, { 0xCFC85AFD75504C0AULL, 0xF122220156F1886CULL } }, /* XSUM_XXH128_testdata[1271] */\n    {  424, 0x0000000000000000ULL, { 0x817BF4D37E8C0B65ULL, 0xC832AD4E9E2A395AULL } }, /* XSUM_XXH128_testdata[1272] */\n    {  424, 0x000000009E3779B1ULL, { 0x39C3F9C7D40667BAULL, 0x612702BB9BE44A44ULL } }, /* XSUM_XXH128_testdata[1273] */\n    {  424, 0x9E3779B185EBCA8DULL, { 0x43CCC1F8DA0619C6ULL, 0x0EC044CBE10A04CDULL } }, /* XSUM_XXH128_testdata[1274] */\n    {  425, 0x0000000000000000ULL, { 0x2C89A0ED03199F8CULL, 0xE51E1415F6244E36ULL } }, /* XSUM_XXH128_testdata[1275] */\n    {  425, 0x000000009E3779B1ULL, { 0xC38AEB236276BCB1ULL, 0xFF364C5921F7B254ULL } }, /* XSUM_XXH128_testdata[1276] */\n    {  425, 0x9E3779B185EBCA8DULL, { 0x857765D17605164CULL, 0x5DE4C6B6670C2EE0ULL } }, /* XSUM_XXH128_testdata[1277] */\n    {  426, 0x0000000000000000ULL, { 0xF230464BB98EDC3BULL, 0x534BCDCAAB2893E3ULL } }, /* XSUM_XXH128_testdata[1278] */\n    {  426, 0x000000009E3779B1ULL, { 0x80796B56EF17552FULL, 0x7DC4BB5489B692C9ULL } }, /* XSUM_XXH128_testdata[1279] */\n    {  426, 0x9E3779B185EBCA8DULL, { 0xBF929B79F25B4809ULL, 0xDDEBF273556684C6ULL } }, /* XSUM_XXH128_testdata[1280] */\n    {  427, 0x0000000000000000ULL, { 0xA2A423B19E704FABULL, 0xFB529CB56C230A66ULL } }, /* XSUM_XXH128_testdata[1281] */\n    {  427, 0x000000009E3779B1ULL, { 0x77E662990F48F8A7ULL, 0xA28D68AEEF9100BAULL } }, /* XSUM_XXH128_testdata[1282] */\n    {  427, 0x9E3779B185EBCA8DULL, { 0x3ED7F4BF67A5C831ULL, 0xE9DE0CD0A9A476EFULL } }, /* XSUM_XXH128_testdata[1283] */\n    {  428, 0x0000000000000000ULL, { 0x9AFB077F996B7613ULL, 0x5429881FBA3FD765ULL } }, /* XSUM_XXH128_testdata[1284] */\n    {  428, 0x000000009E3779B1ULL, { 0x15D4699943A70065ULL, 0x164518187E14CF44ULL } }, /* XSUM_XXH128_testdata[1285] */\n    {  428, 0x9E3779B185EBCA8DULL, { 0x1549BE27144F50A1ULL, 0x3AA1E2832BE50EDFULL } }, /* XSUM_XXH128_testdata[1286] */\n    {  429, 0x0000000000000000ULL, { 0x9D47BF94445A3213ULL, 0x19FD2CA4B64BB833ULL } }, /* XSUM_XXH128_testdata[1287] */\n    {  429, 0x000000009E3779B1ULL, { 0xADEF8198C480632EULL, 0xC24334374B6E8961ULL } }, /* XSUM_XXH128_testdata[1288] */\n    {  429, 0x9E3779B185EBCA8DULL, { 0xF746039AC39675AEULL, 0x7D2A86E471C2C7B4ULL } }, /* XSUM_XXH128_testdata[1289] */\n    {  430, 0x0000000000000000ULL, { 0xE9C48257D575B8CEULL, 0x8BF790F4519DB620ULL } }, /* XSUM_XXH128_testdata[1290] */\n    {  430, 0x000000009E3779B1ULL, { 0x95BF94D3341D502BULL, 0xD69E11CCC99882CEULL } }, /* XSUM_XXH128_testdata[1291] */\n    {  430, 0x9E3779B185EBCA8DULL, { 0x45D0EA104A11D392ULL, 0x53AD9FE4C7A34CE6ULL } }, /* XSUM_XXH128_testdata[1292] */\n    {  431, 0x0000000000000000ULL, { 0x6F79AE872AC2F64CULL, 0xB8951BE23FD9F45DULL } }, /* XSUM_XXH128_testdata[1293] */\n    {  431, 0x000000009E3779B1ULL, { 0x6572FB525807C13BULL, 0xED0E6353FF7F7E27ULL } }, /* XSUM_XXH128_testdata[1294] */\n    {  431, 0x9E3779B185EBCA8DULL, { 0x905C53D2BF759D9AULL, 0xDBE456F89BD12680ULL } }, /* XSUM_XXH128_testdata[1295] */\n    {  432, 0x0000000000000000ULL, { 0x2F3209EA7B782DC2ULL, 0xA3DBA922C2A359CFULL } }, /* XSUM_XXH128_testdata[1296] */\n    {  432, 0x000000009E3779B1ULL, { 0xAC640D0EA835CCFBULL, 0xDD30B289F33BB328ULL } }, /* XSUM_XXH128_testdata[1297] */\n    {  432, 0x9E3779B185EBCA8DULL, { 0x9A4BE7D1E0A85C15ULL, 0x1DD33A09B6D26441ULL } }, /* XSUM_XXH128_testdata[1298] */\n    {  433, 0x0000000000000000ULL, { 0x8DE541AFDA73B1B1ULL, 0x60572C8C6C6B4805ULL } }, /* XSUM_XXH128_testdata[1299] */\n    {  433, 0x000000009E3779B1ULL, { 0x4799B3B23DBF8142ULL, 0xC42FBD4F5077947BULL } }, /* XSUM_XXH128_testdata[1300] */\n    {  433, 0x9E3779B185EBCA8DULL, { 0x6C2B360F7791F77FULL, 0xE145B68E498CCFD3ULL } }, /* XSUM_XXH128_testdata[1301] */\n    {  434, 0x0000000000000000ULL, { 0x09D24711A5DA385BULL, 0x5EDC496FEBC2D5B3ULL } }, /* XSUM_XXH128_testdata[1302] */\n    {  434, 0x000000009E3779B1ULL, { 0xDE95EAA38529A89DULL, 0x03FFA9A23F56FD83ULL } }, /* XSUM_XXH128_testdata[1303] */\n    {  434, 0x9E3779B185EBCA8DULL, { 0x5030A098EF830C27ULL, 0x745FBF420A0A28B0ULL } }, /* XSUM_XXH128_testdata[1304] */\n    {  435, 0x0000000000000000ULL, { 0x2127D7E8E4E79978ULL, 0xEE0E18C953600AB8ULL } }, /* XSUM_XXH128_testdata[1305] */\n    {  435, 0x000000009E3779B1ULL, { 0xE0F3FC79D064DA8DULL, 0x150AD8A74A8C31ECULL } }, /* XSUM_XXH128_testdata[1306] */\n    {  435, 0x9E3779B185EBCA8DULL, { 0xA5D29C2D0876F429ULL, 0x7CC79C840C3DA43CULL } }, /* XSUM_XXH128_testdata[1307] */\n    {  436, 0x0000000000000000ULL, { 0x7EB98ACB0AB2C56DULL, 0x46D8405C46B41518ULL } }, /* XSUM_XXH128_testdata[1308] */\n    {  436, 0x000000009E3779B1ULL, { 0xFBEF3D19D61E2A12ULL, 0x9B25BBBD1C965F4FULL } }, /* XSUM_XXH128_testdata[1309] */\n    {  436, 0x9E3779B185EBCA8DULL, { 0xBE084C3BAFAC5EA2ULL, 0x8255A8F1D37DB080ULL } }, /* XSUM_XXH128_testdata[1310] */\n    {  437, 0x0000000000000000ULL, { 0x2140A7FD78990231ULL, 0x599C6839497747DAULL } }, /* XSUM_XXH128_testdata[1311] */\n    {  437, 0x000000009E3779B1ULL, { 0x4F92886C0B1D6982ULL, 0xC76A51BEF4B430BAULL } }, /* XSUM_XXH128_testdata[1312] */\n    {  437, 0x9E3779B185EBCA8DULL, { 0x42E35A4458568455ULL, 0x3A1E6B264DD8CCEBULL } }, /* XSUM_XXH128_testdata[1313] */\n    {  438, 0x0000000000000000ULL, { 0x970A8482BCB629C5ULL, 0xC2CC407FB9C210E8ULL } }, /* XSUM_XXH128_testdata[1314] */\n    {  438, 0x000000009E3779B1ULL, { 0x873DBD532E61248EULL, 0x326359A2B353C27FULL } }, /* XSUM_XXH128_testdata[1315] */\n    {  438, 0x9E3779B185EBCA8DULL, { 0x73A540D66204C2A4ULL, 0x22CEABCB7C7B7CA1ULL } }, /* XSUM_XXH128_testdata[1316] */\n    {  439, 0x0000000000000000ULL, { 0x692EA222FBE72AEDULL, 0x43A00CAA8E17A79FULL } }, /* XSUM_XXH128_testdata[1317] */\n    {  439, 0x000000009E3779B1ULL, { 0x389263DDF470D4C2ULL, 0x281DE1817031782AULL } }, /* XSUM_XXH128_testdata[1318] */\n    {  439, 0x9E3779B185EBCA8DULL, { 0x2E3F726921308EB9ULL, 0x797A949DDF774BEBULL } }, /* XSUM_XXH128_testdata[1319] */\n    {  440, 0x0000000000000000ULL, { 0x6CC17B0280576E1CULL, 0x20C37EA6E70FEEDDULL } }, /* XSUM_XXH128_testdata[1320] */\n    {  440, 0x000000009E3779B1ULL, { 0x4AA84CA36A384F3FULL, 0xE67AA1FD3F1D272FULL } }, /* XSUM_XXH128_testdata[1321] */\n    {  440, 0x9E3779B185EBCA8DULL, { 0xB1434D3CDDDCEFDAULL, 0x3983B47B82D41954ULL } }, /* XSUM_XXH128_testdata[1322] */\n    {  441, 0x0000000000000000ULL, { 0x6FADB76E8BB1DFD9ULL, 0x4156BD7F3C5C8C9DULL } }, /* XSUM_XXH128_testdata[1323] */\n    {  441, 0x000000009E3779B1ULL, { 0xF69BECEC4824D666ULL, 0x27F72AF8CC571D94ULL } }, /* XSUM_XXH128_testdata[1324] */\n    {  441, 0x9E3779B185EBCA8DULL, { 0x60760B3FD4F72780ULL, 0x09C53B538ED6BBF4ULL } }, /* XSUM_XXH128_testdata[1325] */\n    {  442, 0x0000000000000000ULL, { 0x8F0AD64BD811D908ULL, 0x0CD37A4ADD71B090ULL } }, /* XSUM_XXH128_testdata[1326] */\n    {  442, 0x000000009E3779B1ULL, { 0x78E0213F6B7F5996ULL, 0x043E9DFAD47F1CC2ULL } }, /* XSUM_XXH128_testdata[1327] */\n    {  442, 0x9E3779B185EBCA8DULL, { 0x6864251320FDFCFEULL, 0x4823AA8A200A70B2ULL } }, /* XSUM_XXH128_testdata[1328] */\n    {  443, 0x0000000000000000ULL, { 0xA5470A2ADAC472C9ULL, 0x7CB3BA7374433C00ULL } }, /* XSUM_XXH128_testdata[1329] */\n    {  443, 0x000000009E3779B1ULL, { 0x420C7F395A0C921DULL, 0x5BB22E8D862DB29AULL } }, /* XSUM_XXH128_testdata[1330] */\n    {  443, 0x9E3779B185EBCA8DULL, { 0x15C21C58E17003B6ULL, 0xCD0B7293D4215E47ULL } }, /* XSUM_XXH128_testdata[1331] */\n    {  444, 0x0000000000000000ULL, { 0x8FC224C40EC49D28ULL, 0xBB394303FA58B82EULL } }, /* XSUM_XXH128_testdata[1332] */\n    {  444, 0x000000009E3779B1ULL, { 0x165EDE4E5B316AA7ULL, 0x11DBCBB0578AC195ULL } }, /* XSUM_XXH128_testdata[1333] */\n    {  444, 0x9E3779B185EBCA8DULL, { 0x2C1EEF8E4007C6B0ULL, 0x26439C652C1CAD4BULL } }, /* XSUM_XXH128_testdata[1334] */\n    {  445, 0x0000000000000000ULL, { 0xDCBA55F9F43377DCULL, 0x761DA659143FC2AFULL } }, /* XSUM_XXH128_testdata[1335] */\n    {  445, 0x000000009E3779B1ULL, { 0x257BB34C01B097CEULL, 0xBB824A00C2A04B0EULL } }, /* XSUM_XXH128_testdata[1336] */\n    {  445, 0x9E3779B185EBCA8DULL, { 0x32ED9F8013B53EF8ULL, 0xDC05A7EEA553D99AULL } }, /* XSUM_XXH128_testdata[1337] */\n    {  446, 0x0000000000000000ULL, { 0x551BC6C0D60451EFULL, 0x5FB2FAF7236A0F1CULL } }, /* XSUM_XXH128_testdata[1338] */\n    {  446, 0x000000009E3779B1ULL, { 0x89CE2C49855A45EDULL, 0x2FA931B2D7F14F1BULL } }, /* XSUM_XXH128_testdata[1339] */\n    {  446, 0x9E3779B185EBCA8DULL, { 0xA0816EA37EC52357ULL, 0xC3CD668DEA898B08ULL } }, /* XSUM_XXH128_testdata[1340] */\n    {  447, 0x0000000000000000ULL, { 0x1DC9B62A18B3C8F9ULL, 0x8BE6CCAF8D27D7A8ULL } }, /* XSUM_XXH128_testdata[1341] */\n    {  447, 0x000000009E3779B1ULL, { 0xD2DB4D78E237DF61ULL, 0x3CB976D72D0C6910ULL } }, /* XSUM_XXH128_testdata[1342] */\n    {  447, 0x9E3779B185EBCA8DULL, { 0xF9A3B4DAD6BAFCD2ULL, 0x94639D58561F7839ULL } }, /* XSUM_XXH128_testdata[1343] */\n    {  448, 0x0000000000000000ULL, { 0xCBB14EA4B925B28EULL, 0x4BAA583E8880D655ULL } }, /* XSUM_XXH128_testdata[1344] */\n    {  448, 0x000000009E3779B1ULL, { 0xB9F3461A447831CEULL, 0xCFB5184C7DAC9804ULL } }, /* XSUM_XXH128_testdata[1345] */\n    {  448, 0x9E3779B185EBCA8DULL, { 0x4E1F337F772EA804ULL, 0x3EC08470E837D496ULL } }, /* XSUM_XXH128_testdata[1346] */\n    {  449, 0x0000000000000000ULL, { 0x1204E7DA3777E3F0ULL, 0x702BA708AA2D74FDULL } }, /* XSUM_XXH128_testdata[1347] */\n    {  449, 0x000000009E3779B1ULL, { 0x7E3A9D36DBC14F93ULL, 0x6C6B245EB0D04053ULL } }, /* XSUM_XXH128_testdata[1348] */\n    {  449, 0x9E3779B185EBCA8DULL, { 0xC2B8D68EF0F24196ULL, 0xEE94B423316594DEULL } }, /* XSUM_XXH128_testdata[1349] */\n    {  450, 0x0000000000000000ULL, { 0x30F95E9006D65F68ULL, 0x364F274E7D101E5CULL } }, /* XSUM_XXH128_testdata[1350] */\n    {  450, 0x000000009E3779B1ULL, { 0x9CCBD8BD63D4FF85ULL, 0x1E53BFE6D71BBE77ULL } }, /* XSUM_XXH128_testdata[1351] */\n    {  450, 0x9E3779B185EBCA8DULL, { 0x83A805BD09941B9AULL, 0x98160242706C292AULL } }, /* XSUM_XXH128_testdata[1352] */\n    {  451, 0x0000000000000000ULL, { 0x81F603B9628E8292ULL, 0x486F470C89FF3768ULL } }, /* XSUM_XXH128_testdata[1353] */\n    {  451, 0x000000009E3779B1ULL, { 0x5737ADE94FDA0328ULL, 0x250C1E0CED5C121BULL } }, /* XSUM_XXH128_testdata[1354] */\n    {  451, 0x9E3779B185EBCA8DULL, { 0xAC92C1D2B3A4CCCDULL, 0xC09A77B1B0CE4B06ULL } }, /* XSUM_XXH128_testdata[1355] */\n    {  452, 0x0000000000000000ULL, { 0xD422314982847B14ULL, 0xA04A33BA54D0366BULL } }, /* XSUM_XXH128_testdata[1356] */\n    {  452, 0x000000009E3779B1ULL, { 0x1697660CFBB81E00ULL, 0x81670C48B8BF02ACULL } }, /* XSUM_XXH128_testdata[1357] */\n    {  452, 0x9E3779B185EBCA8DULL, { 0x69FFB99A51FD2A7FULL, 0xD533FDBE826585A2ULL } }, /* XSUM_XXH128_testdata[1358] */\n    {  453, 0x0000000000000000ULL, { 0x8F457C62ECE0AF36ULL, 0xFA68FFF1307D53E8ULL } }, /* XSUM_XXH128_testdata[1359] */\n    {  453, 0x000000009E3779B1ULL, { 0xFECCCE01CEECC8E3ULL, 0xD423F3FF38CF5B2BULL } }, /* XSUM_XXH128_testdata[1360] */\n    {  453, 0x9E3779B185EBCA8DULL, { 0x7A8A9DA647B54209ULL, 0x4538130AB5B255B6ULL } }, /* XSUM_XXH128_testdata[1361] */\n    {  454, 0x0000000000000000ULL, { 0x657580AF76460CA5ULL, 0xD03392928F693B26ULL } }, /* XSUM_XXH128_testdata[1362] */\n    {  454, 0x000000009E3779B1ULL, { 0x36BEADD5C2623096ULL, 0xE06B9B080BF306F8ULL } }, /* XSUM_XXH128_testdata[1363] */\n    {  454, 0x9E3779B185EBCA8DULL, { 0x9C7F4A11F01617F5ULL, 0x8C50414C0CFCEBA7ULL } }, /* XSUM_XXH128_testdata[1364] */\n    {  455, 0x0000000000000000ULL, { 0x471B30BFD9213CD2ULL, 0x0BFE28A89ED22509ULL } }, /* XSUM_XXH128_testdata[1365] */\n    {  455, 0x000000009E3779B1ULL, { 0x8DE379F88C0205AEULL, 0xE84D46E5F6EFB0C0ULL } }, /* XSUM_XXH128_testdata[1366] */\n    {  455, 0x9E3779B185EBCA8DULL, { 0x3791406C5DE1DD68ULL, 0x54D8D1355A440CDCULL } }, /* XSUM_XXH128_testdata[1367] */\n    {  456, 0x0000000000000000ULL, { 0x4F815C9C87995778ULL, 0x4A7789FDCE56546FULL } }, /* XSUM_XXH128_testdata[1368] */\n    {  456, 0x000000009E3779B1ULL, { 0x770FE01656EE261FULL, 0xA6BAB84FC3A40F96ULL } }, /* XSUM_XXH128_testdata[1369] */\n    {  456, 0x9E3779B185EBCA8DULL, { 0x58B35D938C1F53CAULL, 0x49A8E6961525A32DULL } }, /* XSUM_XXH128_testdata[1370] */\n    {  457, 0x0000000000000000ULL, { 0x85D3E3AFB3451E9CULL, 0x7DE1C0B8E0A35E25ULL } }, /* XSUM_XXH128_testdata[1371] */\n    {  457, 0x000000009E3779B1ULL, { 0x4A0B41A4289BC5ECULL, 0x7267A3241CFA7010ULL } }, /* XSUM_XXH128_testdata[1372] */\n    {  457, 0x9E3779B185EBCA8DULL, { 0xF4BE2D5E9D6E6B21ULL, 0xFB1F246F83E354E3ULL } }, /* XSUM_XXH128_testdata[1373] */\n    {  458, 0x0000000000000000ULL, { 0x75F5CD8DFB9AD755ULL, 0x3F3A4497FC2A1BCFULL } }, /* XSUM_XXH128_testdata[1374] */\n    {  458, 0x000000009E3779B1ULL, { 0x600B9FA62F5B91B4ULL, 0x57C7A3F17B9187E3ULL } }, /* XSUM_XXH128_testdata[1375] */\n    {  458, 0x9E3779B185EBCA8DULL, { 0xA8FEA2F2B1012E31ULL, 0xB0FC2EAE55D4CBABULL } }, /* XSUM_XXH128_testdata[1376] */\n    {  459, 0x0000000000000000ULL, { 0xACFACC0109E7B2ADULL, 0xA1FEC0F092F6FA8FULL } }, /* XSUM_XXH128_testdata[1377] */\n    {  459, 0x000000009E3779B1ULL, { 0x5BA8925A71802A94ULL, 0xD73DEF283B24F132ULL } }, /* XSUM_XXH128_testdata[1378] */\n    {  459, 0x9E3779B185EBCA8DULL, { 0x5C7318DA5E667A88ULL, 0x8188E4120046AB56ULL } }, /* XSUM_XXH128_testdata[1379] */\n    {  460, 0x0000000000000000ULL, { 0x52FAAE91FB875AB9ULL, 0xF5C117CE6E76DF54ULL } }, /* XSUM_XXH128_testdata[1380] */\n    {  460, 0x000000009E3779B1ULL, { 0x1C802DC6C7EAA2AFULL, 0x28F05EBE214D30EAULL } }, /* XSUM_XXH128_testdata[1381] */\n    {  460, 0x9E3779B185EBCA8DULL, { 0xD675FF2127E59493ULL, 0x8D6345DE68659940ULL } }, /* XSUM_XXH128_testdata[1382] */\n    {  461, 0x0000000000000000ULL, { 0x547E13490C95E75AULL, 0x93A82E1EBDD01B3AULL } }, /* XSUM_XXH128_testdata[1383] */\n    {  461, 0x000000009E3779B1ULL, { 0x988E870EAFB2AA56ULL, 0xCD9E29DE5B0E67CAULL } }, /* XSUM_XXH128_testdata[1384] */\n    {  461, 0x9E3779B185EBCA8DULL, { 0x712CE8537166A856ULL, 0x6843B6BA063E0070ULL } }, /* XSUM_XXH128_testdata[1385] */\n    {  462, 0x0000000000000000ULL, { 0x72CF15CFAEFD5200ULL, 0xC28DAA610231EF1CULL } }, /* XSUM_XXH128_testdata[1386] */\n    {  462, 0x000000009E3779B1ULL, { 0x5C91287D06EDBC5EULL, 0x510B0A09C0980C3CULL } }, /* XSUM_XXH128_testdata[1387] */\n    {  462, 0x9E3779B185EBCA8DULL, { 0x2D4C4326518A767BULL, 0xF416D9A9DED66468ULL } }, /* XSUM_XXH128_testdata[1388] */\n    {  463, 0x0000000000000000ULL, { 0x2D7C641C000C8F93ULL, 0x37346344348D512FULL } }, /* XSUM_XXH128_testdata[1389] */\n    {  463, 0x000000009E3779B1ULL, { 0x66481E6651D6A2C9ULL, 0x518A0DB4E2887862ULL } }, /* XSUM_XXH128_testdata[1390] */\n    {  463, 0x9E3779B185EBCA8DULL, { 0xE08B26D522C9541BULL, 0x9C16E9D6BAE35606ULL } }, /* XSUM_XXH128_testdata[1391] */\n    {  464, 0x0000000000000000ULL, { 0xA779170A3A016B5BULL, 0xA652B3CE7384B2A9ULL } }, /* XSUM_XXH128_testdata[1392] */\n    {  464, 0x000000009E3779B1ULL, { 0xBEB3B766CE272318ULL, 0x33476BEE9EFADDFCULL } }, /* XSUM_XXH128_testdata[1393] */\n    {  464, 0x9E3779B185EBCA8DULL, { 0xFE30CD988EA1BD7EULL, 0x627FB571C65FB777ULL } }, /* XSUM_XXH128_testdata[1394] */\n    {  465, 0x0000000000000000ULL, { 0x82D6577E2DD44946ULL, 0x57D469E706C6657AULL } }, /* XSUM_XXH128_testdata[1395] */\n    {  465, 0x000000009E3779B1ULL, { 0xA5F078C30EAC0B64ULL, 0x8FA635226C067BCFULL } }, /* XSUM_XXH128_testdata[1396] */\n    {  465, 0x9E3779B185EBCA8DULL, { 0xEE89A34CB86CFC63ULL, 0xF833B5D7FF2F6843ULL } }, /* XSUM_XXH128_testdata[1397] */\n    {  466, 0x0000000000000000ULL, { 0x7A538D4BF06B3529ULL, 0x2137C561C7F5C100ULL } }, /* XSUM_XXH128_testdata[1398] */\n    {  466, 0x000000009E3779B1ULL, { 0x7F5A5980AC5B380FULL, 0x3A27E5ECD038BED5ULL } }, /* XSUM_XXH128_testdata[1399] */\n    {  466, 0x9E3779B185EBCA8DULL, { 0x3DA22BE4D85CE818ULL, 0xA67DC3C80289CE28ULL } }, /* XSUM_XXH128_testdata[1400] */\n    {  467, 0x0000000000000000ULL, { 0x7F5638FD02E586D9ULL, 0xB23D76ADF419C7A1ULL } }, /* XSUM_XXH128_testdata[1401] */\n    {  467, 0x000000009E3779B1ULL, { 0xDF31CD15C3019560ULL, 0x7B6442E7A807D5C9ULL } }, /* XSUM_XXH128_testdata[1402] */\n    {  467, 0x9E3779B185EBCA8DULL, { 0x5A4F312059334990ULL, 0x62134F925EF58E00ULL } }, /* XSUM_XXH128_testdata[1403] */\n    {  468, 0x0000000000000000ULL, { 0xFCFDBCCF4C625BD1ULL, 0xA0EAFCC760FA2158ULL } }, /* XSUM_XXH128_testdata[1404] */\n    {  468, 0x000000009E3779B1ULL, { 0x2F8CF3FDF6451041ULL, 0x863E031E59549C31ULL } }, /* XSUM_XXH128_testdata[1405] */\n    {  468, 0x9E3779B185EBCA8DULL, { 0xAA255B5CF577171BULL, 0x9D0B624FBE1FBAD8ULL } }, /* XSUM_XXH128_testdata[1406] */\n    {  469, 0x0000000000000000ULL, { 0xACC4CE635F59D564ULL, 0xD348D1B22F25063CULL } }, /* XSUM_XXH128_testdata[1407] */\n    {  469, 0x000000009E3779B1ULL, { 0x88140AD759F1E6A8ULL, 0xCF157A6049243AFFULL } }, /* XSUM_XXH128_testdata[1408] */\n    {  469, 0x9E3779B185EBCA8DULL, { 0xBA1277E16F3D0F7EULL, 0xA19D051E805EBE64ULL } }, /* XSUM_XXH128_testdata[1409] */\n    {  470, 0x0000000000000000ULL, { 0xAF32C3D3E5C96826ULL, 0xE3789B738EC3D1A1ULL } }, /* XSUM_XXH128_testdata[1410] */\n    {  470, 0x000000009E3779B1ULL, { 0xFC0C8102B1A0408AULL, 0xDEBA193EC281FF70ULL } }, /* XSUM_XXH128_testdata[1411] */\n    {  470, 0x9E3779B185EBCA8DULL, { 0xB5902BA4883A0AC7ULL, 0x16D1AE0A370B0773ULL } }, /* XSUM_XXH128_testdata[1412] */\n    {  471, 0x0000000000000000ULL, { 0x2A549F3506C157F7ULL, 0x1E653E48A62F795FULL } }, /* XSUM_XXH128_testdata[1413] */\n    {  471, 0x000000009E3779B1ULL, { 0x75799C9B90FDB82CULL, 0x0ACB039ADE8F409DULL } }, /* XSUM_XXH128_testdata[1414] */\n    {  471, 0x9E3779B185EBCA8DULL, { 0x19107317BB46B43FULL, 0x3711DCA419DAF58CULL } }, /* XSUM_XXH128_testdata[1415] */\n    {  472, 0x0000000000000000ULL, { 0x5E13DB5A6EC9AC17ULL, 0x60B9E9B9D231D2A4ULL } }, /* XSUM_XXH128_testdata[1416] */\n    {  472, 0x000000009E3779B1ULL, { 0x650572E7D1872A5AULL, 0x8E024E228F02814BULL } }, /* XSUM_XXH128_testdata[1417] */\n    {  472, 0x9E3779B185EBCA8DULL, { 0x96D80A21750B1B90ULL, 0x3BB4DFEF2810C4B7ULL } }, /* XSUM_XXH128_testdata[1418] */\n    {  473, 0x0000000000000000ULL, { 0x4BFB3C69FCEECE7FULL, 0x30076F5FF0077774ULL } }, /* XSUM_XXH128_testdata[1419] */\n    {  473, 0x000000009E3779B1ULL, { 0xE3405FD993424CA3ULL, 0x8163A30D9821E501ULL } }, /* XSUM_XXH128_testdata[1420] */\n    {  473, 0x9E3779B185EBCA8DULL, { 0x7DE8627EB0718D81ULL, 0xBEF974AB8217BDA6ULL } }, /* XSUM_XXH128_testdata[1421] */\n    {  474, 0x0000000000000000ULL, { 0x16D6CD341FE6C64EULL, 0x812CFCFB9FCA5020ULL } }, /* XSUM_XXH128_testdata[1422] */\n    {  474, 0x000000009E3779B1ULL, { 0x0FDA08515F896B09ULL, 0x791F11A5DC099DE3ULL } }, /* XSUM_XXH128_testdata[1423] */\n    {  474, 0x9E3779B185EBCA8DULL, { 0x2D862EA0AE3A8DBDULL, 0x844D545D1758806EULL } }, /* XSUM_XXH128_testdata[1424] */\n    {  475, 0x0000000000000000ULL, { 0xDB59963FF1FC1465ULL, 0x6C410BCB2FA543EFULL } }, /* XSUM_XXH128_testdata[1425] */\n    {  475, 0x000000009E3779B1ULL, { 0xB6E8B63164EACECCULL, 0x43E823EDB03DA9B8ULL } }, /* XSUM_XXH128_testdata[1426] */\n    {  475, 0x9E3779B185EBCA8DULL, { 0x300D11B3F436F442ULL, 0x43E20A10FDFC620DULL } }, /* XSUM_XXH128_testdata[1427] */\n    {  476, 0x0000000000000000ULL, { 0x4A76BE44A1317EA8ULL, 0xA030987FA6E2FD14ULL } }, /* XSUM_XXH128_testdata[1428] */\n    {  476, 0x000000009E3779B1ULL, { 0x0DB0A9DE5EED1A56ULL, 0x763A8B24359400C7ULL } }, /* XSUM_XXH128_testdata[1429] */\n    {  476, 0x9E3779B185EBCA8DULL, { 0x22D425519D2A32B6ULL, 0x27C1C9F8FCA0A38CULL } }, /* XSUM_XXH128_testdata[1430] */\n    {  477, 0x0000000000000000ULL, { 0x66B195B99D35E394ULL, 0xA1C0DF69414E44EFULL } }, /* XSUM_XXH128_testdata[1431] */\n    {  477, 0x000000009E3779B1ULL, { 0x7C3D0FADED200D0AULL, 0x5C8986BCCE098D56ULL } }, /* XSUM_XXH128_testdata[1432] */\n    {  477, 0x9E3779B185EBCA8DULL, { 0x81E74D402EE78D93ULL, 0x71D212B5877D2D4BULL } }, /* XSUM_XXH128_testdata[1433] */\n    {  478, 0x0000000000000000ULL, { 0x0C920F66078C27A8ULL, 0x3712FEE494E8DE75ULL } }, /* XSUM_XXH128_testdata[1434] */\n    {  478, 0x000000009E3779B1ULL, { 0x7AD448888786080CULL, 0x7E2D27754C578F88ULL } }, /* XSUM_XXH128_testdata[1435] */\n    {  478, 0x9E3779B185EBCA8DULL, { 0xA8FE3B7613D9DBBBULL, 0x376F8D091AC5E9B5ULL } }, /* XSUM_XXH128_testdata[1436] */\n    {  479, 0x0000000000000000ULL, { 0x0C10DDBEDF0F68FEULL, 0xB6F8E25F8E0ECCBBULL } }, /* XSUM_XXH128_testdata[1437] */\n    {  479, 0x000000009E3779B1ULL, { 0x7C695CDF94D69175ULL, 0x510005787CB5D5CEULL } }, /* XSUM_XXH128_testdata[1438] */\n    {  479, 0x9E3779B185EBCA8DULL, { 0xF35D3280A168FC1CULL, 0xCF2401B957C1A6CDULL } }, /* XSUM_XXH128_testdata[1439] */\n    {  480, 0x0000000000000000ULL, { 0xB2A644E90D66B68AULL, 0xE80E3554C4D250CFULL } }, /* XSUM_XXH128_testdata[1440] */\n    {  480, 0x000000009E3779B1ULL, { 0x5B8E453D68E7D131ULL, 0xA268FDA35DBD7A0CULL } }, /* XSUM_XXH128_testdata[1441] */\n    {  480, 0x9E3779B185EBCA8DULL, { 0x1BEC09D4C1FAFE29ULL, 0xA86AF0A84C91FAEAULL } }, /* XSUM_XXH128_testdata[1442] */\n    {  481, 0x0000000000000000ULL, { 0x37CF71FFFAA3DB8EULL, 0x2DB636B6823E7423ULL } }, /* XSUM_XXH128_testdata[1443] */\n    {  481, 0x000000009E3779B1ULL, { 0xCD9A078B5B5EA209ULL, 0xF179BCA0B319F104ULL } }, /* XSUM_XXH128_testdata[1444] */\n    {  481, 0x9E3779B185EBCA8DULL, { 0xC25B65F5CCC72AE6ULL, 0xE86C642E58028453ULL } }, /* XSUM_XXH128_testdata[1445] */\n    {  482, 0x0000000000000000ULL, { 0x04357549339CBEB2ULL, 0x651530390EF80DCDULL } }, /* XSUM_XXH128_testdata[1446] */\n    {  482, 0x000000009E3779B1ULL, { 0x72DD0DAF94E5D936ULL, 0xBFCEC7120D9328C7ULL } }, /* XSUM_XXH128_testdata[1447] */\n    {  482, 0x9E3779B185EBCA8DULL, { 0x47CE0A0A7B8CFB40ULL, 0xD26EE8AC495D3EA2ULL } }, /* XSUM_XXH128_testdata[1448] */\n    {  483, 0x0000000000000000ULL, { 0x90B090913EEBFB2BULL, 0xA753ED3488676A7FULL } }, /* XSUM_XXH128_testdata[1449] */\n    {  483, 0x000000009E3779B1ULL, { 0x121B5B2E0C0974D8ULL, 0x42BE92D1A7D2FFF0ULL } }, /* XSUM_XXH128_testdata[1450] */\n    {  483, 0x9E3779B185EBCA8DULL, { 0xF2F1E5793864A111ULL, 0xED4CBD7930673E60ULL } }, /* XSUM_XXH128_testdata[1451] */\n    {  484, 0x0000000000000000ULL, { 0x37664441826F862BULL, 0xB9572F0BA8C8ABB3ULL } }, /* XSUM_XXH128_testdata[1452] */\n    {  484, 0x000000009E3779B1ULL, { 0x14BDE08EB5E29DD8ULL, 0xEAFF4C2716C634BAULL } }, /* XSUM_XXH128_testdata[1453] */\n    {  484, 0x9E3779B185EBCA8DULL, { 0xA804820D478313ABULL, 0xCEBFDE3BE90A0D59ULL } }, /* XSUM_XXH128_testdata[1454] */\n    {  485, 0x0000000000000000ULL, { 0x6D910B2F3066BB50ULL, 0xC9C32A53BB58CEC4ULL } }, /* XSUM_XXH128_testdata[1455] */\n    {  485, 0x000000009E3779B1ULL, { 0x6FE49C6EBD1DB0F6ULL, 0x9ACACE61AD2809CEULL } }, /* XSUM_XXH128_testdata[1456] */\n    {  485, 0x9E3779B185EBCA8DULL, { 0x8F90C3511B256A6EULL, 0x80103FBB3C0EA426ULL } }, /* XSUM_XXH128_testdata[1457] */\n    {  486, 0x0000000000000000ULL, { 0x86CE5E6EA6F98C28ULL, 0xD837EF8E6DC76AE4ULL } }, /* XSUM_XXH128_testdata[1458] */\n    {  486, 0x000000009E3779B1ULL, { 0xCF389878A6706744ULL, 0x312CEF8FE59998E7ULL } }, /* XSUM_XXH128_testdata[1459] */\n    {  486, 0x9E3779B185EBCA8DULL, { 0xB35AD59403FDED90ULL, 0x205E7194992C8595ULL } }, /* XSUM_XXH128_testdata[1460] */\n    {  487, 0x0000000000000000ULL, { 0x2C99E1392A36DF28ULL, 0x71986D2B1F0330ECULL } }, /* XSUM_XXH128_testdata[1461] */\n    {  487, 0x000000009E3779B1ULL, { 0x0AE4FB84DEE1C09EULL, 0x9ABFD91A7A05EE68ULL } }, /* XSUM_XXH128_testdata[1462] */\n    {  487, 0x9E3779B185EBCA8DULL, { 0x0A877CFAA0803A37ULL, 0xDB48B20CBC652F8CULL } }, /* XSUM_XXH128_testdata[1463] */\n    {  488, 0x0000000000000000ULL, { 0x108C4CB805213EEAULL, 0x95EE06001AE4B3B8ULL } }, /* XSUM_XXH128_testdata[1464] */\n    {  488, 0x000000009E3779B1ULL, { 0x39CEF760EE0538ECULL, 0xDCEB08331965B0DFULL } }, /* XSUM_XXH128_testdata[1465] */\n    {  488, 0x9E3779B185EBCA8DULL, { 0x8D7E49020FBC0021ULL, 0xD28CD297DB5B409DULL } }, /* XSUM_XXH128_testdata[1466] */\n    {  489, 0x0000000000000000ULL, { 0x8F53B54D164A815AULL, 0xD09C746F7D2CE0BCULL } }, /* XSUM_XXH128_testdata[1467] */\n    {  489, 0x000000009E3779B1ULL, { 0xF8958A1D3CED449EULL, 0xF9853FAF70858FAFULL } }, /* XSUM_XXH128_testdata[1468] */\n    {  489, 0x9E3779B185EBCA8DULL, { 0xCC1DDAB79D352C8EULL, 0x95C97E12C5EE61A9ULL } }, /* XSUM_XXH128_testdata[1469] */\n    {  490, 0x0000000000000000ULL, { 0x601AE9308B2F65C0ULL, 0x4D1F4DAC9A205950ULL } }, /* XSUM_XXH128_testdata[1470] */\n    {  490, 0x000000009E3779B1ULL, { 0x14664861B928153CULL, 0x744DE1122FF62BF0ULL } }, /* XSUM_XXH128_testdata[1471] */\n    {  490, 0x9E3779B185EBCA8DULL, { 0xF977A75FBEEF07C0ULL, 0x8FD9AA73B10813BDULL } }, /* XSUM_XXH128_testdata[1472] */\n    {  491, 0x0000000000000000ULL, { 0xC3BD335D6F4D7E2CULL, 0x55B0EF501DBE2A18ULL } }, /* XSUM_XXH128_testdata[1473] */\n    {  491, 0x000000009E3779B1ULL, { 0x9BE620C46A0014E3ULL, 0x1DB0D2038140BFCAULL } }, /* XSUM_XXH128_testdata[1474] */\n    {  491, 0x9E3779B185EBCA8DULL, { 0x3BE1894D59B97DF5ULL, 0xF896CB9D477D3B97ULL } }, /* XSUM_XXH128_testdata[1475] */\n    {  492, 0x0000000000000000ULL, { 0x6EE462A1F4F6A75FULL, 0xE700BA3D9A411B4EULL } }, /* XSUM_XXH128_testdata[1476] */\n    {  492, 0x000000009E3779B1ULL, { 0x35874A02E70B0B8EULL, 0x3E03BB8641B0D3D5ULL } }, /* XSUM_XXH128_testdata[1477] */\n    {  492, 0x9E3779B185EBCA8DULL, { 0x639C27C90261E018ULL, 0x457A472ACCCF47E0ULL } }, /* XSUM_XXH128_testdata[1478] */\n    {  493, 0x0000000000000000ULL, { 0xFB89382799CE1D19ULL, 0xBB95207C6E5A1932ULL } }, /* XSUM_XXH128_testdata[1479] */\n    {  493, 0x000000009E3779B1ULL, { 0x2999AC74D47C7678ULL, 0x75AB9D43ABC0FE17ULL } }, /* XSUM_XXH128_testdata[1480] */\n    {  493, 0x9E3779B185EBCA8DULL, { 0x5ACF651002134352ULL, 0x75B99FED2B083260ULL } }, /* XSUM_XXH128_testdata[1481] */\n    {  494, 0x0000000000000000ULL, { 0xE5126B06554B1262ULL, 0x2CEA63634CFD351EULL } }, /* XSUM_XXH128_testdata[1482] */\n    {  494, 0x000000009E3779B1ULL, { 0xE4DF61ADD36E5F59ULL, 0xFEFE60FEE30253ACULL } }, /* XSUM_XXH128_testdata[1483] */\n    {  494, 0x9E3779B185EBCA8DULL, { 0x61FE12C33EFD590FULL, 0xA963EEDC10C4A4ABULL } }, /* XSUM_XXH128_testdata[1484] */\n    {  495, 0x0000000000000000ULL, { 0x0C1C2EF59CD4710BULL, 0x8281A20EFB0E5DC3ULL } }, /* XSUM_XXH128_testdata[1485] */\n    {  495, 0x000000009E3779B1ULL, { 0x706F6B9A6FB4B2AEULL, 0xC1E25AD0EE673B70ULL } }, /* XSUM_XXH128_testdata[1486] */\n    {  495, 0x9E3779B185EBCA8DULL, { 0xDFA65EF745749DF3ULL, 0xAD40471FFEDEB840ULL } }, /* XSUM_XXH128_testdata[1487] */\n    {  496, 0x0000000000000000ULL, { 0x01720698FF6887B5ULL, 0x98CD294E44993AC3ULL } }, /* XSUM_XXH128_testdata[1488] */\n    {  496, 0x000000009E3779B1ULL, { 0x910E2D0E6C8AEA66ULL, 0x13C8A000504AC5CAULL } }, /* XSUM_XXH128_testdata[1489] */\n    {  496, 0x9E3779B185EBCA8DULL, { 0x830FCACF8532CA2FULL, 0xE057B2931FF8323CULL } }, /* XSUM_XXH128_testdata[1490] */\n    {  497, 0x0000000000000000ULL, { 0x9163F218B8DB7CE8ULL, 0x1DF1A5F95550AB01ULL } }, /* XSUM_XXH128_testdata[1491] */\n    {  497, 0x000000009E3779B1ULL, { 0x619A0B59FF78E007ULL, 0x117E6F61F49897FAULL } }, /* XSUM_XXH128_testdata[1492] */\n    {  497, 0x9E3779B185EBCA8DULL, { 0x00294873E8062E82ULL, 0x39F14B66D071D913ULL } }, /* XSUM_XXH128_testdata[1493] */\n    {  498, 0x0000000000000000ULL, { 0xE847DF198ADDF0B5ULL, 0xFEBFFE03D734D365ULL } }, /* XSUM_XXH128_testdata[1494] */\n    {  498, 0x000000009E3779B1ULL, { 0xB550CCAC409ADC32ULL, 0x5FA458E481EAEE5BULL } }, /* XSUM_XXH128_testdata[1495] */\n    {  498, 0x9E3779B185EBCA8DULL, { 0x6BBCFBF57ED078E1ULL, 0x16A2B10442EB93B2ULL } }, /* XSUM_XXH128_testdata[1496] */\n    {  499, 0x0000000000000000ULL, { 0xB03C576F748BD8ABULL, 0x3572C2D89FBCE309ULL } }, /* XSUM_XXH128_testdata[1497] */\n    {  499, 0x000000009E3779B1ULL, { 0x305CB0E11F0D184DULL, 0xE2BB41E7AAEF0562ULL } }, /* XSUM_XXH128_testdata[1498] */\n    {  499, 0x9E3779B185EBCA8DULL, { 0x1128A0882B31D65DULL, 0xDB5395F917DF1386ULL } }, /* XSUM_XXH128_testdata[1499] */\n    {  500, 0x0000000000000000ULL, { 0xEF35ACEB3B341A05ULL, 0xCAA9DF3E93BE8DE0ULL } }, /* XSUM_XXH128_testdata[1500] */\n    {  500, 0x000000009E3779B1ULL, { 0x0E7DF857FDF28119ULL, 0x9AC7A897E8C091BCULL } }, /* XSUM_XXH128_testdata[1501] */\n    {  500, 0x9E3779B185EBCA8DULL, { 0x0A70F89473B2E134ULL, 0xE7BDC612CE41DDA3ULL } }, /* XSUM_XXH128_testdata[1502] */\n    {  501, 0x0000000000000000ULL, { 0x51D54B811465F86AULL, 0x6E7C408D27904569ULL } }, /* XSUM_XXH128_testdata[1503] */\n    {  501, 0x000000009E3779B1ULL, { 0xB429603DEDC12A11ULL, 0xEABDC0471EB66790ULL } }, /* XSUM_XXH128_testdata[1504] */\n    {  501, 0x9E3779B185EBCA8DULL, { 0x5C628FAAC61E981EULL, 0xF3E4DB39E8D331BFULL } }, /* XSUM_XXH128_testdata[1505] */\n    {  502, 0x0000000000000000ULL, { 0xC532F6A413F0E42CULL, 0x0AA6035B5F2D8FACULL } }, /* XSUM_XXH128_testdata[1506] */\n    {  502, 0x000000009E3779B1ULL, { 0x05CA233F4DDE5397ULL, 0xF2BD87091ADF0B52ULL } }, /* XSUM_XXH128_testdata[1507] */\n    {  502, 0x9E3779B185EBCA8DULL, { 0x69A13F41C275C165ULL, 0xE6A03242008EC67AULL } }, /* XSUM_XXH128_testdata[1508] */\n    {  503, 0x0000000000000000ULL, { 0xF61FB7AC0A4FC5C2ULL, 0x233DB0AA3977ED1DULL } }, /* XSUM_XXH128_testdata[1509] */\n    {  503, 0x000000009E3779B1ULL, { 0x3E34B6930B0FF7EDULL, 0x2A229FDEAF852888ULL } }, /* XSUM_XXH128_testdata[1510] */\n    {  503, 0x9E3779B185EBCA8DULL, { 0xB46D36F91993597CULL, 0x1BFA42071A86BC5FULL } }, /* XSUM_XXH128_testdata[1511] */\n    {  504, 0x0000000000000000ULL, { 0x7442F18AC6D61B1DULL, 0xBAD4E55727604EE9ULL } }, /* XSUM_XXH128_testdata[1512] */\n    {  504, 0x000000009E3779B1ULL, { 0xE4795A8B602E87ADULL, 0x7672F86EEAF170E7ULL } }, /* XSUM_XXH128_testdata[1513] */\n    {  504, 0x9E3779B185EBCA8DULL, { 0x4853942F88841332ULL, 0x54C270E46FBA95B3ULL } }, /* XSUM_XXH128_testdata[1514] */\n    {  505, 0x0000000000000000ULL, { 0xF3FF1DE56CF1CAD9ULL, 0x8D906B0DA4D97E71ULL } }, /* XSUM_XXH128_testdata[1515] */\n    {  505, 0x000000009E3779B1ULL, { 0xBF2249B7A869CA34ULL, 0xB4784655FCBE16AAULL } }, /* XSUM_XXH128_testdata[1516] */\n    {  505, 0x9E3779B185EBCA8DULL, { 0x4710E442BEAC49C7ULL, 0xF863C8069F97C35FULL } }, /* XSUM_XXH128_testdata[1517] */\n    {  506, 0x0000000000000000ULL, { 0xF1D2DF0316771A7CULL, 0x4C8DC4B0D572206CULL } }, /* XSUM_XXH128_testdata[1518] */\n    {  506, 0x000000009E3779B1ULL, { 0xF2B929135CB7CDC5ULL, 0x70ED9462DE480A6BULL } }, /* XSUM_XXH128_testdata[1519] */\n    {  506, 0x9E3779B185EBCA8DULL, { 0x455B6CEC8F1E8350ULL, 0x4B5BE2F59ED7F077ULL } }, /* XSUM_XXH128_testdata[1520] */\n    {  507, 0x0000000000000000ULL, { 0x5C05AD7DBF2A4547ULL, 0x422E1890D2307926ULL } }, /* XSUM_XXH128_testdata[1521] */\n    {  507, 0x000000009E3779B1ULL, { 0xE2E9D1645CB8C0DEULL, 0xF6DD841AB6ED2C2DULL } }, /* XSUM_XXH128_testdata[1522] */\n    {  507, 0x9E3779B185EBCA8DULL, { 0x184B4C63C3A00D02ULL, 0xB57FEBEF6848CD62ULL } }, /* XSUM_XXH128_testdata[1523] */\n    {  508, 0x0000000000000000ULL, { 0x365199C55EAAD05BULL, 0x868726FFD58616BEULL } }, /* XSUM_XXH128_testdata[1524] */\n    {  508, 0x000000009E3779B1ULL, { 0xD287DC08E3CF973DULL, 0x35BD58D09AD99C61ULL } }, /* XSUM_XXH128_testdata[1525] */\n    {  508, 0x9E3779B185EBCA8DULL, { 0xE9E7D170BADB2BA9ULL, 0xFD03182C7DD03331ULL } }, /* XSUM_XXH128_testdata[1526] */\n    {  509, 0x0000000000000000ULL, { 0x5DBCACDAA1F7566BULL, 0xB86C53DC33A6CBF1ULL } }, /* XSUM_XXH128_testdata[1527] */\n    {  509, 0x000000009E3779B1ULL, { 0x58748ECA09F11A59ULL, 0x12EF893D59594B0EULL } }, /* XSUM_XXH128_testdata[1528] */\n    {  509, 0x9E3779B185EBCA8DULL, { 0x6D60CAF6ED6D03E3ULL, 0xF11EDDDB58F2637CULL } }, /* XSUM_XXH128_testdata[1529] */\n    {  510, 0x0000000000000000ULL, { 0x337D49DDF223AC10ULL, 0xCF3871FC047AA731ULL } }, /* XSUM_XXH128_testdata[1530] */\n    {  510, 0x000000009E3779B1ULL, { 0x0279C899B7C0E410ULL, 0x14BADAB85E7B9BFFULL } }, /* XSUM_XXH128_testdata[1531] */\n    {  510, 0x9E3779B185EBCA8DULL, { 0x5E1C79CAF9AE2635ULL, 0x6A35781C899C505EULL } }, /* XSUM_XXH128_testdata[1532] */\n    {  511, 0x0000000000000000ULL, { 0x8089715B163E7FC0ULL, 0x9F7619CB8D250F0DULL } }, /* XSUM_XXH128_testdata[1533] */\n    {  511, 0x000000009E3779B1ULL, { 0x96736274A52C7DB2ULL, 0x24E3BB97C7C584D4ULL } }, /* XSUM_XXH128_testdata[1534] */\n    {  511, 0x9E3779B185EBCA8DULL, { 0x90EC0377BA8D6002ULL, 0xB52CAE55536E9FB9ULL } }, /* XSUM_XXH128_testdata[1535] */\n    {  512, 0x0000000000000000ULL, { 0x617E49599013CB6BULL, 0x18D2D110DCC9BCA1ULL } }, /* XSUM_XXH128_testdata[1536] */\n    {  512, 0x000000009E3779B1ULL, { 0x545F610E9F5A78ECULL, 0x06EEB0D56508040FULL } }, /* XSUM_XXH128_testdata[1537] */\n    {  512, 0x9E3779B185EBCA8DULL, { 0x3CE457DE14C27708ULL, 0x925D06B8EC5B8040ULL } }, /* XSUM_XXH128_testdata[1538] */\n    {  513, 0x0000000000000000ULL, { 0xF7037D3B6722AEECULL, 0xF5C760ED98FD9E0AULL } }, /* XSUM_XXH128_testdata[1539] */\n    {  513, 0x000000009E3779B1ULL, { 0x2F79B7F90027ECE6ULL, 0x30FBAF8ABF0DDFE3ULL } }, /* XSUM_XXH128_testdata[1540] */\n    {  513, 0x9E3779B185EBCA8DULL, { 0x78494A42FDE49F35ULL, 0x79E60F0362C468FAULL } }, /* XSUM_XXH128_testdata[1541] */\n    {  514, 0x0000000000000000ULL, { 0xD6D133F802EC8DE9ULL, 0x2D7490B197F48306ULL } }, /* XSUM_XXH128_testdata[1542] */\n    {  514, 0x000000009E3779B1ULL, { 0x69EBB89A37BB1166ULL, 0x443F5A31A4CFA0C6ULL } }, /* XSUM_XXH128_testdata[1543] */\n    {  514, 0x9E3779B185EBCA8DULL, { 0x4A9476602727653BULL, 0x92B6D4AFD0BB9634ULL } }, /* XSUM_XXH128_testdata[1544] */\n    {  515, 0x0000000000000000ULL, { 0x916FD663EE7A2B40ULL, 0xDC7843764634E12BULL } }, /* XSUM_XXH128_testdata[1545] */\n    {  515, 0x000000009E3779B1ULL, { 0x44B09C3D6371B382ULL, 0xA2F2A37A431E9A5DULL } }, /* XSUM_XXH128_testdata[1546] */\n    {  515, 0x9E3779B185EBCA8DULL, { 0x2E49A56A3E907479ULL, 0x839BC137DBF4E4B0ULL } }, /* XSUM_XXH128_testdata[1547] */\n    {  516, 0x0000000000000000ULL, { 0x296884B4F289C9E2ULL, 0x93E91E95C4843918ULL } }, /* XSUM_XXH128_testdata[1548] */\n    {  516, 0x000000009E3779B1ULL, { 0x7A5F0C328E216BDDULL, 0xA33EBCA648DBCB5FULL } }, /* XSUM_XXH128_testdata[1549] */\n    {  516, 0x9E3779B185EBCA8DULL, { 0xCF06989B231DCBA2ULL, 0xB2956C7C5D7CFF36ULL } }, /* XSUM_XXH128_testdata[1550] */\n    {  517, 0x0000000000000000ULL, { 0x0F780D32AF5B93E7ULL, 0xA771D0D3FB954BCCULL } }, /* XSUM_XXH128_testdata[1551] */\n    {  517, 0x000000009E3779B1ULL, { 0xEC53FAF027FA26D1ULL, 0xAAE18EDB03D75B5BULL } }, /* XSUM_XXH128_testdata[1552] */\n    {  517, 0x9E3779B185EBCA8DULL, { 0xB958BFAD729A407CULL, 0x2B00B960A8225E7BULL } }, /* XSUM_XXH128_testdata[1553] */\n    {  518, 0x0000000000000000ULL, { 0xF9515F008BFBF090ULL, 0xBADD4800C6E3BC30ULL } }, /* XSUM_XXH128_testdata[1554] */\n    {  518, 0x000000009E3779B1ULL, { 0x3B1EA61A7AB04F3DULL, 0x845269CC23B08746ULL } }, /* XSUM_XXH128_testdata[1555] */\n    {  518, 0x9E3779B185EBCA8DULL, { 0x6071E3513A8C56FFULL, 0xC992E0DAD3499D72ULL } }, /* XSUM_XXH128_testdata[1556] */\n    {  519, 0x0000000000000000ULL, { 0x437449649192D1D5ULL, 0xAC5E793AD6968A35ULL } }, /* XSUM_XXH128_testdata[1557] */\n    {  519, 0x000000009E3779B1ULL, { 0x575DAB2D879E5ED0ULL, 0xA00E0B82125715A7ULL } }, /* XSUM_XXH128_testdata[1558] */\n    {  519, 0x9E3779B185EBCA8DULL, { 0x4895C7042BCEBF60ULL, 0x53C7E948D4E0B13CULL } }, /* XSUM_XXH128_testdata[1559] */\n    {  520, 0x0000000000000000ULL, { 0x798FE0ED55307DCEULL, 0x6CB2014D52CB66E9ULL } }, /* XSUM_XXH128_testdata[1560] */\n    {  520, 0x000000009E3779B1ULL, { 0x548FBD2D66FFD419ULL, 0xED48D27114442FA7ULL } }, /* XSUM_XXH128_testdata[1561] */\n    {  520, 0x9E3779B185EBCA8DULL, { 0xF836A2DBFCE75330ULL, 0x987F6D4D907F75CAULL } }, /* XSUM_XXH128_testdata[1562] */\n    {  521, 0x0000000000000000ULL, { 0x1EDC6FB72413D07CULL, 0x0B3D2A6EBEF4A776ULL } }, /* XSUM_XXH128_testdata[1563] */\n    {  521, 0x000000009E3779B1ULL, { 0x5CFDDE63E97756D0ULL, 0x2B0388EB8A146463ULL } }, /* XSUM_XXH128_testdata[1564] */\n    {  521, 0x9E3779B185EBCA8DULL, { 0x5B411EAA9D9D2DABULL, 0x74FBA22C13C328ADULL } }, /* XSUM_XXH128_testdata[1565] */\n    {  522, 0x0000000000000000ULL, { 0x2323999887285691ULL, 0xD34BDA884B7BF8CCULL } }, /* XSUM_XXH128_testdata[1566] */\n    {  522, 0x000000009E3779B1ULL, { 0xA625C8A6F38B0FDAULL, 0x169AAE4260340AD8ULL } }, /* XSUM_XXH128_testdata[1567] */\n    {  522, 0x9E3779B185EBCA8DULL, { 0x7CED862B19471EC0ULL, 0x580F41D0A13ACFDCULL } }, /* XSUM_XXH128_testdata[1568] */\n    {  523, 0x0000000000000000ULL, { 0x900F8EF3FA04553CULL, 0xAB364F0EE1D0C158ULL } }, /* XSUM_XXH128_testdata[1569] */\n    {  523, 0x000000009E3779B1ULL, { 0xC2AD6F183EED2EDFULL, 0x1A689FD9635FDF8AULL } }, /* XSUM_XXH128_testdata[1570] */\n    {  523, 0x9E3779B185EBCA8DULL, { 0x7A0A14A37231FFB7ULL, 0x45AA601E708DEF8BULL } }, /* XSUM_XXH128_testdata[1571] */\n    {  524, 0x0000000000000000ULL, { 0xF018B3E98DFFB9DBULL, 0xA918E22E9EB8DC41ULL } }, /* XSUM_XXH128_testdata[1572] */\n    {  524, 0x000000009E3779B1ULL, { 0x85DDCB7726F23538ULL, 0x41ABFD926C9520F7ULL } }, /* XSUM_XXH128_testdata[1573] */\n    {  524, 0x9E3779B185EBCA8DULL, { 0xE76E428270018A74ULL, 0xF373CDFFE1F4EE5BULL } }, /* XSUM_XXH128_testdata[1574] */\n    {  525, 0x0000000000000000ULL, { 0x91009968A59F5DE1ULL, 0x79613DBF2ED1522DULL } }, /* XSUM_XXH128_testdata[1575] */\n    {  525, 0x000000009E3779B1ULL, { 0xAFE2C04F728BD4ADULL, 0x05B45EB46CAA553BULL } }, /* XSUM_XXH128_testdata[1576] */\n    {  525, 0x9E3779B185EBCA8DULL, { 0x651738F8F8E2EAE6ULL, 0x289B48E83D97BE87ULL } }, /* XSUM_XXH128_testdata[1577] */\n    {  526, 0x0000000000000000ULL, { 0x9D919B6E918D457FULL, 0xCC4B59BBC7B1883EULL } }, /* XSUM_XXH128_testdata[1578] */\n    {  526, 0x000000009E3779B1ULL, { 0x59A1DFA478D8F4BAULL, 0xBCDF586C87AA21CCULL } }, /* XSUM_XXH128_testdata[1579] */\n    {  526, 0x9E3779B185EBCA8DULL, { 0x929A9B839E9E5DACULL, 0xA14A718930B21600ULL } }, /* XSUM_XXH128_testdata[1580] */\n    {  527, 0x0000000000000000ULL, { 0xBD9253EF067D4827ULL, 0x11E194B05ED135AFULL } }, /* XSUM_XXH128_testdata[1581] */\n    {  527, 0x000000009E3779B1ULL, { 0xCD706E49FC5C86E1ULL, 0xED7F656321DA0377ULL } }, /* XSUM_XXH128_testdata[1582] */\n    {  527, 0x9E3779B185EBCA8DULL, { 0x110D0A0EEF0E1DE0ULL, 0x2319635C2BA4E4E1ULL } }, /* XSUM_XXH128_testdata[1583] */\n    {  528, 0x0000000000000000ULL, { 0xA4FF4CE1E6E3B0F6ULL, 0x5F3C0A4FC0F86894ULL } }, /* XSUM_XXH128_testdata[1584] */\n    {  528, 0x000000009E3779B1ULL, { 0x524A859D5912B990ULL, 0xC9AF396F019D1EAFULL } }, /* XSUM_XXH128_testdata[1585] */\n    {  528, 0x9E3779B185EBCA8DULL, { 0x102CA5FC88E4ACDBULL, 0x56D5C53F1357D9BCULL } }, /* XSUM_XXH128_testdata[1586] */\n    {  529, 0x0000000000000000ULL, { 0x5A9BD96F099D3A05ULL, 0xB306C890EE670C36ULL } }, /* XSUM_XXH128_testdata[1587] */\n    {  529, 0x000000009E3779B1ULL, { 0xF0F87A052F14115BULL, 0x56B14712F3615DC4ULL } }, /* XSUM_XXH128_testdata[1588] */\n    {  529, 0x9E3779B185EBCA8DULL, { 0x55AA573781F0E6C3ULL, 0x9F96B097FFC1C3F6ULL } }, /* XSUM_XXH128_testdata[1589] */\n    {  530, 0x0000000000000000ULL, { 0x10F4AEF9ED1662FEULL, 0x776652938FC6E864ULL } }, /* XSUM_XXH128_testdata[1590] */\n    {  530, 0x000000009E3779B1ULL, { 0xB5E011EC2CCEE3D1ULL, 0x885715B9391B1FF2ULL } }, /* XSUM_XXH128_testdata[1591] */\n    {  530, 0x9E3779B185EBCA8DULL, { 0x3A77F93A9C084E39ULL, 0x8B1F20E7851F9D2DULL } }, /* XSUM_XXH128_testdata[1592] */\n    {  531, 0x0000000000000000ULL, { 0x953266DCF6F64DD8ULL, 0x878D4A43470C67E7ULL } }, /* XSUM_XXH128_testdata[1593] */\n    {  531, 0x000000009E3779B1ULL, { 0x4E0C9100899E7934ULL, 0xB9A2DC43D227BBAAULL } }, /* XSUM_XXH128_testdata[1594] */\n    {  531, 0x9E3779B185EBCA8DULL, { 0xF29DB077DCA0A65FULL, 0x147F9F22E1908C63ULL } }, /* XSUM_XXH128_testdata[1595] */\n    {  532, 0x0000000000000000ULL, { 0x7FC33AF735826264ULL, 0x6041B9D06E7067AAULL } }, /* XSUM_XXH128_testdata[1596] */\n    {  532, 0x000000009E3779B1ULL, { 0x968F85CD090EAED4ULL, 0xDBBEEC477E795101ULL } }, /* XSUM_XXH128_testdata[1597] */\n    {  532, 0x9E3779B185EBCA8DULL, { 0x8DAC890EE966D7D7ULL, 0x81E68152CCB53677ULL } }, /* XSUM_XXH128_testdata[1598] */\n    {  533, 0x0000000000000000ULL, { 0x4AA6FD454B20A62CULL, 0x8196FF5AABB8708AULL } }, /* XSUM_XXH128_testdata[1599] */\n    {  533, 0x000000009E3779B1ULL, { 0x7E5E4ED2F1C9371AULL, 0x6B4CE60B12556DD5ULL } }, /* XSUM_XXH128_testdata[1600] */\n    {  533, 0x9E3779B185EBCA8DULL, { 0x868747A5FD700CCEULL, 0xE0F95872C4652A90ULL } }, /* XSUM_XXH128_testdata[1601] */\n    {  534, 0x0000000000000000ULL, { 0x622F04DD0CBD4D28ULL, 0xA3FE6BD76FC58DD4ULL } }, /* XSUM_XXH128_testdata[1602] */\n    {  534, 0x000000009E3779B1ULL, { 0x511BCF02EF610BD1ULL, 0x23BE0F9961486BB5ULL } }, /* XSUM_XXH128_testdata[1603] */\n    {  534, 0x9E3779B185EBCA8DULL, { 0x582385BB15C93A83ULL, 0x0E70C5DD3B8FCB41ULL } }, /* XSUM_XXH128_testdata[1604] */\n    {  535, 0x0000000000000000ULL, { 0x70A29B295E97E82EULL, 0xF2B3DD69C6E02983ULL } }, /* XSUM_XXH128_testdata[1605] */\n    {  535, 0x000000009E3779B1ULL, { 0x7DCD857BBACF1704ULL, 0xEF8528305F790AC7ULL } }, /* XSUM_XXH128_testdata[1606] */\n    {  535, 0x9E3779B185EBCA8DULL, { 0x30FB3DBBF088E816ULL, 0xCC3680535A442030ULL } }, /* XSUM_XXH128_testdata[1607] */\n    {  536, 0x0000000000000000ULL, { 0xCF41D4BD8DE08418ULL, 0xA2A555228905C45EULL } }, /* XSUM_XXH128_testdata[1608] */\n    {  536, 0x000000009E3779B1ULL, { 0x4A83B807BEE040CBULL, 0x8A59D47C6C95BDA5ULL } }, /* XSUM_XXH128_testdata[1609] */\n    {  536, 0x9E3779B185EBCA8DULL, { 0xF37C777F1A7DBB41ULL, 0x7C973A593A5E0138ULL } }, /* XSUM_XXH128_testdata[1610] */\n    {  537, 0x0000000000000000ULL, { 0x394062779EDA7FD1ULL, 0x0111B94CC5136C2BULL } }, /* XSUM_XXH128_testdata[1611] */\n    {  537, 0x000000009E3779B1ULL, { 0x40951AF9987D852BULL, 0x355C2C0B47B7D456ULL } }, /* XSUM_XXH128_testdata[1612] */\n    {  537, 0x9E3779B185EBCA8DULL, { 0x6D6070C24379CFDFULL, 0x1F6276AF52AE6CA0ULL } }, /* XSUM_XXH128_testdata[1613] */\n    {  538, 0x0000000000000000ULL, { 0x7DACA4ACB0BE611EULL, 0x995BEFC36D42DF0EULL } }, /* XSUM_XXH128_testdata[1614] */\n    {  538, 0x000000009E3779B1ULL, { 0x9AE03F0770B35532ULL, 0xDEDE304184CD7236ULL } }, /* XSUM_XXH128_testdata[1615] */\n    {  538, 0x9E3779B185EBCA8DULL, { 0x8B093E8DF3C0A94DULL, 0xDA0FB9F56E989A7FULL } }, /* XSUM_XXH128_testdata[1616] */\n    {  539, 0x0000000000000000ULL, { 0xB759B66ED325D90BULL, 0xCF0C265050B68AEAULL } }, /* XSUM_XXH128_testdata[1617] */\n    {  539, 0x000000009E3779B1ULL, { 0x4D77EE32CB59BAABULL, 0xA270CA2B609E3334ULL } }, /* XSUM_XXH128_testdata[1618] */\n    {  539, 0x9E3779B185EBCA8DULL, { 0x92C6CD9D754DA170ULL, 0xD7F44ADDF0F22B56ULL } }, /* XSUM_XXH128_testdata[1619] */\n    {  540, 0x0000000000000000ULL, { 0x1CE1ECB6F2EA3C08ULL, 0xDBEDD020ADE87FACULL } }, /* XSUM_XXH128_testdata[1620] */\n    {  540, 0x000000009E3779B1ULL, { 0xB2E3615871C24BAEULL, 0xD831E6AF9F8BF196ULL } }, /* XSUM_XXH128_testdata[1621] */\n    {  540, 0x9E3779B185EBCA8DULL, { 0xF8254785EF9BF776ULL, 0xDCEA3290C98D13FEULL } }, /* XSUM_XXH128_testdata[1622] */\n    {  541, 0x0000000000000000ULL, { 0x4A683D8C0191DB06ULL, 0x806C6B420141EB2DULL } }, /* XSUM_XXH128_testdata[1623] */\n    {  541, 0x000000009E3779B1ULL, { 0x43DE83D5186D821AULL, 0xD1ACBCD20A68CC5CULL } }, /* XSUM_XXH128_testdata[1624] */\n    {  541, 0x9E3779B185EBCA8DULL, { 0xA0A37DAD4F2A8703ULL, 0x82D4DE422A206A61ULL } }, /* XSUM_XXH128_testdata[1625] */\n    {  542, 0x0000000000000000ULL, { 0xD4A94AFE1D60AF7CULL, 0x18825856C9712825ULL } }, /* XSUM_XXH128_testdata[1626] */\n    {  542, 0x000000009E3779B1ULL, { 0x18308ACA1860C2DFULL, 0x5CBE862C0F9ED870ULL } }, /* XSUM_XXH128_testdata[1627] */\n    {  542, 0x9E3779B185EBCA8DULL, { 0x1AC6DBBF0E1AD2BFULL, 0xB7C91772B4CC76FFULL } }, /* XSUM_XXH128_testdata[1628] */\n    {  543, 0x0000000000000000ULL, { 0x335ED4269537AE98ULL, 0xF235F32F1CD9F3EAULL } }, /* XSUM_XXH128_testdata[1629] */\n    {  543, 0x000000009E3779B1ULL, { 0x4CC2571A9143FFD4ULL, 0x90B38E9553B631A8ULL } }, /* XSUM_XXH128_testdata[1630] */\n    {  543, 0x9E3779B185EBCA8DULL, { 0xEA591E76B5F58023ULL, 0x92F3267DF4977C3CULL } }, /* XSUM_XXH128_testdata[1631] */\n    {  544, 0x0000000000000000ULL, { 0xEE0F3ED48AE98EAAULL, 0x232A2DB612B3D9D1ULL } }, /* XSUM_XXH128_testdata[1632] */\n    {  544, 0x000000009E3779B1ULL, { 0x7FC24E573F6A6FA5ULL, 0xC7BB7D3803644D32ULL } }, /* XSUM_XXH128_testdata[1633] */\n    {  544, 0x9E3779B185EBCA8DULL, { 0xEFA52007CF2B08E9ULL, 0xD289D9039467CA4FULL } }, /* XSUM_XXH128_testdata[1634] */\n    {  545, 0x0000000000000000ULL, { 0xD3C23550ACAC379AULL, 0x4C4F295F55DA6C91ULL } }, /* XSUM_XXH128_testdata[1635] */\n    {  545, 0x000000009E3779B1ULL, { 0x7E4333CD2DD0EF97ULL, 0x27E3EB07B083028FULL } }, /* XSUM_XXH128_testdata[1636] */\n    {  545, 0x9E3779B185EBCA8DULL, { 0x3A372A67ED04F20EULL, 0x4A9D9F777AFEF8FAULL } }, /* XSUM_XXH128_testdata[1637] */\n    {  546, 0x0000000000000000ULL, { 0x8766C1E7E90ECC53ULL, 0x209FC6E2EC7218E0ULL } }, /* XSUM_XXH128_testdata[1638] */\n    {  546, 0x000000009E3779B1ULL, { 0xA081259F7529C9A9ULL, 0xB8B195B099C82DEEULL } }, /* XSUM_XXH128_testdata[1639] */\n    {  546, 0x9E3779B185EBCA8DULL, { 0x557B6D382216C9C8ULL, 0x59251065E5AB076FULL } }, /* XSUM_XXH128_testdata[1640] */\n    {  547, 0x0000000000000000ULL, { 0xFD4BA223E822FA02ULL, 0x0BD563D21FB709DBULL } }, /* XSUM_XXH128_testdata[1641] */\n    {  547, 0x000000009E3779B1ULL, { 0x4867C30B3720572FULL, 0xCAAD2281B501F11FULL } }, /* XSUM_XXH128_testdata[1642] */\n    {  547, 0x9E3779B185EBCA8DULL, { 0xDFF8551585E4E635ULL, 0xFAB36BB8AB345D2AULL } }, /* XSUM_XXH128_testdata[1643] */\n    {  548, 0x0000000000000000ULL, { 0x1FA4D5286396145EULL, 0x897A4F33C71EAE04ULL } }, /* XSUM_XXH128_testdata[1644] */\n    {  548, 0x000000009E3779B1ULL, { 0x00D074CE17067F04ULL, 0xC7B4090C9B4D26C0ULL } }, /* XSUM_XXH128_testdata[1645] */\n    {  548, 0x9E3779B185EBCA8DULL, { 0x19DC860F95E9E300ULL, 0x3FEAEA8D48C7BCBEULL } }, /* XSUM_XXH128_testdata[1646] */\n    {  549, 0x0000000000000000ULL, { 0x8FB9DB46DB18B81EULL, 0xE7CFA6E9C5685539ULL } }, /* XSUM_XXH128_testdata[1647] */\n    {  549, 0x000000009E3779B1ULL, { 0xF71C794B1C5113A1ULL, 0xDFF8BDAB07E87247ULL } }, /* XSUM_XXH128_testdata[1648] */\n    {  549, 0x9E3779B185EBCA8DULL, { 0x94DCB36B2A353435ULL, 0x199FE1958123CB34ULL } }, /* XSUM_XXH128_testdata[1649] */\n    {  550, 0x0000000000000000ULL, { 0x83DD946E679275ECULL, 0xBDF5A6071FE90951ULL } }, /* XSUM_XXH128_testdata[1650] */\n    {  550, 0x000000009E3779B1ULL, { 0xDD8141C5A90C4705ULL, 0x41AF54803F27B026ULL } }, /* XSUM_XXH128_testdata[1651] */\n    {  550, 0x9E3779B185EBCA8DULL, { 0xED59520EF54C28E1ULL, 0xF24BDC922135396EULL } }, /* XSUM_XXH128_testdata[1652] */\n    {  551, 0x0000000000000000ULL, { 0x4483944094799E09ULL, 0x300C9F8FC26541E3ULL } }, /* XSUM_XXH128_testdata[1653] */\n    {  551, 0x000000009E3779B1ULL, { 0x3E4182F96EC8A054ULL, 0x9AA16396806DDF76ULL } }, /* XSUM_XXH128_testdata[1654] */\n    {  551, 0x9E3779B185EBCA8DULL, { 0x4893FC5F3BF47AF8ULL, 0x2BF9B34F0432BBEDULL } }, /* XSUM_XXH128_testdata[1655] */\n    {  552, 0x0000000000000000ULL, { 0x166D9ADCD1580EE6ULL, 0x096661F1903ADF30ULL } }, /* XSUM_XXH128_testdata[1656] */\n    {  552, 0x000000009E3779B1ULL, { 0x7E0823EA23A50A3AULL, 0x3F7BCBE20DAF8575ULL } }, /* XSUM_XXH128_testdata[1657] */\n    {  552, 0x9E3779B185EBCA8DULL, { 0xD8FE769808678DDEULL, 0x0969D1B7CA87B41AULL } }, /* XSUM_XXH128_testdata[1658] */\n    {  553, 0x0000000000000000ULL, { 0x76094EAA527CF3BDULL, 0x6CDAC6C64D441B93ULL } }, /* XSUM_XXH128_testdata[1659] */\n    {  553, 0x000000009E3779B1ULL, { 0x94CFC72A5886D710ULL, 0x333A108DD8A71F5DULL } }, /* XSUM_XXH128_testdata[1660] */\n    {  553, 0x9E3779B185EBCA8DULL, { 0xBA20D5A6026C47B1ULL, 0xFF9DB23960A2A4F4ULL } }, /* XSUM_XXH128_testdata[1661] */\n    {  554, 0x0000000000000000ULL, { 0x8F27383CF09A76B3ULL, 0xEBD0AAA1C0FF00BEULL } }, /* XSUM_XXH128_testdata[1662] */\n    {  554, 0x000000009E3779B1ULL, { 0x5CD9E6090C20BD7BULL, 0x8E08B3CFBA9ED290ULL } }, /* XSUM_XXH128_testdata[1663] */\n    {  554, 0x9E3779B185EBCA8DULL, { 0x5D1B841D161A1193ULL, 0x1F9BD8F01983B66DULL } }, /* XSUM_XXH128_testdata[1664] */\n    {  555, 0x0000000000000000ULL, { 0x8AD49BC31E7A4427ULL, 0xEC5C61191122B582ULL } }, /* XSUM_XXH128_testdata[1665] */\n    {  555, 0x000000009E3779B1ULL, { 0xB1EEA533D8A9BF9AULL, 0xBB6761A2D9C31529ULL } }, /* XSUM_XXH128_testdata[1666] */\n    {  555, 0x9E3779B185EBCA8DULL, { 0x681841730B9E5E84ULL, 0x886454BF63BB944BULL } }, /* XSUM_XXH128_testdata[1667] */\n    {  556, 0x0000000000000000ULL, { 0x2EEEEFB3A80CD68EULL, 0x59959A3872B61589ULL } }, /* XSUM_XXH128_testdata[1668] */\n    {  556, 0x000000009E3779B1ULL, { 0xC014D746995E34AEULL, 0x4993E6F62B30B8C4ULL } }, /* XSUM_XXH128_testdata[1669] */\n    {  556, 0x9E3779B185EBCA8DULL, { 0x4EE3FC2C8D8E138BULL, 0xEDB8F4A3505E53F0ULL } }, /* XSUM_XXH128_testdata[1670] */\n    {  557, 0x0000000000000000ULL, { 0xF0D8D5132E115CA5ULL, 0x4A2264CDC10EA406ULL } }, /* XSUM_XXH128_testdata[1671] */\n    {  557, 0x000000009E3779B1ULL, { 0xD93D71364EE0F261ULL, 0x348B551A25F567E0ULL } }, /* XSUM_XXH128_testdata[1672] */\n    {  557, 0x9E3779B185EBCA8DULL, { 0x417506C6F736F51EULL, 0x1945B0A9618F98DAULL } }, /* XSUM_XXH128_testdata[1673] */\n    {  558, 0x0000000000000000ULL, { 0xFE4FC52E0D5697CEULL, 0xD6D952CDA36AC9CDULL } }, /* XSUM_XXH128_testdata[1674] */\n    {  558, 0x000000009E3779B1ULL, { 0x4A87E7F2D94AF8A9ULL, 0x61036EDA4BCCEC52ULL } }, /* XSUM_XXH128_testdata[1675] */\n    {  558, 0x9E3779B185EBCA8DULL, { 0x1FB0668F3F5C72FFULL, 0xE0EC0B5A94E1C779ULL } }, /* XSUM_XXH128_testdata[1676] */\n    {  559, 0x0000000000000000ULL, { 0x6C09584BC80BC143ULL, 0xA2F4B6D706B57647ULL } }, /* XSUM_XXH128_testdata[1677] */\n    {  559, 0x000000009E3779B1ULL, { 0x6FD2746810628A39ULL, 0x0B09CD9E51D5CC3DULL } }, /* XSUM_XXH128_testdata[1678] */\n    {  559, 0x9E3779B185EBCA8DULL, { 0x453418ECEAA73D98ULL, 0x8DB447E8911460FCULL } }, /* XSUM_XXH128_testdata[1679] */\n    {  560, 0x0000000000000000ULL, { 0x0AF326979F3BA818ULL, 0x9FD3E5E7B9AD4264ULL } }, /* XSUM_XXH128_testdata[1680] */\n    {  560, 0x000000009E3779B1ULL, { 0x3555D33B4A961B40ULL, 0x34FCF04083686643ULL } }, /* XSUM_XXH128_testdata[1681] */\n    {  560, 0x9E3779B185EBCA8DULL, { 0x404AEF8839775F17ULL, 0x9B360724770B3905ULL } }, /* XSUM_XXH128_testdata[1682] */\n    {  561, 0x0000000000000000ULL, { 0x9598B245C6CCE432ULL, 0xBF3DB731497B27CDULL } }, /* XSUM_XXH128_testdata[1683] */\n    {  561, 0x000000009E3779B1ULL, { 0x5B073CECAE7C7DC4ULL, 0x9F45AE7229E66A5CULL } }, /* XSUM_XXH128_testdata[1684] */\n    {  561, 0x9E3779B185EBCA8DULL, { 0x2728DEA648CED887ULL, 0x18487FD071418B2CULL } }, /* XSUM_XXH128_testdata[1685] */\n    {  562, 0x0000000000000000ULL, { 0xE3AD4D6D3D0E075BULL, 0xB256363FB9D811E3ULL } }, /* XSUM_XXH128_testdata[1686] */\n    {  562, 0x000000009E3779B1ULL, { 0x7DC89A018FB828C3ULL, 0xC1D1C981D94EDBFAULL } }, /* XSUM_XXH128_testdata[1687] */\n    {  562, 0x9E3779B185EBCA8DULL, { 0x997790DB7268C105ULL, 0x533FD2F991415CADULL } }, /* XSUM_XXH128_testdata[1688] */\n    {  563, 0x0000000000000000ULL, { 0x8C6DB00EBD173B30ULL, 0x13609C77D94E33E4ULL } }, /* XSUM_XXH128_testdata[1689] */\n    {  563, 0x000000009E3779B1ULL, { 0xAD1CE64121B2BB26ULL, 0xCD59536BA7C8B4BFULL } }, /* XSUM_XXH128_testdata[1690] */\n    {  563, 0x9E3779B185EBCA8DULL, { 0x5A3760C73090003AULL, 0xA66715F79D73755DULL } }, /* XSUM_XXH128_testdata[1691] */\n    {  564, 0x0000000000000000ULL, { 0x2005C80D14575E30ULL, 0x11605BA2ADA1681AULL } }, /* XSUM_XXH128_testdata[1692] */\n    {  564, 0x000000009E3779B1ULL, { 0x7A52A35BB7E038C7ULL, 0x08F11E01147F634DULL } }, /* XSUM_XXH128_testdata[1693] */\n    {  564, 0x9E3779B185EBCA8DULL, { 0xD9C3BC69EAED2309ULL, 0x7BF107A9188F5551ULL } }, /* XSUM_XXH128_testdata[1694] */\n    {  565, 0x0000000000000000ULL, { 0xE89A727244704FF7ULL, 0xC9971C26E8F53CB6ULL } }, /* XSUM_XXH128_testdata[1695] */\n    {  565, 0x000000009E3779B1ULL, { 0xF5CDFFC7F7D43B6CULL, 0x648D8212919E7BA2ULL } }, /* XSUM_XXH128_testdata[1696] */\n    {  565, 0x9E3779B185EBCA8DULL, { 0x9825A8F132990034ULL, 0xAFAECDA01766DE84ULL } }, /* XSUM_XXH128_testdata[1697] */\n    {  566, 0x0000000000000000ULL, { 0x1A52AB32251C9557ULL, 0xD00932BBD4E0C2E3ULL } }, /* XSUM_XXH128_testdata[1698] */\n    {  566, 0x000000009E3779B1ULL, { 0xF7BEE2CE5D3C45A4ULL, 0x9974F6E9974A4263ULL } }, /* XSUM_XXH128_testdata[1699] */\n    {  566, 0x9E3779B185EBCA8DULL, { 0x1DCE347E35CC8FEFULL, 0xCA1BC87268FF4F4FULL } }, /* XSUM_XXH128_testdata[1700] */\n    {  567, 0x0000000000000000ULL, { 0xB4D8818D6B110074ULL, 0x77621CE147AEDB72ULL } }, /* XSUM_XXH128_testdata[1701] */\n    {  567, 0x000000009E3779B1ULL, { 0x083ED7C27DEF0C1FULL, 0x3CDB7D131136741BULL } }, /* XSUM_XXH128_testdata[1702] */\n    {  567, 0x9E3779B185EBCA8DULL, { 0xC400C7C2511ADED4ULL, 0x27AB35750ECF81C9ULL } }, /* XSUM_XXH128_testdata[1703] */\n    {  568, 0x0000000000000000ULL, { 0x4567D04C81F74410ULL, 0xC4E4D172A8BBE71FULL } }, /* XSUM_XXH128_testdata[1704] */\n    {  568, 0x000000009E3779B1ULL, { 0x9CB05C0F1D4E3275ULL, 0x8570084E59204B9AULL } }, /* XSUM_XXH128_testdata[1705] */\n    {  568, 0x9E3779B185EBCA8DULL, { 0x82C9D3E937A4D202ULL, 0x261E0969E3D1DC14ULL } }, /* XSUM_XXH128_testdata[1706] */\n    {  569, 0x0000000000000000ULL, { 0x9F46FCDE4E694129ULL, 0x58FF78D80E18D6CCULL } }, /* XSUM_XXH128_testdata[1707] */\n    {  569, 0x000000009E3779B1ULL, { 0xD8D40D4C02B4CF51ULL, 0x9841F67A039FCC70ULL } }, /* XSUM_XXH128_testdata[1708] */\n    {  569, 0x9E3779B185EBCA8DULL, { 0x5478F1C83171B116ULL, 0x96F48250374C2EB9ULL } }, /* XSUM_XXH128_testdata[1709] */\n    {  570, 0x0000000000000000ULL, { 0x7E9832CB3B263913ULL, 0x91E670C5600713C0ULL } }, /* XSUM_XXH128_testdata[1710] */\n    {  570, 0x000000009E3779B1ULL, { 0x2628B5393178DCBCULL, 0xACBCB6AD19AD4D1FULL } }, /* XSUM_XXH128_testdata[1711] */\n    {  570, 0x9E3779B185EBCA8DULL, { 0x36B3BC18FAF26B57ULL, 0x3606AB3C7546FE0CULL } }, /* XSUM_XXH128_testdata[1712] */\n    {  571, 0x0000000000000000ULL, { 0x06E35D397BC959CAULL, 0xB3BB5415A0FE4CD9ULL } }, /* XSUM_XXH128_testdata[1713] */\n    {  571, 0x000000009E3779B1ULL, { 0x84760F4973572D02ULL, 0x10F4E8416E35247CULL } }, /* XSUM_XXH128_testdata[1714] */\n    {  571, 0x9E3779B185EBCA8DULL, { 0x1FAB1A95B96CC502ULL, 0x053F5A00AAA2D82CULL } }, /* XSUM_XXH128_testdata[1715] */\n    {  572, 0x0000000000000000ULL, { 0x8D2A4A846742E2BAULL, 0xF09B236005A227DBULL } }, /* XSUM_XXH128_testdata[1716] */\n    {  572, 0x000000009E3779B1ULL, { 0x2B48DC87EAD7DD1FULL, 0xE0B327BA62260AA0ULL } }, /* XSUM_XXH128_testdata[1717] */\n    {  572, 0x9E3779B185EBCA8DULL, { 0x02448E4981CDE029ULL, 0x577EC36D4EB2E04FULL } }, /* XSUM_XXH128_testdata[1718] */\n    {  573, 0x0000000000000000ULL, { 0xCBE7A3979FF1FC62ULL, 0x62199AFE734E4641ULL } }, /* XSUM_XXH128_testdata[1719] */\n    {  573, 0x000000009E3779B1ULL, { 0xA66E1F517C632C06ULL, 0x4D7DFB94F09977BBULL } }, /* XSUM_XXH128_testdata[1720] */\n    {  573, 0x9E3779B185EBCA8DULL, { 0x3E25E8223804D14CULL, 0x212EEDF6A5DBC36AULL } }, /* XSUM_XXH128_testdata[1721] */\n    {  574, 0x0000000000000000ULL, { 0xB502D9D56515C069ULL, 0xB8AEE643F7AC824FULL } }, /* XSUM_XXH128_testdata[1722] */\n    {  574, 0x000000009E3779B1ULL, { 0x9EBEE37FE832C380ULL, 0xADEA1087EB01D3DFULL } }, /* XSUM_XXH128_testdata[1723] */\n    {  574, 0x9E3779B185EBCA8DULL, { 0xB4D56D31E1E8CF11ULL, 0x16337E90D1F1ED8EULL } }, /* XSUM_XXH128_testdata[1724] */\n    {  575, 0x0000000000000000ULL, { 0xB00BEEA09D518435ULL, 0x79D4D748A4A817F8ULL } }, /* XSUM_XXH128_testdata[1725] */\n    {  575, 0x000000009E3779B1ULL, { 0xE682CCE7F010BBC5ULL, 0xE123269050E5928BULL } }, /* XSUM_XXH128_testdata[1726] */\n    {  575, 0x9E3779B185EBCA8DULL, { 0x431D4573CE93CA64ULL, 0xC938F9B775A6F2E2ULL } }, /* XSUM_XXH128_testdata[1727] */\n    {  576, 0x0000000000000000ULL, { 0x9C875962CB39ACF8ULL, 0xD572F6302C1D6B21ULL } }, /* XSUM_XXH128_testdata[1728] */\n    {  576, 0x000000009E3779B1ULL, { 0x1DF61A6D8951D3FDULL, 0x5961D128983EFB98ULL } }, /* XSUM_XXH128_testdata[1729] */\n    {  576, 0x9E3779B185EBCA8DULL, { 0x6E01EE5662C31F8FULL, 0x59FE09D5E83F31EBULL } }, /* XSUM_XXH128_testdata[1730] */\n    {  577, 0x0000000000000000ULL, { 0x5807930E9516B291ULL, 0x5B6B9C0D208BAF6DULL } }, /* XSUM_XXH128_testdata[1731] */\n    {  577, 0x000000009E3779B1ULL, { 0x0FE8EF34621FA17FULL, 0x6D00C287B05E6A99ULL } }, /* XSUM_XXH128_testdata[1732] */\n    {  577, 0x9E3779B185EBCA8DULL, { 0x8F9641AFEB4CD5D0ULL, 0x3D23DBD832F61EDEULL } }, /* XSUM_XXH128_testdata[1733] */\n    {  578, 0x0000000000000000ULL, { 0xDE1728000629CA10ULL, 0xE03550FE2D83B238ULL } }, /* XSUM_XXH128_testdata[1734] */\n    {  578, 0x000000009E3779B1ULL, { 0x9009E886E5781C7EULL, 0xD13254D953E9D1AFULL } }, /* XSUM_XXH128_testdata[1735] */\n    {  578, 0x9E3779B185EBCA8DULL, { 0xE3748D92F7F15D4DULL, 0xBC7E71A1B8AB7292ULL } }, /* XSUM_XXH128_testdata[1736] */\n    {  579, 0x0000000000000000ULL, { 0x51DD9598B443A519ULL, 0x55245EC46A08534FULL } }, /* XSUM_XXH128_testdata[1737] */\n    {  579, 0x000000009E3779B1ULL, { 0xBDC33A8E03A98F06ULL, 0x6B8CC8D05D6B5924ULL } }, /* XSUM_XXH128_testdata[1738] */\n    {  579, 0x9E3779B185EBCA8DULL, { 0x5886E7F04DE25E68ULL, 0xAB6D2F9EDDBF6191ULL } }, /* XSUM_XXH128_testdata[1739] */\n    {  580, 0x0000000000000000ULL, { 0xBF2197B313975A9EULL, 0x7A87921219777331ULL } }, /* XSUM_XXH128_testdata[1740] */\n    {  580, 0x000000009E3779B1ULL, { 0xAB74474BDB4A1AFEULL, 0x002A3B0003B1331FULL } }, /* XSUM_XXH128_testdata[1741] */\n    {  580, 0x9E3779B185EBCA8DULL, { 0x281615EDE4D279F7ULL, 0x49EFFEF551DCFB21ULL } }, /* XSUM_XXH128_testdata[1742] */\n    {  581, 0x0000000000000000ULL, { 0x3A9CD35B97C37ACCULL, 0x04C2C57A682A1F35ULL } }, /* XSUM_XXH128_testdata[1743] */\n    {  581, 0x000000009E3779B1ULL, { 0x456D8DC460D06D30ULL, 0x5D8C75E48702A782ULL } }, /* XSUM_XXH128_testdata[1744] */\n    {  581, 0x9E3779B185EBCA8DULL, { 0xC6BDAC18533F698AULL, 0x3CD9B8FFAD9EEC2CULL } }, /* XSUM_XXH128_testdata[1745] */\n    {  582, 0x0000000000000000ULL, { 0xCC477503244591EAULL, 0xC7316F89E342595BULL } }, /* XSUM_XXH128_testdata[1746] */\n    {  582, 0x000000009E3779B1ULL, { 0x47789CB628FCB752ULL, 0x6E5BDE129109F3ABULL } }, /* XSUM_XXH128_testdata[1747] */\n    {  582, 0x9E3779B185EBCA8DULL, { 0x5ADA79DD285FEACAULL, 0x9C0333EAF58B194FULL } }, /* XSUM_XXH128_testdata[1748] */\n    {  583, 0x0000000000000000ULL, { 0x570BFCEB0A2E29FDULL, 0x6DE0304608D04BD4ULL } }, /* XSUM_XXH128_testdata[1749] */\n    {  583, 0x000000009E3779B1ULL, { 0x9670365AEF5B5F83ULL, 0x24DABEFD98667E15ULL } }, /* XSUM_XXH128_testdata[1750] */\n    {  583, 0x9E3779B185EBCA8DULL, { 0xECD1C7A797AF9205ULL, 0xDC40A8C1A2E83F70ULL } }, /* XSUM_XXH128_testdata[1751] */\n    {  584, 0x0000000000000000ULL, { 0xEE31779866989C18ULL, 0x436301E877D12F5FULL } }, /* XSUM_XXH128_testdata[1752] */\n    {  584, 0x000000009E3779B1ULL, { 0x83697DF00BA3535DULL, 0xDEE4E28AF5775970ULL } }, /* XSUM_XXH128_testdata[1753] */\n    {  584, 0x9E3779B185EBCA8DULL, { 0x8FD7F54E85F3D98FULL, 0xA0EE78E92935F5E8ULL } }, /* XSUM_XXH128_testdata[1754] */\n    {  585, 0x0000000000000000ULL, { 0xC30C69BD67C5ECACULL, 0x1C5B6A227B7AA6BEULL } }, /* XSUM_XXH128_testdata[1755] */\n    {  585, 0x000000009E3779B1ULL, { 0x8AD336C444221DDDULL, 0xE7C0317426466C61ULL } }, /* XSUM_XXH128_testdata[1756] */\n    {  585, 0x9E3779B185EBCA8DULL, { 0xBF4B0483CFA8C409ULL, 0xF8A933A40E1A818CULL } }, /* XSUM_XXH128_testdata[1757] */\n    {  586, 0x0000000000000000ULL, { 0x29B9D3DDE40F0AB6ULL, 0x31A3285BED83C1F5ULL } }, /* XSUM_XXH128_testdata[1758] */\n    {  586, 0x000000009E3779B1ULL, { 0xF7C657CA7884BC20ULL, 0x2000A417EDA26A2EULL } }, /* XSUM_XXH128_testdata[1759] */\n    {  586, 0x9E3779B185EBCA8DULL, { 0xFC17FD5172E2134AULL, 0x216447C32472ABF9ULL } }, /* XSUM_XXH128_testdata[1760] */\n    {  587, 0x0000000000000000ULL, { 0xCC9C6FC419758916ULL, 0xE7EA949E5CB402FDULL } }, /* XSUM_XXH128_testdata[1761] */\n    {  587, 0x000000009E3779B1ULL, { 0xC95A795F80A4E88DULL, 0x827B1AD0CF0AEFD5ULL } }, /* XSUM_XXH128_testdata[1762] */\n    {  587, 0x9E3779B185EBCA8DULL, { 0xE36C621E2EF52F4AULL, 0xE35453F5967863EDULL } }, /* XSUM_XXH128_testdata[1763] */\n    {  588, 0x0000000000000000ULL, { 0xE82416D6E4A38F1EULL, 0xD3325A3A5E48B8F6ULL } }, /* XSUM_XXH128_testdata[1764] */\n    {  588, 0x000000009E3779B1ULL, { 0x26635B740F4B1A04ULL, 0x3C0C5D52BAD74464ULL } }, /* XSUM_XXH128_testdata[1765] */\n    {  588, 0x9E3779B185EBCA8DULL, { 0x9796FEEF63D6A1F9ULL, 0xF30837F51B77EB85ULL } }, /* XSUM_XXH128_testdata[1766] */\n    {  589, 0x0000000000000000ULL, { 0x7784A4EDF1CAB9F2ULL, 0xFE0CA1C7BA86CC08ULL } }, /* XSUM_XXH128_testdata[1767] */\n    {  589, 0x000000009E3779B1ULL, { 0x7064E4EBFF07AEEEULL, 0xC8F30681A38589FCULL } }, /* XSUM_XXH128_testdata[1768] */\n    {  589, 0x9E3779B185EBCA8DULL, { 0x65C3F6BACEDF9F19ULL, 0x24B352158CCED2CAULL } }, /* XSUM_XXH128_testdata[1769] */\n    {  590, 0x0000000000000000ULL, { 0x51E14499A5DFDFFDULL, 0x75DCA9BE88E810A7ULL } }, /* XSUM_XXH128_testdata[1770] */\n    {  590, 0x000000009E3779B1ULL, { 0xF87D35609E27AC7CULL, 0x4F191C572ADB8D3DULL } }, /* XSUM_XXH128_testdata[1771] */\n    {  590, 0x9E3779B185EBCA8DULL, { 0x3BF4C198955532FFULL, 0xE2DDA6D664C1671FULL } }, /* XSUM_XXH128_testdata[1772] */\n    {  591, 0x0000000000000000ULL, { 0x30D3F0BC9778B4FCULL, 0x7C59D37470DC8E78ULL } }, /* XSUM_XXH128_testdata[1773] */\n    {  591, 0x000000009E3779B1ULL, { 0x27DACC920E80E355ULL, 0x7300047963E0897DULL } }, /* XSUM_XXH128_testdata[1774] */\n    {  591, 0x9E3779B185EBCA8DULL, { 0x59924F04807B6C24ULL, 0x8A081B54C1CA7469ULL } }, /* XSUM_XXH128_testdata[1775] */\n    {  592, 0x0000000000000000ULL, { 0x52C035B4068830C8ULL, 0xE2A3D347FE95F559ULL } }, /* XSUM_XXH128_testdata[1776] */\n    {  592, 0x000000009E3779B1ULL, { 0x5BEF24888C7FE84DULL, 0x40C5B2BAD64B7C8FULL } }, /* XSUM_XXH128_testdata[1777] */\n    {  592, 0x9E3779B185EBCA8DULL, { 0xF025B3903ED116E2ULL, 0x7097561BF71D3F0FULL } }, /* XSUM_XXH128_testdata[1778] */\n    {  593, 0x0000000000000000ULL, { 0x93612FB9A62606C6ULL, 0xAB45B8AA575D4B22ULL } }, /* XSUM_XXH128_testdata[1779] */\n    {  593, 0x000000009E3779B1ULL, { 0x96EB2848A2744903ULL, 0x2F7367E2340902D7ULL } }, /* XSUM_XXH128_testdata[1780] */\n    {  593, 0x9E3779B185EBCA8DULL, { 0xDA45DA0B9A293E98ULL, 0x1A7E25046483B649ULL } }, /* XSUM_XXH128_testdata[1781] */\n    {  594, 0x0000000000000000ULL, { 0xB615A34D0D4BC90DULL, 0xF30A87BD1547C237ULL } }, /* XSUM_XXH128_testdata[1782] */\n    {  594, 0x000000009E3779B1ULL, { 0x5F49A5B103E76394ULL, 0x6F39BE769566E734ULL } }, /* XSUM_XXH128_testdata[1783] */\n    {  594, 0x9E3779B185EBCA8DULL, { 0x9C6B259A26DF3E48ULL, 0xA5FE29009B6C0477ULL } }, /* XSUM_XXH128_testdata[1784] */\n    {  595, 0x0000000000000000ULL, { 0x263689E084A32D7AULL, 0x93AAD5BFE368AECEULL } }, /* XSUM_XXH128_testdata[1785] */\n    {  595, 0x000000009E3779B1ULL, { 0xF8E6BE6087B2AB4AULL, 0xFD68767F5FADB906ULL } }, /* XSUM_XXH128_testdata[1786] */\n    {  595, 0x9E3779B185EBCA8DULL, { 0xD784DE18F3D17A46ULL, 0x5804B309C0312518ULL } }, /* XSUM_XXH128_testdata[1787] */\n    {  596, 0x0000000000000000ULL, { 0x52B178D2628DD9EDULL, 0xE8B3C20B441D9F8BULL } }, /* XSUM_XXH128_testdata[1788] */\n    {  596, 0x000000009E3779B1ULL, { 0x678A46A625F9A6E0ULL, 0x93A7465665D97632ULL } }, /* XSUM_XXH128_testdata[1789] */\n    {  596, 0x9E3779B185EBCA8DULL, { 0xCE7C32792F452855ULL, 0xFFBD11144C29E3E7ULL } }, /* XSUM_XXH128_testdata[1790] */\n    {  597, 0x0000000000000000ULL, { 0x199A00792322556FULL, 0x63E22B199381E3E5ULL } }, /* XSUM_XXH128_testdata[1791] */\n    {  597, 0x000000009E3779B1ULL, { 0x2E735112D4062E9BULL, 0xA56F0E9C8F48042BULL } }, /* XSUM_XXH128_testdata[1792] */\n    {  597, 0x9E3779B185EBCA8DULL, { 0x6A08469D57D39795ULL, 0x9A3507DFCE042234ULL } }, /* XSUM_XXH128_testdata[1793] */\n    {  598, 0x0000000000000000ULL, { 0x2CFBF6705B9693D2ULL, 0xA2FC2499C6AFB62BULL } }, /* XSUM_XXH128_testdata[1794] */\n    {  598, 0x000000009E3779B1ULL, { 0xAB5F7AEF89576E39ULL, 0xD14289B810BA0D28ULL } }, /* XSUM_XXH128_testdata[1795] */\n    {  598, 0x9E3779B185EBCA8DULL, { 0x68D4E452C95CA39AULL, 0xC50E52A037E41932ULL } }, /* XSUM_XXH128_testdata[1796] */\n    {  599, 0x0000000000000000ULL, { 0x96E4AF71C89C294FULL, 0xE322D26DB247FD4CULL } }, /* XSUM_XXH128_testdata[1797] */\n    {  599, 0x000000009E3779B1ULL, { 0x54A490D8A2AC5FE1ULL, 0x6BF37B73230B53D1ULL } }, /* XSUM_XXH128_testdata[1798] */\n    {  599, 0x9E3779B185EBCA8DULL, { 0x8FD2DF72FDBEB423ULL, 0x7F8CECD60F4F12A5ULL } }, /* XSUM_XXH128_testdata[1799] */\n    {  600, 0x0000000000000000ULL, { 0xC0605FE191A5E128ULL, 0x90CC6214BA78A809ULL } }, /* XSUM_XXH128_testdata[1800] */\n    {  600, 0x000000009E3779B1ULL, { 0x82954F0C435A68B8ULL, 0x005800911B6B3031ULL } }, /* XSUM_XXH128_testdata[1801] */\n    {  600, 0x9E3779B185EBCA8DULL, { 0x061A23845807828DULL, 0x63DC339D852BCE71ULL } }, /* XSUM_XXH128_testdata[1802] */\n    {  601, 0x0000000000000000ULL, { 0xB9B52AB20DCFA2F0ULL, 0xB2314F9051DB8B56ULL } }, /* XSUM_XXH128_testdata[1803] */\n    {  601, 0x000000009E3779B1ULL, { 0xA3C0B181AB829D9FULL, 0x16497AB5B1806B8DULL } }, /* XSUM_XXH128_testdata[1804] */\n    {  601, 0x9E3779B185EBCA8DULL, { 0xA10C9021FBF86BDCULL, 0x1B3996CE77BE9435ULL } }, /* XSUM_XXH128_testdata[1805] */\n    {  602, 0x0000000000000000ULL, { 0x1E681FF1711A71ECULL, 0x380DF07BDC7D82FAULL } }, /* XSUM_XXH128_testdata[1806] */\n    {  602, 0x000000009E3779B1ULL, { 0xF6DCA8A5B831CB19ULL, 0x5F905ECEEA7DAEB6ULL } }, /* XSUM_XXH128_testdata[1807] */\n    {  602, 0x9E3779B185EBCA8DULL, { 0x77D303A800879170ULL, 0xC036A3DC8037DDE1ULL } }, /* XSUM_XXH128_testdata[1808] */\n    {  603, 0x0000000000000000ULL, { 0x274CC56B3599F0FCULL, 0xA5BE69E79996918EULL } }, /* XSUM_XXH128_testdata[1809] */\n    {  603, 0x000000009E3779B1ULL, { 0x1D1D03432DE1422DULL, 0xA4624CA7CE385055ULL } }, /* XSUM_XXH128_testdata[1810] */\n    {  603, 0x9E3779B185EBCA8DULL, { 0x21A9015EDF9C798FULL, 0xC7BCFF0C7D422BC9ULL } }, /* XSUM_XXH128_testdata[1811] */\n    {  604, 0x0000000000000000ULL, { 0x2DB7105D277670F9ULL, 0xB41D6C796CF12FD9ULL } }, /* XSUM_XXH128_testdata[1812] */\n    {  604, 0x000000009E3779B1ULL, { 0x558145B5694D6511ULL, 0xA482237BB1D2E87EULL } }, /* XSUM_XXH128_testdata[1813] */\n    {  604, 0x9E3779B185EBCA8DULL, { 0x5C54F9021DD5483BULL, 0x9C430B5279704EB9ULL } }, /* XSUM_XXH128_testdata[1814] */\n    {  605, 0x0000000000000000ULL, { 0xEF875CCA274645EBULL, 0x77641EF07FB39530ULL } }, /* XSUM_XXH128_testdata[1815] */\n    {  605, 0x000000009E3779B1ULL, { 0x8D270BEBBA0DC4B8ULL, 0x758C05D3E12ECC34ULL } }, /* XSUM_XXH128_testdata[1816] */\n    {  605, 0x9E3779B185EBCA8DULL, { 0xA87B24AE041D5072ULL, 0x04285CE218AEBDAEULL } }, /* XSUM_XXH128_testdata[1817] */\n    {  606, 0x0000000000000000ULL, { 0x6095086311E06EBCULL, 0x73DE7F5A6F5AF11BULL } }, /* XSUM_XXH128_testdata[1818] */\n    {  606, 0x000000009E3779B1ULL, { 0x0F1CB0B4377F4995ULL, 0x59B7D6C864F0C84EULL } }, /* XSUM_XXH128_testdata[1819] */\n    {  606, 0x9E3779B185EBCA8DULL, { 0x93B481E1668D07E1ULL, 0xC898677587D9FB03ULL } }, /* XSUM_XXH128_testdata[1820] */\n    {  607, 0x0000000000000000ULL, { 0x9BE5048018448255ULL, 0x03239A39A3606215ULL } }, /* XSUM_XXH128_testdata[1821] */\n    {  607, 0x000000009E3779B1ULL, { 0xE3E62BC1B0AC9898ULL, 0x9836177A747BD791ULL } }, /* XSUM_XXH128_testdata[1822] */\n    {  607, 0x9E3779B185EBCA8DULL, { 0xD5C064AC0461CDEAULL, 0xA5F6012E22181D02ULL } }, /* XSUM_XXH128_testdata[1823] */\n    {  608, 0x0000000000000000ULL, { 0xE2F2E44992786982ULL, 0xB26A68526D78D4A2ULL } }, /* XSUM_XXH128_testdata[1824] */\n    {  608, 0x000000009E3779B1ULL, { 0x64505FB146FC601FULL, 0x96C35C72D5C478B7ULL } }, /* XSUM_XXH128_testdata[1825] */\n    {  608, 0x9E3779B185EBCA8DULL, { 0x9C9880AF03E8A1E2ULL, 0x61FEA8738F571ADAULL } }, /* XSUM_XXH128_testdata[1826] */\n    {  609, 0x0000000000000000ULL, { 0x969FA5C5D49A88F6ULL, 0x6D20A428BA0410BDULL } }, /* XSUM_XXH128_testdata[1827] */\n    {  609, 0x000000009E3779B1ULL, { 0x388D3703ECE26A47ULL, 0xD8CF6B396A1D80BAULL } }, /* XSUM_XXH128_testdata[1828] */\n    {  609, 0x9E3779B185EBCA8DULL, { 0x911FCC4A7ED41156ULL, 0x0DA6B8ACF5240770ULL } }, /* XSUM_XXH128_testdata[1829] */\n    {  610, 0x0000000000000000ULL, { 0x69382E0FA6AC3416ULL, 0xA70CA7B122A9EF13ULL } }, /* XSUM_XXH128_testdata[1830] */\n    {  610, 0x000000009E3779B1ULL, { 0xD9CB395E5676B251ULL, 0xF7123DFBC6A60AAAULL } }, /* XSUM_XXH128_testdata[1831] */\n    {  610, 0x9E3779B185EBCA8DULL, { 0x2CB911C877F198C1ULL, 0x3C9D8A22BC0FCB49ULL } }, /* XSUM_XXH128_testdata[1832] */\n    {  611, 0x0000000000000000ULL, { 0xA24AC0AD6789B294ULL, 0xAD2D4EBD6B5A46E0ULL } }, /* XSUM_XXH128_testdata[1833] */\n    {  611, 0x000000009E3779B1ULL, { 0xAA52BDC19527F31FULL, 0x6B1A04DCD459B68DULL } }, /* XSUM_XXH128_testdata[1834] */\n    {  611, 0x9E3779B185EBCA8DULL, { 0xDB739ED7A7DB4B64ULL, 0xB55FC1BF3C9A1E3FULL } }, /* XSUM_XXH128_testdata[1835] */\n    {  612, 0x0000000000000000ULL, { 0xAB306415318BF16CULL, 0x56008E44603E68A7ULL } }, /* XSUM_XXH128_testdata[1836] */\n    {  612, 0x000000009E3779B1ULL, { 0x108D24A42802CCE2ULL, 0xCAD3A597DA3F3CC7ULL } }, /* XSUM_XXH128_testdata[1837] */\n    {  612, 0x9E3779B185EBCA8DULL, { 0x572F5BA4414B6021ULL, 0x5A5FF0C22EAB2874ULL } }, /* XSUM_XXH128_testdata[1838] */\n    {  613, 0x0000000000000000ULL, { 0x928ED52A15B31530ULL, 0xC1E02E3350B77F2BULL } }, /* XSUM_XXH128_testdata[1839] */\n    {  613, 0x000000009E3779B1ULL, { 0xE1F9C7E877964A12ULL, 0xB8A1AB7FCBA5E537ULL } }, /* XSUM_XXH128_testdata[1840] */\n    {  613, 0x9E3779B185EBCA8DULL, { 0x863CEC68751B6645ULL, 0x6776A2412F39B15AULL } }, /* XSUM_XXH128_testdata[1841] */\n    {  614, 0x0000000000000000ULL, { 0x11C8C7ACC6789D36ULL, 0x5E99F62362D66373ULL } }, /* XSUM_XXH128_testdata[1842] */\n    {  614, 0x000000009E3779B1ULL, { 0x211B80A1B439E408ULL, 0x67A4CA37D258ECAFULL } }, /* XSUM_XXH128_testdata[1843] */\n    {  614, 0x9E3779B185EBCA8DULL, { 0x25119504F8C045A1ULL, 0x4F27AF8D007A7BDCULL } }, /* XSUM_XXH128_testdata[1844] */\n    {  615, 0x0000000000000000ULL, { 0x3731AE1CEDF5C793ULL, 0xC705C2585D353C74ULL } }, /* XSUM_XXH128_testdata[1845] */\n    {  615, 0x000000009E3779B1ULL, { 0xED65D84E231D5C16ULL, 0xFE4531DE7010F874ULL } }, /* XSUM_XXH128_testdata[1846] */\n    {  615, 0x9E3779B185EBCA8DULL, { 0x2DE364890B5BAF7CULL, 0x5658A0237EEC33E7ULL } }, /* XSUM_XXH128_testdata[1847] */\n    {  616, 0x0000000000000000ULL, { 0x31EEEFA193131A8CULL, 0x2E99CDE84E8687E1ULL } }, /* XSUM_XXH128_testdata[1848] */\n    {  616, 0x000000009E3779B1ULL, { 0x312A0CE06D3EF9B5ULL, 0x6B97A1B7BF8D9938ULL } }, /* XSUM_XXH128_testdata[1849] */\n    {  616, 0x9E3779B185EBCA8DULL, { 0xAA10CEDACEAA47AAULL, 0x90FAD055E2152184ULL } }, /* XSUM_XXH128_testdata[1850] */\n    {  617, 0x0000000000000000ULL, { 0xFE134367327E31B5ULL, 0xBC2D27C4492E0CEAULL } }, /* XSUM_XXH128_testdata[1851] */\n    {  617, 0x000000009E3779B1ULL, { 0x115F2B167DBA5CB8ULL, 0x0B82F478E4859232ULL } }, /* XSUM_XXH128_testdata[1852] */\n    {  617, 0x9E3779B185EBCA8DULL, { 0x8203304E6842AC80ULL, 0xBA552639C8666341ULL } }, /* XSUM_XXH128_testdata[1853] */\n    {  618, 0x0000000000000000ULL, { 0x2DC6F2E1248E829AULL, 0x51F01132E0320D01ULL } }, /* XSUM_XXH128_testdata[1854] */\n    {  618, 0x000000009E3779B1ULL, { 0xD11C8AF78DC6924CULL, 0xB74AEB6D61DEBB0EULL } }, /* XSUM_XXH128_testdata[1855] */\n    {  618, 0x9E3779B185EBCA8DULL, { 0xE49683C589D9C054ULL, 0xDC5240B21FD4B31DULL } }, /* XSUM_XXH128_testdata[1856] */\n    {  619, 0x0000000000000000ULL, { 0x510613BA8891C1E7ULL, 0x93D8CCB8B0FB5DC6ULL } }, /* XSUM_XXH128_testdata[1857] */\n    {  619, 0x000000009E3779B1ULL, { 0xA527534D495826C1ULL, 0x508298E690C6FD83ULL } }, /* XSUM_XXH128_testdata[1858] */\n    {  619, 0x9E3779B185EBCA8DULL, { 0x6AFFDCD2935018B4ULL, 0x4C2AE7433C5EA201ULL } }, /* XSUM_XXH128_testdata[1859] */\n    {  620, 0x0000000000000000ULL, { 0xED6D6926F7B60375ULL, 0x7E0682BBD603E72DULL } }, /* XSUM_XXH128_testdata[1860] */\n    {  620, 0x000000009E3779B1ULL, { 0x4543D4F6F979AD40ULL, 0x8D80413C1ED48D80ULL } }, /* XSUM_XXH128_testdata[1861] */\n    {  620, 0x9E3779B185EBCA8DULL, { 0x6541696753FAC9A2ULL, 0x127DC4E850FB6443ULL } }, /* XSUM_XXH128_testdata[1862] */\n    {  621, 0x0000000000000000ULL, { 0xA0CC39F66497B27FULL, 0x405C9D60D80B40B6ULL } }, /* XSUM_XXH128_testdata[1863] */\n    {  621, 0x000000009E3779B1ULL, { 0xEB6BCD5578086944ULL, 0xC61C086B65B78AD5ULL } }, /* XSUM_XXH128_testdata[1864] */\n    {  621, 0x9E3779B185EBCA8DULL, { 0xE258768426AD7457ULL, 0x607654C8D489D6BFULL } }, /* XSUM_XXH128_testdata[1865] */\n    {  622, 0x0000000000000000ULL, { 0x04F9559C71C5B5A0ULL, 0x2E305C380E67BC5BULL } }, /* XSUM_XXH128_testdata[1866] */\n    {  622, 0x000000009E3779B1ULL, { 0x3088790F2F98F3B2ULL, 0xC35A8F42DC435E92ULL } }, /* XSUM_XXH128_testdata[1867] */\n    {  622, 0x9E3779B185EBCA8DULL, { 0xB593A3CBBF11D3ADULL, 0x74B44B1B111FD2D3ULL } }, /* XSUM_XXH128_testdata[1868] */\n    {  623, 0x0000000000000000ULL, { 0x2883715F1954DEC5ULL, 0x8EED78DA0E214FEDULL } }, /* XSUM_XXH128_testdata[1869] */\n    {  623, 0x000000009E3779B1ULL, { 0xC134437CFA099A65ULL, 0xB6085488A448AA84ULL } }, /* XSUM_XXH128_testdata[1870] */\n    {  623, 0x9E3779B185EBCA8DULL, { 0xD9A88DC52418885EULL, 0x3C9F7A7B8AE450ADULL } }, /* XSUM_XXH128_testdata[1871] */\n    {  624, 0x0000000000000000ULL, { 0x7DBD97E325B2A6A7ULL, 0x489A5365EF1051A9ULL } }, /* XSUM_XXH128_testdata[1872] */\n    {  624, 0x000000009E3779B1ULL, { 0xF1CBF9CAF3839F2AULL, 0xF8CEA05306A9CE88ULL } }, /* XSUM_XXH128_testdata[1873] */\n    {  624, 0x9E3779B185EBCA8DULL, { 0x26CC497601B10736ULL, 0xB038054E846802BDULL } }, /* XSUM_XXH128_testdata[1874] */\n    {  625, 0x0000000000000000ULL, { 0x1A93910D2CD6D526ULL, 0xABB9A07C7C49B26AULL } }, /* XSUM_XXH128_testdata[1875] */\n    {  625, 0x000000009E3779B1ULL, { 0xCB2821ABDDDC6B0FULL, 0x7FC20F6810051088ULL } }, /* XSUM_XXH128_testdata[1876] */\n    {  625, 0x9E3779B185EBCA8DULL, { 0x571552D3E0744C50ULL, 0xDB00B33DACD5D19FULL } }, /* XSUM_XXH128_testdata[1877] */\n    {  626, 0x0000000000000000ULL, { 0x8CD297D30C025358ULL, 0x9C898DEDD75ED6F1ULL } }, /* XSUM_XXH128_testdata[1878] */\n    {  626, 0x000000009E3779B1ULL, { 0x4C60089F5590249AULL, 0x36C913A3481FECC3ULL } }, /* XSUM_XXH128_testdata[1879] */\n    {  626, 0x9E3779B185EBCA8DULL, { 0x0B018AAECFC50E25ULL, 0x9FE4DD0994C2A746ULL } }, /* XSUM_XXH128_testdata[1880] */\n    {  627, 0x0000000000000000ULL, { 0x8A26D3B875BC2BB0ULL, 0xB0D481928EFC63ADULL } }, /* XSUM_XXH128_testdata[1881] */\n    {  627, 0x000000009E3779B1ULL, { 0x8F8C1E5D94713392ULL, 0x98695F13AD11CF39ULL } }, /* XSUM_XXH128_testdata[1882] */\n    {  627, 0x9E3779B185EBCA8DULL, { 0x7DEC6393395B7F1EULL, 0x465F58A990E07E3FULL } }, /* XSUM_XXH128_testdata[1883] */\n    {  628, 0x0000000000000000ULL, { 0x6084625CE9FE419CULL, 0xF235250955E81CCBULL } }, /* XSUM_XXH128_testdata[1884] */\n    {  628, 0x000000009E3779B1ULL, { 0xBD2683AE1CE521C6ULL, 0x3CF41F400EAD739BULL } }, /* XSUM_XXH128_testdata[1885] */\n    {  628, 0x9E3779B185EBCA8DULL, { 0x5B22E55A223B81DAULL, 0x8FF6DA2358F3A3D7ULL } }, /* XSUM_XXH128_testdata[1886] */\n    {  629, 0x0000000000000000ULL, { 0x100D70F4679F9BD3ULL, 0x79B339CAFC0B1C03ULL } }, /* XSUM_XXH128_testdata[1887] */\n    {  629, 0x000000009E3779B1ULL, { 0xE7D4AA5032BFB46EULL, 0x9640B159B1AA4AE1ULL } }, /* XSUM_XXH128_testdata[1888] */\n    {  629, 0x9E3779B185EBCA8DULL, { 0xF48929F1B6A7BCDCULL, 0x290514DA890B0080ULL } }, /* XSUM_XXH128_testdata[1889] */\n    {  630, 0x0000000000000000ULL, { 0xE3D4F6F959A36913ULL, 0xAB2C9030E1942D19ULL } }, /* XSUM_XXH128_testdata[1890] */\n    {  630, 0x000000009E3779B1ULL, { 0x05E29915B1FF7669ULL, 0x52806D97D9A23588ULL } }, /* XSUM_XXH128_testdata[1891] */\n    {  630, 0x9E3779B185EBCA8DULL, { 0x186793413BF41E97ULL, 0xA4AC88E362598BC5ULL } }, /* XSUM_XXH128_testdata[1892] */\n    {  631, 0x0000000000000000ULL, { 0x182716B04D4641A5ULL, 0x4ACBD981F622F8B5ULL } }, /* XSUM_XXH128_testdata[1893] */\n    {  631, 0x000000009E3779B1ULL, { 0x7173F808A2108C8FULL, 0x10E02EF6E5764259ULL } }, /* XSUM_XXH128_testdata[1894] */\n    {  631, 0x9E3779B185EBCA8DULL, { 0xF207013BBEA556D9ULL, 0xBA28B886ECAA3133ULL } }, /* XSUM_XXH128_testdata[1895] */\n    {  632, 0x0000000000000000ULL, { 0x710CC7DE160F15FAULL, 0x2A6B1FEDCAD7D332ULL } }, /* XSUM_XXH128_testdata[1896] */\n    {  632, 0x000000009E3779B1ULL, { 0x41DBBD4B82A893ABULL, 0x8AA88F8CD7D633E8ULL } }, /* XSUM_XXH128_testdata[1897] */\n    {  632, 0x9E3779B185EBCA8DULL, { 0xDB6AB689686906EFULL, 0x5EBF2B8EDC92675CULL } }, /* XSUM_XXH128_testdata[1898] */\n    {  633, 0x0000000000000000ULL, { 0x36ACB22C98F2647FULL, 0x046CF39E34B8D271ULL } }, /* XSUM_XXH128_testdata[1899] */\n    {  633, 0x000000009E3779B1ULL, { 0x8117A4FCC3901D40ULL, 0x774DF0989E8821DCULL } }, /* XSUM_XXH128_testdata[1900] */\n    {  633, 0x9E3779B185EBCA8DULL, { 0x8F509869A202DBCFULL, 0x4168EFD7358AEB18ULL } }, /* XSUM_XXH128_testdata[1901] */\n    {  634, 0x0000000000000000ULL, { 0x9164849B45760F60ULL, 0x7BAA584C4A2A84DDULL } }, /* XSUM_XXH128_testdata[1902] */\n    {  634, 0x000000009E3779B1ULL, { 0xA2F8CDC49121A2C5ULL, 0xBD597639D618BA6DULL } }, /* XSUM_XXH128_testdata[1903] */\n    {  634, 0x9E3779B185EBCA8DULL, { 0xC9C40A581D114295ULL, 0x2CDCCDC638044E1AULL } }, /* XSUM_XXH128_testdata[1904] */\n    {  635, 0x0000000000000000ULL, { 0x6DA37640B986D7A3ULL, 0x4B4D8A224C018D16ULL } }, /* XSUM_XXH128_testdata[1905] */\n    {  635, 0x000000009E3779B1ULL, { 0xF52F49C543037AC1ULL, 0x98A9F2586A105116ULL } }, /* XSUM_XXH128_testdata[1906] */\n    {  635, 0x9E3779B185EBCA8DULL, { 0x7FAF2E611B096C47ULL, 0xC90B5C8EAC3AC602ULL } }, /* XSUM_XXH128_testdata[1907] */\n    {  636, 0x0000000000000000ULL, { 0x59BA932720702C98ULL, 0x9F7060B8F8D0F141ULL } }, /* XSUM_XXH128_testdata[1908] */\n    {  636, 0x000000009E3779B1ULL, { 0x74034C9DC603474CULL, 0x7FAC29BD31BA2FC9ULL } }, /* XSUM_XXH128_testdata[1909] */\n    {  636, 0x9E3779B185EBCA8DULL, { 0x5EB76A057E164347ULL, 0xB133BD3D32C6475DULL } }, /* XSUM_XXH128_testdata[1910] */\n    {  637, 0x0000000000000000ULL, { 0x91FA6DEA0E5BE52DULL, 0x5D9A63BB3C922A36ULL } }, /* XSUM_XXH128_testdata[1911] */\n    {  637, 0x000000009E3779B1ULL, { 0xBFC7B1554EF9A880ULL, 0x0E3E0FF6851A7EB0ULL } }, /* XSUM_XXH128_testdata[1912] */\n    {  637, 0x9E3779B185EBCA8DULL, { 0x6C611F46BA1235BEULL, 0x257E40F8058EC1A4ULL } }, /* XSUM_XXH128_testdata[1913] */\n    {  638, 0x0000000000000000ULL, { 0x4BC1B99ABD8C9B73ULL, 0x14BE9608BFF83E42ULL } }, /* XSUM_XXH128_testdata[1914] */\n    {  638, 0x000000009E3779B1ULL, { 0x22798066FB902E83ULL, 0x961B9594CBA6B7F5ULL } }, /* XSUM_XXH128_testdata[1915] */\n    {  638, 0x9E3779B185EBCA8DULL, { 0xFA8DF2479F6BB0AFULL, 0x6C840AFB508E84B4ULL } }, /* XSUM_XXH128_testdata[1916] */\n    {  639, 0x0000000000000000ULL, { 0x035D671E9674A633ULL, 0xE3417BEB35AA68CDULL } }, /* XSUM_XXH128_testdata[1917] */\n    {  639, 0x000000009E3779B1ULL, { 0x597FC340C4F9B794ULL, 0x0EF6FF6E29F753ACULL } }, /* XSUM_XXH128_testdata[1918] */\n    {  639, 0x9E3779B185EBCA8DULL, { 0x9B8EF3F04B909513ULL, 0x5EA5068983528875ULL } }, /* XSUM_XXH128_testdata[1919] */\n    {  640, 0x0000000000000000ULL, { 0xAF4193ABDC5994B3ULL, 0xDED3EEA178AD232AULL } }, /* XSUM_XXH128_testdata[1920] */\n    {  640, 0x000000009E3779B1ULL, { 0x1D04FD8537A8A678ULL, 0x1BA925E1B8ED9171ULL } }, /* XSUM_XXH128_testdata[1921] */\n    {  640, 0x9E3779B185EBCA8DULL, { 0xBCF9335F2DD501DEULL, 0xC51288F418AC024FULL } }, /* XSUM_XXH128_testdata[1922] */\n    {  641, 0x0000000000000000ULL, { 0xE7BA1B930AEEB87DULL, 0x3928C27C03E3330DULL } }, /* XSUM_XXH128_testdata[1923] */\n    {  641, 0x000000009E3779B1ULL, { 0xDB46963A76DEA109ULL, 0x783DA6B7634F5582ULL } }, /* XSUM_XXH128_testdata[1924] */\n    {  641, 0x9E3779B185EBCA8DULL, { 0x6AF70D9EF44C03C4ULL, 0xAAE75F5F9F462D2FULL } }, /* XSUM_XXH128_testdata[1925] */\n    {  642, 0x0000000000000000ULL, { 0x065E9966C6E4276BULL, 0x233315089D645B95ULL } }, /* XSUM_XXH128_testdata[1926] */\n    {  642, 0x000000009E3779B1ULL, { 0x315613A249661BF6ULL, 0xDF2464407D908B33ULL } }, /* XSUM_XXH128_testdata[1927] */\n    {  642, 0x9E3779B185EBCA8DULL, { 0x72A68771C0145270ULL, 0x764B3F7D1D489B2CULL } }, /* XSUM_XXH128_testdata[1928] */\n    {  643, 0x0000000000000000ULL, { 0xD29405F69936AB10ULL, 0x170A71A9D0962E11ULL } }, /* XSUM_XXH128_testdata[1929] */\n    {  643, 0x000000009E3779B1ULL, { 0xD1B1ABD071E9E4FEULL, 0xD1317AEF0056BB4FULL } }, /* XSUM_XXH128_testdata[1930] */\n    {  643, 0x9E3779B185EBCA8DULL, { 0xC112DD24C82BE004ULL, 0x9521F97EB21A074BULL } }, /* XSUM_XXH128_testdata[1931] */\n    {  644, 0x0000000000000000ULL, { 0x68303D1BCAAEBB23ULL, 0xB3C65579CF5934AFULL } }, /* XSUM_XXH128_testdata[1932] */\n    {  644, 0x000000009E3779B1ULL, { 0xD7398D811F61B0CBULL, 0x6C8256003C871393ULL } }, /* XSUM_XXH128_testdata[1933] */\n    {  644, 0x9E3779B185EBCA8DULL, { 0xB1A8A8C331ABF2EFULL, 0xF32438011C0B7A16ULL } }, /* XSUM_XXH128_testdata[1934] */\n    {  645, 0x0000000000000000ULL, { 0x3801BF30E6386242ULL, 0xA398FA81E9ACD048ULL } }, /* XSUM_XXH128_testdata[1935] */\n    {  645, 0x000000009E3779B1ULL, { 0xE814D34978EE694CULL, 0xC0D64E6BC163CB73ULL } }, /* XSUM_XXH128_testdata[1936] */\n    {  645, 0x9E3779B185EBCA8DULL, { 0x688D55D2B4826CD8ULL, 0x784262281591B8CCULL } }, /* XSUM_XXH128_testdata[1937] */\n    {  646, 0x0000000000000000ULL, { 0x27C2E21CA1AD0BB4ULL, 0x8A8D28B427C45E5AULL } }, /* XSUM_XXH128_testdata[1938] */\n    {  646, 0x000000009E3779B1ULL, { 0x214153A8693AD351ULL, 0x4F6E143D266E1DC3ULL } }, /* XSUM_XXH128_testdata[1939] */\n    {  646, 0x9E3779B185EBCA8DULL, { 0xE4FBDF7428E36986ULL, 0x17E22362C58CAAB1ULL } }, /* XSUM_XXH128_testdata[1940] */\n    {  647, 0x0000000000000000ULL, { 0x359159902F4339F9ULL, 0xA17DB7A6AEA3FED8ULL } }, /* XSUM_XXH128_testdata[1941] */\n    {  647, 0x000000009E3779B1ULL, { 0x09A09E74B4C12DB9ULL, 0x224BCE96A2B8CDEDULL } }, /* XSUM_XXH128_testdata[1942] */\n    {  647, 0x9E3779B185EBCA8DULL, { 0x50E157E377554E5AULL, 0x73806831CCAFAB45ULL } }, /* XSUM_XXH128_testdata[1943] */\n    {  648, 0x0000000000000000ULL, { 0x901087DE7D84E343ULL, 0x9FE03B2571B5B0E5ULL } }, /* XSUM_XXH128_testdata[1944] */\n    {  648, 0x000000009E3779B1ULL, { 0xE83D549803D8ABF6ULL, 0x5E114A08DD990DB3ULL } }, /* XSUM_XXH128_testdata[1945] */\n    {  648, 0x9E3779B185EBCA8DULL, { 0x3730E38DCCA57107ULL, 0xE9622AFA0AA7653EULL } }, /* XSUM_XXH128_testdata[1946] */\n    {  649, 0x0000000000000000ULL, { 0xE21B333C11B071ECULL, 0xC65780C40C24D8F6ULL } }, /* XSUM_XXH128_testdata[1947] */\n    {  649, 0x000000009E3779B1ULL, { 0x3CD78742DB22049AULL, 0x5A385D0AD74B958DULL } }, /* XSUM_XXH128_testdata[1948] */\n    {  649, 0x9E3779B185EBCA8DULL, { 0xB69D9DEE1403CCE5ULL, 0xACD8EB354B40131AULL } }, /* XSUM_XXH128_testdata[1949] */\n    {  650, 0x0000000000000000ULL, { 0xCC858F79A2DC1D8CULL, 0xC307ADBA7929002CULL } }, /* XSUM_XXH128_testdata[1950] */\n    {  650, 0x000000009E3779B1ULL, { 0x50216B88E09AF82EULL, 0x7BDEA7E5F8AB6AEFULL } }, /* XSUM_XXH128_testdata[1951] */\n    {  650, 0x9E3779B185EBCA8DULL, { 0x9A2C632A20524886ULL, 0xBF04650388DB4A9FULL } }, /* XSUM_XXH128_testdata[1952] */\n    {  651, 0x0000000000000000ULL, { 0x1D511DBC696D9235ULL, 0x8B8070E209AA8D41ULL } }, /* XSUM_XXH128_testdata[1953] */\n    {  651, 0x000000009E3779B1ULL, { 0xC546D2B0931A158AULL, 0x5F208AB50214387FULL } }, /* XSUM_XXH128_testdata[1954] */\n    {  651, 0x9E3779B185EBCA8DULL, { 0xD725252CD3469098ULL, 0xE06AC2F56CAD1366ULL } }, /* XSUM_XXH128_testdata[1955] */\n    {  652, 0x0000000000000000ULL, { 0xCDD3E08C5A2DBD5FULL, 0xC77477D5F27B7C9CULL } }, /* XSUM_XXH128_testdata[1956] */\n    {  652, 0x000000009E3779B1ULL, { 0x8FB89AD9FAEA2F34ULL, 0xACBED578AB960B16ULL } }, /* XSUM_XXH128_testdata[1957] */\n    {  652, 0x9E3779B185EBCA8DULL, { 0xC14E73EC3F3FD40EULL, 0x559397FF5C1A7E23ULL } }, /* XSUM_XXH128_testdata[1958] */\n    {  653, 0x0000000000000000ULL, { 0x4CC60A74EDFDC4A1ULL, 0xDAD00CC976D1B8CCULL } }, /* XSUM_XXH128_testdata[1959] */\n    {  653, 0x000000009E3779B1ULL, { 0xB6C388758C4E288BULL, 0x3CB41F3B01765C29ULL } }, /* XSUM_XXH128_testdata[1960] */\n    {  653, 0x9E3779B185EBCA8DULL, { 0x2E3E4D6216BE0652ULL, 0xA2F4355BF8FA82D9ULL } }, /* XSUM_XXH128_testdata[1961] */\n    {  654, 0x0000000000000000ULL, { 0x61075A6A563EA507ULL, 0x34ECC18620EAFD34ULL } }, /* XSUM_XXH128_testdata[1962] */\n    {  654, 0x000000009E3779B1ULL, { 0x0F51D561E272F89DULL, 0xF62716D87F4213FAULL } }, /* XSUM_XXH128_testdata[1963] */\n    {  654, 0x9E3779B185EBCA8DULL, { 0x61BCB8DB78710FFFULL, 0xDA5B2D13F8FABFC1ULL } }, /* XSUM_XXH128_testdata[1964] */\n    {  655, 0x0000000000000000ULL, { 0x552CCAB07F52777BULL, 0xFA804201FCF9D5CAULL } }, /* XSUM_XXH128_testdata[1965] */\n    {  655, 0x000000009E3779B1ULL, { 0xC80385E16F99D873ULL, 0xB54D72438B65F8F5ULL } }, /* XSUM_XXH128_testdata[1966] */\n    {  655, 0x9E3779B185EBCA8DULL, { 0x7DB56551A2409867ULL, 0x4549FA3034D85CEDULL } }, /* XSUM_XXH128_testdata[1967] */\n    {  656, 0x0000000000000000ULL, { 0x4ACDE78203A11415ULL, 0x8F05E20678ED9666ULL } }, /* XSUM_XXH128_testdata[1968] */\n    {  656, 0x000000009E3779B1ULL, { 0xB7B2C2A534A83D76ULL, 0x64098E91D988D218ULL } }, /* XSUM_XXH128_testdata[1969] */\n    {  656, 0x9E3779B185EBCA8DULL, { 0x2641A2A30324B9D6ULL, 0x29B03DCB195645DDULL } }, /* XSUM_XXH128_testdata[1970] */\n    {  657, 0x0000000000000000ULL, { 0xB5497EA549768344ULL, 0x90584D0BE3A8D7F2ULL } }, /* XSUM_XXH128_testdata[1971] */\n    {  657, 0x000000009E3779B1ULL, { 0x9EE99E369A2E9B15ULL, 0xE1193CAC7EF0B5C5ULL } }, /* XSUM_XXH128_testdata[1972] */\n    {  657, 0x9E3779B185EBCA8DULL, { 0x03174EAE8FAA0FC7ULL, 0x5D8DF7DFAEA608DDULL } }, /* XSUM_XXH128_testdata[1973] */\n    {  658, 0x0000000000000000ULL, { 0xDC50AEFA830D25A4ULL, 0xC1C4E64E40750878ULL } }, /* XSUM_XXH128_testdata[1974] */\n    {  658, 0x000000009E3779B1ULL, { 0x616FB40F23691CD4ULL, 0xBB8D1F964313BDCDULL } }, /* XSUM_XXH128_testdata[1975] */\n    {  658, 0x9E3779B185EBCA8DULL, { 0xA5A8205C97D473BAULL, 0x4C87C4C22C02161CULL } }, /* XSUM_XXH128_testdata[1976] */\n    {  659, 0x0000000000000000ULL, { 0x9160DC39BA6D1C83ULL, 0x5D9A2A51BFC39666ULL } }, /* XSUM_XXH128_testdata[1977] */\n    {  659, 0x000000009E3779B1ULL, { 0x380B793C8B53976CULL, 0x57DC8308EC9581B7ULL } }, /* XSUM_XXH128_testdata[1978] */\n    {  659, 0x9E3779B185EBCA8DULL, { 0x475480CCC8AF958AULL, 0xF2A5C38C0F8D0557ULL } }, /* XSUM_XXH128_testdata[1979] */\n    {  660, 0x0000000000000000ULL, { 0xA9CA3EF4146E6E9FULL, 0x10C0B34B8CB20C8EULL } }, /* XSUM_XXH128_testdata[1980] */\n    {  660, 0x000000009E3779B1ULL, { 0x1AAA7BFC74A4924CULL, 0xC8A4EF3D08EFF52DULL } }, /* XSUM_XXH128_testdata[1981] */\n    {  660, 0x9E3779B185EBCA8DULL, { 0x1682C066F3A8823FULL, 0x3D9E25DC1A2A28A9ULL } }, /* XSUM_XXH128_testdata[1982] */\n    {  661, 0x0000000000000000ULL, { 0x7460AC3EBDB0CC91ULL, 0x8154E235C9FE2B82ULL } }, /* XSUM_XXH128_testdata[1983] */\n    {  661, 0x000000009E3779B1ULL, { 0xCBA490856D7EF1F0ULL, 0x94A90685A240FFE1ULL } }, /* XSUM_XXH128_testdata[1984] */\n    {  661, 0x9E3779B185EBCA8DULL, { 0xF2D25854D8C709DBULL, 0xB504402B97B1EFC3ULL } }, /* XSUM_XXH128_testdata[1985] */\n    {  662, 0x0000000000000000ULL, { 0xECEC3F9135C75502ULL, 0x53292BD52F578EA0ULL } }, /* XSUM_XXH128_testdata[1986] */\n    {  662, 0x000000009E3779B1ULL, { 0x31BA8676BCE71CD0ULL, 0x962B6A5C7134CF66ULL } }, /* XSUM_XXH128_testdata[1987] */\n    {  662, 0x9E3779B185EBCA8DULL, { 0x62499E1401ADE872ULL, 0x0A11874EBF6AA403ULL } }, /* XSUM_XXH128_testdata[1988] */\n    {  663, 0x0000000000000000ULL, { 0x7B127A5A5E93BCD4ULL, 0xE1222F4E25D2DE2EULL } }, /* XSUM_XXH128_testdata[1989] */\n    {  663, 0x000000009E3779B1ULL, { 0x2905636734279643ULL, 0x8FD70757AF076CAFULL } }, /* XSUM_XXH128_testdata[1990] */\n    {  663, 0x9E3779B185EBCA8DULL, { 0x89254435FC56ED38ULL, 0xF793C737ECAC6C21ULL } }, /* XSUM_XXH128_testdata[1991] */\n    {  664, 0x0000000000000000ULL, { 0xEB047D893EECD24AULL, 0xE68F5A891F0CC80AULL } }, /* XSUM_XXH128_testdata[1992] */\n    {  664, 0x000000009E3779B1ULL, { 0x1629FED07A9E4CE6ULL, 0x16750E181BB04EC6ULL } }, /* XSUM_XXH128_testdata[1993] */\n    {  664, 0x9E3779B185EBCA8DULL, { 0x1FDDABDB0C5E4364ULL, 0xA559F832402226C8ULL } }, /* XSUM_XXH128_testdata[1994] */\n    {  665, 0x0000000000000000ULL, { 0xF0A35228227E28E3ULL, 0x56D5AB7296D0E7C2ULL } }, /* XSUM_XXH128_testdata[1995] */\n    {  665, 0x000000009E3779B1ULL, { 0x3344D3ED632A3574ULL, 0x8CB806FE4CB278D0ULL } }, /* XSUM_XXH128_testdata[1996] */\n    {  665, 0x9E3779B185EBCA8DULL, { 0x8B8F8139678108C4ULL, 0x9A331F28CB288542ULL } }, /* XSUM_XXH128_testdata[1997] */\n    {  666, 0x0000000000000000ULL, { 0x3D4AA64ECD0C04E8ULL, 0x54A6B886FBD7FD6BULL } }, /* XSUM_XXH128_testdata[1998] */\n    {  666, 0x000000009E3779B1ULL, { 0xF914A1408AAFB3F9ULL, 0xF0CEA39C5F0CFAC0ULL } }, /* XSUM_XXH128_testdata[1999] */\n    {  666, 0x9E3779B185EBCA8DULL, { 0x0ADCCABEAF0D5B84ULL, 0xEDF5CDDB45FE5F85ULL } }, /* XSUM_XXH128_testdata[2000] */\n    {  667, 0x0000000000000000ULL, { 0x744BE46CFA49B58CULL, 0x099C84151E85E529ULL } }, /* XSUM_XXH128_testdata[2001] */\n    {  667, 0x000000009E3779B1ULL, { 0x252904C60607B3C7ULL, 0xDB808E0075AF75F6ULL } }, /* XSUM_XXH128_testdata[2002] */\n    {  667, 0x9E3779B185EBCA8DULL, { 0x2B17BF1FEB2FC217ULL, 0x39DCF3EDBA6E1F92ULL } }, /* XSUM_XXH128_testdata[2003] */\n    {  668, 0x0000000000000000ULL, { 0x216603F52972D093ULL, 0xD3A4F007AFF6DFBEULL } }, /* XSUM_XXH128_testdata[2004] */\n    {  668, 0x000000009E3779B1ULL, { 0x45D3A40AA0522F64ULL, 0x96CE734521335157ULL } }, /* XSUM_XXH128_testdata[2005] */\n    {  668, 0x9E3779B185EBCA8DULL, { 0x59BA1CD43FFB532BULL, 0xF8C41DF41523C437ULL } }, /* XSUM_XXH128_testdata[2006] */\n    {  669, 0x0000000000000000ULL, { 0xECAB0778974C7ED3ULL, 0xF96BA2CFC7BA6B08ULL } }, /* XSUM_XXH128_testdata[2007] */\n    {  669, 0x000000009E3779B1ULL, { 0x24C4AF0FAB391C2DULL, 0x803AB622CFCE7D2FULL } }, /* XSUM_XXH128_testdata[2008] */\n    {  669, 0x9E3779B185EBCA8DULL, { 0xE835F55EC75A62FFULL, 0xCFC69E5E1340667FULL } }, /* XSUM_XXH128_testdata[2009] */\n    {  670, 0x0000000000000000ULL, { 0xD605CF61B5D3778CULL, 0x3BDD3A67EF7990D5ULL } }, /* XSUM_XXH128_testdata[2010] */\n    {  670, 0x000000009E3779B1ULL, { 0x2524762CC3CA1934ULL, 0xDB2F8659878696A5ULL } }, /* XSUM_XXH128_testdata[2011] */\n    {  670, 0x9E3779B185EBCA8DULL, { 0x07CFA96D6253A1CFULL, 0xCB2F91306A4DF69DULL } }, /* XSUM_XXH128_testdata[2012] */\n    {  671, 0x0000000000000000ULL, { 0x3894273709446570ULL, 0x9B96C6D8B03B55C9ULL } }, /* XSUM_XXH128_testdata[2013] */\n    {  671, 0x000000009E3779B1ULL, { 0x9D4392BBD2A7F585ULL, 0xDBC9833FE3F6A6DFULL } }, /* XSUM_XXH128_testdata[2014] */\n    {  671, 0x9E3779B185EBCA8DULL, { 0x2E0B4B534B7AB5B1ULL, 0xFD9973E261B1A0E6ULL } }, /* XSUM_XXH128_testdata[2015] */\n    {  672, 0x0000000000000000ULL, { 0x18A8759DD6C8A127ULL, 0xFEE23F64D4C73CB6ULL } }, /* XSUM_XXH128_testdata[2016] */\n    {  672, 0x000000009E3779B1ULL, { 0x7F1422E7B96C00FBULL, 0x8EDBCBA1D924A371ULL } }, /* XSUM_XXH128_testdata[2017] */\n    {  672, 0x9E3779B185EBCA8DULL, { 0xB8729212E63A2B15ULL, 0x7A8852642F7BAAADULL } }, /* XSUM_XXH128_testdata[2018] */\n    {  673, 0x0000000000000000ULL, { 0xB88636AB6CD1D60EULL, 0xC5FBD455709094F9ULL } }, /* XSUM_XXH128_testdata[2019] */\n    {  673, 0x000000009E3779B1ULL, { 0xD6692D6885A6F7BCULL, 0x3F2B28A9C86479CCULL } }, /* XSUM_XXH128_testdata[2020] */\n    {  673, 0x9E3779B185EBCA8DULL, { 0x4507642B43344489ULL, 0xAADD512883373EC2ULL } }, /* XSUM_XXH128_testdata[2021] */\n    {  674, 0x0000000000000000ULL, { 0x7F252CDA25AD432CULL, 0xA2288DFC58A1CF3DULL } }, /* XSUM_XXH128_testdata[2022] */\n    {  674, 0x000000009E3779B1ULL, { 0x60A346C398D14843ULL, 0x578795C0A3F4B9A0ULL } }, /* XSUM_XXH128_testdata[2023] */\n    {  674, 0x9E3779B185EBCA8DULL, { 0x254986B183AB63A9ULL, 0xBF2C9F02D9563A50ULL } }, /* XSUM_XXH128_testdata[2024] */\n    {  675, 0x0000000000000000ULL, { 0x2DDEA1F39436EC1EULL, 0x6DB166AA444FE559ULL } }, /* XSUM_XXH128_testdata[2025] */\n    {  675, 0x000000009E3779B1ULL, { 0x3F4120D41E58D4B7ULL, 0x6F1E9B7953AA6746ULL } }, /* XSUM_XXH128_testdata[2026] */\n    {  675, 0x9E3779B185EBCA8DULL, { 0x97AD2BFD2BF47E12ULL, 0x7741128620183CA3ULL } }, /* XSUM_XXH128_testdata[2027] */\n    {  676, 0x0000000000000000ULL, { 0x51A7EBC85A37A7D8ULL, 0x455C4C502533CBE2ULL } }, /* XSUM_XXH128_testdata[2028] */\n    {  676, 0x000000009E3779B1ULL, { 0xAF1D759A82980A4AULL, 0x2640603AD3479050ULL } }, /* XSUM_XXH128_testdata[2029] */\n    {  676, 0x9E3779B185EBCA8DULL, { 0xC7D27F5FDED0BDD7ULL, 0xA0678DBF5EE628D6ULL } }, /* XSUM_XXH128_testdata[2030] */\n    {  677, 0x0000000000000000ULL, { 0xCDEACACD82B7D79BULL, 0x7A8546308AC22CF7ULL } }, /* XSUM_XXH128_testdata[2031] */\n    {  677, 0x000000009E3779B1ULL, { 0x7453AC9A4BCC1E05ULL, 0x29102079C9DD0A08ULL } }, /* XSUM_XXH128_testdata[2032] */\n    {  677, 0x9E3779B185EBCA8DULL, { 0xBEFB40A4A0A42B54ULL, 0x9A4370801EA0A006ULL } }, /* XSUM_XXH128_testdata[2033] */\n    {  678, 0x0000000000000000ULL, { 0xCEB3E9F656FF4511ULL, 0xADDCEF9E1F8C2F5FULL } }, /* XSUM_XXH128_testdata[2034] */\n    {  678, 0x000000009E3779B1ULL, { 0x91930C996C07E6C2ULL, 0x2FB812D611B6BCDBULL } }, /* XSUM_XXH128_testdata[2035] */\n    {  678, 0x9E3779B185EBCA8DULL, { 0x0CD1CB4E9E9311E1ULL, 0x442FCA11F0623516ULL } }, /* XSUM_XXH128_testdata[2036] */\n    {  679, 0x0000000000000000ULL, { 0xB7CD9FA73E39ADB4ULL, 0x1689AE0F599A24BAULL } }, /* XSUM_XXH128_testdata[2037] */\n    {  679, 0x000000009E3779B1ULL, { 0xD275E55C632F2751ULL, 0x00148C8C774BC141ULL } }, /* XSUM_XXH128_testdata[2038] */\n    {  679, 0x9E3779B185EBCA8DULL, { 0x8BDE0F97D38CD1F1ULL, 0x80F3A157FD68AD5CULL } }, /* XSUM_XXH128_testdata[2039] */\n    {  680, 0x0000000000000000ULL, { 0xD46F82961FFA71E9ULL, 0x6CF67EC55286AA66ULL } }, /* XSUM_XXH128_testdata[2040] */\n    {  680, 0x000000009E3779B1ULL, { 0x02B28FB59EB2CB3BULL, 0xCCE1FDB59E6E2F13ULL } }, /* XSUM_XXH128_testdata[2041] */\n    {  680, 0x9E3779B185EBCA8DULL, { 0x5072064A59E7A4BCULL, 0xB28AD09BC500747DULL } }, /* XSUM_XXH128_testdata[2042] */\n    {  681, 0x0000000000000000ULL, { 0xE30C10E5DF46B182ULL, 0x231ABEB05D926CC1ULL } }, /* XSUM_XXH128_testdata[2043] */\n    {  681, 0x000000009E3779B1ULL, { 0x9EED5243D0AE0DCFULL, 0xD3D05627B2D1A7F5ULL } }, /* XSUM_XXH128_testdata[2044] */\n    {  681, 0x9E3779B185EBCA8DULL, { 0x9D00A687A910BAF2ULL, 0x1FB446150A4C3F92ULL } }, /* XSUM_XXH128_testdata[2045] */\n    {  682, 0x0000000000000000ULL, { 0x035D625495342A66ULL, 0xB332E9D798A2D8AEULL } }, /* XSUM_XXH128_testdata[2046] */\n    {  682, 0x000000009E3779B1ULL, { 0x20DE6B5E5490EE35ULL, 0x853F6AD6929AE82FULL } }, /* XSUM_XXH128_testdata[2047] */\n    {  682, 0x9E3779B185EBCA8DULL, { 0x9EDE8647E875F7CEULL, 0xB3FEC66CC474145AULL } }, /* XSUM_XXH128_testdata[2048] */\n    {  683, 0x0000000000000000ULL, { 0xEA3F1217472DC43AULL, 0xCFF9715C674ACD00ULL } }, /* XSUM_XXH128_testdata[2049] */\n    {  683, 0x000000009E3779B1ULL, { 0xE210854C805A8A3EULL, 0xE26A1A725977878FULL } }, /* XSUM_XXH128_testdata[2050] */\n    {  683, 0x9E3779B185EBCA8DULL, { 0x9F5B331577B6BFFDULL, 0xFF01DD0601A318E4ULL } }, /* XSUM_XXH128_testdata[2051] */\n    {  684, 0x0000000000000000ULL, { 0xA224A6AD2382D9E4ULL, 0xB9D335BECB242237ULL } }, /* XSUM_XXH128_testdata[2052] */\n    {  684, 0x000000009E3779B1ULL, { 0x78CDC0D6D2A91160ULL, 0x11C1B6CA909B31C6ULL } }, /* XSUM_XXH128_testdata[2053] */\n    {  684, 0x9E3779B185EBCA8DULL, { 0x157C90988CBE0040ULL, 0x07A66618145107E3ULL } }, /* XSUM_XXH128_testdata[2054] */\n    {  685, 0x0000000000000000ULL, { 0x09FE95398CF92B6EULL, 0x21ECA9928B124220ULL } }, /* XSUM_XXH128_testdata[2055] */\n    {  685, 0x000000009E3779B1ULL, { 0x75FE6CF2735E19D4ULL, 0x05CAFC0F525F8228ULL } }, /* XSUM_XXH128_testdata[2056] */\n    {  685, 0x9E3779B185EBCA8DULL, { 0x53469E830A47BC69ULL, 0x4A58B366629E9948ULL } }, /* XSUM_XXH128_testdata[2057] */\n    {  686, 0x0000000000000000ULL, { 0xD60979352D528294ULL, 0x3B4C55AE398BB6C7ULL } }, /* XSUM_XXH128_testdata[2058] */\n    {  686, 0x000000009E3779B1ULL, { 0x6A95E2070FFD345AULL, 0x8C7DE57C9C57E37CULL } }, /* XSUM_XXH128_testdata[2059] */\n    {  686, 0x9E3779B185EBCA8DULL, { 0x95750C1628B29CAAULL, 0xEAFAEFCDC36770EBULL } }, /* XSUM_XXH128_testdata[2060] */\n    {  687, 0x0000000000000000ULL, { 0x70030ABE1BCF260BULL, 0xACE3DBF291634AC7ULL } }, /* XSUM_XXH128_testdata[2061] */\n    {  687, 0x000000009E3779B1ULL, { 0xA93F7A13BEA875DEULL, 0x95D957695B1CE926ULL } }, /* XSUM_XXH128_testdata[2062] */\n    {  687, 0x9E3779B185EBCA8DULL, { 0xEBF7C42A6A29302CULL, 0x87EE8C0F11EFFCB9ULL } }, /* XSUM_XXH128_testdata[2063] */\n    {  688, 0x0000000000000000ULL, { 0x28018B42C285A3C0ULL, 0x02CC588B75375C0EULL } }, /* XSUM_XXH128_testdata[2064] */\n    {  688, 0x000000009E3779B1ULL, { 0x6A652B48EC2E5A6BULL, 0x3DEF5820ACC3C590ULL } }, /* XSUM_XXH128_testdata[2065] */\n    {  688, 0x9E3779B185EBCA8DULL, { 0x7C5B9E4E3A833CB7ULL, 0x3A3B952D0F8B7774ULL } }, /* XSUM_XXH128_testdata[2066] */\n    {  689, 0x0000000000000000ULL, { 0x751575E6F3102F35ULL, 0x60946FAA2BE89D5EULL } }, /* XSUM_XXH128_testdata[2067] */\n    {  689, 0x000000009E3779B1ULL, { 0x57900C3953D1445EULL, 0xFFFE8666DCA4EA6DULL } }, /* XSUM_XXH128_testdata[2068] */\n    {  689, 0x9E3779B185EBCA8DULL, { 0xFBED8D0AA15FD5F9ULL, 0x8011B489438A4157ULL } }, /* XSUM_XXH128_testdata[2069] */\n    {  690, 0x0000000000000000ULL, { 0x0760F9D20A8C0124ULL, 0x428F3442F686D691ULL } }, /* XSUM_XXH128_testdata[2070] */\n    {  690, 0x000000009E3779B1ULL, { 0x480672B0B16E021FULL, 0xE11D0741DA8698D9ULL } }, /* XSUM_XXH128_testdata[2071] */\n    {  690, 0x9E3779B185EBCA8DULL, { 0x54C40A8A572FE172ULL, 0x4F3C746AC912A31EULL } }, /* XSUM_XXH128_testdata[2072] */\n    {  691, 0x0000000000000000ULL, { 0xB43AB84B58366A46ULL, 0xC0AF0E370C4DC882ULL } }, /* XSUM_XXH128_testdata[2073] */\n    {  691, 0x000000009E3779B1ULL, { 0x769A4042BFF9A1CEULL, 0x00337065E6FC2331ULL } }, /* XSUM_XXH128_testdata[2074] */\n    {  691, 0x9E3779B185EBCA8DULL, { 0xF76B92FA4B5C1EFEULL, 0x215042B932C475B1ULL } }, /* XSUM_XXH128_testdata[2075] */\n    {  692, 0x0000000000000000ULL, { 0x89AD8A04565BF9DFULL, 0x7E4CC6EB1896D2EBULL } }, /* XSUM_XXH128_testdata[2076] */\n    {  692, 0x000000009E3779B1ULL, { 0x0F141FF75A4A71A0ULL, 0x1A2A84C0AE10F224ULL } }, /* XSUM_XXH128_testdata[2077] */\n    {  692, 0x9E3779B185EBCA8DULL, { 0xF7662E1884DD2DECULL, 0x458F05F5208F9DD8ULL } }, /* XSUM_XXH128_testdata[2078] */\n    {  693, 0x0000000000000000ULL, { 0x69B4173B5E5C2F1CULL, 0x912FF8BD7679BD0FULL } }, /* XSUM_XXH128_testdata[2079] */\n    {  693, 0x000000009E3779B1ULL, { 0x1CFE7F6E677FA9C0ULL, 0xD00618E29FB471A7ULL } }, /* XSUM_XXH128_testdata[2080] */\n    {  693, 0x9E3779B185EBCA8DULL, { 0xEC2A35776A1789A3ULL, 0xC48C464984BB0C3BULL } }, /* XSUM_XXH128_testdata[2081] */\n    {  694, 0x0000000000000000ULL, { 0x6A1A315A4ECC8C20ULL, 0xC0B1B272D687E074ULL } }, /* XSUM_XXH128_testdata[2082] */\n    {  694, 0x000000009E3779B1ULL, { 0x0046EE3E60486C3EULL, 0xB75EBF80DD381AE6ULL } }, /* XSUM_XXH128_testdata[2083] */\n    {  694, 0x9E3779B185EBCA8DULL, { 0x2BDA8F63EA106A05ULL, 0x98FA045492D8FC2EULL } }, /* XSUM_XXH128_testdata[2084] */\n    {  695, 0x0000000000000000ULL, { 0x211027A807ED2265ULL, 0xA36A9997A49242E8ULL } }, /* XSUM_XXH128_testdata[2085] */\n    {  695, 0x000000009E3779B1ULL, { 0xA3CF82F9B620C8C2ULL, 0xFE1C09232116A3FBULL } }, /* XSUM_XXH128_testdata[2086] */\n    {  695, 0x9E3779B185EBCA8DULL, { 0x0628573BF1549F0BULL, 0xC34BB308ACF931ECULL } }, /* XSUM_XXH128_testdata[2087] */\n    {  696, 0x0000000000000000ULL, { 0xEC70CA0661F26C32ULL, 0x10913571447A8E39ULL } }, /* XSUM_XXH128_testdata[2088] */\n    {  696, 0x000000009E3779B1ULL, { 0x37E37D35A6F97BD9ULL, 0x50CFEB9D097B5D97ULL } }, /* XSUM_XXH128_testdata[2089] */\n    {  696, 0x9E3779B185EBCA8DULL, { 0x041227AC12C6EF7BULL, 0xB8073BF7A9209731ULL } }, /* XSUM_XXH128_testdata[2090] */\n    {  697, 0x0000000000000000ULL, { 0x92FB87A7D3291AAAULL, 0x3A6705951EF53724ULL } }, /* XSUM_XXH128_testdata[2091] */\n    {  697, 0x000000009E3779B1ULL, { 0x7918CA3E61FCFA8DULL, 0xD71F140FE71E6423ULL } }, /* XSUM_XXH128_testdata[2092] */\n    {  697, 0x9E3779B185EBCA8DULL, { 0x654875EB06391799ULL, 0x4D8D5BB7CB9BDD45ULL } }, /* XSUM_XXH128_testdata[2093] */\n    {  698, 0x0000000000000000ULL, { 0x4C444C9791D6D5F0ULL, 0xB77E150ED4829D27ULL } }, /* XSUM_XXH128_testdata[2094] */\n    {  698, 0x000000009E3779B1ULL, { 0x2218C2075282358EULL, 0x118E5FAC0528A8A3ULL } }, /* XSUM_XXH128_testdata[2095] */\n    {  698, 0x9E3779B185EBCA8DULL, { 0xF1A5E46734BDC2A7ULL, 0x2AF7D0CE5948DBDDULL } }, /* XSUM_XXH128_testdata[2096] */\n    {  699, 0x0000000000000000ULL, { 0x3BC8DF475C4A531FULL, 0x8DA74D4813FC0422ULL } }, /* XSUM_XXH128_testdata[2097] */\n    {  699, 0x000000009E3779B1ULL, { 0xA091416DECF38A67ULL, 0x08757A58BF33FDD1ULL } }, /* XSUM_XXH128_testdata[2098] */\n    {  699, 0x9E3779B185EBCA8DULL, { 0x47773131B0B339A2ULL, 0x888D77A672A5E004ULL } }, /* XSUM_XXH128_testdata[2099] */\n    {  700, 0x0000000000000000ULL, { 0xFA90F040F92A7E71ULL, 0xC142808EAFD2DB2EULL } }, /* XSUM_XXH128_testdata[2100] */\n    {  700, 0x000000009E3779B1ULL, { 0xE2C2BEB3043A1B8FULL, 0x2E46BD00049D08C0ULL } }, /* XSUM_XXH128_testdata[2101] */\n    {  700, 0x9E3779B185EBCA8DULL, { 0x8E93D45B99763DE8ULL, 0xF17757B3F46B8A8EULL } }, /* XSUM_XXH128_testdata[2102] */\n    {  701, 0x0000000000000000ULL, { 0x22730147C96C49C1ULL, 0x93EFAA58C3022A72ULL } }, /* XSUM_XXH128_testdata[2103] */\n    {  701, 0x000000009E3779B1ULL, { 0x6E2FC15024E11867ULL, 0xA172B64558F66B03ULL } }, /* XSUM_XXH128_testdata[2104] */\n    {  701, 0x9E3779B185EBCA8DULL, { 0x07D7225D37BE56B6ULL, 0xA26D7FCC826C4910ULL } }, /* XSUM_XXH128_testdata[2105] */\n    {  702, 0x0000000000000000ULL, { 0x1C9A22BD51A0F347ULL, 0x42E0BCB008F6C555ULL } }, /* XSUM_XXH128_testdata[2106] */\n    {  702, 0x000000009E3779B1ULL, { 0xE24FC633063A49B8ULL, 0x3E72608C13BE0F81ULL } }, /* XSUM_XXH128_testdata[2107] */\n    {  702, 0x9E3779B185EBCA8DULL, { 0x3979E3CCB74F6B99ULL, 0x7040D97DE934954DULL } }, /* XSUM_XXH128_testdata[2108] */\n    {  703, 0x0000000000000000ULL, { 0x683E5E6D58E06485ULL, 0x1851A226211A91D9ULL } }, /* XSUM_XXH128_testdata[2109] */\n    {  703, 0x000000009E3779B1ULL, { 0x36BAD3DE821AAFA6ULL, 0x27294ABF8C5DF99BULL } }, /* XSUM_XXH128_testdata[2110] */\n    {  703, 0x9E3779B185EBCA8DULL, { 0x69E61408E3346451ULL, 0x6B34B6CD2EA1CE9CULL } }, /* XSUM_XXH128_testdata[2111] */\n    {  704, 0x0000000000000000ULL, { 0x53D0007023B75557ULL, 0x7FBCF9FCFDB7BAB4ULL } }, /* XSUM_XXH128_testdata[2112] */\n    {  704, 0x000000009E3779B1ULL, { 0x8406D415960B9A2AULL, 0x1187877FACD1829FULL } }, /* XSUM_XXH128_testdata[2113] */\n    {  704, 0x9E3779B185EBCA8DULL, { 0x2B2D21E690DC3E11ULL, 0x0A5EDF0A83FAA5B8ULL } }, /* XSUM_XXH128_testdata[2114] */\n    {  705, 0x0000000000000000ULL, { 0xBA8F3D7D77F20C8EULL, 0xF6B56ED27CD14407ULL } }, /* XSUM_XXH128_testdata[2115] */\n    {  705, 0x000000009E3779B1ULL, { 0xC56172646597C413ULL, 0xD0318E5F8B59E720ULL } }, /* XSUM_XXH128_testdata[2116] */\n    {  705, 0x9E3779B185EBCA8DULL, { 0x88D85FCD88755E7DULL, 0x5445D390DBF7A113ULL } }, /* XSUM_XXH128_testdata[2117] */\n    {  706, 0x0000000000000000ULL, { 0xA695E503AEE57121ULL, 0x790C3692355F5149ULL } }, /* XSUM_XXH128_testdata[2118] */\n    {  706, 0x000000009E3779B1ULL, { 0xB087FFEAE38D0520ULL, 0xF2E224905664BDC9ULL } }, /* XSUM_XXH128_testdata[2119] */\n    {  706, 0x9E3779B185EBCA8DULL, { 0x78DA7B809A94BCFEULL, 0x82FEBD84FE649216ULL } }, /* XSUM_XXH128_testdata[2120] */\n    {  707, 0x0000000000000000ULL, { 0x95433111932AF80EULL, 0x1948C46B0A77E047ULL } }, /* XSUM_XXH128_testdata[2121] */\n    {  707, 0x000000009E3779B1ULL, { 0x1117E578FA41375AULL, 0x958481D521BA040CULL } }, /* XSUM_XXH128_testdata[2122] */\n    {  707, 0x9E3779B185EBCA8DULL, { 0x9FA9DAABD6433C76ULL, 0x0A2EADC2D8DCB17CULL } }, /* XSUM_XXH128_testdata[2123] */\n    {  708, 0x0000000000000000ULL, { 0x497AF37942A68AAEULL, 0x752C497A23A9E8CBULL } }, /* XSUM_XXH128_testdata[2124] */\n    {  708, 0x000000009E3779B1ULL, { 0x634C90B1B8BFB228ULL, 0x1F97B711AEDAAD4AULL } }, /* XSUM_XXH128_testdata[2125] */\n    {  708, 0x9E3779B185EBCA8DULL, { 0xA3EEF16DFEBBE660ULL, 0x2FDFAD370C84AF51ULL } }, /* XSUM_XXH128_testdata[2126] */\n    {  709, 0x0000000000000000ULL, { 0xB361F79C5F877D03ULL, 0x7DB6A9B03E12A082ULL } }, /* XSUM_XXH128_testdata[2127] */\n    {  709, 0x000000009E3779B1ULL, { 0x03E95F5C5A8965DFULL, 0xAA38BD92A1B2A4F3ULL } }, /* XSUM_XXH128_testdata[2128] */\n    {  709, 0x9E3779B185EBCA8DULL, { 0xA7814A983164B859ULL, 0x1F4048648983192EULL } }, /* XSUM_XXH128_testdata[2129] */\n    {  710, 0x0000000000000000ULL, { 0xEF085BFFE73EF728ULL, 0xACB780D51D01AAEBULL } }, /* XSUM_XXH128_testdata[2130] */\n    {  710, 0x000000009E3779B1ULL, { 0x0B95827EFE4BA0E6ULL, 0x804E86D86E9225A3ULL } }, /* XSUM_XXH128_testdata[2131] */\n    {  710, 0x9E3779B185EBCA8DULL, { 0xBB3A16860A419A09ULL, 0x7FFD509D0FE2A3CDULL } }, /* XSUM_XXH128_testdata[2132] */\n    {  711, 0x0000000000000000ULL, { 0xE9CB41A0C8A5344BULL, 0x8D3352BFB4F01E3EULL } }, /* XSUM_XXH128_testdata[2133] */\n    {  711, 0x000000009E3779B1ULL, { 0x31039981C1D45212ULL, 0xA69743A375026FADULL } }, /* XSUM_XXH128_testdata[2134] */\n    {  711, 0x9E3779B185EBCA8DULL, { 0x3BF91CBBD165BF19ULL, 0xA8C6B5B9B31254CFULL } }, /* XSUM_XXH128_testdata[2135] */\n    {  712, 0x0000000000000000ULL, { 0x094B75D2DCC59B16ULL, 0xA85DED7E16E462D6ULL } }, /* XSUM_XXH128_testdata[2136] */\n    {  712, 0x000000009E3779B1ULL, { 0x513175A061549B47ULL, 0x352ED1D3AD795579ULL } }, /* XSUM_XXH128_testdata[2137] */\n    {  712, 0x9E3779B185EBCA8DULL, { 0xC953ADD65FC87D28ULL, 0xE2C0FBAFEB64A420ULL } }, /* XSUM_XXH128_testdata[2138] */\n    {  713, 0x0000000000000000ULL, { 0x687E011056B168DFULL, 0x3D98545A4CD30F48ULL } }, /* XSUM_XXH128_testdata[2139] */\n    {  713, 0x000000009E3779B1ULL, { 0x3901180DF597D12BULL, 0x697B0B1CEBA21800ULL } }, /* XSUM_XXH128_testdata[2140] */\n    {  713, 0x9E3779B185EBCA8DULL, { 0x7D0E2509C09FF864ULL, 0x679982CD07F8CDE2ULL } }, /* XSUM_XXH128_testdata[2141] */\n    {  714, 0x0000000000000000ULL, { 0x216776767DE94CCDULL, 0x4AEBD28BD92B4864ULL } }, /* XSUM_XXH128_testdata[2142] */\n    {  714, 0x000000009E3779B1ULL, { 0x787D614DA537DFE6ULL, 0x22CC1701CDCA984CULL } }, /* XSUM_XXH128_testdata[2143] */\n    {  714, 0x9E3779B185EBCA8DULL, { 0x7B3B463549FC1B73ULL, 0x15983C0B8AFF0EF4ULL } }, /* XSUM_XXH128_testdata[2144] */\n    {  715, 0x0000000000000000ULL, { 0x8FE72DFB0BBC68AAULL, 0x079D00E294770D05ULL } }, /* XSUM_XXH128_testdata[2145] */\n    {  715, 0x000000009E3779B1ULL, { 0x6CE4C83DBC020E60ULL, 0xC0EC2998087352A7ULL } }, /* XSUM_XXH128_testdata[2146] */\n    {  715, 0x9E3779B185EBCA8DULL, { 0x335630133E190194ULL, 0x29E899DE2F75B203ULL } }, /* XSUM_XXH128_testdata[2147] */\n    {  716, 0x0000000000000000ULL, { 0xC21F5B936CBB11A1ULL, 0xA24AA5D6063A24EAULL } }, /* XSUM_XXH128_testdata[2148] */\n    {  716, 0x000000009E3779B1ULL, { 0x75EE8C41982E95A3ULL, 0xDBC8DE02A7AE9EFEULL } }, /* XSUM_XXH128_testdata[2149] */\n    {  716, 0x9E3779B185EBCA8DULL, { 0x5F2ED15F53E8FA00ULL, 0x5AA8782567715708ULL } }, /* XSUM_XXH128_testdata[2150] */\n    {  717, 0x0000000000000000ULL, { 0xF59584C3D5568930ULL, 0x59C4E00AF597F5DAULL } }, /* XSUM_XXH128_testdata[2151] */\n    {  717, 0x000000009E3779B1ULL, { 0x4702B54E0606C5CBULL, 0x703605197B42E266ULL } }, /* XSUM_XXH128_testdata[2152] */\n    {  717, 0x9E3779B185EBCA8DULL, { 0x7D8EC8EC3A31B3F9ULL, 0x2A7F5ADD57446966ULL } }, /* XSUM_XXH128_testdata[2153] */\n    {  718, 0x0000000000000000ULL, { 0x02E45FA9460EEC70ULL, 0xE211D92234371C75ULL } }, /* XSUM_XXH128_testdata[2154] */\n    {  718, 0x000000009E3779B1ULL, { 0x767F0E53E4721FEFULL, 0x1D51BB329270D992ULL } }, /* XSUM_XXH128_testdata[2155] */\n    {  718, 0x9E3779B185EBCA8DULL, { 0x3C53E9098C60D822ULL, 0x46793D16A6A4BE25ULL } }, /* XSUM_XXH128_testdata[2156] */\n    {  719, 0x0000000000000000ULL, { 0x14B1E4306412BA03ULL, 0xC302FA8A0FF3F84DULL } }, /* XSUM_XXH128_testdata[2157] */\n    {  719, 0x000000009E3779B1ULL, { 0xD9222BB4438D53F6ULL, 0xE3B8ACA0EB90CF29ULL } }, /* XSUM_XXH128_testdata[2158] */\n    {  719, 0x9E3779B185EBCA8DULL, { 0xE8B262397EA54296ULL, 0xC00E8A58F66E4EAFULL } }, /* XSUM_XXH128_testdata[2159] */\n    {  720, 0x0000000000000000ULL, { 0xED83840F58017914ULL, 0x9A4A55F3696F735FULL } }, /* XSUM_XXH128_testdata[2160] */\n    {  720, 0x000000009E3779B1ULL, { 0xC5E7632FA87E02CDULL, 0xBA9E527EDC489927ULL } }, /* XSUM_XXH128_testdata[2161] */\n    {  720, 0x9E3779B185EBCA8DULL, { 0x85788A34A91DC62EULL, 0xB651C5DAE05D9452ULL } }, /* XSUM_XXH128_testdata[2162] */\n    {  721, 0x0000000000000000ULL, { 0x7EA1D2F1FF21A780ULL, 0x099303B97063C154ULL } }, /* XSUM_XXH128_testdata[2163] */\n    {  721, 0x000000009E3779B1ULL, { 0xA066E2339E40B577ULL, 0x371E64DB64294E38ULL } }, /* XSUM_XXH128_testdata[2164] */\n    {  721, 0x9E3779B185EBCA8DULL, { 0xA0F80C3300C72A56ULL, 0x1583B805326CCAA3ULL } }, /* XSUM_XXH128_testdata[2165] */\n    {  722, 0x0000000000000000ULL, { 0xEE7B0C11265C6606ULL, 0x2253E4A2928D8DACULL } }, /* XSUM_XXH128_testdata[2166] */\n    {  722, 0x000000009E3779B1ULL, { 0x6E3D7AA4888DD6EDULL, 0x190CCDE14F90CC62ULL } }, /* XSUM_XXH128_testdata[2167] */\n    {  722, 0x9E3779B185EBCA8DULL, { 0x6BCC91CE53889314ULL, 0xA48D4C03F83E66FAULL } }, /* XSUM_XXH128_testdata[2168] */\n    {  723, 0x0000000000000000ULL, { 0x4B0C248133CD0BD2ULL, 0x067B20165BA68F7DULL } }, /* XSUM_XXH128_testdata[2169] */\n    {  723, 0x000000009E3779B1ULL, { 0xBEF0E04AE7B792E4ULL, 0x01362A5C493B0F96ULL } }, /* XSUM_XXH128_testdata[2170] */\n    {  723, 0x9E3779B185EBCA8DULL, { 0x5CDA80B8B9BF45C6ULL, 0x35CCABEEEA7AFFF9ULL } }, /* XSUM_XXH128_testdata[2171] */\n    {  724, 0x0000000000000000ULL, { 0x16EC32EFED4168F5ULL, 0x352AEBE07214A14BULL } }, /* XSUM_XXH128_testdata[2172] */\n    {  724, 0x000000009E3779B1ULL, { 0x5A2AC45E941F928CULL, 0x9A7555E87C33B5D0ULL } }, /* XSUM_XXH128_testdata[2173] */\n    {  724, 0x9E3779B185EBCA8DULL, { 0xED554AA6AF697924ULL, 0x8D7475451C96ACFDULL } }, /* XSUM_XXH128_testdata[2174] */\n    {  725, 0x0000000000000000ULL, { 0xA406E09172F9EB13ULL, 0x9F243BCC6705E19BULL } }, /* XSUM_XXH128_testdata[2175] */\n    {  725, 0x000000009E3779B1ULL, { 0x99AC2AABE8FD1317ULL, 0x78D235D5925B2B8BULL } }, /* XSUM_XXH128_testdata[2176] */\n    {  725, 0x9E3779B185EBCA8DULL, { 0x4C6E9261B76B7E85ULL, 0xC40C6E0C886E9B15ULL } }, /* XSUM_XXH128_testdata[2177] */\n    {  726, 0x0000000000000000ULL, { 0x8CD030D1E9BC0811ULL, 0xC9DA8C8D8494856CULL } }, /* XSUM_XXH128_testdata[2178] */\n    {  726, 0x000000009E3779B1ULL, { 0x007A2E21A1574F8CULL, 0xABB9605179D690F8ULL } }, /* XSUM_XXH128_testdata[2179] */\n    {  726, 0x9E3779B185EBCA8DULL, { 0x4727049FFBF3E305ULL, 0x8517811971A77B6DULL } }, /* XSUM_XXH128_testdata[2180] */\n    {  727, 0x0000000000000000ULL, { 0xEC28AFAE764DD4DEULL, 0x1D44D5CFF929CCC9ULL } }, /* XSUM_XXH128_testdata[2181] */\n    {  727, 0x000000009E3779B1ULL, { 0x8599333D3C8CAAF5ULL, 0x5A39BE4B98A5C8E9ULL } }, /* XSUM_XXH128_testdata[2182] */\n    {  727, 0x9E3779B185EBCA8DULL, { 0xA4786C7FAE624BC1ULL, 0x64D8B94A5C516F0BULL } }, /* XSUM_XXH128_testdata[2183] */\n    {  728, 0x0000000000000000ULL, { 0xFEF967AEF2EDDC63ULL, 0xCB7474D9746FB403ULL } }, /* XSUM_XXH128_testdata[2184] */\n    {  728, 0x000000009E3779B1ULL, { 0x016C476F561626D7ULL, 0x3F317FBDA55CD42FULL } }, /* XSUM_XXH128_testdata[2185] */\n    {  728, 0x9E3779B185EBCA8DULL, { 0x1E193FA0B4F380EDULL, 0x0B9DC35440ACBBACULL } }, /* XSUM_XXH128_testdata[2186] */\n    {  729, 0x0000000000000000ULL, { 0x96ED3CD548BA4C5BULL, 0xD0388F6004F35FD1ULL } }, /* XSUM_XXH128_testdata[2187] */\n    {  729, 0x000000009E3779B1ULL, { 0x8546D0A257FD2280ULL, 0x66CA6BA272DE8B75ULL } }, /* XSUM_XXH128_testdata[2188] */\n    {  729, 0x9E3779B185EBCA8DULL, { 0x7F02264499CCCB02ULL, 0x9ED3BF09F357A6CAULL } }, /* XSUM_XXH128_testdata[2189] */\n    {  730, 0x0000000000000000ULL, { 0x1D81621D1F630AE2ULL, 0xB2E440F694E4B971ULL } }, /* XSUM_XXH128_testdata[2190] */\n    {  730, 0x000000009E3779B1ULL, { 0xD548BDCF8B4FC8B1ULL, 0x0A14A66779745EBBULL } }, /* XSUM_XXH128_testdata[2191] */\n    {  730, 0x9E3779B185EBCA8DULL, { 0x681572B9DBB3A148ULL, 0xD2A95B392F5FE430ULL } }, /* XSUM_XXH128_testdata[2192] */\n    {  731, 0x0000000000000000ULL, { 0x4C272DA966A67BBCULL, 0xB4D2A6F27E2947FAULL } }, /* XSUM_XXH128_testdata[2193] */\n    {  731, 0x000000009E3779B1ULL, { 0xB57E0EBAC1AAF5E5ULL, 0x167F2B12CA939A5CULL } }, /* XSUM_XXH128_testdata[2194] */\n    {  731, 0x9E3779B185EBCA8DULL, { 0xCB23E03A22F5BE9DULL, 0xE6313479C6CB32EFULL } }, /* XSUM_XXH128_testdata[2195] */\n    {  732, 0x0000000000000000ULL, { 0xDF2A8961367E9B90ULL, 0x56A5F86D020D5479ULL } }, /* XSUM_XXH128_testdata[2196] */\n    {  732, 0x000000009E3779B1ULL, { 0x4703C984A33C3F8AULL, 0x35BAB92AEA99B4B3ULL } }, /* XSUM_XXH128_testdata[2197] */\n    {  732, 0x9E3779B185EBCA8DULL, { 0x26C503C936FAD341ULL, 0x3EBAB4EA5146D42DULL } }, /* XSUM_XXH128_testdata[2198] */\n    {  733, 0x0000000000000000ULL, { 0x52ACA8E777AADC52ULL, 0xDA5D602EA5554B95ULL } }, /* XSUM_XXH128_testdata[2199] */\n    {  733, 0x000000009E3779B1ULL, { 0x2C11F4E9EF2A0E05ULL, 0x13C8548755BF28B7ULL } }, /* XSUM_XXH128_testdata[2200] */\n    {  733, 0x9E3779B185EBCA8DULL, { 0xAB4A761E1084A54FULL, 0x9E2B707620EB6FDDULL } }, /* XSUM_XXH128_testdata[2201] */\n    {  734, 0x0000000000000000ULL, { 0xC315DE7F85E665C2ULL, 0xA44E1CFBB613E7F1ULL } }, /* XSUM_XXH128_testdata[2202] */\n    {  734, 0x000000009E3779B1ULL, { 0x4784E00C0BAE188AULL, 0x185B2302986F4ED2ULL } }, /* XSUM_XXH128_testdata[2203] */\n    {  734, 0x9E3779B185EBCA8DULL, { 0x2EEF83B7CE5B97B7ULL, 0x67A2A8C8384D013CULL } }, /* XSUM_XXH128_testdata[2204] */\n    {  735, 0x0000000000000000ULL, { 0x696742B385A6E2BAULL, 0x8162DD86B67B090CULL } }, /* XSUM_XXH128_testdata[2205] */\n    {  735, 0x000000009E3779B1ULL, { 0xDF5984664443FBCAULL, 0x6F5258377D179419ULL } }, /* XSUM_XXH128_testdata[2206] */\n    {  735, 0x9E3779B185EBCA8DULL, { 0x4B696374DA543441ULL, 0x7FF3BF302A4384D6ULL } }, /* XSUM_XXH128_testdata[2207] */\n    {  736, 0x0000000000000000ULL, { 0xD7B4138320D23C84ULL, 0xE15CA4FE453E0C24ULL } }, /* XSUM_XXH128_testdata[2208] */\n    {  736, 0x000000009E3779B1ULL, { 0x91FF5CACA64D8EADULL, 0xE044E8514FE8BA92ULL } }, /* XSUM_XXH128_testdata[2209] */\n    {  736, 0x9E3779B185EBCA8DULL, { 0x32DF5CA9FD07BF2FULL, 0x9EB7F9CC4AC9F221ULL } }, /* XSUM_XXH128_testdata[2210] */\n    {  737, 0x0000000000000000ULL, { 0xDC92E52B55C9CA42ULL, 0x9A95A06C5BE285D8ULL } }, /* XSUM_XXH128_testdata[2211] */\n    {  737, 0x000000009E3779B1ULL, { 0xAA579D1774F51357ULL, 0x848F4FBD3E2F3A26ULL } }, /* XSUM_XXH128_testdata[2212] */\n    {  737, 0x9E3779B185EBCA8DULL, { 0x7BF34A46BE8900C8ULL, 0x61CA9CCACA0176BFULL } }, /* XSUM_XXH128_testdata[2213] */\n    {  738, 0x0000000000000000ULL, { 0x35F7C8B6785F65C6ULL, 0xD7666342BFE925EEULL } }, /* XSUM_XXH128_testdata[2214] */\n    {  738, 0x000000009E3779B1ULL, { 0x7CFE5AF4AFB8BBAFULL, 0x288DB18275165C22ULL } }, /* XSUM_XXH128_testdata[2215] */\n    {  738, 0x9E3779B185EBCA8DULL, { 0x3D0C9FB3364ED126ULL, 0x334D48B589080E1DULL } }, /* XSUM_XXH128_testdata[2216] */\n    {  739, 0x0000000000000000ULL, { 0x9F242314D208AD5FULL, 0x565DF096B27EC225ULL } }, /* XSUM_XXH128_testdata[2217] */\n    {  739, 0x000000009E3779B1ULL, { 0xCC1C1E14EF6061CBULL, 0xEA0D8C0D1B6E460DULL } }, /* XSUM_XXH128_testdata[2218] */\n    {  739, 0x9E3779B185EBCA8DULL, { 0x6484D8248103312AULL, 0x0E342BAC133D6D38ULL } }, /* XSUM_XXH128_testdata[2219] */\n    {  740, 0x0000000000000000ULL, { 0x08DE90C5C2B1ADCEULL, 0x7543E282A13BC058ULL } }, /* XSUM_XXH128_testdata[2220] */\n    {  740, 0x000000009E3779B1ULL, { 0xB591954B34979433ULL, 0x518DD08E39C1DAA2ULL } }, /* XSUM_XXH128_testdata[2221] */\n    {  740, 0x9E3779B185EBCA8DULL, { 0x07BFDFEB324E0895ULL, 0x5A0989C076FDCE1AULL } }, /* XSUM_XXH128_testdata[2222] */\n    {  741, 0x0000000000000000ULL, { 0x2C25953F4B532728ULL, 0xDBE04DA640AB889BULL } }, /* XSUM_XXH128_testdata[2223] */\n    {  741, 0x000000009E3779B1ULL, { 0x6F0235BBC8526F91ULL, 0x0F3F90FF9251BDE4ULL } }, /* XSUM_XXH128_testdata[2224] */\n    {  741, 0x9E3779B185EBCA8DULL, { 0xFB971F5525E36290ULL, 0xCE68417FA95F0C19ULL } }, /* XSUM_XXH128_testdata[2225] */\n    {  742, 0x0000000000000000ULL, { 0xACB071F7BD83FBBDULL, 0x13793E62CB5D8D41ULL } }, /* XSUM_XXH128_testdata[2226] */\n    {  742, 0x000000009E3779B1ULL, { 0x753E70A707A265F1ULL, 0x1A573F20ECAD1A2EULL } }, /* XSUM_XXH128_testdata[2227] */\n    {  742, 0x9E3779B185EBCA8DULL, { 0x1713A948F45BF88FULL, 0xFABD76B1E61507AFULL } }, /* XSUM_XXH128_testdata[2228] */\n    {  743, 0x0000000000000000ULL, { 0xA5DF5074C7438126ULL, 0xADDDB9BE56606777ULL } }, /* XSUM_XXH128_testdata[2229] */\n    {  743, 0x000000009E3779B1ULL, { 0x9375F4C3CBA5E895ULL, 0xAEA16F21036606FFULL } }, /* XSUM_XXH128_testdata[2230] */\n    {  743, 0x9E3779B185EBCA8DULL, { 0xF250DDBB481132FAULL, 0x8ABE8DB0D4E5A742ULL } }, /* XSUM_XXH128_testdata[2231] */\n    {  744, 0x0000000000000000ULL, { 0x23853C8A2E481D04ULL, 0xB40D18279587C169ULL } }, /* XSUM_XXH128_testdata[2232] */\n    {  744, 0x000000009E3779B1ULL, { 0xD05DAB9A39B2E0ECULL, 0xF0FEC7C2A3D8F472ULL } }, /* XSUM_XXH128_testdata[2233] */\n    {  744, 0x9E3779B185EBCA8DULL, { 0x6FED3CD988EA71E7ULL, 0xCD9449AADF65ECFAULL } }, /* XSUM_XXH128_testdata[2234] */\n    {  745, 0x0000000000000000ULL, { 0xD53322CC8C5F41F9ULL, 0x97C2B67458AF7C27ULL } }, /* XSUM_XXH128_testdata[2235] */\n    {  745, 0x000000009E3779B1ULL, { 0x3C32523E3346DCF6ULL, 0xF7E6FFACF77DF222ULL } }, /* XSUM_XXH128_testdata[2236] */\n    {  745, 0x9E3779B185EBCA8DULL, { 0xD50525326BE0114EULL, 0x0A431C464E56AB55ULL } }, /* XSUM_XXH128_testdata[2237] */\n    {  746, 0x0000000000000000ULL, { 0x34B8A165AAE2C20AULL, 0xC1896DAE6C8D2C5EULL } }, /* XSUM_XXH128_testdata[2238] */\n    {  746, 0x000000009E3779B1ULL, { 0x627C9D67C5A0E75BULL, 0x0831A97692F9EBD5ULL } }, /* XSUM_XXH128_testdata[2239] */\n    {  746, 0x9E3779B185EBCA8DULL, { 0x619061F495722A00ULL, 0x781ABB1686233954ULL } }, /* XSUM_XXH128_testdata[2240] */\n    {  747, 0x0000000000000000ULL, { 0x12741F5AFC125FF4ULL, 0xBB37495DDA76BF2AULL } }, /* XSUM_XXH128_testdata[2241] */\n    {  747, 0x000000009E3779B1ULL, { 0x36C91CB390986D1BULL, 0x9A8587572BE071FCULL } }, /* XSUM_XXH128_testdata[2242] */\n    {  747, 0x9E3779B185EBCA8DULL, { 0x9D160E881BB7E460ULL, 0x9338138FE257BD47ULL } }, /* XSUM_XXH128_testdata[2243] */\n    {  748, 0x0000000000000000ULL, { 0xDFD5F9C3C7FAADE8ULL, 0x2BC83E500A3610FAULL } }, /* XSUM_XXH128_testdata[2244] */\n    {  748, 0x000000009E3779B1ULL, { 0x96DEBE77DC458BA5ULL, 0xF32A5C82E1FA0205ULL } }, /* XSUM_XXH128_testdata[2245] */\n    {  748, 0x9E3779B185EBCA8DULL, { 0xEC730BDE394EADBFULL, 0xF2E4DA13B00DAB25ULL } }, /* XSUM_XXH128_testdata[2246] */\n    {  749, 0x0000000000000000ULL, { 0xA2FDB44EBA93CABEULL, 0x0CD684DA0A3C72C7ULL } }, /* XSUM_XXH128_testdata[2247] */\n    {  749, 0x000000009E3779B1ULL, { 0x7B073E8D758BBB59ULL, 0x4005E7BA04D243A9ULL } }, /* XSUM_XXH128_testdata[2248] */\n    {  749, 0x9E3779B185EBCA8DULL, { 0xF5BD8056B5542799ULL, 0x8029E99842BC5B5CULL } }, /* XSUM_XXH128_testdata[2249] */\n    {  750, 0x0000000000000000ULL, { 0x2FE3032178562F37ULL, 0xCAC824FD85C7DA0BULL } }, /* XSUM_XXH128_testdata[2250] */\n    {  750, 0x000000009E3779B1ULL, { 0x4894E6D4D48D6C6AULL, 0x80BD7BD2170AF539ULL } }, /* XSUM_XXH128_testdata[2251] */\n    {  750, 0x9E3779B185EBCA8DULL, { 0x5FCC94427E030C74ULL, 0xB0A4555542C04EAAULL } }, /* XSUM_XXH128_testdata[2252] */\n    {  751, 0x0000000000000000ULL, { 0x7805A2A5D1955490ULL, 0x52A577D7043B64A5ULL } }, /* XSUM_XXH128_testdata[2253] */\n    {  751, 0x000000009E3779B1ULL, { 0x1DE49390B9DD9EF2ULL, 0x1CE036B490C8CF97ULL } }, /* XSUM_XXH128_testdata[2254] */\n    {  751, 0x9E3779B185EBCA8DULL, { 0x3E7AD96124FF9130ULL, 0x9BCE048A2D0C0F1DULL } }, /* XSUM_XXH128_testdata[2255] */\n    {  752, 0x0000000000000000ULL, { 0xF712ADB98B36CB0CULL, 0x0DAEF9A5713A24B2ULL } }, /* XSUM_XXH128_testdata[2256] */\n    {  752, 0x000000009E3779B1ULL, { 0x2B7B289C1FF4FCD7ULL, 0x26D976BD8D17B9FAULL } }, /* XSUM_XXH128_testdata[2257] */\n    {  752, 0x9E3779B185EBCA8DULL, { 0xD21680D87EA3DC86ULL, 0x14396E4C59E6A6EEULL } }, /* XSUM_XXH128_testdata[2258] */\n    {  753, 0x0000000000000000ULL, { 0x95A99222BCDD6791ULL, 0xB90F71E5D840A1EBULL } }, /* XSUM_XXH128_testdata[2259] */\n    {  753, 0x000000009E3779B1ULL, { 0xE201E44421A16BE8ULL, 0x59978B057B73683CULL } }, /* XSUM_XXH128_testdata[2260] */\n    {  753, 0x9E3779B185EBCA8DULL, { 0xC86EDAB23BFFDC95ULL, 0x5A1B6E4BAD48E7F7ULL } }, /* XSUM_XXH128_testdata[2261] */\n    {  754, 0x0000000000000000ULL, { 0x607E9BA59C234233ULL, 0x9F3F22A13108F952ULL } }, /* XSUM_XXH128_testdata[2262] */\n    {  754, 0x000000009E3779B1ULL, { 0x9E415E1F862289E4ULL, 0xB4D443A455379537ULL } }, /* XSUM_XXH128_testdata[2263] */\n    {  754, 0x9E3779B185EBCA8DULL, { 0x50B63817B74F84EBULL, 0x2451D49CF3B180F1ULL } }, /* XSUM_XXH128_testdata[2264] */\n    {  755, 0x0000000000000000ULL, { 0x38A1FCEADBD7C9B1ULL, 0x92DE3F9B265EFB95ULL } }, /* XSUM_XXH128_testdata[2265] */\n    {  755, 0x000000009E3779B1ULL, { 0xE5D08B9208BB2773ULL, 0x4EB7F2E987FF04F2ULL } }, /* XSUM_XXH128_testdata[2266] */\n    {  755, 0x9E3779B185EBCA8DULL, { 0x159E0FF2771D4013ULL, 0x2CF784BEB371CA92ULL } }, /* XSUM_XXH128_testdata[2267] */\n    {  756, 0x0000000000000000ULL, { 0x78C7F2E16DB1BAF2ULL, 0x0AB77C4E7D089384ULL } }, /* XSUM_XXH128_testdata[2268] */\n    {  756, 0x000000009E3779B1ULL, { 0x8E7622E19D1C8EC3ULL, 0xD7A1BDF46FC8A51FULL } }, /* XSUM_XXH128_testdata[2269] */\n    {  756, 0x9E3779B185EBCA8DULL, { 0x11A054CB984490EEULL, 0x20E7FF258BCA5C35ULL } }, /* XSUM_XXH128_testdata[2270] */\n    {  757, 0x0000000000000000ULL, { 0xCB66A77F29B9F0E6ULL, 0xD404E8B1D8791642ULL } }, /* XSUM_XXH128_testdata[2271] */\n    {  757, 0x000000009E3779B1ULL, { 0xF1FE543C391F64EBULL, 0xDD6E8E2D6363C435ULL } }, /* XSUM_XXH128_testdata[2272] */\n    {  757, 0x9E3779B185EBCA8DULL, { 0xE7F79D2B525A67BDULL, 0xF5B4DCD6D82EEEC0ULL } }, /* XSUM_XXH128_testdata[2273] */\n    {  758, 0x0000000000000000ULL, { 0xDFBE16056C872D93ULL, 0x1AA645B1DBE60D7FULL } }, /* XSUM_XXH128_testdata[2274] */\n    {  758, 0x000000009E3779B1ULL, { 0x6351D1A1A45CEBBBULL, 0x5D7610D99F5D772EULL } }, /* XSUM_XXH128_testdata[2275] */\n    {  758, 0x9E3779B185EBCA8DULL, { 0x9766A2F001002D4CULL, 0x66CFA157DAB6F989ULL } }, /* XSUM_XXH128_testdata[2276] */\n    {  759, 0x0000000000000000ULL, { 0xAB6F81845F5D0F86ULL, 0x077F222B47A43132ULL } }, /* XSUM_XXH128_testdata[2277] */\n    {  759, 0x000000009E3779B1ULL, { 0x5DB35C25F592F68DULL, 0xB0EAF76852C59FF9ULL } }, /* XSUM_XXH128_testdata[2278] */\n    {  759, 0x9E3779B185EBCA8DULL, { 0x382DEEBBAF4F431EULL, 0x3090792539905591ULL } }, /* XSUM_XXH128_testdata[2279] */\n    {  760, 0x0000000000000000ULL, { 0x10C0A37BDCCD259AULL, 0x156A16EFDFA5FE28ULL } }, /* XSUM_XXH128_testdata[2280] */\n    {  760, 0x000000009E3779B1ULL, { 0xF814BAC4D8E94E81ULL, 0x2052AB8FA64F56A6ULL } }, /* XSUM_XXH128_testdata[2281] */\n    {  760, 0x9E3779B185EBCA8DULL, { 0xDD9BDF9CF4E59946ULL, 0x6F041A7B95A2913BULL } }, /* XSUM_XXH128_testdata[2282] */\n    {  761, 0x0000000000000000ULL, { 0xF7CEBE29B198FD30ULL, 0xEAE540D048E4B85CULL } }, /* XSUM_XXH128_testdata[2283] */\n    {  761, 0x000000009E3779B1ULL, { 0x651BC80E8DC4EDE4ULL, 0xADCC066258634D10ULL } }, /* XSUM_XXH128_testdata[2284] */\n    {  761, 0x9E3779B185EBCA8DULL, { 0xA869E57FDB1C8060ULL, 0x4B8E4B4B4F14B116ULL } }, /* XSUM_XXH128_testdata[2285] */\n    {  762, 0x0000000000000000ULL, { 0x2907C6DB629AAD4EULL, 0x8DA57FE88CE7E051ULL } }, /* XSUM_XXH128_testdata[2286] */\n    {  762, 0x000000009E3779B1ULL, { 0xC6D9C93A0B1186E8ULL, 0x8ED33D65F250CF54ULL } }, /* XSUM_XXH128_testdata[2287] */\n    {  762, 0x9E3779B185EBCA8DULL, { 0x76AED4086B1D9AE8ULL, 0xE5C1BE46A2AFAB39ULL } }, /* XSUM_XXH128_testdata[2288] */\n    {  763, 0x0000000000000000ULL, { 0x89384DD94BF93B2CULL, 0x8C729ADADE738DB1ULL } }, /* XSUM_XXH128_testdata[2289] */\n    {  763, 0x000000009E3779B1ULL, { 0x7B26E9AE2CD85C9DULL, 0x310F31FFB827B572ULL } }, /* XSUM_XXH128_testdata[2290] */\n    {  763, 0x9E3779B185EBCA8DULL, { 0x48DC2511E0721282ULL, 0xED8CBBED7C81D8A0ULL } }, /* XSUM_XXH128_testdata[2291] */\n    {  764, 0x0000000000000000ULL, { 0x6C584E8B8F0D56C5ULL, 0x0DB308C9F647A09FULL } }, /* XSUM_XXH128_testdata[2292] */\n    {  764, 0x000000009E3779B1ULL, { 0x2443018EF6EC44F1ULL, 0xA735570BDCFB84B3ULL } }, /* XSUM_XXH128_testdata[2293] */\n    {  764, 0x9E3779B185EBCA8DULL, { 0xB235C4DEC2AC7B59ULL, 0x66AD10F50DDDE597ULL } }, /* XSUM_XXH128_testdata[2294] */\n    {  765, 0x0000000000000000ULL, { 0x9D329F204D5B9C7AULL, 0xA743751903AA2675ULL } }, /* XSUM_XXH128_testdata[2295] */\n    {  765, 0x000000009E3779B1ULL, { 0x36A8343A75D46F0CULL, 0x97991BFCBAFCCD96ULL } }, /* XSUM_XXH128_testdata[2296] */\n    {  765, 0x9E3779B185EBCA8DULL, { 0x60A6B3319C706215ULL, 0x72BA3E8792FA168AULL } }, /* XSUM_XXH128_testdata[2297] */\n    {  766, 0x0000000000000000ULL, { 0x526A03E0F4B121FDULL, 0x883DB306AD7EB6B6ULL } }, /* XSUM_XXH128_testdata[2298] */\n    {  766, 0x000000009E3779B1ULL, { 0x7166BF6810866778ULL, 0x3A930871CAF9487CULL } }, /* XSUM_XXH128_testdata[2299] */\n    {  766, 0x9E3779B185EBCA8DULL, { 0x6B18AC32399D2335ULL, 0xEF6AF5D43424E398ULL } }, /* XSUM_XXH128_testdata[2300] */\n    {  767, 0x0000000000000000ULL, { 0xA8D2D803378C6FC2ULL, 0x325E57A561D74FDBULL } }, /* XSUM_XXH128_testdata[2301] */\n    {  767, 0x000000009E3779B1ULL, { 0x1697C607FC90A09DULL, 0xA2A38F31C1E6B30DULL } }, /* XSUM_XXH128_testdata[2302] */\n    {  767, 0x9E3779B185EBCA8DULL, { 0x8CFC6C461EF19D9AULL, 0xBB2E7582BA2143D0ULL } }, /* XSUM_XXH128_testdata[2303] */\n    {  768, 0x0000000000000000ULL, { 0x6CBE42E950F7426BULL, 0x6D0E38C5F77DEBC9ULL } }, /* XSUM_XXH128_testdata[2304] */\n    {  768, 0x000000009E3779B1ULL, { 0x54F84A8AE09AD794ULL, 0x7802003617F84DB1ULL } }, /* XSUM_XXH128_testdata[2305] */\n    {  768, 0x9E3779B185EBCA8DULL, { 0x641FB8CA9341034CULL, 0x5DDDEE3817DD7283ULL } }, /* XSUM_XXH128_testdata[2306] */\n    {  769, 0x0000000000000000ULL, { 0x32302CBB53D45781ULL, 0x4C7F459C022F1733ULL } }, /* XSUM_XXH128_testdata[2307] */\n    {  769, 0x000000009E3779B1ULL, { 0x10EC377E1BB64F84ULL, 0xDA189E5FD31237FDULL } }, /* XSUM_XXH128_testdata[2308] */\n    {  769, 0x9E3779B185EBCA8DULL, { 0x46F363023665B8E2ULL, 0x36566EB7B10E2587ULL } }, /* XSUM_XXH128_testdata[2309] */\n    {  770, 0x0000000000000000ULL, { 0xA7C29FBEB87D7D05ULL, 0x28D18B0655B7E48FULL } }, /* XSUM_XXH128_testdata[2310] */\n    {  770, 0x000000009E3779B1ULL, { 0xDA490288B14AA423ULL, 0x136E7860C9F89739ULL } }, /* XSUM_XXH128_testdata[2311] */\n    {  770, 0x9E3779B185EBCA8DULL, { 0x9EBEC5CF3343DCB9ULL, 0xE016D3A3E71E6D1AULL } }, /* XSUM_XXH128_testdata[2312] */\n    {  771, 0x0000000000000000ULL, { 0xA2B5189BB35568A3ULL, 0xFEE65CA3A659F28FULL } }, /* XSUM_XXH128_testdata[2313] */\n    {  771, 0x000000009E3779B1ULL, { 0x025D5789919A6003ULL, 0x9B75062080E290B5ULL } }, /* XSUM_XXH128_testdata[2314] */\n    {  771, 0x9E3779B185EBCA8DULL, { 0xA02674257CE7D16FULL, 0xF85736B6C827F421ULL } }, /* XSUM_XXH128_testdata[2315] */\n    {  772, 0x0000000000000000ULL, { 0xFD17411AF7196623ULL, 0x9AA54F1DE6F11F27ULL } }, /* XSUM_XXH128_testdata[2316] */\n    {  772, 0x000000009E3779B1ULL, { 0xBC9E58DF7EEEE310ULL, 0x2668FDF08AF121CBULL } }, /* XSUM_XXH128_testdata[2317] */\n    {  772, 0x9E3779B185EBCA8DULL, { 0x387E340E383DF06CULL, 0xDFEF203A35A41A98ULL } }, /* XSUM_XXH128_testdata[2318] */\n    {  773, 0x0000000000000000ULL, { 0xF55C3823F812FC79ULL, 0x40BB9FC22F7EE513ULL } }, /* XSUM_XXH128_testdata[2319] */\n    {  773, 0x000000009E3779B1ULL, { 0x8F9C16E33BD7B0A4ULL, 0xE2E4FD395A7DFD26ULL } }, /* XSUM_XXH128_testdata[2320] */\n    {  773, 0x9E3779B185EBCA8DULL, { 0x4925C59F27F294A6ULL, 0x173496ED367EDD8CULL } }, /* XSUM_XXH128_testdata[2321] */\n    {  774, 0x0000000000000000ULL, { 0xB6CA494D3B2F1B1CULL, 0x99946A92D6C32D45ULL } }, /* XSUM_XXH128_testdata[2322] */\n    {  774, 0x000000009E3779B1ULL, { 0x7CB5AEF03D179DE9ULL, 0x7A08598C56F5B747ULL } }, /* XSUM_XXH128_testdata[2323] */\n    {  774, 0x9E3779B185EBCA8DULL, { 0xF81CD4D37406771DULL, 0x85D18A177BBBCB6EULL } }, /* XSUM_XXH128_testdata[2324] */\n    {  775, 0x0000000000000000ULL, { 0xECC23F92B06220D0ULL, 0x106A8D534BE26628ULL } }, /* XSUM_XXH128_testdata[2325] */\n    {  775, 0x000000009E3779B1ULL, { 0x0023691C1FE9122EULL, 0xDA4FC4C4B7AAF6D5ULL } }, /* XSUM_XXH128_testdata[2326] */\n    {  775, 0x9E3779B185EBCA8DULL, { 0x3948E4E207032161ULL, 0x238A9B1CF28F97D5ULL } }, /* XSUM_XXH128_testdata[2327] */\n    {  776, 0x0000000000000000ULL, { 0x0221379DCD811436ULL, 0xA5E434376F1111BAULL } }, /* XSUM_XXH128_testdata[2328] */\n    {  776, 0x000000009E3779B1ULL, { 0x5E07C338B071EAE7ULL, 0xDC55034017C35D52ULL } }, /* XSUM_XXH128_testdata[2329] */\n    {  776, 0x9E3779B185EBCA8DULL, { 0x043D961C4F99EB6CULL, 0x867384107109AD5CULL } }, /* XSUM_XXH128_testdata[2330] */\n    {  777, 0x0000000000000000ULL, { 0x26496DD8CABB9F7CULL, 0x52EA652B4E3E0F83ULL } }, /* XSUM_XXH128_testdata[2331] */\n    {  777, 0x000000009E3779B1ULL, { 0x6F43DCE70578AEDDULL, 0x87021C40A28B7ACFULL } }, /* XSUM_XXH128_testdata[2332] */\n    {  777, 0x9E3779B185EBCA8DULL, { 0x2EF9ADA4949E4655ULL, 0x3E1EC612490127A1ULL } }, /* XSUM_XXH128_testdata[2333] */\n    {  778, 0x0000000000000000ULL, { 0xA7CEE75345E7EDD8ULL, 0x06311885E0EF7677ULL } }, /* XSUM_XXH128_testdata[2334] */\n    {  778, 0x000000009E3779B1ULL, { 0x7C3CC2F6B7314554ULL, 0x0FAB200922D8ACB9ULL } }, /* XSUM_XXH128_testdata[2335] */\n    {  778, 0x9E3779B185EBCA8DULL, { 0xC2AB2FAB6FB83FAEULL, 0xCE46002B6D5A18AEULL } }, /* XSUM_XXH128_testdata[2336] */\n    {  779, 0x0000000000000000ULL, { 0x696C9B045F8B19CCULL, 0xABD3DFA53050F832ULL } }, /* XSUM_XXH128_testdata[2337] */\n    {  779, 0x000000009E3779B1ULL, { 0x36FC2B5EAF0A2F23ULL, 0x33164E08BCC75C74ULL } }, /* XSUM_XXH128_testdata[2338] */\n    {  779, 0x9E3779B185EBCA8DULL, { 0x2C184694FC2E8D5FULL, 0x8C8DC670F0B408A6ULL } }, /* XSUM_XXH128_testdata[2339] */\n    {  780, 0x0000000000000000ULL, { 0x9BA5278D85378C52ULL, 0x21E47F04AD7E83F1ULL } }, /* XSUM_XXH128_testdata[2340] */\n    {  780, 0x000000009E3779B1ULL, { 0x5205BA7FCCC787D8ULL, 0x27BBA803FFEC087FULL } }, /* XSUM_XXH128_testdata[2341] */\n    {  780, 0x9E3779B185EBCA8DULL, { 0xEB6CBC00BCA659D7ULL, 0x04F35DB669E2489CULL } }, /* XSUM_XXH128_testdata[2342] */\n    {  781, 0x0000000000000000ULL, { 0xF9184209248E82E3ULL, 0x2697CD52AA7E2EAEULL } }, /* XSUM_XXH128_testdata[2343] */\n    {  781, 0x000000009E3779B1ULL, { 0xCC5E168618F9F9B1ULL, 0x87C0DC0A25B97CF6ULL } }, /* XSUM_XXH128_testdata[2344] */\n    {  781, 0x9E3779B185EBCA8DULL, { 0x5F4A4AA5AEFE2931ULL, 0x595B9D6C28C3F7AAULL } }, /* XSUM_XXH128_testdata[2345] */\n    {  782, 0x0000000000000000ULL, { 0x6B7FC3325D489F56ULL, 0xD6DF1132E8929C6FULL } }, /* XSUM_XXH128_testdata[2346] */\n    {  782, 0x000000009E3779B1ULL, { 0xA2F1C79B33B8E31DULL, 0x5F96F2B24D929B18ULL } }, /* XSUM_XXH128_testdata[2347] */\n    {  782, 0x9E3779B185EBCA8DULL, { 0xDDBFA453013EDC74ULL, 0xCAFCB5BFC150D5D7ULL } }, /* XSUM_XXH128_testdata[2348] */\n    {  783, 0x0000000000000000ULL, { 0x1774F59A1F9C5338ULL, 0xA13CB4ECD3E41FA0ULL } }, /* XSUM_XXH128_testdata[2349] */\n    {  783, 0x000000009E3779B1ULL, { 0xEED3BDAF87389E56ULL, 0x407A2DA864CDCE9CULL } }, /* XSUM_XXH128_testdata[2350] */\n    {  783, 0x9E3779B185EBCA8DULL, { 0x0F11F6B0AFA9CC8DULL, 0xDD49EEF3E43CB473ULL } }, /* XSUM_XXH128_testdata[2351] */\n    {  784, 0x0000000000000000ULL, { 0xB57CCEA58F2CC788ULL, 0x446A85C52E32B47EULL } }, /* XSUM_XXH128_testdata[2352] */\n    {  784, 0x000000009E3779B1ULL, { 0x7147D8B6039B2FEFULL, 0xA3C850F9419D28D3ULL } }, /* XSUM_XXH128_testdata[2353] */\n    {  784, 0x9E3779B185EBCA8DULL, { 0xD43B4680051F86E8ULL, 0x4998003422AAC518ULL } }, /* XSUM_XXH128_testdata[2354] */\n    {  785, 0x0000000000000000ULL, { 0x00DC4E5CE55E70E8ULL, 0xD420F3C9201DE32FULL } }, /* XSUM_XXH128_testdata[2355] */\n    {  785, 0x000000009E3779B1ULL, { 0x31758D81997CAFA0ULL, 0x604869ADCCF08EB9ULL } }, /* XSUM_XXH128_testdata[2356] */\n    {  785, 0x9E3779B185EBCA8DULL, { 0x909F2A3E6FB89892ULL, 0x0F3D404C60B8962FULL } }, /* XSUM_XXH128_testdata[2357] */\n    {  786, 0x0000000000000000ULL, { 0xE06ABD80AAB54EBCULL, 0x18A33A935DBB197FULL } }, /* XSUM_XXH128_testdata[2358] */\n    {  786, 0x000000009E3779B1ULL, { 0x1B3B7A52D6E2A72AULL, 0xA293C725E08EF1F2ULL } }, /* XSUM_XXH128_testdata[2359] */\n    {  786, 0x9E3779B185EBCA8DULL, { 0xDBD9B4BD30764A2AULL, 0x94CED9783937DFDBULL } }, /* XSUM_XXH128_testdata[2360] */\n    {  787, 0x0000000000000000ULL, { 0x06FC7F68ACEA72D7ULL, 0xAE0B08BD01A3BAF1ULL } }, /* XSUM_XXH128_testdata[2361] */\n    {  787, 0x000000009E3779B1ULL, { 0x76919F058C564592ULL, 0x9EDC9270D39710DBULL } }, /* XSUM_XXH128_testdata[2362] */\n    {  787, 0x9E3779B185EBCA8DULL, { 0xA59443084988D4BBULL, 0xBA31A1ABB4807734ULL } }, /* XSUM_XXH128_testdata[2363] */\n    {  788, 0x0000000000000000ULL, { 0x20C615B56B541F1EULL, 0x15FC9FAF0398C199ULL } }, /* XSUM_XXH128_testdata[2364] */\n    {  788, 0x000000009E3779B1ULL, { 0x050E042DBEF7C7C5ULL, 0x24B40EA453391880ULL } }, /* XSUM_XXH128_testdata[2365] */\n    {  788, 0x9E3779B185EBCA8DULL, { 0x0A131B8A3F37A8B5ULL, 0xE68113FE11559947ULL } }, /* XSUM_XXH128_testdata[2366] */\n    {  789, 0x0000000000000000ULL, { 0x8A4F76B84730D76AULL, 0x5B52E72079C7ABCAULL } }, /* XSUM_XXH128_testdata[2367] */\n    {  789, 0x000000009E3779B1ULL, { 0x77ABED9BAEFB452FULL, 0x92A500DE19F12105ULL } }, /* XSUM_XXH128_testdata[2368] */\n    {  789, 0x9E3779B185EBCA8DULL, { 0x727463C5A35EAB18ULL, 0x4DFC14005746D708ULL } }, /* XSUM_XXH128_testdata[2369] */\n    {  790, 0x0000000000000000ULL, { 0xB43FAECFB4DED4C6ULL, 0xD63FC75FC2751D7AULL } }, /* XSUM_XXH128_testdata[2370] */\n    {  790, 0x000000009E3779B1ULL, { 0x4278BE3E3AC1B8F2ULL, 0x5D01DF61E31B7FDFULL } }, /* XSUM_XXH128_testdata[2371] */\n    {  790, 0x9E3779B185EBCA8DULL, { 0x97A2FCAAF259E7F0ULL, 0x8CE6D2BEB807984EULL } }, /* XSUM_XXH128_testdata[2372] */\n    {  791, 0x0000000000000000ULL, { 0x87DB4CC16F8F9834ULL, 0xE2C2AFD3143A3187ULL } }, /* XSUM_XXH128_testdata[2373] */\n    {  791, 0x000000009E3779B1ULL, { 0xA4C194B780C4CB97ULL, 0x3E9E192DA6D1175AULL } }, /* XSUM_XXH128_testdata[2374] */\n    {  791, 0x9E3779B185EBCA8DULL, { 0xF0ED99F6368E86B4ULL, 0x5DA0BEC30EE17490ULL } }, /* XSUM_XXH128_testdata[2375] */\n    {  792, 0x0000000000000000ULL, { 0x397EC5B31E863D4EULL, 0x47F375000D3BB04BULL } }, /* XSUM_XXH128_testdata[2376] */\n    {  792, 0x000000009E3779B1ULL, { 0xD73508975AFFEC34ULL, 0x667AD5489F12DB0FULL } }, /* XSUM_XXH128_testdata[2377] */\n    {  792, 0x9E3779B185EBCA8DULL, { 0x4F1F799401E2560FULL, 0xB15BCEFFCDF20311ULL } }, /* XSUM_XXH128_testdata[2378] */\n    {  793, 0x0000000000000000ULL, { 0x63C07847897714FAULL, 0x3D81AE845D81F35DULL } }, /* XSUM_XXH128_testdata[2379] */\n    {  793, 0x000000009E3779B1ULL, { 0xB24AF67CE0F02FFCULL, 0x889F9B3BB118EFE5ULL } }, /* XSUM_XXH128_testdata[2380] */\n    {  793, 0x9E3779B185EBCA8DULL, { 0xA3644EB4E9170C70ULL, 0x4AE0476CDA8E6853ULL } }, /* XSUM_XXH128_testdata[2381] */\n    {  794, 0x0000000000000000ULL, { 0x0EDFD2BFC590389DULL, 0x261BE2D4701CB7C8ULL } }, /* XSUM_XXH128_testdata[2382] */\n    {  794, 0x000000009E3779B1ULL, { 0x584A8E27099A08B3ULL, 0x9873818C608CF1F0ULL } }, /* XSUM_XXH128_testdata[2383] */\n    {  794, 0x9E3779B185EBCA8DULL, { 0x3D759DC347BBB21CULL, 0x210DB3421D308080ULL } }, /* XSUM_XXH128_testdata[2384] */\n    {  795, 0x0000000000000000ULL, { 0x1AB2EC32F024F822ULL, 0x7DF2B4E518541CD2ULL } }, /* XSUM_XXH128_testdata[2385] */\n    {  795, 0x000000009E3779B1ULL, { 0x9F069E6A416B781FULL, 0xF0FCF89205E7301BULL } }, /* XSUM_XXH128_testdata[2386] */\n    {  795, 0x9E3779B185EBCA8DULL, { 0x734CC4590C829DBEULL, 0xB7CF793499AAB235ULL } }, /* XSUM_XXH128_testdata[2387] */\n    {  796, 0x0000000000000000ULL, { 0x5BE1AC90F9DE8DA8ULL, 0xA172972E312DE565ULL } }, /* XSUM_XXH128_testdata[2388] */\n    {  796, 0x000000009E3779B1ULL, { 0xEDCDCD5D7EADEE44ULL, 0x84B32C3C82C4BEFDULL } }, /* XSUM_XXH128_testdata[2389] */\n    {  796, 0x9E3779B185EBCA8DULL, { 0x78B04E7613AFD46CULL, 0x116932791D6A4CEAULL } }, /* XSUM_XXH128_testdata[2390] */\n    {  797, 0x0000000000000000ULL, { 0xB4066986444208B4ULL, 0x07107CC0D6333BE6ULL } }, /* XSUM_XXH128_testdata[2391] */\n    {  797, 0x000000009E3779B1ULL, { 0x3F4830B58F326B07ULL, 0x24D267266E7EC82DULL } }, /* XSUM_XXH128_testdata[2392] */\n    {  797, 0x9E3779B185EBCA8DULL, { 0xEEA265C3C3AFDD45ULL, 0x4ADFD52211708C41ULL } }, /* XSUM_XXH128_testdata[2393] */\n    {  798, 0x0000000000000000ULL, { 0x1815460B80B6EB6CULL, 0xE4E1E44EB8B8F8E7ULL } }, /* XSUM_XXH128_testdata[2394] */\n    {  798, 0x000000009E3779B1ULL, { 0x685A32F31A9B498AULL, 0x1BA406E58871707AULL } }, /* XSUM_XXH128_testdata[2395] */\n    {  798, 0x9E3779B185EBCA8DULL, { 0x3C89DBB3A59579F1ULL, 0xF607F4E73801D667ULL } }, /* XSUM_XXH128_testdata[2396] */\n    {  799, 0x0000000000000000ULL, { 0x86BB41D5B99C19DCULL, 0x6FDB1E8BDC9DC1F5ULL } }, /* XSUM_XXH128_testdata[2397] */\n    {  799, 0x000000009E3779B1ULL, { 0xB41876E986544071ULL, 0xBBE27021B06BE0DBULL } }, /* XSUM_XXH128_testdata[2398] */\n    {  799, 0x9E3779B185EBCA8DULL, { 0x5501F8646ADF4F5DULL, 0xD95E5C4A90DC6C47ULL } }, /* XSUM_XXH128_testdata[2399] */\n    {  800, 0x0000000000000000ULL, { 0x5B095CEB58C8784CULL, 0x092284E7FC3618F2ULL } }, /* XSUM_XXH128_testdata[2400] */\n    {  800, 0x000000009E3779B1ULL, { 0xE002EF91E4206F43ULL, 0x85DDFC84FAE03E51ULL } }, /* XSUM_XXH128_testdata[2401] */\n    {  800, 0x9E3779B185EBCA8DULL, { 0x643775681D53EF59ULL, 0xB432695A80C278DCULL } }, /* XSUM_XXH128_testdata[2402] */\n    {  801, 0x0000000000000000ULL, { 0x2F828D114D494E29ULL, 0xCEADC91DA69FC1D0ULL } }, /* XSUM_XXH128_testdata[2403] */\n    {  801, 0x000000009E3779B1ULL, { 0x3BC0EE8314902BB3ULL, 0x1AF62A5DD1FCA108ULL } }, /* XSUM_XXH128_testdata[2404] */\n    {  801, 0x9E3779B185EBCA8DULL, { 0x4EB392F9A436ECE5ULL, 0xB98C15D319EFEC73ULL } }, /* XSUM_XXH128_testdata[2405] */\n    {  802, 0x0000000000000000ULL, { 0x846819585B282067ULL, 0x2CDAD32723AEBFE3ULL } }, /* XSUM_XXH128_testdata[2406] */\n    {  802, 0x000000009E3779B1ULL, { 0xF66344EE564A1711ULL, 0xF9D3909172A1C582ULL } }, /* XSUM_XXH128_testdata[2407] */\n    {  802, 0x9E3779B185EBCA8DULL, { 0xF0838E955138892DULL, 0x7EA95E1716AF7B79ULL } }, /* XSUM_XXH128_testdata[2408] */\n    {  803, 0x0000000000000000ULL, { 0x4812CC768ECBB73FULL, 0xBB40A29A79CFF82DULL } }, /* XSUM_XXH128_testdata[2409] */\n    {  803, 0x000000009E3779B1ULL, { 0x1712CCC0B0CC182DULL, 0xFE4A3E2B65BD76B8ULL } }, /* XSUM_XXH128_testdata[2410] */\n    {  803, 0x9E3779B185EBCA8DULL, { 0x374E89D7FA22ECD4ULL, 0x20BE39847D478A69ULL } }, /* XSUM_XXH128_testdata[2411] */\n    {  804, 0x0000000000000000ULL, { 0x22137EFB3AC27524ULL, 0xA2D3BBF153F0B68FULL } }, /* XSUM_XXH128_testdata[2412] */\n    {  804, 0x000000009E3779B1ULL, { 0xE715EB2F898B8298ULL, 0x52FB4C05A8F02F4CULL } }, /* XSUM_XXH128_testdata[2413] */\n    {  804, 0x9E3779B185EBCA8DULL, { 0xE836C6165D3830FEULL, 0xFA39467E065FB565ULL } }, /* XSUM_XXH128_testdata[2414] */\n    {  805, 0x0000000000000000ULL, { 0xB4BB8B42141FA5D0ULL, 0xAC01FEACBAFB368FULL } }, /* XSUM_XXH128_testdata[2415] */\n    {  805, 0x000000009E3779B1ULL, { 0xCE0A27979DC38886ULL, 0x6D095809704B36C9ULL } }, /* XSUM_XXH128_testdata[2416] */\n    {  805, 0x9E3779B185EBCA8DULL, { 0x0E55700B1E667558ULL, 0x0C71AE48202CF9D2ULL } }, /* XSUM_XXH128_testdata[2417] */\n    {  806, 0x0000000000000000ULL, { 0x6D4EF8C4EC4075E2ULL, 0x991DA24A99C37D6EULL } }, /* XSUM_XXH128_testdata[2418] */\n    {  806, 0x000000009E3779B1ULL, { 0xE68BAC28281324A9ULL, 0xDE64EB2441D6AD0CULL } }, /* XSUM_XXH128_testdata[2419] */\n    {  806, 0x9E3779B185EBCA8DULL, { 0x934F16B568FE179AULL, 0x144A11908437428FULL } }, /* XSUM_XXH128_testdata[2420] */\n    {  807, 0x0000000000000000ULL, { 0x206A0792F4FCCCACULL, 0xB5E7BF6175DD298BULL } }, /* XSUM_XXH128_testdata[2421] */\n    {  807, 0x000000009E3779B1ULL, { 0xB05BBFF7382B2E99ULL, 0xD6A7D98E08891C4AULL } }, /* XSUM_XXH128_testdata[2422] */\n    {  807, 0x9E3779B185EBCA8DULL, { 0xEB6796CE25E33E6AULL, 0xAAB4B5C30646E72BULL } }, /* XSUM_XXH128_testdata[2423] */\n    {  808, 0x0000000000000000ULL, { 0x68957C67C4333426ULL, 0xB5A0C9213A755E74ULL } }, /* XSUM_XXH128_testdata[2424] */\n    {  808, 0x000000009E3779B1ULL, { 0x860DD08D1DAD795AULL, 0xD19448F56AF6C575ULL } }, /* XSUM_XXH128_testdata[2425] */\n    {  808, 0x9E3779B185EBCA8DULL, { 0x9E97369B7C0A90F1ULL, 0xB3E16455CEE4D199ULL } }, /* XSUM_XXH128_testdata[2426] */\n    {  809, 0x0000000000000000ULL, { 0xC17753BA8D4E5CB2ULL, 0xC159766761B16712ULL } }, /* XSUM_XXH128_testdata[2427] */\n    {  809, 0x000000009E3779B1ULL, { 0x0637FD69EA98AB4BULL, 0x21FE27B1B59C4B76ULL } }, /* XSUM_XXH128_testdata[2428] */\n    {  809, 0x9E3779B185EBCA8DULL, { 0xDCC4A9FD8373CA8AULL, 0x69A41D4CCB69382AULL } }, /* XSUM_XXH128_testdata[2429] */\n    {  810, 0x0000000000000000ULL, { 0x8A616D90630A4988ULL, 0x95DDFC95C7223C72ULL } }, /* XSUM_XXH128_testdata[2430] */\n    {  810, 0x000000009E3779B1ULL, { 0x1937EDAE582BA44DULL, 0xBBED7C040B8BAA0FULL } }, /* XSUM_XXH128_testdata[2431] */\n    {  810, 0x9E3779B185EBCA8DULL, { 0x2144D13C73C4CA74ULL, 0xBE7479E3656DC3CBULL } }, /* XSUM_XXH128_testdata[2432] */\n    {  811, 0x0000000000000000ULL, { 0x536C6DCDFFD6E969ULL, 0x56A02BEBC8F0A826ULL } }, /* XSUM_XXH128_testdata[2433] */\n    {  811, 0x000000009E3779B1ULL, { 0x981B330DD97938A6ULL, 0xAA5CBE9C42C83218ULL } }, /* XSUM_XXH128_testdata[2434] */\n    {  811, 0x9E3779B185EBCA8DULL, { 0xAF2825AFCA7BB3D0ULL, 0xC9C1D42B23D45777ULL } }, /* XSUM_XXH128_testdata[2435] */\n    {  812, 0x0000000000000000ULL, { 0xD7A63BB3914CD718ULL, 0xCDCDB7E8EA3933BDULL } }, /* XSUM_XXH128_testdata[2436] */\n    {  812, 0x000000009E3779B1ULL, { 0x1E95F447999E75CFULL, 0x6040CD9154D1DFC1ULL } }, /* XSUM_XXH128_testdata[2437] */\n    {  812, 0x9E3779B185EBCA8DULL, { 0x427AC245CBD3B44CULL, 0xF359E4FBB19C98B2ULL } }, /* XSUM_XXH128_testdata[2438] */\n    {  813, 0x0000000000000000ULL, { 0x9528DE76FF428FFFULL, 0x6170F00AEB57581AULL } }, /* XSUM_XXH128_testdata[2439] */\n    {  813, 0x000000009E3779B1ULL, { 0xF8CF7EE78A7F039AULL, 0x08DA7AE133FD9807ULL } }, /* XSUM_XXH128_testdata[2440] */\n    {  813, 0x9E3779B185EBCA8DULL, { 0x1E230E5B3323E74AULL, 0xA64209F04AE75F05ULL } }, /* XSUM_XXH128_testdata[2441] */\n    {  814, 0x0000000000000000ULL, { 0x849CACB6C4106DDFULL, 0xEDF23CE6B11B9B8EULL } }, /* XSUM_XXH128_testdata[2442] */\n    {  814, 0x000000009E3779B1ULL, { 0xF207B3FCF38CD894ULL, 0x0CB104872DDDB9CDULL } }, /* XSUM_XXH128_testdata[2443] */\n    {  814, 0x9E3779B185EBCA8DULL, { 0x553BE499122C7C0CULL, 0x0BC38DCFDC68EBEBULL } }, /* XSUM_XXH128_testdata[2444] */\n    {  815, 0x0000000000000000ULL, { 0x0D5B97EB8BBB2507ULL, 0x0A29903501092EA4ULL } }, /* XSUM_XXH128_testdata[2445] */\n    {  815, 0x000000009E3779B1ULL, { 0x6590222D8A1C2D67ULL, 0x303CF866A3BA2901ULL } }, /* XSUM_XXH128_testdata[2446] */\n    {  815, 0x9E3779B185EBCA8DULL, { 0xC342A288F90B93BBULL, 0x151A996B761C918EULL } }, /* XSUM_XXH128_testdata[2447] */\n    {  816, 0x0000000000000000ULL, { 0xBF54F04EDDCA5768ULL, 0x83B3BD7EFDA686ADULL } }, /* XSUM_XXH128_testdata[2448] */\n    {  816, 0x000000009E3779B1ULL, { 0x7096FC66D0A70114ULL, 0xC6BFE2EF705C3EF8ULL } }, /* XSUM_XXH128_testdata[2449] */\n    {  816, 0x9E3779B185EBCA8DULL, { 0x7770F5499A4E0728ULL, 0x3C3FCA72C2AEFA58ULL } }, /* XSUM_XXH128_testdata[2450] */\n    {  817, 0x0000000000000000ULL, { 0xD91C52C448D3CA0DULL, 0xCCAA506B39909D0BULL } }, /* XSUM_XXH128_testdata[2451] */\n    {  817, 0x000000009E3779B1ULL, { 0x6399495D9AD14B7EULL, 0x33F3C07A7B23C3B4ULL } }, /* XSUM_XXH128_testdata[2452] */\n    {  817, 0x9E3779B185EBCA8DULL, { 0x45F34B3A94984950ULL, 0x95DBD4FF26BCBFDEULL } }, /* XSUM_XXH128_testdata[2453] */\n    {  818, 0x0000000000000000ULL, { 0x4EBDCA54797F28FCULL, 0x602A512876C506AEULL } }, /* XSUM_XXH128_testdata[2454] */\n    {  818, 0x000000009E3779B1ULL, { 0xBF072D3DDBA6B700ULL, 0x36BD81F8C8F99FCBULL } }, /* XSUM_XXH128_testdata[2455] */\n    {  818, 0x9E3779B185EBCA8DULL, { 0x9C760841EAEFFDC9ULL, 0x505FA2B298407D74ULL } }, /* XSUM_XXH128_testdata[2456] */\n    {  819, 0x0000000000000000ULL, { 0xF70945EB101515BFULL, 0x6D93DA67E807B690ULL } }, /* XSUM_XXH128_testdata[2457] */\n    {  819, 0x000000009E3779B1ULL, { 0x289DCFBE8002A899ULL, 0x573563B16FEF09CDULL } }, /* XSUM_XXH128_testdata[2458] */\n    {  819, 0x9E3779B185EBCA8DULL, { 0xB227D91F6B12C133ULL, 0xE64E577C0BA99C73ULL } }, /* XSUM_XXH128_testdata[2459] */\n    {  820, 0x0000000000000000ULL, { 0xCDC89E5577C1A2A8ULL, 0x83CD4B9FFDC0DD45ULL } }, /* XSUM_XXH128_testdata[2460] */\n    {  820, 0x000000009E3779B1ULL, { 0xB3904083E6A540D2ULL, 0x09855705078686D1ULL } }, /* XSUM_XXH128_testdata[2461] */\n    {  820, 0x9E3779B185EBCA8DULL, { 0xEEAC670EA532F45EULL, 0xA485BECC3DF2B67AULL } }, /* XSUM_XXH128_testdata[2462] */\n    {  821, 0x0000000000000000ULL, { 0x344199F7B654360DULL, 0x4BCFAA1617EED863ULL } }, /* XSUM_XXH128_testdata[2463] */\n    {  821, 0x000000009E3779B1ULL, { 0x2968EF1E91C57A06ULL, 0xF658DD897C7FE73BULL } }, /* XSUM_XXH128_testdata[2464] */\n    {  821, 0x9E3779B185EBCA8DULL, { 0x0A9B5D01499EC0CAULL, 0xA418273A3693018CULL } }, /* XSUM_XXH128_testdata[2465] */\n    {  822, 0x0000000000000000ULL, { 0x5A5531E107B85BC4ULL, 0x6B3CC312C9BBEEC4ULL } }, /* XSUM_XXH128_testdata[2466] */\n    {  822, 0x000000009E3779B1ULL, { 0x322A9CFD55AF48A2ULL, 0x6EE918E1D4EA1608ULL } }, /* XSUM_XXH128_testdata[2467] */\n    {  822, 0x9E3779B185EBCA8DULL, { 0x6128B1D109BA73D5ULL, 0x16C4CD1836E15A14ULL } }, /* XSUM_XXH128_testdata[2468] */\n    {  823, 0x0000000000000000ULL, { 0x8880C79B625256F8ULL, 0xB6C59CF5555CFD03ULL } }, /* XSUM_XXH128_testdata[2469] */\n    {  823, 0x000000009E3779B1ULL, { 0xCB6CE4CFB8CE9186ULL, 0x256C22FC526D6FB3ULL } }, /* XSUM_XXH128_testdata[2470] */\n    {  823, 0x9E3779B185EBCA8DULL, { 0xFF6BE9029AE0895CULL, 0x9C1ED08B67FD143AULL } }, /* XSUM_XXH128_testdata[2471] */\n    {  824, 0x0000000000000000ULL, { 0x4147D273F26FE781ULL, 0xF2C1EC7487EB8ABEULL } }, /* XSUM_XXH128_testdata[2472] */\n    {  824, 0x000000009E3779B1ULL, { 0x83DA33D0FA318A71ULL, 0x043C573EB128B764ULL } }, /* XSUM_XXH128_testdata[2473] */\n    {  824, 0x9E3779B185EBCA8DULL, { 0x618098027E17A0A0ULL, 0x67A271042DDBF51DULL } }, /* XSUM_XXH128_testdata[2474] */\n    {  825, 0x0000000000000000ULL, { 0x160D37087AB92A86ULL, 0x62DF8F0744D821FDULL } }, /* XSUM_XXH128_testdata[2475] */\n    {  825, 0x000000009E3779B1ULL, { 0x89676DB58A4AEC92ULL, 0x22387C1A63736E45ULL } }, /* XSUM_XXH128_testdata[2476] */\n    {  825, 0x9E3779B185EBCA8DULL, { 0x1C9796C8BE1CCBEFULL, 0x77B035DA8DBE63B5ULL } }, /* XSUM_XXH128_testdata[2477] */\n    {  826, 0x0000000000000000ULL, { 0xACD13537639F6E2CULL, 0xD608F2186C271E96ULL } }, /* XSUM_XXH128_testdata[2478] */\n    {  826, 0x000000009E3779B1ULL, { 0x8E5AA11ADD6E3F66ULL, 0x3131C6FEDC421779ULL } }, /* XSUM_XXH128_testdata[2479] */\n    {  826, 0x9E3779B185EBCA8DULL, { 0xA9A04297D3F6EE2AULL, 0x82FFABE55346EC3BULL } }, /* XSUM_XXH128_testdata[2480] */\n    {  827, 0x0000000000000000ULL, { 0xD35377738FD403A5ULL, 0xEB51BD58FB72500BULL } }, /* XSUM_XXH128_testdata[2481] */\n    {  827, 0x000000009E3779B1ULL, { 0xD725B02E944F05A1ULL, 0x6499B1FAD5180EE9ULL } }, /* XSUM_XXH128_testdata[2482] */\n    {  827, 0x9E3779B185EBCA8DULL, { 0x082EBC1AAA053BFDULL, 0x57305BE5CC1A6573ULL } }, /* XSUM_XXH128_testdata[2483] */\n    {  828, 0x0000000000000000ULL, { 0x2E9D98BE64D509E1ULL, 0x81BBBC5F894397B4ULL } }, /* XSUM_XXH128_testdata[2484] */\n    {  828, 0x000000009E3779B1ULL, { 0x64F868BE972D858CULL, 0x7512B69CCD93D2EBULL } }, /* XSUM_XXH128_testdata[2485] */\n    {  828, 0x9E3779B185EBCA8DULL, { 0x53E88588AF191AF0ULL, 0x84B698338B16CC75ULL } }, /* XSUM_XXH128_testdata[2486] */\n    {  829, 0x0000000000000000ULL, { 0x345221D1DF80DE65ULL, 0xBEEAE8DC89B593CCULL } }, /* XSUM_XXH128_testdata[2487] */\n    {  829, 0x000000009E3779B1ULL, { 0x3D7857F9FB1F6EE5ULL, 0xA2FE43C7385CDDA9ULL } }, /* XSUM_XXH128_testdata[2488] */\n    {  829, 0x9E3779B185EBCA8DULL, { 0xF6A17453C43DF45EULL, 0x5247943F3EA1CB99ULL } }, /* XSUM_XXH128_testdata[2489] */\n    {  830, 0x0000000000000000ULL, { 0x9BA2617F5A684FABULL, 0x838CBA651A9977C3ULL } }, /* XSUM_XXH128_testdata[2490] */\n    {  830, 0x000000009E3779B1ULL, { 0x2DC3571019F5D0D2ULL, 0xF5C3619DFC5675A4ULL } }, /* XSUM_XXH128_testdata[2491] */\n    {  830, 0x9E3779B185EBCA8DULL, { 0x898EDE976C4053FAULL, 0xB295623771226C3FULL } }, /* XSUM_XXH128_testdata[2492] */\n    {  831, 0x0000000000000000ULL, { 0x61B8D4254F92B112ULL, 0x8752EBE3682E552FULL } }, /* XSUM_XXH128_testdata[2493] */\n    {  831, 0x000000009E3779B1ULL, { 0xA27AFC3653973BBAULL, 0x5D8FA6B24CF39B5EULL } }, /* XSUM_XXH128_testdata[2494] */\n    {  831, 0x9E3779B185EBCA8DULL, { 0xDBA75D8F1D69BB43ULL, 0x8502DA15A107E20AULL } }, /* XSUM_XXH128_testdata[2495] */\n    {  832, 0x0000000000000000ULL, { 0xAFE6259BB7E82719ULL, 0x177859E705C64565ULL } }, /* XSUM_XXH128_testdata[2496] */\n    {  832, 0x000000009E3779B1ULL, { 0xD4A04F81E02EA5D6ULL, 0xBDBC71F8635E1EBDULL } }, /* XSUM_XXH128_testdata[2497] */\n    {  832, 0x9E3779B185EBCA8DULL, { 0xE3114F2B93221DA1ULL, 0x00E699FFB24FED6AULL } }, /* XSUM_XXH128_testdata[2498] */\n    {  833, 0x0000000000000000ULL, { 0x90A398DB62F4700AULL, 0xE63E1B8C9A4582CEULL } }, /* XSUM_XXH128_testdata[2499] */\n    {  833, 0x000000009E3779B1ULL, { 0xE60CF9BBD1DCD94FULL, 0x6A79CCF4393553A3ULL } }, /* XSUM_XXH128_testdata[2500] */\n    {  833, 0x9E3779B185EBCA8DULL, { 0x22B16D152E53363BULL, 0x68C7215B8D644C23ULL } }, /* XSUM_XXH128_testdata[2501] */\n    {  834, 0x0000000000000000ULL, { 0x1D102D3B3A811A53ULL, 0xE8E9495E8B45B8E2ULL } }, /* XSUM_XXH128_testdata[2502] */\n    {  834, 0x000000009E3779B1ULL, { 0xC30439B81E0E69B5ULL, 0x9CDE24709A3B80A1ULL } }, /* XSUM_XXH128_testdata[2503] */\n    {  834, 0x9E3779B185EBCA8DULL, { 0x9B504609CE528AEBULL, 0x34392D61306FEC74ULL } }, /* XSUM_XXH128_testdata[2504] */\n    {  835, 0x0000000000000000ULL, { 0xEFEB7FECE3799DD9ULL, 0x74EA824B9082273FULL } }, /* XSUM_XXH128_testdata[2505] */\n    {  835, 0x000000009E3779B1ULL, { 0x67ABF015287E53DEULL, 0xB07D4BFB621779A3ULL } }, /* XSUM_XXH128_testdata[2506] */\n    {  835, 0x9E3779B185EBCA8DULL, { 0x050797525A33E488ULL, 0xEEB5E98A70C12F16ULL } }, /* XSUM_XXH128_testdata[2507] */\n    {  836, 0x0000000000000000ULL, { 0x78FB3B11A836CE75ULL, 0x71199ED5CCF1AD80ULL } }, /* XSUM_XXH128_testdata[2508] */\n    {  836, 0x000000009E3779B1ULL, { 0x83B0E8EEA78FAFE0ULL, 0x284A5EC009C124CAULL } }, /* XSUM_XXH128_testdata[2509] */\n    {  836, 0x9E3779B185EBCA8DULL, { 0xD192EB96418DC6DBULL, 0xA53281D7BD15AC92ULL } }, /* XSUM_XXH128_testdata[2510] */\n    {  837, 0x0000000000000000ULL, { 0x4D88D78137833F01ULL, 0xC5D0FE5FC18A3647ULL } }, /* XSUM_XXH128_testdata[2511] */\n    {  837, 0x000000009E3779B1ULL, { 0xA18F8B8E86AF6FF4ULL, 0x5A87AD6A00A2E49AULL } }, /* XSUM_XXH128_testdata[2512] */\n    {  837, 0x9E3779B185EBCA8DULL, { 0x09D6DAEDC3A0869CULL, 0x50BDDF52E4398D37ULL } }, /* XSUM_XXH128_testdata[2513] */\n    {  838, 0x0000000000000000ULL, { 0x4BD49C3A51933BE0ULL, 0x1FEDE71784458EC7ULL } }, /* XSUM_XXH128_testdata[2514] */\n    {  838, 0x000000009E3779B1ULL, { 0x80B930D3FEE0F5BCULL, 0x17F438B48D57E0DCULL } }, /* XSUM_XXH128_testdata[2515] */\n    {  838, 0x9E3779B185EBCA8DULL, { 0x58930BCAE3E3A184ULL, 0x48B0EE27FD4633ABULL } }, /* XSUM_XXH128_testdata[2516] */\n    {  839, 0x0000000000000000ULL, { 0x54F7F848A1913FF5ULL, 0xED99E9CDCF50F472ULL } }, /* XSUM_XXH128_testdata[2517] */\n    {  839, 0x000000009E3779B1ULL, { 0x8ACBEF35FD79B4A3ULL, 0xDCB767F2515D7F04ULL } }, /* XSUM_XXH128_testdata[2518] */\n    {  839, 0x9E3779B185EBCA8DULL, { 0x33ABE251569EB133ULL, 0x677372E072E9CCFFULL } }, /* XSUM_XXH128_testdata[2519] */\n    {  840, 0x0000000000000000ULL, { 0x106712127B9D230CULL, 0xF7CC184662D6A2A7ULL } }, /* XSUM_XXH128_testdata[2520] */\n    {  840, 0x000000009E3779B1ULL, { 0x0398D8E9706EA0CBULL, 0x66214271CF4072F2ULL } }, /* XSUM_XXH128_testdata[2521] */\n    {  840, 0x9E3779B185EBCA8DULL, { 0xB5E8BC576AEA8BA4ULL, 0x2DE36392F2FD80AAULL } }, /* XSUM_XXH128_testdata[2522] */\n    {  841, 0x0000000000000000ULL, { 0x18070CF1879F1977ULL, 0xDB67D1D1E2997ACEULL } }, /* XSUM_XXH128_testdata[2523] */\n    {  841, 0x000000009E3779B1ULL, { 0x0389232E02F28E86ULL, 0xBFC31C52B5107FC0ULL } }, /* XSUM_XXH128_testdata[2524] */\n    {  841, 0x9E3779B185EBCA8DULL, { 0x1FADBB600D162135ULL, 0xA14568792EAF8886ULL } }, /* XSUM_XXH128_testdata[2525] */\n    {  842, 0x0000000000000000ULL, { 0x83397F11D484A571ULL, 0xB6B2354A9A806EA0ULL } }, /* XSUM_XXH128_testdata[2526] */\n    {  842, 0x000000009E3779B1ULL, { 0x92E67EC92622CB48ULL, 0x770E54291885A339ULL } }, /* XSUM_XXH128_testdata[2527] */\n    {  842, 0x9E3779B185EBCA8DULL, { 0x9EFF0FD8F3152F8AULL, 0x0CD70F204F0228B4ULL } }, /* XSUM_XXH128_testdata[2528] */\n    {  843, 0x0000000000000000ULL, { 0xCE992E147CE99E40ULL, 0xE7F02BAFDE0DCFC0ULL } }, /* XSUM_XXH128_testdata[2529] */\n    {  843, 0x000000009E3779B1ULL, { 0x9FA4E35106BF597AULL, 0x6676326BB80FC98EULL } }, /* XSUM_XXH128_testdata[2530] */\n    {  843, 0x9E3779B185EBCA8DULL, { 0x641FEE7F734F5C28ULL, 0x195EE19409BE5647ULL } }, /* XSUM_XXH128_testdata[2531] */\n    {  844, 0x0000000000000000ULL, { 0x136A5AD87FB1F3C5ULL, 0x8393D5D5B44A5502ULL } }, /* XSUM_XXH128_testdata[2532] */\n    {  844, 0x000000009E3779B1ULL, { 0x17D3E9D57101A426ULL, 0x1A8DF2CEB73C2E8BULL } }, /* XSUM_XXH128_testdata[2533] */\n    {  844, 0x9E3779B185EBCA8DULL, { 0xBF94331CE9448890ULL, 0xB6E607F32DACBDBEULL } }, /* XSUM_XXH128_testdata[2534] */\n    {  845, 0x0000000000000000ULL, { 0x7F01AB2D9DF65DC3ULL, 0xF7D4FF82DFE46828ULL } }, /* XSUM_XXH128_testdata[2535] */\n    {  845, 0x000000009E3779B1ULL, { 0x0A77C1652147741BULL, 0xC66EA49E00FA6268ULL } }, /* XSUM_XXH128_testdata[2536] */\n    {  845, 0x9E3779B185EBCA8DULL, { 0x5EED94F76EB3A6C8ULL, 0xD0C83DC0F999BE15ULL } }, /* XSUM_XXH128_testdata[2537] */\n    {  846, 0x0000000000000000ULL, { 0x4F0DF98A62744869ULL, 0x89C605025F8D7DC9ULL } }, /* XSUM_XXH128_testdata[2538] */\n    {  846, 0x000000009E3779B1ULL, { 0xF4A4A16732C7EF30ULL, 0x2EF3E728ED0BBBBFULL } }, /* XSUM_XXH128_testdata[2539] */\n    {  846, 0x9E3779B185EBCA8DULL, { 0xFD4DE9380591A06EULL, 0x57BCC5A88207831CULL } }, /* XSUM_XXH128_testdata[2540] */\n    {  847, 0x0000000000000000ULL, { 0x9F0A5D405E382663ULL, 0x813A061D7B40E592ULL } }, /* XSUM_XXH128_testdata[2541] */\n    {  847, 0x000000009E3779B1ULL, { 0xD10EE835D2BE4F38ULL, 0x69160AC252494617ULL } }, /* XSUM_XXH128_testdata[2542] */\n    {  847, 0x9E3779B185EBCA8DULL, { 0xE47F9D04CD36BBADULL, 0x3C396C2CB51A78B8ULL } }, /* XSUM_XXH128_testdata[2543] */\n    {  848, 0x0000000000000000ULL, { 0x180BB00A39D5EC5AULL, 0xA8B4E30FAD79609CULL } }, /* XSUM_XXH128_testdata[2544] */\n    {  848, 0x000000009E3779B1ULL, { 0xE60C36CDCD3B9585ULL, 0xDA1A3EBC69523010ULL } }, /* XSUM_XXH128_testdata[2545] */\n    {  848, 0x9E3779B185EBCA8DULL, { 0xDE5A14F15157E51EULL, 0x5C76305A556C8CDAULL } }, /* XSUM_XXH128_testdata[2546] */\n    {  849, 0x0000000000000000ULL, { 0xF4BE363521B6A2C6ULL, 0xD124A3A4DCB6CECEULL } }, /* XSUM_XXH128_testdata[2547] */\n    {  849, 0x000000009E3779B1ULL, { 0xF64C69E6DBBB8CD1ULL, 0x9A763141F310088CULL } }, /* XSUM_XXH128_testdata[2548] */\n    {  849, 0x9E3779B185EBCA8DULL, { 0x8D1797C2052BFE82ULL, 0x91B60FC21111D63BULL } }, /* XSUM_XXH128_testdata[2549] */\n    {  850, 0x0000000000000000ULL, { 0x86C780FD0CE8BF78ULL, 0x3CDD2401B6549372ULL } }, /* XSUM_XXH128_testdata[2550] */\n    {  850, 0x000000009E3779B1ULL, { 0xA3EAFD4F99A6BA0DULL, 0x89F370FA182C9503ULL } }, /* XSUM_XXH128_testdata[2551] */\n    {  850, 0x9E3779B185EBCA8DULL, { 0xAD01A1D5CC629CD5ULL, 0x6FA64D316A50912DULL } }, /* XSUM_XXH128_testdata[2552] */\n    {  851, 0x0000000000000000ULL, { 0xB3F7DB8C1B281BFDULL, 0x35641763A4D3687FULL } }, /* XSUM_XXH128_testdata[2553] */\n    {  851, 0x000000009E3779B1ULL, { 0x1A5E73C297F7E274ULL, 0x7D31F37D9A00E59BULL } }, /* XSUM_XXH128_testdata[2554] */\n    {  851, 0x9E3779B185EBCA8DULL, { 0x3E0C5DC2505E9FEEULL, 0xFA8E38B7A40F3E34ULL } }, /* XSUM_XXH128_testdata[2555] */\n    {  852, 0x0000000000000000ULL, { 0xF921BC2813B654C5ULL, 0xF19526746958A759ULL } }, /* XSUM_XXH128_testdata[2556] */\n    {  852, 0x000000009E3779B1ULL, { 0x5853E01D4E4F87AEULL, 0x372CFEE7373C2398ULL } }, /* XSUM_XXH128_testdata[2557] */\n    {  852, 0x9E3779B185EBCA8DULL, { 0xE1ABC48311801DE5ULL, 0x7CF24FD4CE81A13EULL } }, /* XSUM_XXH128_testdata[2558] */\n    {  853, 0x0000000000000000ULL, { 0xAC60F24E6BB9314CULL, 0xBBF8FDAA0A87464BULL } }, /* XSUM_XXH128_testdata[2559] */\n    {  853, 0x000000009E3779B1ULL, { 0xFF831F0D1275CEE4ULL, 0x7E3A7FC503329D31ULL } }, /* XSUM_XXH128_testdata[2560] */\n    {  853, 0x9E3779B185EBCA8DULL, { 0x8323286894810D00ULL, 0x8128A03177BDF907ULL } }, /* XSUM_XXH128_testdata[2561] */\n    {  854, 0x0000000000000000ULL, { 0x22731EEACE036B70ULL, 0xB85DEEFEF798508CULL } }, /* XSUM_XXH128_testdata[2562] */\n    {  854, 0x000000009E3779B1ULL, { 0x6857732344EF70BBULL, 0x95D1C3D57367B3CFULL } }, /* XSUM_XXH128_testdata[2563] */\n    {  854, 0x9E3779B185EBCA8DULL, { 0x53111315216E6E05ULL, 0x11B1D2ADD009CD9CULL } }, /* XSUM_XXH128_testdata[2564] */\n    {  855, 0x0000000000000000ULL, { 0xAEC9AAF7BD2AF359ULL, 0x10768506724476EAULL } }, /* XSUM_XXH128_testdata[2565] */\n    {  855, 0x000000009E3779B1ULL, { 0x379A4BAC9E694024ULL, 0x63E9BD7094D825DCULL } }, /* XSUM_XXH128_testdata[2566] */\n    {  855, 0x9E3779B185EBCA8DULL, { 0x2AB74C5CFD15B3AEULL, 0x6C6231EAD8B9BCABULL } }, /* XSUM_XXH128_testdata[2567] */\n    {  856, 0x0000000000000000ULL, { 0x2205D490BEBCC708ULL, 0x970EC8B27BA2E144ULL } }, /* XSUM_XXH128_testdata[2568] */\n    {  856, 0x000000009E3779B1ULL, { 0x5DF5CA2887655AE3ULL, 0x4D809843EDD2FC7FULL } }, /* XSUM_XXH128_testdata[2569] */\n    {  856, 0x9E3779B185EBCA8DULL, { 0x311BB4AC9FB9FD3EULL, 0x0C5C3430F938526DULL } }, /* XSUM_XXH128_testdata[2570] */\n    {  857, 0x0000000000000000ULL, { 0xA2DDF9996C06CB02ULL, 0xBD9BAC635A0B23E6ULL } }, /* XSUM_XXH128_testdata[2571] */\n    {  857, 0x000000009E3779B1ULL, { 0x4BFFB50063ACEF06ULL, 0x1ABE7428777E0131ULL } }, /* XSUM_XXH128_testdata[2572] */\n    {  857, 0x9E3779B185EBCA8DULL, { 0x57E4EC23A8A1ACCBULL, 0xA4F71EC627F62EC1ULL } }, /* XSUM_XXH128_testdata[2573] */\n    {  858, 0x0000000000000000ULL, { 0x8DB85910823CCFF9ULL, 0x11FCAB1BA2F44495ULL } }, /* XSUM_XXH128_testdata[2574] */\n    {  858, 0x000000009E3779B1ULL, { 0x254000E118809C2CULL, 0x3E9C939E7F1BAB9BULL } }, /* XSUM_XXH128_testdata[2575] */\n    {  858, 0x9E3779B185EBCA8DULL, { 0x3360E621581CB408ULL, 0x2C3917B04B94CB56ULL } }, /* XSUM_XXH128_testdata[2576] */\n    {  859, 0x0000000000000000ULL, { 0x0020D5DDB96FF188ULL, 0x6AA1E1543E1BB1CDULL } }, /* XSUM_XXH128_testdata[2577] */\n    {  859, 0x000000009E3779B1ULL, { 0x56FCE48650440CF6ULL, 0xCD5AE5323E288378ULL } }, /* XSUM_XXH128_testdata[2578] */\n    {  859, 0x9E3779B185EBCA8DULL, { 0x32D27A0B45A43231ULL, 0x3290AB1815C3F1E1ULL } }, /* XSUM_XXH128_testdata[2579] */\n    {  860, 0x0000000000000000ULL, { 0x6E0260DD43742DF4ULL, 0x77781054CEA1D510ULL } }, /* XSUM_XXH128_testdata[2580] */\n    {  860, 0x000000009E3779B1ULL, { 0xFA8F3C565E1D764DULL, 0x8E8625992817F022ULL } }, /* XSUM_XXH128_testdata[2581] */\n    {  860, 0x9E3779B185EBCA8DULL, { 0x617926484A47AA64ULL, 0xBC556E4AEA688D6EULL } }, /* XSUM_XXH128_testdata[2582] */\n    {  861, 0x0000000000000000ULL, { 0x998F39A94253AF75ULL, 0x6C8D51E149D079F4ULL } }, /* XSUM_XXH128_testdata[2583] */\n    {  861, 0x000000009E3779B1ULL, { 0xCB99C674330A9015ULL, 0xEEF7D28A6744BDA7ULL } }, /* XSUM_XXH128_testdata[2584] */\n    {  861, 0x9E3779B185EBCA8DULL, { 0x8FAA1AE17209850CULL, 0xDD69899F65F0EBDFULL } }, /* XSUM_XXH128_testdata[2585] */\n    {  862, 0x0000000000000000ULL, { 0x9C3CA9F498794551ULL, 0xBBD99193E1C01468ULL } }, /* XSUM_XXH128_testdata[2586] */\n    {  862, 0x000000009E3779B1ULL, { 0x8D5B5483010C138AULL, 0xE6AA85EC4D9F4302ULL } }, /* XSUM_XXH128_testdata[2587] */\n    {  862, 0x9E3779B185EBCA8DULL, { 0xA9E1257DB5D93D57ULL, 0xB8CAC3CDE57889C0ULL } }, /* XSUM_XXH128_testdata[2588] */\n    {  863, 0x0000000000000000ULL, { 0xD4AB596FA5B43697ULL, 0x77416026FE83CA37ULL } }, /* XSUM_XXH128_testdata[2589] */\n    {  863, 0x000000009E3779B1ULL, { 0xFD06AE5949D62E7EULL, 0x186F5CD5B5FFEEBDULL } }, /* XSUM_XXH128_testdata[2590] */\n    {  863, 0x9E3779B185EBCA8DULL, { 0x77A4A22D9975994DULL, 0x225A829AB3D5D3C3ULL } }, /* XSUM_XXH128_testdata[2591] */\n    {  864, 0x0000000000000000ULL, { 0xAECA70EC1A19053CULL, 0x5C6334BA5155F6F9ULL } }, /* XSUM_XXH128_testdata[2592] */\n    {  864, 0x000000009E3779B1ULL, { 0xDA6A83A3134B6903ULL, 0x58A277F4CEC493CBULL } }, /* XSUM_XXH128_testdata[2593] */\n    {  864, 0x9E3779B185EBCA8DULL, { 0x62864C38E63F2DBFULL, 0xAFF3C9A41A3D8BECULL } }, /* XSUM_XXH128_testdata[2594] */\n    {  865, 0x0000000000000000ULL, { 0x920BE4DA2EE72450ULL, 0x21838832E2813761ULL } }, /* XSUM_XXH128_testdata[2595] */\n    {  865, 0x000000009E3779B1ULL, { 0xD3A7770B2C577042ULL, 0x919A66EB0A0DBAC6ULL } }, /* XSUM_XXH128_testdata[2596] */\n    {  865, 0x9E3779B185EBCA8DULL, { 0x679D32790A35B02AULL, 0x461D61C9C949CE3AULL } }, /* XSUM_XXH128_testdata[2597] */\n    {  866, 0x0000000000000000ULL, { 0xB0AE8C8931036064ULL, 0xDE3978FD3F87A2D1ULL } }, /* XSUM_XXH128_testdata[2598] */\n    {  866, 0x000000009E3779B1ULL, { 0x0D39D308DD4D150DULL, 0x17225C83B23B65A3ULL } }, /* XSUM_XXH128_testdata[2599] */\n    {  866, 0x9E3779B185EBCA8DULL, { 0xFF70578E60774C95ULL, 0x91C5FA9990B61E3DULL } }, /* XSUM_XXH128_testdata[2600] */\n    {  867, 0x0000000000000000ULL, { 0x204497CC1D90FFE3ULL, 0x83ACB6FB62980055ULL } }, /* XSUM_XXH128_testdata[2601] */\n    {  867, 0x000000009E3779B1ULL, { 0x9A65DBF08C9E7AC5ULL, 0x5C2B477E2931C168ULL } }, /* XSUM_XXH128_testdata[2602] */\n    {  867, 0x9E3779B185EBCA8DULL, { 0x249388B8EE2A692EULL, 0x5423638326CF9558ULL } }, /* XSUM_XXH128_testdata[2603] */\n    {  868, 0x0000000000000000ULL, { 0xCC7D891B3841AEA2ULL, 0x153D144FE449EBB6ULL } }, /* XSUM_XXH128_testdata[2604] */\n    {  868, 0x000000009E3779B1ULL, { 0x959762DE35F8D91BULL, 0xF3EB71B8A2295504ULL } }, /* XSUM_XXH128_testdata[2605] */\n    {  868, 0x9E3779B185EBCA8DULL, { 0x4A1094F278CD47FBULL, 0xE71995C9F18791B7ULL } }, /* XSUM_XXH128_testdata[2606] */\n    {  869, 0x0000000000000000ULL, { 0x6F28F68421F6E239ULL, 0xF3824BD7AC6E3811ULL } }, /* XSUM_XXH128_testdata[2607] */\n    {  869, 0x000000009E3779B1ULL, { 0xF924CDC9B1FB5108ULL, 0xE1CE209D99947294ULL } }, /* XSUM_XXH128_testdata[2608] */\n    {  869, 0x9E3779B185EBCA8DULL, { 0x7F4400B6740AF6C9ULL, 0xD3FCC66B8A47C252ULL } }, /* XSUM_XXH128_testdata[2609] */\n    {  870, 0x0000000000000000ULL, { 0xA4E36B16E55D8471ULL, 0xDB62DE0A2979D419ULL } }, /* XSUM_XXH128_testdata[2610] */\n    {  870, 0x000000009E3779B1ULL, { 0xC7C350ADFF7091A6ULL, 0xF9C36528B7517F5AULL } }, /* XSUM_XXH128_testdata[2611] */\n    {  870, 0x9E3779B185EBCA8DULL, { 0x051FC97AD46E2D89ULL, 0x62B0BAD40C5B9536ULL } }, /* XSUM_XXH128_testdata[2612] */\n    {  871, 0x0000000000000000ULL, { 0x1D795DD6A022F3F2ULL, 0x00BB000BD66CC2D6ULL } }, /* XSUM_XXH128_testdata[2613] */\n    {  871, 0x000000009E3779B1ULL, { 0xB6579A0543BB9B0FULL, 0x46958A6E806B8AFBULL } }, /* XSUM_XXH128_testdata[2614] */\n    {  871, 0x9E3779B185EBCA8DULL, { 0xDA17BFCD5421D4ECULL, 0x1E59D46D625166F5ULL } }, /* XSUM_XXH128_testdata[2615] */\n    {  872, 0x0000000000000000ULL, { 0x5390B479AD9BFF1DULL, 0x8C192E58C399A8C5ULL } }, /* XSUM_XXH128_testdata[2616] */\n    {  872, 0x000000009E3779B1ULL, { 0x5C5082DB1CCF1D3AULL, 0x4F47CC316AD630BDULL } }, /* XSUM_XXH128_testdata[2617] */\n    {  872, 0x9E3779B185EBCA8DULL, { 0xA021AA74FC1AE49AULL, 0x220499B524EF072AULL } }, /* XSUM_XXH128_testdata[2618] */\n    {  873, 0x0000000000000000ULL, { 0x9CFE87FA820B89F5ULL, 0xBA067C1C6BBA207BULL } }, /* XSUM_XXH128_testdata[2619] */\n    {  873, 0x000000009E3779B1ULL, { 0x3A8CA35C738C13B4ULL, 0x4A8C5F6243168091ULL } }, /* XSUM_XXH128_testdata[2620] */\n    {  873, 0x9E3779B185EBCA8DULL, { 0xB44A4C7912BDD7FFULL, 0x6D6D4FB1B210C4CCULL } }, /* XSUM_XXH128_testdata[2621] */\n    {  874, 0x0000000000000000ULL, { 0x670D930CF6A5CA58ULL, 0x734FC6E122E17A04ULL } }, /* XSUM_XXH128_testdata[2622] */\n    {  874, 0x000000009E3779B1ULL, { 0x7C73B96A46D9423EULL, 0xA932DA2422C2ED64ULL } }, /* XSUM_XXH128_testdata[2623] */\n    {  874, 0x9E3779B185EBCA8DULL, { 0x097D5B727BDAC8E7ULL, 0xD6FB7C70267CEE44ULL } }, /* XSUM_XXH128_testdata[2624] */\n    {  875, 0x0000000000000000ULL, { 0x3268191F1A35F955ULL, 0x2B166091527E4789ULL } }, /* XSUM_XXH128_testdata[2625] */\n    {  875, 0x000000009E3779B1ULL, { 0x963969CCA516106DULL, 0x8C766FF80CC505A6ULL } }, /* XSUM_XXH128_testdata[2626] */\n    {  875, 0x9E3779B185EBCA8DULL, { 0xFB57D6BBCADCA138ULL, 0xC7A7E9D9AE41315DULL } }, /* XSUM_XXH128_testdata[2627] */\n    {  876, 0x0000000000000000ULL, { 0x16B613946323F178ULL, 0x1F7203792DAA1F97ULL } }, /* XSUM_XXH128_testdata[2628] */\n    {  876, 0x000000009E3779B1ULL, { 0x78029C6EB66ED26FULL, 0x051EFC44D703E644ULL } }, /* XSUM_XXH128_testdata[2629] */\n    {  876, 0x9E3779B185EBCA8DULL, { 0x720DA302255D6B3CULL, 0x4B572688363DA637ULL } }, /* XSUM_XXH128_testdata[2630] */\n    {  877, 0x0000000000000000ULL, { 0xD5D45FAB9D869310ULL, 0xC53D0EFD700E52AEULL } }, /* XSUM_XXH128_testdata[2631] */\n    {  877, 0x000000009E3779B1ULL, { 0x6E21AA9A3D684E27ULL, 0xDB11AC3E9FF8DCBDULL } }, /* XSUM_XXH128_testdata[2632] */\n    {  877, 0x9E3779B185EBCA8DULL, { 0x9DD738725E07D61AULL, 0x8E750E5FE569615BULL } }, /* XSUM_XXH128_testdata[2633] */\n    {  878, 0x0000000000000000ULL, { 0x7BBEA66E7FD64EEEULL, 0x286FC277603E23CBULL } }, /* XSUM_XXH128_testdata[2634] */\n    {  878, 0x000000009E3779B1ULL, { 0x816D41B3D815C4C1ULL, 0xBFA82021B26BFBCFULL } }, /* XSUM_XXH128_testdata[2635] */\n    {  878, 0x9E3779B185EBCA8DULL, { 0xC5911D65D313D0D4ULL, 0xD2949E7FB20211BCULL } }, /* XSUM_XXH128_testdata[2636] */\n    {  879, 0x0000000000000000ULL, { 0xCC9E1F621CEB5CB7ULL, 0xF85E7B0A3590DC24ULL } }, /* XSUM_XXH128_testdata[2637] */\n    {  879, 0x000000009E3779B1ULL, { 0x4CB7D04B3DFFC884ULL, 0xE3F74C5040492180ULL } }, /* XSUM_XXH128_testdata[2638] */\n    {  879, 0x9E3779B185EBCA8DULL, { 0x9A2250D02FE3633CULL, 0x412FC952C35923F4ULL } }, /* XSUM_XXH128_testdata[2639] */\n    {  880, 0x0000000000000000ULL, { 0xA1D25334FA04F008ULL, 0xA73D128FE2FB9DA1ULL } }, /* XSUM_XXH128_testdata[2640] */\n    {  880, 0x000000009E3779B1ULL, { 0x15C836CF5367BE5DULL, 0xF46A92FB682918D4ULL } }, /* XSUM_XXH128_testdata[2641] */\n    {  880, 0x9E3779B185EBCA8DULL, { 0x4E33561D714D981CULL, 0x92696761CB556E84ULL } }, /* XSUM_XXH128_testdata[2642] */\n    {  881, 0x0000000000000000ULL, { 0xF4315D7612F5987DULL, 0xAAFC1DE3D5ED1034ULL } }, /* XSUM_XXH128_testdata[2643] */\n    {  881, 0x000000009E3779B1ULL, { 0x2E35A09EA5A6A7C4ULL, 0xB762E944AD384196ULL } }, /* XSUM_XXH128_testdata[2644] */\n    {  881, 0x9E3779B185EBCA8DULL, { 0x6D3745E180F80558ULL, 0x1F7BD312066798EFULL } }, /* XSUM_XXH128_testdata[2645] */\n    {  882, 0x0000000000000000ULL, { 0x3645B0BF88B738DEULL, 0x1CB63F94A532D59FULL } }, /* XSUM_XXH128_testdata[2646] */\n    {  882, 0x000000009E3779B1ULL, { 0x12A8969DAD12C757ULL, 0xAF240CA2D6B3FA14ULL } }, /* XSUM_XXH128_testdata[2647] */\n    {  882, 0x9E3779B185EBCA8DULL, { 0x1472A4D0F250D3C1ULL, 0xEE262A6E4A503D46ULL } }, /* XSUM_XXH128_testdata[2648] */\n    {  883, 0x0000000000000000ULL, { 0x0D60690DC6B281CDULL, 0xEAB4FB5A5B93A380ULL } }, /* XSUM_XXH128_testdata[2649] */\n    {  883, 0x000000009E3779B1ULL, { 0xB59624E456D0EDD2ULL, 0x5A3DC276A36D46FCULL } }, /* XSUM_XXH128_testdata[2650] */\n    {  883, 0x9E3779B185EBCA8DULL, { 0xBF80AA58B601D3ECULL, 0xC6D7F6D4946B20A7ULL } }, /* XSUM_XXH128_testdata[2651] */\n    {  884, 0x0000000000000000ULL, { 0x4F06C5E4BC84D817ULL, 0x37D4DBEE254F1521ULL } }, /* XSUM_XXH128_testdata[2652] */\n    {  884, 0x000000009E3779B1ULL, { 0x5688599C21F1BA9BULL, 0x598FE53A3170C033ULL } }, /* XSUM_XXH128_testdata[2653] */\n    {  884, 0x9E3779B185EBCA8DULL, { 0x50CD721756F80806ULL, 0x39FB405370F64C7AULL } }, /* XSUM_XXH128_testdata[2654] */\n    {  885, 0x0000000000000000ULL, { 0x0CF4D69F9BCBB028ULL, 0x0E02C0B4B44B61CCULL } }, /* XSUM_XXH128_testdata[2655] */\n    {  885, 0x000000009E3779B1ULL, { 0x63DF283FE8245A99ULL, 0x7D37064CA05BD262ULL } }, /* XSUM_XXH128_testdata[2656] */\n    {  885, 0x9E3779B185EBCA8DULL, { 0x6A873765C3253682ULL, 0x5499455A8D10AD91ULL } }, /* XSUM_XXH128_testdata[2657] */\n    {  886, 0x0000000000000000ULL, { 0x33D3B47E5F0C1FEAULL, 0xEACF83A742605652ULL } }, /* XSUM_XXH128_testdata[2658] */\n    {  886, 0x000000009E3779B1ULL, { 0xA4B03DF52CC764BFULL, 0x4DC89D2A8A85BD78ULL } }, /* XSUM_XXH128_testdata[2659] */\n    {  886, 0x9E3779B185EBCA8DULL, { 0x569343E1255B1999ULL, 0xA3EED801D9F9E348ULL } }, /* XSUM_XXH128_testdata[2660] */\n    {  887, 0x0000000000000000ULL, { 0xB1EF8AC1E7FCCD2EULL, 0xCE43B512F37D815CULL } }, /* XSUM_XXH128_testdata[2661] */\n    {  887, 0x000000009E3779B1ULL, { 0x6E2C1DF44E8767C2ULL, 0xABCC359DED163955ULL } }, /* XSUM_XXH128_testdata[2662] */\n    {  887, 0x9E3779B185EBCA8DULL, { 0x664107083E169A21ULL, 0x51C8DE63ED703A71ULL } }, /* XSUM_XXH128_testdata[2663] */\n    {  888, 0x0000000000000000ULL, { 0xDFBC2F185FA2CB61ULL, 0x8806E13409721431ULL } }, /* XSUM_XXH128_testdata[2664] */\n    {  888, 0x000000009E3779B1ULL, { 0x8DD3D4EDDE7650E6ULL, 0xDDDE98908C372958ULL } }, /* XSUM_XXH128_testdata[2665] */\n    {  888, 0x9E3779B185EBCA8DULL, { 0x5720284D8DAC6716ULL, 0x65B04EBB855FD0CBULL } }, /* XSUM_XXH128_testdata[2666] */\n    {  889, 0x0000000000000000ULL, { 0xA695A95B654DBBE8ULL, 0x8CD0E6C65B8DBF41ULL } }, /* XSUM_XXH128_testdata[2667] */\n    {  889, 0x000000009E3779B1ULL, { 0x8EA5F0205AB54F72ULL, 0x3525E23E6DC20E8EULL } }, /* XSUM_XXH128_testdata[2668] */\n    {  889, 0x9E3779B185EBCA8DULL, { 0x16269F2A5D26D293ULL, 0x9521BB0E63DC5854ULL } }, /* XSUM_XXH128_testdata[2669] */\n    {  890, 0x0000000000000000ULL, { 0x228EB6664629C43FULL, 0xA3FC64D8829CB397ULL } }, /* XSUM_XXH128_testdata[2670] */\n    {  890, 0x000000009E3779B1ULL, { 0x9948CA6E0B1BA4E7ULL, 0x4DADF73D261E1940ULL } }, /* XSUM_XXH128_testdata[2671] */\n    {  890, 0x9E3779B185EBCA8DULL, { 0x48490F5C2AE2C3DAULL, 0x1AAB515479A3276CULL } }, /* XSUM_XXH128_testdata[2672] */\n    {  891, 0x0000000000000000ULL, { 0xF85745C98A2DFD73ULL, 0xEC45212F32DBB7D9ULL } }, /* XSUM_XXH128_testdata[2673] */\n    {  891, 0x000000009E3779B1ULL, { 0xB89B90521C20F314ULL, 0x7E554C4FC7884059ULL } }, /* XSUM_XXH128_testdata[2674] */\n    {  891, 0x9E3779B185EBCA8DULL, { 0x51E26ECF6A11FC9FULL, 0x10DEF1CBDA5BA994ULL } }, /* XSUM_XXH128_testdata[2675] */\n    {  892, 0x0000000000000000ULL, { 0x1952503F7EA0927EULL, 0xEE7109ED475CDFFEULL } }, /* XSUM_XXH128_testdata[2676] */\n    {  892, 0x000000009E3779B1ULL, { 0x9137A305390E7652ULL, 0x43D723217EB5BA6BULL } }, /* XSUM_XXH128_testdata[2677] */\n    {  892, 0x9E3779B185EBCA8DULL, { 0xF3E80A84EB3AC555ULL, 0xB53E4F08D4E16683ULL } }, /* XSUM_XXH128_testdata[2678] */\n    {  893, 0x0000000000000000ULL, { 0x7A66A9CAFD803854ULL, 0xCB97A61AB5CEF77EULL } }, /* XSUM_XXH128_testdata[2679] */\n    {  893, 0x000000009E3779B1ULL, { 0xA8F8D08ABDB2B356ULL, 0x2810663531A6FBA3ULL } }, /* XSUM_XXH128_testdata[2680] */\n    {  893, 0x9E3779B185EBCA8DULL, { 0x80978CEDB4F12674ULL, 0x7DB63BA98680908FULL } }, /* XSUM_XXH128_testdata[2681] */\n    {  894, 0x0000000000000000ULL, { 0xB999B8C782978E87ULL, 0x2ED8CE77C8F6675AULL } }, /* XSUM_XXH128_testdata[2682] */\n    {  894, 0x000000009E3779B1ULL, { 0xF2967A52DD558FCCULL, 0x3B41A8BF3B7489FEULL } }, /* XSUM_XXH128_testdata[2683] */\n    {  894, 0x9E3779B185EBCA8DULL, { 0x1525D7EB13039E6FULL, 0xFEAF25E6FC50BEC8ULL } }, /* XSUM_XXH128_testdata[2684] */\n    {  895, 0x0000000000000000ULL, { 0xB12EA692EC2B62C5ULL, 0xC5940A2339B3C952ULL } }, /* XSUM_XXH128_testdata[2685] */\n    {  895, 0x000000009E3779B1ULL, { 0x33496B50CB7E33BFULL, 0x61EC46411F123FB9ULL } }, /* XSUM_XXH128_testdata[2686] */\n    {  895, 0x9E3779B185EBCA8DULL, { 0x600CC0C92B11A232ULL, 0xC5EF4FF5FD80003BULL } }, /* XSUM_XXH128_testdata[2687] */\n    {  896, 0x0000000000000000ULL, { 0xEB301FCAE547B530ULL, 0xE13DBB556D978065ULL } }, /* XSUM_XXH128_testdata[2688] */\n    {  896, 0x000000009E3779B1ULL, { 0x218E7B36585BEB7BULL, 0x01D1EA43608BAC11ULL } }, /* XSUM_XXH128_testdata[2689] */\n    {  896, 0x9E3779B185EBCA8DULL, { 0xE484EED3AE3F7B4AULL, 0x843CEB5D33541F95ULL } }, /* XSUM_XXH128_testdata[2690] */\n    {  897, 0x0000000000000000ULL, { 0x3FE21A655967FAABULL, 0x7D75B5131DDC4AE0ULL } }, /* XSUM_XXH128_testdata[2691] */\n    {  897, 0x000000009E3779B1ULL, { 0x4B5BE27EA5F1506FULL, 0x0230D58BCA7DD56AULL } }, /* XSUM_XXH128_testdata[2692] */\n    {  897, 0x9E3779B185EBCA8DULL, { 0xEC34975953EAA864ULL, 0x9167BCA8AFB03463ULL } }, /* XSUM_XXH128_testdata[2693] */\n    {  898, 0x0000000000000000ULL, { 0x62DF6C1B622F8D08ULL, 0x770E8601F745AC7DULL } }, /* XSUM_XXH128_testdata[2694] */\n    {  898, 0x000000009E3779B1ULL, { 0xED58D75010B7577EULL, 0x236379297C4E2522ULL } }, /* XSUM_XXH128_testdata[2695] */\n    {  898, 0x9E3779B185EBCA8DULL, { 0x7343CCBDE198051FULL, 0x1C134CD346F0B26FULL } }, /* XSUM_XXH128_testdata[2696] */\n    {  899, 0x0000000000000000ULL, { 0xE0660A9CC7B6FF93ULL, 0x6F376E186757F362ULL } }, /* XSUM_XXH128_testdata[2697] */\n    {  899, 0x000000009E3779B1ULL, { 0x0EF5B7A7D2AD0985ULL, 0xF93395F8D75213CEULL } }, /* XSUM_XXH128_testdata[2698] */\n    {  899, 0x9E3779B185EBCA8DULL, { 0x2D0B46C0D37409D6ULL, 0x1AB38E8B361E6AEAULL } }, /* XSUM_XXH128_testdata[2699] */\n    {  900, 0x0000000000000000ULL, { 0x43A535685D650A1DULL, 0xF19D4B9983694578ULL } }, /* XSUM_XXH128_testdata[2700] */\n    {  900, 0x000000009E3779B1ULL, { 0x1F287F7F552DE0E6ULL, 0xFFA7893B09EE2BA1ULL } }, /* XSUM_XXH128_testdata[2701] */\n    {  900, 0x9E3779B185EBCA8DULL, { 0x9AA0F5DE9F232AE3ULL, 0x40090F2F7A9BC91DULL } }, /* XSUM_XXH128_testdata[2702] */\n    {  901, 0x0000000000000000ULL, { 0xF10B28C4A5F1D834ULL, 0x242BC16C051AAD78ULL } }, /* XSUM_XXH128_testdata[2703] */\n    {  901, 0x000000009E3779B1ULL, { 0xE3266F30175B2461ULL, 0x12EA6C541BD06572ULL } }, /* XSUM_XXH128_testdata[2704] */\n    {  901, 0x9E3779B185EBCA8DULL, { 0xDCB25A5484361112ULL, 0xE1547D6F30E35CAAULL } }, /* XSUM_XXH128_testdata[2705] */\n    {  902, 0x0000000000000000ULL, { 0xF78121EBCC58B064ULL, 0xD6C7CA5376666ABFULL } }, /* XSUM_XXH128_testdata[2706] */\n    {  902, 0x000000009E3779B1ULL, { 0x2D94A66CFEC92193ULL, 0x5B1CC5F76FCD95BAULL } }, /* XSUM_XXH128_testdata[2707] */\n    {  902, 0x9E3779B185EBCA8DULL, { 0xB07E3F3CFE793C40ULL, 0xC0174AD6E609D633ULL } }, /* XSUM_XXH128_testdata[2708] */\n    {  903, 0x0000000000000000ULL, { 0x39020A97794C2E78ULL, 0xAEF7C25FBDF03AC5ULL } }, /* XSUM_XXH128_testdata[2709] */\n    {  903, 0x000000009E3779B1ULL, { 0xD176779525E668D5ULL, 0xD50EB01FB88CC660ULL } }, /* XSUM_XXH128_testdata[2710] */\n    {  903, 0x9E3779B185EBCA8DULL, { 0xEF9157C276C8A510ULL, 0x9C89825F56E6AE2FULL } }, /* XSUM_XXH128_testdata[2711] */\n    {  904, 0x0000000000000000ULL, { 0x3CD1DC80F8017C63ULL, 0x7C6BA1DF8CAC9954ULL } }, /* XSUM_XXH128_testdata[2712] */\n    {  904, 0x000000009E3779B1ULL, { 0x55C67DEAD403F81EULL, 0xABE2CA204FD09078ULL } }, /* XSUM_XXH128_testdata[2713] */\n    {  904, 0x9E3779B185EBCA8DULL, { 0x28BF86B604D416C8ULL, 0x8CDE0E17A06A24C3ULL } }, /* XSUM_XXH128_testdata[2714] */\n    {  905, 0x0000000000000000ULL, { 0x2A749BB33C70892FULL, 0x0A2B4371D4FD17D0ULL } }, /* XSUM_XXH128_testdata[2715] */\n    {  905, 0x000000009E3779B1ULL, { 0xD8432E8EFF50DACEULL, 0x794229558CD18433ULL } }, /* XSUM_XXH128_testdata[2716] */\n    {  905, 0x9E3779B185EBCA8DULL, { 0x03806DC4CE1C026BULL, 0x86B43B0954C52AD8ULL } }, /* XSUM_XXH128_testdata[2717] */\n    {  906, 0x0000000000000000ULL, { 0x08924B7FB5A00477ULL, 0x42C3E74D158EDFB4ULL } }, /* XSUM_XXH128_testdata[2718] */\n    {  906, 0x000000009E3779B1ULL, { 0x4DDCA5D2F2956B60ULL, 0xFF242F37DC343F23ULL } }, /* XSUM_XXH128_testdata[2719] */\n    {  906, 0x9E3779B185EBCA8DULL, { 0x8F5985423A9AB05AULL, 0xCF93DE4A975232D8ULL } }, /* XSUM_XXH128_testdata[2720] */\n    {  907, 0x0000000000000000ULL, { 0x706A6A5F8534ED41ULL, 0x646AA7D7ECA70397ULL } }, /* XSUM_XXH128_testdata[2721] */\n    {  907, 0x000000009E3779B1ULL, { 0x6DD62773789BC611ULL, 0xB156431AD10AA875ULL } }, /* XSUM_XXH128_testdata[2722] */\n    {  907, 0x9E3779B185EBCA8DULL, { 0x07EF945CA2C9BBA9ULL, 0x1346488801B55C7CULL } }, /* XSUM_XXH128_testdata[2723] */\n    {  908, 0x0000000000000000ULL, { 0xB8A4DB648697F221ULL, 0x89E456F0FA4C2D0EULL } }, /* XSUM_XXH128_testdata[2724] */\n    {  908, 0x000000009E3779B1ULL, { 0xC868CDF5D7B2F296ULL, 0xCFF550D19AD4CBDBULL } }, /* XSUM_XXH128_testdata[2725] */\n    {  908, 0x9E3779B185EBCA8DULL, { 0xE46FA8E96335AB05ULL, 0x0B15EE1BFA8F777CULL } }, /* XSUM_XXH128_testdata[2726] */\n    {  909, 0x0000000000000000ULL, { 0x0D9D86B2E61E86C9ULL, 0xC622D7B1AF3F18AFULL } }, /* XSUM_XXH128_testdata[2727] */\n    {  909, 0x000000009E3779B1ULL, { 0x3E16F9A6D29EEAB1ULL, 0xD68EAFB1D33D4D29ULL } }, /* XSUM_XXH128_testdata[2728] */\n    {  909, 0x9E3779B185EBCA8DULL, { 0x526D4E68604C4B94ULL, 0xF473426B79EE8AAEULL } }, /* XSUM_XXH128_testdata[2729] */\n    {  910, 0x0000000000000000ULL, { 0xF2B877B46D63623AULL, 0x3D8E2058FB811EB3ULL } }, /* XSUM_XXH128_testdata[2730] */\n    {  910, 0x000000009E3779B1ULL, { 0x5BAA5CB7F2CBC752ULL, 0x060FFC77F970F235ULL } }, /* XSUM_XXH128_testdata[2731] */\n    {  910, 0x9E3779B185EBCA8DULL, { 0xF37A6ECF8FD2FE7EULL, 0xBADB1CADD162DB1CULL } }, /* XSUM_XXH128_testdata[2732] */\n    {  911, 0x0000000000000000ULL, { 0x01EF8AF310173CEFULL, 0xEB9E96101E50A3E9ULL } }, /* XSUM_XXH128_testdata[2733] */\n    {  911, 0x000000009E3779B1ULL, { 0x055E8B88C383FD7BULL, 0xFFFABCB421E37835ULL } }, /* XSUM_XXH128_testdata[2734] */\n    {  911, 0x9E3779B185EBCA8DULL, { 0x8E28E708BD090493ULL, 0xB9F70DC9320F15CDULL } }, /* XSUM_XXH128_testdata[2735] */\n    {  912, 0x0000000000000000ULL, { 0xFAE2DFBAAA25F72FULL, 0x91AB1F6A0B141D81ULL } }, /* XSUM_XXH128_testdata[2736] */\n    {  912, 0x000000009E3779B1ULL, { 0x39B211FB79FE038CULL, 0xD049F748F85B7656ULL } }, /* XSUM_XXH128_testdata[2737] */\n    {  912, 0x9E3779B185EBCA8DULL, { 0xC9B6670513781477ULL, 0x0648C4F2362F30D6ULL } }, /* XSUM_XXH128_testdata[2738] */\n    {  913, 0x0000000000000000ULL, { 0x0F887DF943467AECULL, 0x2F2564656ECC62FEULL } }, /* XSUM_XXH128_testdata[2739] */\n    {  913, 0x000000009E3779B1ULL, { 0xFBD510A443B4F636ULL, 0x98F2268D1BC3CCF8ULL } }, /* XSUM_XXH128_testdata[2740] */\n    {  913, 0x9E3779B185EBCA8DULL, { 0x52476A601F434F73ULL, 0x171FCD5D16FD2FFBULL } }, /* XSUM_XXH128_testdata[2741] */\n    {  914, 0x0000000000000000ULL, { 0x5167A6FE26B8AAE7ULL, 0x09D8F46CC26F4D9DULL } }, /* XSUM_XXH128_testdata[2742] */\n    {  914, 0x000000009E3779B1ULL, { 0x55E481A89F70CE48ULL, 0x48F2663BFA0A2C26ULL } }, /* XSUM_XXH128_testdata[2743] */\n    {  914, 0x9E3779B185EBCA8DULL, { 0x62234A2F13194C83ULL, 0x9870C542DF5EE974ULL } }, /* XSUM_XXH128_testdata[2744] */\n    {  915, 0x0000000000000000ULL, { 0xC0A5ED24EB5DB096ULL, 0xB3945B05AFB4D85BULL } }, /* XSUM_XXH128_testdata[2745] */\n    {  915, 0x000000009E3779B1ULL, { 0x886A495C9715A7CCULL, 0xBEEC0A4D359871A2ULL } }, /* XSUM_XXH128_testdata[2746] */\n    {  915, 0x9E3779B185EBCA8DULL, { 0x1CF98E391B72DD0DULL, 0xE82910DF5AF2008FULL } }, /* XSUM_XXH128_testdata[2747] */\n    {  916, 0x0000000000000000ULL, { 0x6479E62533BDD5EBULL, 0xD1AC2D9F7B299AC7ULL } }, /* XSUM_XXH128_testdata[2748] */\n    {  916, 0x000000009E3779B1ULL, { 0xEE39FD906B8EBAAFULL, 0xF18DD24325C5379FULL } }, /* XSUM_XXH128_testdata[2749] */\n    {  916, 0x9E3779B185EBCA8DULL, { 0xBF125B8684945E35ULL, 0x9311D8C5DF937136ULL } }, /* XSUM_XXH128_testdata[2750] */\n    {  917, 0x0000000000000000ULL, { 0xC2F0B86031A0F801ULL, 0x6F43EEC83911FD69ULL } }, /* XSUM_XXH128_testdata[2751] */\n    {  917, 0x000000009E3779B1ULL, { 0xCC9A2BCDBD3D711EULL, 0x1161F70498399A8EULL } }, /* XSUM_XXH128_testdata[2752] */\n    {  917, 0x9E3779B185EBCA8DULL, { 0xF8598497B749DEACULL, 0x5460CCFCF5B57947ULL } }, /* XSUM_XXH128_testdata[2753] */\n    {  918, 0x0000000000000000ULL, { 0x93DC4E8E9C05BB21ULL, 0x8AA6EBEBB259DDB8ULL } }, /* XSUM_XXH128_testdata[2754] */\n    {  918, 0x000000009E3779B1ULL, { 0x7451D84EBBE390E5ULL, 0xD50D644769656756ULL } }, /* XSUM_XXH128_testdata[2755] */\n    {  918, 0x9E3779B185EBCA8DULL, { 0xDEDC0CB3439B9699ULL, 0x9EA1C63A26B3DA3AULL } }, /* XSUM_XXH128_testdata[2756] */\n    {  919, 0x0000000000000000ULL, { 0x94BC6E4CDEC216D4ULL, 0x57AA853098A39201ULL } }, /* XSUM_XXH128_testdata[2757] */\n    {  919, 0x000000009E3779B1ULL, { 0xBCA729409D79C87DULL, 0xC9790527B482F424ULL } }, /* XSUM_XXH128_testdata[2758] */\n    {  919, 0x9E3779B185EBCA8DULL, { 0xA8B6770050EE599BULL, 0x2C005501054E54DAULL } }, /* XSUM_XXH128_testdata[2759] */\n    {  920, 0x0000000000000000ULL, { 0xE653BE122CE7A2CDULL, 0x1F2BAABEAF58E351ULL } }, /* XSUM_XXH128_testdata[2760] */\n    {  920, 0x000000009E3779B1ULL, { 0xC94F830D825BB9F9ULL, 0x7B3F802C3D5B7945ULL } }, /* XSUM_XXH128_testdata[2761] */\n    {  920, 0x9E3779B185EBCA8DULL, { 0x8B3A5165B6C84D2BULL, 0x7DB7236AD7021B03ULL } }, /* XSUM_XXH128_testdata[2762] */\n    {  921, 0x0000000000000000ULL, { 0x1323F1B07FF3DEACULL, 0xB63A754D29DAC2B7ULL } }, /* XSUM_XXH128_testdata[2763] */\n    {  921, 0x000000009E3779B1ULL, { 0xA701D37DFFDF2E36ULL, 0xBAE14923774B019AULL } }, /* XSUM_XXH128_testdata[2764] */\n    {  921, 0x9E3779B185EBCA8DULL, { 0x8E14FC108078B608ULL, 0xEB73F33DF4C1846DULL } }, /* XSUM_XXH128_testdata[2765] */\n    {  922, 0x0000000000000000ULL, { 0xA98AC6B852D82AABULL, 0x09897BCD372E991CULL } }, /* XSUM_XXH128_testdata[2766] */\n    {  922, 0x000000009E3779B1ULL, { 0x708A8551DE310A7FULL, 0x7E29B2BAB3CF4190ULL } }, /* XSUM_XXH128_testdata[2767] */\n    {  922, 0x9E3779B185EBCA8DULL, { 0x95C5DF89A2BD069FULL, 0x2DA97978246C0A20ULL } }, /* XSUM_XXH128_testdata[2768] */\n    {  923, 0x0000000000000000ULL, { 0x9D686372D8B0617AULL, 0x7C2AF0F8E1B8F31CULL } }, /* XSUM_XXH128_testdata[2769] */\n    {  923, 0x000000009E3779B1ULL, { 0x9F8863208B2F5B0DULL, 0x690F0E9E982ABADAULL } }, /* XSUM_XXH128_testdata[2770] */\n    {  923, 0x9E3779B185EBCA8DULL, { 0xEDFD83FABDDDBC8BULL, 0xBFF7D3A6F6007D2FULL } }, /* XSUM_XXH128_testdata[2771] */\n    {  924, 0x0000000000000000ULL, { 0x5F978BEF6DE12D27ULL, 0xEAB77B808FF87201ULL } }, /* XSUM_XXH128_testdata[2772] */\n    {  924, 0x000000009E3779B1ULL, { 0x471FBD7C89D97AD8ULL, 0xB26A21FF4A658FF4ULL } }, /* XSUM_XXH128_testdata[2773] */\n    {  924, 0x9E3779B185EBCA8DULL, { 0xE488654B9218CD99ULL, 0xDAD855480DCFC3E3ULL } }, /* XSUM_XXH128_testdata[2774] */\n    {  925, 0x0000000000000000ULL, { 0xFA6D5149FA2D1F6AULL, 0x917D2EE048AE3A3AULL } }, /* XSUM_XXH128_testdata[2775] */\n    {  925, 0x000000009E3779B1ULL, { 0xA94285531001ED58ULL, 0x0D81DDA0ED36F0E7ULL } }, /* XSUM_XXH128_testdata[2776] */\n    {  925, 0x9E3779B185EBCA8DULL, { 0xB84A15EAE6E992BAULL, 0xFD3B155E3FBE873DULL } }, /* XSUM_XXH128_testdata[2777] */\n    {  926, 0x0000000000000000ULL, { 0x9BB97F3BD2CD307BULL, 0x1CF7918E55248486ULL } }, /* XSUM_XXH128_testdata[2778] */\n    {  926, 0x000000009E3779B1ULL, { 0xE9DA755B02DB5DFBULL, 0x271FD65C1194F28EULL } }, /* XSUM_XXH128_testdata[2779] */\n    {  926, 0x9E3779B185EBCA8DULL, { 0x2622E4C4AAA4FD07ULL, 0x4A83696F184DE601ULL } }, /* XSUM_XXH128_testdata[2780] */\n    {  927, 0x0000000000000000ULL, { 0x36078B5DD5914CEBULL, 0x39311323FBF5063EULL } }, /* XSUM_XXH128_testdata[2781] */\n    {  927, 0x000000009E3779B1ULL, { 0x382DF9FC522B5080ULL, 0x4D5F8364D115C6A3ULL } }, /* XSUM_XXH128_testdata[2782] */\n    {  927, 0x9E3779B185EBCA8DULL, { 0x26D68DB45FF74F0EULL, 0xB32A68986B8D53B3ULL } }, /* XSUM_XXH128_testdata[2783] */\n    {  928, 0x0000000000000000ULL, { 0xBD54D90ADD4F9E19ULL, 0xC4E9CC7EFDF4B3FCULL } }, /* XSUM_XXH128_testdata[2784] */\n    {  928, 0x000000009E3779B1ULL, { 0x2AA2126A4C1B7117ULL, 0x68AB4C5C3F23417AULL } }, /* XSUM_XXH128_testdata[2785] */\n    {  928, 0x9E3779B185EBCA8DULL, { 0x49F9C3EA8E5EF802ULL, 0xFCD900037AC1FAF0ULL } }, /* XSUM_XXH128_testdata[2786] */\n    {  929, 0x0000000000000000ULL, { 0x5DBA3CAEC1DBDF12ULL, 0x54EAB6392D28A1B4ULL } }, /* XSUM_XXH128_testdata[2787] */\n    {  929, 0x000000009E3779B1ULL, { 0xE216715A630A68FEULL, 0x86EF9482580842B8ULL } }, /* XSUM_XXH128_testdata[2788] */\n    {  929, 0x9E3779B185EBCA8DULL, { 0x9B2D2B4E1558FF19ULL, 0xBA03962F7C50B05CULL } }, /* XSUM_XXH128_testdata[2789] */\n    {  930, 0x0000000000000000ULL, { 0x7DCE91B0CE47F963ULL, 0x7638538ACEC97B2BULL } }, /* XSUM_XXH128_testdata[2790] */\n    {  930, 0x000000009E3779B1ULL, { 0x5ACC9BDEEB27D425ULL, 0xD5E41283349BF6C7ULL } }, /* XSUM_XXH128_testdata[2791] */\n    {  930, 0x9E3779B185EBCA8DULL, { 0x6ABFB039DEE45CE2ULL, 0xFD9D7D18EBA371D2ULL } }, /* XSUM_XXH128_testdata[2792] */\n    {  931, 0x0000000000000000ULL, { 0x371A894FD8074EBBULL, 0x6A2BE3F704E98F76ULL } }, /* XSUM_XXH128_testdata[2793] */\n    {  931, 0x000000009E3779B1ULL, { 0x48C2DCD58BBE262FULL, 0x3CBBE72077891578ULL } }, /* XSUM_XXH128_testdata[2794] */\n    {  931, 0x9E3779B185EBCA8DULL, { 0x31D6447D326D6B32ULL, 0x5BFC8ED85DDF0A2EULL } }, /* XSUM_XXH128_testdata[2795] */\n    {  932, 0x0000000000000000ULL, { 0x8495ACB80721BB37ULL, 0xD238B4FE2984792BULL } }, /* XSUM_XXH128_testdata[2796] */\n    {  932, 0x000000009E3779B1ULL, { 0x0C7AC0F14EA00ECFULL, 0xF4847938540B8D10ULL } }, /* XSUM_XXH128_testdata[2797] */\n    {  932, 0x9E3779B185EBCA8DULL, { 0x31C1E3EED31EF4E7ULL, 0x0A04FEECE7FBDE14ULL } }, /* XSUM_XXH128_testdata[2798] */\n    {  933, 0x0000000000000000ULL, { 0x6D91845A2A2BB1DBULL, 0x1882ED3BE6ACB64EULL } }, /* XSUM_XXH128_testdata[2799] */\n    {  933, 0x000000009E3779B1ULL, { 0xEF5FA59AC79559DEULL, 0x8EE2ED9D60414DFBULL } }, /* XSUM_XXH128_testdata[2800] */\n    {  933, 0x9E3779B185EBCA8DULL, { 0x790732AA889611E7ULL, 0x8379F01F6A17399CULL } }, /* XSUM_XXH128_testdata[2801] */\n    {  934, 0x0000000000000000ULL, { 0xC21D749AA1EAFF14ULL, 0xDC8E4409BE53E192ULL } }, /* XSUM_XXH128_testdata[2802] */\n    {  934, 0x000000009E3779B1ULL, { 0xBEC3DAAE8E0A6B12ULL, 0xFFF5B5F9D79FD598ULL } }, /* XSUM_XXH128_testdata[2803] */\n    {  934, 0x9E3779B185EBCA8DULL, { 0xAED572A2CC21B33DULL, 0xD53CBC4EDCEC799CULL } }, /* XSUM_XXH128_testdata[2804] */\n    {  935, 0x0000000000000000ULL, { 0xBCC4C1401CB5F8E9ULL, 0xEDE841082AB8FB1DULL } }, /* XSUM_XXH128_testdata[2805] */\n    {  935, 0x000000009E3779B1ULL, { 0xE54E584DEF5311E4ULL, 0xFB6BD342670E7AC5ULL } }, /* XSUM_XXH128_testdata[2806] */\n    {  935, 0x9E3779B185EBCA8DULL, { 0x432A10F5AB90C1C2ULL, 0x31A3700798432B98ULL } }, /* XSUM_XXH128_testdata[2807] */\n    {  936, 0x0000000000000000ULL, { 0x444796D6AD1567C5ULL, 0xF06B64A3B4963CCEULL } }, /* XSUM_XXH128_testdata[2808] */\n    {  936, 0x000000009E3779B1ULL, { 0x3A408B185AB46C07ULL, 0xBEC334BFCBB93BEAULL } }, /* XSUM_XXH128_testdata[2809] */\n    {  936, 0x9E3779B185EBCA8DULL, { 0x29541667E8C08536ULL, 0x224F4F3507E8B6CBULL } }, /* XSUM_XXH128_testdata[2810] */\n    {  937, 0x0000000000000000ULL, { 0xCB76E240E83972D6ULL, 0x20C773EB60B25592ULL } }, /* XSUM_XXH128_testdata[2811] */\n    {  937, 0x000000009E3779B1ULL, { 0x2C56B40C66252431ULL, 0x7E5BE3218A4C67ECULL } }, /* XSUM_XXH128_testdata[2812] */\n    {  937, 0x9E3779B185EBCA8DULL, { 0x7280116BD4511CC7ULL, 0xD5AB3CC3E5DC75FAULL } }, /* XSUM_XXH128_testdata[2813] */\n    {  938, 0x0000000000000000ULL, { 0x824916E17BACABF0ULL, 0x6977D1BD37E2DF5CULL } }, /* XSUM_XXH128_testdata[2814] */\n    {  938, 0x000000009E3779B1ULL, { 0x529254B2A0F3D034ULL, 0x434656306763ECE4ULL } }, /* XSUM_XXH128_testdata[2815] */\n    {  938, 0x9E3779B185EBCA8DULL, { 0xA6BF5C3E53C802DBULL, 0xD58007FA86640DC0ULL } }, /* XSUM_XXH128_testdata[2816] */\n    {  939, 0x0000000000000000ULL, { 0xED6D1032D38614FDULL, 0x6C01B2CF33B1D720ULL } }, /* XSUM_XXH128_testdata[2817] */\n    {  939, 0x000000009E3779B1ULL, { 0x46CBFF8C9AC179B8ULL, 0x3CDE3C5130C9C9FDULL } }, /* XSUM_XXH128_testdata[2818] */\n    {  939, 0x9E3779B185EBCA8DULL, { 0x2DB0AC3D03C26BFAULL, 0x5CEEE79935019636ULL } }, /* XSUM_XXH128_testdata[2819] */\n    {  940, 0x0000000000000000ULL, { 0x148DC4872BB44686ULL, 0xB15B8AE76E67D88DULL } }, /* XSUM_XXH128_testdata[2820] */\n    {  940, 0x000000009E3779B1ULL, { 0xC34B4C477BD1C358ULL, 0x1B103911B9F212C6ULL } }, /* XSUM_XXH128_testdata[2821] */\n    {  940, 0x9E3779B185EBCA8DULL, { 0xBDDD7BEA37E2D08CULL, 0x3AE359829A860990ULL } }, /* XSUM_XXH128_testdata[2822] */\n    {  941, 0x0000000000000000ULL, { 0x9E113AF44A0C8A70ULL, 0x46F7370A1A9BDDFDULL } }, /* XSUM_XXH128_testdata[2823] */\n    {  941, 0x000000009E3779B1ULL, { 0xEC4381C5CA04FCB3ULL, 0x93C560C2746867A5ULL } }, /* XSUM_XXH128_testdata[2824] */\n    {  941, 0x9E3779B185EBCA8DULL, { 0xEAAE0F49DCE8ADCAULL, 0x428751D2A2952D00ULL } }, /* XSUM_XXH128_testdata[2825] */\n    {  942, 0x0000000000000000ULL, { 0x90A91675BEC9FA4EULL, 0x04F089CD0F902EB3ULL } }, /* XSUM_XXH128_testdata[2826] */\n    {  942, 0x000000009E3779B1ULL, { 0x71E308EADE6ED160ULL, 0x41B5770D04B1166DULL } }, /* XSUM_XXH128_testdata[2827] */\n    {  942, 0x9E3779B185EBCA8DULL, { 0x1879758BA0BB13EAULL, 0x77ACEC29B6A010F5ULL } }, /* XSUM_XXH128_testdata[2828] */\n    {  943, 0x0000000000000000ULL, { 0xEC8CEBB06CD11A8AULL, 0x67B877DAB6A05327ULL } }, /* XSUM_XXH128_testdata[2829] */\n    {  943, 0x000000009E3779B1ULL, { 0xEA56DC38BAD309EFULL, 0xAB52C4FD3BD6F42FULL } }, /* XSUM_XXH128_testdata[2830] */\n    {  943, 0x9E3779B185EBCA8DULL, { 0xC21ACB495A981932ULL, 0x535D2FD8F6630AF6ULL } }, /* XSUM_XXH128_testdata[2831] */\n    {  944, 0x0000000000000000ULL, { 0x6A7091244E534E3CULL, 0x112FAB31C1593C03ULL } }, /* XSUM_XXH128_testdata[2832] */\n    {  944, 0x000000009E3779B1ULL, { 0x99CE76A602BC189FULL, 0xF5696E281A61532DULL } }, /* XSUM_XXH128_testdata[2833] */\n    {  944, 0x9E3779B185EBCA8DULL, { 0x5D1E70B86A49B980ULL, 0xE322163D0A0547EEULL } }, /* XSUM_XXH128_testdata[2834] */\n    {  945, 0x0000000000000000ULL, { 0x82EA22FB35891761ULL, 0xF751B0034F718BE3ULL } }, /* XSUM_XXH128_testdata[2835] */\n    {  945, 0x000000009E3779B1ULL, { 0x69929365F96365D1ULL, 0x1CF14A3DD9993E6AULL } }, /* XSUM_XXH128_testdata[2836] */\n    {  945, 0x9E3779B185EBCA8DULL, { 0xF4B220EE80259595ULL, 0x26A2E29A06D351A9ULL } }, /* XSUM_XXH128_testdata[2837] */\n    {  946, 0x0000000000000000ULL, { 0xACF35CB8E8FED358ULL, 0x26C42A2B52D781C0ULL } }, /* XSUM_XXH128_testdata[2838] */\n    {  946, 0x000000009E3779B1ULL, { 0x8578698CCBDA128BULL, 0x023D061E87AE6745ULL } }, /* XSUM_XXH128_testdata[2839] */\n    {  946, 0x9E3779B185EBCA8DULL, { 0xF9958FDE6CB21BB5ULL, 0xF6D268B6E146A2B4ULL } }, /* XSUM_XXH128_testdata[2840] */\n    {  947, 0x0000000000000000ULL, { 0x5C6EFE1FF72335D7ULL, 0x690385540DD3093AULL } }, /* XSUM_XXH128_testdata[2841] */\n    {  947, 0x000000009E3779B1ULL, { 0x4C61623C8799035FULL, 0x7038C0FD152C0079ULL } }, /* XSUM_XXH128_testdata[2842] */\n    {  947, 0x9E3779B185EBCA8DULL, { 0x9520A8144A7FF689ULL, 0xC40EEDC2C56FB52FULL } }, /* XSUM_XXH128_testdata[2843] */\n    {  948, 0x0000000000000000ULL, { 0x567DF9A42493FDB3ULL, 0x7022534806C41601ULL } }, /* XSUM_XXH128_testdata[2844] */\n    {  948, 0x000000009E3779B1ULL, { 0x1288783A60942B7FULL, 0xBAE10485548D5910ULL } }, /* XSUM_XXH128_testdata[2845] */\n    {  948, 0x9E3779B185EBCA8DULL, { 0xFA4DFA8B65E1EAAFULL, 0xF9740F1E789A952EULL } }, /* XSUM_XXH128_testdata[2846] */\n    {  949, 0x0000000000000000ULL, { 0xC508DD9AF56985D5ULL, 0x158DA61390E28C06ULL } }, /* XSUM_XXH128_testdata[2847] */\n    {  949, 0x000000009E3779B1ULL, { 0x6FB18B36B7D7824AULL, 0xA9611A90FB979A67ULL } }, /* XSUM_XXH128_testdata[2848] */\n    {  949, 0x9E3779B185EBCA8DULL, { 0x3A0562B2FCC5C0EBULL, 0xFB7A90A6A24579D3ULL } }, /* XSUM_XXH128_testdata[2849] */\n    {  950, 0x0000000000000000ULL, { 0x41186209BD02FADDULL, 0xA6AB452D7B1689EDULL } }, /* XSUM_XXH128_testdata[2850] */\n    {  950, 0x000000009E3779B1ULL, { 0xDDB3DD83F50F6802ULL, 0xBEA6EB7207AA2CDEULL } }, /* XSUM_XXH128_testdata[2851] */\n    {  950, 0x9E3779B185EBCA8DULL, { 0x5D4937DA6AA3A2FEULL, 0x232193707628542AULL } }, /* XSUM_XXH128_testdata[2852] */\n    {  951, 0x0000000000000000ULL, { 0x783914173F2EB8E7ULL, 0xA901AAAEE508AE53ULL } }, /* XSUM_XXH128_testdata[2853] */\n    {  951, 0x000000009E3779B1ULL, { 0x816060C1BCD8DF5CULL, 0x1DC2F9CB197AF02AULL } }, /* XSUM_XXH128_testdata[2854] */\n    {  951, 0x9E3779B185EBCA8DULL, { 0xDA422CA94957EAEBULL, 0x2CCDC9456DF1455CULL } }, /* XSUM_XXH128_testdata[2855] */\n    {  952, 0x0000000000000000ULL, { 0xEB9DF3662F675040ULL, 0x4915A1FE75E29094ULL } }, /* XSUM_XXH128_testdata[2856] */\n    {  952, 0x000000009E3779B1ULL, { 0xAE7DD1FFDE3C9AD3ULL, 0xC216C6A100D478A0ULL } }, /* XSUM_XXH128_testdata[2857] */\n    {  952, 0x9E3779B185EBCA8DULL, { 0x73B56133DF93401EULL, 0x6037E5DDF2718FDCULL } }, /* XSUM_XXH128_testdata[2858] */\n    {  953, 0x0000000000000000ULL, { 0xF00743FE9E460004ULL, 0xEA1CC75C97AD43F5ULL } }, /* XSUM_XXH128_testdata[2859] */\n    {  953, 0x000000009E3779B1ULL, { 0x5D41B7F5B19FE9A5ULL, 0xBF2FFF0AEEBB2026ULL } }, /* XSUM_XXH128_testdata[2860] */\n    {  953, 0x9E3779B185EBCA8DULL, { 0x1866ED8CBABE1A3DULL, 0x899857D99EB9B560ULL } }, /* XSUM_XXH128_testdata[2861] */\n    {  954, 0x0000000000000000ULL, { 0xB2596BFE9CEC1895ULL, 0x4BC734859371A778ULL } }, /* XSUM_XXH128_testdata[2862] */\n    {  954, 0x000000009E3779B1ULL, { 0x73B4D7FF1CE209BCULL, 0xE32011FECFB4DEA8ULL } }, /* XSUM_XXH128_testdata[2863] */\n    {  954, 0x9E3779B185EBCA8DULL, { 0xAFF4254FA818A82FULL, 0xA2C0C24540F48828ULL } }, /* XSUM_XXH128_testdata[2864] */\n    {  955, 0x0000000000000000ULL, { 0xF916C57C73ED1F99ULL, 0x85C305BF3B432679ULL } }, /* XSUM_XXH128_testdata[2865] */\n    {  955, 0x000000009E3779B1ULL, { 0xE0FDF93978E86A3DULL, 0x6C26BCB2DE4AEF90ULL } }, /* XSUM_XXH128_testdata[2866] */\n    {  955, 0x9E3779B185EBCA8DULL, { 0xEB8A95E822A203E8ULL, 0x22E578A3C47F6120ULL } }, /* XSUM_XXH128_testdata[2867] */\n    {  956, 0x0000000000000000ULL, { 0x754A1B63E490233DULL, 0xDAB18D6D37482F38ULL } }, /* XSUM_XXH128_testdata[2868] */\n    {  956, 0x000000009E3779B1ULL, { 0x6B0B097F2B8B3108ULL, 0x478A9B1ED3F03B9FULL } }, /* XSUM_XXH128_testdata[2869] */\n    {  956, 0x9E3779B185EBCA8DULL, { 0xF00CFC6E19CB39A5ULL, 0xCC486D3FB67B7CDEULL } }, /* XSUM_XXH128_testdata[2870] */\n    {  957, 0x0000000000000000ULL, { 0x1665CAC964F7F2A9ULL, 0x4E9D956589CBE251ULL } }, /* XSUM_XXH128_testdata[2871] */\n    {  957, 0x000000009E3779B1ULL, { 0x0B203BA42CCF5B1DULL, 0x249A0A77B1BA310DULL } }, /* XSUM_XXH128_testdata[2872] */\n    {  957, 0x9E3779B185EBCA8DULL, { 0x1F6A2B1236C582BDULL, 0xAFDB78BF7750F03CULL } }, /* XSUM_XXH128_testdata[2873] */\n    {  958, 0x0000000000000000ULL, { 0x759223EB7E626920ULL, 0x31CF01162098252DULL } }, /* XSUM_XXH128_testdata[2874] */\n    {  958, 0x000000009E3779B1ULL, { 0xF31BB98C3F09BC45ULL, 0x26CEE1894B3B66F9ULL } }, /* XSUM_XXH128_testdata[2875] */\n    {  958, 0x9E3779B185EBCA8DULL, { 0x7EFE66A40789FE53ULL, 0x7D9160BB2A238F66ULL } }, /* XSUM_XXH128_testdata[2876] */\n    {  959, 0x0000000000000000ULL, { 0x513AF05AC8DD8178ULL, 0x01F887E34DFFA784ULL } }, /* XSUM_XXH128_testdata[2877] */\n    {  959, 0x000000009E3779B1ULL, { 0xE083D432CF0278A0ULL, 0xA1E2E1C07FA9C6C6ULL } }, /* XSUM_XXH128_testdata[2878] */\n    {  959, 0x9E3779B185EBCA8DULL, { 0x8C264637730C8DA7ULL, 0x1806DDCDD053DCAAULL } }, /* XSUM_XXH128_testdata[2879] */\n    {  960, 0x0000000000000000ULL, { 0xFE24A9D0DDDF9D8AULL, 0x2210F8A92217BE08ULL } }, /* XSUM_XXH128_testdata[2880] */\n    {  960, 0x000000009E3779B1ULL, { 0xF1EFC8D900491802ULL, 0x145574D695FEE78CULL } }, /* XSUM_XXH128_testdata[2881] */\n    {  960, 0x9E3779B185EBCA8DULL, { 0xD9C532F2683CB21FULL, 0xBE99EC871CE598CBULL } }, /* XSUM_XXH128_testdata[2882] */\n    {  961, 0x0000000000000000ULL, { 0x1CD144EFE4A034B5ULL, 0x927CED79D5FDED02ULL } }, /* XSUM_XXH128_testdata[2883] */\n    {  961, 0x000000009E3779B1ULL, { 0x3217A6B14A41D6A6ULL, 0x93A3B037DF6B2704ULL } }, /* XSUM_XXH128_testdata[2884] */\n    {  961, 0x9E3779B185EBCA8DULL, { 0x7858A817512ED8D9ULL, 0xD8CC9751CF369F25ULL } }, /* XSUM_XXH128_testdata[2885] */\n    {  962, 0x0000000000000000ULL, { 0x2BD047984C5C5A81ULL, 0x9F6AC284DE55A5C4ULL } }, /* XSUM_XXH128_testdata[2886] */\n    {  962, 0x000000009E3779B1ULL, { 0x1D3A9E30AFDACFAFULL, 0x2D08FD2B4943228BULL } }, /* XSUM_XXH128_testdata[2887] */\n    {  962, 0x9E3779B185EBCA8DULL, { 0x8045BAB642C21C9FULL, 0x6A27FCAFE6BF4420ULL } }, /* XSUM_XXH128_testdata[2888] */\n    {  963, 0x0000000000000000ULL, { 0x2831D5630D734EA0ULL, 0xBDCD1D0B238F62E3ULL } }, /* XSUM_XXH128_testdata[2889] */\n    {  963, 0x000000009E3779B1ULL, { 0x66A9224395186DFEULL, 0xBBC4ADFBE5BE27B4ULL } }, /* XSUM_XXH128_testdata[2890] */\n    {  963, 0x9E3779B185EBCA8DULL, { 0xF5BACD92232D0A62ULL, 0x9DBEDEA63B5449CCULL } }, /* XSUM_XXH128_testdata[2891] */\n    {  964, 0x0000000000000000ULL, { 0xD533B0E90916E484ULL, 0x9C0506EEEBF50060ULL } }, /* XSUM_XXH128_testdata[2892] */\n    {  964, 0x000000009E3779B1ULL, { 0x3F52FFF6A7C2F756ULL, 0x0EDAD18D2A1B5EA4ULL } }, /* XSUM_XXH128_testdata[2893] */\n    {  964, 0x9E3779B185EBCA8DULL, { 0xB4289BD6EF7DF749ULL, 0xF6C8793F6193971FULL } }, /* XSUM_XXH128_testdata[2894] */\n    {  965, 0x0000000000000000ULL, { 0x4B44F43FC25AD87FULL, 0xDF2D3A895ACC7467ULL } }, /* XSUM_XXH128_testdata[2895] */\n    {  965, 0x000000009E3779B1ULL, { 0x26C9B264C8CD9F21ULL, 0x5EBAC3ACD82C4549ULL } }, /* XSUM_XXH128_testdata[2896] */\n    {  965, 0x9E3779B185EBCA8DULL, { 0xDD12B4CB85317708ULL, 0x48C830B6689A353AULL } }, /* XSUM_XXH128_testdata[2897] */\n    {  966, 0x0000000000000000ULL, { 0xFE4B70BD9F2DF5EDULL, 0x843E2A03E6AACBB6ULL } }, /* XSUM_XXH128_testdata[2898] */\n    {  966, 0x000000009E3779B1ULL, { 0x9952DFFBB8C6DEF1ULL, 0x59C4B2DE62548C6CULL } }, /* XSUM_XXH128_testdata[2899] */\n    {  966, 0x9E3779B185EBCA8DULL, { 0x6F3913836220D1F8ULL, 0x9CBCA0817801F8FCULL } }, /* XSUM_XXH128_testdata[2900] */\n    {  967, 0x0000000000000000ULL, { 0x439BFC10070D916AULL, 0x95BC0D60BF55ACE2ULL } }, /* XSUM_XXH128_testdata[2901] */\n    {  967, 0x000000009E3779B1ULL, { 0xE0825636C3E3FA01ULL, 0x4E90D890FB2C7EABULL } }, /* XSUM_XXH128_testdata[2902] */\n    {  967, 0x9E3779B185EBCA8DULL, { 0x587614E299F460B0ULL, 0x18BE2726AF32F9CAULL } }, /* XSUM_XXH128_testdata[2903] */\n    {  968, 0x0000000000000000ULL, { 0xB052046C8A9324BDULL, 0x48F38085418CFC8FULL } }, /* XSUM_XXH128_testdata[2904] */\n    {  968, 0x000000009E3779B1ULL, { 0x1F1BE893B038FA7FULL, 0xE9319F16E89B057DULL } }, /* XSUM_XXH128_testdata[2905] */\n    {  968, 0x9E3779B185EBCA8DULL, { 0x46E202D4E5756772ULL, 0xF34155EBF7E46BD5ULL } }, /* XSUM_XXH128_testdata[2906] */\n    {  969, 0x0000000000000000ULL, { 0x2806F44CE1246DDEULL, 0xC7C5840439D0B680ULL } }, /* XSUM_XXH128_testdata[2907] */\n    {  969, 0x000000009E3779B1ULL, { 0x92A4679094B245B4ULL, 0xEC0E223698AF00F9ULL } }, /* XSUM_XXH128_testdata[2908] */\n    {  969, 0x9E3779B185EBCA8DULL, { 0xA77A7EA17119CAC3ULL, 0xE5C10AF39ECD6DC3ULL } }, /* XSUM_XXH128_testdata[2909] */\n    {  970, 0x0000000000000000ULL, { 0x25F0AF189799E631ULL, 0x52EBB6059C93C25EULL } }, /* XSUM_XXH128_testdata[2910] */\n    {  970, 0x000000009E3779B1ULL, { 0xF47C23F84F892CCBULL, 0x7EFDE225570DA882ULL } }, /* XSUM_XXH128_testdata[2911] */\n    {  970, 0x9E3779B185EBCA8DULL, { 0x9C9B5C0F36454D7CULL, 0xDBA0CA7916CF81FCULL } }, /* XSUM_XXH128_testdata[2912] */\n    {  971, 0x0000000000000000ULL, { 0xF50246B95ECDA9E4ULL, 0xD29AD100AE124106ULL } }, /* XSUM_XXH128_testdata[2913] */\n    {  971, 0x000000009E3779B1ULL, { 0x32F1198E0E153747ULL, 0x8781EA4877582CA1ULL } }, /* XSUM_XXH128_testdata[2914] */\n    {  971, 0x9E3779B185EBCA8DULL, { 0xE9ACF6D87169767DULL, 0x0F1EF3F25D75E9E0ULL } }, /* XSUM_XXH128_testdata[2915] */\n    {  972, 0x0000000000000000ULL, { 0x3EF86FEA3341E42EULL, 0x0CEC59FCE821D50FULL } }, /* XSUM_XXH128_testdata[2916] */\n    {  972, 0x000000009E3779B1ULL, { 0x7DACC4637A8EE090ULL, 0xB3D0CB578CBD5E31ULL } }, /* XSUM_XXH128_testdata[2917] */\n    {  972, 0x9E3779B185EBCA8DULL, { 0x58F574C8DEB88D36ULL, 0xE1950E6718466FCDULL } }, /* XSUM_XXH128_testdata[2918] */\n    {  973, 0x0000000000000000ULL, { 0xFD473154ADC32463ULL, 0x5FEC6725465127D7ULL } }, /* XSUM_XXH128_testdata[2919] */\n    {  973, 0x000000009E3779B1ULL, { 0x7A8E2519A934C44BULL, 0x6AE617AA17C1AF6DULL } }, /* XSUM_XXH128_testdata[2920] */\n    {  973, 0x9E3779B185EBCA8DULL, { 0x74FA64423D24BD54ULL, 0xBF8416EA3B015BD1ULL } }, /* XSUM_XXH128_testdata[2921] */\n    {  974, 0x0000000000000000ULL, { 0x79D7095057FB1A01ULL, 0x26ED7EB8C686C3A8ULL } }, /* XSUM_XXH128_testdata[2922] */\n    {  974, 0x000000009E3779B1ULL, { 0x9B70A49BA9DD97DDULL, 0x264B136048796FF8ULL } }, /* XSUM_XXH128_testdata[2923] */\n    {  974, 0x9E3779B185EBCA8DULL, { 0x910CD3E6487021B6ULL, 0x7967318B6B3F564DULL } }, /* XSUM_XXH128_testdata[2924] */\n    {  975, 0x0000000000000000ULL, { 0x2C191A1968EAE2A5ULL, 0x75DF97A6C73D6C68ULL } }, /* XSUM_XXH128_testdata[2925] */\n    {  975, 0x000000009E3779B1ULL, { 0x3B05457C5F64758BULL, 0x57C7F69656405066ULL } }, /* XSUM_XXH128_testdata[2926] */\n    {  975, 0x9E3779B185EBCA8DULL, { 0xC7BE6591F89CB029ULL, 0x5403015E3EA46840ULL } }, /* XSUM_XXH128_testdata[2927] */\n    {  976, 0x0000000000000000ULL, { 0x847930F68C337E18ULL, 0x1E7D90AB1806F9ACULL } }, /* XSUM_XXH128_testdata[2928] */\n    {  976, 0x000000009E3779B1ULL, { 0x78FC95CA1BF83AABULL, 0x29FC63C84241113EULL } }, /* XSUM_XXH128_testdata[2929] */\n    {  976, 0x9E3779B185EBCA8DULL, { 0x37BAEA0B6E5FF98BULL, 0xED744374D02BF728ULL } }, /* XSUM_XXH128_testdata[2930] */\n    {  977, 0x0000000000000000ULL, { 0x5CCB2E293A449EF5ULL, 0x5F20D6521AF950CCULL } }, /* XSUM_XXH128_testdata[2931] */\n    {  977, 0x000000009E3779B1ULL, { 0xF2D458068FE676B2ULL, 0x5E8BD382773C8468ULL } }, /* XSUM_XXH128_testdata[2932] */\n    {  977, 0x9E3779B185EBCA8DULL, { 0x3D029A1FADD33504ULL, 0x045075000C19E718ULL } }, /* XSUM_XXH128_testdata[2933] */\n    {  978, 0x0000000000000000ULL, { 0x5BE8E278B6C809D3ULL, 0x30BC6764B04FC855ULL } }, /* XSUM_XXH128_testdata[2934] */\n    {  978, 0x000000009E3779B1ULL, { 0x61C6C496DC338059ULL, 0xEB7B1CD21D7FB368ULL } }, /* XSUM_XXH128_testdata[2935] */\n    {  978, 0x9E3779B185EBCA8DULL, { 0xC287AC22226D2098ULL, 0xB42EC5780F88317DULL } }, /* XSUM_XXH128_testdata[2936] */\n    {  979, 0x0000000000000000ULL, { 0x42B7B8DF99998767ULL, 0x5FD0888683769122ULL } }, /* XSUM_XXH128_testdata[2937] */\n    {  979, 0x000000009E3779B1ULL, { 0xE4A9A81D8AB4AB0DULL, 0x09CAB83508F4BD5BULL } }, /* XSUM_XXH128_testdata[2938] */\n    {  979, 0x9E3779B185EBCA8DULL, { 0x8DA15029F74AB2DEULL, 0xB9EF03E6F77426C0ULL } }, /* XSUM_XXH128_testdata[2939] */\n    {  980, 0x0000000000000000ULL, { 0x68F9C7FE0AC0FF69ULL, 0xF961B8B7C4D259C6ULL } }, /* XSUM_XXH128_testdata[2940] */\n    {  980, 0x000000009E3779B1ULL, { 0xF46558A491ACE20BULL, 0xBD21AB38EFCFF7FBULL } }, /* XSUM_XXH128_testdata[2941] */\n    {  980, 0x9E3779B185EBCA8DULL, { 0x37995AA9D23FD7E3ULL, 0xDBE4B9B2D499F8AFULL } }, /* XSUM_XXH128_testdata[2942] */\n    {  981, 0x0000000000000000ULL, { 0xB67A3268F002C6CBULL, 0x837269DB83EE1BF3ULL } }, /* XSUM_XXH128_testdata[2943] */\n    {  981, 0x000000009E3779B1ULL, { 0x323B2EFB702B748CULL, 0x0A3457180DFFBA66ULL } }, /* XSUM_XXH128_testdata[2944] */\n    {  981, 0x9E3779B185EBCA8DULL, { 0x82703E08CCCEDC61ULL, 0x2E823800A520503CULL } }, /* XSUM_XXH128_testdata[2945] */\n    {  982, 0x0000000000000000ULL, { 0xC047953EAE93E73CULL, 0xFD28DF741C4E0994ULL } }, /* XSUM_XXH128_testdata[2946] */\n    {  982, 0x000000009E3779B1ULL, { 0x46FB1C218744E6C0ULL, 0xF3CF166F1443839BULL } }, /* XSUM_XXH128_testdata[2947] */\n    {  982, 0x9E3779B185EBCA8DULL, { 0xE60DA263894C9E34ULL, 0xEB3A82222AB908C5ULL } }, /* XSUM_XXH128_testdata[2948] */\n    {  983, 0x0000000000000000ULL, { 0xE08022B8696243A0ULL, 0x5FC53C80C899CCA9ULL } }, /* XSUM_XXH128_testdata[2949] */\n    {  983, 0x000000009E3779B1ULL, { 0x9C1F7EAF0E17D458ULL, 0xD7AEC659568A77E7ULL } }, /* XSUM_XXH128_testdata[2950] */\n    {  983, 0x9E3779B185EBCA8DULL, { 0x6E9D9A802898AC15ULL, 0x485BD6F9D2F57BF2ULL } }, /* XSUM_XXH128_testdata[2951] */\n    {  984, 0x0000000000000000ULL, { 0x7F68AD9E65D86585ULL, 0x42824B590073B95BULL } }, /* XSUM_XXH128_testdata[2952] */\n    {  984, 0x000000009E3779B1ULL, { 0xFC562511C68C8543ULL, 0x5676AFEBB53CF3AAULL } }, /* XSUM_XXH128_testdata[2953] */\n    {  984, 0x9E3779B185EBCA8DULL, { 0xED88D56ECC065575ULL, 0x579F539793C722BAULL } }, /* XSUM_XXH128_testdata[2954] */\n    {  985, 0x0000000000000000ULL, { 0xF6A5C3B386A60BBFULL, 0x4D829A7DA2C980E5ULL } }, /* XSUM_XXH128_testdata[2955] */\n    {  985, 0x000000009E3779B1ULL, { 0xFBA4C26419019BB1ULL, 0xE5011E7E4B867266ULL } }, /* XSUM_XXH128_testdata[2956] */\n    {  985, 0x9E3779B185EBCA8DULL, { 0x77A345A5E3F88709ULL, 0xA34C2E4C3E019383ULL } }, /* XSUM_XXH128_testdata[2957] */\n    {  986, 0x0000000000000000ULL, { 0x58CC3E909FA9F5BDULL, 0xBCF19357547A46A1ULL } }, /* XSUM_XXH128_testdata[2958] */\n    {  986, 0x000000009E3779B1ULL, { 0x173E38D709F302D1ULL, 0xB75BEFA59DEE08E3ULL } }, /* XSUM_XXH128_testdata[2959] */\n    {  986, 0x9E3779B185EBCA8DULL, { 0x011D6945236E2C0CULL, 0x05D820528D3EC948ULL } }, /* XSUM_XXH128_testdata[2960] */\n    {  987, 0x0000000000000000ULL, { 0x0D47523883F69FA9ULL, 0x1795C3EE73981000ULL } }, /* XSUM_XXH128_testdata[2961] */\n    {  987, 0x000000009E3779B1ULL, { 0x1FB819973209AA58ULL, 0xD24DB7F040CC3DEEULL } }, /* XSUM_XXH128_testdata[2962] */\n    {  987, 0x9E3779B185EBCA8DULL, { 0x570D1E7719E41DC2ULL, 0x241C76567175D78BULL } }, /* XSUM_XXH128_testdata[2963] */\n    {  988, 0x0000000000000000ULL, { 0x1A1AC46CBBEAAAD1ULL, 0x1581FC5E25138E8BULL } }, /* XSUM_XXH128_testdata[2964] */\n    {  988, 0x000000009E3779B1ULL, { 0xC09665D37E45FF34ULL, 0x507ED52AF37C5411ULL } }, /* XSUM_XXH128_testdata[2965] */\n    {  988, 0x9E3779B185EBCA8DULL, { 0x9AED37FD61F9A416ULL, 0x1E8652590A8CFE56ULL } }, /* XSUM_XXH128_testdata[2966] */\n    {  989, 0x0000000000000000ULL, { 0x8E93C4B050966BB1ULL, 0xE6FA042B4AE9092AULL } }, /* XSUM_XXH128_testdata[2967] */\n    {  989, 0x000000009E3779B1ULL, { 0x88D498404E75B04CULL, 0x7564E8ED369CE2A3ULL } }, /* XSUM_XXH128_testdata[2968] */\n    {  989, 0x9E3779B185EBCA8DULL, { 0x108C8174101F0EACULL, 0x2CDB0009B6CA763BULL } }, /* XSUM_XXH128_testdata[2969] */\n    {  990, 0x0000000000000000ULL, { 0xC2EDA1B6BD6749BCULL, 0xE67F47F7F777DC0AULL } }, /* XSUM_XXH128_testdata[2970] */\n    {  990, 0x000000009E3779B1ULL, { 0x6A492B2F7CA2FA67ULL, 0xF6FC64CAC3D922B2ULL } }, /* XSUM_XXH128_testdata[2971] */\n    {  990, 0x9E3779B185EBCA8DULL, { 0xEC6BAD1C8B34102DULL, 0x6BE8F208CD58ACDFULL } }, /* XSUM_XXH128_testdata[2972] */\n    {  991, 0x0000000000000000ULL, { 0xC7B1972C9C921032ULL, 0x09D93682FCFE3170ULL } }, /* XSUM_XXH128_testdata[2973] */\n    {  991, 0x000000009E3779B1ULL, { 0xD23D32EB1718912DULL, 0x35FD137B362C4A29ULL } }, /* XSUM_XXH128_testdata[2974] */\n    {  991, 0x9E3779B185EBCA8DULL, { 0xEA5BCA1A20CEDB3EULL, 0x723401368315AE32ULL } }, /* XSUM_XXH128_testdata[2975] */\n    {  992, 0x0000000000000000ULL, { 0x18C85CB4A2C9A620ULL, 0x4147A4432667BA79ULL } }, /* XSUM_XXH128_testdata[2976] */\n    {  992, 0x000000009E3779B1ULL, { 0x82B61CD8ECA0EC08ULL, 0x7B5FFD78BFCCC64CULL } }, /* XSUM_XXH128_testdata[2977] */\n    {  992, 0x9E3779B185EBCA8DULL, { 0xB449E17F4B0FDD67ULL, 0x869F6166B91444BEULL } }, /* XSUM_XXH128_testdata[2978] */\n    {  993, 0x0000000000000000ULL, { 0xFEEDE161A30CA03AULL, 0xDEDF5D73D826310BULL } }, /* XSUM_XXH128_testdata[2979] */\n    {  993, 0x000000009E3779B1ULL, { 0x7B9643727C6A0198ULL, 0x4B46223E08EAF140ULL } }, /* XSUM_XXH128_testdata[2980] */\n    {  993, 0x9E3779B185EBCA8DULL, { 0x9F67135085013538ULL, 0xE76FC80B4F9FC779ULL } }, /* XSUM_XXH128_testdata[2981] */\n    {  994, 0x0000000000000000ULL, { 0xF6B293974CB25B1AULL, 0x1BAC94C63A84EB72ULL } }, /* XSUM_XXH128_testdata[2982] */\n    {  994, 0x000000009E3779B1ULL, { 0x01F3181E85CA645AULL, 0xB016984DFD718012ULL } }, /* XSUM_XXH128_testdata[2983] */\n    {  994, 0x9E3779B185EBCA8DULL, { 0x24528E293048D44AULL, 0xE77DFA6AA507A640ULL } }, /* XSUM_XXH128_testdata[2984] */\n    {  995, 0x0000000000000000ULL, { 0x746034558D6E91DEULL, 0xC4D942010178686CULL } }, /* XSUM_XXH128_testdata[2985] */\n    {  995, 0x000000009E3779B1ULL, { 0xC5568304397C6210ULL, 0x2EEAA0DF443FBEFEULL } }, /* XSUM_XXH128_testdata[2986] */\n    {  995, 0x9E3779B185EBCA8DULL, { 0x5C3241656A5ACEE4ULL, 0x951A37627C03CEFCULL } }, /* XSUM_XXH128_testdata[2987] */\n    {  996, 0x0000000000000000ULL, { 0x2DE3D36B702237AEULL, 0xBA750AF26E73F841ULL } }, /* XSUM_XXH128_testdata[2988] */\n    {  996, 0x000000009E3779B1ULL, { 0xFB4B0B229BE66D6FULL, 0xA06F84C8BE16CAB2ULL } }, /* XSUM_XXH128_testdata[2989] */\n    {  996, 0x9E3779B185EBCA8DULL, { 0x76F1F1A3E234DE7BULL, 0x3A14E441D4265653ULL } }, /* XSUM_XXH128_testdata[2990] */\n    {  997, 0x0000000000000000ULL, { 0x6192470CD9AD6E76ULL, 0xF3620C6D1E4D403DULL } }, /* XSUM_XXH128_testdata[2991] */\n    {  997, 0x000000009E3779B1ULL, { 0x2F6E1B2AD67F361FULL, 0x865722A3DE2C5D91ULL } }, /* XSUM_XXH128_testdata[2992] */\n    {  997, 0x9E3779B185EBCA8DULL, { 0x0E079ABD2F1B1C45ULL, 0x38B74FD150FDD2C2ULL } }, /* XSUM_XXH128_testdata[2993] */\n    {  998, 0x0000000000000000ULL, { 0x7734E47623D6B685ULL, 0x6BB414AB83554868ULL } }, /* XSUM_XXH128_testdata[2994] */\n    {  998, 0x000000009E3779B1ULL, { 0x963F5D12A8E2B0E7ULL, 0xCB315DFAC5960D57ULL } }, /* XSUM_XXH128_testdata[2995] */\n    {  998, 0x9E3779B185EBCA8DULL, { 0xE3434BA35184F2C1ULL, 0x89EA478EAA5EB072ULL } }, /* XSUM_XXH128_testdata[2996] */\n    {  999, 0x0000000000000000ULL, { 0x55A65708067ACEDCULL, 0xAAAF80EDEE954CB4ULL } }, /* XSUM_XXH128_testdata[2997] */\n    {  999, 0x000000009E3779B1ULL, { 0x2031CFC2055D17A2ULL, 0x73C964EDAD129BA9ULL } }, /* XSUM_XXH128_testdata[2998] */\n    {  999, 0x9E3779B185EBCA8DULL, { 0x27CC8E3AE8EE40D8ULL, 0x1F537C7FF88DF8FEULL } }, /* XSUM_XXH128_testdata[2999] */\n    { 1000, 0x0000000000000000ULL, { 0xACA2DDE0F1951B9AULL, 0x9B857ABF662E5A25ULL } }, /* XSUM_XXH128_testdata[3000] */\n    { 1000, 0x000000009E3779B1ULL, { 0x43A934BC1022CFA2ULL, 0xFD7DA20330479061ULL } }, /* XSUM_XXH128_testdata[3001] */\n    { 1000, 0x9E3779B185EBCA8DULL, { 0xF4DD9ADF00FFB410ULL, 0x628DE7FF3227FE4EULL } }, /* XSUM_XXH128_testdata[3002] */\n    { 1001, 0x0000000000000000ULL, { 0xE9101423F454BD38ULL, 0xCD5E3C397F1723C7ULL } }, /* XSUM_XXH128_testdata[3003] */\n    { 1001, 0x000000009E3779B1ULL, { 0x9391906FB5D868A3ULL, 0x4267EC273C22D27DULL } }, /* XSUM_XXH128_testdata[3004] */\n    { 1001, 0x9E3779B185EBCA8DULL, { 0xC68210B5AC8E382BULL, 0xB1E746E21ADFEF59ULL } }, /* XSUM_XXH128_testdata[3005] */\n    { 1002, 0x0000000000000000ULL, { 0xF49D4971CEA05084ULL, 0x5DEEB3E3297CDF61ULL } }, /* XSUM_XXH128_testdata[3006] */\n    { 1002, 0x000000009E3779B1ULL, { 0x84BAC8866CFBE62AULL, 0xB551CE36205CBF6BULL } }, /* XSUM_XXH128_testdata[3007] */\n    { 1002, 0x9E3779B185EBCA8DULL, { 0x3D2A97C8F19264B1ULL, 0xBDE2A395425C028CULL } }, /* XSUM_XXH128_testdata[3008] */\n    { 1003, 0x0000000000000000ULL, { 0xBEBD123678D098EDULL, 0x3A8D2D2DC43DB7F7ULL } }, /* XSUM_XXH128_testdata[3009] */\n    { 1003, 0x000000009E3779B1ULL, { 0x0EA2CAE06A0132AEULL, 0xCCF42BC61B629204ULL } }, /* XSUM_XXH128_testdata[3010] */\n    { 1003, 0x9E3779B185EBCA8DULL, { 0x36DDC18A5C58CB6BULL, 0xC620D2351E441575ULL } }, /* XSUM_XXH128_testdata[3011] */\n    { 1004, 0x0000000000000000ULL, { 0xD386DFEFE995B490ULL, 0xC8A965459B33D032ULL } }, /* XSUM_XXH128_testdata[3012] */\n    { 1004, 0x000000009E3779B1ULL, { 0x06398004A63F7795ULL, 0x36C4F494D3E2CA78ULL } }, /* XSUM_XXH128_testdata[3013] */\n    { 1004, 0x9E3779B185EBCA8DULL, { 0x2F3BC3AA5EF7DC03ULL, 0x6C016CB2728539BDULL } }, /* XSUM_XXH128_testdata[3014] */\n    { 1005, 0x0000000000000000ULL, { 0x4E1A567D14E33DE3ULL, 0xC1F1A89A2DD5289DULL } }, /* XSUM_XXH128_testdata[3015] */\n    { 1005, 0x000000009E3779B1ULL, { 0xFE8E9E01C6A26739ULL, 0xF518EA3CD34F8EBDULL } }, /* XSUM_XXH128_testdata[3016] */\n    { 1005, 0x9E3779B185EBCA8DULL, { 0xA031BB7B4EB59BB4ULL, 0xF7FDC9DFD71B9401ULL } }, /* XSUM_XXH128_testdata[3017] */\n    { 1006, 0x0000000000000000ULL, { 0xFC95AF5EB710D6E2ULL, 0x8836516301B915F4ULL } }, /* XSUM_XXH128_testdata[3018] */\n    { 1006, 0x000000009E3779B1ULL, { 0xEFBF4F5196C66F1FULL, 0x62A4EA08757775D2ULL } }, /* XSUM_XXH128_testdata[3019] */\n    { 1006, 0x9E3779B185EBCA8DULL, { 0x8AE9398B0A28B5A6ULL, 0xFA33031DC7D98BADULL } }, /* XSUM_XXH128_testdata[3020] */\n    { 1007, 0x0000000000000000ULL, { 0x3C94D3B1BE27DF09ULL, 0xF9AA6E05CE76ACBAULL } }, /* XSUM_XXH128_testdata[3021] */\n    { 1007, 0x000000009E3779B1ULL, { 0x08C69442145A9977ULL, 0xAAC33525E6E2A20BULL } }, /* XSUM_XXH128_testdata[3022] */\n    { 1007, 0x9E3779B185EBCA8DULL, { 0x1AFF90CE06456B96ULL, 0xDB3C5ED47F6EF373ULL } }, /* XSUM_XXH128_testdata[3023] */\n    { 1008, 0x0000000000000000ULL, { 0x7443AF3E66764D1EULL, 0x1A866F2FAA47512AULL } }, /* XSUM_XXH128_testdata[3024] */\n    { 1008, 0x000000009E3779B1ULL, { 0x03FE05EAFDEC001BULL, 0xB736B9F6CE74492EULL } }, /* XSUM_XXH128_testdata[3025] */\n    { 1008, 0x9E3779B185EBCA8DULL, { 0x3F58BAB1AA894D38ULL, 0x0AD76B436F9799D4ULL } }, /* XSUM_XXH128_testdata[3026] */\n    { 1009, 0x0000000000000000ULL, { 0x4380AF6AD92B433CULL, 0x9D23EAD9DBE63D80ULL } }, /* XSUM_XXH128_testdata[3027] */\n    { 1009, 0x000000009E3779B1ULL, { 0x7E116B10AC9F9738ULL, 0x20ED143070756116ULL } }, /* XSUM_XXH128_testdata[3028] */\n    { 1009, 0x9E3779B185EBCA8DULL, { 0xF32A8F872502E567ULL, 0x779D3A9E57E1A0A7ULL } }, /* XSUM_XXH128_testdata[3029] */\n    { 1010, 0x0000000000000000ULL, { 0x320660076851588DULL, 0xB1EE00F0A740CA61ULL } }, /* XSUM_XXH128_testdata[3030] */\n    { 1010, 0x000000009E3779B1ULL, { 0x18CEC274BC2AFFCEULL, 0x4AB60AA701C8D322ULL } }, /* XSUM_XXH128_testdata[3031] */\n    { 1010, 0x9E3779B185EBCA8DULL, { 0xA0EA89CBE904A81DULL, 0x1FA67E28EFC620F5ULL } }, /* XSUM_XXH128_testdata[3032] */\n    { 1011, 0x0000000000000000ULL, { 0xA9B11CA20334C7EDULL, 0xD9F5E80575541F73ULL } }, /* XSUM_XXH128_testdata[3033] */\n    { 1011, 0x000000009E3779B1ULL, { 0x079CE54326ADD435ULL, 0x631F2B6BA36118BCULL } }, /* XSUM_XXH128_testdata[3034] */\n    { 1011, 0x9E3779B185EBCA8DULL, { 0x58D0282A68653B68ULL, 0xA75C0D59F15ECEC8ULL } }, /* XSUM_XXH128_testdata[3035] */\n    { 1012, 0x0000000000000000ULL, { 0xC434B9AD89D8BFBAULL, 0x11A716644D1A9A2BULL } }, /* XSUM_XXH128_testdata[3036] */\n    { 1012, 0x000000009E3779B1ULL, { 0xC5FCD7165D9802E1ULL, 0xA899C3CF940FD8F8ULL } }, /* XSUM_XXH128_testdata[3037] */\n    { 1012, 0x9E3779B185EBCA8DULL, { 0x0653B8DDDF575EA5ULL, 0x37B42FC4F1C1A8E7ULL } }, /* XSUM_XXH128_testdata[3038] */\n    { 1013, 0x0000000000000000ULL, { 0x5791552B6B00AECCULL, 0x66939E957761B360ULL } }, /* XSUM_XXH128_testdata[3039] */\n    { 1013, 0x000000009E3779B1ULL, { 0xC3B255198937C2C3ULL, 0xCEA2048357FF62B9ULL } }, /* XSUM_XXH128_testdata[3040] */\n    { 1013, 0x9E3779B185EBCA8DULL, { 0x69069D993E0CE6ABULL, 0xC9231946FCE0FD2FULL } }, /* XSUM_XXH128_testdata[3041] */\n    { 1014, 0x0000000000000000ULL, { 0xF74095848CED1A23ULL, 0x8B0E3D59875267AAULL } }, /* XSUM_XXH128_testdata[3042] */\n    { 1014, 0x000000009E3779B1ULL, { 0xDB086A6B58E67512ULL, 0x71623449B9360D8BULL } }, /* XSUM_XXH128_testdata[3043] */\n    { 1014, 0x9E3779B185EBCA8DULL, { 0x346F7032D6AC56D8ULL, 0x66507AA2A0250920ULL } }, /* XSUM_XXH128_testdata[3044] */\n    { 1015, 0x0000000000000000ULL, { 0xBF0615AAE6F0E1D9ULL, 0x59FF0CA2A27A743FULL } }, /* XSUM_XXH128_testdata[3045] */\n    { 1015, 0x000000009E3779B1ULL, { 0xBD9CF7FAAFB4E8D9ULL, 0x8976CE7B641DD4B5ULL } }, /* XSUM_XXH128_testdata[3046] */\n    { 1015, 0x9E3779B185EBCA8DULL, { 0xABBA2C176705503BULL, 0x105AEF2A7E645164ULL } }, /* XSUM_XXH128_testdata[3047] */\n    { 1016, 0x0000000000000000ULL, { 0xC5DBE5C1E77C6B4AULL, 0xCD695E0F071715A1ULL } }, /* XSUM_XXH128_testdata[3048] */\n    { 1016, 0x000000009E3779B1ULL, { 0x5F1E4D2596159339ULL, 0x56E50EFE3914774AULL } }, /* XSUM_XXH128_testdata[3049] */\n    { 1016, 0x9E3779B185EBCA8DULL, { 0x5D66B028CDDB8081ULL, 0x4D7EC39E7233691EULL } }, /* XSUM_XXH128_testdata[3050] */\n    { 1017, 0x0000000000000000ULL, { 0xFCC3D23FCA4F2F34ULL, 0x575B96EA7526700DULL } }, /* XSUM_XXH128_testdata[3051] */\n    { 1017, 0x000000009E3779B1ULL, { 0xD6D6319A6EE46FF2ULL, 0xAFC67A67572806D8ULL } }, /* XSUM_XXH128_testdata[3052] */\n    { 1017, 0x9E3779B185EBCA8DULL, { 0xE6F90A0F39E023A0ULL, 0x1700D1DFE8426F34ULL } }, /* XSUM_XXH128_testdata[3053] */\n    { 1018, 0x0000000000000000ULL, { 0x9AB47ADA8C071173ULL, 0x5D7DA0F19C7F608AULL } }, /* XSUM_XXH128_testdata[3054] */\n    { 1018, 0x000000009E3779B1ULL, { 0xF1638B9E3D33EC62ULL, 0x1D3C85B93B824F15ULL } }, /* XSUM_XXH128_testdata[3055] */\n    { 1018, 0x9E3779B185EBCA8DULL, { 0x6D49E13111072E23ULL, 0xB1A855B9DCC5E22AULL } }, /* XSUM_XXH128_testdata[3056] */\n    { 1019, 0x0000000000000000ULL, { 0x5C4B1CCBE7064BAAULL, 0xB44AB6CE817A2D48ULL } }, /* XSUM_XXH128_testdata[3057] */\n    { 1019, 0x000000009E3779B1ULL, { 0xA18610EDF4F720BAULL, 0x76BD23E02396D0B8ULL } }, /* XSUM_XXH128_testdata[3058] */\n    { 1019, 0x9E3779B185EBCA8DULL, { 0x1F6737EEC7BD8C58ULL, 0xA2DC5623A04FB112ULL } }, /* XSUM_XXH128_testdata[3059] */\n    { 1020, 0x0000000000000000ULL, { 0x0FBE1CF65215FDE2ULL, 0xF7C89A39836D3C75ULL } }, /* XSUM_XXH128_testdata[3060] */\n    { 1020, 0x000000009E3779B1ULL, { 0x209E782126B20852ULL, 0x6A1B20713BC00CE2ULL } }, /* XSUM_XXH128_testdata[3061] */\n    { 1020, 0x9E3779B185EBCA8DULL, { 0xE9C7080F15D87D03ULL, 0x45014E5E5DB1C51FULL } }, /* XSUM_XXH128_testdata[3062] */\n    { 1021, 0x0000000000000000ULL, { 0x8770C599A57B5E49ULL, 0x2DA6EB0FE1AB361BULL } }, /* XSUM_XXH128_testdata[3063] */\n    { 1021, 0x000000009E3779B1ULL, { 0xB50620418B7CB38FULL, 0xFD3FF5E7B0678908ULL } }, /* XSUM_XXH128_testdata[3064] */\n    { 1021, 0x9E3779B185EBCA8DULL, { 0xA3E7956E4C5003B5ULL, 0x400B78466BBDA1D3ULL } }, /* XSUM_XXH128_testdata[3065] */\n    { 1022, 0x0000000000000000ULL, { 0x2086CA2AFA9691C3ULL, 0xD023203A82F9709AULL } }, /* XSUM_XXH128_testdata[3066] */\n    { 1022, 0x000000009E3779B1ULL, { 0x3BD3FCF081C8F1F2ULL, 0x141EDED83C7DD1A3ULL } }, /* XSUM_XXH128_testdata[3067] */\n    { 1022, 0x9E3779B185EBCA8DULL, { 0x9EE4476C3178A9C6ULL, 0x8E9950C03129B3AAULL } }, /* XSUM_XXH128_testdata[3068] */\n    { 1023, 0x0000000000000000ULL, { 0x87A8F7B2F2E22496ULL, 0xE8083E4D83214C3CULL } }, /* XSUM_XXH128_testdata[3069] */\n    { 1023, 0x000000009E3779B1ULL, { 0xC38922D5971CD2D7ULL, 0xFBD299789B9A9759ULL } }, /* XSUM_XXH128_testdata[3070] */\n    { 1023, 0x9E3779B185EBCA8DULL, { 0x0F0F02DE8590E1B5ULL, 0x96B80FE329CE5E35ULL } }, /* XSUM_XXH128_testdata[3071] */\n    { 1024, 0x0000000000000000ULL, { 0xDD85C9B5C1109C5CULL, 0x0D30D24071C64C57ULL } }, /* XSUM_XXH128_testdata[3072] */\n    { 1024, 0x000000009E3779B1ULL, { 0xB8B95C07CD4A75FAULL, 0x885B0B4DEBE3D2FFULL } }, /* XSUM_XXH128_testdata[3073] */\n    { 1024, 0x9E3779B185EBCA8DULL, { 0xEF368A8A2EBABAEFULL, 0x17600EFE2B493A18ULL } }, /* XSUM_XXH128_testdata[3074] */\n    { 1025, 0x0000000000000000ULL, { 0xD870C0FA13211C6AULL, 0xFD3EE4FE7F2954C6ULL } }, /* XSUM_XXH128_testdata[3075] */\n    { 1025, 0x000000009E3779B1ULL, { 0x2F15255340AE4F6CULL, 0x3364FAD6F5FF1741ULL } }, /* XSUM_XXH128_testdata[3076] */\n    { 1025, 0x9E3779B185EBCA8DULL, { 0x96792BCF9AF88519ULL, 0x2C383949F57BF7E1ULL } }, /* XSUM_XXH128_testdata[3077] */\n    { 1026, 0x0000000000000000ULL, { 0x98CE9E9675649F1BULL, 0xEE151334890B008EULL } }, /* XSUM_XXH128_testdata[3078] */\n    { 1026, 0x000000009E3779B1ULL, { 0xAE374C50E2D72D3FULL, 0x3C0083CA64056177ULL } }, /* XSUM_XXH128_testdata[3079] */\n    { 1026, 0x9E3779B185EBCA8DULL, { 0x8B5475338DDAF953ULL, 0x5C70F4886F10F90CULL } }, /* XSUM_XXH128_testdata[3080] */\n    { 1027, 0x0000000000000000ULL, { 0x1DB6A5ED5D936883ULL, 0x4B58657B8E4AF4AFULL } }, /* XSUM_XXH128_testdata[3081] */\n    { 1027, 0x000000009E3779B1ULL, { 0x1F0327D5BC92B0C2ULL, 0x15D8618535E13AF6ULL } }, /* XSUM_XXH128_testdata[3082] */\n    { 1027, 0x9E3779B185EBCA8DULL, { 0xCEF217D93E959D1AULL, 0xCF4BFDDF7CA0D775ULL } }, /* XSUM_XXH128_testdata[3083] */\n    { 1028, 0x0000000000000000ULL, { 0x9C9AD07A2A115FA7ULL, 0x7A56749DDBBFF06CULL } }, /* XSUM_XXH128_testdata[3084] */\n    { 1028, 0x000000009E3779B1ULL, { 0x9E7FB5B07B5F3192ULL, 0x0EF83467C7BC898BULL } }, /* XSUM_XXH128_testdata[3085] */\n    { 1028, 0x9E3779B185EBCA8DULL, { 0x5D36EACAADB1279BULL, 0xF632E67B93AF874FULL } }, /* XSUM_XXH128_testdata[3086] */\n    { 1029, 0x0000000000000000ULL, { 0x155F9CDB78CD7842ULL, 0xC37AFC8DDC71AEAEULL } }, /* XSUM_XXH128_testdata[3087] */\n    { 1029, 0x000000009E3779B1ULL, { 0x904C9864D6A85F01ULL, 0x091A2F9642287C23ULL } }, /* XSUM_XXH128_testdata[3088] */\n    { 1029, 0x9E3779B185EBCA8DULL, { 0xFAA98C40D531E1DEULL, 0x0E599B28E5E063C5ULL } }, /* XSUM_XXH128_testdata[3089] */\n    { 1030, 0x0000000000000000ULL, { 0x7A956CA41E99B600ULL, 0xF858F386920C9388ULL } }, /* XSUM_XXH128_testdata[3090] */\n    { 1030, 0x000000009E3779B1ULL, { 0x9AC874B5EB45869FULL, 0x8FA4FCA206DF6A10ULL } }, /* XSUM_XXH128_testdata[3091] */\n    { 1030, 0x9E3779B185EBCA8DULL, { 0x0B5360BD1D404FDEULL, 0xE60BE4A532669E16ULL } }, /* XSUM_XXH128_testdata[3092] */\n    { 1031, 0x0000000000000000ULL, { 0x69DABF166D51A277ULL, 0xCBE5A10A27AA237FULL } }, /* XSUM_XXH128_testdata[3093] */\n    { 1031, 0x000000009E3779B1ULL, { 0x105D1BB70EFEF0CBULL, 0xD0B2BB8DB3A15ABCULL } }, /* XSUM_XXH128_testdata[3094] */\n    { 1031, 0x9E3779B185EBCA8DULL, { 0x8CA6A3E7C08A8FC3ULL, 0xD77C4B95D9C8C6C6ULL } }, /* XSUM_XXH128_testdata[3095] */\n    { 1032, 0x0000000000000000ULL, { 0x971F86A1BDCFE566ULL, 0x053279B8EEDE85BCULL } }, /* XSUM_XXH128_testdata[3096] */\n    { 1032, 0x000000009E3779B1ULL, { 0x752E4DA9C60E7106ULL, 0x9E3BBE6E4EDEE493ULL } }, /* XSUM_XXH128_testdata[3097] */\n    { 1032, 0x9E3779B185EBCA8DULL, { 0x2E881BB43B229931ULL, 0x385AEA4F07C8434DULL } }, /* XSUM_XXH128_testdata[3098] */\n    { 1033, 0x0000000000000000ULL, { 0xBE464C7E96B871BAULL, 0x1AF383B560E7033BULL } }, /* XSUM_XXH128_testdata[3099] */\n    { 1033, 0x000000009E3779B1ULL, { 0xCF5E4D4953EDFDC3ULL, 0x19303BEF82C5C2C2ULL } }, /* XSUM_XXH128_testdata[3100] */\n    { 1033, 0x9E3779B185EBCA8DULL, { 0x6F43FF0A9C9EA244ULL, 0x89A36983BC2FE360ULL } }, /* XSUM_XXH128_testdata[3101] */\n    { 1034, 0x0000000000000000ULL, { 0xC02521049DF92CB8ULL, 0x02B8D7F417E60C9FULL } }, /* XSUM_XXH128_testdata[3102] */\n    { 1034, 0x000000009E3779B1ULL, { 0x9FA1514AF1A909C1ULL, 0x521A696ABA93A81DULL } }, /* XSUM_XXH128_testdata[3103] */\n    { 1034, 0x9E3779B185EBCA8DULL, { 0x3F06DEBD338EA1A5ULL, 0x70CB05B561F82AC2ULL } }, /* XSUM_XXH128_testdata[3104] */\n    { 1035, 0x0000000000000000ULL, { 0x06BBBE5C26B7CB77ULL, 0x923C0E232D6E73C5ULL } }, /* XSUM_XXH128_testdata[3105] */\n    { 1035, 0x000000009E3779B1ULL, { 0xA51C9481EA348B84ULL, 0x682871E76599932EULL } }, /* XSUM_XXH128_testdata[3106] */\n    { 1035, 0x9E3779B185EBCA8DULL, { 0xC250E703CD1FBE84ULL, 0xAE22CABCF907ABC3ULL } }, /* XSUM_XXH128_testdata[3107] */\n    { 1036, 0x0000000000000000ULL, { 0x01D826626E65A2EEULL, 0x37699FADFB3EE3B5ULL } }, /* XSUM_XXH128_testdata[3108] */\n    { 1036, 0x000000009E3779B1ULL, { 0x0354AEC394F722E2ULL, 0x5A51B598E556AF2CULL } }, /* XSUM_XXH128_testdata[3109] */\n    { 1036, 0x9E3779B185EBCA8DULL, { 0x69A7882D6C8BDE53ULL, 0xD93DECE766339534ULL } }, /* XSUM_XXH128_testdata[3110] */\n    { 1037, 0x0000000000000000ULL, { 0xF063CB9CD4578A55ULL, 0x217A9743B69DB236ULL } }, /* XSUM_XXH128_testdata[3111] */\n    { 1037, 0x000000009E3779B1ULL, { 0xB59264E735CA2A97ULL, 0xAE1FF0D793E4455FULL } }, /* XSUM_XXH128_testdata[3112] */\n    { 1037, 0x9E3779B185EBCA8DULL, { 0x3FD4F7F303870465ULL, 0x9C8329FB792696D9ULL } }, /* XSUM_XXH128_testdata[3113] */\n    { 1038, 0x0000000000000000ULL, { 0x8E349F3D8D9F2F90ULL, 0x371AB2A11B4D55BCULL } }, /* XSUM_XXH128_testdata[3114] */\n    { 1038, 0x000000009E3779B1ULL, { 0x978E2A55DFE5500BULL, 0x7E13F04B6D7D2F20ULL } }, /* XSUM_XXH128_testdata[3115] */\n    { 1038, 0x9E3779B185EBCA8DULL, { 0x391C8D2CFE8B4B34ULL, 0x09A2B027A407E0C9ULL } }, /* XSUM_XXH128_testdata[3116] */\n    { 1039, 0x0000000000000000ULL, { 0xF1116C1D2A9292B2ULL, 0x4BF7CBFAB6026380ULL } }, /* XSUM_XXH128_testdata[3117] */\n    { 1039, 0x000000009E3779B1ULL, { 0xFE5635C09856C327ULL, 0x3D099743CC624918ULL } }, /* XSUM_XXH128_testdata[3118] */\n    { 1039, 0x9E3779B185EBCA8DULL, { 0xD06F9DAB13FE02D2ULL, 0xA60AD86A2511F523ULL } }, /* XSUM_XXH128_testdata[3119] */\n    { 1040, 0x0000000000000000ULL, { 0xA76D74A9DE8985A1ULL, 0x2289E2415D65F4C5ULL } }, /* XSUM_XXH128_testdata[3120] */\n    { 1040, 0x000000009E3779B1ULL, { 0x794D00163F7C0DB8ULL, 0xB624711373D5E995ULL } }, /* XSUM_XXH128_testdata[3121] */\n    { 1040, 0x9E3779B185EBCA8DULL, { 0x5A4223F66103555EULL, 0xC5CC1996E8343B60ULL } }, /* XSUM_XXH128_testdata[3122] */\n    { 1041, 0x0000000000000000ULL, { 0x3CEFA31E899356DAULL, 0xB31BCE9D64BF4298ULL } }, /* XSUM_XXH128_testdata[3123] */\n    { 1041, 0x000000009E3779B1ULL, { 0xCCCE6AF53B48E00CULL, 0x57CBBCD67C55FC70ULL } }, /* XSUM_XXH128_testdata[3124] */\n    { 1041, 0x9E3779B185EBCA8DULL, { 0xF56CAFC19E330D25ULL, 0xAA6D0F3CA0E02E3EULL } }, /* XSUM_XXH128_testdata[3125] */\n    { 1042, 0x0000000000000000ULL, { 0xB6DD00ABD69F904DULL, 0x61B8B62E3C97ED49ULL } }, /* XSUM_XXH128_testdata[3126] */\n    { 1042, 0x000000009E3779B1ULL, { 0xADF9F6C5ABCEF803ULL, 0xDC0D91D25CE460D7ULL } }, /* XSUM_XXH128_testdata[3127] */\n    { 1042, 0x9E3779B185EBCA8DULL, { 0x8A1A4C162B4E6894ULL, 0x7D98ADBED6194B20ULL } }, /* XSUM_XXH128_testdata[3128] */\n    { 1043, 0x0000000000000000ULL, { 0x8E91C0D2A6A52133ULL, 0x3FA3A2C956CB274FULL } }, /* XSUM_XXH128_testdata[3129] */\n    { 1043, 0x000000009E3779B1ULL, { 0x83304D090A9A29EBULL, 0x9850B99FDACF5C80ULL } }, /* XSUM_XXH128_testdata[3130] */\n    { 1043, 0x9E3779B185EBCA8DULL, { 0xCC9CAA0268B76274ULL, 0x1AA1C4CF8F368BA7ULL } }, /* XSUM_XXH128_testdata[3131] */\n    { 1044, 0x0000000000000000ULL, { 0xB8C3C0659B2FE068ULL, 0xE20D1BCA7FFF0578ULL } }, /* XSUM_XXH128_testdata[3132] */\n    { 1044, 0x000000009E3779B1ULL, { 0x781FEA5CD89F480AULL, 0x0CDF5B35E3F8EFE6ULL } }, /* XSUM_XXH128_testdata[3133] */\n    { 1044, 0x9E3779B185EBCA8DULL, { 0xBA33A9EA471FDC10ULL, 0x42141012EE399E85ULL } }, /* XSUM_XXH128_testdata[3134] */\n    { 1045, 0x0000000000000000ULL, { 0x2BECBE68662B71E0ULL, 0x68795AEF5C343E43ULL } }, /* XSUM_XXH128_testdata[3135] */\n    { 1045, 0x000000009E3779B1ULL, { 0xF4DADF9760495F99ULL, 0x8FECBAC9BEABA21CULL } }, /* XSUM_XXH128_testdata[3136] */\n    { 1045, 0x9E3779B185EBCA8DULL, { 0x6A8FD42845F6A964ULL, 0x4A9B1705217F96B8ULL } }, /* XSUM_XXH128_testdata[3137] */\n    { 1046, 0x0000000000000000ULL, { 0x4D5C08103EADC069ULL, 0x7B695A6686C328ABULL } }, /* XSUM_XXH128_testdata[3138] */\n    { 1046, 0x000000009E3779B1ULL, { 0xE34BBB351E079BEDULL, 0x46F9251D434FA386ULL } }, /* XSUM_XXH128_testdata[3139] */\n    { 1046, 0x9E3779B185EBCA8DULL, { 0x25E533F4C6E77AF2ULL, 0x55494736ECF60F51ULL } }, /* XSUM_XXH128_testdata[3140] */\n    { 1047, 0x0000000000000000ULL, { 0x76713E6C64770146ULL, 0x136AFF1C1E12EB07ULL } }, /* XSUM_XXH128_testdata[3141] */\n    { 1047, 0x000000009E3779B1ULL, { 0x6F4434CA0DBAF0E7ULL, 0x9A3CBBD16F4106B2ULL } }, /* XSUM_XXH128_testdata[3142] */\n    { 1047, 0x9E3779B185EBCA8DULL, { 0x01ECB772F5B9494FULL, 0x6AA3B092C9F69CC3ULL } }, /* XSUM_XXH128_testdata[3143] */\n    { 1048, 0x0000000000000000ULL, { 0xE052326CFD55516EULL, 0xE67A159870D95418ULL } }, /* XSUM_XXH128_testdata[3144] */\n    { 1048, 0x000000009E3779B1ULL, { 0xE942330C1837D46BULL, 0xDE44A170AA5A1897ULL } }, /* XSUM_XXH128_testdata[3145] */\n    { 1048, 0x9E3779B185EBCA8DULL, { 0x676DD5995DED903AULL, 0x31AA23390F667F90ULL } }, /* XSUM_XXH128_testdata[3146] */\n    { 1049, 0x0000000000000000ULL, { 0xF7D3712B50172434ULL, 0x565C8A7216DF298CULL } }, /* XSUM_XXH128_testdata[3147] */\n    { 1049, 0x000000009E3779B1ULL, { 0x7EFCBA86DB925C33ULL, 0x7A5FAD7D0E839BA6ULL } }, /* XSUM_XXH128_testdata[3148] */\n    { 1049, 0x9E3779B185EBCA8DULL, { 0x75EE9355894644BDULL, 0xAE2C792381F56801ULL } }, /* XSUM_XXH128_testdata[3149] */\n    { 1050, 0x0000000000000000ULL, { 0x8A40AD467C7AEA14ULL, 0x38A012D5BA000C20ULL } }, /* XSUM_XXH128_testdata[3150] */\n    { 1050, 0x000000009E3779B1ULL, { 0x881E6100D2F70FB3ULL, 0xD9F5A6A61AA8485EULL } }, /* XSUM_XXH128_testdata[3151] */\n    { 1050, 0x9E3779B185EBCA8DULL, { 0xF5EA7D72E1FD129AULL, 0xF53ED06335FE4CC3ULL } }, /* XSUM_XXH128_testdata[3152] */\n    { 1051, 0x0000000000000000ULL, { 0xBCA7110967265077ULL, 0x9A1ED6701F5DAC44ULL } }, /* XSUM_XXH128_testdata[3153] */\n    { 1051, 0x000000009E3779B1ULL, { 0x6B775F4EC590D06DULL, 0x836F90EB1BC15B6CULL } }, /* XSUM_XXH128_testdata[3154] */\n    { 1051, 0x9E3779B185EBCA8DULL, { 0x4FE88A33E2612E11ULL, 0x29ABCD1D3FB620F1ULL } }, /* XSUM_XXH128_testdata[3155] */\n    { 1052, 0x0000000000000000ULL, { 0x5B33B788EAD4AD6EULL, 0xE1085F40606AD022ULL } }, /* XSUM_XXH128_testdata[3156] */\n    { 1052, 0x000000009E3779B1ULL, { 0xF2DE2A80C9164C1CULL, 0x0AAD1EF173251944ULL } }, /* XSUM_XXH128_testdata[3157] */\n    { 1052, 0x9E3779B185EBCA8DULL, { 0xCE71C2965772443BULL, 0x320EC901B21B5F32ULL } }, /* XSUM_XXH128_testdata[3158] */\n    { 1053, 0x0000000000000000ULL, { 0xA5955CEE33323105ULL, 0x25C2C6DCAD6868D1ULL } }, /* XSUM_XXH128_testdata[3159] */\n    { 1053, 0x000000009E3779B1ULL, { 0xCA069C238DF7AD6FULL, 0x930C65DC803F4516ULL } }, /* XSUM_XXH128_testdata[3160] */\n    { 1053, 0x9E3779B185EBCA8DULL, { 0x57A968DEB59A1A8FULL, 0x491C886AA6A715CDULL } }, /* XSUM_XXH128_testdata[3161] */\n    { 1054, 0x0000000000000000ULL, { 0x00C093D5578529D4ULL, 0x8A5F68353FC33AEEULL } }, /* XSUM_XXH128_testdata[3162] */\n    { 1054, 0x000000009E3779B1ULL, { 0x20DEC6EE239904B7ULL, 0x09253916D656F411ULL } }, /* XSUM_XXH128_testdata[3163] */\n    { 1054, 0x9E3779B185EBCA8DULL, { 0xCCA75C47DCFF1A43ULL, 0x69BCF0703E6247FBULL } }, /* XSUM_XXH128_testdata[3164] */\n    { 1055, 0x0000000000000000ULL, { 0xC574284022BCF09BULL, 0x70C150ED537F8A75ULL } }, /* XSUM_XXH128_testdata[3165] */\n    { 1055, 0x000000009E3779B1ULL, { 0x18C11EE0B8F30BA7ULL, 0x271FB23A479ED13FULL } }, /* XSUM_XXH128_testdata[3166] */\n    { 1055, 0x9E3779B185EBCA8DULL, { 0x2A22F1BC3CDC5A70ULL, 0xCCB03C660C4A0A6CULL } }, /* XSUM_XXH128_testdata[3167] */\n    { 1056, 0x0000000000000000ULL, { 0xA394C3F1F7C215F1ULL, 0x7422F22B91AEA862ULL } }, /* XSUM_XXH128_testdata[3168] */\n    { 1056, 0x000000009E3779B1ULL, { 0x9AC01799DDA8AFF6ULL, 0x78E99994304F4DA9ULL } }, /* XSUM_XXH128_testdata[3169] */\n    { 1056, 0x9E3779B185EBCA8DULL, { 0x7A6839FC8587F140ULL, 0xCBA176F0C4B10EFEULL } }, /* XSUM_XXH128_testdata[3170] */\n    { 1057, 0x0000000000000000ULL, { 0x36E45F0DDC00F0C5ULL, 0xEDD99A3D45541C74ULL } }, /* XSUM_XXH128_testdata[3171] */\n    { 1057, 0x000000009E3779B1ULL, { 0x6EAE43D95001F231ULL, 0xB34C23016203C617ULL } }, /* XSUM_XXH128_testdata[3172] */\n    { 1057, 0x9E3779B185EBCA8DULL, { 0xF2219916F1A03E0BULL, 0x597115A7128A1BF8ULL } }, /* XSUM_XXH128_testdata[3173] */\n    { 1058, 0x0000000000000000ULL, { 0x4E18A246FF6AAB29ULL, 0xB9E2992597A472ACULL } }, /* XSUM_XXH128_testdata[3174] */\n    { 1058, 0x000000009E3779B1ULL, { 0x8B4295C67042F171ULL, 0xC9AE5D4808EC66EEULL } }, /* XSUM_XXH128_testdata[3175] */\n    { 1058, 0x9E3779B185EBCA8DULL, { 0xD0B5D80ABCB8BB3CULL, 0x1AA6A3613DA54406ULL } }, /* XSUM_XXH128_testdata[3176] */\n    { 1059, 0x0000000000000000ULL, { 0x424271DBB727328DULL, 0xA6740CD3F396A90BULL } }, /* XSUM_XXH128_testdata[3177] */\n    { 1059, 0x000000009E3779B1ULL, { 0x9126377A7D965350ULL, 0x924A1C733B87CB5CULL } }, /* XSUM_XXH128_testdata[3178] */\n    { 1059, 0x9E3779B185EBCA8DULL, { 0xE9C25F7ADF790E5BULL, 0xC1C8502C25317EAEULL } }, /* XSUM_XXH128_testdata[3179] */\n    { 1060, 0x0000000000000000ULL, { 0xE1E6A2BAADFD5436ULL, 0x66F04D120D1D70ADULL } }, /* XSUM_XXH128_testdata[3180] */\n    { 1060, 0x000000009E3779B1ULL, { 0x4F5DAEFB704A7D17ULL, 0x669F360B72B79AF8ULL } }, /* XSUM_XXH128_testdata[3181] */\n    { 1060, 0x9E3779B185EBCA8DULL, { 0x707E4C8B5557992BULL, 0xAA08EC4534B51789ULL } }, /* XSUM_XXH128_testdata[3182] */\n    { 1061, 0x0000000000000000ULL, { 0x6B23AAE562F38052ULL, 0xDB1D06E94FB7A509ULL } }, /* XSUM_XXH128_testdata[3183] */\n    { 1061, 0x000000009E3779B1ULL, { 0xC2E23D8AF929D534ULL, 0x0581FA637DB14701ULL } }, /* XSUM_XXH128_testdata[3184] */\n    { 1061, 0x9E3779B185EBCA8DULL, { 0x8F51CA25CD06EE06ULL, 0x6C38760FD09FC0F2ULL } }, /* XSUM_XXH128_testdata[3185] */\n    { 1062, 0x0000000000000000ULL, { 0x922F0B0A6821EC73ULL, 0x8630F73DD1C24597ULL } }, /* XSUM_XXH128_testdata[3186] */\n    { 1062, 0x000000009E3779B1ULL, { 0x76B02F5998C98868ULL, 0x418821946358EBA5ULL } }, /* XSUM_XXH128_testdata[3187] */\n    { 1062, 0x9E3779B185EBCA8DULL, { 0x6F02284C71B0553DULL, 0x6EC6FC36C91936C0ULL } }, /* XSUM_XXH128_testdata[3188] */\n    { 1063, 0x0000000000000000ULL, { 0x21CE5A98ADE6EC74ULL, 0xB85493E9D9480639ULL } }, /* XSUM_XXH128_testdata[3189] */\n    { 1063, 0x000000009E3779B1ULL, { 0x942DAD9A812E263EULL, 0x8D8DEE2B01358EABULL } }, /* XSUM_XXH128_testdata[3190] */\n    { 1063, 0x9E3779B185EBCA8DULL, { 0xE5E240032388491DULL, 0x45F16F7505E12015ULL } }, /* XSUM_XXH128_testdata[3191] */\n    { 1064, 0x0000000000000000ULL, { 0x226089CE44092546ULL, 0xB507D305C9937C99ULL } }, /* XSUM_XXH128_testdata[3192] */\n    { 1064, 0x000000009E3779B1ULL, { 0x7507F5D94B13C373ULL, 0xEC5ECAD91496E655ULL } }, /* XSUM_XXH128_testdata[3193] */\n    { 1064, 0x9E3779B185EBCA8DULL, { 0xFA0F692527A8AACAULL, 0x86B3BE36020D0F38ULL } }, /* XSUM_XXH128_testdata[3194] */\n    { 1065, 0x0000000000000000ULL, { 0xF83D6BCACA56EF8DULL, 0x8B980F21AFF27014ULL } }, /* XSUM_XXH128_testdata[3195] */\n    { 1065, 0x000000009E3779B1ULL, { 0x822DCE147FD9377BULL, 0x92647CF5C05DE237ULL } }, /* XSUM_XXH128_testdata[3196] */\n    { 1065, 0x9E3779B185EBCA8DULL, { 0xA25F4EFAF8AE785BULL, 0xCB576016662B131CULL } }, /* XSUM_XXH128_testdata[3197] */\n    { 1066, 0x0000000000000000ULL, { 0xA5780B150D253C20ULL, 0xEF2FC23109068182ULL } }, /* XSUM_XXH128_testdata[3198] */\n    { 1066, 0x000000009E3779B1ULL, { 0xB1291F9D75B48C3EULL, 0xAD895CE338F8DF22ULL } }, /* XSUM_XXH128_testdata[3199] */\n    { 1066, 0x9E3779B185EBCA8DULL, { 0x39A8B561DF5E62C7ULL, 0xD047D852A6854592ULL } }, /* XSUM_XXH128_testdata[3200] */\n    { 1067, 0x0000000000000000ULL, { 0x9E3EA16A1A56EAF4ULL, 0xC083D26D66358B8EULL } }, /* XSUM_XXH128_testdata[3201] */\n    { 1067, 0x000000009E3779B1ULL, { 0xEFA8FBF4856FEAC0ULL, 0x5A7C15FCA6DF971FULL } }, /* XSUM_XXH128_testdata[3202] */\n    { 1067, 0x9E3779B185EBCA8DULL, { 0xD91162AE17557C82ULL, 0xF79C84D2FBB2808FULL } }, /* XSUM_XXH128_testdata[3203] */\n    { 1068, 0x0000000000000000ULL, { 0x5E348E5F8475647CULL, 0x15CB0B7DF8FFE0ECULL } }, /* XSUM_XXH128_testdata[3204] */\n    { 1068, 0x000000009E3779B1ULL, { 0x1B7BA84188570870ULL, 0x464FDEE26527F15CULL } }, /* XSUM_XXH128_testdata[3205] */\n    { 1068, 0x9E3779B185EBCA8DULL, { 0x177B8B886C394ABFULL, 0x1C98F670A574A6E8ULL } }, /* XSUM_XXH128_testdata[3206] */\n    { 1069, 0x0000000000000000ULL, { 0xCC930082EA2B699DULL, 0x07F1EB4760BD58D3ULL } }, /* XSUM_XXH128_testdata[3207] */\n    { 1069, 0x000000009E3779B1ULL, { 0xEAA237472A082864ULL, 0xBB4B5F4F593FCFC8ULL } }, /* XSUM_XXH128_testdata[3208] */\n    { 1069, 0x9E3779B185EBCA8DULL, { 0xD0634BFF738E64ABULL, 0xB25534A04EE44787ULL } }, /* XSUM_XXH128_testdata[3209] */\n    { 1070, 0x0000000000000000ULL, { 0x2E7BCEAE98217341ULL, 0xDDDE00DAFDE5BA79ULL } }, /* XSUM_XXH128_testdata[3210] */\n    { 1070, 0x000000009E3779B1ULL, { 0xF9811A2BE8534211ULL, 0x21AC5538284798FDULL } }, /* XSUM_XXH128_testdata[3211] */\n    { 1070, 0x9E3779B185EBCA8DULL, { 0x06042D86277FF953ULL, 0x2AD632FAF893FB08ULL } }, /* XSUM_XXH128_testdata[3212] */\n    { 1071, 0x0000000000000000ULL, { 0x04EB23B8ACA687A0ULL, 0x1C2E35A4CB7975C1ULL } }, /* XSUM_XXH128_testdata[3213] */\n    { 1071, 0x000000009E3779B1ULL, { 0xA9FFDE26661ADEBEULL, 0xAC86110D5C039024ULL } }, /* XSUM_XXH128_testdata[3214] */\n    { 1071, 0x9E3779B185EBCA8DULL, { 0xD8AD2ECEE6693D59ULL, 0xF872B74FF85C0224ULL } }, /* XSUM_XXH128_testdata[3215] */\n    { 1072, 0x0000000000000000ULL, { 0xF9D9E49384694B5CULL, 0x9B4352A515120434ULL } }, /* XSUM_XXH128_testdata[3216] */\n    { 1072, 0x000000009E3779B1ULL, { 0x890375D9A1A7B3AFULL, 0x6330956519EB7495ULL } }, /* XSUM_XXH128_testdata[3217] */\n    { 1072, 0x9E3779B185EBCA8DULL, { 0x06858C7D4097A8FDULL, 0x030598A289E70AF7ULL } }, /* XSUM_XXH128_testdata[3218] */\n    { 1073, 0x0000000000000000ULL, { 0xFCFC273C1C3CFB70ULL, 0xEC34F1997EA8573CULL } }, /* XSUM_XXH128_testdata[3219] */\n    { 1073, 0x000000009E3779B1ULL, { 0x176E6F4774A12EE6ULL, 0xB27005958FF0889DULL } }, /* XSUM_XXH128_testdata[3220] */\n    { 1073, 0x9E3779B185EBCA8DULL, { 0x298D6455960EDC32ULL, 0x4935CFCA28A8EA76ULL } }, /* XSUM_XXH128_testdata[3221] */\n    { 1074, 0x0000000000000000ULL, { 0x4C838F49AB57B711ULL, 0xC1BC505F3A22120BULL } }, /* XSUM_XXH128_testdata[3222] */\n    { 1074, 0x000000009E3779B1ULL, { 0x9B21CF9FDF7ADA05ULL, 0x9DDCACF7FB28D3B0ULL } }, /* XSUM_XXH128_testdata[3223] */\n    { 1074, 0x9E3779B185EBCA8DULL, { 0x76902BE06AA3A02CULL, 0xCAA3EE84E8EFC3ADULL } }, /* XSUM_XXH128_testdata[3224] */\n    { 1075, 0x0000000000000000ULL, { 0x6CD6B8F2FDF983FCULL, 0x9BD1A9D9C26F43A5ULL } }, /* XSUM_XXH128_testdata[3225] */\n    { 1075, 0x000000009E3779B1ULL, { 0x14895B6AA591D923ULL, 0x03B49019D9FFB0E7ULL } }, /* XSUM_XXH128_testdata[3226] */\n    { 1075, 0x9E3779B185EBCA8DULL, { 0xF4E4814148E4D8E6ULL, 0xEDD9CC21DE834280ULL } }, /* XSUM_XXH128_testdata[3227] */\n    { 1076, 0x0000000000000000ULL, { 0x3EFD3A63B144CFA8ULL, 0x0718EA5BB1D161C5ULL } }, /* XSUM_XXH128_testdata[3228] */\n    { 1076, 0x000000009E3779B1ULL, { 0x5E2AAC7F2A961E4DULL, 0xD1E62F9E091E6ADCULL } }, /* XSUM_XXH128_testdata[3229] */\n    { 1076, 0x9E3779B185EBCA8DULL, { 0x1A340811E276CE1DULL, 0x7EC689CF10516785ULL } }, /* XSUM_XXH128_testdata[3230] */\n    { 1077, 0x0000000000000000ULL, { 0x416950898625678DULL, 0x8E697FA9801DDAA0ULL } }, /* XSUM_XXH128_testdata[3231] */\n    { 1077, 0x000000009E3779B1ULL, { 0x944712C1A92003DBULL, 0x01B0C683F0E2F47BULL } }, /* XSUM_XXH128_testdata[3232] */\n    { 1077, 0x9E3779B185EBCA8DULL, { 0xBF32A6D767D50C3AULL, 0x2B74DCD8F480E67CULL } }, /* XSUM_XXH128_testdata[3233] */\n    { 1078, 0x0000000000000000ULL, { 0x8F783EA38EC1D973ULL, 0x0C5AB1BF7F020699ULL } }, /* XSUM_XXH128_testdata[3234] */\n    { 1078, 0x000000009E3779B1ULL, { 0xE4B456C02546FF8AULL, 0xEB793F580D3BFA4FULL } }, /* XSUM_XXH128_testdata[3235] */\n    { 1078, 0x9E3779B185EBCA8DULL, { 0x236D3512BB1A8A4DULL, 0xB68DA56FA676BB34ULL } }, /* XSUM_XXH128_testdata[3236] */\n    { 1079, 0x0000000000000000ULL, { 0xC97A3FE9CE7D4D19ULL, 0x656EB47781234E7CULL } }, /* XSUM_XXH128_testdata[3237] */\n    { 1079, 0x000000009E3779B1ULL, { 0xFF1487EBC2C80B9DULL, 0xECD16E103FD55CB8ULL } }, /* XSUM_XXH128_testdata[3238] */\n    { 1079, 0x9E3779B185EBCA8DULL, { 0xF2BF4205B22DE248ULL, 0x34EA348969C70C15ULL } }, /* XSUM_XXH128_testdata[3239] */\n    { 1080, 0x0000000000000000ULL, { 0x88EE634F95763B2EULL, 0x1F646FE11FF49442ULL } }, /* XSUM_XXH128_testdata[3240] */\n    { 1080, 0x000000009E3779B1ULL, { 0x5C1E1226AA5AB749ULL, 0xDB79DA5A1B240919ULL } }, /* XSUM_XXH128_testdata[3241] */\n    { 1080, 0x9E3779B185EBCA8DULL, { 0x0FCB8B82F171CC63ULL, 0x5F1965389FD427E2ULL } }, /* XSUM_XXH128_testdata[3242] */\n    { 1081, 0x0000000000000000ULL, { 0x1B214241194C97A8ULL, 0x53646D6B41A81112ULL } }, /* XSUM_XXH128_testdata[3243] */\n    { 1081, 0x000000009E3779B1ULL, { 0x6A36D33923F7DCA2ULL, 0x0BDAFCF05F8E7491ULL } }, /* XSUM_XXH128_testdata[3244] */\n    { 1081, 0x9E3779B185EBCA8DULL, { 0xCC5FD4B0D510ABD7ULL, 0xA287A979511AE0EBULL } }, /* XSUM_XXH128_testdata[3245] */\n    { 1082, 0x0000000000000000ULL, { 0x1480A22110AD0CA8ULL, 0x431DE2FEF42FE214ULL } }, /* XSUM_XXH128_testdata[3246] */\n    { 1082, 0x000000009E3779B1ULL, { 0xE03432D212CF5E70ULL, 0x76C8ABA85A199A33ULL } }, /* XSUM_XXH128_testdata[3247] */\n    { 1082, 0x9E3779B185EBCA8DULL, { 0x62B1C2F035D5819CULL, 0x14980122AB69530EULL } }, /* XSUM_XXH128_testdata[3248] */\n    { 1083, 0x0000000000000000ULL, { 0xA90E39E7A1DC5288ULL, 0x7F5220A07FCA39A5ULL } }, /* XSUM_XXH128_testdata[3249] */\n    { 1083, 0x000000009E3779B1ULL, { 0xA51312D65F01A5D8ULL, 0xD882D6B220263405ULL } }, /* XSUM_XXH128_testdata[3250] */\n    { 1083, 0x9E3779B185EBCA8DULL, { 0x4F125217DFE431E8ULL, 0x1D4382703E813F74ULL } }, /* XSUM_XXH128_testdata[3251] */\n    { 1084, 0x0000000000000000ULL, { 0xB3D8CF0593E45180ULL, 0x21D48FC66F263D31ULL } }, /* XSUM_XXH128_testdata[3252] */\n    { 1084, 0x000000009E3779B1ULL, { 0xEAD282D183E10BE1ULL, 0x3E80BC77DB8A2495ULL } }, /* XSUM_XXH128_testdata[3253] */\n    { 1084, 0x9E3779B185EBCA8DULL, { 0xA08D501EED801F54ULL, 0xEFF2EAD26B78BF01ULL } }, /* XSUM_XXH128_testdata[3254] */\n    { 1085, 0x0000000000000000ULL, { 0xCD2309AD6918F6F2ULL, 0xD5DFAE81B2E09FDFULL } }, /* XSUM_XXH128_testdata[3255] */\n    { 1085, 0x000000009E3779B1ULL, { 0xD12CAA2878F87F06ULL, 0x41B087F03EC463EAULL } }, /* XSUM_XXH128_testdata[3256] */\n    { 1085, 0x9E3779B185EBCA8DULL, { 0x2D64ED1AAB430EA6ULL, 0x4DEA488DCB854D31ULL } }, /* XSUM_XXH128_testdata[3257] */\n    { 1086, 0x0000000000000000ULL, { 0x34E17D2E5B1E92B5ULL, 0x6647F04DB720F4F5ULL } }, /* XSUM_XXH128_testdata[3258] */\n    { 1086, 0x000000009E3779B1ULL, { 0x103C2C84D287B39BULL, 0x8F365F37A0512BB9ULL } }, /* XSUM_XXH128_testdata[3259] */\n    { 1086, 0x9E3779B185EBCA8DULL, { 0x20DA04F2065565C4ULL, 0x819D02113B517F8EULL } }, /* XSUM_XXH128_testdata[3260] */\n    { 1087, 0x0000000000000000ULL, { 0x047F181E7C8A41B9ULL, 0xB67E858CF9E0959EULL } }, /* XSUM_XXH128_testdata[3261] */\n    { 1087, 0x000000009E3779B1ULL, { 0x64D6176CC591AFFAULL, 0x631718295E8FD37FULL } }, /* XSUM_XXH128_testdata[3262] */\n    { 1087, 0x9E3779B185EBCA8DULL, { 0x9DDA30BBBF69BF13ULL, 0x0C85F8B06D204747ULL } }, /* XSUM_XXH128_testdata[3263] */\n    { 1088, 0x0000000000000000ULL, { 0xCC1450EA6B52A8F4ULL, 0xE0FA3B9E9FB69D83ULL } }, /* XSUM_XXH128_testdata[3264] */\n    { 1088, 0x000000009E3779B1ULL, { 0xD4C2D1BFFC3370A5ULL, 0x36438AF51FDC2979ULL } }, /* XSUM_XXH128_testdata[3265] */\n    { 1088, 0x9E3779B185EBCA8DULL, { 0x542632D046F3DDE4ULL, 0xC0DD009B78C40121ULL } }, /* XSUM_XXH128_testdata[3266] */\n    { 1089, 0x0000000000000000ULL, { 0xEF727B2EFFC4CC8CULL, 0x6E026F1A15E62B39ULL } }, /* XSUM_XXH128_testdata[3267] */\n    { 1089, 0x000000009E3779B1ULL, { 0xA4662CC10D3C4269ULL, 0xBD39D1D54DA5E01FULL } }, /* XSUM_XXH128_testdata[3268] */\n    { 1089, 0x9E3779B185EBCA8DULL, { 0xFF8423D886707134ULL, 0x79983408B95BAC9DULL } }, /* XSUM_XXH128_testdata[3269] */\n    { 1090, 0x0000000000000000ULL, { 0x89F412FD6ED3162DULL, 0x67BB7F81B82D64A8ULL } }, /* XSUM_XXH128_testdata[3270] */\n    { 1090, 0x000000009E3779B1ULL, { 0x160D991905C8BA55ULL, 0x260796042844246DULL } }, /* XSUM_XXH128_testdata[3271] */\n    { 1090, 0x9E3779B185EBCA8DULL, { 0x9401D08008982DEEULL, 0x6850375C8A3AF8E4ULL } }, /* XSUM_XXH128_testdata[3272] */\n    { 1091, 0x0000000000000000ULL, { 0x35ACEEEADFE96151ULL, 0x068ED4879F165BE6ULL } }, /* XSUM_XXH128_testdata[3273] */\n    { 1091, 0x000000009E3779B1ULL, { 0x74B52830C781A199ULL, 0x70D996C8EC0A82FEULL } }, /* XSUM_XXH128_testdata[3274] */\n    { 1091, 0x9E3779B185EBCA8DULL, { 0x55D5220408C11995ULL, 0xFAE19A70C6E17645ULL } }, /* XSUM_XXH128_testdata[3275] */\n    { 1092, 0x0000000000000000ULL, { 0xCE09B91AD5477E4FULL, 0xE71D6610CAA8FDFEULL } }, /* XSUM_XXH128_testdata[3276] */\n    { 1092, 0x000000009E3779B1ULL, { 0x2047A7C918134577ULL, 0x99CF16531976B1A3ULL } }, /* XSUM_XXH128_testdata[3277] */\n    { 1092, 0x9E3779B185EBCA8DULL, { 0x09E625B5CA2769E9ULL, 0x67895313FC213E66ULL } }, /* XSUM_XXH128_testdata[3278] */\n    { 1093, 0x0000000000000000ULL, { 0x934DA47BA7D6BA54ULL, 0x8AE0E60493B8C536ULL } }, /* XSUM_XXH128_testdata[3279] */\n    { 1093, 0x000000009E3779B1ULL, { 0xBC126197F0BFB06DULL, 0xA4591D95021E7CCDULL } }, /* XSUM_XXH128_testdata[3280] */\n    { 1093, 0x9E3779B185EBCA8DULL, { 0x88E0DD3E5B1F5097ULL, 0x3F41AE9B8025E960ULL } }, /* XSUM_XXH128_testdata[3281] */\n    { 1094, 0x0000000000000000ULL, { 0xF8B5D69781586327ULL, 0x39B8D976FD4D964EULL } }, /* XSUM_XXH128_testdata[3282] */\n    { 1094, 0x000000009E3779B1ULL, { 0xD2699A07754FB0ADULL, 0xEA6413BB8D130916ULL } }, /* XSUM_XXH128_testdata[3283] */\n    { 1094, 0x9E3779B185EBCA8DULL, { 0x4ECC1C9119FB5B6DULL, 0x8577FD9CDD854B1BULL } }, /* XSUM_XXH128_testdata[3284] */\n    { 1095, 0x0000000000000000ULL, { 0x23F7942250DDDC49ULL, 0xCB7DFFCD1E72B0B2ULL } }, /* XSUM_XXH128_testdata[3285] */\n    { 1095, 0x000000009E3779B1ULL, { 0xDCEFD51BE7869633ULL, 0xD27BD68A24EED6CBULL } }, /* XSUM_XXH128_testdata[3286] */\n    { 1095, 0x9E3779B185EBCA8DULL, { 0x8D2E379DC1BBB0B6ULL, 0x8F758DBB1CD8111EULL } }, /* XSUM_XXH128_testdata[3287] */\n    { 1096, 0x0000000000000000ULL, { 0xC3FFA06BC20EC335ULL, 0x3C5F11822A574DF3ULL } }, /* XSUM_XXH128_testdata[3288] */\n    { 1096, 0x000000009E3779B1ULL, { 0xD3A1A52E7F7170C9ULL, 0x570101F3E63CA4A5ULL } }, /* XSUM_XXH128_testdata[3289] */\n    { 1096, 0x9E3779B185EBCA8DULL, { 0x29F3F7B49529DFBAULL, 0x126F13479162735EULL } }, /* XSUM_XXH128_testdata[3290] */\n    { 1097, 0x0000000000000000ULL, { 0x0FDB704FE2D24016ULL, 0xDAB639263618482EULL } }, /* XSUM_XXH128_testdata[3291] */\n    { 1097, 0x000000009E3779B1ULL, { 0x88CE55479BBB4E6BULL, 0xF0E2259E59890089ULL } }, /* XSUM_XXH128_testdata[3292] */\n    { 1097, 0x9E3779B185EBCA8DULL, { 0xEF7EA7F97634AA97ULL, 0xBE96CE79E7B9F48CULL } }, /* XSUM_XXH128_testdata[3293] */\n    { 1098, 0x0000000000000000ULL, { 0x267345655DF0F5BAULL, 0xD3AD62BA6E11B4F5ULL } }, /* XSUM_XXH128_testdata[3294] */\n    { 1098, 0x000000009E3779B1ULL, { 0xAB886C726ED11620ULL, 0x4954D7D5BF56C85DULL } }, /* XSUM_XXH128_testdata[3295] */\n    { 1098, 0x9E3779B185EBCA8DULL, { 0x23FDC7F3BB95FA27ULL, 0xB12BD34AF4831BB4ULL } }, /* XSUM_XXH128_testdata[3296] */\n    { 1099, 0x0000000000000000ULL, { 0x08DC1E6E3BE4AE5EULL, 0xED388FAFAF440AA1ULL } }, /* XSUM_XXH128_testdata[3297] */\n    { 1099, 0x000000009E3779B1ULL, { 0x795E21DAEC26C547ULL, 0x7EEB6304B76CBD36ULL } }, /* XSUM_XXH128_testdata[3298] */\n    { 1099, 0x9E3779B185EBCA8DULL, { 0x3AAB786A79D625C6ULL, 0x343C6488470DFA9CULL } }, /* XSUM_XXH128_testdata[3299] */\n    { 1100, 0x0000000000000000ULL, { 0xA2E4365683A60391ULL, 0x0BD5AA55FB8F7C97ULL } }, /* XSUM_XXH128_testdata[3300] */\n    { 1100, 0x000000009E3779B1ULL, { 0x7AA2CA619B385821ULL, 0xC8B885ED848F10ECULL } }, /* XSUM_XXH128_testdata[3301] */\n    { 1100, 0x9E3779B185EBCA8DULL, { 0xC91EE43AE9B51D71ULL, 0xB9EF5A2F3C87AD9DULL } }, /* XSUM_XXH128_testdata[3302] */\n    { 1101, 0x0000000000000000ULL, { 0xA42E215373B168AEULL, 0x4B8CD6070A216642ULL } }, /* XSUM_XXH128_testdata[3303] */\n    { 1101, 0x000000009E3779B1ULL, { 0x7ADD396370D88E67ULL, 0xA874204355C48389ULL } }, /* XSUM_XXH128_testdata[3304] */\n    { 1101, 0x9E3779B185EBCA8DULL, { 0xD08292BB94F66639ULL, 0x64745398C60E24DDULL } }, /* XSUM_XXH128_testdata[3305] */\n    { 1102, 0x0000000000000000ULL, { 0x151F8D631922BAF2ULL, 0xB476D192FC8DDB29ULL } }, /* XSUM_XXH128_testdata[3306] */\n    { 1102, 0x000000009E3779B1ULL, { 0x01AC17C330B044ADULL, 0x5D74F28C70FE0D0AULL } }, /* XSUM_XXH128_testdata[3307] */\n    { 1102, 0x9E3779B185EBCA8DULL, { 0x1251E29366620135ULL, 0xE91465A2B02B3397ULL } }, /* XSUM_XXH128_testdata[3308] */\n    { 1103, 0x0000000000000000ULL, { 0x6CA10D173172CE90ULL, 0x00B377F0FE9D0182ULL } }, /* XSUM_XXH128_testdata[3309] */\n    { 1103, 0x000000009E3779B1ULL, { 0xEA7AF11DBDD9E1B7ULL, 0xB89D970F8191E625ULL } }, /* XSUM_XXH128_testdata[3310] */\n    { 1103, 0x9E3779B185EBCA8DULL, { 0x31A6B88EC2171A6AULL, 0xF726CF18DCEA9BCEULL } }, /* XSUM_XXH128_testdata[3311] */\n    { 1104, 0x0000000000000000ULL, { 0xFDB6BFA13BEA50FEULL, 0x0CBCFB281599865DULL } }, /* XSUM_XXH128_testdata[3312] */\n    { 1104, 0x000000009E3779B1ULL, { 0x4A5B16435302A020ULL, 0x48FBCA92F79EE99BULL } }, /* XSUM_XXH128_testdata[3313] */\n    { 1104, 0x9E3779B185EBCA8DULL, { 0x3E23E34491EB0A37ULL, 0x633CF4C6961EDA71ULL } }, /* XSUM_XXH128_testdata[3314] */\n    { 1105, 0x0000000000000000ULL, { 0xDB5AAD73409F3CA7ULL, 0x880EB0294C7FE651ULL } }, /* XSUM_XXH128_testdata[3315] */\n    { 1105, 0x000000009E3779B1ULL, { 0x977041D20549F899ULL, 0x1F22D139812473FDULL } }, /* XSUM_XXH128_testdata[3316] */\n    { 1105, 0x9E3779B185EBCA8DULL, { 0x936B96924E95975EULL, 0x23BB16201C03AD1EULL } }, /* XSUM_XXH128_testdata[3317] */\n    { 1106, 0x0000000000000000ULL, { 0x8EA70DDBFBFFB140ULL, 0x87EA220CB0AE58D7ULL } }, /* XSUM_XXH128_testdata[3318] */\n    { 1106, 0x000000009E3779B1ULL, { 0xEC573428E9B544DAULL, 0x91B4A6D6C67DDFEDULL } }, /* XSUM_XXH128_testdata[3319] */\n    { 1106, 0x9E3779B185EBCA8DULL, { 0x50E07E50BE70454CULL, 0x589351FD8C945AEDULL } }, /* XSUM_XXH128_testdata[3320] */\n    { 1107, 0x0000000000000000ULL, { 0x2CB3D9534FC396ECULL, 0x48CA43A60F0412FAULL } }, /* XSUM_XXH128_testdata[3321] */\n    { 1107, 0x000000009E3779B1ULL, { 0x877F62E05C57C067ULL, 0xBBE4B920C35A4115ULL } }, /* XSUM_XXH128_testdata[3322] */\n    { 1107, 0x9E3779B185EBCA8DULL, { 0xE59E31F8D0400D3DULL, 0x98A19232A1A5AC9FULL } }, /* XSUM_XXH128_testdata[3323] */\n    { 1108, 0x0000000000000000ULL, { 0xD29D3A025A1690E4ULL, 0xB29AFD7690046EAAULL } }, /* XSUM_XXH128_testdata[3324] */\n    { 1108, 0x000000009E3779B1ULL, { 0xC4CD44E56A0874FBULL, 0x4728768783E3DD73ULL } }, /* XSUM_XXH128_testdata[3325] */\n    { 1108, 0x9E3779B185EBCA8DULL, { 0x37288A9CB07E3D96ULL, 0x8B65CA33B25B086BULL } }, /* XSUM_XXH128_testdata[3326] */\n    { 1109, 0x0000000000000000ULL, { 0x3D01DAA3D4BD963EULL, 0x8A1F87A90D62DD35ULL } }, /* XSUM_XXH128_testdata[3327] */\n    { 1109, 0x000000009E3779B1ULL, { 0x5A7CE24B1A7744E9ULL, 0x1329A90A03F4B86DULL } }, /* XSUM_XXH128_testdata[3328] */\n    { 1109, 0x9E3779B185EBCA8DULL, { 0xB526662C90236A2DULL, 0x87C98615F851C7EBULL } }, /* XSUM_XXH128_testdata[3329] */\n    { 1110, 0x0000000000000000ULL, { 0x20274CB54F3E997EULL, 0x1E4D9E6CDF7EDF0FULL } }, /* XSUM_XXH128_testdata[3330] */\n    { 1110, 0x000000009E3779B1ULL, { 0xA8AACA3F7346F2A5ULL, 0x1901B5CEB4BCE74EULL } }, /* XSUM_XXH128_testdata[3331] */\n    { 1110, 0x9E3779B185EBCA8DULL, { 0x18BB398F2D7573BFULL, 0xD013447C8E86A7C6ULL } }, /* XSUM_XXH128_testdata[3332] */\n    { 1111, 0x0000000000000000ULL, { 0x535C077415D1946DULL, 0xB6F4D18789C7C907ULL } }, /* XSUM_XXH128_testdata[3333] */\n    { 1111, 0x000000009E3779B1ULL, { 0x2EACA194E95EEAB8ULL, 0xBD00F6BEE5D3C5A8ULL } }, /* XSUM_XXH128_testdata[3334] */\n    { 1111, 0x9E3779B185EBCA8DULL, { 0xDC251C067D8BD955ULL, 0xAC48B152B65CF9D2ULL } }, /* XSUM_XXH128_testdata[3335] */\n    { 1112, 0x0000000000000000ULL, { 0x65C3CBC5E82A6835ULL, 0xECD6CB89040EC8E3ULL } }, /* XSUM_XXH128_testdata[3336] */\n    { 1112, 0x000000009E3779B1ULL, { 0x9B0394C41B54837FULL, 0xA82BD0CD88DDF786ULL } }, /* XSUM_XXH128_testdata[3337] */\n    { 1112, 0x9E3779B185EBCA8DULL, { 0x07BFDF0D944A5C57ULL, 0xB2FF57D6E7E6F5AFULL } }, /* XSUM_XXH128_testdata[3338] */\n    { 1113, 0x0000000000000000ULL, { 0x68D7660406B2EDC4ULL, 0x465E0F51CD65367DULL } }, /* XSUM_XXH128_testdata[3339] */\n    { 1113, 0x000000009E3779B1ULL, { 0x2B698775DDED8E08ULL, 0xC589D9B659ED6999ULL } }, /* XSUM_XXH128_testdata[3340] */\n    { 1113, 0x9E3779B185EBCA8DULL, { 0x95418F648D646CA3ULL, 0x7F16B3810B5E0ED5ULL } }, /* XSUM_XXH128_testdata[3341] */\n    { 1114, 0x0000000000000000ULL, { 0x1F244DA0A9F0EBE3ULL, 0xFB04C4F9C39F4CFBULL } }, /* XSUM_XXH128_testdata[3342] */\n    { 1114, 0x000000009E3779B1ULL, { 0x64AAC4459B99E296ULL, 0xFD86522FE57174A2ULL } }, /* XSUM_XXH128_testdata[3343] */\n    { 1114, 0x9E3779B185EBCA8DULL, { 0xB3E9095AF38024DFULL, 0xE7AFC59EB8564069ULL } }, /* XSUM_XXH128_testdata[3344] */\n    { 1115, 0x0000000000000000ULL, { 0xD9621C941623B268ULL, 0x54982D4C65E5A25DULL } }, /* XSUM_XXH128_testdata[3345] */\n    { 1115, 0x000000009E3779B1ULL, { 0x93E41EA15DC8D4EFULL, 0xD94CDA55494E22BFULL } }, /* XSUM_XXH128_testdata[3346] */\n    { 1115, 0x9E3779B185EBCA8DULL, { 0x2C45FEF9EF363D5AULL, 0x43A2CBCEB2C9C1ADULL } }, /* XSUM_XXH128_testdata[3347] */\n    { 1116, 0x0000000000000000ULL, { 0x41AF96D52DCB9BF8ULL, 0x2CD0FA6DE0F14876ULL } }, /* XSUM_XXH128_testdata[3348] */\n    { 1116, 0x000000009E3779B1ULL, { 0xC294017AE96E0D7EULL, 0xC44BDD3D3D045DC9ULL } }, /* XSUM_XXH128_testdata[3349] */\n    { 1116, 0x9E3779B185EBCA8DULL, { 0x6F201C12240137D9ULL, 0xE49ACD6E5EBE8836ULL } }, /* XSUM_XXH128_testdata[3350] */\n    { 1117, 0x0000000000000000ULL, { 0xA2149B7CE171D9B1ULL, 0x963960861E3317BEULL } }, /* XSUM_XXH128_testdata[3351] */\n    { 1117, 0x000000009E3779B1ULL, { 0x7F446A54074ADE67ULL, 0x4292C53B008C15CCULL } }, /* XSUM_XXH128_testdata[3352] */\n    { 1117, 0x9E3779B185EBCA8DULL, { 0x11394E35AC357B5CULL, 0xB04C0A415E65B199ULL } }, /* XSUM_XXH128_testdata[3353] */\n    { 1118, 0x0000000000000000ULL, { 0xA3A1E85D4187AB76ULL, 0x160CF47F56AF26A0ULL } }, /* XSUM_XXH128_testdata[3354] */\n    { 1118, 0x000000009E3779B1ULL, { 0x5DF823A8BE8BA42BULL, 0x22AFDA1A87FA1148ULL } }, /* XSUM_XXH128_testdata[3355] */\n    { 1118, 0x9E3779B185EBCA8DULL, { 0x670D7249F1A3FCF1ULL, 0x8687B5004E03F398ULL } }, /* XSUM_XXH128_testdata[3356] */\n    { 1119, 0x0000000000000000ULL, { 0xA831366CE6D0A015ULL, 0x4110CB1FDD62C744ULL } }, /* XSUM_XXH128_testdata[3357] */\n    { 1119, 0x000000009E3779B1ULL, { 0x8749144E57E27596ULL, 0x36D31E4C1C9627A5ULL } }, /* XSUM_XXH128_testdata[3358] */\n    { 1119, 0x9E3779B185EBCA8DULL, { 0x90C64A736F00FE4FULL, 0x77B751EFD94A96C6ULL } }, /* XSUM_XXH128_testdata[3359] */\n    { 1120, 0x0000000000000000ULL, { 0xCB2A01BE10913FE8ULL, 0xA835D38232B4DA49ULL } }, /* XSUM_XXH128_testdata[3360] */\n    { 1120, 0x000000009E3779B1ULL, { 0x4BA304B309456643ULL, 0xBA26D9E1B7AB1408ULL } }, /* XSUM_XXH128_testdata[3361] */\n    { 1120, 0x9E3779B185EBCA8DULL, { 0x1B9BDB62E75C91F8ULL, 0x552DDA014413A313ULL } }, /* XSUM_XXH128_testdata[3362] */\n    { 1121, 0x0000000000000000ULL, { 0x926B4876BA26C868ULL, 0x9AFAF6C09BAB045BULL } }, /* XSUM_XXH128_testdata[3363] */\n    { 1121, 0x000000009E3779B1ULL, { 0xB7E1DA6C7127A165ULL, 0x218EB38BD9746F75ULL } }, /* XSUM_XXH128_testdata[3364] */\n    { 1121, 0x9E3779B185EBCA8DULL, { 0x67046D7374E193D8ULL, 0x21FDDAB26D305D0FULL } }, /* XSUM_XXH128_testdata[3365] */\n    { 1122, 0x0000000000000000ULL, { 0x1DED852A9AF3BDDDULL, 0x42601F2E4A1AEDD3ULL } }, /* XSUM_XXH128_testdata[3366] */\n    { 1122, 0x000000009E3779B1ULL, { 0xE975FF9754F00891ULL, 0x4E7AC4D3706C6A34ULL } }, /* XSUM_XXH128_testdata[3367] */\n    { 1122, 0x9E3779B185EBCA8DULL, { 0xED4D97245B36909FULL, 0x9DA822A52679F6B8ULL } }, /* XSUM_XXH128_testdata[3368] */\n    { 1123, 0x0000000000000000ULL, { 0x567A4339BF18DCD3ULL, 0x2889DF502511F323ULL } }, /* XSUM_XXH128_testdata[3369] */\n    { 1123, 0x000000009E3779B1ULL, { 0xD2A15030AD465AE2ULL, 0x479D0BFEDCD5195DULL } }, /* XSUM_XXH128_testdata[3370] */\n    { 1123, 0x9E3779B185EBCA8DULL, { 0x2C4C54BAB4E0D7AEULL, 0xC48B30865AA32FE6ULL } }, /* XSUM_XXH128_testdata[3371] */\n    { 1124, 0x0000000000000000ULL, { 0x25FEE25F53DBE3A8ULL, 0xA61ADA016D3449D0ULL } }, /* XSUM_XXH128_testdata[3372] */\n    { 1124, 0x000000009E3779B1ULL, { 0xF483E8C5E74A09CFULL, 0xB824DE4A69215AD4ULL } }, /* XSUM_XXH128_testdata[3373] */\n    { 1124, 0x9E3779B185EBCA8DULL, { 0x405315AE00B8A986ULL, 0xCEF3E0DA205DBA8CULL } }, /* XSUM_XXH128_testdata[3374] */\n    { 1125, 0x0000000000000000ULL, { 0x3FE1721559FFBC72ULL, 0x9EB8A30EE1FD8E66ULL } }, /* XSUM_XXH128_testdata[3375] */\n    { 1125, 0x000000009E3779B1ULL, { 0xF69941FB5A7AA2A0ULL, 0x48898AF03F9B8748ULL } }, /* XSUM_XXH128_testdata[3376] */\n    { 1125, 0x9E3779B185EBCA8DULL, { 0xB8F5C2BEF091AC93ULL, 0x1B46AE2FCF94E6D8ULL } }, /* XSUM_XXH128_testdata[3377] */\n    { 1126, 0x0000000000000000ULL, { 0x50DF0CE31B152CB0ULL, 0x8AD5A087BFD1CDE5ULL } }, /* XSUM_XXH128_testdata[3378] */\n    { 1126, 0x000000009E3779B1ULL, { 0xE39B84815763B80CULL, 0x6DF89B2F898A0ADAULL } }, /* XSUM_XXH128_testdata[3379] */\n    { 1126, 0x9E3779B185EBCA8DULL, { 0x5B30F80DD455185BULL, 0xBF8AE9009C87C61BULL } }, /* XSUM_XXH128_testdata[3380] */\n    { 1127, 0x0000000000000000ULL, { 0x47BED516867314E4ULL, 0x9FBC7281C2F8F5E2ULL } }, /* XSUM_XXH128_testdata[3381] */\n    { 1127, 0x000000009E3779B1ULL, { 0x171C6480ED9ECCE0ULL, 0xD0B543E6C107B080ULL } }, /* XSUM_XXH128_testdata[3382] */\n    { 1127, 0x9E3779B185EBCA8DULL, { 0x3CC4B630893CE8E6ULL, 0xE66A300BD66AAAC9ULL } }, /* XSUM_XXH128_testdata[3383] */\n    { 1128, 0x0000000000000000ULL, { 0x1EF8A6EE399E57D0ULL, 0x56A33E2C4F776C8CULL } }, /* XSUM_XXH128_testdata[3384] */\n    { 1128, 0x000000009E3779B1ULL, { 0xE3973D36B8FA7170ULL, 0x22DAF676DC7F949EULL } }, /* XSUM_XXH128_testdata[3385] */\n    { 1128, 0x9E3779B185EBCA8DULL, { 0x84913A2F69B5E095ULL, 0x5C47ADDFC361497CULL } }, /* XSUM_XXH128_testdata[3386] */\n    { 1129, 0x0000000000000000ULL, { 0x2B6BF915D838BA37ULL, 0x9896E81FAFBE956BULL } }, /* XSUM_XXH128_testdata[3387] */\n    { 1129, 0x000000009E3779B1ULL, { 0x5DFE75B5BD39F04BULL, 0x4F8B8A7A0CB081B5ULL } }, /* XSUM_XXH128_testdata[3388] */\n    { 1129, 0x9E3779B185EBCA8DULL, { 0x9F7F65EB9F75BBBCULL, 0x7FF26E7E4292EB00ULL } }, /* XSUM_XXH128_testdata[3389] */\n    { 1130, 0x0000000000000000ULL, { 0xE3899E185F0E6802ULL, 0x88982F9D4A44C197ULL } }, /* XSUM_XXH128_testdata[3390] */\n    { 1130, 0x000000009E3779B1ULL, { 0x21F94C1A6CBF91D1ULL, 0x3A00325C6D3850E9ULL } }, /* XSUM_XXH128_testdata[3391] */\n    { 1130, 0x9E3779B185EBCA8DULL, { 0x1499DD150136E7E1ULL, 0xA711F1F07A4CA778ULL } }, /* XSUM_XXH128_testdata[3392] */\n    { 1131, 0x0000000000000000ULL, { 0xE1D1B784229995DEULL, 0x679CF1DFA3A6B6DDULL } }, /* XSUM_XXH128_testdata[3393] */\n    { 1131, 0x000000009E3779B1ULL, { 0xD629F6050071012EULL, 0xA5B25983912C6495ULL } }, /* XSUM_XXH128_testdata[3394] */\n    { 1131, 0x9E3779B185EBCA8DULL, { 0x51A5FE1716C1F1D6ULL, 0xF782CE29A342D814ULL } }, /* XSUM_XXH128_testdata[3395] */\n    { 1132, 0x0000000000000000ULL, { 0x87901B4D8E92F707ULL, 0xDB735ED007C17A4DULL } }, /* XSUM_XXH128_testdata[3396] */\n    { 1132, 0x000000009E3779B1ULL, { 0xA346B55C902F4771ULL, 0x5BDF33572DE7A6F1ULL } }, /* XSUM_XXH128_testdata[3397] */\n    { 1132, 0x9E3779B185EBCA8DULL, { 0x33AC4E72130C886AULL, 0xF541FDED6F7183B6ULL } }, /* XSUM_XXH128_testdata[3398] */\n    { 1133, 0x0000000000000000ULL, { 0x714C8A36A1DC2505ULL, 0xB6A468AB0E8513C3ULL } }, /* XSUM_XXH128_testdata[3399] */\n    { 1133, 0x000000009E3779B1ULL, { 0xFE7D6F12E2FDC841ULL, 0xE577506ABA410811ULL } }, /* XSUM_XXH128_testdata[3400] */\n    { 1133, 0x9E3779B185EBCA8DULL, { 0xF833FAA2E9F8B356ULL, 0xAB53DAB4E4BF3CF9ULL } }, /* XSUM_XXH128_testdata[3401] */\n    { 1134, 0x0000000000000000ULL, { 0xF7DCA61CB5BC30D6ULL, 0x83C755F74480B1C0ULL } }, /* XSUM_XXH128_testdata[3402] */\n    { 1134, 0x000000009E3779B1ULL, { 0xEF3CEA1725DBA34AULL, 0xCB29480BA8695BA8ULL } }, /* XSUM_XXH128_testdata[3403] */\n    { 1134, 0x9E3779B185EBCA8DULL, { 0xB0327515BE8AD7D7ULL, 0x4AAB940F5C5563C0ULL } }, /* XSUM_XXH128_testdata[3404] */\n    { 1135, 0x0000000000000000ULL, { 0xF69A9C5CCA2DF6E7ULL, 0x210BDDA9089DAACCULL } }, /* XSUM_XXH128_testdata[3405] */\n    { 1135, 0x000000009E3779B1ULL, { 0x06DFD6F0071CC743ULL, 0xCF933EEB422FAE48ULL } }, /* XSUM_XXH128_testdata[3406] */\n    { 1135, 0x9E3779B185EBCA8DULL, { 0xF77C95BD632E961EULL, 0xAF708CB06E6B0C44ULL } }, /* XSUM_XXH128_testdata[3407] */\n    { 1136, 0x0000000000000000ULL, { 0xB66FDAC8A6FA8971ULL, 0x866CAB635EEBF40EULL } }, /* XSUM_XXH128_testdata[3408] */\n    { 1136, 0x000000009E3779B1ULL, { 0xF981B1CC3DAFE142ULL, 0xA14E59570393AC2DULL } }, /* XSUM_XXH128_testdata[3409] */\n    { 1136, 0x9E3779B185EBCA8DULL, { 0x192181B62FABCA63ULL, 0xE749D529ECB71F9AULL } }, /* XSUM_XXH128_testdata[3410] */\n    { 1137, 0x0000000000000000ULL, { 0x0D5273B6C4D4C5ACULL, 0xC8E8529C083172CFULL } }, /* XSUM_XXH128_testdata[3411] */\n    { 1137, 0x000000009E3779B1ULL, { 0x50A4865FEF56FFCDULL, 0x8353B327F4B55E08ULL } }, /* XSUM_XXH128_testdata[3412] */\n    { 1137, 0x9E3779B185EBCA8DULL, { 0x18482773977A216BULL, 0x3125AD4696573CAFULL } }, /* XSUM_XXH128_testdata[3413] */\n    { 1138, 0x0000000000000000ULL, { 0xE966D7C30A58470AULL, 0x971F651FFDA42380ULL } }, /* XSUM_XXH128_testdata[3414] */\n    { 1138, 0x000000009E3779B1ULL, { 0x8138D2651E5BA746ULL, 0x9F401F1A3E53736AULL } }, /* XSUM_XXH128_testdata[3415] */\n    { 1138, 0x9E3779B185EBCA8DULL, { 0x0DFA80657CFB01A4ULL, 0x6DE4EE1B765AE812ULL } }, /* XSUM_XXH128_testdata[3416] */\n    { 1139, 0x0000000000000000ULL, { 0x5259C45D43DBE53EULL, 0x045B3189DB1F67E0ULL } }, /* XSUM_XXH128_testdata[3417] */\n    { 1139, 0x000000009E3779B1ULL, { 0x4926A3232CC96078ULL, 0x22DA320E5CC86185ULL } }, /* XSUM_XXH128_testdata[3418] */\n    { 1139, 0x9E3779B185EBCA8DULL, { 0x6C18EE35FC320C14ULL, 0x617C1CE9BCF0AA59ULL } }, /* XSUM_XXH128_testdata[3419] */\n    { 1140, 0x0000000000000000ULL, { 0xFB9AFE9E8341A37AULL, 0x759625D4E76ED626ULL } }, /* XSUM_XXH128_testdata[3420] */\n    { 1140, 0x000000009E3779B1ULL, { 0xA3DAB6B2DCA25C37ULL, 0x4583E7B0B88BEFD6ULL } }, /* XSUM_XXH128_testdata[3421] */\n    { 1140, 0x9E3779B185EBCA8DULL, { 0x7EACD8D28F36F2DBULL, 0x97CF3528A2A87273ULL } }, /* XSUM_XXH128_testdata[3422] */\n    { 1141, 0x0000000000000000ULL, { 0xA5A57C3AB93B041EULL, 0x2721F68FFB72696CULL } }, /* XSUM_XXH128_testdata[3423] */\n    { 1141, 0x000000009E3779B1ULL, { 0xD4676458FA739BDFULL, 0x2352AA1B33CAC2C5ULL } }, /* XSUM_XXH128_testdata[3424] */\n    { 1141, 0x9E3779B185EBCA8DULL, { 0x1C9C1190FA766E90ULL, 0x2866DDDEA1772632ULL } }, /* XSUM_XXH128_testdata[3425] */\n    { 1142, 0x0000000000000000ULL, { 0x4FA60243C1D9CFC7ULL, 0xA3C4F856DEF045DBULL } }, /* XSUM_XXH128_testdata[3426] */\n    { 1142, 0x000000009E3779B1ULL, { 0xAC6529D085D37F18ULL, 0xD26DE06074970BB9ULL } }, /* XSUM_XXH128_testdata[3427] */\n    { 1142, 0x9E3779B185EBCA8DULL, { 0x87DC592B1BE2BF3EULL, 0xEA52420924C45A12ULL } }, /* XSUM_XXH128_testdata[3428] */\n    { 1143, 0x0000000000000000ULL, { 0x2A2F9060C75659ABULL, 0x27266060F4882155ULL } }, /* XSUM_XXH128_testdata[3429] */\n    { 1143, 0x000000009E3779B1ULL, { 0x291C2CFA6B6B4FF0ULL, 0xE68152F31675BDA7ULL } }, /* XSUM_XXH128_testdata[3430] */\n    { 1143, 0x9E3779B185EBCA8DULL, { 0x21FBFB1EF1D23899ULL, 0x5AE85C3FCE013D6CULL } }, /* XSUM_XXH128_testdata[3431] */\n    { 1144, 0x0000000000000000ULL, { 0x95A486382492BF45ULL, 0x582C69B19272A222ULL } }, /* XSUM_XXH128_testdata[3432] */\n    { 1144, 0x000000009E3779B1ULL, { 0x224747C6EED3EA5AULL, 0x739B12BBCE58A449ULL } }, /* XSUM_XXH128_testdata[3433] */\n    { 1144, 0x9E3779B185EBCA8DULL, { 0xB20CCD731AF9E696ULL, 0x6116BA506C5F6CF0ULL } }, /* XSUM_XXH128_testdata[3434] */\n    { 1145, 0x0000000000000000ULL, { 0x58CE092D9AAB9B92ULL, 0x2FD50E3389EF705DULL } }, /* XSUM_XXH128_testdata[3435] */\n    { 1145, 0x000000009E3779B1ULL, { 0x48895D9BDDB66919ULL, 0x7FCFA6BF85B675D5ULL } }, /* XSUM_XXH128_testdata[3436] */\n    { 1145, 0x9E3779B185EBCA8DULL, { 0x86C5C6FE0D4772C7ULL, 0x6F7469FE52DB4369ULL } }, /* XSUM_XXH128_testdata[3437] */\n    { 1146, 0x0000000000000000ULL, { 0x2B667E781A3E3B39ULL, 0x47D794547124FFD9ULL } }, /* XSUM_XXH128_testdata[3438] */\n    { 1146, 0x000000009E3779B1ULL, { 0x3BBD92AEBE2C47FFULL, 0x7C9504213D536868ULL } }, /* XSUM_XXH128_testdata[3439] */\n    { 1146, 0x9E3779B185EBCA8DULL, { 0x30E430D337512CABULL, 0x4D22E73768B73290ULL } }, /* XSUM_XXH128_testdata[3440] */\n    { 1147, 0x0000000000000000ULL, { 0xE3FDBC1329BC7311ULL, 0xDEDD35F903D91280ULL } }, /* XSUM_XXH128_testdata[3441] */\n    { 1147, 0x000000009E3779B1ULL, { 0xD91893AFE7DBE64CULL, 0x0BAEAC131E45F53EULL } }, /* XSUM_XXH128_testdata[3442] */\n    { 1147, 0x9E3779B185EBCA8DULL, { 0x5148F9DD7AFCB065ULL, 0x6940B87AF6EEF056ULL } }, /* XSUM_XXH128_testdata[3443] */\n    { 1148, 0x0000000000000000ULL, { 0xCF6D44DEAE45F6C1ULL, 0x9EA7E8934BC91A64ULL } }, /* XSUM_XXH128_testdata[3444] */\n    { 1148, 0x000000009E3779B1ULL, { 0x05685E88466BC90EULL, 0xD32C9E8B8909310AULL } }, /* XSUM_XXH128_testdata[3445] */\n    { 1148, 0x9E3779B185EBCA8DULL, { 0x52981C66CC0CA09DULL, 0x5DBD4D6DFE1489D1ULL } }, /* XSUM_XXH128_testdata[3446] */\n    { 1149, 0x0000000000000000ULL, { 0x9FA5149C1E410A10ULL, 0x8C2484072FA08D72ULL } }, /* XSUM_XXH128_testdata[3447] */\n    { 1149, 0x000000009E3779B1ULL, { 0x895A71B18EE5C2AAULL, 0xCBEEA57508B0C881ULL } }, /* XSUM_XXH128_testdata[3448] */\n    { 1149, 0x9E3779B185EBCA8DULL, { 0x3C0AEE0E925A6134ULL, 0x41860F8A31CABA00ULL } }, /* XSUM_XXH128_testdata[3449] */\n    { 1150, 0x0000000000000000ULL, { 0xA3F61AC5C9AC2CB4ULL, 0xBC7BB45F116E8B0FULL } }, /* XSUM_XXH128_testdata[3450] */\n    { 1150, 0x000000009E3779B1ULL, { 0x98DBB68AB05C1A21ULL, 0xB7272ACFB270E507ULL } }, /* XSUM_XXH128_testdata[3451] */\n    { 1150, 0x9E3779B185EBCA8DULL, { 0x834BA906F8130A85ULL, 0xFA7287E694698788ULL } }, /* XSUM_XXH128_testdata[3452] */\n    { 1151, 0x0000000000000000ULL, { 0x7153F50FED4BA56AULL, 0xD846634075E4863BULL } }, /* XSUM_XXH128_testdata[3453] */\n    { 1151, 0x000000009E3779B1ULL, { 0xD6E130A5BBCEED1FULL, 0x7C2C9E27A3193B7BULL } }, /* XSUM_XXH128_testdata[3454] */\n    { 1151, 0x9E3779B185EBCA8DULL, { 0x0AE7204E79BBEB04ULL, 0x6DEFB403545BF329ULL } }, /* XSUM_XXH128_testdata[3455] */\n    { 1152, 0x0000000000000000ULL, { 0x8D10F861683EB1DDULL, 0xD2841053C7131465ULL } }, /* XSUM_XXH128_testdata[3456] */\n    { 1152, 0x000000009E3779B1ULL, { 0xF1AC91913D44900AULL, 0xA7BE5FA5FE05D083ULL } }, /* XSUM_XXH128_testdata[3457] */\n    { 1152, 0x9E3779B185EBCA8DULL, { 0xCFE2924BF8DDE23FULL, 0x8240F5920BD07BD2ULL } }, /* XSUM_XXH128_testdata[3458] */\n    { 1153, 0x0000000000000000ULL, { 0x252E89C8B0620818ULL, 0x79D381D607FA1820ULL } }, /* XSUM_XXH128_testdata[3459] */\n    { 1153, 0x000000009E3779B1ULL, { 0x35D199752378B93AULL, 0x15898EEDC46879B1ULL } }, /* XSUM_XXH128_testdata[3460] */\n    { 1153, 0x9E3779B185EBCA8DULL, { 0xC6DC90A02641B916ULL, 0xDE9AFE976499B134ULL } }, /* XSUM_XXH128_testdata[3461] */\n    { 1154, 0x0000000000000000ULL, { 0x311FA7F0D2EDF339ULL, 0x8E716B3BC33B46E2ULL } }, /* XSUM_XXH128_testdata[3462] */\n    { 1154, 0x000000009E3779B1ULL, { 0x6A3214F37AC40953ULL, 0x0D6C8C7A8027E24CULL } }, /* XSUM_XXH128_testdata[3463] */\n    { 1154, 0x9E3779B185EBCA8DULL, { 0xB8E4C7A1170A3DAFULL, 0x6FABB92D9BB9D5EFULL } }, /* XSUM_XXH128_testdata[3464] */\n    { 1155, 0x0000000000000000ULL, { 0x4169E14522944D4BULL, 0x70125814B7155956ULL } }, /* XSUM_XXH128_testdata[3465] */\n    { 1155, 0x000000009E3779B1ULL, { 0x9FA572C4899827AFULL, 0xF06E1A51276C37DEULL } }, /* XSUM_XXH128_testdata[3466] */\n    { 1155, 0x9E3779B185EBCA8DULL, { 0x5F2A1BA5122ECCB3ULL, 0xD67EF333CBAA4EC7ULL } }, /* XSUM_XXH128_testdata[3467] */\n    { 1156, 0x0000000000000000ULL, { 0xA7FC6341379A1C87ULL, 0x6BBD5BBBEAF68291ULL } }, /* XSUM_XXH128_testdata[3468] */\n    { 1156, 0x000000009E3779B1ULL, { 0xC250A296ED2E4D82ULL, 0xC37DF808ED1E80EEULL } }, /* XSUM_XXH128_testdata[3469] */\n    { 1156, 0x9E3779B185EBCA8DULL, { 0xFE49682AA0CEF4B7ULL, 0xB791ECEB3B7299E9ULL } }, /* XSUM_XXH128_testdata[3470] */\n    { 1157, 0x0000000000000000ULL, { 0x73F986F4372BEBB0ULL, 0x8758E984BADAE260ULL } }, /* XSUM_XXH128_testdata[3471] */\n    { 1157, 0x000000009E3779B1ULL, { 0xF8D58AF9B783FA1FULL, 0x3AC88275399097D9ULL } }, /* XSUM_XXH128_testdata[3472] */\n    { 1157, 0x9E3779B185EBCA8DULL, { 0x9002BED3D9E0A393ULL, 0x036E16A258D35520ULL } }, /* XSUM_XXH128_testdata[3473] */\n    { 1158, 0x0000000000000000ULL, { 0x4E1447A6BE5E402CULL, 0x65D5096F2C79D619ULL } }, /* XSUM_XXH128_testdata[3474] */\n    { 1158, 0x000000009E3779B1ULL, { 0xED6FCCC5CA6A5EE0ULL, 0xF089AC72A66EB1B3ULL } }, /* XSUM_XXH128_testdata[3475] */\n    { 1158, 0x9E3779B185EBCA8DULL, { 0xDD545BD05F40925EULL, 0x42FA7A218C5DE6F7ULL } }, /* XSUM_XXH128_testdata[3476] */\n    { 1159, 0x0000000000000000ULL, { 0xA3D95CC9126FE6DFULL, 0x7995FEE4A8205BD9ULL } }, /* XSUM_XXH128_testdata[3477] */\n    { 1159, 0x000000009E3779B1ULL, { 0x749E9EAB14747B43ULL, 0xDD0FC7FFA86CA5ECULL } }, /* XSUM_XXH128_testdata[3478] */\n    { 1159, 0x9E3779B185EBCA8DULL, { 0x03A8D27CA2B2D76AULL, 0x6A72D9B0FDD0954BULL } }, /* XSUM_XXH128_testdata[3479] */\n    { 1160, 0x0000000000000000ULL, { 0x33C5E608FD1DCAACULL, 0x8D8608F5A9FA01B4ULL } }, /* XSUM_XXH128_testdata[3480] */\n    { 1160, 0x000000009E3779B1ULL, { 0x54E6BEC0457C9FFCULL, 0xA4FC682E771B663EULL } }, /* XSUM_XXH128_testdata[3481] */\n    { 1160, 0x9E3779B185EBCA8DULL, { 0x40688062F1E7B6FFULL, 0x8A25A3BCA111A066ULL } }, /* XSUM_XXH128_testdata[3482] */\n    { 1161, 0x0000000000000000ULL, { 0x6B02FA3CCF0807B9ULL, 0xCD8B2E809835BFAFULL } }, /* XSUM_XXH128_testdata[3483] */\n    { 1161, 0x000000009E3779B1ULL, { 0xCA0171A1491BDDEAULL, 0x62323C4E46EC9862ULL } }, /* XSUM_XXH128_testdata[3484] */\n    { 1161, 0x9E3779B185EBCA8DULL, { 0x43F4ECDD94066F7DULL, 0x9D2AF8891EB4309CULL } }, /* XSUM_XXH128_testdata[3485] */\n    { 1162, 0x0000000000000000ULL, { 0xE1AD8D763CC16027ULL, 0x5A379025A10989BBULL } }, /* XSUM_XXH128_testdata[3486] */\n    { 1162, 0x000000009E3779B1ULL, { 0x6555FD899FC44FD3ULL, 0x74C382F52A05559AULL } }, /* XSUM_XXH128_testdata[3487] */\n    { 1162, 0x9E3779B185EBCA8DULL, { 0xC6700710D9B395B0ULL, 0xABEA1108FC2EEBB5ULL } }, /* XSUM_XXH128_testdata[3488] */\n    { 1163, 0x0000000000000000ULL, { 0x573093F71A1634B7ULL, 0xD2CA8B90EA8EBE38ULL } }, /* XSUM_XXH128_testdata[3489] */\n    { 1163, 0x000000009E3779B1ULL, { 0xE3F1531D75228F5CULL, 0x723D469BF93163EDULL } }, /* XSUM_XXH128_testdata[3490] */\n    { 1163, 0x9E3779B185EBCA8DULL, { 0x68E92EB26219F13FULL, 0x3D5F16CD3FB00C5CULL } }, /* XSUM_XXH128_testdata[3491] */\n    { 1164, 0x0000000000000000ULL, { 0x9DEBD4109474D726ULL, 0x8FE0712494742CB0ULL } }, /* XSUM_XXH128_testdata[3492] */\n    { 1164, 0x000000009E3779B1ULL, { 0xB63F687A28C58ADCULL, 0xAE64B3BC791CEC49ULL } }, /* XSUM_XXH128_testdata[3493] */\n    { 1164, 0x9E3779B185EBCA8DULL, { 0x5A6788F657CD633BULL, 0xF03FECD496AE7A43ULL } }, /* XSUM_XXH128_testdata[3494] */\n    { 1165, 0x0000000000000000ULL, { 0x1FF83F00B1BA6967ULL, 0xE22F1232E08AAC29ULL } }, /* XSUM_XXH128_testdata[3495] */\n    { 1165, 0x000000009E3779B1ULL, { 0x2FEAE7A27CD7E58DULL, 0x32A9880284ADDDC8ULL } }, /* XSUM_XXH128_testdata[3496] */\n    { 1165, 0x9E3779B185EBCA8DULL, { 0xE699B831D005AA77ULL, 0x729FE70527DB7B3FULL } }, /* XSUM_XXH128_testdata[3497] */\n    { 1166, 0x0000000000000000ULL, { 0xADF8173CC6FC46F1ULL, 0xB8A9FB716F74E07DULL } }, /* XSUM_XXH128_testdata[3498] */\n    { 1166, 0x000000009E3779B1ULL, { 0xD1BC13469AF686ACULL, 0x45C19918D1608640ULL } }, /* XSUM_XXH128_testdata[3499] */\n    { 1166, 0x9E3779B185EBCA8DULL, { 0xC594148173266FDAULL, 0x892DCD53DCDF2FA8ULL } }, /* XSUM_XXH128_testdata[3500] */\n    { 1167, 0x0000000000000000ULL, { 0xB9D3BAD7E7FC06D6ULL, 0x01FC939B8EFBA859ULL } }, /* XSUM_XXH128_testdata[3501] */\n    { 1167, 0x000000009E3779B1ULL, { 0x2989AC4ED629C25BULL, 0x06669D9668BD36DEULL } }, /* XSUM_XXH128_testdata[3502] */\n    { 1167, 0x9E3779B185EBCA8DULL, { 0xF8A28AE7386C9CA6ULL, 0x99778DC7559F3C2FULL } }, /* XSUM_XXH128_testdata[3503] */\n    { 1168, 0x0000000000000000ULL, { 0x2481831BA46F2CADULL, 0xCDA03EEE95CFE40BULL } }, /* XSUM_XXH128_testdata[3504] */\n    { 1168, 0x000000009E3779B1ULL, { 0x1269F8B6C54CF0BCULL, 0x23058DA16CB6D4F3ULL } }, /* XSUM_XXH128_testdata[3505] */\n    { 1168, 0x9E3779B185EBCA8DULL, { 0xB335B696CA795EE7ULL, 0x29C8972B60D89BFEULL } }, /* XSUM_XXH128_testdata[3506] */\n    { 1169, 0x0000000000000000ULL, { 0x02DC7BCE7DCAE4A8ULL, 0xBDDDC400E0D87778ULL } }, /* XSUM_XXH128_testdata[3507] */\n    { 1169, 0x000000009E3779B1ULL, { 0xAEB1AAF99FB713D0ULL, 0xD9EABCFA0DCD0775ULL } }, /* XSUM_XXH128_testdata[3508] */\n    { 1169, 0x9E3779B185EBCA8DULL, { 0xE348E8AA3E73F106ULL, 0x3488903498F31B71ULL } }, /* XSUM_XXH128_testdata[3509] */\n    { 1170, 0x0000000000000000ULL, { 0x79061966F462DCDAULL, 0xBD399C3F37F22880ULL } }, /* XSUM_XXH128_testdata[3510] */\n    { 1170, 0x000000009E3779B1ULL, { 0x622489E23CE96824ULL, 0x100A53213B643748ULL } }, /* XSUM_XXH128_testdata[3511] */\n    { 1170, 0x9E3779B185EBCA8DULL, { 0x4991A0E944442A33ULL, 0xE45627A6E89DE6C3ULL } }, /* XSUM_XXH128_testdata[3512] */\n    { 1171, 0x0000000000000000ULL, { 0xAAB7B2C920767186ULL, 0xFFF5FF56AC764794ULL } }, /* XSUM_XXH128_testdata[3513] */\n    { 1171, 0x000000009E3779B1ULL, { 0x06AD8AB6F70021BAULL, 0xF1B43A61647F09C3ULL } }, /* XSUM_XXH128_testdata[3514] */\n    { 1171, 0x9E3779B185EBCA8DULL, { 0x1644853718A82C48ULL, 0xA914FDE5BBCD2BB9ULL } }, /* XSUM_XXH128_testdata[3515] */\n    { 1172, 0x0000000000000000ULL, { 0x377984BBDC972C61ULL, 0x1E4ADA691430DC82ULL } }, /* XSUM_XXH128_testdata[3516] */\n    { 1172, 0x000000009E3779B1ULL, { 0x5F11B0BBB35F1072ULL, 0x4EBE5BE5705396F8ULL } }, /* XSUM_XXH128_testdata[3517] */\n    { 1172, 0x9E3779B185EBCA8DULL, { 0xBFCC79B556D0FAD1ULL, 0x35800105840C2613ULL } }, /* XSUM_XXH128_testdata[3518] */\n    { 1173, 0x0000000000000000ULL, { 0x0B774EDF492C83B0ULL, 0x29D46D25DE3B0526ULL } }, /* XSUM_XXH128_testdata[3519] */\n    { 1173, 0x000000009E3779B1ULL, { 0x933A282A37E52824ULL, 0x3819AC00A1E6947CULL } }, /* XSUM_XXH128_testdata[3520] */\n    { 1173, 0x9E3779B185EBCA8DULL, { 0x3B7CE54D4FF74975ULL, 0xE84313A700D32B60ULL } }, /* XSUM_XXH128_testdata[3521] */\n    { 1174, 0x0000000000000000ULL, { 0xD9956AE7D21B2F84ULL, 0x06DC94398B5BF886ULL } }, /* XSUM_XXH128_testdata[3522] */\n    { 1174, 0x000000009E3779B1ULL, { 0xCBE95053E7150110ULL, 0xD556DB307B932133ULL } }, /* XSUM_XXH128_testdata[3523] */\n    { 1174, 0x9E3779B185EBCA8DULL, { 0xB73ACE5844F5D7AAULL, 0xBF5D9E6D1C520502ULL } }, /* XSUM_XXH128_testdata[3524] */\n    { 1175, 0x0000000000000000ULL, { 0x254AC4049415B36EULL, 0x690642C11DD48209ULL } }, /* XSUM_XXH128_testdata[3525] */\n    { 1175, 0x000000009E3779B1ULL, { 0xAD8C71D836908417ULL, 0x566777C634443A40ULL } }, /* XSUM_XXH128_testdata[3526] */\n    { 1175, 0x9E3779B185EBCA8DULL, { 0xDA2B6F4CFD587974ULL, 0x672A7602AF3B1AC5ULL } }, /* XSUM_XXH128_testdata[3527] */\n    { 1176, 0x0000000000000000ULL, { 0x763F66686DCB793EULL, 0x0696427E3AB5BAA1ULL } }, /* XSUM_XXH128_testdata[3528] */\n    { 1176, 0x000000009E3779B1ULL, { 0x4B96BF52359D21CDULL, 0x2E440413E9D35D30ULL } }, /* XSUM_XXH128_testdata[3529] */\n    { 1176, 0x9E3779B185EBCA8DULL, { 0x043904FCE497378FULL, 0x88F405B5E93AA94DULL } }, /* XSUM_XXH128_testdata[3530] */\n    { 1177, 0x0000000000000000ULL, { 0x7497A217A28DCC72ULL, 0x965EADE214C31CBCULL } }, /* XSUM_XXH128_testdata[3531] */\n    { 1177, 0x000000009E3779B1ULL, { 0x91FACA0DBFF434FCULL, 0xF24421AB9683CE82ULL } }, /* XSUM_XXH128_testdata[3532] */\n    { 1177, 0x9E3779B185EBCA8DULL, { 0x532A929B311E60ECULL, 0xFC5C3E3832002DA1ULL } }, /* XSUM_XXH128_testdata[3533] */\n    { 1178, 0x0000000000000000ULL, { 0x253D013B8D280C37ULL, 0xC43245EA07BA7EF7ULL } }, /* XSUM_XXH128_testdata[3534] */\n    { 1178, 0x000000009E3779B1ULL, { 0xBC8C333149C563FEULL, 0x7A0C2C991ED082C3ULL } }, /* XSUM_XXH128_testdata[3535] */\n    { 1178, 0x9E3779B185EBCA8DULL, { 0xE25B82B4BC5D331EULL, 0x05D0BA7B75135258ULL } }, /* XSUM_XXH128_testdata[3536] */\n    { 1179, 0x0000000000000000ULL, { 0x030F0AEA67DB5C79ULL, 0xD8524D9C10DDEA9EULL } }, /* XSUM_XXH128_testdata[3537] */\n    { 1179, 0x000000009E3779B1ULL, { 0xC5199E29CBC8AF8BULL, 0x5CF5AECA008476E7ULL } }, /* XSUM_XXH128_testdata[3538] */\n    { 1179, 0x9E3779B185EBCA8DULL, { 0x7131DB7933A9CAAEULL, 0x8A49BEA252F8F13BULL } }, /* XSUM_XXH128_testdata[3539] */\n    { 1180, 0x0000000000000000ULL, { 0x5F5C759A10D1AF03ULL, 0xBFD0626E13BBFF1DULL } }, /* XSUM_XXH128_testdata[3540] */\n    { 1180, 0x000000009E3779B1ULL, { 0x449E881982F8A9D6ULL, 0xFCB6B806E3CDDD58ULL } }, /* XSUM_XXH128_testdata[3541] */\n    { 1180, 0x9E3779B185EBCA8DULL, { 0x0D36C9BB287F117BULL, 0xC5B34A2994550C9EULL } }, /* XSUM_XXH128_testdata[3542] */\n    { 1181, 0x0000000000000000ULL, { 0x97AC67580FD4C886ULL, 0xF996F295188B980BULL } }, /* XSUM_XXH128_testdata[3543] */\n    { 1181, 0x000000009E3779B1ULL, { 0xFE998D4B86BB1956ULL, 0x82F64EA18F35C1D8ULL } }, /* XSUM_XXH128_testdata[3544] */\n    { 1181, 0x9E3779B185EBCA8DULL, { 0x7602370EC794621BULL, 0xD38797A782225274ULL } }, /* XSUM_XXH128_testdata[3545] */\n    { 1182, 0x0000000000000000ULL, { 0xDF9B39788BABDDAFULL, 0xCC9967E334131AA9ULL } }, /* XSUM_XXH128_testdata[3546] */\n    { 1182, 0x000000009E3779B1ULL, { 0x86B7C227DA034441ULL, 0xBC9BD05F637F6DD8ULL } }, /* XSUM_XXH128_testdata[3547] */\n    { 1182, 0x9E3779B185EBCA8DULL, { 0x7C09B5F543FA2583ULL, 0xEC5C0201E5BBFB6FULL } }, /* XSUM_XXH128_testdata[3548] */\n    { 1183, 0x0000000000000000ULL, { 0x94CF2A6D670BD114ULL, 0xBC1F07EF116B6369ULL } }, /* XSUM_XXH128_testdata[3549] */\n    { 1183, 0x000000009E3779B1ULL, { 0x93FE56A4C53C0D05ULL, 0x86911A49B331D196ULL } }, /* XSUM_XXH128_testdata[3550] */\n    { 1183, 0x9E3779B185EBCA8DULL, { 0xA708E0A87286116BULL, 0xF86D41F269AA30A6ULL } }, /* XSUM_XXH128_testdata[3551] */\n    { 1184, 0x0000000000000000ULL, { 0x76B645800E737E45ULL, 0xDD42CE55D1DBC9E5ULL } }, /* XSUM_XXH128_testdata[3552] */\n    { 1184, 0x000000009E3779B1ULL, { 0x27F11313AC664065ULL, 0x8AF081D8031FAF83ULL } }, /* XSUM_XXH128_testdata[3553] */\n    { 1184, 0x9E3779B185EBCA8DULL, { 0xFB3C8BCA9776922BULL, 0x91BE560A96FF1C2CULL } }, /* XSUM_XXH128_testdata[3554] */\n    { 1185, 0x0000000000000000ULL, { 0x596A8828CE2B8ED9ULL, 0xF32857484BE91DD2ULL } }, /* XSUM_XXH128_testdata[3555] */\n    { 1185, 0x000000009E3779B1ULL, { 0xB2BE2B625A0C3EBCULL, 0x59ECF70CE110F7A3ULL } }, /* XSUM_XXH128_testdata[3556] */\n    { 1185, 0x9E3779B185EBCA8DULL, { 0x016272A320784820ULL, 0x664CFC4C39C55645ULL } }, /* XSUM_XXH128_testdata[3557] */\n    { 1186, 0x0000000000000000ULL, { 0x65A6DE268E6B1931ULL, 0xEFA8BFF6EF0FC901ULL } }, /* XSUM_XXH128_testdata[3558] */\n    { 1186, 0x000000009E3779B1ULL, { 0xEBA5DBE33850F0BFULL, 0x8B8C1D928375FEE2ULL } }, /* XSUM_XXH128_testdata[3559] */\n    { 1186, 0x9E3779B185EBCA8DULL, { 0x126CF07FE3A547F7ULL, 0x586ED870290EB8FBULL } }, /* XSUM_XXH128_testdata[3560] */\n    { 1187, 0x0000000000000000ULL, { 0x43F7BC2C8C631282ULL, 0xF6F47E19DCD0FB4FULL } }, /* XSUM_XXH128_testdata[3561] */\n    { 1187, 0x000000009E3779B1ULL, { 0xC0A9D5B32FFDEC0FULL, 0x5D45371EEEDD1701ULL } }, /* XSUM_XXH128_testdata[3562] */\n    { 1187, 0x9E3779B185EBCA8DULL, { 0x1F6351FEF142B5F1ULL, 0x25EC78E55809CBA4ULL } }, /* XSUM_XXH128_testdata[3563] */\n    { 1188, 0x0000000000000000ULL, { 0xE1851CC71FC6FD60ULL, 0xCEBEDBA1DC59687BULL } }, /* XSUM_XXH128_testdata[3564] */\n    { 1188, 0x000000009E3779B1ULL, { 0xFA0CC49EE36CB65AULL, 0x757D2CB0E77377E2ULL } }, /* XSUM_XXH128_testdata[3565] */\n    { 1188, 0x9E3779B185EBCA8DULL, { 0x2319155DCA7F781EULL, 0x3F9DCA24311826EAULL } }, /* XSUM_XXH128_testdata[3566] */\n    { 1189, 0x0000000000000000ULL, { 0xF3B7E0EED66D8AB7ULL, 0x74E18D213F243BD6ULL } }, /* XSUM_XXH128_testdata[3567] */\n    { 1189, 0x000000009E3779B1ULL, { 0xA8C4827FA055425EULL, 0x0C6947D8EC870FC6ULL } }, /* XSUM_XXH128_testdata[3568] */\n    { 1189, 0x9E3779B185EBCA8DULL, { 0xFFD2FEA9DCDA49C8ULL, 0x70C69F59990B188EULL } }, /* XSUM_XXH128_testdata[3569] */\n    { 1190, 0x0000000000000000ULL, { 0x4543A9DAADC78B77ULL, 0xAA887CDE739C0D8AULL } }, /* XSUM_XXH128_testdata[3570] */\n    { 1190, 0x000000009E3779B1ULL, { 0x39D2228550058764ULL, 0x6AE7EC2640B33C8AULL } }, /* XSUM_XXH128_testdata[3571] */\n    { 1190, 0x9E3779B185EBCA8DULL, { 0xD52DA73BDEAD7097ULL, 0xA023C46CE8162CAAULL } }, /* XSUM_XXH128_testdata[3572] */\n    { 1191, 0x0000000000000000ULL, { 0xBBA0CCC91A773F43ULL, 0xC49D155CF3B65857ULL } }, /* XSUM_XXH128_testdata[3573] */\n    { 1191, 0x000000009E3779B1ULL, { 0xA8DE49DD9279E7AAULL, 0x5249F92961325BB1ULL } }, /* XSUM_XXH128_testdata[3574] */\n    { 1191, 0x9E3779B185EBCA8DULL, { 0xFA7D0878F0E42D52ULL, 0x4F2CA7CECD763E2CULL } }, /* XSUM_XXH128_testdata[3575] */\n    { 1192, 0x0000000000000000ULL, { 0xCC7D840BCE9BAC5EULL, 0x14E84CAC07861D2FULL } }, /* XSUM_XXH128_testdata[3576] */\n    { 1192, 0x000000009E3779B1ULL, { 0x9445E23955F1FBC5ULL, 0xCD7B74390D16711FULL } }, /* XSUM_XXH128_testdata[3577] */\n    { 1192, 0x9E3779B185EBCA8DULL, { 0x1A5684985BBD433EULL, 0x829043677F213713ULL } }, /* XSUM_XXH128_testdata[3578] */\n    { 1193, 0x0000000000000000ULL, { 0x39E9ABD8764C36FAULL, 0x6338DA03840EE491ULL } }, /* XSUM_XXH128_testdata[3579] */\n    { 1193, 0x000000009E3779B1ULL, { 0x56A1A9828184920AULL, 0xC6A32BA7BEBCB3B6ULL } }, /* XSUM_XXH128_testdata[3580] */\n    { 1193, 0x9E3779B185EBCA8DULL, { 0xB35ECC57D2A66C11ULL, 0x016D69DA7985D7D6ULL } }, /* XSUM_XXH128_testdata[3581] */\n    { 1194, 0x0000000000000000ULL, { 0x30BD41F718E2D454ULL, 0x535B5367F551D5BBULL } }, /* XSUM_XXH128_testdata[3582] */\n    { 1194, 0x000000009E3779B1ULL, { 0x88FFF722D6CE7111ULL, 0x18D1E252187B3003ULL } }, /* XSUM_XXH128_testdata[3583] */\n    { 1194, 0x9E3779B185EBCA8DULL, { 0x51A49CBB02557472ULL, 0x6306450829E46712ULL } }, /* XSUM_XXH128_testdata[3584] */\n    { 1195, 0x0000000000000000ULL, { 0x0914B04B3B4D335EULL, 0x546536485DCA0C41ULL } }, /* XSUM_XXH128_testdata[3585] */\n    { 1195, 0x000000009E3779B1ULL, { 0xF1452B194B80F205ULL, 0xF3A2123FF69641F2ULL } }, /* XSUM_XXH128_testdata[3586] */\n    { 1195, 0x9E3779B185EBCA8DULL, { 0x3B51F879AEA1BE77ULL, 0x58B1B2817693EABCULL } }, /* XSUM_XXH128_testdata[3587] */\n    { 1196, 0x0000000000000000ULL, { 0xCC0CE7BA422B55CFULL, 0x38806C78E88D0DF7ULL } }, /* XSUM_XXH128_testdata[3588] */\n    { 1196, 0x000000009E3779B1ULL, { 0x0A255B683A633580ULL, 0x0554CF322A8EFEEBULL } }, /* XSUM_XXH128_testdata[3589] */\n    { 1196, 0x9E3779B185EBCA8DULL, { 0x0F06EC5AC1D04855ULL, 0x4811857A10345449ULL } }, /* XSUM_XXH128_testdata[3590] */\n    { 1197, 0x0000000000000000ULL, { 0xD91DF662BC7D84C9ULL, 0xFBF0E264C9DE9CCCULL } }, /* XSUM_XXH128_testdata[3591] */\n    { 1197, 0x000000009E3779B1ULL, { 0xD9A7764566DE708DULL, 0x92C258112667AC8CULL } }, /* XSUM_XXH128_testdata[3592] */\n    { 1197, 0x9E3779B185EBCA8DULL, { 0xBE419090E56BB293ULL, 0xE4B9B2C20793E265ULL } }, /* XSUM_XXH128_testdata[3593] */\n    { 1198, 0x0000000000000000ULL, { 0x0D0DFBCD20029D56ULL, 0x26A02FC7B489E9A5ULL } }, /* XSUM_XXH128_testdata[3594] */\n    { 1198, 0x000000009E3779B1ULL, { 0xD0558B8E912A7DEAULL, 0x808D86192391BC9EULL } }, /* XSUM_XXH128_testdata[3595] */\n    { 1198, 0x9E3779B185EBCA8DULL, { 0x7F9233AF2D2A09B3ULL, 0x76FA2956D6A2B884ULL } }, /* XSUM_XXH128_testdata[3596] */\n    { 1199, 0x0000000000000000ULL, { 0xB11D0BAAD822491AULL, 0x3E1D82F8EE04A175ULL } }, /* XSUM_XXH128_testdata[3597] */\n    { 1199, 0x000000009E3779B1ULL, { 0x1F4C1F9DF2C0C7C8ULL, 0x400C96E9A5DFF3B9ULL } }, /* XSUM_XXH128_testdata[3598] */\n    { 1199, 0x9E3779B185EBCA8DULL, { 0xC2620E0E0D1AB3F3ULL, 0xEA69AFCD686859F5ULL } }, /* XSUM_XXH128_testdata[3599] */\n    { 1200, 0x0000000000000000ULL, { 0x203BF68D0CB40248ULL, 0x7CB02D7862CFC204ULL } }, /* XSUM_XXH128_testdata[3600] */\n    { 1200, 0x000000009E3779B1ULL, { 0x96B8516EC2DF307DULL, 0x58AFFE34E6D97F15ULL } }, /* XSUM_XXH128_testdata[3601] */\n    { 1200, 0x9E3779B185EBCA8DULL, { 0xC782C87F8C12981EULL, 0x44F13BEE051AFB52ULL } }, /* XSUM_XXH128_testdata[3602] */\n    { 1201, 0x0000000000000000ULL, { 0x27AC93A13B0441EAULL, 0x8CA42C7DD0A6E8B2ULL } }, /* XSUM_XXH128_testdata[3603] */\n    { 1201, 0x000000009E3779B1ULL, { 0xD46513209A4CA9A2ULL, 0xF362BFBE6D95BD4FULL } }, /* XSUM_XXH128_testdata[3604] */\n    { 1201, 0x9E3779B185EBCA8DULL, { 0x00322A94AD07FE4CULL, 0xF957E56CB241640AULL } }, /* XSUM_XXH128_testdata[3605] */\n    { 1202, 0x0000000000000000ULL, { 0xCA123B3DB28A833FULL, 0x87B8D0C60288B3FBULL } }, /* XSUM_XXH128_testdata[3606] */\n    { 1202, 0x000000009E3779B1ULL, { 0x5462083EDD43A337ULL, 0x9AF4402BB71C7267ULL } }, /* XSUM_XXH128_testdata[3607] */\n    { 1202, 0x9E3779B185EBCA8DULL, { 0xD85795992279DC35ULL, 0x2326BF0CA3443B3BULL } }, /* XSUM_XXH128_testdata[3608] */\n    { 1203, 0x0000000000000000ULL, { 0x1F9522CE4E8A3569ULL, 0xA413B2A65E24C859ULL } }, /* XSUM_XXH128_testdata[3609] */\n    { 1203, 0x000000009E3779B1ULL, { 0x7E1C0AD4BCFD0D9FULL, 0x3C8BB3CDB9B80467ULL } }, /* XSUM_XXH128_testdata[3610] */\n    { 1203, 0x9E3779B185EBCA8DULL, { 0xE801BBE0C28C37A5ULL, 0xA36550A64C468824ULL } }, /* XSUM_XXH128_testdata[3611] */\n    { 1204, 0x0000000000000000ULL, { 0x5D59E44EAA3FA1A2ULL, 0x8B2C6DF895F028A3ULL } }, /* XSUM_XXH128_testdata[3612] */\n    { 1204, 0x000000009E3779B1ULL, { 0xFCAB4609385BBF34ULL, 0x85CB35F6CDC12BF8ULL } }, /* XSUM_XXH128_testdata[3613] */\n    { 1204, 0x9E3779B185EBCA8DULL, { 0x2FFEC7EDE4C35A95ULL, 0xC17815C2EC75EC3DULL } }, /* XSUM_XXH128_testdata[3614] */\n    { 1205, 0x0000000000000000ULL, { 0x0785920A1E8E65FBULL, 0xEED1C26A3515FDF2ULL } }, /* XSUM_XXH128_testdata[3615] */\n    { 1205, 0x000000009E3779B1ULL, { 0xEE899AC3C35E78F5ULL, 0xAF4D8E51BD07387DULL } }, /* XSUM_XXH128_testdata[3616] */\n    { 1205, 0x9E3779B185EBCA8DULL, { 0xD9534F0920956617ULL, 0xA6AB38236846B07DULL } }, /* XSUM_XXH128_testdata[3617] */\n    { 1206, 0x0000000000000000ULL, { 0xBCBB1735D914A75BULL, 0x016994FB0BEFCD7DULL } }, /* XSUM_XXH128_testdata[3618] */\n    { 1206, 0x000000009E3779B1ULL, { 0x1C4BD2EC9CDB26E6ULL, 0xE376931BE0BDC20AULL } }, /* XSUM_XXH128_testdata[3619] */\n    { 1206, 0x9E3779B185EBCA8DULL, { 0xB5D845E610439EC3ULL, 0xBB7CBB21554C03B1ULL } }, /* XSUM_XXH128_testdata[3620] */\n    { 1207, 0x0000000000000000ULL, { 0x4F834DD477E34CA1ULL, 0x2A1BA696B7B7735DULL } }, /* XSUM_XXH128_testdata[3621] */\n    { 1207, 0x000000009E3779B1ULL, { 0x331B7B501B4D7D13ULL, 0x22655D55156C3DBAULL } }, /* XSUM_XXH128_testdata[3622] */\n    { 1207, 0x9E3779B185EBCA8DULL, { 0xF043EC3B6AFF48F2ULL, 0xF88B8855C81D581CULL } }, /* XSUM_XXH128_testdata[3623] */\n    { 1208, 0x0000000000000000ULL, { 0xF819C4DA04BE8BFFULL, 0x1B4725654C974772ULL } }, /* XSUM_XXH128_testdata[3624] */\n    { 1208, 0x000000009E3779B1ULL, { 0x89636B3092050743ULL, 0x35C49FDC51704E5AULL } }, /* XSUM_XXH128_testdata[3625] */\n    { 1208, 0x9E3779B185EBCA8DULL, { 0x10770E2138DB91E7ULL, 0x6646A078B229D91BULL } }, /* XSUM_XXH128_testdata[3626] */\n    { 1209, 0x0000000000000000ULL, { 0x471FD17969E5C08EULL, 0x3D5BDC7E0EFBB732ULL } }, /* XSUM_XXH128_testdata[3627] */\n    { 1209, 0x000000009E3779B1ULL, { 0x5E6F658C909A7C53ULL, 0x7F295E8D57919A14ULL } }, /* XSUM_XXH128_testdata[3628] */\n    { 1209, 0x9E3779B185EBCA8DULL, { 0x95228F4333CA7537ULL, 0x585955D67D5284F7ULL } }, /* XSUM_XXH128_testdata[3629] */\n    { 1210, 0x0000000000000000ULL, { 0x4BD9860726BF5B55ULL, 0x83AE3C73368A6CC1ULL } }, /* XSUM_XXH128_testdata[3630] */\n    { 1210, 0x000000009E3779B1ULL, { 0xBC6E35F2FF81C2EBULL, 0x9FB644DFCD45AE65ULL } }, /* XSUM_XXH128_testdata[3631] */\n    { 1210, 0x9E3779B185EBCA8DULL, { 0xA2E35D62CDDFC4C2ULL, 0xD51C787AEFBBFE7DULL } }, /* XSUM_XXH128_testdata[3632] */\n    { 1211, 0x0000000000000000ULL, { 0xF01EB0C5F58E4BD7ULL, 0xE9425AE09D54EF83ULL } }, /* XSUM_XXH128_testdata[3633] */\n    { 1211, 0x000000009E3779B1ULL, { 0x7112DD7ECC01B2E3ULL, 0x90BC1F7B90A6D4C1ULL } }, /* XSUM_XXH128_testdata[3634] */\n    { 1211, 0x9E3779B185EBCA8DULL, { 0xA795DF56C4A70D09ULL, 0xEF75B7A79E41DED4ULL } }, /* XSUM_XXH128_testdata[3635] */\n    { 1212, 0x0000000000000000ULL, { 0xA66DAA355D58FB75ULL, 0x661A0D8A35D6A1ACULL } }, /* XSUM_XXH128_testdata[3636] */\n    { 1212, 0x000000009E3779B1ULL, { 0x52D4E6D61D984011ULL, 0x3D10319B1D3C37EAULL } }, /* XSUM_XXH128_testdata[3637] */\n    { 1212, 0x9E3779B185EBCA8DULL, { 0x5717E813E2BF8BA3ULL, 0xB354C42BC421586AULL } }, /* XSUM_XXH128_testdata[3638] */\n    { 1213, 0x0000000000000000ULL, { 0xECDC982B4F911BB1ULL, 0xB07AF89DC31B12EFULL } }, /* XSUM_XXH128_testdata[3639] */\n    { 1213, 0x000000009E3779B1ULL, { 0xA4B584DB640F7D47ULL, 0xCF94932D825E7F9BULL } }, /* XSUM_XXH128_testdata[3640] */\n    { 1213, 0x9E3779B185EBCA8DULL, { 0xD8762F676DA901FCULL, 0xC1C6680E636EBF72ULL } }, /* XSUM_XXH128_testdata[3641] */\n    { 1214, 0x0000000000000000ULL, { 0xE048972A53CAB698ULL, 0xA10236B8F738F346ULL } }, /* XSUM_XXH128_testdata[3642] */\n    { 1214, 0x000000009E3779B1ULL, { 0xCFA6B0DE372EBA46ULL, 0x37D35247ED40666FULL } }, /* XSUM_XXH128_testdata[3643] */\n    { 1214, 0x9E3779B185EBCA8DULL, { 0x17117BC29230BC57ULL, 0x99972A95BAF9A8E4ULL } }, /* XSUM_XXH128_testdata[3644] */\n    { 1215, 0x0000000000000000ULL, { 0xE930426227BAD1BCULL, 0x5DF1B481284237ABULL } }, /* XSUM_XXH128_testdata[3645] */\n    { 1215, 0x000000009E3779B1ULL, { 0x6CB649B9027F572EULL, 0xF4B417348CE8AF51ULL } }, /* XSUM_XXH128_testdata[3646] */\n    { 1215, 0x9E3779B185EBCA8DULL, { 0x9E886B47FF351E95ULL, 0x0F9E7875438D95FAULL } }, /* XSUM_XXH128_testdata[3647] */\n    { 1216, 0x0000000000000000ULL, { 0xFE0C4B62F3111B46ULL, 0x118F8322B5743A43ULL } }, /* XSUM_XXH128_testdata[3648] */\n    { 1216, 0x000000009E3779B1ULL, { 0xD0E0B67BDDF125A6ULL, 0x5B1420294467634AULL } }, /* XSUM_XXH128_testdata[3649] */\n    { 1216, 0x9E3779B185EBCA8DULL, { 0x81DB6085A96B2900ULL, 0x35A9F280743FAB34ULL } }, /* XSUM_XXH128_testdata[3650] */\n    { 1217, 0x0000000000000000ULL, { 0x253D5AB8AAE1CADBULL, 0x65B1AE8B2D1D64AEULL } }, /* XSUM_XXH128_testdata[3651] */\n    { 1217, 0x000000009E3779B1ULL, { 0xF91442E0A9E13387ULL, 0x387B0FB21B3E446AULL } }, /* XSUM_XXH128_testdata[3652] */\n    { 1217, 0x9E3779B185EBCA8DULL, { 0xF3ED7CC23687AF94ULL, 0x1BD0D1870557BD07ULL } }, /* XSUM_XXH128_testdata[3653] */\n    { 1218, 0x0000000000000000ULL, { 0x1F997933C417290EULL, 0xC192B52DD0460E92ULL } }, /* XSUM_XXH128_testdata[3654] */\n    { 1218, 0x000000009E3779B1ULL, { 0x478A02104607C3AAULL, 0x46D8B4A327235473ULL } }, /* XSUM_XXH128_testdata[3655] */\n    { 1218, 0x9E3779B185EBCA8DULL, { 0xB76BD5C9B4311FDBULL, 0x582DC35D726E0379ULL } }, /* XSUM_XXH128_testdata[3656] */\n    { 1219, 0x0000000000000000ULL, { 0xEDE8E2A4179E0A79ULL, 0x717F70D6691FC5B4ULL } }, /* XSUM_XXH128_testdata[3657] */\n    { 1219, 0x000000009E3779B1ULL, { 0x0D7784B7843DEFF0ULL, 0x3CE35DD4C57EBA35ULL } }, /* XSUM_XXH128_testdata[3658] */\n    { 1219, 0x9E3779B185EBCA8DULL, { 0xA606C217B1D3B5C6ULL, 0x10F953B5A9B1EFE6ULL } }, /* XSUM_XXH128_testdata[3659] */\n    { 1220, 0x0000000000000000ULL, { 0x16DDEBA258E5BEC7ULL, 0xA964D688C9ED7FC9ULL } }, /* XSUM_XXH128_testdata[3660] */\n    { 1220, 0x000000009E3779B1ULL, { 0x80BB5AE0E6A72DACULL, 0x81DADCEABD4B2986ULL } }, /* XSUM_XXH128_testdata[3661] */\n    { 1220, 0x9E3779B185EBCA8DULL, { 0x618115D34B8140C8ULL, 0x198B8703092D6B44ULL } }, /* XSUM_XXH128_testdata[3662] */\n    { 1221, 0x0000000000000000ULL, { 0x434F9B679E3E3131ULL, 0xA0439E404D7FC2F1ULL } }, /* XSUM_XXH128_testdata[3663] */\n    { 1221, 0x000000009E3779B1ULL, { 0x4BB85D3D3118D33EULL, 0xC6A5460A339372B8ULL } }, /* XSUM_XXH128_testdata[3664] */\n    { 1221, 0x9E3779B185EBCA8DULL, { 0x204DACFA0F41B777ULL, 0x735F2E0AAA11474AULL } }, /* XSUM_XXH128_testdata[3665] */\n    { 1222, 0x0000000000000000ULL, { 0x40C68C7EB6E9987CULL, 0xE4B762CE02BDEBF8ULL } }, /* XSUM_XXH128_testdata[3666] */\n    { 1222, 0x000000009E3779B1ULL, { 0x3272298FC6D84950ULL, 0xB9C50D580FF7741BULL } }, /* XSUM_XXH128_testdata[3667] */\n    { 1222, 0x9E3779B185EBCA8DULL, { 0xA000201050DAED60ULL, 0xDDA94ED687C8D0BFULL } }, /* XSUM_XXH128_testdata[3668] */\n    { 1223, 0x0000000000000000ULL, { 0xC426E8B70AA0FF54ULL, 0x64B5777843599D1BULL } }, /* XSUM_XXH128_testdata[3669] */\n    { 1223, 0x000000009E3779B1ULL, { 0xD1AFBF371456323AULL, 0x9FBE0B66AFF5D3B4ULL } }, /* XSUM_XXH128_testdata[3670] */\n    { 1223, 0x9E3779B185EBCA8DULL, { 0x826C1746F4379357ULL, 0x889B6DFA4E3C6919ULL } }, /* XSUM_XXH128_testdata[3671] */\n    { 1224, 0x0000000000000000ULL, { 0x4141EABAAF368238ULL, 0x632134CB9724EFFEULL } }, /* XSUM_XXH128_testdata[3672] */\n    { 1224, 0x000000009E3779B1ULL, { 0xC6BE40FABB10E04CULL, 0xF6E6AEFECF0401D3ULL } }, /* XSUM_XXH128_testdata[3673] */\n    { 1224, 0x9E3779B185EBCA8DULL, { 0xC91E8334C06455F2ULL, 0xAA3776F8F4F67F24ULL } }, /* XSUM_XXH128_testdata[3674] */\n    { 1225, 0x0000000000000000ULL, { 0x9A43EA1ED266BBD2ULL, 0xEAF7CA601316135DULL } }, /* XSUM_XXH128_testdata[3675] */\n    { 1225, 0x000000009E3779B1ULL, { 0xA61372A2EB1A4EEDULL, 0xB41C8D1E4AFCA508ULL } }, /* XSUM_XXH128_testdata[3676] */\n    { 1225, 0x9E3779B185EBCA8DULL, { 0x59BE464BF88208C7ULL, 0xF40F174CE8C49F7BULL } }, /* XSUM_XXH128_testdata[3677] */\n    { 1226, 0x0000000000000000ULL, { 0xB157921B389112F6ULL, 0xC3AD1FD074E86DE5ULL } }, /* XSUM_XXH128_testdata[3678] */\n    { 1226, 0x000000009E3779B1ULL, { 0x50E369D523A82D00ULL, 0x50D3C0D159E37F76ULL } }, /* XSUM_XXH128_testdata[3679] */\n    { 1226, 0x9E3779B185EBCA8DULL, { 0xA678A815C95467C4ULL, 0x7DB8CA3F10C7DD18ULL } }, /* XSUM_XXH128_testdata[3680] */\n    { 1227, 0x0000000000000000ULL, { 0x86C60450E50A39F2ULL, 0xB2FADAEADF90322AULL } }, /* XSUM_XXH128_testdata[3681] */\n    { 1227, 0x000000009E3779B1ULL, { 0x62D5B3F7A67182B0ULL, 0x154E3ADEEBBA8ACAULL } }, /* XSUM_XXH128_testdata[3682] */\n    { 1227, 0x9E3779B185EBCA8DULL, { 0xDAD9B7E9A7DCEAB4ULL, 0xB61EC80217ACA4B5ULL } }, /* XSUM_XXH128_testdata[3683] */\n    { 1228, 0x0000000000000000ULL, { 0x4EC249E9E22BB8F6ULL, 0x92F9596A6634A6FAULL } }, /* XSUM_XXH128_testdata[3684] */\n    { 1228, 0x000000009E3779B1ULL, { 0x26B561C120EE2E4BULL, 0x8AC2D1B81F4ECBA0ULL } }, /* XSUM_XXH128_testdata[3685] */\n    { 1228, 0x9E3779B185EBCA8DULL, { 0x35B07B350D67A81DULL, 0xFEC36BC676FEB07AULL } }, /* XSUM_XXH128_testdata[3686] */\n    { 1229, 0x0000000000000000ULL, { 0xB4AC47456204F4A0ULL, 0x9F9B251AA9C7171AULL } }, /* XSUM_XXH128_testdata[3687] */\n    { 1229, 0x000000009E3779B1ULL, { 0x5F395FAD86BFC122ULL, 0xD6D981DF19544B63ULL } }, /* XSUM_XXH128_testdata[3688] */\n    { 1229, 0x9E3779B185EBCA8DULL, { 0xFB8751E1C34FB61EULL, 0x1E1E032BCDF19A75ULL } }, /* XSUM_XXH128_testdata[3689] */\n    { 1230, 0x0000000000000000ULL, { 0xF0FFD70477192DD9ULL, 0xCC18668BBF74DDE7ULL } }, /* XSUM_XXH128_testdata[3690] */\n    { 1230, 0x000000009E3779B1ULL, { 0xC3869C6BABA54716ULL, 0xBFD2CCB6BDE3EE81ULL } }, /* XSUM_XXH128_testdata[3691] */\n    { 1230, 0x9E3779B185EBCA8DULL, { 0xF398B52063DA612AULL, 0xABCCA4D4AAFB3313ULL } }, /* XSUM_XXH128_testdata[3692] */\n    { 1231, 0x0000000000000000ULL, { 0x1798FEF09B569C74ULL, 0x6CAA1159670F46BCULL } }, /* XSUM_XXH128_testdata[3693] */\n    { 1231, 0x000000009E3779B1ULL, { 0xF6E3A9967E265704ULL, 0x98D84D54E2104E33ULL } }, /* XSUM_XXH128_testdata[3694] */\n    { 1231, 0x9E3779B185EBCA8DULL, { 0x26029163BA88839CULL, 0x75422662AB12826BULL } }, /* XSUM_XXH128_testdata[3695] */\n    { 1232, 0x0000000000000000ULL, { 0x7DDCBA4664E066E2ULL, 0x6692CF293B16302EULL } }, /* XSUM_XXH128_testdata[3696] */\n    { 1232, 0x000000009E3779B1ULL, { 0xE9524BBFEC85ED6CULL, 0x27EE17A46697DB2AULL } }, /* XSUM_XXH128_testdata[3697] */\n    { 1232, 0x9E3779B185EBCA8DULL, { 0x29030F6B251137D7ULL, 0x0C5E4A399A884A41ULL } }, /* XSUM_XXH128_testdata[3698] */\n    { 1233, 0x0000000000000000ULL, { 0x2BE6E506324653A7ULL, 0xAACAAE1BBA429B0CULL } }, /* XSUM_XXH128_testdata[3699] */\n    { 1233, 0x000000009E3779B1ULL, { 0xFB0B3F7279AF55A3ULL, 0x2CF9492D7A998061ULL } }, /* XSUM_XXH128_testdata[3700] */\n    { 1233, 0x9E3779B185EBCA8DULL, { 0x9D9F04986C320F67ULL, 0x9B4350942C8421CEULL } }, /* XSUM_XXH128_testdata[3701] */\n    { 1234, 0x0000000000000000ULL, { 0x7E5DEDE89C4CAA7CULL, 0xFE9DC9A3DC6DC651ULL } }, /* XSUM_XXH128_testdata[3702] */\n    { 1234, 0x000000009E3779B1ULL, { 0x157C102CDC728167ULL, 0xFD3EE375A713F03FULL } }, /* XSUM_XXH128_testdata[3703] */\n    { 1234, 0x9E3779B185EBCA8DULL, { 0x69B306E989DA7A62ULL, 0x5CCFE1B2DACD14C0ULL } }, /* XSUM_XXH128_testdata[3704] */\n    { 1235, 0x0000000000000000ULL, { 0x7973D357ED85BC0EULL, 0x1E3C0B0DBAD10BD6ULL } }, /* XSUM_XXH128_testdata[3705] */\n    { 1235, 0x000000009E3779B1ULL, { 0xF6C97BAA57F2E70AULL, 0x9144F8360C7B38D3ULL } }, /* XSUM_XXH128_testdata[3706] */\n    { 1235, 0x9E3779B185EBCA8DULL, { 0x6FC8A0DF4CF10E1CULL, 0x17B52229D4F81446ULL } }, /* XSUM_XXH128_testdata[3707] */\n    { 1236, 0x0000000000000000ULL, { 0xDD441332B08A607CULL, 0x7EF9A26D1F80C383ULL } }, /* XSUM_XXH128_testdata[3708] */\n    { 1236, 0x000000009E3779B1ULL, { 0xA61D4FC20F169EDEULL, 0x3C6037A022A6F6F5ULL } }, /* XSUM_XXH128_testdata[3709] */\n    { 1236, 0x9E3779B185EBCA8DULL, { 0x0FAC91C503DF1FEBULL, 0xDDDBFCFB942C0ACCULL } }, /* XSUM_XXH128_testdata[3710] */\n    { 1237, 0x0000000000000000ULL, { 0xA9775BE3A9A6131AULL, 0x8AD31F9AB4E6C171ULL } }, /* XSUM_XXH128_testdata[3711] */\n    { 1237, 0x000000009E3779B1ULL, { 0xF6E24493CAD1FD89ULL, 0x97692AB59F19C6D6ULL } }, /* XSUM_XXH128_testdata[3712] */\n    { 1237, 0x9E3779B185EBCA8DULL, { 0xC9B0A287954E8012ULL, 0x2DFAFBD1AF78083BULL } }, /* XSUM_XXH128_testdata[3713] */\n    { 1238, 0x0000000000000000ULL, { 0x9E35169670FBE108ULL, 0x04DCD11B665EE2F2ULL } }, /* XSUM_XXH128_testdata[3714] */\n    { 1238, 0x000000009E3779B1ULL, { 0xEF0DAEC417C650C4ULL, 0x66BB026BA3BB4ECDULL } }, /* XSUM_XXH128_testdata[3715] */\n    { 1238, 0x9E3779B185EBCA8DULL, { 0x2023A156E28139E3ULL, 0x276C9B78420C6F5DULL } }, /* XSUM_XXH128_testdata[3716] */\n    { 1239, 0x0000000000000000ULL, { 0x4E4DEE9735CB4055ULL, 0x04ACB73C2943E9A2ULL } }, /* XSUM_XXH128_testdata[3717] */\n    { 1239, 0x000000009E3779B1ULL, { 0x7A1F56F34E447BEEULL, 0xEC08CBABB564B1D5ULL } }, /* XSUM_XXH128_testdata[3718] */\n    { 1239, 0x9E3779B185EBCA8DULL, { 0xC364A0E39E616DB7ULL, 0x4953A61E641B75BEULL } }, /* XSUM_XXH128_testdata[3719] */\n    { 1240, 0x0000000000000000ULL, { 0x2A7C85DC0BC3EE8BULL, 0xFCA7C475B5DA4CA0ULL } }, /* XSUM_XXH128_testdata[3720] */\n    { 1240, 0x000000009E3779B1ULL, { 0x70EFF2D46975B930ULL, 0x93EEC3195E6D06A8ULL } }, /* XSUM_XXH128_testdata[3721] */\n    { 1240, 0x9E3779B185EBCA8DULL, { 0x0F6F41015CE14325ULL, 0x53F28E8A18DE910CULL } }, /* XSUM_XXH128_testdata[3722] */\n    { 1241, 0x0000000000000000ULL, { 0xD00F1254DF165FECULL, 0x1F68F5EFA7563BDAULL } }, /* XSUM_XXH128_testdata[3723] */\n    { 1241, 0x000000009E3779B1ULL, { 0x5D1893EDF46A495AULL, 0x03D47E1653FB4025ULL } }, /* XSUM_XXH128_testdata[3724] */\n    { 1241, 0x9E3779B185EBCA8DULL, { 0x2A56A2294B2F6CBAULL, 0xDA940C71D1612F93ULL } }, /* XSUM_XXH128_testdata[3725] */\n    { 1242, 0x0000000000000000ULL, { 0x1C4440B970A3869FULL, 0xC6BBD5420FE43596ULL } }, /* XSUM_XXH128_testdata[3726] */\n    { 1242, 0x000000009E3779B1ULL, { 0xD382A6F0FB9681F8ULL, 0x491724173DF22049ULL } }, /* XSUM_XXH128_testdata[3727] */\n    { 1242, 0x9E3779B185EBCA8DULL, { 0x1236ECEFF72C441DULL, 0x33378534AAE6595BULL } }, /* XSUM_XXH128_testdata[3728] */\n    { 1243, 0x0000000000000000ULL, { 0xDA895EE4B9E61D29ULL, 0xF8CF4264D7F22664ULL } }, /* XSUM_XXH128_testdata[3729] */\n    { 1243, 0x000000009E3779B1ULL, { 0xECA92655C98210FAULL, 0x1D55F1BB3CCEF2FAULL } }, /* XSUM_XXH128_testdata[3730] */\n    { 1243, 0x9E3779B185EBCA8DULL, { 0x3A2ED287B663F086ULL, 0xC13A314AD3350389ULL } }, /* XSUM_XXH128_testdata[3731] */\n    { 1244, 0x0000000000000000ULL, { 0xED2C73920717377BULL, 0x77F7DBFC60F06C9DULL } }, /* XSUM_XXH128_testdata[3732] */\n    { 1244, 0x000000009E3779B1ULL, { 0x8F0711954983219CULL, 0xA5E1740A34F0805CULL } }, /* XSUM_XXH128_testdata[3733] */\n    { 1244, 0x9E3779B185EBCA8DULL, { 0xBCA105ED165CA4A9ULL, 0xF517227690B69D02ULL } }, /* XSUM_XXH128_testdata[3734] */\n    { 1245, 0x0000000000000000ULL, { 0x5DADE3B4EE279DAEULL, 0xF1E421D16E2BCD44ULL } }, /* XSUM_XXH128_testdata[3735] */\n    { 1245, 0x000000009E3779B1ULL, { 0xCE3837F35DCA7952ULL, 0x4EBF18047539EF4EULL } }, /* XSUM_XXH128_testdata[3736] */\n    { 1245, 0x9E3779B185EBCA8DULL, { 0x955927A20535B98AULL, 0x5B244B14541CA325ULL } }, /* XSUM_XXH128_testdata[3737] */\n    { 1246, 0x0000000000000000ULL, { 0xD160A5D5495D5E8CULL, 0x79D0C8F67D7FCD57ULL } }, /* XSUM_XXH128_testdata[3738] */\n    { 1246, 0x000000009E3779B1ULL, { 0x56877FDA1742B786ULL, 0x585E9A20DDB3525DULL } }, /* XSUM_XXH128_testdata[3739] */\n    { 1246, 0x9E3779B185EBCA8DULL, { 0xD9A9BBC486C1B8D8ULL, 0xCEC4FA2C7B8DF2E8ULL } }, /* XSUM_XXH128_testdata[3740] */\n    { 1247, 0x0000000000000000ULL, { 0xF0C39DC1539E6BCCULL, 0xFA53A59EAC8770DCULL } }, /* XSUM_XXH128_testdata[3741] */\n    { 1247, 0x000000009E3779B1ULL, { 0xF94B71BE52D7D023ULL, 0xA4C321E8CDA47356ULL } }, /* XSUM_XXH128_testdata[3742] */\n    { 1247, 0x9E3779B185EBCA8DULL, { 0xAC3AE69C884E7729ULL, 0x899FE8C721035EB7ULL } }, /* XSUM_XXH128_testdata[3743] */\n    { 1248, 0x0000000000000000ULL, { 0xFE73761A4AF65FFDULL, 0x241EB4559EFE40BDULL } }, /* XSUM_XXH128_testdata[3744] */\n    { 1248, 0x000000009E3779B1ULL, { 0xEB43CF8709617EB2ULL, 0x9DD662F98686B5DCULL } }, /* XSUM_XXH128_testdata[3745] */\n    { 1248, 0x9E3779B185EBCA8DULL, { 0x010BF71F84A0C44FULL, 0xE06F7854B9464D1DULL } }, /* XSUM_XXH128_testdata[3746] */\n    { 1249, 0x0000000000000000ULL, { 0x386B0F3E8F5B15EBULL, 0xDBA48B26A8B76969ULL } }, /* XSUM_XXH128_testdata[3747] */\n    { 1249, 0x000000009E3779B1ULL, { 0x0CA5DDCBD4853B09ULL, 0xE157D12E6F7B19D5ULL } }, /* XSUM_XXH128_testdata[3748] */\n    { 1249, 0x9E3779B185EBCA8DULL, { 0x64154E718064ECD3ULL, 0xBFF57464B3FC185BULL } }, /* XSUM_XXH128_testdata[3749] */\n    { 1250, 0x0000000000000000ULL, { 0x70114FAE28466327ULL, 0x14737C85F2CEEB32ULL } }, /* XSUM_XXH128_testdata[3750] */\n    { 1250, 0x000000009E3779B1ULL, { 0x6494243B7DFF1816ULL, 0xC75126ABEEBC915BULL } }, /* XSUM_XXH128_testdata[3751] */\n    { 1250, 0x9E3779B185EBCA8DULL, { 0x520C8028328EB353ULL, 0x3AFF62304083A6D3ULL } }, /* XSUM_XXH128_testdata[3752] */\n    { 1251, 0x0000000000000000ULL, { 0x0D9448C1A8756C97ULL, 0xE7A210B4520E53D2ULL } }, /* XSUM_XXH128_testdata[3753] */\n    { 1251, 0x000000009E3779B1ULL, { 0xFE3DFED17FC49FCEULL, 0x9D012E705D02D191ULL } }, /* XSUM_XXH128_testdata[3754] */\n    { 1251, 0x9E3779B185EBCA8DULL, { 0x85323C6AD404615AULL, 0x87A9DBB3BD3869C9ULL } }, /* XSUM_XXH128_testdata[3755] */\n    { 1252, 0x0000000000000000ULL, { 0x4239C017A3B04AA8ULL, 0x0CF5BEDE87C7CD24ULL } }, /* XSUM_XXH128_testdata[3756] */\n    { 1252, 0x000000009E3779B1ULL, { 0x3694E14FC79A15E5ULL, 0xFA39ED64D1B7FEB3ULL } }, /* XSUM_XXH128_testdata[3757] */\n    { 1252, 0x9E3779B185EBCA8DULL, { 0xDF199CE2F05DFE16ULL, 0xEB7D7E3B548160B6ULL } }, /* XSUM_XXH128_testdata[3758] */\n    { 1253, 0x0000000000000000ULL, { 0x00808A16F8A038DAULL, 0x150AEB772AEDB28AULL } }, /* XSUM_XXH128_testdata[3759] */\n    { 1253, 0x000000009E3779B1ULL, { 0xCA9D6BD979E24E62ULL, 0x19A4B9144BEE3148ULL } }, /* XSUM_XXH128_testdata[3760] */\n    { 1253, 0x9E3779B185EBCA8DULL, { 0x0065087E8B3B068CULL, 0xD457E48891FAD5C1ULL } }, /* XSUM_XXH128_testdata[3761] */\n    { 1254, 0x0000000000000000ULL, { 0xD5B487EE0149EB19ULL, 0xD5C4EB6A1E55F330ULL } }, /* XSUM_XXH128_testdata[3762] */\n    { 1254, 0x000000009E3779B1ULL, { 0x0BC2BF547B5ED430ULL, 0x3F82479970DB487CULL } }, /* XSUM_XXH128_testdata[3763] */\n    { 1254, 0x9E3779B185EBCA8DULL, { 0x0105641B56851E82ULL, 0x9D512BC4789D91D8ULL } }, /* XSUM_XXH128_testdata[3764] */\n    { 1255, 0x0000000000000000ULL, { 0xF069561740DF20F8ULL, 0xE5F76DD6DBA2A0A9ULL } }, /* XSUM_XXH128_testdata[3765] */\n    { 1255, 0x000000009E3779B1ULL, { 0x7E67747F98F765BAULL, 0x1C4E9E3CBB24581BULL } }, /* XSUM_XXH128_testdata[3766] */\n    { 1255, 0x9E3779B185EBCA8DULL, { 0xB172B433AAE01598ULL, 0x7559C66C98EB8236ULL } }, /* XSUM_XXH128_testdata[3767] */\n    { 1256, 0x0000000000000000ULL, { 0x0D7E791B04F5AB45ULL, 0x45335A0D5306716FULL } }, /* XSUM_XXH128_testdata[3768] */\n    { 1256, 0x000000009E3779B1ULL, { 0x241C826965B17388ULL, 0x50F0986F9E21C6A2ULL } }, /* XSUM_XXH128_testdata[3769] */\n    { 1256, 0x9E3779B185EBCA8DULL, { 0xA8D61EF9EF7BE7A8ULL, 0x67D181A98A69AD01ULL } }, /* XSUM_XXH128_testdata[3770] */\n    { 1257, 0x0000000000000000ULL, { 0xE179C25DD03710A6ULL, 0x52BFDDA10E90154FULL } }, /* XSUM_XXH128_testdata[3771] */\n    { 1257, 0x000000009E3779B1ULL, { 0x4CC58785DB3C3155ULL, 0xADC148510AA925ECULL } }, /* XSUM_XXH128_testdata[3772] */\n    { 1257, 0x9E3779B185EBCA8DULL, { 0xAB9A2396EECCC42BULL, 0xF784AD8562277E8AULL } }, /* XSUM_XXH128_testdata[3773] */\n    { 1258, 0x0000000000000000ULL, { 0x3207A5EBFDC8367DULL, 0x0921EF42083A8E4CULL } }, /* XSUM_XXH128_testdata[3774] */\n    { 1258, 0x000000009E3779B1ULL, { 0x1F8AE86A05E6A3D5ULL, 0x2D5BF2A3C23672B7ULL } }, /* XSUM_XXH128_testdata[3775] */\n    { 1258, 0x9E3779B185EBCA8DULL, { 0x36BD16996362DC72ULL, 0x72CEFADC475214A3ULL } }, /* XSUM_XXH128_testdata[3776] */\n    { 1259, 0x0000000000000000ULL, { 0x0585488A8CC7957BULL, 0x46363F098956C6A6ULL } }, /* XSUM_XXH128_testdata[3777] */\n    { 1259, 0x000000009E3779B1ULL, { 0x04E7B4B5CDEE7CB0ULL, 0xFF38A7042ECD8177ULL } }, /* XSUM_XXH128_testdata[3778] */\n    { 1259, 0x9E3779B185EBCA8DULL, { 0x5A37270C5ED0F342ULL, 0xA97FB4F90CC1A168ULL } }, /* XSUM_XXH128_testdata[3779] */\n    { 1260, 0x0000000000000000ULL, { 0x4A20DAD887D6BBD4ULL, 0xCD595E243B3CDA83ULL } }, /* XSUM_XXH128_testdata[3780] */\n    { 1260, 0x000000009E3779B1ULL, { 0xC755E6A538F086E6ULL, 0xC904AA107E11D4B6ULL } }, /* XSUM_XXH128_testdata[3781] */\n    { 1260, 0x9E3779B185EBCA8DULL, { 0x219B38C0687FD368ULL, 0x1F79220E6CB1472EULL } }, /* XSUM_XXH128_testdata[3782] */\n    { 1261, 0x0000000000000000ULL, { 0x8B23B25F1596E89FULL, 0xDD241FDA4D0E5B62ULL } }, /* XSUM_XXH128_testdata[3783] */\n    { 1261, 0x000000009E3779B1ULL, { 0xF07A8F38ABF08044ULL, 0x3B0C6712078AE29DULL } }, /* XSUM_XXH128_testdata[3784] */\n    { 1261, 0x9E3779B185EBCA8DULL, { 0x853FB0FBB427FB45ULL, 0xFB59988189A78B33ULL } }, /* XSUM_XXH128_testdata[3785] */\n    { 1262, 0x0000000000000000ULL, { 0xF416AF45D2BC98D9ULL, 0xB5F61BCE6DE399E9ULL } }, /* XSUM_XXH128_testdata[3786] */\n    { 1262, 0x000000009E3779B1ULL, { 0x82536D295FED77C7ULL, 0xE27342E5A184DF88ULL } }, /* XSUM_XXH128_testdata[3787] */\n    { 1262, 0x9E3779B185EBCA8DULL, { 0xE94CBC9B85C6FE67ULL, 0xC2E80797698D51B0ULL } }, /* XSUM_XXH128_testdata[3788] */\n    { 1263, 0x0000000000000000ULL, { 0x7EFC38C2AE4165F4ULL, 0x8120D327BCB1055CULL } }, /* XSUM_XXH128_testdata[3789] */\n    { 1263, 0x000000009E3779B1ULL, { 0x75837A3CB4765F14ULL, 0xF02FCECE3DD943F0ULL } }, /* XSUM_XXH128_testdata[3790] */\n    { 1263, 0x9E3779B185EBCA8DULL, { 0x1AD06110E21D4B37ULL, 0xCFD74D54DB5F2EABULL } }, /* XSUM_XXH128_testdata[3791] */\n    { 1264, 0x0000000000000000ULL, { 0x7BBE54D17E33A670ULL, 0x1EA8DB9F95B0CD1EULL } }, /* XSUM_XXH128_testdata[3792] */\n    { 1264, 0x000000009E3779B1ULL, { 0x040CDE21FEF30A67ULL, 0x6F6B297EDF020A94ULL } }, /* XSUM_XXH128_testdata[3793] */\n    { 1264, 0x9E3779B185EBCA8DULL, { 0x8A3D80012A575A84ULL, 0x85963BAF6B5EB25FULL } }, /* XSUM_XXH128_testdata[3794] */\n    { 1265, 0x0000000000000000ULL, { 0xC26D468B31A4CBE8ULL, 0x6FD72DCE6A1BC1DAULL } }, /* XSUM_XXH128_testdata[3795] */\n    { 1265, 0x000000009E3779B1ULL, { 0x329FE5AF58484B08ULL, 0x930ED9DA77CA28BEULL } }, /* XSUM_XXH128_testdata[3796] */\n    { 1265, 0x9E3779B185EBCA8DULL, { 0x080096652CC35FE9ULL, 0x1A2BC88CAA2D7739ULL } }, /* XSUM_XXH128_testdata[3797] */\n    { 1266, 0x0000000000000000ULL, { 0x4F712CFA55178726ULL, 0x0995B5147182519CULL } }, /* XSUM_XXH128_testdata[3798] */\n    { 1266, 0x000000009E3779B1ULL, { 0xA5BCC34867A30317ULL, 0x43174E17B23AF489ULL } }, /* XSUM_XXH128_testdata[3799] */\n    { 1266, 0x9E3779B185EBCA8DULL, { 0xC85B4AADEAC26FE7ULL, 0xBF841A0D9DEDF1DDULL } }, /* XSUM_XXH128_testdata[3800] */\n    { 1267, 0x0000000000000000ULL, { 0xD0C33CAC8994145FULL, 0x94031F33FB48B726ULL } }, /* XSUM_XXH128_testdata[3801] */\n    { 1267, 0x000000009E3779B1ULL, { 0x43807AC9E1B2F8E0ULL, 0x36C65D366F5E8146ULL } }, /* XSUM_XXH128_testdata[3802] */\n    { 1267, 0x9E3779B185EBCA8DULL, { 0xD43DDD757597A517ULL, 0x12E4ADA31485BD44ULL } }, /* XSUM_XXH128_testdata[3803] */\n    { 1268, 0x0000000000000000ULL, { 0xCC704F88D818DC14ULL, 0x2F0E14CA306A2D2EULL } }, /* XSUM_XXH128_testdata[3804] */\n    { 1268, 0x000000009E3779B1ULL, { 0x6C0C8EB3D9EF46ADULL, 0x1364C217F007A53AULL } }, /* XSUM_XXH128_testdata[3805] */\n    { 1268, 0x9E3779B185EBCA8DULL, { 0xD65BDF74F55AAFCAULL, 0x426D52D5D196E59EULL } }, /* XSUM_XXH128_testdata[3806] */\n    { 1269, 0x0000000000000000ULL, { 0x87BDF6D964C49064ULL, 0xC33EFFBAF2126B6FULL } }, /* XSUM_XXH128_testdata[3807] */\n    { 1269, 0x000000009E3779B1ULL, { 0xDD90C6821CD72CABULL, 0x2B31FB589B492281ULL } }, /* XSUM_XXH128_testdata[3808] */\n    { 1269, 0x9E3779B185EBCA8DULL, { 0x4E22180AA9458D41ULL, 0x9F3DD4711D2F060AULL } }, /* XSUM_XXH128_testdata[3809] */\n    { 1270, 0x0000000000000000ULL, { 0xF8776976C5F32A3AULL, 0xF4ACFB77262D6F23ULL } }, /* XSUM_XXH128_testdata[3810] */\n    { 1270, 0x000000009E3779B1ULL, { 0x282E8C63B175025FULL, 0xF9AF531F3B16B22CULL } }, /* XSUM_XXH128_testdata[3811] */\n    { 1270, 0x9E3779B185EBCA8DULL, { 0x3C82A2476CC6A087ULL, 0xA1FA2BA5B2A3419FULL } }, /* XSUM_XXH128_testdata[3812] */\n    { 1271, 0x0000000000000000ULL, { 0xDF02E3A0949B78A2ULL, 0x6B9BFD8FF5E592DFULL } }, /* XSUM_XXH128_testdata[3813] */\n    { 1271, 0x000000009E3779B1ULL, { 0x432DD7CB5773416BULL, 0x879DCBF8D24FDE04ULL } }, /* XSUM_XXH128_testdata[3814] */\n    { 1271, 0x9E3779B185EBCA8DULL, { 0x454545571E047733ULL, 0x3B77ACC2D0617771ULL } }, /* XSUM_XXH128_testdata[3815] */\n    { 1272, 0x0000000000000000ULL, { 0x2508A670FDFA5CE2ULL, 0xC21AF654E9552F3AULL } }, /* XSUM_XXH128_testdata[3816] */\n    { 1272, 0x000000009E3779B1ULL, { 0x75398F7B983854E0ULL, 0x5DC050B2E028A4FDULL } }, /* XSUM_XXH128_testdata[3817] */\n    { 1272, 0x9E3779B185EBCA8DULL, { 0x596350B94FA7666BULL, 0xC7827D08CC2CC8B4ULL } }, /* XSUM_XXH128_testdata[3818] */\n    { 1273, 0x0000000000000000ULL, { 0x43737066DC3F2DE0ULL, 0xC70A09A10993B846ULL } }, /* XSUM_XXH128_testdata[3819] */\n    { 1273, 0x000000009E3779B1ULL, { 0x96705E572BFD848AULL, 0x81263DA9E2DFD0DCULL } }, /* XSUM_XXH128_testdata[3820] */\n    { 1273, 0x9E3779B185EBCA8DULL, { 0x155BF59E7C86E6F2ULL, 0xB034AFFA4700F0A3ULL } }, /* XSUM_XXH128_testdata[3821] */\n    { 1274, 0x0000000000000000ULL, { 0x8A027A19AB8DF30DULL, 0x24DE8FAEC708BBEBULL } }, /* XSUM_XXH128_testdata[3822] */\n    { 1274, 0x000000009E3779B1ULL, { 0x70FDF0C7C73485BCULL, 0x337BEDE8C92E9812ULL } }, /* XSUM_XXH128_testdata[3823] */\n    { 1274, 0x9E3779B185EBCA8DULL, { 0x3AE260AF75AF8633ULL, 0x380648B6DB1A0EA6ULL } }, /* XSUM_XXH128_testdata[3824] */\n    { 1275, 0x0000000000000000ULL, { 0x139E04FD5326D80AULL, 0x4CDD53F28CCDCE15ULL } }, /* XSUM_XXH128_testdata[3825] */\n    { 1275, 0x000000009E3779B1ULL, { 0x3FE2CBB0A8982581ULL, 0x9B740740DB1DCFC1ULL } }, /* XSUM_XXH128_testdata[3826] */\n    { 1275, 0x9E3779B185EBCA8DULL, { 0x7C1726C8DFF75F70ULL, 0xC449AB71B83BE41BULL } }, /* XSUM_XXH128_testdata[3827] */\n    { 1276, 0x0000000000000000ULL, { 0x1EF47D47884A52C4ULL, 0x670B3FA061C86D37ULL } }, /* XSUM_XXH128_testdata[3828] */\n    { 1276, 0x000000009E3779B1ULL, { 0xC14D622EB169DAA0ULL, 0x84090B7409BDF065ULL } }, /* XSUM_XXH128_testdata[3829] */\n    { 1276, 0x9E3779B185EBCA8DULL, { 0xF4414C700D2BF87CULL, 0xFDB4E0B6ADB66ADCULL } }, /* XSUM_XXH128_testdata[3830] */\n    { 1277, 0x0000000000000000ULL, { 0x22CEB5C9918B106EULL, 0x7CEA69CA473B2736ULL } }, /* XSUM_XXH128_testdata[3831] */\n    { 1277, 0x000000009E3779B1ULL, { 0x75195DA5E4744C8AULL, 0xF166C1D8C506F817ULL } }, /* XSUM_XXH128_testdata[3832] */\n    { 1277, 0x9E3779B185EBCA8DULL, { 0xCC35EDD26C8EA6E3ULL, 0xF6DBAFD6CADE7A89ULL } }, /* XSUM_XXH128_testdata[3833] */\n    { 1278, 0x0000000000000000ULL, { 0xB3A97FDEB34B151CULL, 0x2EE753DC5FBCC5CBULL } }, /* XSUM_XXH128_testdata[3834] */\n    { 1278, 0x000000009E3779B1ULL, { 0xC6C83552725F12F4ULL, 0xC42998F631E31186ULL } }, /* XSUM_XXH128_testdata[3835] */\n    { 1278, 0x9E3779B185EBCA8DULL, { 0x4EF9F624C3E6B0F2ULL, 0x95F8CF9900357CEEULL } }, /* XSUM_XXH128_testdata[3836] */\n    { 1279, 0x0000000000000000ULL, { 0x5D6D044F9D287AB3ULL, 0xCE1DAFA0DE3F8197ULL } }, /* XSUM_XXH128_testdata[3837] */\n    { 1279, 0x000000009E3779B1ULL, { 0x3938CEC4495A282FULL, 0x930FEEA16AB89D89ULL } }, /* XSUM_XXH128_testdata[3838] */\n    { 1279, 0x9E3779B185EBCA8DULL, { 0x24DF7B6B7B4FDCB1ULL, 0xA29297AB756C5545ULL } }, /* XSUM_XXH128_testdata[3839] */\n    { 1280, 0x0000000000000000ULL, { 0xA052007A1ED81B4BULL, 0x981174E880E9C608ULL } }, /* XSUM_XXH128_testdata[3840] */\n    { 1280, 0x000000009E3779B1ULL, { 0xAC6730B394189261ULL, 0x34EDFF7C4CE3F6AAULL } }, /* XSUM_XXH128_testdata[3841] */\n    { 1280, 0x9E3779B185EBCA8DULL, { 0x2B5ABFE77739F266ULL, 0x9A0F2885C4112261ULL } }, /* XSUM_XXH128_testdata[3842] */\n    { 1281, 0x0000000000000000ULL, { 0x706FE95B5ED1F1ECULL, 0xEB13F98EC36AE4C1ULL } }, /* XSUM_XXH128_testdata[3843] */\n    { 1281, 0x000000009E3779B1ULL, { 0xCF0F15FDE2EF3EC8ULL, 0x7805443779EE1AA4ULL } }, /* XSUM_XXH128_testdata[3844] */\n    { 1281, 0x9E3779B185EBCA8DULL, { 0x028F3EE15B5B1926ULL, 0x85FD2D01B8D033DBULL } }, /* XSUM_XXH128_testdata[3845] */\n    { 1282, 0x0000000000000000ULL, { 0xB8CB4A6E4330BFACULL, 0x42ED7BA6B0649D17ULL } }, /* XSUM_XXH128_testdata[3846] */\n    { 1282, 0x000000009E3779B1ULL, { 0xFE7DE1A92827ED88ULL, 0xD9288CE494359F1AULL } }, /* XSUM_XXH128_testdata[3847] */\n    { 1282, 0x9E3779B185EBCA8DULL, { 0x8F710D9E899E52CFULL, 0x35230EF8087F361BULL } }, /* XSUM_XXH128_testdata[3848] */\n    { 1283, 0x0000000000000000ULL, { 0xAD5AF3E0E638F01BULL, 0x025FFB44415B3B61ULL } }, /* XSUM_XXH128_testdata[3849] */\n    { 1283, 0x000000009E3779B1ULL, { 0x16E0B255F5EC558CULL, 0xEE2DEAAE3B9884DBULL } }, /* XSUM_XXH128_testdata[3850] */\n    { 1283, 0x9E3779B185EBCA8DULL, { 0x2B473D9BB34B2639ULL, 0x0FAE27DEFEAEB4C6ULL } }, /* XSUM_XXH128_testdata[3851] */\n    { 1284, 0x0000000000000000ULL, { 0x8BDA723C64F22E78ULL, 0x6357DEF0FE24E807ULL } }, /* XSUM_XXH128_testdata[3852] */\n    { 1284, 0x000000009E3779B1ULL, { 0xB25072E74370FEBDULL, 0x3F98B5D425C53A2CULL } }, /* XSUM_XXH128_testdata[3853] */\n    { 1284, 0x9E3779B185EBCA8DULL, { 0x5D35928D7F4C773AULL, 0xBBAEF721FFE156CEULL } }, /* XSUM_XXH128_testdata[3854] */\n    { 1285, 0x0000000000000000ULL, { 0x33B3411728DB89DEULL, 0x3892DB5AAAE9408CULL } }, /* XSUM_XXH128_testdata[3855] */\n    { 1285, 0x000000009E3779B1ULL, { 0xEEF4DC1F12C1BFE0ULL, 0x2C2E6CBF28EB03CAULL } }, /* XSUM_XXH128_testdata[3856] */\n    { 1285, 0x9E3779B185EBCA8DULL, { 0x07CC92BD8DAFD59EULL, 0x705DAC16F12F6F15ULL } }, /* XSUM_XXH128_testdata[3857] */\n    { 1286, 0x0000000000000000ULL, { 0xB34C5AA46E8214C9ULL, 0xEE27800982D0CBD8ULL } }, /* XSUM_XXH128_testdata[3858] */\n    { 1286, 0x000000009E3779B1ULL, { 0x59469E26C1E53C07ULL, 0x7919FE7A861A3E68ULL } }, /* XSUM_XXH128_testdata[3859] */\n    { 1286, 0x9E3779B185EBCA8DULL, { 0x02F507EBDBEAD2D5ULL, 0x4458D16CD307AF86ULL } }, /* XSUM_XXH128_testdata[3860] */\n    { 1287, 0x0000000000000000ULL, { 0x711B95523A6055B5ULL, 0x38DB766A385BBAA2ULL } }, /* XSUM_XXH128_testdata[3861] */\n    { 1287, 0x000000009E3779B1ULL, { 0x8F3B06F1191DD24BULL, 0x4F396800F10FDC36ULL } }, /* XSUM_XXH128_testdata[3862] */\n    { 1287, 0x9E3779B185EBCA8DULL, { 0x40F0841C17D1E7B3ULL, 0xF58341CAC99724ADULL } }, /* XSUM_XXH128_testdata[3863] */\n    { 1288, 0x0000000000000000ULL, { 0x7A27E619D3B0F975ULL, 0x63DA193363DB82E1ULL } }, /* XSUM_XXH128_testdata[3864] */\n    { 1288, 0x000000009E3779B1ULL, { 0xCAF9D625815704B0ULL, 0x6702392FB4289889ULL } }, /* XSUM_XXH128_testdata[3865] */\n    { 1288, 0x9E3779B185EBCA8DULL, { 0x0FB143356DAFDBA7ULL, 0x4C3ACBB379678291ULL } }, /* XSUM_XXH128_testdata[3866] */\n    { 1289, 0x0000000000000000ULL, { 0x2C1689F34787C3E2ULL, 0xBE022DB301907BCCULL } }, /* XSUM_XXH128_testdata[3867] */\n    { 1289, 0x000000009E3779B1ULL, { 0xA91BED9A18211C89ULL, 0xC17073D9AE35A982ULL } }, /* XSUM_XXH128_testdata[3868] */\n    { 1289, 0x9E3779B185EBCA8DULL, { 0xB7FFB0F20474B963ULL, 0x03C448A97E7A706FULL } }, /* XSUM_XXH128_testdata[3869] */\n    { 1290, 0x0000000000000000ULL, { 0x4E713D3477E39CFDULL, 0xA36ED8A2298E5F06ULL } }, /* XSUM_XXH128_testdata[3870] */\n    { 1290, 0x000000009E3779B1ULL, { 0x12B9D0FFC5B7AAB1ULL, 0xF45C98457ABEC98EULL } }, /* XSUM_XXH128_testdata[3871] */\n    { 1290, 0x9E3779B185EBCA8DULL, { 0xD4B17540BCA57D4CULL, 0x0754A12012E27A34ULL } }, /* XSUM_XXH128_testdata[3872] */\n    { 1291, 0x0000000000000000ULL, { 0x106EF57335080984ULL, 0xBA6C60B507089703ULL } }, /* XSUM_XXH128_testdata[3873] */\n    { 1291, 0x000000009E3779B1ULL, { 0x2ED87FB2D292AF50ULL, 0xA3658A65CDF59D8BULL } }, /* XSUM_XXH128_testdata[3874] */\n    { 1291, 0x9E3779B185EBCA8DULL, { 0x61AF13E44002E0BDULL, 0x1187D772B0F15FEAULL } }, /* XSUM_XXH128_testdata[3875] */\n    { 1292, 0x0000000000000000ULL, { 0xBE3B0728915B4399ULL, 0x3C97437916AA8032ULL } }, /* XSUM_XXH128_testdata[3876] */\n    { 1292, 0x000000009E3779B1ULL, { 0xD9B5BBC8C356B1A9ULL, 0xFF7B4DFA5000C8D7ULL } }, /* XSUM_XXH128_testdata[3877] */\n    { 1292, 0x9E3779B185EBCA8DULL, { 0xC74E6AD1C2B89F66ULL, 0x056406823E5CFD3CULL } }, /* XSUM_XXH128_testdata[3878] */\n    { 1293, 0x0000000000000000ULL, { 0x02AA4409F8DA8359ULL, 0x9EA3AEB6D1029909ULL } }, /* XSUM_XXH128_testdata[3879] */\n    { 1293, 0x000000009E3779B1ULL, { 0xB938BBDAA0898A78ULL, 0xB29E871DA61C32C9ULL } }, /* XSUM_XXH128_testdata[3880] */\n    { 1293, 0x9E3779B185EBCA8DULL, { 0xBC5A11D25B5B33A4ULL, 0x54FA9ADBE927365CULL } }, /* XSUM_XXH128_testdata[3881] */\n    { 1294, 0x0000000000000000ULL, { 0x86E73C822ECEEEF7ULL, 0xFDBE77DF7D6C41CFULL } }, /* XSUM_XXH128_testdata[3882] */\n    { 1294, 0x000000009E3779B1ULL, { 0xC7760CB3F850646FULL, 0xAF3219D0AAD23085ULL } }, /* XSUM_XXH128_testdata[3883] */\n    { 1294, 0x9E3779B185EBCA8DULL, { 0x480DBAB2F3AC062FULL, 0x11FF8FFF18B86780ULL } }, /* XSUM_XXH128_testdata[3884] */\n    { 1295, 0x0000000000000000ULL, { 0x122A037B3AFF18B3ULL, 0x3B800B841462B290ULL } }, /* XSUM_XXH128_testdata[3885] */\n    { 1295, 0x000000009E3779B1ULL, { 0x23C463CB0C5DA74EULL, 0x1982B96A17AB78C8ULL } }, /* XSUM_XXH128_testdata[3886] */\n    { 1295, 0x9E3779B185EBCA8DULL, { 0x31D2AC865DE8ABCCULL, 0x5EA104666615DF9EULL } }, /* XSUM_XXH128_testdata[3887] */\n    { 1296, 0x0000000000000000ULL, { 0xAA4F241696FD6EACULL, 0x95892A48FA5811FDULL } }, /* XSUM_XXH128_testdata[3888] */\n    { 1296, 0x000000009E3779B1ULL, { 0x2D16B5D127760BB8ULL, 0x4A1CBF5F97AB1617ULL } }, /* XSUM_XXH128_testdata[3889] */\n    { 1296, 0x9E3779B185EBCA8DULL, { 0x6F8CBF15644E57ECULL, 0x84A2FF56DD46B5BFULL } }, /* XSUM_XXH128_testdata[3890] */\n    { 1297, 0x0000000000000000ULL, { 0xFBEB130E6B67E9F9ULL, 0x2D3420D6A8934F8CULL } }, /* XSUM_XXH128_testdata[3891] */\n    { 1297, 0x000000009E3779B1ULL, { 0xABF3A1BDB6E6347BULL, 0x67DED8DE42B68BBBULL } }, /* XSUM_XXH128_testdata[3892] */\n    { 1297, 0x9E3779B185EBCA8DULL, { 0x25322F0248CC7AA2ULL, 0x1FF02CBA3EABCAE9ULL } }, /* XSUM_XXH128_testdata[3893] */\n    { 1298, 0x0000000000000000ULL, { 0xA1407DC529CD23DFULL, 0x4FE6AA99D73C90D9ULL } }, /* XSUM_XXH128_testdata[3894] */\n    { 1298, 0x000000009E3779B1ULL, { 0xC88DC3AFE253C1F6ULL, 0x6825BAEFA28874C5ULL } }, /* XSUM_XXH128_testdata[3895] */\n    { 1298, 0x9E3779B185EBCA8DULL, { 0xD383F937F6419641ULL, 0xE51CCD85CED15E6DULL } }, /* XSUM_XXH128_testdata[3896] */\n    { 1299, 0x0000000000000000ULL, { 0x765F502DF20DC49EULL, 0xDEE248B3C800A145ULL } }, /* XSUM_XXH128_testdata[3897] */\n    { 1299, 0x000000009E3779B1ULL, { 0x556B993B862436D9ULL, 0x2887EDBCD7A41C20ULL } }, /* XSUM_XXH128_testdata[3898] */\n    { 1299, 0x9E3779B185EBCA8DULL, { 0x95784B95CA2EE2AFULL, 0x0FBE1C08B2D73388ULL } }, /* XSUM_XXH128_testdata[3899] */\n    { 1300, 0x0000000000000000ULL, { 0x2E312D65217E00C6ULL, 0x5A7F27EF7248AFCAULL } }, /* XSUM_XXH128_testdata[3900] */\n    { 1300, 0x000000009E3779B1ULL, { 0xB404644D02C78C55ULL, 0xCCEF683F7492AF6DULL } }, /* XSUM_XXH128_testdata[3901] */\n    { 1300, 0x9E3779B185EBCA8DULL, { 0x73B3A23E757FD725ULL, 0xF440CD19A3F985B8ULL } }, /* XSUM_XXH128_testdata[3902] */\n    { 1301, 0x0000000000000000ULL, { 0xBFCAA107E96D496CULL, 0x7657F91752C7E68AULL } }, /* XSUM_XXH128_testdata[3903] */\n    { 1301, 0x000000009E3779B1ULL, { 0x5202CC17575A5B80ULL, 0x27A03A65C7AF6950ULL } }, /* XSUM_XXH128_testdata[3904] */\n    { 1301, 0x9E3779B185EBCA8DULL, { 0x1752171113E51492ULL, 0x8D07B562A3273669ULL } }, /* XSUM_XXH128_testdata[3905] */\n    { 1302, 0x0000000000000000ULL, { 0x4A14045C5D89824EULL, 0x7331085F56C3A87BULL } }, /* XSUM_XXH128_testdata[3906] */\n    { 1302, 0x000000009E3779B1ULL, { 0x8B0524DFC48C4600ULL, 0xA37EB96FE5A75FFDULL } }, /* XSUM_XXH128_testdata[3907] */\n    { 1302, 0x9E3779B185EBCA8DULL, { 0xC4982E354FD226E5ULL, 0xACE3461A8CD08E57ULL } }, /* XSUM_XXH128_testdata[3908] */\n    { 1303, 0x0000000000000000ULL, { 0xEA3514B0E1197A04ULL, 0xA1B482FE1551D34EULL } }, /* XSUM_XXH128_testdata[3909] */\n    { 1303, 0x000000009E3779B1ULL, { 0x847FA0EFD95BB5F8ULL, 0x41E48499563DB5E5ULL } }, /* XSUM_XXH128_testdata[3910] */\n    { 1303, 0x9E3779B185EBCA8DULL, { 0x6AE4B901B790ED3CULL, 0x8EC072562A9091FEULL } }, /* XSUM_XXH128_testdata[3911] */\n    { 1304, 0x0000000000000000ULL, { 0xA138B765D214CE09ULL, 0xD7AB13CD7B6DBF5DULL } }, /* XSUM_XXH128_testdata[3912] */\n    { 1304, 0x000000009E3779B1ULL, { 0x0DC4C0A00E32478FULL, 0x39115BE7D340ECDAULL } }, /* XSUM_XXH128_testdata[3913] */\n    { 1304, 0x9E3779B185EBCA8DULL, { 0x559B3C09BAE652E9ULL, 0x120C71BD5FFA62EEULL } }, /* XSUM_XXH128_testdata[3914] */\n    { 1305, 0x0000000000000000ULL, { 0x15E0EADCA67CCFA8ULL, 0xD2DB095416B6EA36ULL } }, /* XSUM_XXH128_testdata[3915] */\n    { 1305, 0x000000009E3779B1ULL, { 0xB93D0B136A6F36CDULL, 0xBF4C04066EAFAF97ULL } }, /* XSUM_XXH128_testdata[3916] */\n    { 1305, 0x9E3779B185EBCA8DULL, { 0xF6CA119E0EA4FDB0ULL, 0xC352FDCBF5B15C1DULL } }, /* XSUM_XXH128_testdata[3917] */\n    { 1306, 0x0000000000000000ULL, { 0x48C0AC8100A77315ULL, 0x0275DE1D4693823EULL } }, /* XSUM_XXH128_testdata[3918] */\n    { 1306, 0x000000009E3779B1ULL, { 0x0D8628FB8E4FF30EULL, 0xE16C6A21C4FDB9EBULL } }, /* XSUM_XXH128_testdata[3919] */\n    { 1306, 0x9E3779B185EBCA8DULL, { 0x3776AFB679FA3D19ULL, 0x7EBAF623C40F14A0ULL } }, /* XSUM_XXH128_testdata[3920] */\n    { 1307, 0x0000000000000000ULL, { 0xE20038DD97EE905AULL, 0xADBC44FC49F5F942ULL } }, /* XSUM_XXH128_testdata[3921] */\n    { 1307, 0x000000009E3779B1ULL, { 0xD6B1D8FC47EBF1CEULL, 0x0635399233C8EE1DULL } }, /* XSUM_XXH128_testdata[3922] */\n    { 1307, 0x9E3779B185EBCA8DULL, { 0x874525080EFA9D8FULL, 0xE0D963FCB03CABFCULL } }, /* XSUM_XXH128_testdata[3923] */\n    { 1308, 0x0000000000000000ULL, { 0xF635B857A2E91F86ULL, 0x7CDDA87A1DA7DDFCULL } }, /* XSUM_XXH128_testdata[3924] */\n    { 1308, 0x000000009E3779B1ULL, { 0x0C5D90A240F19154ULL, 0x6108F23948064E4DULL } }, /* XSUM_XXH128_testdata[3925] */\n    { 1308, 0x9E3779B185EBCA8DULL, { 0x3A6B8B0AB31B8052ULL, 0x708E45EDF817AC5BULL } }, /* XSUM_XXH128_testdata[3926] */\n    { 1309, 0x0000000000000000ULL, { 0x6ACEA1D97A14D732ULL, 0x73081DA2FB999054ULL } }, /* XSUM_XXH128_testdata[3927] */\n    { 1309, 0x000000009E3779B1ULL, { 0xD04B23E000B36D8AULL, 0x2BCC077234FF8438ULL } }, /* XSUM_XXH128_testdata[3928] */\n    { 1309, 0x9E3779B185EBCA8DULL, { 0x412819DDA017A594ULL, 0xAE69120D21C32553ULL } }, /* XSUM_XXH128_testdata[3929] */\n    { 1310, 0x0000000000000000ULL, { 0xE35CB9A7A97781F1ULL, 0x8E0CD6B2AB366337ULL } }, /* XSUM_XXH128_testdata[3930] */\n    { 1310, 0x000000009E3779B1ULL, { 0x7D74ADDF89B4F2A8ULL, 0xDEC90DECE4EE3737ULL } }, /* XSUM_XXH128_testdata[3931] */\n    { 1310, 0x9E3779B185EBCA8DULL, { 0xECB208A93C18C0CAULL, 0xC1201E673B170DD7ULL } }, /* XSUM_XXH128_testdata[3932] */\n    { 1311, 0x0000000000000000ULL, { 0xE6ADABBE2EF32E4FULL, 0x69F35352A5C35D57ULL } }, /* XSUM_XXH128_testdata[3933] */\n    { 1311, 0x000000009E3779B1ULL, { 0xE163DC5F47EC6547ULL, 0xB70B47646CF4D326ULL } }, /* XSUM_XXH128_testdata[3934] */\n    { 1311, 0x9E3779B185EBCA8DULL, { 0xBFCC09E11B207515ULL, 0x782CAEBFC5C2CF16ULL } }, /* XSUM_XXH128_testdata[3935] */\n    { 1312, 0x0000000000000000ULL, { 0x5A524056A59C39FAULL, 0xB81789316E193A9CULL } }, /* XSUM_XXH128_testdata[3936] */\n    { 1312, 0x000000009E3779B1ULL, { 0x2F5BD2CCF7EDE0DDULL, 0x39AED1C57F099AD1ULL } }, /* XSUM_XXH128_testdata[3937] */\n    { 1312, 0x9E3779B185EBCA8DULL, { 0x931114ABC3DC32E8ULL, 0x18E3AA32F72537C8ULL } }, /* XSUM_XXH128_testdata[3938] */\n    { 1313, 0x0000000000000000ULL, { 0x348713C223BEDAFCULL, 0x5F790E3E751EF713ULL } }, /* XSUM_XXH128_testdata[3939] */\n    { 1313, 0x000000009E3779B1ULL, { 0x563EEB92E71FB955ULL, 0xFCF915667BA5E06CULL } }, /* XSUM_XXH128_testdata[3940] */\n    { 1313, 0x9E3779B185EBCA8DULL, { 0x1A83FA881795CBBCULL, 0xCB5DE57A2E2D0A6BULL } }, /* XSUM_XXH128_testdata[3941] */\n    { 1314, 0x0000000000000000ULL, { 0x31D349060630B50AULL, 0xFCDD2DE3FEB84626ULL } }, /* XSUM_XXH128_testdata[3942] */\n    { 1314, 0x000000009E3779B1ULL, { 0x3607B574D421F27AULL, 0xD4321D80584269BEULL } }, /* XSUM_XXH128_testdata[3943] */\n    { 1314, 0x9E3779B185EBCA8DULL, { 0x77E1CB3EF4DDBB61ULL, 0x224EC1B764EE2CF1ULL } }, /* XSUM_XXH128_testdata[3944] */\n    { 1315, 0x0000000000000000ULL, { 0x3C62C7DDD34E3A6CULL, 0x4F530505F52CCF37ULL } }, /* XSUM_XXH128_testdata[3945] */\n    { 1315, 0x000000009E3779B1ULL, { 0xCF7BDD937AE8FE88ULL, 0x1B1F4AC454029104ULL } }, /* XSUM_XXH128_testdata[3946] */\n    { 1315, 0x9E3779B185EBCA8DULL, { 0x30104F41CE30A159ULL, 0x08D92A14026161B4ULL } }, /* XSUM_XXH128_testdata[3947] */\n    { 1316, 0x0000000000000000ULL, { 0x963A7C670708591EULL, 0xA6CDE67213FB73F3ULL } }, /* XSUM_XXH128_testdata[3948] */\n    { 1316, 0x000000009E3779B1ULL, { 0x8BC1C6C56D720051ULL, 0x6A364948B9CA2330ULL } }, /* XSUM_XXH128_testdata[3949] */\n    { 1316, 0x9E3779B185EBCA8DULL, { 0xF50E0A55D013DBFCULL, 0x36F47D9352A76C6CULL } }, /* XSUM_XXH128_testdata[3950] */\n    { 1317, 0x0000000000000000ULL, { 0xB2419B4144391552ULL, 0x9330271BB882D165ULL } }, /* XSUM_XXH128_testdata[3951] */\n    { 1317, 0x000000009E3779B1ULL, { 0xDC06DDFC1FEE1CD7ULL, 0x2CB7F84C48528811ULL } }, /* XSUM_XXH128_testdata[3952] */\n    { 1317, 0x9E3779B185EBCA8DULL, { 0x780D130EE1B881ACULL, 0x9D9995497042E175ULL } }, /* XSUM_XXH128_testdata[3953] */\n    { 1318, 0x0000000000000000ULL, { 0x9DF4A7E827BDC174ULL, 0xEA8E0840D7ED80FFULL } }, /* XSUM_XXH128_testdata[3954] */\n    { 1318, 0x000000009E3779B1ULL, { 0x1E32BC84D6EBE933ULL, 0x19259D1CDBCF92D5ULL } }, /* XSUM_XXH128_testdata[3955] */\n    { 1318, 0x9E3779B185EBCA8DULL, { 0xA82A0482BE55D5B6ULL, 0xB119C9236BA665EBULL } }, /* XSUM_XXH128_testdata[3956] */\n    { 1319, 0x0000000000000000ULL, { 0x2ACD45BB72294061ULL, 0x85EFBF7C0124A3A0ULL } }, /* XSUM_XXH128_testdata[3957] */\n    { 1319, 0x000000009E3779B1ULL, { 0x0B084FCCC873B896ULL, 0xC56E6C3C86B96BC5ULL } }, /* XSUM_XXH128_testdata[3958] */\n    { 1319, 0x9E3779B185EBCA8DULL, { 0x9395401BD5483F23ULL, 0x52342546F2686421ULL } }, /* XSUM_XXH128_testdata[3959] */\n    { 1320, 0x0000000000000000ULL, { 0x0AEF011F90C1E41DULL, 0xE0AB3A2625945E01ULL } }, /* XSUM_XXH128_testdata[3960] */\n    { 1320, 0x000000009E3779B1ULL, { 0x07574786762507E9ULL, 0x8D17097CC8162213ULL } }, /* XSUM_XXH128_testdata[3961] */\n    { 1320, 0x9E3779B185EBCA8DULL, { 0x596CBB319F2C596EULL, 0x9C92EF498B5B27DEULL } }, /* XSUM_XXH128_testdata[3962] */\n    { 1321, 0x0000000000000000ULL, { 0x80460A7A97F367BDULL, 0x5A6E2B49BA12FFA5ULL } }, /* XSUM_XXH128_testdata[3963] */\n    { 1321, 0x000000009E3779B1ULL, { 0xB6D4C78854A85EEAULL, 0x9B64F39BBB4B89FAULL } }, /* XSUM_XXH128_testdata[3964] */\n    { 1321, 0x9E3779B185EBCA8DULL, { 0xE2D6AD55B6F5D0CFULL, 0xBA39D975EBA68A73ULL } }, /* XSUM_XXH128_testdata[3965] */\n    { 1322, 0x0000000000000000ULL, { 0x89B95EF219277ED4ULL, 0xA75D26471EE5365DULL } }, /* XSUM_XXH128_testdata[3966] */\n    { 1322, 0x000000009E3779B1ULL, { 0x51A177E66A9472E5ULL, 0x7CA76650E64A01BEULL } }, /* XSUM_XXH128_testdata[3967] */\n    { 1322, 0x9E3779B185EBCA8DULL, { 0x2F4E770670C952E8ULL, 0xDDBB6A9448491214ULL } }, /* XSUM_XXH128_testdata[3968] */\n    { 1323, 0x0000000000000000ULL, { 0x2DD88C30A443D7D7ULL, 0x8086B99E514281D9ULL } }, /* XSUM_XXH128_testdata[3969] */\n    { 1323, 0x000000009E3779B1ULL, { 0x2227A5C7FB021EE2ULL, 0x2DB336D07840633DULL } }, /* XSUM_XXH128_testdata[3970] */\n    { 1323, 0x9E3779B185EBCA8DULL, { 0x85F0EC0DF35B17D4ULL, 0x4C743EC16CF9332FULL } }, /* XSUM_XXH128_testdata[3971] */\n    { 1324, 0x0000000000000000ULL, { 0xF0BE5E244A57175FULL, 0xC1010D1A9CE41F43ULL } }, /* XSUM_XXH128_testdata[3972] */\n    { 1324, 0x000000009E3779B1ULL, { 0x12D728CC033AF329ULL, 0xF7C7BCAE9A92DA26ULL } }, /* XSUM_XXH128_testdata[3973] */\n    { 1324, 0x9E3779B185EBCA8DULL, { 0xECD94321D78E8F02ULL, 0x87A3DABB6C76F102ULL } }, /* XSUM_XXH128_testdata[3974] */\n    { 1325, 0x0000000000000000ULL, { 0x2A2016610FD63EE6ULL, 0xCA6C28EC2AF9F92AULL } }, /* XSUM_XXH128_testdata[3975] */\n    { 1325, 0x000000009E3779B1ULL, { 0x85E43B94140B2FABULL, 0xC538F5814081FE2BULL } }, /* XSUM_XXH128_testdata[3976] */\n    { 1325, 0x9E3779B185EBCA8DULL, { 0x3C55DEB660FE27B9ULL, 0x4E5B4F28AE44E1DCULL } }, /* XSUM_XXH128_testdata[3977] */\n    { 1326, 0x0000000000000000ULL, { 0xB128119374CE78F9ULL, 0x9B5D417281A087BBULL } }, /* XSUM_XXH128_testdata[3978] */\n    { 1326, 0x000000009E3779B1ULL, { 0x7B7BE196CA33C7EDULL, 0x60A7D08384F2AC44ULL } }, /* XSUM_XXH128_testdata[3979] */\n    { 1326, 0x9E3779B185EBCA8DULL, { 0x2085E106ADECF1B2ULL, 0xE98A91BBFB1E4D4EULL } }, /* XSUM_XXH128_testdata[3980] */\n    { 1327, 0x0000000000000000ULL, { 0xD192FD7CBF097AC7ULL, 0x72AC0102F023614AULL } }, /* XSUM_XXH128_testdata[3981] */\n    { 1327, 0x000000009E3779B1ULL, { 0xB9BC396A1666B567ULL, 0x83D9DBA7B91AD1C5ULL } }, /* XSUM_XXH128_testdata[3982] */\n    { 1327, 0x9E3779B185EBCA8DULL, { 0xDF8C82D3D28D27B7ULL, 0xED376DFC1CB04E92ULL } }, /* XSUM_XXH128_testdata[3983] */\n    { 1328, 0x0000000000000000ULL, { 0xD431613BD81D3AB0ULL, 0xA8B0B8BC9FA605DEULL } }, /* XSUM_XXH128_testdata[3984] */\n    { 1328, 0x000000009E3779B1ULL, { 0xCE7DDADB38937501ULL, 0x81B9EE105377ABBDULL } }, /* XSUM_XXH128_testdata[3985] */\n    { 1328, 0x9E3779B185EBCA8DULL, { 0xABC8A0FCA92A635CULL, 0xC8D1487219E97033ULL } }, /* XSUM_XXH128_testdata[3986] */\n    { 1329, 0x0000000000000000ULL, { 0x17CC6274E7945D88ULL, 0x0F4170CD217E4207ULL } }, /* XSUM_XXH128_testdata[3987] */\n    { 1329, 0x000000009E3779B1ULL, { 0xEBDB88EEA3DC437CULL, 0xE597B1B63DC4F87BULL } }, /* XSUM_XXH128_testdata[3988] */\n    { 1329, 0x9E3779B185EBCA8DULL, { 0xBF869D913272410CULL, 0x0F133D84B3CAEB7DULL } }, /* XSUM_XXH128_testdata[3989] */\n    { 1330, 0x0000000000000000ULL, { 0xA67F9F7FF59914F1ULL, 0x90D38ACCD46F5F19ULL } }, /* XSUM_XXH128_testdata[3990] */\n    { 1330, 0x000000009E3779B1ULL, { 0x2C5F93C1595D750FULL, 0x3012E3F88CEF109EULL } }, /* XSUM_XXH128_testdata[3991] */\n    { 1330, 0x9E3779B185EBCA8DULL, { 0x82FBBBA32BEC1877ULL, 0x5105F7C0215DE925ULL } }, /* XSUM_XXH128_testdata[3992] */\n    { 1331, 0x0000000000000000ULL, { 0xC028954DD075245BULL, 0xB721BC33E4A460B4ULL } }, /* XSUM_XXH128_testdata[3993] */\n    { 1331, 0x000000009E3779B1ULL, { 0xAF3A7A19F11B7F17ULL, 0x2B3D05576741D3BBULL } }, /* XSUM_XXH128_testdata[3994] */\n    { 1331, 0x9E3779B185EBCA8DULL, { 0x03F65BD9C4C7FE3DULL, 0xF24C37EDAE5ED5BCULL } }, /* XSUM_XXH128_testdata[3995] */\n    { 1332, 0x0000000000000000ULL, { 0x9BEBCAC3C85B315EULL, 0x5D22328E4C009500ULL } }, /* XSUM_XXH128_testdata[3996] */\n    { 1332, 0x000000009E3779B1ULL, { 0xD5CED951DB52D7B9ULL, 0x1A71F648A88A07A6ULL } }, /* XSUM_XXH128_testdata[3997] */\n    { 1332, 0x9E3779B185EBCA8DULL, { 0x49D4CF6B712D5C3EULL, 0x91C6E9F94BF7B369ULL } }, /* XSUM_XXH128_testdata[3998] */\n    { 1333, 0x0000000000000000ULL, { 0xB2EB79B747A26D08ULL, 0x4CF328B883F6BD99ULL } }, /* XSUM_XXH128_testdata[3999] */\n    { 1333, 0x000000009E3779B1ULL, { 0xF9567F03FD500C4AULL, 0xC369DC42ED8DEEA5ULL } }, /* XSUM_XXH128_testdata[4000] */\n    { 1333, 0x9E3779B185EBCA8DULL, { 0xACDAB80EBF5A8917ULL, 0x05C19C3BB079CD04ULL } }, /* XSUM_XXH128_testdata[4001] */\n    { 1334, 0x0000000000000000ULL, { 0x489CC739652506E7ULL, 0xDE6930A718A6A376ULL } }, /* XSUM_XXH128_testdata[4002] */\n    { 1334, 0x000000009E3779B1ULL, { 0x4844A17FD11375DDULL, 0xA3268BDA884FBEA2ULL } }, /* XSUM_XXH128_testdata[4003] */\n    { 1334, 0x9E3779B185EBCA8DULL, { 0x1AB9D545728CEBE0ULL, 0xD03D2179ECE2B803ULL } }, /* XSUM_XXH128_testdata[4004] */\n    { 1335, 0x0000000000000000ULL, { 0xEF30237B5B64111EULL, 0x706ACFA3C3F308B8ULL } }, /* XSUM_XXH128_testdata[4005] */\n    { 1335, 0x000000009E3779B1ULL, { 0xD72B36297ED039B1ULL, 0x6F04D4187A1D7D3BULL } }, /* XSUM_XXH128_testdata[4006] */\n    { 1335, 0x9E3779B185EBCA8DULL, { 0xB17E403458E586ADULL, 0x2885ACD46FF7F5BCULL } }, /* XSUM_XXH128_testdata[4007] */\n    { 1336, 0x0000000000000000ULL, { 0x50BC61865CD999A7ULL, 0x002935BED0FEDDDFULL } }, /* XSUM_XXH128_testdata[4008] */\n    { 1336, 0x000000009E3779B1ULL, { 0x4139E23550D1C946ULL, 0x205077CFE51F3042ULL } }, /* XSUM_XXH128_testdata[4009] */\n    { 1336, 0x9E3779B185EBCA8DULL, { 0xB87D6B59E0354933ULL, 0x12B7FA1694085F6BULL } }, /* XSUM_XXH128_testdata[4010] */\n    { 1337, 0x0000000000000000ULL, { 0x9F9A750C6A44F106ULL, 0x00909F020D7A3F95ULL } }, /* XSUM_XXH128_testdata[4011] */\n    { 1337, 0x000000009E3779B1ULL, { 0x2DD93E1919BE9A23ULL, 0x4C43A0D21FC8F5F7ULL } }, /* XSUM_XXH128_testdata[4012] */\n    { 1337, 0x9E3779B185EBCA8DULL, { 0x14070E973B3175A2ULL, 0x8B24B3D564A10E04ULL } }, /* XSUM_XXH128_testdata[4013] */\n    { 1338, 0x0000000000000000ULL, { 0x0CCD61FDF237FD29ULL, 0xD7B18156EE61610AULL } }, /* XSUM_XXH128_testdata[4014] */\n    { 1338, 0x000000009E3779B1ULL, { 0xA938FD2223767DC5ULL, 0x61EEFF7867AF5EF7ULL } }, /* XSUM_XXH128_testdata[4015] */\n    { 1338, 0x9E3779B185EBCA8DULL, { 0x4E381AF0B5DFBF40ULL, 0x5006931D0CDEB33AULL } }, /* XSUM_XXH128_testdata[4016] */\n    { 1339, 0x0000000000000000ULL, { 0xB32803C680833A42ULL, 0xF122C5B0516A782BULL } }, /* XSUM_XXH128_testdata[4017] */\n    { 1339, 0x000000009E3779B1ULL, { 0xF0050E9008D5674BULL, 0xA6FC4AD270D20A10ULL } }, /* XSUM_XXH128_testdata[4018] */\n    { 1339, 0x9E3779B185EBCA8DULL, { 0x2B7A79478BDC64F7ULL, 0xF08DAF614610EF59ULL } }, /* XSUM_XXH128_testdata[4019] */\n    { 1340, 0x0000000000000000ULL, { 0x6D3515923BFD0E5FULL, 0x79310EE35103ED25ULL } }, /* XSUM_XXH128_testdata[4020] */\n    { 1340, 0x000000009E3779B1ULL, { 0xF841247010E4861FULL, 0xEDFC58E6F3B5CE26ULL } }, /* XSUM_XXH128_testdata[4021] */\n    { 1340, 0x9E3779B185EBCA8DULL, { 0xD9701B31913C2D4DULL, 0xFEE51641DEA75182ULL } }, /* XSUM_XXH128_testdata[4022] */\n    { 1341, 0x0000000000000000ULL, { 0x48D8EC79E90A0EFDULL, 0x4CAB02F66BD43D03ULL } }, /* XSUM_XXH128_testdata[4023] */\n    { 1341, 0x000000009E3779B1ULL, { 0x0823813AF276AF31ULL, 0x6B0E80C501F47374ULL } }, /* XSUM_XXH128_testdata[4024] */\n    { 1341, 0x9E3779B185EBCA8DULL, { 0x594875400B329F1DULL, 0xDF37B6ED5171A09AULL } }, /* XSUM_XXH128_testdata[4025] */\n    { 1342, 0x0000000000000000ULL, { 0x0918BCD2A85A11A3ULL, 0x8BB23B02A4B2999BULL } }, /* XSUM_XXH128_testdata[4026] */\n    { 1342, 0x000000009E3779B1ULL, { 0x4FCC4301C9C45710ULL, 0xECC10795D40EF51CULL } }, /* XSUM_XXH128_testdata[4027] */\n    { 1342, 0x9E3779B185EBCA8DULL, { 0x50617EC3AD9E6FBEULL, 0x15CC603C4E677635ULL } }, /* XSUM_XXH128_testdata[4028] */\n    { 1343, 0x0000000000000000ULL, { 0x47B4B996ACBCA272ULL, 0x14E7777A96821528ULL } }, /* XSUM_XXH128_testdata[4029] */\n    { 1343, 0x000000009E3779B1ULL, { 0xF36F12A8DDC6B3E5ULL, 0x705FA9474354AB34ULL } }, /* XSUM_XXH128_testdata[4030] */\n    { 1343, 0x9E3779B185EBCA8DULL, { 0x78E1BF70B413C5A2ULL, 0x1387F784ECA71F56ULL } }, /* XSUM_XXH128_testdata[4031] */\n    { 1344, 0x0000000000000000ULL, { 0x013CE932DAF959CDULL, 0x9EF105F2683BBFB3ULL } }, /* XSUM_XXH128_testdata[4032] */\n    { 1344, 0x000000009E3779B1ULL, { 0x9D2CB88F8EA7B1ACULL, 0x60D59253B2DE8DABULL } }, /* XSUM_XXH128_testdata[4033] */\n    { 1344, 0x9E3779B185EBCA8DULL, { 0x4D72828634546D2AULL, 0x8D3F152B30E87801ULL } }, /* XSUM_XXH128_testdata[4034] */\n    { 1345, 0x0000000000000000ULL, { 0x2C8E44982DF991F6ULL, 0xD094E9F496EF86D3ULL } }, /* XSUM_XXH128_testdata[4035] */\n    { 1345, 0x000000009E3779B1ULL, { 0x6E3329BA90F061FFULL, 0x19F0BEDF246EA8C1ULL } }, /* XSUM_XXH128_testdata[4036] */\n    { 1345, 0x9E3779B185EBCA8DULL, { 0xBC54FDBF323BBE36ULL, 0x88F022796EB3AC0AULL } }, /* XSUM_XXH128_testdata[4037] */\n    { 1346, 0x0000000000000000ULL, { 0x545BC34A73452297ULL, 0x1A4111C8E14297B7ULL } }, /* XSUM_XXH128_testdata[4038] */\n    { 1346, 0x000000009E3779B1ULL, { 0x41A881564A117089ULL, 0xA181CF3401CC51B3ULL } }, /* XSUM_XXH128_testdata[4039] */\n    { 1346, 0x9E3779B185EBCA8DULL, { 0x4FA571EA68EF0EDEULL, 0x0778CB46A226DBE1ULL } }, /* XSUM_XXH128_testdata[4040] */\n    { 1347, 0x0000000000000000ULL, { 0x4E37934066623E92ULL, 0x7E795AA89D239FB5ULL } }, /* XSUM_XXH128_testdata[4041] */\n    { 1347, 0x000000009E3779B1ULL, { 0x07A2963BD6080BDBULL, 0x5C76A71888029B35ULL } }, /* XSUM_XXH128_testdata[4042] */\n    { 1347, 0x9E3779B185EBCA8DULL, { 0x644C5D2147A8F740ULL, 0x8A51B0DC795A45B4ULL } }, /* XSUM_XXH128_testdata[4043] */\n    { 1348, 0x0000000000000000ULL, { 0xCD4F19DD0DB10EFBULL, 0x5C4AE1CFAFA5B2C0ULL } }, /* XSUM_XXH128_testdata[4044] */\n    { 1348, 0x000000009E3779B1ULL, { 0xAFC4209BC763DEC4ULL, 0xD14F0DB04C50C7B0ULL } }, /* XSUM_XXH128_testdata[4045] */\n    { 1348, 0x9E3779B185EBCA8DULL, { 0x7DFE56ABB035254AULL, 0x128D88111E8C4562ULL } }, /* XSUM_XXH128_testdata[4046] */\n    { 1349, 0x0000000000000000ULL, { 0x2100DF530D1E9080ULL, 0x99BE0090C02AD5C9ULL } }, /* XSUM_XXH128_testdata[4047] */\n    { 1349, 0x000000009E3779B1ULL, { 0x853EEAB01C680915ULL, 0xF256ADC9A8E87D54ULL } }, /* XSUM_XXH128_testdata[4048] */\n    { 1349, 0x9E3779B185EBCA8DULL, { 0xC50323EF416AA038ULL, 0xE33702F40BDF3239ULL } }, /* XSUM_XXH128_testdata[4049] */\n    { 1350, 0x0000000000000000ULL, { 0xB9B2CF49EC2FB54AULL, 0xFE84421727549442ULL } }, /* XSUM_XXH128_testdata[4050] */\n    { 1350, 0x000000009E3779B1ULL, { 0xFA883DBB613B087CULL, 0x8FBBB873CB4A509DULL } }, /* XSUM_XXH128_testdata[4051] */\n    { 1350, 0x9E3779B185EBCA8DULL, { 0xD2F4FF62CC375D83ULL, 0x84A96A7F2DE2841AULL } }, /* XSUM_XXH128_testdata[4052] */\n    { 1351, 0x0000000000000000ULL, { 0x0BCCBE7B56310000ULL, 0x45297B579D0F3847ULL } }, /* XSUM_XXH128_testdata[4053] */\n    { 1351, 0x000000009E3779B1ULL, { 0xCB1BD48F7B95A1A4ULL, 0x5CA4CBACE64FDE8EULL } }, /* XSUM_XXH128_testdata[4054] */\n    { 1351, 0x9E3779B185EBCA8DULL, { 0x833F2097408DEB25ULL, 0xE54ACB70D3EDEF2AULL } }, /* XSUM_XXH128_testdata[4055] */\n    { 1352, 0x0000000000000000ULL, { 0xD46A300F00BF77ACULL, 0xA7826D2C9166BDD9ULL } }, /* XSUM_XXH128_testdata[4056] */\n    { 1352, 0x000000009E3779B1ULL, { 0x39F2CDE0FC4C3ACDULL, 0x207F0F120262C5F1ULL } }, /* XSUM_XXH128_testdata[4057] */\n    { 1352, 0x9E3779B185EBCA8DULL, { 0x7BB6491930D53D56ULL, 0xE42A674552AB6650ULL } }, /* XSUM_XXH128_testdata[4058] */\n    { 1353, 0x0000000000000000ULL, { 0xAC88733AE865906AULL, 0xC38905B6DA230A71ULL } }, /* XSUM_XXH128_testdata[4059] */\n    { 1353, 0x000000009E3779B1ULL, { 0x17772D9E0EC47AE5ULL, 0x349E53059C9BEFC8ULL } }, /* XSUM_XXH128_testdata[4060] */\n    { 1353, 0x9E3779B185EBCA8DULL, { 0xD9F702821DE7D0D1ULL, 0xC87C305E70C2208CULL } }, /* XSUM_XXH128_testdata[4061] */\n    { 1354, 0x0000000000000000ULL, { 0xA5FEF51672F13422ULL, 0x60FF21C5293CEEE1ULL } }, /* XSUM_XXH128_testdata[4062] */\n    { 1354, 0x000000009E3779B1ULL, { 0xBDEAAADFB18EDF5AULL, 0xE636E58059C8AA81ULL } }, /* XSUM_XXH128_testdata[4063] */\n    { 1354, 0x9E3779B185EBCA8DULL, { 0x22FB18918E9D4B13ULL, 0x4A2A2D2FB8198561ULL } }, /* XSUM_XXH128_testdata[4064] */\n    { 1355, 0x0000000000000000ULL, { 0x4005197CEECF38A2ULL, 0x426BBE0C4803A758ULL } }, /* XSUM_XXH128_testdata[4065] */\n    { 1355, 0x000000009E3779B1ULL, { 0x6E86B2724CA5C0C9ULL, 0x96E727FA145D269DULL } }, /* XSUM_XXH128_testdata[4066] */\n    { 1355, 0x9E3779B185EBCA8DULL, { 0x871C7BC841BF8CEAULL, 0xF8D06F9256560F56ULL } }, /* XSUM_XXH128_testdata[4067] */\n    { 1356, 0x0000000000000000ULL, { 0x6EC4DD07A7E36E9AULL, 0xF51E40BE36A32804ULL } }, /* XSUM_XXH128_testdata[4068] */\n    { 1356, 0x000000009E3779B1ULL, { 0x89C49E5799E11ACDULL, 0xFAAAC6C575F61E42ULL } }, /* XSUM_XXH128_testdata[4069] */\n    { 1356, 0x9E3779B185EBCA8DULL, { 0xC0F936987C1DCAF3ULL, 0x7A6C8FDB730B5798ULL } }, /* XSUM_XXH128_testdata[4070] */\n    { 1357, 0x0000000000000000ULL, { 0x45D8E48A5773C59DULL, 0x30F0C1824915A0B0ULL } }, /* XSUM_XXH128_testdata[4071] */\n    { 1357, 0x000000009E3779B1ULL, { 0xAF0172C0BE060ABFULL, 0x366AF3D21AF5DA0AULL } }, /* XSUM_XXH128_testdata[4072] */\n    { 1357, 0x9E3779B185EBCA8DULL, { 0xCAD350498527761CULL, 0xC9A125FE49D3BB31ULL } }, /* XSUM_XXH128_testdata[4073] */\n    { 1358, 0x0000000000000000ULL, { 0xF34F31F8ECAD2143ULL, 0x84EEDA96071916C8ULL } }, /* XSUM_XXH128_testdata[4074] */\n    { 1358, 0x000000009E3779B1ULL, { 0x9E5466AFAB28A48AULL, 0x14E7858822B30D0EULL } }, /* XSUM_XXH128_testdata[4075] */\n    { 1358, 0x9E3779B185EBCA8DULL, { 0xA22B0347980DA2A2ULL, 0xFB8610E60F1F2C0CULL } }, /* XSUM_XXH128_testdata[4076] */\n    { 1359, 0x0000000000000000ULL, { 0x84EDC4E7BF4E5B18ULL, 0x517A02483EDC140EULL } }, /* XSUM_XXH128_testdata[4077] */\n    { 1359, 0x000000009E3779B1ULL, { 0xF30A2891E0FF24CCULL, 0xD287BE31DC9F51C2ULL } }, /* XSUM_XXH128_testdata[4078] */\n    { 1359, 0x9E3779B185EBCA8DULL, { 0xB4EE44ACBAA9AEEDULL, 0xF165F6DB68660D97ULL } }, /* XSUM_XXH128_testdata[4079] */\n    { 1360, 0x0000000000000000ULL, { 0x51117C6E1E37F76BULL, 0xDE36C947108750F2ULL } }, /* XSUM_XXH128_testdata[4080] */\n    { 1360, 0x000000009E3779B1ULL, { 0x420A16A2B5FB2940ULL, 0xC843DE524C214F05ULL } }, /* XSUM_XXH128_testdata[4081] */\n    { 1360, 0x9E3779B185EBCA8DULL, { 0xDE39242E68E96791ULL, 0x891A9320A35DD2F5ULL } }, /* XSUM_XXH128_testdata[4082] */\n    { 1361, 0x0000000000000000ULL, { 0xFAFE998DF0B50089ULL, 0xEE93C96BE2147165ULL } }, /* XSUM_XXH128_testdata[4083] */\n    { 1361, 0x000000009E3779B1ULL, { 0x0DDDB085C6CEA8FEULL, 0xC1E7056AF8C49A33ULL } }, /* XSUM_XXH128_testdata[4084] */\n    { 1361, 0x9E3779B185EBCA8DULL, { 0x491FD31A6C5E4C5AULL, 0xCF4D30368C0AC9FEULL } }, /* XSUM_XXH128_testdata[4085] */\n    { 1362, 0x0000000000000000ULL, { 0x9CD51FE9344A44CCULL, 0xBEC0C0F7241485B2ULL } }, /* XSUM_XXH128_testdata[4086] */\n    { 1362, 0x000000009E3779B1ULL, { 0x4108F4C34BEC1C39ULL, 0x8B302BC57CB35411ULL } }, /* XSUM_XXH128_testdata[4087] */\n    { 1362, 0x9E3779B185EBCA8DULL, { 0x707038848851FC82ULL, 0x11EF8E874A28CAE0ULL } }, /* XSUM_XXH128_testdata[4088] */\n    { 1363, 0x0000000000000000ULL, { 0x8689EEAB84ADF7B2ULL, 0x11655E7E6E4243F9ULL } }, /* XSUM_XXH128_testdata[4089] */\n    { 1363, 0x000000009E3779B1ULL, { 0xA13B23A7789B70DDULL, 0xCD1B353AF18EFD4FULL } }, /* XSUM_XXH128_testdata[4090] */\n    { 1363, 0x9E3779B185EBCA8DULL, { 0xB4FF0F3BAABCCEFBULL, 0x1AAD24FA038197C1ULL } }, /* XSUM_XXH128_testdata[4091] */\n    { 1364, 0x0000000000000000ULL, { 0xD8A9BD68C7CC6E1EULL, 0xD43105FC1E1B80E6ULL } }, /* XSUM_XXH128_testdata[4092] */\n    { 1364, 0x000000009E3779B1ULL, { 0xA30AB5DD23135108ULL, 0x9B414EAA0CA7DD99ULL } }, /* XSUM_XXH128_testdata[4093] */\n    { 1364, 0x9E3779B185EBCA8DULL, { 0xD40E9878CF8B320DULL, 0xD525BAFC94C93B75ULL } }, /* XSUM_XXH128_testdata[4094] */\n    { 1365, 0x0000000000000000ULL, { 0x9E8CDD6FD3212339ULL, 0x940D22FB6E421390ULL } }, /* XSUM_XXH128_testdata[4095] */\n    { 1365, 0x000000009E3779B1ULL, { 0xFE479C02D458911CULL, 0x6F877A22AD0BD708ULL } }, /* XSUM_XXH128_testdata[4096] */\n    { 1365, 0x9E3779B185EBCA8DULL, { 0x4491397CAE591664ULL, 0xC906960A4B1E4D1EULL } }, /* XSUM_XXH128_testdata[4097] */\n    { 1366, 0x0000000000000000ULL, { 0x7F393536B14CBE53ULL, 0x9EB05BEF492F2270ULL } }, /* XSUM_XXH128_testdata[4098] */\n    { 1366, 0x000000009E3779B1ULL, { 0x92D834903F82F396ULL, 0x3799D2AA8DE947F1ULL } }, /* XSUM_XXH128_testdata[4099] */\n    { 1366, 0x9E3779B185EBCA8DULL, { 0x563CB0DDCFB26BC1ULL, 0x513435C2F3C3832BULL } }, /* XSUM_XXH128_testdata[4100] */\n    { 1367, 0x0000000000000000ULL, { 0x9430E26767DF1D3EULL, 0xC6811FE604374CFDULL } }, /* XSUM_XXH128_testdata[4101] */\n    { 1367, 0x000000009E3779B1ULL, { 0x09FFBB3225A24607ULL, 0xF5AF56B955F8B9F2ULL } }, /* XSUM_XXH128_testdata[4102] */\n    { 1367, 0x9E3779B185EBCA8DULL, { 0xEF72A6CB89577251ULL, 0xBDD3CA2D57CDF04AULL } }, /* XSUM_XXH128_testdata[4103] */\n    { 1368, 0x0000000000000000ULL, { 0x891A102E719B14CDULL, 0x4E2D64991AFE052DULL } }, /* XSUM_XXH128_testdata[4104] */\n    { 1368, 0x000000009E3779B1ULL, { 0x2902AA160AF3F5B8ULL, 0x228517F9D873B740ULL } }, /* XSUM_XXH128_testdata[4105] */\n    { 1368, 0x9E3779B185EBCA8DULL, { 0xBDE60050A6A51CFDULL, 0x3FF33D0022FD88E6ULL } }, /* XSUM_XXH128_testdata[4106] */\n    { 1369, 0x0000000000000000ULL, { 0xEFB2528D9B81371AULL, 0xB58AA70C704261EAULL } }, /* XSUM_XXH128_testdata[4107] */\n    { 1369, 0x000000009E3779B1ULL, { 0x4F5698E2F425DE4DULL, 0x02DE7FE2513F1D92ULL } }, /* XSUM_XXH128_testdata[4108] */\n    { 1369, 0x9E3779B185EBCA8DULL, { 0xA3D60B20FFA4D538ULL, 0xEE112E3D7179FC70ULL } }, /* XSUM_XXH128_testdata[4109] */\n    { 1370, 0x0000000000000000ULL, { 0x1F1B7AC192DA87BCULL, 0x6E8F2D02B6405DCEULL } }, /* XSUM_XXH128_testdata[4110] */\n    { 1370, 0x000000009E3779B1ULL, { 0xCF1EBD40553CD4C1ULL, 0x1DB218E90CF4C830ULL } }, /* XSUM_XXH128_testdata[4111] */\n    { 1370, 0x9E3779B185EBCA8DULL, { 0x8960BB3D1F06D6ADULL, 0x0FB60E1FC02B199AULL } }, /* XSUM_XXH128_testdata[4112] */\n    { 1371, 0x0000000000000000ULL, { 0x3AC2E3D1D3110DE2ULL, 0xDAE8C26616551593ULL } }, /* XSUM_XXH128_testdata[4113] */\n    { 1371, 0x000000009E3779B1ULL, { 0x3EB06B2869F5F5C3ULL, 0x93DA600F89EE39D4ULL } }, /* XSUM_XXH128_testdata[4114] */\n    { 1371, 0x9E3779B185EBCA8DULL, { 0xA4984AC23440FCC0ULL, 0xB4E31F44B3EDAF76ULL } }, /* XSUM_XXH128_testdata[4115] */\n    { 1372, 0x0000000000000000ULL, { 0xFC287592522AA7EAULL, 0x98CB9D375989E3B6ULL } }, /* XSUM_XXH128_testdata[4116] */\n    { 1372, 0x000000009E3779B1ULL, { 0x7C21459CA48249ADULL, 0x7491204D32447329ULL } }, /* XSUM_XXH128_testdata[4117] */\n    { 1372, 0x9E3779B185EBCA8DULL, { 0xE8883E3691A64403ULL, 0x940AF34270D46346ULL } }, /* XSUM_XXH128_testdata[4118] */\n    { 1373, 0x0000000000000000ULL, { 0x07D5764EFA3C28F8ULL, 0x2DD87FBB7A5FFC80ULL } }, /* XSUM_XXH128_testdata[4119] */\n    { 1373, 0x000000009E3779B1ULL, { 0xF89D762D9F407FA6ULL, 0x542AD7034D41B16AULL } }, /* XSUM_XXH128_testdata[4120] */\n    { 1373, 0x9E3779B185EBCA8DULL, { 0x63B086ADA02C05EEULL, 0xDE432D720F3B2C23ULL } }, /* XSUM_XXH128_testdata[4121] */\n    { 1374, 0x0000000000000000ULL, { 0x692E010AACBBDD83ULL, 0x6B5278D97460E337ULL } }, /* XSUM_XXH128_testdata[4122] */\n    { 1374, 0x000000009E3779B1ULL, { 0x5E7333F43B90DF4BULL, 0x1AAC848968045BDBULL } }, /* XSUM_XXH128_testdata[4123] */\n    { 1374, 0x9E3779B185EBCA8DULL, { 0x356F67E7E6882972ULL, 0x90AEFC09EC0EA34CULL } }, /* XSUM_XXH128_testdata[4124] */\n    { 1375, 0x0000000000000000ULL, { 0x918BCEDA7771D693ULL, 0x7242BE5ED8ED6C15ULL } }, /* XSUM_XXH128_testdata[4125] */\n    { 1375, 0x000000009E3779B1ULL, { 0xC6D6C4269DB08329ULL, 0x68BB53C975155B43ULL } }, /* XSUM_XXH128_testdata[4126] */\n    { 1375, 0x9E3779B185EBCA8DULL, { 0x27DD289F1FF7E712ULL, 0x5A58DBDEFBD138A6ULL } }, /* XSUM_XXH128_testdata[4127] */\n    { 1376, 0x0000000000000000ULL, { 0xF5F2C67F0A407FEFULL, 0x12BDB8630BF43EB8ULL } }, /* XSUM_XXH128_testdata[4128] */\n    { 1376, 0x000000009E3779B1ULL, { 0x7A486E7023860190ULL, 0x10E77B13B465F3FFULL } }, /* XSUM_XXH128_testdata[4129] */\n    { 1376, 0x9E3779B185EBCA8DULL, { 0x79D4CA65FA84EB33ULL, 0xBF5BF8503DC74E1FULL } }, /* XSUM_XXH128_testdata[4130] */\n    { 1377, 0x0000000000000000ULL, { 0x232F5E84CBA74A2BULL, 0xA0FDB05A39D75A92ULL } }, /* XSUM_XXH128_testdata[4131] */\n    { 1377, 0x000000009E3779B1ULL, { 0x4DF0448480529E7CULL, 0xA2F92C256EBED4C8ULL } }, /* XSUM_XXH128_testdata[4132] */\n    { 1377, 0x9E3779B185EBCA8DULL, { 0x57F9DB3D6629D224ULL, 0x3E683BAFE6FDF29BULL } }, /* XSUM_XXH128_testdata[4133] */\n    { 1378, 0x0000000000000000ULL, { 0x18EC462AFF076DF2ULL, 0xCB2CA0C76AA73B30ULL } }, /* XSUM_XXH128_testdata[4134] */\n    { 1378, 0x000000009E3779B1ULL, { 0x4B6B39E797D3A546ULL, 0xCBAD2B8943388806ULL } }, /* XSUM_XXH128_testdata[4135] */\n    { 1378, 0x9E3779B185EBCA8DULL, { 0x65A838B3EC37187DULL, 0xDF1C857027D2123EULL } }, /* XSUM_XXH128_testdata[4136] */\n    { 1379, 0x0000000000000000ULL, { 0x608525D658F939D3ULL, 0x502A2017441B1BC9ULL } }, /* XSUM_XXH128_testdata[4137] */\n    { 1379, 0x000000009E3779B1ULL, { 0xA81728482BAE26BBULL, 0xE6085770AE7F8181ULL } }, /* XSUM_XXH128_testdata[4138] */\n    { 1379, 0x9E3779B185EBCA8DULL, { 0x788376FB391AB04FULL, 0xB2BCB691E1E8637AULL } }, /* XSUM_XXH128_testdata[4139] */\n    { 1380, 0x0000000000000000ULL, { 0x8B3AFE1BAC0FB533ULL, 0x1FC7D20A144B5A28ULL } }, /* XSUM_XXH128_testdata[4140] */\n    { 1380, 0x000000009E3779B1ULL, { 0xCF2F703FC4B6C54EULL, 0x38E761705A42D6A4ULL } }, /* XSUM_XXH128_testdata[4141] */\n    { 1380, 0x9E3779B185EBCA8DULL, { 0x3298317AA71EF9F9ULL, 0xBC0C5CCBE31DD2A2ULL } }, /* XSUM_XXH128_testdata[4142] */\n    { 1381, 0x0000000000000000ULL, { 0xD88FA62E105EB767ULL, 0xE4180BF4C9C9E49FULL } }, /* XSUM_XXH128_testdata[4143] */\n    { 1381, 0x000000009E3779B1ULL, { 0x4419E0BC893EE6EDULL, 0xBAEB1C3DC20E0CC6ULL } }, /* XSUM_XXH128_testdata[4144] */\n    { 1381, 0x9E3779B185EBCA8DULL, { 0xD537F267D2EF8B65ULL, 0xD3F6E30BF7F9EEEEULL } }, /* XSUM_XXH128_testdata[4145] */\n    { 1382, 0x0000000000000000ULL, { 0xDD5FB8861BE2649CULL, 0x976127ABF86407D8ULL } }, /* XSUM_XXH128_testdata[4146] */\n    { 1382, 0x000000009E3779B1ULL, { 0x4179CD815A9E0C91ULL, 0x0D397DBCE519D738ULL } }, /* XSUM_XXH128_testdata[4147] */\n    { 1382, 0x9E3779B185EBCA8DULL, { 0xA478AC159FA2C385ULL, 0x54FB3E007511C26CULL } }, /* XSUM_XXH128_testdata[4148] */\n    { 1383, 0x0000000000000000ULL, { 0x0D9D6E0B91B185EDULL, 0x11F8402B9E89E99BULL } }, /* XSUM_XXH128_testdata[4149] */\n    { 1383, 0x000000009E3779B1ULL, { 0x51A5FF01DE16CEE3ULL, 0xD7EC122D7239C8E8ULL } }, /* XSUM_XXH128_testdata[4150] */\n    { 1383, 0x9E3779B185EBCA8DULL, { 0xF0EC3D66A74F4B28ULL, 0xFEFEDF2A7EE9A7A3ULL } }, /* XSUM_XXH128_testdata[4151] */\n    { 1384, 0x0000000000000000ULL, { 0xC99D8710C21F05EEULL, 0xF1EDE80AA2DA6EBEULL } }, /* XSUM_XXH128_testdata[4152] */\n    { 1384, 0x000000009E3779B1ULL, { 0x202BE2E42F43879EULL, 0x7173DEFD003A8563ULL } }, /* XSUM_XXH128_testdata[4153] */\n    { 1384, 0x9E3779B185EBCA8DULL, { 0x25CDB598192DF8FCULL, 0xBB51DDF87EAFE648ULL } }, /* XSUM_XXH128_testdata[4154] */\n    { 1385, 0x0000000000000000ULL, { 0x439FD60BEA838A0FULL, 0xE479B866B8A3DCA1ULL } }, /* XSUM_XXH128_testdata[4155] */\n    { 1385, 0x000000009E3779B1ULL, { 0xEB8467003DED207DULL, 0x9F6B49C1BB908E1DULL } }, /* XSUM_XXH128_testdata[4156] */\n    { 1385, 0x9E3779B185EBCA8DULL, { 0xB3A834E9936D2D1AULL, 0x759645B931F0DF13ULL } }, /* XSUM_XXH128_testdata[4157] */\n    { 1386, 0x0000000000000000ULL, { 0x880E9297A45F41F0ULL, 0x1A5038720804D64EULL } }, /* XSUM_XXH128_testdata[4158] */\n    { 1386, 0x000000009E3779B1ULL, { 0x72D6C933BCA950BAULL, 0x3B119BAF9C3A7937ULL } }, /* XSUM_XXH128_testdata[4159] */\n    { 1386, 0x9E3779B185EBCA8DULL, { 0xE0BA11F31B01B255ULL, 0x3037D1D34BA4E180ULL } }, /* XSUM_XXH128_testdata[4160] */\n    { 1387, 0x0000000000000000ULL, { 0x7C62397B9BFBB320ULL, 0x60CF00EC8DBB6BBDULL } }, /* XSUM_XXH128_testdata[4161] */\n    { 1387, 0x000000009E3779B1ULL, { 0x1FFCF020A7B66041ULL, 0xECD46C2F2EFE84B5ULL } }, /* XSUM_XXH128_testdata[4162] */\n    { 1387, 0x9E3779B185EBCA8DULL, { 0x345576A37765439FULL, 0xC74D406413477930ULL } }, /* XSUM_XXH128_testdata[4163] */\n    { 1388, 0x0000000000000000ULL, { 0x54D1CEDD46CC5E95ULL, 0xB6B84F0FFA7526CAULL } }, /* XSUM_XXH128_testdata[4164] */\n    { 1388, 0x000000009E3779B1ULL, { 0x42B9F4ACE2C1C322ULL, 0x16B67837356B5D9EULL } }, /* XSUM_XXH128_testdata[4165] */\n    { 1388, 0x9E3779B185EBCA8DULL, { 0xFCA3CCFDCF6AF513ULL, 0x12A701454A40AF9CULL } }, /* XSUM_XXH128_testdata[4166] */\n    { 1389, 0x0000000000000000ULL, { 0x06D8FE21D778AAB9ULL, 0x89208132979FC73EULL } }, /* XSUM_XXH128_testdata[4167] */\n    { 1389, 0x000000009E3779B1ULL, { 0x6FCAA45E4775CB8EULL, 0x14E3B89B983785B0ULL } }, /* XSUM_XXH128_testdata[4168] */\n    { 1389, 0x9E3779B185EBCA8DULL, { 0xBAA587CD7AE898BBULL, 0x579FE5221D835E5EULL } }, /* XSUM_XXH128_testdata[4169] */\n    { 1390, 0x0000000000000000ULL, { 0x892662096E518CC2ULL, 0x88DB8A1ECA0FA9B3ULL } }, /* XSUM_XXH128_testdata[4170] */\n    { 1390, 0x000000009E3779B1ULL, { 0x93D5EFA4776CF369ULL, 0xA6987B07BB313134ULL } }, /* XSUM_XXH128_testdata[4171] */\n    { 1390, 0x9E3779B185EBCA8DULL, { 0x0E765E19FFE64E7FULL, 0x76299ACA22A0EFAAULL } }, /* XSUM_XXH128_testdata[4172] */\n    { 1391, 0x0000000000000000ULL, { 0x7A85690BFD330103ULL, 0xF5E9F1C98C025D30ULL } }, /* XSUM_XXH128_testdata[4173] */\n    { 1391, 0x000000009E3779B1ULL, { 0x7B206736C139E89CULL, 0x847FB4259FF60198ULL } }, /* XSUM_XXH128_testdata[4174] */\n    { 1391, 0x9E3779B185EBCA8DULL, { 0xC528D0268830BD69ULL, 0x8E0575718DA9B5D5ULL } }, /* XSUM_XXH128_testdata[4175] */\n    { 1392, 0x0000000000000000ULL, { 0xA25DB11855B24D5AULL, 0xB65B5A6C96A643E9ULL } }, /* XSUM_XXH128_testdata[4176] */\n    { 1392, 0x000000009E3779B1ULL, { 0xC58220DA5214A374ULL, 0x7820285263007A94ULL } }, /* XSUM_XXH128_testdata[4177] */\n    { 1392, 0x9E3779B185EBCA8DULL, { 0x21157B53701A3A07ULL, 0x1CBBCBC96264D1D2ULL } }, /* XSUM_XXH128_testdata[4178] */\n    { 1393, 0x0000000000000000ULL, { 0x8EE466F3114B1006ULL, 0xF79F2BA48DE942EFULL } }, /* XSUM_XXH128_testdata[4179] */\n    { 1393, 0x000000009E3779B1ULL, { 0x7DCF53EC6D6E7C49ULL, 0x07495C7777E42AD4ULL } }, /* XSUM_XXH128_testdata[4180] */\n    { 1393, 0x9E3779B185EBCA8DULL, { 0x4711090ED966E57CULL, 0xBAD42D9B7EB8F11EULL } }, /* XSUM_XXH128_testdata[4181] */\n    { 1394, 0x0000000000000000ULL, { 0x169F9D539694E361ULL, 0x79595BA11A0F7F41ULL } }, /* XSUM_XXH128_testdata[4182] */\n    { 1394, 0x000000009E3779B1ULL, { 0xF9B1315AB4187C26ULL, 0x156063B2CA5BACBBULL } }, /* XSUM_XXH128_testdata[4183] */\n    { 1394, 0x9E3779B185EBCA8DULL, { 0xE1962C3129A85215ULL, 0x56F6E96689709CC1ULL } }, /* XSUM_XXH128_testdata[4184] */\n    { 1395, 0x0000000000000000ULL, { 0x3CC434DCAF0A0B99ULL, 0xC3244106C2C69465ULL } }, /* XSUM_XXH128_testdata[4185] */\n    { 1395, 0x000000009E3779B1ULL, { 0xCFA700E86765846DULL, 0xB67280707846F75CULL } }, /* XSUM_XXH128_testdata[4186] */\n    { 1395, 0x9E3779B185EBCA8DULL, { 0xE7E837D0081BA4E0ULL, 0xA20A2CF414459812ULL } }, /* XSUM_XXH128_testdata[4187] */\n    { 1396, 0x0000000000000000ULL, { 0x59922D1610ACF94BULL, 0x611C980E4F4566B9ULL } }, /* XSUM_XXH128_testdata[4188] */\n    { 1396, 0x000000009E3779B1ULL, { 0xA7AEEE9B76D27F1FULL, 0x2E609BD0ABE61119ULL } }, /* XSUM_XXH128_testdata[4189] */\n    { 1396, 0x9E3779B185EBCA8DULL, { 0x11521545078B6367ULL, 0x4140BF1F1C9C22E2ULL } }, /* XSUM_XXH128_testdata[4190] */\n    { 1397, 0x0000000000000000ULL, { 0x4BB9F5EFD3033344ULL, 0x5DBBB5A23A739967ULL } }, /* XSUM_XXH128_testdata[4191] */\n    { 1397, 0x000000009E3779B1ULL, { 0x3A63ECB79C971A89ULL, 0x94F9B01B493C2F4FULL } }, /* XSUM_XXH128_testdata[4192] */\n    { 1397, 0x9E3779B185EBCA8DULL, { 0xEED83CCAAF3788D8ULL, 0x1678E87CAB95A669ULL } }, /* XSUM_XXH128_testdata[4193] */\n    { 1398, 0x0000000000000000ULL, { 0xCB23BE297181BCFDULL, 0x368D28394EE59E34ULL } }, /* XSUM_XXH128_testdata[4194] */\n    { 1398, 0x000000009E3779B1ULL, { 0x6D1966F4B066B6FFULL, 0x2B87709857061715ULL } }, /* XSUM_XXH128_testdata[4195] */\n    { 1398, 0x9E3779B185EBCA8DULL, { 0x69847059506D2C9FULL, 0xDDE295EC89F01A48ULL } }, /* XSUM_XXH128_testdata[4196] */\n    { 1399, 0x0000000000000000ULL, { 0x325BB710E26DF0FCULL, 0x53E63C2B3DA53712ULL } }, /* XSUM_XXH128_testdata[4197] */\n    { 1399, 0x000000009E3779B1ULL, { 0xF114E159B87E9448ULL, 0xBFA53C4C1A7C7D7BULL } }, /* XSUM_XXH128_testdata[4198] */\n    { 1399, 0x9E3779B185EBCA8DULL, { 0xF647B2920BE132BAULL, 0xC1AEF6513879EBA2ULL } }, /* XSUM_XXH128_testdata[4199] */\n    { 1400, 0x0000000000000000ULL, { 0x1BFB88704DE4E438ULL, 0xF28E5E30AB3CFD23ULL } }, /* XSUM_XXH128_testdata[4200] */\n    { 1400, 0x000000009E3779B1ULL, { 0xEF5FDB657A01C6BDULL, 0x6768413967DCD6F0ULL } }, /* XSUM_XXH128_testdata[4201] */\n    { 1400, 0x9E3779B185EBCA8DULL, { 0x20D9F4B075164F01ULL, 0x3A19BBD4188615F2ULL } }, /* XSUM_XXH128_testdata[4202] */\n    { 1401, 0x0000000000000000ULL, { 0x6E4007192C7E5477ULL, 0x959C0BA957B26E9AULL } }, /* XSUM_XXH128_testdata[4203] */\n    { 1401, 0x000000009E3779B1ULL, { 0x85D53DC84A343E83ULL, 0x335A2F7AD6A549BBULL } }, /* XSUM_XXH128_testdata[4204] */\n    { 1401, 0x9E3779B185EBCA8DULL, { 0xA7D1BBA89BDE98DEULL, 0xBBEF57194EC72F5AULL } }, /* XSUM_XXH128_testdata[4205] */\n    { 1402, 0x0000000000000000ULL, { 0x793FF88589F05AA2ULL, 0xBA48707357D3EFB5ULL } }, /* XSUM_XXH128_testdata[4206] */\n    { 1402, 0x000000009E3779B1ULL, { 0xF64465C189C2854EULL, 0x7B824C7F936814C6ULL } }, /* XSUM_XXH128_testdata[4207] */\n    { 1402, 0x9E3779B185EBCA8DULL, { 0xDBA14086CDB9BFE2ULL, 0x853E9C26681E9808ULL } }, /* XSUM_XXH128_testdata[4208] */\n    { 1403, 0x0000000000000000ULL, { 0x13CEECC554A7370AULL, 0x13EC15E2A7ECBEC9ULL } }, /* XSUM_XXH128_testdata[4209] */\n    { 1403, 0x000000009E3779B1ULL, { 0xFDB8A26EFC673801ULL, 0xA59D42EA57575C38ULL } }, /* XSUM_XXH128_testdata[4210] */\n    { 1403, 0x9E3779B185EBCA8DULL, { 0x4E9EAE32CBDB6224ULL, 0x1F6F4B0638732067ULL } }, /* XSUM_XXH128_testdata[4211] */\n    { 1404, 0x0000000000000000ULL, { 0xF258680A2E1B12F1ULL, 0xA68EDAA7BE295F04ULL } }, /* XSUM_XXH128_testdata[4212] */\n    { 1404, 0x000000009E3779B1ULL, { 0xE46B5B37ECDCF7AEULL, 0xA425BC16C4F581F5ULL } }, /* XSUM_XXH128_testdata[4213] */\n    { 1404, 0x9E3779B185EBCA8DULL, { 0x8200673C5037CCABULL, 0x5B24C353BE7E17C4ULL } }, /* XSUM_XXH128_testdata[4214] */\n    { 1405, 0x0000000000000000ULL, { 0x141D9483A8195CDBULL, 0x8541132DE52A5EEAULL } }, /* XSUM_XXH128_testdata[4215] */\n    { 1405, 0x000000009E3779B1ULL, { 0x37D4B169FD2C7E66ULL, 0x5659AE8E121C9F72ULL } }, /* XSUM_XXH128_testdata[4216] */\n    { 1405, 0x9E3779B185EBCA8DULL, { 0xE1A8D72971376B0AULL, 0x2F1891D94BEC63A6ULL } }, /* XSUM_XXH128_testdata[4217] */\n    { 1406, 0x0000000000000000ULL, { 0xC4608F1B395D7C61ULL, 0xC454AA48BBDDDAF8ULL } }, /* XSUM_XXH128_testdata[4218] */\n    { 1406, 0x000000009E3779B1ULL, { 0x3314AFB6CDC9757CULL, 0x56F7133A9EAEF745ULL } }, /* XSUM_XXH128_testdata[4219] */\n    { 1406, 0x9E3779B185EBCA8DULL, { 0x46009F40B052DB04ULL, 0x9CAF8D82FB036765ULL } }, /* XSUM_XXH128_testdata[4220] */\n    { 1407, 0x0000000000000000ULL, { 0x921CDB3E8E19798AULL, 0xE5748C0A60301A14ULL } }, /* XSUM_XXH128_testdata[4221] */\n    { 1407, 0x000000009E3779B1ULL, { 0x2394E821E5045A54ULL, 0xDD47D314C2D1997DULL } }, /* XSUM_XXH128_testdata[4222] */\n    { 1407, 0x9E3779B185EBCA8DULL, { 0xF5AD8F6C0B798283ULL, 0xAA0CA81159459AA2ULL } }, /* XSUM_XXH128_testdata[4223] */\n    { 1408, 0x0000000000000000ULL, { 0xF1AA40024272BF80ULL, 0xFD4C98791B4EEFE0ULL } }, /* XSUM_XXH128_testdata[4224] */\n    { 1408, 0x000000009E3779B1ULL, { 0xC2BA3AA7E9BD9A82ULL, 0x169634BB1BBD4ABBULL } }, /* XSUM_XXH128_testdata[4225] */\n    { 1408, 0x9E3779B185EBCA8DULL, { 0xDE4DF8A29F45B9E0ULL, 0xE2E22CED03A5BDF3ULL } }, /* XSUM_XXH128_testdata[4226] */\n    { 1409, 0x0000000000000000ULL, { 0x5C6F59BD9E2B8E96ULL, 0x7F8FD8141791F78BULL } }, /* XSUM_XXH128_testdata[4227] */\n    { 1409, 0x000000009E3779B1ULL, { 0x8189EAD8D7C6BEAAULL, 0x621B3FC65503EBCCULL } }, /* XSUM_XXH128_testdata[4228] */\n    { 1409, 0x9E3779B185EBCA8DULL, { 0x3358B1D4BE22F75FULL, 0xD32FFFAB0A4BF3C9ULL } }, /* XSUM_XXH128_testdata[4229] */\n    { 1410, 0x0000000000000000ULL, { 0xA1CEA58F6C781CC7ULL, 0x7DD0FED1BE798C43ULL } }, /* XSUM_XXH128_testdata[4230] */\n    { 1410, 0x000000009E3779B1ULL, { 0x6671361DDF726E67ULL, 0xFE252CA4F790554CULL } }, /* XSUM_XXH128_testdata[4231] */\n    { 1410, 0x9E3779B185EBCA8DULL, { 0x2DE90C2DF28E7DFEULL, 0xCD230E70A526822BULL } }, /* XSUM_XXH128_testdata[4232] */\n    { 1411, 0x0000000000000000ULL, { 0x8059B60348A48EBFULL, 0x18EB894245E1868BULL } }, /* XSUM_XXH128_testdata[4233] */\n    { 1411, 0x000000009E3779B1ULL, { 0x87819651A440A542ULL, 0xB8C16D1D882B0041ULL } }, /* XSUM_XXH128_testdata[4234] */\n    { 1411, 0x9E3779B185EBCA8DULL, { 0x8EE711ABBC7D9DC4ULL, 0xC6BEE4FFB6D09744ULL } }, /* XSUM_XXH128_testdata[4235] */\n    { 1412, 0x0000000000000000ULL, { 0x2BFDA33D3D40EFF9ULL, 0xFEB0D7901C6096F8ULL } }, /* XSUM_XXH128_testdata[4236] */\n    { 1412, 0x000000009E3779B1ULL, { 0xC9DFEDD3C65C33BFULL, 0x80A5867A5EC6B47CULL } }, /* XSUM_XXH128_testdata[4237] */\n    { 1412, 0x9E3779B185EBCA8DULL, { 0x3D6A9CD83D92A2F9ULL, 0xEF2DBEDBED4B1B21ULL } }, /* XSUM_XXH128_testdata[4238] */\n    { 1413, 0x0000000000000000ULL, { 0x55EFC5AC3A8F3996ULL, 0xDEAC6F9CF93FEDE8ULL } }, /* XSUM_XXH128_testdata[4239] */\n    { 1413, 0x000000009E3779B1ULL, { 0x295A98DC1E649976ULL, 0xB820DAC6FC93BE15ULL } }, /* XSUM_XXH128_testdata[4240] */\n    { 1413, 0x9E3779B185EBCA8DULL, { 0xD33CDDFDECFC586BULL, 0xF2A03B3418552D68ULL } }, /* XSUM_XXH128_testdata[4241] */\n    { 1414, 0x0000000000000000ULL, { 0x00476283A35F00BEULL, 0xDBB2AD68E4F63E46ULL } }, /* XSUM_XXH128_testdata[4242] */\n    { 1414, 0x000000009E3779B1ULL, { 0x00291A0E6BC14196ULL, 0x5540D5D8F3CD916DULL } }, /* XSUM_XXH128_testdata[4243] */\n    { 1414, 0x9E3779B185EBCA8DULL, { 0xA905C757E0386BB7ULL, 0x1E84AA28AEFD6FF0ULL } }, /* XSUM_XXH128_testdata[4244] */\n    { 1415, 0x0000000000000000ULL, { 0x848284B30D19EE3BULL, 0x98AFE128BF6C9C27ULL } }, /* XSUM_XXH128_testdata[4245] */\n    { 1415, 0x000000009E3779B1ULL, { 0x791400CBB0CDCB4FULL, 0xEC998C419594AEAAULL } }, /* XSUM_XXH128_testdata[4246] */\n    { 1415, 0x9E3779B185EBCA8DULL, { 0x893645A441AFD7B9ULL, 0xCF424B9C30581B11ULL } }, /* XSUM_XXH128_testdata[4247] */\n    { 1416, 0x0000000000000000ULL, { 0x2EB8DF3D270569EEULL, 0xF24B95B057B50AD0ULL } }, /* XSUM_XXH128_testdata[4248] */\n    { 1416, 0x000000009E3779B1ULL, { 0xC79B0C7B8F4D3FC8ULL, 0x8293A869E1442278ULL } }, /* XSUM_XXH128_testdata[4249] */\n    { 1416, 0x9E3779B185EBCA8DULL, { 0xDA7F2D825BBACCE7ULL, 0xCE2FD2584033C26FULL } }, /* XSUM_XXH128_testdata[4250] */\n    { 1417, 0x0000000000000000ULL, { 0x15E3A46C9BCC31B7ULL, 0x0EED8FFA20E62774ULL } }, /* XSUM_XXH128_testdata[4251] */\n    { 1417, 0x000000009E3779B1ULL, { 0x7395845DD113068DULL, 0x588A6EF8BA2E9FABULL } }, /* XSUM_XXH128_testdata[4252] */\n    { 1417, 0x9E3779B185EBCA8DULL, { 0x606BFE3757B52831ULL, 0x4ACCC1C88056CF5CULL } }, /* XSUM_XXH128_testdata[4253] */\n    { 1418, 0x0000000000000000ULL, { 0x1940C0475A90665AULL, 0xB39029EDB7F92FCBULL } }, /* XSUM_XXH128_testdata[4254] */\n    { 1418, 0x000000009E3779B1ULL, { 0xCF7F7DDA8E3BBA53ULL, 0x932E22B105EBAD90ULL } }, /* XSUM_XXH128_testdata[4255] */\n    { 1418, 0x9E3779B185EBCA8DULL, { 0xD070C303B5A0F467ULL, 0xF1F81DC7559BFBFAULL } }, /* XSUM_XXH128_testdata[4256] */\n    { 1419, 0x0000000000000000ULL, { 0x85ADBC4FCC10049EULL, 0xD4FC73526A3680EEULL } }, /* XSUM_XXH128_testdata[4257] */\n    { 1419, 0x000000009E3779B1ULL, { 0x25D8119C5DDAC8D2ULL, 0x2E8526FEB22A7D33ULL } }, /* XSUM_XXH128_testdata[4258] */\n    { 1419, 0x9E3779B185EBCA8DULL, { 0xD6838508DE64D4D3ULL, 0x8A3C7B7C1995EACFULL } }, /* XSUM_XXH128_testdata[4259] */\n    { 1420, 0x0000000000000000ULL, { 0xB02A4A4C485139EBULL, 0x47C27C79FAC5E9A3ULL } }, /* XSUM_XXH128_testdata[4260] */\n    { 1420, 0x000000009E3779B1ULL, { 0x9AA4286977A4BFCEULL, 0xBD872BC0D25053DEULL } }, /* XSUM_XXH128_testdata[4261] */\n    { 1420, 0x9E3779B185EBCA8DULL, { 0x038FC5270157BE6CULL, 0x0620238AD3688687ULL } }, /* XSUM_XXH128_testdata[4262] */\n    { 1421, 0x0000000000000000ULL, { 0x80E5B14774A6E3DEULL, 0x87654FAF8256CD62ULL } }, /* XSUM_XXH128_testdata[4263] */\n    { 1421, 0x000000009E3779B1ULL, { 0x079C32C4F872595BULL, 0xD830CF9DADEF7A55ULL } }, /* XSUM_XXH128_testdata[4264] */\n    { 1421, 0x9E3779B185EBCA8DULL, { 0xF63639714BB765F8ULL, 0x083B39F7FE75D584ULL } }, /* XSUM_XXH128_testdata[4265] */\n    { 1422, 0x0000000000000000ULL, { 0x940D6F8AFC3E5FE2ULL, 0x44DBCF04518D68D8ULL } }, /* XSUM_XXH128_testdata[4266] */\n    { 1422, 0x000000009E3779B1ULL, { 0x0EB9F13FA69F6616ULL, 0xA250A281056F5B91ULL } }, /* XSUM_XXH128_testdata[4267] */\n    { 1422, 0x9E3779B185EBCA8DULL, { 0xC994312948C52D3EULL, 0xF500B170A3FCAE3FULL } }, /* XSUM_XXH128_testdata[4268] */\n    { 1423, 0x0000000000000000ULL, { 0x8FCDA6A6E0DC7A52ULL, 0x86AAA89B1B7FC72FULL } }, /* XSUM_XXH128_testdata[4269] */\n    { 1423, 0x000000009E3779B1ULL, { 0x350A04E32CF6BB43ULL, 0x01B0CFE162F0CB0DULL } }, /* XSUM_XXH128_testdata[4270] */\n    { 1423, 0x9E3779B185EBCA8DULL, { 0xE0BA243293EFD78AULL, 0x1294F3A2D33EFCAAULL } }, /* XSUM_XXH128_testdata[4271] */\n    { 1424, 0x0000000000000000ULL, { 0xEAE22F34BD769AB7ULL, 0x97EA4AA2A78BBDD9ULL } }, /* XSUM_XXH128_testdata[4272] */\n    { 1424, 0x000000009E3779B1ULL, { 0x6A77C3070ABBDECFULL, 0xFEF91EA99335B10DULL } }, /* XSUM_XXH128_testdata[4273] */\n    { 1424, 0x9E3779B185EBCA8DULL, { 0x058F19EB59C50BC2ULL, 0x92FA92EE4CA65CE4ULL } }, /* XSUM_XXH128_testdata[4274] */\n    { 1425, 0x0000000000000000ULL, { 0xC722483D6C8D78F2ULL, 0x2C7959E29A19BD2FULL } }, /* XSUM_XXH128_testdata[4275] */\n    { 1425, 0x000000009E3779B1ULL, { 0x97CEB5947C6740E9ULL, 0x2786EEE5A219D159ULL } }, /* XSUM_XXH128_testdata[4276] */\n    { 1425, 0x9E3779B185EBCA8DULL, { 0xC3E70A47E1740CDAULL, 0x1B220CF22D7D994CULL } }, /* XSUM_XXH128_testdata[4277] */\n    { 1426, 0x0000000000000000ULL, { 0xC3ED57E85DFC3DCFULL, 0xAA52CF6107382FFCULL } }, /* XSUM_XXH128_testdata[4278] */\n    { 1426, 0x000000009E3779B1ULL, { 0x65597D903F0ACB98ULL, 0xCEC5D3A69B02BD3FULL } }, /* XSUM_XXH128_testdata[4279] */\n    { 1426, 0x9E3779B185EBCA8DULL, { 0x8508106B8B812CA9ULL, 0xF6FEDE9805F33034ULL } }, /* XSUM_XXH128_testdata[4280] */\n    { 1427, 0x0000000000000000ULL, { 0x3C8B0BE1563E4FC6ULL, 0x4E98CC0B92102A85ULL } }, /* XSUM_XXH128_testdata[4281] */\n    { 1427, 0x000000009E3779B1ULL, { 0xC150C26D84297349ULL, 0x7F2D35BB1A00AFF3ULL } }, /* XSUM_XXH128_testdata[4282] */\n    { 1427, 0x9E3779B185EBCA8DULL, { 0x0479E1F1A517E19DULL, 0xF02ADC6B9394604EULL } }, /* XSUM_XXH128_testdata[4283] */\n    { 1428, 0x0000000000000000ULL, { 0x63A69B05FBCC9402ULL, 0xC75CEFF6E21E68E9ULL } }, /* XSUM_XXH128_testdata[4284] */\n    { 1428, 0x000000009E3779B1ULL, { 0x8B6DA5341C06164EULL, 0x8A1049120D35E90FULL } }, /* XSUM_XXH128_testdata[4285] */\n    { 1428, 0x9E3779B185EBCA8DULL, { 0xE7F613868AA95648ULL, 0xE222D403120030A1ULL } }, /* XSUM_XXH128_testdata[4286] */\n    { 1429, 0x0000000000000000ULL, { 0x21EBCAFFD57F2956ULL, 0xB601824AE6F6C766ULL } }, /* XSUM_XXH128_testdata[4287] */\n    { 1429, 0x000000009E3779B1ULL, { 0x787840C2D23063C8ULL, 0x894D3CEDB4D06990ULL } }, /* XSUM_XXH128_testdata[4288] */\n    { 1429, 0x9E3779B185EBCA8DULL, { 0x2447CC428E1293DCULL, 0x62F09396BADE53E9ULL } }, /* XSUM_XXH128_testdata[4289] */\n    { 1430, 0x0000000000000000ULL, { 0x5E104F68A70661BEULL, 0xB62AE732167AB6DEULL } }, /* XSUM_XXH128_testdata[4290] */\n    { 1430, 0x000000009E3779B1ULL, { 0xBBC2B093B332A124ULL, 0x2E8FF7385B2FF66FULL } }, /* XSUM_XXH128_testdata[4291] */\n    { 1430, 0x9E3779B185EBCA8DULL, { 0x393522B30920D796ULL, 0xC6DEDC45B0E3086BULL } }, /* XSUM_XXH128_testdata[4292] */\n    { 1431, 0x0000000000000000ULL, { 0x2B6669B122112FF1ULL, 0x5C09731BD27145E5ULL } }, /* XSUM_XXH128_testdata[4293] */\n    { 1431, 0x000000009E3779B1ULL, { 0xDA4F49EBBBA9F394ULL, 0x7CE87F503D78FDE6ULL } }, /* XSUM_XXH128_testdata[4294] */\n    { 1431, 0x9E3779B185EBCA8DULL, { 0xC3567F2F7E4629AEULL, 0x9C3DE16E3BA8B8CEULL } }, /* XSUM_XXH128_testdata[4295] */\n    { 1432, 0x0000000000000000ULL, { 0x03CC3AFF607E56B6ULL, 0x7C3F5F6AE95E4261ULL } }, /* XSUM_XXH128_testdata[4296] */\n    { 1432, 0x000000009E3779B1ULL, { 0x6165AD709130EB2CULL, 0xF19AED3ABA798F6DULL } }, /* XSUM_XXH128_testdata[4297] */\n    { 1432, 0x9E3779B185EBCA8DULL, { 0xB1644A59218014A3ULL, 0x3E7768B32C95DA9CULL } }, /* XSUM_XXH128_testdata[4298] */\n    { 1433, 0x0000000000000000ULL, { 0xED897754BF1BB643ULL, 0x7343562398E5AE31ULL } }, /* XSUM_XXH128_testdata[4299] */\n    { 1433, 0x000000009E3779B1ULL, { 0xE293D35F1767F98FULL, 0xD92243BA612E5C72ULL } }, /* XSUM_XXH128_testdata[4300] */\n    { 1433, 0x9E3779B185EBCA8DULL, { 0x89AC2C7514B7094EULL, 0xD6DE5F1DC1EC9FB7ULL } }, /* XSUM_XXH128_testdata[4301] */\n    { 1434, 0x0000000000000000ULL, { 0x1E6146A8C2663D38ULL, 0xE8A3FA27FAF6F7CFULL } }, /* XSUM_XXH128_testdata[4302] */\n    { 1434, 0x000000009E3779B1ULL, { 0xD16727348329314DULL, 0x2BB4D419F830683CULL } }, /* XSUM_XXH128_testdata[4303] */\n    { 1434, 0x9E3779B185EBCA8DULL, { 0x104E86E354C91BAAULL, 0xE5049854966B37BBULL } }, /* XSUM_XXH128_testdata[4304] */\n    { 1435, 0x0000000000000000ULL, { 0xEA4A52BF4A45BF2AULL, 0x012BE6E6DF7C4601ULL } }, /* XSUM_XXH128_testdata[4305] */\n    { 1435, 0x000000009E3779B1ULL, { 0x2FE68B3E2CCA9737ULL, 0x46FB9A1A53389E7AULL } }, /* XSUM_XXH128_testdata[4306] */\n    { 1435, 0x9E3779B185EBCA8DULL, { 0x32A2D9C12A144029ULL, 0xC6C7DCDDDF6F5A84ULL } }, /* XSUM_XXH128_testdata[4307] */\n    { 1436, 0x0000000000000000ULL, { 0x72EE45F76D09715DULL, 0xA96754711151A8BDULL } }, /* XSUM_XXH128_testdata[4308] */\n    { 1436, 0x000000009E3779B1ULL, { 0x59D1FB0F9BDEBB83ULL, 0x415AC9558E540B63ULL } }, /* XSUM_XXH128_testdata[4309] */\n    { 1436, 0x9E3779B185EBCA8DULL, { 0x63127F6A73DC254CULL, 0xA678AC39A9C88D83ULL } }, /* XSUM_XXH128_testdata[4310] */\n    { 1437, 0x0000000000000000ULL, { 0x06C24FB6DF4AB655ULL, 0xA98C62CC0EB6AEFEULL } }, /* XSUM_XXH128_testdata[4311] */\n    { 1437, 0x000000009E3779B1ULL, { 0x3A5739C051F2B0F9ULL, 0x1FDE36F5464EE5BFULL } }, /* XSUM_XXH128_testdata[4312] */\n    { 1437, 0x9E3779B185EBCA8DULL, { 0xA82117607BBF2E21ULL, 0x713E76D8098C3631ULL } }, /* XSUM_XXH128_testdata[4313] */\n    { 1438, 0x0000000000000000ULL, { 0xCAC79B306F1064CDULL, 0x9AB14ECA75E52D7AULL } }, /* XSUM_XXH128_testdata[4314] */\n    { 1438, 0x000000009E3779B1ULL, { 0xAABE99E7E0D23913ULL, 0xBB324ED96D3595C6ULL } }, /* XSUM_XXH128_testdata[4315] */\n    { 1438, 0x9E3779B185EBCA8DULL, { 0x312B5316313F08DCULL, 0xF118B8A74476AF30ULL } }, /* XSUM_XXH128_testdata[4316] */\n    { 1439, 0x0000000000000000ULL, { 0xE3602478268DB39BULL, 0x87AA5BBEEC73A4D8ULL } }, /* XSUM_XXH128_testdata[4317] */\n    { 1439, 0x000000009E3779B1ULL, { 0x8359A18F17F4F36DULL, 0xE03BF7089CC64E4FULL } }, /* XSUM_XXH128_testdata[4318] */\n    { 1439, 0x9E3779B185EBCA8DULL, { 0xF9E83E68AA8FC5BDULL, 0xB5D9C749DEE97595ULL } }, /* XSUM_XXH128_testdata[4319] */\n    { 1440, 0x0000000000000000ULL, { 0xD7934FC97AB126FFULL, 0x84A7D8D782899BDDULL } }, /* XSUM_XXH128_testdata[4320] */\n    { 1440, 0x000000009E3779B1ULL, { 0xBE7390D5AD285CDBULL, 0x0AA026031229A055ULL } }, /* XSUM_XXH128_testdata[4321] */\n    { 1440, 0x9E3779B185EBCA8DULL, { 0x3F08BAC07209501EULL, 0x305785EBCD56C59CULL } }, /* XSUM_XXH128_testdata[4322] */\n    { 1441, 0x0000000000000000ULL, { 0xFCBAA4F5A7241C67ULL, 0x1393859BBB1BB9B7ULL } }, /* XSUM_XXH128_testdata[4323] */\n    { 1441, 0x000000009E3779B1ULL, { 0x248556380E8BF43FULL, 0xE05BE9D47D9D1268ULL } }, /* XSUM_XXH128_testdata[4324] */\n    { 1441, 0x9E3779B185EBCA8DULL, { 0xD94ED4BAB6EA7453ULL, 0xFD372CB096935AF2ULL } }, /* XSUM_XXH128_testdata[4325] */\n    { 1442, 0x0000000000000000ULL, { 0xE76C27C6CA4BE8BEULL, 0x9A378FB1506C679FULL } }, /* XSUM_XXH128_testdata[4326] */\n    { 1442, 0x000000009E3779B1ULL, { 0xFD766E6F6B703278ULL, 0x9AFDE9B6C3FDA57CULL } }, /* XSUM_XXH128_testdata[4327] */\n    { 1442, 0x9E3779B185EBCA8DULL, { 0xAAE2ECC4A650576DULL, 0x867D56D5D1FFAE7AULL } }, /* XSUM_XXH128_testdata[4328] */\n    { 1443, 0x0000000000000000ULL, { 0xE21B11C1BBEF493BULL, 0xD06B1253F67859B9ULL } }, /* XSUM_XXH128_testdata[4329] */\n    { 1443, 0x000000009E3779B1ULL, { 0xDBFB5DAC64A90271ULL, 0x67F7346ADEEE7A65ULL } }, /* XSUM_XXH128_testdata[4330] */\n    { 1443, 0x9E3779B185EBCA8DULL, { 0x7F0A0CA77337B6DDULL, 0x3823DFAE868E4D1DULL } }, /* XSUM_XXH128_testdata[4331] */\n    { 1444, 0x0000000000000000ULL, { 0xED46566D24575C36ULL, 0x87F6E9A422D53201ULL } }, /* XSUM_XXH128_testdata[4332] */\n    { 1444, 0x000000009E3779B1ULL, { 0x7B7833B3D9A18ECCULL, 0x6AD23F41A90B06E2ULL } }, /* XSUM_XXH128_testdata[4333] */\n    { 1444, 0x9E3779B185EBCA8DULL, { 0x9875F54079C58BE0ULL, 0x710F2E888A58C198ULL } }, /* XSUM_XXH128_testdata[4334] */\n    { 1445, 0x0000000000000000ULL, { 0x3021E8B6EE5E412DULL, 0x51F68859D528E771ULL } }, /* XSUM_XXH128_testdata[4335] */\n    { 1445, 0x000000009E3779B1ULL, { 0x4143BBA3FFFACFF4ULL, 0x4021B0A297DFF463ULL } }, /* XSUM_XXH128_testdata[4336] */\n    { 1445, 0x9E3779B185EBCA8DULL, { 0x51590DA933C29CE4ULL, 0x629575B6F3167A7AULL } }, /* XSUM_XXH128_testdata[4337] */\n    { 1446, 0x0000000000000000ULL, { 0x5DAC63789A9A5CF8ULL, 0xD1AEB819E4135DE7ULL } }, /* XSUM_XXH128_testdata[4338] */\n    { 1446, 0x000000009E3779B1ULL, { 0xC2D4DEA032CA2CC3ULL, 0x74015AC8D1C0EABCULL } }, /* XSUM_XXH128_testdata[4339] */\n    { 1446, 0x9E3779B185EBCA8DULL, { 0xD25978C5B20C501AULL, 0xB90E2404D4C439E8ULL } }, /* XSUM_XXH128_testdata[4340] */\n    { 1447, 0x0000000000000000ULL, { 0x2623F8B9FA9144FFULL, 0x6A2DCE9B7EE5B3C6ULL } }, /* XSUM_XXH128_testdata[4341] */\n    { 1447, 0x000000009E3779B1ULL, { 0xF6EA2827F5B6F8D8ULL, 0x80027529184735A8ULL } }, /* XSUM_XXH128_testdata[4342] */\n    { 1447, 0x9E3779B185EBCA8DULL, { 0x4A970D000F478705ULL, 0xCCCEA803DE3F0D83ULL } }, /* XSUM_XXH128_testdata[4343] */\n    { 1448, 0x0000000000000000ULL, { 0x4D76CE7CF9FBAB5CULL, 0x6728252C9055C4F4ULL } }, /* XSUM_XXH128_testdata[4344] */\n    { 1448, 0x000000009E3779B1ULL, { 0x2E004E243B607A42ULL, 0x08838844ECB3C008ULL } }, /* XSUM_XXH128_testdata[4345] */\n    { 1448, 0x9E3779B185EBCA8DULL, { 0x00DB1D4D082EC71AULL, 0xF761091BBEF7C08DULL } }, /* XSUM_XXH128_testdata[4346] */\n    { 1449, 0x0000000000000000ULL, { 0x06688FEC0772674DULL, 0x881BFFF1DD6BA7FCULL } }, /* XSUM_XXH128_testdata[4347] */\n    { 1449, 0x000000009E3779B1ULL, { 0x4A57DB21E21E2E86ULL, 0x66339AB5D36F64EDULL } }, /* XSUM_XXH128_testdata[4348] */\n    { 1449, 0x9E3779B185EBCA8DULL, { 0xE988345D128FC527ULL, 0x92868270ECABB764ULL } }, /* XSUM_XXH128_testdata[4349] */\n    { 1450, 0x0000000000000000ULL, { 0xF4E59132522B56FDULL, 0xB0A3DEFE55FE786AULL } }, /* XSUM_XXH128_testdata[4350] */\n    { 1450, 0x000000009E3779B1ULL, { 0xA9ECA973AA08D288ULL, 0x116F6BEDDE5B3258ULL } }, /* XSUM_XXH128_testdata[4351] */\n    { 1450, 0x9E3779B185EBCA8DULL, { 0xD8D4B2687F22F6A9ULL, 0xB6B5B39570B1129FULL } }, /* XSUM_XXH128_testdata[4352] */\n    { 1451, 0x0000000000000000ULL, { 0x54462278DA1DA4B8ULL, 0xC31A6E2BA10834B9ULL } }, /* XSUM_XXH128_testdata[4353] */\n    { 1451, 0x000000009E3779B1ULL, { 0x012AE75C359EAF49ULL, 0xF83B2028C68F26E5ULL } }, /* XSUM_XXH128_testdata[4354] */\n    { 1451, 0x9E3779B185EBCA8DULL, { 0x2224F0ABB8490DF3ULL, 0xF11928DA2AA79C66ULL } }, /* XSUM_XXH128_testdata[4355] */\n    { 1452, 0x0000000000000000ULL, { 0xB3A19773EEAC82A7ULL, 0xFAC7938AD63764E0ULL } }, /* XSUM_XXH128_testdata[4356] */\n    { 1452, 0x000000009E3779B1ULL, { 0x9090D7FC0DD5FEA3ULL, 0x8EF85B6DF55FDF79ULL } }, /* XSUM_XXH128_testdata[4357] */\n    { 1452, 0x9E3779B185EBCA8DULL, { 0xB99C5F0B89671EA4ULL, 0x5EAC0F313702BF49ULL } }, /* XSUM_XXH128_testdata[4358] */\n    { 1453, 0x0000000000000000ULL, { 0x1AFB91A51D617EEEULL, 0xDD92B0C2C21D463CULL } }, /* XSUM_XXH128_testdata[4359] */\n    { 1453, 0x000000009E3779B1ULL, { 0xA0A243584991C569ULL, 0x7DA597662D2EAE27ULL } }, /* XSUM_XXH128_testdata[4360] */\n    { 1453, 0x9E3779B185EBCA8DULL, { 0xD21CE74CA12BBD50ULL, 0xA30F24C8C1145023ULL } }, /* XSUM_XXH128_testdata[4361] */\n    { 1454, 0x0000000000000000ULL, { 0xCE4632E7365279ADULL, 0x7DA084E7E819CDB3ULL } }, /* XSUM_XXH128_testdata[4362] */\n    { 1454, 0x000000009E3779B1ULL, { 0xD343BC11A99FA152ULL, 0xC95EA22BD0D5326EULL } }, /* XSUM_XXH128_testdata[4363] */\n    { 1454, 0x9E3779B185EBCA8DULL, { 0x12B4779302392D0BULL, 0x51AF91578B50115AULL } }, /* XSUM_XXH128_testdata[4364] */\n    { 1455, 0x0000000000000000ULL, { 0xC29098E5A3A25E75ULL, 0x40C46FB42ED84CBCULL } }, /* XSUM_XXH128_testdata[4365] */\n    { 1455, 0x000000009E3779B1ULL, { 0x853C35F68E6C0D3FULL, 0xD447AF9FA3CC7847ULL } }, /* XSUM_XXH128_testdata[4366] */\n    { 1455, 0x9E3779B185EBCA8DULL, { 0x2D375331BC9B3F24ULL, 0xBB722682F6333A68ULL } }, /* XSUM_XXH128_testdata[4367] */\n    { 1456, 0x0000000000000000ULL, { 0x5FFB14BD3D509415ULL, 0xF2A5D551A3AF1C0DULL } }, /* XSUM_XXH128_testdata[4368] */\n    { 1456, 0x000000009E3779B1ULL, { 0x29DFF253236412C4ULL, 0x391D3F27F01A3FF7ULL } }, /* XSUM_XXH128_testdata[4369] */\n    { 1456, 0x9E3779B185EBCA8DULL, { 0xA8D557A5145B471BULL, 0xA6219A7486586EE2ULL } }, /* XSUM_XXH128_testdata[4370] */\n    { 1457, 0x0000000000000000ULL, { 0x85D5CCCE24F8797AULL, 0xB5A3F77B8BA85493ULL } }, /* XSUM_XXH128_testdata[4371] */\n    { 1457, 0x000000009E3779B1ULL, { 0xDFB3872FDA26F86FULL, 0x90B4491F2679306EULL } }, /* XSUM_XXH128_testdata[4372] */\n    { 1457, 0x9E3779B185EBCA8DULL, { 0x0668F51F65318559ULL, 0xC5C8A25E7EC2E789ULL } }, /* XSUM_XXH128_testdata[4373] */\n    { 1458, 0x0000000000000000ULL, { 0xBDC9FBA2A2AE6050ULL, 0xF490B7BA862844C1ULL } }, /* XSUM_XXH128_testdata[4374] */\n    { 1458, 0x000000009E3779B1ULL, { 0xF85E26A2978F5EB8ULL, 0x62DD33ED0046863CULL } }, /* XSUM_XXH128_testdata[4375] */\n    { 1458, 0x9E3779B185EBCA8DULL, { 0x16A4C29F94CA66EAULL, 0x70C0A710397196E3ULL } }, /* XSUM_XXH128_testdata[4376] */\n    { 1459, 0x0000000000000000ULL, { 0x811A9CBAED802D8BULL, 0x8C47C1EDF650C62BULL } }, /* XSUM_XXH128_testdata[4377] */\n    { 1459, 0x000000009E3779B1ULL, { 0x03B40D9AEB441E9DULL, 0x177A962F8545DC00ULL } }, /* XSUM_XXH128_testdata[4378] */\n    { 1459, 0x9E3779B185EBCA8DULL, { 0xB6E74313E859C393ULL, 0x96F3AF9C8F2A1CB9ULL } }, /* XSUM_XXH128_testdata[4379] */\n    { 1460, 0x0000000000000000ULL, { 0x6AD8A4148AC21A54ULL, 0xD71628E7FFE083A7ULL } }, /* XSUM_XXH128_testdata[4380] */\n    { 1460, 0x000000009E3779B1ULL, { 0x41472F4F8A9BE290ULL, 0xF59E3231BFA816B3ULL } }, /* XSUM_XXH128_testdata[4381] */\n    { 1460, 0x9E3779B185EBCA8DULL, { 0x149507C74DC85025ULL, 0x553494C745020CDEULL } }, /* XSUM_XXH128_testdata[4382] */\n    { 1461, 0x0000000000000000ULL, { 0xFFBADF33A137B1A5ULL, 0xA5999C8A10801B9AULL } }, /* XSUM_XXH128_testdata[4383] */\n    { 1461, 0x000000009E3779B1ULL, { 0x8677AAC46D92F307ULL, 0x24319D03101CC339ULL } }, /* XSUM_XXH128_testdata[4384] */\n    { 1461, 0x9E3779B185EBCA8DULL, { 0xE484358F190B97ABULL, 0xEE58A05BFA5DCE00ULL } }, /* XSUM_XXH128_testdata[4385] */\n    { 1462, 0x0000000000000000ULL, { 0x30F78921C660D6C9ULL, 0xA7E841328F188336ULL } }, /* XSUM_XXH128_testdata[4386] */\n    { 1462, 0x000000009E3779B1ULL, { 0xD6E5BABC9689B023ULL, 0xE5CFA2C360969535ULL } }, /* XSUM_XXH128_testdata[4387] */\n    { 1462, 0x9E3779B185EBCA8DULL, { 0xD854E89102D7F820ULL, 0x53BEA06E58C1D264ULL } }, /* XSUM_XXH128_testdata[4388] */\n    { 1463, 0x0000000000000000ULL, { 0x979DD668D22ACD1BULL, 0xBE82B3ED00D10013ULL } }, /* XSUM_XXH128_testdata[4389] */\n    { 1463, 0x000000009E3779B1ULL, { 0xBE913FA421941A79ULL, 0x05B5C50C4E2DCE97ULL } }, /* XSUM_XXH128_testdata[4390] */\n    { 1463, 0x9E3779B185EBCA8DULL, { 0x84F358112A7A9A9DULL, 0x3926C7EB79A36FC1ULL } }, /* XSUM_XXH128_testdata[4391] */\n    { 1464, 0x0000000000000000ULL, { 0xF5016DB3AE992C23ULL, 0x9B5FA5578DFE2EC6ULL } }, /* XSUM_XXH128_testdata[4392] */\n    { 1464, 0x000000009E3779B1ULL, { 0x24EC254C97820B45ULL, 0xB59EDE5760FA7A05ULL } }, /* XSUM_XXH128_testdata[4393] */\n    { 1464, 0x9E3779B185EBCA8DULL, { 0xC7BEAD8B36AFD2A1ULL, 0xE10B3ABB3AC8A454ULL } }, /* XSUM_XXH128_testdata[4394] */\n    { 1465, 0x0000000000000000ULL, { 0x7EB14336702690E8ULL, 0x61009D011DB15D8EULL } }, /* XSUM_XXH128_testdata[4395] */\n    { 1465, 0x000000009E3779B1ULL, { 0x565E4A62F4C3CE22ULL, 0xEA0405BDE907C5F8ULL } }, /* XSUM_XXH128_testdata[4396] */\n    { 1465, 0x9E3779B185EBCA8DULL, { 0x508C9253021A59B7ULL, 0xFC1F28F97A39201FULL } }, /* XSUM_XXH128_testdata[4397] */\n    { 1466, 0x0000000000000000ULL, { 0x2892C34695634315ULL, 0x868FEEB71006A169ULL } }, /* XSUM_XXH128_testdata[4398] */\n    { 1466, 0x000000009E3779B1ULL, { 0x09B5074DEF8F5783ULL, 0x13BE3059E23A3BB0ULL } }, /* XSUM_XXH128_testdata[4399] */\n    { 1466, 0x9E3779B185EBCA8DULL, { 0x6C4447F74073B981ULL, 0x097EC4008903B6C2ULL } }, /* XSUM_XXH128_testdata[4400] */\n    { 1467, 0x0000000000000000ULL, { 0x293047331A699254ULL, 0xEE50A4050E22D8B0ULL } }, /* XSUM_XXH128_testdata[4401] */\n    { 1467, 0x000000009E3779B1ULL, { 0xDADC005833152900ULL, 0xB7B8AA301F6CAD3BULL } }, /* XSUM_XXH128_testdata[4402] */\n    { 1467, 0x9E3779B185EBCA8DULL, { 0xA5165A4043BA66A9ULL, 0x9C99DE4435B87B16ULL } }, /* XSUM_XXH128_testdata[4403] */\n    { 1468, 0x0000000000000000ULL, { 0xE4DC1418E120908CULL, 0x1585CF74D395438FULL } }, /* XSUM_XXH128_testdata[4404] */\n    { 1468, 0x000000009E3779B1ULL, { 0xF3D373CDC3B312D2ULL, 0x5C458B931409171DULL } }, /* XSUM_XXH128_testdata[4405] */\n    { 1468, 0x9E3779B185EBCA8DULL, { 0x0DC5731C7B6AD8D0ULL, 0x4E18C2093B55FDCFULL } }, /* XSUM_XXH128_testdata[4406] */\n    { 1469, 0x0000000000000000ULL, { 0x4642D4D698A17F79ULL, 0x4DD9BFA2213146A2ULL } }, /* XSUM_XXH128_testdata[4407] */\n    { 1469, 0x000000009E3779B1ULL, { 0xB50841F865EEB6F9ULL, 0xF7F0B46D8C332267ULL } }, /* XSUM_XXH128_testdata[4408] */\n    { 1469, 0x9E3779B185EBCA8DULL, { 0xD8AF9E9DE8B28A4FULL, 0xB151C84353D1DC9EULL } }, /* XSUM_XXH128_testdata[4409] */\n    { 1470, 0x0000000000000000ULL, { 0xCB98A643075C06C9ULL, 0xCD40308CD6169031ULL } }, /* XSUM_XXH128_testdata[4410] */\n    { 1470, 0x000000009E3779B1ULL, { 0x83CE016CE740632FULL, 0x4190201480DCD7ADULL } }, /* XSUM_XXH128_testdata[4411] */\n    { 1470, 0x9E3779B185EBCA8DULL, { 0x5DF1BAB3FEF00B22ULL, 0xBAF2E867AA518DBFULL } }, /* XSUM_XXH128_testdata[4412] */\n    { 1471, 0x0000000000000000ULL, { 0x79B1BB9B9D6BE112ULL, 0x45D8AE3FC082686AULL } }, /* XSUM_XXH128_testdata[4413] */\n    { 1471, 0x000000009E3779B1ULL, { 0x413CF3FBCC052C44ULL, 0xAB6B64494D2E86B0ULL } }, /* XSUM_XXH128_testdata[4414] */\n    { 1471, 0x9E3779B185EBCA8DULL, { 0x19B0A6B12B2D48FFULL, 0x89E40BA64A1C09DEULL } }, /* XSUM_XXH128_testdata[4415] */\n    { 1472, 0x0000000000000000ULL, { 0x74BC4C2C12AC495EULL, 0x3A2731BDD424EB9EULL } }, /* XSUM_XXH128_testdata[4416] */\n    { 1472, 0x000000009E3779B1ULL, { 0x61894BCD6D784328ULL, 0x6A4E56166216B916ULL } }, /* XSUM_XXH128_testdata[4417] */\n    { 1472, 0x9E3779B185EBCA8DULL, { 0x12B583A1EA56608DULL, 0xDFB69B44852511B4ULL } }, /* XSUM_XXH128_testdata[4418] */\n    { 1473, 0x0000000000000000ULL, { 0xE051FE60AEDCF9AEULL, 0xE4328CE1C5566558ULL } }, /* XSUM_XXH128_testdata[4419] */\n    { 1473, 0x000000009E3779B1ULL, { 0x78AC7ACB096ADB30ULL, 0x460E89123CB6C762ULL } }, /* XSUM_XXH128_testdata[4420] */\n    { 1473, 0x9E3779B185EBCA8DULL, { 0x6C18643991DD1604ULL, 0x66D0D37C71B14DF2ULL } }, /* XSUM_XXH128_testdata[4421] */\n    { 1474, 0x0000000000000000ULL, { 0x09003EF11C39F08DULL, 0x6081105251A28702ULL } }, /* XSUM_XXH128_testdata[4422] */\n    { 1474, 0x000000009E3779B1ULL, { 0x407D3FEE5C6C32C0ULL, 0xCAE0572E490AA350ULL } }, /* XSUM_XXH128_testdata[4423] */\n    { 1474, 0x9E3779B185EBCA8DULL, { 0xF0ED526263798652ULL, 0xF6606EBC20465B57ULL } }, /* XSUM_XXH128_testdata[4424] */\n    { 1475, 0x0000000000000000ULL, { 0x9936DBC1FDD89AE9ULL, 0xCF9F829ACBA843C2ULL } }, /* XSUM_XXH128_testdata[4425] */\n    { 1475, 0x000000009E3779B1ULL, { 0xD7630BA970E4E30EULL, 0x55DFBAE8BAFDC3BFULL } }, /* XSUM_XXH128_testdata[4426] */\n    { 1475, 0x9E3779B185EBCA8DULL, { 0x5BE18236A136D55AULL, 0x046E8F4684AEDD40ULL } }, /* XSUM_XXH128_testdata[4427] */\n    { 1476, 0x0000000000000000ULL, { 0x1D8C65FE0EF623C5ULL, 0x16B6245BC55AF7CCULL } }, /* XSUM_XXH128_testdata[4428] */\n    { 1476, 0x000000009E3779B1ULL, { 0x6AFCF9F446AD4A19ULL, 0x8C62C38D8DE893DFULL } }, /* XSUM_XXH128_testdata[4429] */\n    { 1476, 0x9E3779B185EBCA8DULL, { 0x04B3474EB1616A70ULL, 0x8168296003E987CFULL } }, /* XSUM_XXH128_testdata[4430] */\n    { 1477, 0x0000000000000000ULL, { 0x2F7C6F94146B62DEULL, 0x732591929838A43FULL } }, /* XSUM_XXH128_testdata[4431] */\n    { 1477, 0x000000009E3779B1ULL, { 0x43896D70B36EB406ULL, 0xA14468C3F9581757ULL } }, /* XSUM_XXH128_testdata[4432] */\n    { 1477, 0x9E3779B185EBCA8DULL, { 0xD8444BA66D29A5D1ULL, 0x28E10B27D08AB5C8ULL } }, /* XSUM_XXH128_testdata[4433] */\n    { 1478, 0x0000000000000000ULL, { 0xCD55942E733C8DE0ULL, 0x4C0EDA78104D5A43ULL } }, /* XSUM_XXH128_testdata[4434] */\n    { 1478, 0x000000009E3779B1ULL, { 0xAD42C54AC7B76127ULL, 0x04AF2EBC62885E64ULL } }, /* XSUM_XXH128_testdata[4435] */\n    { 1478, 0x9E3779B185EBCA8DULL, { 0xD71D23526A3E272BULL, 0x3725FB1C6F59083BULL } }, /* XSUM_XXH128_testdata[4436] */\n    { 1479, 0x0000000000000000ULL, { 0x8C2429B7DCE7F860ULL, 0xE33E7EF854C8510FULL } }, /* XSUM_XXH128_testdata[4437] */\n    { 1479, 0x000000009E3779B1ULL, { 0xCB435818DBF74721ULL, 0x5BCC7A7D965EF605ULL } }, /* XSUM_XXH128_testdata[4438] */\n    { 1479, 0x9E3779B185EBCA8DULL, { 0x0473B8054CD908FDULL, 0x325ACEED255C567BULL } }, /* XSUM_XXH128_testdata[4439] */\n    { 1480, 0x0000000000000000ULL, { 0xE21FD7795401C634ULL, 0x8DA62CD69655AD8FULL } }, /* XSUM_XXH128_testdata[4440] */\n    { 1480, 0x000000009E3779B1ULL, { 0xC6EEE812B0A3C2C7ULL, 0x20B2B1E77148DA22ULL } }, /* XSUM_XXH128_testdata[4441] */\n    { 1480, 0x9E3779B185EBCA8DULL, { 0x47C114BB0C7D7EDBULL, 0xCE5BFA208AA5521DULL } }, /* XSUM_XXH128_testdata[4442] */\n    { 1481, 0x0000000000000000ULL, { 0xF096DD223E26115FULL, 0x6996C3D4A05ED75AULL } }, /* XSUM_XXH128_testdata[4443] */\n    { 1481, 0x000000009E3779B1ULL, { 0xF4A2C2A7BA8E7E2AULL, 0xCD666468EF156B17ULL } }, /* XSUM_XXH128_testdata[4444] */\n    { 1481, 0x9E3779B185EBCA8DULL, { 0x8A69CF11AA97BC34ULL, 0x53D4898A5C034BEEULL } }, /* XSUM_XXH128_testdata[4445] */\n    { 1482, 0x0000000000000000ULL, { 0xA9FA0742AC0FD4F7ULL, 0xBBDE271E493A7AC5ULL } }, /* XSUM_XXH128_testdata[4446] */\n    { 1482, 0x000000009E3779B1ULL, { 0x907C232BDA385000ULL, 0x4C1969D5F38253C0ULL } }, /* XSUM_XXH128_testdata[4447] */\n    { 1482, 0x9E3779B185EBCA8DULL, { 0x766AF0B6A5BD3DCBULL, 0xC3FBEC4EC3F03C13ULL } }, /* XSUM_XXH128_testdata[4448] */\n    { 1483, 0x0000000000000000ULL, { 0x4092AA711BFA938AULL, 0x0C732CA4D3BC5504ULL } }, /* XSUM_XXH128_testdata[4449] */\n    { 1483, 0x000000009E3779B1ULL, { 0xFA47FAFE7FA9D40CULL, 0xA3C56EAFBD7CCADCULL } }, /* XSUM_XXH128_testdata[4450] */\n    { 1483, 0x9E3779B185EBCA8DULL, { 0x47763A99757174A8ULL, 0xFAFEFF20424F4B1FULL } }, /* XSUM_XXH128_testdata[4451] */\n    { 1484, 0x0000000000000000ULL, { 0xD5005D2548949930ULL, 0xCF7A3E729579DCCDULL } }, /* XSUM_XXH128_testdata[4452] */\n    { 1484, 0x000000009E3779B1ULL, { 0xF6843866B3C9BDE1ULL, 0xEFBFF2DDE5D6AA57ULL } }, /* XSUM_XXH128_testdata[4453] */\n    { 1484, 0x9E3779B185EBCA8DULL, { 0x6630EFBD744FB866ULL, 0xE5B7DCFE1D8B3413ULL } }, /* XSUM_XXH128_testdata[4454] */\n    { 1485, 0x0000000000000000ULL, { 0x4E7A0172C536C828ULL, 0x203F4426083DF25CULL } }, /* XSUM_XXH128_testdata[4455] */\n    { 1485, 0x000000009E3779B1ULL, { 0xD7AC6ADD0F2D932CULL, 0x93A338BE43200DC0ULL } }, /* XSUM_XXH128_testdata[4456] */\n    { 1485, 0x9E3779B185EBCA8DULL, { 0x933E1A4ADDE0BF1FULL, 0x640DF5154ED05F08ULL } }, /* XSUM_XXH128_testdata[4457] */\n    { 1486, 0x0000000000000000ULL, { 0x4AECD3EB1D90FFF5ULL, 0xAA185C93D2B63C2BULL } }, /* XSUM_XXH128_testdata[4458] */\n    { 1486, 0x000000009E3779B1ULL, { 0xC89D04E290B9FB10ULL, 0x71A68E7A819D4CB2ULL } }, /* XSUM_XXH128_testdata[4459] */\n    { 1486, 0x9E3779B185EBCA8DULL, { 0xDE9AA36BEA3A70AEULL, 0x531DE7D2DBB1213EULL } }, /* XSUM_XXH128_testdata[4460] */\n    { 1487, 0x0000000000000000ULL, { 0x7B05488EC3CDF4D5ULL, 0xC570BFEE5D1604A6ULL } }, /* XSUM_XXH128_testdata[4461] */\n    { 1487, 0x000000009E3779B1ULL, { 0xF49C7F4285C28C60ULL, 0x9BA5540A8E6033FCULL } }, /* XSUM_XXH128_testdata[4462] */\n    { 1487, 0x9E3779B185EBCA8DULL, { 0x27A7A69A624AD291ULL, 0x8C4A60226417E6EFULL } }, /* XSUM_XXH128_testdata[4463] */\n    { 1488, 0x0000000000000000ULL, { 0xD3380C038A278925ULL, 0x22658A960279355DULL } }, /* XSUM_XXH128_testdata[4464] */\n    { 1488, 0x000000009E3779B1ULL, { 0xD326C503D397C59FULL, 0x56418B9DBDA2425CULL } }, /* XSUM_XXH128_testdata[4465] */\n    { 1488, 0x9E3779B185EBCA8DULL, { 0x55E8264E8D659620ULL, 0xF7D1D4172F188408ULL } }, /* XSUM_XXH128_testdata[4466] */\n    { 1489, 0x0000000000000000ULL, { 0xE19CEE4A952E1CA0ULL, 0xE1F882E341CEA031ULL } }, /* XSUM_XXH128_testdata[4467] */\n    { 1489, 0x000000009E3779B1ULL, { 0x98E7F3504213684CULL, 0xB22552E2A93A7C8AULL } }, /* XSUM_XXH128_testdata[4468] */\n    { 1489, 0x9E3779B185EBCA8DULL, { 0x3582584D628E05EEULL, 0x2BCD25648FBDAD85ULL } }, /* XSUM_XXH128_testdata[4469] */\n    { 1490, 0x0000000000000000ULL, { 0x4D35BFCF407857E1ULL, 0xB501898AC842B45FULL } }, /* XSUM_XXH128_testdata[4470] */\n    { 1490, 0x000000009E3779B1ULL, { 0x05642730D9389475ULL, 0x92154E417AD0E349ULL } }, /* XSUM_XXH128_testdata[4471] */\n    { 1490, 0x9E3779B185EBCA8DULL, { 0x4189A85073F06185ULL, 0x11C393F46078E67DULL } }, /* XSUM_XXH128_testdata[4472] */\n    { 1491, 0x0000000000000000ULL, { 0xD130B31D73F3FD81ULL, 0xDFAFAFD26813E772ULL } }, /* XSUM_XXH128_testdata[4473] */\n    { 1491, 0x000000009E3779B1ULL, { 0x2387FC1E4BD1C93EULL, 0x5C5E37EFBFFBCBC2ULL } }, /* XSUM_XXH128_testdata[4474] */\n    { 1491, 0x9E3779B185EBCA8DULL, { 0xE605EE721E5FDE0BULL, 0x8B16C58CC45D2452ULL } }, /* XSUM_XXH128_testdata[4475] */\n    { 1492, 0x0000000000000000ULL, { 0x01CEBBB047583AEAULL, 0x257224644669BD9BULL } }, /* XSUM_XXH128_testdata[4476] */\n    { 1492, 0x000000009E3779B1ULL, { 0xC27B457497E64E3BULL, 0xBE4E2D2EB7DA68A1ULL } }, /* XSUM_XXH128_testdata[4477] */\n    { 1492, 0x9E3779B185EBCA8DULL, { 0x94F6C7631CA71A2CULL, 0x2E23FEA9C0F31856ULL } }, /* XSUM_XXH128_testdata[4478] */\n    { 1493, 0x0000000000000000ULL, { 0xDA85838A26F331A5ULL, 0x9D36D342EFF0A526ULL } }, /* XSUM_XXH128_testdata[4479] */\n    { 1493, 0x000000009E3779B1ULL, { 0xCFE9E5CC65EC1024ULL, 0x3853035B54C0619EULL } }, /* XSUM_XXH128_testdata[4480] */\n    { 1493, 0x9E3779B185EBCA8DULL, { 0xE01B5B4A1037713CULL, 0xB128012F9733BEECULL } }, /* XSUM_XXH128_testdata[4481] */\n    { 1494, 0x0000000000000000ULL, { 0xA39241F8DFA65384ULL, 0x454680FEA3723158ULL } }, /* XSUM_XXH128_testdata[4482] */\n    { 1494, 0x000000009E3779B1ULL, { 0x34668812B0E8CC97ULL, 0x57B73762E6D97F44ULL } }, /* XSUM_XXH128_testdata[4483] */\n    { 1494, 0x9E3779B185EBCA8DULL, { 0xE248BEBC53F14552ULL, 0x031B440999771657ULL } }, /* XSUM_XXH128_testdata[4484] */\n    { 1495, 0x0000000000000000ULL, { 0xF543D7718BAAFD5DULL, 0xAE40C91799D67612ULL } }, /* XSUM_XXH128_testdata[4485] */\n    { 1495, 0x000000009E3779B1ULL, { 0x72497B32DED25765ULL, 0x55C74386565D7BECULL } }, /* XSUM_XXH128_testdata[4486] */\n    { 1495, 0x9E3779B185EBCA8DULL, { 0xE47639D49B6835C1ULL, 0xC876E7CF1768243CULL } }, /* XSUM_XXH128_testdata[4487] */\n    { 1496, 0x0000000000000000ULL, { 0xA229AE8D10488082ULL, 0x1AE182BCC2C92821ULL } }, /* XSUM_XXH128_testdata[4488] */\n    { 1496, 0x000000009E3779B1ULL, { 0x160D7E2829B835ABULL, 0x109F656EAD3A0FD4ULL } }, /* XSUM_XXH128_testdata[4489] */\n    { 1496, 0x9E3779B185EBCA8DULL, { 0xAE8E2E41674BFF94ULL, 0x8CB48E0B82601794ULL } }, /* XSUM_XXH128_testdata[4490] */\n    { 1497, 0x0000000000000000ULL, { 0xFE77233C02698E38ULL, 0x30451378041D9B41ULL } }, /* XSUM_XXH128_testdata[4491] */\n    { 1497, 0x000000009E3779B1ULL, { 0xB8E508D5E7C0E455ULL, 0x49CC84774AE28688ULL } }, /* XSUM_XXH128_testdata[4492] */\n    { 1497, 0x9E3779B185EBCA8DULL, { 0x16C1DF3C6949E62CULL, 0x1FC8BBEEA36783F8ULL } }, /* XSUM_XXH128_testdata[4493] */\n    { 1498, 0x0000000000000000ULL, { 0x117FA8A945161AB7ULL, 0xCE14FC64013EEC80ULL } }, /* XSUM_XXH128_testdata[4494] */\n    { 1498, 0x000000009E3779B1ULL, { 0xA5AAC071F3E32C26ULL, 0x35BA5D1949F9A1C0ULL } }, /* XSUM_XXH128_testdata[4495] */\n    { 1498, 0x9E3779B185EBCA8DULL, { 0x535EC6C1E6113586ULL, 0x3C850D3359B97C7FULL } }, /* XSUM_XXH128_testdata[4496] */\n    { 1499, 0x0000000000000000ULL, { 0xB293E66F31FF809DULL, 0xED54485FD08548C8ULL } }, /* XSUM_XXH128_testdata[4497] */\n    { 1499, 0x000000009E3779B1ULL, { 0xF460C4146326E0B7ULL, 0x26B296B24E2A98B8ULL } }, /* XSUM_XXH128_testdata[4498] */\n    { 1499, 0x9E3779B185EBCA8DULL, { 0x2CDF051F4679B89DULL, 0xDAA7A25EF7D70E46ULL } }, /* XSUM_XXH128_testdata[4499] */\n    { 1500, 0x0000000000000000ULL, { 0xE81D866A4E684A3BULL, 0x22A1ACAC7206C90FULL } }, /* XSUM_XXH128_testdata[4500] */\n    { 1500, 0x000000009E3779B1ULL, { 0xFF38C8AA792C2EA6ULL, 0xDFDC98CDB17A89A1ULL } }, /* XSUM_XXH128_testdata[4501] */\n    { 1500, 0x9E3779B185EBCA8DULL, { 0x5765B72338ACC0CAULL, 0xC9BF84D732BEB8F0ULL } }, /* XSUM_XXH128_testdata[4502] */\n    { 1501, 0x0000000000000000ULL, { 0xAB92157E238DD5DCULL, 0x8E89D5D153CB4C5EULL } }, /* XSUM_XXH128_testdata[4503] */\n    { 1501, 0x000000009E3779B1ULL, { 0x1FFB725CBC4F6C14ULL, 0x8DEFC7A804A2A220ULL } }, /* XSUM_XXH128_testdata[4504] */\n    { 1501, 0x9E3779B185EBCA8DULL, { 0xA6E5A4190CB2C3B4ULL, 0x78BCABC227907E29ULL } }, /* XSUM_XXH128_testdata[4505] */\n    { 1502, 0x0000000000000000ULL, { 0xB005DD78C3CF30BCULL, 0x2785D2657FE46BB5ULL } }, /* XSUM_XXH128_testdata[4506] */\n    { 1502, 0x000000009E3779B1ULL, { 0x6A0751A663DFB099ULL, 0x068D42291E2F398DULL } }, /* XSUM_XXH128_testdata[4507] */\n    { 1502, 0x9E3779B185EBCA8DULL, { 0x70D60DE25EED0BDEULL, 0xBD59E7A13F640BA5ULL } }, /* XSUM_XXH128_testdata[4508] */\n    { 1503, 0x0000000000000000ULL, { 0x0C683B1518B8FE2FULL, 0xEB34D8CF6B4E60B9ULL } }, /* XSUM_XXH128_testdata[4509] */\n    { 1503, 0x000000009E3779B1ULL, { 0xAF8B32A8884E0284ULL, 0x56C19C96F2EF1F26ULL } }, /* XSUM_XXH128_testdata[4510] */\n    { 1503, 0x9E3779B185EBCA8DULL, { 0xA7A4BDC4FE0A70CDULL, 0x02659EF29E08EAF5ULL } }, /* XSUM_XXH128_testdata[4511] */\n    { 1504, 0x0000000000000000ULL, { 0x56BD12C5E82AE2E3ULL, 0x4828FC06228CE3D2ULL } }, /* XSUM_XXH128_testdata[4512] */\n    { 1504, 0x000000009E3779B1ULL, { 0x40232A9F01184841ULL, 0x420B41308D6122B0ULL } }, /* XSUM_XXH128_testdata[4513] */\n    { 1504, 0x9E3779B185EBCA8DULL, { 0x54B56D8804E18459ULL, 0xFBB6F5739BDE0479ULL } }, /* XSUM_XXH128_testdata[4514] */\n    { 1505, 0x0000000000000000ULL, { 0x0E339E1EA59A7ECDULL, 0x2ADB96FA7300D7ABULL } }, /* XSUM_XXH128_testdata[4515] */\n    { 1505, 0x000000009E3779B1ULL, { 0x965CAC7E4CC3B905ULL, 0xF00A781D88FF7264ULL } }, /* XSUM_XXH128_testdata[4516] */\n    { 1505, 0x9E3779B185EBCA8DULL, { 0x100F6BD1A03D7D36ULL, 0x9E6EE5853C3FFBD4ULL } }, /* XSUM_XXH128_testdata[4517] */\n    { 1506, 0x0000000000000000ULL, { 0xF7CE8A9373EC98ACULL, 0xA00AE2E210A8E287ULL } }, /* XSUM_XXH128_testdata[4518] */\n    { 1506, 0x000000009E3779B1ULL, { 0xE721E8C672FEF83BULL, 0xF3D75F0345E4AE43ULL } }, /* XSUM_XXH128_testdata[4519] */\n    { 1506, 0x9E3779B185EBCA8DULL, { 0x545EEB55F12926ECULL, 0x25C2C55D89D0B430ULL } }, /* XSUM_XXH128_testdata[4520] */\n    { 1507, 0x0000000000000000ULL, { 0x53758D1F2109D846ULL, 0x472320872CD11BF1ULL } }, /* XSUM_XXH128_testdata[4521] */\n    { 1507, 0x000000009E3779B1ULL, { 0xD64AB8BD7CC8B285ULL, 0x16BC501FCDD7518EULL } }, /* XSUM_XXH128_testdata[4522] */\n    { 1507, 0x9E3779B185EBCA8DULL, { 0x2FC5EDF558CE04D7ULL, 0xCC9112BE38D29A41ULL } }, /* XSUM_XXH128_testdata[4523] */\n    { 1508, 0x0000000000000000ULL, { 0x5E532C193D4B62BFULL, 0x3A3628B3295C0003ULL } }, /* XSUM_XXH128_testdata[4524] */\n    { 1508, 0x000000009E3779B1ULL, { 0x221102ABF177B320ULL, 0xEF5A1B7AFCAAC703ULL } }, /* XSUM_XXH128_testdata[4525] */\n    { 1508, 0x9E3779B185EBCA8DULL, { 0x23C6ED7D10BCF6DEULL, 0xEB00B8342F11AF92ULL } }, /* XSUM_XXH128_testdata[4526] */\n    { 1509, 0x0000000000000000ULL, { 0xC45828EF5AE2513AULL, 0x32D8CF0B0486B55CULL } }, /* XSUM_XXH128_testdata[4527] */\n    { 1509, 0x000000009E3779B1ULL, { 0xBACB01508934DD88ULL, 0x629B84A3C39D02F2ULL } }, /* XSUM_XXH128_testdata[4528] */\n    { 1509, 0x9E3779B185EBCA8DULL, { 0x5687B04DC1DE930DULL, 0xE0EB65116B50EC5DULL } }, /* XSUM_XXH128_testdata[4529] */\n    { 1510, 0x0000000000000000ULL, { 0x977A95A6D18ADBECULL, 0x0AF7C49D97B191CEULL } }, /* XSUM_XXH128_testdata[4530] */\n    { 1510, 0x000000009E3779B1ULL, { 0xBB6814CE24C728DBULL, 0x7C51114B587C8B12ULL } }, /* XSUM_XXH128_testdata[4531] */\n    { 1510, 0x9E3779B185EBCA8DULL, { 0xB8C8FFD3F4F31603ULL, 0xD40F4C3F550A2D1AULL } }, /* XSUM_XXH128_testdata[4532] */\n    { 1511, 0x0000000000000000ULL, { 0x47920EE11E511CB2ULL, 0x884113416D8A978FULL } }, /* XSUM_XXH128_testdata[4533] */\n    { 1511, 0x000000009E3779B1ULL, { 0xB1AA6A3A91B5DAFEULL, 0x6F9E98A8FCEE5E81ULL } }, /* XSUM_XXH128_testdata[4534] */\n    { 1511, 0x9E3779B185EBCA8DULL, { 0xBD9A0732D413FFB6ULL, 0xC0AD8147FFD3034BULL } }, /* XSUM_XXH128_testdata[4535] */\n    { 1512, 0x0000000000000000ULL, { 0x8C0DD31A0220F411ULL, 0x5011BF21EE7312D0ULL } }, /* XSUM_XXH128_testdata[4536] */\n    { 1512, 0x000000009E3779B1ULL, { 0xA9544172EA2BF06FULL, 0xA4C8F406027F3C5AULL } }, /* XSUM_XXH128_testdata[4537] */\n    { 1512, 0x9E3779B185EBCA8DULL, { 0x16DD87D0B3C13707ULL, 0xFBADFF8CE3AFBEACULL } }, /* XSUM_XXH128_testdata[4538] */\n    { 1513, 0x0000000000000000ULL, { 0x3D12AA0B29777D6FULL, 0xEFBFF4590EBBB885ULL } }, /* XSUM_XXH128_testdata[4539] */\n    { 1513, 0x000000009E3779B1ULL, { 0x0D6465CB5B380E59ULL, 0xB45B6F3FC4B114A3ULL } }, /* XSUM_XXH128_testdata[4540] */\n    { 1513, 0x9E3779B185EBCA8DULL, { 0x5BF9C8569971E6F5ULL, 0x7741886934524E1DULL } }, /* XSUM_XXH128_testdata[4541] */\n    { 1514, 0x0000000000000000ULL, { 0x112F5BA7BF0636C4ULL, 0x032930DD668D5EC6ULL } }, /* XSUM_XXH128_testdata[4542] */\n    { 1514, 0x000000009E3779B1ULL, { 0x772A3474A57241C8ULL, 0x42F92D4D84DB40A8ULL } }, /* XSUM_XXH128_testdata[4543] */\n    { 1514, 0x9E3779B185EBCA8DULL, { 0xB4A0B58609A78117ULL, 0xC23FB983402AE9B8ULL } }, /* XSUM_XXH128_testdata[4544] */\n    { 1515, 0x0000000000000000ULL, { 0x6D44D3CF18C1335DULL, 0x543AF58C05C1B2CAULL } }, /* XSUM_XXH128_testdata[4545] */\n    { 1515, 0x000000009E3779B1ULL, { 0x89FF93EDA9C73CCEULL, 0x148B0358459C10A5ULL } }, /* XSUM_XXH128_testdata[4546] */\n    { 1515, 0x9E3779B185EBCA8DULL, { 0xA732C10D56D0F0F5ULL, 0x64204E6A9AB20033ULL } }, /* XSUM_XXH128_testdata[4547] */\n    { 1516, 0x0000000000000000ULL, { 0x4ED102F971A4663BULL, 0xD7919850A5FB28FDULL } }, /* XSUM_XXH128_testdata[4548] */\n    { 1516, 0x000000009E3779B1ULL, { 0xAC896B8BB141435AULL, 0x503E497FF8E7BAFEULL } }, /* XSUM_XXH128_testdata[4549] */\n    { 1516, 0x9E3779B185EBCA8DULL, { 0x7EF8D696D908064BULL, 0x67CE416300AB8C97ULL } }, /* XSUM_XXH128_testdata[4550] */\n    { 1517, 0x0000000000000000ULL, { 0x5E2B19AA9F43ECA7ULL, 0x5ECA2044EFAE4FD9ULL } }, /* XSUM_XXH128_testdata[4551] */\n    { 1517, 0x000000009E3779B1ULL, { 0x1854EC60BCD39EF9ULL, 0xC87089D99553147BULL } }, /* XSUM_XXH128_testdata[4552] */\n    { 1517, 0x9E3779B185EBCA8DULL, { 0xB01D9E184848CD4AULL, 0xDE3810FD2B4072DAULL } }, /* XSUM_XXH128_testdata[4553] */\n    { 1518, 0x0000000000000000ULL, { 0x145ED9B2C279EF7DULL, 0xCC75640410D10D12ULL } }, /* XSUM_XXH128_testdata[4554] */\n    { 1518, 0x000000009E3779B1ULL, { 0x4D7B1D8326D22442ULL, 0xECF71517ACDB6564ULL } }, /* XSUM_XXH128_testdata[4555] */\n    { 1518, 0x9E3779B185EBCA8DULL, { 0xCAC9CD8B6DF6E473ULL, 0x08DEDC935053B3CBULL } }, /* XSUM_XXH128_testdata[4556] */\n    { 1519, 0x0000000000000000ULL, { 0xC266AD258BC02F59ULL, 0x4AD7EECD054189E0ULL } }, /* XSUM_XXH128_testdata[4557] */\n    { 1519, 0x000000009E3779B1ULL, { 0x3A5FD4C78BF2660FULL, 0x2E7B804B1023795CULL } }, /* XSUM_XXH128_testdata[4558] */\n    { 1519, 0x9E3779B185EBCA8DULL, { 0x06EA6CFCFFD67490ULL, 0x7DD699E6E7BA35E5ULL } }, /* XSUM_XXH128_testdata[4559] */\n    { 1520, 0x0000000000000000ULL, { 0xA601E0E6624AA703ULL, 0x8BA0C3EF48F316D3ULL } }, /* XSUM_XXH128_testdata[4560] */\n    { 1520, 0x000000009E3779B1ULL, { 0xEA4E44C21E5D15F8ULL, 0x7FEAC147F1A3AF8AULL } }, /* XSUM_XXH128_testdata[4561] */\n    { 1520, 0x9E3779B185EBCA8DULL, { 0xCA5CDC82A62D97E2ULL, 0x13706B91641BB007ULL } }, /* XSUM_XXH128_testdata[4562] */\n    { 1521, 0x0000000000000000ULL, { 0x589BE8D5050257C2ULL, 0x09115FE5CCDAB565ULL } }, /* XSUM_XXH128_testdata[4563] */\n    { 1521, 0x000000009E3779B1ULL, { 0x6B0FCF68C557CF69ULL, 0x32A4B7D10BE9434DULL } }, /* XSUM_XXH128_testdata[4564] */\n    { 1521, 0x9E3779B185EBCA8DULL, { 0xC1CBF0A646D8BB14ULL, 0xEEF827C96AC79698ULL } }, /* XSUM_XXH128_testdata[4565] */\n    { 1522, 0x0000000000000000ULL, { 0xC70EEDF28BBD665AULL, 0x56956D7201E0AD23ULL } }, /* XSUM_XXH128_testdata[4566] */\n    { 1522, 0x000000009E3779B1ULL, { 0xDEEA1688D2730E4EULL, 0xE6DC70EEE094B805ULL } }, /* XSUM_XXH128_testdata[4567] */\n    { 1522, 0x9E3779B185EBCA8DULL, { 0xA200829E1237F71CULL, 0x7931D14213C563F5ULL } }, /* XSUM_XXH128_testdata[4568] */\n    { 1523, 0x0000000000000000ULL, { 0xB2C5EFEA1A95B309ULL, 0xDAA00EBF3D6F6CC0ULL } }, /* XSUM_XXH128_testdata[4569] */\n    { 1523, 0x000000009E3779B1ULL, { 0x530C18D21ECCB8BAULL, 0x82E9AB38E8D6DACFULL } }, /* XSUM_XXH128_testdata[4570] */\n    { 1523, 0x9E3779B185EBCA8DULL, { 0x4210AAC799206AABULL, 0x731419BDA5625FD5ULL } }, /* XSUM_XXH128_testdata[4571] */\n    { 1524, 0x0000000000000000ULL, { 0x7999AA564264C984ULL, 0x7FD7A5A99D8BB6CDULL } }, /* XSUM_XXH128_testdata[4572] */\n    { 1524, 0x000000009E3779B1ULL, { 0x94E6ABB917D5F2D0ULL, 0x83CC9D28DA81E29CULL } }, /* XSUM_XXH128_testdata[4573] */\n    { 1524, 0x9E3779B185EBCA8DULL, { 0xD29CF91C87606278ULL, 0x3232414319B67584ULL } }, /* XSUM_XXH128_testdata[4574] */\n    { 1525, 0x0000000000000000ULL, { 0x592527E8D34BAA1FULL, 0x822DE67398406F36ULL } }, /* XSUM_XXH128_testdata[4575] */\n    { 1525, 0x000000009E3779B1ULL, { 0x143FD655918298B6ULL, 0xED65E4B0A0F8149BULL } }, /* XSUM_XXH128_testdata[4576] */\n    { 1525, 0x9E3779B185EBCA8DULL, { 0xA7D655F3D758D2DDULL, 0x312528C7F6A2EEC4ULL } }, /* XSUM_XXH128_testdata[4577] */\n    { 1526, 0x0000000000000000ULL, { 0xB0E0DA5EA984D823ULL, 0x4E6013D9900F9C54ULL } }, /* XSUM_XXH128_testdata[4578] */\n    { 1526, 0x000000009E3779B1ULL, { 0x826F81F864A9E10AULL, 0x2A37363D456BDD01ULL } }, /* XSUM_XXH128_testdata[4579] */\n    { 1526, 0x9E3779B185EBCA8DULL, { 0x46D0E44753D033BBULL, 0xCF4DC4893C97F130ULL } }, /* XSUM_XXH128_testdata[4580] */\n    { 1527, 0x0000000000000000ULL, { 0xAF9421BDAB7DE566ULL, 0xEF25747B4EDA28C2ULL } }, /* XSUM_XXH128_testdata[4581] */\n    { 1527, 0x000000009E3779B1ULL, { 0xA93EBEFE61203A0FULL, 0xF01B88784E3A4315ULL } }, /* XSUM_XXH128_testdata[4582] */\n    { 1527, 0x9E3779B185EBCA8DULL, { 0xCB318F6E507A110FULL, 0xF496F7390B52FBD2ULL } }, /* XSUM_XXH128_testdata[4583] */\n    { 1528, 0x0000000000000000ULL, { 0xDDE69757FC45453FULL, 0x8096E75EDB0F5E1CULL } }, /* XSUM_XXH128_testdata[4584] */\n    { 1528, 0x000000009E3779B1ULL, { 0xAD1A61A43C5079D9ULL, 0x05E37A8CB6F8A581ULL } }, /* XSUM_XXH128_testdata[4585] */\n    { 1528, 0x9E3779B185EBCA8DULL, { 0x6E89C3764D284D03ULL, 0x4FCEEB170F21D09FULL } }, /* XSUM_XXH128_testdata[4586] */\n    { 1529, 0x0000000000000000ULL, { 0x790B2802BF5B6CA5ULL, 0x2D144A2C474990E0ULL } }, /* XSUM_XXH128_testdata[4587] */\n    { 1529, 0x000000009E3779B1ULL, { 0x69BA756486E267DBULL, 0x654A6BDB7490971AULL } }, /* XSUM_XXH128_testdata[4588] */\n    { 1529, 0x9E3779B185EBCA8DULL, { 0x330356E0FD650D8DULL, 0x40B7D8D9F47BD267ULL } }, /* XSUM_XXH128_testdata[4589] */\n    { 1530, 0x0000000000000000ULL, { 0x1CBA0D20E1D49A9EULL, 0x94E2B18CF60CE746ULL } }, /* XSUM_XXH128_testdata[4590] */\n    { 1530, 0x000000009E3779B1ULL, { 0x34E95637CA7BDE06ULL, 0x2BF1273FB7BED0B3ULL } }, /* XSUM_XXH128_testdata[4591] */\n    { 1530, 0x9E3779B185EBCA8DULL, { 0xA73387A0D00C9B49ULL, 0xDE41B2C6C2944997ULL } }, /* XSUM_XXH128_testdata[4592] */\n    { 1531, 0x0000000000000000ULL, { 0xCBA1D8BBCE62F3CCULL, 0x302B1551AD7C749FULL } }, /* XSUM_XXH128_testdata[4593] */\n    { 1531, 0x000000009E3779B1ULL, { 0x79F440A0C1834BECULL, 0xAF999FACB7C50A44ULL } }, /* XSUM_XXH128_testdata[4594] */\n    { 1531, 0x9E3779B185EBCA8DULL, { 0x1955AA7C05619D60ULL, 0xFE5A801637752EBCULL } }, /* XSUM_XXH128_testdata[4595] */\n    { 1532, 0x0000000000000000ULL, { 0xC05CDA3641633E71ULL, 0xDB8F7E1DBF069132ULL } }, /* XSUM_XXH128_testdata[4596] */\n    { 1532, 0x000000009E3779B1ULL, { 0xF2A2DB90DAF5F55EULL, 0x77B4FD6EDF573C83ULL } }, /* XSUM_XXH128_testdata[4597] */\n    { 1532, 0x9E3779B185EBCA8DULL, { 0x0DBA8ACDD35665AAULL, 0xF1A59C884B895BB8ULL } }, /* XSUM_XXH128_testdata[4598] */\n    { 1533, 0x0000000000000000ULL, { 0x12E82077408AA01FULL, 0x2EA2DE1353BE6AEEULL } }, /* XSUM_XXH128_testdata[4599] */\n    { 1533, 0x000000009E3779B1ULL, { 0xD87296558758B772ULL, 0xAB1CE5396D51B550ULL } }, /* XSUM_XXH128_testdata[4600] */\n    { 1533, 0x9E3779B185EBCA8DULL, { 0xE55F59BDE2B73BA6ULL, 0x2CF6B7C85F21EF28ULL } }, /* XSUM_XXH128_testdata[4601] */\n    { 1534, 0x0000000000000000ULL, { 0x666B68328DA7CF55ULL, 0x19D95941A9AFFEA8ULL } }, /* XSUM_XXH128_testdata[4602] */\n    { 1534, 0x000000009E3779B1ULL, { 0x7A08FE244BD0C542ULL, 0x0AA97D537D34D92AULL } }, /* XSUM_XXH128_testdata[4603] */\n    { 1534, 0x9E3779B185EBCA8DULL, { 0xB798085F0C7EA859ULL, 0x333CD9CC9D1488ACULL } }, /* XSUM_XXH128_testdata[4604] */\n    { 1535, 0x0000000000000000ULL, { 0x1B107DA31572D1E4ULL, 0xD08A50FD72A76924ULL } }, /* XSUM_XXH128_testdata[4605] */\n    { 1535, 0x000000009E3779B1ULL, { 0xA9E387920C9D179AULL, 0xBEA29B10DE62A1BEULL } }, /* XSUM_XXH128_testdata[4606] */\n    { 1535, 0x9E3779B185EBCA8DULL, { 0xC27684F8BDFFCD9BULL, 0x979B85EF60D56EF0ULL } }, /* XSUM_XXH128_testdata[4607] */\n    { 1536, 0x0000000000000000ULL, { 0x8DAA8C2ECCABB68BULL, 0x5B9831DF57EAE14FULL } }, /* XSUM_XXH128_testdata[4608] */\n    { 1536, 0x000000009E3779B1ULL, { 0x14176C0EA5A9B640ULL, 0xCF68DAB4800F1B98ULL } }, /* XSUM_XXH128_testdata[4609] */\n    { 1536, 0x9E3779B185EBCA8DULL, { 0x672E8F732C4E55D7ULL, 0xBAD8871394824224ULL } }, /* XSUM_XXH128_testdata[4610] */\n    { 1537, 0x0000000000000000ULL, { 0x57C8DBD143F74C9DULL, 0x5F88160892BBCDFDULL } }, /* XSUM_XXH128_testdata[4611] */\n    { 1537, 0x000000009E3779B1ULL, { 0x4B7A3AC97EA64535ULL, 0x8B626C6B92E2D03AULL } }, /* XSUM_XXH128_testdata[4612] */\n    { 1537, 0x9E3779B185EBCA8DULL, { 0x93A05689A5758F46ULL, 0x6766A727ABD47FB7ULL } }, /* XSUM_XXH128_testdata[4613] */\n    { 1538, 0x0000000000000000ULL, { 0x48D172D3BC18AB8FULL, 0x8645B5ADE58CBD95ULL } }, /* XSUM_XXH128_testdata[4614] */\n    { 1538, 0x000000009E3779B1ULL, { 0x15974951F8626009ULL, 0xA6246F1E47C34337ULL } }, /* XSUM_XXH128_testdata[4615] */\n    { 1538, 0x9E3779B185EBCA8DULL, { 0x9E4A2D20455D1889ULL, 0xDAE2870FE728D867ULL } }, /* XSUM_XXH128_testdata[4616] */\n    { 1539, 0x0000000000000000ULL, { 0xD901F594BDE7ADCEULL, 0x703AD7BE2B3E0F31ULL } }, /* XSUM_XXH128_testdata[4617] */\n    { 1539, 0x000000009E3779B1ULL, { 0xBD77D82DE976FFC7ULL, 0x82DC0C54EAFFEB19ULL } }, /* XSUM_XXH128_testdata[4618] */\n    { 1539, 0x9E3779B185EBCA8DULL, { 0x228B8162736F98E3ULL, 0x8CEAFE43295EA3A4ULL } }, /* XSUM_XXH128_testdata[4619] */\n    { 1540, 0x0000000000000000ULL, { 0x8EE07EB9737A9276ULL, 0x2E26A77A0437A3E8ULL } }, /* XSUM_XXH128_testdata[4620] */\n    { 1540, 0x000000009E3779B1ULL, { 0xC8F13AC142463C6FULL, 0xED622C2F763D2155ULL } }, /* XSUM_XXH128_testdata[4621] */\n    { 1540, 0x9E3779B185EBCA8DULL, { 0xC2CF4E587BB9AA6BULL, 0x9315DED5CA6E1D6DULL } }, /* XSUM_XXH128_testdata[4622] */\n    { 1541, 0x0000000000000000ULL, { 0xBB1F926D73745C78ULL, 0x326509D94F0CEA31ULL } }, /* XSUM_XXH128_testdata[4623] */\n    { 1541, 0x000000009E3779B1ULL, { 0xB0D726385D29FBC6ULL, 0xA7ECC6BFD27F0113ULL } }, /* XSUM_XXH128_testdata[4624] */\n    { 1541, 0x9E3779B185EBCA8DULL, { 0x24CF9F8CF02B76DBULL, 0xE8449601C6F9D22CULL } }, /* XSUM_XXH128_testdata[4625] */\n    { 1542, 0x0000000000000000ULL, { 0x781EB0D61C859FDBULL, 0x3B82BE29C41DBD72ULL } }, /* XSUM_XXH128_testdata[4626] */\n    { 1542, 0x000000009E3779B1ULL, { 0xA7354ECD057F40A5ULL, 0x35A286A0BA99D828ULL } }, /* XSUM_XXH128_testdata[4627] */\n    { 1542, 0x9E3779B185EBCA8DULL, { 0xB586961CEFB728F2ULL, 0x8C5C35DFE592A64AULL } }, /* XSUM_XXH128_testdata[4628] */\n    { 1543, 0x0000000000000000ULL, { 0xFCF91E6E9B54D87AULL, 0xE124A6AD32A6A85BULL } }, /* XSUM_XXH128_testdata[4629] */\n    { 1543, 0x000000009E3779B1ULL, { 0xC1BAEDA156F63460ULL, 0xC953225DCDB0E078ULL } }, /* XSUM_XXH128_testdata[4630] */\n    { 1543, 0x9E3779B185EBCA8DULL, { 0x972A5BBB45E4C1C2ULL, 0xA295D71190C8D4E6ULL } }, /* XSUM_XXH128_testdata[4631] */\n    { 1544, 0x0000000000000000ULL, { 0xC731201E159A152EULL, 0xDDF1BE89A160BC2FULL } }, /* XSUM_XXH128_testdata[4632] */\n    { 1544, 0x000000009E3779B1ULL, { 0x668858F15F96A987ULL, 0x904AE98A73C39159ULL } }, /* XSUM_XXH128_testdata[4633] */\n    { 1544, 0x9E3779B185EBCA8DULL, { 0x7750BDF397E400B1ULL, 0xEA3950C012240993ULL } }, /* XSUM_XXH128_testdata[4634] */\n    { 1545, 0x0000000000000000ULL, { 0xE1FDBC5884EABEB6ULL, 0xB6C15E3799711C55ULL } }, /* XSUM_XXH128_testdata[4635] */\n    { 1545, 0x000000009E3779B1ULL, { 0x7920633A68992086ULL, 0x29C5DA0E3973260DULL } }, /* XSUM_XXH128_testdata[4636] */\n    { 1545, 0x9E3779B185EBCA8DULL, { 0xAA93DFFD978594ABULL, 0xBDBB103EE752F608ULL } }, /* XSUM_XXH128_testdata[4637] */\n    { 1546, 0x0000000000000000ULL, { 0x713A314F08EF6D14ULL, 0x2D1E4744BBCE0994ULL } }, /* XSUM_XXH128_testdata[4638] */\n    { 1546, 0x000000009E3779B1ULL, { 0x06EAABF722D7A6A1ULL, 0xC470BEE0CC362BFAULL } }, /* XSUM_XXH128_testdata[4639] */\n    { 1546, 0x9E3779B185EBCA8DULL, { 0x7680659B3474F11DULL, 0xA5B7485667AF0AACULL } }, /* XSUM_XXH128_testdata[4640] */\n    { 1547, 0x0000000000000000ULL, { 0x14493E1DAADA1DCAULL, 0xBDD734E2784EDA5AULL } }, /* XSUM_XXH128_testdata[4641] */\n    { 1547, 0x000000009E3779B1ULL, { 0x8AE51168F16A197BULL, 0xF5B866C67FD025E2ULL } }, /* XSUM_XXH128_testdata[4642] */\n    { 1547, 0x9E3779B185EBCA8DULL, { 0xA4782ECAE48EB7A4ULL, 0x633DCC3FB7F8D679ULL } }, /* XSUM_XXH128_testdata[4643] */\n    { 1548, 0x0000000000000000ULL, { 0x73FEB39FA6622479ULL, 0x5FDA3A9C799C5353ULL } }, /* XSUM_XXH128_testdata[4644] */\n    { 1548, 0x000000009E3779B1ULL, { 0xADF6CE82ED27B469ULL, 0x24B0934CD460FA72ULL } }, /* XSUM_XXH128_testdata[4645] */\n    { 1548, 0x9E3779B185EBCA8DULL, { 0x7FC2A81151FF1554ULL, 0xC73871215D6D4D9FULL } }, /* XSUM_XXH128_testdata[4646] */\n    { 1549, 0x0000000000000000ULL, { 0x8B7BAC177B06229FULL, 0x7EF73FB6F3C77515ULL } }, /* XSUM_XXH128_testdata[4647] */\n    { 1549, 0x000000009E3779B1ULL, { 0xF5C84AEEA708D128ULL, 0x1B6033E0A6E5F3C6ULL } }, /* XSUM_XXH128_testdata[4648] */\n    { 1549, 0x9E3779B185EBCA8DULL, { 0x0945E5E7E5EB282AULL, 0xA2284EFCAF951866ULL } }, /* XSUM_XXH128_testdata[4649] */\n    { 1550, 0x0000000000000000ULL, { 0xB0929D573881C869ULL, 0xC3D605C8DB090A25ULL } }, /* XSUM_XXH128_testdata[4650] */\n    { 1550, 0x000000009E3779B1ULL, { 0xEE34B74D29569A5BULL, 0xDED030252C290246ULL } }, /* XSUM_XXH128_testdata[4651] */\n    { 1550, 0x9E3779B185EBCA8DULL, { 0xB7725D34E26E7E2EULL, 0xF54833D7BEFAEB76ULL } }, /* XSUM_XXH128_testdata[4652] */\n    { 1551, 0x0000000000000000ULL, { 0x8C8C1AFE32561877ULL, 0x2BB277A23F3D0929ULL } }, /* XSUM_XXH128_testdata[4653] */\n    { 1551, 0x000000009E3779B1ULL, { 0xAE6B020DE49EC222ULL, 0xB8AC2485CCF28D7AULL } }, /* XSUM_XXH128_testdata[4654] */\n    { 1551, 0x9E3779B185EBCA8DULL, { 0xF8C8F4C40D6F1C42ULL, 0x6C2EE78C4BC470FFULL } }, /* XSUM_XXH128_testdata[4655] */\n    { 1552, 0x0000000000000000ULL, { 0xB7A14AE288A42F2FULL, 0x96EC9FBC276E56A1ULL } }, /* XSUM_XXH128_testdata[4656] */\n    { 1552, 0x000000009E3779B1ULL, { 0xBDC11D478A6014EBULL, 0x4E1CC77A4F587E1BULL } }, /* XSUM_XXH128_testdata[4657] */\n    { 1552, 0x9E3779B185EBCA8DULL, { 0x9B588CD6323138E6ULL, 0x7CBA84483CA2F3FFULL } }, /* XSUM_XXH128_testdata[4658] */\n    { 1553, 0x0000000000000000ULL, { 0xA96E61B2E7B2B195ULL, 0x99F2D323F9FAC3ECULL } }, /* XSUM_XXH128_testdata[4659] */\n    { 1553, 0x000000009E3779B1ULL, { 0x329A94265F0D9C3EULL, 0x4DF3AE93D6D96B1AULL } }, /* XSUM_XXH128_testdata[4660] */\n    { 1553, 0x9E3779B185EBCA8DULL, { 0x882F797F9E56DDD8ULL, 0x1D5E634D7321CAC5ULL } }, /* XSUM_XXH128_testdata[4661] */\n    { 1554, 0x0000000000000000ULL, { 0xBBFEE59943556FAFULL, 0x9EDB78E1EC3A1985ULL } }, /* XSUM_XXH128_testdata[4662] */\n    { 1554, 0x000000009E3779B1ULL, { 0xC557A7EEDE0F2B78ULL, 0xD3FCD607CF311381ULL } }, /* XSUM_XXH128_testdata[4663] */\n    { 1554, 0x9E3779B185EBCA8DULL, { 0xB46DC0C868791E04ULL, 0x691C5F9D9A6C94DDULL } }, /* XSUM_XXH128_testdata[4664] */\n    { 1555, 0x0000000000000000ULL, { 0xAFFDA6A79337FA79ULL, 0xF258AB131B5E6A1BULL } }, /* XSUM_XXH128_testdata[4665] */\n    { 1555, 0x000000009E3779B1ULL, { 0x9C599CD610B8049AULL, 0x36793996E52D7A1DULL } }, /* XSUM_XXH128_testdata[4666] */\n    { 1555, 0x9E3779B185EBCA8DULL, { 0xD21D1599C67C84D9ULL, 0x7A30B78EED4BE961ULL } }, /* XSUM_XXH128_testdata[4667] */\n    { 1556, 0x0000000000000000ULL, { 0x2D3DF3731171ABA9ULL, 0xF55AA6AA39858E75ULL } }, /* XSUM_XXH128_testdata[4668] */\n    { 1556, 0x000000009E3779B1ULL, { 0x197C94FE72D24053ULL, 0x908D29F7B58D187FULL } }, /* XSUM_XXH128_testdata[4669] */\n    { 1556, 0x9E3779B185EBCA8DULL, { 0x21D04224388027B0ULL, 0x97C81E8233751A36ULL } }, /* XSUM_XXH128_testdata[4670] */\n    { 1557, 0x0000000000000000ULL, { 0xF7D0F61D0B2D6148ULL, 0x84C1608F2A050F07ULL } }, /* XSUM_XXH128_testdata[4671] */\n    { 1557, 0x000000009E3779B1ULL, { 0x24CB0343DF882364ULL, 0x119BE0AEED1F7F30ULL } }, /* XSUM_XXH128_testdata[4672] */\n    { 1557, 0x9E3779B185EBCA8DULL, { 0x77883AA22EFE233EULL, 0xCF12714C9A6CB1C5ULL } }, /* XSUM_XXH128_testdata[4673] */\n    { 1558, 0x0000000000000000ULL, { 0x64B4F355C78AA20AULL, 0x91D7E8E37E6B11C7ULL } }, /* XSUM_XXH128_testdata[4674] */\n    { 1558, 0x000000009E3779B1ULL, { 0xE3BDC4D855CBFC6DULL, 0x7A14C333B30867B6ULL } }, /* XSUM_XXH128_testdata[4675] */\n    { 1558, 0x9E3779B185EBCA8DULL, { 0x992C1816C34EF8DEULL, 0x65B2E8A75FD2C51EULL } }, /* XSUM_XXH128_testdata[4676] */\n    { 1559, 0x0000000000000000ULL, { 0x44552248B6A83EBAULL, 0x5FD043B238CAFE20ULL } }, /* XSUM_XXH128_testdata[4677] */\n    { 1559, 0x000000009E3779B1ULL, { 0xBCA30B5D727DF517ULL, 0x62EAEC486DCA6DE5ULL } }, /* XSUM_XXH128_testdata[4678] */\n    { 1559, 0x9E3779B185EBCA8DULL, { 0x5E53CB3CFBA3F8F9ULL, 0xC2D20120BE8670FEULL } }, /* XSUM_XXH128_testdata[4679] */\n    { 1560, 0x0000000000000000ULL, { 0x1483FBF2F918B422ULL, 0xC0C666E6F4C070CEULL } }, /* XSUM_XXH128_testdata[4680] */\n    { 1560, 0x000000009E3779B1ULL, { 0x67E4ADEE6A8E9BF3ULL, 0xE49FC9EA5D330C0CULL } }, /* XSUM_XXH128_testdata[4681] */\n    { 1560, 0x9E3779B185EBCA8DULL, { 0x70A300CB25C29A0BULL, 0x8BF8F6E84C4804CEULL } }, /* XSUM_XXH128_testdata[4682] */\n    { 1561, 0x0000000000000000ULL, { 0xCB99139C837D2084ULL, 0x9E5F6510BC73098BULL } }, /* XSUM_XXH128_testdata[4683] */\n    { 1561, 0x000000009E3779B1ULL, { 0x385DDD1F14536E50ULL, 0xCCB2B55BA5A9A344ULL } }, /* XSUM_XXH128_testdata[4684] */\n    { 1561, 0x9E3779B185EBCA8DULL, { 0x1EDAC8DFFBBE5BC0ULL, 0x07B65D76D37439E2ULL } }, /* XSUM_XXH128_testdata[4685] */\n    { 1562, 0x0000000000000000ULL, { 0xA82C249FB4C794DDULL, 0x8E324C2C9929B9BDULL } }, /* XSUM_XXH128_testdata[4686] */\n    { 1562, 0x000000009E3779B1ULL, { 0x690AC0EFC3AB27E9ULL, 0x60A400B9527C72D5ULL } }, /* XSUM_XXH128_testdata[4687] */\n    { 1562, 0x9E3779B185EBCA8DULL, { 0x6400F980D9D85712ULL, 0x3ED5F16B45773D77ULL } }, /* XSUM_XXH128_testdata[4688] */\n    { 1563, 0x0000000000000000ULL, { 0xD67895EEA2D79EEAULL, 0xC4C051C5ED04FCB3ULL } }, /* XSUM_XXH128_testdata[4689] */\n    { 1563, 0x000000009E3779B1ULL, { 0xE7B922C6E06CDEBBULL, 0xB0B0CFF621F14937ULL } }, /* XSUM_XXH128_testdata[4690] */\n    { 1563, 0x9E3779B185EBCA8DULL, { 0x7BE7BA43179D95BBULL, 0x49560CA2FCD24427ULL } }, /* XSUM_XXH128_testdata[4691] */\n    { 1564, 0x0000000000000000ULL, { 0x7609AE3DDA24A26DULL, 0x06C24A5DE6BAD2EFULL } }, /* XSUM_XXH128_testdata[4692] */\n    { 1564, 0x000000009E3779B1ULL, { 0x9A5940F262A94D1AULL, 0x24CAE69545648BA2ULL } }, /* XSUM_XXH128_testdata[4693] */\n    { 1564, 0x9E3779B185EBCA8DULL, { 0xDDABC1FE67E41194ULL, 0x85B07244E091164FULL } }, /* XSUM_XXH128_testdata[4694] */\n    { 1565, 0x0000000000000000ULL, { 0x67E28DAFA4DE6B19ULL, 0x01E9BEF46DCD83EEULL } }, /* XSUM_XXH128_testdata[4695] */\n    { 1565, 0x000000009E3779B1ULL, { 0x091446732FB4EE03ULL, 0x7D63214C46B32973ULL } }, /* XSUM_XXH128_testdata[4696] */\n    { 1565, 0x9E3779B185EBCA8DULL, { 0xB7E466CAE746467EULL, 0x689046BB9CA2250AULL } }, /* XSUM_XXH128_testdata[4697] */\n    { 1566, 0x0000000000000000ULL, { 0x2F1A9DB823B5224AULL, 0x0B3150A1841C38E6ULL } }, /* XSUM_XXH128_testdata[4698] */\n    { 1566, 0x000000009E3779B1ULL, { 0x90B46B8DDFD327A7ULL, 0x903999E4475CE896ULL } }, /* XSUM_XXH128_testdata[4699] */\n    { 1566, 0x9E3779B185EBCA8DULL, { 0x84E1EB43F2FBC3F9ULL, 0x77008C1D02B857F1ULL } }, /* XSUM_XXH128_testdata[4700] */\n    { 1567, 0x0000000000000000ULL, { 0x7D796B8C64CA888AULL, 0x4655512B5E6D0667ULL } }, /* XSUM_XXH128_testdata[4701] */\n    { 1567, 0x000000009E3779B1ULL, { 0xB8DD23A54755BA25ULL, 0xF4407F4C3988BFEFULL } }, /* XSUM_XXH128_testdata[4702] */\n    { 1567, 0x9E3779B185EBCA8DULL, { 0x2F19C51E51D4AB81ULL, 0x348B299D91D7706AULL } }, /* XSUM_XXH128_testdata[4703] */\n    { 1568, 0x0000000000000000ULL, { 0x69DA97B583DEC845ULL, 0xD01FEA8FBDA8D4ABULL } }, /* XSUM_XXH128_testdata[4704] */\n    { 1568, 0x000000009E3779B1ULL, { 0xCC00D2036D513447ULL, 0x3766DE039B357C1DULL } }, /* XSUM_XXH128_testdata[4705] */\n    { 1568, 0x9E3779B185EBCA8DULL, { 0x9E11AC222EE21E1AULL, 0x25AC057CFFF55656ULL } }, /* XSUM_XXH128_testdata[4706] */\n    { 1569, 0x0000000000000000ULL, { 0x815C5D1E89ED7407ULL, 0x4701D7BF348B99ACULL } }, /* XSUM_XXH128_testdata[4707] */\n    { 1569, 0x000000009E3779B1ULL, { 0xDD906C003D1FA383ULL, 0x0C0009023317EFE7ULL } }, /* XSUM_XXH128_testdata[4708] */\n    { 1569, 0x9E3779B185EBCA8DULL, { 0x52C01F40EDCB723EULL, 0xCB69A318167F6F7AULL } }, /* XSUM_XXH128_testdata[4709] */\n    { 1570, 0x0000000000000000ULL, { 0xDD1C36027DCD186FULL, 0xE628927F11B157B4ULL } }, /* XSUM_XXH128_testdata[4710] */\n    { 1570, 0x000000009E3779B1ULL, { 0xFC158048E82632FAULL, 0x244CE6BC7D5E485BULL } }, /* XSUM_XXH128_testdata[4711] */\n    { 1570, 0x9E3779B185EBCA8DULL, { 0xB0B201368B2BEC76ULL, 0x99537D5CC7A6711BULL } }, /* XSUM_XXH128_testdata[4712] */\n    { 1571, 0x0000000000000000ULL, { 0x58883470165C7DA3ULL, 0x45A64AC466B63CC8ULL } }, /* XSUM_XXH128_testdata[4713] */\n    { 1571, 0x000000009E3779B1ULL, { 0xDC3B29B06C355A3BULL, 0x5EC718D400369E1AULL } }, /* XSUM_XXH128_testdata[4714] */\n    { 1571, 0x9E3779B185EBCA8DULL, { 0x1619BE2824FDD4F9ULL, 0x9BB171B23B23C2B9ULL } }, /* XSUM_XXH128_testdata[4715] */\n    { 1572, 0x0000000000000000ULL, { 0xC940C303F9CBEABCULL, 0xAE0B5FE81210C89FULL } }, /* XSUM_XXH128_testdata[4716] */\n    { 1572, 0x000000009E3779B1ULL, { 0x18D27C5F0809A7DAULL, 0x3EB67CB3619AD589ULL } }, /* XSUM_XXH128_testdata[4717] */\n    { 1572, 0x9E3779B185EBCA8DULL, { 0xFE77A4E168E65690ULL, 0xAB3413E6406DCA06ULL } }, /* XSUM_XXH128_testdata[4718] */\n    { 1573, 0x0000000000000000ULL, { 0xA9E2DC206A9288B9ULL, 0x3EAB92860446CF57ULL } }, /* XSUM_XXH128_testdata[4719] */\n    { 1573, 0x000000009E3779B1ULL, { 0xC8D512FF0BDDE589ULL, 0x6E53266CF17F33BAULL } }, /* XSUM_XXH128_testdata[4720] */\n    { 1573, 0x9E3779B185EBCA8DULL, { 0xEA89C3A24A345C43ULL, 0x464DA78828B0D331ULL } }, /* XSUM_XXH128_testdata[4721] */\n    { 1574, 0x0000000000000000ULL, { 0xF9178CB0888E6943ULL, 0x9903ED415639E308ULL } }, /* XSUM_XXH128_testdata[4722] */\n    { 1574, 0x000000009E3779B1ULL, { 0xD7E063D8F465EA64ULL, 0x65B2E8A9C25835F0ULL } }, /* XSUM_XXH128_testdata[4723] */\n    { 1574, 0x9E3779B185EBCA8DULL, { 0x9E31837E985F353EULL, 0x02C0D37FBEF7B40AULL } }, /* XSUM_XXH128_testdata[4724] */\n    { 1575, 0x0000000000000000ULL, { 0x83C0F764EFF0AD9BULL, 0x1BDA024A626739D5ULL } }, /* XSUM_XXH128_testdata[4725] */\n    { 1575, 0x000000009E3779B1ULL, { 0x7F81ACDB5652E3BAULL, 0x078B060D3D93829EULL } }, /* XSUM_XXH128_testdata[4726] */\n    { 1575, 0x9E3779B185EBCA8DULL, { 0xF3CD0D6F71B8B8ACULL, 0x6F838321C13F843CULL } }, /* XSUM_XXH128_testdata[4727] */\n    { 1576, 0x0000000000000000ULL, { 0xD05C1CB5990DD48EULL, 0xB1E0C56B15805B04ULL } }, /* XSUM_XXH128_testdata[4728] */\n    { 1576, 0x000000009E3779B1ULL, { 0x0677C53712FD9CA1ULL, 0xECBC16A866897DC5ULL } }, /* XSUM_XXH128_testdata[4729] */\n    { 1576, 0x9E3779B185EBCA8DULL, { 0xFFC0ED23DC372AEDULL, 0x997D1AC72C1299FEULL } }, /* XSUM_XXH128_testdata[4730] */\n    { 1577, 0x0000000000000000ULL, { 0xD05B8448D4A4C37FULL, 0x9D789D4AB3AEF072ULL } }, /* XSUM_XXH128_testdata[4731] */\n    { 1577, 0x000000009E3779B1ULL, { 0x45189067323EDB15ULL, 0x1C00902F6135D39CULL } }, /* XSUM_XXH128_testdata[4732] */\n    { 1577, 0x9E3779B185EBCA8DULL, { 0x6AB0B55BAEC26ED0ULL, 0x99444C90B7B7B5B7ULL } }, /* XSUM_XXH128_testdata[4733] */\n    { 1578, 0x0000000000000000ULL, { 0xF2E07A2139BBB81FULL, 0xB04F443D84669721ULL } }, /* XSUM_XXH128_testdata[4734] */\n    { 1578, 0x000000009E3779B1ULL, { 0xD9B397442F68F5D3ULL, 0x3B5419FEDDF97E5CULL } }, /* XSUM_XXH128_testdata[4735] */\n    { 1578, 0x9E3779B185EBCA8DULL, { 0x4E69AE6DC4D111B1ULL, 0xFB0D00A26079A00DULL } }, /* XSUM_XXH128_testdata[4736] */\n    { 1579, 0x0000000000000000ULL, { 0x34C565FFFC42CE11ULL, 0xA1B6F384CA76B2C3ULL } }, /* XSUM_XXH128_testdata[4737] */\n    { 1579, 0x000000009E3779B1ULL, { 0x639B111122D6ABBCULL, 0xEC38213FF02C3040ULL } }, /* XSUM_XXH128_testdata[4738] */\n    { 1579, 0x9E3779B185EBCA8DULL, { 0x698082A359102999ULL, 0xACC82115A0437AA2ULL } }, /* XSUM_XXH128_testdata[4739] */\n    { 1580, 0x0000000000000000ULL, { 0x3963318475805AF5ULL, 0xB0FD11FFEAD218CBULL } }, /* XSUM_XXH128_testdata[4740] */\n    { 1580, 0x000000009E3779B1ULL, { 0xDB6BA762560C51B5ULL, 0xBF16A15161D20B5AULL } }, /* XSUM_XXH128_testdata[4741] */\n    { 1580, 0x9E3779B185EBCA8DULL, { 0xC1EED8DDAAE46BC7ULL, 0x43DC4475C12FDA57ULL } }, /* XSUM_XXH128_testdata[4742] */\n    { 1581, 0x0000000000000000ULL, { 0x84D1EC769B21AF34ULL, 0x7F7A3806C6B9DB6FULL } }, /* XSUM_XXH128_testdata[4743] */\n    { 1581, 0x000000009E3779B1ULL, { 0x04F512E3A5A9B90AULL, 0xF5246E6C268E64D1ULL } }, /* XSUM_XXH128_testdata[4744] */\n    { 1581, 0x9E3779B185EBCA8DULL, { 0x2998D1C9AE709AF6ULL, 0xB58310B0E770170CULL } }, /* XSUM_XXH128_testdata[4745] */\n    { 1582, 0x0000000000000000ULL, { 0x8AC3925462820D1AULL, 0xAF7E5D061ED889C0ULL } }, /* XSUM_XXH128_testdata[4746] */\n    { 1582, 0x000000009E3779B1ULL, { 0x58C598DE8041D635ULL, 0xFA3BCB83CC490CC0ULL } }, /* XSUM_XXH128_testdata[4747] */\n    { 1582, 0x9E3779B185EBCA8DULL, { 0x6C4206FE79F48927ULL, 0x2565DD5D44B77F16ULL } }, /* XSUM_XXH128_testdata[4748] */\n    { 1583, 0x0000000000000000ULL, { 0x320B91A78829FD61ULL, 0x9624B0F715101193ULL } }, /* XSUM_XXH128_testdata[4749] */\n    { 1583, 0x000000009E3779B1ULL, { 0xE4BE9D6884F5EC5AULL, 0xFAB88A3542E92848ULL } }, /* XSUM_XXH128_testdata[4750] */\n    { 1583, 0x9E3779B185EBCA8DULL, { 0x99D8E29048DFF054ULL, 0x3AF250F3A7F3E2C3ULL } }, /* XSUM_XXH128_testdata[4751] */\n    { 1584, 0x0000000000000000ULL, { 0x112D360DABC99809ULL, 0x301863597ED5D6D7ULL } }, /* XSUM_XXH128_testdata[4752] */\n    { 1584, 0x000000009E3779B1ULL, { 0xD0A6B015B86AD528ULL, 0xC3BD17327DF0DCDDULL } }, /* XSUM_XXH128_testdata[4753] */\n    { 1584, 0x9E3779B185EBCA8DULL, { 0x69BFB77290E9E380ULL, 0x8D2EB87920CE7585ULL } }, /* XSUM_XXH128_testdata[4754] */\n    { 1585, 0x0000000000000000ULL, { 0x16B8F188490984EFULL, 0xC887EF3F5C3F300EULL } }, /* XSUM_XXH128_testdata[4755] */\n    { 1585, 0x000000009E3779B1ULL, { 0x4293F62B68083EE8ULL, 0xF8732A3FE1D5BCB1ULL } }, /* XSUM_XXH128_testdata[4756] */\n    { 1585, 0x9E3779B185EBCA8DULL, { 0x974160CE63804BF2ULL, 0x9C91396A4F6A05DBULL } }, /* XSUM_XXH128_testdata[4757] */\n    { 1586, 0x0000000000000000ULL, { 0x0D4E515CA984876DULL, 0x4813D69E24A236B9ULL } }, /* XSUM_XXH128_testdata[4758] */\n    { 1586, 0x000000009E3779B1ULL, { 0x402D410DB3090526ULL, 0xC764542BAAB8EEE1ULL } }, /* XSUM_XXH128_testdata[4759] */\n    { 1586, 0x9E3779B185EBCA8DULL, { 0x1D24D2E86F9CEB03ULL, 0x4A342313A99BAB56ULL } }, /* XSUM_XXH128_testdata[4760] */\n    { 1587, 0x0000000000000000ULL, { 0xEA40D4F216011220ULL, 0xAEB1DFFCF71C6160ULL } }, /* XSUM_XXH128_testdata[4761] */\n    { 1587, 0x000000009E3779B1ULL, { 0x440089E91708CC61ULL, 0xA41ECC9533653F91ULL } }, /* XSUM_XXH128_testdata[4762] */\n    { 1587, 0x9E3779B185EBCA8DULL, { 0x4C9D21C5C10274C0ULL, 0x5BC459768D9F7D8DULL } }, /* XSUM_XXH128_testdata[4763] */\n    { 1588, 0x0000000000000000ULL, { 0x10E0750B26E84A86ULL, 0x525C60D80B6C0E58ULL } }, /* XSUM_XXH128_testdata[4764] */\n    { 1588, 0x000000009E3779B1ULL, { 0xB81B7B4DC1FA8046ULL, 0x029AF46564F502DEULL } }, /* XSUM_XXH128_testdata[4765] */\n    { 1588, 0x9E3779B185EBCA8DULL, { 0xB75D8AEB8E40B44FULL, 0x4093567C843369A9ULL } }, /* XSUM_XXH128_testdata[4766] */\n    { 1589, 0x0000000000000000ULL, { 0xDCC57A0AB1580C5BULL, 0xA09692A0F438F54FULL } }, /* XSUM_XXH128_testdata[4767] */\n    { 1589, 0x000000009E3779B1ULL, { 0x850B229A25D65550ULL, 0xC079C09CB170E46DULL } }, /* XSUM_XXH128_testdata[4768] */\n    { 1589, 0x9E3779B185EBCA8DULL, { 0xB0C608AD7843BF68ULL, 0xE88483B879F3A40CULL } }, /* XSUM_XXH128_testdata[4769] */\n    { 1590, 0x0000000000000000ULL, { 0xE15F4B8D47E84506ULL, 0x1845E243B6AB308EULL } }, /* XSUM_XXH128_testdata[4770] */\n    { 1590, 0x000000009E3779B1ULL, { 0xE69D3921E9B9E9C2ULL, 0x33A1B82A33B6A6A2ULL } }, /* XSUM_XXH128_testdata[4771] */\n    { 1590, 0x9E3779B185EBCA8DULL, { 0xAE5AA10BB05F0E6DULL, 0xEF198B36DBC46609ULL } }, /* XSUM_XXH128_testdata[4772] */\n    { 1591, 0x0000000000000000ULL, { 0xD863C7852DDB5F10ULL, 0x030A9C906CCD0839ULL } }, /* XSUM_XXH128_testdata[4773] */\n    { 1591, 0x000000009E3779B1ULL, { 0x87DF8B260634FD24ULL, 0x84DA4CF3F0C87C0EULL } }, /* XSUM_XXH128_testdata[4774] */\n    { 1591, 0x9E3779B185EBCA8DULL, { 0xFE9C2267D9503D0FULL, 0x9038C1C166438A24ULL } }, /* XSUM_XXH128_testdata[4775] */\n    { 1592, 0x0000000000000000ULL, { 0x2022B8A266768AC2ULL, 0x6A3E84008F4C8430ULL } }, /* XSUM_XXH128_testdata[4776] */\n    { 1592, 0x000000009E3779B1ULL, { 0x0B2445C0FBAE8D62ULL, 0x68FC75DFB3FC01ECULL } }, /* XSUM_XXH128_testdata[4777] */\n    { 1592, 0x9E3779B185EBCA8DULL, { 0xC662236FD63B5820ULL, 0x24DBED8DE36A1756ULL } }, /* XSUM_XXH128_testdata[4778] */\n    { 1593, 0x0000000000000000ULL, { 0xBA04DF2747C3E87BULL, 0xA66841CBC146FC14ULL } }, /* XSUM_XXH128_testdata[4779] */\n    { 1593, 0x000000009E3779B1ULL, { 0xC9F85E2DEB874060ULL, 0x59174ED6BFCE324DULL } }, /* XSUM_XXH128_testdata[4780] */\n    { 1593, 0x9E3779B185EBCA8DULL, { 0x74E98904F9C426C7ULL, 0x8ED4493CB187D2BDULL } }, /* XSUM_XXH128_testdata[4781] */\n    { 1594, 0x0000000000000000ULL, { 0x68779DC926FC7E52ULL, 0x4A02490019DD63C0ULL } }, /* XSUM_XXH128_testdata[4782] */\n    { 1594, 0x000000009E3779B1ULL, { 0x33A89E45D0F3B23BULL, 0xFB85BB05420F3484ULL } }, /* XSUM_XXH128_testdata[4783] */\n    { 1594, 0x9E3779B185EBCA8DULL, { 0x80DD4F7449DC2620ULL, 0x28257DFA7D3071D7ULL } }, /* XSUM_XXH128_testdata[4784] */\n    { 1595, 0x0000000000000000ULL, { 0x2A599C5CCD84D18BULL, 0x20C4D22C4DF2B977ULL } }, /* XSUM_XXH128_testdata[4785] */\n    { 1595, 0x000000009E3779B1ULL, { 0x31F2F7B60BB03ECEULL, 0x9B97E9FB0AC3DA40ULL } }, /* XSUM_XXH128_testdata[4786] */\n    { 1595, 0x9E3779B185EBCA8DULL, { 0x8191AD0EBF33CE41ULL, 0x156BB949B60AA4CBULL } }, /* XSUM_XXH128_testdata[4787] */\n    { 1596, 0x0000000000000000ULL, { 0xA995602BA643AB19ULL, 0x25573184660AD238ULL } }, /* XSUM_XXH128_testdata[4788] */\n    { 1596, 0x000000009E3779B1ULL, { 0x78F8B314967E3767ULL, 0xAFB3FB0C89C83A67ULL } }, /* XSUM_XXH128_testdata[4789] */\n    { 1596, 0x9E3779B185EBCA8DULL, { 0xF373DF9D9F20E755ULL, 0xF0C5ACA307D6E3B2ULL } }, /* XSUM_XXH128_testdata[4790] */\n    { 1597, 0x0000000000000000ULL, { 0x6E38B17B9962B35BULL, 0x1B4974751FDB2C89ULL } }, /* XSUM_XXH128_testdata[4791] */\n    { 1597, 0x000000009E3779B1ULL, { 0x40EA0811E39C160FULL, 0xC48B12F876E2A515ULL } }, /* XSUM_XXH128_testdata[4792] */\n    { 1597, 0x9E3779B185EBCA8DULL, { 0x145F6E75FAAEC511ULL, 0x0E66CE3C45C7F6A2ULL } }, /* XSUM_XXH128_testdata[4793] */\n    { 1598, 0x0000000000000000ULL, { 0x2E423B8EBC700658ULL, 0x022CDB7EF672BE28ULL } }, /* XSUM_XXH128_testdata[4794] */\n    { 1598, 0x000000009E3779B1ULL, { 0x38A5885A0C07479AULL, 0x4DE8551E192BE445ULL } }, /* XSUM_XXH128_testdata[4795] */\n    { 1598, 0x9E3779B185EBCA8DULL, { 0x78A51671DC129C26ULL, 0xDE9F7FB32C02D38BULL } }, /* XSUM_XXH128_testdata[4796] */\n    { 1599, 0x0000000000000000ULL, { 0x4250EA93B2DB41F0ULL, 0x604F5D376B70A991ULL } }, /* XSUM_XXH128_testdata[4797] */\n    { 1599, 0x000000009E3779B1ULL, { 0x943468E14175DFDAULL, 0x5153510A15E31635ULL } }, /* XSUM_XXH128_testdata[4798] */\n    { 1599, 0x9E3779B185EBCA8DULL, { 0xF1EEE97E41EAAB59ULL, 0x153C4A604D421418ULL } }, /* XSUM_XXH128_testdata[4799] */\n    { 1600, 0x0000000000000000ULL, { 0x71FF997900401775ULL, 0x41D6F545968A3C00ULL } }, /* XSUM_XXH128_testdata[4800] */\n    { 1600, 0x000000009E3779B1ULL, { 0x724CEA6E07BF1C6AULL, 0x039A01306B39E51EULL } }, /* XSUM_XXH128_testdata[4801] */\n    { 1600, 0x9E3779B185EBCA8DULL, { 0x5984E7BDFEEF8AF9ULL, 0x6149425AD118CF6AULL } }, /* XSUM_XXH128_testdata[4802] */\n    { 1601, 0x0000000000000000ULL, { 0x22E47641F3402193ULL, 0x2CC3959A4C8295DAULL } }, /* XSUM_XXH128_testdata[4803] */\n    { 1601, 0x000000009E3779B1ULL, { 0xA2D53DA7E09B31F6ULL, 0x37903E10D119CE1BULL } }, /* XSUM_XXH128_testdata[4804] */\n    { 1601, 0x9E3779B185EBCA8DULL, { 0xB624402888163BA7ULL, 0xF40D0000D72D6F37ULL } }, /* XSUM_XXH128_testdata[4805] */\n    { 1602, 0x0000000000000000ULL, { 0xA50DDE1B67EA934FULL, 0x72EB5F498C43B712ULL } }, /* XSUM_XXH128_testdata[4806] */\n    { 1602, 0x000000009E3779B1ULL, { 0x826490298840CA5FULL, 0x189039A3BF2FEB8FULL } }, /* XSUM_XXH128_testdata[4807] */\n    { 1602, 0x9E3779B185EBCA8DULL, { 0xF5C10997A1A43E57ULL, 0x0418122A94763BD5ULL } }, /* XSUM_XXH128_testdata[4808] */\n    { 1603, 0x0000000000000000ULL, { 0x94938C01F4D09D24ULL, 0x7D77DE2CC852EB0FULL } }, /* XSUM_XXH128_testdata[4809] */\n    { 1603, 0x000000009E3779B1ULL, { 0x4DB03D9A521AD753ULL, 0x69DE7B5E70F8536FULL } }, /* XSUM_XXH128_testdata[4810] */\n    { 1603, 0x9E3779B185EBCA8DULL, { 0x2711DB4DDF2692E2ULL, 0x1232478959DD53D2ULL } }, /* XSUM_XXH128_testdata[4811] */\n    { 1604, 0x0000000000000000ULL, { 0xB1F4EDFF84361AD4ULL, 0x52ED8A669638BAEAULL } }, /* XSUM_XXH128_testdata[4812] */\n    { 1604, 0x000000009E3779B1ULL, { 0xD132C7B802386357ULL, 0xC6FA7908D9480D19ULL } }, /* XSUM_XXH128_testdata[4813] */\n    { 1604, 0x9E3779B185EBCA8DULL, { 0xF52B9AC7BA89D7EDULL, 0x86E32EE1BA6CE4CDULL } }, /* XSUM_XXH128_testdata[4814] */\n    { 1605, 0x0000000000000000ULL, { 0xA6E594E6C06C0199ULL, 0x637C2CC223E50EA6ULL } }, /* XSUM_XXH128_testdata[4815] */\n    { 1605, 0x000000009E3779B1ULL, { 0x1C6E0BBEA9C851E6ULL, 0x40F8588B2A530EBFULL } }, /* XSUM_XXH128_testdata[4816] */\n    { 1605, 0x9E3779B185EBCA8DULL, { 0x12E6ED29DB7AC71CULL, 0x09592395E7765961ULL } }, /* XSUM_XXH128_testdata[4817] */\n    { 1606, 0x0000000000000000ULL, { 0x87697AA039DF4CB7ULL, 0x8A7963379B54B015ULL } }, /* XSUM_XXH128_testdata[4818] */\n    { 1606, 0x000000009E3779B1ULL, { 0xA30602D09F9FBB44ULL, 0x792DBDA0A72433B4ULL } }, /* XSUM_XXH128_testdata[4819] */\n    { 1606, 0x9E3779B185EBCA8DULL, { 0x979313367467A225ULL, 0x7D1DFA681029F4FAULL } }, /* XSUM_XXH128_testdata[4820] */\n    { 1607, 0x0000000000000000ULL, { 0x47AE8754657B2C1FULL, 0x3BB7A991BE3016B5ULL } }, /* XSUM_XXH128_testdata[4821] */\n    { 1607, 0x000000009E3779B1ULL, { 0x0A3A51259808D26EULL, 0xD71B38B73B266B88ULL } }, /* XSUM_XXH128_testdata[4822] */\n    { 1607, 0x9E3779B185EBCA8DULL, { 0x48337844D7C78DBAULL, 0x13997B617E972B8DULL } }, /* XSUM_XXH128_testdata[4823] */\n    { 1608, 0x0000000000000000ULL, { 0x12271A02E802A432ULL, 0x94913574AC872C3EULL } }, /* XSUM_XXH128_testdata[4824] */\n    { 1608, 0x000000009E3779B1ULL, { 0xB13270380605AB07ULL, 0xE4E52859854AB0C8ULL } }, /* XSUM_XXH128_testdata[4825] */\n    { 1608, 0x9E3779B185EBCA8DULL, { 0xE0FB066273556224ULL, 0x46EFC63B9EA38C24ULL } }, /* XSUM_XXH128_testdata[4826] */\n    { 1609, 0x0000000000000000ULL, { 0x1297AD9988374E37ULL, 0xDCDD0D79D8AAA329ULL } }, /* XSUM_XXH128_testdata[4827] */\n    { 1609, 0x000000009E3779B1ULL, { 0x6820D2550B5FE403ULL, 0xB8534AC9119E9304ULL } }, /* XSUM_XXH128_testdata[4828] */\n    { 1609, 0x9E3779B185EBCA8DULL, { 0x139B0231FA6AFBBBULL, 0x97BC9E5363F5D8BFULL } }, /* XSUM_XXH128_testdata[4829] */\n    { 1610, 0x0000000000000000ULL, { 0x14B7882A424AE188ULL, 0x6706C52EF1D48C71ULL } }, /* XSUM_XXH128_testdata[4830] */\n    { 1610, 0x000000009E3779B1ULL, { 0xDA3C47A2C583A88EULL, 0x6FA65F0D46C77DCEULL } }, /* XSUM_XXH128_testdata[4831] */\n    { 1610, 0x9E3779B185EBCA8DULL, { 0xD1391165C4114251ULL, 0x1E52062A20D05767ULL } }, /* XSUM_XXH128_testdata[4832] */\n    { 1611, 0x0000000000000000ULL, { 0x765420480C733AA5ULL, 0x957EB0440AB2B4DCULL } }, /* XSUM_XXH128_testdata[4833] */\n    { 1611, 0x000000009E3779B1ULL, { 0x8EA47445EC31436EULL, 0xD4F594EE33C92CA7ULL } }, /* XSUM_XXH128_testdata[4834] */\n    { 1611, 0x9E3779B185EBCA8DULL, { 0x0981C72C51AFC089ULL, 0xC7F4C2C90C4A029EULL } }, /* XSUM_XXH128_testdata[4835] */\n    { 1612, 0x0000000000000000ULL, { 0xA7A2E1C6B74DF5B2ULL, 0x687441922754A28FULL } }, /* XSUM_XXH128_testdata[4836] */\n    { 1612, 0x000000009E3779B1ULL, { 0x9E1BEFC269DB0EA5ULL, 0xB492A445058B8D5DULL } }, /* XSUM_XXH128_testdata[4837] */\n    { 1612, 0x9E3779B185EBCA8DULL, { 0xAB31848E7F122EEBULL, 0x96610148C135C9FCULL } }, /* XSUM_XXH128_testdata[4838] */\n    { 1613, 0x0000000000000000ULL, { 0x67E105DE318E43BAULL, 0x8BAB55A037D67F64ULL } }, /* XSUM_XXH128_testdata[4839] */\n    { 1613, 0x000000009E3779B1ULL, { 0x5B9AAFE009F094E0ULL, 0xD7DD19052DCE0158ULL } }, /* XSUM_XXH128_testdata[4840] */\n    { 1613, 0x9E3779B185EBCA8DULL, { 0xCF882ACCB3F0F8F7ULL, 0x89FE63B55AAE71DDULL } }, /* XSUM_XXH128_testdata[4841] */\n    { 1614, 0x0000000000000000ULL, { 0x99A0079B783E73B6ULL, 0x32D1E0F3C042D7DEULL } }, /* XSUM_XXH128_testdata[4842] */\n    { 1614, 0x000000009E3779B1ULL, { 0x57FCA87789E626FAULL, 0x43CD90D3EC3A2B66ULL } }, /* XSUM_XXH128_testdata[4843] */\n    { 1614, 0x9E3779B185EBCA8DULL, { 0x8FCFA40C58CDE8A6ULL, 0x3A5996131471F1EAULL } }, /* XSUM_XXH128_testdata[4844] */\n    { 1615, 0x0000000000000000ULL, { 0x0858FEE83C484F6CULL, 0x13DC8466F9FE72E9ULL } }, /* XSUM_XXH128_testdata[4845] */\n    { 1615, 0x000000009E3779B1ULL, { 0xBE680AADD556928AULL, 0xBED5DBA978D77843ULL } }, /* XSUM_XXH128_testdata[4846] */\n    { 1615, 0x9E3779B185EBCA8DULL, { 0x0818C90CD2F2F4FDULL, 0x524CA226B9D1554BULL } }, /* XSUM_XXH128_testdata[4847] */\n    { 1616, 0x0000000000000000ULL, { 0x3B8A4AB709227959ULL, 0x02B7365CF903EF77ULL } }, /* XSUM_XXH128_testdata[4848] */\n    { 1616, 0x000000009E3779B1ULL, { 0xB045BDDB2E5D2BF7ULL, 0x54628AEDF210A384ULL } }, /* XSUM_XXH128_testdata[4849] */\n    { 1616, 0x9E3779B185EBCA8DULL, { 0x058048EAE6C53033ULL, 0x95DC71B4FF1CB13DULL } }, /* XSUM_XXH128_testdata[4850] */\n    { 1617, 0x0000000000000000ULL, { 0xAA6A5396B6B40848ULL, 0x934D557757F8A0C8ULL } }, /* XSUM_XXH128_testdata[4851] */\n    { 1617, 0x000000009E3779B1ULL, { 0xFF27CCB4B452AEEDULL, 0xF4D1CC062915322AULL } }, /* XSUM_XXH128_testdata[4852] */\n    { 1617, 0x9E3779B185EBCA8DULL, { 0xE1CAEDB3665A1933ULL, 0xDC6DDEE21647936AULL } }, /* XSUM_XXH128_testdata[4853] */\n    { 1618, 0x0000000000000000ULL, { 0x30C6D76861300D5AULL, 0x96C9E98F4D1CF0A5ULL } }, /* XSUM_XXH128_testdata[4854] */\n    { 1618, 0x000000009E3779B1ULL, { 0xDE8AD75FEFA028A4ULL, 0x7648D644A5228BD4ULL } }, /* XSUM_XXH128_testdata[4855] */\n    { 1618, 0x9E3779B185EBCA8DULL, { 0x5B6C1E42371F2CEDULL, 0x2E37E56840CAD4FCULL } }, /* XSUM_XXH128_testdata[4856] */\n    { 1619, 0x0000000000000000ULL, { 0x41C32C29046DFB1BULL, 0x9A3F1D7F0E2678A4ULL } }, /* XSUM_XXH128_testdata[4857] */\n    { 1619, 0x000000009E3779B1ULL, { 0x38ABE02E461EF2A7ULL, 0x80DFEC43A9E9DA04ULL } }, /* XSUM_XXH128_testdata[4858] */\n    { 1619, 0x9E3779B185EBCA8DULL, { 0x8B03BBBF38A73028ULL, 0xAB115347671AEF4FULL } }, /* XSUM_XXH128_testdata[4859] */\n    { 1620, 0x0000000000000000ULL, { 0xAFF70C02F131727AULL, 0x49F9236E5B0A5B3AULL } }, /* XSUM_XXH128_testdata[4860] */\n    { 1620, 0x000000009E3779B1ULL, { 0xD09F355F072C6DF7ULL, 0x38E2A45DC7B6BF11ULL } }, /* XSUM_XXH128_testdata[4861] */\n    { 1620, 0x9E3779B185EBCA8DULL, { 0x37ECE73A63C9C6E7ULL, 0x58A19EA37359F0FFULL } }, /* XSUM_XXH128_testdata[4862] */\n    { 1621, 0x0000000000000000ULL, { 0x50DA203DB32C676CULL, 0x26444D8365898A51ULL } }, /* XSUM_XXH128_testdata[4863] */\n    { 1621, 0x000000009E3779B1ULL, { 0x26722460078B5B9AULL, 0x0E50FEB1E0B61E14ULL } }, /* XSUM_XXH128_testdata[4864] */\n    { 1621, 0x9E3779B185EBCA8DULL, { 0x5311BE5731F735A4ULL, 0xC57670A5E0D905D5ULL } }, /* XSUM_XXH128_testdata[4865] */\n    { 1622, 0x0000000000000000ULL, { 0x075E01320DD1A984ULL, 0x2EB74118257E4342ULL } }, /* XSUM_XXH128_testdata[4866] */\n    { 1622, 0x000000009E3779B1ULL, { 0xDA5D4ECC8FA78918ULL, 0xE6AA7521E4EAD5FDULL } }, /* XSUM_XXH128_testdata[4867] */\n    { 1622, 0x9E3779B185EBCA8DULL, { 0x83F5BFCA88648CA4ULL, 0x35A49BD4627707D6ULL } }, /* XSUM_XXH128_testdata[4868] */\n    { 1623, 0x0000000000000000ULL, { 0xC17245BEB95F51CCULL, 0x1B0692FC568E0649ULL } }, /* XSUM_XXH128_testdata[4869] */\n    { 1623, 0x000000009E3779B1ULL, { 0xCF3545A824C83C1FULL, 0x8B1DF21824864110ULL } }, /* XSUM_XXH128_testdata[4870] */\n    { 1623, 0x9E3779B185EBCA8DULL, { 0xFB3B4E6C9B25BB52ULL, 0xC960FC3BAFE76317ULL } }, /* XSUM_XXH128_testdata[4871] */\n    { 1624, 0x0000000000000000ULL, { 0x7C4E6FD45D040135ULL, 0x1F4B3D96DE5D9AFDULL } }, /* XSUM_XXH128_testdata[4872] */\n    { 1624, 0x000000009E3779B1ULL, { 0x3B93FA6B1C3B333CULL, 0x0523596073D255AFULL } }, /* XSUM_XXH128_testdata[4873] */\n    { 1624, 0x9E3779B185EBCA8DULL, { 0xF3E579FAE8BEAE00ULL, 0x05EF8EEAA114C150ULL } }, /* XSUM_XXH128_testdata[4874] */\n    { 1625, 0x0000000000000000ULL, { 0xB19353267D0B0A9BULL, 0xD93696629E1F3696ULL } }, /* XSUM_XXH128_testdata[4875] */\n    { 1625, 0x000000009E3779B1ULL, { 0x3D52922A4BCCA490ULL, 0x77706942680D8CC2ULL } }, /* XSUM_XXH128_testdata[4876] */\n    { 1625, 0x9E3779B185EBCA8DULL, { 0x307746B475A22529ULL, 0x5210C08E1A6B91BCULL } }, /* XSUM_XXH128_testdata[4877] */\n    { 1626, 0x0000000000000000ULL, { 0x76749D9B41C79BBFULL, 0xC20EDC1461DD81FEULL } }, /* XSUM_XXH128_testdata[4878] */\n    { 1626, 0x000000009E3779B1ULL, { 0x07A31C32F7523C56ULL, 0xBB19CF3EC6C40A21ULL } }, /* XSUM_XXH128_testdata[4879] */\n    { 1626, 0x9E3779B185EBCA8DULL, { 0x4BF36CBFD5929113ULL, 0xBC0695FD59DACCA3ULL } }, /* XSUM_XXH128_testdata[4880] */\n    { 1627, 0x0000000000000000ULL, { 0xD6E04C9EF0D9EAE0ULL, 0xD5B362310CC6836BULL } }, /* XSUM_XXH128_testdata[4881] */\n    { 1627, 0x000000009E3779B1ULL, { 0x73BCF4CABEB688AEULL, 0xF62A7D893FEE991DULL } }, /* XSUM_XXH128_testdata[4882] */\n    { 1627, 0x9E3779B185EBCA8DULL, { 0x57C9CDC8EC7799F6ULL, 0x18A8EA11FDDD9513ULL } }, /* XSUM_XXH128_testdata[4883] */\n    { 1628, 0x0000000000000000ULL, { 0x65C8FF68B614224DULL, 0x3BC85F89223C7A90ULL } }, /* XSUM_XXH128_testdata[4884] */\n    { 1628, 0x000000009E3779B1ULL, { 0xB2A56449726D3BD5ULL, 0xD33A16227148A17BULL } }, /* XSUM_XXH128_testdata[4885] */\n    { 1628, 0x9E3779B185EBCA8DULL, { 0x14C70C1230F3E37DULL, 0x51D34150EE6EDAD9ULL } }, /* XSUM_XXH128_testdata[4886] */\n    { 1629, 0x0000000000000000ULL, { 0xD6A1C15797266322ULL, 0x9471E73049CA5C4FULL } }, /* XSUM_XXH128_testdata[4887] */\n    { 1629, 0x000000009E3779B1ULL, { 0xC3BD470EF469AF2EULL, 0xA6001D5BD43DF131ULL } }, /* XSUM_XXH128_testdata[4888] */\n    { 1629, 0x9E3779B185EBCA8DULL, { 0x48CA0737C2DAE640ULL, 0xC4CECBA18CAA261CULL } }, /* XSUM_XXH128_testdata[4889] */\n    { 1630, 0x0000000000000000ULL, { 0x4E1F343CC83DC406ULL, 0xFF385ED8A9C49084ULL } }, /* XSUM_XXH128_testdata[4890] */\n    { 1630, 0x000000009E3779B1ULL, { 0x0749230A8D7FA702ULL, 0x03193A2398C38F11ULL } }, /* XSUM_XXH128_testdata[4891] */\n    { 1630, 0x9E3779B185EBCA8DULL, { 0x66E0DB150C7A7C1FULL, 0x452C97E400079BAFULL } }, /* XSUM_XXH128_testdata[4892] */\n    { 1631, 0x0000000000000000ULL, { 0xAF66891B587A8E00ULL, 0x95ABB6A8C479341BULL } }, /* XSUM_XXH128_testdata[4893] */\n    { 1631, 0x000000009E3779B1ULL, { 0xE191D107C5D910CBULL, 0xEEC8275FD3278B12ULL } }, /* XSUM_XXH128_testdata[4894] */\n    { 1631, 0x9E3779B185EBCA8DULL, { 0xB82DC2CE06D93DA0ULL, 0xF23697C235CD9F92ULL } }, /* XSUM_XXH128_testdata[4895] */\n    { 1632, 0x0000000000000000ULL, { 0xAF73A17D73A67E4FULL, 0x6DF71F474663F6CAULL } }, /* XSUM_XXH128_testdata[4896] */\n    { 1632, 0x000000009E3779B1ULL, { 0x905D2F8E7F6CA215ULL, 0x0571D3DF2039ED41ULL } }, /* XSUM_XXH128_testdata[4897] */\n    { 1632, 0x9E3779B185EBCA8DULL, { 0x114DE89BE9154238ULL, 0x2D0AFCE670040B22ULL } }, /* XSUM_XXH128_testdata[4898] */\n    { 1633, 0x0000000000000000ULL, { 0xCBAAF0DF2B180938ULL, 0x2FA001BE52298AE8ULL } }, /* XSUM_XXH128_testdata[4899] */\n    { 1633, 0x000000009E3779B1ULL, { 0x5AA15288AAFD889BULL, 0xA67E7EF856893475ULL } }, /* XSUM_XXH128_testdata[4900] */\n    { 1633, 0x9E3779B185EBCA8DULL, { 0x0B72E53782CAA73AULL, 0xD75B4C84A82DDB2BULL } }, /* XSUM_XXH128_testdata[4901] */\n    { 1634, 0x0000000000000000ULL, { 0x9527CB7715757627ULL, 0x1205D5FE290D2556ULL } }, /* XSUM_XXH128_testdata[4902] */\n    { 1634, 0x000000009E3779B1ULL, { 0xFC7B9A271A03F9F0ULL, 0xEB119C1F048828EFULL } }, /* XSUM_XXH128_testdata[4903] */\n    { 1634, 0x9E3779B185EBCA8DULL, { 0xA732AF53D04AB047ULL, 0x7D9808AEA9656607ULL } }, /* XSUM_XXH128_testdata[4904] */\n    { 1635, 0x0000000000000000ULL, { 0xF3506A787F72DC49ULL, 0x100C9E2D67FA7F68ULL } }, /* XSUM_XXH128_testdata[4905] */\n    { 1635, 0x000000009E3779B1ULL, { 0x38B039CCAAFB78B5ULL, 0x94E33B5F0D819939ULL } }, /* XSUM_XXH128_testdata[4906] */\n    { 1635, 0x9E3779B185EBCA8DULL, { 0xFF6B5F5D0B526102ULL, 0x8937CB6060F1CC56ULL } }, /* XSUM_XXH128_testdata[4907] */\n    { 1636, 0x0000000000000000ULL, { 0xF01532579D0BA6D9ULL, 0x32FE0FFA8408ADFCULL } }, /* XSUM_XXH128_testdata[4908] */\n    { 1636, 0x000000009E3779B1ULL, { 0x410F1D8427C4F7FDULL, 0xE74B0F97F55D3860ULL } }, /* XSUM_XXH128_testdata[4909] */\n    { 1636, 0x9E3779B185EBCA8DULL, { 0x6B68A4D5AD606A8AULL, 0x29B7579C9D97F80AULL } }, /* XSUM_XXH128_testdata[4910] */\n    { 1637, 0x0000000000000000ULL, { 0xB69DE7BA82EFD875ULL, 0xCEE64EED3DAB3275ULL } }, /* XSUM_XXH128_testdata[4911] */\n    { 1637, 0x000000009E3779B1ULL, { 0x2797057591EDEAAFULL, 0xE7278220B456F6E0ULL } }, /* XSUM_XXH128_testdata[4912] */\n    { 1637, 0x9E3779B185EBCA8DULL, { 0xBBF9D11E0B127B7BULL, 0x0BF4B0D36A4A1954ULL } }, /* XSUM_XXH128_testdata[4913] */\n    { 1638, 0x0000000000000000ULL, { 0x9E759E7D2EA04907ULL, 0xCEBF046D08F3D1E5ULL } }, /* XSUM_XXH128_testdata[4914] */\n    { 1638, 0x000000009E3779B1ULL, { 0xA6DE9FA13C01E5D0ULL, 0xEC141B07E9CE5874ULL } }, /* XSUM_XXH128_testdata[4915] */\n    { 1638, 0x9E3779B185EBCA8DULL, { 0x1450D25D3E22B389ULL, 0x369C013222BA67C0ULL } }, /* XSUM_XXH128_testdata[4916] */\n    { 1639, 0x0000000000000000ULL, { 0x01269D1AC5DC8866ULL, 0x1868DE788E46713CULL } }, /* XSUM_XXH128_testdata[4917] */\n    { 1639, 0x000000009E3779B1ULL, { 0x12321E2BD426AC53ULL, 0xDAF8F38F7002453BULL } }, /* XSUM_XXH128_testdata[4918] */\n    { 1639, 0x9E3779B185EBCA8DULL, { 0xEEE6A6FA68BFD87AULL, 0x8B60D689A6701280ULL } }, /* XSUM_XXH128_testdata[4919] */\n    { 1640, 0x0000000000000000ULL, { 0x8F5B615C253FC230ULL, 0xA35EF3100E10D95FULL } }, /* XSUM_XXH128_testdata[4920] */\n    { 1640, 0x000000009E3779B1ULL, { 0x4E4B57B4E4CC2494ULL, 0x121113AFE08B4DC0ULL } }, /* XSUM_XXH128_testdata[4921] */\n    { 1640, 0x9E3779B185EBCA8DULL, { 0x6478EDFD1874F981ULL, 0xD0EC55334F8DA3F5ULL } }, /* XSUM_XXH128_testdata[4922] */\n    { 1641, 0x0000000000000000ULL, { 0xD3703DB9BB6EF8FFULL, 0x355510A559047CD0ULL } }, /* XSUM_XXH128_testdata[4923] */\n    { 1641, 0x000000009E3779B1ULL, { 0x7BE6979E77E3DEA9ULL, 0xBBF5B754A6E13555ULL } }, /* XSUM_XXH128_testdata[4924] */\n    { 1641, 0x9E3779B185EBCA8DULL, { 0x62D010D1C4F5576DULL, 0x527176E9AB01FF75ULL } }, /* XSUM_XXH128_testdata[4925] */\n    { 1642, 0x0000000000000000ULL, { 0x3C81BC738A8E8163ULL, 0x443C0159331D2436ULL } }, /* XSUM_XXH128_testdata[4926] */\n    { 1642, 0x000000009E3779B1ULL, { 0xF0AFEFC1CB7F39E3ULL, 0x9D464B20060964A9ULL } }, /* XSUM_XXH128_testdata[4927] */\n    { 1642, 0x9E3779B185EBCA8DULL, { 0xA50FCCD23CB089ADULL, 0x3557F5AC771FC99AULL } }, /* XSUM_XXH128_testdata[4928] */\n    { 1643, 0x0000000000000000ULL, { 0x5F5445667F780B4AULL, 0x3DC8E67A069F6F70ULL } }, /* XSUM_XXH128_testdata[4929] */\n    { 1643, 0x000000009E3779B1ULL, { 0xB30E4863247EEE3BULL, 0xF38947DE3AA55ED1ULL } }, /* XSUM_XXH128_testdata[4930] */\n    { 1643, 0x9E3779B185EBCA8DULL, { 0xCD803F4570D469D0ULL, 0xD83D08592A74FC84ULL } }, /* XSUM_XXH128_testdata[4931] */\n    { 1644, 0x0000000000000000ULL, { 0xE2BDF51648BBA936ULL, 0x5DB0DFCEF864A54CULL } }, /* XSUM_XXH128_testdata[4932] */\n    { 1644, 0x000000009E3779B1ULL, { 0x9C1517E184C4EC67ULL, 0x31D63DEBBB0EDEFFULL } }, /* XSUM_XXH128_testdata[4933] */\n    { 1644, 0x9E3779B185EBCA8DULL, { 0x35B1A3249ECF3464ULL, 0x53DD2E76F6166E8DULL } }, /* XSUM_XXH128_testdata[4934] */\n    { 1645, 0x0000000000000000ULL, { 0x8D98BFBEEF6C3CC7ULL, 0xD7D2FC69A93B3759ULL } }, /* XSUM_XXH128_testdata[4935] */\n    { 1645, 0x000000009E3779B1ULL, { 0xA868435A190F4011ULL, 0x078392C51D4EE490ULL } }, /* XSUM_XXH128_testdata[4936] */\n    { 1645, 0x9E3779B185EBCA8DULL, { 0xA90FCAF5D4A644E7ULL, 0x130C8AF939CD0432ULL } }, /* XSUM_XXH128_testdata[4937] */\n    { 1646, 0x0000000000000000ULL, { 0x67E887DFAEF4DAB2ULL, 0x5CD753656FD355F7ULL } }, /* XSUM_XXH128_testdata[4938] */\n    { 1646, 0x000000009E3779B1ULL, { 0xD4A0D00D9E3F919FULL, 0xAD711B1946700CD0ULL } }, /* XSUM_XXH128_testdata[4939] */\n    { 1646, 0x9E3779B185EBCA8DULL, { 0x8A00FCF5A57F6B2AULL, 0x54BB590D4DF956C6ULL } }, /* XSUM_XXH128_testdata[4940] */\n    { 1647, 0x0000000000000000ULL, { 0x0C424D06E1B35917ULL, 0xF833FC395B476AD0ULL } }, /* XSUM_XXH128_testdata[4941] */\n    { 1647, 0x000000009E3779B1ULL, { 0xFCAE9FE225F4A599ULL, 0x3FE08D8A6CE9CADCULL } }, /* XSUM_XXH128_testdata[4942] */\n    { 1647, 0x9E3779B185EBCA8DULL, { 0x2CDF0C10241732C0ULL, 0x946070172FAE2D35ULL } }, /* XSUM_XXH128_testdata[4943] */\n    { 1648, 0x0000000000000000ULL, { 0x4EF489B5D71A4003ULL, 0x7636263EB349B58BULL } }, /* XSUM_XXH128_testdata[4944] */\n    { 1648, 0x000000009E3779B1ULL, { 0x3DC656964B7D7DA2ULL, 0x9DB3AADE595EC59CULL } }, /* XSUM_XXH128_testdata[4945] */\n    { 1648, 0x9E3779B185EBCA8DULL, { 0x77B9713EEC425B81ULL, 0x9C0514B1954C26D0ULL } }, /* XSUM_XXH128_testdata[4946] */\n    { 1649, 0x0000000000000000ULL, { 0xC29F4F6458B40232ULL, 0xCB9D4F5F9A3580C4ULL } }, /* XSUM_XXH128_testdata[4947] */\n    { 1649, 0x000000009E3779B1ULL, { 0xE8EC82CD04E2589CULL, 0x65BACD8B38B455ECULL } }, /* XSUM_XXH128_testdata[4948] */\n    { 1649, 0x9E3779B185EBCA8DULL, { 0x90F4D5B5908D43E3ULL, 0x16DB76FC85D2E164ULL } }, /* XSUM_XXH128_testdata[4949] */\n    { 1650, 0x0000000000000000ULL, { 0xAA6465C49BF0B5C6ULL, 0x7DC9E3CF5692ADFAULL } }, /* XSUM_XXH128_testdata[4950] */\n    { 1650, 0x000000009E3779B1ULL, { 0x865021C45BC96B02ULL, 0xABB5B7EC5942B17CULL } }, /* XSUM_XXH128_testdata[4951] */\n    { 1650, 0x9E3779B185EBCA8DULL, { 0xA1D1F284DECA2C8EULL, 0x1FBFD11D5508E63AULL } }, /* XSUM_XXH128_testdata[4952] */\n    { 1651, 0x0000000000000000ULL, { 0xC8401D2FC2B52852ULL, 0x2709465FF82533A8ULL } }, /* XSUM_XXH128_testdata[4953] */\n    { 1651, 0x000000009E3779B1ULL, { 0x23147346353CCA8DULL, 0xCA18D009C37DD24BULL } }, /* XSUM_XXH128_testdata[4954] */\n    { 1651, 0x9E3779B185EBCA8DULL, { 0x992C175AD669C528ULL, 0x5A4A84A186A100DDULL } }, /* XSUM_XXH128_testdata[4955] */\n    { 1652, 0x0000000000000000ULL, { 0x893BF660E7D10AC0ULL, 0x58E31E78526B7A6AULL } }, /* XSUM_XXH128_testdata[4956] */\n    { 1652, 0x000000009E3779B1ULL, { 0x6D9CB64B3C48F637ULL, 0x003D738A9A810E3AULL } }, /* XSUM_XXH128_testdata[4957] */\n    { 1652, 0x9E3779B185EBCA8DULL, { 0xA4A0679F2E0C8A4FULL, 0x988EFDC85D071A31ULL } }, /* XSUM_XXH128_testdata[4958] */\n    { 1653, 0x0000000000000000ULL, { 0x8763E5C3902926A6ULL, 0x3096BFBC8374AD2AULL } }, /* XSUM_XXH128_testdata[4959] */\n    { 1653, 0x000000009E3779B1ULL, { 0xDC3BDA00F3AEBCE2ULL, 0x589D20E48390B334ULL } }, /* XSUM_XXH128_testdata[4960] */\n    { 1653, 0x9E3779B185EBCA8DULL, { 0x7F184DE567358F30ULL, 0x88CBDBF4CFAD9CC6ULL } }, /* XSUM_XXH128_testdata[4961] */\n    { 1654, 0x0000000000000000ULL, { 0xB0A10F0E35C22309ULL, 0x2B83CAB3E8B70460ULL } }, /* XSUM_XXH128_testdata[4962] */\n    { 1654, 0x000000009E3779B1ULL, { 0xE0C497C804461B88ULL, 0x58D7A473E954239FULL } }, /* XSUM_XXH128_testdata[4963] */\n    { 1654, 0x9E3779B185EBCA8DULL, { 0x3BFD1B41229251F7ULL, 0x5DDB1720525041F3ULL } }, /* XSUM_XXH128_testdata[4964] */\n    { 1655, 0x0000000000000000ULL, { 0x47A4A388520B2D06ULL, 0x3A10DC0282EBD013ULL } }, /* XSUM_XXH128_testdata[4965] */\n    { 1655, 0x000000009E3779B1ULL, { 0x951C0B2247A278CBULL, 0x64C9C7D20AD73196ULL } }, /* XSUM_XXH128_testdata[4966] */\n    { 1655, 0x9E3779B185EBCA8DULL, { 0xAA0804050E3C54B0ULL, 0xDBF13CFB053E1638ULL } }, /* XSUM_XXH128_testdata[4967] */\n    { 1656, 0x0000000000000000ULL, { 0xA5F5C1240239878CULL, 0xCD5309C65285D767ULL } }, /* XSUM_XXH128_testdata[4968] */\n    { 1656, 0x000000009E3779B1ULL, { 0xD7D7D6978C169C08ULL, 0xF158ABF0B295E6B2ULL } }, /* XSUM_XXH128_testdata[4969] */\n    { 1656, 0x9E3779B185EBCA8DULL, { 0x6F92386CEE0B255EULL, 0xA440DA60B15B8DC5ULL } }, /* XSUM_XXH128_testdata[4970] */\n    { 1657, 0x0000000000000000ULL, { 0xF78E73264BD347E5ULL, 0x82BC2111BC578BAEULL } }, /* XSUM_XXH128_testdata[4971] */\n    { 1657, 0x000000009E3779B1ULL, { 0xB04BDB24EAFE7485ULL, 0x81A537A04E613B45ULL } }, /* XSUM_XXH128_testdata[4972] */\n    { 1657, 0x9E3779B185EBCA8DULL, { 0xB906F1EBE6B73016ULL, 0x4CC19F1CF5725847ULL } }, /* XSUM_XXH128_testdata[4973] */\n    { 1658, 0x0000000000000000ULL, { 0x892BDCED877DE45CULL, 0x8068EB93EB765F33ULL } }, /* XSUM_XXH128_testdata[4974] */\n    { 1658, 0x000000009E3779B1ULL, { 0x12E34A086D0798AFULL, 0x4690D6803E92454DULL } }, /* XSUM_XXH128_testdata[4975] */\n    { 1658, 0x9E3779B185EBCA8DULL, { 0x1F87EAD446661AE5ULL, 0x3CCE5F14F4DE3951ULL } }, /* XSUM_XXH128_testdata[4976] */\n    { 1659, 0x0000000000000000ULL, { 0xBAA08E5BEA937434ULL, 0xED3658D64C2E30F3ULL } }, /* XSUM_XXH128_testdata[4977] */\n    { 1659, 0x000000009E3779B1ULL, { 0x09F725D00054D38BULL, 0xAD07DE8CF154D724ULL } }, /* XSUM_XXH128_testdata[4978] */\n    { 1659, 0x9E3779B185EBCA8DULL, { 0x3533F879AA51BB0AULL, 0x42B92E7D4D685197ULL } }, /* XSUM_XXH128_testdata[4979] */\n    { 1660, 0x0000000000000000ULL, { 0xF99BC5586AE8F084ULL, 0x8690782DCED1FA67ULL } }, /* XSUM_XXH128_testdata[4980] */\n    { 1660, 0x000000009E3779B1ULL, { 0x32152AC1BD30A630ULL, 0x09AF24A4A777EA29ULL } }, /* XSUM_XXH128_testdata[4981] */\n    { 1660, 0x9E3779B185EBCA8DULL, { 0xA4A58945B90F8025ULL, 0x9D7647755CE07306ULL } }, /* XSUM_XXH128_testdata[4982] */\n    { 1661, 0x0000000000000000ULL, { 0x4821F4141C3CAFF1ULL, 0x9744CC2E84AADA35ULL } }, /* XSUM_XXH128_testdata[4983] */\n    { 1661, 0x000000009E3779B1ULL, { 0x1CE52103AC987539ULL, 0xEDFCFDD3FC67EC68ULL } }, /* XSUM_XXH128_testdata[4984] */\n    { 1661, 0x9E3779B185EBCA8DULL, { 0x6DC45E039BC0FD99ULL, 0xB2B565632DCE6E20ULL } }, /* XSUM_XXH128_testdata[4985] */\n    { 1662, 0x0000000000000000ULL, { 0xAC0F5BF2D6BB23EDULL, 0xF8274018FD664E3AULL } }, /* XSUM_XXH128_testdata[4986] */\n    { 1662, 0x000000009E3779B1ULL, { 0xA3BF0E896B0806DAULL, 0x26B1525398B27B71ULL } }, /* XSUM_XXH128_testdata[4987] */\n    { 1662, 0x9E3779B185EBCA8DULL, { 0x4A2FAE9ADD0AF634ULL, 0x5729CC60F00A3E61ULL } }, /* XSUM_XXH128_testdata[4988] */\n    { 1663, 0x0000000000000000ULL, { 0x0BB65AE615658F7EULL, 0x820E455C68525AEAULL } }, /* XSUM_XXH128_testdata[4989] */\n    { 1663, 0x000000009E3779B1ULL, { 0xFCBA4A9ECD7E2063ULL, 0x8BBF47DD427E63B8ULL } }, /* XSUM_XXH128_testdata[4990] */\n    { 1663, 0x9E3779B185EBCA8DULL, { 0xA5F3DC0D801A84DCULL, 0x62DF6056E3E9E9BFULL } }, /* XSUM_XXH128_testdata[4991] */\n    { 1664, 0x0000000000000000ULL, { 0xDC8EE644ACBF2296ULL, 0x7596FB35DB291707ULL } }, /* XSUM_XXH128_testdata[4992] */\n    { 1664, 0x000000009E3779B1ULL, { 0x69166E3D69759D5FULL, 0x5E079F754BF57098ULL } }, /* XSUM_XXH128_testdata[4993] */\n    { 1664, 0x9E3779B185EBCA8DULL, { 0x0C1F83E678A50DCAULL, 0x0FAF6EEDB213DB7AULL } }, /* XSUM_XXH128_testdata[4994] */\n    { 1665, 0x0000000000000000ULL, { 0x014559DF7B3BCE5EULL, 0x5D3B04DCE584E78AULL } }, /* XSUM_XXH128_testdata[4995] */\n    { 1665, 0x000000009E3779B1ULL, { 0x3F1F0CB6625FB25BULL, 0x045C690F8D17464CULL } }, /* XSUM_XXH128_testdata[4996] */\n    { 1665, 0x9E3779B185EBCA8DULL, { 0x9B5B643B44FB2BD8ULL, 0xBED7CAD0105647FBULL } }, /* XSUM_XXH128_testdata[4997] */\n    { 1666, 0x0000000000000000ULL, { 0x9292914EF2E7DF06ULL, 0xC0D02E4DF88DEC2BULL } }, /* XSUM_XXH128_testdata[4998] */\n    { 1666, 0x000000009E3779B1ULL, { 0x0528818F35A2275FULL, 0xFFD2FDA76C0E499CULL } }, /* XSUM_XXH128_testdata[4999] */\n    { 1666, 0x9E3779B185EBCA8DULL, { 0xC53EBCB771C28F31ULL, 0xE0955937E4F75077ULL } }, /* XSUM_XXH128_testdata[5000] */\n    { 1667, 0x0000000000000000ULL, { 0x6319CCBAFF5746EBULL, 0x2520DD127BEFAEB1ULL } }, /* XSUM_XXH128_testdata[5001] */\n    { 1667, 0x000000009E3779B1ULL, { 0x1A41B96E2373F7C8ULL, 0xE7E0322670B8FC98ULL } }, /* XSUM_XXH128_testdata[5002] */\n    { 1667, 0x9E3779B185EBCA8DULL, { 0x3B78F255E325D32AULL, 0x203864EB779693D3ULL } }, /* XSUM_XXH128_testdata[5003] */\n    { 1668, 0x0000000000000000ULL, { 0x7C020819254B1D09ULL, 0x290CED97E070EC82ULL } }, /* XSUM_XXH128_testdata[5004] */\n    { 1668, 0x000000009E3779B1ULL, { 0x1734ABC823CDC4E0ULL, 0x4D235831226CC27BULL } }, /* XSUM_XXH128_testdata[5005] */\n    { 1668, 0x9E3779B185EBCA8DULL, { 0x300D3932D739495EULL, 0x0116F7FEF46095B8ULL } }, /* XSUM_XXH128_testdata[5006] */\n    { 1669, 0x0000000000000000ULL, { 0x9F79BB9126872BD3ULL, 0x029A7BEB35921765ULL } }, /* XSUM_XXH128_testdata[5007] */\n    { 1669, 0x000000009E3779B1ULL, { 0x5B18EC3F60779541ULL, 0xBB3DB1D88BF0F3A0ULL } }, /* XSUM_XXH128_testdata[5008] */\n    { 1669, 0x9E3779B185EBCA8DULL, { 0xA5A7359367C0103BULL, 0x8B72E7C482304367ULL } }, /* XSUM_XXH128_testdata[5009] */\n    { 1670, 0x0000000000000000ULL, { 0xFB48C25F3BDA21CFULL, 0x58A9E074FFF3C6CFULL } }, /* XSUM_XXH128_testdata[5010] */\n    { 1670, 0x000000009E3779B1ULL, { 0xA7CB2C0A892252BEULL, 0x844C9F1A0A32CB60ULL } }, /* XSUM_XXH128_testdata[5011] */\n    { 1670, 0x9E3779B185EBCA8DULL, { 0x23AA179A02C66BDFULL, 0x905D4F47D15F8BDCULL } }, /* XSUM_XXH128_testdata[5012] */\n    { 1671, 0x0000000000000000ULL, { 0xA5CE283DD784296AULL, 0x0A322CA31C600887ULL } }, /* XSUM_XXH128_testdata[5013] */\n    { 1671, 0x000000009E3779B1ULL, { 0xBE07B9326237CA0BULL, 0x8509F86E24CABC02ULL } }, /* XSUM_XXH128_testdata[5014] */\n    { 1671, 0x9E3779B185EBCA8DULL, { 0x84A0B9F6703042E7ULL, 0x07AE2510BDB562A4ULL } }, /* XSUM_XXH128_testdata[5015] */\n    { 1672, 0x0000000000000000ULL, { 0x1A72E2F2B48C2615ULL, 0x89288C842EC926AAULL } }, /* XSUM_XXH128_testdata[5016] */\n    { 1672, 0x000000009E3779B1ULL, { 0xD599817A6F3B24B2ULL, 0x9DAC72DAB7B8B236ULL } }, /* XSUM_XXH128_testdata[5017] */\n    { 1672, 0x9E3779B185EBCA8DULL, { 0xFB7361C7BDDDFE5FULL, 0x09695F8FFE30AF61ULL } }, /* XSUM_XXH128_testdata[5018] */\n    { 1673, 0x0000000000000000ULL, { 0x65A5121142E2BE9CULL, 0x9202BC85D886C172ULL } }, /* XSUM_XXH128_testdata[5019] */\n    { 1673, 0x000000009E3779B1ULL, { 0xBA0387BFAAA033DEULL, 0x72B10F5E6390EB32ULL } }, /* XSUM_XXH128_testdata[5020] */\n    { 1673, 0x9E3779B185EBCA8DULL, { 0x6B49D15017288741ULL, 0x54D98FCABC486C80ULL } }, /* XSUM_XXH128_testdata[5021] */\n    { 1674, 0x0000000000000000ULL, { 0x3C80D630C9D18076ULL, 0x3C2940085F38EC85ULL } }, /* XSUM_XXH128_testdata[5022] */\n    { 1674, 0x000000009E3779B1ULL, { 0xC65B88994E953BD4ULL, 0xA5AE45EACCB7284FULL } }, /* XSUM_XXH128_testdata[5023] */\n    { 1674, 0x9E3779B185EBCA8DULL, { 0x97E2B18D6520EC8BULL, 0x4DEDC76C796F6FC3ULL } }, /* XSUM_XXH128_testdata[5024] */\n    { 1675, 0x0000000000000000ULL, { 0x8C49D14ECB693501ULL, 0x5CBCB6B980717D72ULL } }, /* XSUM_XXH128_testdata[5025] */\n    { 1675, 0x000000009E3779B1ULL, { 0x94557B9A3A50A097ULL, 0x1CB74CAA3B04734BULL } }, /* XSUM_XXH128_testdata[5026] */\n    { 1675, 0x9E3779B185EBCA8DULL, { 0xA6646B75FE02BB12ULL, 0x170D4ED192C3850DULL } }, /* XSUM_XXH128_testdata[5027] */\n    { 1676, 0x0000000000000000ULL, { 0x4A71996DA2703AA2ULL, 0x24357EA7C797D429ULL } }, /* XSUM_XXH128_testdata[5028] */\n    { 1676, 0x000000009E3779B1ULL, { 0x4A08E5A2F99D2A7AULL, 0xAC88C545C7AB1D87ULL } }, /* XSUM_XXH128_testdata[5029] */\n    { 1676, 0x9E3779B185EBCA8DULL, { 0x8A82052F3E2A7775ULL, 0x8EB9BD10C71D756EULL } }, /* XSUM_XXH128_testdata[5030] */\n    { 1677, 0x0000000000000000ULL, { 0x7C13B730BFB06745ULL, 0xD9657FC0D874953AULL } }, /* XSUM_XXH128_testdata[5031] */\n    { 1677, 0x000000009E3779B1ULL, { 0x9AF15854E4E1BD4FULL, 0xE3D4CE805AAE01F4ULL } }, /* XSUM_XXH128_testdata[5032] */\n    { 1677, 0x9E3779B185EBCA8DULL, { 0x5ECB30648A07C440ULL, 0xE28E7847C659E48EULL } }, /* XSUM_XXH128_testdata[5033] */\n    { 1678, 0x0000000000000000ULL, { 0xB8FC2127B368C28DULL, 0x3EC748101B0B2277ULL } }, /* XSUM_XXH128_testdata[5034] */\n    { 1678, 0x000000009E3779B1ULL, { 0xF6CD44D0D5310646ULL, 0x812085D5E05A172CULL } }, /* XSUM_XXH128_testdata[5035] */\n    { 1678, 0x9E3779B185EBCA8DULL, { 0x23D8232F426474B0ULL, 0xBE2EF7D552E85D58ULL } }, /* XSUM_XXH128_testdata[5036] */\n    { 1679, 0x0000000000000000ULL, { 0xC27A6F17D271D67FULL, 0x6555D1E8484CC673ULL } }, /* XSUM_XXH128_testdata[5037] */\n    { 1679, 0x000000009E3779B1ULL, { 0x78D7D285EFEE2B2EULL, 0xCB2569A80A131699ULL } }, /* XSUM_XXH128_testdata[5038] */\n    { 1679, 0x9E3779B185EBCA8DULL, { 0xF63AEC58CBDC4A05ULL, 0x6BA6F9683E4008CEULL } }, /* XSUM_XXH128_testdata[5039] */\n    { 1680, 0x0000000000000000ULL, { 0x5BD2201FEEFBF2D8ULL, 0xE775BAA980036F10ULL } }, /* XSUM_XXH128_testdata[5040] */\n    { 1680, 0x000000009E3779B1ULL, { 0xD72D3FA68162B080ULL, 0x888CBBD9A50A41D2ULL } }, /* XSUM_XXH128_testdata[5041] */\n    { 1680, 0x9E3779B185EBCA8DULL, { 0xE86AD5E291F27C27ULL, 0xA485A9FCA6EB7220ULL } }, /* XSUM_XXH128_testdata[5042] */\n    { 1681, 0x0000000000000000ULL, { 0xDD992FD8D1588751ULL, 0xB221374FE3CB0D49ULL } }, /* XSUM_XXH128_testdata[5043] */\n    { 1681, 0x000000009E3779B1ULL, { 0x4A8A35E4DCB683CFULL, 0xD1A9F9C2F3498F1EULL } }, /* XSUM_XXH128_testdata[5044] */\n    { 1681, 0x9E3779B185EBCA8DULL, { 0x505DDB442932F139ULL, 0xF787E424DA9EF1F4ULL } }, /* XSUM_XXH128_testdata[5045] */\n    { 1682, 0x0000000000000000ULL, { 0x5A11F9CECF0A742BULL, 0xC012C4DF0D5E6520ULL } }, /* XSUM_XXH128_testdata[5046] */\n    { 1682, 0x000000009E3779B1ULL, { 0xE44FFD16C57E3577ULL, 0x6C295FFC8D8331DFULL } }, /* XSUM_XXH128_testdata[5047] */\n    { 1682, 0x9E3779B185EBCA8DULL, { 0x69EBBEFE26FC011EULL, 0xBFE87E950A794656ULL } }, /* XSUM_XXH128_testdata[5048] */\n    { 1683, 0x0000000000000000ULL, { 0xCB713E69A99DA847ULL, 0x46B12D3B8FA28797ULL } }, /* XSUM_XXH128_testdata[5049] */\n    { 1683, 0x000000009E3779B1ULL, { 0x790C6A8C9BB6760AULL, 0x3A3D18691E85DBDDULL } }, /* XSUM_XXH128_testdata[5050] */\n    { 1683, 0x9E3779B185EBCA8DULL, { 0x8D6606AC9FD32978ULL, 0x7409152C9689EC69ULL } }, /* XSUM_XXH128_testdata[5051] */\n    { 1684, 0x0000000000000000ULL, { 0x2678A2C83F2FFE65ULL, 0x8BBE994323CD95BAULL } }, /* XSUM_XXH128_testdata[5052] */\n    { 1684, 0x000000009E3779B1ULL, { 0xE974783D0376379FULL, 0xF73F4BA5AE3D6FE8ULL } }, /* XSUM_XXH128_testdata[5053] */\n    { 1684, 0x9E3779B185EBCA8DULL, { 0xDF10EC5B417F2A6DULL, 0x7935F61FCADE8B9FULL } }, /* XSUM_XXH128_testdata[5054] */\n    { 1685, 0x0000000000000000ULL, { 0x187EEB97E80FA75DULL, 0x7135B7EAD4B2F503ULL } }, /* XSUM_XXH128_testdata[5055] */\n    { 1685, 0x000000009E3779B1ULL, { 0xF9B6AE08E9B92A8EULL, 0x77F71B318DDB720DULL } }, /* XSUM_XXH128_testdata[5056] */\n    { 1685, 0x9E3779B185EBCA8DULL, { 0xF344B102FBB78C5CULL, 0x4B7C6CE8EE5D8A94ULL } }, /* XSUM_XXH128_testdata[5057] */\n    { 1686, 0x0000000000000000ULL, { 0x94A6908662A06FDFULL, 0x66B2D73AC280A5EAULL } }, /* XSUM_XXH128_testdata[5058] */\n    { 1686, 0x000000009E3779B1ULL, { 0x87AB664292D728F3ULL, 0x1C571BE701AD3768ULL } }, /* XSUM_XXH128_testdata[5059] */\n    { 1686, 0x9E3779B185EBCA8DULL, { 0x30129847B7F8E487ULL, 0x37659D3D163E2423ULL } }, /* XSUM_XXH128_testdata[5060] */\n    { 1687, 0x0000000000000000ULL, { 0x6A895C80F46F85CDULL, 0xB22DD3F1119D3B33ULL } }, /* XSUM_XXH128_testdata[5061] */\n    { 1687, 0x000000009E3779B1ULL, { 0x6E1960F42146865AULL, 0x5AF2AD6AB2C2D2F4ULL } }, /* XSUM_XXH128_testdata[5062] */\n    { 1687, 0x9E3779B185EBCA8DULL, { 0x42AE31207908CC48ULL, 0x2C524F5DF7C83340ULL } }, /* XSUM_XXH128_testdata[5063] */\n    { 1688, 0x0000000000000000ULL, { 0x87BCA4695B2DDE93ULL, 0xAA21545F1257D29FULL } }, /* XSUM_XXH128_testdata[5064] */\n    { 1688, 0x000000009E3779B1ULL, { 0x84F7A71E82C3540EULL, 0xA707994CCCEBF53BULL } }, /* XSUM_XXH128_testdata[5065] */\n    { 1688, 0x9E3779B185EBCA8DULL, { 0xBFB1490777061F65ULL, 0x34FE7F355DC466DDULL } }, /* XSUM_XXH128_testdata[5066] */\n    { 1689, 0x0000000000000000ULL, { 0xF6E6E4CC2E17EBA0ULL, 0x403FA172ABBE6310ULL } }, /* XSUM_XXH128_testdata[5067] */\n    { 1689, 0x000000009E3779B1ULL, { 0x984D7E1419B8EF51ULL, 0x9F36508D4D0C4B62ULL } }, /* XSUM_XXH128_testdata[5068] */\n    { 1689, 0x9E3779B185EBCA8DULL, { 0x0BF130EAE0CF0AB8ULL, 0xA09F06FB19076AB1ULL } }, /* XSUM_XXH128_testdata[5069] */\n    { 1690, 0x0000000000000000ULL, { 0x0380D89B487C0FB3ULL, 0xC1B7BC34962D221AULL } }, /* XSUM_XXH128_testdata[5070] */\n    { 1690, 0x000000009E3779B1ULL, { 0x88A40A574B89148DULL, 0xBA88848C0519D41BULL } }, /* XSUM_XXH128_testdata[5071] */\n    { 1690, 0x9E3779B185EBCA8DULL, { 0xBC9398A56DFD3815ULL, 0xBF8E34237A0090E0ULL } }, /* XSUM_XXH128_testdata[5072] */\n    { 1691, 0x0000000000000000ULL, { 0xA59785EE66C08AA9ULL, 0x8323BDE1D034B05CULL } }, /* XSUM_XXH128_testdata[5073] */\n    { 1691, 0x000000009E3779B1ULL, { 0x33871969B04BCC36ULL, 0xB62563162F52EC61ULL } }, /* XSUM_XXH128_testdata[5074] */\n    { 1691, 0x9E3779B185EBCA8DULL, { 0x35666ACBF09F4EB9ULL, 0xD516613027518B42ULL } }, /* XSUM_XXH128_testdata[5075] */\n    { 1692, 0x0000000000000000ULL, { 0xBC427B4C7F5256D8ULL, 0xA51E277F163B594DULL } }, /* XSUM_XXH128_testdata[5076] */\n    { 1692, 0x000000009E3779B1ULL, { 0xFE095BC861DC119BULL, 0x666951CCCC31BD0BULL } }, /* XSUM_XXH128_testdata[5077] */\n    { 1692, 0x9E3779B185EBCA8DULL, { 0x14E5B49F2E28B5C5ULL, 0xAC9724E31308A4C7ULL } }, /* XSUM_XXH128_testdata[5078] */\n    { 1693, 0x0000000000000000ULL, { 0x4472B38397711962ULL, 0x2FB56AD8339A5058ULL } }, /* XSUM_XXH128_testdata[5079] */\n    { 1693, 0x000000009E3779B1ULL, { 0x8789547C315FA196ULL, 0xB67EE222F15D53F4ULL } }, /* XSUM_XXH128_testdata[5080] */\n    { 1693, 0x9E3779B185EBCA8DULL, { 0xE1FC2B1250738986ULL, 0x547BC87FD674071BULL } }, /* XSUM_XXH128_testdata[5081] */\n    { 1694, 0x0000000000000000ULL, { 0x0712FDD21FF67C14ULL, 0x7F5CEDD21BCDE71BULL } }, /* XSUM_XXH128_testdata[5082] */\n    { 1694, 0x000000009E3779B1ULL, { 0x0C87D2D661099879ULL, 0xB100E17D20F5B7EAULL } }, /* XSUM_XXH128_testdata[5083] */\n    { 1694, 0x9E3779B185EBCA8DULL, { 0x799AB06A78FF90E6ULL, 0x0579FF43839BB82FULL } }, /* XSUM_XXH128_testdata[5084] */\n    { 1695, 0x0000000000000000ULL, { 0xF64A2BBD33693E84ULL, 0xA03E542B8A4B9E8EULL } }, /* XSUM_XXH128_testdata[5085] */\n    { 1695, 0x000000009E3779B1ULL, { 0x387FA6213630B458ULL, 0x2ACE07B1DA12DF86ULL } }, /* XSUM_XXH128_testdata[5086] */\n    { 1695, 0x9E3779B185EBCA8DULL, { 0xAA3CC89E1064D0FAULL, 0x5098C8ECCC66B4BEULL } }, /* XSUM_XXH128_testdata[5087] */\n    { 1696, 0x0000000000000000ULL, { 0x52677BEB2139CC5DULL, 0xF1F9B2968601912DULL } }, /* XSUM_XXH128_testdata[5088] */\n    { 1696, 0x000000009E3779B1ULL, { 0x37A6DCC45C61FD86ULL, 0x2412D707B3F8E008ULL } }, /* XSUM_XXH128_testdata[5089] */\n    { 1696, 0x9E3779B185EBCA8DULL, { 0x7AFE2676EDD1ECECULL, 0x9B16B3FC03E320A9ULL } }, /* XSUM_XXH128_testdata[5090] */\n    { 1697, 0x0000000000000000ULL, { 0x300D981F56D14BA1ULL, 0xB661B56834DEE926ULL } }, /* XSUM_XXH128_testdata[5091] */\n    { 1697, 0x000000009E3779B1ULL, { 0x83CD564975CABE8CULL, 0xF0F7BDBF1223688BULL } }, /* XSUM_XXH128_testdata[5092] */\n    { 1697, 0x9E3779B185EBCA8DULL, { 0x25C739BECECD9EB5ULL, 0x3CA7119CE6AAB906ULL } }, /* XSUM_XXH128_testdata[5093] */\n    { 1698, 0x0000000000000000ULL, { 0x79063E6F759B2CF4ULL, 0x5AF7801FE2F95AF1ULL } }, /* XSUM_XXH128_testdata[5094] */\n    { 1698, 0x000000009E3779B1ULL, { 0x03DF3E1C65707CD8ULL, 0x3137C7F62DF2031DULL } }, /* XSUM_XXH128_testdata[5095] */\n    { 1698, 0x9E3779B185EBCA8DULL, { 0x7CF876987D597B26ULL, 0x208D2378AA64725EULL } }, /* XSUM_XXH128_testdata[5096] */\n    { 1699, 0x0000000000000000ULL, { 0xD4D8A31F46547D15ULL, 0x36185417D78D8146ULL } }, /* XSUM_XXH128_testdata[5097] */\n    { 1699, 0x000000009E3779B1ULL, { 0x4670447BF7A7A9D3ULL, 0xE4C09BA41921CCF6ULL } }, /* XSUM_XXH128_testdata[5098] */\n    { 1699, 0x9E3779B185EBCA8DULL, { 0xACB693DB1AE30757ULL, 0xE119D466865F8276ULL } }, /* XSUM_XXH128_testdata[5099] */\n    { 1700, 0x0000000000000000ULL, { 0xBA2D1AED6D3F1291ULL, 0x6AD18012293C912BULL } }, /* XSUM_XXH128_testdata[5100] */\n    { 1700, 0x000000009E3779B1ULL, { 0x04EB71A7E9A26F7BULL, 0x47EE2F8B307863E5ULL } }, /* XSUM_XXH128_testdata[5101] */\n    { 1700, 0x9E3779B185EBCA8DULL, { 0xE295316275003170ULL, 0x1B17ED9D13864003ULL } }, /* XSUM_XXH128_testdata[5102] */\n    { 1701, 0x0000000000000000ULL, { 0x51CEFCA43F9471BFULL, 0xED097AA2024A6DDBULL } }, /* XSUM_XXH128_testdata[5103] */\n    { 1701, 0x000000009E3779B1ULL, { 0x6D3228081A319903ULL, 0x8A21C151AACD7BF4ULL } }, /* XSUM_XXH128_testdata[5104] */\n    { 1701, 0x9E3779B185EBCA8DULL, { 0x74616698F5BE5948ULL, 0x8F8CB8BE8B27C151ULL } }, /* XSUM_XXH128_testdata[5105] */\n    { 1702, 0x0000000000000000ULL, { 0x18808689370AAD8EULL, 0xF677F79938B0056EULL } }, /* XSUM_XXH128_testdata[5106] */\n    { 1702, 0x000000009E3779B1ULL, { 0x120B751B9D7F3C79ULL, 0x47ABF2EFE8BAC617ULL } }, /* XSUM_XXH128_testdata[5107] */\n    { 1702, 0x9E3779B185EBCA8DULL, { 0x79EDF381D1BC98EEULL, 0xF4C48A8263D8E746ULL } }, /* XSUM_XXH128_testdata[5108] */\n    { 1703, 0x0000000000000000ULL, { 0x280FA24BA3BFDC30ULL, 0x21A99B184FBC7F00ULL } }, /* XSUM_XXH128_testdata[5109] */\n    { 1703, 0x000000009E3779B1ULL, { 0x3B7C04EFF4DD70DCULL, 0x52373B1B99C68330ULL } }, /* XSUM_XXH128_testdata[5110] */\n    { 1703, 0x9E3779B185EBCA8DULL, { 0x3A7238C526B090CBULL, 0xBA920BB06AA7B156ULL } }, /* XSUM_XXH128_testdata[5111] */\n    { 1704, 0x0000000000000000ULL, { 0x9A13BBF8D5AB9FA0ULL, 0x575F8597FDD30DF7ULL } }, /* XSUM_XXH128_testdata[5112] */\n    { 1704, 0x000000009E3779B1ULL, { 0xD0DA5594D265C2D8ULL, 0x0C153C25A6D753F5ULL } }, /* XSUM_XXH128_testdata[5113] */\n    { 1704, 0x9E3779B185EBCA8DULL, { 0x4E7097F99B0219DEULL, 0xA9CE9C2BC7EC5BCEULL } }, /* XSUM_XXH128_testdata[5114] */\n    { 1705, 0x0000000000000000ULL, { 0x751149F530F23B3DULL, 0x8EC20513131611D2ULL } }, /* XSUM_XXH128_testdata[5115] */\n    { 1705, 0x000000009E3779B1ULL, { 0x886EB61BEE5139CFULL, 0x4626F1B956039205ULL } }, /* XSUM_XXH128_testdata[5116] */\n    { 1705, 0x9E3779B185EBCA8DULL, { 0x1B2347FA6FAC3095ULL, 0x9C9E546947959A35ULL } }, /* XSUM_XXH128_testdata[5117] */\n    { 1706, 0x0000000000000000ULL, { 0x5E7A6FCEEEA405DDULL, 0x14B187C36597ECA9ULL } }, /* XSUM_XXH128_testdata[5118] */\n    { 1706, 0x000000009E3779B1ULL, { 0x5A58A159C440BEC5ULL, 0x7555807116143D7CULL } }, /* XSUM_XXH128_testdata[5119] */\n    { 1706, 0x9E3779B185EBCA8DULL, { 0xAF6FE163245BC7A1ULL, 0x1711C696DD584D3CULL } }, /* XSUM_XXH128_testdata[5120] */\n    { 1707, 0x0000000000000000ULL, { 0xF3E6115DF0F23C7AULL, 0x94CD9FF432282166ULL } }, /* XSUM_XXH128_testdata[5121] */\n    { 1707, 0x000000009E3779B1ULL, { 0x6913413D1B13BA04ULL, 0xB307CE02E4BC9E5EULL } }, /* XSUM_XXH128_testdata[5122] */\n    { 1707, 0x9E3779B185EBCA8DULL, { 0x3A24873941B5E49AULL, 0x1324776EFA10AD61ULL } }, /* XSUM_XXH128_testdata[5123] */\n    { 1708, 0x0000000000000000ULL, { 0x16F8B128EADB9EF1ULL, 0x2965CF4000EAC99FULL } }, /* XSUM_XXH128_testdata[5124] */\n    { 1708, 0x000000009E3779B1ULL, { 0xD9974937E20978E0ULL, 0xDC6494C7EDE3804BULL } }, /* XSUM_XXH128_testdata[5125] */\n    { 1708, 0x9E3779B185EBCA8DULL, { 0x063F9C194C8EC62CULL, 0x3CBD4A0EAED29D3BULL } }, /* XSUM_XXH128_testdata[5126] */\n    { 1709, 0x0000000000000000ULL, { 0xB16E53B1ABCBD5F6ULL, 0xBCEDA8F269361928ULL } }, /* XSUM_XXH128_testdata[5127] */\n    { 1709, 0x000000009E3779B1ULL, { 0xA7EF622C0779B9A5ULL, 0x90B35846258552B3ULL } }, /* XSUM_XXH128_testdata[5128] */\n    { 1709, 0x9E3779B185EBCA8DULL, { 0x8FA0AFEF906A3B08ULL, 0x7BFF3A932637FE7AULL } }, /* XSUM_XXH128_testdata[5129] */\n    { 1710, 0x0000000000000000ULL, { 0x91AE6F2A4E04CE2FULL, 0xCDD0F1A95C7759E5ULL } }, /* XSUM_XXH128_testdata[5130] */\n    { 1710, 0x000000009E3779B1ULL, { 0x96A97AD8A1573D09ULL, 0x96E401168E2C259CULL } }, /* XSUM_XXH128_testdata[5131] */\n    { 1710, 0x9E3779B185EBCA8DULL, { 0x5E641D6DFC36F2E4ULL, 0xB98336EFDE9C78ECULL } }, /* XSUM_XXH128_testdata[5132] */\n    { 1711, 0x0000000000000000ULL, { 0x72AA744E3224B21CULL, 0xE1633C569A5E6CAFULL } }, /* XSUM_XXH128_testdata[5133] */\n    { 1711, 0x000000009E3779B1ULL, { 0xAE3C250C7B2D1CDFULL, 0xE6C205FB16FFF47BULL } }, /* XSUM_XXH128_testdata[5134] */\n    { 1711, 0x9E3779B185EBCA8DULL, { 0xE808026D23323001ULL, 0x4F240AB91C449220ULL } }, /* XSUM_XXH128_testdata[5135] */\n    { 1712, 0x0000000000000000ULL, { 0x5E84D67DB3CB690CULL, 0x40E71F6D08E1BAC0ULL } }, /* XSUM_XXH128_testdata[5136] */\n    { 1712, 0x000000009E3779B1ULL, { 0x318742CB01E08057ULL, 0x1ABA3143186BDF32ULL } }, /* XSUM_XXH128_testdata[5137] */\n    { 1712, 0x9E3779B185EBCA8DULL, { 0x92A2AF0F6F556626ULL, 0x252D43D35F573A90ULL } }, /* XSUM_XXH128_testdata[5138] */\n    { 1713, 0x0000000000000000ULL, { 0xEA01D1C732815D95ULL, 0xFAF4F389303F6051ULL } }, /* XSUM_XXH128_testdata[5139] */\n    { 1713, 0x000000009E3779B1ULL, { 0xD9603B5480582602ULL, 0x0B724407E181EBC2ULL } }, /* XSUM_XXH128_testdata[5140] */\n    { 1713, 0x9E3779B185EBCA8DULL, { 0x990416FA99E3583EULL, 0x43657EB5B3BF19DFULL } }, /* XSUM_XXH128_testdata[5141] */\n    { 1714, 0x0000000000000000ULL, { 0x2E7119639E3D4D35ULL, 0xB54D0DAF027A7A2AULL } }, /* XSUM_XXH128_testdata[5142] */\n    { 1714, 0x000000009E3779B1ULL, { 0x332836B8F72719DAULL, 0xACAC7C5A7669E0D5ULL } }, /* XSUM_XXH128_testdata[5143] */\n    { 1714, 0x9E3779B185EBCA8DULL, { 0x73AD703E2219297EULL, 0x36B3E3EC57F3D711ULL } }, /* XSUM_XXH128_testdata[5144] */\n    { 1715, 0x0000000000000000ULL, { 0x51C9DC72F6C1EEA8ULL, 0x02E67DCB7A9A5A5BULL } }, /* XSUM_XXH128_testdata[5145] */\n    { 1715, 0x000000009E3779B1ULL, { 0x7B2648CA1866C2F3ULL, 0x63E760A0A7FC220AULL } }, /* XSUM_XXH128_testdata[5146] */\n    { 1715, 0x9E3779B185EBCA8DULL, { 0x81B6D259D25EB2BCULL, 0xB23A96E53264BFD6ULL } }, /* XSUM_XXH128_testdata[5147] */\n    { 1716, 0x0000000000000000ULL, { 0x45D2F1C6B036F1CDULL, 0xEB390FD80AF367C6ULL } }, /* XSUM_XXH128_testdata[5148] */\n    { 1716, 0x000000009E3779B1ULL, { 0x0338B617DC8E8E43ULL, 0x6CC965DE6C3CBE31ULL } }, /* XSUM_XXH128_testdata[5149] */\n    { 1716, 0x9E3779B185EBCA8DULL, { 0x0DF5F8958B4D3DAAULL, 0xA9EB52B1D58F766EULL } }, /* XSUM_XXH128_testdata[5150] */\n    { 1717, 0x0000000000000000ULL, { 0x61FBCD5F366792D7ULL, 0xD644E8E7B5941F4FULL } }, /* XSUM_XXH128_testdata[5151] */\n    { 1717, 0x000000009E3779B1ULL, { 0xB39A66980945746DULL, 0xF33999BF9409FF1EULL } }, /* XSUM_XXH128_testdata[5152] */\n    { 1717, 0x9E3779B185EBCA8DULL, { 0x6365F06DC899C90BULL, 0xDB45A522F6AA6C34ULL } }, /* XSUM_XXH128_testdata[5153] */\n    { 1718, 0x0000000000000000ULL, { 0xABA05CE4BA47455FULL, 0x0433EFA770FD01E8ULL } }, /* XSUM_XXH128_testdata[5154] */\n    { 1718, 0x000000009E3779B1ULL, { 0xE32C1A14F39B2EA9ULL, 0x2699183CE390D122ULL } }, /* XSUM_XXH128_testdata[5155] */\n    { 1718, 0x9E3779B185EBCA8DULL, { 0x2F3C96BADC8EC27AULL, 0xC4E554E8BDADD633ULL } }, /* XSUM_XXH128_testdata[5156] */\n    { 1719, 0x0000000000000000ULL, { 0x2D3FF1E8B05F4E9AULL, 0x068A4C38A6DA4BE5ULL } }, /* XSUM_XXH128_testdata[5157] */\n    { 1719, 0x000000009E3779B1ULL, { 0x406917EFF4814536ULL, 0x866F5D98763B9BCCULL } }, /* XSUM_XXH128_testdata[5158] */\n    { 1719, 0x9E3779B185EBCA8DULL, { 0x991F60E4CD736A13ULL, 0xEBB3BC4DC7C152F8ULL } }, /* XSUM_XXH128_testdata[5159] */\n    { 1720, 0x0000000000000000ULL, { 0xDFF2D0888B0C99F4ULL, 0x3B1622175D3DA912ULL } }, /* XSUM_XXH128_testdata[5160] */\n    { 1720, 0x000000009E3779B1ULL, { 0x7D53027C5E3027D8ULL, 0xF82907A99804749CULL } }, /* XSUM_XXH128_testdata[5161] */\n    { 1720, 0x9E3779B185EBCA8DULL, { 0x9352C645DFFDA421ULL, 0x2F3CE62CDE3A99EAULL } }, /* XSUM_XXH128_testdata[5162] */\n    { 1721, 0x0000000000000000ULL, { 0x8E05C59E1219124DULL, 0x0AA389225A1E7C95ULL } }, /* XSUM_XXH128_testdata[5163] */\n    { 1721, 0x000000009E3779B1ULL, { 0x55DA1A77C6F9EEF7ULL, 0x6ADCA93724CD542EULL } }, /* XSUM_XXH128_testdata[5164] */\n    { 1721, 0x9E3779B185EBCA8DULL, { 0x5C1F24B984ABB5F6ULL, 0x77AF2ED9BB78A480ULL } }, /* XSUM_XXH128_testdata[5165] */\n    { 1722, 0x0000000000000000ULL, { 0x312DEB25A28BD45EULL, 0x66C6E3847F742EF4ULL } }, /* XSUM_XXH128_testdata[5166] */\n    { 1722, 0x000000009E3779B1ULL, { 0x5375C8A2642FE022ULL, 0xE38BBDCFC2D5C34AULL } }, /* XSUM_XXH128_testdata[5167] */\n    { 1722, 0x9E3779B185EBCA8DULL, { 0xDDE6A17CCD3EDB8CULL, 0x95761BBF26E8B7DAULL } }, /* XSUM_XXH128_testdata[5168] */\n    { 1723, 0x0000000000000000ULL, { 0x99735C6A00896EA9ULL, 0xF707AEA0BBB90F48ULL } }, /* XSUM_XXH128_testdata[5169] */\n    { 1723, 0x000000009E3779B1ULL, { 0xCDBE774E749A6820ULL, 0xEF93DDD0CED2C529ULL } }, /* XSUM_XXH128_testdata[5170] */\n    { 1723, 0x9E3779B185EBCA8DULL, { 0x659A7B5EFC7F69F4ULL, 0xAF02E85C1188B4F3ULL } }, /* XSUM_XXH128_testdata[5171] */\n    { 1724, 0x0000000000000000ULL, { 0xDA70A7331C758A11ULL, 0x8C98826127B67765ULL } }, /* XSUM_XXH128_testdata[5172] */\n    { 1724, 0x000000009E3779B1ULL, { 0x7F8007E6AA4B1E21ULL, 0x13FDAB4730569347ULL } }, /* XSUM_XXH128_testdata[5173] */\n    { 1724, 0x9E3779B185EBCA8DULL, { 0xE587F2DB4B7C28B2ULL, 0x69627096F2A540CCULL } }, /* XSUM_XXH128_testdata[5174] */\n    { 1725, 0x0000000000000000ULL, { 0x671AC2B05CD1E93EULL, 0x686EFC80D2044577ULL } }, /* XSUM_XXH128_testdata[5175] */\n    { 1725, 0x000000009E3779B1ULL, { 0x898D1B60DE49249DULL, 0xB99568517C5A6C6DULL } }, /* XSUM_XXH128_testdata[5176] */\n    { 1725, 0x9E3779B185EBCA8DULL, { 0x0FD6460344094D86ULL, 0x8B954BE1891BFFADULL } }, /* XSUM_XXH128_testdata[5177] */\n    { 1726, 0x0000000000000000ULL, { 0x1AC66A5AA86E9E25ULL, 0x66220A3D2DB88398ULL } }, /* XSUM_XXH128_testdata[5178] */\n    { 1726, 0x000000009E3779B1ULL, { 0x40EAA4829B2876A8ULL, 0x19B703C57BA70B39ULL } }, /* XSUM_XXH128_testdata[5179] */\n    { 1726, 0x9E3779B185EBCA8DULL, { 0x1EC51F9ABB08B913ULL, 0x0FFB942217C4736CULL } }, /* XSUM_XXH128_testdata[5180] */\n    { 1727, 0x0000000000000000ULL, { 0xF78173A923B84753ULL, 0x54501EAC667E2604ULL } }, /* XSUM_XXH128_testdata[5181] */\n    { 1727, 0x000000009E3779B1ULL, { 0xBA7311212B82E2FFULL, 0x3E7DE7949D05CCBEULL } }, /* XSUM_XXH128_testdata[5182] */\n    { 1727, 0x9E3779B185EBCA8DULL, { 0x745FF5546F2C23DCULL, 0xB647014B42269B6BULL } }, /* XSUM_XXH128_testdata[5183] */\n    { 1728, 0x0000000000000000ULL, { 0x220DAC2E47871091ULL, 0xBA2AADD1681AD8ACULL } }, /* XSUM_XXH128_testdata[5184] */\n    { 1728, 0x000000009E3779B1ULL, { 0x9B3FD0F5ADF85E49ULL, 0xBE00C777103A502BULL } }, /* XSUM_XXH128_testdata[5185] */\n    { 1728, 0x9E3779B185EBCA8DULL, { 0x79501CDE4D247902ULL, 0xBECBF4E097D96F33ULL } }, /* XSUM_XXH128_testdata[5186] */\n    { 1729, 0x0000000000000000ULL, { 0x5F27B880EB82CBE3ULL, 0xB0D112053235871DULL } }, /* XSUM_XXH128_testdata[5187] */\n    { 1729, 0x000000009E3779B1ULL, { 0x37F1FF4533854D53ULL, 0xE4610A1EF89E2D8AULL } }, /* XSUM_XXH128_testdata[5188] */\n    { 1729, 0x9E3779B185EBCA8DULL, { 0x3ABE71821453D8A0ULL, 0xF11ACA683E289FA4ULL } }, /* XSUM_XXH128_testdata[5189] */\n    { 1730, 0x0000000000000000ULL, { 0x13F5358188C8C705ULL, 0x0C4D45C89A0C42F3ULL } }, /* XSUM_XXH128_testdata[5190] */\n    { 1730, 0x000000009E3779B1ULL, { 0x51A471BCF0518142ULL, 0xED6322209E789B77ULL } }, /* XSUM_XXH128_testdata[5191] */\n    { 1730, 0x9E3779B185EBCA8DULL, { 0x5DEBDA86C8CCAD56ULL, 0xFA7ABEC35451986FULL } }, /* XSUM_XXH128_testdata[5192] */\n    { 1731, 0x0000000000000000ULL, { 0x252BB54C35412507ULL, 0x21CEF6BDE683A13DULL } }, /* XSUM_XXH128_testdata[5193] */\n    { 1731, 0x000000009E3779B1ULL, { 0xDC47F902399B4497ULL, 0x3AB4D8A488461F2EULL } }, /* XSUM_XXH128_testdata[5194] */\n    { 1731, 0x9E3779B185EBCA8DULL, { 0xD3B16569E6073E74ULL, 0xC4A84221D5A9D82DULL } }, /* XSUM_XXH128_testdata[5195] */\n    { 1732, 0x0000000000000000ULL, { 0x64A5B23189ABCB8CULL, 0x0F7059CF828DEB6EULL } }, /* XSUM_XXH128_testdata[5196] */\n    { 1732, 0x000000009E3779B1ULL, { 0xA1C1AC712C1EEBDBULL, 0x721D62F49834E9A7ULL } }, /* XSUM_XXH128_testdata[5197] */\n    { 1732, 0x9E3779B185EBCA8DULL, { 0x975A4B394E3570A6ULL, 0xC1657B21B0601434ULL } }, /* XSUM_XXH128_testdata[5198] */\n    { 1733, 0x0000000000000000ULL, { 0xDA3EBB58E0F0DA51ULL, 0xF80846BAB9707189ULL } }, /* XSUM_XXH128_testdata[5199] */\n    { 1733, 0x000000009E3779B1ULL, { 0x00CF9344442ED086ULL, 0xE589C51543DC9FFBULL } }, /* XSUM_XXH128_testdata[5200] */\n    { 1733, 0x9E3779B185EBCA8DULL, { 0xCECBA4F5BDBA8B2AULL, 0x3A55AAEE2B39225AULL } }, /* XSUM_XXH128_testdata[5201] */\n    { 1734, 0x0000000000000000ULL, { 0xB7043A69655059E3ULL, 0xB9D40930EE0A1DC7ULL } }, /* XSUM_XXH128_testdata[5202] */\n    { 1734, 0x000000009E3779B1ULL, { 0xE574D59B5420309BULL, 0xBB6B1C1B01344944ULL } }, /* XSUM_XXH128_testdata[5203] */\n    { 1734, 0x9E3779B185EBCA8DULL, { 0xAAD8EE22B3DE900FULL, 0x4E6C7013F32BA965ULL } }, /* XSUM_XXH128_testdata[5204] */\n    { 1735, 0x0000000000000000ULL, { 0xBECA2F499E761EB3ULL, 0x9FEE56A1C278EFA8ULL } }, /* XSUM_XXH128_testdata[5205] */\n    { 1735, 0x000000009E3779B1ULL, { 0xA034329BA5E56AF3ULL, 0x8B2A254DDA8F7E4FULL } }, /* XSUM_XXH128_testdata[5206] */\n    { 1735, 0x9E3779B185EBCA8DULL, { 0x8AE05D359FC8BB7CULL, 0xCB2DDE97F010A7A9ULL } }, /* XSUM_XXH128_testdata[5207] */\n    { 1736, 0x0000000000000000ULL, { 0xD9DC33599AFF2D43ULL, 0x6C39CB81DAF2986AULL } }, /* XSUM_XXH128_testdata[5208] */\n    { 1736, 0x000000009E3779B1ULL, { 0x113C1A33FD3D171CULL, 0x67CE3E271B32FBD2ULL } }, /* XSUM_XXH128_testdata[5209] */\n    { 1736, 0x9E3779B185EBCA8DULL, { 0x6CC9042D5E4EADDCULL, 0x63EF21F2136C1B88ULL } }, /* XSUM_XXH128_testdata[5210] */\n    { 1737, 0x0000000000000000ULL, { 0x7FFA441E5FAC309FULL, 0x852D3EEDA8868754ULL } }, /* XSUM_XXH128_testdata[5211] */\n    { 1737, 0x000000009E3779B1ULL, { 0x1C5516C5F70387E8ULL, 0x2A7EBD08A7533E55ULL } }, /* XSUM_XXH128_testdata[5212] */\n    { 1737, 0x9E3779B185EBCA8DULL, { 0x58ADA79F6B44D126ULL, 0x9093DD8B7D00A20AULL } }, /* XSUM_XXH128_testdata[5213] */\n    { 1738, 0x0000000000000000ULL, { 0x22CD0F38FB521217ULL, 0xC0B9EA93EC3513E0ULL } }, /* XSUM_XXH128_testdata[5214] */\n    { 1738, 0x000000009E3779B1ULL, { 0x6BE025CB54C170BBULL, 0xAC0AEFBAF2AA0A5FULL } }, /* XSUM_XXH128_testdata[5215] */\n    { 1738, 0x9E3779B185EBCA8DULL, { 0x9738D4E754A33DA1ULL, 0xFFA0A3CF17C8725BULL } }, /* XSUM_XXH128_testdata[5216] */\n    { 1739, 0x0000000000000000ULL, { 0x4A5A3B33E78E44D4ULL, 0x1B31073264A82A09ULL } }, /* XSUM_XXH128_testdata[5217] */\n    { 1739, 0x000000009E3779B1ULL, { 0x6EFDE3303E9B34EFULL, 0x8EA8ABF77C77E189ULL } }, /* XSUM_XXH128_testdata[5218] */\n    { 1739, 0x9E3779B185EBCA8DULL, { 0x422E0C601DCA7742ULL, 0x4B6B8BF02E125017ULL } }, /* XSUM_XXH128_testdata[5219] */\n    { 1740, 0x0000000000000000ULL, { 0xF03EB59E770E4CF9ULL, 0x09D36824D136FCB1ULL } }, /* XSUM_XXH128_testdata[5220] */\n    { 1740, 0x000000009E3779B1ULL, { 0x833925BCAC206E90ULL, 0x1D6D24004451C822ULL } }, /* XSUM_XXH128_testdata[5221] */\n    { 1740, 0x9E3779B185EBCA8DULL, { 0x8229CD6F18DACC95ULL, 0x47B1E7289C4E36E5ULL } }, /* XSUM_XXH128_testdata[5222] */\n    { 1741, 0x0000000000000000ULL, { 0xDBE3D19DE2B85FDBULL, 0x474A495A4F864A12ULL } }, /* XSUM_XXH128_testdata[5223] */\n    { 1741, 0x000000009E3779B1ULL, { 0x9375EB0FBAAAA5D7ULL, 0x647B76C964D074B6ULL } }, /* XSUM_XXH128_testdata[5224] */\n    { 1741, 0x9E3779B185EBCA8DULL, { 0xE3BDD3ECB58B0EE4ULL, 0xE0993987411FCDC2ULL } }, /* XSUM_XXH128_testdata[5225] */\n    { 1742, 0x0000000000000000ULL, { 0x7BDF6208541D8766ULL, 0x3120B69E532033A7ULL } }, /* XSUM_XXH128_testdata[5226] */\n    { 1742, 0x000000009E3779B1ULL, { 0x792B40F296D414C4ULL, 0x7E45379DECA174ABULL } }, /* XSUM_XXH128_testdata[5227] */\n    { 1742, 0x9E3779B185EBCA8DULL, { 0x724C23B0BCE23E84ULL, 0x6E70E57EDC9E927EULL } }, /* XSUM_XXH128_testdata[5228] */\n    { 1743, 0x0000000000000000ULL, { 0x06D1B3351E6AC466ULL, 0x5D560FEF45AD33A3ULL } }, /* XSUM_XXH128_testdata[5229] */\n    { 1743, 0x000000009E3779B1ULL, { 0xD6B7E047BEF455EBULL, 0xAFB992862F3D2FD6ULL } }, /* XSUM_XXH128_testdata[5230] */\n    { 1743, 0x9E3779B185EBCA8DULL, { 0xB46EF27E6A19B6A2ULL, 0x555BB231B47E5936ULL } }, /* XSUM_XXH128_testdata[5231] */\n    { 1744, 0x0000000000000000ULL, { 0xD4EDA665DC3A4B65ULL, 0x92A0B35C2D4A4A13ULL } }, /* XSUM_XXH128_testdata[5232] */\n    { 1744, 0x000000009E3779B1ULL, { 0xC0AC89D384765DDDULL, 0xB95D2413D50613F9ULL } }, /* XSUM_XXH128_testdata[5233] */\n    { 1744, 0x9E3779B185EBCA8DULL, { 0x630F4F4C2359C63EULL, 0x4846C375C7E573D5ULL } }, /* XSUM_XXH128_testdata[5234] */\n    { 1745, 0x0000000000000000ULL, { 0xA108D968D8A4DDC9ULL, 0x8CAA78D7D9B09493ULL } }, /* XSUM_XXH128_testdata[5235] */\n    { 1745, 0x000000009E3779B1ULL, { 0x119B67FC13C5204BULL, 0x3E84A18EB115F1AAULL } }, /* XSUM_XXH128_testdata[5236] */\n    { 1745, 0x9E3779B185EBCA8DULL, { 0x28D998B9855C3E18ULL, 0x47FCA21F2A844691ULL } }, /* XSUM_XXH128_testdata[5237] */\n    { 1746, 0x0000000000000000ULL, { 0x4988F7F0BE937CAEULL, 0xFF10AA020E0C8CACULL } }, /* XSUM_XXH128_testdata[5238] */\n    { 1746, 0x000000009E3779B1ULL, { 0xD665385A69EC3437ULL, 0xBC960706782ECE6DULL } }, /* XSUM_XXH128_testdata[5239] */\n    { 1746, 0x9E3779B185EBCA8DULL, { 0xA48FD8C5BB2CD9E1ULL, 0xA378A91218E7AAC2ULL } }, /* XSUM_XXH128_testdata[5240] */\n    { 1747, 0x0000000000000000ULL, { 0xD6FB12FDB1622503ULL, 0xF11F8C08E0C8DCEBULL } }, /* XSUM_XXH128_testdata[5241] */\n    { 1747, 0x000000009E3779B1ULL, { 0xEB5CF032481898B7ULL, 0xAC36B8A238936A21ULL } }, /* XSUM_XXH128_testdata[5242] */\n    { 1747, 0x9E3779B185EBCA8DULL, { 0x81586448DE7D2F8CULL, 0xBCFCC0AEEA285B51ULL } }, /* XSUM_XXH128_testdata[5243] */\n    { 1748, 0x0000000000000000ULL, { 0x27D8CEF8702F3CFBULL, 0x5718502B9DD68359ULL } }, /* XSUM_XXH128_testdata[5244] */\n    { 1748, 0x000000009E3779B1ULL, { 0xF9119073782A4F9EULL, 0x401022B0A071EEE1ULL } }, /* XSUM_XXH128_testdata[5245] */\n    { 1748, 0x9E3779B185EBCA8DULL, { 0x0B15BF0DC38C1EAEULL, 0x8B47C1DB20FF4237ULL } }, /* XSUM_XXH128_testdata[5246] */\n    { 1749, 0x0000000000000000ULL, { 0xD155F7437A01C3E5ULL, 0xBCDF79F82611A413ULL } }, /* XSUM_XXH128_testdata[5247] */\n    { 1749, 0x000000009E3779B1ULL, { 0x9F2AEC7E108F3969ULL, 0x821AB79161C39A91ULL } }, /* XSUM_XXH128_testdata[5248] */\n    { 1749, 0x9E3779B185EBCA8DULL, { 0x6B86F11A836810B7ULL, 0xB0478CB6EC021056ULL } }, /* XSUM_XXH128_testdata[5249] */\n    { 1750, 0x0000000000000000ULL, { 0xC8E020F2F9E8C469ULL, 0x312EF0A1464A2474ULL } }, /* XSUM_XXH128_testdata[5250] */\n    { 1750, 0x000000009E3779B1ULL, { 0xA411B9BE43673069ULL, 0x6410AF2637F70176ULL } }, /* XSUM_XXH128_testdata[5251] */\n    { 1750, 0x9E3779B185EBCA8DULL, { 0x89557BC08A51F05CULL, 0xA41F511629A94208ULL } }, /* XSUM_XXH128_testdata[5252] */\n    { 1751, 0x0000000000000000ULL, { 0x1A92033D8555F351ULL, 0xE3A632DF90AA3BDCULL } }, /* XSUM_XXH128_testdata[5253] */\n    { 1751, 0x000000009E3779B1ULL, { 0x1C16524A0B45459BULL, 0x39995DBF0CBFD444ULL } }, /* XSUM_XXH128_testdata[5254] */\n    { 1751, 0x9E3779B185EBCA8DULL, { 0x37330043BC14621EULL, 0x24CB2068ED6341BAULL } }, /* XSUM_XXH128_testdata[5255] */\n    { 1752, 0x0000000000000000ULL, { 0x96BBF5198F92D2E0ULL, 0xFFCDFE16E7798794ULL } }, /* XSUM_XXH128_testdata[5256] */\n    { 1752, 0x000000009E3779B1ULL, { 0x8FB06950CE6FA183ULL, 0x33F0DA6C2B6E2A24ULL } }, /* XSUM_XXH128_testdata[5257] */\n    { 1752, 0x9E3779B185EBCA8DULL, { 0x915B3EE331B9EF6EULL, 0x8BE28B4742522110ULL } }, /* XSUM_XXH128_testdata[5258] */\n    { 1753, 0x0000000000000000ULL, { 0x8FEBB23093609094ULL, 0x5EF7E3538BCB78FEULL } }, /* XSUM_XXH128_testdata[5259] */\n    { 1753, 0x000000009E3779B1ULL, { 0xACE879AEC1958B4CULL, 0x00C8B76F00EE6E7EULL } }, /* XSUM_XXH128_testdata[5260] */\n    { 1753, 0x9E3779B185EBCA8DULL, { 0x9D99AFB6EDDE01C3ULL, 0x0C37834B28A3987DULL } }, /* XSUM_XXH128_testdata[5261] */\n    { 1754, 0x0000000000000000ULL, { 0xB7EF3E6F6A42082CULL, 0xF56C1FE5941C10C8ULL } }, /* XSUM_XXH128_testdata[5262] */\n    { 1754, 0x000000009E3779B1ULL, { 0x48768731016CA54BULL, 0x49D05C5433D09D53ULL } }, /* XSUM_XXH128_testdata[5263] */\n    { 1754, 0x9E3779B185EBCA8DULL, { 0xC156FB0ED9A0B574ULL, 0x4E87D6681D766741ULL } }, /* XSUM_XXH128_testdata[5264] */\n    { 1755, 0x0000000000000000ULL, { 0x856CF1FF067B3ADEULL, 0x4EF0783025EDA982ULL } }, /* XSUM_XXH128_testdata[5265] */\n    { 1755, 0x000000009E3779B1ULL, { 0xB37B4D9CB55D43A7ULL, 0x58D957731ED24DFDULL } }, /* XSUM_XXH128_testdata[5266] */\n    { 1755, 0x9E3779B185EBCA8DULL, { 0x7E059FB1914BD3FBULL, 0x356CE246FFF94B98ULL } }, /* XSUM_XXH128_testdata[5267] */\n    { 1756, 0x0000000000000000ULL, { 0x3D1F07BED79EB024ULL, 0xD05BC4D4AAA9FA2DULL } }, /* XSUM_XXH128_testdata[5268] */\n    { 1756, 0x000000009E3779B1ULL, { 0x6338E6E4C3D08DD3ULL, 0xADDFF61EFAED2008ULL } }, /* XSUM_XXH128_testdata[5269] */\n    { 1756, 0x9E3779B185EBCA8DULL, { 0x9E8C8B897181AEC9ULL, 0x0771394FF7329435ULL } }, /* XSUM_XXH128_testdata[5270] */\n    { 1757, 0x0000000000000000ULL, { 0x6CECD5D2CD92708CULL, 0xABF4754B3A020979ULL } }, /* XSUM_XXH128_testdata[5271] */\n    { 1757, 0x000000009E3779B1ULL, { 0xA1B788FA25AFDF03ULL, 0xED971B880920B94BULL } }, /* XSUM_XXH128_testdata[5272] */\n    { 1757, 0x9E3779B185EBCA8DULL, { 0x5545085298AA4C71ULL, 0xEE61B28D6B5050E7ULL } }, /* XSUM_XXH128_testdata[5273] */\n    { 1758, 0x0000000000000000ULL, { 0x8E6BF225FD7F3FA1ULL, 0x95827A964FC42A73ULL } }, /* XSUM_XXH128_testdata[5274] */\n    { 1758, 0x000000009E3779B1ULL, { 0x1E639598A602B984ULL, 0xE98FBA8811BAA904ULL } }, /* XSUM_XXH128_testdata[5275] */\n    { 1758, 0x9E3779B185EBCA8DULL, { 0xB486909C53F163B1ULL, 0x912EA636EA172519ULL } }, /* XSUM_XXH128_testdata[5276] */\n    { 1759, 0x0000000000000000ULL, { 0x7BF5430C9E06389AULL, 0x7C93AA5BA9DF70BEULL } }, /* XSUM_XXH128_testdata[5277] */\n    { 1759, 0x000000009E3779B1ULL, { 0xCA362F1CA0402540ULL, 0x1A44D7D490054A1BULL } }, /* XSUM_XXH128_testdata[5278] */\n    { 1759, 0x9E3779B185EBCA8DULL, { 0x5AC6791A15235D18ULL, 0x95FA9EAFD047A474ULL } }, /* XSUM_XXH128_testdata[5279] */\n    { 1760, 0x0000000000000000ULL, { 0x49733C9DDE946FB4ULL, 0xD06F3095ABFD5243ULL } }, /* XSUM_XXH128_testdata[5280] */\n    { 1760, 0x000000009E3779B1ULL, { 0x565607E534E459BCULL, 0x737260B029F4F18BULL } }, /* XSUM_XXH128_testdata[5281] */\n    { 1760, 0x9E3779B185EBCA8DULL, { 0x20D21AC0B3025E9BULL, 0xC2DFDF6EE52C549DULL } }, /* XSUM_XXH128_testdata[5282] */\n    { 1761, 0x0000000000000000ULL, { 0x7BD8D88D0D402CC8ULL, 0xC31CB9E7F8BD7004ULL } }, /* XSUM_XXH128_testdata[5283] */\n    { 1761, 0x000000009E3779B1ULL, { 0xFB66695E42799E8EULL, 0x263CA2262FE93AEFULL } }, /* XSUM_XXH128_testdata[5284] */\n    { 1761, 0x9E3779B185EBCA8DULL, { 0xCB34E8082EA11948ULL, 0x40DD823B30749AD2ULL } }, /* XSUM_XXH128_testdata[5285] */\n    { 1762, 0x0000000000000000ULL, { 0xAAF2103EAD4F67DEULL, 0x6FC5BAC19F85F197ULL } }, /* XSUM_XXH128_testdata[5286] */\n    { 1762, 0x000000009E3779B1ULL, { 0xEB4C6D58B84F6344ULL, 0xD0D0B2E8C77ACC62ULL } }, /* XSUM_XXH128_testdata[5287] */\n    { 1762, 0x9E3779B185EBCA8DULL, { 0x6D2C80A8A7B34A4AULL, 0x85DA8A43333D2A96ULL } }, /* XSUM_XXH128_testdata[5288] */\n    { 1763, 0x0000000000000000ULL, { 0xF64BA24F6F2C7671ULL, 0x7309FEF4EAB41889ULL } }, /* XSUM_XXH128_testdata[5289] */\n    { 1763, 0x000000009E3779B1ULL, { 0x8262867865555F5BULL, 0x1F0EAE3B85377701ULL } }, /* XSUM_XXH128_testdata[5290] */\n    { 1763, 0x9E3779B185EBCA8DULL, { 0xD98C1890DFE1418FULL, 0x8FDC0945DC38B494ULL } }, /* XSUM_XXH128_testdata[5291] */\n    { 1764, 0x0000000000000000ULL, { 0xA097BC4C9DC93D8FULL, 0xAC6E5D73820F7D61ULL } }, /* XSUM_XXH128_testdata[5292] */\n    { 1764, 0x000000009E3779B1ULL, { 0x98E061DA587134CDULL, 0x46663CE05A0B8808ULL } }, /* XSUM_XXH128_testdata[5293] */\n    { 1764, 0x9E3779B185EBCA8DULL, { 0xF2C2AC304979B5A6ULL, 0x74B0EC2D3ECB29F8ULL } }, /* XSUM_XXH128_testdata[5294] */\n    { 1765, 0x0000000000000000ULL, { 0x03E739F4A58A210EULL, 0xEF4368D31E065981ULL } }, /* XSUM_XXH128_testdata[5295] */\n    { 1765, 0x000000009E3779B1ULL, { 0x029990C500AF581CULL, 0xD8F8814A93DC27A8ULL } }, /* XSUM_XXH128_testdata[5296] */\n    { 1765, 0x9E3779B185EBCA8DULL, { 0x149D280829B49700ULL, 0x9A2931AC32AE94CCULL } }, /* XSUM_XXH128_testdata[5297] */\n    { 1766, 0x0000000000000000ULL, { 0x2389D9082B242983ULL, 0x0F706B7EEE0B6573ULL } }, /* XSUM_XXH128_testdata[5298] */\n    { 1766, 0x000000009E3779B1ULL, { 0xBA2C4BBE221BB6FCULL, 0x23627CAA427F63E0ULL } }, /* XSUM_XXH128_testdata[5299] */\n    { 1766, 0x9E3779B185EBCA8DULL, { 0x602BBC51A33FC7AAULL, 0x2B4790BB1997B352ULL } }, /* XSUM_XXH128_testdata[5300] */\n    { 1767, 0x0000000000000000ULL, { 0x4C19748B9519F6E5ULL, 0x1CB11D20A0373D78ULL } }, /* XSUM_XXH128_testdata[5301] */\n    { 1767, 0x000000009E3779B1ULL, { 0x0EC81040E7D0EB92ULL, 0xDA14755636C1E437ULL } }, /* XSUM_XXH128_testdata[5302] */\n    { 1767, 0x9E3779B185EBCA8DULL, { 0xCDD26659C7C05FF5ULL, 0x831247C37CC6A1B5ULL } }, /* XSUM_XXH128_testdata[5303] */\n    { 1768, 0x0000000000000000ULL, { 0x872F5C85F902B2E6ULL, 0xA7719DEEABB89898ULL } }, /* XSUM_XXH128_testdata[5304] */\n    { 1768, 0x000000009E3779B1ULL, { 0x8833A285AC05D7E9ULL, 0xA5B1F102BDA81C44ULL } }, /* XSUM_XXH128_testdata[5305] */\n    { 1768, 0x9E3779B185EBCA8DULL, { 0x26AA174D954F2498ULL, 0x5487E326D480C8FAULL } }, /* XSUM_XXH128_testdata[5306] */\n    { 1769, 0x0000000000000000ULL, { 0xF04114F5FB2E7219ULL, 0x4A184CF21E9C7122ULL } }, /* XSUM_XXH128_testdata[5307] */\n    { 1769, 0x000000009E3779B1ULL, { 0x3C2C390AF36C0BEAULL, 0xF8F66188D81F3542ULL } }, /* XSUM_XXH128_testdata[5308] */\n    { 1769, 0x9E3779B185EBCA8DULL, { 0x3E59BF2B3D0CA878ULL, 0x980F2931F2F4D2A8ULL } }, /* XSUM_XXH128_testdata[5309] */\n    { 1770, 0x0000000000000000ULL, { 0xDC493AD0E7E20665ULL, 0xBCD56DEF83B129FEULL } }, /* XSUM_XXH128_testdata[5310] */\n    { 1770, 0x000000009E3779B1ULL, { 0x45E70EF9E33731ECULL, 0x294EABA27F377471ULL } }, /* XSUM_XXH128_testdata[5311] */\n    { 1770, 0x9E3779B185EBCA8DULL, { 0x3800DC833B5C18B9ULL, 0xAFD441BFFB6673E7ULL } }, /* XSUM_XXH128_testdata[5312] */\n    { 1771, 0x0000000000000000ULL, { 0x9113DF900D00D5CBULL, 0xBC44DED32188D43BULL } }, /* XSUM_XXH128_testdata[5313] */\n    { 1771, 0x000000009E3779B1ULL, { 0x68600EBF5FDF6C20ULL, 0x2600D20ECAA2789EULL } }, /* XSUM_XXH128_testdata[5314] */\n    { 1771, 0x9E3779B185EBCA8DULL, { 0xB279ED197A6809C4ULL, 0x4257ACB6F042F17DULL } }, /* XSUM_XXH128_testdata[5315] */\n    { 1772, 0x0000000000000000ULL, { 0xBA3E2263E19706AAULL, 0xD415CFF544D468B4ULL } }, /* XSUM_XXH128_testdata[5316] */\n    { 1772, 0x000000009E3779B1ULL, { 0x01A707BDB3264D1EULL, 0xA245599F0447C7D0ULL } }, /* XSUM_XXH128_testdata[5317] */\n    { 1772, 0x9E3779B185EBCA8DULL, { 0x4A94DFE3951D5816ULL, 0x2CA0C743A3236D59ULL } }, /* XSUM_XXH128_testdata[5318] */\n    { 1773, 0x0000000000000000ULL, { 0x005C77B9B80C4E8FULL, 0xC87239B20BB91FC9ULL } }, /* XSUM_XXH128_testdata[5319] */\n    { 1773, 0x000000009E3779B1ULL, { 0x20EA6BE76DB48A17ULL, 0x0317C11F5F3FA2B5ULL } }, /* XSUM_XXH128_testdata[5320] */\n    { 1773, 0x9E3779B185EBCA8DULL, { 0x239B0A1EB5ECEB81ULL, 0x66EA5AA9614AC3E0ULL } }, /* XSUM_XXH128_testdata[5321] */\n    { 1774, 0x0000000000000000ULL, { 0x70B9E7F2520F30EEULL, 0xCDB6A50DDED7F913ULL } }, /* XSUM_XXH128_testdata[5322] */\n    { 1774, 0x000000009E3779B1ULL, { 0x2D05AD82A3D1CC59ULL, 0xA4189B755D65EA63ULL } }, /* XSUM_XXH128_testdata[5323] */\n    { 1774, 0x9E3779B185EBCA8DULL, { 0x55AE8F34701876CBULL, 0xD91EF6A90B018FF8ULL } }, /* XSUM_XXH128_testdata[5324] */\n    { 1775, 0x0000000000000000ULL, { 0x4EC99C083B39FD2BULL, 0x0AAFAB1AED5C30B4ULL } }, /* XSUM_XXH128_testdata[5325] */\n    { 1775, 0x000000009E3779B1ULL, { 0xECBA6D4A26F4FA60ULL, 0xBEC9F8F357A68817ULL } }, /* XSUM_XXH128_testdata[5326] */\n    { 1775, 0x9E3779B185EBCA8DULL, { 0x726C3C05200E1B87ULL, 0xA263F86BE2523AD1ULL } }, /* XSUM_XXH128_testdata[5327] */\n    { 1776, 0x0000000000000000ULL, { 0x346ACEAFA0F4C865ULL, 0xF3CC02C24753E118ULL } }, /* XSUM_XXH128_testdata[5328] */\n    { 1776, 0x000000009E3779B1ULL, { 0x7B2DC0D202B3CA0BULL, 0x0072486AF08C0086ULL } }, /* XSUM_XXH128_testdata[5329] */\n    { 1776, 0x9E3779B185EBCA8DULL, { 0x8D64F6CEBB88E55BULL, 0x87279A0B2E4D1CE6ULL } }, /* XSUM_XXH128_testdata[5330] */\n    { 1777, 0x0000000000000000ULL, { 0xEEB0D93FC377A9B4ULL, 0xB77F8E995DBD4D67ULL } }, /* XSUM_XXH128_testdata[5331] */\n    { 1777, 0x000000009E3779B1ULL, { 0xAACFCB5C90A26EB9ULL, 0x2A4A63B629DF54C6ULL } }, /* XSUM_XXH128_testdata[5332] */\n    { 1777, 0x9E3779B185EBCA8DULL, { 0x446FADB53542D92EULL, 0xA979B14FBF81B1EAULL } }, /* XSUM_XXH128_testdata[5333] */\n    { 1778, 0x0000000000000000ULL, { 0x28545D09486B0EDEULL, 0x5EB3B9DF31A1A1F1ULL } }, /* XSUM_XXH128_testdata[5334] */\n    { 1778, 0x000000009E3779B1ULL, { 0x04C0C88FF57225F2ULL, 0x753D9F064795A3BCULL } }, /* XSUM_XXH128_testdata[5335] */\n    { 1778, 0x9E3779B185EBCA8DULL, { 0x3CA002D070E98821ULL, 0x53819414DE075C59ULL } }, /* XSUM_XXH128_testdata[5336] */\n    { 1779, 0x0000000000000000ULL, { 0xF0CA94F97D50BBFEULL, 0x7D1D67DE12FE3700ULL } }, /* XSUM_XXH128_testdata[5337] */\n    { 1779, 0x000000009E3779B1ULL, { 0xCCC2F102B39D5422ULL, 0x58D662B1A7DD3EB7ULL } }, /* XSUM_XXH128_testdata[5338] */\n    { 1779, 0x9E3779B185EBCA8DULL, { 0xF59AE48D6BDD5E0AULL, 0x3617EA85CC98C3E8ULL } }, /* XSUM_XXH128_testdata[5339] */\n    { 1780, 0x0000000000000000ULL, { 0x1B418E8757E55B1CULL, 0xCBB2466B29827B9DULL } }, /* XSUM_XXH128_testdata[5340] */\n    { 1780, 0x000000009E3779B1ULL, { 0x240B924887EFCB4CULL, 0x27FF00DC1F60CA0FULL } }, /* XSUM_XXH128_testdata[5341] */\n    { 1780, 0x9E3779B185EBCA8DULL, { 0x02EAF2FA4ECE6DEEULL, 0x062B49FB37E65F8DULL } }, /* XSUM_XXH128_testdata[5342] */\n    { 1781, 0x0000000000000000ULL, { 0x76EE9AAE93299118ULL, 0xF6DCF3E3D6BD17F1ULL } }, /* XSUM_XXH128_testdata[5343] */\n    { 1781, 0x000000009E3779B1ULL, { 0x89DEA57DF3A4B3CCULL, 0x37BB2F3B2C120D9EULL } }, /* XSUM_XXH128_testdata[5344] */\n    { 1781, 0x9E3779B185EBCA8DULL, { 0xC7B9D76F32FDC14FULL, 0xCE17BC7EBDE75699ULL } }, /* XSUM_XXH128_testdata[5345] */\n    { 1782, 0x0000000000000000ULL, { 0x30A587DC4F623029ULL, 0xA9BC1802B8D4838AULL } }, /* XSUM_XXH128_testdata[5346] */\n    { 1782, 0x000000009E3779B1ULL, { 0xD00AA895BFA4E8E8ULL, 0xFDCE67B13631F3E4ULL } }, /* XSUM_XXH128_testdata[5347] */\n    { 1782, 0x9E3779B185EBCA8DULL, { 0x8C443094A526F96EULL, 0xB64032582EEF0C8EULL } }, /* XSUM_XXH128_testdata[5348] */\n    { 1783, 0x0000000000000000ULL, { 0xC98D9F8922FE6D86ULL, 0x6D08996D981FDB48ULL } }, /* XSUM_XXH128_testdata[5349] */\n    { 1783, 0x000000009E3779B1ULL, { 0x0BAE9370A6DAFC19ULL, 0xDAEDBF9601AC3E8CULL } }, /* XSUM_XXH128_testdata[5350] */\n    { 1783, 0x9E3779B185EBCA8DULL, { 0xD84F0298549F96D5ULL, 0x6E2AC745349E857AULL } }, /* XSUM_XXH128_testdata[5351] */\n    { 1784, 0x0000000000000000ULL, { 0xB605BE989491FC40ULL, 0x7C609862D0468D63ULL } }, /* XSUM_XXH128_testdata[5352] */\n    { 1784, 0x000000009E3779B1ULL, { 0x1E9A832A1E89B1F9ULL, 0x285DA1781D81F7C6ULL } }, /* XSUM_XXH128_testdata[5353] */\n    { 1784, 0x9E3779B185EBCA8DULL, { 0xC367EC49E1BF23F3ULL, 0xB2ECD96D440454B2ULL } }, /* XSUM_XXH128_testdata[5354] */\n    { 1785, 0x0000000000000000ULL, { 0x9D80AD9032C9486DULL, 0x7C7FF011ACE706CFULL } }, /* XSUM_XXH128_testdata[5355] */\n    { 1785, 0x000000009E3779B1ULL, { 0xFE3B976D9D1DAF35ULL, 0xE8C6780A962FCE58ULL } }, /* XSUM_XXH128_testdata[5356] */\n    { 1785, 0x9E3779B185EBCA8DULL, { 0xAED7D00BED5E8263ULL, 0x31D15CCCCF52D712ULL } }, /* XSUM_XXH128_testdata[5357] */\n    { 1786, 0x0000000000000000ULL, { 0x2124A0F278C2B392ULL, 0x338BF9D17947730AULL } }, /* XSUM_XXH128_testdata[5358] */\n    { 1786, 0x000000009E3779B1ULL, { 0x7D41E61FFBFCE9EDULL, 0xC52174205B9112D1ULL } }, /* XSUM_XXH128_testdata[5359] */\n    { 1786, 0x9E3779B185EBCA8DULL, { 0x1E972898A06F3147ULL, 0x9FF52B56D4005F87ULL } }, /* XSUM_XXH128_testdata[5360] */\n    { 1787, 0x0000000000000000ULL, { 0x75E335BE40042A57ULL, 0x2BA10297BC7330C2ULL } }, /* XSUM_XXH128_testdata[5361] */\n    { 1787, 0x000000009E3779B1ULL, { 0xCAA867C8DB89240CULL, 0xBA161ADABA273A13ULL } }, /* XSUM_XXH128_testdata[5362] */\n    { 1787, 0x9E3779B185EBCA8DULL, { 0x8E60B89DCD3F45ECULL, 0x1730D302A0F5D1C2ULL } }, /* XSUM_XXH128_testdata[5363] */\n    { 1788, 0x0000000000000000ULL, { 0x137D7CCB6D40ABE2ULL, 0x26AAEBE38EB0668BULL } }, /* XSUM_XXH128_testdata[5364] */\n    { 1788, 0x000000009E3779B1ULL, { 0x54150BD4DDD288CBULL, 0x325964B3A2E6869FULL } }, /* XSUM_XXH128_testdata[5365] */\n    { 1788, 0x9E3779B185EBCA8DULL, { 0x227A5D232641DF7AULL, 0xE45B03AF640A0232ULL } }, /* XSUM_XXH128_testdata[5366] */\n    { 1789, 0x0000000000000000ULL, { 0x0D7D2C85BC8340EAULL, 0xF6F17A353DF4F43EULL } }, /* XSUM_XXH128_testdata[5367] */\n    { 1789, 0x000000009E3779B1ULL, { 0xC53340A8D489D5CFULL, 0x8F0DC9DE4E2AE776ULL } }, /* XSUM_XXH128_testdata[5368] */\n    { 1789, 0x9E3779B185EBCA8DULL, { 0x2822DA21F08795C5ULL, 0x92F30277E5E01EF5ULL } }, /* XSUM_XXH128_testdata[5369] */\n    { 1790, 0x0000000000000000ULL, { 0x59082F65C4BE2301ULL, 0x8D36A21BAA2B0FDFULL } }, /* XSUM_XXH128_testdata[5370] */\n    { 1790, 0x000000009E3779B1ULL, { 0xA6A14D1B29846F1AULL, 0x75280B94A2C6EA93ULL } }, /* XSUM_XXH128_testdata[5371] */\n    { 1790, 0x9E3779B185EBCA8DULL, { 0x5B83834233EA8169ULL, 0xCA573FD629CFCE25ULL } }, /* XSUM_XXH128_testdata[5372] */\n    { 1791, 0x0000000000000000ULL, { 0x1CABC296AE13AFC9ULL, 0xF8F576F6C9C50459ULL } }, /* XSUM_XXH128_testdata[5373] */\n    { 1791, 0x000000009E3779B1ULL, { 0xF96CEEEBA5242F77ULL, 0x95CA325165D8CBC3ULL } }, /* XSUM_XXH128_testdata[5374] */\n    { 1791, 0x9E3779B185EBCA8DULL, { 0x4337C8383334571BULL, 0x53B938A6D5239614ULL } }, /* XSUM_XXH128_testdata[5375] */\n    { 1792, 0x0000000000000000ULL, { 0x1600BFD22906D6D3ULL, 0x2DBC131AF44AD464ULL } }, /* XSUM_XXH128_testdata[5376] */\n    { 1792, 0x000000009E3779B1ULL, { 0x829CBE2B8AC2B5ECULL, 0x8897854C137C9B90ULL } }, /* XSUM_XXH128_testdata[5377] */\n    { 1792, 0x9E3779B185EBCA8DULL, { 0xE9D76D35B96143DBULL, 0xE5575CD21E0BFBE5ULL } }, /* XSUM_XXH128_testdata[5378] */\n    { 1793, 0x0000000000000000ULL, { 0x7442C5CFB64761CDULL, 0xF80727272B9B0697ULL } }, /* XSUM_XXH128_testdata[5379] */\n    { 1793, 0x000000009E3779B1ULL, { 0xC3E64600055EFF4BULL, 0x66604A05F1C83119ULL } }, /* XSUM_XXH128_testdata[5380] */\n    { 1793, 0x9E3779B185EBCA8DULL, { 0x4DD3F5933ACDF470ULL, 0x9C99C420874898D3ULL } }, /* XSUM_XXH128_testdata[5381] */\n    { 1794, 0x0000000000000000ULL, { 0xB5CE87CEBA63C5D5ULL, 0x345193F2B4C1D986ULL } }, /* XSUM_XXH128_testdata[5382] */\n    { 1794, 0x000000009E3779B1ULL, { 0xD75DA1AD2B7DAFFFULL, 0xC114AB0F1C76597DULL } }, /* XSUM_XXH128_testdata[5383] */\n    { 1794, 0x9E3779B185EBCA8DULL, { 0x1B6FDCDBF614B44CULL, 0x304DEB7EA350EB1DULL } }, /* XSUM_XXH128_testdata[5384] */\n    { 1795, 0x0000000000000000ULL, { 0x203458291AFCB92EULL, 0xFC1CD883D4A111B5ULL } }, /* XSUM_XXH128_testdata[5385] */\n    { 1795, 0x000000009E3779B1ULL, { 0x57A9C3A34F97F525ULL, 0x2F0CB8ECF37EB0C1ULL } }, /* XSUM_XXH128_testdata[5386] */\n    { 1795, 0x9E3779B185EBCA8DULL, { 0x90E814F41CB31E27ULL, 0x882EC73D64F820F6ULL } }, /* XSUM_XXH128_testdata[5387] */\n    { 1796, 0x0000000000000000ULL, { 0x6662DCB7A0C70C62ULL, 0x7C93F0C140D94534ULL } }, /* XSUM_XXH128_testdata[5388] */\n    { 1796, 0x000000009E3779B1ULL, { 0x9D6849BBD605C043ULL, 0x110D40039F547845ULL } }, /* XSUM_XXH128_testdata[5389] */\n    { 1796, 0x9E3779B185EBCA8DULL, { 0x11F227B612D8D3F1ULL, 0xB3E74E0B70FC15ACULL } }, /* XSUM_XXH128_testdata[5390] */\n    { 1797, 0x0000000000000000ULL, { 0xE7CD93B7BBE19A89ULL, 0x9BB891ED3A6F7387ULL } }, /* XSUM_XXH128_testdata[5391] */\n    { 1797, 0x000000009E3779B1ULL, { 0xB31B86A5D2561068ULL, 0x65AA4924AB2505B5ULL } }, /* XSUM_XXH128_testdata[5392] */\n    { 1797, 0x9E3779B185EBCA8DULL, { 0x9DB0C9AF8CB16E95ULL, 0xF244C6D0F4BCEFFCULL } }, /* XSUM_XXH128_testdata[5393] */\n    { 1798, 0x0000000000000000ULL, { 0x4239EC2E79A4A17BULL, 0xAA9DCF52BC7E62B2ULL } }, /* XSUM_XXH128_testdata[5394] */\n    { 1798, 0x000000009E3779B1ULL, { 0xCE82CA4CFA61774EULL, 0x3A7863CC4DF96547ULL } }, /* XSUM_XXH128_testdata[5395] */\n    { 1798, 0x9E3779B185EBCA8DULL, { 0x82622B15DE9DE4F4ULL, 0x396A799B322441A7ULL } }, /* XSUM_XXH128_testdata[5396] */\n    { 1799, 0x0000000000000000ULL, { 0x19712A44419FBB0EULL, 0xB6E1FB70E8B3C33DULL } }, /* XSUM_XXH128_testdata[5397] */\n    { 1799, 0x000000009E3779B1ULL, { 0x57F25D8914332F77ULL, 0xD0897610AEB15DAFULL } }, /* XSUM_XXH128_testdata[5398] */\n    { 1799, 0x9E3779B185EBCA8DULL, { 0x41AC7FC823CE85FEULL, 0xDD06C96EDEBDBF2BULL } }, /* XSUM_XXH128_testdata[5399] */\n    { 1800, 0x0000000000000000ULL, { 0x09138FDB0A328971ULL, 0x483CD980E0BADCACULL } }, /* XSUM_XXH128_testdata[5400] */\n    { 1800, 0x000000009E3779B1ULL, { 0x542C2DDD0C2E1379ULL, 0x26EF3DD259C23B3AULL } }, /* XSUM_XXH128_testdata[5401] */\n    { 1800, 0x9E3779B185EBCA8DULL, { 0xBA962ED162D0CD51ULL, 0xDE982B243F627205ULL } }, /* XSUM_XXH128_testdata[5402] */\n    { 1801, 0x0000000000000000ULL, { 0x60BB2E0AE238E080ULL, 0x986CC37E7942FC25ULL } }, /* XSUM_XXH128_testdata[5403] */\n    { 1801, 0x000000009E3779B1ULL, { 0x718CE1C7519A06CCULL, 0x945BCAB9D28A238DULL } }, /* XSUM_XXH128_testdata[5404] */\n    { 1801, 0x9E3779B185EBCA8DULL, { 0xCF9D2A442939067AULL, 0x5EC55BA36E3C7DCBULL } }, /* XSUM_XXH128_testdata[5405] */\n    { 1802, 0x0000000000000000ULL, { 0x5C7BE39A4D166B11ULL, 0x5284545EF2F4474EULL } }, /* XSUM_XXH128_testdata[5406] */\n    { 1802, 0x000000009E3779B1ULL, { 0xEEF03C648E61E388ULL, 0x9EAD4F07BBD3E3C8ULL } }, /* XSUM_XXH128_testdata[5407] */\n    { 1802, 0x9E3779B185EBCA8DULL, { 0xBE8B6B2210FE8928ULL, 0xF5DF5C673DF455EEULL } }, /* XSUM_XXH128_testdata[5408] */\n    { 1803, 0x0000000000000000ULL, { 0xA8112FDF1FE59564ULL, 0x30B0BA8698B25A79ULL } }, /* XSUM_XXH128_testdata[5409] */\n    { 1803, 0x000000009E3779B1ULL, { 0x1751E67BA77EE970ULL, 0x6FF993401DE80D72ULL } }, /* XSUM_XXH128_testdata[5410] */\n    { 1803, 0x9E3779B185EBCA8DULL, { 0xABDAAC610AC20E1AULL, 0xD48691111803A3F7ULL } }, /* XSUM_XXH128_testdata[5411] */\n    { 1804, 0x0000000000000000ULL, { 0xD3D8FF0B3F208BCBULL, 0x2E8968B351D41561ULL } }, /* XSUM_XXH128_testdata[5412] */\n    { 1804, 0x000000009E3779B1ULL, { 0xA43F0A0B8822675DULL, 0x0B4D89478370763CULL } }, /* XSUM_XXH128_testdata[5413] */\n    { 1804, 0x9E3779B185EBCA8DULL, { 0x2DD6D5156249E5FBULL, 0xCE3205E134ABA38DULL } }, /* XSUM_XXH128_testdata[5414] */\n    { 1805, 0x0000000000000000ULL, { 0x055F42CC1C378003ULL, 0xB1FBB4BFCEDE746CULL } }, /* XSUM_XXH128_testdata[5415] */\n    { 1805, 0x000000009E3779B1ULL, { 0xFF7B53ADE921C2E0ULL, 0x0A7C3F0AC9423FDDULL } }, /* XSUM_XXH128_testdata[5416] */\n    { 1805, 0x9E3779B185EBCA8DULL, { 0x842ED122359E4A02ULL, 0x9473D5C125E59315ULL } }, /* XSUM_XXH128_testdata[5417] */\n    { 1806, 0x0000000000000000ULL, { 0xCD607DBA7AD99830ULL, 0x68CB307135FC1B94ULL } }, /* XSUM_XXH128_testdata[5418] */\n    { 1806, 0x000000009E3779B1ULL, { 0x35CC8411F42F8E77ULL, 0x8A2E5D42FF7BB0E9ULL } }, /* XSUM_XXH128_testdata[5419] */\n    { 1806, 0x9E3779B185EBCA8DULL, { 0x9E68ED4EB7B5DA31ULL, 0x818F82668DDF5ED0ULL } }, /* XSUM_XXH128_testdata[5420] */\n    { 1807, 0x0000000000000000ULL, { 0x6F3CBAB3D64C7DC1ULL, 0xAAD3C089C286E5ADULL } }, /* XSUM_XXH128_testdata[5421] */\n    { 1807, 0x000000009E3779B1ULL, { 0xC0E50D66C10E5DF6ULL, 0x9B1BA7B86C3F0EF4ULL } }, /* XSUM_XXH128_testdata[5422] */\n    { 1807, 0x9E3779B185EBCA8DULL, { 0x6B29605C4425F727ULL, 0x887752E19855BD58ULL } }, /* XSUM_XXH128_testdata[5423] */\n    { 1808, 0x0000000000000000ULL, { 0xD6C0644F3EE9057EULL, 0x03D2E46EDB16D60EULL } }, /* XSUM_XXH128_testdata[5424] */\n    { 1808, 0x000000009E3779B1ULL, { 0x6F2EE92A8DED742CULL, 0x3739DE0ACFEBB464ULL } }, /* XSUM_XXH128_testdata[5425] */\n    { 1808, 0x9E3779B185EBCA8DULL, { 0x6095DA16E23ABCE7ULL, 0x2CAFF1A21B4B1966ULL } }, /* XSUM_XXH128_testdata[5426] */\n    { 1809, 0x0000000000000000ULL, { 0xCC323714241418F9ULL, 0x26EEED7EAADA35D8ULL } }, /* XSUM_XXH128_testdata[5427] */\n    { 1809, 0x000000009E3779B1ULL, { 0xEC6C95AEC35300EDULL, 0x169A305FB86AF370ULL } }, /* XSUM_XXH128_testdata[5428] */\n    { 1809, 0x9E3779B185EBCA8DULL, { 0x08439A6E0F41E972ULL, 0x56378BD80C9DA2D5ULL } }, /* XSUM_XXH128_testdata[5429] */\n    { 1810, 0x0000000000000000ULL, { 0xA2ADC107689E8EA8ULL, 0xB5901D7F44E89AC2ULL } }, /* XSUM_XXH128_testdata[5430] */\n    { 1810, 0x000000009E3779B1ULL, { 0x882DEFB9A2E9BE88ULL, 0xB63E08357295498CULL } }, /* XSUM_XXH128_testdata[5431] */\n    { 1810, 0x9E3779B185EBCA8DULL, { 0xAD99623A0186EA0CULL, 0xDBE4321A4A3F2B67ULL } }, /* XSUM_XXH128_testdata[5432] */\n    { 1811, 0x0000000000000000ULL, { 0x906A2880DC1BF8BEULL, 0x1D1246E5E6D94B62ULL } }, /* XSUM_XXH128_testdata[5433] */\n    { 1811, 0x000000009E3779B1ULL, { 0xD030D537A4F834FCULL, 0xA734408AA78800B9ULL } }, /* XSUM_XXH128_testdata[5434] */\n    { 1811, 0x9E3779B185EBCA8DULL, { 0x26B1549538E80D59ULL, 0x01B3F396F82EC7DEULL } }, /* XSUM_XXH128_testdata[5435] */\n    { 1812, 0x0000000000000000ULL, { 0xB668F76405AA3171ULL, 0x26EAC9D66B3A986BULL } }, /* XSUM_XXH128_testdata[5436] */\n    { 1812, 0x000000009E3779B1ULL, { 0xF093084CEF993BFFULL, 0x7B8A080E4973EC51ULL } }, /* XSUM_XXH128_testdata[5437] */\n    { 1812, 0x9E3779B185EBCA8DULL, { 0x029C0FD70CBE3722ULL, 0xB51C6C751FCEBBCAULL } }, /* XSUM_XXH128_testdata[5438] */\n    { 1813, 0x0000000000000000ULL, { 0x4DDF364B72D57724ULL, 0xCC246C23058C10D8ULL } }, /* XSUM_XXH128_testdata[5439] */\n    { 1813, 0x000000009E3779B1ULL, { 0xA17CCBADFFDAB623ULL, 0x409030429F6EDCC9ULL } }, /* XSUM_XXH128_testdata[5440] */\n    { 1813, 0x9E3779B185EBCA8DULL, { 0xD12A4F2EBF788B64ULL, 0xA257CB88151CB25DULL } }, /* XSUM_XXH128_testdata[5441] */\n    { 1814, 0x0000000000000000ULL, { 0x3ACCD4A8FC7EDB52ULL, 0x4FDB35FC28363374ULL } }, /* XSUM_XXH128_testdata[5442] */\n    { 1814, 0x000000009E3779B1ULL, { 0x86B0AC0154CFD27CULL, 0x24C0D9841DD46E70ULL } }, /* XSUM_XXH128_testdata[5443] */\n    { 1814, 0x9E3779B185EBCA8DULL, { 0x56E573B5D8466C25ULL, 0xFC612B5A76A0E1D0ULL } }, /* XSUM_XXH128_testdata[5444] */\n    { 1815, 0x0000000000000000ULL, { 0x86BEA08138DF8496ULL, 0xAFBF60BA8DBEE4C7ULL } }, /* XSUM_XXH128_testdata[5445] */\n    { 1815, 0x000000009E3779B1ULL, { 0x33D994855725A75EULL, 0x6240A05EE63FD385ULL } }, /* XSUM_XXH128_testdata[5446] */\n    { 1815, 0x9E3779B185EBCA8DULL, { 0x94F9EB73D3671373ULL, 0x9900FEE5DADD99D6ULL } }, /* XSUM_XXH128_testdata[5447] */\n    { 1816, 0x0000000000000000ULL, { 0xEB9B23A4064CA4F1ULL, 0xC33F497DC395EEBAULL } }, /* XSUM_XXH128_testdata[5448] */\n    { 1816, 0x000000009E3779B1ULL, { 0x46DA7AEAA7A2099AULL, 0x598FA5CFDD3A3525ULL } }, /* XSUM_XXH128_testdata[5449] */\n    { 1816, 0x9E3779B185EBCA8DULL, { 0xEB3591CFA85FBF19ULL, 0xEC0D69FD54F27759ULL } }, /* XSUM_XXH128_testdata[5450] */\n    { 1817, 0x0000000000000000ULL, { 0xA19C89C1644C79CDULL, 0x1AAC82905C093AC4ULL } }, /* XSUM_XXH128_testdata[5451] */\n    { 1817, 0x000000009E3779B1ULL, { 0xCB01A37D33FC8042ULL, 0x74CC0D3819EDFA6CULL } }, /* XSUM_XXH128_testdata[5452] */\n    { 1817, 0x9E3779B185EBCA8DULL, { 0x097868EDA1665A24ULL, 0xEA675A49B3FC53ADULL } }, /* XSUM_XXH128_testdata[5453] */\n    { 1818, 0x0000000000000000ULL, { 0x874B6E4172150EEFULL, 0x8BDD3FA12F782143ULL } }, /* XSUM_XXH128_testdata[5454] */\n    { 1818, 0x000000009E3779B1ULL, { 0x91E6BAFA3FC1A9A4ULL, 0xFA5E994D086BEF76ULL } }, /* XSUM_XXH128_testdata[5455] */\n    { 1818, 0x9E3779B185EBCA8DULL, { 0x026DC926C3652C4EULL, 0x70D7546CEE2A3CF6ULL } }, /* XSUM_XXH128_testdata[5456] */\n    { 1819, 0x0000000000000000ULL, { 0x96812576E01F3B8CULL, 0xFD5DFF14EE01D877ULL } }, /* XSUM_XXH128_testdata[5457] */\n    { 1819, 0x000000009E3779B1ULL, { 0x7D8F8A3585661728ULL, 0xFA167BC30E858B1EULL } }, /* XSUM_XXH128_testdata[5458] */\n    { 1819, 0x9E3779B185EBCA8DULL, { 0xA09C4E9F4F6B933EULL, 0xE600FA9999C9C644ULL } }, /* XSUM_XXH128_testdata[5459] */\n    { 1820, 0x0000000000000000ULL, { 0xF4B08FFD3703291CULL, 0xE0650B0D5987871BULL } }, /* XSUM_XXH128_testdata[5460] */\n    { 1820, 0x000000009E3779B1ULL, { 0x7EDC07AB279F1C35ULL, 0xAE8E8D528422FD44ULL } }, /* XSUM_XXH128_testdata[5461] */\n    { 1820, 0x9E3779B185EBCA8DULL, { 0xA84511296432A978ULL, 0x7ED74068B5578E11ULL } }, /* XSUM_XXH128_testdata[5462] */\n    { 1821, 0x0000000000000000ULL, { 0x55161D50DBDC33B2ULL, 0x5A49BA761A44BC2FULL } }, /* XSUM_XXH128_testdata[5463] */\n    { 1821, 0x000000009E3779B1ULL, { 0xAC62C98CF4A9CEFCULL, 0xD03946353F5183BCULL } }, /* XSUM_XXH128_testdata[5464] */\n    { 1821, 0x9E3779B185EBCA8DULL, { 0x089AA97A0461F0B9ULL, 0xCDFBFE3E3F9BD845ULL } }, /* XSUM_XXH128_testdata[5465] */\n    { 1822, 0x0000000000000000ULL, { 0xF323F26709AD9FFEULL, 0x72D2805B9BE8F1DAULL } }, /* XSUM_XXH128_testdata[5466] */\n    { 1822, 0x000000009E3779B1ULL, { 0x27B58F835461FBB0ULL, 0x6E10A4D1200BD2F7ULL } }, /* XSUM_XXH128_testdata[5467] */\n    { 1822, 0x9E3779B185EBCA8DULL, { 0x7FB6FC17345F3C04ULL, 0x6299CE8DDD2067D9ULL } }, /* XSUM_XXH128_testdata[5468] */\n    { 1823, 0x0000000000000000ULL, { 0x87F8777310FFB883ULL, 0x64509F1B411F4452ULL } }, /* XSUM_XXH128_testdata[5469] */\n    { 1823, 0x000000009E3779B1ULL, { 0xE4701B432E45F64FULL, 0x138FD904A35EBA0CULL } }, /* XSUM_XXH128_testdata[5470] */\n    { 1823, 0x9E3779B185EBCA8DULL, { 0xD5AA462301EE9512ULL, 0xCD20802689BC3EB2ULL } }, /* XSUM_XXH128_testdata[5471] */\n    { 1824, 0x0000000000000000ULL, { 0x1F380E20231D0A25ULL, 0x7CBC2C4B1CBDC63BULL } }, /* XSUM_XXH128_testdata[5472] */\n    { 1824, 0x000000009E3779B1ULL, { 0xE44349BDEBF2B90CULL, 0x1F2AC463614517D4ULL } }, /* XSUM_XXH128_testdata[5473] */\n    { 1824, 0x9E3779B185EBCA8DULL, { 0xF4FA50A56CFEFC9DULL, 0x7383F2CF64219180ULL } }, /* XSUM_XXH128_testdata[5474] */\n    { 1825, 0x0000000000000000ULL, { 0xB3D9C2891C916519ULL, 0x847A61441A156D72ULL } }, /* XSUM_XXH128_testdata[5475] */\n    { 1825, 0x000000009E3779B1ULL, { 0x01C2FB09F010DACEULL, 0xF4009D2034FE5E83ULL } }, /* XSUM_XXH128_testdata[5476] */\n    { 1825, 0x9E3779B185EBCA8DULL, { 0x173D0678A2A672ECULL, 0x19187818568418A4ULL } }, /* XSUM_XXH128_testdata[5477] */\n    { 1826, 0x0000000000000000ULL, { 0x2125C4D653CF7620ULL, 0x12FCCCA122C6EC8CULL } }, /* XSUM_XXH128_testdata[5478] */\n    { 1826, 0x000000009E3779B1ULL, { 0x2609698FA5B7BA45ULL, 0xD72D8B5B811577FEULL } }, /* XSUM_XXH128_testdata[5479] */\n    { 1826, 0x9E3779B185EBCA8DULL, { 0x92A0B4B951D045E4ULL, 0xC5F9769AB6525342ULL } }, /* XSUM_XXH128_testdata[5480] */\n    { 1827, 0x0000000000000000ULL, { 0x4C9DA977D414FE62ULL, 0x795181C8F602C8D0ULL } }, /* XSUM_XXH128_testdata[5481] */\n    { 1827, 0x000000009E3779B1ULL, { 0x9F715007526D5423ULL, 0x06ED17DAB584A813ULL } }, /* XSUM_XXH128_testdata[5482] */\n    { 1827, 0x9E3779B185EBCA8DULL, { 0xEB7A8EAC6B438ACBULL, 0xB0B1958F16233732ULL } }, /* XSUM_XXH128_testdata[5483] */\n    { 1828, 0x0000000000000000ULL, { 0xE69D3DEAD3A1D13AULL, 0x52D070B8732439DEULL } }, /* XSUM_XXH128_testdata[5484] */\n    { 1828, 0x000000009E3779B1ULL, { 0xFD5A6AAEB78E5B78ULL, 0x94E696F34B52FA5CULL } }, /* XSUM_XXH128_testdata[5485] */\n    { 1828, 0x9E3779B185EBCA8DULL, { 0x61D68F5DEF64FAE9ULL, 0x20E7CE9A60D3DCEAULL } }, /* XSUM_XXH128_testdata[5486] */\n    { 1829, 0x0000000000000000ULL, { 0xB60AD19AE1577634ULL, 0xFB45C03061EB9AA9ULL } }, /* XSUM_XXH128_testdata[5487] */\n    { 1829, 0x000000009E3779B1ULL, { 0x665D65BA02E7CADAULL, 0x4C8EE375AA233BB6ULL } }, /* XSUM_XXH128_testdata[5488] */\n    { 1829, 0x9E3779B185EBCA8DULL, { 0x157BB6F64A0F8673ULL, 0xEB4E9840310F3F57ULL } }, /* XSUM_XXH128_testdata[5489] */\n    { 1830, 0x0000000000000000ULL, { 0x23F7D3D78C9541A1ULL, 0x00A71CE04BED815DULL } }, /* XSUM_XXH128_testdata[5490] */\n    { 1830, 0x000000009E3779B1ULL, { 0x2BC0AE3F91757B65ULL, 0x47B5565F34B96DEAULL } }, /* XSUM_XXH128_testdata[5491] */\n    { 1830, 0x9E3779B185EBCA8DULL, { 0x9AD85BDDCB257D60ULL, 0x480E8211C5071B9BULL } }, /* XSUM_XXH128_testdata[5492] */\n    { 1831, 0x0000000000000000ULL, { 0x847C49F72E712CA0ULL, 0x9BC2F47C971F748CULL } }, /* XSUM_XXH128_testdata[5493] */\n    { 1831, 0x000000009E3779B1ULL, { 0xC0225C91328A9FACULL, 0xB036A6C92FA99859ULL } }, /* XSUM_XXH128_testdata[5494] */\n    { 1831, 0x9E3779B185EBCA8DULL, { 0x21252068A044D273ULL, 0x234C0FF3BD810C44ULL } }, /* XSUM_XXH128_testdata[5495] */\n    { 1832, 0x0000000000000000ULL, { 0x7E8D288D7E0903F5ULL, 0x83893A37BEBC04F8ULL } }, /* XSUM_XXH128_testdata[5496] */\n    { 1832, 0x000000009E3779B1ULL, { 0x5EDE1087ECC28318ULL, 0x920EA2ED03E5934FULL } }, /* XSUM_XXH128_testdata[5497] */\n    { 1832, 0x9E3779B185EBCA8DULL, { 0x52E4DFEE75669F66ULL, 0xCE28A9B9FBD381CDULL } }, /* XSUM_XXH128_testdata[5498] */\n    { 1833, 0x0000000000000000ULL, { 0x5B5035E08D3F74D5ULL, 0x24B962E7406AED7AULL } }, /* XSUM_XXH128_testdata[5499] */\n    { 1833, 0x000000009E3779B1ULL, { 0x988C816C4A2AEC2FULL, 0xFFDFF8BE5CC02177ULL } }, /* XSUM_XXH128_testdata[5500] */\n    { 1833, 0x9E3779B185EBCA8DULL, { 0x0E0C589755838AC9ULL, 0x687B88AC5F6962DFULL } }, /* XSUM_XXH128_testdata[5501] */\n    { 1834, 0x0000000000000000ULL, { 0xE445EAFCAE8B614AULL, 0xD21325B89D1457E8ULL } }, /* XSUM_XXH128_testdata[5502] */\n    { 1834, 0x000000009E3779B1ULL, { 0xA7241658134513BEULL, 0xB63693F0E69205F3ULL } }, /* XSUM_XXH128_testdata[5503] */\n    { 1834, 0x9E3779B185EBCA8DULL, { 0x95B44CB99239E72FULL, 0x389BC6BBE7BBA550ULL } }, /* XSUM_XXH128_testdata[5504] */\n    { 1835, 0x0000000000000000ULL, { 0xC8C5C290B847E543ULL, 0xD70D67E10FB9AD33ULL } }, /* XSUM_XXH128_testdata[5505] */\n    { 1835, 0x000000009E3779B1ULL, { 0x1E9FFDED7617779EULL, 0x49EA0DCF9A9A9656ULL } }, /* XSUM_XXH128_testdata[5506] */\n    { 1835, 0x9E3779B185EBCA8DULL, { 0xA586269BB62C5529ULL, 0xDC4A86F929D0D27BULL } }, /* XSUM_XXH128_testdata[5507] */\n    { 1836, 0x0000000000000000ULL, { 0x422C3F03566DF5ECULL, 0x6D5E217CC89A3551ULL } }, /* XSUM_XXH128_testdata[5508] */\n    { 1836, 0x000000009E3779B1ULL, { 0x50C33F90BDA79E05ULL, 0xBAE61F58B0FABBB5ULL } }, /* XSUM_XXH128_testdata[5509] */\n    { 1836, 0x9E3779B185EBCA8DULL, { 0x89681B08FA4BE38BULL, 0xEE6039DCB4FECFC9ULL } }, /* XSUM_XXH128_testdata[5510] */\n    { 1837, 0x0000000000000000ULL, { 0x771B68394D919D8AULL, 0x8D3B794AFF831A7AULL } }, /* XSUM_XXH128_testdata[5511] */\n    { 1837, 0x000000009E3779B1ULL, { 0xD8EE55EDAD3D1D93ULL, 0xCD070B34C92FB7A1ULL } }, /* XSUM_XXH128_testdata[5512] */\n    { 1837, 0x9E3779B185EBCA8DULL, { 0x03C1D8F4A811E3DAULL, 0x42C0387DE56D920DULL } }, /* XSUM_XXH128_testdata[5513] */\n    { 1838, 0x0000000000000000ULL, { 0xF40433C00031EA14ULL, 0x56191BF95B85DC43ULL } }, /* XSUM_XXH128_testdata[5514] */\n    { 1838, 0x000000009E3779B1ULL, { 0xC6F567A2B19E3436ULL, 0x2C036287356FD6DDULL } }, /* XSUM_XXH128_testdata[5515] */\n    { 1838, 0x9E3779B185EBCA8DULL, { 0xF4B53B2D1BB1D68BULL, 0x31635D734844049CULL } }, /* XSUM_XXH128_testdata[5516] */\n    { 1839, 0x0000000000000000ULL, { 0xC9CC543789796BAAULL, 0x0E2AE7C0F78CAD6DULL } }, /* XSUM_XXH128_testdata[5517] */\n    { 1839, 0x000000009E3779B1ULL, { 0x2341CBBD9AC6FBEAULL, 0xEF3460B4EAEBF3B2ULL } }, /* XSUM_XXH128_testdata[5518] */\n    { 1839, 0x9E3779B185EBCA8DULL, { 0x7105D5BB6B8A528BULL, 0x01C082636666A851ULL } }, /* XSUM_XXH128_testdata[5519] */\n    { 1840, 0x0000000000000000ULL, { 0xF33AED1F8EFD7B58ULL, 0x0CE429F1758EEA6BULL } }, /* XSUM_XXH128_testdata[5520] */\n    { 1840, 0x000000009E3779B1ULL, { 0xDBA739601DC1967DULL, 0x38265CE5EC13FD1DULL } }, /* XSUM_XXH128_testdata[5521] */\n    { 1840, 0x9E3779B185EBCA8DULL, { 0xBE71CFF42EF4CFC8ULL, 0x5924145EC48F651EULL } }, /* XSUM_XXH128_testdata[5522] */\n    { 1841, 0x0000000000000000ULL, { 0x28ADBCC8145E1508ULL, 0xA8C6E4D46D05E733ULL } }, /* XSUM_XXH128_testdata[5523] */\n    { 1841, 0x000000009E3779B1ULL, { 0xF95A543ABF839AE5ULL, 0xB27229509C6BAD9EULL } }, /* XSUM_XXH128_testdata[5524] */\n    { 1841, 0x9E3779B185EBCA8DULL, { 0x7E6E24EB1DADEDA6ULL, 0xFD7C9578EEA6F63EULL } }, /* XSUM_XXH128_testdata[5525] */\n    { 1842, 0x0000000000000000ULL, { 0x002E212FC7B05498ULL, 0xFE2F3764FEDBB9E5ULL } }, /* XSUM_XXH128_testdata[5526] */\n    { 1842, 0x000000009E3779B1ULL, { 0xC0ADA0FCCD35A1F7ULL, 0x331857A257DDEDCAULL } }, /* XSUM_XXH128_testdata[5527] */\n    { 1842, 0x9E3779B185EBCA8DULL, { 0x864A0B7A16D0DA18ULL, 0x35BD7CF44C4844BBULL } }, /* XSUM_XXH128_testdata[5528] */\n    { 1843, 0x0000000000000000ULL, { 0x6BC99F64CD6F41C8ULL, 0x65F92552102C2B72ULL } }, /* XSUM_XXH128_testdata[5529] */\n    { 1843, 0x000000009E3779B1ULL, { 0xC9CB5A9DAD729C38ULL, 0x7B39B7699302DD7CULL } }, /* XSUM_XXH128_testdata[5530] */\n    { 1843, 0x9E3779B185EBCA8DULL, { 0xF2083C66596207F2ULL, 0xF7A7B916EBF0ABFBULL } }, /* XSUM_XXH128_testdata[5531] */\n    { 1844, 0x0000000000000000ULL, { 0x2AD9AF1C60BF6D09ULL, 0x892003ABCEF85FAAULL } }, /* XSUM_XXH128_testdata[5532] */\n    { 1844, 0x000000009E3779B1ULL, { 0x10128997E2E8D457ULL, 0x337BD1A815046C24ULL } }, /* XSUM_XXH128_testdata[5533] */\n    { 1844, 0x9E3779B185EBCA8DULL, { 0xC652993AE2A03D4AULL, 0x568D88286B2E82AFULL } }, /* XSUM_XXH128_testdata[5534] */\n    { 1845, 0x0000000000000000ULL, { 0x5A8D3D6113045AE5ULL, 0x7B9B0CBC02FB6CFCULL } }, /* XSUM_XXH128_testdata[5535] */\n    { 1845, 0x000000009E3779B1ULL, { 0x404E237FE94C7B75ULL, 0xB90FA281601A3520ULL } }, /* XSUM_XXH128_testdata[5536] */\n    { 1845, 0x9E3779B185EBCA8DULL, { 0x1FD1717FD92B2C72ULL, 0x3104464DA3F0738AULL } }, /* XSUM_XXH128_testdata[5537] */\n    { 1846, 0x0000000000000000ULL, { 0xF067AA10F9E0D8B4ULL, 0xE6C099F67DE9C765ULL } }, /* XSUM_XXH128_testdata[5538] */\n    { 1846, 0x000000009E3779B1ULL, { 0x84FF77118FC50152ULL, 0x04864596E36C1E29ULL } }, /* XSUM_XXH128_testdata[5539] */\n    { 1846, 0x9E3779B185EBCA8DULL, { 0xFFDCFF68824087D2ULL, 0x909982A884CFFF79ULL } }, /* XSUM_XXH128_testdata[5540] */\n    { 1847, 0x0000000000000000ULL, { 0x772F594F5ABEF00BULL, 0xA87933FB6D797B5DULL } }, /* XSUM_XXH128_testdata[5541] */\n    { 1847, 0x000000009E3779B1ULL, { 0x5F88D695095A7524ULL, 0x482A3BA89D4A8A86ULL } }, /* XSUM_XXH128_testdata[5542] */\n    { 1847, 0x9E3779B185EBCA8DULL, { 0xA47B236BA4A955F9ULL, 0x1B9CEB462D2848AEULL } }, /* XSUM_XXH128_testdata[5543] */\n    { 1848, 0x0000000000000000ULL, { 0xA32FF4FEAC75EEE7ULL, 0x91602B3806DEE962ULL } }, /* XSUM_XXH128_testdata[5544] */\n    { 1848, 0x000000009E3779B1ULL, { 0xBA6C8B852BD5B808ULL, 0x7A12EE04BB601247ULL } }, /* XSUM_XXH128_testdata[5545] */\n    { 1848, 0x9E3779B185EBCA8DULL, { 0x8719FDF3277BADF9ULL, 0x371AE000F345F43EULL } }, /* XSUM_XXH128_testdata[5546] */\n    { 1849, 0x0000000000000000ULL, { 0x899A02F04A493E0CULL, 0xED069740501DB2F8ULL } }, /* XSUM_XXH128_testdata[5547] */\n    { 1849, 0x000000009E3779B1ULL, { 0x0DD96945D2DE8234ULL, 0x0D16CA32F40C3765ULL } }, /* XSUM_XXH128_testdata[5548] */\n    { 1849, 0x9E3779B185EBCA8DULL, { 0x34E15C9E62826DFDULL, 0x483868A9DDAF68DDULL } }, /* XSUM_XXH128_testdata[5549] */\n    { 1850, 0x0000000000000000ULL, { 0x5FCE4519F7BA538DULL, 0x7F34F8A6A30DABBCULL } }, /* XSUM_XXH128_testdata[5550] */\n    { 1850, 0x000000009E3779B1ULL, { 0xFA1F7F9FFD7CEBC9ULL, 0x324E3A23B73EBE38ULL } }, /* XSUM_XXH128_testdata[5551] */\n    { 1850, 0x9E3779B185EBCA8DULL, { 0x9AEEED50A300AE2BULL, 0xF4FCBF6ACF391D2BULL } }, /* XSUM_XXH128_testdata[5552] */\n    { 1851, 0x0000000000000000ULL, { 0x95E54665921E36CAULL, 0xDC5D88E50B2942CDULL } }, /* XSUM_XXH128_testdata[5553] */\n    { 1851, 0x000000009E3779B1ULL, { 0xE158AD228D202B08ULL, 0x9EA95E6D5077DC02ULL } }, /* XSUM_XXH128_testdata[5554] */\n    { 1851, 0x9E3779B185EBCA8DULL, { 0xC815E5A3764647F5ULL, 0xEAE8FA4E14508C2DULL } }, /* XSUM_XXH128_testdata[5555] */\n    { 1852, 0x0000000000000000ULL, { 0x43E506A9B7C094C0ULL, 0xCF999D84FF38376FULL } }, /* XSUM_XXH128_testdata[5556] */\n    { 1852, 0x000000009E3779B1ULL, { 0x6CEE547B954DDECDULL, 0xA193065ED59BA671ULL } }, /* XSUM_XXH128_testdata[5557] */\n    { 1852, 0x9E3779B185EBCA8DULL, { 0xFBF266164EABEF0AULL, 0x4FE2E0A99274CB57ULL } }, /* XSUM_XXH128_testdata[5558] */\n    { 1853, 0x0000000000000000ULL, { 0x2DB4211DD510E86EULL, 0x152BACDF9F0181B8ULL } }, /* XSUM_XXH128_testdata[5559] */\n    { 1853, 0x000000009E3779B1ULL, { 0xE32259B2B6E254EEULL, 0x4D282C859CE70756ULL } }, /* XSUM_XXH128_testdata[5560] */\n    { 1853, 0x9E3779B185EBCA8DULL, { 0x2CEEB5600B4BCC1CULL, 0x7D0C134E081AAD89ULL } }, /* XSUM_XXH128_testdata[5561] */\n    { 1854, 0x0000000000000000ULL, { 0xB2CA6E3EE5C50494ULL, 0xF78F92BA7EF5B21EULL } }, /* XSUM_XXH128_testdata[5562] */\n    { 1854, 0x000000009E3779B1ULL, { 0x06DFB5170EB1753FULL, 0xFDEDA6D8BC47A684ULL } }, /* XSUM_XXH128_testdata[5563] */\n    { 1854, 0x9E3779B185EBCA8DULL, { 0xF15C1AD85681921DULL, 0xD3E337478A569580ULL } }, /* XSUM_XXH128_testdata[5564] */\n    { 1855, 0x0000000000000000ULL, { 0x3DEB6C55F0891670ULL, 0xA17BF53235842078ULL } }, /* XSUM_XXH128_testdata[5565] */\n    { 1855, 0x000000009E3779B1ULL, { 0x7CE7B6D85BEB82A2ULL, 0x0E9537DAE415A54CULL } }, /* XSUM_XXH128_testdata[5566] */\n    { 1855, 0x9E3779B185EBCA8DULL, { 0xA105D4D854F1E3D9ULL, 0x3F063603ED8B8885ULL } }, /* XSUM_XXH128_testdata[5567] */\n    { 1856, 0x0000000000000000ULL, { 0x9FA7215524A44729ULL, 0xDD239B5F0AAF6BE2ULL } }, /* XSUM_XXH128_testdata[5568] */\n    { 1856, 0x000000009E3779B1ULL, { 0x378E6DFCA1C00BF6ULL, 0x56BE603ED11B9C8AULL } }, /* XSUM_XXH128_testdata[5569] */\n    { 1856, 0x9E3779B185EBCA8DULL, { 0xB3B482DD93C605DCULL, 0xE5599387DF057B57ULL } }, /* XSUM_XXH128_testdata[5570] */\n    { 1857, 0x0000000000000000ULL, { 0xF9AA0C2B77C7B098ULL, 0xC52721014352BBF5ULL } }, /* XSUM_XXH128_testdata[5571] */\n    { 1857, 0x000000009E3779B1ULL, { 0x4ADF66BF4D88C9D2ULL, 0x648942CEE41A5382ULL } }, /* XSUM_XXH128_testdata[5572] */\n    { 1857, 0x9E3779B185EBCA8DULL, { 0xA27D279C1F375EEBULL, 0xB742A964F197BDD7ULL } }, /* XSUM_XXH128_testdata[5573] */\n    { 1858, 0x0000000000000000ULL, { 0xDD47A0E487120F5DULL, 0xE12D967CB525EF95ULL } }, /* XSUM_XXH128_testdata[5574] */\n    { 1858, 0x000000009E3779B1ULL, { 0x2F90FFF757FE2331ULL, 0x691A919E5ED213C6ULL } }, /* XSUM_XXH128_testdata[5575] */\n    { 1858, 0x9E3779B185EBCA8DULL, { 0x1478152E6CF1E737ULL, 0x3E35989DFD19AF91ULL } }, /* XSUM_XXH128_testdata[5576] */\n    { 1859, 0x0000000000000000ULL, { 0x67CBC7046EBC929DULL, 0x6FED852A343DA322ULL } }, /* XSUM_XXH128_testdata[5577] */\n    { 1859, 0x000000009E3779B1ULL, { 0x4B5B0A5F32107AC3ULL, 0x6678CA6E4CE7E7EAULL } }, /* XSUM_XXH128_testdata[5578] */\n    { 1859, 0x9E3779B185EBCA8DULL, { 0x1C83F3A23E47D4B9ULL, 0x7C22FFFE5750CDBDULL } }, /* XSUM_XXH128_testdata[5579] */\n    { 1860, 0x0000000000000000ULL, { 0xA46136157CF8C9F9ULL, 0xA11FAE8CFCF20658ULL } }, /* XSUM_XXH128_testdata[5580] */\n    { 1860, 0x000000009E3779B1ULL, { 0x6F8682287804FA99ULL, 0x0C824FCCAC43F8EAULL } }, /* XSUM_XXH128_testdata[5581] */\n    { 1860, 0x9E3779B185EBCA8DULL, { 0xE48744287FB4D5C5ULL, 0xE41E5E563C8F701BULL } }, /* XSUM_XXH128_testdata[5582] */\n    { 1861, 0x0000000000000000ULL, { 0xC129EE2298A73F50ULL, 0x7AFC39B49A8A90F8ULL } }, /* XSUM_XXH128_testdata[5583] */\n    { 1861, 0x000000009E3779B1ULL, { 0x75567D4D139E1B40ULL, 0x9BE26B0EACB179EAULL } }, /* XSUM_XXH128_testdata[5584] */\n    { 1861, 0x9E3779B185EBCA8DULL, { 0xF262838AABBAD4DEULL, 0x10879FA2736C5060ULL } }, /* XSUM_XXH128_testdata[5585] */\n    { 1862, 0x0000000000000000ULL, { 0x189A180ED477ACCCULL, 0x40A06312491B7BDAULL } }, /* XSUM_XXH128_testdata[5586] */\n    { 1862, 0x000000009E3779B1ULL, { 0xE8B2153638E0173DULL, 0x025FED0E3CAF119EULL } }, /* XSUM_XXH128_testdata[5587] */\n    { 1862, 0x9E3779B185EBCA8DULL, { 0xEAB7668F179E94B7ULL, 0xBA60958F7092EAA5ULL } }, /* XSUM_XXH128_testdata[5588] */\n    { 1863, 0x0000000000000000ULL, { 0xB83E7242C9564BC7ULL, 0x883062932F3C4DDDULL } }, /* XSUM_XXH128_testdata[5589] */\n    { 1863, 0x000000009E3779B1ULL, { 0x3570DDB93ADDEA52ULL, 0xA513FA0F048E8B04ULL } }, /* XSUM_XXH128_testdata[5590] */\n    { 1863, 0x9E3779B185EBCA8DULL, { 0xFF76ED1FFA07DEDDULL, 0xCFAF4B8CCE3055D3ULL } }, /* XSUM_XXH128_testdata[5591] */\n    { 1864, 0x0000000000000000ULL, { 0x7E9B57A9205CA6D9ULL, 0x75256BC7953974E8ULL } }, /* XSUM_XXH128_testdata[5592] */\n    { 1864, 0x000000009E3779B1ULL, { 0x7DC8B60B8926BFB1ULL, 0x2100BCDA7B1F5F94ULL } }, /* XSUM_XXH128_testdata[5593] */\n    { 1864, 0x9E3779B185EBCA8DULL, { 0x4B386CAB0DFAAA63ULL, 0x79139746A28F7E21ULL } }, /* XSUM_XXH128_testdata[5594] */\n    { 1865, 0x0000000000000000ULL, { 0x4F20A2A31D556868ULL, 0xED651847ECEB0CB7ULL } }, /* XSUM_XXH128_testdata[5595] */\n    { 1865, 0x000000009E3779B1ULL, { 0x8741945EA60E3188ULL, 0x27B1A6B07610B205ULL } }, /* XSUM_XXH128_testdata[5596] */\n    { 1865, 0x9E3779B185EBCA8DULL, { 0x957575A3A566C448ULL, 0x5366812830D141B6ULL } }, /* XSUM_XXH128_testdata[5597] */\n    { 1866, 0x0000000000000000ULL, { 0xB80B9FDE4CC5E09EULL, 0x33ECD69D726267BDULL } }, /* XSUM_XXH128_testdata[5598] */\n    { 1866, 0x000000009E3779B1ULL, { 0xBE7FD1D4D231212CULL, 0xF6ECEB87536C15ACULL } }, /* XSUM_XXH128_testdata[5599] */\n    { 1866, 0x9E3779B185EBCA8DULL, { 0x1926A559E960EEEBULL, 0x61CDEF7DFCD9B20EULL } }, /* XSUM_XXH128_testdata[5600] */\n    { 1867, 0x0000000000000000ULL, { 0xABE4CFBD11F4C967ULL, 0xD01CF80EAB5D9EFFULL } }, /* XSUM_XXH128_testdata[5601] */\n    { 1867, 0x000000009E3779B1ULL, { 0x745E460BD6E7E217ULL, 0x1438D0B1823A8663ULL } }, /* XSUM_XXH128_testdata[5602] */\n    { 1867, 0x9E3779B185EBCA8DULL, { 0x694405A422DA369BULL, 0x31E9450638B76DEAULL } }, /* XSUM_XXH128_testdata[5603] */\n    { 1868, 0x0000000000000000ULL, { 0x752F23F575A73F89ULL, 0x05979F206A230633ULL } }, /* XSUM_XXH128_testdata[5604] */\n    { 1868, 0x000000009E3779B1ULL, { 0x91422CB9846F349FULL, 0xA0347CFC95F7F5F5ULL } }, /* XSUM_XXH128_testdata[5605] */\n    { 1868, 0x9E3779B185EBCA8DULL, { 0x60AD7DCD42AA4935ULL, 0x36278899067E3B32ULL } }, /* XSUM_XXH128_testdata[5606] */\n    { 1869, 0x0000000000000000ULL, { 0xFE8DC867E8A911E3ULL, 0xE5EBB01640A62CE7ULL } }, /* XSUM_XXH128_testdata[5607] */\n    { 1869, 0x000000009E3779B1ULL, { 0x7D137D6B59B2E205ULL, 0x23F1DCF0A6884A7DULL } }, /* XSUM_XXH128_testdata[5608] */\n    { 1869, 0x9E3779B185EBCA8DULL, { 0xEF407DFF2E16475FULL, 0x65B13BA7D9CAB745ULL } }, /* XSUM_XXH128_testdata[5609] */\n    { 1870, 0x0000000000000000ULL, { 0xF26A15D6413E94DFULL, 0x6C5D18213EBDBEB8ULL } }, /* XSUM_XXH128_testdata[5610] */\n    { 1870, 0x000000009E3779B1ULL, { 0x7848511F0C4FD908ULL, 0x3A3EC3E4B52C50D4ULL } }, /* XSUM_XXH128_testdata[5611] */\n    { 1870, 0x9E3779B185EBCA8DULL, { 0x98BB3A10DD853FA5ULL, 0x7504F0BF268D2348ULL } }, /* XSUM_XXH128_testdata[5612] */\n    { 1871, 0x0000000000000000ULL, { 0xA703FFFF8195BEA8ULL, 0xF42A5858C74E0CAFULL } }, /* XSUM_XXH128_testdata[5613] */\n    { 1871, 0x000000009E3779B1ULL, { 0x84EDE3F4FEAB8E6AULL, 0x540E1AA447C93877ULL } }, /* XSUM_XXH128_testdata[5614] */\n    { 1871, 0x9E3779B185EBCA8DULL, { 0x2EDFB2573E68AD84ULL, 0x49565A4F71F14E38ULL } }, /* XSUM_XXH128_testdata[5615] */\n    { 1872, 0x0000000000000000ULL, { 0x766D01020C397240ULL, 0xA1F7CF6DEDDC76A3ULL } }, /* XSUM_XXH128_testdata[5616] */\n    { 1872, 0x000000009E3779B1ULL, { 0xDE44148D1EB4D092ULL, 0x559ACFA1907CD32DULL } }, /* XSUM_XXH128_testdata[5617] */\n    { 1872, 0x9E3779B185EBCA8DULL, { 0x39B6B2DD5697BEE8ULL, 0x8AFCBDC3A7317990ULL } }, /* XSUM_XXH128_testdata[5618] */\n    { 1873, 0x0000000000000000ULL, { 0x1AC1619971B93634ULL, 0x141E2DD251EC7E20ULL } }, /* XSUM_XXH128_testdata[5619] */\n    { 1873, 0x000000009E3779B1ULL, { 0xA462A20B9630C6E7ULL, 0x02EF97113AB7DCF6ULL } }, /* XSUM_XXH128_testdata[5620] */\n    { 1873, 0x9E3779B185EBCA8DULL, { 0x4C0F85D7CBA25BC9ULL, 0xC1C6E5EADFDD0C4AULL } }, /* XSUM_XXH128_testdata[5621] */\n    { 1874, 0x0000000000000000ULL, { 0x722BFE7BA7F0B4A5ULL, 0x125448D6EA7F5DBEULL } }, /* XSUM_XXH128_testdata[5622] */\n    { 1874, 0x000000009E3779B1ULL, { 0x10BCFE3D73151641ULL, 0x98EA428137AD3340ULL } }, /* XSUM_XXH128_testdata[5623] */\n    { 1874, 0x9E3779B185EBCA8DULL, { 0x230BFCBD3C00DFD6ULL, 0x5AA9C44F1044E29FULL } }, /* XSUM_XXH128_testdata[5624] */\n    { 1875, 0x0000000000000000ULL, { 0xB5128F81C9D02F72ULL, 0x5015A9F39715C0F2ULL } }, /* XSUM_XXH128_testdata[5625] */\n    { 1875, 0x000000009E3779B1ULL, { 0x7E19513228FD912FULL, 0x285158B685ADBC88ULL } }, /* XSUM_XXH128_testdata[5626] */\n    { 1875, 0x9E3779B185EBCA8DULL, { 0xC5597711385BC7BBULL, 0x2B818146FC4213CEULL } }, /* XSUM_XXH128_testdata[5627] */\n    { 1876, 0x0000000000000000ULL, { 0xEAA9648EDD03C318ULL, 0x8A0E76E499BA0921ULL } }, /* XSUM_XXH128_testdata[5628] */\n    { 1876, 0x000000009E3779B1ULL, { 0xBEBDE95D159BA4E7ULL, 0xB51018795B94C1ACULL } }, /* XSUM_XXH128_testdata[5629] */\n    { 1876, 0x9E3779B185EBCA8DULL, { 0xC3A99B3C5489E336ULL, 0x70EF2BB96C500CD3ULL } }, /* XSUM_XXH128_testdata[5630] */\n    { 1877, 0x0000000000000000ULL, { 0xB0E510F8207273ADULL, 0x89AF76DE40A40A60ULL } }, /* XSUM_XXH128_testdata[5631] */\n    { 1877, 0x000000009E3779B1ULL, { 0x1F7C8FDCAEF95394ULL, 0xF9D8158E62918B79ULL } }, /* XSUM_XXH128_testdata[5632] */\n    { 1877, 0x9E3779B185EBCA8DULL, { 0xD030F0F96F813BEBULL, 0x9945BBBC5C57A2A6ULL } }, /* XSUM_XXH128_testdata[5633] */\n    { 1878, 0x0000000000000000ULL, { 0x5E5576D46AF9C904ULL, 0xB4FFEB1E4EC4EA59ULL } }, /* XSUM_XXH128_testdata[5634] */\n    { 1878, 0x000000009E3779B1ULL, { 0xFF0A1F8528200454ULL, 0x2831DE4A48F16CC2ULL } }, /* XSUM_XXH128_testdata[5635] */\n    { 1878, 0x9E3779B185EBCA8DULL, { 0x17583BBF412503FCULL, 0x3EB9AC416B9081ABULL } }, /* XSUM_XXH128_testdata[5636] */\n    { 1879, 0x0000000000000000ULL, { 0x5EB81FCAEA965C85ULL, 0x4C1B427578E84064ULL } }, /* XSUM_XXH128_testdata[5637] */\n    { 1879, 0x000000009E3779B1ULL, { 0x368611A046DEC4D9ULL, 0x4563D85DB6F57A89ULL } }, /* XSUM_XXH128_testdata[5638] */\n    { 1879, 0x9E3779B185EBCA8DULL, { 0xAA1BE1BD283937EAULL, 0x43425CAFA88883B0ULL } }, /* XSUM_XXH128_testdata[5639] */\n    { 1880, 0x0000000000000000ULL, { 0xAA63CE3CA93376D2ULL, 0xACC984E2101BB43DULL } }, /* XSUM_XXH128_testdata[5640] */\n    { 1880, 0x000000009E3779B1ULL, { 0xAD530178F367C66DULL, 0xBE747265084FC1F3ULL } }, /* XSUM_XXH128_testdata[5641] */\n    { 1880, 0x9E3779B185EBCA8DULL, { 0x354CBFC83B83AB2EULL, 0x6CD86B8E1189A168ULL } }, /* XSUM_XXH128_testdata[5642] */\n    { 1881, 0x0000000000000000ULL, { 0x3431D6AFE9D6D74CULL, 0xF36B1B268FD7F64CULL } }, /* XSUM_XXH128_testdata[5643] */\n    { 1881, 0x000000009E3779B1ULL, { 0xBCB70E87B7909945ULL, 0x176E7A1823011508ULL } }, /* XSUM_XXH128_testdata[5644] */\n    { 1881, 0x9E3779B185EBCA8DULL, { 0x70BF6609A6D4A4D9ULL, 0x39F15FF0C18ACAD8ULL } }, /* XSUM_XXH128_testdata[5645] */\n    { 1882, 0x0000000000000000ULL, { 0x27999F5F999B61EEULL, 0x33741411C2C2E997ULL } }, /* XSUM_XXH128_testdata[5646] */\n    { 1882, 0x000000009E3779B1ULL, { 0x6B4393A17F0E9087ULL, 0x5CA78CE6301D73FCULL } }, /* XSUM_XXH128_testdata[5647] */\n    { 1882, 0x9E3779B185EBCA8DULL, { 0xD366661DF9D4BBC5ULL, 0x68CD804E082B0ED2ULL } }, /* XSUM_XXH128_testdata[5648] */\n    { 1883, 0x0000000000000000ULL, { 0x04953291B73FE8A9ULL, 0x0D7D92FD9F1750DFULL } }, /* XSUM_XXH128_testdata[5649] */\n    { 1883, 0x000000009E3779B1ULL, { 0x11C6EE75BCB4DFADULL, 0x6554A33F3DCD0F62ULL } }, /* XSUM_XXH128_testdata[5650] */\n    { 1883, 0x9E3779B185EBCA8DULL, { 0x5C1C9106539ADEC1ULL, 0xE5644808FF6FB7F9ULL } }, /* XSUM_XXH128_testdata[5651] */\n    { 1884, 0x0000000000000000ULL, { 0xDA9A634B3F4FD842ULL, 0x23AC0E439B1115FFULL } }, /* XSUM_XXH128_testdata[5652] */\n    { 1884, 0x000000009E3779B1ULL, { 0xB316331EAC7C6366ULL, 0x5E4EB225BBD363D9ULL } }, /* XSUM_XXH128_testdata[5653] */\n    { 1884, 0x9E3779B185EBCA8DULL, { 0x785C24B03B223273ULL, 0x3CEF523B674A4F2DULL } }, /* XSUM_XXH128_testdata[5654] */\n    { 1885, 0x0000000000000000ULL, { 0x1E7707FB2259E2DFULL, 0xD494DB875E30F575ULL } }, /* XSUM_XXH128_testdata[5655] */\n    { 1885, 0x000000009E3779B1ULL, { 0x0653E35BD5D4C270ULL, 0xB7C0E9E4D9B4FBDBULL } }, /* XSUM_XXH128_testdata[5656] */\n    { 1885, 0x9E3779B185EBCA8DULL, { 0xA9E4A34986CBAA36ULL, 0x6641B54D5B933DF6ULL } }, /* XSUM_XXH128_testdata[5657] */\n    { 1886, 0x0000000000000000ULL, { 0x873AE950C9AE1884ULL, 0x66CA8A126FD6EB0AULL } }, /* XSUM_XXH128_testdata[5658] */\n    { 1886, 0x000000009E3779B1ULL, { 0xE22EC5065BA83095ULL, 0x826B25A36EB50128ULL } }, /* XSUM_XXH128_testdata[5659] */\n    { 1886, 0x9E3779B185EBCA8DULL, { 0x87813B855C1EABE6ULL, 0x6353F14C4EF49184ULL } }, /* XSUM_XXH128_testdata[5660] */\n    { 1887, 0x0000000000000000ULL, { 0x2AE6F56A9E3BAC52ULL, 0x5EF3E3FCD815E50FULL } }, /* XSUM_XXH128_testdata[5661] */\n    { 1887, 0x000000009E3779B1ULL, { 0x5D2DA82CC19B82F5ULL, 0x47438CD0DB56535DULL } }, /* XSUM_XXH128_testdata[5662] */\n    { 1887, 0x9E3779B185EBCA8DULL, { 0x58F979CE3AE3F648ULL, 0x32E643BC63E7FBD4ULL } }, /* XSUM_XXH128_testdata[5663] */\n    { 1888, 0x0000000000000000ULL, { 0x00D3E57E5091E324ULL, 0x18B818E689C0C34CULL } }, /* XSUM_XXH128_testdata[5664] */\n    { 1888, 0x000000009E3779B1ULL, { 0x6C9392D3E1D4563AULL, 0x18DCCB0C9F16816AULL } }, /* XSUM_XXH128_testdata[5665] */\n    { 1888, 0x9E3779B185EBCA8DULL, { 0xF5F12441DF3AFC4EULL, 0x7094A556199CF319ULL } }, /* XSUM_XXH128_testdata[5666] */\n    { 1889, 0x0000000000000000ULL, { 0x45E9E33D7423F328ULL, 0x1CCC834C56FD8540ULL } }, /* XSUM_XXH128_testdata[5667] */\n    { 1889, 0x000000009E3779B1ULL, { 0xE6A31D53F56E11B7ULL, 0xBDFC7DDBD68C829AULL } }, /* XSUM_XXH128_testdata[5668] */\n    { 1889, 0x9E3779B185EBCA8DULL, { 0x4D7D63CA388066DCULL, 0xECE1221FEE5EF826ULL } }, /* XSUM_XXH128_testdata[5669] */\n    { 1890, 0x0000000000000000ULL, { 0xCA83E06BECA16192ULL, 0x76C621A4B3914E45ULL } }, /* XSUM_XXH128_testdata[5670] */\n    { 1890, 0x000000009E3779B1ULL, { 0x91292DBD66CC89E3ULL, 0x2B12512C83F9C5ECULL } }, /* XSUM_XXH128_testdata[5671] */\n    { 1890, 0x9E3779B185EBCA8DULL, { 0x924E356BE74971A7ULL, 0x49E985F4B941F954ULL } }, /* XSUM_XXH128_testdata[5672] */\n    { 1891, 0x0000000000000000ULL, { 0x368A8B7FC030C715ULL, 0xE62B53807E475281ULL } }, /* XSUM_XXH128_testdata[5673] */\n    { 1891, 0x000000009E3779B1ULL, { 0x1DBEC38EEA67202CULL, 0x97BDDB44E781107DULL } }, /* XSUM_XXH128_testdata[5674] */\n    { 1891, 0x9E3779B185EBCA8DULL, { 0x2DE1521B82474633ULL, 0x00FCC52CDA427BEEULL } }, /* XSUM_XXH128_testdata[5675] */\n    { 1892, 0x0000000000000000ULL, { 0xE61A3B7031938F5DULL, 0x9499F81AD94AAEFDULL } }, /* XSUM_XXH128_testdata[5676] */\n    { 1892, 0x000000009E3779B1ULL, { 0xD7483C552C314A2BULL, 0x386C6B215A4D0379ULL } }, /* XSUM_XXH128_testdata[5677] */\n    { 1892, 0x9E3779B185EBCA8DULL, { 0x6EB843F22F82EF19ULL, 0xDEB7E57725788B00ULL } }, /* XSUM_XXH128_testdata[5678] */\n    { 1893, 0x0000000000000000ULL, { 0xD0C5FD191971A365ULL, 0x8F6CDFA9586C3DFBULL } }, /* XSUM_XXH128_testdata[5679] */\n    { 1893, 0x000000009E3779B1ULL, { 0xBB9C6F4642A56BBFULL, 0x9B8216215C1E2C03ULL } }, /* XSUM_XXH128_testdata[5680] */\n    { 1893, 0x9E3779B185EBCA8DULL, { 0x4CD6C97E1F0F7FD8ULL, 0x018182B9C27C5D93ULL } }, /* XSUM_XXH128_testdata[5681] */\n    { 1894, 0x0000000000000000ULL, { 0x09789EFF6ABA0913ULL, 0x82FE561C51064F1CULL } }, /* XSUM_XXH128_testdata[5682] */\n    { 1894, 0x000000009E3779B1ULL, { 0xC17741AD33FA3B41ULL, 0x4106EC539E95BB03ULL } }, /* XSUM_XXH128_testdata[5683] */\n    { 1894, 0x9E3779B185EBCA8DULL, { 0x81F68FB173855297ULL, 0x5D7AF8A83E924C66ULL } }, /* XSUM_XXH128_testdata[5684] */\n    { 1895, 0x0000000000000000ULL, { 0x5D2D99D528130792ULL, 0xC1E66EBFFA465F8CULL } }, /* XSUM_XXH128_testdata[5685] */\n    { 1895, 0x000000009E3779B1ULL, { 0x0E83E755FCBF97C5ULL, 0xD3CACB2DB63DDC33ULL } }, /* XSUM_XXH128_testdata[5686] */\n    { 1895, 0x9E3779B185EBCA8DULL, { 0xFC66260FD442A50DULL, 0x0ECA6CBB8B381DB8ULL } }, /* XSUM_XXH128_testdata[5687] */\n    { 1896, 0x0000000000000000ULL, { 0x0896D937983ED0FFULL, 0xA783D6E390DC6A09ULL } }, /* XSUM_XXH128_testdata[5688] */\n    { 1896, 0x000000009E3779B1ULL, { 0x506788E1119FCCE6ULL, 0x5976688593EEFFB1ULL } }, /* XSUM_XXH128_testdata[5689] */\n    { 1896, 0x9E3779B185EBCA8DULL, { 0xF8EE063306B3A591ULL, 0xAADCF94384C282D2ULL } }, /* XSUM_XXH128_testdata[5690] */\n    { 1897, 0x0000000000000000ULL, { 0x976FDED61A373B5FULL, 0x36FEF92B537E1DE6ULL } }, /* XSUM_XXH128_testdata[5691] */\n    { 1897, 0x000000009E3779B1ULL, { 0xEB30BED49BD38BB4ULL, 0x1D7767B0B52CC7D4ULL } }, /* XSUM_XXH128_testdata[5692] */\n    { 1897, 0x9E3779B185EBCA8DULL, { 0xC4D3803ECC16C1CFULL, 0xBA788EB750A05625ULL } }, /* XSUM_XXH128_testdata[5693] */\n    { 1898, 0x0000000000000000ULL, { 0xE434D792D95E6506ULL, 0xA107EB433BB68CCCULL } }, /* XSUM_XXH128_testdata[5694] */\n    { 1898, 0x000000009E3779B1ULL, { 0x08DB40E8AE317BD2ULL, 0x2B4E7EC31C8951A4ULL } }, /* XSUM_XXH128_testdata[5695] */\n    { 1898, 0x9E3779B185EBCA8DULL, { 0xA0A8262D8842A468ULL, 0x364494FF110BDC5CULL } }, /* XSUM_XXH128_testdata[5696] */\n    { 1899, 0x0000000000000000ULL, { 0x7F8A795DCCF902F9ULL, 0xA245EB7A73AD61A9ULL } }, /* XSUM_XXH128_testdata[5697] */\n    { 1899, 0x000000009E3779B1ULL, { 0x25F0F2FB81D9098AULL, 0x349E71A699618E38ULL } }, /* XSUM_XXH128_testdata[5698] */\n    { 1899, 0x9E3779B185EBCA8DULL, { 0x0FD59F584C5547BCULL, 0xCB79C4F27390A905ULL } }, /* XSUM_XXH128_testdata[5699] */\n    { 1900, 0x0000000000000000ULL, { 0x3360ED3DE59C7D92ULL, 0xFDACC7EE8C869F2EULL } }, /* XSUM_XXH128_testdata[5700] */\n    { 1900, 0x000000009E3779B1ULL, { 0xD230257D6B164C78ULL, 0xBCFBF677A6B4B9E0ULL } }, /* XSUM_XXH128_testdata[5701] */\n    { 1900, 0x9E3779B185EBCA8DULL, { 0x7AA5BC6D3D07DCC3ULL, 0xEE737536B249D868ULL } }, /* XSUM_XXH128_testdata[5702] */\n    { 1901, 0x0000000000000000ULL, { 0x919932A3369ADA54ULL, 0x2FFCDF1BD6157881ULL } }, /* XSUM_XXH128_testdata[5703] */\n    { 1901, 0x000000009E3779B1ULL, { 0x679639621BEA0EAFULL, 0x302F36AED0B13435ULL } }, /* XSUM_XXH128_testdata[5704] */\n    { 1901, 0x9E3779B185EBCA8DULL, { 0x0458A2B338491AC8ULL, 0xF176B0606D87542BULL } }, /* XSUM_XXH128_testdata[5705] */\n    { 1902, 0x0000000000000000ULL, { 0xB83B1B9968AEE18BULL, 0xD08F55ABF2B1E006ULL } }, /* XSUM_XXH128_testdata[5706] */\n    { 1902, 0x000000009E3779B1ULL, { 0x5CC3579872D21683ULL, 0x692E955CC86A79DEULL } }, /* XSUM_XXH128_testdata[5707] */\n    { 1902, 0x9E3779B185EBCA8DULL, { 0x84DB804F3D99B348ULL, 0x37E0B8C08EB9AAF5ULL } }, /* XSUM_XXH128_testdata[5708] */\n    { 1903, 0x0000000000000000ULL, { 0x0354BB280D4691CFULL, 0x1A29F080E45C28B7ULL } }, /* XSUM_XXH128_testdata[5709] */\n    { 1903, 0x000000009E3779B1ULL, { 0xD2DA2C3D4D0B2FB4ULL, 0x8D19FE18098FEAC7ULL } }, /* XSUM_XXH128_testdata[5710] */\n    { 1903, 0x9E3779B185EBCA8DULL, { 0x0FBA9E0F80E2FFCEULL, 0xAE592AD023A43725ULL } }, /* XSUM_XXH128_testdata[5711] */\n    { 1904, 0x0000000000000000ULL, { 0x9A4FAF3574E774C7ULL, 0x15212E8C0EE3ADA6ULL } }, /* XSUM_XXH128_testdata[5712] */\n    { 1904, 0x000000009E3779B1ULL, { 0x27D81F1B6D8EED7AULL, 0x308DCCE9D568665FULL } }, /* XSUM_XXH128_testdata[5713] */\n    { 1904, 0x9E3779B185EBCA8DULL, { 0x5BBADF72D1AF73DDULL, 0x3C11D5F28BB442D5ULL } }, /* XSUM_XXH128_testdata[5714] */\n    { 1905, 0x0000000000000000ULL, { 0xA0BE0F26F6859F41ULL, 0x76EC0091C00E322BULL } }, /* XSUM_XXH128_testdata[5715] */\n    { 1905, 0x000000009E3779B1ULL, { 0xF8299D04761EB11AULL, 0x72B82D00E1B9C079ULL } }, /* XSUM_XXH128_testdata[5716] */\n    { 1905, 0x9E3779B185EBCA8DULL, { 0xC3644C218B16EE74ULL, 0xA0B6550F290B6761ULL } }, /* XSUM_XXH128_testdata[5717] */\n    { 1906, 0x0000000000000000ULL, { 0x835FE0870E1F50ACULL, 0xF1ED6AC4BB3C04C5ULL } }, /* XSUM_XXH128_testdata[5718] */\n    { 1906, 0x000000009E3779B1ULL, { 0x215B7723C27FD686ULL, 0x655A4B368969AE50ULL } }, /* XSUM_XXH128_testdata[5719] */\n    { 1906, 0x9E3779B185EBCA8DULL, { 0x12668D958327E17EULL, 0x47A8A98070BAD7FDULL } }, /* XSUM_XXH128_testdata[5720] */\n    { 1907, 0x0000000000000000ULL, { 0x14C1BDF6BF0838E7ULL, 0x013AF406ECDD2709ULL } }, /* XSUM_XXH128_testdata[5721] */\n    { 1907, 0x000000009E3779B1ULL, { 0x29311674C336912EULL, 0x3344243AE4138D97ULL } }, /* XSUM_XXH128_testdata[5722] */\n    { 1907, 0x9E3779B185EBCA8DULL, { 0x9808FA64F8C43DCCULL, 0x05B89D7E3ACB2517ULL } }, /* XSUM_XXH128_testdata[5723] */\n    { 1908, 0x0000000000000000ULL, { 0x2777D49152560322ULL, 0x59F62335CCFDE938ULL } }, /* XSUM_XXH128_testdata[5724] */\n    { 1908, 0x000000009E3779B1ULL, { 0xCCB63C20B1BCD332ULL, 0xE2357298B6CAF96BULL } }, /* XSUM_XXH128_testdata[5725] */\n    { 1908, 0x9E3779B185EBCA8DULL, { 0xF9D863CC2EAA8645ULL, 0x2BFCFB8942A33BD1ULL } }, /* XSUM_XXH128_testdata[5726] */\n    { 1909, 0x0000000000000000ULL, { 0xF3C16FACEAC5439BULL, 0xA86CC0955FB2AD3AULL } }, /* XSUM_XXH128_testdata[5727] */\n    { 1909, 0x000000009E3779B1ULL, { 0xD3B2647CF2344A38ULL, 0xC1B250FEDBD4D383ULL } }, /* XSUM_XXH128_testdata[5728] */\n    { 1909, 0x9E3779B185EBCA8DULL, { 0x97A1E6A6762D1DDBULL, 0x47F11BBEDCB18030ULL } }, /* XSUM_XXH128_testdata[5729] */\n    { 1910, 0x0000000000000000ULL, { 0x0A392BBC27FDBF98ULL, 0x17BA9E3B81361BE7ULL } }, /* XSUM_XXH128_testdata[5730] */\n    { 1910, 0x000000009E3779B1ULL, { 0xB2E724430A65D860ULL, 0x5A3B2C2E86AA9240ULL } }, /* XSUM_XXH128_testdata[5731] */\n    { 1910, 0x9E3779B185EBCA8DULL, { 0x37C04E987336EDA6ULL, 0x2B05A004850C4AE6ULL } }, /* XSUM_XXH128_testdata[5732] */\n    { 1911, 0x0000000000000000ULL, { 0x3F6D662DCBC36DA0ULL, 0x062EFC08285C70FAULL } }, /* XSUM_XXH128_testdata[5733] */\n    { 1911, 0x000000009E3779B1ULL, { 0xBD0EF2BF8A5EAC82ULL, 0x3A7F9B11DC6680E5ULL } }, /* XSUM_XXH128_testdata[5734] */\n    { 1911, 0x9E3779B185EBCA8DULL, { 0x7099B12412BF2F7BULL, 0xBB1B8C3319D0CCC2ULL } }, /* XSUM_XXH128_testdata[5735] */\n    { 1912, 0x0000000000000000ULL, { 0xB3DD8A6812F31E0CULL, 0xD454672BC4DD7263ULL } }, /* XSUM_XXH128_testdata[5736] */\n    { 1912, 0x000000009E3779B1ULL, { 0x45530A276B23FC4DULL, 0x103FEE1ABD0B8D45ULL } }, /* XSUM_XXH128_testdata[5737] */\n    { 1912, 0x9E3779B185EBCA8DULL, { 0x2D13EB5B4D9B4FC8ULL, 0x84F7531D099215CBULL } }, /* XSUM_XXH128_testdata[5738] */\n    { 1913, 0x0000000000000000ULL, { 0x37306315E558B82BULL, 0x0FCE5582584B6FEEULL } }, /* XSUM_XXH128_testdata[5739] */\n    { 1913, 0x000000009E3779B1ULL, { 0xF71BAB13F619DD16ULL, 0xD8EDCC3D6E9CB674ULL } }, /* XSUM_XXH128_testdata[5740] */\n    { 1913, 0x9E3779B185EBCA8DULL, { 0x238A8982B9E8E871ULL, 0x4B33968989E72137ULL } }, /* XSUM_XXH128_testdata[5741] */\n    { 1914, 0x0000000000000000ULL, { 0xAF3B2494587FDF48ULL, 0x91FD5A11F09D3D55ULL } }, /* XSUM_XXH128_testdata[5742] */\n    { 1914, 0x000000009E3779B1ULL, { 0x9F8BC3430729B026ULL, 0xCB048FA96234FB05ULL } }, /* XSUM_XXH128_testdata[5743] */\n    { 1914, 0x9E3779B185EBCA8DULL, { 0x305D0629AD8F4388ULL, 0x62439D7FB37D3719ULL } }, /* XSUM_XXH128_testdata[5744] */\n    { 1915, 0x0000000000000000ULL, { 0x865B3906323DA850ULL, 0x5FBAF3284C514CC5ULL } }, /* XSUM_XXH128_testdata[5745] */\n    { 1915, 0x000000009E3779B1ULL, { 0xED4B137A8900D99BULL, 0x825A2DD2E7A4A69BULL } }, /* XSUM_XXH128_testdata[5746] */\n    { 1915, 0x9E3779B185EBCA8DULL, { 0x4162EEA8EDBA1E21ULL, 0x8A460E9AEAD797D6ULL } }, /* XSUM_XXH128_testdata[5747] */\n    { 1916, 0x0000000000000000ULL, { 0xBB0EB0C7C8E0D486ULL, 0xEB1F2586047F66D7ULL } }, /* XSUM_XXH128_testdata[5748] */\n    { 1916, 0x000000009E3779B1ULL, { 0x0A9C81E7C0A22031ULL, 0x2E76EE0A9BE5B043ULL } }, /* XSUM_XXH128_testdata[5749] */\n    { 1916, 0x9E3779B185EBCA8DULL, { 0x350BA3C51E6C98A9ULL, 0x626E408688220A13ULL } }, /* XSUM_XXH128_testdata[5750] */\n    { 1917, 0x0000000000000000ULL, { 0x2FFE17BAF474B808ULL, 0xEA196774FDE9D21EULL } }, /* XSUM_XXH128_testdata[5751] */\n    { 1917, 0x000000009E3779B1ULL, { 0x73693EFC8FB501DFULL, 0xC9BDD35CDBEC7F0DULL } }, /* XSUM_XXH128_testdata[5752] */\n    { 1917, 0x9E3779B185EBCA8DULL, { 0x1032DFBCE2ECE9CEULL, 0xAC28CCD1CC51BF45ULL } }, /* XSUM_XXH128_testdata[5753] */\n    { 1918, 0x0000000000000000ULL, { 0x2DDC81ACBC637995ULL, 0x2DC632CC3AF2DED2ULL } }, /* XSUM_XXH128_testdata[5754] */\n    { 1918, 0x000000009E3779B1ULL, { 0x43A56939BEABC636ULL, 0xDEDEF930DB42B057ULL } }, /* XSUM_XXH128_testdata[5755] */\n    { 1918, 0x9E3779B185EBCA8DULL, { 0xAF01E545CFF1AA6EULL, 0x8DD2D31326AAADA4ULL } }, /* XSUM_XXH128_testdata[5756] */\n    { 1919, 0x0000000000000000ULL, { 0x9D7578BBBE43A0FBULL, 0xD4C9B42293A91393ULL } }, /* XSUM_XXH128_testdata[5757] */\n    { 1919, 0x000000009E3779B1ULL, { 0x069B2F5B68CEC449ULL, 0x063C4055A509C0CEULL } }, /* XSUM_XXH128_testdata[5758] */\n    { 1919, 0x9E3779B185EBCA8DULL, { 0xCF9BB65DBDC2A633ULL, 0xA86BC5265A687228ULL } }, /* XSUM_XXH128_testdata[5759] */\n    { 1920, 0x0000000000000000ULL, { 0xA6E801F9E975D684ULL, 0x2D0A2834B63460E8ULL } }, /* XSUM_XXH128_testdata[5760] */\n    { 1920, 0x000000009E3779B1ULL, { 0x11DBA2CA7080B444ULL, 0xBE5886B6DA05BDC7ULL } }, /* XSUM_XXH128_testdata[5761] */\n    { 1920, 0x9E3779B185EBCA8DULL, { 0x8BBEE5F1AA06521EULL, 0x89D8163A3E27B5E0ULL } }, /* XSUM_XXH128_testdata[5762] */\n    { 1921, 0x0000000000000000ULL, { 0x425BD2F47593A7DDULL, 0xC76260B3A06F78DBULL } }, /* XSUM_XXH128_testdata[5763] */\n    { 1921, 0x000000009E3779B1ULL, { 0x661FD881C93160D9ULL, 0x4F9733AB2F2E2A0DULL } }, /* XSUM_XXH128_testdata[5764] */\n    { 1921, 0x9E3779B185EBCA8DULL, { 0x00D38A9FCCE4BDD8ULL, 0x5170D0E21C1FA1A4ULL } }, /* XSUM_XXH128_testdata[5765] */\n    { 1922, 0x0000000000000000ULL, { 0x7C712A084EA39B08ULL, 0x25C6C936716DD759ULL } }, /* XSUM_XXH128_testdata[5766] */\n    { 1922, 0x000000009E3779B1ULL, { 0xD2219DF83E7C6C4DULL, 0xA4CDB00FFEDD15C9ULL } }, /* XSUM_XXH128_testdata[5767] */\n    { 1922, 0x9E3779B185EBCA8DULL, { 0x9396761C649047ACULL, 0x4E31E6E6F78D0277ULL } }, /* XSUM_XXH128_testdata[5768] */\n    { 1923, 0x0000000000000000ULL, { 0x7FADD2CCED07887AULL, 0x55419646A155D6D4ULL } }, /* XSUM_XXH128_testdata[5769] */\n    { 1923, 0x000000009E3779B1ULL, { 0xFA2037242C152E5CULL, 0x4F059880BFE93E40ULL } }, /* XSUM_XXH128_testdata[5770] */\n    { 1923, 0x9E3779B185EBCA8DULL, { 0xA3C5D6FD9F5A6039ULL, 0xAB96DCA8DFA64027ULL } }, /* XSUM_XXH128_testdata[5771] */\n    { 1924, 0x0000000000000000ULL, { 0x4D43B69CEF7F96E4ULL, 0x9E961D9360D50D4AULL } }, /* XSUM_XXH128_testdata[5772] */\n    { 1924, 0x000000009E3779B1ULL, { 0x378D4A15A62E17E5ULL, 0x2BB2BA46C6480CF3ULL } }, /* XSUM_XXH128_testdata[5773] */\n    { 1924, 0x9E3779B185EBCA8DULL, { 0xC17248AE907D7638ULL, 0xA7299B1894D1BFE0ULL } }, /* XSUM_XXH128_testdata[5774] */\n    { 1925, 0x0000000000000000ULL, { 0x9CF28859FABC409CULL, 0x7C3D36D0F01F0874ULL } }, /* XSUM_XXH128_testdata[5775] */\n    { 1925, 0x000000009E3779B1ULL, { 0xF8EB9AB89E787EE1ULL, 0xCFFEB29CECDE3B45ULL } }, /* XSUM_XXH128_testdata[5776] */\n    { 1925, 0x9E3779B185EBCA8DULL, { 0x29BAE4393EC02830ULL, 0x481A3F7819C9386EULL } }, /* XSUM_XXH128_testdata[5777] */\n    { 1926, 0x0000000000000000ULL, { 0x87AE82A722CC651EULL, 0xA20EADD955049E11ULL } }, /* XSUM_XXH128_testdata[5778] */\n    { 1926, 0x000000009E3779B1ULL, { 0x9F8E8793D642A35DULL, 0x9449374CDB1B9130ULL } }, /* XSUM_XXH128_testdata[5779] */\n    { 1926, 0x9E3779B185EBCA8DULL, { 0x2D446AC4C7B2183CULL, 0xF23DEF2D79A8F5FDULL } }, /* XSUM_XXH128_testdata[5780] */\n    { 1927, 0x0000000000000000ULL, { 0x22864029998C8DCCULL, 0x04DACD962FA4FA5CULL } }, /* XSUM_XXH128_testdata[5781] */\n    { 1927, 0x000000009E3779B1ULL, { 0xF8EDF40733CD69BFULL, 0x5429682753403A1AULL } }, /* XSUM_XXH128_testdata[5782] */\n    { 1927, 0x9E3779B185EBCA8DULL, { 0xF6E995A376FDE0BFULL, 0xEE0D895DF50BED4FULL } }, /* XSUM_XXH128_testdata[5783] */\n    { 1928, 0x0000000000000000ULL, { 0x1297094001BEAB91ULL, 0xDC7B9102E4F75829ULL } }, /* XSUM_XXH128_testdata[5784] */\n    { 1928, 0x000000009E3779B1ULL, { 0xA1C64A33E7A7919CULL, 0xE7D3CBBD29352B85ULL } }, /* XSUM_XXH128_testdata[5785] */\n    { 1928, 0x9E3779B185EBCA8DULL, { 0x995E4F3E2717100EULL, 0x90F602DA693FEF45ULL } }, /* XSUM_XXH128_testdata[5786] */\n    { 1929, 0x0000000000000000ULL, { 0x11A056A3E27BF8DBULL, 0xF570A860211F13A0ULL } }, /* XSUM_XXH128_testdata[5787] */\n    { 1929, 0x000000009E3779B1ULL, { 0xC446ADB5B2188647ULL, 0x6E9D5FDA7C052852ULL } }, /* XSUM_XXH128_testdata[5788] */\n    { 1929, 0x9E3779B185EBCA8DULL, { 0xCDDE483316829F76ULL, 0xCA4BB7F18CFBFF4EULL } }, /* XSUM_XXH128_testdata[5789] */\n    { 1930, 0x0000000000000000ULL, { 0x504734057003512DULL, 0xD6F85B025BC2804AULL } }, /* XSUM_XXH128_testdata[5790] */\n    { 1930, 0x000000009E3779B1ULL, { 0x8FEB0C1BB250A42CULL, 0x107FE881E834BD53ULL } }, /* XSUM_XXH128_testdata[5791] */\n    { 1930, 0x9E3779B185EBCA8DULL, { 0x490C42431DBE8CC8ULL, 0x3D6550C4531FDBABULL } }, /* XSUM_XXH128_testdata[5792] */\n    { 1931, 0x0000000000000000ULL, { 0x1CB5E6EFAC6E4E63ULL, 0x8FB440B250BDB2D8ULL } }, /* XSUM_XXH128_testdata[5793] */\n    { 1931, 0x000000009E3779B1ULL, { 0x3033D0E25D73141FULL, 0x843A21CAA501B6A9ULL } }, /* XSUM_XXH128_testdata[5794] */\n    { 1931, 0x9E3779B185EBCA8DULL, { 0xC2F750FABD205E94ULL, 0xA930A8E0CFC7B24CULL } }, /* XSUM_XXH128_testdata[5795] */\n    { 1932, 0x0000000000000000ULL, { 0x6B7812A64BD91368ULL, 0xA5959E82FBCC438BULL } }, /* XSUM_XXH128_testdata[5796] */\n    { 1932, 0x000000009E3779B1ULL, { 0x45CBFEC6AF752A77ULL, 0x9E93B88A6252A06BULL } }, /* XSUM_XXH128_testdata[5797] */\n    { 1932, 0x9E3779B185EBCA8DULL, { 0xC25F2743431082ECULL, 0x9870DBBD592556F9ULL } }, /* XSUM_XXH128_testdata[5798] */\n    { 1933, 0x0000000000000000ULL, { 0xE1283D2931CD27EFULL, 0x99061FD6AD7E7915ULL } }, /* XSUM_XXH128_testdata[5799] */\n    { 1933, 0x000000009E3779B1ULL, { 0x2A78FE4AE539AFA5ULL, 0x35A0BDD60FFEE463ULL } }, /* XSUM_XXH128_testdata[5800] */\n    { 1933, 0x9E3779B185EBCA8DULL, { 0x31F20A19301F485EULL, 0x7140573BF1C600B0ULL } }, /* XSUM_XXH128_testdata[5801] */\n    { 1934, 0x0000000000000000ULL, { 0x640B44E7233CD7B5ULL, 0x1725F3D472B8BC89ULL } }, /* XSUM_XXH128_testdata[5802] */\n    { 1934, 0x000000009E3779B1ULL, { 0xF8979387E3B9308EULL, 0x4ADA65A767EC9ECCULL } }, /* XSUM_XXH128_testdata[5803] */\n    { 1934, 0x9E3779B185EBCA8DULL, { 0x42C3703CE5E02828ULL, 0x6EDF53BBA4960713ULL } }, /* XSUM_XXH128_testdata[5804] */\n    { 1935, 0x0000000000000000ULL, { 0x7DCDD089C207F052ULL, 0x54B010B98CDB4A55ULL } }, /* XSUM_XXH128_testdata[5805] */\n    { 1935, 0x000000009E3779B1ULL, { 0x0D4E763AA8AD4BB1ULL, 0x0853F7D4A3AD4892ULL } }, /* XSUM_XXH128_testdata[5806] */\n    { 1935, 0x9E3779B185EBCA8DULL, { 0x97EB7CB9F13AE976ULL, 0x2A51360BD8DF15CAULL } }, /* XSUM_XXH128_testdata[5807] */\n    { 1936, 0x0000000000000000ULL, { 0xF3D245265FAA9991ULL, 0x24CBA52F14A33AA2ULL } }, /* XSUM_XXH128_testdata[5808] */\n    { 1936, 0x000000009E3779B1ULL, { 0x2F638BE2A221FF1BULL, 0x087A888F4C5A9D6BULL } }, /* XSUM_XXH128_testdata[5809] */\n    { 1936, 0x9E3779B185EBCA8DULL, { 0x55FEE708A75B7E34ULL, 0x527DA7F57CB86BD7ULL } }, /* XSUM_XXH128_testdata[5810] */\n    { 1937, 0x0000000000000000ULL, { 0xC239370CC5CE1B28ULL, 0xC5E6E7C79FCB2A14ULL } }, /* XSUM_XXH128_testdata[5811] */\n    { 1937, 0x000000009E3779B1ULL, { 0xF3067F8125E3A687ULL, 0x260B2BC4597AF03DULL } }, /* XSUM_XXH128_testdata[5812] */\n    { 1937, 0x9E3779B185EBCA8DULL, { 0x73499D53BC365C32ULL, 0x1D6563EAE1F34031ULL } }, /* XSUM_XXH128_testdata[5813] */\n    { 1938, 0x0000000000000000ULL, { 0xE6FB9BEDD99FCF8DULL, 0x3283AEB219466903ULL } }, /* XSUM_XXH128_testdata[5814] */\n    { 1938, 0x000000009E3779B1ULL, { 0x727D6A3723064D82ULL, 0xC89A7C6B5A30858DULL } }, /* XSUM_XXH128_testdata[5815] */\n    { 1938, 0x9E3779B185EBCA8DULL, { 0xE9DDE1CF171E8CD8ULL, 0x61E05DF28D4C73B5ULL } }, /* XSUM_XXH128_testdata[5816] */\n    { 1939, 0x0000000000000000ULL, { 0x1E29637C57820A30ULL, 0x7637334B55431602ULL } }, /* XSUM_XXH128_testdata[5817] */\n    { 1939, 0x000000009E3779B1ULL, { 0x77E6482FB170964EULL, 0x15B6BF04765EFA32ULL } }, /* XSUM_XXH128_testdata[5818] */\n    { 1939, 0x9E3779B185EBCA8DULL, { 0x8F40C42CF2E44B6CULL, 0x4300C9FE1D5C762AULL } }, /* XSUM_XXH128_testdata[5819] */\n    { 1940, 0x0000000000000000ULL, { 0xABF025831D6ED30EULL, 0xD224E7AD82E93376ULL } }, /* XSUM_XXH128_testdata[5820] */\n    { 1940, 0x000000009E3779B1ULL, { 0x738A8B418CC2F7BEULL, 0x0F3F177F33514D26ULL } }, /* XSUM_XXH128_testdata[5821] */\n    { 1940, 0x9E3779B185EBCA8DULL, { 0xCEF6FA8C19F861E4ULL, 0xB4C1167D6A10D2DCULL } }, /* XSUM_XXH128_testdata[5822] */\n    { 1941, 0x0000000000000000ULL, { 0x282F14ADD9FEB282ULL, 0xD2255CCF148339DEULL } }, /* XSUM_XXH128_testdata[5823] */\n    { 1941, 0x000000009E3779B1ULL, { 0xCCEA72A1C426C628ULL, 0x783DF8936940A5ACULL } }, /* XSUM_XXH128_testdata[5824] */\n    { 1941, 0x9E3779B185EBCA8DULL, { 0x4017524529E35BD8ULL, 0xF88CA90687C8F012ULL } }, /* XSUM_XXH128_testdata[5825] */\n    { 1942, 0x0000000000000000ULL, { 0x527F417340C0F012ULL, 0xA46BA1F94A59E9CBULL } }, /* XSUM_XXH128_testdata[5826] */\n    { 1942, 0x000000009E3779B1ULL, { 0xD0A7F534512901B0ULL, 0x98CF9D475FAA2E29ULL } }, /* XSUM_XXH128_testdata[5827] */\n    { 1942, 0x9E3779B185EBCA8DULL, { 0xEB885704B63C9BBCULL, 0x59F75538AE54C8E7ULL } }, /* XSUM_XXH128_testdata[5828] */\n    { 1943, 0x0000000000000000ULL, { 0xB213031B62D44FF8ULL, 0x381F8E8F9311F41EULL } }, /* XSUM_XXH128_testdata[5829] */\n    { 1943, 0x000000009E3779B1ULL, { 0x6EE2885CED69E219ULL, 0x90359AEA6A6E2748ULL } }, /* XSUM_XXH128_testdata[5830] */\n    { 1943, 0x9E3779B185EBCA8DULL, { 0x47FB300EB53CF271ULL, 0x5E12B401F0AE8AD7ULL } }, /* XSUM_XXH128_testdata[5831] */\n    { 1944, 0x0000000000000000ULL, { 0x3DB7F3DAA5CF5975ULL, 0x7240A7643669514EULL } }, /* XSUM_XXH128_testdata[5832] */\n    { 1944, 0x000000009E3779B1ULL, { 0x004D2EDFC198263EULL, 0x6D0C5DDDAA6034BDULL } }, /* XSUM_XXH128_testdata[5833] */\n    { 1944, 0x9E3779B185EBCA8DULL, { 0x52E86537BAB05598ULL, 0x5687400E6BB5B90AULL } }, /* XSUM_XXH128_testdata[5834] */\n    { 1945, 0x0000000000000000ULL, { 0x840658A5716284C9ULL, 0x155E1E7411E12A76ULL } }, /* XSUM_XXH128_testdata[5835] */\n    { 1945, 0x000000009E3779B1ULL, { 0x617003603960C913ULL, 0xB8E5FCB55F821064ULL } }, /* XSUM_XXH128_testdata[5836] */\n    { 1945, 0x9E3779B185EBCA8DULL, { 0x3CDB39929E37AA06ULL, 0x971719DA16B26D86ULL } }, /* XSUM_XXH128_testdata[5837] */\n    { 1946, 0x0000000000000000ULL, { 0xEB5F75B38181CF28ULL, 0x830AAA16727B3F93ULL } }, /* XSUM_XXH128_testdata[5838] */\n    { 1946, 0x000000009E3779B1ULL, { 0x60E41E42508B7686ULL, 0xB860DFDF2B28BEBBULL } }, /* XSUM_XXH128_testdata[5839] */\n    { 1946, 0x9E3779B185EBCA8DULL, { 0x356AD1AC369381DFULL, 0xFBC4ADB0C9D6DE20ULL } }, /* XSUM_XXH128_testdata[5840] */\n    { 1947, 0x0000000000000000ULL, { 0x2CB27006CF774852ULL, 0xA5E1FDD4E0F07891ULL } }, /* XSUM_XXH128_testdata[5841] */\n    { 1947, 0x000000009E3779B1ULL, { 0x507450E785A19289ULL, 0xC2FD6841EB0DED12ULL } }, /* XSUM_XXH128_testdata[5842] */\n    { 1947, 0x9E3779B185EBCA8DULL, { 0x003C04ACA46EE27FULL, 0x0208DE238A678F33ULL } }, /* XSUM_XXH128_testdata[5843] */\n    { 1948, 0x0000000000000000ULL, { 0x03545653D2365723ULL, 0x44ED02305E7196BDULL } }, /* XSUM_XXH128_testdata[5844] */\n    { 1948, 0x000000009E3779B1ULL, { 0x73BF9ED272CB5A65ULL, 0x181BFE3204F2B254ULL } }, /* XSUM_XXH128_testdata[5845] */\n    { 1948, 0x9E3779B185EBCA8DULL, { 0xDC18F3AC5BC13200ULL, 0x26F4F9C51CDE3330ULL } }, /* XSUM_XXH128_testdata[5846] */\n    { 1949, 0x0000000000000000ULL, { 0x9CF72BF218CFEC9BULL, 0xDA216CA4F7968DF7ULL } }, /* XSUM_XXH128_testdata[5847] */\n    { 1949, 0x000000009E3779B1ULL, { 0xCB9315FAB3E49E8EULL, 0x34070E68D3994D27ULL } }, /* XSUM_XXH128_testdata[5848] */\n    { 1949, 0x9E3779B185EBCA8DULL, { 0x276C49361D2E49D7ULL, 0x5A90CE13618C96A0ULL } }, /* XSUM_XXH128_testdata[5849] */\n    { 1950, 0x0000000000000000ULL, { 0x3B41F6C3526966F9ULL, 0x7EDF8A4A2FC92770ULL } }, /* XSUM_XXH128_testdata[5850] */\n    { 1950, 0x000000009E3779B1ULL, { 0xADFFD59921071192ULL, 0xD6BCC86147A63019ULL } }, /* XSUM_XXH128_testdata[5851] */\n    { 1950, 0x9E3779B185EBCA8DULL, { 0xEE511A62306A4A89ULL, 0x55D16DE49B9B69B5ULL } }, /* XSUM_XXH128_testdata[5852] */\n    { 1951, 0x0000000000000000ULL, { 0xC4365505457F718CULL, 0x6CD474945FDCE4E8ULL } }, /* XSUM_XXH128_testdata[5853] */\n    { 1951, 0x000000009E3779B1ULL, { 0x247EDBAAA9D7F4E0ULL, 0x1EA992296411D2C8ULL } }, /* XSUM_XXH128_testdata[5854] */\n    { 1951, 0x9E3779B185EBCA8DULL, { 0x5EC0F8F1B23D7D85ULL, 0x62984D2A6F3D183CULL } }, /* XSUM_XXH128_testdata[5855] */\n    { 1952, 0x0000000000000000ULL, { 0x5DDB1030B7232D1FULL, 0xD928F39D90B438FEULL } }, /* XSUM_XXH128_testdata[5856] */\n    { 1952, 0x000000009E3779B1ULL, { 0x74DB2882E17A1D98ULL, 0xA647879150414B89ULL } }, /* XSUM_XXH128_testdata[5857] */\n    { 1952, 0x9E3779B185EBCA8DULL, { 0xA268820F12B866FAULL, 0x473E06B7E8F72974ULL } }, /* XSUM_XXH128_testdata[5858] */\n    { 1953, 0x0000000000000000ULL, { 0x7FF90349002641B7ULL, 0xFC80520E88973909ULL } }, /* XSUM_XXH128_testdata[5859] */\n    { 1953, 0x000000009E3779B1ULL, { 0x98A36542E12AA967ULL, 0x2E9649133F25FC2FULL } }, /* XSUM_XXH128_testdata[5860] */\n    { 1953, 0x9E3779B185EBCA8DULL, { 0xEF06F23A1D869CDDULL, 0x35446D49C773C1EFULL } }, /* XSUM_XXH128_testdata[5861] */\n    { 1954, 0x0000000000000000ULL, { 0xC1558AF0C93D89CDULL, 0xB3C8508F7D0B0A0EULL } }, /* XSUM_XXH128_testdata[5862] */\n    { 1954, 0x000000009E3779B1ULL, { 0xB188B755CD7297CDULL, 0x7428C5288C99C2CCULL } }, /* XSUM_XXH128_testdata[5863] */\n    { 1954, 0x9E3779B185EBCA8DULL, { 0xDE4FAB755C44BB20ULL, 0xA286AF5CAFB97374ULL } }, /* XSUM_XXH128_testdata[5864] */\n    { 1955, 0x0000000000000000ULL, { 0x3FDA69020153BEA9ULL, 0x9C24E200B8F3620EULL } }, /* XSUM_XXH128_testdata[5865] */\n    { 1955, 0x000000009E3779B1ULL, { 0x60467F8ED46ED7C6ULL, 0xB3196FBFB46C08F9ULL } }, /* XSUM_XXH128_testdata[5866] */\n    { 1955, 0x9E3779B185EBCA8DULL, { 0x27B6372C52BC90C3ULL, 0x3EC75DAB5D734C9AULL } }, /* XSUM_XXH128_testdata[5867] */\n    { 1956, 0x0000000000000000ULL, { 0x6E064C75A51650B1ULL, 0x6D76EB9CC185C3E5ULL } }, /* XSUM_XXH128_testdata[5868] */\n    { 1956, 0x000000009E3779B1ULL, { 0x090A809EE5BDB645ULL, 0xB3A6172CC8605EB0ULL } }, /* XSUM_XXH128_testdata[5869] */\n    { 1956, 0x9E3779B185EBCA8DULL, { 0xBEBB2584D460BD29ULL, 0x15CBB9BAC3093DA0ULL } }, /* XSUM_XXH128_testdata[5870] */\n    { 1957, 0x0000000000000000ULL, { 0xC366A7C357FFEF0BULL, 0x7033960422867051ULL } }, /* XSUM_XXH128_testdata[5871] */\n    { 1957, 0x000000009E3779B1ULL, { 0x6A5AFDAF242DFDD8ULL, 0xAD6EE97C90CB9AC4ULL } }, /* XSUM_XXH128_testdata[5872] */\n    { 1957, 0x9E3779B185EBCA8DULL, { 0xB57E9DC331ED3EF3ULL, 0x0953F73DB596FED8ULL } }, /* XSUM_XXH128_testdata[5873] */\n    { 1958, 0x0000000000000000ULL, { 0x8F06933F34934B99ULL, 0xF141A4B8F68D44DEULL } }, /* XSUM_XXH128_testdata[5874] */\n    { 1958, 0x000000009E3779B1ULL, { 0x714D020C3D4FAD3CULL, 0x3F535927B1FB2A48ULL } }, /* XSUM_XXH128_testdata[5875] */\n    { 1958, 0x9E3779B185EBCA8DULL, { 0x2E9B0E4BEA0FD06CULL, 0x8E9F1B731A6D8791ULL } }, /* XSUM_XXH128_testdata[5876] */\n    { 1959, 0x0000000000000000ULL, { 0xF12971CE1F74C048ULL, 0x38ADDF305B841450ULL } }, /* XSUM_XXH128_testdata[5877] */\n    { 1959, 0x000000009E3779B1ULL, { 0x899E65FC65CBF802ULL, 0x00D078FBE9758405ULL } }, /* XSUM_XXH128_testdata[5878] */\n    { 1959, 0x9E3779B185EBCA8DULL, { 0x0CC667CEB5F97FC8ULL, 0x5B0C7CB251F53E8DULL } }, /* XSUM_XXH128_testdata[5879] */\n    { 1960, 0x0000000000000000ULL, { 0x004A99DC027F4F6AULL, 0x919B9F1FC4C3C170ULL } }, /* XSUM_XXH128_testdata[5880] */\n    { 1960, 0x000000009E3779B1ULL, { 0x1301E3259088A368ULL, 0x101CA7D15CE8A9FEULL } }, /* XSUM_XXH128_testdata[5881] */\n    { 1960, 0x9E3779B185EBCA8DULL, { 0x77E9A7955331A07CULL, 0x4A6418E25423A51BULL } }, /* XSUM_XXH128_testdata[5882] */\n    { 1961, 0x0000000000000000ULL, { 0xFC9E3E034471B0B1ULL, 0x13C1356077DA9C82ULL } }, /* XSUM_XXH128_testdata[5883] */\n    { 1961, 0x000000009E3779B1ULL, { 0x359F7CF1E39AE1FAULL, 0x51570B3FEA2645C5ULL } }, /* XSUM_XXH128_testdata[5884] */\n    { 1961, 0x9E3779B185EBCA8DULL, { 0xEEB603E711A16ECFULL, 0xE476D82902D4AA7FULL } }, /* XSUM_XXH128_testdata[5885] */\n    { 1962, 0x0000000000000000ULL, { 0xE15EAEB8E35FA693ULL, 0x39EE913E9A7089AAULL } }, /* XSUM_XXH128_testdata[5886] */\n    { 1962, 0x000000009E3779B1ULL, { 0x0D8D6DBF516F70D3ULL, 0xFAB6E2EE63DFC71FULL } }, /* XSUM_XXH128_testdata[5887] */\n    { 1962, 0x9E3779B185EBCA8DULL, { 0x494F4A97DEB9DEC2ULL, 0xF982E24046F06A73ULL } }, /* XSUM_XXH128_testdata[5888] */\n    { 1963, 0x0000000000000000ULL, { 0x0520FEC1D624BD75ULL, 0x677F154C23CF2377ULL } }, /* XSUM_XXH128_testdata[5889] */\n    { 1963, 0x000000009E3779B1ULL, { 0x38ACA806A59AE1A3ULL, 0x65585002CAFF0988ULL } }, /* XSUM_XXH128_testdata[5890] */\n    { 1963, 0x9E3779B185EBCA8DULL, { 0xF4FE41CC1C78E92EULL, 0x09FA7666FD71B543ULL } }, /* XSUM_XXH128_testdata[5891] */\n    { 1964, 0x0000000000000000ULL, { 0x188EAA4B37E8886EULL, 0x00535289B52FDE4FULL } }, /* XSUM_XXH128_testdata[5892] */\n    { 1964, 0x000000009E3779B1ULL, { 0x7F3825E944C206FCULL, 0x12B2B35241228B5AULL } }, /* XSUM_XXH128_testdata[5893] */\n    { 1964, 0x9E3779B185EBCA8DULL, { 0xB25E366558EAAC28ULL, 0xC8EDF06443936BD6ULL } }, /* XSUM_XXH128_testdata[5894] */\n    { 1965, 0x0000000000000000ULL, { 0xEFF8375D71EA92D4ULL, 0x0C1B38B3A6B19298ULL } }, /* XSUM_XXH128_testdata[5895] */\n    { 1965, 0x000000009E3779B1ULL, { 0x8710B22A0375AF0BULL, 0x92FA66C59E006840ULL } }, /* XSUM_XXH128_testdata[5896] */\n    { 1965, 0x9E3779B185EBCA8DULL, { 0xE8F4D7DD66D4A35BULL, 0xF9CB2B1FCEDCB25CULL } }, /* XSUM_XXH128_testdata[5897] */\n    { 1966, 0x0000000000000000ULL, { 0x368D2A130B64710FULL, 0xDEBFBA9B807ECF90ULL } }, /* XSUM_XXH128_testdata[5898] */\n    { 1966, 0x000000009E3779B1ULL, { 0xDE039962AA722F60ULL, 0x30AD958D83F06E98ULL } }, /* XSUM_XXH128_testdata[5899] */\n    { 1966, 0x9E3779B185EBCA8DULL, { 0xBE0FA933D7FD6001ULL, 0x8B691E04F54A2D73ULL } }, /* XSUM_XXH128_testdata[5900] */\n    { 1967, 0x0000000000000000ULL, { 0xDE5E1FF7BF3E9F55ULL, 0x6124F2D2CC2B6892ULL } }, /* XSUM_XXH128_testdata[5901] */\n    { 1967, 0x000000009E3779B1ULL, { 0x3FEA716AC7A12AA2ULL, 0x40664BD06285B516ULL } }, /* XSUM_XXH128_testdata[5902] */\n    { 1967, 0x9E3779B185EBCA8DULL, { 0xD00C19EE6414778DULL, 0xF67D09B8E0825F12ULL } }, /* XSUM_XXH128_testdata[5903] */\n    { 1968, 0x0000000000000000ULL, { 0x27CD7EA8B820E3F8ULL, 0x4CE4C6F9E9CA4E54ULL } }, /* XSUM_XXH128_testdata[5904] */\n    { 1968, 0x000000009E3779B1ULL, { 0xE0339C2779084462ULL, 0x9CF14C4763C59654ULL } }, /* XSUM_XXH128_testdata[5905] */\n    { 1968, 0x9E3779B185EBCA8DULL, { 0x97EB78821BC00C9FULL, 0xCA3FB356ABBDA64FULL } }, /* XSUM_XXH128_testdata[5906] */\n    { 1969, 0x0000000000000000ULL, { 0x3819844D9D7EA49BULL, 0xCC75F9D5C7870730ULL } }, /* XSUM_XXH128_testdata[5907] */\n    { 1969, 0x000000009E3779B1ULL, { 0xD29A5DB03DEF8DC8ULL, 0x76FD74234F5E520DULL } }, /* XSUM_XXH128_testdata[5908] */\n    { 1969, 0x9E3779B185EBCA8DULL, { 0xE5F841A89A45610DULL, 0x26CF5BA93F2B0125ULL } }, /* XSUM_XXH128_testdata[5909] */\n    { 1970, 0x0000000000000000ULL, { 0x113F378BABB8D222ULL, 0xED363BC68BD69231ULL } }, /* XSUM_XXH128_testdata[5910] */\n    { 1970, 0x000000009E3779B1ULL, { 0x278F6709A524BBD0ULL, 0xD53C322A5F0DF270ULL } }, /* XSUM_XXH128_testdata[5911] */\n    { 1970, 0x9E3779B185EBCA8DULL, { 0xCF4641E5FF36CD1FULL, 0x8B85056C31144127ULL } }, /* XSUM_XXH128_testdata[5912] */\n    { 1971, 0x0000000000000000ULL, { 0x9E48DB0D4CEC7023ULL, 0xA0D7EED773C12848ULL } }, /* XSUM_XXH128_testdata[5913] */\n    { 1971, 0x000000009E3779B1ULL, { 0x6CB8F7122C66DAA5ULL, 0x64F045102A69E924ULL } }, /* XSUM_XXH128_testdata[5914] */\n    { 1971, 0x9E3779B185EBCA8DULL, { 0x27DCBB1B5C554B88ULL, 0x08EE1F1117AE934DULL } }, /* XSUM_XXH128_testdata[5915] */\n    { 1972, 0x0000000000000000ULL, { 0xDA2A9985D0E6AF05ULL, 0xED374FD52C625CA0ULL } }, /* XSUM_XXH128_testdata[5916] */\n    { 1972, 0x000000009E3779B1ULL, { 0x32324D73B0E4AF12ULL, 0x34370C2EA5359959ULL } }, /* XSUM_XXH128_testdata[5917] */\n    { 1972, 0x9E3779B185EBCA8DULL, { 0x725D63AB0031FBD9ULL, 0xBF834C3279D63722ULL } }, /* XSUM_XXH128_testdata[5918] */\n    { 1973, 0x0000000000000000ULL, { 0x2FD8A1FADBE01596ULL, 0x7E7C9EA49F11A6E2ULL } }, /* XSUM_XXH128_testdata[5919] */\n    { 1973, 0x000000009E3779B1ULL, { 0x98E282C259351E41ULL, 0xFEB7A29EE9C898D7ULL } }, /* XSUM_XXH128_testdata[5920] */\n    { 1973, 0x9E3779B185EBCA8DULL, { 0x6FA07F9987D2ECDCULL, 0xB40DFAC4686A42E9ULL } }, /* XSUM_XXH128_testdata[5921] */\n    { 1974, 0x0000000000000000ULL, { 0xD3A2F52B332A2A0BULL, 0xF2EE26AF07C09E46ULL } }, /* XSUM_XXH128_testdata[5922] */\n    { 1974, 0x000000009E3779B1ULL, { 0xD87C7BF7575FD600ULL, 0x437BF9035F1D9B08ULL } }, /* XSUM_XXH128_testdata[5923] */\n    { 1974, 0x9E3779B185EBCA8DULL, { 0x76C832BF7344FCDEULL, 0x1D44DD1CAB11DE09ULL } }, /* XSUM_XXH128_testdata[5924] */\n    { 1975, 0x0000000000000000ULL, { 0xDC36A1336C937579ULL, 0x16C2320B1102D755ULL } }, /* XSUM_XXH128_testdata[5925] */\n    { 1975, 0x000000009E3779B1ULL, { 0x8816C0A226BDE282ULL, 0xDB83F540E2F6F64DULL } }, /* XSUM_XXH128_testdata[5926] */\n    { 1975, 0x9E3779B185EBCA8DULL, { 0xD08CE0443333A2A7ULL, 0xB45D91F593DE7F03ULL } }, /* XSUM_XXH128_testdata[5927] */\n    { 1976, 0x0000000000000000ULL, { 0xAD661BDAC1B79FA4ULL, 0xFFA898F3B38943ACULL } }, /* XSUM_XXH128_testdata[5928] */\n    { 1976, 0x000000009E3779B1ULL, { 0xFA280DCB92010703ULL, 0xBA341FC46B916166ULL } }, /* XSUM_XXH128_testdata[5929] */\n    { 1976, 0x9E3779B185EBCA8DULL, { 0x5B5A77C1083D92F2ULL, 0xB74FCC61914D12F9ULL } }, /* XSUM_XXH128_testdata[5930] */\n    { 1977, 0x0000000000000000ULL, { 0x1AE078E65B90BDC7ULL, 0xEDFC0BD28535B82EULL } }, /* XSUM_XXH128_testdata[5931] */\n    { 1977, 0x000000009E3779B1ULL, { 0x0081506B8FD75E52ULL, 0x80189B7DD4BC546AULL } }, /* XSUM_XXH128_testdata[5932] */\n    { 1977, 0x9E3779B185EBCA8DULL, { 0x8973E397727E94E8ULL, 0x0E7D35DD7764141EULL } }, /* XSUM_XXH128_testdata[5933] */\n    { 1978, 0x0000000000000000ULL, { 0x2B0EF2DEBF6905C9ULL, 0x241237D7202B82BDULL } }, /* XSUM_XXH128_testdata[5934] */\n    { 1978, 0x000000009E3779B1ULL, { 0x3730525F246CFF8AULL, 0x2FC71A9258872068ULL } }, /* XSUM_XXH128_testdata[5935] */\n    { 1978, 0x9E3779B185EBCA8DULL, { 0xD6E2399A90B12AACULL, 0x8422FAB2E02F069EULL } }, /* XSUM_XXH128_testdata[5936] */\n    { 1979, 0x0000000000000000ULL, { 0x058D6790B1E8B641ULL, 0xDF66C4A6C80474D4ULL } }, /* XSUM_XXH128_testdata[5937] */\n    { 1979, 0x000000009E3779B1ULL, { 0xE0A9217E89EC01B4ULL, 0xF9F1BF7D6C019511ULL } }, /* XSUM_XXH128_testdata[5938] */\n    { 1979, 0x9E3779B185EBCA8DULL, { 0x281131D3DABF1AF3ULL, 0xDC7609377411BE82ULL } }, /* XSUM_XXH128_testdata[5939] */\n    { 1980, 0x0000000000000000ULL, { 0x562B194F83DA7A62ULL, 0x0E8834C5A3587F2BULL } }, /* XSUM_XXH128_testdata[5940] */\n    { 1980, 0x000000009E3779B1ULL, { 0x83B37A5676A91F8AULL, 0x19A17826C0277296ULL } }, /* XSUM_XXH128_testdata[5941] */\n    { 1980, 0x9E3779B185EBCA8DULL, { 0xDCBA1086B2BB7606ULL, 0x185B92D5C07A9EEEULL } }, /* XSUM_XXH128_testdata[5942] */\n    { 1981, 0x0000000000000000ULL, { 0x07C8B39420943D33ULL, 0x4EC0986D9D46EF97ULL } }, /* XSUM_XXH128_testdata[5943] */\n    { 1981, 0x000000009E3779B1ULL, { 0x16C99B9604CA49ABULL, 0xF537E1E6A0171615ULL } }, /* XSUM_XXH128_testdata[5944] */\n    { 1981, 0x9E3779B185EBCA8DULL, { 0x05694B9506E958BDULL, 0x4B9982F5A32155A7ULL } }, /* XSUM_XXH128_testdata[5945] */\n    { 1982, 0x0000000000000000ULL, { 0xC18F07D9E25725B9ULL, 0x672FAFB8D607EA65ULL } }, /* XSUM_XXH128_testdata[5946] */\n    { 1982, 0x000000009E3779B1ULL, { 0xDA757DC3D4018829ULL, 0xAE6C4E0916507BD7ULL } }, /* XSUM_XXH128_testdata[5947] */\n    { 1982, 0x9E3779B185EBCA8DULL, { 0xEB5734AF6F449CF3ULL, 0xFD2D929B82473125ULL } }, /* XSUM_XXH128_testdata[5948] */\n    { 1983, 0x0000000000000000ULL, { 0x5F9FA6455DED3D7DULL, 0x7FC4112CEED3F5C6ULL } }, /* XSUM_XXH128_testdata[5949] */\n    { 1983, 0x000000009E3779B1ULL, { 0x452EEE65F4DDE659ULL, 0xDCA7F2725024BA37ULL } }, /* XSUM_XXH128_testdata[5950] */\n    { 1983, 0x9E3779B185EBCA8DULL, { 0x3311F0370651A269ULL, 0x5512EFEACBA0C4D9ULL } }, /* XSUM_XXH128_testdata[5951] */\n    { 1984, 0x0000000000000000ULL, { 0x67F7098725D64EFBULL, 0x13FEC930F03D1097ULL } }, /* XSUM_XXH128_testdata[5952] */\n    { 1984, 0x000000009E3779B1ULL, { 0xB419FC5675166C42ULL, 0x6958CA508F2158EFULL } }, /* XSUM_XXH128_testdata[5953] */\n    { 1984, 0x9E3779B185EBCA8DULL, { 0x9EA022F9495C6EAEULL, 0x8D58BF770EB26629ULL } }, /* XSUM_XXH128_testdata[5954] */\n    { 1985, 0x0000000000000000ULL, { 0xD7E199EAF2C77E2FULL, 0x68EC478CC749FD2CULL } }, /* XSUM_XXH128_testdata[5955] */\n    { 1985, 0x000000009E3779B1ULL, { 0x4DF4F23F7DDEF3D9ULL, 0xCCA7C2E1FD1E9271ULL } }, /* XSUM_XXH128_testdata[5956] */\n    { 1985, 0x9E3779B185EBCA8DULL, { 0x8177A5B7825B3C18ULL, 0xFCA79F2F5B2A2E2BULL } }, /* XSUM_XXH128_testdata[5957] */\n    { 1986, 0x0000000000000000ULL, { 0x1D8ED4C85F51E2B3ULL, 0x4F3748D6627B03C3ULL } }, /* XSUM_XXH128_testdata[5958] */\n    { 1986, 0x000000009E3779B1ULL, { 0xD2CF7C92A44E5AF2ULL, 0x9E241CF4B0EB3F9EULL } }, /* XSUM_XXH128_testdata[5959] */\n    { 1986, 0x9E3779B185EBCA8DULL, { 0x6AA78118C3472702ULL, 0x3D31CCFA9225DDF7ULL } }, /* XSUM_XXH128_testdata[5960] */\n    { 1987, 0x0000000000000000ULL, { 0xEAF6F48977C9F687ULL, 0xE6A23664AFA0CFC6ULL } }, /* XSUM_XXH128_testdata[5961] */\n    { 1987, 0x000000009E3779B1ULL, { 0xD9D70C289A240916ULL, 0x9F09185246F023CFULL } }, /* XSUM_XXH128_testdata[5962] */\n    { 1987, 0x9E3779B185EBCA8DULL, { 0x42FDED3727B7302EULL, 0x3119EBA09B802C8FULL } }, /* XSUM_XXH128_testdata[5963] */\n    { 1988, 0x0000000000000000ULL, { 0x767F809C56CFAB14ULL, 0xE38CA82B97382D44ULL } }, /* XSUM_XXH128_testdata[5964] */\n    { 1988, 0x000000009E3779B1ULL, { 0x2481CEA376C2DB15ULL, 0x49D588C1A8839169ULL } }, /* XSUM_XXH128_testdata[5965] */\n    { 1988, 0x9E3779B185EBCA8DULL, { 0xBDE437D976206DBCULL, 0xDA3F6FB0CA6CFEEEULL } }, /* XSUM_XXH128_testdata[5966] */\n    { 1989, 0x0000000000000000ULL, { 0x888CEFE06213FCA3ULL, 0x5C057BA6FEC3A0DAULL } }, /* XSUM_XXH128_testdata[5967] */\n    { 1989, 0x000000009E3779B1ULL, { 0xDB0276550883AF8DULL, 0x1E18C0D5D09F9A99ULL } }, /* XSUM_XXH128_testdata[5968] */\n    { 1989, 0x9E3779B185EBCA8DULL, { 0x41A2B968B085D690ULL, 0x9447CFFCC792D61CULL } }, /* XSUM_XXH128_testdata[5969] */\n    { 1990, 0x0000000000000000ULL, { 0xB169E18197F5DC9EULL, 0x4E9A4B72F81AD1D5ULL } }, /* XSUM_XXH128_testdata[5970] */\n    { 1990, 0x000000009E3779B1ULL, { 0x4C14C66D51E6CD5BULL, 0x4D70DB1ACA9D45DEULL } }, /* XSUM_XXH128_testdata[5971] */\n    { 1990, 0x9E3779B185EBCA8DULL, { 0xEB63FBD3AE339EA3ULL, 0x8D228BBF8BD3325BULL } }, /* XSUM_XXH128_testdata[5972] */\n    { 1991, 0x0000000000000000ULL, { 0xFAD4E62400E73579ULL, 0x0A87FD11B902529FULL } }, /* XSUM_XXH128_testdata[5973] */\n    { 1991, 0x000000009E3779B1ULL, { 0x0AE2734039E9FD4FULL, 0xDB0C49F7B2BACCE1ULL } }, /* XSUM_XXH128_testdata[5974] */\n    { 1991, 0x9E3779B185EBCA8DULL, { 0x16A527D69EE9489AULL, 0x1F1B10D3014D9BCBULL } }, /* XSUM_XXH128_testdata[5975] */\n    { 1992, 0x0000000000000000ULL, { 0x1E827B8BA221E555ULL, 0xA57CFA4F6DDC7099ULL } }, /* XSUM_XXH128_testdata[5976] */\n    { 1992, 0x000000009E3779B1ULL, { 0x8355AD7AF62AD029ULL, 0x2926F64AC5626568ULL } }, /* XSUM_XXH128_testdata[5977] */\n    { 1992, 0x9E3779B185EBCA8DULL, { 0x1C31224954EAF715ULL, 0x6B7CE8CBDCC40213ULL } }, /* XSUM_XXH128_testdata[5978] */\n    { 1993, 0x0000000000000000ULL, { 0x87C424B6FF539845ULL, 0xC55EE7E3D0E75584ULL } }, /* XSUM_XXH128_testdata[5979] */\n    { 1993, 0x000000009E3779B1ULL, { 0xBDEB34885BDF098FULL, 0xFCFAF7EFCD47C175ULL } }, /* XSUM_XXH128_testdata[5980] */\n    { 1993, 0x9E3779B185EBCA8DULL, { 0xCCD894F35873EE67ULL, 0x67FAAEB17EB5A8F3ULL } }, /* XSUM_XXH128_testdata[5981] */\n    { 1994, 0x0000000000000000ULL, { 0x94F1B7BA2BA62F72ULL, 0xFE3A281CD3262EF2ULL } }, /* XSUM_XXH128_testdata[5982] */\n    { 1994, 0x000000009E3779B1ULL, { 0xB09508244D5D192BULL, 0xBAF7D1A7210162A7ULL } }, /* XSUM_XXH128_testdata[5983] */\n    { 1994, 0x9E3779B185EBCA8DULL, { 0x8E7A8E6E14BA57E6ULL, 0xC0694F58C57EDF2EULL } }, /* XSUM_XXH128_testdata[5984] */\n    { 1995, 0x0000000000000000ULL, { 0xE40874ED5070A9D2ULL, 0xEB77906733FDA027ULL } }, /* XSUM_XXH128_testdata[5985] */\n    { 1995, 0x000000009E3779B1ULL, { 0x1E20A3E154B84574ULL, 0xD95132EDCC0CDD0FULL } }, /* XSUM_XXH128_testdata[5986] */\n    { 1995, 0x9E3779B185EBCA8DULL, { 0x83D414781EB5C843ULL, 0x0B3484524EC0E440ULL } }, /* XSUM_XXH128_testdata[5987] */\n    { 1996, 0x0000000000000000ULL, { 0xE66ECF80A62A9B4EULL, 0x669BEDC4BF1237FDULL } }, /* XSUM_XXH128_testdata[5988] */\n    { 1996, 0x000000009E3779B1ULL, { 0x8D4D45BA65418920ULL, 0x0242BA3BE5223A19ULL } }, /* XSUM_XXH128_testdata[5989] */\n    { 1996, 0x9E3779B185EBCA8DULL, { 0xB6AD15FEDE29D715ULL, 0xBA7A99CB59D5CBDAULL } }, /* XSUM_XXH128_testdata[5990] */\n    { 1997, 0x0000000000000000ULL, { 0xC74E7760D7362526ULL, 0x3CFC6128901223EDULL } }, /* XSUM_XXH128_testdata[5991] */\n    { 1997, 0x000000009E3779B1ULL, { 0x60B85069A6613414ULL, 0x622C0AD24877C9BBULL } }, /* XSUM_XXH128_testdata[5992] */\n    { 1997, 0x9E3779B185EBCA8DULL, { 0xA860AEED4A0A0D52ULL, 0xEE833F2699A05A49ULL } }, /* XSUM_XXH128_testdata[5993] */\n    { 1998, 0x0000000000000000ULL, { 0x13D55387CE54E1FFULL, 0x678A94A840D245A0ULL } }, /* XSUM_XXH128_testdata[5994] */\n    { 1998, 0x000000009E3779B1ULL, { 0x72D294F3671C5CB3ULL, 0xCB68A13A1DADFA4BULL } }, /* XSUM_XXH128_testdata[5995] */\n    { 1998, 0x9E3779B185EBCA8DULL, { 0xE7956FF8D3AB8D98ULL, 0x0EAAD48A3C59C7C2ULL } }, /* XSUM_XXH128_testdata[5996] */\n    { 1999, 0x0000000000000000ULL, { 0x7264D216CE954BC8ULL, 0xF356FA91C02766ACULL } }, /* XSUM_XXH128_testdata[5997] */\n    { 1999, 0x000000009E3779B1ULL, { 0x58727B05E8F56484ULL, 0x4467FD4347236F74ULL } }, /* XSUM_XXH128_testdata[5998] */\n    { 1999, 0x9E3779B185EBCA8DULL, { 0xAC51184AD530F754ULL, 0x17036198C95EDD53ULL } }, /* XSUM_XXH128_testdata[5999] */\n    { 2000, 0x0000000000000000ULL, { 0xCB004B57E2C68C3CULL, 0x859EDCAF46CDC6AEULL } }, /* XSUM_XXH128_testdata[6000] */\n    { 2000, 0x000000009E3779B1ULL, { 0xAF004EBB17BFB29BULL, 0x20D7946C3BFE04B0ULL } }, /* XSUM_XXH128_testdata[6001] */\n    { 2000, 0x9E3779B185EBCA8DULL, { 0xA42E90FB128E2048ULL, 0xEBD253A542466CA5ULL } }, /* XSUM_XXH128_testdata[6002] */\n    { 2001, 0x0000000000000000ULL, { 0x1E1F42B1994C1879ULL, 0xF869C689108F2A2EULL } }, /* XSUM_XXH128_testdata[6003] */\n    { 2001, 0x000000009E3779B1ULL, { 0x950A1581ACBFCBABULL, 0x251FDA63E1481D12ULL } }, /* XSUM_XXH128_testdata[6004] */\n    { 2001, 0x9E3779B185EBCA8DULL, { 0x03DA0D7A9420CF61ULL, 0xFF4D2C2464091186ULL } }, /* XSUM_XXH128_testdata[6005] */\n    { 2002, 0x0000000000000000ULL, { 0x664FA560D857B113ULL, 0x67939DD29ED423C5ULL } }, /* XSUM_XXH128_testdata[6006] */\n    { 2002, 0x000000009E3779B1ULL, { 0xF024772AAE2F49F9ULL, 0x6CA3A6F1C35DD634ULL } }, /* XSUM_XXH128_testdata[6007] */\n    { 2002, 0x9E3779B185EBCA8DULL, { 0x05C79467E8C02D61ULL, 0x1DA4A79E3E422964ULL } }, /* XSUM_XXH128_testdata[6008] */\n    { 2003, 0x0000000000000000ULL, { 0xE079D54B05F58408ULL, 0xFF17C4FB2039B78FULL } }, /* XSUM_XXH128_testdata[6009] */\n    { 2003, 0x000000009E3779B1ULL, { 0x943CB60CE84EBB35ULL, 0xC32E5A01FADE2996ULL } }, /* XSUM_XXH128_testdata[6010] */\n    { 2003, 0x9E3779B185EBCA8DULL, { 0x834B08E509012644ULL, 0xF258AE6C8BF64DFEULL } }, /* XSUM_XXH128_testdata[6011] */\n    { 2004, 0x0000000000000000ULL, { 0x52DF2A94AD538041ULL, 0x60E2B477A57237B1ULL } }, /* XSUM_XXH128_testdata[6012] */\n    { 2004, 0x000000009E3779B1ULL, { 0x0395FFA8E62EB7C3ULL, 0x8B2BDB090529E367ULL } }, /* XSUM_XXH128_testdata[6013] */\n    { 2004, 0x9E3779B185EBCA8DULL, { 0x504B2AA2E2217292ULL, 0x42F26CCD8A41F9C9ULL } }, /* XSUM_XXH128_testdata[6014] */\n    { 2005, 0x0000000000000000ULL, { 0x6AE5C974231CF0EBULL, 0xB39B60235679E472ULL } }, /* XSUM_XXH128_testdata[6015] */\n    { 2005, 0x000000009E3779B1ULL, { 0x8A268D79CD1D5EA4ULL, 0x001571930BF2EDB8ULL } }, /* XSUM_XXH128_testdata[6016] */\n    { 2005, 0x9E3779B185EBCA8DULL, { 0xEE5B63536540CCA8ULL, 0x2937EACEF18C5E56ULL } }, /* XSUM_XXH128_testdata[6017] */\n    { 2006, 0x0000000000000000ULL, { 0xB3D3F97A23341F2BULL, 0xDD83E6B084DD7768ULL } }, /* XSUM_XXH128_testdata[6018] */\n    { 2006, 0x000000009E3779B1ULL, { 0x793B5BEBD69C685DULL, 0xD14574B2EA746487ULL } }, /* XSUM_XXH128_testdata[6019] */\n    { 2006, 0x9E3779B185EBCA8DULL, { 0x3539ACA03EA1E19FULL, 0x98CA75B97DAF1B11ULL } }, /* XSUM_XXH128_testdata[6020] */\n    { 2007, 0x0000000000000000ULL, { 0x14496363E69C4C5BULL, 0x250C832850540596ULL } }, /* XSUM_XXH128_testdata[6021] */\n    { 2007, 0x000000009E3779B1ULL, { 0x45DE5A95E736A500ULL, 0xB4E87E5FBC15E9FEULL } }, /* XSUM_XXH128_testdata[6022] */\n    { 2007, 0x9E3779B185EBCA8DULL, { 0xC19C6F8FD60CCEFDULL, 0x0F01C3EC9563BAFDULL } }, /* XSUM_XXH128_testdata[6023] */\n    { 2008, 0x0000000000000000ULL, { 0xFCCDF239ED44A88EULL, 0x5FD886EDB4B0D67BULL } }, /* XSUM_XXH128_testdata[6024] */\n    { 2008, 0x000000009E3779B1ULL, { 0x287497E2BC166850ULL, 0x2ED0C8900ADA2261ULL } }, /* XSUM_XXH128_testdata[6025] */\n    { 2008, 0x9E3779B185EBCA8DULL, { 0x2EC7A1B0B82533F0ULL, 0x1878739922358B20ULL } }, /* XSUM_XXH128_testdata[6026] */\n    { 2009, 0x0000000000000000ULL, { 0x6876FDB5237590AFULL, 0x1347CC3B914FB540ULL } }, /* XSUM_XXH128_testdata[6027] */\n    { 2009, 0x000000009E3779B1ULL, { 0xB8F3138D171996E7ULL, 0xE39A831824D82F8FULL } }, /* XSUM_XXH128_testdata[6028] */\n    { 2009, 0x9E3779B185EBCA8DULL, { 0xC72D0F20062CCDB8ULL, 0xF72353137A6501CDULL } }, /* XSUM_XXH128_testdata[6029] */\n    { 2010, 0x0000000000000000ULL, { 0xE2C785419211E98DULL, 0xBACF6AC631CB6AEBULL } }, /* XSUM_XXH128_testdata[6030] */\n    { 2010, 0x000000009E3779B1ULL, { 0x7B7E7CC8EC25C46CULL, 0x7CC34488F2134F53ULL } }, /* XSUM_XXH128_testdata[6031] */\n    { 2010, 0x9E3779B185EBCA8DULL, { 0x5622588346C1BC8BULL, 0x9E44FD77D2C81329ULL } }, /* XSUM_XXH128_testdata[6032] */\n    { 2011, 0x0000000000000000ULL, { 0xA3D767040F0D0661ULL, 0xD4F0DEC7A15A9913ULL } }, /* XSUM_XXH128_testdata[6033] */\n    { 2011, 0x000000009E3779B1ULL, { 0x523AA80F9F878FEBULL, 0xE962E2D27B2C7BCEULL } }, /* XSUM_XXH128_testdata[6034] */\n    { 2011, 0x9E3779B185EBCA8DULL, { 0xFCA2FA56B540FADBULL, 0x43D11C34A5D0571CULL } }, /* XSUM_XXH128_testdata[6035] */\n    { 2012, 0x0000000000000000ULL, { 0xC049B2DC7838F936ULL, 0x58820947BDC04C4CULL } }, /* XSUM_XXH128_testdata[6036] */\n    { 2012, 0x000000009E3779B1ULL, { 0x215C9AE2DC616ADFULL, 0xA74D636B41D5EF84ULL } }, /* XSUM_XXH128_testdata[6037] */\n    { 2012, 0x9E3779B185EBCA8DULL, { 0x4CACB3E58EE6C22AULL, 0xD1867F7555770FA9ULL } }, /* XSUM_XXH128_testdata[6038] */\n    { 2013, 0x0000000000000000ULL, { 0xB6E73B07D480F818ULL, 0x27CB009A59D711B0ULL } }, /* XSUM_XXH128_testdata[6039] */\n    { 2013, 0x000000009E3779B1ULL, { 0xBA3264A9C74D2A20ULL, 0x4B711D15E6FC5A5BULL } }, /* XSUM_XXH128_testdata[6040] */\n    { 2013, 0x9E3779B185EBCA8DULL, { 0xFD34BCF6A3482135ULL, 0x48362AE18554CEE9ULL } }, /* XSUM_XXH128_testdata[6041] */\n    { 2014, 0x0000000000000000ULL, { 0x8A3B04C52FC9AA23ULL, 0x1BED8FC2CB50AB73ULL } }, /* XSUM_XXH128_testdata[6042] */\n    { 2014, 0x000000009E3779B1ULL, { 0xD3EA062A6B7CEF26ULL, 0xE98E5AA2B02A1E43ULL } }, /* XSUM_XXH128_testdata[6043] */\n    { 2014, 0x9E3779B185EBCA8DULL, { 0x8139A1C6391CE7E2ULL, 0xC13B38977E5CC375ULL } }, /* XSUM_XXH128_testdata[6044] */\n    { 2015, 0x0000000000000000ULL, { 0x1A239D5BD68C460FULL, 0x5377BDAA8F847EBCULL } }, /* XSUM_XXH128_testdata[6045] */\n    { 2015, 0x000000009E3779B1ULL, { 0x38437308BC5A8FADULL, 0xDAD86D4C6F78E7D9ULL } }, /* XSUM_XXH128_testdata[6046] */\n    { 2015, 0x9E3779B185EBCA8DULL, { 0xF9F0BC793F9ECFE2ULL, 0x8E9BCC512CB5B938ULL } }, /* XSUM_XXH128_testdata[6047] */\n    { 2016, 0x0000000000000000ULL, { 0x534519D72E407E0CULL, 0xFCEBD0565AF0AC2DULL } }, /* XSUM_XXH128_testdata[6048] */\n    { 2016, 0x000000009E3779B1ULL, { 0x2B914D5CAB07CB85ULL, 0x9CC6C772AA76F0F3ULL } }, /* XSUM_XXH128_testdata[6049] */\n    { 2016, 0x9E3779B185EBCA8DULL, { 0x725AE54533395887ULL, 0x4E708CA426AC0045ULL } }, /* XSUM_XXH128_testdata[6050] */\n    { 2017, 0x0000000000000000ULL, { 0xDAA50B3EA23ADC34ULL, 0xAA26106D9F5801A7ULL } }, /* XSUM_XXH128_testdata[6051] */\n    { 2017, 0x000000009E3779B1ULL, { 0x274F059883039D7CULL, 0x65525209ED9DD1E3ULL } }, /* XSUM_XXH128_testdata[6052] */\n    { 2017, 0x9E3779B185EBCA8DULL, { 0x40530C9B13FBD31BULL, 0xE5C62F816C8C98EBULL } }, /* XSUM_XXH128_testdata[6053] */\n    { 2018, 0x0000000000000000ULL, { 0x39D77B2F9DF4CE40ULL, 0x8AA1589E4DA135B5ULL } }, /* XSUM_XXH128_testdata[6054] */\n    { 2018, 0x000000009E3779B1ULL, { 0xA43883C83938E9B6ULL, 0xF913AD37E8291E23ULL } }, /* XSUM_XXH128_testdata[6055] */\n    { 2018, 0x9E3779B185EBCA8DULL, { 0x31F74B0ADE0693F0ULL, 0xD24A15394AAAEBECULL } }, /* XSUM_XXH128_testdata[6056] */\n    { 2019, 0x0000000000000000ULL, { 0x413C806DA2DF48BAULL, 0xCF82E755F199D67EULL } }, /* XSUM_XXH128_testdata[6057] */\n    { 2019, 0x000000009E3779B1ULL, { 0x6CF04E768F60E6DCULL, 0xB940A15EC4B87C15ULL } }, /* XSUM_XXH128_testdata[6058] */\n    { 2019, 0x9E3779B185EBCA8DULL, { 0x5C2BADA6E6CBBE9FULL, 0x5776A8DF3C111AEFULL } }, /* XSUM_XXH128_testdata[6059] */\n    { 2020, 0x0000000000000000ULL, { 0x275A4C696DF53E8AULL, 0xDC59CC95E19005F3ULL } }, /* XSUM_XXH128_testdata[6060] */\n    { 2020, 0x000000009E3779B1ULL, { 0x25C1B8B47BE99A39ULL, 0xE68D64862263827FULL } }, /* XSUM_XXH128_testdata[6061] */\n    { 2020, 0x9E3779B185EBCA8DULL, { 0x28B2677EB66CA5B4ULL, 0x0F0A84778C8C8E63ULL } }, /* XSUM_XXH128_testdata[6062] */\n    { 2021, 0x0000000000000000ULL, { 0x8959B2E089954F49ULL, 0x4F9A7C06CD8B8D2AULL } }, /* XSUM_XXH128_testdata[6063] */\n    { 2021, 0x000000009E3779B1ULL, { 0xE590A51CD1913346ULL, 0x7FAA26B0597794A0ULL } }, /* XSUM_XXH128_testdata[6064] */\n    { 2021, 0x9E3779B185EBCA8DULL, { 0xBD19EE9F34E838FBULL, 0xB3BE520CC45262C7ULL } }, /* XSUM_XXH128_testdata[6065] */\n    { 2022, 0x0000000000000000ULL, { 0x88DEE9BC3FDE452FULL, 0xAB02FBA7C968A608ULL } }, /* XSUM_XXH128_testdata[6066] */\n    { 2022, 0x000000009E3779B1ULL, { 0x05E3ACD91655DEF5ULL, 0x0CA1F0A1D2C1C5A4ULL } }, /* XSUM_XXH128_testdata[6067] */\n    { 2022, 0x9E3779B185EBCA8DULL, { 0x9646A86F11CBB0FEULL, 0x2CDA2BAF4E508384ULL } }, /* XSUM_XXH128_testdata[6068] */\n    { 2023, 0x0000000000000000ULL, { 0xB8F94EB2217B0BEFULL, 0xBA10816B6350B430ULL } }, /* XSUM_XXH128_testdata[6069] */\n    { 2023, 0x000000009E3779B1ULL, { 0xAA62FF16495D5DFBULL, 0x523E2052E17F19D9ULL } }, /* XSUM_XXH128_testdata[6070] */\n    { 2023, 0x9E3779B185EBCA8DULL, { 0xC13EC440EB36532DULL, 0x315A46D4EBFB5166ULL } }, /* XSUM_XXH128_testdata[6071] */\n    { 2024, 0x0000000000000000ULL, { 0x558CD9D489374445ULL, 0xA3C7941849072C17ULL } }, /* XSUM_XXH128_testdata[6072] */\n    { 2024, 0x000000009E3779B1ULL, { 0xBD34DEE10B502272ULL, 0x78ED43FE1BC3877CULL } }, /* XSUM_XXH128_testdata[6073] */\n    { 2024, 0x9E3779B185EBCA8DULL, { 0xC709BAD6A00BD0A6ULL, 0x23A8B6A2BBF9FF6EULL } }, /* XSUM_XXH128_testdata[6074] */\n    { 2025, 0x0000000000000000ULL, { 0x4A1BE4E9C58D67B0ULL, 0x5C7FBCEC47199FB0ULL } }, /* XSUM_XXH128_testdata[6075] */\n    { 2025, 0x000000009E3779B1ULL, { 0xE3D3CEB8CC5B7D0DULL, 0xD55189BAB7CE3A64ULL } }, /* XSUM_XXH128_testdata[6076] */\n    { 2025, 0x9E3779B185EBCA8DULL, { 0xE712E350253C4F20ULL, 0xAF2E2E48E2A11E4BULL } }, /* XSUM_XXH128_testdata[6077] */\n    { 2026, 0x0000000000000000ULL, { 0xD60CDF85EB17A41DULL, 0xFC603F5542CBF57DULL } }, /* XSUM_XXH128_testdata[6078] */\n    { 2026, 0x000000009E3779B1ULL, { 0xF5FE53A3D2DC6FB6ULL, 0x0F5DBAD97E9048DAULL } }, /* XSUM_XXH128_testdata[6079] */\n    { 2026, 0x9E3779B185EBCA8DULL, { 0x8BD9EC91AEC9506CULL, 0xC82DCBDDC842AF68ULL } }, /* XSUM_XXH128_testdata[6080] */\n    { 2027, 0x0000000000000000ULL, { 0x34030D2C2BD3620EULL, 0x620B79CF222E8013ULL } }, /* XSUM_XXH128_testdata[6081] */\n    { 2027, 0x000000009E3779B1ULL, { 0x60B57703A2852C5BULL, 0x1FF265FF85FE0D18ULL } }, /* XSUM_XXH128_testdata[6082] */\n    { 2027, 0x9E3779B185EBCA8DULL, { 0x1E6AADC5ACC59368ULL, 0x5CBD09598068CD96ULL } }, /* XSUM_XXH128_testdata[6083] */\n    { 2028, 0x0000000000000000ULL, { 0x0482AD00A9BEA4DFULL, 0x004F6F30E3CDF9F7ULL } }, /* XSUM_XXH128_testdata[6084] */\n    { 2028, 0x000000009E3779B1ULL, { 0xF7BCCBE86214EFF5ULL, 0xC74842B6CACB052BULL } }, /* XSUM_XXH128_testdata[6085] */\n    { 2028, 0x9E3779B185EBCA8DULL, { 0x64B42B215687F156ULL, 0x678850160411ACF9ULL } }, /* XSUM_XXH128_testdata[6086] */\n    { 2029, 0x0000000000000000ULL, { 0x43F8BAF5DCE60762ULL, 0x6875A3539DDB4C72ULL } }, /* XSUM_XXH128_testdata[6087] */\n    { 2029, 0x000000009E3779B1ULL, { 0x6785F6F30F31FC87ULL, 0x7FAE963EA442A0ADULL } }, /* XSUM_XXH128_testdata[6088] */\n    { 2029, 0x9E3779B185EBCA8DULL, { 0x3076B5F774B774ABULL, 0xFE81B7FA5258694DULL } }, /* XSUM_XXH128_testdata[6089] */\n    { 2030, 0x0000000000000000ULL, { 0x7F3A75C5F47372BFULL, 0xB7E6F82C1F5FB9EEULL } }, /* XSUM_XXH128_testdata[6090] */\n    { 2030, 0x000000009E3779B1ULL, { 0x6FCB76CE96D31C80ULL, 0xBCDCDF08A7633030ULL } }, /* XSUM_XXH128_testdata[6091] */\n    { 2030, 0x9E3779B185EBCA8DULL, { 0xA41F7DE911B9388DULL, 0x7E58A1E191FFEE52ULL } }, /* XSUM_XXH128_testdata[6092] */\n    { 2031, 0x0000000000000000ULL, { 0x0F07C63F0A64FB6BULL, 0x78E7CDCB9F8CA20AULL } }, /* XSUM_XXH128_testdata[6093] */\n    { 2031, 0x000000009E3779B1ULL, { 0xA8DE3A6A6ACF3FC9ULL, 0x501FF62CB6348D9DULL } }, /* XSUM_XXH128_testdata[6094] */\n    { 2031, 0x9E3779B185EBCA8DULL, { 0xD7AA163A998F94FFULL, 0x7815B9F113A6EE2BULL } }, /* XSUM_XXH128_testdata[6095] */\n    { 2032, 0x0000000000000000ULL, { 0x730334D88E3E042EULL, 0x373E97EB8F27342DULL } }, /* XSUM_XXH128_testdata[6096] */\n    { 2032, 0x000000009E3779B1ULL, { 0x8DE885E175AADDF9ULL, 0xA78608E1E95F5F52ULL } }, /* XSUM_XXH128_testdata[6097] */\n    { 2032, 0x9E3779B185EBCA8DULL, { 0x43E3404431F6B57BULL, 0x5165C3C64BF1A970ULL } }, /* XSUM_XXH128_testdata[6098] */\n    { 2033, 0x0000000000000000ULL, { 0x820AB0168AD91F9CULL, 0xEC275E450B0A4569ULL } }, /* XSUM_XXH128_testdata[6099] */\n    { 2033, 0x000000009E3779B1ULL, { 0x9825D196FA77EE5EULL, 0x657B43CE0CD27766ULL } }, /* XSUM_XXH128_testdata[6100] */\n    { 2033, 0x9E3779B185EBCA8DULL, { 0xA2FA5B655AC4CF82ULL, 0x102C9B7F5B610ADBULL } }, /* XSUM_XXH128_testdata[6101] */\n    { 2034, 0x0000000000000000ULL, { 0x5983231050374BE5ULL, 0x45B6EE3E0FB1B94BULL } }, /* XSUM_XXH128_testdata[6102] */\n    { 2034, 0x000000009E3779B1ULL, { 0xA76F9CFF400FF48FULL, 0xE63B2084566AB839ULL } }, /* XSUM_XXH128_testdata[6103] */\n    { 2034, 0x9E3779B185EBCA8DULL, { 0x463BA881AF792E27ULL, 0xEA30796E2199ECD0ULL } }, /* XSUM_XXH128_testdata[6104] */\n    { 2035, 0x0000000000000000ULL, { 0x64138A1310FB44C1ULL, 0x9548E8719069EC31ULL } }, /* XSUM_XXH128_testdata[6105] */\n    { 2035, 0x000000009E3779B1ULL, { 0x7F0BC4EA67C1AA97ULL, 0x81AC5A175D5ED56AULL } }, /* XSUM_XXH128_testdata[6106] */\n    { 2035, 0x9E3779B185EBCA8DULL, { 0xC567DEEA44BB2339ULL, 0xB208B3FAFD04DA0EULL } }, /* XSUM_XXH128_testdata[6107] */\n    { 2036, 0x0000000000000000ULL, { 0xED8983739724FB6DULL, 0x1A8B0F9BF85AD378ULL } }, /* XSUM_XXH128_testdata[6108] */\n    { 2036, 0x000000009E3779B1ULL, { 0xA91107C891C457C5ULL, 0xEBBB619A526255EEULL } }, /* XSUM_XXH128_testdata[6109] */\n    { 2036, 0x9E3779B185EBCA8DULL, { 0x01E77A05708AFEB9ULL, 0x1D3930EB81432E87ULL } }, /* XSUM_XXH128_testdata[6110] */\n    { 2037, 0x0000000000000000ULL, { 0x92054F5E50441F45ULL, 0xA448AC2065CE828AULL } }, /* XSUM_XXH128_testdata[6111] */\n    { 2037, 0x000000009E3779B1ULL, { 0xEA4D0FDF32AFC990ULL, 0xDD11C3AB8D91D79FULL } }, /* XSUM_XXH128_testdata[6112] */\n    { 2037, 0x9E3779B185EBCA8DULL, { 0x434B0B08AFC1ECF6ULL, 0x05468414A895A87BULL } }, /* XSUM_XXH128_testdata[6113] */\n    { 2038, 0x0000000000000000ULL, { 0xE87C4A31666DD254ULL, 0xEF5F1DA1DF7C8200ULL } }, /* XSUM_XXH128_testdata[6114] */\n    { 2038, 0x000000009E3779B1ULL, { 0x13F73C2864C69557ULL, 0xCED6DE9C4645DF69ULL } }, /* XSUM_XXH128_testdata[6115] */\n    { 2038, 0x9E3779B185EBCA8DULL, { 0x732C503DE5D66BFAULL, 0x2F3BE671B6296FC2ULL } }, /* XSUM_XXH128_testdata[6116] */\n    { 2039, 0x0000000000000000ULL, { 0x4977DEF98DA8CDDBULL, 0x701C2D3389213E3FULL } }, /* XSUM_XXH128_testdata[6117] */\n    { 2039, 0x000000009E3779B1ULL, { 0xAFA97A032456FDC2ULL, 0xB026BA633B4CA7ADULL } }, /* XSUM_XXH128_testdata[6118] */\n    { 2039, 0x9E3779B185EBCA8DULL, { 0x39AB97AAA1B56323ULL, 0x96AD35DC23B8C9AAULL } }, /* XSUM_XXH128_testdata[6119] */\n    { 2040, 0x0000000000000000ULL, { 0xEEF5DBB6649AA0E3ULL, 0xC774517F0673497FULL } }, /* XSUM_XXH128_testdata[6120] */\n    { 2040, 0x000000009E3779B1ULL, { 0xE0C71ED3F2CE3D70ULL, 0x1D1821201047B7D1ULL } }, /* XSUM_XXH128_testdata[6121] */\n    { 2040, 0x9E3779B185EBCA8DULL, { 0x836669341AF0DB7EULL, 0xD51FDAA3A487672BULL } }, /* XSUM_XXH128_testdata[6122] */\n    { 2041, 0x0000000000000000ULL, { 0x08D6503AD6329A06ULL, 0xFC20954936C4638EULL } }, /* XSUM_XXH128_testdata[6123] */\n    { 2041, 0x000000009E3779B1ULL, { 0xB768548C329DB9DDULL, 0x36B33DD78DE185CEULL } }, /* XSUM_XXH128_testdata[6124] */\n    { 2041, 0x9E3779B185EBCA8DULL, { 0xEF60C7E28ECDCFD8ULL, 0x54C6F879277722ECULL } }, /* XSUM_XXH128_testdata[6125] */\n    { 2042, 0x0000000000000000ULL, { 0xEF868C71CFEB56FEULL, 0x73CC68B6E1371CF8ULL } }, /* XSUM_XXH128_testdata[6126] */\n    { 2042, 0x000000009E3779B1ULL, { 0x2956EB532F06C8D4ULL, 0x4058A69ACD7C5433ULL } }, /* XSUM_XXH128_testdata[6127] */\n    { 2042, 0x9E3779B185EBCA8DULL, { 0xE0D951BBF943A865ULL, 0x033B8C3040C8FD74ULL } }, /* XSUM_XXH128_testdata[6128] */\n    { 2043, 0x0000000000000000ULL, { 0x8E1FE7164D991205ULL, 0xE52011A084CD03A9ULL } }, /* XSUM_XXH128_testdata[6129] */\n    { 2043, 0x000000009E3779B1ULL, { 0xDE3A6754B2033E33ULL, 0x9E36C3C39B12A3D5ULL } }, /* XSUM_XXH128_testdata[6130] */\n    { 2043, 0x9E3779B185EBCA8DULL, { 0x4E4FCF6E540BD98CULL, 0x43984208F289B02DULL } }, /* XSUM_XXH128_testdata[6131] */\n    { 2044, 0x0000000000000000ULL, { 0x430EDA1712B71273ULL, 0x5E6BA2B132D472BBULL } }, /* XSUM_XXH128_testdata[6132] */\n    { 2044, 0x000000009E3779B1ULL, { 0xE908FDB2405499D9ULL, 0x6C6957BDBBEB4072ULL } }, /* XSUM_XXH128_testdata[6133] */\n    { 2044, 0x9E3779B185EBCA8DULL, { 0xD5CB570B453EA1EEULL, 0xEF5D918E4E094585ULL } }, /* XSUM_XXH128_testdata[6134] */\n    { 2045, 0x0000000000000000ULL, { 0x0AC7FFEC88CB2C74ULL, 0x785D7C9AFFC48819ULL } }, /* XSUM_XXH128_testdata[6135] */\n    { 2045, 0x000000009E3779B1ULL, { 0xB504B6F65B9FC84BULL, 0xC6A746E3594CA17BULL } }, /* XSUM_XXH128_testdata[6136] */\n    { 2045, 0x9E3779B185EBCA8DULL, { 0x826B102E8728882AULL, 0x06F361AE0428FE9FULL } }, /* XSUM_XXH128_testdata[6137] */\n    { 2046, 0x0000000000000000ULL, { 0x2FCD8606F9959DEDULL, 0xBDBA98C14D96BEACULL } }, /* XSUM_XXH128_testdata[6138] */\n    { 2046, 0x000000009E3779B1ULL, { 0x234C730CFD80E676ULL, 0x656CE11DCFCF5301ULL } }, /* XSUM_XXH128_testdata[6139] */\n    { 2046, 0x9E3779B185EBCA8DULL, { 0x251CA99F31B16336ULL, 0x5E957DE6D9EDA6AEULL } }, /* XSUM_XXH128_testdata[6140] */\n    { 2047, 0x0000000000000000ULL, { 0xB36ECE19FCA2197FULL, 0x763A9143F0523D15ULL } }, /* XSUM_XXH128_testdata[6141] */\n    { 2047, 0x000000009E3779B1ULL, { 0x8141F69F4BACDEA2ULL, 0xD2605592AB25DC1AULL } }, /* XSUM_XXH128_testdata[6142] */\n    { 2047, 0x9E3779B185EBCA8DULL, { 0x8111BB82842ED0AEULL, 0x47C992688E710651ULL } }, /* XSUM_XXH128_testdata[6143] */\n    { 2048, 0x0000000000000000ULL, { 0xDD59E2C3A5F038E0ULL, 0xF736557FD47073A5ULL } }, /* XSUM_XXH128_testdata[6144] */\n    { 2048, 0x000000009E3779B1ULL, { 0x230D43F30206260BULL, 0x7FB03F7E7186C3EAULL } }, /* XSUM_XXH128_testdata[6145] */\n    { 2048, 0x9E3779B185EBCA8DULL, { 0x66F81670669ABABCULL, 0x23CC3A2E75EBAAEAULL } }, /* XSUM_XXH128_testdata[6146] */\n    { 2049, 0x0000000000000000ULL, { 0xD3AFA4329779B921ULL, 0x4CD2BD192F2D70BDULL } }, /* XSUM_XXH128_testdata[6147] */\n    { 2049, 0x000000009E3779B1ULL, { 0x60E0F49946D79DAFULL, 0x782BC6262B86BFE8ULL } }, /* XSUM_XXH128_testdata[6148] */\n    { 2049, 0x9E3779B185EBCA8DULL, { 0xE48083836CD58024ULL, 0xE4000F7A288A82CEULL } }, /* XSUM_XXH128_testdata[6149] */\n    { 2050, 0x0000000000000000ULL, { 0x0532360C2902A5BDULL, 0x4B1861A7CA7A93C5ULL } }, /* XSUM_XXH128_testdata[6150] */\n    { 2050, 0x000000009E3779B1ULL, { 0x5B6BB159ECFEA6CBULL, 0xDB35E9D09762164DULL } }, /* XSUM_XXH128_testdata[6151] */\n    { 2050, 0x9E3779B185EBCA8DULL, { 0x662EC20AC24778FAULL, 0xAD4D243C38FE1D8EULL } }, /* XSUM_XXH128_testdata[6152] */\n    { 2051, 0x0000000000000000ULL, { 0xE62F2E2BF20AAAC7ULL, 0x99120B1130BB7839ULL } }, /* XSUM_XXH128_testdata[6153] */\n    { 2051, 0x000000009E3779B1ULL, { 0x485B17BDF08B568FULL, 0x359C82881DDE9D41ULL } }, /* XSUM_XXH128_testdata[6154] */\n    { 2051, 0x9E3779B185EBCA8DULL, { 0x243368F8E121EE9CULL, 0xB76A302FC8DEC9DBULL } }, /* XSUM_XXH128_testdata[6155] */\n    { 2052, 0x0000000000000000ULL, { 0x77E97B48DFD9C3A4ULL, 0x156DADD15FD9897BULL } }, /* XSUM_XXH128_testdata[6156] */\n    { 2052, 0x000000009E3779B1ULL, { 0xC1DE931CD5EF7FE9ULL, 0x8A6AF73B673B11B1ULL } }, /* XSUM_XXH128_testdata[6157] */\n    { 2052, 0x9E3779B185EBCA8DULL, { 0x1383D08E9F71026CULL, 0xC5F159D14A718848ULL } }, /* XSUM_XXH128_testdata[6158] */\n    { 2053, 0x0000000000000000ULL, { 0x76A13FAD4EE49BB6ULL, 0xFE6259230F43C22CULL } }, /* XSUM_XXH128_testdata[6159] */\n    { 2053, 0x000000009E3779B1ULL, { 0x0D1117E361DB78BAULL, 0xC7C6B0693F424E65ULL } }, /* XSUM_XXH128_testdata[6160] */\n    { 2053, 0x9E3779B185EBCA8DULL, { 0x7D4B20F87FB1D4C6ULL, 0x50BDD7469DE21A49ULL } }, /* XSUM_XXH128_testdata[6161] */\n    { 2054, 0x0000000000000000ULL, { 0xDFA75E9C69C94236ULL, 0x129EE0EB52028882ULL } }, /* XSUM_XXH128_testdata[6162] */\n    { 2054, 0x000000009E3779B1ULL, { 0x79FE8F462F6D30E0ULL, 0x906231C502C9D6D7ULL } }, /* XSUM_XXH128_testdata[6163] */\n    { 2054, 0x9E3779B185EBCA8DULL, { 0x4BAEE244F77B4556ULL, 0xAA7A4DBD0AACD445ULL } }, /* XSUM_XXH128_testdata[6164] */\n    { 2055, 0x0000000000000000ULL, { 0x78F2A62C67FCE789ULL, 0xD24415AA4B7EA0B9ULL } }, /* XSUM_XXH128_testdata[6165] */\n    { 2055, 0x000000009E3779B1ULL, { 0x0F661A88721C0F15ULL, 0xE42E09ED9CA8084BULL } }, /* XSUM_XXH128_testdata[6166] */\n    { 2055, 0x9E3779B185EBCA8DULL, { 0x00C87FA2B31D9A7EULL, 0x4ED12A46F2DD2BAAULL } }, /* XSUM_XXH128_testdata[6167] */\n    { 2056, 0x0000000000000000ULL, { 0x85673DCE828BB176ULL, 0x6E766BD7F58FDE36ULL } }, /* XSUM_XXH128_testdata[6168] */\n    { 2056, 0x000000009E3779B1ULL, { 0xB1B1661153025D63ULL, 0x2F9CD855A651C12BULL } }, /* XSUM_XXH128_testdata[6169] */\n    { 2056, 0x9E3779B185EBCA8DULL, { 0x639BBCB43B120051ULL, 0xD97E5108436F34E4ULL } }, /* XSUM_XXH128_testdata[6170] */\n    { 2057, 0x0000000000000000ULL, { 0x5603E2339F4F826EULL, 0xCB4B5E6A5EE7920CULL } }, /* XSUM_XXH128_testdata[6171] */\n    { 2057, 0x000000009E3779B1ULL, { 0xA94615CFE7097918ULL, 0xFC003C18022799B4ULL } }, /* XSUM_XXH128_testdata[6172] */\n    { 2057, 0x9E3779B185EBCA8DULL, { 0x3EE81E2EEDA78865ULL, 0x38875F8095DB9BFFULL } }, /* XSUM_XXH128_testdata[6173] */\n    { 2058, 0x0000000000000000ULL, { 0x8B79E2C538071EE1ULL, 0x807D962007307B45ULL } }, /* XSUM_XXH128_testdata[6174] */\n    { 2058, 0x000000009E3779B1ULL, { 0x4327243FB12CB154ULL, 0x485FA03DA76E270AULL } }, /* XSUM_XXH128_testdata[6175] */\n    { 2058, 0x9E3779B185EBCA8DULL, { 0x45D764AEA3909E3CULL, 0xCFDFFA43A86C2A81ULL } }, /* XSUM_XXH128_testdata[6176] */\n    { 2059, 0x0000000000000000ULL, { 0x029818F64365392BULL, 0x388992A510C977D9ULL } }, /* XSUM_XXH128_testdata[6177] */\n    { 2059, 0x000000009E3779B1ULL, { 0x0A5703B0DBC36F41ULL, 0xEDED364EB26AA249ULL } }, /* XSUM_XXH128_testdata[6178] */\n    { 2059, 0x9E3779B185EBCA8DULL, { 0xB3DB05F5273BE806ULL, 0xDAE264BF1193E8B0ULL } }, /* XSUM_XXH128_testdata[6179] */\n    { 2060, 0x0000000000000000ULL, { 0xD839C817BB6637E6ULL, 0xBC1F22D4E618E8C0ULL } }, /* XSUM_XXH128_testdata[6180] */\n    { 2060, 0x000000009E3779B1ULL, { 0x678A74AC8207CD05ULL, 0x23DE42EA041A75B1ULL } }, /* XSUM_XXH128_testdata[6181] */\n    { 2060, 0x9E3779B185EBCA8DULL, { 0x0A5E09622DA857AAULL, 0xCF08539B8183F4DDULL } }, /* XSUM_XXH128_testdata[6182] */\n    { 2061, 0x0000000000000000ULL, { 0x4FD8B89CE6A4728AULL, 0x0B2B853E1E20365BULL } }, /* XSUM_XXH128_testdata[6183] */\n    { 2061, 0x000000009E3779B1ULL, { 0x13041D40A6A597A5ULL, 0x7ACABBBC97B1EF59ULL } }, /* XSUM_XXH128_testdata[6184] */\n    { 2061, 0x9E3779B185EBCA8DULL, { 0xCE450DDB8CB7585EULL, 0x1189EAF68FE13B0CULL } }, /* XSUM_XXH128_testdata[6185] */\n    { 2062, 0x0000000000000000ULL, { 0xB8FB834F453F1CA4ULL, 0x2BAE3BB4E5A8BD6AULL } }, /* XSUM_XXH128_testdata[6186] */\n    { 2062, 0x000000009E3779B1ULL, { 0x574560F5846E6AE1ULL, 0x0C0E354911B93F62ULL } }, /* XSUM_XXH128_testdata[6187] */\n    { 2062, 0x9E3779B185EBCA8DULL, { 0x800978E7099890B7ULL, 0x32B67AABFA4F61A1ULL } }, /* XSUM_XXH128_testdata[6188] */\n    { 2063, 0x0000000000000000ULL, { 0xA17842CF3E1F5965ULL, 0x6D7A6D9431AA1638ULL } }, /* XSUM_XXH128_testdata[6189] */\n    { 2063, 0x000000009E3779B1ULL, { 0x05BB8C8F32D025ACULL, 0x8A8FEA9FDFB0D8D3ULL } }, /* XSUM_XXH128_testdata[6190] */\n    { 2063, 0x9E3779B185EBCA8DULL, { 0xA62021E903E62AFEULL, 0xDF6812BBC8B23A49ULL } }, /* XSUM_XXH128_testdata[6191] */\n    { 2064, 0x0000000000000000ULL, { 0x8F49404347CC5423ULL, 0x77341D0BD33948B6ULL } }, /* XSUM_XXH128_testdata[6192] */\n    { 2064, 0x000000009E3779B1ULL, { 0x983F571976EB59F1ULL, 0xF64D5B0A87CBE39DULL } }, /* XSUM_XXH128_testdata[6193] */\n    { 2064, 0x9E3779B185EBCA8DULL, { 0x7331ED58FB0DA04BULL, 0xEBF4169BA6E86C26ULL } }, /* XSUM_XXH128_testdata[6194] */\n    { 2065, 0x0000000000000000ULL, { 0x9B78591A9560D69FULL, 0xA2121526A1CBFBCFULL } }, /* XSUM_XXH128_testdata[6195] */\n    { 2065, 0x000000009E3779B1ULL, { 0x16AED76DD15C8676ULL, 0xE77EB6ABBABFB3ADULL } }, /* XSUM_XXH128_testdata[6196] */\n    { 2065, 0x9E3779B185EBCA8DULL, { 0xD2E52479743D758DULL, 0x4083CBEEEBA500E2ULL } }, /* XSUM_XXH128_testdata[6197] */\n    { 2066, 0x0000000000000000ULL, { 0x7D91DCA73A96F9ADULL, 0xB9F395D96553764BULL } }, /* XSUM_XXH128_testdata[6198] */\n    { 2066, 0x000000009E3779B1ULL, { 0xADD18E7BC8C82607ULL, 0xA30C23CC105006CCULL } }, /* XSUM_XXH128_testdata[6199] */\n    { 2066, 0x9E3779B185EBCA8DULL, { 0x73C5BE19951D450FULL, 0x74328132CC739B4CULL } }, /* XSUM_XXH128_testdata[6200] */\n    { 2067, 0x0000000000000000ULL, { 0x093A7A97CB2C0C8BULL, 0x1F920C72E044FEC8ULL } }, /* XSUM_XXH128_testdata[6201] */\n    { 2067, 0x000000009E3779B1ULL, { 0x791B615BC0A30901ULL, 0x37DF3D6F2533166AULL } }, /* XSUM_XXH128_testdata[6202] */\n    { 2067, 0x9E3779B185EBCA8DULL, { 0x81DF286213071C56ULL, 0x85AAE06A93DEF3F5ULL } }, /* XSUM_XXH128_testdata[6203] */\n    { 2068, 0x0000000000000000ULL, { 0xAA0061F7D290C673ULL, 0xD8DF2F2762BB7C9DULL } }, /* XSUM_XXH128_testdata[6204] */\n    { 2068, 0x000000009E3779B1ULL, { 0x796E08FF78ED5EFEULL, 0xA3EF57347EB4A98AULL } }, /* XSUM_XXH128_testdata[6205] */\n    { 2068, 0x9E3779B185EBCA8DULL, { 0xD7E52F51A9FA96A3ULL, 0xE8299E48757D0713ULL } }, /* XSUM_XXH128_testdata[6206] */\n    { 2069, 0x0000000000000000ULL, { 0x19FDD32DE4083EE9ULL, 0x7C5087CE8A612552ULL } }, /* XSUM_XXH128_testdata[6207] */\n    { 2069, 0x000000009E3779B1ULL, { 0x5BA76775212AB7BAULL, 0x6AF6CB5A25B02994ULL } }, /* XSUM_XXH128_testdata[6208] */\n    { 2069, 0x9E3779B185EBCA8DULL, { 0xD5747C100812CFC0ULL, 0xDB4CD90164F3C7E9ULL } }, /* XSUM_XXH128_testdata[6209] */\n    { 2070, 0x0000000000000000ULL, { 0x40DB06A00B5816C3ULL, 0x4B8A0C57FFD0FEF8ULL } }, /* XSUM_XXH128_testdata[6210] */\n    { 2070, 0x000000009E3779B1ULL, { 0x22B186C05AD9710AULL, 0x5CD4EC53A49E19C5ULL } }, /* XSUM_XXH128_testdata[6211] */\n    { 2070, 0x9E3779B185EBCA8DULL, { 0x9B3B101D222A4784ULL, 0x19C9543822AFF67AULL } }, /* XSUM_XXH128_testdata[6212] */\n    { 2071, 0x0000000000000000ULL, { 0xA6C20034362C665CULL, 0x81560A2A086940F9ULL } }, /* XSUM_XXH128_testdata[6213] */\n    { 2071, 0x000000009E3779B1ULL, { 0x0384ADF88899BA14ULL, 0xDA8E0D843B30EE00ULL } }, /* XSUM_XXH128_testdata[6214] */\n    { 2071, 0x9E3779B185EBCA8DULL, { 0x81C4A52B28BBCF84ULL, 0xAB3A80A7457429BDULL } }, /* XSUM_XXH128_testdata[6215] */\n    { 2072, 0x0000000000000000ULL, { 0xBC3968C3659D703AULL, 0x6E855E11C80E01E2ULL } }, /* XSUM_XXH128_testdata[6216] */\n    { 2072, 0x000000009E3779B1ULL, { 0x7FB7EC75DBD0973CULL, 0xB8EF193718872B9CULL } }, /* XSUM_XXH128_testdata[6217] */\n    { 2072, 0x9E3779B185EBCA8DULL, { 0xC0C0889D17F84BBBULL, 0x351081C49F8BAEC1ULL } }, /* XSUM_XXH128_testdata[6218] */\n    { 2073, 0x0000000000000000ULL, { 0x80472139673A5CD7ULL, 0x518737725DBECA0DULL } }, /* XSUM_XXH128_testdata[6219] */\n    { 2073, 0x000000009E3779B1ULL, { 0x2760C1DFF05A49D8ULL, 0x5E871420D0AAEAC7ULL } }, /* XSUM_XXH128_testdata[6220] */\n    { 2073, 0x9E3779B185EBCA8DULL, { 0x3F97DB063DA7BEE4ULL, 0x443353E70707A1ECULL } }, /* XSUM_XXH128_testdata[6221] */\n    { 2074, 0x0000000000000000ULL, { 0xFD34D0DA49DA6D7DULL, 0x9E460F9CC8B9701AULL } }, /* XSUM_XXH128_testdata[6222] */\n    { 2074, 0x000000009E3779B1ULL, { 0xAD1AF74F74CD7088ULL, 0xC8FB0D93944BBC36ULL } }, /* XSUM_XXH128_testdata[6223] */\n    { 2074, 0x9E3779B185EBCA8DULL, { 0x3E68AD6D11319979ULL, 0x244BCE0250D25846ULL } }, /* XSUM_XXH128_testdata[6224] */\n    { 2075, 0x0000000000000000ULL, { 0x7BD1D5B89A83155AULL, 0xDD311355B512989EULL } }, /* XSUM_XXH128_testdata[6225] */\n    { 2075, 0x000000009E3779B1ULL, { 0xF1A78EA0AC1F1139ULL, 0xE90BDADE383DA4A2ULL } }, /* XSUM_XXH128_testdata[6226] */\n    { 2075, 0x9E3779B185EBCA8DULL, { 0x1A6BD0206FB411A9ULL, 0x3BCAC62838940B0EULL } }, /* XSUM_XXH128_testdata[6227] */\n    { 2076, 0x0000000000000000ULL, { 0xDA10BBEC348E2389ULL, 0xCE5A1BC48FA8B097ULL } }, /* XSUM_XXH128_testdata[6228] */\n    { 2076, 0x000000009E3779B1ULL, { 0x8FD4C8157BA3FCB5ULL, 0x0B57763958BB7DCFULL } }, /* XSUM_XXH128_testdata[6229] */\n    { 2076, 0x9E3779B185EBCA8DULL, { 0xE2330C860120AEACULL, 0xAE39C73BAC1BC34BULL } }, /* XSUM_XXH128_testdata[6230] */\n    { 2077, 0x0000000000000000ULL, { 0xAF3D4127CBF9214EULL, 0xCB66890E71971554ULL } }, /* XSUM_XXH128_testdata[6231] */\n    { 2077, 0x000000009E3779B1ULL, { 0xF7866854F6D22D7DULL, 0x92FE506E210112A1ULL } }, /* XSUM_XXH128_testdata[6232] */\n    { 2077, 0x9E3779B185EBCA8DULL, { 0x4F7C2583D69E104DULL, 0xF8CA19E2A24D54EEULL } }, /* XSUM_XXH128_testdata[6233] */\n    { 2078, 0x0000000000000000ULL, { 0x308E1748E8FD7BABULL, 0x3FDBCDB012B31FB2ULL } }, /* XSUM_XXH128_testdata[6234] */\n    { 2078, 0x000000009E3779B1ULL, { 0x5F2BE156567F1D9BULL, 0x3E4855D46EB48C1CULL } }, /* XSUM_XXH128_testdata[6235] */\n    { 2078, 0x9E3779B185EBCA8DULL, { 0xDBDDC679BD81D759ULL, 0x3C5760BA698B30D6ULL } }, /* XSUM_XXH128_testdata[6236] */\n    { 2079, 0x0000000000000000ULL, { 0xD7B03414F25CC611ULL, 0xBACA965C0825016DULL } }, /* XSUM_XXH128_testdata[6237] */\n    { 2079, 0x000000009E3779B1ULL, { 0x28B6209325522105ULL, 0xBB7FD0A24C58558FULL } }, /* XSUM_XXH128_testdata[6238] */\n    { 2079, 0x9E3779B185EBCA8DULL, { 0xE2613ED5DDF8DBC2ULL, 0x32E344E4704E0958ULL } }, /* XSUM_XXH128_testdata[6239] */\n    { 2080, 0x0000000000000000ULL, { 0xC2A81FB74CEFD2BAULL, 0x09AEF3B8C069E0C8ULL } }, /* XSUM_XXH128_testdata[6240] */\n    { 2080, 0x000000009E3779B1ULL, { 0x9D5A93F2F2FBCF64ULL, 0x0C817549B6997824ULL } }, /* XSUM_XXH128_testdata[6241] */\n    { 2080, 0x9E3779B185EBCA8DULL, { 0x655245AC6C0DCDB3ULL, 0x2C769FFCC5E76F58ULL } }, /* XSUM_XXH128_testdata[6242] */\n    { 2081, 0x0000000000000000ULL, { 0x9962F6C0C859565CULL, 0x4B6690AB519BF258ULL } }, /* XSUM_XXH128_testdata[6243] */\n    { 2081, 0x000000009E3779B1ULL, { 0xD34C094BA014489CULL, 0x41E0E9BB9F99BA72ULL } }, /* XSUM_XXH128_testdata[6244] */\n    { 2081, 0x9E3779B185EBCA8DULL, { 0x9B9FB1A37896DF4DULL, 0x13CA3DA383343F08ULL } }, /* XSUM_XXH128_testdata[6245] */\n    { 2082, 0x0000000000000000ULL, { 0x525341066666BA5AULL, 0x74A481716E978388ULL } }, /* XSUM_XXH128_testdata[6246] */\n    { 2082, 0x000000009E3779B1ULL, { 0x3E428791DCE5D4D5ULL, 0xB2C6D6CD44D4B717ULL } }, /* XSUM_XXH128_testdata[6247] */\n    { 2082, 0x9E3779B185EBCA8DULL, { 0x3EFF2BB5FC448FE4ULL, 0x08ACB2F4418BD49EULL } }, /* XSUM_XXH128_testdata[6248] */\n    { 2083, 0x0000000000000000ULL, { 0x36B8B23A64BC0BFEULL, 0x57B10AD95C245172ULL } }, /* XSUM_XXH128_testdata[6249] */\n    { 2083, 0x000000009E3779B1ULL, { 0xE1E5C3B62265D4A8ULL, 0xECE52EDFC1E78578ULL } }, /* XSUM_XXH128_testdata[6250] */\n    { 2083, 0x9E3779B185EBCA8DULL, { 0xD61D1388A367C6FFULL, 0x2BFAA8764C2798A6ULL } }, /* XSUM_XXH128_testdata[6251] */\n    { 2084, 0x0000000000000000ULL, { 0x71CB8A8E594C1595ULL, 0x502FAB98DC15F41AULL } }, /* XSUM_XXH128_testdata[6252] */\n    { 2084, 0x000000009E3779B1ULL, { 0xC7A21B4E0821AE77ULL, 0x2A127C4990E003A4ULL } }, /* XSUM_XXH128_testdata[6253] */\n    { 2084, 0x9E3779B185EBCA8DULL, { 0x2A95CE9C889F2A77ULL, 0x77F87D8E2E9D8CCAULL } }, /* XSUM_XXH128_testdata[6254] */\n    { 2085, 0x0000000000000000ULL, { 0x12C8C4DC92EC613EULL, 0x6D709C61C4B22A28ULL } }, /* XSUM_XXH128_testdata[6255] */\n    { 2085, 0x000000009E3779B1ULL, { 0xB2A3A60BA50E694AULL, 0x9C19134F312D7D49ULL } }, /* XSUM_XXH128_testdata[6256] */\n    { 2085, 0x9E3779B185EBCA8DULL, { 0x94B61038AB08733EULL, 0x67D990E96275C43EULL } }, /* XSUM_XXH128_testdata[6257] */\n    { 2086, 0x0000000000000000ULL, { 0xB2DF30FBDB219EE1ULL, 0xAC9B06C21BC6E01CULL } }, /* XSUM_XXH128_testdata[6258] */\n    { 2086, 0x000000009E3779B1ULL, { 0x290071DC1DE222BFULL, 0xF9382C9B469350B1ULL } }, /* XSUM_XXH128_testdata[6259] */\n    { 2086, 0x9E3779B185EBCA8DULL, { 0x23C0CEFFC455E0D7ULL, 0xAF6A6FD4DEAC9B70ULL } }, /* XSUM_XXH128_testdata[6260] */\n    { 2087, 0x0000000000000000ULL, { 0xE5F168DADC1D1412ULL, 0xA4009F3079BA29DFULL } }, /* XSUM_XXH128_testdata[6261] */\n    { 2087, 0x000000009E3779B1ULL, { 0x21ECE46550D10E92ULL, 0x342212199D909B34ULL } }, /* XSUM_XXH128_testdata[6262] */\n    { 2087, 0x9E3779B185EBCA8DULL, { 0xB76FC418A3663ACCULL, 0x073A226497F81356ULL } }, /* XSUM_XXH128_testdata[6263] */\n    { 2088, 0x0000000000000000ULL, { 0x4605E9A359439A0AULL, 0xB552FA5FBC2008C3ULL } }, /* XSUM_XXH128_testdata[6264] */\n    { 2088, 0x000000009E3779B1ULL, { 0x44C9CA3AAD81DA45ULL, 0xCB913D9AC717DFCBULL } }, /* XSUM_XXH128_testdata[6265] */\n    { 2088, 0x9E3779B185EBCA8DULL, { 0xF5C043EDD0AAB1BFULL, 0x985478623A7F871AULL } }, /* XSUM_XXH128_testdata[6266] */\n    { 2089, 0x0000000000000000ULL, { 0xC975BD5F02A26C46ULL, 0x40780F08D7FE9F92ULL } }, /* XSUM_XXH128_testdata[6267] */\n    { 2089, 0x000000009E3779B1ULL, { 0x7965D386BFD80E68ULL, 0xCD56647C0850EC82ULL } }, /* XSUM_XXH128_testdata[6268] */\n    { 2089, 0x9E3779B185EBCA8DULL, { 0x71AB75BD28471867ULL, 0x06868420B97E0580ULL } }, /* XSUM_XXH128_testdata[6269] */\n    { 2090, 0x0000000000000000ULL, { 0x486A48B0AC95CEAEULL, 0x2D24404B834501C4ULL } }, /* XSUM_XXH128_testdata[6270] */\n    { 2090, 0x000000009E3779B1ULL, { 0x010FB8B9A3D74536ULL, 0x7F51788CFB5FDAADULL } }, /* XSUM_XXH128_testdata[6271] */\n    { 2090, 0x9E3779B185EBCA8DULL, { 0xA94D39ED402F7DD8ULL, 0xD1402F35B8D2FC13ULL } }, /* XSUM_XXH128_testdata[6272] */\n    { 2091, 0x0000000000000000ULL, { 0xF1374E8DDFF89DA9ULL, 0x9679298F00604BE9ULL } }, /* XSUM_XXH128_testdata[6273] */\n    { 2091, 0x000000009E3779B1ULL, { 0x3C0CB796310895C4ULL, 0xBCBF304A1D6F7265ULL } }, /* XSUM_XXH128_testdata[6274] */\n    { 2091, 0x9E3779B185EBCA8DULL, { 0x6E49515D91B82E7BULL, 0x667FDCF9CCBE590DULL } }, /* XSUM_XXH128_testdata[6275] */\n    { 2092, 0x0000000000000000ULL, { 0x455DD31697D63F7BULL, 0xB40DD7A24C8C15FFULL } }, /* XSUM_XXH128_testdata[6276] */\n    { 2092, 0x000000009E3779B1ULL, { 0xC7BE24FF6700E449ULL, 0xEC9DCD5700689611ULL } }, /* XSUM_XXH128_testdata[6277] */\n    { 2092, 0x9E3779B185EBCA8DULL, { 0xC56E1C2C10929BBEULL, 0x0C8EF3A8F918AF57ULL } }, /* XSUM_XXH128_testdata[6278] */\n    { 2093, 0x0000000000000000ULL, { 0x9E269F2E5C9FB3E6ULL, 0x21CDA711E6CCBB41ULL } }, /* XSUM_XXH128_testdata[6279] */\n    { 2093, 0x000000009E3779B1ULL, { 0xF04CC2A8212A0AD4ULL, 0x2840C434106E653EULL } }, /* XSUM_XXH128_testdata[6280] */\n    { 2093, 0x9E3779B185EBCA8DULL, { 0x24341F87A9B010C3ULL, 0x34C42EE414554421ULL } }, /* XSUM_XXH128_testdata[6281] */\n    { 2094, 0x0000000000000000ULL, { 0x4D9F684C2328F60FULL, 0xF06EAA76AB3AE7F1ULL } }, /* XSUM_XXH128_testdata[6282] */\n    { 2094, 0x000000009E3779B1ULL, { 0x4BB21115657C5461ULL, 0x9B8179AE9C893838ULL } }, /* XSUM_XXH128_testdata[6283] */\n    { 2094, 0x9E3779B185EBCA8DULL, { 0x8D5BA10F136BBBDEULL, 0x4833810FFB3B39C3ULL } }, /* XSUM_XXH128_testdata[6284] */\n    { 2095, 0x0000000000000000ULL, { 0xB4E9526C757FB3E0ULL, 0x0193E7409F7D1A02ULL } }, /* XSUM_XXH128_testdata[6285] */\n    { 2095, 0x000000009E3779B1ULL, { 0x4DF1B140534A685AULL, 0x954F98E3CCC6F0D2ULL } }, /* XSUM_XXH128_testdata[6286] */\n    { 2095, 0x9E3779B185EBCA8DULL, { 0x6704B0AA74D6E9D8ULL, 0xB63C9D56630CA76DULL } }, /* XSUM_XXH128_testdata[6287] */\n    { 2096, 0x0000000000000000ULL, { 0xDC98D78702F8D241ULL, 0xB8E7266DAF70CBADULL } }, /* XSUM_XXH128_testdata[6288] */\n    { 2096, 0x000000009E3779B1ULL, { 0x422722BF2D7F1DE8ULL, 0xEE0AAC0C3F0CD80CULL } }, /* XSUM_XXH128_testdata[6289] */\n    { 2096, 0x9E3779B185EBCA8DULL, { 0xC176C1D45D3D3F78ULL, 0x32EA2ED0BEA1641BULL } }, /* XSUM_XXH128_testdata[6290] */\n    { 2097, 0x0000000000000000ULL, { 0x3EB8B58346323505ULL, 0x9E20DCDE7F9C0346ULL } }, /* XSUM_XXH128_testdata[6291] */\n    { 2097, 0x000000009E3779B1ULL, { 0xDE3BEC79459729FAULL, 0x1041842AA6822484ULL } }, /* XSUM_XXH128_testdata[6292] */\n    { 2097, 0x9E3779B185EBCA8DULL, { 0x34C3281A05464634ULL, 0x54F6F9DE1372A643ULL } }, /* XSUM_XXH128_testdata[6293] */\n    { 2098, 0x0000000000000000ULL, { 0xD88C0787632D5D70ULL, 0xCC472361F253A745ULL } }, /* XSUM_XXH128_testdata[6294] */\n    { 2098, 0x000000009E3779B1ULL, { 0xE9F6427BB34C8241ULL, 0x0FF5290059F7F8A0ULL } }, /* XSUM_XXH128_testdata[6295] */\n    { 2098, 0x9E3779B185EBCA8DULL, { 0xDFE1DB342D29C290ULL, 0x77129E358E077407ULL } }, /* XSUM_XXH128_testdata[6296] */\n    { 2099, 0x0000000000000000ULL, { 0xC6B9D9B3FC9AC765ULL, 0xAD48AE0A0951DC52ULL } }, /* XSUM_XXH128_testdata[6297] */\n    { 2099, 0x000000009E3779B1ULL, { 0xA31129D68229F7D8ULL, 0x5F9F4B5F1E3A3BE4ULL } }, /* XSUM_XXH128_testdata[6298] */\n    { 2099, 0x9E3779B185EBCA8DULL, { 0x184F316843663974ULL, 0xEF4C13B1D2FDAD6EULL } }, /* XSUM_XXH128_testdata[6299] */\n    { 2100, 0x0000000000000000ULL, { 0xBE3D249D76B7F785ULL, 0xD0E46371EEF1591BULL } }, /* XSUM_XXH128_testdata[6300] */\n    { 2100, 0x000000009E3779B1ULL, { 0x76F61DFAB377E5FEULL, 0x35F17EB3AA751F66ULL } }, /* XSUM_XXH128_testdata[6301] */\n    { 2100, 0x9E3779B185EBCA8DULL, { 0x77EBCB5E10693AA4ULL, 0xA648DA7503EFCD40ULL } }, /* XSUM_XXH128_testdata[6302] */\n    { 2101, 0x0000000000000000ULL, { 0x581217AD4076A60DULL, 0x829CA9B6610B0B38ULL } }, /* XSUM_XXH128_testdata[6303] */\n    { 2101, 0x000000009E3779B1ULL, { 0xCAFD1EFDA5FC13B8ULL, 0xE12B5D339C882E2BULL } }, /* XSUM_XXH128_testdata[6304] */\n    { 2101, 0x9E3779B185EBCA8DULL, { 0xE0038FDEB381E113ULL, 0xD61DC7DCB117B32AULL } }, /* XSUM_XXH128_testdata[6305] */\n    { 2102, 0x0000000000000000ULL, { 0xF4892859B6CEA530ULL, 0x80D20DE65E2415C3ULL } }, /* XSUM_XXH128_testdata[6306] */\n    { 2102, 0x000000009E3779B1ULL, { 0xF965CC21B830F32CULL, 0xB4C6A780AD5B0783ULL } }, /* XSUM_XXH128_testdata[6307] */\n    { 2102, 0x9E3779B185EBCA8DULL, { 0x26585E897E7ED9D9ULL, 0x8F14A5730BA53167ULL } }, /* XSUM_XXH128_testdata[6308] */\n    { 2103, 0x0000000000000000ULL, { 0xBE7381B819FACD77ULL, 0x0A8BF256348B8C03ULL } }, /* XSUM_XXH128_testdata[6309] */\n    { 2103, 0x000000009E3779B1ULL, { 0x4885B51383BB2E56ULL, 0x94A1C8530746B126ULL } }, /* XSUM_XXH128_testdata[6310] */\n    { 2103, 0x9E3779B185EBCA8DULL, { 0x7BC39431F4923940ULL, 0xA3A50C5F33CECFCEULL } }, /* XSUM_XXH128_testdata[6311] */\n    { 2104, 0x0000000000000000ULL, { 0x818322F0EA0E23CBULL, 0x4C57ACE75FD09B4BULL } }, /* XSUM_XXH128_testdata[6312] */\n    { 2104, 0x000000009E3779B1ULL, { 0xBB0D3D016D5264BBULL, 0xE7E4BDFA83AB0939ULL } }, /* XSUM_XXH128_testdata[6313] */\n    { 2104, 0x9E3779B185EBCA8DULL, { 0xC8CF92ABAD383682ULL, 0x841171B5E9AFCB01ULL } }, /* XSUM_XXH128_testdata[6314] */\n    { 2105, 0x0000000000000000ULL, { 0xB39F7FE5BBEDC6F9ULL, 0xBB1361876F5C47E9ULL } }, /* XSUM_XXH128_testdata[6315] */\n    { 2105, 0x000000009E3779B1ULL, { 0x560B8284E49AB8F4ULL, 0xEAB769139A0D2F70ULL } }, /* XSUM_XXH128_testdata[6316] */\n    { 2105, 0x9E3779B185EBCA8DULL, { 0xCB42EB694CEED592ULL, 0x28A1EFB1DF1DEDA9ULL } }, /* XSUM_XXH128_testdata[6317] */\n    { 2106, 0x0000000000000000ULL, { 0x042E6EC5695BE98BULL, 0xF111DA96127135D8ULL } }, /* XSUM_XXH128_testdata[6318] */\n    { 2106, 0x000000009E3779B1ULL, { 0xD91C6EE3F4FCD278ULL, 0x8AE3E71C5E65C990ULL } }, /* XSUM_XXH128_testdata[6319] */\n    { 2106, 0x9E3779B185EBCA8DULL, { 0xA221F9494506A44EULL, 0x905B0FB412B2047EULL } }, /* XSUM_XXH128_testdata[6320] */\n    { 2107, 0x0000000000000000ULL, { 0xC0D47A01E5589883ULL, 0xE08744F9D6C1D532ULL } }, /* XSUM_XXH128_testdata[6321] */\n    { 2107, 0x000000009E3779B1ULL, { 0x5C7799DB544A053EULL, 0xA99682B0A0F90B39ULL } }, /* XSUM_XXH128_testdata[6322] */\n    { 2107, 0x9E3779B185EBCA8DULL, { 0x5FA98BEE4E230E1EULL, 0xE8DC000FEA0CCD6AULL } }, /* XSUM_XXH128_testdata[6323] */\n    { 2108, 0x0000000000000000ULL, { 0x9497E3F05B3CCAEDULL, 0xEB7CDC4E51F78BE5ULL } }, /* XSUM_XXH128_testdata[6324] */\n    { 2108, 0x000000009E3779B1ULL, { 0x80F500523AFE9B39ULL, 0xF6D5AF4B597477E9ULL } }, /* XSUM_XXH128_testdata[6325] */\n    { 2108, 0x9E3779B185EBCA8DULL, { 0xD58EA5004F550F86ULL, 0x3EDF1D210A69510BULL } }, /* XSUM_XXH128_testdata[6326] */\n    { 2109, 0x0000000000000000ULL, { 0xDA51073DBF6CD9A1ULL, 0x589FE43968B333B1ULL } }, /* XSUM_XXH128_testdata[6327] */\n    { 2109, 0x000000009E3779B1ULL, { 0x938F82C333005241ULL, 0x9B68A6C68156A2E3ULL } }, /* XSUM_XXH128_testdata[6328] */\n    { 2109, 0x9E3779B185EBCA8DULL, { 0x45BE1DFC68CD3B56ULL, 0xF67E3F3077394D26ULL } }, /* XSUM_XXH128_testdata[6329] */\n    { 2110, 0x0000000000000000ULL, { 0xD3E69C0BE984921DULL, 0x328DF0F8161B1607ULL } }, /* XSUM_XXH128_testdata[6330] */\n    { 2110, 0x000000009E3779B1ULL, { 0x2303AFEE736532CEULL, 0x740C41A326A38DC0ULL } }, /* XSUM_XXH128_testdata[6331] */\n    { 2110, 0x9E3779B185EBCA8DULL, { 0x88140AA8A0FCE957ULL, 0x91C2B6688A6A6A8EULL } }, /* XSUM_XXH128_testdata[6332] */\n    { 2111, 0x0000000000000000ULL, { 0x161BC831576C278AULL, 0xF8027C5D3F6DD639ULL } }, /* XSUM_XXH128_testdata[6333] */\n    { 2111, 0x000000009E3779B1ULL, { 0xFD671CD65ADF1E11ULL, 0x61AF147A079E51AEULL } }, /* XSUM_XXH128_testdata[6334] */\n    { 2111, 0x9E3779B185EBCA8DULL, { 0x7DF29981A9D61E52ULL, 0x2F5AB3DC3092374FULL } }, /* XSUM_XXH128_testdata[6335] */\n    { 2112, 0x0000000000000000ULL, { 0x7C33C86D9E6A8C39ULL, 0xA7761ECB840C30D0ULL } }, /* XSUM_XXH128_testdata[6336] */\n    { 2112, 0x000000009E3779B1ULL, { 0x07D112187F830175ULL, 0x756A7A6AF1570C1DULL } }, /* XSUM_XXH128_testdata[6337] */\n    { 2112, 0x9E3779B185EBCA8DULL, { 0x084352D520AF2E0CULL, 0xBF659D4C2D15F03EULL } }, /* XSUM_XXH128_testdata[6338] */\n    { 2113, 0x0000000000000000ULL, { 0x30A8AA601425D0BCULL, 0x607C5C2E55AC396AULL } }, /* XSUM_XXH128_testdata[6339] */\n    { 2113, 0x000000009E3779B1ULL, { 0xBAE6FAD6F1A45740ULL, 0xA7D0F67AC742EA19ULL } }, /* XSUM_XXH128_testdata[6340] */\n    { 2113, 0x9E3779B185EBCA8DULL, { 0x59803CBF83152382ULL, 0xE4A215508CFB625EULL } }, /* XSUM_XXH128_testdata[6341] */\n    { 2114, 0x0000000000000000ULL, { 0x7E7FDCCEB5A269A5ULL, 0xFC907AB502865671ULL } }, /* XSUM_XXH128_testdata[6342] */\n    { 2114, 0x000000009E3779B1ULL, { 0xB10F7A896ACA96CBULL, 0xF66231B19DFA7276ULL } }, /* XSUM_XXH128_testdata[6343] */\n    { 2114, 0x9E3779B185EBCA8DULL, { 0x337DE3C45901BC85ULL, 0xE486106CDA1EF632ULL } }, /* XSUM_XXH128_testdata[6344] */\n    { 2115, 0x0000000000000000ULL, { 0xE819B9E23816758CULL, 0x85FCDC33BB393DE0ULL } }, /* XSUM_XXH128_testdata[6345] */\n    { 2115, 0x000000009E3779B1ULL, { 0xB37BF62BEEA0D68FULL, 0x5B4106F87337415FULL } }, /* XSUM_XXH128_testdata[6346] */\n    { 2115, 0x9E3779B185EBCA8DULL, { 0xDD75D078BAEE864DULL, 0x2227B2485E310D6DULL } }, /* XSUM_XXH128_testdata[6347] */\n    { 2116, 0x0000000000000000ULL, { 0x0C443A18F53B58DEULL, 0x0FFAF56199A443A5ULL } }, /* XSUM_XXH128_testdata[6348] */\n    { 2116, 0x000000009E3779B1ULL, { 0x8B02317177C6B482ULL, 0x5A1818275CFA55A7ULL } }, /* XSUM_XXH128_testdata[6349] */\n    { 2116, 0x9E3779B185EBCA8DULL, { 0xDF99C6BF79C66AB8ULL, 0xFD46351FD813FB79ULL } }, /* XSUM_XXH128_testdata[6350] */\n    { 2117, 0x0000000000000000ULL, { 0xCD60C473A00CF1ABULL, 0xFFAB2FD307FAF5D4ULL } }, /* XSUM_XXH128_testdata[6351] */\n    { 2117, 0x000000009E3779B1ULL, { 0x6FA8524F2E1F55A1ULL, 0x0B30C45544D86FE1ULL } }, /* XSUM_XXH128_testdata[6352] */\n    { 2117, 0x9E3779B185EBCA8DULL, { 0xD00D04FBD50B0769ULL, 0x75A553C8B2E548FDULL } }, /* XSUM_XXH128_testdata[6353] */\n    { 2118, 0x0000000000000000ULL, { 0x3FA47D531B86C5A6ULL, 0x556B1861A9B7232EULL } }, /* XSUM_XXH128_testdata[6354] */\n    { 2118, 0x000000009E3779B1ULL, { 0xCE1B8DE13D9DE9D1ULL, 0xE1338801914E157DULL } }, /* XSUM_XXH128_testdata[6355] */\n    { 2118, 0x9E3779B185EBCA8DULL, { 0xF0CF23296153A098ULL, 0x6837261FDABCA4DBULL } }, /* XSUM_XXH128_testdata[6356] */\n    { 2119, 0x0000000000000000ULL, { 0x2B01DC788CB5E37AULL, 0xE7078364A0B6BB7AULL } }, /* XSUM_XXH128_testdata[6357] */\n    { 2119, 0x000000009E3779B1ULL, { 0x905E4816BA3D4736ULL, 0xFCC602CBA504F41EULL } }, /* XSUM_XXH128_testdata[6358] */\n    { 2119, 0x9E3779B185EBCA8DULL, { 0xE463ADDBA6510841ULL, 0x614F15FBB73E4604ULL } }, /* XSUM_XXH128_testdata[6359] */\n    { 2120, 0x0000000000000000ULL, { 0x04771E39BE145D9AULL, 0xE65E358830A35165ULL } }, /* XSUM_XXH128_testdata[6360] */\n    { 2120, 0x000000009E3779B1ULL, { 0xF7244B5296F66411ULL, 0xDEDA51C5AD3F0EB4ULL } }, /* XSUM_XXH128_testdata[6361] */\n    { 2120, 0x9E3779B185EBCA8DULL, { 0x751EC7E4FCAA6325ULL, 0x24DD03824C3FFC85ULL } }, /* XSUM_XXH128_testdata[6362] */\n    { 2121, 0x0000000000000000ULL, { 0xD633B712A74BE039ULL, 0x0FA3A58A264E124BULL } }, /* XSUM_XXH128_testdata[6363] */\n    { 2121, 0x000000009E3779B1ULL, { 0x5398B52F7BFD62EFULL, 0xCAC3A4787847025FULL } }, /* XSUM_XXH128_testdata[6364] */\n    { 2121, 0x9E3779B185EBCA8DULL, { 0xF9724759FA9525B6ULL, 0x3DF333608D92A321ULL } }, /* XSUM_XXH128_testdata[6365] */\n    { 2122, 0x0000000000000000ULL, { 0x24AE72CDA733DF48ULL, 0x24AF2FB7BAA1FAE7ULL } }, /* XSUM_XXH128_testdata[6366] */\n    { 2122, 0x000000009E3779B1ULL, { 0xBD9E4C0F0E00477BULL, 0xAEB4ECADFCE526B5ULL } }, /* XSUM_XXH128_testdata[6367] */\n    { 2122, 0x9E3779B185EBCA8DULL, { 0xBA2240309EC1C44CULL, 0x813A0ECA37B8C4FBULL } }, /* XSUM_XXH128_testdata[6368] */\n    { 2123, 0x0000000000000000ULL, { 0x47102F1ED6BB4FE4ULL, 0x7EC1E0FCB9FBF497ULL } }, /* XSUM_XXH128_testdata[6369] */\n    { 2123, 0x000000009E3779B1ULL, { 0xC9F43082B6565F0CULL, 0xAA198712D1B152B8ULL } }, /* XSUM_XXH128_testdata[6370] */\n    { 2123, 0x9E3779B185EBCA8DULL, { 0x20D846BBF8E4C6ABULL, 0x0AF388237653CE02ULL } }, /* XSUM_XXH128_testdata[6371] */\n    { 2124, 0x0000000000000000ULL, { 0x71CBB4B220C0FFCEULL, 0x0F7B71332BD8180BULL } }, /* XSUM_XXH128_testdata[6372] */\n    { 2124, 0x000000009E3779B1ULL, { 0x49F34CB69594C9B5ULL, 0xE8FB7D1AC755940FULL } }, /* XSUM_XXH128_testdata[6373] */\n    { 2124, 0x9E3779B185EBCA8DULL, { 0x1CEE7903F9FF9D6FULL, 0x0610FA83ADD0C69EULL } }, /* XSUM_XXH128_testdata[6374] */\n    { 2125, 0x0000000000000000ULL, { 0x85DF5C3938DF2DB0ULL, 0xBBA0467DDCCC8984ULL } }, /* XSUM_XXH128_testdata[6375] */\n    { 2125, 0x000000009E3779B1ULL, { 0x877373AD047F162CULL, 0x57B93E439AEFDA29ULL } }, /* XSUM_XXH128_testdata[6376] */\n    { 2125, 0x9E3779B185EBCA8DULL, { 0xB9AD29A35A707ABDULL, 0x9A6FDC625B43705FULL } }, /* XSUM_XXH128_testdata[6377] */\n    { 2126, 0x0000000000000000ULL, { 0x54B9B4C8D1D2F8E1ULL, 0x5503A60F716B4FB1ULL } }, /* XSUM_XXH128_testdata[6378] */\n    { 2126, 0x000000009E3779B1ULL, { 0xF545413B23429917ULL, 0xDC0F17B0D7EB5F88ULL } }, /* XSUM_XXH128_testdata[6379] */\n    { 2126, 0x9E3779B185EBCA8DULL, { 0x9C159E298C16AF55ULL, 0xFF80C91472FE519CULL } }, /* XSUM_XXH128_testdata[6380] */\n    { 2127, 0x0000000000000000ULL, { 0xC4DA29D22439D9AAULL, 0x3D2FA9070C194421ULL } }, /* XSUM_XXH128_testdata[6381] */\n    { 2127, 0x000000009E3779B1ULL, { 0x351FCC2B59FC001AULL, 0x5FC9B3FA8DF22161ULL } }, /* XSUM_XXH128_testdata[6382] */\n    { 2127, 0x9E3779B185EBCA8DULL, { 0xC77E30862645CE42ULL, 0x0670AAF4D15C4016ULL } }, /* XSUM_XXH128_testdata[6383] */\n    { 2128, 0x0000000000000000ULL, { 0xFAD97E0CDDA51E95ULL, 0xD263F3675B73D80DULL } }, /* XSUM_XXH128_testdata[6384] */\n    { 2128, 0x000000009E3779B1ULL, { 0xD350D4677D748CCCULL, 0xEA080481D2D13440ULL } }, /* XSUM_XXH128_testdata[6385] */\n    { 2128, 0x9E3779B185EBCA8DULL, { 0xB9FC31CE38AFED3FULL, 0xFC6AB110B8E8407BULL } }, /* XSUM_XXH128_testdata[6386] */\n    { 2129, 0x0000000000000000ULL, { 0x5F33D37689AAAB61ULL, 0xB7E5CD69BBD2FB1EULL } }, /* XSUM_XXH128_testdata[6387] */\n    { 2129, 0x000000009E3779B1ULL, { 0x373141748917AA93ULL, 0x2F62DFC83B064D15ULL } }, /* XSUM_XXH128_testdata[6388] */\n    { 2129, 0x9E3779B185EBCA8DULL, { 0xD4AF6B7AE8C90ABBULL, 0x21735F238987442AULL } }, /* XSUM_XXH128_testdata[6389] */\n    { 2130, 0x0000000000000000ULL, { 0x4A6C83F4986D25ABULL, 0x85BBAC402C299227ULL } }, /* XSUM_XXH128_testdata[6390] */\n    { 2130, 0x000000009E3779B1ULL, { 0x2B510962653BC1B1ULL, 0x67EC7C9945374FE9ULL } }, /* XSUM_XXH128_testdata[6391] */\n    { 2130, 0x9E3779B185EBCA8DULL, { 0xDA5B988675FEDBDCULL, 0xB7E4003FB4DD01F4ULL } }, /* XSUM_XXH128_testdata[6392] */\n    { 2131, 0x0000000000000000ULL, { 0xB2FA919BEF281372ULL, 0x5FC157CE182E9864ULL } }, /* XSUM_XXH128_testdata[6393] */\n    { 2131, 0x000000009E3779B1ULL, { 0x58E8B6A70F6DC071ULL, 0x0E6D5510C52BAEBBULL } }, /* XSUM_XXH128_testdata[6394] */\n    { 2131, 0x9E3779B185EBCA8DULL, { 0x68F128D43DE48A69ULL, 0x0110F6770ABAF523ULL } }, /* XSUM_XXH128_testdata[6395] */\n    { 2132, 0x0000000000000000ULL, { 0x8CA360DC297568D8ULL, 0x6DA9168F8F44E05CULL } }, /* XSUM_XXH128_testdata[6396] */\n    { 2132, 0x000000009E3779B1ULL, { 0x63A141FBE45BA8EDULL, 0x0232873D1A6BFEC0ULL } }, /* XSUM_XXH128_testdata[6397] */\n    { 2132, 0x9E3779B185EBCA8DULL, { 0xD9EB5BFF99512869ULL, 0x471751DEE5A0D91DULL } }, /* XSUM_XXH128_testdata[6398] */\n    { 2133, 0x0000000000000000ULL, { 0xCFCEFDAEACFA0B96ULL, 0x5C7E638EC0C4A244ULL } }, /* XSUM_XXH128_testdata[6399] */\n    { 2133, 0x000000009E3779B1ULL, { 0x034EDDC0C258F077ULL, 0x241705C904858B7DULL } }, /* XSUM_XXH128_testdata[6400] */\n    { 2133, 0x9E3779B185EBCA8DULL, { 0x1DB7821732C9B28DULL, 0x1DEE44CF80D064D0ULL } }, /* XSUM_XXH128_testdata[6401] */\n    { 2134, 0x0000000000000000ULL, { 0xB2CED2B335371695ULL, 0xE48978C83FBAD734ULL } }, /* XSUM_XXH128_testdata[6402] */\n    { 2134, 0x000000009E3779B1ULL, { 0x4BA9D20382EFB7FCULL, 0x9B30935AF60CBD36ULL } }, /* XSUM_XXH128_testdata[6403] */\n    { 2134, 0x9E3779B185EBCA8DULL, { 0x0D4487991C690B4CULL, 0x784BC77203D01BDAULL } }, /* XSUM_XXH128_testdata[6404] */\n    { 2135, 0x0000000000000000ULL, { 0x10D459B4E7BB16F5ULL, 0xB2EDF8F4864AE131ULL } }, /* XSUM_XXH128_testdata[6405] */\n    { 2135, 0x000000009E3779B1ULL, { 0xA0E747B3969469A0ULL, 0x838BEFCDB6F74902ULL } }, /* XSUM_XXH128_testdata[6406] */\n    { 2135, 0x9E3779B185EBCA8DULL, { 0x474A36D98F36F4A0ULL, 0xFA28CE4D8610F5C0ULL } }, /* XSUM_XXH128_testdata[6407] */\n    { 2136, 0x0000000000000000ULL, { 0x259F3610C2E2A640ULL, 0x41B55009DF61E8ACULL } }, /* XSUM_XXH128_testdata[6408] */\n    { 2136, 0x000000009E3779B1ULL, { 0xD7225F8CA97DEE61ULL, 0xD7472077EBF24F2FULL } }, /* XSUM_XXH128_testdata[6409] */\n    { 2136, 0x9E3779B185EBCA8DULL, { 0x9131CCB2D652847EULL, 0x96CF2282C2D696D1ULL } }, /* XSUM_XXH128_testdata[6410] */\n    { 2137, 0x0000000000000000ULL, { 0xF6E0287F54678C67ULL, 0xFCA49B026C7E7498ULL } }, /* XSUM_XXH128_testdata[6411] */\n    { 2137, 0x000000009E3779B1ULL, { 0xEAC83C203F4F4C54ULL, 0x39E85EB13F4B4409ULL } }, /* XSUM_XXH128_testdata[6412] */\n    { 2137, 0x9E3779B185EBCA8DULL, { 0x34202D0AD2030DF8ULL, 0x4647AE0778CCD79BULL } }, /* XSUM_XXH128_testdata[6413] */\n    { 2138, 0x0000000000000000ULL, { 0x20B9BD1B573C9654ULL, 0x6056811F8F029144ULL } }, /* XSUM_XXH128_testdata[6414] */\n    { 2138, 0x000000009E3779B1ULL, { 0x1C04522ACDD4FD2BULL, 0x918B63F7B295131FULL } }, /* XSUM_XXH128_testdata[6415] */\n    { 2138, 0x9E3779B185EBCA8DULL, { 0x7B66F99550C2A5C0ULL, 0xB31E5104B70E74D2ULL } }, /* XSUM_XXH128_testdata[6416] */\n    { 2139, 0x0000000000000000ULL, { 0xE7ADB21AC122B16CULL, 0x4BEDF27E886AF793ULL } }, /* XSUM_XXH128_testdata[6417] */\n    { 2139, 0x000000009E3779B1ULL, { 0x7362055B9C701279ULL, 0xF63C58B5EE922654ULL } }, /* XSUM_XXH128_testdata[6418] */\n    { 2139, 0x9E3779B185EBCA8DULL, { 0xCC00DD72799C448CULL, 0x0184BBF0D737BF55ULL } }, /* XSUM_XXH128_testdata[6419] */\n    { 2140, 0x0000000000000000ULL, { 0x8E95E0CF5838AE78ULL, 0x2E445618F66FA884ULL } }, /* XSUM_XXH128_testdata[6420] */\n    { 2140, 0x000000009E3779B1ULL, { 0xF9034A7E5D4DB369ULL, 0x0E559665BAC30636ULL } }, /* XSUM_XXH128_testdata[6421] */\n    { 2140, 0x9E3779B185EBCA8DULL, { 0x40F96A9363A78DD4ULL, 0xC0BFE9A20EFFD41EULL } }, /* XSUM_XXH128_testdata[6422] */\n    { 2141, 0x0000000000000000ULL, { 0x714ED906850A3420ULL, 0xF1E424B71B2F5176ULL } }, /* XSUM_XXH128_testdata[6423] */\n    { 2141, 0x000000009E3779B1ULL, { 0xD732147E1C54EAEDULL, 0x9E1DE1DB4F8FC67BULL } }, /* XSUM_XXH128_testdata[6424] */\n    { 2141, 0x9E3779B185EBCA8DULL, { 0xFBF9450C1D1078C0ULL, 0xCC4435C92F978172ULL } }, /* XSUM_XXH128_testdata[6425] */\n    { 2142, 0x0000000000000000ULL, { 0xD816E5FE3A8D6997ULL, 0x4E55AB3CE655100AULL } }, /* XSUM_XXH128_testdata[6426] */\n    { 2142, 0x000000009E3779B1ULL, { 0xBC0C5CA38AE755D0ULL, 0x331C26CB20D8924FULL } }, /* XSUM_XXH128_testdata[6427] */\n    { 2142, 0x9E3779B185EBCA8DULL, { 0x80ACC2D477815904ULL, 0xE555684EA2F5B33AULL } }, /* XSUM_XXH128_testdata[6428] */\n    { 2143, 0x0000000000000000ULL, { 0xD9319C8C99EDEDEFULL, 0xBFA49ACD5C316209ULL } }, /* XSUM_XXH128_testdata[6429] */\n    { 2143, 0x000000009E3779B1ULL, { 0xF3BBE629FDCBD407ULL, 0x858DF31F3E43A4DEULL } }, /* XSUM_XXH128_testdata[6430] */\n    { 2143, 0x9E3779B185EBCA8DULL, { 0xA6569B7945AA5DDCULL, 0xB8106E84F1AF0FE8ULL } }, /* XSUM_XXH128_testdata[6431] */\n    { 2144, 0x0000000000000000ULL, { 0x9CAD5B2A41F4BC3DULL, 0xE1804D575AC6B459ULL } }, /* XSUM_XXH128_testdata[6432] */\n    { 2144, 0x000000009E3779B1ULL, { 0xAB3EC2A3F5726660ULL, 0xEFA0A6FC6AAC9DA8ULL } }, /* XSUM_XXH128_testdata[6433] */\n    { 2144, 0x9E3779B185EBCA8DULL, { 0x61447524BEA2F61CULL, 0xF8E54D3E2B9240C9ULL } }, /* XSUM_XXH128_testdata[6434] */\n    { 2145, 0x0000000000000000ULL, { 0x334D53022734D39BULL, 0xC015225AF1E73399ULL } }, /* XSUM_XXH128_testdata[6435] */\n    { 2145, 0x000000009E3779B1ULL, { 0x5AA6C9E51FD533B0ULL, 0x3081056E06290603ULL } }, /* XSUM_XXH128_testdata[6436] */\n    { 2145, 0x9E3779B185EBCA8DULL, { 0x8025C93720D8B0B4ULL, 0x2C117285DACA5FC2ULL } }, /* XSUM_XXH128_testdata[6437] */\n    { 2146, 0x0000000000000000ULL, { 0xA72ED4637049BF03ULL, 0xF9F116E67F871C03ULL } }, /* XSUM_XXH128_testdata[6438] */\n    { 2146, 0x000000009E3779B1ULL, { 0xF773523271108893ULL, 0x161CA9847E922231ULL } }, /* XSUM_XXH128_testdata[6439] */\n    { 2146, 0x9E3779B185EBCA8DULL, { 0x9A059D5FC680F3D5ULL, 0xD1843CAA963421F5ULL } }, /* XSUM_XXH128_testdata[6440] */\n    { 2147, 0x0000000000000000ULL, { 0x410742B45CC91D39ULL, 0x8D20383C8868B763ULL } }, /* XSUM_XXH128_testdata[6441] */\n    { 2147, 0x000000009E3779B1ULL, { 0x4B3D2D02C9436571ULL, 0xC88DF40BB17E20FDULL } }, /* XSUM_XXH128_testdata[6442] */\n    { 2147, 0x9E3779B185EBCA8DULL, { 0x9F357FDE2081FEDCULL, 0x6A46B2FB3EC4DA59ULL } }, /* XSUM_XXH128_testdata[6443] */\n    { 2148, 0x0000000000000000ULL, { 0x2793899CDB4D8987ULL, 0x6C14FFF2D048A9CBULL } }, /* XSUM_XXH128_testdata[6444] */\n    { 2148, 0x000000009E3779B1ULL, { 0x766A2E9494D815ECULL, 0x7F17343A6FA480C5ULL } }, /* XSUM_XXH128_testdata[6445] */\n    { 2148, 0x9E3779B185EBCA8DULL, { 0xEEE157D27C8FE443ULL, 0xAC9417F0EAD539C7ULL } }, /* XSUM_XXH128_testdata[6446] */\n    { 2149, 0x0000000000000000ULL, { 0x2B4C46687682EBC1ULL, 0xF113C61C2A275465ULL } }, /* XSUM_XXH128_testdata[6447] */\n    { 2149, 0x000000009E3779B1ULL, { 0x51C21A9F2B19CF61ULL, 0x6285CC63008EC58CULL } }, /* XSUM_XXH128_testdata[6448] */\n    { 2149, 0x9E3779B185EBCA8DULL, { 0x7F3359436EA05077ULL, 0xC6D62E69ADF193D6ULL } }, /* XSUM_XXH128_testdata[6449] */\n    { 2150, 0x0000000000000000ULL, { 0xE3D5AA26C630C09CULL, 0xFB8266D0E51C66C2ULL } }, /* XSUM_XXH128_testdata[6450] */\n    { 2150, 0x000000009E3779B1ULL, { 0xF8B31424BF6558E8ULL, 0x7483C0F42E8F2630ULL } }, /* XSUM_XXH128_testdata[6451] */\n    { 2150, 0x9E3779B185EBCA8DULL, { 0x2A28BD92C2D4C989ULL, 0xF7A7140647EDB917ULL } }, /* XSUM_XXH128_testdata[6452] */\n    { 2151, 0x0000000000000000ULL, { 0x0BB6A9EE880F6738ULL, 0xC2782F6BD49B09F2ULL } }, /* XSUM_XXH128_testdata[6453] */\n    { 2151, 0x000000009E3779B1ULL, { 0xBD7257FE653811E4ULL, 0x3630159BA85170FFULL } }, /* XSUM_XXH128_testdata[6454] */\n    { 2151, 0x9E3779B185EBCA8DULL, { 0x3A86A292CE8A02F5ULL, 0x0C973A83CEBFE777ULL } }, /* XSUM_XXH128_testdata[6455] */\n    { 2152, 0x0000000000000000ULL, { 0xAB3F3D80E2CF4EC4ULL, 0x857586796A97F0B6ULL } }, /* XSUM_XXH128_testdata[6456] */\n    { 2152, 0x000000009E3779B1ULL, { 0x887995FCA0AFBDD3ULL, 0x53227557D1292345ULL } }, /* XSUM_XXH128_testdata[6457] */\n    { 2152, 0x9E3779B185EBCA8DULL, { 0xE9674006478DFD18ULL, 0x16E5D60B97B82DB8ULL } }, /* XSUM_XXH128_testdata[6458] */\n    { 2153, 0x0000000000000000ULL, { 0x18B3B66AD0EA2DA8ULL, 0xD9457F88CB93307FULL } }, /* XSUM_XXH128_testdata[6459] */\n    { 2153, 0x000000009E3779B1ULL, { 0xB4ABED08EC4722ABULL, 0x4EEFE733EB8EB1EBULL } }, /* XSUM_XXH128_testdata[6460] */\n    { 2153, 0x9E3779B185EBCA8DULL, { 0x8BAF8A5439623563ULL, 0x703A223B1FFA98F8ULL } }, /* XSUM_XXH128_testdata[6461] */\n    { 2154, 0x0000000000000000ULL, { 0x3F5F7F0DE2DAE083ULL, 0x5FD8CCF573C89755ULL } }, /* XSUM_XXH128_testdata[6462] */\n    { 2154, 0x000000009E3779B1ULL, { 0xB93ACC8164174AB0ULL, 0x1B192FE471F719D4ULL } }, /* XSUM_XXH128_testdata[6463] */\n    { 2154, 0x9E3779B185EBCA8DULL, { 0x1A757E35E405E699ULL, 0x3A4F7CA7984CF609ULL } }, /* XSUM_XXH128_testdata[6464] */\n    { 2155, 0x0000000000000000ULL, { 0x0E026BA8C61DF56AULL, 0x6B2618D44F7686E0ULL } }, /* XSUM_XXH128_testdata[6465] */\n    { 2155, 0x000000009E3779B1ULL, { 0x480E24762A927885ULL, 0xAA40470BBDEDB365ULL } }, /* XSUM_XXH128_testdata[6466] */\n    { 2155, 0x9E3779B185EBCA8DULL, { 0x471C27F9B37D6851ULL, 0x9B4D5166BA153653ULL } }, /* XSUM_XXH128_testdata[6467] */\n    { 2156, 0x0000000000000000ULL, { 0x573B4C99862191A1ULL, 0x90DD85B21211DC3CULL } }, /* XSUM_XXH128_testdata[6468] */\n    { 2156, 0x000000009E3779B1ULL, { 0xC4993C7B179218ADULL, 0xB17C7A5D81FB10DCULL } }, /* XSUM_XXH128_testdata[6469] */\n    { 2156, 0x9E3779B185EBCA8DULL, { 0xDF061BCC7759C1E5ULL, 0xB361380FF71DE2D6ULL } }, /* XSUM_XXH128_testdata[6470] */\n    { 2157, 0x0000000000000000ULL, { 0x8E3349E34BBABB51ULL, 0xA9E283094D4A3209ULL } }, /* XSUM_XXH128_testdata[6471] */\n    { 2157, 0x000000009E3779B1ULL, { 0x648E55E054AD14E0ULL, 0x634DB175DE73F924ULL } }, /* XSUM_XXH128_testdata[6472] */\n    { 2157, 0x9E3779B185EBCA8DULL, { 0xE9CB28FA4F2B8F86ULL, 0xAC40112057CD8D39ULL } }, /* XSUM_XXH128_testdata[6473] */\n    { 2158, 0x0000000000000000ULL, { 0x1DE9A6E944662A42ULL, 0x142EE51D339F1885ULL } }, /* XSUM_XXH128_testdata[6474] */\n    { 2158, 0x000000009E3779B1ULL, { 0xFAF72ED80B9F7486ULL, 0x74FB1C7B41723778ULL } }, /* XSUM_XXH128_testdata[6475] */\n    { 2158, 0x9E3779B185EBCA8DULL, { 0x31415F3C7C9E2538ULL, 0xE1E1143F4E70492DULL } }, /* XSUM_XXH128_testdata[6476] */\n    { 2159, 0x0000000000000000ULL, { 0x3B2A7FA55BC6652BULL, 0x665A26B188BA3134ULL } }, /* XSUM_XXH128_testdata[6477] */\n    { 2159, 0x000000009E3779B1ULL, { 0xEB8BC873B34D7460ULL, 0x795F3AC8E8E9E818ULL } }, /* XSUM_XXH128_testdata[6478] */\n    { 2159, 0x9E3779B185EBCA8DULL, { 0xBA13B27EF111BD0BULL, 0x70F9FD7B3301CF54ULL } }, /* XSUM_XXH128_testdata[6479] */\n    { 2160, 0x0000000000000000ULL, { 0x95A2C385B4C5DF62ULL, 0x29A32CDE85A1F315ULL } }, /* XSUM_XXH128_testdata[6480] */\n    { 2160, 0x000000009E3779B1ULL, { 0x171EDEDF43115C05ULL, 0x55F875190A1669D5ULL } }, /* XSUM_XXH128_testdata[6481] */\n    { 2160, 0x9E3779B185EBCA8DULL, { 0xE8A2054945537497ULL, 0x2C58FEB713373D62ULL } }, /* XSUM_XXH128_testdata[6482] */\n    { 2161, 0x0000000000000000ULL, { 0xB6D672FBF2733519ULL, 0x3EC4CD3E90B677C6ULL } }, /* XSUM_XXH128_testdata[6483] */\n    { 2161, 0x000000009E3779B1ULL, { 0x26E73AC2F852BEE6ULL, 0x083BE962B9126137ULL } }, /* XSUM_XXH128_testdata[6484] */\n    { 2161, 0x9E3779B185EBCA8DULL, { 0xC43BFCD27780D6F5ULL, 0x5C008F1F644B1E6EULL } }, /* XSUM_XXH128_testdata[6485] */\n    { 2162, 0x0000000000000000ULL, { 0x5E14EF81BEAE2696ULL, 0x56FA57C87BB314E4ULL } }, /* XSUM_XXH128_testdata[6486] */\n    { 2162, 0x000000009E3779B1ULL, { 0xB92DD93813C41E6FULL, 0xD971B212B5C0C7BAULL } }, /* XSUM_XXH128_testdata[6487] */\n    { 2162, 0x9E3779B185EBCA8DULL, { 0x04CB1436467C4B23ULL, 0xB3833ACF460772F3ULL } }, /* XSUM_XXH128_testdata[6488] */\n    { 2163, 0x0000000000000000ULL, { 0xD105155AA83A2BCAULL, 0x7CE1349B7B5FA631ULL } }, /* XSUM_XXH128_testdata[6489] */\n    { 2163, 0x000000009E3779B1ULL, { 0xF668197296D44DAAULL, 0x34C169759057D91DULL } }, /* XSUM_XXH128_testdata[6490] */\n    { 2163, 0x9E3779B185EBCA8DULL, { 0x54952BBB7A3FAEBAULL, 0x5641E174B11CE42CULL } }, /* XSUM_XXH128_testdata[6491] */\n    { 2164, 0x0000000000000000ULL, { 0x7B1F07253D3C8CF3ULL, 0xC31277302E30F749ULL } }, /* XSUM_XXH128_testdata[6492] */\n    { 2164, 0x000000009E3779B1ULL, { 0x71612B354D327BBAULL, 0x27A136D2CE9C8C20ULL } }, /* XSUM_XXH128_testdata[6493] */\n    { 2164, 0x9E3779B185EBCA8DULL, { 0x9484396B41B15FA8ULL, 0xF0F847CD13DB5502ULL } }, /* XSUM_XXH128_testdata[6494] */\n    { 2165, 0x0000000000000000ULL, { 0x93F755CFA42D919DULL, 0x656FBD47E1CD5D79ULL } }, /* XSUM_XXH128_testdata[6495] */\n    { 2165, 0x000000009E3779B1ULL, { 0x13BF007E44295B60ULL, 0x25CF5F4AF394153BULL } }, /* XSUM_XXH128_testdata[6496] */\n    { 2165, 0x9E3779B185EBCA8DULL, { 0x2D7EED0342EB2799ULL, 0x244F8D761D518207ULL } }, /* XSUM_XXH128_testdata[6497] */\n    { 2166, 0x0000000000000000ULL, { 0x85298A8704907A54ULL, 0xFF65D542DE17F191ULL } }, /* XSUM_XXH128_testdata[6498] */\n    { 2166, 0x000000009E3779B1ULL, { 0x16E979ACE231E4B7ULL, 0x97B5C1A9A85D4747ULL } }, /* XSUM_XXH128_testdata[6499] */\n    { 2166, 0x9E3779B185EBCA8DULL, { 0xA751C559BA4417A5ULL, 0xFC9941B8392D1C63ULL } }, /* XSUM_XXH128_testdata[6500] */\n    { 2167, 0x0000000000000000ULL, { 0xE90C580C48DD9944ULL, 0x77D85ECB6F95F9CCULL } }, /* XSUM_XXH128_testdata[6501] */\n    { 2167, 0x000000009E3779B1ULL, { 0x26F776E414A3F261ULL, 0x3898DE724F764A40ULL } }, /* XSUM_XXH128_testdata[6502] */\n    { 2167, 0x9E3779B185EBCA8DULL, { 0x69C8C5584B02DFD6ULL, 0x922826B9F7CAAFABULL } }, /* XSUM_XXH128_testdata[6503] */\n    { 2168, 0x0000000000000000ULL, { 0x9C64AFEB984B1FFDULL, 0x41B15639CE5C6559ULL } }, /* XSUM_XXH128_testdata[6504] */\n    { 2168, 0x000000009E3779B1ULL, { 0xD243B0CDC50444CDULL, 0x29C639DC7A184E4AULL } }, /* XSUM_XXH128_testdata[6505] */\n    { 2168, 0x9E3779B185EBCA8DULL, { 0x1304DF7E40B05E96ULL, 0xF534E415212740ABULL } }, /* XSUM_XXH128_testdata[6506] */\n    { 2169, 0x0000000000000000ULL, { 0x92CDC29C3D92503CULL, 0xEEF21360598C98DAULL } }, /* XSUM_XXH128_testdata[6507] */\n    { 2169, 0x000000009E3779B1ULL, { 0x33A354EC02ED1735ULL, 0xDDFA424814C8F224ULL } }, /* XSUM_XXH128_testdata[6508] */\n    { 2169, 0x9E3779B185EBCA8DULL, { 0x729B2A3E789A550CULL, 0x808418C1B0542FA4ULL } }, /* XSUM_XXH128_testdata[6509] */\n    { 2170, 0x0000000000000000ULL, { 0x83BDFD869BAD1F44ULL, 0x56171649E990549CULL } }, /* XSUM_XXH128_testdata[6510] */\n    { 2170, 0x000000009E3779B1ULL, { 0xA35325517CB19F9BULL, 0xC47018021BB9161BULL } }, /* XSUM_XXH128_testdata[6511] */\n    { 2170, 0x9E3779B185EBCA8DULL, { 0x89E2B8D5F514680FULL, 0xF9C58B91BA5FD880ULL } }, /* XSUM_XXH128_testdata[6512] */\n    { 2171, 0x0000000000000000ULL, { 0x50D5661F7461E211ULL, 0x570A0E0BF4E4D905ULL } }, /* XSUM_XXH128_testdata[6513] */\n    { 2171, 0x000000009E3779B1ULL, { 0x36DBCBB11ACDA971ULL, 0x4ECC82543AC3929AULL } }, /* XSUM_XXH128_testdata[6514] */\n    { 2171, 0x9E3779B185EBCA8DULL, { 0x6AD13DDD0B545A8FULL, 0x30D67A31490170E3ULL } }, /* XSUM_XXH128_testdata[6515] */\n    { 2172, 0x0000000000000000ULL, { 0x6AF342AE4840FC12ULL, 0x5947596EC1540F75ULL } }, /* XSUM_XXH128_testdata[6516] */\n    { 2172, 0x000000009E3779B1ULL, { 0x898548F2CF59D2DDULL, 0x96B533F6C78E9EFFULL } }, /* XSUM_XXH128_testdata[6517] */\n    { 2172, 0x9E3779B185EBCA8DULL, { 0x0E644A6A1D322111ULL, 0x1850CF42D2BC3120ULL } }, /* XSUM_XXH128_testdata[6518] */\n    { 2173, 0x0000000000000000ULL, { 0x29614FF197A1CEC8ULL, 0x0AC804C65FF2A17BULL } }, /* XSUM_XXH128_testdata[6519] */\n    { 2173, 0x000000009E3779B1ULL, { 0x1B1ED18802D65964ULL, 0x89497C3BC030EDF7ULL } }, /* XSUM_XXH128_testdata[6520] */\n    { 2173, 0x9E3779B185EBCA8DULL, { 0x34319655235E1DF9ULL, 0x00B1FFCAC08FCBF5ULL } }, /* XSUM_XXH128_testdata[6521] */\n    { 2174, 0x0000000000000000ULL, { 0x5851086F05ED5A93ULL, 0xEEEE564CA0825CF2ULL } }, /* XSUM_XXH128_testdata[6522] */\n    { 2174, 0x000000009E3779B1ULL, { 0x5B0F053BA1E3451DULL, 0x367BF0C3DA3C50BDULL } }, /* XSUM_XXH128_testdata[6523] */\n    { 2174, 0x9E3779B185EBCA8DULL, { 0x789E2E239B0D5889ULL, 0x655E6CC2C1EEABEFULL } }, /* XSUM_XXH128_testdata[6524] */\n    { 2175, 0x0000000000000000ULL, { 0x50D01E3DB2EEB81BULL, 0x47A2D8A7E2611B9FULL } }, /* XSUM_XXH128_testdata[6525] */\n    { 2175, 0x000000009E3779B1ULL, { 0xEA44797867CFD2A6ULL, 0xC84A93CD95662242ULL } }, /* XSUM_XXH128_testdata[6526] */\n    { 2175, 0x9E3779B185EBCA8DULL, { 0x11B67E942D0D7E67ULL, 0x9E41FEBE2AA48EFBULL } }, /* XSUM_XXH128_testdata[6527] */\n    { 2176, 0x0000000000000000ULL, { 0x29D2205BAFBD456BULL, 0xF3A31766DFFBBD9AULL } }, /* XSUM_XXH128_testdata[6528] */\n    { 2176, 0x000000009E3779B1ULL, { 0xA30C678B0034A2E6ULL, 0xA92240BD750B5D84ULL } }, /* XSUM_XXH128_testdata[6529] */\n    { 2176, 0x9E3779B185EBCA8DULL, { 0xFB7B4655AA6E39C8ULL, 0x33DD3EF1A331627DULL } }, /* XSUM_XXH128_testdata[6530] */\n    { 2177, 0x0000000000000000ULL, { 0xA283CA0E29DC4F25ULL, 0x3322FBFE762FB470ULL } }, /* XSUM_XXH128_testdata[6531] */\n    { 2177, 0x000000009E3779B1ULL, { 0x35B57E7E59E1CC32ULL, 0x8A23FF00681BB6B3ULL } }, /* XSUM_XXH128_testdata[6532] */\n    { 2177, 0x9E3779B185EBCA8DULL, { 0x45FC46C710C757C1ULL, 0x5C7A1FD14BEB778AULL } }, /* XSUM_XXH128_testdata[6533] */\n    { 2178, 0x0000000000000000ULL, { 0xEE0C669CCC24E35BULL, 0xF5744A8AA07BB926ULL } }, /* XSUM_XXH128_testdata[6534] */\n    { 2178, 0x000000009E3779B1ULL, { 0x123132F829318FB1ULL, 0xC9F84BE13531175BULL } }, /* XSUM_XXH128_testdata[6535] */\n    { 2178, 0x9E3779B185EBCA8DULL, { 0x6616E48AFBBE6B19ULL, 0x4BE1471BCC52B054ULL } }, /* XSUM_XXH128_testdata[6536] */\n    { 2179, 0x0000000000000000ULL, { 0xC22CBE7E53601416ULL, 0x32CC9B560B4F1961ULL } }, /* XSUM_XXH128_testdata[6537] */\n    { 2179, 0x000000009E3779B1ULL, { 0x007853C806BAF5D9ULL, 0x3EB71BA86E555DF3ULL } }, /* XSUM_XXH128_testdata[6538] */\n    { 2179, 0x9E3779B185EBCA8DULL, { 0xAC82506CCE12F79AULL, 0x660B0AFF572168E6ULL } }, /* XSUM_XXH128_testdata[6539] */\n    { 2180, 0x0000000000000000ULL, { 0xD9E8B2340AD0AE45ULL, 0x4DA01581897AAF6EULL } }, /* XSUM_XXH128_testdata[6540] */\n    { 2180, 0x000000009E3779B1ULL, { 0xC1F2E97EC8AF284EULL, 0xA94A98328DE94792ULL } }, /* XSUM_XXH128_testdata[6541] */\n    { 2180, 0x9E3779B185EBCA8DULL, { 0xE9E8841DDA45B168ULL, 0xC45A2AF2AB2943E5ULL } }, /* XSUM_XXH128_testdata[6542] */\n    { 2181, 0x0000000000000000ULL, { 0x9715E4F64F6C87A7ULL, 0xB4F76F60E6AFC825ULL } }, /* XSUM_XXH128_testdata[6543] */\n    { 2181, 0x000000009E3779B1ULL, { 0x177AADCF413FE7EBULL, 0x084E0A68269FFAF6ULL } }, /* XSUM_XXH128_testdata[6544] */\n    { 2181, 0x9E3779B185EBCA8DULL, { 0xB5DF3C559501A8C0ULL, 0x5D8D1EB728387353ULL } }, /* XSUM_XXH128_testdata[6545] */\n    { 2182, 0x0000000000000000ULL, { 0x8037071E726FFCF6ULL, 0xA39A31DE31EB2C63ULL } }, /* XSUM_XXH128_testdata[6546] */\n    { 2182, 0x000000009E3779B1ULL, { 0x80F81DB5587DD2A8ULL, 0xA901883A3CF08141ULL } }, /* XSUM_XXH128_testdata[6547] */\n    { 2182, 0x9E3779B185EBCA8DULL, { 0xE0DF7D2037EA35CDULL, 0x114A8B4C1F551264ULL } }, /* XSUM_XXH128_testdata[6548] */\n    { 2183, 0x0000000000000000ULL, { 0xEFF8CC0E3F0641E4ULL, 0xDBB8E7254FA40329ULL } }, /* XSUM_XXH128_testdata[6549] */\n    { 2183, 0x000000009E3779B1ULL, { 0x39964199C7EEF771ULL, 0x04BE6EEFBDED9C2DULL } }, /* XSUM_XXH128_testdata[6550] */\n    { 2183, 0x9E3779B185EBCA8DULL, { 0x8044F342429D0F1EULL, 0x0DC66EEFF141F086ULL } }, /* XSUM_XXH128_testdata[6551] */\n    { 2184, 0x0000000000000000ULL, { 0xA9FCE36A54750A1FULL, 0x5BE4DBFCCA0D177BULL } }, /* XSUM_XXH128_testdata[6552] */\n    { 2184, 0x000000009E3779B1ULL, { 0xA112864CC9BBD020ULL, 0x3A771073B3A3872DULL } }, /* XSUM_XXH128_testdata[6553] */\n    { 2184, 0x9E3779B185EBCA8DULL, { 0x6FDBF8F2D98BF87CULL, 0x1DFEE436A61F38CFULL } }, /* XSUM_XXH128_testdata[6554] */\n    { 2185, 0x0000000000000000ULL, { 0x8660BD25E39DB30AULL, 0xB75C80A258AC14CEULL } }, /* XSUM_XXH128_testdata[6555] */\n    { 2185, 0x000000009E3779B1ULL, { 0xD1F5F892B5EAB754ULL, 0xD840FAAFC39F1D79ULL } }, /* XSUM_XXH128_testdata[6556] */\n    { 2185, 0x9E3779B185EBCA8DULL, { 0xDD5BD774387761EDULL, 0x5C86948864F4C626ULL } }, /* XSUM_XXH128_testdata[6557] */\n    { 2186, 0x0000000000000000ULL, { 0x19344704011B72D3ULL, 0xD50C76BFCFF91871ULL } }, /* XSUM_XXH128_testdata[6558] */\n    { 2186, 0x000000009E3779B1ULL, { 0x1A802B858E8327B7ULL, 0x280895559F2111CDULL } }, /* XSUM_XXH128_testdata[6559] */\n    { 2186, 0x9E3779B185EBCA8DULL, { 0x0484D89689D09F20ULL, 0x3D3549213483A90FULL } }, /* XSUM_XXH128_testdata[6560] */\n    { 2187, 0x0000000000000000ULL, { 0xE59CC4C985A720A2ULL, 0xA1460E2799B20314ULL } }, /* XSUM_XXH128_testdata[6561] */\n    { 2187, 0x000000009E3779B1ULL, { 0x73C56943A1FCD05AULL, 0xEF031AC5F7A75082ULL } }, /* XSUM_XXH128_testdata[6562] */\n    { 2187, 0x9E3779B185EBCA8DULL, { 0x2C4966E8D7B3F5E8ULL, 0x3C4ED19064BDF8FCULL } }, /* XSUM_XXH128_testdata[6563] */\n    { 2188, 0x0000000000000000ULL, { 0xB223195A579011ACULL, 0x4E00998C6D7C8F73ULL } }, /* XSUM_XXH128_testdata[6564] */\n    { 2188, 0x000000009E3779B1ULL, { 0x5959A76390680765ULL, 0x9FB4F21399888E8BULL } }, /* XSUM_XXH128_testdata[6565] */\n    { 2188, 0x9E3779B185EBCA8DULL, { 0xD43C8AE1C4766194ULL, 0xF9DCF4691C043A89ULL } }, /* XSUM_XXH128_testdata[6566] */\n    { 2189, 0x0000000000000000ULL, { 0xAF9E01D91A98738AULL, 0xB7DB726552C2883EULL } }, /* XSUM_XXH128_testdata[6567] */\n    { 2189, 0x000000009E3779B1ULL, { 0x30B1A073005BFA5DULL, 0xBDF0DB52F4A05B73ULL } }, /* XSUM_XXH128_testdata[6568] */\n    { 2189, 0x9E3779B185EBCA8DULL, { 0xBE047B287C786011ULL, 0x0FDAE48B06B0B6F5ULL } }, /* XSUM_XXH128_testdata[6569] */\n    { 2190, 0x0000000000000000ULL, { 0x9B2878B998461347ULL, 0xAB2D64EB018E9990ULL } }, /* XSUM_XXH128_testdata[6570] */\n    { 2190, 0x000000009E3779B1ULL, { 0xB56A29CA5046CD65ULL, 0x6B8C0C53B4CC61E4ULL } }, /* XSUM_XXH128_testdata[6571] */\n    { 2190, 0x9E3779B185EBCA8DULL, { 0xD5FDCB465B9E2897ULL, 0x8ABDA0693F4B7475ULL } }, /* XSUM_XXH128_testdata[6572] */\n    { 2191, 0x0000000000000000ULL, { 0x71B4CC7A01EF5656ULL, 0x2DD627FD95057864ULL } }, /* XSUM_XXH128_testdata[6573] */\n    { 2191, 0x000000009E3779B1ULL, { 0x25CA847146304583ULL, 0xD52FC81E93226BF7ULL } }, /* XSUM_XXH128_testdata[6574] */\n    { 2191, 0x9E3779B185EBCA8DULL, { 0x7A5C5E944C4D2499ULL, 0x1A710BB13C291329ULL } }, /* XSUM_XXH128_testdata[6575] */\n    { 2192, 0x0000000000000000ULL, { 0x84E6EBA02934072EULL, 0xA15803BFD253EA7FULL } }, /* XSUM_XXH128_testdata[6576] */\n    { 2192, 0x000000009E3779B1ULL, { 0xAAFE7F4628FB25E5ULL, 0x0BBF802DD3D7A093ULL } }, /* XSUM_XXH128_testdata[6577] */\n    { 2192, 0x9E3779B185EBCA8DULL, { 0x481D2585061FE7FDULL, 0x522938F1B3621DDCULL } }, /* XSUM_XXH128_testdata[6578] */\n    { 2193, 0x0000000000000000ULL, { 0x78B69BB4A862DB03ULL, 0x3492D5C82958A7D0ULL } }, /* XSUM_XXH128_testdata[6579] */\n    { 2193, 0x000000009E3779B1ULL, { 0xF9A17F25FD9CB3FCULL, 0xF864A078FFB48506ULL } }, /* XSUM_XXH128_testdata[6580] */\n    { 2193, 0x9E3779B185EBCA8DULL, { 0x767D20312ECBB69AULL, 0xBA1F70960FF650FBULL } }, /* XSUM_XXH128_testdata[6581] */\n    { 2194, 0x0000000000000000ULL, { 0xC7AEF2FB42E6D43FULL, 0x291B1577380B5D7EULL } }, /* XSUM_XXH128_testdata[6582] */\n    { 2194, 0x000000009E3779B1ULL, { 0x4FC1216C68F3123AULL, 0x1F0428592FAEF140ULL } }, /* XSUM_XXH128_testdata[6583] */\n    { 2194, 0x9E3779B185EBCA8DULL, { 0xF441AC4B1766F7B1ULL, 0xC307C60A7184BD47ULL } }, /* XSUM_XXH128_testdata[6584] */\n    { 2195, 0x0000000000000000ULL, { 0xEAC74EA8D924CA43ULL, 0xDB8FCFEF7B91509CULL } }, /* XSUM_XXH128_testdata[6585] */\n    { 2195, 0x000000009E3779B1ULL, { 0x1E720D39B4B6266AULL, 0xC879B0E84F3611B7ULL } }, /* XSUM_XXH128_testdata[6586] */\n    { 2195, 0x9E3779B185EBCA8DULL, { 0x49CC8123556CEF4EULL, 0xF36ACBBD7ED0CC37ULL } }, /* XSUM_XXH128_testdata[6587] */\n    { 2196, 0x0000000000000000ULL, { 0xAD657634A1E509F8ULL, 0x180537117603F9D6ULL } }, /* XSUM_XXH128_testdata[6588] */\n    { 2196, 0x000000009E3779B1ULL, { 0x45750E2C7C551802ULL, 0x68E62DF2E17A1847ULL } }, /* XSUM_XXH128_testdata[6589] */\n    { 2196, 0x9E3779B185EBCA8DULL, { 0x0F993C64851F9F19ULL, 0x5940FCB7150C23C3ULL } }, /* XSUM_XXH128_testdata[6590] */\n    { 2197, 0x0000000000000000ULL, { 0x63C87C3FB53F2903ULL, 0x1C575CE2681CCE0FULL } }, /* XSUM_XXH128_testdata[6591] */\n    { 2197, 0x000000009E3779B1ULL, { 0x87F31123861CF8F1ULL, 0x518FFEB2CB4FF2A6ULL } }, /* XSUM_XXH128_testdata[6592] */\n    { 2197, 0x9E3779B185EBCA8DULL, { 0x5C1B6EAC47E1080DULL, 0xA40C6496254A113EULL } }, /* XSUM_XXH128_testdata[6593] */\n    { 2198, 0x0000000000000000ULL, { 0x6A7D831B5F4FE66DULL, 0x2C87211658082B2DULL } }, /* XSUM_XXH128_testdata[6594] */\n    { 2198, 0x000000009E3779B1ULL, { 0x0C9D87F4C1AC999DULL, 0xCD18F0FD208E1C24ULL } }, /* XSUM_XXH128_testdata[6595] */\n    { 2198, 0x9E3779B185EBCA8DULL, { 0x1AAE97153C6D5C42ULL, 0x8A5D32BD22A885C2ULL } }, /* XSUM_XXH128_testdata[6596] */\n    { 2199, 0x0000000000000000ULL, { 0x01B53846E0D4AC64ULL, 0x7D7E869638A59D48ULL } }, /* XSUM_XXH128_testdata[6597] */\n    { 2199, 0x000000009E3779B1ULL, { 0x03E3D0BADEDF58A2ULL, 0xCB9B8BD2E7D94575ULL } }, /* XSUM_XXH128_testdata[6598] */\n    { 2199, 0x9E3779B185EBCA8DULL, { 0xEC90604F2829F411ULL, 0x093F44569A3BB56EULL } }, /* XSUM_XXH128_testdata[6599] */\n    { 2200, 0x0000000000000000ULL, { 0xF18C2A1C91B939AFULL, 0x3DA03FA8121695F6ULL } }, /* XSUM_XXH128_testdata[6600] */\n    { 2200, 0x000000009E3779B1ULL, { 0x437E33020662E4CBULL, 0x25541C4C12B85223ULL } }, /* XSUM_XXH128_testdata[6601] */\n    { 2200, 0x9E3779B185EBCA8DULL, { 0x8AF27110B8519E3DULL, 0xDCC9465E6575C632ULL } }, /* XSUM_XXH128_testdata[6602] */\n    { 2201, 0x0000000000000000ULL, { 0x4928A28948996E6DULL, 0xF1ED05ED33159953ULL } }, /* XSUM_XXH128_testdata[6603] */\n    { 2201, 0x000000009E3779B1ULL, { 0x25F7562FDDF858B2ULL, 0xB33C41B7390D259EULL } }, /* XSUM_XXH128_testdata[6604] */\n    { 2201, 0x9E3779B185EBCA8DULL, { 0xA22D2855F0D85572ULL, 0x2ADDC84DA4F25D9EULL } }, /* XSUM_XXH128_testdata[6605] */\n    { 2202, 0x0000000000000000ULL, { 0xE948FCCAB5D2A3D7ULL, 0x34D27633C1BACA67ULL } }, /* XSUM_XXH128_testdata[6606] */\n    { 2202, 0x000000009E3779B1ULL, { 0x4DFDD433B8297754ULL, 0x36F52BF7028BDFE7ULL } }, /* XSUM_XXH128_testdata[6607] */\n    { 2202, 0x9E3779B185EBCA8DULL, { 0x8F6E2928A92848E3ULL, 0x97EDF046C1296805ULL } }, /* XSUM_XXH128_testdata[6608] */\n    { 2203, 0x0000000000000000ULL, { 0xCBCC38906A5320E2ULL, 0x87F2CD0BC6EBB5DCULL } }, /* XSUM_XXH128_testdata[6609] */\n    { 2203, 0x000000009E3779B1ULL, { 0x7B7CF77160E98763ULL, 0x48C836E2E0B0B8C3ULL } }, /* XSUM_XXH128_testdata[6610] */\n    { 2203, 0x9E3779B185EBCA8DULL, { 0x3C54CBDE2AC16F9EULL, 0x45ADE45D63DF78D4ULL } }, /* XSUM_XXH128_testdata[6611] */\n    { 2204, 0x0000000000000000ULL, { 0x5D48D592672E0092ULL, 0xBF70D16115FB97EDULL } }, /* XSUM_XXH128_testdata[6612] */\n    { 2204, 0x000000009E3779B1ULL, { 0xCFF286FA07DE91A9ULL, 0xBC0046F948A174CAULL } }, /* XSUM_XXH128_testdata[6613] */\n    { 2204, 0x9E3779B185EBCA8DULL, { 0x8A0BC0C14F9F13E3ULL, 0xBDE0AE8C6F8B236AULL } }, /* XSUM_XXH128_testdata[6614] */\n    { 2205, 0x0000000000000000ULL, { 0x46855E38CDED0819ULL, 0x9F3A9384FC3C7E90ULL } }, /* XSUM_XXH128_testdata[6615] */\n    { 2205, 0x000000009E3779B1ULL, { 0xA19F39C3FB7A1D6EULL, 0xB8F35B213AC5A4C3ULL } }, /* XSUM_XXH128_testdata[6616] */\n    { 2205, 0x9E3779B185EBCA8DULL, { 0x75A04D065ACD038CULL, 0x59E5DCF2E12628DCULL } }, /* XSUM_XXH128_testdata[6617] */\n    { 2206, 0x0000000000000000ULL, { 0x09358F24391EE1E7ULL, 0x417CB47DC0382754ULL } }, /* XSUM_XXH128_testdata[6618] */\n    { 2206, 0x000000009E3779B1ULL, { 0xBFBFBB96668A6141ULL, 0xD729EE33F8C02771ULL } }, /* XSUM_XXH128_testdata[6619] */\n    { 2206, 0x9E3779B185EBCA8DULL, { 0x41B3BB406058BD6DULL, 0xED6AAE8704C896A5ULL } }, /* XSUM_XXH128_testdata[6620] */\n    { 2207, 0x0000000000000000ULL, { 0xF4C1F3BFB4B542A6ULL, 0xF0371557DB3208E1ULL } }, /* XSUM_XXH128_testdata[6621] */\n    { 2207, 0x000000009E3779B1ULL, { 0x9CFF5A0E36C66863ULL, 0x7396A5E645573B99ULL } }, /* XSUM_XXH128_testdata[6622] */\n    { 2207, 0x9E3779B185EBCA8DULL, { 0x20459DD50113E516ULL, 0x0A38EEB0F9897838ULL } }, /* XSUM_XXH128_testdata[6623] */\n    { 2208, 0x0000000000000000ULL, { 0x700315ED88C7E92AULL, 0xDC28C2337BC3F428ULL } }, /* XSUM_XXH128_testdata[6624] */\n    { 2208, 0x000000009E3779B1ULL, { 0xCC79D1DB0D335B35ULL, 0x47417C2750EEFD1DULL } }, /* XSUM_XXH128_testdata[6625] */\n    { 2208, 0x9E3779B185EBCA8DULL, { 0xFAD72D454B231E1FULL, 0x8AB17B43CA6C5EC9ULL } }, /* XSUM_XXH128_testdata[6626] */\n    { 2209, 0x0000000000000000ULL, { 0xB4A84B3022803926ULL, 0x57441B953C670A7AULL } }, /* XSUM_XXH128_testdata[6627] */\n    { 2209, 0x000000009E3779B1ULL, { 0xEFA3BA47833DB0C1ULL, 0x30C0D8F1E363D5E8ULL } }, /* XSUM_XXH128_testdata[6628] */\n    { 2209, 0x9E3779B185EBCA8DULL, { 0x04217C50D815E8D2ULL, 0x297A36F8A75E77B6ULL } }, /* XSUM_XXH128_testdata[6629] */\n    { 2210, 0x0000000000000000ULL, { 0xA240352B602854D2ULL, 0xD54143637EFCD87EULL } }, /* XSUM_XXH128_testdata[6630] */\n    { 2210, 0x000000009E3779B1ULL, { 0x86E4020000BF178CULL, 0xDEC97E481D2C35E7ULL } }, /* XSUM_XXH128_testdata[6631] */\n    { 2210, 0x9E3779B185EBCA8DULL, { 0xD37F02C28289A656ULL, 0x082BA6E12A0A07BCULL } }, /* XSUM_XXH128_testdata[6632] */\n    { 2211, 0x0000000000000000ULL, { 0x636FB1C6C3DBFE21ULL, 0x33382233158AE8C1ULL } }, /* XSUM_XXH128_testdata[6633] */\n    { 2211, 0x000000009E3779B1ULL, { 0xDEB1625B7F2723D2ULL, 0x39EC38FD720F52E4ULL } }, /* XSUM_XXH128_testdata[6634] */\n    { 2211, 0x9E3779B185EBCA8DULL, { 0x922BC8C06F60CA05ULL, 0x593731A63F22E4BBULL } }, /* XSUM_XXH128_testdata[6635] */\n    { 2212, 0x0000000000000000ULL, { 0x8F7E08E639EE5396ULL, 0x29C3F56F59C1EB29ULL } }, /* XSUM_XXH128_testdata[6636] */\n    { 2212, 0x000000009E3779B1ULL, { 0xE2DAB7783FE2E92FULL, 0x4975D8B3FEE5E644ULL } }, /* XSUM_XXH128_testdata[6637] */\n    { 2212, 0x9E3779B185EBCA8DULL, { 0x291E3802522C3B4CULL, 0xC2933EA210B4F552ULL } }, /* XSUM_XXH128_testdata[6638] */\n    { 2213, 0x0000000000000000ULL, { 0x9687D287CCF00986ULL, 0x003D42EABAFDB878ULL } }, /* XSUM_XXH128_testdata[6639] */\n    { 2213, 0x000000009E3779B1ULL, { 0xCD005DC7D647FB34ULL, 0x2A5EEDC9090B849AULL } }, /* XSUM_XXH128_testdata[6640] */\n    { 2213, 0x9E3779B185EBCA8DULL, { 0x44468F4841381E7CULL, 0xA00A8B41EA5EBA90ULL } }, /* XSUM_XXH128_testdata[6641] */\n    { 2214, 0x0000000000000000ULL, { 0xFC3AAB6F3C760BA7ULL, 0x8E9FCFD628DA279EULL } }, /* XSUM_XXH128_testdata[6642] */\n    { 2214, 0x000000009E3779B1ULL, { 0x6C997E435D6950D6ULL, 0x61A122ABF5589339ULL } }, /* XSUM_XXH128_testdata[6643] */\n    { 2214, 0x9E3779B185EBCA8DULL, { 0x477AD85736CD6177ULL, 0x6093D716506B4095ULL } }, /* XSUM_XXH128_testdata[6644] */\n    { 2215, 0x0000000000000000ULL, { 0x8E6365769D7FC136ULL, 0x18A39583F3F20B74ULL } }, /* XSUM_XXH128_testdata[6645] */\n    { 2215, 0x000000009E3779B1ULL, { 0xCC7FAEF025E3C972ULL, 0x301A1F9081503C8EULL } }, /* XSUM_XXH128_testdata[6646] */\n    { 2215, 0x9E3779B185EBCA8DULL, { 0xD9569AC3A784F21DULL, 0xCD1604AEB7A6A1CAULL } }, /* XSUM_XXH128_testdata[6647] */\n    { 2216, 0x0000000000000000ULL, { 0x3748F951EEE389F2ULL, 0x0023268A1A1EE777ULL } }, /* XSUM_XXH128_testdata[6648] */\n    { 2216, 0x000000009E3779B1ULL, { 0xF9539F5C251C266BULL, 0x99B4EE44D1238DDFULL } }, /* XSUM_XXH128_testdata[6649] */\n    { 2216, 0x9E3779B185EBCA8DULL, { 0xEFE43D389C338830ULL, 0xAA12779D0F3AA792ULL } }, /* XSUM_XXH128_testdata[6650] */\n    { 2217, 0x0000000000000000ULL, { 0x34C121B698E9AF1FULL, 0x7F0D97B39988A29AULL } }, /* XSUM_XXH128_testdata[6651] */\n    { 2217, 0x000000009E3779B1ULL, { 0x125E6F17ACF526CDULL, 0x7AA73F1E3C5775C9ULL } }, /* XSUM_XXH128_testdata[6652] */\n    { 2217, 0x9E3779B185EBCA8DULL, { 0x178415CFDCB7E73CULL, 0xB6CD1171FF0ED3BFULL } }, /* XSUM_XXH128_testdata[6653] */\n    { 2218, 0x0000000000000000ULL, { 0xB51367FD5633A04EULL, 0xF8EBD705FD946282ULL } }, /* XSUM_XXH128_testdata[6654] */\n    { 2218, 0x000000009E3779B1ULL, { 0x1F0FE38399D13FFBULL, 0x0172BBE22AC07F49ULL } }, /* XSUM_XXH128_testdata[6655] */\n    { 2218, 0x9E3779B185EBCA8DULL, { 0xBC3A63FBADB4B27AULL, 0x4E2AA391184DE65DULL } }, /* XSUM_XXH128_testdata[6656] */\n    { 2219, 0x0000000000000000ULL, { 0x35D6A10601EBD042ULL, 0x6166A79B11A2F680ULL } }, /* XSUM_XXH128_testdata[6657] */\n    { 2219, 0x000000009E3779B1ULL, { 0x9A3EEDBE47911A25ULL, 0x18A5FFAFF5FF710DULL } }, /* XSUM_XXH128_testdata[6658] */\n    { 2219, 0x9E3779B185EBCA8DULL, { 0x359E000DA9C69A8FULL, 0x6E7DBD0E74BA9F8BULL } }, /* XSUM_XXH128_testdata[6659] */\n    { 2220, 0x0000000000000000ULL, { 0x4C283F09875945A8ULL, 0x674491979EB4859AULL } }, /* XSUM_XXH128_testdata[6660] */\n    { 2220, 0x000000009E3779B1ULL, { 0x5F183549C50ABA95ULL, 0x7D246AF5013EBBFDULL } }, /* XSUM_XXH128_testdata[6661] */\n    { 2220, 0x9E3779B185EBCA8DULL, { 0xEDD00581331B3A2AULL, 0xB05821249AA61F49ULL } }, /* XSUM_XXH128_testdata[6662] */\n    { 2221, 0x0000000000000000ULL, { 0x27F10579DF439D79ULL, 0x44C1583A9E5FB31DULL } }, /* XSUM_XXH128_testdata[6663] */\n    { 2221, 0x000000009E3779B1ULL, { 0x7CE67B5B3B6DEAB4ULL, 0xC26386B8F7CDDC0AULL } }, /* XSUM_XXH128_testdata[6664] */\n    { 2221, 0x9E3779B185EBCA8DULL, { 0x0FC6A3B4F4FA84AFULL, 0xCB568B8C0A097279ULL } }, /* XSUM_XXH128_testdata[6665] */\n    { 2222, 0x0000000000000000ULL, { 0x1ADBD424A23E32DEULL, 0x27E776A0DDE33211ULL } }, /* XSUM_XXH128_testdata[6666] */\n    { 2222, 0x000000009E3779B1ULL, { 0x3B66C9F8F3EA2A7EULL, 0x7FB25E1985F771E3ULL } }, /* XSUM_XXH128_testdata[6667] */\n    { 2222, 0x9E3779B185EBCA8DULL, { 0x7B38DE2656BD891FULL, 0x8A44041CC2110756ULL } }, /* XSUM_XXH128_testdata[6668] */\n    { 2223, 0x0000000000000000ULL, { 0xDB429AE625C9FC6DULL, 0x14D9D76BB4F0C13BULL } }, /* XSUM_XXH128_testdata[6669] */\n    { 2223, 0x000000009E3779B1ULL, { 0xD2AD2D8DED8060FBULL, 0x34D496A97880A3FAULL } }, /* XSUM_XXH128_testdata[6670] */\n    { 2223, 0x9E3779B185EBCA8DULL, { 0x933CA63106E3A4F5ULL, 0x9FEDDAE44756CC2EULL } }, /* XSUM_XXH128_testdata[6671] */\n    { 2224, 0x0000000000000000ULL, { 0x76F5F458101653A6ULL, 0x20F783F68F740C8CULL } }, /* XSUM_XXH128_testdata[6672] */\n    { 2224, 0x000000009E3779B1ULL, { 0x2B50768B5BAC54BCULL, 0xE039686EBA1906F8ULL } }, /* XSUM_XXH128_testdata[6673] */\n    { 2224, 0x9E3779B185EBCA8DULL, { 0x817E67E9987F2F90ULL, 0xBAE702F5ECCA9056ULL } }, /* XSUM_XXH128_testdata[6674] */\n    { 2225, 0x0000000000000000ULL, { 0x711540673D7438BBULL, 0x3CB01A920B0AA733ULL } }, /* XSUM_XXH128_testdata[6675] */\n    { 2225, 0x000000009E3779B1ULL, { 0x0639AC698802EDF9ULL, 0xD56FFF0EDCA5289BULL } }, /* XSUM_XXH128_testdata[6676] */\n    { 2225, 0x9E3779B185EBCA8DULL, { 0x8331311180B2BB75ULL, 0x6F27A90BE78894BEULL } }, /* XSUM_XXH128_testdata[6677] */\n    { 2226, 0x0000000000000000ULL, { 0xEA382838600F6246ULL, 0x97FB09B698F36C2CULL } }, /* XSUM_XXH128_testdata[6678] */\n    { 2226, 0x000000009E3779B1ULL, { 0x9917A1D939016D4AULL, 0x948AC18FB9DDDBB0ULL } }, /* XSUM_XXH128_testdata[6679] */\n    { 2226, 0x9E3779B185EBCA8DULL, { 0x6B3384DD94F74CA7ULL, 0xFD2C5C1CEBB16B42ULL } }, /* XSUM_XXH128_testdata[6680] */\n    { 2227, 0x0000000000000000ULL, { 0x94AC31B78CBF3FD0ULL, 0xAD18008A2638358BULL } }, /* XSUM_XXH128_testdata[6681] */\n    { 2227, 0x000000009E3779B1ULL, { 0xA356BC9149197284ULL, 0x32AEA4004174F33BULL } }, /* XSUM_XXH128_testdata[6682] */\n    { 2227, 0x9E3779B185EBCA8DULL, { 0xC155AD752682B118ULL, 0x32BD88B04BEADAA2ULL } }, /* XSUM_XXH128_testdata[6683] */\n    { 2228, 0x0000000000000000ULL, { 0x9CE739A7B0881A1DULL, 0x22211AF58BB969E5ULL } }, /* XSUM_XXH128_testdata[6684] */\n    { 2228, 0x000000009E3779B1ULL, { 0x5B0D12956C37DBACULL, 0x8ACD6773986A3BF6ULL } }, /* XSUM_XXH128_testdata[6685] */\n    { 2228, 0x9E3779B185EBCA8DULL, { 0x9E815FDB9F67F4EFULL, 0xE3A28A4A8A026A8CULL } }, /* XSUM_XXH128_testdata[6686] */\n    { 2229, 0x0000000000000000ULL, { 0x700388F67B075989ULL, 0x5AF4E3F954D131AFULL } }, /* XSUM_XXH128_testdata[6687] */\n    { 2229, 0x000000009E3779B1ULL, { 0x0FB1C26156E53C0CULL, 0xA2C5C7590C6F1BD7ULL } }, /* XSUM_XXH128_testdata[6688] */\n    { 2229, 0x9E3779B185EBCA8DULL, { 0x1F4FF8D340256EBDULL, 0xCDE9DB7EFD7B2116ULL } }, /* XSUM_XXH128_testdata[6689] */\n    { 2230, 0x0000000000000000ULL, { 0x6922538CFDE61217ULL, 0xDEE3D9BB377FD111ULL } }, /* XSUM_XXH128_testdata[6690] */\n    { 2230, 0x000000009E3779B1ULL, { 0x2B271AD99E4B6948ULL, 0x52CA4D148F9CE6E3ULL } }, /* XSUM_XXH128_testdata[6691] */\n    { 2230, 0x9E3779B185EBCA8DULL, { 0xC2518F847B8B641DULL, 0xCEF06C2DEB72592CULL } }, /* XSUM_XXH128_testdata[6692] */\n    { 2231, 0x0000000000000000ULL, { 0xB683FC5049069978ULL, 0xBB4AB8B39E662CD8ULL } }, /* XSUM_XXH128_testdata[6693] */\n    { 2231, 0x000000009E3779B1ULL, { 0x636A10534282AE91ULL, 0x5A30FF838D5B36C7ULL } }, /* XSUM_XXH128_testdata[6694] */\n    { 2231, 0x9E3779B185EBCA8DULL, { 0x5336697F84525839ULL, 0x6D50444EB162771CULL } }, /* XSUM_XXH128_testdata[6695] */\n    { 2232, 0x0000000000000000ULL, { 0xB1F34FE973A230AAULL, 0x0FEFCA31F48F24DCULL } }, /* XSUM_XXH128_testdata[6696] */\n    { 2232, 0x000000009E3779B1ULL, { 0x565CF906E3845639ULL, 0x2EA509DB38B6AA7EULL } }, /* XSUM_XXH128_testdata[6697] */\n    { 2232, 0x9E3779B185EBCA8DULL, { 0x61C662A59D44EB71ULL, 0x5EBC57B820E24BC8ULL } }, /* XSUM_XXH128_testdata[6698] */\n    { 2233, 0x0000000000000000ULL, { 0xB91B2F72A927AD7BULL, 0x55883B7FB0685B3FULL } }, /* XSUM_XXH128_testdata[6699] */\n    { 2233, 0x000000009E3779B1ULL, { 0x4938F5C3F2E587CCULL, 0x1AB6F66705D83D2CULL } }, /* XSUM_XXH128_testdata[6700] */\n    { 2233, 0x9E3779B185EBCA8DULL, { 0xF43F1270175D6FD0ULL, 0xF2BD7426335FB0F8ULL } }, /* XSUM_XXH128_testdata[6701] */\n    { 2234, 0x0000000000000000ULL, { 0x2E533EC105FE951FULL, 0x1FF75AD5F5276DCAULL } }, /* XSUM_XXH128_testdata[6702] */\n    { 2234, 0x000000009E3779B1ULL, { 0x329AF29A40A36F62ULL, 0x842EBFB9C7E03778ULL } }, /* XSUM_XXH128_testdata[6703] */\n    { 2234, 0x9E3779B185EBCA8DULL, { 0xAC51A60B038799ABULL, 0x5705B1DE71B2DF27ULL } }, /* XSUM_XXH128_testdata[6704] */\n    { 2235, 0x0000000000000000ULL, { 0xB57A6D2663BD3318ULL, 0xF1FE6A9746226E98ULL } }, /* XSUM_XXH128_testdata[6705] */\n    { 2235, 0x000000009E3779B1ULL, { 0xE7325D4EDF892F07ULL, 0xE7E493AF3D668959ULL } }, /* XSUM_XXH128_testdata[6706] */\n    { 2235, 0x9E3779B185EBCA8DULL, { 0x6236E2EB27003B98ULL, 0xAF8E70E5E48A2721ULL } }, /* XSUM_XXH128_testdata[6707] */\n    { 2236, 0x0000000000000000ULL, { 0xACD57AC1C6A6751DULL, 0xF55EE7788E7D7802ULL } }, /* XSUM_XXH128_testdata[6708] */\n    { 2236, 0x000000009E3779B1ULL, { 0xB949D3BB008F6638ULL, 0x3105CC205F224699ULL } }, /* XSUM_XXH128_testdata[6709] */\n    { 2236, 0x9E3779B185EBCA8DULL, { 0x0A3B7C12DD58733DULL, 0x3B371476D8CEEBFFULL } }, /* XSUM_XXH128_testdata[6710] */\n    { 2237, 0x0000000000000000ULL, { 0xF403CEA1763CD9CCULL, 0x0CDABF3F3C98B371ULL } }, /* XSUM_XXH128_testdata[6711] */\n    { 2237, 0x000000009E3779B1ULL, { 0xF3824EE446018851ULL, 0xC81B751764BD53C5ULL } }, /* XSUM_XXH128_testdata[6712] */\n    { 2237, 0x9E3779B185EBCA8DULL, { 0xF7A5385336BEF410ULL, 0x3EEF572C60CBCDC0ULL } }, /* XSUM_XXH128_testdata[6713] */\n    { 2238, 0x0000000000000000ULL, { 0xEEA5D3E6239E2D21ULL, 0x83673AA5BB380064ULL } }, /* XSUM_XXH128_testdata[6714] */\n    { 2238, 0x000000009E3779B1ULL, { 0x180BB684761CE5C3ULL, 0x3A207CC3A56C2F1BULL } }, /* XSUM_XXH128_testdata[6715] */\n    { 2238, 0x9E3779B185EBCA8DULL, { 0xCB29898047ACB7EFULL, 0xAD98B537DF20369DULL } }, /* XSUM_XXH128_testdata[6716] */\n    { 2239, 0x0000000000000000ULL, { 0xA72607BA9BB75B9BULL, 0xD6ADD2D207458FB8ULL } }, /* XSUM_XXH128_testdata[6717] */\n    { 2239, 0x000000009E3779B1ULL, { 0xD2A362574B5E942CULL, 0x08DC86196CCDCC80ULL } }, /* XSUM_XXH128_testdata[6718] */\n    { 2239, 0x9E3779B185EBCA8DULL, { 0x017F09BFBB6474DAULL, 0x889CB9CDFAB6554EULL } }, /* XSUM_XXH128_testdata[6719] */\n    { 2240, 0x0000000000000000ULL, { 0x6E73A90539CF2948ULL, 0xCCB134FBFA7CE49DULL } }, /* XSUM_XXH128_testdata[6720] */\n    { 2240, 0x000000009E3779B1ULL, { 0xED385111126FBA6FULL, 0x50A1FE17B338995FULL } }, /* XSUM_XXH128_testdata[6721] */\n    { 2240, 0x9E3779B185EBCA8DULL, { 0x757BA8487D1B5247ULL, 0xE40842F585875BA9ULL } }, /* XSUM_XXH128_testdata[6722] */\n    { 2241, 0x0000000000000000ULL, { 0xE800ECA585FE92D9ULL, 0x64A1592C03F3B910ULL } }, /* XSUM_XXH128_testdata[6723] */\n    { 2241, 0x000000009E3779B1ULL, { 0x9A40A64684495542ULL, 0x3EC0C842F6BAA223ULL } }, /* XSUM_XXH128_testdata[6724] */\n    { 2241, 0x9E3779B185EBCA8DULL, { 0x3B33BDEC09C21950ULL, 0xFB5273E20F608F41ULL } }, /* XSUM_XXH128_testdata[6725] */\n    { 2242, 0x0000000000000000ULL, { 0x0FEB720613C813C3ULL, 0x0865E6121C0BF608ULL } }, /* XSUM_XXH128_testdata[6726] */\n    { 2242, 0x000000009E3779B1ULL, { 0xD0DBA62A0BA551CFULL, 0xF622C0FD474504F6ULL } }, /* XSUM_XXH128_testdata[6727] */\n    { 2242, 0x9E3779B185EBCA8DULL, { 0x45883187E8068D6CULL, 0x7E0060C8096DBA49ULL } }, /* XSUM_XXH128_testdata[6728] */\n    { 2243, 0x0000000000000000ULL, { 0xFDD97DDF7A83E7A9ULL, 0x13530813B1EEC8C4ULL } }, /* XSUM_XXH128_testdata[6729] */\n    { 2243, 0x000000009E3779B1ULL, { 0xEAE560C38D5FAE45ULL, 0x4E55BD3B6D71E41FULL } }, /* XSUM_XXH128_testdata[6730] */\n    { 2243, 0x9E3779B185EBCA8DULL, { 0xA2115D49B6729AEDULL, 0x858ACCB08C100F0CULL } }, /* XSUM_XXH128_testdata[6731] */\n    { 2244, 0x0000000000000000ULL, { 0x4171B56A25BAC312ULL, 0x709101DA52E3CE14ULL } }, /* XSUM_XXH128_testdata[6732] */\n    { 2244, 0x000000009E3779B1ULL, { 0xC8EFA24DFD3F2F12ULL, 0x39D2C7784645938EULL } }, /* XSUM_XXH128_testdata[6733] */\n    { 2244, 0x9E3779B185EBCA8DULL, { 0x173F38DE0FB9118FULL, 0x23F676030A76A091ULL } }, /* XSUM_XXH128_testdata[6734] */\n    { 2245, 0x0000000000000000ULL, { 0xC21734A280918825ULL, 0x3FFEFEC6984F0555ULL } }, /* XSUM_XXH128_testdata[6735] */\n    { 2245, 0x000000009E3779B1ULL, { 0x4D4CB7CE803359B9ULL, 0x2FD91A5199D6B9A3ULL } }, /* XSUM_XXH128_testdata[6736] */\n    { 2245, 0x9E3779B185EBCA8DULL, { 0x3F7757BEE2F1A6E0ULL, 0xC31AE05AA0FAE408ULL } }, /* XSUM_XXH128_testdata[6737] */\n    { 2246, 0x0000000000000000ULL, { 0x982A35FE583FF9E2ULL, 0x799FA98302BA9B76ULL } }, /* XSUM_XXH128_testdata[6738] */\n    { 2246, 0x000000009E3779B1ULL, { 0x574B89084E821E73ULL, 0xEBA1AA8A6FAB2E50ULL } }, /* XSUM_XXH128_testdata[6739] */\n    { 2246, 0x9E3779B185EBCA8DULL, { 0x1091A8124BCF0EE7ULL, 0xDBBA2F677C667AF4ULL } }, /* XSUM_XXH128_testdata[6740] */\n    { 2247, 0x0000000000000000ULL, { 0xFEE42592EF7949F4ULL, 0xA2DF71CE5F54C948ULL } }, /* XSUM_XXH128_testdata[6741] */\n    { 2247, 0x000000009E3779B1ULL, { 0xD4B8251809CB2EE7ULL, 0xF229C5B23EA49A1FULL } }, /* XSUM_XXH128_testdata[6742] */\n    { 2247, 0x9E3779B185EBCA8DULL, { 0x12E829B9589D157AULL, 0x39781A79C5DE4BFAULL } }, /* XSUM_XXH128_testdata[6743] */\n    { 2248, 0x0000000000000000ULL, { 0xF8D88BF42753ABEFULL, 0xB07D239233E4E43FULL } }, /* XSUM_XXH128_testdata[6744] */\n    { 2248, 0x000000009E3779B1ULL, { 0x1F8D932C349C834DULL, 0xEDEE4959797D2FD7ULL } }, /* XSUM_XXH128_testdata[6745] */\n    { 2248, 0x9E3779B185EBCA8DULL, { 0x43D2B06987075096ULL, 0xB8E027D1007AA0F7ULL } }, /* XSUM_XXH128_testdata[6746] */\n    { 2249, 0x0000000000000000ULL, { 0x433F7E65BABEFAE2ULL, 0xAACA671D8D3AE709ULL } }, /* XSUM_XXH128_testdata[6747] */\n    { 2249, 0x000000009E3779B1ULL, { 0x9A881E2D444AD972ULL, 0x9F1D668DBB5AFF6FULL } }, /* XSUM_XXH128_testdata[6748] */\n    { 2249, 0x9E3779B185EBCA8DULL, { 0xEB03510641F3EAF5ULL, 0x597067EA11EBD5F7ULL } }, /* XSUM_XXH128_testdata[6749] */\n    { 2250, 0x0000000000000000ULL, { 0xCB6D8FCF1FBF3E2BULL, 0xE27971F6F739076CULL } }, /* XSUM_XXH128_testdata[6750] */\n    { 2250, 0x000000009E3779B1ULL, { 0x2704746C65528173ULL, 0x79305B793D1843F9ULL } }, /* XSUM_XXH128_testdata[6751] */\n    { 2250, 0x9E3779B185EBCA8DULL, { 0xE405262636B96B7BULL, 0xC45A97B17D41F9F0ULL } }, /* XSUM_XXH128_testdata[6752] */\n    { 2251, 0x0000000000000000ULL, { 0x88E4C80D03A165D4ULL, 0x61436DAD87EB2DC1ULL } }, /* XSUM_XXH128_testdata[6753] */\n    { 2251, 0x000000009E3779B1ULL, { 0x2615EE20B42B531BULL, 0x7786CD872E92D21CULL } }, /* XSUM_XXH128_testdata[6754] */\n    { 2251, 0x9E3779B185EBCA8DULL, { 0xE6B07A12A77D3525ULL, 0x21C2231258913A01ULL } }, /* XSUM_XXH128_testdata[6755] */\n    { 2252, 0x0000000000000000ULL, { 0x7EE028994641A9D0ULL, 0xEDDA8D0DC6C4052CULL } }, /* XSUM_XXH128_testdata[6756] */\n    { 2252, 0x000000009E3779B1ULL, { 0x8FE7425F2A8CF1EBULL, 0x32C39446632C56CBULL } }, /* XSUM_XXH128_testdata[6757] */\n    { 2252, 0x9E3779B185EBCA8DULL, { 0x766BC25749111756ULL, 0xF2AA603C269E8583ULL } }, /* XSUM_XXH128_testdata[6758] */\n    { 2253, 0x0000000000000000ULL, { 0xA9322E6F56357F96ULL, 0x96B91131EC910756ULL } }, /* XSUM_XXH128_testdata[6759] */\n    { 2253, 0x000000009E3779B1ULL, { 0xF09A7AFFB83FC184ULL, 0xF051442A150398C2ULL } }, /* XSUM_XXH128_testdata[6760] */\n    { 2253, 0x9E3779B185EBCA8DULL, { 0x2D6E4A271DBBF521ULL, 0x8C73B4FF2F419564ULL } }, /* XSUM_XXH128_testdata[6761] */\n    { 2254, 0x0000000000000000ULL, { 0xD15B147C188AA2BBULL, 0xD614CE8B8FAF376FULL } }, /* XSUM_XXH128_testdata[6762] */\n    { 2254, 0x000000009E3779B1ULL, { 0x43BE1BCF02EFD807ULL, 0xA06920458EA436A4ULL } }, /* XSUM_XXH128_testdata[6763] */\n    { 2254, 0x9E3779B185EBCA8DULL, { 0x7A4C01C9E6C70CCDULL, 0x12533102BC8EF26AULL } }, /* XSUM_XXH128_testdata[6764] */\n    { 2255, 0x0000000000000000ULL, { 0xDF32168D24541296ULL, 0x404264DF94B74674ULL } }, /* XSUM_XXH128_testdata[6765] */\n    { 2255, 0x000000009E3779B1ULL, { 0x951FB825689A3C59ULL, 0xF2CFB5B0425CAA3EULL } }, /* XSUM_XXH128_testdata[6766] */\n    { 2255, 0x9E3779B185EBCA8DULL, { 0x4EF59C308318E6C4ULL, 0x164C7CF6C82D3AC0ULL } }, /* XSUM_XXH128_testdata[6767] */\n    { 2256, 0x0000000000000000ULL, { 0x73B27BE044941B9AULL, 0x390B5AC0C6270984ULL } }, /* XSUM_XXH128_testdata[6768] */\n    { 2256, 0x000000009E3779B1ULL, { 0xDFC0F0C0C85C91D3ULL, 0xAD1D3166AFC387C3ULL } }, /* XSUM_XXH128_testdata[6769] */\n    { 2256, 0x9E3779B185EBCA8DULL, { 0xA95CC44C98A25F24ULL, 0x387A94B25EF312B1ULL } }, /* XSUM_XXH128_testdata[6770] */\n    { 2257, 0x0000000000000000ULL, { 0xB7FF030FE002B07AULL, 0xBD97883D719E1B21ULL } }, /* XSUM_XXH128_testdata[6771] */\n    { 2257, 0x000000009E3779B1ULL, { 0x89AC4DA34059438CULL, 0xD2A36AD913A4E85DULL } }, /* XSUM_XXH128_testdata[6772] */\n    { 2257, 0x9E3779B185EBCA8DULL, { 0xD5D5A36A92895385ULL, 0x6D804A8068D55ED6ULL } }, /* XSUM_XXH128_testdata[6773] */\n    { 2258, 0x0000000000000000ULL, { 0x3A79D49D11BC482DULL, 0xCFC7C757CB01265FULL } }, /* XSUM_XXH128_testdata[6774] */\n    { 2258, 0x000000009E3779B1ULL, { 0xE726EEF8347AE40AULL, 0xE5ED05B10D099862ULL } }, /* XSUM_XXH128_testdata[6775] */\n    { 2258, 0x9E3779B185EBCA8DULL, { 0xA640B7A60386F7C4ULL, 0x770836C43C44B4E2ULL } }, /* XSUM_XXH128_testdata[6776] */\n    { 2259, 0x0000000000000000ULL, { 0xEAA7DDE52003DB2BULL, 0x8C5F09C6D32549FDULL } }, /* XSUM_XXH128_testdata[6777] */\n    { 2259, 0x000000009E3779B1ULL, { 0xF6C0F0061B907EE3ULL, 0xBA9BCE797772EDCBULL } }, /* XSUM_XXH128_testdata[6778] */\n    { 2259, 0x9E3779B185EBCA8DULL, { 0x0A9F761E2DA46512ULL, 0x0FA3E99862841DFAULL } }, /* XSUM_XXH128_testdata[6779] */\n    { 2260, 0x0000000000000000ULL, { 0x806C898C78E7C075ULL, 0x9A651C845835A9A0ULL } }, /* XSUM_XXH128_testdata[6780] */\n    { 2260, 0x000000009E3779B1ULL, { 0x50B1F1F6BB1627EBULL, 0x9597CADEF766C3E2ULL } }, /* XSUM_XXH128_testdata[6781] */\n    { 2260, 0x9E3779B185EBCA8DULL, { 0xBF57DC6510BEFADEULL, 0x9B2E7301286B8BA6ULL } }, /* XSUM_XXH128_testdata[6782] */\n    { 2261, 0x0000000000000000ULL, { 0x6B80C72796FD5086ULL, 0x568315AB06ADB184ULL } }, /* XSUM_XXH128_testdata[6783] */\n    { 2261, 0x000000009E3779B1ULL, { 0x7D22965C9159CC73ULL, 0xEC0627E22AED4E4FULL } }, /* XSUM_XXH128_testdata[6784] */\n    { 2261, 0x9E3779B185EBCA8DULL, { 0x9A0504ADFE069F95ULL, 0xBC941E302BA17D0EULL } }, /* XSUM_XXH128_testdata[6785] */\n    { 2262, 0x0000000000000000ULL, { 0xAD917992036A3B5AULL, 0xBEC3D7D426222B18ULL } }, /* XSUM_XXH128_testdata[6786] */\n    { 2262, 0x000000009E3779B1ULL, { 0x9C02AFABEAF54E8DULL, 0x7CC885ED438BBED1ULL } }, /* XSUM_XXH128_testdata[6787] */\n    { 2262, 0x9E3779B185EBCA8DULL, { 0x3FAE6607A704C6FDULL, 0x25805640843033A2ULL } }, /* XSUM_XXH128_testdata[6788] */\n    { 2263, 0x0000000000000000ULL, { 0xD5C4096846EFC9FAULL, 0x2547DE0DF95E1690ULL } }, /* XSUM_XXH128_testdata[6789] */\n    { 2263, 0x000000009E3779B1ULL, { 0xDB0946CAD0BD1BBBULL, 0xAE85BBEE9B41DDABULL } }, /* XSUM_XXH128_testdata[6790] */\n    { 2263, 0x9E3779B185EBCA8DULL, { 0xA59FC9AE584E4FFCULL, 0x0AC1EB3F346367FAULL } }, /* XSUM_XXH128_testdata[6791] */\n    { 2264, 0x0000000000000000ULL, { 0xC90E31857B03E2D8ULL, 0xAAADD1346CED1D2FULL } }, /* XSUM_XXH128_testdata[6792] */\n    { 2264, 0x000000009E3779B1ULL, { 0x44EB06DD5B0F00ECULL, 0x578B072D623492CEULL } }, /* XSUM_XXH128_testdata[6793] */\n    { 2264, 0x9E3779B185EBCA8DULL, { 0x517AE8E7C0CA7721ULL, 0x861364CC9105F9F9ULL } }, /* XSUM_XXH128_testdata[6794] */\n    { 2265, 0x0000000000000000ULL, { 0x0A338421E1E95A00ULL, 0x8BC34134CC37F671ULL } }, /* XSUM_XXH128_testdata[6795] */\n    { 2265, 0x000000009E3779B1ULL, { 0xB5D28401AE923347ULL, 0x3B28E6228744FA59ULL } }, /* XSUM_XXH128_testdata[6796] */\n    { 2265, 0x9E3779B185EBCA8DULL, { 0x49166C0E030CE3C2ULL, 0x5C07CFCA56704556ULL } }, /* XSUM_XXH128_testdata[6797] */\n    { 2266, 0x0000000000000000ULL, { 0x442ACE25D6B1D5F9ULL, 0x5C2346FA1AE89A0CULL } }, /* XSUM_XXH128_testdata[6798] */\n    { 2266, 0x000000009E3779B1ULL, { 0x49A0676CC2A81F74ULL, 0x0DDE325479A40231ULL } }, /* XSUM_XXH128_testdata[6799] */\n    { 2266, 0x9E3779B185EBCA8DULL, { 0x560649A1EE97FFECULL, 0x1DA90FC1E234351CULL } }, /* XSUM_XXH128_testdata[6800] */\n    { 2267, 0x0000000000000000ULL, { 0x62832B7DC5917770ULL, 0x9CCC134D41B01746ULL } }, /* XSUM_XXH128_testdata[6801] */\n    { 2267, 0x000000009E3779B1ULL, { 0x7703E4B191A27583ULL, 0x39F73DB26DA429ADULL } }, /* XSUM_XXH128_testdata[6802] */\n    { 2267, 0x9E3779B185EBCA8DULL, { 0x9F21B3BC256217CDULL, 0x52FD9E0C6B15CE43ULL } }, /* XSUM_XXH128_testdata[6803] */\n    { 2268, 0x0000000000000000ULL, { 0x85E736777334BEB3ULL, 0xD17FBF436F88E4E7ULL } }, /* XSUM_XXH128_testdata[6804] */\n    { 2268, 0x000000009E3779B1ULL, { 0x85FDC39E16120D83ULL, 0x163ED95D8772EBF2ULL } }, /* XSUM_XXH128_testdata[6805] */\n    { 2268, 0x9E3779B185EBCA8DULL, { 0x085EB6DE430CBC01ULL, 0x7980935DC0194543ULL } }, /* XSUM_XXH128_testdata[6806] */\n    { 2269, 0x0000000000000000ULL, { 0xB152650BDF04F3BDULL, 0x56D50075ECFA7C42ULL } }, /* XSUM_XXH128_testdata[6807] */\n    { 2269, 0x000000009E3779B1ULL, { 0x17776593002DFED0ULL, 0x72ED389870700A94ULL } }, /* XSUM_XXH128_testdata[6808] */\n    { 2269, 0x9E3779B185EBCA8DULL, { 0x59EE9A7FFA69591CULL, 0x4813157B52095BFCULL } }, /* XSUM_XXH128_testdata[6809] */\n    { 2270, 0x0000000000000000ULL, { 0x7A78609851DB8E6CULL, 0x24A4350177427FE4ULL } }, /* XSUM_XXH128_testdata[6810] */\n    { 2270, 0x000000009E3779B1ULL, { 0x8E2E5CC302E33E55ULL, 0xF230C6C854A39B48ULL } }, /* XSUM_XXH128_testdata[6811] */\n    { 2270, 0x9E3779B185EBCA8DULL, { 0xA9DB0E062FA3A378ULL, 0x428C95FD97EC4FC2ULL } }, /* XSUM_XXH128_testdata[6812] */\n    { 2271, 0x0000000000000000ULL, { 0x0DE4C74FC715BB66ULL, 0x9FDEB6941807BEC1ULL } }, /* XSUM_XXH128_testdata[6813] */\n    { 2271, 0x000000009E3779B1ULL, { 0x1135FEF7179694DBULL, 0x2E24074B8D10CD4AULL } }, /* XSUM_XXH128_testdata[6814] */\n    { 2271, 0x9E3779B185EBCA8DULL, { 0x9667350BB9742CC2ULL, 0xAD9A6015E1E2E53EULL } }, /* XSUM_XXH128_testdata[6815] */\n    { 2272, 0x0000000000000000ULL, { 0x205BA204206B1EA8ULL, 0xE625418BD6AE0BC2ULL } }, /* XSUM_XXH128_testdata[6816] */\n    { 2272, 0x000000009E3779B1ULL, { 0x06A2F92E27130530ULL, 0x33DEC999FF2DEA7DULL } }, /* XSUM_XXH128_testdata[6817] */\n    { 2272, 0x9E3779B185EBCA8DULL, { 0x65060EF03CA34352ULL, 0x37A6B57F4E2BB749ULL } }, /* XSUM_XXH128_testdata[6818] */\n    { 2273, 0x0000000000000000ULL, { 0x78F18EA9AFB2BFA6ULL, 0xCAA0581ECD8BA531ULL } }, /* XSUM_XXH128_testdata[6819] */\n    { 2273, 0x000000009E3779B1ULL, { 0x9DC585182A658188ULL, 0x551F55752FB196D3ULL } }, /* XSUM_XXH128_testdata[6820] */\n    { 2273, 0x9E3779B185EBCA8DULL, { 0xE03E1E75C4F2ADC8ULL, 0x8C2BFDD2C294FF0AULL } }, /* XSUM_XXH128_testdata[6821] */\n    { 2274, 0x0000000000000000ULL, { 0xC95182F464F94C39ULL, 0x7374EC9C88C081F3ULL } }, /* XSUM_XXH128_testdata[6822] */\n    { 2274, 0x000000009E3779B1ULL, { 0x38DCC878032FD580ULL, 0x29DB0CEFAA916651ULL } }, /* XSUM_XXH128_testdata[6823] */\n    { 2274, 0x9E3779B185EBCA8DULL, { 0xF124B16F1B073F14ULL, 0x6D271BBF4AE06991ULL } }, /* XSUM_XXH128_testdata[6824] */\n    { 2275, 0x0000000000000000ULL, { 0x136A53CC1DAD378DULL, 0x37493D49F8E3DB39ULL } }, /* XSUM_XXH128_testdata[6825] */\n    { 2275, 0x000000009E3779B1ULL, { 0xC1FF957F26280DC2ULL, 0x9EE7C448B3106F75ULL } }, /* XSUM_XXH128_testdata[6826] */\n    { 2275, 0x9E3779B185EBCA8DULL, { 0xF3D85D25178CA3CEULL, 0xB672BE05EFC519B2ULL } }, /* XSUM_XXH128_testdata[6827] */\n    { 2276, 0x0000000000000000ULL, { 0x27C664F033387D11ULL, 0x2C6297DC11F6DDF1ULL } }, /* XSUM_XXH128_testdata[6828] */\n    { 2276, 0x000000009E3779B1ULL, { 0xF1352A93738CC180ULL, 0xF6E5EA1097941C77ULL } }, /* XSUM_XXH128_testdata[6829] */\n    { 2276, 0x9E3779B185EBCA8DULL, { 0x63F3842BC044F50CULL, 0xB6CA417DBD06333FULL } }, /* XSUM_XXH128_testdata[6830] */\n    { 2277, 0x0000000000000000ULL, { 0x77B856EDB92FD06EULL, 0xB2255935BD55FC03ULL } }, /* XSUM_XXH128_testdata[6831] */\n    { 2277, 0x000000009E3779B1ULL, { 0xB6DA73C09D3022B0ULL, 0x0B5AC13CB39F6C5AULL } }, /* XSUM_XXH128_testdata[6832] */\n    { 2277, 0x9E3779B185EBCA8DULL, { 0x593AA4B7B0BAE338ULL, 0x1210C7C809E48CCCULL } }, /* XSUM_XXH128_testdata[6833] */\n    { 2278, 0x0000000000000000ULL, { 0x1D47AFAB4DF2449BULL, 0x91249725F6D02241ULL } }, /* XSUM_XXH128_testdata[6834] */\n    { 2278, 0x000000009E3779B1ULL, { 0x2A96C986BFABCB68ULL, 0x1CDC080BF366D508ULL } }, /* XSUM_XXH128_testdata[6835] */\n    { 2278, 0x9E3779B185EBCA8DULL, { 0x8E5C48BB76EF91C6ULL, 0x3E110817011C3705ULL } }, /* XSUM_XXH128_testdata[6836] */\n    { 2279, 0x0000000000000000ULL, { 0x0D7B7656E77FF387ULL, 0x8D7612C8B70202D7ULL } }, /* XSUM_XXH128_testdata[6837] */\n    { 2279, 0x000000009E3779B1ULL, { 0x9B317192DFEEFEBAULL, 0x2593AEE1679FDE0DULL } }, /* XSUM_XXH128_testdata[6838] */\n    { 2279, 0x9E3779B185EBCA8DULL, { 0x3B27C87292A3A4C6ULL, 0x9BF27D059ED0262CULL } }, /* XSUM_XXH128_testdata[6839] */\n    { 2280, 0x0000000000000000ULL, { 0xBEDCDF7203D9E958ULL, 0x6AB29179E626B0E7ULL } }, /* XSUM_XXH128_testdata[6840] */\n    { 2280, 0x000000009E3779B1ULL, { 0x8A8A44729C795914ULL, 0x748D64C9D51ABCCEULL } }, /* XSUM_XXH128_testdata[6841] */\n    { 2280, 0x9E3779B185EBCA8DULL, { 0x06AC4295AE6C291BULL, 0x671D663A85C00FB1ULL } }, /* XSUM_XXH128_testdata[6842] */\n    { 2281, 0x0000000000000000ULL, { 0xA1E08B2F1E533106ULL, 0x1452A7C2EA507711ULL } }, /* XSUM_XXH128_testdata[6843] */\n    { 2281, 0x000000009E3779B1ULL, { 0x833FCC7C463B7532ULL, 0xAFCFC31275CD682CULL } }, /* XSUM_XXH128_testdata[6844] */\n    { 2281, 0x9E3779B185EBCA8DULL, { 0x53FA8D8EEF4A1C63ULL, 0x3A4E66A9C47E6632ULL } }, /* XSUM_XXH128_testdata[6845] */\n    { 2282, 0x0000000000000000ULL, { 0x3EF3E8E701C0C7B4ULL, 0x8037352B6FB23554ULL } }, /* XSUM_XXH128_testdata[6846] */\n    { 2282, 0x000000009E3779B1ULL, { 0xCAD66BCA27870E55ULL, 0x8075399AFCB6D899ULL } }, /* XSUM_XXH128_testdata[6847] */\n    { 2282, 0x9E3779B185EBCA8DULL, { 0xE0FD1C44964D8D77ULL, 0xEB5AB22061EFC7D6ULL } }, /* XSUM_XXH128_testdata[6848] */\n    { 2283, 0x0000000000000000ULL, { 0xC565B056636147AEULL, 0x530902249003BCC6ULL } }, /* XSUM_XXH128_testdata[6849] */\n    { 2283, 0x000000009E3779B1ULL, { 0xE881584FCD5202AFULL, 0xFA38129F3D819C53ULL } }, /* XSUM_XXH128_testdata[6850] */\n    { 2283, 0x9E3779B185EBCA8DULL, { 0x3B002D7D59F1A1B2ULL, 0x04CF65C459EB0D73ULL } }, /* XSUM_XXH128_testdata[6851] */\n    { 2284, 0x0000000000000000ULL, { 0x09A3D58C702C1043ULL, 0x15BC371D96187402ULL } }, /* XSUM_XXH128_testdata[6852] */\n    { 2284, 0x000000009E3779B1ULL, { 0x7AABD2DE3D0CA036ULL, 0x9C98CE3DD5DDEDD1ULL } }, /* XSUM_XXH128_testdata[6853] */\n    { 2284, 0x9E3779B185EBCA8DULL, { 0x120E2516F3560387ULL, 0xD15AA3DA740D5779ULL } }, /* XSUM_XXH128_testdata[6854] */\n    { 2285, 0x0000000000000000ULL, { 0xBE7D2B875A7C12DFULL, 0xC5B44458019A7048ULL } }, /* XSUM_XXH128_testdata[6855] */\n    { 2285, 0x000000009E3779B1ULL, { 0x6F5A937AB0D76A90ULL, 0x348887207B242B66ULL } }, /* XSUM_XXH128_testdata[6856] */\n    { 2285, 0x9E3779B185EBCA8DULL, { 0xC08D9B2134293E93ULL, 0xB24E935D8B0C629DULL } }, /* XSUM_XXH128_testdata[6857] */\n    { 2286, 0x0000000000000000ULL, { 0x955BF3D2E94FD1FFULL, 0x26B1603F87103DA0ULL } }, /* XSUM_XXH128_testdata[6858] */\n    { 2286, 0x000000009E3779B1ULL, { 0x458946D0FB4D4175ULL, 0xC511E4A92F66D920ULL } }, /* XSUM_XXH128_testdata[6859] */\n    { 2286, 0x9E3779B185EBCA8DULL, { 0xAA5CE1EDB06F7908ULL, 0x4C9F1B7D672079AAULL } }, /* XSUM_XXH128_testdata[6860] */\n    { 2287, 0x0000000000000000ULL, { 0xECD34428F06D5BFDULL, 0xE0B947F3D6218B60ULL } }, /* XSUM_XXH128_testdata[6861] */\n    { 2287, 0x000000009E3779B1ULL, { 0x1BEAECE4B06CBD58ULL, 0xF6583FE4B93AEF4CULL } }, /* XSUM_XXH128_testdata[6862] */\n    { 2287, 0x9E3779B185EBCA8DULL, { 0x35880E98EEA5FF86ULL, 0xB92369E0BFDACA5DULL } }, /* XSUM_XXH128_testdata[6863] */\n    { 2288, 0x0000000000000000ULL, { 0xC945F58A3E11BBBFULL, 0x15BB48C7CD5A8798ULL } }, /* XSUM_XXH128_testdata[6864] */\n    { 2288, 0x000000009E3779B1ULL, { 0x78BFB58942B7B575ULL, 0xF8030F9674A151AAULL } }, /* XSUM_XXH128_testdata[6865] */\n    { 2288, 0x9E3779B185EBCA8DULL, { 0x99A70C813A3A8A06ULL, 0xC8D64BB5E9B4E2B9ULL } }, /* XSUM_XXH128_testdata[6866] */\n    { 2289, 0x0000000000000000ULL, { 0x2A1B1D4258A3EAD9ULL, 0x260CC90DCC0B41BDULL } }, /* XSUM_XXH128_testdata[6867] */\n    { 2289, 0x000000009E3779B1ULL, { 0xA88786E3B9C02CF9ULL, 0x9B8F67F80E897A90ULL } }, /* XSUM_XXH128_testdata[6868] */\n    { 2289, 0x9E3779B185EBCA8DULL, { 0x026E77D4FFBBA3F7ULL, 0x7139AD48F8BB34F2ULL } }, /* XSUM_XXH128_testdata[6869] */\n    { 2290, 0x0000000000000000ULL, { 0x737A11187E3CC729ULL, 0x1C4AB67D6DE39662ULL } }, /* XSUM_XXH128_testdata[6870] */\n    { 2290, 0x000000009E3779B1ULL, { 0x998C4C7E7BC0F467ULL, 0xDDF5ECD1EB6221A1ULL } }, /* XSUM_XXH128_testdata[6871] */\n    { 2290, 0x9E3779B185EBCA8DULL, { 0xD890E8F23AC2243DULL, 0x132E79E65632E967ULL } }, /* XSUM_XXH128_testdata[6872] */\n    { 2291, 0x0000000000000000ULL, { 0xD8B8D24905007477ULL, 0xBF274D9D57B53B57ULL } }, /* XSUM_XXH128_testdata[6873] */\n    { 2291, 0x000000009E3779B1ULL, { 0xD7AEC843EEFAD203ULL, 0x1F16106D311DBDF5ULL } }, /* XSUM_XXH128_testdata[6874] */\n    { 2291, 0x9E3779B185EBCA8DULL, { 0xC612772E5EFD06FCULL, 0xA4639A6364CB679EULL } }, /* XSUM_XXH128_testdata[6875] */\n    { 2292, 0x0000000000000000ULL, { 0x75979C65433116DFULL, 0x84C7F8805965FC2EULL } }, /* XSUM_XXH128_testdata[6876] */\n    { 2292, 0x000000009E3779B1ULL, { 0xBB49B18193EA7E5FULL, 0xCB9A3DACC298F727ULL } }, /* XSUM_XXH128_testdata[6877] */\n    { 2292, 0x9E3779B185EBCA8DULL, { 0xF6834E2FA35BF140ULL, 0x5A8AECBF69C525A2ULL } }, /* XSUM_XXH128_testdata[6878] */\n    { 2293, 0x0000000000000000ULL, { 0xC6B24469C52F92F0ULL, 0xFF2BD29A7ACA1451ULL } }, /* XSUM_XXH128_testdata[6879] */\n    { 2293, 0x000000009E3779B1ULL, { 0x49C280F99B15B058ULL, 0xF46F7BC6E911EBE3ULL } }, /* XSUM_XXH128_testdata[6880] */\n    { 2293, 0x9E3779B185EBCA8DULL, { 0xDB3D609B07535CDAULL, 0x7AA2DC2F756D4B6EULL } }, /* XSUM_XXH128_testdata[6881] */\n    { 2294, 0x0000000000000000ULL, { 0x65BB90A9381B412AULL, 0x1BEC75A5FF1B01F1ULL } }, /* XSUM_XXH128_testdata[6882] */\n    { 2294, 0x000000009E3779B1ULL, { 0xB8C743C7762B73E7ULL, 0x40D5AA1E21D667B2ULL } }, /* XSUM_XXH128_testdata[6883] */\n    { 2294, 0x9E3779B185EBCA8DULL, { 0x9E48CE2F501345AFULL, 0x280F6E5C06B8A462ULL } }, /* XSUM_XXH128_testdata[6884] */\n    { 2295, 0x0000000000000000ULL, { 0x005CF4C4F7FEB7E7ULL, 0xEEFA4B479C128C28ULL } }, /* XSUM_XXH128_testdata[6885] */\n    { 2295, 0x000000009E3779B1ULL, { 0xBA90F91A99BD6088ULL, 0x0EAE7F92D6EFA37BULL } }, /* XSUM_XXH128_testdata[6886] */\n    { 2295, 0x9E3779B185EBCA8DULL, { 0x3012626B178A2890ULL, 0xB3F4D0F05CE8739FULL } }, /* XSUM_XXH128_testdata[6887] */\n    { 2296, 0x0000000000000000ULL, { 0xD22B7B9D733C15EBULL, 0xE22497BD07B64D4CULL } }, /* XSUM_XXH128_testdata[6888] */\n    { 2296, 0x000000009E3779B1ULL, { 0xD2E30A7F54AC734FULL, 0xED03DBEF3DB75F82ULL } }, /* XSUM_XXH128_testdata[6889] */\n    { 2296, 0x9E3779B185EBCA8DULL, { 0xF1401C2EABBC67BFULL, 0xDEEE0FF3D51A0F4DULL } }, /* XSUM_XXH128_testdata[6890] */\n    { 2297, 0x0000000000000000ULL, { 0x8BAF32C8CD870138ULL, 0xDB8B3F98BD9D450AULL } }, /* XSUM_XXH128_testdata[6891] */\n    { 2297, 0x000000009E3779B1ULL, { 0xB07B20E648640F20ULL, 0x0F279C8FB2F1DC57ULL } }, /* XSUM_XXH128_testdata[6892] */\n    { 2297, 0x9E3779B185EBCA8DULL, { 0xDD48C8721FF0FF99ULL, 0x53144BC0845E8702ULL } }, /* XSUM_XXH128_testdata[6893] */\n    { 2298, 0x0000000000000000ULL, { 0xC39C343085640F78ULL, 0xCCC57776D621B8F5ULL } }, /* XSUM_XXH128_testdata[6894] */\n    { 2298, 0x000000009E3779B1ULL, { 0x60218C18665BB381ULL, 0xD6DC2515CECB0375ULL } }, /* XSUM_XXH128_testdata[6895] */\n    { 2298, 0x9E3779B185EBCA8DULL, { 0x39263D88E4B12DECULL, 0xD2FFC5D842E3AAA8ULL } }, /* XSUM_XXH128_testdata[6896] */\n    { 2299, 0x0000000000000000ULL, { 0x883DF03717BF1809ULL, 0xC48F34672483B62CULL } }, /* XSUM_XXH128_testdata[6897] */\n    { 2299, 0x000000009E3779B1ULL, { 0x5A30EAE44A5C0953ULL, 0x345A6E9B98F25EA0ULL } }, /* XSUM_XXH128_testdata[6898] */\n    { 2299, 0x9E3779B185EBCA8DULL, { 0xAD7775D2C13889B7ULL, 0xE9E49B1E2AFCC3F2ULL } }, /* XSUM_XXH128_testdata[6899] */\n    { 2300, 0x0000000000000000ULL, { 0xE94780E1098E8AD5ULL, 0x97A70787C96DF57EULL } }, /* XSUM_XXH128_testdata[6900] */\n    { 2300, 0x000000009E3779B1ULL, { 0xBDB0C67515EBD14DULL, 0x5F41484CBDAFEEC3ULL } }, /* XSUM_XXH128_testdata[6901] */\n    { 2300, 0x9E3779B185EBCA8DULL, { 0x49C30E77841F419EULL, 0x9234DEB4E048BDB8ULL } }, /* XSUM_XXH128_testdata[6902] */\n    { 2301, 0x0000000000000000ULL, { 0xB49F4AB400E3588BULL, 0x2CC3DE6CBDF46551ULL } }, /* XSUM_XXH128_testdata[6903] */\n    { 2301, 0x000000009E3779B1ULL, { 0x4D03EE9DF7508A2EULL, 0xBAA9B7EF3866518CULL } }, /* XSUM_XXH128_testdata[6904] */\n    { 2301, 0x9E3779B185EBCA8DULL, { 0xC0B43B291C7D50E2ULL, 0xF24ACBD815A6D3CAULL } }, /* XSUM_XXH128_testdata[6905] */\n    { 2302, 0x0000000000000000ULL, { 0xED4FE85093C1F085ULL, 0x14F0AFE4AA80199FULL } }, /* XSUM_XXH128_testdata[6906] */\n    { 2302, 0x000000009E3779B1ULL, { 0xD2F29AA8D07C3208ULL, 0x4A066B1F1565D38FULL } }, /* XSUM_XXH128_testdata[6907] */\n    { 2302, 0x9E3779B185EBCA8DULL, { 0x63AFDAE0A1025D7CULL, 0xA49AEBB8875A31ECULL } }, /* XSUM_XXH128_testdata[6908] */\n    { 2303, 0x0000000000000000ULL, { 0xF3DE079F959D331FULL, 0x444DB4A19D179E7BULL } }, /* XSUM_XXH128_testdata[6909] */\n    { 2303, 0x000000009E3779B1ULL, { 0x1EB66BD166BCFE0EULL, 0x504DF4B6C795ABD6ULL } }, /* XSUM_XXH128_testdata[6910] */\n    { 2303, 0x9E3779B185EBCA8DULL, { 0xADC58DC8F5685791ULL, 0x1F4128A0BA015D07ULL } }, /* XSUM_XXH128_testdata[6911] */\n    { 2304, 0x0000000000000000ULL, { 0x16677470A0BCA896ULL, 0xD055E454570D4D21ULL } }, /* XSUM_XXH128_testdata[6912] */\n    { 2304, 0x000000009E3779B1ULL, { 0x2F55645C358C522BULL, 0x7589AAD0FEADC8B3ULL } }, /* XSUM_XXH128_testdata[6913] */\n    { 2304, 0x9E3779B185EBCA8DULL, { 0x19DD85F7C3CD2427ULL, 0x671F5482436A12ABULL } }, /* XSUM_XXH128_testdata[6914] */\n    { 2305, 0x0000000000000000ULL, { 0xEEDF43B5C7B9728CULL, 0xA3E51C4726EF1E3CULL } }, /* XSUM_XXH128_testdata[6915] */\n    { 2305, 0x000000009E3779B1ULL, { 0x14BAFBAE798F5C19ULL, 0x44CF684CA461B2A5ULL } }, /* XSUM_XXH128_testdata[6916] */\n    { 2305, 0x9E3779B185EBCA8DULL, { 0xC3ECE12FE8DC206EULL, 0x2F7781B88B81F9A3ULL } }, /* XSUM_XXH128_testdata[6917] */\n    { 2306, 0x0000000000000000ULL, { 0x67586E22E7918464ULL, 0x95AC2EBABD16AC3BULL } }, /* XSUM_XXH128_testdata[6918] */\n    { 2306, 0x000000009E3779B1ULL, { 0xF37E9EE5D547AD1AULL, 0x49AFD25C3AB333A5ULL } }, /* XSUM_XXH128_testdata[6919] */\n    { 2306, 0x9E3779B185EBCA8DULL, { 0x699DA7854C898E24ULL, 0x5036D114A1A39274ULL } }, /* XSUM_XXH128_testdata[6920] */\n    { 2307, 0x0000000000000000ULL, { 0xE6B9B555EC783F03ULL, 0x20C19D85BB037FACULL } }, /* XSUM_XXH128_testdata[6921] */\n    { 2307, 0x000000009E3779B1ULL, { 0xC747DC229852A8A7ULL, 0xBE9B7EB851455FB5ULL } }, /* XSUM_XXH128_testdata[6922] */\n    { 2307, 0x9E3779B185EBCA8DULL, { 0x85E3784DE2E5875BULL, 0x57683FBF36D3D545ULL } }, /* XSUM_XXH128_testdata[6923] */\n    { 2308, 0x0000000000000000ULL, { 0x7C3C6B95D57777E4ULL, 0x5B7BFE5ED200B670ULL } }, /* XSUM_XXH128_testdata[6924] */\n    { 2308, 0x000000009E3779B1ULL, { 0xB6F12D4792D0B27DULL, 0x1875F9D16525BD7AULL } }, /* XSUM_XXH128_testdata[6925] */\n    { 2308, 0x9E3779B185EBCA8DULL, { 0x2BAF3E6A01143518ULL, 0xB7EB96805E2F4C49ULL } }, /* XSUM_XXH128_testdata[6926] */\n    { 2309, 0x0000000000000000ULL, { 0xB2D2F7E9194C38C8ULL, 0x76BB865FD92BE307ULL } }, /* XSUM_XXH128_testdata[6927] */\n    { 2309, 0x000000009E3779B1ULL, { 0xDA8B58D5C707EC46ULL, 0x7A44B3BFE37A3C55ULL } }, /* XSUM_XXH128_testdata[6928] */\n    { 2309, 0x9E3779B185EBCA8DULL, { 0x08CFA0325B330C15ULL, 0x73D2BB8371CD2397ULL } }, /* XSUM_XXH128_testdata[6929] */\n    { 2310, 0x0000000000000000ULL, { 0x93BD3D647C099F3CULL, 0x499C57A26178E503ULL } }, /* XSUM_XXH128_testdata[6930] */\n    { 2310, 0x000000009E3779B1ULL, { 0xB93C40DB82DF4523ULL, 0xBB3760B84A34A92AULL } }, /* XSUM_XXH128_testdata[6931] */\n    { 2310, 0x9E3779B185EBCA8DULL, { 0xA31975D7871B3AE2ULL, 0x22ED4E0F235B4DC7ULL } }, /* XSUM_XXH128_testdata[6932] */\n    { 2311, 0x0000000000000000ULL, { 0x9DDB170614BB9FB5ULL, 0x0852EAD5DBEF1F5FULL } }, /* XSUM_XXH128_testdata[6933] */\n    { 2311, 0x000000009E3779B1ULL, { 0xD9670DF02E12DC7EULL, 0x62EE7C7A2B04555FULL } }, /* XSUM_XXH128_testdata[6934] */\n    { 2311, 0x9E3779B185EBCA8DULL, { 0x64EB1577898D85ABULL, 0xF56B9DF993DF1E60ULL } }, /* XSUM_XXH128_testdata[6935] */\n    { 2312, 0x0000000000000000ULL, { 0x03510487528E3167ULL, 0x57B550D479216F38ULL } }, /* XSUM_XXH128_testdata[6936] */\n    { 2312, 0x000000009E3779B1ULL, { 0x41A1B84579085C1FULL, 0x21FD1B3644A3F426ULL } }, /* XSUM_XXH128_testdata[6937] */\n    { 2312, 0x9E3779B185EBCA8DULL, { 0x569C5D84FBA7D5D8ULL, 0x5B1C0EC4B8349913ULL } }, /* XSUM_XXH128_testdata[6938] */\n    { 2313, 0x0000000000000000ULL, { 0x83F66CE2C603CD7AULL, 0xE401CFD4948F73F1ULL } }, /* XSUM_XXH128_testdata[6939] */\n    { 2313, 0x000000009E3779B1ULL, { 0x6EC1D580690748A7ULL, 0xADA1C84E375C67FDULL } }, /* XSUM_XXH128_testdata[6940] */\n    { 2313, 0x9E3779B185EBCA8DULL, { 0x5FE69DBD86E8207CULL, 0x6C62344611AA3599ULL } }, /* XSUM_XXH128_testdata[6941] */\n    { 2314, 0x0000000000000000ULL, { 0x3E340E2AA806D580ULL, 0x8CFE4866C118A0B4ULL } }, /* XSUM_XXH128_testdata[6942] */\n    { 2314, 0x000000009E3779B1ULL, { 0xF0DA571731979C57ULL, 0xF6262995651CA25AULL } }, /* XSUM_XXH128_testdata[6943] */\n    { 2314, 0x9E3779B185EBCA8DULL, { 0xCCFDA55FF364E867ULL, 0xC59DD9B18B73A9FAULL } }, /* XSUM_XXH128_testdata[6944] */\n    { 2315, 0x0000000000000000ULL, { 0x77948228CAAC839FULL, 0xCD044F23BA54E9FCULL } }, /* XSUM_XXH128_testdata[6945] */\n    { 2315, 0x000000009E3779B1ULL, { 0x40486704CD721708ULL, 0xCEC028D499CF9AB7ULL } }, /* XSUM_XXH128_testdata[6946] */\n    { 2315, 0x9E3779B185EBCA8DULL, { 0xD867BD5C820D7CA4ULL, 0xE3C611CC76C033B1ULL } }, /* XSUM_XXH128_testdata[6947] */\n    { 2316, 0x0000000000000000ULL, { 0xA358FC1C95EDEFB1ULL, 0xD28DD90A8DA21592ULL } }, /* XSUM_XXH128_testdata[6948] */\n    { 2316, 0x000000009E3779B1ULL, { 0xAD8914A012EBA179ULL, 0xA5F839D860A9247DULL } }, /* XSUM_XXH128_testdata[6949] */\n    { 2316, 0x9E3779B185EBCA8DULL, { 0xBE86C4D4964F616DULL, 0x1D5934DECE697756ULL } }, /* XSUM_XXH128_testdata[6950] */\n    { 2317, 0x0000000000000000ULL, { 0x592C2C674DBFA5E1ULL, 0x93B946E70DB47203ULL } }, /* XSUM_XXH128_testdata[6951] */\n    { 2317, 0x000000009E3779B1ULL, { 0x124E39155D30A248ULL, 0x8670192F75599CEEULL } }, /* XSUM_XXH128_testdata[6952] */\n    { 2317, 0x9E3779B185EBCA8DULL, { 0xB961DC246722DFE2ULL, 0x75CB55D6BFEC3D0FULL } }, /* XSUM_XXH128_testdata[6953] */\n    { 2318, 0x0000000000000000ULL, { 0x9D78B13CE3C7FE25ULL, 0x3ECF7ACD26F3F938ULL } }, /* XSUM_XXH128_testdata[6954] */\n    { 2318, 0x000000009E3779B1ULL, { 0x354FD20E51924098ULL, 0xC012CAF6C95D647FULL } }, /* XSUM_XXH128_testdata[6955] */\n    { 2318, 0x9E3779B185EBCA8DULL, { 0xE6B8F5ECDD2BEDE7ULL, 0xC5180407F0D64737ULL } }, /* XSUM_XXH128_testdata[6956] */\n    { 2319, 0x0000000000000000ULL, { 0xB93E58276543CBFEULL, 0xF6D9737C273ACC17ULL } }, /* XSUM_XXH128_testdata[6957] */\n    { 2319, 0x000000009E3779B1ULL, { 0xF0B5D1993B59E97BULL, 0x79B7A57BC237C2A5ULL } }, /* XSUM_XXH128_testdata[6958] */\n    { 2319, 0x9E3779B185EBCA8DULL, { 0x7249F4DBA19A2F6BULL, 0x7A323E492473FFE8ULL } }, /* XSUM_XXH128_testdata[6959] */\n    { 2320, 0x0000000000000000ULL, { 0xDEAD306DC84A30E3ULL, 0x63B41E631F4B70F5ULL } }, /* XSUM_XXH128_testdata[6960] */\n    { 2320, 0x000000009E3779B1ULL, { 0x6DC2D26F7ADCB1FFULL, 0x0F86AB0DC9AAF755ULL } }, /* XSUM_XXH128_testdata[6961] */\n    { 2320, 0x9E3779B185EBCA8DULL, { 0x25A12038A67CF226ULL, 0xE46897B069936F47ULL } }, /* XSUM_XXH128_testdata[6962] */\n    { 2321, 0x0000000000000000ULL, { 0x68C9AEEC565E82B9ULL, 0xC41F6FB573FCCD73ULL } }, /* XSUM_XXH128_testdata[6963] */\n    { 2321, 0x000000009E3779B1ULL, { 0xAE457047BAAEBE99ULL, 0x065449E4B1EA2335ULL } }, /* XSUM_XXH128_testdata[6964] */\n    { 2321, 0x9E3779B185EBCA8DULL, { 0x6FDC93837DB71F1FULL, 0x49DB0D6EF08F084AULL } }, /* XSUM_XXH128_testdata[6965] */\n    { 2322, 0x0000000000000000ULL, { 0xEF1D98CB4B1C4457ULL, 0xB93AC2FCB195B9C4ULL } }, /* XSUM_XXH128_testdata[6966] */\n    { 2322, 0x000000009E3779B1ULL, { 0x2D68DC6A758F1D99ULL, 0xCA4860C4426D2E01ULL } }, /* XSUM_XXH128_testdata[6967] */\n    { 2322, 0x9E3779B185EBCA8DULL, { 0x56871B4AD7DE1080ULL, 0x987292B1BA789D86ULL } }, /* XSUM_XXH128_testdata[6968] */\n    { 2323, 0x0000000000000000ULL, { 0xB6163E363790B29BULL, 0x42B71B601B2529D6ULL } }, /* XSUM_XXH128_testdata[6969] */\n    { 2323, 0x000000009E3779B1ULL, { 0x3F6A77E0818DCAACULL, 0xF568051103650B9FULL } }, /* XSUM_XXH128_testdata[6970] */\n    { 2323, 0x9E3779B185EBCA8DULL, { 0x005293AC1F8D8089ULL, 0xD9E9B76A01AAEB49ULL } }, /* XSUM_XXH128_testdata[6971] */\n    { 2324, 0x0000000000000000ULL, { 0x9F8BC517258F98E6ULL, 0x7DDFBEAB0E3500B5ULL } }, /* XSUM_XXH128_testdata[6972] */\n    { 2324, 0x000000009E3779B1ULL, { 0xFF5F039091377776ULL, 0x88B4177C2984817DULL } }, /* XSUM_XXH128_testdata[6973] */\n    { 2324, 0x9E3779B185EBCA8DULL, { 0x7C4CE8558C514DDEULL, 0x02A5213CD9A86B7DULL } }, /* XSUM_XXH128_testdata[6974] */\n    { 2325, 0x0000000000000000ULL, { 0x177BEB437391C2B4ULL, 0xA23E6C40A128D8D3ULL } }, /* XSUM_XXH128_testdata[6975] */\n    { 2325, 0x000000009E3779B1ULL, { 0xF17B4A7D294CE5E0ULL, 0x0FE5B3E9EB258A1BULL } }, /* XSUM_XXH128_testdata[6976] */\n    { 2325, 0x9E3779B185EBCA8DULL, { 0xA71D1BD2B3918CFCULL, 0xE8F9523435FE0D3FULL } }, /* XSUM_XXH128_testdata[6977] */\n    { 2326, 0x0000000000000000ULL, { 0x105176B2B29D46EDULL, 0x45830590B5496948ULL } }, /* XSUM_XXH128_testdata[6978] */\n    { 2326, 0x000000009E3779B1ULL, { 0x6543713F6E4BE72DULL, 0x369756DB12E54EC7ULL } }, /* XSUM_XXH128_testdata[6979] */\n    { 2326, 0x9E3779B185EBCA8DULL, { 0x44914594F5678B2BULL, 0x0F500476658F8409ULL } }, /* XSUM_XXH128_testdata[6980] */\n    { 2327, 0x0000000000000000ULL, { 0x75F20D803272333FULL, 0xC7B9C29096DD6731ULL } }, /* XSUM_XXH128_testdata[6981] */\n    { 2327, 0x000000009E3779B1ULL, { 0x9C507FE1BCD95EB7ULL, 0xF8FD811A97DFD79CULL } }, /* XSUM_XXH128_testdata[6982] */\n    { 2327, 0x9E3779B185EBCA8DULL, { 0xC09622708F32C51DULL, 0x2F10FDE85E3F4DAEULL } }, /* XSUM_XXH128_testdata[6983] */\n    { 2328, 0x0000000000000000ULL, { 0xC9840B7DF3679DE5ULL, 0x28FAA955608641A4ULL } }, /* XSUM_XXH128_testdata[6984] */\n    { 2328, 0x000000009E3779B1ULL, { 0xDD0DF29864A5A812ULL, 0xE5234D6D404D8EA2ULL } }, /* XSUM_XXH128_testdata[6985] */\n    { 2328, 0x9E3779B185EBCA8DULL, { 0x0628F71DEF9CA9B9ULL, 0x53580F6AB2CE8CECULL } }, /* XSUM_XXH128_testdata[6986] */\n    { 2329, 0x0000000000000000ULL, { 0x547CD6B9CC06F4E1ULL, 0xDB8E9A95341B1D63ULL } }, /* XSUM_XXH128_testdata[6987] */\n    { 2329, 0x000000009E3779B1ULL, { 0x5C3D236A3063EE50ULL, 0xEC1C70C2DAA0EFEFULL } }, /* XSUM_XXH128_testdata[6988] */\n    { 2329, 0x9E3779B185EBCA8DULL, { 0xFCD3AB14BE7B942BULL, 0x17F6BB66862A7A7DULL } }, /* XSUM_XXH128_testdata[6989] */\n    { 2330, 0x0000000000000000ULL, { 0x00DDC3B84881B56AULL, 0xB977DFD5E0001F7BULL } }, /* XSUM_XXH128_testdata[6990] */\n    { 2330, 0x000000009E3779B1ULL, { 0xF4D2F281D7C589D2ULL, 0xABD126A939604E1AULL } }, /* XSUM_XXH128_testdata[6991] */\n    { 2330, 0x9E3779B185EBCA8DULL, { 0xBCE205376DBCA1CEULL, 0x2704064DA068E51DULL } }, /* XSUM_XXH128_testdata[6992] */\n    { 2331, 0x0000000000000000ULL, { 0xC6E1FB47CC10BD0CULL, 0x473A4B57EBB3EC9EULL } }, /* XSUM_XXH128_testdata[6993] */\n    { 2331, 0x000000009E3779B1ULL, { 0x4629AE9416D08F65ULL, 0xCFEF5EFEF74C37FBULL } }, /* XSUM_XXH128_testdata[6994] */\n    { 2331, 0x9E3779B185EBCA8DULL, { 0x5ED1015A48245D1AULL, 0x7E620CD1F07B3860ULL } }, /* XSUM_XXH128_testdata[6995] */\n    { 2332, 0x0000000000000000ULL, { 0xC203CF14C7812768ULL, 0x099D54526E296BD0ULL } }, /* XSUM_XXH128_testdata[6996] */\n    { 2332, 0x000000009E3779B1ULL, { 0xA3B800B30832ACC6ULL, 0x021F376C91EC0314ULL } }, /* XSUM_XXH128_testdata[6997] */\n    { 2332, 0x9E3779B185EBCA8DULL, { 0xAE6CED78162528BDULL, 0x97ADE860A51C8736ULL } }, /* XSUM_XXH128_testdata[6998] */\n    { 2333, 0x0000000000000000ULL, { 0xDB94037DD38C9779ULL, 0xD4E5BA171A83637FULL } }, /* XSUM_XXH128_testdata[6999] */\n    { 2333, 0x000000009E3779B1ULL, { 0xA33F760BD54B358AULL, 0xC9DB36BDBCDA82DBULL } }, /* XSUM_XXH128_testdata[7000] */\n    { 2333, 0x9E3779B185EBCA8DULL, { 0x0C4467D21B8A15B8ULL, 0xABFBFDA919EC8047ULL } }, /* XSUM_XXH128_testdata[7001] */\n    { 2334, 0x0000000000000000ULL, { 0x25219C6EACA8B876ULL, 0xF59AFEF4A7809297ULL } }, /* XSUM_XXH128_testdata[7002] */\n    { 2334, 0x000000009E3779B1ULL, { 0xB07B51E9B35C788CULL, 0x07CBB2A9E82A175AULL } }, /* XSUM_XXH128_testdata[7003] */\n    { 2334, 0x9E3779B185EBCA8DULL, { 0x237F51AF413D775CULL, 0x9562C0FCC1E65027ULL } }, /* XSUM_XXH128_testdata[7004] */\n    { 2335, 0x0000000000000000ULL, { 0x84761CF8AD8FDCDCULL, 0x72197EE0803D4D54ULL } }, /* XSUM_XXH128_testdata[7005] */\n    { 2335, 0x000000009E3779B1ULL, { 0xD5EEC66427773E78ULL, 0xF8918707A42CF0BCULL } }, /* XSUM_XXH128_testdata[7006] */\n    { 2335, 0x9E3779B185EBCA8DULL, { 0x51034B3E374768BEULL, 0x4EC3D806D3B8807EULL } }, /* XSUM_XXH128_testdata[7007] */\n    { 2336, 0x0000000000000000ULL, { 0x646ADDC91C20C0D1ULL, 0xED3A0354D9ADAED9ULL } }, /* XSUM_XXH128_testdata[7008] */\n    { 2336, 0x000000009E3779B1ULL, { 0xFCE59347BEBB1EFBULL, 0x29167E5F5E38DC46ULL } }, /* XSUM_XXH128_testdata[7009] */\n    { 2336, 0x9E3779B185EBCA8DULL, { 0x8A6FA9B4EE2D3EDCULL, 0xD11AC9D835D38258ULL } }, /* XSUM_XXH128_testdata[7010] */\n    { 2337, 0x0000000000000000ULL, { 0x7C7CC3761B3E4ED1ULL, 0x4CD180F43E9E6B9AULL } }, /* XSUM_XXH128_testdata[7011] */\n    { 2337, 0x000000009E3779B1ULL, { 0x6B0601A16C0F6D06ULL, 0x72AE61B5DD2D4821ULL } }, /* XSUM_XXH128_testdata[7012] */\n    { 2337, 0x9E3779B185EBCA8DULL, { 0x9773B70EEF4BE554ULL, 0x94B446DF130B7B27ULL } }, /* XSUM_XXH128_testdata[7013] */\n    { 2338, 0x0000000000000000ULL, { 0xF8D4E0C09F0B9413ULL, 0x6463DC93E96916F9ULL } }, /* XSUM_XXH128_testdata[7014] */\n    { 2338, 0x000000009E3779B1ULL, { 0x6EBA315255B90BB8ULL, 0xF2554C98413F521FULL } }, /* XSUM_XXH128_testdata[7015] */\n    { 2338, 0x9E3779B185EBCA8DULL, { 0xC28F33A33B3C0D06ULL, 0xA71630ED140EE360ULL } }, /* XSUM_XXH128_testdata[7016] */\n    { 2339, 0x0000000000000000ULL, { 0xE90E496E95E28D0AULL, 0x4A951F0635A90D14ULL } }, /* XSUM_XXH128_testdata[7017] */\n    { 2339, 0x000000009E3779B1ULL, { 0x71DBA7B98DF6D1CFULL, 0xA1B6D3C4F80FA887ULL } }, /* XSUM_XXH128_testdata[7018] */\n    { 2339, 0x9E3779B185EBCA8DULL, { 0xB73CB73CB16C6B32ULL, 0x20EF28C2DC0E177CULL } }, /* XSUM_XXH128_testdata[7019] */\n    { 2340, 0x0000000000000000ULL, { 0xB4671C7890A22982ULL, 0x73215607BDFAD740ULL } }, /* XSUM_XXH128_testdata[7020] */\n    { 2340, 0x000000009E3779B1ULL, { 0xEE10AFF52F948EA4ULL, 0x8C102041452C6BB0ULL } }, /* XSUM_XXH128_testdata[7021] */\n    { 2340, 0x9E3779B185EBCA8DULL, { 0xD09CFEC7F9E99B8AULL, 0x6FD403C5CAD2E7E6ULL } }, /* XSUM_XXH128_testdata[7022] */\n    { 2341, 0x0000000000000000ULL, { 0x8165023FDB696528ULL, 0xF7681C1221FFEF4CULL } }, /* XSUM_XXH128_testdata[7023] */\n    { 2341, 0x000000009E3779B1ULL, { 0xCFD7BCC2375ED8B1ULL, 0xD5FD66CE36BDF43DULL } }, /* XSUM_XXH128_testdata[7024] */\n    { 2341, 0x9E3779B185EBCA8DULL, { 0xC75F1A3C09DC2EC0ULL, 0x8A9EF6092F37A4B4ULL } }, /* XSUM_XXH128_testdata[7025] */\n    { 2342, 0x0000000000000000ULL, { 0x3645D41D79592A95ULL, 0x83CCBF7366456690ULL } }, /* XSUM_XXH128_testdata[7026] */\n    { 2342, 0x000000009E3779B1ULL, { 0xA4A2798502716497ULL, 0x6B4ECF42C3A41F91ULL } }, /* XSUM_XXH128_testdata[7027] */\n    { 2342, 0x9E3779B185EBCA8DULL, { 0x6F4452A6467783B0ULL, 0xF0DA8C163E7B6F4CULL } }, /* XSUM_XXH128_testdata[7028] */\n    { 2343, 0x0000000000000000ULL, { 0xF1ED40282C8884CBULL, 0xBACDB33D37A0CAC9ULL } }, /* XSUM_XXH128_testdata[7029] */\n    { 2343, 0x000000009E3779B1ULL, { 0xBC25B37D352164A1ULL, 0x21F699D82FB0EA71ULL } }, /* XSUM_XXH128_testdata[7030] */\n    { 2343, 0x9E3779B185EBCA8DULL, { 0xC587035C7782FDDAULL, 0x5798C8C013222E56ULL } }, /* XSUM_XXH128_testdata[7031] */\n    { 2344, 0x0000000000000000ULL, { 0xA96F48DD5C721FBAULL, 0x2F62EC3EBE6CB948ULL } }, /* XSUM_XXH128_testdata[7032] */\n    { 2344, 0x000000009E3779B1ULL, { 0x44AC3DDAF35B3C0AULL, 0xC0EFE3E0F5F37C2DULL } }, /* XSUM_XXH128_testdata[7033] */\n    { 2344, 0x9E3779B185EBCA8DULL, { 0xD0ABE3F8FD5C7916ULL, 0xFB015D63AA47C599ULL } }, /* XSUM_XXH128_testdata[7034] */\n    { 2345, 0x0000000000000000ULL, { 0xC19A80FAAECE9A70ULL, 0x6A929B214610B1DBULL } }, /* XSUM_XXH128_testdata[7035] */\n    { 2345, 0x000000009E3779B1ULL, { 0xA25993320DB3E6A5ULL, 0x2228BFE8F542AAFBULL } }, /* XSUM_XXH128_testdata[7036] */\n    { 2345, 0x9E3779B185EBCA8DULL, { 0x6F2D171632F42DB9ULL, 0xAABFD0DA40D340DDULL } }, /* XSUM_XXH128_testdata[7037] */\n    { 2346, 0x0000000000000000ULL, { 0x897BE763FFB155DEULL, 0xF83FD0AF6DC23160ULL } }, /* XSUM_XXH128_testdata[7038] */\n    { 2346, 0x000000009E3779B1ULL, { 0xD88ACDA970FF77AEULL, 0xD0DDB3AE9F1FDD4FULL } }, /* XSUM_XXH128_testdata[7039] */\n    { 2346, 0x9E3779B185EBCA8DULL, { 0xD63E55AE9C453BFBULL, 0x3308BDCBB465FDCEULL } }, /* XSUM_XXH128_testdata[7040] */\n    { 2347, 0x0000000000000000ULL, { 0x4D7CF54782AF36FCULL, 0x3DF8DEA15016BF04ULL } }, /* XSUM_XXH128_testdata[7041] */\n    { 2347, 0x000000009E3779B1ULL, { 0xA598B32F9F9FCC25ULL, 0x5FAB8CB6A6B7B335ULL } }, /* XSUM_XXH128_testdata[7042] */\n    { 2347, 0x9E3779B185EBCA8DULL, { 0x9D7706F5DBC683A6ULL, 0xEE1FBBA4879E4460ULL } }, /* XSUM_XXH128_testdata[7043] */\n    { 2348, 0x0000000000000000ULL, { 0x384DA1B1646A9E71ULL, 0x854482DE82B3CBFCULL } }, /* XSUM_XXH128_testdata[7044] */\n    { 2348, 0x000000009E3779B1ULL, { 0xB42BB78C35607A26ULL, 0xC5C0E36E2D77C04DULL } }, /* XSUM_XXH128_testdata[7045] */\n    { 2348, 0x9E3779B185EBCA8DULL, { 0x8C629241D98ACC4EULL, 0x88FBCEEDE16EEE82ULL } }, /* XSUM_XXH128_testdata[7046] */\n    { 2349, 0x0000000000000000ULL, { 0x9B207D3155536F74ULL, 0x6BAC29B04F719680ULL } }, /* XSUM_XXH128_testdata[7047] */\n    { 2349, 0x000000009E3779B1ULL, { 0x28EF65B04FD3497AULL, 0xFD72A845C8E9EFA6ULL } }, /* XSUM_XXH128_testdata[7048] */\n    { 2349, 0x9E3779B185EBCA8DULL, { 0x89D7E8E4EC5494E3ULL, 0x9E99E3CD3609D137ULL } }, /* XSUM_XXH128_testdata[7049] */\n    { 2350, 0x0000000000000000ULL, { 0x8AA5382300DB7666ULL, 0x75B2FC0E01434131ULL } }, /* XSUM_XXH128_testdata[7050] */\n    { 2350, 0x000000009E3779B1ULL, { 0x6A484BC934479A43ULL, 0xA6BD02750E9CE61BULL } }, /* XSUM_XXH128_testdata[7051] */\n    { 2350, 0x9E3779B185EBCA8DULL, { 0x2B8D20FA052D2516ULL, 0xAA065CD325030AE4ULL } }, /* XSUM_XXH128_testdata[7052] */\n    { 2351, 0x0000000000000000ULL, { 0xE12F860E909E7476ULL, 0x53EC22CEC54C3D45ULL } }, /* XSUM_XXH128_testdata[7053] */\n    { 2351, 0x000000009E3779B1ULL, { 0xDB7068028EB6F1F6ULL, 0x9D6C7DA279B8568DULL } }, /* XSUM_XXH128_testdata[7054] */\n    { 2351, 0x9E3779B185EBCA8DULL, { 0x4A7D9E732CF06A13ULL, 0x67B5C166513044E9ULL } }, /* XSUM_XXH128_testdata[7055] */\n    { 2352, 0x0000000000000000ULL, { 0xE6E05AF95207F6D3ULL, 0x05E2EF125AD06976ULL } }, /* XSUM_XXH128_testdata[7056] */\n    { 2352, 0x000000009E3779B1ULL, { 0x1801CF6671949621ULL, 0xB2750E6230BB194EULL } }, /* XSUM_XXH128_testdata[7057] */\n    { 2352, 0x9E3779B185EBCA8DULL, { 0x5FF208793633440DULL, 0xD4FD2EC422CF8965ULL } }, /* XSUM_XXH128_testdata[7058] */\n    { 2353, 0x0000000000000000ULL, { 0xC4B549BA270A8004ULL, 0x58A4076A3E87D363ULL } }, /* XSUM_XXH128_testdata[7059] */\n    { 2353, 0x000000009E3779B1ULL, { 0xF32A8006DA29BB1BULL, 0x028CEFD1F718B208ULL } }, /* XSUM_XXH128_testdata[7060] */\n    { 2353, 0x9E3779B185EBCA8DULL, { 0xC66B48806F287F63ULL, 0x6D45B7051DB53131ULL } }, /* XSUM_XXH128_testdata[7061] */\n    { 2354, 0x0000000000000000ULL, { 0xC7803065E2803D31ULL, 0x9D8EA1DE4D08DAF6ULL } }, /* XSUM_XXH128_testdata[7062] */\n    { 2354, 0x000000009E3779B1ULL, { 0x0801FD8D2C535036ULL, 0x28D054DD0A79CCAFULL } }, /* XSUM_XXH128_testdata[7063] */\n    { 2354, 0x9E3779B185EBCA8DULL, { 0xB2D6B5A38A32F560ULL, 0x83A205A957278E20ULL } }, /* XSUM_XXH128_testdata[7064] */\n    { 2355, 0x0000000000000000ULL, { 0xC7500A98B2BFF9AEULL, 0x456E4069B6BC2F0DULL } }, /* XSUM_XXH128_testdata[7065] */\n    { 2355, 0x000000009E3779B1ULL, { 0xC027D4A560FA2C56ULL, 0x57CD341E30736B4AULL } }, /* XSUM_XXH128_testdata[7066] */\n    { 2355, 0x9E3779B185EBCA8DULL, { 0x562D14A99EAD5989ULL, 0x8726155A76A69C0DULL } }, /* XSUM_XXH128_testdata[7067] */\n    { 2356, 0x0000000000000000ULL, { 0x6CA7DF44BE47E963ULL, 0xE33BA5437C38DA9EULL } }, /* XSUM_XXH128_testdata[7068] */\n    { 2356, 0x000000009E3779B1ULL, { 0x6497C3B303BF15E4ULL, 0xC183A6CF124C8FAAULL } }, /* XSUM_XXH128_testdata[7069] */\n    { 2356, 0x9E3779B185EBCA8DULL, { 0x3AD492F595F77BAEULL, 0x573611C9E038CC40ULL } }, /* XSUM_XXH128_testdata[7070] */\n    { 2357, 0x0000000000000000ULL, { 0x26F4AC8EFB39794BULL, 0xAFFC916FC9200FD7ULL } }, /* XSUM_XXH128_testdata[7071] */\n    { 2357, 0x000000009E3779B1ULL, { 0xC5A75884893B98D9ULL, 0xF772F94E60EDD7CBULL } }, /* XSUM_XXH128_testdata[7072] */\n    { 2357, 0x9E3779B185EBCA8DULL, { 0xFDB28975A00FBF75ULL, 0x97F33A83397AB16FULL } }, /* XSUM_XXH128_testdata[7073] */\n    { 2358, 0x0000000000000000ULL, { 0x89396B87DA30246FULL, 0x75C593383F9B9851ULL } }, /* XSUM_XXH128_testdata[7074] */\n    { 2358, 0x000000009E3779B1ULL, { 0x962277327BC5F7A7ULL, 0xF033202852E9BC48ULL } }, /* XSUM_XXH128_testdata[7075] */\n    { 2358, 0x9E3779B185EBCA8DULL, { 0x78C3FBE50A336A70ULL, 0xED44B432F275D778ULL } }, /* XSUM_XXH128_testdata[7076] */\n    { 2359, 0x0000000000000000ULL, { 0x5F1D193EFE8747BDULL, 0x232654A933F5FC70ULL } }, /* XSUM_XXH128_testdata[7077] */\n    { 2359, 0x000000009E3779B1ULL, { 0x0826F38A40E8A46DULL, 0x2756C3AA36382463ULL } }, /* XSUM_XXH128_testdata[7078] */\n    { 2359, 0x9E3779B185EBCA8DULL, { 0xF7DE5F7358D5A96FULL, 0x0210DAA04B603AA5ULL } }, /* XSUM_XXH128_testdata[7079] */\n    { 2360, 0x0000000000000000ULL, { 0xEF123E59AB08BFAFULL, 0xE98A68B9D3A72C41ULL } }, /* XSUM_XXH128_testdata[7080] */\n    { 2360, 0x000000009E3779B1ULL, { 0xA521059A8910958AULL, 0x424BB63F2DC9F35EULL } }, /* XSUM_XXH128_testdata[7081] */\n    { 2360, 0x9E3779B185EBCA8DULL, { 0x235D1359CF0B0F68ULL, 0xF01EFC8E9F7E54FEULL } }, /* XSUM_XXH128_testdata[7082] */\n    { 2361, 0x0000000000000000ULL, { 0x400D81A69F810FCFULL, 0x0A94490E097B899BULL } }, /* XSUM_XXH128_testdata[7083] */\n    { 2361, 0x000000009E3779B1ULL, { 0xD78F3C75AB5D9800ULL, 0x3DC924DA3D1B7D97ULL } }, /* XSUM_XXH128_testdata[7084] */\n    { 2361, 0x9E3779B185EBCA8DULL, { 0x5A148B49DA75B74CULL, 0x6528B1E494D43A29ULL } }, /* XSUM_XXH128_testdata[7085] */\n    { 2362, 0x0000000000000000ULL, { 0x0A3AC0A24D2ECAC1ULL, 0x6FDC2438EC984052ULL } }, /* XSUM_XXH128_testdata[7086] */\n    { 2362, 0x000000009E3779B1ULL, { 0x579517B7C8BF44D9ULL, 0x8C5C9629188D1F43ULL } }, /* XSUM_XXH128_testdata[7087] */\n    { 2362, 0x9E3779B185EBCA8DULL, { 0xE01DE938B8193FE3ULL, 0xFB5FF8F74428987BULL } }, /* XSUM_XXH128_testdata[7088] */\n    { 2363, 0x0000000000000000ULL, { 0x383581330EFB7EF0ULL, 0x90750697F10818DEULL } }, /* XSUM_XXH128_testdata[7089] */\n    { 2363, 0x000000009E3779B1ULL, { 0xF7FB87955F9DC6F1ULL, 0x919BA3D4FAB9F660ULL } }, /* XSUM_XXH128_testdata[7090] */\n    { 2363, 0x9E3779B185EBCA8DULL, { 0xEADA25B2100BFCF8ULL, 0x3BF306F0E8BFFC72ULL } }, /* XSUM_XXH128_testdata[7091] */\n    { 2364, 0x0000000000000000ULL, { 0xBD10928B3A5C1EE5ULL, 0x2EB9B9C76DCC96DFULL } }, /* XSUM_XXH128_testdata[7092] */\n    { 2364, 0x000000009E3779B1ULL, { 0x6F46E7B51EE09A31ULL, 0xE877CB6AE32C2A82ULL } }, /* XSUM_XXH128_testdata[7093] */\n    { 2364, 0x9E3779B185EBCA8DULL, { 0xFDD30758359B8B48ULL, 0xE7EBA2CCEF4F3C97ULL } }, /* XSUM_XXH128_testdata[7094] */\n    { 2365, 0x0000000000000000ULL, { 0x4AD7F9F1BF8D2D6EULL, 0x7B93F948C1986625ULL } }, /* XSUM_XXH128_testdata[7095] */\n    { 2365, 0x000000009E3779B1ULL, { 0x32698D96EF1FCB3AULL, 0xAE7463BA79F1F73DULL } }, /* XSUM_XXH128_testdata[7096] */\n    { 2365, 0x9E3779B185EBCA8DULL, { 0xA267CE28E79A6282ULL, 0x419A23DCBD908B9BULL } }, /* XSUM_XXH128_testdata[7097] */\n    { 2366, 0x0000000000000000ULL, { 0xAE5743D5B81D5B9EULL, 0xB5DFCD5C308345E5ULL } }, /* XSUM_XXH128_testdata[7098] */\n    { 2366, 0x000000009E3779B1ULL, { 0xD0B933390DBCBE3EULL, 0xE06E443B8F416577ULL } }, /* XSUM_XXH128_testdata[7099] */\n    { 2366, 0x9E3779B185EBCA8DULL, { 0xFCEAD1CC5E07B6A9ULL, 0x93423D122F4DB3EAULL } }, /* XSUM_XXH128_testdata[7100] */\n    { 2367, 0x0000000000000000ULL, { 0xCB37AEB9E5D361EDULL, 0xE89C0F6FF369B427ULL } }, /* XSUM_XXH128_testdata[7101] */\n    { 2367, 0x000000009E3779B1ULL, { 0x6F5360AE69C2F406ULL, 0xD23AAE4B76C31ECBULL } }, /* XSUM_XXH128_testdata[7102] */\n    { 2367, 0x9E3779B185EBCA8DULL, { 0xD2DB3415B942B42AULL, 0xCCB7A94CCA1A6496ULL } }, /* XSUM_XXH128_testdata[7103] */\n    { 2368, 0x0000000000000000ULL, { 0x7BF80846CEB7121FULL, 0x7670107C41F0B6A8ULL } }, /* XSUM_XXH128_testdata[7104] */\n    { 2368, 0x000000009E3779B1ULL, { 0x0A3C19A3D11F4121ULL, 0xF18564A128D1DD22ULL } }, /* XSUM_XXH128_testdata[7105] */\n    { 2368, 0x9E3779B185EBCA8DULL, { 0xDAC21692ACD4E7B6ULL, 0x6781E68AB209D7C4ULL } }, /* XSUM_XXH128_testdata[7106] */\n    { 2369, 0x0000000000000000ULL, { 0xAC9EF0983F8A4E2DULL, 0x1B4CA8473AEF3A22ULL } }, /* XSUM_XXH128_testdata[7107] */\n    { 2369, 0x000000009E3779B1ULL, { 0x64F97E715B8FEED3ULL, 0x0EAFF8328743357BULL } }, /* XSUM_XXH128_testdata[7108] */\n    { 2369, 0x9E3779B185EBCA8DULL, { 0x1EC405082AC801E7ULL, 0xAAEFAA6C8A215280ULL } }, /* XSUM_XXH128_testdata[7109] */\n    { 2370, 0x0000000000000000ULL, { 0x2D634985896B31D0ULL, 0xB079DF931EF6D33CULL } }, /* XSUM_XXH128_testdata[7110] */\n    { 2370, 0x000000009E3779B1ULL, { 0xDB44184F8402707DULL, 0xD8C1999D4965EAEAULL } }, /* XSUM_XXH128_testdata[7111] */\n    { 2370, 0x9E3779B185EBCA8DULL, { 0xD1917CFB6834266CULL, 0x867822B735ABD898ULL } }, /* XSUM_XXH128_testdata[7112] */\n    { 2371, 0x0000000000000000ULL, { 0xAB602C01606BF9CCULL, 0x9AE4CD773FFE6D90ULL } }, /* XSUM_XXH128_testdata[7113] */\n    { 2371, 0x000000009E3779B1ULL, { 0xEBEB31880DCEA547ULL, 0xA8034166B6961B92ULL } }, /* XSUM_XXH128_testdata[7114] */\n    { 2371, 0x9E3779B185EBCA8DULL, { 0xEE3535106BCE8956ULL, 0x127234786DE8A583ULL } }, /* XSUM_XXH128_testdata[7115] */\n    { 2372, 0x0000000000000000ULL, { 0x9FC8DCA3B47EA5ADULL, 0x6E3C721446A5A1A6ULL } }, /* XSUM_XXH128_testdata[7116] */\n    { 2372, 0x000000009E3779B1ULL, { 0x6A87F930F6C27602ULL, 0x9A92C31C05C4C45CULL } }, /* XSUM_XXH128_testdata[7117] */\n    { 2372, 0x9E3779B185EBCA8DULL, { 0x1418AD973790D956ULL, 0xDE23D604A83CDE14ULL } }, /* XSUM_XXH128_testdata[7118] */\n    { 2373, 0x0000000000000000ULL, { 0xF9AEEDEB5DBFFA68ULL, 0x20C2891FC66D8FF9ULL } }, /* XSUM_XXH128_testdata[7119] */\n    { 2373, 0x000000009E3779B1ULL, { 0xBFAB4230A81BC302ULL, 0x350B90248F2FAAE8ULL } }, /* XSUM_XXH128_testdata[7120] */\n    { 2373, 0x9E3779B185EBCA8DULL, { 0x25FE2515747A5E12ULL, 0x1F14DCE725ADC9F9ULL } }, /* XSUM_XXH128_testdata[7121] */\n    { 2374, 0x0000000000000000ULL, { 0x8175A66989F79873ULL, 0xA243BB5D423305F2ULL } }, /* XSUM_XXH128_testdata[7122] */\n    { 2374, 0x000000009E3779B1ULL, { 0xF7C50AD5967C1D73ULL, 0x6E2126E78ED2E6EEULL } }, /* XSUM_XXH128_testdata[7123] */\n    { 2374, 0x9E3779B185EBCA8DULL, { 0xFD3270C4714D82C8ULL, 0x6378D48E18A0317FULL } }, /* XSUM_XXH128_testdata[7124] */\n    { 2375, 0x0000000000000000ULL, { 0x275FF23CE3DC4593ULL, 0x46F35D0C2C0FEC3AULL } }, /* XSUM_XXH128_testdata[7125] */\n    { 2375, 0x000000009E3779B1ULL, { 0x4606D1984C2CFD37ULL, 0xF1F575A752F2E987ULL } }, /* XSUM_XXH128_testdata[7126] */\n    { 2375, 0x9E3779B185EBCA8DULL, { 0x5C6AE4A0B8D3E584ULL, 0xCD42423A753E3C75ULL } }, /* XSUM_XXH128_testdata[7127] */\n    { 2376, 0x0000000000000000ULL, { 0x297633E6D89244CEULL, 0xBF48305F03C71B60ULL } }, /* XSUM_XXH128_testdata[7128] */\n    { 2376, 0x000000009E3779B1ULL, { 0x993AAFB34989D003ULL, 0x923457FEC8BDF5B8ULL } }, /* XSUM_XXH128_testdata[7129] */\n    { 2376, 0x9E3779B185EBCA8DULL, { 0xF880C7918F0E8F6FULL, 0x90C788ACBB2646F1ULL } }, /* XSUM_XXH128_testdata[7130] */\n    { 2377, 0x0000000000000000ULL, { 0x7D01B42A26A3AA4FULL, 0x8CF8E51C38B30CB6ULL } }, /* XSUM_XXH128_testdata[7131] */\n    { 2377, 0x000000009E3779B1ULL, { 0x512263DAB581AA26ULL, 0xDD9A0CFBBA67AD07ULL } }, /* XSUM_XXH128_testdata[7132] */\n    { 2377, 0x9E3779B185EBCA8DULL, { 0x9B3152CDB0E90B93ULL, 0xA76423578EB1C50EULL } }, /* XSUM_XXH128_testdata[7133] */\n    { 2378, 0x0000000000000000ULL, { 0x9A208842D0BB08F6ULL, 0x33B054DF812AAFBEULL } }, /* XSUM_XXH128_testdata[7134] */\n    { 2378, 0x000000009E3779B1ULL, { 0x72899DE7E7F64651ULL, 0x216A190267854CE9ULL } }, /* XSUM_XXH128_testdata[7135] */\n    { 2378, 0x9E3779B185EBCA8DULL, { 0x3A2E4AEB216684ECULL, 0x80A28EDA2CB952ABULL } }, /* XSUM_XXH128_testdata[7136] */\n    { 2379, 0x0000000000000000ULL, { 0x40974B3BF1A11D89ULL, 0x1939ED77A4EE400CULL } }, /* XSUM_XXH128_testdata[7137] */\n    { 2379, 0x000000009E3779B1ULL, { 0x9C06CE31AF09E55FULL, 0xB11540235A9B2A7EULL } }, /* XSUM_XXH128_testdata[7138] */\n    { 2379, 0x9E3779B185EBCA8DULL, { 0xBA04552CCB5B3E3CULL, 0x9FA8013319A79127ULL } }, /* XSUM_XXH128_testdata[7139] */\n    { 2380, 0x0000000000000000ULL, { 0x2F3A828F6C4CDAA4ULL, 0x2F84B8DE7578627BULL } }, /* XSUM_XXH128_testdata[7140] */\n    { 2380, 0x000000009E3779B1ULL, { 0xD825670E9E2D625FULL, 0x6E24E83E3EF1EB01ULL } }, /* XSUM_XXH128_testdata[7141] */\n    { 2380, 0x9E3779B185EBCA8DULL, { 0xAEEA8CD6166097B9ULL, 0x98874A95FC875BCFULL } }, /* XSUM_XXH128_testdata[7142] */\n    { 2381, 0x0000000000000000ULL, { 0x7A2AF424699B079CULL, 0xB842C7473C15251CULL } }, /* XSUM_XXH128_testdata[7143] */\n    { 2381, 0x000000009E3779B1ULL, { 0x8DE454A4089E75F7ULL, 0x62E8230D45DD1725ULL } }, /* XSUM_XXH128_testdata[7144] */\n    { 2381, 0x9E3779B185EBCA8DULL, { 0xC8D43B8870FD4CBBULL, 0x8A729759B576BB24ULL } }, /* XSUM_XXH128_testdata[7145] */\n    { 2382, 0x0000000000000000ULL, { 0x9304DE8DA31BD496ULL, 0xD5907FE54648F3A1ULL } }, /* XSUM_XXH128_testdata[7146] */\n    { 2382, 0x000000009E3779B1ULL, { 0xE95261F216882F04ULL, 0x5D4433290AF04EFEULL } }, /* XSUM_XXH128_testdata[7147] */\n    { 2382, 0x9E3779B185EBCA8DULL, { 0x34593C6BFFA5D569ULL, 0x2B1A80C2A6BCE6DAULL } }, /* XSUM_XXH128_testdata[7148] */\n    { 2383, 0x0000000000000000ULL, { 0x80D3BA1CA3F56190ULL, 0xBB6D4440B527430CULL } }, /* XSUM_XXH128_testdata[7149] */\n    { 2383, 0x000000009E3779B1ULL, { 0xA106EC5103A67104ULL, 0x6A8483C57836AAD2ULL } }, /* XSUM_XXH128_testdata[7150] */\n    { 2383, 0x9E3779B185EBCA8DULL, { 0xDDB69D91088C128AULL, 0x9A5CB44C3F4F9A7CULL } }, /* XSUM_XXH128_testdata[7151] */\n    { 2384, 0x0000000000000000ULL, { 0x441C9D94F2B9C0DFULL, 0x0E62857F2D144E28ULL } }, /* XSUM_XXH128_testdata[7152] */\n    { 2384, 0x000000009E3779B1ULL, { 0x77B49611954E4AB7ULL, 0x63DB46E449E34995ULL } }, /* XSUM_XXH128_testdata[7153] */\n    { 2384, 0x9E3779B185EBCA8DULL, { 0x55D3007BA3042A2AULL, 0x5F6989028266AD18ULL } }, /* XSUM_XXH128_testdata[7154] */\n    { 2385, 0x0000000000000000ULL, { 0xE33C4DD70CAEBEE7ULL, 0xBDBA45AD34270FAEULL } }, /* XSUM_XXH128_testdata[7155] */\n    { 2385, 0x000000009E3779B1ULL, { 0xD57C13CE5F7665F7ULL, 0x2BF25187CB7905B1ULL } }, /* XSUM_XXH128_testdata[7156] */\n    { 2385, 0x9E3779B185EBCA8DULL, { 0x0FB197212BBB263CULL, 0x7F84AF32556E28C0ULL } }, /* XSUM_XXH128_testdata[7157] */\n    { 2386, 0x0000000000000000ULL, { 0x06B51492A0779957ULL, 0x0B3275704D931FDBULL } }, /* XSUM_XXH128_testdata[7158] */\n    { 2386, 0x000000009E3779B1ULL, { 0x5393D8CB35640C41ULL, 0xA8E00C9EC82C758AULL } }, /* XSUM_XXH128_testdata[7159] */\n    { 2386, 0x9E3779B185EBCA8DULL, { 0xD1826B20858877D2ULL, 0x81573635C09C17A9ULL } }, /* XSUM_XXH128_testdata[7160] */\n    { 2387, 0x0000000000000000ULL, { 0x17382140103BDFA5ULL, 0x490F1053DD29C313ULL } }, /* XSUM_XXH128_testdata[7161] */\n    { 2387, 0x000000009E3779B1ULL, { 0xEB79D8350F453C27ULL, 0x52DC7A8DF599796EULL } }, /* XSUM_XXH128_testdata[7162] */\n    { 2387, 0x9E3779B185EBCA8DULL, { 0x7CDB9A8AB644F256ULL, 0xD66FF7E00FD615B5ULL } }, /* XSUM_XXH128_testdata[7163] */\n    { 2388, 0x0000000000000000ULL, { 0xC90AC3182F1ABB4DULL, 0x1BDABBB059660631ULL } }, /* XSUM_XXH128_testdata[7164] */\n    { 2388, 0x000000009E3779B1ULL, { 0x3B945CD52B0B376FULL, 0x11C8DEFB99B128EDULL } }, /* XSUM_XXH128_testdata[7165] */\n    { 2388, 0x9E3779B185EBCA8DULL, { 0xA399378375830CCEULL, 0x7413DBE941148DF7ULL } }, /* XSUM_XXH128_testdata[7166] */\n    { 2389, 0x0000000000000000ULL, { 0x4BF7F88719686A38ULL, 0xC87F45080F036D03ULL } }, /* XSUM_XXH128_testdata[7167] */\n    { 2389, 0x000000009E3779B1ULL, { 0x91E3262B20139A6EULL, 0xF37DDE4381C5BD2DULL } }, /* XSUM_XXH128_testdata[7168] */\n    { 2389, 0x9E3779B185EBCA8DULL, { 0x801FD351A856CED5ULL, 0xF422F71C06FFA40BULL } }, /* XSUM_XXH128_testdata[7169] */\n    { 2390, 0x0000000000000000ULL, { 0x2A54054B3745B0E8ULL, 0x7E63DCAF0CF6C2BEULL } }, /* XSUM_XXH128_testdata[7170] */\n    { 2390, 0x000000009E3779B1ULL, { 0x31B64EF8D60AF67BULL, 0x845D787CD18734D1ULL } }, /* XSUM_XXH128_testdata[7171] */\n    { 2390, 0x9E3779B185EBCA8DULL, { 0x32AC9D7484C16CFCULL, 0xA6226F05DAA8D837ULL } }, /* XSUM_XXH128_testdata[7172] */\n    { 2391, 0x0000000000000000ULL, { 0xB42E2F3FBF9C7FF6ULL, 0xD36839FD7D918F12ULL } }, /* XSUM_XXH128_testdata[7173] */\n    { 2391, 0x000000009E3779B1ULL, { 0x843895439B9BF4EBULL, 0x7D090CB7A0F8A8EFULL } }, /* XSUM_XXH128_testdata[7174] */\n    { 2391, 0x9E3779B185EBCA8DULL, { 0x2ECCD134F6208ABAULL, 0x6B3588BD4D58BEF1ULL } }, /* XSUM_XXH128_testdata[7175] */\n    { 2392, 0x0000000000000000ULL, { 0xE29C067EEB709C6DULL, 0x4250C3DEDCD60639ULL } }, /* XSUM_XXH128_testdata[7176] */\n    { 2392, 0x000000009E3779B1ULL, { 0xED6951917E35438FULL, 0x4D352668EDD1E0CFULL } }, /* XSUM_XXH128_testdata[7177] */\n    { 2392, 0x9E3779B185EBCA8DULL, { 0x725625789A95FAA0ULL, 0xDB72B96203E65E46ULL } }, /* XSUM_XXH128_testdata[7178] */\n    { 2393, 0x0000000000000000ULL, { 0x363009F768016562ULL, 0x4F9AC584DEAF07BBULL } }, /* XSUM_XXH128_testdata[7179] */\n    { 2393, 0x000000009E3779B1ULL, { 0x9403C4BA8DF6C002ULL, 0xF362D001FAA566A3ULL } }, /* XSUM_XXH128_testdata[7180] */\n    { 2393, 0x9E3779B185EBCA8DULL, { 0x138C189F0AFE235FULL, 0x43555C34322F6C36ULL } }, /* XSUM_XXH128_testdata[7181] */\n    { 2394, 0x0000000000000000ULL, { 0xF1C5DC9942E866F8ULL, 0x9902B1B36E345520ULL } }, /* XSUM_XXH128_testdata[7182] */\n    { 2394, 0x000000009E3779B1ULL, { 0x9FE753C9A513AAE5ULL, 0x750A4B3A78B915CFULL } }, /* XSUM_XXH128_testdata[7183] */\n    { 2394, 0x9E3779B185EBCA8DULL, { 0xCBB7386F910F0A8EULL, 0x947F04DDE95CDF98ULL } }, /* XSUM_XXH128_testdata[7184] */\n    { 2395, 0x0000000000000000ULL, { 0x815C06F88504756EULL, 0xE1528A592A773E08ULL } }, /* XSUM_XXH128_testdata[7185] */\n    { 2395, 0x000000009E3779B1ULL, { 0x6F1CBB20B6560061ULL, 0xABD39BB5F645D158ULL } }, /* XSUM_XXH128_testdata[7186] */\n    { 2395, 0x9E3779B185EBCA8DULL, { 0x781575D8B8AE688CULL, 0xBF07FDB0DD5B39EDULL } }, /* XSUM_XXH128_testdata[7187] */\n    { 2396, 0x0000000000000000ULL, { 0x0A94F1D7A46A7F11ULL, 0x64860326B2A0E8A2ULL } }, /* XSUM_XXH128_testdata[7188] */\n    { 2396, 0x000000009E3779B1ULL, { 0x41EC2DD47F895182ULL, 0x9974DF003D5BDFE2ULL } }, /* XSUM_XXH128_testdata[7189] */\n    { 2396, 0x9E3779B185EBCA8DULL, { 0xF3AF477BD3FDDFE3ULL, 0xCE01135CC5CA60EEULL } }, /* XSUM_XXH128_testdata[7190] */\n    { 2397, 0x0000000000000000ULL, { 0x7E46BD55D126BAB4ULL, 0x86DF2C629555234FULL } }, /* XSUM_XXH128_testdata[7191] */\n    { 2397, 0x000000009E3779B1ULL, { 0xF0CF410B1D50DFC9ULL, 0x781F45076B2CE622ULL } }, /* XSUM_XXH128_testdata[7192] */\n    { 2397, 0x9E3779B185EBCA8DULL, { 0x530FCDA69E0755EEULL, 0x3FB46CCC8C7C14A3ULL } }, /* XSUM_XXH128_testdata[7193] */\n    { 2398, 0x0000000000000000ULL, { 0x3D0260D2BD9CDCF8ULL, 0x5B0085EDDECB4DB2ULL } }, /* XSUM_XXH128_testdata[7194] */\n    { 2398, 0x000000009E3779B1ULL, { 0x3BD1C3C75CD18ADBULL, 0xCE32E8978A13D06FULL } }, /* XSUM_XXH128_testdata[7195] */\n    { 2398, 0x9E3779B185EBCA8DULL, { 0x9E79B2ED95CC1C13ULL, 0x9524419BAEA35A2BULL } }, /* XSUM_XXH128_testdata[7196] */\n    { 2399, 0x0000000000000000ULL, { 0x3E202057EEB160DCULL, 0xF7CE4E167C715EB8ULL } }, /* XSUM_XXH128_testdata[7197] */\n    { 2399, 0x000000009E3779B1ULL, { 0x613C891EE8A24337ULL, 0x7D2003059DCC7E68ULL } }, /* XSUM_XXH128_testdata[7198] */\n    { 2399, 0x9E3779B185EBCA8DULL, { 0xFD61D2735B23807EULL, 0x567B5E7A21F0D87EULL } }, /* XSUM_XXH128_testdata[7199] */\n    { 2400, 0x0000000000000000ULL, { 0x7DF9FC66BF737FD6ULL, 0xB9902D95D0D2E4C1ULL } }, /* XSUM_XXH128_testdata[7200] */\n    { 2400, 0x000000009E3779B1ULL, { 0xB2171722C72164FCULL, 0xF034B4595BF71F95ULL } }, /* XSUM_XXH128_testdata[7201] */\n    { 2400, 0x9E3779B185EBCA8DULL, { 0xADA195576C66A546ULL, 0x17FF924F600EA0F3ULL } }, /* XSUM_XXH128_testdata[7202] */\n    { 2401, 0x0000000000000000ULL, { 0xE6DDEA16AEC1807AULL, 0xB0F6A3DAC2F2EBD0ULL } }, /* XSUM_XXH128_testdata[7203] */\n    { 2401, 0x000000009E3779B1ULL, { 0x13A88B86B17A7E31ULL, 0x4E138ED5A6A0B291ULL } }, /* XSUM_XXH128_testdata[7204] */\n    { 2401, 0x9E3779B185EBCA8DULL, { 0x03A77C66A1824D3EULL, 0xE2C9599F0A82007AULL } }, /* XSUM_XXH128_testdata[7205] */\n    { 2402, 0x0000000000000000ULL, { 0xD881F94BA815ABC6ULL, 0x454B681060D59018ULL } }, /* XSUM_XXH128_testdata[7206] */\n    { 2402, 0x000000009E3779B1ULL, { 0x8A3270291C9151ABULL, 0xF8F7976AC4B0FB76ULL } }, /* XSUM_XXH128_testdata[7207] */\n    { 2402, 0x9E3779B185EBCA8DULL, { 0xDC8F9DA703D3AB56ULL, 0xC7BBB48582D4273CULL } }, /* XSUM_XXH128_testdata[7208] */\n    { 2403, 0x0000000000000000ULL, { 0x517AFA5E367BB9D5ULL, 0xB8E13AD618A514EBULL } }, /* XSUM_XXH128_testdata[7209] */\n    { 2403, 0x000000009E3779B1ULL, { 0xC487C0CF417B10E1ULL, 0x9A6E8CEECB7CBCB9ULL } }, /* XSUM_XXH128_testdata[7210] */\n    { 2403, 0x9E3779B185EBCA8DULL, { 0xBB4B3A775BD26BD9ULL, 0x258A445EBC7BDDCBULL } }, /* XSUM_XXH128_testdata[7211] */\n    { 2404, 0x0000000000000000ULL, { 0x28B4866679822E0AULL, 0xE762821A0812DBE6ULL } }, /* XSUM_XXH128_testdata[7212] */\n    { 2404, 0x000000009E3779B1ULL, { 0xD8F0B451F6769196ULL, 0xAF32464DE8EA01A7ULL } }, /* XSUM_XXH128_testdata[7213] */\n    { 2404, 0x9E3779B185EBCA8DULL, { 0xAA51349D15CC0FDEULL, 0x698C0B6DB1044822ULL } }, /* XSUM_XXH128_testdata[7214] */\n    { 2405, 0x0000000000000000ULL, { 0x3CE5C20DE2F5C897ULL, 0x933BD578ED277DF4ULL } }, /* XSUM_XXH128_testdata[7215] */\n    { 2405, 0x000000009E3779B1ULL, { 0x9995E89069B11B44ULL, 0x7BB4C0E3637E8BCFULL } }, /* XSUM_XXH128_testdata[7216] */\n    { 2405, 0x9E3779B185EBCA8DULL, { 0xEEDCE89587FD1C51ULL, 0xE1B02C7B0C179190ULL } }, /* XSUM_XXH128_testdata[7217] */\n    { 2406, 0x0000000000000000ULL, { 0x2817C7FEB92F4ECCULL, 0x932D147B04B0E78FULL } }, /* XSUM_XXH128_testdata[7218] */\n    { 2406, 0x000000009E3779B1ULL, { 0x01157404B869FD3BULL, 0x59ABC88B6E9D3FC7ULL } }, /* XSUM_XXH128_testdata[7219] */\n    { 2406, 0x9E3779B185EBCA8DULL, { 0xF271D583D5C08D60ULL, 0x204E5AC7FB597434ULL } }, /* XSUM_XXH128_testdata[7220] */\n    { 2407, 0x0000000000000000ULL, { 0x7138C004788FC3C5ULL, 0x68A5ACAE7FBD6AC2ULL } }, /* XSUM_XXH128_testdata[7221] */\n    { 2407, 0x000000009E3779B1ULL, { 0x4D943B335B201518ULL, 0x4E5A177B894FE208ULL } }, /* XSUM_XXH128_testdata[7222] */\n    { 2407, 0x9E3779B185EBCA8DULL, { 0x900C534E25F8EE8FULL, 0x8C713D846DEB4B77ULL } }, /* XSUM_XXH128_testdata[7223] */\n    { 2408, 0x0000000000000000ULL, { 0x0604E4B6EA6C24D5ULL, 0x3C44708B7782C5C3ULL } }, /* XSUM_XXH128_testdata[7224] */\n    { 2408, 0x000000009E3779B1ULL, { 0x91C2D4B82E9286E2ULL, 0xF891EBBA1263DF12ULL } }, /* XSUM_XXH128_testdata[7225] */\n    { 2408, 0x9E3779B185EBCA8DULL, { 0x9531D4198EB93D16ULL, 0xB8895735ADE70E7EULL } }, /* XSUM_XXH128_testdata[7226] */\n    { 2409, 0x0000000000000000ULL, { 0x6C65C2A586EDE755ULL, 0x5E88B0E8F800DB1EULL } }, /* XSUM_XXH128_testdata[7227] */\n    { 2409, 0x000000009E3779B1ULL, { 0x669D820CA30CFE5EULL, 0xD626D69A24E5B30AULL } }, /* XSUM_XXH128_testdata[7228] */\n    { 2409, 0x9E3779B185EBCA8DULL, { 0x8CEEEE8B7F6A04B7ULL, 0x93B4FB7112259273ULL } }, /* XSUM_XXH128_testdata[7229] */\n    { 2410, 0x0000000000000000ULL, { 0x3A325C261826AEE7ULL, 0xC414F7088CF10D39ULL } }, /* XSUM_XXH128_testdata[7230] */\n    { 2410, 0x000000009E3779B1ULL, { 0xCD1A4F29B8785526ULL, 0x8049B8AB12384AFAULL } }, /* XSUM_XXH128_testdata[7231] */\n    { 2410, 0x9E3779B185EBCA8DULL, { 0x69A9A60F334C045DULL, 0xBF6284B9830E5C65ULL } }, /* XSUM_XXH128_testdata[7232] */\n    { 2411, 0x0000000000000000ULL, { 0x2BD1BD1E1D3B60A0ULL, 0x71932F603EF492FAULL } }, /* XSUM_XXH128_testdata[7233] */\n    { 2411, 0x000000009E3779B1ULL, { 0x09C9E2F4952ACBCEULL, 0x1D60AE6C439BC9CAULL } }, /* XSUM_XXH128_testdata[7234] */\n    { 2411, 0x9E3779B185EBCA8DULL, { 0x878A04EDAC12EA22ULL, 0x9E9E42D43BDC8D2CULL } }, /* XSUM_XXH128_testdata[7235] */\n    { 2412, 0x0000000000000000ULL, { 0x7051EE180E0E02CBULL, 0xB9E2525240305162ULL } }, /* XSUM_XXH128_testdata[7236] */\n    { 2412, 0x000000009E3779B1ULL, { 0x884691CA4FF16A81ULL, 0x3D1533984094C804ULL } }, /* XSUM_XXH128_testdata[7237] */\n    { 2412, 0x9E3779B185EBCA8DULL, { 0xF8BDAEBB507AC864ULL, 0x24BB396107495800ULL } }, /* XSUM_XXH128_testdata[7238] */\n    { 2413, 0x0000000000000000ULL, { 0x8DCDDD287F97CF14ULL, 0x956E2E07506FC9E0ULL } }, /* XSUM_XXH128_testdata[7239] */\n    { 2413, 0x000000009E3779B1ULL, { 0x70E1A37A5E0E93B9ULL, 0xF37E4F73FFC03EF9ULL } }, /* XSUM_XXH128_testdata[7240] */\n    { 2413, 0x9E3779B185EBCA8DULL, { 0x0B36D5B0FDA5985CULL, 0x2FAE7437B5A8792AULL } }, /* XSUM_XXH128_testdata[7241] */\n    { 2414, 0x0000000000000000ULL, { 0x3EE02E4436180A4FULL, 0x38CB88B9211F2283ULL } }, /* XSUM_XXH128_testdata[7242] */\n    { 2414, 0x000000009E3779B1ULL, { 0xA1637160BB064BBFULL, 0x3A8A39F9437C83D3ULL } }, /* XSUM_XXH128_testdata[7243] */\n    { 2414, 0x9E3779B185EBCA8DULL, { 0xC63FA36634A9AA30ULL, 0xD03A48B447C9395DULL } }, /* XSUM_XXH128_testdata[7244] */\n    { 2415, 0x0000000000000000ULL, { 0xBDEA754E7720A901ULL, 0xD13CC7A3DB60EC7CULL } }, /* XSUM_XXH128_testdata[7245] */\n    { 2415, 0x000000009E3779B1ULL, { 0xB9872E74EC594421ULL, 0x11AC4AE85C8C6B97ULL } }, /* XSUM_XXH128_testdata[7246] */\n    { 2415, 0x9E3779B185EBCA8DULL, { 0x5AFF8F9C6A0EFDC1ULL, 0x54DF6DB4513E7FF7ULL } }, /* XSUM_XXH128_testdata[7247] */\n    { 2416, 0x0000000000000000ULL, { 0x0DB29183CD25C6D5ULL, 0x00B1408E92A4BB53ULL } }, /* XSUM_XXH128_testdata[7248] */\n    { 2416, 0x000000009E3779B1ULL, { 0x4CE97919BE2F2416ULL, 0x6113C2BF7A1A2B13ULL } }, /* XSUM_XXH128_testdata[7249] */\n    { 2416, 0x9E3779B185EBCA8DULL, { 0x98B8811EA213EF90ULL, 0x1A3DC7452FD5A433ULL } }, /* XSUM_XXH128_testdata[7250] */\n    { 2417, 0x0000000000000000ULL, { 0x9DC19422D90242D7ULL, 0x73A51E91212500BFULL } }, /* XSUM_XXH128_testdata[7251] */\n    { 2417, 0x000000009E3779B1ULL, { 0x32CDDC8E345EBB2EULL, 0x41D770D674F7836FULL } }, /* XSUM_XXH128_testdata[7252] */\n    { 2417, 0x9E3779B185EBCA8DULL, { 0x40280F790E110E26ULL, 0x7F1554B63EC98A0AULL } }, /* XSUM_XXH128_testdata[7253] */\n    { 2418, 0x0000000000000000ULL, { 0xA82B1C76DE8149B2ULL, 0x06C195D92BA1D098ULL } }, /* XSUM_XXH128_testdata[7254] */\n    { 2418, 0x000000009E3779B1ULL, { 0x5824E0584FB6FF33ULL, 0xE926B7923036F77DULL } }, /* XSUM_XXH128_testdata[7255] */\n    { 2418, 0x9E3779B185EBCA8DULL, { 0x142A9DC28F9B34E1ULL, 0x66BA02592BD93306ULL } }, /* XSUM_XXH128_testdata[7256] */\n    { 2419, 0x0000000000000000ULL, { 0xD851B8B3E2B52CACULL, 0x4A557DE653D96FCBULL } }, /* XSUM_XXH128_testdata[7257] */\n    { 2419, 0x000000009E3779B1ULL, { 0xA1F3CD250EEA43ABULL, 0xB668E0AE9D17B6FCULL } }, /* XSUM_XXH128_testdata[7258] */\n    { 2419, 0x9E3779B185EBCA8DULL, { 0xF5C9BBF4F167C0F7ULL, 0x4914B4115E4BCE96ULL } }, /* XSUM_XXH128_testdata[7259] */\n    { 2420, 0x0000000000000000ULL, { 0x8529E9FC2DAF0D5DULL, 0xD7492C1F1148BF9FULL } }, /* XSUM_XXH128_testdata[7260] */\n    { 2420, 0x000000009E3779B1ULL, { 0x8C3E9D002E283092ULL, 0xEAB3A6EAFE1B044DULL } }, /* XSUM_XXH128_testdata[7261] */\n    { 2420, 0x9E3779B185EBCA8DULL, { 0x4EF21EF6AF152D63ULL, 0x846BD56145816592ULL } }, /* XSUM_XXH128_testdata[7262] */\n    { 2421, 0x0000000000000000ULL, { 0x5249697149FEC1F9ULL, 0xA13943BC355D5A8EULL } }, /* XSUM_XXH128_testdata[7263] */\n    { 2421, 0x000000009E3779B1ULL, { 0x7D23965702A5E8D5ULL, 0x3ACB5C18F1E8E815ULL } }, /* XSUM_XXH128_testdata[7264] */\n    { 2421, 0x9E3779B185EBCA8DULL, { 0x65D35A4934C7603CULL, 0x8363D83C903620F4ULL } }, /* XSUM_XXH128_testdata[7265] */\n    { 2422, 0x0000000000000000ULL, { 0xF5D127B3552F2A4DULL, 0x689DD563A86E2A97ULL } }, /* XSUM_XXH128_testdata[7266] */\n    { 2422, 0x000000009E3779B1ULL, { 0x7F51B75FFEABD442ULL, 0xFA3C28E629A92D1DULL } }, /* XSUM_XXH128_testdata[7267] */\n    { 2422, 0x9E3779B185EBCA8DULL, { 0xAF75261C2DB129A2ULL, 0x984ECA2DA2ED190DULL } }, /* XSUM_XXH128_testdata[7268] */\n    { 2423, 0x0000000000000000ULL, { 0x09AE23AE7ABE9D33ULL, 0x48FAD41D4E82B85EULL } }, /* XSUM_XXH128_testdata[7269] */\n    { 2423, 0x000000009E3779B1ULL, { 0xC3365349EB2DD5CAULL, 0xF1C6F2E753B63766ULL } }, /* XSUM_XXH128_testdata[7270] */\n    { 2423, 0x9E3779B185EBCA8DULL, { 0xC5C469E69AE9C75EULL, 0x9BD547F986348F28ULL } }, /* XSUM_XXH128_testdata[7271] */\n    { 2424, 0x0000000000000000ULL, { 0x9D5F8EC8EAA2F01BULL, 0x7F76764C1B78D41CULL } }, /* XSUM_XXH128_testdata[7272] */\n    { 2424, 0x000000009E3779B1ULL, { 0x3D16B719CC9D02F9ULL, 0x8E9610376BCD54D8ULL } }, /* XSUM_XXH128_testdata[7273] */\n    { 2424, 0x9E3779B185EBCA8DULL, { 0x4FB82BD884C0D7A3ULL, 0xF12FD1ECB6EC9EBBULL } }, /* XSUM_XXH128_testdata[7274] */\n    { 2425, 0x0000000000000000ULL, { 0x48C09EBF46A108C7ULL, 0xCD16FC5572AE5F21ULL } }, /* XSUM_XXH128_testdata[7275] */\n    { 2425, 0x000000009E3779B1ULL, { 0x6AEE4FB1A6D618D9ULL, 0xC51AA708879B8AFAULL } }, /* XSUM_XXH128_testdata[7276] */\n    { 2425, 0x9E3779B185EBCA8DULL, { 0x883A820B8C4B86A2ULL, 0xB50581083BCF0444ULL } }, /* XSUM_XXH128_testdata[7277] */\n    { 2426, 0x0000000000000000ULL, { 0x3C6DFD3F231240EDULL, 0x20EE9D0A38C1D47DULL } }, /* XSUM_XXH128_testdata[7278] */\n    { 2426, 0x000000009E3779B1ULL, { 0xFB2DE2228F825F56ULL, 0x6B28070F1D442E96ULL } }, /* XSUM_XXH128_testdata[7279] */\n    { 2426, 0x9E3779B185EBCA8DULL, { 0x542145FC300CEEBEULL, 0x4F62D96AB845D043ULL } }, /* XSUM_XXH128_testdata[7280] */\n    { 2427, 0x0000000000000000ULL, { 0xF29C5ABE595973EAULL, 0x15F4B5BF005D5A35ULL } }, /* XSUM_XXH128_testdata[7281] */\n    { 2427, 0x000000009E3779B1ULL, { 0xD398767172E3C8B0ULL, 0xD0BF773050147F61ULL } }, /* XSUM_XXH128_testdata[7282] */\n    { 2427, 0x9E3779B185EBCA8DULL, { 0x4FEA334DD9B79E8DULL, 0x9E0669FAED23166BULL } }, /* XSUM_XXH128_testdata[7283] */\n    { 2428, 0x0000000000000000ULL, { 0x181F632921366CA0ULL, 0x6408946E2684F274ULL } }, /* XSUM_XXH128_testdata[7284] */\n    { 2428, 0x000000009E3779B1ULL, { 0x821B53D9FFD0AFA3ULL, 0x5F94F17659607EDAULL } }, /* XSUM_XXH128_testdata[7285] */\n    { 2428, 0x9E3779B185EBCA8DULL, { 0xE56364DBE587A5A1ULL, 0xD315349CA7F6DCA0ULL } }, /* XSUM_XXH128_testdata[7286] */\n    { 2429, 0x0000000000000000ULL, { 0xCD451D734527603DULL, 0x25C88E036B858E10ULL } }, /* XSUM_XXH128_testdata[7287] */\n    { 2429, 0x000000009E3779B1ULL, { 0x1EEC042EA524D906ULL, 0xD4164621C69A155AULL } }, /* XSUM_XXH128_testdata[7288] */\n    { 2429, 0x9E3779B185EBCA8DULL, { 0xE02AEC9CA72BCE50ULL, 0x6BC020AC111E6572ULL } }, /* XSUM_XXH128_testdata[7289] */\n    { 2430, 0x0000000000000000ULL, { 0x9D2998805DBCA3B0ULL, 0xA40F35E6F294EBEAULL } }, /* XSUM_XXH128_testdata[7290] */\n    { 2430, 0x000000009E3779B1ULL, { 0x2F7E074BB5C0CE28ULL, 0xBD7B44CDF92356D6ULL } }, /* XSUM_XXH128_testdata[7291] */\n    { 2430, 0x9E3779B185EBCA8DULL, { 0xD1E0757C87B4C04AULL, 0xDD5858E01B727FD8ULL } }, /* XSUM_XXH128_testdata[7292] */\n    { 2431, 0x0000000000000000ULL, { 0x23A692E3C69FC54DULL, 0xE55A4FC57BC9F00EULL } }, /* XSUM_XXH128_testdata[7293] */\n    { 2431, 0x000000009E3779B1ULL, { 0x49FDFDD09EA894F2ULL, 0xABDF325D9028B0B5ULL } }, /* XSUM_XXH128_testdata[7294] */\n    { 2431, 0x9E3779B185EBCA8DULL, { 0x4887EE15CCDA25D0ULL, 0x90F4E63E95B52464ULL } }, /* XSUM_XXH128_testdata[7295] */\n    { 2432, 0x0000000000000000ULL, { 0x8DC7DF4949BF38DFULL, 0x93A25E70E12E0609ULL } }, /* XSUM_XXH128_testdata[7296] */\n    { 2432, 0x000000009E3779B1ULL, { 0xD8C442D4C31EB7DCULL, 0xFA5666EFA75FD9F4ULL } }, /* XSUM_XXH128_testdata[7297] */\n    { 2432, 0x9E3779B185EBCA8DULL, { 0x2979E98145138149ULL, 0x04BC15BFF914281BULL } }, /* XSUM_XXH128_testdata[7298] */\n    { 2433, 0x0000000000000000ULL, { 0xB8D09DA11BD7BB41ULL, 0xCE60F8671C48DDFCULL } }, /* XSUM_XXH128_testdata[7299] */\n    { 2433, 0x000000009E3779B1ULL, { 0xF2174C157D2AB6EDULL, 0xF08EFE2A849AECF2ULL } }, /* XSUM_XXH128_testdata[7300] */\n    { 2433, 0x9E3779B185EBCA8DULL, { 0x09CF950068A3F8A7ULL, 0x603C1D3510771F34ULL } }, /* XSUM_XXH128_testdata[7301] */\n    { 2434, 0x0000000000000000ULL, { 0x602D368415842878ULL, 0xC77E40F44B916F4AULL } }, /* XSUM_XXH128_testdata[7302] */\n    { 2434, 0x000000009E3779B1ULL, { 0xE6A411840337A4C5ULL, 0x0BD7965E89E56E05ULL } }, /* XSUM_XXH128_testdata[7303] */\n    { 2434, 0x9E3779B185EBCA8DULL, { 0x05431A9CC10643C8ULL, 0x04EC2654CA49C22EULL } }, /* XSUM_XXH128_testdata[7304] */\n    { 2435, 0x0000000000000000ULL, { 0x0D5A57C81AF12097ULL, 0x10FA684B81F0CB70ULL } }, /* XSUM_XXH128_testdata[7305] */\n    { 2435, 0x000000009E3779B1ULL, { 0x66749179532E8C03ULL, 0x4F05D762C93B20FDULL } }, /* XSUM_XXH128_testdata[7306] */\n    { 2435, 0x9E3779B185EBCA8DULL, { 0x2C570690D39384C4ULL, 0xD774F8E74F174500ULL } }, /* XSUM_XXH128_testdata[7307] */\n    { 2436, 0x0000000000000000ULL, { 0xABDAB965D51BE0A7ULL, 0x010BC8024B932456ULL } }, /* XSUM_XXH128_testdata[7308] */\n    { 2436, 0x000000009E3779B1ULL, { 0xC9591CCDA06EA0BFULL, 0xAD3A3A141B81EA35ULL } }, /* XSUM_XXH128_testdata[7309] */\n    { 2436, 0x9E3779B185EBCA8DULL, { 0xB944CA075AE79E7CULL, 0xA5CCE93E1E67886EULL } }, /* XSUM_XXH128_testdata[7310] */\n    { 2437, 0x0000000000000000ULL, { 0xF9F7285746440004ULL, 0xCE223FEEE6AE5FD2ULL } }, /* XSUM_XXH128_testdata[7311] */\n    { 2437, 0x000000009E3779B1ULL, { 0x2DDC99DB6429513AULL, 0xC8D178375A1CC8A2ULL } }, /* XSUM_XXH128_testdata[7312] */\n    { 2437, 0x9E3779B185EBCA8DULL, { 0xB26C26664D2A9600ULL, 0x5A937FB9C8589915ULL } }, /* XSUM_XXH128_testdata[7313] */\n    { 2438, 0x0000000000000000ULL, { 0x41E0CB5498B910DCULL, 0x2415820BAF734367ULL } }, /* XSUM_XXH128_testdata[7314] */\n    { 2438, 0x000000009E3779B1ULL, { 0x98969B07BEB5C275ULL, 0x3ABCA9D3E95B111AULL } }, /* XSUM_XXH128_testdata[7315] */\n    { 2438, 0x9E3779B185EBCA8DULL, { 0x9A9E28BC453B8DB5ULL, 0xB9E587DA15387039ULL } }, /* XSUM_XXH128_testdata[7316] */\n    { 2439, 0x0000000000000000ULL, { 0x4066C83ED65F4C42ULL, 0x0292030F29BA5C67ULL } }, /* XSUM_XXH128_testdata[7317] */\n    { 2439, 0x000000009E3779B1ULL, { 0x14B1202BB17A4861ULL, 0x501AAE6572648ADCULL } }, /* XSUM_XXH128_testdata[7318] */\n    { 2439, 0x9E3779B185EBCA8DULL, { 0xB20C91861C646670ULL, 0x064B3304A8C15787ULL } }, /* XSUM_XXH128_testdata[7319] */\n    { 2440, 0x0000000000000000ULL, { 0x28C42D7C1D7ADB58ULL, 0xB4F9BE100BD87F30ULL } }, /* XSUM_XXH128_testdata[7320] */\n    { 2440, 0x000000009E3779B1ULL, { 0x0C96F885F5CAE186ULL, 0xC726522A1273E5B1ULL } }, /* XSUM_XXH128_testdata[7321] */\n    { 2440, 0x9E3779B185EBCA8DULL, { 0x7ECC97D6D7A3B313ULL, 0x9A5824FE998F2A52ULL } }, /* XSUM_XXH128_testdata[7322] */\n    { 2441, 0x0000000000000000ULL, { 0x39B0DF7528EA6FF4ULL, 0x46FCEFECCCA6AC96ULL } }, /* XSUM_XXH128_testdata[7323] */\n    { 2441, 0x000000009E3779B1ULL, { 0x798FB06D4840D55BULL, 0x5A52266D41500A22ULL } }, /* XSUM_XXH128_testdata[7324] */\n    { 2441, 0x9E3779B185EBCA8DULL, { 0xE78D153ACA9FBCA9ULL, 0xA3206C901F33FF02ULL } }, /* XSUM_XXH128_testdata[7325] */\n    { 2442, 0x0000000000000000ULL, { 0x15154D6AD175D54DULL, 0xA95776D4521BC057ULL } }, /* XSUM_XXH128_testdata[7326] */\n    { 2442, 0x000000009E3779B1ULL, { 0x27DDD3AB9AE38107ULL, 0xEE8C75311D26F7D5ULL } }, /* XSUM_XXH128_testdata[7327] */\n    { 2442, 0x9E3779B185EBCA8DULL, { 0xA61EE4A6487F4B71ULL, 0xF581FC4E19090F19ULL } }, /* XSUM_XXH128_testdata[7328] */\n    { 2443, 0x0000000000000000ULL, { 0x8E8C8526F590986EULL, 0xCE77C6D2DC4F9D46ULL } }, /* XSUM_XXH128_testdata[7329] */\n    { 2443, 0x000000009E3779B1ULL, { 0xAB27F09E48CDC3CEULL, 0x99817D61AA1A9DBDULL } }, /* XSUM_XXH128_testdata[7330] */\n    { 2443, 0x9E3779B185EBCA8DULL, { 0xF727EC9ED02986A7ULL, 0x68900587F460C497ULL } }, /* XSUM_XXH128_testdata[7331] */\n    { 2444, 0x0000000000000000ULL, { 0x7C531BE3A6674EA0ULL, 0x24E21CC852788387ULL } }, /* XSUM_XXH128_testdata[7332] */\n    { 2444, 0x000000009E3779B1ULL, { 0x909EE418C11CF6A4ULL, 0x9E98F3E24ED882C3ULL } }, /* XSUM_XXH128_testdata[7333] */\n    { 2444, 0x9E3779B185EBCA8DULL, { 0x6D2D1FAC09361F28ULL, 0x6C51B702A6F4E8A6ULL } }, /* XSUM_XXH128_testdata[7334] */\n    { 2445, 0x0000000000000000ULL, { 0x4AAEA74B017E72F8ULL, 0xB4636E65AAC93D83ULL } }, /* XSUM_XXH128_testdata[7335] */\n    { 2445, 0x000000009E3779B1ULL, { 0xF2B227309A8E76F4ULL, 0x96590A68D0C2CE85ULL } }, /* XSUM_XXH128_testdata[7336] */\n    { 2445, 0x9E3779B185EBCA8DULL, { 0x35E7817B42766DCEULL, 0x3A8BEE36B2ED927CULL } }, /* XSUM_XXH128_testdata[7337] */\n    { 2446, 0x0000000000000000ULL, { 0xC3F8C3084B712F01ULL, 0x30582957CF94F603ULL } }, /* XSUM_XXH128_testdata[7338] */\n    { 2446, 0x000000009E3779B1ULL, { 0x34CE3DB082E2221AULL, 0xDF0CB3149826A3F2ULL } }, /* XSUM_XXH128_testdata[7339] */\n    { 2446, 0x9E3779B185EBCA8DULL, { 0x588951B04523ABCFULL, 0x19B05038313D4BD7ULL } }, /* XSUM_XXH128_testdata[7340] */\n    { 2447, 0x0000000000000000ULL, { 0xF22E9F3E39912A2BULL, 0x87850260A398F6BFULL } }, /* XSUM_XXH128_testdata[7341] */\n    { 2447, 0x000000009E3779B1ULL, { 0x0D1B97897C7C5E4EULL, 0x9AD0DF74FF0CB7E1ULL } }, /* XSUM_XXH128_testdata[7342] */\n    { 2447, 0x9E3779B185EBCA8DULL, { 0x849BC016B76881E7ULL, 0x2D99747EDDD98FCEULL } }, /* XSUM_XXH128_testdata[7343] */\n    { 2448, 0x0000000000000000ULL, { 0x642CCF0761F30F6AULL, 0x8683364415133089ULL } }, /* XSUM_XXH128_testdata[7344] */\n    { 2448, 0x000000009E3779B1ULL, { 0x3F02E42ABD323B47ULL, 0xDEE720030DD52B92ULL } }, /* XSUM_XXH128_testdata[7345] */\n    { 2448, 0x9E3779B185EBCA8DULL, { 0x9FC2C7AB7B85313DULL, 0x26A0B48867F3A191ULL } }, /* XSUM_XXH128_testdata[7346] */\n    { 2449, 0x0000000000000000ULL, { 0xD4E2D63D237029A9ULL, 0x59AD4B26B95DA46FULL } }, /* XSUM_XXH128_testdata[7347] */\n    { 2449, 0x000000009E3779B1ULL, { 0xC2F9E35800F03902ULL, 0x7428AFA50E54980BULL } }, /* XSUM_XXH128_testdata[7348] */\n    { 2449, 0x9E3779B185EBCA8DULL, { 0xAF548A5F25D3F854ULL, 0x610C02D10FF2D5ECULL } }, /* XSUM_XXH128_testdata[7349] */\n    { 2450, 0x0000000000000000ULL, { 0x53F599D71297C443ULL, 0x2710131E996E58EBULL } }, /* XSUM_XXH128_testdata[7350] */\n    { 2450, 0x000000009E3779B1ULL, { 0x6B389336CEB44628ULL, 0x6468DA7D11B0140EULL } }, /* XSUM_XXH128_testdata[7351] */\n    { 2450, 0x9E3779B185EBCA8DULL, { 0xFEE1BDB8A8075A81ULL, 0xA75EB58B2DE1FB16ULL } }, /* XSUM_XXH128_testdata[7352] */\n    { 2451, 0x0000000000000000ULL, { 0xBCAA7FFECC0FCBC1ULL, 0xC5C127C2BF6CF8CEULL } }, /* XSUM_XXH128_testdata[7353] */\n    { 2451, 0x000000009E3779B1ULL, { 0x804C77898DED54E9ULL, 0xFAFE5D917EF4A424ULL } }, /* XSUM_XXH128_testdata[7354] */\n    { 2451, 0x9E3779B185EBCA8DULL, { 0xE2B0FAF0CF5793F2ULL, 0xFFE38911AB21C95EULL } }, /* XSUM_XXH128_testdata[7355] */\n    { 2452, 0x0000000000000000ULL, { 0x925FE275AFED3F64ULL, 0xE8FD8B9E46B7C82BULL } }, /* XSUM_XXH128_testdata[7356] */\n    { 2452, 0x000000009E3779B1ULL, { 0xDEFDE77C183053A4ULL, 0xDBEEEF4EDC9DE7AAULL } }, /* XSUM_XXH128_testdata[7357] */\n    { 2452, 0x9E3779B185EBCA8DULL, { 0x71873D6DEAACA142ULL, 0x035CE922D77FB59BULL } }, /* XSUM_XXH128_testdata[7358] */\n    { 2453, 0x0000000000000000ULL, { 0xDABED809BA99689FULL, 0xE36F674B9B617BE5ULL } }, /* XSUM_XXH128_testdata[7359] */\n    { 2453, 0x000000009E3779B1ULL, { 0x436DCD089751E4DBULL, 0xF7AA3FA8CEBC5866ULL } }, /* XSUM_XXH128_testdata[7360] */\n    { 2453, 0x9E3779B185EBCA8DULL, { 0x170924333DB0395AULL, 0xB695B3C5C221135FULL } }, /* XSUM_XXH128_testdata[7361] */\n    { 2454, 0x0000000000000000ULL, { 0xB6220703B8544774ULL, 0x3BC3481574C25ECEULL } }, /* XSUM_XXH128_testdata[7362] */\n    { 2454, 0x000000009E3779B1ULL, { 0x087CD3D38F9CF2EBULL, 0xB60ECB7EF8F044E7ULL } }, /* XSUM_XXH128_testdata[7363] */\n    { 2454, 0x9E3779B185EBCA8DULL, { 0x601D674299EFE340ULL, 0xD8F13CC06B0E9881ULL } }, /* XSUM_XXH128_testdata[7364] */\n    { 2455, 0x0000000000000000ULL, { 0xE23994D8DDA1F254ULL, 0x43B29ABF277CA705ULL } }, /* XSUM_XXH128_testdata[7365] */\n    { 2455, 0x000000009E3779B1ULL, { 0x4C94FD4851CF0A23ULL, 0x5FDA38F5E1430E11ULL } }, /* XSUM_XXH128_testdata[7366] */\n    { 2455, 0x9E3779B185EBCA8DULL, { 0x0E19C8258C172708ULL, 0x326708CC57214164ULL } }, /* XSUM_XXH128_testdata[7367] */\n    { 2456, 0x0000000000000000ULL, { 0x1876B35C77339FCCULL, 0xD951D8A0381DCC95ULL } }, /* XSUM_XXH128_testdata[7368] */\n    { 2456, 0x000000009E3779B1ULL, { 0x58FD910045329F4EULL, 0x9E743234F690B782ULL } }, /* XSUM_XXH128_testdata[7369] */\n    { 2456, 0x9E3779B185EBCA8DULL, { 0xF22B8BC4422C4A49ULL, 0xA6AB110B7EA12051ULL } }, /* XSUM_XXH128_testdata[7370] */\n    { 2457, 0x0000000000000000ULL, { 0x313A6E1EA6811FD1ULL, 0x87CCEAE099C7D990ULL } }, /* XSUM_XXH128_testdata[7371] */\n    { 2457, 0x000000009E3779B1ULL, { 0x3C4AE37D56F25FFBULL, 0xBF00BAF53D94C799ULL } }, /* XSUM_XXH128_testdata[7372] */\n    { 2457, 0x9E3779B185EBCA8DULL, { 0xB1EA861656EE51BCULL, 0x074F7EE7F50EC987ULL } }, /* XSUM_XXH128_testdata[7373] */\n    { 2458, 0x0000000000000000ULL, { 0x0498A44D87713BC7ULL, 0x8139AB1D86C8381CULL } }, /* XSUM_XXH128_testdata[7374] */\n    { 2458, 0x000000009E3779B1ULL, { 0x6BA2EF0CE04ADE7FULL, 0x141A3AC3842289D2ULL } }, /* XSUM_XXH128_testdata[7375] */\n    { 2458, 0x9E3779B185EBCA8DULL, { 0x17205DEC8F82C2E7ULL, 0x2D6EB860694A71E5ULL } }, /* XSUM_XXH128_testdata[7376] */\n    { 2459, 0x0000000000000000ULL, { 0x406D73AAA0FF6D3FULL, 0x1635183BD6DCD0ABULL } }, /* XSUM_XXH128_testdata[7377] */\n    { 2459, 0x000000009E3779B1ULL, { 0x54BD94F074D321ADULL, 0xB1003AC8929EF374ULL } }, /* XSUM_XXH128_testdata[7378] */\n    { 2459, 0x9E3779B185EBCA8DULL, { 0xE71DF2534C959D90ULL, 0x1E06746849EEA300ULL } }, /* XSUM_XXH128_testdata[7379] */\n    { 2460, 0x0000000000000000ULL, { 0xFD13A835848BFD82ULL, 0xA2DD6CD966E31458ULL } }, /* XSUM_XXH128_testdata[7380] */\n    { 2460, 0x000000009E3779B1ULL, { 0x0E991F0341D0B882ULL, 0x35B0A6F5CE254F24ULL } }, /* XSUM_XXH128_testdata[7381] */\n    { 2460, 0x9E3779B185EBCA8DULL, { 0xD3B50CA1421D3A51ULL, 0xF397D8CF745562B5ULL } }, /* XSUM_XXH128_testdata[7382] */\n    { 2461, 0x0000000000000000ULL, { 0x82133237CB17D5AFULL, 0x7A40B444F97FE544ULL } }, /* XSUM_XXH128_testdata[7383] */\n    { 2461, 0x000000009E3779B1ULL, { 0x1706F7D961FCEBFBULL, 0x21A32F6AA1CA84FFULL } }, /* XSUM_XXH128_testdata[7384] */\n    { 2461, 0x9E3779B185EBCA8DULL, { 0xB2E52F0267163959ULL, 0x23EBD9BEFFF9F636ULL } }, /* XSUM_XXH128_testdata[7385] */\n    { 2462, 0x0000000000000000ULL, { 0x1D113E71BA2A0486ULL, 0x79D571DE8D06259EULL } }, /* XSUM_XXH128_testdata[7386] */\n    { 2462, 0x000000009E3779B1ULL, { 0xC7439F107543224CULL, 0x24FEDB90BBED9DC0ULL } }, /* XSUM_XXH128_testdata[7387] */\n    { 2462, 0x9E3779B185EBCA8DULL, { 0xE65EB4D0A760BC93ULL, 0xA808A133D7D7F6CEULL } }, /* XSUM_XXH128_testdata[7388] */\n    { 2463, 0x0000000000000000ULL, { 0xBFB5AB6F9BF505D3ULL, 0xAA79D4D9620F75F4ULL } }, /* XSUM_XXH128_testdata[7389] */\n    { 2463, 0x000000009E3779B1ULL, { 0x2F424D834BC46489ULL, 0xA53DE0E0AC48244EULL } }, /* XSUM_XXH128_testdata[7390] */\n    { 2463, 0x9E3779B185EBCA8DULL, { 0xB13A757A0FE44631ULL, 0x39C09203D656C01BULL } }, /* XSUM_XXH128_testdata[7391] */\n    { 2464, 0x0000000000000000ULL, { 0xB03059CD80210C92ULL, 0x0F439BC0CCBF2BF0ULL } }, /* XSUM_XXH128_testdata[7392] */\n    { 2464, 0x000000009E3779B1ULL, { 0xA8E034D62DEB07A5ULL, 0x06B2E2233E264A06ULL } }, /* XSUM_XXH128_testdata[7393] */\n    { 2464, 0x9E3779B185EBCA8DULL, { 0x0918BBEBAF5DA807ULL, 0xCE814D81F4CBB2DCULL } }, /* XSUM_XXH128_testdata[7394] */\n    { 2465, 0x0000000000000000ULL, { 0xE0BF0FD1C1967D68ULL, 0xE7225342D0CF03E8ULL } }, /* XSUM_XXH128_testdata[7395] */\n    { 2465, 0x000000009E3779B1ULL, { 0x8E11811EB3D83AC7ULL, 0x7DB7B839A87A5C30ULL } }, /* XSUM_XXH128_testdata[7396] */\n    { 2465, 0x9E3779B185EBCA8DULL, { 0x9F364253BBDF2D66ULL, 0x8CAE1EC4FF2A9EE4ULL } }, /* XSUM_XXH128_testdata[7397] */\n    { 2466, 0x0000000000000000ULL, { 0xBA20A1D0EE4972DCULL, 0x4E1E95F282C6C630ULL } }, /* XSUM_XXH128_testdata[7398] */\n    { 2466, 0x000000009E3779B1ULL, { 0x222A258F879B571FULL, 0xCBA8842C4E4BFA15ULL } }, /* XSUM_XXH128_testdata[7399] */\n    { 2466, 0x9E3779B185EBCA8DULL, { 0xDD9FCF2B0F38C374ULL, 0x4500FCDB80347B3BULL } }, /* XSUM_XXH128_testdata[7400] */\n    { 2467, 0x0000000000000000ULL, { 0xD0E4644C09C66D79ULL, 0xD1D7B28AB1CA92B5ULL } }, /* XSUM_XXH128_testdata[7401] */\n    { 2467, 0x000000009E3779B1ULL, { 0x1018A112C1DE1765ULL, 0x91D9CA0B40A6BC98ULL } }, /* XSUM_XXH128_testdata[7402] */\n    { 2467, 0x9E3779B185EBCA8DULL, { 0x9FD6101B524C3689ULL, 0xDD21263C64E06DB0ULL } }, /* XSUM_XXH128_testdata[7403] */\n    { 2468, 0x0000000000000000ULL, { 0xA72FF00D991C2BECULL, 0x6A68BBF9C0614945ULL } }, /* XSUM_XXH128_testdata[7404] */\n    { 2468, 0x000000009E3779B1ULL, { 0xF3F68B38E89E5446ULL, 0x581795019A5E5B3FULL } }, /* XSUM_XXH128_testdata[7405] */\n    { 2468, 0x9E3779B185EBCA8DULL, { 0x66B8057EA205D71EULL, 0x6923AC1EF0E279E3ULL } }, /* XSUM_XXH128_testdata[7406] */\n    { 2469, 0x0000000000000000ULL, { 0xF0AE948DB61194C8ULL, 0x25E2AE98DF7D68A6ULL } }, /* XSUM_XXH128_testdata[7407] */\n    { 2469, 0x000000009E3779B1ULL, { 0x907A0DFE57C8EA0CULL, 0x04B4B5EA95608ED4ULL } }, /* XSUM_XXH128_testdata[7408] */\n    { 2469, 0x9E3779B185EBCA8DULL, { 0x50BE61DD641CB7B4ULL, 0x5BD51BFB963C9E5EULL } }, /* XSUM_XXH128_testdata[7409] */\n    { 2470, 0x0000000000000000ULL, { 0x23DBBEEBF027DC17ULL, 0x26F8D93C18056401ULL } }, /* XSUM_XXH128_testdata[7410] */\n    { 2470, 0x000000009E3779B1ULL, { 0x97140BB929CCA518ULL, 0x0F7032B971C93065ULL } }, /* XSUM_XXH128_testdata[7411] */\n    { 2470, 0x9E3779B185EBCA8DULL, { 0x70B592CF49D038CAULL, 0x185E0876360808D4ULL } }, /* XSUM_XXH128_testdata[7412] */\n    { 2471, 0x0000000000000000ULL, { 0x77017F8424BEA763ULL, 0x45868186B8AAF141ULL } }, /* XSUM_XXH128_testdata[7413] */\n    { 2471, 0x000000009E3779B1ULL, { 0x7566753701472081ULL, 0x4094E97B7E629D7AULL } }, /* XSUM_XXH128_testdata[7414] */\n    { 2471, 0x9E3779B185EBCA8DULL, { 0x084397E9E092B31EULL, 0x419A6F1AA96CCF9DULL } }, /* XSUM_XXH128_testdata[7415] */\n    { 2472, 0x0000000000000000ULL, { 0xC39B583F82D5ED3AULL, 0xF58642B1C32B9E3DULL } }, /* XSUM_XXH128_testdata[7416] */\n    { 2472, 0x000000009E3779B1ULL, { 0x101C8D15195F8A8DULL, 0x22A18F8FCBC84C92ULL } }, /* XSUM_XXH128_testdata[7417] */\n    { 2472, 0x9E3779B185EBCA8DULL, { 0xAE4BAD1A9C5685E6ULL, 0xEF0FC686AC463ED0ULL } }, /* XSUM_XXH128_testdata[7418] */\n    { 2473, 0x0000000000000000ULL, { 0x2C5AC1B00E9148A9ULL, 0x64B1905B41435F79ULL } }, /* XSUM_XXH128_testdata[7419] */\n    { 2473, 0x000000009E3779B1ULL, { 0xC529FD7ED95233A9ULL, 0xA4DD762C6840C55CULL } }, /* XSUM_XXH128_testdata[7420] */\n    { 2473, 0x9E3779B185EBCA8DULL, { 0xFDFDA5F93706FB93ULL, 0xAE74971DB711A454ULL } }, /* XSUM_XXH128_testdata[7421] */\n    { 2474, 0x0000000000000000ULL, { 0x493526E0DB2924E9ULL, 0xDAD9B1CCBD7436F5ULL } }, /* XSUM_XXH128_testdata[7422] */\n    { 2474, 0x000000009E3779B1ULL, { 0x0662AC563A5C62A2ULL, 0x4CC8B312EE123763ULL } }, /* XSUM_XXH128_testdata[7423] */\n    { 2474, 0x9E3779B185EBCA8DULL, { 0x4935872F6757D6A5ULL, 0xA5BD7F110BD2507EULL } }, /* XSUM_XXH128_testdata[7424] */\n    { 2475, 0x0000000000000000ULL, { 0xB1F3BEF6F09D70A6ULL, 0x028270B6CF54AF8FULL } }, /* XSUM_XXH128_testdata[7425] */\n    { 2475, 0x000000009E3779B1ULL, { 0x975F7CD22F2CF23DULL, 0x90A15BA62B4EFCDAULL } }, /* XSUM_XXH128_testdata[7426] */\n    { 2475, 0x9E3779B185EBCA8DULL, { 0xFD35409753519FC5ULL, 0x7F491C890CA0C1ADULL } }, /* XSUM_XXH128_testdata[7427] */\n    { 2476, 0x0000000000000000ULL, { 0x298B771F429863C7ULL, 0xFA59B6A0CC85F65CULL } }, /* XSUM_XXH128_testdata[7428] */\n    { 2476, 0x000000009E3779B1ULL, { 0x9AB2442453E171ADULL, 0xE44B2C082FA74B4DULL } }, /* XSUM_XXH128_testdata[7429] */\n    { 2476, 0x9E3779B185EBCA8DULL, { 0xF47455F43151E5EEULL, 0xE11A8912985286D6ULL } }, /* XSUM_XXH128_testdata[7430] */\n    { 2477, 0x0000000000000000ULL, { 0xED60585128E31E32ULL, 0x4A874A7966398917ULL } }, /* XSUM_XXH128_testdata[7431] */\n    { 2477, 0x000000009E3779B1ULL, { 0xC1A509FD77B5AFF6ULL, 0xA0592EC77431C99FULL } }, /* XSUM_XXH128_testdata[7432] */\n    { 2477, 0x9E3779B185EBCA8DULL, { 0x7D42C1F3FE3D949AULL, 0xF99E57C2B14E8218ULL } }, /* XSUM_XXH128_testdata[7433] */\n    { 2478, 0x0000000000000000ULL, { 0x836FD57D7CE40CD5ULL, 0x10C34881D94DF1F1ULL } }, /* XSUM_XXH128_testdata[7434] */\n    { 2478, 0x000000009E3779B1ULL, { 0xEBF243D317C20AA9ULL, 0x41BF63829CA9EBD4ULL } }, /* XSUM_XXH128_testdata[7435] */\n    { 2478, 0x9E3779B185EBCA8DULL, { 0x955BB327722E820FULL, 0x945ABD3928578941ULL } }, /* XSUM_XXH128_testdata[7436] */\n    { 2479, 0x0000000000000000ULL, { 0x8B893C8E25356830ULL, 0xF8E8A6BCCBEE4AE0ULL } }, /* XSUM_XXH128_testdata[7437] */\n    { 2479, 0x000000009E3779B1ULL, { 0xDF2A1C07AFAF1E34ULL, 0x3FEC4DC1422E4992ULL } }, /* XSUM_XXH128_testdata[7438] */\n    { 2479, 0x9E3779B185EBCA8DULL, { 0xFCA32DE531B8D7C4ULL, 0x0CAE69CDAB61408BULL } }, /* XSUM_XXH128_testdata[7439] */\n    { 2480, 0x0000000000000000ULL, { 0xAA801A1477B80024ULL, 0x6872B0581E8A37DDULL } }, /* XSUM_XXH128_testdata[7440] */\n    { 2480, 0x000000009E3779B1ULL, { 0x0ABE5AE34C0184EEULL, 0xAEC527BA813CEF20ULL } }, /* XSUM_XXH128_testdata[7441] */\n    { 2480, 0x9E3779B185EBCA8DULL, { 0x745B1264EC3EC79FULL, 0x4DF3E3BE32A48237ULL } }, /* XSUM_XXH128_testdata[7442] */\n    { 2481, 0x0000000000000000ULL, { 0xFFC123CE2FEB19BBULL, 0xAA50C25DE279729BULL } }, /* XSUM_XXH128_testdata[7443] */\n    { 2481, 0x000000009E3779B1ULL, { 0xA7DF445EE45BFFD7ULL, 0xCC3AA80312C22450ULL } }, /* XSUM_XXH128_testdata[7444] */\n    { 2481, 0x9E3779B185EBCA8DULL, { 0x3E1432A43C9B3B21ULL, 0xAAF211DBB22D679FULL } }, /* XSUM_XXH128_testdata[7445] */\n    { 2482, 0x0000000000000000ULL, { 0x67A2F28FAB9489FCULL, 0x94F4B00A2EC5DB7AULL } }, /* XSUM_XXH128_testdata[7446] */\n    { 2482, 0x000000009E3779B1ULL, { 0xFA760BA1BABA6E5BULL, 0x43013406BED22AC2ULL } }, /* XSUM_XXH128_testdata[7447] */\n    { 2482, 0x9E3779B185EBCA8DULL, { 0x646467775BC85519ULL, 0x381FBCAF26454ABFULL } }, /* XSUM_XXH128_testdata[7448] */\n    { 2483, 0x0000000000000000ULL, { 0xF604D40AD38A735AULL, 0x5A579874C445429AULL } }, /* XSUM_XXH128_testdata[7449] */\n    { 2483, 0x000000009E3779B1ULL, { 0x2E41F129AB8796A4ULL, 0x6FCD7754FDCEBC52ULL } }, /* XSUM_XXH128_testdata[7450] */\n    { 2483, 0x9E3779B185EBCA8DULL, { 0x87F499EC7E7889C6ULL, 0x92C92D237ECD41DBULL } }, /* XSUM_XXH128_testdata[7451] */\n    { 2484, 0x0000000000000000ULL, { 0x349E26D57FE46D76ULL, 0x1623389756BCA497ULL } }, /* XSUM_XXH128_testdata[7452] */\n    { 2484, 0x000000009E3779B1ULL, { 0x060C2FE9758471FAULL, 0xF6CB65D1E5BD213CULL } }, /* XSUM_XXH128_testdata[7453] */\n    { 2484, 0x9E3779B185EBCA8DULL, { 0xDB482692318A585AULL, 0x65F66DB36677BA50ULL } }, /* XSUM_XXH128_testdata[7454] */\n    { 2485, 0x0000000000000000ULL, { 0x8F51D9BA3F224553ULL, 0xD3C5CD900E0D7E97ULL } }, /* XSUM_XXH128_testdata[7455] */\n    { 2485, 0x000000009E3779B1ULL, { 0x7C64A3A219D82822ULL, 0xE866CA9F7847FD7CULL } }, /* XSUM_XXH128_testdata[7456] */\n    { 2485, 0x9E3779B185EBCA8DULL, { 0xC8542B2AFCB15DFAULL, 0xFE111303931AC74CULL } }, /* XSUM_XXH128_testdata[7457] */\n    { 2486, 0x0000000000000000ULL, { 0x396E933986D5207FULL, 0x8B3B9A1B830EC928ULL } }, /* XSUM_XXH128_testdata[7458] */\n    { 2486, 0x000000009E3779B1ULL, { 0x67D9F219AEB8A7E4ULL, 0x81AD1D81E45BA045ULL } }, /* XSUM_XXH128_testdata[7459] */\n    { 2486, 0x9E3779B185EBCA8DULL, { 0x0F51171332A16986ULL, 0x0A0BC0C8D74BC6FAULL } }, /* XSUM_XXH128_testdata[7460] */\n    { 2487, 0x0000000000000000ULL, { 0x4D460642310AB50AULL, 0x0468B35176CD31CCULL } }, /* XSUM_XXH128_testdata[7461] */\n    { 2487, 0x000000009E3779B1ULL, { 0x0860975C95CD7EA0ULL, 0x58072BF56C9C9AA6ULL } }, /* XSUM_XXH128_testdata[7462] */\n    { 2487, 0x9E3779B185EBCA8DULL, { 0x98286BAD4038A667ULL, 0x7A69C224A065254CULL } }, /* XSUM_XXH128_testdata[7463] */\n    { 2488, 0x0000000000000000ULL, { 0x5C55E27FFD987D8BULL, 0x34806E5EBCB4AF93ULL } }, /* XSUM_XXH128_testdata[7464] */\n    { 2488, 0x000000009E3779B1ULL, { 0xAE7D7E04EF01D186ULL, 0x2F4A679704671E94ULL } }, /* XSUM_XXH128_testdata[7465] */\n    { 2488, 0x9E3779B185EBCA8DULL, { 0xABB686BCBCD600F3ULL, 0xC37008A780C29775ULL } }, /* XSUM_XXH128_testdata[7466] */\n    { 2489, 0x0000000000000000ULL, { 0x7B13729245828F1BULL, 0xBA21AC9ABF7F00C9ULL } }, /* XSUM_XXH128_testdata[7467] */\n    { 2489, 0x000000009E3779B1ULL, { 0x6F0537FFD45664A4ULL, 0xD85BA54051D873AFULL } }, /* XSUM_XXH128_testdata[7468] */\n    { 2489, 0x9E3779B185EBCA8DULL, { 0xAD9BD38D75CD546CULL, 0x35893F6EA431C639ULL } }, /* XSUM_XXH128_testdata[7469] */\n    { 2490, 0x0000000000000000ULL, { 0xA0B1DD56AE1089D0ULL, 0x53BEFE3954BB20FDULL } }, /* XSUM_XXH128_testdata[7470] */\n    { 2490, 0x000000009E3779B1ULL, { 0x5FB47F25BC13547CULL, 0xB9A3F4CAB704A47AULL } }, /* XSUM_XXH128_testdata[7471] */\n    { 2490, 0x9E3779B185EBCA8DULL, { 0x12BB22DF6959D027ULL, 0x834219AB84C41B4BULL } }, /* XSUM_XXH128_testdata[7472] */\n    { 2491, 0x0000000000000000ULL, { 0xEF32D3094C10D252ULL, 0xB3550B44BABA8C7FULL } }, /* XSUM_XXH128_testdata[7473] */\n    { 2491, 0x000000009E3779B1ULL, { 0x807FD7339C061704ULL, 0xEAA86BB232C1F250ULL } }, /* XSUM_XXH128_testdata[7474] */\n    { 2491, 0x9E3779B185EBCA8DULL, { 0x0445C2D133C6FBAAULL, 0x7D67F5A34F51847EULL } }, /* XSUM_XXH128_testdata[7475] */\n    { 2492, 0x0000000000000000ULL, { 0xFC31BEDF37B39F9AULL, 0x091755601798030FULL } }, /* XSUM_XXH128_testdata[7476] */\n    { 2492, 0x000000009E3779B1ULL, { 0x5B50BA72A80914CCULL, 0x07CFF71F0F8762F2ULL } }, /* XSUM_XXH128_testdata[7477] */\n    { 2492, 0x9E3779B185EBCA8DULL, { 0xE7412EB1ABF45B43ULL, 0x307006B916A669FAULL } }, /* XSUM_XXH128_testdata[7478] */\n    { 2493, 0x0000000000000000ULL, { 0x9BE368614DB83689ULL, 0x2C78EF57155AD8CFULL } }, /* XSUM_XXH128_testdata[7479] */\n    { 2493, 0x000000009E3779B1ULL, { 0xDB9CF0798B75D6E0ULL, 0x32979BDAA1241A24ULL } }, /* XSUM_XXH128_testdata[7480] */\n    { 2493, 0x9E3779B185EBCA8DULL, { 0x7AA0EE00D9289322ULL, 0xD8C12D2D2EF14FD0ULL } }, /* XSUM_XXH128_testdata[7481] */\n    { 2494, 0x0000000000000000ULL, { 0x8C969B282CDEF258ULL, 0x8BB8B1AA8C0C4246ULL } }, /* XSUM_XXH128_testdata[7482] */\n    { 2494, 0x000000009E3779B1ULL, { 0xEEBC0780E8825BB1ULL, 0x3BFD3C282C068F73ULL } }, /* XSUM_XXH128_testdata[7483] */\n    { 2494, 0x9E3779B185EBCA8DULL, { 0x0ED41F3E4DF0E8C3ULL, 0xA54129E2EFA7AFEAULL } }, /* XSUM_XXH128_testdata[7484] */\n    { 2495, 0x0000000000000000ULL, { 0xE6A765D030454BFBULL, 0xCF839597F1855013ULL } }, /* XSUM_XXH128_testdata[7485] */\n    { 2495, 0x000000009E3779B1ULL, { 0xE53A8D04F8B63574ULL, 0xA908E512CD5749FAULL } }, /* XSUM_XXH128_testdata[7486] */\n    { 2495, 0x9E3779B185EBCA8DULL, { 0x761DA60614C958BCULL, 0xA0F843D688A9EDD0ULL } }, /* XSUM_XXH128_testdata[7487] */\n    { 2496, 0x0000000000000000ULL, { 0xB565B3202DEF23C1ULL, 0xEA685D99C5DCA495ULL } }, /* XSUM_XXH128_testdata[7488] */\n    { 2496, 0x000000009E3779B1ULL, { 0x2F6C4855755BD055ULL, 0xF21E5C1B18F76FD6ULL } }, /* XSUM_XXH128_testdata[7489] */\n    { 2496, 0x9E3779B185EBCA8DULL, { 0x96E5D8A2B6CB4E50ULL, 0x63927E9DE9FECD06ULL } }, /* XSUM_XXH128_testdata[7490] */\n    { 2497, 0x0000000000000000ULL, { 0x31213BCB52410C9CULL, 0x651BCB5182974DFFULL } }, /* XSUM_XXH128_testdata[7491] */\n    { 2497, 0x000000009E3779B1ULL, { 0x5BCB2817EBD7589AULL, 0x7F6BD87BE693BAA2ULL } }, /* XSUM_XXH128_testdata[7492] */\n    { 2497, 0x9E3779B185EBCA8DULL, { 0xD6FF67DD99668F70ULL, 0x513F219C389B42BAULL } }, /* XSUM_XXH128_testdata[7493] */\n    { 2498, 0x0000000000000000ULL, { 0x30046CF9FC40766EULL, 0x014AD0CE872B8F89ULL } }, /* XSUM_XXH128_testdata[7494] */\n    { 2498, 0x000000009E3779B1ULL, { 0x9AC42EF3D991A7DFULL, 0x5E1FA9A2D6D481F2ULL } }, /* XSUM_XXH128_testdata[7495] */\n    { 2498, 0x9E3779B185EBCA8DULL, { 0x2B783B4547273EF2ULL, 0x0B9A63D53C48D20FULL } }, /* XSUM_XXH128_testdata[7496] */\n    { 2499, 0x0000000000000000ULL, { 0xF7554227E0ACEB04ULL, 0x9B09C7C46EF88951ULL } }, /* XSUM_XXH128_testdata[7497] */\n    { 2499, 0x000000009E3779B1ULL, { 0xA62ECFB1C5F59461ULL, 0x41312E694A8CF321ULL } }, /* XSUM_XXH128_testdata[7498] */\n    { 2499, 0x9E3779B185EBCA8DULL, { 0xD295304E2C26F07CULL, 0xC0ADD7EEEB4F0241ULL } }, /* XSUM_XXH128_testdata[7499] */\n    { 2500, 0x0000000000000000ULL, { 0x26CB04F4741A52D1ULL, 0xE6AF56E96B691115ULL } }, /* XSUM_XXH128_testdata[7500] */\n    { 2500, 0x000000009E3779B1ULL, { 0xA28ABB34B7DC5322ULL, 0x78AA6CBBC71FF5ECULL } }, /* XSUM_XXH128_testdata[7501] */\n    { 2500, 0x9E3779B185EBCA8DULL, { 0x03AB853D8E6E77CDULL, 0x0887E7E262D7DE37ULL } }, /* XSUM_XXH128_testdata[7502] */\n    { 2501, 0x0000000000000000ULL, { 0x1F08882A1F7E1AE0ULL, 0x303C542370B13BD4ULL } }, /* XSUM_XXH128_testdata[7503] */\n    { 2501, 0x000000009E3779B1ULL, { 0x3CEFC7F98AC03EAFULL, 0x8ACC8713D13F4F33ULL } }, /* XSUM_XXH128_testdata[7504] */\n    { 2501, 0x9E3779B185EBCA8DULL, { 0x6B89BDFBBA4A26C5ULL, 0xBF0A6F1A01723F39ULL } }, /* XSUM_XXH128_testdata[7505] */\n    { 2502, 0x0000000000000000ULL, { 0x866571933B2D19BBULL, 0x0A883C99D28657A8ULL } }, /* XSUM_XXH128_testdata[7506] */\n    { 2502, 0x000000009E3779B1ULL, { 0x01A16174A8786AA2ULL, 0x4BC07CC0080695BDULL } }, /* XSUM_XXH128_testdata[7507] */\n    { 2502, 0x9E3779B185EBCA8DULL, { 0x29C3D35675D12109ULL, 0xCF3677F70E1D9CAAULL } }, /* XSUM_XXH128_testdata[7508] */\n    { 2503, 0x0000000000000000ULL, { 0x91CCE7766CCE8FE5ULL, 0xA817BC540B7696A3ULL } }, /* XSUM_XXH128_testdata[7509] */\n    { 2503, 0x000000009E3779B1ULL, { 0xC0229970C50118FFULL, 0xF556999DA549E109ULL } }, /* XSUM_XXH128_testdata[7510] */\n    { 2503, 0x9E3779B185EBCA8DULL, { 0x992D977616FB9AE5ULL, 0x2FD7018C4644FA6EULL } }, /* XSUM_XXH128_testdata[7511] */\n    { 2504, 0x0000000000000000ULL, { 0x29B54766DE5E1E94ULL, 0xFEA13807B5DE5AF2ULL } }, /* XSUM_XXH128_testdata[7512] */\n    { 2504, 0x000000009E3779B1ULL, { 0x78846C05D07FD4CCULL, 0x4A69AEFB021A435FULL } }, /* XSUM_XXH128_testdata[7513] */\n    { 2504, 0x9E3779B185EBCA8DULL, { 0xA4D691B058080700ULL, 0x1F73F7DDA64FFB16ULL } }, /* XSUM_XXH128_testdata[7514] */\n    { 2505, 0x0000000000000000ULL, { 0x18F26802D56A53FEULL, 0x63EEE0C6C311162FULL } }, /* XSUM_XXH128_testdata[7515] */\n    { 2505, 0x000000009E3779B1ULL, { 0x2A8A069CF3F64DF1ULL, 0x620ACB8A8292AAE1ULL } }, /* XSUM_XXH128_testdata[7516] */\n    { 2505, 0x9E3779B185EBCA8DULL, { 0x37B621D8FECB486FULL, 0xD79DBAC81E83A260ULL } }, /* XSUM_XXH128_testdata[7517] */\n    { 2506, 0x0000000000000000ULL, { 0xC5FCE365B5D65ACEULL, 0x842532B9D276832FULL } }, /* XSUM_XXH128_testdata[7518] */\n    { 2506, 0x000000009E3779B1ULL, { 0x7A2BB0D31ADAE3C3ULL, 0x6FE66D3777C397E3ULL } }, /* XSUM_XXH128_testdata[7519] */\n    { 2506, 0x9E3779B185EBCA8DULL, { 0x73350B5F23B064AEULL, 0xE2BB3A1741098C40ULL } }, /* XSUM_XXH128_testdata[7520] */\n    { 2507, 0x0000000000000000ULL, { 0x213AF1A9B9E3410AULL, 0x8BD102AFC2E5E297ULL } }, /* XSUM_XXH128_testdata[7521] */\n    { 2507, 0x000000009E3779B1ULL, { 0xE9AEA3FBDB7B63DFULL, 0x411CE535A121EFA5ULL } }, /* XSUM_XXH128_testdata[7522] */\n    { 2507, 0x9E3779B185EBCA8DULL, { 0x949E27B85A874B7BULL, 0xCC94E49E68C1236EULL } }, /* XSUM_XXH128_testdata[7523] */\n    { 2508, 0x0000000000000000ULL, { 0x516645DA2D3011A4ULL, 0xBB2A4E18DC44A8CCULL } }, /* XSUM_XXH128_testdata[7524] */\n    { 2508, 0x000000009E3779B1ULL, { 0x97B9A97D098381CAULL, 0xF9FF1692E9C7EB74ULL } }, /* XSUM_XXH128_testdata[7525] */\n    { 2508, 0x9E3779B185EBCA8DULL, { 0xD46731FF4070FE06ULL, 0x8B53D4D00A84BDDBULL } }, /* XSUM_XXH128_testdata[7526] */\n    { 2509, 0x0000000000000000ULL, { 0x6C4BDD4D39806795ULL, 0x61D7A1754F09B998ULL } }, /* XSUM_XXH128_testdata[7527] */\n    { 2509, 0x000000009E3779B1ULL, { 0x31180DFBAE2AA6E5ULL, 0x10C8F874A5AF0381ULL } }, /* XSUM_XXH128_testdata[7528] */\n    { 2509, 0x9E3779B185EBCA8DULL, { 0x716550FFF0481238ULL, 0xB15AFB6810C7B9F2ULL } }, /* XSUM_XXH128_testdata[7529] */\n    { 2510, 0x0000000000000000ULL, { 0x5F866CD65285EB7AULL, 0xF988EE706A46BCFDULL } }, /* XSUM_XXH128_testdata[7530] */\n    { 2510, 0x000000009E3779B1ULL, { 0xC8D8DF0E1E8EAF19ULL, 0x8976867C799410AEULL } }, /* XSUM_XXH128_testdata[7531] */\n    { 2510, 0x9E3779B185EBCA8DULL, { 0x0318A12DB7C9F162ULL, 0x9305FEEF305C6EA7ULL } }, /* XSUM_XXH128_testdata[7532] */\n    { 2511, 0x0000000000000000ULL, { 0xEBA1A3DD90AEBFFFULL, 0x55D1BC5FB06B3A6DULL } }, /* XSUM_XXH128_testdata[7533] */\n    { 2511, 0x000000009E3779B1ULL, { 0xC59F61AACDCAC8B2ULL, 0x5736FC739CB7DB11ULL } }, /* XSUM_XXH128_testdata[7534] */\n    { 2511, 0x9E3779B185EBCA8DULL, { 0xBA953F31B3A00ECDULL, 0x61A554BBBDEB753EULL } }, /* XSUM_XXH128_testdata[7535] */\n    { 2512, 0x0000000000000000ULL, { 0x74B3591496D9718BULL, 0x42E5E1BC8476B31AULL } }, /* XSUM_XXH128_testdata[7536] */\n    { 2512, 0x000000009E3779B1ULL, { 0x22DD2564DCA2BB2DULL, 0xF950D8069F6A4B84ULL } }, /* XSUM_XXH128_testdata[7537] */\n    { 2512, 0x9E3779B185EBCA8DULL, { 0xF13D881703493E17ULL, 0xA9AD84CC2577B374ULL } }, /* XSUM_XXH128_testdata[7538] */\n    { 2513, 0x0000000000000000ULL, { 0xB6F86B89BCA03AC2ULL, 0x3F0DED2093AB972AULL } }, /* XSUM_XXH128_testdata[7539] */\n    { 2513, 0x000000009E3779B1ULL, { 0x5EB305881983FBBAULL, 0xB42CA7D890F3E062ULL } }, /* XSUM_XXH128_testdata[7540] */\n    { 2513, 0x9E3779B185EBCA8DULL, { 0x43B7AE38B94866A5ULL, 0x5F9DAFE4DD8F8839ULL } }, /* XSUM_XXH128_testdata[7541] */\n    { 2514, 0x0000000000000000ULL, { 0x86F1B452363281E9ULL, 0x86716BA24C68522FULL } }, /* XSUM_XXH128_testdata[7542] */\n    { 2514, 0x000000009E3779B1ULL, { 0x91B353FC5CEE74A8ULL, 0xFA157539385877C6ULL } }, /* XSUM_XXH128_testdata[7543] */\n    { 2514, 0x9E3779B185EBCA8DULL, { 0xC55AD56621595369ULL, 0x0AF7DCEB25D8B7BBULL } }, /* XSUM_XXH128_testdata[7544] */\n    { 2515, 0x0000000000000000ULL, { 0x9DFE8CFA5D090682ULL, 0xCEA6FFD1EAE3E577ULL } }, /* XSUM_XXH128_testdata[7545] */\n    { 2515, 0x000000009E3779B1ULL, { 0xE08328FCC7C49774ULL, 0x9BDDA8D552349027ULL } }, /* XSUM_XXH128_testdata[7546] */\n    { 2515, 0x9E3779B185EBCA8DULL, { 0xC4763A2984855956ULL, 0xB48CF60AB2F86F82ULL } }, /* XSUM_XXH128_testdata[7547] */\n    { 2516, 0x0000000000000000ULL, { 0xA4A3D0FA8DF914BBULL, 0x018BBEFCE400411FULL } }, /* XSUM_XXH128_testdata[7548] */\n    { 2516, 0x000000009E3779B1ULL, { 0x953C5ABAC42C7D99ULL, 0x5F5EE32AD445C29DULL } }, /* XSUM_XXH128_testdata[7549] */\n    { 2516, 0x9E3779B185EBCA8DULL, { 0x55D9A21879096100ULL, 0xD7A6D419029E58DBULL } }, /* XSUM_XXH128_testdata[7550] */\n    { 2517, 0x0000000000000000ULL, { 0x0C7E962BD2937142ULL, 0x734E71454BE0BABDULL } }, /* XSUM_XXH128_testdata[7551] */\n    { 2517, 0x000000009E3779B1ULL, { 0x3FD93B9585B26AB0ULL, 0xFD0AE5AB0C5F9009ULL } }, /* XSUM_XXH128_testdata[7552] */\n    { 2517, 0x9E3779B185EBCA8DULL, { 0xF56A061E20E1D9B7ULL, 0xDF57EC49376B10DFULL } }, /* XSUM_XXH128_testdata[7553] */\n    { 2518, 0x0000000000000000ULL, { 0xEF0DA9D0D9C42F43ULL, 0xD5FF1FD54C3BEAD0ULL } }, /* XSUM_XXH128_testdata[7554] */\n    { 2518, 0x000000009E3779B1ULL, { 0x86B7CEF980BD925BULL, 0xC3A5037278A9289CULL } }, /* XSUM_XXH128_testdata[7555] */\n    { 2518, 0x9E3779B185EBCA8DULL, { 0x06334992C2AD9ADCULL, 0xE326FC8B008AA936ULL } }, /* XSUM_XXH128_testdata[7556] */\n    { 2519, 0x0000000000000000ULL, { 0x981C612186C18BD7ULL, 0x36872F8AF31813C7ULL } }, /* XSUM_XXH128_testdata[7557] */\n    { 2519, 0x000000009E3779B1ULL, { 0x087D4440D271D51FULL, 0x9C9DC8E5F1112652ULL } }, /* XSUM_XXH128_testdata[7558] */\n    { 2519, 0x9E3779B185EBCA8DULL, { 0xE074A72E67FEEEB8ULL, 0xBB75875919B6C9D4ULL } }, /* XSUM_XXH128_testdata[7559] */\n    { 2520, 0x0000000000000000ULL, { 0x63D13F8020F2E70AULL, 0x9418C2A99D103ED9ULL } }, /* XSUM_XXH128_testdata[7560] */\n    { 2520, 0x000000009E3779B1ULL, { 0x399E979D78B6BF60ULL, 0x86B7BB98D9784E86ULL } }, /* XSUM_XXH128_testdata[7561] */\n    { 2520, 0x9E3779B185EBCA8DULL, { 0x34FDDD40FF026698ULL, 0x3397851A7D81A541ULL } }, /* XSUM_XXH128_testdata[7562] */\n    { 2521, 0x0000000000000000ULL, { 0x11E6CCC6E9726646ULL, 0x79FE87380918BEDEULL } }, /* XSUM_XXH128_testdata[7563] */\n    { 2521, 0x000000009E3779B1ULL, { 0xF614FDA5037FB5D3ULL, 0x0BFE0E62D416A865ULL } }, /* XSUM_XXH128_testdata[7564] */\n    { 2521, 0x9E3779B185EBCA8DULL, { 0xF56A02A1076B386BULL, 0xDDEDFB6D96A81045ULL } }, /* XSUM_XXH128_testdata[7565] */\n    { 2522, 0x0000000000000000ULL, { 0x4D43554DFD39C5F1ULL, 0x57145880BABCE33CULL } }, /* XSUM_XXH128_testdata[7566] */\n    { 2522, 0x000000009E3779B1ULL, { 0xF48B9B4D8564E8F5ULL, 0xBEA6CFEEED328995ULL } }, /* XSUM_XXH128_testdata[7567] */\n    { 2522, 0x9E3779B185EBCA8DULL, { 0x3263BFB2AFF8A291ULL, 0x95074C68E6CE5C0BULL } }, /* XSUM_XXH128_testdata[7568] */\n    { 2523, 0x0000000000000000ULL, { 0xCFAC84F889FF97B2ULL, 0x098802310334522EULL } }, /* XSUM_XXH128_testdata[7569] */\n    { 2523, 0x000000009E3779B1ULL, { 0xA04623CEE9870790ULL, 0xE7425B44332D53EFULL } }, /* XSUM_XXH128_testdata[7570] */\n    { 2523, 0x9E3779B185EBCA8DULL, { 0x8E8BCDE00512F9DBULL, 0x2D6C56A886FAD778ULL } }, /* XSUM_XXH128_testdata[7571] */\n    { 2524, 0x0000000000000000ULL, { 0xDF7FE6D07F66358DULL, 0xD458E2C70DF670BEULL } }, /* XSUM_XXH128_testdata[7572] */\n    { 2524, 0x000000009E3779B1ULL, { 0xEF5E1F68BC45F80DULL, 0xCEB525020B431717ULL } }, /* XSUM_XXH128_testdata[7573] */\n    { 2524, 0x9E3779B185EBCA8DULL, { 0x06C77049AA50091BULL, 0x6DD8AD40DDEEEB4FULL } }, /* XSUM_XXH128_testdata[7574] */\n    { 2525, 0x0000000000000000ULL, { 0x0DC047741CA34FD4ULL, 0x115CEBEA4FC813E1ULL } }, /* XSUM_XXH128_testdata[7575] */\n    { 2525, 0x000000009E3779B1ULL, { 0x8C823EA28C9C5C82ULL, 0x39CF0C60CE667171ULL } }, /* XSUM_XXH128_testdata[7576] */\n    { 2525, 0x9E3779B185EBCA8DULL, { 0x2B2EC50F1C779ECFULL, 0x64D71695412BE2E4ULL } }, /* XSUM_XXH128_testdata[7577] */\n    { 2526, 0x0000000000000000ULL, { 0xDA22F631491949A5ULL, 0xF297E2169F9BA276ULL } }, /* XSUM_XXH128_testdata[7578] */\n    { 2526, 0x000000009E3779B1ULL, { 0x66FFC0F1302AD242ULL, 0xB6A3945E100DBBA4ULL } }, /* XSUM_XXH128_testdata[7579] */\n    { 2526, 0x9E3779B185EBCA8DULL, { 0x303A45291FB57D33ULL, 0x1B058F67AF737FAAULL } }, /* XSUM_XXH128_testdata[7580] */\n    { 2527, 0x0000000000000000ULL, { 0xDEA2B9CC46C5A5F1ULL, 0x8D60AC8CEAB108B6ULL } }, /* XSUM_XXH128_testdata[7581] */\n    { 2527, 0x000000009E3779B1ULL, { 0x3F9DAFC93D160C66ULL, 0xDA4F50D3BE653B3FULL } }, /* XSUM_XXH128_testdata[7582] */\n    { 2527, 0x9E3779B185EBCA8DULL, { 0x9C26E09E495DC82BULL, 0x51C577AD9BA97C6DULL } }, /* XSUM_XXH128_testdata[7583] */\n    { 2528, 0x0000000000000000ULL, { 0xDBA56F835255F96BULL, 0xFF157D8605F8DBFAULL } }, /* XSUM_XXH128_testdata[7584] */\n    { 2528, 0x000000009E3779B1ULL, { 0x6CCD1F89FACE105BULL, 0xD78FF9DE91F5EFD5ULL } }, /* XSUM_XXH128_testdata[7585] */\n    { 2528, 0x9E3779B185EBCA8DULL, { 0x991A268378ACA738ULL, 0x674ED769BCE2E843ULL } }, /* XSUM_XXH128_testdata[7586] */\n    { 2529, 0x0000000000000000ULL, { 0xE0CDFC8278598809ULL, 0xDD52F438EF19C3ECULL } }, /* XSUM_XXH128_testdata[7587] */\n    { 2529, 0x000000009E3779B1ULL, { 0x8B5923BE77D2A4A1ULL, 0x3EC8C9FBBE8AD287ULL } }, /* XSUM_XXH128_testdata[7588] */\n    { 2529, 0x9E3779B185EBCA8DULL, { 0xD58FC1D2C92F0943ULL, 0xCD3048F0CBF53AAFULL } }, /* XSUM_XXH128_testdata[7589] */\n    { 2530, 0x0000000000000000ULL, { 0xBA8BAF78823115A1ULL, 0x73E65B631911E7D9ULL } }, /* XSUM_XXH128_testdata[7590] */\n    { 2530, 0x000000009E3779B1ULL, { 0xB7ED4DA3CEADA8CFULL, 0x870D5DD564E63D1AULL } }, /* XSUM_XXH128_testdata[7591] */\n    { 2530, 0x9E3779B185EBCA8DULL, { 0xDA2BE7BB589960C7ULL, 0xA83DEDFCAD103D95ULL } }, /* XSUM_XXH128_testdata[7592] */\n    { 2531, 0x0000000000000000ULL, { 0x84147A051CD8405CULL, 0xE49E31B31B763A44ULL } }, /* XSUM_XXH128_testdata[7593] */\n    { 2531, 0x000000009E3779B1ULL, { 0x871B0FC35B35C98CULL, 0x30C14181CC06197EULL } }, /* XSUM_XXH128_testdata[7594] */\n    { 2531, 0x9E3779B185EBCA8DULL, { 0xABD86C2E8CBF5471ULL, 0xB073574327E2ECE5ULL } }, /* XSUM_XXH128_testdata[7595] */\n    { 2532, 0x0000000000000000ULL, { 0xA64FE619F33940FFULL, 0x043650026E9AC754ULL } }, /* XSUM_XXH128_testdata[7596] */\n    { 2532, 0x000000009E3779B1ULL, { 0x29A9B987EC71C82DULL, 0x273D66CE1272E8E4ULL } }, /* XSUM_XXH128_testdata[7597] */\n    { 2532, 0x9E3779B185EBCA8DULL, { 0xFB2312C177FDE048ULL, 0x6C9B231CF1FF916DULL } }, /* XSUM_XXH128_testdata[7598] */\n    { 2533, 0x0000000000000000ULL, { 0xA6F08816CF4BACF2ULL, 0x71CA204FB637EF8FULL } }, /* XSUM_XXH128_testdata[7599] */\n    { 2533, 0x000000009E3779B1ULL, { 0xAD9A92F8E3F5BBEFULL, 0x5A70DBB75343A804ULL } }, /* XSUM_XXH128_testdata[7600] */\n    { 2533, 0x9E3779B185EBCA8DULL, { 0x2B81A778B504831CULL, 0x302EA4B4DDF2084FULL } }, /* XSUM_XXH128_testdata[7601] */\n    { 2534, 0x0000000000000000ULL, { 0x4155B18A540E04FEULL, 0xC0C93D7BAFA13C8CULL } }, /* XSUM_XXH128_testdata[7602] */\n    { 2534, 0x000000009E3779B1ULL, { 0xB65D5F30C3802490ULL, 0xC2861A406A823E94ULL } }, /* XSUM_XXH128_testdata[7603] */\n    { 2534, 0x9E3779B185EBCA8DULL, { 0xE74CE315250E7713ULL, 0x6FF523BA03363BD0ULL } }, /* XSUM_XXH128_testdata[7604] */\n    { 2535, 0x0000000000000000ULL, { 0xA4F15D9A49D534CDULL, 0xF5A7DF2273C55979ULL } }, /* XSUM_XXH128_testdata[7605] */\n    { 2535, 0x000000009E3779B1ULL, { 0xD9899563AB853BB7ULL, 0x46DCA1F03C611F74ULL } }, /* XSUM_XXH128_testdata[7606] */\n    { 2535, 0x9E3779B185EBCA8DULL, { 0x5E1998CF4EF8BB40ULL, 0x728C5286C6F54B0DULL } }, /* XSUM_XXH128_testdata[7607] */\n    { 2536, 0x0000000000000000ULL, { 0x3513007897DFFAFAULL, 0xF636409AAF0039E7ULL } }, /* XSUM_XXH128_testdata[7608] */\n    { 2536, 0x000000009E3779B1ULL, { 0x1447EEA08CC14933ULL, 0xFC89565976DBDF17ULL } }, /* XSUM_XXH128_testdata[7609] */\n    { 2536, 0x9E3779B185EBCA8DULL, { 0x566B64163FD4D5A2ULL, 0xD89CBD120BC1600DULL } }, /* XSUM_XXH128_testdata[7610] */\n    { 2537, 0x0000000000000000ULL, { 0xFC3AD43F345DF501ULL, 0x271EA76C46AF7106ULL } }, /* XSUM_XXH128_testdata[7611] */\n    { 2537, 0x000000009E3779B1ULL, { 0xDF43117D2A94CC9FULL, 0xAC0F3ADEA094EE40ULL } }, /* XSUM_XXH128_testdata[7612] */\n    { 2537, 0x9E3779B185EBCA8DULL, { 0x931558E8245B32A1ULL, 0xF897876FDE16458AULL } }, /* XSUM_XXH128_testdata[7613] */\n    { 2538, 0x0000000000000000ULL, { 0x47AE535569E785C6ULL, 0x74B7946AF6E6A31BULL } }, /* XSUM_XXH128_testdata[7614] */\n    { 2538, 0x000000009E3779B1ULL, { 0x2E7F075834805614ULL, 0xED6C2DFD411E4BC4ULL } }, /* XSUM_XXH128_testdata[7615] */\n    { 2538, 0x9E3779B185EBCA8DULL, { 0x269E2991E7F8E7ABULL, 0xB83EC4B0EDACF70EULL } }, /* XSUM_XXH128_testdata[7616] */\n    { 2539, 0x0000000000000000ULL, { 0xC4F897E74397D2DBULL, 0x9E6E1DB8ED64C0A5ULL } }, /* XSUM_XXH128_testdata[7617] */\n    { 2539, 0x000000009E3779B1ULL, { 0x2A5E58CDA2006485ULL, 0x938B8DC24B8501CEULL } }, /* XSUM_XXH128_testdata[7618] */\n    { 2539, 0x9E3779B185EBCA8DULL, { 0xCAE41E46D2B4D464ULL, 0x43A1B9475408DA35ULL } }, /* XSUM_XXH128_testdata[7619] */\n    { 2540, 0x0000000000000000ULL, { 0xA5B0453FAD8F40ABULL, 0x05FAB909261BC287ULL } }, /* XSUM_XXH128_testdata[7620] */\n    { 2540, 0x000000009E3779B1ULL, { 0xE3172F4A8C1C447EULL, 0x495A6047135E2C98ULL } }, /* XSUM_XXH128_testdata[7621] */\n    { 2540, 0x9E3779B185EBCA8DULL, { 0xDA50A059C37DF89AULL, 0x5E0353B7B0E95E1FULL } }, /* XSUM_XXH128_testdata[7622] */\n    { 2541, 0x0000000000000000ULL, { 0x2AD31C54C868E970ULL, 0x1EA2625352F6BB2EULL } }, /* XSUM_XXH128_testdata[7623] */\n    { 2541, 0x000000009E3779B1ULL, { 0x50B278F197FB107FULL, 0xA58EEB7B16E75E29ULL } }, /* XSUM_XXH128_testdata[7624] */\n    { 2541, 0x9E3779B185EBCA8DULL, { 0x8DC47215C1FAC750ULL, 0xE3900246A2DFD6CCULL } }, /* XSUM_XXH128_testdata[7625] */\n    { 2542, 0x0000000000000000ULL, { 0x1ECD99D927119426ULL, 0xA9164C3CFC652D3AULL } }, /* XSUM_XXH128_testdata[7626] */\n    { 2542, 0x000000009E3779B1ULL, { 0x481C8F9A752E86A9ULL, 0xAF8E1863E959D1A1ULL } }, /* XSUM_XXH128_testdata[7627] */\n    { 2542, 0x9E3779B185EBCA8DULL, { 0xFE1270C2CD79B954ULL, 0x1A92A8C9D32C0C55ULL } }, /* XSUM_XXH128_testdata[7628] */\n    { 2543, 0x0000000000000000ULL, { 0x7536E78A4E103EB7ULL, 0x33E46B26C8E58333ULL } }, /* XSUM_XXH128_testdata[7629] */\n    { 2543, 0x000000009E3779B1ULL, { 0xA5D97BB3A6C944E7ULL, 0xBA3011E5E3784597ULL } }, /* XSUM_XXH128_testdata[7630] */\n    { 2543, 0x9E3779B185EBCA8DULL, { 0x561825DB5725EC05ULL, 0x0CE8A96AA5DAFA3CULL } }, /* XSUM_XXH128_testdata[7631] */\n    { 2544, 0x0000000000000000ULL, { 0xF84DD2FB541DBF14ULL, 0xBEFD4BC1EBDD8139ULL } }, /* XSUM_XXH128_testdata[7632] */\n    { 2544, 0x000000009E3779B1ULL, { 0xD2932081B9548A9CULL, 0x559854A9C01122E3ULL } }, /* XSUM_XXH128_testdata[7633] */\n    { 2544, 0x9E3779B185EBCA8DULL, { 0xEDB23E666D56D112ULL, 0x1BB676146853B069ULL } }, /* XSUM_XXH128_testdata[7634] */\n    { 2545, 0x0000000000000000ULL, { 0xD80CBEE66D7975F5ULL, 0xB9732855CB681C8AULL } }, /* XSUM_XXH128_testdata[7635] */\n    { 2545, 0x000000009E3779B1ULL, { 0xB6FD02CB022F85ECULL, 0xA03E2D47A89F4CA6ULL } }, /* XSUM_XXH128_testdata[7636] */\n    { 2545, 0x9E3779B185EBCA8DULL, { 0x5AE5CF1BD53581EAULL, 0x291872CC2ECE35CDULL } }, /* XSUM_XXH128_testdata[7637] */\n    { 2546, 0x0000000000000000ULL, { 0x74B79EB050C88A5BULL, 0xC29CDC0169165D22ULL } }, /* XSUM_XXH128_testdata[7638] */\n    { 2546, 0x000000009E3779B1ULL, { 0xCCF7B63023B016AFULL, 0x8BA36CA4A1BBD047ULL } }, /* XSUM_XXH128_testdata[7639] */\n    { 2546, 0x9E3779B185EBCA8DULL, { 0x9CA2C17DBF6403EBULL, 0x18758C71339E5C2AULL } }, /* XSUM_XXH128_testdata[7640] */\n    { 2547, 0x0000000000000000ULL, { 0xAB0E6EA9E0AC02C9ULL, 0x44F40B0B4311F2FDULL } }, /* XSUM_XXH128_testdata[7641] */\n    { 2547, 0x000000009E3779B1ULL, { 0xF9663CA993010975ULL, 0x0575049B064B1F72ULL } }, /* XSUM_XXH128_testdata[7642] */\n    { 2547, 0x9E3779B185EBCA8DULL, { 0x1CC8952A920BE943ULL, 0x3703E91E46005407ULL } }, /* XSUM_XXH128_testdata[7643] */\n    { 2548, 0x0000000000000000ULL, { 0x0BBF501CAB2045D0ULL, 0x37EDC5957C15DBF8ULL } }, /* XSUM_XXH128_testdata[7644] */\n    { 2548, 0x000000009E3779B1ULL, { 0xFF46FFD58982536AULL, 0x379F63AD8220166CULL } }, /* XSUM_XXH128_testdata[7645] */\n    { 2548, 0x9E3779B185EBCA8DULL, { 0x492E253BECC049B7ULL, 0x3CC37329A4284286ULL } }, /* XSUM_XXH128_testdata[7646] */\n    { 2549, 0x0000000000000000ULL, { 0x744CBAF9B66702C9ULL, 0x4CB1A5BCC01E4D61ULL } }, /* XSUM_XXH128_testdata[7647] */\n    { 2549, 0x000000009E3779B1ULL, { 0x3D8887953E485B94ULL, 0x9F09CFA98AAF9D03ULL } }, /* XSUM_XXH128_testdata[7648] */\n    { 2549, 0x9E3779B185EBCA8DULL, { 0x089606A58D945131ULL, 0x8633531B5FD29DD5ULL } }, /* XSUM_XXH128_testdata[7649] */\n    { 2550, 0x0000000000000000ULL, { 0xD452D819CAAA8F64ULL, 0xC5873E0ECCB455FDULL } }, /* XSUM_XXH128_testdata[7650] */\n    { 2550, 0x000000009E3779B1ULL, { 0xD4F7E436E090F6FCULL, 0x62476D056D7EDAC5ULL } }, /* XSUM_XXH128_testdata[7651] */\n    { 2550, 0x9E3779B185EBCA8DULL, { 0x0060BFDE7C67FB8CULL, 0x112BC8E4F6714623ULL } }, /* XSUM_XXH128_testdata[7652] */\n    { 2551, 0x0000000000000000ULL, { 0x7441813208320928ULL, 0xC6946348C4EA188AULL } }, /* XSUM_XXH128_testdata[7653] */\n    { 2551, 0x000000009E3779B1ULL, { 0x57B62BF99A055775ULL, 0x174521752E86AA35ULL } }, /* XSUM_XXH128_testdata[7654] */\n    { 2551, 0x9E3779B185EBCA8DULL, { 0x78F88FB9DB734740ULL, 0xAE46D44D513935EFULL } }, /* XSUM_XXH128_testdata[7655] */\n    { 2552, 0x0000000000000000ULL, { 0x2417C3FB8183F331ULL, 0x890342BA02352792ULL } }, /* XSUM_XXH128_testdata[7656] */\n    { 2552, 0x000000009E3779B1ULL, { 0x76D838ED6B2A09CAULL, 0x7375F0E22DC5D1F6ULL } }, /* XSUM_XXH128_testdata[7657] */\n    { 2552, 0x9E3779B185EBCA8DULL, { 0x7C0E5F122AE82E10ULL, 0xBCC384DB00B51F0AULL } }, /* XSUM_XXH128_testdata[7658] */\n    { 2553, 0x0000000000000000ULL, { 0x245E2593E2467EF6ULL, 0xA13CB296E1BB5EA3ULL } }, /* XSUM_XXH128_testdata[7659] */\n    { 2553, 0x000000009E3779B1ULL, { 0x8DE1D3CF1F3F0D85ULL, 0x5E60F072E4D8068DULL } }, /* XSUM_XXH128_testdata[7660] */\n    { 2553, 0x9E3779B185EBCA8DULL, { 0x78648D15B7FE9001ULL, 0x0B6FB6527E54CFA2ULL } }, /* XSUM_XXH128_testdata[7661] */\n    { 2554, 0x0000000000000000ULL, { 0xBCC23C16065715F6ULL, 0x17848CFA3809B4F7ULL } }, /* XSUM_XXH128_testdata[7662] */\n    { 2554, 0x000000009E3779B1ULL, { 0x282E0EC3A6ACBF9FULL, 0x49A01E1A4FA6AEFCULL } }, /* XSUM_XXH128_testdata[7663] */\n    { 2554, 0x9E3779B185EBCA8DULL, { 0x364DECBEF543F51DULL, 0xD15FF284757B93B1ULL } }, /* XSUM_XXH128_testdata[7664] */\n    { 2555, 0x0000000000000000ULL, { 0xB095D4AD861C6D95ULL, 0xF402A429F265252AULL } }, /* XSUM_XXH128_testdata[7665] */\n    { 2555, 0x000000009E3779B1ULL, { 0x4AE66F0FD341289EULL, 0x6765307742DD9954ULL } }, /* XSUM_XXH128_testdata[7666] */\n    { 2555, 0x9E3779B185EBCA8DULL, { 0xC3F2906261781FB5ULL, 0xA3D7A7DC4D1B16C5ULL } }, /* XSUM_XXH128_testdata[7667] */\n    { 2556, 0x0000000000000000ULL, { 0xD8B36BB0F3742305ULL, 0x9F1370AE56B67CE1ULL } }, /* XSUM_XXH128_testdata[7668] */\n    { 2556, 0x000000009E3779B1ULL, { 0x523ED20184EE3F2BULL, 0xF919F44FBF4E4DA3ULL } }, /* XSUM_XXH128_testdata[7669] */\n    { 2556, 0x9E3779B185EBCA8DULL, { 0x576FBFE384D1F3DCULL, 0xE93655834CAD8873ULL } }, /* XSUM_XXH128_testdata[7670] */\n    { 2557, 0x0000000000000000ULL, { 0x7E5CBC4F08653A51ULL, 0x27309AFACB188FC7ULL } }, /* XSUM_XXH128_testdata[7671] */\n    { 2557, 0x000000009E3779B1ULL, { 0xF5C4655F78B69A84ULL, 0x64688605A8D2C77BULL } }, /* XSUM_XXH128_testdata[7672] */\n    { 2557, 0x9E3779B185EBCA8DULL, { 0x40EE18F37D3A6A3DULL, 0x11FD5944B3D9DD6EULL } }, /* XSUM_XXH128_testdata[7673] */\n    { 2558, 0x0000000000000000ULL, { 0x027AC279D3E059D5ULL, 0xEBD2D65E6007708BULL } }, /* XSUM_XXH128_testdata[7674] */\n    { 2558, 0x000000009E3779B1ULL, { 0x02095C19E73FB30BULL, 0xB362B9EEDA2386FAULL } }, /* XSUM_XXH128_testdata[7675] */\n    { 2558, 0x9E3779B185EBCA8DULL, { 0x18655A56E8B5CEC7ULL, 0x7ACE91CB8224BAE4ULL } }, /* XSUM_XXH128_testdata[7676] */\n    { 2559, 0x0000000000000000ULL, { 0xDFB77052CA36F5FAULL, 0x65B3C8E017232B92ULL } }, /* XSUM_XXH128_testdata[7677] */\n    { 2559, 0x000000009E3779B1ULL, { 0x7278AAB800B9C7D1ULL, 0xEBDDD1080EE640E2ULL } }, /* XSUM_XXH128_testdata[7678] */\n    { 2559, 0x9E3779B185EBCA8DULL, { 0x083D330A88FCC356ULL, 0x94D6A4406817305CULL } }, /* XSUM_XXH128_testdata[7679] */\n    { 2560, 0x0000000000000000ULL, { 0xFE88B5D95CB0BA87ULL, 0x072BB3AA0BEF486AULL } }, /* XSUM_XXH128_testdata[7680] */\n    { 2560, 0x000000009E3779B1ULL, { 0x732DB7768971A310ULL, 0xD17776C063AE5D10ULL } }, /* XSUM_XXH128_testdata[7681] */\n    { 2560, 0x9E3779B185EBCA8DULL, { 0x9D718CB6BD910BA2ULL, 0xF291472AA7DA88CAULL } }, /* XSUM_XXH128_testdata[7682] */\n    { 2561, 0x0000000000000000ULL, { 0xB417B3F1634546D4ULL, 0x0267D8AC41FFEEF4ULL } }, /* XSUM_XXH128_testdata[7683] */\n    { 2561, 0x000000009E3779B1ULL, { 0x9D495AEA3A783030ULL, 0xE216A257245D752FULL } }, /* XSUM_XXH128_testdata[7684] */\n    { 2561, 0x9E3779B185EBCA8DULL, { 0x98B20C48B84C4B1AULL, 0xF28CC19820B475F3ULL } }, /* XSUM_XXH128_testdata[7685] */\n    { 2562, 0x0000000000000000ULL, { 0xCD93768E3866191BULL, 0xED3D4A222B5A16E7ULL } }, /* XSUM_XXH128_testdata[7686] */\n    { 2562, 0x000000009E3779B1ULL, { 0xA31AE378CA19B9ADULL, 0xB3BD8B20F163EDFFULL } }, /* XSUM_XXH128_testdata[7687] */\n    { 2562, 0x9E3779B185EBCA8DULL, { 0xE4A51A83EED3D7B7ULL, 0x6D1283993B3CE6C0ULL } }, /* XSUM_XXH128_testdata[7688] */\n    { 2563, 0x0000000000000000ULL, { 0x466B225ADC4EFCB8ULL, 0x3C9912C58984680CULL } }, /* XSUM_XXH128_testdata[7689] */\n    { 2563, 0x000000009E3779B1ULL, { 0xA485BA03B71D1F13ULL, 0xF8B10299EE254FB9ULL } }, /* XSUM_XXH128_testdata[7690] */\n    { 2563, 0x9E3779B185EBCA8DULL, { 0xFC869FC17EE1ED47ULL, 0x29A7E2EC946B80C7ULL } }, /* XSUM_XXH128_testdata[7691] */\n    { 2564, 0x0000000000000000ULL, { 0x97EEDCA68626A59AULL, 0xDB0781F99FEAEDFAULL } }, /* XSUM_XXH128_testdata[7692] */\n    { 2564, 0x000000009E3779B1ULL, { 0xD9ECDABBEC53C6FDULL, 0x314FC86158BF1EE7ULL } }, /* XSUM_XXH128_testdata[7693] */\n    { 2564, 0x9E3779B185EBCA8DULL, { 0xB5AE71338EF75449ULL, 0x9A7A395E10C07475ULL } }, /* XSUM_XXH128_testdata[7694] */\n    { 2565, 0x0000000000000000ULL, { 0xB4F3EB6590D89B7AULL, 0xD2B78040D0842546ULL } }, /* XSUM_XXH128_testdata[7695] */\n    { 2565, 0x000000009E3779B1ULL, { 0x0F89CA57EA3BC465ULL, 0x9453F13BA665A486ULL } }, /* XSUM_XXH128_testdata[7696] */\n    { 2565, 0x9E3779B185EBCA8DULL, { 0xB5C10BDFE714DDE0ULL, 0xBCEA55D5012FC7F8ULL } }, /* XSUM_XXH128_testdata[7697] */\n    { 2566, 0x0000000000000000ULL, { 0x2ABCC0FC86100D8BULL, 0x7CFCF69742786B4CULL } }, /* XSUM_XXH128_testdata[7698] */\n    { 2566, 0x000000009E3779B1ULL, { 0x99230FCB2EC291E0ULL, 0x8876E799FEF65F06ULL } }, /* XSUM_XXH128_testdata[7699] */\n    { 2566, 0x9E3779B185EBCA8DULL, { 0xAD4F7612DA2A8D6AULL, 0x5BF4D94687962C2EULL } }, /* XSUM_XXH128_testdata[7700] */\n    { 2567, 0x0000000000000000ULL, { 0xF7A5777064BB2E3AULL, 0x4D0E084AA94B4B5EULL } }, /* XSUM_XXH128_testdata[7701] */\n    { 2567, 0x000000009E3779B1ULL, { 0xD3B31B142CA26956ULL, 0xB2C6EBF00E022B2DULL } }, /* XSUM_XXH128_testdata[7702] */\n    { 2567, 0x9E3779B185EBCA8DULL, { 0x2B809C5C59C1BA8CULL, 0xBBEE9A8C6479C998ULL } }, /* XSUM_XXH128_testdata[7703] */\n    { 2568, 0x0000000000000000ULL, { 0xC37DE712755AF5A1ULL, 0xBF4511DA02622565ULL } }, /* XSUM_XXH128_testdata[7704] */\n    { 2568, 0x000000009E3779B1ULL, { 0xBEF2AE343EA9DCCBULL, 0x9B001E1914DDEA89ULL } }, /* XSUM_XXH128_testdata[7705] */\n    { 2568, 0x9E3779B185EBCA8DULL, { 0x59D9506FF4A1C59BULL, 0x4DE06B5B3C9FD74BULL } }, /* XSUM_XXH128_testdata[7706] */\n    { 2569, 0x0000000000000000ULL, { 0x771B2E56B82F9305ULL, 0x8BA9F80E59EEE441ULL } }, /* XSUM_XXH128_testdata[7707] */\n    { 2569, 0x000000009E3779B1ULL, { 0x98595ACD711EF707ULL, 0xFC0482BD9050DF10ULL } }, /* XSUM_XXH128_testdata[7708] */\n    { 2569, 0x9E3779B185EBCA8DULL, { 0x602479761F075306ULL, 0xE2E955FE5A2994A2ULL } }, /* XSUM_XXH128_testdata[7709] */\n    { 2570, 0x0000000000000000ULL, { 0xABD36BA52C8E93D7ULL, 0x1BB149CED4070395ULL } }, /* XSUM_XXH128_testdata[7710] */\n    { 2570, 0x000000009E3779B1ULL, { 0xEC2039DF76DF4476ULL, 0x75BD9C069F9404C2ULL } }, /* XSUM_XXH128_testdata[7711] */\n    { 2570, 0x9E3779B185EBCA8DULL, { 0x9BBEFFD3913419D9ULL, 0x971E51C9BF75E630ULL } }, /* XSUM_XXH128_testdata[7712] */\n    { 2571, 0x0000000000000000ULL, { 0x1939BE0252324E1FULL, 0x6F5BB0CBB4810448ULL } }, /* XSUM_XXH128_testdata[7713] */\n    { 2571, 0x000000009E3779B1ULL, { 0x77F5DED20D9008D2ULL, 0x1F3AD12109BCB54FULL } }, /* XSUM_XXH128_testdata[7714] */\n    { 2571, 0x9E3779B185EBCA8DULL, { 0x818A2AEE26B274D7ULL, 0x41EE0D4C197FFF0DULL } }, /* XSUM_XXH128_testdata[7715] */\n    { 2572, 0x0000000000000000ULL, { 0xD43C14CE9E282A46ULL, 0x551A5750BD2124CAULL } }, /* XSUM_XXH128_testdata[7716] */\n    { 2572, 0x000000009E3779B1ULL, { 0x76DB36703397C995ULL, 0x2B78C8D47275E25BULL } }, /* XSUM_XXH128_testdata[7717] */\n    { 2572, 0x9E3779B185EBCA8DULL, { 0x5F373D933A5DB1C8ULL, 0x60AE268F4D73D5D4ULL } }, /* XSUM_XXH128_testdata[7718] */\n    { 2573, 0x0000000000000000ULL, { 0x1B195DF3CD94DF95ULL, 0x496A8B55ADC6489EULL } }, /* XSUM_XXH128_testdata[7719] */\n    { 2573, 0x000000009E3779B1ULL, { 0xE8127E284F2C0AE0ULL, 0x76C30D9CE5C61E62ULL } }, /* XSUM_XXH128_testdata[7720] */\n    { 2573, 0x9E3779B185EBCA8DULL, { 0x3A497628983CE0A2ULL, 0xBC2530F055C539B8ULL } }, /* XSUM_XXH128_testdata[7721] */\n    { 2574, 0x0000000000000000ULL, { 0xBAD61B5DFEE4D9AEULL, 0x1E7D149E64DECB9CULL } }, /* XSUM_XXH128_testdata[7722] */\n    { 2574, 0x000000009E3779B1ULL, { 0x4807605B826C30A1ULL, 0xD2C9D8DF98EFB1A2ULL } }, /* XSUM_XXH128_testdata[7723] */\n    { 2574, 0x9E3779B185EBCA8DULL, { 0x9D2791365ABD4A7DULL, 0x9B18901373ED54FDULL } }, /* XSUM_XXH128_testdata[7724] */\n    { 2575, 0x0000000000000000ULL, { 0xAE9812064E359199ULL, 0x67AEE74A18F85819ULL } }, /* XSUM_XXH128_testdata[7725] */\n    { 2575, 0x000000009E3779B1ULL, { 0x90D548CF7DFC1B5DULL, 0x7CE0A4617F79D248ULL } }, /* XSUM_XXH128_testdata[7726] */\n    { 2575, 0x9E3779B185EBCA8DULL, { 0x097296A247EDF44AULL, 0x3B0890C58905A104ULL } }, /* XSUM_XXH128_testdata[7727] */\n    { 2576, 0x0000000000000000ULL, { 0x6C2FA6480D157458ULL, 0x1DEBB266D5A16DE1ULL } }, /* XSUM_XXH128_testdata[7728] */\n    { 2576, 0x000000009E3779B1ULL, { 0xA166930C9CC1218BULL, 0xDCC92E667FD58E53ULL } }, /* XSUM_XXH128_testdata[7729] */\n    { 2576, 0x9E3779B185EBCA8DULL, { 0x84CEB7F2EE585DC7ULL, 0xFF30E4043E73DCBEULL } }, /* XSUM_XXH128_testdata[7730] */\n    { 2577, 0x0000000000000000ULL, { 0x120D18D2B6CA2129ULL, 0x19F18E0284525E61ULL } }, /* XSUM_XXH128_testdata[7731] */\n    { 2577, 0x000000009E3779B1ULL, { 0x39519BC12AE74DD9ULL, 0x111B0AA55AF7E19AULL } }, /* XSUM_XXH128_testdata[7732] */\n    { 2577, 0x9E3779B185EBCA8DULL, { 0x5E9C2895D3EE0058ULL, 0x23250317D5978A9FULL } }, /* XSUM_XXH128_testdata[7733] */\n    { 2578, 0x0000000000000000ULL, { 0xB641BFFA78F79264ULL, 0x25713E16FBAFD88EULL } }, /* XSUM_XXH128_testdata[7734] */\n    { 2578, 0x000000009E3779B1ULL, { 0x6F21AFA40C16754CULL, 0x10BE769D27228801ULL } }, /* XSUM_XXH128_testdata[7735] */\n    { 2578, 0x9E3779B185EBCA8DULL, { 0xF1B40D4312F8C015ULL, 0x52CFD56772FB7AF8ULL } }, /* XSUM_XXH128_testdata[7736] */\n    { 2579, 0x0000000000000000ULL, { 0xF795516B1D02A34DULL, 0xCF18C39FDBB8836DULL } }, /* XSUM_XXH128_testdata[7737] */\n    { 2579, 0x000000009E3779B1ULL, { 0x2A9A98914B97E250ULL, 0xDE6AFDDA6EA0309CULL } }, /* XSUM_XXH128_testdata[7738] */\n    { 2579, 0x9E3779B185EBCA8DULL, { 0x1088748B21DC25C5ULL, 0x0A14B83459A6ECAFULL } }, /* XSUM_XXH128_testdata[7739] */\n    { 2580, 0x0000000000000000ULL, { 0xC8FB06691974FF06ULL, 0x1D5FE248452EC7A3ULL } }, /* XSUM_XXH128_testdata[7740] */\n    { 2580, 0x000000009E3779B1ULL, { 0x65E132F7A29C95E6ULL, 0x046D2BE68DA7CE00ULL } }, /* XSUM_XXH128_testdata[7741] */\n    { 2580, 0x9E3779B185EBCA8DULL, { 0x2402D2751DFA59FFULL, 0x57F9A8056D2C531CULL } }, /* XSUM_XXH128_testdata[7742] */\n    { 2581, 0x0000000000000000ULL, { 0x9E3727290CF565DBULL, 0x558906B907976267ULL } }, /* XSUM_XXH128_testdata[7743] */\n    { 2581, 0x000000009E3779B1ULL, { 0x95BE8EB94B8B0FBDULL, 0xAAC7EC3ED724C3ABULL } }, /* XSUM_XXH128_testdata[7744] */\n    { 2581, 0x9E3779B185EBCA8DULL, { 0xC6B39BCDB68D7521ULL, 0x76B8F6D51E9C26C9ULL } }, /* XSUM_XXH128_testdata[7745] */\n    { 2582, 0x0000000000000000ULL, { 0xECB9B7BE0D388A50ULL, 0xB607CAE4D439E381ULL } }, /* XSUM_XXH128_testdata[7746] */\n    { 2582, 0x000000009E3779B1ULL, { 0x255C3690DF2DF1B6ULL, 0x62BF8ACB20816EC7ULL } }, /* XSUM_XXH128_testdata[7747] */\n    { 2582, 0x9E3779B185EBCA8DULL, { 0xB4A2DF2140BF045AULL, 0xAC626D48A818F564ULL } }, /* XSUM_XXH128_testdata[7748] */\n    { 2583, 0x0000000000000000ULL, { 0xADBB641E5C1A2DA7ULL, 0x0AAB3840BFBB7CDEULL } }, /* XSUM_XXH128_testdata[7749] */\n    { 2583, 0x000000009E3779B1ULL, { 0x3A250609C17C4830ULL, 0x2D68866200B3C6D3ULL } }, /* XSUM_XXH128_testdata[7750] */\n    { 2583, 0x9E3779B185EBCA8DULL, { 0x5962AEF99E1D82EDULL, 0xBF9F1520D1F173D4ULL } }, /* XSUM_XXH128_testdata[7751] */\n    { 2584, 0x0000000000000000ULL, { 0x352D8CB9B5A57A57ULL, 0xBC94356E887291A2ULL } }, /* XSUM_XXH128_testdata[7752] */\n    { 2584, 0x000000009E3779B1ULL, { 0x7180462E37B3D33DULL, 0xAB34674046CF1267ULL } }, /* XSUM_XXH128_testdata[7753] */\n    { 2584, 0x9E3779B185EBCA8DULL, { 0x1E8D8C0D1C18DF5EULL, 0xEB19830F3D12E183ULL } }, /* XSUM_XXH128_testdata[7754] */\n    { 2585, 0x0000000000000000ULL, { 0x27BD3C273D8D682CULL, 0xBDC32A159605D51FULL } }, /* XSUM_XXH128_testdata[7755] */\n    { 2585, 0x000000009E3779B1ULL, { 0x420D4F586056EF62ULL, 0xA472C0D9A57171C5ULL } }, /* XSUM_XXH128_testdata[7756] */\n    { 2585, 0x9E3779B185EBCA8DULL, { 0x3819D8CFCB6CCE7AULL, 0xA7BF7B3CFC0C9115ULL } }, /* XSUM_XXH128_testdata[7757] */\n    { 2586, 0x0000000000000000ULL, { 0x713E8F363CB3E1ECULL, 0x914D32EE60FCF23DULL } }, /* XSUM_XXH128_testdata[7758] */\n    { 2586, 0x000000009E3779B1ULL, { 0x9975A2D22B449992ULL, 0x271DF2F757E44C60ULL } }, /* XSUM_XXH128_testdata[7759] */\n    { 2586, 0x9E3779B185EBCA8DULL, { 0x9D7ADB7C07AE3C05ULL, 0x92CF4CB9C799ACA7ULL } }, /* XSUM_XXH128_testdata[7760] */\n    { 2587, 0x0000000000000000ULL, { 0x511F33647D70DE7DULL, 0x7D2C9BA284E455FCULL } }, /* XSUM_XXH128_testdata[7761] */\n    { 2587, 0x000000009E3779B1ULL, { 0x85E2D3DEB6D39DEDULL, 0xC44EC5C1FA471E63ULL } }, /* XSUM_XXH128_testdata[7762] */\n    { 2587, 0x9E3779B185EBCA8DULL, { 0x0B324080469F52BBULL, 0xDAA781BF793C031FULL } }, /* XSUM_XXH128_testdata[7763] */\n    { 2588, 0x0000000000000000ULL, { 0xDD3FEB274F4356C5ULL, 0x9F9EE85A3D241B28ULL } }, /* XSUM_XXH128_testdata[7764] */\n    { 2588, 0x000000009E3779B1ULL, { 0x722C73C359AAB883ULL, 0xD9EB823DA1D58C66ULL } }, /* XSUM_XXH128_testdata[7765] */\n    { 2588, 0x9E3779B185EBCA8DULL, { 0x1005F0A623F5543DULL, 0x58D2F45AFC59A4DBULL } }, /* XSUM_XXH128_testdata[7766] */\n    { 2589, 0x0000000000000000ULL, { 0x6A45D690D397327CULL, 0xC8A1B7BA67D52970ULL } }, /* XSUM_XXH128_testdata[7767] */\n    { 2589, 0x000000009E3779B1ULL, { 0xB6CDCF5772D72967ULL, 0x8A47BBDA1F744599ULL } }, /* XSUM_XXH128_testdata[7768] */\n    { 2589, 0x9E3779B185EBCA8DULL, { 0x5181ACBF3D01F5CBULL, 0xF6A77821530E7367ULL } }, /* XSUM_XXH128_testdata[7769] */\n    { 2590, 0x0000000000000000ULL, { 0x0F311BD0CE8CB7DCULL, 0xCAF3A328BA4AEA76ULL } }, /* XSUM_XXH128_testdata[7770] */\n    { 2590, 0x000000009E3779B1ULL, { 0x49C90414CA6853EBULL, 0x9A42F6B3E7C29D50ULL } }, /* XSUM_XXH128_testdata[7771] */\n    { 2590, 0x9E3779B185EBCA8DULL, { 0x0BAE41BB7EA97721ULL, 0xFF376A672A2DDD0FULL } }, /* XSUM_XXH128_testdata[7772] */\n    { 2591, 0x0000000000000000ULL, { 0x2D7E8992C887B638ULL, 0xF4E0BE32E3498722ULL } }, /* XSUM_XXH128_testdata[7773] */\n    { 2591, 0x000000009E3779B1ULL, { 0xBD4DDDAFCF82BB11ULL, 0xF3C4571A2E0F7C7CULL } }, /* XSUM_XXH128_testdata[7774] */\n    { 2591, 0x9E3779B185EBCA8DULL, { 0xA28BA394DD194668ULL, 0xE3296576627DA17BULL } }, /* XSUM_XXH128_testdata[7775] */\n    { 2592, 0x0000000000000000ULL, { 0xA0985AF7DB1C78DAULL, 0x3F4F9BCCE1A2A279ULL } }, /* XSUM_XXH128_testdata[7776] */\n    { 2592, 0x000000009E3779B1ULL, { 0x18968EDF80450ABFULL, 0x4B0EA18803B1081DULL } }, /* XSUM_XXH128_testdata[7777] */\n    { 2592, 0x9E3779B185EBCA8DULL, { 0xCD03D5EF50B7F641ULL, 0x2E3FD124BC0CD593ULL } }, /* XSUM_XXH128_testdata[7778] */\n    { 2593, 0x0000000000000000ULL, { 0xC18A32BFAC492DA5ULL, 0xE129F921C65AEF75ULL } }, /* XSUM_XXH128_testdata[7779] */\n    { 2593, 0x000000009E3779B1ULL, { 0x90F03903227DC4B5ULL, 0x9748E4203EED8EBEULL } }, /* XSUM_XXH128_testdata[7780] */\n    { 2593, 0x9E3779B185EBCA8DULL, { 0x8ACB50DDDBDC01A5ULL, 0x4EFC407680CF99CBULL } }, /* XSUM_XXH128_testdata[7781] */\n    { 2594, 0x0000000000000000ULL, { 0xF64DA444EB493F68ULL, 0x3866C5E7C13329E6ULL } }, /* XSUM_XXH128_testdata[7782] */\n    { 2594, 0x000000009E3779B1ULL, { 0x4A334577431D8A9EULL, 0xA42570675F504D80ULL } }, /* XSUM_XXH128_testdata[7783] */\n    { 2594, 0x9E3779B185EBCA8DULL, { 0xD4D6DC9610B09ED9ULL, 0xAC679A1B7F038987ULL } }, /* XSUM_XXH128_testdata[7784] */\n    { 2595, 0x0000000000000000ULL, { 0xE52B406153967B5DULL, 0x23BA3495FD112633ULL } }, /* XSUM_XXH128_testdata[7785] */\n    { 2595, 0x000000009E3779B1ULL, { 0x83A14100CA69532EULL, 0x7423042229BBAA15ULL } }, /* XSUM_XXH128_testdata[7786] */\n    { 2595, 0x9E3779B185EBCA8DULL, { 0x32D2229033C5E7E8ULL, 0x906CBEE1C11C549AULL } }, /* XSUM_XXH128_testdata[7787] */\n    { 2596, 0x0000000000000000ULL, { 0xFD06FE5D8AB51DE0ULL, 0x6E17E42006A48260ULL } }, /* XSUM_XXH128_testdata[7788] */\n    { 2596, 0x000000009E3779B1ULL, { 0xF0D012181CA56F64ULL, 0xC7E6FB18740D4161ULL } }, /* XSUM_XXH128_testdata[7789] */\n    { 2596, 0x9E3779B185EBCA8DULL, { 0xA3E51AB7B2578095ULL, 0xBFD10393547A306BULL } }, /* XSUM_XXH128_testdata[7790] */\n    { 2597, 0x0000000000000000ULL, { 0x6AD78967B48D27B0ULL, 0x50571D7D9D9C7EDCULL } }, /* XSUM_XXH128_testdata[7791] */\n    { 2597, 0x000000009E3779B1ULL, { 0x2B44C5BAB8167A31ULL, 0xD33E235E23795A89ULL } }, /* XSUM_XXH128_testdata[7792] */\n    { 2597, 0x9E3779B185EBCA8DULL, { 0xB9EC608D42131699ULL, 0x33CA756B43B41096ULL } }, /* XSUM_XXH128_testdata[7793] */\n    { 2598, 0x0000000000000000ULL, { 0x5CF771A99E79B668ULL, 0x874573EDC80977ECULL } }, /* XSUM_XXH128_testdata[7794] */\n    { 2598, 0x000000009E3779B1ULL, { 0xDAA9422DAA288201ULL, 0xF59E63E7EC574C14ULL } }, /* XSUM_XXH128_testdata[7795] */\n    { 2598, 0x9E3779B185EBCA8DULL, { 0x12D534B6B541F6F2ULL, 0xAA775AEFB68FEB5BULL } }, /* XSUM_XXH128_testdata[7796] */\n    { 2599, 0x0000000000000000ULL, { 0x84CDC90932783EB7ULL, 0xBEF31C7C6DAF838FULL } }, /* XSUM_XXH128_testdata[7797] */\n    { 2599, 0x000000009E3779B1ULL, { 0xA756BBFF4B2F382AULL, 0x9B97CEB549719B72ULL } }, /* XSUM_XXH128_testdata[7798] */\n    { 2599, 0x9E3779B185EBCA8DULL, { 0x6A81DD60A3513541ULL, 0x0011F10A5A1904DBULL } }, /* XSUM_XXH128_testdata[7799] */\n    { 2600, 0x0000000000000000ULL, { 0x793556D83DF49115ULL, 0x5DADF58E251CC0D1ULL } }, /* XSUM_XXH128_testdata[7800] */\n    { 2600, 0x000000009E3779B1ULL, { 0x74E6698BB68E6BFDULL, 0x36738B3B150CD15EULL } }, /* XSUM_XXH128_testdata[7801] */\n    { 2600, 0x9E3779B185EBCA8DULL, { 0x4A7FADFBD097FEF4ULL, 0x1212D6BF106E747AULL } }, /* XSUM_XXH128_testdata[7802] */\n    { 2601, 0x0000000000000000ULL, { 0x4DF044753E280E1BULL, 0x0C00F56BBC776F55ULL } }, /* XSUM_XXH128_testdata[7803] */\n    { 2601, 0x000000009E3779B1ULL, { 0x9DA2568178EA86CEULL, 0xCAFD33B82D3FC3D5ULL } }, /* XSUM_XXH128_testdata[7804] */\n    { 2601, 0x9E3779B185EBCA8DULL, { 0x7983257C51743B94ULL, 0xFBFBE2B1B2B66550ULL } }, /* XSUM_XXH128_testdata[7805] */\n    { 2602, 0x0000000000000000ULL, { 0x51C2F2A5AA9AC6EEULL, 0xE650ED333350D62DULL } }, /* XSUM_XXH128_testdata[7806] */\n    { 2602, 0x000000009E3779B1ULL, { 0x99FD9059AB1102FCULL, 0x9517003D65DCE282ULL } }, /* XSUM_XXH128_testdata[7807] */\n    { 2602, 0x9E3779B185EBCA8DULL, { 0xE34EFE3511F7B5DFULL, 0xB90FF853E5FDE63CULL } }, /* XSUM_XXH128_testdata[7808] */\n    { 2603, 0x0000000000000000ULL, { 0x577F4E5B8F4E89DDULL, 0xD3A047275C468F75ULL } }, /* XSUM_XXH128_testdata[7809] */\n    { 2603, 0x000000009E3779B1ULL, { 0xC1FBBF41CBCE8835ULL, 0x31A229956EC352BDULL } }, /* XSUM_XXH128_testdata[7810] */\n    { 2603, 0x9E3779B185EBCA8DULL, { 0xFD32BEF84E7F1106ULL, 0x5F86E108BA916D74ULL } }, /* XSUM_XXH128_testdata[7811] */\n    { 2604, 0x0000000000000000ULL, { 0x8902BC5E2A41B147ULL, 0x5404C99234AA8EA1ULL } }, /* XSUM_XXH128_testdata[7812] */\n    { 2604, 0x000000009E3779B1ULL, { 0x56BFC60D7EDE75CBULL, 0x4E29F562146B7259ULL } }, /* XSUM_XXH128_testdata[7813] */\n    { 2604, 0x9E3779B185EBCA8DULL, { 0x706BFD376CC52DFFULL, 0x6517FA81C9388CB0ULL } }, /* XSUM_XXH128_testdata[7814] */\n    { 2605, 0x0000000000000000ULL, { 0x5FAE4460F3C39846ULL, 0xADE11EA8BA4B3AD9ULL } }, /* XSUM_XXH128_testdata[7815] */\n    { 2605, 0x000000009E3779B1ULL, { 0x450283361A7F8C95ULL, 0x80A7F9E44B3D58C8ULL } }, /* XSUM_XXH128_testdata[7816] */\n    { 2605, 0x9E3779B185EBCA8DULL, { 0x9DED80F95A23BD06ULL, 0x797E1E1581A5E7B0ULL } }, /* XSUM_XXH128_testdata[7817] */\n    { 2606, 0x0000000000000000ULL, { 0xF8E61A854B43505DULL, 0xD127150891862D88ULL } }, /* XSUM_XXH128_testdata[7818] */\n    { 2606, 0x000000009E3779B1ULL, { 0x492C736A436CAB5CULL, 0xA2100A455D8BFB12ULL } }, /* XSUM_XXH128_testdata[7819] */\n    { 2606, 0x9E3779B185EBCA8DULL, { 0x469072E7463A91F5ULL, 0x1F108B994CD5A742ULL } }, /* XSUM_XXH128_testdata[7820] */\n    { 2607, 0x0000000000000000ULL, { 0xBF55E4C17172119FULL, 0x56A9E5B0FDE68CE1ULL } }, /* XSUM_XXH128_testdata[7821] */\n    { 2607, 0x000000009E3779B1ULL, { 0x65362AE1FBA2EE66ULL, 0x48585772EE0E5E09ULL } }, /* XSUM_XXH128_testdata[7822] */\n    { 2607, 0x9E3779B185EBCA8DULL, { 0x83B3CF9D92F676FAULL, 0x6505178476A8F51FULL } }, /* XSUM_XXH128_testdata[7823] */\n    { 2608, 0x0000000000000000ULL, { 0x9557766EF78170A7ULL, 0x611717E4DDE9123BULL } }, /* XSUM_XXH128_testdata[7824] */\n    { 2608, 0x000000009E3779B1ULL, { 0x0AC721609C3D59E8ULL, 0x98A8F249A3AAF8C2ULL } }, /* XSUM_XXH128_testdata[7825] */\n    { 2608, 0x9E3779B185EBCA8DULL, { 0x3DC22CB0B2E4E775ULL, 0xCD027C56CD221E54ULL } }, /* XSUM_XXH128_testdata[7826] */\n    { 2609, 0x0000000000000000ULL, { 0xCF262555C32C1E2CULL, 0xC0016489EC43CBA8ULL } }, /* XSUM_XXH128_testdata[7827] */\n    { 2609, 0x000000009E3779B1ULL, { 0x3968E5BA89BF7F89ULL, 0x0ADC1557C1B75283ULL } }, /* XSUM_XXH128_testdata[7828] */\n    { 2609, 0x9E3779B185EBCA8DULL, { 0x47ACA6B43896AD9CULL, 0xA1A08D4C1146A8DFULL } }, /* XSUM_XXH128_testdata[7829] */\n    { 2610, 0x0000000000000000ULL, { 0xA6A5D0D502CD8978ULL, 0x28A75ECCCF6275EAULL } }, /* XSUM_XXH128_testdata[7830] */\n    { 2610, 0x000000009E3779B1ULL, { 0x44570A8E72ED1EA2ULL, 0x07C346D0D7A23D8AULL } }, /* XSUM_XXH128_testdata[7831] */\n    { 2610, 0x9E3779B185EBCA8DULL, { 0xF01F3210CCF55F10ULL, 0x2EED900776EC84FEULL } }, /* XSUM_XXH128_testdata[7832] */\n    { 2611, 0x0000000000000000ULL, { 0x2C4DBEE8D8330A21ULL, 0xAFBA78CD33A837B8ULL } }, /* XSUM_XXH128_testdata[7833] */\n    { 2611, 0x000000009E3779B1ULL, { 0x3C614F8630DDC329ULL, 0x046EADFD08EBC612ULL } }, /* XSUM_XXH128_testdata[7834] */\n    { 2611, 0x9E3779B185EBCA8DULL, { 0x7C1FA94B50C9F82DULL, 0xEBE506B7A9D8A46BULL } }, /* XSUM_XXH128_testdata[7835] */\n    { 2612, 0x0000000000000000ULL, { 0x79DC7D9B0FCED621ULL, 0x60976FF009DCC7F7ULL } }, /* XSUM_XXH128_testdata[7836] */\n    { 2612, 0x000000009E3779B1ULL, { 0xF260B6EF1F870DBBULL, 0x0E621BB4CB2D05F2ULL } }, /* XSUM_XXH128_testdata[7837] */\n    { 2612, 0x9E3779B185EBCA8DULL, { 0x9F530ECF38A6A595ULL, 0xFAD61D75BC259EE8ULL } }, /* XSUM_XXH128_testdata[7838] */\n    { 2613, 0x0000000000000000ULL, { 0xB0D601D09C8E2486ULL, 0x34389E4421222A74ULL } }, /* XSUM_XXH128_testdata[7839] */\n    { 2613, 0x000000009E3779B1ULL, { 0x63BFF52CC24E9AC5ULL, 0xD80E97903D4EC48EULL } }, /* XSUM_XXH128_testdata[7840] */\n    { 2613, 0x9E3779B185EBCA8DULL, { 0x168988B52DF66509ULL, 0xC99DBB34C4B172EBULL } }, /* XSUM_XXH128_testdata[7841] */\n    { 2614, 0x0000000000000000ULL, { 0x296703ED6B4E2196ULL, 0x1F23E598EC55881EULL } }, /* XSUM_XXH128_testdata[7842] */\n    { 2614, 0x000000009E3779B1ULL, { 0x4667D8A9A4D8BBEAULL, 0x183206E69CB9F329ULL } }, /* XSUM_XXH128_testdata[7843] */\n    { 2614, 0x9E3779B185EBCA8DULL, { 0x077FA33DF4E8106BULL, 0x814C8C598013E930ULL } }, /* XSUM_XXH128_testdata[7844] */\n    { 2615, 0x0000000000000000ULL, { 0x3C129D5A06CD7375ULL, 0xA9FA6C8D7D4E3575ULL } }, /* XSUM_XXH128_testdata[7845] */\n    { 2615, 0x000000009E3779B1ULL, { 0x359A4624A8080B60ULL, 0xDD5F2AA46CABE5E8ULL } }, /* XSUM_XXH128_testdata[7846] */\n    { 2615, 0x9E3779B185EBCA8DULL, { 0x7FF5CFE58BD3D80FULL, 0x0347A66D5880A20EULL } }, /* XSUM_XXH128_testdata[7847] */\n    { 2616, 0x0000000000000000ULL, { 0xB7B4AC0A5B5946E3ULL, 0x32929A684BA158ACULL } }, /* XSUM_XXH128_testdata[7848] */\n    { 2616, 0x000000009E3779B1ULL, { 0x3F39A96E1A88A718ULL, 0x13BDFA7F9482673DULL } }, /* XSUM_XXH128_testdata[7849] */\n    { 2616, 0x9E3779B185EBCA8DULL, { 0xD34936D799A3ACF2ULL, 0x04D5BA1A8F05545BULL } }, /* XSUM_XXH128_testdata[7850] */\n    { 2617, 0x0000000000000000ULL, { 0xC692D17EAF1C1954ULL, 0x919618D01DA8D502ULL } }, /* XSUM_XXH128_testdata[7851] */\n    { 2617, 0x000000009E3779B1ULL, { 0x3D4E79176877F5A8ULL, 0xA277B58E6C46A6F9ULL } }, /* XSUM_XXH128_testdata[7852] */\n    { 2617, 0x9E3779B185EBCA8DULL, { 0x17BE5362B26B02BEULL, 0x51D0DD9536B9DC2DULL } }, /* XSUM_XXH128_testdata[7853] */\n    { 2618, 0x0000000000000000ULL, { 0x271B46700F1A8C6BULL, 0x5376D95674B9467AULL } }, /* XSUM_XXH128_testdata[7854] */\n    { 2618, 0x000000009E3779B1ULL, { 0xC6F99D9E4F683C0BULL, 0x95428CF4AF56F900ULL } }, /* XSUM_XXH128_testdata[7855] */\n    { 2618, 0x9E3779B185EBCA8DULL, { 0x6EE5315756FC49CEULL, 0x6DD2E16C42D1C331ULL } }, /* XSUM_XXH128_testdata[7856] */\n    { 2619, 0x0000000000000000ULL, { 0xA9C0AE3CC22EC8CEULL, 0x831EBA3A8F2C176FULL } }, /* XSUM_XXH128_testdata[7857] */\n    { 2619, 0x000000009E3779B1ULL, { 0xDB16FE8FCB1CC11AULL, 0xBD3C6B3BD727B1A7ULL } }, /* XSUM_XXH128_testdata[7858] */\n    { 2619, 0x9E3779B185EBCA8DULL, { 0x76E30F2B751FDC75ULL, 0x82375CB2E1FFB7E4ULL } }, /* XSUM_XXH128_testdata[7859] */\n    { 2620, 0x0000000000000000ULL, { 0x9E54D2B87B91BE4FULL, 0x9746DAD232D719BFULL } }, /* XSUM_XXH128_testdata[7860] */\n    { 2620, 0x000000009E3779B1ULL, { 0x571CEC29CDFA3DC3ULL, 0xDF2F3FA17B8C6065ULL } }, /* XSUM_XXH128_testdata[7861] */\n    { 2620, 0x9E3779B185EBCA8DULL, { 0x847D5F2BEC873CD6ULL, 0x5018E36E4E53E0BCULL } }, /* XSUM_XXH128_testdata[7862] */\n    { 2621, 0x0000000000000000ULL, { 0x04DE572AD2A5375BULL, 0xC95F5A54E614AD4AULL } }, /* XSUM_XXH128_testdata[7863] */\n    { 2621, 0x000000009E3779B1ULL, { 0x860A593D6ADF9C1EULL, 0x32E967C56DF1EB9BULL } }, /* XSUM_XXH128_testdata[7864] */\n    { 2621, 0x9E3779B185EBCA8DULL, { 0x0686E8B46801DBCCULL, 0x5482116E0EF00F91ULL } }, /* XSUM_XXH128_testdata[7865] */\n    { 2622, 0x0000000000000000ULL, { 0xADC6AE2C7840086EULL, 0xE52F7695D2536EDDULL } }, /* XSUM_XXH128_testdata[7866] */\n    { 2622, 0x000000009E3779B1ULL, { 0xEC785891BBCB4518ULL, 0x8DE26CA8F5EB30FAULL } }, /* XSUM_XXH128_testdata[7867] */\n    { 2622, 0x9E3779B185EBCA8DULL, { 0x9ABEE55D46148633ULL, 0x426A6BC6AC326663ULL } }, /* XSUM_XXH128_testdata[7868] */\n    { 2623, 0x0000000000000000ULL, { 0x8E5BAC3A499DAED2ULL, 0x96C79BF8E56E1C98ULL } }, /* XSUM_XXH128_testdata[7869] */\n    { 2623, 0x000000009E3779B1ULL, { 0xC22325D1FACC4096ULL, 0xA337E0A187C062DCULL } }, /* XSUM_XXH128_testdata[7870] */\n    { 2623, 0x9E3779B185EBCA8DULL, { 0xC4EE815218C26490ULL, 0xC400292076B4542EULL } }, /* XSUM_XXH128_testdata[7871] */\n    { 2624, 0x0000000000000000ULL, { 0x79937D40FBEAE0EEULL, 0xAD1D9EEB07326B52ULL } }, /* XSUM_XXH128_testdata[7872] */\n    { 2624, 0x000000009E3779B1ULL, { 0x57CFD1E9695D6DEEULL, 0xEEB994AAC9B0B3C0ULL } }, /* XSUM_XXH128_testdata[7873] */\n    { 2624, 0x9E3779B185EBCA8DULL, { 0xA2311717DEBB82A4ULL, 0x368AA2AF21B68E78ULL } }, /* XSUM_XXH128_testdata[7874] */\n    { 2625, 0x0000000000000000ULL, { 0xDD4481334E9FB9C2ULL, 0x0149C161B62B3116ULL } }, /* XSUM_XXH128_testdata[7875] */\n    { 2625, 0x000000009E3779B1ULL, { 0x810A80AD2C5BE420ULL, 0x9C4DEB734DED999DULL } }, /* XSUM_XXH128_testdata[7876] */\n    { 2625, 0x9E3779B185EBCA8DULL, { 0xA19D3278B3193132ULL, 0x39E451D3C433B1C9ULL } }, /* XSUM_XXH128_testdata[7877] */\n    { 2626, 0x0000000000000000ULL, { 0x0241BB191BEEAA15ULL, 0xB4A0063D73DB314BULL } }, /* XSUM_XXH128_testdata[7878] */\n    { 2626, 0x000000009E3779B1ULL, { 0x4D18C68F8D1856A1ULL, 0x7473805EF4E67661ULL } }, /* XSUM_XXH128_testdata[7879] */\n    { 2626, 0x9E3779B185EBCA8DULL, { 0xC074D83A8C31BDBCULL, 0x08CE43D99992FF2FULL } }, /* XSUM_XXH128_testdata[7880] */\n    { 2627, 0x0000000000000000ULL, { 0x1EB83BA0E95C1655ULL, 0xA1B6E6B715466BF9ULL } }, /* XSUM_XXH128_testdata[7881] */\n    { 2627, 0x000000009E3779B1ULL, { 0x7F55C60424DF3C84ULL, 0xF1C7FB0A5B77E030ULL } }, /* XSUM_XXH128_testdata[7882] */\n    { 2627, 0x9E3779B185EBCA8DULL, { 0xC477C01EE6C3A537ULL, 0x933AC580FFFBC3F7ULL } }, /* XSUM_XXH128_testdata[7883] */\n    { 2628, 0x0000000000000000ULL, { 0x0C4DD67BB0F562C8ULL, 0x1AA4C09432AD9913ULL } }, /* XSUM_XXH128_testdata[7884] */\n    { 2628, 0x000000009E3779B1ULL, { 0x11A1CD70E72E4C55ULL, 0x5A77B8411279B682ULL } }, /* XSUM_XXH128_testdata[7885] */\n    { 2628, 0x9E3779B185EBCA8DULL, { 0x79EA32FD8F436AA2ULL, 0x6B0FC009C374CDD9ULL } }, /* XSUM_XXH128_testdata[7886] */\n    { 2629, 0x0000000000000000ULL, { 0x737EBAEA0ADEFF70ULL, 0x76EF8F2A45ED0BA5ULL } }, /* XSUM_XXH128_testdata[7887] */\n    { 2629, 0x000000009E3779B1ULL, { 0xEA9233D9EB71C315ULL, 0x73F832B64BC92659ULL } }, /* XSUM_XXH128_testdata[7888] */\n    { 2629, 0x9E3779B185EBCA8DULL, { 0xBC70DCF943FBCBD4ULL, 0x435EE03311C48B22ULL } }, /* XSUM_XXH128_testdata[7889] */\n    { 2630, 0x0000000000000000ULL, { 0x246BA432B5769B9EULL, 0xE7AB2344A7C5AFA3ULL } }, /* XSUM_XXH128_testdata[7890] */\n    { 2630, 0x000000009E3779B1ULL, { 0x45858F6C1DBB30E3ULL, 0xE01396E5411B8728ULL } }, /* XSUM_XXH128_testdata[7891] */\n    { 2630, 0x9E3779B185EBCA8DULL, { 0x9B3DF72E9DF51AA8ULL, 0xF7F85BCB2B6B612DULL } }, /* XSUM_XXH128_testdata[7892] */\n    { 2631, 0x0000000000000000ULL, { 0x2C424F0EC27B9333ULL, 0x5F85F4C143FEB636ULL } }, /* XSUM_XXH128_testdata[7893] */\n    { 2631, 0x000000009E3779B1ULL, { 0x4C7562DF7BE0A87FULL, 0x8533EE03C7AA7199ULL } }, /* XSUM_XXH128_testdata[7894] */\n    { 2631, 0x9E3779B185EBCA8DULL, { 0x24417D77C0E33AC6ULL, 0x548AE0604D9A269CULL } }, /* XSUM_XXH128_testdata[7895] */\n    { 2632, 0x0000000000000000ULL, { 0x1AD8B96CF5A303DAULL, 0x28C107FB88488C02ULL } }, /* XSUM_XXH128_testdata[7896] */\n    { 2632, 0x000000009E3779B1ULL, { 0x438D8CE72B0310CEULL, 0xB00EF6BD6CF23DFFULL } }, /* XSUM_XXH128_testdata[7897] */\n    { 2632, 0x9E3779B185EBCA8DULL, { 0x5AAA8E098E454774ULL, 0xD585EEFDE642A72AULL } }, /* XSUM_XXH128_testdata[7898] */\n    { 2633, 0x0000000000000000ULL, { 0xD2C83ED9155634FEULL, 0x238EDD4DC389C7CCULL } }, /* XSUM_XXH128_testdata[7899] */\n    { 2633, 0x000000009E3779B1ULL, { 0x15C30A48AA043024ULL, 0xAABB8CA8F4E31C51ULL } }, /* XSUM_XXH128_testdata[7900] */\n    { 2633, 0x9E3779B185EBCA8DULL, { 0x5C85BFCCF0926393ULL, 0x6FFAF48B4C8A02E1ULL } }, /* XSUM_XXH128_testdata[7901] */\n    { 2634, 0x0000000000000000ULL, { 0xB26D421672653094ULL, 0xE6AB2BB13694F48BULL } }, /* XSUM_XXH128_testdata[7902] */\n    { 2634, 0x000000009E3779B1ULL, { 0xD396007CD02B73F7ULL, 0xE65D974B19927A99ULL } }, /* XSUM_XXH128_testdata[7903] */\n    { 2634, 0x9E3779B185EBCA8DULL, { 0xC39EB9D4E889AC53ULL, 0x35EE53B741DC4103ULL } }, /* XSUM_XXH128_testdata[7904] */\n    { 2635, 0x0000000000000000ULL, { 0xAE65782138999678ULL, 0x8BEA66637F25C6EBULL } }, /* XSUM_XXH128_testdata[7905] */\n    { 2635, 0x000000009E3779B1ULL, { 0x1119EAFB6FD54EF2ULL, 0xE70768A39FCE58E6ULL } }, /* XSUM_XXH128_testdata[7906] */\n    { 2635, 0x9E3779B185EBCA8DULL, { 0xD6DE637F2CF60651ULL, 0x731200DFA735EE80ULL } }, /* XSUM_XXH128_testdata[7907] */\n    { 2636, 0x0000000000000000ULL, { 0x8293E92420859F92ULL, 0x30474FE99759A538ULL } }, /* XSUM_XXH128_testdata[7908] */\n    { 2636, 0x000000009E3779B1ULL, { 0x5026DE539216110BULL, 0xE245A95C1FFAEF71ULL } }, /* XSUM_XXH128_testdata[7909] */\n    { 2636, 0x9E3779B185EBCA8DULL, { 0xAA98B201C1EB0FB2ULL, 0x517ECED263785700ULL } }, /* XSUM_XXH128_testdata[7910] */\n    { 2637, 0x0000000000000000ULL, { 0x463D5BB372D71DF8ULL, 0x45A581BB1939AB31ULL } }, /* XSUM_XXH128_testdata[7911] */\n    { 2637, 0x000000009E3779B1ULL, { 0x8103315F0F389593ULL, 0x076E63EEB457A39EULL } }, /* XSUM_XXH128_testdata[7912] */\n    { 2637, 0x9E3779B185EBCA8DULL, { 0x17A02B21B39C4518ULL, 0xE2275FDC6269FCE1ULL } }, /* XSUM_XXH128_testdata[7913] */\n    { 2638, 0x0000000000000000ULL, { 0x2FABFE4DF1017EF5ULL, 0x00ACD6A14F8FF4DFULL } }, /* XSUM_XXH128_testdata[7914] */\n    { 2638, 0x000000009E3779B1ULL, { 0x6F290FC646CA8E9AULL, 0xC656DDF1354BD304ULL } }, /* XSUM_XXH128_testdata[7915] */\n    { 2638, 0x9E3779B185EBCA8DULL, { 0x676D60830BF6C2A4ULL, 0x0B241A22E62BBB84ULL } }, /* XSUM_XXH128_testdata[7916] */\n    { 2639, 0x0000000000000000ULL, { 0x052B70E8495A8C5FULL, 0x5725CABE0753A848ULL } }, /* XSUM_XXH128_testdata[7917] */\n    { 2639, 0x000000009E3779B1ULL, { 0xD6240AA67DCF1D57ULL, 0x82365409153590D6ULL } }, /* XSUM_XXH128_testdata[7918] */\n    { 2639, 0x9E3779B185EBCA8DULL, { 0xFDBDCE1EDA106F45ULL, 0xA9A30ACB711668E6ULL } }, /* XSUM_XXH128_testdata[7919] */\n    { 2640, 0x0000000000000000ULL, { 0x13B98550B2E1133AULL, 0xF3139142914075E5ULL } }, /* XSUM_XXH128_testdata[7920] */\n    { 2640, 0x000000009E3779B1ULL, { 0xCFD3D18A991F5DBCULL, 0x576F382957FDEEDBULL } }, /* XSUM_XXH128_testdata[7921] */\n    { 2640, 0x9E3779B185EBCA8DULL, { 0xA7C90E41655651CBULL, 0xED4913F56EB79A75ULL } }, /* XSUM_XXH128_testdata[7922] */\n    { 2641, 0x0000000000000000ULL, { 0x993917249E53DD10ULL, 0xB0F5ADC3D99A133CULL } }, /* XSUM_XXH128_testdata[7923] */\n    { 2641, 0x000000009E3779B1ULL, { 0xD44E6525F1840726ULL, 0x48140BF82D739DA5ULL } }, /* XSUM_XXH128_testdata[7924] */\n    { 2641, 0x9E3779B185EBCA8DULL, { 0xA25D31BBF1522234ULL, 0x0F0861346BF4F7E8ULL } }, /* XSUM_XXH128_testdata[7925] */\n    { 2642, 0x0000000000000000ULL, { 0x79DFAF4CDE4E7990ULL, 0x75E764412534FC8AULL } }, /* XSUM_XXH128_testdata[7926] */\n    { 2642, 0x000000009E3779B1ULL, { 0x29DAD003C308A2BDULL, 0x5CFA1C4270508DE2ULL } }, /* XSUM_XXH128_testdata[7927] */\n    { 2642, 0x9E3779B185EBCA8DULL, { 0xC08961744B1C05A1ULL, 0xFFA2C64F799A0B83ULL } }, /* XSUM_XXH128_testdata[7928] */\n    { 2643, 0x0000000000000000ULL, { 0x02F6E5D0B5E36602ULL, 0xDD072756C8E72F00ULL } }, /* XSUM_XXH128_testdata[7929] */\n    { 2643, 0x000000009E3779B1ULL, { 0x57560FCEF57391F1ULL, 0xFF7E33D6D84727AAULL } }, /* XSUM_XXH128_testdata[7930] */\n    { 2643, 0x9E3779B185EBCA8DULL, { 0x5DD5F86B860B983DULL, 0xBB52375A2C707FCDULL } }, /* XSUM_XXH128_testdata[7931] */\n    { 2644, 0x0000000000000000ULL, { 0x59D7C04DCD7A9C31ULL, 0x3673EEBFF0977A28ULL } }, /* XSUM_XXH128_testdata[7932] */\n    { 2644, 0x000000009E3779B1ULL, { 0x7226852EE94C2BA2ULL, 0xE0A655E662B1253AULL } }, /* XSUM_XXH128_testdata[7933] */\n    { 2644, 0x9E3779B185EBCA8DULL, { 0x09727950E5C8FB44ULL, 0xDE4115314C6DAA2AULL } }, /* XSUM_XXH128_testdata[7934] */\n    { 2645, 0x0000000000000000ULL, { 0xA73A74733557657FULL, 0x5DBA58620BA2ABC5ULL } }, /* XSUM_XXH128_testdata[7935] */\n    { 2645, 0x000000009E3779B1ULL, { 0x2D6560589379FCCAULL, 0x24891201BA523948ULL } }, /* XSUM_XXH128_testdata[7936] */\n    { 2645, 0x9E3779B185EBCA8DULL, { 0xC4BD5D9640F75625ULL, 0xC18CC674B942083CULL } }, /* XSUM_XXH128_testdata[7937] */\n    { 2646, 0x0000000000000000ULL, { 0x68772A55C9E56246ULL, 0x48C8318D9166F8E7ULL } }, /* XSUM_XXH128_testdata[7938] */\n    { 2646, 0x000000009E3779B1ULL, { 0x5076CB6C8C108876ULL, 0x2250184E9D859265ULL } }, /* XSUM_XXH128_testdata[7939] */\n    { 2646, 0x9E3779B185EBCA8DULL, { 0x1C50DD529DB79DC6ULL, 0xF3986AF89A7F7B46ULL } }, /* XSUM_XXH128_testdata[7940] */\n    { 2647, 0x0000000000000000ULL, { 0x388AC2C4452446F5ULL, 0xE4756E014611BC4AULL } }, /* XSUM_XXH128_testdata[7941] */\n    { 2647, 0x000000009E3779B1ULL, { 0x106E4CA2E3E7723BULL, 0x28316891249E6A9BULL } }, /* XSUM_XXH128_testdata[7942] */\n    { 2647, 0x9E3779B185EBCA8DULL, { 0xDFA71D727175FE54ULL, 0x060174389CD28713ULL } }, /* XSUM_XXH128_testdata[7943] */\n    { 2648, 0x0000000000000000ULL, { 0x17C777FE609883D9ULL, 0x740778D1F93165ADULL } }, /* XSUM_XXH128_testdata[7944] */\n    { 2648, 0x000000009E3779B1ULL, { 0x63FE25A5979EC89EULL, 0xF0184ED5356E5EE5ULL } }, /* XSUM_XXH128_testdata[7945] */\n    { 2648, 0x9E3779B185EBCA8DULL, { 0x086F565F371F7BF5ULL, 0xC6FC4EE043B3A7F7ULL } }, /* XSUM_XXH128_testdata[7946] */\n    { 2649, 0x0000000000000000ULL, { 0x29D915B6CDAF1576ULL, 0xD28F183F90AAE11AULL } }, /* XSUM_XXH128_testdata[7947] */\n    { 2649, 0x000000009E3779B1ULL, { 0xA21ED745F0D1E4C7ULL, 0x542F4BDCB102C9B5ULL } }, /* XSUM_XXH128_testdata[7948] */\n    { 2649, 0x9E3779B185EBCA8DULL, { 0x725766FA1F433305ULL, 0x31FA67E10DC6E275ULL } }, /* XSUM_XXH128_testdata[7949] */\n    { 2650, 0x0000000000000000ULL, { 0x4428A0F2F241E77CULL, 0x73FE59B5BA266D95ULL } }, /* XSUM_XXH128_testdata[7950] */\n    { 2650, 0x000000009E3779B1ULL, { 0x1F64D6F3E566C7EEULL, 0x3F435E85E9242C92ULL } }, /* XSUM_XXH128_testdata[7951] */\n    { 2650, 0x9E3779B185EBCA8DULL, { 0xD8837F9E84379EADULL, 0x3E610E7EB4D4A930ULL } }, /* XSUM_XXH128_testdata[7952] */\n    { 2651, 0x0000000000000000ULL, { 0x50226B7D26F9FFEFULL, 0x4F3BF3F47D7BDB7DULL } }, /* XSUM_XXH128_testdata[7953] */\n    { 2651, 0x000000009E3779B1ULL, { 0x5376AA061E3FB933ULL, 0x792AC7CBA9CA7867ULL } }, /* XSUM_XXH128_testdata[7954] */\n    { 2651, 0x9E3779B185EBCA8DULL, { 0xCDDFA7F0AAB17C21ULL, 0x55F73D20EF9B3575ULL } }, /* XSUM_XXH128_testdata[7955] */\n    { 2652, 0x0000000000000000ULL, { 0xAFDD18658C66F457ULL, 0x28886023C37C06A7ULL } }, /* XSUM_XXH128_testdata[7956] */\n    { 2652, 0x000000009E3779B1ULL, { 0x302A50421C0421BAULL, 0x3D31DD2BA20A37A0ULL } }, /* XSUM_XXH128_testdata[7957] */\n    { 2652, 0x9E3779B185EBCA8DULL, { 0x0CA3F1A77FEB0AD0ULL, 0x454C23744E264174ULL } }, /* XSUM_XXH128_testdata[7958] */\n    { 2653, 0x0000000000000000ULL, { 0x90D6CB1D97A2C85AULL, 0x82CC4E8FA3CA6850ULL } }, /* XSUM_XXH128_testdata[7959] */\n    { 2653, 0x000000009E3779B1ULL, { 0x7C898430C851F1BEULL, 0x9A5D2BCC67517ADEULL } }, /* XSUM_XXH128_testdata[7960] */\n    { 2653, 0x9E3779B185EBCA8DULL, { 0xE68075A9292A3EBEULL, 0xCD69A4DD5E4DBCE7ULL } }, /* XSUM_XXH128_testdata[7961] */\n    { 2654, 0x0000000000000000ULL, { 0x4E1FA4CEC6584CB9ULL, 0x0B891E19938F26CEULL } }, /* XSUM_XXH128_testdata[7962] */\n    { 2654, 0x000000009E3779B1ULL, { 0xA8A27111AF3B1AFFULL, 0x42181B0AC31D492EULL } }, /* XSUM_XXH128_testdata[7963] */\n    { 2654, 0x9E3779B185EBCA8DULL, { 0x71A47E1A45F59D80ULL, 0x6734BD84F2A7A0A8ULL } }, /* XSUM_XXH128_testdata[7964] */\n    { 2655, 0x0000000000000000ULL, { 0x59AC02AC895A5379ULL, 0xE2DAAAC648743FC7ULL } }, /* XSUM_XXH128_testdata[7965] */\n    { 2655, 0x000000009E3779B1ULL, { 0xF5E40C3407A993A0ULL, 0xD436901D85DAE14BULL } }, /* XSUM_XXH128_testdata[7966] */\n    { 2655, 0x9E3779B185EBCA8DULL, { 0xD83081AA95B4AA8EULL, 0xBE3F1CA26B267E4BULL } }, /* XSUM_XXH128_testdata[7967] */\n    { 2656, 0x0000000000000000ULL, { 0x13981EC22DD78499ULL, 0xA6C3A2DA835B768DULL } }, /* XSUM_XXH128_testdata[7968] */\n    { 2656, 0x000000009E3779B1ULL, { 0x81BC1AE7BC95861AULL, 0xE34361D7EC01A797ULL } }, /* XSUM_XXH128_testdata[7969] */\n    { 2656, 0x9E3779B185EBCA8DULL, { 0x76F0AD69CDFD0254ULL, 0xB0E3E0A12B575B50ULL } }, /* XSUM_XXH128_testdata[7970] */\n    { 2657, 0x0000000000000000ULL, { 0xAACD492864D6B9E4ULL, 0xA2A9DCED4E372C0DULL } }, /* XSUM_XXH128_testdata[7971] */\n    { 2657, 0x000000009E3779B1ULL, { 0xCB1AC67E9FA0132AULL, 0xC0CB386EAA49BC7BULL } }, /* XSUM_XXH128_testdata[7972] */\n    { 2657, 0x9E3779B185EBCA8DULL, { 0x6F8384F087AF019DULL, 0x17C005EED1F919E4ULL } }, /* XSUM_XXH128_testdata[7973] */\n    { 2658, 0x0000000000000000ULL, { 0xDE0C44779FFEE002ULL, 0x9934121280BC1ADEULL } }, /* XSUM_XXH128_testdata[7974] */\n    { 2658, 0x000000009E3779B1ULL, { 0x53B6CECCF88066CAULL, 0xD932A8B78A8DB188ULL } }, /* XSUM_XXH128_testdata[7975] */\n    { 2658, 0x9E3779B185EBCA8DULL, { 0x6338E397A813A3F9ULL, 0x376A1EA587F5E423ULL } }, /* XSUM_XXH128_testdata[7976] */\n    { 2659, 0x0000000000000000ULL, { 0x89B7998E416EC5CDULL, 0x9F5C3CE0FC384F4FULL } }, /* XSUM_XXH128_testdata[7977] */\n    { 2659, 0x000000009E3779B1ULL, { 0xF36716B9FAE7DEDAULL, 0x716450100F7CC036ULL } }, /* XSUM_XXH128_testdata[7978] */\n    { 2659, 0x9E3779B185EBCA8DULL, { 0x1910B8DCBBDA7530ULL, 0x12DA2DF527CE32E0ULL } }, /* XSUM_XXH128_testdata[7979] */\n    { 2660, 0x0000000000000000ULL, { 0x9FA812A12388E7A3ULL, 0x57F2D17056B01846ULL } }, /* XSUM_XXH128_testdata[7980] */\n    { 2660, 0x000000009E3779B1ULL, { 0x53AC172458789B4AULL, 0x0C8F5362213DF11CULL } }, /* XSUM_XXH128_testdata[7981] */\n    { 2660, 0x9E3779B185EBCA8DULL, { 0xAEE3667EB03F3485ULL, 0xD9CEC9C74AA6DD7CULL } }, /* XSUM_XXH128_testdata[7982] */\n    { 2661, 0x0000000000000000ULL, { 0xC016F36D3412818FULL, 0xE48EDF1CC308D3ADULL } }, /* XSUM_XXH128_testdata[7983] */\n    { 2661, 0x000000009E3779B1ULL, { 0xC9335FAD9AF77500ULL, 0xDEAE0B8DDAE12C82ULL } }, /* XSUM_XXH128_testdata[7984] */\n    { 2661, 0x9E3779B185EBCA8DULL, { 0x25B163D739A0D36AULL, 0xEA4B8A78D326ABC9ULL } }, /* XSUM_XXH128_testdata[7985] */\n    { 2662, 0x0000000000000000ULL, { 0x8D1F596F263D9397ULL, 0x53B5996C5E42263CULL } }, /* XSUM_XXH128_testdata[7986] */\n    { 2662, 0x000000009E3779B1ULL, { 0xF6C554A1D5BDCFBFULL, 0xDD8244F72220152EULL } }, /* XSUM_XXH128_testdata[7987] */\n    { 2662, 0x9E3779B185EBCA8DULL, { 0x6A8BB4C01177798DULL, 0x36B8382475F7745BULL } }, /* XSUM_XXH128_testdata[7988] */\n    { 2663, 0x0000000000000000ULL, { 0x42D9F50DCE51E48FULL, 0xBC01F13792A3616AULL } }, /* XSUM_XXH128_testdata[7989] */\n    { 2663, 0x000000009E3779B1ULL, { 0x3F2F21E0DE88B4B3ULL, 0xA54DB0F6BAA0AAE6ULL } }, /* XSUM_XXH128_testdata[7990] */\n    { 2663, 0x9E3779B185EBCA8DULL, { 0x568D106E7EB991DFULL, 0x8257627D388A176EULL } }, /* XSUM_XXH128_testdata[7991] */\n    { 2664, 0x0000000000000000ULL, { 0x9EE636034F83E51EULL, 0xEDFB589DC510F3E4ULL } }, /* XSUM_XXH128_testdata[7992] */\n    { 2664, 0x000000009E3779B1ULL, { 0x249C4954E54D8E2BULL, 0x4CAA0582EE5DF4EEULL } }, /* XSUM_XXH128_testdata[7993] */\n    { 2664, 0x9E3779B185EBCA8DULL, { 0xBDC01BEE7D7F6342ULL, 0xA3781EEC541A1041ULL } }, /* XSUM_XXH128_testdata[7994] */\n    { 2665, 0x0000000000000000ULL, { 0x844C87FB2DBC28C1ULL, 0x3F6EC8B97BE696E9ULL } }, /* XSUM_XXH128_testdata[7995] */\n    { 2665, 0x000000009E3779B1ULL, { 0x8429EB39611E81FCULL, 0xD95FA150C5D2DE66ULL } }, /* XSUM_XXH128_testdata[7996] */\n    { 2665, 0x9E3779B185EBCA8DULL, { 0x1B7B68C2FB38F0BFULL, 0x08226EBA8187C89BULL } }, /* XSUM_XXH128_testdata[7997] */\n    { 2666, 0x0000000000000000ULL, { 0xF38FC2659AFA13E7ULL, 0x1A16A97DDA1483BFULL } }, /* XSUM_XXH128_testdata[7998] */\n    { 2666, 0x000000009E3779B1ULL, { 0x630E6F93BBAA5B74ULL, 0x8840C9937B3788C3ULL } }, /* XSUM_XXH128_testdata[7999] */\n    { 2666, 0x9E3779B185EBCA8DULL, { 0xE85DEBAD6838BCF9ULL, 0x8A218F6057F3D03BULL } }, /* XSUM_XXH128_testdata[8000] */\n    { 2667, 0x0000000000000000ULL, { 0x276FF5707C509A89ULL, 0xAD3520A8EB8449A8ULL } }, /* XSUM_XXH128_testdata[8001] */\n    { 2667, 0x000000009E3779B1ULL, { 0x66D6AC9CE0193EDBULL, 0xE8564B73726A6EB0ULL } }, /* XSUM_XXH128_testdata[8002] */\n    { 2667, 0x9E3779B185EBCA8DULL, { 0x5BCC923A6CE9D2E3ULL, 0xB92806921D021D76ULL } }, /* XSUM_XXH128_testdata[8003] */\n    { 2668, 0x0000000000000000ULL, { 0x99A95EA696BD6785ULL, 0x3D2B2AB54E4163ACULL } }, /* XSUM_XXH128_testdata[8004] */\n    { 2668, 0x000000009E3779B1ULL, { 0xB22B79DD315C1CBFULL, 0x34AFE1511029D341ULL } }, /* XSUM_XXH128_testdata[8005] */\n    { 2668, 0x9E3779B185EBCA8DULL, { 0x598FACDB1FC4FF31ULL, 0xC8F0FF8CDD1F99F7ULL } }, /* XSUM_XXH128_testdata[8006] */\n    { 2669, 0x0000000000000000ULL, { 0x587C1525793EAC83ULL, 0x52F80813117A2274ULL } }, /* XSUM_XXH128_testdata[8007] */\n    { 2669, 0x000000009E3779B1ULL, { 0xB62478D480043629ULL, 0xE18827E28AFDDDCDULL } }, /* XSUM_XXH128_testdata[8008] */\n    { 2669, 0x9E3779B185EBCA8DULL, { 0xFE934DA8D6689EADULL, 0x7D68FC275A37BEC1ULL } }, /* XSUM_XXH128_testdata[8009] */\n    { 2670, 0x0000000000000000ULL, { 0xAE625CFCC51CA5B6ULL, 0x01A211FC55B7D935ULL } }, /* XSUM_XXH128_testdata[8010] */\n    { 2670, 0x000000009E3779B1ULL, { 0xCC802C7D3F3E1F92ULL, 0x796C5D18CA88AF59ULL } }, /* XSUM_XXH128_testdata[8011] */\n    { 2670, 0x9E3779B185EBCA8DULL, { 0x82203BFF0066A4D6ULL, 0xD0A5BF99F8D7C938ULL } }, /* XSUM_XXH128_testdata[8012] */\n    { 2671, 0x0000000000000000ULL, { 0xA87597FFB968B6E0ULL, 0xF052A7DC098D4F3BULL } }, /* XSUM_XXH128_testdata[8013] */\n    { 2671, 0x000000009E3779B1ULL, { 0xF67D968045EA0A4CULL, 0xF0E8E4669913CCD9ULL } }, /* XSUM_XXH128_testdata[8014] */\n    { 2671, 0x9E3779B185EBCA8DULL, { 0x5C87AE9CF5951A93ULL, 0xD4798822605AB8F3ULL } }, /* XSUM_XXH128_testdata[8015] */\n    { 2672, 0x0000000000000000ULL, { 0x615BD5A28193AEF1ULL, 0x86E4786BEC7F63C4ULL } }, /* XSUM_XXH128_testdata[8016] */\n    { 2672, 0x000000009E3779B1ULL, { 0x2388865B2021B082ULL, 0xF173D833A20BFE55ULL } }, /* XSUM_XXH128_testdata[8017] */\n    { 2672, 0x9E3779B185EBCA8DULL, { 0x495B718A1B4B8408ULL, 0x6CA73781BFCDE03DULL } }, /* XSUM_XXH128_testdata[8018] */\n    { 2673, 0x0000000000000000ULL, { 0x9D4E0BF6898776B0ULL, 0x777A9FB80A4481BAULL } }, /* XSUM_XXH128_testdata[8019] */\n    { 2673, 0x000000009E3779B1ULL, { 0x9228B1703B2E7B92ULL, 0xB2BD04287375D2D4ULL } }, /* XSUM_XXH128_testdata[8020] */\n    { 2673, 0x9E3779B185EBCA8DULL, { 0xDEC8490ACBE435ADULL, 0x23E4E106EEDC37F1ULL } }, /* XSUM_XXH128_testdata[8021] */\n    { 2674, 0x0000000000000000ULL, { 0xA5C43A054767C765ULL, 0xD877683D482D7C17ULL } }, /* XSUM_XXH128_testdata[8022] */\n    { 2674, 0x000000009E3779B1ULL, { 0xAE58183AA24EE64EULL, 0x819423349090CD48ULL } }, /* XSUM_XXH128_testdata[8023] */\n    { 2674, 0x9E3779B185EBCA8DULL, { 0x8368867E1EA6FC99ULL, 0xA665A5FD29BBF2F2ULL } }, /* XSUM_XXH128_testdata[8024] */\n    { 2675, 0x0000000000000000ULL, { 0x16BBD0C10B5D2923ULL, 0xCD5FD6B8C651D094ULL } }, /* XSUM_XXH128_testdata[8025] */\n    { 2675, 0x000000009E3779B1ULL, { 0xA5172604E8F4BC62ULL, 0x027E3B089219D07CULL } }, /* XSUM_XXH128_testdata[8026] */\n    { 2675, 0x9E3779B185EBCA8DULL, { 0x164E8EE293E821BCULL, 0x1A3D8D961FF27A38ULL } }, /* XSUM_XXH128_testdata[8027] */\n    { 2676, 0x0000000000000000ULL, { 0x84BC3B4237C011F0ULL, 0x702EB06368CDDBFEULL } }, /* XSUM_XXH128_testdata[8028] */\n    { 2676, 0x000000009E3779B1ULL, { 0xDFAC95037B0832A6ULL, 0xDDBE04B81FC83914ULL } }, /* XSUM_XXH128_testdata[8029] */\n    { 2676, 0x9E3779B185EBCA8DULL, { 0xCA34B1C20B89EA14ULL, 0x33AEFA2A431525C2ULL } }, /* XSUM_XXH128_testdata[8030] */\n    { 2677, 0x0000000000000000ULL, { 0x85F78F29D4E96850ULL, 0xFD65B4F8BC955232ULL } }, /* XSUM_XXH128_testdata[8031] */\n    { 2677, 0x000000009E3779B1ULL, { 0x2C1532CEE441E7DFULL, 0xB40A73223B1B4420ULL } }, /* XSUM_XXH128_testdata[8032] */\n    { 2677, 0x9E3779B185EBCA8DULL, { 0x391275578A5E0783ULL, 0xEA60DCE555962A9CULL } }, /* XSUM_XXH128_testdata[8033] */\n    { 2678, 0x0000000000000000ULL, { 0xF3EFCA9185986EB0ULL, 0x63BD3A1919922F62ULL } }, /* XSUM_XXH128_testdata[8034] */\n    { 2678, 0x000000009E3779B1ULL, { 0x073A1C74EEC36772ULL, 0x78D81CB3C9ADF1D5ULL } }, /* XSUM_XXH128_testdata[8035] */\n    { 2678, 0x9E3779B185EBCA8DULL, { 0x377E026296B6768DULL, 0x561FA1D6A3189E94ULL } }, /* XSUM_XXH128_testdata[8036] */\n    { 2679, 0x0000000000000000ULL, { 0x03308A07CDF022E0ULL, 0x902F9E2B808D58B7ULL } }, /* XSUM_XXH128_testdata[8037] */\n    { 2679, 0x000000009E3779B1ULL, { 0x5ABDBA8D8557EAD4ULL, 0x4138585DCC5A23ACULL } }, /* XSUM_XXH128_testdata[8038] */\n    { 2679, 0x9E3779B185EBCA8DULL, { 0xCC09B8CFA131A49CULL, 0x7C2B96480BECBEF1ULL } }, /* XSUM_XXH128_testdata[8039] */\n    { 2680, 0x0000000000000000ULL, { 0xD90831B33475C6DCULL, 0x44EDA2A42364920BULL } }, /* XSUM_XXH128_testdata[8040] */\n    { 2680, 0x000000009E3779B1ULL, { 0xBA808585E596AED3ULL, 0x077E196B7FE6A20AULL } }, /* XSUM_XXH128_testdata[8041] */\n    { 2680, 0x9E3779B185EBCA8DULL, { 0xD4954B2E7FDE32ACULL, 0x2D004C0B0F294980ULL } }, /* XSUM_XXH128_testdata[8042] */\n    { 2681, 0x0000000000000000ULL, { 0xC1547AC0EE938EDDULL, 0x76DFC928AB2263B3ULL } }, /* XSUM_XXH128_testdata[8043] */\n    { 2681, 0x000000009E3779B1ULL, { 0xEA4704B267C13922ULL, 0xEE88AC7642826FAFULL } }, /* XSUM_XXH128_testdata[8044] */\n    { 2681, 0x9E3779B185EBCA8DULL, { 0xBCCE8DD6ABF21DBFULL, 0xC6EE6381311450D4ULL } }, /* XSUM_XXH128_testdata[8045] */\n    { 2682, 0x0000000000000000ULL, { 0xF4D2F97480A43A13ULL, 0x140608ED5EB3AA42ULL } }, /* XSUM_XXH128_testdata[8046] */\n    { 2682, 0x000000009E3779B1ULL, { 0xEDB5747CA934AD3EULL, 0x754E41C0A2C44442ULL } }, /* XSUM_XXH128_testdata[8047] */\n    { 2682, 0x9E3779B185EBCA8DULL, { 0x79716517796A6054ULL, 0x13DADDD5A8CFD186ULL } }, /* XSUM_XXH128_testdata[8048] */\n    { 2683, 0x0000000000000000ULL, { 0xC29DCF207A0AA424ULL, 0x933513CC3BC10F44ULL } }, /* XSUM_XXH128_testdata[8049] */\n    { 2683, 0x000000009E3779B1ULL, { 0x2360259B78119512ULL, 0x821F906B8ED5D20DULL } }, /* XSUM_XXH128_testdata[8050] */\n    { 2683, 0x9E3779B185EBCA8DULL, { 0xACB24D3AD0D98BCFULL, 0x37A50BDECAACEA10ULL } }, /* XSUM_XXH128_testdata[8051] */\n    { 2684, 0x0000000000000000ULL, { 0x13B268BDF2A4552BULL, 0x459F3399A9C521D9ULL } }, /* XSUM_XXH128_testdata[8052] */\n    { 2684, 0x000000009E3779B1ULL, { 0x7771F5C60C1445ADULL, 0xE83E27129B9196AFULL } }, /* XSUM_XXH128_testdata[8053] */\n    { 2684, 0x9E3779B185EBCA8DULL, { 0x027F4FDCE5AFB403ULL, 0x202DFBFA380A87DBULL } }, /* XSUM_XXH128_testdata[8054] */\n    { 2685, 0x0000000000000000ULL, { 0xACE63EF23FB86E6AULL, 0x44F497C0BC832766ULL } }, /* XSUM_XXH128_testdata[8055] */\n    { 2685, 0x000000009E3779B1ULL, { 0x664442EC2D2A17C4ULL, 0xB22795790F22B7A9ULL } }, /* XSUM_XXH128_testdata[8056] */\n    { 2685, 0x9E3779B185EBCA8DULL, { 0x3B0AFC1CCDA1C39FULL, 0xF1575653D97E7B3DULL } }, /* XSUM_XXH128_testdata[8057] */\n    { 2686, 0x0000000000000000ULL, { 0x9A49DCE5BE630EAEULL, 0x3424408176D19657ULL } }, /* XSUM_XXH128_testdata[8058] */\n    { 2686, 0x000000009E3779B1ULL, { 0xD040876637A282DAULL, 0xF77B40F85163C679ULL } }, /* XSUM_XXH128_testdata[8059] */\n    { 2686, 0x9E3779B185EBCA8DULL, { 0x4574DA06250C1577ULL, 0x2FBE85A4F21E87A5ULL } }, /* XSUM_XXH128_testdata[8060] */\n    { 2687, 0x0000000000000000ULL, { 0xD871E9EE58D825F7ULL, 0xB6F86538C03D2F1EULL } }, /* XSUM_XXH128_testdata[8061] */\n    { 2687, 0x000000009E3779B1ULL, { 0x2489FF9B273CD7D8ULL, 0x82590B5902937A9FULL } }, /* XSUM_XXH128_testdata[8062] */\n    { 2687, 0x9E3779B185EBCA8DULL, { 0xFA3625BF5B009957ULL, 0xD3A04210FE517CAAULL } }, /* XSUM_XXH128_testdata[8063] */\n    { 2688, 0x0000000000000000ULL, { 0x3266FF28F9519B04ULL, 0xD8CACDC5723E19F4ULL } }, /* XSUM_XXH128_testdata[8064] */\n    { 2688, 0x000000009E3779B1ULL, { 0x27215E8A58397042ULL, 0x4689B220F95E0813ULL } }, /* XSUM_XXH128_testdata[8065] */\n    { 2688, 0x9E3779B185EBCA8DULL, { 0x578B167B0CAAFFD2ULL, 0x651424E896736C11ULL } }, /* XSUM_XXH128_testdata[8066] */\n    { 2689, 0x0000000000000000ULL, { 0x101AC0C3B5522413ULL, 0xA4B8E83359EF9DC5ULL } }, /* XSUM_XXH128_testdata[8067] */\n    { 2689, 0x000000009E3779B1ULL, { 0x259F95D7F93720B8ULL, 0x7620E17BE95AC58EULL } }, /* XSUM_XXH128_testdata[8068] */\n    { 2689, 0x9E3779B185EBCA8DULL, { 0x7A06AFAA36487437ULL, 0x93A2CED490874A88ULL } }, /* XSUM_XXH128_testdata[8069] */\n    { 2690, 0x0000000000000000ULL, { 0xFADDE89B51C359C9ULL, 0xA5F884CC3B4549B0ULL } }, /* XSUM_XXH128_testdata[8070] */\n    { 2690, 0x000000009E3779B1ULL, { 0x9B84E68CE57263B4ULL, 0xA5E7699C7687B995ULL } }, /* XSUM_XXH128_testdata[8071] */\n    { 2690, 0x9E3779B185EBCA8DULL, { 0xE38E645BF761AC4DULL, 0xB6164C7B067A3F45ULL } }, /* XSUM_XXH128_testdata[8072] */\n    { 2691, 0x0000000000000000ULL, { 0x63506FAC4CBA52C1ULL, 0xBFD9852033DD723CULL } }, /* XSUM_XXH128_testdata[8073] */\n    { 2691, 0x000000009E3779B1ULL, { 0x086D105267DCA9B1ULL, 0x81441B7FD6B7164CULL } }, /* XSUM_XXH128_testdata[8074] */\n    { 2691, 0x9E3779B185EBCA8DULL, { 0xE27E0ABCCE7904DFULL, 0x39AF68A658B7E326ULL } }, /* XSUM_XXH128_testdata[8075] */\n    { 2692, 0x0000000000000000ULL, { 0x71F53880758D7060ULL, 0x0B2BDA83FD9D3476ULL } }, /* XSUM_XXH128_testdata[8076] */\n    { 2692, 0x000000009E3779B1ULL, { 0x2557948AA0CFDB77ULL, 0x4010EA4311E3A0CCULL } }, /* XSUM_XXH128_testdata[8077] */\n    { 2692, 0x9E3779B185EBCA8DULL, { 0x78581FBA0A1144F3ULL, 0x0D5C20DCA6FFC5F5ULL } }, /* XSUM_XXH128_testdata[8078] */\n    { 2693, 0x0000000000000000ULL, { 0xDE9508CCD369CE41ULL, 0x1F7482A89BE505AAULL } }, /* XSUM_XXH128_testdata[8079] */\n    { 2693, 0x000000009E3779B1ULL, { 0x1A9F7D5653DCC096ULL, 0x08852564D4412749ULL } }, /* XSUM_XXH128_testdata[8080] */\n    { 2693, 0x9E3779B185EBCA8DULL, { 0x280431D740E85450ULL, 0x1465D4DE8AE3E331ULL } }, /* XSUM_XXH128_testdata[8081] */\n    { 2694, 0x0000000000000000ULL, { 0x71DBA1E913B47BD6ULL, 0x2C8CEFC3D1409A25ULL } }, /* XSUM_XXH128_testdata[8082] */\n    { 2694, 0x000000009E3779B1ULL, { 0x2224AB1CA0F5BD8AULL, 0x391E22818FC6CA10ULL } }, /* XSUM_XXH128_testdata[8083] */\n    { 2694, 0x9E3779B185EBCA8DULL, { 0xF19B1A1929F741AEULL, 0x94CF2D6F01C55A3FULL } }, /* XSUM_XXH128_testdata[8084] */\n    { 2695, 0x0000000000000000ULL, { 0x55D2D49B1F2BD88CULL, 0xBC5C20B7ED784789ULL } }, /* XSUM_XXH128_testdata[8085] */\n    { 2695, 0x000000009E3779B1ULL, { 0x2C640DD917E7A63AULL, 0xBF8732CB05665659ULL } }, /* XSUM_XXH128_testdata[8086] */\n    { 2695, 0x9E3779B185EBCA8DULL, { 0xA5801C01E48F00F9ULL, 0xC314A0ED3EBD5B1EULL } }, /* XSUM_XXH128_testdata[8087] */\n    { 2696, 0x0000000000000000ULL, { 0x1064CF1956972EB3ULL, 0x34726BD4AC6307DDULL } }, /* XSUM_XXH128_testdata[8088] */\n    { 2696, 0x000000009E3779B1ULL, { 0xF4ECC73DCF2F0C35ULL, 0xB85E5246DFD0F0A1ULL } }, /* XSUM_XXH128_testdata[8089] */\n    { 2696, 0x9E3779B185EBCA8DULL, { 0x9BAF49DC05ACE5D5ULL, 0xDD49D640DBA5D1C1ULL } }, /* XSUM_XXH128_testdata[8090] */\n    { 2697, 0x0000000000000000ULL, { 0x5889C462CEA8A71DULL, 0xF27F91E5DFFA82FBULL } }, /* XSUM_XXH128_testdata[8091] */\n    { 2697, 0x000000009E3779B1ULL, { 0xC2D437106A282F5FULL, 0xA514EE4CF92926EDULL } }, /* XSUM_XXH128_testdata[8092] */\n    { 2697, 0x9E3779B185EBCA8DULL, { 0x7CD2AA74EC82B7AFULL, 0x2098E524B7F84CB3ULL } }, /* XSUM_XXH128_testdata[8093] */\n    { 2698, 0x0000000000000000ULL, { 0x4517D3A546E2CDF8ULL, 0x9021A8CB9CCA766FULL } }, /* XSUM_XXH128_testdata[8094] */\n    { 2698, 0x000000009E3779B1ULL, { 0x1CFA14DEDBDA9DD6ULL, 0xCAB752E986BB3367ULL } }, /* XSUM_XXH128_testdata[8095] */\n    { 2698, 0x9E3779B185EBCA8DULL, { 0x85D8B977234EEC88ULL, 0x67495F88CF61DB13ULL } }, /* XSUM_XXH128_testdata[8096] */\n    { 2699, 0x0000000000000000ULL, { 0x26324B0C49D31CDCULL, 0x9881904735B3D35FULL } }, /* XSUM_XXH128_testdata[8097] */\n    { 2699, 0x000000009E3779B1ULL, { 0xA7C253EB43B60771ULL, 0x2A97E83252E72E66ULL } }, /* XSUM_XXH128_testdata[8098] */\n    { 2699, 0x9E3779B185EBCA8DULL, { 0xD9624BAD327F76F3ULL, 0x893FD371AFA225EAULL } }, /* XSUM_XXH128_testdata[8099] */\n    { 2700, 0x0000000000000000ULL, { 0x770688060303A701ULL, 0x5B036D83FD90B0EEULL } }, /* XSUM_XXH128_testdata[8100] */\n    { 2700, 0x000000009E3779B1ULL, { 0x8099086C4C11A11DULL, 0x1AF4CBB22B8BA2CAULL } }, /* XSUM_XXH128_testdata[8101] */\n    { 2700, 0x9E3779B185EBCA8DULL, { 0x6EE35FED0CE66F45ULL, 0x072D7B645FC216C4ULL } }, /* XSUM_XXH128_testdata[8102] */\n    { 2701, 0x0000000000000000ULL, { 0x967A50209E1DB590ULL, 0xB0B7DB54825FDCB4ULL } }, /* XSUM_XXH128_testdata[8103] */\n    { 2701, 0x000000009E3779B1ULL, { 0x18613DD2DDDDF0BAULL, 0x9E9B9FB1DA96B16FULL } }, /* XSUM_XXH128_testdata[8104] */\n    { 2701, 0x9E3779B185EBCA8DULL, { 0xE5654F6E586D4E45ULL, 0x3BC5F82FC89BFEFAULL } }, /* XSUM_XXH128_testdata[8105] */\n    { 2702, 0x0000000000000000ULL, { 0x8C5F324B88AFD79CULL, 0x78A3267A9880C01FULL } }, /* XSUM_XXH128_testdata[8106] */\n    { 2702, 0x000000009E3779B1ULL, { 0x2F97FE00E99F32FCULL, 0x513578130A8F8D40ULL } }, /* XSUM_XXH128_testdata[8107] */\n    { 2702, 0x9E3779B185EBCA8DULL, { 0xB8CFD42B4236EA07ULL, 0x1E8A53376DE22089ULL } }, /* XSUM_XXH128_testdata[8108] */\n    { 2703, 0x0000000000000000ULL, { 0xCBD4632639DAB36DULL, 0xA649B70D922B97F0ULL } }, /* XSUM_XXH128_testdata[8109] */\n    { 2703, 0x000000009E3779B1ULL, { 0x4621C1C2F5D43E2BULL, 0xF0B51E4DDDB0399DULL } }, /* XSUM_XXH128_testdata[8110] */\n    { 2703, 0x9E3779B185EBCA8DULL, { 0xE58EDC615C166AD5ULL, 0xA1F1F84BD45EDCE1ULL } }, /* XSUM_XXH128_testdata[8111] */\n    { 2704, 0x0000000000000000ULL, { 0x49BC475C9EB2111CULL, 0x9FB9CBC37E5C2AF8ULL } }, /* XSUM_XXH128_testdata[8112] */\n    { 2704, 0x000000009E3779B1ULL, { 0x038DDBF13ADEAA87ULL, 0x830FB527D6311AABULL } }, /* XSUM_XXH128_testdata[8113] */\n    { 2704, 0x9E3779B185EBCA8DULL, { 0xB02A55F8B8CC1358ULL, 0x89C1E0D15D9D200BULL } }, /* XSUM_XXH128_testdata[8114] */\n    { 2705, 0x0000000000000000ULL, { 0x95FAC591C6986D3BULL, 0x682202FE896769FAULL } }, /* XSUM_XXH128_testdata[8115] */\n    { 2705, 0x000000009E3779B1ULL, { 0x2FDA693BB60E88A2ULL, 0x8F95A36E9E5B5A73ULL } }, /* XSUM_XXH128_testdata[8116] */\n    { 2705, 0x9E3779B185EBCA8DULL, { 0xEEBAA21D62DB3FE2ULL, 0xA530F2F2BE1A9620ULL } }, /* XSUM_XXH128_testdata[8117] */\n    { 2706, 0x0000000000000000ULL, { 0x792DF4D618BFEE49ULL, 0x38984BA9706B3A3CULL } }, /* XSUM_XXH128_testdata[8118] */\n    { 2706, 0x000000009E3779B1ULL, { 0x2516DE30FA88BF05ULL, 0xA0D9130DAC4E1862ULL } }, /* XSUM_XXH128_testdata[8119] */\n    { 2706, 0x9E3779B185EBCA8DULL, { 0x8D9B3B158B7B0A3AULL, 0x428C9BF940172DD3ULL } }, /* XSUM_XXH128_testdata[8120] */\n    { 2707, 0x0000000000000000ULL, { 0x35E99A2BC3203AF2ULL, 0x8D50912D783EA31FULL } }, /* XSUM_XXH128_testdata[8121] */\n    { 2707, 0x000000009E3779B1ULL, { 0xF6421B5F9ECE5E91ULL, 0xF50D9F5F0DED4B4BULL } }, /* XSUM_XXH128_testdata[8122] */\n    { 2707, 0x9E3779B185EBCA8DULL, { 0x2AF059E8D350DCB9ULL, 0x1B287FE68D674F1DULL } }, /* XSUM_XXH128_testdata[8123] */\n    { 2708, 0x0000000000000000ULL, { 0xB569AF88772A0683ULL, 0xF75225ADAF44D5B1ULL } }, /* XSUM_XXH128_testdata[8124] */\n    { 2708, 0x000000009E3779B1ULL, { 0x54BD25FB39D6C29BULL, 0x35FCD2FB4355A546ULL } }, /* XSUM_XXH128_testdata[8125] */\n    { 2708, 0x9E3779B185EBCA8DULL, { 0x3D5378B9C7FC63B7ULL, 0x76FC53A26EE85555ULL } }, /* XSUM_XXH128_testdata[8126] */\n    { 2709, 0x0000000000000000ULL, { 0x8D48AA0E64721261ULL, 0x51CDEDE9ED041153ULL } }, /* XSUM_XXH128_testdata[8127] */\n    { 2709, 0x000000009E3779B1ULL, { 0x408C4AFC6C0220DCULL, 0xCC1198B352A169C7ULL } }, /* XSUM_XXH128_testdata[8128] */\n    { 2709, 0x9E3779B185EBCA8DULL, { 0x271CEA42E8444202ULL, 0x6B7FD855D28FB27AULL } }, /* XSUM_XXH128_testdata[8129] */\n    { 2710, 0x0000000000000000ULL, { 0xC6FF9D293A1AA329ULL, 0xCD7368BCF05CF4D8ULL } }, /* XSUM_XXH128_testdata[8130] */\n    { 2710, 0x000000009E3779B1ULL, { 0xB207280F894E35BFULL, 0x7924C8A27BE2EB55ULL } }, /* XSUM_XXH128_testdata[8131] */\n    { 2710, 0x9E3779B185EBCA8DULL, { 0x4C2CEA3B16BBB71FULL, 0x9AA72CC2C275413BULL } }, /* XSUM_XXH128_testdata[8132] */\n    { 2711, 0x0000000000000000ULL, { 0x5F530CC8CBB57EE2ULL, 0x643790690D8C54ACULL } }, /* XSUM_XXH128_testdata[8133] */\n    { 2711, 0x000000009E3779B1ULL, { 0x1BD2515DD5E85347ULL, 0x3A7D00D7585CBEE2ULL } }, /* XSUM_XXH128_testdata[8134] */\n    { 2711, 0x9E3779B185EBCA8DULL, { 0xD970F7003E55C31DULL, 0xA8E264A3FA3FD800ULL } }, /* XSUM_XXH128_testdata[8135] */\n    { 2712, 0x0000000000000000ULL, { 0xBC54D452E46BC7D0ULL, 0xA337CBA859AE2F0EULL } }, /* XSUM_XXH128_testdata[8136] */\n    { 2712, 0x000000009E3779B1ULL, { 0xD42599529F61D53EULL, 0x4B681387127740E8ULL } }, /* XSUM_XXH128_testdata[8137] */\n    { 2712, 0x9E3779B185EBCA8DULL, { 0x8A22A690E83F1229ULL, 0x6F5C4B2FC20AF5A9ULL } }, /* XSUM_XXH128_testdata[8138] */\n    { 2713, 0x0000000000000000ULL, { 0xD72E6109D358D35AULL, 0x74A87C13FAFFF872ULL } }, /* XSUM_XXH128_testdata[8139] */\n    { 2713, 0x000000009E3779B1ULL, { 0xAFD876589F61B711ULL, 0x2C956BCD51BA71C9ULL } }, /* XSUM_XXH128_testdata[8140] */\n    { 2713, 0x9E3779B185EBCA8DULL, { 0xB09F86C0560A7B30ULL, 0x0E9980A436025B7BULL } }, /* XSUM_XXH128_testdata[8141] */\n    { 2714, 0x0000000000000000ULL, { 0x953DE252454629D6ULL, 0xD9AAD2CCB5CE43FCULL } }, /* XSUM_XXH128_testdata[8142] */\n    { 2714, 0x000000009E3779B1ULL, { 0xB271884175FA26EAULL, 0x172A751A136A6562ULL } }, /* XSUM_XXH128_testdata[8143] */\n    { 2714, 0x9E3779B185EBCA8DULL, { 0x25DCCEABA8C25758ULL, 0x6E196EA8364F0288ULL } }, /* XSUM_XXH128_testdata[8144] */\n    { 2715, 0x0000000000000000ULL, { 0xF76715E5D4557FACULL, 0xDC197E2E2F7A096FULL } }, /* XSUM_XXH128_testdata[8145] */\n    { 2715, 0x000000009E3779B1ULL, { 0x69CE495194AD2CD0ULL, 0xCD3FE1548DC1C02EULL } }, /* XSUM_XXH128_testdata[8146] */\n    { 2715, 0x9E3779B185EBCA8DULL, { 0x077ED657DB913C38ULL, 0x92EA183F6B887FCEULL } }, /* XSUM_XXH128_testdata[8147] */\n    { 2716, 0x0000000000000000ULL, { 0x776E23A66AEB84B6ULL, 0x3797AAC8F6536D08ULL } }, /* XSUM_XXH128_testdata[8148] */\n    { 2716, 0x000000009E3779B1ULL, { 0x326232AC42E8011BULL, 0x4CF521316B0EC7C8ULL } }, /* XSUM_XXH128_testdata[8149] */\n    { 2716, 0x9E3779B185EBCA8DULL, { 0xEB50F50AF62FF0DDULL, 0x87BAC0CC8EEC501BULL } }, /* XSUM_XXH128_testdata[8150] */\n    { 2717, 0x0000000000000000ULL, { 0x36D2B4C2D5F229B9ULL, 0x4F162B8A61BFF678ULL } }, /* XSUM_XXH128_testdata[8151] */\n    { 2717, 0x000000009E3779B1ULL, { 0xD74563C5C135987EULL, 0x12F4834B3944B56EULL } }, /* XSUM_XXH128_testdata[8152] */\n    { 2717, 0x9E3779B185EBCA8DULL, { 0xE7257DB30D66F4ABULL, 0x8357595B92D3D4BDULL } }, /* XSUM_XXH128_testdata[8153] */\n    { 2718, 0x0000000000000000ULL, { 0x3FCF289950CEE08AULL, 0xF1E4662908D73333ULL } }, /* XSUM_XXH128_testdata[8154] */\n    { 2718, 0x000000009E3779B1ULL, { 0x79073F5BA67F8798ULL, 0x21D17C7B70324108ULL } }, /* XSUM_XXH128_testdata[8155] */\n    { 2718, 0x9E3779B185EBCA8DULL, { 0x419F3C320B5D1D8EULL, 0x17566A472F81A13AULL } }, /* XSUM_XXH128_testdata[8156] */\n    { 2719, 0x0000000000000000ULL, { 0x4E9F78279B4602A1ULL, 0x52999DC97400EAEBULL } }, /* XSUM_XXH128_testdata[8157] */\n    { 2719, 0x000000009E3779B1ULL, { 0x64ECFC0FBCEFBC44ULL, 0xF149B2A4780019DAULL } }, /* XSUM_XXH128_testdata[8158] */\n    { 2719, 0x9E3779B185EBCA8DULL, { 0x9548F72117A6EB81ULL, 0xFB0B787FC8DF5FE0ULL } }, /* XSUM_XXH128_testdata[8159] */\n    { 2720, 0x0000000000000000ULL, { 0x753D8BF5C30B6F75ULL, 0xDB593A258663442CULL } }, /* XSUM_XXH128_testdata[8160] */\n    { 2720, 0x000000009E3779B1ULL, { 0x6DD525D5EA0704C9ULL, 0x65AA6CE707CB619DULL } }, /* XSUM_XXH128_testdata[8161] */\n    { 2720, 0x9E3779B185EBCA8DULL, { 0x7015D8EEB6AA4C5FULL, 0x7A9C80638C34A4C9ULL } }, /* XSUM_XXH128_testdata[8162] */\n    { 2721, 0x0000000000000000ULL, { 0xE45A2972F797B027ULL, 0x4E53AC25F61AA349ULL } }, /* XSUM_XXH128_testdata[8163] */\n    { 2721, 0x000000009E3779B1ULL, { 0x081E5D65CEDBE9EDULL, 0x328D721892D3C38CULL } }, /* XSUM_XXH128_testdata[8164] */\n    { 2721, 0x9E3779B185EBCA8DULL, { 0x1EFE37D9156E2D85ULL, 0xE2E7C1422788B4A4ULL } }, /* XSUM_XXH128_testdata[8165] */\n    { 2722, 0x0000000000000000ULL, { 0x720FA85611E358D7ULL, 0xBCB9B5DCC8EB2205ULL } }, /* XSUM_XXH128_testdata[8166] */\n    { 2722, 0x000000009E3779B1ULL, { 0x03BECAA314D56A79ULL, 0x757105753CAE325DULL } }, /* XSUM_XXH128_testdata[8167] */\n    { 2722, 0x9E3779B185EBCA8DULL, { 0xA5E64C7F065161F6ULL, 0x27299587B1D65D70ULL } }, /* XSUM_XXH128_testdata[8168] */\n    { 2723, 0x0000000000000000ULL, { 0x535D73EFBCEA79A7ULL, 0x6BE5766403D0F66FULL } }, /* XSUM_XXH128_testdata[8169] */\n    { 2723, 0x000000009E3779B1ULL, { 0x35A81B313B2C9119ULL, 0xF7F57952397C4760ULL } }, /* XSUM_XXH128_testdata[8170] */\n    { 2723, 0x9E3779B185EBCA8DULL, { 0x21E76579CA88C0B5ULL, 0x444FAB26DAF1F146ULL } }, /* XSUM_XXH128_testdata[8171] */\n    { 2724, 0x0000000000000000ULL, { 0x8951F4CB202A9A7BULL, 0xA516F21F5E1D5CBFULL } }, /* XSUM_XXH128_testdata[8172] */\n    { 2724, 0x000000009E3779B1ULL, { 0x2CD8EE4E238DBE78ULL, 0xA98B631C10EEAFEBULL } }, /* XSUM_XXH128_testdata[8173] */\n    { 2724, 0x9E3779B185EBCA8DULL, { 0x6D5DE30B925BB243ULL, 0xC5572B00C63B2992ULL } }, /* XSUM_XXH128_testdata[8174] */\n    { 2725, 0x0000000000000000ULL, { 0x02EA34C18E600923ULL, 0xF6EE283CF212D1B6ULL } }, /* XSUM_XXH128_testdata[8175] */\n    { 2725, 0x000000009E3779B1ULL, { 0x939B37ABCEAB06C6ULL, 0x7895C490C2039D90ULL } }, /* XSUM_XXH128_testdata[8176] */\n    { 2725, 0x9E3779B185EBCA8DULL, { 0x16E400B1E8002ECAULL, 0x41031788EAADAF96ULL } }, /* XSUM_XXH128_testdata[8177] */\n    { 2726, 0x0000000000000000ULL, { 0x2D861439B2387DA3ULL, 0xDCBEF132E5BAD67EULL } }, /* XSUM_XXH128_testdata[8178] */\n    { 2726, 0x000000009E3779B1ULL, { 0xCD2A44873C8DA36EULL, 0x082EEE46A685F19EULL } }, /* XSUM_XXH128_testdata[8179] */\n    { 2726, 0x9E3779B185EBCA8DULL, { 0x466E61CDCECD8965ULL, 0xE92679116378B4DBULL } }, /* XSUM_XXH128_testdata[8180] */\n    { 2727, 0x0000000000000000ULL, { 0x126BA5E1221D558EULL, 0x702E30957549891EULL } }, /* XSUM_XXH128_testdata[8181] */\n    { 2727, 0x000000009E3779B1ULL, { 0x548AE5B875E49920ULL, 0x43C70FD52DE39087ULL } }, /* XSUM_XXH128_testdata[8182] */\n    { 2727, 0x9E3779B185EBCA8DULL, { 0x6E2A5ACD0E5E94EAULL, 0xBB5B2EB9EC14A2B5ULL } }, /* XSUM_XXH128_testdata[8183] */\n    { 2728, 0x0000000000000000ULL, { 0x142E85167FC6F09EULL, 0x5A18748E4A572DC7ULL } }, /* XSUM_XXH128_testdata[8184] */\n    { 2728, 0x000000009E3779B1ULL, { 0x5AC3DF54764AB1C6ULL, 0x21EA040D29C50E64ULL } }, /* XSUM_XXH128_testdata[8185] */\n    { 2728, 0x9E3779B185EBCA8DULL, { 0xDDBA453DB1CE4644ULL, 0xFD8EA5CEBA0B9816ULL } }, /* XSUM_XXH128_testdata[8186] */\n    { 2729, 0x0000000000000000ULL, { 0x54E2E27AA70E87CDULL, 0x2765461B8B9B5300ULL } }, /* XSUM_XXH128_testdata[8187] */\n    { 2729, 0x000000009E3779B1ULL, { 0x1CCA2E9BBD998A08ULL, 0x50C76C8F3FA2025CULL } }, /* XSUM_XXH128_testdata[8188] */\n    { 2729, 0x9E3779B185EBCA8DULL, { 0x133CD21C564974FEULL, 0x7108D5488F1DC901ULL } }, /* XSUM_XXH128_testdata[8189] */\n    { 2730, 0x0000000000000000ULL, { 0x19F5A51C54B3A6D2ULL, 0x87D58CD60AEC8306ULL } }, /* XSUM_XXH128_testdata[8190] */\n    { 2730, 0x000000009E3779B1ULL, { 0xBF5E185529373067ULL, 0xA916100929036B11ULL } }, /* XSUM_XXH128_testdata[8191] */\n    { 2730, 0x9E3779B185EBCA8DULL, { 0x1F6AF6A0CFA750B0ULL, 0xB3199AB99B67FD44ULL } }, /* XSUM_XXH128_testdata[8192] */\n    { 2731, 0x0000000000000000ULL, { 0xA6DFEEA3C262AADDULL, 0xB299CE7429797E39ULL } }, /* XSUM_XXH128_testdata[8193] */\n    { 2731, 0x000000009E3779B1ULL, { 0x670065541AC16AA1ULL, 0x783FF89DBDDFD1D7ULL } }, /* XSUM_XXH128_testdata[8194] */\n    { 2731, 0x9E3779B185EBCA8DULL, { 0x1CB91B67F8F2EE5DULL, 0x9BB28419A1DC9298ULL } }, /* XSUM_XXH128_testdata[8195] */\n    { 2732, 0x0000000000000000ULL, { 0x1130AA460B92A232ULL, 0x1DB09C28BA09C798ULL } }, /* XSUM_XXH128_testdata[8196] */\n    { 2732, 0x000000009E3779B1ULL, { 0x28D18266069939F7ULL, 0xDE5B746B3B075246ULL } }, /* XSUM_XXH128_testdata[8197] */\n    { 2732, 0x9E3779B185EBCA8DULL, { 0x2CF3E546D8821900ULL, 0x1CCDE88F68CFC986ULL } }, /* XSUM_XXH128_testdata[8198] */\n    { 2733, 0x0000000000000000ULL, { 0xB2DCE0E3338954E8ULL, 0x736E4426489A49D3ULL } }, /* XSUM_XXH128_testdata[8199] */\n    { 2733, 0x000000009E3779B1ULL, { 0x0F49F696B930D565ULL, 0xD16C634828D68337ULL } }, /* XSUM_XXH128_testdata[8200] */\n    { 2733, 0x9E3779B185EBCA8DULL, { 0xE0F0924F7EE26EB7ULL, 0x5D16550BE031EF04ULL } }, /* XSUM_XXH128_testdata[8201] */\n    { 2734, 0x0000000000000000ULL, { 0xB7C5C80CB54C1AB8ULL, 0x30E78BE660A44442ULL } }, /* XSUM_XXH128_testdata[8202] */\n    { 2734, 0x000000009E3779B1ULL, { 0xB73CBB4EE4015E75ULL, 0x69A3E505A9BF8EC8ULL } }, /* XSUM_XXH128_testdata[8203] */\n    { 2734, 0x9E3779B185EBCA8DULL, { 0xDB5C1FCC7A178F80ULL, 0xF276E6D5C4BA8B65ULL } }, /* XSUM_XXH128_testdata[8204] */\n    { 2735, 0x0000000000000000ULL, { 0x6EDDE6BB963333E4ULL, 0xFEF48CF2D293F9DBULL } }, /* XSUM_XXH128_testdata[8205] */\n    { 2735, 0x000000009E3779B1ULL, { 0x9E22701B46DB7FA9ULL, 0x085FE551BEDC3CD3ULL } }, /* XSUM_XXH128_testdata[8206] */\n    { 2735, 0x9E3779B185EBCA8DULL, { 0x6E8710724AD69BC4ULL, 0x73A3765B7A307FF8ULL } }, /* XSUM_XXH128_testdata[8207] */\n    { 2736, 0x0000000000000000ULL, { 0x7A3DCFBA08DD2218ULL, 0x8CC8302C3A0847C5ULL } }, /* XSUM_XXH128_testdata[8208] */\n    { 2736, 0x000000009E3779B1ULL, { 0x5CEB1F79DA8C0C7FULL, 0x198305D938004F2DULL } }, /* XSUM_XXH128_testdata[8209] */\n    { 2736, 0x9E3779B185EBCA8DULL, { 0x13E8FEE1C71AAAC5ULL, 0xFD59B34A1E5F2131ULL } }, /* XSUM_XXH128_testdata[8210] */\n    { 2737, 0x0000000000000000ULL, { 0xE236CBC86C3366C0ULL, 0x918FF03C4B235969ULL } }, /* XSUM_XXH128_testdata[8211] */\n    { 2737, 0x000000009E3779B1ULL, { 0xB1431B93BA6730C5ULL, 0x8FE8832D6595998FULL } }, /* XSUM_XXH128_testdata[8212] */\n    { 2737, 0x9E3779B185EBCA8DULL, { 0xB2FF2DD5FAD7D707ULL, 0xBE51FFEB6D67D6BEULL } }, /* XSUM_XXH128_testdata[8213] */\n    { 2738, 0x0000000000000000ULL, { 0x0740BABCB82C79E1ULL, 0xAF4621AC51D637C7ULL } }, /* XSUM_XXH128_testdata[8214] */\n    { 2738, 0x000000009E3779B1ULL, { 0x752768D72BF04E68ULL, 0xD22ACA1D86D79444ULL } }, /* XSUM_XXH128_testdata[8215] */\n    { 2738, 0x9E3779B185EBCA8DULL, { 0x053A090CB71D2A97ULL, 0x83CCCCFA4B1664B5ULL } }, /* XSUM_XXH128_testdata[8216] */\n    { 2739, 0x0000000000000000ULL, { 0x25B01CC08FA2F76CULL, 0x2287E63714C43F39ULL } }, /* XSUM_XXH128_testdata[8217] */\n    { 2739, 0x000000009E3779B1ULL, { 0x4E8E86920ADB2FA5ULL, 0x7E5FB11D0D8AED40ULL } }, /* XSUM_XXH128_testdata[8218] */\n    { 2739, 0x9E3779B185EBCA8DULL, { 0x06B6774E705B6F04ULL, 0x5A078BBBE115ACD6ULL } }, /* XSUM_XXH128_testdata[8219] */\n    { 2740, 0x0000000000000000ULL, { 0x03B8F0D95A0503C9ULL, 0x6ADA4891E901DE2CULL } }, /* XSUM_XXH128_testdata[8220] */\n    { 2740, 0x000000009E3779B1ULL, { 0xF31EB33040712945ULL, 0xA61A5F7B2743DFBDULL } }, /* XSUM_XXH128_testdata[8221] */\n    { 2740, 0x9E3779B185EBCA8DULL, { 0x4EFBDC5FCC5FF48DULL, 0x911D35D4E850E4C2ULL } }, /* XSUM_XXH128_testdata[8222] */\n    { 2741, 0x0000000000000000ULL, { 0x2A3C8F37C50C5D4DULL, 0x1B58F69801889D99ULL } }, /* XSUM_XXH128_testdata[8223] */\n    { 2741, 0x000000009E3779B1ULL, { 0x5C3448A6056839ACULL, 0xEF8FBB1D5C92EBFFULL } }, /* XSUM_XXH128_testdata[8224] */\n    { 2741, 0x9E3779B185EBCA8DULL, { 0xA7034CA7B8F00A87ULL, 0xBA3ACD4F1F1FB437ULL } }, /* XSUM_XXH128_testdata[8225] */\n    { 2742, 0x0000000000000000ULL, { 0x19D39A92C8099D35ULL, 0xCB4CED767A7D78A8ULL } }, /* XSUM_XXH128_testdata[8226] */\n    { 2742, 0x000000009E3779B1ULL, { 0x6706D81E7B194EB6ULL, 0xEF6890EF7423DA3FULL } }, /* XSUM_XXH128_testdata[8227] */\n    { 2742, 0x9E3779B185EBCA8DULL, { 0x18ED7073D3D37414ULL, 0xAD67465AFD3D8503ULL } }, /* XSUM_XXH128_testdata[8228] */\n    { 2743, 0x0000000000000000ULL, { 0xD6479A438E07F0BCULL, 0xDBE9060C9661C4FFULL } }, /* XSUM_XXH128_testdata[8229] */\n    { 2743, 0x000000009E3779B1ULL, { 0xCA6D0C180BBAA30CULL, 0x5F9FC831DCC13DC9ULL } }, /* XSUM_XXH128_testdata[8230] */\n    { 2743, 0x9E3779B185EBCA8DULL, { 0xD569FCB2E3FE0526ULL, 0xF8899D4AA68C3168ULL } }, /* XSUM_XXH128_testdata[8231] */\n    { 2744, 0x0000000000000000ULL, { 0x25305373A50C2A9BULL, 0x7E6E83F5087AF878ULL } }, /* XSUM_XXH128_testdata[8232] */\n    { 2744, 0x000000009E3779B1ULL, { 0x1B197AC0EE23495DULL, 0xAE1DECDEB0CB07EFULL } }, /* XSUM_XXH128_testdata[8233] */\n    { 2744, 0x9E3779B185EBCA8DULL, { 0xBBFC4F0BFD00D728ULL, 0xEC624794384479D2ULL } }, /* XSUM_XXH128_testdata[8234] */\n    { 2745, 0x0000000000000000ULL, { 0x95C91E93B8FEC500ULL, 0x1783BAAD77D1BEF0ULL } }, /* XSUM_XXH128_testdata[8235] */\n    { 2745, 0x000000009E3779B1ULL, { 0x122C8E7992FD9C12ULL, 0x2D7E29559D905776ULL } }, /* XSUM_XXH128_testdata[8236] */\n    { 2745, 0x9E3779B185EBCA8DULL, { 0xE9EFACD2ED18C3ABULL, 0xD1EE1D93015E0E2AULL } }, /* XSUM_XXH128_testdata[8237] */\n    { 2746, 0x0000000000000000ULL, { 0x077B587B5C5BD810ULL, 0x5274E8584C80D03EULL } }, /* XSUM_XXH128_testdata[8238] */\n    { 2746, 0x000000009E3779B1ULL, { 0x639CA410DCAF6CC6ULL, 0x6489192DAC37EE2EULL } }, /* XSUM_XXH128_testdata[8239] */\n    { 2746, 0x9E3779B185EBCA8DULL, { 0xC178F72E6F411074ULL, 0x414CC3F684A7B258ULL } }, /* XSUM_XXH128_testdata[8240] */\n    { 2747, 0x0000000000000000ULL, { 0xCA8D3A0F2190E06FULL, 0x66FECFDA249DB547ULL } }, /* XSUM_XXH128_testdata[8241] */\n    { 2747, 0x000000009E3779B1ULL, { 0x7772D6657DE5B14FULL, 0xF72304873A799F69ULL } }, /* XSUM_XXH128_testdata[8242] */\n    { 2747, 0x9E3779B185EBCA8DULL, { 0x5CF89C801F50BE4BULL, 0x73E2247FF3CEBEDCULL } }, /* XSUM_XXH128_testdata[8243] */\n    { 2748, 0x0000000000000000ULL, { 0x59A9D5F7C3E59433ULL, 0x4322D34FCCC445B8ULL } }, /* XSUM_XXH128_testdata[8244] */\n    { 2748, 0x000000009E3779B1ULL, { 0x4B71B8D5FDA408D0ULL, 0x81776F97200E2DAFULL } }, /* XSUM_XXH128_testdata[8245] */\n    { 2748, 0x9E3779B185EBCA8DULL, { 0x0D438D59A0EE0295ULL, 0x41FDB17617460AE4ULL } }, /* XSUM_XXH128_testdata[8246] */\n    { 2749, 0x0000000000000000ULL, { 0x7572D747C29A03FAULL, 0xE78F4F6B652EC007ULL } }, /* XSUM_XXH128_testdata[8247] */\n    { 2749, 0x000000009E3779B1ULL, { 0x8255B16223A74EDEULL, 0x65B7D35249FB878AULL } }, /* XSUM_XXH128_testdata[8248] */\n    { 2749, 0x9E3779B185EBCA8DULL, { 0xC25AEA9C6A74B873ULL, 0xD042AB9D7B59DA9EULL } }, /* XSUM_XXH128_testdata[8249] */\n    { 2750, 0x0000000000000000ULL, { 0x1F0F0FDB414AEE14ULL, 0x36C49844D81AB4FFULL } }, /* XSUM_XXH128_testdata[8250] */\n    { 2750, 0x000000009E3779B1ULL, { 0xF7CC0F9DFE2C157BULL, 0xEACE4C99153C080CULL } }, /* XSUM_XXH128_testdata[8251] */\n    { 2750, 0x9E3779B185EBCA8DULL, { 0x8F8DE9C001788984ULL, 0xD4501C81614E1D24ULL } }, /* XSUM_XXH128_testdata[8252] */\n    { 2751, 0x0000000000000000ULL, { 0x30CA11D1D6F7D240ULL, 0x79D412A5D7A42FA0ULL } }, /* XSUM_XXH128_testdata[8253] */\n    { 2751, 0x000000009E3779B1ULL, { 0xA6652071055323FCULL, 0xD44393CD4170B33FULL } }, /* XSUM_XXH128_testdata[8254] */\n    { 2751, 0x9E3779B185EBCA8DULL, { 0x336DC6720F051ECAULL, 0x16553A05EFA1E543ULL } }, /* XSUM_XXH128_testdata[8255] */\n    { 2752, 0x0000000000000000ULL, { 0x458EE1F5CED1B45AULL, 0x33B45BDF034BE797ULL } }, /* XSUM_XXH128_testdata[8256] */\n    { 2752, 0x000000009E3779B1ULL, { 0x5B94F869B59AF26CULL, 0x63F569C37B93B6B8ULL } }, /* XSUM_XXH128_testdata[8257] */\n    { 2752, 0x9E3779B185EBCA8DULL, { 0xC66C6D0011AF599FULL, 0x8A2D9271CBBF2CBBULL } }, /* XSUM_XXH128_testdata[8258] */\n    { 2753, 0x0000000000000000ULL, { 0x55ADD9C7930867DBULL, 0x877ADF8680621FC8ULL } }, /* XSUM_XXH128_testdata[8259] */\n    { 2753, 0x000000009E3779B1ULL, { 0x4CB88FE72DCD4EDEULL, 0xC0474FD4F1900CDEULL } }, /* XSUM_XXH128_testdata[8260] */\n    { 2753, 0x9E3779B185EBCA8DULL, { 0xD7E1D7F7D04E0FB0ULL, 0x08F536B8A92523E5ULL } }, /* XSUM_XXH128_testdata[8261] */\n    { 2754, 0x0000000000000000ULL, { 0x21E57418A4ED11A2ULL, 0x6023CCFBCEF59B89ULL } }, /* XSUM_XXH128_testdata[8262] */\n    { 2754, 0x000000009E3779B1ULL, { 0x73088702C9CBDF40ULL, 0x5430613ECF0CA5D8ULL } }, /* XSUM_XXH128_testdata[8263] */\n    { 2754, 0x9E3779B185EBCA8DULL, { 0xA0765E3336FEEA07ULL, 0x87BE08FA90DB8E15ULL } }, /* XSUM_XXH128_testdata[8264] */\n    { 2755, 0x0000000000000000ULL, { 0x3D95DD744AD00F7CULL, 0x5038AC8B24D84E71ULL } }, /* XSUM_XXH128_testdata[8265] */\n    { 2755, 0x000000009E3779B1ULL, { 0xF247E53A35FCAE63ULL, 0xD459851452D1996BULL } }, /* XSUM_XXH128_testdata[8266] */\n    { 2755, 0x9E3779B185EBCA8DULL, { 0xE9AB7F5E0914C6C2ULL, 0x8BE3C69B3D46A9ACULL } }, /* XSUM_XXH128_testdata[8267] */\n    { 2756, 0x0000000000000000ULL, { 0x30B8DF382853F200ULL, 0x93F763FD9FC69916ULL } }, /* XSUM_XXH128_testdata[8268] */\n    { 2756, 0x000000009E3779B1ULL, { 0x71BF6A281ABF27DCULL, 0x6E82A38E9CADB2CDULL } }, /* XSUM_XXH128_testdata[8269] */\n    { 2756, 0x9E3779B185EBCA8DULL, { 0xE9247B49C5668B31ULL, 0x16D07F766E8E0A1FULL } }, /* XSUM_XXH128_testdata[8270] */\n    { 2757, 0x0000000000000000ULL, { 0x961656946CA43EEBULL, 0x45CBC0B4EC5BC1F4ULL } }, /* XSUM_XXH128_testdata[8271] */\n    { 2757, 0x000000009E3779B1ULL, { 0x206385051FA34B0FULL, 0xE86EAC4D63463555ULL } }, /* XSUM_XXH128_testdata[8272] */\n    { 2757, 0x9E3779B185EBCA8DULL, { 0xEC66FDE043F82FF6ULL, 0x9650D0F0B342B8A8ULL } }, /* XSUM_XXH128_testdata[8273] */\n    { 2758, 0x0000000000000000ULL, { 0xDE25B87C2A769309ULL, 0x0E483C9DE71E42FAULL } }, /* XSUM_XXH128_testdata[8274] */\n    { 2758, 0x000000009E3779B1ULL, { 0x95E8FBDD0DEB9611ULL, 0x7F7A47B2F204CB4EULL } }, /* XSUM_XXH128_testdata[8275] */\n    { 2758, 0x9E3779B185EBCA8DULL, { 0xF79A9EB6D410AD6DULL, 0xA5C2F930C5284726ULL } }, /* XSUM_XXH128_testdata[8276] */\n    { 2759, 0x0000000000000000ULL, { 0xC68D576FAF60E351ULL, 0x137CC05886CBDE35ULL } }, /* XSUM_XXH128_testdata[8277] */\n    { 2759, 0x000000009E3779B1ULL, { 0xD0D901F6EF4F197DULL, 0x954D62A654215F95ULL } }, /* XSUM_XXH128_testdata[8278] */\n    { 2759, 0x9E3779B185EBCA8DULL, { 0xF45E1897BC935ED7ULL, 0x1F01A0E351C8966BULL } }, /* XSUM_XXH128_testdata[8279] */\n    { 2760, 0x0000000000000000ULL, { 0xD4121E03DFE0B422ULL, 0x7056F79C81077BA0ULL } }, /* XSUM_XXH128_testdata[8280] */\n    { 2760, 0x000000009E3779B1ULL, { 0x65EA176999A2CB92ULL, 0x225735B3FB4D99D9ULL } }, /* XSUM_XXH128_testdata[8281] */\n    { 2760, 0x9E3779B185EBCA8DULL, { 0x6D63BC064A5AD595ULL, 0xABC9CCF65B815925ULL } }, /* XSUM_XXH128_testdata[8282] */\n    { 2761, 0x0000000000000000ULL, { 0x6405876AF8FDA8DBULL, 0x8B6C8784007FD332ULL } }, /* XSUM_XXH128_testdata[8283] */\n    { 2761, 0x000000009E3779B1ULL, { 0x5FDD82B2FA851F4DULL, 0x4CD540315574E083ULL } }, /* XSUM_XXH128_testdata[8284] */\n    { 2761, 0x9E3779B185EBCA8DULL, { 0x791A22C29E2A70A1ULL, 0x92B860478F2AF7B9ULL } }, /* XSUM_XXH128_testdata[8285] */\n    { 2762, 0x0000000000000000ULL, { 0x29FB0D9D51C5357CULL, 0x6E74C85534467070ULL } }, /* XSUM_XXH128_testdata[8286] */\n    { 2762, 0x000000009E3779B1ULL, { 0xDF1A2DD7FCACDDD0ULL, 0xF64AC9CA9D804266ULL } }, /* XSUM_XXH128_testdata[8287] */\n    { 2762, 0x9E3779B185EBCA8DULL, { 0xA656D8D374F98FB2ULL, 0xCE9B69B77F08BCA2ULL } }, /* XSUM_XXH128_testdata[8288] */\n    { 2763, 0x0000000000000000ULL, { 0xD385572F3331434BULL, 0x44D7EF65D61B1D93ULL } }, /* XSUM_XXH128_testdata[8289] */\n    { 2763, 0x000000009E3779B1ULL, { 0x0443816CBBE8D408ULL, 0x297CF630D0698811ULL } }, /* XSUM_XXH128_testdata[8290] */\n    { 2763, 0x9E3779B185EBCA8DULL, { 0x93F2DC4243EF4A0DULL, 0xC898566B205F71FFULL } }, /* XSUM_XXH128_testdata[8291] */\n    { 2764, 0x0000000000000000ULL, { 0x6252F1B78A182579ULL, 0xE3BC28CF90B0B9F6ULL } }, /* XSUM_XXH128_testdata[8292] */\n    { 2764, 0x000000009E3779B1ULL, { 0x1DB7C68EAB3EA523ULL, 0xD54B3020480D7652ULL } }, /* XSUM_XXH128_testdata[8293] */\n    { 2764, 0x9E3779B185EBCA8DULL, { 0x9CFAB6B1ED5BC767ULL, 0xC0B82DABC906D5B1ULL } }, /* XSUM_XXH128_testdata[8294] */\n    { 2765, 0x0000000000000000ULL, { 0x608232243E88E9E8ULL, 0x9C631B944DBC5B2DULL } }, /* XSUM_XXH128_testdata[8295] */\n    { 2765, 0x000000009E3779B1ULL, { 0xA371B3309072056BULL, 0x8D966BBDA4330158ULL } }, /* XSUM_XXH128_testdata[8296] */\n    { 2765, 0x9E3779B185EBCA8DULL, { 0x81BEC015284F9D0AULL, 0x8E8ED7812D5782FFULL } }, /* XSUM_XXH128_testdata[8297] */\n    { 2766, 0x0000000000000000ULL, { 0x4CA11F94AA9311FDULL, 0x1049317DC2F35CEFULL } }, /* XSUM_XXH128_testdata[8298] */\n    { 2766, 0x000000009E3779B1ULL, { 0x4C407EE0B958FFF5ULL, 0x8E88AFD7A3137FA0ULL } }, /* XSUM_XXH128_testdata[8299] */\n    { 2766, 0x9E3779B185EBCA8DULL, { 0x757BBBA8832A2596ULL, 0x0DE3E3285D29923CULL } }, /* XSUM_XXH128_testdata[8300] */\n    { 2767, 0x0000000000000000ULL, { 0x89073CEAB2998F7DULL, 0xA8AA09AF2B2C1822ULL } }, /* XSUM_XXH128_testdata[8301] */\n    { 2767, 0x000000009E3779B1ULL, { 0xDD69C00D4C1141ECULL, 0x63B1D60CD5205524ULL } }, /* XSUM_XXH128_testdata[8302] */\n    { 2767, 0x9E3779B185EBCA8DULL, { 0xF50449D89C506855ULL, 0x08FD2B4B96A81C6AULL } }, /* XSUM_XXH128_testdata[8303] */\n    { 2768, 0x0000000000000000ULL, { 0xE1D5CC26D5DA41C4ULL, 0x6BEE01086FAB8C0DULL } }, /* XSUM_XXH128_testdata[8304] */\n    { 2768, 0x000000009E3779B1ULL, { 0x3D4965F1A03979A6ULL, 0xDD34878BB313416BULL } }, /* XSUM_XXH128_testdata[8305] */\n    { 2768, 0x9E3779B185EBCA8DULL, { 0x30E85E6688F63EE0ULL, 0xC9B2D74CA2CE493AULL } }, /* XSUM_XXH128_testdata[8306] */\n    { 2769, 0x0000000000000000ULL, { 0x53123794A8B8D2C1ULL, 0x5FC241C89B817D42ULL } }, /* XSUM_XXH128_testdata[8307] */\n    { 2769, 0x000000009E3779B1ULL, { 0x6CF015BE66CEC504ULL, 0x5A49F66B8CB5FF77ULL } }, /* XSUM_XXH128_testdata[8308] */\n    { 2769, 0x9E3779B185EBCA8DULL, { 0xEDED2614F1AAFCF2ULL, 0x41A86A632EBB215DULL } }, /* XSUM_XXH128_testdata[8309] */\n    { 2770, 0x0000000000000000ULL, { 0xA1AE5426E70C4FFCULL, 0xB551EB53725F0B73ULL } }, /* XSUM_XXH128_testdata[8310] */\n    { 2770, 0x000000009E3779B1ULL, { 0x44D88F6241266689ULL, 0x6C12BBCBA13D162FULL } }, /* XSUM_XXH128_testdata[8311] */\n    { 2770, 0x9E3779B185EBCA8DULL, { 0xB93D989BE8CD54CAULL, 0xE2E6702D9E28E096ULL } }, /* XSUM_XXH128_testdata[8312] */\n    { 2771, 0x0000000000000000ULL, { 0x1D4DA91632EF09EEULL, 0x6B36A8FD2F2A3A87ULL } }, /* XSUM_XXH128_testdata[8313] */\n    { 2771, 0x000000009E3779B1ULL, { 0xE4CB23F3844FD598ULL, 0x6117FE9619814658ULL } }, /* XSUM_XXH128_testdata[8314] */\n    { 2771, 0x9E3779B185EBCA8DULL, { 0xC34E628EC15481A5ULL, 0x1F8F3D252C0664B8ULL } }, /* XSUM_XXH128_testdata[8315] */\n    { 2772, 0x0000000000000000ULL, { 0x9ECE7C8A98D7B2E7ULL, 0x9F411F4A942D2321ULL } }, /* XSUM_XXH128_testdata[8316] */\n    { 2772, 0x000000009E3779B1ULL, { 0x6F0F7F4363862F40ULL, 0xD85A87B8A099F079ULL } }, /* XSUM_XXH128_testdata[8317] */\n    { 2772, 0x9E3779B185EBCA8DULL, { 0x47F5821AAE0F7082ULL, 0x18B156304C718B44ULL } }, /* XSUM_XXH128_testdata[8318] */\n    { 2773, 0x0000000000000000ULL, { 0x6BB09DD7198D07A2ULL, 0x8BF8AE54456E7887ULL } }, /* XSUM_XXH128_testdata[8319] */\n    { 2773, 0x000000009E3779B1ULL, { 0x00C007217449FDEFULL, 0x2CF4CF89B9CDDBB0ULL } }, /* XSUM_XXH128_testdata[8320] */\n    { 2773, 0x9E3779B185EBCA8DULL, { 0xC4E207B5168826C0ULL, 0x781E165130B73D3BULL } }, /* XSUM_XXH128_testdata[8321] */\n    { 2774, 0x0000000000000000ULL, { 0xE25C5745DA05D231ULL, 0xE590D39EC43EBC05ULL } }, /* XSUM_XXH128_testdata[8322] */\n    { 2774, 0x000000009E3779B1ULL, { 0x71062BFEB909A7EBULL, 0x78FA94D471896B61ULL } }, /* XSUM_XXH128_testdata[8323] */\n    { 2774, 0x9E3779B185EBCA8DULL, { 0xE8D3435F6DF7CBEDULL, 0x069E30A28469497DULL } }, /* XSUM_XXH128_testdata[8324] */\n    { 2775, 0x0000000000000000ULL, { 0x1AA5E49A629B1132ULL, 0x1F18D49CAF008E84ULL } }, /* XSUM_XXH128_testdata[8325] */\n    { 2775, 0x000000009E3779B1ULL, { 0x2F42ADF886763919ULL, 0x5E8E6593F7DE2F07ULL } }, /* XSUM_XXH128_testdata[8326] */\n    { 2775, 0x9E3779B185EBCA8DULL, { 0xFBC9277E659170B6ULL, 0x67DACBF47EAD9538ULL } }, /* XSUM_XXH128_testdata[8327] */\n    { 2776, 0x0000000000000000ULL, { 0xDEF60C67EEF33AF9ULL, 0x703E0A3138316E24ULL } }, /* XSUM_XXH128_testdata[8328] */\n    { 2776, 0x000000009E3779B1ULL, { 0x3F1030118A49BA7CULL, 0x07E2DBAE4BBBD545ULL } }, /* XSUM_XXH128_testdata[8329] */\n    { 2776, 0x9E3779B185EBCA8DULL, { 0x6BA7B30A047DA388ULL, 0x3C2EEC3A02E3522DULL } }, /* XSUM_XXH128_testdata[8330] */\n    { 2777, 0x0000000000000000ULL, { 0xD693241CC8A8F08EULL, 0xDB8FF6359AB243D7ULL } }, /* XSUM_XXH128_testdata[8331] */\n    { 2777, 0x000000009E3779B1ULL, { 0x090EC8883D51857EULL, 0xA2710AD6C1A35F4DULL } }, /* XSUM_XXH128_testdata[8332] */\n    { 2777, 0x9E3779B185EBCA8DULL, { 0xB72757341DD668F9ULL, 0x208B2CEA93A190C5ULL } }, /* XSUM_XXH128_testdata[8333] */\n    { 2778, 0x0000000000000000ULL, { 0xC241C02AB68275D1ULL, 0x6A13C9DD6AA4364BULL } }, /* XSUM_XXH128_testdata[8334] */\n    { 2778, 0x000000009E3779B1ULL, { 0x89BDBF396898D9DAULL, 0x164D07DBF625778AULL } }, /* XSUM_XXH128_testdata[8335] */\n    { 2778, 0x9E3779B185EBCA8DULL, { 0xD939281132FB39B2ULL, 0x01E198A52B79A7AAULL } }, /* XSUM_XXH128_testdata[8336] */\n    { 2779, 0x0000000000000000ULL, { 0x23980E87C0E6A1A8ULL, 0x39A5920C145DBF09ULL } }, /* XSUM_XXH128_testdata[8337] */\n    { 2779, 0x000000009E3779B1ULL, { 0x0DA202801E72B009ULL, 0x77639ADB71123066ULL } }, /* XSUM_XXH128_testdata[8338] */\n    { 2779, 0x9E3779B185EBCA8DULL, { 0xFCFFD0BDECDD5A4DULL, 0x022258892D944618ULL } }, /* XSUM_XXH128_testdata[8339] */\n    { 2780, 0x0000000000000000ULL, { 0x4D6E1D1FEB019F6CULL, 0xFA8248028E2D942EULL } }, /* XSUM_XXH128_testdata[8340] */\n    { 2780, 0x000000009E3779B1ULL, { 0x28CBEBBDB623B025ULL, 0xF219F78B31509952ULL } }, /* XSUM_XXH128_testdata[8341] */\n    { 2780, 0x9E3779B185EBCA8DULL, { 0xA7FBD57639340763ULL, 0xBA8DAA1091295185ULL } }, /* XSUM_XXH128_testdata[8342] */\n    { 2781, 0x0000000000000000ULL, { 0xFAB2435B6EB9D069ULL, 0x1A92D3533C3CA2C2ULL } }, /* XSUM_XXH128_testdata[8343] */\n    { 2781, 0x000000009E3779B1ULL, { 0x984811D56E09B326ULL, 0x49151186CD1387D6ULL } }, /* XSUM_XXH128_testdata[8344] */\n    { 2781, 0x9E3779B185EBCA8DULL, { 0x2248F2C9F0E1999BULL, 0xCED2885E397CEBA9ULL } }, /* XSUM_XXH128_testdata[8345] */\n    { 2782, 0x0000000000000000ULL, { 0x05EF981B41DEC457ULL, 0x91945F30AB70AE4DULL } }, /* XSUM_XXH128_testdata[8346] */\n    { 2782, 0x000000009E3779B1ULL, { 0x4D2ABF3CC3B555D8ULL, 0x678A5C7E816853E2ULL } }, /* XSUM_XXH128_testdata[8347] */\n    { 2782, 0x9E3779B185EBCA8DULL, { 0xAFF4964A346B1121ULL, 0xD8149D4AE89F58ABULL } }, /* XSUM_XXH128_testdata[8348] */\n    { 2783, 0x0000000000000000ULL, { 0x64DCA626F718A945ULL, 0xB694766A4A05E24DULL } }, /* XSUM_XXH128_testdata[8349] */\n    { 2783, 0x000000009E3779B1ULL, { 0x04804472505C6267ULL, 0x44078F69CBE091E8ULL } }, /* XSUM_XXH128_testdata[8350] */\n    { 2783, 0x9E3779B185EBCA8DULL, { 0x48DC7C4EA9F0995BULL, 0x76B2233EB6EBAE8DULL } }, /* XSUM_XXH128_testdata[8351] */\n    { 2784, 0x0000000000000000ULL, { 0x6A0DECB019CD9D1FULL, 0x2C1372D524D91FDAULL } }, /* XSUM_XXH128_testdata[8352] */\n    { 2784, 0x000000009E3779B1ULL, { 0x9C40B706AE1ED456ULL, 0x3885415759D89FB8ULL } }, /* XSUM_XXH128_testdata[8353] */\n    { 2784, 0x9E3779B185EBCA8DULL, { 0x28737B55D92BD60BULL, 0xA10E185B8C254B67ULL } }, /* XSUM_XXH128_testdata[8354] */\n    { 2785, 0x0000000000000000ULL, { 0xC1FA2E1BB99625BAULL, 0x24AB32D9B9C0F2B4ULL } }, /* XSUM_XXH128_testdata[8355] */\n    { 2785, 0x000000009E3779B1ULL, { 0xB763663978F0F2A4ULL, 0x0694ADB8B6319D8DULL } }, /* XSUM_XXH128_testdata[8356] */\n    { 2785, 0x9E3779B185EBCA8DULL, { 0xB7882C698A0383C5ULL, 0x6068072BFDC0099CULL } }, /* XSUM_XXH128_testdata[8357] */\n    { 2786, 0x0000000000000000ULL, { 0xBF23BE2BA21C48D5ULL, 0xDA36769D7887A3C5ULL } }, /* XSUM_XXH128_testdata[8358] */\n    { 2786, 0x000000009E3779B1ULL, { 0x735DC7B27EFF050CULL, 0xCEF950D9546DEAF0ULL } }, /* XSUM_XXH128_testdata[8359] */\n    { 2786, 0x9E3779B185EBCA8DULL, { 0x1394CFA56A673081ULL, 0x7A22C59467663858ULL } }, /* XSUM_XXH128_testdata[8360] */\n    { 2787, 0x0000000000000000ULL, { 0xADC591AF19B11864ULL, 0x11F0DC634A0D1ADAULL } }, /* XSUM_XXH128_testdata[8361] */\n    { 2787, 0x000000009E3779B1ULL, { 0x8A2F55E18F34DB68ULL, 0x0603C007860DFD7DULL } }, /* XSUM_XXH128_testdata[8362] */\n    { 2787, 0x9E3779B185EBCA8DULL, { 0x848CE896419C53E8ULL, 0x13F51776279BDBBDULL } }, /* XSUM_XXH128_testdata[8363] */\n    { 2788, 0x0000000000000000ULL, { 0xF4B7D076FEB765F9ULL, 0xB967303B35943986ULL } }, /* XSUM_XXH128_testdata[8364] */\n    { 2788, 0x000000009E3779B1ULL, { 0x4C59122CCA522AA4ULL, 0x9C1392903B4D5A3CULL } }, /* XSUM_XXH128_testdata[8365] */\n    { 2788, 0x9E3779B185EBCA8DULL, { 0x2D970A62183B59FAULL, 0xCDFE6B79B77B6F99ULL } }, /* XSUM_XXH128_testdata[8366] */\n    { 2789, 0x0000000000000000ULL, { 0xE3FAC33EEB9E4B43ULL, 0x9106E646BAB17F7CULL } }, /* XSUM_XXH128_testdata[8367] */\n    { 2789, 0x000000009E3779B1ULL, { 0x52C9004D14F9DC36ULL, 0xE55EE8FA57166599ULL } }, /* XSUM_XXH128_testdata[8368] */\n    { 2789, 0x9E3779B185EBCA8DULL, { 0xE51EA4FC3621CED4ULL, 0xA82D6A91626AB65CULL } }, /* XSUM_XXH128_testdata[8369] */\n    { 2790, 0x0000000000000000ULL, { 0xA1BD080329CBF8B2ULL, 0x7161CADA90ED30DBULL } }, /* XSUM_XXH128_testdata[8370] */\n    { 2790, 0x000000009E3779B1ULL, { 0x4B061B427024F49EULL, 0xD6A2ECC386BDF8D5ULL } }, /* XSUM_XXH128_testdata[8371] */\n    { 2790, 0x9E3779B185EBCA8DULL, { 0xD95400EEA98D4BC7ULL, 0xCC07A8C0547E37D1ULL } }, /* XSUM_XXH128_testdata[8372] */\n    { 2791, 0x0000000000000000ULL, { 0x5858D025CF1FFC7AULL, 0xD76F0A9B5CB7A428ULL } }, /* XSUM_XXH128_testdata[8373] */\n    { 2791, 0x000000009E3779B1ULL, { 0xC4EBAD83F39F8482ULL, 0xA2A09BA8B4041EB2ULL } }, /* XSUM_XXH128_testdata[8374] */\n    { 2791, 0x9E3779B185EBCA8DULL, { 0xEEB3C317B1750030ULL, 0xCDEB874CE0671B47ULL } }, /* XSUM_XXH128_testdata[8375] */\n    { 2792, 0x0000000000000000ULL, { 0xC3CDB2533D838FBAULL, 0xB4FE261DCB4E2247ULL } }, /* XSUM_XXH128_testdata[8376] */\n    { 2792, 0x000000009E3779B1ULL, { 0x4453730D19106B2BULL, 0xE08D1D88A10A00DEULL } }, /* XSUM_XXH128_testdata[8377] */\n    { 2792, 0x9E3779B185EBCA8DULL, { 0x45F3C5DF6BC55CBAULL, 0xCAED23088C8F6C82ULL } }, /* XSUM_XXH128_testdata[8378] */\n    { 2793, 0x0000000000000000ULL, { 0x6A1EED32A35708E9ULL, 0x7F6A2A9A75EDDE42ULL } }, /* XSUM_XXH128_testdata[8379] */\n    { 2793, 0x000000009E3779B1ULL, { 0xB7D741EBB000B1BFULL, 0x746C52702B6F2695ULL } }, /* XSUM_XXH128_testdata[8380] */\n    { 2793, 0x9E3779B185EBCA8DULL, { 0x136058660CE27205ULL, 0xF23B3C1909CF6A95ULL } }, /* XSUM_XXH128_testdata[8381] */\n    { 2794, 0x0000000000000000ULL, { 0x0AB420E5BAC8786BULL, 0x93B5F041A2867879ULL } }, /* XSUM_XXH128_testdata[8382] */\n    { 2794, 0x000000009E3779B1ULL, { 0x22959A55465114C3ULL, 0xA40D8D557C31083AULL } }, /* XSUM_XXH128_testdata[8383] */\n    { 2794, 0x9E3779B185EBCA8DULL, { 0xD8481AA9976853A8ULL, 0x5E18A3D5ECDB098FULL } }, /* XSUM_XXH128_testdata[8384] */\n    { 2795, 0x0000000000000000ULL, { 0x6C3292D057491B10ULL, 0x1EA168458D5F9FEFULL } }, /* XSUM_XXH128_testdata[8385] */\n    { 2795, 0x000000009E3779B1ULL, { 0x138805EF67EC2E69ULL, 0x343F90D5860F40F6ULL } }, /* XSUM_XXH128_testdata[8386] */\n    { 2795, 0x9E3779B185EBCA8DULL, { 0xD689615FD6EBDE33ULL, 0xC092FA2EACB2E567ULL } }, /* XSUM_XXH128_testdata[8387] */\n    { 2796, 0x0000000000000000ULL, { 0xEB47D4162112B62BULL, 0x879ADD15AFB40EEEULL } }, /* XSUM_XXH128_testdata[8388] */\n    { 2796, 0x000000009E3779B1ULL, { 0x54C73D53B799295DULL, 0x6D38491DC84C7419ULL } }, /* XSUM_XXH128_testdata[8389] */\n    { 2796, 0x9E3779B185EBCA8DULL, { 0xA2B84BB91016CBD3ULL, 0xE28867DE7CABD2F4ULL } }, /* XSUM_XXH128_testdata[8390] */\n    { 2797, 0x0000000000000000ULL, { 0x6EBE41CBA6B32EBCULL, 0xB0D518639EC5162BULL } }, /* XSUM_XXH128_testdata[8391] */\n    { 2797, 0x000000009E3779B1ULL, { 0x6498DCA521E3E6B6ULL, 0x5BAA9AB11AF981B5ULL } }, /* XSUM_XXH128_testdata[8392] */\n    { 2797, 0x9E3779B185EBCA8DULL, { 0xD8BFE83A2C863701ULL, 0xFB95E0AD093626C1ULL } }, /* XSUM_XXH128_testdata[8393] */\n    { 2798, 0x0000000000000000ULL, { 0x210D49A6879775D2ULL, 0x2C3F185AD6EAF272ULL } }, /* XSUM_XXH128_testdata[8394] */\n    { 2798, 0x000000009E3779B1ULL, { 0xBF97A8B0E673FFABULL, 0xB24B8C29893A7671ULL } }, /* XSUM_XXH128_testdata[8395] */\n    { 2798, 0x9E3779B185EBCA8DULL, { 0x116FCBE17C5A571CULL, 0xFBB61A6FE91722B2ULL } }, /* XSUM_XXH128_testdata[8396] */\n    { 2799, 0x0000000000000000ULL, { 0x2F5FC4E20EADDE64ULL, 0xF9800461E6A4DB2AULL } }, /* XSUM_XXH128_testdata[8397] */\n    { 2799, 0x000000009E3779B1ULL, { 0x68235CFE27FBA269ULL, 0x723AFC041D8686E7ULL } }, /* XSUM_XXH128_testdata[8398] */\n    { 2799, 0x9E3779B185EBCA8DULL, { 0xE1C0130AB1E55D95ULL, 0x9DED5B492FB24033ULL } }, /* XSUM_XXH128_testdata[8399] */\n    { 2800, 0x0000000000000000ULL, { 0x1B1671FFCE9AC043ULL, 0xD987F9DD4FBE37E3ULL } }, /* XSUM_XXH128_testdata[8400] */\n    { 2800, 0x000000009E3779B1ULL, { 0x6FB1D3E4AFD4AFA6ULL, 0xCD0173D162997830ULL } }, /* XSUM_XXH128_testdata[8401] */\n    { 2800, 0x9E3779B185EBCA8DULL, { 0x02BD1944F810DD92ULL, 0x624FEF870EA6457BULL } }, /* XSUM_XXH128_testdata[8402] */\n    { 2801, 0x0000000000000000ULL, { 0x9830CF8F663EC7EDULL, 0x2E85368B04186622ULL } }, /* XSUM_XXH128_testdata[8403] */\n    { 2801, 0x000000009E3779B1ULL, { 0xA3724FA877C7617BULL, 0xA2EAB16FF45B0603ULL } }, /* XSUM_XXH128_testdata[8404] */\n    { 2801, 0x9E3779B185EBCA8DULL, { 0xD472EFED50CEC5C4ULL, 0x480E00602EFB6669ULL } }, /* XSUM_XXH128_testdata[8405] */\n    { 2802, 0x0000000000000000ULL, { 0xABDD355871184D94ULL, 0xC2ED9E8641B91E81ULL } }, /* XSUM_XXH128_testdata[8406] */\n    { 2802, 0x000000009E3779B1ULL, { 0x3E712D15D4B1F46CULL, 0xF56C22D2AD4C79AFULL } }, /* XSUM_XXH128_testdata[8407] */\n    { 2802, 0x9E3779B185EBCA8DULL, { 0x198D10AA902453B7ULL, 0x75D348431910E5E5ULL } }, /* XSUM_XXH128_testdata[8408] */\n    { 2803, 0x0000000000000000ULL, { 0x9465C024549ACF59ULL, 0xF9F7E3D2D5F0AF86ULL } }, /* XSUM_XXH128_testdata[8409] */\n    { 2803, 0x000000009E3779B1ULL, { 0x3F0E0A1F0F579199ULL, 0x984C426D9DF4D9F2ULL } }, /* XSUM_XXH128_testdata[8410] */\n    { 2803, 0x9E3779B185EBCA8DULL, { 0x9DFFEAE566EFD06DULL, 0x85D8B88812D7A5D3ULL } }, /* XSUM_XXH128_testdata[8411] */\n    { 2804, 0x0000000000000000ULL, { 0x19B8C0A283BAE743ULL, 0x22E70B272D7A2BD5ULL } }, /* XSUM_XXH128_testdata[8412] */\n    { 2804, 0x000000009E3779B1ULL, { 0x74884BAA72CF7E32ULL, 0x5A883B3D4112B36FULL } }, /* XSUM_XXH128_testdata[8413] */\n    { 2804, 0x9E3779B185EBCA8DULL, { 0x22582296967DA4F2ULL, 0xD730A0C85A544403ULL } }, /* XSUM_XXH128_testdata[8414] */\n    { 2805, 0x0000000000000000ULL, { 0xEA1789858301C007ULL, 0xEDA3BD1ED4A9938AULL } }, /* XSUM_XXH128_testdata[8415] */\n    { 2805, 0x000000009E3779B1ULL, { 0x79420CFCD433D0A2ULL, 0x22C1CF6B90FFB96CULL } }, /* XSUM_XXH128_testdata[8416] */\n    { 2805, 0x9E3779B185EBCA8DULL, { 0x9DA7AED963685999ULL, 0x027397A671CA9DCEULL } }, /* XSUM_XXH128_testdata[8417] */\n    { 2806, 0x0000000000000000ULL, { 0x41469656B5D06BE5ULL, 0x467EA3CFC5194A35ULL } }, /* XSUM_XXH128_testdata[8418] */\n    { 2806, 0x000000009E3779B1ULL, { 0xAE39C1CA82EBCEB8ULL, 0xA2E4594172AFEAFAULL } }, /* XSUM_XXH128_testdata[8419] */\n    { 2806, 0x9E3779B185EBCA8DULL, { 0x6CC73C1166A2ABA9ULL, 0x57EF4D87367FC4F1ULL } }, /* XSUM_XXH128_testdata[8420] */\n    { 2807, 0x0000000000000000ULL, { 0x7273ED17287001B5ULL, 0x399BF5935443533EULL } }, /* XSUM_XXH128_testdata[8421] */\n    { 2807, 0x000000009E3779B1ULL, { 0xE0ABE9FDB81867A6ULL, 0x0254B2A7529B48BEULL } }, /* XSUM_XXH128_testdata[8422] */\n    { 2807, 0x9E3779B185EBCA8DULL, { 0x831ADC73FFCDF6F9ULL, 0xB24E7ED32648C98FULL } }, /* XSUM_XXH128_testdata[8423] */\n    { 2808, 0x0000000000000000ULL, { 0xB9DEA446174EB818ULL, 0x7983CEB3DDF73DF1ULL } }, /* XSUM_XXH128_testdata[8424] */\n    { 2808, 0x000000009E3779B1ULL, { 0xD2B8E6AAD63D33B8ULL, 0x63230816DBCEC1A2ULL } }, /* XSUM_XXH128_testdata[8425] */\n    { 2808, 0x9E3779B185EBCA8DULL, { 0x84DDF73FDDCB5ED8ULL, 0xE8870AFF08A6693AULL } }, /* XSUM_XXH128_testdata[8426] */\n    { 2809, 0x0000000000000000ULL, { 0x8AC31E45973AECC1ULL, 0xF4BA04A87E839A33ULL } }, /* XSUM_XXH128_testdata[8427] */\n    { 2809, 0x000000009E3779B1ULL, { 0x0530ADFB30B24584ULL, 0xA2DEB2B57F4DC655ULL } }, /* XSUM_XXH128_testdata[8428] */\n    { 2809, 0x9E3779B185EBCA8DULL, { 0x51AA142CF757DBD0ULL, 0x7F5DBB1570495C9CULL } }, /* XSUM_XXH128_testdata[8429] */\n    { 2810, 0x0000000000000000ULL, { 0xB6B2435E7436BB07ULL, 0x8FD1664E9028188FULL } }, /* XSUM_XXH128_testdata[8430] */\n    { 2810, 0x000000009E3779B1ULL, { 0x25A31100DE61298AULL, 0x8418410B181B8219ULL } }, /* XSUM_XXH128_testdata[8431] */\n    { 2810, 0x9E3779B185EBCA8DULL, { 0x045F8087ED8F321FULL, 0x228DB2B20D36DB12ULL } }, /* XSUM_XXH128_testdata[8432] */\n    { 2811, 0x0000000000000000ULL, { 0x932BE6F1A5AFB020ULL, 0xAA764C1D98B3B26CULL } }, /* XSUM_XXH128_testdata[8433] */\n    { 2811, 0x000000009E3779B1ULL, { 0x411426EA6BF035E5ULL, 0x3CFAA6571C783682ULL } }, /* XSUM_XXH128_testdata[8434] */\n    { 2811, 0x9E3779B185EBCA8DULL, { 0x96480703F1516151ULL, 0x0DEA22D9F4760643ULL } }, /* XSUM_XXH128_testdata[8435] */\n    { 2812, 0x0000000000000000ULL, { 0x8E0EA93D3213FB93ULL, 0xCA30FF0A6B048A61ULL } }, /* XSUM_XXH128_testdata[8436] */\n    { 2812, 0x000000009E3779B1ULL, { 0x9B6768C351D01868ULL, 0xEE6E568A5E5AC55CULL } }, /* XSUM_XXH128_testdata[8437] */\n    { 2812, 0x9E3779B185EBCA8DULL, { 0xCE0158085EB13056ULL, 0x938DA89F0597BD2DULL } }, /* XSUM_XXH128_testdata[8438] */\n    { 2813, 0x0000000000000000ULL, { 0x4BE7E6FB4F03AD46ULL, 0x3351F1B252B52F2FULL } }, /* XSUM_XXH128_testdata[8439] */\n    { 2813, 0x000000009E3779B1ULL, { 0xE5A59F1D31EDC614ULL, 0x53855DC8F89225F6ULL } }, /* XSUM_XXH128_testdata[8440] */\n    { 2813, 0x9E3779B185EBCA8DULL, { 0x2EB0F58BCD59E94DULL, 0xED5083D54631A3EEULL } }, /* XSUM_XXH128_testdata[8441] */\n    { 2814, 0x0000000000000000ULL, { 0x63AC6B0C5EB8E548ULL, 0xBC74A0770AFE7DAEULL } }, /* XSUM_XXH128_testdata[8442] */\n    { 2814, 0x000000009E3779B1ULL, { 0xE931859E2893A88CULL, 0xA7AD5D8AB590CBFFULL } }, /* XSUM_XXH128_testdata[8443] */\n    { 2814, 0x9E3779B185EBCA8DULL, { 0xA4968260C0175247ULL, 0x420C4C7F83658C26ULL } }, /* XSUM_XXH128_testdata[8444] */\n    { 2815, 0x0000000000000000ULL, { 0x7D160EA25A0BF263ULL, 0x1ED397FF084A6060ULL } }, /* XSUM_XXH128_testdata[8445] */\n    { 2815, 0x000000009E3779B1ULL, { 0x1FA9AAFE47730164ULL, 0xD182C7ADD8D3245FULL } }, /* XSUM_XXH128_testdata[8446] */\n    { 2815, 0x9E3779B185EBCA8DULL, { 0x04C38423EDB1143DULL, 0x13B755EFD1993CCAULL } }, /* XSUM_XXH128_testdata[8447] */\n    { 2816, 0x0000000000000000ULL, { 0x7DD9AD11BF74219BULL, 0x1004EAEB0207F911ULL } }, /* XSUM_XXH128_testdata[8448] */\n    { 2816, 0x000000009E3779B1ULL, { 0x16BCDF0B6F332795ULL, 0x6111F9E7F0652B54ULL } }, /* XSUM_XXH128_testdata[8449] */\n    { 2816, 0x9E3779B185EBCA8DULL, { 0x5132595AB0718E60ULL, 0xEE3FD8D0DAD10314ULL } }, /* XSUM_XXH128_testdata[8450] */\n    { 2817, 0x0000000000000000ULL, { 0xACE84D8987BC9A3FULL, 0x8BD1947DB627DBCAULL } }, /* XSUM_XXH128_testdata[8451] */\n    { 2817, 0x000000009E3779B1ULL, { 0x5D2781F628C62962ULL, 0x9CC84ED9C0FF95A8ULL } }, /* XSUM_XXH128_testdata[8452] */\n    { 2817, 0x9E3779B185EBCA8DULL, { 0x09F4E8C5970DFC0FULL, 0x138299337CEAE854ULL } }, /* XSUM_XXH128_testdata[8453] */\n    { 2818, 0x0000000000000000ULL, { 0x782E18AA3283A000ULL, 0xE5B5CE068B97969FULL } }, /* XSUM_XXH128_testdata[8454] */\n    { 2818, 0x000000009E3779B1ULL, { 0xB4FB7CF2ABE3D076ULL, 0x5C44D7FFDA4E1D24ULL } }, /* XSUM_XXH128_testdata[8455] */\n    { 2818, 0x9E3779B185EBCA8DULL, { 0xC1DC5000C515B924ULL, 0xD48783DCEBB89F3AULL } }, /* XSUM_XXH128_testdata[8456] */\n    { 2819, 0x0000000000000000ULL, { 0x506C12F0559AC04CULL, 0x362CFA0B4EDB4F90ULL } }, /* XSUM_XXH128_testdata[8457] */\n    { 2819, 0x000000009E3779B1ULL, { 0x4504753CDA1895FEULL, 0xC6DE700208703AE6ULL } }, /* XSUM_XXH128_testdata[8458] */\n    { 2819, 0x9E3779B185EBCA8DULL, { 0xF5E0E9A9A29AD075ULL, 0xAE281467D394AACBULL } }, /* XSUM_XXH128_testdata[8459] */\n    { 2820, 0x0000000000000000ULL, { 0xEFBC8B5CFA8BE0DDULL, 0x3DA428B3E2B50251ULL } }, /* XSUM_XXH128_testdata[8460] */\n    { 2820, 0x000000009E3779B1ULL, { 0x6C321DEB8196A423ULL, 0x839A742AAF9FF585ULL } }, /* XSUM_XXH128_testdata[8461] */\n    { 2820, 0x9E3779B185EBCA8DULL, { 0x49D6E8A233638F01ULL, 0xD799067AAC03A60FULL } }, /* XSUM_XXH128_testdata[8462] */\n    { 2821, 0x0000000000000000ULL, { 0x1CF5B9AD7407EBF6ULL, 0x00B104A65B647A2BULL } }, /* XSUM_XXH128_testdata[8463] */\n    { 2821, 0x000000009E3779B1ULL, { 0x4B3DFDA45D34EC8EULL, 0xA2909B562F302319ULL } }, /* XSUM_XXH128_testdata[8464] */\n    { 2821, 0x9E3779B185EBCA8DULL, { 0x17B9E24D08DFE8AAULL, 0x78BF56E1F1C455DFULL } }, /* XSUM_XXH128_testdata[8465] */\n    { 2822, 0x0000000000000000ULL, { 0x449C2F455774B179ULL, 0xDB83BAE421E5AB03ULL } }, /* XSUM_XXH128_testdata[8466] */\n    { 2822, 0x000000009E3779B1ULL, { 0x428E6FAC68F73E5BULL, 0x787EE8FF713EF1A1ULL } }, /* XSUM_XXH128_testdata[8467] */\n    { 2822, 0x9E3779B185EBCA8DULL, { 0x31796BFCBBE3115CULL, 0x0F36B12D07BC6C5DULL } }, /* XSUM_XXH128_testdata[8468] */\n    { 2823, 0x0000000000000000ULL, { 0x50AFDAA39AA339C2ULL, 0xF0DC4AD5B1ACF1EDULL } }, /* XSUM_XXH128_testdata[8469] */\n    { 2823, 0x000000009E3779B1ULL, { 0xC72D735D35EFF567ULL, 0x784E9506737F9E33ULL } }, /* XSUM_XXH128_testdata[8470] */\n    { 2823, 0x9E3779B185EBCA8DULL, { 0x1F384BEE77C93C38ULL, 0xE00A7272F83C291DULL } }, /* XSUM_XXH128_testdata[8471] */\n    { 2824, 0x0000000000000000ULL, { 0xC2D49E3821E9E5F5ULL, 0x4379224D240FD8AEULL } }, /* XSUM_XXH128_testdata[8472] */\n    { 2824, 0x000000009E3779B1ULL, { 0x0C8A9D04A2961E82ULL, 0x0D6DA7334DB6D9F1ULL } }, /* XSUM_XXH128_testdata[8473] */\n    { 2824, 0x9E3779B185EBCA8DULL, { 0x8EDC26F2F9D932BBULL, 0x757E3273E4D5C834ULL } }, /* XSUM_XXH128_testdata[8474] */\n    { 2825, 0x0000000000000000ULL, { 0xB672CE5DCEDBED8FULL, 0x97DB7AFDF0479A37ULL } }, /* XSUM_XXH128_testdata[8475] */\n    { 2825, 0x000000009E3779B1ULL, { 0x9FE3A627D41AAC4AULL, 0x606614018D0DA168ULL } }, /* XSUM_XXH128_testdata[8476] */\n    { 2825, 0x9E3779B185EBCA8DULL, { 0x6782D661DF360E87ULL, 0xD8AA37CB8927F3ECULL } }, /* XSUM_XXH128_testdata[8477] */\n    { 2826, 0x0000000000000000ULL, { 0x0020BE95E992DBD4ULL, 0xD9C80277108AA243ULL } }, /* XSUM_XXH128_testdata[8478] */\n    { 2826, 0x000000009E3779B1ULL, { 0xFCB6AFD2E3000F44ULL, 0x9E4AF4BFCDA8142BULL } }, /* XSUM_XXH128_testdata[8479] */\n    { 2826, 0x9E3779B185EBCA8DULL, { 0x383D0140E3C362EBULL, 0xAD8D58E00C5292EAULL } }, /* XSUM_XXH128_testdata[8480] */\n    { 2827, 0x0000000000000000ULL, { 0xDB0BB50E3BBA26C8ULL, 0xAA3C0B34D8611BD3ULL } }, /* XSUM_XXH128_testdata[8481] */\n    { 2827, 0x000000009E3779B1ULL, { 0xE1A9110B53552D21ULL, 0xF52089F0C69F3639ULL } }, /* XSUM_XXH128_testdata[8482] */\n    { 2827, 0x9E3779B185EBCA8DULL, { 0x9F59C9D3C5999E83ULL, 0xB30095B8FF1A3816ULL } }, /* XSUM_XXH128_testdata[8483] */\n    { 2828, 0x0000000000000000ULL, { 0xFE45A73BBC75F478ULL, 0x6526066106EE13DFULL } }, /* XSUM_XXH128_testdata[8484] */\n    { 2828, 0x000000009E3779B1ULL, { 0xB4F0D50D35FA26F0ULL, 0x8E509005DB26B4D0ULL } }, /* XSUM_XXH128_testdata[8485] */\n    { 2828, 0x9E3779B185EBCA8DULL, { 0xCFFADC847709337EULL, 0xF9FE1E94D9897416ULL } }, /* XSUM_XXH128_testdata[8486] */\n    { 2829, 0x0000000000000000ULL, { 0x13B8EC0BAB66B4B3ULL, 0x4794DB171A581BD1ULL } }, /* XSUM_XXH128_testdata[8487] */\n    { 2829, 0x000000009E3779B1ULL, { 0x59AEA158E3F64012ULL, 0x81DDB6CD869FE5FBULL } }, /* XSUM_XXH128_testdata[8488] */\n    { 2829, 0x9E3779B185EBCA8DULL, { 0x30834E9FDD028750ULL, 0x9FA5B647457F1A59ULL } }, /* XSUM_XXH128_testdata[8489] */\n    { 2830, 0x0000000000000000ULL, { 0x043869A252B753D6ULL, 0x7B866E633A11AF9EULL } }, /* XSUM_XXH128_testdata[8490] */\n    { 2830, 0x000000009E3779B1ULL, { 0xFA20091D825A8EF7ULL, 0xD826D6EE3D565A02ULL } }, /* XSUM_XXH128_testdata[8491] */\n    { 2830, 0x9E3779B185EBCA8DULL, { 0x4A943340D1C8711FULL, 0x838DB8F976FCB68DULL } }, /* XSUM_XXH128_testdata[8492] */\n    { 2831, 0x0000000000000000ULL, { 0xF6AFDECD4341D20DULL, 0xE05D2F73A0FEB454ULL } }, /* XSUM_XXH128_testdata[8493] */\n    { 2831, 0x000000009E3779B1ULL, { 0xFD714DEAF3EA85BCULL, 0x0963E84AF741B79EULL } }, /* XSUM_XXH128_testdata[8494] */\n    { 2831, 0x9E3779B185EBCA8DULL, { 0x3D75507F9F47D29DULL, 0xE990CDCAC0349A70ULL } }, /* XSUM_XXH128_testdata[8495] */\n    { 2832, 0x0000000000000000ULL, { 0xD83CA294E171861FULL, 0x69A6C651C6C022A6ULL } }, /* XSUM_XXH128_testdata[8496] */\n    { 2832, 0x000000009E3779B1ULL, { 0x7B07A69D7350AD83ULL, 0x2BA7E2CB429C9213ULL } }, /* XSUM_XXH128_testdata[8497] */\n    { 2832, 0x9E3779B185EBCA8DULL, { 0x28687D3C9FC4DBBBULL, 0x3430722A9C88BA08ULL } }, /* XSUM_XXH128_testdata[8498] */\n    { 2833, 0x0000000000000000ULL, { 0x2796F656449258E9ULL, 0xC352C530477A9D4FULL } }, /* XSUM_XXH128_testdata[8499] */\n    { 2833, 0x000000009E3779B1ULL, { 0x4707FF1EBDC81924ULL, 0xCC66370366C54101ULL } }, /* XSUM_XXH128_testdata[8500] */\n    { 2833, 0x9E3779B185EBCA8DULL, { 0xF99981E1437C06CCULL, 0x142AF4D1EC7CC9A0ULL } }, /* XSUM_XXH128_testdata[8501] */\n    { 2834, 0x0000000000000000ULL, { 0x26621BAC8504AAAAULL, 0xDA01E11F6CF80996ULL } }, /* XSUM_XXH128_testdata[8502] */\n    { 2834, 0x000000009E3779B1ULL, { 0x287637B8983914C9ULL, 0x8B5119A8C0172539ULL } }, /* XSUM_XXH128_testdata[8503] */\n    { 2834, 0x9E3779B185EBCA8DULL, { 0xB2E56CCABE2B5225ULL, 0x11D420158D368249ULL } }, /* XSUM_XXH128_testdata[8504] */\n    { 2835, 0x0000000000000000ULL, { 0x12E8A2F03E702055ULL, 0x9025C80BFE099A08ULL } }, /* XSUM_XXH128_testdata[8505] */\n    { 2835, 0x000000009E3779B1ULL, { 0x67A8A2BBFD70E9DDULL, 0x75F8C82CFEEEA345ULL } }, /* XSUM_XXH128_testdata[8506] */\n    { 2835, 0x9E3779B185EBCA8DULL, { 0xDF931C2E62D72D1EULL, 0xF57E20493D5D9568ULL } }, /* XSUM_XXH128_testdata[8507] */\n    { 2836, 0x0000000000000000ULL, { 0xB319ECC965CA289FULL, 0x47B0DCA4DB3FE997ULL } }, /* XSUM_XXH128_testdata[8508] */\n    { 2836, 0x000000009E3779B1ULL, { 0x88A57DEB7DD2ADBAULL, 0x1926329EAFF5AA66ULL } }, /* XSUM_XXH128_testdata[8509] */\n    { 2836, 0x9E3779B185EBCA8DULL, { 0xD3EB886D9C44442DULL, 0x968C791EC6036647ULL } }, /* XSUM_XXH128_testdata[8510] */\n    { 2837, 0x0000000000000000ULL, { 0xD23665D737269144ULL, 0x3F1E33CA54B9DDBEULL } }, /* XSUM_XXH128_testdata[8511] */\n    { 2837, 0x000000009E3779B1ULL, { 0xED536CC822FD0426ULL, 0x6D510FDC1E7B27E2ULL } }, /* XSUM_XXH128_testdata[8512] */\n    { 2837, 0x9E3779B185EBCA8DULL, { 0x0194403601289C2CULL, 0x886FC1AA27E461E8ULL } }, /* XSUM_XXH128_testdata[8513] */\n    { 2838, 0x0000000000000000ULL, { 0xE702BA54A74FA497ULL, 0xFCBC76CBB1CCE0C0ULL } }, /* XSUM_XXH128_testdata[8514] */\n    { 2838, 0x000000009E3779B1ULL, { 0x34274AB10DDFD9EEULL, 0x91F624287404F2A5ULL } }, /* XSUM_XXH128_testdata[8515] */\n    { 2838, 0x9E3779B185EBCA8DULL, { 0x5769316EF3DA366CULL, 0xF28CB2C194596AA5ULL } }, /* XSUM_XXH128_testdata[8516] */\n    { 2839, 0x0000000000000000ULL, { 0xBE4ECDF9E0A0E838ULL, 0xA2FC627E2E28E29DULL } }, /* XSUM_XXH128_testdata[8517] */\n    { 2839, 0x000000009E3779B1ULL, { 0xC1FD6D1397596815ULL, 0x21FF9654BB8B3E86ULL } }, /* XSUM_XXH128_testdata[8518] */\n    { 2839, 0x9E3779B185EBCA8DULL, { 0x5C887FAFDC1DC215ULL, 0x563B38FB281CAAF1ULL } }, /* XSUM_XXH128_testdata[8519] */\n    { 2840, 0x0000000000000000ULL, { 0x3FD70D2173444B7DULL, 0x4C3518166546ADDDULL } }, /* XSUM_XXH128_testdata[8520] */\n    { 2840, 0x000000009E3779B1ULL, { 0xD37AFDE5BD82CC15ULL, 0x45534542D10DDEE1ULL } }, /* XSUM_XXH128_testdata[8521] */\n    { 2840, 0x9E3779B185EBCA8DULL, { 0xB3AE4E046EBB1950ULL, 0x105CA133B7DDF04BULL } }, /* XSUM_XXH128_testdata[8522] */\n    { 2841, 0x0000000000000000ULL, { 0x6BC356BA1DAA80E8ULL, 0x9BFD95164D09A95EULL } }, /* XSUM_XXH128_testdata[8523] */\n    { 2841, 0x000000009E3779B1ULL, { 0xC2BE683D281525A1ULL, 0x5D6A44722F3AD04CULL } }, /* XSUM_XXH128_testdata[8524] */\n    { 2841, 0x9E3779B185EBCA8DULL, { 0x728EDAD0E00862BCULL, 0x2B6282C06DA5377BULL } }, /* XSUM_XXH128_testdata[8525] */\n    { 2842, 0x0000000000000000ULL, { 0x7C9F96FA9AEFA04DULL, 0x61976D6F8EFCAA50ULL } }, /* XSUM_XXH128_testdata[8526] */\n    { 2842, 0x000000009E3779B1ULL, { 0xC392784DFD345EB4ULL, 0xA2496E32DA6C79AFULL } }, /* XSUM_XXH128_testdata[8527] */\n    { 2842, 0x9E3779B185EBCA8DULL, { 0xC18AF3EC4472D298ULL, 0xE23575522297ED3DULL } }, /* XSUM_XXH128_testdata[8528] */\n    { 2843, 0x0000000000000000ULL, { 0x64E3B33E887DFBDAULL, 0xF6AAE93F2D39D940ULL } }, /* XSUM_XXH128_testdata[8529] */\n    { 2843, 0x000000009E3779B1ULL, { 0xB3250F7935B27433ULL, 0xADC3AD1F34F9393FULL } }, /* XSUM_XXH128_testdata[8530] */\n    { 2843, 0x9E3779B185EBCA8DULL, { 0x64F8EA1F92A54193ULL, 0xF3B9B4BAEED0D712ULL } }, /* XSUM_XXH128_testdata[8531] */\n    { 2844, 0x0000000000000000ULL, { 0xCEB1C3EAA134F4E9ULL, 0xB865A6D7C715F82EULL } }, /* XSUM_XXH128_testdata[8532] */\n    { 2844, 0x000000009E3779B1ULL, { 0xF5E01ADD7FCC4E66ULL, 0xC8A72A3827DAE9A9ULL } }, /* XSUM_XXH128_testdata[8533] */\n    { 2844, 0x9E3779B185EBCA8DULL, { 0x896F0580B69753AAULL, 0x7293826D689DE51EULL } }, /* XSUM_XXH128_testdata[8534] */\n    { 2845, 0x0000000000000000ULL, { 0x5DDA1A2241F53771ULL, 0xEA9E591C5356A359ULL } }, /* XSUM_XXH128_testdata[8535] */\n    { 2845, 0x000000009E3779B1ULL, { 0xF626E55788653E4EULL, 0xF4C8BA0E7F9EE1DFULL } }, /* XSUM_XXH128_testdata[8536] */\n    { 2845, 0x9E3779B185EBCA8DULL, { 0xEB8500517B953A49ULL, 0x47819BC917CA8397ULL } }, /* XSUM_XXH128_testdata[8537] */\n    { 2846, 0x0000000000000000ULL, { 0x37327FF81F7BA9C2ULL, 0x621ED143D00BC1E1ULL } }, /* XSUM_XXH128_testdata[8538] */\n    { 2846, 0x000000009E3779B1ULL, { 0x8A36216601B0F7F2ULL, 0x4AAE8E33A461B918ULL } }, /* XSUM_XXH128_testdata[8539] */\n    { 2846, 0x9E3779B185EBCA8DULL, { 0x0AF45F16D15A419DULL, 0xACA099926C0CBAF8ULL } }, /* XSUM_XXH128_testdata[8540] */\n    { 2847, 0x0000000000000000ULL, { 0xDE608449A6A9121BULL, 0x141B0E7B6BC79A45ULL } }, /* XSUM_XXH128_testdata[8541] */\n    { 2847, 0x000000009E3779B1ULL, { 0x7CE084D8A76EB101ULL, 0x4C9A466CFC49F076ULL } }, /* XSUM_XXH128_testdata[8542] */\n    { 2847, 0x9E3779B185EBCA8DULL, { 0x8DCA4A69A796563FULL, 0x155C898A72E8EBF5ULL } }, /* XSUM_XXH128_testdata[8543] */\n    { 2848, 0x0000000000000000ULL, { 0x6D42B73340789D60ULL, 0xEFF20932A0919094ULL } }, /* XSUM_XXH128_testdata[8544] */\n    { 2848, 0x000000009E3779B1ULL, { 0x1E4AC3D566820972ULL, 0xA312B9FA4A221448ULL } }, /* XSUM_XXH128_testdata[8545] */\n    { 2848, 0x9E3779B185EBCA8DULL, { 0x44B45E0C589CCDDFULL, 0x8FCD8A6D55107681ULL } }, /* XSUM_XXH128_testdata[8546] */\n    { 2849, 0x0000000000000000ULL, { 0x8A3BB3A77A6748E5ULL, 0x33B8598145D18ECFULL } }, /* XSUM_XXH128_testdata[8547] */\n    { 2849, 0x000000009E3779B1ULL, { 0x4F83A99484C728B5ULL, 0x94CDC30546A919D0ULL } }, /* XSUM_XXH128_testdata[8548] */\n    { 2849, 0x9E3779B185EBCA8DULL, { 0x7118AB2C4762154CULL, 0xA5AC0484D4114D7DULL } }, /* XSUM_XXH128_testdata[8549] */\n    { 2850, 0x0000000000000000ULL, { 0x2C074FADAFB7E9CEULL, 0x4A5B88E37F48A54AULL } }, /* XSUM_XXH128_testdata[8550] */\n    { 2850, 0x000000009E3779B1ULL, { 0x421C6F70B242CB88ULL, 0x8484D10278615AEBULL } }, /* XSUM_XXH128_testdata[8551] */\n    { 2850, 0x9E3779B185EBCA8DULL, { 0x7294E9D3D4CD08FDULL, 0xA00318903B891DEBULL } }, /* XSUM_XXH128_testdata[8552] */\n    { 2851, 0x0000000000000000ULL, { 0x8861A8A47A2F964BULL, 0x32F65A30D7483871ULL } }, /* XSUM_XXH128_testdata[8553] */\n    { 2851, 0x000000009E3779B1ULL, { 0xA9D2FB260D98ED5FULL, 0xA980C4EB23519506ULL } }, /* XSUM_XXH128_testdata[8554] */\n    { 2851, 0x9E3779B185EBCA8DULL, { 0xBE0B90B85FF50DFAULL, 0x2CD9778AF862CB69ULL } }, /* XSUM_XXH128_testdata[8555] */\n    { 2852, 0x0000000000000000ULL, { 0x22E6F6001F4531EAULL, 0x70486A400EEA8B51ULL } }, /* XSUM_XXH128_testdata[8556] */\n    { 2852, 0x000000009E3779B1ULL, { 0xDD5AF9269C9AC102ULL, 0x70F93BC1B146E619ULL } }, /* XSUM_XXH128_testdata[8557] */\n    { 2852, 0x9E3779B185EBCA8DULL, { 0x52F2F562BE1BE088ULL, 0x9AE3881107C09FDFULL } }, /* XSUM_XXH128_testdata[8558] */\n    { 2853, 0x0000000000000000ULL, { 0x80E1EAB3C1F77681ULL, 0x2A0E93F5C913DF9BULL } }, /* XSUM_XXH128_testdata[8559] */\n    { 2853, 0x000000009E3779B1ULL, { 0x734953A2E0F41D40ULL, 0x4AE5945D861B4DA5ULL } }, /* XSUM_XXH128_testdata[8560] */\n    { 2853, 0x9E3779B185EBCA8DULL, { 0xCAC7242BCDD7EB8EULL, 0xAA897C158CF1E820ULL } }, /* XSUM_XXH128_testdata[8561] */\n    { 2854, 0x0000000000000000ULL, { 0x4A7671FDCE297BBEULL, 0xA6FF579DECCD9963ULL } }, /* XSUM_XXH128_testdata[8562] */\n    { 2854, 0x000000009E3779B1ULL, { 0x062B41AEE735863EULL, 0x418DE967092F70A2ULL } }, /* XSUM_XXH128_testdata[8563] */\n    { 2854, 0x9E3779B185EBCA8DULL, { 0x259E93D62E7EF2A1ULL, 0x30E7BB92D193821AULL } }, /* XSUM_XXH128_testdata[8564] */\n    { 2855, 0x0000000000000000ULL, { 0x0A49C4ACDDA4DE33ULL, 0x0503314024AE180EULL } }, /* XSUM_XXH128_testdata[8565] */\n    { 2855, 0x000000009E3779B1ULL, { 0x39E137B7F2E10790ULL, 0x5AA24D8CDB6151E1ULL } }, /* XSUM_XXH128_testdata[8566] */\n    { 2855, 0x9E3779B185EBCA8DULL, { 0x53E4DCD01C5D114EULL, 0x411210C68336AE4FULL } }, /* XSUM_XXH128_testdata[8567] */\n    { 2856, 0x0000000000000000ULL, { 0x6A34FD012D7D379EULL, 0x0E6F85ACEC33EBC4ULL } }, /* XSUM_XXH128_testdata[8568] */\n    { 2856, 0x000000009E3779B1ULL, { 0xEFB3BC35D0B835B8ULL, 0x33A20D7FF90F93D7ULL } }, /* XSUM_XXH128_testdata[8569] */\n    { 2856, 0x9E3779B185EBCA8DULL, { 0x2A09BE56719E22FCULL, 0x3270E0114E716180ULL } }, /* XSUM_XXH128_testdata[8570] */\n    { 2857, 0x0000000000000000ULL, { 0xE833105304C012B9ULL, 0xFA9D6ED7CE1AC75FULL } }, /* XSUM_XXH128_testdata[8571] */\n    { 2857, 0x000000009E3779B1ULL, { 0x92033EC5B876B596ULL, 0x8FB1E7CB1E19DE4FULL } }, /* XSUM_XXH128_testdata[8572] */\n    { 2857, 0x9E3779B185EBCA8DULL, { 0x50E134066756229AULL, 0x4705892E566D6F8AULL } }, /* XSUM_XXH128_testdata[8573] */\n    { 2858, 0x0000000000000000ULL, { 0xA084125D75F93750ULL, 0xC1DEA14D597CF003ULL } }, /* XSUM_XXH128_testdata[8574] */\n    { 2858, 0x000000009E3779B1ULL, { 0x2E2A5ACC3522A5D3ULL, 0x79420B1870292308ULL } }, /* XSUM_XXH128_testdata[8575] */\n    { 2858, 0x9E3779B185EBCA8DULL, { 0x291177B5FD99AF4FULL, 0x1A59426BA3204DB1ULL } }, /* XSUM_XXH128_testdata[8576] */\n    { 2859, 0x0000000000000000ULL, { 0x697C9C5AA1DB3011ULL, 0x1A5095595B521642ULL } }, /* XSUM_XXH128_testdata[8577] */\n    { 2859, 0x000000009E3779B1ULL, { 0xBAF72F093FAC74C2ULL, 0x5D4CC258EF67AAA4ULL } }, /* XSUM_XXH128_testdata[8578] */\n    { 2859, 0x9E3779B185EBCA8DULL, { 0x9111A8EF08BDC86FULL, 0x769188C59A5806DFULL } }, /* XSUM_XXH128_testdata[8579] */\n    { 2860, 0x0000000000000000ULL, { 0xC01BD3A9C8B676ACULL, 0x55EF05BC44B6EFCAULL } }, /* XSUM_XXH128_testdata[8580] */\n    { 2860, 0x000000009E3779B1ULL, { 0xA85B35CD84A0A3E3ULL, 0x4428F147A2B561F8ULL } }, /* XSUM_XXH128_testdata[8581] */\n    { 2860, 0x9E3779B185EBCA8DULL, { 0x065ED12B38BE9194ULL, 0xB0FEE59AD9AC6E87ULL } }, /* XSUM_XXH128_testdata[8582] */\n    { 2861, 0x0000000000000000ULL, { 0xC438B94D48DCAB4EULL, 0x5B5316D910BEB77EULL } }, /* XSUM_XXH128_testdata[8583] */\n    { 2861, 0x000000009E3779B1ULL, { 0xA534CB7048FD7CEBULL, 0xB9DD7D692CD73077ULL } }, /* XSUM_XXH128_testdata[8584] */\n    { 2861, 0x9E3779B185EBCA8DULL, { 0xB95538E5F009C012ULL, 0xB12046A219B3E525ULL } }, /* XSUM_XXH128_testdata[8585] */\n    { 2862, 0x0000000000000000ULL, { 0x8EC74AE7A04D1704ULL, 0x6642B37C7D4BB43FULL } }, /* XSUM_XXH128_testdata[8586] */\n    { 2862, 0x000000009E3779B1ULL, { 0xFE091772FEC4744EULL, 0x0FF5F6E8F9390DE7ULL } }, /* XSUM_XXH128_testdata[8587] */\n    { 2862, 0x9E3779B185EBCA8DULL, { 0x414D2BF6C4ED9503ULL, 0xFE6DB55F230C86F1ULL } }, /* XSUM_XXH128_testdata[8588] */\n    { 2863, 0x0000000000000000ULL, { 0x4CC8AC8D4DEC3B17ULL, 0x575BEA73B854232BULL } }, /* XSUM_XXH128_testdata[8589] */\n    { 2863, 0x000000009E3779B1ULL, { 0xDBA3E720944D1DF1ULL, 0x0B1DAE032B43773BULL } }, /* XSUM_XXH128_testdata[8590] */\n    { 2863, 0x9E3779B185EBCA8DULL, { 0x86405A3ABAFD5616ULL, 0xBB97BF1F52544811ULL } }, /* XSUM_XXH128_testdata[8591] */\n    { 2864, 0x0000000000000000ULL, { 0xAE4B62FFCAEC21CEULL, 0xAB6A65A69D9A5213ULL } }, /* XSUM_XXH128_testdata[8592] */\n    { 2864, 0x000000009E3779B1ULL, { 0x227F9236B9765ED5ULL, 0x3A91D7AA3273C901ULL } }, /* XSUM_XXH128_testdata[8593] */\n    { 2864, 0x9E3779B185EBCA8DULL, { 0x292AE79353E674ECULL, 0x6747D93A644CB607ULL } }, /* XSUM_XXH128_testdata[8594] */\n    { 2865, 0x0000000000000000ULL, { 0x7A1B24D068F5CBA4ULL, 0x69D9E506A6166D86ULL } }, /* XSUM_XXH128_testdata[8595] */\n    { 2865, 0x000000009E3779B1ULL, { 0x7536128D57A8BB59ULL, 0x418A87CA4D553BD6ULL } }, /* XSUM_XXH128_testdata[8596] */\n    { 2865, 0x9E3779B185EBCA8DULL, { 0xFDD9401FEC1AA869ULL, 0x066DDDF7A37BC741ULL } }, /* XSUM_XXH128_testdata[8597] */\n    { 2866, 0x0000000000000000ULL, { 0x45951F249262A503ULL, 0x395A1781ABC22956ULL } }, /* XSUM_XXH128_testdata[8598] */\n    { 2866, 0x000000009E3779B1ULL, { 0x8DFFAB3717860111ULL, 0x5D09CAF594E0838FULL } }, /* XSUM_XXH128_testdata[8599] */\n    { 2866, 0x9E3779B185EBCA8DULL, { 0xD0FA59F2B388526FULL, 0x12C9498C2F9859CEULL } }, /* XSUM_XXH128_testdata[8600] */\n    { 2867, 0x0000000000000000ULL, { 0xF04016338B794411ULL, 0xD987186A25FCC3C8ULL } }, /* XSUM_XXH128_testdata[8601] */\n    { 2867, 0x000000009E3779B1ULL, { 0xF53FD1B3F1C7738CULL, 0x2862217733D0344EULL } }, /* XSUM_XXH128_testdata[8602] */\n    { 2867, 0x9E3779B185EBCA8DULL, { 0xF959B4A6FD455DB0ULL, 0x4ADD960ED69049B1ULL } }, /* XSUM_XXH128_testdata[8603] */\n    { 2868, 0x0000000000000000ULL, { 0x33CD0CF2BFDDA8C7ULL, 0x49517B16E86C3E39ULL } }, /* XSUM_XXH128_testdata[8604] */\n    { 2868, 0x000000009E3779B1ULL, { 0x2E63541FFA4EF79EULL, 0xA49A36ADD06406F1ULL } }, /* XSUM_XXH128_testdata[8605] */\n    { 2868, 0x9E3779B185EBCA8DULL, { 0xA7DCF401D957FC3DULL, 0xAA38A74981D52CC5ULL } }, /* XSUM_XXH128_testdata[8606] */\n    { 2869, 0x0000000000000000ULL, { 0xF6B73BDF3FD3F7C8ULL, 0x8C5936E80C013625ULL } }, /* XSUM_XXH128_testdata[8607] */\n    { 2869, 0x000000009E3779B1ULL, { 0x578B9D5548A362C1ULL, 0x8E70323A9FD933B7ULL } }, /* XSUM_XXH128_testdata[8608] */\n    { 2869, 0x9E3779B185EBCA8DULL, { 0x87EFE8D4501CD8EFULL, 0x17F4F9F325C2537EULL } }, /* XSUM_XXH128_testdata[8609] */\n    { 2870, 0x0000000000000000ULL, { 0x851146CFEFE7A86BULL, 0x1EAB5392A21F576EULL } }, /* XSUM_XXH128_testdata[8610] */\n    { 2870, 0x000000009E3779B1ULL, { 0x9206DEC0B8EAE0FBULL, 0x8E1376486F323E0FULL } }, /* XSUM_XXH128_testdata[8611] */\n    { 2870, 0x9E3779B185EBCA8DULL, { 0xA79C2E2E22ACC8F5ULL, 0xFDB607F4A40E47DAULL } }, /* XSUM_XXH128_testdata[8612] */\n    { 2871, 0x0000000000000000ULL, { 0x3E4C9798133B8D0DULL, 0xD5C5247C7627A3FDULL } }, /* XSUM_XXH128_testdata[8613] */\n    { 2871, 0x000000009E3779B1ULL, { 0xDFC91F000F576FE8ULL, 0x55FA0CF61C0696AFULL } }, /* XSUM_XXH128_testdata[8614] */\n    { 2871, 0x9E3779B185EBCA8DULL, { 0x98EA874578066F8CULL, 0xDED59168E9C99DABULL } }, /* XSUM_XXH128_testdata[8615] */\n    { 2872, 0x0000000000000000ULL, { 0x8ED4D507B1D71E5FULL, 0xD8F91503004FF691ULL } }, /* XSUM_XXH128_testdata[8616] */\n    { 2872, 0x000000009E3779B1ULL, { 0x87E0C319EB18C4DAULL, 0x9EA9829EB426F858ULL } }, /* XSUM_XXH128_testdata[8617] */\n    { 2872, 0x9E3779B185EBCA8DULL, { 0xCFA0AA9C4DC31B33ULL, 0x78950B46F6C07013ULL } }, /* XSUM_XXH128_testdata[8618] */\n    { 2873, 0x0000000000000000ULL, { 0xD7F745B00F4C99C6ULL, 0x3766531F42DB2F09ULL } }, /* XSUM_XXH128_testdata[8619] */\n    { 2873, 0x000000009E3779B1ULL, { 0x1D829B37761EA98BULL, 0xD73F6D03A134F936ULL } }, /* XSUM_XXH128_testdata[8620] */\n    { 2873, 0x9E3779B185EBCA8DULL, { 0xA15EE2B199D447DAULL, 0xEBEF9B51D849D083ULL } }, /* XSUM_XXH128_testdata[8621] */\n    { 2874, 0x0000000000000000ULL, { 0x360C5493162E6139ULL, 0x24FFAD6E92858F50ULL } }, /* XSUM_XXH128_testdata[8622] */\n    { 2874, 0x000000009E3779B1ULL, { 0x43E48BD07F589398ULL, 0xCA832AE62D0FBB16ULL } }, /* XSUM_XXH128_testdata[8623] */\n    { 2874, 0x9E3779B185EBCA8DULL, { 0x0B4BA2E110C40A7DULL, 0xED31185475F45612ULL } }, /* XSUM_XXH128_testdata[8624] */\n    { 2875, 0x0000000000000000ULL, { 0x2C2C75069E5F0C87ULL, 0x9F500AC736939A82ULL } }, /* XSUM_XXH128_testdata[8625] */\n    { 2875, 0x000000009E3779B1ULL, { 0x24098B14B55E7437ULL, 0x3C6973C411C3A94FULL } }, /* XSUM_XXH128_testdata[8626] */\n    { 2875, 0x9E3779B185EBCA8DULL, { 0x9E00E20A113A71F2ULL, 0xD11498187D64448AULL } }, /* XSUM_XXH128_testdata[8627] */\n    { 2876, 0x0000000000000000ULL, { 0xBAA009937EF7AB3DULL, 0x87AEBCBD14C0253AULL } }, /* XSUM_XXH128_testdata[8628] */\n    { 2876, 0x000000009E3779B1ULL, { 0x69C904821E19E969ULL, 0xFC6D45F8A8C42CF5ULL } }, /* XSUM_XXH128_testdata[8629] */\n    { 2876, 0x9E3779B185EBCA8DULL, { 0x434D361FD8FA5F90ULL, 0x5C35C6E6A5D0743BULL } }, /* XSUM_XXH128_testdata[8630] */\n    { 2877, 0x0000000000000000ULL, { 0x1AC95EE241D9604DULL, 0xEE259F499400591CULL } }, /* XSUM_XXH128_testdata[8631] */\n    { 2877, 0x000000009E3779B1ULL, { 0x9BDB3A02B510372EULL, 0x6BD78BDA70D126B4ULL } }, /* XSUM_XXH128_testdata[8632] */\n    { 2877, 0x9E3779B185EBCA8DULL, { 0xA73A88A94D6AAEE3ULL, 0x01B483A1B0ECD127ULL } }, /* XSUM_XXH128_testdata[8633] */\n    { 2878, 0x0000000000000000ULL, { 0x0C97CAB6AA8AEFA1ULL, 0x180E8415FAB43824ULL } }, /* XSUM_XXH128_testdata[8634] */\n    { 2878, 0x000000009E3779B1ULL, { 0x5796F164E45B2ABFULL, 0xF4526FAC643B7335ULL } }, /* XSUM_XXH128_testdata[8635] */\n    { 2878, 0x9E3779B185EBCA8DULL, { 0x3C779BCB58A0A65DULL, 0x60742EB3410530AFULL } }, /* XSUM_XXH128_testdata[8636] */\n    { 2879, 0x0000000000000000ULL, { 0xDD75425D038D346DULL, 0x856B3F922E9EAB50ULL } }, /* XSUM_XXH128_testdata[8637] */\n    { 2879, 0x000000009E3779B1ULL, { 0x5EAFE3B9A0292C5EULL, 0x783B4004874DD139ULL } }, /* XSUM_XXH128_testdata[8638] */\n    { 2879, 0x9E3779B185EBCA8DULL, { 0x0A8B237C83DF1BAFULL, 0x46FE8F5CC7A62E8BULL } }, /* XSUM_XXH128_testdata[8639] */\n    { 2880, 0x0000000000000000ULL, { 0x1569AEC031E74877ULL, 0xD990597BF6D2CF5EULL } }, /* XSUM_XXH128_testdata[8640] */\n    { 2880, 0x000000009E3779B1ULL, { 0x7509BD0364683AB0ULL, 0x1973E6AF1E015C69ULL } }, /* XSUM_XXH128_testdata[8641] */\n    { 2880, 0x9E3779B185EBCA8DULL, { 0x4312A84752DF1392ULL, 0x36D3AFE081D95C26ULL } }, /* XSUM_XXH128_testdata[8642] */\n    { 2881, 0x0000000000000000ULL, { 0x50F4C429EB0B5DA9ULL, 0xFE7DB537950EC345ULL } }, /* XSUM_XXH128_testdata[8643] */\n    { 2881, 0x000000009E3779B1ULL, { 0x441B4D3CB362818BULL, 0xAD159E4E00FFB262ULL } }, /* XSUM_XXH128_testdata[8644] */\n    { 2881, 0x9E3779B185EBCA8DULL, { 0x80059CDACC9C58B2ULL, 0x26087D29F7A154C6ULL } }, /* XSUM_XXH128_testdata[8645] */\n    { 2882, 0x0000000000000000ULL, { 0x3C51B37EE08390D9ULL, 0x4582A302A712E673ULL } }, /* XSUM_XXH128_testdata[8646] */\n    { 2882, 0x000000009E3779B1ULL, { 0x64A8B9CEB5CF5670ULL, 0x76302A11B823AD5EULL } }, /* XSUM_XXH128_testdata[8647] */\n    { 2882, 0x9E3779B185EBCA8DULL, { 0xAD864F5AEE70A173ULL, 0x79F8494C16D32AE6ULL } }, /* XSUM_XXH128_testdata[8648] */\n    { 2883, 0x0000000000000000ULL, { 0x13F4EED17CD88548ULL, 0xE0E16D966ABEF54EULL } }, /* XSUM_XXH128_testdata[8649] */\n    { 2883, 0x000000009E3779B1ULL, { 0x1C9467150737C2C8ULL, 0x19CDFBC8C915FFE5ULL } }, /* XSUM_XXH128_testdata[8650] */\n    { 2883, 0x9E3779B185EBCA8DULL, { 0xEF76EE2F31E05999ULL, 0x71E60A899A38CD7EULL } }, /* XSUM_XXH128_testdata[8651] */\n    { 2884, 0x0000000000000000ULL, { 0x2533472603287D23ULL, 0x036FA310F1785EE5ULL } }, /* XSUM_XXH128_testdata[8652] */\n    { 2884, 0x000000009E3779B1ULL, { 0xD187BEF5C96EF9C2ULL, 0x5D939A13DF38A0E6ULL } }, /* XSUM_XXH128_testdata[8653] */\n    { 2884, 0x9E3779B185EBCA8DULL, { 0x554A64EF49681144ULL, 0xCC2B001AF2FDFB17ULL } }, /* XSUM_XXH128_testdata[8654] */\n    { 2885, 0x0000000000000000ULL, { 0x0E93D60C4AFE6A2BULL, 0x867D084D48611494ULL } }, /* XSUM_XXH128_testdata[8655] */\n    { 2885, 0x000000009E3779B1ULL, { 0x0F339CC33E88EBA2ULL, 0x38006BFBCDCA54F1ULL } }, /* XSUM_XXH128_testdata[8656] */\n    { 2885, 0x9E3779B185EBCA8DULL, { 0x4B301FEDB9B5441CULL, 0x1CB82260085B1D7CULL } }, /* XSUM_XXH128_testdata[8657] */\n    { 2886, 0x0000000000000000ULL, { 0x01EB1A14E2478FACULL, 0x6221A96DEDA442FBULL } }, /* XSUM_XXH128_testdata[8658] */\n    { 2886, 0x000000009E3779B1ULL, { 0xF9B9AD0CBBF5FA40ULL, 0x209EB2FB74082219ULL } }, /* XSUM_XXH128_testdata[8659] */\n    { 2886, 0x9E3779B185EBCA8DULL, { 0x512FDC6471997AB3ULL, 0x94CA61C393C72430ULL } }, /* XSUM_XXH128_testdata[8660] */\n    { 2887, 0x0000000000000000ULL, { 0x2765A5C100EA0266ULL, 0x9390946C57A09DFCULL } }, /* XSUM_XXH128_testdata[8661] */\n    { 2887, 0x000000009E3779B1ULL, { 0x3EE0DA5EDC0A9E36ULL, 0xCEBE5CC10084048BULL } }, /* XSUM_XXH128_testdata[8662] */\n    { 2887, 0x9E3779B185EBCA8DULL, { 0x7BB842DB067D6F19ULL, 0x9F8853405607A804ULL } }, /* XSUM_XXH128_testdata[8663] */\n    { 2888, 0x0000000000000000ULL, { 0xEE7819CD674E60D1ULL, 0xAE452CD12B0A1B2FULL } }, /* XSUM_XXH128_testdata[8664] */\n    { 2888, 0x000000009E3779B1ULL, { 0xE51080DCE66DBF40ULL, 0x806ECCD6F32051BDULL } }, /* XSUM_XXH128_testdata[8665] */\n    { 2888, 0x9E3779B185EBCA8DULL, { 0x0DACBB39F18EF099ULL, 0x35EEB7A9E8538C51ULL } }, /* XSUM_XXH128_testdata[8666] */\n    { 2889, 0x0000000000000000ULL, { 0xFAF36DFB18B4F794ULL, 0x69C159CDDE35F993ULL } }, /* XSUM_XXH128_testdata[8667] */\n    { 2889, 0x000000009E3779B1ULL, { 0x3B70315E05777022ULL, 0x24918D140882F810ULL } }, /* XSUM_XXH128_testdata[8668] */\n    { 2889, 0x9E3779B185EBCA8DULL, { 0xFE8D0B026249AFB2ULL, 0xB22E80FEA7C77479ULL } }, /* XSUM_XXH128_testdata[8669] */\n    { 2890, 0x0000000000000000ULL, { 0x59A3D9A04057B014ULL, 0xF9620F41641A4348ULL } }, /* XSUM_XXH128_testdata[8670] */\n    { 2890, 0x000000009E3779B1ULL, { 0x6CB2CBB1BFEE9243ULL, 0x482A8CA621E590C6ULL } }, /* XSUM_XXH128_testdata[8671] */\n    { 2890, 0x9E3779B185EBCA8DULL, { 0x89711CA2BAAA440BULL, 0x68602B0E4B051CD2ULL } }, /* XSUM_XXH128_testdata[8672] */\n    { 2891, 0x0000000000000000ULL, { 0xCD08AD27BE784216ULL, 0x16FC1FAA83905427ULL } }, /* XSUM_XXH128_testdata[8673] */\n    { 2891, 0x000000009E3779B1ULL, { 0xEF242E5D1AA6B845ULL, 0x4D989EFE9816A6DCULL } }, /* XSUM_XXH128_testdata[8674] */\n    { 2891, 0x9E3779B185EBCA8DULL, { 0x62D6E6128B98A1A7ULL, 0xB952A38AFE1BDE39ULL } }, /* XSUM_XXH128_testdata[8675] */\n    { 2892, 0x0000000000000000ULL, { 0xCEE4AF3CF43E2A5FULL, 0xD00D7FF932AA3EF7ULL } }, /* XSUM_XXH128_testdata[8676] */\n    { 2892, 0x000000009E3779B1ULL, { 0xE6641D7C6166FCD0ULL, 0xF8C02E7EF512580BULL } }, /* XSUM_XXH128_testdata[8677] */\n    { 2892, 0x9E3779B185EBCA8DULL, { 0x71DD0854DCF0C185ULL, 0x821B4952AEFE4EBDULL } }, /* XSUM_XXH128_testdata[8678] */\n    { 2893, 0x0000000000000000ULL, { 0x86FBBA87613F456FULL, 0xCFF17560BBB6E697ULL } }, /* XSUM_XXH128_testdata[8679] */\n    { 2893, 0x000000009E3779B1ULL, { 0xEFAFA8FF6B2AD4A6ULL, 0xDF537EF6B01B465FULL } }, /* XSUM_XXH128_testdata[8680] */\n    { 2893, 0x9E3779B185EBCA8DULL, { 0x4412BC45B5C45E0FULL, 0xEB0D524688C276C6ULL } }, /* XSUM_XXH128_testdata[8681] */\n    { 2894, 0x0000000000000000ULL, { 0x2C6C34D4C16411D5ULL, 0x884CA706DFEBB5BEULL } }, /* XSUM_XXH128_testdata[8682] */\n    { 2894, 0x000000009E3779B1ULL, { 0x819DCD87CA32CE7CULL, 0xE7382A0410B2DCE2ULL } }, /* XSUM_XXH128_testdata[8683] */\n    { 2894, 0x9E3779B185EBCA8DULL, { 0x9677ED6A93D72EBCULL, 0xF75D73D824CCB50CULL } }, /* XSUM_XXH128_testdata[8684] */\n    { 2895, 0x0000000000000000ULL, { 0xE2B5DEB318801298ULL, 0x4E194C0D34E50586ULL } }, /* XSUM_XXH128_testdata[8685] */\n    { 2895, 0x000000009E3779B1ULL, { 0x1487AFC47E31ECAEULL, 0xECCA53FD6A5E55DCULL } }, /* XSUM_XXH128_testdata[8686] */\n    { 2895, 0x9E3779B185EBCA8DULL, { 0xE4448348C66AEA5BULL, 0xCE1399B2C6B7A48AULL } }, /* XSUM_XXH128_testdata[8687] */\n    { 2896, 0x0000000000000000ULL, { 0xD2C49A2972FC88E3ULL, 0xFC455E2196C58AB5ULL } }, /* XSUM_XXH128_testdata[8688] */\n    { 2896, 0x000000009E3779B1ULL, { 0xE15EBC84CDE3F722ULL, 0x3EE1DFF8627249E9ULL } }, /* XSUM_XXH128_testdata[8689] */\n    { 2896, 0x9E3779B185EBCA8DULL, { 0xF80757E2A01C4068ULL, 0x965F7EB20EE1B8B1ULL } }, /* XSUM_XXH128_testdata[8690] */\n    { 2897, 0x0000000000000000ULL, { 0x141104A3E73DC453ULL, 0xC04FBA0CCB6C73C4ULL } }, /* XSUM_XXH128_testdata[8691] */\n    { 2897, 0x000000009E3779B1ULL, { 0xAA501F75BDF8F984ULL, 0x0BB31440785E6566ULL } }, /* XSUM_XXH128_testdata[8692] */\n    { 2897, 0x9E3779B185EBCA8DULL, { 0x8A5866A43B23145AULL, 0x7378106B9B844101ULL } }, /* XSUM_XXH128_testdata[8693] */\n    { 2898, 0x0000000000000000ULL, { 0x34DB3A72949DA213ULL, 0x434C9FB9E7EA8BD9ULL } }, /* XSUM_XXH128_testdata[8694] */\n    { 2898, 0x000000009E3779B1ULL, { 0xF3D515EBF65496A8ULL, 0xA6453164D57F21A6ULL } }, /* XSUM_XXH128_testdata[8695] */\n    { 2898, 0x9E3779B185EBCA8DULL, { 0x2424B5C3177D30F9ULL, 0xE73F7E0FAADE922AULL } }, /* XSUM_XXH128_testdata[8696] */\n    { 2899, 0x0000000000000000ULL, { 0x984AF7FBBCE247A3ULL, 0x18390C464ADB7E89ULL } }, /* XSUM_XXH128_testdata[8697] */\n    { 2899, 0x000000009E3779B1ULL, { 0x27D7D15C3E5F0448ULL, 0x357895170C2971F7ULL } }, /* XSUM_XXH128_testdata[8698] */\n    { 2899, 0x9E3779B185EBCA8DULL, { 0x26F58F312DBB36F7ULL, 0x6B20D018260E2A96ULL } }, /* XSUM_XXH128_testdata[8699] */\n    { 2900, 0x0000000000000000ULL, { 0x05A7E42E977AEFBFULL, 0x41A7B33A9E5F2605ULL } }, /* XSUM_XXH128_testdata[8700] */\n    { 2900, 0x000000009E3779B1ULL, { 0x8B51A1B6F706B64DULL, 0xE78F1DD3F0EA497DULL } }, /* XSUM_XXH128_testdata[8701] */\n    { 2900, 0x9E3779B185EBCA8DULL, { 0x2308BBFFE6CCAC11ULL, 0x1E7DB8496CA744A4ULL } }, /* XSUM_XXH128_testdata[8702] */\n    { 2901, 0x0000000000000000ULL, { 0xD2276B6308652305ULL, 0x520486521CD5830CULL } }, /* XSUM_XXH128_testdata[8703] */\n    { 2901, 0x000000009E3779B1ULL, { 0x9F6794B9D2B9F758ULL, 0xFBAE1441BE6343ADULL } }, /* XSUM_XXH128_testdata[8704] */\n    { 2901, 0x9E3779B185EBCA8DULL, { 0x9350ACC7278373F9ULL, 0x87B97A2EB7422131ULL } }, /* XSUM_XXH128_testdata[8705] */\n    { 2902, 0x0000000000000000ULL, { 0x2CA93644EBCE42F5ULL, 0x551DAA8BEE478A49ULL } }, /* XSUM_XXH128_testdata[8706] */\n    { 2902, 0x000000009E3779B1ULL, { 0xFF204CD48EFC35A5ULL, 0x4BAF5C0CC6A63650ULL } }, /* XSUM_XXH128_testdata[8707] */\n    { 2902, 0x9E3779B185EBCA8DULL, { 0xF0FE9E18372572D3ULL, 0xF126343DBB4758E5ULL } }, /* XSUM_XXH128_testdata[8708] */\n    { 2903, 0x0000000000000000ULL, { 0xFE5CD7D2F3A38C0BULL, 0xF9029B5DCBC976B9ULL } }, /* XSUM_XXH128_testdata[8709] */\n    { 2903, 0x000000009E3779B1ULL, { 0xF2EE2DEBC003A1B0ULL, 0x4DD14560DE3E39E5ULL } }, /* XSUM_XXH128_testdata[8710] */\n    { 2903, 0x9E3779B185EBCA8DULL, { 0x4C6A0DB668F82BEBULL, 0x32F250719C3436E7ULL } }, /* XSUM_XXH128_testdata[8711] */\n    { 2904, 0x0000000000000000ULL, { 0x21D867EBD5FC4E0AULL, 0x53B57F93FB119A1EULL } }, /* XSUM_XXH128_testdata[8712] */\n    { 2904, 0x000000009E3779B1ULL, { 0x0FBE5A3A767684CEULL, 0xFD116F943CD15FC7ULL } }, /* XSUM_XXH128_testdata[8713] */\n    { 2904, 0x9E3779B185EBCA8DULL, { 0x008EF198EEF4C618ULL, 0x1E441554EAB45164ULL } }, /* XSUM_XXH128_testdata[8714] */\n    { 2905, 0x0000000000000000ULL, { 0x6D34EFAF31163CDCULL, 0xC4B3DD48DAA0FDC5ULL } }, /* XSUM_XXH128_testdata[8715] */\n    { 2905, 0x000000009E3779B1ULL, { 0x154466CC8D45AAE6ULL, 0x82DF2E9E545BCBDBULL } }, /* XSUM_XXH128_testdata[8716] */\n    { 2905, 0x9E3779B185EBCA8DULL, { 0x1CD2ADD8BBD4E97EULL, 0xC13DFAF2E58B6A2BULL } }, /* XSUM_XXH128_testdata[8717] */\n    { 2906, 0x0000000000000000ULL, { 0xD663DB2BACEB027EULL, 0xD7824CCE12348F47ULL } }, /* XSUM_XXH128_testdata[8718] */\n    { 2906, 0x000000009E3779B1ULL, { 0x00CC4F9EB488C22AULL, 0x61927EC5CF8C37FCULL } }, /* XSUM_XXH128_testdata[8719] */\n    { 2906, 0x9E3779B185EBCA8DULL, { 0x1CE37DAD30EEC2A5ULL, 0x24412A3961F728C6ULL } }, /* XSUM_XXH128_testdata[8720] */\n    { 2907, 0x0000000000000000ULL, { 0xBEA17878CE925885ULL, 0xC0C00ED98B8094AFULL } }, /* XSUM_XXH128_testdata[8721] */\n    { 2907, 0x000000009E3779B1ULL, { 0xFC78A3FF5EB79890ULL, 0x9B2B9379B1D4B15FULL } }, /* XSUM_XXH128_testdata[8722] */\n    { 2907, 0x9E3779B185EBCA8DULL, { 0x336315FBCEC44E62ULL, 0xD7B8687E3F03B11FULL } }, /* XSUM_XXH128_testdata[8723] */\n    { 2908, 0x0000000000000000ULL, { 0xF4EF93220B92BA40ULL, 0x192008530865269BULL } }, /* XSUM_XXH128_testdata[8724] */\n    { 2908, 0x000000009E3779B1ULL, { 0xA72569D3DB1836F0ULL, 0xA9D2F4FA6628066EULL } }, /* XSUM_XXH128_testdata[8725] */\n    { 2908, 0x9E3779B185EBCA8DULL, { 0xDB6BF0A4B49134AEULL, 0x4A0D958E5DA93B02ULL } }, /* XSUM_XXH128_testdata[8726] */\n    { 2909, 0x0000000000000000ULL, { 0x436021B24F571768ULL, 0xCC60A9ACA0F37526ULL } }, /* XSUM_XXH128_testdata[8727] */\n    { 2909, 0x000000009E3779B1ULL, { 0x0D15AAFE38266D4EULL, 0x27C41D3BCE8351BFULL } }, /* XSUM_XXH128_testdata[8728] */\n    { 2909, 0x9E3779B185EBCA8DULL, { 0x11A0401C050B4358ULL, 0xFEF864909324E784ULL } }, /* XSUM_XXH128_testdata[8729] */\n    { 2910, 0x0000000000000000ULL, { 0x4BC346B3F9FF37A3ULL, 0xFC449C4793673C53ULL } }, /* XSUM_XXH128_testdata[8730] */\n    { 2910, 0x000000009E3779B1ULL, { 0x1C9082545C11BD09ULL, 0x533AB90900D2F0ACULL } }, /* XSUM_XXH128_testdata[8731] */\n    { 2910, 0x9E3779B185EBCA8DULL, { 0xC8B0154E930427FDULL, 0x6C638457D9D3AC63ULL } }, /* XSUM_XXH128_testdata[8732] */\n    { 2911, 0x0000000000000000ULL, { 0xDBFBE89DF1427DC9ULL, 0x641D225CDD3B973BULL } }, /* XSUM_XXH128_testdata[8733] */\n    { 2911, 0x000000009E3779B1ULL, { 0xB73FAEC8290EE3F0ULL, 0x3687D0271D34D310ULL } }, /* XSUM_XXH128_testdata[8734] */\n    { 2911, 0x9E3779B185EBCA8DULL, { 0x959C3EFE3A9FFBADULL, 0x9F2492BB1A9E7B16ULL } }, /* XSUM_XXH128_testdata[8735] */\n    { 2912, 0x0000000000000000ULL, { 0x6898B302FA2DE57FULL, 0xF975D00A8866D3B7ULL } }, /* XSUM_XXH128_testdata[8736] */\n    { 2912, 0x000000009E3779B1ULL, { 0xCBDE13BED99E6A31ULL, 0x351BA63223299114ULL } }, /* XSUM_XXH128_testdata[8737] */\n    { 2912, 0x9E3779B185EBCA8DULL, { 0xEAD47BE6C4B72653ULL, 0x9BD9241CC580E48CULL } }, /* XSUM_XXH128_testdata[8738] */\n    { 2913, 0x0000000000000000ULL, { 0x3A444D5877850E15ULL, 0x51A64859C7EB3F28ULL } }, /* XSUM_XXH128_testdata[8739] */\n    { 2913, 0x000000009E3779B1ULL, { 0xD4DA0A9BCEBE45CFULL, 0xFC9AE008C1DDBA86ULL } }, /* XSUM_XXH128_testdata[8740] */\n    { 2913, 0x9E3779B185EBCA8DULL, { 0x8B8C8FE28D4AB564ULL, 0x16264F6223CB2B0EULL } }, /* XSUM_XXH128_testdata[8741] */\n    { 2914, 0x0000000000000000ULL, { 0xB9BB6D96B866D954ULL, 0x44C28856348EA8B9ULL } }, /* XSUM_XXH128_testdata[8742] */\n    { 2914, 0x000000009E3779B1ULL, { 0x5EDAA78FB752D6D9ULL, 0xFB008DA515251F49ULL } }, /* XSUM_XXH128_testdata[8743] */\n    { 2914, 0x9E3779B185EBCA8DULL, { 0xBF970B0F4FEAD08EULL, 0xE51854F0809D970EULL } }, /* XSUM_XXH128_testdata[8744] */\n    { 2915, 0x0000000000000000ULL, { 0xB425E40BCAABF6F0ULL, 0x00588FB12E83A65DULL } }, /* XSUM_XXH128_testdata[8745] */\n    { 2915, 0x000000009E3779B1ULL, { 0xD0F76BF1BF44E329ULL, 0xCA6261617CD0B83AULL } }, /* XSUM_XXH128_testdata[8746] */\n    { 2915, 0x9E3779B185EBCA8DULL, { 0x184AE70EC6F480E8ULL, 0x20BC49985D22F93BULL } }, /* XSUM_XXH128_testdata[8747] */\n    { 2916, 0x0000000000000000ULL, { 0xC0980B081CAAC13EULL, 0xD0F03E96CF41D342ULL } }, /* XSUM_XXH128_testdata[8748] */\n    { 2916, 0x000000009E3779B1ULL, { 0x9CD9C142083BE797ULL, 0x5EA408C93DC1250BULL } }, /* XSUM_XXH128_testdata[8749] */\n    { 2916, 0x9E3779B185EBCA8DULL, { 0xAC4378B3BA949539ULL, 0x6142B3A4C51E9415ULL } }, /* XSUM_XXH128_testdata[8750] */\n    { 2917, 0x0000000000000000ULL, { 0xD81CF066572FC06DULL, 0xC63452EDC242397EULL } }, /* XSUM_XXH128_testdata[8751] */\n    { 2917, 0x000000009E3779B1ULL, { 0x7EF2E44FA3843F6AULL, 0x0FE9AE709BBB43AFULL } }, /* XSUM_XXH128_testdata[8752] */\n    { 2917, 0x9E3779B185EBCA8DULL, { 0xE909FA49AD169084ULL, 0xCF14F59A6D7424B9ULL } }, /* XSUM_XXH128_testdata[8753] */\n    { 2918, 0x0000000000000000ULL, { 0xFE97D61C77F33CA8ULL, 0x5923537FE35F75C7ULL } }, /* XSUM_XXH128_testdata[8754] */\n    { 2918, 0x000000009E3779B1ULL, { 0x7F31C16459A8F80CULL, 0xAC0D84BA954CEB7CULL } }, /* XSUM_XXH128_testdata[8755] */\n    { 2918, 0x9E3779B185EBCA8DULL, { 0x9FD8690E59E936C0ULL, 0x3D45C8A2CA62182EULL } }, /* XSUM_XXH128_testdata[8756] */\n    { 2919, 0x0000000000000000ULL, { 0x90DE987789853E18ULL, 0x7EC99FC9FFD07937ULL } }, /* XSUM_XXH128_testdata[8757] */\n    { 2919, 0x000000009E3779B1ULL, { 0x9DC9FD57D7D7433FULL, 0x6281F6B0CE72F6FBULL } }, /* XSUM_XXH128_testdata[8758] */\n    { 2919, 0x9E3779B185EBCA8DULL, { 0xEA97F43444968484ULL, 0xD3CE5A9A36A65794ULL } }, /* XSUM_XXH128_testdata[8759] */\n    { 2920, 0x0000000000000000ULL, { 0x54EE786D33C130CCULL, 0x9E769C51D2DBAD3AULL } }, /* XSUM_XXH128_testdata[8760] */\n    { 2920, 0x000000009E3779B1ULL, { 0xD9B840FDD7C5F394ULL, 0x8B4A2771E3B6E191ULL } }, /* XSUM_XXH128_testdata[8761] */\n    { 2920, 0x9E3779B185EBCA8DULL, { 0x3046EE02CCE9E480ULL, 0x42E34296074A8918ULL } }, /* XSUM_XXH128_testdata[8762] */\n    { 2921, 0x0000000000000000ULL, { 0x7A2340581E6B8BBCULL, 0x4F35E2A16E9F0C7AULL } }, /* XSUM_XXH128_testdata[8763] */\n    { 2921, 0x000000009E3779B1ULL, { 0xEE7EE7E6BD07565EULL, 0x2E70E03C8F134D3FULL } }, /* XSUM_XXH128_testdata[8764] */\n    { 2921, 0x9E3779B185EBCA8DULL, { 0x01CECA730C6FFF9BULL, 0x676AFA24366DD251ULL } }, /* XSUM_XXH128_testdata[8765] */\n    { 2922, 0x0000000000000000ULL, { 0x753BDAEC0C775A6CULL, 0x32A53E731B8714B9ULL } }, /* XSUM_XXH128_testdata[8766] */\n    { 2922, 0x000000009E3779B1ULL, { 0x84E2D690CC61F03AULL, 0x9B924AE467D09305ULL } }, /* XSUM_XXH128_testdata[8767] */\n    { 2922, 0x9E3779B185EBCA8DULL, { 0x8A8D2710D71D3533ULL, 0x11BAEA514FCBF55EULL } }, /* XSUM_XXH128_testdata[8768] */\n    { 2923, 0x0000000000000000ULL, { 0xAE2EB637BB2566B6ULL, 0x2FF031B9A34597F2ULL } }, /* XSUM_XXH128_testdata[8769] */\n    { 2923, 0x000000009E3779B1ULL, { 0xBCB9B13A9472B03FULL, 0x5C75A1BB521127E5ULL } }, /* XSUM_XXH128_testdata[8770] */\n    { 2923, 0x9E3779B185EBCA8DULL, { 0xAEBAC1FF4EFF8F81ULL, 0x6735148DFBC06B83ULL } }, /* XSUM_XXH128_testdata[8771] */\n    { 2924, 0x0000000000000000ULL, { 0xF7C951FA76F91F04ULL, 0x49BBE303DEE20F72ULL } }, /* XSUM_XXH128_testdata[8772] */\n    { 2924, 0x000000009E3779B1ULL, { 0x8FCA291B4BEC8616ULL, 0x6BF2259E7FA35B44ULL } }, /* XSUM_XXH128_testdata[8773] */\n    { 2924, 0x9E3779B185EBCA8DULL, { 0xC5A60CBB19EA4578ULL, 0x39D69A625594B9C5ULL } }, /* XSUM_XXH128_testdata[8774] */\n    { 2925, 0x0000000000000000ULL, { 0xABAB9443CD114538ULL, 0x4B1F669693ABD207ULL } }, /* XSUM_XXH128_testdata[8775] */\n    { 2925, 0x000000009E3779B1ULL, { 0x63FC39C5472F720FULL, 0x76E5BFAD874298B0ULL } }, /* XSUM_XXH128_testdata[8776] */\n    { 2925, 0x9E3779B185EBCA8DULL, { 0x723E7E1D128C1E7BULL, 0x5AFE510DADD37A16ULL } }, /* XSUM_XXH128_testdata[8777] */\n    { 2926, 0x0000000000000000ULL, { 0x9EA70C87CBF18F54ULL, 0x715BD6F89EB599A3ULL } }, /* XSUM_XXH128_testdata[8778] */\n    { 2926, 0x000000009E3779B1ULL, { 0xEB9F9D7C5DACC7DFULL, 0x4DE150E7FD53A57FULL } }, /* XSUM_XXH128_testdata[8779] */\n    { 2926, 0x9E3779B185EBCA8DULL, { 0xDBB8637F27CD02A6ULL, 0x5D8174D248275552ULL } }, /* XSUM_XXH128_testdata[8780] */\n    { 2927, 0x0000000000000000ULL, { 0xEB0A44B1C78D5F39ULL, 0xF694A524718D8BA9ULL } }, /* XSUM_XXH128_testdata[8781] */\n    { 2927, 0x000000009E3779B1ULL, { 0x1382623ECB019461ULL, 0x470EED9CD4A90F5CULL } }, /* XSUM_XXH128_testdata[8782] */\n    { 2927, 0x9E3779B185EBCA8DULL, { 0x8D391F60755ADE6BULL, 0x0F4F1050934030CBULL } }, /* XSUM_XXH128_testdata[8783] */\n    { 2928, 0x0000000000000000ULL, { 0x133DCF49D8583460ULL, 0x03FBB6108D59E630ULL } }, /* XSUM_XXH128_testdata[8784] */\n    { 2928, 0x000000009E3779B1ULL, { 0xC38FEE1011E4A8B2ULL, 0xAF01C552DA2F3A7CULL } }, /* XSUM_XXH128_testdata[8785] */\n    { 2928, 0x9E3779B185EBCA8DULL, { 0x361CB85CA98D5525ULL, 0x8BC64C92D48BBBCCULL } }, /* XSUM_XXH128_testdata[8786] */\n    { 2929, 0x0000000000000000ULL, { 0x0DE608C5C6CEFB45ULL, 0xECA5730056316FABULL } }, /* XSUM_XXH128_testdata[8787] */\n    { 2929, 0x000000009E3779B1ULL, { 0xFCCBB06578FABE38ULL, 0x19AB0974E5B6B169ULL } }, /* XSUM_XXH128_testdata[8788] */\n    { 2929, 0x9E3779B185EBCA8DULL, { 0xDB67D5C9E5BD578AULL, 0x331A225445714DA5ULL } }, /* XSUM_XXH128_testdata[8789] */\n    { 2930, 0x0000000000000000ULL, { 0xB9ACAFD4BDA2772BULL, 0x175E9C9BFA6A18D2ULL } }, /* XSUM_XXH128_testdata[8790] */\n    { 2930, 0x000000009E3779B1ULL, { 0xC064503B7BE8E7E7ULL, 0x983DBD6220755BA0ULL } }, /* XSUM_XXH128_testdata[8791] */\n    { 2930, 0x9E3779B185EBCA8DULL, { 0xB24BE8EBD7FD2429ULL, 0x118B3FC8646EA93DULL } }, /* XSUM_XXH128_testdata[8792] */\n    { 2931, 0x0000000000000000ULL, { 0x50506F8081CA14FEULL, 0x7525893A1F82A6BAULL } }, /* XSUM_XXH128_testdata[8793] */\n    { 2931, 0x000000009E3779B1ULL, { 0x8094FE23B15DD8F9ULL, 0x8299B2B1337B260EULL } }, /* XSUM_XXH128_testdata[8794] */\n    { 2931, 0x9E3779B185EBCA8DULL, { 0x3D1A9B131E8A82BAULL, 0x4641DE14982D1A49ULL } }, /* XSUM_XXH128_testdata[8795] */\n    { 2932, 0x0000000000000000ULL, { 0x22ABBE6A3F4AACFAULL, 0xE62530C72731A0A8ULL } }, /* XSUM_XXH128_testdata[8796] */\n    { 2932, 0x000000009E3779B1ULL, { 0xD774805580A89A18ULL, 0xDDD40C241A132224ULL } }, /* XSUM_XXH128_testdata[8797] */\n    { 2932, 0x9E3779B185EBCA8DULL, { 0x3EAC1BADB7A35388ULL, 0x0D018D43C62D8C42ULL } }, /* XSUM_XXH128_testdata[8798] */\n    { 2933, 0x0000000000000000ULL, { 0x4B46B1DC6AF605DCULL, 0x31400396F552A0D2ULL } }, /* XSUM_XXH128_testdata[8799] */\n    { 2933, 0x000000009E3779B1ULL, { 0x0502D0FBA1DE88AFULL, 0x89AB2FE001F93A46ULL } }, /* XSUM_XXH128_testdata[8800] */\n    { 2933, 0x9E3779B185EBCA8DULL, { 0x3F3A84CBB2EEA098ULL, 0x5F12FF6199C5CA46ULL } }, /* XSUM_XXH128_testdata[8801] */\n    { 2934, 0x0000000000000000ULL, { 0x184CF0DFC8130466ULL, 0xFADE41E46ABB41EEULL } }, /* XSUM_XXH128_testdata[8802] */\n    { 2934, 0x000000009E3779B1ULL, { 0x210B2663852E87B1ULL, 0x062D57DC9B2BE0A6ULL } }, /* XSUM_XXH128_testdata[8803] */\n    { 2934, 0x9E3779B185EBCA8DULL, { 0x6912FBF0815C4D3BULL, 0x2FD06F811D527BE8ULL } }, /* XSUM_XXH128_testdata[8804] */\n    { 2935, 0x0000000000000000ULL, { 0x8C26A0D0B25E1825ULL, 0x1404AEE824E3BD7CULL } }, /* XSUM_XXH128_testdata[8805] */\n    { 2935, 0x000000009E3779B1ULL, { 0xF48962159D1F497AULL, 0x72945CC557F1B1EDULL } }, /* XSUM_XXH128_testdata[8806] */\n    { 2935, 0x9E3779B185EBCA8DULL, { 0x0FE45F1BFDB3A789ULL, 0x0C170FC428101A5BULL } }, /* XSUM_XXH128_testdata[8807] */\n    { 2936, 0x0000000000000000ULL, { 0x390CFD95463BF23DULL, 0xF60AB3EC73FFBAF9ULL } }, /* XSUM_XXH128_testdata[8808] */\n    { 2936, 0x000000009E3779B1ULL, { 0x68D37437E42D586CULL, 0xA88EA3CE745278CFULL } }, /* XSUM_XXH128_testdata[8809] */\n    { 2936, 0x9E3779B185EBCA8DULL, { 0xCCBD1D191EBF98D9ULL, 0x5DE38185D9FD8110ULL } }, /* XSUM_XXH128_testdata[8810] */\n    { 2937, 0x0000000000000000ULL, { 0xED8496BFF6CB147AULL, 0x0D53267945286B05ULL } }, /* XSUM_XXH128_testdata[8811] */\n    { 2937, 0x000000009E3779B1ULL, { 0x368DF3C0A23BB804ULL, 0x6BBEF6690D5E8848ULL } }, /* XSUM_XXH128_testdata[8812] */\n    { 2937, 0x9E3779B185EBCA8DULL, { 0x1B714943D1FA7301ULL, 0xDB4E4C6099358761ULL } }, /* XSUM_XXH128_testdata[8813] */\n    { 2938, 0x0000000000000000ULL, { 0x0518732D96C57B48ULL, 0xB8F65323761A49C0ULL } }, /* XSUM_XXH128_testdata[8814] */\n    { 2938, 0x000000009E3779B1ULL, { 0xFDAE63C6366C53B1ULL, 0x12E9B8D903D0C3D0ULL } }, /* XSUM_XXH128_testdata[8815] */\n    { 2938, 0x9E3779B185EBCA8DULL, { 0x1B6BE8BF3F1DDFB1ULL, 0x1B1A4A45156743D8ULL } }, /* XSUM_XXH128_testdata[8816] */\n    { 2939, 0x0000000000000000ULL, { 0xD261DBE24537BD6EULL, 0x30F210CDD0CAF176ULL } }, /* XSUM_XXH128_testdata[8817] */\n    { 2939, 0x000000009E3779B1ULL, { 0x3DD7ABE8D03B5AFAULL, 0xB3786B5CD18B2446ULL } }, /* XSUM_XXH128_testdata[8818] */\n    { 2939, 0x9E3779B185EBCA8DULL, { 0x12D3216FAD9E2066ULL, 0xF4C325827850F766ULL } }, /* XSUM_XXH128_testdata[8819] */\n    { 2940, 0x0000000000000000ULL, { 0x7BA59CE95AA839C3ULL, 0x3624DE767365BCFFULL } }, /* XSUM_XXH128_testdata[8820] */\n    { 2940, 0x000000009E3779B1ULL, { 0x86698A840451C1FEULL, 0x7FA9F9B6653FC5E2ULL } }, /* XSUM_XXH128_testdata[8821] */\n    { 2940, 0x9E3779B185EBCA8DULL, { 0xE75E35C9A2647D26ULL, 0x5F9B887D26660D32ULL } }, /* XSUM_XXH128_testdata[8822] */\n    { 2941, 0x0000000000000000ULL, { 0x0CD6A1AB39128B86ULL, 0x46CCC271059DD389ULL } }, /* XSUM_XXH128_testdata[8823] */\n    { 2941, 0x000000009E3779B1ULL, { 0x9360C4698129469DULL, 0xF9CF8541E8986B7EULL } }, /* XSUM_XXH128_testdata[8824] */\n    { 2941, 0x9E3779B185EBCA8DULL, { 0x979B859D0D4BFB95ULL, 0x15DC8F016CA9D636ULL } }, /* XSUM_XXH128_testdata[8825] */\n    { 2942, 0x0000000000000000ULL, { 0x0943C31E81275520ULL, 0x8E71B84B71D62C7EULL } }, /* XSUM_XXH128_testdata[8826] */\n    { 2942, 0x000000009E3779B1ULL, { 0x709BDE4D1E90FA9AULL, 0x21ADAD419D3C1503ULL } }, /* XSUM_XXH128_testdata[8827] */\n    { 2942, 0x9E3779B185EBCA8DULL, { 0xDC0CE937B0FA2A17ULL, 0x007E35FA5919DF50ULL } }, /* XSUM_XXH128_testdata[8828] */\n    { 2943, 0x0000000000000000ULL, { 0x58DFE07CC7195D4BULL, 0x5BF3E1C0A9074895ULL } }, /* XSUM_XXH128_testdata[8829] */\n    { 2943, 0x000000009E3779B1ULL, { 0x65FC0B3CE79D9B08ULL, 0xA0492C6FA8C0198EULL } }, /* XSUM_XXH128_testdata[8830] */\n    { 2943, 0x9E3779B185EBCA8DULL, { 0x7B69CA3D51C3C4FDULL, 0x21595001BF9727FDULL } }, /* XSUM_XXH128_testdata[8831] */\n    { 2944, 0x0000000000000000ULL, { 0x4A76E054ADB05801ULL, 0x14BC7E33703AEFB3ULL } }, /* XSUM_XXH128_testdata[8832] */\n    { 2944, 0x000000009E3779B1ULL, { 0xB60D500D352AE60DULL, 0x3699737616D8D7AFULL } }, /* XSUM_XXH128_testdata[8833] */\n    { 2944, 0x9E3779B185EBCA8DULL, { 0x8441D8DB8F90440DULL, 0x7B60132B85756F4BULL } }, /* XSUM_XXH128_testdata[8834] */\n    { 2945, 0x0000000000000000ULL, { 0x680E1F01F989965CULL, 0x792D99DFE60D347EULL } }, /* XSUM_XXH128_testdata[8835] */\n    { 2945, 0x000000009E3779B1ULL, { 0xE4891C6EB5F71ED5ULL, 0xE683D2F765A09A98ULL } }, /* XSUM_XXH128_testdata[8836] */\n    { 2945, 0x9E3779B185EBCA8DULL, { 0xB95BD799C0DB1384ULL, 0xF3FAE1B4C37F3A02ULL } }, /* XSUM_XXH128_testdata[8837] */\n    { 2946, 0x0000000000000000ULL, { 0xA4C06C959C025D2CULL, 0xBEC0E77ADFE01C5AULL } }, /* XSUM_XXH128_testdata[8838] */\n    { 2946, 0x000000009E3779B1ULL, { 0x0BC5B27F05727FC4ULL, 0x632522FD2F4F8158ULL } }, /* XSUM_XXH128_testdata[8839] */\n    { 2946, 0x9E3779B185EBCA8DULL, { 0x79C1D7ECA1AC6553ULL, 0xAE983753ED6881A4ULL } }, /* XSUM_XXH128_testdata[8840] */\n    { 2947, 0x0000000000000000ULL, { 0xAB2AEFA418BC2546ULL, 0xA62301D3059D9CABULL } }, /* XSUM_XXH128_testdata[8841] */\n    { 2947, 0x000000009E3779B1ULL, { 0x08161E21C93DD56CULL, 0x926D78E5A6ABFBF0ULL } }, /* XSUM_XXH128_testdata[8842] */\n    { 2947, 0x9E3779B185EBCA8DULL, { 0x75FCA75B9FDF1FD2ULL, 0x572E6C69786B5F99ULL } }, /* XSUM_XXH128_testdata[8843] */\n    { 2948, 0x0000000000000000ULL, { 0x16928BCCA1A24E72ULL, 0x9DEA336CDB8AC1E6ULL } }, /* XSUM_XXH128_testdata[8844] */\n    { 2948, 0x000000009E3779B1ULL, { 0x459B0691B10951B1ULL, 0x264DD9E05638AA22ULL } }, /* XSUM_XXH128_testdata[8845] */\n    { 2948, 0x9E3779B185EBCA8DULL, { 0x14BBCD4E631C60D4ULL, 0x028B88FBE650181FULL } }, /* XSUM_XXH128_testdata[8846] */\n    { 2949, 0x0000000000000000ULL, { 0x7F406076F20DDB9EULL, 0x8FD3D3094B624A21ULL } }, /* XSUM_XXH128_testdata[8847] */\n    { 2949, 0x000000009E3779B1ULL, { 0x79396D466ADE3AA2ULL, 0xD6AF532E3F626EA3ULL } }, /* XSUM_XXH128_testdata[8848] */\n    { 2949, 0x9E3779B185EBCA8DULL, { 0x4F833CECC66FAA63ULL, 0xC98328BF9A1FC0B3ULL } }, /* XSUM_XXH128_testdata[8849] */\n    { 2950, 0x0000000000000000ULL, { 0x006F8F1E8F0251C4ULL, 0x84BEF9D2A6AD90A6ULL } }, /* XSUM_XXH128_testdata[8850] */\n    { 2950, 0x000000009E3779B1ULL, { 0x420C4AFA47D3E37FULL, 0x67EDFDF9C87F76FBULL } }, /* XSUM_XXH128_testdata[8851] */\n    { 2950, 0x9E3779B185EBCA8DULL, { 0xFC6994E9E8C5B2C5ULL, 0x10BBC2D9426F78FFULL } }, /* XSUM_XXH128_testdata[8852] */\n    { 2951, 0x0000000000000000ULL, { 0xEFA253902662DB87ULL, 0xAD8CEAFAA22C8033ULL } }, /* XSUM_XXH128_testdata[8853] */\n    { 2951, 0x000000009E3779B1ULL, { 0x57091E64CFE42BE9ULL, 0xB35246FD51DE0EE9ULL } }, /* XSUM_XXH128_testdata[8854] */\n    { 2951, 0x9E3779B185EBCA8DULL, { 0x7A570CD29CD1E2B7ULL, 0x95ACC957B28DBC51ULL } }, /* XSUM_XXH128_testdata[8855] */\n    { 2952, 0x0000000000000000ULL, { 0xEBB014405B806812ULL, 0x8F6ACEC5086A16E5ULL } }, /* XSUM_XXH128_testdata[8856] */\n    { 2952, 0x000000009E3779B1ULL, { 0x75786ACEBA2FAA23ULL, 0xDB65EC8E574FF257ULL } }, /* XSUM_XXH128_testdata[8857] */\n    { 2952, 0x9E3779B185EBCA8DULL, { 0x3B46BBCAB608B2CAULL, 0x84C0C7F69805F0BEULL } }, /* XSUM_XXH128_testdata[8858] */\n    { 2953, 0x0000000000000000ULL, { 0x3B9A4BFF10FF6AE6ULL, 0x42583612205545B9ULL } }, /* XSUM_XXH128_testdata[8859] */\n    { 2953, 0x000000009E3779B1ULL, { 0x13649CF8734B129EULL, 0xCA43C2C2BD91B0CBULL } }, /* XSUM_XXH128_testdata[8860] */\n    { 2953, 0x9E3779B185EBCA8DULL, { 0x72004CE62504F78DULL, 0x514263351CC45E39ULL } }, /* XSUM_XXH128_testdata[8861] */\n    { 2954, 0x0000000000000000ULL, { 0x48ADBED331F6F056ULL, 0xED772561661D60E3ULL } }, /* XSUM_XXH128_testdata[8862] */\n    { 2954, 0x000000009E3779B1ULL, { 0xC84474EE6A491B7EULL, 0xEF0FBB8FDC545DFCULL } }, /* XSUM_XXH128_testdata[8863] */\n    { 2954, 0x9E3779B185EBCA8DULL, { 0x289BB372AA8BC4ABULL, 0x881C923CFF9A10E3ULL } }, /* XSUM_XXH128_testdata[8864] */\n    { 2955, 0x0000000000000000ULL, { 0xABE41E353F27CDD6ULL, 0xDA1A26670937393DULL } }, /* XSUM_XXH128_testdata[8865] */\n    { 2955, 0x000000009E3779B1ULL, { 0x949E0F0B43C31EE0ULL, 0x469B2914FEB0EC7CULL } }, /* XSUM_XXH128_testdata[8866] */\n    { 2955, 0x9E3779B185EBCA8DULL, { 0x7B96FF58A34CCC40ULL, 0x90A0FD4A681A8FA8ULL } }, /* XSUM_XXH128_testdata[8867] */\n    { 2956, 0x0000000000000000ULL, { 0xB3C1032D86F85248ULL, 0x85915476E356DD08ULL } }, /* XSUM_XXH128_testdata[8868] */\n    { 2956, 0x000000009E3779B1ULL, { 0x0C974E1DCADA6F1BULL, 0xAE67F06FDFD95ED3ULL } }, /* XSUM_XXH128_testdata[8869] */\n    { 2956, 0x9E3779B185EBCA8DULL, { 0x37AA261ABE5D9178ULL, 0x5B8251A16F149225ULL } }, /* XSUM_XXH128_testdata[8870] */\n    { 2957, 0x0000000000000000ULL, { 0xF54E143C8A968519ULL, 0x79FE0CB5ABF28241ULL } }, /* XSUM_XXH128_testdata[8871] */\n    { 2957, 0x000000009E3779B1ULL, { 0xD37D0019F81B1584ULL, 0x9BF701D5323BB6C3ULL } }, /* XSUM_XXH128_testdata[8872] */\n    { 2957, 0x9E3779B185EBCA8DULL, { 0xC280CA2CF4268637ULL, 0xD0B51E68D85464F7ULL } }, /* XSUM_XXH128_testdata[8873] */\n    { 2958, 0x0000000000000000ULL, { 0x06E07E5DCFB1E33CULL, 0xEA3977C1EAC4A0D4ULL } }, /* XSUM_XXH128_testdata[8874] */\n    { 2958, 0x000000009E3779B1ULL, { 0x1465CF368037B5C3ULL, 0xCEFBA526E983DD1FULL } }, /* XSUM_XXH128_testdata[8875] */\n    { 2958, 0x9E3779B185EBCA8DULL, { 0xB3A571D5054CA644ULL, 0x0DA61A858BC8579AULL } }, /* XSUM_XXH128_testdata[8876] */\n    { 2959, 0x0000000000000000ULL, { 0x6F5CA95AC200CD6CULL, 0x2751164D51C9EEA9ULL } }, /* XSUM_XXH128_testdata[8877] */\n    { 2959, 0x000000009E3779B1ULL, { 0x60DBE34A6E32C1DAULL, 0x0A1A483CABFD9D61ULL } }, /* XSUM_XXH128_testdata[8878] */\n    { 2959, 0x9E3779B185EBCA8DULL, { 0x69A0F7A810B65584ULL, 0x9461A3A461A81E2CULL } }, /* XSUM_XXH128_testdata[8879] */\n    { 2960, 0x0000000000000000ULL, { 0x43FD02C0E22DA2DFULL, 0x53980F4DA6583395ULL } }, /* XSUM_XXH128_testdata[8880] */\n    { 2960, 0x000000009E3779B1ULL, { 0xC95BFA533943182CULL, 0x71D1AEDCAEBB12E1ULL } }, /* XSUM_XXH128_testdata[8881] */\n    { 2960, 0x9E3779B185EBCA8DULL, { 0x7CAB8C4CC74C30C8ULL, 0x1B50385C82548D72ULL } }, /* XSUM_XXH128_testdata[8882] */\n    { 2961, 0x0000000000000000ULL, { 0x1F227D712B0174FFULL, 0x6A762F526E165072ULL } }, /* XSUM_XXH128_testdata[8883] */\n    { 2961, 0x000000009E3779B1ULL, { 0x0C9C814DD97E0275ULL, 0x34EF4987C682275CULL } }, /* XSUM_XXH128_testdata[8884] */\n    { 2961, 0x9E3779B185EBCA8DULL, { 0xD9073AE57337F53CULL, 0x43EE37C238F8293DULL } }, /* XSUM_XXH128_testdata[8885] */\n    { 2962, 0x0000000000000000ULL, { 0xE258AC71EA94A519ULL, 0x76765129329AC492ULL } }, /* XSUM_XXH128_testdata[8886] */\n    { 2962, 0x000000009E3779B1ULL, { 0xA277FD166820B884ULL, 0xE465892EFEF2609AULL } }, /* XSUM_XXH128_testdata[8887] */\n    { 2962, 0x9E3779B185EBCA8DULL, { 0x4B29A6C7737461E0ULL, 0x76741A70728295B2ULL } }, /* XSUM_XXH128_testdata[8888] */\n    { 2963, 0x0000000000000000ULL, { 0x73821F123EAA5BCDULL, 0xEE3CC7E6F97B5A89ULL } }, /* XSUM_XXH128_testdata[8889] */\n    { 2963, 0x000000009E3779B1ULL, { 0xC3206D79CA0A02F2ULL, 0x50D4EA4B2E2B823EULL } }, /* XSUM_XXH128_testdata[8890] */\n    { 2963, 0x9E3779B185EBCA8DULL, { 0xC216558938EF5BA1ULL, 0x1934F86B35982BCDULL } }, /* XSUM_XXH128_testdata[8891] */\n    { 2964, 0x0000000000000000ULL, { 0xB8670BFE99897050ULL, 0x7349CF46A74019D7ULL } }, /* XSUM_XXH128_testdata[8892] */\n    { 2964, 0x000000009E3779B1ULL, { 0xF2083DB92E490258ULL, 0x4D0759AB7BD70A16ULL } }, /* XSUM_XXH128_testdata[8893] */\n    { 2964, 0x9E3779B185EBCA8DULL, { 0x4B2339A54EF3C147ULL, 0xC5470090467F78ACULL } }, /* XSUM_XXH128_testdata[8894] */\n    { 2965, 0x0000000000000000ULL, { 0x350AEDE785B8945FULL, 0xC8CB48A3D102EE4AULL } }, /* XSUM_XXH128_testdata[8895] */\n    { 2965, 0x000000009E3779B1ULL, { 0x91950C3E8B7C9375ULL, 0x8E8BD6B09B677B44ULL } }, /* XSUM_XXH128_testdata[8896] */\n    { 2965, 0x9E3779B185EBCA8DULL, { 0xD77179604E547276ULL, 0x786E76FFB3654870ULL } }, /* XSUM_XXH128_testdata[8897] */\n    { 2966, 0x0000000000000000ULL, { 0x01E9D910AA7B1E8AULL, 0x264ADF90B52588D3ULL } }, /* XSUM_XXH128_testdata[8898] */\n    { 2966, 0x000000009E3779B1ULL, { 0x1F4F3DA30A86D17EULL, 0x8C7B59B4368F4F49ULL } }, /* XSUM_XXH128_testdata[8899] */\n    { 2966, 0x9E3779B185EBCA8DULL, { 0xB9F2F7F6A64C5F94ULL, 0xC005296544FC8CC2ULL } }, /* XSUM_XXH128_testdata[8900] */\n    { 2967, 0x0000000000000000ULL, { 0x5F4FF3856B78A4FEULL, 0xBDC7F78968969392ULL } }, /* XSUM_XXH128_testdata[8901] */\n    { 2967, 0x000000009E3779B1ULL, { 0xE36E9E17E4AFF1A8ULL, 0xACB1165581FE1CBCULL } }, /* XSUM_XXH128_testdata[8902] */\n    { 2967, 0x9E3779B185EBCA8DULL, { 0x71C8AD9C2F67484EULL, 0xE34C76ED6333D978ULL } }, /* XSUM_XXH128_testdata[8903] */\n    { 2968, 0x0000000000000000ULL, { 0x10A3909BD2B6FED3ULL, 0x5A61F83C570F30D9ULL } }, /* XSUM_XXH128_testdata[8904] */\n    { 2968, 0x000000009E3779B1ULL, { 0xD39131E46B414D8CULL, 0x3385A383926259FAULL } }, /* XSUM_XXH128_testdata[8905] */\n    { 2968, 0x9E3779B185EBCA8DULL, { 0x19B33D48681B4F8CULL, 0xAC621B9C5B9A20B7ULL } }, /* XSUM_XXH128_testdata[8906] */\n    { 2969, 0x0000000000000000ULL, { 0x891109FF2CD1F81AULL, 0x3946BC77081E4170ULL } }, /* XSUM_XXH128_testdata[8907] */\n    { 2969, 0x000000009E3779B1ULL, { 0x9F4AA17352660082ULL, 0x5E1B536E51323153ULL } }, /* XSUM_XXH128_testdata[8908] */\n    { 2969, 0x9E3779B185EBCA8DULL, { 0xAE5019A2ECCAC731ULL, 0xD8E5955B4D952636ULL } }, /* XSUM_XXH128_testdata[8909] */\n    { 2970, 0x0000000000000000ULL, { 0x773DC838314988EEULL, 0xD6EA56331C7A8924ULL } }, /* XSUM_XXH128_testdata[8910] */\n    { 2970, 0x000000009E3779B1ULL, { 0xF8A0D156356CEF2FULL, 0x2F15A1D1F2CF97AFULL } }, /* XSUM_XXH128_testdata[8911] */\n    { 2970, 0x9E3779B185EBCA8DULL, { 0xAB15925E641C6538ULL, 0xF24031E3A42ED2CEULL } }, /* XSUM_XXH128_testdata[8912] */\n    { 2971, 0x0000000000000000ULL, { 0x55F595FDC543E155ULL, 0x259742EB2279D178ULL } }, /* XSUM_XXH128_testdata[8913] */\n    { 2971, 0x000000009E3779B1ULL, { 0x2F27F7AF1ACD955AULL, 0x0E16E4EE0ECF2164ULL } }, /* XSUM_XXH128_testdata[8914] */\n    { 2971, 0x9E3779B185EBCA8DULL, { 0x02C8C5C1900C7F1DULL, 0x077D86681C0602F7ULL } }, /* XSUM_XXH128_testdata[8915] */\n    { 2972, 0x0000000000000000ULL, { 0x10738BBD06F66724ULL, 0xC688F60F6BACC7A3ULL } }, /* XSUM_XXH128_testdata[8916] */\n    { 2972, 0x000000009E3779B1ULL, { 0xD08BC2B5A539530EULL, 0xEF0D3C1E9A60EDDAULL } }, /* XSUM_XXH128_testdata[8917] */\n    { 2972, 0x9E3779B185EBCA8DULL, { 0x35B3371D7EB05CC4ULL, 0xFFE5070CE95B2541ULL } }, /* XSUM_XXH128_testdata[8918] */\n    { 2973, 0x0000000000000000ULL, { 0x4B7A87BA2A49557FULL, 0xE61AC5BB68C70F70ULL } }, /* XSUM_XXH128_testdata[8919] */\n    { 2973, 0x000000009E3779B1ULL, { 0xF631E73109150903ULL, 0x4D25C84D594B3C42ULL } }, /* XSUM_XXH128_testdata[8920] */\n    { 2973, 0x9E3779B185EBCA8DULL, { 0xE27FF33B45CC8234ULL, 0x48E185EA0BA85D19ULL } }, /* XSUM_XXH128_testdata[8921] */\n    { 2974, 0x0000000000000000ULL, { 0xAC6BDA0C97618B0CULL, 0x922AFA879B1A5E66ULL } }, /* XSUM_XXH128_testdata[8922] */\n    { 2974, 0x000000009E3779B1ULL, { 0xC981679107D8A746ULL, 0xA4556A83E9BBCA82ULL } }, /* XSUM_XXH128_testdata[8923] */\n    { 2974, 0x9E3779B185EBCA8DULL, { 0xA1366887D230130DULL, 0x6188D626001ADCD9ULL } }, /* XSUM_XXH128_testdata[8924] */\n    { 2975, 0x0000000000000000ULL, { 0xB04EF32B4BE0890DULL, 0xCFEF4C33B6702BB9ULL } }, /* XSUM_XXH128_testdata[8925] */\n    { 2975, 0x000000009E3779B1ULL, { 0xAC760D27933D741EULL, 0x07CFAC84E0481EA6ULL } }, /* XSUM_XXH128_testdata[8926] */\n    { 2975, 0x9E3779B185EBCA8DULL, { 0xBAEFD0D4E7EA0EBFULL, 0xA24AB377D6C1E8CFULL } }, /* XSUM_XXH128_testdata[8927] */\n    { 2976, 0x0000000000000000ULL, { 0xFA45F5F6DD5D8913ULL, 0x1F51794290552D63ULL } }, /* XSUM_XXH128_testdata[8928] */\n    { 2976, 0x000000009E3779B1ULL, { 0xAC92D73D85A3D61CULL, 0xB106D2A26B0AB26DULL } }, /* XSUM_XXH128_testdata[8929] */\n    { 2976, 0x9E3779B185EBCA8DULL, { 0xA58C343D872636C5ULL, 0xB7CEB9240D8CD05AULL } }, /* XSUM_XXH128_testdata[8930] */\n    { 2977, 0x0000000000000000ULL, { 0x3DF4C00C299B3601ULL, 0x5E46526FE341E175ULL } }, /* XSUM_XXH128_testdata[8931] */\n    { 2977, 0x000000009E3779B1ULL, { 0xCF25120BAD2E8898ULL, 0x75385DE832B82D74ULL } }, /* XSUM_XXH128_testdata[8932] */\n    { 2977, 0x9E3779B185EBCA8DULL, { 0x0D6370493E3E3961ULL, 0xCE849683FE162397ULL } }, /* XSUM_XXH128_testdata[8933] */\n    { 2978, 0x0000000000000000ULL, { 0x973ED2696A9742C9ULL, 0x1D8D9D65C5CAFB6DULL } }, /* XSUM_XXH128_testdata[8934] */\n    { 2978, 0x000000009E3779B1ULL, { 0x1C6B6D28BCFB8108ULL, 0xF3AA8E1350134C33ULL } }, /* XSUM_XXH128_testdata[8935] */\n    { 2978, 0x9E3779B185EBCA8DULL, { 0xDD813B4FC767EB80ULL, 0x08803BD50ACC08A6ULL } }, /* XSUM_XXH128_testdata[8936] */\n    { 2979, 0x0000000000000000ULL, { 0xDDDB9B2A22EF8D7FULL, 0x6E890C7925242C1FULL } }, /* XSUM_XXH128_testdata[8937] */\n    { 2979, 0x000000009E3779B1ULL, { 0xD25F193B6D5BA1C7ULL, 0x0F3F34DD41CCD375ULL } }, /* XSUM_XXH128_testdata[8938] */\n    { 2979, 0x9E3779B185EBCA8DULL, { 0xA025A99A14FD30A9ULL, 0xEF8405452B6DB6EAULL } }, /* XSUM_XXH128_testdata[8939] */\n    { 2980, 0x0000000000000000ULL, { 0x3E90C1E8E2F00671ULL, 0x5D035B6AC8408DB5ULL } }, /* XSUM_XXH128_testdata[8940] */\n    { 2980, 0x000000009E3779B1ULL, { 0x5CB809134FDD0920ULL, 0xEA7F0928278167C3ULL } }, /* XSUM_XXH128_testdata[8941] */\n    { 2980, 0x9E3779B185EBCA8DULL, { 0x9357B6B8987937EFULL, 0x4EB3CA943810CD72ULL } }, /* XSUM_XXH128_testdata[8942] */\n    { 2981, 0x0000000000000000ULL, { 0x0DF4B30E83CDFAADULL, 0x283C32BB3607A6DDULL } }, /* XSUM_XXH128_testdata[8943] */\n    { 2981, 0x000000009E3779B1ULL, { 0xA5A4BB3B6FE19562ULL, 0x03185141C2442800ULL } }, /* XSUM_XXH128_testdata[8944] */\n    { 2981, 0x9E3779B185EBCA8DULL, { 0x354FA2D2070B8EBFULL, 0x569D77010294B95DULL } }, /* XSUM_XXH128_testdata[8945] */\n    { 2982, 0x0000000000000000ULL, { 0xCD64CC85D330BB10ULL, 0x7578EEF20815C16FULL } }, /* XSUM_XXH128_testdata[8946] */\n    { 2982, 0x000000009E3779B1ULL, { 0x12410F91EE55429FULL, 0x80092DFC3F1CFCA6ULL } }, /* XSUM_XXH128_testdata[8947] */\n    { 2982, 0x9E3779B185EBCA8DULL, { 0x76120161E0167446ULL, 0x958EC43C1D08E574ULL } }, /* XSUM_XXH128_testdata[8948] */\n    { 2983, 0x0000000000000000ULL, { 0xE6442ADA820FDED9ULL, 0xA2168F1589150701ULL } }, /* XSUM_XXH128_testdata[8949] */\n    { 2983, 0x000000009E3779B1ULL, { 0x05910F11A629C2EAULL, 0x302F39E6BFC92794ULL } }, /* XSUM_XXH128_testdata[8950] */\n    { 2983, 0x9E3779B185EBCA8DULL, { 0x4A1A16B2DF9813EEULL, 0x8755F1C66AFA7DC9ULL } }, /* XSUM_XXH128_testdata[8951] */\n    { 2984, 0x0000000000000000ULL, { 0x1F1F8D1837A6E627ULL, 0xAEA74F73BB1E6FB1ULL } }, /* XSUM_XXH128_testdata[8952] */\n    { 2984, 0x000000009E3779B1ULL, { 0xE00168A17930D386ULL, 0x879F43B8F2CDBE72ULL } }, /* XSUM_XXH128_testdata[8953] */\n    { 2984, 0x9E3779B185EBCA8DULL, { 0xF183248EF277F11FULL, 0x732B9B709D55DE29ULL } }, /* XSUM_XXH128_testdata[8954] */\n    { 2985, 0x0000000000000000ULL, { 0xA54E84B3E626BC14ULL, 0x666467238827F395ULL } }, /* XSUM_XXH128_testdata[8955] */\n    { 2985, 0x000000009E3779B1ULL, { 0x96E35EB2BA0D95BCULL, 0x154B11C331C1E13AULL } }, /* XSUM_XXH128_testdata[8956] */\n    { 2985, 0x9E3779B185EBCA8DULL, { 0x5E570299E42A17ADULL, 0x1BCB6CD11BFBE1F8ULL } }, /* XSUM_XXH128_testdata[8957] */\n    { 2986, 0x0000000000000000ULL, { 0x729FE02D49B315F5ULL, 0x8D4BA7335F711238ULL } }, /* XSUM_XXH128_testdata[8958] */\n    { 2986, 0x000000009E3779B1ULL, { 0x131270CD91F6854EULL, 0x564C77B094FFDD86ULL } }, /* XSUM_XXH128_testdata[8959] */\n    { 2986, 0x9E3779B185EBCA8DULL, { 0x78E1C8124E2B1FECULL, 0x6CF405217D465BE1ULL } }, /* XSUM_XXH128_testdata[8960] */\n    { 2987, 0x0000000000000000ULL, { 0x74FED483ED5A315AULL, 0x2D9197F92280C789ULL } }, /* XSUM_XXH128_testdata[8961] */\n    { 2987, 0x000000009E3779B1ULL, { 0xD6DC2B762314B7FFULL, 0x2B186CC65B66C349ULL } }, /* XSUM_XXH128_testdata[8962] */\n    { 2987, 0x9E3779B185EBCA8DULL, { 0x63780DA1AD3A7530ULL, 0x8F34BB97CB6C3CBCULL } }, /* XSUM_XXH128_testdata[8963] */\n    { 2988, 0x0000000000000000ULL, { 0x6EE24DA5C58D40EBULL, 0x88A0A83D9F5A0088ULL } }, /* XSUM_XXH128_testdata[8964] */\n    { 2988, 0x000000009E3779B1ULL, { 0x67EF4D1893CFFF51ULL, 0x9262DE4EF2365141ULL } }, /* XSUM_XXH128_testdata[8965] */\n    { 2988, 0x9E3779B185EBCA8DULL, { 0x53B4A2299704976FULL, 0x56836E85EAE1D1D1ULL } }, /* XSUM_XXH128_testdata[8966] */\n    { 2989, 0x0000000000000000ULL, { 0xDF9396E9CB33F25DULL, 0x455EB8288D5A5D4AULL } }, /* XSUM_XXH128_testdata[8967] */\n    { 2989, 0x000000009E3779B1ULL, { 0xBDE3B419F92920A5ULL, 0x9177274D94519B50ULL } }, /* XSUM_XXH128_testdata[8968] */\n    { 2989, 0x9E3779B185EBCA8DULL, { 0xBE9AB6ADD058F5E5ULL, 0xCFC21BC29D2021EFULL } }, /* XSUM_XXH128_testdata[8969] */\n    { 2990, 0x0000000000000000ULL, { 0x488A3DB0190C2AF7ULL, 0xC6C4B003D8868F2CULL } }, /* XSUM_XXH128_testdata[8970] */\n    { 2990, 0x000000009E3779B1ULL, { 0xF12E787A91DDE718ULL, 0xA2A1B4956425472AULL } }, /* XSUM_XXH128_testdata[8971] */\n    { 2990, 0x9E3779B185EBCA8DULL, { 0xE023AA8311308C98ULL, 0x4B520EEAD705DCC7ULL } }, /* XSUM_XXH128_testdata[8972] */\n    { 2991, 0x0000000000000000ULL, { 0xE88A7AE31E1B3C03ULL, 0x6E155FDA6A01704AULL } }, /* XSUM_XXH128_testdata[8973] */\n    { 2991, 0x000000009E3779B1ULL, { 0x7CECDD49003508CFULL, 0x9026B20B92C44EC0ULL } }, /* XSUM_XXH128_testdata[8974] */\n    { 2991, 0x9E3779B185EBCA8DULL, { 0x3AAE2857DD0842FDULL, 0x884D15DBBFC09C39ULL } }, /* XSUM_XXH128_testdata[8975] */\n    { 2992, 0x0000000000000000ULL, { 0xAAB44EC10D54893AULL, 0x59174147AF373FE1ULL } }, /* XSUM_XXH128_testdata[8976] */\n    { 2992, 0x000000009E3779B1ULL, { 0x7C01647526BD92EDULL, 0x7E858B8A6217B465ULL } }, /* XSUM_XXH128_testdata[8977] */\n    { 2992, 0x9E3779B185EBCA8DULL, { 0x70D3504445732DBCULL, 0x9E0B47F37987EDC5ULL } }, /* XSUM_XXH128_testdata[8978] */\n    { 2993, 0x0000000000000000ULL, { 0x0065EDB278F462B0ULL, 0x6D47A9C85229B2B1ULL } }, /* XSUM_XXH128_testdata[8979] */\n    { 2993, 0x000000009E3779B1ULL, { 0x0CC941CCCB77D877ULL, 0x91707319C28D3FB8ULL } }, /* XSUM_XXH128_testdata[8980] */\n    { 2993, 0x9E3779B185EBCA8DULL, { 0x7DB5A87970B6B6FDULL, 0xCA9756FD9BCE1F3EULL } }, /* XSUM_XXH128_testdata[8981] */\n    { 2994, 0x0000000000000000ULL, { 0x81D350FEF6FD05B7ULL, 0xB6F14BC588D7ECD2ULL } }, /* XSUM_XXH128_testdata[8982] */\n    { 2994, 0x000000009E3779B1ULL, { 0xE9E4C7CE1EB912ECULL, 0xED381C600B183F19ULL } }, /* XSUM_XXH128_testdata[8983] */\n    { 2994, 0x9E3779B185EBCA8DULL, { 0x7E59DF9453895B26ULL, 0x19CB8A8611181F81ULL } }, /* XSUM_XXH128_testdata[8984] */\n    { 2995, 0x0000000000000000ULL, { 0xBEB814BD7EFCDD21ULL, 0x59F3771701F5DE45ULL } }, /* XSUM_XXH128_testdata[8985] */\n    { 2995, 0x000000009E3779B1ULL, { 0x75D05C024BB1A7DCULL, 0x0D39107B9275298EULL } }, /* XSUM_XXH128_testdata[8986] */\n    { 2995, 0x9E3779B185EBCA8DULL, { 0x3872DF50F3B4D9A4ULL, 0x7A570F68B42EC57DULL } }, /* XSUM_XXH128_testdata[8987] */\n    { 2996, 0x0000000000000000ULL, { 0xA4E7165D54A94B2CULL, 0x9EF2DF69F49019A0ULL } }, /* XSUM_XXH128_testdata[8988] */\n    { 2996, 0x000000009E3779B1ULL, { 0x3D5BF677C73BB075ULL, 0x03DA27380F46A31FULL } }, /* XSUM_XXH128_testdata[8989] */\n    { 2996, 0x9E3779B185EBCA8DULL, { 0x83E8155E769985B4ULL, 0xFA48452217534166ULL } }, /* XSUM_XXH128_testdata[8990] */\n    { 2997, 0x0000000000000000ULL, { 0xF69CCD46A0C66AC5ULL, 0xADFD5283EC62E194ULL } }, /* XSUM_XXH128_testdata[8991] */\n    { 2997, 0x000000009E3779B1ULL, { 0xF920827A2611C096ULL, 0x1B48BFD42853303BULL } }, /* XSUM_XXH128_testdata[8992] */\n    { 2997, 0x9E3779B185EBCA8DULL, { 0x2152D5835CA1F62EULL, 0xFEAA8D2BE7DC5362ULL } }, /* XSUM_XXH128_testdata[8993] */\n    { 2998, 0x0000000000000000ULL, { 0x13D37A8060290967ULL, 0x2E71825EFB14AD1AULL } }, /* XSUM_XXH128_testdata[8994] */\n    { 2998, 0x000000009E3779B1ULL, { 0xE46464B714A9CB0AULL, 0xF37316A51355897CULL } }, /* XSUM_XXH128_testdata[8995] */\n    { 2998, 0x9E3779B185EBCA8DULL, { 0x00AA1AD532A9A220ULL, 0xED52723B97AB3698ULL } }, /* XSUM_XXH128_testdata[8996] */\n    { 2999, 0x0000000000000000ULL, { 0xFBF8E37174E7CBE0ULL, 0xB471CACDA4DA4BA2ULL } }, /* XSUM_XXH128_testdata[8997] */\n    { 2999, 0x000000009E3779B1ULL, { 0x2526BA7BC6EF2486ULL, 0xF0CB66537A2D4608ULL } }, /* XSUM_XXH128_testdata[8998] */\n    { 2999, 0x9E3779B185EBCA8DULL, { 0xD0A29ADBC80300A4ULL, 0x097785426BD15300ULL } }, /* XSUM_XXH128_testdata[8999] */\n    { 3000, 0x0000000000000000ULL, { 0x120A15F4CBD5A736ULL, 0x0CD29F36CCF9BDE6ULL } }, /* XSUM_XXH128_testdata[9000] */\n    { 3000, 0x000000009E3779B1ULL, { 0x487EF66883FB6F86ULL, 0x3D82CA54D0B2490FULL } }, /* XSUM_XXH128_testdata[9001] */\n    { 3000, 0x9E3779B185EBCA8DULL, { 0xB84AA460C0E807F1ULL, 0xFA6638ECFCB88254ULL } }, /* XSUM_XXH128_testdata[9002] */\n    { 3001, 0x0000000000000000ULL, { 0x7D9993DA4C537BC5ULL, 0x7B25FECED32E29C4ULL } }, /* XSUM_XXH128_testdata[9003] */\n    { 3001, 0x000000009E3779B1ULL, { 0x425DE1D33E8798F9ULL, 0x0DA582BE7EA6DA50ULL } }, /* XSUM_XXH128_testdata[9004] */\n    { 3001, 0x9E3779B185EBCA8DULL, { 0xDE2FB45CBA95F913ULL, 0x589D1F7322A037F7ULL } }, /* XSUM_XXH128_testdata[9005] */\n    { 3002, 0x0000000000000000ULL, { 0x54424A1161D69445ULL, 0xDEE9592939A54846ULL } }, /* XSUM_XXH128_testdata[9006] */\n    { 3002, 0x000000009E3779B1ULL, { 0x9DE47E01E702FC48ULL, 0xD6FEB517F9B7C672ULL } }, /* XSUM_XXH128_testdata[9007] */\n    { 3002, 0x9E3779B185EBCA8DULL, { 0x5F2D667FA1A2146CULL, 0xCB1C36279BFD21D0ULL } }, /* XSUM_XXH128_testdata[9008] */\n    { 3003, 0x0000000000000000ULL, { 0x9E513BFD6058A2A7ULL, 0x23A6EF6309F3AB03ULL } }, /* XSUM_XXH128_testdata[9009] */\n    { 3003, 0x000000009E3779B1ULL, { 0x624798EA1EAEDBC9ULL, 0xEBCBB8C8E39E6CEEULL } }, /* XSUM_XXH128_testdata[9010] */\n    { 3003, 0x9E3779B185EBCA8DULL, { 0xCBF5BADE7FCB38FEULL, 0x3A734BE477DCBCBDULL } }, /* XSUM_XXH128_testdata[9011] */\n    { 3004, 0x0000000000000000ULL, { 0x289460C19CE6733BULL, 0xF876D3B7AA77837BULL } }, /* XSUM_XXH128_testdata[9012] */\n    { 3004, 0x000000009E3779B1ULL, { 0xE57A4E9471050EA6ULL, 0x8C259CCDC86D4754ULL } }, /* XSUM_XXH128_testdata[9013] */\n    { 3004, 0x9E3779B185EBCA8DULL, { 0x1948A67656A4E2E2ULL, 0x293D8BB57642E06FULL } }, /* XSUM_XXH128_testdata[9014] */\n    { 3005, 0x0000000000000000ULL, { 0xB55D673EBCF611F6ULL, 0xDEF34A1F8879B620ULL } }, /* XSUM_XXH128_testdata[9015] */\n    { 3005, 0x000000009E3779B1ULL, { 0x3F424D168FC74438ULL, 0xC026A7B27520DBA9ULL } }, /* XSUM_XXH128_testdata[9016] */\n    { 3005, 0x9E3779B185EBCA8DULL, { 0xCE30C9FE31493EB3ULL, 0x89E7D425FC27D642ULL } }, /* XSUM_XXH128_testdata[9017] */\n    { 3006, 0x0000000000000000ULL, { 0x079CAF50E31D73B0ULL, 0x1527779B526D1351ULL } }, /* XSUM_XXH128_testdata[9018] */\n    { 3006, 0x000000009E3779B1ULL, { 0xBEC11E162D80EDB4ULL, 0x9ECCB6467BFEA343ULL } }, /* XSUM_XXH128_testdata[9019] */\n    { 3006, 0x9E3779B185EBCA8DULL, { 0x75638175D0ADD699ULL, 0x49FC2CED689D8D8DULL } }, /* XSUM_XXH128_testdata[9020] */\n    { 3007, 0x0000000000000000ULL, { 0x8D9A798A827FF464ULL, 0xFA88EE42A5A154DDULL } }, /* XSUM_XXH128_testdata[9021] */\n    { 3007, 0x000000009E3779B1ULL, { 0x959D1606732E04C9ULL, 0x1E8E5B7843D851B3ULL } }, /* XSUM_XXH128_testdata[9022] */\n    { 3007, 0x9E3779B185EBCA8DULL, { 0xDF0F7D428DB03369ULL, 0xFC92D4E58CF9EFECULL } }, /* XSUM_XXH128_testdata[9023] */\n    { 3008, 0x0000000000000000ULL, { 0x032A128E0003C6CCULL, 0xE57BA7944FCDB054ULL } }, /* XSUM_XXH128_testdata[9024] */\n    { 3008, 0x000000009E3779B1ULL, { 0x7A37E37A51007B4AULL, 0xD61F954D1CCEC81AULL } }, /* XSUM_XXH128_testdata[9025] */\n    { 3008, 0x9E3779B185EBCA8DULL, { 0x1B392BBB2F4F7265ULL, 0xDEA242B0725F2FB0ULL } }, /* XSUM_XXH128_testdata[9026] */\n    { 3009, 0x0000000000000000ULL, { 0x71B96ED13C84B7A6ULL, 0x593AB8BD32190FDBULL } }, /* XSUM_XXH128_testdata[9027] */\n    { 3009, 0x000000009E3779B1ULL, { 0x5C00FDD37D739C46ULL, 0xCC957A10D6327CFAULL } }, /* XSUM_XXH128_testdata[9028] */\n    { 3009, 0x9E3779B185EBCA8DULL, { 0x99198184E43578D1ULL, 0x86ABD768551497BEULL } }, /* XSUM_XXH128_testdata[9029] */\n    { 3010, 0x0000000000000000ULL, { 0x8BCAB6A425108497ULL, 0x0686F80D3FA41367ULL } }, /* XSUM_XXH128_testdata[9030] */\n    { 3010, 0x000000009E3779B1ULL, { 0x4B83E89DB2902719ULL, 0x7D78D4465315F024ULL } }, /* XSUM_XXH128_testdata[9031] */\n    { 3010, 0x9E3779B185EBCA8DULL, { 0xF23991A244685F08ULL, 0x92C25000B779E881ULL } }, /* XSUM_XXH128_testdata[9032] */\n    { 3011, 0x0000000000000000ULL, { 0x2A1C0F57BFC2D83AULL, 0x23427A4A1E9494A5ULL } }, /* XSUM_XXH128_testdata[9033] */\n    { 3011, 0x000000009E3779B1ULL, { 0xF50CF3401431990FULL, 0x893D23FC87633EBEULL } }, /* XSUM_XXH128_testdata[9034] */\n    { 3011, 0x9E3779B185EBCA8DULL, { 0x2C6F1F48D5EF740FULL, 0x25810DC1E79D6913ULL } }, /* XSUM_XXH128_testdata[9035] */\n    { 3012, 0x0000000000000000ULL, { 0x2727AE494F5A75FEULL, 0xF21E344608AF8AB4ULL } }, /* XSUM_XXH128_testdata[9036] */\n    { 3012, 0x000000009E3779B1ULL, { 0x0F093E11B457AE4DULL, 0x44216EC55D5DA6BFULL } }, /* XSUM_XXH128_testdata[9037] */\n    { 3012, 0x9E3779B185EBCA8DULL, { 0xC69CB787B7281DF4ULL, 0x00DE3B6728738338ULL } }, /* XSUM_XXH128_testdata[9038] */\n    { 3013, 0x0000000000000000ULL, { 0x4DE3E131E4BD2EDFULL, 0x2DB40FC4D047D0A4ULL } }, /* XSUM_XXH128_testdata[9039] */\n    { 3013, 0x000000009E3779B1ULL, { 0xDD8CF9B841ADE88DULL, 0xF351A66F103F7FFBULL } }, /* XSUM_XXH128_testdata[9040] */\n    { 3013, 0x9E3779B185EBCA8DULL, { 0x78AEA8833E396C88ULL, 0x0B3BF41CF08267CAULL } }, /* XSUM_XXH128_testdata[9041] */\n    { 3014, 0x0000000000000000ULL, { 0xDDE4CAEA2A781517ULL, 0xB1668DAE3B448E52ULL } }, /* XSUM_XXH128_testdata[9042] */\n    { 3014, 0x000000009E3779B1ULL, { 0x90BE61A34BD67858ULL, 0x21C8F0B3C615C8FCULL } }, /* XSUM_XXH128_testdata[9043] */\n    { 3014, 0x9E3779B185EBCA8DULL, { 0xC0A851C6413BD17CULL, 0x75564E7CF8EB3E9CULL } }, /* XSUM_XXH128_testdata[9044] */\n    { 3015, 0x0000000000000000ULL, { 0xF44B7A75661491C6ULL, 0x2FAB2E3D52C11D63ULL } }, /* XSUM_XXH128_testdata[9045] */\n    { 3015, 0x000000009E3779B1ULL, { 0x34FDA9C397DF08F9ULL, 0x092E747DDD44982FULL } }, /* XSUM_XXH128_testdata[9046] */\n    { 3015, 0x9E3779B185EBCA8DULL, { 0x6ADDF0491196D913ULL, 0x995A4D08FB12BB42ULL } }, /* XSUM_XXH128_testdata[9047] */\n    { 3016, 0x0000000000000000ULL, { 0x157BA455BB39FAB5ULL, 0x4243EA8CFA19FC75ULL } }, /* XSUM_XXH128_testdata[9048] */\n    { 3016, 0x000000009E3779B1ULL, { 0x62812314120511F9ULL, 0xA03D43D945493A33ULL } }, /* XSUM_XXH128_testdata[9049] */\n    { 3016, 0x9E3779B185EBCA8DULL, { 0xA211324DF0557420ULL, 0x710404AEA0E511E4ULL } }, /* XSUM_XXH128_testdata[9050] */\n    { 3017, 0x0000000000000000ULL, { 0x2F8C767875C1963BULL, 0xF6DF9B284FE61A41ULL } }, /* XSUM_XXH128_testdata[9051] */\n    { 3017, 0x000000009E3779B1ULL, { 0x07ED9ABB8ABFE8B9ULL, 0x0CF773D53A39E67DULL } }, /* XSUM_XXH128_testdata[9052] */\n    { 3017, 0x9E3779B185EBCA8DULL, { 0x32ED4EDDC3D0EBE9ULL, 0x69A673AA79BC0734ULL } }, /* XSUM_XXH128_testdata[9053] */\n    { 3018, 0x0000000000000000ULL, { 0x3D2AC11529277793ULL, 0xE75E7D6004CE6695ULL } }, /* XSUM_XXH128_testdata[9054] */\n    { 3018, 0x000000009E3779B1ULL, { 0x177F8FDB8779C86CULL, 0x3E1A5465173303AEULL } }, /* XSUM_XXH128_testdata[9055] */\n    { 3018, 0x9E3779B185EBCA8DULL, { 0xEFD99140F72AFA32ULL, 0x2206EB32897258DBULL } }, /* XSUM_XXH128_testdata[9056] */\n    { 3019, 0x0000000000000000ULL, { 0x0F92385982E5763EULL, 0xC49C847631A91987ULL } }, /* XSUM_XXH128_testdata[9057] */\n    { 3019, 0x000000009E3779B1ULL, { 0x00822263413D42E0ULL, 0xD6E8CDC544DF7677ULL } }, /* XSUM_XXH128_testdata[9058] */\n    { 3019, 0x9E3779B185EBCA8DULL, { 0xAA9CAC946BCFD58AULL, 0x4820B0D14382B4CEULL } }, /* XSUM_XXH128_testdata[9059] */\n    { 3020, 0x0000000000000000ULL, { 0xFFCD172FC10CC01EULL, 0x0A0A4E0145B11AAFULL } }, /* XSUM_XXH128_testdata[9060] */\n    { 3020, 0x000000009E3779B1ULL, { 0x62441AB068655C66ULL, 0x7C8EF0A97A264C7BULL } }, /* XSUM_XXH128_testdata[9061] */\n    { 3020, 0x9E3779B185EBCA8DULL, { 0x72BE9E8C15D00463ULL, 0x6A2193C845E036DEULL } }, /* XSUM_XXH128_testdata[9062] */\n    { 3021, 0x0000000000000000ULL, { 0xED5D86E0B3185A9CULL, 0xBDD761F5BC548A42ULL } }, /* XSUM_XXH128_testdata[9063] */\n    { 3021, 0x000000009E3779B1ULL, { 0x4B5CB603F365B02DULL, 0x8C58CC12B7FE9515ULL } }, /* XSUM_XXH128_testdata[9064] */\n    { 3021, 0x9E3779B185EBCA8DULL, { 0xFFF71150D904ADA0ULL, 0x3F5BC0C4131ED292ULL } }, /* XSUM_XXH128_testdata[9065] */\n    { 3022, 0x0000000000000000ULL, { 0x7C4A57D1E819ECC0ULL, 0x011EF89A5595950EULL } }, /* XSUM_XXH128_testdata[9066] */\n    { 3022, 0x000000009E3779B1ULL, { 0x1559E8A4CAF73014ULL, 0x297817120EC4F0E3ULL } }, /* XSUM_XXH128_testdata[9067] */\n    { 3022, 0x9E3779B185EBCA8DULL, { 0xAA982C793CF4FE2CULL, 0xF864DDD3BD6FD471ULL } }, /* XSUM_XXH128_testdata[9068] */\n    { 3023, 0x0000000000000000ULL, { 0x2604439004011CAAULL, 0x6401EB9641726191ULL } }, /* XSUM_XXH128_testdata[9069] */\n    { 3023, 0x000000009E3779B1ULL, { 0xF38FB731D51730BCULL, 0x3B283D1BBFFE6CCBULL } }, /* XSUM_XXH128_testdata[9070] */\n    { 3023, 0x9E3779B185EBCA8DULL, { 0x6F49B7EA4BD6066EULL, 0xE6C9B22E6A9FD98CULL } }, /* XSUM_XXH128_testdata[9071] */\n    { 3024, 0x0000000000000000ULL, { 0x4BEF54052BE525D0ULL, 0xAE56699CB6622532ULL } }, /* XSUM_XXH128_testdata[9072] */\n    { 3024, 0x000000009E3779B1ULL, { 0x6991E1C912DF7258ULL, 0xB07B673C78C1C805ULL } }, /* XSUM_XXH128_testdata[9073] */\n    { 3024, 0x9E3779B185EBCA8DULL, { 0x2811E539BB44335EULL, 0xE0C9A105F3359751ULL } }, /* XSUM_XXH128_testdata[9074] */\n    { 3025, 0x0000000000000000ULL, { 0xB8B5D14615D49784ULL, 0xDF846FCAE970BFB6ULL } }, /* XSUM_XXH128_testdata[9075] */\n    { 3025, 0x000000009E3779B1ULL, { 0x500E2AEFE3999C2DULL, 0x004D5866EA1F75FBULL } }, /* XSUM_XXH128_testdata[9076] */\n    { 3025, 0x9E3779B185EBCA8DULL, { 0xF6683BCA789C6AB6ULL, 0x36F376752C66110AULL } }, /* XSUM_XXH128_testdata[9077] */\n    { 3026, 0x0000000000000000ULL, { 0xE5ED2E4BC25ED4FEULL, 0x56403B6B865D98B6ULL } }, /* XSUM_XXH128_testdata[9078] */\n    { 3026, 0x000000009E3779B1ULL, { 0x08143B3BD68BDE3DULL, 0x9E40C0764BE22664ULL } }, /* XSUM_XXH128_testdata[9079] */\n    { 3026, 0x9E3779B185EBCA8DULL, { 0x746B882F7D2B6584ULL, 0x726CBE0B443B32C4ULL } }, /* XSUM_XXH128_testdata[9080] */\n    { 3027, 0x0000000000000000ULL, { 0x494D8A012B18DEA3ULL, 0x9C08AA2E662DB1F8ULL } }, /* XSUM_XXH128_testdata[9081] */\n    { 3027, 0x000000009E3779B1ULL, { 0xFF640C41873A96B1ULL, 0x5FCBDF68ACD45317ULL } }, /* XSUM_XXH128_testdata[9082] */\n    { 3027, 0x9E3779B185EBCA8DULL, { 0xD6C2BF6089B48362ULL, 0xD558868260BDE57BULL } }, /* XSUM_XXH128_testdata[9083] */\n    { 3028, 0x0000000000000000ULL, { 0xE4FAB24810CF98EEULL, 0xE3A6B5B4A396A847ULL } }, /* XSUM_XXH128_testdata[9084] */\n    { 3028, 0x000000009E3779B1ULL, { 0x9D731AB38C4A49D3ULL, 0x814C164A3EA73D24ULL } }, /* XSUM_XXH128_testdata[9085] */\n    { 3028, 0x9E3779B185EBCA8DULL, { 0xB3D503EF09864DCAULL, 0xD0D7D666017F0136ULL } }, /* XSUM_XXH128_testdata[9086] */\n    { 3029, 0x0000000000000000ULL, { 0xFF05BDA59C8692F7ULL, 0x2666A75EE8F6E1FFULL } }, /* XSUM_XXH128_testdata[9087] */\n    { 3029, 0x000000009E3779B1ULL, { 0x18C663D535BDF6ACULL, 0xDE85C3E4980CBAC6ULL } }, /* XSUM_XXH128_testdata[9088] */\n    { 3029, 0x9E3779B185EBCA8DULL, { 0x5A169FD2CB2E3912ULL, 0x799273B3B7EED0BEULL } }, /* XSUM_XXH128_testdata[9089] */\n    { 3030, 0x0000000000000000ULL, { 0xD74E824D71198E1BULL, 0x6CB3D837CF5C977DULL } }, /* XSUM_XXH128_testdata[9090] */\n    { 3030, 0x000000009E3779B1ULL, { 0xE2F9B0ABF26918B5ULL, 0x75665B5CFAEDABB3ULL } }, /* XSUM_XXH128_testdata[9091] */\n    { 3030, 0x9E3779B185EBCA8DULL, { 0xE0B0FC1E68033657ULL, 0x6EB84B6488D1A0BCULL } }, /* XSUM_XXH128_testdata[9092] */\n    { 3031, 0x0000000000000000ULL, { 0x52BC157813CA28FDULL, 0x3EB0BDF8AE3E861FULL } }, /* XSUM_XXH128_testdata[9093] */\n    { 3031, 0x000000009E3779B1ULL, { 0xDA627C3927203559ULL, 0xC09504CD31CDE827ULL } }, /* XSUM_XXH128_testdata[9094] */\n    { 3031, 0x9E3779B185EBCA8DULL, { 0xC2C8C146172EF2B6ULL, 0xEDDE09BD85754A7AULL } }, /* XSUM_XXH128_testdata[9095] */\n    { 3032, 0x0000000000000000ULL, { 0x0192F4C36C19F541ULL, 0x0B75A31A0F740C1BULL } }, /* XSUM_XXH128_testdata[9096] */\n    { 3032, 0x000000009E3779B1ULL, { 0xFC951E6B7C8ADC67ULL, 0x0A73991A340509CFULL } }, /* XSUM_XXH128_testdata[9097] */\n    { 3032, 0x9E3779B185EBCA8DULL, { 0xB8680C299F8C2670ULL, 0xBF66B4ED5C161C86ULL } }, /* XSUM_XXH128_testdata[9098] */\n    { 3033, 0x0000000000000000ULL, { 0xC1118A662B3E5381ULL, 0xFC8CF7015A3B0E0AULL } }, /* XSUM_XXH128_testdata[9099] */\n    { 3033, 0x000000009E3779B1ULL, { 0x230924DDE91D9C43ULL, 0x02BE57D05CBF8B4CULL } }, /* XSUM_XXH128_testdata[9100] */\n    { 3033, 0x9E3779B185EBCA8DULL, { 0x2617D6300D8B98AFULL, 0x826A4EF014C25833ULL } }, /* XSUM_XXH128_testdata[9101] */\n    { 3034, 0x0000000000000000ULL, { 0xC612DDA77A2B6739ULL, 0x46BE8BCFDB8CF057ULL } }, /* XSUM_XXH128_testdata[9102] */\n    { 3034, 0x000000009E3779B1ULL, { 0xDC3DFD26AB69EA82ULL, 0x55C6D50AC28FA603ULL } }, /* XSUM_XXH128_testdata[9103] */\n    { 3034, 0x9E3779B185EBCA8DULL, { 0xFF054E6A928BAE7FULL, 0x6EF608A0B50FF4D7ULL } }, /* XSUM_XXH128_testdata[9104] */\n    { 3035, 0x0000000000000000ULL, { 0x891E8F4349525A0EULL, 0xBBEF8A557197D704ULL } }, /* XSUM_XXH128_testdata[9105] */\n    { 3035, 0x000000009E3779B1ULL, { 0xE7AE6E549FF9C0FDULL, 0x1E5669584AD4F747ULL } }, /* XSUM_XXH128_testdata[9106] */\n    { 3035, 0x9E3779B185EBCA8DULL, { 0x2DDEE65737D657A8ULL, 0x25D6A2172F6F640BULL } }, /* XSUM_XXH128_testdata[9107] */\n    { 3036, 0x0000000000000000ULL, { 0x52F254763AE93985ULL, 0xA02F714A54A62C8AULL } }, /* XSUM_XXH128_testdata[9108] */\n    { 3036, 0x000000009E3779B1ULL, { 0x0D8C6EA9AB1D4FADULL, 0xF83A5D671E813EAAULL } }, /* XSUM_XXH128_testdata[9109] */\n    { 3036, 0x9E3779B185EBCA8DULL, { 0x448708C1C3DE9CFBULL, 0x30E5E77D8B9D5E23ULL } }, /* XSUM_XXH128_testdata[9110] */\n    { 3037, 0x0000000000000000ULL, { 0xC0FD98CDAF535969ULL, 0xB7BAF7EC51B17646ULL } }, /* XSUM_XXH128_testdata[9111] */\n    { 3037, 0x000000009E3779B1ULL, { 0x67BBF55BE5650C5EULL, 0x49A94C50132EE1FAULL } }, /* XSUM_XXH128_testdata[9112] */\n    { 3037, 0x9E3779B185EBCA8DULL, { 0x0084DA76277128B6ULL, 0x01A2F15CDC0200B0ULL } }, /* XSUM_XXH128_testdata[9113] */\n    { 3038, 0x0000000000000000ULL, { 0xB4858BA14CC418E2ULL, 0xAABBD49BF5116B84ULL } }, /* XSUM_XXH128_testdata[9114] */\n    { 3038, 0x000000009E3779B1ULL, { 0xC2C9A9DD4BEE0F4EULL, 0x1B7EA5BBA5B3D060ULL } }, /* XSUM_XXH128_testdata[9115] */\n    { 3038, 0x9E3779B185EBCA8DULL, { 0x522D3572219112D7ULL, 0x0531F55A6C434947ULL } }, /* XSUM_XXH128_testdata[9116] */\n    { 3039, 0x0000000000000000ULL, { 0x1569F693B70669F0ULL, 0x4F7C4F91DFB79FAAULL } }, /* XSUM_XXH128_testdata[9117] */\n    { 3039, 0x000000009E3779B1ULL, { 0x5F8D0A88F5E3248CULL, 0x6ACE299004DE693CULL } }, /* XSUM_XXH128_testdata[9118] */\n    { 3039, 0x9E3779B185EBCA8DULL, { 0x60C5FD7C6FECE230ULL, 0x3FF411A2E43417B3ULL } }, /* XSUM_XXH128_testdata[9119] */\n    { 3040, 0x0000000000000000ULL, { 0x7FC80D9A5EFCC67DULL, 0x45C0AA0DCADDCC1CULL } }, /* XSUM_XXH128_testdata[9120] */\n    { 3040, 0x000000009E3779B1ULL, { 0xBD6140A3D12469CCULL, 0x905AB40E82904668ULL } }, /* XSUM_XXH128_testdata[9121] */\n    { 3040, 0x9E3779B185EBCA8DULL, { 0x9AB4B05D244B7B00ULL, 0x94649F3B3497F937ULL } }, /* XSUM_XXH128_testdata[9122] */\n    { 3041, 0x0000000000000000ULL, { 0x53E111516A359F39ULL, 0x1D932490BD549B79ULL } }, /* XSUM_XXH128_testdata[9123] */\n    { 3041, 0x000000009E3779B1ULL, { 0x6EB091C15BDB7E3BULL, 0xFB6F413093D89FE9ULL } }, /* XSUM_XXH128_testdata[9124] */\n    { 3041, 0x9E3779B185EBCA8DULL, { 0x0A7FDF4A5152F876ULL, 0x5491527C31D86871ULL } }, /* XSUM_XXH128_testdata[9125] */\n    { 3042, 0x0000000000000000ULL, { 0xE10FAA1FF256B134ULL, 0x097BBA719BA65DA8ULL } }, /* XSUM_XXH128_testdata[9126] */\n    { 3042, 0x000000009E3779B1ULL, { 0x2F2CF9191AB058E9ULL, 0x8B90934843C26BC6ULL } }, /* XSUM_XXH128_testdata[9127] */\n    { 3042, 0x9E3779B185EBCA8DULL, { 0x4685F5F0714BF906ULL, 0x9ADEE058830BAE4AULL } }, /* XSUM_XXH128_testdata[9128] */\n    { 3043, 0x0000000000000000ULL, { 0xE9DAA50EF33FAEE0ULL, 0x35881BD46B223FBEULL } }, /* XSUM_XXH128_testdata[9129] */\n    { 3043, 0x000000009E3779B1ULL, { 0xA30AA62BA49D3A98ULL, 0xB63E8C770C83A327ULL } }, /* XSUM_XXH128_testdata[9130] */\n    { 3043, 0x9E3779B185EBCA8DULL, { 0x5628D585CE6A2F71ULL, 0x779B8F6F5A3848D1ULL } }, /* XSUM_XXH128_testdata[9131] */\n    { 3044, 0x0000000000000000ULL, { 0x3FB549E119A1DB0BULL, 0x167E78DF5A8C8C82ULL } }, /* XSUM_XXH128_testdata[9132] */\n    { 3044, 0x000000009E3779B1ULL, { 0x6ABC7452D9B02395ULL, 0xEF6355B4A94F28D0ULL } }, /* XSUM_XXH128_testdata[9133] */\n    { 3044, 0x9E3779B185EBCA8DULL, { 0x0EC5349117230073ULL, 0x70160114A5B63117ULL } }, /* XSUM_XXH128_testdata[9134] */\n    { 3045, 0x0000000000000000ULL, { 0xC52C880527E7EE42ULL, 0x371666B88F960A50ULL } }, /* XSUM_XXH128_testdata[9135] */\n    { 3045, 0x000000009E3779B1ULL, { 0x94E5B4346E80C514ULL, 0x7E21C1EB92D75399ULL } }, /* XSUM_XXH128_testdata[9136] */\n    { 3045, 0x9E3779B185EBCA8DULL, { 0x79561D65F06AF1E4ULL, 0x799E45EA6D934C76ULL } }, /* XSUM_XXH128_testdata[9137] */\n    { 3046, 0x0000000000000000ULL, { 0x85AF39ECC47380D6ULL, 0xD8F8D4E3EC5D5434ULL } }, /* XSUM_XXH128_testdata[9138] */\n    { 3046, 0x000000009E3779B1ULL, { 0x66B13D1BE5315F0AULL, 0x595685F70E0F8437ULL } }, /* XSUM_XXH128_testdata[9139] */\n    { 3046, 0x9E3779B185EBCA8DULL, { 0x2F406936C9E75008ULL, 0xB184260DB7B8F634ULL } }, /* XSUM_XXH128_testdata[9140] */\n    { 3047, 0x0000000000000000ULL, { 0xA17883ED34DF9C9CULL, 0x83BC02F793BF4FB7ULL } }, /* XSUM_XXH128_testdata[9141] */\n    { 3047, 0x000000009E3779B1ULL, { 0x2C6E0402C4A3917DULL, 0x2F0BFDDA4731CD91ULL } }, /* XSUM_XXH128_testdata[9142] */\n    { 3047, 0x9E3779B185EBCA8DULL, { 0x3505A10DC45FAFF5ULL, 0x24EACD451CB2882BULL } }, /* XSUM_XXH128_testdata[9143] */\n    { 3048, 0x0000000000000000ULL, { 0x56FCB8BF621BC46CULL, 0x12514D449010ADCCULL } }, /* XSUM_XXH128_testdata[9144] */\n    { 3048, 0x000000009E3779B1ULL, { 0xA6F37FB38C751CFDULL, 0x00EEA903432E2261ULL } }, /* XSUM_XXH128_testdata[9145] */\n    { 3048, 0x9E3779B185EBCA8DULL, { 0x135F0AD585E4B49BULL, 0x22647403F87081A2ULL } }, /* XSUM_XXH128_testdata[9146] */\n    { 3049, 0x0000000000000000ULL, { 0xFCABF74067D91081ULL, 0x7DE7368825093312ULL } }, /* XSUM_XXH128_testdata[9147] */\n    { 3049, 0x000000009E3779B1ULL, { 0xBF5BD92759AC1F2EULL, 0x6AF066022008C6ECULL } }, /* XSUM_XXH128_testdata[9148] */\n    { 3049, 0x9E3779B185EBCA8DULL, { 0x63111E6E094071FBULL, 0xAAAC265C5100D372ULL } }, /* XSUM_XXH128_testdata[9149] */\n    { 3050, 0x0000000000000000ULL, { 0xA6D55CB1163CBBAEULL, 0x2A34A59F45E1A826ULL } }, /* XSUM_XXH128_testdata[9150] */\n    { 3050, 0x000000009E3779B1ULL, { 0xFF2FA834B82DFA99ULL, 0x2E3B67BE3E72CFB1ULL } }, /* XSUM_XXH128_testdata[9151] */\n    { 3050, 0x9E3779B185EBCA8DULL, { 0xEA638F18EFD67488ULL, 0x123B7960419F1C13ULL } }, /* XSUM_XXH128_testdata[9152] */\n    { 3051, 0x0000000000000000ULL, { 0xEB24F505D0201A73ULL, 0x333019498D7DAE74ULL } }, /* XSUM_XXH128_testdata[9153] */\n    { 3051, 0x000000009E3779B1ULL, { 0xE859600ABFBE19DFULL, 0xDBB376F8DDA84FCBULL } }, /* XSUM_XXH128_testdata[9154] */\n    { 3051, 0x9E3779B185EBCA8DULL, { 0xDAB8124FE18205AFULL, 0x54DC4558F1E5FB4EULL } }, /* XSUM_XXH128_testdata[9155] */\n    { 3052, 0x0000000000000000ULL, { 0x7987ACF1829352A3ULL, 0x9BFC59D99D4B813BULL } }, /* XSUM_XXH128_testdata[9156] */\n    { 3052, 0x000000009E3779B1ULL, { 0x761F3F92B6125543ULL, 0xBE3887722FFE5CBBULL } }, /* XSUM_XXH128_testdata[9157] */\n    { 3052, 0x9E3779B185EBCA8DULL, { 0x0DA619B29FEFD3AEULL, 0x3E9E267F1F678072ULL } }, /* XSUM_XXH128_testdata[9158] */\n    { 3053, 0x0000000000000000ULL, { 0xF6DCAFED19C2110FULL, 0x1956EF6B0B0E3E9AULL } }, /* XSUM_XXH128_testdata[9159] */\n    { 3053, 0x000000009E3779B1ULL, { 0x7D55B3F60EE9EB4EULL, 0x2CFDFEC90CC6E7DEULL } }, /* XSUM_XXH128_testdata[9160] */\n    { 3053, 0x9E3779B185EBCA8DULL, { 0xCE6F6D56D6B819A5ULL, 0x86483364DA3B04E7ULL } }, /* XSUM_XXH128_testdata[9161] */\n    { 3054, 0x0000000000000000ULL, { 0x113BB1975695F267ULL, 0x60947CCD8C92D501ULL } }, /* XSUM_XXH128_testdata[9162] */\n    { 3054, 0x000000009E3779B1ULL, { 0x0D260D814FD8FD46ULL, 0xD3AC9C429BF99123ULL } }, /* XSUM_XXH128_testdata[9163] */\n    { 3054, 0x9E3779B185EBCA8DULL, { 0x41BEB0A9045C46E9ULL, 0xA664D508D8D8054AULL } }, /* XSUM_XXH128_testdata[9164] */\n    { 3055, 0x0000000000000000ULL, { 0x31EC14CB1C6A64D4ULL, 0x12331D338412A227ULL } }, /* XSUM_XXH128_testdata[9165] */\n    { 3055, 0x000000009E3779B1ULL, { 0x4209C836DD87BAE8ULL, 0x79F9F7308CAE9040ULL } }, /* XSUM_XXH128_testdata[9166] */\n    { 3055, 0x9E3779B185EBCA8DULL, { 0x630502A72FC9F91BULL, 0x3C6E1A0150FDAA51ULL } }, /* XSUM_XXH128_testdata[9167] */\n    { 3056, 0x0000000000000000ULL, { 0xFC8D946315923718ULL, 0x3EFFC45E2336D779ULL } }, /* XSUM_XXH128_testdata[9168] */\n    { 3056, 0x000000009E3779B1ULL, { 0xD084163A3449E3D4ULL, 0x54D084C51BC4CCCDULL } }, /* XSUM_XXH128_testdata[9169] */\n    { 3056, 0x9E3779B185EBCA8DULL, { 0x6DC4FDCC5C188187ULL, 0x769C21715D7A9544ULL } }, /* XSUM_XXH128_testdata[9170] */\n    { 3057, 0x0000000000000000ULL, { 0xA91700F13F1BBE4BULL, 0x481102941B28D21FULL } }, /* XSUM_XXH128_testdata[9171] */\n    { 3057, 0x000000009E3779B1ULL, { 0xC063F6CC065F2B79ULL, 0x9787AC0D0B956E4EULL } }, /* XSUM_XXH128_testdata[9172] */\n    { 3057, 0x9E3779B185EBCA8DULL, { 0x722795CBBFCE823FULL, 0x997AD581ADA2D322ULL } }, /* XSUM_XXH128_testdata[9173] */\n    { 3058, 0x0000000000000000ULL, { 0xA6D433839C43C439ULL, 0xE75511D54BBB0D31ULL } }, /* XSUM_XXH128_testdata[9174] */\n    { 3058, 0x000000009E3779B1ULL, { 0x8907C4A0482066ACULL, 0x8915A94486A6EB4BULL } }, /* XSUM_XXH128_testdata[9175] */\n    { 3058, 0x9E3779B185EBCA8DULL, { 0x131C0BBEC45BF54FULL, 0x9B752BBFBF8AD230ULL } }, /* XSUM_XXH128_testdata[9176] */\n    { 3059, 0x0000000000000000ULL, { 0x719B83FD2D183A0FULL, 0xBFF9B31068356CCEULL } }, /* XSUM_XXH128_testdata[9177] */\n    { 3059, 0x000000009E3779B1ULL, { 0x58E86937365D43C6ULL, 0x4B96CAD373CACEB1ULL } }, /* XSUM_XXH128_testdata[9178] */\n    { 3059, 0x9E3779B185EBCA8DULL, { 0xADB87552F234D8B0ULL, 0x28B1CCFE6789B516ULL } }, /* XSUM_XXH128_testdata[9179] */\n    { 3060, 0x0000000000000000ULL, { 0x9324D8E772F6F02FULL, 0xEAF81A94BE48E725ULL } }, /* XSUM_XXH128_testdata[9180] */\n    { 3060, 0x000000009E3779B1ULL, { 0xA25D8257B922F547ULL, 0x6DDAD4DD47F9FF60ULL } }, /* XSUM_XXH128_testdata[9181] */\n    { 3060, 0x9E3779B185EBCA8DULL, { 0x6909E806601A139CULL, 0x86F40FAE36020B98ULL } }, /* XSUM_XXH128_testdata[9182] */\n    { 3061, 0x0000000000000000ULL, { 0x109A2D2288ACD199ULL, 0xD7BA671B270043A1ULL } }, /* XSUM_XXH128_testdata[9183] */\n    { 3061, 0x000000009E3779B1ULL, { 0xB2C19CFEA11DAC0FULL, 0x406AB97E672B8211ULL } }, /* XSUM_XXH128_testdata[9184] */\n    { 3061, 0x9E3779B185EBCA8DULL, { 0x3385E38DD96DF2AFULL, 0x22BE4E78AB910AA9ULL } }, /* XSUM_XXH128_testdata[9185] */\n    { 3062, 0x0000000000000000ULL, { 0x1BEE81BC69B566F6ULL, 0x4D0A44D42AC5CDE5ULL } }, /* XSUM_XXH128_testdata[9186] */\n    { 3062, 0x000000009E3779B1ULL, { 0x52013CE90FBF726EULL, 0x51D0EECC3C6335DAULL } }, /* XSUM_XXH128_testdata[9187] */\n    { 3062, 0x9E3779B185EBCA8DULL, { 0xE6CADD5EA67A1DAEULL, 0xA6A1A9A83FB44C53ULL } }, /* XSUM_XXH128_testdata[9188] */\n    { 3063, 0x0000000000000000ULL, { 0xFBFB4557EC34D698ULL, 0x5A24BEA54115AF20ULL } }, /* XSUM_XXH128_testdata[9189] */\n    { 3063, 0x000000009E3779B1ULL, { 0x80A284CAFAEEB348ULL, 0xDC8E18314B76518CULL } }, /* XSUM_XXH128_testdata[9190] */\n    { 3063, 0x9E3779B185EBCA8DULL, { 0x3696BBD4171643A2ULL, 0xC74BD0F188C85A3BULL } }, /* XSUM_XXH128_testdata[9191] */\n    { 3064, 0x0000000000000000ULL, { 0x14E282185745F79CULL, 0xCC637841FC3385DBULL } }, /* XSUM_XXH128_testdata[9192] */\n    { 3064, 0x000000009E3779B1ULL, { 0x59C50F54417BFE95ULL, 0x904C189F0D08711AULL } }, /* XSUM_XXH128_testdata[9193] */\n    { 3064, 0x9E3779B185EBCA8DULL, { 0x96BC2B8FAD88A929ULL, 0xC7B1C86C548D3F69ULL } }, /* XSUM_XXH128_testdata[9194] */\n    { 3065, 0x0000000000000000ULL, { 0x25C9F9879393E997ULL, 0x72CA9E62D2BADD92ULL } }, /* XSUM_XXH128_testdata[9195] */\n    { 3065, 0x000000009E3779B1ULL, { 0xFF1A1CA083935315ULL, 0xD197BEA6D72BF46FULL } }, /* XSUM_XXH128_testdata[9196] */\n    { 3065, 0x9E3779B185EBCA8DULL, { 0x1F0D9D4AFFE22D31ULL, 0xE0B764F9062CB8C7ULL } }, /* XSUM_XXH128_testdata[9197] */\n    { 3066, 0x0000000000000000ULL, { 0x010325C9A4640B46ULL, 0xA5B129F1C8D8D3E8ULL } }, /* XSUM_XXH128_testdata[9198] */\n    { 3066, 0x000000009E3779B1ULL, { 0x2ED5EBB7C4932794ULL, 0x01468D83D2EC6937ULL } }, /* XSUM_XXH128_testdata[9199] */\n    { 3066, 0x9E3779B185EBCA8DULL, { 0xC85B74B109ACF054ULL, 0xB8B8C73157EA89FCULL } }, /* XSUM_XXH128_testdata[9200] */\n    { 3067, 0x0000000000000000ULL, { 0xEF768413CBDAD45EULL, 0xF9BFADBF3416DBA7ULL } }, /* XSUM_XXH128_testdata[9201] */\n    { 3067, 0x000000009E3779B1ULL, { 0x28E33EC1414E1480ULL, 0xC8450F92AFF0E932ULL } }, /* XSUM_XXH128_testdata[9202] */\n    { 3067, 0x9E3779B185EBCA8DULL, { 0xA32B4C15F274FC23ULL, 0x64387AA152DF374FULL } }, /* XSUM_XXH128_testdata[9203] */\n    { 3068, 0x0000000000000000ULL, { 0xB5B5BE7F2181A7ABULL, 0xE86516066854F5E6ULL } }, /* XSUM_XXH128_testdata[9204] */\n    { 3068, 0x000000009E3779B1ULL, { 0x27D8C4A76230F5C2ULL, 0x9437EC23D0131F9AULL } }, /* XSUM_XXH128_testdata[9205] */\n    { 3068, 0x9E3779B185EBCA8DULL, { 0xEC3896CA46CFBEBCULL, 0x58AEB3739DE57F1AULL } }, /* XSUM_XXH128_testdata[9206] */\n    { 3069, 0x0000000000000000ULL, { 0x65B0891D197D8052ULL, 0x85AF1D452C3E328FULL } }, /* XSUM_XXH128_testdata[9207] */\n    { 3069, 0x000000009E3779B1ULL, { 0x49965C505160B5A3ULL, 0x86EEB540B066C0D3ULL } }, /* XSUM_XXH128_testdata[9208] */\n    { 3069, 0x9E3779B185EBCA8DULL, { 0xEA5C229CE48A537AULL, 0x881EC240096D1B3FULL } }, /* XSUM_XXH128_testdata[9209] */\n    { 3070, 0x0000000000000000ULL, { 0xB4146D3B212234C3ULL, 0x0646D37EEBE3ED42ULL } }, /* XSUM_XXH128_testdata[9210] */\n    { 3070, 0x000000009E3779B1ULL, { 0x9146467A9F27CEE5ULL, 0xA8BA36D4000DD7FCULL } }, /* XSUM_XXH128_testdata[9211] */\n    { 3070, 0x9E3779B185EBCA8DULL, { 0x28DE1E99104CA396ULL, 0xAA45B59D406BBE50ULL } }, /* XSUM_XXH128_testdata[9212] */\n    { 3071, 0x0000000000000000ULL, { 0xEA91DBA6A78E984AULL, 0x89E9DC2FB96E1C7AULL } }, /* XSUM_XXH128_testdata[9213] */\n    { 3071, 0x000000009E3779B1ULL, { 0xD65903034E3DD6BDULL, 0x564F109D252270FDULL } }, /* XSUM_XXH128_testdata[9214] */\n    { 3071, 0x9E3779B185EBCA8DULL, { 0xE031963E4476103AULL, 0x600A0F0BA278B334ULL } }, /* XSUM_XXH128_testdata[9215] */\n    { 3072, 0x0000000000000000ULL, { 0x696BF231F32AB848ULL, 0x27DFCD2295AB7006ULL } }, /* XSUM_XXH128_testdata[9216] */\n    { 3072, 0x000000009E3779B1ULL, { 0xB446DDC740559498ULL, 0x4E25B5E52C8F6918ULL } }, /* XSUM_XXH128_testdata[9217] */\n    { 3072, 0x9E3779B185EBCA8DULL, { 0xFE150E487CFF7C10ULL, 0x85521B34251EF4FFULL } }, /* XSUM_XXH128_testdata[9218] */\n    { 3073, 0x0000000000000000ULL, { 0xBB5CD7893718D93DULL, 0x4DEC8E07862B4006ULL } }, /* XSUM_XXH128_testdata[9219] */\n    { 3073, 0x000000009E3779B1ULL, { 0x13078708D6864617ULL, 0x070C9014C1408CFFULL } }, /* XSUM_XXH128_testdata[9220] */\n    { 3073, 0x9E3779B185EBCA8DULL, { 0x5233345A92E0B7D2ULL, 0x463D0C0012122156ULL } }, /* XSUM_XXH128_testdata[9221] */\n    { 3074, 0x0000000000000000ULL, { 0x4544D303A760BFFAULL, 0x022A3E60A565046FULL } }, /* XSUM_XXH128_testdata[9222] */\n    { 3074, 0x000000009E3779B1ULL, { 0xF4DD7C540106ED9CULL, 0x517A3DA8B132201FULL } }, /* XSUM_XXH128_testdata[9223] */\n    { 3074, 0x9E3779B185EBCA8DULL, { 0x1667C4FDDA475558ULL, 0x42A4EF462C7F3C14ULL } }, /* XSUM_XXH128_testdata[9224] */\n    { 3075, 0x0000000000000000ULL, { 0x20A0F9FB85F87027ULL, 0x3000FA79498B65F0ULL } }, /* XSUM_XXH128_testdata[9225] */\n    { 3075, 0x000000009E3779B1ULL, { 0x503EF8D52FCF2EE7ULL, 0xDFA6EA31F59F3BDEULL } }, /* XSUM_XXH128_testdata[9226] */\n    { 3075, 0x9E3779B185EBCA8DULL, { 0x83F78721C54EA38CULL, 0xE5F2CB827A792FC1ULL } }, /* XSUM_XXH128_testdata[9227] */\n    { 3076, 0x0000000000000000ULL, { 0x3A7D67C26ECD3469ULL, 0xED2C77B7B0740B02ULL } }, /* XSUM_XXH128_testdata[9228] */\n    { 3076, 0x000000009E3779B1ULL, { 0x6572BFA32E238DD6ULL, 0x020FCB39AFD7D827ULL } }, /* XSUM_XXH128_testdata[9229] */\n    { 3076, 0x9E3779B185EBCA8DULL, { 0xB5BE83A696B09303ULL, 0x1BB002B0D7EFB884ULL } }, /* XSUM_XXH128_testdata[9230] */\n    { 3077, 0x0000000000000000ULL, { 0x2673E1EFA109AD4BULL, 0x1719ECCA0CC5D847ULL } }, /* XSUM_XXH128_testdata[9231] */\n    { 3077, 0x000000009E3779B1ULL, { 0x30189D29AC321B1CULL, 0x5D2C4EBFCA5FFA3BULL } }, /* XSUM_XXH128_testdata[9232] */\n    { 3077, 0x9E3779B185EBCA8DULL, { 0x9027ED80737DB3C2ULL, 0x98522D289C7471F4ULL } }, /* XSUM_XXH128_testdata[9233] */\n    { 3078, 0x0000000000000000ULL, { 0x211FB4B295AC7DDEULL, 0xF1B529F69759E589ULL } }, /* XSUM_XXH128_testdata[9234] */\n    { 3078, 0x000000009E3779B1ULL, { 0x933E20C8DD26DF6EULL, 0x4A1188965604941BULL } }, /* XSUM_XXH128_testdata[9235] */\n    { 3078, 0x9E3779B185EBCA8DULL, { 0xDD74CF8FA750EAF3ULL, 0x2AC1DB2F26AA35A4ULL } }, /* XSUM_XXH128_testdata[9236] */\n    { 3079, 0x0000000000000000ULL, { 0x394653F476FCE696ULL, 0x07FF92D146DA6315ULL } }, /* XSUM_XXH128_testdata[9237] */\n    { 3079, 0x000000009E3779B1ULL, { 0x85E15DD43F6CFF99ULL, 0x89963621BBC4A984ULL } }, /* XSUM_XXH128_testdata[9238] */\n    { 3079, 0x9E3779B185EBCA8DULL, { 0xABC82F2E8CA84916ULL, 0x6182FE3D9687E5A2ULL } }, /* XSUM_XXH128_testdata[9239] */\n    { 3080, 0x0000000000000000ULL, { 0xDEC5003A5B3E0A29ULL, 0xA592DE4DFB0B76A8ULL } }, /* XSUM_XXH128_testdata[9240] */\n    { 3080, 0x000000009E3779B1ULL, { 0x18607B652E2C83EFULL, 0x6D5783D1A074BD9BULL } }, /* XSUM_XXH128_testdata[9241] */\n    { 3080, 0x9E3779B185EBCA8DULL, { 0x94C2C8873615DCF5ULL, 0x773A689F73A0AEB5ULL } }, /* XSUM_XXH128_testdata[9242] */\n    { 3081, 0x0000000000000000ULL, { 0x013EE3A30B2101F5ULL, 0x30180DAEED837347ULL } }, /* XSUM_XXH128_testdata[9243] */\n    { 3081, 0x000000009E3779B1ULL, { 0x763DEA605C0B4035ULL, 0xF83800145536CD1EULL } }, /* XSUM_XXH128_testdata[9244] */\n    { 3081, 0x9E3779B185EBCA8DULL, { 0x41656992552CCC2AULL, 0xC91E45A6104B85FBULL } }, /* XSUM_XXH128_testdata[9245] */\n    { 3082, 0x0000000000000000ULL, { 0x448827E84F765F4AULL, 0xA797149C44D59A4DULL } }, /* XSUM_XXH128_testdata[9246] */\n    { 3082, 0x000000009E3779B1ULL, { 0x41EB2288A6FB4190ULL, 0xAB1A711AA9D37731ULL } }, /* XSUM_XXH128_testdata[9247] */\n    { 3082, 0x9E3779B185EBCA8DULL, { 0x046BDD756789FA35ULL, 0x4CAA21422EE17659ULL } }, /* XSUM_XXH128_testdata[9248] */\n    { 3083, 0x0000000000000000ULL, { 0xB3494BD4B2633F2BULL, 0xE6E560D85CD80942ULL } }, /* XSUM_XXH128_testdata[9249] */\n    { 3083, 0x000000009E3779B1ULL, { 0x7BAE63FBFBDABDA6ULL, 0xC49F77E58C1A8234ULL } }, /* XSUM_XXH128_testdata[9250] */\n    { 3083, 0x9E3779B185EBCA8DULL, { 0x916119ED75DE8D24ULL, 0xFB0C5A2A7A2ECEF5ULL } }, /* XSUM_XXH128_testdata[9251] */\n    { 3084, 0x0000000000000000ULL, { 0x12579A5674B09B07ULL, 0x2E4ECCD316ACDD8FULL } }, /* XSUM_XXH128_testdata[9252] */\n    { 3084, 0x000000009E3779B1ULL, { 0xF39292DC0F32271FULL, 0x3F04A0CC1823EAF9ULL } }, /* XSUM_XXH128_testdata[9253] */\n    { 3084, 0x9E3779B185EBCA8DULL, { 0xFB07F8F25B5AE020ULL, 0xA217558C789F6218ULL } }, /* XSUM_XXH128_testdata[9254] */\n    { 3085, 0x0000000000000000ULL, { 0x2757A7411AAA0AF5ULL, 0x00577463F2EC61D1ULL } }, /* XSUM_XXH128_testdata[9255] */\n    { 3085, 0x000000009E3779B1ULL, { 0x48AF1A3DBE81EF03ULL, 0x117C64BAF6C704D9ULL } }, /* XSUM_XXH128_testdata[9256] */\n    { 3085, 0x9E3779B185EBCA8DULL, { 0x98832C78F0EEE15BULL, 0x1A40B68D945824EEULL } }, /* XSUM_XXH128_testdata[9257] */\n    { 3086, 0x0000000000000000ULL, { 0xF51AA9442403576AULL, 0xCB4070612F412FACULL } }, /* XSUM_XXH128_testdata[9258] */\n    { 3086, 0x000000009E3779B1ULL, { 0xE2AC4FF69D04343EULL, 0xB0D09674CED00BB4ULL } }, /* XSUM_XXH128_testdata[9259] */\n    { 3086, 0x9E3779B185EBCA8DULL, { 0xD1E8E39ADAE2E67AULL, 0xD6BA9D3B218539CDULL } }, /* XSUM_XXH128_testdata[9260] */\n    { 3087, 0x0000000000000000ULL, { 0x4EFDFECD0C1218DAULL, 0xBDE6A6944491F0BEULL } }, /* XSUM_XXH128_testdata[9261] */\n    { 3087, 0x000000009E3779B1ULL, { 0x0C5F63787CAD69E9ULL, 0xA991C53B479A2EFFULL } }, /* XSUM_XXH128_testdata[9262] */\n    { 3087, 0x9E3779B185EBCA8DULL, { 0x566184AA59123BFFULL, 0xEBE992466272E4BDULL } }, /* XSUM_XXH128_testdata[9263] */\n    { 3088, 0x0000000000000000ULL, { 0x71453920FCFBDCB5ULL, 0x8C44734AFA3CDB88ULL } }, /* XSUM_XXH128_testdata[9264] */\n    { 3088, 0x000000009E3779B1ULL, { 0x824D59EAE96796E0ULL, 0x02DEE15F54C3FE0AULL } }, /* XSUM_XXH128_testdata[9265] */\n    { 3088, 0x9E3779B185EBCA8DULL, { 0xB5ECA63537B8CAB6ULL, 0x52215BBA834D5B91ULL } }, /* XSUM_XXH128_testdata[9266] */\n    { 3089, 0x0000000000000000ULL, { 0xB8DB9958E9F8DAF1ULL, 0x595EC30015EF7254ULL } }, /* XSUM_XXH128_testdata[9267] */\n    { 3089, 0x000000009E3779B1ULL, { 0x6936C6D86814B0CCULL, 0x426E0D140DF4EF5BULL } }, /* XSUM_XXH128_testdata[9268] */\n    { 3089, 0x9E3779B185EBCA8DULL, { 0x4F1D1FAA85396B9CULL, 0x9D525D26D5BF20B5ULL } }, /* XSUM_XXH128_testdata[9269] */\n    { 3090, 0x0000000000000000ULL, { 0xADDAEAC431A05F24ULL, 0x5C5193D32E85D97AULL } }, /* XSUM_XXH128_testdata[9270] */\n    { 3090, 0x000000009E3779B1ULL, { 0x4BA06E0F4FF276D6ULL, 0xFDE059E11B73BBDBULL } }, /* XSUM_XXH128_testdata[9271] */\n    { 3090, 0x9E3779B185EBCA8DULL, { 0x99B4E9662E4CA04DULL, 0x2B9561AD4B21AF22ULL } }, /* XSUM_XXH128_testdata[9272] */\n    { 3091, 0x0000000000000000ULL, { 0x6115EB504AD836EAULL, 0x0D18B09C2C7D2667ULL } }, /* XSUM_XXH128_testdata[9273] */\n    { 3091, 0x000000009E3779B1ULL, { 0x4DC188B8DEB3FE26ULL, 0x4D30431F3728ED3FULL } }, /* XSUM_XXH128_testdata[9274] */\n    { 3091, 0x9E3779B185EBCA8DULL, { 0x172CD5B6646EB12AULL, 0xD0F69660D704443AULL } }, /* XSUM_XXH128_testdata[9275] */\n    { 3092, 0x0000000000000000ULL, { 0xDB3D25A94028892AULL, 0x5A163AC95DAF5F54ULL } }, /* XSUM_XXH128_testdata[9276] */\n    { 3092, 0x000000009E3779B1ULL, { 0x48E73EFE00129EDEULL, 0xFA29674F3B70D31BULL } }, /* XSUM_XXH128_testdata[9277] */\n    { 3092, 0x9E3779B185EBCA8DULL, { 0xE337C680B9A11A0AULL, 0xBEBE7F3EE83506BDULL } }, /* XSUM_XXH128_testdata[9278] */\n    { 3093, 0x0000000000000000ULL, { 0x11F008344CCFA92BULL, 0x70452BE8D94540F8ULL } }, /* XSUM_XXH128_testdata[9279] */\n    { 3093, 0x000000009E3779B1ULL, { 0x0398DAD6E97A74D4ULL, 0x0A1BC1498F8828C0ULL } }, /* XSUM_XXH128_testdata[9280] */\n    { 3093, 0x9E3779B185EBCA8DULL, { 0xF63D77109C6E4C3DULL, 0x38DFEE39985988DCULL } }, /* XSUM_XXH128_testdata[9281] */\n    { 3094, 0x0000000000000000ULL, { 0x47B5D05EAF2979E3ULL, 0xEBC550F30C99F902ULL } }, /* XSUM_XXH128_testdata[9282] */\n    { 3094, 0x000000009E3779B1ULL, { 0xCE24123A1A62E0DDULL, 0x71A02D691CC3CACCULL } }, /* XSUM_XXH128_testdata[9283] */\n    { 3094, 0x9E3779B185EBCA8DULL, { 0xC9B7DFA126271448ULL, 0xA858B9EABA185260ULL } }, /* XSUM_XXH128_testdata[9284] */\n    { 3095, 0x0000000000000000ULL, { 0x29882EBDD91DC29CULL, 0xD4427457247DDBC9ULL } }, /* XSUM_XXH128_testdata[9285] */\n    { 3095, 0x000000009E3779B1ULL, { 0xD626C333F2AF145FULL, 0xEF840577A37631BCULL } }, /* XSUM_XXH128_testdata[9286] */\n    { 3095, 0x9E3779B185EBCA8DULL, { 0xBBD1B325B1DDD3A7ULL, 0x2DC54B451192395AULL } }, /* XSUM_XXH128_testdata[9287] */\n    { 3096, 0x0000000000000000ULL, { 0xAB2D37B15F786F13ULL, 0xBCAA7AC252E1DF00ULL } }, /* XSUM_XXH128_testdata[9288] */\n    { 3096, 0x000000009E3779B1ULL, { 0x9BCFF250B5E0B6A5ULL, 0x42685C0DC1888CF2ULL } }, /* XSUM_XXH128_testdata[9289] */\n    { 3096, 0x9E3779B185EBCA8DULL, { 0x5FAED81210AF3B2AULL, 0xF1EA4AFBD33AD28BULL } }, /* XSUM_XXH128_testdata[9290] */\n    { 3097, 0x0000000000000000ULL, { 0x5B9EE12B5CE61876ULL, 0xB2089B9337093E5AULL } }, /* XSUM_XXH128_testdata[9291] */\n    { 3097, 0x000000009E3779B1ULL, { 0x79B22F4A56298C14ULL, 0xEAB373CE5D141E70ULL } }, /* XSUM_XXH128_testdata[9292] */\n    { 3097, 0x9E3779B185EBCA8DULL, { 0xDA856D0A3246871FULL, 0x5C3C3583DB13CFC2ULL } }, /* XSUM_XXH128_testdata[9293] */\n    { 3098, 0x0000000000000000ULL, { 0x0CA96524F2F351FDULL, 0x411A6848563F86C7ULL } }, /* XSUM_XXH128_testdata[9294] */\n    { 3098, 0x000000009E3779B1ULL, { 0x57C6196BB462AA0CULL, 0x3D20A23E5725CF50ULL } }, /* XSUM_XXH128_testdata[9295] */\n    { 3098, 0x9E3779B185EBCA8DULL, { 0x33D31C4C4C9A192AULL, 0xF1950D1CE6595766ULL } }, /* XSUM_XXH128_testdata[9296] */\n    { 3099, 0x0000000000000000ULL, { 0xBE9B42B9D7A7DE77ULL, 0xC13F86C3CAAB2A71ULL } }, /* XSUM_XXH128_testdata[9297] */\n    { 3099, 0x000000009E3779B1ULL, { 0x938F447D6CDA51ADULL, 0x3198A83E5A23930CULL } }, /* XSUM_XXH128_testdata[9298] */\n    { 3099, 0x9E3779B185EBCA8DULL, { 0xC69BED9367D3CA12ULL, 0x32C5AEEFD206B922ULL } }, /* XSUM_XXH128_testdata[9299] */\n    { 3100, 0x0000000000000000ULL, { 0x53C9FC5F9E22A184ULL, 0xE023326BEBBFD4ECULL } }, /* XSUM_XXH128_testdata[9300] */\n    { 3100, 0x000000009E3779B1ULL, { 0xFC0A57172F99ECB5ULL, 0xD8FF90447A111A1EULL } }, /* XSUM_XXH128_testdata[9301] */\n    { 3100, 0x9E3779B185EBCA8DULL, { 0xE8D9012FD958628AULL, 0xC1C84DC7113A3EC3ULL } }, /* XSUM_XXH128_testdata[9302] */\n    { 3101, 0x0000000000000000ULL, { 0x5B827245B5450701ULL, 0x012B9308CA3AEC6DULL } }, /* XSUM_XXH128_testdata[9303] */\n    { 3101, 0x000000009E3779B1ULL, { 0x38A24140A0672AEDULL, 0x0AD6D0D9F34A3602ULL } }, /* XSUM_XXH128_testdata[9304] */\n    { 3101, 0x9E3779B185EBCA8DULL, { 0xD02A3FCA9A98DA37ULL, 0x57A6B534F09193BCULL } }, /* XSUM_XXH128_testdata[9305] */\n    { 3102, 0x0000000000000000ULL, { 0xB99D171D1373071EULL, 0x7F6A8C01F10FA914ULL } }, /* XSUM_XXH128_testdata[9306] */\n    { 3102, 0x000000009E3779B1ULL, { 0xD8753459BF11E365ULL, 0xB24EF7968C4BB6D9ULL } }, /* XSUM_XXH128_testdata[9307] */\n    { 3102, 0x9E3779B185EBCA8DULL, { 0xFAACE1AD8099B9B9ULL, 0xED3E726B07440228ULL } }, /* XSUM_XXH128_testdata[9308] */\n    { 3103, 0x0000000000000000ULL, { 0x0674140175B3E039ULL, 0xAC266D7D72209489ULL } }, /* XSUM_XXH128_testdata[9309] */\n    { 3103, 0x000000009E3779B1ULL, { 0xC037764399266126ULL, 0x8134D8E7DC4239E4ULL } }, /* XSUM_XXH128_testdata[9310] */\n    { 3103, 0x9E3779B185EBCA8DULL, { 0xE336F90201941233ULL, 0x5981B29FBB5D99F0ULL } }, /* XSUM_XXH128_testdata[9311] */\n    { 3104, 0x0000000000000000ULL, { 0xADB58ED4D1193F58ULL, 0x4CC3AC897B4B0881ULL } }, /* XSUM_XXH128_testdata[9312] */\n    { 3104, 0x000000009E3779B1ULL, { 0xB6CFC5F1CFFF1D04ULL, 0x48E8FA18CBFD70D7ULL } }, /* XSUM_XXH128_testdata[9313] */\n    { 3104, 0x9E3779B185EBCA8DULL, { 0xB45FE8D1E3ED3A79ULL, 0xC1783B825AFD66A1ULL } }, /* XSUM_XXH128_testdata[9314] */\n    { 3105, 0x0000000000000000ULL, { 0xDCEF77642A90D552ULL, 0x272B5FBFF271C308ULL } }, /* XSUM_XXH128_testdata[9315] */\n    { 3105, 0x000000009E3779B1ULL, { 0x56025C200D77CAEFULL, 0x91C81E14A5B48C98ULL } }, /* XSUM_XXH128_testdata[9316] */\n    { 3105, 0x9E3779B185EBCA8DULL, { 0x3042D8FF87B76D4FULL, 0xA6CE4EC1777C27F3ULL } }, /* XSUM_XXH128_testdata[9317] */\n    { 3106, 0x0000000000000000ULL, { 0x8BF3C167F4FBFCAAULL, 0x3CD1604EE36D3BE5ULL } }, /* XSUM_XXH128_testdata[9318] */\n    { 3106, 0x000000009E3779B1ULL, { 0xB04C8A68220F98EFULL, 0xFA6D5D631461BB2DULL } }, /* XSUM_XXH128_testdata[9319] */\n    { 3106, 0x9E3779B185EBCA8DULL, { 0xC457533DDAB1435AULL, 0x16444596177AFE13ULL } }, /* XSUM_XXH128_testdata[9320] */\n    { 3107, 0x0000000000000000ULL, { 0xB198BD1563FFEDEAULL, 0xAD2519D976A0DA4AULL } }, /* XSUM_XXH128_testdata[9321] */\n    { 3107, 0x000000009E3779B1ULL, { 0xFA477ED7D486AA36ULL, 0x41A4945DA12031AFULL } }, /* XSUM_XXH128_testdata[9322] */\n    { 3107, 0x9E3779B185EBCA8DULL, { 0x8C02F5DB14AC6991ULL, 0xCE47E067AB116AD3ULL } }, /* XSUM_XXH128_testdata[9323] */\n    { 3108, 0x0000000000000000ULL, { 0xDE8A2527EF986A80ULL, 0x35D8AEA4D4203811ULL } }, /* XSUM_XXH128_testdata[9324] */\n    { 3108, 0x000000009E3779B1ULL, { 0x149FAD555CF20D88ULL, 0xAD4EF3FBD6E121BDULL } }, /* XSUM_XXH128_testdata[9325] */\n    { 3108, 0x9E3779B185EBCA8DULL, { 0x323C46D327FBE997ULL, 0x604C9FC69C3CA8BAULL } }, /* XSUM_XXH128_testdata[9326] */\n    { 3109, 0x0000000000000000ULL, { 0x3C9D70E9F3DCA228ULL, 0xA3D0AC55CC676460ULL } }, /* XSUM_XXH128_testdata[9327] */\n    { 3109, 0x000000009E3779B1ULL, { 0xAC8C07C6FDDD257CULL, 0x50669EB8BFF98155ULL } }, /* XSUM_XXH128_testdata[9328] */\n    { 3109, 0x9E3779B185EBCA8DULL, { 0x089743EA9952136AULL, 0x24E50797C0CE6DB0ULL } }, /* XSUM_XXH128_testdata[9329] */\n    { 3110, 0x0000000000000000ULL, { 0x62549962E266F326ULL, 0xB2CD4723E5626618ULL } }, /* XSUM_XXH128_testdata[9330] */\n    { 3110, 0x000000009E3779B1ULL, { 0xAF9928A12E810084ULL, 0x1628F0F2346DA4A8ULL } }, /* XSUM_XXH128_testdata[9331] */\n    { 3110, 0x9E3779B185EBCA8DULL, { 0xF65C7D89EBFAF3ACULL, 0x6801246C0343E23AULL } }, /* XSUM_XXH128_testdata[9332] */\n    { 3111, 0x0000000000000000ULL, { 0x084FF959C351B8F4ULL, 0x7C2A90E21B83FEBDULL } }, /* XSUM_XXH128_testdata[9333] */\n    { 3111, 0x000000009E3779B1ULL, { 0xBC1F7B23B9EADB5EULL, 0x28C9D4D5FFB46156ULL } }, /* XSUM_XXH128_testdata[9334] */\n    { 3111, 0x9E3779B185EBCA8DULL, { 0x3F8F287E03EEEB3DULL, 0x22DF6FB0C47793B0ULL } }, /* XSUM_XXH128_testdata[9335] */\n    { 3112, 0x0000000000000000ULL, { 0x87D72D416F9C4F7FULL, 0xB627FA1381B22C08ULL } }, /* XSUM_XXH128_testdata[9336] */\n    { 3112, 0x000000009E3779B1ULL, { 0x2A716610F3AE8FCBULL, 0xC6C56944CA7FEDE6ULL } }, /* XSUM_XXH128_testdata[9337] */\n    { 3112, 0x9E3779B185EBCA8DULL, { 0x94FCCB3682E44009ULL, 0x11701812C69C8C3EULL } }, /* XSUM_XXH128_testdata[9338] */\n    { 3113, 0x0000000000000000ULL, { 0xB9619D8F5FF431E3ULL, 0x5CC27E25191DCD43ULL } }, /* XSUM_XXH128_testdata[9339] */\n    { 3113, 0x000000009E3779B1ULL, { 0x76A1429C3084ED08ULL, 0x052A738A385E3FA7ULL } }, /* XSUM_XXH128_testdata[9340] */\n    { 3113, 0x9E3779B185EBCA8DULL, { 0xDA8D99E6A4FA9AFEULL, 0x8A080FE964473194ULL } }, /* XSUM_XXH128_testdata[9341] */\n    { 3114, 0x0000000000000000ULL, { 0x94BD88FF1F6C585CULL, 0x9A87FBDAA6B5BACBULL } }, /* XSUM_XXH128_testdata[9342] */\n    { 3114, 0x000000009E3779B1ULL, { 0x625CA3851FEA147DULL, 0x9AF7C7321398CF4CULL } }, /* XSUM_XXH128_testdata[9343] */\n    { 3114, 0x9E3779B185EBCA8DULL, { 0xD73515514A35F44DULL, 0xD73C822D86906107ULL } }, /* XSUM_XXH128_testdata[9344] */\n    { 3115, 0x0000000000000000ULL, { 0xFAF335BE4F829B6DULL, 0xF0256ACCAEAB3F42ULL } }, /* XSUM_XXH128_testdata[9345] */\n    { 3115, 0x000000009E3779B1ULL, { 0x18A817E15C822828ULL, 0x4ECEC515667D4D7AULL } }, /* XSUM_XXH128_testdata[9346] */\n    { 3115, 0x9E3779B185EBCA8DULL, { 0x1ED29810523AEC23ULL, 0xA8AA42875FDA9D57ULL } }, /* XSUM_XXH128_testdata[9347] */\n    { 3116, 0x0000000000000000ULL, { 0xC7ED0CDE7F354105ULL, 0xEF2282254EF12421ULL } }, /* XSUM_XXH128_testdata[9348] */\n    { 3116, 0x000000009E3779B1ULL, { 0xE53C7D52223988B5ULL, 0x97430715DD9A3625ULL } }, /* XSUM_XXH128_testdata[9349] */\n    { 3116, 0x9E3779B185EBCA8DULL, { 0x27D90923B7D9848AULL, 0x742F8EEC2EB59EB6ULL } }, /* XSUM_XXH128_testdata[9350] */\n    { 3117, 0x0000000000000000ULL, { 0x687C760766487BDEULL, 0x524FBA0F235C3BC4ULL } }, /* XSUM_XXH128_testdata[9351] */\n    { 3117, 0x000000009E3779B1ULL, { 0xA069C61351A2CC6FULL, 0xEE404D958D5EB0D4ULL } }, /* XSUM_XXH128_testdata[9352] */\n    { 3117, 0x9E3779B185EBCA8DULL, { 0x5090AA65123EBA67ULL, 0xBEEA0A3D48A728A6ULL } }, /* XSUM_XXH128_testdata[9353] */\n    { 3118, 0x0000000000000000ULL, { 0xC9FB98EB9A86E2A6ULL, 0xAD18CEB0C0316976ULL } }, /* XSUM_XXH128_testdata[9354] */\n    { 3118, 0x000000009E3779B1ULL, { 0x15375CC0B9CED4BDULL, 0x0FB187413D5A1B23ULL } }, /* XSUM_XXH128_testdata[9355] */\n    { 3118, 0x9E3779B185EBCA8DULL, { 0x175C7B5E6D8DEA25ULL, 0x5C9E52D5E7D35607ULL } }, /* XSUM_XXH128_testdata[9356] */\n    { 3119, 0x0000000000000000ULL, { 0xDAA2C2AE0E315B6DULL, 0x248A20C08E10489EULL } }, /* XSUM_XXH128_testdata[9357] */\n    { 3119, 0x000000009E3779B1ULL, { 0xD5DB41D9FE41C444ULL, 0x4B21A810748604E6ULL } }, /* XSUM_XXH128_testdata[9358] */\n    { 3119, 0x9E3779B185EBCA8DULL, { 0x767646AE2C2EDA92ULL, 0x79B6E849EE80D559ULL } }, /* XSUM_XXH128_testdata[9359] */\n    { 3120, 0x0000000000000000ULL, { 0xD98AFF362DB10D7AULL, 0xEF9210887B57079EULL } }, /* XSUM_XXH128_testdata[9360] */\n    { 3120, 0x000000009E3779B1ULL, { 0xF501E3248C96F99DULL, 0xE52D61E14177E427ULL } }, /* XSUM_XXH128_testdata[9361] */\n    { 3120, 0x9E3779B185EBCA8DULL, { 0xD20C4D9D22CFACC6ULL, 0xF4E1BC5E6DD51BA1ULL } }, /* XSUM_XXH128_testdata[9362] */\n    { 3121, 0x0000000000000000ULL, { 0x038150265809A8B1ULL, 0x17C51E460AD39FEFULL } }, /* XSUM_XXH128_testdata[9363] */\n    { 3121, 0x000000009E3779B1ULL, { 0x456BFD9E7871B899ULL, 0x213057F6E708A1BBULL } }, /* XSUM_XXH128_testdata[9364] */\n    { 3121, 0x9E3779B185EBCA8DULL, { 0xBD3F3EF1214251DCULL, 0xF557BAFB8A6F0581ULL } }, /* XSUM_XXH128_testdata[9365] */\n    { 3122, 0x0000000000000000ULL, { 0xABC349A9D25C1A31ULL, 0x810A56E3CDF868E7ULL } }, /* XSUM_XXH128_testdata[9366] */\n    { 3122, 0x000000009E3779B1ULL, { 0x45017702CDE6D3BBULL, 0xFF164063DF2EF3C8ULL } }, /* XSUM_XXH128_testdata[9367] */\n    { 3122, 0x9E3779B185EBCA8DULL, { 0x8EC920C51176CEB9ULL, 0x910B31CF21B8309AULL } }, /* XSUM_XXH128_testdata[9368] */\n    { 3123, 0x0000000000000000ULL, { 0xFB5A30A329BAA9E2ULL, 0xCA14142F8C13688DULL } }, /* XSUM_XXH128_testdata[9369] */\n    { 3123, 0x000000009E3779B1ULL, { 0xAE748FEA26037C9EULL, 0xB823C0E8C19157BEULL } }, /* XSUM_XXH128_testdata[9370] */\n    { 3123, 0x9E3779B185EBCA8DULL, { 0x749AC63A986C0D4FULL, 0xEA8D5862D3D58817ULL } }, /* XSUM_XXH128_testdata[9371] */\n    { 3124, 0x0000000000000000ULL, { 0x72CB4EC0BFE6F042ULL, 0xE66185F987B953E8ULL } }, /* XSUM_XXH128_testdata[9372] */\n    { 3124, 0x000000009E3779B1ULL, { 0x9A087D22FE8CCDC9ULL, 0x6E57BB8B39D0D5E4ULL } }, /* XSUM_XXH128_testdata[9373] */\n    { 3124, 0x9E3779B185EBCA8DULL, { 0xA31BA4F7705CCAF1ULL, 0x0289A5B300E38D48ULL } }, /* XSUM_XXH128_testdata[9374] */\n    { 3125, 0x0000000000000000ULL, { 0x6DCFB8D92E795FEBULL, 0xA37D8C34EFF94D48ULL } }, /* XSUM_XXH128_testdata[9375] */\n    { 3125, 0x000000009E3779B1ULL, { 0x65E9CF2876641D58ULL, 0x46B970F8A7058687ULL } }, /* XSUM_XXH128_testdata[9376] */\n    { 3125, 0x9E3779B185EBCA8DULL, { 0x42C04093BB99C195ULL, 0xC38EEF341C41232EULL } }, /* XSUM_XXH128_testdata[9377] */\n    { 3126, 0x0000000000000000ULL, { 0x076F4E299D242338ULL, 0x79E5278B7516E5F4ULL } }, /* XSUM_XXH128_testdata[9378] */\n    { 3126, 0x000000009E3779B1ULL, { 0x250EBD502074B4A0ULL, 0x1A32B43BFA1E2C49ULL } }, /* XSUM_XXH128_testdata[9379] */\n    { 3126, 0x9E3779B185EBCA8DULL, { 0xD2ECA180AB8CC107ULL, 0x7E67D7CB45B1CB59ULL } }, /* XSUM_XXH128_testdata[9380] */\n    { 3127, 0x0000000000000000ULL, { 0x2781EAFBCC0DCCA7ULL, 0x3818A140BE16D10AULL } }, /* XSUM_XXH128_testdata[9381] */\n    { 3127, 0x000000009E3779B1ULL, { 0x2C07692982097F3AULL, 0x87C2D26728A0552DULL } }, /* XSUM_XXH128_testdata[9382] */\n    { 3127, 0x9E3779B185EBCA8DULL, { 0x79EABFB5CEBF8F43ULL, 0xA1978240F1526118ULL } }, /* XSUM_XXH128_testdata[9383] */\n    { 3128, 0x0000000000000000ULL, { 0xCE79CBB5A4B1BA89ULL, 0x1EB666C14E786FB8ULL } }, /* XSUM_XXH128_testdata[9384] */\n    { 3128, 0x000000009E3779B1ULL, { 0xA23D7485AC016065ULL, 0x5621DA3FEA83ADBBULL } }, /* XSUM_XXH128_testdata[9385] */\n    { 3128, 0x9E3779B185EBCA8DULL, { 0xA75D571105EF80D1ULL, 0x824979BBAEB6A973ULL } }, /* XSUM_XXH128_testdata[9386] */\n    { 3129, 0x0000000000000000ULL, { 0xC0C5D7AD380558DEULL, 0xAF7BF82BFD79E7B3ULL } }, /* XSUM_XXH128_testdata[9387] */\n    { 3129, 0x000000009E3779B1ULL, { 0x72E5F176FB3F6052ULL, 0x5ABC9745F3AD9DF6ULL } }, /* XSUM_XXH128_testdata[9388] */\n    { 3129, 0x9E3779B185EBCA8DULL, { 0xEE973E882E57C4AEULL, 0x204FC7047A9919D1ULL } }, /* XSUM_XXH128_testdata[9389] */\n    { 3130, 0x0000000000000000ULL, { 0xD9104A6D1F3926F4ULL, 0x763633049DBA132EULL } }, /* XSUM_XXH128_testdata[9390] */\n    { 3130, 0x000000009E3779B1ULL, { 0x9B03A4D75CE6EAFDULL, 0x90E2EFA2432442CFULL } }, /* XSUM_XXH128_testdata[9391] */\n    { 3130, 0x9E3779B185EBCA8DULL, { 0x67826953983AD136ULL, 0xD5736156F0C8AB65ULL } }, /* XSUM_XXH128_testdata[9392] */\n    { 3131, 0x0000000000000000ULL, { 0xA332A2D2C117EB73ULL, 0x005847166F1025DCULL } }, /* XSUM_XXH128_testdata[9393] */\n    { 3131, 0x000000009E3779B1ULL, { 0xE1F8D73D2FD9A2FEULL, 0x09B90C6FDA35F459ULL } }, /* XSUM_XXH128_testdata[9394] */\n    { 3131, 0x9E3779B185EBCA8DULL, { 0x4288C89AFCACC083ULL, 0xBEF7A76CF2179176ULL } }, /* XSUM_XXH128_testdata[9395] */\n    { 3132, 0x0000000000000000ULL, { 0xC4B80ED5628A9CE9ULL, 0xA5EA02DCA5B59CF9ULL } }, /* XSUM_XXH128_testdata[9396] */\n    { 3132, 0x000000009E3779B1ULL, { 0x37C8A212E1CACFD6ULL, 0xB2DDF0A445A3B5E0ULL } }, /* XSUM_XXH128_testdata[9397] */\n    { 3132, 0x9E3779B185EBCA8DULL, { 0xCA2292AF916BE54FULL, 0xB8CA8EA7F5B30C0CULL } }, /* XSUM_XXH128_testdata[9398] */\n    { 3133, 0x0000000000000000ULL, { 0x98A8F8752190384EULL, 0xF805EF1DC0B95D9FULL } }, /* XSUM_XXH128_testdata[9399] */\n    { 3133, 0x000000009E3779B1ULL, { 0x117ED7862CF134FAULL, 0x0D238B471026EDB8ULL } }, /* XSUM_XXH128_testdata[9400] */\n    { 3133, 0x9E3779B185EBCA8DULL, { 0xD2FF66EF4A69D81AULL, 0x94303B05CCCF33FAULL } }, /* XSUM_XXH128_testdata[9401] */\n    { 3134, 0x0000000000000000ULL, { 0xD4051CE8E22ACD38ULL, 0x809E7134A1CC3F68ULL } }, /* XSUM_XXH128_testdata[9402] */\n    { 3134, 0x000000009E3779B1ULL, { 0x093440257B5D0F42ULL, 0x7E16649086AE2A91ULL } }, /* XSUM_XXH128_testdata[9403] */\n    { 3134, 0x9E3779B185EBCA8DULL, { 0xF514098C73AD1AB5ULL, 0xD3838A1E3B890B9DULL } }, /* XSUM_XXH128_testdata[9404] */\n    { 3135, 0x0000000000000000ULL, { 0x8141CD88F539D640ULL, 0xF4EBE555DD1BFA8BULL } }, /* XSUM_XXH128_testdata[9405] */\n    { 3135, 0x000000009E3779B1ULL, { 0x420CD70628C0DA3FULL, 0x7895E1A546952C61ULL } }, /* XSUM_XXH128_testdata[9406] */\n    { 3135, 0x9E3779B185EBCA8DULL, { 0x663037A3D108C4EDULL, 0xBC57529A3254F336ULL } }, /* XSUM_XXH128_testdata[9407] */\n    { 3136, 0x0000000000000000ULL, { 0x5D9FB666D8DDDF57ULL, 0x69BAB0154E8760C4ULL } }, /* XSUM_XXH128_testdata[9408] */\n    { 3136, 0x000000009E3779B1ULL, { 0xA33E0D2CE61C45E1ULL, 0xDB3B35B6FC975A3CULL } }, /* XSUM_XXH128_testdata[9409] */\n    { 3136, 0x9E3779B185EBCA8DULL, { 0x8BC253EDE067B042ULL, 0x7A6DA57D84048C0CULL } }, /* XSUM_XXH128_testdata[9410] */\n    { 3137, 0x0000000000000000ULL, { 0x8BD8A25724AE2167ULL, 0x01B63DDCF4AA68DBULL } }, /* XSUM_XXH128_testdata[9411] */\n    { 3137, 0x000000009E3779B1ULL, { 0x7FCB863C1171EE13ULL, 0xB955EF5F7B2F4E39ULL } }, /* XSUM_XXH128_testdata[9412] */\n    { 3137, 0x9E3779B185EBCA8DULL, { 0x67EF3573D079A8EBULL, 0x2DD70AFF06BB4770ULL } }, /* XSUM_XXH128_testdata[9413] */\n    { 3138, 0x0000000000000000ULL, { 0x466023E7FED1EBA0ULL, 0x10F5596820BE9B65ULL } }, /* XSUM_XXH128_testdata[9414] */\n    { 3138, 0x000000009E3779B1ULL, { 0xD6A4C33D8D950C82ULL, 0xC51163B2CE0AC4DFULL } }, /* XSUM_XXH128_testdata[9415] */\n    { 3138, 0x9E3779B185EBCA8DULL, { 0xC3E25652D609F7E1ULL, 0xF2BB4302D8475529ULL } }, /* XSUM_XXH128_testdata[9416] */\n    { 3139, 0x0000000000000000ULL, { 0xADDD3527A73D9A21ULL, 0xB94242323ED58C34ULL } }, /* XSUM_XXH128_testdata[9417] */\n    { 3139, 0x000000009E3779B1ULL, { 0x16564656DCD0C39AULL, 0xC5CE4298568E3C09ULL } }, /* XSUM_XXH128_testdata[9418] */\n    { 3139, 0x9E3779B185EBCA8DULL, { 0x2A754AB3FDFA7279ULL, 0xC2F6D9D46AFBD928ULL } }, /* XSUM_XXH128_testdata[9419] */\n    { 3140, 0x0000000000000000ULL, { 0xAAD5191EDC83C88BULL, 0xA58CB82EF5CFD69CULL } }, /* XSUM_XXH128_testdata[9420] */\n    { 3140, 0x000000009E3779B1ULL, { 0xFB5E968C30FCBF7DULL, 0xAF9758619F4409B8ULL } }, /* XSUM_XXH128_testdata[9421] */\n    { 3140, 0x9E3779B185EBCA8DULL, { 0x883FF7F14EB52B56ULL, 0x7537359A06130384ULL } }, /* XSUM_XXH128_testdata[9422] */\n    { 3141, 0x0000000000000000ULL, { 0xA76A101D0ECB7CADULL, 0xB5180F499A37A95BULL } }, /* XSUM_XXH128_testdata[9423] */\n    { 3141, 0x000000009E3779B1ULL, { 0x934956D5248B8183ULL, 0x9096917C3D068241ULL } }, /* XSUM_XXH128_testdata[9424] */\n    { 3141, 0x9E3779B185EBCA8DULL, { 0xF0C7C97645AFA36CULL, 0xA15A759CC691F2D7ULL } }, /* XSUM_XXH128_testdata[9425] */\n    { 3142, 0x0000000000000000ULL, { 0x8EBE2C0D983672D1ULL, 0xDC04B2CE6469660EULL } }, /* XSUM_XXH128_testdata[9426] */\n    { 3142, 0x000000009E3779B1ULL, { 0x26191168D5C41EBCULL, 0x5F60413C478277CBULL } }, /* XSUM_XXH128_testdata[9427] */\n    { 3142, 0x9E3779B185EBCA8DULL, { 0x7BF659361A6376B3ULL, 0xF9FF597A157AEF91ULL } }, /* XSUM_XXH128_testdata[9428] */\n    { 3143, 0x0000000000000000ULL, { 0x7752767611545404ULL, 0x81682A8D8D964913ULL } }, /* XSUM_XXH128_testdata[9429] */\n    { 3143, 0x000000009E3779B1ULL, { 0x7914DBAAF23CE330ULL, 0x9C9A804744AB7B8DULL } }, /* XSUM_XXH128_testdata[9430] */\n    { 3143, 0x9E3779B185EBCA8DULL, { 0x260BFD3E65208182ULL, 0xE0FF1F360BDB8CD8ULL } }, /* XSUM_XXH128_testdata[9431] */\n    { 3144, 0x0000000000000000ULL, { 0xBE7A4C7BED46B55BULL, 0x9BAE25F6ACBF3B55ULL } }, /* XSUM_XXH128_testdata[9432] */\n    { 3144, 0x000000009E3779B1ULL, { 0x3A691675C8F5ADD8ULL, 0xA2E3A3C5A893E646ULL } }, /* XSUM_XXH128_testdata[9433] */\n    { 3144, 0x9E3779B185EBCA8DULL, { 0x92131DB8BF216CD6ULL, 0x340ED41011F4CEBBULL } }, /* XSUM_XXH128_testdata[9434] */\n    { 3145, 0x0000000000000000ULL, { 0xF2500C96A26A435AULL, 0x7B427E5FB674B9B3ULL } }, /* XSUM_XXH128_testdata[9435] */\n    { 3145, 0x000000009E3779B1ULL, { 0xE3096C0CF9B613ABULL, 0x13FF9F27F155C7EEULL } }, /* XSUM_XXH128_testdata[9436] */\n    { 3145, 0x9E3779B185EBCA8DULL, { 0x42B8DE92C6B1CF90ULL, 0x5CAA7330B5B7911EULL } }, /* XSUM_XXH128_testdata[9437] */\n    { 3146, 0x0000000000000000ULL, { 0x7283019679119DD4ULL, 0x0B59C47D7E4BE7E8ULL } }, /* XSUM_XXH128_testdata[9438] */\n    { 3146, 0x000000009E3779B1ULL, { 0xF33A63D6D5C3BCE6ULL, 0xC4DA98C70F28826AULL } }, /* XSUM_XXH128_testdata[9439] */\n    { 3146, 0x9E3779B185EBCA8DULL, { 0xAC866D69D4189BE0ULL, 0x66B9F504226A9C9BULL } }, /* XSUM_XXH128_testdata[9440] */\n    { 3147, 0x0000000000000000ULL, { 0xEE62C8434C674EFDULL, 0x52791DD78ED03663ULL } }, /* XSUM_XXH128_testdata[9441] */\n    { 3147, 0x000000009E3779B1ULL, { 0xDE532BBFEBD70C98ULL, 0x962B6867D8A8FD10ULL } }, /* XSUM_XXH128_testdata[9442] */\n    { 3147, 0x9E3779B185EBCA8DULL, { 0xB8B22ADA709264B6ULL, 0xF4F8FFC6F0C2B41CULL } }, /* XSUM_XXH128_testdata[9443] */\n    { 3148, 0x0000000000000000ULL, { 0x7D74E58E0BEFDB70ULL, 0x719C3BC481B6216BULL } }, /* XSUM_XXH128_testdata[9444] */\n    { 3148, 0x000000009E3779B1ULL, { 0x626499006289FD61ULL, 0xE4D7F3111E97A364ULL } }, /* XSUM_XXH128_testdata[9445] */\n    { 3148, 0x9E3779B185EBCA8DULL, { 0xF77695F5F393512DULL, 0x0A8EE89E1E9A0F9BULL } }, /* XSUM_XXH128_testdata[9446] */\n    { 3149, 0x0000000000000000ULL, { 0x1FDDD0BAD4CE88C9ULL, 0xB47DBD792421C08CULL } }, /* XSUM_XXH128_testdata[9447] */\n    { 3149, 0x000000009E3779B1ULL, { 0xACEA06034BE35867ULL, 0x28646A58C32E8E61ULL } }, /* XSUM_XXH128_testdata[9448] */\n    { 3149, 0x9E3779B185EBCA8DULL, { 0xB3EFE44467B32FEAULL, 0x3F3BDE7A510B011BULL } }, /* XSUM_XXH128_testdata[9449] */\n    { 3150, 0x0000000000000000ULL, { 0x38D6BCB4926F185CULL, 0xFD763841F0B09B6BULL } }, /* XSUM_XXH128_testdata[9450] */\n    { 3150, 0x000000009E3779B1ULL, { 0x1CD1ADBB410D19E4ULL, 0xAA61F743DA9D1E8AULL } }, /* XSUM_XXH128_testdata[9451] */\n    { 3150, 0x9E3779B185EBCA8DULL, { 0x0FC39459D2521D4EULL, 0x9C3F60C10F622128ULL } }, /* XSUM_XXH128_testdata[9452] */\n    { 3151, 0x0000000000000000ULL, { 0x855665D5F6FA8D52ULL, 0x797EA44FEB23DF9EULL } }, /* XSUM_XXH128_testdata[9453] */\n    { 3151, 0x000000009E3779B1ULL, { 0xCCEFFBC0CB9FBD08ULL, 0x260DB4940E9DA08EULL } }, /* XSUM_XXH128_testdata[9454] */\n    { 3151, 0x9E3779B185EBCA8DULL, { 0x2EA467EEF6193680ULL, 0xFBC54C0A5CE3758FULL } }, /* XSUM_XXH128_testdata[9455] */\n    { 3152, 0x0000000000000000ULL, { 0xB1C8419925DC1A9AULL, 0xF8213CEFD0FCC625ULL } }, /* XSUM_XXH128_testdata[9456] */\n    { 3152, 0x000000009E3779B1ULL, { 0x3F5D848B06EC312FULL, 0x7C07B2C0ECEBD084ULL } }, /* XSUM_XXH128_testdata[9457] */\n    { 3152, 0x9E3779B185EBCA8DULL, { 0xE8946ACD5185D7FBULL, 0x5F584B0117E0AF68ULL } }, /* XSUM_XXH128_testdata[9458] */\n    { 3153, 0x0000000000000000ULL, { 0xBC151DA81698FCFEULL, 0xF55FBAC4D4D8E24DULL } }, /* XSUM_XXH128_testdata[9459] */\n    { 3153, 0x000000009E3779B1ULL, { 0xA927FEF3B46A7C33ULL, 0x8774BBF8A2F70E53ULL } }, /* XSUM_XXH128_testdata[9460] */\n    { 3153, 0x9E3779B185EBCA8DULL, { 0xAC962934E496454EULL, 0x304B6BFE8170E883ULL } }, /* XSUM_XXH128_testdata[9461] */\n    { 3154, 0x0000000000000000ULL, { 0x4DEDCFFA68D5467EULL, 0x700122800630D681ULL } }, /* XSUM_XXH128_testdata[9462] */\n    { 3154, 0x000000009E3779B1ULL, { 0x8EA68B738E358C73ULL, 0x10252C42A793BDAEULL } }, /* XSUM_XXH128_testdata[9463] */\n    { 3154, 0x9E3779B185EBCA8DULL, { 0x8A019BF926F56AFCULL, 0x7B4324D04988F04BULL } }, /* XSUM_XXH128_testdata[9464] */\n    { 3155, 0x0000000000000000ULL, { 0xC5F668C2918366E7ULL, 0x552BD4D0AB7C54EEULL } }, /* XSUM_XXH128_testdata[9465] */\n    { 3155, 0x000000009E3779B1ULL, { 0x69DDE2B4D11FA0E0ULL, 0x1B3EE2A4179C9158ULL } }, /* XSUM_XXH128_testdata[9466] */\n    { 3155, 0x9E3779B185EBCA8DULL, { 0x45D2A4EB35321947ULL, 0x07270DA3DC3A8142ULL } }, /* XSUM_XXH128_testdata[9467] */\n    { 3156, 0x0000000000000000ULL, { 0x67D816DEAC08D438ULL, 0xA885673378F4289FULL } }, /* XSUM_XXH128_testdata[9468] */\n    { 3156, 0x000000009E3779B1ULL, { 0x9CB5F166EBCF354DULL, 0x3C9C1445D104096AULL } }, /* XSUM_XXH128_testdata[9469] */\n    { 3156, 0x9E3779B185EBCA8DULL, { 0x79739B9941637BC9ULL, 0x16E3C9DE57C1F114ULL } }, /* XSUM_XXH128_testdata[9470] */\n    { 3157, 0x0000000000000000ULL, { 0x32DC83E1F0CC21EDULL, 0xF7B5D5E36B21A57CULL } }, /* XSUM_XXH128_testdata[9471] */\n    { 3157, 0x000000009E3779B1ULL, { 0x5D0D2E5DEF7CDD9EULL, 0x46BE7FCE8BF717C0ULL } }, /* XSUM_XXH128_testdata[9472] */\n    { 3157, 0x9E3779B185EBCA8DULL, { 0x7B527F237756C38DULL, 0xE95CD3D5FB1E3271ULL } }, /* XSUM_XXH128_testdata[9473] */\n    { 3158, 0x0000000000000000ULL, { 0x06D81FE3725F1B9CULL, 0x29F7E7C43DA0CE4CULL } }, /* XSUM_XXH128_testdata[9474] */\n    { 3158, 0x000000009E3779B1ULL, { 0x68FE175EDEF6AE0DULL, 0xDA1530EFD4EDDAB6ULL } }, /* XSUM_XXH128_testdata[9475] */\n    { 3158, 0x9E3779B185EBCA8DULL, { 0x0C08026E67295C55ULL, 0xD7351A0D4B76D546ULL } }, /* XSUM_XXH128_testdata[9476] */\n    { 3159, 0x0000000000000000ULL, { 0xDB8FA3B1AFB7ECBAULL, 0x66A1FD3A5C63C5BBULL } }, /* XSUM_XXH128_testdata[9477] */\n    { 3159, 0x000000009E3779B1ULL, { 0x1A12C03231EBE860ULL, 0x6BDC189D5AD92807ULL } }, /* XSUM_XXH128_testdata[9478] */\n    { 3159, 0x9E3779B185EBCA8DULL, { 0x79EDA5CF3C973FDAULL, 0xCCFAB3881B1C0044ULL } }, /* XSUM_XXH128_testdata[9479] */\n    { 3160, 0x0000000000000000ULL, { 0x5BBDE357F603F527ULL, 0x607DFB1DBE7A12E7ULL } }, /* XSUM_XXH128_testdata[9480] */\n    { 3160, 0x000000009E3779B1ULL, { 0xA86E32924D73A56AULL, 0x53A108F4883FD412ULL } }, /* XSUM_XXH128_testdata[9481] */\n    { 3160, 0x9E3779B185EBCA8DULL, { 0xB1A42426012B539AULL, 0xE867C9F1CBEA1631ULL } }, /* XSUM_XXH128_testdata[9482] */\n    { 3161, 0x0000000000000000ULL, { 0xF8DCBC45A4C0C21EULL, 0x0960A06C4C3A4BF7ULL } }, /* XSUM_XXH128_testdata[9483] */\n    { 3161, 0x000000009E3779B1ULL, { 0x1F9134E0378094FAULL, 0xD91AA4F35DEA1978ULL } }, /* XSUM_XXH128_testdata[9484] */\n    { 3161, 0x9E3779B185EBCA8DULL, { 0xDD6271CEEC1093A2ULL, 0xFB94F359E761401DULL } }, /* XSUM_XXH128_testdata[9485] */\n    { 3162, 0x0000000000000000ULL, { 0x80FFBDF5A887CF78ULL, 0xBDAF6C0AC593177CULL } }, /* XSUM_XXH128_testdata[9486] */\n    { 3162, 0x000000009E3779B1ULL, { 0x00BB364FA51EB0FAULL, 0x808251F9ECC64B85ULL } }, /* XSUM_XXH128_testdata[9487] */\n    { 3162, 0x9E3779B185EBCA8DULL, { 0x33A277578F7C70A7ULL, 0x987FFB62B00FC06DULL } }, /* XSUM_XXH128_testdata[9488] */\n    { 3163, 0x0000000000000000ULL, { 0x7CB788B0AAD0217BULL, 0xFB98736154BC7E16ULL } }, /* XSUM_XXH128_testdata[9489] */\n    { 3163, 0x000000009E3779B1ULL, { 0xE7B7071586D955C9ULL, 0x363C6F6B7DB7F31FULL } }, /* XSUM_XXH128_testdata[9490] */\n    { 3163, 0x9E3779B185EBCA8DULL, { 0xC227D2FF3DF3C920ULL, 0x20CB567C25DEED0BULL } }, /* XSUM_XXH128_testdata[9491] */\n    { 3164, 0x0000000000000000ULL, { 0xAF2B32B04A995872ULL, 0xF0F54204AFC7BA3FULL } }, /* XSUM_XXH128_testdata[9492] */\n    { 3164, 0x000000009E3779B1ULL, { 0x101B1AE2830D5AA9ULL, 0x6CB615532DE0D4C6ULL } }, /* XSUM_XXH128_testdata[9493] */\n    { 3164, 0x9E3779B185EBCA8DULL, { 0x7EE4CCD02886B51BULL, 0x17B1C212E18C3C13ULL } }, /* XSUM_XXH128_testdata[9494] */\n    { 3165, 0x0000000000000000ULL, { 0xCA116C1D32F16850ULL, 0x9066E69DCD089B57ULL } }, /* XSUM_XXH128_testdata[9495] */\n    { 3165, 0x000000009E3779B1ULL, { 0x9A3CC7E1F1EB7B0FULL, 0x2FAAFBBD48F35AE7ULL } }, /* XSUM_XXH128_testdata[9496] */\n    { 3165, 0x9E3779B185EBCA8DULL, { 0x40DFBFE05CD60823ULL, 0xA9E11F4865A2D892ULL } }, /* XSUM_XXH128_testdata[9497] */\n    { 3166, 0x0000000000000000ULL, { 0x721C1AF6E46B140BULL, 0x7AAF2B627BCC65CAULL } }, /* XSUM_XXH128_testdata[9498] */\n    { 3166, 0x000000009E3779B1ULL, { 0x55AB62FAAF0FA19DULL, 0xEFA2227239B9F5B5ULL } }, /* XSUM_XXH128_testdata[9499] */\n    { 3166, 0x9E3779B185EBCA8DULL, { 0xB57F8B4F4981F8A8ULL, 0x2D215F07596BCC11ULL } }, /* XSUM_XXH128_testdata[9500] */\n    { 3167, 0x0000000000000000ULL, { 0xDD4A21EB8827AFA9ULL, 0xCC39039BB860F781ULL } }, /* XSUM_XXH128_testdata[9501] */\n    { 3167, 0x000000009E3779B1ULL, { 0x21C51ACE619E5E03ULL, 0x70BBB963650CF672ULL } }, /* XSUM_XXH128_testdata[9502] */\n    { 3167, 0x9E3779B185EBCA8DULL, { 0xAC727DD105324DCFULL, 0xFEFAD7AACD1DFEEBULL } }, /* XSUM_XXH128_testdata[9503] */\n    { 3168, 0x0000000000000000ULL, { 0xC5D7E262E4384AB3ULL, 0x21D9CABC9DB5042FULL } }, /* XSUM_XXH128_testdata[9504] */\n    { 3168, 0x000000009E3779B1ULL, { 0x5794BECC1ECB9979ULL, 0x9A2AF551408920E1ULL } }, /* XSUM_XXH128_testdata[9505] */\n    { 3168, 0x9E3779B185EBCA8DULL, { 0xEEB067CADF77011EULL, 0x0676D6447DBFAD0DULL } }, /* XSUM_XXH128_testdata[9506] */\n    { 3169, 0x0000000000000000ULL, { 0x9218F4A889AA03D8ULL, 0x0EE2823659D5451BULL } }, /* XSUM_XXH128_testdata[9507] */\n    { 3169, 0x000000009E3779B1ULL, { 0x264E7C5D65ADAC52ULL, 0xC8594FC3A4D96463ULL } }, /* XSUM_XXH128_testdata[9508] */\n    { 3169, 0x9E3779B185EBCA8DULL, { 0xCBEC7F6BBC8A85EBULL, 0xA1951E7CBDDE47F7ULL } }, /* XSUM_XXH128_testdata[9509] */\n    { 3170, 0x0000000000000000ULL, { 0xDE01D8F5378D481BULL, 0x9B7C7208C780A6C8ULL } }, /* XSUM_XXH128_testdata[9510] */\n    { 3170, 0x000000009E3779B1ULL, { 0xF73AAB6E411A6858ULL, 0xCDC079F66AC35220ULL } }, /* XSUM_XXH128_testdata[9511] */\n    { 3170, 0x9E3779B185EBCA8DULL, { 0xA8D425444A3E7BF5ULL, 0xB8529F3A7319CA7AULL } }, /* XSUM_XXH128_testdata[9512] */\n    { 3171, 0x0000000000000000ULL, { 0xBB4477B4F1092CAEULL, 0x7F4680BF2373DE77ULL } }, /* XSUM_XXH128_testdata[9513] */\n    { 3171, 0x000000009E3779B1ULL, { 0x629B5A371E328E83ULL, 0xAD17121D7BB278A9ULL } }, /* XSUM_XXH128_testdata[9514] */\n    { 3171, 0x9E3779B185EBCA8DULL, { 0xAF9138F57295DF4EULL, 0x6821083BC7275DBCULL } }, /* XSUM_XXH128_testdata[9515] */\n    { 3172, 0x0000000000000000ULL, { 0xCEF365E0B1653DD0ULL, 0x5E9DA3024919C647ULL } }, /* XSUM_XXH128_testdata[9516] */\n    { 3172, 0x000000009E3779B1ULL, { 0xE9EDF49CD6F811DCULL, 0x9C3E911576BC84EAULL } }, /* XSUM_XXH128_testdata[9517] */\n    { 3172, 0x9E3779B185EBCA8DULL, { 0xF59389E7F8293C0BULL, 0x61E65B01FCAD7489ULL } }, /* XSUM_XXH128_testdata[9518] */\n    { 3173, 0x0000000000000000ULL, { 0xFA644D72D95371EBULL, 0xB218F1A27B7BF37FULL } }, /* XSUM_XXH128_testdata[9519] */\n    { 3173, 0x000000009E3779B1ULL, { 0xB29A74743747ED04ULL, 0x6DFC42B3DFE10D64ULL } }, /* XSUM_XXH128_testdata[9520] */\n    { 3173, 0x9E3779B185EBCA8DULL, { 0xC00024B7481AD55FULL, 0x11D2F58DCB1E69C3ULL } }, /* XSUM_XXH128_testdata[9521] */\n    { 3174, 0x0000000000000000ULL, { 0x1938F58C6870DDE4ULL, 0xBB720BA2FFFB852FULL } }, /* XSUM_XXH128_testdata[9522] */\n    { 3174, 0x000000009E3779B1ULL, { 0xDD7CB75218B11014ULL, 0x1B5D9475BFF462FBULL } }, /* XSUM_XXH128_testdata[9523] */\n    { 3174, 0x9E3779B185EBCA8DULL, { 0x2AEF53C26297B485ULL, 0x7FD0675741AE1996ULL } }, /* XSUM_XXH128_testdata[9524] */\n    { 3175, 0x0000000000000000ULL, { 0xA5B4D3ADA8247BE3ULL, 0x2162C708CCB8897CULL } }, /* XSUM_XXH128_testdata[9525] */\n    { 3175, 0x000000009E3779B1ULL, { 0x2C88DEDAA60E0186ULL, 0x26EB851F9CB599AFULL } }, /* XSUM_XXH128_testdata[9526] */\n    { 3175, 0x9E3779B185EBCA8DULL, { 0x69E247AC862672B7ULL, 0x0B99A672B18B2632ULL } }, /* XSUM_XXH128_testdata[9527] */\n    { 3176, 0x0000000000000000ULL, { 0x6E0961238AD61E51ULL, 0x3DF72E01FDF1E01EULL } }, /* XSUM_XXH128_testdata[9528] */\n    { 3176, 0x000000009E3779B1ULL, { 0x4C77C5AD636B90ECULL, 0x571449F97134F771ULL } }, /* XSUM_XXH128_testdata[9529] */\n    { 3176, 0x9E3779B185EBCA8DULL, { 0xCD569004C2B170DFULL, 0xFDBEC4CB13E5071DULL } }, /* XSUM_XXH128_testdata[9530] */\n    { 3177, 0x0000000000000000ULL, { 0xCF91B2CA001D8F69ULL, 0xEB50A4AEFE0C443FULL } }, /* XSUM_XXH128_testdata[9531] */\n    { 3177, 0x000000009E3779B1ULL, { 0xF5C23E50BD57FF3DULL, 0x8C49E7ED65107301ULL } }, /* XSUM_XXH128_testdata[9532] */\n    { 3177, 0x9E3779B185EBCA8DULL, { 0xB14BCA810E177D60ULL, 0x5B142FCBAA4FC0ABULL } }, /* XSUM_XXH128_testdata[9533] */\n    { 3178, 0x0000000000000000ULL, { 0x6E888E518A0F027FULL, 0x9B3CEF2DC596DCC1ULL } }, /* XSUM_XXH128_testdata[9534] */\n    { 3178, 0x000000009E3779B1ULL, { 0xE4A1C0B56ED9D9D6ULL, 0x5063D044163D4A85ULL } }, /* XSUM_XXH128_testdata[9535] */\n    { 3178, 0x9E3779B185EBCA8DULL, { 0x79DA0978BE221017ULL, 0xCA7D3E2767048778ULL } }, /* XSUM_XXH128_testdata[9536] */\n    { 3179, 0x0000000000000000ULL, { 0x99E992B164F58E57ULL, 0xA2B3F0135C8D52C3ULL } }, /* XSUM_XXH128_testdata[9537] */\n    { 3179, 0x000000009E3779B1ULL, { 0xBEC587654F445D68ULL, 0xA3B429B8943A4B5DULL } }, /* XSUM_XXH128_testdata[9538] */\n    { 3179, 0x9E3779B185EBCA8DULL, { 0xA990AB564E78F30DULL, 0x1AA73A6D7D97E01BULL } }, /* XSUM_XXH128_testdata[9539] */\n    { 3180, 0x0000000000000000ULL, { 0xA7B031E2ABB1D9B9ULL, 0xCE9AE902F9869416ULL } }, /* XSUM_XXH128_testdata[9540] */\n    { 3180, 0x000000009E3779B1ULL, { 0x1BC7A000E9C9F44DULL, 0x4ACA7AFFB8D0C015ULL } }, /* XSUM_XXH128_testdata[9541] */\n    { 3180, 0x9E3779B185EBCA8DULL, { 0xA4E61E865A7D5D3BULL, 0x49D03ADD8AF9BAD1ULL } }, /* XSUM_XXH128_testdata[9542] */\n    { 3181, 0x0000000000000000ULL, { 0xB23CE7F2568B5811ULL, 0x8FB3175F7B499B2AULL } }, /* XSUM_XXH128_testdata[9543] */\n    { 3181, 0x000000009E3779B1ULL, { 0x2F25D51C8C59EDECULL, 0x762FA5F4D69A9E1FULL } }, /* XSUM_XXH128_testdata[9544] */\n    { 3181, 0x9E3779B185EBCA8DULL, { 0x6B4F89A3C4EB7CE1ULL, 0x23153E15E8FE0838ULL } }, /* XSUM_XXH128_testdata[9545] */\n    { 3182, 0x0000000000000000ULL, { 0x4EB82133191B1BB9ULL, 0x1C5E52D633E5553AULL } }, /* XSUM_XXH128_testdata[9546] */\n    { 3182, 0x000000009E3779B1ULL, { 0xFDAA21767B38FD93ULL, 0x047FDD205B04B6C0ULL } }, /* XSUM_XXH128_testdata[9547] */\n    { 3182, 0x9E3779B185EBCA8DULL, { 0x34799BCBAE6F22EBULL, 0xDDC90AB016BEC363ULL } }, /* XSUM_XXH128_testdata[9548] */\n    { 3183, 0x0000000000000000ULL, { 0xEF646324A5097522ULL, 0xECCDA991DEFBF464ULL } }, /* XSUM_XXH128_testdata[9549] */\n    { 3183, 0x000000009E3779B1ULL, { 0xE47272553105B543ULL, 0xF3D97B3D94EF51CBULL } }, /* XSUM_XXH128_testdata[9550] */\n    { 3183, 0x9E3779B185EBCA8DULL, { 0x84B2C177605C0E14ULL, 0x3A65E980FFE09C1BULL } }, /* XSUM_XXH128_testdata[9551] */\n    { 3184, 0x0000000000000000ULL, { 0x61F2380BEC36708BULL, 0x29CC04A5CADFEF89ULL } }, /* XSUM_XXH128_testdata[9552] */\n    { 3184, 0x000000009E3779B1ULL, { 0x88A1983273B78629ULL, 0xF9F8FBBACC12E468ULL } }, /* XSUM_XXH128_testdata[9553] */\n    { 3184, 0x9E3779B185EBCA8DULL, { 0x6B395E53284250DDULL, 0x4E2F34DA409E225DULL } }, /* XSUM_XXH128_testdata[9554] */\n    { 3185, 0x0000000000000000ULL, { 0x7B672597E5745924ULL, 0xB15526999E63FAF9ULL } }, /* XSUM_XXH128_testdata[9555] */\n    { 3185, 0x000000009E3779B1ULL, { 0x6B81A7A5AEBFA2BBULL, 0x79D59497CA26B509ULL } }, /* XSUM_XXH128_testdata[9556] */\n    { 3185, 0x9E3779B185EBCA8DULL, { 0x1B3B332DB85C89C6ULL, 0x326D993AC0C6E625ULL } }, /* XSUM_XXH128_testdata[9557] */\n    { 3186, 0x0000000000000000ULL, { 0x57588E8652F646B3ULL, 0x053DC4E514818133ULL } }, /* XSUM_XXH128_testdata[9558] */\n    { 3186, 0x000000009E3779B1ULL, { 0xE2F098D3CA5A9F94ULL, 0x3814B10C23D46C28ULL } }, /* XSUM_XXH128_testdata[9559] */\n    { 3186, 0x9E3779B185EBCA8DULL, { 0x25B922125C9144C8ULL, 0xBCFC5084D89F0481ULL } }, /* XSUM_XXH128_testdata[9560] */\n    { 3187, 0x0000000000000000ULL, { 0xDF2FC9037E06173FULL, 0x8B82B354D8056D07ULL } }, /* XSUM_XXH128_testdata[9561] */\n    { 3187, 0x000000009E3779B1ULL, { 0x7B49F69F74617F03ULL, 0xC41A4A27BE4ABF2FULL } }, /* XSUM_XXH128_testdata[9562] */\n    { 3187, 0x9E3779B185EBCA8DULL, { 0x64138127DEC583E4ULL, 0xD65554E65ECE9EAEULL } }, /* XSUM_XXH128_testdata[9563] */\n    { 3188, 0x0000000000000000ULL, { 0xCD4A4AFCD0540A03ULL, 0x9D62BA6EB1C63E8DULL } }, /* XSUM_XXH128_testdata[9564] */\n    { 3188, 0x000000009E3779B1ULL, { 0x9883EE8134337339ULL, 0x8518863F4E6143A3ULL } }, /* XSUM_XXH128_testdata[9565] */\n    { 3188, 0x9E3779B185EBCA8DULL, { 0x766D05399B680371ULL, 0x1B1D9AE8A6B6CB20ULL } }, /* XSUM_XXH128_testdata[9566] */\n    { 3189, 0x0000000000000000ULL, { 0xE38C2538DFDFC867ULL, 0x2E6627FBCD960976ULL } }, /* XSUM_XXH128_testdata[9567] */\n    { 3189, 0x000000009E3779B1ULL, { 0x84B972121D869CD6ULL, 0xF13863D2B034527DULL } }, /* XSUM_XXH128_testdata[9568] */\n    { 3189, 0x9E3779B185EBCA8DULL, { 0xA51F716204993CE6ULL, 0x69F1C1BCF644295EULL } }, /* XSUM_XXH128_testdata[9569] */\n    { 3190, 0x0000000000000000ULL, { 0x7B96AC539F64EC20ULL, 0xF132F3592A013852ULL } }, /* XSUM_XXH128_testdata[9570] */\n    { 3190, 0x000000009E3779B1ULL, { 0xB8A0CF8725A8A8ABULL, 0xA53274B1802C4B22ULL } }, /* XSUM_XXH128_testdata[9571] */\n    { 3190, 0x9E3779B185EBCA8DULL, { 0x171E356F3E050A39ULL, 0xA85B00C0AF32341BULL } }, /* XSUM_XXH128_testdata[9572] */\n    { 3191, 0x0000000000000000ULL, { 0xBD29C98EFB036850ULL, 0x6CBFF9E3E74AE9AAULL } }, /* XSUM_XXH128_testdata[9573] */\n    { 3191, 0x000000009E3779B1ULL, { 0x052AE8A16BD193BEULL, 0x18130D1E3914CE18ULL } }, /* XSUM_XXH128_testdata[9574] */\n    { 3191, 0x9E3779B185EBCA8DULL, { 0xAA1DC8EA46F5581BULL, 0x961C38DC821EA789ULL } }, /* XSUM_XXH128_testdata[9575] */\n    { 3192, 0x0000000000000000ULL, { 0x2CF893DB51A28DE4ULL, 0x02A9995C9D13C357ULL } }, /* XSUM_XXH128_testdata[9576] */\n    { 3192, 0x000000009E3779B1ULL, { 0x2F076245AA78315BULL, 0xA6544DBEB469EF5AULL } }, /* XSUM_XXH128_testdata[9577] */\n    { 3192, 0x9E3779B185EBCA8DULL, { 0xC47F8B7D70654B75ULL, 0xBED585F5307DB39AULL } }, /* XSUM_XXH128_testdata[9578] */\n    { 3193, 0x0000000000000000ULL, { 0x5333861320F7224CULL, 0xE77EE0BBAD96BACDULL } }, /* XSUM_XXH128_testdata[9579] */\n    { 3193, 0x000000009E3779B1ULL, { 0x8D97A2FB587A3E44ULL, 0xAC82DBE76356FB0BULL } }, /* XSUM_XXH128_testdata[9580] */\n    { 3193, 0x9E3779B185EBCA8DULL, { 0x8805977B05B510F7ULL, 0x6F374071632CAC3EULL } }, /* XSUM_XXH128_testdata[9581] */\n    { 3194, 0x0000000000000000ULL, { 0x71572463208AC824ULL, 0x5E23D112C1C89D53ULL } }, /* XSUM_XXH128_testdata[9582] */\n    { 3194, 0x000000009E3779B1ULL, { 0x1662549C5DC439C6ULL, 0xC8A2730DDEEFDFD9ULL } }, /* XSUM_XXH128_testdata[9583] */\n    { 3194, 0x9E3779B185EBCA8DULL, { 0xD738493B17010BE8ULL, 0xBA4A8EAA9AB84BA2ULL } }, /* XSUM_XXH128_testdata[9584] */\n    { 3195, 0x0000000000000000ULL, { 0xBB1F7B7CBDD9DE66ULL, 0x599BE01816C0074CULL } }, /* XSUM_XXH128_testdata[9585] */\n    { 3195, 0x000000009E3779B1ULL, { 0xA973D66E21588F15ULL, 0x33114724DF8C6901ULL } }, /* XSUM_XXH128_testdata[9586] */\n    { 3195, 0x9E3779B185EBCA8DULL, { 0x63407B9EED2586E7ULL, 0x738AE2BAA15EC9C2ULL } }, /* XSUM_XXH128_testdata[9587] */\n    { 3196, 0x0000000000000000ULL, { 0xE3C8FE53CA50AC3BULL, 0xF91E4746FB54FE20ULL } }, /* XSUM_XXH128_testdata[9588] */\n    { 3196, 0x000000009E3779B1ULL, { 0x7C538AA00B3AE28CULL, 0x3B5EB4B029C3E821ULL } }, /* XSUM_XXH128_testdata[9589] */\n    { 3196, 0x9E3779B185EBCA8DULL, { 0x7360FE7337E97DFAULL, 0xAA945D1351764895ULL } }, /* XSUM_XXH128_testdata[9590] */\n    { 3197, 0x0000000000000000ULL, { 0x958B951AA7D6A602ULL, 0x311B58F8167E05D1ULL } }, /* XSUM_XXH128_testdata[9591] */\n    { 3197, 0x000000009E3779B1ULL, { 0xD0CEB4937BA797B6ULL, 0x307C215EBB428997ULL } }, /* XSUM_XXH128_testdata[9592] */\n    { 3197, 0x9E3779B185EBCA8DULL, { 0x8D45E049E572DAC7ULL, 0x5461E921046DA5DFULL } }, /* XSUM_XXH128_testdata[9593] */\n    { 3198, 0x0000000000000000ULL, { 0xF721684AD49AD334ULL, 0xAF5C8AC7C34E529CULL } }, /* XSUM_XXH128_testdata[9594] */\n    { 3198, 0x000000009E3779B1ULL, { 0x0E1EDEBD72B2E10CULL, 0xB2F4B6DE96CA8D71ULL } }, /* XSUM_XXH128_testdata[9595] */\n    { 3198, 0x9E3779B185EBCA8DULL, { 0xB09F86AB41D114A5ULL, 0xCB9C75351375154EULL } }, /* XSUM_XXH128_testdata[9596] */\n    { 3199, 0x0000000000000000ULL, { 0x10937A9EA8245551ULL, 0x233AF391E30E4E0FULL } }, /* XSUM_XXH128_testdata[9597] */\n    { 3199, 0x000000009E3779B1ULL, { 0x760E9D88004AF0F1ULL, 0x50812AC28BA035F6ULL } }, /* XSUM_XXH128_testdata[9598] */\n    { 3199, 0x9E3779B185EBCA8DULL, { 0x374C2BE03FF66B93ULL, 0x0B8006358736E5D3ULL } }, /* XSUM_XXH128_testdata[9599] */\n    { 3200, 0x0000000000000000ULL, { 0xE4F44142422C90AEULL, 0x66836464182028CAULL } }, /* XSUM_XXH128_testdata[9600] */\n    { 3200, 0x000000009E3779B1ULL, { 0x48A485D44C5DA580ULL, 0x9CA19F1378DDFDB6ULL } }, /* XSUM_XXH128_testdata[9601] */\n    { 3200, 0x9E3779B185EBCA8DULL, { 0x87B4AA4EBCE160EAULL, 0x0805F125CD937438ULL } }, /* XSUM_XXH128_testdata[9602] */\n    { 3201, 0x0000000000000000ULL, { 0x41CCAA0B3010027FULL, 0xD6B8B9DA7A95CB35ULL } }, /* XSUM_XXH128_testdata[9603] */\n    { 3201, 0x000000009E3779B1ULL, { 0x15EDB7F9773654E2ULL, 0x2736E1C11F152647ULL } }, /* XSUM_XXH128_testdata[9604] */\n    { 3201, 0x9E3779B185EBCA8DULL, { 0x4D03036AAD73E5DEULL, 0x363D8FA0FF39A2B6ULL } }, /* XSUM_XXH128_testdata[9605] */\n    { 3202, 0x0000000000000000ULL, { 0x8D3755C9954B5747ULL, 0xC36E79B4E8B3A27CULL } }, /* XSUM_XXH128_testdata[9606] */\n    { 3202, 0x000000009E3779B1ULL, { 0x6A6265E168F4FB10ULL, 0x3FEE2DE9ABEFF395ULL } }, /* XSUM_XXH128_testdata[9607] */\n    { 3202, 0x9E3779B185EBCA8DULL, { 0x0CA71FD194BDE3A7ULL, 0x401BC2C886EA941AULL } }, /* XSUM_XXH128_testdata[9608] */\n    { 3203, 0x0000000000000000ULL, { 0x6666F844EBCE1C79ULL, 0xE3959FCB1834B4ECULL } }, /* XSUM_XXH128_testdata[9609] */\n    { 3203, 0x000000009E3779B1ULL, { 0x2FE2C3591D035876ULL, 0xD616837CD88CE63FULL } }, /* XSUM_XXH128_testdata[9610] */\n    { 3203, 0x9E3779B185EBCA8DULL, { 0xD480ECFD26CE75A3ULL, 0x4E1E4F8E3343D85CULL } }, /* XSUM_XXH128_testdata[9611] */\n    { 3204, 0x0000000000000000ULL, { 0x4D0200F714A6AD28ULL, 0xEF0A7DE40698A58CULL } }, /* XSUM_XXH128_testdata[9612] */\n    { 3204, 0x000000009E3779B1ULL, { 0xEFC112E8DF8AD662ULL, 0xEF24AE9FC733B403ULL } }, /* XSUM_XXH128_testdata[9613] */\n    { 3204, 0x9E3779B185EBCA8DULL, { 0xA107631C511D1C36ULL, 0x18C6EDC62CB8EA80ULL } }, /* XSUM_XXH128_testdata[9614] */\n    { 3205, 0x0000000000000000ULL, { 0x794974AC9022F826ULL, 0xD528E8E4ED2CE00FULL } }, /* XSUM_XXH128_testdata[9615] */\n    { 3205, 0x000000009E3779B1ULL, { 0xB92300CDE618DE15ULL, 0x11EB86C432C549E5ULL } }, /* XSUM_XXH128_testdata[9616] */\n    { 3205, 0x9E3779B185EBCA8DULL, { 0x1F908D5F57F7A269ULL, 0xD81A00C6CB30299CULL } }, /* XSUM_XXH128_testdata[9617] */\n    { 3206, 0x0000000000000000ULL, { 0x9C40FCD5E16690FBULL, 0xD324DC3BFA9A7637ULL } }, /* XSUM_XXH128_testdata[9618] */\n    { 3206, 0x000000009E3779B1ULL, { 0xCA0D782379268408ULL, 0x6E45D3039F430C8FULL } }, /* XSUM_XXH128_testdata[9619] */\n    { 3206, 0x9E3779B185EBCA8DULL, { 0xC6F7CCD7ACCDB0CFULL, 0xAF9EED43C9D9BC3BULL } }, /* XSUM_XXH128_testdata[9620] */\n    { 3207, 0x0000000000000000ULL, { 0xDE08B46FADEB1AB9ULL, 0xD0F075C383C5DF26ULL } }, /* XSUM_XXH128_testdata[9621] */\n    { 3207, 0x000000009E3779B1ULL, { 0xB214842EDD94BD19ULL, 0x8EF200711FC45CCFULL } }, /* XSUM_XXH128_testdata[9622] */\n    { 3207, 0x9E3779B185EBCA8DULL, { 0x514CF2CF2CBC93D1ULL, 0x7C7C4341E5E320CCULL } }, /* XSUM_XXH128_testdata[9623] */\n    { 3208, 0x0000000000000000ULL, { 0x8A7438A43529C222ULL, 0x625AEDC5227223B3ULL } }, /* XSUM_XXH128_testdata[9624] */\n    { 3208, 0x000000009E3779B1ULL, { 0x88233A53244A5AE7ULL, 0x8FCA330D87467D03ULL } }, /* XSUM_XXH128_testdata[9625] */\n    { 3208, 0x9E3779B185EBCA8DULL, { 0x1A227D3389B55505ULL, 0x21ECCE4F3248767DULL } }, /* XSUM_XXH128_testdata[9626] */\n    { 3209, 0x0000000000000000ULL, { 0x50DD979D54711E20ULL, 0xF195C078C53EA4CCULL } }, /* XSUM_XXH128_testdata[9627] */\n    { 3209, 0x000000009E3779B1ULL, { 0x9A9DEDDBA1FD8FEFULL, 0xB36653894542E5E4ULL } }, /* XSUM_XXH128_testdata[9628] */\n    { 3209, 0x9E3779B185EBCA8DULL, { 0xBB983FBA9B8D6000ULL, 0xD910876346F514C0ULL } }, /* XSUM_XXH128_testdata[9629] */\n    { 3210, 0x0000000000000000ULL, { 0x327FD7CC0801A0E2ULL, 0x565A454217B5D73BULL } }, /* XSUM_XXH128_testdata[9630] */\n    { 3210, 0x000000009E3779B1ULL, { 0x280FCC1D1E742AD8ULL, 0xD6894B7A0236C71BULL } }, /* XSUM_XXH128_testdata[9631] */\n    { 3210, 0x9E3779B185EBCA8DULL, { 0xDC5196C9020C217CULL, 0x9BDD3AD6009079F9ULL } }, /* XSUM_XXH128_testdata[9632] */\n    { 3211, 0x0000000000000000ULL, { 0x39E068DB5A6B02DBULL, 0xF62C84545C0281F1ULL } }, /* XSUM_XXH128_testdata[9633] */\n    { 3211, 0x000000009E3779B1ULL, { 0x994F100594EC34B8ULL, 0xF2D093322C96D766ULL } }, /* XSUM_XXH128_testdata[9634] */\n    { 3211, 0x9E3779B185EBCA8DULL, { 0x75D4E560E34F1106ULL, 0xBAA44D885443731AULL } }, /* XSUM_XXH128_testdata[9635] */\n    { 3212, 0x0000000000000000ULL, { 0x29A0143EDE45AEE1ULL, 0x976C3835463937EFULL } }, /* XSUM_XXH128_testdata[9636] */\n    { 3212, 0x000000009E3779B1ULL, { 0x0347D8F4FFEB92B3ULL, 0x733513490DDCC26AULL } }, /* XSUM_XXH128_testdata[9637] */\n    { 3212, 0x9E3779B185EBCA8DULL, { 0xAF25DF4AAFEDF21AULL, 0x23B0DE734A96E757ULL } }, /* XSUM_XXH128_testdata[9638] */\n    { 3213, 0x0000000000000000ULL, { 0x6343015E343C3D4FULL, 0x257E098313F8DBA1ULL } }, /* XSUM_XXH128_testdata[9639] */\n    { 3213, 0x000000009E3779B1ULL, { 0xED1F6FF701ED2337ULL, 0xFAEF70173E65B1C0ULL } }, /* XSUM_XXH128_testdata[9640] */\n    { 3213, 0x9E3779B185EBCA8DULL, { 0xB9664745FCAE35F9ULL, 0x1E1AE89AFF2D73CCULL } }, /* XSUM_XXH128_testdata[9641] */\n    { 3214, 0x0000000000000000ULL, { 0xE3463CBC2B13D590ULL, 0x95DEE7453B300B62ULL } }, /* XSUM_XXH128_testdata[9642] */\n    { 3214, 0x000000009E3779B1ULL, { 0x0D2C22D56AA33511ULL, 0x497795B613CED1B1ULL } }, /* XSUM_XXH128_testdata[9643] */\n    { 3214, 0x9E3779B185EBCA8DULL, { 0xBFAE251499EA61C6ULL, 0x58B5967C2F5C3B7AULL } }, /* XSUM_XXH128_testdata[9644] */\n    { 3215, 0x0000000000000000ULL, { 0xDA53BAC60D4D22FBULL, 0x5CF00CCAC72154DBULL } }, /* XSUM_XXH128_testdata[9645] */\n    { 3215, 0x000000009E3779B1ULL, { 0xBB08AAB63B38F7C1ULL, 0x1215B41561208DF3ULL } }, /* XSUM_XXH128_testdata[9646] */\n    { 3215, 0x9E3779B185EBCA8DULL, { 0xC330B390CBBB2745ULL, 0x07C0F8EE9D820C09ULL } }, /* XSUM_XXH128_testdata[9647] */\n    { 3216, 0x0000000000000000ULL, { 0x33733C1897345AFEULL, 0x95F5E9091C10B813ULL } }, /* XSUM_XXH128_testdata[9648] */\n    { 3216, 0x000000009E3779B1ULL, { 0x6800ED3B5D8F422BULL, 0xCF993FB29BF31E2BULL } }, /* XSUM_XXH128_testdata[9649] */\n    { 3216, 0x9E3779B185EBCA8DULL, { 0x8CC5892CC7A8149CULL, 0x370D383C94E27F6EULL } }, /* XSUM_XXH128_testdata[9650] */\n    { 3217, 0x0000000000000000ULL, { 0x1BCB0445A3CB7848ULL, 0x1AE168942EE51851ULL } }, /* XSUM_XXH128_testdata[9651] */\n    { 3217, 0x000000009E3779B1ULL, { 0x9DE832E0A0F93341ULL, 0x1CCA5FCAFD8C9643ULL } }, /* XSUM_XXH128_testdata[9652] */\n    { 3217, 0x9E3779B185EBCA8DULL, { 0xB605E36385A53084ULL, 0x8BFB869AAE699ACFULL } }, /* XSUM_XXH128_testdata[9653] */\n    { 3218, 0x0000000000000000ULL, { 0xCB1AC0AA280D7940ULL, 0x73A49494D6F52BDFULL } }, /* XSUM_XXH128_testdata[9654] */\n    { 3218, 0x000000009E3779B1ULL, { 0xD119E60014842B22ULL, 0x6186F4693BA9058CULL } }, /* XSUM_XXH128_testdata[9655] */\n    { 3218, 0x9E3779B185EBCA8DULL, { 0x48A71403DDA6AA2AULL, 0xDAD341E203E09BB8ULL } }, /* XSUM_XXH128_testdata[9656] */\n    { 3219, 0x0000000000000000ULL, { 0x198618AAF11FD491ULL, 0x3D6902EA2B64F31CULL } }, /* XSUM_XXH128_testdata[9657] */\n    { 3219, 0x000000009E3779B1ULL, { 0x9B179CA9B5EFC919ULL, 0x01887ECBE894F14DULL } }, /* XSUM_XXH128_testdata[9658] */\n    { 3219, 0x9E3779B185EBCA8DULL, { 0x3DE97BF2A3C67501ULL, 0x1C130E89597EA53BULL } }, /* XSUM_XXH128_testdata[9659] */\n    { 3220, 0x0000000000000000ULL, { 0xF3FF97A90BAAB6D2ULL, 0x0AA9EAEFCD373BB9ULL } }, /* XSUM_XXH128_testdata[9660] */\n    { 3220, 0x000000009E3779B1ULL, { 0x4F5829440589BEA6ULL, 0xB3F4D5897A87EF59ULL } }, /* XSUM_XXH128_testdata[9661] */\n    { 3220, 0x9E3779B185EBCA8DULL, { 0xF99AC95EC5B45504ULL, 0xCE824B1DA11897FEULL } }, /* XSUM_XXH128_testdata[9662] */\n    { 3221, 0x0000000000000000ULL, { 0x1C7A0A7A246C04EAULL, 0x432A17EFD1DF3EB6ULL } }, /* XSUM_XXH128_testdata[9663] */\n    { 3221, 0x000000009E3779B1ULL, { 0xCDFEAF9A4FF2992AULL, 0x12F7B2A459580D77ULL } }, /* XSUM_XXH128_testdata[9664] */\n    { 3221, 0x9E3779B185EBCA8DULL, { 0xE76310623B1F8C4BULL, 0x6D2BE04D6BC23AFAULL } }, /* XSUM_XXH128_testdata[9665] */\n    { 3222, 0x0000000000000000ULL, { 0xA988BA83C7D83F50ULL, 0xC61B5C3A9848BC7EULL } }, /* XSUM_XXH128_testdata[9666] */\n    { 3222, 0x000000009E3779B1ULL, { 0xCCF182233C5A4B7FULL, 0xC77A86DAE9F7B960ULL } }, /* XSUM_XXH128_testdata[9667] */\n    { 3222, 0x9E3779B185EBCA8DULL, { 0x9439184E103217FDULL, 0x6673C2C3097D4C07ULL } }, /* XSUM_XXH128_testdata[9668] */\n    { 3223, 0x0000000000000000ULL, { 0x8F522D070E6B88CEULL, 0xB955F58D2A3BEE52ULL } }, /* XSUM_XXH128_testdata[9669] */\n    { 3223, 0x000000009E3779B1ULL, { 0x65F5F87EF7BFFE2FULL, 0x66EEAB7BBB67F2A9ULL } }, /* XSUM_XXH128_testdata[9670] */\n    { 3223, 0x9E3779B185EBCA8DULL, { 0xEA27D437295C59CEULL, 0xF7EE23BFF0961582ULL } }, /* XSUM_XXH128_testdata[9671] */\n    { 3224, 0x0000000000000000ULL, { 0xD02006011364318CULL, 0x5CEEEBC78A5A7055ULL } }, /* XSUM_XXH128_testdata[9672] */\n    { 3224, 0x000000009E3779B1ULL, { 0x400A8A3217DC1DA0ULL, 0xCD26C7F404BCAAE9ULL } }, /* XSUM_XXH128_testdata[9673] */\n    { 3224, 0x9E3779B185EBCA8DULL, { 0xA62255EA71CE8F03ULL, 0x1A1325788C759F2BULL } }, /* XSUM_XXH128_testdata[9674] */\n    { 3225, 0x0000000000000000ULL, { 0xA0950D4312443264ULL, 0x69CA3D49E44CA27AULL } }, /* XSUM_XXH128_testdata[9675] */\n    { 3225, 0x000000009E3779B1ULL, { 0xF26F1BCCECB1D281ULL, 0xB491F3BC10AC381BULL } }, /* XSUM_XXH128_testdata[9676] */\n    { 3225, 0x9E3779B185EBCA8DULL, { 0xA388B1738E4DCE26ULL, 0x1CCA4F143BC47887ULL } }, /* XSUM_XXH128_testdata[9677] */\n    { 3226, 0x0000000000000000ULL, { 0x924AAF6E6E149E4BULL, 0x4896F95B2C626160ULL } }, /* XSUM_XXH128_testdata[9678] */\n    { 3226, 0x000000009E3779B1ULL, { 0x9A6E497B436A6079ULL, 0x75D59187A48DE29AULL } }, /* XSUM_XXH128_testdata[9679] */\n    { 3226, 0x9E3779B185EBCA8DULL, { 0x3E205BEF5C51CBE5ULL, 0xE66AACE24803CD2AULL } }, /* XSUM_XXH128_testdata[9680] */\n    { 3227, 0x0000000000000000ULL, { 0x7B79F55D2FCBCC2CULL, 0x16E1AE7441AE7C19ULL } }, /* XSUM_XXH128_testdata[9681] */\n    { 3227, 0x000000009E3779B1ULL, { 0x960872C2770FF59EULL, 0x63C8467153740F89ULL } }, /* XSUM_XXH128_testdata[9682] */\n    { 3227, 0x9E3779B185EBCA8DULL, { 0xC967B942DE4F6B41ULL, 0x5ED5791E61795267ULL } }, /* XSUM_XXH128_testdata[9683] */\n    { 3228, 0x0000000000000000ULL, { 0x55A51FAB12C21F43ULL, 0xDB4491FFB8A756C3ULL } }, /* XSUM_XXH128_testdata[9684] */\n    { 3228, 0x000000009E3779B1ULL, { 0xF3011E35C885B6DEULL, 0xA20E35E5B5D604F4ULL } }, /* XSUM_XXH128_testdata[9685] */\n    { 3228, 0x9E3779B185EBCA8DULL, { 0xA555BDC2254BB1A2ULL, 0xD3CBADA55A7970B9ULL } }, /* XSUM_XXH128_testdata[9686] */\n    { 3229, 0x0000000000000000ULL, { 0x297D5667C2932EA7ULL, 0xBAA3D3C4803C5F83ULL } }, /* XSUM_XXH128_testdata[9687] */\n    { 3229, 0x000000009E3779B1ULL, { 0x17D95F06D0EB3011ULL, 0x625783CAF216C4C8ULL } }, /* XSUM_XXH128_testdata[9688] */\n    { 3229, 0x9E3779B185EBCA8DULL, { 0x2E419470FD93628EULL, 0xA2CDABE0E48FE00EULL } }, /* XSUM_XXH128_testdata[9689] */\n    { 3230, 0x0000000000000000ULL, { 0x348E764CE266D3A4ULL, 0x36E4CC4A2F22BDC9ULL } }, /* XSUM_XXH128_testdata[9690] */\n    { 3230, 0x000000009E3779B1ULL, { 0x961E247BC3D1778EULL, 0xFB125FF618FA5F9DULL } }, /* XSUM_XXH128_testdata[9691] */\n    { 3230, 0x9E3779B185EBCA8DULL, { 0xBC4D6463962C0C16ULL, 0x810EE6B8FA4E4327ULL } }, /* XSUM_XXH128_testdata[9692] */\n    { 3231, 0x0000000000000000ULL, { 0xF7DEAE36D4A13F7BULL, 0x8A46ACC647AA3009ULL } }, /* XSUM_XXH128_testdata[9693] */\n    { 3231, 0x000000009E3779B1ULL, { 0x5807EBDD3D1DCF2CULL, 0x21D6978E1CBB0A54ULL } }, /* XSUM_XXH128_testdata[9694] */\n    { 3231, 0x9E3779B185EBCA8DULL, { 0x3AEF51CFBFBCFC23ULL, 0xCD76F40D58899F6AULL } }, /* XSUM_XXH128_testdata[9695] */\n    { 3232, 0x0000000000000000ULL, { 0xAB1DA87080C2C0C9ULL, 0x26749F9A9E4FC3EEULL } }, /* XSUM_XXH128_testdata[9696] */\n    { 3232, 0x000000009E3779B1ULL, { 0x4C2A777CE3E31A04ULL, 0x716FCB8C5C0CB466ULL } }, /* XSUM_XXH128_testdata[9697] */\n    { 3232, 0x9E3779B185EBCA8DULL, { 0x7888A6FC9DC02F45ULL, 0x733EC63C9778DDE4ULL } }, /* XSUM_XXH128_testdata[9698] */\n    { 3233, 0x0000000000000000ULL, { 0x28F2070C54DDE886ULL, 0x8A99B13C789643CDULL } }, /* XSUM_XXH128_testdata[9699] */\n    { 3233, 0x000000009E3779B1ULL, { 0xAE7D7E3349E39831ULL, 0x461E9602B48691C5ULL } }, /* XSUM_XXH128_testdata[9700] */\n    { 3233, 0x9E3779B185EBCA8DULL, { 0x518A60E025B9C80EULL, 0x2FEA11C2DC0E7BA9ULL } }, /* XSUM_XXH128_testdata[9701] */\n    { 3234, 0x0000000000000000ULL, { 0x5E1FA7815D4E3ADAULL, 0xBBC62320A8F3CC58ULL } }, /* XSUM_XXH128_testdata[9702] */\n    { 3234, 0x000000009E3779B1ULL, { 0xFF70CEA46B306FA2ULL, 0x1368CB91636D41F5ULL } }, /* XSUM_XXH128_testdata[9703] */\n    { 3234, 0x9E3779B185EBCA8DULL, { 0x3FE12BF0DB2C4466ULL, 0xC7DAB895BC81EAF2ULL } }, /* XSUM_XXH128_testdata[9704] */\n    { 3235, 0x0000000000000000ULL, { 0x5981A86021DC4747ULL, 0x2A10AE909B770AEBULL } }, /* XSUM_XXH128_testdata[9705] */\n    { 3235, 0x000000009E3779B1ULL, { 0xBAA0293ADEA9F370ULL, 0xB2884A154DCF13A4ULL } }, /* XSUM_XXH128_testdata[9706] */\n    { 3235, 0x9E3779B185EBCA8DULL, { 0xE5E102BCAF8AE325ULL, 0x294AD51E51A0B020ULL } }, /* XSUM_XXH128_testdata[9707] */\n    { 3236, 0x0000000000000000ULL, { 0xE859E6D7B3DBEDC1ULL, 0x66A9DE57B3AA2808ULL } }, /* XSUM_XXH128_testdata[9708] */\n    { 3236, 0x000000009E3779B1ULL, { 0x0A6D9DBEBDBE2632ULL, 0xE355FC2DBCCFEAE0ULL } }, /* XSUM_XXH128_testdata[9709] */\n    { 3236, 0x9E3779B185EBCA8DULL, { 0x0AA3AF2339430811ULL, 0x4042CE8F07C4C66DULL } }, /* XSUM_XXH128_testdata[9710] */\n    { 3237, 0x0000000000000000ULL, { 0x8BF0287F66CF1B7DULL, 0x8E5FA9322B547F3AULL } }, /* XSUM_XXH128_testdata[9711] */\n    { 3237, 0x000000009E3779B1ULL, { 0x39FF56F26C979F0EULL, 0x945AF08D690813DEULL } }, /* XSUM_XXH128_testdata[9712] */\n    { 3237, 0x9E3779B185EBCA8DULL, { 0x2759B8065D0F6FAAULL, 0xE8B74B54A324F80EULL } }, /* XSUM_XXH128_testdata[9713] */\n    { 3238, 0x0000000000000000ULL, { 0xF41F7674BB560D40ULL, 0xC845F716B10418C1ULL } }, /* XSUM_XXH128_testdata[9714] */\n    { 3238, 0x000000009E3779B1ULL, { 0x659FA50A239DFDD3ULL, 0x3572C6C9840845FBULL } }, /* XSUM_XXH128_testdata[9715] */\n    { 3238, 0x9E3779B185EBCA8DULL, { 0x1B20B5D920F3298CULL, 0xA0DDEA56CADD1B7FULL } }, /* XSUM_XXH128_testdata[9716] */\n    { 3239, 0x0000000000000000ULL, { 0xD3704CEE911EFC0DULL, 0x63FA7C984AA5ED4EULL } }, /* XSUM_XXH128_testdata[9717] */\n    { 3239, 0x000000009E3779B1ULL, { 0xB7DA70C3EF5C1327ULL, 0xD0B45E6F259E3672ULL } }, /* XSUM_XXH128_testdata[9718] */\n    { 3239, 0x9E3779B185EBCA8DULL, { 0xEB835F6123188D7CULL, 0xBF59A43C04EFD2F7ULL } }, /* XSUM_XXH128_testdata[9719] */\n    { 3240, 0x0000000000000000ULL, { 0x57AF8FC2E141FE9FULL, 0x388A7D1D8D6E1E34ULL } }, /* XSUM_XXH128_testdata[9720] */\n    { 3240, 0x000000009E3779B1ULL, { 0x58E6ED6F80C657F3ULL, 0xA2AAC118085C14CBULL } }, /* XSUM_XXH128_testdata[9721] */\n    { 3240, 0x9E3779B185EBCA8DULL, { 0xF461FF724877E97FULL, 0x1BE98E0D61628F5EULL } }, /* XSUM_XXH128_testdata[9722] */\n    { 3241, 0x0000000000000000ULL, { 0x2FF3C47F857C7F56ULL, 0x2D649760E99FDD7FULL } }, /* XSUM_XXH128_testdata[9723] */\n    { 3241, 0x000000009E3779B1ULL, { 0xC5471286AA906824ULL, 0x4E63B81D1001DF11ULL } }, /* XSUM_XXH128_testdata[9724] */\n    { 3241, 0x9E3779B185EBCA8DULL, { 0x3394AA51E8E71D51ULL, 0x40F4BCC5978C0D0FULL } }, /* XSUM_XXH128_testdata[9725] */\n    { 3242, 0x0000000000000000ULL, { 0xCD86E6710567AB9DULL, 0x74E056A5CB7B6940ULL } }, /* XSUM_XXH128_testdata[9726] */\n    { 3242, 0x000000009E3779B1ULL, { 0x458B385B009D238BULL, 0xE36A6EBEFE21F609ULL } }, /* XSUM_XXH128_testdata[9727] */\n    { 3242, 0x9E3779B185EBCA8DULL, { 0x7AFCEB3D05B3F086ULL, 0x364C3B9D61A975B0ULL } }, /* XSUM_XXH128_testdata[9728] */\n    { 3243, 0x0000000000000000ULL, { 0x3ECD3DFB69A5A02FULL, 0x4271A73905BDDAAEULL } }, /* XSUM_XXH128_testdata[9729] */\n    { 3243, 0x000000009E3779B1ULL, { 0xC0E0684E8E001962ULL, 0x2BC1E80C819399D7ULL } }, /* XSUM_XXH128_testdata[9730] */\n    { 3243, 0x9E3779B185EBCA8DULL, { 0x11A366BFBA1B1FF6ULL, 0x2F35C9E6F3293545ULL } }, /* XSUM_XXH128_testdata[9731] */\n    { 3244, 0x0000000000000000ULL, { 0xC1836275539BBF33ULL, 0x926B74B45431A0F8ULL } }, /* XSUM_XXH128_testdata[9732] */\n    { 3244, 0x000000009E3779B1ULL, { 0xD3AF3D4C60527AA9ULL, 0xD616DDCE484137CBULL } }, /* XSUM_XXH128_testdata[9733] */\n    { 3244, 0x9E3779B185EBCA8DULL, { 0x0913E9453F9040C3ULL, 0xB664B3D235007419ULL } }, /* XSUM_XXH128_testdata[9734] */\n    { 3245, 0x0000000000000000ULL, { 0x7883530DE619F0BBULL, 0xE75F9F258B633DB5ULL } }, /* XSUM_XXH128_testdata[9735] */\n    { 3245, 0x000000009E3779B1ULL, { 0x9E515E4B3810ED39ULL, 0xF1C8B4592BDB53EBULL } }, /* XSUM_XXH128_testdata[9736] */\n    { 3245, 0x9E3779B185EBCA8DULL, { 0xA8168205780B81D7ULL, 0x9729ED448789C160ULL } }, /* XSUM_XXH128_testdata[9737] */\n    { 3246, 0x0000000000000000ULL, { 0x961D9ABC9110663CULL, 0xFFA5372FF0986D4DULL } }, /* XSUM_XXH128_testdata[9738] */\n    { 3246, 0x000000009E3779B1ULL, { 0x0614A860FDB03187ULL, 0x5831644976912A9FULL } }, /* XSUM_XXH128_testdata[9739] */\n    { 3246, 0x9E3779B185EBCA8DULL, { 0xC8044D5074ECEEA6ULL, 0xB0B489E225DC085FULL } }, /* XSUM_XXH128_testdata[9740] */\n    { 3247, 0x0000000000000000ULL, { 0xF1A4528F93427127ULL, 0x21C85927021AAAC5ULL } }, /* XSUM_XXH128_testdata[9741] */\n    { 3247, 0x000000009E3779B1ULL, { 0x1837E8079DFDF430ULL, 0x0C80690A35DC53F7ULL } }, /* XSUM_XXH128_testdata[9742] */\n    { 3247, 0x9E3779B185EBCA8DULL, { 0x595C2D7A7E8CC7D3ULL, 0x74EE43E2700DEDFBULL } }, /* XSUM_XXH128_testdata[9743] */\n    { 3248, 0x0000000000000000ULL, { 0x48B294E4222613AEULL, 0x8EF9B8D5808837C1ULL } }, /* XSUM_XXH128_testdata[9744] */\n    { 3248, 0x000000009E3779B1ULL, { 0xFFBEA37D6545E323ULL, 0xF4CF196840593FC6ULL } }, /* XSUM_XXH128_testdata[9745] */\n    { 3248, 0x9E3779B185EBCA8DULL, { 0x1C85BEBE8EC3E10AULL, 0x1619623BCF2F6641ULL } }, /* XSUM_XXH128_testdata[9746] */\n    { 3249, 0x0000000000000000ULL, { 0x0B9195B0554CB009ULL, 0xC721A90AE634C777ULL } }, /* XSUM_XXH128_testdata[9747] */\n    { 3249, 0x000000009E3779B1ULL, { 0x41A532916497AC41ULL, 0xCD75683245FB31FFULL } }, /* XSUM_XXH128_testdata[9748] */\n    { 3249, 0x9E3779B185EBCA8DULL, { 0xFB5E602F3FF2A4FAULL, 0xB5FC16472561C814ULL } }, /* XSUM_XXH128_testdata[9749] */\n    { 3250, 0x0000000000000000ULL, { 0x2BF68FE7F6AFE161ULL, 0x87E0E757165F9ED5ULL } }, /* XSUM_XXH128_testdata[9750] */\n    { 3250, 0x000000009E3779B1ULL, { 0xB14568CAC322A43FULL, 0xD5358CB148286248ULL } }, /* XSUM_XXH128_testdata[9751] */\n    { 3250, 0x9E3779B185EBCA8DULL, { 0x6F697117A9DD8EF4ULL, 0x9D2645F905D68451ULL } }, /* XSUM_XXH128_testdata[9752] */\n    { 3251, 0x0000000000000000ULL, { 0x9D8C951C965C65D9ULL, 0xEECE1ABE1CFA5B58ULL } }, /* XSUM_XXH128_testdata[9753] */\n    { 3251, 0x000000009E3779B1ULL, { 0xD90E322F866C1A39ULL, 0x46E4CFF2A4190302ULL } }, /* XSUM_XXH128_testdata[9754] */\n    { 3251, 0x9E3779B185EBCA8DULL, { 0x25FC40DFE962BA9BULL, 0xF42678FA7B6AEAF3ULL } }, /* XSUM_XXH128_testdata[9755] */\n    { 3252, 0x0000000000000000ULL, { 0x636813F1D275647DULL, 0x481D02A3A7948052ULL } }, /* XSUM_XXH128_testdata[9756] */\n    { 3252, 0x000000009E3779B1ULL, { 0x4C7B4BDBE63E7F47ULL, 0x7057A8D01A8A0D9AULL } }, /* XSUM_XXH128_testdata[9757] */\n    { 3252, 0x9E3779B185EBCA8DULL, { 0xC16AC4E59B00949AULL, 0x224FDD530F93C72AULL } }, /* XSUM_XXH128_testdata[9758] */\n    { 3253, 0x0000000000000000ULL, { 0x79168EB9963AE95DULL, 0x9B800BE59110922FULL } }, /* XSUM_XXH128_testdata[9759] */\n    { 3253, 0x000000009E3779B1ULL, { 0xC07BA844F5E8084FULL, 0x7AD2B22D04F1E408ULL } }, /* XSUM_XXH128_testdata[9760] */\n    { 3253, 0x9E3779B185EBCA8DULL, { 0x2B86B765967A725CULL, 0x3F1DA0E2E180ED5DULL } }, /* XSUM_XXH128_testdata[9761] */\n    { 3254, 0x0000000000000000ULL, { 0x4418D7EDCCA192CEULL, 0x0B3A46A70925123AULL } }, /* XSUM_XXH128_testdata[9762] */\n    { 3254, 0x000000009E3779B1ULL, { 0x4C2DDB3633D9579FULL, 0xF5CDDBF3B49011F5ULL } }, /* XSUM_XXH128_testdata[9763] */\n    { 3254, 0x9E3779B185EBCA8DULL, { 0xEADE7CC58ACD41E4ULL, 0x40A48DAF0951316DULL } }, /* XSUM_XXH128_testdata[9764] */\n    { 3255, 0x0000000000000000ULL, { 0xA440E3AD2D93FAB4ULL, 0x22194C924AE33155ULL } }, /* XSUM_XXH128_testdata[9765] */\n    { 3255, 0x000000009E3779B1ULL, { 0x120E80486686E40DULL, 0x785213FF15290F82ULL } }, /* XSUM_XXH128_testdata[9766] */\n    { 3255, 0x9E3779B185EBCA8DULL, { 0x16AFC580F8754A16ULL, 0x1070F22CF791ED42ULL } }, /* XSUM_XXH128_testdata[9767] */\n    { 3256, 0x0000000000000000ULL, { 0x6EE7EF3CBF414EC5ULL, 0x36F75D69DDD3A321ULL } }, /* XSUM_XXH128_testdata[9768] */\n    { 3256, 0x000000009E3779B1ULL, { 0x714BC168508D4290ULL, 0xA53143FF867CBBE6ULL } }, /* XSUM_XXH128_testdata[9769] */\n    { 3256, 0x9E3779B185EBCA8DULL, { 0x78D2D7BEC6CBE2A8ULL, 0x0F24898E5D64771BULL } }, /* XSUM_XXH128_testdata[9770] */\n    { 3257, 0x0000000000000000ULL, { 0xED2C0FE9F32BB2A8ULL, 0xC2E11C34E65D2B50ULL } }, /* XSUM_XXH128_testdata[9771] */\n    { 3257, 0x000000009E3779B1ULL, { 0xF395C74B68CAC6ADULL, 0xF070E05249CEF12BULL } }, /* XSUM_XXH128_testdata[9772] */\n    { 3257, 0x9E3779B185EBCA8DULL, { 0x1FFC8441658EA638ULL, 0x4B2492D98C69112CULL } }, /* XSUM_XXH128_testdata[9773] */\n    { 3258, 0x0000000000000000ULL, { 0x7B47DC76E070E20FULL, 0x97F3C8A7C04ADE46ULL } }, /* XSUM_XXH128_testdata[9774] */\n    { 3258, 0x000000009E3779B1ULL, { 0x24611AA6D0DF2DD4ULL, 0x7F1EF4FEAAB4D023ULL } }, /* XSUM_XXH128_testdata[9775] */\n    { 3258, 0x9E3779B185EBCA8DULL, { 0x746E32A296FC4368ULL, 0xEF7004E88B006E81ULL } }, /* XSUM_XXH128_testdata[9776] */\n    { 3259, 0x0000000000000000ULL, { 0x91BA511409D2A7FAULL, 0x0C545761A45ECBB8ULL } }, /* XSUM_XXH128_testdata[9777] */\n    { 3259, 0x000000009E3779B1ULL, { 0xB55410798B074AC6ULL, 0xA75B780CB929235EULL } }, /* XSUM_XXH128_testdata[9778] */\n    { 3259, 0x9E3779B185EBCA8DULL, { 0xE82A453ED103E49FULL, 0x89A741EB763AA5C6ULL } }, /* XSUM_XXH128_testdata[9779] */\n    { 3260, 0x0000000000000000ULL, { 0x8B401BB0AE7FE563ULL, 0xA264B0BC29CBBA70ULL } }, /* XSUM_XXH128_testdata[9780] */\n    { 3260, 0x000000009E3779B1ULL, { 0xCCCAC24CD2B90133ULL, 0x5AE20B556D0B5FA1ULL } }, /* XSUM_XXH128_testdata[9781] */\n    { 3260, 0x9E3779B185EBCA8DULL, { 0x2BD046201CE8C118ULL, 0x05CFF73E2CE3E57BULL } }, /* XSUM_XXH128_testdata[9782] */\n    { 3261, 0x0000000000000000ULL, { 0x566A5A0C036794E6ULL, 0xD0BEF1C2DA82FFA6ULL } }, /* XSUM_XXH128_testdata[9783] */\n    { 3261, 0x000000009E3779B1ULL, { 0x2B2F627E535BED58ULL, 0x8655BA6FD14FD4D9ULL } }, /* XSUM_XXH128_testdata[9784] */\n    { 3261, 0x9E3779B185EBCA8DULL, { 0x17B908EC0C3CE7BBULL, 0x63DC02A88C3D8763ULL } }, /* XSUM_XXH128_testdata[9785] */\n    { 3262, 0x0000000000000000ULL, { 0x1C013FA650289828ULL, 0x6C7F4999B1909AA4ULL } }, /* XSUM_XXH128_testdata[9786] */\n    { 3262, 0x000000009E3779B1ULL, { 0x9A18778A5676DE7AULL, 0x1F841E7B598F831FULL } }, /* XSUM_XXH128_testdata[9787] */\n    { 3262, 0x9E3779B185EBCA8DULL, { 0xD70F5E0594269646ULL, 0x4F0C9E9D115AA160ULL } }, /* XSUM_XXH128_testdata[9788] */\n    { 3263, 0x0000000000000000ULL, { 0x5646399424235FFBULL, 0x84598744B4F196CCULL } }, /* XSUM_XXH128_testdata[9789] */\n    { 3263, 0x000000009E3779B1ULL, { 0x6C3F3AAAA0CBFE45ULL, 0x396A4C7010335DF7ULL } }, /* XSUM_XXH128_testdata[9790] */\n    { 3263, 0x9E3779B185EBCA8DULL, { 0x742383EE12CED5F1ULL, 0x385BDA4520E0F5E1ULL } }, /* XSUM_XXH128_testdata[9791] */\n    { 3264, 0x0000000000000000ULL, { 0x9B8739702F078EAEULL, 0xFFF3605BACC00702ULL } }, /* XSUM_XXH128_testdata[9792] */\n    { 3264, 0x000000009E3779B1ULL, { 0xA68170CD0B49C40BULL, 0xD86124F2E1F8B8CAULL } }, /* XSUM_XXH128_testdata[9793] */\n    { 3264, 0x9E3779B185EBCA8DULL, { 0x184E648FBA928D2CULL, 0x11C2FAE8C84A6DE4ULL } }, /* XSUM_XXH128_testdata[9794] */\n    { 3265, 0x0000000000000000ULL, { 0x0EC956D8FE806B22ULL, 0xE5D856687F829497ULL } }, /* XSUM_XXH128_testdata[9795] */\n    { 3265, 0x000000009E3779B1ULL, { 0x41C39E57135E3681ULL, 0x73843679321E220DULL } }, /* XSUM_XXH128_testdata[9796] */\n    { 3265, 0x9E3779B185EBCA8DULL, { 0x3CAAE786AAFE1AF7ULL, 0x5CD34FC906337636ULL } }, /* XSUM_XXH128_testdata[9797] */\n    { 3266, 0x0000000000000000ULL, { 0x0A06674EBA2293F8ULL, 0x562EDFA28C8E4D29ULL } }, /* XSUM_XXH128_testdata[9798] */\n    { 3266, 0x000000009E3779B1ULL, { 0x869AA67AF087642EULL, 0x88E9E9457A15CFB8ULL } }, /* XSUM_XXH128_testdata[9799] */\n    { 3266, 0x9E3779B185EBCA8DULL, { 0xBE2884F3D07394B1ULL, 0x770FB93B985E3EDDULL } }, /* XSUM_XXH128_testdata[9800] */\n    { 3267, 0x0000000000000000ULL, { 0x2F6DFF8AD0994EADULL, 0x2112AA6BF007DD3EULL } }, /* XSUM_XXH128_testdata[9801] */\n    { 3267, 0x000000009E3779B1ULL, { 0xD47FC095297B70E0ULL, 0x263DE599E1056DFDULL } }, /* XSUM_XXH128_testdata[9802] */\n    { 3267, 0x9E3779B185EBCA8DULL, { 0x6C4D1AB2AFA02DEAULL, 0x83E8F235BB85F7C8ULL } }, /* XSUM_XXH128_testdata[9803] */\n    { 3268, 0x0000000000000000ULL, { 0x0D3D26B243410F6CULL, 0x87CDCE822998B4CAULL } }, /* XSUM_XXH128_testdata[9804] */\n    { 3268, 0x000000009E3779B1ULL, { 0xCB6057200FB9154EULL, 0xE2359D9B7BE6074DULL } }, /* XSUM_XXH128_testdata[9805] */\n    { 3268, 0x9E3779B185EBCA8DULL, { 0x57C056432DD87495ULL, 0xC325D9C49E8D91B7ULL } }, /* XSUM_XXH128_testdata[9806] */\n    { 3269, 0x0000000000000000ULL, { 0x237DD207AFF853D8ULL, 0xE1498F2EF7A02E3CULL } }, /* XSUM_XXH128_testdata[9807] */\n    { 3269, 0x000000009E3779B1ULL, { 0xC2E1B6A51C7F570FULL, 0x98B3132F6B7A1771ULL } }, /* XSUM_XXH128_testdata[9808] */\n    { 3269, 0x9E3779B185EBCA8DULL, { 0xE8AFB4AA2B702614ULL, 0x595D3C6ED548FCFDULL } }, /* XSUM_XXH128_testdata[9809] */\n    { 3270, 0x0000000000000000ULL, { 0x3F49BF7883FED811ULL, 0xFB9030DB7BEC9BB3ULL } }, /* XSUM_XXH128_testdata[9810] */\n    { 3270, 0x000000009E3779B1ULL, { 0xA1882D2C9C34F22CULL, 0x682E3150CFE6F612ULL } }, /* XSUM_XXH128_testdata[9811] */\n    { 3270, 0x9E3779B185EBCA8DULL, { 0x1C05DE58EC169FD6ULL, 0xFEBBD3E8F9F74CE5ULL } }, /* XSUM_XXH128_testdata[9812] */\n    { 3271, 0x0000000000000000ULL, { 0xC48D63F39B62F523ULL, 0x4118053E4E8FE951ULL } }, /* XSUM_XXH128_testdata[9813] */\n    { 3271, 0x000000009E3779B1ULL, { 0x1685D2CF2AEBE768ULL, 0x55D404FBD002F56CULL } }, /* XSUM_XXH128_testdata[9814] */\n    { 3271, 0x9E3779B185EBCA8DULL, { 0x7CEE441E3B41E236ULL, 0x1A97823DB2F93094ULL } }, /* XSUM_XXH128_testdata[9815] */\n    { 3272, 0x0000000000000000ULL, { 0xE585B402C5B27728ULL, 0x19E397453CF1282FULL } }, /* XSUM_XXH128_testdata[9816] */\n    { 3272, 0x000000009E3779B1ULL, { 0xD1847B66B5FFF4E5ULL, 0x7F07C23473589D2DULL } }, /* XSUM_XXH128_testdata[9817] */\n    { 3272, 0x9E3779B185EBCA8DULL, { 0x75335CFF84A6D040ULL, 0xDA1668420CDFE626ULL } }, /* XSUM_XXH128_testdata[9818] */\n    { 3273, 0x0000000000000000ULL, { 0x17408941AA9636EDULL, 0x67969B5719FFFE79ULL } }, /* XSUM_XXH128_testdata[9819] */\n    { 3273, 0x000000009E3779B1ULL, { 0xAF11AFFE9F0E179EULL, 0x8FE24E40EFDDB08AULL } }, /* XSUM_XXH128_testdata[9820] */\n    { 3273, 0x9E3779B185EBCA8DULL, { 0xB34CAA8293B0E8D8ULL, 0xD2AC619EE89D378AULL } }, /* XSUM_XXH128_testdata[9821] */\n    { 3274, 0x0000000000000000ULL, { 0x4C1BFB3D06B5B19DULL, 0xFD8F6DB4D5156B55ULL } }, /* XSUM_XXH128_testdata[9822] */\n    { 3274, 0x000000009E3779B1ULL, { 0x6546D775A996A68AULL, 0xA2FDBE048EA23813ULL } }, /* XSUM_XXH128_testdata[9823] */\n    { 3274, 0x9E3779B185EBCA8DULL, { 0x402C85067D5CFD99ULL, 0x2A186B8EDFDEBA4EULL } }, /* XSUM_XXH128_testdata[9824] */\n    { 3275, 0x0000000000000000ULL, { 0x7D07873053C9F239ULL, 0xD4F5C5F72F16FAFDULL } }, /* XSUM_XXH128_testdata[9825] */\n    { 3275, 0x000000009E3779B1ULL, { 0xA247091DA46900C2ULL, 0xC055045AAF3498F2ULL } }, /* XSUM_XXH128_testdata[9826] */\n    { 3275, 0x9E3779B185EBCA8DULL, { 0xFE7CD26D019C5854ULL, 0xFE6BCF1C39A2206FULL } }, /* XSUM_XXH128_testdata[9827] */\n    { 3276, 0x0000000000000000ULL, { 0x3AE4B482DAE90651ULL, 0x11BD6D7CE6F5FB4EULL } }, /* XSUM_XXH128_testdata[9828] */\n    { 3276, 0x000000009E3779B1ULL, { 0x08880FAABBB5086BULL, 0x7CBA6FFB0CB9C11FULL } }, /* XSUM_XXH128_testdata[9829] */\n    { 3276, 0x9E3779B185EBCA8DULL, { 0xD0773C5CD881FD75ULL, 0xC1C2FEF0C3E28BBFULL } }, /* XSUM_XXH128_testdata[9830] */\n    { 3277, 0x0000000000000000ULL, { 0xB158E4DF2C1A8793ULL, 0xE186144BFD685A79ULL } }, /* XSUM_XXH128_testdata[9831] */\n    { 3277, 0x000000009E3779B1ULL, { 0xDA1A45BC4DFB3CB9ULL, 0x1203706A0EDEED59ULL } }, /* XSUM_XXH128_testdata[9832] */\n    { 3277, 0x9E3779B185EBCA8DULL, { 0x685E3DC975295240ULL, 0x3C1915B694B1ACB5ULL } }, /* XSUM_XXH128_testdata[9833] */\n    { 3278, 0x0000000000000000ULL, { 0x6A46EA0EF200F7CEULL, 0x97CE1F4ECB703FA5ULL } }, /* XSUM_XXH128_testdata[9834] */\n    { 3278, 0x000000009E3779B1ULL, { 0xC9C19B22F3EC90C4ULL, 0x1F3B104B24FD637BULL } }, /* XSUM_XXH128_testdata[9835] */\n    { 3278, 0x9E3779B185EBCA8DULL, { 0x1A43B1238C6B6508ULL, 0x3DDE842320173A93ULL } }, /* XSUM_XXH128_testdata[9836] */\n    { 3279, 0x0000000000000000ULL, { 0xE43A423E305A8565ULL, 0x8275059FA140AD1CULL } }, /* XSUM_XXH128_testdata[9837] */\n    { 3279, 0x000000009E3779B1ULL, { 0xE5C0E3F4FD0AE3F6ULL, 0x05413438908851E7ULL } }, /* XSUM_XXH128_testdata[9838] */\n    { 3279, 0x9E3779B185EBCA8DULL, { 0x8686418BF152D4DCULL, 0x0F17EA21EDB926AEULL } }, /* XSUM_XXH128_testdata[9839] */\n    { 3280, 0x0000000000000000ULL, { 0x290CA8866A12AFFEULL, 0x3E5287D4F3325DD3ULL } }, /* XSUM_XXH128_testdata[9840] */\n    { 3280, 0x000000009E3779B1ULL, { 0x91E1999A5EFD9931ULL, 0x97A04AB87A8F0829ULL } }, /* XSUM_XXH128_testdata[9841] */\n    { 3280, 0x9E3779B185EBCA8DULL, { 0x6ACBB86F60374CF8ULL, 0x1B349FD5F9AD975AULL } }, /* XSUM_XXH128_testdata[9842] */\n    { 3281, 0x0000000000000000ULL, { 0x8DBD8B41922B5078ULL, 0x814591A594C8EC2BULL } }, /* XSUM_XXH128_testdata[9843] */\n    { 3281, 0x000000009E3779B1ULL, { 0x17759CE4CDA30150ULL, 0x2C1B436A82627745ULL } }, /* XSUM_XXH128_testdata[9844] */\n    { 3281, 0x9E3779B185EBCA8DULL, { 0xFF09DEC6A3C20841ULL, 0xF035E01D36CD53B5ULL } }, /* XSUM_XXH128_testdata[9845] */\n    { 3282, 0x0000000000000000ULL, { 0xEE787FB6216E6011ULL, 0x34ED8B43B14EE4A1ULL } }, /* XSUM_XXH128_testdata[9846] */\n    { 3282, 0x000000009E3779B1ULL, { 0xF0A5BEBC6093D8D9ULL, 0x7016E62440F2801BULL } }, /* XSUM_XXH128_testdata[9847] */\n    { 3282, 0x9E3779B185EBCA8DULL, { 0x98E9EE8F5070942CULL, 0x6965202591A61609ULL } }, /* XSUM_XXH128_testdata[9848] */\n    { 3283, 0x0000000000000000ULL, { 0x953C27BDFDECF124ULL, 0x761B1BA4370F0DA6ULL } }, /* XSUM_XXH128_testdata[9849] */\n    { 3283, 0x000000009E3779B1ULL, { 0x25BDDA2DE8B2CC51ULL, 0x99C20362D041FDB8ULL } }, /* XSUM_XXH128_testdata[9850] */\n    { 3283, 0x9E3779B185EBCA8DULL, { 0x10AC6D3D9DC372B2ULL, 0x207C64E96ED4E54BULL } }, /* XSUM_XXH128_testdata[9851] */\n    { 3284, 0x0000000000000000ULL, { 0xE4234E6A0823E382ULL, 0x408D56E420940F52ULL } }, /* XSUM_XXH128_testdata[9852] */\n    { 3284, 0x000000009E3779B1ULL, { 0xF43BA86B66EEE360ULL, 0x431473E5F54C694FULL } }, /* XSUM_XXH128_testdata[9853] */\n    { 3284, 0x9E3779B185EBCA8DULL, { 0x8BA7CE4934FEB2E1ULL, 0x6C0FA800F9E221E8ULL } }, /* XSUM_XXH128_testdata[9854] */\n    { 3285, 0x0000000000000000ULL, { 0x5C403AC86FC535BCULL, 0xC19A53230262B384ULL } }, /* XSUM_XXH128_testdata[9855] */\n    { 3285, 0x000000009E3779B1ULL, { 0xB45D044A0D995A30ULL, 0x0A04ADA0307AF7FAULL } }, /* XSUM_XXH128_testdata[9856] */\n    { 3285, 0x9E3779B185EBCA8DULL, { 0x154C0CFAA9CCFD75ULL, 0x7CDA6C158C59365CULL } }, /* XSUM_XXH128_testdata[9857] */\n    { 3286, 0x0000000000000000ULL, { 0xA429912EB2E28218ULL, 0xE6286AE59AAF5D65ULL } }, /* XSUM_XXH128_testdata[9858] */\n    { 3286, 0x000000009E3779B1ULL, { 0x751DC54F054C892EULL, 0x3AAE8E7F647D591DULL } }, /* XSUM_XXH128_testdata[9859] */\n    { 3286, 0x9E3779B185EBCA8DULL, { 0x72C6B7BD2A454604ULL, 0x73F2FAC3B0B68229ULL } }, /* XSUM_XXH128_testdata[9860] */\n    { 3287, 0x0000000000000000ULL, { 0x9C06DC9435498F37ULL, 0x180C30FABAB9BFF7ULL } }, /* XSUM_XXH128_testdata[9861] */\n    { 3287, 0x000000009E3779B1ULL, { 0x3BEE191E2DE543A3ULL, 0xAC1F6B9799E44538ULL } }, /* XSUM_XXH128_testdata[9862] */\n    { 3287, 0x9E3779B185EBCA8DULL, { 0xC725960C2DE40EB7ULL, 0x2F5FC789F8617835ULL } }, /* XSUM_XXH128_testdata[9863] */\n    { 3288, 0x0000000000000000ULL, { 0xFDC4819EF73EED40ULL, 0x66AAD8FE85F52A3BULL } }, /* XSUM_XXH128_testdata[9864] */\n    { 3288, 0x000000009E3779B1ULL, { 0x835C3C118B216496ULL, 0xD707E51DA7C0B321ULL } }, /* XSUM_XXH128_testdata[9865] */\n    { 3288, 0x9E3779B185EBCA8DULL, { 0x08F29DF35BB2DAE7ULL, 0xC5B55D662D375461ULL } }, /* XSUM_XXH128_testdata[9866] */\n    { 3289, 0x0000000000000000ULL, { 0xD5055BB66A0D37BBULL, 0x0E0D28AEBF26F8C2ULL } }, /* XSUM_XXH128_testdata[9867] */\n    { 3289, 0x000000009E3779B1ULL, { 0x1D1C00B1F953D9FFULL, 0x01612E6F1C814BD9ULL } }, /* XSUM_XXH128_testdata[9868] */\n    { 3289, 0x9E3779B185EBCA8DULL, { 0x19D5799BECE479F4ULL, 0x49DDA86F8F30B177ULL } }, /* XSUM_XXH128_testdata[9869] */\n    { 3290, 0x0000000000000000ULL, { 0x07382BB2BF607897ULL, 0x2507FFD92054F8AAULL } }, /* XSUM_XXH128_testdata[9870] */\n    { 3290, 0x000000009E3779B1ULL, { 0x45E4F676ACC5BA44ULL, 0xE60D21E15DC2B433ULL } }, /* XSUM_XXH128_testdata[9871] */\n    { 3290, 0x9E3779B185EBCA8DULL, { 0x0256F5995038CD26ULL, 0x6CD9025D11F71D9FULL } }, /* XSUM_XXH128_testdata[9872] */\n    { 3291, 0x0000000000000000ULL, { 0x22A55154436863B3ULL, 0x8BB2A23F0C61B78CULL } }, /* XSUM_XXH128_testdata[9873] */\n    { 3291, 0x000000009E3779B1ULL, { 0x3CCDAB1E4B77EB15ULL, 0x08A111369144E94DULL } }, /* XSUM_XXH128_testdata[9874] */\n    { 3291, 0x9E3779B185EBCA8DULL, { 0x404FE5667BAD1D13ULL, 0xCEBC5F58BBB96898ULL } }, /* XSUM_XXH128_testdata[9875] */\n    { 3292, 0x0000000000000000ULL, { 0x8C92B6C0DBCE279EULL, 0x2506079D880840A5ULL } }, /* XSUM_XXH128_testdata[9876] */\n    { 3292, 0x000000009E3779B1ULL, { 0xFCEA11F17C4AF224ULL, 0x0117D97581B8C1EAULL } }, /* XSUM_XXH128_testdata[9877] */\n    { 3292, 0x9E3779B185EBCA8DULL, { 0x2783832554DCF35FULL, 0x8B77BF98902A35B7ULL } }, /* XSUM_XXH128_testdata[9878] */\n    { 3293, 0x0000000000000000ULL, { 0x116C41EB4A23AC65ULL, 0x612214E834B4645BULL } }, /* XSUM_XXH128_testdata[9879] */\n    { 3293, 0x000000009E3779B1ULL, { 0xA07E8CBECFE53BD6ULL, 0xDB1E8748D61CF06BULL } }, /* XSUM_XXH128_testdata[9880] */\n    { 3293, 0x9E3779B185EBCA8DULL, { 0xD1F55F5515EA8C61ULL, 0x66502C49CCB4E8A9ULL } }, /* XSUM_XXH128_testdata[9881] */\n    { 3294, 0x0000000000000000ULL, { 0xAC933622B1150321ULL, 0x2E78C21489AB1E59ULL } }, /* XSUM_XXH128_testdata[9882] */\n    { 3294, 0x000000009E3779B1ULL, { 0xA31F7201DBE0970FULL, 0xBF1CED5BD5D9B7DEULL } }, /* XSUM_XXH128_testdata[9883] */\n    { 3294, 0x9E3779B185EBCA8DULL, { 0xEFAEFE35789602DBULL, 0xD0E289B3F2FF2B6FULL } }, /* XSUM_XXH128_testdata[9884] */\n    { 3295, 0x0000000000000000ULL, { 0xBA6BB073CCE8DA46ULL, 0x52278CC3304377D3ULL } }, /* XSUM_XXH128_testdata[9885] */\n    { 3295, 0x000000009E3779B1ULL, { 0x636B47A5A0079B00ULL, 0xF2403AF52A625A6DULL } }, /* XSUM_XXH128_testdata[9886] */\n    { 3295, 0x9E3779B185EBCA8DULL, { 0xE2AD5B19AA401D1DULL, 0x4E617B27357B931EULL } }, /* XSUM_XXH128_testdata[9887] */\n    { 3296, 0x0000000000000000ULL, { 0x3E897823507028D7ULL, 0x96C5AC965C57FC09ULL } }, /* XSUM_XXH128_testdata[9888] */\n    { 3296, 0x000000009E3779B1ULL, { 0x396BF8E65CA159CCULL, 0x5C05EC175C8CBC87ULL } }, /* XSUM_XXH128_testdata[9889] */\n    { 3296, 0x9E3779B185EBCA8DULL, { 0x6A143760E53496E1ULL, 0x992335C00F8E0189ULL } }, /* XSUM_XXH128_testdata[9890] */\n    { 3297, 0x0000000000000000ULL, { 0x09D42D669748D197ULL, 0x59F753AC334EA54CULL } }, /* XSUM_XXH128_testdata[9891] */\n    { 3297, 0x000000009E3779B1ULL, { 0x1DC3CA6614D2C018ULL, 0x0A5B268B24DA5903ULL } }, /* XSUM_XXH128_testdata[9892] */\n    { 3297, 0x9E3779B185EBCA8DULL, { 0x20C2A979B1E7F622ULL, 0x8B2DBACB28D7C8B2ULL } }, /* XSUM_XXH128_testdata[9893] */\n    { 3298, 0x0000000000000000ULL, { 0x68089737D023D610ULL, 0x135D18E16FCC7DADULL } }, /* XSUM_XXH128_testdata[9894] */\n    { 3298, 0x000000009E3779B1ULL, { 0xD7C9D13370D99A2AULL, 0x61FEBFF5CFACCAB3ULL } }, /* XSUM_XXH128_testdata[9895] */\n    { 3298, 0x9E3779B185EBCA8DULL, { 0x2FB5B00F9E1212C5ULL, 0xB95C374A6F8FD7ABULL } }, /* XSUM_XXH128_testdata[9896] */\n    { 3299, 0x0000000000000000ULL, { 0x8726F55958B56B92ULL, 0xFFE592C876A84922ULL } }, /* XSUM_XXH128_testdata[9897] */\n    { 3299, 0x000000009E3779B1ULL, { 0xCA75DB9DF60570A1ULL, 0x77FD685D054F6325ULL } }, /* XSUM_XXH128_testdata[9898] */\n    { 3299, 0x9E3779B185EBCA8DULL, { 0x558F3C38C9C7CBA8ULL, 0xECAB78DA1A72671FULL } }, /* XSUM_XXH128_testdata[9899] */\n    { 3300, 0x0000000000000000ULL, { 0xFAB28032690FEE15ULL, 0x1F92EA61FB3627F9ULL } }, /* XSUM_XXH128_testdata[9900] */\n    { 3300, 0x000000009E3779B1ULL, { 0xCA4161AF2605644CULL, 0xCAE080F64948B2F1ULL } }, /* XSUM_XXH128_testdata[9901] */\n    { 3300, 0x9E3779B185EBCA8DULL, { 0xCBF7403183AFC3BCULL, 0x9AFD29C9869B7E31ULL } }, /* XSUM_XXH128_testdata[9902] */\n    { 3301, 0x0000000000000000ULL, { 0x4F06D3E08E04F544ULL, 0x113ED4F2B4B88205ULL } }, /* XSUM_XXH128_testdata[9903] */\n    { 3301, 0x000000009E3779B1ULL, { 0xDF7B35A51AC4A1CAULL, 0x66ACE83B43AB2B60ULL } }, /* XSUM_XXH128_testdata[9904] */\n    { 3301, 0x9E3779B185EBCA8DULL, { 0xE5A8DCF9100C42D7ULL, 0xF0BF83F3CCAF96BFULL } }, /* XSUM_XXH128_testdata[9905] */\n    { 3302, 0x0000000000000000ULL, { 0x2F332C59D43FED19ULL, 0x58BCC3BFBDC0BE5FULL } }, /* XSUM_XXH128_testdata[9906] */\n    { 3302, 0x000000009E3779B1ULL, { 0x240D36633B293A7CULL, 0xF19085700253D631ULL } }, /* XSUM_XXH128_testdata[9907] */\n    { 3302, 0x9E3779B185EBCA8DULL, { 0x3A810A8B75CD3F70ULL, 0x37F44DB0C10E2B2FULL } }, /* XSUM_XXH128_testdata[9908] */\n    { 3303, 0x0000000000000000ULL, { 0x830F21FF5337560EULL, 0x7F0BCC5E6EF76111ULL } }, /* XSUM_XXH128_testdata[9909] */\n    { 3303, 0x000000009E3779B1ULL, { 0x35DA74DC24B1E4C6ULL, 0xF7834F733E72FC55ULL } }, /* XSUM_XXH128_testdata[9910] */\n    { 3303, 0x9E3779B185EBCA8DULL, { 0x45F7FBFBEE62E831ULL, 0xC58574DB73546396ULL } }, /* XSUM_XXH128_testdata[9911] */\n    { 3304, 0x0000000000000000ULL, { 0xAB744FA69344997EULL, 0xCB4656EDED80C9E0ULL } }, /* XSUM_XXH128_testdata[9912] */\n    { 3304, 0x000000009E3779B1ULL, { 0x5F38916DE19A6355ULL, 0x3C05BAD7E43471F3ULL } }, /* XSUM_XXH128_testdata[9913] */\n    { 3304, 0x9E3779B185EBCA8DULL, { 0xEC87E96EB9AA48BAULL, 0x47475830D60AC1F2ULL } }, /* XSUM_XXH128_testdata[9914] */\n    { 3305, 0x0000000000000000ULL, { 0xD1FEAFB0C097B189ULL, 0x2B7854305BF85E95ULL } }, /* XSUM_XXH128_testdata[9915] */\n    { 3305, 0x000000009E3779B1ULL, { 0x3AD0A1A77D90C939ULL, 0x3239E940F61CF035ULL } }, /* XSUM_XXH128_testdata[9916] */\n    { 3305, 0x9E3779B185EBCA8DULL, { 0xC55659615D737704ULL, 0xB49E30A6DF04B1CAULL } }, /* XSUM_XXH128_testdata[9917] */\n    { 3306, 0x0000000000000000ULL, { 0x85D7E7704DDA2F90ULL, 0xA13A2809139A99E8ULL } }, /* XSUM_XXH128_testdata[9918] */\n    { 3306, 0x000000009E3779B1ULL, { 0x8E39E14C6FB43649ULL, 0x69211DC6C5B98A46ULL } }, /* XSUM_XXH128_testdata[9919] */\n    { 3306, 0x9E3779B185EBCA8DULL, { 0x9CFF0E41C30D3959ULL, 0x044ADB0BF104212AULL } }, /* XSUM_XXH128_testdata[9920] */\n    { 3307, 0x0000000000000000ULL, { 0xD4904AEFED3EDC1AULL, 0x8A665EEE9329AE24ULL } }, /* XSUM_XXH128_testdata[9921] */\n    { 3307, 0x000000009E3779B1ULL, { 0xFC358BA06E61D943ULL, 0x15633CF60A447580ULL } }, /* XSUM_XXH128_testdata[9922] */\n    { 3307, 0x9E3779B185EBCA8DULL, { 0xC7A984C32605B8ABULL, 0xA4A7B4B1E792EEEBULL } }, /* XSUM_XXH128_testdata[9923] */\n    { 3308, 0x0000000000000000ULL, { 0x78AB5906A8635550ULL, 0x127BAB2101BA1A86ULL } }, /* XSUM_XXH128_testdata[9924] */\n    { 3308, 0x000000009E3779B1ULL, { 0x6FC34892BF3A584DULL, 0x857E052F20E5A2B1ULL } }, /* XSUM_XXH128_testdata[9925] */\n    { 3308, 0x9E3779B185EBCA8DULL, { 0x279FD3B95866FCF0ULL, 0xAD0F4A7474FDE7EFULL } }, /* XSUM_XXH128_testdata[9926] */\n    { 3309, 0x0000000000000000ULL, { 0x43F13CAD6A0C80EFULL, 0xF5D1DF6248D5F201ULL } }, /* XSUM_XXH128_testdata[9927] */\n    { 3309, 0x000000009E3779B1ULL, { 0x661847B8213A12FAULL, 0xB20322544EB4309DULL } }, /* XSUM_XXH128_testdata[9928] */\n    { 3309, 0x9E3779B185EBCA8DULL, { 0x843065019A02EBE3ULL, 0x4DF6D07345F1045AULL } }, /* XSUM_XXH128_testdata[9929] */\n    { 3310, 0x0000000000000000ULL, { 0xBC07FC109DF9428EULL, 0x6ABC4144E98A36CCULL } }, /* XSUM_XXH128_testdata[9930] */\n    { 3310, 0x000000009E3779B1ULL, { 0x655E9A87DFE5779AULL, 0x7DF0AB84FF8067ADULL } }, /* XSUM_XXH128_testdata[9931] */\n    { 3310, 0x9E3779B185EBCA8DULL, { 0xC52F7E06B2709FE6ULL, 0x1A3052778503D7CDULL } }, /* XSUM_XXH128_testdata[9932] */\n    { 3311, 0x0000000000000000ULL, { 0x2EED7825B3318277ULL, 0x930C0F84000CC1ADULL } }, /* XSUM_XXH128_testdata[9933] */\n    { 3311, 0x000000009E3779B1ULL, { 0x91F40E41E5033303ULL, 0x59994A7EAB19E6CDULL } }, /* XSUM_XXH128_testdata[9934] */\n    { 3311, 0x9E3779B185EBCA8DULL, { 0xD4684FBB86410DC5ULL, 0x287356E9A50E5327ULL } }, /* XSUM_XXH128_testdata[9935] */\n    { 3312, 0x0000000000000000ULL, { 0x17AC8E090B8B0E1BULL, 0x850515F27BC1AF8DULL } }, /* XSUM_XXH128_testdata[9936] */\n    { 3312, 0x000000009E3779B1ULL, { 0x40063C280756B9E6ULL, 0x61AD50CF7B52E3A4ULL } }, /* XSUM_XXH128_testdata[9937] */\n    { 3312, 0x9E3779B185EBCA8DULL, { 0xC42086CDDDEA61BCULL, 0x6C86A1B812632788ULL } }, /* XSUM_XXH128_testdata[9938] */\n    { 3313, 0x0000000000000000ULL, { 0x23F5784BBF9B1DF1ULL, 0xFE7142B591EF5BB2ULL } }, /* XSUM_XXH128_testdata[9939] */\n    { 3313, 0x000000009E3779B1ULL, { 0x6803A17680AF9D3EULL, 0x0A7AF5245CF0FE4DULL } }, /* XSUM_XXH128_testdata[9940] */\n    { 3313, 0x9E3779B185EBCA8DULL, { 0x3DA59CE11B907414ULL, 0x50288506EF9258A8ULL } }, /* XSUM_XXH128_testdata[9941] */\n    { 3314, 0x0000000000000000ULL, { 0x9695900D67CCD95EULL, 0xFE27911B94F88E30ULL } }, /* XSUM_XXH128_testdata[9942] */\n    { 3314, 0x000000009E3779B1ULL, { 0x8AD588DB74FDEF77ULL, 0xE29AC6D44FB8C2F4ULL } }, /* XSUM_XXH128_testdata[9943] */\n    { 3314, 0x9E3779B185EBCA8DULL, { 0x1014606F1DD648A1ULL, 0xD9F2ED37922CA0FDULL } }, /* XSUM_XXH128_testdata[9944] */\n    { 3315, 0x0000000000000000ULL, { 0x0C1C74544502BB15ULL, 0x73644B6FFE7195DBULL } }, /* XSUM_XXH128_testdata[9945] */\n    { 3315, 0x000000009E3779B1ULL, { 0x62AE52BE3624DBB2ULL, 0x8F4A05623DCFDDCEULL } }, /* XSUM_XXH128_testdata[9946] */\n    { 3315, 0x9E3779B185EBCA8DULL, { 0x0583BE7443333A4DULL, 0x6D8E4AF8CE866FFEULL } }, /* XSUM_XXH128_testdata[9947] */\n    { 3316, 0x0000000000000000ULL, { 0x278D8FE0095296E4ULL, 0xFF18B22F7414F212ULL } }, /* XSUM_XXH128_testdata[9948] */\n    { 3316, 0x000000009E3779B1ULL, { 0x1F235E8C79902E41ULL, 0xF8EB2769DECAC453ULL } }, /* XSUM_XXH128_testdata[9949] */\n    { 3316, 0x9E3779B185EBCA8DULL, { 0xB1A0354E681F6578ULL, 0x223EFC3FD6E0278DULL } }, /* XSUM_XXH128_testdata[9950] */\n    { 3317, 0x0000000000000000ULL, { 0x02C89CFEDF3EC26DULL, 0xCA52D48017598CE2ULL } }, /* XSUM_XXH128_testdata[9951] */\n    { 3317, 0x000000009E3779B1ULL, { 0x080EF9223E9411A3ULL, 0x6FC4BCE5212C95D9ULL } }, /* XSUM_XXH128_testdata[9952] */\n    { 3317, 0x9E3779B185EBCA8DULL, { 0x9BFB13E995951D98ULL, 0x48317FAB36A2294AULL } }, /* XSUM_XXH128_testdata[9953] */\n    { 3318, 0x0000000000000000ULL, { 0xDC2FAA0D4B80D12BULL, 0x8641D645AD8626F4ULL } }, /* XSUM_XXH128_testdata[9954] */\n    { 3318, 0x000000009E3779B1ULL, { 0xED88A032F125AD81ULL, 0xE27AFD6B5B909FDDULL } }, /* XSUM_XXH128_testdata[9955] */\n    { 3318, 0x9E3779B185EBCA8DULL, { 0xCCD4BFFE0B66ECC7ULL, 0xA04247A3DEB2807FULL } }, /* XSUM_XXH128_testdata[9956] */\n    { 3319, 0x0000000000000000ULL, { 0xFCCD4EB901FE69BEULL, 0x866204F4BE35CB60ULL } }, /* XSUM_XXH128_testdata[9957] */\n    { 3319, 0x000000009E3779B1ULL, { 0x3C66692FB98CC4A7ULL, 0x2B296DB81C7B9240ULL } }, /* XSUM_XXH128_testdata[9958] */\n    { 3319, 0x9E3779B185EBCA8DULL, { 0x1FFD3A5E3CB95033ULL, 0x2A88864DEA33A41EULL } }, /* XSUM_XXH128_testdata[9959] */\n    { 3320, 0x0000000000000000ULL, { 0x0CAD253666032FD6ULL, 0x68A120BE78E25659ULL } }, /* XSUM_XXH128_testdata[9960] */\n    { 3320, 0x000000009E3779B1ULL, { 0xF8623CEC49A0B519ULL, 0x1FA0E27F2FEE33B0ULL } }, /* XSUM_XXH128_testdata[9961] */\n    { 3320, 0x9E3779B185EBCA8DULL, { 0xDBAD1A09D40AFD8EULL, 0x6D5C91155E7A1E87ULL } }, /* XSUM_XXH128_testdata[9962] */\n    { 3321, 0x0000000000000000ULL, { 0xE97362BD28AADE28ULL, 0x774C7FF6F22F7780ULL } }, /* XSUM_XXH128_testdata[9963] */\n    { 3321, 0x000000009E3779B1ULL, { 0x18AE790C6A2B9A02ULL, 0x2F2D050AD9FC2807ULL } }, /* XSUM_XXH128_testdata[9964] */\n    { 3321, 0x9E3779B185EBCA8DULL, { 0x6A1A5A4876C9ED06ULL, 0x6D0E042DD46446B5ULL } }, /* XSUM_XXH128_testdata[9965] */\n    { 3322, 0x0000000000000000ULL, { 0xE582F38E9D03E630ULL, 0xC1125EBED0C2BED7ULL } }, /* XSUM_XXH128_testdata[9966] */\n    { 3322, 0x000000009E3779B1ULL, { 0x97F6B3DF3AF17A3BULL, 0x7DB24DACEBA9F8ABULL } }, /* XSUM_XXH128_testdata[9967] */\n    { 3322, 0x9E3779B185EBCA8DULL, { 0x9B1951C099D93D9BULL, 0x27F600CD36CAA616ULL } }, /* XSUM_XXH128_testdata[9968] */\n    { 3323, 0x0000000000000000ULL, { 0x9BABE22F9703E396ULL, 0x6953EE139FB8FA72ULL } }, /* XSUM_XXH128_testdata[9969] */\n    { 3323, 0x000000009E3779B1ULL, { 0x5C9A755EB1E789C7ULL, 0xBD1E4E98FCD77BBFULL } }, /* XSUM_XXH128_testdata[9970] */\n    { 3323, 0x9E3779B185EBCA8DULL, { 0x7266AE275DEB3628ULL, 0xF2EA4D9953859774ULL } }, /* XSUM_XXH128_testdata[9971] */\n    { 3324, 0x0000000000000000ULL, { 0x5CD985B664FBDBAFULL, 0x71BD7E7F59FF5656ULL } }, /* XSUM_XXH128_testdata[9972] */\n    { 3324, 0x000000009E3779B1ULL, { 0x96A872C5EE1691FCULL, 0x94862504BA6FCB16ULL } }, /* XSUM_XXH128_testdata[9973] */\n    { 3324, 0x9E3779B185EBCA8DULL, { 0x40DEA3B6DA6AF66DULL, 0x6DD991C09510281EULL } }, /* XSUM_XXH128_testdata[9974] */\n    { 3325, 0x0000000000000000ULL, { 0xB5F91FFDCF207925ULL, 0x48318A31F4E5F288ULL } }, /* XSUM_XXH128_testdata[9975] */\n    { 3325, 0x000000009E3779B1ULL, { 0x195966EE1544128DULL, 0x9F29DBE6E6207D75ULL } }, /* XSUM_XXH128_testdata[9976] */\n    { 3325, 0x9E3779B185EBCA8DULL, { 0xD4343DD1B8076D6EULL, 0x53E188CA2498EAFEULL } }, /* XSUM_XXH128_testdata[9977] */\n    { 3326, 0x0000000000000000ULL, { 0x01ADD999619CBD9FULL, 0xF1ED50F42BA63C1CULL } }, /* XSUM_XXH128_testdata[9978] */\n    { 3326, 0x000000009E3779B1ULL, { 0x42F2FD2F2B068E72ULL, 0x4AC99B78C5FABFE5ULL } }, /* XSUM_XXH128_testdata[9979] */\n    { 3326, 0x9E3779B185EBCA8DULL, { 0x2C5A15142FEC2FD8ULL, 0x1CEAD2407286197FULL } }, /* XSUM_XXH128_testdata[9980] */\n    { 3327, 0x0000000000000000ULL, { 0x08011836C094CA6BULL, 0x8DE21D8E415DA08AULL } }, /* XSUM_XXH128_testdata[9981] */\n    { 3327, 0x000000009E3779B1ULL, { 0x61BDC2C282DEC50DULL, 0xF4BA90075ACF5A12ULL } }, /* XSUM_XXH128_testdata[9982] */\n    { 3327, 0x9E3779B185EBCA8DULL, { 0xA5CAE26D8B91D68DULL, 0xA500F33C58093FA5ULL } }, /* XSUM_XXH128_testdata[9983] */\n    { 3328, 0x0000000000000000ULL, { 0xBA4A5091A9EEEBB5ULL, 0xA9727199513916D8ULL } }, /* XSUM_XXH128_testdata[9984] */\n    { 3328, 0x000000009E3779B1ULL, { 0x53BFFB986A9CEE5DULL, 0x3B8696BB795F8094ULL } }, /* XSUM_XXH128_testdata[9985] */\n    { 3328, 0x9E3779B185EBCA8DULL, { 0xB13BEA7A298FB067ULL, 0x1CBB2C8FD804D031ULL } }, /* XSUM_XXH128_testdata[9986] */\n    { 3329, 0x0000000000000000ULL, { 0x50D1FDCB976BE957ULL, 0x74662081E750DC6CULL } }, /* XSUM_XXH128_testdata[9987] */\n    { 3329, 0x000000009E3779B1ULL, { 0xA7F0DE3C7CDDBCAAULL, 0x788E715DD23CF275ULL } }, /* XSUM_XXH128_testdata[9988] */\n    { 3329, 0x9E3779B185EBCA8DULL, { 0x7559494E41899903ULL, 0x53A772F2899A6BC8ULL } }, /* XSUM_XXH128_testdata[9989] */\n    { 3330, 0x0000000000000000ULL, { 0x75107DA44865BEB5ULL, 0xAAEAD4D8149D93B2ULL } }, /* XSUM_XXH128_testdata[9990] */\n    { 3330, 0x000000009E3779B1ULL, { 0x71C286186AC5EE7EULL, 0x07BD774C8386271BULL } }, /* XSUM_XXH128_testdata[9991] */\n    { 3330, 0x9E3779B185EBCA8DULL, { 0x5AAE1D66586FFDA2ULL, 0xA2F32568E98AD9BAULL } }, /* XSUM_XXH128_testdata[9992] */\n    { 3331, 0x0000000000000000ULL, { 0xAF58DBE70F0E263DULL, 0x776B3F2ACAF584A2ULL } }, /* XSUM_XXH128_testdata[9993] */\n    { 3331, 0x000000009E3779B1ULL, { 0x4C95CF2BB49FF401ULL, 0x3775E24432D8FFA1ULL } }, /* XSUM_XXH128_testdata[9994] */\n    { 3331, 0x9E3779B185EBCA8DULL, { 0x14692C98F9DAD48EULL, 0xC63667FB2D376690ULL } }, /* XSUM_XXH128_testdata[9995] */\n    { 3332, 0x0000000000000000ULL, { 0x6F617384900EEF25ULL, 0x2D0B0FC0AD06A1C3ULL } }, /* XSUM_XXH128_testdata[9996] */\n    { 3332, 0x000000009E3779B1ULL, { 0x231279DFA47BE1ACULL, 0xD66D9BAC9CA60FA3ULL } }, /* XSUM_XXH128_testdata[9997] */\n    { 3332, 0x9E3779B185EBCA8DULL, { 0x58B58C579F7E6D00ULL, 0xD847CB2EBDAF58A8ULL } }, /* XSUM_XXH128_testdata[9998] */\n    { 3333, 0x0000000000000000ULL, { 0x60C4155E452F5F87ULL, 0x1DA933D9D16457A8ULL } }, /* XSUM_XXH128_testdata[9999] */\n    { 3333, 0x000000009E3779B1ULL, { 0xD98EB98AE0791AB7ULL, 0xA060E1CDEB8862BDULL } }, /* XSUM_XXH128_testdata[10000] */\n    { 3333, 0x9E3779B185EBCA8DULL, { 0xC96A96E04A3E849AULL, 0x4AE5EE2723486A80ULL } }, /* XSUM_XXH128_testdata[10001] */\n    { 3334, 0x0000000000000000ULL, { 0xBCAF54AB908B193DULL, 0x4438A855624150FBULL } }, /* XSUM_XXH128_testdata[10002] */\n    { 3334, 0x000000009E3779B1ULL, { 0xB47D397DF9D7F6D0ULL, 0xCBFD37ED5FB9792CULL } }, /* XSUM_XXH128_testdata[10003] */\n    { 3334, 0x9E3779B185EBCA8DULL, { 0x54260454C2736A73ULL, 0x998A23F28674E738ULL } }, /* XSUM_XXH128_testdata[10004] */\n    { 3335, 0x0000000000000000ULL, { 0xBBF027A0ADD25BBFULL, 0xF69E06814406D67CULL } }, /* XSUM_XXH128_testdata[10005] */\n    { 3335, 0x000000009E3779B1ULL, { 0x6749046BF0D7C0DDULL, 0x3B2A24A7CCDA5890ULL } }, /* XSUM_XXH128_testdata[10006] */\n    { 3335, 0x9E3779B185EBCA8DULL, { 0x26E4D35633D2C8FDULL, 0x86A0BA59DAD30E65ULL } }, /* XSUM_XXH128_testdata[10007] */\n    { 3336, 0x0000000000000000ULL, { 0xBB0ADB598F22AE91ULL, 0xE05D89A2880A83A1ULL } }, /* XSUM_XXH128_testdata[10008] */\n    { 3336, 0x000000009E3779B1ULL, { 0x7FFE97E5C48A85D7ULL, 0xD58EBF4AAB868B0FULL } }, /* XSUM_XXH128_testdata[10009] */\n    { 3336, 0x9E3779B185EBCA8DULL, { 0xD90552E320AB9A00ULL, 0xC8900FD6AA4277F8ULL } }, /* XSUM_XXH128_testdata[10010] */\n    { 3337, 0x0000000000000000ULL, { 0x02CFCE1529C38652ULL, 0xA7F561A7A992CC5CULL } }, /* XSUM_XXH128_testdata[10011] */\n    { 3337, 0x000000009E3779B1ULL, { 0x87161D75086B69FBULL, 0xC37BEF3BEA52B590ULL } }, /* XSUM_XXH128_testdata[10012] */\n    { 3337, 0x9E3779B185EBCA8DULL, { 0xCD6BA1C7A54511C5ULL, 0x2CFD4A8893C70393ULL } }, /* XSUM_XXH128_testdata[10013] */\n    { 3338, 0x0000000000000000ULL, { 0x13E3324E216C09F9ULL, 0x273AB1544CECFE42ULL } }, /* XSUM_XXH128_testdata[10014] */\n    { 3338, 0x000000009E3779B1ULL, { 0xB0363C54B1985BBEULL, 0xFDA5A221A43D52D0ULL } }, /* XSUM_XXH128_testdata[10015] */\n    { 3338, 0x9E3779B185EBCA8DULL, { 0x312386F8BCB31407ULL, 0x7094BD9D61202A45ULL } }, /* XSUM_XXH128_testdata[10016] */\n    { 3339, 0x0000000000000000ULL, { 0x29DA89CAA19A37FAULL, 0xFB6DDFA7DD25E8B4ULL } }, /* XSUM_XXH128_testdata[10017] */\n    { 3339, 0x000000009E3779B1ULL, { 0xCB73B2EC6A9C8CFBULL, 0xFC8286D8586C9D93ULL } }, /* XSUM_XXH128_testdata[10018] */\n    { 3339, 0x9E3779B185EBCA8DULL, { 0x9485DED18A88C4AEULL, 0xD14EA37AB16B4890ULL } }, /* XSUM_XXH128_testdata[10019] */\n    { 3340, 0x0000000000000000ULL, { 0xA389A6247E5CB6F7ULL, 0x34B659DE4D1AC1ACULL } }, /* XSUM_XXH128_testdata[10020] */\n    { 3340, 0x000000009E3779B1ULL, { 0x7877691FDBFE8661ULL, 0x9FB90444CEB40C87ULL } }, /* XSUM_XXH128_testdata[10021] */\n    { 3340, 0x9E3779B185EBCA8DULL, { 0xEBF9E42F004427E0ULL, 0xCD826099B5E4A5F4ULL } }, /* XSUM_XXH128_testdata[10022] */\n    { 3341, 0x0000000000000000ULL, { 0xD07406613E1B3E9CULL, 0x86B998545650E4EBULL } }, /* XSUM_XXH128_testdata[10023] */\n    { 3341, 0x000000009E3779B1ULL, { 0x9180E74A637B1078ULL, 0xC098979B5D29E145ULL } }, /* XSUM_XXH128_testdata[10024] */\n    { 3341, 0x9E3779B185EBCA8DULL, { 0x872729C833153C1DULL, 0xF6EBA16B10754150ULL } }, /* XSUM_XXH128_testdata[10025] */\n    { 3342, 0x0000000000000000ULL, { 0xC07FDF2155D4E7B6ULL, 0x519C700AE628CDCBULL } }, /* XSUM_XXH128_testdata[10026] */\n    { 3342, 0x000000009E3779B1ULL, { 0x6EBABC5056D2519FULL, 0xF3BD02C0DBA91966ULL } }, /* XSUM_XXH128_testdata[10027] */\n    { 3342, 0x9E3779B185EBCA8DULL, { 0x30679A03126AD5FDULL, 0x9C0B7880E9F60A1DULL } }, /* XSUM_XXH128_testdata[10028] */\n    { 3343, 0x0000000000000000ULL, { 0x836CD924F0E9680CULL, 0xAF79587755E380AAULL } }, /* XSUM_XXH128_testdata[10029] */\n    { 3343, 0x000000009E3779B1ULL, { 0x432424848547E841ULL, 0xE7B09949EC4D0F52ULL } }, /* XSUM_XXH128_testdata[10030] */\n    { 3343, 0x9E3779B185EBCA8DULL, { 0x776D5AAD3298CD2BULL, 0xEBDC8C7B1BB4582CULL } }, /* XSUM_XXH128_testdata[10031] */\n    { 3344, 0x0000000000000000ULL, { 0xC3956381E842E2DEULL, 0xED7CC17BF58CDAFBULL } }, /* XSUM_XXH128_testdata[10032] */\n    { 3344, 0x000000009E3779B1ULL, { 0x5793CE2FA1B482CFULL, 0x03FCA2DA18359C6BULL } }, /* XSUM_XXH128_testdata[10033] */\n    { 3344, 0x9E3779B185EBCA8DULL, { 0x86C94661FF3B2BB8ULL, 0x53BC4CECA0A79FB2ULL } }, /* XSUM_XXH128_testdata[10034] */\n    { 3345, 0x0000000000000000ULL, { 0xB10484FA074AE206ULL, 0x270016F449C92359ULL } }, /* XSUM_XXH128_testdata[10035] */\n    { 3345, 0x000000009E3779B1ULL, { 0xCBE411D6DA9F5E66ULL, 0x7AAADA83B99F7BB2ULL } }, /* XSUM_XXH128_testdata[10036] */\n    { 3345, 0x9E3779B185EBCA8DULL, { 0x1C726988BBC91D6DULL, 0x2DC89312FBA477A0ULL } }, /* XSUM_XXH128_testdata[10037] */\n    { 3346, 0x0000000000000000ULL, { 0x3B608660818671B3ULL, 0xB51FE53EBF726684ULL } }, /* XSUM_XXH128_testdata[10038] */\n    { 3346, 0x000000009E3779B1ULL, { 0xE47967A625666583ULL, 0xE48F0F101A24D366ULL } }, /* XSUM_XXH128_testdata[10039] */\n    { 3346, 0x9E3779B185EBCA8DULL, { 0xF5CCFA1B960AF066ULL, 0x05B8A20B2D4AD971ULL } }, /* XSUM_XXH128_testdata[10040] */\n    { 3347, 0x0000000000000000ULL, { 0x95FFFB7642F9E1EFULL, 0xBD7397A489A1860DULL } }, /* XSUM_XXH128_testdata[10041] */\n    { 3347, 0x000000009E3779B1ULL, { 0xADC957EBFDA41C9AULL, 0xEA2E80DF67A123C9ULL } }, /* XSUM_XXH128_testdata[10042] */\n    { 3347, 0x9E3779B185EBCA8DULL, { 0xFE131ED5AD63D1B7ULL, 0xEF32C597C459F7BAULL } }, /* XSUM_XXH128_testdata[10043] */\n    { 3348, 0x0000000000000000ULL, { 0x7869A6A32C26E54AULL, 0x6495FDFA40B0E6E4ULL } }, /* XSUM_XXH128_testdata[10044] */\n    { 3348, 0x000000009E3779B1ULL, { 0x286FF157D24F3562ULL, 0xE8322C6EBADAC1FAULL } }, /* XSUM_XXH128_testdata[10045] */\n    { 3348, 0x9E3779B185EBCA8DULL, { 0x1E9C1E7CA1E6D5C1ULL, 0x252D739BDEE245D2ULL } }, /* XSUM_XXH128_testdata[10046] */\n    { 3349, 0x0000000000000000ULL, { 0x51BDFE289C4066A9ULL, 0x0AC5E31AB65BBBC5ULL } }, /* XSUM_XXH128_testdata[10047] */\n    { 3349, 0x000000009E3779B1ULL, { 0x4B3828922886605DULL, 0x56160F2064EA5844ULL } }, /* XSUM_XXH128_testdata[10048] */\n    { 3349, 0x9E3779B185EBCA8DULL, { 0xB7BE52394DE63E0EULL, 0x4631CC0B714E5DE0ULL } }, /* XSUM_XXH128_testdata[10049] */\n    { 3350, 0x0000000000000000ULL, { 0xAA01801391E98925ULL, 0xE5A02FB35D930345ULL } }, /* XSUM_XXH128_testdata[10050] */\n    { 3350, 0x000000009E3779B1ULL, { 0x0C8B2EFBB0A6F739ULL, 0xC680A004646A299CULL } }, /* XSUM_XXH128_testdata[10051] */\n    { 3350, 0x9E3779B185EBCA8DULL, { 0x2E2A6D6E3F43CDB0ULL, 0xDD5F06C9579609FEULL } }, /* XSUM_XXH128_testdata[10052] */\n    { 3351, 0x0000000000000000ULL, { 0xCF2A402353A99FE1ULL, 0x90FBA4DAF0B72296ULL } }, /* XSUM_XXH128_testdata[10053] */\n    { 3351, 0x000000009E3779B1ULL, { 0x556EF6EF6D03CB25ULL, 0x0CF2944D55666516ULL } }, /* XSUM_XXH128_testdata[10054] */\n    { 3351, 0x9E3779B185EBCA8DULL, { 0xAD52CCD11E3555DEULL, 0x5BE2FAC824248EE5ULL } }, /* XSUM_XXH128_testdata[10055] */\n    { 3352, 0x0000000000000000ULL, { 0xB01D33C38F36DC5CULL, 0x9B4B0FFEA91968A6ULL } }, /* XSUM_XXH128_testdata[10056] */\n    { 3352, 0x000000009E3779B1ULL, { 0xF75B46237DFC9A46ULL, 0x501E285DD7D768F9ULL } }, /* XSUM_XXH128_testdata[10057] */\n    { 3352, 0x9E3779B185EBCA8DULL, { 0x9E3FFE25B3EB2075ULL, 0xB931F96815C94EFAULL } }, /* XSUM_XXH128_testdata[10058] */\n    { 3353, 0x0000000000000000ULL, { 0x3FB85D3FFD9E06E8ULL, 0xFC25A47B34F63E5EULL } }, /* XSUM_XXH128_testdata[10059] */\n    { 3353, 0x000000009E3779B1ULL, { 0xF8FFD76562AE5203ULL, 0x0C2B9BCD95E9E470ULL } }, /* XSUM_XXH128_testdata[10060] */\n    { 3353, 0x9E3779B185EBCA8DULL, { 0xF27DEE2A8D630D4FULL, 0xE912405C3B166644ULL } }, /* XSUM_XXH128_testdata[10061] */\n    { 3354, 0x0000000000000000ULL, { 0xC37FF70659119746ULL, 0x1018E6312FD5FB97ULL } }, /* XSUM_XXH128_testdata[10062] */\n    { 3354, 0x000000009E3779B1ULL, { 0x8AFA38EEAD709520ULL, 0x01E461658626964CULL } }, /* XSUM_XXH128_testdata[10063] */\n    { 3354, 0x9E3779B185EBCA8DULL, { 0xEAF15F8417A1811FULL, 0x33AC58C0594974B5ULL } }, /* XSUM_XXH128_testdata[10064] */\n    { 3355, 0x0000000000000000ULL, { 0xC5973EAD1F297A47ULL, 0x42D21E6A8F97FFFCULL } }, /* XSUM_XXH128_testdata[10065] */\n    { 3355, 0x000000009E3779B1ULL, { 0x176449E7076165F3ULL, 0x7C0E6CD0F6F07A53ULL } }, /* XSUM_XXH128_testdata[10066] */\n    { 3355, 0x9E3779B185EBCA8DULL, { 0x054A37E362E960FFULL, 0x1D960DBB78DD4EFCULL } }, /* XSUM_XXH128_testdata[10067] */\n    { 3356, 0x0000000000000000ULL, { 0x45132AD6742E601BULL, 0x5628FB4D71421EC4ULL } }, /* XSUM_XXH128_testdata[10068] */\n    { 3356, 0x000000009E3779B1ULL, { 0xE6CDA84500B3AF3EULL, 0xB55AF9ECBC23FEE2ULL } }, /* XSUM_XXH128_testdata[10069] */\n    { 3356, 0x9E3779B185EBCA8DULL, { 0xFF64C5779A13E1A8ULL, 0x214E4FAE46921089ULL } }, /* XSUM_XXH128_testdata[10070] */\n    { 3357, 0x0000000000000000ULL, { 0x4AD4D09228AE74EBULL, 0x3AA74D64C084B2B7ULL } }, /* XSUM_XXH128_testdata[10071] */\n    { 3357, 0x000000009E3779B1ULL, { 0x7EFFFED559AF3D41ULL, 0x54EE561F7A70A4B7ULL } }, /* XSUM_XXH128_testdata[10072] */\n    { 3357, 0x9E3779B185EBCA8DULL, { 0xAB3C130407D8E34CULL, 0xB41E6250F14B0A24ULL } }, /* XSUM_XXH128_testdata[10073] */\n    { 3358, 0x0000000000000000ULL, { 0xBDE7F52D428B5626ULL, 0x7EE71805EB4A02B4ULL } }, /* XSUM_XXH128_testdata[10074] */\n    { 3358, 0x000000009E3779B1ULL, { 0x9C6275C5CE1C855DULL, 0x8698A80D7A7B81ADULL } }, /* XSUM_XXH128_testdata[10075] */\n    { 3358, 0x9E3779B185EBCA8DULL, { 0x7FF63CE94956ABB8ULL, 0x4145BC748ED10BB1ULL } }, /* XSUM_XXH128_testdata[10076] */\n    { 3359, 0x0000000000000000ULL, { 0xFE2565182D1952EAULL, 0x0983C85C2E8FB88DULL } }, /* XSUM_XXH128_testdata[10077] */\n    { 3359, 0x000000009E3779B1ULL, { 0xFD7B9FD9600B201DULL, 0x1806D851D29EDF31ULL } }, /* XSUM_XXH128_testdata[10078] */\n    { 3359, 0x9E3779B185EBCA8DULL, { 0x40A726019BC38DB4ULL, 0x20442FE258849CD9ULL } }, /* XSUM_XXH128_testdata[10079] */\n    { 3360, 0x0000000000000000ULL, { 0x4649D4969584C272ULL, 0x32D32558CD66383CULL } }, /* XSUM_XXH128_testdata[10080] */\n    { 3360, 0x000000009E3779B1ULL, { 0x9281B1AE8489AE0AULL, 0xDD698BEF720DB559ULL } }, /* XSUM_XXH128_testdata[10081] */\n    { 3360, 0x9E3779B185EBCA8DULL, { 0x29A9207541EEA68BULL, 0x6A3284B18EA84F6FULL } }, /* XSUM_XXH128_testdata[10082] */\n    { 3361, 0x0000000000000000ULL, { 0xD01EA1AB2CDC3528ULL, 0x017B9F7A0E71FCCCULL } }, /* XSUM_XXH128_testdata[10083] */\n    { 3361, 0x000000009E3779B1ULL, { 0xD133391189361FECULL, 0x1204AC98913912E7ULL } }, /* XSUM_XXH128_testdata[10084] */\n    { 3361, 0x9E3779B185EBCA8DULL, { 0xD92BA5B55FD6F780ULL, 0xA26A91A74A0684D6ULL } }, /* XSUM_XXH128_testdata[10085] */\n    { 3362, 0x0000000000000000ULL, { 0x070B61EF22A12393ULL, 0x13F105D821532CC1ULL } }, /* XSUM_XXH128_testdata[10086] */\n    { 3362, 0x000000009E3779B1ULL, { 0x4089D26FEB06B6D6ULL, 0xCA87BE23F0A01631ULL } }, /* XSUM_XXH128_testdata[10087] */\n    { 3362, 0x9E3779B185EBCA8DULL, { 0xAB53607E21F191A9ULL, 0xA371E57DD90C32E8ULL } }, /* XSUM_XXH128_testdata[10088] */\n    { 3363, 0x0000000000000000ULL, { 0x4AE0136971A34E18ULL, 0x50A0368BCC23B49EULL } }, /* XSUM_XXH128_testdata[10089] */\n    { 3363, 0x000000009E3779B1ULL, { 0x1162A4B3072EFBD1ULL, 0x7BF249E06DD43FC3ULL } }, /* XSUM_XXH128_testdata[10090] */\n    { 3363, 0x9E3779B185EBCA8DULL, { 0x004526D172BEC24BULL, 0x5DA20A7765D3DB9CULL } }, /* XSUM_XXH128_testdata[10091] */\n    { 3364, 0x0000000000000000ULL, { 0x42A56637D7F0FA18ULL, 0x3C204F5691B25B52ULL } }, /* XSUM_XXH128_testdata[10092] */\n    { 3364, 0x000000009E3779B1ULL, { 0xB59666B784876936ULL, 0x9A95B7D136DF1E8CULL } }, /* XSUM_XXH128_testdata[10093] */\n    { 3364, 0x9E3779B185EBCA8DULL, { 0xA7C3097CF412264DULL, 0x4A946E78BF64D06FULL } }, /* XSUM_XXH128_testdata[10094] */\n    { 3365, 0x0000000000000000ULL, { 0x21FE144D6968D4F2ULL, 0xA398423DBA0D2F0AULL } }, /* XSUM_XXH128_testdata[10095] */\n    { 3365, 0x000000009E3779B1ULL, { 0xF27DFB0F7408B6BCULL, 0x53B5E3500D3458BAULL } }, /* XSUM_XXH128_testdata[10096] */\n    { 3365, 0x9E3779B185EBCA8DULL, { 0xC4D1BE69C49EF35BULL, 0x70F0ACBF7ECE06D1ULL } }, /* XSUM_XXH128_testdata[10097] */\n    { 3366, 0x0000000000000000ULL, { 0x12D77C635653B2B8ULL, 0x58DE0A148A62CEBEULL } }, /* XSUM_XXH128_testdata[10098] */\n    { 3366, 0x000000009E3779B1ULL, { 0x5E0B4DFB930E5F5BULL, 0x4B801BBC3A7A6CF1ULL } }, /* XSUM_XXH128_testdata[10099] */\n    { 3366, 0x9E3779B185EBCA8DULL, { 0xB73F37C743862437ULL, 0x096F5F5840D33A4FULL } }, /* XSUM_XXH128_testdata[10100] */\n    { 3367, 0x0000000000000000ULL, { 0x0752F2C4C8A25C1AULL, 0x0BF71394045F6293ULL } }, /* XSUM_XXH128_testdata[10101] */\n    { 3367, 0x000000009E3779B1ULL, { 0xEB23BCBC231E6048ULL, 0x7010F9D4985E012CULL } }, /* XSUM_XXH128_testdata[10102] */\n    { 3367, 0x9E3779B185EBCA8DULL, { 0xC983E99166B19B17ULL, 0x6FB2579440B21364ULL } }, /* XSUM_XXH128_testdata[10103] */\n    { 3368, 0x0000000000000000ULL, { 0x15AA8640193B2254ULL, 0xDEAEFC19C4E8DA6AULL } }, /* XSUM_XXH128_testdata[10104] */\n    { 3368, 0x000000009E3779B1ULL, { 0x1FD0411C0282732CULL, 0x3EA50DD348293F9CULL } }, /* XSUM_XXH128_testdata[10105] */\n    { 3368, 0x9E3779B185EBCA8DULL, { 0x53D54D74763AD4B2ULL, 0x10E91A20C3254F94ULL } }, /* XSUM_XXH128_testdata[10106] */\n    { 3369, 0x0000000000000000ULL, { 0x3A2B1F7886668CC8ULL, 0x23D0F39FAE054F2FULL } }, /* XSUM_XXH128_testdata[10107] */\n    { 3369, 0x000000009E3779B1ULL, { 0xEEB4990BE9621AF7ULL, 0x5D0B876C019EFDD8ULL } }, /* XSUM_XXH128_testdata[10108] */\n    { 3369, 0x9E3779B185EBCA8DULL, { 0x5B0B2B5F227D1228ULL, 0xA274B712D97490A0ULL } }, /* XSUM_XXH128_testdata[10109] */\n    { 3370, 0x0000000000000000ULL, { 0x256280630F5EAFF2ULL, 0xF098F25D00EE1C81ULL } }, /* XSUM_XXH128_testdata[10110] */\n    { 3370, 0x000000009E3779B1ULL, { 0xC7A850C66FA0827CULL, 0xDE95B222F2A50B6EULL } }, /* XSUM_XXH128_testdata[10111] */\n    { 3370, 0x9E3779B185EBCA8DULL, { 0xFD87C26C8883F638ULL, 0x2489DD8F53D6B382ULL } }, /* XSUM_XXH128_testdata[10112] */\n    { 3371, 0x0000000000000000ULL, { 0x8BC58F317FFE3E5AULL, 0x14ABE31C140FB353ULL } }, /* XSUM_XXH128_testdata[10113] */\n    { 3371, 0x000000009E3779B1ULL, { 0x1ADE577F86DFEF22ULL, 0xC0DF17ED6C402C1BULL } }, /* XSUM_XXH128_testdata[10114] */\n    { 3371, 0x9E3779B185EBCA8DULL, { 0x724319694EDADAB3ULL, 0x9D02307164F10A92ULL } }, /* XSUM_XXH128_testdata[10115] */\n    { 3372, 0x0000000000000000ULL, { 0xB15A5B5D991811AFULL, 0x6EDC69808C58FCE9ULL } }, /* XSUM_XXH128_testdata[10116] */\n    { 3372, 0x000000009E3779B1ULL, { 0x454F88075C261CF1ULL, 0x6E4A09D62DDFF57BULL } }, /* XSUM_XXH128_testdata[10117] */\n    { 3372, 0x9E3779B185EBCA8DULL, { 0x11A111EE2A25D794ULL, 0xB63D073DDEFB02A8ULL } }, /* XSUM_XXH128_testdata[10118] */\n    { 3373, 0x0000000000000000ULL, { 0xA07DF89EACE870B5ULL, 0x56E62BED2C55E779ULL } }, /* XSUM_XXH128_testdata[10119] */\n    { 3373, 0x000000009E3779B1ULL, { 0x4711820EE1407E34ULL, 0xA3BD8352D83B272BULL } }, /* XSUM_XXH128_testdata[10120] */\n    { 3373, 0x9E3779B185EBCA8DULL, { 0x575E9182CEFD992FULL, 0x4D0D9603D19DE09BULL } }, /* XSUM_XXH128_testdata[10121] */\n    { 3374, 0x0000000000000000ULL, { 0xF14876CD4E593F54ULL, 0xD7C45746E8A0C27AULL } }, /* XSUM_XXH128_testdata[10122] */\n    { 3374, 0x000000009E3779B1ULL, { 0xF5697D10A5D415EFULL, 0x7C4F7D293F9C9A49ULL } }, /* XSUM_XXH128_testdata[10123] */\n    { 3374, 0x9E3779B185EBCA8DULL, { 0xD8E781A0A6F6D906ULL, 0x4882173CCB7E8951ULL } }, /* XSUM_XXH128_testdata[10124] */\n    { 3375, 0x0000000000000000ULL, { 0x7566CE50C709787DULL, 0x80DCFA53A6E10AA6ULL } }, /* XSUM_XXH128_testdata[10125] */\n    { 3375, 0x000000009E3779B1ULL, { 0x10AA52F50859D070ULL, 0x065A2687ECF87E77ULL } }, /* XSUM_XXH128_testdata[10126] */\n    { 3375, 0x9E3779B185EBCA8DULL, { 0xD41FF1B992AA75F9ULL, 0xC6355DB1E99D5ECCULL } }, /* XSUM_XXH128_testdata[10127] */\n    { 3376, 0x0000000000000000ULL, { 0xD6BC865A0060E024ULL, 0xE804EF61E55F1709ULL } }, /* XSUM_XXH128_testdata[10128] */\n    { 3376, 0x000000009E3779B1ULL, { 0x40FD46C5E95FFB3AULL, 0xEEB6BD4903DF8897ULL } }, /* XSUM_XXH128_testdata[10129] */\n    { 3376, 0x9E3779B185EBCA8DULL, { 0x6DBC027EE86B52F1ULL, 0xF88AE234B973D457ULL } }, /* XSUM_XXH128_testdata[10130] */\n    { 3377, 0x0000000000000000ULL, { 0x8852757DEF3F3AC7ULL, 0xF550F13DC48DDE0DULL } }, /* XSUM_XXH128_testdata[10131] */\n    { 3377, 0x000000009E3779B1ULL, { 0xFD4551ED468EF969ULL, 0xA1C582E464F5392CULL } }, /* XSUM_XXH128_testdata[10132] */\n    { 3377, 0x9E3779B185EBCA8DULL, { 0x7CD92F439E03EBBBULL, 0x660FCB588401AF18ULL } }, /* XSUM_XXH128_testdata[10133] */\n    { 3378, 0x0000000000000000ULL, { 0x3CF6812DD0D09CB1ULL, 0x8647CD6CB7748936ULL } }, /* XSUM_XXH128_testdata[10134] */\n    { 3378, 0x000000009E3779B1ULL, { 0x2B760D916613E6F4ULL, 0xFF18E745195EE8C0ULL } }, /* XSUM_XXH128_testdata[10135] */\n    { 3378, 0x9E3779B185EBCA8DULL, { 0x626B10E13E9647AEULL, 0x6CB7A898B9FB363CULL } }, /* XSUM_XXH128_testdata[10136] */\n    { 3379, 0x0000000000000000ULL, { 0x5698A6D102F8C1F4ULL, 0x091CFCFEE8D1A359ULL } }, /* XSUM_XXH128_testdata[10137] */\n    { 3379, 0x000000009E3779B1ULL, { 0x10FD0583763D23CBULL, 0x20BB38CEFCEC4FEDULL } }, /* XSUM_XXH128_testdata[10138] */\n    { 3379, 0x9E3779B185EBCA8DULL, { 0xA6E18A45A57807B6ULL, 0xD321A77225C2AE01ULL } }, /* XSUM_XXH128_testdata[10139] */\n    { 3380, 0x0000000000000000ULL, { 0x96795C27D904C9CAULL, 0xAB72EB77BCF2D32CULL } }, /* XSUM_XXH128_testdata[10140] */\n    { 3380, 0x000000009E3779B1ULL, { 0x2AEFDC32692D8591ULL, 0x8E475ACF823C0E9CULL } }, /* XSUM_XXH128_testdata[10141] */\n    { 3380, 0x9E3779B185EBCA8DULL, { 0x600BDE3FC41E808CULL, 0xDD04349AD39992A3ULL } }, /* XSUM_XXH128_testdata[10142] */\n    { 3381, 0x0000000000000000ULL, { 0xF5EA6A3869DB8865ULL, 0xC4FBF3E16269DC2BULL } }, /* XSUM_XXH128_testdata[10143] */\n    { 3381, 0x000000009E3779B1ULL, { 0xEE37157BD657EE8CULL, 0xD6B2974684EB2469ULL } }, /* XSUM_XXH128_testdata[10144] */\n    { 3381, 0x9E3779B185EBCA8DULL, { 0xF3386B856B7BF6B9ULL, 0xE02498FEEF0B1EE7ULL } }, /* XSUM_XXH128_testdata[10145] */\n    { 3382, 0x0000000000000000ULL, { 0x3E356A6CB2C2273CULL, 0xCEF7121B4F6EAB1EULL } }, /* XSUM_XXH128_testdata[10146] */\n    { 3382, 0x000000009E3779B1ULL, { 0x3C48D8F4C555295DULL, 0x6069DF879FC49906ULL } }, /* XSUM_XXH128_testdata[10147] */\n    { 3382, 0x9E3779B185EBCA8DULL, { 0x938ED73AA86A3EA6ULL, 0x75845DDF6E545C8AULL } }, /* XSUM_XXH128_testdata[10148] */\n    { 3383, 0x0000000000000000ULL, { 0x02A498021F3FE5DAULL, 0xBEA2F1B39786FFD4ULL } }, /* XSUM_XXH128_testdata[10149] */\n    { 3383, 0x000000009E3779B1ULL, { 0xA9B9CDC732BC4030ULL, 0xBC60C19BD9B65885ULL } }, /* XSUM_XXH128_testdata[10150] */\n    { 3383, 0x9E3779B185EBCA8DULL, { 0x167408B658D97687ULL, 0x4B08EAB7C2154228ULL } }, /* XSUM_XXH128_testdata[10151] */\n    { 3384, 0x0000000000000000ULL, { 0x6F58654097A2362CULL, 0x54BA122DE73A6812ULL } }, /* XSUM_XXH128_testdata[10152] */\n    { 3384, 0x000000009E3779B1ULL, { 0xA7BE027E58CEB262ULL, 0xD078B596E9E53863ULL } }, /* XSUM_XXH128_testdata[10153] */\n    { 3384, 0x9E3779B185EBCA8DULL, { 0xEAE046A15ECAF386ULL, 0x6A778A984A5DF7BDULL } }, /* XSUM_XXH128_testdata[10154] */\n    { 3385, 0x0000000000000000ULL, { 0x5ABE011F58851AC1ULL, 0xB0856E1BE1AF18F9ULL } }, /* XSUM_XXH128_testdata[10155] */\n    { 3385, 0x000000009E3779B1ULL, { 0xBB23EB6BFC820AF6ULL, 0xD33DD793F60B1DBEULL } }, /* XSUM_XXH128_testdata[10156] */\n    { 3385, 0x9E3779B185EBCA8DULL, { 0xA242766363ECFFD1ULL, 0x8D4B7275F0D1EA19ULL } }, /* XSUM_XXH128_testdata[10157] */\n    { 3386, 0x0000000000000000ULL, { 0x7D6FB06860923912ULL, 0x0D911E2EEF550723ULL } }, /* XSUM_XXH128_testdata[10158] */\n    { 3386, 0x000000009E3779B1ULL, { 0x0A0980640C65686DULL, 0xD457460D6113FF76ULL } }, /* XSUM_XXH128_testdata[10159] */\n    { 3386, 0x9E3779B185EBCA8DULL, { 0x721052AEF679D3ACULL, 0xE3A6BDFEDE4E8C7CULL } }, /* XSUM_XXH128_testdata[10160] */\n    { 3387, 0x0000000000000000ULL, { 0xA76665E0C3EF9A9BULL, 0x892F3110154A5960ULL } }, /* XSUM_XXH128_testdata[10161] */\n    { 3387, 0x000000009E3779B1ULL, { 0x951E3DF06166DF1FULL, 0x0DD734F8844E8103ULL } }, /* XSUM_XXH128_testdata[10162] */\n    { 3387, 0x9E3779B185EBCA8DULL, { 0xF895B633A5B18B63ULL, 0x8CEA707BF95ADF12ULL } }, /* XSUM_XXH128_testdata[10163] */\n    { 3388, 0x0000000000000000ULL, { 0x75DA9626A90ADA95ULL, 0xABB884C6832438DBULL } }, /* XSUM_XXH128_testdata[10164] */\n    { 3388, 0x000000009E3779B1ULL, { 0x58079A4886136135ULL, 0xBE4A69DB68DF96EFULL } }, /* XSUM_XXH128_testdata[10165] */\n    { 3388, 0x9E3779B185EBCA8DULL, { 0x51D970EBFE6D9BD2ULL, 0x2CFCFEE7BD380E8AULL } }, /* XSUM_XXH128_testdata[10166] */\n    { 3389, 0x0000000000000000ULL, { 0x387890C21988999AULL, 0x1A4BF215A0DFCF65ULL } }, /* XSUM_XXH128_testdata[10167] */\n    { 3389, 0x000000009E3779B1ULL, { 0x859360F4E8ED7BE6ULL, 0x43C400A135690E00ULL } }, /* XSUM_XXH128_testdata[10168] */\n    { 3389, 0x9E3779B185EBCA8DULL, { 0xFA3EB1B97303FB7DULL, 0xB2689C56E3DA7418ULL } }, /* XSUM_XXH128_testdata[10169] */\n    { 3390, 0x0000000000000000ULL, { 0xCC3B112F2C79A3A7ULL, 0x4145C2501C4819F7ULL } }, /* XSUM_XXH128_testdata[10170] */\n    { 3390, 0x000000009E3779B1ULL, { 0x20359A42878BB673ULL, 0x45C93721246DF445ULL } }, /* XSUM_XXH128_testdata[10171] */\n    { 3390, 0x9E3779B185EBCA8DULL, { 0x472523F5CFCC6459ULL, 0x194822021F80B60DULL } }, /* XSUM_XXH128_testdata[10172] */\n    { 3391, 0x0000000000000000ULL, { 0x56FD48AD2C3F7AE2ULL, 0x595ECBEEA5BA689EULL } }, /* XSUM_XXH128_testdata[10173] */\n    { 3391, 0x000000009E3779B1ULL, { 0xDE906855C34B861CULL, 0x1FBF361668A5AA91ULL } }, /* XSUM_XXH128_testdata[10174] */\n    { 3391, 0x9E3779B185EBCA8DULL, { 0x1954BEE13911BEF0ULL, 0x4AC41AC310BA3181ULL } }, /* XSUM_XXH128_testdata[10175] */\n    { 3392, 0x0000000000000000ULL, { 0x069C8A3CBB355320ULL, 0x37D45271A2B55E65ULL } }, /* XSUM_XXH128_testdata[10176] */\n    { 3392, 0x000000009E3779B1ULL, { 0x7F37507C3B77849CULL, 0x36D50D80B6333ED7ULL } }, /* XSUM_XXH128_testdata[10177] */\n    { 3392, 0x9E3779B185EBCA8DULL, { 0x992366365E422669ULL, 0xE85BBEB6523A9011ULL } }, /* XSUM_XXH128_testdata[10178] */\n    { 3393, 0x0000000000000000ULL, { 0x2D6D9564C994E53CULL, 0xDBB97D2FE92C18F5ULL } }, /* XSUM_XXH128_testdata[10179] */\n    { 3393, 0x000000009E3779B1ULL, { 0xEC6C952E25F3083DULL, 0x1C187795C1EB9C47ULL } }, /* XSUM_XXH128_testdata[10180] */\n    { 3393, 0x9E3779B185EBCA8DULL, { 0x061C4F86D60A20AFULL, 0x36460AC449CDDBA5ULL } }, /* XSUM_XXH128_testdata[10181] */\n    { 3394, 0x0000000000000000ULL, { 0xB0B37ECBEEA4EB83ULL, 0xB661196AD57CAEB2ULL } }, /* XSUM_XXH128_testdata[10182] */\n    { 3394, 0x000000009E3779B1ULL, { 0xA3C86A7CDF3C1E20ULL, 0x6195B2F669D2CCE1ULL } }, /* XSUM_XXH128_testdata[10183] */\n    { 3394, 0x9E3779B185EBCA8DULL, { 0xEDC67A98C8453C98ULL, 0xECF033AD7F389A4FULL } }, /* XSUM_XXH128_testdata[10184] */\n    { 3395, 0x0000000000000000ULL, { 0x150198DF293C0A4BULL, 0x6E93164C8A4A2B9BULL } }, /* XSUM_XXH128_testdata[10185] */\n    { 3395, 0x000000009E3779B1ULL, { 0x51EFD36AF3B55860ULL, 0xB72B2E57A7C801C1ULL } }, /* XSUM_XXH128_testdata[10186] */\n    { 3395, 0x9E3779B185EBCA8DULL, { 0x6077B479F4DBB10DULL, 0x57B570320ED1E09BULL } }, /* XSUM_XXH128_testdata[10187] */\n    { 3396, 0x0000000000000000ULL, { 0x5DA9C28DBDE35D4AULL, 0x94F75507B0E60E14ULL } }, /* XSUM_XXH128_testdata[10188] */\n    { 3396, 0x000000009E3779B1ULL, { 0xB00EB6950C71E60BULL, 0x25972A09B4D9F4BDULL } }, /* XSUM_XXH128_testdata[10189] */\n    { 3396, 0x9E3779B185EBCA8DULL, { 0x792D8912B6067280ULL, 0xACF40BA51B3AB1AAULL } }, /* XSUM_XXH128_testdata[10190] */\n    { 3397, 0x0000000000000000ULL, { 0x42819BD28C9C8BBBULL, 0x154984D5FEF6660CULL } }, /* XSUM_XXH128_testdata[10191] */\n    { 3397, 0x000000009E3779B1ULL, { 0x08EA4911A5A3583DULL, 0xB71AB22075F496B6ULL } }, /* XSUM_XXH128_testdata[10192] */\n    { 3397, 0x9E3779B185EBCA8DULL, { 0x987B8D15969B50CCULL, 0x0BAF478DAC3E8D10ULL } }, /* XSUM_XXH128_testdata[10193] */\n    { 3398, 0x0000000000000000ULL, { 0x230D4F0FB1F52D75ULL, 0x92390BBCEF6AD358ULL } }, /* XSUM_XXH128_testdata[10194] */\n    { 3398, 0x000000009E3779B1ULL, { 0x9807227C58CC171FULL, 0x5ECC99D3CEA18B56ULL } }, /* XSUM_XXH128_testdata[10195] */\n    { 3398, 0x9E3779B185EBCA8DULL, { 0x8FD85DD189EF36AFULL, 0xBA05E913938B10C8ULL } }, /* XSUM_XXH128_testdata[10196] */\n    { 3399, 0x0000000000000000ULL, { 0x556F3F29D18C0072ULL, 0x64C2767D533DAEBFULL } }, /* XSUM_XXH128_testdata[10197] */\n    { 3399, 0x000000009E3779B1ULL, { 0x2D34A5B1690003B5ULL, 0xE1A0D4D060B2B344ULL } }, /* XSUM_XXH128_testdata[10198] */\n    { 3399, 0x9E3779B185EBCA8DULL, { 0xFC79DD9F134BDE40ULL, 0xBA26347FADB7C4DCULL } }, /* XSUM_XXH128_testdata[10199] */\n    { 3400, 0x0000000000000000ULL, { 0x8667E4F6A9AE7D71ULL, 0x30F2B04C3353876CULL } }, /* XSUM_XXH128_testdata[10200] */\n    { 3400, 0x000000009E3779B1ULL, { 0x897BE0F399AB88D1ULL, 0x24E08DBE1C015B69ULL } }, /* XSUM_XXH128_testdata[10201] */\n    { 3400, 0x9E3779B185EBCA8DULL, { 0x442B3EA2542D3EC1ULL, 0x9FD3002DD0724F6BULL } }, /* XSUM_XXH128_testdata[10202] */\n    { 3401, 0x0000000000000000ULL, { 0xA45C652DA3612B31ULL, 0x7B722BF5BF97B8C9ULL } }, /* XSUM_XXH128_testdata[10203] */\n    { 3401, 0x000000009E3779B1ULL, { 0xEFBD4BC90774B890ULL, 0x2FAAD0D188B939DBULL } }, /* XSUM_XXH128_testdata[10204] */\n    { 3401, 0x9E3779B185EBCA8DULL, { 0xA1F6535133673725ULL, 0x9BFC8B0BB0BD7143ULL } }, /* XSUM_XXH128_testdata[10205] */\n    { 3402, 0x0000000000000000ULL, { 0xC3393268BD9A580FULL, 0x40F0BE912E007527ULL } }, /* XSUM_XXH128_testdata[10206] */\n    { 3402, 0x000000009E3779B1ULL, { 0xD1CF54E3945B1D3CULL, 0xA0E5AEC170480BCAULL } }, /* XSUM_XXH128_testdata[10207] */\n    { 3402, 0x9E3779B185EBCA8DULL, { 0x900537CE674E5C29ULL, 0xACDC51BB0ACA0F75ULL } }, /* XSUM_XXH128_testdata[10208] */\n    { 3403, 0x0000000000000000ULL, { 0x5EF6FB124B92471AULL, 0x8AF84C78BC9028CAULL } }, /* XSUM_XXH128_testdata[10209] */\n    { 3403, 0x000000009E3779B1ULL, { 0x61527F40620D22DAULL, 0xE42F47C8736F8CCFULL } }, /* XSUM_XXH128_testdata[10210] */\n    { 3403, 0x9E3779B185EBCA8DULL, { 0xE9B203C1E1A13490ULL, 0xB8AA668753F09F8AULL } }, /* XSUM_XXH128_testdata[10211] */\n    { 3404, 0x0000000000000000ULL, { 0xFEEF85FD8F064FB8ULL, 0x594E32F02DEC493AULL } }, /* XSUM_XXH128_testdata[10212] */\n    { 3404, 0x000000009E3779B1ULL, { 0x4F7653007B9D9DAEULL, 0x64947802766DB2CEULL } }, /* XSUM_XXH128_testdata[10213] */\n    { 3404, 0x9E3779B185EBCA8DULL, { 0x36D403BFD873D29EULL, 0x16F45D985C084226ULL } }, /* XSUM_XXH128_testdata[10214] */\n    { 3405, 0x0000000000000000ULL, { 0xAD4E16D2BCF13E91ULL, 0x3A7FA312FBDA6A42ULL } }, /* XSUM_XXH128_testdata[10215] */\n    { 3405, 0x000000009E3779B1ULL, { 0xD5A05A4F957E5B75ULL, 0x2746F5D1F0F12B9BULL } }, /* XSUM_XXH128_testdata[10216] */\n    { 3405, 0x9E3779B185EBCA8DULL, { 0xCA663C3422B8AC5AULL, 0xF689690CDE964C4CULL } }, /* XSUM_XXH128_testdata[10217] */\n    { 3406, 0x0000000000000000ULL, { 0x04C879B2B9C607D1ULL, 0x2472D0C28D949599ULL } }, /* XSUM_XXH128_testdata[10218] */\n    { 3406, 0x000000009E3779B1ULL, { 0x360BDB67D042250EULL, 0x70AA8112F408461AULL } }, /* XSUM_XXH128_testdata[10219] */\n    { 3406, 0x9E3779B185EBCA8DULL, { 0x3E18E39DD05AD200ULL, 0x8B37620E205407A4ULL } }, /* XSUM_XXH128_testdata[10220] */\n    { 3407, 0x0000000000000000ULL, { 0x3DC2FBCD16225841ULL, 0xBEC10FA7F910F096ULL } }, /* XSUM_XXH128_testdata[10221] */\n    { 3407, 0x000000009E3779B1ULL, { 0xF80A841C7A499AA7ULL, 0xA852619546B79E31ULL } }, /* XSUM_XXH128_testdata[10222] */\n    { 3407, 0x9E3779B185EBCA8DULL, { 0xB0102B3A179982DFULL, 0xF935D7D8E10EDFFDULL } }, /* XSUM_XXH128_testdata[10223] */\n    { 3408, 0x0000000000000000ULL, { 0xF5EA4DB56376A521ULL, 0x28EC8C205EE740BBULL } }, /* XSUM_XXH128_testdata[10224] */\n    { 3408, 0x000000009E3779B1ULL, { 0xDFEA453925C72D90ULL, 0x8F2CC2DCED630200ULL } }, /* XSUM_XXH128_testdata[10225] */\n    { 3408, 0x9E3779B185EBCA8DULL, { 0x76CBDCD851E1578DULL, 0xA59BC1D9776C3D39ULL } }, /* XSUM_XXH128_testdata[10226] */\n    { 3409, 0x0000000000000000ULL, { 0xE987EBEEE1EECCD9ULL, 0x878AD21AC06C55F0ULL } }, /* XSUM_XXH128_testdata[10227] */\n    { 3409, 0x000000009E3779B1ULL, { 0x9F5FC5E2CD6EF83DULL, 0xD28BE69A70D1302DULL } }, /* XSUM_XXH128_testdata[10228] */\n    { 3409, 0x9E3779B185EBCA8DULL, { 0xA2B2B1828D920A8FULL, 0x1443BD4EDE66CE7AULL } }, /* XSUM_XXH128_testdata[10229] */\n    { 3410, 0x0000000000000000ULL, { 0xA28A69165BC6201FULL, 0x58B60BC89AC3D8EEULL } }, /* XSUM_XXH128_testdata[10230] */\n    { 3410, 0x000000009E3779B1ULL, { 0xA1AE2C7E52FBADE0ULL, 0x7BC707AB9840B98AULL } }, /* XSUM_XXH128_testdata[10231] */\n    { 3410, 0x9E3779B185EBCA8DULL, { 0x6D3E68040E28F068ULL, 0x2FD03AAA40A92094ULL } }, /* XSUM_XXH128_testdata[10232] */\n    { 3411, 0x0000000000000000ULL, { 0xD084835BE48582BAULL, 0xFB062FD9069DD918ULL } }, /* XSUM_XXH128_testdata[10233] */\n    { 3411, 0x000000009E3779B1ULL, { 0xE9C755AED39E3F16ULL, 0x825C2D74CA8657DEULL } }, /* XSUM_XXH128_testdata[10234] */\n    { 3411, 0x9E3779B185EBCA8DULL, { 0xFAE48A7F6D0EA3ADULL, 0x10179D5590C25744ULL } }, /* XSUM_XXH128_testdata[10235] */\n    { 3412, 0x0000000000000000ULL, { 0x99FAC1585DA2979EULL, 0x1DC55DDBC512A54AULL } }, /* XSUM_XXH128_testdata[10236] */\n    { 3412, 0x000000009E3779B1ULL, { 0xAAA8BF0D78CC11E3ULL, 0x55BA06A24C250683ULL } }, /* XSUM_XXH128_testdata[10237] */\n    { 3412, 0x9E3779B185EBCA8DULL, { 0x8A0946D812EC9930ULL, 0xE7B5321617B66CF6ULL } }, /* XSUM_XXH128_testdata[10238] */\n    { 3413, 0x0000000000000000ULL, { 0x9B7D110224DE3741ULL, 0x7D29879CEA4BC6EFULL } }, /* XSUM_XXH128_testdata[10239] */\n    { 3413, 0x000000009E3779B1ULL, { 0x5023CCB0B1DD2BCFULL, 0x1C24810361A6A800ULL } }, /* XSUM_XXH128_testdata[10240] */\n    { 3413, 0x9E3779B185EBCA8DULL, { 0x512B43626433FFD5ULL, 0x451B9A54222912EDULL } }, /* XSUM_XXH128_testdata[10241] */\n    { 3414, 0x0000000000000000ULL, { 0x068464F851726C21ULL, 0xCBF70CEB00AE78F0ULL } }, /* XSUM_XXH128_testdata[10242] */\n    { 3414, 0x000000009E3779B1ULL, { 0x4ABA29CB4C21BD43ULL, 0xF449EBFC44D2F60AULL } }, /* XSUM_XXH128_testdata[10243] */\n    { 3414, 0x9E3779B185EBCA8DULL, { 0x1B249FDF51CB749BULL, 0xC95484A2EB536862ULL } }, /* XSUM_XXH128_testdata[10244] */\n    { 3415, 0x0000000000000000ULL, { 0xFA428E8672E650F5ULL, 0x6D8EF62E29F4FA94ULL } }, /* XSUM_XXH128_testdata[10245] */\n    { 3415, 0x000000009E3779B1ULL, { 0x7E5056490F731D01ULL, 0x2E2EF841FCBEEF9FULL } }, /* XSUM_XXH128_testdata[10246] */\n    { 3415, 0x9E3779B185EBCA8DULL, { 0x30E2D66C047374EAULL, 0x170D312A468192D9ULL } }, /* XSUM_XXH128_testdata[10247] */\n    { 3416, 0x0000000000000000ULL, { 0x537AE0407DA6E36EULL, 0x9B5FE17827B8DFC4ULL } }, /* XSUM_XXH128_testdata[10248] */\n    { 3416, 0x000000009E3779B1ULL, { 0x3711A4203BF2C04FULL, 0x516342393222E0BBULL } }, /* XSUM_XXH128_testdata[10249] */\n    { 3416, 0x9E3779B185EBCA8DULL, { 0x3A2632845436AFA4ULL, 0xE47FB4FDCACEB3C8ULL } }, /* XSUM_XXH128_testdata[10250] */\n    { 3417, 0x0000000000000000ULL, { 0xC78CBD900D0FA155ULL, 0x3E0CFFB36CB41979ULL } }, /* XSUM_XXH128_testdata[10251] */\n    { 3417, 0x000000009E3779B1ULL, { 0x2238A7CDD4728648ULL, 0xEDEF4CF40506AA45ULL } }, /* XSUM_XXH128_testdata[10252] */\n    { 3417, 0x9E3779B185EBCA8DULL, { 0xEA043C3AE68F0072ULL, 0x56D02579634E4A0AULL } }, /* XSUM_XXH128_testdata[10253] */\n    { 3418, 0x0000000000000000ULL, { 0x16A5A54E8C5C26E1ULL, 0x0D9239AFF663185EULL } }, /* XSUM_XXH128_testdata[10254] */\n    { 3418, 0x000000009E3779B1ULL, { 0x26B9E11C030B6599ULL, 0x8A968632CBFC17D2ULL } }, /* XSUM_XXH128_testdata[10255] */\n    { 3418, 0x9E3779B185EBCA8DULL, { 0xBCD3F01DC87BEACFULL, 0x481A4784425DCC4DULL } }, /* XSUM_XXH128_testdata[10256] */\n    { 3419, 0x0000000000000000ULL, { 0x99D4EE76AF195731ULL, 0xD7680A2C3ED9240AULL } }, /* XSUM_XXH128_testdata[10257] */\n    { 3419, 0x000000009E3779B1ULL, { 0xBE2650365DE6E9EFULL, 0x66943CCEDF4B0E80ULL } }, /* XSUM_XXH128_testdata[10258] */\n    { 3419, 0x9E3779B185EBCA8DULL, { 0x4B4454EAE9502B87ULL, 0xB5A9E10D659992B9ULL } }, /* XSUM_XXH128_testdata[10259] */\n    { 3420, 0x0000000000000000ULL, { 0xBEED4A7672B35DA1ULL, 0x07C8B93C31F79DF4ULL } }, /* XSUM_XXH128_testdata[10260] */\n    { 3420, 0x000000009E3779B1ULL, { 0x8CEABEF7CDED21CEULL, 0x8130E5D588C02233ULL } }, /* XSUM_XXH128_testdata[10261] */\n    { 3420, 0x9E3779B185EBCA8DULL, { 0x9165EC9EFB91D063ULL, 0x19A0EC2C44433604ULL } }, /* XSUM_XXH128_testdata[10262] */\n    { 3421, 0x0000000000000000ULL, { 0xD2B64EFAB2C7F3B6ULL, 0x5791BCF9AC2C1300ULL } }, /* XSUM_XXH128_testdata[10263] */\n    { 3421, 0x000000009E3779B1ULL, { 0x02374F9F5533472EULL, 0x90E1F802BCEA1989ULL } }, /* XSUM_XXH128_testdata[10264] */\n    { 3421, 0x9E3779B185EBCA8DULL, { 0x26F3512DBB64CCD6ULL, 0xFFB425542FB23BECULL } }, /* XSUM_XXH128_testdata[10265] */\n    { 3422, 0x0000000000000000ULL, { 0x16994ADC95C3DD59ULL, 0xC21E3D1F5D9D10CBULL } }, /* XSUM_XXH128_testdata[10266] */\n    { 3422, 0x000000009E3779B1ULL, { 0x82AB9E7499FEFD69ULL, 0x3FF6435BE4D5DAC8ULL } }, /* XSUM_XXH128_testdata[10267] */\n    { 3422, 0x9E3779B185EBCA8DULL, { 0x25DD06403D47B9E2ULL, 0x2B10CF7BFE61623AULL } }, /* XSUM_XXH128_testdata[10268] */\n    { 3423, 0x0000000000000000ULL, { 0x5F95506988F7A6E2ULL, 0xFC94FEC0B6744D60ULL } }, /* XSUM_XXH128_testdata[10269] */\n    { 3423, 0x000000009E3779B1ULL, { 0x470D152A69E2F469ULL, 0x19D20D2E82488117ULL } }, /* XSUM_XXH128_testdata[10270] */\n    { 3423, 0x9E3779B185EBCA8DULL, { 0xBCF53EAAA0FAFE5BULL, 0xC7EE9FCD562FDE9DULL } }, /* XSUM_XXH128_testdata[10271] */\n    { 3424, 0x0000000000000000ULL, { 0xB82C4D58447071F6ULL, 0x8364BEFFD2AC3038ULL } }, /* XSUM_XXH128_testdata[10272] */\n    { 3424, 0x000000009E3779B1ULL, { 0xF63140A861AF8C9BULL, 0xC96BCF15DD33758BULL } }, /* XSUM_XXH128_testdata[10273] */\n    { 3424, 0x9E3779B185EBCA8DULL, { 0x53C6A0C80A8CE03AULL, 0x3DD1CC9D84CAD59CULL } }, /* XSUM_XXH128_testdata[10274] */\n    { 3425, 0x0000000000000000ULL, { 0x51EC8660F7BE8073ULL, 0x3F6CDE68D1629951ULL } }, /* XSUM_XXH128_testdata[10275] */\n    { 3425, 0x000000009E3779B1ULL, { 0xBF9B7CFB587A3243ULL, 0xBC8BCAA26A8A67B0ULL } }, /* XSUM_XXH128_testdata[10276] */\n    { 3425, 0x9E3779B185EBCA8DULL, { 0x62287687188CEDD3ULL, 0x08B34B47B7B31FBAULL } }, /* XSUM_XXH128_testdata[10277] */\n    { 3426, 0x0000000000000000ULL, { 0x17CD1C93665A3EEAULL, 0x09FB3F23ED20D41BULL } }, /* XSUM_XXH128_testdata[10278] */\n    { 3426, 0x000000009E3779B1ULL, { 0x0DA1E04279D094CEULL, 0x2ECE0B59B3425A35ULL } }, /* XSUM_XXH128_testdata[10279] */\n    { 3426, 0x9E3779B185EBCA8DULL, { 0x85B611DDF5A748AEULL, 0x7A4F6611C57D876DULL } }, /* XSUM_XXH128_testdata[10280] */\n    { 3427, 0x0000000000000000ULL, { 0x6807CC5D6956C70CULL, 0x8F152806C92B4DC6ULL } }, /* XSUM_XXH128_testdata[10281] */\n    { 3427, 0x000000009E3779B1ULL, { 0xCD5EB90D65C77A8DULL, 0x0460CFB7B309B9ACULL } }, /* XSUM_XXH128_testdata[10282] */\n    { 3427, 0x9E3779B185EBCA8DULL, { 0x3D1F4E12503D6B0EULL, 0x5028762CC8504023ULL } }, /* XSUM_XXH128_testdata[10283] */\n    { 3428, 0x0000000000000000ULL, { 0x49133B7C04546C61ULL, 0x5DB813A9524CA4D3ULL } }, /* XSUM_XXH128_testdata[10284] */\n    { 3428, 0x000000009E3779B1ULL, { 0x383C37D1BEBDBF40ULL, 0x6833B9E07134043BULL } }, /* XSUM_XXH128_testdata[10285] */\n    { 3428, 0x9E3779B185EBCA8DULL, { 0xAAF1A828EC52CB6AULL, 0x1BB21081FF864185ULL } }, /* XSUM_XXH128_testdata[10286] */\n    { 3429, 0x0000000000000000ULL, { 0xEE23B02BF3D00EB6ULL, 0xB5D7F063055B7059ULL } }, /* XSUM_XXH128_testdata[10287] */\n    { 3429, 0x000000009E3779B1ULL, { 0x5BCFCF4883D62874ULL, 0x617731F8EFAC52C7ULL } }, /* XSUM_XXH128_testdata[10288] */\n    { 3429, 0x9E3779B185EBCA8DULL, { 0xC4C9BA35282BF46AULL, 0x1BE5C9FD5EB55CA5ULL } }, /* XSUM_XXH128_testdata[10289] */\n    { 3430, 0x0000000000000000ULL, { 0x5923EB8CFFF27A78ULL, 0xCD6EC9C6798D656AULL } }, /* XSUM_XXH128_testdata[10290] */\n    { 3430, 0x000000009E3779B1ULL, { 0xB2D8A60ED099AA78ULL, 0x40D29D22E3D6040DULL } }, /* XSUM_XXH128_testdata[10291] */\n    { 3430, 0x9E3779B185EBCA8DULL, { 0x8B21E6279C861866ULL, 0x8689D7805570BD4AULL } }, /* XSUM_XXH128_testdata[10292] */\n    { 3431, 0x0000000000000000ULL, { 0x715B9D93A9515421ULL, 0x5025F06AF88B089BULL } }, /* XSUM_XXH128_testdata[10293] */\n    { 3431, 0x000000009E3779B1ULL, { 0x8BEDDF618BBEFFA3ULL, 0xE4ABCE529739A82DULL } }, /* XSUM_XXH128_testdata[10294] */\n    { 3431, 0x9E3779B185EBCA8DULL, { 0x5578E24B67696515ULL, 0xA172BCA03C18F70DULL } }, /* XSUM_XXH128_testdata[10295] */\n    { 3432, 0x0000000000000000ULL, { 0x852C7D23D9C52C61ULL, 0x59E59D5347A2EB05ULL } }, /* XSUM_XXH128_testdata[10296] */\n    { 3432, 0x000000009E3779B1ULL, { 0x3A6CBE07190A005AULL, 0x900F476EDA02D588ULL } }, /* XSUM_XXH128_testdata[10297] */\n    { 3432, 0x9E3779B185EBCA8DULL, { 0xF2860B377932F538ULL, 0x03576654E6A024B9ULL } }, /* XSUM_XXH128_testdata[10298] */\n    { 3433, 0x0000000000000000ULL, { 0x2CACD2411AA01EDFULL, 0xD46290E649FFF836ULL } }, /* XSUM_XXH128_testdata[10299] */\n    { 3433, 0x000000009E3779B1ULL, { 0xA88E18543D822425ULL, 0xA0A05717A1F128D1ULL } }, /* XSUM_XXH128_testdata[10300] */\n    { 3433, 0x9E3779B185EBCA8DULL, { 0x293B3F36962943D9ULL, 0x3F8DEBEF4D605044ULL } }, /* XSUM_XXH128_testdata[10301] */\n    { 3434, 0x0000000000000000ULL, { 0x7C19178BEF5EE94CULL, 0xBE4D5F39D239B2F5ULL } }, /* XSUM_XXH128_testdata[10302] */\n    { 3434, 0x000000009E3779B1ULL, { 0xB6BB2113CC29DDA1ULL, 0xE86A75EB35949913ULL } }, /* XSUM_XXH128_testdata[10303] */\n    { 3434, 0x9E3779B185EBCA8DULL, { 0x20E2E82BB895B8A1ULL, 0x0E13CDFA472708CCULL } }, /* XSUM_XXH128_testdata[10304] */\n    { 3435, 0x0000000000000000ULL, { 0x3F781F8F6FF6355AULL, 0x61BEE9D9A5121655ULL } }, /* XSUM_XXH128_testdata[10305] */\n    { 3435, 0x000000009E3779B1ULL, { 0x37F802B6779C0860ULL, 0x85D57A3E686FB9D4ULL } }, /* XSUM_XXH128_testdata[10306] */\n    { 3435, 0x9E3779B185EBCA8DULL, { 0x2BE5292F21AFAA55ULL, 0x141641AA35BC4731ULL } }, /* XSUM_XXH128_testdata[10307] */\n    { 3436, 0x0000000000000000ULL, { 0x6613D5C175439532ULL, 0x42F877F85EF75856ULL } }, /* XSUM_XXH128_testdata[10308] */\n    { 3436, 0x000000009E3779B1ULL, { 0x869BA9C330BC7DCEULL, 0xFA83FE08A33CA16EULL } }, /* XSUM_XXH128_testdata[10309] */\n    { 3436, 0x9E3779B185EBCA8DULL, { 0x14730479802AE13AULL, 0xDDD6B39224D47856ULL } }, /* XSUM_XXH128_testdata[10310] */\n    { 3437, 0x0000000000000000ULL, { 0xB2F9827610AE5FD8ULL, 0x77257FCB55FDECBCULL } }, /* XSUM_XXH128_testdata[10311] */\n    { 3437, 0x000000009E3779B1ULL, { 0x915370D9379782CCULL, 0x51F7405F22C35094ULL } }, /* XSUM_XXH128_testdata[10312] */\n    { 3437, 0x9E3779B185EBCA8DULL, { 0x9D9D6E47EEF46586ULL, 0x53029B3E01A26E04ULL } }, /* XSUM_XXH128_testdata[10313] */\n    { 3438, 0x0000000000000000ULL, { 0x03608AC79778363EULL, 0x0436694C4BBA62D1ULL } }, /* XSUM_XXH128_testdata[10314] */\n    { 3438, 0x000000009E3779B1ULL, { 0xC5623369768F70D7ULL, 0xAC2E9F7741A9F33CULL } }, /* XSUM_XXH128_testdata[10315] */\n    { 3438, 0x9E3779B185EBCA8DULL, { 0x81CF8D41A65F977EULL, 0x4F43F7004000C8A0ULL } }, /* XSUM_XXH128_testdata[10316] */\n    { 3439, 0x0000000000000000ULL, { 0x90729D66C715DFAFULL, 0x6D02C2F3485AC5ADULL } }, /* XSUM_XXH128_testdata[10317] */\n    { 3439, 0x000000009E3779B1ULL, { 0x64C0C397479B42EDULL, 0x479F30EFE4950DC5ULL } }, /* XSUM_XXH128_testdata[10318] */\n    { 3439, 0x9E3779B185EBCA8DULL, { 0x3B6F4CD6BD92BE88ULL, 0x90D3886D7BECF875ULL } }, /* XSUM_XXH128_testdata[10319] */\n    { 3440, 0x0000000000000000ULL, { 0x323981E33475BF91ULL, 0x7FE51AB97D51073DULL } }, /* XSUM_XXH128_testdata[10320] */\n    { 3440, 0x000000009E3779B1ULL, { 0x6A63A05E7994B6E2ULL, 0x0C6BDF331F6C1BAEULL } }, /* XSUM_XXH128_testdata[10321] */\n    { 3440, 0x9E3779B185EBCA8DULL, { 0x144B191EC86C3643ULL, 0x9079F6904A5493BBULL } }, /* XSUM_XXH128_testdata[10322] */\n    { 3441, 0x0000000000000000ULL, { 0x9A9ACC5955002DFDULL, 0xC2B408E27C58BEE5ULL } }, /* XSUM_XXH128_testdata[10323] */\n    { 3441, 0x000000009E3779B1ULL, { 0xDFF2B1FB99727E5CULL, 0x3AAF9D8510C70762ULL } }, /* XSUM_XXH128_testdata[10324] */\n    { 3441, 0x9E3779B185EBCA8DULL, { 0x021F71FC64158D63ULL, 0xD87D65F9244C1E38ULL } }, /* XSUM_XXH128_testdata[10325] */\n    { 3442, 0x0000000000000000ULL, { 0xDF539EAE3D64E04FULL, 0xF2F82C56EF79B9C5ULL } }, /* XSUM_XXH128_testdata[10326] */\n    { 3442, 0x000000009E3779B1ULL, { 0xB316B19E3A0E815AULL, 0xB73B97D2774CD35BULL } }, /* XSUM_XXH128_testdata[10327] */\n    { 3442, 0x9E3779B185EBCA8DULL, { 0x3BECB796BDA1FD82ULL, 0x46FACF285569978CULL } }, /* XSUM_XXH128_testdata[10328] */\n    { 3443, 0x0000000000000000ULL, { 0x336A96389E5FDFCEULL, 0x4A4CC0018217537DULL } }, /* XSUM_XXH128_testdata[10329] */\n    { 3443, 0x000000009E3779B1ULL, { 0xB0E76044169F6EABULL, 0xE9FAFB0E78106FEEULL } }, /* XSUM_XXH128_testdata[10330] */\n    { 3443, 0x9E3779B185EBCA8DULL, { 0x1192397EC8E8CF2FULL, 0x364F9F623BB0DDE0ULL } }, /* XSUM_XXH128_testdata[10331] */\n    { 3444, 0x0000000000000000ULL, { 0x556F1E7C93E809B7ULL, 0x2655D669E205BCECULL } }, /* XSUM_XXH128_testdata[10332] */\n    { 3444, 0x000000009E3779B1ULL, { 0xB62A913506ED4283ULL, 0xD8B20E6FEBDECE78ULL } }, /* XSUM_XXH128_testdata[10333] */\n    { 3444, 0x9E3779B185EBCA8DULL, { 0x2ED343BD289B4E62ULL, 0x4A04815BE776E029ULL } }, /* XSUM_XXH128_testdata[10334] */\n    { 3445, 0x0000000000000000ULL, { 0x080D6F59003E4FC4ULL, 0x258A30F4ECB033D2ULL } }, /* XSUM_XXH128_testdata[10335] */\n    { 3445, 0x000000009E3779B1ULL, { 0xCB12F5952ADEF24EULL, 0x47290EC212D2AC6DULL } }, /* XSUM_XXH128_testdata[10336] */\n    { 3445, 0x9E3779B185EBCA8DULL, { 0xFDAF46FCD54D5FD1ULL, 0x1B7125B8679EB0B8ULL } }, /* XSUM_XXH128_testdata[10337] */\n    { 3446, 0x0000000000000000ULL, { 0x84A0088DB36E1F64ULL, 0x2359B06ED329B334ULL } }, /* XSUM_XXH128_testdata[10338] */\n    { 3446, 0x000000009E3779B1ULL, { 0xB5E4A4801CA01B1BULL, 0x99E49B8A0D8C17A6ULL } }, /* XSUM_XXH128_testdata[10339] */\n    { 3446, 0x9E3779B185EBCA8DULL, { 0x4F8457DDCA33663DULL, 0x04D7B8AFDDA71444ULL } }, /* XSUM_XXH128_testdata[10340] */\n    { 3447, 0x0000000000000000ULL, { 0xCED536C2D29C87EFULL, 0x2E189E9EA35B0282ULL } }, /* XSUM_XXH128_testdata[10341] */\n    { 3447, 0x000000009E3779B1ULL, { 0xF0FA9E8C618D1451ULL, 0xD50D1EC101D75E2AULL } }, /* XSUM_XXH128_testdata[10342] */\n    { 3447, 0x9E3779B185EBCA8DULL, { 0x83F8E89E2E59F5D8ULL, 0x44F21A82844FA2D5ULL } }, /* XSUM_XXH128_testdata[10343] */\n    { 3448, 0x0000000000000000ULL, { 0x4B040A83B50A8CC0ULL, 0xA44D902ADA411BE0ULL } }, /* XSUM_XXH128_testdata[10344] */\n    { 3448, 0x000000009E3779B1ULL, { 0xD3639D1217DD9527ULL, 0xD9198FD4D69380E0ULL } }, /* XSUM_XXH128_testdata[10345] */\n    { 3448, 0x9E3779B185EBCA8DULL, { 0xAD33E209B12DE98AULL, 0x1F310A3496D31D95ULL } }, /* XSUM_XXH128_testdata[10346] */\n    { 3449, 0x0000000000000000ULL, { 0x742BF7496BB72640ULL, 0x746FBBDC11A020A1ULL } }, /* XSUM_XXH128_testdata[10347] */\n    { 3449, 0x000000009E3779B1ULL, { 0x2124C0389D976820ULL, 0x39A0600FF2732E9DULL } }, /* XSUM_XXH128_testdata[10348] */\n    { 3449, 0x9E3779B185EBCA8DULL, { 0xA763199E64F92DCCULL, 0x4801D68F2F803B60ULL } }, /* XSUM_XXH128_testdata[10349] */\n    { 3450, 0x0000000000000000ULL, { 0xFD63BD7EFEDD98E3ULL, 0xD85F52EF6517065CULL } }, /* XSUM_XXH128_testdata[10350] */\n    { 3450, 0x000000009E3779B1ULL, { 0xBFE03678C33B52CFULL, 0x93D65EC2EBCE7EA8ULL } }, /* XSUM_XXH128_testdata[10351] */\n    { 3450, 0x9E3779B185EBCA8DULL, { 0xA42BEBCE3C653456ULL, 0xF075B9459F3B5B82ULL } }, /* XSUM_XXH128_testdata[10352] */\n    { 3451, 0x0000000000000000ULL, { 0x0538AAB855AF7831ULL, 0x5657C8C2AC7A6A17ULL } }, /* XSUM_XXH128_testdata[10353] */\n    { 3451, 0x000000009E3779B1ULL, { 0xDD0D062EB3F6D144ULL, 0xC081B999E9ECED29ULL } }, /* XSUM_XXH128_testdata[10354] */\n    { 3451, 0x9E3779B185EBCA8DULL, { 0xA973A0AA06A01C7DULL, 0x7F2C542C49385D6CULL } }, /* XSUM_XXH128_testdata[10355] */\n    { 3452, 0x0000000000000000ULL, { 0x4CA97A96065818D5ULL, 0x407C6E24E72B7D5AULL } }, /* XSUM_XXH128_testdata[10356] */\n    { 3452, 0x000000009E3779B1ULL, { 0x9640F8DD72BF4D4AULL, 0x6E709AF08D0FC3F3ULL } }, /* XSUM_XXH128_testdata[10357] */\n    { 3452, 0x9E3779B185EBCA8DULL, { 0x8AA10488C167A8D8ULL, 0xF47AD0B6470A1469ULL } }, /* XSUM_XXH128_testdata[10358] */\n    { 3453, 0x0000000000000000ULL, { 0xFCC4220563AD3B2DULL, 0x9913601AD10A9E76ULL } }, /* XSUM_XXH128_testdata[10359] */\n    { 3453, 0x000000009E3779B1ULL, { 0x509FB157FDC576E9ULL, 0x344897420BFE0E2BULL } }, /* XSUM_XXH128_testdata[10360] */\n    { 3453, 0x9E3779B185EBCA8DULL, { 0xADA3C779BAF99218ULL, 0x1123CAAABA91453BULL } }, /* XSUM_XXH128_testdata[10361] */\n    { 3454, 0x0000000000000000ULL, { 0x2BA0F086D16C658DULL, 0x0709AEE2ECC4E42FULL } }, /* XSUM_XXH128_testdata[10362] */\n    { 3454, 0x000000009E3779B1ULL, { 0xAE32EC06D94D2EF1ULL, 0x038E72C53B1492DAULL } }, /* XSUM_XXH128_testdata[10363] */\n    { 3454, 0x9E3779B185EBCA8DULL, { 0x8D86FA4EDA6D474CULL, 0x48AAABE6EFD0C887ULL } }, /* XSUM_XXH128_testdata[10364] */\n    { 3455, 0x0000000000000000ULL, { 0x5EB5CCCC2C59EA39ULL, 0x4CC0F2EDEC93ED20ULL } }, /* XSUM_XXH128_testdata[10365] */\n    { 3455, 0x000000009E3779B1ULL, { 0x50D9A5C1424823F7ULL, 0x49988519EBB4E56BULL } }, /* XSUM_XXH128_testdata[10366] */\n    { 3455, 0x9E3779B185EBCA8DULL, { 0xF9F51AE372D23DC7ULL, 0x80768BB0F057B7A7ULL } }, /* XSUM_XXH128_testdata[10367] */\n    { 3456, 0x0000000000000000ULL, { 0xE57B9B091D086CFEULL, 0x310AC93B7C835671ULL } }, /* XSUM_XXH128_testdata[10368] */\n    { 3456, 0x000000009E3779B1ULL, { 0x71B9AD10BC14D03BULL, 0x9ADF23012BC9DEFDULL } }, /* XSUM_XXH128_testdata[10369] */\n    { 3456, 0x9E3779B185EBCA8DULL, { 0xD59013D9A35564C3ULL, 0x7DB32E9CD740D2F0ULL } }, /* XSUM_XXH128_testdata[10370] */\n    { 3457, 0x0000000000000000ULL, { 0x7EB941A402BFEDB4ULL, 0x4273E46BFE5668EDULL } }, /* XSUM_XXH128_testdata[10371] */\n    { 3457, 0x000000009E3779B1ULL, { 0x0FC6A79726418973ULL, 0xF7F90260B5F8968AULL } }, /* XSUM_XXH128_testdata[10372] */\n    { 3457, 0x9E3779B185EBCA8DULL, { 0xCEF2BA119E1F2490ULL, 0x4EB2172E10A8B45AULL } }, /* XSUM_XXH128_testdata[10373] */\n    { 3458, 0x0000000000000000ULL, { 0x15A8595F20AB7869ULL, 0x86192FD480A7E7AFULL } }, /* XSUM_XXH128_testdata[10374] */\n    { 3458, 0x000000009E3779B1ULL, { 0x0967B20AF23BC655ULL, 0xE90CEAA121A22DDEULL } }, /* XSUM_XXH128_testdata[10375] */\n    { 3458, 0x9E3779B185EBCA8DULL, { 0x5F570F540BFB5D14ULL, 0x41128796CF0268BDULL } }, /* XSUM_XXH128_testdata[10376] */\n    { 3459, 0x0000000000000000ULL, { 0x2BDB99769C00EF97ULL, 0x5C6B7D6CE4DF0418ULL } }, /* XSUM_XXH128_testdata[10377] */\n    { 3459, 0x000000009E3779B1ULL, { 0xDA5BF93863A2F49CULL, 0xB64F9B179B72822FULL } }, /* XSUM_XXH128_testdata[10378] */\n    { 3459, 0x9E3779B185EBCA8DULL, { 0x1A6C238C35C7AB6AULL, 0x68C666701A2FDB97ULL } }, /* XSUM_XXH128_testdata[10379] */\n    { 3460, 0x0000000000000000ULL, { 0xB13E92D074159621ULL, 0x44D32AC36A408797ULL } }, /* XSUM_XXH128_testdata[10380] */\n    { 3460, 0x000000009E3779B1ULL, { 0xB6D5D0210F02339BULL, 0xD7BF516A9BBF1182ULL } }, /* XSUM_XXH128_testdata[10381] */\n    { 3460, 0x9E3779B185EBCA8DULL, { 0xE12928F662EB9C09ULL, 0x5E8CADFED197B670ULL } }, /* XSUM_XXH128_testdata[10382] */\n    { 3461, 0x0000000000000000ULL, { 0x7AA1893136ECA326ULL, 0x4A028B0A99E7694AULL } }, /* XSUM_XXH128_testdata[10383] */\n    { 3461, 0x000000009E3779B1ULL, { 0x4441B667EF5CDBB0ULL, 0xA37E0A09C41B4B33ULL } }, /* XSUM_XXH128_testdata[10384] */\n    { 3461, 0x9E3779B185EBCA8DULL, { 0x189A347EEE5B44A7ULL, 0xA1E6F17E835F8441ULL } }, /* XSUM_XXH128_testdata[10385] */\n    { 3462, 0x0000000000000000ULL, { 0x444A65AE4ADAA185ULL, 0x25632A64EE16BB15ULL } }, /* XSUM_XXH128_testdata[10386] */\n    { 3462, 0x000000009E3779B1ULL, { 0x33EFD4DBE8CFE3FBULL, 0x994AA8674EBC124FULL } }, /* XSUM_XXH128_testdata[10387] */\n    { 3462, 0x9E3779B185EBCA8DULL, { 0x4D31B5EFA7943093ULL, 0x16BDBA22465B83DEULL } }, /* XSUM_XXH128_testdata[10388] */\n    { 3463, 0x0000000000000000ULL, { 0x743C88E7E0808C6EULL, 0xB85A28FE241E994CULL } }, /* XSUM_XXH128_testdata[10389] */\n    { 3463, 0x000000009E3779B1ULL, { 0x4054964D27AB669FULL, 0x4BAEC490F83F938AULL } }, /* XSUM_XXH128_testdata[10390] */\n    { 3463, 0x9E3779B185EBCA8DULL, { 0x457B3C8C414C7E00ULL, 0x3CCC3738BBCCCBD9ULL } }, /* XSUM_XXH128_testdata[10391] */\n    { 3464, 0x0000000000000000ULL, { 0x766A3D9A086BEEDCULL, 0xAD3DD95E685CD39DULL } }, /* XSUM_XXH128_testdata[10392] */\n    { 3464, 0x000000009E3779B1ULL, { 0x1262D9FB39858594ULL, 0x2AB45614A1BC0C39ULL } }, /* XSUM_XXH128_testdata[10393] */\n    { 3464, 0x9E3779B185EBCA8DULL, { 0xD00BD9334F499621ULL, 0xDA353161447BAF4EULL } }, /* XSUM_XXH128_testdata[10394] */\n    { 3465, 0x0000000000000000ULL, { 0x5A9AF97390F2D336ULL, 0x7C447FD1AC621B1CULL } }, /* XSUM_XXH128_testdata[10395] */\n    { 3465, 0x000000009E3779B1ULL, { 0x32CDBC7938E39758ULL, 0x0FFA6425D2408CACULL } }, /* XSUM_XXH128_testdata[10396] */\n    { 3465, 0x9E3779B185EBCA8DULL, { 0xDD343FDD81C24DECULL, 0x8463663F87A77DFEULL } }, /* XSUM_XXH128_testdata[10397] */\n    { 3466, 0x0000000000000000ULL, { 0x299058CAE275128CULL, 0x385243985149B98AULL } }, /* XSUM_XXH128_testdata[10398] */\n    { 3466, 0x000000009E3779B1ULL, { 0x8F9ECB391879F830ULL, 0x4CE4E63186813A49ULL } }, /* XSUM_XXH128_testdata[10399] */\n    { 3466, 0x9E3779B185EBCA8DULL, { 0x43D2E53F08DFAA8EULL, 0x3995CDC8877BB43EULL } }, /* XSUM_XXH128_testdata[10400] */\n    { 3467, 0x0000000000000000ULL, { 0x8A9B1790BBBBE02EULL, 0x6DD49A1D9F1DB501ULL } }, /* XSUM_XXH128_testdata[10401] */\n    { 3467, 0x000000009E3779B1ULL, { 0x8F69317F3193A5B1ULL, 0xBC10A0D97100D9B2ULL } }, /* XSUM_XXH128_testdata[10402] */\n    { 3467, 0x9E3779B185EBCA8DULL, { 0x850B34730EC56B2AULL, 0x22520D712B951644ULL } }, /* XSUM_XXH128_testdata[10403] */\n    { 3468, 0x0000000000000000ULL, { 0x4A61BD0288C15033ULL, 0x3DCEC5A135E189CDULL } }, /* XSUM_XXH128_testdata[10404] */\n    { 3468, 0x000000009E3779B1ULL, { 0x5C70E9185FA7BC0DULL, 0x53EE657AA0397520ULL } }, /* XSUM_XXH128_testdata[10405] */\n    { 3468, 0x9E3779B185EBCA8DULL, { 0x0F7DB390A1AE23CFULL, 0xAB5F47523ECA22D7ULL } }, /* XSUM_XXH128_testdata[10406] */\n    { 3469, 0x0000000000000000ULL, { 0x3174C25757772AB3ULL, 0x3432821690C309C4ULL } }, /* XSUM_XXH128_testdata[10407] */\n    { 3469, 0x000000009E3779B1ULL, { 0x6E166C4C33C97128ULL, 0x0A63A60E2C751490ULL } }, /* XSUM_XXH128_testdata[10408] */\n    { 3469, 0x9E3779B185EBCA8DULL, { 0x297D151445B94380ULL, 0x744679C9022EE879ULL } }, /* XSUM_XXH128_testdata[10409] */\n    { 3470, 0x0000000000000000ULL, { 0x5B6E6073547F45B6ULL, 0xD09B43BE543F9EB3ULL } }, /* XSUM_XXH128_testdata[10410] */\n    { 3470, 0x000000009E3779B1ULL, { 0xF5BEE47961AE9386ULL, 0xCBC6D481A09A174CULL } }, /* XSUM_XXH128_testdata[10411] */\n    { 3470, 0x9E3779B185EBCA8DULL, { 0x2FA021070D76E41FULL, 0x2546E0C31BC1126FULL } }, /* XSUM_XXH128_testdata[10412] */\n    { 3471, 0x0000000000000000ULL, { 0x9ACF9C0E8A90C860ULL, 0xD1D20263D482205AULL } }, /* XSUM_XXH128_testdata[10413] */\n    { 3471, 0x000000009E3779B1ULL, { 0xA253CC5A28BDFAE1ULL, 0x329255F2954BBE63ULL } }, /* XSUM_XXH128_testdata[10414] */\n    { 3471, 0x9E3779B185EBCA8DULL, { 0x01FF2388F7E6CC3AULL, 0xEFAC6B114FB82E31ULL } }, /* XSUM_XXH128_testdata[10415] */\n    { 3472, 0x0000000000000000ULL, { 0x831D808CCFDCC740ULL, 0x1D6D819DCADF5C04ULL } }, /* XSUM_XXH128_testdata[10416] */\n    { 3472, 0x000000009E3779B1ULL, { 0xD7CDEDF90D33DA32ULL, 0x6C8B45FD8D2AD820ULL } }, /* XSUM_XXH128_testdata[10417] */\n    { 3472, 0x9E3779B185EBCA8DULL, { 0x83D2BCB7E486903CULL, 0x42B12F16EF924459ULL } }, /* XSUM_XXH128_testdata[10418] */\n    { 3473, 0x0000000000000000ULL, { 0xA65DDD73B8B83E3FULL, 0x05B26B58F266F2D2ULL } }, /* XSUM_XXH128_testdata[10419] */\n    { 3473, 0x000000009E3779B1ULL, { 0x77D8BF9A8379C917ULL, 0xD9BC35B60908EC7DULL } }, /* XSUM_XXH128_testdata[10420] */\n    { 3473, 0x9E3779B185EBCA8DULL, { 0xE6E97D4164F67B46ULL, 0xFEC7BA5A1A2EF1CDULL } }, /* XSUM_XXH128_testdata[10421] */\n    { 3474, 0x0000000000000000ULL, { 0xD0289F03FB746F35ULL, 0x5FCBBE1D7334B807ULL } }, /* XSUM_XXH128_testdata[10422] */\n    { 3474, 0x000000009E3779B1ULL, { 0x64DD0552BB592867ULL, 0xABB3E376A2D05270ULL } }, /* XSUM_XXH128_testdata[10423] */\n    { 3474, 0x9E3779B185EBCA8DULL, { 0x4D27362F8B024FDDULL, 0xC54FF5D8A1DD9C1DULL } }, /* XSUM_XXH128_testdata[10424] */\n    { 3475, 0x0000000000000000ULL, { 0xE5CE9E51C78660DAULL, 0x3E29C1A8FFAE96A1ULL } }, /* XSUM_XXH128_testdata[10425] */\n    { 3475, 0x000000009E3779B1ULL, { 0x9DDA53D5A020FE34ULL, 0x4BDBEB45F2E224F6ULL } }, /* XSUM_XXH128_testdata[10426] */\n    { 3475, 0x9E3779B185EBCA8DULL, { 0x6B7F4F6CDA082302ULL, 0x64761ED18A2DC6D6ULL } }, /* XSUM_XXH128_testdata[10427] */\n    { 3476, 0x0000000000000000ULL, { 0xF04176F1CC863F0FULL, 0xC2D165D313F98526ULL } }, /* XSUM_XXH128_testdata[10428] */\n    { 3476, 0x000000009E3779B1ULL, { 0xC4A501502AA41918ULL, 0x154A08AFF1D5089DULL } }, /* XSUM_XXH128_testdata[10429] */\n    { 3476, 0x9E3779B185EBCA8DULL, { 0xE77E97BAB81B8059ULL, 0xF1D2128B2D03BD17ULL } }, /* XSUM_XXH128_testdata[10430] */\n    { 3477, 0x0000000000000000ULL, { 0x9638BDB097A6FA75ULL, 0xCBFB38B5F154B840ULL } }, /* XSUM_XXH128_testdata[10431] */\n    { 3477, 0x000000009E3779B1ULL, { 0xF94FD5851BB3B745ULL, 0xF4253864FC61F946ULL } }, /* XSUM_XXH128_testdata[10432] */\n    { 3477, 0x9E3779B185EBCA8DULL, { 0x7744A44DA3915EE1ULL, 0xDECFAB81A5716402ULL } }, /* XSUM_XXH128_testdata[10433] */\n    { 3478, 0x0000000000000000ULL, { 0xA8D4FBA6FC32EFC1ULL, 0x84543C32B4CC33C4ULL } }, /* XSUM_XXH128_testdata[10434] */\n    { 3478, 0x000000009E3779B1ULL, { 0xF61F23053483C4B4ULL, 0xA3EC2DA9EDD65BA7ULL } }, /* XSUM_XXH128_testdata[10435] */\n    { 3478, 0x9E3779B185EBCA8DULL, { 0xE6F333D64DD1810EULL, 0x44192D95FBCD20AEULL } }, /* XSUM_XXH128_testdata[10436] */\n    { 3479, 0x0000000000000000ULL, { 0x1E94F229081009E8ULL, 0x0B83CC4C3B28795EULL } }, /* XSUM_XXH128_testdata[10437] */\n    { 3479, 0x000000009E3779B1ULL, { 0xBDB8139DCF4ADEE0ULL, 0x5D91132265154A96ULL } }, /* XSUM_XXH128_testdata[10438] */\n    { 3479, 0x9E3779B185EBCA8DULL, { 0xAB72B923B1CDA151ULL, 0x9CE1773AF7AA5CC3ULL } }, /* XSUM_XXH128_testdata[10439] */\n    { 3480, 0x0000000000000000ULL, { 0xE2A83E16DE1CCCE6ULL, 0xAD6EF8CEC74DB429ULL } }, /* XSUM_XXH128_testdata[10440] */\n    { 3480, 0x000000009E3779B1ULL, { 0x261D4AB3063AD696ULL, 0xBBDB0A320AA0B808ULL } }, /* XSUM_XXH128_testdata[10441] */\n    { 3480, 0x9E3779B185EBCA8DULL, { 0x74335749B7ED9BFCULL, 0x7CB54AEBB8C05242ULL } }, /* XSUM_XXH128_testdata[10442] */\n    { 3481, 0x0000000000000000ULL, { 0x1CD87893878D0190ULL, 0x07A8B2DFA76007B7ULL } }, /* XSUM_XXH128_testdata[10443] */\n    { 3481, 0x000000009E3779B1ULL, { 0x43AAC48202BD4A26ULL, 0xDD42A46A059A7071ULL } }, /* XSUM_XXH128_testdata[10444] */\n    { 3481, 0x9E3779B185EBCA8DULL, { 0x60F080CD5DC9A29BULL, 0x31E871B561505E7BULL } }, /* XSUM_XXH128_testdata[10445] */\n    { 3482, 0x0000000000000000ULL, { 0xA24BBA3F25FB6D7CULL, 0x583357477DA07AADULL } }, /* XSUM_XXH128_testdata[10446] */\n    { 3482, 0x000000009E3779B1ULL, { 0x18610E185F086629ULL, 0x17AF0242F841CBDAULL } }, /* XSUM_XXH128_testdata[10447] */\n    { 3482, 0x9E3779B185EBCA8DULL, { 0x4A8B8192A9BB035FULL, 0xC303710ACF6898C2ULL } }, /* XSUM_XXH128_testdata[10448] */\n    { 3483, 0x0000000000000000ULL, { 0x217A994179A6BC5DULL, 0x190FABAA8AC3CBF2ULL } }, /* XSUM_XXH128_testdata[10449] */\n    { 3483, 0x000000009E3779B1ULL, { 0x4FD467B1EA29D666ULL, 0x15284F00B06B1AC4ULL } }, /* XSUM_XXH128_testdata[10450] */\n    { 3483, 0x9E3779B185EBCA8DULL, { 0x6BE650AFD14961D1ULL, 0x75F90265847C24A8ULL } }, /* XSUM_XXH128_testdata[10451] */\n    { 3484, 0x0000000000000000ULL, { 0x68F866F7D427B598ULL, 0xB14DE1C4AA8E469BULL } }, /* XSUM_XXH128_testdata[10452] */\n    { 3484, 0x000000009E3779B1ULL, { 0x2591310F6E577553ULL, 0xD741AB02B9B2D448ULL } }, /* XSUM_XXH128_testdata[10453] */\n    { 3484, 0x9E3779B185EBCA8DULL, { 0x2BEBE4EB94CA4FCEULL, 0xDF960A9B5E39534BULL } }, /* XSUM_XXH128_testdata[10454] */\n    { 3485, 0x0000000000000000ULL, { 0x67FAB96FF6EEF146ULL, 0x5AE84A4182FAA010ULL } }, /* XSUM_XXH128_testdata[10455] */\n    { 3485, 0x000000009E3779B1ULL, { 0xD6C2C9E8C16A73BBULL, 0x266FFAA8263D7149ULL } }, /* XSUM_XXH128_testdata[10456] */\n    { 3485, 0x9E3779B185EBCA8DULL, { 0xBFAF58FA7B05D347ULL, 0x161138F57D77F9C7ULL } }, /* XSUM_XXH128_testdata[10457] */\n    { 3486, 0x0000000000000000ULL, { 0x4616EBD342D399DEULL, 0x89BB4D69D5931D82ULL } }, /* XSUM_XXH128_testdata[10458] */\n    { 3486, 0x000000009E3779B1ULL, { 0xE09DAD0E7D301432ULL, 0xAB37AAF7A09E6FC3ULL } }, /* XSUM_XXH128_testdata[10459] */\n    { 3486, 0x9E3779B185EBCA8DULL, { 0x96FF3FF4EA1AF519ULL, 0x783AA051CB4569B2ULL } }, /* XSUM_XXH128_testdata[10460] */\n    { 3487, 0x0000000000000000ULL, { 0x84B39B619C6CC1A7ULL, 0x2CD2814629EA4970ULL } }, /* XSUM_XXH128_testdata[10461] */\n    { 3487, 0x000000009E3779B1ULL, { 0xA30C4677F15422FCULL, 0x551B03087DEB9E6AULL } }, /* XSUM_XXH128_testdata[10462] */\n    { 3487, 0x9E3779B185EBCA8DULL, { 0xF2DCD7B641C34D59ULL, 0xCF6707656CCD6A48ULL } }, /* XSUM_XXH128_testdata[10463] */\n    { 3488, 0x0000000000000000ULL, { 0xB6EF7257B128E516ULL, 0x83205C3C8BC50278ULL } }, /* XSUM_XXH128_testdata[10464] */\n    { 3488, 0x000000009E3779B1ULL, { 0x41DDDBF70F829815ULL, 0xFDACC9CFE18592B4ULL } }, /* XSUM_XXH128_testdata[10465] */\n    { 3488, 0x9E3779B185EBCA8DULL, { 0xA1E9A1B2B3A6A69DULL, 0xAD21758B7451C4DAULL } }, /* XSUM_XXH128_testdata[10466] */\n    { 3489, 0x0000000000000000ULL, { 0x8950CBBD53A60547ULL, 0x5A30E21AF8A718F3ULL } }, /* XSUM_XXH128_testdata[10467] */\n    { 3489, 0x000000009E3779B1ULL, { 0xE65967ED9B2696F4ULL, 0xCE61204A72565DFFULL } }, /* XSUM_XXH128_testdata[10468] */\n    { 3489, 0x9E3779B185EBCA8DULL, { 0x8074F486A6B47B13ULL, 0x9384C6FA4778233EULL } }, /* XSUM_XXH128_testdata[10469] */\n    { 3490, 0x0000000000000000ULL, { 0x5D5B88EAC0DC140BULL, 0xC7DAEC65D585A55CULL } }, /* XSUM_XXH128_testdata[10470] */\n    { 3490, 0x000000009E3779B1ULL, { 0x95F8B90796203A83ULL, 0x4B918D08C853648CULL } }, /* XSUM_XXH128_testdata[10471] */\n    { 3490, 0x9E3779B185EBCA8DULL, { 0xE66929B48B91CF24ULL, 0x7BFA6E18BB7170B2ULL } }, /* XSUM_XXH128_testdata[10472] */\n    { 3491, 0x0000000000000000ULL, { 0xFC92F8F0AFEBFC33ULL, 0x58D04B3788D15643ULL } }, /* XSUM_XXH128_testdata[10473] */\n    { 3491, 0x000000009E3779B1ULL, { 0xE33B01AE12BDDB63ULL, 0x0201614FE0612CA6ULL } }, /* XSUM_XXH128_testdata[10474] */\n    { 3491, 0x9E3779B185EBCA8DULL, { 0xF34BCB5C3D7D3CC3ULL, 0x00B4C0779770A0A6ULL } }, /* XSUM_XXH128_testdata[10475] */\n    { 3492, 0x0000000000000000ULL, { 0xF0FFCA34C0BF3748ULL, 0x9DF2B22C6FCFA781ULL } }, /* XSUM_XXH128_testdata[10476] */\n    { 3492, 0x000000009E3779B1ULL, { 0x378B03BFAFFF0B56ULL, 0x937F1ED35F432421ULL } }, /* XSUM_XXH128_testdata[10477] */\n    { 3492, 0x9E3779B185EBCA8DULL, { 0xB6639893A4C48798ULL, 0x1251374BE14850F5ULL } }, /* XSUM_XXH128_testdata[10478] */\n    { 3493, 0x0000000000000000ULL, { 0x1C5E70682A017652ULL, 0x4AEF2B8A32F534EEULL } }, /* XSUM_XXH128_testdata[10479] */\n    { 3493, 0x000000009E3779B1ULL, { 0x5A5927FAB7DB37ADULL, 0x94AE59E3019BABD4ULL } }, /* XSUM_XXH128_testdata[10480] */\n    { 3493, 0x9E3779B185EBCA8DULL, { 0x3A40431A3CBA8FF1ULL, 0x12002EBD0C875DE0ULL } }, /* XSUM_XXH128_testdata[10481] */\n    { 3494, 0x0000000000000000ULL, { 0x54D2299A8BE480D9ULL, 0xC3DAB77735EFA8BEULL } }, /* XSUM_XXH128_testdata[10482] */\n    { 3494, 0x000000009E3779B1ULL, { 0x20BA991AA707B930ULL, 0xEEF80FC353700612ULL } }, /* XSUM_XXH128_testdata[10483] */\n    { 3494, 0x9E3779B185EBCA8DULL, { 0xF7182620D32B3A6AULL, 0x7EF9A32A79929D2BULL } }, /* XSUM_XXH128_testdata[10484] */\n    { 3495, 0x0000000000000000ULL, { 0x4A853ABFA346C31BULL, 0x7BAC96BB2C886E10ULL } }, /* XSUM_XXH128_testdata[10485] */\n    { 3495, 0x000000009E3779B1ULL, { 0x6FE42F23A080BC5BULL, 0x9F3B5374BDE2135EULL } }, /* XSUM_XXH128_testdata[10486] */\n    { 3495, 0x9E3779B185EBCA8DULL, { 0x6F5A7ABEB7062D8CULL, 0x437D8F16E1F7BEC4ULL } }, /* XSUM_XXH128_testdata[10487] */\n    { 3496, 0x0000000000000000ULL, { 0x42E32DF7BCAB7B41ULL, 0x15E8EF189C4F0C09ULL } }, /* XSUM_XXH128_testdata[10488] */\n    { 3496, 0x000000009E3779B1ULL, { 0x40C835C6D1B2B662ULL, 0x3B32A6E038B1C100ULL } }, /* XSUM_XXH128_testdata[10489] */\n    { 3496, 0x9E3779B185EBCA8DULL, { 0x64E2A123B21A2BF8ULL, 0x3B0FEDE061985C4EULL } }, /* XSUM_XXH128_testdata[10490] */\n    { 3497, 0x0000000000000000ULL, { 0xE55C51B036F73069ULL, 0x7DCDADB1B2B27031ULL } }, /* XSUM_XXH128_testdata[10491] */\n    { 3497, 0x000000009E3779B1ULL, { 0xCFC4A9F0D28F531DULL, 0x6255BC88A2CE4EA9ULL } }, /* XSUM_XXH128_testdata[10492] */\n    { 3497, 0x9E3779B185EBCA8DULL, { 0xFA13D0C4D3B50397ULL, 0x5D296588E302F8FCULL } }, /* XSUM_XXH128_testdata[10493] */\n    { 3498, 0x0000000000000000ULL, { 0x6A94E0A0CBBC011DULL, 0x244A1EBA1B560C52ULL } }, /* XSUM_XXH128_testdata[10494] */\n    { 3498, 0x000000009E3779B1ULL, { 0x87FFDC9E499D2E41ULL, 0x9211D21F992FC315ULL } }, /* XSUM_XXH128_testdata[10495] */\n    { 3498, 0x9E3779B185EBCA8DULL, { 0xAB916A459F2BA77EULL, 0x3DB770D41E159069ULL } }, /* XSUM_XXH128_testdata[10496] */\n    { 3499, 0x0000000000000000ULL, { 0x8A31780B8FA49271ULL, 0xC98604CA4ABA0505ULL } }, /* XSUM_XXH128_testdata[10497] */\n    { 3499, 0x000000009E3779B1ULL, { 0x37751957ACE5F843ULL, 0x82471A28B4DF26D3ULL } }, /* XSUM_XXH128_testdata[10498] */\n    { 3499, 0x9E3779B185EBCA8DULL, { 0x3248502F7430CCB3ULL, 0x58A55BEC94B816AEULL } }, /* XSUM_XXH128_testdata[10499] */\n    { 3500, 0x0000000000000000ULL, { 0x3F5C20E9C5BC30FCULL, 0xB7A3EC131C816B88ULL } }, /* XSUM_XXH128_testdata[10500] */\n    { 3500, 0x000000009E3779B1ULL, { 0x5FF0D20D96BDD13BULL, 0x2076B2E5C3D9EB10ULL } }, /* XSUM_XXH128_testdata[10501] */\n    { 3500, 0x9E3779B185EBCA8DULL, { 0x52A0B718A327F78EULL, 0x20EDD1304B74BD7FULL } }, /* XSUM_XXH128_testdata[10502] */\n    { 3501, 0x0000000000000000ULL, { 0x0C557138EF665113ULL, 0x1F8470FAC9B07C52ULL } }, /* XSUM_XXH128_testdata[10503] */\n    { 3501, 0x000000009E3779B1ULL, { 0xA8C5CD42C4463AF3ULL, 0xF1E44055A2D8D20BULL } }, /* XSUM_XXH128_testdata[10504] */\n    { 3501, 0x9E3779B185EBCA8DULL, { 0x32EF2B9798DAD279ULL, 0xEBD839C3909AA99BULL } }, /* XSUM_XXH128_testdata[10505] */\n    { 3502, 0x0000000000000000ULL, { 0x11F297CF29906C4DULL, 0xBACFFE67940E6D78ULL } }, /* XSUM_XXH128_testdata[10506] */\n    { 3502, 0x000000009E3779B1ULL, { 0xCDD2FC1218B5B419ULL, 0x40A270916CE07CA5ULL } }, /* XSUM_XXH128_testdata[10507] */\n    { 3502, 0x9E3779B185EBCA8DULL, { 0x62D4F0C4295680C7ULL, 0x0681C6D63F7D6D2BULL } }, /* XSUM_XXH128_testdata[10508] */\n    { 3503, 0x0000000000000000ULL, { 0xEDDDA0CFF6FF3EBDULL, 0x53E532F2B657AAB6ULL } }, /* XSUM_XXH128_testdata[10509] */\n    { 3503, 0x000000009E3779B1ULL, { 0xD4176175188827D6ULL, 0xDBB6E042C0B6B9BCULL } }, /* XSUM_XXH128_testdata[10510] */\n    { 3503, 0x9E3779B185EBCA8DULL, { 0xF9B9B3D472878220ULL, 0x0E5225D63A5DFD64ULL } }, /* XSUM_XXH128_testdata[10511] */\n    { 3504, 0x0000000000000000ULL, { 0x9C6FE29AABCD2FC1ULL, 0xC37B8330C5FC7F7DULL } }, /* XSUM_XXH128_testdata[10512] */\n    { 3504, 0x000000009E3779B1ULL, { 0xAC1F8AB84A316A0FULL, 0xBE4FA20ED667E67DULL } }, /* XSUM_XXH128_testdata[10513] */\n    { 3504, 0x9E3779B185EBCA8DULL, { 0xA0CFFC0B6B3AC754ULL, 0x7D26FDCB83E083D5ULL } }, /* XSUM_XXH128_testdata[10514] */\n    { 3505, 0x0000000000000000ULL, { 0x2990C386E98E500DULL, 0xA36D73984010FB97ULL } }, /* XSUM_XXH128_testdata[10515] */\n    { 3505, 0x000000009E3779B1ULL, { 0x3E5EF204FCB19868ULL, 0x7F2E698915B39839ULL } }, /* XSUM_XXH128_testdata[10516] */\n    { 3505, 0x9E3779B185EBCA8DULL, { 0xB5D0853395C2AE0FULL, 0x09006F745413573AULL } }, /* XSUM_XXH128_testdata[10517] */\n    { 3506, 0x0000000000000000ULL, { 0xFC2DD49ACEC84325ULL, 0xF3EA9A551CD8CA60ULL } }, /* XSUM_XXH128_testdata[10518] */\n    { 3506, 0x000000009E3779B1ULL, { 0x47723D05B2A00630ULL, 0x95760B9EA2AC5A61ULL } }, /* XSUM_XXH128_testdata[10519] */\n    { 3506, 0x9E3779B185EBCA8DULL, { 0x2555D00473A5EC76ULL, 0x91E63B02E7CFE2D3ULL } }, /* XSUM_XXH128_testdata[10520] */\n    { 3507, 0x0000000000000000ULL, { 0x4219204CC3F19E86ULL, 0xED95FF34DD0C34BBULL } }, /* XSUM_XXH128_testdata[10521] */\n    { 3507, 0x000000009E3779B1ULL, { 0x816304B95CDD67C7ULL, 0x76C45ACE3DC312B9ULL } }, /* XSUM_XXH128_testdata[10522] */\n    { 3507, 0x9E3779B185EBCA8DULL, { 0x17301B4AFF1A12B3ULL, 0x9539AC3197A95651ULL } }, /* XSUM_XXH128_testdata[10523] */\n    { 3508, 0x0000000000000000ULL, { 0x531F5129E885FC1FULL, 0x471A28AFFF011EF3ULL } }, /* XSUM_XXH128_testdata[10524] */\n    { 3508, 0x000000009E3779B1ULL, { 0x3135BEC8204C3B55ULL, 0x99211F67350237BEULL } }, /* XSUM_XXH128_testdata[10525] */\n    { 3508, 0x9E3779B185EBCA8DULL, { 0x2D25FD09A8BCF3FCULL, 0x3BA26AD392B08F80ULL } }, /* XSUM_XXH128_testdata[10526] */\n    { 3509, 0x0000000000000000ULL, { 0xE30ED992B37CA5CFULL, 0x7FDB213706A68381ULL } }, /* XSUM_XXH128_testdata[10527] */\n    { 3509, 0x000000009E3779B1ULL, { 0x4CF64AE73E0150BCULL, 0x8D9515078276BA0BULL } }, /* XSUM_XXH128_testdata[10528] */\n    { 3509, 0x9E3779B185EBCA8DULL, { 0xACBF1DAEB4DEB0D1ULL, 0x34D3FBE677B033D3ULL } }, /* XSUM_XXH128_testdata[10529] */\n    { 3510, 0x0000000000000000ULL, { 0xF5C771258932B3F7ULL, 0x8F769A419579BD46ULL } }, /* XSUM_XXH128_testdata[10530] */\n    { 3510, 0x000000009E3779B1ULL, { 0x542A78F649F1FF92ULL, 0x15CD0301A545759FULL } }, /* XSUM_XXH128_testdata[10531] */\n    { 3510, 0x9E3779B185EBCA8DULL, { 0xC6CAC08CDFBF1E5EULL, 0x701D32EDC6863A08ULL } }, /* XSUM_XXH128_testdata[10532] */\n    { 3511, 0x0000000000000000ULL, { 0xCA68DB7B3A40AB67ULL, 0x4265AE1E19D47E0FULL } }, /* XSUM_XXH128_testdata[10533] */\n    { 3511, 0x000000009E3779B1ULL, { 0x322BEF2FD6D7F761ULL, 0x0AAC54716DE33BB1ULL } }, /* XSUM_XXH128_testdata[10534] */\n    { 3511, 0x9E3779B185EBCA8DULL, { 0xE978EA397A49AD49ULL, 0x78CCF7BD5E72F21CULL } }, /* XSUM_XXH128_testdata[10535] */\n    { 3512, 0x0000000000000000ULL, { 0x4BC21D7DBAB3335BULL, 0x3363F49E4E9E7EAEULL } }, /* XSUM_XXH128_testdata[10536] */\n    { 3512, 0x000000009E3779B1ULL, { 0x28EC82EFAABD8DDAULL, 0x2381FF43915233ECULL } }, /* XSUM_XXH128_testdata[10537] */\n    { 3512, 0x9E3779B185EBCA8DULL, { 0x499821766185E65AULL, 0xE7C6C2AA8FC64579ULL } }, /* XSUM_XXH128_testdata[10538] */\n    { 3513, 0x0000000000000000ULL, { 0x3E83E1110CA570D7ULL, 0x1B3649F2714ED7B2ULL } }, /* XSUM_XXH128_testdata[10539] */\n    { 3513, 0x000000009E3779B1ULL, { 0x272C2E0726555F07ULL, 0xB4A21E140CA3F163ULL } }, /* XSUM_XXH128_testdata[10540] */\n    { 3513, 0x9E3779B185EBCA8DULL, { 0x322C23FA880C25E9ULL, 0x5ADA2860B6D93C4AULL } }, /* XSUM_XXH128_testdata[10541] */\n    { 3514, 0x0000000000000000ULL, { 0xD0EFE226CF83E639ULL, 0x5EB9A15D111FF8F6ULL } }, /* XSUM_XXH128_testdata[10542] */\n    { 3514, 0x000000009E3779B1ULL, { 0x4F91D05989621B57ULL, 0x2BEAAAAAE42876CDULL } }, /* XSUM_XXH128_testdata[10543] */\n    { 3514, 0x9E3779B185EBCA8DULL, { 0xE6E965BD126DF290ULL, 0x1BC21E057307D643ULL } }, /* XSUM_XXH128_testdata[10544] */\n    { 3515, 0x0000000000000000ULL, { 0xAD4EE35B65B3E97DULL, 0x1A5BABA2B90A618EULL } }, /* XSUM_XXH128_testdata[10545] */\n    { 3515, 0x000000009E3779B1ULL, { 0x1085109BE043EFECULL, 0x4AACA0D87A70CEECULL } }, /* XSUM_XXH128_testdata[10546] */\n    { 3515, 0x9E3779B185EBCA8DULL, { 0x59C43CEE47577A6FULL, 0x21F4665E2D0B2C05ULL } }, /* XSUM_XXH128_testdata[10547] */\n    { 3516, 0x0000000000000000ULL, { 0x1CD8D79750245445ULL, 0x98C8F7D0CE310666ULL } }, /* XSUM_XXH128_testdata[10548] */\n    { 3516, 0x000000009E3779B1ULL, { 0xDFA66D5552C64590ULL, 0xEC6205FCFF99A155ULL } }, /* XSUM_XXH128_testdata[10549] */\n    { 3516, 0x9E3779B185EBCA8DULL, { 0x106182CF4F44ECACULL, 0xE27635B10B8F2F60ULL } }, /* XSUM_XXH128_testdata[10550] */\n    { 3517, 0x0000000000000000ULL, { 0xF81CDF250458461FULL, 0x3FCD06589660D5FCULL } }, /* XSUM_XXH128_testdata[10551] */\n    { 3517, 0x000000009E3779B1ULL, { 0x4D2ACACBD9017330ULL, 0x1B3C3713FFBBF0EBULL } }, /* XSUM_XXH128_testdata[10552] */\n    { 3517, 0x9E3779B185EBCA8DULL, { 0xCB300D8AFA2B9074ULL, 0x98EC0820CB1E29CCULL } }, /* XSUM_XXH128_testdata[10553] */\n    { 3518, 0x0000000000000000ULL, { 0x00B44D4311B0BDDDULL, 0x77F99FE357132B14ULL } }, /* XSUM_XXH128_testdata[10554] */\n    { 3518, 0x000000009E3779B1ULL, { 0xE5D995AD7C1C414BULL, 0x455DC5A05FC54B85ULL } }, /* XSUM_XXH128_testdata[10555] */\n    { 3518, 0x9E3779B185EBCA8DULL, { 0xED0ECE687F943E96ULL, 0xEC4FBBDC05BFEB65ULL } }, /* XSUM_XXH128_testdata[10556] */\n    { 3519, 0x0000000000000000ULL, { 0xAD6884D76586C425ULL, 0x3D67CBF4536A8251ULL } }, /* XSUM_XXH128_testdata[10557] */\n    { 3519, 0x000000009E3779B1ULL, { 0x1BB0A07921D369CBULL, 0xD39E3BEE3C731D3EULL } }, /* XSUM_XXH128_testdata[10558] */\n    { 3519, 0x9E3779B185EBCA8DULL, { 0x3CCBE7697C09D027ULL, 0x088C298B837FB96CULL } }, /* XSUM_XXH128_testdata[10559] */\n    { 3520, 0x0000000000000000ULL, { 0x4AE72B2CEC0154A4ULL, 0x93474E5D2F10413EULL } }, /* XSUM_XXH128_testdata[10560] */\n    { 3520, 0x000000009E3779B1ULL, { 0xD92EFD6B9921C363ULL, 0x713896FD65D64692ULL } }, /* XSUM_XXH128_testdata[10561] */\n    { 3520, 0x9E3779B185EBCA8DULL, { 0x669A38E31F403AB3ULL, 0xD6D2B73AEF95EF31ULL } }, /* XSUM_XXH128_testdata[10562] */\n    { 3521, 0x0000000000000000ULL, { 0x1C2467C36A4A05FEULL, 0xFCAAE425D3EE764AULL } }, /* XSUM_XXH128_testdata[10563] */\n    { 3521, 0x000000009E3779B1ULL, { 0xA9A2A11E704BFDCDULL, 0x705AC76F5DFD2DC5ULL } }, /* XSUM_XXH128_testdata[10564] */\n    { 3521, 0x9E3779B185EBCA8DULL, { 0x47C14D66AE006FE2ULL, 0x4417D6F287BB1257ULL } }, /* XSUM_XXH128_testdata[10565] */\n    { 3522, 0x0000000000000000ULL, { 0x7D6785D29ABBC1E0ULL, 0xBD18823575EE9DB6ULL } }, /* XSUM_XXH128_testdata[10566] */\n    { 3522, 0x000000009E3779B1ULL, { 0x78DF265187F1B5A1ULL, 0x5760F1FE19AF72ABULL } }, /* XSUM_XXH128_testdata[10567] */\n    { 3522, 0x9E3779B185EBCA8DULL, { 0xAA6ECF8894E63171ULL, 0x86157B59454A1817ULL } }, /* XSUM_XXH128_testdata[10568] */\n    { 3523, 0x0000000000000000ULL, { 0x02DE7A761E2005CAULL, 0x2773059046830A36ULL } }, /* XSUM_XXH128_testdata[10569] */\n    { 3523, 0x000000009E3779B1ULL, { 0xD2D93A348390CB5FULL, 0xE90E32A5ECE6A766ULL } }, /* XSUM_XXH128_testdata[10570] */\n    { 3523, 0x9E3779B185EBCA8DULL, { 0xB9DB1F14D2FEFB7CULL, 0x02AE7D3A36F301E5ULL } }, /* XSUM_XXH128_testdata[10571] */\n    { 3524, 0x0000000000000000ULL, { 0x4F7155D176B1B538ULL, 0x925DA98337217016ULL } }, /* XSUM_XXH128_testdata[10572] */\n    { 3524, 0x000000009E3779B1ULL, { 0x70B1F602461CC218ULL, 0x2308BA2141FE40E7ULL } }, /* XSUM_XXH128_testdata[10573] */\n    { 3524, 0x9E3779B185EBCA8DULL, { 0xB99634196AF64BACULL, 0xF047A8522FE9C118ULL } }, /* XSUM_XXH128_testdata[10574] */\n    { 3525, 0x0000000000000000ULL, { 0x31A4028F7190238CULL, 0xEDB17D675CDB1C54ULL } }, /* XSUM_XXH128_testdata[10575] */\n    { 3525, 0x000000009E3779B1ULL, { 0x151EC930AE9A43C3ULL, 0x81F62E0755632D3DULL } }, /* XSUM_XXH128_testdata[10576] */\n    { 3525, 0x9E3779B185EBCA8DULL, { 0x78D2ADEF9ED92542ULL, 0x454CB8B0702E7B82ULL } }, /* XSUM_XXH128_testdata[10577] */\n    { 3526, 0x0000000000000000ULL, { 0xF57F055E22094776ULL, 0x0F8814251CCD4F25ULL } }, /* XSUM_XXH128_testdata[10578] */\n    { 3526, 0x000000009E3779B1ULL, { 0xEE636BF41BF852E9ULL, 0xFE6C438E0F535F67ULL } }, /* XSUM_XXH128_testdata[10579] */\n    { 3526, 0x9E3779B185EBCA8DULL, { 0x96E7802E11B04294ULL, 0xE62852EE6395D0CFULL } }, /* XSUM_XXH128_testdata[10580] */\n    { 3527, 0x0000000000000000ULL, { 0x273C0105C788A7C5ULL, 0xD9675B5F91DF0C35ULL } }, /* XSUM_XXH128_testdata[10581] */\n    { 3527, 0x000000009E3779B1ULL, { 0x7CA9A812B701DEADULL, 0xE816A1F4230A824EULL } }, /* XSUM_XXH128_testdata[10582] */\n    { 3527, 0x9E3779B185EBCA8DULL, { 0x063F26B879C7FB5DULL, 0xFC4AE08B539F7584ULL } }, /* XSUM_XXH128_testdata[10583] */\n    { 3528, 0x0000000000000000ULL, { 0x788AFF64C26E40DDULL, 0xA64AD2965DF7C1DEULL } }, /* XSUM_XXH128_testdata[10584] */\n    { 3528, 0x000000009E3779B1ULL, { 0x268247DB86DD5266ULL, 0xEDA15D7A1DA7F5D0ULL } }, /* XSUM_XXH128_testdata[10585] */\n    { 3528, 0x9E3779B185EBCA8DULL, { 0xC67BD3AEC2A767BAULL, 0xF9E74E5DA5D2C347ULL } }, /* XSUM_XXH128_testdata[10586] */\n    { 3529, 0x0000000000000000ULL, { 0x9A4C28EC5B274073ULL, 0xE2EF1445946BB598ULL } }, /* XSUM_XXH128_testdata[10587] */\n    { 3529, 0x000000009E3779B1ULL, { 0x92F6FF7E316E8A8FULL, 0x1FA8AE433ED3942DULL } }, /* XSUM_XXH128_testdata[10588] */\n    { 3529, 0x9E3779B185EBCA8DULL, { 0xD10F17D18AF09FC1ULL, 0x5F3011D1F4749033ULL } }, /* XSUM_XXH128_testdata[10589] */\n    { 3530, 0x0000000000000000ULL, { 0x41EAF5870F1FAF02ULL, 0x29C7D8FBA216159AULL } }, /* XSUM_XXH128_testdata[10590] */\n    { 3530, 0x000000009E3779B1ULL, { 0xAA819D98BEDC4749ULL, 0xD5AC8ED4C49F2E09ULL } }, /* XSUM_XXH128_testdata[10591] */\n    { 3530, 0x9E3779B185EBCA8DULL, { 0x492DBEB2FA597712ULL, 0xBA73CAF649CD774DULL } }, /* XSUM_XXH128_testdata[10592] */\n    { 3531, 0x0000000000000000ULL, { 0x060202E0CECDCD82ULL, 0x19A08BE2AC6D63C2ULL } }, /* XSUM_XXH128_testdata[10593] */\n    { 3531, 0x000000009E3779B1ULL, { 0x7B2E27454B5924B8ULL, 0x3E688BAE287BC74DULL } }, /* XSUM_XXH128_testdata[10594] */\n    { 3531, 0x9E3779B185EBCA8DULL, { 0x85530139005E7679ULL, 0x46D0E1C5753F36DAULL } }, /* XSUM_XXH128_testdata[10595] */\n    { 3532, 0x0000000000000000ULL, { 0x670E724A3F1B6F46ULL, 0x565BBBDF0D1C1651ULL } }, /* XSUM_XXH128_testdata[10596] */\n    { 3532, 0x000000009E3779B1ULL, { 0x9976B58CA927AB64ULL, 0x4D8D618418F2E56DULL } }, /* XSUM_XXH128_testdata[10597] */\n    { 3532, 0x9E3779B185EBCA8DULL, { 0x723E3D34E0272BF6ULL, 0xAF1F89C2FDD9331CULL } }, /* XSUM_XXH128_testdata[10598] */\n    { 3533, 0x0000000000000000ULL, { 0xC89223A0DD16699EULL, 0x6DC5C8D285B8E3A2ULL } }, /* XSUM_XXH128_testdata[10599] */\n    { 3533, 0x000000009E3779B1ULL, { 0x4A611F741DFD6384ULL, 0x99ADC5F0CA25FF01ULL } }, /* XSUM_XXH128_testdata[10600] */\n    { 3533, 0x9E3779B185EBCA8DULL, { 0xFF5F9BE615303278ULL, 0x90BB84A324CA531DULL } }, /* XSUM_XXH128_testdata[10601] */\n    { 3534, 0x0000000000000000ULL, { 0x9037DF505832F655ULL, 0x9598EE4289C9D6E9ULL } }, /* XSUM_XXH128_testdata[10602] */\n    { 3534, 0x000000009E3779B1ULL, { 0xFDAAC1AD647D6DCCULL, 0x6A6FB07F85795DADULL } }, /* XSUM_XXH128_testdata[10603] */\n    { 3534, 0x9E3779B185EBCA8DULL, { 0xDFFA2D78C3B80F87ULL, 0x09972FF3C7682359ULL } }, /* XSUM_XXH128_testdata[10604] */\n    { 3535, 0x0000000000000000ULL, { 0x9C8539B53F903384ULL, 0x6A867F80D2F13D14ULL } }, /* XSUM_XXH128_testdata[10605] */\n    { 3535, 0x000000009E3779B1ULL, { 0xAB3D743E9BB3DE72ULL, 0x38AE899CB9D13385ULL } }, /* XSUM_XXH128_testdata[10606] */\n    { 3535, 0x9E3779B185EBCA8DULL, { 0x56CC63E59E9A8784ULL, 0xCE7C57DEFB6DFD9BULL } }, /* XSUM_XXH128_testdata[10607] */\n    { 3536, 0x0000000000000000ULL, { 0xDEBA0228DD563402ULL, 0xEC651E749A1D47DBULL } }, /* XSUM_XXH128_testdata[10608] */\n    { 3536, 0x000000009E3779B1ULL, { 0x2E8F580086DCE8C7ULL, 0x51BC1F94735627E2ULL } }, /* XSUM_XXH128_testdata[10609] */\n    { 3536, 0x9E3779B185EBCA8DULL, { 0x24449B6E45030239ULL, 0x7B3359E26B40F6FAULL } }, /* XSUM_XXH128_testdata[10610] */\n    { 3537, 0x0000000000000000ULL, { 0xB01738BE6C965ED6ULL, 0xBB82FFFAD5B696D2ULL } }, /* XSUM_XXH128_testdata[10611] */\n    { 3537, 0x000000009E3779B1ULL, { 0x77ADFBF6CFC41D01ULL, 0xA63AD2A184F2C875ULL } }, /* XSUM_XXH128_testdata[10612] */\n    { 3537, 0x9E3779B185EBCA8DULL, { 0x908A583B0811DA9BULL, 0xE3A726FB81CACD97ULL } }, /* XSUM_XXH128_testdata[10613] */\n    { 3538, 0x0000000000000000ULL, { 0x4A4750E1AC27E245ULL, 0x738EBCEB1C84650CULL } }, /* XSUM_XXH128_testdata[10614] */\n    { 3538, 0x000000009E3779B1ULL, { 0x49823AFEFBFE061DULL, 0x70398200AB32580BULL } }, /* XSUM_XXH128_testdata[10615] */\n    { 3538, 0x9E3779B185EBCA8DULL, { 0x0965BFFEBDE28B60ULL, 0x5F8471A56A2955CBULL } }, /* XSUM_XXH128_testdata[10616] */\n    { 3539, 0x0000000000000000ULL, { 0x8FF61D5636A8AAA2ULL, 0xE413DAB03CE496C3ULL } }, /* XSUM_XXH128_testdata[10617] */\n    { 3539, 0x000000009E3779B1ULL, { 0xE0E7EE64C0EBF909ULL, 0x76BBD39CAC5ED8E2ULL } }, /* XSUM_XXH128_testdata[10618] */\n    { 3539, 0x9E3779B185EBCA8DULL, { 0x2670E92B26669470ULL, 0x3D50995C3514B5FCULL } }, /* XSUM_XXH128_testdata[10619] */\n    { 3540, 0x0000000000000000ULL, { 0xA4542598B8184DAAULL, 0xC498C650DD5F9ED9ULL } }, /* XSUM_XXH128_testdata[10620] */\n    { 3540, 0x000000009E3779B1ULL, { 0x1E25AF660A2F8DA6ULL, 0x0374CB7229A16225ULL } }, /* XSUM_XXH128_testdata[10621] */\n    { 3540, 0x9E3779B185EBCA8DULL, { 0x75B41EEE8678CEA1ULL, 0x1C834BC8737BD5F3ULL } }, /* XSUM_XXH128_testdata[10622] */\n    { 3541, 0x0000000000000000ULL, { 0x7CCF736EE2195F4DULL, 0xD08F31D76474E63CULL } }, /* XSUM_XXH128_testdata[10623] */\n    { 3541, 0x000000009E3779B1ULL, { 0x6EBE97C4E3792C9AULL, 0xD7A74F248D5E4D4AULL } }, /* XSUM_XXH128_testdata[10624] */\n    { 3541, 0x9E3779B185EBCA8DULL, { 0x2D350B3D5CD557A7ULL, 0xB5763D3D1AF08FEAULL } }, /* XSUM_XXH128_testdata[10625] */\n    { 3542, 0x0000000000000000ULL, { 0x0E1E5960452AA0D4ULL, 0x65797834CDB2ED27ULL } }, /* XSUM_XXH128_testdata[10626] */\n    { 3542, 0x000000009E3779B1ULL, { 0x6A3D67C2864AB7EFULL, 0xC0D027A4B7D6A662ULL } }, /* XSUM_XXH128_testdata[10627] */\n    { 3542, 0x9E3779B185EBCA8DULL, { 0x6D0F8B676827E02CULL, 0x301DC86D18A09E62ULL } }, /* XSUM_XXH128_testdata[10628] */\n    { 3543, 0x0000000000000000ULL, { 0xD3EBE6832A073A89ULL, 0xE1AC8AE3B21B1A26ULL } }, /* XSUM_XXH128_testdata[10629] */\n    { 3543, 0x000000009E3779B1ULL, { 0x02A31006121400E0ULL, 0xFEECA8EF1DF05938ULL } }, /* XSUM_XXH128_testdata[10630] */\n    { 3543, 0x9E3779B185EBCA8DULL, { 0x2222E929AFE2DE90ULL, 0x37111E5885E38E5CULL } }, /* XSUM_XXH128_testdata[10631] */\n    { 3544, 0x0000000000000000ULL, { 0xA23BD60E84E52E11ULL, 0xA002FF7EB3272E1BULL } }, /* XSUM_XXH128_testdata[10632] */\n    { 3544, 0x000000009E3779B1ULL, { 0x4E192E424F770523ULL, 0xD3560128BA80EBE8ULL } }, /* XSUM_XXH128_testdata[10633] */\n    { 3544, 0x9E3779B185EBCA8DULL, { 0x374DD01907BE5B27ULL, 0x4B5E8E87A06EC5B9ULL } }, /* XSUM_XXH128_testdata[10634] */\n    { 3545, 0x0000000000000000ULL, { 0xE77FFA0FBB030992ULL, 0x181FFBC109A01A55ULL } }, /* XSUM_XXH128_testdata[10635] */\n    { 3545, 0x000000009E3779B1ULL, { 0x0000E9625A56B22EULL, 0x8B7646DFCF413DEAULL } }, /* XSUM_XXH128_testdata[10636] */\n    { 3545, 0x9E3779B185EBCA8DULL, { 0xB3928F9C6C2344A7ULL, 0xF67A4319A2FF44A4ULL } }, /* XSUM_XXH128_testdata[10637] */\n    { 3546, 0x0000000000000000ULL, { 0x479CF3EF2877688DULL, 0x0E65ED97956788A0ULL } }, /* XSUM_XXH128_testdata[10638] */\n    { 3546, 0x000000009E3779B1ULL, { 0x21A8ABE16ABE3F5EULL, 0xCCB07832C159AF83ULL } }, /* XSUM_XXH128_testdata[10639] */\n    { 3546, 0x9E3779B185EBCA8DULL, { 0xA74CA629D4DB9ED2ULL, 0x2C10A9446F0334BAULL } }, /* XSUM_XXH128_testdata[10640] */\n    { 3547, 0x0000000000000000ULL, { 0x46A5D4538EEA1B1EULL, 0x193BCCCDD604226DULL } }, /* XSUM_XXH128_testdata[10641] */\n    { 3547, 0x000000009E3779B1ULL, { 0x8AE4123CDA055E63ULL, 0xC51D1A2A99FFF957ULL } }, /* XSUM_XXH128_testdata[10642] */\n    { 3547, 0x9E3779B185EBCA8DULL, { 0x4A54B76E585FB369ULL, 0x482B15A4786EDCF0ULL } }, /* XSUM_XXH128_testdata[10643] */\n    { 3548, 0x0000000000000000ULL, { 0xDFC7639B53F79E1DULL, 0x6A2DE159674093BAULL } }, /* XSUM_XXH128_testdata[10644] */\n    { 3548, 0x000000009E3779B1ULL, { 0x70E16030B3A7848DULL, 0x6019728761A53883ULL } }, /* XSUM_XXH128_testdata[10645] */\n    { 3548, 0x9E3779B185EBCA8DULL, { 0xD7331396B0968C55ULL, 0x0C17A8481E2D12F9ULL } }, /* XSUM_XXH128_testdata[10646] */\n    { 3549, 0x0000000000000000ULL, { 0x3A21E252457E09C2ULL, 0x2B41ACDF8B0C0539ULL } }, /* XSUM_XXH128_testdata[10647] */\n    { 3549, 0x000000009E3779B1ULL, { 0xFD07CA9448EC2CF6ULL, 0x31CE5CD19464F4D3ULL } }, /* XSUM_XXH128_testdata[10648] */\n    { 3549, 0x9E3779B185EBCA8DULL, { 0x8F8A090028F047D4ULL, 0xBCCEC4A770F9BDBEULL } }, /* XSUM_XXH128_testdata[10649] */\n    { 3550, 0x0000000000000000ULL, { 0x5E081111B8168FABULL, 0xC4D5BD7BE609EB8AULL } }, /* XSUM_XXH128_testdata[10650] */\n    { 3550, 0x000000009E3779B1ULL, { 0xDB9A4EE4C39E4DCBULL, 0x28B76DBBDCEB94B2ULL } }, /* XSUM_XXH128_testdata[10651] */\n    { 3550, 0x9E3779B185EBCA8DULL, { 0xD9CF0859AC3F0022ULL, 0xC97F2821B2D1A47AULL } }, /* XSUM_XXH128_testdata[10652] */\n    { 3551, 0x0000000000000000ULL, { 0x04A3ABF712732F54ULL, 0x37E142620B9A86B8ULL } }, /* XSUM_XXH128_testdata[10653] */\n    { 3551, 0x000000009E3779B1ULL, { 0xF1A64E2BD2C5F4D2ULL, 0x1C644381B9BE0ED0ULL } }, /* XSUM_XXH128_testdata[10654] */\n    { 3551, 0x9E3779B185EBCA8DULL, { 0x6962B7DBDB3007BEULL, 0x4BD13E8393949CBBULL } }, /* XSUM_XXH128_testdata[10655] */\n    { 3552, 0x0000000000000000ULL, { 0xD4F34FB029E5E662ULL, 0x94161735EC225FFAULL } }, /* XSUM_XXH128_testdata[10656] */\n    { 3552, 0x000000009E3779B1ULL, { 0x062D7AA7CC69440DULL, 0x01F61BD26C4C891CULL } }, /* XSUM_XXH128_testdata[10657] */\n    { 3552, 0x9E3779B185EBCA8DULL, { 0x2AE713A28FBBF1D8ULL, 0x3C0E5E08AE5C6FE3ULL } }, /* XSUM_XXH128_testdata[10658] */\n    { 3553, 0x0000000000000000ULL, { 0x5E31DE75F1C44D4EULL, 0xF0415669B103CEE6ULL } }, /* XSUM_XXH128_testdata[10659] */\n    { 3553, 0x000000009E3779B1ULL, { 0xF0A91D6499C8B007ULL, 0x69F21CF40364A6EEULL } }, /* XSUM_XXH128_testdata[10660] */\n    { 3553, 0x9E3779B185EBCA8DULL, { 0xB8E299521A9EADB6ULL, 0x2DE8C8D0C69E487BULL } }, /* XSUM_XXH128_testdata[10661] */\n    { 3554, 0x0000000000000000ULL, { 0xDDC496EB0576A021ULL, 0xF94A28D116898E9EULL } }, /* XSUM_XXH128_testdata[10662] */\n    { 3554, 0x000000009E3779B1ULL, { 0x30231FBA405B625EULL, 0x4BFB7DB975F1046DULL } }, /* XSUM_XXH128_testdata[10663] */\n    { 3554, 0x9E3779B185EBCA8DULL, { 0x2B6A8AE7E8273F4AULL, 0xC5EAB007FC8098B9ULL } }, /* XSUM_XXH128_testdata[10664] */\n    { 3555, 0x0000000000000000ULL, { 0x294F75CD1E32C40FULL, 0xA4D69E56948C4424ULL } }, /* XSUM_XXH128_testdata[10665] */\n    { 3555, 0x000000009E3779B1ULL, { 0x92B0EEA509CB453EULL, 0xE867EA12ED4A8F45ULL } }, /* XSUM_XXH128_testdata[10666] */\n    { 3555, 0x9E3779B185EBCA8DULL, { 0x0873DC3E634E1A9DULL, 0x19DDD66B1D0DC197ULL } }, /* XSUM_XXH128_testdata[10667] */\n    { 3556, 0x0000000000000000ULL, { 0xA4237F94D2FD6D01ULL, 0xBF14B0DC007A545BULL } }, /* XSUM_XXH128_testdata[10668] */\n    { 3556, 0x000000009E3779B1ULL, { 0xF4837D90AC3F8386ULL, 0x5DC1E04191541120ULL } }, /* XSUM_XXH128_testdata[10669] */\n    { 3556, 0x9E3779B185EBCA8DULL, { 0x2489A06A4DCF3103ULL, 0x8D6A17A7BD7C380BULL } }, /* XSUM_XXH128_testdata[10670] */\n    { 3557, 0x0000000000000000ULL, { 0x722C2FCF3BE61AE1ULL, 0x9AE049D22B973660ULL } }, /* XSUM_XXH128_testdata[10671] */\n    { 3557, 0x000000009E3779B1ULL, { 0x29C90ACB9B354794ULL, 0x6F24CDC5EBACAEF4ULL } }, /* XSUM_XXH128_testdata[10672] */\n    { 3557, 0x9E3779B185EBCA8DULL, { 0x3C17B01F08ACA576ULL, 0x9576B78932C75033ULL } }, /* XSUM_XXH128_testdata[10673] */\n    { 3558, 0x0000000000000000ULL, { 0x274F1DF2D2FD2D09ULL, 0x6CE3AD5CB1AD04E0ULL } }, /* XSUM_XXH128_testdata[10674] */\n    { 3558, 0x000000009E3779B1ULL, { 0x76C79DAF277161E4ULL, 0xE441905521FAE0C5ULL } }, /* XSUM_XXH128_testdata[10675] */\n    { 3558, 0x9E3779B185EBCA8DULL, { 0x0BF25086DFE92169ULL, 0xCAE82AB6E898D86DULL } }, /* XSUM_XXH128_testdata[10676] */\n    { 3559, 0x0000000000000000ULL, { 0x4E4E18771F4919FAULL, 0x47F023F51F40766EULL } }, /* XSUM_XXH128_testdata[10677] */\n    { 3559, 0x000000009E3779B1ULL, { 0x94A447A4DD986CE4ULL, 0xA7521E1790E629A2ULL } }, /* XSUM_XXH128_testdata[10678] */\n    { 3559, 0x9E3779B185EBCA8DULL, { 0xA07A5686E36F9F0BULL, 0x054E97ECFB802847ULL } }, /* XSUM_XXH128_testdata[10679] */\n    { 3560, 0x0000000000000000ULL, { 0xA9A7CEA7CC0D573DULL, 0x71AF85E280EC1437ULL } }, /* XSUM_XXH128_testdata[10680] */\n    { 3560, 0x000000009E3779B1ULL, { 0xA2BC5B044D7DEBC1ULL, 0x5CA7252B465860EEULL } }, /* XSUM_XXH128_testdata[10681] */\n    { 3560, 0x9E3779B185EBCA8DULL, { 0xAE3432EED2CEBD1FULL, 0xEDB1DC1530FD6EBAULL } }, /* XSUM_XXH128_testdata[10682] */\n    { 3561, 0x0000000000000000ULL, { 0x1487A53D57713BF5ULL, 0x90FA3D54701FDCA6ULL } }, /* XSUM_XXH128_testdata[10683] */\n    { 3561, 0x000000009E3779B1ULL, { 0xF9C1D14EC582EEE2ULL, 0xC173C436DA7794CAULL } }, /* XSUM_XXH128_testdata[10684] */\n    { 3561, 0x9E3779B185EBCA8DULL, { 0x833DD631DC8E3D62ULL, 0x8D788DB1E04639E9ULL } }, /* XSUM_XXH128_testdata[10685] */\n    { 3562, 0x0000000000000000ULL, { 0x8B3F554DFB49918FULL, 0x482F0EC9EE9C63C4ULL } }, /* XSUM_XXH128_testdata[10686] */\n    { 3562, 0x000000009E3779B1ULL, { 0x159E4A9189B4C13BULL, 0x6BBF771E2C092A9FULL } }, /* XSUM_XXH128_testdata[10687] */\n    { 3562, 0x9E3779B185EBCA8DULL, { 0x455250994E286120ULL, 0xCC816A22837D9FD8ULL } }, /* XSUM_XXH128_testdata[10688] */\n    { 3563, 0x0000000000000000ULL, { 0x42B18C25D75724DDULL, 0xD9B2FE3D50C9B27AULL } }, /* XSUM_XXH128_testdata[10689] */\n    { 3563, 0x000000009E3779B1ULL, { 0x3E9DE732B35D697FULL, 0xF0C5910F4CE07ED7ULL } }, /* XSUM_XXH128_testdata[10690] */\n    { 3563, 0x9E3779B185EBCA8DULL, { 0xF4B14B16682AEE35ULL, 0x92EA87904A331655ULL } }, /* XSUM_XXH128_testdata[10691] */\n    { 3564, 0x0000000000000000ULL, { 0xC45207103DFE5459ULL, 0xDF66DACA2CCE4866ULL } }, /* XSUM_XXH128_testdata[10692] */\n    { 3564, 0x000000009E3779B1ULL, { 0x1F015159675C9669ULL, 0x6378D2F58EAD5336ULL } }, /* XSUM_XXH128_testdata[10693] */\n    { 3564, 0x9E3779B185EBCA8DULL, { 0x268660893C6BE3FFULL, 0xD1FBB2B1D5DE1834ULL } }, /* XSUM_XXH128_testdata[10694] */\n    { 3565, 0x0000000000000000ULL, { 0x7EA7440DA5DE1034ULL, 0x49D45941AE5ACD9CULL } }, /* XSUM_XXH128_testdata[10695] */\n    { 3565, 0x000000009E3779B1ULL, { 0x1A12E9A9D3BC71F5ULL, 0x4C0434A6626715A6ULL } }, /* XSUM_XXH128_testdata[10696] */\n    { 3565, 0x9E3779B185EBCA8DULL, { 0xEB34A9D3E86EC4E3ULL, 0x84E881BF18F607FEULL } }, /* XSUM_XXH128_testdata[10697] */\n    { 3566, 0x0000000000000000ULL, { 0x2554A811CA1AC6B2ULL, 0xDFCF1E894E038E51ULL } }, /* XSUM_XXH128_testdata[10698] */\n    { 3566, 0x000000009E3779B1ULL, { 0x92699E8F456E3625ULL, 0xC711CD0C3546AE77ULL } }, /* XSUM_XXH128_testdata[10699] */\n    { 3566, 0x9E3779B185EBCA8DULL, { 0x78A675E3834817A9ULL, 0x46ABF73E30759829ULL } }, /* XSUM_XXH128_testdata[10700] */\n    { 3567, 0x0000000000000000ULL, { 0x6CB83092A773C943ULL, 0xE44B97AD13139EECULL } }, /* XSUM_XXH128_testdata[10701] */\n    { 3567, 0x000000009E3779B1ULL, { 0x91D964E5FFC1A4B1ULL, 0x707D0C88675531A0ULL } }, /* XSUM_XXH128_testdata[10702] */\n    { 3567, 0x9E3779B185EBCA8DULL, { 0x892F392819A08B3FULL, 0xE157765B2C8DEB7FULL } }, /* XSUM_XXH128_testdata[10703] */\n    { 3568, 0x0000000000000000ULL, { 0xAFB74CB13F672C01ULL, 0x449C94E63A936159ULL } }, /* XSUM_XXH128_testdata[10704] */\n    { 3568, 0x000000009E3779B1ULL, { 0xEB6D87E536D84B30ULL, 0x62FA3412FBB0D787ULL } }, /* XSUM_XXH128_testdata[10705] */\n    { 3568, 0x9E3779B185EBCA8DULL, { 0x6EBA646E3A553F11ULL, 0x3120CA8A3EF425E0ULL } }, /* XSUM_XXH128_testdata[10706] */\n    { 3569, 0x0000000000000000ULL, { 0x32EDCFEE170F5043ULL, 0x5BA2FA914E0F5BD9ULL } }, /* XSUM_XXH128_testdata[10707] */\n    { 3569, 0x000000009E3779B1ULL, { 0xFEFF472BBA807BDEULL, 0x6A46657C57B0AF34ULL } }, /* XSUM_XXH128_testdata[10708] */\n    { 3569, 0x9E3779B185EBCA8DULL, { 0x6505C4F15EAF3A39ULL, 0x1EFB0D53FDA07734ULL } }, /* XSUM_XXH128_testdata[10709] */\n    { 3570, 0x0000000000000000ULL, { 0x79E2D6B25304F053ULL, 0xED109A0121528E04ULL } }, /* XSUM_XXH128_testdata[10710] */\n    { 3570, 0x000000009E3779B1ULL, { 0xD09F3335019EB016ULL, 0x07FC6D1C9FBA07F0ULL } }, /* XSUM_XXH128_testdata[10711] */\n    { 3570, 0x9E3779B185EBCA8DULL, { 0xF6F4D30AFDC033D3ULL, 0x26762B8FFDF2D86AULL } }, /* XSUM_XXH128_testdata[10712] */\n    { 3571, 0x0000000000000000ULL, { 0x2B1456214F2109C3ULL, 0xE532483D3D01657DULL } }, /* XSUM_XXH128_testdata[10713] */\n    { 3571, 0x000000009E3779B1ULL, { 0x19C75D862E12518EULL, 0x2BA97CB97D965CC8ULL } }, /* XSUM_XXH128_testdata[10714] */\n    { 3571, 0x9E3779B185EBCA8DULL, { 0xF251B8C586DD62E3ULL, 0x100E10DE5547B870ULL } }, /* XSUM_XXH128_testdata[10715] */\n    { 3572, 0x0000000000000000ULL, { 0x0AAB88F1CB058429ULL, 0x86CC82B74F352D08ULL } }, /* XSUM_XXH128_testdata[10716] */\n    { 3572, 0x000000009E3779B1ULL, { 0xD2B8FFC9212869F4ULL, 0xA09001EEDBE2A45CULL } }, /* XSUM_XXH128_testdata[10717] */\n    { 3572, 0x9E3779B185EBCA8DULL, { 0xCEB65F6ED58BB8DDULL, 0xFD17A83C50E7ECD4ULL } }, /* XSUM_XXH128_testdata[10718] */\n    { 3573, 0x0000000000000000ULL, { 0x006B7E62560ED657ULL, 0x30F8459F158229AEULL } }, /* XSUM_XXH128_testdata[10719] */\n    { 3573, 0x000000009E3779B1ULL, { 0x006F43FB2CE9C183ULL, 0xCD1604DFCAC6C7E0ULL } }, /* XSUM_XXH128_testdata[10720] */\n    { 3573, 0x9E3779B185EBCA8DULL, { 0x166BFA47B059BA61ULL, 0x6174378B469DD3F0ULL } }, /* XSUM_XXH128_testdata[10721] */\n    { 3574, 0x0000000000000000ULL, { 0xC3E729B2EE5CBBE9ULL, 0x4E0B54E0DF4CC4BDULL } }, /* XSUM_XXH128_testdata[10722] */\n    { 3574, 0x000000009E3779B1ULL, { 0x9706C943231CB7DAULL, 0x9D245890442E95AEULL } }, /* XSUM_XXH128_testdata[10723] */\n    { 3574, 0x9E3779B185EBCA8DULL, { 0x4AC6E31B52DC128DULL, 0xA8EF451204645CA1ULL } }, /* XSUM_XXH128_testdata[10724] */\n    { 3575, 0x0000000000000000ULL, { 0xB07AD514C9CF88D9ULL, 0x63357ED3223F12B5ULL } }, /* XSUM_XXH128_testdata[10725] */\n    { 3575, 0x000000009E3779B1ULL, { 0xDC4B36F3D0E3028AULL, 0xCBCB8162E090BBC2ULL } }, /* XSUM_XXH128_testdata[10726] */\n    { 3575, 0x9E3779B185EBCA8DULL, { 0xDB53F9E7492CE18FULL, 0x86CF9CF8F25D9349ULL } }, /* XSUM_XXH128_testdata[10727] */\n    { 3576, 0x0000000000000000ULL, { 0x31DE82458FD07128ULL, 0xF440B93D7A254D39ULL } }, /* XSUM_XXH128_testdata[10728] */\n    { 3576, 0x000000009E3779B1ULL, { 0x6D8884E1BC6ADAFFULL, 0x07148B9C5195FF16ULL } }, /* XSUM_XXH128_testdata[10729] */\n    { 3576, 0x9E3779B185EBCA8DULL, { 0x1341859CD2A40C80ULL, 0xBC779DD1995A7442ULL } }, /* XSUM_XXH128_testdata[10730] */\n    { 3577, 0x0000000000000000ULL, { 0xF82B20916E6E9457ULL, 0xE2D907671F3310FEULL } }, /* XSUM_XXH128_testdata[10731] */\n    { 3577, 0x000000009E3779B1ULL, { 0x920659A071A339D5ULL, 0x2F8A87937A438F1DULL } }, /* XSUM_XXH128_testdata[10732] */\n    { 3577, 0x9E3779B185EBCA8DULL, { 0xF9E394EEC271A1C8ULL, 0xCB21784A6A656BAEULL } }, /* XSUM_XXH128_testdata[10733] */\n    { 3578, 0x0000000000000000ULL, { 0x9FB57A5DAAD860FFULL, 0x6683197992C6E9EEULL } }, /* XSUM_XXH128_testdata[10734] */\n    { 3578, 0x000000009E3779B1ULL, { 0x19150CA24DE94881ULL, 0x12AD314C8DA1DCDCULL } }, /* XSUM_XXH128_testdata[10735] */\n    { 3578, 0x9E3779B185EBCA8DULL, { 0xD7CC947000BA8D58ULL, 0xDF26E73DAD1400A4ULL } }, /* XSUM_XXH128_testdata[10736] */\n    { 3579, 0x0000000000000000ULL, { 0x25ABC08107A016BAULL, 0xC82BA9A23003D151ULL } }, /* XSUM_XXH128_testdata[10737] */\n    { 3579, 0x000000009E3779B1ULL, { 0x81646D24A8E3A392ULL, 0xA364F53E05A67417ULL } }, /* XSUM_XXH128_testdata[10738] */\n    { 3579, 0x9E3779B185EBCA8DULL, { 0x125F0504A2BA0106ULL, 0x02B3E4CC02DDDDD3ULL } }, /* XSUM_XXH128_testdata[10739] */\n    { 3580, 0x0000000000000000ULL, { 0x34EA64F41B8E6927ULL, 0x9A88119D723052ADULL } }, /* XSUM_XXH128_testdata[10740] */\n    { 3580, 0x000000009E3779B1ULL, { 0xD51D7929745C573BULL, 0x2419D9D2214DCACDULL } }, /* XSUM_XXH128_testdata[10741] */\n    { 3580, 0x9E3779B185EBCA8DULL, { 0xAE4C173EE0108EFFULL, 0x46D4018A664C6EDDULL } }, /* XSUM_XXH128_testdata[10742] */\n    { 3581, 0x0000000000000000ULL, { 0x201F2EF77AB96730ULL, 0xAA715E83EB5A0E02ULL } }, /* XSUM_XXH128_testdata[10743] */\n    { 3581, 0x000000009E3779B1ULL, { 0xD7B16365CE2657B3ULL, 0x3076DD9472F48846ULL } }, /* XSUM_XXH128_testdata[10744] */\n    { 3581, 0x9E3779B185EBCA8DULL, { 0x425ED79ADBC7D660ULL, 0xB2849BEAFB0FAF6AULL } }, /* XSUM_XXH128_testdata[10745] */\n    { 3582, 0x0000000000000000ULL, { 0x322C6A43F77EFFEFULL, 0xB2A7B6C143E4B606ULL } }, /* XSUM_XXH128_testdata[10746] */\n    { 3582, 0x000000009E3779B1ULL, { 0x5434E2C7C1BFD2D1ULL, 0x588E4B78B64F22E7ULL } }, /* XSUM_XXH128_testdata[10747] */\n    { 3582, 0x9E3779B185EBCA8DULL, { 0x1FFB384D89EA209BULL, 0x234CBD980ABBBE76ULL } }, /* XSUM_XXH128_testdata[10748] */\n    { 3583, 0x0000000000000000ULL, { 0xE86866EA3CC2CC43ULL, 0xB7E0C1B92B9CC2A0ULL } }, /* XSUM_XXH128_testdata[10749] */\n    { 3583, 0x000000009E3779B1ULL, { 0x5FEA40427DBB8F19ULL, 0x95E1C7A05599DC47ULL } }, /* XSUM_XXH128_testdata[10750] */\n    { 3583, 0x9E3779B185EBCA8DULL, { 0x9B29185982068C91ULL, 0x9847ACA6874F4A0AULL } }, /* XSUM_XXH128_testdata[10751] */\n    { 3584, 0x0000000000000000ULL, { 0x2AF9EAD626D25D94ULL, 0x9932645325765B2FULL } }, /* XSUM_XXH128_testdata[10752] */\n    { 3584, 0x000000009E3779B1ULL, { 0x656A238617736356ULL, 0x1D909B192E431DDCULL } }, /* XSUM_XXH128_testdata[10753] */\n    { 3584, 0x9E3779B185EBCA8DULL, { 0xB6FC9C8B10AAB2CFULL, 0x6077CD42706F8EB3ULL } }, /* XSUM_XXH128_testdata[10754] */\n    { 3585, 0x0000000000000000ULL, { 0xF0D334FE274B6A91ULL, 0xED30D29722166379ULL } }, /* XSUM_XXH128_testdata[10755] */\n    { 3585, 0x000000009E3779B1ULL, { 0x8DE0461C5D6D5CC5ULL, 0x35A6AE520CD009E5ULL } }, /* XSUM_XXH128_testdata[10756] */\n    { 3585, 0x9E3779B185EBCA8DULL, { 0xFD4786CE9F6DFC03ULL, 0x73E3EC4DA2126EE8ULL } }, /* XSUM_XXH128_testdata[10757] */\n    { 3586, 0x0000000000000000ULL, { 0xB8DB9C3D608FDC8AULL, 0xE570DB07A0E2AE53ULL } }, /* XSUM_XXH128_testdata[10758] */\n    { 3586, 0x000000009E3779B1ULL, { 0xC9C1D3DD05F9DD2FULL, 0x12720801CA5CFBA9ULL } }, /* XSUM_XXH128_testdata[10759] */\n    { 3586, 0x9E3779B185EBCA8DULL, { 0x4171818A418960B0ULL, 0xC1BE72C1E9844F75ULL } }, /* XSUM_XXH128_testdata[10760] */\n    { 3587, 0x0000000000000000ULL, { 0xCECD706FDDFEA151ULL, 0x1069678970B7C3D4ULL } }, /* XSUM_XXH128_testdata[10761] */\n    { 3587, 0x000000009E3779B1ULL, { 0x3E0B70258AFE40B3ULL, 0xC54E7C72B9CE1E94ULL } }, /* XSUM_XXH128_testdata[10762] */\n    { 3587, 0x9E3779B185EBCA8DULL, { 0x3BD04E90AB23DF55ULL, 0x8393FDA422A5332DULL } }, /* XSUM_XXH128_testdata[10763] */\n    { 3588, 0x0000000000000000ULL, { 0x86485AE18E893682ULL, 0x0E47EC98D07157A6ULL } }, /* XSUM_XXH128_testdata[10764] */\n    { 3588, 0x000000009E3779B1ULL, { 0x9D870095D9693221ULL, 0xD2D39552B7FEA00DULL } }, /* XSUM_XXH128_testdata[10765] */\n    { 3588, 0x9E3779B185EBCA8DULL, { 0xB7F96EF6F2CD907FULL, 0xF1CD7A8B66E58EFCULL } }, /* XSUM_XXH128_testdata[10766] */\n    { 3589, 0x0000000000000000ULL, { 0xF798C9AAC4FFC627ULL, 0xE5A3062CC2974E47ULL } }, /* XSUM_XXH128_testdata[10767] */\n    { 3589, 0x000000009E3779B1ULL, { 0x8BA690C79668DD72ULL, 0x62977A584DF649A8ULL } }, /* XSUM_XXH128_testdata[10768] */\n    { 3589, 0x9E3779B185EBCA8DULL, { 0x78983FD6CBFB1601ULL, 0xB3AA27961C2C4FEFULL } }, /* XSUM_XXH128_testdata[10769] */\n    { 3590, 0x0000000000000000ULL, { 0xA141AA3FE418801FULL, 0x4C3A599C51470F5BULL } }, /* XSUM_XXH128_testdata[10770] */\n    { 3590, 0x000000009E3779B1ULL, { 0x4FCE6ED581E3AB2EULL, 0x0BA053427CEC2680ULL } }, /* XSUM_XXH128_testdata[10771] */\n    { 3590, 0x9E3779B185EBCA8DULL, { 0xB15EF590F1E955C8ULL, 0x3826DA92054F07F9ULL } }, /* XSUM_XXH128_testdata[10772] */\n    { 3591, 0x0000000000000000ULL, { 0xA9DF21A4D35BB610ULL, 0x6AC72927C170C5C3ULL } }, /* XSUM_XXH128_testdata[10773] */\n    { 3591, 0x000000009E3779B1ULL, { 0xB82D712CAA7E7963ULL, 0x09B3950334ED87F6ULL } }, /* XSUM_XXH128_testdata[10774] */\n    { 3591, 0x9E3779B185EBCA8DULL, { 0x563A23C9417E8CB4ULL, 0xD59FC107B8F7F1A6ULL } }, /* XSUM_XXH128_testdata[10775] */\n    { 3592, 0x0000000000000000ULL, { 0xC3FBFE7A73562CBCULL, 0xCB59A34745C8AB15ULL } }, /* XSUM_XXH128_testdata[10776] */\n    { 3592, 0x000000009E3779B1ULL, { 0x5A3EF525876F0CD7ULL, 0x6B50689598A673B4ULL } }, /* XSUM_XXH128_testdata[10777] */\n    { 3592, 0x9E3779B185EBCA8DULL, { 0xDEEA695CDD3BFB9FULL, 0x4B66D2390B2A6DFDULL } }, /* XSUM_XXH128_testdata[10778] */\n    { 3593, 0x0000000000000000ULL, { 0xD29E95DE693E9014ULL, 0x29DF3C34B3BFE86EULL } }, /* XSUM_XXH128_testdata[10779] */\n    { 3593, 0x000000009E3779B1ULL, { 0xCF2EF4C1C4144CC9ULL, 0xBA4B46AC91E40864ULL } }, /* XSUM_XXH128_testdata[10780] */\n    { 3593, 0x9E3779B185EBCA8DULL, { 0xC56E25C9764CC202ULL, 0x698F52B6C9D539B0ULL } }, /* XSUM_XXH128_testdata[10781] */\n    { 3594, 0x0000000000000000ULL, { 0x6C1E228FED5BECC8ULL, 0x1ECBC79FC22BD74CULL } }, /* XSUM_XXH128_testdata[10782] */\n    { 3594, 0x000000009E3779B1ULL, { 0x0DC1C3059988E432ULL, 0x979C4DDFBFBC2BFFULL } }, /* XSUM_XXH128_testdata[10783] */\n    { 3594, 0x9E3779B185EBCA8DULL, { 0xAE44EE3A0B3E8AB0ULL, 0x4ECCC469FCA632E5ULL } }, /* XSUM_XXH128_testdata[10784] */\n    { 3595, 0x0000000000000000ULL, { 0xE935CC0325A6067FULL, 0xF0FB9E56BAA3209EULL } }, /* XSUM_XXH128_testdata[10785] */\n    { 3595, 0x000000009E3779B1ULL, { 0xF99A9C13E17308E2ULL, 0xB61CDC808B009788ULL } }, /* XSUM_XXH128_testdata[10786] */\n    { 3595, 0x9E3779B185EBCA8DULL, { 0xD0A65CB862DEB411ULL, 0x397AD417BDF6EBB4ULL } }, /* XSUM_XXH128_testdata[10787] */\n    { 3596, 0x0000000000000000ULL, { 0x98F22C7F63866CCFULL, 0xA3EFDE908F7BF481ULL } }, /* XSUM_XXH128_testdata[10788] */\n    { 3596, 0x000000009E3779B1ULL, { 0x68E6E0BA9D27CA19ULL, 0x6E461F7194B3EA4CULL } }, /* XSUM_XXH128_testdata[10789] */\n    { 3596, 0x9E3779B185EBCA8DULL, { 0xCB9A83003440D127ULL, 0x4DD7A45A66A00846ULL } }, /* XSUM_XXH128_testdata[10790] */\n    { 3597, 0x0000000000000000ULL, { 0xC61982D4F98F6AD5ULL, 0xB310032F3EEECDE5ULL } }, /* XSUM_XXH128_testdata[10791] */\n    { 3597, 0x000000009E3779B1ULL, { 0x85E8A4E9FED33255ULL, 0x3F8940F800634EDBULL } }, /* XSUM_XXH128_testdata[10792] */\n    { 3597, 0x9E3779B185EBCA8DULL, { 0x71D6BCB2F4EFFE6BULL, 0x773FFF59172C40D6ULL } }, /* XSUM_XXH128_testdata[10793] */\n    { 3598, 0x0000000000000000ULL, { 0x1F7BCE3664E5902FULL, 0xED9F5CAC450EB810ULL } }, /* XSUM_XXH128_testdata[10794] */\n    { 3598, 0x000000009E3779B1ULL, { 0x39996D7FCF527F4AULL, 0x007A3D2BB3359894ULL } }, /* XSUM_XXH128_testdata[10795] */\n    { 3598, 0x9E3779B185EBCA8DULL, { 0x48749CF945445E65ULL, 0x78724070E48749D8ULL } }, /* XSUM_XXH128_testdata[10796] */\n    { 3599, 0x0000000000000000ULL, { 0x6E855514404372F2ULL, 0x233A64BABC3F2747ULL } }, /* XSUM_XXH128_testdata[10797] */\n    { 3599, 0x000000009E3779B1ULL, { 0x681E676D9154B488ULL, 0x1BE614EF165BC0D6ULL } }, /* XSUM_XXH128_testdata[10798] */\n    { 3599, 0x9E3779B185EBCA8DULL, { 0xE34FA316A98BE161ULL, 0x598544243D6E05AFULL } }, /* XSUM_XXH128_testdata[10799] */\n    { 3600, 0x0000000000000000ULL, { 0xEC24DBD259A92CF9ULL, 0x91A4625DBC3EC228ULL } }, /* XSUM_XXH128_testdata[10800] */\n    { 3600, 0x000000009E3779B1ULL, { 0x5979E555AFBDEC7FULL, 0xFE4F42EFF44DF75EULL } }, /* XSUM_XXH128_testdata[10801] */\n    { 3600, 0x9E3779B185EBCA8DULL, { 0x8964C0ED9681AB0BULL, 0xFC986BC78FD3643AULL } }, /* XSUM_XXH128_testdata[10802] */\n    { 3601, 0x0000000000000000ULL, { 0x0C80A31650CED06BULL, 0x6F9B1D6135C75AEAULL } }, /* XSUM_XXH128_testdata[10803] */\n    { 3601, 0x000000009E3779B1ULL, { 0x683D7923648C2DB8ULL, 0xDCE638A5673E0698ULL } }, /* XSUM_XXH128_testdata[10804] */\n    { 3601, 0x9E3779B185EBCA8DULL, { 0x74B82B0E04787D8CULL, 0xEC638D519C48D1D0ULL } }, /* XSUM_XXH128_testdata[10805] */\n    { 3602, 0x0000000000000000ULL, { 0x4DE3483FC4182F48ULL, 0xF9D199702C4B03BAULL } }, /* XSUM_XXH128_testdata[10806] */\n    { 3602, 0x000000009E3779B1ULL, { 0xC65EE3C3F42FA23CULL, 0x411B0CABC7D80BDFULL } }, /* XSUM_XXH128_testdata[10807] */\n    { 3602, 0x9E3779B185EBCA8DULL, { 0x7161C533B05B5F24ULL, 0x3C84DD8C3C6F87D8ULL } }, /* XSUM_XXH128_testdata[10808] */\n    { 3603, 0x0000000000000000ULL, { 0x6EBFCC95D71CE048ULL, 0x9134F08C09A3F5D4ULL } }, /* XSUM_XXH128_testdata[10809] */\n    { 3603, 0x000000009E3779B1ULL, { 0xC048F4D9B20FCBACULL, 0x30F167679D72129FULL } }, /* XSUM_XXH128_testdata[10810] */\n    { 3603, 0x9E3779B185EBCA8DULL, { 0x83FD806AC13CC621ULL, 0xE16E3DDA39F0081DULL } }, /* XSUM_XXH128_testdata[10811] */\n    { 3604, 0x0000000000000000ULL, { 0x7C528E5DD889A5B7ULL, 0xD6FFAD97BDEF77DCULL } }, /* XSUM_XXH128_testdata[10812] */\n    { 3604, 0x000000009E3779B1ULL, { 0x8D8C0D6610741C47ULL, 0x5E226DF6D6B49EE9ULL } }, /* XSUM_XXH128_testdata[10813] */\n    { 3604, 0x9E3779B185EBCA8DULL, { 0x77E6D86EA7B9E60BULL, 0x4A601DB093F67C65ULL } }, /* XSUM_XXH128_testdata[10814] */\n    { 3605, 0x0000000000000000ULL, { 0x1775BBA9945AB5C7ULL, 0x77EC1E92173843DFULL } }, /* XSUM_XXH128_testdata[10815] */\n    { 3605, 0x000000009E3779B1ULL, { 0x2A64AFB85F741EF9ULL, 0xCB71DC3D47348E13ULL } }, /* XSUM_XXH128_testdata[10816] */\n    { 3605, 0x9E3779B185EBCA8DULL, { 0xC4611E1571038030ULL, 0xFA4BE82D53D23E6CULL } }, /* XSUM_XXH128_testdata[10817] */\n    { 3606, 0x0000000000000000ULL, { 0x13FA2FF572F0F0D4ULL, 0xE75AAB19DD04A544ULL } }, /* XSUM_XXH128_testdata[10818] */\n    { 3606, 0x000000009E3779B1ULL, { 0xA8584F4C23211015ULL, 0x5A1B7D12FD42FC49ULL } }, /* XSUM_XXH128_testdata[10819] */\n    { 3606, 0x9E3779B185EBCA8DULL, { 0x78379AC100A01282ULL, 0xCD04EB7912F358C0ULL } }, /* XSUM_XXH128_testdata[10820] */\n    { 3607, 0x0000000000000000ULL, { 0xB38ABFE4157261E4ULL, 0x6F277904387FD0F1ULL } }, /* XSUM_XXH128_testdata[10821] */\n    { 3607, 0x000000009E3779B1ULL, { 0x27EF4956EEB6DEECULL, 0x2E0739A8EAA9197BULL } }, /* XSUM_XXH128_testdata[10822] */\n    { 3607, 0x9E3779B185EBCA8DULL, { 0x44FE5B51DD645D59ULL, 0xD195CA40D8EA10BAULL } }, /* XSUM_XXH128_testdata[10823] */\n    { 3608, 0x0000000000000000ULL, { 0x1EA557EFB225BD55ULL, 0x39F2A151FBBA8E12ULL } }, /* XSUM_XXH128_testdata[10824] */\n    { 3608, 0x000000009E3779B1ULL, { 0x32D47CD3FA13F0A3ULL, 0x08D6FD69CE2FB4AEULL } }, /* XSUM_XXH128_testdata[10825] */\n    { 3608, 0x9E3779B185EBCA8DULL, { 0xCF5B8E6399DC3E6DULL, 0xCD98B8C9DD39D825ULL } }, /* XSUM_XXH128_testdata[10826] */\n    { 3609, 0x0000000000000000ULL, { 0x5DAEC0E322AA11ACULL, 0x52C0BFBA1F3AFC1CULL } }, /* XSUM_XXH128_testdata[10827] */\n    { 3609, 0x000000009E3779B1ULL, { 0x9DE4FA2A6DEEE598ULL, 0x9F977B0FF12A61E0ULL } }, /* XSUM_XXH128_testdata[10828] */\n    { 3609, 0x9E3779B185EBCA8DULL, { 0xB97A05380B5E97F4ULL, 0xDA04586D43A2BD47ULL } }, /* XSUM_XXH128_testdata[10829] */\n    { 3610, 0x0000000000000000ULL, { 0x0618560527D8EE74ULL, 0x56A30A29B14B8331ULL } }, /* XSUM_XXH128_testdata[10830] */\n    { 3610, 0x000000009E3779B1ULL, { 0xDDF49F7EABD451BBULL, 0x99A58331CD255124ULL } }, /* XSUM_XXH128_testdata[10831] */\n    { 3610, 0x9E3779B185EBCA8DULL, { 0x810CFF0D5D82C499ULL, 0x24D1B3F8DC37AD0DULL } }, /* XSUM_XXH128_testdata[10832] */\n    { 3611, 0x0000000000000000ULL, { 0x428CB7AB1700986EULL, 0x51187BCE808D00FEULL } }, /* XSUM_XXH128_testdata[10833] */\n    { 3611, 0x000000009E3779B1ULL, { 0x2B0D554C5B61E875ULL, 0x7795F8B92140EA77ULL } }, /* XSUM_XXH128_testdata[10834] */\n    { 3611, 0x9E3779B185EBCA8DULL, { 0xCDA885166AFAEA10ULL, 0xC12BFF2F7D907E5BULL } }, /* XSUM_XXH128_testdata[10835] */\n    { 3612, 0x0000000000000000ULL, { 0xD8F050F264F8572FULL, 0x3BBE1C08E7B44C5CULL } }, /* XSUM_XXH128_testdata[10836] */\n    { 3612, 0x000000009E3779B1ULL, { 0x1003FE0FD3852668ULL, 0xC13FC362BFB10140ULL } }, /* XSUM_XXH128_testdata[10837] */\n    { 3612, 0x9E3779B185EBCA8DULL, { 0x23481BBD0BB290ACULL, 0x168DF46B8C49D281ULL } }, /* XSUM_XXH128_testdata[10838] */\n    { 3613, 0x0000000000000000ULL, { 0x7D2FE80FC76388AFULL, 0xB884EEF77554156EULL } }, /* XSUM_XXH128_testdata[10839] */\n    { 3613, 0x000000009E3779B1ULL, { 0x89D7CEB02267B6CCULL, 0x6221C4B4B8D75B7CULL } }, /* XSUM_XXH128_testdata[10840] */\n    { 3613, 0x9E3779B185EBCA8DULL, { 0x63489215D53E7F36ULL, 0x88705F30F12275D4ULL } }, /* XSUM_XXH128_testdata[10841] */\n    { 3614, 0x0000000000000000ULL, { 0x9EE18D9CE70D3D81ULL, 0x4D13B9883C5E2BBDULL } }, /* XSUM_XXH128_testdata[10842] */\n    { 3614, 0x000000009E3779B1ULL, { 0xCBF155803AD520D6ULL, 0x32F3D9D12BFA036FULL } }, /* XSUM_XXH128_testdata[10843] */\n    { 3614, 0x9E3779B185EBCA8DULL, { 0x44A9E8E08BA4F358ULL, 0x8D5C954C9CE285A9ULL } }, /* XSUM_XXH128_testdata[10844] */\n    { 3615, 0x0000000000000000ULL, { 0x805D0048FE2B4461ULL, 0x7002A5B47ACE46A7ULL } }, /* XSUM_XXH128_testdata[10845] */\n    { 3615, 0x000000009E3779B1ULL, { 0xCD081FF8427C8FB8ULL, 0x11D330D18BB7AE38ULL } }, /* XSUM_XXH128_testdata[10846] */\n    { 3615, 0x9E3779B185EBCA8DULL, { 0xB8793230EFE60C6CULL, 0x4F20E385E3D186CFULL } }, /* XSUM_XXH128_testdata[10847] */\n    { 3616, 0x0000000000000000ULL, { 0xE224004BA5C50173ULL, 0xDD0B65401C98ABB6ULL } }, /* XSUM_XXH128_testdata[10848] */\n    { 3616, 0x000000009E3779B1ULL, { 0xA760B14434C25ACCULL, 0x7C52F2F047DED25DULL } }, /* XSUM_XXH128_testdata[10849] */\n    { 3616, 0x9E3779B185EBCA8DULL, { 0xC495BF75B748E46FULL, 0x34F0AD4D13906DDCULL } }, /* XSUM_XXH128_testdata[10850] */\n    { 3617, 0x0000000000000000ULL, { 0x60AD3345643EF778ULL, 0x9B601510885D901CULL } }, /* XSUM_XXH128_testdata[10851] */\n    { 3617, 0x000000009E3779B1ULL, { 0x8E89481F72340891ULL, 0x6F7F30F9CA0D3D03ULL } }, /* XSUM_XXH128_testdata[10852] */\n    { 3617, 0x9E3779B185EBCA8DULL, { 0xF5C0690CA81473FAULL, 0x316C3F5BF11E6381ULL } }, /* XSUM_XXH128_testdata[10853] */\n    { 3618, 0x0000000000000000ULL, { 0xA05FE941BED3C5A6ULL, 0x780CE95EB89A66C9ULL } }, /* XSUM_XXH128_testdata[10854] */\n    { 3618, 0x000000009E3779B1ULL, { 0x634D09A2255E80CEULL, 0x95D2DE555B8AE783ULL } }, /* XSUM_XXH128_testdata[10855] */\n    { 3618, 0x9E3779B185EBCA8DULL, { 0xDDAAFD89E60E967EULL, 0xE646B96E6D3383FCULL } }, /* XSUM_XXH128_testdata[10856] */\n    { 3619, 0x0000000000000000ULL, { 0x2E1FABE6A10E014AULL, 0x85F7AAC038B89185ULL } }, /* XSUM_XXH128_testdata[10857] */\n    { 3619, 0x000000009E3779B1ULL, { 0xD499B10BE5DA3A6FULL, 0xCD029C79568D478CULL } }, /* XSUM_XXH128_testdata[10858] */\n    { 3619, 0x9E3779B185EBCA8DULL, { 0x62B46AE80876FDFFULL, 0x28CB9E06F9E9A9ECULL } }, /* XSUM_XXH128_testdata[10859] */\n    { 3620, 0x0000000000000000ULL, { 0x819F6BD70A3D520AULL, 0x025FE210043F6EA8ULL } }, /* XSUM_XXH128_testdata[10860] */\n    { 3620, 0x000000009E3779B1ULL, { 0xA70CA525C05C750CULL, 0xEAB67AEA07810D39ULL } }, /* XSUM_XXH128_testdata[10861] */\n    { 3620, 0x9E3779B185EBCA8DULL, { 0x996A04888536CCDFULL, 0x629A221C2663DFB4ULL } }, /* XSUM_XXH128_testdata[10862] */\n    { 3621, 0x0000000000000000ULL, { 0xB51D2FDE94AC39C0ULL, 0xC0FD95CF23E9E40DULL } }, /* XSUM_XXH128_testdata[10863] */\n    { 3621, 0x000000009E3779B1ULL, { 0x0F0A2043F4AB993AULL, 0x43BC364B2A90EC15ULL } }, /* XSUM_XXH128_testdata[10864] */\n    { 3621, 0x9E3779B185EBCA8DULL, { 0xA86FAE2B6048A1EAULL, 0x7A948BFECC9CCD0BULL } }, /* XSUM_XXH128_testdata[10865] */\n    { 3622, 0x0000000000000000ULL, { 0x5FBAFF28E55997C2ULL, 0x45937C4EFA774CB4ULL } }, /* XSUM_XXH128_testdata[10866] */\n    { 3622, 0x000000009E3779B1ULL, { 0x73283C0FCAF83189ULL, 0x874BF1362690B06AULL } }, /* XSUM_XXH128_testdata[10867] */\n    { 3622, 0x9E3779B185EBCA8DULL, { 0x04EA2187B3EB8741ULL, 0xCF13FF12789F8A72ULL } }, /* XSUM_XXH128_testdata[10868] */\n    { 3623, 0x0000000000000000ULL, { 0xC15DD9F52DF74671ULL, 0x923F8C358F2FEF4FULL } }, /* XSUM_XXH128_testdata[10869] */\n    { 3623, 0x000000009E3779B1ULL, { 0xE21ED81486D44BF3ULL, 0x89881C879F341D4DULL } }, /* XSUM_XXH128_testdata[10870] */\n    { 3623, 0x9E3779B185EBCA8DULL, { 0x9790921F255745AEULL, 0x7C5170C204268F12ULL } }, /* XSUM_XXH128_testdata[10871] */\n    { 3624, 0x0000000000000000ULL, { 0x4E7C46B2442D5DC7ULL, 0x5D834BB65CFFE622ULL } }, /* XSUM_XXH128_testdata[10872] */\n    { 3624, 0x000000009E3779B1ULL, { 0xD34D620409795805ULL, 0x3811738D1D9E2D02ULL } }, /* XSUM_XXH128_testdata[10873] */\n    { 3624, 0x9E3779B185EBCA8DULL, { 0xC52C4A382BA1F303ULL, 0xA68DBA1FDA89A0DEULL } }, /* XSUM_XXH128_testdata[10874] */\n    { 3625, 0x0000000000000000ULL, { 0x7D1C31F2A34070B3ULL, 0x29DB2F2766C3D4C7ULL } }, /* XSUM_XXH128_testdata[10875] */\n    { 3625, 0x000000009E3779B1ULL, { 0xF1C21D6FC227790CULL, 0x43520462E2B421E5ULL } }, /* XSUM_XXH128_testdata[10876] */\n    { 3625, 0x9E3779B185EBCA8DULL, { 0xFC641C9B2410A120ULL, 0xE0B1E191437BAF34ULL } }, /* XSUM_XXH128_testdata[10877] */\n    { 3626, 0x0000000000000000ULL, { 0xB81891D504173694ULL, 0xAAEB1D9BCB3EF484ULL } }, /* XSUM_XXH128_testdata[10878] */\n    { 3626, 0x000000009E3779B1ULL, { 0xC74D936F79FADE71ULL, 0x5DACBA79A6BB8145ULL } }, /* XSUM_XXH128_testdata[10879] */\n    { 3626, 0x9E3779B185EBCA8DULL, { 0xF2D50EDF58249D59ULL, 0x08B0C00C366A160AULL } }, /* XSUM_XXH128_testdata[10880] */\n    { 3627, 0x0000000000000000ULL, { 0xF63AF445777115FAULL, 0xC45D4D57D9A62158ULL } }, /* XSUM_XXH128_testdata[10881] */\n    { 3627, 0x000000009E3779B1ULL, { 0xC64B4117BA44B531ULL, 0xF1025B3172B7AFD1ULL } }, /* XSUM_XXH128_testdata[10882] */\n    { 3627, 0x9E3779B185EBCA8DULL, { 0xC173275130321B6EULL, 0xE377659BFDC9E0DEULL } }, /* XSUM_XXH128_testdata[10883] */\n    { 3628, 0x0000000000000000ULL, { 0xEC5927B6AD279E13ULL, 0xBF179F0D89705D4FULL } }, /* XSUM_XXH128_testdata[10884] */\n    { 3628, 0x000000009E3779B1ULL, { 0x0C2B8EB2E3A05F6FULL, 0xD1FA5ED15E15AB40ULL } }, /* XSUM_XXH128_testdata[10885] */\n    { 3628, 0x9E3779B185EBCA8DULL, { 0x9693A39017C2A9ACULL, 0x011CB17627E3D0D1ULL } }, /* XSUM_XXH128_testdata[10886] */\n    { 3629, 0x0000000000000000ULL, { 0x71651D7611EC2532ULL, 0xADCF22EDCDE2856CULL } }, /* XSUM_XXH128_testdata[10887] */\n    { 3629, 0x000000009E3779B1ULL, { 0x0F1298DC6E8B5456ULL, 0xBAFBA8BE0796235BULL } }, /* XSUM_XXH128_testdata[10888] */\n    { 3629, 0x9E3779B185EBCA8DULL, { 0x9718A64B81FD5DE1ULL, 0xC3ABF2B1DDBE6561ULL } }, /* XSUM_XXH128_testdata[10889] */\n    { 3630, 0x0000000000000000ULL, { 0x7C449AB2BD997001ULL, 0x3EA2B3DCE4136C55ULL } }, /* XSUM_XXH128_testdata[10890] */\n    { 3630, 0x000000009E3779B1ULL, { 0xC10E79A2711187ADULL, 0xD8C3A351155FADF8ULL } }, /* XSUM_XXH128_testdata[10891] */\n    { 3630, 0x9E3779B185EBCA8DULL, { 0x7EB44826101D0ED4ULL, 0x86E3535976B4D3A4ULL } }, /* XSUM_XXH128_testdata[10892] */\n    { 3631, 0x0000000000000000ULL, { 0xDA4282DB4571841EULL, 0x4F0EB39E5570A2D4ULL } }, /* XSUM_XXH128_testdata[10893] */\n    { 3631, 0x000000009E3779B1ULL, { 0x3B9DE7D2CE5255F6ULL, 0x611083834939E49FULL } }, /* XSUM_XXH128_testdata[10894] */\n    { 3631, 0x9E3779B185EBCA8DULL, { 0xD9F1F147717C384EULL, 0x567165E5BA0F44FDULL } }, /* XSUM_XXH128_testdata[10895] */\n    { 3632, 0x0000000000000000ULL, { 0x2E18036391ED1627ULL, 0x0967E109A7042532ULL } }, /* XSUM_XXH128_testdata[10896] */\n    { 3632, 0x000000009E3779B1ULL, { 0x128CF3D3ABB36E6BULL, 0x8D3A59D44E6A9FCEULL } }, /* XSUM_XXH128_testdata[10897] */\n    { 3632, 0x9E3779B185EBCA8DULL, { 0x132C5DF528C31BB6ULL, 0xFC1A1F313E36270BULL } }, /* XSUM_XXH128_testdata[10898] */\n    { 3633, 0x0000000000000000ULL, { 0x209115FAE7B80378ULL, 0x1795584D4221796FULL } }, /* XSUM_XXH128_testdata[10899] */\n    { 3633, 0x000000009E3779B1ULL, { 0x222C8A2C3C2CCC60ULL, 0x1C4B34AD324B9A21ULL } }, /* XSUM_XXH128_testdata[10900] */\n    { 3633, 0x9E3779B185EBCA8DULL, { 0xE866A17FAB1F0AF8ULL, 0xB9F3D13322046883ULL } }, /* XSUM_XXH128_testdata[10901] */\n    { 3634, 0x0000000000000000ULL, { 0x7DE2CA817F381BC0ULL, 0x40FF0CE9223D2079ULL } }, /* XSUM_XXH128_testdata[10902] */\n    { 3634, 0x000000009E3779B1ULL, { 0x5B452AA35A11AADCULL, 0xBE74F53A6D18AD97ULL } }, /* XSUM_XXH128_testdata[10903] */\n    { 3634, 0x9E3779B185EBCA8DULL, { 0xF462694243DBE9B8ULL, 0x136C0F6B4FBE481BULL } }, /* XSUM_XXH128_testdata[10904] */\n    { 3635, 0x0000000000000000ULL, { 0x46485158EA4469B8ULL, 0x5789F7AB518996C7ULL } }, /* XSUM_XXH128_testdata[10905] */\n    { 3635, 0x000000009E3779B1ULL, { 0x270AC88AC091CF1DULL, 0x13F016681179750BULL } }, /* XSUM_XXH128_testdata[10906] */\n    { 3635, 0x9E3779B185EBCA8DULL, { 0x50D200F9426AB0B8ULL, 0x07C31CF976913821ULL } }, /* XSUM_XXH128_testdata[10907] */\n    { 3636, 0x0000000000000000ULL, { 0x7DD0DD3A7FBB7019ULL, 0x68626C9973DCD5F6ULL } }, /* XSUM_XXH128_testdata[10908] */\n    { 3636, 0x000000009E3779B1ULL, { 0xA12863A4BAAFE970ULL, 0x3F935C1BD239FDF8ULL } }, /* XSUM_XXH128_testdata[10909] */\n    { 3636, 0x9E3779B185EBCA8DULL, { 0xE717E13C97FAABAFULL, 0xCCB00219D440A5A9ULL } }, /* XSUM_XXH128_testdata[10910] */\n    { 3637, 0x0000000000000000ULL, { 0x983F18C1468B2D10ULL, 0xC4D18B8D57901CADULL } }, /* XSUM_XXH128_testdata[10911] */\n    { 3637, 0x000000009E3779B1ULL, { 0x5BF76CDE29FD03D4ULL, 0x213EF5841384F834ULL } }, /* XSUM_XXH128_testdata[10912] */\n    { 3637, 0x9E3779B185EBCA8DULL, { 0x8DF8356CF393EFC0ULL, 0x3077160DDA987460ULL } }, /* XSUM_XXH128_testdata[10913] */\n    { 3638, 0x0000000000000000ULL, { 0x717C350EB3CD9807ULL, 0x20A66EAD750F301AULL } }, /* XSUM_XXH128_testdata[10914] */\n    { 3638, 0x000000009E3779B1ULL, { 0x881F28A20BC070ACULL, 0x56801B9D970D8E92ULL } }, /* XSUM_XXH128_testdata[10915] */\n    { 3638, 0x9E3779B185EBCA8DULL, { 0x41B956F428CCAB4CULL, 0x064134D7016A05BFULL } }, /* XSUM_XXH128_testdata[10916] */\n    { 3639, 0x0000000000000000ULL, { 0xD64AB539E854D1FEULL, 0x4D6B4F6A68BC67A7ULL } }, /* XSUM_XXH128_testdata[10917] */\n    { 3639, 0x000000009E3779B1ULL, { 0x11EA10DA21842301ULL, 0x5D70102592804A8BULL } }, /* XSUM_XXH128_testdata[10918] */\n    { 3639, 0x9E3779B185EBCA8DULL, { 0xE67F4E3648D08E65ULL, 0x148E5F5D863E8432ULL } }, /* XSUM_XXH128_testdata[10919] */\n    { 3640, 0x0000000000000000ULL, { 0x083B58BA720C4DF3ULL, 0xC06363796284B07EULL } }, /* XSUM_XXH128_testdata[10920] */\n    { 3640, 0x000000009E3779B1ULL, { 0xD8896E0B1378C6D0ULL, 0xA6500595444A6730ULL } }, /* XSUM_XXH128_testdata[10921] */\n    { 3640, 0x9E3779B185EBCA8DULL, { 0xD09854B17E7E765CULL, 0x1600C1BE9B71FB37ULL } }, /* XSUM_XXH128_testdata[10922] */\n    { 3641, 0x0000000000000000ULL, { 0xA6010F7BCC7EDE24ULL, 0x608DE9CFF5F16322ULL } }, /* XSUM_XXH128_testdata[10923] */\n    { 3641, 0x000000009E3779B1ULL, { 0x5B935FC4D845A51DULL, 0xEF3039521413BC4EULL } }, /* XSUM_XXH128_testdata[10924] */\n    { 3641, 0x9E3779B185EBCA8DULL, { 0xBD61E0A48814535CULL, 0xC9DECAA909A30D6CULL } }, /* XSUM_XXH128_testdata[10925] */\n    { 3642, 0x0000000000000000ULL, { 0xFDA39821B3F36757ULL, 0x367DE9BBC9BB7EAEULL } }, /* XSUM_XXH128_testdata[10926] */\n    { 3642, 0x000000009E3779B1ULL, { 0x4492880092C6ED2CULL, 0x4C71F7427261E9E6ULL } }, /* XSUM_XXH128_testdata[10927] */\n    { 3642, 0x9E3779B185EBCA8DULL, { 0x2546DF17F90A2192ULL, 0xC3518BF916D929C5ULL } }, /* XSUM_XXH128_testdata[10928] */\n    { 3643, 0x0000000000000000ULL, { 0x8BCB3B6F54E7DBAEULL, 0x024F44277B9D6915ULL } }, /* XSUM_XXH128_testdata[10929] */\n    { 3643, 0x000000009E3779B1ULL, { 0xE654E30858B88B53ULL, 0xADDA22F6C03C5A2AULL } }, /* XSUM_XXH128_testdata[10930] */\n    { 3643, 0x9E3779B185EBCA8DULL, { 0x0CDBE992BAC2E837ULL, 0x0EFA2BD5A978CB02ULL } }, /* XSUM_XXH128_testdata[10931] */\n    { 3644, 0x0000000000000000ULL, { 0x52B947E32C3D68DCULL, 0x65F61B7880554C79ULL } }, /* XSUM_XXH128_testdata[10932] */\n    { 3644, 0x000000009E3779B1ULL, { 0xF9E1E88A7EB2A849ULL, 0xFE12D6505D78D681ULL } }, /* XSUM_XXH128_testdata[10933] */\n    { 3644, 0x9E3779B185EBCA8DULL, { 0xA67E8BCB1BA3AD03ULL, 0x703C8294F4C84186ULL } }, /* XSUM_XXH128_testdata[10934] */\n    { 3645, 0x0000000000000000ULL, { 0x88FE1049B811C230ULL, 0x3835C56D37856CCEULL } }, /* XSUM_XXH128_testdata[10935] */\n    { 3645, 0x000000009E3779B1ULL, { 0xC61C3F304259E0AEULL, 0xF70CBC888509A00CULL } }, /* XSUM_XXH128_testdata[10936] */\n    { 3645, 0x9E3779B185EBCA8DULL, { 0xE9CF3FD2C327C16FULL, 0x83129099A012E0B5ULL } }, /* XSUM_XXH128_testdata[10937] */\n    { 3646, 0x0000000000000000ULL, { 0xD26C15C31BDBBAA2ULL, 0x7C959381974C435EULL } }, /* XSUM_XXH128_testdata[10938] */\n    { 3646, 0x000000009E3779B1ULL, { 0xBD623870634D0669ULL, 0x6B4127DB6A5D6233ULL } }, /* XSUM_XXH128_testdata[10939] */\n    { 3646, 0x9E3779B185EBCA8DULL, { 0x271AFF2D889CD83EULL, 0xA9C8B5600043DACCULL } }, /* XSUM_XXH128_testdata[10940] */\n    { 3647, 0x0000000000000000ULL, { 0x76579FBF54975EF8ULL, 0x1EAE03887CEB57A4ULL } }, /* XSUM_XXH128_testdata[10941] */\n    { 3647, 0x000000009E3779B1ULL, { 0x75E487A1BE6B4B57ULL, 0x72859F991170566BULL } }, /* XSUM_XXH128_testdata[10942] */\n    { 3647, 0x9E3779B185EBCA8DULL, { 0x391A5EDBFEC575E3ULL, 0xEC3F0C600BBD0B4DULL } }, /* XSUM_XXH128_testdata[10943] */\n    { 3648, 0x0000000000000000ULL, { 0x610A4475518EA93BULL, 0xADC8FFEB4534EA00ULL } }, /* XSUM_XXH128_testdata[10944] */\n    { 3648, 0x000000009E3779B1ULL, { 0x4F65BF876879D1CAULL, 0x6EB37ED8485AC017ULL } }, /* XSUM_XXH128_testdata[10945] */\n    { 3648, 0x9E3779B185EBCA8DULL, { 0xD1470284DFFCC536ULL, 0x8CB3B048F1414376ULL } }, /* XSUM_XXH128_testdata[10946] */\n    { 3649, 0x0000000000000000ULL, { 0x7355EAEB71F2ADD7ULL, 0x748B3279745A5A6BULL } }, /* XSUM_XXH128_testdata[10947] */\n    { 3649, 0x000000009E3779B1ULL, { 0x166C69706CF0BB68ULL, 0xA2E4E79056BCCAE2ULL } }, /* XSUM_XXH128_testdata[10948] */\n    { 3649, 0x9E3779B185EBCA8DULL, { 0x43F63766EB203184ULL, 0x75119D65DC4AA02EULL } }, /* XSUM_XXH128_testdata[10949] */\n    { 3650, 0x0000000000000000ULL, { 0x49220BDC3DC68B25ULL, 0x1A698BA41CB8DB38ULL } }, /* XSUM_XXH128_testdata[10950] */\n    { 3650, 0x000000009E3779B1ULL, { 0x46B855F81BE7F4D2ULL, 0xA097B76F634F352BULL } }, /* XSUM_XXH128_testdata[10951] */\n    { 3650, 0x9E3779B185EBCA8DULL, { 0x43669AC1AF931192ULL, 0x256771A70DBF9591ULL } }, /* XSUM_XXH128_testdata[10952] */\n    { 3651, 0x0000000000000000ULL, { 0xD0F53AF95EBB06B4ULL, 0xCD71A14B1624D17BULL } }, /* XSUM_XXH128_testdata[10953] */\n    { 3651, 0x000000009E3779B1ULL, { 0x6ED204AFA99B4507ULL, 0x0C916DF46F43C0F8ULL } }, /* XSUM_XXH128_testdata[10954] */\n    { 3651, 0x9E3779B185EBCA8DULL, { 0x4511BCD1E506D310ULL, 0x7578E354AC9EF364ULL } }, /* XSUM_XXH128_testdata[10955] */\n    { 3652, 0x0000000000000000ULL, { 0xD468B155F10FB02DULL, 0x3FD35763FAEBF106ULL } }, /* XSUM_XXH128_testdata[10956] */\n    { 3652, 0x000000009E3779B1ULL, { 0xAD9C05E2672FE0B0ULL, 0x509E70A305D71F3AULL } }, /* XSUM_XXH128_testdata[10957] */\n    { 3652, 0x9E3779B185EBCA8DULL, { 0x1C337EC9BE934644ULL, 0xFF94AB5D3D7F30D4ULL } }, /* XSUM_XXH128_testdata[10958] */\n    { 3653, 0x0000000000000000ULL, { 0x9E9025CDC2778AD2ULL, 0x31176A23D2035624ULL } }, /* XSUM_XXH128_testdata[10959] */\n    { 3653, 0x000000009E3779B1ULL, { 0xF15EBD171E27588CULL, 0x9E61A0E456F9FA82ULL } }, /* XSUM_XXH128_testdata[10960] */\n    { 3653, 0x9E3779B185EBCA8DULL, { 0x0B6F102F04CE0841ULL, 0x6D2C85E67C338580ULL } }, /* XSUM_XXH128_testdata[10961] */\n    { 3654, 0x0000000000000000ULL, { 0x9792DB0C1F18EFC8ULL, 0x2C4521B29B3DC78AULL } }, /* XSUM_XXH128_testdata[10962] */\n    { 3654, 0x000000009E3779B1ULL, { 0x7CB8D6AF8DE401C5ULL, 0x859B9788EE0C00C3ULL } }, /* XSUM_XXH128_testdata[10963] */\n    { 3654, 0x9E3779B185EBCA8DULL, { 0x2E43CCFC8CEB2824ULL, 0x380F2C8A40551A75ULL } }, /* XSUM_XXH128_testdata[10964] */\n    { 3655, 0x0000000000000000ULL, { 0x3E0610AB1BFEE240ULL, 0x090642BDAB684F79ULL } }, /* XSUM_XXH128_testdata[10965] */\n    { 3655, 0x000000009E3779B1ULL, { 0x346E2A76C4E9F390ULL, 0x62DD53895B52CDAEULL } }, /* XSUM_XXH128_testdata[10966] */\n    { 3655, 0x9E3779B185EBCA8DULL, { 0x1AF7E00CB6C71727ULL, 0x8B85E3CAD6CF4A45ULL } }, /* XSUM_XXH128_testdata[10967] */\n    { 3656, 0x0000000000000000ULL, { 0xB31EE9E702342246ULL, 0x2E828C0EFC7CDD4CULL } }, /* XSUM_XXH128_testdata[10968] */\n    { 3656, 0x000000009E3779B1ULL, { 0x14A307CD277505B3ULL, 0xA52CE3E0E8C74D94ULL } }, /* XSUM_XXH128_testdata[10969] */\n    { 3656, 0x9E3779B185EBCA8DULL, { 0x563F9E869AF53FC2ULL, 0x9284C63AF128CB7FULL } }, /* XSUM_XXH128_testdata[10970] */\n    { 3657, 0x0000000000000000ULL, { 0x714874FD55D5AB76ULL, 0xB461EA64815D4492ULL } }, /* XSUM_XXH128_testdata[10971] */\n    { 3657, 0x000000009E3779B1ULL, { 0x1166892E610427ECULL, 0x5DB56543CC8FEF0CULL } }, /* XSUM_XXH128_testdata[10972] */\n    { 3657, 0x9E3779B185EBCA8DULL, { 0x991F0CDCE38857A4ULL, 0x0E2C6CBC1299E447ULL } }, /* XSUM_XXH128_testdata[10973] */\n    { 3658, 0x0000000000000000ULL, { 0x7D2BBDA44E88C402ULL, 0x9F6C9B0FC8DCFAFFULL } }, /* XSUM_XXH128_testdata[10974] */\n    { 3658, 0x000000009E3779B1ULL, { 0x34C75D0548877FC3ULL, 0x463433D125332547ULL } }, /* XSUM_XXH128_testdata[10975] */\n    { 3658, 0x9E3779B185EBCA8DULL, { 0xC96E20000F45DC7AULL, 0xC11AF36BE198528CULL } }, /* XSUM_XXH128_testdata[10976] */\n    { 3659, 0x0000000000000000ULL, { 0x388FAC01BB9971E7ULL, 0x72A5DDB428982E87ULL } }, /* XSUM_XXH128_testdata[10977] */\n    { 3659, 0x000000009E3779B1ULL, { 0xF387E46CA200EB16ULL, 0xAD1522A86F2CEC4AULL } }, /* XSUM_XXH128_testdata[10978] */\n    { 3659, 0x9E3779B185EBCA8DULL, { 0x409B353294E7250BULL, 0xDAD2AA30C71B355CULL } }, /* XSUM_XXH128_testdata[10979] */\n    { 3660, 0x0000000000000000ULL, { 0x6658D39A5794EC9EULL, 0xE29D8636284F1398ULL } }, /* XSUM_XXH128_testdata[10980] */\n    { 3660, 0x000000009E3779B1ULL, { 0x44BF7BDDF3F917D6ULL, 0x5D283F4D9DC939DAULL } }, /* XSUM_XXH128_testdata[10981] */\n    { 3660, 0x9E3779B185EBCA8DULL, { 0x877A001BA85CD57FULL, 0x5DB413157B46B672ULL } }, /* XSUM_XXH128_testdata[10982] */\n    { 3661, 0x0000000000000000ULL, { 0x9229DEFEB9C5CFCFULL, 0xBC974AD83E819DE8ULL } }, /* XSUM_XXH128_testdata[10983] */\n    { 3661, 0x000000009E3779B1ULL, { 0x41E534958C4FFFF7ULL, 0x7B918FD2CA44D58EULL } }, /* XSUM_XXH128_testdata[10984] */\n    { 3661, 0x9E3779B185EBCA8DULL, { 0x0A7AB1E105A88727ULL, 0x4A31831552FA53F5ULL } }, /* XSUM_XXH128_testdata[10985] */\n    { 3662, 0x0000000000000000ULL, { 0x0DEA8A92E86777ECULL, 0xA40A489B05E4169EULL } }, /* XSUM_XXH128_testdata[10986] */\n    { 3662, 0x000000009E3779B1ULL, { 0x3D7F99E0CABC745AULL, 0xFF0527C237357E80ULL } }, /* XSUM_XXH128_testdata[10987] */\n    { 3662, 0x9E3779B185EBCA8DULL, { 0xDA9D525FC518C611ULL, 0x37EDA4F0B970570DULL } }, /* XSUM_XXH128_testdata[10988] */\n    { 3663, 0x0000000000000000ULL, { 0x7645DFFB0345DC71ULL, 0x2BCEF36EF7E0F6FBULL } }, /* XSUM_XXH128_testdata[10989] */\n    { 3663, 0x000000009E3779B1ULL, { 0x5F509C3DCB426183ULL, 0xEAC245E4479A8C2AULL } }, /* XSUM_XXH128_testdata[10990] */\n    { 3663, 0x9E3779B185EBCA8DULL, { 0x1F14663C9906311FULL, 0x468208FF6895FF7BULL } }, /* XSUM_XXH128_testdata[10991] */\n    { 3664, 0x0000000000000000ULL, { 0x2B813BC349183AD8ULL, 0xA653388A00ADA313ULL } }, /* XSUM_XXH128_testdata[10992] */\n    { 3664, 0x000000009E3779B1ULL, { 0xA6F5BD133CDD5AFCULL, 0x763744D5B494568EULL } }, /* XSUM_XXH128_testdata[10993] */\n    { 3664, 0x9E3779B185EBCA8DULL, { 0x1C688F2BB8FEACA0ULL, 0xB026EF7F90938D67ULL } }, /* XSUM_XXH128_testdata[10994] */\n    { 3665, 0x0000000000000000ULL, { 0x74E7A9D6B3E98D45ULL, 0x0FCB7CF7909D569CULL } }, /* XSUM_XXH128_testdata[10995] */\n    { 3665, 0x000000009E3779B1ULL, { 0xABBE812E1093754CULL, 0xCD74B8E7833763A8ULL } }, /* XSUM_XXH128_testdata[10996] */\n    { 3665, 0x9E3779B185EBCA8DULL, { 0x334D7716485A5AEDULL, 0xEB81F3958B956BBEULL } }, /* XSUM_XXH128_testdata[10997] */\n    { 3666, 0x0000000000000000ULL, { 0x057313555EE1643EULL, 0x9DAB8378B9CC7CAEULL } }, /* XSUM_XXH128_testdata[10998] */\n    { 3666, 0x000000009E3779B1ULL, { 0xA4231BDB1052C4CCULL, 0xF6D19E2201D224DAULL } }, /* XSUM_XXH128_testdata[10999] */\n    { 3666, 0x9E3779B185EBCA8DULL, { 0x43EA2793D65754A1ULL, 0xEFA8C98DC4B3FD76ULL } }, /* XSUM_XXH128_testdata[11000] */\n    { 3667, 0x0000000000000000ULL, { 0x472EC8CC0F5932EDULL, 0x23121ADA1CA431A7ULL } }, /* XSUM_XXH128_testdata[11001] */\n    { 3667, 0x000000009E3779B1ULL, { 0x5EB4CEFBB0127797ULL, 0x5C31A6D221EDD949ULL } }, /* XSUM_XXH128_testdata[11002] */\n    { 3667, 0x9E3779B185EBCA8DULL, { 0xA1E9CB6FD03E99CCULL, 0xF82BAC9F3CC336B6ULL } }, /* XSUM_XXH128_testdata[11003] */\n    { 3668, 0x0000000000000000ULL, { 0x20A378B56457CC71ULL, 0x0B814214D3F934E2ULL } }, /* XSUM_XXH128_testdata[11004] */\n    { 3668, 0x000000009E3779B1ULL, { 0xCEF6C548F3A6242BULL, 0x9337E64C6877C21DULL } }, /* XSUM_XXH128_testdata[11005] */\n    { 3668, 0x9E3779B185EBCA8DULL, { 0xDEF548BC96712061ULL, 0x4CABE6B4D59CA904ULL } }, /* XSUM_XXH128_testdata[11006] */\n    { 3669, 0x0000000000000000ULL, { 0x5A4CABE2108EB0AEULL, 0x7860401B29062582ULL } }, /* XSUM_XXH128_testdata[11007] */\n    { 3669, 0x000000009E3779B1ULL, { 0x716FEEF8DE7EAFA0ULL, 0xEBAA3134F6B269A1ULL } }, /* XSUM_XXH128_testdata[11008] */\n    { 3669, 0x9E3779B185EBCA8DULL, { 0x0AFD1831FA89CFB4ULL, 0x25B4813ACBEDD345ULL } }, /* XSUM_XXH128_testdata[11009] */\n    { 3670, 0x0000000000000000ULL, { 0x82019D1F6C3E2E74ULL, 0x6C9004B172FD80F5ULL } }, /* XSUM_XXH128_testdata[11010] */\n    { 3670, 0x000000009E3779B1ULL, { 0xD7C615E3D875473DULL, 0xACA4326A2C4723D9ULL } }, /* XSUM_XXH128_testdata[11011] */\n    { 3670, 0x9E3779B185EBCA8DULL, { 0xD6D8C4CA9D0AB2C3ULL, 0x86F29D28140247B1ULL } }, /* XSUM_XXH128_testdata[11012] */\n    { 3671, 0x0000000000000000ULL, { 0xE47829572E431531ULL, 0x80899F4DCC808238ULL } }, /* XSUM_XXH128_testdata[11013] */\n    { 3671, 0x000000009E3779B1ULL, { 0x9E3B30D7F40750EDULL, 0x7CFECF3C9DE5C75AULL } }, /* XSUM_XXH128_testdata[11014] */\n    { 3671, 0x9E3779B185EBCA8DULL, { 0xE343EED75B07F8C0ULL, 0x0A49CEE8AAFA510FULL } }, /* XSUM_XXH128_testdata[11015] */\n    { 3672, 0x0000000000000000ULL, { 0x8DDCAA138D9C6C24ULL, 0x886CB7A3272A5A2DULL } }, /* XSUM_XXH128_testdata[11016] */\n    { 3672, 0x000000009E3779B1ULL, { 0xBB27FEA1A6FA84A1ULL, 0x63AB19CB62AE30E4ULL } }, /* XSUM_XXH128_testdata[11017] */\n    { 3672, 0x9E3779B185EBCA8DULL, { 0xB77A7680E8EFB54CULL, 0x3CC4BE9086C1019AULL } }, /* XSUM_XXH128_testdata[11018] */\n    { 3673, 0x0000000000000000ULL, { 0x89DA001EE3A0B053ULL, 0x9BF6075A8E8F2F80ULL } }, /* XSUM_XXH128_testdata[11019] */\n    { 3673, 0x000000009E3779B1ULL, { 0x570A9AAE5AB49D2CULL, 0x05793B3E8163F79BULL } }, /* XSUM_XXH128_testdata[11020] */\n    { 3673, 0x9E3779B185EBCA8DULL, { 0x0DF66A76DB3C0056ULL, 0x9B1564C96A8B1267ULL } }, /* XSUM_XXH128_testdata[11021] */\n    { 3674, 0x0000000000000000ULL, { 0xD81F9027F710D6E4ULL, 0x2227C65A956C992AULL } }, /* XSUM_XXH128_testdata[11022] */\n    { 3674, 0x000000009E3779B1ULL, { 0x292499ADF1B2CA71ULL, 0x0178B1A76CEAB1DFULL } }, /* XSUM_XXH128_testdata[11023] */\n    { 3674, 0x9E3779B185EBCA8DULL, { 0x2ED21B61A2F8840FULL, 0x1B49A86B829606C9ULL } }, /* XSUM_XXH128_testdata[11024] */\n    { 3675, 0x0000000000000000ULL, { 0x82CBFF9D183E749FULL, 0x409B8754241217F7ULL } }, /* XSUM_XXH128_testdata[11025] */\n    { 3675, 0x000000009E3779B1ULL, { 0x6F396597D937DD8FULL, 0xA0AFE12F3CC8AB2BULL } }, /* XSUM_XXH128_testdata[11026] */\n    { 3675, 0x9E3779B185EBCA8DULL, { 0xDD56A057434E8529ULL, 0x523E5546C6D68F14ULL } }, /* XSUM_XXH128_testdata[11027] */\n    { 3676, 0x0000000000000000ULL, { 0xF5AC5F41BBB7EE12ULL, 0x5FA27AC02D1EC077ULL } }, /* XSUM_XXH128_testdata[11028] */\n    { 3676, 0x000000009E3779B1ULL, { 0x2D0919A2DC7D2DE5ULL, 0x843498ACF081C1A0ULL } }, /* XSUM_XXH128_testdata[11029] */\n    { 3676, 0x9E3779B185EBCA8DULL, { 0x4F0900B248D31555ULL, 0xC80EA4AAF09A60E7ULL } }, /* XSUM_XXH128_testdata[11030] */\n    { 3677, 0x0000000000000000ULL, { 0x68D21C5BC5A86459ULL, 0xF258F036268F8A03ULL } }, /* XSUM_XXH128_testdata[11031] */\n    { 3677, 0x000000009E3779B1ULL, { 0x59F4B90B20DBF5C7ULL, 0x1A784450AFC0A25FULL } }, /* XSUM_XXH128_testdata[11032] */\n    { 3677, 0x9E3779B185EBCA8DULL, { 0xF5028F8358823812ULL, 0xB3B05C24B284A263ULL } }, /* XSUM_XXH128_testdata[11033] */\n    { 3678, 0x0000000000000000ULL, { 0x30B49D06835F3AC3ULL, 0xDF1ADCCE8DCFAF2EULL } }, /* XSUM_XXH128_testdata[11034] */\n    { 3678, 0x000000009E3779B1ULL, { 0x0B5A70A2A94BDA52ULL, 0x4D5CEF970C4FC8ADULL } }, /* XSUM_XXH128_testdata[11035] */\n    { 3678, 0x9E3779B185EBCA8DULL, { 0x9817808DDC221565ULL, 0xB6F5DE2099FD3270ULL } }, /* XSUM_XXH128_testdata[11036] */\n    { 3679, 0x0000000000000000ULL, { 0xB8E3272D2F06B449ULL, 0xB497733CF5552DF1ULL } }, /* XSUM_XXH128_testdata[11037] */\n    { 3679, 0x000000009E3779B1ULL, { 0x89D413CF39C641BDULL, 0xF6FB65DF6248F568ULL } }, /* XSUM_XXH128_testdata[11038] */\n    { 3679, 0x9E3779B185EBCA8DULL, { 0x5736B2C5C03A0720ULL, 0xA4A0528C7C1BBEA8ULL } }, /* XSUM_XXH128_testdata[11039] */\n    { 3680, 0x0000000000000000ULL, { 0xCEDB8AB1C347936EULL, 0xEECFF9CCFA504C2EULL } }, /* XSUM_XXH128_testdata[11040] */\n    { 3680, 0x000000009E3779B1ULL, { 0x55752FADEBE23EC5ULL, 0x0C8A4CA382B96657ULL } }, /* XSUM_XXH128_testdata[11041] */\n    { 3680, 0x9E3779B185EBCA8DULL, { 0x2F50AC8E8F284017ULL, 0x61C94352B7984282ULL } }, /* XSUM_XXH128_testdata[11042] */\n    { 3681, 0x0000000000000000ULL, { 0x6550E7E182454B71ULL, 0x810CB782A8EC03B7ULL } }, /* XSUM_XXH128_testdata[11043] */\n    { 3681, 0x000000009E3779B1ULL, { 0x3751F9038699CD87ULL, 0x1669072653191C70ULL } }, /* XSUM_XXH128_testdata[11044] */\n    { 3681, 0x9E3779B185EBCA8DULL, { 0x26C4F4D208002F53ULL, 0x4077D636E16D7433ULL } }, /* XSUM_XXH128_testdata[11045] */\n    { 3682, 0x0000000000000000ULL, { 0x1A3CE9C073D99D8FULL, 0xF426BFBA9EA57F0FULL } }, /* XSUM_XXH128_testdata[11046] */\n    { 3682, 0x000000009E3779B1ULL, { 0x6A6C038F463B8397ULL, 0x330BDB48D92EE24FULL } }, /* XSUM_XXH128_testdata[11047] */\n    { 3682, 0x9E3779B185EBCA8DULL, { 0x01EEA2098BD2CB83ULL, 0xEE0539CCB702B720ULL } }, /* XSUM_XXH128_testdata[11048] */\n    { 3683, 0x0000000000000000ULL, { 0x07B59DA40C98D2F1ULL, 0x81CE535921B67BCAULL } }, /* XSUM_XXH128_testdata[11049] */\n    { 3683, 0x000000009E3779B1ULL, { 0xBAAD84F27E93BEFCULL, 0x1F512D79E76299D2ULL } }, /* XSUM_XXH128_testdata[11050] */\n    { 3683, 0x9E3779B185EBCA8DULL, { 0xB53E0C157F767219ULL, 0xD637121AB9DA634DULL } }, /* XSUM_XXH128_testdata[11051] */\n    { 3684, 0x0000000000000000ULL, { 0x4E1C5A0C63E98879ULL, 0x37F820471032D101ULL } }, /* XSUM_XXH128_testdata[11052] */\n    { 3684, 0x000000009E3779B1ULL, { 0x9340C060891B384CULL, 0x52E7EE156E8BFAD9ULL } }, /* XSUM_XXH128_testdata[11053] */\n    { 3684, 0x9E3779B185EBCA8DULL, { 0x48A1B9C9EB852A95ULL, 0x741B3ECF8C610B67ULL } }, /* XSUM_XXH128_testdata[11054] */\n    { 3685, 0x0000000000000000ULL, { 0xAA83A3F5C90A9558ULL, 0x1CF3A1643174B201ULL } }, /* XSUM_XXH128_testdata[11055] */\n    { 3685, 0x000000009E3779B1ULL, { 0xAC1BF22F645891C3ULL, 0x4C323819410E1287ULL } }, /* XSUM_XXH128_testdata[11056] */\n    { 3685, 0x9E3779B185EBCA8DULL, { 0x4CD131EA08ACCDDCULL, 0x395CF4DDDBCF8DAAULL } }, /* XSUM_XXH128_testdata[11057] */\n    { 3686, 0x0000000000000000ULL, { 0x9903B927FE6E57DEULL, 0xF5DC74107DD1E168ULL } }, /* XSUM_XXH128_testdata[11058] */\n    { 3686, 0x000000009E3779B1ULL, { 0xA4D89B9261F42998ULL, 0xBE63C95149044832ULL } }, /* XSUM_XXH128_testdata[11059] */\n    { 3686, 0x9E3779B185EBCA8DULL, { 0x52D4FE4DCB866096ULL, 0xAC0DE34C3A001DFFULL } }, /* XSUM_XXH128_testdata[11060] */\n    { 3687, 0x0000000000000000ULL, { 0x0EC74B98C8E26F7BULL, 0x0C0747B35903FDA4ULL } }, /* XSUM_XXH128_testdata[11061] */\n    { 3687, 0x000000009E3779B1ULL, { 0x0F7DA25C5C5E673AULL, 0xADCF520FD9E167A1ULL } }, /* XSUM_XXH128_testdata[11062] */\n    { 3687, 0x9E3779B185EBCA8DULL, { 0x5BB8229D8A74E2EDULL, 0x26907BC1B8CAD5E2ULL } }, /* XSUM_XXH128_testdata[11063] */\n    { 3688, 0x0000000000000000ULL, { 0x9F78C9CFBAA50470ULL, 0x2225D1F81AA43A2BULL } }, /* XSUM_XXH128_testdata[11064] */\n    { 3688, 0x000000009E3779B1ULL, { 0x71562E33D93E8B3AULL, 0x485CB70347CA21C8ULL } }, /* XSUM_XXH128_testdata[11065] */\n    { 3688, 0x9E3779B185EBCA8DULL, { 0xAE63489AAE57AE33ULL, 0x09923001362CE110ULL } }, /* XSUM_XXH128_testdata[11066] */\n    { 3689, 0x0000000000000000ULL, { 0x2A952671D26A6FFAULL, 0x0A27801877D769DDULL } }, /* XSUM_XXH128_testdata[11067] */\n    { 3689, 0x000000009E3779B1ULL, { 0x16B6223F6F4AF6BEULL, 0x4B92C12381D7A30BULL } }, /* XSUM_XXH128_testdata[11068] */\n    { 3689, 0x9E3779B185EBCA8DULL, { 0xE038C243D2CCA34EULL, 0x8E010356A6B3022CULL } }, /* XSUM_XXH128_testdata[11069] */\n    { 3690, 0x0000000000000000ULL, { 0x529F41A68EF2AA3EULL, 0x92BB6688C8D0F515ULL } }, /* XSUM_XXH128_testdata[11070] */\n    { 3690, 0x000000009E3779B1ULL, { 0xF2946B347BFCB1B0ULL, 0x6A6EE3A09C8B07E1ULL } }, /* XSUM_XXH128_testdata[11071] */\n    { 3690, 0x9E3779B185EBCA8DULL, { 0xEFD1AD4FCFC6FBBDULL, 0x36D2B2DF5376E8BAULL } }, /* XSUM_XXH128_testdata[11072] */\n    { 3691, 0x0000000000000000ULL, { 0x3659D81C4A6C3DF6ULL, 0xF315A1CE896765CCULL } }, /* XSUM_XXH128_testdata[11073] */\n    { 3691, 0x000000009E3779B1ULL, { 0x26FCAD23094EC492ULL, 0x86CC0C3BBC8D979CULL } }, /* XSUM_XXH128_testdata[11074] */\n    { 3691, 0x9E3779B185EBCA8DULL, { 0xB3678284360EE813ULL, 0xE9AD4542C5E836C0ULL } }, /* XSUM_XXH128_testdata[11075] */\n    { 3692, 0x0000000000000000ULL, { 0x7F3F4732C7238C59ULL, 0x27C215EE4A21DF86ULL } }, /* XSUM_XXH128_testdata[11076] */\n    { 3692, 0x000000009E3779B1ULL, { 0x27644CE1CFD83CB3ULL, 0xDC6A3B206BACA7A7ULL } }, /* XSUM_XXH128_testdata[11077] */\n    { 3692, 0x9E3779B185EBCA8DULL, { 0x144CFF00565F45BAULL, 0x9BF67713CC7FFC75ULL } }, /* XSUM_XXH128_testdata[11078] */\n    { 3693, 0x0000000000000000ULL, { 0x91ADED714C093708ULL, 0xE6C87210D6DFF0F0ULL } }, /* XSUM_XXH128_testdata[11079] */\n    { 3693, 0x000000009E3779B1ULL, { 0x029889B952EEC664ULL, 0x459E54364D1D1979ULL } }, /* XSUM_XXH128_testdata[11080] */\n    { 3693, 0x9E3779B185EBCA8DULL, { 0xF29B4E6485A31250ULL, 0x72557B04A3042D32ULL } }, /* XSUM_XXH128_testdata[11081] */\n    { 3694, 0x0000000000000000ULL, { 0x6F0440F2434F1AECULL, 0x412DE589A6F18DFBULL } }, /* XSUM_XXH128_testdata[11082] */\n    { 3694, 0x000000009E3779B1ULL, { 0x9F326E4C30018560ULL, 0x28CFD1EA59E760F7ULL } }, /* XSUM_XXH128_testdata[11083] */\n    { 3694, 0x9E3779B185EBCA8DULL, { 0x6605B7A79602CB9DULL, 0xCCF46BF6E719232FULL } }, /* XSUM_XXH128_testdata[11084] */\n    { 3695, 0x0000000000000000ULL, { 0x62396D74B3807469ULL, 0xEC6F4D484FD2159CULL } }, /* XSUM_XXH128_testdata[11085] */\n    { 3695, 0x000000009E3779B1ULL, { 0x402EA912F27F5A48ULL, 0xA8AF258427A0AD5EULL } }, /* XSUM_XXH128_testdata[11086] */\n    { 3695, 0x9E3779B185EBCA8DULL, { 0xEB50F68A2F82600AULL, 0xA74D88B6D942F1C8ULL } }, /* XSUM_XXH128_testdata[11087] */\n    { 3696, 0x0000000000000000ULL, { 0x9DEB9F6FCB13C1D1ULL, 0x594C792643ADBB40ULL } }, /* XSUM_XXH128_testdata[11088] */\n    { 3696, 0x000000009E3779B1ULL, { 0xFAC23FC5549933B8ULL, 0xD5B1D1F5EAA483CFULL } }, /* XSUM_XXH128_testdata[11089] */\n    { 3696, 0x9E3779B185EBCA8DULL, { 0xDFD8A81D57831F5AULL, 0x0B3F37DD5554D7AFULL } }, /* XSUM_XXH128_testdata[11090] */\n    { 3697, 0x0000000000000000ULL, { 0x2BE03188E30F00BAULL, 0xFBB90C349AFFF432ULL } }, /* XSUM_XXH128_testdata[11091] */\n    { 3697, 0x000000009E3779B1ULL, { 0xE0EB68B1DC7FF598ULL, 0xF0AE23D99FB80F90ULL } }, /* XSUM_XXH128_testdata[11092] */\n    { 3697, 0x9E3779B185EBCA8DULL, { 0x6092B3B0C7B588EFULL, 0xB79A95CAE8795D1AULL } }, /* XSUM_XXH128_testdata[11093] */\n    { 3698, 0x0000000000000000ULL, { 0x5ED20B63A3F94214ULL, 0x257A05E466D84F6FULL } }, /* XSUM_XXH128_testdata[11094] */\n    { 3698, 0x000000009E3779B1ULL, { 0xBD377A5C1B2F6269ULL, 0xC9E754FA11BD558CULL } }, /* XSUM_XXH128_testdata[11095] */\n    { 3698, 0x9E3779B185EBCA8DULL, { 0x864F42F85EFE0BBAULL, 0xC92C53D2571E2D95ULL } }, /* XSUM_XXH128_testdata[11096] */\n    { 3699, 0x0000000000000000ULL, { 0xC689706F998A00C3ULL, 0x89AEA136FDF40589ULL } }, /* XSUM_XXH128_testdata[11097] */\n    { 3699, 0x000000009E3779B1ULL, { 0x01641EC35FBEC471ULL, 0x614C3C18BAC4F5FEULL } }, /* XSUM_XXH128_testdata[11098] */\n    { 3699, 0x9E3779B185EBCA8DULL, { 0x0D1883CBE5717F8FULL, 0x895CADF29EA9F979ULL } }, /* XSUM_XXH128_testdata[11099] */\n    { 3700, 0x0000000000000000ULL, { 0xE6A90433FB2F086BULL, 0x99EB8C2BE975C244ULL } }, /* XSUM_XXH128_testdata[11100] */\n    { 3700, 0x000000009E3779B1ULL, { 0x0C234634F8CA88E8ULL, 0xC25D370701707B8FULL } }, /* XSUM_XXH128_testdata[11101] */\n    { 3700, 0x9E3779B185EBCA8DULL, { 0x6AF73F6E9BE7EAD0ULL, 0xE2E3C706853538F0ULL } }, /* XSUM_XXH128_testdata[11102] */\n    { 3701, 0x0000000000000000ULL, { 0xB81DABC129DE83F4ULL, 0xDBFB88BD2A2DDCF6ULL } }, /* XSUM_XXH128_testdata[11103] */\n    { 3701, 0x000000009E3779B1ULL, { 0x4FAB0DEBFDD1D44AULL, 0x1132CA52548A89CFULL } }, /* XSUM_XXH128_testdata[11104] */\n    { 3701, 0x9E3779B185EBCA8DULL, { 0x29D4D6930E899D09ULL, 0xA0ADDA1810244685ULL } }, /* XSUM_XXH128_testdata[11105] */\n    { 3702, 0x0000000000000000ULL, { 0xE6060A782BEE1FBCULL, 0xC45ED2727BDACFC3ULL } }, /* XSUM_XXH128_testdata[11106] */\n    { 3702, 0x000000009E3779B1ULL, { 0xCAFCEBDDDD83EC32ULL, 0xAF1BE591F5096875ULL } }, /* XSUM_XXH128_testdata[11107] */\n    { 3702, 0x9E3779B185EBCA8DULL, { 0xF9BE6AAA96953CE4ULL, 0xEB082ADC95257388ULL } }, /* XSUM_XXH128_testdata[11108] */\n    { 3703, 0x0000000000000000ULL, { 0xE6F3FEB5D81374C0ULL, 0x7F080EEA3367CD1EULL } }, /* XSUM_XXH128_testdata[11109] */\n    { 3703, 0x000000009E3779B1ULL, { 0xD9510A16BB57474FULL, 0x01139823C75A1FFDULL } }, /* XSUM_XXH128_testdata[11110] */\n    { 3703, 0x9E3779B185EBCA8DULL, { 0x1BD0294C74993124ULL, 0x328FBEF870FBCF64ULL } }, /* XSUM_XXH128_testdata[11111] */\n    { 3704, 0x0000000000000000ULL, { 0xC338F23B324DBB9AULL, 0x1A2C25CDCCE33CCEULL } }, /* XSUM_XXH128_testdata[11112] */\n    { 3704, 0x000000009E3779B1ULL, { 0xD3E391B47A03D266ULL, 0x910E15ED2131E165ULL } }, /* XSUM_XXH128_testdata[11113] */\n    { 3704, 0x9E3779B185EBCA8DULL, { 0x8F4146188F8CE740ULL, 0x4A351501CBF42652ULL } }, /* XSUM_XXH128_testdata[11114] */\n    { 3705, 0x0000000000000000ULL, { 0xA7A142E3469E3183ULL, 0x55E4C4CE17460E8DULL } }, /* XSUM_XXH128_testdata[11115] */\n    { 3705, 0x000000009E3779B1ULL, { 0xF32F602BD23DF6CEULL, 0x3F7102169F8B11FCULL } }, /* XSUM_XXH128_testdata[11116] */\n    { 3705, 0x9E3779B185EBCA8DULL, { 0x0624F76D4D087EA7ULL, 0x34CC8202D9AF29A6ULL } }, /* XSUM_XXH128_testdata[11117] */\n    { 3706, 0x0000000000000000ULL, { 0x7827841051328D85ULL, 0xAECA716A3EEB4BDDULL } }, /* XSUM_XXH128_testdata[11118] */\n    { 3706, 0x000000009E3779B1ULL, { 0x830ED17C80C0520FULL, 0x31354A575A57AA2AULL } }, /* XSUM_XXH128_testdata[11119] */\n    { 3706, 0x9E3779B185EBCA8DULL, { 0xE84DA382E63CBC76ULL, 0xE36207F771C2CE25ULL } }, /* XSUM_XXH128_testdata[11120] */\n    { 3707, 0x0000000000000000ULL, { 0xF1A2459F1B360D44ULL, 0xA08B8441971C5497ULL } }, /* XSUM_XXH128_testdata[11121] */\n    { 3707, 0x000000009E3779B1ULL, { 0x88F047D9A53EA8C8ULL, 0x50E0D87F0259FA74ULL } }, /* XSUM_XXH128_testdata[11122] */\n    { 3707, 0x9E3779B185EBCA8DULL, { 0x91E6043E763B72ADULL, 0x2B20CEBE77793B80ULL } }, /* XSUM_XXH128_testdata[11123] */\n    { 3708, 0x0000000000000000ULL, { 0x693FE3C3A8505B5AULL, 0x4E203AEFAC6178CBULL } }, /* XSUM_XXH128_testdata[11124] */\n    { 3708, 0x000000009E3779B1ULL, { 0xC4EEB317DB50CBEFULL, 0x4AEA568C4B000E22ULL } }, /* XSUM_XXH128_testdata[11125] */\n    { 3708, 0x9E3779B185EBCA8DULL, { 0x065560626340E3CEULL, 0xAAB0B2B97DD7F346ULL } }, /* XSUM_XXH128_testdata[11126] */\n    { 3709, 0x0000000000000000ULL, { 0xE652AD737192EBA9ULL, 0xF30170769072EB1FULL } }, /* XSUM_XXH128_testdata[11127] */\n    { 3709, 0x000000009E3779B1ULL, { 0xEEA59007AAEC0212ULL, 0x11FA26C6D68AC054ULL } }, /* XSUM_XXH128_testdata[11128] */\n    { 3709, 0x9E3779B185EBCA8DULL, { 0x40800D8F73C138C6ULL, 0x0106A0DD05D83A52ULL } }, /* XSUM_XXH128_testdata[11129] */\n    { 3710, 0x0000000000000000ULL, { 0x0D0354875972AADAULL, 0x24A5F9E4EB8B1718ULL } }, /* XSUM_XXH128_testdata[11130] */\n    { 3710, 0x000000009E3779B1ULL, { 0xBE7366B05E324954ULL, 0x297FAD49F5712780ULL } }, /* XSUM_XXH128_testdata[11131] */\n    { 3710, 0x9E3779B185EBCA8DULL, { 0x6F84F6348BF70FACULL, 0xEBB798C76E5A0AF3ULL } }, /* XSUM_XXH128_testdata[11132] */\n    { 3711, 0x0000000000000000ULL, { 0x9485A0B8934E04EAULL, 0x96B8A5A4C63D0A28ULL } }, /* XSUM_XXH128_testdata[11133] */\n    { 3711, 0x000000009E3779B1ULL, { 0xC574187EAF37148AULL, 0xA4BE862E7A1250A7ULL } }, /* XSUM_XXH128_testdata[11134] */\n    { 3711, 0x9E3779B185EBCA8DULL, { 0x2B7E3B2F33D0CAB6ULL, 0xF453917AFC16CE22ULL } }, /* XSUM_XXH128_testdata[11135] */\n    { 3712, 0x0000000000000000ULL, { 0x09A90CC714E0F0C3ULL, 0xF1F168CDB474C1B4ULL } }, /* XSUM_XXH128_testdata[11136] */\n    { 3712, 0x000000009E3779B1ULL, { 0x4BD8775AFD48E8EBULL, 0xCA7D2D7BBA8BCFADULL } }, /* XSUM_XXH128_testdata[11137] */\n    { 3712, 0x9E3779B185EBCA8DULL, { 0xE2E4513A65CE25ACULL, 0xC557C7EB0C962ED3ULL } }, /* XSUM_XXH128_testdata[11138] */\n    { 3713, 0x0000000000000000ULL, { 0x02CDD57D95AEEBC3ULL, 0xC138BDCB896F8107ULL } }, /* XSUM_XXH128_testdata[11139] */\n    { 3713, 0x000000009E3779B1ULL, { 0x4E520BE8DFDA562DULL, 0xE17B90789F98F7A9ULL } }, /* XSUM_XXH128_testdata[11140] */\n    { 3713, 0x9E3779B185EBCA8DULL, { 0x5D2B0E22E2A986EAULL, 0x2BD5B37424704DC6ULL } }, /* XSUM_XXH128_testdata[11141] */\n    { 3714, 0x0000000000000000ULL, { 0xD98F7052D7F549F3ULL, 0x4EC9F43C988E86FAULL } }, /* XSUM_XXH128_testdata[11142] */\n    { 3714, 0x000000009E3779B1ULL, { 0x6471907F59974045ULL, 0xDEA3B49A998CD9EBULL } }, /* XSUM_XXH128_testdata[11143] */\n    { 3714, 0x9E3779B185EBCA8DULL, { 0xFC8CC370A4791CD8ULL, 0xB2AA960AFD2941EAULL } }, /* XSUM_XXH128_testdata[11144] */\n    { 3715, 0x0000000000000000ULL, { 0x3FE8B5DBACBB95B0ULL, 0xC3110738D76A7A07ULL } }, /* XSUM_XXH128_testdata[11145] */\n    { 3715, 0x000000009E3779B1ULL, { 0xA428C1BEA5A6C4C6ULL, 0x55711E714FB2745DULL } }, /* XSUM_XXH128_testdata[11146] */\n    { 3715, 0x9E3779B185EBCA8DULL, { 0x30CD4C3BD9D73599ULL, 0x78D94484E9F9B289ULL } }, /* XSUM_XXH128_testdata[11147] */\n    { 3716, 0x0000000000000000ULL, { 0x513C9DABFD807F3CULL, 0x87C45213450A1E34ULL } }, /* XSUM_XXH128_testdata[11148] */\n    { 3716, 0x000000009E3779B1ULL, { 0x37DACA18D922873CULL, 0x00A4F22FD0ACD18DULL } }, /* XSUM_XXH128_testdata[11149] */\n    { 3716, 0x9E3779B185EBCA8DULL, { 0x4FC039FA36A3F823ULL, 0x26473A2F90B1C297ULL } }, /* XSUM_XXH128_testdata[11150] */\n    { 3717, 0x0000000000000000ULL, { 0xB43EE4662B6EFCBEULL, 0x50BE339423150FB3ULL } }, /* XSUM_XXH128_testdata[11151] */\n    { 3717, 0x000000009E3779B1ULL, { 0xDACB24E79572481AULL, 0xF50064695F7C0402ULL } }, /* XSUM_XXH128_testdata[11152] */\n    { 3717, 0x9E3779B185EBCA8DULL, { 0xDFF9F622B896974AULL, 0x5F8FEE5FC1FEA621ULL } }, /* XSUM_XXH128_testdata[11153] */\n    { 3718, 0x0000000000000000ULL, { 0x4526037CC817421EULL, 0xE53A8C7C1477B9A9ULL } }, /* XSUM_XXH128_testdata[11154] */\n    { 3718, 0x000000009E3779B1ULL, { 0x2185F18D9E5D5DFFULL, 0xEB70572168F7EA32ULL } }, /* XSUM_XXH128_testdata[11155] */\n    { 3718, 0x9E3779B185EBCA8DULL, { 0x49D4604E10E46CA3ULL, 0x96A138320FA0D57CULL } }, /* XSUM_XXH128_testdata[11156] */\n    { 3719, 0x0000000000000000ULL, { 0xEF0783A5717C5158ULL, 0xDA9D0B5C4F931D32ULL } }, /* XSUM_XXH128_testdata[11157] */\n    { 3719, 0x000000009E3779B1ULL, { 0xA5D65AA8994608C2ULL, 0x01C555158359ED00ULL } }, /* XSUM_XXH128_testdata[11158] */\n    { 3719, 0x9E3779B185EBCA8DULL, { 0x1CA3A0942FAA5299ULL, 0x4A1F6FBCE0C4AEC3ULL } }, /* XSUM_XXH128_testdata[11159] */\n    { 3720, 0x0000000000000000ULL, { 0x89A84DDB6CD1153AULL, 0x793956E816899990ULL } }, /* XSUM_XXH128_testdata[11160] */\n    { 3720, 0x000000009E3779B1ULL, { 0x841A9EE5261BE25BULL, 0x6C9ACD86E749A520ULL } }, /* XSUM_XXH128_testdata[11161] */\n    { 3720, 0x9E3779B185EBCA8DULL, { 0x73897329F114958BULL, 0x187A4498F87126B3ULL } }, /* XSUM_XXH128_testdata[11162] */\n    { 3721, 0x0000000000000000ULL, { 0xCA31357C8308F48FULL, 0x3FB6E5D04140536FULL } }, /* XSUM_XXH128_testdata[11163] */\n    { 3721, 0x000000009E3779B1ULL, { 0x48515E0986862639ULL, 0x7DB753484B1FF1F5ULL } }, /* XSUM_XXH128_testdata[11164] */\n    { 3721, 0x9E3779B185EBCA8DULL, { 0x7F7547E6D51145B1ULL, 0x9C6A88029C276596ULL } }, /* XSUM_XXH128_testdata[11165] */\n    { 3722, 0x0000000000000000ULL, { 0x69FE031C6805ACA3ULL, 0x1889EBD98FF74B32ULL } }, /* XSUM_XXH128_testdata[11166] */\n    { 3722, 0x000000009E3779B1ULL, { 0xAAE937853F74D181ULL, 0x02EAA0B23E579CD5ULL } }, /* XSUM_XXH128_testdata[11167] */\n    { 3722, 0x9E3779B185EBCA8DULL, { 0xDA8A4C35AE999E31ULL, 0xAACBBCF440E65A21ULL } }, /* XSUM_XXH128_testdata[11168] */\n    { 3723, 0x0000000000000000ULL, { 0x6B3D87A525E5D55AULL, 0xD69E04F57CF7632EULL } }, /* XSUM_XXH128_testdata[11169] */\n    { 3723, 0x000000009E3779B1ULL, { 0x3588CFE2B6BA3A2AULL, 0x76DCD1B3A2B643C6ULL } }, /* XSUM_XXH128_testdata[11170] */\n    { 3723, 0x9E3779B185EBCA8DULL, { 0xA0D1DD5C643ACF76ULL, 0x76718EC0525ACA25ULL } }, /* XSUM_XXH128_testdata[11171] */\n    { 3724, 0x0000000000000000ULL, { 0x78DFC979977ACE9CULL, 0x00A547AA64884AECULL } }, /* XSUM_XXH128_testdata[11172] */\n    { 3724, 0x000000009E3779B1ULL, { 0xB172D5BB950D3853ULL, 0x358E67CD645A426CULL } }, /* XSUM_XXH128_testdata[11173] */\n    { 3724, 0x9E3779B185EBCA8DULL, { 0xA46DD8844CA63062ULL, 0x4181F6507D00BA79ULL } }, /* XSUM_XXH128_testdata[11174] */\n    { 3725, 0x0000000000000000ULL, { 0x18F749CBAE11D021ULL, 0x4BC5B536AA0579C0ULL } }, /* XSUM_XXH128_testdata[11175] */\n    { 3725, 0x000000009E3779B1ULL, { 0x6ECB7D06E06B2451ULL, 0x485FA4E1240D9854ULL } }, /* XSUM_XXH128_testdata[11176] */\n    { 3725, 0x9E3779B185EBCA8DULL, { 0xEA9174E9A43BD9A5ULL, 0x3B965463D3A88CD9ULL } }, /* XSUM_XXH128_testdata[11177] */\n    { 3726, 0x0000000000000000ULL, { 0xBA376D29BF143E24ULL, 0x75A068B10D504BD6ULL } }, /* XSUM_XXH128_testdata[11178] */\n    { 3726, 0x000000009E3779B1ULL, { 0x4E69D2723EB34C56ULL, 0x78C2E5CCF32BEA82ULL } }, /* XSUM_XXH128_testdata[11179] */\n    { 3726, 0x9E3779B185EBCA8DULL, { 0x02E273037A8F35F0ULL, 0x1E1B220C338AE746ULL } }, /* XSUM_XXH128_testdata[11180] */\n    { 3727, 0x0000000000000000ULL, { 0x55B8146358325573ULL, 0x80A376594133C6CAULL } }, /* XSUM_XXH128_testdata[11181] */\n    { 3727, 0x000000009E3779B1ULL, { 0xB226F1BAAAD52162ULL, 0x4E7080A001DBCAC4ULL } }, /* XSUM_XXH128_testdata[11182] */\n    { 3727, 0x9E3779B185EBCA8DULL, { 0x4462E034B0AD298BULL, 0x67E6BA42E50C8D6BULL } }, /* XSUM_XXH128_testdata[11183] */\n    { 3728, 0x0000000000000000ULL, { 0x59BB474966976FECULL, 0x2FECE47103072E48ULL } }, /* XSUM_XXH128_testdata[11184] */\n    { 3728, 0x000000009E3779B1ULL, { 0xC6F20EF913CDDF61ULL, 0xAF38A42791F8D6E1ULL } }, /* XSUM_XXH128_testdata[11185] */\n    { 3728, 0x9E3779B185EBCA8DULL, { 0x8A40108D3EF3BAFFULL, 0xA50124430DB90497ULL } }, /* XSUM_XXH128_testdata[11186] */\n    { 3729, 0x0000000000000000ULL, { 0xA0D47376DA73CF93ULL, 0xEBFA62F11DD716C5ULL } }, /* XSUM_XXH128_testdata[11187] */\n    { 3729, 0x000000009E3779B1ULL, { 0xA1BB769ACECA8464ULL, 0x5E0443F316FB851DULL } }, /* XSUM_XXH128_testdata[11188] */\n    { 3729, 0x9E3779B185EBCA8DULL, { 0xDC635F4DC0D43A8EULL, 0xA7AC4B036BCC527FULL } }, /* XSUM_XXH128_testdata[11189] */\n    { 3730, 0x0000000000000000ULL, { 0x04BD448733D3769CULL, 0xE3F0B0FB7F16544CULL } }, /* XSUM_XXH128_testdata[11190] */\n    { 3730, 0x000000009E3779B1ULL, { 0x0442B900D00BBA65ULL, 0x06B76FEB20D7D877ULL } }, /* XSUM_XXH128_testdata[11191] */\n    { 3730, 0x9E3779B185EBCA8DULL, { 0x8B5411EE4654B2C5ULL, 0xF2F30A75895BEE43ULL } }, /* XSUM_XXH128_testdata[11192] */\n    { 3731, 0x0000000000000000ULL, { 0xC85ECC7AF5D2B2CBULL, 0xB4A79F937EF976C6ULL } }, /* XSUM_XXH128_testdata[11193] */\n    { 3731, 0x000000009E3779B1ULL, { 0x5A8C8704D9756E55ULL, 0xF37904187EB80F86ULL } }, /* XSUM_XXH128_testdata[11194] */\n    { 3731, 0x9E3779B185EBCA8DULL, { 0xF4834D9116B0DC17ULL, 0x9E21F97DEE8DE039ULL } }, /* XSUM_XXH128_testdata[11195] */\n    { 3732, 0x0000000000000000ULL, { 0x32B2C45489FA7153ULL, 0x27D480808B0597B9ULL } }, /* XSUM_XXH128_testdata[11196] */\n    { 3732, 0x000000009E3779B1ULL, { 0x7C6998972DB6D6D4ULL, 0xDDF1727AA9F25163ULL } }, /* XSUM_XXH128_testdata[11197] */\n    { 3732, 0x9E3779B185EBCA8DULL, { 0xE5690B05A6716E8DULL, 0x74E071B1D87F9082ULL } }, /* XSUM_XXH128_testdata[11198] */\n    { 3733, 0x0000000000000000ULL, { 0x8CC202AF0213DB19ULL, 0xF6BF0432476C4B58ULL } }, /* XSUM_XXH128_testdata[11199] */\n    { 3733, 0x000000009E3779B1ULL, { 0x436EFC59CA2BD8C1ULL, 0x64FBD2A07C634084ULL } }, /* XSUM_XXH128_testdata[11200] */\n    { 3733, 0x9E3779B185EBCA8DULL, { 0x739E0B6E01D50941ULL, 0x57B630705878E87AULL } }, /* XSUM_XXH128_testdata[11201] */\n    { 3734, 0x0000000000000000ULL, { 0x614262D97FABE3B1ULL, 0x645034990D0B090FULL } }, /* XSUM_XXH128_testdata[11202] */\n    { 3734, 0x000000009E3779B1ULL, { 0xE92148814AC557A4ULL, 0xEAF74F1D0DDBFE49ULL } }, /* XSUM_XXH128_testdata[11203] */\n    { 3734, 0x9E3779B185EBCA8DULL, { 0x9E72B381D4C2B189ULL, 0x5FBBADC4C5811F03ULL } }, /* XSUM_XXH128_testdata[11204] */\n    { 3735, 0x0000000000000000ULL, { 0xE5CCCB7DE403691DULL, 0xAA392A5B567F33DFULL } }, /* XSUM_XXH128_testdata[11205] */\n    { 3735, 0x000000009E3779B1ULL, { 0x7DD1872FC9E94B28ULL, 0x60BF25858E88B9B3ULL } }, /* XSUM_XXH128_testdata[11206] */\n    { 3735, 0x9E3779B185EBCA8DULL, { 0xAFC0C48AD1328C65ULL, 0xE7881C5580BBA4A3ULL } }, /* XSUM_XXH128_testdata[11207] */\n    { 3736, 0x0000000000000000ULL, { 0x5502670C3FB7D016ULL, 0x2D9A93B8F77795B7ULL } }, /* XSUM_XXH128_testdata[11208] */\n    { 3736, 0x000000009E3779B1ULL, { 0x94EFA555BF4116B1ULL, 0x50D9E554B17A8FD5ULL } }, /* XSUM_XXH128_testdata[11209] */\n    { 3736, 0x9E3779B185EBCA8DULL, { 0x350691E72B4DD829ULL, 0x4B1923BDDE4314BBULL } }, /* XSUM_XXH128_testdata[11210] */\n    { 3737, 0x0000000000000000ULL, { 0x1C0D9132913AB65BULL, 0x6E69038E773EEB1FULL } }, /* XSUM_XXH128_testdata[11211] */\n    { 3737, 0x000000009E3779B1ULL, { 0xADE8A72CE3499388ULL, 0xD66A72871EF61321ULL } }, /* XSUM_XXH128_testdata[11212] */\n    { 3737, 0x9E3779B185EBCA8DULL, { 0x691AC974C80C9CB4ULL, 0x9D36EF32456352BAULL } }, /* XSUM_XXH128_testdata[11213] */\n    { 3738, 0x0000000000000000ULL, { 0x50928AD862FF5482ULL, 0xF73F60D7370B68E3ULL } }, /* XSUM_XXH128_testdata[11214] */\n    { 3738, 0x000000009E3779B1ULL, { 0x2C1E7B9CDEEA9873ULL, 0x979D65528BEBF5FDULL } }, /* XSUM_XXH128_testdata[11215] */\n    { 3738, 0x9E3779B185EBCA8DULL, { 0x791AB6E4E1D79DA5ULL, 0x7B9AD7D2BC28DEC4ULL } }, /* XSUM_XXH128_testdata[11216] */\n    { 3739, 0x0000000000000000ULL, { 0x788A893F3580DBB3ULL, 0xA9DDA4A81FE8FA3EULL } }, /* XSUM_XXH128_testdata[11217] */\n    { 3739, 0x000000009E3779B1ULL, { 0xD24DDE162CF3349AULL, 0xCC9F3A794E038738ULL } }, /* XSUM_XXH128_testdata[11218] */\n    { 3739, 0x9E3779B185EBCA8DULL, { 0x35A7C64D137ED697ULL, 0x1378136063A42DAEULL } }, /* XSUM_XXH128_testdata[11219] */\n    { 3740, 0x0000000000000000ULL, { 0xEF36F51A70E1176AULL, 0xA373B6F68F5F81A1ULL } }, /* XSUM_XXH128_testdata[11220] */\n    { 3740, 0x000000009E3779B1ULL, { 0xA3EFC18F66F6AD1DULL, 0xAEFF16D2078C4377ULL } }, /* XSUM_XXH128_testdata[11221] */\n    { 3740, 0x9E3779B185EBCA8DULL, { 0xD79EB7C11F7D73C7ULL, 0xE63450ED9905911CULL } }, /* XSUM_XXH128_testdata[11222] */\n    { 3741, 0x0000000000000000ULL, { 0x160D545C4F12D175ULL, 0x1D5A20F07E7620C4ULL } }, /* XSUM_XXH128_testdata[11223] */\n    { 3741, 0x000000009E3779B1ULL, { 0x1784084BA1B9D040ULL, 0x9AE7EE85F105CF79ULL } }, /* XSUM_XXH128_testdata[11224] */\n    { 3741, 0x9E3779B185EBCA8DULL, { 0x23083B142A17BCCCULL, 0x7D73DC342C3770B7ULL } }, /* XSUM_XXH128_testdata[11225] */\n    { 3742, 0x0000000000000000ULL, { 0x048D23A67900441DULL, 0x3A98E948103DDE29ULL } }, /* XSUM_XXH128_testdata[11226] */\n    { 3742, 0x000000009E3779B1ULL, { 0xEEADB50B4E0592EBULL, 0x949D4635541BA210ULL } }, /* XSUM_XXH128_testdata[11227] */\n    { 3742, 0x9E3779B185EBCA8DULL, { 0x94858FFC745EDE56ULL, 0xEDB1D652F9BA6F8AULL } }, /* XSUM_XXH128_testdata[11228] */\n    { 3743, 0x0000000000000000ULL, { 0x8F8E421BB56A72D7ULL, 0x9C4D29AB63A24A1BULL } }, /* XSUM_XXH128_testdata[11229] */\n    { 3743, 0x000000009E3779B1ULL, { 0x516E2C9CD2DA80C2ULL, 0xCD04E419C3A2F6DFULL } }, /* XSUM_XXH128_testdata[11230] */\n    { 3743, 0x9E3779B185EBCA8DULL, { 0x211E8D9A2B00DFBEULL, 0x9CEAC7BCA938E3C9ULL } }, /* XSUM_XXH128_testdata[11231] */\n    { 3744, 0x0000000000000000ULL, { 0x6FDA6CC50FFF775EULL, 0xED28AA70AE51B0B3ULL } }, /* XSUM_XXH128_testdata[11232] */\n    { 3744, 0x000000009E3779B1ULL, { 0xE325E6B60F472343ULL, 0xD6B5532DE22EF177ULL } }, /* XSUM_XXH128_testdata[11233] */\n    { 3744, 0x9E3779B185EBCA8DULL, { 0x6B9BB526E508A2A4ULL, 0xB00E7849858C8E02ULL } }, /* XSUM_XXH128_testdata[11234] */\n    { 3745, 0x0000000000000000ULL, { 0xCBE92041CADA6769ULL, 0xD2BE60A51B74F98DULL } }, /* XSUM_XXH128_testdata[11235] */\n    { 3745, 0x000000009E3779B1ULL, { 0x4E585F34477B4B8FULL, 0x6BB7D8280C91D380ULL } }, /* XSUM_XXH128_testdata[11236] */\n    { 3745, 0x9E3779B185EBCA8DULL, { 0x7A374D815AD594DBULL, 0x05B4F889632711D2ULL } }, /* XSUM_XXH128_testdata[11237] */\n    { 3746, 0x0000000000000000ULL, { 0x196895C9869F0984ULL, 0xDE642DB0DD1257F2ULL } }, /* XSUM_XXH128_testdata[11238] */\n    { 3746, 0x000000009E3779B1ULL, { 0xEB8DF83B8930DB09ULL, 0xDF5B0CF9F69D62C3ULL } }, /* XSUM_XXH128_testdata[11239] */\n    { 3746, 0x9E3779B185EBCA8DULL, { 0x8954653330AA1AEDULL, 0x5333431A220B8914ULL } }, /* XSUM_XXH128_testdata[11240] */\n    { 3747, 0x0000000000000000ULL, { 0x21DAA55D79F707B1ULL, 0x092B6BB14DB0919BULL } }, /* XSUM_XXH128_testdata[11241] */\n    { 3747, 0x000000009E3779B1ULL, { 0x38CD071C3ABBA87CULL, 0x0C3E427D8A89D0E2ULL } }, /* XSUM_XXH128_testdata[11242] */\n    { 3747, 0x9E3779B185EBCA8DULL, { 0x4066CC6D67A45999ULL, 0x1C2FE1A6D364CA44ULL } }, /* XSUM_XXH128_testdata[11243] */\n    { 3748, 0x0000000000000000ULL, { 0x216E93059BA46330ULL, 0x0133416989E276CCULL } }, /* XSUM_XXH128_testdata[11244] */\n    { 3748, 0x000000009E3779B1ULL, { 0x92AE5F315C039072ULL, 0x350D87C0EF482763ULL } }, /* XSUM_XXH128_testdata[11245] */\n    { 3748, 0x9E3779B185EBCA8DULL, { 0xA03B92EF3F4FCB50ULL, 0x7827DFC27C42667DULL } }, /* XSUM_XXH128_testdata[11246] */\n    { 3749, 0x0000000000000000ULL, { 0x17CC59CD036A9607ULL, 0x2240E28E0A33ECB7ULL } }, /* XSUM_XXH128_testdata[11247] */\n    { 3749, 0x000000009E3779B1ULL, { 0x6B9E22A936A8AC05ULL, 0x90E75538051E440DULL } }, /* XSUM_XXH128_testdata[11248] */\n    { 3749, 0x9E3779B185EBCA8DULL, { 0xC0F9FF0DD0F46AE4ULL, 0xE83204A900D53AA1ULL } }, /* XSUM_XXH128_testdata[11249] */\n    { 3750, 0x0000000000000000ULL, { 0xE386F95CAF4835E8ULL, 0xE77FFC632C8A3968ULL } }, /* XSUM_XXH128_testdata[11250] */\n    { 3750, 0x000000009E3779B1ULL, { 0xE2E23A7146297580ULL, 0xA71A0EE6AC796672ULL } }, /* XSUM_XXH128_testdata[11251] */\n    { 3750, 0x9E3779B185EBCA8DULL, { 0xBA62D59E44DCBFA7ULL, 0xCADDC509F4B2BCA7ULL } }, /* XSUM_XXH128_testdata[11252] */\n    { 3751, 0x0000000000000000ULL, { 0xEF18B53F73CD64B5ULL, 0xAC4C290DA6366B5CULL } }, /* XSUM_XXH128_testdata[11253] */\n    { 3751, 0x000000009E3779B1ULL, { 0xD90451100183BA5CULL, 0x459BE1ABD60687C2ULL } }, /* XSUM_XXH128_testdata[11254] */\n    { 3751, 0x9E3779B185EBCA8DULL, { 0xE9E2FDDFF4EB6712ULL, 0xE23F282CF45B44DCULL } }, /* XSUM_XXH128_testdata[11255] */\n    { 3752, 0x0000000000000000ULL, { 0x5E536EED5442A058ULL, 0xDF82CAF1B56336D2ULL } }, /* XSUM_XXH128_testdata[11256] */\n    { 3752, 0x000000009E3779B1ULL, { 0x2DD9979CB36BF94EULL, 0x583F78BEAAAABD4BULL } }, /* XSUM_XXH128_testdata[11257] */\n    { 3752, 0x9E3779B185EBCA8DULL, { 0xD56F640E0C162CF7ULL, 0x25AE96FA7FCBA255ULL } }, /* XSUM_XXH128_testdata[11258] */\n    { 3753, 0x0000000000000000ULL, { 0x74EF504AF879B808ULL, 0x45FE94533D025921ULL } }, /* XSUM_XXH128_testdata[11259] */\n    { 3753, 0x000000009E3779B1ULL, { 0x045D1BF56C76B3C4ULL, 0x9BB2A62D6BD90700ULL } }, /* XSUM_XXH128_testdata[11260] */\n    { 3753, 0x9E3779B185EBCA8DULL, { 0x709127F88C3DF13CULL, 0x43614B7CD5AFE794ULL } }, /* XSUM_XXH128_testdata[11261] */\n    { 3754, 0x0000000000000000ULL, { 0x31C9008085741884ULL, 0xF2E091E9654A485FULL } }, /* XSUM_XXH128_testdata[11262] */\n    { 3754, 0x000000009E3779B1ULL, { 0xAFBFA1DDC0FEB4F4ULL, 0x4982B2E21AE54EF2ULL } }, /* XSUM_XXH128_testdata[11263] */\n    { 3754, 0x9E3779B185EBCA8DULL, { 0x93365D974F825F2FULL, 0x0D9CAE33F36FBC4CULL } }, /* XSUM_XXH128_testdata[11264] */\n    { 3755, 0x0000000000000000ULL, { 0xF31CDEF874993121ULL, 0x5B5AB0F096599FCDULL } }, /* XSUM_XXH128_testdata[11265] */\n    { 3755, 0x000000009E3779B1ULL, { 0x3BE4523D6C0C4005ULL, 0x44F8F3C74158C9FEULL } }, /* XSUM_XXH128_testdata[11266] */\n    { 3755, 0x9E3779B185EBCA8DULL, { 0x3A5237AB9C4B9DABULL, 0xFAF7B7983D145F56ULL } }, /* XSUM_XXH128_testdata[11267] */\n    { 3756, 0x0000000000000000ULL, { 0x875A6A708A10D7A5ULL, 0xCFB5CA809EEDFA3AULL } }, /* XSUM_XXH128_testdata[11268] */\n    { 3756, 0x000000009E3779B1ULL, { 0xEAE38F466D89B090ULL, 0xAF8716FC1D295858ULL } }, /* XSUM_XXH128_testdata[11269] */\n    { 3756, 0x9E3779B185EBCA8DULL, { 0x647D099636D67886ULL, 0xD5199F699BEFDC51ULL } }, /* XSUM_XXH128_testdata[11270] */\n    { 3757, 0x0000000000000000ULL, { 0xDA5F418C0C48B9F3ULL, 0xFE2D0153FCBD7BF8ULL } }, /* XSUM_XXH128_testdata[11271] */\n    { 3757, 0x000000009E3779B1ULL, { 0x6D589A64E38DDB74ULL, 0xF47CD2E79222D9F4ULL } }, /* XSUM_XXH128_testdata[11272] */\n    { 3757, 0x9E3779B185EBCA8DULL, { 0xDD5E0A89173AC558ULL, 0xAF7B4C217D5403B5ULL } }, /* XSUM_XXH128_testdata[11273] */\n    { 3758, 0x0000000000000000ULL, { 0xE4FD66CE689C4C38ULL, 0x7B15F2822AFDE326ULL } }, /* XSUM_XXH128_testdata[11274] */\n    { 3758, 0x000000009E3779B1ULL, { 0xACDBDA0BA80F9121ULL, 0xDA912F5D164C2C1FULL } }, /* XSUM_XXH128_testdata[11275] */\n    { 3758, 0x9E3779B185EBCA8DULL, { 0x6B1D2773AB1C257EULL, 0xE7845F6D955ECDEFULL } }, /* XSUM_XXH128_testdata[11276] */\n    { 3759, 0x0000000000000000ULL, { 0xA33D54DF0582FDD3ULL, 0x10488296CE454F49ULL } }, /* XSUM_XXH128_testdata[11277] */\n    { 3759, 0x000000009E3779B1ULL, { 0xD20E38D7743C7502ULL, 0x76CF6887C7B0BCDCULL } }, /* XSUM_XXH128_testdata[11278] */\n    { 3759, 0x9E3779B185EBCA8DULL, { 0xBD4FD631EF67C7ACULL, 0xE4DB5E33AD8BBFB6ULL } }, /* XSUM_XXH128_testdata[11279] */\n    { 3760, 0x0000000000000000ULL, { 0xCE4B2BC11D0DD601ULL, 0xCDBFBD8E2B0E9E98ULL } }, /* XSUM_XXH128_testdata[11280] */\n    { 3760, 0x000000009E3779B1ULL, { 0x141AF48ED1DDF5B2ULL, 0x97D772B512714469ULL } }, /* XSUM_XXH128_testdata[11281] */\n    { 3760, 0x9E3779B185EBCA8DULL, { 0xE6D4C63D68AFE2E4ULL, 0xC9CB4CF6EFCEA902ULL } }, /* XSUM_XXH128_testdata[11282] */\n    { 3761, 0x0000000000000000ULL, { 0xF3ACB5DDFDC8EC24ULL, 0xC434A4CF2A319A33ULL } }, /* XSUM_XXH128_testdata[11283] */\n    { 3761, 0x000000009E3779B1ULL, { 0x25A76D887AEC9862ULL, 0x5228E15A90691AF3ULL } }, /* XSUM_XXH128_testdata[11284] */\n    { 3761, 0x9E3779B185EBCA8DULL, { 0xC44120D54A8C985BULL, 0xEAFD755338A17C9AULL } }, /* XSUM_XXH128_testdata[11285] */\n    { 3762, 0x0000000000000000ULL, { 0xE1DBF7FFD31762EDULL, 0x63F7F891B3A775DAULL } }, /* XSUM_XXH128_testdata[11286] */\n    { 3762, 0x000000009E3779B1ULL, { 0x16A36BD9E28C3411ULL, 0x78299D886F5E9C34ULL } }, /* XSUM_XXH128_testdata[11287] */\n    { 3762, 0x9E3779B185EBCA8DULL, { 0xDE71A2766082AF5CULL, 0x3EC9DE6A705B960FULL } }, /* XSUM_XXH128_testdata[11288] */\n    { 3763, 0x0000000000000000ULL, { 0x99D0CA424979CFC4ULL, 0x7E0D7CA000B7C399ULL } }, /* XSUM_XXH128_testdata[11289] */\n    { 3763, 0x000000009E3779B1ULL, { 0xB63E386399A298D4ULL, 0x29E63D91C2ECC74FULL } }, /* XSUM_XXH128_testdata[11290] */\n    { 3763, 0x9E3779B185EBCA8DULL, { 0x77DE869DB10834A6ULL, 0x7D55D3ECEEE26A18ULL } }, /* XSUM_XXH128_testdata[11291] */\n    { 3764, 0x0000000000000000ULL, { 0x975000D6E24B65AAULL, 0xDE2817EF0B8F078CULL } }, /* XSUM_XXH128_testdata[11292] */\n    { 3764, 0x000000009E3779B1ULL, { 0x3ABDCDC5BFB5C2A4ULL, 0x468E2C5B7F8CCAF2ULL } }, /* XSUM_XXH128_testdata[11293] */\n    { 3764, 0x9E3779B185EBCA8DULL, { 0x27C414411195A2B6ULL, 0x9202B8BDF7D1B09EULL } }, /* XSUM_XXH128_testdata[11294] */\n    { 3765, 0x0000000000000000ULL, { 0xA54B018E1EA523E1ULL, 0xB9FA2B16B62C3C0BULL } }, /* XSUM_XXH128_testdata[11295] */\n    { 3765, 0x000000009E3779B1ULL, { 0x589A37D2AE1F8966ULL, 0xDA0055418797F344ULL } }, /* XSUM_XXH128_testdata[11296] */\n    { 3765, 0x9E3779B185EBCA8DULL, { 0x9A3775C8860D1647ULL, 0xB9FD799F1DEF3671ULL } }, /* XSUM_XXH128_testdata[11297] */\n    { 3766, 0x0000000000000000ULL, { 0xF6CC319B0CE415ABULL, 0xE8E06D7BF1F716E1ULL } }, /* XSUM_XXH128_testdata[11298] */\n    { 3766, 0x000000009E3779B1ULL, { 0x9182DE762EFAB8C0ULL, 0xBDD0B5B243A52555ULL } }, /* XSUM_XXH128_testdata[11299] */\n    { 3766, 0x9E3779B185EBCA8DULL, { 0x43D40AFB31D7B9A4ULL, 0x8C8CCAAFABF9E82DULL } }, /* XSUM_XXH128_testdata[11300] */\n    { 3767, 0x0000000000000000ULL, { 0xC92638F48F4B4B4AULL, 0xAE1F5D31382FCD3AULL } }, /* XSUM_XXH128_testdata[11301] */\n    { 3767, 0x000000009E3779B1ULL, { 0x02430DC2F9D76778ULL, 0xCD05E23D74029EFEULL } }, /* XSUM_XXH128_testdata[11302] */\n    { 3767, 0x9E3779B185EBCA8DULL, { 0xC684479AE4E462D9ULL, 0xA0555C96A0D99C1FULL } }, /* XSUM_XXH128_testdata[11303] */\n    { 3768, 0x0000000000000000ULL, { 0xFAF863BB0FAB5D63ULL, 0xDE1238AFAA39B6B9ULL } }, /* XSUM_XXH128_testdata[11304] */\n    { 3768, 0x000000009E3779B1ULL, { 0x9260CC73DEEC55BEULL, 0x32C6C9AE257167EAULL } }, /* XSUM_XXH128_testdata[11305] */\n    { 3768, 0x9E3779B185EBCA8DULL, { 0x531FEDD7E49D2C4BULL, 0x670890DAA748411FULL } }, /* XSUM_XXH128_testdata[11306] */\n    { 3769, 0x0000000000000000ULL, { 0x936B400D1810CBF7ULL, 0x9302F8F85AE0B7A2ULL } }, /* XSUM_XXH128_testdata[11307] */\n    { 3769, 0x000000009E3779B1ULL, { 0x407ECA0F137EC118ULL, 0x8390909AB17CF0A3ULL } }, /* XSUM_XXH128_testdata[11308] */\n    { 3769, 0x9E3779B185EBCA8DULL, { 0x9489255C446C1ED3ULL, 0x326E78039F307780ULL } }, /* XSUM_XXH128_testdata[11309] */\n    { 3770, 0x0000000000000000ULL, { 0x36C6AE290EEB1E47ULL, 0xD5976CFEB7363A93ULL } }, /* XSUM_XXH128_testdata[11310] */\n    { 3770, 0x000000009E3779B1ULL, { 0xD74AEF1F3B72178EULL, 0xDFCA695A9A1A0DF3ULL } }, /* XSUM_XXH128_testdata[11311] */\n    { 3770, 0x9E3779B185EBCA8DULL, { 0xC90A24A12D3173B1ULL, 0xB7E9DEF92DDB4209ULL } }, /* XSUM_XXH128_testdata[11312] */\n    { 3771, 0x0000000000000000ULL, { 0xBD2E90F967E0ECF0ULL, 0xF58C9D4F51F721B3ULL } }, /* XSUM_XXH128_testdata[11313] */\n    { 3771, 0x000000009E3779B1ULL, { 0xA6B4BBC245B78614ULL, 0xEF295BDABDC1E162ULL } }, /* XSUM_XXH128_testdata[11314] */\n    { 3771, 0x9E3779B185EBCA8DULL, { 0xEEBCE2936136164DULL, 0x28FA56EB44BA8EBBULL } }, /* XSUM_XXH128_testdata[11315] */\n    { 3772, 0x0000000000000000ULL, { 0xE2D79A3537258580ULL, 0xED685FA9917CA0CBULL } }, /* XSUM_XXH128_testdata[11316] */\n    { 3772, 0x000000009E3779B1ULL, { 0xA3F3409C87382FFDULL, 0x4CE365779DAC9051ULL } }, /* XSUM_XXH128_testdata[11317] */\n    { 3772, 0x9E3779B185EBCA8DULL, { 0xB82F0C39B6C843BAULL, 0x29C383289508A400ULL } }, /* XSUM_XXH128_testdata[11318] */\n    { 3773, 0x0000000000000000ULL, { 0x62065EAA58ACED1FULL, 0xC6454F2B437F2075ULL } }, /* XSUM_XXH128_testdata[11319] */\n    { 3773, 0x000000009E3779B1ULL, { 0xBA4EC63A5B1259AFULL, 0x629664B198C18588ULL } }, /* XSUM_XXH128_testdata[11320] */\n    { 3773, 0x9E3779B185EBCA8DULL, { 0x7E043B40F0E105EDULL, 0x3582E238724708A3ULL } }, /* XSUM_XXH128_testdata[11321] */\n    { 3774, 0x0000000000000000ULL, { 0x4CF30A36BCB03B2EULL, 0x0DDFC31C9FC37D96ULL } }, /* XSUM_XXH128_testdata[11322] */\n    { 3774, 0x000000009E3779B1ULL, { 0x63423F901114B8B4ULL, 0x9616DC76C52D3ABEULL } }, /* XSUM_XXH128_testdata[11323] */\n    { 3774, 0x9E3779B185EBCA8DULL, { 0x0113534F920D555BULL, 0x8A381B69CF4FCA5DULL } }, /* XSUM_XXH128_testdata[11324] */\n    { 3775, 0x0000000000000000ULL, { 0x6100353633C7FE15ULL, 0x6EF3CE2854857B79ULL } }, /* XSUM_XXH128_testdata[11325] */\n    { 3775, 0x000000009E3779B1ULL, { 0x66168A0C2BCD64ECULL, 0x84C05740993A3AACULL } }, /* XSUM_XXH128_testdata[11326] */\n    { 3775, 0x9E3779B185EBCA8DULL, { 0xC6BF443448301C81ULL, 0x09E260690336897BULL } }, /* XSUM_XXH128_testdata[11327] */\n    { 3776, 0x0000000000000000ULL, { 0xE8420EE21D49B572ULL, 0x7ADC59C3769CBBE0ULL } }, /* XSUM_XXH128_testdata[11328] */\n    { 3776, 0x000000009E3779B1ULL, { 0x75C221C0FFB88069ULL, 0x7DB368262ECEFE14ULL } }, /* XSUM_XXH128_testdata[11329] */\n    { 3776, 0x9E3779B185EBCA8DULL, { 0xE3B0A466F0E12001ULL, 0xF92F3E027DB1C1E7ULL } }, /* XSUM_XXH128_testdata[11330] */\n    { 3777, 0x0000000000000000ULL, { 0xAFAA257A326E94E4ULL, 0xA2A8FE8890685564ULL } }, /* XSUM_XXH128_testdata[11331] */\n    { 3777, 0x000000009E3779B1ULL, { 0xF540B107B86A9BF3ULL, 0x4707A0E427EF2DB9ULL } }, /* XSUM_XXH128_testdata[11332] */\n    { 3777, 0x9E3779B185EBCA8DULL, { 0xFD746ED0FC69F1E7ULL, 0xFD2AA537C1DD7374ULL } }, /* XSUM_XXH128_testdata[11333] */\n    { 3778, 0x0000000000000000ULL, { 0xE9561BBFF4B01599ULL, 0xEF7DF517AF2B2976ULL } }, /* XSUM_XXH128_testdata[11334] */\n    { 3778, 0x000000009E3779B1ULL, { 0xDD89DBFEEE433155ULL, 0x31827AD72061AE41ULL } }, /* XSUM_XXH128_testdata[11335] */\n    { 3778, 0x9E3779B185EBCA8DULL, { 0xBE1594C86FAC1BF5ULL, 0xAC48E51700379EF0ULL } }, /* XSUM_XXH128_testdata[11336] */\n    { 3779, 0x0000000000000000ULL, { 0x7E8AB13F37EE7041ULL, 0x4AD153482F4A26A6ULL } }, /* XSUM_XXH128_testdata[11337] */\n    { 3779, 0x000000009E3779B1ULL, { 0x63E162E49EE0F930ULL, 0xBFFA5F4C18D0B4BBULL } }, /* XSUM_XXH128_testdata[11338] */\n    { 3779, 0x9E3779B185EBCA8DULL, { 0xD98F596960FACA4DULL, 0x980F9A1C7FA40767ULL } }, /* XSUM_XXH128_testdata[11339] */\n    { 3780, 0x0000000000000000ULL, { 0xA6BB97D10685E042ULL, 0x35A7C298B366E4F3ULL } }, /* XSUM_XXH128_testdata[11340] */\n    { 3780, 0x000000009E3779B1ULL, { 0x6D58750BAFDED0F1ULL, 0x8CB0CC728605D512ULL } }, /* XSUM_XXH128_testdata[11341] */\n    { 3780, 0x9E3779B185EBCA8DULL, { 0x77C69B6342E274D4ULL, 0x7697AA6C2B2A5F1EULL } }, /* XSUM_XXH128_testdata[11342] */\n    { 3781, 0x0000000000000000ULL, { 0xB82179D7EE7EAF5BULL, 0x165838706B00CB48ULL } }, /* XSUM_XXH128_testdata[11343] */\n    { 3781, 0x000000009E3779B1ULL, { 0xC0A74104342EC47FULL, 0x5CC70EE16F380D32ULL } }, /* XSUM_XXH128_testdata[11344] */\n    { 3781, 0x9E3779B185EBCA8DULL, { 0xF87D2038BD1BC882ULL, 0x9A71864A4FE91DB8ULL } }, /* XSUM_XXH128_testdata[11345] */\n    { 3782, 0x0000000000000000ULL, { 0x709C23CE41B289ACULL, 0xE2A694EFD3DCB74FULL } }, /* XSUM_XXH128_testdata[11346] */\n    { 3782, 0x000000009E3779B1ULL, { 0x164F5CF6D30BF3A5ULL, 0xAD84F7622C13EEAFULL } }, /* XSUM_XXH128_testdata[11347] */\n    { 3782, 0x9E3779B185EBCA8DULL, { 0xA6602D9C1A23DC28ULL, 0x7C10EC3CF3699A32ULL } }, /* XSUM_XXH128_testdata[11348] */\n    { 3783, 0x0000000000000000ULL, { 0x736F72A6C444DA78ULL, 0x7CAF8982A7B9B62AULL } }, /* XSUM_XXH128_testdata[11349] */\n    { 3783, 0x000000009E3779B1ULL, { 0x532306868BA3D715ULL, 0xC27428D1C3E220A5ULL } }, /* XSUM_XXH128_testdata[11350] */\n    { 3783, 0x9E3779B185EBCA8DULL, { 0x1CB370300838B920ULL, 0xE8A60822A89A0EE4ULL } }, /* XSUM_XXH128_testdata[11351] */\n    { 3784, 0x0000000000000000ULL, { 0x0F0D57103217BA27ULL, 0x7BFFE9C443D4B751ULL } }, /* XSUM_XXH128_testdata[11352] */\n    { 3784, 0x000000009E3779B1ULL, { 0x59C5634FAEEDC803ULL, 0x4C6173DF0D585F00ULL } }, /* XSUM_XXH128_testdata[11353] */\n    { 3784, 0x9E3779B185EBCA8DULL, { 0x64DA519F00FDA8D4ULL, 0x9B3E1646B9160E16ULL } }, /* XSUM_XXH128_testdata[11354] */\n    { 3785, 0x0000000000000000ULL, { 0x4FEE2E01ADA875C5ULL, 0xF6EB77731E60C1CBULL } }, /* XSUM_XXH128_testdata[11355] */\n    { 3785, 0x000000009E3779B1ULL, { 0x619F1086E9FB35A1ULL, 0x0A879EA3E5FAD9C1ULL } }, /* XSUM_XXH128_testdata[11356] */\n    { 3785, 0x9E3779B185EBCA8DULL, { 0x4BD896C9647748E1ULL, 0x80BAC7D0B77B9A5CULL } }, /* XSUM_XXH128_testdata[11357] */\n    { 3786, 0x0000000000000000ULL, { 0x0B815A4597CC8A93ULL, 0xF1E04E8354EFB190ULL } }, /* XSUM_XXH128_testdata[11358] */\n    { 3786, 0x000000009E3779B1ULL, { 0xE8B8AEBCA9A78505ULL, 0x5216911357B4A00AULL } }, /* XSUM_XXH128_testdata[11359] */\n    { 3786, 0x9E3779B185EBCA8DULL, { 0x179708F028180C05ULL, 0xCF244F8AEAFABA3FULL } }, /* XSUM_XXH128_testdata[11360] */\n    { 3787, 0x0000000000000000ULL, { 0x5F3AC5FDB80B57A7ULL, 0x3B5ED5FF9EF3C60DULL } }, /* XSUM_XXH128_testdata[11361] */\n    { 3787, 0x000000009E3779B1ULL, { 0x01B7EC93D0E819B3ULL, 0x2DB2B3799FB26A3FULL } }, /* XSUM_XXH128_testdata[11362] */\n    { 3787, 0x9E3779B185EBCA8DULL, { 0x37CF4C5F23A586CAULL, 0x85FE64CECDF0083EULL } }, /* XSUM_XXH128_testdata[11363] */\n    { 3788, 0x0000000000000000ULL, { 0x1B1627FE3E596885ULL, 0xA3D373EAA6A05C4FULL } }, /* XSUM_XXH128_testdata[11364] */\n    { 3788, 0x000000009E3779B1ULL, { 0xA269ED965720AF0EULL, 0x09555BA0A5CB79CEULL } }, /* XSUM_XXH128_testdata[11365] */\n    { 3788, 0x9E3779B185EBCA8DULL, { 0xBD6F7FC73C8E3F7EULL, 0x7374EB58C1CFC4B9ULL } }, /* XSUM_XXH128_testdata[11366] */\n    { 3789, 0x0000000000000000ULL, { 0x5DE097996C083E3FULL, 0xA3FB0BC562CEFB89ULL } }, /* XSUM_XXH128_testdata[11367] */\n    { 3789, 0x000000009E3779B1ULL, { 0xEA62A70F2C37023EULL, 0x956CD8322CAE7539ULL } }, /* XSUM_XXH128_testdata[11368] */\n    { 3789, 0x9E3779B185EBCA8DULL, { 0x06B38612D639C2E8ULL, 0xCDEFEA0876AEDF66ULL } }, /* XSUM_XXH128_testdata[11369] */\n    { 3790, 0x0000000000000000ULL, { 0x959D554BBC464D43ULL, 0x49ECE9B0E387EBBFULL } }, /* XSUM_XXH128_testdata[11370] */\n    { 3790, 0x000000009E3779B1ULL, { 0xF312C5A1BFFFCE54ULL, 0xDCB904D63E38364FULL } }, /* XSUM_XXH128_testdata[11371] */\n    { 3790, 0x9E3779B185EBCA8DULL, { 0xE3DB7878B20B2A65ULL, 0x5CD401FC646B5F30ULL } }, /* XSUM_XXH128_testdata[11372] */\n    { 3791, 0x0000000000000000ULL, { 0x287E3D544D49AD56ULL, 0x95748ECB2CD057D3ULL } }, /* XSUM_XXH128_testdata[11373] */\n    { 3791, 0x000000009E3779B1ULL, { 0x4FC3802422F001D0ULL, 0x08BC9B13B24829B3ULL } }, /* XSUM_XXH128_testdata[11374] */\n    { 3791, 0x9E3779B185EBCA8DULL, { 0x340C1FE8159512DCULL, 0x6B421B1AFEE6D1C5ULL } }, /* XSUM_XXH128_testdata[11375] */\n    { 3792, 0x0000000000000000ULL, { 0xFCDCF7E2D3CED00EULL, 0xC2994A0CB4B921DDULL } }, /* XSUM_XXH128_testdata[11376] */\n    { 3792, 0x000000009E3779B1ULL, { 0x83C53EE3B7510289ULL, 0xBDA5620C7D345F6BULL } }, /* XSUM_XXH128_testdata[11377] */\n    { 3792, 0x9E3779B185EBCA8DULL, { 0xF43E42D4F8E31503ULL, 0x531E01E84B65F88BULL } }, /* XSUM_XXH128_testdata[11378] */\n    { 3793, 0x0000000000000000ULL, { 0x96CF0C1327AD3362ULL, 0x3AE7607CE567A001ULL } }, /* XSUM_XXH128_testdata[11379] */\n    { 3793, 0x000000009E3779B1ULL, { 0x792B4EDE0B7CF978ULL, 0xD95270356CEDD4F9ULL } }, /* XSUM_XXH128_testdata[11380] */\n    { 3793, 0x9E3779B185EBCA8DULL, { 0x45F243F3B82BE91AULL, 0xE52F931044B372E6ULL } }, /* XSUM_XXH128_testdata[11381] */\n    { 3794, 0x0000000000000000ULL, { 0x3B565B2DE1CBABB5ULL, 0x67BC8428BB65F494ULL } }, /* XSUM_XXH128_testdata[11382] */\n    { 3794, 0x000000009E3779B1ULL, { 0x457B54F68430DCF8ULL, 0xBA5C2C68C916A7EBULL } }, /* XSUM_XXH128_testdata[11383] */\n    { 3794, 0x9E3779B185EBCA8DULL, { 0x0BCAD4FB08542609ULL, 0xB7616EC938175BD2ULL } }, /* XSUM_XXH128_testdata[11384] */\n    { 3795, 0x0000000000000000ULL, { 0xF4ED3DE0EB3AD21FULL, 0xCAABC86136634091ULL } }, /* XSUM_XXH128_testdata[11385] */\n    { 3795, 0x000000009E3779B1ULL, { 0x9F682EC04AB727B3ULL, 0x1559CC1821A75493ULL } }, /* XSUM_XXH128_testdata[11386] */\n    { 3795, 0x9E3779B185EBCA8DULL, { 0x00E30C8255DB84C8ULL, 0x1BB9FC441E693503ULL } }, /* XSUM_XXH128_testdata[11387] */\n    { 3796, 0x0000000000000000ULL, { 0x218713C9DF900B36ULL, 0x57381453BC7D0A70ULL } }, /* XSUM_XXH128_testdata[11388] */\n    { 3796, 0x000000009E3779B1ULL, { 0xD71F82AF46CB236AULL, 0x4F523B6561005C44ULL } }, /* XSUM_XXH128_testdata[11389] */\n    { 3796, 0x9E3779B185EBCA8DULL, { 0xE0E1C94010401A39ULL, 0x1E7EBDF0A97A9874ULL } }, /* XSUM_XXH128_testdata[11390] */\n    { 3797, 0x0000000000000000ULL, { 0x80041555230A1072ULL, 0x8DB7406216D37249ULL } }, /* XSUM_XXH128_testdata[11391] */\n    { 3797, 0x000000009E3779B1ULL, { 0x9395B2BE0DF5D82FULL, 0x3EBCF63C32142C64ULL } }, /* XSUM_XXH128_testdata[11392] */\n    { 3797, 0x9E3779B185EBCA8DULL, { 0x0D49454DCCCE0D97ULL, 0xF3EB96A4DAC4444BULL } }, /* XSUM_XXH128_testdata[11393] */\n    { 3798, 0x0000000000000000ULL, { 0x9DBF4F510B64A4B9ULL, 0x38B9406EC9701D59ULL } }, /* XSUM_XXH128_testdata[11394] */\n    { 3798, 0x000000009E3779B1ULL, { 0x9CACAE1B8FD02BF9ULL, 0x6293BD415A9D6DCBULL } }, /* XSUM_XXH128_testdata[11395] */\n    { 3798, 0x9E3779B185EBCA8DULL, { 0x80D908F2C666246CULL, 0x5869A68E7FA30DF3ULL } }, /* XSUM_XXH128_testdata[11396] */\n    { 3799, 0x0000000000000000ULL, { 0xCD5831EB3FAC6C57ULL, 0x8130994798006AA5ULL } }, /* XSUM_XXH128_testdata[11397] */\n    { 3799, 0x000000009E3779B1ULL, { 0x6B32D39B79029FDAULL, 0xD23E072AF57B1086ULL } }, /* XSUM_XXH128_testdata[11398] */\n    { 3799, 0x9E3779B185EBCA8DULL, { 0x8F65710EDCA4E40AULL, 0x743E66B137CEEF54ULL } }, /* XSUM_XXH128_testdata[11399] */\n    { 3800, 0x0000000000000000ULL, { 0x55319685EA231551ULL, 0xE7F5D22B693CC550ULL } }, /* XSUM_XXH128_testdata[11400] */\n    { 3800, 0x000000009E3779B1ULL, { 0x1C6353D39F53ED8DULL, 0x124A77284824D220ULL } }, /* XSUM_XXH128_testdata[11401] */\n    { 3800, 0x9E3779B185EBCA8DULL, { 0x784A06EBD5A5170CULL, 0x68B150B91B66C081ULL } }, /* XSUM_XXH128_testdata[11402] */\n    { 3801, 0x0000000000000000ULL, { 0x50DE87E1C2576530ULL, 0x23B276D7C010FBAAULL } }, /* XSUM_XXH128_testdata[11403] */\n    { 3801, 0x000000009E3779B1ULL, { 0x87320E1B490F6650ULL, 0x5061878292BE0B8EULL } }, /* XSUM_XXH128_testdata[11404] */\n    { 3801, 0x9E3779B185EBCA8DULL, { 0xDA8BA623A7F35CDBULL, 0x14312596138B8E59ULL } }, /* XSUM_XXH128_testdata[11405] */\n    { 3802, 0x0000000000000000ULL, { 0xB74AA3DC57902ECFULL, 0x2827B6BE4F3279CFULL } }, /* XSUM_XXH128_testdata[11406] */\n    { 3802, 0x000000009E3779B1ULL, { 0x7E687DF1BAD50A01ULL, 0x37319FA810D6A7ABULL } }, /* XSUM_XXH128_testdata[11407] */\n    { 3802, 0x9E3779B185EBCA8DULL, { 0xBCA030E1B7BB43B0ULL, 0xEB2C3982A3F7C8E9ULL } }, /* XSUM_XXH128_testdata[11408] */\n    { 3803, 0x0000000000000000ULL, { 0xEB098D224002D7F8ULL, 0xC651D98F26A5A008ULL } }, /* XSUM_XXH128_testdata[11409] */\n    { 3803, 0x000000009E3779B1ULL, { 0xC4B9F5E10B502EBBULL, 0x7CB3A89A95CFD356ULL } }, /* XSUM_XXH128_testdata[11410] */\n    { 3803, 0x9E3779B185EBCA8DULL, { 0x6156A394E2C83E1AULL, 0xAF38450754FE58AFULL } }, /* XSUM_XXH128_testdata[11411] */\n    { 3804, 0x0000000000000000ULL, { 0xF3F724BAB2807C29ULL, 0x9CA85B5E5CA2C8CEULL } }, /* XSUM_XXH128_testdata[11412] */\n    { 3804, 0x000000009E3779B1ULL, { 0x9B70503DCD6A45A5ULL, 0xF522A0D09AB8E1C9ULL } }, /* XSUM_XXH128_testdata[11413] */\n    { 3804, 0x9E3779B185EBCA8DULL, { 0xAA319462EB330908ULL, 0x8F6A10448A81F4B7ULL } }, /* XSUM_XXH128_testdata[11414] */\n    { 3805, 0x0000000000000000ULL, { 0x08BB557991858B15ULL, 0x22B0C27F2A4A6747ULL } }, /* XSUM_XXH128_testdata[11415] */\n    { 3805, 0x000000009E3779B1ULL, { 0x4C2F97ABF400ABD0ULL, 0xB26109D1750B5567ULL } }, /* XSUM_XXH128_testdata[11416] */\n    { 3805, 0x9E3779B185EBCA8DULL, { 0x27E91D67BEDAB3D8ULL, 0xC93AC748A8819355ULL } }, /* XSUM_XXH128_testdata[11417] */\n    { 3806, 0x0000000000000000ULL, { 0xAC1E0A06014917C1ULL, 0x3F68CBB4A87812A7ULL } }, /* XSUM_XXH128_testdata[11418] */\n    { 3806, 0x000000009E3779B1ULL, { 0x8DC1F636C4A0EE9AULL, 0x312014C9333CE70CULL } }, /* XSUM_XXH128_testdata[11419] */\n    { 3806, 0x9E3779B185EBCA8DULL, { 0x1E20BBC3E6CBBA6AULL, 0xDB2A141A1AA4D477ULL } }, /* XSUM_XXH128_testdata[11420] */\n    { 3807, 0x0000000000000000ULL, { 0x31B3D51B38C6F040ULL, 0xFCB291BBA7E42EE0ULL } }, /* XSUM_XXH128_testdata[11421] */\n    { 3807, 0x000000009E3779B1ULL, { 0xC57946DB0ED71782ULL, 0x1CF840B6DE850149ULL } }, /* XSUM_XXH128_testdata[11422] */\n    { 3807, 0x9E3779B185EBCA8DULL, { 0x66760B07932674DBULL, 0x802A2B55B1D395CEULL } }, /* XSUM_XXH128_testdata[11423] */\n    { 3808, 0x0000000000000000ULL, { 0x83C42AA57DB30E65ULL, 0x71F3A1581218A140ULL } }, /* XSUM_XXH128_testdata[11424] */\n    { 3808, 0x000000009E3779B1ULL, { 0xAD5AFC2C0996C586ULL, 0xECB09DA3EE6A7CB7ULL } }, /* XSUM_XXH128_testdata[11425] */\n    { 3808, 0x9E3779B185EBCA8DULL, { 0xADB112A57B36D6E0ULL, 0xF0A24125A1E7ED89ULL } }, /* XSUM_XXH128_testdata[11426] */\n    { 3809, 0x0000000000000000ULL, { 0xE7682750E2D6BC5AULL, 0xB1C54B2E920A4441ULL } }, /* XSUM_XXH128_testdata[11427] */\n    { 3809, 0x000000009E3779B1ULL, { 0x847674272D15BC3DULL, 0x28D0441DCA413B47ULL } }, /* XSUM_XXH128_testdata[11428] */\n    { 3809, 0x9E3779B185EBCA8DULL, { 0x4E16116791A49006ULL, 0x715AE99561DB4B23ULL } }, /* XSUM_XXH128_testdata[11429] */\n    { 3810, 0x0000000000000000ULL, { 0xE06D01D13F1FA55AULL, 0x8F5B03FA15C7A022ULL } }, /* XSUM_XXH128_testdata[11430] */\n    { 3810, 0x000000009E3779B1ULL, { 0x46D4C0DA75754224ULL, 0x529C8B2AC8CF568BULL } }, /* XSUM_XXH128_testdata[11431] */\n    { 3810, 0x9E3779B185EBCA8DULL, { 0x8BD54EB7AB491CCEULL, 0x8C645D735F1067ADULL } }, /* XSUM_XXH128_testdata[11432] */\n    { 3811, 0x0000000000000000ULL, { 0x3E830041BB06B48DULL, 0xFDC77CF6DB9DCA22ULL } }, /* XSUM_XXH128_testdata[11433] */\n    { 3811, 0x000000009E3779B1ULL, { 0xF659B5AEEB4878D5ULL, 0x371DAC24164B202EULL } }, /* XSUM_XXH128_testdata[11434] */\n    { 3811, 0x9E3779B185EBCA8DULL, { 0x40119B18809725E2ULL, 0x99BADD09006EA39AULL } }, /* XSUM_XXH128_testdata[11435] */\n    { 3812, 0x0000000000000000ULL, { 0x7CF9C48F6C725792ULL, 0x99021D87AC9BFB6FULL } }, /* XSUM_XXH128_testdata[11436] */\n    { 3812, 0x000000009E3779B1ULL, { 0x0C927CD700B6B3BCULL, 0x6449C4A4FEBDB7B9ULL } }, /* XSUM_XXH128_testdata[11437] */\n    { 3812, 0x9E3779B185EBCA8DULL, { 0xAB4CD2FE7D072F0BULL, 0xEC35C2A7C3AE8717ULL } }, /* XSUM_XXH128_testdata[11438] */\n    { 3813, 0x0000000000000000ULL, { 0xF43595034D2753A3ULL, 0x2075990F74F1B2FBULL } }, /* XSUM_XXH128_testdata[11439] */\n    { 3813, 0x000000009E3779B1ULL, { 0xDB683EB290B3FAF5ULL, 0x0F39646B31F830DDULL } }, /* XSUM_XXH128_testdata[11440] */\n    { 3813, 0x9E3779B185EBCA8DULL, { 0xFFC30A49AD2CF413ULL, 0x5E74C7C3D45422BFULL } }, /* XSUM_XXH128_testdata[11441] */\n    { 3814, 0x0000000000000000ULL, { 0x0C6760FA6000CB2EULL, 0x487D7FDA1236AB2CULL } }, /* XSUM_XXH128_testdata[11442] */\n    { 3814, 0x000000009E3779B1ULL, { 0xAFC951720F4F7AF4ULL, 0x9FFBB0B22E88AABFULL } }, /* XSUM_XXH128_testdata[11443] */\n    { 3814, 0x9E3779B185EBCA8DULL, { 0x75E30859FAAB68C3ULL, 0x4C79995DE3048A87ULL } }, /* XSUM_XXH128_testdata[11444] */\n    { 3815, 0x0000000000000000ULL, { 0x05CCA8A1304D5869ULL, 0x8FC16E429C4F96D8ULL } }, /* XSUM_XXH128_testdata[11445] */\n    { 3815, 0x000000009E3779B1ULL, { 0x769DAC7D460101E3ULL, 0x7BBB4E9C8E00F07DULL } }, /* XSUM_XXH128_testdata[11446] */\n    { 3815, 0x9E3779B185EBCA8DULL, { 0x982E92B57F6AB3CFULL, 0x0FB4787A06E3C9ADULL } }, /* XSUM_XXH128_testdata[11447] */\n    { 3816, 0x0000000000000000ULL, { 0x04741578A20F332AULL, 0xC122F41E13903794ULL } }, /* XSUM_XXH128_testdata[11448] */\n    { 3816, 0x000000009E3779B1ULL, { 0xE6B01BE96BAAEAA5ULL, 0x84A9664DCDC590BCULL } }, /* XSUM_XXH128_testdata[11449] */\n    { 3816, 0x9E3779B185EBCA8DULL, { 0x524404074ACDC1F9ULL, 0x9CDC5C159985ABF5ULL } }, /* XSUM_XXH128_testdata[11450] */\n    { 3817, 0x0000000000000000ULL, { 0x64B6259CEF4C025DULL, 0x8F285C09BD1D5283ULL } }, /* XSUM_XXH128_testdata[11451] */\n    { 3817, 0x000000009E3779B1ULL, { 0xEBD0E314D4436DDCULL, 0x5333EF6E665DA7B6ULL } }, /* XSUM_XXH128_testdata[11452] */\n    { 3817, 0x9E3779B185EBCA8DULL, { 0x95A71E8202E4ED0FULL, 0xF190822EEBFEDEF3ULL } }, /* XSUM_XXH128_testdata[11453] */\n    { 3818, 0x0000000000000000ULL, { 0x9EAC34253F826437ULL, 0x5430B70E1303D48CULL } }, /* XSUM_XXH128_testdata[11454] */\n    { 3818, 0x000000009E3779B1ULL, { 0xBDC7F393559DA295ULL, 0xBB41987CB7CE7410ULL } }, /* XSUM_XXH128_testdata[11455] */\n    { 3818, 0x9E3779B185EBCA8DULL, { 0x63154BA10CE16DDEULL, 0xAEC2112308D5F675ULL } }, /* XSUM_XXH128_testdata[11456] */\n    { 3819, 0x0000000000000000ULL, { 0x9394E2746D5D50FDULL, 0xF25932D9545DA636ULL } }, /* XSUM_XXH128_testdata[11457] */\n    { 3819, 0x000000009E3779B1ULL, { 0x21CCE0690D0AD39EULL, 0x64BD8702BE7976E3ULL } }, /* XSUM_XXH128_testdata[11458] */\n    { 3819, 0x9E3779B185EBCA8DULL, { 0x26657E7C4D0966AFULL, 0x2F378C949CE112F8ULL } }, /* XSUM_XXH128_testdata[11459] */\n    { 3820, 0x0000000000000000ULL, { 0xF49F95900FF0F64AULL, 0x9D688F4A69A58B90ULL } }, /* XSUM_XXH128_testdata[11460] */\n    { 3820, 0x000000009E3779B1ULL, { 0x37D16AFA6F6DDB98ULL, 0xB3C1426C3EC67B3AULL } }, /* XSUM_XXH128_testdata[11461] */\n    { 3820, 0x9E3779B185EBCA8DULL, { 0x50DE1AF5E0A1786BULL, 0x9564CA30E0AA4962ULL } }, /* XSUM_XXH128_testdata[11462] */\n    { 3821, 0x0000000000000000ULL, { 0xA7C52B25579548CFULL, 0x383995E747F07218ULL } }, /* XSUM_XXH128_testdata[11463] */\n    { 3821, 0x000000009E3779B1ULL, { 0x9403FFC26DF3478EULL, 0x9FFAA17F9A3A1D31ULL } }, /* XSUM_XXH128_testdata[11464] */\n    { 3821, 0x9E3779B185EBCA8DULL, { 0x803445AC31701E5BULL, 0xD3CD68E3EC343B80ULL } }, /* XSUM_XXH128_testdata[11465] */\n    { 3822, 0x0000000000000000ULL, { 0x129E4B9E7B9C4CC6ULL, 0x169DD35A2031F3F9ULL } }, /* XSUM_XXH128_testdata[11466] */\n    { 3822, 0x000000009E3779B1ULL, { 0x410BA71FB2AC7353ULL, 0x6C18DFA41CB013ABULL } }, /* XSUM_XXH128_testdata[11467] */\n    { 3822, 0x9E3779B185EBCA8DULL, { 0xDD63AE21F81D9051ULL, 0xDB2648C090C9C6A4ULL } }, /* XSUM_XXH128_testdata[11468] */\n    { 3823, 0x0000000000000000ULL, { 0xA6B93533FCF6680FULL, 0x83ADB93BB3A8D8C4ULL } }, /* XSUM_XXH128_testdata[11469] */\n    { 3823, 0x000000009E3779B1ULL, { 0x44F3FD692F0D4450ULL, 0x7D981E51573000D1ULL } }, /* XSUM_XXH128_testdata[11470] */\n    { 3823, 0x9E3779B185EBCA8DULL, { 0x238055088B737C05ULL, 0x94B279F8710EA2E1ULL } }, /* XSUM_XXH128_testdata[11471] */\n    { 3824, 0x0000000000000000ULL, { 0x15EEECA90C7D8E6CULL, 0x4C63F97ECB314D5BULL } }, /* XSUM_XXH128_testdata[11472] */\n    { 3824, 0x000000009E3779B1ULL, { 0x07DFAF4C292EA65BULL, 0x9898D53BD949E504ULL } }, /* XSUM_XXH128_testdata[11473] */\n    { 3824, 0x9E3779B185EBCA8DULL, { 0x276385508D5FE2C9ULL, 0x5A0EBA7B68D2BCAAULL } }, /* XSUM_XXH128_testdata[11474] */\n    { 3825, 0x0000000000000000ULL, { 0x5B97424C3116BBF8ULL, 0x5154B5B81ADCC7BFULL } }, /* XSUM_XXH128_testdata[11475] */\n    { 3825, 0x000000009E3779B1ULL, { 0xF619DCB73C31CE86ULL, 0xB22C9D5F35806B66ULL } }, /* XSUM_XXH128_testdata[11476] */\n    { 3825, 0x9E3779B185EBCA8DULL, { 0xF9E852C079609234ULL, 0x5F2B27A2CA6E6AE6ULL } }, /* XSUM_XXH128_testdata[11477] */\n    { 3826, 0x0000000000000000ULL, { 0x1E218240A9F6FFBFULL, 0x173799DB502D920BULL } }, /* XSUM_XXH128_testdata[11478] */\n    { 3826, 0x000000009E3779B1ULL, { 0xAB82BFEDFB0A84B8ULL, 0x72DEEFDBCC365F88ULL } }, /* XSUM_XXH128_testdata[11479] */\n    { 3826, 0x9E3779B185EBCA8DULL, { 0xEB605BFADC7BAD5EULL, 0x749C392CA88CCC3FULL } }, /* XSUM_XXH128_testdata[11480] */\n    { 3827, 0x0000000000000000ULL, { 0x602CF49EB3FBEFB2ULL, 0xB280424E07FE3B91ULL } }, /* XSUM_XXH128_testdata[11481] */\n    { 3827, 0x000000009E3779B1ULL, { 0x3BD694120F70A468ULL, 0x5069B8B0DADF603FULL } }, /* XSUM_XXH128_testdata[11482] */\n    { 3827, 0x9E3779B185EBCA8DULL, { 0xBEA5339614684102ULL, 0xEDF2164CF0391A34ULL } }, /* XSUM_XXH128_testdata[11483] */\n    { 3828, 0x0000000000000000ULL, { 0x170EE6A51721F704ULL, 0x82232B2AE41059EBULL } }, /* XSUM_XXH128_testdata[11484] */\n    { 3828, 0x000000009E3779B1ULL, { 0x7485E2711CA82409ULL, 0xA0A70099EE83A7A2ULL } }, /* XSUM_XXH128_testdata[11485] */\n    { 3828, 0x9E3779B185EBCA8DULL, { 0x8521AC2AEDFAF055ULL, 0xE410F89B8F5F4C1CULL } }, /* XSUM_XXH128_testdata[11486] */\n    { 3829, 0x0000000000000000ULL, { 0x5DBF5C8A8B7A6394ULL, 0xE797118812EE0974ULL } }, /* XSUM_XXH128_testdata[11487] */\n    { 3829, 0x000000009E3779B1ULL, { 0xAEFB1AA4CE9A52C9ULL, 0x2E05575B90FF796EULL } }, /* XSUM_XXH128_testdata[11488] */\n    { 3829, 0x9E3779B185EBCA8DULL, { 0x41BD4051EA4625BCULL, 0x5923E29329E9A852ULL } }, /* XSUM_XXH128_testdata[11489] */\n    { 3830, 0x0000000000000000ULL, { 0xBCD0DD9C11D29C74ULL, 0xED760F6C6DD9F9D2ULL } }, /* XSUM_XXH128_testdata[11490] */\n    { 3830, 0x000000009E3779B1ULL, { 0x8FE3D2B527272446ULL, 0xBD4234B96D0B8BE9ULL } }, /* XSUM_XXH128_testdata[11491] */\n    { 3830, 0x9E3779B185EBCA8DULL, { 0x2B2C509F0EEBAEEDULL, 0x2CE85745BF134499ULL } }, /* XSUM_XXH128_testdata[11492] */\n    { 3831, 0x0000000000000000ULL, { 0x8E7D6D42DE080846ULL, 0x2AA76EACD25E49FFULL } }, /* XSUM_XXH128_testdata[11493] */\n    { 3831, 0x000000009E3779B1ULL, { 0x235CAD10068D8596ULL, 0x8167469F913133C9ULL } }, /* XSUM_XXH128_testdata[11494] */\n    { 3831, 0x9E3779B185EBCA8DULL, { 0x381675387F62A07EULL, 0x20038B0D05ACE360ULL } }, /* XSUM_XXH128_testdata[11495] */\n    { 3832, 0x0000000000000000ULL, { 0x427AEEED5B81FF59ULL, 0xEB76DDF77FB90276ULL } }, /* XSUM_XXH128_testdata[11496] */\n    { 3832, 0x000000009E3779B1ULL, { 0xFB90DAB41028CC49ULL, 0x79507E73757A5798ULL } }, /* XSUM_XXH128_testdata[11497] */\n    { 3832, 0x9E3779B185EBCA8DULL, { 0xD62C95F791FD61D5ULL, 0x7EA7BA3DDFCD148DULL } }, /* XSUM_XXH128_testdata[11498] */\n    { 3833, 0x0000000000000000ULL, { 0x237BC2347EAC4315ULL, 0x5B2FC5F5142A4A3BULL } }, /* XSUM_XXH128_testdata[11499] */\n    { 3833, 0x000000009E3779B1ULL, { 0x3A4398E2BC3516B2ULL, 0x22A1A6DBD7D3D5D0ULL } }, /* XSUM_XXH128_testdata[11500] */\n    { 3833, 0x9E3779B185EBCA8DULL, { 0x24206F13857AB874ULL, 0x3C835F63314B0179ULL } }, /* XSUM_XXH128_testdata[11501] */\n    { 3834, 0x0000000000000000ULL, { 0x52B2A1456A279CA8ULL, 0xB984C6F386C3B5A3ULL } }, /* XSUM_XXH128_testdata[11502] */\n    { 3834, 0x000000009E3779B1ULL, { 0x6002603743D000F0ULL, 0xCC2C43955B94A4EBULL } }, /* XSUM_XXH128_testdata[11503] */\n    { 3834, 0x9E3779B185EBCA8DULL, { 0xA4EAB214A87374DCULL, 0xFBF6DB2C5C79EE06ULL } }, /* XSUM_XXH128_testdata[11504] */\n    { 3835, 0x0000000000000000ULL, { 0x509E1010C276C143ULL, 0x7761B229D6A2AD55ULL } }, /* XSUM_XXH128_testdata[11505] */\n    { 3835, 0x000000009E3779B1ULL, { 0x10ED521489F68F36ULL, 0xA26DB854AAFCB643ULL } }, /* XSUM_XXH128_testdata[11506] */\n    { 3835, 0x9E3779B185EBCA8DULL, { 0x0983CC6F9B4AAACCULL, 0x26B469D7F2D863E7ULL } }, /* XSUM_XXH128_testdata[11507] */\n    { 3836, 0x0000000000000000ULL, { 0xCC438962ABBABA3CULL, 0x494158B38E9AB6F9ULL } }, /* XSUM_XXH128_testdata[11508] */\n    { 3836, 0x000000009E3779B1ULL, { 0x8992096C6C1509ECULL, 0x7A445D83884D709FULL } }, /* XSUM_XXH128_testdata[11509] */\n    { 3836, 0x9E3779B185EBCA8DULL, { 0x8251BE8005D1C985ULL, 0xA860616C526D2A66ULL } }, /* XSUM_XXH128_testdata[11510] */\n    { 3837, 0x0000000000000000ULL, { 0x92910933B68434EEULL, 0xEE7F4CDDD13613F6ULL } }, /* XSUM_XXH128_testdata[11511] */\n    { 3837, 0x000000009E3779B1ULL, { 0xACF2BF62E540FF4FULL, 0x169AAE974B9B9DD6ULL } }, /* XSUM_XXH128_testdata[11512] */\n    { 3837, 0x9E3779B185EBCA8DULL, { 0xC47EED770A2B1125ULL, 0x6EA2FC2AFA4D2F95ULL } }, /* XSUM_XXH128_testdata[11513] */\n    { 3838, 0x0000000000000000ULL, { 0x4597957723960669ULL, 0x7F5294FE997916C5ULL } }, /* XSUM_XXH128_testdata[11514] */\n    { 3838, 0x000000009E3779B1ULL, { 0x4A8199406FD78A79ULL, 0xC1913579C1820924ULL } }, /* XSUM_XXH128_testdata[11515] */\n    { 3838, 0x9E3779B185EBCA8DULL, { 0x0409143A4FBCF14EULL, 0x65176E8EFEE36956ULL } }, /* XSUM_XXH128_testdata[11516] */\n    { 3839, 0x0000000000000000ULL, { 0x43E534929E376558ULL, 0xA86B25886DA77695ULL } }, /* XSUM_XXH128_testdata[11517] */\n    { 3839, 0x000000009E3779B1ULL, { 0x441271B602DFABD2ULL, 0xED70470D98AC57F0ULL } }, /* XSUM_XXH128_testdata[11518] */\n    { 3839, 0x9E3779B185EBCA8DULL, { 0xFC440769C76D630FULL, 0x0D73C43DEC667719ULL } }, /* XSUM_XXH128_testdata[11519] */\n    { 3840, 0x0000000000000000ULL, { 0xEC86F51892999868ULL, 0x448D457A5B0F6F70ULL } }, /* XSUM_XXH128_testdata[11520] */\n    { 3840, 0x000000009E3779B1ULL, { 0x51C1F0D60D35E41DULL, 0x829C4276DCA009BCULL } }, /* XSUM_XXH128_testdata[11521] */\n    { 3840, 0x9E3779B185EBCA8DULL, { 0xF59832040C6E571AULL, 0x4F07E3AD63DA1EDEULL } }, /* XSUM_XXH128_testdata[11522] */\n    { 3841, 0x0000000000000000ULL, { 0xA84A2444C316F722ULL, 0xB6AA94D572C3546DULL } }, /* XSUM_XXH128_testdata[11523] */\n    { 3841, 0x000000009E3779B1ULL, { 0x985C168D2C796AD6ULL, 0x270C761628CDE0C6ULL } }, /* XSUM_XXH128_testdata[11524] */\n    { 3841, 0x9E3779B185EBCA8DULL, { 0xAE2D8BE6079C85CAULL, 0x83168DA8BEE6B3B2ULL } }, /* XSUM_XXH128_testdata[11525] */\n    { 3842, 0x0000000000000000ULL, { 0x62E5665E92C13BA8ULL, 0x6A5A7F75E0FA8E63ULL } }, /* XSUM_XXH128_testdata[11526] */\n    { 3842, 0x000000009E3779B1ULL, { 0x3C4B840053DDD7F4ULL, 0x79372B579F778CACULL } }, /* XSUM_XXH128_testdata[11527] */\n    { 3842, 0x9E3779B185EBCA8DULL, { 0x755E4A7DE36EC52BULL, 0x0D6E0A023C80ECBBULL } }, /* XSUM_XXH128_testdata[11528] */\n    { 3843, 0x0000000000000000ULL, { 0xBE710E80296B648AULL, 0x85B99FA25FB258E3ULL } }, /* XSUM_XXH128_testdata[11529] */\n    { 3843, 0x000000009E3779B1ULL, { 0x561DDE609CD1AC8DULL, 0x619647DDD58BDF4DULL } }, /* XSUM_XXH128_testdata[11530] */\n    { 3843, 0x9E3779B185EBCA8DULL, { 0x3EC0D18D655F9064ULL, 0x4A7E1D568EA90908ULL } }, /* XSUM_XXH128_testdata[11531] */\n    { 3844, 0x0000000000000000ULL, { 0x503F019B76F1B450ULL, 0xD38DE2DED968C42AULL } }, /* XSUM_XXH128_testdata[11532] */\n    { 3844, 0x000000009E3779B1ULL, { 0xABC567B52AAAEB65ULL, 0xBB985F29E050D0E1ULL } }, /* XSUM_XXH128_testdata[11533] */\n    { 3844, 0x9E3779B185EBCA8DULL, { 0xC8657E063E5D093AULL, 0x79DE4A36D60C8F9FULL } }, /* XSUM_XXH128_testdata[11534] */\n    { 3845, 0x0000000000000000ULL, { 0xA308A478CCBF13A7ULL, 0x0F83FDB125724AC9ULL } }, /* XSUM_XXH128_testdata[11535] */\n    { 3845, 0x000000009E3779B1ULL, { 0x6E351631DE8E9ACFULL, 0x71B1136EE7912A79ULL } }, /* XSUM_XXH128_testdata[11536] */\n    { 3845, 0x9E3779B185EBCA8DULL, { 0x25D1CDAD516052B9ULL, 0x5ABE8D4B889D7310ULL } }, /* XSUM_XXH128_testdata[11537] */\n    { 3846, 0x0000000000000000ULL, { 0x0E921949350C1841ULL, 0x1CB0AC27442B6DB3ULL } }, /* XSUM_XXH128_testdata[11538] */\n    { 3846, 0x000000009E3779B1ULL, { 0x39F166A518C3EF1AULL, 0x6EEC1517D06F4FFAULL } }, /* XSUM_XXH128_testdata[11539] */\n    { 3846, 0x9E3779B185EBCA8DULL, { 0xCCFCD31C9CB44682ULL, 0x15FF8F8E8E6A3C29ULL } }, /* XSUM_XXH128_testdata[11540] */\n    { 3847, 0x0000000000000000ULL, { 0x383FE3A038136BC9ULL, 0x856C5FD4B063704AULL } }, /* XSUM_XXH128_testdata[11541] */\n    { 3847, 0x000000009E3779B1ULL, { 0xA8E00174353ADB22ULL, 0xDACE410803CEC542ULL } }, /* XSUM_XXH128_testdata[11542] */\n    { 3847, 0x9E3779B185EBCA8DULL, { 0x7FB2EE65825CB40BULL, 0xF70004EBF52C2DDDULL } }, /* XSUM_XXH128_testdata[11543] */\n    { 3848, 0x0000000000000000ULL, { 0x234261DCB7E7BD4DULL, 0x76AED66080245F9BULL } }, /* XSUM_XXH128_testdata[11544] */\n    { 3848, 0x000000009E3779B1ULL, { 0xCB3520152F876E90ULL, 0x922E1C0492CFEE36ULL } }, /* XSUM_XXH128_testdata[11545] */\n    { 3848, 0x9E3779B185EBCA8DULL, { 0x19102C68BB066747ULL, 0x2F525BF484D8A64CULL } }, /* XSUM_XXH128_testdata[11546] */\n    { 3849, 0x0000000000000000ULL, { 0x8D2300E3BC207CB3ULL, 0x947029C05BC7C2FCULL } }, /* XSUM_XXH128_testdata[11547] */\n    { 3849, 0x000000009E3779B1ULL, { 0x3DDD32366BB9CE04ULL, 0x4F1E93341C53FD7CULL } }, /* XSUM_XXH128_testdata[11548] */\n    { 3849, 0x9E3779B185EBCA8DULL, { 0x36DC82A6B9B2642AULL, 0x1F75C5AB88B51C55ULL } }, /* XSUM_XXH128_testdata[11549] */\n    { 3850, 0x0000000000000000ULL, { 0x8D186332CB70251CULL, 0x4C89E59006671627ULL } }, /* XSUM_XXH128_testdata[11550] */\n    { 3850, 0x000000009E3779B1ULL, { 0xEFC1AED3938498A1ULL, 0xC3D193328909B626ULL } }, /* XSUM_XXH128_testdata[11551] */\n    { 3850, 0x9E3779B185EBCA8DULL, { 0x3E65E06E355242C0ULL, 0x994C2718F547064DULL } }, /* XSUM_XXH128_testdata[11552] */\n    { 3851, 0x0000000000000000ULL, { 0x53204CE4BC1D9889ULL, 0x36E630E74B6C7C93ULL } }, /* XSUM_XXH128_testdata[11553] */\n    { 3851, 0x000000009E3779B1ULL, { 0x75C78A91C1835C7DULL, 0xF265ECD31C485007ULL } }, /* XSUM_XXH128_testdata[11554] */\n    { 3851, 0x9E3779B185EBCA8DULL, { 0xAA81059143B50B2FULL, 0x6D83D418E86A0EA0ULL } }, /* XSUM_XXH128_testdata[11555] */\n    { 3852, 0x0000000000000000ULL, { 0x4DAB8DEE06B52323ULL, 0x0958E9196E843706ULL } }, /* XSUM_XXH128_testdata[11556] */\n    { 3852, 0x000000009E3779B1ULL, { 0x9C55972F7CCED603ULL, 0x6B60B9C5FC8D0DF0ULL } }, /* XSUM_XXH128_testdata[11557] */\n    { 3852, 0x9E3779B185EBCA8DULL, { 0x31B0BBA5A6B97F98ULL, 0xC3E81515A31B299EULL } }, /* XSUM_XXH128_testdata[11558] */\n    { 3853, 0x0000000000000000ULL, { 0xC7FFE33A5C9C65ABULL, 0x43D87E9AD4D58750ULL } }, /* XSUM_XXH128_testdata[11559] */\n    { 3853, 0x000000009E3779B1ULL, { 0xF38CE06CD6C718B7ULL, 0xD8C975DF5ADAD0FBULL } }, /* XSUM_XXH128_testdata[11560] */\n    { 3853, 0x9E3779B185EBCA8DULL, { 0xA0D8601BA5E49E14ULL, 0x6B66A8AD1F4794E4ULL } }, /* XSUM_XXH128_testdata[11561] */\n    { 3854, 0x0000000000000000ULL, { 0xAF15FAD96D19C7DDULL, 0xA71F4548C4620F4FULL } }, /* XSUM_XXH128_testdata[11562] */\n    { 3854, 0x000000009E3779B1ULL, { 0x0C309123538C3CBDULL, 0x9D972B36EAD51004ULL } }, /* XSUM_XXH128_testdata[11563] */\n    { 3854, 0x9E3779B185EBCA8DULL, { 0x83D33F7DA75CEF8CULL, 0xF8823606BB420236ULL } }, /* XSUM_XXH128_testdata[11564] */\n    { 3855, 0x0000000000000000ULL, { 0x1B9BFCF0EA36721EULL, 0xAB84F04FE89920B5ULL } }, /* XSUM_XXH128_testdata[11565] */\n    { 3855, 0x000000009E3779B1ULL, { 0xA0B46F1D1B2BF9A7ULL, 0x7A359ACEDADE064DULL } }, /* XSUM_XXH128_testdata[11566] */\n    { 3855, 0x9E3779B185EBCA8DULL, { 0xE4EF08783106A26BULL, 0x07D43DD61CD503E8ULL } }, /* XSUM_XXH128_testdata[11567] */\n    { 3856, 0x0000000000000000ULL, { 0x6AC4E1682A031581ULL, 0x40C0EF7F7D424D2CULL } }, /* XSUM_XXH128_testdata[11568] */\n    { 3856, 0x000000009E3779B1ULL, { 0x2D0B62960F1606C4ULL, 0x92150A5FBBE4134AULL } }, /* XSUM_XXH128_testdata[11569] */\n    { 3856, 0x9E3779B185EBCA8DULL, { 0x71E05AA4C1142514ULL, 0x45AB2461857EDD9BULL } }, /* XSUM_XXH128_testdata[11570] */\n    { 3857, 0x0000000000000000ULL, { 0xD2C7E3B7B8F49DEEULL, 0xCAA6F675A62827A6ULL } }, /* XSUM_XXH128_testdata[11571] */\n    { 3857, 0x000000009E3779B1ULL, { 0xD515A18457B5E1ECULL, 0xA3FBE87F5433E6FCULL } }, /* XSUM_XXH128_testdata[11572] */\n    { 3857, 0x9E3779B185EBCA8DULL, { 0xA71331C8A5754119ULL, 0x8A919AC00A3508A7ULL } }, /* XSUM_XXH128_testdata[11573] */\n    { 3858, 0x0000000000000000ULL, { 0x7B3BABB696208617ULL, 0x16AD4E72804110B2ULL } }, /* XSUM_XXH128_testdata[11574] */\n    { 3858, 0x000000009E3779B1ULL, { 0x11A8D2E95D96B231ULL, 0xE0CA40F037A64661ULL } }, /* XSUM_XXH128_testdata[11575] */\n    { 3858, 0x9E3779B185EBCA8DULL, { 0x4A1B9140ECAC425BULL, 0xF0E6F93E7C467971ULL } }, /* XSUM_XXH128_testdata[11576] */\n    { 3859, 0x0000000000000000ULL, { 0xBA380F059564043FULL, 0x54850D42446064EBULL } }, /* XSUM_XXH128_testdata[11577] */\n    { 3859, 0x000000009E3779B1ULL, { 0x200BB2FA24F47BC4ULL, 0x44CA4E5F8E1980EBULL } }, /* XSUM_XXH128_testdata[11578] */\n    { 3859, 0x9E3779B185EBCA8DULL, { 0x494FD55DC8543FF6ULL, 0x000AF7D226898B63ULL } }, /* XSUM_XXH128_testdata[11579] */\n    { 3860, 0x0000000000000000ULL, { 0x045A951633C1CDF2ULL, 0xAB8CD7BE27BE4B22ULL } }, /* XSUM_XXH128_testdata[11580] */\n    { 3860, 0x000000009E3779B1ULL, { 0x3447225E9CAC002DULL, 0xBAABDC3AAB82C6AFULL } }, /* XSUM_XXH128_testdata[11581] */\n    { 3860, 0x9E3779B185EBCA8DULL, { 0x10AD411F18864D72ULL, 0xE97EF72ADCFC9ADDULL } }, /* XSUM_XXH128_testdata[11582] */\n    { 3861, 0x0000000000000000ULL, { 0x2F50A14FCDC278B5ULL, 0x67A63038280770F4ULL } }, /* XSUM_XXH128_testdata[11583] */\n    { 3861, 0x000000009E3779B1ULL, { 0xB6D61C2170AE10B8ULL, 0xC81AF93893D3513FULL } }, /* XSUM_XXH128_testdata[11584] */\n    { 3861, 0x9E3779B185EBCA8DULL, { 0x6B1FD754B3F65F10ULL, 0xEF51B6F0678FC60DULL } }, /* XSUM_XXH128_testdata[11585] */\n    { 3862, 0x0000000000000000ULL, { 0x504228ACB96CBB3BULL, 0x5235B3DE5EBE7F26ULL } }, /* XSUM_XXH128_testdata[11586] */\n    { 3862, 0x000000009E3779B1ULL, { 0x716FD98E7A5F235CULL, 0x26A8440771946CE9ULL } }, /* XSUM_XXH128_testdata[11587] */\n    { 3862, 0x9E3779B185EBCA8DULL, { 0xD0D7CED9AD49283FULL, 0xD62682F324372A6CULL } }, /* XSUM_XXH128_testdata[11588] */\n    { 3863, 0x0000000000000000ULL, { 0xA57C24978D1C0DF7ULL, 0x396C2B1403D770ABULL } }, /* XSUM_XXH128_testdata[11589] */\n    { 3863, 0x000000009E3779B1ULL, { 0xA6AF0C5BCF57945CULL, 0x3827325155105152ULL } }, /* XSUM_XXH128_testdata[11590] */\n    { 3863, 0x9E3779B185EBCA8DULL, { 0x1F0092DE5DE373DDULL, 0xECD4B4FAFC4DBCCEULL } }, /* XSUM_XXH128_testdata[11591] */\n    { 3864, 0x0000000000000000ULL, { 0x461A5717BB985B4DULL, 0xB0FA49504F536A70ULL } }, /* XSUM_XXH128_testdata[11592] */\n    { 3864, 0x000000009E3779B1ULL, { 0xB0589CBAD8098470ULL, 0x617EC0A2DD4CB3D6ULL } }, /* XSUM_XXH128_testdata[11593] */\n    { 3864, 0x9E3779B185EBCA8DULL, { 0xD190B446241F3B38ULL, 0xF41E27A98DDE7C30ULL } }, /* XSUM_XXH128_testdata[11594] */\n    { 3865, 0x0000000000000000ULL, { 0x6DC0045A88E940B6ULL, 0xE911A9E7D618BBF9ULL } }, /* XSUM_XXH128_testdata[11595] */\n    { 3865, 0x000000009E3779B1ULL, { 0xFFD58BD48442E84EULL, 0xA6AEEAA91602F11FULL } }, /* XSUM_XXH128_testdata[11596] */\n    { 3865, 0x9E3779B185EBCA8DULL, { 0xD57AEE654F6EB1BFULL, 0xD6668D212E019227ULL } }, /* XSUM_XXH128_testdata[11597] */\n    { 3866, 0x0000000000000000ULL, { 0xEFE0DF87729BD807ULL, 0x897B0354EA505AFCULL } }, /* XSUM_XXH128_testdata[11598] */\n    { 3866, 0x000000009E3779B1ULL, { 0xD2ED208D8CA06B27ULL, 0x8FBB8FD0F120F18DULL } }, /* XSUM_XXH128_testdata[11599] */\n    { 3866, 0x9E3779B185EBCA8DULL, { 0xAF71173D60491A3CULL, 0x5C95B7D63482E7A0ULL } }, /* XSUM_XXH128_testdata[11600] */\n    { 3867, 0x0000000000000000ULL, { 0xB3219BCAA7B285CFULL, 0x7C4FCC6BE3D1A459ULL } }, /* XSUM_XXH128_testdata[11601] */\n    { 3867, 0x000000009E3779B1ULL, { 0x99672D222121E0B8ULL, 0xF484CA58BE8294C5ULL } }, /* XSUM_XXH128_testdata[11602] */\n    { 3867, 0x9E3779B185EBCA8DULL, { 0xADDE5EDD388DC62CULL, 0x184386880E3B5B9AULL } }, /* XSUM_XXH128_testdata[11603] */\n    { 3868, 0x0000000000000000ULL, { 0x9B933F677C078864ULL, 0x11C32BAC86E70A29ULL } }, /* XSUM_XXH128_testdata[11604] */\n    { 3868, 0x000000009E3779B1ULL, { 0x39B172DE271D26AEULL, 0xB975366FDEB70AC8ULL } }, /* XSUM_XXH128_testdata[11605] */\n    { 3868, 0x9E3779B185EBCA8DULL, { 0x07D9DBB0DC842CCBULL, 0x91181FC01629F7EDULL } }, /* XSUM_XXH128_testdata[11606] */\n    { 3869, 0x0000000000000000ULL, { 0x2D58E9727B802A55ULL, 0x7003ACCDFCFB7145ULL } }, /* XSUM_XXH128_testdata[11607] */\n    { 3869, 0x000000009E3779B1ULL, { 0x5897F4667AD04CCEULL, 0x7691FAC036760521ULL } }, /* XSUM_XXH128_testdata[11608] */\n    { 3869, 0x9E3779B185EBCA8DULL, { 0x1A5D50C3938F2419ULL, 0x37BDE41031BF104AULL } }, /* XSUM_XXH128_testdata[11609] */\n    { 3870, 0x0000000000000000ULL, { 0xB3C17DD1E50D455EULL, 0x8D0A0F01F7FB9A49ULL } }, /* XSUM_XXH128_testdata[11610] */\n    { 3870, 0x000000009E3779B1ULL, { 0xFC72FE9C2A1ADD94ULL, 0xD43A24B2A1C93CE0ULL } }, /* XSUM_XXH128_testdata[11611] */\n    { 3870, 0x9E3779B185EBCA8DULL, { 0x8471229D76103349ULL, 0x459AFA19157C9993ULL } }, /* XSUM_XXH128_testdata[11612] */\n    { 3871, 0x0000000000000000ULL, { 0x5C174EC1D16D67FEULL, 0x1E50B3DF1A090722ULL } }, /* XSUM_XXH128_testdata[11613] */\n    { 3871, 0x000000009E3779B1ULL, { 0xB1D3C4FEE6616680ULL, 0xD44B6313F09B7B3DULL } }, /* XSUM_XXH128_testdata[11614] */\n    { 3871, 0x9E3779B185EBCA8DULL, { 0x82C201E346AB9BA7ULL, 0xE80D9117CC764FC3ULL } }, /* XSUM_XXH128_testdata[11615] */\n    { 3872, 0x0000000000000000ULL, { 0xE0DD0C13C002BCE5ULL, 0xF5D300A3FED58F5FULL } }, /* XSUM_XXH128_testdata[11616] */\n    { 3872, 0x000000009E3779B1ULL, { 0xB09BA9D3B2FC78A9ULL, 0x633846676EE1BD8DULL } }, /* XSUM_XXH128_testdata[11617] */\n    { 3872, 0x9E3779B185EBCA8DULL, { 0xC4233EEE0E37A52BULL, 0x82B2C815907C21C4ULL } }, /* XSUM_XXH128_testdata[11618] */\n    { 3873, 0x0000000000000000ULL, { 0x8A696B168B580A84ULL, 0x16C5ACBA53ED37FBULL } }, /* XSUM_XXH128_testdata[11619] */\n    { 3873, 0x000000009E3779B1ULL, { 0xEDC58C323E4E5500ULL, 0x74DC0CB7FFDCFE14ULL } }, /* XSUM_XXH128_testdata[11620] */\n    { 3873, 0x9E3779B185EBCA8DULL, { 0x821158749EF3576EULL, 0x8FD273097EA8C7E0ULL } }, /* XSUM_XXH128_testdata[11621] */\n    { 3874, 0x0000000000000000ULL, { 0xDFEBD1A1913389C2ULL, 0x2C893428F31F677BULL } }, /* XSUM_XXH128_testdata[11622] */\n    { 3874, 0x000000009E3779B1ULL, { 0x8368822C1DCC920EULL, 0x8C9CCB01F37F114EULL } }, /* XSUM_XXH128_testdata[11623] */\n    { 3874, 0x9E3779B185EBCA8DULL, { 0x0F50D14692814C60ULL, 0x3CBD018EE0278916ULL } }, /* XSUM_XXH128_testdata[11624] */\n    { 3875, 0x0000000000000000ULL, { 0x8B885A174EEADCF0ULL, 0x7634B4806ECF7DC2ULL } }, /* XSUM_XXH128_testdata[11625] */\n    { 3875, 0x000000009E3779B1ULL, { 0xEE9F67EF9026B375ULL, 0x9A100D77F969AA9BULL } }, /* XSUM_XXH128_testdata[11626] */\n    { 3875, 0x9E3779B185EBCA8DULL, { 0xBE08E4516752B35AULL, 0x1ACB5C750E3298F8ULL } }, /* XSUM_XXH128_testdata[11627] */\n    { 3876, 0x0000000000000000ULL, { 0x09553D435DD83629ULL, 0x0136FCDBBC38E62BULL } }, /* XSUM_XXH128_testdata[11628] */\n    { 3876, 0x000000009E3779B1ULL, { 0xA729E2008756889EULL, 0x582CF2049CC6AA1FULL } }, /* XSUM_XXH128_testdata[11629] */\n    { 3876, 0x9E3779B185EBCA8DULL, { 0xB7C4E9607A887E62ULL, 0xCA79678D11549D5CULL } }, /* XSUM_XXH128_testdata[11630] */\n    { 3877, 0x0000000000000000ULL, { 0x6DC55AA026DF9FD3ULL, 0x5D8C13AE0ECAA6B3ULL } }, /* XSUM_XXH128_testdata[11631] */\n    { 3877, 0x000000009E3779B1ULL, { 0x483767510E968471ULL, 0x4F750E8EAEC3FD41ULL } }, /* XSUM_XXH128_testdata[11632] */\n    { 3877, 0x9E3779B185EBCA8DULL, { 0x0F82F985D21275A8ULL, 0xBB4F1B80171698F5ULL } }, /* XSUM_XXH128_testdata[11633] */\n    { 3878, 0x0000000000000000ULL, { 0x0AB69E2D8FFDB433ULL, 0xA7BC8168C668F958ULL } }, /* XSUM_XXH128_testdata[11634] */\n    { 3878, 0x000000009E3779B1ULL, { 0xF5AFBC93FFF6C117ULL, 0xF83B6C0FE57158BDULL } }, /* XSUM_XXH128_testdata[11635] */\n    { 3878, 0x9E3779B185EBCA8DULL, { 0xA0BDB20607B467B0ULL, 0xA46E6FE92A5ED2F2ULL } }, /* XSUM_XXH128_testdata[11636] */\n    { 3879, 0x0000000000000000ULL, { 0xDC044E994F514388ULL, 0xB5C0AF59CD7ABA7BULL } }, /* XSUM_XXH128_testdata[11637] */\n    { 3879, 0x000000009E3779B1ULL, { 0x10E2DFEA4F271BE3ULL, 0xB15E96F02B16DEC0ULL } }, /* XSUM_XXH128_testdata[11638] */\n    { 3879, 0x9E3779B185EBCA8DULL, { 0xEE7FBF4DABA32D11ULL, 0x3D0F266B6DAAFFFFULL } }, /* XSUM_XXH128_testdata[11639] */\n    { 3880, 0x0000000000000000ULL, { 0x187666F80C00DD3BULL, 0x12D70028CC7DE0F4ULL } }, /* XSUM_XXH128_testdata[11640] */\n    { 3880, 0x000000009E3779B1ULL, { 0xD81DD7D12E0EB32DULL, 0x6CB30EBCA6FC2CBDULL } }, /* XSUM_XXH128_testdata[11641] */\n    { 3880, 0x9E3779B185EBCA8DULL, { 0x4B4E138DB039E9A6ULL, 0x42EF410C0262AF03ULL } }, /* XSUM_XXH128_testdata[11642] */\n    { 3881, 0x0000000000000000ULL, { 0x1B8C6170BA920F83ULL, 0x4C11909745309AC4ULL } }, /* XSUM_XXH128_testdata[11643] */\n    { 3881, 0x000000009E3779B1ULL, { 0x60EFCC9F9BD4AD86ULL, 0xC65399E6B598978BULL } }, /* XSUM_XXH128_testdata[11644] */\n    { 3881, 0x9E3779B185EBCA8DULL, { 0x791E308DBD22EFD9ULL, 0x5A78B484A83E997BULL } }, /* XSUM_XXH128_testdata[11645] */\n    { 3882, 0x0000000000000000ULL, { 0xF04B471039625B62ULL, 0xA7774A599C6EFC79ULL } }, /* XSUM_XXH128_testdata[11646] */\n    { 3882, 0x000000009E3779B1ULL, { 0xEED1AA994556A78DULL, 0xE071352F6F36D4F7ULL } }, /* XSUM_XXH128_testdata[11647] */\n    { 3882, 0x9E3779B185EBCA8DULL, { 0xB74488D33A785C73ULL, 0x24A6050259E800E0ULL } }, /* XSUM_XXH128_testdata[11648] */\n    { 3883, 0x0000000000000000ULL, { 0x4688B01A257F4566ULL, 0x14EEBCD6A611AF8DULL } }, /* XSUM_XXH128_testdata[11649] */\n    { 3883, 0x000000009E3779B1ULL, { 0x1AE8417C5432E3C9ULL, 0x166FF7A75CD458CEULL } }, /* XSUM_XXH128_testdata[11650] */\n    { 3883, 0x9E3779B185EBCA8DULL, { 0xEDD8269066A13BBEULL, 0x5B353F41220C0327ULL } }, /* XSUM_XXH128_testdata[11651] */\n    { 3884, 0x0000000000000000ULL, { 0x7C8BE48761A9C3A5ULL, 0x84F2C70684B42802ULL } }, /* XSUM_XXH128_testdata[11652] */\n    { 3884, 0x000000009E3779B1ULL, { 0x267298A17BE3A98DULL, 0x6E50D088B9E243F9ULL } }, /* XSUM_XXH128_testdata[11653] */\n    { 3884, 0x9E3779B185EBCA8DULL, { 0x131209234A41D5ABULL, 0x9667A50D756B11F8ULL } }, /* XSUM_XXH128_testdata[11654] */\n    { 3885, 0x0000000000000000ULL, { 0x9F9397B2208C2543ULL, 0x453EF329D9B65F05ULL } }, /* XSUM_XXH128_testdata[11655] */\n    { 3885, 0x000000009E3779B1ULL, { 0x31EB795EFE061089ULL, 0x9C053896BC792D34ULL } }, /* XSUM_XXH128_testdata[11656] */\n    { 3885, 0x9E3779B185EBCA8DULL, { 0x6640AEFF006DF4A4ULL, 0x2C662AAFEE53C777ULL } }, /* XSUM_XXH128_testdata[11657] */\n    { 3886, 0x0000000000000000ULL, { 0xB8669BF8EF126845ULL, 0xBA6DADA153EBEF7BULL } }, /* XSUM_XXH128_testdata[11658] */\n    { 3886, 0x000000009E3779B1ULL, { 0xCB6B05ED3706EA69ULL, 0xC7CEAA5721368067ULL } }, /* XSUM_XXH128_testdata[11659] */\n    { 3886, 0x9E3779B185EBCA8DULL, { 0x0A044609E706CDD7ULL, 0xDB8FFA95A8C4B929ULL } }, /* XSUM_XXH128_testdata[11660] */\n    { 3887, 0x0000000000000000ULL, { 0x4CFCD4413DD99027ULL, 0x90A231621D697345ULL } }, /* XSUM_XXH128_testdata[11661] */\n    { 3887, 0x000000009E3779B1ULL, { 0x0FEF1A3A40395A6FULL, 0x1BFA83D67571A904ULL } }, /* XSUM_XXH128_testdata[11662] */\n    { 3887, 0x9E3779B185EBCA8DULL, { 0xC44CF1C21F8CF592ULL, 0x58A7BE11FE53AAA3ULL } }, /* XSUM_XXH128_testdata[11663] */\n    { 3888, 0x0000000000000000ULL, { 0xE331E128DBB1D7D9ULL, 0x2C7DB41FC161D4E4ULL } }, /* XSUM_XXH128_testdata[11664] */\n    { 3888, 0x000000009E3779B1ULL, { 0x8633C13293A3EA0BULL, 0xF4D72FE1639B30CFULL } }, /* XSUM_XXH128_testdata[11665] */\n    { 3888, 0x9E3779B185EBCA8DULL, { 0x6EFB06CE53DE9E24ULL, 0x833899E86A9E0870ULL } }, /* XSUM_XXH128_testdata[11666] */\n    { 3889, 0x0000000000000000ULL, { 0x11D44E6082CBE4E5ULL, 0x7B0122BCC343085EULL } }, /* XSUM_XXH128_testdata[11667] */\n    { 3889, 0x000000009E3779B1ULL, { 0x9F38CF7B0056ADA9ULL, 0xAC7277DCAA1769BAULL } }, /* XSUM_XXH128_testdata[11668] */\n    { 3889, 0x9E3779B185EBCA8DULL, { 0xE35CDE98F72C647FULL, 0x6DDA7A79D9F189ACULL } }, /* XSUM_XXH128_testdata[11669] */\n    { 3890, 0x0000000000000000ULL, { 0xA1295DE3AF67B2A3ULL, 0x3F31C6D0EF5463D7ULL } }, /* XSUM_XXH128_testdata[11670] */\n    { 3890, 0x000000009E3779B1ULL, { 0x2AE4F1299B3F6ABDULL, 0xDC512917AB34B7C9ULL } }, /* XSUM_XXH128_testdata[11671] */\n    { 3890, 0x9E3779B185EBCA8DULL, { 0x3DA1793B4CED76FBULL, 0x3116DEE7207B7CDFULL } }, /* XSUM_XXH128_testdata[11672] */\n    { 3891, 0x0000000000000000ULL, { 0xBA73830B67A21E08ULL, 0x23E1BDEB7BC7AE1BULL } }, /* XSUM_XXH128_testdata[11673] */\n    { 3891, 0x000000009E3779B1ULL, { 0x7A97C2858BFA3CF6ULL, 0x39B0A3F39D09CB13ULL } }, /* XSUM_XXH128_testdata[11674] */\n    { 3891, 0x9E3779B185EBCA8DULL, { 0x3F2B72C5B004F19FULL, 0x751B2A186EAEF68EULL } }, /* XSUM_XXH128_testdata[11675] */\n    { 3892, 0x0000000000000000ULL, { 0xAC94A1510989D9B1ULL, 0x00A1374B9B09AA1BULL } }, /* XSUM_XXH128_testdata[11676] */\n    { 3892, 0x000000009E3779B1ULL, { 0x84217F6A2803F66CULL, 0xA5A8B5EFFDC57A5EULL } }, /* XSUM_XXH128_testdata[11677] */\n    { 3892, 0x9E3779B185EBCA8DULL, { 0x12858508E6900F2CULL, 0x947F03FF301DF802ULL } }, /* XSUM_XXH128_testdata[11678] */\n    { 3893, 0x0000000000000000ULL, { 0xF93FAEA85A65A233ULL, 0xA3C61D10EBDEE020ULL } }, /* XSUM_XXH128_testdata[11679] */\n    { 3893, 0x000000009E3779B1ULL, { 0x347745C4E9003090ULL, 0xF086FAB225D94499ULL } }, /* XSUM_XXH128_testdata[11680] */\n    { 3893, 0x9E3779B185EBCA8DULL, { 0x9BDB0D7C925A0E32ULL, 0xD3B1A8012E472A83ULL } }, /* XSUM_XXH128_testdata[11681] */\n    { 3894, 0x0000000000000000ULL, { 0x9CB7F6F5DA5CE644ULL, 0xAE4DD0EF725789D6ULL } }, /* XSUM_XXH128_testdata[11682] */\n    { 3894, 0x000000009E3779B1ULL, { 0x8AC343489782B48AULL, 0x20550773CE8ACC9CULL } }, /* XSUM_XXH128_testdata[11683] */\n    { 3894, 0x9E3779B185EBCA8DULL, { 0xD579E994521A5D4BULL, 0x6CA7E9E2E670C6C4ULL } }, /* XSUM_XXH128_testdata[11684] */\n    { 3895, 0x0000000000000000ULL, { 0x5325D38ABDF70B44ULL, 0x232BA5CA4C8CFD96ULL } }, /* XSUM_XXH128_testdata[11685] */\n    { 3895, 0x000000009E3779B1ULL, { 0xE673560B6D531996ULL, 0xD4489515227E676AULL } }, /* XSUM_XXH128_testdata[11686] */\n    { 3895, 0x9E3779B185EBCA8DULL, { 0xE35BCE7BB70760E5ULL, 0x6A6A58E13050D9C7ULL } }, /* XSUM_XXH128_testdata[11687] */\n    { 3896, 0x0000000000000000ULL, { 0x9BD58AC8EC762F16ULL, 0xA057FFFAA8A4A26BULL } }, /* XSUM_XXH128_testdata[11688] */\n    { 3896, 0x000000009E3779B1ULL, { 0xD642C9B4F08A4EDFULL, 0x9E51FC12E42E0D73ULL } }, /* XSUM_XXH128_testdata[11689] */\n    { 3896, 0x9E3779B185EBCA8DULL, { 0x1359A61535C77027ULL, 0x1D9AF80878DB9793ULL } }, /* XSUM_XXH128_testdata[11690] */\n    { 3897, 0x0000000000000000ULL, { 0x4E0D77736DC183D2ULL, 0x1E9D62A1A7289135ULL } }, /* XSUM_XXH128_testdata[11691] */\n    { 3897, 0x000000009E3779B1ULL, { 0x995203C2E458E909ULL, 0xA33F792EE4FEE2F8ULL } }, /* XSUM_XXH128_testdata[11692] */\n    { 3897, 0x9E3779B185EBCA8DULL, { 0x425C3F29DE942D3BULL, 0x931719A1A69C48CAULL } }, /* XSUM_XXH128_testdata[11693] */\n    { 3898, 0x0000000000000000ULL, { 0x24F2F622BF81A57EULL, 0xA2BCD4DF363B1841ULL } }, /* XSUM_XXH128_testdata[11694] */\n    { 3898, 0x000000009E3779B1ULL, { 0xD3FEAE1C4CC853A6ULL, 0xBF1BFACA122BC96AULL } }, /* XSUM_XXH128_testdata[11695] */\n    { 3898, 0x9E3779B185EBCA8DULL, { 0x2EF182AFF3828F57ULL, 0x31E90B1069B78B1DULL } }, /* XSUM_XXH128_testdata[11696] */\n    { 3899, 0x0000000000000000ULL, { 0x99FFFA13BD4D2CD9ULL, 0xDB0D204836A2DB1FULL } }, /* XSUM_XXH128_testdata[11697] */\n    { 3899, 0x000000009E3779B1ULL, { 0xDBCF2AAB90E8D4E1ULL, 0xE840741E382D75B6ULL } }, /* XSUM_XXH128_testdata[11698] */\n    { 3899, 0x9E3779B185EBCA8DULL, { 0xA0E33190010A3EA7ULL, 0xF129CB01F328A594ULL } }, /* XSUM_XXH128_testdata[11699] */\n    { 3900, 0x0000000000000000ULL, { 0x19805A069F62A49AULL, 0x4C82B088804406FCULL } }, /* XSUM_XXH128_testdata[11700] */\n    { 3900, 0x000000009E3779B1ULL, { 0xFC57BA9D64D86DD0ULL, 0x5108217BD03C7614ULL } }, /* XSUM_XXH128_testdata[11701] */\n    { 3900, 0x9E3779B185EBCA8DULL, { 0x14F3FF037E3009BDULL, 0xF6720D5A57916315ULL } }, /* XSUM_XXH128_testdata[11702] */\n    { 3901, 0x0000000000000000ULL, { 0xE09BAE0C7FFDF76EULL, 0xC60DA997D1D45385ULL } }, /* XSUM_XXH128_testdata[11703] */\n    { 3901, 0x000000009E3779B1ULL, { 0xBB0B619068644C83ULL, 0x11577724970D7C45ULL } }, /* XSUM_XXH128_testdata[11704] */\n    { 3901, 0x9E3779B185EBCA8DULL, { 0xD4D3B755157F2668ULL, 0xAD1DAC1F97741DDBULL } }, /* XSUM_XXH128_testdata[11705] */\n    { 3902, 0x0000000000000000ULL, { 0xCE34D7FB7210BC00ULL, 0xC7C798605FEA692EULL } }, /* XSUM_XXH128_testdata[11706] */\n    { 3902, 0x000000009E3779B1ULL, { 0x38C3BE91DC544C80ULL, 0x2224790F17A35E49ULL } }, /* XSUM_XXH128_testdata[11707] */\n    { 3902, 0x9E3779B185EBCA8DULL, { 0x7C16164229315FB0ULL, 0x233DB3E07FA0A5E2ULL } }, /* XSUM_XXH128_testdata[11708] */\n    { 3903, 0x0000000000000000ULL, { 0x7B13DAF4971CF1FFULL, 0x3346B16245EE855AULL } }, /* XSUM_XXH128_testdata[11709] */\n    { 3903, 0x000000009E3779B1ULL, { 0x38FDDE27E01C58BDULL, 0x2FDCA53B88742C64ULL } }, /* XSUM_XXH128_testdata[11710] */\n    { 3903, 0x9E3779B185EBCA8DULL, { 0x1C3A041D1102B153ULL, 0x6B024FDE7EAAC4CDULL } }, /* XSUM_XXH128_testdata[11711] */\n    { 3904, 0x0000000000000000ULL, { 0xBBE687851D63B3AFULL, 0x23ECFCD6535F5348ULL } }, /* XSUM_XXH128_testdata[11712] */\n    { 3904, 0x000000009E3779B1ULL, { 0x2AF40FE0FF26D23AULL, 0x916BAE1A5E26A77CULL } }, /* XSUM_XXH128_testdata[11713] */\n    { 3904, 0x9E3779B185EBCA8DULL, { 0x5470D1C9A6CCA7EFULL, 0x982E1CFE9D029AC1ULL } }, /* XSUM_XXH128_testdata[11714] */\n    { 3905, 0x0000000000000000ULL, { 0xC31F7A782896527AULL, 0xC23217FCE40E2490ULL } }, /* XSUM_XXH128_testdata[11715] */\n    { 3905, 0x000000009E3779B1ULL, { 0x04A372E548B4FCCBULL, 0xE8524F9794D9AC4EULL } }, /* XSUM_XXH128_testdata[11716] */\n    { 3905, 0x9E3779B185EBCA8DULL, { 0xA349F0FCFE77288AULL, 0xB44C856CC9B92416ULL } }, /* XSUM_XXH128_testdata[11717] */\n    { 3906, 0x0000000000000000ULL, { 0xE87F7F6E7457F2EAULL, 0xBFC023F217AD7FF2ULL } }, /* XSUM_XXH128_testdata[11718] */\n    { 3906, 0x000000009E3779B1ULL, { 0x7AAD198E5462270BULL, 0x8B4F261581E40CA7ULL } }, /* XSUM_XXH128_testdata[11719] */\n    { 3906, 0x9E3779B185EBCA8DULL, { 0xCF37E72730B3F6BFULL, 0xCEAE9408ACDF1023ULL } }, /* XSUM_XXH128_testdata[11720] */\n    { 3907, 0x0000000000000000ULL, { 0xAF7BA8F0F6BDE866ULL, 0x7E777093FAFFCFE7ULL } }, /* XSUM_XXH128_testdata[11721] */\n    { 3907, 0x000000009E3779B1ULL, { 0x2B62F2422A64C5B9ULL, 0xBE916AFC0F870D21ULL } }, /* XSUM_XXH128_testdata[11722] */\n    { 3907, 0x9E3779B185EBCA8DULL, { 0xCAB66BE2356E26B7ULL, 0x7DCD51B0F96D5B47ULL } }, /* XSUM_XXH128_testdata[11723] */\n    { 3908, 0x0000000000000000ULL, { 0xBF921BD5317E4A34ULL, 0x3D2D80C39355491CULL } }, /* XSUM_XXH128_testdata[11724] */\n    { 3908, 0x000000009E3779B1ULL, { 0x0BDCCBC396BB4DAAULL, 0x3A9A4978C71F6CC6ULL } }, /* XSUM_XXH128_testdata[11725] */\n    { 3908, 0x9E3779B185EBCA8DULL, { 0x0B66F365D26D2B03ULL, 0x38C1A4F6758AB753ULL } }, /* XSUM_XXH128_testdata[11726] */\n    { 3909, 0x0000000000000000ULL, { 0x9CB57F78F4578087ULL, 0xCAA0B0A1AFCD229FULL } }, /* XSUM_XXH128_testdata[11727] */\n    { 3909, 0x000000009E3779B1ULL, { 0xF7FE73D798514D40ULL, 0xCF2175BC74FF0AF3ULL } }, /* XSUM_XXH128_testdata[11728] */\n    { 3909, 0x9E3779B185EBCA8DULL, { 0x2CB9FE7B7E8EA2B3ULL, 0x7FCF57CCF0938548ULL } }, /* XSUM_XXH128_testdata[11729] */\n    { 3910, 0x0000000000000000ULL, { 0x3F9ECFE64F0200BCULL, 0x4E0C356C64034AC3ULL } }, /* XSUM_XXH128_testdata[11730] */\n    { 3910, 0x000000009E3779B1ULL, { 0x0CA27154C57D0F6EULL, 0xF48502B0F880A6F6ULL } }, /* XSUM_XXH128_testdata[11731] */\n    { 3910, 0x9E3779B185EBCA8DULL, { 0x141C8C489F2B039AULL, 0x0ACD69A4990E7291ULL } }, /* XSUM_XXH128_testdata[11732] */\n    { 3911, 0x0000000000000000ULL, { 0xB761FC9603EDC210ULL, 0x07F1D2D313CD850BULL } }, /* XSUM_XXH128_testdata[11733] */\n    { 3911, 0x000000009E3779B1ULL, { 0xAE3A6CC1EEB13F73ULL, 0xA49663CE9C6E6EA4ULL } }, /* XSUM_XXH128_testdata[11734] */\n    { 3911, 0x9E3779B185EBCA8DULL, { 0x1AA8771E12C97EEEULL, 0x178EFE459E9B35D9ULL } }, /* XSUM_XXH128_testdata[11735] */\n    { 3912, 0x0000000000000000ULL, { 0xCB369450ECBDBC90ULL, 0x757D75CF88B0C931ULL } }, /* XSUM_XXH128_testdata[11736] */\n    { 3912, 0x000000009E3779B1ULL, { 0x0577D7CE99CEFE0AULL, 0xB82683469E78B623ULL } }, /* XSUM_XXH128_testdata[11737] */\n    { 3912, 0x9E3779B185EBCA8DULL, { 0x9E0687BFC2CF96CAULL, 0x5861DEC8A4F95072ULL } }, /* XSUM_XXH128_testdata[11738] */\n    { 3913, 0x0000000000000000ULL, { 0x431E499D64D673F6ULL, 0xB2A67AE8A3C7CDF3ULL } }, /* XSUM_XXH128_testdata[11739] */\n    { 3913, 0x000000009E3779B1ULL, { 0xB5A3A2B3AD8B469EULL, 0x19A1D95BFCA4FC64ULL } }, /* XSUM_XXH128_testdata[11740] */\n    { 3913, 0x9E3779B185EBCA8DULL, { 0x4FAF932DB8149ACCULL, 0x4160A5CEE75A817FULL } }, /* XSUM_XXH128_testdata[11741] */\n    { 3914, 0x0000000000000000ULL, { 0xE6D911BC72C6AE51ULL, 0x9DCBC28F27F6C47AULL } }, /* XSUM_XXH128_testdata[11742] */\n    { 3914, 0x000000009E3779B1ULL, { 0x98D107A1A27CABAEULL, 0x091EAEBA924C9A10ULL } }, /* XSUM_XXH128_testdata[11743] */\n    { 3914, 0x9E3779B185EBCA8DULL, { 0xE2BF052CEF79FF47ULL, 0x6FD9207F56E53448ULL } }, /* XSUM_XXH128_testdata[11744] */\n    { 3915, 0x0000000000000000ULL, { 0x79C6F6782413023AULL, 0x87B3008DBCB73982ULL } }, /* XSUM_XXH128_testdata[11745] */\n    { 3915, 0x000000009E3779B1ULL, { 0xB9B005E2DBA0B5F6ULL, 0x2BA66985CC459CFEULL } }, /* XSUM_XXH128_testdata[11746] */\n    { 3915, 0x9E3779B185EBCA8DULL, { 0x1B3809FE35FE127EULL, 0x34108F63AD03D2EFULL } }, /* XSUM_XXH128_testdata[11747] */\n    { 3916, 0x0000000000000000ULL, { 0xEF8F193FDB2112A3ULL, 0x2F10749BC3A75FE1ULL } }, /* XSUM_XXH128_testdata[11748] */\n    { 3916, 0x000000009E3779B1ULL, { 0x4031502C08D8F2EEULL, 0xC34CD81D37D628B2ULL } }, /* XSUM_XXH128_testdata[11749] */\n    { 3916, 0x9E3779B185EBCA8DULL, { 0x98AD7D5406A19295ULL, 0x01A1666B938A9161ULL } }, /* XSUM_XXH128_testdata[11750] */\n    { 3917, 0x0000000000000000ULL, { 0x69FB09EAA27F3706ULL, 0xE4ADB55C11AA77D9ULL } }, /* XSUM_XXH128_testdata[11751] */\n    { 3917, 0x000000009E3779B1ULL, { 0x5A22BC3B03D1DCBCULL, 0xF218DAA82F3327F0ULL } }, /* XSUM_XXH128_testdata[11752] */\n    { 3917, 0x9E3779B185EBCA8DULL, { 0x03163CABD1527F68ULL, 0x068956DFF5C6481EULL } }, /* XSUM_XXH128_testdata[11753] */\n    { 3918, 0x0000000000000000ULL, { 0x7D8DD4199BED3A35ULL, 0x0D606CC902A48651ULL } }, /* XSUM_XXH128_testdata[11754] */\n    { 3918, 0x000000009E3779B1ULL, { 0xE7B86753ED059A50ULL, 0xE8EA58083D463FBDULL } }, /* XSUM_XXH128_testdata[11755] */\n    { 3918, 0x9E3779B185EBCA8DULL, { 0xBC4F45AE3E4BEBE9ULL, 0x2ED692A9256D0F54ULL } }, /* XSUM_XXH128_testdata[11756] */\n    { 3919, 0x0000000000000000ULL, { 0x8C8101E9DF878947ULL, 0xC703806F8C5BDB12ULL } }, /* XSUM_XXH128_testdata[11757] */\n    { 3919, 0x000000009E3779B1ULL, { 0x1DFDBB3B962FC30AULL, 0x72ACA0CC0019DE47ULL } }, /* XSUM_XXH128_testdata[11758] */\n    { 3919, 0x9E3779B185EBCA8DULL, { 0x0D012DC456C35931ULL, 0x2BC917D90C3A67E3ULL } }, /* XSUM_XXH128_testdata[11759] */\n    { 3920, 0x0000000000000000ULL, { 0x256E7D270201A5F8ULL, 0x1BC0578432B6D166ULL } }, /* XSUM_XXH128_testdata[11760] */\n    { 3920, 0x000000009E3779B1ULL, { 0x086F0B405B2B717BULL, 0x7CF078BB18DD10ACULL } }, /* XSUM_XXH128_testdata[11761] */\n    { 3920, 0x9E3779B185EBCA8DULL, { 0x2594B97E220C378CULL, 0x7A2202350DBBED2CULL } }, /* XSUM_XXH128_testdata[11762] */\n    { 3921, 0x0000000000000000ULL, { 0x2413C09AA63529D4ULL, 0xE0FF53AC442D02F7ULL } }, /* XSUM_XXH128_testdata[11763] */\n    { 3921, 0x000000009E3779B1ULL, { 0x26063C593C4AB85EULL, 0xC4C1D386D5E0DDD0ULL } }, /* XSUM_XXH128_testdata[11764] */\n    { 3921, 0x9E3779B185EBCA8DULL, { 0xAE6981E821162C41ULL, 0xDB14B7D11811A0B1ULL } }, /* XSUM_XXH128_testdata[11765] */\n    { 3922, 0x0000000000000000ULL, { 0x1B4729EEA242B464ULL, 0x0B613FAA48910593ULL } }, /* XSUM_XXH128_testdata[11766] */\n    { 3922, 0x000000009E3779B1ULL, { 0xB17848B81E471979ULL, 0xFA29B30DFEAD7E37ULL } }, /* XSUM_XXH128_testdata[11767] */\n    { 3922, 0x9E3779B185EBCA8DULL, { 0x2DE6748B08EF0008ULL, 0x9BA7A305151E29FCULL } }, /* XSUM_XXH128_testdata[11768] */\n    { 3923, 0x0000000000000000ULL, { 0x5D3C90B72C299E81ULL, 0xA2EB4D09EB763472ULL } }, /* XSUM_XXH128_testdata[11769] */\n    { 3923, 0x000000009E3779B1ULL, { 0x2BC4CDC35767F969ULL, 0xAF893907BE463249ULL } }, /* XSUM_XXH128_testdata[11770] */\n    { 3923, 0x9E3779B185EBCA8DULL, { 0xA080487A07FE5B1BULL, 0xE1503B4C64A907BFULL } }, /* XSUM_XXH128_testdata[11771] */\n    { 3924, 0x0000000000000000ULL, { 0x7CABA0FF1828406EULL, 0xD253201FB2E5A6E6ULL } }, /* XSUM_XXH128_testdata[11772] */\n    { 3924, 0x000000009E3779B1ULL, { 0xCF52261ACD2A973BULL, 0x7E80112FFB7C879EULL } }, /* XSUM_XXH128_testdata[11773] */\n    { 3924, 0x9E3779B185EBCA8DULL, { 0xAD0EB6A479FE5234ULL, 0xCBCB6AE6963031D9ULL } }, /* XSUM_XXH128_testdata[11774] */\n    { 3925, 0x0000000000000000ULL, { 0x34849449A343A369ULL, 0xCA0C6D77D2BCFF01ULL } }, /* XSUM_XXH128_testdata[11775] */\n    { 3925, 0x000000009E3779B1ULL, { 0xF1B2FE539DE1BD78ULL, 0x25DD5C5A7F109A57ULL } }, /* XSUM_XXH128_testdata[11776] */\n    { 3925, 0x9E3779B185EBCA8DULL, { 0x1AB002D4AE5A96C6ULL, 0xAC75326380C94E20ULL } }, /* XSUM_XXH128_testdata[11777] */\n    { 3926, 0x0000000000000000ULL, { 0x821338A8BDB22901ULL, 0xDEE48B2BE52BBDCDULL } }, /* XSUM_XXH128_testdata[11778] */\n    { 3926, 0x000000009E3779B1ULL, { 0xFA125E981F0765E1ULL, 0xF688DBBB8865E8C7ULL } }, /* XSUM_XXH128_testdata[11779] */\n    { 3926, 0x9E3779B185EBCA8DULL, { 0xD9304221475D4F53ULL, 0xF7AF17857A1871EBULL } }, /* XSUM_XXH128_testdata[11780] */\n    { 3927, 0x0000000000000000ULL, { 0x711649750101681CULL, 0x641D020DF6935613ULL } }, /* XSUM_XXH128_testdata[11781] */\n    { 3927, 0x000000009E3779B1ULL, { 0x4B48416C231B90E7ULL, 0x3CC2D6A184F7473BULL } }, /* XSUM_XXH128_testdata[11782] */\n    { 3927, 0x9E3779B185EBCA8DULL, { 0x6400186109233657ULL, 0xA4C910A50E210C18ULL } }, /* XSUM_XXH128_testdata[11783] */\n    { 3928, 0x0000000000000000ULL, { 0x1EF643BB4D6280AEULL, 0xF504991A89229F5FULL } }, /* XSUM_XXH128_testdata[11784] */\n    { 3928, 0x000000009E3779B1ULL, { 0xDE5916BD621EC86AULL, 0xEEB413169504787FULL } }, /* XSUM_XXH128_testdata[11785] */\n    { 3928, 0x9E3779B185EBCA8DULL, { 0x45F6407A80B1B838ULL, 0xFE90EDD6DB7E6DC5ULL } }, /* XSUM_XXH128_testdata[11786] */\n    { 3929, 0x0000000000000000ULL, { 0x46AEB90D8F7ABFF1ULL, 0x0963DFCCB8231CDEULL } }, /* XSUM_XXH128_testdata[11787] */\n    { 3929, 0x000000009E3779B1ULL, { 0xCD8DC67AF485CE7EULL, 0x31A1ED31E572B853ULL } }, /* XSUM_XXH128_testdata[11788] */\n    { 3929, 0x9E3779B185EBCA8DULL, { 0xDFBD52053FEA117CULL, 0x40F86D77248AFED2ULL } }, /* XSUM_XXH128_testdata[11789] */\n    { 3930, 0x0000000000000000ULL, { 0xF96C47244C8E68D9ULL, 0xFE38E5A8DA5EFBDDULL } }, /* XSUM_XXH128_testdata[11790] */\n    { 3930, 0x000000009E3779B1ULL, { 0xD7E8BB6F22572FFEULL, 0x48E4E55C27087040ULL } }, /* XSUM_XXH128_testdata[11791] */\n    { 3930, 0x9E3779B185EBCA8DULL, { 0xE94C4D97EB097F05ULL, 0x97F3AC1C03230B0BULL } }, /* XSUM_XXH128_testdata[11792] */\n    { 3931, 0x0000000000000000ULL, { 0x2D9755A556DC4C68ULL, 0xE2AE93EEF7615E4AULL } }, /* XSUM_XXH128_testdata[11793] */\n    { 3931, 0x000000009E3779B1ULL, { 0x772A4E86E5A94CA3ULL, 0x2663D2F96B821EC3ULL } }, /* XSUM_XXH128_testdata[11794] */\n    { 3931, 0x9E3779B185EBCA8DULL, { 0x356571D8B096CF77ULL, 0xB8C9AA9A45BD062AULL } }, /* XSUM_XXH128_testdata[11795] */\n    { 3932, 0x0000000000000000ULL, { 0x2690DE96B8F122BFULL, 0xF3474BBD3DE863A9ULL } }, /* XSUM_XXH128_testdata[11796] */\n    { 3932, 0x000000009E3779B1ULL, { 0x9AE357FD6F988617ULL, 0x6F4874C348141620ULL } }, /* XSUM_XXH128_testdata[11797] */\n    { 3932, 0x9E3779B185EBCA8DULL, { 0xD855005339822D9FULL, 0x2E96ABC332DD4D77ULL } }, /* XSUM_XXH128_testdata[11798] */\n    { 3933, 0x0000000000000000ULL, { 0x03F17E5C69752446ULL, 0xA5C48093150CCF9CULL } }, /* XSUM_XXH128_testdata[11799] */\n    { 3933, 0x000000009E3779B1ULL, { 0xCBE8851BBFA402CBULL, 0x388B203C58138DEBULL } }, /* XSUM_XXH128_testdata[11800] */\n    { 3933, 0x9E3779B185EBCA8DULL, { 0x6DB8D83F02C4D6F4ULL, 0xF9CE2347D140645CULL } }, /* XSUM_XXH128_testdata[11801] */\n    { 3934, 0x0000000000000000ULL, { 0xAE5BAEE4A55FA92AULL, 0xB94B1E2E4C6339D4ULL } }, /* XSUM_XXH128_testdata[11802] */\n    { 3934, 0x000000009E3779B1ULL, { 0x7D4657E53D55CA67ULL, 0x42D69EB8AFDC8759ULL } }, /* XSUM_XXH128_testdata[11803] */\n    { 3934, 0x9E3779B185EBCA8DULL, { 0xE84342F512CBB54CULL, 0x87653BAEDC135A8DULL } }, /* XSUM_XXH128_testdata[11804] */\n    { 3935, 0x0000000000000000ULL, { 0x10C818EA41884D5DULL, 0x27BC4A437CF04D5AULL } }, /* XSUM_XXH128_testdata[11805] */\n    { 3935, 0x000000009E3779B1ULL, { 0xE5A2E4008DBE097CULL, 0xF0EB9F85FEA78A64ULL } }, /* XSUM_XXH128_testdata[11806] */\n    { 3935, 0x9E3779B185EBCA8DULL, { 0xB4712B7E5B822501ULL, 0x8FAC1D31921F3B0BULL } }, /* XSUM_XXH128_testdata[11807] */\n    { 3936, 0x0000000000000000ULL, { 0xAA8A8708F5777330ULL, 0x981F0F7F71786FC8ULL } }, /* XSUM_XXH128_testdata[11808] */\n    { 3936, 0x000000009E3779B1ULL, { 0x4238728C97EF6315ULL, 0x6B8C3DB274A65F5FULL } }, /* XSUM_XXH128_testdata[11809] */\n    { 3936, 0x9E3779B185EBCA8DULL, { 0xA4B6E3C721522422ULL, 0x78835E4971C1EA96ULL } }, /* XSUM_XXH128_testdata[11810] */\n    { 3937, 0x0000000000000000ULL, { 0x067D12376D718DAFULL, 0x4DAAB5E35D4F4688ULL } }, /* XSUM_XXH128_testdata[11811] */\n    { 3937, 0x000000009E3779B1ULL, { 0xCD51872322C7BA75ULL, 0x38E89697CF7EBC05ULL } }, /* XSUM_XXH128_testdata[11812] */\n    { 3937, 0x9E3779B185EBCA8DULL, { 0x36B8E2E811E9040AULL, 0x23453BDBB15D7B2BULL } }, /* XSUM_XXH128_testdata[11813] */\n    { 3938, 0x0000000000000000ULL, { 0xF98EC9412B15364FULL, 0xD389CA7B8E514872ULL } }, /* XSUM_XXH128_testdata[11814] */\n    { 3938, 0x000000009E3779B1ULL, { 0x4997E8692D1DC936ULL, 0xFCE6AF496F31888AULL } }, /* XSUM_XXH128_testdata[11815] */\n    { 3938, 0x9E3779B185EBCA8DULL, { 0xF2069144A2208295ULL, 0x963C9E45D9816580ULL } }, /* XSUM_XXH128_testdata[11816] */\n    { 3939, 0x0000000000000000ULL, { 0x3F9E497288C054EEULL, 0x466F51FBD31A6804ULL } }, /* XSUM_XXH128_testdata[11817] */\n    { 3939, 0x000000009E3779B1ULL, { 0x9BB9E077666211F9ULL, 0xA3E6355E9CBA59DCULL } }, /* XSUM_XXH128_testdata[11818] */\n    { 3939, 0x9E3779B185EBCA8DULL, { 0xC2509F473718907BULL, 0x14551A76FCF6CB67ULL } }, /* XSUM_XXH128_testdata[11819] */\n    { 3940, 0x0000000000000000ULL, { 0xBDEABE2B0DA048E9ULL, 0x493610CD2D5F833DULL } }, /* XSUM_XXH128_testdata[11820] */\n    { 3940, 0x000000009E3779B1ULL, { 0x7DDB67A63929B067ULL, 0x6032B99D8CC6F186ULL } }, /* XSUM_XXH128_testdata[11821] */\n    { 3940, 0x9E3779B185EBCA8DULL, { 0x4668552A42C21C1AULL, 0xDA1CFB57893AC63AULL } }, /* XSUM_XXH128_testdata[11822] */\n    { 3941, 0x0000000000000000ULL, { 0x10AB1C99F00A85BEULL, 0x58C0FFFD295064C6ULL } }, /* XSUM_XXH128_testdata[11823] */\n    { 3941, 0x000000009E3779B1ULL, { 0x0CA9E90EC33AD566ULL, 0xA6972A8464F106BAULL } }, /* XSUM_XXH128_testdata[11824] */\n    { 3941, 0x9E3779B185EBCA8DULL, { 0x817F51B557AE9312ULL, 0x5E09B0F53F7AAA58ULL } }, /* XSUM_XXH128_testdata[11825] */\n    { 3942, 0x0000000000000000ULL, { 0x532A1A1C827E3C32ULL, 0x51847BB665A3D74BULL } }, /* XSUM_XXH128_testdata[11826] */\n    { 3942, 0x000000009E3779B1ULL, { 0xECD5DBEFD425D04AULL, 0x22DCD9AA783E6191ULL } }, /* XSUM_XXH128_testdata[11827] */\n    { 3942, 0x9E3779B185EBCA8DULL, { 0xFC9E9A61C043F893ULL, 0x56B6FADA016E6C40ULL } }, /* XSUM_XXH128_testdata[11828] */\n    { 3943, 0x0000000000000000ULL, { 0x17DF5FEBAA199DDCULL, 0x1B99346B0CD754AEULL } }, /* XSUM_XXH128_testdata[11829] */\n    { 3943, 0x000000009E3779B1ULL, { 0xC328DDFC71C9E8BEULL, 0x4B147E2EAAEE3579ULL } }, /* XSUM_XXH128_testdata[11830] */\n    { 3943, 0x9E3779B185EBCA8DULL, { 0xBF866768A90B586BULL, 0x27E89F6B1EC52E10ULL } }, /* XSUM_XXH128_testdata[11831] */\n    { 3944, 0x0000000000000000ULL, { 0x71398075626A805FULL, 0xDB28F32A83F95301ULL } }, /* XSUM_XXH128_testdata[11832] */\n    { 3944, 0x000000009E3779B1ULL, { 0x2F89CD851869AE2FULL, 0x05028DDA6BAAFBFAULL } }, /* XSUM_XXH128_testdata[11833] */\n    { 3944, 0x9E3779B185EBCA8DULL, { 0x2EAD63956448AC42ULL, 0xFD217EA32B25D87FULL } }, /* XSUM_XXH128_testdata[11834] */\n    { 3945, 0x0000000000000000ULL, { 0x8B96C85B6B09AE09ULL, 0x40A4930DADB5D54FULL } }, /* XSUM_XXH128_testdata[11835] */\n    { 3945, 0x000000009E3779B1ULL, { 0xA7C403CB78E5D4DFULL, 0xB86EB0F1B34EB6C1ULL } }, /* XSUM_XXH128_testdata[11836] */\n    { 3945, 0x9E3779B185EBCA8DULL, { 0x53945379415EEA57ULL, 0xBD26F2DF64E34865ULL } }, /* XSUM_XXH128_testdata[11837] */\n    { 3946, 0x0000000000000000ULL, { 0xBDD556FEB977EB7EULL, 0xCB97717C26E68D25ULL } }, /* XSUM_XXH128_testdata[11838] */\n    { 3946, 0x000000009E3779B1ULL, { 0x593531278BCB5FAEULL, 0xE8CEFF77544C1727ULL } }, /* XSUM_XXH128_testdata[11839] */\n    { 3946, 0x9E3779B185EBCA8DULL, { 0x323281D91889CD49ULL, 0x5A670B021C55BC3AULL } }, /* XSUM_XXH128_testdata[11840] */\n    { 3947, 0x0000000000000000ULL, { 0x64971C22DBC5527CULL, 0xA854ACD0F3D9BF5CULL } }, /* XSUM_XXH128_testdata[11841] */\n    { 3947, 0x000000009E3779B1ULL, { 0x536EF1BEE9EA34E3ULL, 0x64737D904AEA5004ULL } }, /* XSUM_XXH128_testdata[11842] */\n    { 3947, 0x9E3779B185EBCA8DULL, { 0x89022F7E2B8360A5ULL, 0x1E8D596FE179E006ULL } }, /* XSUM_XXH128_testdata[11843] */\n    { 3948, 0x0000000000000000ULL, { 0xDD8BE1C1AA8ADD2DULL, 0x068E6779F2005C17ULL } }, /* XSUM_XXH128_testdata[11844] */\n    { 3948, 0x000000009E3779B1ULL, { 0x36699CDC62EEC21CULL, 0x7DADC6B744299E89ULL } }, /* XSUM_XXH128_testdata[11845] */\n    { 3948, 0x9E3779B185EBCA8DULL, { 0x5C30025D03808D2BULL, 0xB90280D42101D3A6ULL } }, /* XSUM_XXH128_testdata[11846] */\n    { 3949, 0x0000000000000000ULL, { 0x8C07CF58AB41A74CULL, 0x1A88B67A3043D14FULL } }, /* XSUM_XXH128_testdata[11847] */\n    { 3949, 0x000000009E3779B1ULL, { 0x6BC1AF41B7E4545BULL, 0xC2A7B5AC9AA9D4B7ULL } }, /* XSUM_XXH128_testdata[11848] */\n    { 3949, 0x9E3779B185EBCA8DULL, { 0xB1D01B95BAA92AABULL, 0x4BDAD39456D7E694ULL } }, /* XSUM_XXH128_testdata[11849] */\n    { 3950, 0x0000000000000000ULL, { 0xD02F3D99DAF12BFBULL, 0xA2FF9B9B06FA3BE3ULL } }, /* XSUM_XXH128_testdata[11850] */\n    { 3950, 0x000000009E3779B1ULL, { 0xCE34C728A3E19EF6ULL, 0x808315E9A19E8E0DULL } }, /* XSUM_XXH128_testdata[11851] */\n    { 3950, 0x9E3779B185EBCA8DULL, { 0xB51B642756A4A758ULL, 0x9677F9E7E4D5080CULL } }, /* XSUM_XXH128_testdata[11852] */\n    { 3951, 0x0000000000000000ULL, { 0x4348531E49C511F4ULL, 0x007F52F2204F1CA9ULL } }, /* XSUM_XXH128_testdata[11853] */\n    { 3951, 0x000000009E3779B1ULL, { 0x16BB8891B47AE125ULL, 0x73EAD5665BD8226CULL } }, /* XSUM_XXH128_testdata[11854] */\n    { 3951, 0x9E3779B185EBCA8DULL, { 0x18BD395AEEA58688ULL, 0x80BB6A17B8819A89ULL } }, /* XSUM_XXH128_testdata[11855] */\n    { 3952, 0x0000000000000000ULL, { 0x9D4C66540A962773ULL, 0x1F57AB2147DADBC1ULL } }, /* XSUM_XXH128_testdata[11856] */\n    { 3952, 0x000000009E3779B1ULL, { 0x62F59DF0A6BCD81AULL, 0x075508B173FE327AULL } }, /* XSUM_XXH128_testdata[11857] */\n    { 3952, 0x9E3779B185EBCA8DULL, { 0xE00964BE57FD3E66ULL, 0x0E50FB2993E9AE7CULL } }, /* XSUM_XXH128_testdata[11858] */\n    { 3953, 0x0000000000000000ULL, { 0x7CE772BEA8E4786BULL, 0xD4EACAE049532F6CULL } }, /* XSUM_XXH128_testdata[11859] */\n    { 3953, 0x000000009E3779B1ULL, { 0x74625AF257BF1E94ULL, 0x7ACD76B6FF6E4403ULL } }, /* XSUM_XXH128_testdata[11860] */\n    { 3953, 0x9E3779B185EBCA8DULL, { 0xF61BB140BE5D765FULL, 0xB1065B1E36D10F1FULL } }, /* XSUM_XXH128_testdata[11861] */\n    { 3954, 0x0000000000000000ULL, { 0xEF207CADC1E1289DULL, 0x4360FAA0C0507345ULL } }, /* XSUM_XXH128_testdata[11862] */\n    { 3954, 0x000000009E3779B1ULL, { 0xDC8EC45A830286DDULL, 0x7F893B36D1112F5CULL } }, /* XSUM_XXH128_testdata[11863] */\n    { 3954, 0x9E3779B185EBCA8DULL, { 0xFAE666B60898B751ULL, 0x6C99685CC49BB680ULL } }, /* XSUM_XXH128_testdata[11864] */\n    { 3955, 0x0000000000000000ULL, { 0x26CC10398A6749B7ULL, 0x9D02DB01129B4D33ULL } }, /* XSUM_XXH128_testdata[11865] */\n    { 3955, 0x000000009E3779B1ULL, { 0x1B5557E53320EA00ULL, 0x79B2F9224093CE33ULL } }, /* XSUM_XXH128_testdata[11866] */\n    { 3955, 0x9E3779B185EBCA8DULL, { 0x92DE2797740DD6B7ULL, 0x9C12C4536B3669ACULL } }, /* XSUM_XXH128_testdata[11867] */\n    { 3956, 0x0000000000000000ULL, { 0x242CFB81AFEB4A52ULL, 0x1E1B0FF24C65D9C5ULL } }, /* XSUM_XXH128_testdata[11868] */\n    { 3956, 0x000000009E3779B1ULL, { 0x909B020E68303C6EULL, 0xFBFEC0FF109E204CULL } }, /* XSUM_XXH128_testdata[11869] */\n    { 3956, 0x9E3779B185EBCA8DULL, { 0x52AC4FDC444D7946ULL, 0x66DCA0177AB6C933ULL } }, /* XSUM_XXH128_testdata[11870] */\n    { 3957, 0x0000000000000000ULL, { 0x281754EE7F02B5E8ULL, 0x36D9580ADE599F03ULL } }, /* XSUM_XXH128_testdata[11871] */\n    { 3957, 0x000000009E3779B1ULL, { 0x23BC5CBA08E4DBA5ULL, 0xC31A7E2D44F7EB27ULL } }, /* XSUM_XXH128_testdata[11872] */\n    { 3957, 0x9E3779B185EBCA8DULL, { 0x334BB05F13E21683ULL, 0xF64D333616862ECEULL } }, /* XSUM_XXH128_testdata[11873] */\n    { 3958, 0x0000000000000000ULL, { 0x99422CCBED686E68ULL, 0xC6A5B277DB213AE6ULL } }, /* XSUM_XXH128_testdata[11874] */\n    { 3958, 0x000000009E3779B1ULL, { 0x8DBBD0A43BA5AC06ULL, 0xBAA8C4CC51D0F17FULL } }, /* XSUM_XXH128_testdata[11875] */\n    { 3958, 0x9E3779B185EBCA8DULL, { 0x37F7156BD866B0ADULL, 0x184C96F0E6792036ULL } }, /* XSUM_XXH128_testdata[11876] */\n    { 3959, 0x0000000000000000ULL, { 0x598741D332E3B68CULL, 0x4D530F062FFEFD2EULL } }, /* XSUM_XXH128_testdata[11877] */\n    { 3959, 0x000000009E3779B1ULL, { 0xE28C31626379D313ULL, 0x8AA61836F5763CD7ULL } }, /* XSUM_XXH128_testdata[11878] */\n    { 3959, 0x9E3779B185EBCA8DULL, { 0x6586AE3B6DDACD16ULL, 0xA218BF0090B8FCB3ULL } }, /* XSUM_XXH128_testdata[11879] */\n    { 3960, 0x0000000000000000ULL, { 0x4B628B36B33EC98CULL, 0x3BADE1697D646880ULL } }, /* XSUM_XXH128_testdata[11880] */\n    { 3960, 0x000000009E3779B1ULL, { 0xD29CC48078836602ULL, 0x11A3DE19FBCECD10ULL } }, /* XSUM_XXH128_testdata[11881] */\n    { 3960, 0x9E3779B185EBCA8DULL, { 0xA6C22E0382278A9BULL, 0x7CCF1D8257F9C16AULL } }, /* XSUM_XXH128_testdata[11882] */\n    { 3961, 0x0000000000000000ULL, { 0x33EA7BB343EBBDB5ULL, 0xC457795F5A3A16ABULL } }, /* XSUM_XXH128_testdata[11883] */\n    { 3961, 0x000000009E3779B1ULL, { 0x8B51B12CB26E5BBFULL, 0xDC9955CF3E06D2DAULL } }, /* XSUM_XXH128_testdata[11884] */\n    { 3961, 0x9E3779B185EBCA8DULL, { 0x75699EDC5951867DULL, 0x7DF90CE9755A6D83ULL } }, /* XSUM_XXH128_testdata[11885] */\n    { 3962, 0x0000000000000000ULL, { 0x126AEA81F63590F4ULL, 0x83402C769E44648FULL } }, /* XSUM_XXH128_testdata[11886] */\n    { 3962, 0x000000009E3779B1ULL, { 0x24FE277C1D27E078ULL, 0x14C50CB8BCCE008EULL } }, /* XSUM_XXH128_testdata[11887] */\n    { 3962, 0x9E3779B185EBCA8DULL, { 0x886FD5F60CD3E0EEULL, 0x44CFDA51D2C84C04ULL } }, /* XSUM_XXH128_testdata[11888] */\n    { 3963, 0x0000000000000000ULL, { 0x7841B62776B307AAULL, 0xE4C0C5C26B696679ULL } }, /* XSUM_XXH128_testdata[11889] */\n    { 3963, 0x000000009E3779B1ULL, { 0xB242C9CD71FFCCF7ULL, 0xBC4A538811381648ULL } }, /* XSUM_XXH128_testdata[11890] */\n    { 3963, 0x9E3779B185EBCA8DULL, { 0xF82E085079EC75FAULL, 0xEB3DDEB24B8030C5ULL } }, /* XSUM_XXH128_testdata[11891] */\n    { 3964, 0x0000000000000000ULL, { 0xECBF0B670679A0F6ULL, 0xAD580720A6A4F942ULL } }, /* XSUM_XXH128_testdata[11892] */\n    { 3964, 0x000000009E3779B1ULL, { 0x77373F58CE358250ULL, 0x3F95066A8642722BULL } }, /* XSUM_XXH128_testdata[11893] */\n    { 3964, 0x9E3779B185EBCA8DULL, { 0x288522438415AC10ULL, 0xBBE316AD8074F9D3ULL } }, /* XSUM_XXH128_testdata[11894] */\n    { 3965, 0x0000000000000000ULL, { 0x27A262BDF741056FULL, 0x932B6B56F6C57BBFULL } }, /* XSUM_XXH128_testdata[11895] */\n    { 3965, 0x000000009E3779B1ULL, { 0x8B1239EC9D6031E1ULL, 0x572B8BEE094752DCULL } }, /* XSUM_XXH128_testdata[11896] */\n    { 3965, 0x9E3779B185EBCA8DULL, { 0x59897257B77D9E2CULL, 0x93F238370B515501ULL } }, /* XSUM_XXH128_testdata[11897] */\n    { 3966, 0x0000000000000000ULL, { 0x2F809602FE931B3CULL, 0x7CB8018FFE0EEE40ULL } }, /* XSUM_XXH128_testdata[11898] */\n    { 3966, 0x000000009E3779B1ULL, { 0x445CE7B92EC0D4D6ULL, 0xEAC6C7F7BC9EC762ULL } }, /* XSUM_XXH128_testdata[11899] */\n    { 3966, 0x9E3779B185EBCA8DULL, { 0xCADC0F606616E761ULL, 0x1033E8891D0BFCEAULL } }, /* XSUM_XXH128_testdata[11900] */\n    { 3967, 0x0000000000000000ULL, { 0x141E1F3175F8052CULL, 0x8120B5A4B074E7E9ULL } }, /* XSUM_XXH128_testdata[11901] */\n    { 3967, 0x000000009E3779B1ULL, { 0x4275D819CA5B4065ULL, 0x7A922635C96FB34BULL } }, /* XSUM_XXH128_testdata[11902] */\n    { 3967, 0x9E3779B185EBCA8DULL, { 0x329CC677D6B63E01ULL, 0x4054CE5D890E85C9ULL } }, /* XSUM_XXH128_testdata[11903] */\n    { 3968, 0x0000000000000000ULL, { 0xE4BBC3788C0BDD64ULL, 0x69FA3449377E05F5ULL } }, /* XSUM_XXH128_testdata[11904] */\n    { 3968, 0x000000009E3779B1ULL, { 0xCE73B9246F9C4DDEULL, 0xAEA19BC9D1E858A8ULL } }, /* XSUM_XXH128_testdata[11905] */\n    { 3968, 0x9E3779B185EBCA8DULL, { 0x5DEB326944BE123EULL, 0x5783B11C5A5185CDULL } }, /* XSUM_XXH128_testdata[11906] */\n    { 3969, 0x0000000000000000ULL, { 0xE31B53A785778F54ULL, 0x4D0C9B4912BFC81AULL } }, /* XSUM_XXH128_testdata[11907] */\n    { 3969, 0x000000009E3779B1ULL, { 0xDAA6CFF3536CFCB5ULL, 0x3A28441BA4C40E03ULL } }, /* XSUM_XXH128_testdata[11908] */\n    { 3969, 0x9E3779B185EBCA8DULL, { 0x6A2E262687B66653ULL, 0x5319232E7C499C68ULL } }, /* XSUM_XXH128_testdata[11909] */\n    { 3970, 0x0000000000000000ULL, { 0xE616BA7289AA5EBDULL, 0x2CCF7C6CE6D54FC1ULL } }, /* XSUM_XXH128_testdata[11910] */\n    { 3970, 0x000000009E3779B1ULL, { 0x1905400C405C4FDDULL, 0x212F07FB03086872ULL } }, /* XSUM_XXH128_testdata[11911] */\n    { 3970, 0x9E3779B185EBCA8DULL, { 0x8780C20C605A6403ULL, 0xE47F313C03032C35ULL } }, /* XSUM_XXH128_testdata[11912] */\n    { 3971, 0x0000000000000000ULL, { 0x51921934B133BCBCULL, 0x4A49EA5C557E6FCCULL } }, /* XSUM_XXH128_testdata[11913] */\n    { 3971, 0x000000009E3779B1ULL, { 0xB4E78BE526731B0BULL, 0xD5CEEEA932DE51C1ULL } }, /* XSUM_XXH128_testdata[11914] */\n    { 3971, 0x9E3779B185EBCA8DULL, { 0x1491A8A669564D3DULL, 0xF0C791D66BE253F1ULL } }, /* XSUM_XXH128_testdata[11915] */\n    { 3972, 0x0000000000000000ULL, { 0x2FD77747DC1304CBULL, 0x19D229768896FA08ULL } }, /* XSUM_XXH128_testdata[11916] */\n    { 3972, 0x000000009E3779B1ULL, { 0xE8CF26A3C7D25DD1ULL, 0xD1E70619559BF3B7ULL } }, /* XSUM_XXH128_testdata[11917] */\n    { 3972, 0x9E3779B185EBCA8DULL, { 0x00E8B8F5C0C77E2FULL, 0xDA6DC5B7D68A6F8DULL } }, /* XSUM_XXH128_testdata[11918] */\n    { 3973, 0x0000000000000000ULL, { 0xD5FA765B6B147CBCULL, 0x8D7E9F0048069C53ULL } }, /* XSUM_XXH128_testdata[11919] */\n    { 3973, 0x000000009E3779B1ULL, { 0xA9C93DB795069ABEULL, 0x7E024AFFF797A81EULL } }, /* XSUM_XXH128_testdata[11920] */\n    { 3973, 0x9E3779B185EBCA8DULL, { 0xB8A191D1D112F794ULL, 0xC6F6F6868AEF29CAULL } }, /* XSUM_XXH128_testdata[11921] */\n    { 3974, 0x0000000000000000ULL, { 0x096E1E10CE979DF3ULL, 0xF19D6087F3079F1BULL } }, /* XSUM_XXH128_testdata[11922] */\n    { 3974, 0x000000009E3779B1ULL, { 0x9F61530FDD00E553ULL, 0x778122A42D9D8B7AULL } }, /* XSUM_XXH128_testdata[11923] */\n    { 3974, 0x9E3779B185EBCA8DULL, { 0x25311F01B72B0F5DULL, 0x21E311E17216E3B9ULL } }, /* XSUM_XXH128_testdata[11924] */\n    { 3975, 0x0000000000000000ULL, { 0x724CD26BCEE10D7DULL, 0xE242E2459E262023ULL } }, /* XSUM_XXH128_testdata[11925] */\n    { 3975, 0x000000009E3779B1ULL, { 0xADC6EE6ECAFB7199ULL, 0x469FECE362F313AFULL } }, /* XSUM_XXH128_testdata[11926] */\n    { 3975, 0x9E3779B185EBCA8DULL, { 0xFEFDAF2604950A59ULL, 0xC0E1F47C01DDCB6EULL } }, /* XSUM_XXH128_testdata[11927] */\n    { 3976, 0x0000000000000000ULL, { 0x624EB9ED7DA8BC8BULL, 0x7C062168A81DE394ULL } }, /* XSUM_XXH128_testdata[11928] */\n    { 3976, 0x000000009E3779B1ULL, { 0x60D1CEFB9BF0B98FULL, 0xF05B2BB41095A23BULL } }, /* XSUM_XXH128_testdata[11929] */\n    { 3976, 0x9E3779B185EBCA8DULL, { 0xB1484E07468C6A87ULL, 0x726C69E72AE6022AULL } }, /* XSUM_XXH128_testdata[11930] */\n    { 3977, 0x0000000000000000ULL, { 0xB97681089D65E1B3ULL, 0x03001631EDE6A3E6ULL } }, /* XSUM_XXH128_testdata[11931] */\n    { 3977, 0x000000009E3779B1ULL, { 0x557B5023689217DCULL, 0x0FA3A30694156FEEULL } }, /* XSUM_XXH128_testdata[11932] */\n    { 3977, 0x9E3779B185EBCA8DULL, { 0x995046795DDBFFA3ULL, 0x3F4C5544089DF435ULL } }, /* XSUM_XXH128_testdata[11933] */\n    { 3978, 0x0000000000000000ULL, { 0x96CE1FD0B7BBB048ULL, 0xB2E9A076639C52C4ULL } }, /* XSUM_XXH128_testdata[11934] */\n    { 3978, 0x000000009E3779B1ULL, { 0x5BA120BA1DBCF592ULL, 0xA66AD00E3B29A390ULL } }, /* XSUM_XXH128_testdata[11935] */\n    { 3978, 0x9E3779B185EBCA8DULL, { 0xE6A71D136860A7DEULL, 0x700F136553254E11ULL } }, /* XSUM_XXH128_testdata[11936] */\n    { 3979, 0x0000000000000000ULL, { 0x75DED1B9308B1928ULL, 0x5CC9A3A00066172DULL } }, /* XSUM_XXH128_testdata[11937] */\n    { 3979, 0x000000009E3779B1ULL, { 0xFB89EF93F346B459ULL, 0xA861F8871184C0AFULL } }, /* XSUM_XXH128_testdata[11938] */\n    { 3979, 0x9E3779B185EBCA8DULL, { 0xDED6EE6AC82110D1ULL, 0x6C5347D72BB18F3BULL } }, /* XSUM_XXH128_testdata[11939] */\n    { 3980, 0x0000000000000000ULL, { 0x74108B5207DA6495ULL, 0x374AE9170A094953ULL } }, /* XSUM_XXH128_testdata[11940] */\n    { 3980, 0x000000009E3779B1ULL, { 0x7A581ED3243C10ACULL, 0x419F1D60382C2C68ULL } }, /* XSUM_XXH128_testdata[11941] */\n    { 3980, 0x9E3779B185EBCA8DULL, { 0xBCF1BB06F6F9F1D2ULL, 0xD812059BE7E7D57FULL } }, /* XSUM_XXH128_testdata[11942] */\n    { 3981, 0x0000000000000000ULL, { 0x583132D445F6E764ULL, 0xC486AE8F702C2AC6ULL } }, /* XSUM_XXH128_testdata[11943] */\n    { 3981, 0x000000009E3779B1ULL, { 0x2E062AC56AD8F069ULL, 0x10CC92AF83A2751BULL } }, /* XSUM_XXH128_testdata[11944] */\n    { 3981, 0x9E3779B185EBCA8DULL, { 0xC5DD54DA32E1E97BULL, 0xA434350DE5430206ULL } }, /* XSUM_XXH128_testdata[11945] */\n    { 3982, 0x0000000000000000ULL, { 0x9481AB87F0647F15ULL, 0x162F91CC4F9CC5D0ULL } }, /* XSUM_XXH128_testdata[11946] */\n    { 3982, 0x000000009E3779B1ULL, { 0xAE2554FD116D7BEEULL, 0x19E3B624B8E7D289ULL } }, /* XSUM_XXH128_testdata[11947] */\n    { 3982, 0x9E3779B185EBCA8DULL, { 0xF4477239172D8121ULL, 0x93B3423521D1DA21ULL } }, /* XSUM_XXH128_testdata[11948] */\n    { 3983, 0x0000000000000000ULL, { 0xE200117CCB74CD9CULL, 0x0CA403D5B7867E4DULL } }, /* XSUM_XXH128_testdata[11949] */\n    { 3983, 0x000000009E3779B1ULL, { 0xB8920F895577C5EEULL, 0xFAEF5AC477FD5F2BULL } }, /* XSUM_XXH128_testdata[11950] */\n    { 3983, 0x9E3779B185EBCA8DULL, { 0x404ED3E5DB505D73ULL, 0xD9D18E9E41DE926AULL } }, /* XSUM_XXH128_testdata[11951] */\n    { 3984, 0x0000000000000000ULL, { 0xCE9467B900AEFA85ULL, 0x611809AA955B26EFULL } }, /* XSUM_XXH128_testdata[11952] */\n    { 3984, 0x000000009E3779B1ULL, { 0xE7F857DDAB3A80A5ULL, 0x8B6556E3C5D4F122ULL } }, /* XSUM_XXH128_testdata[11953] */\n    { 3984, 0x9E3779B185EBCA8DULL, { 0x42C043E3244AF7E8ULL, 0x8718001BD6A4C000ULL } }, /* XSUM_XXH128_testdata[11954] */\n    { 3985, 0x0000000000000000ULL, { 0xB8FE9445B6FBF8C0ULL, 0x43ED517C1FD21B1DULL } }, /* XSUM_XXH128_testdata[11955] */\n    { 3985, 0x000000009E3779B1ULL, { 0xC0F4FA4EAA86CFE7ULL, 0x1AB8E5725EE3ABCBULL } }, /* XSUM_XXH128_testdata[11956] */\n    { 3985, 0x9E3779B185EBCA8DULL, { 0xDF322C15B737F0A8ULL, 0x7CD33B7A6A22430CULL } }, /* XSUM_XXH128_testdata[11957] */\n    { 3986, 0x0000000000000000ULL, { 0x983B40D937389E12ULL, 0x6468A683CBB80F44ULL } }, /* XSUM_XXH128_testdata[11958] */\n    { 3986, 0x000000009E3779B1ULL, { 0x334B8DE5E9484A2AULL, 0x1ACFB1D95248A33AULL } }, /* XSUM_XXH128_testdata[11959] */\n    { 3986, 0x9E3779B185EBCA8DULL, { 0x85128DA1EFFEC291ULL, 0x40A3EE0E9FFAAAA5ULL } }, /* XSUM_XXH128_testdata[11960] */\n    { 3987, 0x0000000000000000ULL, { 0x022BDCA841C7E36AULL, 0x22F3558B3C26DF0BULL } }, /* XSUM_XXH128_testdata[11961] */\n    { 3987, 0x000000009E3779B1ULL, { 0xFBD0A256EC8AB921ULL, 0x6E677F8E17D4ADA6ULL } }, /* XSUM_XXH128_testdata[11962] */\n    { 3987, 0x9E3779B185EBCA8DULL, { 0x01FE2ADABDCFC75CULL, 0xE6C5432C2A34E286ULL } }, /* XSUM_XXH128_testdata[11963] */\n    { 3988, 0x0000000000000000ULL, { 0xA2DBCDCFFDB287F2ULL, 0xA94D628637276731ULL } }, /* XSUM_XXH128_testdata[11964] */\n    { 3988, 0x000000009E3779B1ULL, { 0xDB2A5856FF9D0D48ULL, 0x5FA88D10BFE444CFULL } }, /* XSUM_XXH128_testdata[11965] */\n    { 3988, 0x9E3779B185EBCA8DULL, { 0x82D212A8FB8DBE03ULL, 0x73EF35B3A52824D5ULL } }, /* XSUM_XXH128_testdata[11966] */\n    { 3989, 0x0000000000000000ULL, { 0xE9E21701E2BB0AF7ULL, 0xCA6A88B2167872D1ULL } }, /* XSUM_XXH128_testdata[11967] */\n    { 3989, 0x000000009E3779B1ULL, { 0xC7F0E70032CDB8B0ULL, 0xDF980FDFC3986A21ULL } }, /* XSUM_XXH128_testdata[11968] */\n    { 3989, 0x9E3779B185EBCA8DULL, { 0xDF967A00E46837CCULL, 0xB77BFD184FD909AAULL } }, /* XSUM_XXH128_testdata[11969] */\n    { 3990, 0x0000000000000000ULL, { 0xA3951EEAC572F24DULL, 0x1C12944A2EDF7336ULL } }, /* XSUM_XXH128_testdata[11970] */\n    { 3990, 0x000000009E3779B1ULL, { 0xE1DFDA45271C8C3FULL, 0x1B2A1D4C689726DAULL } }, /* XSUM_XXH128_testdata[11971] */\n    { 3990, 0x9E3779B185EBCA8DULL, { 0x5FC170EF073D265DULL, 0x90D41568387273D0ULL } }, /* XSUM_XXH128_testdata[11972] */\n    { 3991, 0x0000000000000000ULL, { 0x71B75CFBC5C7FF7AULL, 0x05B1E169245520BEULL } }, /* XSUM_XXH128_testdata[11973] */\n    { 3991, 0x000000009E3779B1ULL, { 0xBC98DB2D6926C502ULL, 0x197C6ED8DBFBF272ULL } }, /* XSUM_XXH128_testdata[11974] */\n    { 3991, 0x9E3779B185EBCA8DULL, { 0xE044F7B8115A2BEDULL, 0xCAB4613C496702C9ULL } }, /* XSUM_XXH128_testdata[11975] */\n    { 3992, 0x0000000000000000ULL, { 0x560473B92CA66B06ULL, 0x64143F6C376C0971ULL } }, /* XSUM_XXH128_testdata[11976] */\n    { 3992, 0x000000009E3779B1ULL, { 0x2B0825CF2BAF78F0ULL, 0x04BC41396231DBC0ULL } }, /* XSUM_XXH128_testdata[11977] */\n    { 3992, 0x9E3779B185EBCA8DULL, { 0x5420B09C1771B61AULL, 0xD9387B47F7AE04B8ULL } }, /* XSUM_XXH128_testdata[11978] */\n    { 3993, 0x0000000000000000ULL, { 0xD10183EE95BA2333ULL, 0x7BB228DE3C763460ULL } }, /* XSUM_XXH128_testdata[11979] */\n    { 3993, 0x000000009E3779B1ULL, { 0x54CA355C309847F2ULL, 0x5997346A21AAD2FCULL } }, /* XSUM_XXH128_testdata[11980] */\n    { 3993, 0x9E3779B185EBCA8DULL, { 0x6FC53C76904E0CBBULL, 0x58C7161D78059AB2ULL } }, /* XSUM_XXH128_testdata[11981] */\n    { 3994, 0x0000000000000000ULL, { 0xA137F43241A5B99DULL, 0x3EB29083AE4CC026ULL } }, /* XSUM_XXH128_testdata[11982] */\n    { 3994, 0x000000009E3779B1ULL, { 0xD4218553F5D0D833ULL, 0x68F4E7AC18BFCF6CULL } }, /* XSUM_XXH128_testdata[11983] */\n    { 3994, 0x9E3779B185EBCA8DULL, { 0xD6421EA72D97B5B5ULL, 0x63635A0AB4C3793EULL } }, /* XSUM_XXH128_testdata[11984] */\n    { 3995, 0x0000000000000000ULL, { 0x0B094A9A19E93FEAULL, 0xBD3D730CC82ED50CULL } }, /* XSUM_XXH128_testdata[11985] */\n    { 3995, 0x000000009E3779B1ULL, { 0xF221CDCD603B8BEEULL, 0x643573BC91765EDBULL } }, /* XSUM_XXH128_testdata[11986] */\n    { 3995, 0x9E3779B185EBCA8DULL, { 0xDF5FF6C3F8F85DAEULL, 0x480547FCB92C77C1ULL } }, /* XSUM_XXH128_testdata[11987] */\n    { 3996, 0x0000000000000000ULL, { 0xF7F1B9E355A56C78ULL, 0xE26BEB64A2D58D22ULL } }, /* XSUM_XXH128_testdata[11988] */\n    { 3996, 0x000000009E3779B1ULL, { 0xEA427C8C21FE5309ULL, 0x5600BE87B997092CULL } }, /* XSUM_XXH128_testdata[11989] */\n    { 3996, 0x9E3779B185EBCA8DULL, { 0x440D8BF0C28F2386ULL, 0xDCE624E3537597CAULL } }, /* XSUM_XXH128_testdata[11990] */\n    { 3997, 0x0000000000000000ULL, { 0xB59E0DA0D0AC15FAULL, 0x9019B90A1B80B7A4ULL } }, /* XSUM_XXH128_testdata[11991] */\n    { 3997, 0x000000009E3779B1ULL, { 0x7DAB1C3398E6BE09ULL, 0x92A92182C3F05839ULL } }, /* XSUM_XXH128_testdata[11992] */\n    { 3997, 0x9E3779B185EBCA8DULL, { 0x4C1A420DB1CC198BULL, 0xFD0139C840FD09CCULL } }, /* XSUM_XXH128_testdata[11993] */\n    { 3998, 0x0000000000000000ULL, { 0x3C921215EB653D1DULL, 0x2E4E99EED0CE397BULL } }, /* XSUM_XXH128_testdata[11994] */\n    { 3998, 0x000000009E3779B1ULL, { 0x0F58342E02C1D3D8ULL, 0x58B16DB8CCAB7811ULL } }, /* XSUM_XXH128_testdata[11995] */\n    { 3998, 0x9E3779B185EBCA8DULL, { 0x26E9B9483790551FULL, 0xA69E93C6C73E53D9ULL } }, /* XSUM_XXH128_testdata[11996] */\n    { 3999, 0x0000000000000000ULL, { 0xA4A38A7850158E01ULL, 0x42B0F2DD2CCDE339ULL } }, /* XSUM_XXH128_testdata[11997] */\n    { 3999, 0x000000009E3779B1ULL, { 0xCAC68648F6BAE700ULL, 0x6AAFD1267C8B7083ULL } }, /* XSUM_XXH128_testdata[11998] */\n    { 3999, 0x9E3779B185EBCA8DULL, { 0xC8A7D8FE1F072911ULL, 0xE4F550589121717AULL } }, /* XSUM_XXH128_testdata[11999] */\n    { 4000, 0x0000000000000000ULL, { 0xD4BBD44AE7A245D6ULL, 0x96AAC0AEDCE46149ULL } }, /* XSUM_XXH128_testdata[12000] */\n    { 4000, 0x000000009E3779B1ULL, { 0x1F8BDC777AD5A5CBULL, 0x60DB627041DEA629ULL } }, /* XSUM_XXH128_testdata[12001] */\n    { 4000, 0x9E3779B185EBCA8DULL, { 0x14D1D38BF7F90929ULL, 0x784C8D03F3B2C209ULL } }, /* XSUM_XXH128_testdata[12002] */\n    { 4001, 0x0000000000000000ULL, { 0x40865A418C827014ULL, 0xEB813993C4D13A19ULL } }, /* XSUM_XXH128_testdata[12003] */\n    { 4001, 0x000000009E3779B1ULL, { 0x45F56695DB5C8B0CULL, 0xD715BE78B3527479ULL } }, /* XSUM_XXH128_testdata[12004] */\n    { 4001, 0x9E3779B185EBCA8DULL, { 0xA2CE1E5EAAE13199ULL, 0xA5C0BA5F026D8D87ULL } }, /* XSUM_XXH128_testdata[12005] */\n    { 4002, 0x0000000000000000ULL, { 0xDED0BB8EB0E9E5BBULL, 0xB22B3A5B529A667CULL } }, /* XSUM_XXH128_testdata[12006] */\n    { 4002, 0x000000009E3779B1ULL, { 0x8BF52FC3174E6E6AULL, 0xBEAE20156631A38DULL } }, /* XSUM_XXH128_testdata[12007] */\n    { 4002, 0x9E3779B185EBCA8DULL, { 0xEDCD3A406D723DEAULL, 0x1A17461551BAFFB3ULL } }, /* XSUM_XXH128_testdata[12008] */\n    { 4003, 0x0000000000000000ULL, { 0xAA4AD1D0A48CB176ULL, 0x8BD41F6840770D45ULL } }, /* XSUM_XXH128_testdata[12009] */\n    { 4003, 0x000000009E3779B1ULL, { 0xAEE007565B0042DBULL, 0x5C4CDCBAB70A7635ULL } }, /* XSUM_XXH128_testdata[12010] */\n    { 4003, 0x9E3779B185EBCA8DULL, { 0x880A5B734D046849ULL, 0x823E45EDF4571F99ULL } }, /* XSUM_XXH128_testdata[12011] */\n    { 4004, 0x0000000000000000ULL, { 0xD58188ABC81D37C6ULL, 0x46B283FE8F6B719CULL } }, /* XSUM_XXH128_testdata[12012] */\n    { 4004, 0x000000009E3779B1ULL, { 0xE18D2F14F2FDEC59ULL, 0xDED6C1629B62F6C8ULL } }, /* XSUM_XXH128_testdata[12013] */\n    { 4004, 0x9E3779B185EBCA8DULL, { 0x712781E12FBEF921ULL, 0xFAC6B585383E1189ULL } }, /* XSUM_XXH128_testdata[12014] */\n    { 4005, 0x0000000000000000ULL, { 0x5B06AA2C44621825ULL, 0xB274F0F08C6B52E3ULL } }, /* XSUM_XXH128_testdata[12015] */\n    { 4005, 0x000000009E3779B1ULL, { 0x95BFC155B2A01D93ULL, 0xB657DADB297FBCBBULL } }, /* XSUM_XXH128_testdata[12016] */\n    { 4005, 0x9E3779B185EBCA8DULL, { 0xD9C37C284E6A8216ULL, 0x73EB73BB7E46F2E1ULL } }, /* XSUM_XXH128_testdata[12017] */\n    { 4006, 0x0000000000000000ULL, { 0xEB57CC9F39C8879EULL, 0xDAE56DE27F2A0008ULL } }, /* XSUM_XXH128_testdata[12018] */\n    { 4006, 0x000000009E3779B1ULL, { 0x5DF53AE0BF18EDF7ULL, 0xB2E6FFEBC2FD2AE2ULL } }, /* XSUM_XXH128_testdata[12019] */\n    { 4006, 0x9E3779B185EBCA8DULL, { 0x4F33FAAF2C4EC509ULL, 0x6F13836602C132EBULL } }, /* XSUM_XXH128_testdata[12020] */\n    { 4007, 0x0000000000000000ULL, { 0x3DCDD807BD42EE26ULL, 0xE55336D81AC59A9BULL } }, /* XSUM_XXH128_testdata[12021] */\n    { 4007, 0x000000009E3779B1ULL, { 0x7F37D22BF3C733A5ULL, 0x6B92D55DFC96E7B8ULL } }, /* XSUM_XXH128_testdata[12022] */\n    { 4007, 0x9E3779B185EBCA8DULL, { 0xD8F0E8A6D8B9FB59ULL, 0x6E0A84AD2B364B37ULL } }, /* XSUM_XXH128_testdata[12023] */\n    { 4008, 0x0000000000000000ULL, { 0xF6F0C51DDFE11B30ULL, 0x244811AA0635583AULL } }, /* XSUM_XXH128_testdata[12024] */\n    { 4008, 0x000000009E3779B1ULL, { 0xD63E59BD4222ECE2ULL, 0x41BD882FD050681CULL } }, /* XSUM_XXH128_testdata[12025] */\n    { 4008, 0x9E3779B185EBCA8DULL, { 0xA6DB86CDF49CDC24ULL, 0xC7447DAF67350DB3ULL } }, /* XSUM_XXH128_testdata[12026] */\n    { 4009, 0x0000000000000000ULL, { 0x5BED8336DA2E1B91ULL, 0xB85EE6F21FC10FE3ULL } }, /* XSUM_XXH128_testdata[12027] */\n    { 4009, 0x000000009E3779B1ULL, { 0x755952F3D671ABFEULL, 0xD652830FC5B04265ULL } }, /* XSUM_XXH128_testdata[12028] */\n    { 4009, 0x9E3779B185EBCA8DULL, { 0x80C78888E438C8E4ULL, 0x0794B70AFB7A93EDULL } }, /* XSUM_XXH128_testdata[12029] */\n    { 4010, 0x0000000000000000ULL, { 0x18B1FDDD465EA2C1ULL, 0xA022BF9A74E21682ULL } }, /* XSUM_XXH128_testdata[12030] */\n    { 4010, 0x000000009E3779B1ULL, { 0x23332DDE5E2C2992ULL, 0x25D969F96BF67460ULL } }, /* XSUM_XXH128_testdata[12031] */\n    { 4010, 0x9E3779B185EBCA8DULL, { 0x44B5135B49E9F8C5ULL, 0x4ED6FEE5D90D3637ULL } }, /* XSUM_XXH128_testdata[12032] */\n    { 4011, 0x0000000000000000ULL, { 0xB5C12C9C61209F68ULL, 0x12CDC0C7CAC38DDEULL } }, /* XSUM_XXH128_testdata[12033] */\n    { 4011, 0x000000009E3779B1ULL, { 0x78404738FE29A0E6ULL, 0xF52A9128A8788AF8ULL } }, /* XSUM_XXH128_testdata[12034] */\n    { 4011, 0x9E3779B185EBCA8DULL, { 0x282C356F51F01633ULL, 0x3E726CE188BBA456ULL } }, /* XSUM_XXH128_testdata[12035] */\n    { 4012, 0x0000000000000000ULL, { 0x85C82A6C0F1274E3ULL, 0x6604DF649F97D469ULL } }, /* XSUM_XXH128_testdata[12036] */\n    { 4012, 0x000000009E3779B1ULL, { 0xF8ACF858E0518105ULL, 0xB8BCEE201C50D015ULL } }, /* XSUM_XXH128_testdata[12037] */\n    { 4012, 0x9E3779B185EBCA8DULL, { 0x3F3CC56500850438ULL, 0x93D5F7A31131044AULL } }, /* XSUM_XXH128_testdata[12038] */\n    { 4013, 0x0000000000000000ULL, { 0x44AA6A2ECB850B99ULL, 0x85E27174CB17C1B1ULL } }, /* XSUM_XXH128_testdata[12039] */\n    { 4013, 0x000000009E3779B1ULL, { 0x8AC029F298143A38ULL, 0x0B7496DBAF500F6FULL } }, /* XSUM_XXH128_testdata[12040] */\n    { 4013, 0x9E3779B185EBCA8DULL, { 0xFC918DF96A2F9086ULL, 0xF2A38C019E11BA4CULL } }, /* XSUM_XXH128_testdata[12041] */\n    { 4014, 0x0000000000000000ULL, { 0x6CC9DA2929EBB547ULL, 0xC9DC14AB770AFC06ULL } }, /* XSUM_XXH128_testdata[12042] */\n    { 4014, 0x000000009E3779B1ULL, { 0x959A54DAAEF18A5FULL, 0x4BD04EC0CA5E1C9AULL } }, /* XSUM_XXH128_testdata[12043] */\n    { 4014, 0x9E3779B185EBCA8DULL, { 0x0FA30447394E3206ULL, 0x6BCE4AFAD524F320ULL } }, /* XSUM_XXH128_testdata[12044] */\n    { 4015, 0x0000000000000000ULL, { 0x45D8135F5AEF31F4ULL, 0xF54780EFD4F92385ULL } }, /* XSUM_XXH128_testdata[12045] */\n    { 4015, 0x000000009E3779B1ULL, { 0x271180DF1D3BC1A2ULL, 0x1177D80C1ED9A435ULL } }, /* XSUM_XXH128_testdata[12046] */\n    { 4015, 0x9E3779B185EBCA8DULL, { 0x52BB0C869F802BE6ULL, 0x9250C29620A55716ULL } }, /* XSUM_XXH128_testdata[12047] */\n    { 4016, 0x0000000000000000ULL, { 0x7620342B18B38037ULL, 0x6DE8D427C81CD086ULL } }, /* XSUM_XXH128_testdata[12048] */\n    { 4016, 0x000000009E3779B1ULL, { 0xF7FA8087BC562486ULL, 0xB4072DD7CB31631FULL } }, /* XSUM_XXH128_testdata[12049] */\n    { 4016, 0x9E3779B185EBCA8DULL, { 0xBD27FB07E38FFB89ULL, 0x6F9385DC8B628BD7ULL } }, /* XSUM_XXH128_testdata[12050] */\n    { 4017, 0x0000000000000000ULL, { 0x19AA8582519EFB78ULL, 0xE0C8C6E9B7F3CE86ULL } }, /* XSUM_XXH128_testdata[12051] */\n    { 4017, 0x000000009E3779B1ULL, { 0x9F3331F7D4C5B40FULL, 0x2893421DFA88D131ULL } }, /* XSUM_XXH128_testdata[12052] */\n    { 4017, 0x9E3779B185EBCA8DULL, { 0xF6AE9ED2299687ECULL, 0x72C20CCC2D8A361BULL } }, /* XSUM_XXH128_testdata[12053] */\n    { 4018, 0x0000000000000000ULL, { 0x18AB9343042FFD7BULL, 0x21970F294DDAC44CULL } }, /* XSUM_XXH128_testdata[12054] */\n    { 4018, 0x000000009E3779B1ULL, { 0x133F3047D21D7B37ULL, 0x9A5CCE40CF0EA5A2ULL } }, /* XSUM_XXH128_testdata[12055] */\n    { 4018, 0x9E3779B185EBCA8DULL, { 0x9CA0D8345D0C1364ULL, 0x634D1629740E521FULL } }, /* XSUM_XXH128_testdata[12056] */\n    { 4019, 0x0000000000000000ULL, { 0x58240880A0D0C9DAULL, 0x6DA0851BAC4C118EULL } }, /* XSUM_XXH128_testdata[12057] */\n    { 4019, 0x000000009E3779B1ULL, { 0xD1CDCEA596DC82A3ULL, 0xCACAC226F02DF774ULL } }, /* XSUM_XXH128_testdata[12058] */\n    { 4019, 0x9E3779B185EBCA8DULL, { 0x3084812F602A7184ULL, 0xF393EAABEA890B2CULL } }, /* XSUM_XXH128_testdata[12059] */\n    { 4020, 0x0000000000000000ULL, { 0xC6BF91DBA283CBFDULL, 0xE51420BB986E3C29ULL } }, /* XSUM_XXH128_testdata[12060] */\n    { 4020, 0x000000009E3779B1ULL, { 0x5FF3C77B9FA56A38ULL, 0x40B4EE8459BFF8DBULL } }, /* XSUM_XXH128_testdata[12061] */\n    { 4020, 0x9E3779B185EBCA8DULL, { 0x7C966FE6D9E62F5FULL, 0xE22677397AB736E6ULL } }, /* XSUM_XXH128_testdata[12062] */\n    { 4021, 0x0000000000000000ULL, { 0x65BA8FAA88EE3FB6ULL, 0x31AD16588E73CF1CULL } }, /* XSUM_XXH128_testdata[12063] */\n    { 4021, 0x000000009E3779B1ULL, { 0x35DCDCF0759EBCAEULL, 0x2EBE2DF49980290AULL } }, /* XSUM_XXH128_testdata[12064] */\n    { 4021, 0x9E3779B185EBCA8DULL, { 0x37826DE37F8188ADULL, 0x4E422FFBE7019E96ULL } }, /* XSUM_XXH128_testdata[12065] */\n    { 4022, 0x0000000000000000ULL, { 0xE54A695510735977ULL, 0xAA47B471438E326EULL } }, /* XSUM_XXH128_testdata[12066] */\n    { 4022, 0x000000009E3779B1ULL, { 0x5A448A9E4271DDD8ULL, 0xCA06E874419EF398ULL } }, /* XSUM_XXH128_testdata[12067] */\n    { 4022, 0x9E3779B185EBCA8DULL, { 0x55CCAA4287B96BAFULL, 0x58F1B09CF0737DEDULL } }, /* XSUM_XXH128_testdata[12068] */\n    { 4023, 0x0000000000000000ULL, { 0x8E04EDA3E75BF177ULL, 0xAF568681626563AFULL } }, /* XSUM_XXH128_testdata[12069] */\n    { 4023, 0x000000009E3779B1ULL, { 0x89A1D9FA352520B3ULL, 0x7083580360572879ULL } }, /* XSUM_XXH128_testdata[12070] */\n    { 4023, 0x9E3779B185EBCA8DULL, { 0xE8DD69B31C7AA562ULL, 0x1575FF83E6C675EEULL } }, /* XSUM_XXH128_testdata[12071] */\n    { 4024, 0x0000000000000000ULL, { 0x8A0F3CA734A6FE60ULL, 0x192F6C598252A3EBULL } }, /* XSUM_XXH128_testdata[12072] */\n    { 4024, 0x000000009E3779B1ULL, { 0x97B39145E13218BCULL, 0x2B6A39883CD39CBFULL } }, /* XSUM_XXH128_testdata[12073] */\n    { 4024, 0x9E3779B185EBCA8DULL, { 0xBD6286044C530E55ULL, 0x4CF6802F959666FBULL } }, /* XSUM_XXH128_testdata[12074] */\n    { 4025, 0x0000000000000000ULL, { 0xD9ED85C42BB2F252ULL, 0xFFDDBEF427178907ULL } }, /* XSUM_XXH128_testdata[12075] */\n    { 4025, 0x000000009E3779B1ULL, { 0x5B2FDC9A536A0D2AULL, 0x0EBC02FEB5E86916ULL } }, /* XSUM_XXH128_testdata[12076] */\n    { 4025, 0x9E3779B185EBCA8DULL, { 0xD0ECFCBE239FDAE4ULL, 0x92790027768B0CB8ULL } }, /* XSUM_XXH128_testdata[12077] */\n    { 4026, 0x0000000000000000ULL, { 0xF8084F228EC4F387ULL, 0xBFB551290A69862CULL } }, /* XSUM_XXH128_testdata[12078] */\n    { 4026, 0x000000009E3779B1ULL, { 0x7F96057AADF5A0EDULL, 0x687D31148F2FFBCBULL } }, /* XSUM_XXH128_testdata[12079] */\n    { 4026, 0x9E3779B185EBCA8DULL, { 0x406784D868BF9889ULL, 0xDDDC1E0F16650DE0ULL } }, /* XSUM_XXH128_testdata[12080] */\n    { 4027, 0x0000000000000000ULL, { 0x1C9144339B38AA9AULL, 0x1FE0A63B1F2B20A7ULL } }, /* XSUM_XXH128_testdata[12081] */\n    { 4027, 0x000000009E3779B1ULL, { 0x52C5D30CF7F24FEAULL, 0xECC190382AC6E095ULL } }, /* XSUM_XXH128_testdata[12082] */\n    { 4027, 0x9E3779B185EBCA8DULL, { 0x416651D9DF1E676FULL, 0xFEAD2D70B7659463ULL } }, /* XSUM_XXH128_testdata[12083] */\n    { 4028, 0x0000000000000000ULL, { 0xED9E073AD05153EAULL, 0x4BB6A5CCCBC4D7FDULL } }, /* XSUM_XXH128_testdata[12084] */\n    { 4028, 0x000000009E3779B1ULL, { 0x6A8AF2962064888BULL, 0xFDBDCCF821000500ULL } }, /* XSUM_XXH128_testdata[12085] */\n    { 4028, 0x9E3779B185EBCA8DULL, { 0xFBD66B77B585F7A0ULL, 0x9F1A26056951A6B2ULL } }, /* XSUM_XXH128_testdata[12086] */\n    { 4029, 0x0000000000000000ULL, { 0x4E8E5C7C933C15C7ULL, 0xD71DEA87F79F11DFULL } }, /* XSUM_XXH128_testdata[12087] */\n    { 4029, 0x000000009E3779B1ULL, { 0x5702ECCEA2206B2FULL, 0x00563BD5E590127BULL } }, /* XSUM_XXH128_testdata[12088] */\n    { 4029, 0x9E3779B185EBCA8DULL, { 0xCF53A8E7C5B6C534ULL, 0x8035EDA194B1375BULL } }, /* XSUM_XXH128_testdata[12089] */\n    { 4030, 0x0000000000000000ULL, { 0x7AF4A9E0038F11F7ULL, 0x7B8E6ACB38F5F647ULL } }, /* XSUM_XXH128_testdata[12090] */\n    { 4030, 0x000000009E3779B1ULL, { 0x0C0DF348C50E6824ULL, 0xFA5D012CB69F650DULL } }, /* XSUM_XXH128_testdata[12091] */\n    { 4030, 0x9E3779B185EBCA8DULL, { 0x8A017810F4FC9DEDULL, 0x9F89F5D494C6C9BBULL } }, /* XSUM_XXH128_testdata[12092] */\n    { 4031, 0x0000000000000000ULL, { 0x8BD0CF454B28920EULL, 0xE045A21855546E82ULL } }, /* XSUM_XXH128_testdata[12093] */\n    { 4031, 0x000000009E3779B1ULL, { 0x8F37936C9193A765ULL, 0xF89887BD538E72DEULL } }, /* XSUM_XXH128_testdata[12094] */\n    { 4031, 0x9E3779B185EBCA8DULL, { 0xAD5E5C4D36915D21ULL, 0xC6701B2ED638BD40ULL } }, /* XSUM_XXH128_testdata[12095] */\n    { 4032, 0x0000000000000000ULL, { 0x526C9E698660795FULL, 0x8CE99EF2876FAF30ULL } }, /* XSUM_XXH128_testdata[12096] */\n    { 4032, 0x000000009E3779B1ULL, { 0x088695FC31EAB457ULL, 0x76D483A80EE271B5ULL } }, /* XSUM_XXH128_testdata[12097] */\n    { 4032, 0x9E3779B185EBCA8DULL, { 0xEDFA9AF90A2570F4ULL, 0x00C5ADFAB20F9B88ULL } }, /* XSUM_XXH128_testdata[12098] */\n    { 4033, 0x0000000000000000ULL, { 0x5B78ACBA805C7A9DULL, 0x0DB6B8034A0AB08EULL } }, /* XSUM_XXH128_testdata[12099] */\n    { 4033, 0x000000009E3779B1ULL, { 0x87A6E65D24F9402FULL, 0x18B17AC69C245542ULL } }, /* XSUM_XXH128_testdata[12100] */\n    { 4033, 0x9E3779B185EBCA8DULL, { 0xE4FF46D5A5AD419BULL, 0xB0345F3C4A1BDC39ULL } }, /* XSUM_XXH128_testdata[12101] */\n    { 4034, 0x0000000000000000ULL, { 0xA102C5136A2E85B3ULL, 0xDFC0BCF53A3A10F5ULL } }, /* XSUM_XXH128_testdata[12102] */\n    { 4034, 0x000000009E3779B1ULL, { 0x319934842C00B428ULL, 0xFAB4397C8B21DF39ULL } }, /* XSUM_XXH128_testdata[12103] */\n    { 4034, 0x9E3779B185EBCA8DULL, { 0x395C36DE86C13BB0ULL, 0x868D5A9DEF297371ULL } }, /* XSUM_XXH128_testdata[12104] */\n    { 4035, 0x0000000000000000ULL, { 0x4511241B19C0FA71ULL, 0x721632FB62D262C2ULL } }, /* XSUM_XXH128_testdata[12105] */\n    { 4035, 0x000000009E3779B1ULL, { 0xE9E20C35A88FA80AULL, 0x9456CF248C9EC71BULL } }, /* XSUM_XXH128_testdata[12106] */\n    { 4035, 0x9E3779B185EBCA8DULL, { 0x5E7C04526A4CD6E9ULL, 0x407A24E1B155DF19ULL } }, /* XSUM_XXH128_testdata[12107] */\n    { 4036, 0x0000000000000000ULL, { 0x313E19B2397F5306ULL, 0xD0906614FC071208ULL } }, /* XSUM_XXH128_testdata[12108] */\n    { 4036, 0x000000009E3779B1ULL, { 0x8827751054976A08ULL, 0xE9656CDC490D0531ULL } }, /* XSUM_XXH128_testdata[12109] */\n    { 4036, 0x9E3779B185EBCA8DULL, { 0x8E4378ADB6056F30ULL, 0xA930B9BE45AB08F0ULL } }, /* XSUM_XXH128_testdata[12110] */\n    { 4037, 0x0000000000000000ULL, { 0xF45852F43FB45730ULL, 0x28F2C20ADF6562E6ULL } }, /* XSUM_XXH128_testdata[12111] */\n    { 4037, 0x000000009E3779B1ULL, { 0x7049D22E007D6037ULL, 0x1F0ED3128AA5343EULL } }, /* XSUM_XXH128_testdata[12112] */\n    { 4037, 0x9E3779B185EBCA8DULL, { 0x9EABF4BCD1D9854DULL, 0x76F3C1730DF4D64BULL } }, /* XSUM_XXH128_testdata[12113] */\n    { 4038, 0x0000000000000000ULL, { 0xAEB3ED5AA3FAFBB3ULL, 0x10FE014A2CF9DCA3ULL } }, /* XSUM_XXH128_testdata[12114] */\n    { 4038, 0x000000009E3779B1ULL, { 0x8DEE5BA97BCBC13BULL, 0x37114AEA0398F184ULL } }, /* XSUM_XXH128_testdata[12115] */\n    { 4038, 0x9E3779B185EBCA8DULL, { 0xDD8ED04139CDA479ULL, 0x9DD8F010C9E381FBULL } }, /* XSUM_XXH128_testdata[12116] */\n    { 4039, 0x0000000000000000ULL, { 0x629A488F54BB9A5CULL, 0xC3FA6E3944B749FEULL } }, /* XSUM_XXH128_testdata[12117] */\n    { 4039, 0x000000009E3779B1ULL, { 0xB2437C4FBE76D05BULL, 0xFDBEB3B6A80FA500ULL } }, /* XSUM_XXH128_testdata[12118] */\n    { 4039, 0x9E3779B185EBCA8DULL, { 0x88D289E20F432896ULL, 0xB67CAA09809DF524ULL } }, /* XSUM_XXH128_testdata[12119] */\n    { 4040, 0x0000000000000000ULL, { 0x302AC702D017AF48ULL, 0xE6AEA08E96AE9411ULL } }, /* XSUM_XXH128_testdata[12120] */\n    { 4040, 0x000000009E3779B1ULL, { 0xDEF85C6DD05D0EF8ULL, 0x554DC522AD699CD2ULL } }, /* XSUM_XXH128_testdata[12121] */\n    { 4040, 0x9E3779B185EBCA8DULL, { 0x63B3EBA53DD3C7F3ULL, 0xD93A4637FD9EBCC1ULL } }, /* XSUM_XXH128_testdata[12122] */\n    { 4041, 0x0000000000000000ULL, { 0xF392BF0F187C48A3ULL, 0x72817D30F94043E8ULL } }, /* XSUM_XXH128_testdata[12123] */\n    { 4041, 0x000000009E3779B1ULL, { 0xD18164FA609CF715ULL, 0x537E530D06A0F8FAULL } }, /* XSUM_XXH128_testdata[12124] */\n    { 4041, 0x9E3779B185EBCA8DULL, { 0x4B18A944D21F9E8FULL, 0x8C0220B17ED50720ULL } }, /* XSUM_XXH128_testdata[12125] */\n    { 4042, 0x0000000000000000ULL, { 0x7E2E33EAE958DCF4ULL, 0x43BFEC6C8742CE35ULL } }, /* XSUM_XXH128_testdata[12126] */\n    { 4042, 0x000000009E3779B1ULL, { 0xC1877A73FA900118ULL, 0x1437C063DE4FBF6DULL } }, /* XSUM_XXH128_testdata[12127] */\n    { 4042, 0x9E3779B185EBCA8DULL, { 0xDA44FEE50C8F5BB0ULL, 0x02F7D0F4ADAC0B7DULL } }, /* XSUM_XXH128_testdata[12128] */\n    { 4043, 0x0000000000000000ULL, { 0x7955E4BB5942274AULL, 0xF58228B99C7ECC80ULL } }, /* XSUM_XXH128_testdata[12129] */\n    { 4043, 0x000000009E3779B1ULL, { 0x9D8CDFCAFB516E43ULL, 0xAFFCF2B39940AC4BULL } }, /* XSUM_XXH128_testdata[12130] */\n    { 4043, 0x9E3779B185EBCA8DULL, { 0xC28A8539FECBA7EBULL, 0x1AB3A8A82FF5CCD8ULL } }, /* XSUM_XXH128_testdata[12131] */\n    { 4044, 0x0000000000000000ULL, { 0x7FFDDDE92A33E6F3ULL, 0xDA491EAF0254C5E4ULL } }, /* XSUM_XXH128_testdata[12132] */\n    { 4044, 0x000000009E3779B1ULL, { 0xE6A90A879FBB1B09ULL, 0x245C362A87FD666EULL } }, /* XSUM_XXH128_testdata[12133] */\n    { 4044, 0x9E3779B185EBCA8DULL, { 0x51923CA9096E6215ULL, 0x9C738951D8D8864CULL } }, /* XSUM_XXH128_testdata[12134] */\n    { 4045, 0x0000000000000000ULL, { 0xE876C93C712F5CE6ULL, 0x2AC424F3F34E12A2ULL } }, /* XSUM_XXH128_testdata[12135] */\n    { 4045, 0x000000009E3779B1ULL, { 0xC5EEDF6D322E1FE0ULL, 0x9BB94E4FE52997A5ULL } }, /* XSUM_XXH128_testdata[12136] */\n    { 4045, 0x9E3779B185EBCA8DULL, { 0xDC6FD6E67A34FED4ULL, 0x5BAD35B4F283C10AULL } }, /* XSUM_XXH128_testdata[12137] */\n    { 4046, 0x0000000000000000ULL, { 0xCC6D082EB77008E6ULL, 0xCAE6EE9D14891F4BULL } }, /* XSUM_XXH128_testdata[12138] */\n    { 4046, 0x000000009E3779B1ULL, { 0xF383A90459055FD7ULL, 0x44AFE54C2372CF56ULL } }, /* XSUM_XXH128_testdata[12139] */\n    { 4046, 0x9E3779B185EBCA8DULL, { 0x791FEF31ACFE46C7ULL, 0x95D64B5B97421255ULL } }, /* XSUM_XXH128_testdata[12140] */\n    { 4047, 0x0000000000000000ULL, { 0xC4DA2A18C857B469ULL, 0x8076F48AF505497BULL } }, /* XSUM_XXH128_testdata[12141] */\n    { 4047, 0x000000009E3779B1ULL, { 0x88826A7F5E5582E5ULL, 0x6CC716C40519EB64ULL } }, /* XSUM_XXH128_testdata[12142] */\n    { 4047, 0x9E3779B185EBCA8DULL, { 0x6E5C68216122FB2BULL, 0x7FCDC893C37DD5E5ULL } }, /* XSUM_XXH128_testdata[12143] */\n    { 4048, 0x0000000000000000ULL, { 0x0AC08275816C6F95ULL, 0xF3A4F654845607A9ULL } }, /* XSUM_XXH128_testdata[12144] */\n    { 4048, 0x000000009E3779B1ULL, { 0x07E146965BA53631ULL, 0xE5461BE5FE62E412ULL } }, /* XSUM_XXH128_testdata[12145] */\n    { 4048, 0x9E3779B185EBCA8DULL, { 0x108827705704EFC6ULL, 0x1CF0AF0027CCF455ULL } }, /* XSUM_XXH128_testdata[12146] */\n    { 4049, 0x0000000000000000ULL, { 0xB8E89026CB7C7029ULL, 0x429E5D83877E7AF7ULL } }, /* XSUM_XXH128_testdata[12147] */\n    { 4049, 0x000000009E3779B1ULL, { 0x7035788F86E2CCCCULL, 0xD63B4F15F3D4C4CAULL } }, /* XSUM_XXH128_testdata[12148] */\n    { 4049, 0x9E3779B185EBCA8DULL, { 0xB61ABB09B081A25DULL, 0xB36AA4C4B1F274C7ULL } }, /* XSUM_XXH128_testdata[12149] */\n    { 4050, 0x0000000000000000ULL, { 0xEDF79795BF9144C8ULL, 0x52682C115C27CE41ULL } }, /* XSUM_XXH128_testdata[12150] */\n    { 4050, 0x000000009E3779B1ULL, { 0xB848899C9BB550C8ULL, 0x1A1145FA433063D0ULL } }, /* XSUM_XXH128_testdata[12151] */\n    { 4050, 0x9E3779B185EBCA8DULL, { 0xB74696F2CA2997D1ULL, 0x465CB342B7C2D949ULL } }, /* XSUM_XXH128_testdata[12152] */\n    { 4051, 0x0000000000000000ULL, { 0xC729C7AC4BB14964ULL, 0x509EAB137D6CF2FEULL } }, /* XSUM_XXH128_testdata[12153] */\n    { 4051, 0x000000009E3779B1ULL, { 0xA477E246AF2A5ECBULL, 0xE586BEF3B125FE98ULL } }, /* XSUM_XXH128_testdata[12154] */\n    { 4051, 0x9E3779B185EBCA8DULL, { 0x9D1CABF0F0D96765ULL, 0xD6F3FAECEBB1FB10ULL } }, /* XSUM_XXH128_testdata[12155] */\n    { 4052, 0x0000000000000000ULL, { 0x609A24843463E169ULL, 0x5B8F35F9C483DF05ULL } }, /* XSUM_XXH128_testdata[12156] */\n    { 4052, 0x000000009E3779B1ULL, { 0xFABA72FAA1C452E2ULL, 0x4337F98D4A6C6AC2ULL } }, /* XSUM_XXH128_testdata[12157] */\n    { 4052, 0x9E3779B185EBCA8DULL, { 0xB87E44998D71C162ULL, 0xE352A4E9C94F7BE5ULL } }, /* XSUM_XXH128_testdata[12158] */\n    { 4053, 0x0000000000000000ULL, { 0x1BED4238AF1CB24BULL, 0xB33A9289B4928574ULL } }, /* XSUM_XXH128_testdata[12159] */\n    { 4053, 0x000000009E3779B1ULL, { 0xD58BD24EC74962DCULL, 0xCBC2714C04ACBFADULL } }, /* XSUM_XXH128_testdata[12160] */\n    { 4053, 0x9E3779B185EBCA8DULL, { 0x31D93BB2EA4F386FULL, 0xACB3404C40811783ULL } }, /* XSUM_XXH128_testdata[12161] */\n    { 4054, 0x0000000000000000ULL, { 0x770B55A6A483BCA4ULL, 0xDF1AF7287A212D18ULL } }, /* XSUM_XXH128_testdata[12162] */\n    { 4054, 0x000000009E3779B1ULL, { 0x8318A5748BA88EE7ULL, 0x40A248624E171124ULL } }, /* XSUM_XXH128_testdata[12163] */\n    { 4054, 0x9E3779B185EBCA8DULL, { 0xBA70C2B74F653493ULL, 0x4E7A43ECB02F95B4ULL } }, /* XSUM_XXH128_testdata[12164] */\n    { 4055, 0x0000000000000000ULL, { 0x23D3E35D5AD116E8ULL, 0x890CC34C8AFC0A49ULL } }, /* XSUM_XXH128_testdata[12165] */\n    { 4055, 0x000000009E3779B1ULL, { 0x5F950D3D3CAFE3CAULL, 0xC30254530C698E6CULL } }, /* XSUM_XXH128_testdata[12166] */\n    { 4055, 0x9E3779B185EBCA8DULL, { 0xE340C14E0B16781EULL, 0x8EFF162EF04EE897ULL } }, /* XSUM_XXH128_testdata[12167] */\n    { 4056, 0x0000000000000000ULL, { 0x8F52A469B0314027ULL, 0x259AD397D38DE876ULL } }, /* XSUM_XXH128_testdata[12168] */\n    { 4056, 0x000000009E3779B1ULL, { 0xB7F15014746ADC90ULL, 0xF8778E4A509BF6D1ULL } }, /* XSUM_XXH128_testdata[12169] */\n    { 4056, 0x9E3779B185EBCA8DULL, { 0x42E9D3AABC86D1A3ULL, 0x25740280FFD41ECAULL } }, /* XSUM_XXH128_testdata[12170] */\n    { 4057, 0x0000000000000000ULL, { 0xE80E3D01DFC0DFAAULL, 0x286A21BC6620B56EULL } }, /* XSUM_XXH128_testdata[12171] */\n    { 4057, 0x000000009E3779B1ULL, { 0xA07B220C262D5731ULL, 0x41AE337ABBB8B9F2ULL } }, /* XSUM_XXH128_testdata[12172] */\n    { 4057, 0x9E3779B185EBCA8DULL, { 0x8331A93BCEA6A7E7ULL, 0x48F53F7ACBA83A85ULL } }, /* XSUM_XXH128_testdata[12173] */\n    { 4058, 0x0000000000000000ULL, { 0xA46F0713D1D96AACULL, 0x699CBFC534AF20D7ULL } }, /* XSUM_XXH128_testdata[12174] */\n    { 4058, 0x000000009E3779B1ULL, { 0x153F08DE2D52BD51ULL, 0x9F4631E08AFD8D24ULL } }, /* XSUM_XXH128_testdata[12175] */\n    { 4058, 0x9E3779B185EBCA8DULL, { 0x12226CE027536089ULL, 0x40A01219C00F17B9ULL } }, /* XSUM_XXH128_testdata[12176] */\n    { 4059, 0x0000000000000000ULL, { 0x48AB03C22EA5B06FULL, 0x934E7D0888CCE588ULL } }, /* XSUM_XXH128_testdata[12177] */\n    { 4059, 0x000000009E3779B1ULL, { 0x5EC36DDF37928931ULL, 0xB82A19FBE31C97C6ULL } }, /* XSUM_XXH128_testdata[12178] */\n    { 4059, 0x9E3779B185EBCA8DULL, { 0x781B9FE3805E8D49ULL, 0x38D4DD02648A1D73ULL } }, /* XSUM_XXH128_testdata[12179] */\n    { 4060, 0x0000000000000000ULL, { 0x1CF540D651D84B2CULL, 0x4AB17CE097E2045CULL } }, /* XSUM_XXH128_testdata[12180] */\n    { 4060, 0x000000009E3779B1ULL, { 0x8A61F965E37B0664ULL, 0x4EBA550A17AD0569ULL } }, /* XSUM_XXH128_testdata[12181] */\n    { 4060, 0x9E3779B185EBCA8DULL, { 0x9B2A4997E91BB32CULL, 0x296ED99E572D7E53ULL } }, /* XSUM_XXH128_testdata[12182] */\n    { 4061, 0x0000000000000000ULL, { 0x395B9F1A3476D098ULL, 0xC1BF122EDA317A97ULL } }, /* XSUM_XXH128_testdata[12183] */\n    { 4061, 0x000000009E3779B1ULL, { 0xC50A8E48223D52F0ULL, 0x54060F6003C760F3ULL } }, /* XSUM_XXH128_testdata[12184] */\n    { 4061, 0x9E3779B185EBCA8DULL, { 0x00E4E50A72AE87DBULL, 0xCBF2A288F1B371ADULL } }, /* XSUM_XXH128_testdata[12185] */\n    { 4062, 0x0000000000000000ULL, { 0x613625FF381D6585ULL, 0xA38040B96B91C00DULL } }, /* XSUM_XXH128_testdata[12186] */\n    { 4062, 0x000000009E3779B1ULL, { 0x4C993E2C212ECC0EULL, 0x47CDDCF88F6DCD6FULL } }, /* XSUM_XXH128_testdata[12187] */\n    { 4062, 0x9E3779B185EBCA8DULL, { 0xDF96924A26842033ULL, 0xBB14221853CBE824ULL } }, /* XSUM_XXH128_testdata[12188] */\n    { 4063, 0x0000000000000000ULL, { 0x44A5F2DC91EFDB81ULL, 0xF2F6AC6A9E0E0545ULL } }, /* XSUM_XXH128_testdata[12189] */\n    { 4063, 0x000000009E3779B1ULL, { 0x7EA93425F1D68E4AULL, 0x5F67D12A8874FF72ULL } }, /* XSUM_XXH128_testdata[12190] */\n    { 4063, 0x9E3779B185EBCA8DULL, { 0x5A763652DB9F7AA1ULL, 0xDDB0C4CE7F898DC4ULL } }, /* XSUM_XXH128_testdata[12191] */\n    { 4064, 0x0000000000000000ULL, { 0xD005690B90F42B3DULL, 0xF96F6EB92E01093DULL } }, /* XSUM_XXH128_testdata[12192] */\n    { 4064, 0x000000009E3779B1ULL, { 0xD95DB26CB8C1BB8DULL, 0x57477753C74C7E54ULL } }, /* XSUM_XXH128_testdata[12193] */\n    { 4064, 0x9E3779B185EBCA8DULL, { 0x6646113CF792EFCCULL, 0x3BA9B794CD67E58AULL } }, /* XSUM_XXH128_testdata[12194] */\n    { 4065, 0x0000000000000000ULL, { 0x2AABD3E749018693ULL, 0xFE37B3CB82AD665CULL } }, /* XSUM_XXH128_testdata[12195] */\n    { 4065, 0x000000009E3779B1ULL, { 0x27012B46D854E592ULL, 0x3DF1A03AF138410BULL } }, /* XSUM_XXH128_testdata[12196] */\n    { 4065, 0x9E3779B185EBCA8DULL, { 0x8F69704EFAFC7CE6ULL, 0xCFFD472BE8FC2122ULL } }, /* XSUM_XXH128_testdata[12197] */\n    { 4066, 0x0000000000000000ULL, { 0xBD32EC6AC8590941ULL, 0x2DB28CD8B0CA2275ULL } }, /* XSUM_XXH128_testdata[12198] */\n    { 4066, 0x000000009E3779B1ULL, { 0x10F5982688F23BACULL, 0xC69DD5DAF91730C5ULL } }, /* XSUM_XXH128_testdata[12199] */\n    { 4066, 0x9E3779B185EBCA8DULL, { 0xAFDC666E089AD97FULL, 0x378F002EC9609378ULL } }, /* XSUM_XXH128_testdata[12200] */\n    { 4067, 0x0000000000000000ULL, { 0x17F48E89EA383997ULL, 0xDD5C97BB5FC07047ULL } }, /* XSUM_XXH128_testdata[12201] */\n    { 4067, 0x000000009E3779B1ULL, { 0x2D947798BE9E5B06ULL, 0x1935938E82CDD5E8ULL } }, /* XSUM_XXH128_testdata[12202] */\n    { 4067, 0x9E3779B185EBCA8DULL, { 0xE80949C6577D0B1DULL, 0xDAEA54AE7B97D22CULL } }, /* XSUM_XXH128_testdata[12203] */\n    { 4068, 0x0000000000000000ULL, { 0x409EE52A6BB82E50ULL, 0xA2773E2E17B93FB8ULL } }, /* XSUM_XXH128_testdata[12204] */\n    { 4068, 0x000000009E3779B1ULL, { 0x5E9C826599B7E64BULL, 0xB3655A3FC524DC0EULL } }, /* XSUM_XXH128_testdata[12205] */\n    { 4068, 0x9E3779B185EBCA8DULL, { 0x83B486082089F055ULL, 0x1CFFE816E7E7BDB8ULL } }, /* XSUM_XXH128_testdata[12206] */\n    { 4069, 0x0000000000000000ULL, { 0x2A37D8C283560A96ULL, 0xED682E323BFB3AEFULL } }, /* XSUM_XXH128_testdata[12207] */\n    { 4069, 0x000000009E3779B1ULL, { 0xE9F9280617A4C10CULL, 0x95CE961995354E4CULL } }, /* XSUM_XXH128_testdata[12208] */\n    { 4069, 0x9E3779B185EBCA8DULL, { 0x9FFAAF61614F195BULL, 0x11A2944C18995F06ULL } }, /* XSUM_XXH128_testdata[12209] */\n    { 4070, 0x0000000000000000ULL, { 0xB6BD6711BD542608ULL, 0x9BDDAF5DEF9AAD33ULL } }, /* XSUM_XXH128_testdata[12210] */\n    { 4070, 0x000000009E3779B1ULL, { 0x5F77A8A58A6E188AULL, 0x9AB28623C719405EULL } }, /* XSUM_XXH128_testdata[12211] */\n    { 4070, 0x9E3779B185EBCA8DULL, { 0xBA4BF117D8520CC6ULL, 0x08633A54F0FE8341ULL } }, /* XSUM_XXH128_testdata[12212] */\n    { 4071, 0x0000000000000000ULL, { 0x0DED6A95422B54AAULL, 0x03DFE26C11C7A8FCULL } }, /* XSUM_XXH128_testdata[12213] */\n    { 4071, 0x000000009E3779B1ULL, { 0x01B85EE2228AEDDCULL, 0xA73C97C1091DDF7EULL } }, /* XSUM_XXH128_testdata[12214] */\n    { 4071, 0x9E3779B185EBCA8DULL, { 0x73019662E3B7E5A5ULL, 0x8EB1EA7E47A53994ULL } }, /* XSUM_XXH128_testdata[12215] */\n    { 4072, 0x0000000000000000ULL, { 0x617DBA28E3EF7CCFULL, 0x0A633F1777C030E9ULL } }, /* XSUM_XXH128_testdata[12216] */\n    { 4072, 0x000000009E3779B1ULL, { 0x60583E2FDDA30EC1ULL, 0xC190B4E9DBD812F0ULL } }, /* XSUM_XXH128_testdata[12217] */\n    { 4072, 0x9E3779B185EBCA8DULL, { 0x42B5B0478A2F9F19ULL, 0xCCF326BF1C5FC56FULL } }, /* XSUM_XXH128_testdata[12218] */\n    { 4073, 0x0000000000000000ULL, { 0x985E6670B051042DULL, 0x794CF0CB955D034FULL } }, /* XSUM_XXH128_testdata[12219] */\n    { 4073, 0x000000009E3779B1ULL, { 0x21E763A91A99B5E4ULL, 0xE93E9B7A0DCADC9DULL } }, /* XSUM_XXH128_testdata[12220] */\n    { 4073, 0x9E3779B185EBCA8DULL, { 0xF2271200229B7305ULL, 0x7BEFADF985C9B9A5ULL } }, /* XSUM_XXH128_testdata[12221] */\n    { 4074, 0x0000000000000000ULL, { 0x683A8A468EDB302EULL, 0xD0E8B9C36618FD6DULL } }, /* XSUM_XXH128_testdata[12222] */\n    { 4074, 0x000000009E3779B1ULL, { 0xEBAF37993F854B7AULL, 0x0696F0C0577232C1ULL } }, /* XSUM_XXH128_testdata[12223] */\n    { 4074, 0x9E3779B185EBCA8DULL, { 0xAEFB4E179FED9C88ULL, 0x6AF41788A779AD8EULL } }, /* XSUM_XXH128_testdata[12224] */\n    { 4075, 0x0000000000000000ULL, { 0xE00A8B375D31275AULL, 0xCB5CC9E1E4531563ULL } }, /* XSUM_XXH128_testdata[12225] */\n    { 4075, 0x000000009E3779B1ULL, { 0x1B95AC875033A80BULL, 0x022D1D9F330F9523ULL } }, /* XSUM_XXH128_testdata[12226] */\n    { 4075, 0x9E3779B185EBCA8DULL, { 0x9FA2D2CA8DDBBCF3ULL, 0xCE91EF11B80A66BBULL } }, /* XSUM_XXH128_testdata[12227] */\n    { 4076, 0x0000000000000000ULL, { 0x1D09F151EC8021E5ULL, 0xA545126F4CAC1835ULL } }, /* XSUM_XXH128_testdata[12228] */\n    { 4076, 0x000000009E3779B1ULL, { 0x7EBFB2D9FCA5A0A0ULL, 0xB1EFADF15115ABC5ULL } }, /* XSUM_XXH128_testdata[12229] */\n    { 4076, 0x9E3779B185EBCA8DULL, { 0x73A09B83EE65723CULL, 0x938DE04AC836FF28ULL } }, /* XSUM_XXH128_testdata[12230] */\n    { 4077, 0x0000000000000000ULL, { 0xA3C2A4A8FB52E329ULL, 0xCBF4BBFC2E7105D2ULL } }, /* XSUM_XXH128_testdata[12231] */\n    { 4077, 0x000000009E3779B1ULL, { 0x578832AD952CFA1CULL, 0xB29BFE805C5BEEA8ULL } }, /* XSUM_XXH128_testdata[12232] */\n    { 4077, 0x9E3779B185EBCA8DULL, { 0x27701C5AF11C0069ULL, 0x0C4C62C213E15389ULL } }, /* XSUM_XXH128_testdata[12233] */\n    { 4078, 0x0000000000000000ULL, { 0x6670C8D7DEC04183ULL, 0x0A62882C053244C8ULL } }, /* XSUM_XXH128_testdata[12234] */\n    { 4078, 0x000000009E3779B1ULL, { 0xDEECD9E1368DF1CEULL, 0x8E24E6F84D6D3CD9ULL } }, /* XSUM_XXH128_testdata[12235] */\n    { 4078, 0x9E3779B185EBCA8DULL, { 0x6AFE8BB05CA6B943ULL, 0x5D7ACB37B2A3AB81ULL } }, /* XSUM_XXH128_testdata[12236] */\n    { 4079, 0x0000000000000000ULL, { 0x8A5BBE290F81A57EULL, 0xFC949799B9841516ULL } }, /* XSUM_XXH128_testdata[12237] */\n    { 4079, 0x000000009E3779B1ULL, { 0x86F375514CC7CEB1ULL, 0x477F39E1006DBC59ULL } }, /* XSUM_XXH128_testdata[12238] */\n    { 4079, 0x9E3779B185EBCA8DULL, { 0x7C522C7AE0D03876ULL, 0x7D5C22947323F0C1ULL } }, /* XSUM_XXH128_testdata[12239] */\n    { 4080, 0x0000000000000000ULL, { 0x7ED2234F362A97D5ULL, 0x9EC21BF269AEB135ULL } }, /* XSUM_XXH128_testdata[12240] */\n    { 4080, 0x000000009E3779B1ULL, { 0x6D10B94436A0325BULL, 0x8CD6F56D211A922CULL } }, /* XSUM_XXH128_testdata[12241] */\n    { 4080, 0x9E3779B185EBCA8DULL, { 0x7F3D70A7E5B3F9A1ULL, 0x6338E626D33A145AULL } }, /* XSUM_XXH128_testdata[12242] */\n    { 4081, 0x0000000000000000ULL, { 0x1B8EAFCDF80BBDFDULL, 0x0F588C79AACC751DULL } }, /* XSUM_XXH128_testdata[12243] */\n    { 4081, 0x000000009E3779B1ULL, { 0x3F6EA6560B8E8CD3ULL, 0x233708FFB4967FF9ULL } }, /* XSUM_XXH128_testdata[12244] */\n    { 4081, 0x9E3779B185EBCA8DULL, { 0x02E79635CCC002EEULL, 0xBAB13C1FD36BF127ULL } }, /* XSUM_XXH128_testdata[12245] */\n    { 4082, 0x0000000000000000ULL, { 0x5013EF2EAA3C5683ULL, 0xEF2AD96B10A78CE0ULL } }, /* XSUM_XXH128_testdata[12246] */\n    { 4082, 0x000000009E3779B1ULL, { 0xB02B56EF33E84BCDULL, 0x06245F316E6A94F0ULL } }, /* XSUM_XXH128_testdata[12247] */\n    { 4082, 0x9E3779B185EBCA8DULL, { 0x3C373EC1D9A78477ULL, 0x2431A2D7EE8141D9ULL } }, /* XSUM_XXH128_testdata[12248] */\n    { 4083, 0x0000000000000000ULL, { 0x4981B6B6B69E0F80ULL, 0xC9E6B57962CA3F8AULL } }, /* XSUM_XXH128_testdata[12249] */\n    { 4083, 0x000000009E3779B1ULL, { 0x6E1C74C8AAB23964ULL, 0xA541A56BD558889CULL } }, /* XSUM_XXH128_testdata[12250] */\n    { 4083, 0x9E3779B185EBCA8DULL, { 0x3058EC4F3EDDDA22ULL, 0xB852A0B9506F1C90ULL } }, /* XSUM_XXH128_testdata[12251] */\n    { 4084, 0x0000000000000000ULL, { 0x1EC74897CEDF2D47ULL, 0x8EDDAD3DCAFEC7E3ULL } }, /* XSUM_XXH128_testdata[12252] */\n    { 4084, 0x000000009E3779B1ULL, { 0xE5D8DE93EA43A343ULL, 0x90A2DB1F5ED8634EULL } }, /* XSUM_XXH128_testdata[12253] */\n    { 4084, 0x9E3779B185EBCA8DULL, { 0xB212E516ADC3536BULL, 0xD501F90005E4C0CBULL } }, /* XSUM_XXH128_testdata[12254] */\n    { 4085, 0x0000000000000000ULL, { 0x267430998005772AULL, 0x94C6FCABD7A9ECEAULL } }, /* XSUM_XXH128_testdata[12255] */\n    { 4085, 0x000000009E3779B1ULL, { 0xA96BE6C641D294E8ULL, 0x4FB78AED5739A96CULL } }, /* XSUM_XXH128_testdata[12256] */\n    { 4085, 0x9E3779B185EBCA8DULL, { 0xDDA517E217ED7B80ULL, 0x5D796C23A2EAEA4DULL } }, /* XSUM_XXH128_testdata[12257] */\n    { 4086, 0x0000000000000000ULL, { 0xC9DDE2A74BA8925FULL, 0xC764D99837428789ULL } }, /* XSUM_XXH128_testdata[12258] */\n    { 4086, 0x000000009E3779B1ULL, { 0x4B92D3091C611D68ULL, 0x6887DCB3504E3407ULL } }, /* XSUM_XXH128_testdata[12259] */\n    { 4086, 0x9E3779B185EBCA8DULL, { 0xB9C9D4582A006BEAULL, 0x2BF12BFA6C938E01ULL } }, /* XSUM_XXH128_testdata[12260] */\n    { 4087, 0x0000000000000000ULL, { 0x563098BE90EC168FULL, 0xB3B8159C0EF4CA2AULL } }, /* XSUM_XXH128_testdata[12261] */\n    { 4087, 0x000000009E3779B1ULL, { 0xEC015C43972F3857ULL, 0x6DA355DD0C0962DDULL } }, /* XSUM_XXH128_testdata[12262] */\n    { 4087, 0x9E3779B185EBCA8DULL, { 0xDFA20FC688D0AF48ULL, 0x09D5FB34C340357AULL } }, /* XSUM_XXH128_testdata[12263] */\n    { 4088, 0x0000000000000000ULL, { 0xA36A687AAB49E554ULL, 0xCE31CA111798CF73ULL } }, /* XSUM_XXH128_testdata[12264] */\n    { 4088, 0x000000009E3779B1ULL, { 0x3F716CCFF8BB677CULL, 0x4A68C33172C630F1ULL } }, /* XSUM_XXH128_testdata[12265] */\n    { 4088, 0x9E3779B185EBCA8DULL, { 0x379BF665192E4775ULL, 0x253AC5172741E40FULL } }, /* XSUM_XXH128_testdata[12266] */\n    { 4089, 0x0000000000000000ULL, { 0x34338C8FF9753005ULL, 0x6564F5C8B1534454ULL } }, /* XSUM_XXH128_testdata[12267] */\n    { 4089, 0x000000009E3779B1ULL, { 0x3BAEA5913AD4AD23ULL, 0xA01BDB3578DFC436ULL } }, /* XSUM_XXH128_testdata[12268] */\n    { 4089, 0x9E3779B185EBCA8DULL, { 0x0A508219A77780C7ULL, 0x090432F5800C078DULL } }, /* XSUM_XXH128_testdata[12269] */\n    { 4090, 0x0000000000000000ULL, { 0x7614D500BBB0CB51ULL, 0x1FDB04AFA68ABEBAULL } }, /* XSUM_XXH128_testdata[12270] */\n    { 4090, 0x000000009E3779B1ULL, { 0xAE345C9D014886E9ULL, 0x9F02ADD186DA6BF0ULL } }, /* XSUM_XXH128_testdata[12271] */\n    { 4090, 0x9E3779B185EBCA8DULL, { 0x9F2E62A9B61FDAD5ULL, 0xE15AD2BA213FC473ULL } }, /* XSUM_XXH128_testdata[12272] */\n    { 4091, 0x0000000000000000ULL, { 0x81DDA05D3E0F7E7DULL, 0x6B1CB742E7AAB610ULL } }, /* XSUM_XXH128_testdata[12273] */\n    { 4091, 0x000000009E3779B1ULL, { 0x66C5BE336C17A8C1ULL, 0xCB895D96A2A0242BULL } }, /* XSUM_XXH128_testdata[12274] */\n    { 4091, 0x9E3779B185EBCA8DULL, { 0x37DACC934EF3BCF8ULL, 0x49AE4E263D461D99ULL } }, /* XSUM_XXH128_testdata[12275] */\n    { 4092, 0x0000000000000000ULL, { 0xA1CB210DD29A93C4ULL, 0x2724BF9D822505B1ULL } }, /* XSUM_XXH128_testdata[12276] */\n    { 4092, 0x000000009E3779B1ULL, { 0x3739F6B6634AEAF7ULL, 0xA6A8E3A942BC8148ULL } }, /* XSUM_XXH128_testdata[12277] */\n    { 4092, 0x9E3779B185EBCA8DULL, { 0xEFB39BD4EA2906AEULL, 0xA2F3DA9ED70806ACULL } }, /* XSUM_XXH128_testdata[12278] */\n    { 4093, 0x0000000000000000ULL, { 0x43E2C26AF42C201AULL, 0x00AC894276460A63ULL } }, /* XSUM_XXH128_testdata[12279] */\n    { 4093, 0x000000009E3779B1ULL, { 0xF17F40259EE337A4ULL, 0xD48F547C9507D9E6ULL } }, /* XSUM_XXH128_testdata[12280] */\n    { 4093, 0x9E3779B185EBCA8DULL, { 0xF693A0588A836DD0ULL, 0xC60863B37BD3893FULL } }, /* XSUM_XXH128_testdata[12281] */\n    { 4094, 0x0000000000000000ULL, { 0x197717AFE7C9B73EULL, 0x6CBD01A93EA90009ULL } }, /* XSUM_XXH128_testdata[12282] */\n    { 4094, 0x000000009E3779B1ULL, { 0x7363F203FFC6613EULL, 0xC2076BBA7F3D027FULL } }, /* XSUM_XXH128_testdata[12283] */\n    { 4094, 0x9E3779B185EBCA8DULL, { 0x2F2B070D052B1D2DULL, 0xD76770FAD1BD736AULL } }, /* XSUM_XXH128_testdata[12284] */\n    { 4095, 0x0000000000000000ULL, { 0x3044187222AB0EFBULL, 0xF69E23CFA8CEA8C3ULL } }, /* XSUM_XXH128_testdata[12285] */\n    { 4095, 0x000000009E3779B1ULL, { 0x9C35919132DD0089ULL, 0xC4C45DC2BB4F3560ULL } }, /* XSUM_XXH128_testdata[12286] */\n    { 4095, 0x9E3779B185EBCA8DULL, { 0x9F7DDF29C377A8ECULL, 0x01790E949E0CD4FAULL } }, /* XSUM_XXH128_testdata[12287] */\n    { 4096, 0x0000000000000000ULL, { 0xE91206429D1F48F9ULL, 0xB9CFAEA2CA5626A4ULL } }, /* XSUM_XXH128_testdata[12288] */\n    { 4096, 0x000000009E3779B1ULL, { 0x2C32262E6834F8B9ULL, 0x61F9525DA2DCBE15ULL } }, /* XSUM_XXH128_testdata[12289] */\n    { 4096, 0x9E3779B185EBCA8DULL, { 0x2A3BBB20A5439DCDULL, 0x8FBC8FD4D526D1BDULL } }, /* XSUM_XXH128_testdata[12290] */\n    { 4097, 0x0000000000000000ULL, { 0xDAC80D543E339451ULL, 0x0C6A7A5F1D0BBB1AULL } }, /* XSUM_XXH128_testdata[12291] */\n    { 4097, 0x000000009E3779B1ULL, { 0x1AF3E6A9C2C87515ULL, 0x09B52D3E4FAEF7ECULL } }, /* XSUM_XXH128_testdata[12292] */\n    { 4097, 0x9E3779B185EBCA8DULL, { 0xA78887A19A340214ULL, 0xC94C98BCF2D279FCULL } }, /* XSUM_XXH128_testdata[12293] */\n    { 4098, 0x0000000000000000ULL, { 0x536E2124F23DF4DCULL, 0x25636E77911EEC8FULL } }, /* XSUM_XXH128_testdata[12294] */\n    { 4098, 0x000000009E3779B1ULL, { 0x4FBE7BE9C4339917ULL, 0x137D037C023E11D2ULL } }, /* XSUM_XXH128_testdata[12295] */\n    { 4098, 0x9E3779B185EBCA8DULL, { 0x63604DD99F9A0D25ULL, 0x12E99603DD13F5BBULL } }, /* XSUM_XXH128_testdata[12296] */\n    { 4099, 0x0000000000000000ULL, { 0x318D235ABA648B01ULL, 0x56EF94DFD3309161ULL } }, /* XSUM_XXH128_testdata[12297] */\n    { 4099, 0x000000009E3779B1ULL, { 0x3B6D4E7287012F83ULL, 0xFE68B6E1D6D1E25AULL } }, /* XSUM_XXH128_testdata[12298] */\n    { 4099, 0x9E3779B185EBCA8DULL, { 0x7849F825702B5C2FULL, 0xD026293EEB51E01DULL } }, /* XSUM_XXH128_testdata[12299] */\n    { 4100, 0x0000000000000000ULL, { 0x708DA8E991EA3767ULL, 0xD817306709E50508ULL } }, /* XSUM_XXH128_testdata[12300] */\n    { 4100, 0x000000009E3779B1ULL, { 0x30535B2ACDC9B04AULL, 0xEDC44305B560199CULL } }, /* XSUM_XXH128_testdata[12301] */\n    { 4100, 0x9E3779B185EBCA8DULL, { 0x68C5E93C2C55D53FULL, 0xD9861D9CB9383E68ULL } }, /* XSUM_XXH128_testdata[12302] */\n    { 4101, 0x0000000000000000ULL, { 0x7B6E0277636B7D11ULL, 0x3D3FF4039AA08D05ULL } }, /* XSUM_XXH128_testdata[12303] */\n    { 4101, 0x000000009E3779B1ULL, { 0xD9A86E6ADCC7713AULL, 0x52400B8A64C9FD99ULL } }, /* XSUM_XXH128_testdata[12304] */\n    { 4101, 0x9E3779B185EBCA8DULL, { 0x0415084858687771ULL, 0xAB2F82FB8FF3CF4EULL } }, /* XSUM_XXH128_testdata[12305] */\n    { 4102, 0x0000000000000000ULL, { 0x9B7212296B317024ULL, 0xCB773F88FEEEE24CULL } }, /* XSUM_XXH128_testdata[12306] */\n    { 4102, 0x000000009E3779B1ULL, { 0x9D327689BC16D846ULL, 0x2C1E5836AD4E6059ULL } }, /* XSUM_XXH128_testdata[12307] */\n    { 4102, 0x9E3779B185EBCA8DULL, { 0xB508A2861AA205C7ULL, 0xC82C3445A417F416ULL } }, /* XSUM_XXH128_testdata[12308] */\n    { 4103, 0x0000000000000000ULL, { 0xD6E778C94923EA44ULL, 0x5B449E3ABEEA1486ULL } }, /* XSUM_XXH128_testdata[12309] */\n    { 4103, 0x000000009E3779B1ULL, { 0xCCEA3F05E82D0559ULL, 0x744335AE42CB1D21ULL } }, /* XSUM_XXH128_testdata[12310] */\n    { 4103, 0x9E3779B185EBCA8DULL, { 0x917A70D1756179ADULL, 0xCD1A0902F7E5354CULL } }, /* XSUM_XXH128_testdata[12311] */\n    { 4104, 0x0000000000000000ULL, { 0x7E6885379F309E58ULL, 0x42149D0631884E6AULL } }, /* XSUM_XXH128_testdata[12312] */\n    { 4104, 0x000000009E3779B1ULL, { 0x5457B7E9C0295D71ULL, 0x1CB7E2D222F48032ULL } }, /* XSUM_XXH128_testdata[12313] */\n    { 4104, 0x9E3779B185EBCA8DULL, { 0xDD8CBBA844976FDAULL, 0xCAE6C3F6813F2F28ULL } }, /* XSUM_XXH128_testdata[12314] */\n    { 4105, 0x0000000000000000ULL, { 0x01B01BA093BD2B56ULL, 0xA6EAC58FBD3E9AD2ULL } }, /* XSUM_XXH128_testdata[12315] */\n    { 4105, 0x000000009E3779B1ULL, { 0x01ADA294EF915892ULL, 0xF5248A8E5D003D68ULL } }, /* XSUM_XXH128_testdata[12316] */\n    { 4105, 0x9E3779B185EBCA8DULL, { 0x6831B8F9AF88C06EULL, 0x6536E364491B412FULL } }, /* XSUM_XXH128_testdata[12317] */\n    { 4106, 0x0000000000000000ULL, { 0x8E223FE2C8A6C523ULL, 0xDC8CDD955202B3EDULL } }, /* XSUM_XXH128_testdata[12318] */\n    { 4106, 0x000000009E3779B1ULL, { 0x1DAB57BD0D1A7999ULL, 0x70DD2DABA73F9E1CULL } }, /* XSUM_XXH128_testdata[12319] */\n    { 4106, 0x9E3779B185EBCA8DULL, { 0x236C0B797A639A03ULL, 0x9AC3AF61FFC9DDAFULL } }, /* XSUM_XXH128_testdata[12320] */\n    { 4107, 0x0000000000000000ULL, { 0xCB55589B16B7596EULL, 0xB84D4A7645CAB431ULL } }, /* XSUM_XXH128_testdata[12321] */\n    { 4107, 0x000000009E3779B1ULL, { 0xB9225530DE10B60EULL, 0x908E64A315FF57BFULL } }, /* XSUM_XXH128_testdata[12322] */\n    { 4107, 0x9E3779B185EBCA8DULL, { 0x822FD6CBD55DEAF3ULL, 0x24722A518495A1B5ULL } }, /* XSUM_XXH128_testdata[12323] */\n    { 4108, 0x0000000000000000ULL, { 0xD2B50F5E142497B9ULL, 0x1EF7E0BB66615DC7ULL } }, /* XSUM_XXH128_testdata[12324] */\n    { 4108, 0x000000009E3779B1ULL, { 0x7453AFBF5C79C535ULL, 0x63D1154D063B10D0ULL } }, /* XSUM_XXH128_testdata[12325] */\n    { 4108, 0x9E3779B185EBCA8DULL, { 0xCC1DCFF11EE70755ULL, 0x88F52C272BE44145ULL } }, /* XSUM_XXH128_testdata[12326] */\n    { 4109, 0x0000000000000000ULL, { 0x54D5D3B1358B288AULL, 0x29B89CFB90DF2D4AULL } }, /* XSUM_XXH128_testdata[12327] */\n    { 4109, 0x000000009E3779B1ULL, { 0x76E04B049C5A28D9ULL, 0xE3B2C8783BE35A25ULL } }, /* XSUM_XXH128_testdata[12328] */\n    { 4109, 0x9E3779B185EBCA8DULL, { 0x7EE3373734321C73ULL, 0x91F640E8E189ED8BULL } }, /* XSUM_XXH128_testdata[12329] */\n    { 4110, 0x0000000000000000ULL, { 0xC005E3BEDA002458ULL, 0xA737FC5ABF88B66DULL } }, /* XSUM_XXH128_testdata[12330] */\n    { 4110, 0x000000009E3779B1ULL, { 0xFDFC6EC0AC9ABF35ULL, 0x8A8C2618937A3E3AULL } }, /* XSUM_XXH128_testdata[12331] */\n    { 4110, 0x9E3779B185EBCA8DULL, { 0xABFAC6375AEC37C7ULL, 0x8C731A8361E546E3ULL } }, /* XSUM_XXH128_testdata[12332] */\n    { 4111, 0x0000000000000000ULL, { 0xA7F37BEB267E36E5ULL, 0xEA7A25CFA231348CULL } }, /* XSUM_XXH128_testdata[12333] */\n    { 4111, 0x000000009E3779B1ULL, { 0xA00520ECEF7B9E9FULL, 0x6C6EC0F99F812646ULL } }, /* XSUM_XXH128_testdata[12334] */\n    { 4111, 0x9E3779B185EBCA8DULL, { 0x7E001F4B3ECFB1C9ULL, 0x26F20EB6414B3376ULL } }, /* XSUM_XXH128_testdata[12335] */\n    { 4112, 0x0000000000000000ULL, { 0xE6C6754333B04AA6ULL, 0x6F85BAAD7B7C1DEAULL } }, /* XSUM_XXH128_testdata[12336] */\n    { 4112, 0x000000009E3779B1ULL, { 0xDEE37FB922F4534DULL, 0x98FD3334E32475D9ULL } }, /* XSUM_XXH128_testdata[12337] */\n    { 4112, 0x9E3779B185EBCA8DULL, { 0x7568121A6F2E2F51ULL, 0x48003CD94DB7302BULL } }, /* XSUM_XXH128_testdata[12338] */\n    { 4113, 0x0000000000000000ULL, { 0x01F24DFB53ED6D89ULL, 0x83C02DCC7A806596ULL } }, /* XSUM_XXH128_testdata[12339] */\n    { 4113, 0x000000009E3779B1ULL, { 0xBDE090AD461626D1ULL, 0x50530472D692FE67ULL } }, /* XSUM_XXH128_testdata[12340] */\n    { 4113, 0x9E3779B185EBCA8DULL, { 0x3912A517D7CB58BEULL, 0xE3BB5D1F48B74DC6ULL } }, /* XSUM_XXH128_testdata[12341] */\n    { 4114, 0x0000000000000000ULL, { 0xDF151F68306972B7ULL, 0x349C1F2C759A8423ULL } }, /* XSUM_XXH128_testdata[12342] */\n    { 4114, 0x000000009E3779B1ULL, { 0x2A869B08632FDA55ULL, 0xB80CD812A803D9F7ULL } }, /* XSUM_XXH128_testdata[12343] */\n    { 4114, 0x9E3779B185EBCA8DULL, { 0x52FA1526770C4EC7ULL, 0xABE822B6EA0ECC7BULL } }, /* XSUM_XXH128_testdata[12344] */\n    { 4115, 0x0000000000000000ULL, { 0xE98596DA3274CFBAULL, 0x11D6FFDC2102D4B5ULL } }, /* XSUM_XXH128_testdata[12345] */\n    { 4115, 0x000000009E3779B1ULL, { 0x4FF83295066895F3ULL, 0x1DC10BF6E5D2CD7FULL } }, /* XSUM_XXH128_testdata[12346] */\n    { 4115, 0x9E3779B185EBCA8DULL, { 0x1C3B5137394A9482ULL, 0xD9E50B43862A32B7ULL } }, /* XSUM_XXH128_testdata[12347] */\n    { 4116, 0x0000000000000000ULL, { 0x44E1F7DD02552FB6ULL, 0x1CC2FDECA4C9BF25ULL } }, /* XSUM_XXH128_testdata[12348] */\n    { 4116, 0x000000009E3779B1ULL, { 0xEB91D9B1BD3BF8C1ULL, 0xE5D65C7F707466C5ULL } }, /* XSUM_XXH128_testdata[12349] */\n    { 4116, 0x9E3779B185EBCA8DULL, { 0x08F4B72C651043BAULL, 0x2BF3CD8ABA29725CULL } }, /* XSUM_XXH128_testdata[12350] */\n    { 4117, 0x0000000000000000ULL, { 0x28DF58954DE4025FULL, 0x3BEE797E0B58C64BULL } }, /* XSUM_XXH128_testdata[12351] */\n    { 4117, 0x000000009E3779B1ULL, { 0x637752455CD19392ULL, 0x93BD2FFF478321E7ULL } }, /* XSUM_XXH128_testdata[12352] */\n    { 4117, 0x9E3779B185EBCA8DULL, { 0xAB508A47A93BB882ULL, 0xFE385EDE2FAC96D7ULL } }, /* XSUM_XXH128_testdata[12353] */\n    { 4118, 0x0000000000000000ULL, { 0x2D6AD31EABD0EF8BULL, 0xBF9111E603306B13ULL } }, /* XSUM_XXH128_testdata[12354] */\n    { 4118, 0x000000009E3779B1ULL, { 0xF0E8C7602926219CULL, 0xFBCFA780EDE98579ULL } }, /* XSUM_XXH128_testdata[12355] */\n    { 4118, 0x9E3779B185EBCA8DULL, { 0x8352B0B7C75E5F9BULL, 0x1E66DF984346D8D8ULL } }, /* XSUM_XXH128_testdata[12356] */\n    { 4119, 0x0000000000000000ULL, { 0x29C77571022B3DFCULL, 0xD70406DD9898D4D8ULL } }, /* XSUM_XXH128_testdata[12357] */\n    { 4119, 0x000000009E3779B1ULL, { 0x29E11A98C99640D3ULL, 0xC744DE955953D68DULL } }, /* XSUM_XXH128_testdata[12358] */\n    { 4119, 0x9E3779B185EBCA8DULL, { 0xAA05BDB0FF756E28ULL, 0xC029FB2D6D7DAA6CULL } }, /* XSUM_XXH128_testdata[12359] */\n    { 4120, 0x0000000000000000ULL, { 0xF78F1E6B64FC4FAFULL, 0xEA9ABBF3870AAEFBULL } }, /* XSUM_XXH128_testdata[12360] */\n    { 4120, 0x000000009E3779B1ULL, { 0x01C478EA1BD7FF96ULL, 0xCF25F6E06B668082ULL } }, /* XSUM_XXH128_testdata[12361] */\n    { 4120, 0x9E3779B185EBCA8DULL, { 0x2AF071ED04DE3706ULL, 0x907B7FB60893E441ULL } }, /* XSUM_XXH128_testdata[12362] */\n    { 4121, 0x0000000000000000ULL, { 0x9F07644999D631FEULL, 0x168010E2AC154E1BULL } }, /* XSUM_XXH128_testdata[12363] */\n    { 4121, 0x000000009E3779B1ULL, { 0x5727964A8A274DF8ULL, 0x547F87F5B79D73CEULL } }, /* XSUM_XXH128_testdata[12364] */\n    { 4121, 0x9E3779B185EBCA8DULL, { 0x58D5AED23AC86D18ULL, 0xC9F003A6A18F45FCULL } }, /* XSUM_XXH128_testdata[12365] */\n    { 4122, 0x0000000000000000ULL, { 0xAB4CD24CD29D8970ULL, 0x4EF4EC9B5011763DULL } }, /* XSUM_XXH128_testdata[12366] */\n    { 4122, 0x000000009E3779B1ULL, { 0xCF5AC9A1D228BE11ULL, 0x0FC67DE1A307E1DBULL } }, /* XSUM_XXH128_testdata[12367] */\n    { 4122, 0x9E3779B185EBCA8DULL, { 0x7BAD5355D287C703ULL, 0x2B5A193889D64849ULL } }, /* XSUM_XXH128_testdata[12368] */\n    { 4123, 0x0000000000000000ULL, { 0x2F9C1C05A78B37D8ULL, 0xE52EBFD6B77D7146ULL } }, /* XSUM_XXH128_testdata[12369] */\n    { 4123, 0x000000009E3779B1ULL, { 0x40D0ABF27943F5CAULL, 0x57597B82A83DA996ULL } }, /* XSUM_XXH128_testdata[12370] */\n    { 4123, 0x9E3779B185EBCA8DULL, { 0x4A8959FCB1E4E4AFULL, 0xDBB927E1247CD643ULL } }, /* XSUM_XXH128_testdata[12371] */\n    { 4124, 0x0000000000000000ULL, { 0x35AD8F65591B2C05ULL, 0x70930D2F5F4CF848ULL } }, /* XSUM_XXH128_testdata[12372] */\n    { 4124, 0x000000009E3779B1ULL, { 0xB573AE0F672E99A4ULL, 0x15015615FBE36D5CULL } }, /* XSUM_XXH128_testdata[12373] */\n    { 4124, 0x9E3779B185EBCA8DULL, { 0x603CCE1C74CED430ULL, 0xCEC0C425CCE440CCULL } }, /* XSUM_XXH128_testdata[12374] */\n    { 4125, 0x0000000000000000ULL, { 0xBEBE4BF06A34E0ADULL, 0xA93452BD9537A5A5ULL } }, /* XSUM_XXH128_testdata[12375] */\n    { 4125, 0x000000009E3779B1ULL, { 0x84037F101EFE1D6DULL, 0x259D24F53FE3E5F8ULL } }, /* XSUM_XXH128_testdata[12376] */\n    { 4125, 0x9E3779B185EBCA8DULL, { 0xB9DE0F8488404CE1ULL, 0xFD066D8BC803D169ULL } }, /* XSUM_XXH128_testdata[12377] */\n    { 4126, 0x0000000000000000ULL, { 0xD5B0CFEE781B17F4ULL, 0x4C782670680C49C4ULL } }, /* XSUM_XXH128_testdata[12378] */\n    { 4126, 0x000000009E3779B1ULL, { 0x5AA28925FFDC262CULL, 0x36C0F302AEFF0E76ULL } }, /* XSUM_XXH128_testdata[12379] */\n    { 4126, 0x9E3779B185EBCA8DULL, { 0xEC08F7276FD854C4ULL, 0x924E9070C4311C00ULL } }, /* XSUM_XXH128_testdata[12380] */\n    { 4127, 0x0000000000000000ULL, { 0x60E4E4B2B75A028FULL, 0xB8079F97D6D2D8FEULL } }, /* XSUM_XXH128_testdata[12381] */\n    { 4127, 0x000000009E3779B1ULL, { 0x8B8F7F486FBEB4B4ULL, 0x2A24DC9DB9E871CBULL } }, /* XSUM_XXH128_testdata[12382] */\n    { 4127, 0x9E3779B185EBCA8DULL, { 0x3640249C9E7F6A99ULL, 0xCE79246FCA32DB94ULL } }, /* XSUM_XXH128_testdata[12383] */\n    { 4128, 0x0000000000000000ULL, { 0x58F87C03A5109698ULL, 0xD57458AEFEAF5328ULL } }, /* XSUM_XXH128_testdata[12384] */\n    { 4128, 0x000000009E3779B1ULL, { 0x974EF550C85A1DFDULL, 0xA1DF2D4E89323232ULL } }, /* XSUM_XXH128_testdata[12385] */\n    { 4128, 0x9E3779B185EBCA8DULL, { 0x099F06BA6D0AEA6EULL, 0x04E6CD14F8B2962EULL } }, /* XSUM_XXH128_testdata[12386] */\n    { 4129, 0x0000000000000000ULL, { 0xFD79517DA353C9C7ULL, 0x2050980D9C749C3EULL } }, /* XSUM_XXH128_testdata[12387] */\n    { 4129, 0x000000009E3779B1ULL, { 0xFA4A9B749B4E45EFULL, 0x07A0B8FE3974F458ULL } }, /* XSUM_XXH128_testdata[12388] */\n    { 4129, 0x9E3779B185EBCA8DULL, { 0x1CFB7C71EE7A3874ULL, 0x769B784DDBF0E300ULL } }, /* XSUM_XXH128_testdata[12389] */\n    { 4130, 0x0000000000000000ULL, { 0xD0F8D653F6C74FF0ULL, 0xD8FF1B6081DA716DULL } }, /* XSUM_XXH128_testdata[12390] */\n    { 4130, 0x000000009E3779B1ULL, { 0x2ED4BB092708F224ULL, 0xC1438D1AFDE83F9CULL } }, /* XSUM_XXH128_testdata[12391] */\n    { 4130, 0x9E3779B185EBCA8DULL, { 0x8031A56A7D2F92AEULL, 0xC2CA4CE6F6D68250ULL } }, /* XSUM_XXH128_testdata[12392] */\n    { 4131, 0x0000000000000000ULL, { 0x951F461DB8CD496CULL, 0x2572D8FA01204ED2ULL } }, /* XSUM_XXH128_testdata[12393] */\n    { 4131, 0x000000009E3779B1ULL, { 0xBF9F49BF2A28B42AULL, 0x08E305315EC6046DULL } }, /* XSUM_XXH128_testdata[12394] */\n    { 4131, 0x9E3779B185EBCA8DULL, { 0x7A407673EB490FF5ULL, 0xBF9AA8B6C82F90A9ULL } }, /* XSUM_XXH128_testdata[12395] */\n    { 4132, 0x0000000000000000ULL, { 0x7645BA69A2B2FF52ULL, 0x20C0FD5651A328FBULL } }, /* XSUM_XXH128_testdata[12396] */\n    { 4132, 0x000000009E3779B1ULL, { 0x11999B04A59A2B56ULL, 0x38838376AD5250B0ULL } }, /* XSUM_XXH128_testdata[12397] */\n    { 4132, 0x9E3779B185EBCA8DULL, { 0x77B67ABE4C6842A2ULL, 0x08077E64242CF102ULL } }, /* XSUM_XXH128_testdata[12398] */\n    { 4133, 0x0000000000000000ULL, { 0xB1793BB4317787F8ULL, 0xD83FA6A792ACB0C0ULL } }, /* XSUM_XXH128_testdata[12399] */\n    { 4133, 0x000000009E3779B1ULL, { 0xEDCB2167489178F9ULL, 0x3F71E0051E0597C4ULL } }, /* XSUM_XXH128_testdata[12400] */\n    { 4133, 0x9E3779B185EBCA8DULL, { 0x13CDADE8147771D8ULL, 0xB5CB8DE1D75A0D4CULL } }, /* XSUM_XXH128_testdata[12401] */\n    { 4134, 0x0000000000000000ULL, { 0x06DEEEE425EAEC97ULL, 0x3A2BF0F1877F2152ULL } }, /* XSUM_XXH128_testdata[12402] */\n    { 4134, 0x000000009E3779B1ULL, { 0x80265C1FA55767FBULL, 0xB75322B45E4880E7ULL } }, /* XSUM_XXH128_testdata[12403] */\n    { 4134, 0x9E3779B185EBCA8DULL, { 0x47410600B8A6DC30ULL, 0xD40E51F78F1E1AA3ULL } }, /* XSUM_XXH128_testdata[12404] */\n    { 4135, 0x0000000000000000ULL, { 0x07794C32F9ABB48FULL, 0x267D2D5331EA8729ULL } }, /* XSUM_XXH128_testdata[12405] */\n    { 4135, 0x000000009E3779B1ULL, { 0xC532E2451C518080ULL, 0x99DCF14AF20D5C1DULL } }, /* XSUM_XXH128_testdata[12406] */\n    { 4135, 0x9E3779B185EBCA8DULL, { 0x965359AACAED70CDULL, 0x22F4198D8EB57420ULL } }, /* XSUM_XXH128_testdata[12407] */\n    { 4136, 0x0000000000000000ULL, { 0xCFD131A86A9BAD5DULL, 0x5A941B30D04C85A6ULL } }, /* XSUM_XXH128_testdata[12408] */\n    { 4136, 0x000000009E3779B1ULL, { 0x74883E72B0EB9DC1ULL, 0x8A0F5CF16C896BFFULL } }, /* XSUM_XXH128_testdata[12409] */\n    { 4136, 0x9E3779B185EBCA8DULL, { 0x9D698ADA391EBBD6ULL, 0xD0BDF3D93FE549F2ULL } }, /* XSUM_XXH128_testdata[12410] */\n    { 4137, 0x0000000000000000ULL, { 0x609D2C8FFEDC356AULL, 0x77943EF9AC2E9BC1ULL } }, /* XSUM_XXH128_testdata[12411] */\n    { 4137, 0x000000009E3779B1ULL, { 0xA5D04935A056D153ULL, 0xE1FB04240E5BE361ULL } }, /* XSUM_XXH128_testdata[12412] */\n    { 4137, 0x9E3779B185EBCA8DULL, { 0xFC186A81B9635DA7ULL, 0xD904EE6A6B46082FULL } }, /* XSUM_XXH128_testdata[12413] */\n    { 4138, 0x0000000000000000ULL, { 0x593FBE1328A081C8ULL, 0xDAC27B8FA57CA2ADULL } }, /* XSUM_XXH128_testdata[12414] */\n    { 4138, 0x000000009E3779B1ULL, { 0x4CB6D510A9EBD051ULL, 0x42058DA9A6DC4C80ULL } }, /* XSUM_XXH128_testdata[12415] */\n    { 4138, 0x9E3779B185EBCA8DULL, { 0x886E386B2E8BAF4FULL, 0xB9508B8DACF4736DULL } }, /* XSUM_XXH128_testdata[12416] */\n    { 4139, 0x0000000000000000ULL, { 0x35C0267703DEB52AULL, 0x4415F16F9DF0026FULL } }, /* XSUM_XXH128_testdata[12417] */\n    { 4139, 0x000000009E3779B1ULL, { 0xF712DD1C45E3529FULL, 0x55CC0D833A9AFF33ULL } }, /* XSUM_XXH128_testdata[12418] */\n    { 4139, 0x9E3779B185EBCA8DULL, { 0x1335705DF9DFF4AFULL, 0xC9679EFF5CFD0BF2ULL } }, /* XSUM_XXH128_testdata[12419] */\n    { 4140, 0x0000000000000000ULL, { 0x5B9C2CCB1A190108ULL, 0x90C26A4EAF2F2D80ULL } }, /* XSUM_XXH128_testdata[12420] */\n    { 4140, 0x000000009E3779B1ULL, { 0x1BFA9BEEF8E34BBCULL, 0xECDB1FCED62CD3D7ULL } }, /* XSUM_XXH128_testdata[12421] */\n    { 4140, 0x9E3779B185EBCA8DULL, { 0xB4460979100B3C8FULL, 0x20802617211552F1ULL } }, /* XSUM_XXH128_testdata[12422] */\n    { 4141, 0x0000000000000000ULL, { 0x3CE6D83750A87654ULL, 0xB1437843DD53BE8CULL } }, /* XSUM_XXH128_testdata[12423] */\n    { 4141, 0x000000009E3779B1ULL, { 0xFEB6DA52EBFCC242ULL, 0x85A2C29F0082A10BULL } }, /* XSUM_XXH128_testdata[12424] */\n    { 4141, 0x9E3779B185EBCA8DULL, { 0xDA80A64ABB430483ULL, 0x882AB905ADFEEF59ULL } }, /* XSUM_XXH128_testdata[12425] */\n    { 4142, 0x0000000000000000ULL, { 0x1162D413E7ED9194ULL, 0xE273B7EC360F646CULL } }, /* XSUM_XXH128_testdata[12426] */\n    { 4142, 0x000000009E3779B1ULL, { 0x9DAC080861EB29A3ULL, 0x4DB15924A0B312CEULL } }, /* XSUM_XXH128_testdata[12427] */\n    { 4142, 0x9E3779B185EBCA8DULL, { 0xC7C177607C970768ULL, 0x78A5C95A94337474ULL } }, /* XSUM_XXH128_testdata[12428] */\n    { 4143, 0x0000000000000000ULL, { 0x8CE229BE4C9AAD31ULL, 0x928327BFED8B9FD4ULL } }, /* XSUM_XXH128_testdata[12429] */\n    { 4143, 0x000000009E3779B1ULL, { 0x1E4682C77A2AACB2ULL, 0x41378D2EF83F506FULL } }, /* XSUM_XXH128_testdata[12430] */\n    { 4143, 0x9E3779B185EBCA8DULL, { 0xF68CF2EDEE66AA53ULL, 0x8718E6A03E96DB94ULL } }, /* XSUM_XXH128_testdata[12431] */\n    { 4144, 0x0000000000000000ULL, { 0xA360545F02F6A5ECULL, 0x9A37014B883E8280ULL } }, /* XSUM_XXH128_testdata[12432] */\n    { 4144, 0x000000009E3779B1ULL, { 0xBA42A26F1D2399FCULL, 0x59531702B7B98AF5ULL } }, /* XSUM_XXH128_testdata[12433] */\n    { 4144, 0x9E3779B185EBCA8DULL, { 0xBEB893BE02633B6EULL, 0x1500C4879CB50D1AULL } }, /* XSUM_XXH128_testdata[12434] */\n    { 4145, 0x0000000000000000ULL, { 0xABD8127787B83F8EULL, 0x711EFC394B1A8F2AULL } }, /* XSUM_XXH128_testdata[12435] */\n    { 4145, 0x000000009E3779B1ULL, { 0xA488B07BE86AB94AULL, 0x2F8FF5468ECAD6EAULL } }, /* XSUM_XXH128_testdata[12436] */\n    { 4145, 0x9E3779B185EBCA8DULL, { 0xD452D7D8018971B4ULL, 0x9B6D4BBD9668EC0FULL } }, /* XSUM_XXH128_testdata[12437] */\n    { 4146, 0x0000000000000000ULL, { 0x5C926EB5DB8927D2ULL, 0x347F6C333047DC03ULL } }, /* XSUM_XXH128_testdata[12438] */\n    { 4146, 0x000000009E3779B1ULL, { 0x4FBD3EADF704B204ULL, 0x7F39F5F0EFD6CF06ULL } }, /* XSUM_XXH128_testdata[12439] */\n    { 4146, 0x9E3779B185EBCA8DULL, { 0x7B4A283B13347765ULL, 0xDD356C02A330D107ULL } }, /* XSUM_XXH128_testdata[12440] */\n    { 4147, 0x0000000000000000ULL, { 0x53622CE56808C5A5ULL, 0x5E4567F6CBA1F86FULL } }, /* XSUM_XXH128_testdata[12441] */\n    { 4147, 0x000000009E3779B1ULL, { 0xA386AE5BF015A8FAULL, 0x7E1A7389E68A91FAULL } }, /* XSUM_XXH128_testdata[12442] */\n    { 4147, 0x9E3779B185EBCA8DULL, { 0x540B305923998D7CULL, 0xDA54F31E18337A0EULL } }, /* XSUM_XXH128_testdata[12443] */\n    { 4148, 0x0000000000000000ULL, { 0x4C76DFDDEE340812ULL, 0x1EF27C1D0C5F3ADDULL } }, /* XSUM_XXH128_testdata[12444] */\n    { 4148, 0x000000009E3779B1ULL, { 0x5D964B579158622AULL, 0x5B8A72132580F0A7ULL } }, /* XSUM_XXH128_testdata[12445] */\n    { 4148, 0x9E3779B185EBCA8DULL, { 0x9015A06A74AAF7ADULL, 0xE87ACD0201AA9FAAULL } }, /* XSUM_XXH128_testdata[12446] */\n    { 4149, 0x0000000000000000ULL, { 0xC8BC0D4587507A82ULL, 0xF6836F6AD221F5B6ULL } }, /* XSUM_XXH128_testdata[12447] */\n    { 4149, 0x000000009E3779B1ULL, { 0xD4444F34E9075DEEULL, 0xEDD8FC01F4AB10E1ULL } }, /* XSUM_XXH128_testdata[12448] */\n    { 4149, 0x9E3779B185EBCA8DULL, { 0x49078EE634DAC055ULL, 0xC2B828A03F2BF9F6ULL } }, /* XSUM_XXH128_testdata[12449] */\n    { 4150, 0x0000000000000000ULL, { 0xF361427C856A2130ULL, 0x90C883660E021750ULL } }, /* XSUM_XXH128_testdata[12450] */\n    { 4150, 0x000000009E3779B1ULL, { 0x1513E1FD516D1856ULL, 0x31B55225D5A9D4FCULL } }, /* XSUM_XXH128_testdata[12451] */\n    { 4150, 0x9E3779B185EBCA8DULL, { 0x2C274D3B17BDAB2BULL, 0xDDAD40CC38D505F9ULL } }, /* XSUM_XXH128_testdata[12452] */\n    { 4151, 0x0000000000000000ULL, { 0x73C28767099B7F10ULL, 0x9718C499A390F9E5ULL } }, /* XSUM_XXH128_testdata[12453] */\n    { 4151, 0x000000009E3779B1ULL, { 0xA6FC83B0756159C9ULL, 0xCAF7D4636DA0E3A9ULL } }, /* XSUM_XXH128_testdata[12454] */\n    { 4151, 0x9E3779B185EBCA8DULL, { 0x50D6EF8D5079F59EULL, 0xAAE4A2353B166BC7ULL } }, /* XSUM_XXH128_testdata[12455] */\n    { 4152, 0x0000000000000000ULL, { 0xCD366C29C2EFCBEEULL, 0x59A68CC7A0373E09ULL } }, /* XSUM_XXH128_testdata[12456] */\n    { 4152, 0x000000009E3779B1ULL, { 0x9FC44D66AAC4FA55ULL, 0x7D232AF2C0DE1F50ULL } }, /* XSUM_XXH128_testdata[12457] */\n    { 4152, 0x9E3779B185EBCA8DULL, { 0x788CA0DA89BA7994ULL, 0xD1B92AB066C4A922ULL } }, /* XSUM_XXH128_testdata[12458] */\n    { 4153, 0x0000000000000000ULL, { 0xDECDEB44E10C8AEDULL, 0xFAD3BCD9C17B88C4ULL } }, /* XSUM_XXH128_testdata[12459] */\n    { 4153, 0x000000009E3779B1ULL, { 0xA59E521110E02A00ULL, 0x8EF3716EBEC457C8ULL } }, /* XSUM_XXH128_testdata[12460] */\n    { 4153, 0x9E3779B185EBCA8DULL, { 0xF9EC4FC72ED3022BULL, 0x0C26F64DFCF006B8ULL } }, /* XSUM_XXH128_testdata[12461] */\n    { 4154, 0x0000000000000000ULL, { 0x3D275C1B1AE8039BULL, 0xC562C22B11969932ULL } }, /* XSUM_XXH128_testdata[12462] */\n    { 4154, 0x000000009E3779B1ULL, { 0x8F31A710140CFB77ULL, 0x385F23BFCB77E320ULL } }, /* XSUM_XXH128_testdata[12463] */\n    { 4154, 0x9E3779B185EBCA8DULL, { 0xA5102A522AA1A09FULL, 0x53211B5A58A112A5ULL } }, /* XSUM_XXH128_testdata[12464] */\n    { 4155, 0x0000000000000000ULL, { 0xA4FDF77C6F559146ULL, 0x1CAC67B546DE515CULL } }, /* XSUM_XXH128_testdata[12465] */\n    { 4155, 0x000000009E3779B1ULL, { 0x6665592D1B66D151ULL, 0xCF0234C0E4CC39ABULL } }, /* XSUM_XXH128_testdata[12466] */\n    { 4155, 0x9E3779B185EBCA8DULL, { 0x35C840E2E19D43F2ULL, 0x1BE5F303C3BC7A59ULL } }, /* XSUM_XXH128_testdata[12467] */\n    { 4156, 0x0000000000000000ULL, { 0xF813FD5B27829876ULL, 0x4BB69A6334CDF859ULL } }, /* XSUM_XXH128_testdata[12468] */\n    { 4156, 0x000000009E3779B1ULL, { 0x15C84E63D508D93BULL, 0x38AC0335709E3460ULL } }, /* XSUM_XXH128_testdata[12469] */\n    { 4156, 0x9E3779B185EBCA8DULL, { 0xF7111F8114507DD9ULL, 0xE3C68007CF3A4D32ULL } }, /* XSUM_XXH128_testdata[12470] */\n    { 4157, 0x0000000000000000ULL, { 0xF42176B56C73715FULL, 0xDA5CEF5035548605ULL } }, /* XSUM_XXH128_testdata[12471] */\n    { 4157, 0x000000009E3779B1ULL, { 0x17EDB71E44A36B60ULL, 0xADB32597DD1AC25DULL } }, /* XSUM_XXH128_testdata[12472] */\n    { 4157, 0x9E3779B185EBCA8DULL, { 0x077018E0E617CDEBULL, 0x65814F500FC51474ULL } }, /* XSUM_XXH128_testdata[12473] */\n    { 4158, 0x0000000000000000ULL, { 0xEDBE4799591C4E15ULL, 0x39ED96905B72DA2EULL } }, /* XSUM_XXH128_testdata[12474] */\n    { 4158, 0x000000009E3779B1ULL, { 0x017BFA1CFA1BC49FULL, 0x26511ADA5A09B022ULL } }, /* XSUM_XXH128_testdata[12475] */\n    { 4158, 0x9E3779B185EBCA8DULL, { 0xB2707B4590CF62F7ULL, 0x8B2F0D434743A246ULL } }, /* XSUM_XXH128_testdata[12476] */\n    { 4159, 0x0000000000000000ULL, { 0x4414D090B4A6043FULL, 0x6541793B06DFEC57ULL } }, /* XSUM_XXH128_testdata[12477] */\n    { 4159, 0x000000009E3779B1ULL, { 0x1293CC5598CC1459ULL, 0xD9F7953934F23FF3ULL } }, /* XSUM_XXH128_testdata[12478] */\n    { 4159, 0x9E3779B185EBCA8DULL, { 0x19BC48EE50380E4DULL, 0xEEF9E54E3894796DULL } }, /* XSUM_XXH128_testdata[12479] */\n    { 4160, 0x0000000000000000ULL, { 0x4F323B15321E94E1ULL, 0x67140711C1E3E335ULL } }, /* XSUM_XXH128_testdata[12480] */\n    { 4160, 0x000000009E3779B1ULL, { 0x71C9218C2DC48FF4ULL, 0x82466B99FEB516A4ULL } }, /* XSUM_XXH128_testdata[12481] */\n    { 4160, 0x9E3779B185EBCA8DULL, { 0x1BF6F5FAF9EECABDULL, 0xEE430626BA3B2F3CULL } }, /* XSUM_XXH128_testdata[12482] */\n};\nstatic const XSUM_testdata128_t XSUM_XXH128_withSecret_testdata[] = {\n    {    0, 0x0000000000000000ULL, { 0x005923CCEECBE8AEULL, 0x5F70F4EA232F1D38ULL } }, /* XSUM_XXH128_withSecret_testdata[0] */\n    {    1, 0x0000000000000000ULL, { 0x8A52451418B2DA4DULL, 0x3A66AF5A9819198EULL } }, /* XSUM_XXH128_withSecret_testdata[1] */\n    {    2, 0x0000000000000000ULL, { 0x37F66AEA23328C98ULL, 0xC08CDA5D6AC10716ULL } }, /* XSUM_XXH128_withSecret_testdata[2] */\n    {    3, 0x0000000000000000ULL, { 0xE9AF94712FFBC846ULL, 0x51103173FA1F0727ULL } }, /* XSUM_XXH128_withSecret_testdata[3] */\n    {    4, 0x0000000000000000ULL, { 0x266A9B610A7A5641ULL, 0xCCC924914B0D8032ULL } }, /* XSUM_XXH128_withSecret_testdata[4] */\n    {    5, 0x0000000000000000ULL, { 0x89ABEB0FC033BCDDULL, 0xC07170D355040D90ULL } }, /* XSUM_XXH128_withSecret_testdata[5] */\n    {    6, 0x0000000000000000ULL, { 0x0B61C8ACA7D4778FULL, 0x376BD91B6432F36DULL } }, /* XSUM_XXH128_withSecret_testdata[6] */\n    {    7, 0x0000000000000000ULL, { 0x0F93C8858E92AEEDULL, 0x37BBC5F1880C27F5ULL } }, /* XSUM_XXH128_withSecret_testdata[7] */\n    {    8, 0x0000000000000000ULL, { 0xF668474D2FEE1F92ULL, 0x20ED43FF46F7A0A1ULL } }, /* XSUM_XXH128_withSecret_testdata[8] */\n    {    9, 0x0000000000000000ULL, { 0xC3BBF94649C59DFCULL, 0x6AF09813AF70CFD1ULL } }, /* XSUM_XXH128_withSecret_testdata[9] */\n    {   10, 0x0000000000000000ULL, { 0xCD818BFB9B889C9CULL, 0x922146F77F672CFDULL } }, /* XSUM_XXH128_withSecret_testdata[10] */\n    {   11, 0x0000000000000000ULL, { 0xD5DDEF8A3FF337A3ULL, 0x908549F4C0AACEA0ULL } }, /* XSUM_XXH128_withSecret_testdata[11] */\n    {   12, 0x0000000000000000ULL, { 0xAF82F6EBA263D7D8ULL, 0x90A3C2D839F57D0FULL } }, /* XSUM_XXH128_withSecret_testdata[12] */\n    {   13, 0x0000000000000000ULL, { 0xA534F08E64933220ULL, 0xFBD2B34EFBD0D3D5ULL } }, /* XSUM_XXH128_withSecret_testdata[13] */\n    {   14, 0x0000000000000000ULL, { 0xD33216B1CCC6EA36ULL, 0x03A185A4F2FFE703ULL } }, /* XSUM_XXH128_withSecret_testdata[14] */\n    {   15, 0x0000000000000000ULL, { 0x3DA015D718D1795BULL, 0x9F08AF8798BC4B65ULL } }, /* XSUM_XXH128_withSecret_testdata[15] */\n    {   16, 0x0000000000000000ULL, { 0xFE396195466852B9ULL, 0x4C317FD601BCDA88ULL } }, /* XSUM_XXH128_withSecret_testdata[16] */\n    {   17, 0x0000000000000000ULL, { 0xE94EB4616009B975ULL, 0x604CC5EE8F142950ULL } }, /* XSUM_XXH128_withSecret_testdata[17] */\n    {   18, 0x0000000000000000ULL, { 0xA9F9C25E1EFD4455ULL, 0xF7254A7CC4734D98ULL } }, /* XSUM_XXH128_withSecret_testdata[18] */\n    {   19, 0x0000000000000000ULL, { 0x0EA924F634D5719DULL, 0xF4DDA3401B71E49AULL } }, /* XSUM_XXH128_withSecret_testdata[19] */\n    {   20, 0x0000000000000000ULL, { 0xC24600D29F90EB72ULL, 0xE8150662049BDD49ULL } }, /* XSUM_XXH128_withSecret_testdata[20] */\n    {   21, 0x0000000000000000ULL, { 0xF6DA2F888E077822ULL, 0x9A0538BD266A8FF0ULL } }, /* XSUM_XXH128_withSecret_testdata[21] */\n    {   22, 0x0000000000000000ULL, { 0x868F7FDC6B64A5E1ULL, 0x4719A571742551BEULL } }, /* XSUM_XXH128_withSecret_testdata[22] */\n    {   23, 0x0000000000000000ULL, { 0xC022FADA03B0C806ULL, 0xE4FDDCF94F7E8890ULL } }, /* XSUM_XXH128_withSecret_testdata[23] */\n    {   24, 0x0000000000000000ULL, { 0xD9ED8351E0BB5526ULL, 0x3476C01AB8B8E821ULL } }, /* XSUM_XXH128_withSecret_testdata[24] */\n    {   25, 0x0000000000000000ULL, { 0x06552D62CFD95F3FULL, 0xFA745BDD1A2F6D9CULL } }, /* XSUM_XXH128_withSecret_testdata[25] */\n    {   26, 0x0000000000000000ULL, { 0x263FB24D3DBFDDD8ULL, 0xD03DFEBC3EE25BD9ULL } }, /* XSUM_XXH128_withSecret_testdata[26] */\n    {   27, 0x0000000000000000ULL, { 0x7C631513922C42FEULL, 0x7276F216804D2407ULL } }, /* XSUM_XXH128_withSecret_testdata[27] */\n    {   28, 0x0000000000000000ULL, { 0x180993978812CBB8ULL, 0x09997A9571F03BFCULL } }, /* XSUM_XXH128_withSecret_testdata[28] */\n    {   29, 0x0000000000000000ULL, { 0xA1CFB5DE48C3358BULL, 0xE9F78EBAB8892F78ULL } }, /* XSUM_XXH128_withSecret_testdata[29] */\n    {   30, 0x0000000000000000ULL, { 0x67B5699BBC065685ULL, 0x9E50D6ADA4F8FB69ULL } }, /* XSUM_XXH128_withSecret_testdata[30] */\n    {   31, 0x0000000000000000ULL, { 0x0826F7A00A7D7826ULL, 0xB40BDDCA373A4F2BULL } }, /* XSUM_XXH128_withSecret_testdata[31] */\n    {   32, 0x0000000000000000ULL, { 0x28FEAFA7CAF376DCULL, 0x125FB63CC4369AECULL } }, /* XSUM_XXH128_withSecret_testdata[32] */\n    {   33, 0x0000000000000000ULL, { 0xF7402A52B40DB03DULL, 0xB2407E682B957AF2ULL } }, /* XSUM_XXH128_withSecret_testdata[33] */\n    {   34, 0x0000000000000000ULL, { 0xCA0B380DCA415E54ULL, 0x814D60B94F75D99FULL } }, /* XSUM_XXH128_withSecret_testdata[34] */\n    {   35, 0x0000000000000000ULL, { 0x04A3A1198E95A8E7ULL, 0xF975305FC60335C9ULL } }, /* XSUM_XXH128_withSecret_testdata[35] */\n    {   36, 0x0000000000000000ULL, { 0x4240C7A78F554C61ULL, 0xC656675239072BB9ULL } }, /* XSUM_XXH128_withSecret_testdata[36] */\n    {   37, 0x0000000000000000ULL, { 0x62A1823E9B10EDC1ULL, 0xDB1C8510F04171E1ULL } }, /* XSUM_XXH128_withSecret_testdata[37] */\n    {   38, 0x0000000000000000ULL, { 0xE333413A9FCAD345ULL, 0xB642EEE9C13876D4ULL } }, /* XSUM_XXH128_withSecret_testdata[38] */\n    {   39, 0x0000000000000000ULL, { 0x8288525A3A70C1C4ULL, 0xA91F3EBCA128158FULL } }, /* XSUM_XXH128_withSecret_testdata[39] */\n    {   40, 0x0000000000000000ULL, { 0x604408A611E47F28ULL, 0x385A961FDA81DCF9ULL } }, /* XSUM_XXH128_withSecret_testdata[40] */\n    {   41, 0x0000000000000000ULL, { 0x04F891EBD95C9908ULL, 0x467401BE2C8A3240ULL } }, /* XSUM_XXH128_withSecret_testdata[41] */\n    {   42, 0x0000000000000000ULL, { 0x6A237EF0C30661B9ULL, 0xF733D3ED2B3388B5ULL } }, /* XSUM_XXH128_withSecret_testdata[42] */\n    {   43, 0x0000000000000000ULL, { 0x55B7FCD60A95CD5CULL, 0x021FE773A32511E6ULL } }, /* XSUM_XXH128_withSecret_testdata[43] */\n    {   44, 0x0000000000000000ULL, { 0x05E95609D6695482ULL, 0xBCE8FC2576CB2AE4ULL } }, /* XSUM_XXH128_withSecret_testdata[44] */\n    {   45, 0x0000000000000000ULL, { 0x7D471775B2B298D7ULL, 0x24EED63FD8DF0E0DULL } }, /* XSUM_XXH128_withSecret_testdata[45] */\n    {   46, 0x0000000000000000ULL, { 0xED9D3B0818352685ULL, 0x5ACD7633EB5491B4ULL } }, /* XSUM_XXH128_withSecret_testdata[46] */\n    {   47, 0x0000000000000000ULL, { 0xBD362F91C9DFA9C7ULL, 0xE1D33A035CADD7FAULL } }, /* XSUM_XXH128_withSecret_testdata[47] */\n    {   48, 0x0000000000000000ULL, { 0xD3488D14A0FC9147ULL, 0x2C599633A4D78138ULL } }, /* XSUM_XXH128_withSecret_testdata[48] */\n    {   49, 0x0000000000000000ULL, { 0xAC2779FC52FE2A62ULL, 0x02E2F6D713F11585ULL } }, /* XSUM_XXH128_withSecret_testdata[49] */\n    {   50, 0x0000000000000000ULL, { 0xFA42D7D6DF651F9CULL, 0x02E0C3E60325765BULL } }, /* XSUM_XXH128_withSecret_testdata[50] */\n    {   51, 0x0000000000000000ULL, { 0x9E47E769CF244AE9ULL, 0x550496A7C9AFC757ULL } }, /* XSUM_XXH128_withSecret_testdata[51] */\n    {   52, 0x0000000000000000ULL, { 0x25E2303DF976DCB8ULL, 0x684DDA2DB6044167ULL } }, /* XSUM_XXH128_withSecret_testdata[52] */\n    {   53, 0x0000000000000000ULL, { 0x3A4EA63096FD3BD5ULL, 0x24979FD18F8408B1ULL } }, /* XSUM_XXH128_withSecret_testdata[53] */\n    {   54, 0x0000000000000000ULL, { 0x4FB4F385AE98821EULL, 0x34DE69F041D57134ULL } }, /* XSUM_XXH128_withSecret_testdata[54] */\n    {   55, 0x0000000000000000ULL, { 0xCD02BCD5210A1D03ULL, 0x9305842C5FBFB062ULL } }, /* XSUM_XXH128_withSecret_testdata[55] */\n    {   56, 0x0000000000000000ULL, { 0xF965EDE191513EA8ULL, 0xBD1030FC3B5BB71CULL } }, /* XSUM_XXH128_withSecret_testdata[56] */\n    {   57, 0x0000000000000000ULL, { 0x6E86FB8C8FD80F62ULL, 0xA3320DBDC0329751ULL } }, /* XSUM_XXH128_withSecret_testdata[57] */\n    {   58, 0x0000000000000000ULL, { 0xEDD4CF814C86693BULL, 0x63319ACFC8DBC3F9ULL } }, /* XSUM_XXH128_withSecret_testdata[58] */\n    {   59, 0x0000000000000000ULL, { 0x9B883A1D90D5AEDDULL, 0xE5FF022237E6EAC7ULL } }, /* XSUM_XXH128_withSecret_testdata[59] */\n    {   60, 0x0000000000000000ULL, { 0xAB60882A5393BEB4ULL, 0x64E50BB90EB19E6EULL } }, /* XSUM_XXH128_withSecret_testdata[60] */\n    {   61, 0x0000000000000000ULL, { 0x48A71551C10FE426ULL, 0xD927E2CBC325145CULL } }, /* XSUM_XXH128_withSecret_testdata[61] */\n    {   62, 0x0000000000000000ULL, { 0xCA08B695F08F171CULL, 0x8D2039B21310C929ULL } }, /* XSUM_XXH128_withSecret_testdata[62] */\n    {   63, 0x0000000000000000ULL, { 0x04E41BB83D10B818ULL, 0x8158A2943D5FDEDDULL } }, /* XSUM_XXH128_withSecret_testdata[63] */\n    {   64, 0x0000000000000000ULL, { 0x5638769ED33E3E38ULL, 0x40EBDA012DB18E86ULL } }, /* XSUM_XXH128_withSecret_testdata[64] */\n    {   65, 0x0000000000000000ULL, { 0xEBE6FF11BCEDA8E5ULL, 0x1F99B7E7674A4B4AULL } }, /* XSUM_XXH128_withSecret_testdata[65] */\n    {   66, 0x0000000000000000ULL, { 0x63FCDF2A6A73A73CULL, 0x739C2FB969E42143ULL } }, /* XSUM_XXH128_withSecret_testdata[66] */\n    {   67, 0x0000000000000000ULL, { 0xA4083546C2211DCDULL, 0x6C05DFBB7C451237ULL } }, /* XSUM_XXH128_withSecret_testdata[67] */\n    {   68, 0x0000000000000000ULL, { 0x2210E480F785B592ULL, 0xC6F674D3A0CB5F7FULL } }, /* XSUM_XXH128_withSecret_testdata[68] */\n    {   69, 0x0000000000000000ULL, { 0xDBCCB67DAFB98A8FULL, 0x96F8CDB04116DBF1ULL } }, /* XSUM_XXH128_withSecret_testdata[69] */\n    {   70, 0x0000000000000000ULL, { 0xE7F3648D5A346C44ULL, 0x9E79EFD228DA1EB7ULL } }, /* XSUM_XXH128_withSecret_testdata[70] */\n    {   71, 0x0000000000000000ULL, { 0x671D1976C4EC726BULL, 0x914808520C7232DEULL } }, /* XSUM_XXH128_withSecret_testdata[71] */\n    {   72, 0x0000000000000000ULL, { 0x6181BD9E19757843ULL, 0x71309C1A23E88DC0ULL } }, /* XSUM_XXH128_withSecret_testdata[72] */\n    {   73, 0x0000000000000000ULL, { 0xE5A67532DE2A789CULL, 0x27EF9666A461F781ULL } }, /* XSUM_XXH128_withSecret_testdata[73] */\n    {   74, 0x0000000000000000ULL, { 0x10A78206F2872A09ULL, 0xB80FF0C5C5CF01D6ULL } }, /* XSUM_XXH128_withSecret_testdata[74] */\n    {   75, 0x0000000000000000ULL, { 0xF54EE29150EDA715ULL, 0x7F33AF0DD8E18136ULL } }, /* XSUM_XXH128_withSecret_testdata[75] */\n    {   76, 0x0000000000000000ULL, { 0xD04BE658B9FF0ADCULL, 0x511BA43F47D8007FULL } }, /* XSUM_XXH128_withSecret_testdata[76] */\n    {   77, 0x0000000000000000ULL, { 0xF04C3A9EEFA9C625ULL, 0x147C0560AE8F81CFULL } }, /* XSUM_XXH128_withSecret_testdata[77] */\n    {   78, 0x0000000000000000ULL, { 0x5D7A58A57EAE992AULL, 0xDC7411E6DA72AE63ULL } }, /* XSUM_XXH128_withSecret_testdata[78] */\n    {   79, 0x0000000000000000ULL, { 0x61B7E6F3AEC97327ULL, 0x2A872E47D42DD3D1ULL } }, /* XSUM_XXH128_withSecret_testdata[79] */\n    {   80, 0x0000000000000000ULL, { 0x12568D8D732F8544ULL, 0x5DE1C8EB7BD056B8ULL } }, /* XSUM_XXH128_withSecret_testdata[80] */\n    {   81, 0x0000000000000000ULL, { 0x66C0D63926FF0562ULL, 0xCA4A09CE396FEACCULL } }, /* XSUM_XXH128_withSecret_testdata[81] */\n    {   82, 0x0000000000000000ULL, { 0x627F5C0C3D57830BULL, 0xC9620A8410AD57CBULL } }, /* XSUM_XXH128_withSecret_testdata[82] */\n    {   83, 0x0000000000000000ULL, { 0xFFE8AF061E65D671ULL, 0x1C815B5C20222A1DULL } }, /* XSUM_XXH128_withSecret_testdata[83] */\n    {   84, 0x0000000000000000ULL, { 0x7ED64FF58BEAA26EULL, 0x1D71C98458A42247ULL } }, /* XSUM_XXH128_withSecret_testdata[84] */\n    {   85, 0x0000000000000000ULL, { 0x04402715E249DC7EULL, 0x2F30F5B222C131E9ULL } }, /* XSUM_XXH128_withSecret_testdata[85] */\n    {   86, 0x0000000000000000ULL, { 0xF89589B48611BBC1ULL, 0xB609ADDA7D9A0103ULL } }, /* XSUM_XXH128_withSecret_testdata[86] */\n    {   87, 0x0000000000000000ULL, { 0x4536A064566F2248ULL, 0x3F418745C4F4AC52ULL } }, /* XSUM_XXH128_withSecret_testdata[87] */\n    {   88, 0x0000000000000000ULL, { 0x728F33268CEB7286ULL, 0x30B632A27E5D0D5FULL } }, /* XSUM_XXH128_withSecret_testdata[88] */\n    {   89, 0x0000000000000000ULL, { 0x07EB7F8A89BDD335ULL, 0xC65710C5D1B4310AULL } }, /* XSUM_XXH128_withSecret_testdata[89] */\n    {   90, 0x0000000000000000ULL, { 0xA51772F3B3A1CBFAULL, 0xE30B4FB5954869F5ULL } }, /* XSUM_XXH128_withSecret_testdata[90] */\n    {   91, 0x0000000000000000ULL, { 0x1D256B71C5FBA848ULL, 0x22306578BF922F54ULL } }, /* XSUM_XXH128_withSecret_testdata[91] */\n    {   92, 0x0000000000000000ULL, { 0x7C1605D78161B246ULL, 0xB13CD259B18B2519ULL } }, /* XSUM_XXH128_withSecret_testdata[92] */\n    {   93, 0x0000000000000000ULL, { 0x45C5187CEDDF1D28ULL, 0x9DD204B428420FFCULL } }, /* XSUM_XXH128_withSecret_testdata[93] */\n    {   94, 0x0000000000000000ULL, { 0xFB4FAA95CC9754CDULL, 0x7E5D92E997B7D18FULL } }, /* XSUM_XXH128_withSecret_testdata[94] */\n    {   95, 0x0000000000000000ULL, { 0xAAC141890FB205A6ULL, 0xE0E43F1DA6491546ULL } }, /* XSUM_XXH128_withSecret_testdata[95] */\n    {   96, 0x0000000000000000ULL, { 0x23F2A73C006F4795ULL, 0x60166D062D8C6594ULL } }, /* XSUM_XXH128_withSecret_testdata[96] */\n    {   97, 0x0000000000000000ULL, { 0x3988B2EE2211C48AULL, 0x5DEA30EA8FCDB355ULL } }, /* XSUM_XXH128_withSecret_testdata[97] */\n    {   98, 0x0000000000000000ULL, { 0x54C1538C29193B14ULL, 0x0BAF1E1FFF55D8FDULL } }, /* XSUM_XXH128_withSecret_testdata[98] */\n    {   99, 0x0000000000000000ULL, { 0xE4B987648656E4EFULL, 0x69163098A876FEB5ULL } }, /* XSUM_XXH128_withSecret_testdata[99] */\n    {  100, 0x0000000000000000ULL, { 0xA817DC08F5B6190AULL, 0x410FD4B26A319BA9ULL } }, /* XSUM_XXH128_withSecret_testdata[100] */\n    {  101, 0x0000000000000000ULL, { 0x71D5F260CA034E1DULL, 0x2A4DD5900022016AULL } }, /* XSUM_XXH128_withSecret_testdata[101] */\n    {  102, 0x0000000000000000ULL, { 0x91CBB6A54E65095DULL, 0xFDAF159BEF221A11ULL } }, /* XSUM_XXH128_withSecret_testdata[102] */\n    {  103, 0x0000000000000000ULL, { 0x8AD1103C4C5047C1ULL, 0x279CEB16694CD472ULL } }, /* XSUM_XXH128_withSecret_testdata[103] */\n    {  104, 0x0000000000000000ULL, { 0xF019F19F3E087ABCULL, 0x801BF630506BF978ULL } }, /* XSUM_XXH128_withSecret_testdata[104] */\n    {  105, 0x0000000000000000ULL, { 0xE457551A70141EBAULL, 0xBDDAD8D50EB25775ULL } }, /* XSUM_XXH128_withSecret_testdata[105] */\n    {  106, 0x0000000000000000ULL, { 0x5318CF58EBA84A7CULL, 0xC913863B844233E0ULL } }, /* XSUM_XXH128_withSecret_testdata[106] */\n    {  107, 0x0000000000000000ULL, { 0x53CBA6E311862BAFULL, 0x2BCAF0756BDAFD0BULL } }, /* XSUM_XXH128_withSecret_testdata[107] */\n    {  108, 0x0000000000000000ULL, { 0x03B99A08DD81208BULL, 0x71CA15769903D27BULL } }, /* XSUM_XXH128_withSecret_testdata[108] */\n    {  109, 0x0000000000000000ULL, { 0xF7EF02BF9701F786ULL, 0x51801F29B7F3E2A3ULL } }, /* XSUM_XXH128_withSecret_testdata[109] */\n    {  110, 0x0000000000000000ULL, { 0x30BF20F52A70A3C7ULL, 0x52BC7CF79E6AD74BULL } }, /* XSUM_XXH128_withSecret_testdata[110] */\n    {  111, 0x0000000000000000ULL, { 0x0FB5ADC5336A3697ULL, 0xC79F7F3A6B06237EULL } }, /* XSUM_XXH128_withSecret_testdata[111] */\n    {  112, 0x0000000000000000ULL, { 0xB72238D96DBCA9DCULL, 0x6876111893721E19ULL } }, /* XSUM_XXH128_withSecret_testdata[112] */\n    {  113, 0x0000000000000000ULL, { 0x8055B2E82BCC93ACULL, 0x728CAC14B83493F4ULL } }, /* XSUM_XXH128_withSecret_testdata[113] */\n    {  114, 0x0000000000000000ULL, { 0xC400BD9A0E4D032DULL, 0x630BA8B3AB188199ULL } }, /* XSUM_XXH128_withSecret_testdata[114] */\n    {  115, 0x0000000000000000ULL, { 0x01ED38D4CB12C081ULL, 0x20CDCAD4B333DA62ULL } }, /* XSUM_XXH128_withSecret_testdata[115] */\n    {  116, 0x0000000000000000ULL, { 0xBCC3833F8B6C4941ULL, 0x4A58ACD41F053635ULL } }, /* XSUM_XXH128_withSecret_testdata[116] */\n    {  117, 0x0000000000000000ULL, { 0x09766781BF9ACBB2ULL, 0x87EA392EB2C28A05ULL } }, /* XSUM_XXH128_withSecret_testdata[117] */\n    {  118, 0x0000000000000000ULL, { 0x6ABAF2650601424AULL, 0x05D7A40898F0815CULL } }, /* XSUM_XXH128_withSecret_testdata[118] */\n    {  119, 0x0000000000000000ULL, { 0xE8581C268DCE332DULL, 0x2CEB454728F41A21ULL } }, /* XSUM_XXH128_withSecret_testdata[119] */\n    {  120, 0x0000000000000000ULL, { 0x01D39C5E5D4DFC37ULL, 0x12099BBC68C3A850ULL } }, /* XSUM_XXH128_withSecret_testdata[120] */\n    {  121, 0x0000000000000000ULL, { 0xAC6B9AA12F4F28DEULL, 0xE4BF1FBD197511D1ULL } }, /* XSUM_XXH128_withSecret_testdata[121] */\n    {  122, 0x0000000000000000ULL, { 0xB74424F50F8BE791ULL, 0xE258FCC02563B763ULL } }, /* XSUM_XXH128_withSecret_testdata[122] */\n    {  123, 0x0000000000000000ULL, { 0xED1BCC5CCA34CDA9ULL, 0x947599FF34606547ULL } }, /* XSUM_XXH128_withSecret_testdata[123] */\n    {  124, 0x0000000000000000ULL, { 0xA97FFDB90CD8D597ULL, 0xE628833F79F3DEAFULL } }, /* XSUM_XXH128_withSecret_testdata[124] */\n    {  125, 0x0000000000000000ULL, { 0xD136093D550E6446ULL, 0x58085A541C209BEDULL } }, /* XSUM_XXH128_withSecret_testdata[125] */\n    {  126, 0x0000000000000000ULL, { 0x30329ED50A8CC757ULL, 0x39EA9E35F9BAACCAULL } }, /* XSUM_XXH128_withSecret_testdata[126] */\n    {  127, 0x0000000000000000ULL, { 0xB3F6E1C75D2D5B7AULL, 0x6F8B43137ED85CC7ULL } }, /* XSUM_XXH128_withSecret_testdata[127] */\n    {  128, 0x0000000000000000ULL, { 0xB8FEEC0B6B6EAF60ULL, 0x1DF8CCE15FE35B2CULL } }, /* XSUM_XXH128_withSecret_testdata[128] */\n    {  129, 0x0000000000000000ULL, { 0x9DEF70D87B89ED7BULL, 0x72D4D4395002B150ULL } }, /* XSUM_XXH128_withSecret_testdata[129] */\n    {  130, 0x0000000000000000ULL, { 0xDDBEA0A707C25741ULL, 0x1C55429ED8BBDEC1ULL } }, /* XSUM_XXH128_withSecret_testdata[130] */\n    {  131, 0x0000000000000000ULL, { 0xD470341F5D2FA9CBULL, 0x3893367CB6DDBF63ULL } }, /* XSUM_XXH128_withSecret_testdata[131] */\n    {  132, 0x0000000000000000ULL, { 0xDBBA90102D020290ULL, 0x83339A17DC88410BULL } }, /* XSUM_XXH128_withSecret_testdata[132] */\n    {  133, 0x0000000000000000ULL, { 0x3221BFA1F8A1D051ULL, 0x93B74C0214AA4D6AULL } }, /* XSUM_XXH128_withSecret_testdata[133] */\n    {  134, 0x0000000000000000ULL, { 0x9958E2018A688DEFULL, 0x963E5B7CDAF4236DULL } }, /* XSUM_XXH128_withSecret_testdata[134] */\n    {  135, 0x0000000000000000ULL, { 0xD61FD072B03D81F6ULL, 0xC77991B971B3A464ULL } }, /* XSUM_XXH128_withSecret_testdata[135] */\n    {  136, 0x0000000000000000ULL, { 0xF6912A73DE377C0EULL, 0xD2CC2F0C370973D9ULL } }, /* XSUM_XXH128_withSecret_testdata[136] */\n    {  137, 0x0000000000000000ULL, { 0xBCA442E48EAD20F0ULL, 0x39666F59876009ADULL } }, /* XSUM_XXH128_withSecret_testdata[137] */\n    {  138, 0x0000000000000000ULL, { 0xDE965FAAB7E9D02AULL, 0x30299D240E2E473FULL } }, /* XSUM_XXH128_withSecret_testdata[138] */\n    {  139, 0x0000000000000000ULL, { 0xC34A1B4999505ADCULL, 0x68E28AFC53EDDCCAULL } }, /* XSUM_XXH128_withSecret_testdata[139] */\n    {  140, 0x0000000000000000ULL, { 0x8CF5C8F2B296F9FFULL, 0xAF914D0D28F77269ULL } }, /* XSUM_XXH128_withSecret_testdata[140] */\n    {  141, 0x0000000000000000ULL, { 0xC32966A5C243D365ULL, 0x5BBF57053F319A25ULL } }, /* XSUM_XXH128_withSecret_testdata[141] */\n    {  142, 0x0000000000000000ULL, { 0x1055CF2DD9C7F592ULL, 0xEB41BF69D1719356ULL } }, /* XSUM_XXH128_withSecret_testdata[142] */\n    {  143, 0x0000000000000000ULL, { 0x862D7AEDA5A75D1EULL, 0xFF1B59F987821919ULL } }, /* XSUM_XXH128_withSecret_testdata[143] */\n    {  144, 0x0000000000000000ULL, { 0x96C7C5A1E486F9ACULL, 0xDC04E81604A1058EULL } }, /* XSUM_XXH128_withSecret_testdata[144] */\n    {  145, 0x0000000000000000ULL, { 0xBFDE067D31343802ULL, 0xCB0F612FE98CDBC5ULL } }, /* XSUM_XXH128_withSecret_testdata[145] */\n    {  146, 0x0000000000000000ULL, { 0x8776BA5C03949FC2ULL, 0x88E9C30C8EE953D6ULL } }, /* XSUM_XXH128_withSecret_testdata[146] */\n    {  147, 0x0000000000000000ULL, { 0xE78E7F2841F11DF4ULL, 0x9D0EE772874F1D68ULL } }, /* XSUM_XXH128_withSecret_testdata[147] */\n    {  148, 0x0000000000000000ULL, { 0xFA1EC1D3E9284D03ULL, 0xF81394C71915BF4BULL } }, /* XSUM_XXH128_withSecret_testdata[148] */\n    {  149, 0x0000000000000000ULL, { 0xA3CA27B80BB01E26ULL, 0x9CDEF2A47DD408C6ULL } }, /* XSUM_XXH128_withSecret_testdata[149] */\n    {  150, 0x0000000000000000ULL, { 0xC3AC18DA3DCCB14BULL, 0xD24662A5002390B7ULL } }, /* XSUM_XXH128_withSecret_testdata[150] */\n    {  151, 0x0000000000000000ULL, { 0x5DFCED57ECE5AE97ULL, 0x828B2919E5AB0BA7ULL } }, /* XSUM_XXH128_withSecret_testdata[151] */\n    {  152, 0x0000000000000000ULL, { 0x80D99C16BE5B4746ULL, 0x50D07D4D9711759FULL } }, /* XSUM_XXH128_withSecret_testdata[152] */\n    {  153, 0x0000000000000000ULL, { 0x0D90470AE6114654ULL, 0x4F8EFB392DBB8248ULL } }, /* XSUM_XXH128_withSecret_testdata[153] */\n    {  154, 0x0000000000000000ULL, { 0xCC9BB080CC86D5A1ULL, 0x0961BF86A5F3024DULL } }, /* XSUM_XXH128_withSecret_testdata[154] */\n    {  155, 0x0000000000000000ULL, { 0xB1A7D7D0AB8EBEB5ULL, 0x0B9DB6903BA667F3ULL } }, /* XSUM_XXH128_withSecret_testdata[155] */\n    {  156, 0x0000000000000000ULL, { 0x8C602417036EBF44ULL, 0x534C73F8E08B1B80ULL } }, /* XSUM_XXH128_withSecret_testdata[156] */\n    {  157, 0x0000000000000000ULL, { 0x68DE6650D55302F4ULL, 0xDC6ADCBB66A904E9ULL } }, /* XSUM_XXH128_withSecret_testdata[157] */\n    {  158, 0x0000000000000000ULL, { 0x5763F534CCDB1EBDULL, 0xAE81F148A97ABCE5ULL } }, /* XSUM_XXH128_withSecret_testdata[158] */\n    {  159, 0x0000000000000000ULL, { 0x366637379715D5C5ULL, 0xF628DF357D4D234FULL } }, /* XSUM_XXH128_withSecret_testdata[159] */\n    {  160, 0x0000000000000000ULL, { 0x250196B1551D54A1ULL, 0xA1564FEC41891DCFULL } }, /* XSUM_XXH128_withSecret_testdata[160] */\n    {  161, 0x0000000000000000ULL, { 0x1C3EA0BF48135821ULL, 0xB3C5644903AA4E30ULL } }, /* XSUM_XXH128_withSecret_testdata[161] */\n    {  162, 0x0000000000000000ULL, { 0xCACFD46F95C9C747ULL, 0xD398B74B9E18203EULL } }, /* XSUM_XXH128_withSecret_testdata[162] */\n    {  163, 0x0000000000000000ULL, { 0xB657B2EE7B28DE86ULL, 0xE8DE674F85299010ULL } }, /* XSUM_XXH128_withSecret_testdata[163] */\n    {  164, 0x0000000000000000ULL, { 0x2803FCF4ACB907E5ULL, 0x19325C761BB8918AULL } }, /* XSUM_XXH128_withSecret_testdata[164] */\n    {  165, 0x0000000000000000ULL, { 0xA285C1FCC06B013BULL, 0x01411098BE847E51ULL } }, /* XSUM_XXH128_withSecret_testdata[165] */\n    {  166, 0x0000000000000000ULL, { 0x1C65C7B3CF6A8339ULL, 0x6661402ADF5B429AULL } }, /* XSUM_XXH128_withSecret_testdata[166] */\n    {  167, 0x0000000000000000ULL, { 0x037EC42FBA712AB1ULL, 0x0D9682813309E518ULL } }, /* XSUM_XXH128_withSecret_testdata[167] */\n    {  168, 0x0000000000000000ULL, { 0xC7B4CFFECFE5D900ULL, 0x2ABA056AE904DC2EULL } }, /* XSUM_XXH128_withSecret_testdata[168] */\n    {  169, 0x0000000000000000ULL, { 0x12B3BC668BDF5DEFULL, 0x9609D1233AB9E3F5ULL } }, /* XSUM_XXH128_withSecret_testdata[169] */\n    {  170, 0x0000000000000000ULL, { 0x64E61397B3DA1608ULL, 0x1E0477A15B3F14BDULL } }, /* XSUM_XXH128_withSecret_testdata[170] */\n    {  171, 0x0000000000000000ULL, { 0xCA1813B7A5D83E57ULL, 0xBA7D07226C2979A0ULL } }, /* XSUM_XXH128_withSecret_testdata[171] */\n    {  172, 0x0000000000000000ULL, { 0x56CCFDB6204ED03DULL, 0x90E6FF200CAECD5EULL } }, /* XSUM_XXH128_withSecret_testdata[172] */\n    {  173, 0x0000000000000000ULL, { 0x244B741853065344ULL, 0x801ABA5FA84BA9F1ULL } }, /* XSUM_XXH128_withSecret_testdata[173] */\n    {  174, 0x0000000000000000ULL, { 0x583943B41EBFA43DULL, 0xBF2E0DA0A8C8EEA4ULL } }, /* XSUM_XXH128_withSecret_testdata[174] */\n    {  175, 0x0000000000000000ULL, { 0x4753CB4AAFB01C1CULL, 0x367F89DD1620ABEFULL } }, /* XSUM_XXH128_withSecret_testdata[175] */\n    {  176, 0x0000000000000000ULL, { 0x4CB3ADCE8349FC51ULL, 0xD9350A7FE35D2373ULL } }, /* XSUM_XXH128_withSecret_testdata[176] */\n    {  177, 0x0000000000000000ULL, { 0xFF192BACFB87F40CULL, 0x27E60FC5EEFC6394ULL } }, /* XSUM_XXH128_withSecret_testdata[177] */\n    {  178, 0x0000000000000000ULL, { 0x1E027E6D31573E6DULL, 0xB405AE45338123C3ULL } }, /* XSUM_XXH128_withSecret_testdata[178] */\n    {  179, 0x0000000000000000ULL, { 0x9602BB0BD5650AECULL, 0x06D5C7025A4141F9ULL } }, /* XSUM_XXH128_withSecret_testdata[179] */\n    {  180, 0x0000000000000000ULL, { 0x0998A3314A63DB22ULL, 0x3212D1EA4E51AEB0ULL } }, /* XSUM_XXH128_withSecret_testdata[180] */\n    {  181, 0x0000000000000000ULL, { 0x5DF11BE19242A2F9ULL, 0x25AF994855F8D9C4ULL } }, /* XSUM_XXH128_withSecret_testdata[181] */\n    {  182, 0x0000000000000000ULL, { 0xE95BB4B1C8119EF5ULL, 0x0DB6B9CA912777E6ULL } }, /* XSUM_XXH128_withSecret_testdata[182] */\n    {  183, 0x0000000000000000ULL, { 0xA7AED4E10D584942ULL, 0xC71A2048E3F065A1ULL } }, /* XSUM_XXH128_withSecret_testdata[183] */\n    {  184, 0x0000000000000000ULL, { 0x2E85101E4CDBDFD0ULL, 0x3B2A3806A42A412EULL } }, /* XSUM_XXH128_withSecret_testdata[184] */\n    {  185, 0x0000000000000000ULL, { 0x1E8AF88066EE9C79ULL, 0x274685715F9998C7ULL } }, /* XSUM_XXH128_withSecret_testdata[185] */\n    {  186, 0x0000000000000000ULL, { 0x192A4F6C4E51FA2BULL, 0x1A59513112DF72FFULL } }, /* XSUM_XXH128_withSecret_testdata[186] */\n    {  187, 0x0000000000000000ULL, { 0x8344D3385D91A0DAULL, 0x761D19AD42DB8705ULL } }, /* XSUM_XXH128_withSecret_testdata[187] */\n    {  188, 0x0000000000000000ULL, { 0xDF58F5954EB2F703ULL, 0x5DC618167F54435BULL } }, /* XSUM_XXH128_withSecret_testdata[188] */\n    {  189, 0x0000000000000000ULL, { 0xD6F764DC006C84CAULL, 0x2E1BAA5DE26E94D6ULL } }, /* XSUM_XXH128_withSecret_testdata[189] */\n    {  190, 0x0000000000000000ULL, { 0x2CB768345E16CF0DULL, 0x6EA0B9871340F8E6ULL } }, /* XSUM_XXH128_withSecret_testdata[190] */\n    {  191, 0x0000000000000000ULL, { 0xAFB3A6316B3F1A64ULL, 0xF47D033B148F9107ULL } }, /* XSUM_XXH128_withSecret_testdata[191] */\n    {  192, 0x0000000000000000ULL, { 0x296FFF5080AC60FEULL, 0xD727DC9F932A3654ULL } }, /* XSUM_XXH128_withSecret_testdata[192] */\n    {  193, 0x0000000000000000ULL, { 0x836AD3763C8CDBDBULL, 0x6B17D82CA7F9A4FEULL } }, /* XSUM_XXH128_withSecret_testdata[193] */\n    {  194, 0x0000000000000000ULL, { 0xA39E96B90FACE188ULL, 0x3EE1B15B39AE6CA9ULL } }, /* XSUM_XXH128_withSecret_testdata[194] */\n    {  195, 0x0000000000000000ULL, { 0x002CDB4476B9A36FULL, 0x18783075F43015BEULL } }, /* XSUM_XXH128_withSecret_testdata[195] */\n    {  196, 0x0000000000000000ULL, { 0x5ECA957E3A80F726ULL, 0x44A29C06F0626E95ULL } }, /* XSUM_XXH128_withSecret_testdata[196] */\n    {  197, 0x0000000000000000ULL, { 0xC877409EA44A1E35ULL, 0x38DA2D39A2F42513ULL } }, /* XSUM_XXH128_withSecret_testdata[197] */\n    {  198, 0x0000000000000000ULL, { 0xA59943963467BE83ULL, 0xFD6D31661C4F6042ULL } }, /* XSUM_XXH128_withSecret_testdata[198] */\n    {  199, 0x0000000000000000ULL, { 0xB567998BD707ACDCULL, 0x20EC30C3B7E51727ULL } }, /* XSUM_XXH128_withSecret_testdata[199] */\n    {  200, 0x0000000000000000ULL, { 0x5E1AE1C5869D3DC8ULL, 0x8ECB565D80B81F29ULL } }, /* XSUM_XXH128_withSecret_testdata[200] */\n    {  201, 0x0000000000000000ULL, { 0xBFC7A339821B8E57ULL, 0xF0722315E90E8BD2ULL } }, /* XSUM_XXH128_withSecret_testdata[201] */\n    {  202, 0x0000000000000000ULL, { 0xE2E8FAC1485EBE0CULL, 0x9197D3839F852444ULL } }, /* XSUM_XXH128_withSecret_testdata[202] */\n    {  203, 0x0000000000000000ULL, { 0x153D96599D40B97CULL, 0x6900B65DD17395ABULL } }, /* XSUM_XXH128_withSecret_testdata[203] */\n    {  204, 0x0000000000000000ULL, { 0x82743778230C0E33ULL, 0x63C818D9FCEB09E3ULL } }, /* XSUM_XXH128_withSecret_testdata[204] */\n    {  205, 0x0000000000000000ULL, { 0xE3686CDBF334337AULL, 0x871C37C916C8484DULL } }, /* XSUM_XXH128_withSecret_testdata[205] */\n    {  206, 0x0000000000000000ULL, { 0x307B8DE6DBD6E111ULL, 0xC64E877FCA0C102EULL } }, /* XSUM_XXH128_withSecret_testdata[206] */\n    {  207, 0x0000000000000000ULL, { 0x0EF173C9E83AFFA6ULL, 0x6C2F86CB875B1F0CULL } }, /* XSUM_XXH128_withSecret_testdata[207] */\n    {  208, 0x0000000000000000ULL, { 0xFC95AB9084F7955DULL, 0x23C10890CDB6F8EAULL } }, /* XSUM_XXH128_withSecret_testdata[208] */\n    {  209, 0x0000000000000000ULL, { 0x32CBDE81E25752FBULL, 0xCBFD24AF228EE79DULL } }, /* XSUM_XXH128_withSecret_testdata[209] */\n    {  210, 0x0000000000000000ULL, { 0xECE7B6BDDF0AD920ULL, 0xE5A36273A8D38A72ULL } }, /* XSUM_XXH128_withSecret_testdata[210] */\n    {  211, 0x0000000000000000ULL, { 0xF176B32A6D8B97F5ULL, 0x21532AF458ED2BE1ULL } }, /* XSUM_XXH128_withSecret_testdata[211] */\n    {  212, 0x0000000000000000ULL, { 0xF35F71734170D3B4ULL, 0x8F12A02057843F17ULL } }, /* XSUM_XXH128_withSecret_testdata[212] */\n    {  213, 0x0000000000000000ULL, { 0x6628B3F5D3420A04ULL, 0x36E26A348E761B47ULL } }, /* XSUM_XXH128_withSecret_testdata[213] */\n    {  214, 0x0000000000000000ULL, { 0xF14558DFCF74ADDFULL, 0xC1F6E90192ACAFB4ULL } }, /* XSUM_XXH128_withSecret_testdata[214] */\n    {  215, 0x0000000000000000ULL, { 0x95135DF9CD1E9846ULL, 0x2E2246C831A4D08BULL } }, /* XSUM_XXH128_withSecret_testdata[215] */\n    {  216, 0x0000000000000000ULL, { 0x247BF962C591874CULL, 0x4D7792162E2E24CEULL } }, /* XSUM_XXH128_withSecret_testdata[216] */\n    {  217, 0x0000000000000000ULL, { 0xD1B9B005072AE2F0ULL, 0x9B5D40085490D84AULL } }, /* XSUM_XXH128_withSecret_testdata[217] */\n    {  218, 0x0000000000000000ULL, { 0x50EAEF7E162C4F61ULL, 0xD0DFA87D112299F8ULL } }, /* XSUM_XXH128_withSecret_testdata[218] */\n    {  219, 0x0000000000000000ULL, { 0x1703DF077D5589D2ULL, 0x70CBDCA6AE2D610FULL } }, /* XSUM_XXH128_withSecret_testdata[219] */\n    {  220, 0x0000000000000000ULL, { 0x4EA288E848658496ULL, 0x2D510C4C829A102FULL } }, /* XSUM_XXH128_withSecret_testdata[220] */\n    {  221, 0x0000000000000000ULL, { 0xA6AED727FC876025ULL, 0xB4E8522085A88772ULL } }, /* XSUM_XXH128_withSecret_testdata[221] */\n    {  222, 0x0000000000000000ULL, { 0x51088F6C8FD00277ULL, 0x10A43149CC10FD05ULL } }, /* XSUM_XXH128_withSecret_testdata[222] */\n    {  223, 0x0000000000000000ULL, { 0x075DD2C669124BB9ULL, 0x3CB6607A24EFDA77ULL } }, /* XSUM_XXH128_withSecret_testdata[223] */\n    {  224, 0x0000000000000000ULL, { 0x45C17E9731C621AAULL, 0xE82557A8E700A942ULL } }, /* XSUM_XXH128_withSecret_testdata[224] */\n    {  225, 0x0000000000000000ULL, { 0x95C12E3F03B581EBULL, 0xC44C8D77A59305E5ULL } }, /* XSUM_XXH128_withSecret_testdata[225] */\n    {  226, 0x0000000000000000ULL, { 0x5C3871155A286C66ULL, 0x9AF71D1F255C7DEDULL } }, /* XSUM_XXH128_withSecret_testdata[226] */\n    {  227, 0x0000000000000000ULL, { 0xEA2AA1E5E5571F9DULL, 0x7BADAF95D789490AULL } }, /* XSUM_XXH128_withSecret_testdata[227] */\n    {  228, 0x0000000000000000ULL, { 0xF9BA83DDC3EBFB20ULL, 0x840D59B4E338FBB7ULL } }, /* XSUM_XXH128_withSecret_testdata[228] */\n    {  229, 0x0000000000000000ULL, { 0xB1A136B696AC30E9ULL, 0xDB58B22B375ACCD2ULL } }, /* XSUM_XXH128_withSecret_testdata[229] */\n    {  230, 0x0000000000000000ULL, { 0xA599E6E7C1770D95ULL, 0x28DB0D054CCDFDE2ULL } }, /* XSUM_XXH128_withSecret_testdata[230] */\n    {  231, 0x0000000000000000ULL, { 0xFD2598544F8BC68EULL, 0x2CCC1B9FC0ABB0ACULL } }, /* XSUM_XXH128_withSecret_testdata[231] */\n    {  232, 0x0000000000000000ULL, { 0xD110F1F9B0D554AAULL, 0x90676C77D94B1701ULL } }, /* XSUM_XXH128_withSecret_testdata[232] */\n    {  233, 0x0000000000000000ULL, { 0xE663979254786251ULL, 0x8A82723AA205D34DULL } }, /* XSUM_XXH128_withSecret_testdata[233] */\n    {  234, 0x0000000000000000ULL, { 0x0CA9892DF96D93C8ULL, 0xAB7553583832FEB3ULL } }, /* XSUM_XXH128_withSecret_testdata[234] */\n    {  235, 0x0000000000000000ULL, { 0x4F0E1FF9F41DA4B9ULL, 0x69828153D032538CULL } }, /* XSUM_XXH128_withSecret_testdata[235] */\n    {  236, 0x0000000000000000ULL, { 0xE32AE240608EBDD8ULL, 0xFD2708F531968BFCULL } }, /* XSUM_XXH128_withSecret_testdata[236] */\n    {  237, 0x0000000000000000ULL, { 0xCC7C5E20C58EF26CULL, 0x19D969D1BDAE72BEULL } }, /* XSUM_XXH128_withSecret_testdata[237] */\n    {  238, 0x0000000000000000ULL, { 0x690962986163E1D1ULL, 0xB25FD32293E03EDFULL } }, /* XSUM_XXH128_withSecret_testdata[238] */\n    {  239, 0x0000000000000000ULL, { 0x24F6932C00EFBF5FULL, 0xC73C1D7278FA152FULL } }, /* XSUM_XXH128_withSecret_testdata[239] */\n    {  240, 0x0000000000000000ULL, { 0x29DD17317E40CBA2ULL, 0x8033FD83D4336CA9ULL } }, /* XSUM_XXH128_withSecret_testdata[240] */\n    {  241, 0x0000000000000000ULL, { 0x454805371DF98A91ULL, 0x0ECDE988107F17F2ULL } }, /* XSUM_XXH128_withSecret_testdata[241] */\n    {  242, 0x0000000000000000ULL, { 0x7A1D6CC9B38309B6ULL, 0x6E4904B9098FEF30ULL } }, /* XSUM_XXH128_withSecret_testdata[242] */\n    {  243, 0x0000000000000000ULL, { 0xA21530DBA67105A2ULL, 0x0884F43B4B97B1B6ULL } }, /* XSUM_XXH128_withSecret_testdata[243] */\n    {  244, 0x0000000000000000ULL, { 0x338A6D6127CF7AA5ULL, 0xDF9C9D8C4687C59EULL } }, /* XSUM_XXH128_withSecret_testdata[244] */\n    {  245, 0x0000000000000000ULL, { 0xD39B23A3496DE71FULL, 0x3517DE4818EAB436ULL } }, /* XSUM_XXH128_withSecret_testdata[245] */\n    {  246, 0x0000000000000000ULL, { 0xC9D906953A05E2A0ULL, 0x0D33E3FCF7D69BC4ULL } }, /* XSUM_XXH128_withSecret_testdata[246] */\n    {  247, 0x0000000000000000ULL, { 0xE6C99047FB256B39ULL, 0xCCCFB2852699A406ULL } }, /* XSUM_XXH128_withSecret_testdata[247] */\n    {  248, 0x0000000000000000ULL, { 0xF07CCBDD8B5F77B8ULL, 0x76EDE095D0D879B2ULL } }, /* XSUM_XXH128_withSecret_testdata[248] */\n    {  249, 0x0000000000000000ULL, { 0xF645DD08AF66414BULL, 0xC23995007FCC4209ULL } }, /* XSUM_XXH128_withSecret_testdata[249] */\n    {  250, 0x0000000000000000ULL, { 0x9A4C8798F876F82BULL, 0x6B472D097B55A77BULL } }, /* XSUM_XXH128_withSecret_testdata[250] */\n    {  251, 0x0000000000000000ULL, { 0x649BC177D2142082ULL, 0xD5625A518E4ADFD9ULL } }, /* XSUM_XXH128_withSecret_testdata[251] */\n    {  252, 0x0000000000000000ULL, { 0x1A271919C8C3E8B5ULL, 0xFEE13F4E943EEBD3ULL } }, /* XSUM_XXH128_withSecret_testdata[252] */\n    {  253, 0x0000000000000000ULL, { 0x92B0F8103137B547ULL, 0x0F316A17433B8B49ULL } }, /* XSUM_XXH128_withSecret_testdata[253] */\n    {  254, 0x0000000000000000ULL, { 0xF6516FADBA34B6A8ULL, 0x06292FDD06C0B273ULL } }, /* XSUM_XXH128_withSecret_testdata[254] */\n    {  255, 0x0000000000000000ULL, { 0xE1E3461712968B3EULL, 0xF44F7290A7123665ULL } }, /* XSUM_XXH128_withSecret_testdata[255] */\n    {  256, 0x0000000000000000ULL, { 0xD4CBA59E2E2CF9F0ULL, 0xDC8CD5DC03C0DA95ULL } }, /* XSUM_XXH128_withSecret_testdata[256] */\n    {  257, 0x0000000000000000ULL, { 0x1E4B71E703D08492ULL, 0x15FDA9442E840F61ULL } }, /* XSUM_XXH128_withSecret_testdata[257] */\n    {  258, 0x0000000000000000ULL, { 0x4644E9534017CF3CULL, 0xE57019D0DE141BCCULL } }, /* XSUM_XXH128_withSecret_testdata[258] */\n    {  259, 0x0000000000000000ULL, { 0xC5211B50A170EF65ULL, 0xE02AE60D5D37E5A5ULL } }, /* XSUM_XXH128_withSecret_testdata[259] */\n    {  260, 0x0000000000000000ULL, { 0x8D89E78FAB4C8B4DULL, 0x3C01422963C13DA9ULL } }, /* XSUM_XXH128_withSecret_testdata[260] */\n    {  261, 0x0000000000000000ULL, { 0x5445BC41965D9CB8ULL, 0xF160C7E37B1B07E9ULL } }, /* XSUM_XXH128_withSecret_testdata[261] */\n    {  262, 0x0000000000000000ULL, { 0x1E18538BFD02BC10ULL, 0xCA31C8B27F5D4B50ULL } }, /* XSUM_XXH128_withSecret_testdata[262] */\n    {  263, 0x0000000000000000ULL, { 0x10BB0E32115E3989ULL, 0xD23C78F5C5164C67ULL } }, /* XSUM_XXH128_withSecret_testdata[263] */\n    {  264, 0x0000000000000000ULL, { 0xE481E99CB17FCFA7ULL, 0x3713C46784EF5B6DULL } }, /* XSUM_XXH128_withSecret_testdata[264] */\n    {  265, 0x0000000000000000ULL, { 0x5719499F498B55F1ULL, 0x2C8EAFEA14409139ULL } }, /* XSUM_XXH128_withSecret_testdata[265] */\n    {  266, 0x0000000000000000ULL, { 0xF05D5811FC05A53BULL, 0x18FC0917BBDA4D59ULL } }, /* XSUM_XXH128_withSecret_testdata[266] */\n    {  267, 0x0000000000000000ULL, { 0x692ED07D9D863E3BULL, 0x2DB2B573A0B7F9DBULL } }, /* XSUM_XXH128_withSecret_testdata[267] */\n    {  268, 0x0000000000000000ULL, { 0x8632AD27595A52E9ULL, 0xF654A0636825693DULL } }, /* XSUM_XXH128_withSecret_testdata[268] */\n    {  269, 0x0000000000000000ULL, { 0x2668F196EF76E609ULL, 0xF4410DA3435EECABULL } }, /* XSUM_XXH128_withSecret_testdata[269] */\n    {  270, 0x0000000000000000ULL, { 0x3FC93757FBF494ECULL, 0x7B5D7CB30D93717EULL } }, /* XSUM_XXH128_withSecret_testdata[270] */\n    {  271, 0x0000000000000000ULL, { 0x47FB222445B9AAF9ULL, 0xF1B86A17078F3561ULL } }, /* XSUM_XXH128_withSecret_testdata[271] */\n    {  272, 0x0000000000000000ULL, { 0xD9376B102E3630D9ULL, 0xC546EBE3EE0F28DDULL } }, /* XSUM_XXH128_withSecret_testdata[272] */\n    {  273, 0x0000000000000000ULL, { 0x65895492C94B9DE3ULL, 0x24211E92D6FAAEB0ULL } }, /* XSUM_XXH128_withSecret_testdata[273] */\n    {  274, 0x0000000000000000ULL, { 0xE9E82F040E18DC8FULL, 0xFB7227EE59E7F77FULL } }, /* XSUM_XXH128_withSecret_testdata[274] */\n    {  275, 0x0000000000000000ULL, { 0x32D3679B0E9C6074ULL, 0x87FAC48029908332ULL } }, /* XSUM_XXH128_withSecret_testdata[275] */\n    {  276, 0x0000000000000000ULL, { 0xF9F0E5709E4412C2ULL, 0x2FE5BCC65DE7B566ULL } }, /* XSUM_XXH128_withSecret_testdata[276] */\n    {  277, 0x0000000000000000ULL, { 0x3C62BC830C37A47BULL, 0x3B08B0459EF7E263ULL } }, /* XSUM_XXH128_withSecret_testdata[277] */\n    {  278, 0x0000000000000000ULL, { 0x1C46017F954A8887ULL, 0x731C78467880A017ULL } }, /* XSUM_XXH128_withSecret_testdata[278] */\n    {  279, 0x0000000000000000ULL, { 0x2821691C07FC0BF5ULL, 0x5FA0D4FE00D8383AULL } }, /* XSUM_XXH128_withSecret_testdata[279] */\n    {  280, 0x0000000000000000ULL, { 0x13746F0595225BF8ULL, 0xD4A23B746BD52EEBULL } }, /* XSUM_XXH128_withSecret_testdata[280] */\n    {  281, 0x0000000000000000ULL, { 0xDBED1F02AFE46AB6ULL, 0xF099ED4FBEF95963ULL } }, /* XSUM_XXH128_withSecret_testdata[281] */\n    {  282, 0x0000000000000000ULL, { 0x8BEC42DB9CA3856AULL, 0xA3026F52A8DAD20FULL } }, /* XSUM_XXH128_withSecret_testdata[282] */\n    {  283, 0x0000000000000000ULL, { 0x7FC7D29CD3DC1077ULL, 0xE449CACB55800A05ULL } }, /* XSUM_XXH128_withSecret_testdata[283] */\n    {  284, 0x0000000000000000ULL, { 0x33F520321A07B375ULL, 0x99F36042C73F4B5DULL } }, /* XSUM_XXH128_withSecret_testdata[284] */\n    {  285, 0x0000000000000000ULL, { 0x687B7AE99E7CB3BEULL, 0xC52481AB2E02E6B3ULL } }, /* XSUM_XXH128_withSecret_testdata[285] */\n    {  286, 0x0000000000000000ULL, { 0x0F91BD5C4572144CULL, 0x3A647A6697EE6CB7ULL } }, /* XSUM_XXH128_withSecret_testdata[286] */\n    {  287, 0x0000000000000000ULL, { 0x4EB562DCC46F44E3ULL, 0xCAA256FC0872A7A0ULL } }, /* XSUM_XXH128_withSecret_testdata[287] */\n    {  288, 0x0000000000000000ULL, { 0x0D392C2BA4C1974CULL, 0x145B9B9C5968565AULL } }, /* XSUM_XXH128_withSecret_testdata[288] */\n    {  289, 0x0000000000000000ULL, { 0x23F0342FB15D6F76ULL, 0x61345F530EAF24ABULL } }, /* XSUM_XXH128_withSecret_testdata[289] */\n    {  290, 0x0000000000000000ULL, { 0x5F123B83B84089BFULL, 0x4CFE3CC79C686D9EULL } }, /* XSUM_XXH128_withSecret_testdata[290] */\n    {  291, 0x0000000000000000ULL, { 0x889F2101629E55ADULL, 0xA1177A239F9CAD1CULL } }, /* XSUM_XXH128_withSecret_testdata[291] */\n    {  292, 0x0000000000000000ULL, { 0x2BCFEC3E258BFEEFULL, 0x0ECF34687AC35E5BULL } }, /* XSUM_XXH128_withSecret_testdata[292] */\n    {  293, 0x0000000000000000ULL, { 0x85CF2A67380C6897ULL, 0x78121FC8093A3001ULL } }, /* XSUM_XXH128_withSecret_testdata[293] */\n    {  294, 0x0000000000000000ULL, { 0x237B4672769369B7ULL, 0x2E53D01957988D0DULL } }, /* XSUM_XXH128_withSecret_testdata[294] */\n    {  295, 0x0000000000000000ULL, { 0x49BECA529E0108F8ULL, 0x531921B3CF59C024ULL } }, /* XSUM_XXH128_withSecret_testdata[295] */\n    {  296, 0x0000000000000000ULL, { 0xEE6FE33A46F9B8ABULL, 0x22E53BB6D321BC8CULL } }, /* XSUM_XXH128_withSecret_testdata[296] */\n    {  297, 0x0000000000000000ULL, { 0xAB5AD272C269CB84ULL, 0xA6B400F49E990277ULL } }, /* XSUM_XXH128_withSecret_testdata[297] */\n    {  298, 0x0000000000000000ULL, { 0x647D5B4FA1E77077ULL, 0x0F1090EB6570BF44ULL } }, /* XSUM_XXH128_withSecret_testdata[298] */\n    {  299, 0x0000000000000000ULL, { 0x08F146C57890970DULL, 0xFE673A3D2E957B5FULL } }, /* XSUM_XXH128_withSecret_testdata[299] */\n    {  300, 0x0000000000000000ULL, { 0xAD4EEFE44DA3771CULL, 0xBE8F26BCC8394F48ULL } }, /* XSUM_XXH128_withSecret_testdata[300] */\n    {  301, 0x0000000000000000ULL, { 0x00795F9213CC7BEBULL, 0xE68CCAA26AC452F8ULL } }, /* XSUM_XXH128_withSecret_testdata[301] */\n    {  302, 0x0000000000000000ULL, { 0xF712D99AB912CE71ULL, 0xF6C3F89589658611ULL } }, /* XSUM_XXH128_withSecret_testdata[302] */\n    {  303, 0x0000000000000000ULL, { 0x4964AB4691B49154ULL, 0xEAB292E4CCBE59DCULL } }, /* XSUM_XXH128_withSecret_testdata[303] */\n    {  304, 0x0000000000000000ULL, { 0x1608E2A44BD97C89ULL, 0x716510A50E63A848ULL } }, /* XSUM_XXH128_withSecret_testdata[304] */\n    {  305, 0x0000000000000000ULL, { 0x6472A585CF6668DFULL, 0xCB4F943B9983706CULL } }, /* XSUM_XXH128_withSecret_testdata[305] */\n    {  306, 0x0000000000000000ULL, { 0xD2BEAD64AB7F10A4ULL, 0xD9E730357122CF8BULL } }, /* XSUM_XXH128_withSecret_testdata[306] */\n    {  307, 0x0000000000000000ULL, { 0xF11A50ECA38C3575ULL, 0x89B11C4F30127B53ULL } }, /* XSUM_XXH128_withSecret_testdata[307] */\n    {  308, 0x0000000000000000ULL, { 0x722A4F986419071AULL, 0xCB2A7F12BABE6FE0ULL } }, /* XSUM_XXH128_withSecret_testdata[308] */\n    {  309, 0x0000000000000000ULL, { 0xC770E666D63849F9ULL, 0xDDC6AFF54DB68DB1ULL } }, /* XSUM_XXH128_withSecret_testdata[309] */\n    {  310, 0x0000000000000000ULL, { 0xA626F5639A03A9B1ULL, 0x234B2491EF5BD244ULL } }, /* XSUM_XXH128_withSecret_testdata[310] */\n    {  311, 0x0000000000000000ULL, { 0xD9CEE82AA29AED92ULL, 0x772DB2BEC5490B26ULL } }, /* XSUM_XXH128_withSecret_testdata[311] */\n    {  312, 0x0000000000000000ULL, { 0x96E7904694872669ULL, 0xE1A30A7DFEA0F1BAULL } }, /* XSUM_XXH128_withSecret_testdata[312] */\n    {  313, 0x0000000000000000ULL, { 0xA14D3B0A5285F4ADULL, 0x2C969BAD4F4BCBAAULL } }, /* XSUM_XXH128_withSecret_testdata[313] */\n    {  314, 0x0000000000000000ULL, { 0xF5B6891890914AFFULL, 0x421E146C251DCC38ULL } }, /* XSUM_XXH128_withSecret_testdata[314] */\n    {  315, 0x0000000000000000ULL, { 0x999AB9F81AE460A9ULL, 0xA0E60A06FFCADEE2ULL } }, /* XSUM_XXH128_withSecret_testdata[315] */\n    {  316, 0x0000000000000000ULL, { 0x2636CB73B8310C34ULL, 0x8334F1F644418D73ULL } }, /* XSUM_XXH128_withSecret_testdata[316] */\n    {  317, 0x0000000000000000ULL, { 0x3F6B687ADE1EAEA8ULL, 0x3D3A59F4994C5AEBULL } }, /* XSUM_XXH128_withSecret_testdata[317] */\n    {  318, 0x0000000000000000ULL, { 0x0B93FE00D04DF81EULL, 0x5764E8B2FF9BB057ULL } }, /* XSUM_XXH128_withSecret_testdata[318] */\n    {  319, 0x0000000000000000ULL, { 0xDDA2B628C4879108ULL, 0x2016AAD442CDBE79ULL } }, /* XSUM_XXH128_withSecret_testdata[319] */\n    {  320, 0x0000000000000000ULL, { 0x194C2D1C4A993F3CULL, 0xB45D31739E534AFCULL } }, /* XSUM_XXH128_withSecret_testdata[320] */\n    {  321, 0x0000000000000000ULL, { 0xFD6049BC3D821B0BULL, 0xE217BF541F1CD2AFULL } }, /* XSUM_XXH128_withSecret_testdata[321] */\n    {  322, 0x0000000000000000ULL, { 0xAC4A5D33460A0D8FULL, 0x199C4642D1EB98EDULL } }, /* XSUM_XXH128_withSecret_testdata[322] */\n    {  323, 0x0000000000000000ULL, { 0x52E8F6AEAF1B5E2EULL, 0xCC39CABB18BA4C6CULL } }, /* XSUM_XXH128_withSecret_testdata[323] */\n    {  324, 0x0000000000000000ULL, { 0x0FC71062B04343A3ULL, 0xF96AE611CC83C97FULL } }, /* XSUM_XXH128_withSecret_testdata[324] */\n    {  325, 0x0000000000000000ULL, { 0xA7FF1D6E81A588E4ULL, 0x34534AA9F891F59CULL } }, /* XSUM_XXH128_withSecret_testdata[325] */\n    {  326, 0x0000000000000000ULL, { 0xA77100819A31451CULL, 0xA87C246BF5D057A0ULL } }, /* XSUM_XXH128_withSecret_testdata[326] */\n    {  327, 0x0000000000000000ULL, { 0x3900B897CC037C54ULL, 0xE8E42BED96DAE031ULL } }, /* XSUM_XXH128_withSecret_testdata[327] */\n    {  328, 0x0000000000000000ULL, { 0x2CCC45D68CFCBE8DULL, 0xA4657C4DFE57C74DULL } }, /* XSUM_XXH128_withSecret_testdata[328] */\n    {  329, 0x0000000000000000ULL, { 0xC5D310D557FEF6C8ULL, 0x4D3254BB67025951ULL } }, /* XSUM_XXH128_withSecret_testdata[329] */\n    {  330, 0x0000000000000000ULL, { 0xED4CF75B85C7C208ULL, 0x6DE8BEAA946F8CEFULL } }, /* XSUM_XXH128_withSecret_testdata[330] */\n    {  331, 0x0000000000000000ULL, { 0x06C32247652F6E66ULL, 0x49B244719BAE658DULL } }, /* XSUM_XXH128_withSecret_testdata[331] */\n    {  332, 0x0000000000000000ULL, { 0x0C5AAFD89A34F935ULL, 0x5CB088CB198853BBULL } }, /* XSUM_XXH128_withSecret_testdata[332] */\n    {  333, 0x0000000000000000ULL, { 0x5793D857574D7657ULL, 0x3AFACC0A6DB668F8ULL } }, /* XSUM_XXH128_withSecret_testdata[333] */\n    {  334, 0x0000000000000000ULL, { 0x6E7E849FBD00AA49ULL, 0xBA3A0ED019C62E5AULL } }, /* XSUM_XXH128_withSecret_testdata[334] */\n    {  335, 0x0000000000000000ULL, { 0xBCDB86FB248DDF09ULL, 0x98830E6EC1DEDEECULL } }, /* XSUM_XXH128_withSecret_testdata[335] */\n    {  336, 0x0000000000000000ULL, { 0xC482729B771A98D6ULL, 0x29757E9E041D9D20ULL } }, /* XSUM_XXH128_withSecret_testdata[336] */\n    {  337, 0x0000000000000000ULL, { 0x76A7E94E68306FD7ULL, 0x72A2AB89F84D1D3AULL } }, /* XSUM_XXH128_withSecret_testdata[337] */\n    {  338, 0x0000000000000000ULL, { 0x99345B97606E0954ULL, 0x350EF4B1CB27AA90ULL } }, /* XSUM_XXH128_withSecret_testdata[338] */\n    {  339, 0x0000000000000000ULL, { 0xEF8E23FD4925C9B5ULL, 0xA26D4FF25BFD6F20ULL } }, /* XSUM_XXH128_withSecret_testdata[339] */\n    {  340, 0x0000000000000000ULL, { 0x9C06E9F9E8F95A1BULL, 0xDCCE30F2771D58CDULL } }, /* XSUM_XXH128_withSecret_testdata[340] */\n    {  341, 0x0000000000000000ULL, { 0x7440FC10FFC82E30ULL, 0x3E322EC65DCA2065ULL } }, /* XSUM_XXH128_withSecret_testdata[341] */\n    {  342, 0x0000000000000000ULL, { 0xA9F13DA859FE0DD5ULL, 0x36F37EDD89A2556EULL } }, /* XSUM_XXH128_withSecret_testdata[342] */\n    {  343, 0x0000000000000000ULL, { 0x8008021E109891BBULL, 0x7A00D63CAD65CAC2ULL } }, /* XSUM_XXH128_withSecret_testdata[343] */\n    {  344, 0x0000000000000000ULL, { 0x27A32662397B2B8EULL, 0x5031CCAC003939DFULL } }, /* XSUM_XXH128_withSecret_testdata[344] */\n    {  345, 0x0000000000000000ULL, { 0x42416962BB6568B0ULL, 0x4919B1C32608998CULL } }, /* XSUM_XXH128_withSecret_testdata[345] */\n    {  346, 0x0000000000000000ULL, { 0x0F9E193156B85403ULL, 0xC3A988892DAD49BAULL } }, /* XSUM_XXH128_withSecret_testdata[346] */\n    {  347, 0x0000000000000000ULL, { 0xACAEFA2E644AE0CCULL, 0x41C011D09E2042FAULL } }, /* XSUM_XXH128_withSecret_testdata[347] */\n    {  348, 0x0000000000000000ULL, { 0xB903628701269F0FULL, 0xC8366E3F2EBD72ECULL } }, /* XSUM_XXH128_withSecret_testdata[348] */\n    {  349, 0x0000000000000000ULL, { 0x21F9F87CED7F59ECULL, 0x15A91E869AAD1790ULL } }, /* XSUM_XXH128_withSecret_testdata[349] */\n    {  350, 0x0000000000000000ULL, { 0x510C00D6E6CA0292ULL, 0xA1092C3588889F0EULL } }, /* XSUM_XXH128_withSecret_testdata[350] */\n    {  351, 0x0000000000000000ULL, { 0x067C68EA7336F2BBULL, 0x107C695BE16A5EF0ULL } }, /* XSUM_XXH128_withSecret_testdata[351] */\n    {  352, 0x0000000000000000ULL, { 0x2FA1AA59DD588D9EULL, 0x896F856A0C89FE2CULL } }, /* XSUM_XXH128_withSecret_testdata[352] */\n    {  353, 0x0000000000000000ULL, { 0x6427D4F16BB0B275ULL, 0x60349531FEF86FB1ULL } }, /* XSUM_XXH128_withSecret_testdata[353] */\n    {  354, 0x0000000000000000ULL, { 0x945B95851BBF0CEBULL, 0x3B73FE4F958C578FULL } }, /* XSUM_XXH128_withSecret_testdata[354] */\n    {  355, 0x0000000000000000ULL, { 0x4097F41CB9A6C7C0ULL, 0x8F9CB84B5E70B661ULL } }, /* XSUM_XXH128_withSecret_testdata[355] */\n    {  356, 0x0000000000000000ULL, { 0x2B3DB75847E4D9A5ULL, 0x1586E65E74022840ULL } }, /* XSUM_XXH128_withSecret_testdata[356] */\n    {  357, 0x0000000000000000ULL, { 0xC03244E03567B277ULL, 0x85B4508683198D82ULL } }, /* XSUM_XXH128_withSecret_testdata[357] */\n    {  358, 0x0000000000000000ULL, { 0xEE4D73BC4AAFC328ULL, 0x4D46BD0823C6BD26ULL } }, /* XSUM_XXH128_withSecret_testdata[358] */\n    {  359, 0x0000000000000000ULL, { 0x0A321BE91994A2B5ULL, 0xEFBB6581CA85AB90ULL } }, /* XSUM_XXH128_withSecret_testdata[359] */\n    {  360, 0x0000000000000000ULL, { 0xA34661ED84F91D96ULL, 0x6E06891E2BE2D48DULL } }, /* XSUM_XXH128_withSecret_testdata[360] */\n    {  361, 0x0000000000000000ULL, { 0x2A79F41AC7E29D95ULL, 0x8320C929F14B65C9ULL } }, /* XSUM_XXH128_withSecret_testdata[361] */\n    {  362, 0x0000000000000000ULL, { 0xB37D84C527A15E6CULL, 0xEBB2B69E5A92DA25ULL } }, /* XSUM_XXH128_withSecret_testdata[362] */\n    {  363, 0x0000000000000000ULL, { 0x1E7C1743806AD536ULL, 0x6B68FFAA5A865C3CULL } }, /* XSUM_XXH128_withSecret_testdata[363] */\n    {  364, 0x0000000000000000ULL, { 0x7AF7CE01C75EE6FFULL, 0x485B5D0D0853AF2BULL } }, /* XSUM_XXH128_withSecret_testdata[364] */\n    {  365, 0x0000000000000000ULL, { 0xCFEB51C858A5622EULL, 0x206CE4A05C4CA64CULL } }, /* XSUM_XXH128_withSecret_testdata[365] */\n    {  366, 0x0000000000000000ULL, { 0xF58BBCA1C9747069ULL, 0xF8E3A08627B86040ULL } }, /* XSUM_XXH128_withSecret_testdata[366] */\n    {  367, 0x0000000000000000ULL, { 0x1BA132260A257D3FULL, 0x73A563A19C7B3826ULL } }, /* XSUM_XXH128_withSecret_testdata[367] */\n    {  368, 0x0000000000000000ULL, { 0x9219084B7F90DE95ULL, 0xAB25C65276EE6721ULL } }, /* XSUM_XXH128_withSecret_testdata[368] */\n    {  369, 0x0000000000000000ULL, { 0xAA306A3323A36F10ULL, 0x99F19307D7BA9F66ULL } }, /* XSUM_XXH128_withSecret_testdata[369] */\n    {  370, 0x0000000000000000ULL, { 0x5E1E41A3EE73C4CAULL, 0x38DEDDB2115A4263ULL } }, /* XSUM_XXH128_withSecret_testdata[370] */\n    {  371, 0x0000000000000000ULL, { 0xC34FDC36198F74EDULL, 0xC048AE7182EE8086ULL } }, /* XSUM_XXH128_withSecret_testdata[371] */\n    {  372, 0x0000000000000000ULL, { 0x3DA69079085A04E9ULL, 0xE3815EC8451E4F43ULL } }, /* XSUM_XXH128_withSecret_testdata[372] */\n    {  373, 0x0000000000000000ULL, { 0xA94B7213A0252AB3ULL, 0x5373D866840A4EDFULL } }, /* XSUM_XXH128_withSecret_testdata[373] */\n    {  374, 0x0000000000000000ULL, { 0xB8A38E5866DAA69AULL, 0xC71A655496313985ULL } }, /* XSUM_XXH128_withSecret_testdata[374] */\n    {  375, 0x0000000000000000ULL, { 0xD815C3B6A81D988AULL, 0x26EA9E0E0C0DB13AULL } }, /* XSUM_XXH128_withSecret_testdata[375] */\n    {  376, 0x0000000000000000ULL, { 0x48021E8BEF7C0F91ULL, 0x3DBDAFF272095E20ULL } }, /* XSUM_XXH128_withSecret_testdata[376] */\n    {  377, 0x0000000000000000ULL, { 0x2403D3B5EF2187C1ULL, 0x51A3B26094D996AEULL } }, /* XSUM_XXH128_withSecret_testdata[377] */\n    {  378, 0x0000000000000000ULL, { 0xB599C0DBFA7B38ABULL, 0x03B9755D3B7D15FEULL } }, /* XSUM_XXH128_withSecret_testdata[378] */\n    {  379, 0x0000000000000000ULL, { 0x3F1C230AE6A51A09ULL, 0x8DCFCEED8CD2EAB1ULL } }, /* XSUM_XXH128_withSecret_testdata[379] */\n    {  380, 0x0000000000000000ULL, { 0x1D947ED6C9B124BAULL, 0xD99A6081ED238662ULL } }, /* XSUM_XXH128_withSecret_testdata[380] */\n    {  381, 0x0000000000000000ULL, { 0x8AE2F1EDDC6FA197ULL, 0x73BB67250C370F9BULL } }, /* XSUM_XXH128_withSecret_testdata[381] */\n    {  382, 0x0000000000000000ULL, { 0x5686BC7B2C3699F0ULL, 0x4E5F7C373DE895EDULL } }, /* XSUM_XXH128_withSecret_testdata[382] */\n    {  383, 0x0000000000000000ULL, { 0x5B081C559D5A2691ULL, 0xDB04662DC65DE5FBULL } }, /* XSUM_XXH128_withSecret_testdata[383] */\n    {  384, 0x0000000000000000ULL, { 0x3E4ACFE089AAAC49ULL, 0x1B4CD7BA5DA832CCULL } }, /* XSUM_XXH128_withSecret_testdata[384] */\n    {  385, 0x0000000000000000ULL, { 0x68E16289A463A85CULL, 0xD964A8880DA403E6ULL } }, /* XSUM_XXH128_withSecret_testdata[385] */\n    {  386, 0x0000000000000000ULL, { 0x8361384F1C833DBBULL, 0x0523B60FA2951D89ULL } }, /* XSUM_XXH128_withSecret_testdata[386] */\n    {  387, 0x0000000000000000ULL, { 0x619589E8B878E5B1ULL, 0x83B7224A81C7093DULL } }, /* XSUM_XXH128_withSecret_testdata[387] */\n    {  388, 0x0000000000000000ULL, { 0xAA1FD2CDF886DB48ULL, 0xC81E922665810322ULL } }, /* XSUM_XXH128_withSecret_testdata[388] */\n    {  389, 0x0000000000000000ULL, { 0x4A691FB625C012D6ULL, 0xA82B359DFEA526FEULL } }, /* XSUM_XXH128_withSecret_testdata[389] */\n    {  390, 0x0000000000000000ULL, { 0x4DF5BEE29D39A198ULL, 0x8E5C8371940D2216ULL } }, /* XSUM_XXH128_withSecret_testdata[390] */\n    {  391, 0x0000000000000000ULL, { 0x8A1852777D68C286ULL, 0x8C06E033BA3B279AULL } }, /* XSUM_XXH128_withSecret_testdata[391] */\n    {  392, 0x0000000000000000ULL, { 0x9E87BE43FBCBC9EBULL, 0x9C40B9942D8DF0B0ULL } }, /* XSUM_XXH128_withSecret_testdata[392] */\n    {  393, 0x0000000000000000ULL, { 0x6CA925A00CC82F84ULL, 0x4373EC0BEC204B4FULL } }, /* XSUM_XXH128_withSecret_testdata[393] */\n    {  394, 0x0000000000000000ULL, { 0xEDA2EA217928B5F5ULL, 0x8A68BEE9BBD0118FULL } }, /* XSUM_XXH128_withSecret_testdata[394] */\n    {  395, 0x0000000000000000ULL, { 0x36015D830AFA1151ULL, 0xC0F0F70BC6704DE2ULL } }, /* XSUM_XXH128_withSecret_testdata[395] */\n    {  396, 0x0000000000000000ULL, { 0x2F6F98A51CB51691ULL, 0xE8C878E878E9E62FULL } }, /* XSUM_XXH128_withSecret_testdata[396] */\n    {  397, 0x0000000000000000ULL, { 0xBBF2DC743F67DE36ULL, 0x2C3FABDBB51F436CULL } }, /* XSUM_XXH128_withSecret_testdata[397] */\n    {  398, 0x0000000000000000ULL, { 0x9742E652697AA2CFULL, 0x1E56C54F15E7EB73ULL } }, /* XSUM_XXH128_withSecret_testdata[398] */\n    {  399, 0x0000000000000000ULL, { 0x4EB106A1AA40FA23ULL, 0x75DC19749F4C69A8ULL } }, /* XSUM_XXH128_withSecret_testdata[399] */\n    {  400, 0x0000000000000000ULL, { 0xAEA4953E8ADE0709ULL, 0x1C1AFC1DECE68B41ULL } }, /* XSUM_XXH128_withSecret_testdata[400] */\n    {  401, 0x0000000000000000ULL, { 0x0112CF533D114963ULL, 0x990DFF5052F6DA8CULL } }, /* XSUM_XXH128_withSecret_testdata[401] */\n    {  402, 0x0000000000000000ULL, { 0xF22A46521BB555DBULL, 0xF9EDF1EEA2C83086ULL } }, /* XSUM_XXH128_withSecret_testdata[402] */\n    {  403, 0x0000000000000000ULL, { 0x14546019124D43B8ULL, 0xE14EEDF084A487F3ULL } }, /* XSUM_XXH128_withSecret_testdata[403] */\n    {  404, 0x0000000000000000ULL, { 0xD7C6DB1687C9CCE4ULL, 0xAFA5D0B2B47F7676ULL } }, /* XSUM_XXH128_withSecret_testdata[404] */\n    {  405, 0x0000000000000000ULL, { 0xD9D0709DDDF7D8FDULL, 0x0C53914E283B0592ULL } }, /* XSUM_XXH128_withSecret_testdata[405] */\n    {  406, 0x0000000000000000ULL, { 0xFCCA387E865C2566ULL, 0xFBA44C10A33DCBF5ULL } }, /* XSUM_XXH128_withSecret_testdata[406] */\n    {  407, 0x0000000000000000ULL, { 0x64AF408F11B9217DULL, 0x477B00E6C455400DULL } }, /* XSUM_XXH128_withSecret_testdata[407] */\n    {  408, 0x0000000000000000ULL, { 0xB9E9F14A1D9E0397ULL, 0x8C6AA8E39AD17331ULL } }, /* XSUM_XXH128_withSecret_testdata[408] */\n    {  409, 0x0000000000000000ULL, { 0x99AFB4E6A523221BULL, 0x1B87E898CD2FE3D1ULL } }, /* XSUM_XXH128_withSecret_testdata[409] */\n    {  410, 0x0000000000000000ULL, { 0x5254EDB9EB3DBB94ULL, 0x82EBBE3848FD3327ULL } }, /* XSUM_XXH128_withSecret_testdata[410] */\n    {  411, 0x0000000000000000ULL, { 0xB6B23CD56A79121CULL, 0xE8ACF86FFA526094ULL } }, /* XSUM_XXH128_withSecret_testdata[411] */\n    {  412, 0x0000000000000000ULL, { 0x1BFB20FD55E49164ULL, 0x9A33917D8976424EULL } }, /* XSUM_XXH128_withSecret_testdata[412] */\n    {  413, 0x0000000000000000ULL, { 0xF4CBBBA8889F9520ULL, 0xBC804B53597616B4ULL } }, /* XSUM_XXH128_withSecret_testdata[413] */\n    {  414, 0x0000000000000000ULL, { 0x1C4CBC873CCF23B7ULL, 0x3D67E61338C42494ULL } }, /* XSUM_XXH128_withSecret_testdata[414] */\n    {  415, 0x0000000000000000ULL, { 0xCBACAAE57B2FFCB4ULL, 0xAB8D4E5CDB42CEFCULL } }, /* XSUM_XXH128_withSecret_testdata[415] */\n    {  416, 0x0000000000000000ULL, { 0xFEB5537A0E295659ULL, 0x6E623CA1EF369211ULL } }, /* XSUM_XXH128_withSecret_testdata[416] */\n    {  417, 0x0000000000000000ULL, { 0x0047ADBB08006B06ULL, 0x7D736CDE1F87140EULL } }, /* XSUM_XXH128_withSecret_testdata[417] */\n    {  418, 0x0000000000000000ULL, { 0xC610CC3AF8C4C9ECULL, 0x87A11AD79ED3AD34ULL } }, /* XSUM_XXH128_withSecret_testdata[418] */\n    {  419, 0x0000000000000000ULL, { 0x3F7975EF1A922ED9ULL, 0xF5F2774B46587872ULL } }, /* XSUM_XXH128_withSecret_testdata[419] */\n    {  420, 0x0000000000000000ULL, { 0x21207F5F4B43C72EULL, 0x099D14AE35CD8064ULL } }, /* XSUM_XXH128_withSecret_testdata[420] */\n    {  421, 0x0000000000000000ULL, { 0x2EDE601DC0BC9006ULL, 0x8781D872186B4F70ULL } }, /* XSUM_XXH128_withSecret_testdata[421] */\n    {  422, 0x0000000000000000ULL, { 0x0F4C0CF035A33F14ULL, 0x20488FC7EAC5827AULL } }, /* XSUM_XXH128_withSecret_testdata[422] */\n    {  423, 0x0000000000000000ULL, { 0x4131CBFEF56B3263ULL, 0x036E241F4CB3CD2FULL } }, /* XSUM_XXH128_withSecret_testdata[423] */\n    {  424, 0x0000000000000000ULL, { 0xD2863D9CAE01FE62ULL, 0x8C37F962AE5A6495ULL } }, /* XSUM_XXH128_withSecret_testdata[424] */\n    {  425, 0x0000000000000000ULL, { 0xA6BB4DF2FC91FD60ULL, 0x89DC73F79AF207BEULL } }, /* XSUM_XXH128_withSecret_testdata[425] */\n    {  426, 0x0000000000000000ULL, { 0x978D1CCF305BAE7DULL, 0x657A9DA9666B5F66ULL } }, /* XSUM_XXH128_withSecret_testdata[426] */\n    {  427, 0x0000000000000000ULL, { 0xA9FB094491E5FFBEULL, 0x37C9D06BF5670EFCULL } }, /* XSUM_XXH128_withSecret_testdata[427] */\n    {  428, 0x0000000000000000ULL, { 0x0EBE48BE365952CBULL, 0xC51ED8196BC0BF7CULL } }, /* XSUM_XXH128_withSecret_testdata[428] */\n    {  429, 0x0000000000000000ULL, { 0x25237F7BE323FF7FULL, 0x9533824DBBE47D00ULL } }, /* XSUM_XXH128_withSecret_testdata[429] */\n    {  430, 0x0000000000000000ULL, { 0x4B4F4FE9DE6B2E2CULL, 0x6B3041AB35EE0843ULL } }, /* XSUM_XXH128_withSecret_testdata[430] */\n    {  431, 0x0000000000000000ULL, { 0x74D082ED70E8A13FULL, 0xBFE8F74D7B3C69B3ULL } }, /* XSUM_XXH128_withSecret_testdata[431] */\n    {  432, 0x0000000000000000ULL, { 0x4D084F04ABE7620EULL, 0x2E9E52BFA3FB1BD6ULL } }, /* XSUM_XXH128_withSecret_testdata[432] */\n    {  433, 0x0000000000000000ULL, { 0x6390929D32DB775AULL, 0xB4166866D6E9F0F1ULL } }, /* XSUM_XXH128_withSecret_testdata[433] */\n    {  434, 0x0000000000000000ULL, { 0x86BC650A8AFFA1A4ULL, 0x26C13F569318AAF0ULL } }, /* XSUM_XXH128_withSecret_testdata[434] */\n    {  435, 0x0000000000000000ULL, { 0x525B7109EB14DB23ULL, 0x98C0E7204D4C7FFEULL } }, /* XSUM_XXH128_withSecret_testdata[435] */\n    {  436, 0x0000000000000000ULL, { 0x41A700E2DFEF822EULL, 0x7E55F4ABC7B2FB0FULL } }, /* XSUM_XXH128_withSecret_testdata[436] */\n    {  437, 0x0000000000000000ULL, { 0x6CB4BEFFF28DF8ACULL, 0x914AF1CD1E48AE4CULL } }, /* XSUM_XXH128_withSecret_testdata[437] */\n    {  438, 0x0000000000000000ULL, { 0x810C53827E409D0CULL, 0x77ACF35D06888242ULL } }, /* XSUM_XXH128_withSecret_testdata[438] */\n    {  439, 0x0000000000000000ULL, { 0x5E1A75786BC7D5EFULL, 0xF0073F2608406DB7ULL } }, /* XSUM_XXH128_withSecret_testdata[439] */\n    {  440, 0x0000000000000000ULL, { 0x7B2FCA065E805463ULL, 0x2DBAA38704F781A1ULL } }, /* XSUM_XXH128_withSecret_testdata[440] */\n    {  441, 0x0000000000000000ULL, { 0xFE97333284356D7DULL, 0x0F00087B07FC3FADULL } }, /* XSUM_XXH128_withSecret_testdata[441] */\n    {  442, 0x0000000000000000ULL, { 0x106231A1F8C0FFCCULL, 0x8DC14F341795C07DULL } }, /* XSUM_XXH128_withSecret_testdata[442] */\n    {  443, 0x0000000000000000ULL, { 0xF8FBD2920F51BF03ULL, 0x03895A8B63E81AE8ULL } }, /* XSUM_XXH128_withSecret_testdata[443] */\n    {  444, 0x0000000000000000ULL, { 0x6CD891B1A44EE649ULL, 0xD736427EA23279CBULL } }, /* XSUM_XXH128_withSecret_testdata[444] */\n    {  445, 0x0000000000000000ULL, { 0xA0C07BC7005909B9ULL, 0xCA356CFBAB97ABA7ULL } }, /* XSUM_XXH128_withSecret_testdata[445] */\n    {  446, 0x0000000000000000ULL, { 0x184DC35A01F19A69ULL, 0x3960AB05D8F7BF24ULL } }, /* XSUM_XXH128_withSecret_testdata[446] */\n    {  447, 0x0000000000000000ULL, { 0xE57C1002023987FEULL, 0x67706109739EC675ULL } }, /* XSUM_XXH128_withSecret_testdata[447] */\n    {  448, 0x0000000000000000ULL, { 0x8EA484E6F2659C6FULL, 0x8446304BD77F2DA2ULL } }, /* XSUM_XXH128_withSecret_testdata[448] */\n    {  449, 0x0000000000000000ULL, { 0xF260E6432FC489A2ULL, 0xF8E52694B150DCD4ULL } }, /* XSUM_XXH128_withSecret_testdata[449] */\n    {  450, 0x0000000000000000ULL, { 0xAE8D2868FE6AC4C4ULL, 0x2107CAB0C6E90926ULL } }, /* XSUM_XXH128_withSecret_testdata[450] */\n    {  451, 0x0000000000000000ULL, { 0x04099B3D6ACEB18BULL, 0x235A2C83F529F739ULL } }, /* XSUM_XXH128_withSecret_testdata[451] */\n    {  452, 0x0000000000000000ULL, { 0xDDB5426BF3E3EA19ULL, 0x044C3B7AD59DF71FULL } }, /* XSUM_XXH128_withSecret_testdata[452] */\n    {  453, 0x0000000000000000ULL, { 0xCCB0A8860651FEC0ULL, 0xFA6064C9B9E328A5ULL } }, /* XSUM_XXH128_withSecret_testdata[453] */\n    {  454, 0x0000000000000000ULL, { 0x9617D50B4A3EF1B3ULL, 0xEFC70D4C1BCC874CULL } }, /* XSUM_XXH128_withSecret_testdata[454] */\n    {  455, 0x0000000000000000ULL, { 0x6F2B8E3512F86464ULL, 0x02E8B69C637AC751ULL } }, /* XSUM_XXH128_withSecret_testdata[455] */\n    {  456, 0x0000000000000000ULL, { 0x05A8D79A5ED7FC14ULL, 0xA53A4D85F36DB882ULL } }, /* XSUM_XXH128_withSecret_testdata[456] */\n    {  457, 0x0000000000000000ULL, { 0x8B10941099EF6821ULL, 0x66856D29C54FD542ULL } }, /* XSUM_XXH128_withSecret_testdata[457] */\n    {  458, 0x0000000000000000ULL, { 0x531E70FF6FAD7D8BULL, 0x0BBE77CED652BD05ULL } }, /* XSUM_XXH128_withSecret_testdata[458] */\n    {  459, 0x0000000000000000ULL, { 0x76489F7455586327ULL, 0xA7FFC0FD56A6F781ULL } }, /* XSUM_XXH128_withSecret_testdata[459] */\n    {  460, 0x0000000000000000ULL, { 0x564DF8086324198DULL, 0xA76F4EE1E39E53E1ULL } }, /* XSUM_XXH128_withSecret_testdata[460] */\n    {  461, 0x0000000000000000ULL, { 0x1C11818055102C22ULL, 0x58A0AD6FA989152DULL } }, /* XSUM_XXH128_withSecret_testdata[461] */\n    {  462, 0x0000000000000000ULL, { 0xEBD34A4B973A81E7ULL, 0xA347A4AEBD1C82D1ULL } }, /* XSUM_XXH128_withSecret_testdata[462] */\n    {  463, 0x0000000000000000ULL, { 0x139366BA74F1922DULL, 0x6B11B4B7143045E7ULL } }, /* XSUM_XXH128_withSecret_testdata[463] */\n    {  464, 0x0000000000000000ULL, { 0x0D5E0CFA6D8177ECULL, 0x9796369488334C97ULL } }, /* XSUM_XXH128_withSecret_testdata[464] */\n    {  465, 0x0000000000000000ULL, { 0x696BB5F52A5A4D2AULL, 0x49C74CE505826632ULL } }, /* XSUM_XXH128_withSecret_testdata[465] */\n    {  466, 0x0000000000000000ULL, { 0x1DA3384D51C3989EULL, 0x3964CBDBF34322ACULL } }, /* XSUM_XXH128_withSecret_testdata[466] */\n    {  467, 0x0000000000000000ULL, { 0xEB1E8FB9E569B1BEULL, 0x3E593067E72A4676ULL } }, /* XSUM_XXH128_withSecret_testdata[467] */\n    {  468, 0x0000000000000000ULL, { 0xBE451DC21D6711F3ULL, 0x4B1B8E754AD2BFEDULL } }, /* XSUM_XXH128_withSecret_testdata[468] */\n    {  469, 0x0000000000000000ULL, { 0x9AA9F786DB7FB505ULL, 0x83FEAFC31A5812F9ULL } }, /* XSUM_XXH128_withSecret_testdata[469] */\n    {  470, 0x0000000000000000ULL, { 0x05A05AF0D472D478ULL, 0x805AC1F92FBF85DAULL } }, /* XSUM_XXH128_withSecret_testdata[470] */\n    {  471, 0x0000000000000000ULL, { 0x74E2DACFF08AA645ULL, 0x942265DB8CDF4D47ULL } }, /* XSUM_XXH128_withSecret_testdata[471] */\n    {  472, 0x0000000000000000ULL, { 0xF85348C7CFB5B9EAULL, 0x8BC0F0ACDE1421D2ULL } }, /* XSUM_XXH128_withSecret_testdata[472] */\n    {  473, 0x0000000000000000ULL, { 0xA883F3EB96291568ULL, 0x4898C5F2942A3D83ULL } }, /* XSUM_XXH128_withSecret_testdata[473] */\n    {  474, 0x0000000000000000ULL, { 0xC720FBE31C03664FULL, 0x13695088B5F85539ULL } }, /* XSUM_XXH128_withSecret_testdata[474] */\n    {  475, 0x0000000000000000ULL, { 0x4D97B2885715A5AAULL, 0xCAB8E6F4A802C9E1ULL } }, /* XSUM_XXH128_withSecret_testdata[475] */\n    {  476, 0x0000000000000000ULL, { 0x71A3B155E993C666ULL, 0x58D844B69A96D476ULL } }, /* XSUM_XXH128_withSecret_testdata[476] */\n    {  477, 0x0000000000000000ULL, { 0x06CE86D9F84391BAULL, 0xAF70278539F5DE64ULL } }, /* XSUM_XXH128_withSecret_testdata[477] */\n    {  478, 0x0000000000000000ULL, { 0x0D7529EF6859BCE0ULL, 0x0B50CB32E8288FE1ULL } }, /* XSUM_XXH128_withSecret_testdata[478] */\n    {  479, 0x0000000000000000ULL, { 0x788F89E922618A08ULL, 0x0EB5B7F30B9960B6ULL } }, /* XSUM_XXH128_withSecret_testdata[479] */\n    {  480, 0x0000000000000000ULL, { 0x7FADB159F9E17B6BULL, 0xF3FB55E95BF1DBFFULL } }, /* XSUM_XXH128_withSecret_testdata[480] */\n    {  481, 0x0000000000000000ULL, { 0x8DD9EFDDB2292E61ULL, 0x9FD23ED53D694F9FULL } }, /* XSUM_XXH128_withSecret_testdata[481] */\n    {  482, 0x0000000000000000ULL, { 0x9E3AD6DAEABABA39ULL, 0x6FBA5EFD80A47646ULL } }, /* XSUM_XXH128_withSecret_testdata[482] */\n    {  483, 0x0000000000000000ULL, { 0x981222C1C613688DULL, 0xF6B86EF965DB5F18ULL } }, /* XSUM_XXH128_withSecret_testdata[483] */\n    {  484, 0x0000000000000000ULL, { 0xB4F8AB78FEFEABB2ULL, 0x14992814225B5F49ULL } }, /* XSUM_XXH128_withSecret_testdata[484] */\n    {  485, 0x0000000000000000ULL, { 0xB13480CA4EE9DFC4ULL, 0x0F233501CE9C803EULL } }, /* XSUM_XXH128_withSecret_testdata[485] */\n    {  486, 0x0000000000000000ULL, { 0x55E7EF4BE393F7D9ULL, 0x36C2E6D8B879AA99ULL } }, /* XSUM_XXH128_withSecret_testdata[486] */\n    {  487, 0x0000000000000000ULL, { 0xAE4EA572FD01D019ULL, 0x6D12C8FFB9C57CB4ULL } }, /* XSUM_XXH128_withSecret_testdata[487] */\n    {  488, 0x0000000000000000ULL, { 0xAF36559E92729487ULL, 0xE232E63C9D83780AULL } }, /* XSUM_XXH128_withSecret_testdata[488] */\n    {  489, 0x0000000000000000ULL, { 0x890D3420854C7C5AULL, 0x9CA6519EB2E18CA5ULL } }, /* XSUM_XXH128_withSecret_testdata[489] */\n    {  490, 0x0000000000000000ULL, { 0xCAE024633D1614D0ULL, 0xE2558061CC65E73BULL } }, /* XSUM_XXH128_withSecret_testdata[490] */\n    {  491, 0x0000000000000000ULL, { 0xEE8EECBBCB3E766BULL, 0xD4924B1CDAE524F3ULL } }, /* XSUM_XXH128_withSecret_testdata[491] */\n    {  492, 0x0000000000000000ULL, { 0xAF71D10211457BB0ULL, 0x6A03D0B1050B34EBULL } }, /* XSUM_XXH128_withSecret_testdata[492] */\n    {  493, 0x0000000000000000ULL, { 0x12B1032FE1D490BCULL, 0x3B620519889A92DAULL } }, /* XSUM_XXH128_withSecret_testdata[493] */\n    {  494, 0x0000000000000000ULL, { 0x496205F656F46869ULL, 0x362D49A348230AAAULL } }, /* XSUM_XXH128_withSecret_testdata[494] */\n    {  495, 0x0000000000000000ULL, { 0xA6BEDED188B0D541ULL, 0xC0AE51966CF007E1ULL } }, /* XSUM_XXH128_withSecret_testdata[495] */\n    {  496, 0x0000000000000000ULL, { 0xB6C8E95F9ED250E1ULL, 0x39DC1A6C20BD7665ULL } }, /* XSUM_XXH128_withSecret_testdata[496] */\n    {  497, 0x0000000000000000ULL, { 0x0DAF283FCCE83BA0ULL, 0x66C37CDFDB62E369ULL } }, /* XSUM_XXH128_withSecret_testdata[497] */\n    {  498, 0x0000000000000000ULL, { 0xC9C8BB888444FCDCULL, 0x99244D6A9497DA7AULL } }, /* XSUM_XXH128_withSecret_testdata[498] */\n    {  499, 0x0000000000000000ULL, { 0xB09E0768B25AF325ULL, 0xCF1800089A692B70ULL } }, /* XSUM_XXH128_withSecret_testdata[499] */\n    {  500, 0x0000000000000000ULL, { 0x1E33D40CD0295252ULL, 0xC8CE4860BB964C63ULL } }, /* XSUM_XXH128_withSecret_testdata[500] */\n    {  501, 0x0000000000000000ULL, { 0xBBC2DDD4CDFB1D8FULL, 0x0C4D54549FB83FFFULL } }, /* XSUM_XXH128_withSecret_testdata[501] */\n    {  502, 0x0000000000000000ULL, { 0x390B3C654F27BA9BULL, 0x0F25C62428555E95ULL } }, /* XSUM_XXH128_withSecret_testdata[502] */\n    {  503, 0x0000000000000000ULL, { 0x5B4E4DA2D546AF16ULL, 0x561839E2D89EF402ULL } }, /* XSUM_XXH128_withSecret_testdata[503] */\n    {  504, 0x0000000000000000ULL, { 0x6188E7B007CB5BBEULL, 0xD9A752A5D2854A06ULL } }, /* XSUM_XXH128_withSecret_testdata[504] */\n    {  505, 0x0000000000000000ULL, { 0x66136B194844318CULL, 0x00DC46C25DE557EEULL } }, /* XSUM_XXH128_withSecret_testdata[505] */\n    {  506, 0x0000000000000000ULL, { 0x6AE4F042EFE78B47ULL, 0xE45E492998EF6966ULL } }, /* XSUM_XXH128_withSecret_testdata[506] */\n    {  507, 0x0000000000000000ULL, { 0x9A0086AF00460BE4ULL, 0xB1945C1EC28C1113ULL } }, /* XSUM_XXH128_withSecret_testdata[507] */\n    {  508, 0x0000000000000000ULL, { 0x7C6304A187315EB8ULL, 0x365A93BB18C61668ULL } }, /* XSUM_XXH128_withSecret_testdata[508] */\n    {  509, 0x0000000000000000ULL, { 0x7F6C42510D7ACD65ULL, 0xE97C15187B4ADDA6ULL } }, /* XSUM_XXH128_withSecret_testdata[509] */\n    {  510, 0x0000000000000000ULL, { 0x1BE1981EA82F7194ULL, 0xAE158DD4A911AD3DULL } }, /* XSUM_XXH128_withSecret_testdata[510] */\n    {  511, 0x0000000000000000ULL, { 0x13E7046BC1C1F16AULL, 0x86764F81BB226A35ULL } }, /* XSUM_XXH128_withSecret_testdata[511] */\n    {  512, 0x0000000000000000ULL, { 0x7564693DD526E28DULL, 0x918C0F2C7656AB6DULL } }, /* XSUM_XXH128_withSecret_testdata[512] */\n    {  513, 0x0000000000000000ULL, { 0x90ECD952A5E1DB2AULL, 0x4FB7B816335F2927ULL } }, /* XSUM_XXH128_withSecret_testdata[513] */\n    {  514, 0x0000000000000000ULL, { 0x1AA64FBAC9FDA462ULL, 0x3DBC9221575DDA22ULL } }, /* XSUM_XXH128_withSecret_testdata[514] */\n    {  515, 0x0000000000000000ULL, { 0x6FCBB3CD2F992BA2ULL, 0xB809D5EB9E204645ULL } }, /* XSUM_XXH128_withSecret_testdata[515] */\n    {  516, 0x0000000000000000ULL, { 0x91D589A1CC429931ULL, 0xD76EA8ADA4BCEE9DULL } }, /* XSUM_XXH128_withSecret_testdata[516] */\n    {  517, 0x0000000000000000ULL, { 0x250BA0C99E63EB69ULL, 0xD900F07E83743271ULL } }, /* XSUM_XXH128_withSecret_testdata[517] */\n    {  518, 0x0000000000000000ULL, { 0xB5806B40F35EBA8FULL, 0xDD307FAE0AB62248ULL } }, /* XSUM_XXH128_withSecret_testdata[518] */\n    {  519, 0x0000000000000000ULL, { 0x5E60CDD342A90D11ULL, 0x663AEB1A46163A0DULL } }, /* XSUM_XXH128_withSecret_testdata[519] */\n    {  520, 0x0000000000000000ULL, { 0xB7E74BEB49229E4AULL, 0xFE76F40069CACF7DULL } }, /* XSUM_XXH128_withSecret_testdata[520] */\n    {  521, 0x0000000000000000ULL, { 0x99BF1AD8A3848DCEULL, 0xF1DD04822D6ABE23ULL } }, /* XSUM_XXH128_withSecret_testdata[521] */\n    {  522, 0x0000000000000000ULL, { 0xE829587F4E69AEF4ULL, 0x5DCE037273B313D9ULL } }, /* XSUM_XXH128_withSecret_testdata[522] */\n    {  523, 0x0000000000000000ULL, { 0xB7FCF1AE6B935506ULL, 0xF057CE94A181620AULL } }, /* XSUM_XXH128_withSecret_testdata[523] */\n    {  524, 0x0000000000000000ULL, { 0x0EBEE873C033D02BULL, 0x1347075F70E66618ULL } }, /* XSUM_XXH128_withSecret_testdata[524] */\n    {  525, 0x0000000000000000ULL, { 0xD30F10C56CB2BA6CULL, 0x68E2CC33CE0AC155ULL } }, /* XSUM_XXH128_withSecret_testdata[525] */\n    {  526, 0x0000000000000000ULL, { 0x3231AF77DE6BF16BULL, 0x38ECF46F1D9E62FCULL } }, /* XSUM_XXH128_withSecret_testdata[526] */\n    {  527, 0x0000000000000000ULL, { 0x4DF21324B4C9D980ULL, 0x257EAA888F18499AULL } }, /* XSUM_XXH128_withSecret_testdata[527] */\n    {  528, 0x0000000000000000ULL, { 0x116D8F2EEC17F844ULL, 0xACA5335C73C8D9A4ULL } }, /* XSUM_XXH128_withSecret_testdata[528] */\n    {  529, 0x0000000000000000ULL, { 0x7A520D146D8EACC4ULL, 0x2DCAFE475591F498ULL } }, /* XSUM_XXH128_withSecret_testdata[529] */\n    {  530, 0x0000000000000000ULL, { 0xCEF7415A2376AFF8ULL, 0xDE6F55CA5B4AB5A4ULL } }, /* XSUM_XXH128_withSecret_testdata[530] */\n    {  531, 0x0000000000000000ULL, { 0x593BEC9404885FE6ULL, 0xE983DD57660D0AB5ULL } }, /* XSUM_XXH128_withSecret_testdata[531] */\n    {  532, 0x0000000000000000ULL, { 0x3678DAE654D1BA14ULL, 0x1F37AC7260FC01F8ULL } }, /* XSUM_XXH128_withSecret_testdata[532] */\n    {  533, 0x0000000000000000ULL, { 0xBC46CAD7E4A3A91DULL, 0xB7987D61006CC653ULL } }, /* XSUM_XXH128_withSecret_testdata[533] */\n    {  534, 0x0000000000000000ULL, { 0x22AAE7BE6E3CE69CULL, 0xB76CF2417554CC76ULL } }, /* XSUM_XXH128_withSecret_testdata[534] */\n    {  535, 0x0000000000000000ULL, { 0xAFD83E6D60A03601ULL, 0x302017DCD9D0C7FEULL } }, /* XSUM_XXH128_withSecret_testdata[535] */\n    {  536, 0x0000000000000000ULL, { 0x4FEC4ECD4DF997D8ULL, 0xEAF13E6E6BC84633ULL } }, /* XSUM_XXH128_withSecret_testdata[536] */\n    {  537, 0x0000000000000000ULL, { 0x7C678DC167B9FB60ULL, 0x2FE332C55EEE4CD2ULL } }, /* XSUM_XXH128_withSecret_testdata[537] */\n    {  538, 0x0000000000000000ULL, { 0xC878F611DE29F652ULL, 0x391C09079DFFD0F7ULL } }, /* XSUM_XXH128_withSecret_testdata[538] */\n    {  539, 0x0000000000000000ULL, { 0x6A1CD0BE28964327ULL, 0x3F53F7A3049EA2D9ULL } }, /* XSUM_XXH128_withSecret_testdata[539] */\n    {  540, 0x0000000000000000ULL, { 0x8FCA7332782D66CFULL, 0x4C63B3FC6E0B933AULL } }, /* XSUM_XXH128_withSecret_testdata[540] */\n    {  541, 0x0000000000000000ULL, { 0xB8480536E3E32AE0ULL, 0x1B4F6248A4740E01ULL } }, /* XSUM_XXH128_withSecret_testdata[541] */\n    {  542, 0x0000000000000000ULL, { 0x94AC4ABBB2A84A0CULL, 0x6122451DA4DD6766ULL } }, /* XSUM_XXH128_withSecret_testdata[542] */\n    {  543, 0x0000000000000000ULL, { 0x90517D8900279F68ULL, 0x31BE901379790427ULL } }, /* XSUM_XXH128_withSecret_testdata[543] */\n    {  544, 0x0000000000000000ULL, { 0x246A6757E15C8B12ULL, 0x4AA67BC4C985E345ULL } }, /* XSUM_XXH128_withSecret_testdata[544] */\n    {  545, 0x0000000000000000ULL, { 0x6C03DFBB0752B899ULL, 0xDDA891328B5494A2ULL } }, /* XSUM_XXH128_withSecret_testdata[545] */\n    {  546, 0x0000000000000000ULL, { 0xABA2842DEAFF612FULL, 0x9C88E2CB891ADFF8ULL } }, /* XSUM_XXH128_withSecret_testdata[546] */\n    {  547, 0x0000000000000000ULL, { 0xBAB39E5A45FFC560ULL, 0x8348D5454F6BA250ULL } }, /* XSUM_XXH128_withSecret_testdata[547] */\n    {  548, 0x0000000000000000ULL, { 0x38D42B0D8EF776F7ULL, 0x011BCBD9C11A772DULL } }, /* XSUM_XXH128_withSecret_testdata[548] */\n    {  549, 0x0000000000000000ULL, { 0x0D9B4FA58442EFDBULL, 0xA7C37D836B1AE3E8ULL } }, /* XSUM_XXH128_withSecret_testdata[549] */\n    {  550, 0x0000000000000000ULL, { 0x42CB75A41891135DULL, 0x6213F66A356AC328ULL } }, /* XSUM_XXH128_withSecret_testdata[550] */\n    {  551, 0x0000000000000000ULL, { 0xE192FF04B2BEB969ULL, 0xC1534F974360FAA0ULL } }, /* XSUM_XXH128_withSecret_testdata[551] */\n    {  552, 0x0000000000000000ULL, { 0xDD39E20665BF4C76ULL, 0xE45A791AB0719752ULL } }, /* XSUM_XXH128_withSecret_testdata[552] */\n    {  553, 0x0000000000000000ULL, { 0x2A33A053BDE45941ULL, 0xAC27AC849766E0E1ULL } }, /* XSUM_XXH128_withSecret_testdata[553] */\n    {  554, 0x0000000000000000ULL, { 0x0FF51ED801CA9663ULL, 0x7054516C7B426F34ULL } }, /* XSUM_XXH128_withSecret_testdata[554] */\n    {  555, 0x0000000000000000ULL, { 0x8EF39E398852DE24ULL, 0x23C45AC283099EECULL } }, /* XSUM_XXH128_withSecret_testdata[555] */\n    {  556, 0x0000000000000000ULL, { 0x27F33BB18BBCAA58ULL, 0x26539F6EBDE5AF07ULL } }, /* XSUM_XXH128_withSecret_testdata[556] */\n    {  557, 0x0000000000000000ULL, { 0x1D8EA93FD71B3AA6ULL, 0xB82CCCE35F73D63BULL } }, /* XSUM_XXH128_withSecret_testdata[557] */\n    {  558, 0x0000000000000000ULL, { 0x1756B0AEB6138559ULL, 0x923A50F24B3DB92DULL } }, /* XSUM_XXH128_withSecret_testdata[558] */\n    {  559, 0x0000000000000000ULL, { 0x28C2ECC7A2F13035ULL, 0x7C7C0D355872C574ULL } }, /* XSUM_XXH128_withSecret_testdata[559] */\n    {  560, 0x0000000000000000ULL, { 0x4D1629FBA22FF016ULL, 0x66AA3520AA869C8AULL } }, /* XSUM_XXH128_withSecret_testdata[560] */\n    {  561, 0x0000000000000000ULL, { 0xF7637F2CF266B6B0ULL, 0xB0EAF3555CA04AD0ULL } }, /* XSUM_XXH128_withSecret_testdata[561] */\n    {  562, 0x0000000000000000ULL, { 0xAB32B43837B334B0ULL, 0x9FB1D8ECD7F98AFBULL } }, /* XSUM_XXH128_withSecret_testdata[562] */\n    {  563, 0x0000000000000000ULL, { 0xBBBD33C2D61F089CULL, 0x7D3D0FD9C1942798ULL } }, /* XSUM_XXH128_withSecret_testdata[563] */\n    {  564, 0x0000000000000000ULL, { 0xBFF15485EE081A17ULL, 0x852904792588EA7DULL } }, /* XSUM_XXH128_withSecret_testdata[564] */\n    {  565, 0x0000000000000000ULL, { 0x809C50B82ABABF38ULL, 0x77B38633ACC74C63ULL } }, /* XSUM_XXH128_withSecret_testdata[565] */\n    {  566, 0x0000000000000000ULL, { 0xE61690E5F2BD778EULL, 0xB7B504C3DCD5C133ULL } }, /* XSUM_XXH128_withSecret_testdata[566] */\n    {  567, 0x0000000000000000ULL, { 0xEA3888F2AAE96689ULL, 0x5F49C0ABA1FE11F1ULL } }, /* XSUM_XXH128_withSecret_testdata[567] */\n    {  568, 0x0000000000000000ULL, { 0xCB4333286A2517EAULL, 0x5903B3AFD6A7990AULL } }, /* XSUM_XXH128_withSecret_testdata[568] */\n    {  569, 0x0000000000000000ULL, { 0xB0E94197F3C32AA4ULL, 0xC97111ED65B8B86BULL } }, /* XSUM_XXH128_withSecret_testdata[569] */\n    {  570, 0x0000000000000000ULL, { 0xF0D81738946F5CE0ULL, 0xCC0AAFFAEA71FC57ULL } }, /* XSUM_XXH128_withSecret_testdata[570] */\n    {  571, 0x0000000000000000ULL, { 0x1A9D7CF2D42FFEEAULL, 0x93EFC93EDC00AE08ULL } }, /* XSUM_XXH128_withSecret_testdata[571] */\n    {  572, 0x0000000000000000ULL, { 0x26BB4CAFF1C913F2ULL, 0x7D14F980838057ECULL } }, /* XSUM_XXH128_withSecret_testdata[572] */\n    {  573, 0x0000000000000000ULL, { 0xD5B00D056E5E1CD8ULL, 0xA76B753289434DD3ULL } }, /* XSUM_XXH128_withSecret_testdata[573] */\n    {  574, 0x0000000000000000ULL, { 0x7DC4689B61EA61E5ULL, 0xD69303AFA05EB306ULL } }, /* XSUM_XXH128_withSecret_testdata[574] */\n    {  575, 0x0000000000000000ULL, { 0x467D25957A0F8C8FULL, 0x26CAB2D12F605AA9ULL } }, /* XSUM_XXH128_withSecret_testdata[575] */\n    {  576, 0x0000000000000000ULL, { 0xFE07E9C6C4A371CAULL, 0x9A517CEA778FE047ULL } }, /* XSUM_XXH128_withSecret_testdata[576] */\n    {  577, 0x0000000000000000ULL, { 0x84087F00F175E5DBULL, 0xBC591BEF324EC35AULL } }, /* XSUM_XXH128_withSecret_testdata[577] */\n    {  578, 0x0000000000000000ULL, { 0x1BC927804009B88FULL, 0x48D89ED0A4E72273ULL } }, /* XSUM_XXH128_withSecret_testdata[578] */\n    {  579, 0x0000000000000000ULL, { 0x55BBF74F3DE64961ULL, 0xF3AFD5119FB9893FULL } }, /* XSUM_XXH128_withSecret_testdata[579] */\n    {  580, 0x0000000000000000ULL, { 0x7845B62245EAC6C9ULL, 0xA982A0D95D504405ULL } }, /* XSUM_XXH128_withSecret_testdata[580] */\n    {  581, 0x0000000000000000ULL, { 0x20D4D64D55285E23ULL, 0x293A2FD034245DBFULL } }, /* XSUM_XXH128_withSecret_testdata[581] */\n    {  582, 0x0000000000000000ULL, { 0x06549657D84B48F0ULL, 0x2B1960D7F17CC456ULL } }, /* XSUM_XXH128_withSecret_testdata[582] */\n    {  583, 0x0000000000000000ULL, { 0x66A6764AB8F52C8CULL, 0xD26A5C1F7F18A018ULL } }, /* XSUM_XXH128_withSecret_testdata[583] */\n    {  584, 0x0000000000000000ULL, { 0x1DB3C57AE2A569F2ULL, 0x79FB805AA1D320B3ULL } }, /* XSUM_XXH128_withSecret_testdata[584] */\n    {  585, 0x0000000000000000ULL, { 0xFDC545403F1736A2ULL, 0xDDCE1B2BF90A9361ULL } }, /* XSUM_XXH128_withSecret_testdata[585] */\n    {  586, 0x0000000000000000ULL, { 0xB92C4D8DFF25AA4BULL, 0xCDD8389EFF976CA1ULL } }, /* XSUM_XXH128_withSecret_testdata[586] */\n    {  587, 0x0000000000000000ULL, { 0x0EE24667615AAE8AULL, 0x7EC45187E08B25E2ULL } }, /* XSUM_XXH128_withSecret_testdata[587] */\n    {  588, 0x0000000000000000ULL, { 0x163CFA2B101E3E2EULL, 0x80A297834328E7A7ULL } }, /* XSUM_XXH128_withSecret_testdata[588] */\n    {  589, 0x0000000000000000ULL, { 0xD95A3ADA05D46BD8ULL, 0x1FDDA7A1C0B7370CULL } }, /* XSUM_XXH128_withSecret_testdata[589] */\n    {  590, 0x0000000000000000ULL, { 0xC50602315F6DCAC4ULL, 0x120822B91CC8029AULL } }, /* XSUM_XXH128_withSecret_testdata[590] */\n    {  591, 0x0000000000000000ULL, { 0xD797827DFC7270E5ULL, 0x89BCBB5295C0F7F5ULL } }, /* XSUM_XXH128_withSecret_testdata[591] */\n    {  592, 0x0000000000000000ULL, { 0x39DF2CFEF1965140ULL, 0xAB2315DDD7B141D1ULL } }, /* XSUM_XXH128_withSecret_testdata[592] */\n    {  593, 0x0000000000000000ULL, { 0x27A57312A8BF08AAULL, 0xC9873810954BD68DULL } }, /* XSUM_XXH128_withSecret_testdata[593] */\n    {  594, 0x0000000000000000ULL, { 0x49884742F7161A91ULL, 0x9780D680D983B950ULL } }, /* XSUM_XXH128_withSecret_testdata[594] */\n    {  595, 0x0000000000000000ULL, { 0x703F1C859BA43E85ULL, 0x656C86D4B58D6AEBULL } }, /* XSUM_XXH128_withSecret_testdata[595] */\n    {  596, 0x0000000000000000ULL, { 0xC99F5919077F1602ULL, 0xAF6F393C875C1543ULL } }, /* XSUM_XXH128_withSecret_testdata[596] */\n    {  597, 0x0000000000000000ULL, { 0x3EBFE1A698C87150ULL, 0x52F2CA0850FE62DCULL } }, /* XSUM_XXH128_withSecret_testdata[597] */\n    {  598, 0x0000000000000000ULL, { 0xF52114FB53B42FA0ULL, 0x771230289FBA571EULL } }, /* XSUM_XXH128_withSecret_testdata[598] */\n    {  599, 0x0000000000000000ULL, { 0xF880FF0AA16AD7E5ULL, 0xFB702AECF4F4ED60ULL } }, /* XSUM_XXH128_withSecret_testdata[599] */\n    {  600, 0x0000000000000000ULL, { 0x310F1CB6A2BD239FULL, 0x2C4B1CE3CDAAB492ULL } }, /* XSUM_XXH128_withSecret_testdata[600] */\n    {  601, 0x0000000000000000ULL, { 0x3DDB0C6513545BBDULL, 0xD1686FA63CAB4340ULL } }, /* XSUM_XXH128_withSecret_testdata[601] */\n    {  602, 0x0000000000000000ULL, { 0xC5CD92FCB501617AULL, 0x0FE8392F051B215DULL } }, /* XSUM_XXH128_withSecret_testdata[602] */\n    {  603, 0x0000000000000000ULL, { 0xB6B4FFBB69CBC605ULL, 0x7F5E93324BBD45E1ULL } }, /* XSUM_XXH128_withSecret_testdata[603] */\n    {  604, 0x0000000000000000ULL, { 0x7A6DAFA8F51949B1ULL, 0x526FE442D61C316AULL } }, /* XSUM_XXH128_withSecret_testdata[604] */\n    {  605, 0x0000000000000000ULL, { 0x718A65EED805BF72ULL, 0x51F2352FD1E0144EULL } }, /* XSUM_XXH128_withSecret_testdata[605] */\n    {  606, 0x0000000000000000ULL, { 0xFE312FFC698A2E0CULL, 0x60A168B25AA043CFULL } }, /* XSUM_XXH128_withSecret_testdata[606] */\n    {  607, 0x0000000000000000ULL, { 0x78E791990076D6B8ULL, 0x65E0EE94BF6C0E72ULL } }, /* XSUM_XXH128_withSecret_testdata[607] */\n    {  608, 0x0000000000000000ULL, { 0x4740522E691209B0ULL, 0x73997F75372E3D50ULL } }, /* XSUM_XXH128_withSecret_testdata[608] */\n    {  609, 0x0000000000000000ULL, { 0xF81A17580E4F9F64ULL, 0xB2BD11E56FC18C93ULL } }, /* XSUM_XXH128_withSecret_testdata[609] */\n    {  610, 0x0000000000000000ULL, { 0x231C26FD3126B62FULL, 0x8C25E2306D0E8562ULL } }, /* XSUM_XXH128_withSecret_testdata[610] */\n    {  611, 0x0000000000000000ULL, { 0x527D43263D1CB17DULL, 0x26C7014669C5B788ULL } }, /* XSUM_XXH128_withSecret_testdata[611] */\n    {  612, 0x0000000000000000ULL, { 0x1F2B5E82293DF3DAULL, 0x75E388BFB7801C58ULL } }, /* XSUM_XXH128_withSecret_testdata[612] */\n    {  613, 0x0000000000000000ULL, { 0xECCD21F291D58491ULL, 0x7CAA9671CCF9E359ULL } }, /* XSUM_XXH128_withSecret_testdata[613] */\n    {  614, 0x0000000000000000ULL, { 0xDB58F6F0463116ABULL, 0x3814F0A1C6671655ULL } }, /* XSUM_XXH128_withSecret_testdata[614] */\n    {  615, 0x0000000000000000ULL, { 0x7CCD180281A935DBULL, 0x1292E8ED0EB7C449ULL } }, /* XSUM_XXH128_withSecret_testdata[615] */\n    {  616, 0x0000000000000000ULL, { 0xFE1BB71A72BD3FC0ULL, 0xB69B6466F9F5A485ULL } }, /* XSUM_XXH128_withSecret_testdata[616] */\n    {  617, 0x0000000000000000ULL, { 0xD8E4682F83685AC6ULL, 0x3D0D12D74321B502ULL } }, /* XSUM_XXH128_withSecret_testdata[617] */\n    {  618, 0x0000000000000000ULL, { 0x2A097BE4ACF1CB3DULL, 0xEDD47AAC6EA1FC49ULL } }, /* XSUM_XXH128_withSecret_testdata[618] */\n    {  619, 0x0000000000000000ULL, { 0x4BB0559191CD6694ULL, 0xC012575F69B63F18ULL } }, /* XSUM_XXH128_withSecret_testdata[619] */\n    {  620, 0x0000000000000000ULL, { 0x6AEEF8D74CB794ABULL, 0xD718245C24C3FF07ULL } }, /* XSUM_XXH128_withSecret_testdata[620] */\n    {  621, 0x0000000000000000ULL, { 0x44D4F1955B2B77ABULL, 0xDB55993A8B0C20F3ULL } }, /* XSUM_XXH128_withSecret_testdata[621] */\n    {  622, 0x0000000000000000ULL, { 0x19DB5915F3827B4EULL, 0x511F08FEF7FDACB8ULL } }, /* XSUM_XXH128_withSecret_testdata[622] */\n    {  623, 0x0000000000000000ULL, { 0x14D765413927C1F7ULL, 0x0E5D8FE89AC69269ULL } }, /* XSUM_XXH128_withSecret_testdata[623] */\n    {  624, 0x0000000000000000ULL, { 0xE9A2D756CD39BD67ULL, 0xB98614B230E7A983ULL } }, /* XSUM_XXH128_withSecret_testdata[624] */\n    {  625, 0x0000000000000000ULL, { 0xCE1568B11F19346EULL, 0x18CB79560E9B9FE9ULL } }, /* XSUM_XXH128_withSecret_testdata[625] */\n    {  626, 0x0000000000000000ULL, { 0xEC3E07F1679E7153ULL, 0x938EF1F405619C4BULL } }, /* XSUM_XXH128_withSecret_testdata[626] */\n    {  627, 0x0000000000000000ULL, { 0xC1BBAB36A97BA650ULL, 0x6D41670F610BC909ULL } }, /* XSUM_XXH128_withSecret_testdata[627] */\n    {  628, 0x0000000000000000ULL, { 0xF40C6B258C2D2F59ULL, 0x0EF2986F6278D1AAULL } }, /* XSUM_XXH128_withSecret_testdata[628] */\n    {  629, 0x0000000000000000ULL, { 0x3ECEAFDE6185BC06ULL, 0xD1397DD405194BBBULL } }, /* XSUM_XXH128_withSecret_testdata[629] */\n    {  630, 0x0000000000000000ULL, { 0x2F7B8EB209344D00ULL, 0x17A1C198E9E2D61AULL } }, /* XSUM_XXH128_withSecret_testdata[630] */\n    {  631, 0x0000000000000000ULL, { 0x7EB108637364B0B0ULL, 0xBBB39E672D673272ULL } }, /* XSUM_XXH128_withSecret_testdata[631] */\n    {  632, 0x0000000000000000ULL, { 0x3F360E7FFE69F06CULL, 0xBE8CBD79680AEC2FULL } }, /* XSUM_XXH128_withSecret_testdata[632] */\n    {  633, 0x0000000000000000ULL, { 0x1BDEB7800D9CF0BBULL, 0x103CFCED0E20282DULL } }, /* XSUM_XXH128_withSecret_testdata[633] */\n    {  634, 0x0000000000000000ULL, { 0x97E39550F9F0AA25ULL, 0x21262607525F012BULL } }, /* XSUM_XXH128_withSecret_testdata[634] */\n    {  635, 0x0000000000000000ULL, { 0x5D773AA3022107D0ULL, 0xA5BE1731B007553AULL } }, /* XSUM_XXH128_withSecret_testdata[635] */\n    {  636, 0x0000000000000000ULL, { 0x7B3EBE0204A998D2ULL, 0x0C93DD3C24F66057ULL } }, /* XSUM_XXH128_withSecret_testdata[636] */\n    {  637, 0x0000000000000000ULL, { 0x04BAA36E1EAEE3BFULL, 0x8F813BC156CC6402ULL } }, /* XSUM_XXH128_withSecret_testdata[637] */\n    {  638, 0x0000000000000000ULL, { 0x64BBFD74C721AAA3ULL, 0x08A02241AB7F35DDULL } }, /* XSUM_XXH128_withSecret_testdata[638] */\n    {  639, 0x0000000000000000ULL, { 0x88C492DA2815EFDDULL, 0xA3842D308D8D7D0BULL } }, /* XSUM_XXH128_withSecret_testdata[639] */\n    {  640, 0x0000000000000000ULL, { 0x46679B44DB4DC036ULL, 0xCE1ED41638BEA10AULL } }, /* XSUM_XXH128_withSecret_testdata[640] */\n    {  641, 0x0000000000000000ULL, { 0xC0F26241C55DB4E6ULL, 0x0E346F74E20D7F95ULL } }, /* XSUM_XXH128_withSecret_testdata[641] */\n    {  642, 0x0000000000000000ULL, { 0x1B68CECD4E15423CULL, 0xEC0E8B153916E257ULL } }, /* XSUM_XXH128_withSecret_testdata[642] */\n    {  643, 0x0000000000000000ULL, { 0x933C50D80ED75373ULL, 0x44A3763CF46997C5ULL } }, /* XSUM_XXH128_withSecret_testdata[643] */\n    {  644, 0x0000000000000000ULL, { 0xCCCFB912FB0F29AAULL, 0x72BD068FF4123DECULL } }, /* XSUM_XXH128_withSecret_testdata[644] */\n    {  645, 0x0000000000000000ULL, { 0xCC48BA3862246859ULL, 0x066450E7AA097D45ULL } }, /* XSUM_XXH128_withSecret_testdata[645] */\n    {  646, 0x0000000000000000ULL, { 0x32FDBEADE5A50042ULL, 0xFC032E26FC17283AULL } }, /* XSUM_XXH128_withSecret_testdata[646] */\n    {  647, 0x0000000000000000ULL, { 0x489E5E8E2F383746ULL, 0x5ABEE281806D6E3DULL } }, /* XSUM_XXH128_withSecret_testdata[647] */\n    {  648, 0x0000000000000000ULL, { 0xE344D9ABFE602B22ULL, 0x3C23132601095F1DULL } }, /* XSUM_XXH128_withSecret_testdata[648] */\n    {  649, 0x0000000000000000ULL, { 0x21531EF875D4FA29ULL, 0xDF52C259A1E7B570ULL } }, /* XSUM_XXH128_withSecret_testdata[649] */\n    {  650, 0x0000000000000000ULL, { 0x3B59069D9A2B8135ULL, 0xAFE97D16FA562452ULL } }, /* XSUM_XXH128_withSecret_testdata[650] */\n    {  651, 0x0000000000000000ULL, { 0x78AB22FE4F0FBF0FULL, 0xF65DA152A9036A43ULL } }, /* XSUM_XXH128_withSecret_testdata[651] */\n    {  652, 0x0000000000000000ULL, { 0xACB8C5400199B242ULL, 0x056D98709E4B6081ULL } }, /* XSUM_XXH128_withSecret_testdata[652] */\n    {  653, 0x0000000000000000ULL, { 0x71919508938CA38DULL, 0x4E4EE7899CACBF19ULL } }, /* XSUM_XXH128_withSecret_testdata[653] */\n    {  654, 0x0000000000000000ULL, { 0x7633B021B9E6BCCCULL, 0x7596482A5ABD975DULL } }, /* XSUM_XXH128_withSecret_testdata[654] */\n    {  655, 0x0000000000000000ULL, { 0xD087E689A0489715ULL, 0x3A25DC4460D439AEULL } }, /* XSUM_XXH128_withSecret_testdata[655] */\n    {  656, 0x0000000000000000ULL, { 0x0B76872649A7A181ULL, 0x7AEBD309A8FFA826ULL } }, /* XSUM_XXH128_withSecret_testdata[656] */\n    {  657, 0x0000000000000000ULL, { 0x960389D3025ED64FULL, 0x40CAF15CC4D2BAC4ULL } }, /* XSUM_XXH128_withSecret_testdata[657] */\n    {  658, 0x0000000000000000ULL, { 0x5EFB5D57310F3290ULL, 0x18508B247DFE11BBULL } }, /* XSUM_XXH128_withSecret_testdata[658] */\n    {  659, 0x0000000000000000ULL, { 0x4635C245BCC082F8ULL, 0x20196AD5FCD0A681ULL } }, /* XSUM_XXH128_withSecret_testdata[659] */\n    {  660, 0x0000000000000000ULL, { 0x1A44D63C80336D7CULL, 0x9780F27FBC5A5321ULL } }, /* XSUM_XXH128_withSecret_testdata[660] */\n    {  661, 0x0000000000000000ULL, { 0x4051FBAFDC0A9EE7ULL, 0x10C1B692E047420CULL } }, /* XSUM_XXH128_withSecret_testdata[661] */\n    {  662, 0x0000000000000000ULL, { 0xEE1DC1BED1BBF340ULL, 0x2D1354A63D7563ACULL } }, /* XSUM_XXH128_withSecret_testdata[662] */\n    {  663, 0x0000000000000000ULL, { 0x567732FFF10E10DDULL, 0x279CECE8ED7D94FFULL } }, /* XSUM_XXH128_withSecret_testdata[663] */\n    {  664, 0x0000000000000000ULL, { 0xCA0D4F910158778CULL, 0x367D441791393114ULL } }, /* XSUM_XXH128_withSecret_testdata[664] */\n    {  665, 0x0000000000000000ULL, { 0x8CB80A374551419CULL, 0x62C3E725A3451528ULL } }, /* XSUM_XXH128_withSecret_testdata[665] */\n    {  666, 0x0000000000000000ULL, { 0x2EA34B279531E9A6ULL, 0x4EBE6C2B687E3A7DULL } }, /* XSUM_XXH128_withSecret_testdata[666] */\n    {  667, 0x0000000000000000ULL, { 0xFC3478CF609E74BFULL, 0xC04F9A61558C953DULL } }, /* XSUM_XXH128_withSecret_testdata[667] */\n    {  668, 0x0000000000000000ULL, { 0xF89675F751403E46ULL, 0x458AB6C65E3E1002ULL } }, /* XSUM_XXH128_withSecret_testdata[668] */\n    {  669, 0x0000000000000000ULL, { 0x002903C1251E2536ULL, 0x4B9636A24D3D8276ULL } }, /* XSUM_XXH128_withSecret_testdata[669] */\n    {  670, 0x0000000000000000ULL, { 0x48645513501B1AF2ULL, 0xFB941BBA9F1CA76DULL } }, /* XSUM_XXH128_withSecret_testdata[670] */\n    {  671, 0x0000000000000000ULL, { 0x14B899EF06C56DCEULL, 0x4951E89CE78A5579ULL } }, /* XSUM_XXH128_withSecret_testdata[671] */\n    {  672, 0x0000000000000000ULL, { 0xCCC02F5A3F2338A7ULL, 0xBA80C5057EB2C510ULL } }, /* XSUM_XXH128_withSecret_testdata[672] */\n    {  673, 0x0000000000000000ULL, { 0x29F8CB8B53ACA0F7ULL, 0x195C6CE12196C9C4ULL } }, /* XSUM_XXH128_withSecret_testdata[673] */\n    {  674, 0x0000000000000000ULL, { 0xBD15D6F15EC47EA2ULL, 0xEF9109454B90408FULL } }, /* XSUM_XXH128_withSecret_testdata[674] */\n    {  675, 0x0000000000000000ULL, { 0xC89746EEF3F9AA1CULL, 0x820BA17403DBDFC9ULL } }, /* XSUM_XXH128_withSecret_testdata[675] */\n    {  676, 0x0000000000000000ULL, { 0x0C5BA69608ADCA74ULL, 0x7B04F7F12AD2CBD3ULL } }, /* XSUM_XXH128_withSecret_testdata[676] */\n    {  677, 0x0000000000000000ULL, { 0x80BD5048EDAE6489ULL, 0x8116EB272A1F43CAULL } }, /* XSUM_XXH128_withSecret_testdata[677] */\n    {  678, 0x0000000000000000ULL, { 0xAC744213B2F7172FULL, 0xBA09B48EEF9A62CCULL } }, /* XSUM_XXH128_withSecret_testdata[678] */\n    {  679, 0x0000000000000000ULL, { 0xE9B82480B309EF6EULL, 0x0614AB6BC76E1746ULL } }, /* XSUM_XXH128_withSecret_testdata[679] */\n    {  680, 0x0000000000000000ULL, { 0xF83032CF5D84B833ULL, 0x252BABF4A15E9F5DULL } }, /* XSUM_XXH128_withSecret_testdata[680] */\n    {  681, 0x0000000000000000ULL, { 0x08AB6FB3C3C8D24DULL, 0x66788BD49DDE6EB9ULL } }, /* XSUM_XXH128_withSecret_testdata[681] */\n    {  682, 0x0000000000000000ULL, { 0xF2A2C2154E58C9B4ULL, 0x4149FB5FD176D3D9ULL } }, /* XSUM_XXH128_withSecret_testdata[682] */\n    {  683, 0x0000000000000000ULL, { 0xBD8D45E6543A8F07ULL, 0xC1CD01E55C3CBEF2ULL } }, /* XSUM_XXH128_withSecret_testdata[683] */\n    {  684, 0x0000000000000000ULL, { 0x02010E1040D4A75EULL, 0x8017DC8629741F05ULL } }, /* XSUM_XXH128_withSecret_testdata[684] */\n    {  685, 0x0000000000000000ULL, { 0xD350EEA999B807F6ULL, 0xF56C6826B7BEACF4ULL } }, /* XSUM_XXH128_withSecret_testdata[685] */\n    {  686, 0x0000000000000000ULL, { 0xF2D1DF6BFA7379B5ULL, 0x7D98FC3F9FB6BDA8ULL } }, /* XSUM_XXH128_withSecret_testdata[686] */\n    {  687, 0x0000000000000000ULL, { 0xE520648ACD33CAC8ULL, 0x1743C38F880C2F70ULL } }, /* XSUM_XXH128_withSecret_testdata[687] */\n    {  688, 0x0000000000000000ULL, { 0x71BDE128795B979AULL, 0xBAB99D4D96E7F066ULL } }, /* XSUM_XXH128_withSecret_testdata[688] */\n    {  689, 0x0000000000000000ULL, { 0xF314701CB0A2B713ULL, 0x366A07E31EE285D6ULL } }, /* XSUM_XXH128_withSecret_testdata[689] */\n    {  690, 0x0000000000000000ULL, { 0x62F19C456C28BB9EULL, 0x0A9499191EC9B12BULL } }, /* XSUM_XXH128_withSecret_testdata[690] */\n    {  691, 0x0000000000000000ULL, { 0xA3517F9E43BF2893ULL, 0xF9D06E7C4C62F189ULL } }, /* XSUM_XXH128_withSecret_testdata[691] */\n    {  692, 0x0000000000000000ULL, { 0xC00D3D8ABCBB60F6ULL, 0x52EE34B1E76E5A08ULL } }, /* XSUM_XXH128_withSecret_testdata[692] */\n    {  693, 0x0000000000000000ULL, { 0x3AFA9A6198D94AACULL, 0xB939621D7082D5F3ULL } }, /* XSUM_XXH128_withSecret_testdata[693] */\n    {  694, 0x0000000000000000ULL, { 0xB2D00E56EDEA2069ULL, 0x5E8585AA8323E3C4ULL } }, /* XSUM_XXH128_withSecret_testdata[694] */\n    {  695, 0x0000000000000000ULL, { 0xC23DFF8D4D99A8EBULL, 0x6C00446348CC8924ULL } }, /* XSUM_XXH128_withSecret_testdata[695] */\n    {  696, 0x0000000000000000ULL, { 0xE07B20DB4DF65B1AULL, 0x5CECFAAA3AB4F9C7ULL } }, /* XSUM_XXH128_withSecret_testdata[696] */\n    {  697, 0x0000000000000000ULL, { 0x659A6E34580198E9ULL, 0x89988A1AD40C17D6ULL } }, /* XSUM_XXH128_withSecret_testdata[697] */\n    {  698, 0x0000000000000000ULL, { 0x33F1B0918FCA5B70ULL, 0x72F6D8120C223986ULL } }, /* XSUM_XXH128_withSecret_testdata[698] */\n    {  699, 0x0000000000000000ULL, { 0x05E35B0C5159D052ULL, 0x50C118E33D2303A7ULL } }, /* XSUM_XXH128_withSecret_testdata[699] */\n    {  700, 0x0000000000000000ULL, { 0x402EA3F681BF8779ULL, 0x7E6C69E70D48D255ULL } }, /* XSUM_XXH128_withSecret_testdata[700] */\n    {  701, 0x0000000000000000ULL, { 0x4EB4891136AE353AULL, 0xA2A27BA7C0B7B63EULL } }, /* XSUM_XXH128_withSecret_testdata[701] */\n    {  702, 0x0000000000000000ULL, { 0xD74670F74631927FULL, 0x82B2FDDE4CC35C16ULL } }, /* XSUM_XXH128_withSecret_testdata[702] */\n    {  703, 0x0000000000000000ULL, { 0x2B44C65E1573C013ULL, 0xB7516140F342A3D8ULL } }, /* XSUM_XXH128_withSecret_testdata[703] */\n    {  704, 0x0000000000000000ULL, { 0xA41AB04CE9A2579FULL, 0x82CBB3C77C8636AAULL } }, /* XSUM_XXH128_withSecret_testdata[704] */\n    {  705, 0x0000000000000000ULL, { 0x10976DA8C629A1ADULL, 0x43CDC29E8D60224FULL } }, /* XSUM_XXH128_withSecret_testdata[705] */\n    {  706, 0x0000000000000000ULL, { 0x969DEE0B318482B7ULL, 0xA81030098E6DF0D3ULL } }, /* XSUM_XXH128_withSecret_testdata[706] */\n    {  707, 0x0000000000000000ULL, { 0xBB9674583F7864EDULL, 0x1E4D17AEE864B63EULL } }, /* XSUM_XXH128_withSecret_testdata[707] */\n    {  708, 0x0000000000000000ULL, { 0x8789C8266AED0667ULL, 0xDB38FA3D205211D4ULL } }, /* XSUM_XXH128_withSecret_testdata[708] */\n    {  709, 0x0000000000000000ULL, { 0x48F472194E709005ULL, 0xCD4814659578FE76ULL } }, /* XSUM_XXH128_withSecret_testdata[709] */\n    {  710, 0x0000000000000000ULL, { 0x2D2D3E6DAF08044FULL, 0xF50A5E4F296C7FB5ULL } }, /* XSUM_XXH128_withSecret_testdata[710] */\n    {  711, 0x0000000000000000ULL, { 0xB48D7153CED1A82CULL, 0xD815A2A640871FDBULL } }, /* XSUM_XXH128_withSecret_testdata[711] */\n    {  712, 0x0000000000000000ULL, { 0x24DD7E127E91C3EBULL, 0x4BCF8420A8201991ULL } }, /* XSUM_XXH128_withSecret_testdata[712] */\n    {  713, 0x0000000000000000ULL, { 0x8A62D86D2097F56FULL, 0xA6DD688481E50DEAULL } }, /* XSUM_XXH128_withSecret_testdata[713] */\n    {  714, 0x0000000000000000ULL, { 0x5FEB5D0B5A459D5FULL, 0xA8D2831CFAF65AB4ULL } }, /* XSUM_XXH128_withSecret_testdata[714] */\n    {  715, 0x0000000000000000ULL, { 0x72DD0A1F49A494AEULL, 0x4380BDE1C0C97745ULL } }, /* XSUM_XXH128_withSecret_testdata[715] */\n    {  716, 0x0000000000000000ULL, { 0x56165D4F0AE93796ULL, 0xF260E03A38B1C0EDULL } }, /* XSUM_XXH128_withSecret_testdata[716] */\n    {  717, 0x0000000000000000ULL, { 0x32B453DC9A40536BULL, 0xC5788145256925BAULL } }, /* XSUM_XXH128_withSecret_testdata[717] */\n    {  718, 0x0000000000000000ULL, { 0xF9FF068AD17E12D4ULL, 0xF8028D6A6BFA2EE3ULL } }, /* XSUM_XXH128_withSecret_testdata[718] */\n    {  719, 0x0000000000000000ULL, { 0xD6B57914B3051F9BULL, 0xFF66A3954DC80B0FULL } }, /* XSUM_XXH128_withSecret_testdata[719] */\n    {  720, 0x0000000000000000ULL, { 0xFE283636BB19F190ULL, 0x514A5DF2A1E156FAULL } }, /* XSUM_XXH128_withSecret_testdata[720] */\n    {  721, 0x0000000000000000ULL, { 0x0B7D684B7D87A90AULL, 0xB4A701EB7EF350F6ULL } }, /* XSUM_XXH128_withSecret_testdata[721] */\n    {  722, 0x0000000000000000ULL, { 0xF033F9A6114B31DDULL, 0xDB4EB0248DB66619ULL } }, /* XSUM_XXH128_withSecret_testdata[722] */\n    {  723, 0x0000000000000000ULL, { 0x14D23747EAB0059DULL, 0x18335F2B381CC2FAULL } }, /* XSUM_XXH128_withSecret_testdata[723] */\n    {  724, 0x0000000000000000ULL, { 0x53B7F60F9A96A4E2ULL, 0x26184C62D81086C5ULL } }, /* XSUM_XXH128_withSecret_testdata[724] */\n    {  725, 0x0000000000000000ULL, { 0x2DC466F5A1DB6334ULL, 0xAC5ECD5BF7CC5770ULL } }, /* XSUM_XXH128_withSecret_testdata[725] */\n    {  726, 0x0000000000000000ULL, { 0x9F4037D5CD604912ULL, 0x34A09E036D4D564EULL } }, /* XSUM_XXH128_withSecret_testdata[726] */\n    {  727, 0x0000000000000000ULL, { 0xC6126C6BFCD9987CULL, 0x260DDB862E570F29ULL } }, /* XSUM_XXH128_withSecret_testdata[727] */\n    {  728, 0x0000000000000000ULL, { 0x70C6C6077CAB17CFULL, 0xA0700B5963AFED83ULL } }, /* XSUM_XXH128_withSecret_testdata[728] */\n    {  729, 0x0000000000000000ULL, { 0x40F31F9E3DC11283ULL, 0xEBE4F9994AF146B0ULL } }, /* XSUM_XXH128_withSecret_testdata[729] */\n    {  730, 0x0000000000000000ULL, { 0xA76292426E4D3721ULL, 0x2FAA8206DDCA99DBULL } }, /* XSUM_XXH128_withSecret_testdata[730] */\n    {  731, 0x0000000000000000ULL, { 0x9C1E2F0357FDC2ADULL, 0xCF5F3DD1955FF51CULL } }, /* XSUM_XXH128_withSecret_testdata[731] */\n    {  732, 0x0000000000000000ULL, { 0x6FCA7F5216355242ULL, 0x52FD0E05B3494903ULL } }, /* XSUM_XXH128_withSecret_testdata[732] */\n    {  733, 0x0000000000000000ULL, { 0xECE8CF23AE474819ULL, 0x08396F483D711EF2ULL } }, /* XSUM_XXH128_withSecret_testdata[733] */\n    {  734, 0x0000000000000000ULL, { 0x38D3E24C911537B9ULL, 0xBA966212A475EC3BULL } }, /* XSUM_XXH128_withSecret_testdata[734] */\n    {  735, 0x0000000000000000ULL, { 0x28B2C70FC001D1B8ULL, 0x4D855EB893C83E54ULL } }, /* XSUM_XXH128_withSecret_testdata[735] */\n    {  736, 0x0000000000000000ULL, { 0xDF81596452BB7BA0ULL, 0xBD1BDD92BDBE50E3ULL } }, /* XSUM_XXH128_withSecret_testdata[736] */\n    {  737, 0x0000000000000000ULL, { 0x99659599BFFF1C8CULL, 0x84EC5BDD05B55D1EULL } }, /* XSUM_XXH128_withSecret_testdata[737] */\n    {  738, 0x0000000000000000ULL, { 0x9BBF45234136AE76ULL, 0x41DF6A02BED5128DULL } }, /* XSUM_XXH128_withSecret_testdata[738] */\n    {  739, 0x0000000000000000ULL, { 0xDB5F6A3B2009ED23ULL, 0xF16B16D91D81ED15ULL } }, /* XSUM_XXH128_withSecret_testdata[739] */\n    {  740, 0x0000000000000000ULL, { 0xF137E2C95EAFABEEULL, 0xCE91709D93C858F3ULL } }, /* XSUM_XXH128_withSecret_testdata[740] */\n    {  741, 0x0000000000000000ULL, { 0x9EA9DCEA28C67283ULL, 0xD24F34A6797CB92DULL } }, /* XSUM_XXH128_withSecret_testdata[741] */\n    {  742, 0x0000000000000000ULL, { 0x1D614D3FCEF1BFF2ULL, 0xD8B8ACB390CC7090ULL } }, /* XSUM_XXH128_withSecret_testdata[742] */\n    {  743, 0x0000000000000000ULL, { 0x6505CDD578A13F90ULL, 0xF85FC6D862C16F94ULL } }, /* XSUM_XXH128_withSecret_testdata[743] */\n    {  744, 0x0000000000000000ULL, { 0xD9BD23E78D5FDB64ULL, 0xD31D2D90AF3D46D4ULL } }, /* XSUM_XXH128_withSecret_testdata[744] */\n    {  745, 0x0000000000000000ULL, { 0x16EB6BA76C662BD1ULL, 0x416A89FD427FDCA7ULL } }, /* XSUM_XXH128_withSecret_testdata[745] */\n    {  746, 0x0000000000000000ULL, { 0xB1B82DA246EDC970ULL, 0x6C25142705281987ULL } }, /* XSUM_XXH128_withSecret_testdata[746] */\n    {  747, 0x0000000000000000ULL, { 0xFD227BB3D813462CULL, 0x66BE3DE7AE995043ULL } }, /* XSUM_XXH128_withSecret_testdata[747] */\n    {  748, 0x0000000000000000ULL, { 0xCD8E446999810C93ULL, 0xB891331E4F18D105ULL } }, /* XSUM_XXH128_withSecret_testdata[748] */\n    {  749, 0x0000000000000000ULL, { 0x58BD25D1B692F670ULL, 0x9B536C92318BACACULL } }, /* XSUM_XXH128_withSecret_testdata[749] */\n    {  750, 0x0000000000000000ULL, { 0xE61566F9D3ABEF07ULL, 0x74BE0AD434A6DA07ULL } }, /* XSUM_XXH128_withSecret_testdata[750] */\n    {  751, 0x0000000000000000ULL, { 0x4CF9B93AE03C3DFDULL, 0xCD21C34FDD36F74EULL } }, /* XSUM_XXH128_withSecret_testdata[751] */\n    {  752, 0x0000000000000000ULL, { 0xDE22C47EDEC52203ULL, 0x0C97D7AE463CB8D4ULL } }, /* XSUM_XXH128_withSecret_testdata[752] */\n    {  753, 0x0000000000000000ULL, { 0x25D22BD3CFB1D0D1ULL, 0x595F8F37AA4E853EULL } }, /* XSUM_XXH128_withSecret_testdata[753] */\n    {  754, 0x0000000000000000ULL, { 0x8BD7853928697AC6ULL, 0xD8CF575298CC4445ULL } }, /* XSUM_XXH128_withSecret_testdata[754] */\n    {  755, 0x0000000000000000ULL, { 0x92E08C319A200940ULL, 0xAC101BD2AD03C1E7ULL } }, /* XSUM_XXH128_withSecret_testdata[755] */\n    {  756, 0x0000000000000000ULL, { 0x27AD06BDEAC44267ULL, 0xD2E439FE81C01C3CULL } }, /* XSUM_XXH128_withSecret_testdata[756] */\n    {  757, 0x0000000000000000ULL, { 0xA17D03CD9A632AE3ULL, 0x4A58519A0DD2FDE4ULL } }, /* XSUM_XXH128_withSecret_testdata[757] */\n    {  758, 0x0000000000000000ULL, { 0xF0FBB2A73E157F15ULL, 0xEA9C7D647EB5A42DULL } }, /* XSUM_XXH128_withSecret_testdata[758] */\n    {  759, 0x0000000000000000ULL, { 0xDAF9B6534BD1921EULL, 0xD0890432EAC1D257ULL } }, /* XSUM_XXH128_withSecret_testdata[759] */\n    {  760, 0x0000000000000000ULL, { 0xD4D0979DCE515AD9ULL, 0x2F6E3BD9781DB696ULL } }, /* XSUM_XXH128_withSecret_testdata[760] */\n    {  761, 0x0000000000000000ULL, { 0x0FB5BC6999532331ULL, 0x906CAC031A855AA1ULL } }, /* XSUM_XXH128_withSecret_testdata[761] */\n    {  762, 0x0000000000000000ULL, { 0xFB9F3A8FF62149B6ULL, 0xF217EC2A8401C249ULL } }, /* XSUM_XXH128_withSecret_testdata[762] */\n    {  763, 0x0000000000000000ULL, { 0xDB70A13D62BC4863ULL, 0x03EE32B0B22593ACULL } }, /* XSUM_XXH128_withSecret_testdata[763] */\n    {  764, 0x0000000000000000ULL, { 0x08E6397A0C6712D1ULL, 0xF1A43388F1009D12ULL } }, /* XSUM_XXH128_withSecret_testdata[764] */\n    {  765, 0x0000000000000000ULL, { 0x1D0DF8656A195DD3ULL, 0x11B9B905F8FB74ADULL } }, /* XSUM_XXH128_withSecret_testdata[765] */\n    {  766, 0x0000000000000000ULL, { 0xFA9F107DAB90CF8EULL, 0x25CB81DF2111F344ULL } }, /* XSUM_XXH128_withSecret_testdata[766] */\n    {  767, 0x0000000000000000ULL, { 0x35BC1AD6E243381BULL, 0x1102369B034AECF8ULL } }, /* XSUM_XXH128_withSecret_testdata[767] */\n    {  768, 0x0000000000000000ULL, { 0x07A458215F1F3BFFULL, 0x88C29C408EAECC4BULL } }, /* XSUM_XXH128_withSecret_testdata[768] */\n    {  769, 0x0000000000000000ULL, { 0xC57164A8296F20C5ULL, 0x4104B88C5B150A1EULL } }, /* XSUM_XXH128_withSecret_testdata[769] */\n    {  770, 0x0000000000000000ULL, { 0x881B664D5A8434CEULL, 0xBB9F9DD19522C0F1ULL } }, /* XSUM_XXH128_withSecret_testdata[770] */\n    {  771, 0x0000000000000000ULL, { 0xF682457611F25916ULL, 0x028F432A87E31ED9ULL } }, /* XSUM_XXH128_withSecret_testdata[771] */\n    {  772, 0x0000000000000000ULL, { 0x62972939496F3809ULL, 0x366939194BA34C6BULL } }, /* XSUM_XXH128_withSecret_testdata[772] */\n    {  773, 0x0000000000000000ULL, { 0x6EFA77B933151865ULL, 0x1584EEA583A2D3FDULL } }, /* XSUM_XXH128_withSecret_testdata[773] */\n    {  774, 0x0000000000000000ULL, { 0x4790D7FB3353945EULL, 0xE04C61D8541D5518ULL } }, /* XSUM_XXH128_withSecret_testdata[774] */\n    {  775, 0x0000000000000000ULL, { 0x2069E9A0771D6E82ULL, 0x8A9DC99F45CA491EULL } }, /* XSUM_XXH128_withSecret_testdata[775] */\n    {  776, 0x0000000000000000ULL, { 0x825AB08463AC858DULL, 0x7FA23FEC183485ADULL } }, /* XSUM_XXH128_withSecret_testdata[776] */\n    {  777, 0x0000000000000000ULL, { 0x0105B5B85B8A54F4ULL, 0x79401F4F076C1933ULL } }, /* XSUM_XXH128_withSecret_testdata[777] */\n    {  778, 0x0000000000000000ULL, { 0x29FC19B50DDDAAFFULL, 0xE1DE27BE7BC6B00FULL } }, /* XSUM_XXH128_withSecret_testdata[778] */\n    {  779, 0x0000000000000000ULL, { 0xAB7E1C73D5784D27ULL, 0x5CB1FB09E7FB3D1BULL } }, /* XSUM_XXH128_withSecret_testdata[779] */\n    {  780, 0x0000000000000000ULL, { 0xD1FC314A124B6BC8ULL, 0xADA643D1D6D585E5ULL } }, /* XSUM_XXH128_withSecret_testdata[780] */\n    {  781, 0x0000000000000000ULL, { 0x68D85A5E8387D9CEULL, 0x6056979A8F95507BULL } }, /* XSUM_XXH128_withSecret_testdata[781] */\n    {  782, 0x0000000000000000ULL, { 0x87166ECB309BA154ULL, 0xF196C07280B8CC5CULL } }, /* XSUM_XXH128_withSecret_testdata[782] */\n    {  783, 0x0000000000000000ULL, { 0xAEA1BABA0D3E45AFULL, 0x1DE1243B36059252ULL } }, /* XSUM_XXH128_withSecret_testdata[783] */\n    {  784, 0x0000000000000000ULL, { 0x8D8496E2CC45886DULL, 0x18B2C3FF319B316DULL } }, /* XSUM_XXH128_withSecret_testdata[784] */\n    {  785, 0x0000000000000000ULL, { 0x6C396D60F7A4F0A0ULL, 0xC920260D21362886ULL } }, /* XSUM_XXH128_withSecret_testdata[785] */\n    {  786, 0x0000000000000000ULL, { 0xEFFF37679BE15016ULL, 0x4565CE9980BE63EEULL } }, /* XSUM_XXH128_withSecret_testdata[786] */\n    {  787, 0x0000000000000000ULL, { 0xB7CB3C488DB2E57AULL, 0x38F4CB1BD6A39CE4ULL } }, /* XSUM_XXH128_withSecret_testdata[787] */\n    {  788, 0x0000000000000000ULL, { 0x65EC1669F2D5BAF0ULL, 0xFDAFC03603AC024FULL } }, /* XSUM_XXH128_withSecret_testdata[788] */\n    {  789, 0x0000000000000000ULL, { 0xABE83EBA7E7F7F70ULL, 0x5E4C737655B81981ULL } }, /* XSUM_XXH128_withSecret_testdata[789] */\n    {  790, 0x0000000000000000ULL, { 0x31E138509E94325AULL, 0x1CE4FEE4D52E25F1ULL } }, /* XSUM_XXH128_withSecret_testdata[790] */\n    {  791, 0x0000000000000000ULL, { 0x9318AC0BEEBCEECDULL, 0x3B940F58139AACCDULL } }, /* XSUM_XXH128_withSecret_testdata[791] */\n    {  792, 0x0000000000000000ULL, { 0x9D31670328859E39ULL, 0xF0006EA4519D2DFAULL } }, /* XSUM_XXH128_withSecret_testdata[792] */\n    {  793, 0x0000000000000000ULL, { 0x53F9B2069E2AE9BEULL, 0x7950B01F423E2F93ULL } }, /* XSUM_XXH128_withSecret_testdata[793] */\n    {  794, 0x0000000000000000ULL, { 0x20A05E04DDFD2C43ULL, 0xA947619DB46FE218ULL } }, /* XSUM_XXH128_withSecret_testdata[794] */\n    {  795, 0x0000000000000000ULL, { 0xBFBC227CEEEB4FA7ULL, 0x0594F531F794634CULL } }, /* XSUM_XXH128_withSecret_testdata[795] */\n    {  796, 0x0000000000000000ULL, { 0x50A953955EE32C70ULL, 0xF6E788D1E12A34EBULL } }, /* XSUM_XXH128_withSecret_testdata[796] */\n    {  797, 0x0000000000000000ULL, { 0x0F09DBD59B27961DULL, 0x739BAA1A1C655E8BULL } }, /* XSUM_XXH128_withSecret_testdata[797] */\n    {  798, 0x0000000000000000ULL, { 0x3416F050549CAC60ULL, 0x691E50B656445B96ULL } }, /* XSUM_XXH128_withSecret_testdata[798] */\n    {  799, 0x0000000000000000ULL, { 0x4BA29FA396DDBA98ULL, 0x98CDBE7A64BD7B4FULL } }, /* XSUM_XXH128_withSecret_testdata[799] */\n    {  800, 0x0000000000000000ULL, { 0x312B72B55C7208E2ULL, 0xA0753902F66104FBULL } }, /* XSUM_XXH128_withSecret_testdata[800] */\n    {  801, 0x0000000000000000ULL, { 0x3D769F14101FE7C4ULL, 0x2C7C35100FE0C72FULL } }, /* XSUM_XXH128_withSecret_testdata[801] */\n    {  802, 0x0000000000000000ULL, { 0xD7250DEEB225E7D2ULL, 0x9DC242D2FFE43D8AULL } }, /* XSUM_XXH128_withSecret_testdata[802] */\n    {  803, 0x0000000000000000ULL, { 0x1E39FD083C51CD90ULL, 0xEA59DF03E976A9E5ULL } }, /* XSUM_XXH128_withSecret_testdata[803] */\n    {  804, 0x0000000000000000ULL, { 0xAA53D012095CE25DULL, 0x5B6B564CE8AADB73ULL } }, /* XSUM_XXH128_withSecret_testdata[804] */\n    {  805, 0x0000000000000000ULL, { 0x3F8684552873B76AULL, 0x2CE5D7F3BA62F9AEULL } }, /* XSUM_XXH128_withSecret_testdata[805] */\n    {  806, 0x0000000000000000ULL, { 0xFC18EA6A1819C626ULL, 0xFCD3DE268F28B8FEULL } }, /* XSUM_XXH128_withSecret_testdata[806] */\n    {  807, 0x0000000000000000ULL, { 0xA5B2AF212A5D51AFULL, 0x839906CF79C39CF1ULL } }, /* XSUM_XXH128_withSecret_testdata[807] */\n    {  808, 0x0000000000000000ULL, { 0xFB5512AF1C6871E2ULL, 0x59A1C7C24042902BULL } }, /* XSUM_XXH128_withSecret_testdata[808] */\n    {  809, 0x0000000000000000ULL, { 0xAC41F21A3CDC474AULL, 0xA60DE8505ABDAEE3ULL } }, /* XSUM_XXH128_withSecret_testdata[809] */\n    {  810, 0x0000000000000000ULL, { 0x3481CC77F6819677ULL, 0xF9FD15F54A63DCC0ULL } }, /* XSUM_XXH128_withSecret_testdata[810] */\n    {  811, 0x0000000000000000ULL, { 0x6428F11429383DEBULL, 0x6E6D7BB4A81F9C00ULL } }, /* XSUM_XXH128_withSecret_testdata[811] */\n    {  812, 0x0000000000000000ULL, { 0x6E3B873C32B994ADULL, 0x661C99A0EADC011DULL } }, /* XSUM_XXH128_withSecret_testdata[812] */\n    {  813, 0x0000000000000000ULL, { 0xB2077E7E7D77A3F4ULL, 0x1B310F2AC218BB10ULL } }, /* XSUM_XXH128_withSecret_testdata[813] */\n    {  814, 0x0000000000000000ULL, { 0xCB9EB8F368116E1BULL, 0x94C7CECF3D6807C7ULL } }, /* XSUM_XXH128_withSecret_testdata[814] */\n    {  815, 0x0000000000000000ULL, { 0x7CAD7B69251A2FF9ULL, 0x1C544EE3C7F92A10ULL } }, /* XSUM_XXH128_withSecret_testdata[815] */\n    {  816, 0x0000000000000000ULL, { 0x8C0BB7585B99B11FULL, 0x82AD86CCDEEDE82BULL } }, /* XSUM_XXH128_withSecret_testdata[816] */\n    {  817, 0x0000000000000000ULL, { 0xEDB0F9587C7765BBULL, 0x665ADEF2AAB0629EULL } }, /* XSUM_XXH128_withSecret_testdata[817] */\n    {  818, 0x0000000000000000ULL, { 0xEBD1CE0BFE187E21ULL, 0x2D6B466BBE50AC24ULL } }, /* XSUM_XXH128_withSecret_testdata[818] */\n    {  819, 0x0000000000000000ULL, { 0xD72A43DA55C38C85ULL, 0x33736F4D1AD10966ULL } }, /* XSUM_XXH128_withSecret_testdata[819] */\n    {  820, 0x0000000000000000ULL, { 0x2660C967923AC585ULL, 0xF47BD871E1934CC0ULL } }, /* XSUM_XXH128_withSecret_testdata[820] */\n    {  821, 0x0000000000000000ULL, { 0x6D4C89FF3B625CABULL, 0x663D99BF6344C5E0ULL } }, /* XSUM_XXH128_withSecret_testdata[821] */\n    {  822, 0x0000000000000000ULL, { 0x47E717BC6A8B5234ULL, 0x45C9EAEF3D175E6FULL } }, /* XSUM_XXH128_withSecret_testdata[822] */\n    {  823, 0x0000000000000000ULL, { 0x1918AA521A7787C5ULL, 0x9F78AAF260E6F1EDULL } }, /* XSUM_XXH128_withSecret_testdata[823] */\n    {  824, 0x0000000000000000ULL, { 0xF261C5AD66E4D972ULL, 0x6377D525A6FFC629ULL } }, /* XSUM_XXH128_withSecret_testdata[824] */\n    {  825, 0x0000000000000000ULL, { 0x24C41F2E555A52CCULL, 0x8218A4D7002C09D1ULL } }, /* XSUM_XXH128_withSecret_testdata[825] */\n    {  826, 0x0000000000000000ULL, { 0x2DB2A30A92401FBFULL, 0xB106E3F3089F0D57ULL } }, /* XSUM_XXH128_withSecret_testdata[826] */\n    {  827, 0x0000000000000000ULL, { 0x31A31AD75A7323AFULL, 0xDCA7FFF134F49BD5ULL } }, /* XSUM_XXH128_withSecret_testdata[827] */\n    {  828, 0x0000000000000000ULL, { 0xCB76753807565B45ULL, 0x0AB7335B3231F79AULL } }, /* XSUM_XXH128_withSecret_testdata[828] */\n    {  829, 0x0000000000000000ULL, { 0x17935EBAF156B066ULL, 0x96D294157BDE8286ULL } }, /* XSUM_XXH128_withSecret_testdata[829] */\n    {  830, 0x0000000000000000ULL, { 0x8AAA1B83562FDEB6ULL, 0x84916A7D38C068EEULL } }, /* XSUM_XXH128_withSecret_testdata[830] */\n    {  831, 0x0000000000000000ULL, { 0xE5C95A762CD150AEULL, 0xCAFCCDBCC3D63AD9ULL } }, /* XSUM_XXH128_withSecret_testdata[831] */\n    {  832, 0x0000000000000000ULL, { 0x2617FC698E497A38ULL, 0xFD5DB43393880DADULL } }, /* XSUM_XXH128_withSecret_testdata[832] */\n    {  833, 0x0000000000000000ULL, { 0x144F4AAA69C19F15ULL, 0xE0F32F08C6298648ULL } }, /* XSUM_XXH128_withSecret_testdata[833] */\n    {  834, 0x0000000000000000ULL, { 0x99E7A94392A4EE2EULL, 0xA259DA070B30582BULL } }, /* XSUM_XXH128_withSecret_testdata[834] */\n    {  835, 0x0000000000000000ULL, { 0xFB94A6E9B4643FE1ULL, 0xD379AF64BF15D4D1ULL } }, /* XSUM_XXH128_withSecret_testdata[835] */\n    {  836, 0x0000000000000000ULL, { 0x2EEF25CD166EB0CFULL, 0xC2B2B0E2C938CF50ULL } }, /* XSUM_XXH128_withSecret_testdata[836] */\n    {  837, 0x0000000000000000ULL, { 0xFE9B761CAA13B66EULL, 0xE12D7E61F45B45CEULL } }, /* XSUM_XXH128_withSecret_testdata[837] */\n    {  838, 0x0000000000000000ULL, { 0x57B7874938141AAEULL, 0xC6674A4AB39FA237ULL } }, /* XSUM_XXH128_withSecret_testdata[838] */\n    {  839, 0x0000000000000000ULL, { 0xF79088ED2B43C60AULL, 0x192A7299D8F0645BULL } }, /* XSUM_XXH128_withSecret_testdata[839] */\n    {  840, 0x0000000000000000ULL, { 0x3AD79A82E659F12BULL, 0x9302FDB61A8F7177ULL } }, /* XSUM_XXH128_withSecret_testdata[840] */\n    {  841, 0x0000000000000000ULL, { 0x0DEC17391585DFDEULL, 0xABBE93722A983821ULL } }, /* XSUM_XXH128_withSecret_testdata[841] */\n    {  842, 0x0000000000000000ULL, { 0x66299809E567E7F0ULL, 0x21509C5B830082C4ULL } }, /* XSUM_XXH128_withSecret_testdata[842] */\n    {  843, 0x0000000000000000ULL, { 0x752AACD314E756C6ULL, 0x8DD5098BB5684969ULL } }, /* XSUM_XXH128_withSecret_testdata[843] */\n    {  844, 0x0000000000000000ULL, { 0x1AE014F08EBE2C6CULL, 0x355D8A670A6BA5B4ULL } }, /* XSUM_XXH128_withSecret_testdata[844] */\n    {  845, 0x0000000000000000ULL, { 0xA9554E9F9E4394EFULL, 0x5914E1C283B1FD55ULL } }, /* XSUM_XXH128_withSecret_testdata[845] */\n    {  846, 0x0000000000000000ULL, { 0xF1A16B2C2F7DED2DULL, 0x9F13600B1E8E8439ULL } }, /* XSUM_XXH128_withSecret_testdata[846] */\n    {  847, 0x0000000000000000ULL, { 0x8AD8E776B573CC65ULL, 0x8945C756681DEA24ULL } }, /* XSUM_XXH128_withSecret_testdata[847] */\n    {  848, 0x0000000000000000ULL, { 0x28486CB33028023BULL, 0x6CD462A3AC063CD2ULL } }, /* XSUM_XXH128_withSecret_testdata[848] */\n    {  849, 0x0000000000000000ULL, { 0xB677C580F80CAA74ULL, 0x6DD34832C49C7053ULL } }, /* XSUM_XXH128_withSecret_testdata[849] */\n    {  850, 0x0000000000000000ULL, { 0x6563F9447F2DFAD7ULL, 0x10556B9B9B9A68E7ULL } }, /* XSUM_XXH128_withSecret_testdata[850] */\n    {  851, 0x0000000000000000ULL, { 0x3F959D533722594AULL, 0xEBED9640D1698021ULL } }, /* XSUM_XXH128_withSecret_testdata[851] */\n    {  852, 0x0000000000000000ULL, { 0x4FECD02A4281A4DEULL, 0x4CF55C323AABC84EULL } }, /* XSUM_XXH128_withSecret_testdata[852] */\n    {  853, 0x0000000000000000ULL, { 0xF80BFC68BAC87FE6ULL, 0x15165D9B273A17FAULL } }, /* XSUM_XXH128_withSecret_testdata[853] */\n    {  854, 0x0000000000000000ULL, { 0xADBB99110E3DC5C8ULL, 0x3F674B885A738B24ULL } }, /* XSUM_XXH128_withSecret_testdata[854] */\n    {  855, 0x0000000000000000ULL, { 0x1624DB70FABCF1BBULL, 0xD3A2219B58F2F930ULL } }, /* XSUM_XXH128_withSecret_testdata[855] */\n    {  856, 0x0000000000000000ULL, { 0x47D080213B5F6B7AULL, 0xEFDB367F4947287BULL } }, /* XSUM_XXH128_withSecret_testdata[856] */\n    {  857, 0x0000000000000000ULL, { 0x55E53C96F067ABD1ULL, 0xF6A116167B4837F8ULL } }, /* XSUM_XXH128_withSecret_testdata[857] */\n    {  858, 0x0000000000000000ULL, { 0x96E4DA063B4BCD11ULL, 0xA1EE60AFB99FD1BDULL } }, /* XSUM_XXH128_withSecret_testdata[858] */\n    {  859, 0x0000000000000000ULL, { 0xF0DDE3E2E3F524B0ULL, 0x932F25703C4694F3ULL } }, /* XSUM_XXH128_withSecret_testdata[859] */\n    {  860, 0x0000000000000000ULL, { 0xBA387AEE58213E3AULL, 0x7A30B1B328223294ULL } }, /* XSUM_XXH128_withSecret_testdata[860] */\n    {  861, 0x0000000000000000ULL, { 0xE0802DAB34A6D5A6ULL, 0x18F97AE555BC156DULL } }, /* XSUM_XXH128_withSecret_testdata[861] */\n    {  862, 0x0000000000000000ULL, { 0x83D157DA4B3251B9ULL, 0xCEF6220F6F9F9FABULL } }, /* XSUM_XXH128_withSecret_testdata[862] */\n    {  863, 0x0000000000000000ULL, { 0x0EB879E58C37A9BEULL, 0x85BDBDE1A8C6393DULL } }, /* XSUM_XXH128_withSecret_testdata[863] */\n    {  864, 0x0000000000000000ULL, { 0x259A239831DF6B15ULL, 0x1FBE50777A2A725AULL } }, /* XSUM_XXH128_withSecret_testdata[864] */\n    {  865, 0x0000000000000000ULL, { 0x27C4E3710EB7CFF6ULL, 0xB9995A90E881B862ULL } }, /* XSUM_XXH128_withSecret_testdata[865] */\n    {  866, 0x0000000000000000ULL, { 0xA026856BC1006D57ULL, 0x37810F0CD7634D8BULL } }, /* XSUM_XXH128_withSecret_testdata[866] */\n    {  867, 0x0000000000000000ULL, { 0x76D72DB18A5872ABULL, 0x6169FAC4553C2DF8ULL } }, /* XSUM_XXH128_withSecret_testdata[867] */\n    {  868, 0x0000000000000000ULL, { 0x0667DC0A5FF702CCULL, 0xDBE44492E2E97DC1ULL } }, /* XSUM_XXH128_withSecret_testdata[868] */\n    {  869, 0x0000000000000000ULL, { 0xCB3D8D142F846DC8ULL, 0x8D23FF292B8C2C36ULL } }, /* XSUM_XXH128_withSecret_testdata[869] */\n    {  870, 0x0000000000000000ULL, { 0x614791183BD261C4ULL, 0x032E9AD2EB7D984BULL } }, /* XSUM_XXH128_withSecret_testdata[870] */\n    {  871, 0x0000000000000000ULL, { 0xE6F68A1EB569851CULL, 0x4534CC104E638889ULL } }, /* XSUM_XXH128_withSecret_testdata[871] */\n    {  872, 0x0000000000000000ULL, { 0x13B16E7916DE86A6ULL, 0x078D92FCF6BC41A0ULL } }, /* XSUM_XXH128_withSecret_testdata[872] */\n    {  873, 0x0000000000000000ULL, { 0x312ACD8E47D79F6AULL, 0x420624E678EE418AULL } }, /* XSUM_XXH128_withSecret_testdata[873] */\n    {  874, 0x0000000000000000ULL, { 0x6581DFD36267EC93ULL, 0xFB7FF30850DD49D3ULL } }, /* XSUM_XXH128_withSecret_testdata[874] */\n    {  875, 0x0000000000000000ULL, { 0x112D90A3A2790D2EULL, 0x2EC6A493A5BA1053ULL } }, /* XSUM_XXH128_withSecret_testdata[875] */\n    {  876, 0x0000000000000000ULL, { 0x1474F4016B9F64A4ULL, 0x92E5DF85EA73693CULL } }, /* XSUM_XXH128_withSecret_testdata[876] */\n    {  877, 0x0000000000000000ULL, { 0xF652765BC35398AFULL, 0xB89823915CA8851DULL } }, /* XSUM_XXH128_withSecret_testdata[877] */\n    {  878, 0x0000000000000000ULL, { 0xCF4D914D0F5C6D82ULL, 0x7212312B2EEE5889ULL } }, /* XSUM_XXH128_withSecret_testdata[878] */\n    {  879, 0x0000000000000000ULL, { 0x4F9849DA1E433123ULL, 0xF44A80C478611C86ULL } }, /* XSUM_XXH128_withSecret_testdata[879] */\n    {  880, 0x0000000000000000ULL, { 0x552EFFA215B076E6ULL, 0x8E2A75789D1F954CULL } }, /* XSUM_XXH128_withSecret_testdata[880] */\n    {  881, 0x0000000000000000ULL, { 0x70550BE650B85D78ULL, 0x495AC05C87AC8283ULL } }, /* XSUM_XXH128_withSecret_testdata[881] */\n    {  882, 0x0000000000000000ULL, { 0xA051A52D4FCF1196ULL, 0xBAF6653287A7D2B6ULL } }, /* XSUM_XXH128_withSecret_testdata[882] */\n    {  883, 0x0000000000000000ULL, { 0x89A09140CFC09BEFULL, 0xD6D401C846E3ABC6ULL } }, /* XSUM_XXH128_withSecret_testdata[883] */\n    {  884, 0x0000000000000000ULL, { 0xFABC1A2C1EEF0D88ULL, 0x84C348C6A7475454ULL } }, /* XSUM_XXH128_withSecret_testdata[884] */\n    {  885, 0x0000000000000000ULL, { 0xEDDD143E28EC9E3BULL, 0xCBB1A753FF8FAB0BULL } }, /* XSUM_XXH128_withSecret_testdata[885] */\n    {  886, 0x0000000000000000ULL, { 0xA0F647AE17840307ULL, 0xEB92E4F250F211DBULL } }, /* XSUM_XXH128_withSecret_testdata[886] */\n    {  887, 0x0000000000000000ULL, { 0x66D27AF5585FBF7AULL, 0xBC4ECA716E90E56BULL } }, /* XSUM_XXH128_withSecret_testdata[887] */\n    {  888, 0x0000000000000000ULL, { 0x769CD692AE051FD5ULL, 0x95FEC2A8C0086A84ULL } }, /* XSUM_XXH128_withSecret_testdata[888] */\n    {  889, 0x0000000000000000ULL, { 0x43E34DE3A0E1AC4FULL, 0xC6FA6E045AC55FEAULL } }, /* XSUM_XXH128_withSecret_testdata[889] */\n    {  890, 0x0000000000000000ULL, { 0x842B3ADDF6124DAFULL, 0x88CE3A7F8A225BCAULL } }, /* XSUM_XXH128_withSecret_testdata[890] */\n    {  891, 0x0000000000000000ULL, { 0x12B41F63EDF27FA4ULL, 0x82524E1EA5459EF4ULL } }, /* XSUM_XXH128_withSecret_testdata[891] */\n    {  892, 0x0000000000000000ULL, { 0x7D7E4308983537F5ULL, 0x40AD0E097D47D4BFULL } }, /* XSUM_XXH128_withSecret_testdata[892] */\n    {  893, 0x0000000000000000ULL, { 0x02DF99A1CFBC1485ULL, 0x46CEA15D278A7869ULL } }, /* XSUM_XXH128_withSecret_testdata[893] */\n    {  894, 0x0000000000000000ULL, { 0xE69C8725E90BB200ULL, 0x2437061CB6D0A210ULL } }, /* XSUM_XXH128_withSecret_testdata[894] */\n    {  895, 0x0000000000000000ULL, { 0x797F9C68E051A294ULL, 0x9181A2B2776996A8ULL } }, /* XSUM_XXH128_withSecret_testdata[895] */\n    {  896, 0x0000000000000000ULL, { 0x0C4795BEAB61DA26ULL, 0x2475EFE5EB10A72AULL } }, /* XSUM_XXH128_withSecret_testdata[896] */\n    {  897, 0x0000000000000000ULL, { 0x9494865A708F647BULL, 0xF11864566BF37F06ULL } }, /* XSUM_XXH128_withSecret_testdata[897] */\n    {  898, 0x0000000000000000ULL, { 0xFB3CC76B89A8D3F9ULL, 0x2E2D0F370487CA8FULL } }, /* XSUM_XXH128_withSecret_testdata[898] */\n    {  899, 0x0000000000000000ULL, { 0x402DA935DC5F53C8ULL, 0xFD7B8D2C94C773B3ULL } }, /* XSUM_XXH128_withSecret_testdata[899] */\n    {  900, 0x0000000000000000ULL, { 0xD7C585B83D7F950CULL, 0x248664C0BB8F4EC2ULL } }, /* XSUM_XXH128_withSecret_testdata[900] */\n    {  901, 0x0000000000000000ULL, { 0x7928B820B60BD25DULL, 0x2D652E649EDF3D01ULL } }, /* XSUM_XXH128_withSecret_testdata[901] */\n    {  902, 0x0000000000000000ULL, { 0x2AC0887A2885FD81ULL, 0xBEC17C74AFB20E6AULL } }, /* XSUM_XXH128_withSecret_testdata[902] */\n    {  903, 0x0000000000000000ULL, { 0x71E1F757232B61AEULL, 0xEA0D5580FE4F7DC6ULL } }, /* XSUM_XXH128_withSecret_testdata[903] */\n    {  904, 0x0000000000000000ULL, { 0x13C7D74D13E2BB04ULL, 0xC3A5C8B78EAA1508ULL } }, /* XSUM_XXH128_withSecret_testdata[904] */\n    {  905, 0x0000000000000000ULL, { 0xDDE0FFB62C3024E1ULL, 0xB9BCA903DE30A424ULL } }, /* XSUM_XXH128_withSecret_testdata[905] */\n    {  906, 0x0000000000000000ULL, { 0x4CC6D1E08062805CULL, 0xBEF629E6971BED81ULL } }, /* XSUM_XXH128_withSecret_testdata[906] */\n    {  907, 0x0000000000000000ULL, { 0x1201BD7C8B743A35ULL, 0xB2D1C6A262D33E75ULL } }, /* XSUM_XXH128_withSecret_testdata[907] */\n    {  908, 0x0000000000000000ULL, { 0xF1BEE9939AEC969CULL, 0x2B08C3A7EA6C4FA4ULL } }, /* XSUM_XXH128_withSecret_testdata[908] */\n    {  909, 0x0000000000000000ULL, { 0x98A7334BC1F88F07ULL, 0xE114C84B9EB55567ULL } }, /* XSUM_XXH128_withSecret_testdata[909] */\n    {  910, 0x0000000000000000ULL, { 0xF626D98D61D57409ULL, 0x0A479B2EF9466509ULL } }, /* XSUM_XXH128_withSecret_testdata[910] */\n    {  911, 0x0000000000000000ULL, { 0xE2EFC99122D59592ULL, 0x788CB7991823BD2DULL } }, /* XSUM_XXH128_withSecret_testdata[911] */\n    {  912, 0x0000000000000000ULL, { 0x50D2225C2BB125DBULL, 0x102B32CCB00C23CDULL } }, /* XSUM_XXH128_withSecret_testdata[912] */\n    {  913, 0x0000000000000000ULL, { 0x4B640FC853FA2799ULL, 0x76527AF3C5006398ULL } }, /* XSUM_XXH128_withSecret_testdata[913] */\n    {  914, 0x0000000000000000ULL, { 0x9C14CB5B5514D1FDULL, 0xE2DFC404B7FF330EULL } }, /* XSUM_XXH128_withSecret_testdata[914] */\n    {  915, 0x0000000000000000ULL, { 0xB02845F8F73EDCB8ULL, 0x1FE07E2CB0C7CF0EULL } }, /* XSUM_XXH128_withSecret_testdata[915] */\n    {  916, 0x0000000000000000ULL, { 0xF6589946632A567BULL, 0x82E3F9260A4F1F6CULL } }, /* XSUM_XXH128_withSecret_testdata[916] */\n    {  917, 0x0000000000000000ULL, { 0xBA65AC9153533E7BULL, 0x0B2DE93B054FBEA8ULL } }, /* XSUM_XXH128_withSecret_testdata[917] */\n    {  918, 0x0000000000000000ULL, { 0xE4BF20D9EC0F91C8ULL, 0x57554AFC04EBF3AAULL } }, /* XSUM_XXH128_withSecret_testdata[918] */\n    {  919, 0x0000000000000000ULL, { 0x72E15B4C5522B974ULL, 0xEC7C0FDD7E38DB62ULL } }, /* XSUM_XXH128_withSecret_testdata[919] */\n    {  920, 0x0000000000000000ULL, { 0x704A31FF18C45558ULL, 0x2AAF444CA12B79D7ULL } }, /* XSUM_XXH128_withSecret_testdata[920] */\n    {  921, 0x0000000000000000ULL, { 0x3A3526958FA7690AULL, 0x618E9BA03A458B0CULL } }, /* XSUM_XXH128_withSecret_testdata[921] */\n    {  922, 0x0000000000000000ULL, { 0x95094FB8FB21C56DULL, 0x476B6C9A543E1DC4ULL } }, /* XSUM_XXH128_withSecret_testdata[922] */\n    {  923, 0x0000000000000000ULL, { 0x258F7A3E80BF68E9ULL, 0xD066B8E54BAE515BULL } }, /* XSUM_XXH128_withSecret_testdata[923] */\n    {  924, 0x0000000000000000ULL, { 0x9D1AEEDFBAF6C740ULL, 0x57536C801A5CB760ULL } }, /* XSUM_XXH128_withSecret_testdata[924] */\n    {  925, 0x0000000000000000ULL, { 0x988BD124E6723286ULL, 0x6BE01DD7BD2C84B5ULL } }, /* XSUM_XXH128_withSecret_testdata[925] */\n    {  926, 0x0000000000000000ULL, { 0x4660899B351D8A0CULL, 0xFD89177E0223F3DEULL } }, /* XSUM_XXH128_withSecret_testdata[926] */\n    {  927, 0x0000000000000000ULL, { 0xBEF8BD2F821B14E2ULL, 0xD90B6769F68E9650ULL } }, /* XSUM_XXH128_withSecret_testdata[927] */\n    {  928, 0x0000000000000000ULL, { 0x2EA82BC6D5D6721EULL, 0x569B08E632FEAA26ULL } }, /* XSUM_XXH128_withSecret_testdata[928] */\n    {  929, 0x0000000000000000ULL, { 0xD329F24849343C53ULL, 0xE7604F28BB244243ULL } }, /* XSUM_XXH128_withSecret_testdata[929] */\n    {  930, 0x0000000000000000ULL, { 0x0F9B2C3C3AE9B86EULL, 0x3025FFB23D1511D2ULL } }, /* XSUM_XXH128_withSecret_testdata[930] */\n    {  931, 0x0000000000000000ULL, { 0xFBE3F4EC0CB70530ULL, 0xB64A954B003C2007ULL } }, /* XSUM_XXH128_withSecret_testdata[931] */\n    {  932, 0x0000000000000000ULL, { 0x59761EF490E2AF06ULL, 0x6662CF82D19AECEEULL } }, /* XSUM_XXH128_withSecret_testdata[932] */\n    {  933, 0x0000000000000000ULL, { 0xA4738BF536A69E5BULL, 0xAA4CBFE4874FC682ULL } }, /* XSUM_XXH128_withSecret_testdata[933] */\n    {  934, 0x0000000000000000ULL, { 0x911A75070974DA15ULL, 0x8A420DAE4B6A205FULL } }, /* XSUM_XXH128_withSecret_testdata[934] */\n    {  935, 0x0000000000000000ULL, { 0x67D5A83C1BE32956ULL, 0x2ED86326081D69A7ULL } }, /* XSUM_XXH128_withSecret_testdata[935] */\n    {  936, 0x0000000000000000ULL, { 0x4A7A843C9FFDD50BULL, 0xEF4A317A2E2688BCULL } }, /* XSUM_XXH128_withSecret_testdata[936] */\n    {  937, 0x0000000000000000ULL, { 0x416AAB70DC9D34DBULL, 0xDCF983EF06A036A3ULL } }, /* XSUM_XXH128_withSecret_testdata[937] */\n    {  938, 0x0000000000000000ULL, { 0xD92D5D02BDEA9DA2ULL, 0x3BC6B7061E293B58ULL } }, /* XSUM_XXH128_withSecret_testdata[938] */\n    {  939, 0x0000000000000000ULL, { 0x30F6FAC94051EE6EULL, 0x09D7BDBF3988579BULL } }, /* XSUM_XXH128_withSecret_testdata[939] */\n    {  940, 0x0000000000000000ULL, { 0x997D4B57DBBA2F39ULL, 0xFF4A72E7839270D6ULL } }, /* XSUM_XXH128_withSecret_testdata[940] */\n    {  941, 0x0000000000000000ULL, { 0x70F502215BDFFDCEULL, 0x24BC8EFCD782AA6BULL } }, /* XSUM_XXH128_withSecret_testdata[941] */\n    {  942, 0x0000000000000000ULL, { 0xE7C5531B2F7AE75EULL, 0xF69FD25F0B5B4CA1ULL } }, /* XSUM_XXH128_withSecret_testdata[942] */\n    {  943, 0x0000000000000000ULL, { 0xCF17531240C40A90ULL, 0xDCCEA8E15471FAC6ULL } }, /* XSUM_XXH128_withSecret_testdata[943] */\n    {  944, 0x0000000000000000ULL, { 0xE750D09A90109D46ULL, 0x10CD0F389039938EULL } }, /* XSUM_XXH128_withSecret_testdata[944] */\n    {  945, 0x0000000000000000ULL, { 0x94D0792E4B037609ULL, 0x352AC45AE36D34D4ULL } }, /* XSUM_XXH128_withSecret_testdata[945] */\n    {  946, 0x0000000000000000ULL, { 0xC3C7213AA478A475ULL, 0xF7D1E0F67E9D4141ULL } }, /* XSUM_XXH128_withSecret_testdata[946] */\n    {  947, 0x0000000000000000ULL, { 0xEB17825A5AED3468ULL, 0x841F079EE345C626ULL } }, /* XSUM_XXH128_withSecret_testdata[947] */\n    {  948, 0x0000000000000000ULL, { 0x1721AA31972F81E0ULL, 0x9DC7A17B10864140ULL } }, /* XSUM_XXH128_withSecret_testdata[948] */\n    {  949, 0x0000000000000000ULL, { 0x0D05BBE4C710F623ULL, 0x60E45B37356F648CULL } }, /* XSUM_XXH128_withSecret_testdata[949] */\n    {  950, 0x0000000000000000ULL, { 0x2FB6E7D26424E839ULL, 0x781DDAFDDD724DF9ULL } }, /* XSUM_XXH128_withSecret_testdata[950] */\n    {  951, 0x0000000000000000ULL, { 0xC4F258AC43633CB3ULL, 0x294411E1AB74F4F8ULL } }, /* XSUM_XXH128_withSecret_testdata[951] */\n    {  952, 0x0000000000000000ULL, { 0x42CE2EA60A969C39ULL, 0x3888CDB1430B0336ULL } }, /* XSUM_XXH128_withSecret_testdata[952] */\n    {  953, 0x0000000000000000ULL, { 0x1A1D5C18C52D900FULL, 0x8369F7625B9BC621ULL } }, /* XSUM_XXH128_withSecret_testdata[953] */\n    {  954, 0x0000000000000000ULL, { 0x7B9C17FE518ED92BULL, 0x0EFFA214EA3E99DFULL } }, /* XSUM_XXH128_withSecret_testdata[954] */\n    {  955, 0x0000000000000000ULL, { 0x72F37756AC8B4A0DULL, 0xC12F01C685A10F20ULL } }, /* XSUM_XXH128_withSecret_testdata[955] */\n    {  956, 0x0000000000000000ULL, { 0xB67130D3C149B7DCULL, 0x8FB75C90FAC78CB5ULL } }, /* XSUM_XXH128_withSecret_testdata[956] */\n    {  957, 0x0000000000000000ULL, { 0x2F8716437A5DE917ULL, 0xA5A5E451911A3011ULL } }, /* XSUM_XXH128_withSecret_testdata[957] */\n    {  958, 0x0000000000000000ULL, { 0xBC12F20F3357341FULL, 0x911EBF4D817E6D9FULL } }, /* XSUM_XXH128_withSecret_testdata[958] */\n    {  959, 0x0000000000000000ULL, { 0xBBE849D3D9DC3A49ULL, 0xCB0B4637D3BE2FE4ULL } }, /* XSUM_XXH128_withSecret_testdata[959] */\n    {  960, 0x0000000000000000ULL, { 0x7D81FB44A2BEFC42ULL, 0x9230640AA9582B6FULL } }, /* XSUM_XXH128_withSecret_testdata[960] */\n    {  961, 0x0000000000000000ULL, { 0xAA83EC5BDF669D48ULL, 0xAB154E9205E781B6ULL } }, /* XSUM_XXH128_withSecret_testdata[961] */\n    {  962, 0x0000000000000000ULL, { 0xE52EB07AB85F6463ULL, 0xF93BCAEFCD6DBE7BULL } }, /* XSUM_XXH128_withSecret_testdata[962] */\n    {  963, 0x0000000000000000ULL, { 0xD3CBF2232C7F1596ULL, 0x64358B67921A63A9ULL } }, /* XSUM_XXH128_withSecret_testdata[963] */\n    {  964, 0x0000000000000000ULL, { 0x834ABC25322F6158ULL, 0xF0127263906586B5ULL } }, /* XSUM_XXH128_withSecret_testdata[964] */\n    {  965, 0x0000000000000000ULL, { 0x4DABAB40E70A6CF9ULL, 0x7901CA5F3158D0E8ULL } }, /* XSUM_XXH128_withSecret_testdata[965] */\n    {  966, 0x0000000000000000ULL, { 0x263B7CC10D692218ULL, 0xFE7C3E47876A7EA0ULL } }, /* XSUM_XXH128_withSecret_testdata[966] */\n    {  967, 0x0000000000000000ULL, { 0x6D7CB408F6B1A793ULL, 0xE02C3CE10CEFB442ULL } }, /* XSUM_XXH128_withSecret_testdata[967] */\n    {  968, 0x0000000000000000ULL, { 0x7D8C4C23E27244A7ULL, 0x6D584AF20176D18BULL } }, /* XSUM_XXH128_withSecret_testdata[968] */\n    {  969, 0x0000000000000000ULL, { 0xC7990759FE3760E7ULL, 0x7DDBA7EE0DF02FB4ULL } }, /* XSUM_XXH128_withSecret_testdata[969] */\n    {  970, 0x0000000000000000ULL, { 0x771B0B4D873DF382ULL, 0x6FAC2D57845520A0ULL } }, /* XSUM_XXH128_withSecret_testdata[970] */\n    {  971, 0x0000000000000000ULL, { 0x2AF4ACD0FED451D2ULL, 0xE70CDEC361B2F851ULL } }, /* XSUM_XXH128_withSecret_testdata[971] */\n    {  972, 0x0000000000000000ULL, { 0x60D3E93119ED11E8ULL, 0xA4C50EED5A92E4C5ULL } }, /* XSUM_XXH128_withSecret_testdata[972] */\n    {  973, 0x0000000000000000ULL, { 0xEF6877FD70853DFDULL, 0x1D827D39DFD4D2EBULL } }, /* XSUM_XXH128_withSecret_testdata[973] */\n    {  974, 0x0000000000000000ULL, { 0x37CDCEC9C8C4437DULL, 0x9B348AF6876CED78ULL } }, /* XSUM_XXH128_withSecret_testdata[974] */\n    {  975, 0x0000000000000000ULL, { 0xED986901D8854950ULL, 0x7D85C9EE3D0F719FULL } }, /* XSUM_XXH128_withSecret_testdata[975] */\n    {  976, 0x0000000000000000ULL, { 0xB0DF387E07094087ULL, 0x95C5A217C236E99DULL } }, /* XSUM_XXH128_withSecret_testdata[976] */\n    {  977, 0x0000000000000000ULL, { 0xB47AF4DE8A46B7D7ULL, 0xE5C3AB15B7172F1FULL } }, /* XSUM_XXH128_withSecret_testdata[977] */\n    {  978, 0x0000000000000000ULL, { 0xD3F33C98F2A94C64ULL, 0x685149C9C70660A0ULL } }, /* XSUM_XXH128_withSecret_testdata[978] */\n    {  979, 0x0000000000000000ULL, { 0xED647406557A1D3FULL, 0x31B916776B8177A2ULL } }, /* XSUM_XXH128_withSecret_testdata[979] */\n    {  980, 0x0000000000000000ULL, { 0xCFB755BDA6749186ULL, 0x75D04CEAF729CB76ULL } }, /* XSUM_XXH128_withSecret_testdata[980] */\n    {  981, 0x0000000000000000ULL, { 0xD3420936F2F33C50ULL, 0x37CD3C0092B0049AULL } }, /* XSUM_XXH128_withSecret_testdata[981] */\n    {  982, 0x0000000000000000ULL, { 0x5F89BBB695A43F39ULL, 0xFF2E02015A96A97FULL } }, /* XSUM_XXH128_withSecret_testdata[982] */\n    {  983, 0x0000000000000000ULL, { 0xDE6398E9B9B34199ULL, 0xDEE33BDADF168A49ULL } }, /* XSUM_XXH128_withSecret_testdata[983] */\n    {  984, 0x0000000000000000ULL, { 0xEC02BAC4581D84E1ULL, 0xD2F675D3FE0629C0ULL } }, /* XSUM_XXH128_withSecret_testdata[984] */\n    {  985, 0x0000000000000000ULL, { 0xE02AFC42D407D47EULL, 0x2FD111B010966D7DULL } }, /* XSUM_XXH128_withSecret_testdata[985] */\n    {  986, 0x0000000000000000ULL, { 0x3E887C56DBED03C3ULL, 0x4E3BC8784DD7AAADULL } }, /* XSUM_XXH128_withSecret_testdata[986] */\n    {  987, 0x0000000000000000ULL, { 0x0F3D52819622EB53ULL, 0x78A1691A0CBBA9C7ULL } }, /* XSUM_XXH128_withSecret_testdata[987] */\n    {  988, 0x0000000000000000ULL, { 0x8B0C2867BE4548B7ULL, 0xBE0F97ACF3780ADEULL } }, /* XSUM_XXH128_withSecret_testdata[988] */\n    {  989, 0x0000000000000000ULL, { 0x4DA94C69601A58AAULL, 0xC72F7F5CD72FA076ULL } }, /* XSUM_XXH128_withSecret_testdata[989] */\n    {  990, 0x0000000000000000ULL, { 0x6C097F10DF3E086DULL, 0xD986318501409DA5ULL } }, /* XSUM_XXH128_withSecret_testdata[990] */\n    {  991, 0x0000000000000000ULL, { 0xDA0B8C6098699C76ULL, 0xE3AF8E6172D4708CULL } }, /* XSUM_XXH128_withSecret_testdata[991] */\n    {  992, 0x0000000000000000ULL, { 0x21FBB67E7817E5DDULL, 0x1E9E11F4D5B36351ULL } }, /* XSUM_XXH128_withSecret_testdata[992] */\n    {  993, 0x0000000000000000ULL, { 0x4B3798B3588D48AFULL, 0x25A6B53249C58EACULL } }, /* XSUM_XXH128_withSecret_testdata[993] */\n    {  994, 0x0000000000000000ULL, { 0xD5A9173C1BF8A85DULL, 0xFE0DE455F7C6A60CULL } }, /* XSUM_XXH128_withSecret_testdata[994] */\n    {  995, 0x0000000000000000ULL, { 0x9B507C3291E239BAULL, 0x401CE73C4CF23637ULL } }, /* XSUM_XXH128_withSecret_testdata[995] */\n    {  996, 0x0000000000000000ULL, { 0x068CDAA12DD978CCULL, 0xC2182A08C6CDE7F0ULL } }, /* XSUM_XXH128_withSecret_testdata[996] */\n    {  997, 0x0000000000000000ULL, { 0xD8E39798B8B939F9ULL, 0xD57E8588F9D7DD1EULL } }, /* XSUM_XXH128_withSecret_testdata[997] */\n    {  998, 0x0000000000000000ULL, { 0x997F71C88F791884ULL, 0x40A44BF03F1BE6ADULL } }, /* XSUM_XXH128_withSecret_testdata[998] */\n    {  999, 0x0000000000000000ULL, { 0xC9A7479FAF1BCB96ULL, 0xE994D9EB4867EAFFULL } }, /* XSUM_XXH128_withSecret_testdata[999] */\n    { 1000, 0x0000000000000000ULL, { 0xBDB88F3E40D1FF3AULL, 0x226416E1B1D1F884ULL } }, /* XSUM_XXH128_withSecret_testdata[1000] */\n    { 1001, 0x0000000000000000ULL, { 0xD23F888FDE1DE9A2ULL, 0xBD06A93E3F95ED75ULL } }, /* XSUM_XXH128_withSecret_testdata[1001] */\n    { 1002, 0x0000000000000000ULL, { 0x1C2F94B7DC6A27BCULL, 0x6AF7706FD6F4636CULL } }, /* XSUM_XXH128_withSecret_testdata[1002] */\n    { 1003, 0x0000000000000000ULL, { 0xAA5B5CCC0548887EULL, 0x3EE677331F0FE599ULL } }, /* XSUM_XXH128_withSecret_testdata[1003] */\n    { 1004, 0x0000000000000000ULL, { 0x679D5AABC8FD60A3ULL, 0x9435AC046DDBBEF9ULL } }, /* XSUM_XXH128_withSecret_testdata[1004] */\n    { 1005, 0x0000000000000000ULL, { 0x3452C8C86D780104ULL, 0xE4E9E66297E8EACEULL } }, /* XSUM_XXH128_withSecret_testdata[1005] */\n    { 1006, 0x0000000000000000ULL, { 0xA486F1DF1AC2259CULL, 0xC8B7D18DA1FFD4A5ULL } }, /* XSUM_XXH128_withSecret_testdata[1006] */\n    { 1007, 0x0000000000000000ULL, { 0xE6CD4A8CD269214FULL, 0xF15F877996139734ULL } }, /* XSUM_XXH128_withSecret_testdata[1007] */\n    { 1008, 0x0000000000000000ULL, { 0xC863AF1CD3EBB974ULL, 0x6ED833145E38B53AULL } }, /* XSUM_XXH128_withSecret_testdata[1008] */\n    { 1009, 0x0000000000000000ULL, { 0xE2D21BB3F1925A07ULL, 0x26B700BFF626E7CEULL } }, /* XSUM_XXH128_withSecret_testdata[1009] */\n    { 1010, 0x0000000000000000ULL, { 0x131E2D3A7FAB0ABCULL, 0xB42FAEE2EF1D1C38ULL } }, /* XSUM_XXH128_withSecret_testdata[1010] */\n    { 1011, 0x0000000000000000ULL, { 0x1F5FDE33C60EA32DULL, 0x4AC4FBDC3CA7C384ULL } }, /* XSUM_XXH128_withSecret_testdata[1011] */\n    { 1012, 0x0000000000000000ULL, { 0x91CDBC421A3B8FCBULL, 0x89E6D5F4D83821ACULL } }, /* XSUM_XXH128_withSecret_testdata[1012] */\n    { 1013, 0x0000000000000000ULL, { 0x4538A7A320B450EEULL, 0xC530509FD86692ECULL } }, /* XSUM_XXH128_withSecret_testdata[1013] */\n    { 1014, 0x0000000000000000ULL, { 0x26BF3D3957258C79ULL, 0xAD65C5E94CE2A4FBULL } }, /* XSUM_XXH128_withSecret_testdata[1014] */\n    { 1015, 0x0000000000000000ULL, { 0xBE646FBB26AE4B4EULL, 0xBE0E5A5F2E171BF4ULL } }, /* XSUM_XXH128_withSecret_testdata[1015] */\n    { 1016, 0x0000000000000000ULL, { 0xC68689CCB079DAB9ULL, 0x8266EA84C0ED31A7ULL } }, /* XSUM_XXH128_withSecret_testdata[1016] */\n    { 1017, 0x0000000000000000ULL, { 0x55C17A5AEF3BB64FULL, 0x29C30793F75D815FULL } }, /* XSUM_XXH128_withSecret_testdata[1017] */\n    { 1018, 0x0000000000000000ULL, { 0xA220A164F62EE9AFULL, 0xFE76EF3758C5DA96ULL } }, /* XSUM_XXH128_withSecret_testdata[1018] */\n    { 1019, 0x0000000000000000ULL, { 0x6E70B56151BE3B47ULL, 0x0BC5C34C62A60B63ULL } }, /* XSUM_XXH128_withSecret_testdata[1019] */\n    { 1020, 0x0000000000000000ULL, { 0x87D210BA884EB95AULL, 0x3E8F172C7E47D374ULL } }, /* XSUM_XXH128_withSecret_testdata[1020] */\n    { 1021, 0x0000000000000000ULL, { 0x6A22585803D5C4CCULL, 0x4B1848024C9ABAE0ULL } }, /* XSUM_XXH128_withSecret_testdata[1021] */\n    { 1022, 0x0000000000000000ULL, { 0x031260A84B3226E1ULL, 0x9EFEFAC2928F8EEEULL } }, /* XSUM_XXH128_withSecret_testdata[1022] */\n    { 1023, 0x0000000000000000ULL, { 0x6DF5A1773B876CFBULL, 0x21FE7C4FBCEBE042ULL } }, /* XSUM_XXH128_withSecret_testdata[1023] */\n    { 1024, 0x0000000000000000ULL, { 0x3538A2D1EA7410D0ULL, 0x7663338D0B32666DULL } }, /* XSUM_XXH128_withSecret_testdata[1024] */\n    { 1025, 0x0000000000000000ULL, { 0xE33739F32D405604ULL, 0x3644184C7D1E8F29ULL } }, /* XSUM_XXH128_withSecret_testdata[1025] */\n    { 1026, 0x0000000000000000ULL, { 0x0382509E7F46E913ULL, 0xE1327F3F6C9EB596ULL } }, /* XSUM_XXH128_withSecret_testdata[1026] */\n    { 1027, 0x0000000000000000ULL, { 0x8F628F9F34D9F295ULL, 0xF2555DAFA3601FFEULL } }, /* XSUM_XXH128_withSecret_testdata[1027] */\n    { 1028, 0x0000000000000000ULL, { 0xECDFA3F555AB23E6ULL, 0xA775184C18AE3419ULL } }, /* XSUM_XXH128_withSecret_testdata[1028] */\n    { 1029, 0x0000000000000000ULL, { 0x7C4838926C7A36F5ULL, 0x442F24311A6C7EDEULL } }, /* XSUM_XXH128_withSecret_testdata[1029] */\n    { 1030, 0x0000000000000000ULL, { 0xBCA5C9202530B602ULL, 0x2A5A99D86B36EF3CULL } }, /* XSUM_XXH128_withSecret_testdata[1030] */\n    { 1031, 0x0000000000000000ULL, { 0xC19526A62E0781A2ULL, 0x24EA782ADB9F4648ULL } }, /* XSUM_XXH128_withSecret_testdata[1031] */\n    { 1032, 0x0000000000000000ULL, { 0x50F02E1E977C8F24ULL, 0xE16D7E0128A6C317ULL } }, /* XSUM_XXH128_withSecret_testdata[1032] */\n    { 1033, 0x0000000000000000ULL, { 0xD7F050FE207D8801ULL, 0xFD6422CF4EF95915ULL } }, /* XSUM_XXH128_withSecret_testdata[1033] */\n    { 1034, 0x0000000000000000ULL, { 0xEACD71E313EBF530ULL, 0xA25DA43BB630460AULL } }, /* XSUM_XXH128_withSecret_testdata[1034] */\n    { 1035, 0x0000000000000000ULL, { 0xEBEC21F8305F93FEULL, 0xBEF63EC123FEAC8DULL } }, /* XSUM_XXH128_withSecret_testdata[1035] */\n    { 1036, 0x0000000000000000ULL, { 0x35093262AC38CCB9ULL, 0x696F646537643D03ULL } }, /* XSUM_XXH128_withSecret_testdata[1036] */\n    { 1037, 0x0000000000000000ULL, { 0x1D1716FF6311DF8DULL, 0x0396664ABBA6C990ULL } }, /* XSUM_XXH128_withSecret_testdata[1037] */\n    { 1038, 0x0000000000000000ULL, { 0xC7A90B83DECE449FULL, 0x0B11E66F7EC018E8ULL } }, /* XSUM_XXH128_withSecret_testdata[1038] */\n    { 1039, 0x0000000000000000ULL, { 0x332FF74A20BBC9D5ULL, 0x7EFE7E0C50199EFEULL } }, /* XSUM_XXH128_withSecret_testdata[1039] */\n    { 1040, 0x0000000000000000ULL, { 0x96565B90C44AC72AULL, 0x5E3B90D3A1E43B9DULL } }, /* XSUM_XXH128_withSecret_testdata[1040] */\n    { 1041, 0x0000000000000000ULL, { 0xFEB28E9ECA726E7AULL, 0xA6B2A0E874724AE7ULL } }, /* XSUM_XXH128_withSecret_testdata[1041] */\n    { 1042, 0x0000000000000000ULL, { 0x4F481C37E0065F4FULL, 0x6BC0C7099AEBAD12ULL } }, /* XSUM_XXH128_withSecret_testdata[1042] */\n    { 1043, 0x0000000000000000ULL, { 0x19E1B83A3DE421CDULL, 0x730ED954C4E5A4DAULL } }, /* XSUM_XXH128_withSecret_testdata[1043] */\n    { 1044, 0x0000000000000000ULL, { 0x9048D93DC6B55296ULL, 0x4345959E6391715DULL } }, /* XSUM_XXH128_withSecret_testdata[1044] */\n    { 1045, 0x0000000000000000ULL, { 0xFC77E3D7F36DB5DBULL, 0x03743AA5F1F6D408ULL } }, /* XSUM_XXH128_withSecret_testdata[1045] */\n    { 1046, 0x0000000000000000ULL, { 0xCDB626AD4D6F0D93ULL, 0x560B392FAD7670E3ULL } }, /* XSUM_XXH128_withSecret_testdata[1046] */\n    { 1047, 0x0000000000000000ULL, { 0x44AE225D80251F48ULL, 0x597BF89407FE4B27ULL } }, /* XSUM_XXH128_withSecret_testdata[1047] */\n    { 1048, 0x0000000000000000ULL, { 0xADD9CD6ABE27EC88ULL, 0x238FFE4FA98834B6ULL } }, /* XSUM_XXH128_withSecret_testdata[1048] */\n    { 1049, 0x0000000000000000ULL, { 0x868CF613DA16B7D3ULL, 0xEB55233F76071E69ULL } }, /* XSUM_XXH128_withSecret_testdata[1049] */\n    { 1050, 0x0000000000000000ULL, { 0xB274B680AA452344ULL, 0xD9958250CDDB824FULL } }, /* XSUM_XXH128_withSecret_testdata[1050] */\n    { 1051, 0x0000000000000000ULL, { 0x77D6692B33D5D00EULL, 0x99C99D270087FD04ULL } }, /* XSUM_XXH128_withSecret_testdata[1051] */\n    { 1052, 0x0000000000000000ULL, { 0xB63ED5FDF8A3CB23ULL, 0x50C33D9251CDC802ULL } }, /* XSUM_XXH128_withSecret_testdata[1052] */\n    { 1053, 0x0000000000000000ULL, { 0x3EF0EE07076FA410ULL, 0x45F97ABE62423564ULL } }, /* XSUM_XXH128_withSecret_testdata[1053] */\n    { 1054, 0x0000000000000000ULL, { 0xC783C4FB3E66DA50ULL, 0xD9B940D94C1DCB39ULL } }, /* XSUM_XXH128_withSecret_testdata[1054] */\n    { 1055, 0x0000000000000000ULL, { 0x363A06FAC4681739ULL, 0xF5350D05D9E61CA3ULL } }, /* XSUM_XXH128_withSecret_testdata[1055] */\n    { 1056, 0x0000000000000000ULL, { 0x55B66523B75E9169ULL, 0x89A91E15AEA258EDULL } }, /* XSUM_XXH128_withSecret_testdata[1056] */\n    { 1057, 0x0000000000000000ULL, { 0x8DC21437F59A5090ULL, 0xDC4F571122043F5BULL } }, /* XSUM_XXH128_withSecret_testdata[1057] */\n    { 1058, 0x0000000000000000ULL, { 0xD8619D1AC4CCAFF9ULL, 0x0E4E1C2DE9128D6FULL } }, /* XSUM_XXH128_withSecret_testdata[1058] */\n    { 1059, 0x0000000000000000ULL, { 0xAED383D6427E91DDULL, 0x53788021BDA137BEULL } }, /* XSUM_XXH128_withSecret_testdata[1059] */\n    { 1060, 0x0000000000000000ULL, { 0x75C86503D0551B28ULL, 0x3444251356389556ULL } }, /* XSUM_XXH128_withSecret_testdata[1060] */\n    { 1061, 0x0000000000000000ULL, { 0x89895FE864841CFFULL, 0x1233332DB86E89C4ULL } }, /* XSUM_XXH128_withSecret_testdata[1061] */\n    { 1062, 0x0000000000000000ULL, { 0xD577866EFB7E65B6ULL, 0xBF6021C15DB686A5ULL } }, /* XSUM_XXH128_withSecret_testdata[1062] */\n    { 1063, 0x0000000000000000ULL, { 0x696E4AE81F17E9E5ULL, 0x785D0649657E3E91ULL } }, /* XSUM_XXH128_withSecret_testdata[1063] */\n    { 1064, 0x0000000000000000ULL, { 0x20B4F5B6777B1D80ULL, 0x08B2283F7E3DCBDEULL } }, /* XSUM_XXH128_withSecret_testdata[1064] */\n    { 1065, 0x0000000000000000ULL, { 0xF867D9CD9A5A0A5EULL, 0xDE1F57FDD3C566A8ULL } }, /* XSUM_XXH128_withSecret_testdata[1065] */\n    { 1066, 0x0000000000000000ULL, { 0x7184156D346568A9ULL, 0xA70B009F21DC19ACULL } }, /* XSUM_XXH128_withSecret_testdata[1066] */\n    { 1067, 0x0000000000000000ULL, { 0x1FB3C2F8A211D614ULL, 0xD671B7B224C26134ULL } }, /* XSUM_XXH128_withSecret_testdata[1067] */\n    { 1068, 0x0000000000000000ULL, { 0xAEC09F84F474BEE6ULL, 0x9108983E5944FBA2ULL } }, /* XSUM_XXH128_withSecret_testdata[1068] */\n    { 1069, 0x0000000000000000ULL, { 0xD0B736D98040E155ULL, 0x6CD0BC4F19277CA0ULL } }, /* XSUM_XXH128_withSecret_testdata[1069] */\n    { 1070, 0x0000000000000000ULL, { 0x5025C87B098698F3ULL, 0x7911EF2BDE36B3AFULL } }, /* XSUM_XXH128_withSecret_testdata[1070] */\n    { 1071, 0x0000000000000000ULL, { 0xBAC1074155F2FD5CULL, 0x9AD519953350B189ULL } }, /* XSUM_XXH128_withSecret_testdata[1071] */\n    { 1072, 0x0000000000000000ULL, { 0x674308AAD60BB6E0ULL, 0x9326D795AE6319B1ULL } }, /* XSUM_XXH128_withSecret_testdata[1072] */\n    { 1073, 0x0000000000000000ULL, { 0xDFE0D4AB4893F42AULL, 0xC6321DED4675FF32ULL } }, /* XSUM_XXH128_withSecret_testdata[1073] */\n    { 1074, 0x0000000000000000ULL, { 0x5C58E1AABA5CE5FBULL, 0x70823050B3827FD8ULL } }, /* XSUM_XXH128_withSecret_testdata[1074] */\n    { 1075, 0x0000000000000000ULL, { 0x1EFBEE56BF8BE2E5ULL, 0xAC887538293CF84BULL } }, /* XSUM_XXH128_withSecret_testdata[1075] */\n    { 1076, 0x0000000000000000ULL, { 0x02AC1D1D06435355ULL, 0x09C09F8F136A2DA9ULL } }, /* XSUM_XXH128_withSecret_testdata[1076] */\n    { 1077, 0x0000000000000000ULL, { 0xC9DDF826C9F08173ULL, 0x4921BEEB39297B88ULL } }, /* XSUM_XXH128_withSecret_testdata[1077] */\n    { 1078, 0x0000000000000000ULL, { 0x7C3673BEA98FF744ULL, 0x681BEC3415B1B6D0ULL } }, /* XSUM_XXH128_withSecret_testdata[1078] */\n    { 1079, 0x0000000000000000ULL, { 0xDEA45D59E46D986BULL, 0x009CC57ADECE1F84ULL } }, /* XSUM_XXH128_withSecret_testdata[1079] */\n    { 1080, 0x0000000000000000ULL, { 0xFCCC5B98BBF807A5ULL, 0x428E2659AFE0D1D2ULL } }, /* XSUM_XXH128_withSecret_testdata[1080] */\n    { 1081, 0x0000000000000000ULL, { 0x5A6B2883A5549B3AULL, 0xB959BEA9B5E37B30ULL } }, /* XSUM_XXH128_withSecret_testdata[1081] */\n    { 1082, 0x0000000000000000ULL, { 0xA7C90378E8783D1EULL, 0x48A062B737564DC0ULL } }, /* XSUM_XXH128_withSecret_testdata[1082] */\n    { 1083, 0x0000000000000000ULL, { 0x1D041CD8ECD51B06ULL, 0x57EDA0DC4A3D6DB9ULL } }, /* XSUM_XXH128_withSecret_testdata[1083] */\n    { 1084, 0x0000000000000000ULL, { 0xB092E24774DCD316ULL, 0x3BC46711D19D52B3ULL } }, /* XSUM_XXH128_withSecret_testdata[1084] */\n    { 1085, 0x0000000000000000ULL, { 0x14F716BD88451F4FULL, 0x8A23B024A8B3EB8AULL } }, /* XSUM_XXH128_withSecret_testdata[1085] */\n    { 1086, 0x0000000000000000ULL, { 0x08AD7CC409755341ULL, 0xA5234210E9C0A598ULL } }, /* XSUM_XXH128_withSecret_testdata[1086] */\n    { 1087, 0x0000000000000000ULL, { 0x9DF1DF0101707F29ULL, 0x8A3EB529AAD49BB7ULL } }, /* XSUM_XXH128_withSecret_testdata[1087] */\n    { 1088, 0x0000000000000000ULL, { 0x8BCAEDDF41F82A85ULL, 0xE9E26973BF6CB984ULL } }, /* XSUM_XXH128_withSecret_testdata[1088] */\n    { 1089, 0x0000000000000000ULL, { 0x396734BF79E3529AULL, 0x5DCE8F4802EC2140ULL } }, /* XSUM_XXH128_withSecret_testdata[1089] */\n    { 1090, 0x0000000000000000ULL, { 0x1D42972E7F9069E4ULL, 0x704210CA87C4CF98ULL } }, /* XSUM_XXH128_withSecret_testdata[1090] */\n    { 1091, 0x0000000000000000ULL, { 0x2BE62A7E5377A93DULL, 0xF22B40E24F3999FAULL } }, /* XSUM_XXH128_withSecret_testdata[1091] */\n    { 1092, 0x0000000000000000ULL, { 0x29FEF2D065B79DC4ULL, 0x22140C715F371FBBULL } }, /* XSUM_XXH128_withSecret_testdata[1092] */\n    { 1093, 0x0000000000000000ULL, { 0x9268870FE3CD0A28ULL, 0x11CF5ADA62DECA1AULL } }, /* XSUM_XXH128_withSecret_testdata[1093] */\n    { 1094, 0x0000000000000000ULL, { 0x531A8BB86A48C172ULL, 0x1B9F60B31DEE3CD8ULL } }, /* XSUM_XXH128_withSecret_testdata[1094] */\n    { 1095, 0x0000000000000000ULL, { 0x96F782DBD7F2EAFAULL, 0xE6CC2C773F568F80ULL } }, /* XSUM_XXH128_withSecret_testdata[1095] */\n    { 1096, 0x0000000000000000ULL, { 0x57709214A6291F2BULL, 0x5E4F405845DF77F1ULL } }, /* XSUM_XXH128_withSecret_testdata[1096] */\n    { 1097, 0x0000000000000000ULL, { 0xFB1FB5DF61A74DC0ULL, 0xB17B178D1C9DB179ULL } }, /* XSUM_XXH128_withSecret_testdata[1097] */\n    { 1098, 0x0000000000000000ULL, { 0xF13705687AC37277ULL, 0xF214545767197ABCULL } }, /* XSUM_XXH128_withSecret_testdata[1098] */\n    { 1099, 0x0000000000000000ULL, { 0x2E4F43DCAA8C1F8AULL, 0x467B7E0613103F94ULL } }, /* XSUM_XXH128_withSecret_testdata[1099] */\n    { 1100, 0x0000000000000000ULL, { 0x6C15FF4422D23ED8ULL, 0x8802FEFC6F9DB8CAULL } }, /* XSUM_XXH128_withSecret_testdata[1100] */\n    { 1101, 0x0000000000000000ULL, { 0xB2BC6B9EE59935A4ULL, 0x775C3D2F8F7943EBULL } }, /* XSUM_XXH128_withSecret_testdata[1101] */\n    { 1102, 0x0000000000000000ULL, { 0x2375A86A7F20B64AULL, 0x30B157BF1E0C97A0ULL } }, /* XSUM_XXH128_withSecret_testdata[1102] */\n    { 1103, 0x0000000000000000ULL, { 0x9C48F9BD5EA51031ULL, 0x37AD5C6E582C103FULL } }, /* XSUM_XXH128_withSecret_testdata[1103] */\n    { 1104, 0x0000000000000000ULL, { 0x1EFCFD356691F623ULL, 0x2F3DF6F570B3AB21ULL } }, /* XSUM_XXH128_withSecret_testdata[1104] */\n    { 1105, 0x0000000000000000ULL, { 0x6FC1B0A00982F5F1ULL, 0x5455F5A4B4879652ULL } }, /* XSUM_XXH128_withSecret_testdata[1105] */\n    { 1106, 0x0000000000000000ULL, { 0x7A21C783934EDF22ULL, 0x3E823ABC956BF3F2ULL } }, /* XSUM_XXH128_withSecret_testdata[1106] */\n    { 1107, 0x0000000000000000ULL, { 0x86F7D8CF19913C4AULL, 0xCFA859A16FB68FF6ULL } }, /* XSUM_XXH128_withSecret_testdata[1107] */\n    { 1108, 0x0000000000000000ULL, { 0xC703E339E016D17CULL, 0x58066D3C02C10817ULL } }, /* XSUM_XXH128_withSecret_testdata[1108] */\n    { 1109, 0x0000000000000000ULL, { 0xE68EEBAF5A98A4B2ULL, 0x508BB14A5B420C74ULL } }, /* XSUM_XXH128_withSecret_testdata[1109] */\n    { 1110, 0x0000000000000000ULL, { 0x7EA1C9918A69252EULL, 0xF4FAAD7FAD3FF023ULL } }, /* XSUM_XXH128_withSecret_testdata[1110] */\n    { 1111, 0x0000000000000000ULL, { 0xD23D81E9D487B330ULL, 0xC003A81B0A462285ULL } }, /* XSUM_XXH128_withSecret_testdata[1111] */\n    { 1112, 0x0000000000000000ULL, { 0xDCF2B8168A1D2D59ULL, 0xC8C9060D65FF2F69ULL } }, /* XSUM_XXH128_withSecret_testdata[1112] */\n    { 1113, 0x0000000000000000ULL, { 0xF4CA1A757145DC43ULL, 0xDDCB3DADC0F22500ULL } }, /* XSUM_XXH128_withSecret_testdata[1113] */\n    { 1114, 0x0000000000000000ULL, { 0x73AB52221B088939ULL, 0xE9891AD78DC6BA7DULL } }, /* XSUM_XXH128_withSecret_testdata[1114] */\n    { 1115, 0x0000000000000000ULL, { 0x8CBB9BA7EF78D775ULL, 0x71C972DDEDF51C84ULL } }, /* XSUM_XXH128_withSecret_testdata[1115] */\n    { 1116, 0x0000000000000000ULL, { 0x563C8E056CAF5FDDULL, 0x99D3A34D4BACD657ULL } }, /* XSUM_XXH128_withSecret_testdata[1116] */\n    { 1117, 0x0000000000000000ULL, { 0xF50811E87CE88663ULL, 0x7214B7C11C96089DULL } }, /* XSUM_XXH128_withSecret_testdata[1117] */\n    { 1118, 0x0000000000000000ULL, { 0xFFCEA770436C3AD2ULL, 0x3AFC3154D20B0EDCULL } }, /* XSUM_XXH128_withSecret_testdata[1118] */\n    { 1119, 0x0000000000000000ULL, { 0xE281B61DF4C561DDULL, 0xE931BCD8A025984CULL } }, /* XSUM_XXH128_withSecret_testdata[1119] */\n    { 1120, 0x0000000000000000ULL, { 0xEED366622AAB0A63ULL, 0xD0F47D5293F62231ULL } }, /* XSUM_XXH128_withSecret_testdata[1120] */\n    { 1121, 0x0000000000000000ULL, { 0x5DEE82EEA840A274ULL, 0x441FB2B99E794D32ULL } }, /* XSUM_XXH128_withSecret_testdata[1121] */\n    { 1122, 0x0000000000000000ULL, { 0xD264D7263140C0C6ULL, 0x5CE0D1054F039E19ULL } }, /* XSUM_XXH128_withSecret_testdata[1122] */\n    { 1123, 0x0000000000000000ULL, { 0xABEA45EC624E1B97ULL, 0xBD3F8830DD810995ULL } }, /* XSUM_XXH128_withSecret_testdata[1123] */\n    { 1124, 0x0000000000000000ULL, { 0x56F66AB1DE036491ULL, 0xF4DC281FF7A40AF5ULL } }, /* XSUM_XXH128_withSecret_testdata[1124] */\n    { 1125, 0x0000000000000000ULL, { 0x1DD9EDEFCDE3A24CULL, 0x82F9353829C09A3EULL } }, /* XSUM_XXH128_withSecret_testdata[1125] */\n    { 1126, 0x0000000000000000ULL, { 0x562ADB80BB93632FULL, 0xC90C86CC80B43DEDULL } }, /* XSUM_XXH128_withSecret_testdata[1126] */\n    { 1127, 0x0000000000000000ULL, { 0x1E1B819E3B623D82ULL, 0xC6ACCCF01DD256B2ULL } }, /* XSUM_XXH128_withSecret_testdata[1127] */\n    { 1128, 0x0000000000000000ULL, { 0x56A07C82F5CCB7A6ULL, 0x1B719AAE9DFBD419ULL } }, /* XSUM_XXH128_withSecret_testdata[1128] */\n    { 1129, 0x0000000000000000ULL, { 0x82005C2A80B0149DULL, 0xC7B53925BC6D0FA2ULL } }, /* XSUM_XXH128_withSecret_testdata[1129] */\n    { 1130, 0x0000000000000000ULL, { 0x16DDB1C9DDF5C17BULL, 0xEE451286956718A1ULL } }, /* XSUM_XXH128_withSecret_testdata[1130] */\n    { 1131, 0x0000000000000000ULL, { 0x7158F8CF26C94C16ULL, 0x2552EF5C602111F1ULL } }, /* XSUM_XXH128_withSecret_testdata[1131] */\n    { 1132, 0x0000000000000000ULL, { 0x2C3A5709497CFF7CULL, 0x47ADDAC5DE06647DULL } }, /* XSUM_XXH128_withSecret_testdata[1132] */\n    { 1133, 0x0000000000000000ULL, { 0x6F680E3DD0D3A52BULL, 0xDC2DD75DC5703DE1ULL } }, /* XSUM_XXH128_withSecret_testdata[1133] */\n    { 1134, 0x0000000000000000ULL, { 0x196FB1546D757E6AULL, 0x7F0D373F8E8FC291ULL } }, /* XSUM_XXH128_withSecret_testdata[1134] */\n    { 1135, 0x0000000000000000ULL, { 0x70BBF8E10A4030ACULL, 0xC1CAF4C9FE9FCB42ULL } }, /* XSUM_XXH128_withSecret_testdata[1135] */\n    { 1136, 0x0000000000000000ULL, { 0xFB83EFA18C82B830ULL, 0x040FABB943177471ULL } }, /* XSUM_XXH128_withSecret_testdata[1136] */\n    { 1137, 0x0000000000000000ULL, { 0x3ECB963BF6DB8E5CULL, 0xD5BD5C0155FB30D6ULL } }, /* XSUM_XXH128_withSecret_testdata[1137] */\n    { 1138, 0x0000000000000000ULL, { 0x9D88D48EB2CD97BDULL, 0xEDFD5CB51B8E96F8ULL } }, /* XSUM_XXH128_withSecret_testdata[1138] */\n    { 1139, 0x0000000000000000ULL, { 0xF2AE9FEAFFC676A9ULL, 0x6F806B865B02704BULL } }, /* XSUM_XXH128_withSecret_testdata[1139] */\n    { 1140, 0x0000000000000000ULL, { 0xA66D3138F7B07A23ULL, 0x3AF607D490C36A0BULL } }, /* XSUM_XXH128_withSecret_testdata[1140] */\n    { 1141, 0x0000000000000000ULL, { 0x2EC6BB65849FFEFDULL, 0x069093143379BEC0ULL } }, /* XSUM_XXH128_withSecret_testdata[1141] */\n    { 1142, 0x0000000000000000ULL, { 0x912EF74ADB55BF9CULL, 0x09497A6E3854945BULL } }, /* XSUM_XXH128_withSecret_testdata[1142] */\n    { 1143, 0x0000000000000000ULL, { 0x69810688BDAAF761ULL, 0x1451D950ED7F0C2BULL } }, /* XSUM_XXH128_withSecret_testdata[1143] */\n    { 1144, 0x0000000000000000ULL, { 0x641CE096D569D437ULL, 0x820538F0321279D8ULL } }, /* XSUM_XXH128_withSecret_testdata[1144] */\n    { 1145, 0x0000000000000000ULL, { 0x0BA2EF1F7D45150EULL, 0xC1C86B1BF7F51BBBULL } }, /* XSUM_XXH128_withSecret_testdata[1145] */\n    { 1146, 0x0000000000000000ULL, { 0xC81E3264CD6F765BULL, 0x6125255AE11E7013ULL } }, /* XSUM_XXH128_withSecret_testdata[1146] */\n    { 1147, 0x0000000000000000ULL, { 0x0E5CB6A65F043CE6ULL, 0x753C90AB6CE228E1ULL } }, /* XSUM_XXH128_withSecret_testdata[1147] */\n    { 1148, 0x0000000000000000ULL, { 0x94D9E6AC62497AC8ULL, 0xF0ED804133233F35ULL } }, /* XSUM_XXH128_withSecret_testdata[1148] */\n    { 1149, 0x0000000000000000ULL, { 0xD949C814CA42C692ULL, 0x138E8D604CE8562FULL } }, /* XSUM_XXH128_withSecret_testdata[1149] */\n    { 1150, 0x0000000000000000ULL, { 0x6B1E0A0FDD1220E8ULL, 0x0CA95116F7422197ULL } }, /* XSUM_XXH128_withSecret_testdata[1150] */\n    { 1151, 0x0000000000000000ULL, { 0x02156F6DB0CDBBB1ULL, 0x7F020F172AB8AAC5ULL } }, /* XSUM_XXH128_withSecret_testdata[1151] */\n    { 1152, 0x0000000000000000ULL, { 0xDF4FE79C337C19C8ULL, 0x56047D2AAA7E789CULL } }, /* XSUM_XXH128_withSecret_testdata[1152] */\n    { 1153, 0x0000000000000000ULL, { 0x2ECD944DEF155B3EULL, 0x15BBCEAC0788EBECULL } }, /* XSUM_XXH128_withSecret_testdata[1153] */\n    { 1154, 0x0000000000000000ULL, { 0xAB258F9CE50EC939ULL, 0x556E343FFFC1D579ULL } }, /* XSUM_XXH128_withSecret_testdata[1154] */\n    { 1155, 0x0000000000000000ULL, { 0x4C86BB5973A6A74FULL, 0x27D25293DC5A74B2ULL } }, /* XSUM_XXH128_withSecret_testdata[1155] */\n    { 1156, 0x0000000000000000ULL, { 0xB3ADFA10F5CABB5BULL, 0x69BC24294173159DULL } }, /* XSUM_XXH128_withSecret_testdata[1156] */\n    { 1157, 0x0000000000000000ULL, { 0xD75426EA89F13149ULL, 0xF6FD88B1364D08F2ULL } }, /* XSUM_XXH128_withSecret_testdata[1157] */\n    { 1158, 0x0000000000000000ULL, { 0xE84718A0766D310CULL, 0xF3F547452BED99A6ULL } }, /* XSUM_XXH128_withSecret_testdata[1158] */\n    { 1159, 0x0000000000000000ULL, { 0x005B0C0DC58C246AULL, 0xAA2D0D49BB23CAABULL } }, /* XSUM_XXH128_withSecret_testdata[1159] */\n    { 1160, 0x0000000000000000ULL, { 0x2009C20E994DADAFULL, 0x3798E08D4075EFBFULL } }, /* XSUM_XXH128_withSecret_testdata[1160] */\n    { 1161, 0x0000000000000000ULL, { 0x0ED2F88BA0A38011ULL, 0x2A8C9D7639101237ULL } }, /* XSUM_XXH128_withSecret_testdata[1161] */\n    { 1162, 0x0000000000000000ULL, { 0x0DD4C1E9C72AAF8AULL, 0x100E2FFB4D34CA87ULL } }, /* XSUM_XXH128_withSecret_testdata[1162] */\n    { 1163, 0x0000000000000000ULL, { 0x03906A618FA58EC0ULL, 0x52290CB55F2FB422ULL } }, /* XSUM_XXH128_withSecret_testdata[1163] */\n    { 1164, 0x0000000000000000ULL, { 0x896CD47C9D3E1A7BULL, 0xB4EEE34965F0451AULL } }, /* XSUM_XXH128_withSecret_testdata[1164] */\n    { 1165, 0x0000000000000000ULL, { 0xEF3FF7FC0BA52A9BULL, 0x9F370F848596F765ULL } }, /* XSUM_XXH128_withSecret_testdata[1165] */\n    { 1166, 0x0000000000000000ULL, { 0x5C0975D67B2B6EF6ULL, 0x97596E51D7034144ULL } }, /* XSUM_XXH128_withSecret_testdata[1166] */\n    { 1167, 0x0000000000000000ULL, { 0xB7CB344311452280ULL, 0x755E81DAD86F2FA3ULL } }, /* XSUM_XXH128_withSecret_testdata[1167] */\n    { 1168, 0x0000000000000000ULL, { 0xE2F6F9063E5205BBULL, 0xFEB80C5B026335FDULL } }, /* XSUM_XXH128_withSecret_testdata[1168] */\n    { 1169, 0x0000000000000000ULL, { 0x856578127453CB3EULL, 0xC5C2CBF986EE1506ULL } }, /* XSUM_XXH128_withSecret_testdata[1169] */\n    { 1170, 0x0000000000000000ULL, { 0xA55707FB47A3D31EULL, 0x4EC623498AADADC3ULL } }, /* XSUM_XXH128_withSecret_testdata[1170] */\n    { 1171, 0x0000000000000000ULL, { 0xB06E2CDB12458F98ULL, 0xD52D75090DDBDA2FULL } }, /* XSUM_XXH128_withSecret_testdata[1171] */\n    { 1172, 0x0000000000000000ULL, { 0xACD1394078DCF1AAULL, 0x16F63322FACC37B2ULL } }, /* XSUM_XXH128_withSecret_testdata[1172] */\n    { 1173, 0x0000000000000000ULL, { 0xD84CA8AE4D64CFE0ULL, 0xC0AC8D79D7F71768ULL } }, /* XSUM_XXH128_withSecret_testdata[1173] */\n    { 1174, 0x0000000000000000ULL, { 0xAA55B791EF895214ULL, 0x704AE9E33C2BDDA1ULL } }, /* XSUM_XXH128_withSecret_testdata[1174] */\n    { 1175, 0x0000000000000000ULL, { 0x529383E16F813C4FULL, 0x2455DA28F3697C5AULL } }, /* XSUM_XXH128_withSecret_testdata[1175] */\n    { 1176, 0x0000000000000000ULL, { 0xECA853EEDD2A2E54ULL, 0x93B2C898B563EE85ULL } }, /* XSUM_XXH128_withSecret_testdata[1176] */\n    { 1177, 0x0000000000000000ULL, { 0x4002EB2DC543C39CULL, 0xC7A7914250311583ULL } }, /* XSUM_XXH128_withSecret_testdata[1177] */\n    { 1178, 0x0000000000000000ULL, { 0x59C372FEE8837209ULL, 0xFF4C903C7CEFD623ULL } }, /* XSUM_XXH128_withSecret_testdata[1178] */\n    { 1179, 0x0000000000000000ULL, { 0x44B1D065396DFE18ULL, 0xCB523C07017E5631ULL } }, /* XSUM_XXH128_withSecret_testdata[1179] */\n    { 1180, 0x0000000000000000ULL, { 0x87CDA611DF1416AEULL, 0xA8E68A017F6A708AULL } }, /* XSUM_XXH128_withSecret_testdata[1180] */\n    { 1181, 0x0000000000000000ULL, { 0x45A0F65632F65AE8ULL, 0x563E8B8E09AA1AA8ULL } }, /* XSUM_XXH128_withSecret_testdata[1181] */\n    { 1182, 0x0000000000000000ULL, { 0x59DA218BAEEDCDC4ULL, 0xAD642F8190807440ULL } }, /* XSUM_XXH128_withSecret_testdata[1182] */\n    { 1183, 0x0000000000000000ULL, { 0x7D8A93640511D6BBULL, 0x98D284BAC88DFD0AULL } }, /* XSUM_XXH128_withSecret_testdata[1183] */\n    { 1184, 0x0000000000000000ULL, { 0xF7A914AC3196E7AEULL, 0x4CEE884BC59326C0ULL } }, /* XSUM_XXH128_withSecret_testdata[1184] */\n    { 1185, 0x0000000000000000ULL, { 0xC1B5BECE599E7823ULL, 0xD6F107CCC46372D9ULL } }, /* XSUM_XXH128_withSecret_testdata[1185] */\n    { 1186, 0x0000000000000000ULL, { 0x5866D3A1E9235620ULL, 0x91059D972F71904DULL } }, /* XSUM_XXH128_withSecret_testdata[1186] */\n    { 1187, 0x0000000000000000ULL, { 0xDA1BD59F46500051ULL, 0x90F8ACC7FD144532ULL } }, /* XSUM_XXH128_withSecret_testdata[1187] */\n    { 1188, 0x0000000000000000ULL, { 0x28D7A6EB19297C11ULL, 0x7E5E4C1397567786ULL } }, /* XSUM_XXH128_withSecret_testdata[1188] */\n    { 1189, 0x0000000000000000ULL, { 0xF1A423015A009AA1ULL, 0x0E4DB1A989DFA435ULL } }, /* XSUM_XXH128_withSecret_testdata[1189] */\n    { 1190, 0x0000000000000000ULL, { 0xEAA47268810887FDULL, 0x9AFA2E6FFF53894AULL } }, /* XSUM_XXH128_withSecret_testdata[1190] */\n    { 1191, 0x0000000000000000ULL, { 0x2507000374A67D69ULL, 0x26A1BE514D62AE43ULL } }, /* XSUM_XXH128_withSecret_testdata[1191] */\n    { 1192, 0x0000000000000000ULL, { 0x86B72482FE8CC0B4ULL, 0x52E121C96498CF79ULL } }, /* XSUM_XXH128_withSecret_testdata[1192] */\n    { 1193, 0x0000000000000000ULL, { 0xCCE29661119C453AULL, 0x6763B52F0604468FULL } }, /* XSUM_XXH128_withSecret_testdata[1193] */\n    { 1194, 0x0000000000000000ULL, { 0x5718C15955D8E86EULL, 0x144FB1F0E1C4D94CULL } }, /* XSUM_XXH128_withSecret_testdata[1194] */\n    { 1195, 0x0000000000000000ULL, { 0xA45DD6275981C651ULL, 0x53788CD0CE5EE169ULL } }, /* XSUM_XXH128_withSecret_testdata[1195] */\n    { 1196, 0x0000000000000000ULL, { 0xC31C3276F4711CD9ULL, 0xC4E4F002EEFCCA4EULL } }, /* XSUM_XXH128_withSecret_testdata[1196] */\n    { 1197, 0x0000000000000000ULL, { 0x7057D8D2E26A41C6ULL, 0x19B05BCDC9553C6FULL } }, /* XSUM_XXH128_withSecret_testdata[1197] */\n    { 1198, 0x0000000000000000ULL, { 0xB2B056A783B96CFBULL, 0x5D3A214FCA3818E2ULL } }, /* XSUM_XXH128_withSecret_testdata[1198] */\n    { 1199, 0x0000000000000000ULL, { 0xC76ABEB7BC46B70BULL, 0x2C2007C60038F35AULL } }, /* XSUM_XXH128_withSecret_testdata[1199] */\n    { 1200, 0x0000000000000000ULL, { 0x73755FC8551A96C0ULL, 0xD0EBA5F8F9CA6116ULL } }, /* XSUM_XXH128_withSecret_testdata[1200] */\n    { 1201, 0x0000000000000000ULL, { 0xB753309CFD6AE937ULL, 0xEE8380A1DF7F46FBULL } }, /* XSUM_XXH128_withSecret_testdata[1201] */\n    { 1202, 0x0000000000000000ULL, { 0x59EBC9D68AB74308ULL, 0xA15CBC183721D8F5ULL } }, /* XSUM_XXH128_withSecret_testdata[1202] */\n    { 1203, 0x0000000000000000ULL, { 0xD30471451F8D7F23ULL, 0x187499D7A33F5404ULL } }, /* XSUM_XXH128_withSecret_testdata[1203] */\n    { 1204, 0x0000000000000000ULL, { 0x49D1C3584FE44DDBULL, 0x95D6C814A3DEA4E4ULL } }, /* XSUM_XXH128_withSecret_testdata[1204] */\n    { 1205, 0x0000000000000000ULL, { 0x243157916985F87BULL, 0x45A15FC36B2BE2DAULL } }, /* XSUM_XXH128_withSecret_testdata[1205] */\n    { 1206, 0x0000000000000000ULL, { 0x202E01C447EE0F84ULL, 0x20D1DC05B0E49AC6ULL } }, /* XSUM_XXH128_withSecret_testdata[1206] */\n    { 1207, 0x0000000000000000ULL, { 0xA40C5DFD692473E8ULL, 0x701659E8CAAF75C3ULL } }, /* XSUM_XXH128_withSecret_testdata[1207] */\n    { 1208, 0x0000000000000000ULL, { 0x64FB4F94E14A516EULL, 0xA4A218568E85B149ULL } }, /* XSUM_XXH128_withSecret_testdata[1208] */\n    { 1209, 0x0000000000000000ULL, { 0xE549E2C3449F09FFULL, 0x281AD1B420E1C976ULL } }, /* XSUM_XXH128_withSecret_testdata[1209] */\n    { 1210, 0x0000000000000000ULL, { 0x8F4F0A0652F62A6EULL, 0xAABF4931CA2B43ACULL } }, /* XSUM_XXH128_withSecret_testdata[1210] */\n    { 1211, 0x0000000000000000ULL, { 0x63FB3196D346A6B7ULL, 0x2EE9674FF81E58DAULL } }, /* XSUM_XXH128_withSecret_testdata[1211] */\n    { 1212, 0x0000000000000000ULL, { 0xF231B7882BB00AA5ULL, 0xAF811A0DEA976009ULL } }, /* XSUM_XXH128_withSecret_testdata[1212] */\n    { 1213, 0x0000000000000000ULL, { 0x386A02178E23A5CAULL, 0xE1F256B1B82BF0D4ULL } }, /* XSUM_XXH128_withSecret_testdata[1213] */\n    { 1214, 0x0000000000000000ULL, { 0xD23493CD42EEDD55ULL, 0x3635A53F10C67726ULL } }, /* XSUM_XXH128_withSecret_testdata[1214] */\n    { 1215, 0x0000000000000000ULL, { 0x61438E729742F3E7ULL, 0x76C6A5A8B77A9572ULL } }, /* XSUM_XXH128_withSecret_testdata[1215] */\n    { 1216, 0x0000000000000000ULL, { 0x92F607D509447369ULL, 0x64863E6A3AE59016ULL } }, /* XSUM_XXH128_withSecret_testdata[1216] */\n    { 1217, 0x0000000000000000ULL, { 0x663DE7FFFE25062BULL, 0xCE0D0FA7A2055562ULL } }, /* XSUM_XXH128_withSecret_testdata[1217] */\n    { 1218, 0x0000000000000000ULL, { 0x09224BF6696D0C87ULL, 0x59B245B57F843A19ULL } }, /* XSUM_XXH128_withSecret_testdata[1218] */\n    { 1219, 0x0000000000000000ULL, { 0x0DC6477ADA60C46EULL, 0xF2DBA8027CCCA51FULL } }, /* XSUM_XXH128_withSecret_testdata[1219] */\n    { 1220, 0x0000000000000000ULL, { 0x1DBEAEE3D8B6AEE3ULL, 0xBABE0343B49CCAABULL } }, /* XSUM_XXH128_withSecret_testdata[1220] */\n    { 1221, 0x0000000000000000ULL, { 0x9C04B23D21BFF9D4ULL, 0xCED5A43B3230FB80ULL } }, /* XSUM_XXH128_withSecret_testdata[1221] */\n    { 1222, 0x0000000000000000ULL, { 0xA55E3990D596F4F5ULL, 0x42BE19377A0DA742ULL } }, /* XSUM_XXH128_withSecret_testdata[1222] */\n    { 1223, 0x0000000000000000ULL, { 0x393633C0019FA593ULL, 0x705CE2CF8BD863C7ULL } }, /* XSUM_XXH128_withSecret_testdata[1223] */\n    { 1224, 0x0000000000000000ULL, { 0xCD109408C4096802ULL, 0x8EA44CEA879CCD36ULL } }, /* XSUM_XXH128_withSecret_testdata[1224] */\n    { 1225, 0x0000000000000000ULL, { 0x234D3FFD498043ADULL, 0x61FD1082F645AFABULL } }, /* XSUM_XXH128_withSecret_testdata[1225] */\n    { 1226, 0x0000000000000000ULL, { 0xCC62B983E6E16175ULL, 0x2AB3C3EA6B3FDAAAULL } }, /* XSUM_XXH128_withSecret_testdata[1226] */\n    { 1227, 0x0000000000000000ULL, { 0x27B595365C29A97DULL, 0xADEE283D90912477ULL } }, /* XSUM_XXH128_withSecret_testdata[1227] */\n    { 1228, 0x0000000000000000ULL, { 0xFFAD0D865E21BF53ULL, 0x44ACB1E609A808C3ULL } }, /* XSUM_XXH128_withSecret_testdata[1228] */\n    { 1229, 0x0000000000000000ULL, { 0x41CE386C213D93CEULL, 0x9FAE3C113D68FF28ULL } }, /* XSUM_XXH128_withSecret_testdata[1229] */\n    { 1230, 0x0000000000000000ULL, { 0x284740FCD667DA17ULL, 0xBD493568B93FD54AULL } }, /* XSUM_XXH128_withSecret_testdata[1230] */\n    { 1231, 0x0000000000000000ULL, { 0x1B1D48F3B30A1884ULL, 0x47F56C812076DA6AULL } }, /* XSUM_XXH128_withSecret_testdata[1231] */\n    { 1232, 0x0000000000000000ULL, { 0xCDA4172D1A1DBDF0ULL, 0x7C0F687CF98F67F0ULL } }, /* XSUM_XXH128_withSecret_testdata[1232] */\n    { 1233, 0x0000000000000000ULL, { 0xF90351A1085B9FA9ULL, 0xB070225E4C3B1CCFULL } }, /* XSUM_XXH128_withSecret_testdata[1233] */\n    { 1234, 0x0000000000000000ULL, { 0x343C0D92B24D640DULL, 0xFBB767DFE565DEB6ULL } }, /* XSUM_XXH128_withSecret_testdata[1234] */\n    { 1235, 0x0000000000000000ULL, { 0x64A949C8B1108BFBULL, 0xCCF0780E1A457EF6ULL } }, /* XSUM_XXH128_withSecret_testdata[1235] */\n    { 1236, 0x0000000000000000ULL, { 0x245919762B221E7FULL, 0x16998C9A2AC38717ULL } }, /* XSUM_XXH128_withSecret_testdata[1236] */\n    { 1237, 0x0000000000000000ULL, { 0xFD9BB3384A8857F5ULL, 0x8AB73D1FD1A268F1ULL } }, /* XSUM_XXH128_withSecret_testdata[1237] */\n    { 1238, 0x0000000000000000ULL, { 0x9E133E37A83E21DBULL, 0x3B580A3ADCF3A48AULL } }, /* XSUM_XXH128_withSecret_testdata[1238] */\n    { 1239, 0x0000000000000000ULL, { 0xF71278EFE523DB46ULL, 0xE6B9E68D3AFEF7F5ULL } }, /* XSUM_XXH128_withSecret_testdata[1239] */\n    { 1240, 0x0000000000000000ULL, { 0xC82413F84E6E3EC5ULL, 0x98670D2F8CC6F5CBULL } }, /* XSUM_XXH128_withSecret_testdata[1240] */\n    { 1241, 0x0000000000000000ULL, { 0x166BD3C786FDECB0ULL, 0x210253E1CF8C7A34ULL } }, /* XSUM_XXH128_withSecret_testdata[1241] */\n    { 1242, 0x0000000000000000ULL, { 0x96F0738F94FD7CBAULL, 0xB28F0EBF0812ADDBULL } }, /* XSUM_XXH128_withSecret_testdata[1242] */\n    { 1243, 0x0000000000000000ULL, { 0xD250E16AC85D91ABULL, 0x7BF10B34B3862F9CULL } }, /* XSUM_XXH128_withSecret_testdata[1243] */\n    { 1244, 0x0000000000000000ULL, { 0x785A62391800E61FULL, 0x077925D834A400BBULL } }, /* XSUM_XXH128_withSecret_testdata[1244] */\n    { 1245, 0x0000000000000000ULL, { 0x3FFB5401C9F7A3FFULL, 0x4EDFBB34402527E2ULL } }, /* XSUM_XXH128_withSecret_testdata[1245] */\n    { 1246, 0x0000000000000000ULL, { 0x2A29AC53000E997FULL, 0xE10125AAF318AE02ULL } }, /* XSUM_XXH128_withSecret_testdata[1246] */\n    { 1247, 0x0000000000000000ULL, { 0xAE58D698404A2776ULL, 0xE9E963A487ED59D7ULL } }, /* XSUM_XXH128_withSecret_testdata[1247] */\n    { 1248, 0x0000000000000000ULL, { 0xA53C9031684A836CULL, 0x6D4EF30F334B1DE9ULL } }, /* XSUM_XXH128_withSecret_testdata[1248] */\n    { 1249, 0x0000000000000000ULL, { 0x6F3ABC5DCDD19D53ULL, 0x8E673F01A8623EA1ULL } }, /* XSUM_XXH128_withSecret_testdata[1249] */\n    { 1250, 0x0000000000000000ULL, { 0x75AD1818E82EC2FEULL, 0x65FD25FBB4920421ULL } }, /* XSUM_XXH128_withSecret_testdata[1250] */\n    { 1251, 0x0000000000000000ULL, { 0x2C17F682AFC67F69ULL, 0x54A3C93439C2DCDEULL } }, /* XSUM_XXH128_withSecret_testdata[1251] */\n    { 1252, 0x0000000000000000ULL, { 0x8815882995B4B2B5ULL, 0xA48F1C5DF2BA1C5AULL } }, /* XSUM_XXH128_withSecret_testdata[1252] */\n    { 1253, 0x0000000000000000ULL, { 0x24E082C698E1F0C5ULL, 0xF41670656EB73837ULL } }, /* XSUM_XXH128_withSecret_testdata[1253] */\n    { 1254, 0x0000000000000000ULL, { 0xEDDE9C789512BA59ULL, 0x61D15306BFF18A75ULL } }, /* XSUM_XXH128_withSecret_testdata[1254] */\n    { 1255, 0x0000000000000000ULL, { 0x189407CBCC7DA351ULL, 0x8BB20CA0B299EEAFULL } }, /* XSUM_XXH128_withSecret_testdata[1255] */\n    { 1256, 0x0000000000000000ULL, { 0xA6B6B78A5B3BEDDAULL, 0x182E4C56275AAD2BULL } }, /* XSUM_XXH128_withSecret_testdata[1256] */\n    { 1257, 0x0000000000000000ULL, { 0xB8748DD6087FD1B7ULL, 0x650323961FC93C0DULL } }, /* XSUM_XXH128_withSecret_testdata[1257] */\n    { 1258, 0x0000000000000000ULL, { 0x30FF824085C7AC1FULL, 0x96B212D3027C075CULL } }, /* XSUM_XXH128_withSecret_testdata[1258] */\n    { 1259, 0x0000000000000000ULL, { 0x01208E35DCBC5342ULL, 0xAA22B4B27E4F409AULL } }, /* XSUM_XXH128_withSecret_testdata[1259] */\n    { 1260, 0x0000000000000000ULL, { 0xBE93C8449B0F4D28ULL, 0xCB29DAC217D85F93ULL } }, /* XSUM_XXH128_withSecret_testdata[1260] */\n    { 1261, 0x0000000000000000ULL, { 0x2E61B5BB8D7312E2ULL, 0x4A0C1707171A9FD4ULL } }, /* XSUM_XXH128_withSecret_testdata[1261] */\n    { 1262, 0x0000000000000000ULL, { 0x9005CF7F4A946D0DULL, 0xF0DFC768419200FDULL } }, /* XSUM_XXH128_withSecret_testdata[1262] */\n    { 1263, 0x0000000000000000ULL, { 0xFCB02DBE12CDCECDULL, 0x5F2F61C1BB11AA05ULL } }, /* XSUM_XXH128_withSecret_testdata[1263] */\n    { 1264, 0x0000000000000000ULL, { 0x77115021CC4B7E79ULL, 0xF7DB1ABE1C4B3FF8ULL } }, /* XSUM_XXH128_withSecret_testdata[1264] */\n    { 1265, 0x0000000000000000ULL, { 0x45B53F7C10D68DF3ULL, 0x888FB2CD89F09792ULL } }, /* XSUM_XXH128_withSecret_testdata[1265] */\n    { 1266, 0x0000000000000000ULL, { 0xEE9685A40F3894A5ULL, 0x28211211D3CE8E09ULL } }, /* XSUM_XXH128_withSecret_testdata[1266] */\n    { 1267, 0x0000000000000000ULL, { 0x9ABF6ADB0E588970ULL, 0x00EF9A8C85D35CBCULL } }, /* XSUM_XXH128_withSecret_testdata[1267] */\n    { 1268, 0x0000000000000000ULL, { 0x50A2DD1114B3A393ULL, 0x56BA6CB92161430BULL } }, /* XSUM_XXH128_withSecret_testdata[1268] */\n    { 1269, 0x0000000000000000ULL, { 0xFEEAA9C0D309D11DULL, 0x29CB8FE4AD4DDBD6ULL } }, /* XSUM_XXH128_withSecret_testdata[1269] */\n    { 1270, 0x0000000000000000ULL, { 0xDD86053FB8F3C843ULL, 0x73EFC8A22B316F51ULL } }, /* XSUM_XXH128_withSecret_testdata[1270] */\n    { 1271, 0x0000000000000000ULL, { 0xF607C259AD6046D2ULL, 0x7C37505F14745336ULL } }, /* XSUM_XXH128_withSecret_testdata[1271] */\n    { 1272, 0x0000000000000000ULL, { 0x2308CEB57312D420ULL, 0xA8882EF189DA425EULL } }, /* XSUM_XXH128_withSecret_testdata[1272] */\n    { 1273, 0x0000000000000000ULL, { 0x42121BF4F0804A49ULL, 0xF741093D49B40D13ULL } }, /* XSUM_XXH128_withSecret_testdata[1273] */\n    { 1274, 0x0000000000000000ULL, { 0x788CC0A18468029BULL, 0x05DE216C103918C4ULL } }, /* XSUM_XXH128_withSecret_testdata[1274] */\n    { 1275, 0x0000000000000000ULL, { 0x6508C03B3657F8D4ULL, 0xA2EBB198A713B84DULL } }, /* XSUM_XXH128_withSecret_testdata[1275] */\n    { 1276, 0x0000000000000000ULL, { 0x6C461606A62F6A67ULL, 0x2A8B51795E566F20ULL } }, /* XSUM_XXH128_withSecret_testdata[1276] */\n    { 1277, 0x0000000000000000ULL, { 0x39282AFC7B3CDB3AULL, 0x571B16E41F6A4E9AULL } }, /* XSUM_XXH128_withSecret_testdata[1277] */\n    { 1278, 0x0000000000000000ULL, { 0x74076DD2F86447F5ULL, 0xBA8AF90BFC3DFB96ULL } }, /* XSUM_XXH128_withSecret_testdata[1278] */\n    { 1279, 0x0000000000000000ULL, { 0xA8D717918A5784B2ULL, 0x7E2638C3EB82E4C1ULL } }, /* XSUM_XXH128_withSecret_testdata[1279] */\n    { 1280, 0x0000000000000000ULL, { 0x435F9EB1675EA225ULL, 0x69D503954A4CA67FULL } }, /* XSUM_XXH128_withSecret_testdata[1280] */\n    { 1281, 0x0000000000000000ULL, { 0xDC2DB93C9AE6807FULL, 0xDAA57F92107A2CA5ULL } }, /* XSUM_XXH128_withSecret_testdata[1281] */\n    { 1282, 0x0000000000000000ULL, { 0xA1E2C0F65BE822C9ULL, 0x3EAA144FFDECAD93ULL } }, /* XSUM_XXH128_withSecret_testdata[1282] */\n    { 1283, 0x0000000000000000ULL, { 0x1D95E563E3A8C9C3ULL, 0x295A87643B107A7BULL } }, /* XSUM_XXH128_withSecret_testdata[1283] */\n    { 1284, 0x0000000000000000ULL, { 0xEBBB6C45226CA339ULL, 0xC430087D7EE92CDBULL } }, /* XSUM_XXH128_withSecret_testdata[1284] */\n    { 1285, 0x0000000000000000ULL, { 0xC8C526B210C30578ULL, 0xD97138C7A70C04E5ULL } }, /* XSUM_XXH128_withSecret_testdata[1285] */\n    { 1286, 0x0000000000000000ULL, { 0x1630BC64A5B3F61AULL, 0x4DF88D4C58C8C9F2ULL } }, /* XSUM_XXH128_withSecret_testdata[1286] */\n    { 1287, 0x0000000000000000ULL, { 0xDF062B18695B0AD8ULL, 0x6377411CB6214FA5ULL } }, /* XSUM_XXH128_withSecret_testdata[1287] */\n    { 1288, 0x0000000000000000ULL, { 0x56698F4C67AE3002ULL, 0x4ED729C4E855B81FULL } }, /* XSUM_XXH128_withSecret_testdata[1288] */\n    { 1289, 0x0000000000000000ULL, { 0xF4DCA376472FAE9DULL, 0x9F55301AD3966023ULL } }, /* XSUM_XXH128_withSecret_testdata[1289] */\n    { 1290, 0x0000000000000000ULL, { 0x2C4EEB0F1A3F2B74ULL, 0x8B8C7F011AE2B925ULL } }, /* XSUM_XXH128_withSecret_testdata[1290] */\n    { 1291, 0x0000000000000000ULL, { 0x4F913E6E14087E32ULL, 0x9A1CFF80147E4807ULL } }, /* XSUM_XXH128_withSecret_testdata[1291] */\n    { 1292, 0x0000000000000000ULL, { 0x8E28F817714CCF9EULL, 0x77058EEABC495323ULL } }, /* XSUM_XXH128_withSecret_testdata[1292] */\n    { 1293, 0x0000000000000000ULL, { 0x53A628FCC781B8C6ULL, 0x33E8A4547CA567A8ULL } }, /* XSUM_XXH128_withSecret_testdata[1293] */\n    { 1294, 0x0000000000000000ULL, { 0x20BDAB7E198554A1ULL, 0x8DDF5C59E6049835ULL } }, /* XSUM_XXH128_withSecret_testdata[1294] */\n    { 1295, 0x0000000000000000ULL, { 0x650BDEE530735691ULL, 0x1DEFB9517C03BF91ULL } }, /* XSUM_XXH128_withSecret_testdata[1295] */\n    { 1296, 0x0000000000000000ULL, { 0x916FE213BA38F63FULL, 0xBE535F4D5DCAE03CULL } }, /* XSUM_XXH128_withSecret_testdata[1296] */\n    { 1297, 0x0000000000000000ULL, { 0x1FC7BAB7BBB5FAF4ULL, 0x9F6AE9849A531AEEULL } }, /* XSUM_XXH128_withSecret_testdata[1297] */\n    { 1298, 0x0000000000000000ULL, { 0x8933CB240512BC03ULL, 0x00B8802454E8A930ULL } }, /* XSUM_XXH128_withSecret_testdata[1298] */\n    { 1299, 0x0000000000000000ULL, { 0xAA19796DAE123B34ULL, 0x5C2C0C352B8AC4A5ULL } }, /* XSUM_XXH128_withSecret_testdata[1299] */\n    { 1300, 0x0000000000000000ULL, { 0xDEE64FF495E05965ULL, 0x783D1918B28DC202ULL } }, /* XSUM_XXH128_withSecret_testdata[1300] */\n    { 1301, 0x0000000000000000ULL, { 0x2E510FDCA174B8FFULL, 0xE170FA5F6A1C8704ULL } }, /* XSUM_XXH128_withSecret_testdata[1301] */\n    { 1302, 0x0000000000000000ULL, { 0x08B033AE042B7134ULL, 0x933CA03E551702E4ULL } }, /* XSUM_XXH128_withSecret_testdata[1302] */\n    { 1303, 0x0000000000000000ULL, { 0x37B175392C8B7634ULL, 0x38341E944776B94EULL } }, /* XSUM_XXH128_withSecret_testdata[1303] */\n    { 1304, 0x0000000000000000ULL, { 0x0056F1F63D1624C1ULL, 0x2E929CC55EFF6E16ULL } }, /* XSUM_XXH128_withSecret_testdata[1304] */\n    { 1305, 0x0000000000000000ULL, { 0x409073AF7B9FC7A8ULL, 0x91FB8D09F88CA897ULL } }, /* XSUM_XXH128_withSecret_testdata[1305] */\n    { 1306, 0x0000000000000000ULL, { 0x5106BD992B25FB60ULL, 0xB02CB1A5B297A5A4ULL } }, /* XSUM_XXH128_withSecret_testdata[1306] */\n    { 1307, 0x0000000000000000ULL, { 0x6EB2815B2767DDA2ULL, 0x9F4AF1944AF7CFBBULL } }, /* XSUM_XXH128_withSecret_testdata[1307] */\n    { 1308, 0x0000000000000000ULL, { 0xF92809041F943667ULL, 0x1459841F636D3BBFULL } }, /* XSUM_XXH128_withSecret_testdata[1308] */\n    { 1309, 0x0000000000000000ULL, { 0x2E9E667E6997DC6AULL, 0xA98633D7E8C564E8ULL } }, /* XSUM_XXH128_withSecret_testdata[1309] */\n    { 1310, 0x0000000000000000ULL, { 0xFA3298E8C2101F66ULL, 0x8F8C78B22B5123EFULL } }, /* XSUM_XXH128_withSecret_testdata[1310] */\n    { 1311, 0x0000000000000000ULL, { 0x367FB94648BD8EC4ULL, 0x13C1CBFF5BBA0D7DULL } }, /* XSUM_XXH128_withSecret_testdata[1311] */\n    { 1312, 0x0000000000000000ULL, { 0xE295652DC945F248ULL, 0x4B2DB5CBBF1308F3ULL } }, /* XSUM_XXH128_withSecret_testdata[1312] */\n    { 1313, 0x0000000000000000ULL, { 0x1497264F4AEE877BULL, 0x8932DA6C6276E8C6ULL } }, /* XSUM_XXH128_withSecret_testdata[1313] */\n    { 1314, 0x0000000000000000ULL, { 0x097EA52B2F2CEC0FULL, 0x935565CF3487B08EULL } }, /* XSUM_XXH128_withSecret_testdata[1314] */\n    { 1315, 0x0000000000000000ULL, { 0x7494E3D589BD925DULL, 0x6A38C202A4BE4F3BULL } }, /* XSUM_XXH128_withSecret_testdata[1315] */\n    { 1316, 0x0000000000000000ULL, { 0x1BE7F1FAC69F2A96ULL, 0xCED7653B6BB28010ULL } }, /* XSUM_XXH128_withSecret_testdata[1316] */\n    { 1317, 0x0000000000000000ULL, { 0x2D32EB078EB76499ULL, 0xBD9928485C2F942CULL } }, /* XSUM_XXH128_withSecret_testdata[1317] */\n    { 1318, 0x0000000000000000ULL, { 0x061AA905761C05FCULL, 0x46667CD771D032D2ULL } }, /* XSUM_XXH128_withSecret_testdata[1318] */\n    { 1319, 0x0000000000000000ULL, { 0x95574AF3902C9275ULL, 0x52D1579F95EA4FC2ULL } }, /* XSUM_XXH128_withSecret_testdata[1319] */\n    { 1320, 0x0000000000000000ULL, { 0xE412CFFC01B99338ULL, 0x1CA808BF418A5E95ULL } }, /* XSUM_XXH128_withSecret_testdata[1320] */\n    { 1321, 0x0000000000000000ULL, { 0x9CB3BB605A83A497ULL, 0xA65E6C251CCCB71DULL } }, /* XSUM_XXH128_withSecret_testdata[1321] */\n    { 1322, 0x0000000000000000ULL, { 0x5FA866FF5B5E26E2ULL, 0x280ABDD0D5816A88ULL } }, /* XSUM_XXH128_withSecret_testdata[1322] */\n    { 1323, 0x0000000000000000ULL, { 0xC9EB8EBA6300B7B9ULL, 0x3F5B975046FFB61CULL } }, /* XSUM_XXH128_withSecret_testdata[1323] */\n    { 1324, 0x0000000000000000ULL, { 0x4366ECBC2241CDCBULL, 0xE9226CDF0956CAE0ULL } }, /* XSUM_XXH128_withSecret_testdata[1324] */\n    { 1325, 0x0000000000000000ULL, { 0xE81FE26D39C60C1AULL, 0x374CA95470527F07ULL } }, /* XSUM_XXH128_withSecret_testdata[1325] */\n    { 1326, 0x0000000000000000ULL, { 0xA9FAC797AF26E3A3ULL, 0x58C527FAFC9E2565ULL } }, /* XSUM_XXH128_withSecret_testdata[1326] */\n    { 1327, 0x0000000000000000ULL, { 0xC73722D6E30D0314ULL, 0x6119E87FD5A10492ULL } }, /* XSUM_XXH128_withSecret_testdata[1327] */\n    { 1328, 0x0000000000000000ULL, { 0x87D861475092E84EULL, 0xF8D965DB296D0259ULL } }, /* XSUM_XXH128_withSecret_testdata[1328] */\n    { 1329, 0x0000000000000000ULL, { 0x7BD90034C6CA14E8ULL, 0x207CAC2C2C56B782ULL } }, /* XSUM_XXH128_withSecret_testdata[1329] */\n    { 1330, 0x0000000000000000ULL, { 0x11E710FAF368141DULL, 0x722972A8CE5B8605ULL } }, /* XSUM_XXH128_withSecret_testdata[1330] */\n    { 1331, 0x0000000000000000ULL, { 0xB0D71F9C170851B9ULL, 0xFB7E10B30A44E16BULL } }, /* XSUM_XXH128_withSecret_testdata[1331] */\n    { 1332, 0x0000000000000000ULL, { 0x8E3E730800AD0365ULL, 0x1F26294FC255187AULL } }, /* XSUM_XXH128_withSecret_testdata[1332] */\n    { 1333, 0x0000000000000000ULL, { 0x7EBF5F93F98E698DULL, 0x645DCD43D87F7FE6ULL } }, /* XSUM_XXH128_withSecret_testdata[1333] */\n    { 1334, 0x0000000000000000ULL, { 0x9126271F39408106ULL, 0x0160EF425945D206ULL } }, /* XSUM_XXH128_withSecret_testdata[1334] */\n    { 1335, 0x0000000000000000ULL, { 0xCD219896FED405EEULL, 0xC4B4478BB679B34FULL } }, /* XSUM_XXH128_withSecret_testdata[1335] */\n    { 1336, 0x0000000000000000ULL, { 0x68B7D403FA534589ULL, 0x91F717183F852A88ULL } }, /* XSUM_XXH128_withSecret_testdata[1336] */\n    { 1337, 0x0000000000000000ULL, { 0x4FB3E1315E622702ULL, 0xEB99780DEDD9E5ACULL } }, /* XSUM_XXH128_withSecret_testdata[1337] */\n    { 1338, 0x0000000000000000ULL, { 0xC5DC08DF8C7EE533ULL, 0xE74654D437746031ULL } }, /* XSUM_XXH128_withSecret_testdata[1338] */\n    { 1339, 0x0000000000000000ULL, { 0x68E975F07090E13CULL, 0x19EACFF6D0BA4A0AULL } }, /* XSUM_XXH128_withSecret_testdata[1339] */\n    { 1340, 0x0000000000000000ULL, { 0x7C053AD6AE67606FULL, 0xDC92CB260702CCA2ULL } }, /* XSUM_XXH128_withSecret_testdata[1340] */\n    { 1341, 0x0000000000000000ULL, { 0xB9956077392BDDF9ULL, 0x4E78DA94432A9AB2ULL } }, /* XSUM_XXH128_withSecret_testdata[1341] */\n    { 1342, 0x0000000000000000ULL, { 0xC86247A8DB10780DULL, 0x65EE68CD00E562E5ULL } }, /* XSUM_XXH128_withSecret_testdata[1342] */\n    { 1343, 0x0000000000000000ULL, { 0xB8287244C41F84CAULL, 0xFBFCC7B968E2E325ULL } }, /* XSUM_XXH128_withSecret_testdata[1343] */\n    { 1344, 0x0000000000000000ULL, { 0xA4D4CD1EB538AAF2ULL, 0x891E790D93229323ULL } }, /* XSUM_XXH128_withSecret_testdata[1344] */\n    { 1345, 0x0000000000000000ULL, { 0x0B0ED86D8A98669CULL, 0xD4B3489382C02344ULL } }, /* XSUM_XXH128_withSecret_testdata[1345] */\n    { 1346, 0x0000000000000000ULL, { 0x4B045826F76D5C9BULL, 0xC67A606054C367B4ULL } }, /* XSUM_XXH128_withSecret_testdata[1346] */\n    { 1347, 0x0000000000000000ULL, { 0x0F352D87BD2D2A5EULL, 0xA9B00E773ACF2011ULL } }, /* XSUM_XXH128_withSecret_testdata[1347] */\n    { 1348, 0x0000000000000000ULL, { 0x0161262E6584CACEULL, 0xD023A3F6EA0EC0B9ULL } }, /* XSUM_XXH128_withSecret_testdata[1348] */\n    { 1349, 0x0000000000000000ULL, { 0x3FD1CA8714F715BFULL, 0x8129929FDC8E5C83ULL } }, /* XSUM_XXH128_withSecret_testdata[1349] */\n    { 1350, 0x0000000000000000ULL, { 0x2889F452FF13791CULL, 0x423FF8EC2F1A43C3ULL } }, /* XSUM_XXH128_withSecret_testdata[1350] */\n    { 1351, 0x0000000000000000ULL, { 0x6658548D5D914D3EULL, 0xD76F53578E277D6CULL } }, /* XSUM_XXH128_withSecret_testdata[1351] */\n    { 1352, 0x0000000000000000ULL, { 0xCC30345A1184FA4DULL, 0xB6D533CAF36069FBULL } }, /* XSUM_XXH128_withSecret_testdata[1352] */\n    { 1353, 0x0000000000000000ULL, { 0x32C9DB4DD75C3465ULL, 0x845B844AE0E5C771ULL } }, /* XSUM_XXH128_withSecret_testdata[1353] */\n    { 1354, 0x0000000000000000ULL, { 0xA3314658723A788EULL, 0xDCA189C1B705982CULL } }, /* XSUM_XXH128_withSecret_testdata[1354] */\n    { 1355, 0x0000000000000000ULL, { 0x55E1274E9CBC37AFULL, 0xE08B6A4E5ED023B6ULL } }, /* XSUM_XXH128_withSecret_testdata[1355] */\n    { 1356, 0x0000000000000000ULL, { 0xDEEF4DC4B394BEDBULL, 0xE3298697737EC43CULL } }, /* XSUM_XXH128_withSecret_testdata[1356] */\n    { 1357, 0x0000000000000000ULL, { 0x313BC7A45BED6865ULL, 0x8E247B2EB82E2691ULL } }, /* XSUM_XXH128_withSecret_testdata[1357] */\n    { 1358, 0x0000000000000000ULL, { 0x57297121D1B7D1E0ULL, 0xBEC349946325229CULL } }, /* XSUM_XXH128_withSecret_testdata[1358] */\n    { 1359, 0x0000000000000000ULL, { 0x913742F691445D60ULL, 0x4F8C789430DE6592ULL } }, /* XSUM_XXH128_withSecret_testdata[1359] */\n    { 1360, 0x0000000000000000ULL, { 0x489983AE80D732ECULL, 0x12043FA34322CA67ULL } }, /* XSUM_XXH128_withSecret_testdata[1360] */\n    { 1361, 0x0000000000000000ULL, { 0x7213A1A7FD59E105ULL, 0x1E02E9213EE979BCULL } }, /* XSUM_XXH128_withSecret_testdata[1361] */\n    { 1362, 0x0000000000000000ULL, { 0x2DD2971B61A24DDEULL, 0x27DDE7B28C8C5F67ULL } }, /* XSUM_XXH128_withSecret_testdata[1362] */\n    { 1363, 0x0000000000000000ULL, { 0x8CFC1ED61F2AFA6DULL, 0x2B77B9D6FB53DFD6ULL } }, /* XSUM_XXH128_withSecret_testdata[1363] */\n    { 1364, 0x0000000000000000ULL, { 0x9A669204AD01AE3CULL, 0xFA95EC582826854EULL } }, /* XSUM_XXH128_withSecret_testdata[1364] */\n    { 1365, 0x0000000000000000ULL, { 0xB43133C814D37F9BULL, 0x2FAA95F9FBACE5F0ULL } }, /* XSUM_XXH128_withSecret_testdata[1365] */\n    { 1366, 0x0000000000000000ULL, { 0xF0607F89A0028E13ULL, 0x74759E6B062C7D04ULL } }, /* XSUM_XXH128_withSecret_testdata[1366] */\n    { 1367, 0x0000000000000000ULL, { 0x02F95A6892D5FDF5ULL, 0xE0C8DA1A0986F020ULL } }, /* XSUM_XXH128_withSecret_testdata[1367] */\n    { 1368, 0x0000000000000000ULL, { 0x1FC4256EDE0F7D5CULL, 0x128589AEB9846173ULL } }, /* XSUM_XXH128_withSecret_testdata[1368] */\n    { 1369, 0x0000000000000000ULL, { 0x02348B5D138A22CDULL, 0xA43CCCB6EBA57F58ULL } }, /* XSUM_XXH128_withSecret_testdata[1369] */\n    { 1370, 0x0000000000000000ULL, { 0x769EB83BD8470425ULL, 0x9A6153088901D188ULL } }, /* XSUM_XXH128_withSecret_testdata[1370] */\n    { 1371, 0x0000000000000000ULL, { 0x8E1F11C7BC124DCBULL, 0x3F2021781A35863BULL } }, /* XSUM_XXH128_withSecret_testdata[1371] */\n    { 1372, 0x0000000000000000ULL, { 0xC7EEDADD53CD2C1FULL, 0xA62928534139ECF8ULL } }, /* XSUM_XXH128_withSecret_testdata[1372] */\n    { 1373, 0x0000000000000000ULL, { 0x7EE46BBE70E984F7ULL, 0x8BFFFA7187128193ULL } }, /* XSUM_XXH128_withSecret_testdata[1373] */\n    { 1374, 0x0000000000000000ULL, { 0xF0CDEEEA3466E488ULL, 0xED312636B06E646FULL } }, /* XSUM_XXH128_withSecret_testdata[1374] */\n    { 1375, 0x0000000000000000ULL, { 0xD459006BAE6290B1ULL, 0x174FB33A5F3B9524ULL } }, /* XSUM_XXH128_withSecret_testdata[1375] */\n    { 1376, 0x0000000000000000ULL, { 0x14E4991605F37CD7ULL, 0xFE2B8208435CEFF1ULL } }, /* XSUM_XXH128_withSecret_testdata[1376] */\n    { 1377, 0x0000000000000000ULL, { 0x4E6B79C2847AA59BULL, 0x1B21543C2DEA5EA2ULL } }, /* XSUM_XXH128_withSecret_testdata[1377] */\n    { 1378, 0x0000000000000000ULL, { 0xD6461CA4956C3204ULL, 0x2010649BE6BEF5A4ULL } }, /* XSUM_XXH128_withSecret_testdata[1378] */\n    { 1379, 0x0000000000000000ULL, { 0xDDBA221F4BF6C519ULL, 0xB6BBFCE9CC2AC247ULL } }, /* XSUM_XXH128_withSecret_testdata[1379] */\n    { 1380, 0x0000000000000000ULL, { 0x0B2230A1B569AA9BULL, 0x0D25E669779044E7ULL } }, /* XSUM_XXH128_withSecret_testdata[1380] */\n    { 1381, 0x0000000000000000ULL, { 0x25EF2299E0CBC6CAULL, 0x1C64278054A2E455ULL } }, /* XSUM_XXH128_withSecret_testdata[1381] */\n    { 1382, 0x0000000000000000ULL, { 0xC4B36FCBFA31C554ULL, 0xEE668F79AEF0A7F8ULL } }, /* XSUM_XXH128_withSecret_testdata[1382] */\n    { 1383, 0x0000000000000000ULL, { 0xD6D7671AF406DA16ULL, 0x42FF33F3FDEB3ED8ULL } }, /* XSUM_XXH128_withSecret_testdata[1383] */\n    { 1384, 0x0000000000000000ULL, { 0x5BAE5DC9E6E5F381ULL, 0xADDCF823F25F3A5BULL } }, /* XSUM_XXH128_withSecret_testdata[1384] */\n    { 1385, 0x0000000000000000ULL, { 0x17DE1CA5FB745BFBULL, 0x7C7F509D3D06BDA5ULL } }, /* XSUM_XXH128_withSecret_testdata[1385] */\n    { 1386, 0x0000000000000000ULL, { 0xA1237AD4519070F8ULL, 0xB3731295B781C144ULL } }, /* XSUM_XXH128_withSecret_testdata[1386] */\n    { 1387, 0x0000000000000000ULL, { 0xCCC5A02338D61784ULL, 0x46519F7CA62CF7B2ULL } }, /* XSUM_XXH128_withSecret_testdata[1387] */\n    { 1388, 0x0000000000000000ULL, { 0x98E931D2B81745CEULL, 0xFE14513AAD55BEFEULL } }, /* XSUM_XXH128_withSecret_testdata[1388] */\n    { 1389, 0x0000000000000000ULL, { 0xAA114F0C757036E3ULL, 0xCA3C9CCE7C779D7CULL } }, /* XSUM_XXH128_withSecret_testdata[1389] */\n    { 1390, 0x0000000000000000ULL, { 0xAAB5D2F62EF80779ULL, 0x2215A23CEAC3232AULL } }, /* XSUM_XXH128_withSecret_testdata[1390] */\n    { 1391, 0x0000000000000000ULL, { 0x63C03FFD8A52E4B2ULL, 0xB62A589F1BD31589ULL } }, /* XSUM_XXH128_withSecret_testdata[1391] */\n    { 1392, 0x0000000000000000ULL, { 0x528D9C34036F69F3ULL, 0x97C5A350BEB424CFULL } }, /* XSUM_XXH128_withSecret_testdata[1392] */\n    { 1393, 0x0000000000000000ULL, { 0x420ED6C9BAF1BD6CULL, 0x20C27BC717C209D0ULL } }, /* XSUM_XXH128_withSecret_testdata[1393] */\n    { 1394, 0x0000000000000000ULL, { 0x9858FCBFF7AD61C7ULL, 0x533EF8B38C27094EULL } }, /* XSUM_XXH128_withSecret_testdata[1394] */\n    { 1395, 0x0000000000000000ULL, { 0x078D2E1BAEAC8ED3ULL, 0x9E375FE38AA3A18AULL } }, /* XSUM_XXH128_withSecret_testdata[1395] */\n    { 1396, 0x0000000000000000ULL, { 0x76CDEEB41FB0C12AULL, 0x3F58456395C5FEF1ULL } }, /* XSUM_XXH128_withSecret_testdata[1396] */\n    { 1397, 0x0000000000000000ULL, { 0xEACEEF02615156F9ULL, 0xCC1322B1D436CDBDULL } }, /* XSUM_XXH128_withSecret_testdata[1397] */\n    { 1398, 0x0000000000000000ULL, { 0xB8D39A816267F1DDULL, 0x780430FA5D842319ULL } }, /* XSUM_XXH128_withSecret_testdata[1398] */\n    { 1399, 0x0000000000000000ULL, { 0x5994BF3CE38FB2E1ULL, 0xAF7243AC2D031E63ULL } }, /* XSUM_XXH128_withSecret_testdata[1399] */\n    { 1400, 0x0000000000000000ULL, { 0x6D91347F36D08F36ULL, 0x596AF228B1DA2064ULL } }, /* XSUM_XXH128_withSecret_testdata[1400] */\n    { 1401, 0x0000000000000000ULL, { 0x1DE7C00E0969BDBEULL, 0x727DDBE05C3D4CEEULL } }, /* XSUM_XXH128_withSecret_testdata[1401] */\n    { 1402, 0x0000000000000000ULL, { 0x583C26C46085BE1AULL, 0xD7729397925BE77EULL } }, /* XSUM_XXH128_withSecret_testdata[1402] */\n    { 1403, 0x0000000000000000ULL, { 0xBEEC35ADCB348DAFULL, 0x28E8B7FA33E7B8DBULL } }, /* XSUM_XXH128_withSecret_testdata[1403] */\n    { 1404, 0x0000000000000000ULL, { 0xAFBD331DC6E4386EULL, 0x4C9F052C446FAE25ULL } }, /* XSUM_XXH128_withSecret_testdata[1404] */\n    { 1405, 0x0000000000000000ULL, { 0x9559937A90665EE5ULL, 0xD90F9552E89AADEFULL } }, /* XSUM_XXH128_withSecret_testdata[1405] */\n    { 1406, 0x0000000000000000ULL, { 0x40116694DD7AAA11ULL, 0xAC1D0586334BCB15ULL } }, /* XSUM_XXH128_withSecret_testdata[1406] */\n    { 1407, 0x0000000000000000ULL, { 0xB82A445942E93521ULL, 0x27E52E57175958BFULL } }, /* XSUM_XXH128_withSecret_testdata[1407] */\n    { 1408, 0x0000000000000000ULL, { 0x02C47388A3111151ULL, 0xD4BFDF5559290BBCULL } }, /* XSUM_XXH128_withSecret_testdata[1408] */\n    { 1409, 0x0000000000000000ULL, { 0xB8AA13002E7B2AD5ULL, 0x667E297A9AEF17D4ULL } }, /* XSUM_XXH128_withSecret_testdata[1409] */\n    { 1410, 0x0000000000000000ULL, { 0x25B30179D77075A2ULL, 0x08827878430D674AULL } }, /* XSUM_XXH128_withSecret_testdata[1410] */\n    { 1411, 0x0000000000000000ULL, { 0x970C7B6FDB288922ULL, 0x7A977CE72280E709ULL } }, /* XSUM_XXH128_withSecret_testdata[1411] */\n    { 1412, 0x0000000000000000ULL, { 0xC4306C0F33D4E63BULL, 0x2DEC705EDF9A1C08ULL } }, /* XSUM_XXH128_withSecret_testdata[1412] */\n    { 1413, 0x0000000000000000ULL, { 0xF3E192D4034202A2ULL, 0xAABEC80CCCE02C46ULL } }, /* XSUM_XXH128_withSecret_testdata[1413] */\n    { 1414, 0x0000000000000000ULL, { 0xE5E6820E28353565ULL, 0x221A742211F36D62ULL } }, /* XSUM_XXH128_withSecret_testdata[1414] */\n    { 1415, 0x0000000000000000ULL, { 0x45F2455297796FB1ULL, 0xC5C4472F21540966ULL } }, /* XSUM_XXH128_withSecret_testdata[1415] */\n    { 1416, 0x0000000000000000ULL, { 0xBB08A3CD1068D556ULL, 0x48DF74488E2228B7ULL } }, /* XSUM_XXH128_withSecret_testdata[1416] */\n    { 1417, 0x0000000000000000ULL, { 0x8A3267871B458F55ULL, 0x98C4259679046C6CULL } }, /* XSUM_XXH128_withSecret_testdata[1417] */\n    { 1418, 0x0000000000000000ULL, { 0x1638764CF805F94FULL, 0x15BBF72B4D246042ULL } }, /* XSUM_XXH128_withSecret_testdata[1418] */\n    { 1419, 0x0000000000000000ULL, { 0x34496200B255B27FULL, 0xDBF4BDBD2264F6C9ULL } }, /* XSUM_XXH128_withSecret_testdata[1419] */\n    { 1420, 0x0000000000000000ULL, { 0xDD4BC2E2F82B1C2EULL, 0x0923D20B99711ACDULL } }, /* XSUM_XXH128_withSecret_testdata[1420] */\n    { 1421, 0x0000000000000000ULL, { 0xEB1A9397DFCFFD59ULL, 0x85A9ABFEC560FF8BULL } }, /* XSUM_XXH128_withSecret_testdata[1421] */\n    { 1422, 0x0000000000000000ULL, { 0x1CB9BBFC1E6A953AULL, 0xAC99AAD02BD5FCD3ULL } }, /* XSUM_XXH128_withSecret_testdata[1422] */\n    { 1423, 0x0000000000000000ULL, { 0x94D77548A18A149DULL, 0xB4D454032EC15766ULL } }, /* XSUM_XXH128_withSecret_testdata[1423] */\n    { 1424, 0x0000000000000000ULL, { 0x5B642D3E95D6C3FBULL, 0xC96422221CEC1B78ULL } }, /* XSUM_XXH128_withSecret_testdata[1424] */\n    { 1425, 0x0000000000000000ULL, { 0x732EE523654D619DULL, 0x51DE4291FD547697ULL } }, /* XSUM_XXH128_withSecret_testdata[1425] */\n    { 1426, 0x0000000000000000ULL, { 0x08EE73C403588B89ULL, 0x5DA87961B39F08CAULL } }, /* XSUM_XXH128_withSecret_testdata[1426] */\n    { 1427, 0x0000000000000000ULL, { 0xBC2120E7C3C28258ULL, 0xE58D1311CE92BF3AULL } }, /* XSUM_XXH128_withSecret_testdata[1427] */\n    { 1428, 0x0000000000000000ULL, { 0x323B99D646505E1BULL, 0xB270DBA3D4B14D34ULL } }, /* XSUM_XXH128_withSecret_testdata[1428] */\n    { 1429, 0x0000000000000000ULL, { 0x04BB11F406DB02A5ULL, 0xA5BACB0BB5DF0782ULL } }, /* XSUM_XXH128_withSecret_testdata[1429] */\n    { 1430, 0x0000000000000000ULL, { 0x2CDAEB0037371D72ULL, 0xC660080F6D3710EEULL } }, /* XSUM_XXH128_withSecret_testdata[1430] */\n    { 1431, 0x0000000000000000ULL, { 0xDFE286A81E9CB8ADULL, 0x046FB0280602CC12ULL } }, /* XSUM_XXH128_withSecret_testdata[1431] */\n    { 1432, 0x0000000000000000ULL, { 0xFEB49ACC6A4BC21BULL, 0xE6430E5500301F55ULL } }, /* XSUM_XXH128_withSecret_testdata[1432] */\n    { 1433, 0x0000000000000000ULL, { 0xDA1B59366DDA2736ULL, 0xD0FE04896276A351ULL } }, /* XSUM_XXH128_withSecret_testdata[1433] */\n    { 1434, 0x0000000000000000ULL, { 0xB32AF872B9AD7B6FULL, 0x8DC2AE0B7689AD58ULL } }, /* XSUM_XXH128_withSecret_testdata[1434] */\n    { 1435, 0x0000000000000000ULL, { 0x941E87EB0AA89CE0ULL, 0xF1207C65BADE925DULL } }, /* XSUM_XXH128_withSecret_testdata[1435] */\n    { 1436, 0x0000000000000000ULL, { 0x4266A95A8D49739CULL, 0x43CE67E9F6E9087AULL } }, /* XSUM_XXH128_withSecret_testdata[1436] */\n    { 1437, 0x0000000000000000ULL, { 0xD2C604962750D4F5ULL, 0x9C9E01C80E4FBDFEULL } }, /* XSUM_XXH128_withSecret_testdata[1437] */\n    { 1438, 0x0000000000000000ULL, { 0xAD664A49281622EAULL, 0x28FDEF0786F6F34EULL } }, /* XSUM_XXH128_withSecret_testdata[1438] */\n    { 1439, 0x0000000000000000ULL, { 0x550E77E8A0DF4278ULL, 0xC560BADD0AEB08CFULL } }, /* XSUM_XXH128_withSecret_testdata[1439] */\n    { 1440, 0x0000000000000000ULL, { 0x84DCC5BCBBD6BFE1ULL, 0x00B4A3F2D92214BEULL } }, /* XSUM_XXH128_withSecret_testdata[1440] */\n    { 1441, 0x0000000000000000ULL, { 0xF171A82750101FB4ULL, 0x4DE0FBC3F1D114DEULL } }, /* XSUM_XXH128_withSecret_testdata[1441] */\n    { 1442, 0x0000000000000000ULL, { 0x7EE49B0C3C0A4AECULL, 0xBCF7F317915B6769ULL } }, /* XSUM_XXH128_withSecret_testdata[1442] */\n    { 1443, 0x0000000000000000ULL, { 0x06B1CAF38CCFFA57ULL, 0x19A2AF25EC1B67CEULL } }, /* XSUM_XXH128_withSecret_testdata[1443] */\n    { 1444, 0x0000000000000000ULL, { 0x6D26181748CC55FBULL, 0xD8BE1B236744B605ULL } }, /* XSUM_XXH128_withSecret_testdata[1444] */\n    { 1445, 0x0000000000000000ULL, { 0x3AEA776E1F1770BFULL, 0xF123487DF6F089F8ULL } }, /* XSUM_XXH128_withSecret_testdata[1445] */\n    { 1446, 0x0000000000000000ULL, { 0x755AB27728FCF4EFULL, 0x6CBFFAF0069D02ABULL } }, /* XSUM_XXH128_withSecret_testdata[1446] */\n    { 1447, 0x0000000000000000ULL, { 0x1CA7EA1B4B7398F9ULL, 0xB9BDB7E2340C1F9BULL } }, /* XSUM_XXH128_withSecret_testdata[1447] */\n    { 1448, 0x0000000000000000ULL, { 0x02448134164C4068ULL, 0x0146C1E97805316EULL } }, /* XSUM_XXH128_withSecret_testdata[1448] */\n    { 1449, 0x0000000000000000ULL, { 0xFD5B9CF13FE58C85ULL, 0x4930FBB3484049B7ULL } }, /* XSUM_XXH128_withSecret_testdata[1449] */\n    { 1450, 0x0000000000000000ULL, { 0x9801D4DDCD3513BEULL, 0xB33D782A5017CD85ULL } }, /* XSUM_XXH128_withSecret_testdata[1450] */\n    { 1451, 0x0000000000000000ULL, { 0x651340C38D9A1EEAULL, 0xBB1EDB7AD7EF46FBULL } }, /* XSUM_XXH128_withSecret_testdata[1451] */\n    { 1452, 0x0000000000000000ULL, { 0x77EBF1883BBAC649ULL, 0xC9DE62AEA93FB455ULL } }, /* XSUM_XXH128_withSecret_testdata[1452] */\n    { 1453, 0x0000000000000000ULL, { 0x4A3A724827460C8FULL, 0xEC3C29345B392512ULL } }, /* XSUM_XXH128_withSecret_testdata[1453] */\n    { 1454, 0x0000000000000000ULL, { 0x93AD20742E286C96ULL, 0x15E4D3B04C38287BULL } }, /* XSUM_XXH128_withSecret_testdata[1454] */\n    { 1455, 0x0000000000000000ULL, { 0x4638CA4E88FE3480ULL, 0x2749D7E66C0D0E5FULL } }, /* XSUM_XXH128_withSecret_testdata[1455] */\n    { 1456, 0x0000000000000000ULL, { 0xD363EE4842B69F4DULL, 0xC66126DC58049434ULL } }, /* XSUM_XXH128_withSecret_testdata[1456] */\n    { 1457, 0x0000000000000000ULL, { 0x43E03B2471EAE066ULL, 0x0CE16DD7C976C5F7ULL } }, /* XSUM_XXH128_withSecret_testdata[1457] */\n    { 1458, 0x0000000000000000ULL, { 0x18E733421644F2EBULL, 0xDD06F1CAED324B69ULL } }, /* XSUM_XXH128_withSecret_testdata[1458] */\n    { 1459, 0x0000000000000000ULL, { 0x2BF5663715849BC0ULL, 0x225CC6D48EA1B7C6ULL } }, /* XSUM_XXH128_withSecret_testdata[1459] */\n    { 1460, 0x0000000000000000ULL, { 0x75C50907EFEF26EAULL, 0x2BBA44AEA132C93AULL } }, /* XSUM_XXH128_withSecret_testdata[1460] */\n    { 1461, 0x0000000000000000ULL, { 0xFEE3B16CDD0D7476ULL, 0xAB95923E337A4958ULL } }, /* XSUM_XXH128_withSecret_testdata[1461] */\n    { 1462, 0x0000000000000000ULL, { 0x962B8A19330A46F7ULL, 0xDE81E1DCF559714EULL } }, /* XSUM_XXH128_withSecret_testdata[1462] */\n    { 1463, 0x0000000000000000ULL, { 0x6D87ECF619EDACA6ULL, 0xFBE486A19382AC5BULL } }, /* XSUM_XXH128_withSecret_testdata[1463] */\n    { 1464, 0x0000000000000000ULL, { 0x602E6D6A3853CA99ULL, 0xDA0A984EC4ED9DF0ULL } }, /* XSUM_XXH128_withSecret_testdata[1464] */\n    { 1465, 0x0000000000000000ULL, { 0x639C9DD50F215D37ULL, 0x6647A730CD0CA90DULL } }, /* XSUM_XXH128_withSecret_testdata[1465] */\n    { 1466, 0x0000000000000000ULL, { 0xF81F9A2366D05732ULL, 0x1E668F9137CF7C13ULL } }, /* XSUM_XXH128_withSecret_testdata[1466] */\n    { 1467, 0x0000000000000000ULL, { 0x921B8FC56EFF4938ULL, 0x98D166ADF31DD0DDULL } }, /* XSUM_XXH128_withSecret_testdata[1467] */\n    { 1468, 0x0000000000000000ULL, { 0xF17BDFB887F43B8BULL, 0x86147612D6AA4F0DULL } }, /* XSUM_XXH128_withSecret_testdata[1468] */\n    { 1469, 0x0000000000000000ULL, { 0x58795B2755E3C94BULL, 0xFA5A206F1BFFF916ULL } }, /* XSUM_XXH128_withSecret_testdata[1469] */\n    { 1470, 0x0000000000000000ULL, { 0xE396B152BDEFE195ULL, 0xD311AF3B68E407B0ULL } }, /* XSUM_XXH128_withSecret_testdata[1470] */\n    { 1471, 0x0000000000000000ULL, { 0x842AB048580B7330ULL, 0x00FF581A1465DBF1ULL } }, /* XSUM_XXH128_withSecret_testdata[1471] */\n    { 1472, 0x0000000000000000ULL, { 0x156DEF4CAB5718C6ULL, 0x30042B4149C48E00ULL } }, /* XSUM_XXH128_withSecret_testdata[1472] */\n    { 1473, 0x0000000000000000ULL, { 0xF6CD1ECC31D2665FULL, 0xA81FA8E97A5A9786ULL } }, /* XSUM_XXH128_withSecret_testdata[1473] */\n    { 1474, 0x0000000000000000ULL, { 0x0E2E2A87645BEA7FULL, 0xB7BC42E6F0AEBD19ULL } }, /* XSUM_XXH128_withSecret_testdata[1474] */\n    { 1475, 0x0000000000000000ULL, { 0x10FC1D4A3AAFB892ULL, 0xCA10804232172D7EULL } }, /* XSUM_XXH128_withSecret_testdata[1475] */\n    { 1476, 0x0000000000000000ULL, { 0x326FB3992B7C6656ULL, 0xA025C2A694C20869ULL } }, /* XSUM_XXH128_withSecret_testdata[1476] */\n    { 1477, 0x0000000000000000ULL, { 0x720055F94021470BULL, 0xC5CA6F3271E56734ULL } }, /* XSUM_XXH128_withSecret_testdata[1477] */\n    { 1478, 0x0000000000000000ULL, { 0x2C27EC8E23D4A26FULL, 0xF9067724B038771DULL } }, /* XSUM_XXH128_withSecret_testdata[1478] */\n    { 1479, 0x0000000000000000ULL, { 0x7C86FBA1CE126A67ULL, 0x6EA143522F393E2FULL } }, /* XSUM_XXH128_withSecret_testdata[1479] */\n    { 1480, 0x0000000000000000ULL, { 0xA2E3DD5CDB96E9B8ULL, 0x7931B289C0667366ULL } }, /* XSUM_XXH128_withSecret_testdata[1480] */\n    { 1481, 0x0000000000000000ULL, { 0x9B6E8326AF521732ULL, 0x4CAB8C445F6C6EADULL } }, /* XSUM_XXH128_withSecret_testdata[1481] */\n    { 1482, 0x0000000000000000ULL, { 0x0DD26DC26C67C870ULL, 0xDC37FAD6E2F955A4ULL } }, /* XSUM_XXH128_withSecret_testdata[1482] */\n    { 1483, 0x0000000000000000ULL, { 0xDF2EAD57662B2119ULL, 0x2FD85CD13D3538E5ULL } }, /* XSUM_XXH128_withSecret_testdata[1483] */\n    { 1484, 0x0000000000000000ULL, { 0xF4F828C9432372F1ULL, 0xECDB79F1507B2141ULL } }, /* XSUM_XXH128_withSecret_testdata[1484] */\n    { 1485, 0x0000000000000000ULL, { 0x2F87F791C7EEC150ULL, 0x1723F6412E5AFD0BULL } }, /* XSUM_XXH128_withSecret_testdata[1485] */\n    { 1486, 0x0000000000000000ULL, { 0xB8D09106EA4AF4EAULL, 0x2B3CDAD73E846A23ULL } }, /* XSUM_XXH128_withSecret_testdata[1486] */\n    { 1487, 0x0000000000000000ULL, { 0x254E4EBABB62AB6AULL, 0x860435378C772FC9ULL } }, /* XSUM_XXH128_withSecret_testdata[1487] */\n    { 1488, 0x0000000000000000ULL, { 0xA66C49C2052C3C32ULL, 0x64DB2629CFF0A13EULL } }, /* XSUM_XXH128_withSecret_testdata[1488] */\n    { 1489, 0x0000000000000000ULL, { 0x4BD128B01C399EA6ULL, 0x8CFEFBC2FFE8DC8FULL } }, /* XSUM_XXH128_withSecret_testdata[1489] */\n    { 1490, 0x0000000000000000ULL, { 0x41B5366204D791CBULL, 0x9E323D0DA5672285ULL } }, /* XSUM_XXH128_withSecret_testdata[1490] */\n    { 1491, 0x0000000000000000ULL, { 0x5518478FD7F6D78FULL, 0xFE189B2875CE365BULL } }, /* XSUM_XXH128_withSecret_testdata[1491] */\n    { 1492, 0x0000000000000000ULL, { 0x144E7A95EE920229ULL, 0xC9353BA639C1A824ULL } }, /* XSUM_XXH128_withSecret_testdata[1492] */\n    { 1493, 0x0000000000000000ULL, { 0x97310E5B1F4BCC47ULL, 0xFAFD395879F0CFB4ULL } }, /* XSUM_XXH128_withSecret_testdata[1493] */\n    { 1494, 0x0000000000000000ULL, { 0xD06C471AADFA71BAULL, 0xC26D952BCCF31F39ULL } }, /* XSUM_XXH128_withSecret_testdata[1494] */\n    { 1495, 0x0000000000000000ULL, { 0x8165BE3BF3C8CB7AULL, 0x2EE6D0D4E462406CULL } }, /* XSUM_XXH128_withSecret_testdata[1495] */\n    { 1496, 0x0000000000000000ULL, { 0xC0A2AE3FC71C0DC9ULL, 0x146AAE8A882E241FULL } }, /* XSUM_XXH128_withSecret_testdata[1496] */\n    { 1497, 0x0000000000000000ULL, { 0x09795832DB2F7376ULL, 0x32C10925A42D554FULL } }, /* XSUM_XXH128_withSecret_testdata[1497] */\n    { 1498, 0x0000000000000000ULL, { 0x82CF71C8BBC60BE1ULL, 0xFEABB1ABDE3AE350ULL } }, /* XSUM_XXH128_withSecret_testdata[1498] */\n    { 1499, 0x0000000000000000ULL, { 0xBB61264AD362D930ULL, 0x30F8D8FEF95E33A3ULL } }, /* XSUM_XXH128_withSecret_testdata[1499] */\n    { 1500, 0x0000000000000000ULL, { 0x3B38381C80B00F79ULL, 0x078493317F67BDEEULL } }, /* XSUM_XXH128_withSecret_testdata[1500] */\n    { 1501, 0x0000000000000000ULL, { 0x02ED1B074BE91143ULL, 0x8BEB282D250BB805ULL } }, /* XSUM_XXH128_withSecret_testdata[1501] */\n    { 1502, 0x0000000000000000ULL, { 0x0492A4AFAC8C52EDULL, 0x335563A164FE3ED7ULL } }, /* XSUM_XXH128_withSecret_testdata[1502] */\n    { 1503, 0x0000000000000000ULL, { 0x41707564BEB2A166ULL, 0x48E9CC20CAC04B01ULL } }, /* XSUM_XXH128_withSecret_testdata[1503] */\n    { 1504, 0x0000000000000000ULL, { 0x801B6844619FD6A4ULL, 0x81DEAD747BFDC116ULL } }, /* XSUM_XXH128_withSecret_testdata[1504] */\n    { 1505, 0x0000000000000000ULL, { 0x38EE44C5E7E6F350ULL, 0xC76A94F76D114E78ULL } }, /* XSUM_XXH128_withSecret_testdata[1505] */\n    { 1506, 0x0000000000000000ULL, { 0x491383C0B1871230ULL, 0xEBCB3FF7F949DAC8ULL } }, /* XSUM_XXH128_withSecret_testdata[1506] */\n    { 1507, 0x0000000000000000ULL, { 0x06DF1E6DB070BD15ULL, 0x029B19D545C35D92ULL } }, /* XSUM_XXH128_withSecret_testdata[1507] */\n    { 1508, 0x0000000000000000ULL, { 0xACC617BF22DAC0CAULL, 0xA24DB94C57098451ULL } }, /* XSUM_XXH128_withSecret_testdata[1508] */\n    { 1509, 0x0000000000000000ULL, { 0x27647763439B3B6FULL, 0x9E370D1911850FCEULL } }, /* XSUM_XXH128_withSecret_testdata[1509] */\n    { 1510, 0x0000000000000000ULL, { 0xFB388226E5E566DDULL, 0x949D290442E451BEULL } }, /* XSUM_XXH128_withSecret_testdata[1510] */\n    { 1511, 0x0000000000000000ULL, { 0xCFFAE0EE63D45CEBULL, 0x62EF202D5BA68ADBULL } }, /* XSUM_XXH128_withSecret_testdata[1511] */\n    { 1512, 0x0000000000000000ULL, { 0x0045C1ADFE33D115ULL, 0xEE3B954B76238251ULL } }, /* XSUM_XXH128_withSecret_testdata[1512] */\n    { 1513, 0x0000000000000000ULL, { 0x2041DE1902485870ULL, 0x0C90CA77E3DAFC73ULL } }, /* XSUM_XXH128_withSecret_testdata[1513] */\n    { 1514, 0x0000000000000000ULL, { 0x752ED0BFE64491E4ULL, 0x40EB1595BEBCBAA3ULL } }, /* XSUM_XXH128_withSecret_testdata[1514] */\n    { 1515, 0x0000000000000000ULL, { 0xACF6520478022AE3ULL, 0xA7180B51CE069F97ULL } }, /* XSUM_XXH128_withSecret_testdata[1515] */\n    { 1516, 0x0000000000000000ULL, { 0xF92176A24CC1AC82ULL, 0x93F8E389AAB78F93ULL } }, /* XSUM_XXH128_withSecret_testdata[1516] */\n    { 1517, 0x0000000000000000ULL, { 0x972D0074898064AAULL, 0x3FFB8DEE0BA341DCULL } }, /* XSUM_XXH128_withSecret_testdata[1517] */\n    { 1518, 0x0000000000000000ULL, { 0x3BF9CDC5E8654E28ULL, 0x7681F862F8822AF1ULL } }, /* XSUM_XXH128_withSecret_testdata[1518] */\n    { 1519, 0x0000000000000000ULL, { 0x0424912948892A2DULL, 0xCFD378DE956FF859ULL } }, /* XSUM_XXH128_withSecret_testdata[1519] */\n    { 1520, 0x0000000000000000ULL, { 0x0C850FFD4E8D900AULL, 0x3F16018EE93FA9FEULL } }, /* XSUM_XXH128_withSecret_testdata[1520] */\n    { 1521, 0x0000000000000000ULL, { 0x30A4FB81E01891F6ULL, 0x1914CC9465EBCFAFULL } }, /* XSUM_XXH128_withSecret_testdata[1521] */\n    { 1522, 0x0000000000000000ULL, { 0xCA6B5F7264AC7212ULL, 0x400C4064E9EF2090ULL } }, /* XSUM_XXH128_withSecret_testdata[1522] */\n    { 1523, 0x0000000000000000ULL, { 0x0459F2C51EAE2D8FULL, 0x2E76F8F544307E32ULL } }, /* XSUM_XXH128_withSecret_testdata[1523] */\n    { 1524, 0x0000000000000000ULL, { 0x02F3F01168480D1DULL, 0x761C31FF63FD301FULL } }, /* XSUM_XXH128_withSecret_testdata[1524] */\n    { 1525, 0x0000000000000000ULL, { 0x5DA46A20A21BC416ULL, 0x96C592AA5044FE8AULL } }, /* XSUM_XXH128_withSecret_testdata[1525] */\n    { 1526, 0x0000000000000000ULL, { 0x8761BB27E289006BULL, 0x0F2BB4011812C453ULL } }, /* XSUM_XXH128_withSecret_testdata[1526] */\n    { 1527, 0x0000000000000000ULL, { 0x1FB705B86DFED16EULL, 0x5E25FEB571816DD8ULL } }, /* XSUM_XXH128_withSecret_testdata[1527] */\n    { 1528, 0x0000000000000000ULL, { 0xD84E37677B1A4025ULL, 0x6D5E0E595F76DF2FULL } }, /* XSUM_XXH128_withSecret_testdata[1528] */\n    { 1529, 0x0000000000000000ULL, { 0x103CF494565CD699ULL, 0x11A6CE24DA22C6E5ULL } }, /* XSUM_XXH128_withSecret_testdata[1529] */\n    { 1530, 0x0000000000000000ULL, { 0x64FCC3AC7F95A3B6ULL, 0x662416750927CE0FULL } }, /* XSUM_XXH128_withSecret_testdata[1530] */\n    { 1531, 0x0000000000000000ULL, { 0xF3B0049664EC7806ULL, 0xEEA2AC489D09A744ULL } }, /* XSUM_XXH128_withSecret_testdata[1531] */\n    { 1532, 0x0000000000000000ULL, { 0x7622E26C33FF525CULL, 0x80D7B90D8C9E0C3CULL } }, /* XSUM_XXH128_withSecret_testdata[1532] */\n    { 1533, 0x0000000000000000ULL, { 0xF910057B2F72A925ULL, 0x436399C5596AB3B7ULL } }, /* XSUM_XXH128_withSecret_testdata[1533] */\n    { 1534, 0x0000000000000000ULL, { 0xD6DE080F1BD67BB6ULL, 0x0EEE5CE121FCCD63ULL } }, /* XSUM_XXH128_withSecret_testdata[1534] */\n    { 1535, 0x0000000000000000ULL, { 0x010C1FC496F3D1C0ULL, 0x599434EE8F4F99C2ULL } }, /* XSUM_XXH128_withSecret_testdata[1535] */\n    { 1536, 0x0000000000000000ULL, { 0x5481CAC709A00547ULL, 0x9B43E9240FFB9F2DULL } }, /* XSUM_XXH128_withSecret_testdata[1536] */\n    { 1537, 0x0000000000000000ULL, { 0x49142C7D411F3ABBULL, 0x8E0857763EEAE55CULL } }, /* XSUM_XXH128_withSecret_testdata[1537] */\n    { 1538, 0x0000000000000000ULL, { 0xA87D244DFACBB7F7ULL, 0x6C4D77340FD5E879ULL } }, /* XSUM_XXH128_withSecret_testdata[1538] */\n    { 1539, 0x0000000000000000ULL, { 0x6E9DD1A63172A284ULL, 0xACEB01926E57E69FULL } }, /* XSUM_XXH128_withSecret_testdata[1539] */\n    { 1540, 0x0000000000000000ULL, { 0xE3E599C92E0E41BAULL, 0xDB75CFA6A44D5F91ULL } }, /* XSUM_XXH128_withSecret_testdata[1540] */\n    { 1541, 0x0000000000000000ULL, { 0xDDD5A3042B4832ABULL, 0xF11BBC273AADAF96ULL } }, /* XSUM_XXH128_withSecret_testdata[1541] */\n    { 1542, 0x0000000000000000ULL, { 0xADE9103FEED62C59ULL, 0x5317EC4B13828EB7ULL } }, /* XSUM_XXH128_withSecret_testdata[1542] */\n    { 1543, 0x0000000000000000ULL, { 0xB16127F2122E49F3ULL, 0x4FC5C47DAFF734D9ULL } }, /* XSUM_XXH128_withSecret_testdata[1543] */\n    { 1544, 0x0000000000000000ULL, { 0x5D5D8B07ECFC25DFULL, 0x7FCDF79BD44034F7ULL } }, /* XSUM_XXH128_withSecret_testdata[1544] */\n    { 1545, 0x0000000000000000ULL, { 0xA1C0A4CB4424231BULL, 0xA12D2A07326DCECFULL } }, /* XSUM_XXH128_withSecret_testdata[1545] */\n    { 1546, 0x0000000000000000ULL, { 0x747982BBE45543EFULL, 0x36B830124813BFCBULL } }, /* XSUM_XXH128_withSecret_testdata[1546] */\n    { 1547, 0x0000000000000000ULL, { 0x9ECCEA6659D59EDCULL, 0x4E7FE625028D2E96ULL } }, /* XSUM_XXH128_withSecret_testdata[1547] */\n    { 1548, 0x0000000000000000ULL, { 0x38769A9591DD2D12ULL, 0xF17160DC7F682E39ULL } }, /* XSUM_XXH128_withSecret_testdata[1548] */\n    { 1549, 0x0000000000000000ULL, { 0x027F6C6D14CCF327ULL, 0x760EDA013FD76603ULL } }, /* XSUM_XXH128_withSecret_testdata[1549] */\n    { 1550, 0x0000000000000000ULL, { 0xDE5498324B8F85A4ULL, 0xFFD66410E70BEDE0ULL } }, /* XSUM_XXH128_withSecret_testdata[1550] */\n    { 1551, 0x0000000000000000ULL, { 0xB536DD44995AFC76ULL, 0x73CDFA14D8F8EB31ULL } }, /* XSUM_XXH128_withSecret_testdata[1551] */\n    { 1552, 0x0000000000000000ULL, { 0x770720AFAB500B79ULL, 0x8AC71A0E5F75634BULL } }, /* XSUM_XXH128_withSecret_testdata[1552] */\n    { 1553, 0x0000000000000000ULL, { 0x06D08A6EFB7981ACULL, 0x6BFDCBAF130C1117ULL } }, /* XSUM_XXH128_withSecret_testdata[1553] */\n    { 1554, 0x0000000000000000ULL, { 0xB41B472B821086DDULL, 0x513A5EA565ACAD90ULL } }, /* XSUM_XXH128_withSecret_testdata[1554] */\n    { 1555, 0x0000000000000000ULL, { 0x242E5AE5EEF53F40ULL, 0xEB9A684DDEF624F7ULL } }, /* XSUM_XXH128_withSecret_testdata[1555] */\n    { 1556, 0x0000000000000000ULL, { 0x35FAA23CCE3198F2ULL, 0xF0FA60B4881298D2ULL } }, /* XSUM_XXH128_withSecret_testdata[1556] */\n    { 1557, 0x0000000000000000ULL, { 0xD23B5C173B99B35BULL, 0xCFC887FC00EAF66AULL } }, /* XSUM_XXH128_withSecret_testdata[1557] */\n    { 1558, 0x0000000000000000ULL, { 0xA33782D76DDC38EBULL, 0x5E908C4AAA86E984ULL } }, /* XSUM_XXH128_withSecret_testdata[1558] */\n    { 1559, 0x0000000000000000ULL, { 0x9E5A86B789766272ULL, 0x965299942D320A2FULL } }, /* XSUM_XXH128_withSecret_testdata[1559] */\n    { 1560, 0x0000000000000000ULL, { 0xB507A75CF1020B56ULL, 0xEBF52521D791C5A1ULL } }, /* XSUM_XXH128_withSecret_testdata[1560] */\n    { 1561, 0x0000000000000000ULL, { 0x6124EB9E1634FC72ULL, 0x71D7B07765BC07A0ULL } }, /* XSUM_XXH128_withSecret_testdata[1561] */\n    { 1562, 0x0000000000000000ULL, { 0xEE3BD02C1CE375CAULL, 0x03D00C2AAB65A238ULL } }, /* XSUM_XXH128_withSecret_testdata[1562] */\n    { 1563, 0x0000000000000000ULL, { 0xECA0D51E89F2E7ECULL, 0x98BC89F11336C53BULL } }, /* XSUM_XXH128_withSecret_testdata[1563] */\n    { 1564, 0x0000000000000000ULL, { 0xCE30CFCB000C0C5FULL, 0xB19946328CE6A3CCULL } }, /* XSUM_XXH128_withSecret_testdata[1564] */\n    { 1565, 0x0000000000000000ULL, { 0x14F3CDA1154E344DULL, 0x5A145871C5C0E091ULL } }, /* XSUM_XXH128_withSecret_testdata[1565] */\n    { 1566, 0x0000000000000000ULL, { 0x116A649F8D9706A2ULL, 0x503121A0971FE1BAULL } }, /* XSUM_XXH128_withSecret_testdata[1566] */\n    { 1567, 0x0000000000000000ULL, { 0xA28D05E3EA45CA69ULL, 0x9CB8EA55B04F2B5FULL } }, /* XSUM_XXH128_withSecret_testdata[1567] */\n    { 1568, 0x0000000000000000ULL, { 0x710FD06512AA5BE8ULL, 0x86C21CBB4D65FF80ULL } }, /* XSUM_XXH128_withSecret_testdata[1568] */\n    { 1569, 0x0000000000000000ULL, { 0x784391AF1A9BA1B7ULL, 0x368D0EF3C25B95A2ULL } }, /* XSUM_XXH128_withSecret_testdata[1569] */\n    { 1570, 0x0000000000000000ULL, { 0x79FA23ABB58BBCFFULL, 0xEBF9E4DFB48F77B2ULL } }, /* XSUM_XXH128_withSecret_testdata[1570] */\n    { 1571, 0x0000000000000000ULL, { 0x1DA468E8064598A5ULL, 0x2B7EDCD25B09EF70ULL } }, /* XSUM_XXH128_withSecret_testdata[1571] */\n    { 1572, 0x0000000000000000ULL, { 0xB4C4FD66D826C688ULL, 0x03D60F2E20EB3C97ULL } }, /* XSUM_XXH128_withSecret_testdata[1572] */\n    { 1573, 0x0000000000000000ULL, { 0x35D164F09F1FB56DULL, 0x3B745972A4B7EA05ULL } }, /* XSUM_XXH128_withSecret_testdata[1573] */\n    { 1574, 0x0000000000000000ULL, { 0x448F80DC191044CEULL, 0x9F684EF83E2B9407ULL } }, /* XSUM_XXH128_withSecret_testdata[1574] */\n    { 1575, 0x0000000000000000ULL, { 0xECBE6AF44DED7706ULL, 0xBA800CCA5E973648ULL } }, /* XSUM_XXH128_withSecret_testdata[1575] */\n    { 1576, 0x0000000000000000ULL, { 0xC7D9766F768E79A9ULL, 0x4688FC07F3785634ULL } }, /* XSUM_XXH128_withSecret_testdata[1576] */\n    { 1577, 0x0000000000000000ULL, { 0x4028751D1475BEE9ULL, 0x3EB15DD61C7F6A1FULL } }, /* XSUM_XXH128_withSecret_testdata[1577] */\n    { 1578, 0x0000000000000000ULL, { 0x17190FA37A712740ULL, 0x6631D559CAE48AAAULL } }, /* XSUM_XXH128_withSecret_testdata[1578] */\n    { 1579, 0x0000000000000000ULL, { 0x5C433B8B127909A1ULL, 0x9558FD4DBA97544BULL } }, /* XSUM_XXH128_withSecret_testdata[1579] */\n    { 1580, 0x0000000000000000ULL, { 0x734558FFEE5A74D2ULL, 0x736199966F8B837BULL } }, /* XSUM_XXH128_withSecret_testdata[1580] */\n    { 1581, 0x0000000000000000ULL, { 0xDF7A69D5C69D2389ULL, 0x7A5E74218AB69631ULL } }, /* XSUM_XXH128_withSecret_testdata[1581] */\n    { 1582, 0x0000000000000000ULL, { 0x11C96BFB6DE24BE0ULL, 0x3618D395F4DC53F9ULL } }, /* XSUM_XXH128_withSecret_testdata[1582] */\n    { 1583, 0x0000000000000000ULL, { 0xD74F6A9969484337ULL, 0xBF16D35312F90445ULL } }, /* XSUM_XXH128_withSecret_testdata[1583] */\n    { 1584, 0x0000000000000000ULL, { 0x7A2527499384FBDDULL, 0x740ED71895CF200AULL } }, /* XSUM_XXH128_withSecret_testdata[1584] */\n    { 1585, 0x0000000000000000ULL, { 0xA7DD5A711E85FC3FULL, 0x00CD152BA8D3979FULL } }, /* XSUM_XXH128_withSecret_testdata[1585] */\n    { 1586, 0x0000000000000000ULL, { 0x771AD1F9E0EFDD27ULL, 0x64084995F54D98E4ULL } }, /* XSUM_XXH128_withSecret_testdata[1586] */\n    { 1587, 0x0000000000000000ULL, { 0xCD346BF1A2FC701BULL, 0x764CD8A9B3BA0B53ULL } }, /* XSUM_XXH128_withSecret_testdata[1587] */\n    { 1588, 0x0000000000000000ULL, { 0x2B2C5902B173E4D1ULL, 0xB310F749EA3FCF51ULL } }, /* XSUM_XXH128_withSecret_testdata[1588] */\n    { 1589, 0x0000000000000000ULL, { 0x7C4D63D009E0E16AULL, 0xB2CEEC14F57EA843ULL } }, /* XSUM_XXH128_withSecret_testdata[1589] */\n    { 1590, 0x0000000000000000ULL, { 0x0BE8E14E1F1667C4ULL, 0x387BD33664A95B64ULL } }, /* XSUM_XXH128_withSecret_testdata[1590] */\n    { 1591, 0x0000000000000000ULL, { 0xDE41BB81852B1504ULL, 0x9CE2AF254FDB0EE9ULL } }, /* XSUM_XXH128_withSecret_testdata[1591] */\n    { 1592, 0x0000000000000000ULL, { 0x42919116FF583596ULL, 0xCC662E1F1C46F052ULL } }, /* XSUM_XXH128_withSecret_testdata[1592] */\n    { 1593, 0x0000000000000000ULL, { 0xCB6BB1CDC70E944EULL, 0xE07D122F7C54D0D2ULL } }, /* XSUM_XXH128_withSecret_testdata[1593] */\n    { 1594, 0x0000000000000000ULL, { 0xE6FB522266DB7768ULL, 0x1006DC4AFBDABC1EULL } }, /* XSUM_XXH128_withSecret_testdata[1594] */\n    { 1595, 0x0000000000000000ULL, { 0x3077B5CE685507F9ULL, 0x5C82EA376A56EB1EULL } }, /* XSUM_XXH128_withSecret_testdata[1595] */\n    { 1596, 0x0000000000000000ULL, { 0x4C54EF7FD7168075ULL, 0x1C21F4D866CB4FF1ULL } }, /* XSUM_XXH128_withSecret_testdata[1596] */\n    { 1597, 0x0000000000000000ULL, { 0x8558C82444B27772ULL, 0x48BDDAF8B54CE45CULL } }, /* XSUM_XXH128_withSecret_testdata[1597] */\n    { 1598, 0x0000000000000000ULL, { 0x93E87A5F083EE095ULL, 0xE410DF7A5D4B1F60ULL } }, /* XSUM_XXH128_withSecret_testdata[1598] */\n    { 1599, 0x0000000000000000ULL, { 0x23CA33AF6972592DULL, 0xDF3D4C241F6D88F1ULL } }, /* XSUM_XXH128_withSecret_testdata[1599] */\n    { 1600, 0x0000000000000000ULL, { 0x4CD10D6E0C2120FFULL, 0x2EF6CBF1F60BF0F7ULL } }, /* XSUM_XXH128_withSecret_testdata[1600] */\n    { 1601, 0x0000000000000000ULL, { 0x9B922B5C8DAEB98FULL, 0x17A561F7F2E968ADULL } }, /* XSUM_XXH128_withSecret_testdata[1601] */\n    { 1602, 0x0000000000000000ULL, { 0x0018FD000AD87B0DULL, 0x6187908B26966708ULL } }, /* XSUM_XXH128_withSecret_testdata[1602] */\n    { 1603, 0x0000000000000000ULL, { 0x3D5FD5FF17C26FB9ULL, 0x97022B96B4FACDE8ULL } }, /* XSUM_XXH128_withSecret_testdata[1603] */\n    { 1604, 0x0000000000000000ULL, { 0x124D24DBBF79D2FBULL, 0x9BE265E23D83A80BULL } }, /* XSUM_XXH128_withSecret_testdata[1604] */\n    { 1605, 0x0000000000000000ULL, { 0xBBD097F42CCC1414ULL, 0x9E4A10B9688E284CULL } }, /* XSUM_XXH128_withSecret_testdata[1605] */\n    { 1606, 0x0000000000000000ULL, { 0x7A6DB19C8E6004F9ULL, 0x12A1E292841E7096ULL } }, /* XSUM_XXH128_withSecret_testdata[1606] */\n    { 1607, 0x0000000000000000ULL, { 0x3E9DD3BFF6393C7FULL, 0x6A0B91AE32B7ED50ULL } }, /* XSUM_XXH128_withSecret_testdata[1607] */\n    { 1608, 0x0000000000000000ULL, { 0xA1E2CEB3A64DD81BULL, 0x2AEC3F3512BB07F3ULL } }, /* XSUM_XXH128_withSecret_testdata[1608] */\n    { 1609, 0x0000000000000000ULL, { 0x60D5E04AB38C48D6ULL, 0x5CCBE84B0A0AF8D5ULL } }, /* XSUM_XXH128_withSecret_testdata[1609] */\n    { 1610, 0x0000000000000000ULL, { 0xAF05C39906A7D047ULL, 0xCD11D5DB371FA63BULL } }, /* XSUM_XXH128_withSecret_testdata[1610] */\n    { 1611, 0x0000000000000000ULL, { 0x1539BA514ED93D01ULL, 0x2605C23EC0AA7A27ULL } }, /* XSUM_XXH128_withSecret_testdata[1611] */\n    { 1612, 0x0000000000000000ULL, { 0x1AED0B3FE9A4225AULL, 0x659EE257678CD2DDULL } }, /* XSUM_XXH128_withSecret_testdata[1612] */\n    { 1613, 0x0000000000000000ULL, { 0x28AA65B421E1EA27ULL, 0xBE52C7657BE7AECEULL } }, /* XSUM_XXH128_withSecret_testdata[1613] */\n    { 1614, 0x0000000000000000ULL, { 0x34E1C901C76FEEA4ULL, 0x46D98702F671FEA5ULL } }, /* XSUM_XXH128_withSecret_testdata[1614] */\n    { 1615, 0x0000000000000000ULL, { 0x4833BF58602325C5ULL, 0xC97F97EB95EFBB47ULL } }, /* XSUM_XXH128_withSecret_testdata[1615] */\n    { 1616, 0x0000000000000000ULL, { 0x8BBE98BDA7BC8B0EULL, 0x615577491F7EDE90ULL } }, /* XSUM_XXH128_withSecret_testdata[1616] */\n    { 1617, 0x0000000000000000ULL, { 0x95E2FC99C7236B83ULL, 0xDD6F3D8ECC3F1193ULL } }, /* XSUM_XXH128_withSecret_testdata[1617] */\n    { 1618, 0x0000000000000000ULL, { 0x76E2F0B45C4F5599ULL, 0x2ABC7E0A2DF2B47CULL } }, /* XSUM_XXH128_withSecret_testdata[1618] */\n    { 1619, 0x0000000000000000ULL, { 0x0A06FF738EDD1822ULL, 0x50187A7927A233F7ULL } }, /* XSUM_XXH128_withSecret_testdata[1619] */\n    { 1620, 0x0000000000000000ULL, { 0xEE02AF50A2EFA79CULL, 0xB21BE3567B4A89CEULL } }, /* XSUM_XXH128_withSecret_testdata[1620] */\n    { 1621, 0x0000000000000000ULL, { 0xC7BF41F42FDF6DADULL, 0xBFD3E0C51C8E1272ULL } }, /* XSUM_XXH128_withSecret_testdata[1621] */\n    { 1622, 0x0000000000000000ULL, { 0x36691EE554839BE8ULL, 0x87B404A9987CE0F9ULL } }, /* XSUM_XXH128_withSecret_testdata[1622] */\n    { 1623, 0x0000000000000000ULL, { 0x1817F64ED6B4307AULL, 0x1C1C6EEAD4CF7BBDULL } }, /* XSUM_XXH128_withSecret_testdata[1623] */\n    { 1624, 0x0000000000000000ULL, { 0xB0D50D4B178B6538ULL, 0x2FC54964960EA3F9ULL } }, /* XSUM_XXH128_withSecret_testdata[1624] */\n    { 1625, 0x0000000000000000ULL, { 0x5D5F2EF8171826E3ULL, 0x66823AC63879F6F3ULL } }, /* XSUM_XXH128_withSecret_testdata[1625] */\n    { 1626, 0x0000000000000000ULL, { 0x545F8280EEC1AA1EULL, 0x3552A7D08502C2D7ULL } }, /* XSUM_XXH128_withSecret_testdata[1626] */\n    { 1627, 0x0000000000000000ULL, { 0x3F6E2E4A9259428AULL, 0x4075DF64CD4F5A7BULL } }, /* XSUM_XXH128_withSecret_testdata[1627] */\n    { 1628, 0x0000000000000000ULL, { 0x5117B94804A0D3B5ULL, 0x9DCF796C714BE364ULL } }, /* XSUM_XXH128_withSecret_testdata[1628] */\n    { 1629, 0x0000000000000000ULL, { 0x5206F42D911152A1ULL, 0x1023A928C83D0369ULL } }, /* XSUM_XXH128_withSecret_testdata[1629] */\n    { 1630, 0x0000000000000000ULL, { 0x6D53167B653D23A3ULL, 0x9EF085C5FC2F7F0EULL } }, /* XSUM_XXH128_withSecret_testdata[1630] */\n    { 1631, 0x0000000000000000ULL, { 0x61CF1FC1538031F9ULL, 0x37B5AB6EAD8FD633ULL } }, /* XSUM_XXH128_withSecret_testdata[1631] */\n    { 1632, 0x0000000000000000ULL, { 0xBC6E90CFA1602D65ULL, 0x3F20362E4991A35BULL } }, /* XSUM_XXH128_withSecret_testdata[1632] */\n    { 1633, 0x0000000000000000ULL, { 0xB98632BEADED0CF2ULL, 0x384112A79506389DULL } }, /* XSUM_XXH128_withSecret_testdata[1633] */\n    { 1634, 0x0000000000000000ULL, { 0x0F251F190D9F95EFULL, 0xFB92D82FF5E924EFULL } }, /* XSUM_XXH128_withSecret_testdata[1634] */\n    { 1635, 0x0000000000000000ULL, { 0x99F9CDF97192A511ULL, 0x1BA75D3B3CC72172ULL } }, /* XSUM_XXH128_withSecret_testdata[1635] */\n    { 1636, 0x0000000000000000ULL, { 0x30473897CAA4D5E4ULL, 0x7E80E23CDED4B031ULL } }, /* XSUM_XXH128_withSecret_testdata[1636] */\n    { 1637, 0x0000000000000000ULL, { 0xE921D35B983CD4DCULL, 0x31FB3475FF758965ULL } }, /* XSUM_XXH128_withSecret_testdata[1637] */\n    { 1638, 0x0000000000000000ULL, { 0x432796EED8D03163ULL, 0x762789F4E27ABA59ULL } }, /* XSUM_XXH128_withSecret_testdata[1638] */\n    { 1639, 0x0000000000000000ULL, { 0xED5FDDE2580CFA2DULL, 0x9F30417E40ABB5F9ULL } }, /* XSUM_XXH128_withSecret_testdata[1639] */\n    { 1640, 0x0000000000000000ULL, { 0x88B24FCACD224C33ULL, 0x74D13237E55408B4ULL } }, /* XSUM_XXH128_withSecret_testdata[1640] */\n    { 1641, 0x0000000000000000ULL, { 0x7AD61154D515D039ULL, 0x8F7DF9D85938AF7DULL } }, /* XSUM_XXH128_withSecret_testdata[1641] */\n    { 1642, 0x0000000000000000ULL, { 0xBD453138BF7C74B4ULL, 0x5AA8C669516F2E09ULL } }, /* XSUM_XXH128_withSecret_testdata[1642] */\n    { 1643, 0x0000000000000000ULL, { 0x9C56497963AAE6CAULL, 0x5397D4CEC34A9066ULL } }, /* XSUM_XXH128_withSecret_testdata[1643] */\n    { 1644, 0x0000000000000000ULL, { 0x394A05C13E70EE7BULL, 0xA9EBCF69927EE5E4ULL } }, /* XSUM_XXH128_withSecret_testdata[1644] */\n    { 1645, 0x0000000000000000ULL, { 0x64C3F15471DBCB81ULL, 0x4767275650E76DC9ULL } }, /* XSUM_XXH128_withSecret_testdata[1645] */\n    { 1646, 0x0000000000000000ULL, { 0x0AE2FFAD636B5F1AULL, 0x4AF8EEC42F830257ULL } }, /* XSUM_XXH128_withSecret_testdata[1646] */\n    { 1647, 0x0000000000000000ULL, { 0xE57655AC00FEF568ULL, 0x9D28FACC0BB5FEB5ULL } }, /* XSUM_XXH128_withSecret_testdata[1647] */\n    { 1648, 0x0000000000000000ULL, { 0xB2F7378B9D2E3678ULL, 0x0BF193C9057B9232ULL } }, /* XSUM_XXH128_withSecret_testdata[1648] */\n    { 1649, 0x0000000000000000ULL, { 0x4750A565227FF789ULL, 0x8C5187FA02EC0DE5ULL } }, /* XSUM_XXH128_withSecret_testdata[1649] */\n    { 1650, 0x0000000000000000ULL, { 0xF29DF3F473111615ULL, 0x71081B290C3FBDD2ULL } }, /* XSUM_XXH128_withSecret_testdata[1650] */\n    { 1651, 0x0000000000000000ULL, { 0x1849FA7D03F17040ULL, 0xD58DCA462EFC30F2ULL } }, /* XSUM_XXH128_withSecret_testdata[1651] */\n    { 1652, 0x0000000000000000ULL, { 0x6DAC844A0DE17D75ULL, 0xC2AD42976A3E8513ULL } }, /* XSUM_XXH128_withSecret_testdata[1652] */\n    { 1653, 0x0000000000000000ULL, { 0xE6E4CAD7D1E68B8BULL, 0x62A8AF07DCCD6CD0ULL } }, /* XSUM_XXH128_withSecret_testdata[1653] */\n    { 1654, 0x0000000000000000ULL, { 0x3E9D32F021CDD06EULL, 0x1833B6D97DE9C8E5ULL } }, /* XSUM_XXH128_withSecret_testdata[1654] */\n    { 1655, 0x0000000000000000ULL, { 0xAE40EADE5A295701ULL, 0x7D1AF2ABF9646F56ULL } }, /* XSUM_XXH128_withSecret_testdata[1655] */\n    { 1656, 0x0000000000000000ULL, { 0x0DFAFD784832F12FULL, 0xD416563B0E6F23C0ULL } }, /* XSUM_XXH128_withSecret_testdata[1656] */\n    { 1657, 0x0000000000000000ULL, { 0xB53A09FE4BA3595DULL, 0x80C60C4E2D629161ULL } }, /* XSUM_XXH128_withSecret_testdata[1657] */\n    { 1658, 0x0000000000000000ULL, { 0x35D3EFCD7A75BE8CULL, 0xFAE5F4D81E52A917ULL } }, /* XSUM_XXH128_withSecret_testdata[1658] */\n    { 1659, 0x0000000000000000ULL, { 0x5FCDD6ACFE98BB96ULL, 0xCEEFCA3680547BBCULL } }, /* XSUM_XXH128_withSecret_testdata[1659] */\n    { 1660, 0x0000000000000000ULL, { 0xE3552314056A2927ULL, 0xB04BDB3A70E2CC66ULL } }, /* XSUM_XXH128_withSecret_testdata[1660] */\n    { 1661, 0x0000000000000000ULL, { 0x821AAEA79BDC7C91ULL, 0x4D032382ABB154BCULL } }, /* XSUM_XXH128_withSecret_testdata[1661] */\n    { 1662, 0x0000000000000000ULL, { 0xD165076A82DC0232ULL, 0x42EC515811D267B4ULL } }, /* XSUM_XXH128_withSecret_testdata[1662] */\n    { 1663, 0x0000000000000000ULL, { 0x0E65012F1826C7EBULL, 0x61E10B668F1427CBULL } }, /* XSUM_XXH128_withSecret_testdata[1663] */\n    { 1664, 0x0000000000000000ULL, { 0x6A6E3428C9890B5AULL, 0xB08D97D7DD5815EEULL } }, /* XSUM_XXH128_withSecret_testdata[1664] */\n    { 1665, 0x0000000000000000ULL, { 0x9ED6B48A75E0CF91ULL, 0x4EC96865B9DA6E69ULL } }, /* XSUM_XXH128_withSecret_testdata[1665] */\n    { 1666, 0x0000000000000000ULL, { 0xF54699B3DAF2CD27ULL, 0x75596135E1BA75E7ULL } }, /* XSUM_XXH128_withSecret_testdata[1666] */\n    { 1667, 0x0000000000000000ULL, { 0x6215FAF5576D64C6ULL, 0xB7F768B12656E42BULL } }, /* XSUM_XXH128_withSecret_testdata[1667] */\n    { 1668, 0x0000000000000000ULL, { 0x1F8EDBAC4C8F5E72ULL, 0x9058D242E52201EDULL } }, /* XSUM_XXH128_withSecret_testdata[1668] */\n    { 1669, 0x0000000000000000ULL, { 0x285606E5D557A904ULL, 0x04BF19ACACD2D8ACULL } }, /* XSUM_XXH128_withSecret_testdata[1669] */\n    { 1670, 0x0000000000000000ULL, { 0xE03302BF7677FC2AULL, 0xF95F9DB58A586A49ULL } }, /* XSUM_XXH128_withSecret_testdata[1670] */\n    { 1671, 0x0000000000000000ULL, { 0x1018E6584D733993ULL, 0xB2563FC88A4D7D07ULL } }, /* XSUM_XXH128_withSecret_testdata[1671] */\n    { 1672, 0x0000000000000000ULL, { 0x9FC949445C23D3FDULL, 0x673215AEB7475FFAULL } }, /* XSUM_XXH128_withSecret_testdata[1672] */\n    { 1673, 0x0000000000000000ULL, { 0x98D13467937AE9B5ULL, 0x4834A2879FAC71E1ULL } }, /* XSUM_XXH128_withSecret_testdata[1673] */\n    { 1674, 0x0000000000000000ULL, { 0x021FC4717A1A5C29ULL, 0x8D1F702C579B0EA1ULL } }, /* XSUM_XXH128_withSecret_testdata[1674] */\n    { 1675, 0x0000000000000000ULL, { 0xEC9DD872987A7305ULL, 0x94D271FA329B503CULL } }, /* XSUM_XXH128_withSecret_testdata[1675] */\n    { 1676, 0x0000000000000000ULL, { 0x538C7C9BFF65F8DFULL, 0xF887AAF02F371905ULL } }, /* XSUM_XXH128_withSecret_testdata[1676] */\n    { 1677, 0x0000000000000000ULL, { 0x16098A7AEDE26A97ULL, 0xBFA9CB6EABDD58B9ULL } }, /* XSUM_XXH128_withSecret_testdata[1677] */\n    { 1678, 0x0000000000000000ULL, { 0x4788AA014F8A7CE5ULL, 0xBADD94A7D2BE4912ULL } }, /* XSUM_XXH128_withSecret_testdata[1678] */\n    { 1679, 0x0000000000000000ULL, { 0xB60E9D831D9A523AULL, 0x34A9456650245443ULL } }, /* XSUM_XXH128_withSecret_testdata[1679] */\n    { 1680, 0x0000000000000000ULL, { 0xA69CA251D7BAB81DULL, 0xD693A3FB6257D448ULL } }, /* XSUM_XXH128_withSecret_testdata[1680] */\n    { 1681, 0x0000000000000000ULL, { 0x0A5C49F10F98DAB2ULL, 0xD3EBD8362487E003ULL } }, /* XSUM_XXH128_withSecret_testdata[1681] */\n    { 1682, 0x0000000000000000ULL, { 0xBF8AD466578B929CULL, 0xCE81AC92A07927E1ULL } }, /* XSUM_XXH128_withSecret_testdata[1682] */\n    { 1683, 0x0000000000000000ULL, { 0xA3B49891EE338F11ULL, 0xCE852C1E037151E1ULL } }, /* XSUM_XXH128_withSecret_testdata[1683] */\n    { 1684, 0x0000000000000000ULL, { 0x2B767F09C4073B50ULL, 0x4A71B86370C953F3ULL } }, /* XSUM_XXH128_withSecret_testdata[1684] */\n    { 1685, 0x0000000000000000ULL, { 0xE44207E3D4A0F1A8ULL, 0x86601CFA15C0C60FULL } }, /* XSUM_XXH128_withSecret_testdata[1685] */\n    { 1686, 0x0000000000000000ULL, { 0xB2963A7EF9647A12ULL, 0x946BC7872F92F4A8ULL } }, /* XSUM_XXH128_withSecret_testdata[1686] */\n    { 1687, 0x0000000000000000ULL, { 0x7B5D91DF290769D6ULL, 0xFA4644460C661C5CULL } }, /* XSUM_XXH128_withSecret_testdata[1687] */\n    { 1688, 0x0000000000000000ULL, { 0x5A4F1BCF6ED04EE1ULL, 0x4D96A966A6F6A652ULL } }, /* XSUM_XXH128_withSecret_testdata[1688] */\n    { 1689, 0x0000000000000000ULL, { 0xD98304DC00E59A9AULL, 0xC16EDD4F01DC2CB7ULL } }, /* XSUM_XXH128_withSecret_testdata[1689] */\n    { 1690, 0x0000000000000000ULL, { 0x70E03BCE13B9D2F7ULL, 0xA84A5DE16AD111FDULL } }, /* XSUM_XXH128_withSecret_testdata[1690] */\n    { 1691, 0x0000000000000000ULL, { 0x9778670DA0C866DEULL, 0xE0EB24C778E484E6ULL } }, /* XSUM_XXH128_withSecret_testdata[1691] */\n    { 1692, 0x0000000000000000ULL, { 0x76DDF8E2E304FE1BULL, 0x30A01181E71B5E35ULL } }, /* XSUM_XXH128_withSecret_testdata[1692] */\n    { 1693, 0x0000000000000000ULL, { 0xA93C2CEE9AAC9C51ULL, 0x7D5057668893231CULL } }, /* XSUM_XXH128_withSecret_testdata[1693] */\n    { 1694, 0x0000000000000000ULL, { 0xA191D1C7778C72B8ULL, 0x56BC7D7A50570B3FULL } }, /* XSUM_XXH128_withSecret_testdata[1694] */\n    { 1695, 0x0000000000000000ULL, { 0x9286563D24E83CF3ULL, 0x7411E26CECE7B476ULL } }, /* XSUM_XXH128_withSecret_testdata[1695] */\n    { 1696, 0x0000000000000000ULL, { 0x30CB745D74507075ULL, 0xAFDA2A8FEAB5299EULL } }, /* XSUM_XXH128_withSecret_testdata[1696] */\n    { 1697, 0x0000000000000000ULL, { 0x1AD39F0EB4A14D62ULL, 0x531CC3FE008018EBULL } }, /* XSUM_XXH128_withSecret_testdata[1697] */\n    { 1698, 0x0000000000000000ULL, { 0x75E51A9F37A4DE9BULL, 0xC1C1FC69EEBB8BF3ULL } }, /* XSUM_XXH128_withSecret_testdata[1698] */\n    { 1699, 0x0000000000000000ULL, { 0xAFAE965CF499655AULL, 0x7A933605777A6190ULL } }, /* XSUM_XXH128_withSecret_testdata[1699] */\n    { 1700, 0x0000000000000000ULL, { 0xA2C74FD12C5B9658ULL, 0xBCF019773A05057AULL } }, /* XSUM_XXH128_withSecret_testdata[1700] */\n    { 1701, 0x0000000000000000ULL, { 0x03D678483CBA4A68ULL, 0xAD7AF2D9460D0526ULL } }, /* XSUM_XXH128_withSecret_testdata[1701] */\n    { 1702, 0x0000000000000000ULL, { 0xA10387282F95641DULL, 0x3BAE2041C3151B23ULL } }, /* XSUM_XXH128_withSecret_testdata[1702] */\n    { 1703, 0x0000000000000000ULL, { 0x2F97A3C5F8B955FEULL, 0x89429CA5E3A53C50ULL } }, /* XSUM_XXH128_withSecret_testdata[1703] */\n    { 1704, 0x0000000000000000ULL, { 0x9F0ADFFC22A97C8AULL, 0x94C535CA82DAD455ULL } }, /* XSUM_XXH128_withSecret_testdata[1704] */\n    { 1705, 0x0000000000000000ULL, { 0x1A00C96BC09EDDECULL, 0xCB06009FE58E3EE1ULL } }, /* XSUM_XXH128_withSecret_testdata[1705] */\n    { 1706, 0x0000000000000000ULL, { 0x0AEEA8B351F7C655ULL, 0x4304552001BA5C04ULL } }, /* XSUM_XXH128_withSecret_testdata[1706] */\n    { 1707, 0x0000000000000000ULL, { 0x5146CA83E1B94E12ULL, 0xBC594183BBE80DC2ULL } }, /* XSUM_XXH128_withSecret_testdata[1707] */\n    { 1708, 0x0000000000000000ULL, { 0x5BBA3ED7929E5FA5ULL, 0x17D29DFB8D9309C6ULL } }, /* XSUM_XXH128_withSecret_testdata[1708] */\n    { 1709, 0x0000000000000000ULL, { 0x3963D6E7C2185C10ULL, 0x842AA7F7BDCA9ABEULL } }, /* XSUM_XXH128_withSecret_testdata[1709] */\n    { 1710, 0x0000000000000000ULL, { 0x5A4C5E91EE8FA95BULL, 0xA7E6AE2855D37BEBULL } }, /* XSUM_XXH128_withSecret_testdata[1710] */\n    { 1711, 0x0000000000000000ULL, { 0x9B8FAB3B30D5895EULL, 0x64BE8BCC5D7E2D09ULL } }, /* XSUM_XXH128_withSecret_testdata[1711] */\n    { 1712, 0x0000000000000000ULL, { 0xE56728B6588CC4B1ULL, 0x7011AC030046E6F2ULL } }, /* XSUM_XXH128_withSecret_testdata[1712] */\n    { 1713, 0x0000000000000000ULL, { 0xFB4E881A3E75AF1EULL, 0x30CC3727FC017CC8ULL } }, /* XSUM_XXH128_withSecret_testdata[1713] */\n    { 1714, 0x0000000000000000ULL, { 0xF57DFDF5902E14CDULL, 0xB9E5BB05099B0A63ULL } }, /* XSUM_XXH128_withSecret_testdata[1714] */\n    { 1715, 0x0000000000000000ULL, { 0x82686F6DEE271950ULL, 0x6C5476F56E0A95E7ULL } }, /* XSUM_XXH128_withSecret_testdata[1715] */\n    { 1716, 0x0000000000000000ULL, { 0x5CE3E44A78BCDC66ULL, 0xAE3595F9F63DBCFFULL } }, /* XSUM_XXH128_withSecret_testdata[1716] */\n    { 1717, 0x0000000000000000ULL, { 0x27AC6414C2645329ULL, 0xA71DD2D67EFD6756ULL } }, /* XSUM_XXH128_withSecret_testdata[1717] */\n    { 1718, 0x0000000000000000ULL, { 0x54C7D888E4BFE81AULL, 0xE0479FE81D236E96ULL } }, /* XSUM_XXH128_withSecret_testdata[1718] */\n    { 1719, 0x0000000000000000ULL, { 0x38BAE8C8F5FF30C4ULL, 0x0C3B396DDAA2F14AULL } }, /* XSUM_XXH128_withSecret_testdata[1719] */\n    { 1720, 0x0000000000000000ULL, { 0xB53E60907F8390D2ULL, 0x68CAF237181F57FFULL } }, /* XSUM_XXH128_withSecret_testdata[1720] */\n    { 1721, 0x0000000000000000ULL, { 0x932891E5ECFFC1E4ULL, 0xE98E26094D3C067AULL } }, /* XSUM_XXH128_withSecret_testdata[1721] */\n    { 1722, 0x0000000000000000ULL, { 0xCBF716940E4CE9CDULL, 0x8B0C40EEE5CC51F3ULL } }, /* XSUM_XXH128_withSecret_testdata[1722] */\n    { 1723, 0x0000000000000000ULL, { 0xA3812CF5FC908675ULL, 0x330D382D33434D90ULL } }, /* XSUM_XXH128_withSecret_testdata[1723] */\n    { 1724, 0x0000000000000000ULL, { 0x196ED6DDB482776DULL, 0xBF1F564D0617974BULL } }, /* XSUM_XXH128_withSecret_testdata[1724] */\n    { 1725, 0x0000000000000000ULL, { 0x9B70D5D56D68BCDAULL, 0x492CEEE0254ADAF6ULL } }, /* XSUM_XXH128_withSecret_testdata[1725] */\n    { 1726, 0x0000000000000000ULL, { 0x89D41A820982DE7AULL, 0x60480A3DFDBE9B5BULL } }, /* XSUM_XXH128_withSecret_testdata[1726] */\n    { 1727, 0x0000000000000000ULL, { 0x670B2B5F74D6B39DULL, 0x9B850D12B5CC9512ULL } }, /* XSUM_XXH128_withSecret_testdata[1727] */\n    { 1728, 0x0000000000000000ULL, { 0x4BF73CCEFD067D44ULL, 0x674764448306B665ULL } }, /* XSUM_XXH128_withSecret_testdata[1728] */\n    { 1729, 0x0000000000000000ULL, { 0xF9E7E25E5F226055ULL, 0x40CC5525FD310C04ULL } }, /* XSUM_XXH128_withSecret_testdata[1729] */\n    { 1730, 0x0000000000000000ULL, { 0x6F625819AB986B5FULL, 0x48FB11D5E3B0EE11ULL } }, /* XSUM_XXH128_withSecret_testdata[1730] */\n    { 1731, 0x0000000000000000ULL, { 0xDD0CA453D1D30B0EULL, 0x566E0AA899526F1DULL } }, /* XSUM_XXH128_withSecret_testdata[1731] */\n    { 1732, 0x0000000000000000ULL, { 0x61F29C66BFF1DC60ULL, 0x4DD2B72F54696E10ULL } }, /* XSUM_XXH128_withSecret_testdata[1732] */\n    { 1733, 0x0000000000000000ULL, { 0x79C26E766BF9C59CULL, 0xBF5D164253C1BEF7ULL } }, /* XSUM_XXH128_withSecret_testdata[1733] */\n    { 1734, 0x0000000000000000ULL, { 0x7EC9B47E0552E6E0ULL, 0x889C1326E5715035ULL } }, /* XSUM_XXH128_withSecret_testdata[1734] */\n    { 1735, 0x0000000000000000ULL, { 0xC6010C35C8CB4BCFULL, 0x7D0463E5262616EAULL } }, /* XSUM_XXH128_withSecret_testdata[1735] */\n    { 1736, 0x0000000000000000ULL, { 0xE99F407164825C89ULL, 0x9F88B71C23A3C86AULL } }, /* XSUM_XXH128_withSecret_testdata[1736] */\n    { 1737, 0x0000000000000000ULL, { 0x74523C6A58C7C381ULL, 0xF59C105FFE45FA4BULL } }, /* XSUM_XXH128_withSecret_testdata[1737] */\n    { 1738, 0x0000000000000000ULL, { 0x981CB1A9260139EFULL, 0x16FE408141543EA2ULL } }, /* XSUM_XXH128_withSecret_testdata[1738] */\n    { 1739, 0x0000000000000000ULL, { 0xA7472311411B7F44ULL, 0xCA93D4983C8723CFULL } }, /* XSUM_XXH128_withSecret_testdata[1739] */\n    { 1740, 0x0000000000000000ULL, { 0x7772D0A69EA6B5C6ULL, 0xF5811D05EDE6CD14ULL } }, /* XSUM_XXH128_withSecret_testdata[1740] */\n    { 1741, 0x0000000000000000ULL, { 0xA0910DEDF04A7D99ULL, 0xBC91583731D291F8ULL } }, /* XSUM_XXH128_withSecret_testdata[1741] */\n    { 1742, 0x0000000000000000ULL, { 0xC49241AE38755E89ULL, 0xFBB67AFE4C9339BCULL } }, /* XSUM_XXH128_withSecret_testdata[1742] */\n    { 1743, 0x0000000000000000ULL, { 0xB5AB1F244DA833DDULL, 0x72F0F811BB9F934AULL } }, /* XSUM_XXH128_withSecret_testdata[1743] */\n    { 1744, 0x0000000000000000ULL, { 0x567B28C34B63D694ULL, 0xB1147F0A9597F5E5ULL } }, /* XSUM_XXH128_withSecret_testdata[1744] */\n    { 1745, 0x0000000000000000ULL, { 0x235CBE03E9E1E7F2ULL, 0x4828379959B59F84ULL } }, /* XSUM_XXH128_withSecret_testdata[1745] */\n    { 1746, 0x0000000000000000ULL, { 0x76B3592B13BE309AULL, 0x36F0C5DF058AA83CULL } }, /* XSUM_XXH128_withSecret_testdata[1746] */\n    { 1747, 0x0000000000000000ULL, { 0x1529FE740A3AC230ULL, 0xFD4447958E147ECCULL } }, /* XSUM_XXH128_withSecret_testdata[1747] */\n    { 1748, 0x0000000000000000ULL, { 0xF5097CC1AAA76BD7ULL, 0x7006F68E4F7DA255ULL } }, /* XSUM_XXH128_withSecret_testdata[1748] */\n    { 1749, 0x0000000000000000ULL, { 0xD92584C1C9760C59ULL, 0xA74F21EAD0E57141ULL } }, /* XSUM_XXH128_withSecret_testdata[1749] */\n    { 1750, 0x0000000000000000ULL, { 0x35DFE8BF25B84863ULL, 0x23FF06ACA131449AULL } }, /* XSUM_XXH128_withSecret_testdata[1750] */\n    { 1751, 0x0000000000000000ULL, { 0x36158F70ACE15DD8ULL, 0x305C2C56D6505585ULL } }, /* XSUM_XXH128_withSecret_testdata[1751] */\n    { 1752, 0x0000000000000000ULL, { 0xBA23ACC7B52C06D0ULL, 0x5685642EC592AB3FULL } }, /* XSUM_XXH128_withSecret_testdata[1752] */\n    { 1753, 0x0000000000000000ULL, { 0x3307FFFC9BD358DFULL, 0x244BC2B9DC969C1CULL } }, /* XSUM_XXH128_withSecret_testdata[1753] */\n    { 1754, 0x0000000000000000ULL, { 0x979E3BBBA5E77CFEULL, 0xCA4D389464D514D1ULL } }, /* XSUM_XXH128_withSecret_testdata[1754] */\n    { 1755, 0x0000000000000000ULL, { 0x36DE102859B0B962ULL, 0xF6D738DD4D654F4DULL } }, /* XSUM_XXH128_withSecret_testdata[1755] */\n    { 1756, 0x0000000000000000ULL, { 0x71BF2E2A55C5E814ULL, 0x45A3D0078C00CE65ULL } }, /* XSUM_XXH128_withSecret_testdata[1756] */\n    { 1757, 0x0000000000000000ULL, { 0xEBDA4FB991779C55ULL, 0x7A8B431C9B6F85EEULL } }, /* XSUM_XXH128_withSecret_testdata[1757] */\n    { 1758, 0x0000000000000000ULL, { 0x1728848CF44E43A3ULL, 0xD87C454E73CAEC9DULL } }, /* XSUM_XXH128_withSecret_testdata[1758] */\n    { 1759, 0x0000000000000000ULL, { 0x593BB4D41BAFE16BULL, 0xC7AEC633592F7127ULL } }, /* XSUM_XXH128_withSecret_testdata[1759] */\n    { 1760, 0x0000000000000000ULL, { 0x284CF892AE408A70ULL, 0x17A720455C7FDAFDULL } }, /* XSUM_XXH128_withSecret_testdata[1760] */\n    { 1761, 0x0000000000000000ULL, { 0xEC09ABCEB857D071ULL, 0x8EFAE9835E2BE808ULL } }, /* XSUM_XXH128_withSecret_testdata[1761] */\n    { 1762, 0x0000000000000000ULL, { 0xB871997236BF5AA8ULL, 0x1B2311C09B0BC447ULL } }, /* XSUM_XXH128_withSecret_testdata[1762] */\n    { 1763, 0x0000000000000000ULL, { 0x744E7DF18A4D7FA0ULL, 0x87E30C0EE479C7FEULL } }, /* XSUM_XXH128_withSecret_testdata[1763] */\n    { 1764, 0x0000000000000000ULL, { 0x2FE3A05D5D0E7D65ULL, 0x6A248BAEE883F36FULL } }, /* XSUM_XXH128_withSecret_testdata[1764] */\n    { 1765, 0x0000000000000000ULL, { 0x9EA83E964E3E0AEDULL, 0x3CAEEAB473F1A97DULL } }, /* XSUM_XXH128_withSecret_testdata[1765] */\n    { 1766, 0x0000000000000000ULL, { 0xBA912716E055FB61ULL, 0x4C65DF6E15A611E0ULL } }, /* XSUM_XXH128_withSecret_testdata[1766] */\n    { 1767, 0x0000000000000000ULL, { 0x2CBF229C008619AAULL, 0x38D26721DE252BD8ULL } }, /* XSUM_XXH128_withSecret_testdata[1767] */\n    { 1768, 0x0000000000000000ULL, { 0xAC0FABF720119D5DULL, 0xEC089A4654D8F2D0ULL } }, /* XSUM_XXH128_withSecret_testdata[1768] */\n    { 1769, 0x0000000000000000ULL, { 0xCD9FEAF318CF59B0ULL, 0xD39B3DD8358F52D3ULL } }, /* XSUM_XXH128_withSecret_testdata[1769] */\n    { 1770, 0x0000000000000000ULL, { 0x3362CC1D4116F147ULL, 0xD3FA920E6C7E9013ULL } }, /* XSUM_XXH128_withSecret_testdata[1770] */\n    { 1771, 0x0000000000000000ULL, { 0x14AD4884FDCE337CULL, 0x337BCC98986A30C2ULL } }, /* XSUM_XXH128_withSecret_testdata[1771] */\n    { 1772, 0x0000000000000000ULL, { 0x14D399478B7B428AULL, 0x31ADEE8AD3B87279ULL } }, /* XSUM_XXH128_withSecret_testdata[1772] */\n    { 1773, 0x0000000000000000ULL, { 0xB11C4FE43B9C7293ULL, 0xCFEF407A3E5E05C3ULL } }, /* XSUM_XXH128_withSecret_testdata[1773] */\n    { 1774, 0x0000000000000000ULL, { 0x7AD9F263024DA989ULL, 0x85240C8419B640D5ULL } }, /* XSUM_XXH128_withSecret_testdata[1774] */\n    { 1775, 0x0000000000000000ULL, { 0xC51C01AC58688B36ULL, 0x3A424AF6AF3FB798ULL } }, /* XSUM_XXH128_withSecret_testdata[1775] */\n    { 1776, 0x0000000000000000ULL, { 0xC440BB91EA4815DDULL, 0xF45B6F369B2BA29DULL } }, /* XSUM_XXH128_withSecret_testdata[1776] */\n    { 1777, 0x0000000000000000ULL, { 0x5BF91B033E1C28DBULL, 0xEB863EEDC677827BULL } }, /* XSUM_XXH128_withSecret_testdata[1777] */\n    { 1778, 0x0000000000000000ULL, { 0x3B11CE47991EEFD7ULL, 0xFEE0764A70DC0D45ULL } }, /* XSUM_XXH128_withSecret_testdata[1778] */\n    { 1779, 0x0000000000000000ULL, { 0x7C15AC70C1714DC2ULL, 0xA49107A49A404383ULL } }, /* XSUM_XXH128_withSecret_testdata[1779] */\n    { 1780, 0x0000000000000000ULL, { 0x82479F182059F91FULL, 0x6ED6BAE56E38DD22ULL } }, /* XSUM_XXH128_withSecret_testdata[1780] */\n    { 1781, 0x0000000000000000ULL, { 0x7B9678B2C21965ECULL, 0x6A8EEFB0FE5C4672ULL } }, /* XSUM_XXH128_withSecret_testdata[1781] */\n    { 1782, 0x0000000000000000ULL, { 0x216FE3AF81D0FCBDULL, 0x62F20FEFFDDCEF7DULL } }, /* XSUM_XXH128_withSecret_testdata[1782] */\n    { 1783, 0x0000000000000000ULL, { 0xA207CCEE1D8AD5D2ULL, 0x2A8186214EA65D58ULL } }, /* XSUM_XXH128_withSecret_testdata[1783] */\n    { 1784, 0x0000000000000000ULL, { 0x1EABEDCDD5F67A55ULL, 0xED51F39029C59819ULL } }, /* XSUM_XXH128_withSecret_testdata[1784] */\n    { 1785, 0x0000000000000000ULL, { 0xE3AA024B094F9D33ULL, 0xAE81754B237453B9ULL } }, /* XSUM_XXH128_withSecret_testdata[1785] */\n    { 1786, 0x0000000000000000ULL, { 0x0617282894D26D61ULL, 0x3AAC36CEA4E35961ULL } }, /* XSUM_XXH128_withSecret_testdata[1786] */\n    { 1787, 0x0000000000000000ULL, { 0xDC618587DDA8FC5FULL, 0x3A8C372937B11862ULL } }, /* XSUM_XXH128_withSecret_testdata[1787] */\n    { 1788, 0x0000000000000000ULL, { 0xC851676837A79E40ULL, 0xC73D7E6E79E492B9ULL } }, /* XSUM_XXH128_withSecret_testdata[1788] */\n    { 1789, 0x0000000000000000ULL, { 0x91ED14D62BBFBCEDULL, 0xF8BE4ED131838333ULL } }, /* XSUM_XXH128_withSecret_testdata[1789] */\n    { 1790, 0x0000000000000000ULL, { 0x8D4F8D0602285AB2ULL, 0x5D76761EFBD357D3ULL } }, /* XSUM_XXH128_withSecret_testdata[1790] */\n    { 1791, 0x0000000000000000ULL, { 0xCF44DFE6C083C272ULL, 0xF6D55507549BAC23ULL } }, /* XSUM_XXH128_withSecret_testdata[1791] */\n    { 1792, 0x0000000000000000ULL, { 0x47DDC481F1DB095FULL, 0xDFB4FAABB3FF1AB6ULL } }, /* XSUM_XXH128_withSecret_testdata[1792] */\n    { 1793, 0x0000000000000000ULL, { 0xA10AE242C3A730EBULL, 0xA4D9B75FF45BE0D0ULL } }, /* XSUM_XXH128_withSecret_testdata[1793] */\n    { 1794, 0x0000000000000000ULL, { 0xDB1E7B5DC72BDEC4ULL, 0x6B05DD2F755587B5ULL } }, /* XSUM_XXH128_withSecret_testdata[1794] */\n    { 1795, 0x0000000000000000ULL, { 0x988258BB7135C65BULL, 0x9BAA21C67B4EF72EULL } }, /* XSUM_XXH128_withSecret_testdata[1795] */\n    { 1796, 0x0000000000000000ULL, { 0xB39D76C082AB8837ULL, 0xDE6E6EAD6FFDD0A1ULL } }, /* XSUM_XXH128_withSecret_testdata[1796] */\n    { 1797, 0x0000000000000000ULL, { 0xE4606B36C8AC7379ULL, 0xE60446DEC444D6B0ULL } }, /* XSUM_XXH128_withSecret_testdata[1797] */\n    { 1798, 0x0000000000000000ULL, { 0x9B52580AAA9CDC0BULL, 0xB5855CECB5DD9338ULL } }, /* XSUM_XXH128_withSecret_testdata[1798] */\n    { 1799, 0x0000000000000000ULL, { 0xC961FA5351789300ULL, 0xCA83F1EC149EBBDFULL } }, /* XSUM_XXH128_withSecret_testdata[1799] */\n    { 1800, 0x0000000000000000ULL, { 0xE7B46AB47D510BBBULL, 0x592FE649C43917E7ULL } }, /* XSUM_XXH128_withSecret_testdata[1800] */\n    { 1801, 0x0000000000000000ULL, { 0x4B6A8F15C17973F6ULL, 0x8F28E3E5875B9200ULL } }, /* XSUM_XXH128_withSecret_testdata[1801] */\n    { 1802, 0x0000000000000000ULL, { 0xEBE353EF65A651F6ULL, 0x0EBBD6E7B0A5CED1ULL } }, /* XSUM_XXH128_withSecret_testdata[1802] */\n    { 1803, 0x0000000000000000ULL, { 0x0FB0CAB2A8AD54C1ULL, 0xD39A22E753D4D3BAULL } }, /* XSUM_XXH128_withSecret_testdata[1803] */\n    { 1804, 0x0000000000000000ULL, { 0xB0FC1F6DDD75AD6DULL, 0xF3C53D456CDC71B4ULL } }, /* XSUM_XXH128_withSecret_testdata[1804] */\n    { 1805, 0x0000000000000000ULL, { 0x9E6286E5DFBAE99EULL, 0x8F4FC64C8DA0B573ULL } }, /* XSUM_XXH128_withSecret_testdata[1805] */\n    { 1806, 0x0000000000000000ULL, { 0x3DF343EEBA68959AULL, 0x9D7C522A81BAC618ULL } }, /* XSUM_XXH128_withSecret_testdata[1806] */\n    { 1807, 0x0000000000000000ULL, { 0x6939F13CBCAEC0F6ULL, 0x59D87DC5E39A0139ULL } }, /* XSUM_XXH128_withSecret_testdata[1807] */\n    { 1808, 0x0000000000000000ULL, { 0x79806F82290A05D3ULL, 0x2D95C1A2E36DA4F1ULL } }, /* XSUM_XXH128_withSecret_testdata[1808] */\n    { 1809, 0x0000000000000000ULL, { 0xF57C2DB3C71D1EC0ULL, 0x73A5EC7F2F952DDFULL } }, /* XSUM_XXH128_withSecret_testdata[1809] */\n    { 1810, 0x0000000000000000ULL, { 0x1A05E375DD295438ULL, 0xB51C90E604CE10F3ULL } }, /* XSUM_XXH128_withSecret_testdata[1810] */\n    { 1811, 0x0000000000000000ULL, { 0xA74DBBE413B4E89BULL, 0x3CE37A783F61B9BFULL } }, /* XSUM_XXH128_withSecret_testdata[1811] */\n    { 1812, 0x0000000000000000ULL, { 0x971B8DD67515E5E0ULL, 0x436B037A664642FBULL } }, /* XSUM_XXH128_withSecret_testdata[1812] */\n    { 1813, 0x0000000000000000ULL, { 0x6610D45C74760EC4ULL, 0xC4D706B947E9104AULL } }, /* XSUM_XXH128_withSecret_testdata[1813] */\n    { 1814, 0x0000000000000000ULL, { 0xA593A38377386C31ULL, 0xDD5A86B909129D0CULL } }, /* XSUM_XXH128_withSecret_testdata[1814] */\n    { 1815, 0x0000000000000000ULL, { 0xA9B45FF3A9192DDBULL, 0x35CBB02D1C5A59D4ULL } }, /* XSUM_XXH128_withSecret_testdata[1815] */\n    { 1816, 0x0000000000000000ULL, { 0xCCAFB051380D1E98ULL, 0x80AE77DCA1412FCFULL } }, /* XSUM_XXH128_withSecret_testdata[1816] */\n    { 1817, 0x0000000000000000ULL, { 0x203EE0860BF29DF7ULL, 0x3709058D61B2C94DULL } }, /* XSUM_XXH128_withSecret_testdata[1817] */\n    { 1818, 0x0000000000000000ULL, { 0xA76E0EBB41E17FD9ULL, 0x5454A52267D05AC8ULL } }, /* XSUM_XXH128_withSecret_testdata[1818] */\n    { 1819, 0x0000000000000000ULL, { 0x6A159A6052A2166DULL, 0xECC1478BCE811D56ULL } }, /* XSUM_XXH128_withSecret_testdata[1819] */\n    { 1820, 0x0000000000000000ULL, { 0x63A3361FD6F4C1A2ULL, 0xAD00658471870C01ULL } }, /* XSUM_XXH128_withSecret_testdata[1820] */\n    { 1821, 0x0000000000000000ULL, { 0xC93683A587826A2CULL, 0xF43EB1159A516CE3ULL } }, /* XSUM_XXH128_withSecret_testdata[1821] */\n    { 1822, 0x0000000000000000ULL, { 0x02D5148F65DAF251ULL, 0x239D0F874F203605ULL } }, /* XSUM_XXH128_withSecret_testdata[1822] */\n    { 1823, 0x0000000000000000ULL, { 0x25E1162FCFA75CA5ULL, 0xDFC59B25EFEFA605ULL } }, /* XSUM_XXH128_withSecret_testdata[1823] */\n    { 1824, 0x0000000000000000ULL, { 0xBD5484CE7E50F07DULL, 0x69F4D23E2D458061ULL } }, /* XSUM_XXH128_withSecret_testdata[1824] */\n    { 1825, 0x0000000000000000ULL, { 0x6EB6067839498B06ULL, 0xA36198917C683040ULL } }, /* XSUM_XXH128_withSecret_testdata[1825] */\n    { 1826, 0x0000000000000000ULL, { 0x52F20341A5DAD1E3ULL, 0x7B4F8BEFD7908467ULL } }, /* XSUM_XXH128_withSecret_testdata[1826] */\n    { 1827, 0x0000000000000000ULL, { 0x50F562657386533FULL, 0x9AB8A1FE6C5ECF25ULL } }, /* XSUM_XXH128_withSecret_testdata[1827] */\n    { 1828, 0x0000000000000000ULL, { 0x1F10472FC2F01C96ULL, 0x0A77414FB51E5F1BULL } }, /* XSUM_XXH128_withSecret_testdata[1828] */\n    { 1829, 0x0000000000000000ULL, { 0x8C474EF701FB3909ULL, 0xD203ED4BDE492C8EULL } }, /* XSUM_XXH128_withSecret_testdata[1829] */\n    { 1830, 0x0000000000000000ULL, { 0x54BA08B1FA0D590AULL, 0xF83805A845205CF4ULL } }, /* XSUM_XXH128_withSecret_testdata[1830] */\n    { 1831, 0x0000000000000000ULL, { 0x652E59502189E111ULL, 0x592C0141037728F7ULL } }, /* XSUM_XXH128_withSecret_testdata[1831] */\n    { 1832, 0x0000000000000000ULL, { 0x6877E92A32E2B991ULL, 0x312DBAD9E4AE9A66ULL } }, /* XSUM_XXH128_withSecret_testdata[1832] */\n    { 1833, 0x0000000000000000ULL, { 0x9C6831D78A76126DULL, 0x736A479E1ABF06FFULL } }, /* XSUM_XXH128_withSecret_testdata[1833] */\n    { 1834, 0x0000000000000000ULL, { 0x26A22D43A7AE2EF6ULL, 0x97DBFEBF86DA6CE1ULL } }, /* XSUM_XXH128_withSecret_testdata[1834] */\n    { 1835, 0x0000000000000000ULL, { 0x9DD7F5B61B8A8816ULL, 0x881BBE5C5758F381ULL } }, /* XSUM_XXH128_withSecret_testdata[1835] */\n    { 1836, 0x0000000000000000ULL, { 0x4A01F6B43A1F053CULL, 0x0EDD780901E76DAAULL } }, /* XSUM_XXH128_withSecret_testdata[1836] */\n    { 1837, 0x0000000000000000ULL, { 0xC7ED38842F51E59AULL, 0xFCD3A578036BBBC2ULL } }, /* XSUM_XXH128_withSecret_testdata[1837] */\n    { 1838, 0x0000000000000000ULL, { 0x8B476BBB4ABE5430ULL, 0x21F0CFC99D32D13BULL } }, /* XSUM_XXH128_withSecret_testdata[1838] */\n    { 1839, 0x0000000000000000ULL, { 0x5FB0DFE505A82222ULL, 0x28E24DE2012F139CULL } }, /* XSUM_XXH128_withSecret_testdata[1839] */\n    { 1840, 0x0000000000000000ULL, { 0x81671324076187EEULL, 0x035A7CCC7F2051E4ULL } }, /* XSUM_XXH128_withSecret_testdata[1840] */\n    { 1841, 0x0000000000000000ULL, { 0xD656A0AE18DB6402ULL, 0x68E7AA79CA1AAE53ULL } }, /* XSUM_XXH128_withSecret_testdata[1841] */\n    { 1842, 0x0000000000000000ULL, { 0x9356D1863E69A0DCULL, 0x23300F3E08984DE6ULL } }, /* XSUM_XXH128_withSecret_testdata[1842] */\n    { 1843, 0x0000000000000000ULL, { 0x46269A68E2273394ULL, 0x5701444BBB2CD84CULL } }, /* XSUM_XXH128_withSecret_testdata[1843] */\n    { 1844, 0x0000000000000000ULL, { 0x8F740F53C7BA8F35ULL, 0xCC695A4C3742F1F8ULL } }, /* XSUM_XXH128_withSecret_testdata[1844] */\n    { 1845, 0x0000000000000000ULL, { 0xB05CFDCA7BA4531FULL, 0x7715EB72E2E84A55ULL } }, /* XSUM_XXH128_withSecret_testdata[1845] */\n    { 1846, 0x0000000000000000ULL, { 0x469325140F78A2DFULL, 0x4D1C3548BF631951ULL } }, /* XSUM_XXH128_withSecret_testdata[1846] */\n    { 1847, 0x0000000000000000ULL, { 0x087ECF42F55D5E0DULL, 0x8709A1321729C18BULL } }, /* XSUM_XXH128_withSecret_testdata[1847] */\n    { 1848, 0x0000000000000000ULL, { 0xDE3EE4E0EAC16ED4ULL, 0x97621A064CB5B7BBULL } }, /* XSUM_XXH128_withSecret_testdata[1848] */\n    { 1849, 0x0000000000000000ULL, { 0x6FF2BB185054F40EULL, 0x8AFF243A39841C9FULL } }, /* XSUM_XXH128_withSecret_testdata[1849] */\n    { 1850, 0x0000000000000000ULL, { 0xED2CF3EB5E728E1AULL, 0xB44388F40C55342DULL } }, /* XSUM_XXH128_withSecret_testdata[1850] */\n    { 1851, 0x0000000000000000ULL, { 0xA7FAAD240ED4D3BDULL, 0xAEC5B51C18D386FFULL } }, /* XSUM_XXH128_withSecret_testdata[1851] */\n    { 1852, 0x0000000000000000ULL, { 0x843FFFB94BA6E942ULL, 0x0F0BDC9D6EF58965ULL } }, /* XSUM_XXH128_withSecret_testdata[1852] */\n    { 1853, 0x0000000000000000ULL, { 0xF3BAF1752618BB5BULL, 0x906918AB72CC691EULL } }, /* XSUM_XXH128_withSecret_testdata[1853] */\n    { 1854, 0x0000000000000000ULL, { 0xE78D42311004927CULL, 0xD7158E92393C3F1DULL } }, /* XSUM_XXH128_withSecret_testdata[1854] */\n    { 1855, 0x0000000000000000ULL, { 0x91EEBD8F732E178EULL, 0x9CFD74C077BD7477ULL } }, /* XSUM_XXH128_withSecret_testdata[1855] */\n    { 1856, 0x0000000000000000ULL, { 0xC99C980B41019B22ULL, 0x307DC8747D30484EULL } }, /* XSUM_XXH128_withSecret_testdata[1856] */\n    { 1857, 0x0000000000000000ULL, { 0x16C6E879C8E235BEULL, 0xA087EC6545817A50ULL } }, /* XSUM_XXH128_withSecret_testdata[1857] */\n    { 1858, 0x0000000000000000ULL, { 0x0CECC7F3AB9C1F40ULL, 0x8BC5BF87FDFF32E8ULL } }, /* XSUM_XXH128_withSecret_testdata[1858] */\n    { 1859, 0x0000000000000000ULL, { 0xFA8D2FD6D59DC280ULL, 0x9B12129BD4A0862AULL } }, /* XSUM_XXH128_withSecret_testdata[1859] */\n    { 1860, 0x0000000000000000ULL, { 0x8562961C091342CEULL, 0x94C6E4FFCE555ED3ULL } }, /* XSUM_XXH128_withSecret_testdata[1860] */\n    { 1861, 0x0000000000000000ULL, { 0x62F62194E584CAF7ULL, 0xAF84927EEFC765E8ULL } }, /* XSUM_XXH128_withSecret_testdata[1861] */\n    { 1862, 0x0000000000000000ULL, { 0x4E92BB3A8BFEA159ULL, 0x320508671EFEECC3ULL } }, /* XSUM_XXH128_withSecret_testdata[1862] */\n    { 1863, 0x0000000000000000ULL, { 0x38365B5F64F64A98ULL, 0x6E4B439DA3E68454ULL } }, /* XSUM_XXH128_withSecret_testdata[1863] */\n    { 1864, 0x0000000000000000ULL, { 0xD147B36243C5C323ULL, 0xBAA392B06D50515BULL } }, /* XSUM_XXH128_withSecret_testdata[1864] */\n    { 1865, 0x0000000000000000ULL, { 0xE9ACE440CDB60441ULL, 0x48B135599D024B7EULL } }, /* XSUM_XXH128_withSecret_testdata[1865] */\n    { 1866, 0x0000000000000000ULL, { 0x0A57F63533193ECAULL, 0x5870902AB1B31936ULL } }, /* XSUM_XXH128_withSecret_testdata[1866] */\n    { 1867, 0x0000000000000000ULL, { 0xE571EDBF602C3DA8ULL, 0x0AE760102B171D95ULL } }, /* XSUM_XXH128_withSecret_testdata[1867] */\n    { 1868, 0x0000000000000000ULL, { 0x0E9AAF89C2E43AB3ULL, 0xD0904EFE1C7450D8ULL } }, /* XSUM_XXH128_withSecret_testdata[1868] */\n    { 1869, 0x0000000000000000ULL, { 0xBBEDAE93C8E71634ULL, 0x971CCA7B87A3C571ULL } }, /* XSUM_XXH128_withSecret_testdata[1869] */\n    { 1870, 0x0000000000000000ULL, { 0x893CBC1E009A0A03ULL, 0xC02796492EB677CAULL } }, /* XSUM_XXH128_withSecret_testdata[1870] */\n    { 1871, 0x0000000000000000ULL, { 0xC6B24114B6F6E938ULL, 0x91A8BF3307BA7FA1ULL } }, /* XSUM_XXH128_withSecret_testdata[1871] */\n    { 1872, 0x0000000000000000ULL, { 0xEC60D1DD4E0B72EFULL, 0x5EFBD85B7FAC597CULL } }, /* XSUM_XXH128_withSecret_testdata[1872] */\n    { 1873, 0x0000000000000000ULL, { 0xEE180979A8839059ULL, 0xDA23C6E58CA5AE74ULL } }, /* XSUM_XXH128_withSecret_testdata[1873] */\n    { 1874, 0x0000000000000000ULL, { 0xE79FC5C968E39F05ULL, 0xA842540FB1BEC066ULL } }, /* XSUM_XXH128_withSecret_testdata[1874] */\n    { 1875, 0x0000000000000000ULL, { 0xD877733C14DE5624ULL, 0xFF6CCA18F8017DC6ULL } }, /* XSUM_XXH128_withSecret_testdata[1875] */\n    { 1876, 0x0000000000000000ULL, { 0xDC64CF1E1B3C621BULL, 0xDA5E35E84C415267ULL } }, /* XSUM_XXH128_withSecret_testdata[1876] */\n    { 1877, 0x0000000000000000ULL, { 0xDE1EEDB9FEDF1B50ULL, 0x893901D670E9D168ULL } }, /* XSUM_XXH128_withSecret_testdata[1877] */\n    { 1878, 0x0000000000000000ULL, { 0x5917DB36A8A1EC86ULL, 0xC933D5A1DBE0BA45ULL } }, /* XSUM_XXH128_withSecret_testdata[1878] */\n    { 1879, 0x0000000000000000ULL, { 0x31DCF9B84864E732ULL, 0xE7E93B5AE41E7123ULL } }, /* XSUM_XXH128_withSecret_testdata[1879] */\n    { 1880, 0x0000000000000000ULL, { 0xA270D68EB626F81FULL, 0x45F9E50D38ACC1A3ULL } }, /* XSUM_XXH128_withSecret_testdata[1880] */\n    { 1881, 0x0000000000000000ULL, { 0x448CA992B405B478ULL, 0xF73A385CD71F6B48ULL } }, /* XSUM_XXH128_withSecret_testdata[1881] */\n    { 1882, 0x0000000000000000ULL, { 0xC687F7288F59642FULL, 0x654687A3A02D25E4ULL } }, /* XSUM_XXH128_withSecret_testdata[1882] */\n    { 1883, 0x0000000000000000ULL, { 0x09904DB3F3073429ULL, 0x5F3434903E8E5A1DULL } }, /* XSUM_XXH128_withSecret_testdata[1883] */\n    { 1884, 0x0000000000000000ULL, { 0xBCFDF2A3E0EB5764ULL, 0x0EA0F1B31A20C0D2ULL } }, /* XSUM_XXH128_withSecret_testdata[1884] */\n    { 1885, 0x0000000000000000ULL, { 0xE8AC4995374E498AULL, 0xA5C5D7831EC773A6ULL } }, /* XSUM_XXH128_withSecret_testdata[1885] */\n    { 1886, 0x0000000000000000ULL, { 0x597CADBA4B5B8E18ULL, 0xBE6EBE608A5EBAF2ULL } }, /* XSUM_XXH128_withSecret_testdata[1886] */\n    { 1887, 0x0000000000000000ULL, { 0x71B4E40C69AD0E85ULL, 0xA5A0C85FCFB39C89ULL } }, /* XSUM_XXH128_withSecret_testdata[1887] */\n    { 1888, 0x0000000000000000ULL, { 0x6BF88D864523E374ULL, 0xA7FB1AC519891279ULL } }, /* XSUM_XXH128_withSecret_testdata[1888] */\n    { 1889, 0x0000000000000000ULL, { 0x9CA99D485C9FE5A9ULL, 0x15DAFB89C7531F9CULL } }, /* XSUM_XXH128_withSecret_testdata[1889] */\n    { 1890, 0x0000000000000000ULL, { 0x724E950BEE61D453ULL, 0x83F125F33E101B11ULL } }, /* XSUM_XXH128_withSecret_testdata[1890] */\n    { 1891, 0x0000000000000000ULL, { 0x32790EA97BB99A4AULL, 0xB03275B7E4CA09B4ULL } }, /* XSUM_XXH128_withSecret_testdata[1891] */\n    { 1892, 0x0000000000000000ULL, { 0x653B234CAE064A5FULL, 0x975A0D40E04D416CULL } }, /* XSUM_XXH128_withSecret_testdata[1892] */\n    { 1893, 0x0000000000000000ULL, { 0x4872009907840C63ULL, 0xB45A1F8C1235A936ULL } }, /* XSUM_XXH128_withSecret_testdata[1893] */\n    { 1894, 0x0000000000000000ULL, { 0x6243D1800D7D75D0ULL, 0x295A9BDACFA6CA45ULL } }, /* XSUM_XXH128_withSecret_testdata[1894] */\n    { 1895, 0x0000000000000000ULL, { 0x2E7980EAD2979C81ULL, 0x7C4DBCF7F0B59000ULL } }, /* XSUM_XXH128_withSecret_testdata[1895] */\n    { 1896, 0x0000000000000000ULL, { 0x0C5D37F9D498521BULL, 0x7E5D418501755040ULL } }, /* XSUM_XXH128_withSecret_testdata[1896] */\n    { 1897, 0x0000000000000000ULL, { 0xBE22F8844228CA21ULL, 0xB0EF82D5B363DE18ULL } }, /* XSUM_XXH128_withSecret_testdata[1897] */\n    { 1898, 0x0000000000000000ULL, { 0xA38E8323477AFDEBULL, 0xE66BF734A3E5843AULL } }, /* XSUM_XXH128_withSecret_testdata[1898] */\n    { 1899, 0x0000000000000000ULL, { 0xD1F1A219688BFD74ULL, 0x6C070151F3A98CE8ULL } }, /* XSUM_XXH128_withSecret_testdata[1899] */\n    { 1900, 0x0000000000000000ULL, { 0x18FFC2BA99E13E26ULL, 0x8B80ADCBB2810992ULL } }, /* XSUM_XXH128_withSecret_testdata[1900] */\n    { 1901, 0x0000000000000000ULL, { 0x98DB456D96CA4A7CULL, 0x93A8C8494A491AF2ULL } }, /* XSUM_XXH128_withSecret_testdata[1901] */\n    { 1902, 0x0000000000000000ULL, { 0xBE521AFF481876BDULL, 0x8D6F19B3087C5823ULL } }, /* XSUM_XXH128_withSecret_testdata[1902] */\n    { 1903, 0x0000000000000000ULL, { 0x91F819C3C1F15995ULL, 0x929865E56B111B37ULL } }, /* XSUM_XXH128_withSecret_testdata[1903] */\n    { 1904, 0x0000000000000000ULL, { 0xE738A023A9B0BA6DULL, 0x6145A74A1FC899B4ULL } }, /* XSUM_XXH128_withSecret_testdata[1904] */\n    { 1905, 0x0000000000000000ULL, { 0x34F3E5A9FAF610FDULL, 0xCB0CA0DFA3A8FD67ULL } }, /* XSUM_XXH128_withSecret_testdata[1905] */\n    { 1906, 0x0000000000000000ULL, { 0xC1D2B440968DD445ULL, 0xA1F26FB47FA1C9CEULL } }, /* XSUM_XXH128_withSecret_testdata[1906] */\n    { 1907, 0x0000000000000000ULL, { 0x603A8D4E0954F2ABULL, 0x18A2E6FE8C4D73D7ULL } }, /* XSUM_XXH128_withSecret_testdata[1907] */\n    { 1908, 0x0000000000000000ULL, { 0x6163D84213C0D1CCULL, 0xA96F0F5C4D25AD52ULL } }, /* XSUM_XXH128_withSecret_testdata[1908] */\n    { 1909, 0x0000000000000000ULL, { 0x7EDA5DF9B18F6D30ULL, 0x26F2990401B56C28ULL } }, /* XSUM_XXH128_withSecret_testdata[1909] */\n    { 1910, 0x0000000000000000ULL, { 0xFF985775B462CAC9ULL, 0xEA580570EBF4A321ULL } }, /* XSUM_XXH128_withSecret_testdata[1910] */\n    { 1911, 0x0000000000000000ULL, { 0x395DEE7376657B59ULL, 0x1FDC711522ECDCC5ULL } }, /* XSUM_XXH128_withSecret_testdata[1911] */\n    { 1912, 0x0000000000000000ULL, { 0xEB4260FC7DD69737ULL, 0x3667ECDF56768D4AULL } }, /* XSUM_XXH128_withSecret_testdata[1912] */\n    { 1913, 0x0000000000000000ULL, { 0x947F26C70E715B2FULL, 0xF0F9B66E4348F78CULL } }, /* XSUM_XXH128_withSecret_testdata[1913] */\n    { 1914, 0x0000000000000000ULL, { 0xC1DC1C9BC70A67C1ULL, 0xF7E9EAD6100641D5ULL } }, /* XSUM_XXH128_withSecret_testdata[1914] */\n    { 1915, 0x0000000000000000ULL, { 0x08B572BCF56713CEULL, 0xF343E679A6E65FF7ULL } }, /* XSUM_XXH128_withSecret_testdata[1915] */\n    { 1916, 0x0000000000000000ULL, { 0x995E661AB54A9E8CULL, 0xB34B350C7310B7FBULL } }, /* XSUM_XXH128_withSecret_testdata[1916] */\n    { 1917, 0x0000000000000000ULL, { 0x0C6630E181E66DEAULL, 0x19EE5628E06A2144ULL } }, /* XSUM_XXH128_withSecret_testdata[1917] */\n    { 1918, 0x0000000000000000ULL, { 0x77F20A683428BE33ULL, 0x4854FCBEC3D97455ULL } }, /* XSUM_XXH128_withSecret_testdata[1918] */\n    { 1919, 0x0000000000000000ULL, { 0x74D2536C2C5D7259ULL, 0xECE8723179A75C78ULL } }, /* XSUM_XXH128_withSecret_testdata[1919] */\n    { 1920, 0x0000000000000000ULL, { 0x751D2EC54BC6038BULL, 0xD7CB046C8A09C983ULL } }, /* XSUM_XXH128_withSecret_testdata[1920] */\n    { 1921, 0x0000000000000000ULL, { 0x4AA03B6DB9DAFB6CULL, 0x3F62A440651C96B0ULL } }, /* XSUM_XXH128_withSecret_testdata[1921] */\n    { 1922, 0x0000000000000000ULL, { 0x4399281D1A5B9E03ULL, 0x25D1E25CD1BB8F5BULL } }, /* XSUM_XXH128_withSecret_testdata[1922] */\n    { 1923, 0x0000000000000000ULL, { 0x4F39521CD6AD5E2AULL, 0x1390C98E51E464FDULL } }, /* XSUM_XXH128_withSecret_testdata[1923] */\n    { 1924, 0x0000000000000000ULL, { 0x86FE68ED8D696FAAULL, 0x4A179E966295D262ULL } }, /* XSUM_XXH128_withSecret_testdata[1924] */\n    { 1925, 0x0000000000000000ULL, { 0x7D5B81AB9E3835EBULL, 0x42BE8A76CA3A9872ULL } }, /* XSUM_XXH128_withSecret_testdata[1925] */\n    { 1926, 0x0000000000000000ULL, { 0x20CDCFF43C617248ULL, 0xC4EEAC767D8FB402ULL } }, /* XSUM_XXH128_withSecret_testdata[1926] */\n    { 1927, 0x0000000000000000ULL, { 0x17EDC44C20536181ULL, 0x67C16187F4F5BADBULL } }, /* XSUM_XXH128_withSecret_testdata[1927] */\n    { 1928, 0x0000000000000000ULL, { 0xEADDA2B5CD3C9E5DULL, 0x4BE8E9121BE153FDULL } }, /* XSUM_XXH128_withSecret_testdata[1928] */\n    { 1929, 0x0000000000000000ULL, { 0x268FB0850E2369ECULL, 0x235E10BC63EC4DB0ULL } }, /* XSUM_XXH128_withSecret_testdata[1929] */\n    { 1930, 0x0000000000000000ULL, { 0x6F5BE676BB821FD0ULL, 0xDE42EFCF3BF7D07AULL } }, /* XSUM_XXH128_withSecret_testdata[1930] */\n    { 1931, 0x0000000000000000ULL, { 0xA8C578FCC34F7D60ULL, 0xDB1382CCF8A26350ULL } }, /* XSUM_XXH128_withSecret_testdata[1931] */\n    { 1932, 0x0000000000000000ULL, { 0x8EB8504FB4F00254ULL, 0x83C3FF8EE0AD7F3AULL } }, /* XSUM_XXH128_withSecret_testdata[1932] */\n    { 1933, 0x0000000000000000ULL, { 0x00763B822214A7B0ULL, 0x8192A0614942C362ULL } }, /* XSUM_XXH128_withSecret_testdata[1933] */\n    { 1934, 0x0000000000000000ULL, { 0x28165E0E06EBEFB5ULL, 0x0726C694CBF8AFE0ULL } }, /* XSUM_XXH128_withSecret_testdata[1934] */\n    { 1935, 0x0000000000000000ULL, { 0x40665B23B5D5EBFEULL, 0x96B731B9F3F4883CULL } }, /* XSUM_XXH128_withSecret_testdata[1935] */\n    { 1936, 0x0000000000000000ULL, { 0xAAE0C571AC56F9D4ULL, 0x5F75B3FB903EDBB7ULL } }, /* XSUM_XXH128_withSecret_testdata[1936] */\n    { 1937, 0x0000000000000000ULL, { 0x16E7AEE32C1D2511ULL, 0xC9B1B389287DDF7AULL } }, /* XSUM_XXH128_withSecret_testdata[1937] */\n    { 1938, 0x0000000000000000ULL, { 0x6FC1B6B272BA2D63ULL, 0x98E79A534B0A589AULL } }, /* XSUM_XXH128_withSecret_testdata[1938] */\n    { 1939, 0x0000000000000000ULL, { 0x30879A4A2DB0F19AULL, 0x1C808ECADD7D621AULL } }, /* XSUM_XXH128_withSecret_testdata[1939] */\n    { 1940, 0x0000000000000000ULL, { 0xA1C75F5361E34F1EULL, 0xF7CB34250FEA2893ULL } }, /* XSUM_XXH128_withSecret_testdata[1940] */\n    { 1941, 0x0000000000000000ULL, { 0x50AB08C3D1B53756ULL, 0x6649B3DBDB96A945ULL } }, /* XSUM_XXH128_withSecret_testdata[1941] */\n    { 1942, 0x0000000000000000ULL, { 0x3E367154753FBACCULL, 0xEC0B7FCDC6EC972EULL } }, /* XSUM_XXH128_withSecret_testdata[1942] */\n    { 1943, 0x0000000000000000ULL, { 0x083A8F92DA030F2BULL, 0x3C5448018C97B326ULL } }, /* XSUM_XXH128_withSecret_testdata[1943] */\n    { 1944, 0x0000000000000000ULL, { 0xAEC52F821EA2D3B2ULL, 0xFEEF0081E3C77320ULL } }, /* XSUM_XXH128_withSecret_testdata[1944] */\n    { 1945, 0x0000000000000000ULL, { 0x300E70829CB7CB7CULL, 0x0D8F66E7A15EA07FULL } }, /* XSUM_XXH128_withSecret_testdata[1945] */\n    { 1946, 0x0000000000000000ULL, { 0xAAB6F53BCBC50A11ULL, 0xDBB072901B2F92E1ULL } }, /* XSUM_XXH128_withSecret_testdata[1946] */\n    { 1947, 0x0000000000000000ULL, { 0x70645A7FE1D47DDAULL, 0x711BFB4313BD0825ULL } }, /* XSUM_XXH128_withSecret_testdata[1947] */\n    { 1948, 0x0000000000000000ULL, { 0x55387B935C997944ULL, 0x7CAC12E4B641CCA4ULL } }, /* XSUM_XXH128_withSecret_testdata[1948] */\n    { 1949, 0x0000000000000000ULL, { 0x93D15D16187F8AD5ULL, 0xB80AC74D472B8D1DULL } }, /* XSUM_XXH128_withSecret_testdata[1949] */\n    { 1950, 0x0000000000000000ULL, { 0x45CEB57061DFAD2DULL, 0xA9C84F6C58631F70ULL } }, /* XSUM_XXH128_withSecret_testdata[1950] */\n    { 1951, 0x0000000000000000ULL, { 0x7CFA4E0F0C2371A3ULL, 0xAE28B7231EDB811FULL } }, /* XSUM_XXH128_withSecret_testdata[1951] */\n    { 1952, 0x0000000000000000ULL, { 0xBA41CE761134E091ULL, 0x257158F706B51A37ULL } }, /* XSUM_XXH128_withSecret_testdata[1952] */\n    { 1953, 0x0000000000000000ULL, { 0x25D634A52D0C6BAAULL, 0x6E1BB93242FA2CF6ULL } }, /* XSUM_XXH128_withSecret_testdata[1953] */\n    { 1954, 0x0000000000000000ULL, { 0xAAB9D4227FB7FF6AULL, 0xC0A852DD4C08DD05ULL } }, /* XSUM_XXH128_withSecret_testdata[1954] */\n    { 1955, 0x0000000000000000ULL, { 0x570535A6A349A47DULL, 0x077802AA2D387973ULL } }, /* XSUM_XXH128_withSecret_testdata[1955] */\n    { 1956, 0x0000000000000000ULL, { 0x2DC890196CBF71ACULL, 0x11A5DDB90ACE8467ULL } }, /* XSUM_XXH128_withSecret_testdata[1956] */\n    { 1957, 0x0000000000000000ULL, { 0xDF8DF47F892B5E9CULL, 0x740B0860A0A44A7BULL } }, /* XSUM_XXH128_withSecret_testdata[1957] */\n    { 1958, 0x0000000000000000ULL, { 0x4D4D1C063F97F8ACULL, 0x02B9B4AC28D75E1CULL } }, /* XSUM_XXH128_withSecret_testdata[1958] */\n    { 1959, 0x0000000000000000ULL, { 0x26D28B5FE6A309F9ULL, 0xD0796181E98C0A5BULL } }, /* XSUM_XXH128_withSecret_testdata[1959] */\n    { 1960, 0x0000000000000000ULL, { 0xDE6767AF345144A4ULL, 0x9CF8274FF5B2351DULL } }, /* XSUM_XXH128_withSecret_testdata[1960] */\n    { 1961, 0x0000000000000000ULL, { 0x66BD1E08C06BE67BULL, 0xE6F4569987836E75ULL } }, /* XSUM_XXH128_withSecret_testdata[1961] */\n    { 1962, 0x0000000000000000ULL, { 0xCFA6614E56565F1AULL, 0x20EE3701BC19E646ULL } }, /* XSUM_XXH128_withSecret_testdata[1962] */\n    { 1963, 0x0000000000000000ULL, { 0xE1C87D4A9FFD7AB8ULL, 0x0F94B21CAEA967F2ULL } }, /* XSUM_XXH128_withSecret_testdata[1963] */\n    { 1964, 0x0000000000000000ULL, { 0x1C40586BD0EEA8D1ULL, 0xC5EE92F49D3C62DAULL } }, /* XSUM_XXH128_withSecret_testdata[1964] */\n    { 1965, 0x0000000000000000ULL, { 0x3532630E352A209DULL, 0xB14C32A89D04971CULL } }, /* XSUM_XXH128_withSecret_testdata[1965] */\n    { 1966, 0x0000000000000000ULL, { 0xE9DC7C827B0C99B0ULL, 0x14C8C21858C4A54EULL } }, /* XSUM_XXH128_withSecret_testdata[1966] */\n    { 1967, 0x0000000000000000ULL, { 0x53D67F8ABE8DAEF5ULL, 0x31511BD584986E75ULL } }, /* XSUM_XXH128_withSecret_testdata[1967] */\n    { 1968, 0x0000000000000000ULL, { 0xE854B14F5317D22AULL, 0xD4F676E4529C7B76ULL } }, /* XSUM_XXH128_withSecret_testdata[1968] */\n    { 1969, 0x0000000000000000ULL, { 0x8A2D2A82A3EB9933ULL, 0xA6AD85000E7E36D2ULL } }, /* XSUM_XXH128_withSecret_testdata[1969] */\n    { 1970, 0x0000000000000000ULL, { 0x66BC8652E2FAB64BULL, 0xD31475CAB8120A52ULL } }, /* XSUM_XXH128_withSecret_testdata[1970] */\n    { 1971, 0x0000000000000000ULL, { 0x323091C1E0318144ULL, 0xAF4762A30AFB17E3ULL } }, /* XSUM_XXH128_withSecret_testdata[1971] */\n    { 1972, 0x0000000000000000ULL, { 0xABFFB27F0698185FULL, 0x32B8C8A89A712418ULL } }, /* XSUM_XXH128_withSecret_testdata[1972] */\n    { 1973, 0x0000000000000000ULL, { 0xCE0BCC1DE702A8A2ULL, 0xF98D1E720BCF2786ULL } }, /* XSUM_XXH128_withSecret_testdata[1973] */\n    { 1974, 0x0000000000000000ULL, { 0xA891D776F1058526ULL, 0x8962F2533D871591ULL } }, /* XSUM_XXH128_withSecret_testdata[1974] */\n    { 1975, 0x0000000000000000ULL, { 0xA07E0E04765D1A06ULL, 0x533958D85C048345ULL } }, /* XSUM_XXH128_withSecret_testdata[1975] */\n    { 1976, 0x0000000000000000ULL, { 0xD94B1CAA0A7C6CA6ULL, 0x978B9153ABC9667AULL } }, /* XSUM_XXH128_withSecret_testdata[1976] */\n    { 1977, 0x0000000000000000ULL, { 0x0DE7EC06A9D79A59ULL, 0xAFC68C3F8CA51B64ULL } }, /* XSUM_XXH128_withSecret_testdata[1977] */\n    { 1978, 0x0000000000000000ULL, { 0x83450511C21A36ABULL, 0xC1D56E7FC74519E3ULL } }, /* XSUM_XXH128_withSecret_testdata[1978] */\n    { 1979, 0x0000000000000000ULL, { 0x20D014B8011E22A7ULL, 0x64641A5260E6DF32ULL } }, /* XSUM_XXH128_withSecret_testdata[1979] */\n    { 1980, 0x0000000000000000ULL, { 0x4E183403B1E728D7ULL, 0xBAF7B36210C85E73ULL } }, /* XSUM_XXH128_withSecret_testdata[1980] */\n    { 1981, 0x0000000000000000ULL, { 0xA274442A270F7A2BULL, 0xF4F34AA0B340DCCDULL } }, /* XSUM_XXH128_withSecret_testdata[1981] */\n    { 1982, 0x0000000000000000ULL, { 0xAA57D4C24A4C5A3CULL, 0x620855E624C0E8A2ULL } }, /* XSUM_XXH128_withSecret_testdata[1982] */\n    { 1983, 0x0000000000000000ULL, { 0x3DA716FB6D15D010ULL, 0xD24EF75EF2DF3B36ULL } }, /* XSUM_XXH128_withSecret_testdata[1983] */\n    { 1984, 0x0000000000000000ULL, { 0xF0DBCAD3AF0FC637ULL, 0x9B71FA0E82684400ULL } }, /* XSUM_XXH128_withSecret_testdata[1984] */\n    { 1985, 0x0000000000000000ULL, { 0x4F5012143EAA22EFULL, 0x11D926CD045654B7ULL } }, /* XSUM_XXH128_withSecret_testdata[1985] */\n    { 1986, 0x0000000000000000ULL, { 0x0A6569F03DDBCE77ULL, 0x5D7D9FDD0BBF9BA0ULL } }, /* XSUM_XXH128_withSecret_testdata[1986] */\n    { 1987, 0x0000000000000000ULL, { 0x1F3EAEF95A8DF63EULL, 0x9FB1C1ABEEC70BC0ULL } }, /* XSUM_XXH128_withSecret_testdata[1987] */\n    { 1988, 0x0000000000000000ULL, { 0x979A6629B25EEC66ULL, 0x47AFB0876A34AFFAULL } }, /* XSUM_XXH128_withSecret_testdata[1988] */\n    { 1989, 0x0000000000000000ULL, { 0xAD1DE4B26AFDDC5AULL, 0x64F7A70006AA6AB2ULL } }, /* XSUM_XXH128_withSecret_testdata[1989] */\n    { 1990, 0x0000000000000000ULL, { 0x02471AA9EC8F3FF7ULL, 0x6C5FAFB597AF3139ULL } }, /* XSUM_XXH128_withSecret_testdata[1990] */\n    { 1991, 0x0000000000000000ULL, { 0x55C037ECD9007807ULL, 0x324CF6A1B3B50F20ULL } }, /* XSUM_XXH128_withSecret_testdata[1991] */\n    { 1992, 0x0000000000000000ULL, { 0xA7B7E36C2F5CD2CDULL, 0xA4DA052B511860AAULL } }, /* XSUM_XXH128_withSecret_testdata[1992] */\n    { 1993, 0x0000000000000000ULL, { 0x6FFA0680FF416EE0ULL, 0x96E639931352EBE0ULL } }, /* XSUM_XXH128_withSecret_testdata[1993] */\n    { 1994, 0x0000000000000000ULL, { 0x43B362F86DD5E34FULL, 0xE636EB19DC7EA733ULL } }, /* XSUM_XXH128_withSecret_testdata[1994] */\n    { 1995, 0x0000000000000000ULL, { 0x68D3CE07A02C606BULL, 0x210D1ED510E22168ULL } }, /* XSUM_XXH128_withSecret_testdata[1995] */\n    { 1996, 0x0000000000000000ULL, { 0xD3F6021C2CC7C145ULL, 0xF12F4615F2620D36ULL } }, /* XSUM_XXH128_withSecret_testdata[1996] */\n    { 1997, 0x0000000000000000ULL, { 0xF70238CF5D392572ULL, 0xB575F6C0EF7E92D1ULL } }, /* XSUM_XXH128_withSecret_testdata[1997] */\n    { 1998, 0x0000000000000000ULL, { 0x5F308D427071394CULL, 0xB0948E8AF96BDEB1ULL } }, /* XSUM_XXH128_withSecret_testdata[1998] */\n    { 1999, 0x0000000000000000ULL, { 0x57523F6650F55E0DULL, 0x9806545B07A25B44ULL } }, /* XSUM_XXH128_withSecret_testdata[1999] */\n    { 2000, 0x0000000000000000ULL, { 0x680E40011860C581ULL, 0x141F7CCB021A0CE3ULL } }, /* XSUM_XXH128_withSecret_testdata[2000] */\n    { 2001, 0x0000000000000000ULL, { 0xD0B11AAD1F5C23C1ULL, 0x066E3B0524350747ULL } }, /* XSUM_XXH128_withSecret_testdata[2001] */\n    { 2002, 0x0000000000000000ULL, { 0xA6A9688B992ED021ULL, 0x71C116E5ECBDBE92ULL } }, /* XSUM_XXH128_withSecret_testdata[2002] */\n    { 2003, 0x0000000000000000ULL, { 0x50BC82C67C5B7A2AULL, 0x12B29122D44AFF08ULL } }, /* XSUM_XXH128_withSecret_testdata[2003] */\n    { 2004, 0x0000000000000000ULL, { 0x13D22CED68E76785ULL, 0x46ADCA838C542577ULL } }, /* XSUM_XXH128_withSecret_testdata[2004] */\n    { 2005, 0x0000000000000000ULL, { 0x378EF2D33B8CC69DULL, 0x8A85A47F9A06D5E6ULL } }, /* XSUM_XXH128_withSecret_testdata[2005] */\n    { 2006, 0x0000000000000000ULL, { 0x60B89260458BDF90ULL, 0xFB8B0940924B4492ULL } }, /* XSUM_XXH128_withSecret_testdata[2006] */\n    { 2007, 0x0000000000000000ULL, { 0xEF62145B4D67249BULL, 0xA779703D5242C0C9ULL } }, /* XSUM_XXH128_withSecret_testdata[2007] */\n    { 2008, 0x0000000000000000ULL, { 0x0759C5A7E12CCF8BULL, 0x9996C3230697BF94ULL } }, /* XSUM_XXH128_withSecret_testdata[2008] */\n    { 2009, 0x0000000000000000ULL, { 0x83E9CD30677C2674ULL, 0x90A575870D76095FULL } }, /* XSUM_XXH128_withSecret_testdata[2009] */\n    { 2010, 0x0000000000000000ULL, { 0x00C92FEFD25FFB3FULL, 0x7605109F2EA07BC1ULL } }, /* XSUM_XXH128_withSecret_testdata[2010] */\n    { 2011, 0x0000000000000000ULL, { 0xA714A805852DD9EDULL, 0x9515D96677ED44A6ULL } }, /* XSUM_XXH128_withSecret_testdata[2011] */\n    { 2012, 0x0000000000000000ULL, { 0x1AE6E24CC00EC603ULL, 0x7BE7227A525A6719ULL } }, /* XSUM_XXH128_withSecret_testdata[2012] */\n    { 2013, 0x0000000000000000ULL, { 0x928ED8E2EE11805FULL, 0x694E2A2EA446C9E9ULL } }, /* XSUM_XXH128_withSecret_testdata[2013] */\n    { 2014, 0x0000000000000000ULL, { 0xC12EB28602014B6AULL, 0x12A911A13E418FA3ULL } }, /* XSUM_XXH128_withSecret_testdata[2014] */\n    { 2015, 0x0000000000000000ULL, { 0x7420C0D871AAF4DAULL, 0xB1FE8E14EF29D6D2ULL } }, /* XSUM_XXH128_withSecret_testdata[2015] */\n    { 2016, 0x0000000000000000ULL, { 0xD11FEA4183B4ABBAULL, 0x5DD1E2A9F2EF80BCULL } }, /* XSUM_XXH128_withSecret_testdata[2016] */\n    { 2017, 0x0000000000000000ULL, { 0xA1A8D9B0B2E816AEULL, 0x23B7F45DB6BC01C5ULL } }, /* XSUM_XXH128_withSecret_testdata[2017] */\n    { 2018, 0x0000000000000000ULL, { 0x7518F2FD9C9EB851ULL, 0x47508B85DD04B273ULL } }, /* XSUM_XXH128_withSecret_testdata[2018] */\n    { 2019, 0x0000000000000000ULL, { 0xBBFC3AD965E4F459ULL, 0x6F8F36683DF0FE94ULL } }, /* XSUM_XXH128_withSecret_testdata[2019] */\n    { 2020, 0x0000000000000000ULL, { 0xEB96E630F1F12D5CULL, 0x42A622E64404FD1EULL } }, /* XSUM_XXH128_withSecret_testdata[2020] */\n    { 2021, 0x0000000000000000ULL, { 0x8AE95135640DB9AFULL, 0xEBF42A458719B1A0ULL } }, /* XSUM_XXH128_withSecret_testdata[2021] */\n    { 2022, 0x0000000000000000ULL, { 0xF0FD6C215C2FAB7DULL, 0x14D5535D3F81E74FULL } }, /* XSUM_XXH128_withSecret_testdata[2022] */\n    { 2023, 0x0000000000000000ULL, { 0x22E379A68D4A26E8ULL, 0x8923A340282471E6ULL } }, /* XSUM_XXH128_withSecret_testdata[2023] */\n    { 2024, 0x0000000000000000ULL, { 0x751D0B04BD155367ULL, 0x000CB52D6FC2ACD5ULL } }, /* XSUM_XXH128_withSecret_testdata[2024] */\n    { 2025, 0x0000000000000000ULL, { 0xBAF9A0F558671628ULL, 0x22CF7D208D8A1ED8ULL } }, /* XSUM_XXH128_withSecret_testdata[2025] */\n    { 2026, 0x0000000000000000ULL, { 0x2C98EDD28EB24A27ULL, 0x71F1CAD81AA4B6DEULL } }, /* XSUM_XXH128_withSecret_testdata[2026] */\n    { 2027, 0x0000000000000000ULL, { 0x39FF6BB04D78CECBULL, 0x54884D3D57EB308BULL } }, /* XSUM_XXH128_withSecret_testdata[2027] */\n    { 2028, 0x0000000000000000ULL, { 0x6C5B98692DA17DECULL, 0x97F8E9D7920D7E76ULL } }, /* XSUM_XXH128_withSecret_testdata[2028] */\n    { 2029, 0x0000000000000000ULL, { 0xE3C17365A6225E2EULL, 0x06AC325DE1DB1497ULL } }, /* XSUM_XXH128_withSecret_testdata[2029] */\n    { 2030, 0x0000000000000000ULL, { 0x9679231B1AB02919ULL, 0x8207C0CB21771D2BULL } }, /* XSUM_XXH128_withSecret_testdata[2030] */\n    { 2031, 0x0000000000000000ULL, { 0x9D6531F5C0D6BFBBULL, 0xD3D2986291E11CAEULL } }, /* XSUM_XXH128_withSecret_testdata[2031] */\n    { 2032, 0x0000000000000000ULL, { 0x47D9A3AB7BB9557EULL, 0x47C00287F4185A02ULL } }, /* XSUM_XXH128_withSecret_testdata[2032] */\n    { 2033, 0x0000000000000000ULL, { 0xC8EE10B303E59B90ULL, 0xADA457CEDBDEF93EULL } }, /* XSUM_XXH128_withSecret_testdata[2033] */\n    { 2034, 0x0000000000000000ULL, { 0x7744087C5E09B4A0ULL, 0x0694EB828BD2CA59ULL } }, /* XSUM_XXH128_withSecret_testdata[2034] */\n    { 2035, 0x0000000000000000ULL, { 0x2320AF628CF370B9ULL, 0x80242B8D75CDE372ULL } }, /* XSUM_XXH128_withSecret_testdata[2035] */\n    { 2036, 0x0000000000000000ULL, { 0xED1098FAB4D69854ULL, 0xA50426FA977EEF9DULL } }, /* XSUM_XXH128_withSecret_testdata[2036] */\n    { 2037, 0x0000000000000000ULL, { 0x5C441874E06823A9ULL, 0x1A253257005475BCULL } }, /* XSUM_XXH128_withSecret_testdata[2037] */\n    { 2038, 0x0000000000000000ULL, { 0x88136156AC52E87AULL, 0xBFD170780342F14EULL } }, /* XSUM_XXH128_withSecret_testdata[2038] */\n    { 2039, 0x0000000000000000ULL, { 0x357838F44B24482FULL, 0x8C339266C5EFAD8DULL } }, /* XSUM_XXH128_withSecret_testdata[2039] */\n    { 2040, 0x0000000000000000ULL, { 0x7EC986E34C09ACD8ULL, 0xAEE68D921ED893ABULL } }, /* XSUM_XXH128_withSecret_testdata[2040] */\n    { 2041, 0x0000000000000000ULL, { 0x8219190DAE71BA9EULL, 0xBE9CD710AF8C3598ULL } }, /* XSUM_XXH128_withSecret_testdata[2041] */\n    { 2042, 0x0000000000000000ULL, { 0x6D2A9F3B4B4E71F0ULL, 0xF16BDE43AC530E78ULL } }, /* XSUM_XXH128_withSecret_testdata[2042] */\n    { 2043, 0x0000000000000000ULL, { 0x8EC03594DB1AD0DAULL, 0xAE6B92902FCFD0ECULL } }, /* XSUM_XXH128_withSecret_testdata[2043] */\n    { 2044, 0x0000000000000000ULL, { 0x59EED54EB42DE33AULL, 0x39CCC673B50690CDULL } }, /* XSUM_XXH128_withSecret_testdata[2044] */\n    { 2045, 0x0000000000000000ULL, { 0x13805D233DAD8790ULL, 0x3919DD9BA0A9C354ULL } }, /* XSUM_XXH128_withSecret_testdata[2045] */\n    { 2046, 0x0000000000000000ULL, { 0x43676048065E159CULL, 0x44EB3E80CF7C839DULL } }, /* XSUM_XXH128_withSecret_testdata[2046] */\n    { 2047, 0x0000000000000000ULL, { 0x209243520DBDB300ULL, 0x47AA10BA88A049F3ULL } }, /* XSUM_XXH128_withSecret_testdata[2047] */\n    { 2048, 0x0000000000000000ULL, { 0xD32E975821D6519FULL, 0xE862D841C07049AFULL } }, /* XSUM_XXH128_withSecret_testdata[2048] */\n    { 2049, 0x0000000000000000ULL, { 0xA21BE3A04630DEF3ULL, 0x545E67046AF902FBULL } }, /* XSUM_XXH128_withSecret_testdata[2049] */\n    { 2050, 0x0000000000000000ULL, { 0x66C1DE03D1E73446ULL, 0xF5BFE57D4A779A84ULL } }, /* XSUM_XXH128_withSecret_testdata[2050] */\n    { 2051, 0x0000000000000000ULL, { 0x6F919C733E968D5FULL, 0xF1EF2A561E04DC77ULL } }, /* XSUM_XXH128_withSecret_testdata[2051] */\n    { 2052, 0x0000000000000000ULL, { 0x26C292BB2CE4A52BULL, 0xCBF1D16F03D0EC63ULL } }, /* XSUM_XXH128_withSecret_testdata[2052] */\n    { 2053, 0x0000000000000000ULL, { 0x38BC94F790714231ULL, 0x6E0F0D4778789FA4ULL } }, /* XSUM_XXH128_withSecret_testdata[2053] */\n    { 2054, 0x0000000000000000ULL, { 0x1CC2A38D40B0B479ULL, 0xCCA02436A44113E1ULL } }, /* XSUM_XXH128_withSecret_testdata[2054] */\n    { 2055, 0x0000000000000000ULL, { 0x1F88E6D332129AD7ULL, 0x0BF615DF232877BAULL } }, /* XSUM_XXH128_withSecret_testdata[2055] */\n    { 2056, 0x0000000000000000ULL, { 0xEB2297D9BC7DAB31ULL, 0x2146FAD8C43B91A6ULL } }, /* XSUM_XXH128_withSecret_testdata[2056] */\n    { 2057, 0x0000000000000000ULL, { 0x5AD39A25C77470A7ULL, 0x47AF2D018B76E6B1ULL } }, /* XSUM_XXH128_withSecret_testdata[2057] */\n    { 2058, 0x0000000000000000ULL, { 0xE2EBAE7AA5590976ULL, 0xD6B1F25D0BEE37F2ULL } }, /* XSUM_XXH128_withSecret_testdata[2058] */\n    { 2059, 0x0000000000000000ULL, { 0xC95A7CE1FA9D862CULL, 0x1E31752B942ECE49ULL } }, /* XSUM_XXH128_withSecret_testdata[2059] */\n    { 2060, 0x0000000000000000ULL, { 0x4164FD4B4B60A744ULL, 0xF401E7D41A9E2206ULL } }, /* XSUM_XXH128_withSecret_testdata[2060] */\n    { 2061, 0x0000000000000000ULL, { 0xD5EBADC52B3BE9B4ULL, 0x9FAC53595E2FDFE1ULL } }, /* XSUM_XXH128_withSecret_testdata[2061] */\n    { 2062, 0x0000000000000000ULL, { 0x911E0F903F1D33ADULL, 0xC3C7D68077720013ULL } }, /* XSUM_XXH128_withSecret_testdata[2062] */\n    { 2063, 0x0000000000000000ULL, { 0xE6672AD872CCD53FULL, 0xA1F266D68BF5F7C9ULL } }, /* XSUM_XXH128_withSecret_testdata[2063] */\n    { 2064, 0x0000000000000000ULL, { 0xEFB596ADA9519FDDULL, 0xD868F7624117B9CFULL } }, /* XSUM_XXH128_withSecret_testdata[2064] */\n    { 2065, 0x0000000000000000ULL, { 0xB46502B4C20DB573ULL, 0x61BACB371730F040ULL } }, /* XSUM_XXH128_withSecret_testdata[2065] */\n    { 2066, 0x0000000000000000ULL, { 0xE96B5AA61BE76157ULL, 0xAE640BD3DEB2BAF6ULL } }, /* XSUM_XXH128_withSecret_testdata[2066] */\n    { 2067, 0x0000000000000000ULL, { 0x6778895F05F19804ULL, 0xAA6939561FA84A1EULL } }, /* XSUM_XXH128_withSecret_testdata[2067] */\n    { 2068, 0x0000000000000000ULL, { 0x81D3331F18F62106ULL, 0x3792C49A08615B47ULL } }, /* XSUM_XXH128_withSecret_testdata[2068] */\n    { 2069, 0x0000000000000000ULL, { 0x73B7E0205B9C8F02ULL, 0xF5BA4D6AA2B2822AULL } }, /* XSUM_XXH128_withSecret_testdata[2069] */\n    { 2070, 0x0000000000000000ULL, { 0xBC279DDACB497915ULL, 0x6F3E071C1AFF38EAULL } }, /* XSUM_XXH128_withSecret_testdata[2070] */\n    { 2071, 0x0000000000000000ULL, { 0x26E6F63E802A0237ULL, 0xACE401609601C7A1ULL } }, /* XSUM_XXH128_withSecret_testdata[2071] */\n    { 2072, 0x0000000000000000ULL, { 0x6FDDA4A779C05513ULL, 0x8CF66E7291C565A9ULL } }, /* XSUM_XXH128_withSecret_testdata[2072] */\n    { 2073, 0x0000000000000000ULL, { 0x8C117EA6D5CB1D6AULL, 0x48AEF9199F0B5632ULL } }, /* XSUM_XXH128_withSecret_testdata[2073] */\n    { 2074, 0x0000000000000000ULL, { 0xBEF162C7599DB103ULL, 0x1F95FC693850C422ULL } }, /* XSUM_XXH128_withSecret_testdata[2074] */\n    { 2075, 0x0000000000000000ULL, { 0x99A8565C62D35B6BULL, 0x49F5951D8A7EB59BULL } }, /* XSUM_XXH128_withSecret_testdata[2075] */\n    { 2076, 0x0000000000000000ULL, { 0x8C09C893AA0745B4ULL, 0x648A5EAC25E6F1F4ULL } }, /* XSUM_XXH128_withSecret_testdata[2076] */\n    { 2077, 0x0000000000000000ULL, { 0x259D32B53BC5C483ULL, 0x71EEF38B3C86E852ULL } }, /* XSUM_XXH128_withSecret_testdata[2077] */\n    { 2078, 0x0000000000000000ULL, { 0xF34E587F40BA1DC4ULL, 0x9767A1664AACE315ULL } }, /* XSUM_XXH128_withSecret_testdata[2078] */\n    { 2079, 0x0000000000000000ULL, { 0x86EF0E042CD99677ULL, 0x5AC13EEB839FD291ULL } }, /* XSUM_XXH128_withSecret_testdata[2079] */\n    { 2080, 0x0000000000000000ULL, { 0xD50E1D4B97E7610DULL, 0xB63D1657485E68ECULL } }, /* XSUM_XXH128_withSecret_testdata[2080] */\n    { 2081, 0x0000000000000000ULL, { 0x8D79F9511D9BD6C8ULL, 0x54845D5FB1DB9C6DULL } }, /* XSUM_XXH128_withSecret_testdata[2081] */\n    { 2082, 0x0000000000000000ULL, { 0xBD601351D0BA0291ULL, 0x0F0A91583BC94E90ULL } }, /* XSUM_XXH128_withSecret_testdata[2082] */\n    { 2083, 0x0000000000000000ULL, { 0x7A7871FDFED55F62ULL, 0xF1D3350CF0DCD6A6ULL } }, /* XSUM_XXH128_withSecret_testdata[2083] */\n    { 2084, 0x0000000000000000ULL, { 0x1561798466C5452CULL, 0x9F65E75ADBAC73BCULL } }, /* XSUM_XXH128_withSecret_testdata[2084] */\n    { 2085, 0x0000000000000000ULL, { 0x0D21BCE3EF6C5C55ULL, 0x288D94B2C2DCF374ULL } }, /* XSUM_XXH128_withSecret_testdata[2085] */\n    { 2086, 0x0000000000000000ULL, { 0xAAB4CE0A582B1E13ULL, 0x0EA448C36843D120ULL } }, /* XSUM_XXH128_withSecret_testdata[2086] */\n    { 2087, 0x0000000000000000ULL, { 0x7DF76FB93499EF9EULL, 0xC7944B7C09813BD6ULL } }, /* XSUM_XXH128_withSecret_testdata[2087] */\n    { 2088, 0x0000000000000000ULL, { 0x8C8786ECB7222674ULL, 0xCBD4D46F637134E9ULL } }, /* XSUM_XXH128_withSecret_testdata[2088] */\n    { 2089, 0x0000000000000000ULL, { 0x76F06F2C42B2BF52ULL, 0xF351BB79D2A2BAAAULL } }, /* XSUM_XXH128_withSecret_testdata[2089] */\n    { 2090, 0x0000000000000000ULL, { 0xE819BD3C60E0DD3EULL, 0x30C7B5F905FF796BULL } }, /* XSUM_XXH128_withSecret_testdata[2090] */\n    { 2091, 0x0000000000000000ULL, { 0xEECA6A591070079EULL, 0xAFE68D99E19A54EAULL } }, /* XSUM_XXH128_withSecret_testdata[2091] */\n    { 2092, 0x0000000000000000ULL, { 0xBB3BEA3E401EAD72ULL, 0x4027D7D6F9B98E72ULL } }, /* XSUM_XXH128_withSecret_testdata[2092] */\n    { 2093, 0x0000000000000000ULL, { 0x844123209C9A55F9ULL, 0x3F87B0F5F0178633ULL } }, /* XSUM_XXH128_withSecret_testdata[2093] */\n    { 2094, 0x0000000000000000ULL, { 0x6E64CDD471315BB3ULL, 0xE5FFAD7979DC61DDULL } }, /* XSUM_XXH128_withSecret_testdata[2094] */\n    { 2095, 0x0000000000000000ULL, { 0x3B457BD683D5C88BULL, 0xDC9C5A00DB6DCFF0ULL } }, /* XSUM_XXH128_withSecret_testdata[2095] */\n    { 2096, 0x0000000000000000ULL, { 0xF509FFB4B4B76710ULL, 0x8289DD2326661413ULL } }, /* XSUM_XXH128_withSecret_testdata[2096] */\n    { 2097, 0x0000000000000000ULL, { 0x1573E7DE38373E65ULL, 0x341B4FA84C58C6EFULL } }, /* XSUM_XXH128_withSecret_testdata[2097] */\n    { 2098, 0x0000000000000000ULL, { 0xEBEB0F4DBB4C8377ULL, 0x81EC3B9F61271B06ULL } }, /* XSUM_XXH128_withSecret_testdata[2098] */\n    { 2099, 0x0000000000000000ULL, { 0x8DCD6D2487F34E24ULL, 0x6A997419B3FAEED7ULL } }, /* XSUM_XXH128_withSecret_testdata[2099] */\n    { 2100, 0x0000000000000000ULL, { 0xC4D66A26C8A2FDADULL, 0xFB51FBD4E516D4A6ULL } }, /* XSUM_XXH128_withSecret_testdata[2100] */\n    { 2101, 0x0000000000000000ULL, { 0x52712CF283F417CEULL, 0x82D34AE72D121F23ULL } }, /* XSUM_XXH128_withSecret_testdata[2101] */\n    { 2102, 0x0000000000000000ULL, { 0x924F8C83442180D7ULL, 0x8F2B8F46EBEAE304ULL } }, /* XSUM_XXH128_withSecret_testdata[2102] */\n    { 2103, 0x0000000000000000ULL, { 0x343DE55494B2C245ULL, 0x794A16E5FC1AB286ULL } }, /* XSUM_XXH128_withSecret_testdata[2103] */\n    { 2104, 0x0000000000000000ULL, { 0x5CAF411F83BA19F6ULL, 0xF0FF81E9FDC27825ULL } }, /* XSUM_XXH128_withSecret_testdata[2104] */\n    { 2105, 0x0000000000000000ULL, { 0x06EA3A8C72522C43ULL, 0x039947AF94ECB7F0ULL } }, /* XSUM_XXH128_withSecret_testdata[2105] */\n    { 2106, 0x0000000000000000ULL, { 0x2A0A7FC6FA02CBEAULL, 0x917A2F9EDC5406C8ULL } }, /* XSUM_XXH128_withSecret_testdata[2106] */\n    { 2107, 0x0000000000000000ULL, { 0xBD81E26F559D5741ULL, 0xAAE5572DBE32AE42ULL } }, /* XSUM_XXH128_withSecret_testdata[2107] */\n    { 2108, 0x0000000000000000ULL, { 0x8F2996F3DECAA2B9ULL, 0x52B5D7C122488B9BULL } }, /* XSUM_XXH128_withSecret_testdata[2108] */\n    { 2109, 0x0000000000000000ULL, { 0xFBEC878C8A37DF88ULL, 0x25E4B8871E05AE6FULL } }, /* XSUM_XXH128_withSecret_testdata[2109] */\n    { 2110, 0x0000000000000000ULL, { 0xBB27B7BA8CD54B6DULL, 0x4D35A31D66621723ULL } }, /* XSUM_XXH128_withSecret_testdata[2110] */\n    { 2111, 0x0000000000000000ULL, { 0xADFD8F12387660C6ULL, 0x24EDC189B3B3196CULL } }, /* XSUM_XXH128_withSecret_testdata[2111] */\n    { 2112, 0x0000000000000000ULL, { 0x7734C5CB42F4AA50ULL, 0xD8C1064592D83B85ULL } }, /* XSUM_XXH128_withSecret_testdata[2112] */\n    { 2113, 0x0000000000000000ULL, { 0x37AAADC6FB38A58EULL, 0x00BF183B60146686ULL } }, /* XSUM_XXH128_withSecret_testdata[2113] */\n    { 2114, 0x0000000000000000ULL, { 0x72822DA7E16EBD52ULL, 0x6B5A32B6CC325CB0ULL } }, /* XSUM_XXH128_withSecret_testdata[2114] */\n    { 2115, 0x0000000000000000ULL, { 0xF2514B8997F56ADAULL, 0x6E4CD1B7C684B1C6ULL } }, /* XSUM_XXH128_withSecret_testdata[2115] */\n    { 2116, 0x0000000000000000ULL, { 0x7B0E13F461B450DCULL, 0x60DB69CFD53B208EULL } }, /* XSUM_XXH128_withSecret_testdata[2116] */\n    { 2117, 0x0000000000000000ULL, { 0x6299C85970CB72F3ULL, 0xFEF3AB0B1B6AE6FCULL } }, /* XSUM_XXH128_withSecret_testdata[2117] */\n    { 2118, 0x0000000000000000ULL, { 0x9F00FEBF3293C5D2ULL, 0x1CAB3C4F20E6F247ULL } }, /* XSUM_XXH128_withSecret_testdata[2118] */\n    { 2119, 0x0000000000000000ULL, { 0x29F5866058BB82CFULL, 0x0C67449CBA003AE0ULL } }, /* XSUM_XXH128_withSecret_testdata[2119] */\n    { 2120, 0x0000000000000000ULL, { 0x7B68AC656D8544D3ULL, 0x14620B120C293592ULL } }, /* XSUM_XXH128_withSecret_testdata[2120] */\n    { 2121, 0x0000000000000000ULL, { 0x14676FD39C54BEC3ULL, 0x178C30861EA26F6AULL } }, /* XSUM_XXH128_withSecret_testdata[2121] */\n    { 2122, 0x0000000000000000ULL, { 0x74B2C201D6E3F634ULL, 0x34AE106DFA9AF302ULL } }, /* XSUM_XXH128_withSecret_testdata[2122] */\n    { 2123, 0x0000000000000000ULL, { 0xB784D3F03CDC62C5ULL, 0x4180C1A7BB899A4FULL } }, /* XSUM_XXH128_withSecret_testdata[2123] */\n    { 2124, 0x0000000000000000ULL, { 0x1071B2D025552CD9ULL, 0x62358C671DC9DAC0ULL } }, /* XSUM_XXH128_withSecret_testdata[2124] */\n    { 2125, 0x0000000000000000ULL, { 0x95B0032D43F512C3ULL, 0xAF32EC0A0AEDE325ULL } }, /* XSUM_XXH128_withSecret_testdata[2125] */\n    { 2126, 0x0000000000000000ULL, { 0xB089997C117D2050ULL, 0x0B22866EFF7CA22BULL } }, /* XSUM_XXH128_withSecret_testdata[2126] */\n    { 2127, 0x0000000000000000ULL, { 0x50F0CB60BD0A4454ULL, 0x112CE70CE2EDF652ULL } }, /* XSUM_XXH128_withSecret_testdata[2127] */\n    { 2128, 0x0000000000000000ULL, { 0x55B2F545EECC6289ULL, 0xE4EEBD5A9147A80AULL } }, /* XSUM_XXH128_withSecret_testdata[2128] */\n    { 2129, 0x0000000000000000ULL, { 0xB9252EC3C2B99725ULL, 0xE08216FD5C0FA6C6ULL } }, /* XSUM_XXH128_withSecret_testdata[2129] */\n    { 2130, 0x0000000000000000ULL, { 0x01C577B1E6F49009ULL, 0xDCB248C4795BA261ULL } }, /* XSUM_XXH128_withSecret_testdata[2130] */\n    { 2131, 0x0000000000000000ULL, { 0x3D09169CB408C167ULL, 0x729DFC1F92B49D59ULL } }, /* XSUM_XXH128_withSecret_testdata[2131] */\n    { 2132, 0x0000000000000000ULL, { 0x02114BEE3F68C72AULL, 0xFD24D3DBB1682978ULL } }, /* XSUM_XXH128_withSecret_testdata[2132] */\n    { 2133, 0x0000000000000000ULL, { 0x8E6428C72B768BD8ULL, 0xF5FBBAFB376FADB2ULL } }, /* XSUM_XXH128_withSecret_testdata[2133] */\n    { 2134, 0x0000000000000000ULL, { 0x8EE2E521028193B2ULL, 0x09AD2A073825D62AULL } }, /* XSUM_XXH128_withSecret_testdata[2134] */\n    { 2135, 0x0000000000000000ULL, { 0xC3242FE952F2409AULL, 0xAFB8CC1E5FE224B3ULL } }, /* XSUM_XXH128_withSecret_testdata[2135] */\n    { 2136, 0x0000000000000000ULL, { 0xC884F8B40EA4D506ULL, 0xD6A745C985239C1EULL } }, /* XSUM_XXH128_withSecret_testdata[2136] */\n    { 2137, 0x0000000000000000ULL, { 0x61E514D4720C4879ULL, 0x240C87BDED648746ULL } }, /* XSUM_XXH128_withSecret_testdata[2137] */\n    { 2138, 0x0000000000000000ULL, { 0xEDD2803ED3C69260ULL, 0x6A1D32114B6A4AB7ULL } }, /* XSUM_XXH128_withSecret_testdata[2138] */\n    { 2139, 0x0000000000000000ULL, { 0x7D410220AE855F6BULL, 0xEBCAE06386D14559ULL } }, /* XSUM_XXH128_withSecret_testdata[2139] */\n    { 2140, 0x0000000000000000ULL, { 0xB585C3659C5134AAULL, 0x4149F9B20B57C3DBULL } }, /* XSUM_XXH128_withSecret_testdata[2140] */\n    { 2141, 0x0000000000000000ULL, { 0xE7A30A7EEBBE9FE5ULL, 0x99895A736C6C049BULL } }, /* XSUM_XXH128_withSecret_testdata[2141] */\n    { 2142, 0x0000000000000000ULL, { 0x3D48856325430C1EULL, 0x13C3EA1A91CC42C9ULL } }, /* XSUM_XXH128_withSecret_testdata[2142] */\n    { 2143, 0x0000000000000000ULL, { 0xB6C9104D13537A3FULL, 0xC28762897699F2E9ULL } }, /* XSUM_XXH128_withSecret_testdata[2143] */\n    { 2144, 0x0000000000000000ULL, { 0x52432918B4F4334BULL, 0x297071BA2B49EFA1ULL } }, /* XSUM_XXH128_withSecret_testdata[2144] */\n    { 2145, 0x0000000000000000ULL, { 0x1E9DFCF70AFEA2C6ULL, 0xC3F149BF7B9B38F0ULL } }, /* XSUM_XXH128_withSecret_testdata[2145] */\n    { 2146, 0x0000000000000000ULL, { 0xDF53EC34725FEF8DULL, 0x618A100BE51AA6A0ULL } }, /* XSUM_XXH128_withSecret_testdata[2146] */\n    { 2147, 0x0000000000000000ULL, { 0xE02E5F9CED9796F5ULL, 0xD6DCA295449F6295ULL } }, /* XSUM_XXH128_withSecret_testdata[2147] */\n    { 2148, 0x0000000000000000ULL, { 0x67C08B1347A9FBE6ULL, 0xF4682799540725B9ULL } }, /* XSUM_XXH128_withSecret_testdata[2148] */\n    { 2149, 0x0000000000000000ULL, { 0x596ACD131E8324E6ULL, 0x9CC492037A263484ULL } }, /* XSUM_XXH128_withSecret_testdata[2149] */\n    { 2150, 0x0000000000000000ULL, { 0x857B573F75AF45B3ULL, 0xE5D52F7198E78E95ULL } }, /* XSUM_XXH128_withSecret_testdata[2150] */\n    { 2151, 0x0000000000000000ULL, { 0xF621184FD7387501ULL, 0xEEE3AD55FDEC915EULL } }, /* XSUM_XXH128_withSecret_testdata[2151] */\n    { 2152, 0x0000000000000000ULL, { 0xBF3DD7EA4DA7F9B3ULL, 0x84625CBAECFA3C6BULL } }, /* XSUM_XXH128_withSecret_testdata[2152] */\n    { 2153, 0x0000000000000000ULL, { 0xA778BD9689DA8D92ULL, 0xE6D6C36A49D4D19DULL } }, /* XSUM_XXH128_withSecret_testdata[2153] */\n    { 2154, 0x0000000000000000ULL, { 0xF9F8714A7D2B38D8ULL, 0xBE82BE3A286F6F87ULL } }, /* XSUM_XXH128_withSecret_testdata[2154] */\n    { 2155, 0x0000000000000000ULL, { 0x8F1D87FA7292F138ULL, 0xB396F9C7C86303A6ULL } }, /* XSUM_XXH128_withSecret_testdata[2155] */\n    { 2156, 0x0000000000000000ULL, { 0xC5545D2DAD173E28ULL, 0xC2D9AB02403F812DULL } }, /* XSUM_XXH128_withSecret_testdata[2156] */\n    { 2157, 0x0000000000000000ULL, { 0xB51D09BF3D4A4F17ULL, 0x340A3E2E9D318A19ULL } }, /* XSUM_XXH128_withSecret_testdata[2157] */\n    { 2158, 0x0000000000000000ULL, { 0x3E4D380ABA6BBED3ULL, 0x7AF87D54BE2CC563ULL } }, /* XSUM_XXH128_withSecret_testdata[2158] */\n    { 2159, 0x0000000000000000ULL, { 0xD87EDF8499C1EFCBULL, 0x25D9BC4E4553E6BCULL } }, /* XSUM_XXH128_withSecret_testdata[2159] */\n    { 2160, 0x0000000000000000ULL, { 0x883CAFC7E6BDA01FULL, 0x9168F7B53E474B7CULL } }, /* XSUM_XXH128_withSecret_testdata[2160] */\n    { 2161, 0x0000000000000000ULL, { 0xC2A0A8C60408CB03ULL, 0x3E5ACF676E4865A6ULL } }, /* XSUM_XXH128_withSecret_testdata[2161] */\n    { 2162, 0x0000000000000000ULL, { 0x4FF2D7CF67B9D722ULL, 0x1567A3A775CD9BBAULL } }, /* XSUM_XXH128_withSecret_testdata[2162] */\n    { 2163, 0x0000000000000000ULL, { 0xC6A790AC7051FDA7ULL, 0x0B8AA5FD5BFE4BF2ULL } }, /* XSUM_XXH128_withSecret_testdata[2163] */\n    { 2164, 0x0000000000000000ULL, { 0x290824A0B617FAA1ULL, 0x14170CDF62C3BA98ULL } }, /* XSUM_XXH128_withSecret_testdata[2164] */\n    { 2165, 0x0000000000000000ULL, { 0x70926C396EEF2312ULL, 0x78FE4A07E04A2D57ULL } }, /* XSUM_XXH128_withSecret_testdata[2165] */\n    { 2166, 0x0000000000000000ULL, { 0xD1760A6B92C41E94ULL, 0x4B46055042E73D86ULL } }, /* XSUM_XXH128_withSecret_testdata[2166] */\n    { 2167, 0x0000000000000000ULL, { 0x6EF1770EA5C074AFULL, 0xD488865192EE4481ULL } }, /* XSUM_XXH128_withSecret_testdata[2167] */\n    { 2168, 0x0000000000000000ULL, { 0xAEDE9A122E3DF1EDULL, 0xCE45A651F042A8F3ULL } }, /* XSUM_XXH128_withSecret_testdata[2168] */\n    { 2169, 0x0000000000000000ULL, { 0x97966969D62D7923ULL, 0xFCD0E761671B3BDEULL } }, /* XSUM_XXH128_withSecret_testdata[2169] */\n    { 2170, 0x0000000000000000ULL, { 0x1C92CB86837BA1EAULL, 0x7621F0AD53529B0DULL } }, /* XSUM_XXH128_withSecret_testdata[2170] */\n    { 2171, 0x0000000000000000ULL, { 0x1CDC56581C55A9C6ULL, 0x7EFF33184E1185BAULL } }, /* XSUM_XXH128_withSecret_testdata[2171] */\n    { 2172, 0x0000000000000000ULL, { 0x3636D7EA7BC90F01ULL, 0x26B4F359EFCF35CFULL } }, /* XSUM_XXH128_withSecret_testdata[2172] */\n    { 2173, 0x0000000000000000ULL, { 0x38048B8DEA0CA60AULL, 0x698D8BE137968736ULL } }, /* XSUM_XXH128_withSecret_testdata[2173] */\n    { 2174, 0x0000000000000000ULL, { 0xD02B6B9E5AA664EAULL, 0x877B665AE43817FCULL } }, /* XSUM_XXH128_withSecret_testdata[2174] */\n    { 2175, 0x0000000000000000ULL, { 0x0539B782E6DFBD35ULL, 0xB140523BD6ED4314ULL } }, /* XSUM_XXH128_withSecret_testdata[2175] */\n    { 2176, 0x0000000000000000ULL, { 0xD6E73682701B5995ULL, 0x00FD69B918BF252DULL } }, /* XSUM_XXH128_withSecret_testdata[2176] */\n    { 2177, 0x0000000000000000ULL, { 0x60B860587E195139ULL, 0xEFCA8083D8E004E4ULL } }, /* XSUM_XXH128_withSecret_testdata[2177] */\n    { 2178, 0x0000000000000000ULL, { 0x25EE8AEA8EEA3138ULL, 0x5613EC937C92A476ULL } }, /* XSUM_XXH128_withSecret_testdata[2178] */\n    { 2179, 0x0000000000000000ULL, { 0x50CB0FCF6C709664ULL, 0x12D5E0A9FA000F4CULL } }, /* XSUM_XXH128_withSecret_testdata[2179] */\n    { 2180, 0x0000000000000000ULL, { 0xE174F4506DC059A0ULL, 0x3D0EEA665113BE36ULL } }, /* XSUM_XXH128_withSecret_testdata[2180] */\n    { 2181, 0x0000000000000000ULL, { 0x29F30375099FD331ULL, 0x6663139F6633B627ULL } }, /* XSUM_XXH128_withSecret_testdata[2181] */\n    { 2182, 0x0000000000000000ULL, { 0x0911ED3330826D10ULL, 0x85E513B4923F64DEULL } }, /* XSUM_XXH128_withSecret_testdata[2182] */\n    { 2183, 0x0000000000000000ULL, { 0x09DB411B3F57F5EAULL, 0xEF092B04FC65FDC2ULL } }, /* XSUM_XXH128_withSecret_testdata[2183] */\n    { 2184, 0x0000000000000000ULL, { 0x20E42F7D0F648E29ULL, 0x42E7A32DA3C9AF8DULL } }, /* XSUM_XXH128_withSecret_testdata[2184] */\n    { 2185, 0x0000000000000000ULL, { 0x26EEDE1A6CED9BDAULL, 0x9AAFD57459097CDAULL } }, /* XSUM_XXH128_withSecret_testdata[2185] */\n    { 2186, 0x0000000000000000ULL, { 0x1BFFC9DF26D340F9ULL, 0x6BDC1545032CBF64ULL } }, /* XSUM_XXH128_withSecret_testdata[2186] */\n    { 2187, 0x0000000000000000ULL, { 0x2EDA55B6A2EF296AULL, 0x772C99ECEF2D9C47ULL } }, /* XSUM_XXH128_withSecret_testdata[2187] */\n    { 2188, 0x0000000000000000ULL, { 0x4E36B8B0DE4FC569ULL, 0x0B45B90BBCFF66EDULL } }, /* XSUM_XXH128_withSecret_testdata[2188] */\n    { 2189, 0x0000000000000000ULL, { 0xB3F247689FEA7D39ULL, 0xFE5157B7416BB5AFULL } }, /* XSUM_XXH128_withSecret_testdata[2189] */\n    { 2190, 0x0000000000000000ULL, { 0xAA5325019870AA88ULL, 0x5F5EE157F5BE4298ULL } }, /* XSUM_XXH128_withSecret_testdata[2190] */\n    { 2191, 0x0000000000000000ULL, { 0xAF1F74B12B1598BCULL, 0x373DF8098552C863ULL } }, /* XSUM_XXH128_withSecret_testdata[2191] */\n    { 2192, 0x0000000000000000ULL, { 0x3758717C3AEF2F7DULL, 0xEC3521F2357BD062ULL } }, /* XSUM_XXH128_withSecret_testdata[2192] */\n    { 2193, 0x0000000000000000ULL, { 0x1F4624F680940704ULL, 0x337800FE1A1A0D66ULL } }, /* XSUM_XXH128_withSecret_testdata[2193] */\n    { 2194, 0x0000000000000000ULL, { 0x7A29300A4BFC4F98ULL, 0xB5CBE2591D62F2F5ULL } }, /* XSUM_XXH128_withSecret_testdata[2194] */\n    { 2195, 0x0000000000000000ULL, { 0x9BCA2AF8728075FDULL, 0x51351521314ED6D9ULL } }, /* XSUM_XXH128_withSecret_testdata[2195] */\n    { 2196, 0x0000000000000000ULL, { 0xAE4D849184AD3BDDULL, 0x96223084B0BF3382ULL } }, /* XSUM_XXH128_withSecret_testdata[2196] */\n    { 2197, 0x0000000000000000ULL, { 0xA1B5FAF56D9DFF7FULL, 0x7762F8CAB902D260ULL } }, /* XSUM_XXH128_withSecret_testdata[2197] */\n    { 2198, 0x0000000000000000ULL, { 0xF06E29546BEB29FEULL, 0xFA74BF4E1D54AB54ULL } }, /* XSUM_XXH128_withSecret_testdata[2198] */\n    { 2199, 0x0000000000000000ULL, { 0x6899A86016F32CCCULL, 0xA9C1C7DDEE6EBAE1ULL } }, /* XSUM_XXH128_withSecret_testdata[2199] */\n    { 2200, 0x0000000000000000ULL, { 0x336C1F494516C5CFULL, 0x4BFF5E68B3FCA4AEULL } }, /* XSUM_XXH128_withSecret_testdata[2200] */\n    { 2201, 0x0000000000000000ULL, { 0x909390D4ECF72E10ULL, 0xA406FE2EB929287EULL } }, /* XSUM_XXH128_withSecret_testdata[2201] */\n    { 2202, 0x0000000000000000ULL, { 0x1D36F744CA69DEFDULL, 0xF6969011A47EA4CFULL } }, /* XSUM_XXH128_withSecret_testdata[2202] */\n    { 2203, 0x0000000000000000ULL, { 0xFD829BB76B9D4869ULL, 0x62C4A68F0C9E2AEBULL } }, /* XSUM_XXH128_withSecret_testdata[2203] */\n    { 2204, 0x0000000000000000ULL, { 0x5C039EDB6334D64FULL, 0x4EF360E19FE63E40ULL } }, /* XSUM_XXH128_withSecret_testdata[2204] */\n    { 2205, 0x0000000000000000ULL, { 0xE5B34EBBF9D385B4ULL, 0x3D60581F36103A15ULL } }, /* XSUM_XXH128_withSecret_testdata[2205] */\n    { 2206, 0x0000000000000000ULL, { 0xCAE9F8B87FD48178ULL, 0xEADAB8243971337EULL } }, /* XSUM_XXH128_withSecret_testdata[2206] */\n    { 2207, 0x0000000000000000ULL, { 0xE7C0334ED41AAD82ULL, 0x5BB1A3F308EEA2EDULL } }, /* XSUM_XXH128_withSecret_testdata[2207] */\n    { 2208, 0x0000000000000000ULL, { 0x25DB0183D11240A7ULL, 0x5098E1506B5DD841ULL } }, /* XSUM_XXH128_withSecret_testdata[2208] */\n    { 2209, 0x0000000000000000ULL, { 0x25BE6E483CA29A06ULL, 0x3C102E4255E95269ULL } }, /* XSUM_XXH128_withSecret_testdata[2209] */\n    { 2210, 0x0000000000000000ULL, { 0x6EEC50B126409696ULL, 0xBE33872F6BE21403ULL } }, /* XSUM_XXH128_withSecret_testdata[2210] */\n    { 2211, 0x0000000000000000ULL, { 0x28630B9216B6B1B5ULL, 0x1ADC22A158D68CFDULL } }, /* XSUM_XXH128_withSecret_testdata[2211] */\n    { 2212, 0x0000000000000000ULL, { 0xDD5F2BB4C8213D2CULL, 0x7A5F341496667873ULL } }, /* XSUM_XXH128_withSecret_testdata[2212] */\n    { 2213, 0x0000000000000000ULL, { 0xF73FDB2ABD004047ULL, 0x11D47923D75523D0ULL } }, /* XSUM_XXH128_withSecret_testdata[2213] */\n    { 2214, 0x0000000000000000ULL, { 0x5FC59786B18C00A6ULL, 0x93781E93D0A073EFULL } }, /* XSUM_XXH128_withSecret_testdata[2214] */\n    { 2215, 0x0000000000000000ULL, { 0xF60C96501D50DFB6ULL, 0x110D3F41ED1C7DC0ULL } }, /* XSUM_XXH128_withSecret_testdata[2215] */\n    { 2216, 0x0000000000000000ULL, { 0x22E2D42C123565EDULL, 0x8F0F0F7D4085348EULL } }, /* XSUM_XXH128_withSecret_testdata[2216] */\n    { 2217, 0x0000000000000000ULL, { 0x9A708BA1C587E313ULL, 0x739D30DF8714C6B4ULL } }, /* XSUM_XXH128_withSecret_testdata[2217] */\n    { 2218, 0x0000000000000000ULL, { 0x39F4108425FE61D9ULL, 0x732CBB6B607D07A8ULL } }, /* XSUM_XXH128_withSecret_testdata[2218] */\n    { 2219, 0x0000000000000000ULL, { 0x28B00C7A4B8226A6ULL, 0xEE2D1DDE4E4C1058ULL } }, /* XSUM_XXH128_withSecret_testdata[2219] */\n    { 2220, 0x0000000000000000ULL, { 0x7D1E4243181151E6ULL, 0x87E4B3F36B0F5F29ULL } }, /* XSUM_XXH128_withSecret_testdata[2220] */\n    { 2221, 0x0000000000000000ULL, { 0x79C7FAEB4BA041BEULL, 0xAA5E42A3D72806A6ULL } }, /* XSUM_XXH128_withSecret_testdata[2221] */\n    { 2222, 0x0000000000000000ULL, { 0x6ED768A5652D7700ULL, 0x93028FF6C0725DE7ULL } }, /* XSUM_XXH128_withSecret_testdata[2222] */\n    { 2223, 0x0000000000000000ULL, { 0xF9A78935B335652DULL, 0x7A8EB05C1DBC0796ULL } }, /* XSUM_XXH128_withSecret_testdata[2223] */\n    { 2224, 0x0000000000000000ULL, { 0x5D7FF63F85C6ED9AULL, 0x6C523A954A7E82EEULL } }, /* XSUM_XXH128_withSecret_testdata[2224] */\n    { 2225, 0x0000000000000000ULL, { 0xD8B9E693B3AAB45EULL, 0x03C2210535C54CE2ULL } }, /* XSUM_XXH128_withSecret_testdata[2225] */\n    { 2226, 0x0000000000000000ULL, { 0xF413F7EFF888972FULL, 0x881F081F8F45A9D2ULL } }, /* XSUM_XXH128_withSecret_testdata[2226] */\n    { 2227, 0x0000000000000000ULL, { 0xC96DC8C5385F67D2ULL, 0xC4B78BDAA45C369EULL } }, /* XSUM_XXH128_withSecret_testdata[2227] */\n    { 2228, 0x0000000000000000ULL, { 0xAA1F998B9558EFFCULL, 0x89B6DA694527EDDBULL } }, /* XSUM_XXH128_withSecret_testdata[2228] */\n    { 2229, 0x0000000000000000ULL, { 0xD3A161393EC9F87FULL, 0x779C41CCCD58EE4EULL } }, /* XSUM_XXH128_withSecret_testdata[2229] */\n    { 2230, 0x0000000000000000ULL, { 0xA0A3A55CF9468C9EULL, 0x149BB33FC75A90BEULL } }, /* XSUM_XXH128_withSecret_testdata[2230] */\n    { 2231, 0x0000000000000000ULL, { 0x7C0D4337C9FDD88AULL, 0x199D8E47552658BDULL } }, /* XSUM_XXH128_withSecret_testdata[2231] */\n    { 2232, 0x0000000000000000ULL, { 0xB6F588D74008E382ULL, 0x14E17637C95A1708ULL } }, /* XSUM_XXH128_withSecret_testdata[2232] */\n    { 2233, 0x0000000000000000ULL, { 0xD6079562C6E6FCB2ULL, 0x65F959CA16E9059AULL } }, /* XSUM_XXH128_withSecret_testdata[2233] */\n    { 2234, 0x0000000000000000ULL, { 0x226100ED97CBBDF4ULL, 0x40FA70563B3E4AA7ULL } }, /* XSUM_XXH128_withSecret_testdata[2234] */\n    { 2235, 0x0000000000000000ULL, { 0xA4B6FE30750DD2DFULL, 0xD1ABE804E744D64EULL } }, /* XSUM_XXH128_withSecret_testdata[2235] */\n    { 2236, 0x0000000000000000ULL, { 0x08B202BF52DDF891ULL, 0xB123094E707D4550ULL } }, /* XSUM_XXH128_withSecret_testdata[2236] */\n    { 2237, 0x0000000000000000ULL, { 0xBD6A715D6EC4A2FEULL, 0xB24DF30F63A1259BULL } }, /* XSUM_XXH128_withSecret_testdata[2237] */\n    { 2238, 0x0000000000000000ULL, { 0x83AF768E4FC9DCAEULL, 0x95A87BE0F0F88D4BULL } }, /* XSUM_XXH128_withSecret_testdata[2238] */\n    { 2239, 0x0000000000000000ULL, { 0xC9A9023234565E91ULL, 0x454DC41FB24788B2ULL } }, /* XSUM_XXH128_withSecret_testdata[2239] */\n    { 2240, 0x0000000000000000ULL, { 0xB26C938C7AF3A71FULL, 0x1E89EE710A768055ULL } }, /* XSUM_XXH128_withSecret_testdata[2240] */\n    { 2241, 0x0000000000000000ULL, { 0xBC5C9973093ED600ULL, 0xF4915CB6D7CE0BC5ULL } }, /* XSUM_XXH128_withSecret_testdata[2241] */\n    { 2242, 0x0000000000000000ULL, { 0xC4A13D1873FFABCEULL, 0x47C8CC1B3BEB95C6ULL } }, /* XSUM_XXH128_withSecret_testdata[2242] */\n    { 2243, 0x0000000000000000ULL, { 0x27BDD19F2D168989ULL, 0x28DF4435469A029FULL } }, /* XSUM_XXH128_withSecret_testdata[2243] */\n    { 2244, 0x0000000000000000ULL, { 0xC77DEEBE4BF19064ULL, 0x61C3499577AD74B3ULL } }, /* XSUM_XXH128_withSecret_testdata[2244] */\n    { 2245, 0x0000000000000000ULL, { 0x7EC103ADD9B43ADDULL, 0x813E86D9BF9B6572ULL } }, /* XSUM_XXH128_withSecret_testdata[2245] */\n    { 2246, 0x0000000000000000ULL, { 0xEF03C35D9751C6F4ULL, 0x4F27C79828D29D3AULL } }, /* XSUM_XXH128_withSecret_testdata[2246] */\n    { 2247, 0x0000000000000000ULL, { 0x804531532668391EULL, 0x17C3E56AC9C51FDBULL } }, /* XSUM_XXH128_withSecret_testdata[2247] */\n    { 2248, 0x0000000000000000ULL, { 0x5CBDBD17A3538DF8ULL, 0xCAFAD8093DE5773BULL } }, /* XSUM_XXH128_withSecret_testdata[2248] */\n    { 2249, 0x0000000000000000ULL, { 0x72C149715AD0517BULL, 0xBF75EDCC6F11D41FULL } }, /* XSUM_XXH128_withSecret_testdata[2249] */\n    { 2250, 0x0000000000000000ULL, { 0xF3E97C36038D1D60ULL, 0xBBA5CD765B4A69C8ULL } }, /* XSUM_XXH128_withSecret_testdata[2250] */\n    { 2251, 0x0000000000000000ULL, { 0x5145D630BC5A53BFULL, 0xB45520F8478125A9ULL } }, /* XSUM_XXH128_withSecret_testdata[2251] */\n    { 2252, 0x0000000000000000ULL, { 0x59BA7CA921C1230DULL, 0x20462CD1480E0A23ULL } }, /* XSUM_XXH128_withSecret_testdata[2252] */\n    { 2253, 0x0000000000000000ULL, { 0xC70763A3879EE91EULL, 0x21DCA07AEFBEC673ULL } }, /* XSUM_XXH128_withSecret_testdata[2253] */\n    { 2254, 0x0000000000000000ULL, { 0x8199110ED9BBA114ULL, 0x851E84997498C611ULL } }, /* XSUM_XXH128_withSecret_testdata[2254] */\n    { 2255, 0x0000000000000000ULL, { 0x2354D7FE431DAE7AULL, 0x25602F19E5CC2AE6ULL } }, /* XSUM_XXH128_withSecret_testdata[2255] */\n    { 2256, 0x0000000000000000ULL, { 0x09CD399A744FB965ULL, 0x6EA9B00C560857CAULL } }, /* XSUM_XXH128_withSecret_testdata[2256] */\n    { 2257, 0x0000000000000000ULL, { 0x55D9C79A8AA3DA7BULL, 0x38CDD608C14F1253ULL } }, /* XSUM_XXH128_withSecret_testdata[2257] */\n    { 2258, 0x0000000000000000ULL, { 0xFA30DE23B3836096ULL, 0x17E8EC7E90C2F654ULL } }, /* XSUM_XXH128_withSecret_testdata[2258] */\n    { 2259, 0x0000000000000000ULL, { 0x713D5DB68DB30414ULL, 0x3C6A7393F4CA2587ULL } }, /* XSUM_XXH128_withSecret_testdata[2259] */\n    { 2260, 0x0000000000000000ULL, { 0x4193437A072082D0ULL, 0x4CC721376A09BE86ULL } }, /* XSUM_XXH128_withSecret_testdata[2260] */\n    { 2261, 0x0000000000000000ULL, { 0xC1BC64C4C4C9619CULL, 0x74F09284417F7829ULL } }, /* XSUM_XXH128_withSecret_testdata[2261] */\n    { 2262, 0x0000000000000000ULL, { 0xAEE890BF51352B13ULL, 0x54E3A6D6C2292EB1ULL } }, /* XSUM_XXH128_withSecret_testdata[2262] */\n    { 2263, 0x0000000000000000ULL, { 0x6723CC64A6E66603ULL, 0x93693F0D34AC0D9AULL } }, /* XSUM_XXH128_withSecret_testdata[2263] */\n    { 2264, 0x0000000000000000ULL, { 0xAE56CAEA5D1B01C7ULL, 0x0C0788E72748CE03ULL } }, /* XSUM_XXH128_withSecret_testdata[2264] */\n    { 2265, 0x0000000000000000ULL, { 0x6342032FC46E6EECULL, 0x0C4EC91CC85F6663ULL } }, /* XSUM_XXH128_withSecret_testdata[2265] */\n    { 2266, 0x0000000000000000ULL, { 0x85C23DB28F6047E2ULL, 0xF91B02EB9C11ECC5ULL } }, /* XSUM_XXH128_withSecret_testdata[2266] */\n    { 2267, 0x0000000000000000ULL, { 0x4FCD32B63E1A64DAULL, 0xC3268FF1900C60C4ULL } }, /* XSUM_XXH128_withSecret_testdata[2267] */\n    { 2268, 0x0000000000000000ULL, { 0xE8C4F61E1DC023B4ULL, 0x9F4F1B893A31B4AEULL } }, /* XSUM_XXH128_withSecret_testdata[2268] */\n    { 2269, 0x0000000000000000ULL, { 0x4471974B48134F1FULL, 0x8523355D37C4BC30ULL } }, /* XSUM_XXH128_withSecret_testdata[2269] */\n    { 2270, 0x0000000000000000ULL, { 0x4B574C457CC748ACULL, 0x582EFC476E0B0A1BULL } }, /* XSUM_XXH128_withSecret_testdata[2270] */\n    { 2271, 0x0000000000000000ULL, { 0x8B961ABE89821A5BULL, 0x503615666A51535DULL } }, /* XSUM_XXH128_withSecret_testdata[2271] */\n    { 2272, 0x0000000000000000ULL, { 0xB4F162F7476B02F8ULL, 0x6C4ECA999A3B4A3FULL } }, /* XSUM_XXH128_withSecret_testdata[2272] */\n    { 2273, 0x0000000000000000ULL, { 0xA8596A044226B4B5ULL, 0x595DA7D413285DBEULL } }, /* XSUM_XXH128_withSecret_testdata[2273] */\n    { 2274, 0x0000000000000000ULL, { 0xB46AE2C707E652EDULL, 0x1077F2F9A43E0118ULL } }, /* XSUM_XXH128_withSecret_testdata[2274] */\n    { 2275, 0x0000000000000000ULL, { 0x8998E0503123BD36ULL, 0x553CC80BDA7C29DEULL } }, /* XSUM_XXH128_withSecret_testdata[2275] */\n    { 2276, 0x0000000000000000ULL, { 0x6920D7B185CFA861ULL, 0x3F9F8D6132D774A4ULL } }, /* XSUM_XXH128_withSecret_testdata[2276] */\n    { 2277, 0x0000000000000000ULL, { 0xD5382417A6B1CC5AULL, 0xE1CC6BD176CA9F53ULL } }, /* XSUM_XXH128_withSecret_testdata[2277] */\n    { 2278, 0x0000000000000000ULL, { 0x1FC5895FF42CFCFFULL, 0xD89425098076597AULL } }, /* XSUM_XXH128_withSecret_testdata[2278] */\n    { 2279, 0x0000000000000000ULL, { 0xE3383CF25DFB4830ULL, 0x924022136EDE2F20ULL } }, /* XSUM_XXH128_withSecret_testdata[2279] */\n    { 2280, 0x0000000000000000ULL, { 0x1D7738B4E24E553BULL, 0xA9AB301255AC28FBULL } }, /* XSUM_XXH128_withSecret_testdata[2280] */\n    { 2281, 0x0000000000000000ULL, { 0x13240DE7D612861EULL, 0x8DDF1EFB030478C9ULL } }, /* XSUM_XXH128_withSecret_testdata[2281] */\n    { 2282, 0x0000000000000000ULL, { 0xFF572AB52662D912ULL, 0xF8E7F40950026E0AULL } }, /* XSUM_XXH128_withSecret_testdata[2282] */\n    { 2283, 0x0000000000000000ULL, { 0xB7C29C229F6BE899ULL, 0x3E5E744C8CA16560ULL } }, /* XSUM_XXH128_withSecret_testdata[2283] */\n    { 2284, 0x0000000000000000ULL, { 0x0BBB745326479CDBULL, 0xDA729FD4AEC53EB1ULL } }, /* XSUM_XXH128_withSecret_testdata[2284] */\n    { 2285, 0x0000000000000000ULL, { 0x947D7531189C1D65ULL, 0xD38E7FF05A6CF012ULL } }, /* XSUM_XXH128_withSecret_testdata[2285] */\n    { 2286, 0x0000000000000000ULL, { 0x9ABD6EF3250F1494ULL, 0xB783F24EBE8A75CDULL } }, /* XSUM_XXH128_withSecret_testdata[2286] */\n    { 2287, 0x0000000000000000ULL, { 0xCC3115D4324406D1ULL, 0x68A8AB20BF999F3FULL } }, /* XSUM_XXH128_withSecret_testdata[2287] */\n    { 2288, 0x0000000000000000ULL, { 0xD818495BF495BBB8ULL, 0xF871022EB0CFBB1AULL } }, /* XSUM_XXH128_withSecret_testdata[2288] */\n    { 2289, 0x0000000000000000ULL, { 0xE3F0E0CBDAA66C3DULL, 0xF88F600F9779E69EULL } }, /* XSUM_XXH128_withSecret_testdata[2289] */\n    { 2290, 0x0000000000000000ULL, { 0x93CFDB535AAEF8A6ULL, 0xF6E2E4B44CF09B56ULL } }, /* XSUM_XXH128_withSecret_testdata[2290] */\n    { 2291, 0x0000000000000000ULL, { 0xE824856FC547AED2ULL, 0x6F1BF5A24879E640ULL } }, /* XSUM_XXH128_withSecret_testdata[2291] */\n    { 2292, 0x0000000000000000ULL, { 0x1F24C86993C3DA02ULL, 0xB9AD7DE77CCA02F8ULL } }, /* XSUM_XXH128_withSecret_testdata[2292] */\n    { 2293, 0x0000000000000000ULL, { 0xD101BD8752C5CA57ULL, 0xAF0AE09ADFCF1886ULL } }, /* XSUM_XXH128_withSecret_testdata[2293] */\n    { 2294, 0x0000000000000000ULL, { 0xE0F688D96576672CULL, 0x12EA9AF537ACF5F6ULL } }, /* XSUM_XXH128_withSecret_testdata[2294] */\n    { 2295, 0x0000000000000000ULL, { 0xB0BE8DAE214360EDULL, 0x8A4067D5EDB2DB41ULL } }, /* XSUM_XXH128_withSecret_testdata[2295] */\n    { 2296, 0x0000000000000000ULL, { 0xED767DDFE4DD76FBULL, 0x919D589E75F23637ULL } }, /* XSUM_XXH128_withSecret_testdata[2296] */\n    { 2297, 0x0000000000000000ULL, { 0x1416BB25000457C6ULL, 0xC3A04FC57FF0EED0ULL } }, /* XSUM_XXH128_withSecret_testdata[2297] */\n    { 2298, 0x0000000000000000ULL, { 0x8D3763863C621A67ULL, 0x41A3D6719DDAACBEULL } }, /* XSUM_XXH128_withSecret_testdata[2298] */\n    { 2299, 0x0000000000000000ULL, { 0xBA806D61C6F26C17ULL, 0x281487C1FAA88A22ULL } }, /* XSUM_XXH128_withSecret_testdata[2299] */\n    { 2300, 0x0000000000000000ULL, { 0x078884BAD7E55EECULL, 0xFA8B5AFFC175441AULL } }, /* XSUM_XXH128_withSecret_testdata[2300] */\n    { 2301, 0x0000000000000000ULL, { 0xF20409B35741CA4EULL, 0x1AF9D70C3A87567CULL } }, /* XSUM_XXH128_withSecret_testdata[2301] */\n    { 2302, 0x0000000000000000ULL, { 0xDD6DE3189F1F5F24ULL, 0xA0E9CF47FD6EE3FCULL } }, /* XSUM_XXH128_withSecret_testdata[2302] */\n    { 2303, 0x0000000000000000ULL, { 0xD84AE042F62F6A58ULL, 0xE3674DBFEF3F8D79ULL } }, /* XSUM_XXH128_withSecret_testdata[2303] */\n    { 2304, 0x0000000000000000ULL, { 0x1EA95AF94ECBAF21ULL, 0x4256122EE146F458ULL } }, /* XSUM_XXH128_withSecret_testdata[2304] */\n    { 2305, 0x0000000000000000ULL, { 0x32D8780451319123ULL, 0x03575ABD607C4EA0ULL } }, /* XSUM_XXH128_withSecret_testdata[2305] */\n    { 2306, 0x0000000000000000ULL, { 0xA67F9361F98F5946ULL, 0x418DB9DB671C9B74ULL } }, /* XSUM_XXH128_withSecret_testdata[2306] */\n    { 2307, 0x0000000000000000ULL, { 0x4D14CC2887932B7BULL, 0xDC64E5B55801DF25ULL } }, /* XSUM_XXH128_withSecret_testdata[2307] */\n    { 2308, 0x0000000000000000ULL, { 0xB6E4E4BD5025430FULL, 0x1385B3BB2A65518DULL } }, /* XSUM_XXH128_withSecret_testdata[2308] */\n    { 2309, 0x0000000000000000ULL, { 0xB2DE0721E6E6D689ULL, 0xAB07E30C5F0F00C4ULL } }, /* XSUM_XXH128_withSecret_testdata[2309] */\n    { 2310, 0x0000000000000000ULL, { 0x2816A89C31EF1425ULL, 0x2410A5B6D8FC0F6CULL } }, /* XSUM_XXH128_withSecret_testdata[2310] */\n    { 2311, 0x0000000000000000ULL, { 0xC97BF984197E16AAULL, 0x2F9DEC357EBCFDC8ULL } }, /* XSUM_XXH128_withSecret_testdata[2311] */\n    { 2312, 0x0000000000000000ULL, { 0x7A2F77A7BD35086DULL, 0x31C56C5783E3A755ULL } }, /* XSUM_XXH128_withSecret_testdata[2312] */\n    { 2313, 0x0000000000000000ULL, { 0xC7FC1669D8D4501EULL, 0xCDE1A7C49E0023DAULL } }, /* XSUM_XXH128_withSecret_testdata[2313] */\n    { 2314, 0x0000000000000000ULL, { 0xBA1B459E031C39DDULL, 0x6CC0FD4FDB49B801ULL } }, /* XSUM_XXH128_withSecret_testdata[2314] */\n    { 2315, 0x0000000000000000ULL, { 0x10A540C71BE0860FULL, 0x92BF10A8B6323C5FULL } }, /* XSUM_XXH128_withSecret_testdata[2315] */\n    { 2316, 0x0000000000000000ULL, { 0xF4B0C0B556056656ULL, 0xD3ECDE090665A495ULL } }, /* XSUM_XXH128_withSecret_testdata[2316] */\n    { 2317, 0x0000000000000000ULL, { 0x7034B160B689BD8DULL, 0x8814EF82910BBF0EULL } }, /* XSUM_XXH128_withSecret_testdata[2317] */\n    { 2318, 0x0000000000000000ULL, { 0x72ED1F0D11CA236EULL, 0x15EC7D263CC9D2BFULL } }, /* XSUM_XXH128_withSecret_testdata[2318] */\n    { 2319, 0x0000000000000000ULL, { 0x91A5EDED19E6B21DULL, 0xB6F751DD0FF18E5AULL } }, /* XSUM_XXH128_withSecret_testdata[2319] */\n    { 2320, 0x0000000000000000ULL, { 0x9D1DD02EBF7D1EACULL, 0xC932B5E428120D2AULL } }, /* XSUM_XXH128_withSecret_testdata[2320] */\n    { 2321, 0x0000000000000000ULL, { 0x4A96D43422E9788CULL, 0x9B5E9DD270F30796ULL } }, /* XSUM_XXH128_withSecret_testdata[2321] */\n    { 2322, 0x0000000000000000ULL, { 0x28A8AE128E2400E9ULL, 0x54668BE2FD949A8DULL } }, /* XSUM_XXH128_withSecret_testdata[2322] */\n    { 2323, 0x0000000000000000ULL, { 0x7A8ADC44D0CE36A3ULL, 0x7523FB581E061E97ULL } }, /* XSUM_XXH128_withSecret_testdata[2323] */\n    { 2324, 0x0000000000000000ULL, { 0xA22FE5073B324209ULL, 0x6B9E87E9F2A41B72ULL } }, /* XSUM_XXH128_withSecret_testdata[2324] */\n    { 2325, 0x0000000000000000ULL, { 0x63EBA538567ABC9BULL, 0x53FED55CA165728DULL } }, /* XSUM_XXH128_withSecret_testdata[2325] */\n    { 2326, 0x0000000000000000ULL, { 0xC5339DEFE5025E17ULL, 0x1782573740DBF22BULL } }, /* XSUM_XXH128_withSecret_testdata[2326] */\n    { 2327, 0x0000000000000000ULL, { 0x3E4BD70D3109D5BDULL, 0xA7F654796E01E225ULL } }, /* XSUM_XXH128_withSecret_testdata[2327] */\n    { 2328, 0x0000000000000000ULL, { 0xE77E5092D3C9423DULL, 0x8E3436B48ECB4CE8ULL } }, /* XSUM_XXH128_withSecret_testdata[2328] */\n    { 2329, 0x0000000000000000ULL, { 0xAE061850019DBE99ULL, 0x39DF39B76DE7EA32ULL } }, /* XSUM_XXH128_withSecret_testdata[2329] */\n    { 2330, 0x0000000000000000ULL, { 0xE1F39AB61B422293ULL, 0x18182C7750A74F43ULL } }, /* XSUM_XXH128_withSecret_testdata[2330] */\n    { 2331, 0x0000000000000000ULL, { 0x62DB49AFC1C4F8FDULL, 0xFC4B65509B9DE57FULL } }, /* XSUM_XXH128_withSecret_testdata[2331] */\n    { 2332, 0x0000000000000000ULL, { 0x0E15D12F409EAF30ULL, 0x7E59BC10C3A3EFB2ULL } }, /* XSUM_XXH128_withSecret_testdata[2332] */\n    { 2333, 0x0000000000000000ULL, { 0xA6F5062EC3828EF0ULL, 0xE0B5A55E9C4DFA1AULL } }, /* XSUM_XXH128_withSecret_testdata[2333] */\n    { 2334, 0x0000000000000000ULL, { 0x36B250A63D1C818BULL, 0xBB201565306464D4ULL } }, /* XSUM_XXH128_withSecret_testdata[2334] */\n    { 2335, 0x0000000000000000ULL, { 0xDFABE5A2F7961DDFULL, 0x738A0FDDE98CCF84ULL } }, /* XSUM_XXH128_withSecret_testdata[2335] */\n    { 2336, 0x0000000000000000ULL, { 0x67A437068B4C2600ULL, 0xC77082BBE41AB40BULL } }, /* XSUM_XXH128_withSecret_testdata[2336] */\n    { 2337, 0x0000000000000000ULL, { 0x1BA587D9A6DB72C3ULL, 0xEBBC79866092B2EFULL } }, /* XSUM_XXH128_withSecret_testdata[2337] */\n    { 2338, 0x0000000000000000ULL, { 0x538AEE8149587087ULL, 0xCC006DF2CDF04389ULL } }, /* XSUM_XXH128_withSecret_testdata[2338] */\n    { 2339, 0x0000000000000000ULL, { 0x3285AAB013567C5FULL, 0xD7F054311F0456B9ULL } }, /* XSUM_XXH128_withSecret_testdata[2339] */\n    { 2340, 0x0000000000000000ULL, { 0xC26F3DEE44BF2EA9ULL, 0x05E76CA2F5C1A658ULL } }, /* XSUM_XXH128_withSecret_testdata[2340] */\n    { 2341, 0x0000000000000000ULL, { 0x348A7241B6AD28A7ULL, 0xB1A2D535AC53FC73ULL } }, /* XSUM_XXH128_withSecret_testdata[2341] */\n    { 2342, 0x0000000000000000ULL, { 0xDDF55A6756E09B30ULL, 0x2C66AE1FFFF68495ULL } }, /* XSUM_XXH128_withSecret_testdata[2342] */\n    { 2343, 0x0000000000000000ULL, { 0x3E8B939249709C03ULL, 0x43551B9FD2D6BCA5ULL } }, /* XSUM_XXH128_withSecret_testdata[2343] */\n    { 2344, 0x0000000000000000ULL, { 0x91CF4DD9B8F8177EULL, 0x5912131090F9D5AFULL } }, /* XSUM_XXH128_withSecret_testdata[2344] */\n    { 2345, 0x0000000000000000ULL, { 0x41ECB4ED9F081942ULL, 0x8DC7E340C4D524FCULL } }, /* XSUM_XXH128_withSecret_testdata[2345] */\n    { 2346, 0x0000000000000000ULL, { 0xAEB871BD0869CDE0ULL, 0x45E856C50FA56C3DULL } }, /* XSUM_XXH128_withSecret_testdata[2346] */\n    { 2347, 0x0000000000000000ULL, { 0x9038DEA18662CC53ULL, 0xBB3A46082FDB74F2ULL } }, /* XSUM_XXH128_withSecret_testdata[2347] */\n    { 2348, 0x0000000000000000ULL, { 0xBDACB85FB4C86F0EULL, 0x82F204234620AA64ULL } }, /* XSUM_XXH128_withSecret_testdata[2348] */\n    { 2349, 0x0000000000000000ULL, { 0x105F2CB1E1EC335EULL, 0x3298193BDEFB5FEAULL } }, /* XSUM_XXH128_withSecret_testdata[2349] */\n    { 2350, 0x0000000000000000ULL, { 0x090F11A76291D38DULL, 0xC355EDCF8B577116ULL } }, /* XSUM_XXH128_withSecret_testdata[2350] */\n    { 2351, 0x0000000000000000ULL, { 0x237DE0A8D44955B6ULL, 0xBADD8A1DE896C377ULL } }, /* XSUM_XXH128_withSecret_testdata[2351] */\n    { 2352, 0x0000000000000000ULL, { 0x7E0F9D584CF5208AULL, 0x12017B6F257BB332ULL } }, /* XSUM_XXH128_withSecret_testdata[2352] */\n    { 2353, 0x0000000000000000ULL, { 0x7EF09D5885593DB0ULL, 0xAF95949114A0968DULL } }, /* XSUM_XXH128_withSecret_testdata[2353] */\n    { 2354, 0x0000000000000000ULL, { 0xD6BE93AAA0B8A89FULL, 0xC0C4A251896D1578ULL } }, /* XSUM_XXH128_withSecret_testdata[2354] */\n    { 2355, 0x0000000000000000ULL, { 0x7D15F8309D70544CULL, 0x135DB961BCFC9F66ULL } }, /* XSUM_XXH128_withSecret_testdata[2355] */\n    { 2356, 0x0000000000000000ULL, { 0xB5F14F5E7471A2B7ULL, 0x7406D703D1CBA578ULL } }, /* XSUM_XXH128_withSecret_testdata[2356] */\n    { 2357, 0x0000000000000000ULL, { 0x334064923E684682ULL, 0xD75CA45BF2401E14ULL } }, /* XSUM_XXH128_withSecret_testdata[2357] */\n    { 2358, 0x0000000000000000ULL, { 0xFF30F03C59F38BBDULL, 0xF3985C595DC92C84ULL } }, /* XSUM_XXH128_withSecret_testdata[2358] */\n    { 2359, 0x0000000000000000ULL, { 0x3A762E4100546EA4ULL, 0xE9EE38F8E30FD505ULL } }, /* XSUM_XXH128_withSecret_testdata[2359] */\n    { 2360, 0x0000000000000000ULL, { 0xD9DDC565C9E9A0E7ULL, 0x13B34D359DC849AAULL } }, /* XSUM_XXH128_withSecret_testdata[2360] */\n    { 2361, 0x0000000000000000ULL, { 0x70F36B58887180BBULL, 0x5F00003D6F8E9D18ULL } }, /* XSUM_XXH128_withSecret_testdata[2361] */\n    { 2362, 0x0000000000000000ULL, { 0x29BF285E3EBA4ED9ULL, 0x8BC2B7790B03C915ULL } }, /* XSUM_XXH128_withSecret_testdata[2362] */\n    { 2363, 0x0000000000000000ULL, { 0x14FC2BC449A6ECF0ULL, 0x56DD35A724A3DE0BULL } }, /* XSUM_XXH128_withSecret_testdata[2363] */\n    { 2364, 0x0000000000000000ULL, { 0xFE96956AB41CD859ULL, 0xB30446E4EA9D1BD5ULL } }, /* XSUM_XXH128_withSecret_testdata[2364] */\n    { 2365, 0x0000000000000000ULL, { 0xBB96D17D6E83D9C9ULL, 0xDB88C1CE60995BE0ULL } }, /* XSUM_XXH128_withSecret_testdata[2365] */\n    { 2366, 0x0000000000000000ULL, { 0x6B4B68C062B0298AULL, 0x0E2484D843648E73ULL } }, /* XSUM_XXH128_withSecret_testdata[2366] */\n    { 2367, 0x0000000000000000ULL, { 0x293FA8E5173BB5E7ULL, 0x343654A35ACF0DAEULL } }, /* XSUM_XXH128_withSecret_testdata[2367] */\n    { 2368, 0x0000000000000000ULL, { 0x1B882F5651079927ULL, 0x7BA2FE90989DDABCULL } }, /* XSUM_XXH128_withSecret_testdata[2368] */\n    { 2369, 0x0000000000000000ULL, { 0x6A188C171457CE57ULL, 0x371DCB3CB026773FULL } }, /* XSUM_XXH128_withSecret_testdata[2369] */\n    { 2370, 0x0000000000000000ULL, { 0xD3F44413B4D09324ULL, 0x6B673D7788DC85A0ULL } }, /* XSUM_XXH128_withSecret_testdata[2370] */\n    { 2371, 0x0000000000000000ULL, { 0x6C6CD3EA872E5A8CULL, 0x5102D4A2022755CFULL } }, /* XSUM_XXH128_withSecret_testdata[2371] */\n    { 2372, 0x0000000000000000ULL, { 0x79DFB0C0A6B634E0ULL, 0xC636F9DD98721D87ULL } }, /* XSUM_XXH128_withSecret_testdata[2372] */\n    { 2373, 0x0000000000000000ULL, { 0xD1241D21D50CA4BAULL, 0x3CB78D0E723B9AEFULL } }, /* XSUM_XXH128_withSecret_testdata[2373] */\n    { 2374, 0x0000000000000000ULL, { 0xF56B4D8A22A9B86FULL, 0xE6BA4CF37C72C072ULL } }, /* XSUM_XXH128_withSecret_testdata[2374] */\n    { 2375, 0x0000000000000000ULL, { 0x87B5E3A9CD6C1B65ULL, 0xC93A8BAB43D10CABULL } }, /* XSUM_XXH128_withSecret_testdata[2375] */\n    { 2376, 0x0000000000000000ULL, { 0xFFC47ACC372230BFULL, 0xB917697339EE5A60ULL } }, /* XSUM_XXH128_withSecret_testdata[2376] */\n    { 2377, 0x0000000000000000ULL, { 0x5BED7B696B6C12F1ULL, 0x8FE48DEC509DCC24ULL } }, /* XSUM_XXH128_withSecret_testdata[2377] */\n    { 2378, 0x0000000000000000ULL, { 0x18CE009FEDEE2156ULL, 0xADA28535EC0AB0CBULL } }, /* XSUM_XXH128_withSecret_testdata[2378] */\n    { 2379, 0x0000000000000000ULL, { 0xBDF6F810379417BAULL, 0xAA79D983BB9AADE6ULL } }, /* XSUM_XXH128_withSecret_testdata[2379] */\n    { 2380, 0x0000000000000000ULL, { 0xC7F1AF342CE168D0ULL, 0x45D794CD35F88376ULL } }, /* XSUM_XXH128_withSecret_testdata[2380] */\n    { 2381, 0x0000000000000000ULL, { 0x0AAF181DD47DBB5DULL, 0x1B93EAE04F3D0A1BULL } }, /* XSUM_XXH128_withSecret_testdata[2381] */\n    { 2382, 0x0000000000000000ULL, { 0x1CF5DCB8CDB85907ULL, 0x0B9429EAC879B151ULL } }, /* XSUM_XXH128_withSecret_testdata[2382] */\n    { 2383, 0x0000000000000000ULL, { 0x9E0F5C5CED32BE4FULL, 0x82721AD9E8950F22ULL } }, /* XSUM_XXH128_withSecret_testdata[2383] */\n    { 2384, 0x0000000000000000ULL, { 0x522A7BA369A1B06AULL, 0xB2258C5F05501AECULL } }, /* XSUM_XXH128_withSecret_testdata[2384] */\n    { 2385, 0x0000000000000000ULL, { 0xEA13FB7B2DB0E8F7ULL, 0xE3AFC1C37F814A9CULL } }, /* XSUM_XXH128_withSecret_testdata[2385] */\n    { 2386, 0x0000000000000000ULL, { 0x111C82EFEF4AC81CULL, 0xC98EE1D016376073ULL } }, /* XSUM_XXH128_withSecret_testdata[2386] */\n    { 2387, 0x0000000000000000ULL, { 0xD42417E6AB91AA73ULL, 0x8169425BBD63308EULL } }, /* XSUM_XXH128_withSecret_testdata[2387] */\n    { 2388, 0x0000000000000000ULL, { 0xA5ED1CAE4267B139ULL, 0xDB284F35A03776F1ULL } }, /* XSUM_XXH128_withSecret_testdata[2388] */\n    { 2389, 0x0000000000000000ULL, { 0x8B8F7C5BE746D545ULL, 0x97292A42EFEE64F8ULL } }, /* XSUM_XXH128_withSecret_testdata[2389] */\n    { 2390, 0x0000000000000000ULL, { 0xF1B79500277FA08CULL, 0x90B7401652321609ULL } }, /* XSUM_XXH128_withSecret_testdata[2390] */\n    { 2391, 0x0000000000000000ULL, { 0xAD9BD3DB0300687AULL, 0x135F74626A38DAE7ULL } }, /* XSUM_XXH128_withSecret_testdata[2391] */\n    { 2392, 0x0000000000000000ULL, { 0x33D69ACF9C4FE222ULL, 0x152422CFAF9980B9ULL } }, /* XSUM_XXH128_withSecret_testdata[2392] */\n    { 2393, 0x0000000000000000ULL, { 0x98A88A43B3E3CDBEULL, 0xF4FFBE17C97823D4ULL } }, /* XSUM_XXH128_withSecret_testdata[2393] */\n    { 2394, 0x0000000000000000ULL, { 0x30A45D82B0F02EB7ULL, 0x2E8A40F3D2E473EEULL } }, /* XSUM_XXH128_withSecret_testdata[2394] */\n    { 2395, 0x0000000000000000ULL, { 0x580A108EAD043AC9ULL, 0xD5AAC9F49160D6E7ULL } }, /* XSUM_XXH128_withSecret_testdata[2395] */\n    { 2396, 0x0000000000000000ULL, { 0x7429D8E3A53EE029ULL, 0x7D25203B8791DCE6ULL } }, /* XSUM_XXH128_withSecret_testdata[2396] */\n    { 2397, 0x0000000000000000ULL, { 0xEA9930AE2B2F60FBULL, 0xEDFD7F09185BF1E7ULL } }, /* XSUM_XXH128_withSecret_testdata[2397] */\n    { 2398, 0x0000000000000000ULL, { 0x0DA3DC8BCB20D64EULL, 0x41B3275EC3E53038ULL } }, /* XSUM_XXH128_withSecret_testdata[2398] */\n    { 2399, 0x0000000000000000ULL, { 0x0C75205DB3508B7AULL, 0x35FB3DC6EC3B1A27ULL } }, /* XSUM_XXH128_withSecret_testdata[2399] */\n    { 2400, 0x0000000000000000ULL, { 0x80D24D897A728551ULL, 0xE4BC1C367C898452ULL } }, /* XSUM_XXH128_withSecret_testdata[2400] */\n    { 2401, 0x0000000000000000ULL, { 0xFE30EFE50F946152ULL, 0xF7A1D92FD82175BAULL } }, /* XSUM_XXH128_withSecret_testdata[2401] */\n    { 2402, 0x0000000000000000ULL, { 0x85E4BE18299D1285ULL, 0x425AED83DABB85E2ULL } }, /* XSUM_XXH128_withSecret_testdata[2402] */\n    { 2403, 0x0000000000000000ULL, { 0xB2D074B0382F056EULL, 0x414A5C3E83C615ECULL } }, /* XSUM_XXH128_withSecret_testdata[2403] */\n    { 2404, 0x0000000000000000ULL, { 0xA21EE5579EB5A4C9ULL, 0xCA6CD4770796BAF6ULL } }, /* XSUM_XXH128_withSecret_testdata[2404] */\n    { 2405, 0x0000000000000000ULL, { 0xE790C026712CB55AULL, 0xE3AC7E1D879D05F8ULL } }, /* XSUM_XXH128_withSecret_testdata[2405] */\n    { 2406, 0x0000000000000000ULL, { 0x0F45A0AE8363254CULL, 0x6C9AAB01AA46CBA1ULL } }, /* XSUM_XXH128_withSecret_testdata[2406] */\n    { 2407, 0x0000000000000000ULL, { 0xB3DA237C9CACA60EULL, 0xA3496CADDF260069ULL } }, /* XSUM_XXH128_withSecret_testdata[2407] */\n    { 2408, 0x0000000000000000ULL, { 0x70E33D72FA0DA509ULL, 0x88E130A475439868ULL } }, /* XSUM_XXH128_withSecret_testdata[2408] */\n    { 2409, 0x0000000000000000ULL, { 0x05EE5A65D7D947AFULL, 0x9D85170F7C382716ULL } }, /* XSUM_XXH128_withSecret_testdata[2409] */\n    { 2410, 0x0000000000000000ULL, { 0x4ECC270183F5940EULL, 0xB492E1D2437499A2ULL } }, /* XSUM_XXH128_withSecret_testdata[2410] */\n    { 2411, 0x0000000000000000ULL, { 0x98CDFECB890A7AFFULL, 0x530B8FD82ABB37D2ULL } }, /* XSUM_XXH128_withSecret_testdata[2411] */\n    { 2412, 0x0000000000000000ULL, { 0x895CA875DFC9CE10ULL, 0x8D827763C9DC3CCBULL } }, /* XSUM_XXH128_withSecret_testdata[2412] */\n    { 2413, 0x0000000000000000ULL, { 0xC6F78CB061FF6482ULL, 0xB5E25BCCD978C8ECULL } }, /* XSUM_XXH128_withSecret_testdata[2413] */\n    { 2414, 0x0000000000000000ULL, { 0x8B1D3731F960D49CULL, 0xB49FAF269EF8534AULL } }, /* XSUM_XXH128_withSecret_testdata[2414] */\n    { 2415, 0x0000000000000000ULL, { 0x7F0729071F504C31ULL, 0x6185708DD211F275ULL } }, /* XSUM_XXH128_withSecret_testdata[2415] */\n    { 2416, 0x0000000000000000ULL, { 0xC6A780A664181A68ULL, 0x086AC670AF51B323ULL } }, /* XSUM_XXH128_withSecret_testdata[2416] */\n    { 2417, 0x0000000000000000ULL, { 0xE7715AD23570691DULL, 0x8EDE08EE02876661ULL } }, /* XSUM_XXH128_withSecret_testdata[2417] */\n    { 2418, 0x0000000000000000ULL, { 0xBDCCF3236454FC8BULL, 0xC4EDC4036C0DB91AULL } }, /* XSUM_XXH128_withSecret_testdata[2418] */\n    { 2419, 0x0000000000000000ULL, { 0x0932E0E9EDB1CD68ULL, 0xD383BE6C216D02B6ULL } }, /* XSUM_XXH128_withSecret_testdata[2419] */\n    { 2420, 0x0000000000000000ULL, { 0x433EE97B5C9631A8ULL, 0x5529343930A5B428ULL } }, /* XSUM_XXH128_withSecret_testdata[2420] */\n    { 2421, 0x0000000000000000ULL, { 0xB6889338EC2C18E0ULL, 0x0B44646B18737036ULL } }, /* XSUM_XXH128_withSecret_testdata[2421] */\n    { 2422, 0x0000000000000000ULL, { 0x8696A03271D1ECE7ULL, 0xF517367057D8F592ULL } }, /* XSUM_XXH128_withSecret_testdata[2422] */\n    { 2423, 0x0000000000000000ULL, { 0xCEB3924AB5A6725FULL, 0xD42690D5C90C6497ULL } }, /* XSUM_XXH128_withSecret_testdata[2423] */\n    { 2424, 0x0000000000000000ULL, { 0x20C9F0CD77CA41BCULL, 0xF33A063481440709ULL } }, /* XSUM_XXH128_withSecret_testdata[2424] */\n    { 2425, 0x0000000000000000ULL, { 0xC2505C37116B8B22ULL, 0x4669BE2846624139ULL } }, /* XSUM_XXH128_withSecret_testdata[2425] */\n    { 2426, 0x0000000000000000ULL, { 0x70FD393B1C645A72ULL, 0x972854DF48492B37ULL } }, /* XSUM_XXH128_withSecret_testdata[2426] */\n    { 2427, 0x0000000000000000ULL, { 0x07FFF1FA5AC85111ULL, 0xEDEF0D969D8FA2D5ULL } }, /* XSUM_XXH128_withSecret_testdata[2427] */\n    { 2428, 0x0000000000000000ULL, { 0x8DEF2B5E61346C3CULL, 0xE18FE6227D5111CBULL } }, /* XSUM_XXH128_withSecret_testdata[2428] */\n    { 2429, 0x0000000000000000ULL, { 0xD29906E134ECCBDEULL, 0x99866345E2A0915CULL } }, /* XSUM_XXH128_withSecret_testdata[2429] */\n    { 2430, 0x0000000000000000ULL, { 0x9BFC0064C0007990ULL, 0x5A074649295A7DF2ULL } }, /* XSUM_XXH128_withSecret_testdata[2430] */\n    { 2431, 0x0000000000000000ULL, { 0x4274443E4156CA77ULL, 0x2A03D35413DC1EAEULL } }, /* XSUM_XXH128_withSecret_testdata[2431] */\n    { 2432, 0x0000000000000000ULL, { 0x0D4D78D4EDF1FCB6ULL, 0x34A14D898E8ED17FULL } }, /* XSUM_XXH128_withSecret_testdata[2432] */\n    { 2433, 0x0000000000000000ULL, { 0x2D55D642B7700A7CULL, 0x9B3B46B4B73212EDULL } }, /* XSUM_XXH128_withSecret_testdata[2433] */\n    { 2434, 0x0000000000000000ULL, { 0x24E462804F657DF5ULL, 0x6ED3764B1E4AA65CULL } }, /* XSUM_XXH128_withSecret_testdata[2434] */\n    { 2435, 0x0000000000000000ULL, { 0x5D28B70B8FA63D27ULL, 0x26AF9E36EA5A6154ULL } }, /* XSUM_XXH128_withSecret_testdata[2435] */\n    { 2436, 0x0000000000000000ULL, { 0x44F818945C47786DULL, 0xF633344EA4B5510DULL } }, /* XSUM_XXH128_withSecret_testdata[2436] */\n    { 2437, 0x0000000000000000ULL, { 0x281105C6C8092779ULL, 0x03A5D5DEFF761FA7ULL } }, /* XSUM_XXH128_withSecret_testdata[2437] */\n    { 2438, 0x0000000000000000ULL, { 0x869008B4D0AF7346ULL, 0x1389B1F113EACEF0ULL } }, /* XSUM_XXH128_withSecret_testdata[2438] */\n    { 2439, 0x0000000000000000ULL, { 0x3120496A0616B651ULL, 0x676859BEDD65889DULL } }, /* XSUM_XXH128_withSecret_testdata[2439] */\n    { 2440, 0x0000000000000000ULL, { 0xD4DB81F310CEC01CULL, 0xA0B63E63C83C993DULL } }, /* XSUM_XXH128_withSecret_testdata[2440] */\n    { 2441, 0x0000000000000000ULL, { 0x57362AF4E0DDF68AULL, 0xFF93E68064B57E99ULL } }, /* XSUM_XXH128_withSecret_testdata[2441] */\n    { 2442, 0x0000000000000000ULL, { 0x95C96818627768E6ULL, 0x09824DDBB291C809ULL } }, /* XSUM_XXH128_withSecret_testdata[2442] */\n    { 2443, 0x0000000000000000ULL, { 0x2788FF564FEC3E57ULL, 0xD42F9C4F376E4C51ULL } }, /* XSUM_XXH128_withSecret_testdata[2443] */\n    { 2444, 0x0000000000000000ULL, { 0x9C15B563D3265543ULL, 0x13074B68E7E24288ULL } }, /* XSUM_XXH128_withSecret_testdata[2444] */\n    { 2445, 0x0000000000000000ULL, { 0xFADBEF090BE12542ULL, 0xC5A5CCF05FFF9836ULL } }, /* XSUM_XXH128_withSecret_testdata[2445] */\n    { 2446, 0x0000000000000000ULL, { 0x3256859436D9DDF7ULL, 0x2F281DC7485933E1ULL } }, /* XSUM_XXH128_withSecret_testdata[2446] */\n    { 2447, 0x0000000000000000ULL, { 0x8F5F40B4D39240A2ULL, 0xA3530638A6C355C6ULL } }, /* XSUM_XXH128_withSecret_testdata[2447] */\n    { 2448, 0x0000000000000000ULL, { 0x0E00107DF805EB9CULL, 0x10489EE112DD0DF3ULL } }, /* XSUM_XXH128_withSecret_testdata[2448] */\n    { 2449, 0x0000000000000000ULL, { 0xAAFB5767B351AB41ULL, 0x14271FABFA1FD59AULL } }, /* XSUM_XXH128_withSecret_testdata[2449] */\n    { 2450, 0x0000000000000000ULL, { 0x2D9FD1C8B0405917ULL, 0x2DD677E8486D93B3ULL } }, /* XSUM_XXH128_withSecret_testdata[2450] */\n    { 2451, 0x0000000000000000ULL, { 0x27308E0DDB72C823ULL, 0xA2F7C8CD0B319268ULL } }, /* XSUM_XXH128_withSecret_testdata[2451] */\n    { 2452, 0x0000000000000000ULL, { 0xFB55B59AFFB43916ULL, 0x394893ED89DD64BFULL } }, /* XSUM_XXH128_withSecret_testdata[2452] */\n    { 2453, 0x0000000000000000ULL, { 0xC07DFEFCB5B2D5B6ULL, 0xEB34DA8347225739ULL } }, /* XSUM_XXH128_withSecret_testdata[2453] */\n    { 2454, 0x0000000000000000ULL, { 0x40879FA760711BAFULL, 0x74908E66627E9312ULL } }, /* XSUM_XXH128_withSecret_testdata[2454] */\n    { 2455, 0x0000000000000000ULL, { 0x667ED3F019228B0CULL, 0x7B49259924B4727EULL } }, /* XSUM_XXH128_withSecret_testdata[2455] */\n    { 2456, 0x0000000000000000ULL, { 0xEBE6ECAD9764AA3EULL, 0xEA61414B94BEEEF3ULL } }, /* XSUM_XXH128_withSecret_testdata[2456] */\n    { 2457, 0x0000000000000000ULL, { 0x1246C8795EFE16D1ULL, 0x2AD36DE1CDAA957CULL } }, /* XSUM_XXH128_withSecret_testdata[2457] */\n    { 2458, 0x0000000000000000ULL, { 0x88D31024FB5E683DULL, 0xB9B827558EABA50FULL } }, /* XSUM_XXH128_withSecret_testdata[2458] */\n    { 2459, 0x0000000000000000ULL, { 0xD96D0332AE7548C8ULL, 0x30FDD1CF7F15FF51ULL } }, /* XSUM_XXH128_withSecret_testdata[2459] */\n    { 2460, 0x0000000000000000ULL, { 0xAA5575DD95A6BA06ULL, 0x0448A5DE4F99246BULL } }, /* XSUM_XXH128_withSecret_testdata[2460] */\n    { 2461, 0x0000000000000000ULL, { 0x5682F991E5BC5D8AULL, 0x17A401F54F71FE52ULL } }, /* XSUM_XXH128_withSecret_testdata[2461] */\n    { 2462, 0x0000000000000000ULL, { 0xEDFE8BB51A687107ULL, 0x7BAE67AB4D688D61ULL } }, /* XSUM_XXH128_withSecret_testdata[2462] */\n    { 2463, 0x0000000000000000ULL, { 0x1B38DBE4F651736FULL, 0xC6FD42BDFA61A652ULL } }, /* XSUM_XXH128_withSecret_testdata[2463] */\n    { 2464, 0x0000000000000000ULL, { 0x1CC60A21BC604F8DULL, 0xEB824B873E86078DULL } }, /* XSUM_XXH128_withSecret_testdata[2464] */\n    { 2465, 0x0000000000000000ULL, { 0x270053B3B13C42DAULL, 0x92014DE2A64C01ACULL } }, /* XSUM_XXH128_withSecret_testdata[2465] */\n    { 2466, 0x0000000000000000ULL, { 0x2180A9FF32236AAFULL, 0xAE198208F0456241ULL } }, /* XSUM_XXH128_withSecret_testdata[2466] */\n    { 2467, 0x0000000000000000ULL, { 0x85F2BD99858D5E6DULL, 0x498A866C1437AB5BULL } }, /* XSUM_XXH128_withSecret_testdata[2467] */\n    { 2468, 0x0000000000000000ULL, { 0xA168796BF2C8C114ULL, 0x9477DD1A67E0D32BULL } }, /* XSUM_XXH128_withSecret_testdata[2468] */\n    { 2469, 0x0000000000000000ULL, { 0xC818D608F9023AE9ULL, 0xBED028AAAAD0F367ULL } }, /* XSUM_XXH128_withSecret_testdata[2469] */\n    { 2470, 0x0000000000000000ULL, { 0x89B52704F5E3069FULL, 0xE9ED8D46B438E27FULL } }, /* XSUM_XXH128_withSecret_testdata[2470] */\n    { 2471, 0x0000000000000000ULL, { 0x56073CAA4FCABE72ULL, 0x31D5C07B838F268AULL } }, /* XSUM_XXH128_withSecret_testdata[2471] */\n    { 2472, 0x0000000000000000ULL, { 0x8E508BBE3198B900ULL, 0x87B8374C37AC181EULL } }, /* XSUM_XXH128_withSecret_testdata[2472] */\n    { 2473, 0x0000000000000000ULL, { 0x1677CCEC11C3F063ULL, 0x8527DCF867C2B6ABULL } }, /* XSUM_XXH128_withSecret_testdata[2473] */\n    { 2474, 0x0000000000000000ULL, { 0x8D85A95827FBFAD8ULL, 0xE56B6482C60F73D3ULL } }, /* XSUM_XXH128_withSecret_testdata[2474] */\n    { 2475, 0x0000000000000000ULL, { 0x7F7633ED9861DF1EULL, 0xEE98B9069EF6759CULL } }, /* XSUM_XXH128_withSecret_testdata[2475] */\n    { 2476, 0x0000000000000000ULL, { 0xD348FAF7835D577AULL, 0xA7987C5745CD9156ULL } }, /* XSUM_XXH128_withSecret_testdata[2476] */\n    { 2477, 0x0000000000000000ULL, { 0xF908BB63497C2945ULL, 0x3AECAB6F4054D7EBULL } }, /* XSUM_XXH128_withSecret_testdata[2477] */\n    { 2478, 0x0000000000000000ULL, { 0x979518A224EB5E87ULL, 0x5026F845EAF79F0CULL } }, /* XSUM_XXH128_withSecret_testdata[2478] */\n    { 2479, 0x0000000000000000ULL, { 0x3D203CC868768949ULL, 0x27DDBBAD758F750EULL } }, /* XSUM_XXH128_withSecret_testdata[2479] */\n    { 2480, 0x0000000000000000ULL, { 0xF3101E499D73F4C8ULL, 0x37FF0A15656DD1FAULL } }, /* XSUM_XXH128_withSecret_testdata[2480] */\n    { 2481, 0x0000000000000000ULL, { 0x102F7AF08F61921CULL, 0xCC4A86920C8759B3ULL } }, /* XSUM_XXH128_withSecret_testdata[2481] */\n    { 2482, 0x0000000000000000ULL, { 0x208B7FF8E2D506EAULL, 0x8B8012007A60D350ULL } }, /* XSUM_XXH128_withSecret_testdata[2482] */\n    { 2483, 0x0000000000000000ULL, { 0x8D7F78B8EF6276CAULL, 0xD02B2CA197693058ULL } }, /* XSUM_XXH128_withSecret_testdata[2483] */\n    { 2484, 0x0000000000000000ULL, { 0xB088A088843D3809ULL, 0x8856A022C998ED2AULL } }, /* XSUM_XXH128_withSecret_testdata[2484] */\n    { 2485, 0x0000000000000000ULL, { 0x954FBFC5EC93F9B4ULL, 0x0383FE369C9CE0D4ULL } }, /* XSUM_XXH128_withSecret_testdata[2485] */\n    { 2486, 0x0000000000000000ULL, { 0xCF57A7D34AECF59AULL, 0xA91C49214734B70BULL } }, /* XSUM_XXH128_withSecret_testdata[2486] */\n    { 2487, 0x0000000000000000ULL, { 0xE2C95460AFE2B595ULL, 0x465D2C99C5236E50ULL } }, /* XSUM_XXH128_withSecret_testdata[2487] */\n    { 2488, 0x0000000000000000ULL, { 0xB4CEE088A87489D8ULL, 0x37D851CE8188BFB0ULL } }, /* XSUM_XXH128_withSecret_testdata[2488] */\n    { 2489, 0x0000000000000000ULL, { 0x0F0E7C83FB06D9C5ULL, 0xAD6DDC92672BAF3FULL } }, /* XSUM_XXH128_withSecret_testdata[2489] */\n    { 2490, 0x0000000000000000ULL, { 0xAF57F16C7833732DULL, 0x647620A2A9093AF1ULL } }, /* XSUM_XXH128_withSecret_testdata[2490] */\n    { 2491, 0x0000000000000000ULL, { 0x8B1B9676501880D3ULL, 0x71DC44777A6B5AD0ULL } }, /* XSUM_XXH128_withSecret_testdata[2491] */\n    { 2492, 0x0000000000000000ULL, { 0x12FC866CD78CE6DEULL, 0xC78C172D9E4935CCULL } }, /* XSUM_XXH128_withSecret_testdata[2492] */\n    { 2493, 0x0000000000000000ULL, { 0x0EE4CDEF24E19E99ULL, 0xD024D4CC59DA684FULL } }, /* XSUM_XXH128_withSecret_testdata[2493] */\n    { 2494, 0x0000000000000000ULL, { 0x6807875A1D02F65CULL, 0x5997AA17A35C7297ULL } }, /* XSUM_XXH128_withSecret_testdata[2494] */\n    { 2495, 0x0000000000000000ULL, { 0x94A6BA9FD94FA3A6ULL, 0x9B77D6258847442EULL } }, /* XSUM_XXH128_withSecret_testdata[2495] */\n    { 2496, 0x0000000000000000ULL, { 0x98C9DEF1F19EC98BULL, 0x473CBEE2A81A556BULL } }, /* XSUM_XXH128_withSecret_testdata[2496] */\n    { 2497, 0x0000000000000000ULL, { 0xB0B6920A0649B742ULL, 0xEC935ED3A858D923ULL } }, /* XSUM_XXH128_withSecret_testdata[2497] */\n    { 2498, 0x0000000000000000ULL, { 0xC9BECEBB737AB089ULL, 0x6620FFD2F6A45EC9ULL } }, /* XSUM_XXH128_withSecret_testdata[2498] */\n    { 2499, 0x0000000000000000ULL, { 0x571F9E81DFA87670ULL, 0x443768E9472C6E69ULL } }, /* XSUM_XXH128_withSecret_testdata[2499] */\n    { 2500, 0x0000000000000000ULL, { 0xC30E1D27E4245484ULL, 0x746C3DA6E13464F5ULL } }, /* XSUM_XXH128_withSecret_testdata[2500] */\n    { 2501, 0x0000000000000000ULL, { 0xB013E7F8FD67F03FULL, 0x457156C7259BCFEEULL } }, /* XSUM_XXH128_withSecret_testdata[2501] */\n    { 2502, 0x0000000000000000ULL, { 0x303BC518E2B05577ULL, 0xB8FFC9963BF24408ULL } }, /* XSUM_XXH128_withSecret_testdata[2502] */\n    { 2503, 0x0000000000000000ULL, { 0x150C8479B8B7AC06ULL, 0xED8244A885925734ULL } }, /* XSUM_XXH128_withSecret_testdata[2503] */\n    { 2504, 0x0000000000000000ULL, { 0x53E0E976AC861E3AULL, 0xBD44FBEA41C2F3BBULL } }, /* XSUM_XXH128_withSecret_testdata[2504] */\n    { 2505, 0x0000000000000000ULL, { 0xF46C5524FDC4D85EULL, 0x3633A66531D9467FULL } }, /* XSUM_XXH128_withSecret_testdata[2505] */\n    { 2506, 0x0000000000000000ULL, { 0x3E890C313A5E3202ULL, 0x2A1AAB9A184D7E34ULL } }, /* XSUM_XXH128_withSecret_testdata[2506] */\n    { 2507, 0x0000000000000000ULL, { 0x893E6CA9065BEDD2ULL, 0x33065C0479D24F59ULL } }, /* XSUM_XXH128_withSecret_testdata[2507] */\n    { 2508, 0x0000000000000000ULL, { 0xD586CAA92858A4BDULL, 0xC120ECC81F72CC7EULL } }, /* XSUM_XXH128_withSecret_testdata[2508] */\n    { 2509, 0x0000000000000000ULL, { 0x84B0D3570788F93EULL, 0x06A07DF10045B0B9ULL } }, /* XSUM_XXH128_withSecret_testdata[2509] */\n    { 2510, 0x0000000000000000ULL, { 0xD61AFB9478BA478DULL, 0xB38E51C5DC44A645ULL } }, /* XSUM_XXH128_withSecret_testdata[2510] */\n    { 2511, 0x0000000000000000ULL, { 0x29607FF29311310EULL, 0xA87DE481782D0AA8ULL } }, /* XSUM_XXH128_withSecret_testdata[2511] */\n    { 2512, 0x0000000000000000ULL, { 0x0D808C86F2EF5F22ULL, 0x23904A267E48177BULL } }, /* XSUM_XXH128_withSecret_testdata[2512] */\n    { 2513, 0x0000000000000000ULL, { 0xF54FF2663629C10BULL, 0x4DEBE276700A2F5AULL } }, /* XSUM_XXH128_withSecret_testdata[2513] */\n    { 2514, 0x0000000000000000ULL, { 0x419D659851931A87ULL, 0x6AF6A9546A2F7886ULL } }, /* XSUM_XXH128_withSecret_testdata[2514] */\n    { 2515, 0x0000000000000000ULL, { 0x1BD6867547C59B6DULL, 0x6BE5BA3C5B717E8AULL } }, /* XSUM_XXH128_withSecret_testdata[2515] */\n    { 2516, 0x0000000000000000ULL, { 0x6BAAB7CF89ADC0F7ULL, 0xB008B52418D05FBCULL } }, /* XSUM_XXH128_withSecret_testdata[2516] */\n    { 2517, 0x0000000000000000ULL, { 0x95EF25B5E3BD9EDFULL, 0x1A3AF10B2BB7D538ULL } }, /* XSUM_XXH128_withSecret_testdata[2517] */\n    { 2518, 0x0000000000000000ULL, { 0x86424658110D1E62ULL, 0x369B04B63A6EE7CAULL } }, /* XSUM_XXH128_withSecret_testdata[2518] */\n    { 2519, 0x0000000000000000ULL, { 0x6F9843416A88B93EULL, 0x9948249F44011137ULL } }, /* XSUM_XXH128_withSecret_testdata[2519] */\n    { 2520, 0x0000000000000000ULL, { 0xC809656F05AD6C8DULL, 0x352C1F52DA8D703DULL } }, /* XSUM_XXH128_withSecret_testdata[2520] */\n    { 2521, 0x0000000000000000ULL, { 0xA026416073B3FBABULL, 0x03B2D5268797D606ULL } }, /* XSUM_XXH128_withSecret_testdata[2521] */\n    { 2522, 0x0000000000000000ULL, { 0xAFD0D8DD43FCD09FULL, 0x2E0A74345BE2AE6DULL } }, /* XSUM_XXH128_withSecret_testdata[2522] */\n    { 2523, 0x0000000000000000ULL, { 0x2760C965119529F0ULL, 0xAAAE970CCB711CD2ULL } }, /* XSUM_XXH128_withSecret_testdata[2523] */\n    { 2524, 0x0000000000000000ULL, { 0x83CAC7433219E867ULL, 0xA9B7E76596BB1657ULL } }, /* XSUM_XXH128_withSecret_testdata[2524] */\n    { 2525, 0x0000000000000000ULL, { 0x64E93944571E86C8ULL, 0x448D3A89628F1E75ULL } }, /* XSUM_XXH128_withSecret_testdata[2525] */\n    { 2526, 0x0000000000000000ULL, { 0x2C19A96954E7A833ULL, 0xD9EAA9A88D773C4DULL } }, /* XSUM_XXH128_withSecret_testdata[2526] */\n    { 2527, 0x0000000000000000ULL, { 0x543DFEDA890C39BBULL, 0xD0736B4ACD443E34ULL } }, /* XSUM_XXH128_withSecret_testdata[2527] */\n    { 2528, 0x0000000000000000ULL, { 0x5720CBADD0EFDCBEULL, 0xC1C6D766199C31D8ULL } }, /* XSUM_XXH128_withSecret_testdata[2528] */\n    { 2529, 0x0000000000000000ULL, { 0x4FD962132FEC0ED2ULL, 0xFFA059B624916D9BULL } }, /* XSUM_XXH128_withSecret_testdata[2529] */\n    { 2530, 0x0000000000000000ULL, { 0xCCD4FECCF1E8032EULL, 0xDC8E112BBF4BAC96ULL } }, /* XSUM_XXH128_withSecret_testdata[2530] */\n    { 2531, 0x0000000000000000ULL, { 0xB3AE392B45F6A37CULL, 0xF66AB03DF68089C5ULL } }, /* XSUM_XXH128_withSecret_testdata[2531] */\n    { 2532, 0x0000000000000000ULL, { 0x3C75320C9AD26401ULL, 0xB87A8FEA3D2882FCULL } }, /* XSUM_XXH128_withSecret_testdata[2532] */\n    { 2533, 0x0000000000000000ULL, { 0xDC3F74F3D216386CULL, 0x259166EC1AB8FB7EULL } }, /* XSUM_XXH128_withSecret_testdata[2533] */\n    { 2534, 0x0000000000000000ULL, { 0x160EF753CB403670ULL, 0x7C59DA79714B2D27ULL } }, /* XSUM_XXH128_withSecret_testdata[2534] */\n    { 2535, 0x0000000000000000ULL, { 0x736C58212031C9F2ULL, 0xBE5D77621C045A45ULL } }, /* XSUM_XXH128_withSecret_testdata[2535] */\n    { 2536, 0x0000000000000000ULL, { 0x840DF498666247B0ULL, 0x3F303A5CFF0566A2ULL } }, /* XSUM_XXH128_withSecret_testdata[2536] */\n    { 2537, 0x0000000000000000ULL, { 0x974AA66890FC3B30ULL, 0x98394D659E6133D3ULL } }, /* XSUM_XXH128_withSecret_testdata[2537] */\n    { 2538, 0x0000000000000000ULL, { 0x04954981FB429374ULL, 0x71347476484573EDULL } }, /* XSUM_XXH128_withSecret_testdata[2538] */\n    { 2539, 0x0000000000000000ULL, { 0x4A6304B4C047FF06ULL, 0x3D7E59B9CC949361ULL } }, /* XSUM_XXH128_withSecret_testdata[2539] */\n    { 2540, 0x0000000000000000ULL, { 0x2D9D745BCB5101F5ULL, 0xB80FCA6B3C2498A5ULL } }, /* XSUM_XXH128_withSecret_testdata[2540] */\n    { 2541, 0x0000000000000000ULL, { 0xC28C2179D0AC9E6BULL, 0xCE1DB8CAAEA40F0FULL } }, /* XSUM_XXH128_withSecret_testdata[2541] */\n    { 2542, 0x0000000000000000ULL, { 0x7B33FE2A667B40D9ULL, 0x3FDCCCE0D280FB35ULL } }, /* XSUM_XXH128_withSecret_testdata[2542] */\n    { 2543, 0x0000000000000000ULL, { 0x018DD8A27F419088ULL, 0x639397B21AD88A78ULL } }, /* XSUM_XXH128_withSecret_testdata[2543] */\n    { 2544, 0x0000000000000000ULL, { 0x6B76AE9256EDF554ULL, 0x8C03BA6BE7096D26ULL } }, /* XSUM_XXH128_withSecret_testdata[2544] */\n    { 2545, 0x0000000000000000ULL, { 0x18FEF311A3055CFAULL, 0x5AB66D9E6ED0EBF6ULL } }, /* XSUM_XXH128_withSecret_testdata[2545] */\n    { 2546, 0x0000000000000000ULL, { 0x41B142ADD315C08AULL, 0x55705203628BE64BULL } }, /* XSUM_XXH128_withSecret_testdata[2546] */\n    { 2547, 0x0000000000000000ULL, { 0x776E02A5C2BCCB16ULL, 0xD73F8BD5CA6F71B2ULL } }, /* XSUM_XXH128_withSecret_testdata[2547] */\n    { 2548, 0x0000000000000000ULL, { 0x8B3568C5708894A7ULL, 0x128D443A1FE0D995ULL } }, /* XSUM_XXH128_withSecret_testdata[2548] */\n    { 2549, 0x0000000000000000ULL, { 0xD5FBC5EC8C745887ULL, 0x620D1256965BA246ULL } }, /* XSUM_XXH128_withSecret_testdata[2549] */\n    { 2550, 0x0000000000000000ULL, { 0x0D138006F0EFEBB6ULL, 0x1EF90FC7E18B03E1ULL } }, /* XSUM_XXH128_withSecret_testdata[2550] */\n    { 2551, 0x0000000000000000ULL, { 0xD81964889ACDA99CULL, 0x0B06D7B66D99E86CULL } }, /* XSUM_XXH128_withSecret_testdata[2551] */\n    { 2552, 0x0000000000000000ULL, { 0xF2DAE9DDB84211F1ULL, 0x0E79593472072151ULL } }, /* XSUM_XXH128_withSecret_testdata[2552] */\n    { 2553, 0x0000000000000000ULL, { 0xB682C5F44B0F4ADFULL, 0x041D1937F43151F5ULL } }, /* XSUM_XXH128_withSecret_testdata[2553] */\n    { 2554, 0x0000000000000000ULL, { 0x3F79622325944B3AULL, 0x310A59C508E10922ULL } }, /* XSUM_XXH128_withSecret_testdata[2554] */\n    { 2555, 0x0000000000000000ULL, { 0xE1573557F70CC302ULL, 0xAC9F2E64C8DACACEULL } }, /* XSUM_XXH128_withSecret_testdata[2555] */\n    { 2556, 0x0000000000000000ULL, { 0xDF8146D7E8F45BD6ULL, 0x6C3D9F28DED867ACULL } }, /* XSUM_XXH128_withSecret_testdata[2556] */\n    { 2557, 0x0000000000000000ULL, { 0xE556F3A899F3CECDULL, 0x48AB85FB841A5443ULL } }, /* XSUM_XXH128_withSecret_testdata[2557] */\n    { 2558, 0x0000000000000000ULL, { 0xB2FD4B464AE294B6ULL, 0x8DD7B956F53B35CEULL } }, /* XSUM_XXH128_withSecret_testdata[2558] */\n    { 2559, 0x0000000000000000ULL, { 0x8DEF064E344B1567ULL, 0x01B27EDAE79D58EDULL } }, /* XSUM_XXH128_withSecret_testdata[2559] */\n    { 2560, 0x0000000000000000ULL, { 0x16EE80901F5FD360ULL, 0x3A42CA60D34FA621ULL } }, /* XSUM_XXH128_withSecret_testdata[2560] */\n    { 2561, 0x0000000000000000ULL, { 0x93212C53420EAB20ULL, 0xEB1DA3FAD763EB13ULL } }, /* XSUM_XXH128_withSecret_testdata[2561] */\n    { 2562, 0x0000000000000000ULL, { 0x4E97EBED9E7BB8ABULL, 0x2A7EBD26A983E142ULL } }, /* XSUM_XXH128_withSecret_testdata[2562] */\n    { 2563, 0x0000000000000000ULL, { 0x36A00A2095233FA5ULL, 0xED4D44C29A7171B0ULL } }, /* XSUM_XXH128_withSecret_testdata[2563] */\n    { 2564, 0x0000000000000000ULL, { 0x5FFB1980AB9EF7A5ULL, 0xB841D06A9A5D5A06ULL } }, /* XSUM_XXH128_withSecret_testdata[2564] */\n    { 2565, 0x0000000000000000ULL, { 0xC7CF3B9AD3DFC66CULL, 0xCCA5A41DE2C95C74ULL } }, /* XSUM_XXH128_withSecret_testdata[2565] */\n    { 2566, 0x0000000000000000ULL, { 0x302798DF16BE571EULL, 0x01ADF1846AC418D9ULL } }, /* XSUM_XXH128_withSecret_testdata[2566] */\n    { 2567, 0x0000000000000000ULL, { 0xA96EF549FA2166CDULL, 0x5430161933694960ULL } }, /* XSUM_XXH128_withSecret_testdata[2567] */\n    { 2568, 0x0000000000000000ULL, { 0xE87D4F0D2633710EULL, 0x3566FC3B374E1EB5ULL } }, /* XSUM_XXH128_withSecret_testdata[2568] */\n    { 2569, 0x0000000000000000ULL, { 0x37C4DDC5E76B9552ULL, 0x55A591A09FF15373ULL } }, /* XSUM_XXH128_withSecret_testdata[2569] */\n    { 2570, 0x0000000000000000ULL, { 0x6730458D0BEC200CULL, 0x30D9DEB2A2F37EDCULL } }, /* XSUM_XXH128_withSecret_testdata[2570] */\n    { 2571, 0x0000000000000000ULL, { 0x7EB259A765331316ULL, 0x034547C9C890045AULL } }, /* XSUM_XXH128_withSecret_testdata[2571] */\n    { 2572, 0x0000000000000000ULL, { 0x9C7AA86195F57267ULL, 0xC9C0478CE8EFFF76ULL } }, /* XSUM_XXH128_withSecret_testdata[2572] */\n    { 2573, 0x0000000000000000ULL, { 0xF73FD42643DC849EULL, 0x33CE78BE14844193ULL } }, /* XSUM_XXH128_withSecret_testdata[2573] */\n    { 2574, 0x0000000000000000ULL, { 0x2A909E1A7BAE7038ULL, 0x1AE600FC630F0D10ULL } }, /* XSUM_XXH128_withSecret_testdata[2574] */\n    { 2575, 0x0000000000000000ULL, { 0xA368FC34F33D2775ULL, 0x2D03EDA88390ABDFULL } }, /* XSUM_XXH128_withSecret_testdata[2575] */\n    { 2576, 0x0000000000000000ULL, { 0x37A51C9E6EE2277BULL, 0x8EE7FE277A411C7DULL } }, /* XSUM_XXH128_withSecret_testdata[2576] */\n    { 2577, 0x0000000000000000ULL, { 0xD54B979F6DA0F96DULL, 0xB1E881C8AC3520F6ULL } }, /* XSUM_XXH128_withSecret_testdata[2577] */\n    { 2578, 0x0000000000000000ULL, { 0x57FDF444EB565B36ULL, 0x99B3503E1A49F57AULL } }, /* XSUM_XXH128_withSecret_testdata[2578] */\n    { 2579, 0x0000000000000000ULL, { 0xEC30F9C831A60851ULL, 0x2172D9D7D8B10BFFULL } }, /* XSUM_XXH128_withSecret_testdata[2579] */\n    { 2580, 0x0000000000000000ULL, { 0x6E2D789FE72D6F4DULL, 0x9939E3723EA3CD7BULL } }, /* XSUM_XXH128_withSecret_testdata[2580] */\n    { 2581, 0x0000000000000000ULL, { 0x942E1D90CF6B9E18ULL, 0x5912AF08590AB4CCULL } }, /* XSUM_XXH128_withSecret_testdata[2581] */\n    { 2582, 0x0000000000000000ULL, { 0x8AE3BE86A47DA957ULL, 0xAC6F0BD184238CB2ULL } }, /* XSUM_XXH128_withSecret_testdata[2582] */\n    { 2583, 0x0000000000000000ULL, { 0xCCA4C892ADFE4F73ULL, 0x392919AD00E5B377ULL } }, /* XSUM_XXH128_withSecret_testdata[2583] */\n    { 2584, 0x0000000000000000ULL, { 0x833C06D264B01768ULL, 0xDEEC4692EC1DA9CBULL } }, /* XSUM_XXH128_withSecret_testdata[2584] */\n    { 2585, 0x0000000000000000ULL, { 0x6D1048FF62E9EB4AULL, 0x1EBBAADE56A3C795ULL } }, /* XSUM_XXH128_withSecret_testdata[2585] */\n    { 2586, 0x0000000000000000ULL, { 0xD655BA7431A0912BULL, 0x795A4D145CFA3284ULL } }, /* XSUM_XXH128_withSecret_testdata[2586] */\n    { 2587, 0x0000000000000000ULL, { 0x017B15C673D638F2ULL, 0x141F4DC2599D46F7ULL } }, /* XSUM_XXH128_withSecret_testdata[2587] */\n    { 2588, 0x0000000000000000ULL, { 0x060FF36A6F988FF4ULL, 0x85AED5C08F23BB59ULL } }, /* XSUM_XXH128_withSecret_testdata[2588] */\n    { 2589, 0x0000000000000000ULL, { 0xE7F046C6DEAD7BCFULL, 0x6F32A767B8B9CE3DULL } }, /* XSUM_XXH128_withSecret_testdata[2589] */\n    { 2590, 0x0000000000000000ULL, { 0x55606B4202BAD261ULL, 0xAB9873F62F1B6E7DULL } }, /* XSUM_XXH128_withSecret_testdata[2590] */\n    { 2591, 0x0000000000000000ULL, { 0x70B45508D2567155ULL, 0x954821A0F0DD285EULL } }, /* XSUM_XXH128_withSecret_testdata[2591] */\n    { 2592, 0x0000000000000000ULL, { 0xFDDBEB1AAB020A1AULL, 0x01D72701856194E9ULL } }, /* XSUM_XXH128_withSecret_testdata[2592] */\n    { 2593, 0x0000000000000000ULL, { 0xADBBB1B29B1D5ACEULL, 0xCB5AE340EBC82CFEULL } }, /* XSUM_XXH128_withSecret_testdata[2593] */\n    { 2594, 0x0000000000000000ULL, { 0xDD7F32DF066A745EULL, 0x47C0957050848CCAULL } }, /* XSUM_XXH128_withSecret_testdata[2594] */\n    { 2595, 0x0000000000000000ULL, { 0xB495E5866461FE91ULL, 0x3CEE93E2095F45B2ULL } }, /* XSUM_XXH128_withSecret_testdata[2595] */\n    { 2596, 0x0000000000000000ULL, { 0x8F53A734753051B8ULL, 0xCEC853C32DD4B7FCULL } }, /* XSUM_XXH128_withSecret_testdata[2596] */\n    { 2597, 0x0000000000000000ULL, { 0xE2936E2F47754D48ULL, 0x4BD53FC0174325AAULL } }, /* XSUM_XXH128_withSecret_testdata[2597] */\n    { 2598, 0x0000000000000000ULL, { 0x7DFFDDBB3380E963ULL, 0xB706B43FAF8ABB39ULL } }, /* XSUM_XXH128_withSecret_testdata[2598] */\n    { 2599, 0x0000000000000000ULL, { 0x9D1CAD8EFEAAE47FULL, 0x41D32A8D5BC0A48CULL } }, /* XSUM_XXH128_withSecret_testdata[2599] */\n    { 2600, 0x0000000000000000ULL, { 0xC8F4FF8AA05CF97BULL, 0xE6179CF3AC077FB6ULL } }, /* XSUM_XXH128_withSecret_testdata[2600] */\n    { 2601, 0x0000000000000000ULL, { 0x664EB6E49571EA2DULL, 0xEEF04B570D605B30ULL } }, /* XSUM_XXH128_withSecret_testdata[2601] */\n    { 2602, 0x0000000000000000ULL, { 0x692108073687893CULL, 0x316C3878926C971EULL } }, /* XSUM_XXH128_withSecret_testdata[2602] */\n    { 2603, 0x0000000000000000ULL, { 0x7BDF43C6D590A9D1ULL, 0xD10EBB43B28FD5BCULL } }, /* XSUM_XXH128_withSecret_testdata[2603] */\n    { 2604, 0x0000000000000000ULL, { 0x7A91B2ABC5A49158ULL, 0xE861642BD5C07A26ULL } }, /* XSUM_XXH128_withSecret_testdata[2604] */\n    { 2605, 0x0000000000000000ULL, { 0x88E7C28EA89E5B6DULL, 0x8321DFB9F3098DD8ULL } }, /* XSUM_XXH128_withSecret_testdata[2605] */\n    { 2606, 0x0000000000000000ULL, { 0xCE5E9D6C768E31C8ULL, 0x5FB8EB05094DE8EFULL } }, /* XSUM_XXH128_withSecret_testdata[2606] */\n    { 2607, 0x0000000000000000ULL, { 0x543A7FA1ADA6E389ULL, 0x8C5A364AC3C33C6FULL } }, /* XSUM_XXH128_withSecret_testdata[2607] */\n    { 2608, 0x0000000000000000ULL, { 0xB1323D2F495C71EEULL, 0x9B499C1F62DB4848ULL } }, /* XSUM_XXH128_withSecret_testdata[2608] */\n    { 2609, 0x0000000000000000ULL, { 0x1137F916C416A5F0ULL, 0x607A9C5A41B04541ULL } }, /* XSUM_XXH128_withSecret_testdata[2609] */\n    { 2610, 0x0000000000000000ULL, { 0xD9856B10DBF1F456ULL, 0x4053923FA3CCF557ULL } }, /* XSUM_XXH128_withSecret_testdata[2610] */\n    { 2611, 0x0000000000000000ULL, { 0xB74F58BE5684931CULL, 0x7CB891492C84BA92ULL } }, /* XSUM_XXH128_withSecret_testdata[2611] */\n    { 2612, 0x0000000000000000ULL, { 0xEDEA21DC494254DCULL, 0x73481D1BBBF07BA1ULL } }, /* XSUM_XXH128_withSecret_testdata[2612] */\n    { 2613, 0x0000000000000000ULL, { 0x01B756211ABF146CULL, 0x6CC21738D8880BCEULL } }, /* XSUM_XXH128_withSecret_testdata[2613] */\n    { 2614, 0x0000000000000000ULL, { 0x967C06CCEBB5A471ULL, 0xB38E9946FC6AB8F3ULL } }, /* XSUM_XXH128_withSecret_testdata[2614] */\n    { 2615, 0x0000000000000000ULL, { 0xF144F6B209875574ULL, 0x42C6A3F576079BF2ULL } }, /* XSUM_XXH128_withSecret_testdata[2615] */\n    { 2616, 0x0000000000000000ULL, { 0xC198AC39900B1793ULL, 0xD51C070FFE43B7F8ULL } }, /* XSUM_XXH128_withSecret_testdata[2616] */\n    { 2617, 0x0000000000000000ULL, { 0xDA26311DFE811C2DULL, 0x8BAB479CE6D29EA8ULL } }, /* XSUM_XXH128_withSecret_testdata[2617] */\n    { 2618, 0x0000000000000000ULL, { 0x7F14937F6C7ED2A7ULL, 0xB755A49B8E6E1074ULL } }, /* XSUM_XXH128_withSecret_testdata[2618] */\n    { 2619, 0x0000000000000000ULL, { 0x4066C04C1DD840DBULL, 0x88EF10EC94B4324BULL } }, /* XSUM_XXH128_withSecret_testdata[2619] */\n    { 2620, 0x0000000000000000ULL, { 0x1E2D0B4FA2C9824AULL, 0x0FB26617042809F1ULL } }, /* XSUM_XXH128_withSecret_testdata[2620] */\n    { 2621, 0x0000000000000000ULL, { 0xC73016F08F32DD84ULL, 0x62BBF9D4E04C76FDULL } }, /* XSUM_XXH128_withSecret_testdata[2621] */\n    { 2622, 0x0000000000000000ULL, { 0xB8EBE60A20704C50ULL, 0x7573E2BDD741A805ULL } }, /* XSUM_XXH128_withSecret_testdata[2622] */\n    { 2623, 0x0000000000000000ULL, { 0xD4D18BB02D843624ULL, 0xA7F3A3019672255AULL } }, /* XSUM_XXH128_withSecret_testdata[2623] */\n    { 2624, 0x0000000000000000ULL, { 0x9578A4EBD51BFF5AULL, 0xE1C7E50485143627ULL } }, /* XSUM_XXH128_withSecret_testdata[2624] */\n    { 2625, 0x0000000000000000ULL, { 0xB57F7BB909809262ULL, 0x8669B5B8421D5653ULL } }, /* XSUM_XXH128_withSecret_testdata[2625] */\n    { 2626, 0x0000000000000000ULL, { 0x9372C2DC9DFCE366ULL, 0x6BF64EA5FAF7D4E4ULL } }, /* XSUM_XXH128_withSecret_testdata[2626] */\n    { 2627, 0x0000000000000000ULL, { 0x81EF7C0B63BC899FULL, 0xD22B8F5DE1AC3057ULL } }, /* XSUM_XXH128_withSecret_testdata[2627] */\n    { 2628, 0x0000000000000000ULL, { 0x190A38990E8A0DD0ULL, 0x086D0A874E1AC21FULL } }, /* XSUM_XXH128_withSecret_testdata[2628] */\n    { 2629, 0x0000000000000000ULL, { 0x1BDA829E6225EAE3ULL, 0x4C51D9CFFE8106FBULL } }, /* XSUM_XXH128_withSecret_testdata[2629] */\n    { 2630, 0x0000000000000000ULL, { 0xDDE9CBA47EA1D192ULL, 0x3A34DDEC077281FBULL } }, /* XSUM_XXH128_withSecret_testdata[2630] */\n    { 2631, 0x0000000000000000ULL, { 0x0F0E82D98FCC1F93ULL, 0x6646903F7BDA0BA6ULL } }, /* XSUM_XXH128_withSecret_testdata[2631] */\n    { 2632, 0x0000000000000000ULL, { 0x00A7DDF5CD8188D4ULL, 0xFF5F1DC44AAC1620ULL } }, /* XSUM_XXH128_withSecret_testdata[2632] */\n    { 2633, 0x0000000000000000ULL, { 0x02E7E82785C1E2A9ULL, 0xCAE521359FF1B755ULL } }, /* XSUM_XXH128_withSecret_testdata[2633] */\n    { 2634, 0x0000000000000000ULL, { 0x0BC2BEA55AFD193BULL, 0x456967096FD0553DULL } }, /* XSUM_XXH128_withSecret_testdata[2634] */\n    { 2635, 0x0000000000000000ULL, { 0x439AD5248A2FB89FULL, 0x4FD95B100CB0C4B8ULL } }, /* XSUM_XXH128_withSecret_testdata[2635] */\n    { 2636, 0x0000000000000000ULL, { 0x58C9ADCB09BEC325ULL, 0xC2EDB5BF19B2343AULL } }, /* XSUM_XXH128_withSecret_testdata[2636] */\n    { 2637, 0x0000000000000000ULL, { 0x5001BBC78E724B9DULL, 0x4AE68F5A8AECDD5BULL } }, /* XSUM_XXH128_withSecret_testdata[2637] */\n    { 2638, 0x0000000000000000ULL, { 0x0804A7BC3B216DB1ULL, 0x30E959732ED04407ULL } }, /* XSUM_XXH128_withSecret_testdata[2638] */\n    { 2639, 0x0000000000000000ULL, { 0x8BBCCD92E34788DFULL, 0x7362B9457042CE99ULL } }, /* XSUM_XXH128_withSecret_testdata[2639] */\n    { 2640, 0x0000000000000000ULL, { 0xC41A91B7D8601816ULL, 0xD8409D4118631DFEULL } }, /* XSUM_XXH128_withSecret_testdata[2640] */\n    { 2641, 0x0000000000000000ULL, { 0x55BEE36549E0870BULL, 0x92A1CB88F801EA31ULL } }, /* XSUM_XXH128_withSecret_testdata[2641] */\n    { 2642, 0x0000000000000000ULL, { 0x16089A865A847A43ULL, 0xD1E45EF5538A0462ULL } }, /* XSUM_XXH128_withSecret_testdata[2642] */\n    { 2643, 0x0000000000000000ULL, { 0x8105DF0C7462BF52ULL, 0x1CDA3006CCC48611ULL } }, /* XSUM_XXH128_withSecret_testdata[2643] */\n    { 2644, 0x0000000000000000ULL, { 0xE71BA1F013FB3E10ULL, 0x9F457C3A0DEF3F26ULL } }, /* XSUM_XXH128_withSecret_testdata[2644] */\n    { 2645, 0x0000000000000000ULL, { 0x64A5697CB91C7206ULL, 0xE87F530D3CA590EFULL } }, /* XSUM_XXH128_withSecret_testdata[2645] */\n    { 2646, 0x0000000000000000ULL, { 0x9E373E290C75846AULL, 0x5C4BDBC82536D310ULL } }, /* XSUM_XXH128_withSecret_testdata[2646] */\n    { 2647, 0x0000000000000000ULL, { 0xD1BBE5E4FCBDC2ADULL, 0x1FCE59F7711C5080ULL } }, /* XSUM_XXH128_withSecret_testdata[2647] */\n    { 2648, 0x0000000000000000ULL, { 0xFEE2E93D7FB4E975ULL, 0xD9E676F708930E4BULL } }, /* XSUM_XXH128_withSecret_testdata[2648] */\n    { 2649, 0x0000000000000000ULL, { 0x6876D7CB7DC9797FULL, 0x6DA20903F86CB212ULL } }, /* XSUM_XXH128_withSecret_testdata[2649] */\n    { 2650, 0x0000000000000000ULL, { 0xD9B0BCDE3BF12705ULL, 0x1A543338C76FCC42ULL } }, /* XSUM_XXH128_withSecret_testdata[2650] */\n    { 2651, 0x0000000000000000ULL, { 0x495250888BB32B49ULL, 0xA74DFEFD8D8E8229ULL } }, /* XSUM_XXH128_withSecret_testdata[2651] */\n    { 2652, 0x0000000000000000ULL, { 0xEE445EFDF52C0A42ULL, 0xC182812214647F1BULL } }, /* XSUM_XXH128_withSecret_testdata[2652] */\n    { 2653, 0x0000000000000000ULL, { 0x3164C3796738DAE1ULL, 0x43028024B3FD58FEULL } }, /* XSUM_XXH128_withSecret_testdata[2653] */\n    { 2654, 0x0000000000000000ULL, { 0x7AE6680348D45EFFULL, 0x7194D3BCD13D906EULL } }, /* XSUM_XXH128_withSecret_testdata[2654] */\n    { 2655, 0x0000000000000000ULL, { 0x8E70038B332D3F54ULL, 0x1F213FFE633C3C29ULL } }, /* XSUM_XXH128_withSecret_testdata[2655] */\n    { 2656, 0x0000000000000000ULL, { 0x3E03BCB79DA50B2FULL, 0x3D3236F23DCD14E8ULL } }, /* XSUM_XXH128_withSecret_testdata[2656] */\n    { 2657, 0x0000000000000000ULL, { 0x7386A16500321DAAULL, 0x2AE992C965F98F72ULL } }, /* XSUM_XXH128_withSecret_testdata[2657] */\n    { 2658, 0x0000000000000000ULL, { 0x7918738CBE919FD2ULL, 0xEF5CBA1688B5C8A2ULL } }, /* XSUM_XXH128_withSecret_testdata[2658] */\n    { 2659, 0x0000000000000000ULL, { 0x36B19C977E3D64F2ULL, 0xCFC42A5304CEFFD7ULL } }, /* XSUM_XXH128_withSecret_testdata[2659] */\n    { 2660, 0x0000000000000000ULL, { 0x672A654152793BF1ULL, 0x2D30115ECCECC5D2ULL } }, /* XSUM_XXH128_withSecret_testdata[2660] */\n    { 2661, 0x0000000000000000ULL, { 0x91C67413D6E7609AULL, 0x4FC4ED1636C8F4CCULL } }, /* XSUM_XXH128_withSecret_testdata[2661] */\n    { 2662, 0x0000000000000000ULL, { 0x1EEFBAA7DFBEFFEBULL, 0xE9E882A725CEA513ULL } }, /* XSUM_XXH128_withSecret_testdata[2662] */\n    { 2663, 0x0000000000000000ULL, { 0x9F436ADFD10DD39DULL, 0x3CA44CEE42C4BD2EULL } }, /* XSUM_XXH128_withSecret_testdata[2663] */\n    { 2664, 0x0000000000000000ULL, { 0x52B95946FB502CCEULL, 0xD94CC54AAE93770AULL } }, /* XSUM_XXH128_withSecret_testdata[2664] */\n    { 2665, 0x0000000000000000ULL, { 0x00D500026F9AB861ULL, 0x3E9664F8A8A59195ULL } }, /* XSUM_XXH128_withSecret_testdata[2665] */\n    { 2666, 0x0000000000000000ULL, { 0xB967DD7695010DF6ULL, 0xB54F027651A63D66ULL } }, /* XSUM_XXH128_withSecret_testdata[2666] */\n    { 2667, 0x0000000000000000ULL, { 0x8E7606272F097FB8ULL, 0xFB472433BC298AA0ULL } }, /* XSUM_XXH128_withSecret_testdata[2667] */\n    { 2668, 0x0000000000000000ULL, { 0x4C9A07056EC8C59AULL, 0xE76CFAF75D179B86ULL } }, /* XSUM_XXH128_withSecret_testdata[2668] */\n    { 2669, 0x0000000000000000ULL, { 0x5508DAD47A6CC2CBULL, 0x34AAA29BE8C6063BULL } }, /* XSUM_XXH128_withSecret_testdata[2669] */\n    { 2670, 0x0000000000000000ULL, { 0xEB6360E14EEE1610ULL, 0x766FB782F07AC9FCULL } }, /* XSUM_XXH128_withSecret_testdata[2670] */\n    { 2671, 0x0000000000000000ULL, { 0xC6372020B33BFD65ULL, 0x05BBB3EC7FF45099ULL } }, /* XSUM_XXH128_withSecret_testdata[2671] */\n    { 2672, 0x0000000000000000ULL, { 0x0F843F9C945C94E6ULL, 0x3C8D7FEE6C221B0DULL } }, /* XSUM_XXH128_withSecret_testdata[2672] */\n    { 2673, 0x0000000000000000ULL, { 0xBFDCB8BE05DD7A65ULL, 0xA7AABA0EDD72702FULL } }, /* XSUM_XXH128_withSecret_testdata[2673] */\n    { 2674, 0x0000000000000000ULL, { 0x25DE628289633226ULL, 0x6730929B7E634A0DULL } }, /* XSUM_XXH128_withSecret_testdata[2674] */\n    { 2675, 0x0000000000000000ULL, { 0x32688F8FE66182AEULL, 0x25DAD9F7E1FB378CULL } }, /* XSUM_XXH128_withSecret_testdata[2675] */\n    { 2676, 0x0000000000000000ULL, { 0x84C8E782DDC3C81BULL, 0xE6F5CEAA3C8DAAF6ULL } }, /* XSUM_XXH128_withSecret_testdata[2676] */\n    { 2677, 0x0000000000000000ULL, { 0x3B658359E7BACF1EULL, 0x4232D163B737CB7FULL } }, /* XSUM_XXH128_withSecret_testdata[2677] */\n    { 2678, 0x0000000000000000ULL, { 0xAD7CFACBC79F8003ULL, 0x4F4D66CDBF789DF1ULL } }, /* XSUM_XXH128_withSecret_testdata[2678] */\n    { 2679, 0x0000000000000000ULL, { 0xBD610924ED01294CULL, 0xB723CA44B3E1E876ULL } }, /* XSUM_XXH128_withSecret_testdata[2679] */\n    { 2680, 0x0000000000000000ULL, { 0x096AD93B09F09B17ULL, 0x0E0ECD2924E87CFBULL } }, /* XSUM_XXH128_withSecret_testdata[2680] */\n    { 2681, 0x0000000000000000ULL, { 0xD8D202571A42DF76ULL, 0xB0AD493D13E98F7EULL } }, /* XSUM_XXH128_withSecret_testdata[2681] */\n    { 2682, 0x0000000000000000ULL, { 0x392D755A24555DA7ULL, 0x9640DEFF3193324FULL } }, /* XSUM_XXH128_withSecret_testdata[2682] */\n    { 2683, 0x0000000000000000ULL, { 0xFE625F185A910F2DULL, 0x496D708C9AEF0D13ULL } }, /* XSUM_XXH128_withSecret_testdata[2683] */\n    { 2684, 0x0000000000000000ULL, { 0xF782909443ACBABAULL, 0xC29CB88A5A0BF192ULL } }, /* XSUM_XXH128_withSecret_testdata[2684] */\n    { 2685, 0x0000000000000000ULL, { 0xE0168A31A9DEA40CULL, 0xDBC54C3D4880C707ULL } }, /* XSUM_XXH128_withSecret_testdata[2685] */\n    { 2686, 0x0000000000000000ULL, { 0xAF0735145F93B14AULL, 0xFDB84FA0E73ACE4AULL } }, /* XSUM_XXH128_withSecret_testdata[2686] */\n    { 2687, 0x0000000000000000ULL, { 0x85E8513DC79A8724ULL, 0x64C903FFAFABCAB4ULL } }, /* XSUM_XXH128_withSecret_testdata[2687] */\n    { 2688, 0x0000000000000000ULL, { 0x330F96D0DA8D3B4CULL, 0x284F631031E00ADAULL } }, /* XSUM_XXH128_withSecret_testdata[2688] */\n    { 2689, 0x0000000000000000ULL, { 0x6AA04F0588D67194ULL, 0xD1AC19238A95C461ULL } }, /* XSUM_XXH128_withSecret_testdata[2689] */\n    { 2690, 0x0000000000000000ULL, { 0xC51B098BBFA4637AULL, 0x0514ED526D7C7F34ULL } }, /* XSUM_XXH128_withSecret_testdata[2690] */\n    { 2691, 0x0000000000000000ULL, { 0x5787EC409CD94EC7ULL, 0xDABAA7C10DA92C62ULL } }, /* XSUM_XXH128_withSecret_testdata[2691] */\n    { 2692, 0x0000000000000000ULL, { 0x3AF92D8FB21B10CFULL, 0xDE130088F4B5BDDFULL } }, /* XSUM_XXH128_withSecret_testdata[2692] */\n    { 2693, 0x0000000000000000ULL, { 0x47B7CA6CED64886DULL, 0xBCE878F6C29634DEULL } }, /* XSUM_XXH128_withSecret_testdata[2693] */\n    { 2694, 0x0000000000000000ULL, { 0x812E544FD90EF1BAULL, 0x47C7F7E058DE9C56ULL } }, /* XSUM_XXH128_withSecret_testdata[2694] */\n    { 2695, 0x0000000000000000ULL, { 0xA55D70EE8F02E8BDULL, 0xC596C14D2683348EULL } }, /* XSUM_XXH128_withSecret_testdata[2695] */\n    { 2696, 0x0000000000000000ULL, { 0x233CD540E5FCC33CULL, 0x3CBA35923A806274ULL } }, /* XSUM_XXH128_withSecret_testdata[2696] */\n    { 2697, 0x0000000000000000ULL, { 0xFB9341114FA4CC29ULL, 0xC07AB5A00ADC8A0AULL } }, /* XSUM_XXH128_withSecret_testdata[2697] */\n    { 2698, 0x0000000000000000ULL, { 0xC29841FC3A675EF6ULL, 0x8D9E55A6E6F0AEB6ULL } }, /* XSUM_XXH128_withSecret_testdata[2698] */\n    { 2699, 0x0000000000000000ULL, { 0xC4EB0FE70A33F62FULL, 0x7187D02DE31E5DF8ULL } }, /* XSUM_XXH128_withSecret_testdata[2699] */\n    { 2700, 0x0000000000000000ULL, { 0xA3AA5B1F50D9E77CULL, 0x182AA4C6295FDD76ULL } }, /* XSUM_XXH128_withSecret_testdata[2700] */\n    { 2701, 0x0000000000000000ULL, { 0x1A3A391DBBE402E5ULL, 0x4F4632C738C9C324ULL } }, /* XSUM_XXH128_withSecret_testdata[2701] */\n    { 2702, 0x0000000000000000ULL, { 0xA4724F3C58FD0920ULL, 0x492C4F5317B1D566ULL } }, /* XSUM_XXH128_withSecret_testdata[2702] */\n    { 2703, 0x0000000000000000ULL, { 0x0A71207441D9CC62ULL, 0x2E97885E3696680EULL } }, /* XSUM_XXH128_withSecret_testdata[2703] */\n    { 2704, 0x0000000000000000ULL, { 0xB5AB2E664CC1F0E3ULL, 0xE80EF1D16442D394ULL } }, /* XSUM_XXH128_withSecret_testdata[2704] */\n    { 2705, 0x0000000000000000ULL, { 0x28237936A1716622ULL, 0x06B576378C78CBFDULL } }, /* XSUM_XXH128_withSecret_testdata[2705] */\n    { 2706, 0x0000000000000000ULL, { 0x8FF7CB7CDFBE8552ULL, 0x90FB03FD8EF82A9DULL } }, /* XSUM_XXH128_withSecret_testdata[2706] */\n    { 2707, 0x0000000000000000ULL, { 0x95D17737A4533EB1ULL, 0xF96B6C0C77CF5090ULL } }, /* XSUM_XXH128_withSecret_testdata[2707] */\n    { 2708, 0x0000000000000000ULL, { 0x88CE7CAFDD755DA6ULL, 0x7349A3B81ABF8A43ULL } }, /* XSUM_XXH128_withSecret_testdata[2708] */\n    { 2709, 0x0000000000000000ULL, { 0xA7A708CA9BE6603DULL, 0xD07B030C96BF9D4FULL } }, /* XSUM_XXH128_withSecret_testdata[2709] */\n    { 2710, 0x0000000000000000ULL, { 0x6CBC38D67BAE5390ULL, 0x0D358CCEA9BD95ACULL } }, /* XSUM_XXH128_withSecret_testdata[2710] */\n    { 2711, 0x0000000000000000ULL, { 0xB7E1FB656B7422A3ULL, 0x771669DC6AB53032ULL } }, /* XSUM_XXH128_withSecret_testdata[2711] */\n    { 2712, 0x0000000000000000ULL, { 0x55D7049F9FF1CA3EULL, 0xE37992E155E88F9CULL } }, /* XSUM_XXH128_withSecret_testdata[2712] */\n    { 2713, 0x0000000000000000ULL, { 0xDBF632660DD99CB0ULL, 0xBC5B9F441D899106ULL } }, /* XSUM_XXH128_withSecret_testdata[2713] */\n    { 2714, 0x0000000000000000ULL, { 0x4D3CD71295F6ABF8ULL, 0x634EC7C7FF9AC684ULL } }, /* XSUM_XXH128_withSecret_testdata[2714] */\n    { 2715, 0x0000000000000000ULL, { 0x14092CBC6368A1FCULL, 0x320D44AD8973C091ULL } }, /* XSUM_XXH128_withSecret_testdata[2715] */\n    { 2716, 0x0000000000000000ULL, { 0x3A10DD5737B434B2ULL, 0x3168899B6AB6DDE2ULL } }, /* XSUM_XXH128_withSecret_testdata[2716] */\n    { 2717, 0x0000000000000000ULL, { 0x253A2D1AC1138049ULL, 0x3A1D9631DB85C662ULL } }, /* XSUM_XXH128_withSecret_testdata[2717] */\n    { 2718, 0x0000000000000000ULL, { 0x2726706B5ED76122ULL, 0x17A38D8C93CF7C60ULL } }, /* XSUM_XXH128_withSecret_testdata[2718] */\n    { 2719, 0x0000000000000000ULL, { 0x6DCB497FFE8EFDF0ULL, 0x5DC76D0637AC71E5ULL } }, /* XSUM_XXH128_withSecret_testdata[2719] */\n    { 2720, 0x0000000000000000ULL, { 0xBFBE9DDD15CCA78BULL, 0x8867D87263AD475EULL } }, /* XSUM_XXH128_withSecret_testdata[2720] */\n    { 2721, 0x0000000000000000ULL, { 0x93080165E74F2113ULL, 0xCF2346A0586AB0EDULL } }, /* XSUM_XXH128_withSecret_testdata[2721] */\n    { 2722, 0x0000000000000000ULL, { 0x34F93E545F17B00BULL, 0xA89428F4B44E70ECULL } }, /* XSUM_XXH128_withSecret_testdata[2722] */\n    { 2723, 0x0000000000000000ULL, { 0x9FBF9134D52E17A8ULL, 0x72A00CF2C25C6FB3ULL } }, /* XSUM_XXH128_withSecret_testdata[2723] */\n    { 2724, 0x0000000000000000ULL, { 0x0095C26912C593CBULL, 0x7C1DC5EF453D99A6ULL } }, /* XSUM_XXH128_withSecret_testdata[2724] */\n    { 2725, 0x0000000000000000ULL, { 0x4295CA7092D53393ULL, 0x346C345307D3DB9AULL } }, /* XSUM_XXH128_withSecret_testdata[2725] */\n    { 2726, 0x0000000000000000ULL, { 0xBF2BF797289CCA26ULL, 0x372F6C8A692EE567ULL } }, /* XSUM_XXH128_withSecret_testdata[2726] */\n    { 2727, 0x0000000000000000ULL, { 0xDE8896D86795A88FULL, 0x2D66F82F57AB30D8ULL } }, /* XSUM_XXH128_withSecret_testdata[2727] */\n    { 2728, 0x0000000000000000ULL, { 0x98F44195153814DFULL, 0xA9A6D5A9F06091F3ULL } }, /* XSUM_XXH128_withSecret_testdata[2728] */\n    { 2729, 0x0000000000000000ULL, { 0xF95CFB8318C7728CULL, 0x556FE5D80B639772ULL } }, /* XSUM_XXH128_withSecret_testdata[2729] */\n    { 2730, 0x0000000000000000ULL, { 0xBB95647B025D4046ULL, 0xDF464CECE2199E6CULL } }, /* XSUM_XXH128_withSecret_testdata[2730] */\n    { 2731, 0x0000000000000000ULL, { 0xCCC3908B111E3898ULL, 0xE5DBF3CEF2C3F7E6ULL } }, /* XSUM_XXH128_withSecret_testdata[2731] */\n    { 2732, 0x0000000000000000ULL, { 0xBDEFCC0464C26D71ULL, 0x0A6B0E044782CE2EULL } }, /* XSUM_XXH128_withSecret_testdata[2732] */\n    { 2733, 0x0000000000000000ULL, { 0xAAB0EC47ED4C44B8ULL, 0xB164C3DD312497F2ULL } }, /* XSUM_XXH128_withSecret_testdata[2733] */\n    { 2734, 0x0000000000000000ULL, { 0x1010BC3F4C8126CEULL, 0xF4C278A65A48D5D3ULL } }, /* XSUM_XXH128_withSecret_testdata[2734] */\n    { 2735, 0x0000000000000000ULL, { 0x0DFE9A3A9921B584ULL, 0xB3BCD4966CC4EA03ULL } }, /* XSUM_XXH128_withSecret_testdata[2735] */\n    { 2736, 0x0000000000000000ULL, { 0xF0544A704E23132FULL, 0xD64EC6C01B714F52ULL } }, /* XSUM_XXH128_withSecret_testdata[2736] */\n    { 2737, 0x0000000000000000ULL, { 0x343DEE93E6A3B726ULL, 0x92B120B56E933183ULL } }, /* XSUM_XXH128_withSecret_testdata[2737] */\n    { 2738, 0x0000000000000000ULL, { 0x3F739461D94B435EULL, 0x45B792847AFA10C1ULL } }, /* XSUM_XXH128_withSecret_testdata[2738] */\n    { 2739, 0x0000000000000000ULL, { 0xA859C4CC314E13DCULL, 0x35F27DE43DC20B4FULL } }, /* XSUM_XXH128_withSecret_testdata[2739] */\n    { 2740, 0x0000000000000000ULL, { 0x4E8FFBF5D701FEBEULL, 0x254924C0AF1E70CEULL } }, /* XSUM_XXH128_withSecret_testdata[2740] */\n    { 2741, 0x0000000000000000ULL, { 0x1EEA03B3C7D154B3ULL, 0x128C09B9CCE489E5ULL } }, /* XSUM_XXH128_withSecret_testdata[2741] */\n    { 2742, 0x0000000000000000ULL, { 0x2C034DFB36591DDDULL, 0x5A0DA60AD3251A00ULL } }, /* XSUM_XXH128_withSecret_testdata[2742] */\n    { 2743, 0x0000000000000000ULL, { 0x97A3613150ACE4A6ULL, 0x8CEC6711D4418684ULL } }, /* XSUM_XXH128_withSecret_testdata[2743] */\n    { 2744, 0x0000000000000000ULL, { 0x08F6AC5C1542135CULL, 0x9C4CF21C6F05CA9DULL } }, /* XSUM_XXH128_withSecret_testdata[2744] */\n    { 2745, 0x0000000000000000ULL, { 0x499AEA26832D3187ULL, 0x3E1EB7ED13EE7923ULL } }, /* XSUM_XXH128_withSecret_testdata[2745] */\n    { 2746, 0x0000000000000000ULL, { 0xCF1C3217B3FA96A5ULL, 0x7FBE0ADFDE797E0CULL } }, /* XSUM_XXH128_withSecret_testdata[2746] */\n    { 2747, 0x0000000000000000ULL, { 0x324E2BF9393F49C0ULL, 0xBEBEF797465B24A7ULL } }, /* XSUM_XXH128_withSecret_testdata[2747] */\n    { 2748, 0x0000000000000000ULL, { 0xE70F81395137C31EULL, 0x420E1462A4BF665CULL } }, /* XSUM_XXH128_withSecret_testdata[2748] */\n    { 2749, 0x0000000000000000ULL, { 0x93D5F5C4CC553B50ULL, 0x1FFC43AE76641EC4ULL } }, /* XSUM_XXH128_withSecret_testdata[2749] */\n    { 2750, 0x0000000000000000ULL, { 0xBFFA783F1CBFF56DULL, 0x0EA0D431CB677DEFULL } }, /* XSUM_XXH128_withSecret_testdata[2750] */\n    { 2751, 0x0000000000000000ULL, { 0x1D78DE39E4B359A6ULL, 0x4C3EEE558DCB3626ULL } }, /* XSUM_XXH128_withSecret_testdata[2751] */\n    { 2752, 0x0000000000000000ULL, { 0xBB287377235EDC08ULL, 0x61C001C3535CE7F6ULL } }, /* XSUM_XXH128_withSecret_testdata[2752] */\n    { 2753, 0x0000000000000000ULL, { 0x6C2456AD352C9554ULL, 0xAEA0D438AAC1374DULL } }, /* XSUM_XXH128_withSecret_testdata[2753] */\n    { 2754, 0x0000000000000000ULL, { 0x1BF4054BCCA27FD7ULL, 0xC65DE2FF21A47C30ULL } }, /* XSUM_XXH128_withSecret_testdata[2754] */\n    { 2755, 0x0000000000000000ULL, { 0xAC7B608DDDB27358ULL, 0xAF6DD19184D6C668ULL } }, /* XSUM_XXH128_withSecret_testdata[2755] */\n    { 2756, 0x0000000000000000ULL, { 0x0235B968B50ACFEFULL, 0x886BFCBCAA27DB99ULL } }, /* XSUM_XXH128_withSecret_testdata[2756] */\n    { 2757, 0x0000000000000000ULL, { 0xF6A70A14FC5BDD6BULL, 0x7C46EBC532CE1BC5ULL } }, /* XSUM_XXH128_withSecret_testdata[2757] */\n    { 2758, 0x0000000000000000ULL, { 0xE3DE3EBC2E388DCAULL, 0x1917FDAE30171C9FULL } }, /* XSUM_XXH128_withSecret_testdata[2758] */\n    { 2759, 0x0000000000000000ULL, { 0xB0AE9AB15E900917ULL, 0x02736A47C416F4FEULL } }, /* XSUM_XXH128_withSecret_testdata[2759] */\n    { 2760, 0x0000000000000000ULL, { 0x66FA24FBF160B1FDULL, 0x06B5583B752C1FD9ULL } }, /* XSUM_XXH128_withSecret_testdata[2760] */\n    { 2761, 0x0000000000000000ULL, { 0xF353DF47B4F0EC48ULL, 0x2A3ADACBC934EF5CULL } }, /* XSUM_XXH128_withSecret_testdata[2761] */\n    { 2762, 0x0000000000000000ULL, { 0xFB59B70C1578CF38ULL, 0xA583EDC1FDF9F2C8ULL } }, /* XSUM_XXH128_withSecret_testdata[2762] */\n    { 2763, 0x0000000000000000ULL, { 0xE05DFF1C885A7D80ULL, 0x76AD8CA2CBCB79C0ULL } }, /* XSUM_XXH128_withSecret_testdata[2763] */\n    { 2764, 0x0000000000000000ULL, { 0xE5EEA924203FA37DULL, 0x7F9F0624AFB96894ULL } }, /* XSUM_XXH128_withSecret_testdata[2764] */\n    { 2765, 0x0000000000000000ULL, { 0xCD6F7FB5C036ED16ULL, 0x04A203B66EDE8A08ULL } }, /* XSUM_XXH128_withSecret_testdata[2765] */\n    { 2766, 0x0000000000000000ULL, { 0x79A96F1D3B95841BULL, 0xDF07D320D403D0E0ULL } }, /* XSUM_XXH128_withSecret_testdata[2766] */\n    { 2767, 0x0000000000000000ULL, { 0x72DCFAFA56ABF4DFULL, 0x4D114962DFB6B3C1ULL } }, /* XSUM_XXH128_withSecret_testdata[2767] */\n    { 2768, 0x0000000000000000ULL, { 0xF204B717392BD4D0ULL, 0x9A785F22935A2091ULL } }, /* XSUM_XXH128_withSecret_testdata[2768] */\n    { 2769, 0x0000000000000000ULL, { 0x6DE5C83C19B338BBULL, 0xF57A0BFA4DC07D60ULL } }, /* XSUM_XXH128_withSecret_testdata[2769] */\n    { 2770, 0x0000000000000000ULL, { 0xC5C567298EBFB60BULL, 0xD531BBA247B06F6FULL } }, /* XSUM_XXH128_withSecret_testdata[2770] */\n    { 2771, 0x0000000000000000ULL, { 0xC788884D383D1896ULL, 0xAC40E0D50C43B017ULL } }, /* XSUM_XXH128_withSecret_testdata[2771] */\n    { 2772, 0x0000000000000000ULL, { 0x2C0FFBBFA9A79F05ULL, 0x0EBFF5D6EF77694BULL } }, /* XSUM_XXH128_withSecret_testdata[2772] */\n    { 2773, 0x0000000000000000ULL, { 0x94797FAB3BAFBBB3ULL, 0x03CF411266C3DBE9ULL } }, /* XSUM_XXH128_withSecret_testdata[2773] */\n    { 2774, 0x0000000000000000ULL, { 0xC34B8C0729D4BE4CULL, 0x12C9F4D5BD5C6D25ULL } }, /* XSUM_XXH128_withSecret_testdata[2774] */\n    { 2775, 0x0000000000000000ULL, { 0x8DF43637A9297CBAULL, 0xAF0DD29BF27C2683ULL } }, /* XSUM_XXH128_withSecret_testdata[2775] */\n    { 2776, 0x0000000000000000ULL, { 0xCD5FA536464E2E65ULL, 0x085EC6871E3CCF56ULL } }, /* XSUM_XXH128_withSecret_testdata[2776] */\n    { 2777, 0x0000000000000000ULL, { 0xE9541F4387BD4A25ULL, 0x70D3552368F8C9EFULL } }, /* XSUM_XXH128_withSecret_testdata[2777] */\n    { 2778, 0x0000000000000000ULL, { 0x9BFED168E94DDCA8ULL, 0xDA59ACC410F61FE8ULL } }, /* XSUM_XXH128_withSecret_testdata[2778] */\n    { 2779, 0x0000000000000000ULL, { 0x9E7FCB267E30D861ULL, 0xFBBC513B86AFB459ULL } }, /* XSUM_XXH128_withSecret_testdata[2779] */\n    { 2780, 0x0000000000000000ULL, { 0x702DF6FC825656DEULL, 0x414A17DDC6329DDFULL } }, /* XSUM_XXH128_withSecret_testdata[2780] */\n    { 2781, 0x0000000000000000ULL, { 0xE707780A7986FAB8ULL, 0x06FDE4F77D6AD305ULL } }, /* XSUM_XXH128_withSecret_testdata[2781] */\n    { 2782, 0x0000000000000000ULL, { 0xC03C37E26F0934B9ULL, 0xFA27883549536C19ULL } }, /* XSUM_XXH128_withSecret_testdata[2782] */\n    { 2783, 0x0000000000000000ULL, { 0xA09B4C7DC5CA5A3FULL, 0x640A2CD54E061F71ULL } }, /* XSUM_XXH128_withSecret_testdata[2783] */\n    { 2784, 0x0000000000000000ULL, { 0xFC1E02A96E3343CCULL, 0x01274CF66488C7C9ULL } }, /* XSUM_XXH128_withSecret_testdata[2784] */\n    { 2785, 0x0000000000000000ULL, { 0x24D2C545F6E3E6BEULL, 0xFBF51CEE009EA03AULL } }, /* XSUM_XXH128_withSecret_testdata[2785] */\n    { 2786, 0x0000000000000000ULL, { 0x8AFEB9BBFB72540DULL, 0xBAC96AA6A1FF468CULL } }, /* XSUM_XXH128_withSecret_testdata[2786] */\n    { 2787, 0x0000000000000000ULL, { 0xC4E33683C40A9E77ULL, 0x674E3A9F97139D37ULL } }, /* XSUM_XXH128_withSecret_testdata[2787] */\n    { 2788, 0x0000000000000000ULL, { 0xEE25F588F432B1ADULL, 0xED7D7F4A2A6EFFC9ULL } }, /* XSUM_XXH128_withSecret_testdata[2788] */\n    { 2789, 0x0000000000000000ULL, { 0xF9ED1427FE79DF11ULL, 0x7391B5B3F39E1EC1ULL } }, /* XSUM_XXH128_withSecret_testdata[2789] */\n    { 2790, 0x0000000000000000ULL, { 0x0A22E09ED079E537ULL, 0x613BEFA3D3A4A39DULL } }, /* XSUM_XXH128_withSecret_testdata[2790] */\n    { 2791, 0x0000000000000000ULL, { 0xE999A877D8EC41FDULL, 0x0A5CECA84D2C866CULL } }, /* XSUM_XXH128_withSecret_testdata[2791] */\n    { 2792, 0x0000000000000000ULL, { 0x1FB3987DDC9EBB52ULL, 0xCD3FCDF31068623CULL } }, /* XSUM_XXH128_withSecret_testdata[2792] */\n    { 2793, 0x0000000000000000ULL, { 0x9FF55CAB0FB3D20BULL, 0x96EDFD793C8D1C35ULL } }, /* XSUM_XXH128_withSecret_testdata[2793] */\n    { 2794, 0x0000000000000000ULL, { 0x36DCFAEE4C766E66ULL, 0xC628788A610014CFULL } }, /* XSUM_XXH128_withSecret_testdata[2794] */\n    { 2795, 0x0000000000000000ULL, { 0xD7BC29A3A977EA17ULL, 0x4372185EAD012721ULL } }, /* XSUM_XXH128_withSecret_testdata[2795] */\n    { 2796, 0x0000000000000000ULL, { 0x5377D82B7C001FC2ULL, 0xF337DB5A2B6D2EEEULL } }, /* XSUM_XXH128_withSecret_testdata[2796] */\n    { 2797, 0x0000000000000000ULL, { 0x5561318FC103405DULL, 0x05AE944B06B3BD6EULL } }, /* XSUM_XXH128_withSecret_testdata[2797] */\n    { 2798, 0x0000000000000000ULL, { 0xEEB4E2A60F230FBFULL, 0xD21DAE61EED103B1ULL } }, /* XSUM_XXH128_withSecret_testdata[2798] */\n    { 2799, 0x0000000000000000ULL, { 0x8BDB1E653E8A49C3ULL, 0x5F76C7256C26C453ULL } }, /* XSUM_XXH128_withSecret_testdata[2799] */\n    { 2800, 0x0000000000000000ULL, { 0x12A204BF81E34B69ULL, 0xE261EEBC41A73CC9ULL } }, /* XSUM_XXH128_withSecret_testdata[2800] */\n    { 2801, 0x0000000000000000ULL, { 0xCC3D2BA4D7D7005CULL, 0x399A67278FDBB166ULL } }, /* XSUM_XXH128_withSecret_testdata[2801] */\n    { 2802, 0x0000000000000000ULL, { 0x051EFE66635C5537ULL, 0x619ED17661062B40ULL } }, /* XSUM_XXH128_withSecret_testdata[2802] */\n    { 2803, 0x0000000000000000ULL, { 0x7C95EF8AE5C78FCFULL, 0x45D0345AB7BA7855ULL } }, /* XSUM_XXH128_withSecret_testdata[2803] */\n    { 2804, 0x0000000000000000ULL, { 0x9C432F611839A1EBULL, 0x5D5BBD411DB73A68ULL } }, /* XSUM_XXH128_withSecret_testdata[2804] */\n    { 2805, 0x0000000000000000ULL, { 0x6679AEABC3ADF699ULL, 0x3EDC36B9ED1AD10FULL } }, /* XSUM_XXH128_withSecret_testdata[2805] */\n    { 2806, 0x0000000000000000ULL, { 0x02D753654FE918E9ULL, 0x0CFA5776DC6D3779ULL } }, /* XSUM_XXH128_withSecret_testdata[2806] */\n    { 2807, 0x0000000000000000ULL, { 0x210F9D87A85522C4ULL, 0xAB732C7C2FCB885AULL } }, /* XSUM_XXH128_withSecret_testdata[2807] */\n    { 2808, 0x0000000000000000ULL, { 0xB0CE9CFB1FEF7927ULL, 0x16CD09AFC2FB1064ULL } }, /* XSUM_XXH128_withSecret_testdata[2808] */\n    { 2809, 0x0000000000000000ULL, { 0x8C2D9AF242C9863BULL, 0xC1A38FDBE71116ECULL } }, /* XSUM_XXH128_withSecret_testdata[2809] */\n    { 2810, 0x0000000000000000ULL, { 0xE0FF20BC9CE0A8E5ULL, 0x537BEB8898779262ULL } }, /* XSUM_XXH128_withSecret_testdata[2810] */\n    { 2811, 0x0000000000000000ULL, { 0x3534E1CE731A2E86ULL, 0x07C315D2DC7C22CAULL } }, /* XSUM_XXH128_withSecret_testdata[2811] */\n    { 2812, 0x0000000000000000ULL, { 0xA26DF2A499A9871EULL, 0x3D8EF73A4F86ABE3ULL } }, /* XSUM_XXH128_withSecret_testdata[2812] */\n    { 2813, 0x0000000000000000ULL, { 0x9F4B4AB7255B02B9ULL, 0x89D8972FC5EC2BD3ULL } }, /* XSUM_XXH128_withSecret_testdata[2813] */\n    { 2814, 0x0000000000000000ULL, { 0xBCAEBE57332E22F9ULL, 0x0F080C75156DCAC0ULL } }, /* XSUM_XXH128_withSecret_testdata[2814] */\n    { 2815, 0x0000000000000000ULL, { 0xE6277102A50222ECULL, 0x63D31D7E18F03A1DULL } }, /* XSUM_XXH128_withSecret_testdata[2815] */\n    { 2816, 0x0000000000000000ULL, { 0x999C2EB9E577279AULL, 0x94030A283E532786ULL } }, /* XSUM_XXH128_withSecret_testdata[2816] */\n    { 2817, 0x0000000000000000ULL, { 0x29C1DC459C9130C2ULL, 0xE271A886C0087604ULL } }, /* XSUM_XXH128_withSecret_testdata[2817] */\n    { 2818, 0x0000000000000000ULL, { 0xC1CAC38ED190EE18ULL, 0xA7B040EA4A24F358ULL } }, /* XSUM_XXH128_withSecret_testdata[2818] */\n    { 2819, 0x0000000000000000ULL, { 0x9B1350B1B96661A2ULL, 0xEC301A29E403201BULL } }, /* XSUM_XXH128_withSecret_testdata[2819] */\n    { 2820, 0x0000000000000000ULL, { 0x71CAED77C7200A2BULL, 0x83951748BEEE03EDULL } }, /* XSUM_XXH128_withSecret_testdata[2820] */\n    { 2821, 0x0000000000000000ULL, { 0xB2EB0F1B367D1F1CULL, 0x4458908E33CA2DB8ULL } }, /* XSUM_XXH128_withSecret_testdata[2821] */\n    { 2822, 0x0000000000000000ULL, { 0x705227E5AA6724C3ULL, 0x31BE77801492635CULL } }, /* XSUM_XXH128_withSecret_testdata[2822] */\n    { 2823, 0x0000000000000000ULL, { 0xD4774A063460F910ULL, 0xDA012FF9764B9145ULL } }, /* XSUM_XXH128_withSecret_testdata[2823] */\n    { 2824, 0x0000000000000000ULL, { 0xF32D1692780E6408ULL, 0x7153F476A5181737ULL } }, /* XSUM_XXH128_withSecret_testdata[2824] */\n    { 2825, 0x0000000000000000ULL, { 0xB73D40295D5D4EC4ULL, 0xBD670FBB2ED83982ULL } }, /* XSUM_XXH128_withSecret_testdata[2825] */\n    { 2826, 0x0000000000000000ULL, { 0x91240DFD2CA34842ULL, 0xF3575ED67908BE42ULL } }, /* XSUM_XXH128_withSecret_testdata[2826] */\n    { 2827, 0x0000000000000000ULL, { 0x50220D292F064558ULL, 0xACE4B38E81D57AC7ULL } }, /* XSUM_XXH128_withSecret_testdata[2827] */\n    { 2828, 0x0000000000000000ULL, { 0x7126AB3CAA1CBA42ULL, 0x2401B6F4EBBED59AULL } }, /* XSUM_XXH128_withSecret_testdata[2828] */\n    { 2829, 0x0000000000000000ULL, { 0x039BC018490153BFULL, 0x28FA131772F3F59AULL } }, /* XSUM_XXH128_withSecret_testdata[2829] */\n    { 2830, 0x0000000000000000ULL, { 0x39C5942416D59D64ULL, 0xC91FAD840EEA942EULL } }, /* XSUM_XXH128_withSecret_testdata[2830] */\n    { 2831, 0x0000000000000000ULL, { 0xD1A57EE78B392178ULL, 0xBA88D2996FD65527ULL } }, /* XSUM_XXH128_withSecret_testdata[2831] */\n    { 2832, 0x0000000000000000ULL, { 0xE50A80674449DB42ULL, 0xEFF34B09BDB6C2E3ULL } }, /* XSUM_XXH128_withSecret_testdata[2832] */\n    { 2833, 0x0000000000000000ULL, { 0x7719C3795D06E89CULL, 0xDA9A6DC6B889D9B3ULL } }, /* XSUM_XXH128_withSecret_testdata[2833] */\n    { 2834, 0x0000000000000000ULL, { 0x4A739CBF8E891946ULL, 0xBA0F2202ADE13344ULL } }, /* XSUM_XXH128_withSecret_testdata[2834] */\n    { 2835, 0x0000000000000000ULL, { 0x6D330BD9B1BF21E6ULL, 0x5E7ECAF28334198EULL } }, /* XSUM_XXH128_withSecret_testdata[2835] */\n    { 2836, 0x0000000000000000ULL, { 0x9E5BB469D8D97558ULL, 0xA4AF2E27D6EE9702ULL } }, /* XSUM_XXH128_withSecret_testdata[2836] */\n    { 2837, 0x0000000000000000ULL, { 0x83BADC427E8FF272ULL, 0xAE41154C5776E1F4ULL } }, /* XSUM_XXH128_withSecret_testdata[2837] */\n    { 2838, 0x0000000000000000ULL, { 0x46B3AE7CEBB9A538ULL, 0xE82F76114D71A5D8ULL } }, /* XSUM_XXH128_withSecret_testdata[2838] */\n    { 2839, 0x0000000000000000ULL, { 0x425119385FAF41FDULL, 0xC75AC30EBDBC4DE0ULL } }, /* XSUM_XXH128_withSecret_testdata[2839] */\n    { 2840, 0x0000000000000000ULL, { 0xF4B2C887B8BE31DCULL, 0x43FD65B44B25ADC1ULL } }, /* XSUM_XXH128_withSecret_testdata[2840] */\n    { 2841, 0x0000000000000000ULL, { 0xF2756DFC7B95624AULL, 0x849038BB5BA2B151ULL } }, /* XSUM_XXH128_withSecret_testdata[2841] */\n    { 2842, 0x0000000000000000ULL, { 0x3ECEFC1A76C19E67ULL, 0x96A61BB8CF6B2063ULL } }, /* XSUM_XXH128_withSecret_testdata[2842] */\n    { 2843, 0x0000000000000000ULL, { 0xCD7C55019E788D6CULL, 0xEC6BE0F3ABF4B663ULL } }, /* XSUM_XXH128_withSecret_testdata[2843] */\n    { 2844, 0x0000000000000000ULL, { 0x3DD559ACBFD56CC2ULL, 0xF1AB070CF9C3B66EULL } }, /* XSUM_XXH128_withSecret_testdata[2844] */\n    { 2845, 0x0000000000000000ULL, { 0x6D469F7989A711A5ULL, 0x326519EFFEC75C10ULL } }, /* XSUM_XXH128_withSecret_testdata[2845] */\n    { 2846, 0x0000000000000000ULL, { 0xDFDBE44FC2F9ED49ULL, 0x2AF1672FAB30E9EFULL } }, /* XSUM_XXH128_withSecret_testdata[2846] */\n    { 2847, 0x0000000000000000ULL, { 0x3625AAB3C169708BULL, 0xB757E9734DE62070ULL } }, /* XSUM_XXH128_withSecret_testdata[2847] */\n    { 2848, 0x0000000000000000ULL, { 0x35C3F7C6D3486020ULL, 0xDBC5A0778D1B8E49ULL } }, /* XSUM_XXH128_withSecret_testdata[2848] */\n    { 2849, 0x0000000000000000ULL, { 0x0BEFA2238E9365ADULL, 0xC9110674E098BA2FULL } }, /* XSUM_XXH128_withSecret_testdata[2849] */\n    { 2850, 0x0000000000000000ULL, { 0x0696ABFA8C9BB130ULL, 0x4061945D2F811C14ULL } }, /* XSUM_XXH128_withSecret_testdata[2850] */\n    { 2851, 0x0000000000000000ULL, { 0x5850A42F4E854EBEULL, 0xE546AD03265E7D58ULL } }, /* XSUM_XXH128_withSecret_testdata[2851] */\n    { 2852, 0x0000000000000000ULL, { 0x10B415F2D678A86AULL, 0xF27C31B841A81682ULL } }, /* XSUM_XXH128_withSecret_testdata[2852] */\n    { 2853, 0x0000000000000000ULL, { 0xD1C1749BE69AD494ULL, 0x624225C475FAB44CULL } }, /* XSUM_XXH128_withSecret_testdata[2853] */\n    { 2854, 0x0000000000000000ULL, { 0xA46932A6C4B1953EULL, 0xA78DA5D0022AD392ULL } }, /* XSUM_XXH128_withSecret_testdata[2854] */\n    { 2855, 0x0000000000000000ULL, { 0x88CB1FED07729FECULL, 0x42334F313D587CC1ULL } }, /* XSUM_XXH128_withSecret_testdata[2855] */\n    { 2856, 0x0000000000000000ULL, { 0x3ADE9267084894AFULL, 0x1848C0465971E882ULL } }, /* XSUM_XXH128_withSecret_testdata[2856] */\n    { 2857, 0x0000000000000000ULL, { 0xDF70FFEEB7F5DAE3ULL, 0x5C1F44F4A3B01975ULL } }, /* XSUM_XXH128_withSecret_testdata[2857] */\n    { 2858, 0x0000000000000000ULL, { 0x02315C318359AFF1ULL, 0x2E8364EAF85C2E16ULL } }, /* XSUM_XXH128_withSecret_testdata[2858] */\n    { 2859, 0x0000000000000000ULL, { 0x5B38CEEA2CB023C2ULL, 0xD6623926B7D0C3BAULL } }, /* XSUM_XXH128_withSecret_testdata[2859] */\n    { 2860, 0x0000000000000000ULL, { 0x4C067A257B0B9D80ULL, 0x4C687223CA7D7780ULL } }, /* XSUM_XXH128_withSecret_testdata[2860] */\n    { 2861, 0x0000000000000000ULL, { 0x0B1A088D92171A91ULL, 0x5B88944CC1780DADULL } }, /* XSUM_XXH128_withSecret_testdata[2861] */\n    { 2862, 0x0000000000000000ULL, { 0xE009B2698AEEBADEULL, 0x3453DE95999E96F3ULL } }, /* XSUM_XXH128_withSecret_testdata[2862] */\n    { 2863, 0x0000000000000000ULL, { 0x8924C02524FE7413ULL, 0x3953E9B7DE486826ULL } }, /* XSUM_XXH128_withSecret_testdata[2863] */\n    { 2864, 0x0000000000000000ULL, { 0x34786BD34726328BULL, 0xACE4F5EA6D9C9A15ULL } }, /* XSUM_XXH128_withSecret_testdata[2864] */\n    { 2865, 0x0000000000000000ULL, { 0x5D8F0CB1295702E6ULL, 0x7C89ED86C6ED7A43ULL } }, /* XSUM_XXH128_withSecret_testdata[2865] */\n    { 2866, 0x0000000000000000ULL, { 0xEB2DA9C9F3DA673EULL, 0xDACD0078A95DEF26ULL } }, /* XSUM_XXH128_withSecret_testdata[2866] */\n    { 2867, 0x0000000000000000ULL, { 0x5CA1165213EF818FULL, 0xC8AE563971462DF3ULL } }, /* XSUM_XXH128_withSecret_testdata[2867] */\n    { 2868, 0x0000000000000000ULL, { 0x93C6848735D05D15ULL, 0xA05EEE84F5055072ULL } }, /* XSUM_XXH128_withSecret_testdata[2868] */\n    { 2869, 0x0000000000000000ULL, { 0x8878647E504E661DULL, 0xFAFDB3BAEB604824ULL } }, /* XSUM_XXH128_withSecret_testdata[2869] */\n    { 2870, 0x0000000000000000ULL, { 0x1D5F1DBEE675B24AULL, 0xE79A5180CB0489AAULL } }, /* XSUM_XXH128_withSecret_testdata[2870] */\n    { 2871, 0x0000000000000000ULL, { 0x115D63E36B0F1FBEULL, 0xF32B582D71696058ULL } }, /* XSUM_XXH128_withSecret_testdata[2871] */\n    { 2872, 0x0000000000000000ULL, { 0x4DF2F24A2E98D962ULL, 0x83C06402DC26488BULL } }, /* XSUM_XXH128_withSecret_testdata[2872] */\n    { 2873, 0x0000000000000000ULL, { 0x3B1E3D0177F4B488ULL, 0xA58F4785F407F7F1ULL } }, /* XSUM_XXH128_withSecret_testdata[2873] */\n    { 2874, 0x0000000000000000ULL, { 0x49658533C6146A5EULL, 0x24A912BFAD823575ULL } }, /* XSUM_XXH128_withSecret_testdata[2874] */\n    { 2875, 0x0000000000000000ULL, { 0xB714BC9FFB355DB7ULL, 0x0F5C04B62C3E0763ULL } }, /* XSUM_XXH128_withSecret_testdata[2875] */\n    { 2876, 0x0000000000000000ULL, { 0x5843138528F6CBD1ULL, 0x48F550495501BBA5ULL } }, /* XSUM_XXH128_withSecret_testdata[2876] */\n    { 2877, 0x0000000000000000ULL, { 0x3493D0BFCFDEE423ULL, 0xA9071EE67A4F88A4ULL } }, /* XSUM_XXH128_withSecret_testdata[2877] */\n    { 2878, 0x0000000000000000ULL, { 0xC6893D3EE31368A3ULL, 0xA0544222F32522BAULL } }, /* XSUM_XXH128_withSecret_testdata[2878] */\n    { 2879, 0x0000000000000000ULL, { 0xB13736A51649E9CFULL, 0x1F618FFEA72FDFB9ULL } }, /* XSUM_XXH128_withSecret_testdata[2879] */\n    { 2880, 0x0000000000000000ULL, { 0xB494AE6C2A905015ULL, 0x4E7123F7C6C38A20ULL } }, /* XSUM_XXH128_withSecret_testdata[2880] */\n    { 2881, 0x0000000000000000ULL, { 0x27177CBAFBC37006ULL, 0x77E1BA94BB2EC1FFULL } }, /* XSUM_XXH128_withSecret_testdata[2881] */\n    { 2882, 0x0000000000000000ULL, { 0x04A94338FE7B046DULL, 0x8C68615BC09E1B17ULL } }, /* XSUM_XXH128_withSecret_testdata[2882] */\n    { 2883, 0x0000000000000000ULL, { 0x97630E06E0DFCEFEULL, 0x3E6217B0A1FF40F8ULL } }, /* XSUM_XXH128_withSecret_testdata[2883] */\n    { 2884, 0x0000000000000000ULL, { 0xFD38D6319F3B28DBULL, 0x379360B0C8718E21ULL } }, /* XSUM_XXH128_withSecret_testdata[2884] */\n    { 2885, 0x0000000000000000ULL, { 0x4EC1A9D59AC9AC98ULL, 0xE102CFED5E51E72DULL } }, /* XSUM_XXH128_withSecret_testdata[2885] */\n    { 2886, 0x0000000000000000ULL, { 0x7710ECE049A1EE47ULL, 0x3B62886AEB531868ULL } }, /* XSUM_XXH128_withSecret_testdata[2886] */\n    { 2887, 0x0000000000000000ULL, { 0x0E87931145CC74DEULL, 0xA088CDC03E780BD5ULL } }, /* XSUM_XXH128_withSecret_testdata[2887] */\n    { 2888, 0x0000000000000000ULL, { 0x79C59FE86B852C41ULL, 0xAE6404152CE20C78ULL } }, /* XSUM_XXH128_withSecret_testdata[2888] */\n    { 2889, 0x0000000000000000ULL, { 0x9FD3DFD399579356ULL, 0x0912745803125460ULL } }, /* XSUM_XXH128_withSecret_testdata[2889] */\n    { 2890, 0x0000000000000000ULL, { 0x34B2D10D4B5421D7ULL, 0x0389DE791FE58305ULL } }, /* XSUM_XXH128_withSecret_testdata[2890] */\n    { 2891, 0x0000000000000000ULL, { 0xD5E4579B474E464EULL, 0xF1ECB25E8BB8E6F4ULL } }, /* XSUM_XXH128_withSecret_testdata[2891] */\n    { 2892, 0x0000000000000000ULL, { 0xF28C6770BFC26AC7ULL, 0x03A5A92B0723F64CULL } }, /* XSUM_XXH128_withSecret_testdata[2892] */\n    { 2893, 0x0000000000000000ULL, { 0xD377046A26F17C89ULL, 0x97E4E413E8DF53C1ULL } }, /* XSUM_XXH128_withSecret_testdata[2893] */\n    { 2894, 0x0000000000000000ULL, { 0xBD7E0363D136E7C8ULL, 0xDF7679B26E24B35BULL } }, /* XSUM_XXH128_withSecret_testdata[2894] */\n    { 2895, 0x0000000000000000ULL, { 0x33A42E350F0D7A95ULL, 0xC0F6C2DDD1150182ULL } }, /* XSUM_XXH128_withSecret_testdata[2895] */\n    { 2896, 0x0000000000000000ULL, { 0x692A55C8A2F34504ULL, 0x347C0EBEFEF05765ULL } }, /* XSUM_XXH128_withSecret_testdata[2896] */\n    { 2897, 0x0000000000000000ULL, { 0x8243CD9917D5888AULL, 0xF9712260862159C0ULL } }, /* XSUM_XXH128_withSecret_testdata[2897] */\n    { 2898, 0x0000000000000000ULL, { 0x85C34825497D544DULL, 0x897943C26B8CFACFULL } }, /* XSUM_XXH128_withSecret_testdata[2898] */\n    { 2899, 0x0000000000000000ULL, { 0x1874C3A72EE520EFULL, 0xFD4FAF815CAC3FC7ULL } }, /* XSUM_XXH128_withSecret_testdata[2899] */\n    { 2900, 0x0000000000000000ULL, { 0x6A2B9EF6A1B82F46ULL, 0x29FC0076A9E99C5FULL } }, /* XSUM_XXH128_withSecret_testdata[2900] */\n    { 2901, 0x0000000000000000ULL, { 0xC1FA8FD25D5522E5ULL, 0x695FC3CD3A0EB9BEULL } }, /* XSUM_XXH128_withSecret_testdata[2901] */\n    { 2902, 0x0000000000000000ULL, { 0xA46AEC4357A6A0A4ULL, 0x5507CD7A00628A73ULL } }, /* XSUM_XXH128_withSecret_testdata[2902] */\n    { 2903, 0x0000000000000000ULL, { 0xA327142A63323D97ULL, 0x623FE423CC1E363DULL } }, /* XSUM_XXH128_withSecret_testdata[2903] */\n    { 2904, 0x0000000000000000ULL, { 0x7F59130823574970ULL, 0xC6AD6A4D973A216DULL } }, /* XSUM_XXH128_withSecret_testdata[2904] */\n    { 2905, 0x0000000000000000ULL, { 0xB7E62F19E6D0FDE6ULL, 0xCD949076DAA6092CULL } }, /* XSUM_XXH128_withSecret_testdata[2905] */\n    { 2906, 0x0000000000000000ULL, { 0x32530270AC8581A2ULL, 0x96CBAAEA4B1DE3FEULL } }, /* XSUM_XXH128_withSecret_testdata[2906] */\n    { 2907, 0x0000000000000000ULL, { 0xEA4C04EFF7300831ULL, 0xF856D98DB90CE71EULL } }, /* XSUM_XXH128_withSecret_testdata[2907] */\n    { 2908, 0x0000000000000000ULL, { 0x3271E6E36689C35CULL, 0xE111362835518243ULL } }, /* XSUM_XXH128_withSecret_testdata[2908] */\n    { 2909, 0x0000000000000000ULL, { 0xD80C86B0A79FB06BULL, 0x3BC052F03EE32D29ULL } }, /* XSUM_XXH128_withSecret_testdata[2909] */\n    { 2910, 0x0000000000000000ULL, { 0x127ACC9F23D3DC82ULL, 0x9E3C79053244A530ULL } }, /* XSUM_XXH128_withSecret_testdata[2910] */\n    { 2911, 0x0000000000000000ULL, { 0x1940C66BF858A647ULL, 0xC20E3422461116FCULL } }, /* XSUM_XXH128_withSecret_testdata[2911] */\n    { 2912, 0x0000000000000000ULL, { 0x9AB8A8D48E03336DULL, 0xE6BDCF30B06CB241ULL } }, /* XSUM_XXH128_withSecret_testdata[2912] */\n    { 2913, 0x0000000000000000ULL, { 0xF55386F445650D8CULL, 0xB3FF0CEC13EF7D72ULL } }, /* XSUM_XXH128_withSecret_testdata[2913] */\n    { 2914, 0x0000000000000000ULL, { 0x30C30B5A9CCBE11FULL, 0x32212639E893B79EULL } }, /* XSUM_XXH128_withSecret_testdata[2914] */\n    { 2915, 0x0000000000000000ULL, { 0xC9BE00FC4AD2E7F4ULL, 0x93782E55A3D67FFEULL } }, /* XSUM_XXH128_withSecret_testdata[2915] */\n    { 2916, 0x0000000000000000ULL, { 0x17CDED5911477A60ULL, 0x9458B9CF12431CE4ULL } }, /* XSUM_XXH128_withSecret_testdata[2916] */\n    { 2917, 0x0000000000000000ULL, { 0xA75B0B9F5608BDD8ULL, 0xBE78590BD81C371CULL } }, /* XSUM_XXH128_withSecret_testdata[2917] */\n    { 2918, 0x0000000000000000ULL, { 0x8D037984687F5942ULL, 0xCABC08FBD412F9BBULL } }, /* XSUM_XXH128_withSecret_testdata[2918] */\n    { 2919, 0x0000000000000000ULL, { 0x2A5D8EEFEF26153CULL, 0xD5985B7F7589B7E5ULL } }, /* XSUM_XXH128_withSecret_testdata[2919] */\n    { 2920, 0x0000000000000000ULL, { 0x2BFAB5944FE9C364ULL, 0x9FD8C24BF6FE5150ULL } }, /* XSUM_XXH128_withSecret_testdata[2920] */\n    { 2921, 0x0000000000000000ULL, { 0x89423403078D740EULL, 0xC9B9FF919E6ED1AAULL } }, /* XSUM_XXH128_withSecret_testdata[2921] */\n    { 2922, 0x0000000000000000ULL, { 0xAC3D0A9B2BD84C8BULL, 0x4B0B8E325D800192ULL } }, /* XSUM_XXH128_withSecret_testdata[2922] */\n    { 2923, 0x0000000000000000ULL, { 0xFCCF992B8EE26854ULL, 0x975603340F7552F9ULL } }, /* XSUM_XXH128_withSecret_testdata[2923] */\n    { 2924, 0x0000000000000000ULL, { 0x1A84D6CD10EAC49EULL, 0xE111D29E78842EF8ULL } }, /* XSUM_XXH128_withSecret_testdata[2924] */\n    { 2925, 0x0000000000000000ULL, { 0xB52E848D2238CC49ULL, 0x7145CCE44ED91D47ULL } }, /* XSUM_XXH128_withSecret_testdata[2925] */\n    { 2926, 0x0000000000000000ULL, { 0x1E657C6CC7390AA9ULL, 0x5DE1A8B53E778CEBULL } }, /* XSUM_XXH128_withSecret_testdata[2926] */\n    { 2927, 0x0000000000000000ULL, { 0xFD04D7D199782140ULL, 0x225D392280CAD8F7ULL } }, /* XSUM_XXH128_withSecret_testdata[2927] */\n    { 2928, 0x0000000000000000ULL, { 0x0D646EDD4EA8E0B5ULL, 0x758C7A51FD785A88ULL } }, /* XSUM_XXH128_withSecret_testdata[2928] */\n    { 2929, 0x0000000000000000ULL, { 0xFA68DF886EEED4BCULL, 0xC7A695E90661D468ULL } }, /* XSUM_XXH128_withSecret_testdata[2929] */\n    { 2930, 0x0000000000000000ULL, { 0xB82D60F9EC312618ULL, 0xED58448E66F8027FULL } }, /* XSUM_XXH128_withSecret_testdata[2930] */\n    { 2931, 0x0000000000000000ULL, { 0x3B745EB2D5C98654ULL, 0x61BAC6ECE4157B86ULL } }, /* XSUM_XXH128_withSecret_testdata[2931] */\n    { 2932, 0x0000000000000000ULL, { 0xB130D4CDF9F55D0AULL, 0xC410E449912CBCE4ULL } }, /* XSUM_XXH128_withSecret_testdata[2932] */\n    { 2933, 0x0000000000000000ULL, { 0xA66A35D31AE1F395ULL, 0xD5511BB694A4F9F0ULL } }, /* XSUM_XXH128_withSecret_testdata[2933] */\n    { 2934, 0x0000000000000000ULL, { 0x9FBB6F77F3A85EBEULL, 0xD2817CBB3F222201ULL } }, /* XSUM_XXH128_withSecret_testdata[2934] */\n    { 2935, 0x0000000000000000ULL, { 0x3C3AA7EE1BB221D1ULL, 0xCB58168C79355D09ULL } }, /* XSUM_XXH128_withSecret_testdata[2935] */\n    { 2936, 0x0000000000000000ULL, { 0xDA79B8AE9B825249ULL, 0x68AAA4747C9D4632ULL } }, /* XSUM_XXH128_withSecret_testdata[2936] */\n    { 2937, 0x0000000000000000ULL, { 0x0FDFEF32A59627A6ULL, 0xE30A76AAF8D4B80BULL } }, /* XSUM_XXH128_withSecret_testdata[2937] */\n    { 2938, 0x0000000000000000ULL, { 0x706F4AF597DBE5A1ULL, 0xBDB95B87111C6E8AULL } }, /* XSUM_XXH128_withSecret_testdata[2938] */\n    { 2939, 0x0000000000000000ULL, { 0xD91F82F858438339ULL, 0xD2D7A74CE8B86169ULL } }, /* XSUM_XXH128_withSecret_testdata[2939] */\n    { 2940, 0x0000000000000000ULL, { 0x86E840A5F08BDC1CULL, 0x8FC2768578FCEC35ULL } }, /* XSUM_XXH128_withSecret_testdata[2940] */\n    { 2941, 0x0000000000000000ULL, { 0xE9BCEA2E8EAE5511ULL, 0x32EC18B57EE488D8ULL } }, /* XSUM_XXH128_withSecret_testdata[2941] */\n    { 2942, 0x0000000000000000ULL, { 0x49482DD0A8A66DFDULL, 0x22933D1BFF50842BULL } }, /* XSUM_XXH128_withSecret_testdata[2942] */\n    { 2943, 0x0000000000000000ULL, { 0x620B9D9636DD8BFEULL, 0xB2CF0BDEC5375675ULL } }, /* XSUM_XXH128_withSecret_testdata[2943] */\n    { 2944, 0x0000000000000000ULL, { 0xBB78B6D00515DC1BULL, 0xE46116D21BD9C87CULL } }, /* XSUM_XXH128_withSecret_testdata[2944] */\n    { 2945, 0x0000000000000000ULL, { 0x47EEEA42E2A9FDB3ULL, 0xBCCA5E21B87F42E9ULL } }, /* XSUM_XXH128_withSecret_testdata[2945] */\n    { 2946, 0x0000000000000000ULL, { 0x11FB56CA0236EE6FULL, 0x00A5A02E296B9BA8ULL } }, /* XSUM_XXH128_withSecret_testdata[2946] */\n    { 2947, 0x0000000000000000ULL, { 0xAD90BD39650625DDULL, 0xD963F7B03CB509E3ULL } }, /* XSUM_XXH128_withSecret_testdata[2947] */\n    { 2948, 0x0000000000000000ULL, { 0x094C3B0244E78655ULL, 0xDFD4866E730995F7ULL } }, /* XSUM_XXH128_withSecret_testdata[2948] */\n    { 2949, 0x0000000000000000ULL, { 0x11231A6A714E2F35ULL, 0x42BF88FA4DB0C0C9ULL } }, /* XSUM_XXH128_withSecret_testdata[2949] */\n    { 2950, 0x0000000000000000ULL, { 0xFEC0654F83BB9C8DULL, 0xC7AA20F5A8A4EC9FULL } }, /* XSUM_XXH128_withSecret_testdata[2950] */\n    { 2951, 0x0000000000000000ULL, { 0x295E1F606E5F54C1ULL, 0x6A2A3E0AEBD5EE97ULL } }, /* XSUM_XXH128_withSecret_testdata[2951] */\n    { 2952, 0x0000000000000000ULL, { 0x0FB5E42BE9E6E710ULL, 0x593917197BCC5ADCULL } }, /* XSUM_XXH128_withSecret_testdata[2952] */\n    { 2953, 0x0000000000000000ULL, { 0xC41F6CC6D803B236ULL, 0xA9871CCE5FAEEFE1ULL } }, /* XSUM_XXH128_withSecret_testdata[2953] */\n    { 2954, 0x0000000000000000ULL, { 0xDA4D34D846086CC2ULL, 0xD2C4F599405FDF28ULL } }, /* XSUM_XXH128_withSecret_testdata[2954] */\n    { 2955, 0x0000000000000000ULL, { 0xB2B2C9CA61D494E1ULL, 0xDC60CC615AA095DEULL } }, /* XSUM_XXH128_withSecret_testdata[2955] */\n    { 2956, 0x0000000000000000ULL, { 0x82F0178E124F477CULL, 0x93EFE09338DDF453ULL } }, /* XSUM_XXH128_withSecret_testdata[2956] */\n    { 2957, 0x0000000000000000ULL, { 0x3FE22F0919C3D383ULL, 0x66AEDD347258FBEAULL } }, /* XSUM_XXH128_withSecret_testdata[2957] */\n    { 2958, 0x0000000000000000ULL, { 0x781120F2D102450DULL, 0x8A25640B0F0FDF0FULL } }, /* XSUM_XXH128_withSecret_testdata[2958] */\n    { 2959, 0x0000000000000000ULL, { 0x4581B8E8BA4B8E15ULL, 0x29F4C5621B26B30DULL } }, /* XSUM_XXH128_withSecret_testdata[2959] */\n    { 2960, 0x0000000000000000ULL, { 0x5EF8BC6F614A1E38ULL, 0x7D5447B22A978BFFULL } }, /* XSUM_XXH128_withSecret_testdata[2960] */\n    { 2961, 0x0000000000000000ULL, { 0x5584A7DA5704B8A5ULL, 0x02930EA7FF3DC485ULL } }, /* XSUM_XXH128_withSecret_testdata[2961] */\n    { 2962, 0x0000000000000000ULL, { 0x410E213C34BED8DAULL, 0x5E7570F3217B7B71ULL } }, /* XSUM_XXH128_withSecret_testdata[2962] */\n    { 2963, 0x0000000000000000ULL, { 0x3C06473A20355DF1ULL, 0x34AFDC7B3E28A78AULL } }, /* XSUM_XXH128_withSecret_testdata[2963] */\n    { 2964, 0x0000000000000000ULL, { 0x46A4D368431E6F27ULL, 0x1B30EE5D7FF35A18ULL } }, /* XSUM_XXH128_withSecret_testdata[2964] */\n    { 2965, 0x0000000000000000ULL, { 0x0DAC2A7183236D55ULL, 0x2B314CE9FAADCBD0ULL } }, /* XSUM_XXH128_withSecret_testdata[2965] */\n    { 2966, 0x0000000000000000ULL, { 0x84E0448ECF502BD7ULL, 0x6629CB497EDFD10DULL } }, /* XSUM_XXH128_withSecret_testdata[2966] */\n    { 2967, 0x0000000000000000ULL, { 0x3E3B324F1D7A67C0ULL, 0xFA4652E5EE83C7A7ULL } }, /* XSUM_XXH128_withSecret_testdata[2967] */\n    { 2968, 0x0000000000000000ULL, { 0x752D76BA546789B5ULL, 0xA06669C33BA99877ULL } }, /* XSUM_XXH128_withSecret_testdata[2968] */\n    { 2969, 0x0000000000000000ULL, { 0x6AF4416ADA64A6E8ULL, 0x09A10D8B79EE68A9ULL } }, /* XSUM_XXH128_withSecret_testdata[2969] */\n    { 2970, 0x0000000000000000ULL, { 0xE51908F69CE5CB3CULL, 0xB7BD6D63B43ABFDCULL } }, /* XSUM_XXH128_withSecret_testdata[2970] */\n    { 2971, 0x0000000000000000ULL, { 0x07840A67B1220907ULL, 0x285B56C604BBB2FEULL } }, /* XSUM_XXH128_withSecret_testdata[2971] */\n    { 2972, 0x0000000000000000ULL, { 0x9726EC41E319AE79ULL, 0x841AE62BA4651003ULL } }, /* XSUM_XXH128_withSecret_testdata[2972] */\n    { 2973, 0x0000000000000000ULL, { 0xB5AA05B6E09E6D52ULL, 0xAB6F24204E18D1B2ULL } }, /* XSUM_XXH128_withSecret_testdata[2973] */\n    { 2974, 0x0000000000000000ULL, { 0xDEE4714EFE0D7D19ULL, 0xD316A184301F4E43ULL } }, /* XSUM_XXH128_withSecret_testdata[2974] */\n    { 2975, 0x0000000000000000ULL, { 0x8683B9609AD2BAD8ULL, 0x7E071D0D4B5259F4ULL } }, /* XSUM_XXH128_withSecret_testdata[2975] */\n    { 2976, 0x0000000000000000ULL, { 0xE597E8277DB17FEEULL, 0x67B4E6CE07ED61E4ULL } }, /* XSUM_XXH128_withSecret_testdata[2976] */\n    { 2977, 0x0000000000000000ULL, { 0x8B9B29ACB557BFDFULL, 0x1D53E43945C0CCA8ULL } }, /* XSUM_XXH128_withSecret_testdata[2977] */\n    { 2978, 0x0000000000000000ULL, { 0x6E5FD99A3502572CULL, 0x29A082B3C24523BEULL } }, /* XSUM_XXH128_withSecret_testdata[2978] */\n    { 2979, 0x0000000000000000ULL, { 0x5A98A81AF673BA24ULL, 0x11DB4DE8A933CE38ULL } }, /* XSUM_XXH128_withSecret_testdata[2979] */\n    { 2980, 0x0000000000000000ULL, { 0x63F598A7EA196E5CULL, 0x0B16F1B590472799ULL } }, /* XSUM_XXH128_withSecret_testdata[2980] */\n    { 2981, 0x0000000000000000ULL, { 0x4313CB47CA9D3AE4ULL, 0xBB0C2418AF1CFA3FULL } }, /* XSUM_XXH128_withSecret_testdata[2981] */\n    { 2982, 0x0000000000000000ULL, { 0x7218A7ABC1937665ULL, 0xA615D56725ED7A77ULL } }, /* XSUM_XXH128_withSecret_testdata[2982] */\n    { 2983, 0x0000000000000000ULL, { 0xF156732278FFF3CFULL, 0x141D72505D747FB6ULL } }, /* XSUM_XXH128_withSecret_testdata[2983] */\n    { 2984, 0x0000000000000000ULL, { 0xF7CC0418DC1C114BULL, 0xA6E4A2C5BE30FDCDULL } }, /* XSUM_XXH128_withSecret_testdata[2984] */\n    { 2985, 0x0000000000000000ULL, { 0x0E0CA08644DD54C2ULL, 0x8FCA55D6A08154C9ULL } }, /* XSUM_XXH128_withSecret_testdata[2985] */\n    { 2986, 0x0000000000000000ULL, { 0xAA74DEDCB1A81017ULL, 0x9EB93E52AA0D9A06ULL } }, /* XSUM_XXH128_withSecret_testdata[2986] */\n    { 2987, 0x0000000000000000ULL, { 0xF255D515D5E9EB26ULL, 0x89FDDDB988C09719ULL } }, /* XSUM_XXH128_withSecret_testdata[2987] */\n    { 2988, 0x0000000000000000ULL, { 0x542F350CDA095756ULL, 0x287B1B213CA1838CULL } }, /* XSUM_XXH128_withSecret_testdata[2988] */\n    { 2989, 0x0000000000000000ULL, { 0x7BDDF1C94E03824FULL, 0x975342BFF057BFA2ULL } }, /* XSUM_XXH128_withSecret_testdata[2989] */\n    { 2990, 0x0000000000000000ULL, { 0x9AE455D15AABC880ULL, 0x846C6A7C95A5CFA5ULL } }, /* XSUM_XXH128_withSecret_testdata[2990] */\n    { 2991, 0x0000000000000000ULL, { 0x33AB3BE4A89D3625ULL, 0x1806651E4B11A0B4ULL } }, /* XSUM_XXH128_withSecret_testdata[2991] */\n    { 2992, 0x0000000000000000ULL, { 0x6C63E6CF94383962ULL, 0xBAC3CBD7BA57D9B5ULL } }, /* XSUM_XXH128_withSecret_testdata[2992] */\n    { 2993, 0x0000000000000000ULL, { 0x8EDCD05B919EE191ULL, 0xEDC94F02B4F079FBULL } }, /* XSUM_XXH128_withSecret_testdata[2993] */\n    { 2994, 0x0000000000000000ULL, { 0xF67E7C8B2C9A4669ULL, 0xA974160CB86B7B92ULL } }, /* XSUM_XXH128_withSecret_testdata[2994] */\n    { 2995, 0x0000000000000000ULL, { 0x39E4266FFC536EB8ULL, 0x52399BE0CD8C3B46ULL } }, /* XSUM_XXH128_withSecret_testdata[2995] */\n    { 2996, 0x0000000000000000ULL, { 0x829ACE387570537AULL, 0xE0686A7ED23863A6ULL } }, /* XSUM_XXH128_withSecret_testdata[2996] */\n    { 2997, 0x0000000000000000ULL, { 0xDCFD4A34A8E6BD26ULL, 0xB239F0035E57AF90ULL } }, /* XSUM_XXH128_withSecret_testdata[2997] */\n    { 2998, 0x0000000000000000ULL, { 0xEE34D3DCA438A74FULL, 0x5753FDE4914B7A9BULL } }, /* XSUM_XXH128_withSecret_testdata[2998] */\n    { 2999, 0x0000000000000000ULL, { 0x060D44F7CDD5904EULL, 0xEF0C13A3A8A50EA4ULL } }, /* XSUM_XXH128_withSecret_testdata[2999] */\n    { 3000, 0x0000000000000000ULL, { 0x1250C48602594CBEULL, 0xE32402D864067C66ULL } }, /* XSUM_XXH128_withSecret_testdata[3000] */\n    { 3001, 0x0000000000000000ULL, { 0x75B1B05BD9768D80ULL, 0x1D0780B56A55EC06ULL } }, /* XSUM_XXH128_withSecret_testdata[3001] */\n    { 3002, 0x0000000000000000ULL, { 0x8E1D4A3E93349F6AULL, 0x87A8CB888B2949A2ULL } }, /* XSUM_XXH128_withSecret_testdata[3002] */\n    { 3003, 0x0000000000000000ULL, { 0x317D33B5C2F3B1DFULL, 0xC8DC443B3821037EULL } }, /* XSUM_XXH128_withSecret_testdata[3003] */\n    { 3004, 0x0000000000000000ULL, { 0xFD4650A34245B96EULL, 0x5E6879056903F236ULL } }, /* XSUM_XXH128_withSecret_testdata[3004] */\n    { 3005, 0x0000000000000000ULL, { 0x08BAA1559B83D5EBULL, 0xFA07FA674281FFE6ULL } }, /* XSUM_XXH128_withSecret_testdata[3005] */\n    { 3006, 0x0000000000000000ULL, { 0xBF782E901A3A9A8DULL, 0xEF40659EE39AB105ULL } }, /* XSUM_XXH128_withSecret_testdata[3006] */\n    { 3007, 0x0000000000000000ULL, { 0xC5931ED0ABC4D964ULL, 0x2D0FBE025210507FULL } }, /* XSUM_XXH128_withSecret_testdata[3007] */\n    { 3008, 0x0000000000000000ULL, { 0x0BF450B3BF31E586ULL, 0x98E06D11FADF46C6ULL } }, /* XSUM_XXH128_withSecret_testdata[3008] */\n    { 3009, 0x0000000000000000ULL, { 0x4DBE698BD5B96DA0ULL, 0x84CC18798691EA23ULL } }, /* XSUM_XXH128_withSecret_testdata[3009] */\n    { 3010, 0x0000000000000000ULL, { 0x3E241D5756D85033ULL, 0xC7C2E0D480C50E47ULL } }, /* XSUM_XXH128_withSecret_testdata[3010] */\n    { 3011, 0x0000000000000000ULL, { 0xD8D8FCB6AD17DB65ULL, 0x09342E0BCF49DCA6ULL } }, /* XSUM_XXH128_withSecret_testdata[3011] */\n    { 3012, 0x0000000000000000ULL, { 0x979038EEB6FDBB23ULL, 0x12654886AD2BAED5ULL } }, /* XSUM_XXH128_withSecret_testdata[3012] */\n    { 3013, 0x0000000000000000ULL, { 0x17C29623ACB086D2ULL, 0x1269850B4B37DD84ULL } }, /* XSUM_XXH128_withSecret_testdata[3013] */\n    { 3014, 0x0000000000000000ULL, { 0x3398BF7A94E8965EULL, 0x01F374FDA615B592ULL } }, /* XSUM_XXH128_withSecret_testdata[3014] */\n    { 3015, 0x0000000000000000ULL, { 0x0AD193A4EA7A18E5ULL, 0x4049975CEA370633ULL } }, /* XSUM_XXH128_withSecret_testdata[3015] */\n    { 3016, 0x0000000000000000ULL, { 0xF209082DA597AD24ULL, 0x7B30C5A979CFB88FULL } }, /* XSUM_XXH128_withSecret_testdata[3016] */\n    { 3017, 0x0000000000000000ULL, { 0x8AAD1032243F99E4ULL, 0x3FDEE09A9A2C2A9AULL } }, /* XSUM_XXH128_withSecret_testdata[3017] */\n    { 3018, 0x0000000000000000ULL, { 0xA94CDBDACDF7A210ULL, 0x960E5D3F0B0D2F33ULL } }, /* XSUM_XXH128_withSecret_testdata[3018] */\n    { 3019, 0x0000000000000000ULL, { 0x6B62D320328C5AE1ULL, 0x48C678A550147CE3ULL } }, /* XSUM_XXH128_withSecret_testdata[3019] */\n    { 3020, 0x0000000000000000ULL, { 0xDA5E557F5E28DB8AULL, 0x6A6AF9A3B21AA38FULL } }, /* XSUM_XXH128_withSecret_testdata[3020] */\n    { 3021, 0x0000000000000000ULL, { 0xDAF472C7EAA50F9DULL, 0x8CE00429A969019DULL } }, /* XSUM_XXH128_withSecret_testdata[3021] */\n    { 3022, 0x0000000000000000ULL, { 0xEF7DC5BDD4EFB484ULL, 0x8AC97E660C6EE823ULL } }, /* XSUM_XXH128_withSecret_testdata[3022] */\n    { 3023, 0x0000000000000000ULL, { 0x4273AEBD8F95C306ULL, 0xA9A6F5F1150AE0C5ULL } }, /* XSUM_XXH128_withSecret_testdata[3023] */\n    { 3024, 0x0000000000000000ULL, { 0xE3535E7338CA8698ULL, 0xD6FF32BB3179E104ULL } }, /* XSUM_XXH128_withSecret_testdata[3024] */\n    { 3025, 0x0000000000000000ULL, { 0x6CD575AD5ED07DA4ULL, 0xCD9E1D3DDCF9F81AULL } }, /* XSUM_XXH128_withSecret_testdata[3025] */\n    { 3026, 0x0000000000000000ULL, { 0x29276AE02486AD00ULL, 0x7AD0A9CD2A307E23ULL } }, /* XSUM_XXH128_withSecret_testdata[3026] */\n    { 3027, 0x0000000000000000ULL, { 0xA0B5CE2365382D03ULL, 0x23DCEC3B5E281442ULL } }, /* XSUM_XXH128_withSecret_testdata[3027] */\n    { 3028, 0x0000000000000000ULL, { 0x410F0E6B726FCDEBULL, 0x2E1F86167D193DE4ULL } }, /* XSUM_XXH128_withSecret_testdata[3028] */\n    { 3029, 0x0000000000000000ULL, { 0xA62AC30207B7C447ULL, 0x3417D3B8938ED958ULL } }, /* XSUM_XXH128_withSecret_testdata[3029] */\n    { 3030, 0x0000000000000000ULL, { 0x92DACCF62A620D30ULL, 0xA72B7E11D3A4FFFDULL } }, /* XSUM_XXH128_withSecret_testdata[3030] */\n    { 3031, 0x0000000000000000ULL, { 0x6ABF0B99521E0E9DULL, 0xE657BAF6AF1BDECCULL } }, /* XSUM_XXH128_withSecret_testdata[3031] */\n    { 3032, 0x0000000000000000ULL, { 0x3B0CD98E1372D43CULL, 0xC5AD86A74006328CULL } }, /* XSUM_XXH128_withSecret_testdata[3032] */\n    { 3033, 0x0000000000000000ULL, { 0x01E2872E1C17BDA7ULL, 0x0A8A27429C3A7125ULL } }, /* XSUM_XXH128_withSecret_testdata[3033] */\n    { 3034, 0x0000000000000000ULL, { 0x2D9E2633E53DB16CULL, 0x5F440C34722C5017ULL } }, /* XSUM_XXH128_withSecret_testdata[3034] */\n    { 3035, 0x0000000000000000ULL, { 0x368DD48533B9F31DULL, 0x7BF8DCA08595A2D6ULL } }, /* XSUM_XXH128_withSecret_testdata[3035] */\n    { 3036, 0x0000000000000000ULL, { 0x4F2E1EE3DDA45EE4ULL, 0x040297293CFD5524ULL } }, /* XSUM_XXH128_withSecret_testdata[3036] */\n    { 3037, 0x0000000000000000ULL, { 0x30FF66799DA36614ULL, 0x5414D8CE3887F39BULL } }, /* XSUM_XXH128_withSecret_testdata[3037] */\n    { 3038, 0x0000000000000000ULL, { 0x4AAFC20716828FF3ULL, 0x5CC78A7172ADB465ULL } }, /* XSUM_XXH128_withSecret_testdata[3038] */\n    { 3039, 0x0000000000000000ULL, { 0xF226B8DD54DA35E7ULL, 0x5613B07800D7DD40ULL } }, /* XSUM_XXH128_withSecret_testdata[3039] */\n    { 3040, 0x0000000000000000ULL, { 0x6C1A227605D08804ULL, 0xD45EB75674508CCDULL } }, /* XSUM_XXH128_withSecret_testdata[3040] */\n    { 3041, 0x0000000000000000ULL, { 0x4ED822AEF5847837ULL, 0x60FD5B24797503E6ULL } }, /* XSUM_XXH128_withSecret_testdata[3041] */\n    { 3042, 0x0000000000000000ULL, { 0x883B36AA1CD505BFULL, 0x9AA3CA20E960050DULL } }, /* XSUM_XXH128_withSecret_testdata[3042] */\n    { 3043, 0x0000000000000000ULL, { 0x058963E8D54F90BEULL, 0x02075FA73293C794ULL } }, /* XSUM_XXH128_withSecret_testdata[3043] */\n    { 3044, 0x0000000000000000ULL, { 0x9C29F0D4C28B90C7ULL, 0xF0FBEB809D32ADD5ULL } }, /* XSUM_XXH128_withSecret_testdata[3044] */\n    { 3045, 0x0000000000000000ULL, { 0x5FD9A0A4209B6F90ULL, 0x61EC3989FB23F98FULL } }, /* XSUM_XXH128_withSecret_testdata[3045] */\n    { 3046, 0x0000000000000000ULL, { 0xF3E49B5D7B049C5EULL, 0x664701531394C5CEULL } }, /* XSUM_XXH128_withSecret_testdata[3046] */\n    { 3047, 0x0000000000000000ULL, { 0x98E9345AFA285850ULL, 0x0965F478580E6CAEULL } }, /* XSUM_XXH128_withSecret_testdata[3047] */\n    { 3048, 0x0000000000000000ULL, { 0x8D1129C3B9E67388ULL, 0x22E916EFBC474920ULL } }, /* XSUM_XXH128_withSecret_testdata[3048] */\n    { 3049, 0x0000000000000000ULL, { 0x855BB6F44F6A85F3ULL, 0x0498AC67DDCC500BULL } }, /* XSUM_XXH128_withSecret_testdata[3049] */\n    { 3050, 0x0000000000000000ULL, { 0x9D78F527CAC4A3AEULL, 0xE9F179D35FE2A243ULL } }, /* XSUM_XXH128_withSecret_testdata[3050] */\n    { 3051, 0x0000000000000000ULL, { 0xDE61E8DA3F4D75FCULL, 0xB3562B79A94FB37BULL } }, /* XSUM_XXH128_withSecret_testdata[3051] */\n    { 3052, 0x0000000000000000ULL, { 0x1AD45D5B6AB5D872ULL, 0x69298CD44F055768ULL } }, /* XSUM_XXH128_withSecret_testdata[3052] */\n    { 3053, 0x0000000000000000ULL, { 0xE3F249B6B96D76D4ULL, 0xF5D363383E481A57ULL } }, /* XSUM_XXH128_withSecret_testdata[3053] */\n    { 3054, 0x0000000000000000ULL, { 0x79C8D995A0685F8BULL, 0x6D8298807D8F6BAEULL } }, /* XSUM_XXH128_withSecret_testdata[3054] */\n    { 3055, 0x0000000000000000ULL, { 0x68D85EAB36CB3870ULL, 0xB903AE4A241DD738ULL } }, /* XSUM_XXH128_withSecret_testdata[3055] */\n    { 3056, 0x0000000000000000ULL, { 0x853590CBE8F7C06EULL, 0x926D0FF629E2F718ULL } }, /* XSUM_XXH128_withSecret_testdata[3056] */\n    { 3057, 0x0000000000000000ULL, { 0xB19AD049A7D460D3ULL, 0x3D4E4298D08E660DULL } }, /* XSUM_XXH128_withSecret_testdata[3057] */\n    { 3058, 0x0000000000000000ULL, { 0x4545D3E37516E8CBULL, 0x1EE35AD054F2284AULL } }, /* XSUM_XXH128_withSecret_testdata[3058] */\n    { 3059, 0x0000000000000000ULL, { 0x0B73B87EF4753050ULL, 0x7AF2D2DE003CA400ULL } }, /* XSUM_XXH128_withSecret_testdata[3059] */\n    { 3060, 0x0000000000000000ULL, { 0x4280EBDF257E215BULL, 0x5D22B23507AA23EFULL } }, /* XSUM_XXH128_withSecret_testdata[3060] */\n    { 3061, 0x0000000000000000ULL, { 0x5ED37552FE3E09FFULL, 0x6034D6130547723FULL } }, /* XSUM_XXH128_withSecret_testdata[3061] */\n    { 3062, 0x0000000000000000ULL, { 0x3CEEB6B4D7839EF2ULL, 0x7D7D5622CF61B9BBULL } }, /* XSUM_XXH128_withSecret_testdata[3062] */\n    { 3063, 0x0000000000000000ULL, { 0x9D74B7565FB68879ULL, 0xE5A826DBEF55F292ULL } }, /* XSUM_XXH128_withSecret_testdata[3063] */\n    { 3064, 0x0000000000000000ULL, { 0xBCC97275F418532BULL, 0xD8BE53038E7A1333ULL } }, /* XSUM_XXH128_withSecret_testdata[3064] */\n    { 3065, 0x0000000000000000ULL, { 0x9286EE8B29B7D677ULL, 0x41D9BC4A63C32A12ULL } }, /* XSUM_XXH128_withSecret_testdata[3065] */\n    { 3066, 0x0000000000000000ULL, { 0x2D301FDD114930D5ULL, 0x8CCBA5DC9DE4D8DBULL } }, /* XSUM_XXH128_withSecret_testdata[3066] */\n    { 3067, 0x0000000000000000ULL, { 0xF4A5F0BA1AD09DFFULL, 0x2EFCB5671D691C8BULL } }, /* XSUM_XXH128_withSecret_testdata[3067] */\n    { 3068, 0x0000000000000000ULL, { 0x2445BA11D91914DAULL, 0xC7A07BED2235EB7AULL } }, /* XSUM_XXH128_withSecret_testdata[3068] */\n    { 3069, 0x0000000000000000ULL, { 0xDB217281B4AC796DULL, 0x1D7B77AD7447CC01ULL } }, /* XSUM_XXH128_withSecret_testdata[3069] */\n    { 3070, 0x0000000000000000ULL, { 0x535E96FDD327B705ULL, 0xB461D2D4E58C67D7ULL } }, /* XSUM_XXH128_withSecret_testdata[3070] */\n    { 3071, 0x0000000000000000ULL, { 0x8B57904DB74393D5ULL, 0xBF4BD9205DA09DD1ULL } }, /* XSUM_XXH128_withSecret_testdata[3071] */\n    { 3072, 0x0000000000000000ULL, { 0xF5A0D758BA06FCFEULL, 0x36E9283B5A0EE016ULL } }, /* XSUM_XXH128_withSecret_testdata[3072] */\n    { 3073, 0x0000000000000000ULL, { 0x70C7020C10282027ULL, 0xF69E224B153303ABULL } }, /* XSUM_XXH128_withSecret_testdata[3073] */\n    { 3074, 0x0000000000000000ULL, { 0xFC72B1DF46FB974CULL, 0x3C766B9DE37A7120ULL } }, /* XSUM_XXH128_withSecret_testdata[3074] */\n    { 3075, 0x0000000000000000ULL, { 0x9C7919FFA900C172ULL, 0x449D427939BF2D41ULL } }, /* XSUM_XXH128_withSecret_testdata[3075] */\n    { 3076, 0x0000000000000000ULL, { 0xB37179BE95C6DA2CULL, 0xB975A26CD6D2B9A2ULL } }, /* XSUM_XXH128_withSecret_testdata[3076] */\n    { 3077, 0x0000000000000000ULL, { 0xB2F096B36193A13AULL, 0xBBA307E106AC3A17ULL } }, /* XSUM_XXH128_withSecret_testdata[3077] */\n    { 3078, 0x0000000000000000ULL, { 0xFE2E4C5796FEEF55ULL, 0xBF8950DDCC5CA94CULL } }, /* XSUM_XXH128_withSecret_testdata[3078] */\n    { 3079, 0x0000000000000000ULL, { 0xFA51B9C142426A7CULL, 0xA548B9DB545DBF89ULL } }, /* XSUM_XXH128_withSecret_testdata[3079] */\n    { 3080, 0x0000000000000000ULL, { 0x8DC4F7C6C8E1141FULL, 0x8A13794EC16D46A1ULL } }, /* XSUM_XXH128_withSecret_testdata[3080] */\n    { 3081, 0x0000000000000000ULL, { 0x9FBE21513A0281D6ULL, 0xB921AC3ECBDF8605ULL } }, /* XSUM_XXH128_withSecret_testdata[3081] */\n    { 3082, 0x0000000000000000ULL, { 0x46D73042AF729452ULL, 0x8838CAACE6E9817CULL } }, /* XSUM_XXH128_withSecret_testdata[3082] */\n    { 3083, 0x0000000000000000ULL, { 0x8E50D0A1EB4555D7ULL, 0x5EC234788A104BBDULL } }, /* XSUM_XXH128_withSecret_testdata[3083] */\n    { 3084, 0x0000000000000000ULL, { 0x9C60BF2B5F53C3A8ULL, 0xD10D93891988EA0FULL } }, /* XSUM_XXH128_withSecret_testdata[3084] */\n    { 3085, 0x0000000000000000ULL, { 0xACFB0D25BE2473E4ULL, 0x7F3B3A62F18BED86ULL } }, /* XSUM_XXH128_withSecret_testdata[3085] */\n    { 3086, 0x0000000000000000ULL, { 0x68F68D81C62DDDFAULL, 0x40BF8546B85051FFULL } }, /* XSUM_XXH128_withSecret_testdata[3086] */\n    { 3087, 0x0000000000000000ULL, { 0xA021287FC6E85E87ULL, 0xB7BACB354948917EULL } }, /* XSUM_XXH128_withSecret_testdata[3087] */\n    { 3088, 0x0000000000000000ULL, { 0x9722CD9C66A0C16AULL, 0x92784951D193C861ULL } }, /* XSUM_XXH128_withSecret_testdata[3088] */\n    { 3089, 0x0000000000000000ULL, { 0x43F580D2A0F20E3CULL, 0x577831CF7B822585ULL } }, /* XSUM_XXH128_withSecret_testdata[3089] */\n    { 3090, 0x0000000000000000ULL, { 0x5E45E938F19764A3ULL, 0xF03D6B9B307259D5ULL } }, /* XSUM_XXH128_withSecret_testdata[3090] */\n    { 3091, 0x0000000000000000ULL, { 0xFDDEABFF7F3808E6ULL, 0xFC07EFA1D902A150ULL } }, /* XSUM_XXH128_withSecret_testdata[3091] */\n    { 3092, 0x0000000000000000ULL, { 0xA2D965DB999F4B59ULL, 0xB87BC6E8DB5B3AFDULL } }, /* XSUM_XXH128_withSecret_testdata[3092] */\n    { 3093, 0x0000000000000000ULL, { 0x7E75B21D76D4D7D3ULL, 0xCAF4B859BE74B054ULL } }, /* XSUM_XXH128_withSecret_testdata[3093] */\n    { 3094, 0x0000000000000000ULL, { 0xE28496279A4E4CCFULL, 0x63BF30E3926DC3D7ULL } }, /* XSUM_XXH128_withSecret_testdata[3094] */\n    { 3095, 0x0000000000000000ULL, { 0xFA9EAC5C07C0D47BULL, 0x23A44CAB7075335EULL } }, /* XSUM_XXH128_withSecret_testdata[3095] */\n    { 3096, 0x0000000000000000ULL, { 0xF5DCB369B6A947E1ULL, 0x9239BFB2A1A67DCBULL } }, /* XSUM_XXH128_withSecret_testdata[3096] */\n    { 3097, 0x0000000000000000ULL, { 0x55213D013BB9F51AULL, 0xCB4FC1BC977378D7ULL } }, /* XSUM_XXH128_withSecret_testdata[3097] */\n    { 3098, 0x0000000000000000ULL, { 0xB09E9866DDD82727ULL, 0x192AC0E2E3364D27ULL } }, /* XSUM_XXH128_withSecret_testdata[3098] */\n    { 3099, 0x0000000000000000ULL, { 0xA4068525FE5AD786ULL, 0xC989A56F9AC0D23FULL } }, /* XSUM_XXH128_withSecret_testdata[3099] */\n    { 3100, 0x0000000000000000ULL, { 0x5769EBD2B8848612ULL, 0xD03195C9E4341712ULL } }, /* XSUM_XXH128_withSecret_testdata[3100] */\n    { 3101, 0x0000000000000000ULL, { 0x593AA572515D7990ULL, 0xF738E6DAD7226449ULL } }, /* XSUM_XXH128_withSecret_testdata[3101] */\n    { 3102, 0x0000000000000000ULL, { 0x8895097FFF3EAFBBULL, 0xA7D38039AA6B12EFULL } }, /* XSUM_XXH128_withSecret_testdata[3102] */\n    { 3103, 0x0000000000000000ULL, { 0x4545E80628795066ULL, 0xF5B8C4D06CE1D640ULL } }, /* XSUM_XXH128_withSecret_testdata[3103] */\n    { 3104, 0x0000000000000000ULL, { 0xE2D95816794AF1C5ULL, 0x15C25962DEE3CC2AULL } }, /* XSUM_XXH128_withSecret_testdata[3104] */\n    { 3105, 0x0000000000000000ULL, { 0x0A8B6B98242FD79DULL, 0x9E105E26D33E0927ULL } }, /* XSUM_XXH128_withSecret_testdata[3105] */\n    { 3106, 0x0000000000000000ULL, { 0xE8F63F15B49ADBDEULL, 0xD7F052CA55405CE1ULL } }, /* XSUM_XXH128_withSecret_testdata[3106] */\n    { 3107, 0x0000000000000000ULL, { 0xD305410E5F630498ULL, 0xA1155662D364CCCCULL } }, /* XSUM_XXH128_withSecret_testdata[3107] */\n    { 3108, 0x0000000000000000ULL, { 0x8D7C9A3E9593CE00ULL, 0xED18A117B6CAAE4DULL } }, /* XSUM_XXH128_withSecret_testdata[3108] */\n    { 3109, 0x0000000000000000ULL, { 0x2BC9BB427B8B5CF2ULL, 0x3BCC36C62D118107ULL } }, /* XSUM_XXH128_withSecret_testdata[3109] */\n    { 3110, 0x0000000000000000ULL, { 0x3DC4AA81C295CDCCULL, 0x0D89169F82EBD8D3ULL } }, /* XSUM_XXH128_withSecret_testdata[3110] */\n    { 3111, 0x0000000000000000ULL, { 0x6B87FC5DDBDEE26AULL, 0x00F8CB070D512C9DULL } }, /* XSUM_XXH128_withSecret_testdata[3111] */\n    { 3112, 0x0000000000000000ULL, { 0xCA452A60E351B246ULL, 0x4363D98AA2CD212BULL } }, /* XSUM_XXH128_withSecret_testdata[3112] */\n    { 3113, 0x0000000000000000ULL, { 0x9828C09D21790437ULL, 0x2CF9A3E1AB040C15ULL } }, /* XSUM_XXH128_withSecret_testdata[3113] */\n    { 3114, 0x0000000000000000ULL, { 0xBC7702DBF295E1F2ULL, 0x02A5CB6E17898AA3ULL } }, /* XSUM_XXH128_withSecret_testdata[3114] */\n    { 3115, 0x0000000000000000ULL, { 0x24816B508733E6BFULL, 0x5A64940084F7F1EDULL } }, /* XSUM_XXH128_withSecret_testdata[3115] */\n    { 3116, 0x0000000000000000ULL, { 0xEED74289728E004FULL, 0x916532902A02698DULL } }, /* XSUM_XXH128_withSecret_testdata[3116] */\n    { 3117, 0x0000000000000000ULL, { 0xBD07A4B465E0B215ULL, 0xBECEE25066E65BEDULL } }, /* XSUM_XXH128_withSecret_testdata[3117] */\n    { 3118, 0x0000000000000000ULL, { 0x85303ACEDDA3E876ULL, 0x0D2D78445F814E7CULL } }, /* XSUM_XXH128_withSecret_testdata[3118] */\n    { 3119, 0x0000000000000000ULL, { 0x950EE5D649E02718ULL, 0x098E9D910EB69CECULL } }, /* XSUM_XXH128_withSecret_testdata[3119] */\n    { 3120, 0x0000000000000000ULL, { 0x44E13EB803569F36ULL, 0x505564597FC978FDULL } }, /* XSUM_XXH128_withSecret_testdata[3120] */\n    { 3121, 0x0000000000000000ULL, { 0x9052958C5F1AB505ULL, 0xC9E7F55BCF6AAB1DULL } }, /* XSUM_XXH128_withSecret_testdata[3121] */\n    { 3122, 0x0000000000000000ULL, { 0xADFCDB64C1F35FF1ULL, 0x4B28D6C18745FFE2ULL } }, /* XSUM_XXH128_withSecret_testdata[3122] */\n    { 3123, 0x0000000000000000ULL, { 0xC3A8337A16A60E97ULL, 0xE9D5A4EDAED972E9ULL } }, /* XSUM_XXH128_withSecret_testdata[3123] */\n    { 3124, 0x0000000000000000ULL, { 0xCB8A6BDF5CAB2CB6ULL, 0xE0EF410FF8EBE4DCULL } }, /* XSUM_XXH128_withSecret_testdata[3124] */\n    { 3125, 0x0000000000000000ULL, { 0x14701532B3149D63ULL, 0x7C336116FA0D34EDULL } }, /* XSUM_XXH128_withSecret_testdata[3125] */\n    { 3126, 0x0000000000000000ULL, { 0xAD4936262BFB674DULL, 0xB2DD184AFCD873DCULL } }, /* XSUM_XXH128_withSecret_testdata[3126] */\n    { 3127, 0x0000000000000000ULL, { 0xCB4435C89BEE4D6DULL, 0x9DFB4365150099ADULL } }, /* XSUM_XXH128_withSecret_testdata[3127] */\n    { 3128, 0x0000000000000000ULL, { 0x319772CA8C513FC3ULL, 0x85D0E84EFEF26D24ULL } }, /* XSUM_XXH128_withSecret_testdata[3128] */\n    { 3129, 0x0000000000000000ULL, { 0xB14F6E0D24FB425AULL, 0x53B14391FC11551CULL } }, /* XSUM_XXH128_withSecret_testdata[3129] */\n    { 3130, 0x0000000000000000ULL, { 0xD8C42EABA81D5D74ULL, 0x0B1D6667D8155B1AULL } }, /* XSUM_XXH128_withSecret_testdata[3130] */\n    { 3131, 0x0000000000000000ULL, { 0xCC1BDC02061EFFC1ULL, 0xDF1BD67C9591DBC4ULL } }, /* XSUM_XXH128_withSecret_testdata[3131] */\n    { 3132, 0x0000000000000000ULL, { 0x53164136A7DAD369ULL, 0x59A092D6763EEF70ULL } }, /* XSUM_XXH128_withSecret_testdata[3132] */\n    { 3133, 0x0000000000000000ULL, { 0x1CF7D5D6CFA19B84ULL, 0x70A51B188D7367C1ULL } }, /* XSUM_XXH128_withSecret_testdata[3133] */\n    { 3134, 0x0000000000000000ULL, { 0x6F54091F0DC97503ULL, 0xAD5D6EAB272D6DEBULL } }, /* XSUM_XXH128_withSecret_testdata[3134] */\n    { 3135, 0x0000000000000000ULL, { 0x4FDF2B64A40B7D71ULL, 0x34F69716AA5FC420ULL } }, /* XSUM_XXH128_withSecret_testdata[3135] */\n    { 3136, 0x0000000000000000ULL, { 0xD95623C151DE1B95ULL, 0x62DCFD8584402765ULL } }, /* XSUM_XXH128_withSecret_testdata[3136] */\n    { 3137, 0x0000000000000000ULL, { 0x7C68A24FC4BBFF0AULL, 0xC6555A9BFE0A5719ULL } }, /* XSUM_XXH128_withSecret_testdata[3137] */\n    { 3138, 0x0000000000000000ULL, { 0x8D4A355AF955A352ULL, 0xCF77018CCCD338E2ULL } }, /* XSUM_XXH128_withSecret_testdata[3138] */\n    { 3139, 0x0000000000000000ULL, { 0x9506F8F6A8582A58ULL, 0x032F80B8160E79F9ULL } }, /* XSUM_XXH128_withSecret_testdata[3139] */\n    { 3140, 0x0000000000000000ULL, { 0x6A2B11D6DE59D82CULL, 0x709E217D2E839E29ULL } }, /* XSUM_XXH128_withSecret_testdata[3140] */\n    { 3141, 0x0000000000000000ULL, { 0xB2C155DB1DDD708CULL, 0xC9C025400B7C4EE7ULL } }, /* XSUM_XXH128_withSecret_testdata[3141] */\n    { 3142, 0x0000000000000000ULL, { 0x0BE121D269940379ULL, 0x1F5013523456DBC7ULL } }, /* XSUM_XXH128_withSecret_testdata[3142] */\n    { 3143, 0x0000000000000000ULL, { 0x1864D6B09A67166AULL, 0x1CE2A1A049EFA11FULL } }, /* XSUM_XXH128_withSecret_testdata[3143] */\n    { 3144, 0x0000000000000000ULL, { 0x99F7030C2A25BB9BULL, 0x0C3AB49DF122A543ULL } }, /* XSUM_XXH128_withSecret_testdata[3144] */\n    { 3145, 0x0000000000000000ULL, { 0x77ED4A9F6BEB8243ULL, 0x4B036F049B595902ULL } }, /* XSUM_XXH128_withSecret_testdata[3145] */\n    { 3146, 0x0000000000000000ULL, { 0xBB093C1935EDA716ULL, 0xC40BF92BF8F14877ULL } }, /* XSUM_XXH128_withSecret_testdata[3146] */\n    { 3147, 0x0000000000000000ULL, { 0x7491E7B95E770CD0ULL, 0xEE68448679BB7F6AULL } }, /* XSUM_XXH128_withSecret_testdata[3147] */\n    { 3148, 0x0000000000000000ULL, { 0x652DBD7D11D10C92ULL, 0x5BA17ACCBDE062C9ULL } }, /* XSUM_XXH128_withSecret_testdata[3148] */\n    { 3149, 0x0000000000000000ULL, { 0x800857B56BAA6999ULL, 0xB9608E4C88097CC5ULL } }, /* XSUM_XXH128_withSecret_testdata[3149] */\n    { 3150, 0x0000000000000000ULL, { 0xC7E4380E43DE0CE7ULL, 0x7B2230F5E4D6C81CULL } }, /* XSUM_XXH128_withSecret_testdata[3150] */\n    { 3151, 0x0000000000000000ULL, { 0xFD7B186DF737F475ULL, 0xBCD900EFD39FECBFULL } }, /* XSUM_XXH128_withSecret_testdata[3151] */\n    { 3152, 0x0000000000000000ULL, { 0xA1760DFF2512F00BULL, 0xC78AFE4D135C8448ULL } }, /* XSUM_XXH128_withSecret_testdata[3152] */\n    { 3153, 0x0000000000000000ULL, { 0x293C0DB7672CFFA0ULL, 0xFD3E3F2EF1C82430ULL } }, /* XSUM_XXH128_withSecret_testdata[3153] */\n    { 3154, 0x0000000000000000ULL, { 0x1E7350299B820EC1ULL, 0x40C30FDF6267D28CULL } }, /* XSUM_XXH128_withSecret_testdata[3154] */\n    { 3155, 0x0000000000000000ULL, { 0x396EFA75E8FC579BULL, 0xF19E7B0E60741ABDULL } }, /* XSUM_XXH128_withSecret_testdata[3155] */\n    { 3156, 0x0000000000000000ULL, { 0x310227B2DFEC0B08ULL, 0x70168832F3E30036ULL } }, /* XSUM_XXH128_withSecret_testdata[3156] */\n    { 3157, 0x0000000000000000ULL, { 0xA1A80226C7A2CE9FULL, 0x0DA9AFA9DFAE460DULL } }, /* XSUM_XXH128_withSecret_testdata[3157] */\n    { 3158, 0x0000000000000000ULL, { 0x33ACF7C54F5BA9A2ULL, 0x5BE77193672B2579ULL } }, /* XSUM_XXH128_withSecret_testdata[3158] */\n    { 3159, 0x0000000000000000ULL, { 0x148730CA3B26F9DFULL, 0x2CA99457F818F7A7ULL } }, /* XSUM_XXH128_withSecret_testdata[3159] */\n    { 3160, 0x0000000000000000ULL, { 0xAE67E4D47D742A18ULL, 0x25AE5EFACCDD1ABAULL } }, /* XSUM_XXH128_withSecret_testdata[3160] */\n    { 3161, 0x0000000000000000ULL, { 0x690643FC05471E6DULL, 0xBF1D6535BFA20BE4ULL } }, /* XSUM_XXH128_withSecret_testdata[3161] */\n    { 3162, 0x0000000000000000ULL, { 0xDF4B703D708BF09FULL, 0xD845AF08E435E4B1ULL } }, /* XSUM_XXH128_withSecret_testdata[3162] */\n    { 3163, 0x0000000000000000ULL, { 0xBC2A9A17890539EBULL, 0x59A384648BC418DCULL } }, /* XSUM_XXH128_withSecret_testdata[3163] */\n    { 3164, 0x0000000000000000ULL, { 0x8C7F7ED0164BC7D3ULL, 0x5F7C0F35054AB1B0ULL } }, /* XSUM_XXH128_withSecret_testdata[3164] */\n    { 3165, 0x0000000000000000ULL, { 0x495255725E29D9B2ULL, 0x1D6C3D7B74E30721ULL } }, /* XSUM_XXH128_withSecret_testdata[3165] */\n    { 3166, 0x0000000000000000ULL, { 0x3083F54957C6159CULL, 0xE34BF89C6A748A95ULL } }, /* XSUM_XXH128_withSecret_testdata[3166] */\n    { 3167, 0x0000000000000000ULL, { 0xD2B819E0D63C599CULL, 0x2F8AA28D9C5AE806ULL } }, /* XSUM_XXH128_withSecret_testdata[3167] */\n    { 3168, 0x0000000000000000ULL, { 0xFD92D442AA13E961ULL, 0xED71F6980A2BCE2AULL } }, /* XSUM_XXH128_withSecret_testdata[3168] */\n    { 3169, 0x0000000000000000ULL, { 0x286AEE2983DB23BDULL, 0x91C66E3F1C76A691ULL } }, /* XSUM_XXH128_withSecret_testdata[3169] */\n    { 3170, 0x0000000000000000ULL, { 0x33DDFAEB4EBC48F6ULL, 0xFCA1EF4494C9C240ULL } }, /* XSUM_XXH128_withSecret_testdata[3170] */\n    { 3171, 0x0000000000000000ULL, { 0xC48860DC6C0BB4C4ULL, 0x58E06E99E3830FD1ULL } }, /* XSUM_XXH128_withSecret_testdata[3171] */\n    { 3172, 0x0000000000000000ULL, { 0x9B74162796A02469ULL, 0xD2D0253DBDD0F65AULL } }, /* XSUM_XXH128_withSecret_testdata[3172] */\n    { 3173, 0x0000000000000000ULL, { 0x3A1F72EEAAE2FF5CULL, 0xCEA59CD30DE60C62ULL } }, /* XSUM_XXH128_withSecret_testdata[3173] */\n    { 3174, 0x0000000000000000ULL, { 0xFC2277998C3144BEULL, 0xD8CACB2371AF4CBFULL } }, /* XSUM_XXH128_withSecret_testdata[3174] */\n    { 3175, 0x0000000000000000ULL, { 0x2AE9DD5B8FD328E3ULL, 0x55BB157942540D15ULL } }, /* XSUM_XXH128_withSecret_testdata[3175] */\n    { 3176, 0x0000000000000000ULL, { 0xFC5A0B7233DB06B7ULL, 0xB02509331A6E6544ULL } }, /* XSUM_XXH128_withSecret_testdata[3176] */\n    { 3177, 0x0000000000000000ULL, { 0x665A0A09FFFFE390ULL, 0xFA7FE4F9B381A8A6ULL } }, /* XSUM_XXH128_withSecret_testdata[3177] */\n    { 3178, 0x0000000000000000ULL, { 0x3BC5D322F3AA0932ULL, 0x75B2DA7BD25276ABULL } }, /* XSUM_XXH128_withSecret_testdata[3178] */\n    { 3179, 0x0000000000000000ULL, { 0xF44D1AB38E620FEBULL, 0x25FBF0CE8AE65FC4ULL } }, /* XSUM_XXH128_withSecret_testdata[3179] */\n    { 3180, 0x0000000000000000ULL, { 0x14BD81EAB16E510EULL, 0x3EA3F488BE566084ULL } }, /* XSUM_XXH128_withSecret_testdata[3180] */\n    { 3181, 0x0000000000000000ULL, { 0x6F56C6F9E8BB459EULL, 0x1AEF24DEFDF3AC35ULL } }, /* XSUM_XXH128_withSecret_testdata[3181] */\n    { 3182, 0x0000000000000000ULL, { 0x97BD98B2A293810CULL, 0x38FDE8B45C66E4DFULL } }, /* XSUM_XXH128_withSecret_testdata[3182] */\n    { 3183, 0x0000000000000000ULL, { 0x6F26D4EADE05ABF6ULL, 0x52B3CBA987BF4AA6ULL } }, /* XSUM_XXH128_withSecret_testdata[3183] */\n    { 3184, 0x0000000000000000ULL, { 0x1248E27C46185A24ULL, 0x2EA9CD525763430BULL } }, /* XSUM_XXH128_withSecret_testdata[3184] */\n    { 3185, 0x0000000000000000ULL, { 0xB17D2E2C98F3AF5CULL, 0xA1EE6C1F5D20AFF0ULL } }, /* XSUM_XXH128_withSecret_testdata[3185] */\n    { 3186, 0x0000000000000000ULL, { 0xA71E3F08DD214859ULL, 0x042114AC98CEC37BULL } }, /* XSUM_XXH128_withSecret_testdata[3186] */\n    { 3187, 0x0000000000000000ULL, { 0xC61C31200BDC48FAULL, 0xB6113BC428978C90ULL } }, /* XSUM_XXH128_withSecret_testdata[3187] */\n    { 3188, 0x0000000000000000ULL, { 0xD0E13FC28B2F9913ULL, 0x590D8CCA1D4CF56BULL } }, /* XSUM_XXH128_withSecret_testdata[3188] */\n    { 3189, 0x0000000000000000ULL, { 0x917EBBA225F50792ULL, 0x0E0DEA6E483D37E0ULL } }, /* XSUM_XXH128_withSecret_testdata[3189] */\n    { 3190, 0x0000000000000000ULL, { 0xBEEB801645B5DBD4ULL, 0x54C92ADF59A8F143ULL } }, /* XSUM_XXH128_withSecret_testdata[3190] */\n    { 3191, 0x0000000000000000ULL, { 0xD5FDBBFCC774BB33ULL, 0x9E30123433243813ULL } }, /* XSUM_XXH128_withSecret_testdata[3191] */\n    { 3192, 0x0000000000000000ULL, { 0xB39010374D35AF77ULL, 0x336EF650BD227697ULL } }, /* XSUM_XXH128_withSecret_testdata[3192] */\n    { 3193, 0x0000000000000000ULL, { 0xC79015AFC8B3B628ULL, 0xE8922C42B33A2A77ULL } }, /* XSUM_XXH128_withSecret_testdata[3193] */\n    { 3194, 0x0000000000000000ULL, { 0x65B4346F6BD4953DULL, 0x75920775C1F47ECEULL } }, /* XSUM_XXH128_withSecret_testdata[3194] */\n    { 3195, 0x0000000000000000ULL, { 0x64BE0D2EE2E286D0ULL, 0xCDB7D2ED13258AAFULL } }, /* XSUM_XXH128_withSecret_testdata[3195] */\n    { 3196, 0x0000000000000000ULL, { 0x5059571289760C2AULL, 0x426F460B6118B287ULL } }, /* XSUM_XXH128_withSecret_testdata[3196] */\n    { 3197, 0x0000000000000000ULL, { 0xE97995973A7CC660ULL, 0xEE57A495410BA361ULL } }, /* XSUM_XXH128_withSecret_testdata[3197] */\n    { 3198, 0x0000000000000000ULL, { 0xF0B90BF70B7105E4ULL, 0xBAFEEA5A4629CB81ULL } }, /* XSUM_XXH128_withSecret_testdata[3198] */\n    { 3199, 0x0000000000000000ULL, { 0xFF6A9D5D707A6F1CULL, 0x04D3B2E8EFD25D7DULL } }, /* XSUM_XXH128_withSecret_testdata[3199] */\n    { 3200, 0x0000000000000000ULL, { 0xD7200BA5B8275086ULL, 0x4467F7A954D7096FULL } }, /* XSUM_XXH128_withSecret_testdata[3200] */\n    { 3201, 0x0000000000000000ULL, { 0x40C880A6D9B3D3FAULL, 0xC56BBE776D45C69FULL } }, /* XSUM_XXH128_withSecret_testdata[3201] */\n    { 3202, 0x0000000000000000ULL, { 0xE1AC910E7A8736E7ULL, 0xC04EDC3ABFF86438ULL } }, /* XSUM_XXH128_withSecret_testdata[3202] */\n    { 3203, 0x0000000000000000ULL, { 0x2FB99866A4A515CCULL, 0x6B155AF637D986EFULL } }, /* XSUM_XXH128_withSecret_testdata[3203] */\n    { 3204, 0x0000000000000000ULL, { 0x3E62E8EFB0A503B8ULL, 0xF2C4052C111CF93AULL } }, /* XSUM_XXH128_withSecret_testdata[3204] */\n    { 3205, 0x0000000000000000ULL, { 0xBBDD949C0182C902ULL, 0xAD3990DDE017CB35ULL } }, /* XSUM_XXH128_withSecret_testdata[3205] */\n    { 3206, 0x0000000000000000ULL, { 0xAD7FB51FA61A277BULL, 0xB708F47AE38BCE45ULL } }, /* XSUM_XXH128_withSecret_testdata[3206] */\n    { 3207, 0x0000000000000000ULL, { 0x6E991973891858B7ULL, 0xBA88FD9999E5D31EULL } }, /* XSUM_XXH128_withSecret_testdata[3207] */\n    { 3208, 0x0000000000000000ULL, { 0x997053F6C459F928ULL, 0xF54E34E3FF28333BULL } }, /* XSUM_XXH128_withSecret_testdata[3208] */\n    { 3209, 0x0000000000000000ULL, { 0xEE41F7488F928DABULL, 0xEAAE4D7E36604C2EULL } }, /* XSUM_XXH128_withSecret_testdata[3209] */\n    { 3210, 0x0000000000000000ULL, { 0x3E7E7CA24E05CC73ULL, 0x6C43ED1CA4CED4A5ULL } }, /* XSUM_XXH128_withSecret_testdata[3210] */\n    { 3211, 0x0000000000000000ULL, { 0xE23E5E2F1C63B479ULL, 0x23DBE704C1D3A341ULL } }, /* XSUM_XXH128_withSecret_testdata[3211] */\n    { 3212, 0x0000000000000000ULL, { 0x14EC7278C8ECAE37ULL, 0x0F86EA4FA373A477ULL } }, /* XSUM_XXH128_withSecret_testdata[3212] */\n    { 3213, 0x0000000000000000ULL, { 0x5AA9E0AEBEC9477AULL, 0xC17CA7646F8DB341ULL } }, /* XSUM_XXH128_withSecret_testdata[3213] */\n    { 3214, 0x0000000000000000ULL, { 0x55CD91E1BBA19DFEULL, 0xC426B3AF6A680F4DULL } }, /* XSUM_XXH128_withSecret_testdata[3214] */\n    { 3215, 0x0000000000000000ULL, { 0xFF0BEE5FE295C1ABULL, 0x03B59C4421E8CB90ULL } }, /* XSUM_XXH128_withSecret_testdata[3215] */\n    { 3216, 0x0000000000000000ULL, { 0xDA59587CD473B873ULL, 0x2E24A68A81E958CBULL } }, /* XSUM_XXH128_withSecret_testdata[3216] */\n    { 3217, 0x0000000000000000ULL, { 0xC1249BE859936A26ULL, 0x3B7AB1FBD9425045ULL } }, /* XSUM_XXH128_withSecret_testdata[3217] */\n    { 3218, 0x0000000000000000ULL, { 0xA273BECC861BABA9ULL, 0x2AFBAA8BD6B7D7C1ULL } }, /* XSUM_XXH128_withSecret_testdata[3218] */\n    { 3219, 0x0000000000000000ULL, { 0x21ABF4545EF8335BULL, 0x10DE2C8CD6EDE0C3ULL } }, /* XSUM_XXH128_withSecret_testdata[3219] */\n    { 3220, 0x0000000000000000ULL, { 0x9F35CFC3E0091E3CULL, 0x353B049D3363FB41ULL } }, /* XSUM_XXH128_withSecret_testdata[3220] */\n    { 3221, 0x0000000000000000ULL, { 0xC4136979A80FE8F0ULL, 0xC7ECB1F1713C2827ULL } }, /* XSUM_XXH128_withSecret_testdata[3221] */\n    { 3222, 0x0000000000000000ULL, { 0x9F85920843FA1F7FULL, 0x5FA6C5D978F6DAA0ULL } }, /* XSUM_XXH128_withSecret_testdata[3222] */\n    { 3223, 0x0000000000000000ULL, { 0xECCCB09DCDFBAE5EULL, 0xD95E685B22EBE7D7ULL } }, /* XSUM_XXH128_withSecret_testdata[3223] */\n    { 3224, 0x0000000000000000ULL, { 0xAADB3A586BC7FE2CULL, 0xDD8182AE077AC751ULL } }, /* XSUM_XXH128_withSecret_testdata[3224] */\n    { 3225, 0x0000000000000000ULL, { 0x86870DF14A65EE9AULL, 0x243C61863110520AULL } }, /* XSUM_XXH128_withSecret_testdata[3225] */\n    { 3226, 0x0000000000000000ULL, { 0x0E4F7208A416DA59ULL, 0x43FBB7E309CFFD22ULL } }, /* XSUM_XXH128_withSecret_testdata[3226] */\n    { 3227, 0x0000000000000000ULL, { 0x05D234FCE6387034ULL, 0x084F99600D07D971ULL } }, /* XSUM_XXH128_withSecret_testdata[3227] */\n    { 3228, 0x0000000000000000ULL, { 0xCCEBE82EBCFF38DDULL, 0x174E831F9D8DA1DEULL } }, /* XSUM_XXH128_withSecret_testdata[3228] */\n    { 3229, 0x0000000000000000ULL, { 0x1D7576EAF2ED8398ULL, 0x65709581ECA805F8ULL } }, /* XSUM_XXH128_withSecret_testdata[3229] */\n    { 3230, 0x0000000000000000ULL, { 0xF6A84BDF1974F42EULL, 0x344610FAB0D1021BULL } }, /* XSUM_XXH128_withSecret_testdata[3230] */\n    { 3231, 0x0000000000000000ULL, { 0x8FE2D205D4EF2916ULL, 0x32EF7B9597655E60ULL } }, /* XSUM_XXH128_withSecret_testdata[3231] */\n    { 3232, 0x0000000000000000ULL, { 0xCEE1E2241957271BULL, 0x9CAB28DCD8A4E33EULL } }, /* XSUM_XXH128_withSecret_testdata[3232] */\n    { 3233, 0x0000000000000000ULL, { 0xD4D39543A5EAC379ULL, 0x2D1ABD86F5F4B42EULL } }, /* XSUM_XXH128_withSecret_testdata[3233] */\n    { 3234, 0x0000000000000000ULL, { 0x07483EE0BECEB02DULL, 0x5CACB9F0AABACB88ULL } }, /* XSUM_XXH128_withSecret_testdata[3234] */\n    { 3235, 0x0000000000000000ULL, { 0x9F79C88265C00AE5ULL, 0x5AF214857176FE1FULL } }, /* XSUM_XXH128_withSecret_testdata[3235] */\n    { 3236, 0x0000000000000000ULL, { 0xF4B64A31BB0925F3ULL, 0xB7BB5A2AC2BAF7E3ULL } }, /* XSUM_XXH128_withSecret_testdata[3236] */\n    { 3237, 0x0000000000000000ULL, { 0x17629432F2AC5569ULL, 0x9EB4A614C2371D67ULL } }, /* XSUM_XXH128_withSecret_testdata[3237] */\n    { 3238, 0x0000000000000000ULL, { 0x75960AABB155EED0ULL, 0x5018AB5066E15EDFULL } }, /* XSUM_XXH128_withSecret_testdata[3238] */\n    { 3239, 0x0000000000000000ULL, { 0x805586E578DA6070ULL, 0x983E830F0A9C4C85ULL } }, /* XSUM_XXH128_withSecret_testdata[3239] */\n    { 3240, 0x0000000000000000ULL, { 0x2B7A4B339E92DBB7ULL, 0xD6C928F84851CDAAULL } }, /* XSUM_XXH128_withSecret_testdata[3240] */\n    { 3241, 0x0000000000000000ULL, { 0xDAC8041DADC13ABCULL, 0x55BCA5199195D06DULL } }, /* XSUM_XXH128_withSecret_testdata[3241] */\n    { 3242, 0x0000000000000000ULL, { 0x78278E639874DC18ULL, 0x95DDB8BC1FB6E0EDULL } }, /* XSUM_XXH128_withSecret_testdata[3242] */\n    { 3243, 0x0000000000000000ULL, { 0xA80739581807C6A0ULL, 0xE3CD68A4589DB2ECULL } }, /* XSUM_XXH128_withSecret_testdata[3243] */\n    { 3244, 0x0000000000000000ULL, { 0x06724F4774CC1152ULL, 0xB6C24F1C0222D759ULL } }, /* XSUM_XXH128_withSecret_testdata[3244] */\n    { 3245, 0x0000000000000000ULL, { 0xD29FFA0A3D696069ULL, 0x443D6062AF3204A6ULL } }, /* XSUM_XXH128_withSecret_testdata[3245] */\n    { 3246, 0x0000000000000000ULL, { 0x7800F152663EC731ULL, 0xF9793435CE54D8E7ULL } }, /* XSUM_XXH128_withSecret_testdata[3246] */\n    { 3247, 0x0000000000000000ULL, { 0x7147FFB2AE7057E3ULL, 0xADA58BC60440B504ULL } }, /* XSUM_XXH128_withSecret_testdata[3247] */\n    { 3248, 0x0000000000000000ULL, { 0xF93CDDB9E4BDEEF3ULL, 0xDD55D60F53254A58ULL } }, /* XSUM_XXH128_withSecret_testdata[3248] */\n    { 3249, 0x0000000000000000ULL, { 0xB26C47203FC0BA4AULL, 0xC0D736D79B2E57DEULL } }, /* XSUM_XXH128_withSecret_testdata[3249] */\n    { 3250, 0x0000000000000000ULL, { 0x30928BB6516AD8E9ULL, 0x0E54E4BF003A447BULL } }, /* XSUM_XXH128_withSecret_testdata[3250] */\n    { 3251, 0x0000000000000000ULL, { 0xCD68EEB7FFEFEE77ULL, 0x2467A35F659956EFULL } }, /* XSUM_XXH128_withSecret_testdata[3251] */\n    { 3252, 0x0000000000000000ULL, { 0x182D8D18B7DA7BAFULL, 0x04DFFEF719F05AD2ULL } }, /* XSUM_XXH128_withSecret_testdata[3252] */\n    { 3253, 0x0000000000000000ULL, { 0xEC90638331FFE0EAULL, 0x7E96ECD23E196731ULL } }, /* XSUM_XXH128_withSecret_testdata[3253] */\n    { 3254, 0x0000000000000000ULL, { 0x92136719A30FE7C3ULL, 0xFD1B579FDA78F901ULL } }, /* XSUM_XXH128_withSecret_testdata[3254] */\n    { 3255, 0x0000000000000000ULL, { 0x4188F703E8995151ULL, 0x6F92EFBAC2BD9239ULL } }, /* XSUM_XXH128_withSecret_testdata[3255] */\n    { 3256, 0x0000000000000000ULL, { 0x5FBCAB7C0F5A1A9AULL, 0x4BE3A4E388418D9DULL } }, /* XSUM_XXH128_withSecret_testdata[3256] */\n    { 3257, 0x0000000000000000ULL, { 0x3577B9297D0D93E0ULL, 0x25FC11B4F557AD9CULL } }, /* XSUM_XXH128_withSecret_testdata[3257] */\n    { 3258, 0x0000000000000000ULL, { 0xEEDDC51C0284D48CULL, 0x9E2EE402F91DBD9BULL } }, /* XSUM_XXH128_withSecret_testdata[3258] */\n    { 3259, 0x0000000000000000ULL, { 0xAAE49BBB5A6C03B0ULL, 0xBB4831016CDDB972ULL } }, /* XSUM_XXH128_withSecret_testdata[3259] */\n    { 3260, 0x0000000000000000ULL, { 0xE9847176A70B8B77ULL, 0x4F066319907BB1BCULL } }, /* XSUM_XXH128_withSecret_testdata[3260] */\n    { 3261, 0x0000000000000000ULL, { 0x451B1206F26996CFULL, 0xA4C7EADB01E6F20CULL } }, /* XSUM_XXH128_withSecret_testdata[3261] */\n    { 3262, 0x0000000000000000ULL, { 0x96D2704A4EDF5ED9ULL, 0xE6E9053B4E145AB8ULL } }, /* XSUM_XXH128_withSecret_testdata[3262] */\n    { 3263, 0x0000000000000000ULL, { 0xB78D78D2CEDA1298ULL, 0x56397808614D1F0DULL } }, /* XSUM_XXH128_withSecret_testdata[3263] */\n    { 3264, 0x0000000000000000ULL, { 0x30E758251E3ABB42ULL, 0x3A674937D5E40222ULL } }, /* XSUM_XXH128_withSecret_testdata[3264] */\n    { 3265, 0x0000000000000000ULL, { 0xDC2EEF69D4E8EAE3ULL, 0x0076FB1CA05C1762ULL } }, /* XSUM_XXH128_withSecret_testdata[3265] */\n    { 3266, 0x0000000000000000ULL, { 0xC1CCE6D532429655ULL, 0x2023667489118D46ULL } }, /* XSUM_XXH128_withSecret_testdata[3266] */\n    { 3267, 0x0000000000000000ULL, { 0xB5365644227C182FULL, 0x4ED76EFAD881DE85ULL } }, /* XSUM_XXH128_withSecret_testdata[3267] */\n    { 3268, 0x0000000000000000ULL, { 0x495ADC025DE4FE81ULL, 0x1A4D8296A1B0306DULL } }, /* XSUM_XXH128_withSecret_testdata[3268] */\n    { 3269, 0x0000000000000000ULL, { 0x59B76DB9F2595C4DULL, 0x07F327995D4B7232ULL } }, /* XSUM_XXH128_withSecret_testdata[3269] */\n    { 3270, 0x0000000000000000ULL, { 0x64F4B76BB4C42F3FULL, 0x3E4FE2A44BC1E066ULL } }, /* XSUM_XXH128_withSecret_testdata[3270] */\n    { 3271, 0x0000000000000000ULL, { 0xBB6ADA7A691FAFDFULL, 0x6298AABDEAFC3763ULL } }, /* XSUM_XXH128_withSecret_testdata[3271] */\n    { 3272, 0x0000000000000000ULL, { 0x7AFB04DA397BDB6EULL, 0x1AF9F3046B27250EULL } }, /* XSUM_XXH128_withSecret_testdata[3272] */\n    { 3273, 0x0000000000000000ULL, { 0x3388D1D5A1BD43F2ULL, 0xE8742E429A1B713EULL } }, /* XSUM_XXH128_withSecret_testdata[3273] */\n    { 3274, 0x0000000000000000ULL, { 0xD4B44FC5D63B2CFDULL, 0xF89B9CC67094EA44ULL } }, /* XSUM_XXH128_withSecret_testdata[3274] */\n    { 3275, 0x0000000000000000ULL, { 0x1009E1BB12141C55ULL, 0x6651331371A4799BULL } }, /* XSUM_XXH128_withSecret_testdata[3275] */\n    { 3276, 0x0000000000000000ULL, { 0x1148520E5409A130ULL, 0x0ECAF470B462CBB7ULL } }, /* XSUM_XXH128_withSecret_testdata[3276] */\n    { 3277, 0x0000000000000000ULL, { 0x07DD7D8893705506ULL, 0xFDA205F5058FAF66ULL } }, /* XSUM_XXH128_withSecret_testdata[3277] */\n    { 3278, 0x0000000000000000ULL, { 0x5A7E5EE9780970CDULL, 0xFE9204ECE8D04EB6ULL } }, /* XSUM_XXH128_withSecret_testdata[3278] */\n    { 3279, 0x0000000000000000ULL, { 0x8FE6E18067B39220ULL, 0x4EDABB93927B6EDEULL } }, /* XSUM_XXH128_withSecret_testdata[3279] */\n    { 3280, 0x0000000000000000ULL, { 0xEEF84C2AE2A5730EULL, 0xCD52612070782655ULL } }, /* XSUM_XXH128_withSecret_testdata[3280] */\n    { 3281, 0x0000000000000000ULL, { 0x92440C8DDB9D92B3ULL, 0xD067680EA42A8A81ULL } }, /* XSUM_XXH128_withSecret_testdata[3281] */\n    { 3282, 0x0000000000000000ULL, { 0xC43FF10C2585ACDEULL, 0xC7493193AE42F45CULL } }, /* XSUM_XXH128_withSecret_testdata[3282] */\n    { 3283, 0x0000000000000000ULL, { 0xBB93E04E5654CDB9ULL, 0x1698E9372089CD58ULL } }, /* XSUM_XXH128_withSecret_testdata[3283] */\n    { 3284, 0x0000000000000000ULL, { 0xA495E819DA447A59ULL, 0xEAC851BD26534907ULL } }, /* XSUM_XXH128_withSecret_testdata[3284] */\n    { 3285, 0x0000000000000000ULL, { 0x85140AB1AB2056F2ULL, 0xE30B8B36978A9733ULL } }, /* XSUM_XXH128_withSecret_testdata[3285] */\n    { 3286, 0x0000000000000000ULL, { 0xA7D605BD2B36A010ULL, 0x69FE07354760B857ULL } }, /* XSUM_XXH128_withSecret_testdata[3286] */\n    { 3287, 0x0000000000000000ULL, { 0x9DF31DA867F80254ULL, 0xAAAF94ACD1A73962ULL } }, /* XSUM_XXH128_withSecret_testdata[3287] */\n    { 3288, 0x0000000000000000ULL, { 0xE4C101854AD46B56ULL, 0xF90BADA9CFF3DB7EULL } }, /* XSUM_XXH128_withSecret_testdata[3288] */\n    { 3289, 0x0000000000000000ULL, { 0xE5B20108F51BC39CULL, 0x71DA280C80E0B773ULL } }, /* XSUM_XXH128_withSecret_testdata[3289] */\n    { 3290, 0x0000000000000000ULL, { 0xD49B7388BDE1C27AULL, 0x230AFF4E652B49BEULL } }, /* XSUM_XXH128_withSecret_testdata[3290] */\n    { 3291, 0x0000000000000000ULL, { 0x3B5930EDB0275616ULL, 0x4D45A5D0489FE6D9ULL } }, /* XSUM_XXH128_withSecret_testdata[3291] */\n    { 3292, 0x0000000000000000ULL, { 0x00D797ACF214994EULL, 0x5206D2A6E530E01FULL } }, /* XSUM_XXH128_withSecret_testdata[3292] */\n    { 3293, 0x0000000000000000ULL, { 0x91119537BC88F950ULL, 0xDA00103556FB9FC9ULL } }, /* XSUM_XXH128_withSecret_testdata[3293] */\n    { 3294, 0x0000000000000000ULL, { 0x48287C9BB49C2670ULL, 0xBAFE3001256FBF3FULL } }, /* XSUM_XXH128_withSecret_testdata[3294] */\n    { 3295, 0x0000000000000000ULL, { 0x862AD932ED34EDAAULL, 0x5BB8C29570E602B2ULL } }, /* XSUM_XXH128_withSecret_testdata[3295] */\n    { 3296, 0x0000000000000000ULL, { 0xE3F9D6D114BBF9B7ULL, 0x11B26DC269AE200FULL } }, /* XSUM_XXH128_withSecret_testdata[3296] */\n    { 3297, 0x0000000000000000ULL, { 0x85B5773D9231AAC3ULL, 0xB77767AFA044ED92ULL } }, /* XSUM_XXH128_withSecret_testdata[3297] */\n    { 3298, 0x0000000000000000ULL, { 0x254B00553E101FFEULL, 0x86B0F05D03CA13EFULL } }, /* XSUM_XXH128_withSecret_testdata[3298] */\n    { 3299, 0x0000000000000000ULL, { 0x4195D2FD420E6CCEULL, 0xCFB0B9410CA408AEULL } }, /* XSUM_XXH128_withSecret_testdata[3299] */\n    { 3300, 0x0000000000000000ULL, { 0xCCD350CD5CFB6ECBULL, 0xDB8B39151927824FULL } }, /* XSUM_XXH128_withSecret_testdata[3300] */\n    { 3301, 0x0000000000000000ULL, { 0xC5ABBB0329F83D2DULL, 0x291EAE66DFD71EB7ULL } }, /* XSUM_XXH128_withSecret_testdata[3301] */\n    { 3302, 0x0000000000000000ULL, { 0xF1F22B9E046FC2B0ULL, 0x134DAC60C0B2AD97ULL } }, /* XSUM_XXH128_withSecret_testdata[3302] */\n    { 3303, 0x0000000000000000ULL, { 0x5A21565F187E49B2ULL, 0x45E1C2CEFF26AE06ULL } }, /* XSUM_XXH128_withSecret_testdata[3303] */\n    { 3304, 0x0000000000000000ULL, { 0xF8864AE64FD2E35EULL, 0x98F09CAFD5DAEE11ULL } }, /* XSUM_XXH128_withSecret_testdata[3304] */\n    { 3305, 0x0000000000000000ULL, { 0x0E0DF6F5AC512303ULL, 0x2947BD1E79576C8FULL } }, /* XSUM_XXH128_withSecret_testdata[3305] */\n    { 3306, 0x0000000000000000ULL, { 0x241137A1E90532C2ULL, 0x30A53CC80B8A95CAULL } }, /* XSUM_XXH128_withSecret_testdata[3306] */\n    { 3307, 0x0000000000000000ULL, { 0x69131DBC1BCE80D5ULL, 0xE6B58E06BC7560FEULL } }, /* XSUM_XXH128_withSecret_testdata[3307] */\n    { 3308, 0x0000000000000000ULL, { 0x971AE3846A3E0DD8ULL, 0x5C4A5F302F6A9E90ULL } }, /* XSUM_XXH128_withSecret_testdata[3308] */\n    { 3309, 0x0000000000000000ULL, { 0xCC26928F2A3914EBULL, 0xC999247513187868ULL } }, /* XSUM_XXH128_withSecret_testdata[3309] */\n    { 3310, 0x0000000000000000ULL, { 0x765885B0A2C43AD7ULL, 0xA3E05A08E67F45BAULL } }, /* XSUM_XXH128_withSecret_testdata[3310] */\n    { 3311, 0x0000000000000000ULL, { 0xA0AAF79C407D828FULL, 0xBD215A7BF1CBEB48ULL } }, /* XSUM_XXH128_withSecret_testdata[3311] */\n    { 3312, 0x0000000000000000ULL, { 0x58AED2BDC5A0501AULL, 0x1637CB8CE94E64C6ULL } }, /* XSUM_XXH128_withSecret_testdata[3312] */\n    { 3313, 0x0000000000000000ULL, { 0x75B6E58CF5AEA735ULL, 0xD7820744C794B5F7ULL } }, /* XSUM_XXH128_withSecret_testdata[3313] */\n    { 3314, 0x0000000000000000ULL, { 0xF5443445D5F02406ULL, 0x11A365359402096AULL } }, /* XSUM_XXH128_withSecret_testdata[3314] */\n    { 3315, 0x0000000000000000ULL, { 0xC8AE4A0700F4BB6DULL, 0x0BA6B27F6098E47AULL } }, /* XSUM_XXH128_withSecret_testdata[3315] */\n    { 3316, 0x0000000000000000ULL, { 0xD1A2F329AA5E7186ULL, 0x554C915DFD8DAF85ULL } }, /* XSUM_XXH128_withSecret_testdata[3316] */\n    { 3317, 0x0000000000000000ULL, { 0x8474A93D2E092B76ULL, 0xF7D55F1D3B1C61FCULL } }, /* XSUM_XXH128_withSecret_testdata[3317] */\n    { 3318, 0x0000000000000000ULL, { 0xEFD2D9C0171BC450ULL, 0x10D07A499EA79191ULL } }, /* XSUM_XXH128_withSecret_testdata[3318] */\n    { 3319, 0x0000000000000000ULL, { 0xA8EAAD936EFC9644ULL, 0x59D1A9CC904F3F39ULL } }, /* XSUM_XXH128_withSecret_testdata[3319] */\n    { 3320, 0x0000000000000000ULL, { 0x3154F45940979876ULL, 0xF36A46866D444CF1ULL } }, /* XSUM_XXH128_withSecret_testdata[3320] */\n    { 3321, 0x0000000000000000ULL, { 0x6867827F42D85DA1ULL, 0xBFED00F5EFF4DE50ULL } }, /* XSUM_XXH128_withSecret_testdata[3321] */\n    { 3322, 0x0000000000000000ULL, { 0x27D35C66A2078647ULL, 0xA71908D29764B4DBULL } }, /* XSUM_XXH128_withSecret_testdata[3322] */\n    { 3323, 0x0000000000000000ULL, { 0x1FB48A7BB6C7E866ULL, 0x7B1D0467CFE948C7ULL } }, /* XSUM_XXH128_withSecret_testdata[3323] */\n    { 3324, 0x0000000000000000ULL, { 0xACCF0955174A0FB6ULL, 0x2DC1A46825AB6891ULL } }, /* XSUM_XXH128_withSecret_testdata[3324] */\n    { 3325, 0x0000000000000000ULL, { 0xDBBBC8EA97F0AB5CULL, 0xF2362ADFC99C88F5ULL } }, /* XSUM_XXH128_withSecret_testdata[3325] */\n    { 3326, 0x0000000000000000ULL, { 0x2E0B6A9C942F0179ULL, 0xC4BC67E47E48D457ULL } }, /* XSUM_XXH128_withSecret_testdata[3326] */\n    { 3327, 0x0000000000000000ULL, { 0xD9024DB1AB2DB04AULL, 0x15C30CAF9D610202ULL } }, /* XSUM_XXH128_withSecret_testdata[3327] */\n    { 3328, 0x0000000000000000ULL, { 0x22BE7EC41F5881ACULL, 0xEB6A0D08549F4874ULL } }, /* XSUM_XXH128_withSecret_testdata[3328] */\n    { 3329, 0x0000000000000000ULL, { 0x5FDA9CB1BECAE68BULL, 0x171C2075F6A0A0C7ULL } }, /* XSUM_XXH128_withSecret_testdata[3329] */\n    { 3330, 0x0000000000000000ULL, { 0xCBC6EA773CF5F46AULL, 0x976DC66C4593FE89ULL } }, /* XSUM_XXH128_withSecret_testdata[3330] */\n    { 3331, 0x0000000000000000ULL, { 0x3289D61E07B72947ULL, 0x25480310C116ED0CULL } }, /* XSUM_XXH128_withSecret_testdata[3331] */\n    { 3332, 0x0000000000000000ULL, { 0x1DA621CFECD5322AULL, 0x0AA7E56841AF058FULL } }, /* XSUM_XXH128_withSecret_testdata[3332] */\n    { 3333, 0x0000000000000000ULL, { 0x581102C840775F6EULL, 0x7E8A406074C05C26ULL } }, /* XSUM_XXH128_withSecret_testdata[3333] */\n    { 3334, 0x0000000000000000ULL, { 0xB7514DC2DCD88519ULL, 0x363E723103658207ULL } }, /* XSUM_XXH128_withSecret_testdata[3334] */\n    { 3335, 0x0000000000000000ULL, { 0xD5148C3FFC895731ULL, 0x036E6DF7AC6D8CB3ULL } }, /* XSUM_XXH128_withSecret_testdata[3335] */\n    { 3336, 0x0000000000000000ULL, { 0xDEBCC70AAE8E3F39ULL, 0x82AD8EFBF455C43AULL } }, /* XSUM_XXH128_withSecret_testdata[3336] */\n    { 3337, 0x0000000000000000ULL, { 0xDAFFE55F387D7D0BULL, 0x2AB7798C9101D559ULL } }, /* XSUM_XXH128_withSecret_testdata[3337] */\n    { 3338, 0x0000000000000000ULL, { 0x4B31BD84C077BFF3ULL, 0x54DD6FD1D30CF542ULL } }, /* XSUM_XXH128_withSecret_testdata[3338] */\n    { 3339, 0x0000000000000000ULL, { 0x69C7CFD19DE68375ULL, 0xA796B4029CED80C3ULL } }, /* XSUM_XXH128_withSecret_testdata[3339] */\n    { 3340, 0x0000000000000000ULL, { 0x8A75EDF821F67D68ULL, 0x0BCD22006480D850ULL } }, /* XSUM_XXH128_withSecret_testdata[3340] */\n    { 3341, 0x0000000000000000ULL, { 0x72656CBBF2D41FE6ULL, 0x79144679878EC2DBULL } }, /* XSUM_XXH128_withSecret_testdata[3341] */\n    { 3342, 0x0000000000000000ULL, { 0x01D34BADE4436B21ULL, 0x6DD86FC1042F67C3ULL } }, /* XSUM_XXH128_withSecret_testdata[3342] */\n    { 3343, 0x0000000000000000ULL, { 0xE9DFCFC7698F5745ULL, 0xB8C2F8CCBA8ECB08ULL } }, /* XSUM_XXH128_withSecret_testdata[3343] */\n    { 3344, 0x0000000000000000ULL, { 0x86F52912C82257BBULL, 0xA5A71D83EDBB0CF7ULL } }, /* XSUM_XXH128_withSecret_testdata[3344] */\n    { 3345, 0x0000000000000000ULL, { 0xDCD247235E0F57F4ULL, 0x2D93A2AB116FBAB9ULL } }, /* XSUM_XXH128_withSecret_testdata[3345] */\n    { 3346, 0x0000000000000000ULL, { 0x32962431CB54C379ULL, 0xAB1986325684229DULL } }, /* XSUM_XXH128_withSecret_testdata[3346] */\n    { 3347, 0x0000000000000000ULL, { 0xC6101795110831C5ULL, 0x16D45DEC619162DCULL } }, /* XSUM_XXH128_withSecret_testdata[3347] */\n    { 3348, 0x0000000000000000ULL, { 0xFCC02E23C7FE6354ULL, 0x09E21A9FCF9C5453ULL } }, /* XSUM_XXH128_withSecret_testdata[3348] */\n    { 3349, 0x0000000000000000ULL, { 0x717E9FB2891FFCF2ULL, 0xE5BFC149B7629E74ULL } }, /* XSUM_XXH128_withSecret_testdata[3349] */\n    { 3350, 0x0000000000000000ULL, { 0x1A11A562F5D6FF4AULL, 0x7373829ED7516844ULL } }, /* XSUM_XXH128_withSecret_testdata[3350] */\n    { 3351, 0x0000000000000000ULL, { 0x20E380F25BF86BCCULL, 0xB0A5370E68CF85EEULL } }, /* XSUM_XXH128_withSecret_testdata[3351] */\n    { 3352, 0x0000000000000000ULL, { 0xE1236EE4B1313B4EULL, 0x7A711312A45C750EULL } }, /* XSUM_XXH128_withSecret_testdata[3352] */\n    { 3353, 0x0000000000000000ULL, { 0xCFC1CB67F77C950FULL, 0x0687B7769D1751C2ULL } }, /* XSUM_XXH128_withSecret_testdata[3353] */\n    { 3354, 0x0000000000000000ULL, { 0xC44B23226042A290ULL, 0xD7B9C316FD916A9FULL } }, /* XSUM_XXH128_withSecret_testdata[3354] */\n    { 3355, 0x0000000000000000ULL, { 0x8EB724FDC15B92B9ULL, 0x316F58EF9A5A8FA6ULL } }, /* XSUM_XXH128_withSecret_testdata[3355] */\n    { 3356, 0x0000000000000000ULL, { 0xC3FB53E431E565D4ULL, 0xCCC3A3339612FA4EULL } }, /* XSUM_XXH128_withSecret_testdata[3356] */\n    { 3357, 0x0000000000000000ULL, { 0x2AAA176CF7123037ULL, 0x71D7F3D826231D2AULL } }, /* XSUM_XXH128_withSecret_testdata[3357] */\n    { 3358, 0x0000000000000000ULL, { 0x9777A22355C740F0ULL, 0x14C8D524D47EAF27ULL } }, /* XSUM_XXH128_withSecret_testdata[3358] */\n    { 3359, 0x0000000000000000ULL, { 0xF1D1D1E98F215748ULL, 0x2CDD641C04C3DCF8ULL } }, /* XSUM_XXH128_withSecret_testdata[3359] */\n    { 3360, 0x0000000000000000ULL, { 0x37F269BD32EB4DF6ULL, 0x9A89358DECD5A08DULL } }, /* XSUM_XXH128_withSecret_testdata[3360] */\n    { 3361, 0x0000000000000000ULL, { 0xC2948418FA69D5B0ULL, 0xF92ABE87C8EEA6BFULL } }, /* XSUM_XXH128_withSecret_testdata[3361] */\n    { 3362, 0x0000000000000000ULL, { 0xCDB58B11E43CE594ULL, 0xF27B43D9B784F312ULL } }, /* XSUM_XXH128_withSecret_testdata[3362] */\n    { 3363, 0x0000000000000000ULL, { 0x7386CD87F857E8FFULL, 0xCC2D3F28B4C9B07EULL } }, /* XSUM_XXH128_withSecret_testdata[3363] */\n    { 3364, 0x0000000000000000ULL, { 0xCB908BBE4BF4115AULL, 0xA123CAD22B16C28BULL } }, /* XSUM_XXH128_withSecret_testdata[3364] */\n    { 3365, 0x0000000000000000ULL, { 0xBC04E85A82136D9DULL, 0x3B1BD97D1E57EFE8ULL } }, /* XSUM_XXH128_withSecret_testdata[3365] */\n    { 3366, 0x0000000000000000ULL, { 0xA074DFB34D9C8159ULL, 0xDCD19B0500218C5AULL } }, /* XSUM_XXH128_withSecret_testdata[3366] */\n    { 3367, 0x0000000000000000ULL, { 0xE104838A3794A121ULL, 0x3A86EDA4AA44A7EDULL } }, /* XSUM_XXH128_withSecret_testdata[3367] */\n    { 3368, 0x0000000000000000ULL, { 0x8D9535A0589E87DEULL, 0x392138C19C42756DULL } }, /* XSUM_XXH128_withSecret_testdata[3368] */\n    { 3369, 0x0000000000000000ULL, { 0x8C7E2E952E9582E1ULL, 0x3FC569347E8559ABULL } }, /* XSUM_XXH128_withSecret_testdata[3369] */\n    { 3370, 0x0000000000000000ULL, { 0x36429AC325D34750ULL, 0x6D025E486229758FULL } }, /* XSUM_XXH128_withSecret_testdata[3370] */\n    { 3371, 0x0000000000000000ULL, { 0x337C994A4E29F517ULL, 0x5698ED82626EDA40ULL } }, /* XSUM_XXH128_withSecret_testdata[3371] */\n    { 3372, 0x0000000000000000ULL, { 0x27A7DAF417F30136ULL, 0x696CC8EF3053E9D5ULL } }, /* XSUM_XXH128_withSecret_testdata[3372] */\n    { 3373, 0x0000000000000000ULL, { 0x2BAFE1E23A552CC2ULL, 0xEEA73AD9CB549F35ULL } }, /* XSUM_XXH128_withSecret_testdata[3373] */\n    { 3374, 0x0000000000000000ULL, { 0x24111ED11860681BULL, 0xC1B70D4917938782ULL } }, /* XSUM_XXH128_withSecret_testdata[3374] */\n    { 3375, 0x0000000000000000ULL, { 0xFF3E50967E0B68C5ULL, 0xE07CF290164C38F7ULL } }, /* XSUM_XXH128_withSecret_testdata[3375] */\n    { 3376, 0x0000000000000000ULL, { 0x5F77AD45130555B9ULL, 0xF4F5282C363E6C9CULL } }, /* XSUM_XXH128_withSecret_testdata[3376] */\n    { 3377, 0x0000000000000000ULL, { 0x91EBB464DF8A0BB2ULL, 0xE2A5149229ED22B9ULL } }, /* XSUM_XXH128_withSecret_testdata[3377] */\n    { 3378, 0x0000000000000000ULL, { 0xE3F92F8355BC4A2BULL, 0x7F2E0BDBC676E674ULL } }, /* XSUM_XXH128_withSecret_testdata[3378] */\n    { 3379, 0x0000000000000000ULL, { 0xB26A54C0DB52120FULL, 0x0988386A3A481D2BULL } }, /* XSUM_XXH128_withSecret_testdata[3379] */\n    { 3380, 0x0000000000000000ULL, { 0x236F061D731241E9ULL, 0x64CE68CE28F85F93ULL } }, /* XSUM_XXH128_withSecret_testdata[3380] */\n    { 3381, 0x0000000000000000ULL, { 0x80951F0AAF6F69F3ULL, 0x1E7C7504CA1592CCULL } }, /* XSUM_XXH128_withSecret_testdata[3381] */\n    { 3382, 0x0000000000000000ULL, { 0x8D4E6C9A4B81E8CEULL, 0x77EBD5C2E1F94758ULL } }, /* XSUM_XXH128_withSecret_testdata[3382] */\n    { 3383, 0x0000000000000000ULL, { 0xDCF18FC251E124B4ULL, 0xD6D3F4D63B8E2D1BULL } }, /* XSUM_XXH128_withSecret_testdata[3383] */\n    { 3384, 0x0000000000000000ULL, { 0x0BAFB9DF872E349AULL, 0xF7099173F14148FBULL } }, /* XSUM_XXH128_withSecret_testdata[3384] */\n    { 3385, 0x0000000000000000ULL, { 0x991EBBFC2C40A6DDULL, 0x3C3D145B35BB32A4ULL } }, /* XSUM_XXH128_withSecret_testdata[3385] */\n    { 3386, 0x0000000000000000ULL, { 0x3DEF4AAE67B96ECDULL, 0x33E89514CCB9063FULL } }, /* XSUM_XXH128_withSecret_testdata[3386] */\n    { 3387, 0x0000000000000000ULL, { 0x6845EC17968F7B7AULL, 0x19277B7044C27B38ULL } }, /* XSUM_XXH128_withSecret_testdata[3387] */\n    { 3388, 0x0000000000000000ULL, { 0x05849C1F2D68ECC0ULL, 0xDD8CE9D7A45AF4CBULL } }, /* XSUM_XXH128_withSecret_testdata[3388] */\n    { 3389, 0x0000000000000000ULL, { 0x3DB3176DC226A032ULL, 0xDB5276C2A68E6485ULL } }, /* XSUM_XXH128_withSecret_testdata[3389] */\n    { 3390, 0x0000000000000000ULL, { 0xC81C6F3080B6E009ULL, 0xC20905992B379C78ULL } }, /* XSUM_XXH128_withSecret_testdata[3390] */\n    { 3391, 0x0000000000000000ULL, { 0x42E42EB70B7207D1ULL, 0x3F14E6B904364407ULL } }, /* XSUM_XXH128_withSecret_testdata[3391] */\n    { 3392, 0x0000000000000000ULL, { 0x82FA4358B988550DULL, 0xB3FEEB82E0DA8305ULL } }, /* XSUM_XXH128_withSecret_testdata[3392] */\n    { 3393, 0x0000000000000000ULL, { 0x093C69D9241951C5ULL, 0xC8FC838893013BE1ULL } }, /* XSUM_XXH128_withSecret_testdata[3393] */\n    { 3394, 0x0000000000000000ULL, { 0xB9782191AD905FA7ULL, 0x97B10B1AD125B5A2ULL } }, /* XSUM_XXH128_withSecret_testdata[3394] */\n    { 3395, 0x0000000000000000ULL, { 0x5ACD4F5C19F7D7A8ULL, 0xC09469572A1AD6BBULL } }, /* XSUM_XXH128_withSecret_testdata[3395] */\n    { 3396, 0x0000000000000000ULL, { 0xD78563937BE06A6CULL, 0x4BFC2604E7E0A2AEULL } }, /* XSUM_XXH128_withSecret_testdata[3396] */\n    { 3397, 0x0000000000000000ULL, { 0x7B583784D1ABF630ULL, 0x11E7D1143CAC2431ULL } }, /* XSUM_XXH128_withSecret_testdata[3397] */\n    { 3398, 0x0000000000000000ULL, { 0x34A3E1EDB4806DE4ULL, 0x21EBD6AF050EE60DULL } }, /* XSUM_XXH128_withSecret_testdata[3398] */\n    { 3399, 0x0000000000000000ULL, { 0x258BAD758E0FAC7CULL, 0x4CA46EF94B24B47AULL } }, /* XSUM_XXH128_withSecret_testdata[3399] */\n    { 3400, 0x0000000000000000ULL, { 0x79BA922E496E37A4ULL, 0xC690CC9B0A07F5B7ULL } }, /* XSUM_XXH128_withSecret_testdata[3400] */\n    { 3401, 0x0000000000000000ULL, { 0xD2C6D271ED08F4FBULL, 0xDE521D48F762C361ULL } }, /* XSUM_XXH128_withSecret_testdata[3401] */\n    { 3402, 0x0000000000000000ULL, { 0x777E2F00B8C6C6B1ULL, 0x9142D5FFBE2095C2ULL } }, /* XSUM_XXH128_withSecret_testdata[3402] */\n    { 3403, 0x0000000000000000ULL, { 0xA33A36F54892C4C2ULL, 0x25E1BBCEEC7DBE7EULL } }, /* XSUM_XXH128_withSecret_testdata[3403] */\n    { 3404, 0x0000000000000000ULL, { 0x83D54CC50F2B4C82ULL, 0xA4F12C3FC45973F5ULL } }, /* XSUM_XXH128_withSecret_testdata[3404] */\n    { 3405, 0x0000000000000000ULL, { 0xB86A5DEAFA888777ULL, 0x522ADA5EDB2E3F69ULL } }, /* XSUM_XXH128_withSecret_testdata[3405] */\n    { 3406, 0x0000000000000000ULL, { 0x93394DCB88F3233CULL, 0xA26F2BE4F65CE029ULL } }, /* XSUM_XXH128_withSecret_testdata[3406] */\n    { 3407, 0x0000000000000000ULL, { 0xAB29CE5CD9E87492ULL, 0x368C44E102ECD32DULL } }, /* XSUM_XXH128_withSecret_testdata[3407] */\n    { 3408, 0x0000000000000000ULL, { 0xD24C131AA2728CDFULL, 0xFC2E72131409DB8BULL } }, /* XSUM_XXH128_withSecret_testdata[3408] */\n    { 3409, 0x0000000000000000ULL, { 0xEC1AA50643F6BEB4ULL, 0x08212BBEA0569524ULL } }, /* XSUM_XXH128_withSecret_testdata[3409] */\n    { 3410, 0x0000000000000000ULL, { 0xDC8CC90497C3070AULL, 0x0C1E536BD4CADA60ULL } }, /* XSUM_XXH128_withSecret_testdata[3410] */\n    { 3411, 0x0000000000000000ULL, { 0xCDF848036CC2D584ULL, 0x73D8212F897B48B0ULL } }, /* XSUM_XXH128_withSecret_testdata[3411] */\n    { 3412, 0x0000000000000000ULL, { 0xF5FF7497697376B5ULL, 0x41701BBB3F58C6C1ULL } }, /* XSUM_XXH128_withSecret_testdata[3412] */\n    { 3413, 0x0000000000000000ULL, { 0x61AEB2965FC007F9ULL, 0x73451FF564161836ULL } }, /* XSUM_XXH128_withSecret_testdata[3413] */\n    { 3414, 0x0000000000000000ULL, { 0xC8331389EE21A290ULL, 0x1E0CC3E6B16EDC4FULL } }, /* XSUM_XXH128_withSecret_testdata[3414] */\n    { 3415, 0x0000000000000000ULL, { 0xD25ACAD6E45BEC7EULL, 0x41CD62B6AC9B6223ULL } }, /* XSUM_XXH128_withSecret_testdata[3415] */\n    { 3416, 0x0000000000000000ULL, { 0x9C79AD9A2989B5B0ULL, 0x3280D6D48623B6F2ULL } }, /* XSUM_XXH128_withSecret_testdata[3416] */\n    { 3417, 0x0000000000000000ULL, { 0x7B7A9186400259C3ULL, 0x6CF13B54342B7D6EULL } }, /* XSUM_XXH128_withSecret_testdata[3417] */\n    { 3418, 0x0000000000000000ULL, { 0xC090B82039D98D66ULL, 0x0AB00B4A337A09B4ULL } }, /* XSUM_XXH128_withSecret_testdata[3418] */\n    { 3419, 0x0000000000000000ULL, { 0x1616EFC6B06CE942ULL, 0x13218CAF43474D32ULL } }, /* XSUM_XXH128_withSecret_testdata[3419] */\n    { 3420, 0x0000000000000000ULL, { 0x536959E69DDBDA4DULL, 0x4ABE26A508980417ULL } }, /* XSUM_XXH128_withSecret_testdata[3420] */\n    { 3421, 0x0000000000000000ULL, { 0x308BC74EAD14A59EULL, 0x457267AE3CDEA9B6ULL } }, /* XSUM_XXH128_withSecret_testdata[3421] */\n    { 3422, 0x0000000000000000ULL, { 0xE9E96C5C85C6E33DULL, 0x6D56A757F2AB3FDAULL } }, /* XSUM_XXH128_withSecret_testdata[3422] */\n    { 3423, 0x0000000000000000ULL, { 0x97B51867A23476C7ULL, 0x14C67E58FCF4E5B9ULL } }, /* XSUM_XXH128_withSecret_testdata[3423] */\n    { 3424, 0x0000000000000000ULL, { 0xDBA270BBD09D0382ULL, 0x631864BF1C2DA5CDULL } }, /* XSUM_XXH128_withSecret_testdata[3424] */\n    { 3425, 0x0000000000000000ULL, { 0x2B3A9E8D9890E5EDULL, 0xF67BBAD02EDE0C64ULL } }, /* XSUM_XXH128_withSecret_testdata[3425] */\n    { 3426, 0x0000000000000000ULL, { 0xB8AEDCB04D901184ULL, 0x3A1C0DC9FA5D2BE2ULL } }, /* XSUM_XXH128_withSecret_testdata[3426] */\n    { 3427, 0x0000000000000000ULL, { 0x72973E93DD568423ULL, 0x55C83C56B6C856D8ULL } }, /* XSUM_XXH128_withSecret_testdata[3427] */\n    { 3428, 0x0000000000000000ULL, { 0x8642362E361F385BULL, 0x6342142225691F92ULL } }, /* XSUM_XXH128_withSecret_testdata[3428] */\n    { 3429, 0x0000000000000000ULL, { 0xEA93D41FC4BE6EF3ULL, 0x51D889B5FAAA6E64ULL } }, /* XSUM_XXH128_withSecret_testdata[3429] */\n    { 3430, 0x0000000000000000ULL, { 0x53A9D7804532B024ULL, 0x79FA36A53E8A8916ULL } }, /* XSUM_XXH128_withSecret_testdata[3430] */\n    { 3431, 0x0000000000000000ULL, { 0x0D6669392B360D1AULL, 0x02B5BC4804DD0D45ULL } }, /* XSUM_XXH128_withSecret_testdata[3431] */\n    { 3432, 0x0000000000000000ULL, { 0xD61A6DDFF9192A4AULL, 0x659ED00610061E2FULL } }, /* XSUM_XXH128_withSecret_testdata[3432] */\n    { 3433, 0x0000000000000000ULL, { 0x258EF23516BA0AD6ULL, 0x0C05DA7D4BD64F69ULL } }, /* XSUM_XXH128_withSecret_testdata[3433] */\n    { 3434, 0x0000000000000000ULL, { 0x1D8F02DB1F6D895AULL, 0xB5B1CE361619A9BDULL } }, /* XSUM_XXH128_withSecret_testdata[3434] */\n    { 3435, 0x0000000000000000ULL, { 0x1731E194D0768893ULL, 0x496FB332747E1010ULL } }, /* XSUM_XXH128_withSecret_testdata[3435] */\n    { 3436, 0x0000000000000000ULL, { 0xD5535C6A2B10C987ULL, 0x400DF91951A4BAA5ULL } }, /* XSUM_XXH128_withSecret_testdata[3436] */\n    { 3437, 0x0000000000000000ULL, { 0x283020A907CF151AULL, 0xB6022CE6AE3A191FULL } }, /* XSUM_XXH128_withSecret_testdata[3437] */\n    { 3438, 0x0000000000000000ULL, { 0xF70ACA1841EE13BEULL, 0xA81D100EB4B3FAA4ULL } }, /* XSUM_XXH128_withSecret_testdata[3438] */\n    { 3439, 0x0000000000000000ULL, { 0x4293F1911E7B457FULL, 0x021806193936A129ULL } }, /* XSUM_XXH128_withSecret_testdata[3439] */\n    { 3440, 0x0000000000000000ULL, { 0xFFF9BF31E101EBF5ULL, 0x19776C5EB0ED8184ULL } }, /* XSUM_XXH128_withSecret_testdata[3440] */\n    { 3441, 0x0000000000000000ULL, { 0xFA3ACD1C15F4A837ULL, 0xBAD86D2A528591C0ULL } }, /* XSUM_XXH128_withSecret_testdata[3441] */\n    { 3442, 0x0000000000000000ULL, { 0x94CFFAD4CA5A5B35ULL, 0xFE8E196824E6C127ULL } }, /* XSUM_XXH128_withSecret_testdata[3442] */\n    { 3443, 0x0000000000000000ULL, { 0xEFAC9A8E9C224383ULL, 0xC8148C32B9DC24F8ULL } }, /* XSUM_XXH128_withSecret_testdata[3443] */\n    { 3444, 0x0000000000000000ULL, { 0x55F6012D99ADCC77ULL, 0xB45E3C6F7D93144CULL } }, /* XSUM_XXH128_withSecret_testdata[3444] */\n    { 3445, 0x0000000000000000ULL, { 0xF9D085CD6FD41AC1ULL, 0x51760575D6F9453CULL } }, /* XSUM_XXH128_withSecret_testdata[3445] */\n    { 3446, 0x0000000000000000ULL, { 0x75EAF0D20198628BULL, 0x7D7A45A2E061CE0EULL } }, /* XSUM_XXH128_withSecret_testdata[3446] */\n    { 3447, 0x0000000000000000ULL, { 0xC989C6AD9C5AF1E3ULL, 0x155FA2B3A77C9234ULL } }, /* XSUM_XXH128_withSecret_testdata[3447] */\n    { 3448, 0x0000000000000000ULL, { 0x684DF3EBFD7F9B21ULL, 0x8ACCD850ADEA0140ULL } }, /* XSUM_XXH128_withSecret_testdata[3448] */\n    { 3449, 0x0000000000000000ULL, { 0x3EC4EEDFC8418706ULL, 0x75527CCAA4EA9965ULL } }, /* XSUM_XXH128_withSecret_testdata[3449] */\n    { 3450, 0x0000000000000000ULL, { 0x3C7F7AA726BFFCD3ULL, 0xF62E0F714655C018ULL } }, /* XSUM_XXH128_withSecret_testdata[3450] */\n    { 3451, 0x0000000000000000ULL, { 0x9F4A22AD503F31CCULL, 0x3CE6C411CBA36F39ULL } }, /* XSUM_XXH128_withSecret_testdata[3451] */\n    { 3452, 0x0000000000000000ULL, { 0x5544A4478AB92340ULL, 0x919C82BBB281AE3EULL } }, /* XSUM_XXH128_withSecret_testdata[3452] */\n    { 3453, 0x0000000000000000ULL, { 0x7913996FC7843BD6ULL, 0x2EC8C9529EAAE765ULL } }, /* XSUM_XXH128_withSecret_testdata[3453] */\n    { 3454, 0x0000000000000000ULL, { 0x668F78CFD1C07BD1ULL, 0x3A54FB6FD41015E6ULL } }, /* XSUM_XXH128_withSecret_testdata[3454] */\n    { 3455, 0x0000000000000000ULL, { 0xDC83E3831178BA1BULL, 0xBD4D6AADEF59B45DULL } }, /* XSUM_XXH128_withSecret_testdata[3455] */\n    { 3456, 0x0000000000000000ULL, { 0xBD3FC86BB5AC2B3CULL, 0x7E135CFF5E0A680AULL } }, /* XSUM_XXH128_withSecret_testdata[3456] */\n    { 3457, 0x0000000000000000ULL, { 0xB5D6A0E431E5326FULL, 0x8400C48BBF3889D0ULL } }, /* XSUM_XXH128_withSecret_testdata[3457] */\n    { 3458, 0x0000000000000000ULL, { 0x3F96397D0AEE13FAULL, 0xA6E854259A581FD3ULL } }, /* XSUM_XXH128_withSecret_testdata[3458] */\n    { 3459, 0x0000000000000000ULL, { 0xA057BB7D8FFBE4EFULL, 0x5DBCFA1F62085B4FULL } }, /* XSUM_XXH128_withSecret_testdata[3459] */\n    { 3460, 0x0000000000000000ULL, { 0x0B5B3120716A277DULL, 0x17138E39E68BFE13ULL } }, /* XSUM_XXH128_withSecret_testdata[3460] */\n    { 3461, 0x0000000000000000ULL, { 0x3ADD2BAED9FBB522ULL, 0x41D062878408AB10ULL } }, /* XSUM_XXH128_withSecret_testdata[3461] */\n    { 3462, 0x0000000000000000ULL, { 0x9F5D67039AA7B20AULL, 0x126CD3630B2270A6ULL } }, /* XSUM_XXH128_withSecret_testdata[3462] */\n    { 3463, 0x0000000000000000ULL, { 0xED541A1A74A8E0D6ULL, 0x54741D036E8EDCDCULL } }, /* XSUM_XXH128_withSecret_testdata[3463] */\n    { 3464, 0x0000000000000000ULL, { 0x21A1B9C81F31BD56ULL, 0xDDDD6FAABC3385E5ULL } }, /* XSUM_XXH128_withSecret_testdata[3464] */\n    { 3465, 0x0000000000000000ULL, { 0x2AB63DF73A5FD82BULL, 0xF007ECB319CCDBE8ULL } }, /* XSUM_XXH128_withSecret_testdata[3465] */\n    { 3466, 0x0000000000000000ULL, { 0xA13D48E366FE694FULL, 0x60C9619A598700E2ULL } }, /* XSUM_XXH128_withSecret_testdata[3466] */\n    { 3467, 0x0000000000000000ULL, { 0xCBC1A8BC9E23A2C8ULL, 0xEB47F9F5025315A7ULL } }, /* XSUM_XXH128_withSecret_testdata[3467] */\n    { 3468, 0x0000000000000000ULL, { 0xBE271DEE6955B1F8ULL, 0x19CC18A66CE9F47AULL } }, /* XSUM_XXH128_withSecret_testdata[3468] */\n    { 3469, 0x0000000000000000ULL, { 0xA4AC7A4DD33CB54EULL, 0x5DE64DDDBD5A8D4CULL } }, /* XSUM_XXH128_withSecret_testdata[3469] */\n    { 3470, 0x0000000000000000ULL, { 0x7A33C76C43E97C63ULL, 0xAC28B1BF3A550C43ULL } }, /* XSUM_XXH128_withSecret_testdata[3470] */\n    { 3471, 0x0000000000000000ULL, { 0x36098BE82B1D6630ULL, 0x187B0A5D8317E68EULL } }, /* XSUM_XXH128_withSecret_testdata[3471] */\n    { 3472, 0x0000000000000000ULL, { 0x7F361C40279A7156ULL, 0x4E53129778BAC9CBULL } }, /* XSUM_XXH128_withSecret_testdata[3472] */\n    { 3473, 0x0000000000000000ULL, { 0x2CC810852E1BB733ULL, 0x1824A8D9526F0225ULL } }, /* XSUM_XXH128_withSecret_testdata[3473] */\n    { 3474, 0x0000000000000000ULL, { 0xC0CA765A630B30ADULL, 0x4C4235724AA154BDULL } }, /* XSUM_XXH128_withSecret_testdata[3474] */\n    { 3475, 0x0000000000000000ULL, { 0x1B97DC802A05F93EULL, 0xDF1A38B8690CA225ULL } }, /* XSUM_XXH128_withSecret_testdata[3475] */\n    { 3476, 0x0000000000000000ULL, { 0x9BE7B4728943211FULL, 0x7386A997D9952D9DULL } }, /* XSUM_XXH128_withSecret_testdata[3476] */\n    { 3477, 0x0000000000000000ULL, { 0x46024E5F8747440EULL, 0x38EAC25C786ECA74ULL } }, /* XSUM_XXH128_withSecret_testdata[3477] */\n    { 3478, 0x0000000000000000ULL, { 0x3611EB1A2CA4FE01ULL, 0x90B4BE1FDD43869AULL } }, /* XSUM_XXH128_withSecret_testdata[3478] */\n    { 3479, 0x0000000000000000ULL, { 0x3D5E5E1369724D8FULL, 0x38F48A2B2D1BF750ULL } }, /* XSUM_XXH128_withSecret_testdata[3479] */\n    { 3480, 0x0000000000000000ULL, { 0x3777657FE0E2103AULL, 0xE7CAD7782EB97BD5ULL } }, /* XSUM_XXH128_withSecret_testdata[3480] */\n    { 3481, 0x0000000000000000ULL, { 0x1182DAAB985250A5ULL, 0x7BF5F8FCA471D3FAULL } }, /* XSUM_XXH128_withSecret_testdata[3481] */\n    { 3482, 0x0000000000000000ULL, { 0x9D72547E8773AA1FULL, 0x30D743F6B06442D7ULL } }, /* XSUM_XXH128_withSecret_testdata[3482] */\n    { 3483, 0x0000000000000000ULL, { 0x022316F49083EEA8ULL, 0x8D3EB9905CA435E6ULL } }, /* XSUM_XXH128_withSecret_testdata[3483] */\n    { 3484, 0x0000000000000000ULL, { 0xF4DD6BCAC532838CULL, 0x3AE6B8FFAC2CB508ULL } }, /* XSUM_XXH128_withSecret_testdata[3484] */\n    { 3485, 0x0000000000000000ULL, { 0x0C1A9A078ADB82E6ULL, 0xE02A2A18DBFBBDB7ULL } }, /* XSUM_XXH128_withSecret_testdata[3485] */\n    { 3486, 0x0000000000000000ULL, { 0xD063A1BE391CB91EULL, 0x7AE9220AFF8136D0ULL } }, /* XSUM_XXH128_withSecret_testdata[3486] */\n    { 3487, 0x0000000000000000ULL, { 0x680EA488740E19F5ULL, 0xBF1D0B9A4AF346D7ULL } }, /* XSUM_XXH128_withSecret_testdata[3487] */\n    { 3488, 0x0000000000000000ULL, { 0xBE9D44B1C25FF51DULL, 0x2A44604E51A9F57CULL } }, /* XSUM_XXH128_withSecret_testdata[3488] */\n    { 3489, 0x0000000000000000ULL, { 0xC522140D7EB13068ULL, 0xB725403448461257ULL } }, /* XSUM_XXH128_withSecret_testdata[3489] */\n    { 3490, 0x0000000000000000ULL, { 0x87D5F5143378E63AULL, 0x05BC0A74D887E256ULL } }, /* XSUM_XXH128_withSecret_testdata[3490] */\n    { 3491, 0x0000000000000000ULL, { 0x2B5526EA89A862E9ULL, 0x141144038786FF09ULL } }, /* XSUM_XXH128_withSecret_testdata[3491] */\n    { 3492, 0x0000000000000000ULL, { 0xB0E4F51AE9532152ULL, 0xA7F93AD6A22BF271ULL } }, /* XSUM_XXH128_withSecret_testdata[3492] */\n    { 3493, 0x0000000000000000ULL, { 0xF517E37DF40186A6ULL, 0xDE8AEB5DCBB3CCCBULL } }, /* XSUM_XXH128_withSecret_testdata[3493] */\n    { 3494, 0x0000000000000000ULL, { 0x9471C5B58399F14EULL, 0x56596848A1FE638EULL } }, /* XSUM_XXH128_withSecret_testdata[3494] */\n    { 3495, 0x0000000000000000ULL, { 0x367DC8C13EA45D49ULL, 0xFFCF398571ABBF32ULL } }, /* XSUM_XXH128_withSecret_testdata[3495] */\n    { 3496, 0x0000000000000000ULL, { 0xFA63C29BD3E79A0BULL, 0xF0401FFA45E1C9F0ULL } }, /* XSUM_XXH128_withSecret_testdata[3496] */\n    { 3497, 0x0000000000000000ULL, { 0xF0D40F8AF56875DCULL, 0x83F9AB597ACBA37EULL } }, /* XSUM_XXH128_withSecret_testdata[3497] */\n    { 3498, 0x0000000000000000ULL, { 0x218260B595F251EDULL, 0xB80DD1D791D966A0ULL } }, /* XSUM_XXH128_withSecret_testdata[3498] */\n    { 3499, 0x0000000000000000ULL, { 0x5CD2D64184919EE1ULL, 0xEE1312DE139F4C8FULL } }, /* XSUM_XXH128_withSecret_testdata[3499] */\n    { 3500, 0x0000000000000000ULL, { 0xA8D6FFA8E88CAAC1ULL, 0xF6B6EE8AE7E1EE25ULL } }, /* XSUM_XXH128_withSecret_testdata[3500] */\n    { 3501, 0x0000000000000000ULL, { 0x00559483FB681A14ULL, 0xEA694881C419936FULL } }, /* XSUM_XXH128_withSecret_testdata[3501] */\n    { 3502, 0x0000000000000000ULL, { 0x7BB6A0499D828F3AULL, 0x4AF492B77B5228B6ULL } }, /* XSUM_XXH128_withSecret_testdata[3502] */\n    { 3503, 0x0000000000000000ULL, { 0xF54E38E392CDC9FFULL, 0xD3B4A574249829C1ULL } }, /* XSUM_XXH128_withSecret_testdata[3503] */\n    { 3504, 0x0000000000000000ULL, { 0x68C8BED722F70F29ULL, 0x3C3F34C4CDA0A557ULL } }, /* XSUM_XXH128_withSecret_testdata[3504] */\n    { 3505, 0x0000000000000000ULL, { 0x8FAA3D530B78038BULL, 0x77EDB64B8C31BCCFULL } }, /* XSUM_XXH128_withSecret_testdata[3505] */\n    { 3506, 0x0000000000000000ULL, { 0x7217EA896318D81BULL, 0x16802D83CB8DF051ULL } }, /* XSUM_XXH128_withSecret_testdata[3506] */\n    { 3507, 0x0000000000000000ULL, { 0xD3329B5DB272AD1CULL, 0x69E97668A5362810ULL } }, /* XSUM_XXH128_withSecret_testdata[3507] */\n    { 3508, 0x0000000000000000ULL, { 0x3F178629EAAA53E2ULL, 0xBFB827331B602B5BULL } }, /* XSUM_XXH128_withSecret_testdata[3508] */\n    { 3509, 0x0000000000000000ULL, { 0x0E880000C319A233ULL, 0x9E5AFC2EEFBD4A59ULL } }, /* XSUM_XXH128_withSecret_testdata[3509] */\n    { 3510, 0x0000000000000000ULL, { 0x5131CD8B7A9DA841ULL, 0xAC89C8DE987CE9D3ULL } }, /* XSUM_XXH128_withSecret_testdata[3510] */\n    { 3511, 0x0000000000000000ULL, { 0x116E9A3F1B0EAD60ULL, 0xF2E3CBC1460BF0EBULL } }, /* XSUM_XXH128_withSecret_testdata[3511] */\n    { 3512, 0x0000000000000000ULL, { 0x4D877B440F8C9E21ULL, 0xE9EE0EDC7B84DA66ULL } }, /* XSUM_XXH128_withSecret_testdata[3512] */\n    { 3513, 0x0000000000000000ULL, { 0xB5A3F7DC5DB9B323ULL, 0x38C902F2219F260EULL } }, /* XSUM_XXH128_withSecret_testdata[3513] */\n    { 3514, 0x0000000000000000ULL, { 0x7E57BB5FEA85F44BULL, 0x2DF3F2BC3694669BULL } }, /* XSUM_XXH128_withSecret_testdata[3514] */\n    { 3515, 0x0000000000000000ULL, { 0x7F5959414C7047A7ULL, 0x316ABD0E00FCFCD3ULL } }, /* XSUM_XXH128_withSecret_testdata[3515] */\n    { 3516, 0x0000000000000000ULL, { 0xA3080EE0954618B4ULL, 0xFC2E91E8B759CADDULL } }, /* XSUM_XXH128_withSecret_testdata[3516] */\n    { 3517, 0x0000000000000000ULL, { 0xFC144E068075D4A0ULL, 0x9F2143E210158ECFULL } }, /* XSUM_XXH128_withSecret_testdata[3517] */\n    { 3518, 0x0000000000000000ULL, { 0xBC4CFDDC25674520ULL, 0x97A6B6D80BBA8143ULL } }, /* XSUM_XXH128_withSecret_testdata[3518] */\n    { 3519, 0x0000000000000000ULL, { 0x86484327D89DAF41ULL, 0xBECEB0B78C9153BBULL } }, /* XSUM_XXH128_withSecret_testdata[3519] */\n    { 3520, 0x0000000000000000ULL, { 0x68A2F0773F075633ULL, 0xF9B31D3C1AD0FB9CULL } }, /* XSUM_XXH128_withSecret_testdata[3520] */\n    { 3521, 0x0000000000000000ULL, { 0xB69CC64FAADBB820ULL, 0x668B450194A348DFULL } }, /* XSUM_XXH128_withSecret_testdata[3521] */\n    { 3522, 0x0000000000000000ULL, { 0x492B501DEAEF4FF0ULL, 0xAD1BD33EDCE0775DULL } }, /* XSUM_XXH128_withSecret_testdata[3522] */\n    { 3523, 0x0000000000000000ULL, { 0xC88BD6340BE8014DULL, 0xA6AC9B89E55FED9EULL } }, /* XSUM_XXH128_withSecret_testdata[3523] */\n    { 3524, 0x0000000000000000ULL, { 0x942BE9E21E2A4D63ULL, 0xDE91CD834EDC7CDEULL } }, /* XSUM_XXH128_withSecret_testdata[3524] */\n    { 3525, 0x0000000000000000ULL, { 0xF473FAD358FE75F8ULL, 0xB6CB4FB48B59977DULL } }, /* XSUM_XXH128_withSecret_testdata[3525] */\n    { 3526, 0x0000000000000000ULL, { 0x7BC0BAC88A27AEF6ULL, 0xC69F8C9F65AC7D67ULL } }, /* XSUM_XXH128_withSecret_testdata[3526] */\n    { 3527, 0x0000000000000000ULL, { 0x7649FD5EF3277B3BULL, 0xD8DC149C43EB66CEULL } }, /* XSUM_XXH128_withSecret_testdata[3527] */\n    { 3528, 0x0000000000000000ULL, { 0x145AB1F42B600E7FULL, 0x2E030EB3BB99EAE6ULL } }, /* XSUM_XXH128_withSecret_testdata[3528] */\n    { 3529, 0x0000000000000000ULL, { 0x563CEE44F6371D4EULL, 0xD3B1B01EF2DC86E7ULL } }, /* XSUM_XXH128_withSecret_testdata[3529] */\n    { 3530, 0x0000000000000000ULL, { 0x4ABD41196F8910F4ULL, 0x42AC3170646B109AULL } }, /* XSUM_XXH128_withSecret_testdata[3530] */\n    { 3531, 0x0000000000000000ULL, { 0xA407B860E9317657ULL, 0x658C36E0D8CB0B99ULL } }, /* XSUM_XXH128_withSecret_testdata[3531] */\n    { 3532, 0x0000000000000000ULL, { 0x26EAA7780E207FBFULL, 0x3A08E5E4EC1EBC69ULL } }, /* XSUM_XXH128_withSecret_testdata[3532] */\n    { 3533, 0x0000000000000000ULL, { 0xD7FFE10A171EDB54ULL, 0x6F00299790A8052BULL } }, /* XSUM_XXH128_withSecret_testdata[3533] */\n    { 3534, 0x0000000000000000ULL, { 0x3A92D578E1BDA03DULL, 0xC915A24F617CA10CULL } }, /* XSUM_XXH128_withSecret_testdata[3534] */\n    { 3535, 0x0000000000000000ULL, { 0x0199237099517BEBULL, 0xD7C848AB24AA17AFULL } }, /* XSUM_XXH128_withSecret_testdata[3535] */\n    { 3536, 0x0000000000000000ULL, { 0xFBEE7D5E392C26D4ULL, 0xF822C9D2C797760AULL } }, /* XSUM_XXH128_withSecret_testdata[3536] */\n    { 3537, 0x0000000000000000ULL, { 0xBDFD0088D497ED2FULL, 0x930666D67A2DFFD4ULL } }, /* XSUM_XXH128_withSecret_testdata[3537] */\n    { 3538, 0x0000000000000000ULL, { 0x913ADB607F7346BAULL, 0x38E5B7D3E30A8906ULL } }, /* XSUM_XXH128_withSecret_testdata[3538] */\n    { 3539, 0x0000000000000000ULL, { 0xAB338CEBDA365578ULL, 0x9BD8308AB6C3E7CCULL } }, /* XSUM_XXH128_withSecret_testdata[3539] */\n    { 3540, 0x0000000000000000ULL, { 0xC69DB27CB9AF675EULL, 0xD04E45EB060D0376ULL } }, /* XSUM_XXH128_withSecret_testdata[3540] */\n    { 3541, 0x0000000000000000ULL, { 0xE2FBEAF26A98C333ULL, 0xBD1D5E3231F709F8ULL } }, /* XSUM_XXH128_withSecret_testdata[3541] */\n    { 3542, 0x0000000000000000ULL, { 0x5CB786875FD33694ULL, 0x2C1E935823B37C1CULL } }, /* XSUM_XXH128_withSecret_testdata[3542] */\n    { 3543, 0x0000000000000000ULL, { 0x093F890C691390C5ULL, 0x6E01E710C1B6CF69ULL } }, /* XSUM_XXH128_withSecret_testdata[3543] */\n    { 3544, 0x0000000000000000ULL, { 0x779F918D25F304D2ULL, 0xC70060B52D17DC19ULL } }, /* XSUM_XXH128_withSecret_testdata[3544] */\n    { 3545, 0x0000000000000000ULL, { 0xD1CCD84274C2157FULL, 0xDD2E07FE89B124BEULL } }, /* XSUM_XXH128_withSecret_testdata[3545] */\n    { 3546, 0x0000000000000000ULL, { 0xE503ADE933E1EBA7ULL, 0xC2661CA126DA542AULL } }, /* XSUM_XXH128_withSecret_testdata[3546] */\n    { 3547, 0x0000000000000000ULL, { 0x31D46CEB10F92FACULL, 0x7FC1D3A038E5CBBAULL } }, /* XSUM_XXH128_withSecret_testdata[3547] */\n    { 3548, 0x0000000000000000ULL, { 0x955A378CF5ACAB28ULL, 0x7E0078633C94B7FBULL } }, /* XSUM_XXH128_withSecret_testdata[3548] */\n    { 3549, 0x0000000000000000ULL, { 0x67FB9B45D80BF422ULL, 0x62DD93DBB01D3C2EULL } }, /* XSUM_XXH128_withSecret_testdata[3549] */\n    { 3550, 0x0000000000000000ULL, { 0x48913A9057BB25BBULL, 0xE136129F162361C0ULL } }, /* XSUM_XXH128_withSecret_testdata[3550] */\n    { 3551, 0x0000000000000000ULL, { 0x2A9236D869059A44ULL, 0xE1B7F9E4AFE4BE03ULL } }, /* XSUM_XXH128_withSecret_testdata[3551] */\n    { 3552, 0x0000000000000000ULL, { 0x3F5EECA3B0516EB9ULL, 0x4CB76D23D2D0E7C2ULL } }, /* XSUM_XXH128_withSecret_testdata[3552] */\n    { 3553, 0x0000000000000000ULL, { 0xD334174F750CF9AFULL, 0x6220911A3285D02EULL } }, /* XSUM_XXH128_withSecret_testdata[3553] */\n    { 3554, 0x0000000000000000ULL, { 0x591884D8EC794875ULL, 0x385B0C5743336858ULL } }, /* XSUM_XXH128_withSecret_testdata[3554] */\n    { 3555, 0x0000000000000000ULL, { 0x0FFC2DF8CE4AB956ULL, 0x691A3B51433C4A89ULL } }, /* XSUM_XXH128_withSecret_testdata[3555] */\n    { 3556, 0x0000000000000000ULL, { 0xE1405F0654D54E5AULL, 0x99D114334760D55EULL } }, /* XSUM_XXH128_withSecret_testdata[3556] */\n    { 3557, 0x0000000000000000ULL, { 0x82FEDEB47FDDA9D7ULL, 0xCE25FD97181D3DD1ULL } }, /* XSUM_XXH128_withSecret_testdata[3557] */\n    { 3558, 0x0000000000000000ULL, { 0xF5AC976F29F525EBULL, 0x955D8CF39E19EBCAULL } }, /* XSUM_XXH128_withSecret_testdata[3558] */\n    { 3559, 0x0000000000000000ULL, { 0x5E084976A1D92262ULL, 0x618E46DF2B03FF51ULL } }, /* XSUM_XXH128_withSecret_testdata[3559] */\n    { 3560, 0x0000000000000000ULL, { 0xDEDBFD6CB3BAD25BULL, 0x9A82B0A7D5C2C41AULL } }, /* XSUM_XXH128_withSecret_testdata[3560] */\n    { 3561, 0x0000000000000000ULL, { 0x4065E1690CA6B2D3ULL, 0x8CD4757A772164A1ULL } }, /* XSUM_XXH128_withSecret_testdata[3561] */\n    { 3562, 0x0000000000000000ULL, { 0x4005ADBD239EAC3BULL, 0xA2A9D18B8A16C967ULL } }, /* XSUM_XXH128_withSecret_testdata[3562] */\n    { 3563, 0x0000000000000000ULL, { 0x904933B2B60879C5ULL, 0x574ED362590052F2ULL } }, /* XSUM_XXH128_withSecret_testdata[3563] */\n    { 3564, 0x0000000000000000ULL, { 0xAE8A4B93560A3CBAULL, 0x7BD0CAC36A387317ULL } }, /* XSUM_XXH128_withSecret_testdata[3564] */\n    { 3565, 0x0000000000000000ULL, { 0x85F5586B522C8B75ULL, 0xAECE5C34EEF439D6ULL } }, /* XSUM_XXH128_withSecret_testdata[3565] */\n    { 3566, 0x0000000000000000ULL, { 0xB8626D8B20C2B1D8ULL, 0xD6CE8BF76D5C5BC4ULL } }, /* XSUM_XXH128_withSecret_testdata[3566] */\n    { 3567, 0x0000000000000000ULL, { 0x8BAE6D7ED0145D71ULL, 0xB6F1A940FAD77FD1ULL } }, /* XSUM_XXH128_withSecret_testdata[3567] */\n    { 3568, 0x0000000000000000ULL, { 0xCE2A3966C6EAB263ULL, 0x91ADD37AEA87AC9CULL } }, /* XSUM_XXH128_withSecret_testdata[3568] */\n    { 3569, 0x0000000000000000ULL, { 0xC187A11B99654153ULL, 0xF3D5AA70BE18C611ULL } }, /* XSUM_XXH128_withSecret_testdata[3569] */\n    { 3570, 0x0000000000000000ULL, { 0x7576A3857F02863BULL, 0x7AA48745BF8B2234ULL } }, /* XSUM_XXH128_withSecret_testdata[3570] */\n    { 3571, 0x0000000000000000ULL, { 0x7CE79F2F32812262ULL, 0x56D53CC696C59C46ULL } }, /* XSUM_XXH128_withSecret_testdata[3571] */\n    { 3572, 0x0000000000000000ULL, { 0x0566340B25C7698CULL, 0xFC7D6B7DD132523FULL } }, /* XSUM_XXH128_withSecret_testdata[3572] */\n    { 3573, 0x0000000000000000ULL, { 0xCBB7CDE1F4A2629CULL, 0xDB8CB08FCE8465CDULL } }, /* XSUM_XXH128_withSecret_testdata[3573] */\n    { 3574, 0x0000000000000000ULL, { 0x54A31560323CF6A8ULL, 0x9AA58F808ED9F6A0ULL } }, /* XSUM_XXH128_withSecret_testdata[3574] */\n    { 3575, 0x0000000000000000ULL, { 0x8B3C00FF37CFDC35ULL, 0x5749F9881CC117BAULL } }, /* XSUM_XXH128_withSecret_testdata[3575] */\n    { 3576, 0x0000000000000000ULL, { 0x6CBF4B6F2F663076ULL, 0x5F6C6EA44897CA37ULL } }, /* XSUM_XXH128_withSecret_testdata[3576] */\n    { 3577, 0x0000000000000000ULL, { 0x744D2DEF804E02F6ULL, 0xB26D70C83BBD9B87ULL } }, /* XSUM_XXH128_withSecret_testdata[3577] */\n    { 3578, 0x0000000000000000ULL, { 0xDBA8658D39D669E9ULL, 0xC834CD0CEABAE21FULL } }, /* XSUM_XXH128_withSecret_testdata[3578] */\n    { 3579, 0x0000000000000000ULL, { 0x9D6021A58F675AA8ULL, 0xEAED604BBF64A759ULL } }, /* XSUM_XXH128_withSecret_testdata[3579] */\n    { 3580, 0x0000000000000000ULL, { 0xE5B1DDE4DD40BD1CULL, 0x4B7528E9C000121AULL } }, /* XSUM_XXH128_withSecret_testdata[3580] */\n    { 3581, 0x0000000000000000ULL, { 0x7E7919DD1258900DULL, 0xD39758630406C053ULL } }, /* XSUM_XXH128_withSecret_testdata[3581] */\n    { 3582, 0x0000000000000000ULL, { 0xCC13F7C38D17C331ULL, 0xE186C272D414E52AULL } }, /* XSUM_XXH128_withSecret_testdata[3582] */\n    { 3583, 0x0000000000000000ULL, { 0xFA22827AF6C4BF5BULL, 0xF10FC660DEECB279ULL } }, /* XSUM_XXH128_withSecret_testdata[3583] */\n    { 3584, 0x0000000000000000ULL, { 0x67FD740F19C06775ULL, 0x7E6558905C8F390CULL } }, /* XSUM_XXH128_withSecret_testdata[3584] */\n    { 3585, 0x0000000000000000ULL, { 0x2D56EA589DE0B5ADULL, 0x0C94C991D5600034ULL } }, /* XSUM_XXH128_withSecret_testdata[3585] */\n    { 3586, 0x0000000000000000ULL, { 0x83578517FB5732D3ULL, 0x6DEC474F06C904BCULL } }, /* XSUM_XXH128_withSecret_testdata[3586] */\n    { 3587, 0x0000000000000000ULL, { 0x583F8A960F22B1D2ULL, 0x621AFC4F309B4E36ULL } }, /* XSUM_XXH128_withSecret_testdata[3587] */\n    { 3588, 0x0000000000000000ULL, { 0x29C57FE0F226E9C9ULL, 0xE59AD6BDC1E8CC55ULL } }, /* XSUM_XXH128_withSecret_testdata[3588] */\n    { 3589, 0x0000000000000000ULL, { 0xD596D4108C1343A8ULL, 0xA018B83065C4155CULL } }, /* XSUM_XXH128_withSecret_testdata[3589] */\n    { 3590, 0x0000000000000000ULL, { 0x33F576E3671AE132ULL, 0x70F0F28ADC3D4DBFULL } }, /* XSUM_XXH128_withSecret_testdata[3590] */\n    { 3591, 0x0000000000000000ULL, { 0x8685990709433B50ULL, 0x4667208E3357E8C5ULL } }, /* XSUM_XXH128_withSecret_testdata[3591] */\n    { 3592, 0x0000000000000000ULL, { 0xD0BE36496EBDD162ULL, 0xDF6FC537CA2526ABULL } }, /* XSUM_XXH128_withSecret_testdata[3592] */\n    { 3593, 0x0000000000000000ULL, { 0x89CA224F64403215ULL, 0xECA564181BA0DB0EULL } }, /* XSUM_XXH128_withSecret_testdata[3593] */\n    { 3594, 0x0000000000000000ULL, { 0x3FE5569B45626A3EULL, 0x5B5C761802C18732ULL } }, /* XSUM_XXH128_withSecret_testdata[3594] */\n    { 3595, 0x0000000000000000ULL, { 0x3C2BFDE5F55EEFBFULL, 0x5A4D3644AF28D0DBULL } }, /* XSUM_XXH128_withSecret_testdata[3595] */\n    { 3596, 0x0000000000000000ULL, { 0x7A5608B2040F9B98ULL, 0x491D79330141F7B6ULL } }, /* XSUM_XXH128_withSecret_testdata[3596] */\n    { 3597, 0x0000000000000000ULL, { 0xAE3B0A88BD95C013ULL, 0xEEA56B7C33A62AF8ULL } }, /* XSUM_XXH128_withSecret_testdata[3597] */\n    { 3598, 0x0000000000000000ULL, { 0xEDDBEF70B16F362FULL, 0x6B437B423BAAD623ULL } }, /* XSUM_XXH128_withSecret_testdata[3598] */\n    { 3599, 0x0000000000000000ULL, { 0xD66C5A019D495089ULL, 0x7E65A33DB4C1A238ULL } }, /* XSUM_XXH128_withSecret_testdata[3599] */\n    { 3600, 0x0000000000000000ULL, { 0x12ECA429B130C61AULL, 0x10AB5550793C7B3FULL } }, /* XSUM_XXH128_withSecret_testdata[3600] */\n    { 3601, 0x0000000000000000ULL, { 0xDD9D353BA9000578ULL, 0xCA31696447BED5D5ULL } }, /* XSUM_XXH128_withSecret_testdata[3601] */\n    { 3602, 0x0000000000000000ULL, { 0x5825919EE11D0B9AULL, 0x4383E93A40B073DCULL } }, /* XSUM_XXH128_withSecret_testdata[3602] */\n    { 3603, 0x0000000000000000ULL, { 0x9DD38DC468658916ULL, 0x819FDF4FCCD8D6A7ULL } }, /* XSUM_XXH128_withSecret_testdata[3603] */\n    { 3604, 0x0000000000000000ULL, { 0x21A36E3176D2F743ULL, 0x4D75712B8D62795FULL } }, /* XSUM_XXH128_withSecret_testdata[3604] */\n    { 3605, 0x0000000000000000ULL, { 0xF83B77A6680719FEULL, 0xAC99843B47E8A038ULL } }, /* XSUM_XXH128_withSecret_testdata[3605] */\n    { 3606, 0x0000000000000000ULL, { 0xD4B1975280EB54F2ULL, 0x90CE66C21944E2F4ULL } }, /* XSUM_XXH128_withSecret_testdata[3606] */\n    { 3607, 0x0000000000000000ULL, { 0x602F4720DA49BDEAULL, 0x5670AD50FA849D1CULL } }, /* XSUM_XXH128_withSecret_testdata[3607] */\n    { 3608, 0x0000000000000000ULL, { 0x59A285BCB4BBDBFBULL, 0x206963A9D2A5ACAFULL } }, /* XSUM_XXH128_withSecret_testdata[3608] */\n    { 3609, 0x0000000000000000ULL, { 0xD9519020FEF530A7ULL, 0x0658BFDE304CF3F4ULL } }, /* XSUM_XXH128_withSecret_testdata[3609] */\n    { 3610, 0x0000000000000000ULL, { 0xAACF5921E6D501ECULL, 0xA067E477F08620DEULL } }, /* XSUM_XXH128_withSecret_testdata[3610] */\n    { 3611, 0x0000000000000000ULL, { 0x07A636AF3271EBB6ULL, 0x53C210A268AB9A2AULL } }, /* XSUM_XXH128_withSecret_testdata[3611] */\n    { 3612, 0x0000000000000000ULL, { 0x4013EA3FE665B0D5ULL, 0x05AB6EB0B93B50A7ULL } }, /* XSUM_XXH128_withSecret_testdata[3612] */\n    { 3613, 0x0000000000000000ULL, { 0x2EC368F9BB598D51ULL, 0x11037168A1072533ULL } }, /* XSUM_XXH128_withSecret_testdata[3613] */\n    { 3614, 0x0000000000000000ULL, { 0xBD2165F9606C8D61ULL, 0x23D6865B5D395FBAULL } }, /* XSUM_XXH128_withSecret_testdata[3614] */\n    { 3615, 0x0000000000000000ULL, { 0xDFAF7B5D28668D5EULL, 0xCB91D6D4A9582235ULL } }, /* XSUM_XXH128_withSecret_testdata[3615] */\n    { 3616, 0x0000000000000000ULL, { 0x3D6FDCBF546F83D0ULL, 0x19E32F719D09BD4AULL } }, /* XSUM_XXH128_withSecret_testdata[3616] */\n    { 3617, 0x0000000000000000ULL, { 0xF23C27847715A884ULL, 0xDB44BE024F116E2DULL } }, /* XSUM_XXH128_withSecret_testdata[3617] */\n    { 3618, 0x0000000000000000ULL, { 0x240A3D3B1B06AD6FULL, 0x2E622CDA3A7AC6F0ULL } }, /* XSUM_XXH128_withSecret_testdata[3618] */\n    { 3619, 0x0000000000000000ULL, { 0x5DE3B1263086D356ULL, 0x02F16C050E687D6CULL } }, /* XSUM_XXH128_withSecret_testdata[3619] */\n    { 3620, 0x0000000000000000ULL, { 0xACFAE3B137C0AF5AULL, 0x3A4D41ED8C9D4120ULL } }, /* XSUM_XXH128_withSecret_testdata[3620] */\n    { 3621, 0x0000000000000000ULL, { 0xA1B32A532E4AE965ULL, 0xE0800443ECA54B73ULL } }, /* XSUM_XXH128_withSecret_testdata[3621] */\n    { 3622, 0x0000000000000000ULL, { 0x7803002806FE567DULL, 0x5E7C4C68D9362901ULL } }, /* XSUM_XXH128_withSecret_testdata[3622] */\n    { 3623, 0x0000000000000000ULL, { 0xE350F1C3D9B30327ULL, 0x2275287F02B51C03ULL } }, /* XSUM_XXH128_withSecret_testdata[3623] */\n    { 3624, 0x0000000000000000ULL, { 0xD3C100B30A2DF110ULL, 0x80FACA9B3FE61D6BULL } }, /* XSUM_XXH128_withSecret_testdata[3624] */\n    { 3625, 0x0000000000000000ULL, { 0x4684AF31B6374A8DULL, 0x64B17FD6FBE86DC1ULL } }, /* XSUM_XXH128_withSecret_testdata[3625] */\n    { 3626, 0x0000000000000000ULL, { 0x4F1A0143A68B1CD5ULL, 0x9231C1AC37C932E5ULL } }, /* XSUM_XXH128_withSecret_testdata[3626] */\n    { 3627, 0x0000000000000000ULL, { 0xB086237B79F08F2AULL, 0x6D04E17773CF55EDULL } }, /* XSUM_XXH128_withSecret_testdata[3627] */\n    { 3628, 0x0000000000000000ULL, { 0x61A6E3B6CB72D192ULL, 0xF632404B96B60101ULL } }, /* XSUM_XXH128_withSecret_testdata[3628] */\n    { 3629, 0x0000000000000000ULL, { 0x13FB132F642B074FULL, 0x8AB4C9A53B946DE2ULL } }, /* XSUM_XXH128_withSecret_testdata[3629] */\n    { 3630, 0x0000000000000000ULL, { 0xC335AE03249A6F93ULL, 0x4F04B4FED1F27774ULL } }, /* XSUM_XXH128_withSecret_testdata[3630] */\n    { 3631, 0x0000000000000000ULL, { 0x86BB9D9B7810927CULL, 0x5A186129AF9C1B4BULL } }, /* XSUM_XXH128_withSecret_testdata[3631] */\n    { 3632, 0x0000000000000000ULL, { 0x97CF88EE83090D33ULL, 0xAEA1D739E1E6C581ULL } }, /* XSUM_XXH128_withSecret_testdata[3632] */\n    { 3633, 0x0000000000000000ULL, { 0xAD7264DE0835485FULL, 0x91351A42B4844225ULL } }, /* XSUM_XXH128_withSecret_testdata[3633] */\n    { 3634, 0x0000000000000000ULL, { 0xEB6874CDF40A6ADAULL, 0x94B9385ADA767096ULL } }, /* XSUM_XXH128_withSecret_testdata[3634] */\n    { 3635, 0x0000000000000000ULL, { 0xE4D8C29D2D21CDCDULL, 0xC8E2530280055FE0ULL } }, /* XSUM_XXH128_withSecret_testdata[3635] */\n    { 3636, 0x0000000000000000ULL, { 0x2F70C55B1CE33DF2ULL, 0x1839D66F6ADAF1B4ULL } }, /* XSUM_XXH128_withSecret_testdata[3636] */\n    { 3637, 0x0000000000000000ULL, { 0x32CB28B1E0DC2AEFULL, 0xB4B0A5013801DD5FULL } }, /* XSUM_XXH128_withSecret_testdata[3637] */\n    { 3638, 0x0000000000000000ULL, { 0x1F8A763161F47771ULL, 0x9C41FE985095DD0FULL } }, /* XSUM_XXH128_withSecret_testdata[3638] */\n    { 3639, 0x0000000000000000ULL, { 0x4B9E7F78ED95A2F9ULL, 0xDE95AFBC88A668EFULL } }, /* XSUM_XXH128_withSecret_testdata[3639] */\n    { 3640, 0x0000000000000000ULL, { 0x0330B8B4657E5D20ULL, 0xE6527026071B9EACULL } }, /* XSUM_XXH128_withSecret_testdata[3640] */\n    { 3641, 0x0000000000000000ULL, { 0xCB5EB84AC49FCD38ULL, 0x4831CCC7F886850AULL } }, /* XSUM_XXH128_withSecret_testdata[3641] */\n    { 3642, 0x0000000000000000ULL, { 0x9954450CB7119880ULL, 0xB692E66988005919ULL } }, /* XSUM_XXH128_withSecret_testdata[3642] */\n    { 3643, 0x0000000000000000ULL, { 0x39A6D0CCD9D7334DULL, 0x4EB862D03CCBCBFFULL } }, /* XSUM_XXH128_withSecret_testdata[3643] */\n    { 3644, 0x0000000000000000ULL, { 0x29F426ACE9922249ULL, 0xFBB6E3DC5EE6D636ULL } }, /* XSUM_XXH128_withSecret_testdata[3644] */\n    { 3645, 0x0000000000000000ULL, { 0xD6BCCF95E17F5A5AULL, 0x4E81DCD400A81702ULL } }, /* XSUM_XXH128_withSecret_testdata[3645] */\n    { 3646, 0x0000000000000000ULL, { 0x52E2F5BBA58DE285ULL, 0x33FDE381627E76DCULL } }, /* XSUM_XXH128_withSecret_testdata[3646] */\n    { 3647, 0x0000000000000000ULL, { 0x5C2F0AF653744211ULL, 0x8D2B90DBB9177C76ULL } }, /* XSUM_XXH128_withSecret_testdata[3647] */\n    { 3648, 0x0000000000000000ULL, { 0x13D0266107F906FEULL, 0xF216B03BADD8D08AULL } }, /* XSUM_XXH128_withSecret_testdata[3648] */\n    { 3649, 0x0000000000000000ULL, { 0x73B63D1E9267CBC3ULL, 0x1C3DEF2062C316F3ULL } }, /* XSUM_XXH128_withSecret_testdata[3649] */\n    { 3650, 0x0000000000000000ULL, { 0x5AE4F695636FBDB3ULL, 0x6C850EF5C22F98FEULL } }, /* XSUM_XXH128_withSecret_testdata[3650] */\n    { 3651, 0x0000000000000000ULL, { 0xBE6F08CB4A10EA2DULL, 0x123E3E0F69A7B976ULL } }, /* XSUM_XXH128_withSecret_testdata[3651] */\n    { 3652, 0x0000000000000000ULL, { 0x9ECE66636DF61E30ULL, 0xFD26E69B6A9EAA59ULL } }, /* XSUM_XXH128_withSecret_testdata[3652] */\n    { 3653, 0x0000000000000000ULL, { 0x76897F6B48754D9CULL, 0x0F004AC1E0A04FC1ULL } }, /* XSUM_XXH128_withSecret_testdata[3653] */\n    { 3654, 0x0000000000000000ULL, { 0x96893F3A1625D67CULL, 0x5649A6D6B5FCE672ULL } }, /* XSUM_XXH128_withSecret_testdata[3654] */\n    { 3655, 0x0000000000000000ULL, { 0x1BFA6342365DB03EULL, 0x6BA8B5B535E8E2ABULL } }, /* XSUM_XXH128_withSecret_testdata[3655] */\n    { 3656, 0x0000000000000000ULL, { 0x9CAEDFDC9E5BBC45ULL, 0x92A45251117A6AA0ULL } }, /* XSUM_XXH128_withSecret_testdata[3656] */\n    { 3657, 0x0000000000000000ULL, { 0xEAD8C3DF0BC2B6EEULL, 0x1A758FD9E844ADD2ULL } }, /* XSUM_XXH128_withSecret_testdata[3657] */\n    { 3658, 0x0000000000000000ULL, { 0x5F3510D10299D194ULL, 0xF33117B1D0182D8DULL } }, /* XSUM_XXH128_withSecret_testdata[3658] */\n    { 3659, 0x0000000000000000ULL, { 0x4F7D6E007B2E2EE7ULL, 0x3DF7069966FF8D21ULL } }, /* XSUM_XXH128_withSecret_testdata[3659] */\n    { 3660, 0x0000000000000000ULL, { 0xD5F60C63C8EC5E09ULL, 0x8A290852CDAD7503ULL } }, /* XSUM_XXH128_withSecret_testdata[3660] */\n    { 3661, 0x0000000000000000ULL, { 0x30959A76A7B20A41ULL, 0x551214A875D93EFAULL } }, /* XSUM_XXH128_withSecret_testdata[3661] */\n    { 3662, 0x0000000000000000ULL, { 0x27F8DA0A1E12A2BDULL, 0xBC1E28FBBD0ED43BULL } }, /* XSUM_XXH128_withSecret_testdata[3662] */\n    { 3663, 0x0000000000000000ULL, { 0xEF629975E153E4CEULL, 0x088414603272089EULL } }, /* XSUM_XXH128_withSecret_testdata[3663] */\n    { 3664, 0x0000000000000000ULL, { 0x33F7BFE74C443E29ULL, 0xCC0D197D9E0941A8ULL } }, /* XSUM_XXH128_withSecret_testdata[3664] */\n    { 3665, 0x0000000000000000ULL, { 0xE8A73C1DD4AB5D52ULL, 0x7843195517B02F6DULL } }, /* XSUM_XXH128_withSecret_testdata[3665] */\n    { 3666, 0x0000000000000000ULL, { 0x63E3746CC32627BDULL, 0xE874151531E77DCCULL } }, /* XSUM_XXH128_withSecret_testdata[3666] */\n    { 3667, 0x0000000000000000ULL, { 0x8872F8B441AE8026ULL, 0x1D327BAE3496AAF1ULL } }, /* XSUM_XXH128_withSecret_testdata[3667] */\n    { 3668, 0x0000000000000000ULL, { 0x34E1FCC0E6FC205CULL, 0x341C213A8E4DB8CCULL } }, /* XSUM_XXH128_withSecret_testdata[3668] */\n    { 3669, 0x0000000000000000ULL, { 0xCC5BDD63DE4C9FA8ULL, 0x8CB2375BA70C659AULL } }, /* XSUM_XXH128_withSecret_testdata[3669] */\n    { 3670, 0x0000000000000000ULL, { 0xA958069D7004AF42ULL, 0xB636D1DB0AA18897ULL } }, /* XSUM_XXH128_withSecret_testdata[3670] */\n    { 3671, 0x0000000000000000ULL, { 0x03C01B5A23891673ULL, 0x302B32049A620892ULL } }, /* XSUM_XXH128_withSecret_testdata[3671] */\n    { 3672, 0x0000000000000000ULL, { 0xFE4E34A64A5497BAULL, 0xAF24183EAEB7F39FULL } }, /* XSUM_XXH128_withSecret_testdata[3672] */\n    { 3673, 0x0000000000000000ULL, { 0xDB1DBA66C78E84DBULL, 0xA73C1DCD3472EE57ULL } }, /* XSUM_XXH128_withSecret_testdata[3673] */\n    { 3674, 0x0000000000000000ULL, { 0x001F20363F2628DBULL, 0x8E15CC3D124CF050ULL } }, /* XSUM_XXH128_withSecret_testdata[3674] */\n    { 3675, 0x0000000000000000ULL, { 0xE03DD488BF20420DULL, 0x33FF10584F2E8676ULL } }, /* XSUM_XXH128_withSecret_testdata[3675] */\n    { 3676, 0x0000000000000000ULL, { 0xE7A872FDEFCA807BULL, 0x484EFEE6D1F0BD60ULL } }, /* XSUM_XXH128_withSecret_testdata[3676] */\n    { 3677, 0x0000000000000000ULL, { 0x72B8216B72DFE57AULL, 0x965502B73B9B8E33ULL } }, /* XSUM_XXH128_withSecret_testdata[3677] */\n    { 3678, 0x0000000000000000ULL, { 0x9B0B6D2B15023E94ULL, 0x23BA6EB9216C3883ULL } }, /* XSUM_XXH128_withSecret_testdata[3678] */\n    { 3679, 0x0000000000000000ULL, { 0x3C2A43ABE217905AULL, 0x1DF33E382BB49FCCULL } }, /* XSUM_XXH128_withSecret_testdata[3679] */\n    { 3680, 0x0000000000000000ULL, { 0x21A35114EC6CDAE8ULL, 0xBC40D4984CB2B7FEULL } }, /* XSUM_XXH128_withSecret_testdata[3680] */\n    { 3681, 0x0000000000000000ULL, { 0x048CB0141AC4C76AULL, 0xF1A6B438D5DAC413ULL } }, /* XSUM_XXH128_withSecret_testdata[3681] */\n    { 3682, 0x0000000000000000ULL, { 0xE5AFFACD2AC33F04ULL, 0x79E43AF15106A64BULL } }, /* XSUM_XXH128_withSecret_testdata[3682] */\n    { 3683, 0x0000000000000000ULL, { 0x2FEBC09FA68F6EDEULL, 0xA0804C7852045C99ULL } }, /* XSUM_XXH128_withSecret_testdata[3683] */\n    { 3684, 0x0000000000000000ULL, { 0x044907FA64CEBE97ULL, 0xDFBF9B96BCC8E4C9ULL } }, /* XSUM_XXH128_withSecret_testdata[3684] */\n    { 3685, 0x0000000000000000ULL, { 0x18B8803680479C1FULL, 0xF7FD3F491048408FULL } }, /* XSUM_XXH128_withSecret_testdata[3685] */\n    { 3686, 0x0000000000000000ULL, { 0x3B434DC270FFA40EULL, 0x236CA81DE5FDAB28ULL } }, /* XSUM_XXH128_withSecret_testdata[3686] */\n    { 3687, 0x0000000000000000ULL, { 0x0E81B1243D4ECBA7ULL, 0x6389ECBE1643DF6BULL } }, /* XSUM_XXH128_withSecret_testdata[3687] */\n    { 3688, 0x0000000000000000ULL, { 0xDB48C5430E0E2B55ULL, 0x82F6A90E59A28E7CULL } }, /* XSUM_XXH128_withSecret_testdata[3688] */\n    { 3689, 0x0000000000000000ULL, { 0x4DA4C8361F09744CULL, 0xA6382E9431ADE881ULL } }, /* XSUM_XXH128_withSecret_testdata[3689] */\n    { 3690, 0x0000000000000000ULL, { 0x4880F9B5A5272B75ULL, 0xFA446188A5ECC6BEULL } }, /* XSUM_XXH128_withSecret_testdata[3690] */\n    { 3691, 0x0000000000000000ULL, { 0xF9C814C22C0ADCF5ULL, 0x0557BB4598582ECCULL } }, /* XSUM_XXH128_withSecret_testdata[3691] */\n    { 3692, 0x0000000000000000ULL, { 0xDBCA1057366F2159ULL, 0xC2C19CCED088C4AFULL } }, /* XSUM_XXH128_withSecret_testdata[3692] */\n    { 3693, 0x0000000000000000ULL, { 0xC35907B3C5889075ULL, 0xED1FE611155F931EULL } }, /* XSUM_XXH128_withSecret_testdata[3693] */\n    { 3694, 0x0000000000000000ULL, { 0x072767B99173763DULL, 0x80292EA3DFF7787AULL } }, /* XSUM_XXH128_withSecret_testdata[3694] */\n    { 3695, 0x0000000000000000ULL, { 0x8F06E469E4C88337ULL, 0xCEB62FA518A42F2BULL } }, /* XSUM_XXH128_withSecret_testdata[3695] */\n    { 3696, 0x0000000000000000ULL, { 0xE37A69802CE42D43ULL, 0xDD53239A93E68FF8ULL } }, /* XSUM_XXH128_withSecret_testdata[3696] */\n    { 3697, 0x0000000000000000ULL, { 0x10EA5A56C4D77ABEULL, 0x05F2B58BB8AF4315ULL } }, /* XSUM_XXH128_withSecret_testdata[3697] */\n    { 3698, 0x0000000000000000ULL, { 0xA26396BD4BCFF063ULL, 0x11EB12F2FFE86077ULL } }, /* XSUM_XXH128_withSecret_testdata[3698] */\n    { 3699, 0x0000000000000000ULL, { 0x5A128CB189F273E3ULL, 0xF7BFA5CA3A4710EDULL } }, /* XSUM_XXH128_withSecret_testdata[3699] */\n    { 3700, 0x0000000000000000ULL, { 0xE0D7D181B089D4FCULL, 0xF6FFEA802B82E7A3ULL } }, /* XSUM_XXH128_withSecret_testdata[3700] */\n    { 3701, 0x0000000000000000ULL, { 0xB0B1D7BD188AF12AULL, 0xE8C03AB83AD9CF1DULL } }, /* XSUM_XXH128_withSecret_testdata[3701] */\n    { 3702, 0x0000000000000000ULL, { 0x31C2116B4AC8C726ULL, 0xE6857F21675E4AB4ULL } }, /* XSUM_XXH128_withSecret_testdata[3702] */\n    { 3703, 0x0000000000000000ULL, { 0xC71F338F4647AFC5ULL, 0xBED1A820003BBCEBULL } }, /* XSUM_XXH128_withSecret_testdata[3703] */\n    { 3704, 0x0000000000000000ULL, { 0xBDA992AD1A4CBF1BULL, 0x4E36F15B99CED1B1ULL } }, /* XSUM_XXH128_withSecret_testdata[3704] */\n    { 3705, 0x0000000000000000ULL, { 0x63DC6F9CDE581FC3ULL, 0x97BEC37E5D753142ULL } }, /* XSUM_XXH128_withSecret_testdata[3705] */\n    { 3706, 0x0000000000000000ULL, { 0xE71687229E8DC725ULL, 0xCA55400E7EB7A92EULL } }, /* XSUM_XXH128_withSecret_testdata[3706] */\n    { 3707, 0x0000000000000000ULL, { 0xF6267DED115F5C50ULL, 0xFCB25836D337820DULL } }, /* XSUM_XXH128_withSecret_testdata[3707] */\n    { 3708, 0x0000000000000000ULL, { 0xED27136F285EECF5ULL, 0x632937F9BCB99F4FULL } }, /* XSUM_XXH128_withSecret_testdata[3708] */\n    { 3709, 0x0000000000000000ULL, { 0x18A8AF1881FD9A23ULL, 0x3F2379634B9FF564ULL } }, /* XSUM_XXH128_withSecret_testdata[3709] */\n    { 3710, 0x0000000000000000ULL, { 0x0E87706AAF47190DULL, 0xB36B10616B98C079ULL } }, /* XSUM_XXH128_withSecret_testdata[3710] */\n    { 3711, 0x0000000000000000ULL, { 0xC9ACE76107EA4689ULL, 0xADD29A137DB2F177ULL } }, /* XSUM_XXH128_withSecret_testdata[3711] */\n    { 3712, 0x0000000000000000ULL, { 0x1DB32201CD76C745ULL, 0xE7A16B40190C4940ULL } }, /* XSUM_XXH128_withSecret_testdata[3712] */\n    { 3713, 0x0000000000000000ULL, { 0xFFE21B586BF9A39AULL, 0xD5DA0C82D4B05C48ULL } }, /* XSUM_XXH128_withSecret_testdata[3713] */\n    { 3714, 0x0000000000000000ULL, { 0xF3F49E55DD107D6DULL, 0x9C275686445CA002ULL } }, /* XSUM_XXH128_withSecret_testdata[3714] */\n    { 3715, 0x0000000000000000ULL, { 0xE9D9654ED3D54F89ULL, 0x86CF8219626A5B19ULL } }, /* XSUM_XXH128_withSecret_testdata[3715] */\n    { 3716, 0x0000000000000000ULL, { 0x9CBECD831B45BB4CULL, 0x0B4D241F463DD49DULL } }, /* XSUM_XXH128_withSecret_testdata[3716] */\n    { 3717, 0x0000000000000000ULL, { 0x485976A8B12D67BBULL, 0x4762C7BFC780E49CULL } }, /* XSUM_XXH128_withSecret_testdata[3717] */\n    { 3718, 0x0000000000000000ULL, { 0xB7585765FC20C4A2ULL, 0xEA6CA0EA9EE33487ULL } }, /* XSUM_XXH128_withSecret_testdata[3718] */\n    { 3719, 0x0000000000000000ULL, { 0xB1DA481EDE8C3255ULL, 0xC836FBA1DDFCF10DULL } }, /* XSUM_XXH128_withSecret_testdata[3719] */\n    { 3720, 0x0000000000000000ULL, { 0xB8C0A08B5E236251ULL, 0x5047459C5E3BD360ULL } }, /* XSUM_XXH128_withSecret_testdata[3720] */\n    { 3721, 0x0000000000000000ULL, { 0x5A255FC9D278D00AULL, 0xCAB1161197685DE8ULL } }, /* XSUM_XXH128_withSecret_testdata[3721] */\n    { 3722, 0x0000000000000000ULL, { 0x48F4BE2687506EA9ULL, 0x79C0C706A38096A0ULL } }, /* XSUM_XXH128_withSecret_testdata[3722] */\n    { 3723, 0x0000000000000000ULL, { 0x2558380F89CAEB03ULL, 0x9FCE2062EC6D4906ULL } }, /* XSUM_XXH128_withSecret_testdata[3723] */\n    { 3724, 0x0000000000000000ULL, { 0x0DC2E4D8D7ECA5E0ULL, 0xB1B7AA22FF1393BFULL } }, /* XSUM_XXH128_withSecret_testdata[3724] */\n    { 3725, 0x0000000000000000ULL, { 0x05F606044236F491ULL, 0xD814CF2A649657B1ULL } }, /* XSUM_XXH128_withSecret_testdata[3725] */\n    { 3726, 0x0000000000000000ULL, { 0x7406113BF7451CF1ULL, 0x90075E8088B2671EULL } }, /* XSUM_XXH128_withSecret_testdata[3726] */\n    { 3727, 0x0000000000000000ULL, { 0x76FB9D866FAFB2BAULL, 0x8334B9F7EB6D3DE9ULL } }, /* XSUM_XXH128_withSecret_testdata[3727] */\n    { 3728, 0x0000000000000000ULL, { 0x7E137B468B29D288ULL, 0x32E91132C2ADE718ULL } }, /* XSUM_XXH128_withSecret_testdata[3728] */\n    { 3729, 0x0000000000000000ULL, { 0x7EF51369C118D410ULL, 0x30189B04DBA895B9ULL } }, /* XSUM_XXH128_withSecret_testdata[3729] */\n    { 3730, 0x0000000000000000ULL, { 0xCA6DBC27D4DF0824ULL, 0xEE525D521870A10AULL } }, /* XSUM_XXH128_withSecret_testdata[3730] */\n    { 3731, 0x0000000000000000ULL, { 0xAC173AD877A8B109ULL, 0xBE035B0C7A5460E2ULL } }, /* XSUM_XXH128_withSecret_testdata[3731] */\n    { 3732, 0x0000000000000000ULL, { 0x3B23CCA050FDB25EULL, 0x00D0595E5121101CULL } }, /* XSUM_XXH128_withSecret_testdata[3732] */\n    { 3733, 0x0000000000000000ULL, { 0x54992EA328E6A79AULL, 0x1316ADCA331574D9ULL } }, /* XSUM_XXH128_withSecret_testdata[3733] */\n    { 3734, 0x0000000000000000ULL, { 0x1526C8960EA4823EULL, 0x004300598AFB8C6AULL } }, /* XSUM_XXH128_withSecret_testdata[3734] */\n    { 3735, 0x0000000000000000ULL, { 0xA94DD15791A710EFULL, 0x553F87808A455EE0ULL } }, /* XSUM_XXH128_withSecret_testdata[3735] */\n    { 3736, 0x0000000000000000ULL, { 0x0AE776D7B71B14EEULL, 0x4F25856965089050ULL } }, /* XSUM_XXH128_withSecret_testdata[3736] */\n    { 3737, 0x0000000000000000ULL, { 0x7A84970010538609ULL, 0x5D28BE599E83340DULL } }, /* XSUM_XXH128_withSecret_testdata[3737] */\n    { 3738, 0x0000000000000000ULL, { 0xAA6BCBD050ED92E3ULL, 0xD56BC6259D4DE3C7ULL } }, /* XSUM_XXH128_withSecret_testdata[3738] */\n    { 3739, 0x0000000000000000ULL, { 0xB61E295FBC27DC6FULL, 0x1E3AA41CD134A597ULL } }, /* XSUM_XXH128_withSecret_testdata[3739] */\n    { 3740, 0x0000000000000000ULL, { 0x9FE549999C1629FBULL, 0x924CBB6AE0514907ULL } }, /* XSUM_XXH128_withSecret_testdata[3740] */\n    { 3741, 0x0000000000000000ULL, { 0x9230E380E452E7D5ULL, 0xEE4AD80E7435A577ULL } }, /* XSUM_XXH128_withSecret_testdata[3741] */\n    { 3742, 0x0000000000000000ULL, { 0x50C2D319AC1DAD66ULL, 0xA9A53C519E71CB3AULL } }, /* XSUM_XXH128_withSecret_testdata[3742] */\n    { 3743, 0x0000000000000000ULL, { 0x0A4AB987174866CBULL, 0x7F068C1221198BABULL } }, /* XSUM_XXH128_withSecret_testdata[3743] */\n    { 3744, 0x0000000000000000ULL, { 0xEB1CA8391A884420ULL, 0xFD496AA77D5FE07CULL } }, /* XSUM_XXH128_withSecret_testdata[3744] */\n    { 3745, 0x0000000000000000ULL, { 0x1FFB61B556F72EE6ULL, 0x67751065D9BDD334ULL } }, /* XSUM_XXH128_withSecret_testdata[3745] */\n    { 3746, 0x0000000000000000ULL, { 0x75AA2A4413656C14ULL, 0x4F4AA3FD6B9839D6ULL } }, /* XSUM_XXH128_withSecret_testdata[3746] */\n    { 3747, 0x0000000000000000ULL, { 0x4CDA01A88A2AA595ULL, 0xD5A140C32FADA734ULL } }, /* XSUM_XXH128_withSecret_testdata[3747] */\n    { 3748, 0x0000000000000000ULL, { 0xF6DE07C01752A9BDULL, 0xCC8C56F4906CFD11ULL } }, /* XSUM_XXH128_withSecret_testdata[3748] */\n    { 3749, 0x0000000000000000ULL, { 0xA8A8B0A39D2A1FC2ULL, 0xB43E3F821CF7C5E3ULL } }, /* XSUM_XXH128_withSecret_testdata[3749] */\n    { 3750, 0x0000000000000000ULL, { 0x5784AB60AEA1B6BCULL, 0xBAF3F36F5A0C9663ULL } }, /* XSUM_XXH128_withSecret_testdata[3750] */\n    { 3751, 0x0000000000000000ULL, { 0xD64C5CB2A53FDCCAULL, 0x5F2FA4FF7B56D847ULL } }, /* XSUM_XXH128_withSecret_testdata[3751] */\n    { 3752, 0x0000000000000000ULL, { 0x4DAFBC77C45F9225ULL, 0x0247FB56E2069B01ULL } }, /* XSUM_XXH128_withSecret_testdata[3752] */\n    { 3753, 0x0000000000000000ULL, { 0xB075D911FFA1708FULL, 0x45D97E14EF54ABF7ULL } }, /* XSUM_XXH128_withSecret_testdata[3753] */\n    { 3754, 0x0000000000000000ULL, { 0xB152C65017329C71ULL, 0xF8A3BB36B64E033BULL } }, /* XSUM_XXH128_withSecret_testdata[3754] */\n    { 3755, 0x0000000000000000ULL, { 0xECEDCDA57DA1D9B6ULL, 0x45A36584E1C8D274ULL } }, /* XSUM_XXH128_withSecret_testdata[3755] */\n    { 3756, 0x0000000000000000ULL, { 0xF582183984FDB908ULL, 0x8D984F873D9DED31ULL } }, /* XSUM_XXH128_withSecret_testdata[3756] */\n    { 3757, 0x0000000000000000ULL, { 0x94BEE11D8AAA2CE3ULL, 0x9611A2DBCA466249ULL } }, /* XSUM_XXH128_withSecret_testdata[3757] */\n    { 3758, 0x0000000000000000ULL, { 0xE92ED29BFBB00F69ULL, 0x2175E9E7506BB208ULL } }, /* XSUM_XXH128_withSecret_testdata[3758] */\n    { 3759, 0x0000000000000000ULL, { 0x666F41EC3C2B2965ULL, 0x66BBEC748F2731F9ULL } }, /* XSUM_XXH128_withSecret_testdata[3759] */\n    { 3760, 0x0000000000000000ULL, { 0x7B9E87883F93C2F9ULL, 0x5EF3B016FAD2D6DFULL } }, /* XSUM_XXH128_withSecret_testdata[3760] */\n    { 3761, 0x0000000000000000ULL, { 0xEDADD8EFEEA8A3A0ULL, 0xA10E5A8EE0D4A7C6ULL } }, /* XSUM_XXH128_withSecret_testdata[3761] */\n    { 3762, 0x0000000000000000ULL, { 0xF342739645FF0E44ULL, 0xF655754E0CDB5F93ULL } }, /* XSUM_XXH128_withSecret_testdata[3762] */\n    { 3763, 0x0000000000000000ULL, { 0x2B0C530C6BC98851ULL, 0xD87936E5C59004A8ULL } }, /* XSUM_XXH128_withSecret_testdata[3763] */\n    { 3764, 0x0000000000000000ULL, { 0x8B612A3272D16644ULL, 0x08FC7D68F877DBAFULL } }, /* XSUM_XXH128_withSecret_testdata[3764] */\n    { 3765, 0x0000000000000000ULL, { 0xEA8BDCDEFCEF283CULL, 0xCB9AD1C1B9338B22ULL } }, /* XSUM_XXH128_withSecret_testdata[3765] */\n    { 3766, 0x0000000000000000ULL, { 0x6416BB5A98C1FB2AULL, 0xD56F6DDF2C2E3431ULL } }, /* XSUM_XXH128_withSecret_testdata[3766] */\n    { 3767, 0x0000000000000000ULL, { 0xB7F499E2B37496DCULL, 0x99D8B34070F37CB8ULL } }, /* XSUM_XXH128_withSecret_testdata[3767] */\n    { 3768, 0x0000000000000000ULL, { 0x33CB4D1B2ED8DC8DULL, 0xD388E910AE693432ULL } }, /* XSUM_XXH128_withSecret_testdata[3768] */\n    { 3769, 0x0000000000000000ULL, { 0xEAC1D6CFE61BE787ULL, 0x1CFEC1026ECBC881ULL } }, /* XSUM_XXH128_withSecret_testdata[3769] */\n    { 3770, 0x0000000000000000ULL, { 0x46C761EFDD47C86CULL, 0x271CC5D5699049E5ULL } }, /* XSUM_XXH128_withSecret_testdata[3770] */\n    { 3771, 0x0000000000000000ULL, { 0xAB537E712965BA86ULL, 0x39082A9E9AF968A3ULL } }, /* XSUM_XXH128_withSecret_testdata[3771] */\n    { 3772, 0x0000000000000000ULL, { 0x02D305D648501AADULL, 0xD5AE0175BBE942D7ULL } }, /* XSUM_XXH128_withSecret_testdata[3772] */\n    { 3773, 0x0000000000000000ULL, { 0xB17AD8CCD4BC7A04ULL, 0x0C3411FD80AE6405ULL } }, /* XSUM_XXH128_withSecret_testdata[3773] */\n    { 3774, 0x0000000000000000ULL, { 0xBCF6823A22C99244ULL, 0xE08CFDE823997C3CULL } }, /* XSUM_XXH128_withSecret_testdata[3774] */\n    { 3775, 0x0000000000000000ULL, { 0x96EEEB261AF86AD9ULL, 0x36521B3235EB864BULL } }, /* XSUM_XXH128_withSecret_testdata[3775] */\n    { 3776, 0x0000000000000000ULL, { 0x2C7A8443A839BA3AULL, 0xB5CBAE63894C7379ULL } }, /* XSUM_XXH128_withSecret_testdata[3776] */\n    { 3777, 0x0000000000000000ULL, { 0x0E474F9A93CCB242ULL, 0x5403B0FA090FF504ULL } }, /* XSUM_XXH128_withSecret_testdata[3777] */\n    { 3778, 0x0000000000000000ULL, { 0xFDC63A0F211D3154ULL, 0x34AAAF7E46D3C7EBULL } }, /* XSUM_XXH128_withSecret_testdata[3778] */\n    { 3779, 0x0000000000000000ULL, { 0xE56BED521618B7BAULL, 0x52FDCE63F644C14EULL } }, /* XSUM_XXH128_withSecret_testdata[3779] */\n    { 3780, 0x0000000000000000ULL, { 0xDA685DF97CA1506DULL, 0xEC3D03DD91665F05ULL } }, /* XSUM_XXH128_withSecret_testdata[3780] */\n    { 3781, 0x0000000000000000ULL, { 0x1C1FD38460B6F82AULL, 0x2F2EC2313092A143ULL } }, /* XSUM_XXH128_withSecret_testdata[3781] */\n    { 3782, 0x0000000000000000ULL, { 0xF9DF2C7BBBF67FA1ULL, 0x05D0D581DEF42659ULL } }, /* XSUM_XXH128_withSecret_testdata[3782] */\n    { 3783, 0x0000000000000000ULL, { 0x7BCFE3EF0B35C54FULL, 0x250708C41F6FD18FULL } }, /* XSUM_XXH128_withSecret_testdata[3783] */\n    { 3784, 0x0000000000000000ULL, { 0x77E909EC093B2113ULL, 0xFDB204915CC8B2C4ULL } }, /* XSUM_XXH128_withSecret_testdata[3784] */\n    { 3785, 0x0000000000000000ULL, { 0xB74CAA8CBFC01E10ULL, 0x177D70C9CFC574E2ULL } }, /* XSUM_XXH128_withSecret_testdata[3785] */\n    { 3786, 0x0000000000000000ULL, { 0xDAC8D10D0862BCD5ULL, 0x53F946795CAB7F1DULL } }, /* XSUM_XXH128_withSecret_testdata[3786] */\n    { 3787, 0x0000000000000000ULL, { 0xB9E4FAF7B370A187ULL, 0xD7F74DC4F9722AAAULL } }, /* XSUM_XXH128_withSecret_testdata[3787] */\n    { 3788, 0x0000000000000000ULL, { 0x3D82B66B5D1BB880ULL, 0x903811FB9EF8935DULL } }, /* XSUM_XXH128_withSecret_testdata[3788] */\n    { 3789, 0x0000000000000000ULL, { 0x9304E5F1EBAFE4C7ULL, 0xB5622198A036948CULL } }, /* XSUM_XXH128_withSecret_testdata[3789] */\n    { 3790, 0x0000000000000000ULL, { 0xC7A9C2576FBD767DULL, 0x601A9D64975E346CULL } }, /* XSUM_XXH128_withSecret_testdata[3790] */\n    { 3791, 0x0000000000000000ULL, { 0x14F01E3E28FC759DULL, 0x2064A854A3F28AE6ULL } }, /* XSUM_XXH128_withSecret_testdata[3791] */\n    { 3792, 0x0000000000000000ULL, { 0x76FD38736065BED7ULL, 0x1EA4DFA3207A480BULL } }, /* XSUM_XXH128_withSecret_testdata[3792] */\n    { 3793, 0x0000000000000000ULL, { 0x4E31D701EB7670D3ULL, 0xB3EC2E30282777CFULL } }, /* XSUM_XXH128_withSecret_testdata[3793] */\n    { 3794, 0x0000000000000000ULL, { 0x340F87F84F06CC94ULL, 0xA6FAF0DB69FAB8FEULL } }, /* XSUM_XXH128_withSecret_testdata[3794] */\n    { 3795, 0x0000000000000000ULL, { 0xDA2B3FBB4B61DB28ULL, 0x18365C5B6241310BULL } }, /* XSUM_XXH128_withSecret_testdata[3795] */\n    { 3796, 0x0000000000000000ULL, { 0x63401C635E1CEFFFULL, 0xA75AD25BDD073B90ULL } }, /* XSUM_XXH128_withSecret_testdata[3796] */\n    { 3797, 0x0000000000000000ULL, { 0x07EA5DE2D1677BB5ULL, 0x21D520BBB49D64CBULL } }, /* XSUM_XXH128_withSecret_testdata[3797] */\n    { 3798, 0x0000000000000000ULL, { 0x32882E6562EE4F9AULL, 0xF8CA3A0B9BF9A3E5ULL } }, /* XSUM_XXH128_withSecret_testdata[3798] */\n    { 3799, 0x0000000000000000ULL, { 0x16D20325CB5BAFD0ULL, 0x78EF6704D9265E7DULL } }, /* XSUM_XXH128_withSecret_testdata[3799] */\n    { 3800, 0x0000000000000000ULL, { 0xD1D2AE3C74F79A1DULL, 0x1E672E9D194C98DAULL } }, /* XSUM_XXH128_withSecret_testdata[3800] */\n    { 3801, 0x0000000000000000ULL, { 0x58F0413920C56ADBULL, 0x606D20FC45557FD7ULL } }, /* XSUM_XXH128_withSecret_testdata[3801] */\n    { 3802, 0x0000000000000000ULL, { 0x84B5A597342D2628ULL, 0x1539304B02386693ULL } }, /* XSUM_XXH128_withSecret_testdata[3802] */\n    { 3803, 0x0000000000000000ULL, { 0x49093794D9FC2868ULL, 0xEC793686C0FA481AULL } }, /* XSUM_XXH128_withSecret_testdata[3803] */\n    { 3804, 0x0000000000000000ULL, { 0x92FBA0D90B409409ULL, 0x7D88D99987FCD15AULL } }, /* XSUM_XXH128_withSecret_testdata[3804] */\n    { 3805, 0x0000000000000000ULL, { 0x649EA52C223F577AULL, 0xB96DED16CDAF578BULL } }, /* XSUM_XXH128_withSecret_testdata[3805] */\n    { 3806, 0x0000000000000000ULL, { 0x423C53D0087BFDD5ULL, 0x44FCF1ABED497468ULL } }, /* XSUM_XXH128_withSecret_testdata[3806] */\n    { 3807, 0x0000000000000000ULL, { 0x613799A6F9D3F0C2ULL, 0xEF3544B362EBEA23ULL } }, /* XSUM_XXH128_withSecret_testdata[3807] */\n    { 3808, 0x0000000000000000ULL, { 0x1DD793160A191682ULL, 0x55378472784E553CULL } }, /* XSUM_XXH128_withSecret_testdata[3808] */\n    { 3809, 0x0000000000000000ULL, { 0xE354257ACA462674ULL, 0x4874F80A39AC81B7ULL } }, /* XSUM_XXH128_withSecret_testdata[3809] */\n    { 3810, 0x0000000000000000ULL, { 0x7A90A29F197857D9ULL, 0xE61B58E00F47C682ULL } }, /* XSUM_XXH128_withSecret_testdata[3810] */\n    { 3811, 0x0000000000000000ULL, { 0x479DDA084F200DD5ULL, 0x890E7B627A59C879ULL } }, /* XSUM_XXH128_withSecret_testdata[3811] */\n    { 3812, 0x0000000000000000ULL, { 0x1C8590EC97FD6CB5ULL, 0x361AEBCC6E4FC99DULL } }, /* XSUM_XXH128_withSecret_testdata[3812] */\n    { 3813, 0x0000000000000000ULL, { 0x33D6C48753A38611ULL, 0xE3B19D40DC36F336ULL } }, /* XSUM_XXH128_withSecret_testdata[3813] */\n    { 3814, 0x0000000000000000ULL, { 0x40B740DFA545198BULL, 0x73B6E68B4C5B2D46ULL } }, /* XSUM_XXH128_withSecret_testdata[3814] */\n    { 3815, 0x0000000000000000ULL, { 0x8D1D8E8C352095D4ULL, 0x550B075ED6539795ULL } }, /* XSUM_XXH128_withSecret_testdata[3815] */\n    { 3816, 0x0000000000000000ULL, { 0xC69121B15BFEA3CCULL, 0xFA54F260EA30D95DULL } }, /* XSUM_XXH128_withSecret_testdata[3816] */\n    { 3817, 0x0000000000000000ULL, { 0x9B0CE9D9A00F332AULL, 0x65459678955D8B16ULL } }, /* XSUM_XXH128_withSecret_testdata[3817] */\n    { 3818, 0x0000000000000000ULL, { 0xD4B48E6420DAD175ULL, 0x639C640BB29EDEC4ULL } }, /* XSUM_XXH128_withSecret_testdata[3818] */\n    { 3819, 0x0000000000000000ULL, { 0x9AF27DA42034A1AEULL, 0x9F4F747C1BACB0F0ULL } }, /* XSUM_XXH128_withSecret_testdata[3819] */\n    { 3820, 0x0000000000000000ULL, { 0xC8C71DEC751587A6ULL, 0xF3EF4540C7AC80A4ULL } }, /* XSUM_XXH128_withSecret_testdata[3820] */\n    { 3821, 0x0000000000000000ULL, { 0x0316EC3A75873436ULL, 0xB5B2BE9BEDA57B61ULL } }, /* XSUM_XXH128_withSecret_testdata[3821] */\n    { 3822, 0x0000000000000000ULL, { 0x3B37690A367657FAULL, 0xCB6F58A011B9FBE0ULL } }, /* XSUM_XXH128_withSecret_testdata[3822] */\n    { 3823, 0x0000000000000000ULL, { 0xC09F52288854CAE0ULL, 0x7A7C5FF63D639777ULL } }, /* XSUM_XXH128_withSecret_testdata[3823] */\n    { 3824, 0x0000000000000000ULL, { 0xAC7D977DBFED7A45ULL, 0xDC9324D85F7100FDULL } }, /* XSUM_XXH128_withSecret_testdata[3824] */\n    { 3825, 0x0000000000000000ULL, { 0x8F756E5031220FA0ULL, 0x14ED6C065DDCEF7EULL } }, /* XSUM_XXH128_withSecret_testdata[3825] */\n    { 3826, 0x0000000000000000ULL, { 0x121FA696A8744068ULL, 0xC1E33C3F401D2F1BULL } }, /* XSUM_XXH128_withSecret_testdata[3826] */\n    { 3827, 0x0000000000000000ULL, { 0x935280FAA6F76A56ULL, 0x6AD10A8BC33835FEULL } }, /* XSUM_XXH128_withSecret_testdata[3827] */\n    { 3828, 0x0000000000000000ULL, { 0x66211848A15A1541ULL, 0x53D57D4B6853031FULL } }, /* XSUM_XXH128_withSecret_testdata[3828] */\n    { 3829, 0x0000000000000000ULL, { 0x440A03E907D66571ULL, 0x3120E61389BDDA65ULL } }, /* XSUM_XXH128_withSecret_testdata[3829] */\n    { 3830, 0x0000000000000000ULL, { 0x9491D55283A09C43ULL, 0x94CFD847A73CAC0DULL } }, /* XSUM_XXH128_withSecret_testdata[3830] */\n    { 3831, 0x0000000000000000ULL, { 0x308FD6DCD408AA5AULL, 0x005993E54FC37E03ULL } }, /* XSUM_XXH128_withSecret_testdata[3831] */\n    { 3832, 0x0000000000000000ULL, { 0x6F5D57109CA10AEAULL, 0x22C858EA457D707FULL } }, /* XSUM_XXH128_withSecret_testdata[3832] */\n    { 3833, 0x0000000000000000ULL, { 0x0BB422616E2FF0F5ULL, 0x3D4A5D17CEBC61EEULL } }, /* XSUM_XXH128_withSecret_testdata[3833] */\n    { 3834, 0x0000000000000000ULL, { 0xF71FB6B3FABCC5B5ULL, 0x4BBA66DAEC7143E6ULL } }, /* XSUM_XXH128_withSecret_testdata[3834] */\n    { 3835, 0x0000000000000000ULL, { 0x0D077380BC66E5F8ULL, 0xE0AA41A47D4DF604ULL } }, /* XSUM_XXH128_withSecret_testdata[3835] */\n    { 3836, 0x0000000000000000ULL, { 0x2D18821A1CE7A0D3ULL, 0xFB28762F8E97D391ULL } }, /* XSUM_XXH128_withSecret_testdata[3836] */\n    { 3837, 0x0000000000000000ULL, { 0x89741346BBAF3616ULL, 0x78F14FDF4E138E09ULL } }, /* XSUM_XXH128_withSecret_testdata[3837] */\n    { 3838, 0x0000000000000000ULL, { 0x5BE5AE3674120F8EULL, 0x0A6B2B02BF89AC19ULL } }, /* XSUM_XXH128_withSecret_testdata[3838] */\n    { 3839, 0x0000000000000000ULL, { 0x83FC1E78888AEB54ULL, 0xDBB0805DECF2169BULL } }, /* XSUM_XXH128_withSecret_testdata[3839] */\n    { 3840, 0x0000000000000000ULL, { 0xED8925DFA219FFB2ULL, 0xE0127B85EC7E2004ULL } }, /* XSUM_XXH128_withSecret_testdata[3840] */\n    { 3841, 0x0000000000000000ULL, { 0xBB51262335EFC2A7ULL, 0x60CDCDCF591B2E5EULL } }, /* XSUM_XXH128_withSecret_testdata[3841] */\n    { 3842, 0x0000000000000000ULL, { 0xF781FFA8219D2D48ULL, 0xAD802AB0D6878EEFULL } }, /* XSUM_XXH128_withSecret_testdata[3842] */\n    { 3843, 0x0000000000000000ULL, { 0xF5AA718CEE24D232ULL, 0x2B5D64791A5A9F01ULL } }, /* XSUM_XXH128_withSecret_testdata[3843] */\n    { 3844, 0x0000000000000000ULL, { 0x6F983BF6054906C1ULL, 0x09F95C9CCBEDC819ULL } }, /* XSUM_XXH128_withSecret_testdata[3844] */\n    { 3845, 0x0000000000000000ULL, { 0xB9A4B25D6D15DD75ULL, 0x207ED6D3F33FD1B0ULL } }, /* XSUM_XXH128_withSecret_testdata[3845] */\n    { 3846, 0x0000000000000000ULL, { 0x03DFB187DE44D487ULL, 0xDF14E97752118223ULL } }, /* XSUM_XXH128_withSecret_testdata[3846] */\n    { 3847, 0x0000000000000000ULL, { 0x77DA1F2A998FE3ABULL, 0xFC8F3EAF1513D808ULL } }, /* XSUM_XXH128_withSecret_testdata[3847] */\n    { 3848, 0x0000000000000000ULL, { 0x26C8738103EF1A53ULL, 0xB42EE7752E38C5F3ULL } }, /* XSUM_XXH128_withSecret_testdata[3848] */\n    { 3849, 0x0000000000000000ULL, { 0xA458541991D43DB4ULL, 0x434950A83707729DULL } }, /* XSUM_XXH128_withSecret_testdata[3849] */\n    { 3850, 0x0000000000000000ULL, { 0x477DE4BF55A335CEULL, 0x68B699F55980684CULL } }, /* XSUM_XXH128_withSecret_testdata[3850] */\n    { 3851, 0x0000000000000000ULL, { 0x147708C7E1BE1F09ULL, 0x4F5E50E64B870B94ULL } }, /* XSUM_XXH128_withSecret_testdata[3851] */\n    { 3852, 0x0000000000000000ULL, { 0x4F80B172AD9704ECULL, 0x8C89A127D3A3A71AULL } }, /* XSUM_XXH128_withSecret_testdata[3852] */\n    { 3853, 0x0000000000000000ULL, { 0x0CA2B096526C33F9ULL, 0x5FA4BDF7CD43F324ULL } }, /* XSUM_XXH128_withSecret_testdata[3853] */\n    { 3854, 0x0000000000000000ULL, { 0x013AE1F7A29A617AULL, 0x42C8FDF65B4D7FC6ULL } }, /* XSUM_XXH128_withSecret_testdata[3854] */\n    { 3855, 0x0000000000000000ULL, { 0x049FAA6D542D15CFULL, 0x3F9AE0EF96E0D25CULL } }, /* XSUM_XXH128_withSecret_testdata[3855] */\n    { 3856, 0x0000000000000000ULL, { 0x13039E7C64323905ULL, 0xEAB2ABBE6039DF7EULL } }, /* XSUM_XXH128_withSecret_testdata[3856] */\n    { 3857, 0x0000000000000000ULL, { 0x79D4917EA102D901ULL, 0x46840D9B86E1E5BDULL } }, /* XSUM_XXH128_withSecret_testdata[3857] */\n    { 3858, 0x0000000000000000ULL, { 0xDACB2985AEC67711ULL, 0x4E3B0BFF9393123BULL } }, /* XSUM_XXH128_withSecret_testdata[3858] */\n    { 3859, 0x0000000000000000ULL, { 0x601C42A33E2D0902ULL, 0x36430AC5FACC09C4ULL } }, /* XSUM_XXH128_withSecret_testdata[3859] */\n    { 3860, 0x0000000000000000ULL, { 0xF1FA5A2ADE2EE6C7ULL, 0xF55AA203C6787896ULL } }, /* XSUM_XXH128_withSecret_testdata[3860] */\n    { 3861, 0x0000000000000000ULL, { 0x8640BA9218BB17E9ULL, 0x88B616997E0FC038ULL } }, /* XSUM_XXH128_withSecret_testdata[3861] */\n    { 3862, 0x0000000000000000ULL, { 0x61364A17DAE52AE8ULL, 0x8BE45412A43C8C2DULL } }, /* XSUM_XXH128_withSecret_testdata[3862] */\n    { 3863, 0x0000000000000000ULL, { 0x8B8256DE86A83190ULL, 0x309F288C902DD7C4ULL } }, /* XSUM_XXH128_withSecret_testdata[3863] */\n    { 3864, 0x0000000000000000ULL, { 0x0CE94D5DCE669515ULL, 0xB08233133A6B26B3ULL } }, /* XSUM_XXH128_withSecret_testdata[3864] */\n    { 3865, 0x0000000000000000ULL, { 0x376563E1285C6D31ULL, 0x338119C81719118BULL } }, /* XSUM_XXH128_withSecret_testdata[3865] */\n    { 3866, 0x0000000000000000ULL, { 0xC75FAC7CEF0E0B28ULL, 0xCA2303D5E6EE5F3EULL } }, /* XSUM_XXH128_withSecret_testdata[3866] */\n    { 3867, 0x0000000000000000ULL, { 0x15757DB615C48441ULL, 0xF446A408CE1701F7ULL } }, /* XSUM_XXH128_withSecret_testdata[3867] */\n    { 3868, 0x0000000000000000ULL, { 0x3B900D93E2E69F82ULL, 0x472DE4F58D728062ULL } }, /* XSUM_XXH128_withSecret_testdata[3868] */\n    { 3869, 0x0000000000000000ULL, { 0xF3EB1C5CAC0AECA8ULL, 0x22DAE0563EB1DC52ULL } }, /* XSUM_XXH128_withSecret_testdata[3869] */\n    { 3870, 0x0000000000000000ULL, { 0x6C6E7AD81742B826ULL, 0x716FA1319EF3D90BULL } }, /* XSUM_XXH128_withSecret_testdata[3870] */\n    { 3871, 0x0000000000000000ULL, { 0xC951CB98838C3165ULL, 0x3962DC8211FA1217ULL } }, /* XSUM_XXH128_withSecret_testdata[3871] */\n    { 3872, 0x0000000000000000ULL, { 0x7084FDE99B988E35ULL, 0xF859FF8BCF5AEC45ULL } }, /* XSUM_XXH128_withSecret_testdata[3872] */\n    { 3873, 0x0000000000000000ULL, { 0x21BA5B9DE45DEA90ULL, 0x69C4ECB204A0F69CULL } }, /* XSUM_XXH128_withSecret_testdata[3873] */\n    { 3874, 0x0000000000000000ULL, { 0x9F1607F01961CB5EULL, 0xA70AAE1334530255ULL } }, /* XSUM_XXH128_withSecret_testdata[3874] */\n    { 3875, 0x0000000000000000ULL, { 0x5E21F010B693F7DDULL, 0x53FF1810A3F920CEULL } }, /* XSUM_XXH128_withSecret_testdata[3875] */\n    { 3876, 0x0000000000000000ULL, { 0xFD7A548ABFE10CBAULL, 0x25ABE7B4D62DB540ULL } }, /* XSUM_XXH128_withSecret_testdata[3876] */\n    { 3877, 0x0000000000000000ULL, { 0x0F73AD12D922EF01ULL, 0xED145049C1F033DBULL } }, /* XSUM_XXH128_withSecret_testdata[3877] */\n    { 3878, 0x0000000000000000ULL, { 0x552A4D2349FD8930ULL, 0xE2272D59EEFCD624ULL } }, /* XSUM_XXH128_withSecret_testdata[3878] */\n    { 3879, 0x0000000000000000ULL, { 0x3ED45EF89DDD1BEFULL, 0x45767C1F1E48EAD7ULL } }, /* XSUM_XXH128_withSecret_testdata[3879] */\n    { 3880, 0x0000000000000000ULL, { 0x3968D05D6F1D061AULL, 0x501356691452FB96ULL } }, /* XSUM_XXH128_withSecret_testdata[3880] */\n    { 3881, 0x0000000000000000ULL, { 0x3344DBEEB28A34BEULL, 0xE566272EF55D6B6BULL } }, /* XSUM_XXH128_withSecret_testdata[3881] */\n    { 3882, 0x0000000000000000ULL, { 0x60AD1E4CB1E6BE07ULL, 0x0A272B96506A12ADULL } }, /* XSUM_XXH128_withSecret_testdata[3882] */\n    { 3883, 0x0000000000000000ULL, { 0x1B803BE7A6EE325DULL, 0x37457240507ED6FCULL } }, /* XSUM_XXH128_withSecret_testdata[3883] */\n    { 3884, 0x0000000000000000ULL, { 0xD4999587BCC54BA7ULL, 0xA04EA4D555184EBCULL } }, /* XSUM_XXH128_withSecret_testdata[3884] */\n    { 3885, 0x0000000000000000ULL, { 0x685F7F3FCEFC0BDAULL, 0x7141B0D1559C8CF8ULL } }, /* XSUM_XXH128_withSecret_testdata[3885] */\n    { 3886, 0x0000000000000000ULL, { 0x6372BF182DC55808ULL, 0xCD9CD5DA5D996E84ULL } }, /* XSUM_XXH128_withSecret_testdata[3886] */\n    { 3887, 0x0000000000000000ULL, { 0x3156503EA20E4BCAULL, 0xC66999F813844D2FULL } }, /* XSUM_XXH128_withSecret_testdata[3887] */\n    { 3888, 0x0000000000000000ULL, { 0xDA2C23CD9B86B7CDULL, 0x457BE21D773B20DFULL } }, /* XSUM_XXH128_withSecret_testdata[3888] */\n    { 3889, 0x0000000000000000ULL, { 0x7F5FAA17E5806167ULL, 0xBD72EFD2CCF4BC21ULL } }, /* XSUM_XXH128_withSecret_testdata[3889] */\n    { 3890, 0x0000000000000000ULL, { 0xB1096B3D48C20008ULL, 0xECAE62DD5E418200ULL } }, /* XSUM_XXH128_withSecret_testdata[3890] */\n    { 3891, 0x0000000000000000ULL, { 0x4AD5418DD0EAC137ULL, 0x8A4702B8F9DD7D27ULL } }, /* XSUM_XXH128_withSecret_testdata[3891] */\n    { 3892, 0x0000000000000000ULL, { 0x466D3013825AE37CULL, 0x23C76E8095FC6A87ULL } }, /* XSUM_XXH128_withSecret_testdata[3892] */\n    { 3893, 0x0000000000000000ULL, { 0x042F95B677AB0DD5ULL, 0xD7565BA1FE24A1CBULL } }, /* XSUM_XXH128_withSecret_testdata[3893] */\n    { 3894, 0x0000000000000000ULL, { 0xEA13C83EFEF8A615ULL, 0x14DDA8B564DFCE37ULL } }, /* XSUM_XXH128_withSecret_testdata[3894] */\n    { 3895, 0x0000000000000000ULL, { 0x9E4A0F97E8D5666EULL, 0x20396B5D075308DCULL } }, /* XSUM_XXH128_withSecret_testdata[3895] */\n    { 3896, 0x0000000000000000ULL, { 0x0D80D8CCE3ED4C48ULL, 0x2802C33D4E10C614ULL } }, /* XSUM_XXH128_withSecret_testdata[3896] */\n    { 3897, 0x0000000000000000ULL, { 0xBF430BCD17E867B5ULL, 0x3208047D37727256ULL } }, /* XSUM_XXH128_withSecret_testdata[3897] */\n    { 3898, 0x0000000000000000ULL, { 0x9BB9BC9B675F788AULL, 0x54ECA26A0B0B48A1ULL } }, /* XSUM_XXH128_withSecret_testdata[3898] */\n    { 3899, 0x0000000000000000ULL, { 0x3774510B1E6E7F04ULL, 0x66559625F5D1719FULL } }, /* XSUM_XXH128_withSecret_testdata[3899] */\n    { 3900, 0x0000000000000000ULL, { 0xDF7A7AD16BD22D35ULL, 0x7D540A1EB60F180EULL } }, /* XSUM_XXH128_withSecret_testdata[3900] */\n    { 3901, 0x0000000000000000ULL, { 0x52B56258F36FB33DULL, 0x511344F8A9E08F1DULL } }, /* XSUM_XXH128_withSecret_testdata[3901] */\n    { 3902, 0x0000000000000000ULL, { 0x0E1E913ADF08DF1FULL, 0x6BC21FD4A402FB93ULL } }, /* XSUM_XXH128_withSecret_testdata[3902] */\n    { 3903, 0x0000000000000000ULL, { 0xB95B7C9F36356CD2ULL, 0xE4CE8D43EB886C92ULL } }, /* XSUM_XXH128_withSecret_testdata[3903] */\n    { 3904, 0x0000000000000000ULL, { 0x1F90A3C3B9455555ULL, 0xBD0D663F0EA974C7ULL } }, /* XSUM_XXH128_withSecret_testdata[3904] */\n    { 3905, 0x0000000000000000ULL, { 0x1DB6217A29421657ULL, 0xD8E252289066312AULL } }, /* XSUM_XXH128_withSecret_testdata[3905] */\n    { 3906, 0x0000000000000000ULL, { 0x5E1883B8DBCDBF1FULL, 0xECF699D1AD976F92ULL } }, /* XSUM_XXH128_withSecret_testdata[3906] */\n    { 3907, 0x0000000000000000ULL, { 0x90C2FA82176C1BE2ULL, 0x2E22521DD89F1FA0ULL } }, /* XSUM_XXH128_withSecret_testdata[3907] */\n    { 3908, 0x0000000000000000ULL, { 0x3C4AB5B9A1BE2EAFULL, 0xAC1239F2B202DDA2ULL } }, /* XSUM_XXH128_withSecret_testdata[3908] */\n    { 3909, 0x0000000000000000ULL, { 0x0C8A9C33F8C25C1FULL, 0xACFBEE8AFCFFAEB2ULL } }, /* XSUM_XXH128_withSecret_testdata[3909] */\n    { 3910, 0x0000000000000000ULL, { 0xE8440A7A4D68B7ABULL, 0xCC8ACF4A787B2930ULL } }, /* XSUM_XXH128_withSecret_testdata[3910] */\n    { 3911, 0x0000000000000000ULL, { 0xC52FD58F9FC58964ULL, 0x98095D0301A62EF1ULL } }, /* XSUM_XXH128_withSecret_testdata[3911] */\n    { 3912, 0x0000000000000000ULL, { 0x9EC76C894C62DE08ULL, 0xD0075F4CEE85C2D4ULL } }, /* XSUM_XXH128_withSecret_testdata[3912] */\n    { 3913, 0x0000000000000000ULL, { 0x767105D328069CE7ULL, 0x7F7339720F39ED6BULL } }, /* XSUM_XXH128_withSecret_testdata[3913] */\n    { 3914, 0x0000000000000000ULL, { 0x52D4745EC61C14EBULL, 0x1FA452A20EB38D8AULL } }, /* XSUM_XXH128_withSecret_testdata[3914] */\n    { 3915, 0x0000000000000000ULL, { 0x1E67F6E12B7F93CEULL, 0x5EBFA76E9EC4DFE1ULL } }, /* XSUM_XXH128_withSecret_testdata[3915] */\n    { 3916, 0x0000000000000000ULL, { 0x9ABB0531A9D44411ULL, 0xF45019AAEF8B19A9ULL } }, /* XSUM_XXH128_withSecret_testdata[3916] */\n    { 3917, 0x0000000000000000ULL, { 0x040C7F9A4964F3F0ULL, 0xD92459BDC5B90A7FULL } }, /* XSUM_XXH128_withSecret_testdata[3917] */\n    { 3918, 0x0000000000000000ULL, { 0x6E17312BA20C938CULL, 0xF4E71CFD5B71AB7AULL } }, /* XSUM_XXH128_withSecret_testdata[3918] */\n    { 3919, 0x0000000000000000ULL, { 0x7D4C56E59201E07AULL, 0xC3A44EA30DD56990ULL } }, /* XSUM_XXH128_withSecret_testdata[3919] */\n    { 3920, 0x0000000000000000ULL, { 0x394E53379B160483ULL, 0x27C600DE4DAAEF04ULL } }, /* XSUM_XXH128_withSecret_testdata[3920] */\n    { 3921, 0x0000000000000000ULL, { 0x0A0B7FE58C246440ULL, 0xD946FD1AE5F20E58ULL } }, /* XSUM_XXH128_withSecret_testdata[3921] */\n    { 3922, 0x0000000000000000ULL, { 0x9ABAD672A06F8EC3ULL, 0x221F05447409AA6DULL } }, /* XSUM_XXH128_withSecret_testdata[3922] */\n    { 3923, 0x0000000000000000ULL, { 0xED7857BE50F696EEULL, 0xFAC666486A6A5B0CULL } }, /* XSUM_XXH128_withSecret_testdata[3923] */\n    { 3924, 0x0000000000000000ULL, { 0x5BCBD2C839AF6810ULL, 0xB69079BAA26FBE9BULL } }, /* XSUM_XXH128_withSecret_testdata[3924] */\n    { 3925, 0x0000000000000000ULL, { 0x44886BAE5A33F6BDULL, 0xA0DF316D53A2BEE1ULL } }, /* XSUM_XXH128_withSecret_testdata[3925] */\n    { 3926, 0x0000000000000000ULL, { 0x6A716B87F0459627ULL, 0x9B585314CDD77255ULL } }, /* XSUM_XXH128_withSecret_testdata[3926] */\n    { 3927, 0x0000000000000000ULL, { 0x88E0523327EBC31BULL, 0x6831D25E9AA883A5ULL } }, /* XSUM_XXH128_withSecret_testdata[3927] */\n    { 3928, 0x0000000000000000ULL, { 0x0A0C83F05753D320ULL, 0x916DAC7D7453C5D7ULL } }, /* XSUM_XXH128_withSecret_testdata[3928] */\n    { 3929, 0x0000000000000000ULL, { 0xB5BD6EF42352751EULL, 0x616F6FFC87825716ULL } }, /* XSUM_XXH128_withSecret_testdata[3929] */\n    { 3930, 0x0000000000000000ULL, { 0xF1B64D06A9674EC5ULL, 0x6BD8BFE46CFC52D3ULL } }, /* XSUM_XXH128_withSecret_testdata[3930] */\n    { 3931, 0x0000000000000000ULL, { 0x2B77BADB2628D036ULL, 0x5A99FE0967C7ADE8ULL } }, /* XSUM_XXH128_withSecret_testdata[3931] */\n    { 3932, 0x0000000000000000ULL, { 0x826F2F97D7BFD76CULL, 0x8FF3FE0551388A23ULL } }, /* XSUM_XXH128_withSecret_testdata[3932] */\n    { 3933, 0x0000000000000000ULL, { 0xD667DA118A339719ULL, 0xB99C93175EA8900CULL } }, /* XSUM_XXH128_withSecret_testdata[3933] */\n    { 3934, 0x0000000000000000ULL, { 0x501E1D45774C0E55ULL, 0xD5B6FCF36FEE4716ULL } }, /* XSUM_XXH128_withSecret_testdata[3934] */\n    { 3935, 0x0000000000000000ULL, { 0xE4A479DA36C1CAB8ULL, 0xCC6FFE942C3F0944ULL } }, /* XSUM_XXH128_withSecret_testdata[3935] */\n    { 3936, 0x0000000000000000ULL, { 0x3B0D3D4D2725B066ULL, 0x58EDFEFFF3009F84ULL } }, /* XSUM_XXH128_withSecret_testdata[3936] */\n    { 3937, 0x0000000000000000ULL, { 0x9E0C63E6BACFC21CULL, 0x6930169AD4ECB14CULL } }, /* XSUM_XXH128_withSecret_testdata[3937] */\n    { 3938, 0x0000000000000000ULL, { 0x4CE6D62F07031DB7ULL, 0xAFC2BBA12EC643FDULL } }, /* XSUM_XXH128_withSecret_testdata[3938] */\n    { 3939, 0x0000000000000000ULL, { 0x0F4BEBD8BB21E5F1ULL, 0x338BD175D6534D14ULL } }, /* XSUM_XXH128_withSecret_testdata[3939] */\n    { 3940, 0x0000000000000000ULL, { 0xB67EF66C05DD3737ULL, 0xAEEAA72FC41CB938ULL } }, /* XSUM_XXH128_withSecret_testdata[3940] */\n    { 3941, 0x0000000000000000ULL, { 0x3E225CA0833C7B24ULL, 0xA47162E4FCDC3810ULL } }, /* XSUM_XXH128_withSecret_testdata[3941] */\n    { 3942, 0x0000000000000000ULL, { 0xEC16404F1138A509ULL, 0xE4ECD315BDC073C0ULL } }, /* XSUM_XXH128_withSecret_testdata[3942] */\n    { 3943, 0x0000000000000000ULL, { 0xD09524AA524FC24FULL, 0xB5923F3811EE0AEDULL } }, /* XSUM_XXH128_withSecret_testdata[3943] */\n    { 3944, 0x0000000000000000ULL, { 0xA57072D294086351ULL, 0x073D56DE59919C7FULL } }, /* XSUM_XXH128_withSecret_testdata[3944] */\n    { 3945, 0x0000000000000000ULL, { 0xB11118C50C185FF3ULL, 0x5214FB31D113C214ULL } }, /* XSUM_XXH128_withSecret_testdata[3945] */\n    { 3946, 0x0000000000000000ULL, { 0x5FD78C944C803E26ULL, 0x147789A6C8F1E613ULL } }, /* XSUM_XXH128_withSecret_testdata[3946] */\n    { 3947, 0x0000000000000000ULL, { 0xEDA8B44313DA978FULL, 0xB3295BE6BE6B9985ULL } }, /* XSUM_XXH128_withSecret_testdata[3947] */\n    { 3948, 0x0000000000000000ULL, { 0x265E621233257D37ULL, 0x55FAA14790CFF73FULL } }, /* XSUM_XXH128_withSecret_testdata[3948] */\n    { 3949, 0x0000000000000000ULL, { 0x4E37AACED239559CULL, 0x04CB5CE795369960ULL } }, /* XSUM_XXH128_withSecret_testdata[3949] */\n    { 3950, 0x0000000000000000ULL, { 0x1BEDAF55A1905256ULL, 0x530E6DA8525AAEBBULL } }, /* XSUM_XXH128_withSecret_testdata[3950] */\n    { 3951, 0x0000000000000000ULL, { 0x35B4561FC0AFF903ULL, 0xD34BEACC5C437D0FULL } }, /* XSUM_XXH128_withSecret_testdata[3951] */\n    { 3952, 0x0000000000000000ULL, { 0x2B2E8D7ED978BF9BULL, 0xDAA55E38BC466A05ULL } }, /* XSUM_XXH128_withSecret_testdata[3952] */\n    { 3953, 0x0000000000000000ULL, { 0x851B421178EE4DEAULL, 0xE3492B1D46B32835ULL } }, /* XSUM_XXH128_withSecret_testdata[3953] */\n    { 3954, 0x0000000000000000ULL, { 0xAD11DBE6D67810CFULL, 0x8E13365CB5EAF80BULL } }, /* XSUM_XXH128_withSecret_testdata[3954] */\n    { 3955, 0x0000000000000000ULL, { 0x832EFB6BE76C4917ULL, 0xBCA175229C3D8293ULL } }, /* XSUM_XXH128_withSecret_testdata[3955] */\n    { 3956, 0x0000000000000000ULL, { 0x5AF2B3FE52A9644FULL, 0x08F86A6B8F211C4DULL } }, /* XSUM_XXH128_withSecret_testdata[3956] */\n    { 3957, 0x0000000000000000ULL, { 0x99C4F79C46EEA142ULL, 0xEF5CB72391FD13AEULL } }, /* XSUM_XXH128_withSecret_testdata[3957] */\n    { 3958, 0x0000000000000000ULL, { 0x8DF60D6BF156B9D8ULL, 0x755D5DE498D3B005ULL } }, /* XSUM_XXH128_withSecret_testdata[3958] */\n    { 3959, 0x0000000000000000ULL, { 0xD2140DF6D84FDBC9ULL, 0x22B420038B49C3F9ULL } }, /* XSUM_XXH128_withSecret_testdata[3959] */\n    { 3960, 0x0000000000000000ULL, { 0xF1B421A351DEEB31ULL, 0xBE5D2CCEACD5962FULL } }, /* XSUM_XXH128_withSecret_testdata[3960] */\n    { 3961, 0x0000000000000000ULL, { 0xA88741587B91149FULL, 0x8C5CE4A3BE418F10ULL } }, /* XSUM_XXH128_withSecret_testdata[3961] */\n    { 3962, 0x0000000000000000ULL, { 0x573F1EBA59887F2DULL, 0x3F81992D44125A14ULL } }, /* XSUM_XXH128_withSecret_testdata[3962] */\n    { 3963, 0x0000000000000000ULL, { 0x80673C41C8A6DECBULL, 0x51B23F533D4044CFULL } }, /* XSUM_XXH128_withSecret_testdata[3963] */\n    { 3964, 0x0000000000000000ULL, { 0x126388575C84BD3FULL, 0x17187E49661F47F6ULL } }, /* XSUM_XXH128_withSecret_testdata[3964] */\n    { 3965, 0x0000000000000000ULL, { 0xFF6FFD276118DD59ULL, 0x6D2FAE3571572DD7ULL } }, /* XSUM_XXH128_withSecret_testdata[3965] */\n    { 3966, 0x0000000000000000ULL, { 0xE28FBC0EBC9EC543ULL, 0xB2BAFCE6C288E926ULL } }, /* XSUM_XXH128_withSecret_testdata[3966] */\n    { 3967, 0x0000000000000000ULL, { 0x478D04F28282DD16ULL, 0x5C39282A0F7DB9D2ULL } }, /* XSUM_XXH128_withSecret_testdata[3967] */\n    { 3968, 0x0000000000000000ULL, { 0x39A88CC5AEB672C6ULL, 0x07206208B75C17A9ULL } }, /* XSUM_XXH128_withSecret_testdata[3968] */\n    { 3969, 0x0000000000000000ULL, { 0x753907B13FB656ADULL, 0x5AE6EA8D48402F48ULL } }, /* XSUM_XXH128_withSecret_testdata[3969] */\n    { 3970, 0x0000000000000000ULL, { 0x8A86D19768F6F8B2ULL, 0x75BC038A7A2EBEBEULL } }, /* XSUM_XXH128_withSecret_testdata[3970] */\n    { 3971, 0x0000000000000000ULL, { 0xEF27D20E3A59A265ULL, 0x4F524247AAB58EBEULL } }, /* XSUM_XXH128_withSecret_testdata[3971] */\n    { 3972, 0x0000000000000000ULL, { 0x599785FBACD3F5B2ULL, 0x5ADA489A8B313AF1ULL } }, /* XSUM_XXH128_withSecret_testdata[3972] */\n    { 3973, 0x0000000000000000ULL, { 0x5E120D059DF126DFULL, 0x98642E02FEA742F0ULL } }, /* XSUM_XXH128_withSecret_testdata[3973] */\n    { 3974, 0x0000000000000000ULL, { 0x323341DA425D5971ULL, 0x4747172D8A36BF68ULL } }, /* XSUM_XXH128_withSecret_testdata[3974] */\n    { 3975, 0x0000000000000000ULL, { 0x66E9ED33A0FE926AULL, 0x435D68B4FAEA910BULL } }, /* XSUM_XXH128_withSecret_testdata[3975] */\n    { 3976, 0x0000000000000000ULL, { 0xDAEBE9F14941E4B1ULL, 0xE2E439A5C3647C46ULL } }, /* XSUM_XXH128_withSecret_testdata[3976] */\n    { 3977, 0x0000000000000000ULL, { 0x69CB9F838670B8DDULL, 0xCC02B5A88F93E2CEULL } }, /* XSUM_XXH128_withSecret_testdata[3977] */\n    { 3978, 0x0000000000000000ULL, { 0x1A230CA712BE6276ULL, 0x08A0E933F7050C0DULL } }, /* XSUM_XXH128_withSecret_testdata[3978] */\n    { 3979, 0x0000000000000000ULL, { 0x1F1D2458C37728AFULL, 0xE80C969590328560ULL } }, /* XSUM_XXH128_withSecret_testdata[3979] */\n    { 3980, 0x0000000000000000ULL, { 0x6F1E017185E5AD9FULL, 0xA92A3E7E85983C40ULL } }, /* XSUM_XXH128_withSecret_testdata[3980] */\n    { 3981, 0x0000000000000000ULL, { 0x58DC29264CBBA138ULL, 0x334FEC5A97726F0CULL } }, /* XSUM_XXH128_withSecret_testdata[3981] */\n    { 3982, 0x0000000000000000ULL, { 0x69BCCDFF30E140B3ULL, 0x7061632B8C1EDDD8ULL } }, /* XSUM_XXH128_withSecret_testdata[3982] */\n    { 3983, 0x0000000000000000ULL, { 0xD4956F25E5E7F77BULL, 0xBF700FA7280E63D1ULL } }, /* XSUM_XXH128_withSecret_testdata[3983] */\n    { 3984, 0x0000000000000000ULL, { 0x61516A317A9423E3ULL, 0x1597A46EE419DB22ULL } }, /* XSUM_XXH128_withSecret_testdata[3984] */\n    { 3985, 0x0000000000000000ULL, { 0x3CA5AD0A3FDE38FFULL, 0xC95E49FBA1B29636ULL } }, /* XSUM_XXH128_withSecret_testdata[3985] */\n    { 3986, 0x0000000000000000ULL, { 0xDC0FE42917D33C1CULL, 0x3A9EA720802D0BBCULL } }, /* XSUM_XXH128_withSecret_testdata[3986] */\n    { 3987, 0x0000000000000000ULL, { 0x552B5DD320E034F6ULL, 0xF87AEC6415519757ULL } }, /* XSUM_XXH128_withSecret_testdata[3987] */\n    { 3988, 0x0000000000000000ULL, { 0xB4D0495D78EB47F6ULL, 0x38447C2A0C3CE869ULL } }, /* XSUM_XXH128_withSecret_testdata[3988] */\n    { 3989, 0x0000000000000000ULL, { 0xD99543CC2F1660B2ULL, 0xA591726990C42058ULL } }, /* XSUM_XXH128_withSecret_testdata[3989] */\n    { 3990, 0x0000000000000000ULL, { 0x1D7E294B3E7BF0D5ULL, 0x060D54679B2A6EFFULL } }, /* XSUM_XXH128_withSecret_testdata[3990] */\n    { 3991, 0x0000000000000000ULL, { 0x7FC8297D93F7C81FULL, 0xDDD9730DBADB7069ULL } }, /* XSUM_XXH128_withSecret_testdata[3991] */\n    { 3992, 0x0000000000000000ULL, { 0xB417170FF1E42E8DULL, 0x501A8BA711DEF3CFULL } }, /* XSUM_XXH128_withSecret_testdata[3992] */\n    { 3993, 0x0000000000000000ULL, { 0xFF8DDA8ADF2B6642ULL, 0x5E756960648573E9ULL } }, /* XSUM_XXH128_withSecret_testdata[3993] */\n    { 3994, 0x0000000000000000ULL, { 0x08147B80B15B89FCULL, 0x4E202D6CAFA89B6AULL } }, /* XSUM_XXH128_withSecret_testdata[3994] */\n    { 3995, 0x0000000000000000ULL, { 0x33ABD4C640F5BDC3ULL, 0x085F4915B2552364ULL } }, /* XSUM_XXH128_withSecret_testdata[3995] */\n    { 3996, 0x0000000000000000ULL, { 0x1A11C60C3BA5BEB4ULL, 0x3CC4A494994690EDULL } }, /* XSUM_XXH128_withSecret_testdata[3996] */\n    { 3997, 0x0000000000000000ULL, { 0x9B9A5C7F0E7DF4EEULL, 0x3D8CA1A5C196050FULL } }, /* XSUM_XXH128_withSecret_testdata[3997] */\n    { 3998, 0x0000000000000000ULL, { 0x9ADE7A91058E6D7DULL, 0x4FFB6234767F5933ULL } }, /* XSUM_XXH128_withSecret_testdata[3998] */\n    { 3999, 0x0000000000000000ULL, { 0x57F0B9FB8739989AULL, 0x684D5A8AFA470021ULL } }, /* XSUM_XXH128_withSecret_testdata[3999] */\n    { 4000, 0x0000000000000000ULL, { 0xE184CBF1E98AD05EULL, 0x1959DF5132D71E78ULL } }, /* XSUM_XXH128_withSecret_testdata[4000] */\n    { 4001, 0x0000000000000000ULL, { 0xE85B45D7683D9CE0ULL, 0xFB0BC59E82FECB5EULL } }, /* XSUM_XXH128_withSecret_testdata[4001] */\n    { 4002, 0x0000000000000000ULL, { 0x074A0C2BAB5E950BULL, 0x17426B6D83A5B4ACULL } }, /* XSUM_XXH128_withSecret_testdata[4002] */\n    { 4003, 0x0000000000000000ULL, { 0xADABC1ADBC07D3AAULL, 0x9641934035E13C58ULL } }, /* XSUM_XXH128_withSecret_testdata[4003] */\n    { 4004, 0x0000000000000000ULL, { 0xFCEC87DD9320E9EAULL, 0x657F2EFD7F927920ULL } }, /* XSUM_XXH128_withSecret_testdata[4004] */\n    { 4005, 0x0000000000000000ULL, { 0x48BCD4503CB02471ULL, 0x673C91BF4745855AULL } }, /* XSUM_XXH128_withSecret_testdata[4005] */\n    { 4006, 0x0000000000000000ULL, { 0x830D0A44B28510BDULL, 0x4E2D0C42457CFF16ULL } }, /* XSUM_XXH128_withSecret_testdata[4006] */\n    { 4007, 0x0000000000000000ULL, { 0xD5F28186C763F8E7ULL, 0xAFCF61AC36EF1440ULL } }, /* XSUM_XXH128_withSecret_testdata[4007] */\n    { 4008, 0x0000000000000000ULL, { 0xDF89B3916F9E329CULL, 0xD54C8D72D63044CCULL } }, /* XSUM_XXH128_withSecret_testdata[4008] */\n    { 4009, 0x0000000000000000ULL, { 0xA77D92102028B930ULL, 0x494DBEA4BF59450EULL } }, /* XSUM_XXH128_withSecret_testdata[4009] */\n    { 4010, 0x0000000000000000ULL, { 0x0907F224A3DB335FULL, 0x3D1CC934515DA795ULL } }, /* XSUM_XXH128_withSecret_testdata[4010] */\n    { 4011, 0x0000000000000000ULL, { 0x39257686BB9BD6DBULL, 0x46E238B605D230C9ULL } }, /* XSUM_XXH128_withSecret_testdata[4011] */\n    { 4012, 0x0000000000000000ULL, { 0x1908A83C25A09B3EULL, 0x68B7F1654D5F7037ULL } }, /* XSUM_XXH128_withSecret_testdata[4012] */\n    { 4013, 0x0000000000000000ULL, { 0x1C228F0313F05621ULL, 0x734E24471179CDACULL } }, /* XSUM_XXH128_withSecret_testdata[4013] */\n    { 4014, 0x0000000000000000ULL, { 0xD29D4BB6C83B212FULL, 0x96841446536D6975ULL } }, /* XSUM_XXH128_withSecret_testdata[4014] */\n    { 4015, 0x0000000000000000ULL, { 0xA4EF22E7990EFCDCULL, 0x972CFAD449C29BB6ULL } }, /* XSUM_XXH128_withSecret_testdata[4015] */\n    { 4016, 0x0000000000000000ULL, { 0x10DC31A45CECDF06ULL, 0x684FC5CA9F8842E1ULL } }, /* XSUM_XXH128_withSecret_testdata[4016] */\n    { 4017, 0x0000000000000000ULL, { 0xF8EC25F1FB6A58B9ULL, 0xBBE85249F2A0B784ULL } }, /* XSUM_XXH128_withSecret_testdata[4017] */\n    { 4018, 0x0000000000000000ULL, { 0xF7DA74361E4E6608ULL, 0x636C8CFCA417C964ULL } }, /* XSUM_XXH128_withSecret_testdata[4018] */\n    { 4019, 0x0000000000000000ULL, { 0xE0D78070D8474ECDULL, 0x7BCDCF6EEE8FCF9FULL } }, /* XSUM_XXH128_withSecret_testdata[4019] */\n    { 4020, 0x0000000000000000ULL, { 0xD006A9834E2719CEULL, 0x28801A32698C9094ULL } }, /* XSUM_XXH128_withSecret_testdata[4020] */\n    { 4021, 0x0000000000000000ULL, { 0x4B4D94054CEA6E1FULL, 0x9759B4B051895040ULL } }, /* XSUM_XXH128_withSecret_testdata[4021] */\n    { 4022, 0x0000000000000000ULL, { 0x765FBFBA601A57BDULL, 0xFCB4B67F533DA921ULL } }, /* XSUM_XXH128_withSecret_testdata[4022] */\n    { 4023, 0x0000000000000000ULL, { 0xFBB6F86EFDEBC52DULL, 0xC32CA75E16E74917ULL } }, /* XSUM_XXH128_withSecret_testdata[4023] */\n    { 4024, 0x0000000000000000ULL, { 0x82166375EA042B26ULL, 0x8E34A6E01B9ED87DULL } }, /* XSUM_XXH128_withSecret_testdata[4024] */\n    { 4025, 0x0000000000000000ULL, { 0xEF3FEB717072EE91ULL, 0x943452B19373728DULL } }, /* XSUM_XXH128_withSecret_testdata[4025] */\n    { 4026, 0x0000000000000000ULL, { 0x2DD6C3FBE072545BULL, 0x614272B5B488D282ULL } }, /* XSUM_XXH128_withSecret_testdata[4026] */\n    { 4027, 0x0000000000000000ULL, { 0x6A2FDD401C94D1EBULL, 0x241CB870D7ED1A22ULL } }, /* XSUM_XXH128_withSecret_testdata[4027] */\n    { 4028, 0x0000000000000000ULL, { 0x18136EE230F0BE7DULL, 0xDB850B8BA651F61AULL } }, /* XSUM_XXH128_withSecret_testdata[4028] */\n    { 4029, 0x0000000000000000ULL, { 0x69A9A1CF3A907C8FULL, 0x87677D9F3C04C059ULL } }, /* XSUM_XXH128_withSecret_testdata[4029] */\n    { 4030, 0x0000000000000000ULL, { 0x74C1650BE5290626ULL, 0xF8430FF196A894AAULL } }, /* XSUM_XXH128_withSecret_testdata[4030] */\n    { 4031, 0x0000000000000000ULL, { 0x3C4D733B3DC00870ULL, 0xA04D1972F78805A6ULL } }, /* XSUM_XXH128_withSecret_testdata[4031] */\n    { 4032, 0x0000000000000000ULL, { 0x695ACEBA82CCE59CULL, 0xE080B3BA32F81009ULL } }, /* XSUM_XXH128_withSecret_testdata[4032] */\n    { 4033, 0x0000000000000000ULL, { 0x19533A9067D621E1ULL, 0x96FC5165E3AC069DULL } }, /* XSUM_XXH128_withSecret_testdata[4033] */\n    { 4034, 0x0000000000000000ULL, { 0x7E43CBAE4E42C1FBULL, 0x22CDDCDF36B9CE36ULL } }, /* XSUM_XXH128_withSecret_testdata[4034] */\n    { 4035, 0x0000000000000000ULL, { 0xA0A7A7857C8B5B01ULL, 0x7428DFDD0618A9A5ULL } }, /* XSUM_XXH128_withSecret_testdata[4035] */\n    { 4036, 0x0000000000000000ULL, { 0x92F3BA8EE6DF084BULL, 0x427CE15623FB1444ULL } }, /* XSUM_XXH128_withSecret_testdata[4036] */\n    { 4037, 0x0000000000000000ULL, { 0xAA7D2A090985E856ULL, 0x0217C99FECD610DCULL } }, /* XSUM_XXH128_withSecret_testdata[4037] */\n    { 4038, 0x0000000000000000ULL, { 0xCE5E19CA0ACE70AAULL, 0xE1C425A76DAFF1C0ULL } }, /* XSUM_XXH128_withSecret_testdata[4038] */\n    { 4039, 0x0000000000000000ULL, { 0x6A0DB81389E7EB64ULL, 0xE22E7399AF1FCE7AULL } }, /* XSUM_XXH128_withSecret_testdata[4039] */\n    { 4040, 0x0000000000000000ULL, { 0x1C428423E92CB936ULL, 0x6CF950F0DA32CDCCULL } }, /* XSUM_XXH128_withSecret_testdata[4040] */\n    { 4041, 0x0000000000000000ULL, { 0x2E94046589D1E6FDULL, 0x9DDAFBEEA5731B4DULL } }, /* XSUM_XXH128_withSecret_testdata[4041] */\n    { 4042, 0x0000000000000000ULL, { 0x593811EB10E67DE3ULL, 0x7F552F3BEF17DCE7ULL } }, /* XSUM_XXH128_withSecret_testdata[4042] */\n    { 4043, 0x0000000000000000ULL, { 0xB2D714E38B1E1C8EULL, 0x37DFB27ACB7ACB92ULL } }, /* XSUM_XXH128_withSecret_testdata[4043] */\n    { 4044, 0x0000000000000000ULL, { 0x9DD048F3866DAC6FULL, 0x9822C44A60CA8074ULL } }, /* XSUM_XXH128_withSecret_testdata[4044] */\n    { 4045, 0x0000000000000000ULL, { 0x320CD8D172089096ULL, 0x06D8DFEE844051C1ULL } }, /* XSUM_XXH128_withSecret_testdata[4045] */\n    { 4046, 0x0000000000000000ULL, { 0x2A29BF44AF69A300ULL, 0x9D1F570D43ECC8C0ULL } }, /* XSUM_XXH128_withSecret_testdata[4046] */\n    { 4047, 0x0000000000000000ULL, { 0xC3D96538AD370D5EULL, 0x1BAC405B92475865ULL } }, /* XSUM_XXH128_withSecret_testdata[4047] */\n    { 4048, 0x0000000000000000ULL, { 0xE659FE2A37FDB433ULL, 0xEBC9FC24A62759DCULL } }, /* XSUM_XXH128_withSecret_testdata[4048] */\n    { 4049, 0x0000000000000000ULL, { 0xD66D84E01673DF06ULL, 0x9BAA6B7FAD2D95B3ULL } }, /* XSUM_XXH128_withSecret_testdata[4049] */\n    { 4050, 0x0000000000000000ULL, { 0xCFC21220DEA96813ULL, 0x93DEB30E0F38083EULL } }, /* XSUM_XXH128_withSecret_testdata[4050] */\n    { 4051, 0x0000000000000000ULL, { 0x2EC201721E40001FULL, 0x43147DFA73D7EB5EULL } }, /* XSUM_XXH128_withSecret_testdata[4051] */\n    { 4052, 0x0000000000000000ULL, { 0xE5255D2DC8B240B6ULL, 0x8E5B16BEEC1E6EEDULL } }, /* XSUM_XXH128_withSecret_testdata[4052] */\n    { 4053, 0x0000000000000000ULL, { 0x4444D1FC699709E0ULL, 0x934AAFD8D4B30D62ULL } }, /* XSUM_XXH128_withSecret_testdata[4053] */\n    { 4054, 0x0000000000000000ULL, { 0xCD5F6DB7C0C22D88ULL, 0x487AE90F9367DB52ULL } }, /* XSUM_XXH128_withSecret_testdata[4054] */\n    { 4055, 0x0000000000000000ULL, { 0x97C72BF132FC429AULL, 0x099D053F17DFFF7DULL } }, /* XSUM_XXH128_withSecret_testdata[4055] */\n    { 4056, 0x0000000000000000ULL, { 0xF18A47875C8FDC63ULL, 0x9BDAE52091C0F8FAULL } }, /* XSUM_XXH128_withSecret_testdata[4056] */\n    { 4057, 0x0000000000000000ULL, { 0x11A76F8B731BE563ULL, 0xE5E3DF6B77868D36ULL } }, /* XSUM_XXH128_withSecret_testdata[4057] */\n    { 4058, 0x0000000000000000ULL, { 0xDA3D9AC8AC1BC359ULL, 0x5BA5E3333B81D08AULL } }, /* XSUM_XXH128_withSecret_testdata[4058] */\n    { 4059, 0x0000000000000000ULL, { 0xD050D2E1C6187F83ULL, 0x1E9D2521894C332CULL } }, /* XSUM_XXH128_withSecret_testdata[4059] */\n    { 4060, 0x0000000000000000ULL, { 0xA2B9C98FF937B9F2ULL, 0x10D057C3B3B4F6EDULL } }, /* XSUM_XXH128_withSecret_testdata[4060] */\n    { 4061, 0x0000000000000000ULL, { 0xE824E15F45FCE2DFULL, 0x798D5F42D1CA5CFDULL } }, /* XSUM_XXH128_withSecret_testdata[4061] */\n    { 4062, 0x0000000000000000ULL, { 0xF46BF3281D9C12CBULL, 0xC67862386A6A8D3DULL } }, /* XSUM_XXH128_withSecret_testdata[4062] */\n    { 4063, 0x0000000000000000ULL, { 0xBA926F8C9CACD028ULL, 0x2C928BA95F7D0DFFULL } }, /* XSUM_XXH128_withSecret_testdata[4063] */\n    { 4064, 0x0000000000000000ULL, { 0x974C54681B33886CULL, 0x55AAD4C7FF471799ULL } }, /* XSUM_XXH128_withSecret_testdata[4064] */\n    { 4065, 0x0000000000000000ULL, { 0x2A95F80B0C3CCCB1ULL, 0x2CEAD3749FD0F246ULL } }, /* XSUM_XXH128_withSecret_testdata[4065] */\n    { 4066, 0x0000000000000000ULL, { 0x43B843C1A74C8DFAULL, 0xC04DBD28EB00DD98ULL } }, /* XSUM_XXH128_withSecret_testdata[4066] */\n    { 4067, 0x0000000000000000ULL, { 0x32534850ECCF80FEULL, 0xE5AA5C08CCD16D7EULL } }, /* XSUM_XXH128_withSecret_testdata[4067] */\n    { 4068, 0x0000000000000000ULL, { 0xAD4E9636F7F31E69ULL, 0x5A050DA3E194ED87ULL } }, /* XSUM_XXH128_withSecret_testdata[4068] */\n    { 4069, 0x0000000000000000ULL, { 0xCD00CB1BE568FDE6ULL, 0x098C9295860294B6ULL } }, /* XSUM_XXH128_withSecret_testdata[4069] */\n    { 4070, 0x0000000000000000ULL, { 0xE46940245DBB7272ULL, 0xAC9A5592C61031B8ULL } }, /* XSUM_XXH128_withSecret_testdata[4070] */\n    { 4071, 0x0000000000000000ULL, { 0x13D146F7570C6044ULL, 0x57A637789734E5ADULL } }, /* XSUM_XXH128_withSecret_testdata[4071] */\n    { 4072, 0x0000000000000000ULL, { 0x7A956B6CB3576E14ULL, 0x99FFEFDF0E95F01EULL } }, /* XSUM_XXH128_withSecret_testdata[4072] */\n    { 4073, 0x0000000000000000ULL, { 0xEC83FCBD3ACF3B26ULL, 0xEBB54B2676004C64ULL } }, /* XSUM_XXH128_withSecret_testdata[4073] */\n    { 4074, 0x0000000000000000ULL, { 0x16AC17FD7088386EULL, 0x7488543EEBB7213CULL } }, /* XSUM_XXH128_withSecret_testdata[4074] */\n    { 4075, 0x0000000000000000ULL, { 0x83F54BB36686D6D9ULL, 0xE3099F7F49370BA9ULL } }, /* XSUM_XXH128_withSecret_testdata[4075] */\n    { 4076, 0x0000000000000000ULL, { 0xBE63E230272CA46AULL, 0xB108D4959E79E962ULL } }, /* XSUM_XXH128_withSecret_testdata[4076] */\n    { 4077, 0x0000000000000000ULL, { 0x28E6AEE6ACB9630BULL, 0xBDCA3FBB860CE081ULL } }, /* XSUM_XXH128_withSecret_testdata[4077] */\n    { 4078, 0x0000000000000000ULL, { 0x1F9D0601A901C88BULL, 0x02D5894FF3822061ULL } }, /* XSUM_XXH128_withSecret_testdata[4078] */\n    { 4079, 0x0000000000000000ULL, { 0xAE20E4E718E23A10ULL, 0x7EB7EE6F5C60C2C8ULL } }, /* XSUM_XXH128_withSecret_testdata[4079] */\n    { 4080, 0x0000000000000000ULL, { 0xB25FC769707558F5ULL, 0x5F7D3E9E5F3FD840ULL } }, /* XSUM_XXH128_withSecret_testdata[4080] */\n    { 4081, 0x0000000000000000ULL, { 0x1A21C8D19774A134ULL, 0xB756A943B6F7EA2BULL } }, /* XSUM_XXH128_withSecret_testdata[4081] */\n    { 4082, 0x0000000000000000ULL, { 0xED0038B9B1E99BCEULL, 0x3F6A0053DA3469A9ULL } }, /* XSUM_XXH128_withSecret_testdata[4082] */\n    { 4083, 0x0000000000000000ULL, { 0x277C62825BFD4071ULL, 0x55122CAF71F56270ULL } }, /* XSUM_XXH128_withSecret_testdata[4083] */\n    { 4084, 0x0000000000000000ULL, { 0x02F57766E9409B19ULL, 0x5ACF287B3FBC0EF6ULL } }, /* XSUM_XXH128_withSecret_testdata[4084] */\n    { 4085, 0x0000000000000000ULL, { 0xD7C6EF5A72071921ULL, 0x1737DD9BE60AC094ULL } }, /* XSUM_XXH128_withSecret_testdata[4085] */\n    { 4086, 0x0000000000000000ULL, { 0x83615114B601772EULL, 0x086B56B711B85704ULL } }, /* XSUM_XXH128_withSecret_testdata[4086] */\n    { 4087, 0x0000000000000000ULL, { 0x625139954D12967FULL, 0x616482F68B2BB50AULL } }, /* XSUM_XXH128_withSecret_testdata[4087] */\n    { 4088, 0x0000000000000000ULL, { 0x20260B56D71BD17AULL, 0x74033B140E03CA4EULL } }, /* XSUM_XXH128_withSecret_testdata[4088] */\n    { 4089, 0x0000000000000000ULL, { 0x3ED7823D39AA50A9ULL, 0x5D5D184CD3691B3FULL } }, /* XSUM_XXH128_withSecret_testdata[4089] */\n    { 4090, 0x0000000000000000ULL, { 0xDEEB68EC8D3B620DULL, 0x89EEED3BDEF19437ULL } }, /* XSUM_XXH128_withSecret_testdata[4090] */\n    { 4091, 0x0000000000000000ULL, { 0xC043260D09205B7DULL, 0x4157760BE6AFBD61ULL } }, /* XSUM_XXH128_withSecret_testdata[4091] */\n    { 4092, 0x0000000000000000ULL, { 0xAC6A09090419D299ULL, 0x559E6291899C2B55ULL } }, /* XSUM_XXH128_withSecret_testdata[4092] */\n    { 4093, 0x0000000000000000ULL, { 0xC338BC98DE2FD265ULL, 0xB8C655D4E555AF81ULL } }, /* XSUM_XXH128_withSecret_testdata[4093] */\n    { 4094, 0x0000000000000000ULL, { 0x552205B28FB1448FULL, 0xA70ACD274E12F7E9ULL } }, /* XSUM_XXH128_withSecret_testdata[4094] */\n    { 4095, 0x0000000000000000ULL, { 0xC2D888327F91A534ULL, 0x42FE4D688287BEE7ULL } }, /* XSUM_XXH128_withSecret_testdata[4095] */\n    { 4096, 0x0000000000000000ULL, { 0x80C043073074A679ULL, 0x7771BE334FA36A7AULL } }, /* XSUM_XXH128_withSecret_testdata[4096] */\n    { 4097, 0x0000000000000000ULL, { 0x365C254DC189E688ULL, 0xBE5955C3BE450149ULL } }, /* XSUM_XXH128_withSecret_testdata[4097] */\n    { 4098, 0x0000000000000000ULL, { 0x6E28FBB5DC82753AULL, 0x4344005D3877DF73ULL } }, /* XSUM_XXH128_withSecret_testdata[4098] */\n    { 4099, 0x0000000000000000ULL, { 0x1647C7E776D79A08ULL, 0x8D691A1C95F0FF5DULL } }, /* XSUM_XXH128_withSecret_testdata[4099] */\n    { 4100, 0x0000000000000000ULL, { 0x75C6ED860F1F0A29ULL, 0x648E8CA4C5A4C982ULL } }, /* XSUM_XXH128_withSecret_testdata[4100] */\n    { 4101, 0x0000000000000000ULL, { 0x9E4E03BED42CA656ULL, 0x799A7D1B0E29CE2EULL } }, /* XSUM_XXH128_withSecret_testdata[4101] */\n    { 4102, 0x0000000000000000ULL, { 0xAA5368B6B20CA18AULL, 0xDB900926C19976E9ULL } }, /* XSUM_XXH128_withSecret_testdata[4102] */\n    { 4103, 0x0000000000000000ULL, { 0xE98606A8E305E53BULL, 0x46A1D7C2EA756513ULL } }, /* XSUM_XXH128_withSecret_testdata[4103] */\n    { 4104, 0x0000000000000000ULL, { 0x227F43A44EABCF0BULL, 0x13A20E6CE320F034ULL } }, /* XSUM_XXH128_withSecret_testdata[4104] */\n    { 4105, 0x0000000000000000ULL, { 0x045E5F690BAE4E7BULL, 0x47B1AE340E6C6B84ULL } }, /* XSUM_XXH128_withSecret_testdata[4105] */\n    { 4106, 0x0000000000000000ULL, { 0x0A17834E8D0D9A22ULL, 0x95C5B6E739ED6469ULL } }, /* XSUM_XXH128_withSecret_testdata[4106] */\n    { 4107, 0x0000000000000000ULL, { 0x3637F62A915BEA14ULL, 0x3076274B81E59217ULL } }, /* XSUM_XXH128_withSecret_testdata[4107] */\n    { 4108, 0x0000000000000000ULL, { 0xCE88302E57251D0CULL, 0xDB37EFCB58E8F954ULL } }, /* XSUM_XXH128_withSecret_testdata[4108] */\n    { 4109, 0x0000000000000000ULL, { 0xE4BE4F80013DBAE0ULL, 0x2492D7F0190568A5ULL } }, /* XSUM_XXH128_withSecret_testdata[4109] */\n    { 4110, 0x0000000000000000ULL, { 0x6F1CF2ACD36F6174ULL, 0xE1D6CE3A7BB57063ULL } }, /* XSUM_XXH128_withSecret_testdata[4110] */\n    { 4111, 0x0000000000000000ULL, { 0x187CFF657B38CAEEULL, 0xC080B622D6DF3178ULL } }, /* XSUM_XXH128_withSecret_testdata[4111] */\n    { 4112, 0x0000000000000000ULL, { 0xB7875A044BFBAF6FULL, 0x5BF1B073EA8A51BDULL } }, /* XSUM_XXH128_withSecret_testdata[4112] */\n    { 4113, 0x0000000000000000ULL, { 0xAE64B4E0AA6D9082ULL, 0x86A01BB50F74A258ULL } }, /* XSUM_XXH128_withSecret_testdata[4113] */\n    { 4114, 0x0000000000000000ULL, { 0xB9AC502202937977ULL, 0x062A1079EFF5DCCEULL } }, /* XSUM_XXH128_withSecret_testdata[4114] */\n    { 4115, 0x0000000000000000ULL, { 0x1E32D6F34229408EULL, 0x2D1290991F8A099DULL } }, /* XSUM_XXH128_withSecret_testdata[4115] */\n    { 4116, 0x0000000000000000ULL, { 0x96C8D36AFC955CF6ULL, 0x5DE889D38177B104ULL } }, /* XSUM_XXH128_withSecret_testdata[4116] */\n    { 4117, 0x0000000000000000ULL, { 0x8087ABF9BDAD6C57ULL, 0xF264FE7C870CDA72ULL } }, /* XSUM_XXH128_withSecret_testdata[4117] */\n    { 4118, 0x0000000000000000ULL, { 0xDB5EDE0ED22BF4BFULL, 0x566BFA1945E09134ULL } }, /* XSUM_XXH128_withSecret_testdata[4118] */\n    { 4119, 0x0000000000000000ULL, { 0xCC01A835D3DE330DULL, 0x34FF37EF9A700AEDULL } }, /* XSUM_XXH128_withSecret_testdata[4119] */\n    { 4120, 0x0000000000000000ULL, { 0x25A2490F71CC7B71ULL, 0x94936CAC172100D1ULL } }, /* XSUM_XXH128_withSecret_testdata[4120] */\n    { 4121, 0x0000000000000000ULL, { 0xEDF7047605F28040ULL, 0x39DB92F177A51241ULL } }, /* XSUM_XXH128_withSecret_testdata[4121] */\n    { 4122, 0x0000000000000000ULL, { 0x18AC9AC377A0EFC3ULL, 0x7B84A80EED6EA567ULL } }, /* XSUM_XXH128_withSecret_testdata[4122] */\n    { 4123, 0x0000000000000000ULL, { 0xBC2DF7ABA89807A3ULL, 0xC05B5E503458384BULL } }, /* XSUM_XXH128_withSecret_testdata[4123] */\n    { 4124, 0x0000000000000000ULL, { 0x0E9843295ABA9534ULL, 0x0126253BC8650C2AULL } }, /* XSUM_XXH128_withSecret_testdata[4124] */\n    { 4125, 0x0000000000000000ULL, { 0xF63369AFF35C62A8ULL, 0x6EFF666C66D4902CULL } }, /* XSUM_XXH128_withSecret_testdata[4125] */\n    { 4126, 0x0000000000000000ULL, { 0x144948966B9E5FB3ULL, 0x16BAC5A7B452B3B1ULL } }, /* XSUM_XXH128_withSecret_testdata[4126] */\n    { 4127, 0x0000000000000000ULL, { 0xFC3E5F7090065C0BULL, 0xB6E83C07AA1940C5ULL } }, /* XSUM_XXH128_withSecret_testdata[4127] */\n    { 4128, 0x0000000000000000ULL, { 0x8764A90EAD5AAA4BULL, 0x385E729CC5406A29ULL } }, /* XSUM_XXH128_withSecret_testdata[4128] */\n    { 4129, 0x0000000000000000ULL, { 0x49037C823D75F316ULL, 0xF0B96516CFB4A392ULL } }, /* XSUM_XXH128_withSecret_testdata[4129] */\n    { 4130, 0x0000000000000000ULL, { 0xB7B87312F9AA9E2FULL, 0x572C4337DC1CE906ULL } }, /* XSUM_XXH128_withSecret_testdata[4130] */\n    { 4131, 0x0000000000000000ULL, { 0x5A0216171E94CA70ULL, 0xE798DDE614C3F793ULL } }, /* XSUM_XXH128_withSecret_testdata[4131] */\n    { 4132, 0x0000000000000000ULL, { 0x71B88242877B00CFULL, 0xADBFCD550820792DULL } }, /* XSUM_XXH128_withSecret_testdata[4132] */\n    { 4133, 0x0000000000000000ULL, { 0x933452561A285618ULL, 0xC2A6C2CAF4551D51ULL } }, /* XSUM_XXH128_withSecret_testdata[4133] */\n    { 4134, 0x0000000000000000ULL, { 0xADC07705C8ECACF8ULL, 0x9D5D54B4D08B7731ULL } }, /* XSUM_XXH128_withSecret_testdata[4134] */\n    { 4135, 0x0000000000000000ULL, { 0xDFE8C72B4BB06B17ULL, 0x0AAC1A0D21A72517ULL } }, /* XSUM_XXH128_withSecret_testdata[4135] */\n    { 4136, 0x0000000000000000ULL, { 0xB494370C708119B7ULL, 0x599130263076477FULL } }, /* XSUM_XXH128_withSecret_testdata[4136] */\n    { 4137, 0x0000000000000000ULL, { 0x2521A15362F39765ULL, 0x150C8D700528AF2BULL } }, /* XSUM_XXH128_withSecret_testdata[4137] */\n    { 4138, 0x0000000000000000ULL, { 0xDA6491BE0377B78AULL, 0xF1E131DE076A0B98ULL } }, /* XSUM_XXH128_withSecret_testdata[4138] */\n    { 4139, 0x0000000000000000ULL, { 0xDDE3551DA0B0B16FULL, 0x2FD913711405D1E7ULL } }, /* XSUM_XXH128_withSecret_testdata[4139] */\n    { 4140, 0x0000000000000000ULL, { 0x66EEEBDF6FBE67B5ULL, 0x74ECDB5E8A8B8551ULL } }, /* XSUM_XXH128_withSecret_testdata[4140] */\n    { 4141, 0x0000000000000000ULL, { 0xF69061DEB5B18F0DULL, 0x819C71D94B78CE12ULL } }, /* XSUM_XXH128_withSecret_testdata[4141] */\n    { 4142, 0x0000000000000000ULL, { 0xEC0E8775C7613779ULL, 0xC6F7683CE6E45968ULL } }, /* XSUM_XXH128_withSecret_testdata[4142] */\n    { 4143, 0x0000000000000000ULL, { 0x1F46C226E82FC9A4ULL, 0xBD1168FE1E2DCBA6ULL } }, /* XSUM_XXH128_withSecret_testdata[4143] */\n    { 4144, 0x0000000000000000ULL, { 0x11370EF7CCBDF4C2ULL, 0x877EA117994C23FCULL } }, /* XSUM_XXH128_withSecret_testdata[4144] */\n    { 4145, 0x0000000000000000ULL, { 0x7CC7E7A1BE2D8411ULL, 0x133106DE74DEDD33ULL } }, /* XSUM_XXH128_withSecret_testdata[4145] */\n    { 4146, 0x0000000000000000ULL, { 0xBA101C10F3ED8F3BULL, 0x792AD14B23DB7697ULL } }, /* XSUM_XXH128_withSecret_testdata[4146] */\n    { 4147, 0x0000000000000000ULL, { 0x9927A22BB5DEF0F1ULL, 0xACF28CC3E03C7ADDULL } }, /* XSUM_XXH128_withSecret_testdata[4147] */\n    { 4148, 0x0000000000000000ULL, { 0x77B2C7E8C3F7816DULL, 0xEDAF28317C84978EULL } }, /* XSUM_XXH128_withSecret_testdata[4148] */\n    { 4149, 0x0000000000000000ULL, { 0x04ED012D897B2195ULL, 0xB04500057580A6C4ULL } }, /* XSUM_XXH128_withSecret_testdata[4149] */\n    { 4150, 0x0000000000000000ULL, { 0x6815B6C81F5C6E09ULL, 0x652D2977F58539ACULL } }, /* XSUM_XXH128_withSecret_testdata[4150] */\n    { 4151, 0x0000000000000000ULL, { 0xB7C436CAA4DAE17CULL, 0x11F331CC0862D858ULL } }, /* XSUM_XXH128_withSecret_testdata[4151] */\n    { 4152, 0x0000000000000000ULL, { 0x86D16BB9CECD85DEULL, 0xAB821D038072FF43ULL } }, /* XSUM_XXH128_withSecret_testdata[4152] */\n    { 4153, 0x0000000000000000ULL, { 0x4C0AF3A16D2D68D9ULL, 0xFDACD982A8D9A62EULL } }, /* XSUM_XXH128_withSecret_testdata[4153] */\n    { 4154, 0x0000000000000000ULL, { 0x93C1EDFD5C9BE932ULL, 0x9012B0943C72AB18ULL } }, /* XSUM_XXH128_withSecret_testdata[4154] */\n    { 4155, 0x0000000000000000ULL, { 0xB6E82601450A902AULL, 0xCE1CC90D235348BFULL } }, /* XSUM_XXH128_withSecret_testdata[4155] */\n    { 4156, 0x0000000000000000ULL, { 0x1A27D4B001A828A1ULL, 0x0AC976A30253837DULL } }, /* XSUM_XXH128_withSecret_testdata[4156] */\n    { 4157, 0x0000000000000000ULL, { 0xC234BC46C88914E8ULL, 0x5B0FFA037F1537A5ULL } }, /* XSUM_XXH128_withSecret_testdata[4157] */\n    { 4158, 0x0000000000000000ULL, { 0x6DEB5E1719BA9E57ULL, 0x6B9A380B2C10B003ULL } }, /* XSUM_XXH128_withSecret_testdata[4158] */\n    { 4159, 0x0000000000000000ULL, { 0xB12AB27B68460462ULL, 0x262239CEF1E9E0DFULL } }, /* XSUM_XXH128_withSecret_testdata[4159] */\n    { 4160, 0x0000000000000000ULL, { 0x7CD56BF8CB910475ULL, 0x06CD51765E2D12B6ULL } }, /* XSUM_XXH128_withSecret_testdata[4160] */\n};\nstatic const XSUM_testdata_sample_t XSUM_XXH3_generateSecret_testdata[] = {\n    {    0,  192, { 0xE7, 0x8C, 0x77, 0x77, 0x00 } }, /* XSUM_XXH3_generateSecret_testdata[0] */\n    {    0,  240, { 0xE7, 0x8C, 0x77, 0xAA, 0x00 } }, /* XSUM_XXH3_generateSecret_testdata[1] */\n    {    0,  277, { 0xE7, 0x8C, 0x77, 0xAA, 0xED } }, /* XSUM_XXH3_generateSecret_testdata[2] */\n    {    0, 9867, { 0xE7, 0x8C, 0x77, 0xAA, 0xED } }, /* XSUM_XXH3_generateSecret_testdata[3] */\n    {    1,  192, { 0x2B, 0x3E, 0xDE, 0x67, 0x00 } }, /* XSUM_XXH3_generateSecret_testdata[4] */\n    {    1,  240, { 0x2B, 0x3E, 0xDE, 0xC1, 0x00 } }, /* XSUM_XXH3_generateSecret_testdata[5] */\n    {    1,  277, { 0x2B, 0x3E, 0xDE, 0xC1, 0xCC } }, /* XSUM_XXH3_generateSecret_testdata[6] */\n    {    1, 9867, { 0x2B, 0x3E, 0xDE, 0xC1, 0xCC } }, /* XSUM_XXH3_generateSecret_testdata[7] */\n    {  135,  192, { 0xE8, 0x39, 0x6C, 0x16, 0x00 } }, /* XSUM_XXH3_generateSecret_testdata[8] */\n    {  135,  240, { 0xE8, 0x39, 0x6C, 0xCC, 0x00 } }, /* XSUM_XXH3_generateSecret_testdata[9] */\n    {  135,  277, { 0xE8, 0x39, 0x6C, 0xCC, 0x7B } }, /* XSUM_XXH3_generateSecret_testdata[10] */\n    {  135, 9867, { 0xE8, 0x39, 0x6C, 0xCC, 0x7B } }, /* XSUM_XXH3_generateSecret_testdata[11] */\n    {  692,  192, { 0xD6, 0x1C, 0x41, 0x69, 0x00 } }, /* XSUM_XXH3_generateSecret_testdata[12] */\n    {  692,  240, { 0xD6, 0x1C, 0x41, 0x17, 0x00 } }, /* XSUM_XXH3_generateSecret_testdata[13] */\n    {  692,  277, { 0xD6, 0x1C, 0x41, 0x17, 0xB3 } }, /* XSUM_XXH3_generateSecret_testdata[14] */\n    {  692, 9867, { 0xD6, 0x1C, 0x41, 0x17, 0xB3 } }, /* XSUM_XXH3_generateSecret_testdata[15] */\n};\n"
  },
  {
    "path": "third-party/xxhash/tests/sanity_test_vectors_generator.c",
    "content": "// xxHash/tests/sanity_test_vectors_generator.c\n// SPDX-License-Identifier: GPL-2.0-only\n//\n// So far, this program just generates sanity_test_vectors.h\n//\n// Building\n// ========\n//\n// cc sanity_test_vectors_generator.c && ./a.out\n// less sanity_test_vectors.h\n//\n#define XXH_STATIC_LINKING_ONLY\n#define XXH_IMPLEMENTATION   /* access definitions */\n#include \"../cli/xsum_arch.h\"\n#include \"../cli/xsum_os_specific.h\"\n#include \"../xxhash.h\"\n\n#include <assert.h> /* assert */\n\n/* use #define to make them constant, required for initialization */\n#define PRIME32 2654435761U\n#define PRIME64 11400714785074694797ULL\n\n#define SANITY_BUFFER_SIZE (4096 + 64 + 1)\n\n\n/* TODO : Share these test vector definitions with sanity_check.c and xsum_sanity_check.c */\n/*\n * Test data vectors\n */\ntypedef struct {\n    XSUM_U32 len;\n    XSUM_U32 seed;\n    XSUM_U32 Nresult;\n} XSUM_testdata32_t;\n\ntypedef struct {\n    XSUM_U32 len;\n    XSUM_U64 seed;\n    XSUM_U64 Nresult;\n} XSUM_testdata64_t;\n\ntypedef struct {\n    XSUM_U32 len;\n    XSUM_U64 seed;\n    XXH128_hash_t Nresult;\n} XSUM_testdata128_t;\n\n#define SECRET_SAMPLE_NBBYTES 5\ntypedef struct {\n    XSUM_U32 seedLen;\n    XSUM_U32 secretLen;\n    XSUM_U8 byte[SECRET_SAMPLE_NBBYTES];\n} XSUM_testdata_sample_t;\n\n#ifndef   SECRET_SIZE_MAX\n#  define SECRET_SIZE_MAX 9867\n#endif\n\n\n/* TODO : Share these generators with sanity_check.c and xsum_sanity_check.c */\n/* Test vector generators */\nstatic XSUM_testdata32_t tvgen_XXH32(const XSUM_U8* buf, size_t len, XSUM_U32 seed) {\n    XSUM_testdata32_t v;\n    v.len     = len;\n    v.seed    = seed;\n    v.Nresult = XXH32(buf, len, seed);\n    return v;\n}\n\nstatic XSUM_testdata64_t tvgen_XXH64(const XSUM_U8* buf, size_t len, XSUM_U64 seed) {\n    XSUM_testdata64_t v;\n    v.len     = len;\n    v.seed    = seed;\n    v.Nresult = XXH64(buf, len, seed);\n    return v;\n}\n\nstatic XSUM_testdata64_t tvgen_XXH3_64bits_withSeed(const XSUM_U8* buf, size_t len, XSUM_U64 seed) {\n    XSUM_testdata64_t v;\n    v.len     = len;\n    v.seed    = seed;\n    v.Nresult = XXH3_64bits_withSeed(buf, len, seed);\n    return v;\n}\n\nstatic XSUM_testdata64_t tvgen_XXH3_64bits_withSecret(const XSUM_U8* buf, size_t len, const void* secret, size_t secretSize) {\n    XSUM_testdata64_t v;\n    v.len     = len;\n    v.seed    = 0;\n    v.Nresult = XXH3_64bits_withSecret(buf, len, secret, secretSize);\n    return v;\n}\n\nstatic XSUM_testdata128_t tvgen_XXH3_128bits_withSeed(const XSUM_U8* buf, size_t len, XSUM_U64 seed) {\n    XSUM_testdata128_t v;\n    v.len     = len;\n    v.seed    = seed;\n    v.Nresult = XXH3_128bits_withSeed(buf, len, seed);\n    return v;\n}\n\nstatic XSUM_testdata128_t tvgen_XXH3_128bits_withSecret(const XSUM_U8* buf, size_t len, const void* secret, size_t secretSize) {\n    XSUM_testdata128_t v;\n    v.len     = len;\n    v.seed    = 0;\n    v.Nresult = XXH3_128bits_withSecret(buf, len, secret, secretSize);\n    return v;\n}\n\nstatic XSUM_testdata_sample_t tvgen_XXH3_generateSecret(\n    void* secretBuffer,\n    size_t secretSize,\n    const void* customSeed,\n    size_t customSeedSize\n) {\n    XXH3_generateSecret(secretBuffer, secretSize, customSeed, customSeedSize);\n\n    XSUM_testdata_sample_t v;\n    v.seedLen   = customSeedSize;\n    v.secretLen = secretSize;\n\n    /* TODO : Share this array with sanity_check.c and xsum_sanity_check.c */\n    /* position of sampled bytes */\n    static const int sampleIndex[SECRET_SAMPLE_NBBYTES] = { 0, 62, 131, 191, 241 };\n\n    for(int i = 0; i < SECRET_SAMPLE_NBBYTES; ++i) {\n        const XSUM_U8* const secretBufferAsU8 = (const XSUM_U8*) secretBuffer;\n        v.byte[i] = secretBufferAsU8[sampleIndex[i]];\n    }\n    return v;\n}\n\n\n/* Test vector serializers */\nstatic void fprintf_XSUM_testdata32_t(FILE* fp, XSUM_testdata32_t const v) {\n    fprintf(fp, \"{ %4d, 0x%08XU, 0x%08XU },\", v.len, v.seed, v.Nresult);\n}\n\nstatic void fprintf_XSUM_testdata64_t(FILE* fp, XSUM_testdata64_t const v) {\n    fprintf(fp, \"{ %4d, 0x%016llXULL, 0x%016llXULL },\", v.len, v.seed, v.Nresult);\n}\n\nstatic void fprintf_XSUM_testdata128_t(FILE* fp, XSUM_testdata128_t const v) {\n    fprintf(fp, \"{ %4d, 0x%016llXULL, { 0x%016llXULL, 0x%016llXULL } },\",\n            v.len, v.seed, v.Nresult.low64, v.Nresult.high64);\n}\n\nstatic void fprintf_XSUM_testdata_sample_t(FILE* fp, XSUM_testdata_sample_t const v) {\n    fprintf(fp,\"{ %4d, %4d, { 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X } },\",\n            v.seedLen, v.secretLen, v.byte[0], v.byte[1], v.byte[2], v.byte[3], v.byte[4]);\n}\n\n\n/* TODO : Share this function with sanity_check.c and xsum_sanity_check.c */\n/*\n * Fills a test buffer with pseudorandom data.\n *\n * This is used in the sanity check - its values must not be changed.\n */\nstatic void fillTestBuffer(XSUM_U8* buffer, size_t bufferLenInBytes)\n{\n    XSUM_U64 byteGen = PRIME32;\n    size_t i;\n\n    assert(buffer != NULL);\n\n    for (i = 0; i < bufferLenInBytes; ++i) {\n        buffer[i] = (XSUM_U8)(byteGen>>56);\n        byteGen *= PRIME64;\n    }\n}\n\n\n/* TODO : Share this function with sanity_check.c and xsum_sanity_check.c */\n/*\n * Create (malloc) and fill buffer with pseudorandom data for sanity check.\n *\n * Use releaseSanityBuffer() to delete the buffer.\n */\nstatic XSUM_U8* createSanityBuffer(size_t bufferLenInBytes)\n{\n    XSUM_U8* const buffer = (XSUM_U8*) malloc(bufferLenInBytes);\n    assert(buffer != NULL);\n    fillTestBuffer(buffer, bufferLenInBytes);\n    return buffer;\n}\n\n\n/* TODO : Share this function with sanity_check.c and xsum_sanity_check.c */\n/*\n * Delete (free) the buffer which has been genereated by createSanityBuffer()\n */\nstatic void releaseSanityBuffer(XSUM_U8* buffer)\n{\n    assert(buffer != NULL);\n    free(buffer);\n}\n\n\n/* Generate test vectors for XXH32() */\nstatic void generate_sanity_test_vectors_xxh32(FILE* fp, size_t maxLen) {\n    const char* const arrayTypeName = \"XSUM_testdata32_t\";\n    const char* const arrayName     = \"XSUM_XXH32_testdata\";\n    fprintf(fp, \"static const %s %s[] = {\\n\", arrayTypeName, arrayName);\n\n    XSUM_U8* const sanityBuffer = createSanityBuffer(maxLen);\n\n    size_t index = 0;\n    for(size_t len = 0; len < maxLen; ++len) {\n        static const uint64_t seeds[] = { 0, PRIME32 };\n        for(size_t iSeed = 0; iSeed < sizeof(seeds)/sizeof(seeds[0]); ++iSeed) {\n            size_t const seed = seeds[iSeed];\n            XSUM_testdata32_t const v = tvgen_XXH32(sanityBuffer, len, seed);\n\n            fprintf(fp, \"    \");\n            fprintf_XSUM_testdata32_t(fp, v);\n            fprintf(fp, \" /* %s[%zd] */\\n\", arrayName, index++);\n        }\n    }\n\n    releaseSanityBuffer(sanityBuffer);\n    fprintf(fp, \"};\\n\");\n}\n\n\n/* Generate test vectors for XXH64() */\nstatic void generate_sanity_test_vectors_xxh64(FILE* fp, size_t maxLen) {\n    const char* const arrayTypeName = \"XSUM_testdata64_t\";\n    const char* const arrayName     = \"XSUM_XXH64_testdata\";\n    fprintf(fp, \"static const %s %s[] = {\\n\", arrayTypeName, arrayName);\n\n    XSUM_U8* const sanityBuffer = createSanityBuffer(maxLen);\n\n    size_t index = 0;\n    for(size_t len = 0; len < maxLen; ++len) {\n        static const uint64_t seeds[] = { 0, PRIME32 };\n        for(size_t iSeed = 0; iSeed < sizeof(seeds)/sizeof(seeds[0]); ++iSeed) {\n            size_t const seed = seeds[iSeed];\n            XSUM_testdata64_t const v = tvgen_XXH64(sanityBuffer, len, seed);\n\n            fprintf(fp, \"    \");\n            fprintf_XSUM_testdata64_t(fp, v);\n            fprintf(fp, \" /* %s[%zd] */\\n\", arrayName, index++);\n        }\n    }\n\n    releaseSanityBuffer(sanityBuffer);\n    fprintf(fp, \"};\\n\");\n}\n\n\n/* Generate test vectors for XXH3_64bits_withSeed() */\nstatic void generate_sanity_test_vectors_xxh3(FILE* fp, size_t maxLen) {\n    const char* const arrayTypeName = \"XSUM_testdata64_t\";\n    const char* const arrayName     = \"XSUM_XXH3_testdata\";\n    fprintf(fp, \"static const %s %s[] = {\\n\", arrayTypeName, arrayName);\n\n    XSUM_U8* const sanityBuffer = createSanityBuffer(maxLen);\n\n    size_t index = 0;\n    for(size_t len = 0; len < maxLen; ++len) {\n        static const uint64_t seeds[] = { 0, PRIME64 };\n        for(size_t iSeed = 0; iSeed < sizeof(seeds)/sizeof(seeds[0]); ++iSeed) {\n            size_t const seed = seeds[iSeed];\n            XSUM_testdata64_t const v = tvgen_XXH3_64bits_withSeed(sanityBuffer, len, seed);\n\n            fprintf(fp, \"    \");\n            fprintf_XSUM_testdata64_t(fp, v);\n            fprintf(fp, \" /* %s[%zd] */\\n\", arrayName, index++);\n        }\n    }\n\n    releaseSanityBuffer(sanityBuffer);\n    fprintf(fp, \"};\\n\");\n}\n\n\n/* Generate test vectors for XXH3_64bits_withSecret() */\nstatic void generate_sanity_test_vectors_xxh3_withSecret(FILE* fp, size_t maxLen) {\n    const char* const arrayTypeName = \"XSUM_testdata64_t\";\n    const char* const arrayName     = \"XSUM_XXH3_withSecret_testdata\";\n    fprintf(fp, \"static const %s %s[] = {\\n\", arrayTypeName, arrayName);\n\n    XSUM_U8* const sanityBuffer = createSanityBuffer(maxLen);\n\n    const void* const secret = sanityBuffer + 7;\n    size_t const secretSize = XXH3_SECRET_SIZE_MIN + 11;\n    assert(maxLen >= 7 + secretSize);\n\n    size_t index = 0;\n    for(size_t len = 0; len < maxLen; ++len) {\n        XSUM_testdata64_t const v = tvgen_XXH3_64bits_withSecret(sanityBuffer, len, secret, secretSize);\n\n        fprintf(fp, \"    \");\n        fprintf_XSUM_testdata64_t(fp, v);\n        fprintf(fp, \" /* %s[%zd] */\\n\", arrayName, index++);\n    }\n\n    releaseSanityBuffer(sanityBuffer);\n    fprintf(fp, \"};\\n\");\n}\n\n\n/* Generate test vectors for XXH3_128bits_withSeed() */\nstatic void generate_sanity_test_vectors_xxh128(FILE* fp, size_t maxLen) {\n    const char* const arrayTypeName = \"XSUM_testdata128_t\";\n    const char* const arrayName     = \"XSUM_XXH128_testdata\";\n    fprintf(fp, \"static const %s %s[] = {\\n\", arrayTypeName, arrayName);\n\n    XSUM_U8* const sanityBuffer = createSanityBuffer(maxLen);\n\n    size_t index = 0;\n    for(size_t len = 0; len < maxLen; ++len) {\n        static const uint64_t seeds[] = { 0, PRIME32, PRIME64 };\n        for(size_t iSeed = 0; iSeed < sizeof(seeds)/sizeof(seeds[0]); ++iSeed) {\n            XSUM_U64 const seed = seeds[iSeed];\n            XSUM_testdata128_t const v = tvgen_XXH3_128bits_withSeed(sanityBuffer, len, seed);\n\n            fprintf(fp, \"    \");\n            fprintf_XSUM_testdata128_t(fp, v);\n            fprintf(fp, \" /* %s[%zd] */\\n\", arrayName, index++);\n        }\n    }\n    fprintf(fp, \"};\\n\");\n    releaseSanityBuffer(sanityBuffer);\n}\n\n\n/* Generate test vectors for XXH3_128bits_withSecret() */\nstatic void generate_sanity_test_vectors_xxh128_withSecret(FILE* fp, size_t maxLen) {\n    const char* const arrayTypeName = \"XSUM_testdata128_t\";\n    const char* const arrayName     = \"XSUM_XXH128_withSecret_testdata\";\n    fprintf(fp, \"static const %s %s[] = {\\n\", arrayTypeName, arrayName);\n\n    XSUM_U8* const sanityBuffer = createSanityBuffer(maxLen);\n\n    const void* const secret = sanityBuffer + 7;\n    size_t const secretSize = XXH3_SECRET_SIZE_MIN + 11;\n    assert(maxLen >= 7 + secretSize);\n\n    size_t index = 0;\n    for(size_t len = 0; len < maxLen; ++len) {\n        XSUM_testdata128_t const v = tvgen_XXH3_128bits_withSecret(sanityBuffer, len, secret, secretSize);\n\n        fprintf(fp, \"    \");\n        fprintf_XSUM_testdata128_t(fp, v);\n        fprintf(fp, \" /* %s[%zd] */\\n\", arrayName, index++);\n    }\n\n    fprintf(fp, \"};\\n\");\n    releaseSanityBuffer(sanityBuffer);\n}\n\n\n/* Generate test vectors for XXH3_generateSecret() */\nstatic void generate_sanity_test_vectors_xxh3_generateSecret(FILE* fp, size_t maxLen) {\n    const char* const arrayTypeName = \"XSUM_testdata_sample_t\";\n    const char* const arrayName     = \"XSUM_XXH3_generateSecret_testdata\";\n    fprintf(fp, \"static const %s %s[] = {\\n\", arrayTypeName, arrayName);\n\n    XSUM_U8* const sanityBuffer = createSanityBuffer(maxLen);\n    const void* const customSeed = sanityBuffer;\n    static const size_t seedLens[] = {\n        0,\n        1,\n        XXH3_SECRET_SIZE_MIN - 1,\n        XXH3_SECRET_DEFAULT_SIZE + 500\n    };\n    static const size_t secretLens[] = {\n        192,\n        240,\n        277,\n        SECRET_SIZE_MAX\n    };\n\n    size_t index = 0;\n    for(size_t iSeedLen = 0; iSeedLen < sizeof(seedLens)/sizeof(seedLens[0]); ++iSeedLen) {\n        for(size_t iSecretLen = 0; iSecretLen < sizeof(secretLens)/sizeof(secretLens[0]); ++iSecretLen) {\n            size_t const seedLen = seedLens[iSeedLen];\n            size_t const secretLen = secretLens[iSecretLen];\n            XSUM_U8 secretBuffer[SECRET_SIZE_MAX] = {0};\n\n            assert(seedLen <= maxLen);\n            assert(secretLen <= SECRET_SIZE_MAX);\n\n            XSUM_testdata_sample_t const v = tvgen_XXH3_generateSecret(\n                secretBuffer,\n                secretLen,\n                customSeed,\n                seedLen\n            );\n\n            fprintf(fp, \"    \");\n            fprintf_XSUM_testdata_sample_t(fp, v);\n            fprintf(fp, \" /* %s[%zd] */\\n\", arrayName, index++);\n        }\n    }\n    fprintf(fp, \"};\\n\");\n\n    releaseSanityBuffer(sanityBuffer);\n}\n\n\n/* Generate test vectors */\nvoid generate_sanity_test_vectors(size_t maxLen) {\n    const char* filename = \"sanity_test_vectors.h\";\n    fprintf(stderr, \"Generating %s\\n\", filename);\n    FILE* fp = fopen(filename, \"w\");\n    fprintf(fp,\n        \"typedef struct {\\n\"\n        \"    XSUM_U32 len;\\n\"\n        \"    XSUM_U32 seed;\\n\"\n        \"    XSUM_U32 Nresult;\\n\"\n        \"} XSUM_testdata32_t;\\n\"\n        \"\\n\"\n        \"typedef struct {\\n\"\n        \"    XSUM_U32 len;\\n\"\n        \"    XSUM_U64 seed;\\n\"\n        \"    XSUM_U64 Nresult;\\n\"\n        \"} XSUM_testdata64_t;\\n\"\n        \"\\n\"\n        \"typedef struct {\\n\"\n        \"    XSUM_U32 len;\\n\"\n        \"    XSUM_U64 seed;\\n\"\n        \"    XXH128_hash_t Nresult;\\n\"\n        \"} XSUM_testdata128_t;\\n\"\n        \"\\n\"\n        \"#ifndef SECRET_SAMPLE_NBBYTES\\n\"\n        \"#define SECRET_SAMPLE_NBBYTES 5\\n\"\n        \"#endif\\n\"\n        \"\\n\"\n        \"typedef struct {\\n\"\n        \"    XSUM_U32 seedLen;\\n\"\n        \"    XSUM_U32 secretLen;\\n\"\n        \"    XSUM_U8 byte[SECRET_SAMPLE_NBBYTES];\\n\"\n        \"} XSUM_testdata_sample_t;\\n\"\n        \"\\n\"\n        \"#ifndef SECRET_SIZE_MAX\\n\"\n        \"#define SECRET_SIZE_MAX 9867\\n\"\n        \"#endif\\n\"\n        \"\\n\"\n    );\n\n    generate_sanity_test_vectors_xxh32(fp, maxLen);\n    generate_sanity_test_vectors_xxh64(fp, maxLen);\n    generate_sanity_test_vectors_xxh3(fp, maxLen);\n    generate_sanity_test_vectors_xxh3_withSecret(fp, maxLen);\n    generate_sanity_test_vectors_xxh128(fp, maxLen);\n    generate_sanity_test_vectors_xxh128_withSecret(fp, maxLen);\n    generate_sanity_test_vectors_xxh3_generateSecret(fp, maxLen);\n    fclose(fp);\n}\n\n\n/**/\nint main(int argc, const char* argv[])\n{\n    (void) argc;\n    (void) argv;\n    const size_t sanityBufferSizeInBytes = SANITY_BUFFER_SIZE;\n    generate_sanity_test_vectors(sanityBufferSizeInBytes);\n    return EXIT_SUCCESS;\n}\n"
  },
  {
    "path": "third-party/xxhash/tests/unicode_lint.sh",
    "content": "#!/bin/bash\n\n# `unicode_lint.sh' determines whether source files under ${dirs} directories\n# contain Unicode characters, and fails if any do.\n#\n# We don't recommend to call this script directly.\n# Instead of it, use `make lint-unicode` via root directory Makefile.\n\n# ${dirs} : target directories\ndirs=(./ ./cli ./tests ./tests/bench ./tests/collisions)\n\nSCRIPT_DIR=\"`dirname \"${BASH_SOURCE[0]}\"`\"\ncd ${SCRIPT_DIR}/..\n\necho \"Ensure no unicode character is present in source files *.{c,h}\"\npass=true\n\n# Scan each directory in ${dirs} for Unicode in source (*.c, *.h) files\ni=0\nwhile [ $i -lt ${#dirs[@]} ]\ndo\n  dir=${dirs[$i]}\n  echo dir=$dir\n  result=$(\n    find ${dir} -regex '.*\\.\\(c\\|h\\)$' -exec grep -P -n \"[^\\x00-\\x7F]\" {} \\; -exec echo \"{}: FAIL\" \\;\n  )\n  if [[ $result ]]; then\n    echo \"$result\"\n    pass=false\n  fi\n  i=`expr $i + 1`\ndone\n\n\n# Result\nif [ \"$pass\" = true ]; then\n  echo \"All tests successful: no unicode character detected\"\n  echo \"Result: PASS\"\n  exit 0\nelse\n  echo \"Result: FAIL\"\n  exit 1\nfi\n"
  },
  {
    "path": "third-party/xxhash/xxh3.h",
    "content": "/*\n * xxHash - Extremely Fast Hash algorithm\n * Development source file for `xxh3`\n * Copyright (C) 2019-2021 Yann Collet\n *\n * BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n *    * Redistributions of source code must retain the above copyright\n *      notice, this list of conditions and the following disclaimer.\n *    * Redistributions in binary form must reproduce the above\n *      copyright notice, this list of conditions and the following disclaimer\n *      in the documentation and/or other materials provided with the\n *      distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n/*\n * Note: This file used to host the source code of XXH3_* variants.\n * during the development period.\n * The source code is now properly integrated within xxhash.h.\n *\n * xxh3.h is no longer useful,\n * but it is still provided for compatibility with source code\n * which used to include it directly.\n *\n * Programs are now highly discouraged to include xxh3.h.\n * Include `xxhash.h` instead, which is the officially supported interface.\n *\n * In the future, xxh3.h will start to generate warnings, then errors,\n * then it will be removed from source package and from include directory.\n */\n\n/* Simulate the same impact as including the old xxh3.h source file */\n\n#define XXH_INLINE_ALL\n#include \"xxhash.h\"\n"
  },
  {
    "path": "third-party/xxhash/xxh_x86dispatch.c",
    "content": "/*\n * xxHash - Extremely Fast Hash algorithm\n * Copyright (C) 2020-2021 Yann Collet\n *\n * BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n *    * Redistributions of source code must retain the above copyright\n *      notice, this list of conditions and the following disclaimer.\n *    * Redistributions in binary form must reproduce the above\n *      copyright notice, this list of conditions and the following disclaimer\n *      in the documentation and/or other materials provided with the\n *      distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n\n/*!\n * @file xxh_x86dispatch.c\n *\n * Automatic dispatcher code for the @ref XXH3_family on x86-based targets.\n *\n * Optional add-on.\n *\n * **Compile this file with the default flags for your target.**\n * Note that compiling with flags like `-mavx*`, `-march=native`, or `/arch:AVX*`\n * will make the resulting binary incompatible with cpus not supporting the requested instruction set.\n *\n * @defgroup dispatch x86 Dispatcher\n * @{\n */\n\n#if defined (__cplusplus)\nextern \"C\" {\n#endif\n\n#if !(defined(__x86_64__) || defined(__i386__) || defined(_M_IX86) || defined(_M_X64))\n#  error \"Dispatching is currently only supported on x86 and x86_64.\"\n#endif\n\n/*! @cond Doxygen ignores this part */\n#ifndef XXH_HAS_INCLUDE\n#  ifdef __has_include\n/*\n * Not defined as XXH_HAS_INCLUDE(x) (function-like) because\n * this causes segfaults in Apple Clang 4.2 (on Mac OS X 10.7 Lion)\n */\n#    define XXH_HAS_INCLUDE __has_include\n#  else\n#    define XXH_HAS_INCLUDE(x) 0\n#  endif\n#endif\n/*! @endcond */\n\n/*!\n * @def XXH_DISPATCH_SCALAR\n * @brief Enables/dispatching the scalar code path.\n *\n * If this is defined to 0, SSE2 support is assumed. This reduces code size\n * when the scalar path is not needed.\n *\n * This is automatically defined to 0 when...\n *   - SSE2 support is enabled in the compiler\n *   - Targeting x86_64\n *   - Targeting Android x86\n *   - Targeting macOS\n */\n#ifndef XXH_DISPATCH_SCALAR\n#  if defined(__SSE2__) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2) /* SSE2 on by default */ \\\n     || defined(__x86_64__) || defined(_M_X64) /* x86_64 */ \\\n     || defined(__ANDROID__) || defined(__APPLE__) /* Android or macOS */\n#     define XXH_DISPATCH_SCALAR 0 /* disable */\n#  else\n#     define XXH_DISPATCH_SCALAR 1\n#  endif\n#endif\n/*!\n * @def XXH_DISPATCH_AVX2\n * @brief Enables/disables dispatching for AVX2.\n *\n * This is automatically detected if it is not defined.\n *  - GCC 4.7 and later are known to support AVX2, but >4.9 is required for\n *    to get the AVX2 intrinsics and typedefs without -mavx -mavx2.\n *  - Visual Studio 2013 Update 2 and later are known to support AVX2.\n *  - The GCC/Clang internal header `<avx2intrin.h>` is detected. While this is\n *    not allowed to be included directly, it still appears in the builtin\n *    include path and is detectable with `__has_include`.\n *\n * @see XXH_AVX2\n */\n#ifndef XXH_DISPATCH_AVX2\n#  if (defined(__GNUC__) && (__GNUC__ > 4)) /* GCC 5.0+ */ \\\n   || (defined(_MSC_VER) && _MSC_VER >= 1900) /* VS 2015+ */ \\\n   || (defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 180030501) /* VS 2013 Update 2 */ \\\n   || XXH_HAS_INCLUDE(<avx2intrin.h>) /* GCC/Clang internal header */\n#    define XXH_DISPATCH_AVX2 1   /* enable dispatch towards AVX2 */\n#  else\n#    define XXH_DISPATCH_AVX2 0\n#  endif\n#endif /* XXH_DISPATCH_AVX2 */\n\n/*!\n * @def XXH_DISPATCH_AVX512\n * @brief Enables/disables dispatching for AVX512.\n *\n * Automatically detected if one of the following conditions is met:\n *  - GCC 4.9 and later are known to support AVX512.\n *  - Visual Studio 2017  and later are known to support AVX2.\n *  - The GCC/Clang internal header `<avx512fintrin.h>` is detected. While this\n *    is not allowed to be included directly, it still appears in the builtin\n *    include path and is detectable with `__has_include`.\n *\n * @see XXH_AVX512\n */\n#ifndef XXH_DISPATCH_AVX512\n#  if (defined(__GNUC__) \\\n       && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9))) /* GCC 4.9+ */ \\\n   || (defined(_MSC_VER) && _MSC_VER >= 1910) /* VS 2017+ */ \\\n   || XXH_HAS_INCLUDE(<avx512fintrin.h>) /* GCC/Clang internal header */\n#    define XXH_DISPATCH_AVX512 1   /* enable dispatch towards AVX512 */\n#  else\n#    define XXH_DISPATCH_AVX512 0\n#  endif\n#endif /* XXH_DISPATCH_AVX512 */\n\n/*!\n * @def XXH_TARGET_SSE2\n * @brief Allows a function to be compiled with SSE2 intrinsics.\n *\n * Uses `__attribute__((__target__(\"sse2\")))` on GCC to allow SSE2 to be used\n * even with `-mno-sse2`.\n *\n * @def XXH_TARGET_AVX2\n * @brief Like @ref XXH_TARGET_SSE2, but for AVX2.\n *\n * @def XXH_TARGET_AVX512\n * @brief Like @ref XXH_TARGET_SSE2, but for AVX512.\n *\n */\n#if defined(__GNUC__)\n#  include <emmintrin.h> /* SSE2 */\n#  if XXH_DISPATCH_AVX2 || XXH_DISPATCH_AVX512\n#    include <immintrin.h> /* AVX2, AVX512F */\n#  endif\n#  define XXH_TARGET_SSE2 __attribute__((__target__(\"sse2\")))\n#  define XXH_TARGET_AVX2 __attribute__((__target__(\"avx2\")))\n#  define XXH_TARGET_AVX512 __attribute__((__target__(\"avx512f\")))\n#elif defined(__clang__) && defined(_MSC_VER) /* clang-cl.exe */\n#  include <emmintrin.h> /* SSE2 */\n#  if XXH_DISPATCH_AVX2 || XXH_DISPATCH_AVX512\n#    include <immintrin.h> /* AVX2, AVX512F */\n#    include <smmintrin.h>\n#    include <avxintrin.h>\n#    include <avx2intrin.h>\n#    include <avx512fintrin.h>\n#  endif\n#  define XXH_TARGET_SSE2 __attribute__((__target__(\"sse2\")))\n#  define XXH_TARGET_AVX2 __attribute__((__target__(\"avx2\")))\n#  define XXH_TARGET_AVX512 __attribute__((__target__(\"avx512f\")))\n#elif defined(_MSC_VER)\n#  include <intrin.h>\n#  define XXH_TARGET_SSE2\n#  define XXH_TARGET_AVX2\n#  define XXH_TARGET_AVX512\n#else\n#  error \"Dispatching is currently not supported for your compiler.\"\n#endif\n\n/*! @cond Doxygen ignores this part */\n#ifdef XXH_DISPATCH_DEBUG\n/* debug logging */\n#  include <stdio.h>\n#  define XXH_debugPrint(str) { fprintf(stderr, \"DEBUG: xxHash dispatch: %s \\n\", str); fflush(NULL); }\n#else\n#  define XXH_debugPrint(str) ((void)0)\n#  undef NDEBUG /* avoid redefinition */\n#  define NDEBUG\n#endif\n/*! @endcond */\n#include <assert.h>\n\n#ifndef XXH_DOXYGEN\n#define XXH_INLINE_ALL\n#define XXH_X86DISPATCH\n#include \"xxhash.h\"\n#endif\n\n/*! @cond Doxygen ignores this part */\n#ifndef XXH_HAS_ATTRIBUTE\n#  ifdef __has_attribute\n#    define XXH_HAS_ATTRIBUTE(...) __has_attribute(__VA_ARGS__)\n#  else\n#    define XXH_HAS_ATTRIBUTE(...) 0\n#  endif\n#endif\n/*! @endcond */\n\n/*! @cond Doxygen ignores this part */\n#if XXH_HAS_ATTRIBUTE(constructor)\n#  define XXH_CONSTRUCTOR __attribute__((constructor))\n#  define XXH_DISPATCH_MAYBE_NULL 0\n#else\n#  define XXH_CONSTRUCTOR\n#  define XXH_DISPATCH_MAYBE_NULL 1\n#endif\n/*! @endcond */\n\n\n/*! @cond Doxygen ignores this part */\n/*\n * Support both AT&T and Intel dialects\n *\n * GCC doesn't convert AT&T syntax to Intel syntax, and will error out if\n * compiled with -masm=intel. Instead, it supports dialect switching with\n * curly braces: { AT&T syntax | Intel syntax }\n *\n * Clang's integrated assembler automatically converts AT&T syntax to Intel if\n * needed, making the dialect switching useless (it isn't even supported).\n *\n * Note: Comments are written in the inline assembly itself.\n */\n#ifdef __clang__\n#  define XXH_I_ATT(intel, att) att \"\\n\\t\"\n#else\n#  define XXH_I_ATT(intel, att) \"{\" att \"|\" intel \"}\\n\\t\"\n#endif\n/*! @endcond */\n\n/*!\n * @private\n * @brief Runs CPUID.\n *\n * @param eax , ecx The parameters to pass to CPUID, %eax and %ecx respectively.\n * @param abcd The array to store the result in, `{ eax, ebx, ecx, edx }`\n */\nstatic void XXH_cpuid(xxh_u32 eax, xxh_u32 ecx, xxh_u32* abcd)\n{\n#if defined(_MSC_VER)\n    __cpuidex((int*)abcd, eax, ecx);\n#else\n    xxh_u32 ebx, edx;\n# if defined(__i386__) && defined(__PIC__)\n    __asm__(\n        \"# Call CPUID\\n\\t\"\n        \"#\\n\\t\"\n        \"# On 32-bit x86 with PIC enabled, we are not allowed to overwrite\\n\\t\"\n        \"# EBX, so we use EDI instead.\\n\\t\"\n        XXH_I_ATT(\"mov     edi, ebx\",   \"movl    %%ebx, %%edi\")\n        XXH_I_ATT(\"cpuid\",              \"cpuid\"               )\n        XXH_I_ATT(\"xchg    edi, ebx\",   \"xchgl   %%ebx, %%edi\")\n        : \"=D\" (ebx),\n# else\n    __asm__(\n        \"# Call CPUID\\n\\t\"\n        XXH_I_ATT(\"cpuid\",              \"cpuid\")\n        : \"=b\" (ebx),\n# endif\n              \"+a\" (eax), \"+c\" (ecx), \"=d\" (edx));\n    abcd[0] = eax;\n    abcd[1] = ebx;\n    abcd[2] = ecx;\n    abcd[3] = edx;\n#endif\n}\n\n/*\n * Modified version of Intel's guide\n * https://software.intel.com/en-us/articles/how-to-detect-new-instruction-support-in-the-4th-generation-intel-core-processor-family\n */\n\n#if XXH_DISPATCH_AVX2 || XXH_DISPATCH_AVX512\n/*!\n * @private\n * @brief Runs `XGETBV`.\n *\n * While the CPU may support AVX2, the operating system might not properly save\n * the full YMM/ZMM registers.\n *\n * xgetbv is used for detecting this: Any compliant operating system will define\n * a set of flags in the xcr0 register indicating how it saves the AVX registers.\n *\n * You can manually disable this flag on Windows by running, as admin:\n *\n *   bcdedit.exe /set xsavedisable 1\n *\n * and rebooting. Run the same command with 0 to re-enable it.\n */\nstatic xxh_u64 XXH_xgetbv(void)\n{\n#if defined(_MSC_VER)\n    return _xgetbv(0);  /* min VS2010 SP1 compiler is required */\n#else\n    xxh_u32 xcr0_lo, xcr0_hi;\n    __asm__(\n        \"# Call XGETBV\\n\\t\"\n        \"#\\n\\t\"\n        \"# Older assemblers (e.g. macOS's ancient GAS version) don't support\\n\\t\"\n        \"# the XGETBV opcode, so we encode it by hand instead.\\n\\t\"\n        \"# See <https://github.com/asmjit/asmjit/issues/78> for details.\\n\\t\"\n        \".byte   0x0f, 0x01, 0xd0\\n\\t\"\n       : \"=a\" (xcr0_lo), \"=d\" (xcr0_hi) : \"c\" (0));\n    return xcr0_lo | ((xxh_u64)xcr0_hi << 32);\n#endif\n}\n#endif\n\n/*! @cond Doxygen ignores this part */\n#define XXH_SSE2_CPUID_MASK (1 << 26)\n#define XXH_OSXSAVE_CPUID_MASK ((1 << 26) | (1 << 27))\n#define XXH_AVX2_CPUID_MASK (1 << 5)\n#define XXH_AVX2_XGETBV_MASK ((1 << 2) | (1 << 1))\n#define XXH_AVX512F_CPUID_MASK (1 << 16)\n#define XXH_AVX512F_XGETBV_MASK ((7 << 5) | (1 << 2) | (1 << 1))\n/*! @endcond */\n\n/*!\n * @private\n * @brief Returns the best XXH3 implementation.\n *\n * Runs various CPUID/XGETBV tests to try and determine the best implementation.\n *\n * @return The best @ref XXH_VECTOR implementation.\n * @see XXH_VECTOR_TYPES\n */\nint XXH_featureTest(void)\n{\n    xxh_u32 abcd[4];\n    xxh_u32 max_leaves;\n    int best = XXH_SCALAR;\n#if XXH_DISPATCH_AVX2 || XXH_DISPATCH_AVX512\n    xxh_u64 xgetbv_val;\n#endif\n#if defined(__GNUC__) && defined(__i386__)\n    xxh_u32 cpuid_supported;\n    __asm__(\n        \"# For the sake of ruthless backwards compatibility, check if CPUID\\n\\t\"\n        \"# is supported in the EFLAGS on i386.\\n\\t\"\n        \"# This is not necessary on x86_64 - CPUID is mandatory.\\n\\t\"\n        \"#   The ID flag (bit 21) in the EFLAGS register indicates support\\n\\t\"\n        \"#   for the CPUID instruction. If a software procedure can set and\\n\\t\"\n        \"#   clear this flag, the processor executing the procedure supports\\n\\t\"\n        \"#   the CPUID instruction.\\n\\t\"\n        \"#   <https://c9x.me/x86/html/file_module_x86_id_45.html>\\n\\t\"\n        \"#\\n\\t\"\n        \"# Routine is from <https://wiki.osdev.org/CPUID>.\\n\\t\"\n\n        \"# Save EFLAGS\\n\\t\"\n        XXH_I_ATT(\"pushfd\",                           \"pushfl\"                    )\n        \"# Store EFLAGS\\n\\t\"\n        XXH_I_ATT(\"pushfd\",                           \"pushfl\"                    )\n        \"# Invert the ID bit in stored EFLAGS\\n\\t\"\n        XXH_I_ATT(\"xor     dword ptr[esp], 0x200000\", \"xorl    $0x200000, (%%esp)\")\n        \"# Load stored EFLAGS (with ID bit inverted)\\n\\t\"\n        XXH_I_ATT(\"popfd\",                            \"popfl\"                     )\n        \"# Store EFLAGS again (ID bit may or not be inverted)\\n\\t\"\n        XXH_I_ATT(\"pushfd\",                           \"pushfl\"                    )\n        \"# eax = modified EFLAGS (ID bit may or may not be inverted)\\n\\t\"\n        XXH_I_ATT(\"pop     eax\",                      \"popl    %%eax\"             )\n        \"# eax = whichever bits were changed\\n\\t\"\n        XXH_I_ATT(\"xor     eax, dword ptr[esp]\",      \"xorl    (%%esp), %%eax\"    )\n        \"# Restore original EFLAGS\\n\\t\"\n        XXH_I_ATT(\"popfd\",                            \"popfl\"                     )\n        \"# eax = zero if ID bit can't be changed, else non-zero\\n\\t\"\n        XXH_I_ATT(\"and     eax, 0x200000\",            \"andl    $0x200000, %%eax\"  )\n        : \"=a\" (cpuid_supported) :: \"cc\");\n\n    if (XXH_unlikely(!cpuid_supported)) {\n        XXH_debugPrint(\"CPUID support is not detected!\");\n        return best;\n    }\n\n#endif\n    /* Check how many CPUID pages we have */\n    XXH_cpuid(0, 0, abcd);\n    max_leaves = abcd[0];\n\n    /* Shouldn't happen on hardware, but happens on some QEMU configs. */\n    if (XXH_unlikely(max_leaves == 0)) {\n        XXH_debugPrint(\"Max CPUID leaves == 0!\");\n        return best;\n    }\n\n    /* Check for SSE2, OSXSAVE and xgetbv */\n    XXH_cpuid(1, 0, abcd);\n\n    /*\n     * Test for SSE2. The check is redundant on x86_64, but it doesn't hurt.\n     */\n    if (XXH_unlikely((abcd[3] & XXH_SSE2_CPUID_MASK) != XXH_SSE2_CPUID_MASK))\n        return best;\n\n    XXH_debugPrint(\"SSE2 support detected.\");\n\n    best = XXH_SSE2;\n#if XXH_DISPATCH_AVX2 || XXH_DISPATCH_AVX512\n    /* Make sure we have enough leaves */\n    if (XXH_unlikely(max_leaves < 7))\n        return best;\n\n    /* Test for OSXSAVE and XGETBV */\n    if ((abcd[2] & XXH_OSXSAVE_CPUID_MASK) != XXH_OSXSAVE_CPUID_MASK)\n        return best;\n\n    /* CPUID check for AVX features */\n    XXH_cpuid(7, 0, abcd);\n\n    xgetbv_val = XXH_xgetbv();\n#if XXH_DISPATCH_AVX2\n    /* Validate that AVX2 is supported by the CPU */\n    if ((abcd[1] & XXH_AVX2_CPUID_MASK) != XXH_AVX2_CPUID_MASK)\n        return best;\n\n    /* Validate that the OS supports YMM registers */\n    if ((xgetbv_val & XXH_AVX2_XGETBV_MASK) != XXH_AVX2_XGETBV_MASK) {\n        XXH_debugPrint(\"AVX2 supported by the CPU, but not the OS.\");\n        return best;\n    }\n\n    /* AVX2 supported */\n    XXH_debugPrint(\"AVX2 support detected.\");\n    best = XXH_AVX2;\n#endif\n#if XXH_DISPATCH_AVX512\n    /* Check if AVX512F is supported by the CPU */\n    if ((abcd[1] & XXH_AVX512F_CPUID_MASK) != XXH_AVX512F_CPUID_MASK) {\n        XXH_debugPrint(\"AVX512F not supported by CPU\");\n        return best;\n    }\n\n    /* Validate that the OS supports ZMM registers */\n    if ((xgetbv_val & XXH_AVX512F_XGETBV_MASK) != XXH_AVX512F_XGETBV_MASK) {\n        XXH_debugPrint(\"AVX512F supported by the CPU, but not the OS.\");\n        return best;\n    }\n\n    /* AVX512F supported */\n    XXH_debugPrint(\"AVX512F support detected.\");\n    best = XXH_AVX512;\n#endif\n#endif\n    return best;\n}\n\n\n/* ===   Vector implementations   === */\n\n/*! @cond PRIVATE */\n/*!\n * @private\n * @brief Defines the various dispatch functions.\n *\n * TODO: Consolidate?\n *\n * @param suffix The suffix for the functions, e.g. sse2 or scalar\n * @param target XXH_TARGET_* or empty.\n */\n\n#define XXH_DEFINE_DISPATCH_FUNCS(suffix, target)                             \\\n                                                                              \\\n/* ===   XXH3, default variants   === */                                      \\\n                                                                              \\\nXXH_NO_INLINE target XXH64_hash_t                                             \\\nXXHL64_default_##suffix(XXH_NOESCAPE const void* XXH_RESTRICT input,          \\\n                        size_t len)                                           \\\n{                                                                             \\\n    return XXH3_hashLong_64b_internal(                                        \\\n               input, len, XXH3_kSecret, sizeof(XXH3_kSecret),                \\\n               XXH3_accumulate_##suffix, XXH3_scrambleAcc_##suffix            \\\n    );                                                                        \\\n}                                                                             \\\n                                                                              \\\n/* ===   XXH3, Seeded variants   === */                                       \\\n                                                                              \\\nXXH_NO_INLINE target XXH64_hash_t                                             \\\nXXHL64_seed_##suffix(XXH_NOESCAPE const void* XXH_RESTRICT input, size_t len, \\\n                     XXH64_hash_t seed)                                       \\\n{                                                                             \\\n    return XXH3_hashLong_64b_withSeed_internal(                               \\\n                    input, len, seed, XXH3_accumulate_##suffix,               \\\n                    XXH3_scrambleAcc_##suffix, XXH3_initCustomSecret_##suffix \\\n    );                                                                        \\\n}                                                                             \\\n                                                                              \\\n/* ===   XXH3, Secret variants   === */                                       \\\n                                                                              \\\nXXH_NO_INLINE target XXH64_hash_t                                             \\\nXXHL64_secret_##suffix(XXH_NOESCAPE const void* XXH_RESTRICT input,           \\\n                       size_t len, XXH_NOESCAPE const void* secret,           \\\n                       size_t secretLen)                                      \\\n{                                                                             \\\n    return XXH3_hashLong_64b_internal(                                        \\\n                    input, len, secret, secretLen,                            \\\n                    XXH3_accumulate_##suffix, XXH3_scrambleAcc_##suffix       \\\n    );                                                                        \\\n}                                                                             \\\n                                                                              \\\n/* ===   XXH3 update variants   === */                                        \\\n                                                                              \\\nXXH_NO_INLINE target XXH_errorcode                                            \\\nXXH3_update_##suffix(XXH_NOESCAPE XXH3_state_t* state,                        \\\n                     XXH_NOESCAPE const void* input, size_t len)              \\\n{                                                                             \\\n    return XXH3_update(state, (const xxh_u8*)input, len,                      \\\n                    XXH3_accumulate_##suffix, XXH3_scrambleAcc_##suffix);     \\\n}                                                                             \\\n                                                                              \\\n/* ===   XXH128 default variants   === */                                     \\\n                                                                              \\\nXXH_NO_INLINE target XXH128_hash_t                                            \\\nXXHL128_default_##suffix(XXH_NOESCAPE  const void* XXH_RESTRICT input,        \\\n                         size_t len)                                          \\\n{                                                                             \\\n    return XXH3_hashLong_128b_internal(                                       \\\n                    input, len, XXH3_kSecret, sizeof(XXH3_kSecret),           \\\n                    XXH3_accumulate_##suffix, XXH3_scrambleAcc_##suffix       \\\n    );                                                                        \\\n}                                                                             \\\n                                                                              \\\n/* ===   XXH128 Secret variants   === */                                      \\\n                                                                              \\\nXXH_NO_INLINE target XXH128_hash_t                                            \\\nXXHL128_secret_##suffix(XXH_NOESCAPE const void* XXH_RESTRICT input,          \\\n                        size_t len,                                           \\\n                        XXH_NOESCAPE const void* XXH_RESTRICT secret,         \\\n                        size_t secretLen)                                     \\\n{                                                                             \\\n    return XXH3_hashLong_128b_internal(                                       \\\n                    input, len, (const xxh_u8*)secret, secretLen,             \\\n                    XXH3_accumulate_##suffix, XXH3_scrambleAcc_##suffix);     \\\n}                                                                             \\\n                                                                              \\\n/* ===   XXH128 Seeded variants   === */                                      \\\n                                                                              \\\nXXH_NO_INLINE target XXH128_hash_t                                            \\\nXXHL128_seed_##suffix(XXH_NOESCAPE const void* XXH_RESTRICT input, size_t len,\\\n                      XXH64_hash_t seed)                                      \\\n{                                                                             \\\n    return XXH3_hashLong_128b_withSeed_internal(input, len, seed,             \\\n                    XXH3_accumulate_##suffix, XXH3_scrambleAcc_##suffix,      \\\n                    XXH3_initCustomSecret_##suffix);                          \\\n}\n\n/*! @endcond */\n/* End XXH_DEFINE_DISPATCH_FUNCS */\n\n/*! @cond Doxygen ignores this part */\n#if XXH_DISPATCH_SCALAR\nXXH_DEFINE_DISPATCH_FUNCS(scalar, /* nothing */)\n#endif\nXXH_DEFINE_DISPATCH_FUNCS(sse2, XXH_TARGET_SSE2)\n#if XXH_DISPATCH_AVX2\nXXH_DEFINE_DISPATCH_FUNCS(avx2, XXH_TARGET_AVX2)\n#endif\n#if XXH_DISPATCH_AVX512\nXXH_DEFINE_DISPATCH_FUNCS(avx512, XXH_TARGET_AVX512)\n#endif\n#undef XXH_DEFINE_DISPATCH_FUNCS\n/*! @endcond */\n\n/* ====    Dispatchers    ==== */\n\n/*! @cond Doxygen ignores this part */\ntypedef XXH64_hash_t (*XXH3_dispatchx86_hashLong64_default)(XXH_NOESCAPE const void* XXH_RESTRICT, size_t);\n\ntypedef XXH64_hash_t (*XXH3_dispatchx86_hashLong64_withSeed)(XXH_NOESCAPE const void* XXH_RESTRICT, size_t, XXH64_hash_t);\n\ntypedef XXH64_hash_t (*XXH3_dispatchx86_hashLong64_withSecret)(XXH_NOESCAPE const void* XXH_RESTRICT, size_t, XXH_NOESCAPE const void* XXH_RESTRICT, size_t);\n\ntypedef XXH_errorcode (*XXH3_dispatchx86_update)(XXH_NOESCAPE XXH3_state_t*, XXH_NOESCAPE const void*, size_t);\n\ntypedef struct {\n    XXH3_dispatchx86_hashLong64_default    hashLong64_default;\n    XXH3_dispatchx86_hashLong64_withSeed   hashLong64_seed;\n    XXH3_dispatchx86_hashLong64_withSecret hashLong64_secret;\n    XXH3_dispatchx86_update                update;\n} XXH_dispatchFunctions_s;\n\n#define XXH_NB_DISPATCHES 4\n/*! @endcond */\n\n/*!\n * @private\n * @brief Table of dispatchers for @ref XXH3_64bits().\n *\n * @pre The indices must match @ref XXH_VECTOR_TYPE.\n */\nstatic const XXH_dispatchFunctions_s XXH_kDispatch[XXH_NB_DISPATCHES] = {\n#if XXH_DISPATCH_SCALAR\n    /* Scalar */ { XXHL64_default_scalar, XXHL64_seed_scalar, XXHL64_secret_scalar, XXH3_update_scalar },\n#else\n    /* Scalar */ { NULL, NULL, NULL, NULL },\n#endif\n    /* SSE2   */ { XXHL64_default_sse2,   XXHL64_seed_sse2,   XXHL64_secret_sse2,   XXH3_update_sse2 },\n#if XXH_DISPATCH_AVX2\n    /* AVX2   */ { XXHL64_default_avx2,   XXHL64_seed_avx2,   XXHL64_secret_avx2,   XXH3_update_avx2 },\n#else\n    /* AVX2   */ { NULL, NULL, NULL, NULL },\n#endif\n#if XXH_DISPATCH_AVX512\n    /* AVX512 */ { XXHL64_default_avx512, XXHL64_seed_avx512, XXHL64_secret_avx512, XXH3_update_avx512 }\n#else\n    /* AVX512 */ { NULL, NULL, NULL, NULL }\n#endif\n};\n/*!\n * @private\n * @brief The selected dispatch table for @ref XXH3_64bits().\n */\nstatic XXH_dispatchFunctions_s XXH_g_dispatch = { NULL, NULL, NULL, NULL };\n\n\n/*! @cond Doxygen ignores this part */\ntypedef XXH128_hash_t (*XXH3_dispatchx86_hashLong128_default)(XXH_NOESCAPE const void* XXH_RESTRICT, size_t);\n\ntypedef XXH128_hash_t (*XXH3_dispatchx86_hashLong128_withSeed)(XXH_NOESCAPE const void* XXH_RESTRICT, size_t, XXH64_hash_t);\n\ntypedef XXH128_hash_t (*XXH3_dispatchx86_hashLong128_withSecret)(XXH_NOESCAPE const void* XXH_RESTRICT, size_t, const void* XXH_RESTRICT, size_t);\n\ntypedef struct {\n    XXH3_dispatchx86_hashLong128_default    hashLong128_default;\n    XXH3_dispatchx86_hashLong128_withSeed   hashLong128_seed;\n    XXH3_dispatchx86_hashLong128_withSecret hashLong128_secret;\n    XXH3_dispatchx86_update                 update;\n} XXH_dispatch128Functions_s;\n/*! @endcond */\n\n\n/*!\n * @private\n * @brief Table of dispatchers for @ref XXH3_128bits().\n *\n * @pre The indices must match @ref XXH_VECTOR_TYPE.\n */\nstatic const XXH_dispatch128Functions_s XXH_kDispatch128[XXH_NB_DISPATCHES] = {\n#if XXH_DISPATCH_SCALAR\n    /* Scalar */ { XXHL128_default_scalar, XXHL128_seed_scalar, XXHL128_secret_scalar, XXH3_update_scalar },\n#else\n    /* Scalar */ { NULL, NULL, NULL, NULL },\n#endif\n    /* SSE2   */ { XXHL128_default_sse2,   XXHL128_seed_sse2,   XXHL128_secret_sse2,   XXH3_update_sse2 },\n#if XXH_DISPATCH_AVX2\n    /* AVX2   */ { XXHL128_default_avx2,   XXHL128_seed_avx2,   XXHL128_secret_avx2,   XXH3_update_avx2 },\n#else\n    /* AVX2   */ { NULL, NULL, NULL, NULL },\n#endif\n#if XXH_DISPATCH_AVX512\n    /* AVX512 */ { XXHL128_default_avx512, XXHL128_seed_avx512, XXHL128_secret_avx512, XXH3_update_avx512 }\n#else\n    /* AVX512 */ { NULL, NULL, NULL, NULL }\n#endif\n};\n\n/*!\n * @private\n * @brief The selected dispatch table for @ref XXH3_64bits().\n */\nstatic XXH_dispatch128Functions_s XXH_g_dispatch128 = { NULL, NULL, NULL, NULL };\n\n/*!\n * @private\n * @brief Runs a CPUID check and sets the correct dispatch tables.\n */\nstatic XXH_CONSTRUCTOR void XXH_setDispatch(void)\n{\n    int vecID = XXH_featureTest();\n    XXH_STATIC_ASSERT(XXH_AVX512 == XXH_NB_DISPATCHES-1);\n    assert(XXH_SCALAR <= vecID && vecID <= XXH_AVX512);\n#if !XXH_DISPATCH_SCALAR\n    assert(vecID != XXH_SCALAR);\n#endif\n#if !XXH_DISPATCH_AVX512\n    assert(vecID != XXH_AVX512);\n#endif\n#if !XXH_DISPATCH_AVX2\n    assert(vecID != XXH_AVX2);\n#endif\n    XXH_g_dispatch = XXH_kDispatch[vecID];\n    XXH_g_dispatch128 = XXH_kDispatch128[vecID];\n}\n\n\n/* ====    XXH3 public functions    ==== */\n/*! @cond Doxygen ignores this part */\n\nstatic XXH64_hash_t\nXXH3_hashLong_64b_defaultSecret_selection(const void* XXH_RESTRICT input, size_t len,\n                                          XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen)\n{\n    (void)seed64; (void)secret; (void)secretLen;\n    if (XXH_DISPATCH_MAYBE_NULL && XXH_g_dispatch.hashLong64_default == NULL)\n        XXH_setDispatch();\n    return XXH_g_dispatch.hashLong64_default(input, len);\n}\n\nXXH64_hash_t XXH3_64bits_dispatch(XXH_NOESCAPE const void* input, size_t len)\n{\n    return XXH3_64bits_internal(input, len, 0, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_defaultSecret_selection);\n}\n\nstatic XXH64_hash_t\nXXH3_hashLong_64b_withSeed_selection(const void* XXH_RESTRICT input, size_t len,\n                                     XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen)\n{\n    (void)secret; (void)secretLen;\n    if (XXH_DISPATCH_MAYBE_NULL && XXH_g_dispatch.hashLong64_seed == NULL)\n        XXH_setDispatch();\n    return XXH_g_dispatch.hashLong64_seed(input, len, seed64);\n}\n\nXXH64_hash_t XXH3_64bits_withSeed_dispatch(XXH_NOESCAPE const void* input, size_t len, XXH64_hash_t seed)\n{\n    return XXH3_64bits_internal(input, len, seed, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_withSeed_selection);\n}\n\nstatic XXH64_hash_t\nXXH3_hashLong_64b_withSecret_selection(const void* XXH_RESTRICT input, size_t len,\n                                       XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen)\n{\n    (void)seed64;\n    if (XXH_DISPATCH_MAYBE_NULL && XXH_g_dispatch.hashLong64_secret == NULL)\n        XXH_setDispatch();\n    return XXH_g_dispatch.hashLong64_secret(input, len, secret, secretLen);\n}\n\nXXH64_hash_t XXH3_64bits_withSecret_dispatch(XXH_NOESCAPE const void* input, size_t len, XXH_NOESCAPE const void* secret, size_t secretLen)\n{\n    return XXH3_64bits_internal(input, len, 0, secret, secretLen, XXH3_hashLong_64b_withSecret_selection);\n}\n\nXXH_errorcode\nXXH3_64bits_update_dispatch(XXH_NOESCAPE XXH3_state_t* state, XXH_NOESCAPE const void* input, size_t len)\n{\n    if (XXH_DISPATCH_MAYBE_NULL && XXH_g_dispatch.update == NULL)\n        XXH_setDispatch();\n\n    return XXH_g_dispatch.update(state, (const xxh_u8*)input, len);\n}\n\n/*! @endcond */\n\n\n/* ====    XXH128 public functions    ==== */\n/*! @cond Doxygen ignores this part */\n\nstatic XXH128_hash_t\nXXH3_hashLong_128b_defaultSecret_selection(const void* input, size_t len,\n                                           XXH64_hash_t seed64, const void* secret, size_t secretLen)\n{\n    (void)seed64; (void)secret; (void)secretLen;\n    if (XXH_DISPATCH_MAYBE_NULL && XXH_g_dispatch128.hashLong128_default == NULL)\n        XXH_setDispatch();\n    return XXH_g_dispatch128.hashLong128_default(input, len);\n}\n\nXXH128_hash_t XXH3_128bits_dispatch(XXH_NOESCAPE const void* input, size_t len)\n{\n    return XXH3_128bits_internal(input, len, 0, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_128b_defaultSecret_selection);\n}\n\nstatic XXH128_hash_t\nXXH3_hashLong_128b_withSeed_selection(const void* input, size_t len,\n                                      XXH64_hash_t seed64, const void* secret, size_t secretLen)\n{\n    (void)secret; (void)secretLen;\n    if (XXH_DISPATCH_MAYBE_NULL && XXH_g_dispatch128.hashLong128_seed == NULL)\n        XXH_setDispatch();\n    return XXH_g_dispatch128.hashLong128_seed(input, len, seed64);\n}\n\nXXH128_hash_t XXH3_128bits_withSeed_dispatch(XXH_NOESCAPE const void* input, size_t len, XXH64_hash_t seed)\n{\n    return XXH3_128bits_internal(input, len, seed, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_128b_withSeed_selection);\n}\n\nstatic XXH128_hash_t\nXXH3_hashLong_128b_withSecret_selection(const void* input, size_t len,\n                                        XXH64_hash_t seed64, const void* secret, size_t secretLen)\n{\n    (void)seed64;\n    if (XXH_DISPATCH_MAYBE_NULL && XXH_g_dispatch128.hashLong128_secret == NULL)\n        XXH_setDispatch();\n    return XXH_g_dispatch128.hashLong128_secret(input, len, secret, secretLen);\n}\n\nXXH128_hash_t XXH3_128bits_withSecret_dispatch(XXH_NOESCAPE const void* input, size_t len, XXH_NOESCAPE const void* secret, size_t secretLen)\n{\n    return XXH3_128bits_internal(input, len, 0, secret, secretLen, XXH3_hashLong_128b_withSecret_selection);\n}\n\nXXH_errorcode\nXXH3_128bits_update_dispatch(XXH_NOESCAPE XXH3_state_t* state, XXH_NOESCAPE const void* input, size_t len)\n{\n    if (XXH_DISPATCH_MAYBE_NULL && XXH_g_dispatch128.update == NULL)\n        XXH_setDispatch();\n    return XXH_g_dispatch128.update(state, (const xxh_u8*)input, len);\n}\n\n/*! @endcond */\n\n#if defined (__cplusplus)\n}\n#endif\n/*! @} */\n"
  },
  {
    "path": "third-party/xxhash/xxh_x86dispatch.h",
    "content": "/*\n * xxHash - XXH3 Dispatcher for x86-based targets\n * Copyright (C) 2020-2024 Yann Collet\n *\n * BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n *    * Redistributions of source code must retain the above copyright\n *      notice, this list of conditions and the following disclaimer.\n *    * Redistributions in binary form must reproduce the above\n *      copyright notice, this list of conditions and the following disclaimer\n *      in the documentation and/or other materials provided with the\n *      distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n#ifndef XXH_X86DISPATCH_H_13563687684\n#define XXH_X86DISPATCH_H_13563687684\n\n#include \"xxhash.h\"  /* XXH64_hash_t, XXH3_state_t */\n\n#if defined (__cplusplus)\nextern \"C\" {\n#endif\n\n/*!\n * @brief Returns the best XXH3 implementation for x86\n *\n * @return The best @ref XXH_VECTOR implementation.\n * @see XXH_VECTOR_TYPES\n */\nXXH_PUBLIC_API int XXH_featureTest(void);\n\nXXH_PUBLIC_API XXH64_hash_t  XXH3_64bits_dispatch(XXH_NOESCAPE const void* input, size_t len);\nXXH_PUBLIC_API XXH64_hash_t  XXH3_64bits_withSeed_dispatch(XXH_NOESCAPE const void* input, size_t len, XXH64_hash_t seed);\nXXH_PUBLIC_API XXH64_hash_t  XXH3_64bits_withSecret_dispatch(XXH_NOESCAPE const void* input, size_t len, XXH_NOESCAPE const void* secret, size_t secretLen);\nXXH_PUBLIC_API XXH_errorcode XXH3_64bits_update_dispatch(XXH_NOESCAPE XXH3_state_t* state, XXH_NOESCAPE const void* input, size_t len);\n\nXXH_PUBLIC_API XXH128_hash_t XXH3_128bits_dispatch(XXH_NOESCAPE const void* input, size_t len);\nXXH_PUBLIC_API XXH128_hash_t XXH3_128bits_withSeed_dispatch(XXH_NOESCAPE const void* input, size_t len, XXH64_hash_t seed);\nXXH_PUBLIC_API XXH128_hash_t XXH3_128bits_withSecret_dispatch(XXH_NOESCAPE const void* input, size_t len, XXH_NOESCAPE const void* secret, size_t secretLen);\nXXH_PUBLIC_API XXH_errorcode XXH3_128bits_update_dispatch(XXH_NOESCAPE XXH3_state_t* state, XXH_NOESCAPE const void* input, size_t len);\n\n#if defined (__cplusplus)\n}\n#endif\n\n\n/* automatic replacement of XXH3 functions.\n * can be disabled by setting XXH_DISPATCH_DISABLE_REPLACE */\n#ifndef XXH_DISPATCH_DISABLE_REPLACE\n\n# undef  XXH3_64bits\n# define XXH3_64bits XXH3_64bits_dispatch\n# undef  XXH3_64bits_withSeed\n# define XXH3_64bits_withSeed XXH3_64bits_withSeed_dispatch\n# undef  XXH3_64bits_withSecret\n# define XXH3_64bits_withSecret XXH3_64bits_withSecret_dispatch\n# undef  XXH3_64bits_update\n# define XXH3_64bits_update XXH3_64bits_update_dispatch\n\n# undef  XXH128\n# define XXH128 XXH3_128bits_withSeed_dispatch\n# undef  XXH3_128bits\n# define XXH3_128bits XXH3_128bits_dispatch\n# undef  XXH3_128bits_withSeed\n# define XXH3_128bits_withSeed XXH3_128bits_withSeed_dispatch\n# undef  XXH3_128bits_withSecret\n# define XXH3_128bits_withSecret XXH3_128bits_withSecret_dispatch\n# undef  XXH3_128bits_update\n# define XXH3_128bits_update XXH3_128bits_update_dispatch\n\n#endif /* XXH_DISPATCH_DISABLE_REPLACE */\n\n#endif /* XXH_X86DISPATCH_H_13563687684 */\n"
  },
  {
    "path": "third-party/xxhash/xxhash.c",
    "content": "/*\n * xxHash - Extremely Fast Hash algorithm\n * Copyright (C) 2012-2023 Yann Collet\n *\n * BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n *    * Redistributions of source code must retain the above copyright\n *      notice, this list of conditions and the following disclaimer.\n *    * Redistributions in binary form must reproduce the above\n *      copyright notice, this list of conditions and the following disclaimer\n *      in the documentation and/or other materials provided with the\n *      distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n/*\n * xxhash.c instantiates functions defined in xxhash.h\n */\n\n#define XXH_STATIC_LINKING_ONLY /* access advanced declarations */\n#define XXH_IMPLEMENTATION      /* access definitions */\n\n#include \"xxhash.h\"\n"
  },
  {
    "path": "third-party/xxhash/xxhash.h",
    "content": "/*\n * xxHash - Extremely Fast Hash algorithm\n * Header File\n * Copyright (C) 2012-2023 Yann Collet\n *\n * BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n *    * Redistributions of source code must retain the above copyright\n *      notice, this list of conditions and the following disclaimer.\n *    * Redistributions in binary form must reproduce the above\n *      copyright notice, this list of conditions and the following disclaimer\n *      in the documentation and/or other materials provided with the\n *      distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * You can contact the author at:\n *   - xxHash homepage: https://www.xxhash.com\n *   - xxHash source repository: https://github.com/Cyan4973/xxHash\n */\n\n/*!\n * @mainpage xxHash\n *\n * xxHash is an extremely fast non-cryptographic hash algorithm, working at RAM speed\n * limits.\n *\n * It is proposed in four flavors, in three families:\n * 1. @ref XXH32_family\n *   - Classic 32-bit hash function. Simple, compact, and runs on almost all\n *     32-bit and 64-bit systems.\n * 2. @ref XXH64_family\n *   - Classic 64-bit adaptation of XXH32. Just as simple, and runs well on most\n *     64-bit systems (but _not_ 32-bit systems).\n * 3. @ref XXH3_family\n *   - Modern 64-bit and 128-bit hash function family which features improved\n *     strength and performance across the board, especially on smaller data.\n *     It benefits greatly from SIMD and 64-bit without requiring it.\n *\n * Benchmarks\n * ---\n * The reference system uses an Intel i7-9700K CPU, and runs Ubuntu x64 20.04.\n * The open source benchmark program is compiled with clang v10.0 using -O3 flag.\n *\n * | Hash Name            | ISA ext | Width | Large Data Speed | Small Data Velocity |\n * | -------------------- | ------- | ----: | ---------------: | ------------------: |\n * | XXH3_64bits()        | @b AVX2 |    64 |        59.4 GB/s |               133.1 |\n * | MeowHash             | AES-NI  |   128 |        58.2 GB/s |                52.5 |\n * | XXH3_128bits()       | @b AVX2 |   128 |        57.9 GB/s |               118.1 |\n * | CLHash               | PCLMUL  |    64 |        37.1 GB/s |                58.1 |\n * | XXH3_64bits()        | @b SSE2 |    64 |        31.5 GB/s |               133.1 |\n * | XXH3_128bits()       | @b SSE2 |   128 |        29.6 GB/s |               118.1 |\n * | RAM sequential read  |         |   N/A |        28.0 GB/s |                 N/A |\n * | ahash                | AES-NI  |    64 |        22.5 GB/s |               107.2 |\n * | City64               |         |    64 |        22.0 GB/s |                76.6 |\n * | T1ha2                |         |    64 |        22.0 GB/s |                99.0 |\n * | City128              |         |   128 |        21.7 GB/s |                57.7 |\n * | FarmHash             | AES-NI  |    64 |        21.3 GB/s |                71.9 |\n * | XXH64()              |         |    64 |        19.4 GB/s |                71.0 |\n * | SpookyHash           |         |    64 |        19.3 GB/s |                53.2 |\n * | Mum                  |         |    64 |        18.0 GB/s |                67.0 |\n * | CRC32C               | SSE4.2  |    32 |        13.0 GB/s |                57.9 |\n * | XXH32()              |         |    32 |         9.7 GB/s |                71.9 |\n * | City32               |         |    32 |         9.1 GB/s |                66.0 |\n * | Blake3*              | @b AVX2 |   256 |         4.4 GB/s |                 8.1 |\n * | Murmur3              |         |    32 |         3.9 GB/s |                56.1 |\n * | SipHash*             |         |    64 |         3.0 GB/s |                43.2 |\n * | Blake3*              | @b SSE2 |   256 |         2.4 GB/s |                 8.1 |\n * | HighwayHash          |         |    64 |         1.4 GB/s |                 6.0 |\n * | FNV64                |         |    64 |         1.2 GB/s |                62.7 |\n * | Blake2*              |         |   256 |         1.1 GB/s |                 5.1 |\n * | SHA1*                |         |   160 |         0.8 GB/s |                 5.6 |\n * | MD5*                 |         |   128 |         0.6 GB/s |                 7.8 |\n * @note\n *   - Hashes which require a specific ISA extension are noted. SSE2 is also noted,\n *     even though it is mandatory on x64.\n *   - Hashes with an asterisk are cryptographic. Note that MD5 is non-cryptographic\n *     by modern standards.\n *   - Small data velocity is a rough average of algorithm's efficiency for small\n *     data. For more accurate information, see the wiki.\n *   - More benchmarks and strength tests are found on the wiki:\n *         https://github.com/Cyan4973/xxHash/wiki\n *\n * Usage\n * ------\n * All xxHash variants use a similar API. Changing the algorithm is a trivial\n * substitution.\n *\n * @pre\n *    For functions which take an input and length parameter, the following\n *    requirements are assumed:\n *    - The range from [`input`, `input + length`) is valid, readable memory.\n *      - The only exception is if the `length` is `0`, `input` may be `NULL`.\n *    - For C++, the objects must have the *TriviallyCopyable* property, as the\n *      functions access bytes directly as if it was an array of `unsigned char`.\n *\n * @anchor single_shot_example\n * **Single Shot**\n *\n * These functions are stateless functions which hash a contiguous block of memory,\n * immediately returning the result. They are the easiest and usually the fastest\n * option.\n *\n * XXH32(), XXH64(), XXH3_64bits(), XXH3_128bits()\n *\n * @code{.c}\n *   #include <string.h>\n *   #include \"xxhash.h\"\n *\n *   // Example for a function which hashes a null terminated string with XXH32().\n *   XXH32_hash_t hash_string(const char* string, XXH32_hash_t seed)\n *   {\n *       // NULL pointers are only valid if the length is zero\n *       size_t length = (string == NULL) ? 0 : strlen(string);\n *       return XXH32(string, length, seed);\n *   }\n * @endcode\n *\n *\n * @anchor streaming_example\n * **Streaming**\n *\n * These groups of functions allow incremental hashing of unknown size, even\n * more than what would fit in a size_t.\n *\n * XXH32_reset(), XXH64_reset(), XXH3_64bits_reset(), XXH3_128bits_reset()\n *\n * @code{.c}\n *   #include <stdio.h>\n *   #include <assert.h>\n *   #include \"xxhash.h\"\n *   // Example for a function which hashes a FILE incrementally with XXH3_64bits().\n *   XXH64_hash_t hashFile(FILE* f)\n *   {\n *       // Allocate a state struct. Do not just use malloc() or new.\n *       XXH3_state_t* state = XXH3_createState();\n *       assert(state != NULL && \"Out of memory!\");\n *       // Reset the state to start a new hashing session.\n *       XXH3_64bits_reset(state);\n *       char buffer[4096];\n *       size_t count;\n *       // Read the file in chunks\n *       while ((count = fread(buffer, 1, sizeof(buffer), f)) != 0) {\n *           // Run update() as many times as necessary to process the data\n *           XXH3_64bits_update(state, buffer, count);\n *       }\n *       // Retrieve the finalized hash. This will not change the state.\n *       XXH64_hash_t result = XXH3_64bits_digest(state);\n *       // Free the state. Do not use free().\n *       XXH3_freeState(state);\n *       return result;\n *   }\n * @endcode\n *\n * Streaming functions generate the xxHash value from an incremental input.\n * This method is slower than single-call functions, due to state management.\n * For small inputs, prefer `XXH32()` and `XXH64()`, which are better optimized.\n *\n * An XXH state must first be allocated using `XXH*_createState()`.\n *\n * Start a new hash by initializing the state with a seed using `XXH*_reset()`.\n *\n * Then, feed the hash state by calling `XXH*_update()` as many times as necessary.\n *\n * The function returns an error code, with 0 meaning OK, and any other value\n * meaning there is an error.\n *\n * Finally, a hash value can be produced anytime, by using `XXH*_digest()`.\n * This function returns the nn-bits hash as an int or long long.\n *\n * It's still possible to continue inserting input into the hash state after a\n * digest, and generate new hash values later on by invoking `XXH*_digest()`.\n *\n * When done, release the state using `XXH*_freeState()`.\n *\n *\n * @anchor canonical_representation_example\n * **Canonical Representation**\n *\n * The default return values from XXH functions are unsigned 32, 64 and 128 bit\n * integers.\n * This the simplest and fastest format for further post-processing.\n *\n * However, this leaves open the question of what is the order on the byte level,\n * since little and big endian conventions will store the same number differently.\n *\n * The canonical representation settles this issue by mandating big-endian\n * convention, the same convention as human-readable numbers (large digits first).\n *\n * When writing hash values to storage, sending them over a network, or printing\n * them, it's highly recommended to use the canonical representation to ensure\n * portability across a wider range of systems, present and future.\n *\n * The following functions allow transformation of hash values to and from\n * canonical format.\n *\n * XXH32_canonicalFromHash(), XXH32_hashFromCanonical(),\n * XXH64_canonicalFromHash(), XXH64_hashFromCanonical(),\n * XXH128_canonicalFromHash(), XXH128_hashFromCanonical(),\n *\n * @code{.c}\n *   #include <stdio.h>\n *   #include \"xxhash.h\"\n *\n *   // Example for a function which prints XXH32_hash_t in human readable format\n *   void printXxh32(XXH32_hash_t hash)\n *   {\n *       XXH32_canonical_t cano;\n *       XXH32_canonicalFromHash(&cano, hash);\n *       size_t i;\n *       for(i = 0; i < sizeof(cano.digest); ++i) {\n *           printf(\"%02x\", cano.digest[i]);\n *       }\n *       printf(\"\\n\");\n *   }\n *\n *   // Example for a function which converts XXH32_canonical_t to XXH32_hash_t\n *   XXH32_hash_t convertCanonicalToXxh32(XXH32_canonical_t cano)\n *   {\n *       XXH32_hash_t hash = XXH32_hashFromCanonical(&cano);\n *       return hash;\n *   }\n * @endcode\n *\n *\n * @file xxhash.h\n * xxHash prototypes and implementation\n */\n\n#if defined (__cplusplus)\nextern \"C\" {\n#endif\n\n/* ****************************\n *  INLINE mode\n ******************************/\n/*!\n * @defgroup public Public API\n * Contains details on the public xxHash functions.\n * @{\n */\n#ifdef XXH_DOXYGEN\n/*!\n * @brief Gives access to internal state declaration, required for static allocation.\n *\n * Incompatible with dynamic linking, due to risks of ABI changes.\n *\n * Usage:\n * @code{.c}\n *     #define XXH_STATIC_LINKING_ONLY\n *     #include \"xxhash.h\"\n * @endcode\n */\n#  define XXH_STATIC_LINKING_ONLY\n/* Do not undef XXH_STATIC_LINKING_ONLY for Doxygen */\n\n/*!\n * @brief Gives access to internal definitions.\n *\n * Usage:\n * @code{.c}\n *     #define XXH_STATIC_LINKING_ONLY\n *     #define XXH_IMPLEMENTATION\n *     #include \"xxhash.h\"\n * @endcode\n */\n#  define XXH_IMPLEMENTATION\n/* Do not undef XXH_IMPLEMENTATION for Doxygen */\n\n/*!\n * @brief Exposes the implementation and marks all functions as `inline`.\n *\n * Use these build macros to inline xxhash into the target unit.\n * Inlining improves performance on small inputs, especially when the length is\n * expressed as a compile-time constant:\n *\n *  https://fastcompression.blogspot.com/2018/03/xxhash-for-small-keys-impressive-power.html\n *\n * It also keeps xxHash symbols private to the unit, so they are not exported.\n *\n * Usage:\n * @code{.c}\n *     #define XXH_INLINE_ALL\n *     #include \"xxhash.h\"\n * @endcode\n * Do not compile and link xxhash.o as a separate object, as it is not useful.\n */\n#  define XXH_INLINE_ALL\n#  undef XXH_INLINE_ALL\n/*!\n * @brief Exposes the implementation without marking functions as inline.\n */\n#  define XXH_PRIVATE_API\n#  undef XXH_PRIVATE_API\n/*!\n * @brief Emulate a namespace by transparently prefixing all symbols.\n *\n * If you want to include _and expose_ xxHash functions from within your own\n * library, but also want to avoid symbol collisions with other libraries which\n * may also include xxHash, you can use @ref XXH_NAMESPACE to automatically prefix\n * any public symbol from xxhash library with the value of @ref XXH_NAMESPACE\n * (therefore, avoid empty or numeric values).\n *\n * Note that no change is required within the calling program as long as it\n * includes `xxhash.h`: Regular symbol names will be automatically translated\n * by this header.\n */\n#  define XXH_NAMESPACE /* YOUR NAME HERE */\n#  undef XXH_NAMESPACE\n#endif\n\n#if (defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API)) \\\n    && !defined(XXH_INLINE_ALL_31684351384)\n   /* this section should be traversed only once */\n#  define XXH_INLINE_ALL_31684351384\n   /* give access to the advanced API, required to compile implementations */\n#  undef XXH_STATIC_LINKING_ONLY   /* avoid macro redef */\n#  define XXH_STATIC_LINKING_ONLY\n   /* make all functions private */\n#  undef XXH_PUBLIC_API\n#  if defined(__GNUC__)\n#    define XXH_PUBLIC_API static __inline __attribute__((__unused__))\n#  elif defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */)\n#    define XXH_PUBLIC_API static inline\n#  elif defined(_MSC_VER)\n#    define XXH_PUBLIC_API static __inline\n#  else\n     /* note: this version may generate warnings for unused static functions */\n#    define XXH_PUBLIC_API static\n#  endif\n\n   /*\n    * This part deals with the special case where a unit wants to inline xxHash,\n    * but \"xxhash.h\" has previously been included without XXH_INLINE_ALL,\n    * such as part of some previously included *.h header file.\n    * Without further action, the new include would just be ignored,\n    * and functions would effectively _not_ be inlined (silent failure).\n    * The following macros solve this situation by prefixing all inlined names,\n    * avoiding naming collision with previous inclusions.\n    */\n   /* Before that, we unconditionally #undef all symbols,\n    * in case they were already defined with XXH_NAMESPACE.\n    * They will then be redefined for XXH_INLINE_ALL\n    */\n#  undef XXH_versionNumber\n    /* XXH32 */\n#  undef XXH32\n#  undef XXH32_createState\n#  undef XXH32_freeState\n#  undef XXH32_reset\n#  undef XXH32_update\n#  undef XXH32_digest\n#  undef XXH32_copyState\n#  undef XXH32_canonicalFromHash\n#  undef XXH32_hashFromCanonical\n    /* XXH64 */\n#  undef XXH64\n#  undef XXH64_createState\n#  undef XXH64_freeState\n#  undef XXH64_reset\n#  undef XXH64_update\n#  undef XXH64_digest\n#  undef XXH64_copyState\n#  undef XXH64_canonicalFromHash\n#  undef XXH64_hashFromCanonical\n    /* XXH3_64bits */\n#  undef XXH3_64bits\n#  undef XXH3_64bits_withSecret\n#  undef XXH3_64bits_withSeed\n#  undef XXH3_64bits_withSecretandSeed\n#  undef XXH3_createState\n#  undef XXH3_freeState\n#  undef XXH3_copyState\n#  undef XXH3_64bits_reset\n#  undef XXH3_64bits_reset_withSeed\n#  undef XXH3_64bits_reset_withSecret\n#  undef XXH3_64bits_update\n#  undef XXH3_64bits_digest\n#  undef XXH3_generateSecret\n    /* XXH3_128bits */\n#  undef XXH128\n#  undef XXH3_128bits\n#  undef XXH3_128bits_withSeed\n#  undef XXH3_128bits_withSecret\n#  undef XXH3_128bits_reset\n#  undef XXH3_128bits_reset_withSeed\n#  undef XXH3_128bits_reset_withSecret\n#  undef XXH3_128bits_reset_withSecretandSeed\n#  undef XXH3_128bits_update\n#  undef XXH3_128bits_digest\n#  undef XXH128_isEqual\n#  undef XXH128_cmp\n#  undef XXH128_canonicalFromHash\n#  undef XXH128_hashFromCanonical\n    /* Finally, free the namespace itself */\n#  undef XXH_NAMESPACE\n\n    /* employ the namespace for XXH_INLINE_ALL */\n#  define XXH_NAMESPACE XXH_INLINE_\n   /*\n    * Some identifiers (enums, type names) are not symbols,\n    * but they must nonetheless be renamed to avoid redeclaration.\n    * Alternative solution: do not redeclare them.\n    * However, this requires some #ifdefs, and has a more dispersed impact.\n    * Meanwhile, renaming can be achieved in a single place.\n    */\n#  define XXH_IPREF(Id)   XXH_NAMESPACE ## Id\n#  define XXH_OK XXH_IPREF(XXH_OK)\n#  define XXH_ERROR XXH_IPREF(XXH_ERROR)\n#  define XXH_errorcode XXH_IPREF(XXH_errorcode)\n#  define XXH32_canonical_t  XXH_IPREF(XXH32_canonical_t)\n#  define XXH64_canonical_t  XXH_IPREF(XXH64_canonical_t)\n#  define XXH128_canonical_t XXH_IPREF(XXH128_canonical_t)\n#  define XXH32_state_s XXH_IPREF(XXH32_state_s)\n#  define XXH32_state_t XXH_IPREF(XXH32_state_t)\n#  define XXH64_state_s XXH_IPREF(XXH64_state_s)\n#  define XXH64_state_t XXH_IPREF(XXH64_state_t)\n#  define XXH3_state_s  XXH_IPREF(XXH3_state_s)\n#  define XXH3_state_t  XXH_IPREF(XXH3_state_t)\n#  define XXH128_hash_t XXH_IPREF(XXH128_hash_t)\n   /* Ensure the header is parsed again, even if it was previously included */\n#  undef XXHASH_H_5627135585666179\n#  undef XXHASH_H_STATIC_13879238742\n#endif /* XXH_INLINE_ALL || XXH_PRIVATE_API */\n\n/* ****************************************************************\n *  Stable API\n *****************************************************************/\n#ifndef XXHASH_H_5627135585666179\n#define XXHASH_H_5627135585666179 1\n\n/*! @brief Marks a global symbol. */\n#if !defined(XXH_INLINE_ALL) && !defined(XXH_PRIVATE_API)\n#  if defined(_WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT))\n#    ifdef XXH_EXPORT\n#      define XXH_PUBLIC_API __declspec(dllexport)\n#    elif XXH_IMPORT\n#      define XXH_PUBLIC_API __declspec(dllimport)\n#    endif\n#  else\n#    define XXH_PUBLIC_API   /* do nothing */\n#  endif\n#endif\n\n#ifdef XXH_NAMESPACE\n#  define XXH_CAT(A,B) A##B\n#  define XXH_NAME2(A,B) XXH_CAT(A,B)\n#  define XXH_versionNumber XXH_NAME2(XXH_NAMESPACE, XXH_versionNumber)\n/* XXH32 */\n#  define XXH32 XXH_NAME2(XXH_NAMESPACE, XXH32)\n#  define XXH32_createState XXH_NAME2(XXH_NAMESPACE, XXH32_createState)\n#  define XXH32_freeState XXH_NAME2(XXH_NAMESPACE, XXH32_freeState)\n#  define XXH32_reset XXH_NAME2(XXH_NAMESPACE, XXH32_reset)\n#  define XXH32_update XXH_NAME2(XXH_NAMESPACE, XXH32_update)\n#  define XXH32_digest XXH_NAME2(XXH_NAMESPACE, XXH32_digest)\n#  define XXH32_copyState XXH_NAME2(XXH_NAMESPACE, XXH32_copyState)\n#  define XXH32_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH32_canonicalFromHash)\n#  define XXH32_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH32_hashFromCanonical)\n/* XXH64 */\n#  define XXH64 XXH_NAME2(XXH_NAMESPACE, XXH64)\n#  define XXH64_createState XXH_NAME2(XXH_NAMESPACE, XXH64_createState)\n#  define XXH64_freeState XXH_NAME2(XXH_NAMESPACE, XXH64_freeState)\n#  define XXH64_reset XXH_NAME2(XXH_NAMESPACE, XXH64_reset)\n#  define XXH64_update XXH_NAME2(XXH_NAMESPACE, XXH64_update)\n#  define XXH64_digest XXH_NAME2(XXH_NAMESPACE, XXH64_digest)\n#  define XXH64_copyState XXH_NAME2(XXH_NAMESPACE, XXH64_copyState)\n#  define XXH64_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH64_canonicalFromHash)\n#  define XXH64_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH64_hashFromCanonical)\n/* XXH3_64bits */\n#  define XXH3_64bits XXH_NAME2(XXH_NAMESPACE, XXH3_64bits)\n#  define XXH3_64bits_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSecret)\n#  define XXH3_64bits_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSeed)\n#  define XXH3_64bits_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSecretandSeed)\n#  define XXH3_createState XXH_NAME2(XXH_NAMESPACE, XXH3_createState)\n#  define XXH3_freeState XXH_NAME2(XXH_NAMESPACE, XXH3_freeState)\n#  define XXH3_copyState XXH_NAME2(XXH_NAMESPACE, XXH3_copyState)\n#  define XXH3_64bits_reset XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset)\n#  define XXH3_64bits_reset_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset_withSeed)\n#  define XXH3_64bits_reset_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset_withSecret)\n#  define XXH3_64bits_reset_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset_withSecretandSeed)\n#  define XXH3_64bits_update XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_update)\n#  define XXH3_64bits_digest XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_digest)\n#  define XXH3_generateSecret XXH_NAME2(XXH_NAMESPACE, XXH3_generateSecret)\n#  define XXH3_generateSecret_fromSeed XXH_NAME2(XXH_NAMESPACE, XXH3_generateSecret_fromSeed)\n/* XXH3_128bits */\n#  define XXH128 XXH_NAME2(XXH_NAMESPACE, XXH128)\n#  define XXH3_128bits XXH_NAME2(XXH_NAMESPACE, XXH3_128bits)\n#  define XXH3_128bits_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSeed)\n#  define XXH3_128bits_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSecret)\n#  define XXH3_128bits_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSecretandSeed)\n#  define XXH3_128bits_reset XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset)\n#  define XXH3_128bits_reset_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset_withSeed)\n#  define XXH3_128bits_reset_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset_withSecret)\n#  define XXH3_128bits_reset_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset_withSecretandSeed)\n#  define XXH3_128bits_update XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_update)\n#  define XXH3_128bits_digest XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_digest)\n#  define XXH128_isEqual XXH_NAME2(XXH_NAMESPACE, XXH128_isEqual)\n#  define XXH128_cmp     XXH_NAME2(XXH_NAMESPACE, XXH128_cmp)\n#  define XXH128_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH128_canonicalFromHash)\n#  define XXH128_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH128_hashFromCanonical)\n#endif\n\n\n/* *************************************\n*  Compiler specifics\n***************************************/\n\n/* specific declaration modes for Windows */\n#if !defined(XXH_INLINE_ALL) && !defined(XXH_PRIVATE_API)\n#  if defined(_WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT))\n#    ifdef XXH_EXPORT\n#      define XXH_PUBLIC_API __declspec(dllexport)\n#    elif XXH_IMPORT\n#      define XXH_PUBLIC_API __declspec(dllimport)\n#    endif\n#  else\n#    define XXH_PUBLIC_API   /* do nothing */\n#  endif\n#endif\n\n#if defined (__GNUC__)\n# define XXH_CONSTF  __attribute__((__const__))\n# define XXH_PUREF   __attribute__((__pure__))\n# define XXH_MALLOCF __attribute__((__malloc__))\n#else\n# define XXH_CONSTF  /* disable */\n# define XXH_PUREF\n# define XXH_MALLOCF\n#endif\n\n/* *************************************\n*  Version\n***************************************/\n#define XXH_VERSION_MAJOR    0\n#define XXH_VERSION_MINOR    8\n#define XXH_VERSION_RELEASE  3\n/*! @brief Version number, encoded as two digits each */\n#define XXH_VERSION_NUMBER  (XXH_VERSION_MAJOR *100*100 + XXH_VERSION_MINOR *100 + XXH_VERSION_RELEASE)\n\n/*!\n * @brief Obtains the xxHash version.\n *\n * This is mostly useful when xxHash is compiled as a shared library,\n * since the returned value comes from the library, as opposed to header file.\n *\n * @return @ref XXH_VERSION_NUMBER of the invoked library.\n */\nXXH_PUBLIC_API XXH_CONSTF unsigned XXH_versionNumber (void);\n\n\n/* ****************************\n*  Common basic types\n******************************/\n#include <stddef.h>   /* size_t */\n/*!\n * @brief Exit code for the streaming API.\n */\ntypedef enum {\n    XXH_OK = 0, /*!< OK */\n    XXH_ERROR   /*!< Error */\n} XXH_errorcode;\n\n\n/*-**********************************************************************\n*  32-bit hash\n************************************************************************/\n#if defined(XXH_DOXYGEN) /* Don't show <stdint.h> include */\n/*!\n * @brief An unsigned 32-bit integer.\n *\n * Not necessarily defined to `uint32_t` but functionally equivalent.\n */\ntypedef uint32_t XXH32_hash_t;\n\n#elif !defined (__VMS) \\\n  && (defined (__cplusplus) \\\n  || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) )\n#   ifdef _AIX\n#     include <inttypes.h>\n#   else\n#     include <stdint.h>\n#   endif\n    typedef uint32_t XXH32_hash_t;\n\n#else\n#   include <limits.h>\n#   if UINT_MAX == 0xFFFFFFFFUL\n      typedef unsigned int XXH32_hash_t;\n#   elif ULONG_MAX == 0xFFFFFFFFUL\n      typedef unsigned long XXH32_hash_t;\n#   else\n#     error \"unsupported platform: need a 32-bit type\"\n#   endif\n#endif\n\n/*!\n * @}\n *\n * @defgroup XXH32_family XXH32 family\n * @ingroup public\n * Contains functions used in the classic 32-bit xxHash algorithm.\n *\n * @note\n *   XXH32 is useful for older platforms, with no or poor 64-bit performance.\n *   Note that the @ref XXH3_family provides competitive speed for both 32-bit\n *   and 64-bit systems, and offers true 64/128 bit hash results.\n *\n * @see @ref XXH64_family, @ref XXH3_family : Other xxHash families\n * @see @ref XXH32_impl for implementation details\n * @{\n */\n\n/*!\n * @brief Calculates the 32-bit hash of @p input using xxHash32.\n *\n * @param input The block of data to be hashed, at least @p length bytes in size.\n * @param length The length of @p input, in bytes.\n * @param seed The 32-bit seed to alter the hash's output predictably.\n *\n * @pre\n *   The memory between @p input and @p input + @p length must be valid,\n *   readable, contiguous memory. However, if @p length is `0`, @p input may be\n *   `NULL`. In C++, this also must be *TriviallyCopyable*.\n *\n * @return The calculated 32-bit xxHash32 value.\n *\n * @see @ref single_shot_example \"Single Shot Example\" for an example.\n */\nXXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32 (const void* input, size_t length, XXH32_hash_t seed);\n\n#ifndef XXH_NO_STREAM\n/*!\n * @typedef struct XXH32_state_s XXH32_state_t\n * @brief The opaque state struct for the XXH32 streaming API.\n *\n * @see XXH32_state_s for details.\n * @see @ref streaming_example \"Streaming Example\"\n */\ntypedef struct XXH32_state_s XXH32_state_t;\n\n/*!\n * @brief Allocates an @ref XXH32_state_t.\n *\n * @return An allocated pointer of @ref XXH32_state_t on success.\n * @return `NULL` on failure.\n *\n * @note Must be freed with XXH32_freeState().\n *\n * @see @ref streaming_example \"Streaming Example\"\n */\nXXH_PUBLIC_API XXH_MALLOCF XXH32_state_t* XXH32_createState(void);\n/*!\n * @brief Frees an @ref XXH32_state_t.\n *\n * @param statePtr A pointer to an @ref XXH32_state_t allocated with @ref XXH32_createState().\n *\n * @return @ref XXH_OK.\n *\n * @note @p statePtr must be allocated with XXH32_createState().\n *\n * @see @ref streaming_example \"Streaming Example\"\n *\n */\nXXH_PUBLIC_API XXH_errorcode  XXH32_freeState(XXH32_state_t* statePtr);\n/*!\n * @brief Copies one @ref XXH32_state_t to another.\n *\n * @param dst_state The state to copy to.\n * @param src_state The state to copy from.\n * @pre\n *   @p dst_state and @p src_state must not be `NULL` and must not overlap.\n */\nXXH_PUBLIC_API void XXH32_copyState(XXH32_state_t* dst_state, const XXH32_state_t* src_state);\n\n/*!\n * @brief Resets an @ref XXH32_state_t to begin a new hash.\n *\n * @param statePtr The state struct to reset.\n * @param seed The 32-bit seed to alter the hash result predictably.\n *\n * @pre\n *   @p statePtr must not be `NULL`.\n *\n * @return @ref XXH_OK on success.\n * @return @ref XXH_ERROR on failure.\n *\n * @note This function resets and seeds a state. Call it before @ref XXH32_update().\n *\n * @see @ref streaming_example \"Streaming Example\"\n */\nXXH_PUBLIC_API XXH_errorcode XXH32_reset  (XXH32_state_t* statePtr, XXH32_hash_t seed);\n\n/*!\n * @brief Consumes a block of @p input to an @ref XXH32_state_t.\n *\n * @param statePtr The state struct to update.\n * @param input The block of data to be hashed, at least @p length bytes in size.\n * @param length The length of @p input, in bytes.\n *\n * @pre\n *   @p statePtr must not be `NULL`.\n * @pre\n *   The memory between @p input and @p input + @p length must be valid,\n *   readable, contiguous memory. However, if @p length is `0`, @p input may be\n *   `NULL`. In C++, this also must be *TriviallyCopyable*.\n *\n * @return @ref XXH_OK on success.\n * @return @ref XXH_ERROR on failure.\n *\n * @note Call this to incrementally consume blocks of data.\n *\n * @see @ref streaming_example \"Streaming Example\"\n */\nXXH_PUBLIC_API XXH_errorcode XXH32_update (XXH32_state_t* statePtr, const void* input, size_t length);\n\n/*!\n * @brief Returns the calculated hash value from an @ref XXH32_state_t.\n *\n * @param statePtr The state struct to calculate the hash from.\n *\n * @pre\n *  @p statePtr must not be `NULL`.\n *\n * @return The calculated 32-bit xxHash32 value from that state.\n *\n * @note\n *   Calling XXH32_digest() will not affect @p statePtr, so you can update,\n *   digest, and update again.\n *\n * @see @ref streaming_example \"Streaming Example\"\n */\nXXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32_digest (const XXH32_state_t* statePtr);\n#endif /* !XXH_NO_STREAM */\n\n/*******   Canonical representation   *******/\n\n/*!\n * @brief Canonical (big endian) representation of @ref XXH32_hash_t.\n */\ntypedef struct {\n    unsigned char digest[4]; /*!< Hash bytes, big endian */\n} XXH32_canonical_t;\n\n/*!\n * @brief Converts an @ref XXH32_hash_t to a big endian @ref XXH32_canonical_t.\n *\n * @param dst  The @ref XXH32_canonical_t pointer to be stored to.\n * @param hash The @ref XXH32_hash_t to be converted.\n *\n * @pre\n *   @p dst must not be `NULL`.\n *\n * @see @ref canonical_representation_example \"Canonical Representation Example\"\n */\nXXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t* dst, XXH32_hash_t hash);\n\n/*!\n * @brief Converts an @ref XXH32_canonical_t to a native @ref XXH32_hash_t.\n *\n * @param src The @ref XXH32_canonical_t to convert.\n *\n * @pre\n *   @p src must not be `NULL`.\n *\n * @return The converted hash.\n *\n * @see @ref canonical_representation_example \"Canonical Representation Example\"\n */\nXXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t* src);\n\n\n/*! @cond Doxygen ignores this part */\n#ifdef __has_attribute\n# define XXH_HAS_ATTRIBUTE(x) __has_attribute(x)\n#else\n# define XXH_HAS_ATTRIBUTE(x) 0\n#endif\n/*! @endcond */\n\n/*! @cond Doxygen ignores this part */\n/*\n * C23 __STDC_VERSION__ number hasn't been specified yet. For now\n * leave as `201711L` (C17 + 1).\n * TODO: Update to correct value when its been specified.\n */\n#define XXH_C23_VN 201711L\n/*! @endcond */\n\n/*! @cond Doxygen ignores this part */\n/* C-language Attributes are added in C23. */\n#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= XXH_C23_VN) && defined(__has_c_attribute)\n# define XXH_HAS_C_ATTRIBUTE(x) __has_c_attribute(x)\n#else\n# define XXH_HAS_C_ATTRIBUTE(x) 0\n#endif\n/*! @endcond */\n\n/*! @cond Doxygen ignores this part */\n#if defined(__cplusplus) && defined(__has_cpp_attribute)\n# define XXH_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x)\n#else\n# define XXH_HAS_CPP_ATTRIBUTE(x) 0\n#endif\n/*! @endcond */\n\n/*! @cond Doxygen ignores this part */\n/*\n * Define XXH_FALLTHROUGH macro for annotating switch case with the 'fallthrough' attribute\n * introduced in CPP17 and C23.\n * CPP17 : https://en.cppreference.com/w/cpp/language/attributes/fallthrough\n * C23   : https://en.cppreference.com/w/c/language/attributes/fallthrough\n */\n#if XXH_HAS_C_ATTRIBUTE(fallthrough) || XXH_HAS_CPP_ATTRIBUTE(fallthrough)\n# define XXH_FALLTHROUGH [[fallthrough]]\n#elif XXH_HAS_ATTRIBUTE(__fallthrough__)\n# define XXH_FALLTHROUGH __attribute__ ((__fallthrough__))\n#else\n# define XXH_FALLTHROUGH /* fallthrough */\n#endif\n/*! @endcond */\n\n/*! @cond Doxygen ignores this part */\n/*\n * Define XXH_NOESCAPE for annotated pointers in public API.\n * https://clang.llvm.org/docs/AttributeReference.html#noescape\n * As of writing this, only supported by clang.\n */\n#if XXH_HAS_ATTRIBUTE(noescape)\n# define XXH_NOESCAPE __attribute__((__noescape__))\n#else\n# define XXH_NOESCAPE\n#endif\n/*! @endcond */\n\n\n/*!\n * @}\n * @ingroup public\n * @{\n */\n\n#ifndef XXH_NO_LONG_LONG\n/*-**********************************************************************\n*  64-bit hash\n************************************************************************/\n#if defined(XXH_DOXYGEN) /* don't include <stdint.h> */\n/*!\n * @brief An unsigned 64-bit integer.\n *\n * Not necessarily defined to `uint64_t` but functionally equivalent.\n */\ntypedef uint64_t XXH64_hash_t;\n#elif !defined (__VMS) \\\n  && (defined (__cplusplus) \\\n  || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) )\n#   ifdef _AIX\n#     include <inttypes.h>\n#   else\n#     include <stdint.h>\n#   endif\n   typedef uint64_t XXH64_hash_t;\n#else\n#  include <limits.h>\n#  if defined(__LP64__) && ULONG_MAX == 0xFFFFFFFFFFFFFFFFULL\n     /* LP64 ABI says uint64_t is unsigned long */\n     typedef unsigned long XXH64_hash_t;\n#  else\n     /* the following type must have a width of 64-bit */\n     typedef unsigned long long XXH64_hash_t;\n#  endif\n#endif\n\n/*!\n * @}\n *\n * @defgroup XXH64_family XXH64 family\n * @ingroup public\n * @{\n * Contains functions used in the classic 64-bit xxHash algorithm.\n *\n * @note\n *   XXH3 provides competitive speed for both 32-bit and 64-bit systems,\n *   and offers true 64/128 bit hash results.\n *   It provides better speed for systems with vector processing capabilities.\n */\n\n/*!\n * @brief Calculates the 64-bit hash of @p input using xxHash64.\n *\n * @param input The block of data to be hashed, at least @p length bytes in size.\n * @param length The length of @p input, in bytes.\n * @param seed The 64-bit seed to alter the hash's output predictably.\n *\n * @pre\n *   The memory between @p input and @p input + @p length must be valid,\n *   readable, contiguous memory. However, if @p length is `0`, @p input may be\n *   `NULL`. In C++, this also must be *TriviallyCopyable*.\n *\n * @return The calculated 64-bit xxHash64 value.\n *\n * @see @ref single_shot_example \"Single Shot Example\" for an example.\n */\nXXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH64(XXH_NOESCAPE const void* input, size_t length, XXH64_hash_t seed);\n\n/*******   Streaming   *******/\n#ifndef XXH_NO_STREAM\n/*!\n * @brief The opaque state struct for the XXH64 streaming API.\n *\n * @see XXH64_state_s for details.\n * @see @ref streaming_example \"Streaming Example\"\n */\ntypedef struct XXH64_state_s XXH64_state_t;   /* incomplete type */\n\n/*!\n * @brief Allocates an @ref XXH64_state_t.\n *\n * @return An allocated pointer of @ref XXH64_state_t on success.\n * @return `NULL` on failure.\n *\n * @note Must be freed with XXH64_freeState().\n *\n * @see @ref streaming_example \"Streaming Example\"\n */\nXXH_PUBLIC_API XXH_MALLOCF XXH64_state_t* XXH64_createState(void);\n\n/*!\n * @brief Frees an @ref XXH64_state_t.\n *\n * @param statePtr A pointer to an @ref XXH64_state_t allocated with @ref XXH64_createState().\n *\n * @return @ref XXH_OK.\n *\n * @note @p statePtr must be allocated with XXH64_createState().\n *\n * @see @ref streaming_example \"Streaming Example\"\n */\nXXH_PUBLIC_API XXH_errorcode  XXH64_freeState(XXH64_state_t* statePtr);\n\n/*!\n * @brief Copies one @ref XXH64_state_t to another.\n *\n * @param dst_state The state to copy to.\n * @param src_state The state to copy from.\n * @pre\n *   @p dst_state and @p src_state must not be `NULL` and must not overlap.\n */\nXXH_PUBLIC_API void XXH64_copyState(XXH_NOESCAPE XXH64_state_t* dst_state, const XXH64_state_t* src_state);\n\n/*!\n * @brief Resets an @ref XXH64_state_t to begin a new hash.\n *\n * @param statePtr The state struct to reset.\n * @param seed The 64-bit seed to alter the hash result predictably.\n *\n * @pre\n *   @p statePtr must not be `NULL`.\n *\n * @return @ref XXH_OK on success.\n * @return @ref XXH_ERROR on failure.\n *\n * @note This function resets and seeds a state. Call it before @ref XXH64_update().\n *\n * @see @ref streaming_example \"Streaming Example\"\n */\nXXH_PUBLIC_API XXH_errorcode XXH64_reset  (XXH_NOESCAPE XXH64_state_t* statePtr, XXH64_hash_t seed);\n\n/*!\n * @brief Consumes a block of @p input to an @ref XXH64_state_t.\n *\n * @param statePtr The state struct to update.\n * @param input The block of data to be hashed, at least @p length bytes in size.\n * @param length The length of @p input, in bytes.\n *\n * @pre\n *   @p statePtr must not be `NULL`.\n * @pre\n *   The memory between @p input and @p input + @p length must be valid,\n *   readable, contiguous memory. However, if @p length is `0`, @p input may be\n *   `NULL`. In C++, this also must be *TriviallyCopyable*.\n *\n * @return @ref XXH_OK on success.\n * @return @ref XXH_ERROR on failure.\n *\n * @note Call this to incrementally consume blocks of data.\n *\n * @see @ref streaming_example \"Streaming Example\"\n */\nXXH_PUBLIC_API XXH_errorcode XXH64_update (XXH_NOESCAPE XXH64_state_t* statePtr, XXH_NOESCAPE const void* input, size_t length);\n\n/*!\n * @brief Returns the calculated hash value from an @ref XXH64_state_t.\n *\n * @param statePtr The state struct to calculate the hash from.\n *\n * @pre\n *  @p statePtr must not be `NULL`.\n *\n * @return The calculated 64-bit xxHash64 value from that state.\n *\n * @note\n *   Calling XXH64_digest() will not affect @p statePtr, so you can update,\n *   digest, and update again.\n *\n * @see @ref streaming_example \"Streaming Example\"\n */\nXXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH64_digest (XXH_NOESCAPE const XXH64_state_t* statePtr);\n#endif /* !XXH_NO_STREAM */\n/*******   Canonical representation   *******/\n\n/*!\n * @brief Canonical (big endian) representation of @ref XXH64_hash_t.\n */\ntypedef struct { unsigned char digest[sizeof(XXH64_hash_t)]; } XXH64_canonical_t;\n\n/*!\n * @brief Converts an @ref XXH64_hash_t to a big endian @ref XXH64_canonical_t.\n *\n * @param dst The @ref XXH64_canonical_t pointer to be stored to.\n * @param hash The @ref XXH64_hash_t to be converted.\n *\n * @pre\n *   @p dst must not be `NULL`.\n *\n * @see @ref canonical_representation_example \"Canonical Representation Example\"\n */\nXXH_PUBLIC_API void XXH64_canonicalFromHash(XXH_NOESCAPE XXH64_canonical_t* dst, XXH64_hash_t hash);\n\n/*!\n * @brief Converts an @ref XXH64_canonical_t to a native @ref XXH64_hash_t.\n *\n * @param src The @ref XXH64_canonical_t to convert.\n *\n * @pre\n *   @p src must not be `NULL`.\n *\n * @return The converted hash.\n *\n * @see @ref canonical_representation_example \"Canonical Representation Example\"\n */\nXXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const XXH64_canonical_t* src);\n\n#ifndef XXH_NO_XXH3\n\n/*!\n * @}\n * ************************************************************************\n * @defgroup XXH3_family XXH3 family\n * @ingroup public\n * @{\n *\n * XXH3 is a more recent hash algorithm featuring:\n *  - Improved speed for both small and large inputs\n *  - True 64-bit and 128-bit outputs\n *  - SIMD acceleration\n *  - Improved 32-bit viability\n *\n * Speed analysis methodology is explained here:\n *\n *    https://fastcompression.blogspot.com/2019/03/presenting-xxh3.html\n *\n * Compared to XXH64, expect XXH3 to run approximately\n * ~2x faster on large inputs and >3x faster on small ones,\n * exact differences vary depending on platform.\n *\n * XXH3's speed benefits greatly from SIMD and 64-bit arithmetic,\n * but does not require it.\n * Most 32-bit and 64-bit targets that can run XXH32 smoothly can run XXH3\n * at competitive speeds, even without vector support. Further details are\n * explained in the implementation.\n *\n * XXH3 has a fast scalar implementation, but it also includes accelerated SIMD\n * implementations for many common platforms:\n *   - AVX512\n *   - AVX2\n *   - SSE2\n *   - ARM NEON\n *   - WebAssembly SIMD128\n *   - POWER8 VSX\n *   - s390x ZVector\n * This can be controlled via the @ref XXH_VECTOR macro, but it automatically\n * selects the best version according to predefined macros. For the x86 family, an\n * automatic runtime dispatcher is included separately in @ref xxh_x86dispatch.c.\n *\n * XXH3 implementation is portable:\n * it has a generic C90 formulation that can be compiled on any platform,\n * all implementations generate exactly the same hash value on all platforms.\n * Starting from v0.8.0, it's also labelled \"stable\", meaning that\n * any future version will also generate the same hash value.\n *\n * XXH3 offers 2 variants, _64bits and _128bits.\n *\n * When only 64 bits are needed, prefer invoking the _64bits variant, as it\n * reduces the amount of mixing, resulting in faster speed on small inputs.\n * It's also generally simpler to manipulate a scalar return type than a struct.\n *\n * The API supports one-shot hashing, streaming mode, and custom secrets.\n */\n\n/*!\n * @ingroup tuning\n * @brief Possible values for @ref XXH_VECTOR.\n *\n * Unless set explicitly, determined automatically.\n */\n#  define XXH_SCALAR 0 /*!< Portable scalar version */\n#  define XXH_SSE2   1 /*!< SSE2 for Pentium 4, Opteron, all x86_64. */\n#  define XXH_AVX2   2 /*!< AVX2 for Haswell and Bulldozer */\n#  define XXH_AVX512 3 /*!< AVX512 for Skylake and Icelake */\n#  define XXH_NEON   4 /*!< NEON for most ARMv7-A, all AArch64, and WASM SIMD128 */\n#  define XXH_VSX    5 /*!< VSX and ZVector for POWER8/z13 (64-bit) */\n#  define XXH_SVE    6 /*!< SVE for some ARMv8-A and ARMv9-A */\n#  define XXH_LSX    7 /*!< LSX (128-bit SIMD) for LoongArch64 */\n\n\n/*-**********************************************************************\n*  XXH3 64-bit variant\n************************************************************************/\n\n/*!\n * @brief Calculates 64-bit unseeded variant of XXH3 hash of @p input.\n *\n * @param input  The block of data to be hashed, at least @p length bytes in size.\n * @param length The length of @p input, in bytes.\n *\n * @pre\n *   The memory between @p input and @p input + @p length must be valid,\n *   readable, contiguous memory. However, if @p length is `0`, @p input may be\n *   `NULL`. In C++, this also must be *TriviallyCopyable*.\n *\n * @return The calculated 64-bit XXH3 hash value.\n *\n * @note\n *   This is equivalent to @ref XXH3_64bits_withSeed() with a seed of `0`, however\n *   it may have slightly better performance due to constant propagation of the\n *   defaults.\n *\n * @see\n *    XXH3_64bits_withSeed(), XXH3_64bits_withSecret(): other seeding variants\n * @see @ref single_shot_example \"Single Shot Example\" for an example.\n */\nXXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits(XXH_NOESCAPE const void* input, size_t length);\n\n/*!\n * @brief Calculates 64-bit seeded variant of XXH3 hash of @p input.\n *\n * @param input  The block of data to be hashed, at least @p length bytes in size.\n * @param length The length of @p input, in bytes.\n * @param seed   The 64-bit seed to alter the hash result predictably.\n *\n * @pre\n *   The memory between @p input and @p input + @p length must be valid,\n *   readable, contiguous memory. However, if @p length is `0`, @p input may be\n *   `NULL`. In C++, this also must be *TriviallyCopyable*.\n *\n * @return The calculated 64-bit XXH3 hash value.\n *\n * @note\n *    seed == 0 produces the same results as @ref XXH3_64bits().\n *\n * This variant generates a custom secret on the fly based on default secret\n * altered using the @p seed value.\n *\n * While this operation is decently fast, note that it's not completely free.\n *\n * @see @ref single_shot_example \"Single Shot Example\" for an example.\n */\nXXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits_withSeed(XXH_NOESCAPE const void* input, size_t length, XXH64_hash_t seed);\n\n/*!\n * The bare minimum size for a custom secret.\n *\n * @see\n *  XXH3_64bits_withSecret(), XXH3_64bits_reset_withSecret(),\n *  XXH3_128bits_withSecret(), XXH3_128bits_reset_withSecret().\n */\n#define XXH3_SECRET_SIZE_MIN 136\n\n/*!\n * @brief Calculates 64-bit variant of XXH3 with a custom \"secret\".\n *\n * @param data       The block of data to be hashed, at least @p len bytes in size.\n * @param len        The length of @p data, in bytes.\n * @param secret     The secret data.\n * @param secretSize The length of @p secret, in bytes.\n *\n * @return The calculated 64-bit XXH3 hash value.\n *\n * @pre\n *   The memory between @p data and @p data + @p len must be valid,\n *   readable, contiguous memory. However, if @p length is `0`, @p data may be\n *   `NULL`. In C++, this also must be *TriviallyCopyable*.\n *\n * It's possible to provide any blob of bytes as a \"secret\" to generate the hash.\n * This makes it more difficult for an external actor to prepare an intentional collision.\n * The main condition is that @p secretSize *must* be large enough (>= @ref XXH3_SECRET_SIZE_MIN).\n * However, the quality of the secret impacts the dispersion of the hash algorithm.\n * Therefore, the secret _must_ look like a bunch of random bytes.\n * Avoid \"trivial\" or structured data such as repeated sequences or a text document.\n * Whenever in doubt about the \"randomness\" of the blob of bytes,\n * consider employing @ref XXH3_generateSecret() instead (see below).\n * It will generate a proper high entropy secret derived from the blob of bytes.\n * Another advantage of using XXH3_generateSecret() is that\n * it guarantees that all bits within the initial blob of bytes\n * will impact every bit of the output.\n * This is not necessarily the case when using the blob of bytes directly\n * because, when hashing _small_ inputs, only a portion of the secret is employed.\n *\n * @see @ref single_shot_example \"Single Shot Example\" for an example.\n */\nXXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits_withSecret(XXH_NOESCAPE const void* data, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize);\n\n\n/*******   Streaming   *******/\n#ifndef XXH_NO_STREAM\n/*\n * Streaming requires state maintenance.\n * This operation costs memory and CPU.\n * As a consequence, streaming is slower than one-shot hashing.\n * For better performance, prefer one-shot functions whenever applicable.\n */\n\n/*!\n * @brief The opaque state struct for the XXH3 streaming API.\n *\n * @see XXH3_state_s for details.\n * @see @ref streaming_example \"Streaming Example\"\n */\ntypedef struct XXH3_state_s XXH3_state_t;\nXXH_PUBLIC_API XXH_MALLOCF XXH3_state_t* XXH3_createState(void);\nXXH_PUBLIC_API XXH_errorcode XXH3_freeState(XXH3_state_t* statePtr);\n\n/*!\n * @brief Copies one @ref XXH3_state_t to another.\n *\n * @param dst_state The state to copy to.\n * @param src_state The state to copy from.\n * @pre\n *   @p dst_state and @p src_state must not be `NULL` and must not overlap.\n */\nXXH_PUBLIC_API void XXH3_copyState(XXH_NOESCAPE XXH3_state_t* dst_state, XXH_NOESCAPE const XXH3_state_t* src_state);\n\n/*!\n * @brief Resets an @ref XXH3_state_t to begin a new hash.\n *\n * @param statePtr The state struct to reset.\n *\n * @pre\n *   @p statePtr must not be `NULL`.\n *\n * @return @ref XXH_OK on success.\n * @return @ref XXH_ERROR on failure.\n *\n * @note\n *   - This function resets `statePtr` and generate a secret with default parameters.\n *   - Call this function before @ref XXH3_64bits_update().\n *   - Digest will be equivalent to `XXH3_64bits()`.\n *\n * @see @ref streaming_example \"Streaming Example\"\n *\n */\nXXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset(XXH_NOESCAPE XXH3_state_t* statePtr);\n\n/*!\n * @brief Resets an @ref XXH3_state_t with 64-bit seed to begin a new hash.\n *\n * @param statePtr The state struct to reset.\n * @param seed     The 64-bit seed to alter the hash result predictably.\n *\n * @pre\n *   @p statePtr must not be `NULL`.\n *\n * @return @ref XXH_OK on success.\n * @return @ref XXH_ERROR on failure.\n *\n * @note\n *   - This function resets `statePtr` and generate a secret from `seed`.\n *   - Call this function before @ref XXH3_64bits_update().\n *   - Digest will be equivalent to `XXH3_64bits_withSeed()`.\n *\n * @see @ref streaming_example \"Streaming Example\"\n *\n */\nXXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset_withSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH64_hash_t seed);\n\n/*!\n * @brief Resets an @ref XXH3_state_t with secret data to begin a new hash.\n *\n * @param statePtr The state struct to reset.\n * @param secret     The secret data.\n * @param secretSize The length of @p secret, in bytes.\n *\n * @pre\n *   @p statePtr must not be `NULL`.\n *\n * @return @ref XXH_OK on success.\n * @return @ref XXH_ERROR on failure.\n *\n * @note\n *   `secret` is referenced, it _must outlive_ the hash streaming session.\n *\n * Similar to one-shot API, `secretSize` must be >= @ref XXH3_SECRET_SIZE_MIN,\n * and the quality of produced hash values depends on secret's entropy\n * (secret's content should look like a bunch of random bytes).\n * When in doubt about the randomness of a candidate `secret`,\n * consider employing `XXH3_generateSecret()` instead (see below).\n *\n * @see @ref streaming_example \"Streaming Example\"\n */\nXXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize);\n\n/*!\n * @brief Consumes a block of @p input to an @ref XXH3_state_t.\n *\n * @param statePtr The state struct to update.\n * @param input The block of data to be hashed, at least @p length bytes in size.\n * @param length The length of @p input, in bytes.\n *\n * @pre\n *   @p statePtr must not be `NULL`.\n * @pre\n *   The memory between @p input and @p input + @p length must be valid,\n *   readable, contiguous memory. However, if @p length is `0`, @p input may be\n *   `NULL`. In C++, this also must be *TriviallyCopyable*.\n *\n * @return @ref XXH_OK on success.\n * @return @ref XXH_ERROR on failure.\n *\n * @note Call this to incrementally consume blocks of data.\n *\n * @see @ref streaming_example \"Streaming Example\"\n */\nXXH_PUBLIC_API XXH_errorcode XXH3_64bits_update (XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* input, size_t length);\n\n/*!\n * @brief Returns the calculated XXH3 64-bit hash value from an @ref XXH3_state_t.\n *\n * @param statePtr The state struct to calculate the hash from.\n *\n * @pre\n *  @p statePtr must not be `NULL`.\n *\n * @return The calculated XXH3 64-bit hash value from that state.\n *\n * @note\n *   Calling XXH3_64bits_digest() will not affect @p statePtr, so you can update,\n *   digest, and update again.\n *\n * @see @ref streaming_example \"Streaming Example\"\n */\nXXH_PUBLIC_API XXH_PUREF XXH64_hash_t  XXH3_64bits_digest (XXH_NOESCAPE const XXH3_state_t* statePtr);\n#endif /* !XXH_NO_STREAM */\n\n/* note : canonical representation of XXH3 is the same as XXH64\n * since they both produce XXH64_hash_t values */\n\n\n/*-**********************************************************************\n*  XXH3 128-bit variant\n************************************************************************/\n\n/*!\n * @brief The return value from 128-bit hashes.\n *\n * Stored in little endian order, although the fields themselves are in native\n * endianness.\n */\ntypedef struct {\n    XXH64_hash_t low64;   /*!< `value & 0xFFFFFFFFFFFFFFFF` */\n    XXH64_hash_t high64;  /*!< `value >> 64` */\n} XXH128_hash_t;\n\n/*!\n * @brief Calculates 128-bit unseeded variant of XXH3 of @p data.\n *\n * @param data The block of data to be hashed, at least @p length bytes in size.\n * @param len  The length of @p data, in bytes.\n *\n * @return The calculated 128-bit variant of XXH3 value.\n *\n * The 128-bit variant of XXH3 has more strength, but it has a bit of overhead\n * for shorter inputs.\n *\n * This is equivalent to @ref XXH3_128bits_withSeed() with a seed of `0`, however\n * it may have slightly better performance due to constant propagation of the\n * defaults.\n *\n * @see XXH3_128bits_withSeed(), XXH3_128bits_withSecret(): other seeding variants\n * @see @ref single_shot_example \"Single Shot Example\" for an example.\n */\nXXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits(XXH_NOESCAPE const void* data, size_t len);\n/*! @brief Calculates 128-bit seeded variant of XXH3 hash of @p data.\n *\n * @param data The block of data to be hashed, at least @p length bytes in size.\n * @param len  The length of @p data, in bytes.\n * @param seed The 64-bit seed to alter the hash result predictably.\n *\n * @return The calculated 128-bit variant of XXH3 value.\n *\n * @note\n *    seed == 0 produces the same results as @ref XXH3_64bits().\n *\n * This variant generates a custom secret on the fly based on default secret\n * altered using the @p seed value.\n *\n * While this operation is decently fast, note that it's not completely free.\n *\n * @see XXH3_128bits(), XXH3_128bits_withSecret(): other seeding variants\n * @see @ref single_shot_example \"Single Shot Example\" for an example.\n */\nXXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits_withSeed(XXH_NOESCAPE const void* data, size_t len, XXH64_hash_t seed);\n/*!\n * @brief Calculates 128-bit variant of XXH3 with a custom \"secret\".\n *\n * @param data       The block of data to be hashed, at least @p len bytes in size.\n * @param len        The length of @p data, in bytes.\n * @param secret     The secret data.\n * @param secretSize The length of @p secret, in bytes.\n *\n * @return The calculated 128-bit variant of XXH3 value.\n *\n * It's possible to provide any blob of bytes as a \"secret\" to generate the hash.\n * This makes it more difficult for an external actor to prepare an intentional collision.\n * The main condition is that @p secretSize *must* be large enough (>= @ref XXH3_SECRET_SIZE_MIN).\n * However, the quality of the secret impacts the dispersion of the hash algorithm.\n * Therefore, the secret _must_ look like a bunch of random bytes.\n * Avoid \"trivial\" or structured data such as repeated sequences or a text document.\n * Whenever in doubt about the \"randomness\" of the blob of bytes,\n * consider employing @ref XXH3_generateSecret() instead (see below).\n * It will generate a proper high entropy secret derived from the blob of bytes.\n * Another advantage of using XXH3_generateSecret() is that\n * it guarantees that all bits within the initial blob of bytes\n * will impact every bit of the output.\n * This is not necessarily the case when using the blob of bytes directly\n * because, when hashing _small_ inputs, only a portion of the secret is employed.\n *\n * @see @ref single_shot_example \"Single Shot Example\" for an example.\n */\nXXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits_withSecret(XXH_NOESCAPE const void* data, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize);\n\n/*******   Streaming   *******/\n#ifndef XXH_NO_STREAM\n/*\n * Streaming requires state maintenance.\n * This operation costs memory and CPU.\n * As a consequence, streaming is slower than one-shot hashing.\n * For better performance, prefer one-shot functions whenever applicable.\n *\n * XXH3_128bits uses the same XXH3_state_t as XXH3_64bits().\n * Use already declared XXH3_createState() and XXH3_freeState().\n *\n * All reset and streaming functions have same meaning as their 64-bit counterpart.\n */\n\n/*!\n * @brief Resets an @ref XXH3_state_t to begin a new hash.\n *\n * @param statePtr The state struct to reset.\n *\n * @pre\n *   @p statePtr must not be `NULL`.\n *\n * @return @ref XXH_OK on success.\n * @return @ref XXH_ERROR on failure.\n *\n * @note\n *   - This function resets `statePtr` and generate a secret with default parameters.\n *   - Call it before @ref XXH3_128bits_update().\n *   - Digest will be equivalent to `XXH3_128bits()`.\n *\n * @see @ref streaming_example \"Streaming Example\"\n */\nXXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset(XXH_NOESCAPE XXH3_state_t* statePtr);\n\n/*!\n * @brief Resets an @ref XXH3_state_t with 64-bit seed to begin a new hash.\n *\n * @param statePtr The state struct to reset.\n * @param seed     The 64-bit seed to alter the hash result predictably.\n *\n * @pre\n *   @p statePtr must not be `NULL`.\n *\n * @return @ref XXH_OK on success.\n * @return @ref XXH_ERROR on failure.\n *\n * @note\n *   - This function resets `statePtr` and generate a secret from `seed`.\n *   - Call it before @ref XXH3_128bits_update().\n *   - Digest will be equivalent to `XXH3_128bits_withSeed()`.\n *\n * @see @ref streaming_example \"Streaming Example\"\n */\nXXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset_withSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH64_hash_t seed);\n/*!\n * @brief Resets an @ref XXH3_state_t with secret data to begin a new hash.\n *\n * @param statePtr   The state struct to reset.\n * @param secret     The secret data.\n * @param secretSize The length of @p secret, in bytes.\n *\n * @pre\n *   @p statePtr must not be `NULL`.\n *\n * @return @ref XXH_OK on success.\n * @return @ref XXH_ERROR on failure.\n *\n * `secret` is referenced, it _must outlive_ the hash streaming session.\n * Similar to one-shot API, `secretSize` must be >= @ref XXH3_SECRET_SIZE_MIN,\n * and the quality of produced hash values depends on secret's entropy\n * (secret's content should look like a bunch of random bytes).\n * When in doubt about the randomness of a candidate `secret`,\n * consider employing `XXH3_generateSecret()` instead (see below).\n *\n * @see @ref streaming_example \"Streaming Example\"\n */\nXXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize);\n\n/*!\n * @brief Consumes a block of @p input to an @ref XXH3_state_t.\n *\n * Call this to incrementally consume blocks of data.\n *\n * @param statePtr The state struct to update.\n * @param input The block of data to be hashed, at least @p length bytes in size.\n * @param length The length of @p input, in bytes.\n *\n * @pre\n *   @p statePtr must not be `NULL`.\n *\n * @return @ref XXH_OK on success.\n * @return @ref XXH_ERROR on failure.\n *\n * @note\n *   The memory between @p input and @p input + @p length must be valid,\n *   readable, contiguous memory. However, if @p length is `0`, @p input may be\n *   `NULL`. In C++, this also must be *TriviallyCopyable*.\n *\n */\nXXH_PUBLIC_API XXH_errorcode XXH3_128bits_update (XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* input, size_t length);\n\n/*!\n * @brief Returns the calculated XXH3 128-bit hash value from an @ref XXH3_state_t.\n *\n * @param statePtr The state struct to calculate the hash from.\n *\n * @pre\n *  @p statePtr must not be `NULL`.\n *\n * @return The calculated XXH3 128-bit hash value from that state.\n *\n * @note\n *   Calling XXH3_128bits_digest() will not affect @p statePtr, so you can update,\n *   digest, and update again.\n *\n */\nXXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits_digest (XXH_NOESCAPE const XXH3_state_t* statePtr);\n#endif /* !XXH_NO_STREAM */\n\n/* Following helper functions make it possible to compare XXH128_hast_t values.\n * Since XXH128_hash_t is a structure, this capability is not offered by the language.\n * Note: For better performance, these functions can be inlined using XXH_INLINE_ALL */\n\n/*!\n * @brief Check equality of two XXH128_hash_t values\n *\n * @param h1 The 128-bit hash value.\n * @param h2 Another 128-bit hash value.\n *\n * @return `1` if `h1` and `h2` are equal.\n * @return `0` if they are not.\n */\nXXH_PUBLIC_API XXH_PUREF int XXH128_isEqual(XXH128_hash_t h1, XXH128_hash_t h2);\n\n/*!\n * @brief Compares two @ref XXH128_hash_t\n *\n * This comparator is compatible with stdlib's `qsort()`/`bsearch()`.\n *\n * @param h128_1 Left-hand side value\n * @param h128_2 Right-hand side value\n *\n * @return >0 if @p h128_1  > @p h128_2\n * @return =0 if @p h128_1 == @p h128_2\n * @return <0 if @p h128_1  < @p h128_2\n */\nXXH_PUBLIC_API XXH_PUREF int XXH128_cmp(XXH_NOESCAPE const void* h128_1, XXH_NOESCAPE const void* h128_2);\n\n\n/*******   Canonical representation   *******/\ntypedef struct { unsigned char digest[sizeof(XXH128_hash_t)]; } XXH128_canonical_t;\n\n\n/*!\n * @brief Converts an @ref XXH128_hash_t to a big endian @ref XXH128_canonical_t.\n *\n * @param dst  The @ref XXH128_canonical_t pointer to be stored to.\n * @param hash The @ref XXH128_hash_t to be converted.\n *\n * @pre\n *   @p dst must not be `NULL`.\n * @see @ref canonical_representation_example \"Canonical Representation Example\"\n */\nXXH_PUBLIC_API void XXH128_canonicalFromHash(XXH_NOESCAPE XXH128_canonical_t* dst, XXH128_hash_t hash);\n\n/*!\n * @brief Converts an @ref XXH128_canonical_t to a native @ref XXH128_hash_t.\n *\n * @param src The @ref XXH128_canonical_t to convert.\n *\n * @pre\n *   @p src must not be `NULL`.\n *\n * @return The converted hash.\n * @see @ref canonical_representation_example \"Canonical Representation Example\"\n */\nXXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH128_hashFromCanonical(XXH_NOESCAPE const XXH128_canonical_t* src);\n\n\n#endif  /* !XXH_NO_XXH3 */\n#endif  /* XXH_NO_LONG_LONG */\n\n/*!\n * @}\n */\n#endif /* XXHASH_H_5627135585666179 */\n\n\n\n#if defined(XXH_STATIC_LINKING_ONLY) && !defined(XXHASH_H_STATIC_13879238742)\n#define XXHASH_H_STATIC_13879238742\n/* ****************************************************************************\n * This section contains declarations which are not guaranteed to remain stable.\n * They may change in future versions, becoming incompatible with a different\n * version of the library.\n * These declarations should only be used with static linking.\n * Never use them in association with dynamic linking!\n ***************************************************************************** */\n\n/*\n * These definitions are only present to allow static allocation\n * of XXH states, on stack or in a struct, for example.\n * Never **ever** access their members directly.\n */\n\n/*!\n * @internal\n * @brief Structure for XXH32 streaming API.\n *\n * @note This is only defined when @ref XXH_STATIC_LINKING_ONLY,\n * @ref XXH_INLINE_ALL, or @ref XXH_IMPLEMENTATION is defined. Otherwise it is\n * an opaque type. This allows fields to safely be changed.\n *\n * Typedef'd to @ref XXH32_state_t.\n * Do not access the members of this struct directly.\n * @see XXH64_state_s, XXH3_state_s\n */\nstruct XXH32_state_s {\n   XXH32_hash_t total_len_32; /*!< Total length hashed, modulo 2^32 */\n   XXH32_hash_t large_len;    /*!< Whether the hash is >= 16 (handles @ref total_len_32 overflow) */\n   XXH32_hash_t acc[4];       /*!< Accumulator lanes */\n   unsigned char buffer[16];  /*!< Internal buffer for partial reads. */\n   XXH32_hash_t bufferedSize; /*!< Amount of data in @ref buffer */\n   XXH32_hash_t reserved;     /*!< Reserved field. Do not read nor write to it. */\n};   /* typedef'd to XXH32_state_t */\n\n\n#ifndef XXH_NO_LONG_LONG  /* defined when there is no 64-bit support */\n\n/*!\n * @internal\n * @brief Structure for XXH64 streaming API.\n *\n * @note This is only defined when @ref XXH_STATIC_LINKING_ONLY,\n * @ref XXH_INLINE_ALL, or @ref XXH_IMPLEMENTATION is defined. Otherwise it is\n * an opaque type. This allows fields to safely be changed.\n *\n * Typedef'd to @ref XXH64_state_t.\n * Do not access the members of this struct directly.\n * @see XXH32_state_s, XXH3_state_s\n */\nstruct XXH64_state_s {\n   XXH64_hash_t total_len;    /*!< Total length hashed. This is always 64-bit. */\n   XXH64_hash_t acc[4];       /*!< Accumulator lanes */\n   unsigned char buffer[32];  /*!< Internal buffer for partial reads.. */\n   XXH32_hash_t bufferedSize; /*!< Amount of data in @ref buffer */\n   XXH32_hash_t reserved32;   /*!< Reserved field, needed for padding anyways*/\n   XXH64_hash_t reserved64;   /*!< Reserved field. Do not read or write to it. */\n};   /* typedef'd to XXH64_state_t */\n\n#ifndef XXH_NO_XXH3\n\n#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* >= C11 */\n#  define XXH_ALIGN(n)      _Alignas(n)\n#elif defined(__cplusplus) && (__cplusplus >= 201103L) /* >= C++11 */\n/* In C++ alignas() is a keyword */\n#  define XXH_ALIGN(n)      alignas(n)\n#elif defined(__GNUC__)\n#  define XXH_ALIGN(n)      __attribute__ ((aligned(n)))\n#elif defined(_MSC_VER)\n#  define XXH_ALIGN(n)      __declspec(align(n))\n#else\n#  define XXH_ALIGN(n)   /* disabled */\n#endif\n\n/* Old GCC versions only accept the attribute after the type in structures. */\n#if !(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L))   /* C11+ */ \\\n    && ! (defined(__cplusplus) && (__cplusplus >= 201103L)) /* >= C++11 */ \\\n    && defined(__GNUC__)\n#   define XXH_ALIGN_MEMBER(align, type) type XXH_ALIGN(align)\n#else\n#   define XXH_ALIGN_MEMBER(align, type) XXH_ALIGN(align) type\n#endif\n\n/*!\n * @brief The size of the internal XXH3 buffer.\n *\n * This is the optimal update size for incremental hashing.\n *\n * @see XXH3_64b_update(), XXH3_128b_update().\n */\n#define XXH3_INTERNALBUFFER_SIZE 256\n\n/*!\n * @internal\n * @brief Default size of the secret buffer (and @ref XXH3_kSecret).\n *\n * This is the size used in @ref XXH3_kSecret and the seeded functions.\n *\n * Not to be confused with @ref XXH3_SECRET_SIZE_MIN.\n */\n#define XXH3_SECRET_DEFAULT_SIZE 192\n\n/*!\n * @internal\n * @brief Structure for XXH3 streaming API.\n *\n * @note This is only defined when @ref XXH_STATIC_LINKING_ONLY,\n * @ref XXH_INLINE_ALL, or @ref XXH_IMPLEMENTATION is defined.\n * Otherwise it is an opaque type.\n * Never use this definition in combination with dynamic library.\n * This allows fields to safely be changed in the future.\n *\n * @note ** This structure has a strict alignment requirement of 64 bytes!! **\n * Do not allocate this with `malloc()` or `new`,\n * it will not be sufficiently aligned.\n * Use @ref XXH3_createState() and @ref XXH3_freeState(), or stack allocation.\n *\n * Typedef'd to @ref XXH3_state_t.\n * Do never access the members of this struct directly.\n *\n * @see XXH3_INITSTATE() for stack initialization.\n * @see XXH3_createState(), XXH3_freeState().\n * @see XXH32_state_s, XXH64_state_s\n */\nstruct XXH3_state_s {\n   XXH_ALIGN_MEMBER(64, XXH64_hash_t acc[8]);\n       /*!< The 8 accumulators. See @ref XXH32_state_s::v and @ref XXH64_state_s::v */\n   XXH_ALIGN_MEMBER(64, unsigned char customSecret[XXH3_SECRET_DEFAULT_SIZE]);\n       /*!< Used to store a custom secret generated from a seed. */\n   XXH_ALIGN_MEMBER(64, unsigned char buffer[XXH3_INTERNALBUFFER_SIZE]);\n       /*!< The internal buffer. @see XXH32_state_s::mem32 */\n   XXH32_hash_t bufferedSize;\n       /*!< The amount of memory in @ref buffer, @see XXH32_state_s::memsize */\n   XXH32_hash_t useSeed;\n       /*!< Reserved field. Needed for padding on 64-bit. */\n   size_t nbStripesSoFar;\n       /*!< Number or stripes processed. */\n   XXH64_hash_t totalLen;\n       /*!< Total length hashed. 64-bit even on 32-bit targets. */\n   size_t nbStripesPerBlock;\n       /*!< Number of stripes per block. */\n   size_t secretLimit;\n       /*!< Size of @ref customSecret or @ref extSecret */\n   XXH64_hash_t seed;\n       /*!< Seed for _withSeed variants. Must be zero otherwise, @see XXH3_INITSTATE() */\n   XXH64_hash_t reserved64;\n       /*!< Reserved field. */\n   const unsigned char* extSecret;\n       /*!< Reference to an external secret for the _withSecret variants, NULL\n        *   for other variants. */\n   /* note: there may be some padding at the end due to alignment on 64 bytes */\n}; /* typedef'd to XXH3_state_t */\n\n#undef XXH_ALIGN_MEMBER\n\n/*!\n * @brief Initializes a stack-allocated `XXH3_state_s`.\n *\n * When the @ref XXH3_state_t structure is merely emplaced on stack,\n * it should be initialized with XXH3_INITSTATE() or a memset()\n * in case its first reset uses XXH3_NNbits_reset_withSeed().\n * This init can be omitted if the first reset uses default or _withSecret mode.\n * This operation isn't necessary when the state is created with XXH3_createState().\n * Note that this doesn't prepare the state for a streaming operation,\n * it's still necessary to use XXH3_NNbits_reset*() afterwards.\n */\n#define XXH3_INITSTATE(XXH3_state_ptr)                       \\\n    do {                                                     \\\n        XXH3_state_t* tmp_xxh3_state_ptr = (XXH3_state_ptr); \\\n        tmp_xxh3_state_ptr->seed = 0;                        \\\n        tmp_xxh3_state_ptr->extSecret = NULL;                \\\n    } while(0)\n\n\n/*!\n * @brief Calculates the 128-bit hash of @p data using XXH3.\n *\n * @param data The block of data to be hashed, at least @p len bytes in size.\n * @param len  The length of @p data, in bytes.\n * @param seed The 64-bit seed to alter the hash's output predictably.\n *\n * @pre\n *   The memory between @p data and @p data + @p len must be valid,\n *   readable, contiguous memory. However, if @p len is `0`, @p data may be\n *   `NULL`. In C++, this also must be *TriviallyCopyable*.\n *\n * @return The calculated 128-bit XXH3 value.\n *\n * @see @ref single_shot_example \"Single Shot Example\" for an example.\n */\nXXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH128(XXH_NOESCAPE const void* data, size_t len, XXH64_hash_t seed);\n\n\n/* ===   Experimental API   === */\n/* Symbols defined below must be considered tied to a specific library version. */\n\n/*!\n * @brief Derive a high-entropy secret from any user-defined content, named customSeed.\n *\n * @param secretBuffer    A writable buffer for derived high-entropy secret data.\n * @param secretSize      Size of secretBuffer, in bytes.  Must be >= XXH3_SECRET_SIZE_MIN.\n * @param customSeed      A user-defined content.\n * @param customSeedSize  Size of customSeed, in bytes.\n *\n * @return @ref XXH_OK on success.\n * @return @ref XXH_ERROR on failure.\n *\n * The generated secret can be used in combination with `*_withSecret()` functions.\n * The `_withSecret()` variants are useful to provide a higher level of protection\n * than 64-bit seed, as it becomes much more difficult for an external actor to\n * guess how to impact the calculation logic.\n *\n * The function accepts as input a custom seed of any length and any content,\n * and derives from it a high-entropy secret of length @p secretSize into an\n * already allocated buffer @p secretBuffer.\n *\n * The generated secret can then be used with any `*_withSecret()` variant.\n * The functions @ref XXH3_128bits_withSecret(), @ref XXH3_64bits_withSecret(),\n * @ref XXH3_128bits_reset_withSecret() and @ref XXH3_64bits_reset_withSecret()\n * are part of this list. They all accept a `secret` parameter\n * which must be large enough for implementation reasons (>= @ref XXH3_SECRET_SIZE_MIN)\n * _and_ feature very high entropy (consist of random-looking bytes).\n * These conditions can be a high bar to meet, so @ref XXH3_generateSecret() can\n * be employed to ensure proper quality.\n *\n * @p customSeed can be anything. It can have any size, even small ones,\n * and its content can be anything, even \"poor entropy\" sources such as a bunch\n * of zeroes. The resulting `secret` will nonetheless provide all required qualities.\n *\n * @pre\n *   - @p secretSize must be >= @ref XXH3_SECRET_SIZE_MIN\n *   - When @p customSeedSize > 0, supplying NULL as customSeed is undefined behavior.\n *\n * Example code:\n * @code{.c}\n *    #include <stdio.h>\n *    #include <stdlib.h>\n *    #include <string.h>\n *    #define XXH_STATIC_LINKING_ONLY // expose unstable API\n *    #include \"xxhash.h\"\n *    // Hashes argv[2] using the entropy from argv[1].\n *    int main(int argc, char* argv[])\n *    {\n *        char secret[XXH3_SECRET_SIZE_MIN];\n *        if (argv != 3) { return 1; }\n *        XXH3_generateSecret(secret, sizeof(secret), argv[1], strlen(argv[1]));\n *        XXH64_hash_t h = XXH3_64bits_withSecret(\n *             argv[2], strlen(argv[2]),\n *             secret, sizeof(secret)\n *        );\n *        printf(\"%016llx\\n\", (unsigned long long) h);\n *    }\n * @endcode\n */\nXXH_PUBLIC_API XXH_errorcode XXH3_generateSecret(XXH_NOESCAPE void* secretBuffer, size_t secretSize, XXH_NOESCAPE const void* customSeed, size_t customSeedSize);\n\n/*!\n * @brief Generate the same secret as the _withSeed() variants.\n *\n * @param secretBuffer A writable buffer of @ref XXH3_SECRET_DEFAULT_SIZE bytes\n * @param seed         The 64-bit seed to alter the hash result predictably.\n *\n * The generated secret can be used in combination with\n *`*_withSecret()` and `_withSecretandSeed()` variants.\n *\n * Example C++ `std::string` hash class:\n * @code{.cpp}\n *    #include <string>\n *    #define XXH_STATIC_LINKING_ONLY // expose unstable API\n *    #include \"xxhash.h\"\n *    // Slow, seeds each time\n *    class HashSlow {\n *        XXH64_hash_t seed;\n *    public:\n *        HashSlow(XXH64_hash_t s) : seed{s} {}\n *        size_t operator()(const std::string& x) const {\n *            return size_t{XXH3_64bits_withSeed(x.c_str(), x.length(), seed)};\n *        }\n *    };\n *    // Fast, caches the seeded secret for future uses.\n *    class HashFast {\n *        unsigned char secret[XXH3_SECRET_DEFAULT_SIZE];\n *    public:\n *        HashFast(XXH64_hash_t s) {\n *            XXH3_generateSecret_fromSeed(secret, seed);\n *        }\n *        size_t operator()(const std::string& x) const {\n *            return size_t{\n *                XXH3_64bits_withSecret(x.c_str(), x.length(), secret, sizeof(secret))\n *            };\n *        }\n *    };\n * @endcode\n */\nXXH_PUBLIC_API void XXH3_generateSecret_fromSeed(XXH_NOESCAPE void* secretBuffer, XXH64_hash_t seed);\n\n/*!\n * @brief Maximum size of \"short\" key in bytes.\n */\n#define XXH3_MIDSIZE_MAX 240\n\n/*!\n * @brief Calculates 64/128-bit seeded variant of XXH3 hash of @p data.\n *\n * @param data       The block of data to be hashed, at least @p len bytes in size.\n * @param len        The length of @p data, in bytes.\n * @param secret     The secret data.\n * @param secretSize The length of @p secret, in bytes.\n * @param seed       The 64-bit seed to alter the hash result predictably.\n *\n * These variants generate hash values using either:\n * - @p seed for \"short\" keys (< @ref XXH3_MIDSIZE_MAX = 240 bytes)\n * - @p secret for \"large\" keys (>= @ref XXH3_MIDSIZE_MAX).\n *\n * This generally benefits speed, compared to `_withSeed()` or `_withSecret()`.\n * `_withSeed()` has to generate the secret on the fly for \"large\" keys.\n * It's fast, but can be perceptible for \"not so large\" keys (< 1 KB).\n * `_withSecret()` has to generate the masks on the fly for \"small\" keys,\n * which requires more instructions than _withSeed() variants.\n * Therefore, _withSecretandSeed variant combines the best of both worlds.\n *\n * When @p secret has been generated by XXH3_generateSecret_fromSeed(),\n * this variant produces *exactly* the same results as `_withSeed()` variant,\n * hence offering only a pure speed benefit on \"large\" input,\n * by skipping the need to regenerate the secret for every large input.\n *\n * Another usage scenario is to hash the secret to a 64-bit hash value,\n * for example with XXH3_64bits(), which then becomes the seed,\n * and then employ both the seed and the secret in _withSecretandSeed().\n * On top of speed, an added benefit is that each bit in the secret\n * has a 50% chance to swap each bit in the output, via its impact to the seed.\n *\n * This is not guaranteed when using the secret directly in \"small data\" scenarios,\n * because only portions of the secret are employed for small data.\n */\nXXH_PUBLIC_API XXH_PUREF XXH64_hash_t\nXXH3_64bits_withSecretandSeed(XXH_NOESCAPE const void* data, size_t len,\n                              XXH_NOESCAPE const void* secret, size_t secretSize,\n                              XXH64_hash_t seed);\n\n/*!\n * @brief Calculates 128-bit seeded variant of XXH3 hash of @p data.\n *\n * @param data       The memory segment to be hashed, at least @p len bytes in size.\n * @param length     The length of @p data, in bytes.\n * @param secret     The secret used to alter hash result predictably.\n * @param secretSize The length of @p secret, in bytes (must be >= XXH3_SECRET_SIZE_MIN)\n * @param seed64     The 64-bit seed to alter the hash result predictably.\n *\n * @return @ref XXH_OK on success.\n * @return @ref XXH_ERROR on failure.\n *\n * @see XXH3_64bits_withSecretandSeed(): contract is the same.\n */\nXXH_PUBLIC_API XXH_PUREF XXH128_hash_t\nXXH3_128bits_withSecretandSeed(XXH_NOESCAPE const void* input, size_t length,\n                               XXH_NOESCAPE const void* secret, size_t secretSize,\n                               XXH64_hash_t seed64);\n\n#ifndef XXH_NO_STREAM\n/*!\n * @brief Resets an @ref XXH3_state_t with secret data to begin a new hash.\n *\n * @param statePtr   A pointer to an @ref XXH3_state_t allocated with @ref XXH3_createState().\n * @param secret     The secret data.\n * @param secretSize The length of @p secret, in bytes.\n * @param seed64     The 64-bit seed to alter the hash result predictably.\n *\n * @return @ref XXH_OK on success.\n * @return @ref XXH_ERROR on failure.\n *\n * @see XXH3_64bits_withSecretandSeed(). Contract is identical.\n */\nXXH_PUBLIC_API XXH_errorcode\nXXH3_64bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr,\n                                    XXH_NOESCAPE const void* secret, size_t secretSize,\n                                    XXH64_hash_t seed64);\n\n/*!\n * @brief Resets an @ref XXH3_state_t with secret data to begin a new hash.\n *\n * @param statePtr   A pointer to an @ref XXH3_state_t allocated with @ref XXH3_createState().\n * @param secret     The secret data.\n * @param secretSize The length of @p secret, in bytes.\n * @param seed64     The 64-bit seed to alter the hash result predictably.\n *\n * @return @ref XXH_OK on success.\n * @return @ref XXH_ERROR on failure.\n *\n * @see XXH3_64bits_withSecretandSeed(). Contract is identical.\n *\n * Note: there was a bug in an earlier version of this function (<= v0.8.2)\n * that would make it generate an incorrect hash value\n * when @p seed == 0 and @p length < XXH3_MIDSIZE_MAX\n * and @p secret is different from XXH3_generateSecret_fromSeed().\n * As stated in the contract, the correct hash result must be\n * the same as XXH3_128bits_withSeed() when @p length <= XXH3_MIDSIZE_MAX.\n * Results generated by this older version are wrong, hence not comparable.\n */\nXXH_PUBLIC_API XXH_errorcode\nXXH3_128bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr,\n                                     XXH_NOESCAPE const void* secret, size_t secretSize,\n                                     XXH64_hash_t seed64);\n\n#endif /* !XXH_NO_STREAM */\n\n#endif  /* !XXH_NO_XXH3 */\n#endif  /* XXH_NO_LONG_LONG */\n#if defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API)\n#  define XXH_IMPLEMENTATION\n#endif\n\n#endif  /* defined(XXH_STATIC_LINKING_ONLY) && !defined(XXHASH_H_STATIC_13879238742) */\n\n\n/* ======================================================================== */\n/* ======================================================================== */\n/* ======================================================================== */\n\n\n/*-**********************************************************************\n * xxHash implementation\n *-**********************************************************************\n * xxHash's implementation used to be hosted inside xxhash.c.\n *\n * However, inlining requires implementation to be visible to the compiler,\n * hence be included alongside the header.\n * Previously, implementation was hosted inside xxhash.c,\n * which was then #included when inlining was activated.\n * This construction created issues with a few build and install systems,\n * as it required xxhash.c to be stored in /include directory.\n *\n * xxHash implementation is now directly integrated within xxhash.h.\n * As a consequence, xxhash.c is no longer needed in /include.\n *\n * xxhash.c is still available and is still useful.\n * In a \"normal\" setup, when xxhash is not inlined,\n * xxhash.h only exposes the prototypes and public symbols,\n * while xxhash.c can be built into an object file xxhash.o\n * which can then be linked into the final binary.\n ************************************************************************/\n\n#if ( defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API) \\\n   || defined(XXH_IMPLEMENTATION) ) && !defined(XXH_IMPLEM_13a8737387)\n#  define XXH_IMPLEM_13a8737387\n\n/* *************************************\n*  Tuning parameters\n***************************************/\n\n/*!\n * @defgroup tuning Tuning parameters\n * @{\n *\n * Various macros to control xxHash's behavior.\n */\n#ifdef XXH_DOXYGEN\n/*!\n * @brief Define this to disable 64-bit code.\n *\n * Useful if only using the @ref XXH32_family and you have a strict C90 compiler.\n */\n#  define XXH_NO_LONG_LONG\n#  undef XXH_NO_LONG_LONG /* don't actually */\n/*!\n * @brief Controls how unaligned memory is accessed.\n *\n * By default, access to unaligned memory is controlled by `memcpy()`, which is\n * safe and portable.\n *\n * Unfortunately, on some target/compiler combinations, the generated assembly\n * is sub-optimal.\n *\n * The below switch allow selection of a different access method\n * in the search for improved performance.\n *\n * @par Possible options:\n *\n *  - `XXH_FORCE_MEMORY_ACCESS=0` (default): `memcpy`\n *   @par\n *     Use `memcpy()`. Safe and portable. Note that most modern compilers will\n *     eliminate the function call and treat it as an unaligned access.\n *\n *  - `XXH_FORCE_MEMORY_ACCESS=1`: `__attribute__((aligned(1)))`\n *   @par\n *     Depends on compiler extensions and is therefore not portable.\n *     This method is safe _if_ your compiler supports it,\n *     and *generally* as fast or faster than `memcpy`.\n *\n *  - `XXH_FORCE_MEMORY_ACCESS=2`: Direct cast\n *  @par\n *     Casts directly and dereferences. This method doesn't depend on the\n *     compiler, but it violates the C standard as it directly dereferences an\n *     unaligned pointer. It can generate buggy code on targets which do not\n *     support unaligned memory accesses, but in some circumstances, it's the\n *     only known way to get the most performance.\n *\n *  - `XXH_FORCE_MEMORY_ACCESS=3`: Byteshift\n *  @par\n *     Also portable. This can generate the best code on old compilers which don't\n *     inline small `memcpy()` calls, and it might also be faster on big-endian\n *     systems which lack a native byteswap instruction. However, some compilers\n *     will emit literal byteshifts even if the target supports unaligned access.\n *\n *\n * @warning\n *   Methods 1 and 2 rely on implementation-defined behavior. Use these with\n *   care, as what works on one compiler/platform/optimization level may cause\n *   another to read garbage data or even crash.\n *\n * See https://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html for details.\n *\n * Prefer these methods in priority order (0 > 3 > 1 > 2)\n */\n#  define XXH_FORCE_MEMORY_ACCESS 0\n\n/*!\n * @def XXH_SIZE_OPT\n * @brief Controls how much xxHash optimizes for size.\n *\n * xxHash, when compiled, tends to result in a rather large binary size. This\n * is mostly due to heavy usage to forced inlining and constant folding of the\n * @ref XXH3_family to increase performance.\n *\n * However, some developers prefer size over speed. This option can\n * significantly reduce the size of the generated code. When using the `-Os`\n * or `-Oz` options on GCC or Clang, this is defined to 1 by default,\n * otherwise it is defined to 0.\n *\n * Most of these size optimizations can be controlled manually.\n *\n * This is a number from 0-2.\n *  - `XXH_SIZE_OPT` == 0: Default. xxHash makes no size optimizations. Speed\n *    comes first.\n *  - `XXH_SIZE_OPT` == 1: Default for `-Os` and `-Oz`. xxHash is more\n *    conservative and disables hacks that increase code size. It implies the\n *    options @ref XXH_NO_INLINE_HINTS == 1, @ref XXH_FORCE_ALIGN_CHECK == 0,\n *    and @ref XXH3_NEON_LANES == 8 if they are not already defined.\n *  - `XXH_SIZE_OPT` == 2: xxHash tries to make itself as small as possible.\n *    Performance may cry. For example, the single shot functions just use the\n *    streaming API.\n */\n#  define XXH_SIZE_OPT 0\n\n/*!\n * @def XXH_FORCE_ALIGN_CHECK\n * @brief If defined to non-zero, adds a special path for aligned inputs (XXH32()\n * and XXH64() only).\n *\n * This is an important performance trick for architectures without decent\n * unaligned memory access performance.\n *\n * It checks for input alignment, and when conditions are met, uses a \"fast\n * path\" employing direct 32-bit/64-bit reads, resulting in _dramatically\n * faster_ read speed.\n *\n * The check costs one initial branch per hash, which is generally negligible,\n * but not zero.\n *\n * Moreover, it's not useful to generate an additional code path if memory\n * access uses the same instruction for both aligned and unaligned\n * addresses (e.g. x86 and aarch64).\n *\n * In these cases, the alignment check can be removed by setting this macro to 0.\n * Then the code will always use unaligned memory access.\n * Align check is automatically disabled on x86, x64, ARM64, and some ARM chips\n * which are platforms known to offer good unaligned memory accesses performance.\n *\n * It is also disabled by default when @ref XXH_SIZE_OPT >= 1.\n *\n * This option does not affect XXH3 (only XXH32 and XXH64).\n */\n#  define XXH_FORCE_ALIGN_CHECK 0\n\n/*!\n * @def XXH_NO_INLINE_HINTS\n * @brief When non-zero, sets all functions to `static`.\n *\n * By default, xxHash tries to force the compiler to inline almost all internal\n * functions.\n *\n * This can usually improve performance due to reduced jumping and improved\n * constant folding, but significantly increases the size of the binary which\n * might not be favorable.\n *\n * Additionally, sometimes the forced inlining can be detrimental to performance,\n * depending on the architecture.\n *\n * XXH_NO_INLINE_HINTS marks all internal functions as static, giving the\n * compiler full control on whether to inline or not.\n *\n * When not optimizing (-O0), using `-fno-inline` with GCC or Clang, or if\n * @ref XXH_SIZE_OPT >= 1, this will automatically be defined.\n */\n#  define XXH_NO_INLINE_HINTS 0\n\n/*!\n * @def XXH3_INLINE_SECRET\n * @brief Determines whether to inline the XXH3 withSecret code.\n *\n * When the secret size is known, the compiler can improve the performance\n * of XXH3_64bits_withSecret() and XXH3_128bits_withSecret().\n *\n * However, if the secret size is not known, it doesn't have any benefit. This\n * happens when xxHash is compiled into a global symbol. Therefore, if\n * @ref XXH_INLINE_ALL is *not* defined, this will be defined to 0.\n *\n * Additionally, this defaults to 0 on GCC 12+, which has an issue with function pointers\n * that are *sometimes* force inline on -Og, and it is impossible to automatically\n * detect this optimization level.\n */\n#  define XXH3_INLINE_SECRET 0\n\n/*!\n * @def XXH32_ENDJMP\n * @brief Whether to use a jump for `XXH32_finalize`.\n *\n * For performance, `XXH32_finalize` uses multiple branches in the finalizer.\n * This is generally preferable for performance,\n * but depending on exact architecture, a jmp may be preferable.\n *\n * This setting is only possibly making a difference for very small inputs.\n */\n#  define XXH32_ENDJMP 0\n\n/*!\n * @internal\n * @brief Redefines old internal names.\n *\n * For compatibility with code that uses xxHash's internals before the names\n * were changed to improve namespacing. There is no other reason to use this.\n */\n#  define XXH_OLD_NAMES\n#  undef XXH_OLD_NAMES /* don't actually use, it is ugly. */\n\n/*!\n * @def XXH_NO_STREAM\n * @brief Disables the streaming API.\n *\n * When xxHash is not inlined and the streaming functions are not used, disabling\n * the streaming functions can improve code size significantly, especially with\n * the @ref XXH3_family which tends to make constant folded copies of itself.\n */\n#  define XXH_NO_STREAM\n#  undef XXH_NO_STREAM /* don't actually */\n#endif /* XXH_DOXYGEN */\n/*!\n * @}\n */\n\n#ifndef XXH_FORCE_MEMORY_ACCESS   /* can be defined externally, on command line for example */\n   /* prefer __packed__ structures (method 1) for GCC\n    * < ARMv7 with unaligned access (e.g. Raspbian armhf) still uses byte shifting, so we use memcpy\n    * which for some reason does unaligned loads. */\n#  if defined(__GNUC__) && !(defined(__ARM_ARCH) && __ARM_ARCH < 7 && defined(__ARM_FEATURE_UNALIGNED))\n#    define XXH_FORCE_MEMORY_ACCESS 1\n#  endif\n#endif\n\n#ifndef XXH_SIZE_OPT\n   /* default to 1 for -Os or -Oz */\n#  if (defined(__GNUC__) || defined(__clang__)) && defined(__OPTIMIZE_SIZE__)\n#    define XXH_SIZE_OPT 1\n#  else\n#    define XXH_SIZE_OPT 0\n#  endif\n#endif\n\n#ifndef XXH_FORCE_ALIGN_CHECK  /* can be defined externally */\n   /* don't check on sizeopt, x86, aarch64, or arm when unaligned access is available */\n#  if XXH_SIZE_OPT >= 1 || \\\n      defined(__i386)  || defined(__x86_64__) || defined(__aarch64__) || defined(__ARM_FEATURE_UNALIGNED) \\\n   || defined(_M_IX86) || defined(_M_X64)     || defined(_M_ARM64)    || defined(_M_ARM) /* visual */\n#    define XXH_FORCE_ALIGN_CHECK 0\n#  else\n#    define XXH_FORCE_ALIGN_CHECK 1\n#  endif\n#endif\n\n#ifndef XXH_NO_INLINE_HINTS\n#  if XXH_SIZE_OPT >= 1 || defined(__NO_INLINE__)  /* -O0, -fno-inline */\n#    define XXH_NO_INLINE_HINTS 1\n#  else\n#    define XXH_NO_INLINE_HINTS 0\n#  endif\n#endif\n\n#ifndef XXH3_INLINE_SECRET\n#  if (defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 12) \\\n     || !defined(XXH_INLINE_ALL)\n#    define XXH3_INLINE_SECRET 0\n#  else\n#    define XXH3_INLINE_SECRET 1\n#  endif\n#endif\n\n#ifndef XXH32_ENDJMP\n/* generally preferable for performance */\n#  define XXH32_ENDJMP 0\n#endif\n\n/*!\n * @defgroup impl Implementation\n * @{\n */\n\n\n/* *************************************\n*  Includes & Memory related functions\n***************************************/\n#if defined(XXH_NO_STREAM)\n/* nothing */\n#elif defined(XXH_NO_STDLIB)\n\n/* When requesting to disable any mention of stdlib,\n * the library loses the ability to invoked malloc / free.\n * In practice, it means that functions like `XXH*_createState()`\n * will always fail, and return NULL.\n * This flag is useful in situations where\n * xxhash.h is integrated into some kernel, embedded or limited environment\n * without access to dynamic allocation.\n */\n\nstatic XXH_CONSTF void* XXH_malloc(size_t s) { (void)s; return NULL; }\nstatic void XXH_free(void* p) { (void)p; }\n\n#else\n\n/*\n * Modify the local functions below should you wish to use\n * different memory routines for malloc() and free()\n */\n#include <stdlib.h>\n\n/*!\n * @internal\n * @brief Modify this function to use a different routine than malloc().\n */\nstatic XXH_MALLOCF void* XXH_malloc(size_t s) { return malloc(s); }\n\n/*!\n * @internal\n * @brief Modify this function to use a different routine than free().\n */\nstatic void XXH_free(void* p) { free(p); }\n\n#endif  /* XXH_NO_STDLIB */\n\n#include <string.h>\n\n/*!\n * @internal\n * @brief Modify this function to use a different routine than memcpy().\n */\nstatic void* XXH_memcpy(void* dest, const void* src, size_t size)\n{\n    return memcpy(dest,src,size);\n}\n\n#include <limits.h>   /* ULLONG_MAX */\n\n\n/* *************************************\n*  Compiler Specific Options\n***************************************/\n#ifdef _MSC_VER /* Visual Studio warning fix */\n#  pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */\n#endif\n\n#if XXH_NO_INLINE_HINTS  /* disable inlining hints */\n#  if defined(__GNUC__) || defined(__clang__)\n#    define XXH_FORCE_INLINE static __attribute__((__unused__))\n#  else\n#    define XXH_FORCE_INLINE static\n#  endif\n#  define XXH_NO_INLINE static\n/* enable inlining hints */\n#elif defined(__GNUC__) || defined(__clang__)\n#  define XXH_FORCE_INLINE static __inline__ __attribute__((__always_inline__, __unused__))\n#  define XXH_NO_INLINE static __attribute__((__noinline__))\n#elif defined(_MSC_VER)  /* Visual Studio */\n#  define XXH_FORCE_INLINE static __forceinline\n#  define XXH_NO_INLINE static __declspec(noinline)\n#elif defined (__cplusplus) \\\n  || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))   /* C99 */\n#  define XXH_FORCE_INLINE static inline\n#  define XXH_NO_INLINE static\n#else\n#  define XXH_FORCE_INLINE static\n#  define XXH_NO_INLINE static\n#endif\n\n#if defined(XXH_INLINE_ALL)\n#  define XXH_STATIC XXH_FORCE_INLINE\n#else\n#  define XXH_STATIC static\n#endif\n\n#if XXH3_INLINE_SECRET\n#  define XXH3_WITH_SECRET_INLINE XXH_FORCE_INLINE\n#else\n#  define XXH3_WITH_SECRET_INLINE XXH_NO_INLINE\n#endif\n\n#if ((defined(sun) || defined(__sun)) && __cplusplus) /* Solaris includes __STDC_VERSION__ with C++. Tested with GCC 5.5 */\n#  define XXH_RESTRICT   /* disable */\n#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L   /* >= C99 */\n#  define XXH_RESTRICT   restrict\n#elif (defined (__GNUC__) && ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))) \\\n   || (defined (__clang__)) \\\n   || (defined (_MSC_VER) && (_MSC_VER >= 1400)) \\\n   || (defined (__INTEL_COMPILER) && (__INTEL_COMPILER >= 1300))\n/*\n * There are a LOT more compilers that recognize __restrict but this\n * covers the major ones.\n */\n#  define XXH_RESTRICT   __restrict\n#else\n#  define XXH_RESTRICT   /* disable */\n#endif\n\n/* *************************************\n*  Debug\n***************************************/\n/*!\n * @ingroup tuning\n * @def XXH_DEBUGLEVEL\n * @brief Sets the debugging level.\n *\n * XXH_DEBUGLEVEL is expected to be defined externally, typically via the\n * compiler's command line options. The value must be a number.\n */\n#ifndef XXH_DEBUGLEVEL\n#  ifdef DEBUGLEVEL /* backwards compat */\n#    define XXH_DEBUGLEVEL DEBUGLEVEL\n#  else\n#    define XXH_DEBUGLEVEL 0\n#  endif\n#endif\n\n#if (XXH_DEBUGLEVEL>=1)\n#  include <assert.h>   /* note: can still be disabled with NDEBUG */\n#  define XXH_ASSERT(c)   assert(c)\n#else\n#  if defined(__INTEL_COMPILER)\n#    define XXH_ASSERT(c)   XXH_ASSUME((unsigned char) (c))\n#  else\n#    define XXH_ASSERT(c)   XXH_ASSUME(c)\n#  endif\n#endif\n\n/* note: use after variable declarations */\n#ifndef XXH_STATIC_ASSERT\n#  if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)    /* C11 */\n#    define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { _Static_assert((c),m); } while(0)\n#  elif defined(__cplusplus) && (__cplusplus >= 201103L)            /* C++11 */\n#    define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0)\n#  else\n#    define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { struct xxh_sa { char x[(c) ? 1 : -1]; }; } while(0)\n#  endif\n#  define XXH_STATIC_ASSERT(c) XXH_STATIC_ASSERT_WITH_MESSAGE((c),#c)\n#endif\n\n/*!\n * @internal\n * @def XXH_COMPILER_GUARD(var)\n * @brief Used to prevent unwanted optimizations for @p var.\n *\n * It uses an empty GCC inline assembly statement with a register constraint\n * which forces @p var into a general purpose register (eg eax, ebx, ecx\n * on x86) and marks it as modified.\n *\n * This is used in a few places to avoid unwanted autovectorization (e.g.\n * XXH32_round()). All vectorization we want is explicit via intrinsics,\n * and _usually_ isn't wanted elsewhere.\n *\n * We also use it to prevent unwanted constant folding for AArch64 in\n * XXH3_initCustomSecret_scalar().\n */\n#if defined(__GNUC__) || defined(__clang__)\n#  define XXH_COMPILER_GUARD(var) __asm__(\"\" : \"+r\" (var))\n#else\n#  define XXH_COMPILER_GUARD(var) ((void)0)\n#endif\n\n/* Specifically for NEON vectors which use the \"w\" constraint, on\n * Clang. */\n#if defined(__clang__) && defined(__ARM_ARCH) && !defined(__wasm__)\n#  define XXH_COMPILER_GUARD_CLANG_NEON(var) __asm__(\"\" : \"+w\" (var))\n#else\n#  define XXH_COMPILER_GUARD_CLANG_NEON(var) ((void)0)\n#endif\n\n/* *************************************\n*  Basic Types\n***************************************/\n#if !defined (__VMS) \\\n && (defined (__cplusplus) \\\n || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) )\n#   ifdef _AIX\n#     include <inttypes.h>\n#   else\n#     include <stdint.h>\n#   endif\n    typedef uint8_t xxh_u8;\n#else\n    typedef unsigned char xxh_u8;\n#endif\ntypedef XXH32_hash_t xxh_u32;\n\n#ifdef XXH_OLD_NAMES\n#  warning \"XXH_OLD_NAMES is planned to be removed starting v0.9. If the program depends on it, consider moving away from it by employing newer type names directly\"\n#  define BYTE xxh_u8\n#  define U8   xxh_u8\n#  define U32  xxh_u32\n#endif\n\n/* ***   Memory access   *** */\n\n/*!\n * @internal\n * @fn xxh_u32 XXH_read32(const void* ptr)\n * @brief Reads an unaligned 32-bit integer from @p ptr in native endianness.\n *\n * Affected by @ref XXH_FORCE_MEMORY_ACCESS.\n *\n * @param ptr The pointer to read from.\n * @return The 32-bit native endian integer from the bytes at @p ptr.\n */\n\n/*!\n * @internal\n * @fn xxh_u32 XXH_readLE32(const void* ptr)\n * @brief Reads an unaligned 32-bit little endian integer from @p ptr.\n *\n * Affected by @ref XXH_FORCE_MEMORY_ACCESS.\n *\n * @param ptr The pointer to read from.\n * @return The 32-bit little endian integer from the bytes at @p ptr.\n */\n\n/*!\n * @internal\n * @fn xxh_u32 XXH_readBE32(const void* ptr)\n * @brief Reads an unaligned 32-bit big endian integer from @p ptr.\n *\n * Affected by @ref XXH_FORCE_MEMORY_ACCESS.\n *\n * @param ptr The pointer to read from.\n * @return The 32-bit big endian integer from the bytes at @p ptr.\n */\n\n/*!\n * @internal\n * @fn xxh_u32 XXH_readLE32_align(const void* ptr, XXH_alignment align)\n * @brief Like @ref XXH_readLE32(), but has an option for aligned reads.\n *\n * Affected by @ref XXH_FORCE_MEMORY_ACCESS.\n * Note that when @ref XXH_FORCE_ALIGN_CHECK == 0, the @p align parameter is\n * always @ref XXH_alignment::XXH_unaligned.\n *\n * @param ptr The pointer to read from.\n * @param align Whether @p ptr is aligned.\n * @pre\n *   If @p align == @ref XXH_alignment::XXH_aligned, @p ptr must be 4 byte\n *   aligned.\n * @return The 32-bit little endian integer from the bytes at @p ptr.\n */\n\n#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3))\n/*\n * Manual byteshift. Best for old compilers which don't inline memcpy.\n * We actually directly use XXH_readLE32 and XXH_readBE32.\n */\n#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2))\n\n/*\n * Force direct memory access. Only works on CPU which support unaligned memory\n * access in hardware.\n */\nstatic xxh_u32 XXH_read32(const void* memPtr) { return *(const xxh_u32*) memPtr; }\n\n#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1))\n\n/*\n * __attribute__((aligned(1))) is supported by gcc and clang. Originally the\n * documentation claimed that it only increased the alignment, but actually it\n * can decrease it on gcc, clang, and icc:\n * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69502,\n * https://gcc.godbolt.org/z/xYez1j67Y.\n */\n#ifdef XXH_OLD_NAMES\ntypedef union { xxh_u32 u32; } __attribute__((__packed__)) unalign;\n#endif\nstatic xxh_u32 XXH_read32(const void* ptr)\n{\n    typedef __attribute__((__aligned__(1))) xxh_u32 xxh_unalign32;\n    return *((const xxh_unalign32*)ptr);\n}\n\n#else\n\n/*\n * Portable and safe solution. Generally efficient.\n * see: https://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html\n */\nstatic xxh_u32 XXH_read32(const void* memPtr)\n{\n    xxh_u32 val;\n    XXH_memcpy(&val, memPtr, sizeof(val));\n    return val;\n}\n\n#endif   /* XXH_FORCE_DIRECT_MEMORY_ACCESS */\n\n\n/* ***   Endianness   *** */\n\n/*!\n * @ingroup tuning\n * @def XXH_CPU_LITTLE_ENDIAN\n * @brief Whether the target is little endian.\n *\n * Defined to 1 if the target is little endian, or 0 if it is big endian.\n * It can be defined externally, for example on the compiler command line.\n *\n * If it is not defined,\n * a runtime check (which is usually constant folded) is used instead.\n *\n * @note\n *   This is not necessarily defined to an integer constant.\n *\n * @see XXH_isLittleEndian() for the runtime check.\n */\n#ifndef XXH_CPU_LITTLE_ENDIAN\n/*\n * Try to detect endianness automatically, to avoid the nonstandard behavior\n * in `XXH_isLittleEndian()`\n */\n#  if defined(_WIN32) /* Windows is always little endian */ \\\n     || defined(__LITTLE_ENDIAN__) \\\n     || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)\n#    define XXH_CPU_LITTLE_ENDIAN 1\n#  elif defined(__BIG_ENDIAN__) \\\n     || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)\n#    define XXH_CPU_LITTLE_ENDIAN 0\n#  else\n/*!\n * @internal\n * @brief Runtime check for @ref XXH_CPU_LITTLE_ENDIAN.\n *\n * Most compilers will constant fold this.\n */\nstatic int XXH_isLittleEndian(void)\n{\n    /*\n     * Portable and well-defined behavior.\n     * Don't use static: it is detrimental to performance.\n     */\n    const union { xxh_u32 u; xxh_u8 c[4]; } one = { 1 };\n    return one.c[0];\n}\n#   define XXH_CPU_LITTLE_ENDIAN   XXH_isLittleEndian()\n#  endif\n#endif\n\n\n\n\n/* ****************************************\n*  Compiler-specific Functions and Macros\n******************************************/\n#define XXH_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)\n\n#ifdef __has_builtin\n#  define XXH_HAS_BUILTIN(x) __has_builtin(x)\n#else\n#  define XXH_HAS_BUILTIN(x) 0\n#endif\n\n\n\n/*\n * C23 and future versions have standard \"unreachable()\".\n * Once it has been implemented reliably we can add it as an\n * additional case:\n *\n * ```\n * #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= XXH_C23_VN)\n * #  include <stddef.h>\n * #  ifdef unreachable\n * #    define XXH_UNREACHABLE() unreachable()\n * #  endif\n * #endif\n * ```\n *\n * Note C++23 also has std::unreachable() which can be detected\n * as follows:\n * ```\n * #if defined(__cpp_lib_unreachable) && (__cpp_lib_unreachable >= 202202L)\n * #  include <utility>\n * #  define XXH_UNREACHABLE() std::unreachable()\n * #endif\n * ```\n * NB: `__cpp_lib_unreachable` is defined in the `<version>` header.\n * We don't use that as including `<utility>` in `extern \"C\"` blocks\n * doesn't work on GCC12\n */\n\n#if XXH_HAS_BUILTIN(__builtin_unreachable)\n#  define XXH_UNREACHABLE() __builtin_unreachable()\n\n#elif defined(_MSC_VER)\n#  define XXH_UNREACHABLE() __assume(0)\n\n#else\n#  define XXH_UNREACHABLE()\n#endif\n\n#if XXH_HAS_BUILTIN(__builtin_assume)\n#  define XXH_ASSUME(c) __builtin_assume(c)\n#else\n#  define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }\n#endif\n\n/*!\n * @internal\n * @def XXH_rotl32(x,r)\n * @brief 32-bit rotate left.\n *\n * @param x The 32-bit integer to be rotated.\n * @param r The number of bits to rotate.\n * @pre\n *   @p r > 0 && @p r < 32\n * @note\n *   @p x and @p r may be evaluated multiple times.\n * @return The rotated result.\n */\n#if !defined(NO_CLANG_BUILTIN) && XXH_HAS_BUILTIN(__builtin_rotateleft32) \\\n                               && XXH_HAS_BUILTIN(__builtin_rotateleft64)\n#  define XXH_rotl32 __builtin_rotateleft32\n#  define XXH_rotl64 __builtin_rotateleft64\n#elif XXH_HAS_BUILTIN(__builtin_stdc_rotate_left)\n#  define XXH_rotl32 __builtin_stdc_rotate_left\n#  define XXH_rotl64 __builtin_stdc_rotate_left\n/* Note: although _rotl exists for minGW (GCC under windows), performance seems poor */\n#elif defined(_MSC_VER)\n#  define XXH_rotl32(x,r) _rotl(x,r)\n#  define XXH_rotl64(x,r) _rotl64(x,r)\n#else\n#  define XXH_rotl32(x,r) (((x) << (r)) | ((x) >> (32 - (r))))\n#  define XXH_rotl64(x,r) (((x) << (r)) | ((x) >> (64 - (r))))\n#endif\n\n/*!\n * @internal\n * @fn xxh_u32 XXH_swap32(xxh_u32 x)\n * @brief A 32-bit byteswap.\n *\n * @param x The 32-bit integer to byteswap.\n * @return @p x, byteswapped.\n */\n#if defined(_MSC_VER)     /* Visual Studio */\n#  define XXH_swap32 _byteswap_ulong\n#elif XXH_GCC_VERSION >= 403\n#  define XXH_swap32 __builtin_bswap32\n#else\nstatic xxh_u32 XXH_swap32 (xxh_u32 x)\n{\n    return  ((x << 24) & 0xff000000 ) |\n            ((x <<  8) & 0x00ff0000 ) |\n            ((x >>  8) & 0x0000ff00 ) |\n            ((x >> 24) & 0x000000ff );\n}\n#endif\n\n\n/* ***************************\n*  Memory reads\n*****************************/\n\n/*!\n * @internal\n * @brief Enum to indicate whether a pointer is aligned.\n */\ntypedef enum {\n    XXH_aligned,  /*!< Aligned */\n    XXH_unaligned /*!< Possibly unaligned */\n} XXH_alignment;\n\n/*\n * XXH_FORCE_MEMORY_ACCESS==3 is an endian-independent byteshift load.\n *\n * This is ideal for older compilers which don't inline memcpy.\n */\n#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3))\n\nXXH_FORCE_INLINE xxh_u32 XXH_readLE32(const void* memPtr)\n{\n    const xxh_u8* bytePtr = (const xxh_u8 *)memPtr;\n    return bytePtr[0]\n         | ((xxh_u32)bytePtr[1] << 8)\n         | ((xxh_u32)bytePtr[2] << 16)\n         | ((xxh_u32)bytePtr[3] << 24);\n}\n\nXXH_FORCE_INLINE xxh_u32 XXH_readBE32(const void* memPtr)\n{\n    const xxh_u8* bytePtr = (const xxh_u8 *)memPtr;\n    return bytePtr[3]\n         | ((xxh_u32)bytePtr[2] << 8)\n         | ((xxh_u32)bytePtr[1] << 16)\n         | ((xxh_u32)bytePtr[0] << 24);\n}\n\n#else\nXXH_FORCE_INLINE xxh_u32 XXH_readLE32(const void* ptr)\n{\n    return XXH_CPU_LITTLE_ENDIAN ? XXH_read32(ptr) : XXH_swap32(XXH_read32(ptr));\n}\n\nstatic xxh_u32 XXH_readBE32(const void* ptr)\n{\n    return XXH_CPU_LITTLE_ENDIAN ? XXH_swap32(XXH_read32(ptr)) : XXH_read32(ptr);\n}\n#endif\n\nXXH_FORCE_INLINE xxh_u32\nXXH_readLE32_align(const void* ptr, XXH_alignment align)\n{\n    if (align==XXH_unaligned) {\n        return XXH_readLE32(ptr);\n    } else {\n        return XXH_CPU_LITTLE_ENDIAN ? *(const xxh_u32*)ptr : XXH_swap32(*(const xxh_u32*)ptr);\n    }\n}\n\n\n/* *************************************\n*  Misc\n***************************************/\n/*! @ingroup public */\nXXH_PUBLIC_API unsigned XXH_versionNumber (void) { return XXH_VERSION_NUMBER; }\n\n\n/* *******************************************************************\n*  32-bit hash functions\n*********************************************************************/\n/*!\n * @}\n * @defgroup XXH32_impl XXH32 implementation\n * @ingroup impl\n *\n * Details on the XXH32 implementation.\n * @{\n */\n /* #define instead of static const, to be used as initializers */\n#define XXH_PRIME32_1  0x9E3779B1U  /*!< 0b10011110001101110111100110110001 */\n#define XXH_PRIME32_2  0x85EBCA77U  /*!< 0b10000101111010111100101001110111 */\n#define XXH_PRIME32_3  0xC2B2AE3DU  /*!< 0b11000010101100101010111000111101 */\n#define XXH_PRIME32_4  0x27D4EB2FU  /*!< 0b00100111110101001110101100101111 */\n#define XXH_PRIME32_5  0x165667B1U  /*!< 0b00010110010101100110011110110001 */\n\n#ifdef XXH_OLD_NAMES\n#  define PRIME32_1 XXH_PRIME32_1\n#  define PRIME32_2 XXH_PRIME32_2\n#  define PRIME32_3 XXH_PRIME32_3\n#  define PRIME32_4 XXH_PRIME32_4\n#  define PRIME32_5 XXH_PRIME32_5\n#endif\n\n/*!\n * @internal\n * @brief Normal stripe processing routine.\n *\n * This shuffles the bits so that any bit from @p input impacts several bits in\n * @p acc.\n *\n * @param acc The accumulator lane.\n * @param input The stripe of input to mix.\n * @return The mixed accumulator lane.\n */\nstatic xxh_u32 XXH32_round(xxh_u32 acc, xxh_u32 input)\n{\n    acc += input * XXH_PRIME32_2;\n    acc  = XXH_rotl32(acc, 13);\n    acc *= XXH_PRIME32_1;\n#if (defined(__SSE4_1__) || defined(__aarch64__) || defined(__wasm_simd128__)) && !defined(XXH_ENABLE_AUTOVECTORIZE)\n    /*\n     * UGLY HACK:\n     * A compiler fence is used to prevent GCC and Clang from\n     * autovectorizing the XXH32 loop (pragmas and attributes don't work for some\n     * reason) without globally disabling SSE4.1.\n     *\n     * The reason we want to avoid vectorization is because despite working on\n     * 4 integers at a time, there are multiple factors slowing XXH32 down on\n     * SSE4:\n     * - There's a ridiculous amount of lag from pmulld (10 cycles of latency on\n     *   newer chips!) making it slightly slower to multiply four integers at\n     *   once compared to four integers independently. Even when pmulld was\n     *   fastest, Sandy/Ivy Bridge, it is still not worth it to go into SSE\n     *   just to multiply unless doing a long operation.\n     *\n     * - Four instructions are required to rotate,\n     *      movqda tmp,  v // not required with VEX encoding\n     *      pslld  tmp, 13 // tmp <<= 13\n     *      psrld  v,   19 // x >>= 19\n     *      por    v,  tmp // x |= tmp\n     *   compared to one for scalar:\n     *      roll   v, 13    // reliably fast across the board\n     *      shldl  v, v, 13 // Sandy Bridge and later prefer this for some reason\n     *\n     * - Instruction level parallelism is actually more beneficial here because\n     *   the SIMD actually serializes this operation: While v1 is rotating, v2\n     *   can load data, while v3 can multiply. SSE forces them to operate\n     *   together.\n     *\n     * This is also enabled on AArch64, as Clang is *very aggressive* in vectorizing\n     * the loop. NEON is only faster on the A53, and with the newer cores, it is less\n     * than half the speed.\n     *\n     * Additionally, this is used on WASM SIMD128 because it JITs to the same\n     * SIMD instructions and has the same issue.\n     */\n    XXH_COMPILER_GUARD(acc);\n#endif\n    return acc;\n}\n\n/*!\n * @internal\n * @brief Mixes all bits to finalize the hash.\n *\n * The final mix ensures that all input bits have a chance to impact any bit in\n * the output digest, resulting in an unbiased distribution.\n *\n * @param hash The hash to avalanche.\n * @return The avalanched hash.\n */\nstatic xxh_u32 XXH32_avalanche(xxh_u32 hash)\n{\n    hash ^= hash >> 15;\n    hash *= XXH_PRIME32_2;\n    hash ^= hash >> 13;\n    hash *= XXH_PRIME32_3;\n    hash ^= hash >> 16;\n    return hash;\n}\n\n#define XXH_get32bits(p) XXH_readLE32_align(p, align)\n\n/*!\n * @internal\n * @brief Sets up the initial accumulator state for XXH32().\n */\nXXH_FORCE_INLINE void\nXXH32_initAccs(xxh_u32 *acc, xxh_u32 seed)\n{\n    XXH_ASSERT(acc != NULL);\n    acc[0] = seed + XXH_PRIME32_1 + XXH_PRIME32_2;\n    acc[1] = seed + XXH_PRIME32_2;\n    acc[2] = seed + 0;\n    acc[3] = seed - XXH_PRIME32_1;\n}\n\n/*!\n * @internal\n * @brief Consumes a block of data for XXH32().\n *\n * @return the end input pointer.\n */\nXXH_FORCE_INLINE const xxh_u8 *\nXXH32_consumeLong(\n    xxh_u32 *XXH_RESTRICT acc,\n    xxh_u8 const *XXH_RESTRICT input,\n    size_t len,\n    XXH_alignment align\n)\n{\n    const xxh_u8* const bEnd = input + len;\n    const xxh_u8* const limit = bEnd - 15;\n    XXH_ASSERT(acc != NULL);\n    XXH_ASSERT(input != NULL);\n    XXH_ASSERT(len >= 16);\n    do {\n        acc[0] = XXH32_round(acc[0], XXH_get32bits(input)); input += 4;\n        acc[1] = XXH32_round(acc[1], XXH_get32bits(input)); input += 4;\n        acc[2] = XXH32_round(acc[2], XXH_get32bits(input)); input += 4;\n        acc[3] = XXH32_round(acc[3], XXH_get32bits(input)); input += 4;\n    } while (input < limit);\n\n    return input;\n}\n\n/*!\n * @internal\n * @brief Merges the accumulator lanes together for XXH32()\n */\nXXH_FORCE_INLINE XXH_PUREF xxh_u32\nXXH32_mergeAccs(const xxh_u32 *acc)\n{\n    XXH_ASSERT(acc != NULL);\n    return XXH_rotl32(acc[0], 1)  + XXH_rotl32(acc[1], 7)\n         + XXH_rotl32(acc[2], 12) + XXH_rotl32(acc[3], 18);\n}\n\n/*!\n * @internal\n * @brief Processes the last 0-15 bytes of @p ptr.\n *\n * There may be up to 15 bytes remaining to consume from the input.\n * This final stage will digest them to ensure that all input bytes are present\n * in the final mix.\n *\n * @param hash The hash to finalize.\n * @param ptr The pointer to the remaining input.\n * @param len The remaining length, modulo 16.\n * @param align Whether @p ptr is aligned.\n * @return The finalized hash.\n * @see XXH64_finalize().\n */\nstatic XXH_PUREF xxh_u32\nXXH32_finalize(xxh_u32 hash, const xxh_u8* ptr, size_t len, XXH_alignment align)\n{\n#define XXH_PROCESS1 do {                             \\\n    hash += (*ptr++) * XXH_PRIME32_5;                 \\\n    hash = XXH_rotl32(hash, 11) * XXH_PRIME32_1;      \\\n} while (0)\n\n#define XXH_PROCESS4 do {                             \\\n    hash += XXH_get32bits(ptr) * XXH_PRIME32_3;       \\\n    ptr += 4;                                         \\\n    hash  = XXH_rotl32(hash, 17) * XXH_PRIME32_4;     \\\n} while (0)\n\n    if (ptr==NULL) XXH_ASSERT(len == 0);\n\n    /* Compact rerolled version; generally faster */\n    if (!XXH32_ENDJMP) {\n        len &= 15;\n        while (len >= 4) {\n            XXH_PROCESS4;\n            len -= 4;\n        }\n        while (len > 0) {\n            XXH_PROCESS1;\n            --len;\n        }\n        return XXH32_avalanche(hash);\n    } else {\n         switch(len&15) /* or switch(bEnd - p) */ {\n           case 12:      XXH_PROCESS4;\n                         XXH_FALLTHROUGH;  /* fallthrough */\n           case 8:       XXH_PROCESS4;\n                         XXH_FALLTHROUGH;  /* fallthrough */\n           case 4:       XXH_PROCESS4;\n                         return XXH32_avalanche(hash);\n\n           case 13:      XXH_PROCESS4;\n                         XXH_FALLTHROUGH;  /* fallthrough */\n           case 9:       XXH_PROCESS4;\n                         XXH_FALLTHROUGH;  /* fallthrough */\n           case 5:       XXH_PROCESS4;\n                         XXH_PROCESS1;\n                         return XXH32_avalanche(hash);\n\n           case 14:      XXH_PROCESS4;\n                         XXH_FALLTHROUGH;  /* fallthrough */\n           case 10:      XXH_PROCESS4;\n                         XXH_FALLTHROUGH;  /* fallthrough */\n           case 6:       XXH_PROCESS4;\n                         XXH_PROCESS1;\n                         XXH_PROCESS1;\n                         return XXH32_avalanche(hash);\n\n           case 15:      XXH_PROCESS4;\n                         XXH_FALLTHROUGH;  /* fallthrough */\n           case 11:      XXH_PROCESS4;\n                         XXH_FALLTHROUGH;  /* fallthrough */\n           case 7:       XXH_PROCESS4;\n                         XXH_FALLTHROUGH;  /* fallthrough */\n           case 3:       XXH_PROCESS1;\n                         XXH_FALLTHROUGH;  /* fallthrough */\n           case 2:       XXH_PROCESS1;\n                         XXH_FALLTHROUGH;  /* fallthrough */\n           case 1:       XXH_PROCESS1;\n                         XXH_FALLTHROUGH;  /* fallthrough */\n           case 0:       return XXH32_avalanche(hash);\n        }\n        XXH_ASSERT(0);\n        return hash;   /* reaching this point is deemed impossible */\n    }\n}\n\n#ifdef XXH_OLD_NAMES\n#  define PROCESS1 XXH_PROCESS1\n#  define PROCESS4 XXH_PROCESS4\n#else\n#  undef XXH_PROCESS1\n#  undef XXH_PROCESS4\n#endif\n\n/*!\n * @internal\n * @brief The implementation for @ref XXH32().\n *\n * @param input , len , seed Directly passed from @ref XXH32().\n * @param align Whether @p input is aligned.\n * @return The calculated hash.\n */\nXXH_FORCE_INLINE XXH_PUREF xxh_u32\nXXH32_endian_align(const xxh_u8* input, size_t len, xxh_u32 seed, XXH_alignment align)\n{\n    xxh_u32 h32;\n\n    if (input==NULL) XXH_ASSERT(len == 0);\n\n    if (len>=16) {\n        xxh_u32 acc[4];\n        XXH32_initAccs(acc, seed);\n\n        input = XXH32_consumeLong(acc, input, len, align);\n\n        h32 = XXH32_mergeAccs(acc);\n    } else {\n        h32  = seed + XXH_PRIME32_5;\n    }\n\n    h32 += (xxh_u32)len;\n\n    return XXH32_finalize(h32, input, len&15, align);\n}\n\n/*! @ingroup XXH32_family */\nXXH_PUBLIC_API XXH32_hash_t XXH32 (const void* input, size_t len, XXH32_hash_t seed)\n{\n#if !defined(XXH_NO_STREAM) && XXH_SIZE_OPT >= 2\n    /* Simple version, good for code maintenance, but unfortunately slow for small inputs */\n    XXH32_state_t state;\n    XXH32_reset(&state, seed);\n    XXH32_update(&state, (const xxh_u8*)input, len);\n    return XXH32_digest(&state);\n#else\n    if (XXH_FORCE_ALIGN_CHECK) {\n        if ((((size_t)input) & 3) == 0) {   /* Input is 4-bytes aligned, leverage the speed benefit */\n            return XXH32_endian_align((const xxh_u8*)input, len, seed, XXH_aligned);\n    }   }\n\n    return XXH32_endian_align((const xxh_u8*)input, len, seed, XXH_unaligned);\n#endif\n}\n\n\n\n/*******   Hash streaming   *******/\n#ifndef XXH_NO_STREAM\n/*! @ingroup XXH32_family */\nXXH_PUBLIC_API XXH32_state_t* XXH32_createState(void)\n{\n    return (XXH32_state_t*)XXH_malloc(sizeof(XXH32_state_t));\n}\n/*! @ingroup XXH32_family */\nXXH_PUBLIC_API XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr)\n{\n    XXH_free(statePtr);\n    return XXH_OK;\n}\n\n/*! @ingroup XXH32_family */\nXXH_PUBLIC_API void XXH32_copyState(XXH32_state_t* dstState, const XXH32_state_t* srcState)\n{\n    XXH_memcpy(dstState, srcState, sizeof(*dstState));\n}\n\n/*! @ingroup XXH32_family */\nXXH_PUBLIC_API XXH_errorcode XXH32_reset(XXH32_state_t* statePtr, XXH32_hash_t seed)\n{\n    XXH_ASSERT(statePtr != NULL);\n    memset(statePtr, 0, sizeof(*statePtr));\n    XXH32_initAccs(statePtr->acc, seed);\n    return XXH_OK;\n}\n\n\n/*! @ingroup XXH32_family */\nXXH_PUBLIC_API XXH_errorcode\nXXH32_update(XXH32_state_t* state, const void* input, size_t len)\n{\n    if (input==NULL) {\n        XXH_ASSERT(len == 0);\n        return XXH_OK;\n    }\n\n    state->total_len_32 += (XXH32_hash_t)len;\n    state->large_len |= (XXH32_hash_t)((len>=16) | (state->total_len_32>=16));\n\n    XXH_ASSERT(state->bufferedSize < sizeof(state->buffer));\n    if (len < sizeof(state->buffer) - state->bufferedSize)  {   /* fill in tmp buffer */\n        XXH_memcpy(state->buffer + state->bufferedSize, input, len);\n        state->bufferedSize += (XXH32_hash_t)len;\n        return XXH_OK;\n    }\n\n    {   const xxh_u8* xinput = (const xxh_u8*)input;\n        const xxh_u8* const bEnd = xinput + len;\n\n        if (state->bufferedSize) {   /* non-empty buffer: complete first */\n            XXH_memcpy(state->buffer + state->bufferedSize, xinput, sizeof(state->buffer) - state->bufferedSize);\n            xinput += sizeof(state->buffer) - state->bufferedSize;\n            /* then process one round */\n            (void)XXH32_consumeLong(state->acc, state->buffer, sizeof(state->buffer), XXH_aligned);\n            state->bufferedSize = 0;\n        }\n\n        XXH_ASSERT(xinput <= bEnd);\n        if ((size_t)(bEnd - xinput) >= sizeof(state->buffer)) {\n            /* Process the remaining data */\n            xinput = XXH32_consumeLong(state->acc, xinput, (size_t)(bEnd - xinput), XXH_unaligned);\n        }\n\n        if (xinput < bEnd) {\n            /* Copy the leftover to the tmp buffer */\n            XXH_memcpy(state->buffer, xinput, (size_t)(bEnd-xinput));\n            state->bufferedSize = (unsigned)(bEnd-xinput);\n        }\n    }\n\n    return XXH_OK;\n}\n\n\n/*! @ingroup XXH32_family */\nXXH_PUBLIC_API XXH32_hash_t XXH32_digest(const XXH32_state_t* state)\n{\n    xxh_u32 h32;\n\n    if (state->large_len) {\n        h32 = XXH32_mergeAccs(state->acc);\n    } else {\n        h32 = state->acc[2] /* == seed */ + XXH_PRIME32_5;\n    }\n\n    h32 += state->total_len_32;\n\n    return XXH32_finalize(h32, state->buffer, state->bufferedSize, XXH_aligned);\n}\n#endif /* !XXH_NO_STREAM */\n\n/*******   Canonical representation   *******/\n\n/*! @ingroup XXH32_family */\nXXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t* dst, XXH32_hash_t hash)\n{\n    XXH_STATIC_ASSERT(sizeof(XXH32_canonical_t) == sizeof(XXH32_hash_t));\n    if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap32(hash);\n    XXH_memcpy(dst, &hash, sizeof(*dst));\n}\n/*! @ingroup XXH32_family */\nXXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t* src)\n{\n    return XXH_readBE32(src);\n}\n\n\n#ifndef XXH_NO_LONG_LONG\n\n/* *******************************************************************\n*  64-bit hash functions\n*********************************************************************/\n/*!\n * @}\n * @ingroup impl\n * @{\n */\n/*******   Memory access   *******/\n\ntypedef XXH64_hash_t xxh_u64;\n\n#ifdef XXH_OLD_NAMES\n#  define U64 xxh_u64\n#endif\n\n#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3))\n/*\n * Manual byteshift. Best for old compilers which don't inline memcpy.\n * We actually directly use XXH_readLE64 and XXH_readBE64.\n */\n#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2))\n\n/* Force direct memory access. Only works on CPU which support unaligned memory access in hardware */\nstatic xxh_u64 XXH_read64(const void* memPtr)\n{\n    return *(const xxh_u64*) memPtr;\n}\n\n#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1))\n\n/*\n * __attribute__((aligned(1))) is supported by gcc and clang. Originally the\n * documentation claimed that it only increased the alignment, but actually it\n * can decrease it on gcc, clang, and icc:\n * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69502,\n * https://gcc.godbolt.org/z/xYez1j67Y.\n */\n#ifdef XXH_OLD_NAMES\ntypedef union { xxh_u32 u32; xxh_u64 u64; } __attribute__((__packed__)) unalign64;\n#endif\nstatic xxh_u64 XXH_read64(const void* ptr)\n{\n    typedef __attribute__((__aligned__(1))) xxh_u64 xxh_unalign64;\n    return *((const xxh_unalign64*)ptr);\n}\n\n#else\n\n/*\n * Portable and safe solution. Generally efficient.\n * see: https://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html\n */\nstatic xxh_u64 XXH_read64(const void* memPtr)\n{\n    xxh_u64 val;\n    XXH_memcpy(&val, memPtr, sizeof(val));\n    return val;\n}\n\n#endif   /* XXH_FORCE_DIRECT_MEMORY_ACCESS */\n\n#if defined(_MSC_VER)     /* Visual Studio */\n#  define XXH_swap64 _byteswap_uint64\n#elif XXH_GCC_VERSION >= 403\n#  define XXH_swap64 __builtin_bswap64\n#else\nstatic xxh_u64 XXH_swap64(xxh_u64 x)\n{\n    return  ((x << 56) & 0xff00000000000000ULL) |\n            ((x << 40) & 0x00ff000000000000ULL) |\n            ((x << 24) & 0x0000ff0000000000ULL) |\n            ((x << 8)  & 0x000000ff00000000ULL) |\n            ((x >> 8)  & 0x00000000ff000000ULL) |\n            ((x >> 24) & 0x0000000000ff0000ULL) |\n            ((x >> 40) & 0x000000000000ff00ULL) |\n            ((x >> 56) & 0x00000000000000ffULL);\n}\n#endif\n\n\n/* XXH_FORCE_MEMORY_ACCESS==3 is an endian-independent byteshift load. */\n#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3))\n\nXXH_FORCE_INLINE xxh_u64 XXH_readLE64(const void* memPtr)\n{\n    const xxh_u8* bytePtr = (const xxh_u8 *)memPtr;\n    return bytePtr[0]\n         | ((xxh_u64)bytePtr[1] << 8)\n         | ((xxh_u64)bytePtr[2] << 16)\n         | ((xxh_u64)bytePtr[3] << 24)\n         | ((xxh_u64)bytePtr[4] << 32)\n         | ((xxh_u64)bytePtr[5] << 40)\n         | ((xxh_u64)bytePtr[6] << 48)\n         | ((xxh_u64)bytePtr[7] << 56);\n}\n\nXXH_FORCE_INLINE xxh_u64 XXH_readBE64(const void* memPtr)\n{\n    const xxh_u8* bytePtr = (const xxh_u8 *)memPtr;\n    return bytePtr[7]\n         | ((xxh_u64)bytePtr[6] << 8)\n         | ((xxh_u64)bytePtr[5] << 16)\n         | ((xxh_u64)bytePtr[4] << 24)\n         | ((xxh_u64)bytePtr[3] << 32)\n         | ((xxh_u64)bytePtr[2] << 40)\n         | ((xxh_u64)bytePtr[1] << 48)\n         | ((xxh_u64)bytePtr[0] << 56);\n}\n\n#else\nXXH_FORCE_INLINE xxh_u64 XXH_readLE64(const void* ptr)\n{\n    return XXH_CPU_LITTLE_ENDIAN ? XXH_read64(ptr) : XXH_swap64(XXH_read64(ptr));\n}\n\nstatic xxh_u64 XXH_readBE64(const void* ptr)\n{\n    return XXH_CPU_LITTLE_ENDIAN ? XXH_swap64(XXH_read64(ptr)) : XXH_read64(ptr);\n}\n#endif\n\nXXH_FORCE_INLINE xxh_u64\nXXH_readLE64_align(const void* ptr, XXH_alignment align)\n{\n    if (align==XXH_unaligned)\n        return XXH_readLE64(ptr);\n    else\n        return XXH_CPU_LITTLE_ENDIAN ? *(const xxh_u64*)ptr : XXH_swap64(*(const xxh_u64*)ptr);\n}\n\n\n/*******   xxh64   *******/\n/*!\n * @}\n * @defgroup XXH64_impl XXH64 implementation\n * @ingroup impl\n *\n * Details on the XXH64 implementation.\n * @{\n */\n/* #define rather that static const, to be used as initializers */\n#define XXH_PRIME64_1  0x9E3779B185EBCA87ULL  /*!< 0b1001111000110111011110011011000110000101111010111100101010000111 */\n#define XXH_PRIME64_2  0xC2B2AE3D27D4EB4FULL  /*!< 0b1100001010110010101011100011110100100111110101001110101101001111 */\n#define XXH_PRIME64_3  0x165667B19E3779F9ULL  /*!< 0b0001011001010110011001111011000110011110001101110111100111111001 */\n#define XXH_PRIME64_4  0x85EBCA77C2B2AE63ULL  /*!< 0b1000010111101011110010100111011111000010101100101010111001100011 */\n#define XXH_PRIME64_5  0x27D4EB2F165667C5ULL  /*!< 0b0010011111010100111010110010111100010110010101100110011111000101 */\n\n#ifdef XXH_OLD_NAMES\n#  define PRIME64_1 XXH_PRIME64_1\n#  define PRIME64_2 XXH_PRIME64_2\n#  define PRIME64_3 XXH_PRIME64_3\n#  define PRIME64_4 XXH_PRIME64_4\n#  define PRIME64_5 XXH_PRIME64_5\n#endif\n\n/*! @copydoc XXH32_round */\nstatic xxh_u64 XXH64_round(xxh_u64 acc, xxh_u64 input)\n{\n    acc += input * XXH_PRIME64_2;\n    acc  = XXH_rotl64(acc, 31);\n    acc *= XXH_PRIME64_1;\n#if (defined(__AVX512F__)) && !defined(XXH_ENABLE_AUTOVECTORIZE)\n    /*\n     * DISABLE AUTOVECTORIZATION:\n     * A compiler fence is used to prevent GCC and Clang from\n     * autovectorizing the XXH64 loop (pragmas and attributes don't work for some\n     * reason) without globally disabling AVX512.\n     *\n     * Autovectorization of XXH64 tends to be detrimental,\n     * though the exact outcome may change depending on exact cpu and compiler version.\n     * For information, it has been reported as detrimental for Skylake-X,\n     * but possibly beneficial for Zen4.\n     *\n     * The default is to disable auto-vectorization,\n     * but you can select to enable it instead using `XXH_ENABLE_AUTOVECTORIZE` build variable.\n     */\n    XXH_COMPILER_GUARD(acc);\n#endif\n    return acc;\n}\n\nstatic xxh_u64 XXH64_mergeRound(xxh_u64 acc, xxh_u64 val)\n{\n    val  = XXH64_round(0, val);\n    acc ^= val;\n    acc  = acc * XXH_PRIME64_1 + XXH_PRIME64_4;\n    return acc;\n}\n\n/*! @copydoc XXH32_avalanche */\nstatic xxh_u64 XXH64_avalanche(xxh_u64 hash)\n{\n    hash ^= hash >> 33;\n    hash *= XXH_PRIME64_2;\n    hash ^= hash >> 29;\n    hash *= XXH_PRIME64_3;\n    hash ^= hash >> 32;\n    return hash;\n}\n\n\n#define XXH_get64bits(p) XXH_readLE64_align(p, align)\n\n/*!\n * @internal\n * @brief Sets up the initial accumulator state for XXH64().\n */\nXXH_FORCE_INLINE void\nXXH64_initAccs(xxh_u64 *acc, xxh_u64 seed)\n{\n    XXH_ASSERT(acc != NULL);\n    acc[0] = seed + XXH_PRIME64_1 + XXH_PRIME64_2;\n    acc[1] = seed + XXH_PRIME64_2;\n    acc[2] = seed + 0;\n    acc[3] = seed - XXH_PRIME64_1;\n}\n\n/*!\n * @internal\n * @brief Consumes a block of data for XXH64().\n *\n * @return the end input pointer.\n */\nXXH_FORCE_INLINE const xxh_u8 *\nXXH64_consumeLong(\n    xxh_u64 *XXH_RESTRICT acc,\n    xxh_u8 const *XXH_RESTRICT input,\n    size_t len,\n    XXH_alignment align\n)\n{\n    const xxh_u8* const bEnd = input + len;\n    const xxh_u8* const limit = bEnd - 31;\n    XXH_ASSERT(acc != NULL);\n    XXH_ASSERT(input != NULL);\n    XXH_ASSERT(len >= 32);\n    do {\n        /* reroll on 32-bit */\n        if (sizeof(void *) < sizeof(xxh_u64)) {\n            size_t i;\n            for (i = 0; i < 4; i++) {\n                acc[i] = XXH64_round(acc[i], XXH_get64bits(input));\n                input += 8;\n            }\n        } else {\n            acc[0] = XXH64_round(acc[0], XXH_get64bits(input)); input += 8;\n            acc[1] = XXH64_round(acc[1], XXH_get64bits(input)); input += 8;\n            acc[2] = XXH64_round(acc[2], XXH_get64bits(input)); input += 8;\n            acc[3] = XXH64_round(acc[3], XXH_get64bits(input)); input += 8;\n        }\n    } while (input < limit);\n\n    return input;\n}\n\n/*!\n * @internal\n * @brief Merges the accumulator lanes together for XXH64()\n */\nXXH_FORCE_INLINE XXH_PUREF xxh_u64\nXXH64_mergeAccs(const xxh_u64 *acc)\n{\n    XXH_ASSERT(acc != NULL);\n    {\n        xxh_u64 h64 = XXH_rotl64(acc[0], 1) + XXH_rotl64(acc[1], 7)\n                    + XXH_rotl64(acc[2], 12) + XXH_rotl64(acc[3], 18);\n        /* reroll on 32-bit */\n        if (sizeof(void *) < sizeof(xxh_u64)) {\n            size_t i;\n            for (i = 0; i < 4; i++) {\n                h64 = XXH64_mergeRound(h64, acc[i]);\n            }\n        } else {\n            h64 = XXH64_mergeRound(h64, acc[0]);\n            h64 = XXH64_mergeRound(h64, acc[1]);\n            h64 = XXH64_mergeRound(h64, acc[2]);\n            h64 = XXH64_mergeRound(h64, acc[3]);\n        }\n        return h64;\n    }\n}\n\n/*!\n * @internal\n * @brief Processes the last 0-31 bytes of @p ptr.\n *\n * There may be up to 31 bytes remaining to consume from the input.\n * This final stage will digest them to ensure that all input bytes are present\n * in the final mix.\n *\n * @param hash The hash to finalize.\n * @param ptr The pointer to the remaining input.\n * @param len The remaining length, modulo 32.\n * @param align Whether @p ptr is aligned.\n * @return The finalized hash\n * @see XXH32_finalize().\n */\nXXH_STATIC XXH_PUREF xxh_u64\nXXH64_finalize(xxh_u64 hash, const xxh_u8* ptr, size_t len, XXH_alignment align)\n{\n    if (ptr==NULL) XXH_ASSERT(len == 0);\n    len &= 31;\n    while (len >= 8) {\n        xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr));\n        ptr += 8;\n        hash ^= k1;\n        hash  = XXH_rotl64(hash,27) * XXH_PRIME64_1 + XXH_PRIME64_4;\n        len -= 8;\n    }\n    if (len >= 4) {\n        hash ^= (xxh_u64)(XXH_get32bits(ptr)) * XXH_PRIME64_1;\n        ptr += 4;\n        hash = XXH_rotl64(hash, 23) * XXH_PRIME64_2 + XXH_PRIME64_3;\n        len -= 4;\n    }\n    while (len > 0) {\n        hash ^= (*ptr++) * XXH_PRIME64_5;\n        hash = XXH_rotl64(hash, 11) * XXH_PRIME64_1;\n        --len;\n    }\n    return  XXH64_avalanche(hash);\n}\n\n#ifdef XXH_OLD_NAMES\n#  define PROCESS1_64 XXH_PROCESS1_64\n#  define PROCESS4_64 XXH_PROCESS4_64\n#  define PROCESS8_64 XXH_PROCESS8_64\n#else\n#  undef XXH_PROCESS1_64\n#  undef XXH_PROCESS4_64\n#  undef XXH_PROCESS8_64\n#endif\n\n/*!\n * @internal\n * @brief The implementation for @ref XXH64().\n *\n * @param input , len , seed Directly passed from @ref XXH64().\n * @param align Whether @p input is aligned.\n * @return The calculated hash.\n */\nXXH_FORCE_INLINE XXH_PUREF xxh_u64\nXXH64_endian_align(const xxh_u8* input, size_t len, xxh_u64 seed, XXH_alignment align)\n{\n    xxh_u64 h64;\n    if (input==NULL) XXH_ASSERT(len == 0);\n\n    if (len>=32) {  /* Process a large block of data */\n        xxh_u64 acc[4];\n        XXH64_initAccs(acc, seed);\n\n        input = XXH64_consumeLong(acc, input, len, align);\n\n        h64 = XXH64_mergeAccs(acc);\n    } else {\n        h64  = seed + XXH_PRIME64_5;\n    }\n\n    h64 += (xxh_u64) len;\n\n    return XXH64_finalize(h64, input, len, align);\n}\n\n\n/*! @ingroup XXH64_family */\nXXH_PUBLIC_API XXH64_hash_t XXH64 (XXH_NOESCAPE const void* input, size_t len, XXH64_hash_t seed)\n{\n#if !defined(XXH_NO_STREAM) && XXH_SIZE_OPT >= 2\n    /* Simple version, good for code maintenance, but unfortunately slow for small inputs */\n    XXH64_state_t state;\n    XXH64_reset(&state, seed);\n    XXH64_update(&state, (const xxh_u8*)input, len);\n    return XXH64_digest(&state);\n#else\n    if (XXH_FORCE_ALIGN_CHECK) {\n        if ((((size_t)input) & 7)==0) {  /* Input is aligned, let's leverage the speed advantage */\n            return XXH64_endian_align((const xxh_u8*)input, len, seed, XXH_aligned);\n    }   }\n\n    return XXH64_endian_align((const xxh_u8*)input, len, seed, XXH_unaligned);\n\n#endif\n}\n\n/*******   Hash Streaming   *******/\n#ifndef XXH_NO_STREAM\n/*! @ingroup XXH64_family*/\nXXH_PUBLIC_API XXH64_state_t* XXH64_createState(void)\n{\n    return (XXH64_state_t*)XXH_malloc(sizeof(XXH64_state_t));\n}\n/*! @ingroup XXH64_family */\nXXH_PUBLIC_API XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr)\n{\n    XXH_free(statePtr);\n    return XXH_OK;\n}\n\n/*! @ingroup XXH64_family */\nXXH_PUBLIC_API void XXH64_copyState(XXH_NOESCAPE XXH64_state_t* dstState, const XXH64_state_t* srcState)\n{\n    XXH_memcpy(dstState, srcState, sizeof(*dstState));\n}\n\n/*! @ingroup XXH64_family */\nXXH_PUBLIC_API XXH_errorcode XXH64_reset(XXH_NOESCAPE XXH64_state_t* statePtr, XXH64_hash_t seed)\n{\n    XXH_ASSERT(statePtr != NULL);\n    memset(statePtr, 0, sizeof(*statePtr));\n    XXH64_initAccs(statePtr->acc, seed);\n    return XXH_OK;\n}\n\n/*! @ingroup XXH64_family */\nXXH_PUBLIC_API XXH_errorcode\nXXH64_update (XXH_NOESCAPE XXH64_state_t* state, XXH_NOESCAPE const void* input, size_t len)\n{\n    if (input==NULL) {\n        XXH_ASSERT(len == 0);\n        return XXH_OK;\n    }\n\n    state->total_len += len;\n\n    XXH_ASSERT(state->bufferedSize <= sizeof(state->buffer));\n    if (len < sizeof(state->buffer) - state->bufferedSize)  {   /* fill in tmp buffer */\n        XXH_memcpy(state->buffer + state->bufferedSize, input, len);\n        state->bufferedSize += (XXH32_hash_t)len;\n        return XXH_OK;\n    }\n\n    {   const xxh_u8* xinput = (const xxh_u8*)input;\n        const xxh_u8* const bEnd = xinput + len;\n\n        if (state->bufferedSize) {   /* non-empty buffer => complete first */\n            XXH_memcpy(state->buffer + state->bufferedSize, xinput, sizeof(state->buffer) - state->bufferedSize);\n            xinput += sizeof(state->buffer) - state->bufferedSize;\n            /* and process one round */\n            (void)XXH64_consumeLong(state->acc, state->buffer, sizeof(state->buffer), XXH_aligned);\n            state->bufferedSize = 0;\n        }\n\n        XXH_ASSERT(xinput <= bEnd);\n        if ((size_t)(bEnd - xinput) >= sizeof(state->buffer)) {\n            /* Process the remaining data */\n            xinput = XXH64_consumeLong(state->acc, xinput, (size_t)(bEnd - xinput), XXH_unaligned);\n        }\n\n        if (xinput < bEnd) {\n            /* Copy the leftover to the tmp buffer */\n            XXH_memcpy(state->buffer, xinput, (size_t)(bEnd-xinput));\n            state->bufferedSize = (unsigned)(bEnd-xinput);\n        }\n    }\n\n    return XXH_OK;\n}\n\n\n/*! @ingroup XXH64_family */\nXXH_PUBLIC_API XXH64_hash_t XXH64_digest(XXH_NOESCAPE const XXH64_state_t* state)\n{\n    xxh_u64 h64;\n\n    if (state->total_len >= 32) {\n        h64 = XXH64_mergeAccs(state->acc);\n    } else {\n        h64  = state->acc[2] /*seed*/ + XXH_PRIME64_5;\n    }\n\n    h64 += (xxh_u64) state->total_len;\n\n    return XXH64_finalize(h64, state->buffer, (size_t)state->total_len, XXH_aligned);\n}\n#endif /* !XXH_NO_STREAM */\n\n/******* Canonical representation   *******/\n\n/*! @ingroup XXH64_family */\nXXH_PUBLIC_API void XXH64_canonicalFromHash(XXH_NOESCAPE XXH64_canonical_t* dst, XXH64_hash_t hash)\n{\n    XXH_STATIC_ASSERT(sizeof(XXH64_canonical_t) == sizeof(XXH64_hash_t));\n    if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap64(hash);\n    XXH_memcpy(dst, &hash, sizeof(*dst));\n}\n\n/*! @ingroup XXH64_family */\nXXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const XXH64_canonical_t* src)\n{\n    return XXH_readBE64(src);\n}\n\n#ifndef XXH_NO_XXH3\n\n/* *********************************************************************\n*  XXH3\n*  New generation hash designed for speed on small keys and vectorization\n************************************************************************ */\n/*!\n * @}\n * @defgroup XXH3_impl XXH3 implementation\n * @ingroup impl\n * @{\n */\n\n/* ===   Compiler specifics   === */\n\n\n#if (defined(__GNUC__) && (__GNUC__ >= 3))  \\\n  || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800)) \\\n  || defined(__clang__)\n#    define XXH_likely(x) __builtin_expect(x, 1)\n#    define XXH_unlikely(x) __builtin_expect(x, 0)\n#else\n#    define XXH_likely(x) (x)\n#    define XXH_unlikely(x) (x)\n#endif\n\n#ifndef XXH_HAS_INCLUDE\n#  ifdef __has_include\n/*\n * Not defined as XXH_HAS_INCLUDE(x) (function-like) because\n * this causes segfaults in Apple Clang 4.2 (on Mac OS X 10.7 Lion)\n */\n#    define XXH_HAS_INCLUDE __has_include\n#  else\n#    define XXH_HAS_INCLUDE(x) 0\n#  endif\n#endif\n\n#if defined(__GNUC__) || defined(__clang__)\n#  if defined(__ARM_FEATURE_SVE)\n#    include <arm_sve.h>\n#  endif\n#  if defined(__ARM_NEON__) || defined(__ARM_NEON) \\\n   || (defined(_M_ARM) && _M_ARM >= 7) \\\n   || defined(_M_ARM64) || defined(_M_ARM64EC) \\\n   || (defined(__wasm_simd128__) && XXH_HAS_INCLUDE(<arm_neon.h>)) /* WASM SIMD128 via SIMDe */\n#    define inline __inline__  /* circumvent a clang bug */\n#    include <arm_neon.h>\n#    undef inline\n#  elif defined(__AVX2__)\n#    include <immintrin.h>\n#  elif defined(__SSE2__)\n#    include <emmintrin.h>\n#  elif defined(__loongarch_sx)\n#    include <lsxintrin.h>\n#  endif\n#endif\n\n#if defined(_MSC_VER)\n#  include <intrin.h>\n#endif\n\n/*\n * One goal of XXH3 is to make it fast on both 32-bit and 64-bit, while\n * remaining a true 64-bit/128-bit hash function.\n *\n * This is done by prioritizing a subset of 64-bit operations that can be\n * emulated without too many steps on the average 32-bit machine.\n *\n * For example, these two lines seem similar, and run equally fast on 64-bit:\n *\n *   xxh_u64 x;\n *   x ^= (x >> 47); // good\n *   x ^= (x >> 13); // bad\n *\n * However, to a 32-bit machine, there is a major difference.\n *\n * x ^= (x >> 47) looks like this:\n *\n *   x.lo ^= (x.hi >> (47 - 32));\n *\n * while x ^= (x >> 13) looks like this:\n *\n *   // note: funnel shifts are not usually cheap.\n *   x.lo ^= (x.lo >> 13) | (x.hi << (32 - 13));\n *   x.hi ^= (x.hi >> 13);\n *\n * The first one is significantly faster than the second, simply because the\n * shift is larger than 32. This means:\n *  - All the bits we need are in the upper 32 bits, so we can ignore the lower\n *    32 bits in the shift.\n *  - The shift result will always fit in the lower 32 bits, and therefore,\n *    we can ignore the upper 32 bits in the xor.\n *\n * Thanks to this optimization, XXH3 only requires these features to be efficient:\n *\n *  - Usable unaligned access\n *  - A 32-bit or 64-bit ALU\n *      - If 32-bit, a decent ADC instruction\n *  - A 32 or 64-bit multiply with a 64-bit result\n *  - For the 128-bit variant, a decent byteswap helps short inputs.\n *\n * The first two are already required by XXH32, and almost all 32-bit and 64-bit\n * platforms which can run XXH32 can run XXH3 efficiently.\n *\n * Thumb-1, the classic 16-bit only subset of ARM's instruction set, is one\n * notable exception.\n *\n * First of all, Thumb-1 lacks support for the UMULL instruction which\n * performs the important long multiply. This means numerous __aeabi_lmul\n * calls.\n *\n * Second of all, the 8 functional registers are just not enough.\n * Setup for __aeabi_lmul, byteshift loads, pointers, and all arithmetic need\n * Lo registers, and this shuffling results in thousands more MOVs than A32.\n *\n * A32 and T32 don't have this limitation. They can access all 14 registers,\n * do a 32->64 multiply with UMULL, and the flexible operand allowing free\n * shifts is helpful, too.\n *\n * Therefore, we do a quick sanity check.\n *\n * If compiling Thumb-1 for a target which supports ARM instructions, we will\n * emit a warning, as it is not a \"sane\" platform to compile for.\n *\n * Usually, if this happens, it is because of an accident and you probably need\n * to specify -march, as you likely meant to compile for a newer architecture.\n *\n * Credit: large sections of the vectorial and asm source code paths\n *         have been contributed by @easyaspi314\n */\n#if defined(__thumb__) && !defined(__thumb2__) && defined(__ARM_ARCH_ISA_ARM)\n#   warning \"XXH3 is highly inefficient without ARM or Thumb-2.\"\n#endif\n\n/* ==========================================\n * Vectorization detection\n * ========================================== */\n\n#ifdef XXH_DOXYGEN\n/*!\n * @ingroup tuning\n * @brief Overrides the vectorization implementation chosen for XXH3.\n *\n * Can be defined to 0 to disable SIMD or any of the values mentioned in\n * @ref XXH_VECTOR_TYPE.\n *\n * If this is not defined, it uses predefined macros to determine the best\n * implementation.\n */\n#  define XXH_VECTOR XXH_SCALAR\n/*!\n * @ingroup tuning\n * @brief Selects the minimum alignment for XXH3's accumulators.\n *\n * When using SIMD, this should match the alignment required for said vector\n * type, so, for example, 32 for AVX2.\n *\n * Default: Auto detected.\n */\n#  define XXH_ACC_ALIGN 8\n#endif\n\n/* Actual definition */\n#ifndef XXH_DOXYGEN\n#endif\n\n#ifndef XXH_VECTOR    /* can be defined on command line */\n#  if defined(__ARM_FEATURE_SVE)\n#    define XXH_VECTOR XXH_SVE\n#  elif ( \\\n        defined(__ARM_NEON__) || defined(__ARM_NEON) /* gcc */ \\\n     || defined(_M_ARM) || defined(_M_ARM64) || defined(_M_ARM64EC) /* msvc */ \\\n     || (defined(__wasm_simd128__) && XXH_HAS_INCLUDE(<arm_neon.h>)) /* wasm simd128 via SIMDe */ \\\n   ) && ( \\\n        defined(_WIN32) || defined(__LITTLE_ENDIAN__) /* little endian only */ \\\n    || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) \\\n   )\n#    define XXH_VECTOR XXH_NEON\n#  elif defined(__AVX512F__)\n#    define XXH_VECTOR XXH_AVX512\n#  elif defined(__AVX2__)\n#    define XXH_VECTOR XXH_AVX2\n#  elif defined(__SSE2__) || defined(_M_AMD64) || defined(_M_X64) || (defined(_M_IX86_FP) && (_M_IX86_FP == 2))\n#    define XXH_VECTOR XXH_SSE2\n#  elif (defined(__PPC64__) && defined(__POWER8_VECTOR__)) \\\n     || (defined(__s390x__) && defined(__VEC__)) \\\n     && defined(__GNUC__) /* TODO: IBM XL */\n#    define XXH_VECTOR XXH_VSX\n#  elif defined(__loongarch_sx)\n#    define XXH_VECTOR XXH_LSX\n#  else\n#    define XXH_VECTOR XXH_SCALAR\n#  endif\n#endif\n\n/* __ARM_FEATURE_SVE is only supported by GCC & Clang. */\n#if (XXH_VECTOR == XXH_SVE) && !defined(__ARM_FEATURE_SVE)\n#  ifdef _MSC_VER\n#    pragma warning(once : 4606)\n#  else\n#    warning \"__ARM_FEATURE_SVE isn't supported. Use SCALAR instead.\"\n#  endif\n#  undef XXH_VECTOR\n#  define XXH_VECTOR XXH_SCALAR\n#endif\n\n/*\n * Controls the alignment of the accumulator,\n * for compatibility with aligned vector loads, which are usually faster.\n */\n#ifndef XXH_ACC_ALIGN\n#  if defined(XXH_X86DISPATCH)\n#     define XXH_ACC_ALIGN 64  /* for compatibility with avx512 */\n#  elif XXH_VECTOR == XXH_SCALAR  /* scalar */\n#     define XXH_ACC_ALIGN 8\n#  elif XXH_VECTOR == XXH_SSE2  /* sse2 */\n#     define XXH_ACC_ALIGN 16\n#  elif XXH_VECTOR == XXH_AVX2  /* avx2 */\n#     define XXH_ACC_ALIGN 32\n#  elif XXH_VECTOR == XXH_NEON  /* neon */\n#     define XXH_ACC_ALIGN 16\n#  elif XXH_VECTOR == XXH_VSX   /* vsx */\n#     define XXH_ACC_ALIGN 16\n#  elif XXH_VECTOR == XXH_AVX512  /* avx512 */\n#     define XXH_ACC_ALIGN 64\n#  elif XXH_VECTOR == XXH_SVE   /* sve */\n#     define XXH_ACC_ALIGN 64\n#  elif XXH_VECTOR == XXH_LSX   /* lsx */\n#     define XXH_ACC_ALIGN 64\n#  endif\n#endif\n\n#if defined(XXH_X86DISPATCH) || XXH_VECTOR == XXH_SSE2 \\\n    || XXH_VECTOR == XXH_AVX2 || XXH_VECTOR == XXH_AVX512\n#  define XXH_SEC_ALIGN XXH_ACC_ALIGN\n#elif XXH_VECTOR == XXH_SVE\n#  define XXH_SEC_ALIGN XXH_ACC_ALIGN\n#else\n#  define XXH_SEC_ALIGN 8\n#endif\n\n#if defined(__GNUC__) || defined(__clang__)\n#  define XXH_ALIASING __attribute__((__may_alias__))\n#else\n#  define XXH_ALIASING /* nothing */\n#endif\n\n/*\n * UGLY HACK:\n * GCC usually generates the best code with -O3 for xxHash.\n *\n * However, when targeting AVX2, it is overzealous in its unrolling resulting\n * in code roughly 3/4 the speed of Clang.\n *\n * There are other issues, such as GCC splitting _mm256_loadu_si256 into\n * _mm_loadu_si128 + _mm256_inserti128_si256. This is an optimization which\n * only applies to Sandy and Ivy Bridge... which don't even support AVX2.\n *\n * That is why when compiling the AVX2 version, it is recommended to use either\n *   -O2 -mavx2 -march=haswell\n * or\n *   -O2 -mavx2 -mno-avx256-split-unaligned-load\n * for decent performance, or to use Clang instead.\n *\n * Fortunately, we can control the first one with a pragma that forces GCC into\n * -O2, but the other one we can't control without \"failed to inline always\n * inline function due to target mismatch\" warnings.\n */\n#if XXH_VECTOR == XXH_AVX2 /* AVX2 */ \\\n  && defined(__GNUC__) && !defined(__clang__) /* GCC, not Clang */ \\\n  && defined(__OPTIMIZE__) && XXH_SIZE_OPT <= 0 /* respect -O0 and -Os */\n#  pragma GCC push_options\n#  pragma GCC optimize(\"-O2\")\n#endif\n\n#if XXH_VECTOR == XXH_NEON\n\n/*\n * UGLY HACK: While AArch64 GCC on Linux does not seem to care, on macOS, GCC -O3\n * optimizes out the entire hashLong loop because of the aliasing violation.\n *\n * However, GCC is also inefficient at load-store optimization with vld1q/vst1q,\n * so the only option is to mark it as aliasing.\n */\ntypedef uint64x2_t xxh_aliasing_uint64x2_t XXH_ALIASING;\n\n/*!\n * @internal\n * @brief `vld1q_u64` but faster and alignment-safe.\n *\n * On AArch64, unaligned access is always safe, but on ARMv7-a, it is only\n * *conditionally* safe (`vld1` has an alignment bit like `movdq[ua]` in x86).\n *\n * GCC for AArch64 sees `vld1q_u8` as an intrinsic instead of a load, so it\n * prohibits load-store optimizations. Therefore, a direct dereference is used.\n *\n * Otherwise, `vld1q_u8` is used with `vreinterpretq_u8_u64` to do a safe\n * unaligned load.\n */\n#if defined(__aarch64__) && defined(__GNUC__) && !defined(__clang__)\nXXH_FORCE_INLINE uint64x2_t XXH_vld1q_u64(void const* ptr) /* silence -Wcast-align */\n{\n    return *(xxh_aliasing_uint64x2_t const *)ptr;\n}\n#else\nXXH_FORCE_INLINE uint64x2_t XXH_vld1q_u64(void const* ptr)\n{\n    return vreinterpretq_u64_u8(vld1q_u8((uint8_t const*)ptr));\n}\n#endif\n\n/*!\n * @internal\n * @brief `vmlal_u32` on low and high halves of a vector.\n *\n * This is a workaround for AArch64 GCC < 11 which implemented arm_neon.h with\n * inline assembly and were therefore incapable of merging the `vget_{low, high}_u32`\n * with `vmlal_u32`.\n */\n#if defined(__aarch64__) && defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 11\nXXH_FORCE_INLINE uint64x2_t\nXXH_vmlal_low_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs)\n{\n    /* Inline assembly is the only way */\n    __asm__(\"umlal   %0.2d, %1.2s, %2.2s\" : \"+w\" (acc) : \"w\" (lhs), \"w\" (rhs));\n    return acc;\n}\nXXH_FORCE_INLINE uint64x2_t\nXXH_vmlal_high_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs)\n{\n    /* This intrinsic works as expected */\n    return vmlal_high_u32(acc, lhs, rhs);\n}\n#else\n/* Portable intrinsic versions */\nXXH_FORCE_INLINE uint64x2_t\nXXH_vmlal_low_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs)\n{\n    return vmlal_u32(acc, vget_low_u32(lhs), vget_low_u32(rhs));\n}\n/*! @copydoc XXH_vmlal_low_u32\n * Assume the compiler converts this to vmlal_high_u32 on aarch64 */\nXXH_FORCE_INLINE uint64x2_t\nXXH_vmlal_high_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs)\n{\n    return vmlal_u32(acc, vget_high_u32(lhs), vget_high_u32(rhs));\n}\n#endif\n\n/*!\n * @ingroup tuning\n * @brief Controls the NEON to scalar ratio for XXH3\n *\n * This can be set to 2, 4, 6, or 8.\n *\n * ARM Cortex CPUs are _very_ sensitive to how their pipelines are used.\n *\n * For example, the Cortex-A73 can dispatch 3 micro-ops per cycle, but only 2 of those\n * can be NEON. If you are only using NEON instructions, you are only using 2/3 of the CPU\n * bandwidth.\n *\n * This is even more noticeable on the more advanced cores like the Cortex-A76 which\n * can dispatch 8 micro-ops per cycle, but still only 2 NEON micro-ops at once.\n *\n * Therefore, to make the most out of the pipeline, it is beneficial to run 6 NEON lanes\n * and 2 scalar lanes, which is chosen by default.\n *\n * This does not apply to Apple processors or 32-bit processors, which run better with\n * full NEON. These will default to 8. Additionally, size-optimized builds run 8 lanes.\n *\n * This change benefits CPUs with large micro-op buffers without negatively affecting\n * most other CPUs:\n *\n *  | Chipset               | Dispatch type       | NEON only | 6:2 hybrid | Diff. |\n *  |:----------------------|:--------------------|----------:|-----------:|------:|\n *  | Snapdragon 730 (A76)  | 2 NEON/8 micro-ops  |  8.8 GB/s |  10.1 GB/s |  ~16% |\n *  | Snapdragon 835 (A73)  | 2 NEON/3 micro-ops  |  5.1 GB/s |   5.3 GB/s |   ~5% |\n *  | Marvell PXA1928 (A53) | In-order dual-issue |  1.9 GB/s |   1.9 GB/s |    0% |\n *  | Apple M1              | 4 NEON/8 micro-ops  | 37.3 GB/s |  36.1 GB/s |  ~-3% |\n *\n * It also seems to fix some bad codegen on GCC, making it almost as fast as clang.\n *\n * When using WASM SIMD128, if this is 2 or 6, SIMDe will scalarize 2 of the lanes meaning\n * it effectively becomes worse 4.\n *\n * @see XXH3_accumulate_512_neon()\n */\n# ifndef XXH3_NEON_LANES\n#  if (defined(__aarch64__) || defined(__arm64__) || defined(_M_ARM64) || defined(_M_ARM64EC)) \\\n   && !defined(__APPLE__) && XXH_SIZE_OPT <= 0\n#   define XXH3_NEON_LANES 6\n#  else\n#   define XXH3_NEON_LANES XXH_ACC_NB\n#  endif\n# endif\n#endif  /* XXH_VECTOR == XXH_NEON */\n\n/*\n * VSX and Z Vector helpers.\n *\n * This is very messy, and any pull requests to clean this up are welcome.\n *\n * There are a lot of problems with supporting VSX and s390x, due to\n * inconsistent intrinsics, spotty coverage, and multiple endiannesses.\n */\n#if XXH_VECTOR == XXH_VSX\n/* Annoyingly, these headers _may_ define three macros: `bool`, `vector`,\n * and `pixel`. This is a problem for obvious reasons.\n *\n * These keywords are unnecessary; the spec literally says they are\n * equivalent to `__bool`, `__vector`, and `__pixel` and may be undef'd\n * after including the header.\n *\n * We use pragma push_macro/pop_macro to keep the namespace clean. */\n#  pragma push_macro(\"bool\")\n#  pragma push_macro(\"vector\")\n#  pragma push_macro(\"pixel\")\n/* silence potential macro redefined warnings */\n#  undef bool\n#  undef vector\n#  undef pixel\n\n#  if defined(__s390x__)\n#    include <s390intrin.h>\n#  else\n#    include <altivec.h>\n#  endif\n\n/* Restore the original macro values, if applicable. */\n#  pragma pop_macro(\"pixel\")\n#  pragma pop_macro(\"vector\")\n#  pragma pop_macro(\"bool\")\n\ntypedef __vector unsigned long long xxh_u64x2;\ntypedef __vector unsigned char xxh_u8x16;\ntypedef __vector unsigned xxh_u32x4;\n\n/*\n * UGLY HACK: Similar to aarch64 macOS GCC, s390x GCC has the same aliasing issue.\n */\ntypedef xxh_u64x2 xxh_aliasing_u64x2 XXH_ALIASING;\n\n# ifndef XXH_VSX_BE\n#  if defined(__BIG_ENDIAN__) \\\n  || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)\n#    define XXH_VSX_BE 1\n#  elif defined(__VEC_ELEMENT_REG_ORDER__) && __VEC_ELEMENT_REG_ORDER__ == __ORDER_BIG_ENDIAN__\n#    warning \"-maltivec=be is not recommended. Please use native endianness.\"\n#    define XXH_VSX_BE 1\n#  else\n#    define XXH_VSX_BE 0\n#  endif\n# endif /* !defined(XXH_VSX_BE) */\n\n# if XXH_VSX_BE\n#  if defined(__POWER9_VECTOR__) || (defined(__clang__) && defined(__s390x__))\n#    define XXH_vec_revb vec_revb\n#  else\n/*!\n * A polyfill for POWER9's vec_revb().\n */\nXXH_FORCE_INLINE xxh_u64x2 XXH_vec_revb(xxh_u64x2 val)\n{\n    xxh_u8x16 const vByteSwap = { 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00,\n                                  0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08 };\n    return vec_perm(val, val, vByteSwap);\n}\n#  endif\n# endif /* XXH_VSX_BE */\n\n/*!\n * Performs an unaligned vector load and byte swaps it on big endian.\n */\nXXH_FORCE_INLINE xxh_u64x2 XXH_vec_loadu(const void *ptr)\n{\n    xxh_u64x2 ret;\n    XXH_memcpy(&ret, ptr, sizeof(xxh_u64x2));\n# if XXH_VSX_BE\n    ret = XXH_vec_revb(ret);\n# endif\n    return ret;\n}\n\n/*\n * vec_mulo and vec_mule are very problematic intrinsics on PowerPC\n *\n * These intrinsics weren't added until GCC 8, despite existing for a while,\n * and they are endian dependent. Also, their meaning swap depending on version.\n * */\n# if defined(__s390x__)\n /* s390x is always big endian, no issue on this platform */\n#  define XXH_vec_mulo vec_mulo\n#  define XXH_vec_mule vec_mule\n# elif defined(__clang__) && XXH_HAS_BUILTIN(__builtin_altivec_vmuleuw) && !defined(__ibmxl__)\n/* Clang has a better way to control this, we can just use the builtin which doesn't swap. */\n /* The IBM XL Compiler (which defined __clang__) only implements the vec_* operations */\n#  define XXH_vec_mulo __builtin_altivec_vmulouw\n#  define XXH_vec_mule __builtin_altivec_vmuleuw\n# else\n/* gcc needs inline assembly */\n/* Adapted from https://github.com/google/highwayhash/blob/master/highwayhash/hh_vsx.h. */\nXXH_FORCE_INLINE xxh_u64x2 XXH_vec_mulo(xxh_u32x4 a, xxh_u32x4 b)\n{\n    xxh_u64x2 result;\n    __asm__(\"vmulouw %0, %1, %2\" : \"=v\" (result) : \"v\" (a), \"v\" (b));\n    return result;\n}\nXXH_FORCE_INLINE xxh_u64x2 XXH_vec_mule(xxh_u32x4 a, xxh_u32x4 b)\n{\n    xxh_u64x2 result;\n    __asm__(\"vmuleuw %0, %1, %2\" : \"=v\" (result) : \"v\" (a), \"v\" (b));\n    return result;\n}\n# endif /* XXH_vec_mulo, XXH_vec_mule */\n#endif /* XXH_VECTOR == XXH_VSX */\n\n#if XXH_VECTOR == XXH_SVE\n#define ACCRND(acc, offset) \\\ndo { \\\n    svuint64_t input_vec = svld1_u64(mask, xinput + offset);         \\\n    svuint64_t secret_vec = svld1_u64(mask, xsecret + offset);       \\\n    svuint64_t mixed = sveor_u64_x(mask, secret_vec, input_vec);     \\\n    svuint64_t swapped = svtbl_u64(input_vec, kSwap);                \\\n    svuint64_t mixed_lo = svextw_u64_x(mask, mixed);                 \\\n    svuint64_t mixed_hi = svlsr_n_u64_x(mask, mixed, 32);            \\\n    svuint64_t mul = svmad_u64_x(mask, mixed_lo, mixed_hi, swapped); \\\n    acc = svadd_u64_x(mask, acc, mul);                               \\\n} while (0)\n#endif /* XXH_VECTOR == XXH_SVE */\n\n/* prefetch\n * can be disabled, by declaring XXH_NO_PREFETCH build macro */\n#if defined(XXH_NO_PREFETCH)\n#  define XXH_PREFETCH(ptr)  (void)(ptr)  /* disabled */\n#else\n#  if XXH_SIZE_OPT >= 1\n#    define XXH_PREFETCH(ptr) (void)(ptr)\n#  elif defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86))  /* _mm_prefetch() not defined outside of x86/x64 */\n#    include <mmintrin.h>   /* https://msdn.microsoft.com/fr-fr/library/84szxsww(v=vs.90).aspx */\n#    define XXH_PREFETCH(ptr)  _mm_prefetch((const char*)(ptr), _MM_HINT_T0)\n#  elif defined(__GNUC__) && ( (__GNUC__ >= 4) || ( (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1) ) )\n#    define XXH_PREFETCH(ptr)  __builtin_prefetch((ptr), 0 /* rw==read */, 3 /* locality */)\n#  else\n#    define XXH_PREFETCH(ptr) (void)(ptr)  /* disabled */\n#  endif\n#endif  /* XXH_NO_PREFETCH */\n\n\n/* ==========================================\n * XXH3 default settings\n * ========================================== */\n\n#define XXH_SECRET_DEFAULT_SIZE 192   /* minimum XXH3_SECRET_SIZE_MIN */\n\n#if (XXH_SECRET_DEFAULT_SIZE < XXH3_SECRET_SIZE_MIN)\n#  error \"default keyset is not large enough\"\n#endif\n\n/*! Pseudorandom secret taken directly from FARSH. */\nXXH_ALIGN(64) static const xxh_u8 XXH3_kSecret[XXH_SECRET_DEFAULT_SIZE] = {\n    0xb8, 0xfe, 0x6c, 0x39, 0x23, 0xa4, 0x4b, 0xbe, 0x7c, 0x01, 0x81, 0x2c, 0xf7, 0x21, 0xad, 0x1c,\n    0xde, 0xd4, 0x6d, 0xe9, 0x83, 0x90, 0x97, 0xdb, 0x72, 0x40, 0xa4, 0xa4, 0xb7, 0xb3, 0x67, 0x1f,\n    0xcb, 0x79, 0xe6, 0x4e, 0xcc, 0xc0, 0xe5, 0x78, 0x82, 0x5a, 0xd0, 0x7d, 0xcc, 0xff, 0x72, 0x21,\n    0xb8, 0x08, 0x46, 0x74, 0xf7, 0x43, 0x24, 0x8e, 0xe0, 0x35, 0x90, 0xe6, 0x81, 0x3a, 0x26, 0x4c,\n    0x3c, 0x28, 0x52, 0xbb, 0x91, 0xc3, 0x00, 0xcb, 0x88, 0xd0, 0x65, 0x8b, 0x1b, 0x53, 0x2e, 0xa3,\n    0x71, 0x64, 0x48, 0x97, 0xa2, 0x0d, 0xf9, 0x4e, 0x38, 0x19, 0xef, 0x46, 0xa9, 0xde, 0xac, 0xd8,\n    0xa8, 0xfa, 0x76, 0x3f, 0xe3, 0x9c, 0x34, 0x3f, 0xf9, 0xdc, 0xbb, 0xc7, 0xc7, 0x0b, 0x4f, 0x1d,\n    0x8a, 0x51, 0xe0, 0x4b, 0xcd, 0xb4, 0x59, 0x31, 0xc8, 0x9f, 0x7e, 0xc9, 0xd9, 0x78, 0x73, 0x64,\n    0xea, 0xc5, 0xac, 0x83, 0x34, 0xd3, 0xeb, 0xc3, 0xc5, 0x81, 0xa0, 0xff, 0xfa, 0x13, 0x63, 0xeb,\n    0x17, 0x0d, 0xdd, 0x51, 0xb7, 0xf0, 0xda, 0x49, 0xd3, 0x16, 0x55, 0x26, 0x29, 0xd4, 0x68, 0x9e,\n    0x2b, 0x16, 0xbe, 0x58, 0x7d, 0x47, 0xa1, 0xfc, 0x8f, 0xf8, 0xb8, 0xd1, 0x7a, 0xd0, 0x31, 0xce,\n    0x45, 0xcb, 0x3a, 0x8f, 0x95, 0x16, 0x04, 0x28, 0xaf, 0xd7, 0xfb, 0xca, 0xbb, 0x4b, 0x40, 0x7e,\n};\n\nstatic const xxh_u64 PRIME_MX1 = 0x165667919E3779F9ULL;  /*!< 0b0001011001010110011001111001000110011110001101110111100111111001 */\nstatic const xxh_u64 PRIME_MX2 = 0x9FB21C651E98DF25ULL;  /*!< 0b1001111110110010000111000110010100011110100110001101111100100101 */\n\n#ifdef XXH_OLD_NAMES\n#  define kSecret XXH3_kSecret\n#endif\n\n#ifdef XXH_DOXYGEN\n/*!\n * @brief Calculates a 32-bit to 64-bit long multiply.\n *\n * Implemented as a macro.\n *\n * Wraps `__emulu` on MSVC x86 because it tends to call `__allmul` when it doesn't\n * need to (but it shouldn't need to anyways, it is about 7 instructions to do\n * a 64x64 multiply...). Since we know that this will _always_ emit `MULL`, we\n * use that instead of the normal method.\n *\n * If you are compiling for platforms like Thumb-1 and don't have a better option,\n * you may also want to write your own long multiply routine here.\n *\n * @param x, y Numbers to be multiplied\n * @return 64-bit product of the low 32 bits of @p x and @p y.\n */\nXXH_FORCE_INLINE xxh_u64\nXXH_mult32to64(xxh_u64 x, xxh_u64 y)\n{\n   return (x & 0xFFFFFFFF) * (y & 0xFFFFFFFF);\n}\n#elif defined(_MSC_VER) && defined(_M_IX86)\n#    define XXH_mult32to64(x, y) __emulu((unsigned)(x), (unsigned)(y))\n#else\n/*\n * Downcast + upcast is usually better than masking on older compilers like\n * GCC 4.2 (especially 32-bit ones), all without affecting newer compilers.\n *\n * The other method, (x & 0xFFFFFFFF) * (y & 0xFFFFFFFF), will AND both operands\n * and perform a full 64x64 multiply -- entirely redundant on 32-bit.\n */\n#    define XXH_mult32to64(x, y) ((xxh_u64)(xxh_u32)(x) * (xxh_u64)(xxh_u32)(y))\n#endif\n\n/*!\n * @brief Calculates a 64->128-bit long multiply.\n *\n * Uses `__uint128_t` and `_umul128` if available, otherwise uses a scalar\n * version.\n *\n * @param lhs , rhs The 64-bit integers to be multiplied\n * @return The 128-bit result represented in an @ref XXH128_hash_t.\n */\nstatic XXH128_hash_t\nXXH_mult64to128(xxh_u64 lhs, xxh_u64 rhs)\n{\n    /*\n     * GCC/Clang __uint128_t method.\n     *\n     * On most 64-bit targets, GCC and Clang define a __uint128_t type.\n     * This is usually the best way as it usually uses a native long 64-bit\n     * multiply, such as MULQ on x86_64 or MUL + UMULH on aarch64.\n     *\n     * Usually.\n     *\n     * Despite being a 32-bit platform, Clang (and emscripten) define this type\n     * despite not having the arithmetic for it. This results in a laggy\n     * compiler builtin call which calculates a full 128-bit multiply.\n     * In that case it is best to use the portable one.\n     * https://github.com/Cyan4973/xxHash/issues/211#issuecomment-515575677\n     */\n#if (defined(__GNUC__) || defined(__clang__)) && !defined(__wasm__) \\\n    && defined(__SIZEOF_INT128__) \\\n    || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 128)\n\n    __uint128_t const product = (__uint128_t)lhs * (__uint128_t)rhs;\n    XXH128_hash_t r128;\n    r128.low64  = (xxh_u64)(product);\n    r128.high64 = (xxh_u64)(product >> 64);\n    return r128;\n\n    /*\n     * MSVC for x64's _umul128 method.\n     *\n     * xxh_u64 _umul128(xxh_u64 Multiplier, xxh_u64 Multiplicand, xxh_u64 *HighProduct);\n     *\n     * This compiles to single operand MUL on x64.\n     */\n#elif (defined(_M_X64) || defined(_M_IA64)) && !defined(_M_ARM64EC)\n\n#ifndef _MSC_VER\n#   pragma intrinsic(_umul128)\n#endif\n    xxh_u64 product_high;\n    xxh_u64 const product_low = _umul128(lhs, rhs, &product_high);\n    XXH128_hash_t r128;\n    r128.low64  = product_low;\n    r128.high64 = product_high;\n    return r128;\n\n    /*\n     * MSVC for ARM64's __umulh method.\n     *\n     * This compiles to the same MUL + UMULH as GCC/Clang's __uint128_t method.\n     */\n#elif defined(_M_ARM64) || defined(_M_ARM64EC)\n\n#ifndef _MSC_VER\n#   pragma intrinsic(__umulh)\n#endif\n    XXH128_hash_t r128;\n    r128.low64  = lhs * rhs;\n    r128.high64 = __umulh(lhs, rhs);\n    return r128;\n\n#else\n    /*\n     * Portable scalar method. Optimized for 32-bit and 64-bit ALUs.\n     *\n     * This is a fast and simple grade school multiply, which is shown below\n     * with base 10 arithmetic instead of base 0x100000000.\n     *\n     *           9 3 // D2 lhs = 93\n     *         x 7 5 // D2 rhs = 75\n     *     ----------\n     *           1 5 // D2 lo_lo = (93 % 10) * (75 % 10) = 15\n     *         4 5 | // D2 hi_lo = (93 / 10) * (75 % 10) = 45\n     *         2 1 | // D2 lo_hi = (93 % 10) * (75 / 10) = 21\n     *     + 6 3 | | // D2 hi_hi = (93 / 10) * (75 / 10) = 63\n     *     ---------\n     *         2 7 | // D2 cross = (15 / 10) + (45 % 10) + 21 = 27\n     *     + 6 7 | | // D2 upper = (27 / 10) + (45 / 10) + 63 = 67\n     *     ---------\n     *       6 9 7 5 // D4 res = (27 * 10) + (15 % 10) + (67 * 100) = 6975\n     *\n     * The reasons for adding the products like this are:\n     *  1. It avoids manual carry tracking. Just like how\n     *     (9 * 9) + 9 + 9 = 99, the same applies with this for UINT64_MAX.\n     *     This avoids a lot of complexity.\n     *\n     *  2. It hints for, and on Clang, compiles to, the powerful UMAAL\n     *     instruction available in ARM's Digital Signal Processing extension\n     *     in 32-bit ARMv6 and later, which is shown below:\n     *\n     *         void UMAAL(xxh_u32 *RdLo, xxh_u32 *RdHi, xxh_u32 Rn, xxh_u32 Rm)\n     *         {\n     *             xxh_u64 product = (xxh_u64)*RdLo * (xxh_u64)*RdHi + Rn + Rm;\n     *             *RdLo = (xxh_u32)(product & 0xFFFFFFFF);\n     *             *RdHi = (xxh_u32)(product >> 32);\n     *         }\n     *\n     *     This instruction was designed for efficient long multiplication, and\n     *     allows this to be calculated in only 4 instructions at speeds\n     *     comparable to some 64-bit ALUs.\n     *\n     *  3. It isn't terrible on other platforms. Usually this will be a couple\n     *     of 32-bit ADD/ADCs.\n     */\n\n    /* First calculate all of the cross products. */\n    xxh_u64 const lo_lo = XXH_mult32to64(lhs & 0xFFFFFFFF, rhs & 0xFFFFFFFF);\n    xxh_u64 const hi_lo = XXH_mult32to64(lhs >> 32,        rhs & 0xFFFFFFFF);\n    xxh_u64 const lo_hi = XXH_mult32to64(lhs & 0xFFFFFFFF, rhs >> 32);\n    xxh_u64 const hi_hi = XXH_mult32to64(lhs >> 32,        rhs >> 32);\n\n    /* Now add the products together. These will never overflow. */\n    xxh_u64 const cross = (lo_lo >> 32) + (hi_lo & 0xFFFFFFFF) + lo_hi;\n    xxh_u64 const upper = (hi_lo >> 32) + (cross >> 32)        + hi_hi;\n    xxh_u64 const lower = (cross << 32) | (lo_lo & 0xFFFFFFFF);\n\n    XXH128_hash_t r128;\n    r128.low64  = lower;\n    r128.high64 = upper;\n    return r128;\n#endif\n}\n\n/*!\n * @brief Calculates a 64-bit to 128-bit multiply, then XOR folds it.\n *\n * The reason for the separate function is to prevent passing too many structs\n * around by value. This will hopefully inline the multiply, but we don't force it.\n *\n * @param lhs , rhs The 64-bit integers to multiply\n * @return The low 64 bits of the product XOR'd by the high 64 bits.\n * @see XXH_mult64to128()\n */\nstatic xxh_u64\nXXH3_mul128_fold64(xxh_u64 lhs, xxh_u64 rhs)\n{\n    XXH128_hash_t product = XXH_mult64to128(lhs, rhs);\n    return product.low64 ^ product.high64;\n}\n\n/*! Seems to produce slightly better code on GCC for some reason. */\nXXH_FORCE_INLINE XXH_CONSTF xxh_u64 XXH_xorshift64(xxh_u64 v64, int shift)\n{\n    XXH_ASSERT(0 <= shift && shift < 64);\n    return v64 ^ (v64 >> shift);\n}\n\n/*\n * This is a fast avalanche stage,\n * suitable when input bits are already partially mixed\n */\nstatic XXH64_hash_t XXH3_avalanche(xxh_u64 h64)\n{\n    h64 = XXH_xorshift64(h64, 37);\n    h64 *= PRIME_MX1;\n    h64 = XXH_xorshift64(h64, 32);\n    return h64;\n}\n\n/*\n * This is a stronger avalanche,\n * inspired by Pelle Evensen's rrmxmx\n * preferable when input has not been previously mixed\n */\nstatic XXH64_hash_t XXH3_rrmxmx(xxh_u64 h64, xxh_u64 len)\n{\n    /* this mix is inspired by Pelle Evensen's rrmxmx */\n    h64 ^= XXH_rotl64(h64, 49) ^ XXH_rotl64(h64, 24);\n    h64 *= PRIME_MX2;\n    h64 ^= (h64 >> 35) + len ;\n    h64 *= PRIME_MX2;\n    return XXH_xorshift64(h64, 28);\n}\n\n\n/* ==========================================\n * Short keys\n * ==========================================\n * One of the shortcomings of XXH32 and XXH64 was that their performance was\n * sub-optimal on short lengths. It used an iterative algorithm which strongly\n * favored lengths that were a multiple of 4 or 8.\n *\n * Instead of iterating over individual inputs, we use a set of single shot\n * functions which piece together a range of lengths and operate in constant time.\n *\n * Additionally, the number of multiplies has been significantly reduced. This\n * reduces latency, especially when emulating 64-bit multiplies on 32-bit.\n *\n * Depending on the platform, this may or may not be faster than XXH32, but it\n * is almost guaranteed to be faster than XXH64.\n */\n\n/*\n * At very short lengths, there isn't enough input to fully hide secrets, or use\n * the entire secret.\n *\n * There is also only a limited amount of mixing we can do before significantly\n * impacting performance.\n *\n * Therefore, we use different sections of the secret and always mix two secret\n * samples with an XOR. This should have no effect on performance on the\n * seedless or withSeed variants because everything _should_ be constant folded\n * by modern compilers.\n *\n * The XOR mixing hides individual parts of the secret and increases entropy.\n *\n * This adds an extra layer of strength for custom secrets.\n */\nXXH_FORCE_INLINE XXH_PUREF XXH64_hash_t\nXXH3_len_1to3_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)\n{\n    XXH_ASSERT(input != NULL);\n    XXH_ASSERT(1 <= len && len <= 3);\n    XXH_ASSERT(secret != NULL);\n    /*\n     * len = 1: combined = { input[0], 0x01, input[0], input[0] }\n     * len = 2: combined = { input[1], 0x02, input[0], input[1] }\n     * len = 3: combined = { input[2], 0x03, input[0], input[1] }\n     */\n    {   xxh_u8  const c1 = input[0];\n        xxh_u8  const c2 = input[len >> 1];\n        xxh_u8  const c3 = input[len - 1];\n        xxh_u32 const combined = ((xxh_u32)c1 << 16) | ((xxh_u32)c2  << 24)\n                               | ((xxh_u32)c3 <<  0) | ((xxh_u32)len << 8);\n        xxh_u64 const bitflip = (XXH_readLE32(secret) ^ XXH_readLE32(secret+4)) + seed;\n        xxh_u64 const keyed = (xxh_u64)combined ^ bitflip;\n        return XXH64_avalanche(keyed);\n    }\n}\n\nXXH_FORCE_INLINE XXH_PUREF XXH64_hash_t\nXXH3_len_4to8_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)\n{\n    XXH_ASSERT(input != NULL);\n    XXH_ASSERT(secret != NULL);\n    XXH_ASSERT(4 <= len && len <= 8);\n    seed ^= (xxh_u64)XXH_swap32((xxh_u32)seed) << 32;\n    {   xxh_u32 const input1 = XXH_readLE32(input);\n        xxh_u32 const input2 = XXH_readLE32(input + len - 4);\n        xxh_u64 const bitflip = (XXH_readLE64(secret+8) ^ XXH_readLE64(secret+16)) - seed;\n        xxh_u64 const input64 = input2 + (((xxh_u64)input1) << 32);\n        xxh_u64 const keyed = input64 ^ bitflip;\n        return XXH3_rrmxmx(keyed, len);\n    }\n}\n\nXXH_FORCE_INLINE XXH_PUREF XXH64_hash_t\nXXH3_len_9to16_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)\n{\n    XXH_ASSERT(input != NULL);\n    XXH_ASSERT(secret != NULL);\n    XXH_ASSERT(9 <= len && len <= 16);\n    {   xxh_u64 const bitflip1 = (XXH_readLE64(secret+24) ^ XXH_readLE64(secret+32)) + seed;\n        xxh_u64 const bitflip2 = (XXH_readLE64(secret+40) ^ XXH_readLE64(secret+48)) - seed;\n        xxh_u64 const input_lo = XXH_readLE64(input)           ^ bitflip1;\n        xxh_u64 const input_hi = XXH_readLE64(input + len - 8) ^ bitflip2;\n        xxh_u64 const acc = len\n                          + XXH_swap64(input_lo) + input_hi\n                          + XXH3_mul128_fold64(input_lo, input_hi);\n        return XXH3_avalanche(acc);\n    }\n}\n\nXXH_FORCE_INLINE XXH_PUREF XXH64_hash_t\nXXH3_len_0to16_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)\n{\n    XXH_ASSERT(len <= 16);\n    {   if (XXH_likely(len >  8)) return XXH3_len_9to16_64b(input, len, secret, seed);\n        if (XXH_likely(len >= 4)) return XXH3_len_4to8_64b(input, len, secret, seed);\n        if (len) return XXH3_len_1to3_64b(input, len, secret, seed);\n        return XXH64_avalanche(seed ^ (XXH_readLE64(secret+56) ^ XXH_readLE64(secret+64)));\n    }\n}\n\n/*\n * DISCLAIMER: There are known *seed-dependent* multicollisions here due to\n * multiplication by zero, affecting hashes of lengths 17 to 240.\n *\n * However, they are very unlikely.\n *\n * Keep this in mind when using the unseeded XXH3_64bits() variant: As with all\n * unseeded non-cryptographic hashes, it does not attempt to defend itself\n * against specially crafted inputs, only random inputs.\n *\n * Compared to classic UMAC where a 1 in 2^31 chance of 4 consecutive bytes\n * cancelling out the secret is taken an arbitrary number of times (addressed\n * in XXH3_accumulate_512), this collision is very unlikely with random inputs\n * and/or proper seeding:\n *\n * This only has a 1 in 2^63 chance of 8 consecutive bytes cancelling out, in a\n * function that is only called up to 16 times per hash with up to 240 bytes of\n * input.\n *\n * This is not too bad for a non-cryptographic hash function, especially with\n * only 64 bit outputs.\n *\n * The 128-bit variant (which trades some speed for strength) is NOT affected\n * by this, although it is always a good idea to use a proper seed if you care\n * about strength.\n */\nXXH_FORCE_INLINE xxh_u64 XXH3_mix16B(const xxh_u8* XXH_RESTRICT input,\n                                     const xxh_u8* XXH_RESTRICT secret, xxh_u64 seed64)\n{\n#if defined(__GNUC__) && !defined(__clang__) /* GCC, not Clang */ \\\n  && defined(__i386__) && defined(__SSE2__)  /* x86 + SSE2 */ \\\n  && !defined(XXH_ENABLE_AUTOVECTORIZE)      /* Define to disable like XXH32 hack */\n    /*\n     * UGLY HACK:\n     * GCC for x86 tends to autovectorize the 128-bit multiply, resulting in\n     * slower code.\n     *\n     * By forcing seed64 into a register, we disrupt the cost model and\n     * cause it to scalarize. See `XXH32_round()`\n     *\n     * FIXME: Clang's output is still _much_ faster -- On an AMD Ryzen 3600,\n     * XXH3_64bits @ len=240 runs at 4.6 GB/s with Clang 9, but 3.3 GB/s on\n     * GCC 9.2, despite both emitting scalar code.\n     *\n     * GCC generates much better scalar code than Clang for the rest of XXH3,\n     * which is why finding a more optimal codepath is an interest.\n     */\n    XXH_COMPILER_GUARD(seed64);\n#endif\n    {   xxh_u64 const input_lo = XXH_readLE64(input);\n        xxh_u64 const input_hi = XXH_readLE64(input+8);\n        return XXH3_mul128_fold64(\n            input_lo ^ (XXH_readLE64(secret)   + seed64),\n            input_hi ^ (XXH_readLE64(secret+8) - seed64)\n        );\n    }\n}\n\n/* For mid range keys, XXH3 uses a Mum-hash variant. */\nXXH_FORCE_INLINE XXH_PUREF XXH64_hash_t\nXXH3_len_17to128_64b(const xxh_u8* XXH_RESTRICT input, size_t len,\n                     const xxh_u8* XXH_RESTRICT secret, size_t secretSize,\n                     XXH64_hash_t seed)\n{\n    XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize;\n    XXH_ASSERT(16 < len && len <= 128);\n\n    {   xxh_u64 acc = len * XXH_PRIME64_1;\n#if XXH_SIZE_OPT >= 1\n        /* Smaller and cleaner, but slightly slower. */\n        unsigned int i = (unsigned int)(len - 1) / 32;\n        do {\n            acc += XXH3_mix16B(input+16 * i, secret+32*i, seed);\n            acc += XXH3_mix16B(input+len-16*(i+1), secret+32*i+16, seed);\n        } while (i-- != 0);\n#else\n        if (len > 32) {\n            if (len > 64) {\n                if (len > 96) {\n                    acc += XXH3_mix16B(input+48, secret+96, seed);\n                    acc += XXH3_mix16B(input+len-64, secret+112, seed);\n                }\n                acc += XXH3_mix16B(input+32, secret+64, seed);\n                acc += XXH3_mix16B(input+len-48, secret+80, seed);\n            }\n            acc += XXH3_mix16B(input+16, secret+32, seed);\n            acc += XXH3_mix16B(input+len-32, secret+48, seed);\n        }\n        acc += XXH3_mix16B(input+0, secret+0, seed);\n        acc += XXH3_mix16B(input+len-16, secret+16, seed);\n#endif\n        return XXH3_avalanche(acc);\n    }\n}\n\nXXH_NO_INLINE XXH_PUREF XXH64_hash_t\nXXH3_len_129to240_64b(const xxh_u8* XXH_RESTRICT input, size_t len,\n                      const xxh_u8* XXH_RESTRICT secret, size_t secretSize,\n                      XXH64_hash_t seed)\n{\n    XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize;\n    XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX);\n\n    #define XXH3_MIDSIZE_STARTOFFSET 3\n    #define XXH3_MIDSIZE_LASTOFFSET  17\n\n    {   xxh_u64 acc = len * XXH_PRIME64_1;\n        xxh_u64 acc_end;\n        unsigned int const nbRounds = (unsigned int)len / 16;\n        unsigned int i;\n        XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX);\n        for (i=0; i<8; i++) {\n            acc += XXH3_mix16B(input+(16*i), secret+(16*i), seed);\n        }\n        /* last bytes */\n        acc_end = XXH3_mix16B(input + len - 16, secret + XXH3_SECRET_SIZE_MIN - XXH3_MIDSIZE_LASTOFFSET, seed);\n        XXH_ASSERT(nbRounds >= 8);\n        acc = XXH3_avalanche(acc);\n#if defined(__clang__)                                /* Clang */ \\\n    && (defined(__ARM_NEON) || defined(__ARM_NEON__)) /* NEON */ \\\n    && !defined(XXH_ENABLE_AUTOVECTORIZE)             /* Define to disable */\n        /*\n         * UGLY HACK:\n         * Clang for ARMv7-A tries to vectorize this loop, similar to GCC x86.\n         * In everywhere else, it uses scalar code.\n         *\n         * For 64->128-bit multiplies, even if the NEON was 100% optimal, it\n         * would still be slower than UMAAL (see XXH_mult64to128).\n         *\n         * Unfortunately, Clang doesn't handle the long multiplies properly and\n         * converts them to the nonexistent \"vmulq_u64\" intrinsic, which is then\n         * scalarized into an ugly mess of VMOV.32 instructions.\n         *\n         * This mess is difficult to avoid without turning autovectorization\n         * off completely, but they are usually relatively minor and/or not\n         * worth it to fix.\n         *\n         * This loop is the easiest to fix, as unlike XXH32, this pragma\n         * _actually works_ because it is a loop vectorization instead of an\n         * SLP vectorization.\n         */\n        #pragma clang loop vectorize(disable)\n#endif\n        for (i=8 ; i < nbRounds; i++) {\n            /*\n             * Prevents clang for unrolling the acc loop and interleaving with this one.\n             */\n            XXH_COMPILER_GUARD(acc);\n            acc_end += XXH3_mix16B(input+(16*i), secret+(16*(i-8)) + XXH3_MIDSIZE_STARTOFFSET, seed);\n        }\n        return XXH3_avalanche(acc + acc_end);\n    }\n}\n\n\n/* =======     Long Keys     ======= */\n\n#define XXH_STRIPE_LEN 64\n#define XXH_SECRET_CONSUME_RATE 8   /* nb of secret bytes consumed at each accumulation */\n#define XXH_ACC_NB (XXH_STRIPE_LEN / sizeof(xxh_u64))\n\n#ifdef XXH_OLD_NAMES\n#  define STRIPE_LEN XXH_STRIPE_LEN\n#  define ACC_NB XXH_ACC_NB\n#endif\n\n#ifndef XXH_PREFETCH_DIST\n#  ifdef __clang__\n#    define XXH_PREFETCH_DIST 320\n#  else\n#    if (XXH_VECTOR == XXH_AVX512)\n#      define XXH_PREFETCH_DIST 512\n#    else\n#      define XXH_PREFETCH_DIST 384\n#    endif\n#  endif  /* __clang__ */\n#endif  /* XXH_PREFETCH_DIST */\n\n/*\n * These macros are to generate an XXH3_accumulate() function.\n * The two arguments select the name suffix and target attribute.\n *\n * The name of this symbol is XXH3_accumulate_<name>() and it calls\n * XXH3_accumulate_512_<name>().\n *\n * It may be useful to hand implement this function if the compiler fails to\n * optimize the inline function.\n */\n#define XXH3_ACCUMULATE_TEMPLATE(name)                      \\\nvoid                                                        \\\nXXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc,           \\\n                       const xxh_u8* XXH_RESTRICT input,    \\\n                       const xxh_u8* XXH_RESTRICT secret,   \\\n                       size_t nbStripes)                    \\\n{                                                           \\\n    size_t n;                                               \\\n    for (n = 0; n < nbStripes; n++ ) {                      \\\n        const xxh_u8* const in = input + n*XXH_STRIPE_LEN;  \\\n        XXH_PREFETCH(in + XXH_PREFETCH_DIST);               \\\n        XXH3_accumulate_512_##name(                         \\\n                 acc,                                       \\\n                 in,                                        \\\n                 secret + n*XXH_SECRET_CONSUME_RATE);       \\\n    }                                                       \\\n}\n\n\nXXH_FORCE_INLINE void XXH_writeLE64(void* dst, xxh_u64 v64)\n{\n    if (!XXH_CPU_LITTLE_ENDIAN) v64 = XXH_swap64(v64);\n    XXH_memcpy(dst, &v64, sizeof(v64));\n}\n\n/* Several intrinsic functions below are supposed to accept __int64 as argument,\n * as documented in https://software.intel.com/sites/landingpage/IntrinsicsGuide/ .\n * However, several environments do not define __int64 type,\n * requiring a workaround.\n */\n#if !defined (__VMS) \\\n  && (defined (__cplusplus) \\\n  || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) )\n    typedef int64_t xxh_i64;\n#else\n    /* the following type must have a width of 64-bit */\n    typedef long long xxh_i64;\n#endif\n\n\n/*\n * XXH3_accumulate_512 is the tightest loop for long inputs, and it is the most optimized.\n *\n * It is a hardened version of UMAC, based off of FARSH's implementation.\n *\n * This was chosen because it adapts quite well to 32-bit, 64-bit, and SIMD\n * implementations, and it is ridiculously fast.\n *\n * We harden it by mixing the original input to the accumulators as well as the product.\n *\n * This means that in the (relatively likely) case of a multiply by zero, the\n * original input is preserved.\n *\n * On 128-bit inputs, we swap 64-bit pairs when we add the input to improve\n * cross-pollination, as otherwise the upper and lower halves would be\n * essentially independent.\n *\n * This doesn't matter on 64-bit hashes since they all get merged together in\n * the end, so we skip the extra step.\n *\n * Both XXH3_64bits and XXH3_128bits use this subroutine.\n */\n\n#if (XXH_VECTOR == XXH_AVX512) \\\n     || (defined(XXH_DISPATCH_AVX512) && XXH_DISPATCH_AVX512 != 0)\n\n#ifndef XXH_TARGET_AVX512\n# define XXH_TARGET_AVX512  /* disable attribute target */\n#endif\n\nXXH_FORCE_INLINE XXH_TARGET_AVX512 void\nXXH3_accumulate_512_avx512(void* XXH_RESTRICT acc,\n                     const void* XXH_RESTRICT input,\n                     const void* XXH_RESTRICT secret)\n{\n    __m512i* const xacc = (__m512i *) acc;\n    XXH_ASSERT((((size_t)acc) & 63) == 0);\n    XXH_STATIC_ASSERT(XXH_STRIPE_LEN == sizeof(__m512i));\n\n    {\n        /* data_vec    = input[0]; */\n        __m512i const data_vec    = _mm512_loadu_si512   (input);\n        /* key_vec     = secret[0]; */\n        __m512i const key_vec     = _mm512_loadu_si512   (secret);\n        /* data_key    = data_vec ^ key_vec; */\n        __m512i const data_key    = _mm512_xor_si512     (data_vec, key_vec);\n        /* data_key_lo = data_key >> 32; */\n        __m512i const data_key_lo = _mm512_srli_epi64 (data_key, 32);\n        /* product     = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */\n        __m512i const product     = _mm512_mul_epu32     (data_key, data_key_lo);\n        /* xacc[0] += swap(data_vec); */\n        __m512i const data_swap = _mm512_shuffle_epi32(data_vec, (_MM_PERM_ENUM)_MM_SHUFFLE(1, 0, 3, 2));\n        __m512i const sum       = _mm512_add_epi64(*xacc, data_swap);\n        /* xacc[0] += product; */\n        *xacc = _mm512_add_epi64(product, sum);\n    }\n}\nXXH_FORCE_INLINE XXH_TARGET_AVX512 XXH3_ACCUMULATE_TEMPLATE(avx512)\n\n/*\n * XXH3_scrambleAcc: Scrambles the accumulators to improve mixing.\n *\n * Multiplication isn't perfect, as explained by Google in HighwayHash:\n *\n *  // Multiplication mixes/scrambles bytes 0-7 of the 64-bit result to\n *  // varying degrees. In descending order of goodness, bytes\n *  // 3 4 2 5 1 6 0 7 have quality 228 224 164 160 100 96 36 32.\n *  // As expected, the upper and lower bytes are much worse.\n *\n * Source: https://github.com/google/highwayhash/blob/0aaf66b/highwayhash/hh_avx2.h#L291\n *\n * Since our algorithm uses a pseudorandom secret to add some variance into the\n * mix, we don't need to (or want to) mix as often or as much as HighwayHash does.\n *\n * This isn't as tight as XXH3_accumulate, but still written in SIMD to avoid\n * extraction.\n *\n * Both XXH3_64bits and XXH3_128bits use this subroutine.\n */\n\nXXH_FORCE_INLINE XXH_TARGET_AVX512 void\nXXH3_scrambleAcc_avx512(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)\n{\n    XXH_ASSERT((((size_t)acc) & 63) == 0);\n    XXH_STATIC_ASSERT(XXH_STRIPE_LEN == sizeof(__m512i));\n    {   __m512i* const xacc = (__m512i*) acc;\n        const __m512i prime32 = _mm512_set1_epi32((int)XXH_PRIME32_1);\n\n        /* xacc[0] ^= (xacc[0] >> 47) */\n        __m512i const acc_vec     = *xacc;\n        __m512i const shifted     = _mm512_srli_epi64    (acc_vec, 47);\n        /* xacc[0] ^= secret; */\n        __m512i const key_vec     = _mm512_loadu_si512   (secret);\n        __m512i const data_key    = _mm512_ternarylogic_epi32(key_vec, acc_vec, shifted, 0x96 /* key_vec ^ acc_vec ^ shifted */);\n\n        /* xacc[0] *= XXH_PRIME32_1; */\n        __m512i const data_key_hi = _mm512_srli_epi64 (data_key, 32);\n        __m512i const prod_lo     = _mm512_mul_epu32     (data_key, prime32);\n        __m512i const prod_hi     = _mm512_mul_epu32     (data_key_hi, prime32);\n        *xacc = _mm512_add_epi64(prod_lo, _mm512_slli_epi64(prod_hi, 32));\n    }\n}\n\nXXH_FORCE_INLINE XXH_TARGET_AVX512 void\nXXH3_initCustomSecret_avx512(void* XXH_RESTRICT customSecret, xxh_u64 seed64)\n{\n    XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 63) == 0);\n    XXH_STATIC_ASSERT(XXH_SEC_ALIGN == 64);\n    XXH_ASSERT(((size_t)customSecret & 63) == 0);\n    (void)(&XXH_writeLE64);\n    {   int const nbRounds = XXH_SECRET_DEFAULT_SIZE / sizeof(__m512i);\n        __m512i const seed_pos = _mm512_set1_epi64((xxh_i64)seed64);\n        __m512i const seed     = _mm512_mask_sub_epi64(seed_pos, 0xAA, _mm512_set1_epi8(0), seed_pos);\n\n        const __m512i* const src  = (const __m512i*) ((const void*) XXH3_kSecret);\n              __m512i* const dest = (      __m512i*) customSecret;\n        int i;\n        XXH_ASSERT(((size_t)src & 63) == 0); /* control alignment */\n        XXH_ASSERT(((size_t)dest & 63) == 0);\n        for (i=0; i < nbRounds; ++i) {\n            dest[i] = _mm512_add_epi64(_mm512_load_si512(src + i), seed);\n    }   }\n}\n\n#endif\n\n#if (XXH_VECTOR == XXH_AVX2) \\\n    || (defined(XXH_DISPATCH_AVX2) && XXH_DISPATCH_AVX2 != 0)\n\n#ifndef XXH_TARGET_AVX2\n# define XXH_TARGET_AVX2  /* disable attribute target */\n#endif\n\nXXH_FORCE_INLINE XXH_TARGET_AVX2 void\nXXH3_accumulate_512_avx2( void* XXH_RESTRICT acc,\n                    const void* XXH_RESTRICT input,\n                    const void* XXH_RESTRICT secret)\n{\n    XXH_ASSERT((((size_t)acc) & 31) == 0);\n    {   __m256i* const xacc    =       (__m256i *) acc;\n        /* Unaligned. This is mainly for pointer arithmetic, and because\n         * _mm256_loadu_si256 requires  a const __m256i * pointer for some reason. */\n        const         __m256i* const xinput  = (const __m256i *) input;\n        /* Unaligned. This is mainly for pointer arithmetic, and because\n         * _mm256_loadu_si256 requires a const __m256i * pointer for some reason. */\n        const         __m256i* const xsecret = (const __m256i *) secret;\n\n        size_t i;\n        for (i=0; i < XXH_STRIPE_LEN/sizeof(__m256i); i++) {\n            /* data_vec    = xinput[i]; */\n            __m256i const data_vec    = _mm256_loadu_si256    (xinput+i);\n            /* key_vec     = xsecret[i]; */\n            __m256i const key_vec     = _mm256_loadu_si256   (xsecret+i);\n            /* data_key    = data_vec ^ key_vec; */\n            __m256i const data_key    = _mm256_xor_si256     (data_vec, key_vec);\n            /* data_key_lo = data_key >> 32; */\n            __m256i const data_key_lo = _mm256_srli_epi64 (data_key, 32);\n            /* product     = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */\n            __m256i const product     = _mm256_mul_epu32     (data_key, data_key_lo);\n            /* xacc[i] += swap(data_vec); */\n            __m256i const data_swap = _mm256_shuffle_epi32(data_vec, _MM_SHUFFLE(1, 0, 3, 2));\n            __m256i const sum       = _mm256_add_epi64(xacc[i], data_swap);\n            /* xacc[i] += product; */\n            xacc[i] = _mm256_add_epi64(product, sum);\n    }   }\n}\nXXH_FORCE_INLINE XXH_TARGET_AVX2 XXH3_ACCUMULATE_TEMPLATE(avx2)\n\nXXH_FORCE_INLINE XXH_TARGET_AVX2 void\nXXH3_scrambleAcc_avx2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)\n{\n    XXH_ASSERT((((size_t)acc) & 31) == 0);\n    {   __m256i* const xacc = (__m256i*) acc;\n        /* Unaligned. This is mainly for pointer arithmetic, and because\n         * _mm256_loadu_si256 requires a const __m256i * pointer for some reason. */\n        const         __m256i* const xsecret = (const __m256i *) secret;\n        const __m256i prime32 = _mm256_set1_epi32((int)XXH_PRIME32_1);\n\n        size_t i;\n        for (i=0; i < XXH_STRIPE_LEN/sizeof(__m256i); i++) {\n            /* xacc[i] ^= (xacc[i] >> 47) */\n            __m256i const acc_vec     = xacc[i];\n            __m256i const shifted     = _mm256_srli_epi64    (acc_vec, 47);\n            __m256i const data_vec    = _mm256_xor_si256     (acc_vec, shifted);\n            /* xacc[i] ^= xsecret; */\n            __m256i const key_vec     = _mm256_loadu_si256   (xsecret+i);\n            __m256i const data_key    = _mm256_xor_si256     (data_vec, key_vec);\n\n            /* xacc[i] *= XXH_PRIME32_1; */\n            __m256i const data_key_hi = _mm256_srli_epi64 (data_key, 32);\n            __m256i const prod_lo     = _mm256_mul_epu32     (data_key, prime32);\n            __m256i const prod_hi     = _mm256_mul_epu32     (data_key_hi, prime32);\n            xacc[i] = _mm256_add_epi64(prod_lo, _mm256_slli_epi64(prod_hi, 32));\n        }\n    }\n}\n\nXXH_FORCE_INLINE XXH_TARGET_AVX2 void XXH3_initCustomSecret_avx2(void* XXH_RESTRICT customSecret, xxh_u64 seed64)\n{\n    XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 31) == 0);\n    XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE / sizeof(__m256i)) == 6);\n    XXH_STATIC_ASSERT(XXH_SEC_ALIGN <= 64);\n    (void)(&XXH_writeLE64);\n    XXH_PREFETCH(customSecret);\n    {   __m256i const seed = _mm256_set_epi64x((xxh_i64)(0U - seed64), (xxh_i64)seed64, (xxh_i64)(0U - seed64), (xxh_i64)seed64);\n\n        const __m256i* const src  = (const __m256i*) ((const void*) XXH3_kSecret);\n              __m256i*       dest = (      __m256i*) customSecret;\n\n#       if defined(__GNUC__) || defined(__clang__)\n        /*\n         * On GCC & Clang, marking 'dest' as modified will cause the compiler:\n         *   - do not extract the secret from sse registers in the internal loop\n         *   - use less common registers, and avoid pushing these reg into stack\n         */\n        XXH_COMPILER_GUARD(dest);\n#       endif\n        XXH_ASSERT(((size_t)src & 31) == 0); /* control alignment */\n        XXH_ASSERT(((size_t)dest & 31) == 0);\n\n        /* GCC -O2 need unroll loop manually */\n        dest[0] = _mm256_add_epi64(_mm256_load_si256(src+0), seed);\n        dest[1] = _mm256_add_epi64(_mm256_load_si256(src+1), seed);\n        dest[2] = _mm256_add_epi64(_mm256_load_si256(src+2), seed);\n        dest[3] = _mm256_add_epi64(_mm256_load_si256(src+3), seed);\n        dest[4] = _mm256_add_epi64(_mm256_load_si256(src+4), seed);\n        dest[5] = _mm256_add_epi64(_mm256_load_si256(src+5), seed);\n    }\n}\n\n#endif\n\n/* x86dispatch always generates SSE2 */\n#if (XXH_VECTOR == XXH_SSE2) || defined(XXH_X86DISPATCH)\n\n#ifndef XXH_TARGET_SSE2\n# define XXH_TARGET_SSE2  /* disable attribute target */\n#endif\n\nXXH_FORCE_INLINE XXH_TARGET_SSE2 void\nXXH3_accumulate_512_sse2( void* XXH_RESTRICT acc,\n                    const void* XXH_RESTRICT input,\n                    const void* XXH_RESTRICT secret)\n{\n    /* SSE2 is just a half-scale version of the AVX2 version. */\n    XXH_ASSERT((((size_t)acc) & 15) == 0);\n    {   __m128i* const xacc    =       (__m128i *) acc;\n        /* Unaligned. This is mainly for pointer arithmetic, and because\n         * _mm_loadu_si128 requires a const __m128i * pointer for some reason. */\n        const         __m128i* const xinput  = (const __m128i *) input;\n        /* Unaligned. This is mainly for pointer arithmetic, and because\n         * _mm_loadu_si128 requires a const __m128i * pointer for some reason. */\n        const         __m128i* const xsecret = (const __m128i *) secret;\n\n        size_t i;\n        for (i=0; i < XXH_STRIPE_LEN/sizeof(__m128i); i++) {\n            /* data_vec    = xinput[i]; */\n            __m128i const data_vec    = _mm_loadu_si128   (xinput+i);\n            /* key_vec     = xsecret[i]; */\n            __m128i const key_vec     = _mm_loadu_si128   (xsecret+i);\n            /* data_key    = data_vec ^ key_vec; */\n            __m128i const data_key    = _mm_xor_si128     (data_vec, key_vec);\n            /* data_key_lo = data_key >> 32; */\n            __m128i const data_key_lo = _mm_shuffle_epi32 (data_key, _MM_SHUFFLE(0, 3, 0, 1));\n            /* product     = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */\n            __m128i const product     = _mm_mul_epu32     (data_key, data_key_lo);\n            /* xacc[i] += swap(data_vec); */\n            __m128i const data_swap = _mm_shuffle_epi32(data_vec, _MM_SHUFFLE(1,0,3,2));\n            __m128i const sum       = _mm_add_epi64(xacc[i], data_swap);\n            /* xacc[i] += product; */\n            xacc[i] = _mm_add_epi64(product, sum);\n    }   }\n}\nXXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)\n\nXXH_FORCE_INLINE XXH_TARGET_SSE2 void\nXXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)\n{\n    XXH_ASSERT((((size_t)acc) & 15) == 0);\n    {   __m128i* const xacc = (__m128i*) acc;\n        /* Unaligned. This is mainly for pointer arithmetic, and because\n         * _mm_loadu_si128 requires a const __m128i * pointer for some reason. */\n        const         __m128i* const xsecret = (const __m128i *) secret;\n        const __m128i prime32 = _mm_set1_epi32((int)XXH_PRIME32_1);\n\n        size_t i;\n        for (i=0; i < XXH_STRIPE_LEN/sizeof(__m128i); i++) {\n            /* xacc[i] ^= (xacc[i] >> 47) */\n            __m128i const acc_vec     = xacc[i];\n            __m128i const shifted     = _mm_srli_epi64    (acc_vec, 47);\n            __m128i const data_vec    = _mm_xor_si128     (acc_vec, shifted);\n            /* xacc[i] ^= xsecret[i]; */\n            __m128i const key_vec     = _mm_loadu_si128   (xsecret+i);\n            __m128i const data_key    = _mm_xor_si128     (data_vec, key_vec);\n\n            /* xacc[i] *= XXH_PRIME32_1; */\n            __m128i const data_key_hi = _mm_shuffle_epi32 (data_key, _MM_SHUFFLE(0, 3, 0, 1));\n            __m128i const prod_lo     = _mm_mul_epu32     (data_key, prime32);\n            __m128i const prod_hi     = _mm_mul_epu32     (data_key_hi, prime32);\n            xacc[i] = _mm_add_epi64(prod_lo, _mm_slli_epi64(prod_hi, 32));\n        }\n    }\n}\n\nXXH_FORCE_INLINE XXH_TARGET_SSE2 void XXH3_initCustomSecret_sse2(void* XXH_RESTRICT customSecret, xxh_u64 seed64)\n{\n    XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 15) == 0);\n    (void)(&XXH_writeLE64);\n    {   int const nbRounds = XXH_SECRET_DEFAULT_SIZE / sizeof(__m128i);\n\n#       if defined(_MSC_VER) && defined(_M_IX86) && _MSC_VER < 1900\n        /* MSVC 32bit mode does not support _mm_set_epi64x before 2015 */\n        XXH_ALIGN(16) const xxh_i64 seed64x2[2] = { (xxh_i64)seed64, (xxh_i64)(0U - seed64) };\n        __m128i const seed = _mm_load_si128((__m128i const*)seed64x2);\n#       else\n        __m128i const seed = _mm_set_epi64x((xxh_i64)(0U - seed64), (xxh_i64)seed64);\n#       endif\n        int i;\n\n        const void* const src16 = XXH3_kSecret;\n        __m128i* dst16 = (__m128i*) customSecret;\n#       if defined(__GNUC__) || defined(__clang__)\n        /*\n         * On GCC & Clang, marking 'dest' as modified will cause the compiler:\n         *   - do not extract the secret from sse registers in the internal loop\n         *   - use less common registers, and avoid pushing these reg into stack\n         */\n        XXH_COMPILER_GUARD(dst16);\n#       endif\n        XXH_ASSERT(((size_t)src16 & 15) == 0); /* control alignment */\n        XXH_ASSERT(((size_t)dst16 & 15) == 0);\n\n        for (i=0; i < nbRounds; ++i) {\n            dst16[i] = _mm_add_epi64(_mm_load_si128((const __m128i *)src16+i), seed);\n    }   }\n}\n\n#endif\n\n#if (XXH_VECTOR == XXH_NEON)\n\n/* forward declarations for the scalar routines */\nXXH_FORCE_INLINE void\nXXH3_scalarRound(void* XXH_RESTRICT acc, void const* XXH_RESTRICT input,\n                 void const* XXH_RESTRICT secret, size_t lane);\n\nXXH_FORCE_INLINE void\nXXH3_scalarScrambleRound(void* XXH_RESTRICT acc,\n                         void const* XXH_RESTRICT secret, size_t lane);\n\n/*!\n * @internal\n * @brief The bulk processing loop for NEON and WASM SIMD128.\n *\n * The NEON code path is actually partially scalar when running on AArch64. This\n * is to optimize the pipelining and can have up to 15% speedup depending on the\n * CPU, and it also mitigates some GCC codegen issues.\n *\n * @see XXH3_NEON_LANES for configuring this and details about this optimization.\n *\n * NEON's 32-bit to 64-bit long multiply takes a half vector of 32-bit\n * integers instead of the other platforms which mask full 64-bit vectors,\n * so the setup is more complicated than just shifting right.\n *\n * Additionally, there is an optimization for 4 lanes at once noted below.\n *\n * Since, as stated, the most optimal amount of lanes for Cortexes is 6,\n * there needs to be *three* versions of the accumulate operation used\n * for the remaining 2 lanes.\n *\n * WASM's SIMD128 uses SIMDe's arm_neon.h polyfill because the intrinsics overlap\n * nearly perfectly.\n */\n\nXXH_FORCE_INLINE void\nXXH3_accumulate_512_neon( void* XXH_RESTRICT acc,\n                    const void* XXH_RESTRICT input,\n                    const void* XXH_RESTRICT secret)\n{\n    XXH_ASSERT((((size_t)acc) & 15) == 0);\n    XXH_STATIC_ASSERT(XXH3_NEON_LANES > 0 && XXH3_NEON_LANES <= XXH_ACC_NB && XXH3_NEON_LANES % 2 == 0);\n    {   /* GCC for darwin arm64 does not like aliasing here */\n        xxh_aliasing_uint64x2_t* const xacc = (xxh_aliasing_uint64x2_t*) acc;\n        /* We don't use a uint32x4_t pointer because it causes bus errors on ARMv7. */\n        uint8_t const* xinput = (const uint8_t *) input;\n        uint8_t const* xsecret  = (const uint8_t *) secret;\n\n        size_t i;\n#ifdef __wasm_simd128__\n        /*\n         * On WASM SIMD128, Clang emits direct address loads when XXH3_kSecret\n         * is constant propagated, which results in it converting it to this\n         * inside the loop:\n         *\n         *    a = v128.load(XXH3_kSecret +  0 + $secret_offset, offset = 0)\n         *    b = v128.load(XXH3_kSecret + 16 + $secret_offset, offset = 0)\n         *    ...\n         *\n         * This requires a full 32-bit address immediate (and therefore a 6 byte\n         * instruction) as well as an add for each offset.\n         *\n         * Putting an asm guard prevents it from folding (at the cost of losing\n         * the alignment hint), and uses the free offset in `v128.load` instead\n         * of adding secret_offset each time which overall reduces code size by\n         * about a kilobyte and improves performance.\n         */\n        XXH_COMPILER_GUARD(xsecret);\n#endif\n        /* Scalar lanes use the normal scalarRound routine */\n        for (i = XXH3_NEON_LANES; i < XXH_ACC_NB; i++) {\n            XXH3_scalarRound(acc, input, secret, i);\n        }\n        i = 0;\n        /* 4 NEON lanes at a time. */\n        for (; i+1 < XXH3_NEON_LANES / 2; i+=2) {\n            /* data_vec = xinput[i]; */\n            uint64x2_t data_vec_1 = XXH_vld1q_u64(xinput  + (i * 16));\n            uint64x2_t data_vec_2 = XXH_vld1q_u64(xinput  + ((i+1) * 16));\n            /* key_vec  = xsecret[i];  */\n            uint64x2_t key_vec_1  = XXH_vld1q_u64(xsecret + (i * 16));\n            uint64x2_t key_vec_2  = XXH_vld1q_u64(xsecret + ((i+1) * 16));\n            /* data_swap = swap(data_vec) */\n            uint64x2_t data_swap_1 = vextq_u64(data_vec_1, data_vec_1, 1);\n            uint64x2_t data_swap_2 = vextq_u64(data_vec_2, data_vec_2, 1);\n            /* data_key = data_vec ^ key_vec; */\n            uint64x2_t data_key_1 = veorq_u64(data_vec_1, key_vec_1);\n            uint64x2_t data_key_2 = veorq_u64(data_vec_2, key_vec_2);\n\n            /*\n             * If we reinterpret the 64x2 vectors as 32x4 vectors, we can use a\n             * de-interleave operation for 4 lanes in 1 step with `vuzpq_u32` to\n             * get one vector with the low 32 bits of each lane, and one vector\n             * with the high 32 bits of each lane.\n             *\n             * The intrinsic returns a double vector because the original ARMv7-a\n             * instruction modified both arguments in place. AArch64 and SIMD128 emit\n             * two instructions from this intrinsic.\n             *\n             *  [ dk11L | dk11H | dk12L | dk12H ] -> [ dk11L | dk12L | dk21L | dk22L ]\n             *  [ dk21L | dk21H | dk22L | dk22H ] -> [ dk11H | dk12H | dk21H | dk22H ]\n             */\n            uint32x4x2_t unzipped = vuzpq_u32(\n                vreinterpretq_u32_u64(data_key_1),\n                vreinterpretq_u32_u64(data_key_2)\n            );\n            /* data_key_lo = data_key & 0xFFFFFFFF */\n            uint32x4_t data_key_lo = unzipped.val[0];\n            /* data_key_hi = data_key >> 32 */\n            uint32x4_t data_key_hi = unzipped.val[1];\n            /*\n             * Then, we can split the vectors horizontally and multiply which, as for most\n             * widening intrinsics, have a variant that works on both high half vectors\n             * for free on AArch64. A similar instruction is available on SIMD128.\n             *\n             * sum = data_swap + (u64x2) data_key_lo * (u64x2) data_key_hi\n             */\n            uint64x2_t sum_1 = XXH_vmlal_low_u32(data_swap_1, data_key_lo, data_key_hi);\n            uint64x2_t sum_2 = XXH_vmlal_high_u32(data_swap_2, data_key_lo, data_key_hi);\n            /*\n             * Clang reorders\n             *    a += b * c;     // umlal   swap.2d, dkl.2s, dkh.2s\n             *    c += a;         // add     acc.2d, acc.2d, swap.2d\n             * to\n             *    c += a;         // add     acc.2d, acc.2d, swap.2d\n             *    c += b * c;     // umlal   acc.2d, dkl.2s, dkh.2s\n             *\n             * While it would make sense in theory since the addition is faster,\n             * for reasons likely related to umlal being limited to certain NEON\n             * pipelines, this is worse. A compiler guard fixes this.\n             */\n            XXH_COMPILER_GUARD_CLANG_NEON(sum_1);\n            XXH_COMPILER_GUARD_CLANG_NEON(sum_2);\n            /* xacc[i] = acc_vec + sum; */\n            xacc[i]   = vaddq_u64(xacc[i], sum_1);\n            xacc[i+1] = vaddq_u64(xacc[i+1], sum_2);\n        }\n        /* Operate on the remaining NEON lanes 2 at a time. */\n        for (; i < XXH3_NEON_LANES / 2; i++) {\n            /* data_vec = xinput[i]; */\n            uint64x2_t data_vec = XXH_vld1q_u64(xinput  + (i * 16));\n            /* key_vec  = xsecret[i];  */\n            uint64x2_t key_vec  = XXH_vld1q_u64(xsecret + (i * 16));\n            /* acc_vec_2 = swap(data_vec) */\n            uint64x2_t data_swap = vextq_u64(data_vec, data_vec, 1);\n            /* data_key = data_vec ^ key_vec; */\n            uint64x2_t data_key = veorq_u64(data_vec, key_vec);\n            /* For two lanes, just use VMOVN and VSHRN. */\n            /* data_key_lo = data_key & 0xFFFFFFFF; */\n            uint32x2_t data_key_lo = vmovn_u64(data_key);\n            /* data_key_hi = data_key >> 32; */\n            uint32x2_t data_key_hi = vshrn_n_u64(data_key, 32);\n            /* sum = data_swap + (u64x2) data_key_lo * (u64x2) data_key_hi; */\n            uint64x2_t sum = vmlal_u32(data_swap, data_key_lo, data_key_hi);\n            /* Same Clang workaround as before */\n            XXH_COMPILER_GUARD_CLANG_NEON(sum);\n            /* xacc[i] = acc_vec + sum; */\n            xacc[i] = vaddq_u64 (xacc[i], sum);\n        }\n    }\n}\nXXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(neon)\n\nXXH_FORCE_INLINE void\nXXH3_scrambleAcc_neon(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)\n{\n    XXH_ASSERT((((size_t)acc) & 15) == 0);\n\n    {   xxh_aliasing_uint64x2_t* xacc       = (xxh_aliasing_uint64x2_t*) acc;\n        uint8_t const* xsecret = (uint8_t const*) secret;\n\n        size_t i;\n        /* WASM uses operator overloads and doesn't need these. */\n#ifndef __wasm_simd128__\n        /* { prime32_1, prime32_1 } */\n        uint32x2_t const kPrimeLo = vdup_n_u32(XXH_PRIME32_1);\n        /* { 0, prime32_1, 0, prime32_1 } */\n        uint32x4_t const kPrimeHi = vreinterpretq_u32_u64(vdupq_n_u64((xxh_u64)XXH_PRIME32_1 << 32));\n#endif\n\n        /* AArch64 uses both scalar and neon at the same time */\n        for (i = XXH3_NEON_LANES; i < XXH_ACC_NB; i++) {\n            XXH3_scalarScrambleRound(acc, secret, i);\n        }\n        for (i=0; i < XXH3_NEON_LANES / 2; i++) {\n            /* xacc[i] ^= (xacc[i] >> 47); */\n            uint64x2_t acc_vec  = xacc[i];\n            uint64x2_t shifted  = vshrq_n_u64(acc_vec, 47);\n            uint64x2_t data_vec = veorq_u64(acc_vec, shifted);\n\n            /* xacc[i] ^= xsecret[i]; */\n            uint64x2_t key_vec  = XXH_vld1q_u64(xsecret + (i * 16));\n            uint64x2_t data_key = veorq_u64(data_vec, key_vec);\n            /* xacc[i] *= XXH_PRIME32_1 */\n#ifdef __wasm_simd128__\n            /* SIMD128 has multiply by u64x2, use it instead of expanding and scalarizing */\n            xacc[i] = data_key * XXH_PRIME32_1;\n#else\n            /*\n             * Expanded version with portable NEON intrinsics\n             *\n             *    lo(x) * lo(y) + (hi(x) * lo(y) << 32)\n             *\n             * prod_hi = hi(data_key) * lo(prime) << 32\n             *\n             * Since we only need 32 bits of this multiply a trick can be used, reinterpreting the vector\n             * as a uint32x4_t and multiplying by { 0, prime, 0, prime } to cancel out the unwanted bits\n             * and avoid the shift.\n             */\n            uint32x4_t prod_hi = vmulq_u32 (vreinterpretq_u32_u64(data_key), kPrimeHi);\n            /* Extract low bits for vmlal_u32  */\n            uint32x2_t data_key_lo = vmovn_u64(data_key);\n            /* xacc[i] = prod_hi + lo(data_key) * XXH_PRIME32_1; */\n            xacc[i] = vmlal_u32(vreinterpretq_u64_u32(prod_hi), data_key_lo, kPrimeLo);\n#endif\n        }\n    }\n}\n#endif\n\n#if (XXH_VECTOR == XXH_VSX)\n\nXXH_FORCE_INLINE void\nXXH3_accumulate_512_vsx(  void* XXH_RESTRICT acc,\n                    const void* XXH_RESTRICT input,\n                    const void* XXH_RESTRICT secret)\n{\n    /* presumed aligned */\n    xxh_aliasing_u64x2* const xacc = (xxh_aliasing_u64x2*) acc;\n    xxh_u8 const* const xinput   = (xxh_u8 const*) input;   /* no alignment restriction */\n    xxh_u8 const* const xsecret  = (xxh_u8 const*) secret;    /* no alignment restriction */\n    xxh_u64x2 const v32 = { 32, 32 };\n    size_t i;\n    for (i = 0; i < XXH_STRIPE_LEN / sizeof(xxh_u64x2); i++) {\n        /* data_vec = xinput[i]; */\n        xxh_u64x2 const data_vec = XXH_vec_loadu(xinput + 16*i);\n        /* key_vec = xsecret[i]; */\n        xxh_u64x2 const key_vec  = XXH_vec_loadu(xsecret + 16*i);\n        xxh_u64x2 const data_key = data_vec ^ key_vec;\n        /* shuffled = (data_key << 32) | (data_key >> 32); */\n        xxh_u32x4 const shuffled = (xxh_u32x4)vec_rl(data_key, v32);\n        /* product = ((xxh_u64x2)data_key & 0xFFFFFFFF) * ((xxh_u64x2)shuffled & 0xFFFFFFFF); */\n        xxh_u64x2 const product  = XXH_vec_mulo((xxh_u32x4)data_key, shuffled);\n        /* acc_vec = xacc[i]; */\n        xxh_u64x2 acc_vec        = xacc[i];\n        acc_vec += product;\n\n        /* swap high and low halves */\n#ifdef __s390x__\n        acc_vec += vec_permi(data_vec, data_vec, 2);\n#else\n        acc_vec += vec_xxpermdi(data_vec, data_vec, 2);\n#endif\n        xacc[i] = acc_vec;\n    }\n}\nXXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(vsx)\n\nXXH_FORCE_INLINE void\nXXH3_scrambleAcc_vsx(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)\n{\n    XXH_ASSERT((((size_t)acc) & 15) == 0);\n\n    {   xxh_aliasing_u64x2* const xacc = (xxh_aliasing_u64x2*) acc;\n        const xxh_u8* const xsecret = (const xxh_u8*) secret;\n        /* constants */\n        xxh_u64x2 const v32  = { 32, 32 };\n        xxh_u64x2 const v47 = { 47, 47 };\n        xxh_u32x4 const prime = { XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1 };\n        size_t i;\n        for (i = 0; i < XXH_STRIPE_LEN / sizeof(xxh_u64x2); i++) {\n            /* xacc[i] ^= (xacc[i] >> 47); */\n            xxh_u64x2 const acc_vec  = xacc[i];\n            xxh_u64x2 const data_vec = acc_vec ^ (acc_vec >> v47);\n\n            /* xacc[i] ^= xsecret[i]; */\n            xxh_u64x2 const key_vec  = XXH_vec_loadu(xsecret + 16*i);\n            xxh_u64x2 const data_key = data_vec ^ key_vec;\n\n            /* xacc[i] *= XXH_PRIME32_1 */\n            /* prod_lo = ((xxh_u64x2)data_key & 0xFFFFFFFF) * ((xxh_u64x2)prime & 0xFFFFFFFF);  */\n            xxh_u64x2 const prod_even  = XXH_vec_mule((xxh_u32x4)data_key, prime);\n            /* prod_hi = ((xxh_u64x2)data_key >> 32) * ((xxh_u64x2)prime >> 32);  */\n            xxh_u64x2 const prod_odd  = XXH_vec_mulo((xxh_u32x4)data_key, prime);\n            xacc[i] = prod_odd + (prod_even << v32);\n    }   }\n}\n\n#endif\n\n#if (XXH_VECTOR == XXH_SVE)\n\nXXH_FORCE_INLINE void\nXXH3_accumulate_512_sve( void* XXH_RESTRICT acc,\n                   const void* XXH_RESTRICT input,\n                   const void* XXH_RESTRICT secret)\n{\n    uint64_t *xacc = (uint64_t *)acc;\n    const uint64_t *xinput = (const uint64_t *)(const void *)input;\n    const uint64_t *xsecret = (const uint64_t *)(const void *)secret;\n    svuint64_t kSwap = sveor_n_u64_z(svptrue_b64(), svindex_u64(0, 1), 1);\n    uint64_t element_count = svcntd();\n    if (element_count >= 8) {\n        svbool_t mask = svptrue_pat_b64(SV_VL8);\n        svuint64_t vacc = svld1_u64(mask, xacc);\n        ACCRND(vacc, 0);\n        svst1_u64(mask, xacc, vacc);\n    } else if (element_count == 2) {   /* sve128 */\n        svbool_t mask = svptrue_pat_b64(SV_VL2);\n        svuint64_t acc0 = svld1_u64(mask, xacc + 0);\n        svuint64_t acc1 = svld1_u64(mask, xacc + 2);\n        svuint64_t acc2 = svld1_u64(mask, xacc + 4);\n        svuint64_t acc3 = svld1_u64(mask, xacc + 6);\n        ACCRND(acc0, 0);\n        ACCRND(acc1, 2);\n        ACCRND(acc2, 4);\n        ACCRND(acc3, 6);\n        svst1_u64(mask, xacc + 0, acc0);\n        svst1_u64(mask, xacc + 2, acc1);\n        svst1_u64(mask, xacc + 4, acc2);\n        svst1_u64(mask, xacc + 6, acc3);\n    } else {\n        svbool_t mask = svptrue_pat_b64(SV_VL4);\n        svuint64_t acc0 = svld1_u64(mask, xacc + 0);\n        svuint64_t acc1 = svld1_u64(mask, xacc + 4);\n        ACCRND(acc0, 0);\n        ACCRND(acc1, 4);\n        svst1_u64(mask, xacc + 0, acc0);\n        svst1_u64(mask, xacc + 4, acc1);\n    }\n}\n\nXXH_FORCE_INLINE void\nXXH3_accumulate_sve(xxh_u64* XXH_RESTRICT acc,\n               const xxh_u8* XXH_RESTRICT input,\n               const xxh_u8* XXH_RESTRICT secret,\n               size_t nbStripes)\n{\n    if (nbStripes != 0) {\n        uint64_t *xacc = (uint64_t *)acc;\n        const uint64_t *xinput = (const uint64_t *)(const void *)input;\n        const uint64_t *xsecret = (const uint64_t *)(const void *)secret;\n        svuint64_t kSwap = sveor_n_u64_z(svptrue_b64(), svindex_u64(0, 1), 1);\n        uint64_t element_count = svcntd();\n        if (element_count >= 8) {\n            svbool_t mask = svptrue_pat_b64(SV_VL8);\n            svuint64_t vacc = svld1_u64(mask, xacc + 0);\n            do {\n                /* svprfd(svbool_t, void *, enum svfprop); */\n                svprfd(mask, xinput + 128, SV_PLDL1STRM);\n                ACCRND(vacc, 0);\n                xinput += 8;\n                xsecret += 1;\n                nbStripes--;\n           } while (nbStripes != 0);\n\n           svst1_u64(mask, xacc + 0, vacc);\n        } else if (element_count == 2) { /* sve128 */\n            svbool_t mask = svptrue_pat_b64(SV_VL2);\n            svuint64_t acc0 = svld1_u64(mask, xacc + 0);\n            svuint64_t acc1 = svld1_u64(mask, xacc + 2);\n            svuint64_t acc2 = svld1_u64(mask, xacc + 4);\n            svuint64_t acc3 = svld1_u64(mask, xacc + 6);\n            do {\n                svprfd(mask, xinput + 128, SV_PLDL1STRM);\n                ACCRND(acc0, 0);\n                ACCRND(acc1, 2);\n                ACCRND(acc2, 4);\n                ACCRND(acc3, 6);\n                xinput += 8;\n                xsecret += 1;\n                nbStripes--;\n           } while (nbStripes != 0);\n\n           svst1_u64(mask, xacc + 0, acc0);\n           svst1_u64(mask, xacc + 2, acc1);\n           svst1_u64(mask, xacc + 4, acc2);\n           svst1_u64(mask, xacc + 6, acc3);\n        } else {\n            svbool_t mask = svptrue_pat_b64(SV_VL4);\n            svuint64_t acc0 = svld1_u64(mask, xacc + 0);\n            svuint64_t acc1 = svld1_u64(mask, xacc + 4);\n            do {\n                svprfd(mask, xinput + 128, SV_PLDL1STRM);\n                ACCRND(acc0, 0);\n                ACCRND(acc1, 4);\n                xinput += 8;\n                xsecret += 1;\n                nbStripes--;\n           } while (nbStripes != 0);\n\n           svst1_u64(mask, xacc + 0, acc0);\n           svst1_u64(mask, xacc + 4, acc1);\n       }\n    }\n}\n\n#endif\n\n#if (XXH_VECTOR == XXH_LSX)\n#define _LSX_SHUFFLE(z, y, x, w) (((z) << 6) | ((y) << 4) | ((x) << 2) | (w))\n\nXXH_FORCE_INLINE void\nXXH3_accumulate_512_lsx( void* XXH_RESTRICT acc,\n                    const void* XXH_RESTRICT input,\n                    const void* XXH_RESTRICT secret)\n{\n    XXH_ASSERT((((size_t)acc) & 15) == 0);\n    {\n        __m128i* const xacc    =       (__m128i *) acc;\n        const __m128i* const xinput  = (const __m128i *) input;\n        const __m128i* const xsecret = (const __m128i *) secret;\n\n        for (size_t i = 0; i < XXH_STRIPE_LEN / sizeof(__m128i); i++) {\n            /* data_vec = xinput[i]; */\n            __m128i const data_vec = __lsx_vld(xinput + i, 0);\n            /* key_vec = xsecret[i]; */\n            __m128i const key_vec = __lsx_vld(xsecret + i, 0);\n            /* data_key = data_vec ^ key_vec; */\n            __m128i const data_key = __lsx_vxor_v(data_vec, key_vec);\n            /* data_key_lo = data_key >> 32; */\n            __m128i const data_key_lo = __lsx_vsrli_d(data_key, 32);\n            // __m128i const data_key_lo = __lsx_vsrli_d(data_key, 32);\n            /* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */\n            __m128i const product = __lsx_vmulwev_d_wu(data_key, data_key_lo);\n            /* xacc[i] += swap(data_vec); */\n            __m128i const data_swap = __lsx_vshuf4i_w(data_vec, _LSX_SHUFFLE(1, 0, 3, 2));\n            __m128i const sum = __lsx_vadd_d(xacc[i], data_swap);\n            /* xacc[i] += product; */\n            xacc[i] = __lsx_vadd_d(product, sum);\n        }\n    }\n}\nXXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(lsx)\n\nXXH_FORCE_INLINE void\nXXH3_scrambleAcc_lsx(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)\n{\n    XXH_ASSERT((((size_t)acc) & 15) == 0);\n    {\n        __m128i* const xacc = (__m128i*) acc;\n        const __m128i* const xsecret = (const __m128i *) secret;\n        const __m128i prime32 = __lsx_vreplgr2vr_w((int)XXH_PRIME32_1);\n\n        for (size_t i = 0; i < XXH_STRIPE_LEN / sizeof(__m128i); i++) {\n            /* xacc[i] ^= (xacc[i] >> 47) */\n            __m128i const acc_vec = xacc[i];\n            __m128i const shifted = __lsx_vsrli_d(acc_vec, 47);\n            __m128i const data_vec = __lsx_vxor_v(acc_vec, shifted);\n            /* xacc[i] ^= xsecret[i]; */\n            __m128i const key_vec = __lsx_vld(xsecret + i, 0);\n            __m128i const data_key = __lsx_vxor_v(data_vec, key_vec);\n\n            /* xacc[i] *= XXH_PRIME32_1; */\n            __m128i const data_key_hi = __lsx_vsrli_d(data_key, 32);\n            __m128i const prod_lo = __lsx_vmulwev_d_wu(data_key, prime32);\n            __m128i const prod_hi = __lsx_vmulwev_d_wu(data_key_hi, prime32);\n            xacc[i] = __lsx_vadd_d(prod_lo, __lsx_vslli_d(prod_hi, 32));\n        }\n    }\n}\n\n#endif\n\n/* scalar variants - universal */\n\n#if defined(__aarch64__) && (defined(__GNUC__) || defined(__clang__))\n/*\n * In XXH3_scalarRound(), GCC and Clang have a similar codegen issue, where they\n * emit an excess mask and a full 64-bit multiply-add (MADD X-form).\n *\n * While this might not seem like much, as AArch64 is a 64-bit architecture, only\n * big Cortex designs have a full 64-bit multiplier.\n *\n * On the little cores, the smaller 32-bit multiplier is used, and full 64-bit\n * multiplies expand to 2-3 multiplies in microcode. This has a major penalty\n * of up to 4 latency cycles and 2 stall cycles in the multiply pipeline.\n *\n * Thankfully, AArch64 still provides the 32-bit long multiply-add (UMADDL) which does\n * not have this penalty and does the mask automatically.\n */\nXXH_FORCE_INLINE xxh_u64\nXXH_mult32to64_add64(xxh_u64 lhs, xxh_u64 rhs, xxh_u64 acc)\n{\n    xxh_u64 ret;\n    /* note: %x = 64-bit register, %w = 32-bit register */\n    __asm__(\"umaddl %x0, %w1, %w2, %x3\" : \"=r\" (ret) : \"r\" (lhs), \"r\" (rhs), \"r\" (acc));\n    return ret;\n}\n#else\nXXH_FORCE_INLINE xxh_u64\nXXH_mult32to64_add64(xxh_u64 lhs, xxh_u64 rhs, xxh_u64 acc)\n{\n    return XXH_mult32to64((xxh_u32)lhs, (xxh_u32)rhs) + acc;\n}\n#endif\n\n/*!\n * @internal\n * @brief Scalar round for @ref XXH3_accumulate_512_scalar().\n *\n * This is extracted to its own function because the NEON path uses a combination\n * of NEON and scalar.\n */\nXXH_FORCE_INLINE void\nXXH3_scalarRound(void* XXH_RESTRICT acc,\n                 void const* XXH_RESTRICT input,\n                 void const* XXH_RESTRICT secret,\n                 size_t lane)\n{\n    xxh_u64* xacc = (xxh_u64*) acc;\n    xxh_u8 const* xinput  = (xxh_u8 const*) input;\n    xxh_u8 const* xsecret = (xxh_u8 const*) secret;\n    XXH_ASSERT(lane < XXH_ACC_NB);\n    XXH_ASSERT(((size_t)acc & (XXH_ACC_ALIGN-1)) == 0);\n    {\n        xxh_u64 const data_val = XXH_readLE64(xinput + lane * 8);\n        xxh_u64 const data_key = data_val ^ XXH_readLE64(xsecret + lane * 8);\n        xacc[lane ^ 1] += data_val; /* swap adjacent lanes */\n        xacc[lane] = XXH_mult32to64_add64(data_key /* & 0xFFFFFFFF */, data_key >> 32, xacc[lane]);\n    }\n}\n\n/*!\n * @internal\n * @brief Processes a 64 byte block of data using the scalar path.\n */\nXXH_FORCE_INLINE void\nXXH3_accumulate_512_scalar(void* XXH_RESTRICT acc,\n                     const void* XXH_RESTRICT input,\n                     const void* XXH_RESTRICT secret)\n{\n    size_t i;\n    /* ARM GCC refuses to unroll this loop, resulting in a 24% slowdown on ARMv6. */\n#if defined(__GNUC__) && !defined(__clang__) \\\n  && (defined(__arm__) || defined(__thumb2__)) \\\n  && defined(__ARM_FEATURE_UNALIGNED) /* no unaligned access just wastes bytes */ \\\n  && XXH_SIZE_OPT <= 0\n#  pragma GCC unroll 8\n#endif\n    for (i=0; i < XXH_ACC_NB; i++) {\n        XXH3_scalarRound(acc, input, secret, i);\n    }\n}\nXXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(scalar)\n\n/*!\n * @internal\n * @brief Scalar scramble step for @ref XXH3_scrambleAcc_scalar().\n *\n * This is extracted to its own function because the NEON path uses a combination\n * of NEON and scalar.\n */\nXXH_FORCE_INLINE void\nXXH3_scalarScrambleRound(void* XXH_RESTRICT acc,\n                         void const* XXH_RESTRICT secret,\n                         size_t lane)\n{\n    xxh_u64* const xacc = (xxh_u64*) acc;   /* presumed aligned */\n    const xxh_u8* const xsecret = (const xxh_u8*) secret;   /* no alignment restriction */\n    XXH_ASSERT((((size_t)acc) & (XXH_ACC_ALIGN-1)) == 0);\n    XXH_ASSERT(lane < XXH_ACC_NB);\n    {\n        xxh_u64 const key64 = XXH_readLE64(xsecret + lane * 8);\n        xxh_u64 acc64 = xacc[lane];\n        acc64 = XXH_xorshift64(acc64, 47);\n        acc64 ^= key64;\n        acc64 *= XXH_PRIME32_1;\n        xacc[lane] = acc64;\n    }\n}\n\n/*!\n * @internal\n * @brief Scrambles the accumulators after a large chunk has been read\n */\nXXH_FORCE_INLINE void\nXXH3_scrambleAcc_scalar(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)\n{\n    size_t i;\n    for (i=0; i < XXH_ACC_NB; i++) {\n        XXH3_scalarScrambleRound(acc, secret, i);\n    }\n}\n\nXXH_FORCE_INLINE void\nXXH3_initCustomSecret_scalar(void* XXH_RESTRICT customSecret, xxh_u64 seed64)\n{\n    /*\n     * We need a separate pointer for the hack below,\n     * which requires a non-const pointer.\n     * Any decent compiler will optimize this out otherwise.\n     */\n    const xxh_u8* kSecretPtr = XXH3_kSecret;\n    XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 15) == 0);\n\n#if defined(__GNUC__) && defined(__aarch64__)\n    /*\n     * UGLY HACK:\n     * GCC and Clang generate a bunch of MOV/MOVK pairs for aarch64, and they are\n     * placed sequentially, in order, at the top of the unrolled loop.\n     *\n     * While MOVK is great for generating constants (2 cycles for a 64-bit\n     * constant compared to 4 cycles for LDR), it fights for bandwidth with\n     * the arithmetic instructions.\n     *\n     *   I   L   S\n     * MOVK\n     * MOVK\n     * MOVK\n     * MOVK\n     * ADD\n     * SUB      STR\n     *          STR\n     * By forcing loads from memory (as the asm line causes the compiler to assume\n     * that XXH3_kSecretPtr has been changed), the pipelines are used more\n     * efficiently:\n     *   I   L   S\n     *      LDR\n     *  ADD LDR\n     *  SUB     STR\n     *          STR\n     *\n     * See XXH3_NEON_LANES for details on the pipsline.\n     *\n     * XXH3_64bits_withSeed, len == 256, Snapdragon 835\n     *   without hack: 2654.4 MB/s\n     *   with hack:    3202.9 MB/s\n     */\n    XXH_COMPILER_GUARD(kSecretPtr);\n#endif\n    {   int const nbRounds = XXH_SECRET_DEFAULT_SIZE / 16;\n        int i;\n        for (i=0; i < nbRounds; i++) {\n            /*\n             * The asm hack causes the compiler to assume that kSecretPtr aliases with\n             * customSecret, and on aarch64, this prevented LDP from merging two\n             * loads together for free. Putting the loads together before the stores\n             * properly generates LDP.\n             */\n            xxh_u64 lo = XXH_readLE64(kSecretPtr + 16*i)     + seed64;\n            xxh_u64 hi = XXH_readLE64(kSecretPtr + 16*i + 8) - seed64;\n            XXH_writeLE64((xxh_u8*)customSecret + 16*i,     lo);\n            XXH_writeLE64((xxh_u8*)customSecret + 16*i + 8, hi);\n    }   }\n}\n\n\ntypedef void (*XXH3_f_accumulate)(xxh_u64* XXH_RESTRICT, const xxh_u8* XXH_RESTRICT, const xxh_u8* XXH_RESTRICT, size_t);\ntypedef void (*XXH3_f_scrambleAcc)(void* XXH_RESTRICT, const void*);\ntypedef void (*XXH3_f_initCustomSecret)(void* XXH_RESTRICT, xxh_u64);\n\n\n#if (XXH_VECTOR == XXH_AVX512)\n\n#define XXH3_accumulate_512 XXH3_accumulate_512_avx512\n#define XXH3_accumulate     XXH3_accumulate_avx512\n#define XXH3_scrambleAcc    XXH3_scrambleAcc_avx512\n#define XXH3_initCustomSecret XXH3_initCustomSecret_avx512\n\n#elif (XXH_VECTOR == XXH_AVX2)\n\n#define XXH3_accumulate_512 XXH3_accumulate_512_avx2\n#define XXH3_accumulate     XXH3_accumulate_avx2\n#define XXH3_scrambleAcc    XXH3_scrambleAcc_avx2\n#define XXH3_initCustomSecret XXH3_initCustomSecret_avx2\n\n#elif (XXH_VECTOR == XXH_SSE2)\n\n#define XXH3_accumulate_512 XXH3_accumulate_512_sse2\n#define XXH3_accumulate     XXH3_accumulate_sse2\n#define XXH3_scrambleAcc    XXH3_scrambleAcc_sse2\n#define XXH3_initCustomSecret XXH3_initCustomSecret_sse2\n\n#elif (XXH_VECTOR == XXH_NEON)\n\n#define XXH3_accumulate_512 XXH3_accumulate_512_neon\n#define XXH3_accumulate     XXH3_accumulate_neon\n#define XXH3_scrambleAcc    XXH3_scrambleAcc_neon\n#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar\n\n#elif (XXH_VECTOR == XXH_VSX)\n\n#define XXH3_accumulate_512 XXH3_accumulate_512_vsx\n#define XXH3_accumulate     XXH3_accumulate_vsx\n#define XXH3_scrambleAcc    XXH3_scrambleAcc_vsx\n#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar\n\n#elif (XXH_VECTOR == XXH_SVE)\n#define XXH3_accumulate_512 XXH3_accumulate_512_sve\n#define XXH3_accumulate     XXH3_accumulate_sve\n#define XXH3_scrambleAcc    XXH3_scrambleAcc_scalar\n#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar\n\n#elif (XXH_VECTOR == XXH_LSX)\n#define XXH3_accumulate_512 XXH3_accumulate_512_lsx\n#define XXH3_accumulate     XXH3_accumulate_lsx\n#define XXH3_scrambleAcc    XXH3_scrambleAcc_lsx\n#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar\n\n#else /* scalar */\n\n#define XXH3_accumulate_512 XXH3_accumulate_512_scalar\n#define XXH3_accumulate     XXH3_accumulate_scalar\n#define XXH3_scrambleAcc    XXH3_scrambleAcc_scalar\n#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar\n\n#endif\n\n#if XXH_SIZE_OPT >= 1 /* don't do SIMD for initialization */\n#  undef XXH3_initCustomSecret\n#  define XXH3_initCustomSecret XXH3_initCustomSecret_scalar\n#endif\n\nXXH_FORCE_INLINE void\nXXH3_hashLong_internal_loop(xxh_u64* XXH_RESTRICT acc,\n                      const xxh_u8* XXH_RESTRICT input, size_t len,\n                      const xxh_u8* XXH_RESTRICT secret, size_t secretSize,\n                            XXH3_f_accumulate f_acc,\n                            XXH3_f_scrambleAcc f_scramble)\n{\n    size_t const nbStripesPerBlock = (secretSize - XXH_STRIPE_LEN) / XXH_SECRET_CONSUME_RATE;\n    size_t const block_len = XXH_STRIPE_LEN * nbStripesPerBlock;\n    size_t const nb_blocks = (len - 1) / block_len;\n\n    size_t n;\n\n    XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN);\n\n    for (n = 0; n < nb_blocks; n++) {\n        f_acc(acc, input + n*block_len, secret, nbStripesPerBlock);\n        f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN);\n    }\n\n    /* last partial block */\n    XXH_ASSERT(len > XXH_STRIPE_LEN);\n    {   size_t const nbStripes = ((len - 1) - (block_len * nb_blocks)) / XXH_STRIPE_LEN;\n        XXH_ASSERT(nbStripes <= (secretSize / XXH_SECRET_CONSUME_RATE));\n        f_acc(acc, input + nb_blocks*block_len, secret, nbStripes);\n\n        /* last stripe */\n        {   const xxh_u8* const p = input + len - XXH_STRIPE_LEN;\n#define XXH_SECRET_LASTACC_START 7  /* not aligned on 8, last secret is different from acc & scrambler */\n            XXH3_accumulate_512(acc, p, secret + secretSize - XXH_STRIPE_LEN - XXH_SECRET_LASTACC_START);\n    }   }\n}\n\nXXH_FORCE_INLINE xxh_u64\nXXH3_mix2Accs(const xxh_u64* XXH_RESTRICT acc, const xxh_u8* XXH_RESTRICT secret)\n{\n    return XXH3_mul128_fold64(\n               acc[0] ^ XXH_readLE64(secret),\n               acc[1] ^ XXH_readLE64(secret+8) );\n}\n\nstatic XXH_PUREF XXH64_hash_t\nXXH3_mergeAccs(const xxh_u64* XXH_RESTRICT acc, const xxh_u8* XXH_RESTRICT secret, xxh_u64 start)\n{\n    xxh_u64 result64 = start;\n    size_t i = 0;\n\n    for (i = 0; i < 4; i++) {\n        result64 += XXH3_mix2Accs(acc+2*i, secret + 16*i);\n#if defined(__clang__)                                /* Clang */ \\\n    && (defined(__arm__) || defined(__thumb__))       /* ARMv7 */ \\\n    && (defined(__ARM_NEON) || defined(__ARM_NEON__)) /* NEON */  \\\n    && !defined(XXH_ENABLE_AUTOVECTORIZE)             /* Define to disable */\n        /*\n         * UGLY HACK:\n         * Prevent autovectorization on Clang ARMv7-a. Exact same problem as\n         * the one in XXH3_len_129to240_64b. Speeds up shorter keys > 240b.\n         * XXH3_64bits, len == 256, Snapdragon 835:\n         *   without hack: 2063.7 MB/s\n         *   with hack:    2560.7 MB/s\n         */\n        XXH_COMPILER_GUARD(result64);\n#endif\n    }\n\n    return XXH3_avalanche(result64);\n}\n\n/* do not align on 8, so that the secret is different from the accumulator */\n#define XXH_SECRET_MERGEACCS_START 11\n\nstatic XXH_PUREF XXH64_hash_t\nXXH3_finalizeLong_64b(const xxh_u64* XXH_RESTRICT acc, const xxh_u8* XXH_RESTRICT secret, xxh_u64 len)\n{\n    return XXH3_mergeAccs(acc, secret + XXH_SECRET_MERGEACCS_START, len * XXH_PRIME64_1);\n}\n\n#define XXH3_INIT_ACC { XXH_PRIME32_3, XXH_PRIME64_1, XXH_PRIME64_2, XXH_PRIME64_3, \\\n                        XXH_PRIME64_4, XXH_PRIME32_2, XXH_PRIME64_5, XXH_PRIME32_1 }\n\nXXH_FORCE_INLINE XXH64_hash_t\nXXH3_hashLong_64b_internal(const void* XXH_RESTRICT input, size_t len,\n                           const void* XXH_RESTRICT secret, size_t secretSize,\n                           XXH3_f_accumulate f_acc,\n                           XXH3_f_scrambleAcc f_scramble)\n{\n    XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[XXH_ACC_NB] = XXH3_INIT_ACC;\n\n    XXH3_hashLong_internal_loop(acc, (const xxh_u8*)input, len, (const xxh_u8*)secret, secretSize, f_acc, f_scramble);\n\n    /* converge into final hash */\n    XXH_STATIC_ASSERT(sizeof(acc) == 64);\n    XXH_ASSERT(secretSize >= sizeof(acc) + XXH_SECRET_MERGEACCS_START);\n    return XXH3_finalizeLong_64b(acc, (const xxh_u8*)secret, (xxh_u64)len);\n}\n\n/*\n * It's important for performance to transmit secret's size (when it's static)\n * so that the compiler can properly optimize the vectorized loop.\n * This makes a big performance difference for \"medium\" keys (<1 KB) when using AVX instruction set.\n * When the secret size is unknown, or on GCC 12 where the mix of NO_INLINE and FORCE_INLINE\n * breaks -Og, this is XXH_NO_INLINE.\n */\nXXH3_WITH_SECRET_INLINE XXH64_hash_t\nXXH3_hashLong_64b_withSecret(const void* XXH_RESTRICT input, size_t len,\n                             XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen)\n{\n    (void)seed64;\n    return XXH3_hashLong_64b_internal(input, len, secret, secretLen, XXH3_accumulate, XXH3_scrambleAcc);\n}\n\n/*\n * It's preferable for performance that XXH3_hashLong is not inlined,\n * as it results in a smaller function for small data, easier to the instruction cache.\n * Note that inside this no_inline function, we do inline the internal loop,\n * and provide a statically defined secret size to allow optimization of vector loop.\n */\nXXH_NO_INLINE XXH_PUREF XXH64_hash_t\nXXH3_hashLong_64b_default(const void* XXH_RESTRICT input, size_t len,\n                          XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen)\n{\n    (void)seed64; (void)secret; (void)secretLen;\n    return XXH3_hashLong_64b_internal(input, len, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_accumulate, XXH3_scrambleAcc);\n}\n\n/*\n * XXH3_hashLong_64b_withSeed():\n * Generate a custom key based on alteration of default XXH3_kSecret with the seed,\n * and then use this key for long mode hashing.\n *\n * This operation is decently fast but nonetheless costs a little bit of time.\n * Try to avoid it whenever possible (typically when seed==0).\n *\n * It's important for performance that XXH3_hashLong is not inlined. Not sure\n * why (uop cache maybe?), but the difference is large and easily measurable.\n */\nXXH_FORCE_INLINE XXH64_hash_t\nXXH3_hashLong_64b_withSeed_internal(const void* input, size_t len,\n                                    XXH64_hash_t seed,\n                                    XXH3_f_accumulate f_acc,\n                                    XXH3_f_scrambleAcc f_scramble,\n                                    XXH3_f_initCustomSecret f_initSec)\n{\n#if XXH_SIZE_OPT <= 0\n    if (seed == 0)\n        return XXH3_hashLong_64b_internal(input, len,\n                                          XXH3_kSecret, sizeof(XXH3_kSecret),\n                                          f_acc, f_scramble);\n#endif\n    {   XXH_ALIGN(XXH_SEC_ALIGN) xxh_u8 secret[XXH_SECRET_DEFAULT_SIZE];\n        f_initSec(secret, seed);\n        return XXH3_hashLong_64b_internal(input, len, secret, sizeof(secret),\n                                          f_acc, f_scramble);\n    }\n}\n\n/*\n * It's important for performance that XXH3_hashLong is not inlined.\n */\nXXH_NO_INLINE XXH64_hash_t\nXXH3_hashLong_64b_withSeed(const void* XXH_RESTRICT input, size_t len,\n                           XXH64_hash_t seed, const xxh_u8* XXH_RESTRICT secret, size_t secretLen)\n{\n    (void)secret; (void)secretLen;\n    return XXH3_hashLong_64b_withSeed_internal(input, len, seed,\n                XXH3_accumulate, XXH3_scrambleAcc, XXH3_initCustomSecret);\n}\n\n\ntypedef XXH64_hash_t (*XXH3_hashLong64_f)(const void* XXH_RESTRICT, size_t,\n                                          XXH64_hash_t, const xxh_u8* XXH_RESTRICT, size_t);\n\nXXH_FORCE_INLINE XXH64_hash_t\nXXH3_64bits_internal(const void* XXH_RESTRICT input, size_t len,\n                     XXH64_hash_t seed64, const void* XXH_RESTRICT secret, size_t secretLen,\n                     XXH3_hashLong64_f f_hashLong)\n{\n    XXH_ASSERT(secretLen >= XXH3_SECRET_SIZE_MIN);\n    /*\n     * If an action is to be taken if `secretLen` condition is not respected,\n     * it should be done here.\n     * For now, it's a contract pre-condition.\n     * Adding a check and a branch here would cost performance at every hash.\n     * Also, note that function signature doesn't offer room to return an error.\n     */\n    if (len <= 16)\n        return XXH3_len_0to16_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, seed64);\n    if (len <= 128)\n        return XXH3_len_17to128_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64);\n    if (len <= XXH3_MIDSIZE_MAX)\n        return XXH3_len_129to240_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64);\n    return f_hashLong(input, len, seed64, (const xxh_u8*)secret, secretLen);\n}\n\n\n/* ===   Public entry point   === */\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH64_hash_t XXH3_64bits(XXH_NOESCAPE const void* input, size_t length)\n{\n    return XXH3_64bits_internal(input, length, 0, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_default);\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH64_hash_t\nXXH3_64bits_withSecret(XXH_NOESCAPE const void* input, size_t length, XXH_NOESCAPE const void* secret, size_t secretSize)\n{\n    return XXH3_64bits_internal(input, length, 0, secret, secretSize, XXH3_hashLong_64b_withSecret);\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH64_hash_t\nXXH3_64bits_withSeed(XXH_NOESCAPE const void* input, size_t length, XXH64_hash_t seed)\n{\n    return XXH3_64bits_internal(input, length, seed, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_withSeed);\n}\n\nXXH_PUBLIC_API XXH64_hash_t\nXXH3_64bits_withSecretandSeed(XXH_NOESCAPE const void* input, size_t length, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed)\n{\n    if (length <= XXH3_MIDSIZE_MAX)\n        return XXH3_64bits_internal(input, length, seed, XXH3_kSecret, sizeof(XXH3_kSecret), NULL);\n    return XXH3_hashLong_64b_withSecret(input, length, seed, (const xxh_u8*)secret, secretSize);\n}\n\n\n/* ===   XXH3 streaming   === */\n#ifndef XXH_NO_STREAM\n/*\n * Malloc's a pointer that is always aligned to @align.\n *\n * This must be freed with `XXH_alignedFree()`.\n *\n * malloc typically guarantees 16 byte alignment on 64-bit systems and 8 byte\n * alignment on 32-bit. This isn't enough for the 32 byte aligned loads in AVX2\n * or on 32-bit, the 16 byte aligned loads in SSE2 and NEON.\n *\n * This underalignment previously caused a rather obvious crash which went\n * completely unnoticed due to XXH3_createState() not actually being tested.\n * Credit to RedSpah for noticing this bug.\n *\n * The alignment is done manually: Functions like posix_memalign or _mm_malloc\n * are avoided: To maintain portability, we would have to write a fallback\n * like this anyways, and besides, testing for the existence of library\n * functions without relying on external build tools is impossible.\n *\n * The method is simple: Overallocate, manually align, and store the offset\n * to the original behind the returned pointer.\n *\n * Align must be a power of 2 and 8 <= align <= 128.\n */\nstatic XXH_MALLOCF void* XXH_alignedMalloc(size_t s, size_t align)\n{\n    XXH_ASSERT(align <= 128 && align >= 8); /* range check */\n    XXH_ASSERT((align & (align-1)) == 0);   /* power of 2 */\n    XXH_ASSERT(s != 0 && s < (s + align));  /* empty/overflow */\n    {   /* Overallocate to make room for manual realignment and an offset byte */\n        xxh_u8* base = (xxh_u8*)XXH_malloc(s + align);\n        if (base != NULL) {\n            /*\n             * Get the offset needed to align this pointer.\n             *\n             * Even if the returned pointer is aligned, there will always be\n             * at least one byte to store the offset to the original pointer.\n             */\n            size_t offset = align - ((size_t)base & (align - 1)); /* base % align */\n            /* Add the offset for the now-aligned pointer */\n            xxh_u8* ptr = base + offset;\n\n            XXH_ASSERT((size_t)ptr % align == 0);\n\n            /* Store the offset immediately before the returned pointer. */\n            ptr[-1] = (xxh_u8)offset;\n            return ptr;\n        }\n        return NULL;\n    }\n}\n/*\n * Frees an aligned pointer allocated by XXH_alignedMalloc(). Don't pass\n * normal malloc'd pointers, XXH_alignedMalloc has a specific data layout.\n */\nstatic void XXH_alignedFree(void* p)\n{\n    if (p != NULL) {\n        xxh_u8* ptr = (xxh_u8*)p;\n        /* Get the offset byte we added in XXH_malloc. */\n        xxh_u8 offset = ptr[-1];\n        /* Free the original malloc'd pointer */\n        xxh_u8* base = ptr - offset;\n        XXH_free(base);\n    }\n}\n/*! @ingroup XXH3_family */\n/*!\n * @brief Allocate an @ref XXH3_state_t.\n *\n * @return An allocated pointer of @ref XXH3_state_t on success.\n * @return `NULL` on failure.\n *\n * @note Must be freed with XXH3_freeState().\n *\n * @see @ref streaming_example \"Streaming Example\"\n */\nXXH_PUBLIC_API XXH3_state_t* XXH3_createState(void)\n{\n    XXH3_state_t* const state = (XXH3_state_t*)XXH_alignedMalloc(sizeof(XXH3_state_t), 64);\n    if (state==NULL) return NULL;\n    XXH3_INITSTATE(state);\n    return state;\n}\n\n/*! @ingroup XXH3_family */\n/*!\n * @brief Frees an @ref XXH3_state_t.\n *\n * @param statePtr A pointer to an @ref XXH3_state_t allocated with @ref XXH3_createState().\n *\n * @return @ref XXH_OK.\n *\n * @note Must be allocated with XXH3_createState().\n *\n * @see @ref streaming_example \"Streaming Example\"\n */\nXXH_PUBLIC_API XXH_errorcode XXH3_freeState(XXH3_state_t* statePtr)\n{\n    XXH_alignedFree(statePtr);\n    return XXH_OK;\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API void\nXXH3_copyState(XXH_NOESCAPE XXH3_state_t* dst_state, XXH_NOESCAPE const XXH3_state_t* src_state)\n{\n    XXH_memcpy(dst_state, src_state, sizeof(*dst_state));\n}\n\nstatic void\nXXH3_reset_internal(XXH3_state_t* statePtr,\n                    XXH64_hash_t seed,\n                    const void* secret, size_t secretSize)\n{\n    size_t const initStart = offsetof(XXH3_state_t, bufferedSize);\n    size_t const initLength = offsetof(XXH3_state_t, nbStripesPerBlock) - initStart;\n    XXH_ASSERT(offsetof(XXH3_state_t, nbStripesPerBlock) > initStart);\n    XXH_ASSERT(statePtr != NULL);\n    /* set members from bufferedSize to nbStripesPerBlock (excluded) to 0 */\n    memset((char*)statePtr + initStart, 0, initLength);\n    statePtr->acc[0] = XXH_PRIME32_3;\n    statePtr->acc[1] = XXH_PRIME64_1;\n    statePtr->acc[2] = XXH_PRIME64_2;\n    statePtr->acc[3] = XXH_PRIME64_3;\n    statePtr->acc[4] = XXH_PRIME64_4;\n    statePtr->acc[5] = XXH_PRIME32_2;\n    statePtr->acc[6] = XXH_PRIME64_5;\n    statePtr->acc[7] = XXH_PRIME32_1;\n    statePtr->seed = seed;\n    statePtr->useSeed = (seed != 0);\n    statePtr->extSecret = (const unsigned char*)secret;\n    XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN);\n    statePtr->secretLimit = secretSize - XXH_STRIPE_LEN;\n    statePtr->nbStripesPerBlock = statePtr->secretLimit / XXH_SECRET_CONSUME_RATE;\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH_errorcode\nXXH3_64bits_reset(XXH_NOESCAPE XXH3_state_t* statePtr)\n{\n    if (statePtr == NULL) return XXH_ERROR;\n    XXH3_reset_internal(statePtr, 0, XXH3_kSecret, XXH_SECRET_DEFAULT_SIZE);\n    return XXH_OK;\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH_errorcode\nXXH3_64bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize)\n{\n    if (statePtr == NULL) return XXH_ERROR;\n    XXH3_reset_internal(statePtr, 0, secret, secretSize);\n    if (secret == NULL) return XXH_ERROR;\n    if (secretSize < XXH3_SECRET_SIZE_MIN) return XXH_ERROR;\n    return XXH_OK;\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH_errorcode\nXXH3_64bits_reset_withSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH64_hash_t seed)\n{\n    if (statePtr == NULL) return XXH_ERROR;\n    if (seed==0) return XXH3_64bits_reset(statePtr);\n    if ((seed != statePtr->seed) || (statePtr->extSecret != NULL))\n        XXH3_initCustomSecret(statePtr->customSecret, seed);\n    XXH3_reset_internal(statePtr, seed, NULL, XXH_SECRET_DEFAULT_SIZE);\n    return XXH_OK;\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH_errorcode\nXXH3_64bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed64)\n{\n    if (statePtr == NULL) return XXH_ERROR;\n    if (secret == NULL) return XXH_ERROR;\n    if (secretSize < XXH3_SECRET_SIZE_MIN) return XXH_ERROR;\n    XXH3_reset_internal(statePtr, seed64, secret, secretSize);\n    statePtr->useSeed = 1; /* always, even if seed64==0 */\n    return XXH_OK;\n}\n\n/*!\n * @internal\n * @brief Processes a large input for XXH3_update() and XXH3_digest_long().\n *\n * Unlike XXH3_hashLong_internal_loop(), this can process data that overlaps a block.\n *\n * @param acc                Pointer to the 8 accumulator lanes\n * @param nbStripesSoFarPtr  In/out pointer to the number of leftover stripes in the block*\n * @param nbStripesPerBlock  Number of stripes in a block\n * @param input              Input pointer\n * @param nbStripes          Number of stripes to process\n * @param secret             Secret pointer\n * @param secretLimit        Offset of the last block in @p secret\n * @param f_acc              Pointer to an XXH3_accumulate implementation\n * @param f_scramble         Pointer to an XXH3_scrambleAcc implementation\n * @return                   Pointer past the end of @p input after processing\n */\nXXH_FORCE_INLINE const xxh_u8 *\nXXH3_consumeStripes(xxh_u64* XXH_RESTRICT acc,\n                    size_t* XXH_RESTRICT nbStripesSoFarPtr, size_t nbStripesPerBlock,\n                    const xxh_u8* XXH_RESTRICT input, size_t nbStripes,\n                    const xxh_u8* XXH_RESTRICT secret, size_t secretLimit,\n                    XXH3_f_accumulate f_acc,\n                    XXH3_f_scrambleAcc f_scramble)\n{\n    const xxh_u8* initialSecret = secret + *nbStripesSoFarPtr * XXH_SECRET_CONSUME_RATE;\n    /* Process full blocks */\n    if (nbStripes >= (nbStripesPerBlock - *nbStripesSoFarPtr)) {\n        /* Process the initial partial block... */\n        size_t nbStripesThisIter = nbStripesPerBlock - *nbStripesSoFarPtr;\n\n        do {\n            /* Accumulate and scramble */\n            f_acc(acc, input, initialSecret, nbStripesThisIter);\n            f_scramble(acc, secret + secretLimit);\n            input += nbStripesThisIter * XXH_STRIPE_LEN;\n            nbStripes -= nbStripesThisIter;\n            /* Then continue the loop with the full block size */\n            nbStripesThisIter = nbStripesPerBlock;\n            initialSecret = secret;\n        } while (nbStripes >= nbStripesPerBlock);\n        *nbStripesSoFarPtr = 0;\n    }\n    /* Process a partial block */\n    if (nbStripes > 0) {\n        f_acc(acc, input, initialSecret, nbStripes);\n        input += nbStripes * XXH_STRIPE_LEN;\n        *nbStripesSoFarPtr += nbStripes;\n    }\n    /* Return end pointer */\n    return input;\n}\n\n#ifndef XXH3_STREAM_USE_STACK\n# if XXH_SIZE_OPT <= 0 && !defined(__clang__) /* clang doesn't need additional stack space */\n#   define XXH3_STREAM_USE_STACK 1\n# endif\n#endif\n/*\n * Both XXH3_64bits_update and XXH3_128bits_update use this routine.\n */\nXXH_FORCE_INLINE XXH_errorcode\nXXH3_update(XXH3_state_t* XXH_RESTRICT const state,\n            const xxh_u8* XXH_RESTRICT input, size_t len,\n            XXH3_f_accumulate f_acc,\n            XXH3_f_scrambleAcc f_scramble)\n{\n    if (input==NULL) {\n        XXH_ASSERT(len == 0);\n        return XXH_OK;\n    }\n\n    XXH_ASSERT(state != NULL);\n    {   const xxh_u8* const bEnd = input + len;\n        const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret;\n#if defined(XXH3_STREAM_USE_STACK) && XXH3_STREAM_USE_STACK >= 1\n        /* For some reason, gcc and MSVC seem to suffer greatly\n         * when operating accumulators directly into state.\n         * Operating into stack space seems to enable proper optimization.\n         * clang, on the other hand, doesn't seem to need this trick */\n        XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[8];\n        XXH_memcpy(acc, state->acc, sizeof(acc));\n#else\n        xxh_u64* XXH_RESTRICT const acc = state->acc;\n#endif\n        state->totalLen += len;\n        XXH_ASSERT(state->bufferedSize <= XXH3_INTERNALBUFFER_SIZE);\n\n        /* small input : just fill in tmp buffer */\n        if (len <= XXH3_INTERNALBUFFER_SIZE - state->bufferedSize) {\n            XXH_memcpy(state->buffer + state->bufferedSize, input, len);\n            state->bufferedSize += (XXH32_hash_t)len;\n            return XXH_OK;\n        }\n\n        /* total input is now > XXH3_INTERNALBUFFER_SIZE */\n        #define XXH3_INTERNALBUFFER_STRIPES (XXH3_INTERNALBUFFER_SIZE / XXH_STRIPE_LEN)\n        XXH_STATIC_ASSERT(XXH3_INTERNALBUFFER_SIZE % XXH_STRIPE_LEN == 0);   /* clean multiple */\n\n        /*\n         * Internal buffer is partially filled (always, except at beginning)\n         * Complete it, then consume it.\n         */\n        if (state->bufferedSize) {\n            size_t const loadSize = XXH3_INTERNALBUFFER_SIZE - state->bufferedSize;\n            XXH_memcpy(state->buffer + state->bufferedSize, input, loadSize);\n            input += loadSize;\n            XXH3_consumeStripes(acc,\n                               &state->nbStripesSoFar, state->nbStripesPerBlock,\n                                state->buffer, XXH3_INTERNALBUFFER_STRIPES,\n                                secret, state->secretLimit,\n                                f_acc, f_scramble);\n            state->bufferedSize = 0;\n        }\n        XXH_ASSERT(input < bEnd);\n        if (bEnd - input > XXH3_INTERNALBUFFER_SIZE) {\n            size_t nbStripes = (size_t)(bEnd - 1 - input) / XXH_STRIPE_LEN;\n            input = XXH3_consumeStripes(acc,\n                                       &state->nbStripesSoFar, state->nbStripesPerBlock,\n                                       input, nbStripes,\n                                       secret, state->secretLimit,\n                                       f_acc, f_scramble);\n            XXH_memcpy(state->buffer + sizeof(state->buffer) - XXH_STRIPE_LEN, input - XXH_STRIPE_LEN, XXH_STRIPE_LEN);\n\n        }\n        /* Some remaining input (always) : buffer it */\n        XXH_ASSERT(input < bEnd);\n        XXH_ASSERT(bEnd - input <= XXH3_INTERNALBUFFER_SIZE);\n        XXH_ASSERT(state->bufferedSize == 0);\n        XXH_memcpy(state->buffer, input, (size_t)(bEnd-input));\n        state->bufferedSize = (XXH32_hash_t)(bEnd-input);\n#if defined(XXH3_STREAM_USE_STACK) && XXH3_STREAM_USE_STACK >= 1\n        /* save stack accumulators into state */\n        XXH_memcpy(state->acc, acc, sizeof(acc));\n#endif\n    }\n\n    return XXH_OK;\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH_errorcode\nXXH3_64bits_update(XXH_NOESCAPE XXH3_state_t* state, XXH_NOESCAPE const void* input, size_t len)\n{\n    return XXH3_update(state, (const xxh_u8*)input, len,\n                       XXH3_accumulate, XXH3_scrambleAcc);\n}\n\n\nXXH_FORCE_INLINE void\nXXH3_digest_long (XXH64_hash_t* acc,\n                  const XXH3_state_t* state,\n                  const unsigned char* secret)\n{\n    xxh_u8 lastStripe[XXH_STRIPE_LEN];\n    const xxh_u8* lastStripePtr;\n\n    /*\n     * Digest on a local copy. This way, the state remains unaltered, and it can\n     * continue ingesting more input afterwards.\n     */\n    XXH_memcpy(acc, state->acc, sizeof(state->acc));\n    if (state->bufferedSize >= XXH_STRIPE_LEN) {\n        /* Consume remaining stripes then point to remaining data in buffer */\n        size_t const nbStripes = (state->bufferedSize - 1) / XXH_STRIPE_LEN;\n        size_t nbStripesSoFar = state->nbStripesSoFar;\n        XXH3_consumeStripes(acc,\n                           &nbStripesSoFar, state->nbStripesPerBlock,\n                            state->buffer, nbStripes,\n                            secret, state->secretLimit,\n                            XXH3_accumulate, XXH3_scrambleAcc);\n        lastStripePtr = state->buffer + state->bufferedSize - XXH_STRIPE_LEN;\n    } else {  /* bufferedSize < XXH_STRIPE_LEN */\n        /* Copy to temp buffer */\n        size_t const catchupSize = XXH_STRIPE_LEN - state->bufferedSize;\n        XXH_ASSERT(state->bufferedSize > 0);  /* there is always some input buffered */\n        XXH_memcpy(lastStripe, state->buffer + sizeof(state->buffer) - catchupSize, catchupSize);\n        XXH_memcpy(lastStripe + catchupSize, state->buffer, state->bufferedSize);\n        lastStripePtr = lastStripe;\n    }\n    /* Last stripe */\n    XXH3_accumulate_512(acc,\n                        lastStripePtr,\n                        secret + state->secretLimit - XXH_SECRET_LASTACC_START);\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH64_hash_t XXH3_64bits_digest (XXH_NOESCAPE const XXH3_state_t* state)\n{\n    const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret;\n    if (state->totalLen > XXH3_MIDSIZE_MAX) {\n        XXH_ALIGN(XXH_ACC_ALIGN) XXH64_hash_t acc[XXH_ACC_NB];\n        XXH3_digest_long(acc, state, secret);\n        return XXH3_finalizeLong_64b(acc, secret, (xxh_u64)state->totalLen);\n    }\n    /* totalLen <= XXH3_MIDSIZE_MAX: digesting a short input */\n    if (state->useSeed)\n        return XXH3_64bits_withSeed(state->buffer, (size_t)state->totalLen, state->seed);\n    return XXH3_64bits_withSecret(state->buffer, (size_t)(state->totalLen),\n                                  secret, state->secretLimit + XXH_STRIPE_LEN);\n}\n#endif /* !XXH_NO_STREAM */\n\n\n/* ==========================================\n * XXH3 128 bits (a.k.a XXH128)\n * ==========================================\n * XXH3's 128-bit variant has better mixing and strength than the 64-bit variant,\n * even without counting the significantly larger output size.\n *\n * For example, extra steps are taken to avoid the seed-dependent collisions\n * in 17-240 byte inputs (See XXH3_mix16B and XXH128_mix32B).\n *\n * This strength naturally comes at the cost of some speed, especially on short\n * lengths. Note that longer hashes are about as fast as the 64-bit version\n * due to it using only a slight modification of the 64-bit loop.\n *\n * XXH128 is also more oriented towards 64-bit machines. It is still extremely\n * fast for a _128-bit_ hash on 32-bit (it usually clears XXH64).\n */\n\nXXH_FORCE_INLINE XXH_PUREF XXH128_hash_t\nXXH3_len_1to3_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)\n{\n    /* A doubled version of 1to3_64b with different constants. */\n    XXH_ASSERT(input != NULL);\n    XXH_ASSERT(1 <= len && len <= 3);\n    XXH_ASSERT(secret != NULL);\n    /*\n     * len = 1: combinedl = { input[0], 0x01, input[0], input[0] }\n     * len = 2: combinedl = { input[1], 0x02, input[0], input[1] }\n     * len = 3: combinedl = { input[2], 0x03, input[0], input[1] }\n     */\n    {   xxh_u8 const c1 = input[0];\n        xxh_u8 const c2 = input[len >> 1];\n        xxh_u8 const c3 = input[len - 1];\n        xxh_u32 const combinedl = ((xxh_u32)c1 <<16) | ((xxh_u32)c2 << 24)\n                                | ((xxh_u32)c3 << 0) | ((xxh_u32)len << 8);\n        xxh_u32 const combinedh = XXH_rotl32(XXH_swap32(combinedl), 13);\n        xxh_u64 const bitflipl = (XXH_readLE32(secret) ^ XXH_readLE32(secret+4)) + seed;\n        xxh_u64 const bitfliph = (XXH_readLE32(secret+8) ^ XXH_readLE32(secret+12)) - seed;\n        xxh_u64 const keyed_lo = (xxh_u64)combinedl ^ bitflipl;\n        xxh_u64 const keyed_hi = (xxh_u64)combinedh ^ bitfliph;\n        XXH128_hash_t h128;\n        h128.low64  = XXH64_avalanche(keyed_lo);\n        h128.high64 = XXH64_avalanche(keyed_hi);\n        return h128;\n    }\n}\n\nXXH_FORCE_INLINE XXH_PUREF XXH128_hash_t\nXXH3_len_4to8_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)\n{\n    XXH_ASSERT(input != NULL);\n    XXH_ASSERT(secret != NULL);\n    XXH_ASSERT(4 <= len && len <= 8);\n    seed ^= (xxh_u64)XXH_swap32((xxh_u32)seed) << 32;\n    {   xxh_u32 const input_lo = XXH_readLE32(input);\n        xxh_u32 const input_hi = XXH_readLE32(input + len - 4);\n        xxh_u64 const input_64 = input_lo + ((xxh_u64)input_hi << 32);\n        xxh_u64 const bitflip = (XXH_readLE64(secret+16) ^ XXH_readLE64(secret+24)) + seed;\n        xxh_u64 const keyed = input_64 ^ bitflip;\n\n        /* Shift len to the left to ensure it is even, this avoids even multiplies. */\n        XXH128_hash_t m128 = XXH_mult64to128(keyed, XXH_PRIME64_1 + (len << 2));\n\n        m128.high64 += (m128.low64 << 1);\n        m128.low64  ^= (m128.high64 >> 3);\n\n        m128.low64   = XXH_xorshift64(m128.low64, 35);\n        m128.low64  *= PRIME_MX2;\n        m128.low64   = XXH_xorshift64(m128.low64, 28);\n        m128.high64  = XXH3_avalanche(m128.high64);\n        return m128;\n    }\n}\n\nXXH_FORCE_INLINE XXH_PUREF XXH128_hash_t\nXXH3_len_9to16_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)\n{\n    XXH_ASSERT(input != NULL);\n    XXH_ASSERT(secret != NULL);\n    XXH_ASSERT(9 <= len && len <= 16);\n    {   xxh_u64 const bitflipl = (XXH_readLE64(secret+32) ^ XXH_readLE64(secret+40)) - seed;\n        xxh_u64 const bitfliph = (XXH_readLE64(secret+48) ^ XXH_readLE64(secret+56)) + seed;\n        xxh_u64 const input_lo = XXH_readLE64(input);\n        xxh_u64       input_hi = XXH_readLE64(input + len - 8);\n        XXH128_hash_t m128 = XXH_mult64to128(input_lo ^ input_hi ^ bitflipl, XXH_PRIME64_1);\n        /*\n         * Put len in the middle of m128 to ensure that the length gets mixed to\n         * both the low and high bits in the 128x64 multiply below.\n         */\n        m128.low64 += (xxh_u64)(len - 1) << 54;\n        input_hi   ^= bitfliph;\n        /*\n         * Add the high 32 bits of input_hi to the high 32 bits of m128, then\n         * add the long product of the low 32 bits of input_hi and XXH_PRIME32_2 to\n         * the high 64 bits of m128.\n         *\n         * The best approach to this operation is different on 32-bit and 64-bit.\n         */\n        if (sizeof(void *) < sizeof(xxh_u64)) { /* 32-bit */\n            /*\n             * 32-bit optimized version, which is more readable.\n             *\n             * On 32-bit, it removes an ADC and delays a dependency between the two\n             * halves of m128.high64, but it generates an extra mask on 64-bit.\n             */\n            m128.high64 += (input_hi & 0xFFFFFFFF00000000ULL) + XXH_mult32to64((xxh_u32)input_hi, XXH_PRIME32_2);\n        } else {\n            /*\n             * 64-bit optimized (albeit more confusing) version.\n             *\n             * Uses some properties of addition and multiplication to remove the mask:\n             *\n             * Let:\n             *    a = input_hi.lo = (input_hi & 0x00000000FFFFFFFF)\n             *    b = input_hi.hi = (input_hi & 0xFFFFFFFF00000000)\n             *    c = XXH_PRIME32_2\n             *\n             *    a + (b * c)\n             * Inverse Property: x + y - x == y\n             *    a + (b * (1 + c - 1))\n             * Distributive Property: x * (y + z) == (x * y) + (x * z)\n             *    a + (b * 1) + (b * (c - 1))\n             * Identity Property: x * 1 == x\n             *    a + b + (b * (c - 1))\n             *\n             * Substitute a, b, and c:\n             *    input_hi.hi + input_hi.lo + ((xxh_u64)input_hi.lo * (XXH_PRIME32_2 - 1))\n             *\n             * Since input_hi.hi + input_hi.lo == input_hi, we get this:\n             *    input_hi + ((xxh_u64)input_hi.lo * (XXH_PRIME32_2 - 1))\n             */\n            m128.high64 += input_hi + XXH_mult32to64((xxh_u32)input_hi, XXH_PRIME32_2 - 1);\n        }\n        /* m128 ^= XXH_swap64(m128 >> 64); */\n        m128.low64  ^= XXH_swap64(m128.high64);\n\n        {   /* 128x64 multiply: h128 = m128 * XXH_PRIME64_2; */\n            XXH128_hash_t h128 = XXH_mult64to128(m128.low64, XXH_PRIME64_2);\n            h128.high64 += m128.high64 * XXH_PRIME64_2;\n\n            h128.low64   = XXH3_avalanche(h128.low64);\n            h128.high64  = XXH3_avalanche(h128.high64);\n            return h128;\n    }   }\n}\n\n/*\n * Assumption: `secret` size is >= XXH3_SECRET_SIZE_MIN\n */\nXXH_FORCE_INLINE XXH_PUREF XXH128_hash_t\nXXH3_len_0to16_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)\n{\n    XXH_ASSERT(len <= 16);\n    {   if (len > 8) return XXH3_len_9to16_128b(input, len, secret, seed);\n        if (len >= 4) return XXH3_len_4to8_128b(input, len, secret, seed);\n        if (len) return XXH3_len_1to3_128b(input, len, secret, seed);\n        {   XXH128_hash_t h128;\n            xxh_u64 const bitflipl = XXH_readLE64(secret+64) ^ XXH_readLE64(secret+72);\n            xxh_u64 const bitfliph = XXH_readLE64(secret+80) ^ XXH_readLE64(secret+88);\n            h128.low64 = XXH64_avalanche(seed ^ bitflipl);\n            h128.high64 = XXH64_avalanche( seed ^ bitfliph);\n            return h128;\n    }   }\n}\n\n/*\n * A bit slower than XXH3_mix16B, but handles multiply by zero better.\n */\nXXH_FORCE_INLINE XXH128_hash_t\nXXH128_mix32B(XXH128_hash_t acc, const xxh_u8* input_1, const xxh_u8* input_2,\n              const xxh_u8* secret, XXH64_hash_t seed)\n{\n    acc.low64  += XXH3_mix16B (input_1, secret+0, seed);\n    acc.low64  ^= XXH_readLE64(input_2) + XXH_readLE64(input_2 + 8);\n    acc.high64 += XXH3_mix16B (input_2, secret+16, seed);\n    acc.high64 ^= XXH_readLE64(input_1) + XXH_readLE64(input_1 + 8);\n    return acc;\n}\n\n\nXXH_FORCE_INLINE XXH_PUREF XXH128_hash_t\nXXH3_len_17to128_128b(const xxh_u8* XXH_RESTRICT input, size_t len,\n                      const xxh_u8* XXH_RESTRICT secret, size_t secretSize,\n                      XXH64_hash_t seed)\n{\n    XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize;\n    XXH_ASSERT(16 < len && len <= 128);\n\n    {   XXH128_hash_t acc;\n        acc.low64 = len * XXH_PRIME64_1;\n        acc.high64 = 0;\n\n#if XXH_SIZE_OPT >= 1\n        {\n            /* Smaller, but slightly slower. */\n            unsigned int i = (unsigned int)(len - 1) / 32;\n            do {\n                acc = XXH128_mix32B(acc, input+16*i, input+len-16*(i+1), secret+32*i, seed);\n            } while (i-- != 0);\n        }\n#else\n        if (len > 32) {\n            if (len > 64) {\n                if (len > 96) {\n                    acc = XXH128_mix32B(acc, input+48, input+len-64, secret+96, seed);\n                }\n                acc = XXH128_mix32B(acc, input+32, input+len-48, secret+64, seed);\n            }\n            acc = XXH128_mix32B(acc, input+16, input+len-32, secret+32, seed);\n        }\n        acc = XXH128_mix32B(acc, input, input+len-16, secret, seed);\n#endif\n        {   XXH128_hash_t h128;\n            h128.low64  = acc.low64 + acc.high64;\n            h128.high64 = (acc.low64    * XXH_PRIME64_1)\n                        + (acc.high64   * XXH_PRIME64_4)\n                        + ((len - seed) * XXH_PRIME64_2);\n            h128.low64  = XXH3_avalanche(h128.low64);\n            h128.high64 = (XXH64_hash_t)0 - XXH3_avalanche(h128.high64);\n            return h128;\n        }\n    }\n}\n\nXXH_NO_INLINE XXH_PUREF XXH128_hash_t\nXXH3_len_129to240_128b(const xxh_u8* XXH_RESTRICT input, size_t len,\n                       const xxh_u8* XXH_RESTRICT secret, size_t secretSize,\n                       XXH64_hash_t seed)\n{\n    XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize;\n    XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX);\n\n    {   XXH128_hash_t acc;\n        unsigned i;\n        acc.low64 = len * XXH_PRIME64_1;\n        acc.high64 = 0;\n        /*\n         *  We set as `i` as offset + 32. We do this so that unchanged\n         * `len` can be used as upper bound. This reaches a sweet spot\n         * where both x86 and aarch64 get simple agen and good codegen\n         * for the loop.\n         */\n        for (i = 32; i < 160; i += 32) {\n            acc = XXH128_mix32B(acc,\n                                input  + i - 32,\n                                input  + i - 16,\n                                secret + i - 32,\n                                seed);\n        }\n        acc.low64 = XXH3_avalanche(acc.low64);\n        acc.high64 = XXH3_avalanche(acc.high64);\n        /*\n         * NB: `i <= len` will duplicate the last 32-bytes if\n         * len % 32 was zero. This is an unfortunate necessity to keep\n         * the hash result stable.\n         */\n        for (i=160; i <= len; i += 32) {\n            acc = XXH128_mix32B(acc,\n                                input + i - 32,\n                                input + i - 16,\n                                secret + XXH3_MIDSIZE_STARTOFFSET + i - 160,\n                                seed);\n        }\n        /* last bytes */\n        acc = XXH128_mix32B(acc,\n                            input + len - 16,\n                            input + len - 32,\n                            secret + XXH3_SECRET_SIZE_MIN - XXH3_MIDSIZE_LASTOFFSET - 16,\n                            (XXH64_hash_t)0 - seed);\n\n        {   XXH128_hash_t h128;\n            h128.low64  = acc.low64 + acc.high64;\n            h128.high64 = (acc.low64    * XXH_PRIME64_1)\n                        + (acc.high64   * XXH_PRIME64_4)\n                        + ((len - seed) * XXH_PRIME64_2);\n            h128.low64  = XXH3_avalanche(h128.low64);\n            h128.high64 = (XXH64_hash_t)0 - XXH3_avalanche(h128.high64);\n            return h128;\n        }\n    }\n}\n\nstatic XXH_PUREF XXH128_hash_t\nXXH3_finalizeLong_128b(const xxh_u64* XXH_RESTRICT acc, const xxh_u8* XXH_RESTRICT secret, size_t secretSize, xxh_u64 len)\n{\n    XXH128_hash_t h128;\n    h128.low64 = XXH3_finalizeLong_64b(acc, secret, len);\n    h128.high64 = XXH3_mergeAccs(acc, secret + secretSize\n                                             - XXH_STRIPE_LEN - XXH_SECRET_MERGEACCS_START,\n                                             ~(len * XXH_PRIME64_2));\n    return h128;\n}\n\nXXH_FORCE_INLINE XXH128_hash_t\nXXH3_hashLong_128b_internal(const void* XXH_RESTRICT input, size_t len,\n                            const xxh_u8* XXH_RESTRICT secret, size_t secretSize,\n                            XXH3_f_accumulate f_acc,\n                            XXH3_f_scrambleAcc f_scramble)\n{\n    XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[XXH_ACC_NB] = XXH3_INIT_ACC;\n\n    XXH3_hashLong_internal_loop(acc, (const xxh_u8*)input, len, secret, secretSize, f_acc, f_scramble);\n\n    /* converge into final hash */\n    XXH_STATIC_ASSERT(sizeof(acc) == 64);\n    XXH_ASSERT(secretSize >= sizeof(acc) + XXH_SECRET_MERGEACCS_START);\n    return XXH3_finalizeLong_128b(acc, secret, secretSize, (xxh_u64)len);\n}\n\n/*\n * It's important for performance that XXH3_hashLong() is not inlined.\n */\nXXH_NO_INLINE XXH_PUREF XXH128_hash_t\nXXH3_hashLong_128b_default(const void* XXH_RESTRICT input, size_t len,\n                           XXH64_hash_t seed64,\n                           const void* XXH_RESTRICT secret, size_t secretLen)\n{\n    (void)seed64; (void)secret; (void)secretLen;\n    return XXH3_hashLong_128b_internal(input, len, XXH3_kSecret, sizeof(XXH3_kSecret),\n                                       XXH3_accumulate, XXH3_scrambleAcc);\n}\n\n/*\n * It's important for performance to pass @p secretLen (when it's static)\n * to the compiler, so that it can properly optimize the vectorized loop.\n *\n * When the secret size is unknown, or on GCC 12 where the mix of NO_INLINE and FORCE_INLINE\n * breaks -Og, this is XXH_NO_INLINE.\n */\nXXH3_WITH_SECRET_INLINE XXH128_hash_t\nXXH3_hashLong_128b_withSecret(const void* XXH_RESTRICT input, size_t len,\n                              XXH64_hash_t seed64,\n                              const void* XXH_RESTRICT secret, size_t secretLen)\n{\n    (void)seed64;\n    return XXH3_hashLong_128b_internal(input, len, (const xxh_u8*)secret, secretLen,\n                                       XXH3_accumulate, XXH3_scrambleAcc);\n}\n\nXXH_FORCE_INLINE XXH128_hash_t\nXXH3_hashLong_128b_withSeed_internal(const void* XXH_RESTRICT input, size_t len,\n                                XXH64_hash_t seed64,\n                                XXH3_f_accumulate f_acc,\n                                XXH3_f_scrambleAcc f_scramble,\n                                XXH3_f_initCustomSecret f_initSec)\n{\n    if (seed64 == 0)\n        return XXH3_hashLong_128b_internal(input, len,\n                                           XXH3_kSecret, sizeof(XXH3_kSecret),\n                                           f_acc, f_scramble);\n    {   XXH_ALIGN(XXH_SEC_ALIGN) xxh_u8 secret[XXH_SECRET_DEFAULT_SIZE];\n        f_initSec(secret, seed64);\n        return XXH3_hashLong_128b_internal(input, len, (const xxh_u8*)secret, sizeof(secret),\n                                           f_acc, f_scramble);\n    }\n}\n\n/*\n * It's important for performance that XXH3_hashLong is not inlined.\n */\nXXH_NO_INLINE XXH128_hash_t\nXXH3_hashLong_128b_withSeed(const void* input, size_t len,\n                            XXH64_hash_t seed64, const void* XXH_RESTRICT secret, size_t secretLen)\n{\n    (void)secret; (void)secretLen;\n    return XXH3_hashLong_128b_withSeed_internal(input, len, seed64,\n                XXH3_accumulate, XXH3_scrambleAcc, XXH3_initCustomSecret);\n}\n\ntypedef XXH128_hash_t (*XXH3_hashLong128_f)(const void* XXH_RESTRICT, size_t,\n                                            XXH64_hash_t, const void* XXH_RESTRICT, size_t);\n\nXXH_FORCE_INLINE XXH128_hash_t\nXXH3_128bits_internal(const void* input, size_t len,\n                      XXH64_hash_t seed64, const void* XXH_RESTRICT secret, size_t secretLen,\n                      XXH3_hashLong128_f f_hl128)\n{\n    XXH_ASSERT(secretLen >= XXH3_SECRET_SIZE_MIN);\n    /*\n     * If an action is to be taken if `secret` conditions are not respected,\n     * it should be done here.\n     * For now, it's a contract pre-condition.\n     * Adding a check and a branch here would cost performance at every hash.\n     */\n    if (len <= 16)\n        return XXH3_len_0to16_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, seed64);\n    if (len <= 128)\n        return XXH3_len_17to128_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64);\n    if (len <= XXH3_MIDSIZE_MAX)\n        return XXH3_len_129to240_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64);\n    return f_hl128(input, len, seed64, secret, secretLen);\n}\n\n\n/* ===   Public XXH128 API   === */\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH128_hash_t XXH3_128bits(XXH_NOESCAPE const void* input, size_t len)\n{\n    return XXH3_128bits_internal(input, len, 0,\n                                 XXH3_kSecret, sizeof(XXH3_kSecret),\n                                 XXH3_hashLong_128b_default);\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH128_hash_t\nXXH3_128bits_withSecret(XXH_NOESCAPE const void* input, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize)\n{\n    return XXH3_128bits_internal(input, len, 0,\n                                 (const xxh_u8*)secret, secretSize,\n                                 XXH3_hashLong_128b_withSecret);\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH128_hash_t\nXXH3_128bits_withSeed(XXH_NOESCAPE const void* input, size_t len, XXH64_hash_t seed)\n{\n    return XXH3_128bits_internal(input, len, seed,\n                                 XXH3_kSecret, sizeof(XXH3_kSecret),\n                                 XXH3_hashLong_128b_withSeed);\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH128_hash_t\nXXH3_128bits_withSecretandSeed(XXH_NOESCAPE const void* input, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed)\n{\n    if (len <= XXH3_MIDSIZE_MAX)\n        return XXH3_128bits_internal(input, len, seed, XXH3_kSecret, sizeof(XXH3_kSecret), NULL);\n    return XXH3_hashLong_128b_withSecret(input, len, seed, secret, secretSize);\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH128_hash_t\nXXH128(XXH_NOESCAPE const void* input, size_t len, XXH64_hash_t seed)\n{\n    return XXH3_128bits_withSeed(input, len, seed);\n}\n\n\n/* ===   XXH3 128-bit streaming   === */\n#ifndef XXH_NO_STREAM\n/*\n * All initialization and update functions are identical to 64-bit streaming variant.\n * The only difference is the finalization routine.\n */\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH_errorcode\nXXH3_128bits_reset(XXH_NOESCAPE XXH3_state_t* statePtr)\n{\n    return XXH3_64bits_reset(statePtr);\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH_errorcode\nXXH3_128bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize)\n{\n    return XXH3_64bits_reset_withSecret(statePtr, secret, secretSize);\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH_errorcode\nXXH3_128bits_reset_withSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH64_hash_t seed)\n{\n    return XXH3_64bits_reset_withSeed(statePtr, seed);\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH_errorcode\nXXH3_128bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed)\n{\n    return XXH3_64bits_reset_withSecretandSeed(statePtr, secret, secretSize, seed);\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH_errorcode\nXXH3_128bits_update(XXH_NOESCAPE XXH3_state_t* state, XXH_NOESCAPE const void* input, size_t len)\n{\n    return XXH3_64bits_update(state, input, len);\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH128_hash_t XXH3_128bits_digest (XXH_NOESCAPE const XXH3_state_t* state)\n{\n    const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret;\n    if (state->totalLen > XXH3_MIDSIZE_MAX) {\n        XXH_ALIGN(XXH_ACC_ALIGN) XXH64_hash_t acc[XXH_ACC_NB];\n        XXH3_digest_long(acc, state, secret);\n        XXH_ASSERT(state->secretLimit + XXH_STRIPE_LEN >= sizeof(acc) + XXH_SECRET_MERGEACCS_START);\n        return XXH3_finalizeLong_128b(acc, secret, state->secretLimit + XXH_STRIPE_LEN,  (xxh_u64)state->totalLen);\n    }\n    /* len <= XXH3_MIDSIZE_MAX : short code */\n    if (state->useSeed)\n        return XXH3_128bits_withSeed(state->buffer, (size_t)state->totalLen, state->seed);\n    return XXH3_128bits_withSecret(state->buffer, (size_t)(state->totalLen),\n                                   secret, state->secretLimit + XXH_STRIPE_LEN);\n}\n#endif /* !XXH_NO_STREAM */\n/* 128-bit utility functions */\n\n#include <string.h>   /* memcmp, memcpy */\n\n/* return : 1 is equal, 0 if different */\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API int XXH128_isEqual(XXH128_hash_t h1, XXH128_hash_t h2)\n{\n    /* note : XXH128_hash_t is compact, it has no padding byte */\n    return !(memcmp(&h1, &h2, sizeof(h1)));\n}\n\n/* This prototype is compatible with stdlib's qsort().\n * @return : >0 if *h128_1  > *h128_2\n *           <0 if *h128_1  < *h128_2\n *           =0 if *h128_1 == *h128_2  */\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API int XXH128_cmp(XXH_NOESCAPE const void* h128_1, XXH_NOESCAPE const void* h128_2)\n{\n    XXH128_hash_t const h1 = *(const XXH128_hash_t*)h128_1;\n    XXH128_hash_t const h2 = *(const XXH128_hash_t*)h128_2;\n    int const hcmp = (h1.high64 > h2.high64) - (h2.high64 > h1.high64);\n    /* note : bets that, in most cases, hash values are different */\n    if (hcmp) return hcmp;\n    return (h1.low64 > h2.low64) - (h2.low64 > h1.low64);\n}\n\n\n/*======   Canonical representation   ======*/\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API void\nXXH128_canonicalFromHash(XXH_NOESCAPE XXH128_canonical_t* dst, XXH128_hash_t hash)\n{\n    XXH_STATIC_ASSERT(sizeof(XXH128_canonical_t) == sizeof(XXH128_hash_t));\n    if (XXH_CPU_LITTLE_ENDIAN) {\n        hash.high64 = XXH_swap64(hash.high64);\n        hash.low64  = XXH_swap64(hash.low64);\n    }\n    XXH_memcpy(dst, &hash.high64, sizeof(hash.high64));\n    XXH_memcpy((char*)dst + sizeof(hash.high64), &hash.low64, sizeof(hash.low64));\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH128_hash_t\nXXH128_hashFromCanonical(XXH_NOESCAPE const XXH128_canonical_t* src)\n{\n    XXH128_hash_t h;\n    h.high64 = XXH_readBE64(src);\n    h.low64  = XXH_readBE64(src->digest + 8);\n    return h;\n}\n\n\n\n/* ==========================================\n * Secret generators\n * ==========================================\n */\n#define XXH_MIN(x, y) (((x) > (y)) ? (y) : (x))\n\nXXH_FORCE_INLINE void XXH3_combine16(void* dst, XXH128_hash_t h128)\n{\n    XXH_writeLE64( dst, XXH_readLE64(dst) ^ h128.low64 );\n    XXH_writeLE64( (char*)dst+8, XXH_readLE64((char*)dst+8) ^ h128.high64 );\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API XXH_errorcode\nXXH3_generateSecret(XXH_NOESCAPE void* secretBuffer, size_t secretSize, XXH_NOESCAPE const void* customSeed, size_t customSeedSize)\n{\n#if (XXH_DEBUGLEVEL >= 1)\n    XXH_ASSERT(secretBuffer != NULL);\n    XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN);\n#else\n    /* production mode, assert() are disabled */\n    if (secretBuffer == NULL) return XXH_ERROR;\n    if (secretSize < XXH3_SECRET_SIZE_MIN) return XXH_ERROR;\n#endif\n\n    if (customSeedSize == 0) {\n        customSeed = XXH3_kSecret;\n        customSeedSize = XXH_SECRET_DEFAULT_SIZE;\n    }\n#if (XXH_DEBUGLEVEL >= 1)\n    XXH_ASSERT(customSeed != NULL);\n#else\n    if (customSeed == NULL) return XXH_ERROR;\n#endif\n\n    /* Fill secretBuffer with a copy of customSeed - repeat as needed */\n    {   size_t pos = 0;\n        while (pos < secretSize) {\n            size_t const toCopy = XXH_MIN((secretSize - pos), customSeedSize);\n            memcpy((char*)secretBuffer + pos, customSeed, toCopy);\n            pos += toCopy;\n    }   }\n\n    {   size_t const nbSeg16 = secretSize / 16;\n        size_t n;\n        XXH128_canonical_t scrambler;\n        XXH128_canonicalFromHash(&scrambler, XXH128(customSeed, customSeedSize, 0));\n        for (n=0; n<nbSeg16; n++) {\n            XXH128_hash_t const h128 = XXH128(&scrambler, sizeof(scrambler), n);\n            XXH3_combine16((char*)secretBuffer + n*16, h128);\n        }\n        /* last segment */\n        XXH3_combine16((char*)secretBuffer + secretSize - 16, XXH128_hashFromCanonical(&scrambler));\n    }\n    return XXH_OK;\n}\n\n/*! @ingroup XXH3_family */\nXXH_PUBLIC_API void\nXXH3_generateSecret_fromSeed(XXH_NOESCAPE void* secretBuffer, XXH64_hash_t seed)\n{\n    XXH_ALIGN(XXH_SEC_ALIGN) xxh_u8 secret[XXH_SECRET_DEFAULT_SIZE];\n    XXH3_initCustomSecret(secret, seed);\n    XXH_ASSERT(secretBuffer != NULL);\n    memcpy(secretBuffer, secret, XXH_SECRET_DEFAULT_SIZE);\n}\n\n\n\n/* Pop our optimization override from above */\n#if XXH_VECTOR == XXH_AVX2 /* AVX2 */ \\\n  && defined(__GNUC__) && !defined(__clang__) /* GCC, not Clang */ \\\n  && defined(__OPTIMIZE__) && XXH_SIZE_OPT <= 0 /* respect -O0 and -Os */\n#  pragma GCC pop_options\n#endif\n\n#endif  /* XXH_NO_LONG_LONG */\n\n#endif  /* XXH_NO_XXH3 */\n\n/*!\n * @}\n */\n#endif  /* XXH_IMPLEMENTATION */\n\n\n#if defined (__cplusplus)\n} /* extern \"C\" */\n#endif\n"
  },
  {
    "path": "third-party/zlib/CMakeFiles/zlib.dir/build.make",
    "content": "# CMAKE generated file: DO NOT EDIT!\n# Generated by \"Unix Makefiles\" Generator, CMake Version 3.28\n\n# Delete rule output on recipe failure.\n.DELETE_ON_ERROR:\n\n#=============================================================================\n# Special targets provided by cmake.\n\n# Disable implicit rules so canonical targets will work.\n.SUFFIXES:\n\n# Disable VCS-based implicit rules.\n% : %,v\n\n# Disable VCS-based implicit rules.\n% : RCS/%\n\n# Disable VCS-based implicit rules.\n% : RCS/%,v\n\n# Disable VCS-based implicit rules.\n% : SCCS/s.%\n\n# Disable VCS-based implicit rules.\n% : s.%\n\n.SUFFIXES: .hpux_make_needs_suffix_list\n\n# Command-line flag to silence nested $(MAKE).\n$(VERBOSE)MAKESILENT = -s\n\n#Suppress display of executed commands.\n$(VERBOSE).SILENT:\n\n# A target that is always out of date.\ncmake_force:\n.PHONY : cmake_force\n\n#=============================================================================\n# Set environment variables for the build.\n\n# The shell in which to execute make rules.\nSHELL = /bin/sh\n\n# The CMake executable.\nCMAKE_COMMAND = /usr/bin/cmake\n\n# The command to remove a file.\nRM = /usr/bin/cmake -E rm -f\n\n# Escaping for special characters.\nEQUALS = =\n\n# The top-level source directory on which CMake was run.\nCMAKE_SOURCE_DIR = /mold\n\n# The top-level build directory on which CMake was run.\nCMAKE_BINARY_DIR = /mold\n\n# Include any dependencies generated for this target.\ninclude third-party/zlib/CMakeFiles/zlib.dir/depend.make\n# Include any dependencies generated by the compiler for this target.\ninclude third-party/zlib/CMakeFiles/zlib.dir/compiler_depend.make\n\n# Include the progress variables for this target.\ninclude third-party/zlib/CMakeFiles/zlib.dir/progress.make\n\n# Include the compile flags for this target's objects.\ninclude third-party/zlib/CMakeFiles/zlib.dir/flags.make\n\nthird-party/zlib/CMakeFiles/zlib.dir/adler32.c.o: third-party/zlib/CMakeFiles/zlib.dir/flags.make\nthird-party/zlib/CMakeFiles/zlib.dir/adler32.c.o: third-party/zlib/adler32.c\nthird-party/zlib/CMakeFiles/zlib.dir/adler32.c.o: third-party/zlib/CMakeFiles/zlib.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) \"Building C object third-party/zlib/CMakeFiles/zlib.dir/adler32.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlib.dir/adler32.c.o -MF CMakeFiles/zlib.dir/adler32.c.o.d -o CMakeFiles/zlib.dir/adler32.c.o -c /mold/third-party/zlib/adler32.c\n\nthird-party/zlib/CMakeFiles/zlib.dir/adler32.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlib.dir/adler32.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/adler32.c > CMakeFiles/zlib.dir/adler32.c.i\n\nthird-party/zlib/CMakeFiles/zlib.dir/adler32.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlib.dir/adler32.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/adler32.c -o CMakeFiles/zlib.dir/adler32.c.s\n\nthird-party/zlib/CMakeFiles/zlib.dir/compress.c.o: third-party/zlib/CMakeFiles/zlib.dir/flags.make\nthird-party/zlib/CMakeFiles/zlib.dir/compress.c.o: third-party/zlib/compress.c\nthird-party/zlib/CMakeFiles/zlib.dir/compress.c.o: third-party/zlib/CMakeFiles/zlib.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) \"Building C object third-party/zlib/CMakeFiles/zlib.dir/compress.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlib.dir/compress.c.o -MF CMakeFiles/zlib.dir/compress.c.o.d -o CMakeFiles/zlib.dir/compress.c.o -c /mold/third-party/zlib/compress.c\n\nthird-party/zlib/CMakeFiles/zlib.dir/compress.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlib.dir/compress.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/compress.c > CMakeFiles/zlib.dir/compress.c.i\n\nthird-party/zlib/CMakeFiles/zlib.dir/compress.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlib.dir/compress.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/compress.c -o CMakeFiles/zlib.dir/compress.c.s\n\nthird-party/zlib/CMakeFiles/zlib.dir/crc32.c.o: third-party/zlib/CMakeFiles/zlib.dir/flags.make\nthird-party/zlib/CMakeFiles/zlib.dir/crc32.c.o: third-party/zlib/crc32.c\nthird-party/zlib/CMakeFiles/zlib.dir/crc32.c.o: third-party/zlib/CMakeFiles/zlib.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) \"Building C object third-party/zlib/CMakeFiles/zlib.dir/crc32.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlib.dir/crc32.c.o -MF CMakeFiles/zlib.dir/crc32.c.o.d -o CMakeFiles/zlib.dir/crc32.c.o -c /mold/third-party/zlib/crc32.c\n\nthird-party/zlib/CMakeFiles/zlib.dir/crc32.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlib.dir/crc32.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/crc32.c > CMakeFiles/zlib.dir/crc32.c.i\n\nthird-party/zlib/CMakeFiles/zlib.dir/crc32.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlib.dir/crc32.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/crc32.c -o CMakeFiles/zlib.dir/crc32.c.s\n\nthird-party/zlib/CMakeFiles/zlib.dir/deflate.c.o: third-party/zlib/CMakeFiles/zlib.dir/flags.make\nthird-party/zlib/CMakeFiles/zlib.dir/deflate.c.o: third-party/zlib/deflate.c\nthird-party/zlib/CMakeFiles/zlib.dir/deflate.c.o: third-party/zlib/CMakeFiles/zlib.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) \"Building C object third-party/zlib/CMakeFiles/zlib.dir/deflate.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlib.dir/deflate.c.o -MF CMakeFiles/zlib.dir/deflate.c.o.d -o CMakeFiles/zlib.dir/deflate.c.o -c /mold/third-party/zlib/deflate.c\n\nthird-party/zlib/CMakeFiles/zlib.dir/deflate.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlib.dir/deflate.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/deflate.c > CMakeFiles/zlib.dir/deflate.c.i\n\nthird-party/zlib/CMakeFiles/zlib.dir/deflate.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlib.dir/deflate.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/deflate.c -o CMakeFiles/zlib.dir/deflate.c.s\n\nthird-party/zlib/CMakeFiles/zlib.dir/gzclose.c.o: third-party/zlib/CMakeFiles/zlib.dir/flags.make\nthird-party/zlib/CMakeFiles/zlib.dir/gzclose.c.o: third-party/zlib/gzclose.c\nthird-party/zlib/CMakeFiles/zlib.dir/gzclose.c.o: third-party/zlib/CMakeFiles/zlib.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_5) \"Building C object third-party/zlib/CMakeFiles/zlib.dir/gzclose.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlib.dir/gzclose.c.o -MF CMakeFiles/zlib.dir/gzclose.c.o.d -o CMakeFiles/zlib.dir/gzclose.c.o -c /mold/third-party/zlib/gzclose.c\n\nthird-party/zlib/CMakeFiles/zlib.dir/gzclose.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlib.dir/gzclose.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/gzclose.c > CMakeFiles/zlib.dir/gzclose.c.i\n\nthird-party/zlib/CMakeFiles/zlib.dir/gzclose.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlib.dir/gzclose.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/gzclose.c -o CMakeFiles/zlib.dir/gzclose.c.s\n\nthird-party/zlib/CMakeFiles/zlib.dir/gzlib.c.o: third-party/zlib/CMakeFiles/zlib.dir/flags.make\nthird-party/zlib/CMakeFiles/zlib.dir/gzlib.c.o: third-party/zlib/gzlib.c\nthird-party/zlib/CMakeFiles/zlib.dir/gzlib.c.o: third-party/zlib/CMakeFiles/zlib.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_6) \"Building C object third-party/zlib/CMakeFiles/zlib.dir/gzlib.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlib.dir/gzlib.c.o -MF CMakeFiles/zlib.dir/gzlib.c.o.d -o CMakeFiles/zlib.dir/gzlib.c.o -c /mold/third-party/zlib/gzlib.c\n\nthird-party/zlib/CMakeFiles/zlib.dir/gzlib.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlib.dir/gzlib.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/gzlib.c > CMakeFiles/zlib.dir/gzlib.c.i\n\nthird-party/zlib/CMakeFiles/zlib.dir/gzlib.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlib.dir/gzlib.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/gzlib.c -o CMakeFiles/zlib.dir/gzlib.c.s\n\nthird-party/zlib/CMakeFiles/zlib.dir/gzread.c.o: third-party/zlib/CMakeFiles/zlib.dir/flags.make\nthird-party/zlib/CMakeFiles/zlib.dir/gzread.c.o: third-party/zlib/gzread.c\nthird-party/zlib/CMakeFiles/zlib.dir/gzread.c.o: third-party/zlib/CMakeFiles/zlib.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_7) \"Building C object third-party/zlib/CMakeFiles/zlib.dir/gzread.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlib.dir/gzread.c.o -MF CMakeFiles/zlib.dir/gzread.c.o.d -o CMakeFiles/zlib.dir/gzread.c.o -c /mold/third-party/zlib/gzread.c\n\nthird-party/zlib/CMakeFiles/zlib.dir/gzread.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlib.dir/gzread.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/gzread.c > CMakeFiles/zlib.dir/gzread.c.i\n\nthird-party/zlib/CMakeFiles/zlib.dir/gzread.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlib.dir/gzread.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/gzread.c -o CMakeFiles/zlib.dir/gzread.c.s\n\nthird-party/zlib/CMakeFiles/zlib.dir/gzwrite.c.o: third-party/zlib/CMakeFiles/zlib.dir/flags.make\nthird-party/zlib/CMakeFiles/zlib.dir/gzwrite.c.o: third-party/zlib/gzwrite.c\nthird-party/zlib/CMakeFiles/zlib.dir/gzwrite.c.o: third-party/zlib/CMakeFiles/zlib.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_8) \"Building C object third-party/zlib/CMakeFiles/zlib.dir/gzwrite.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlib.dir/gzwrite.c.o -MF CMakeFiles/zlib.dir/gzwrite.c.o.d -o CMakeFiles/zlib.dir/gzwrite.c.o -c /mold/third-party/zlib/gzwrite.c\n\nthird-party/zlib/CMakeFiles/zlib.dir/gzwrite.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlib.dir/gzwrite.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/gzwrite.c > CMakeFiles/zlib.dir/gzwrite.c.i\n\nthird-party/zlib/CMakeFiles/zlib.dir/gzwrite.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlib.dir/gzwrite.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/gzwrite.c -o CMakeFiles/zlib.dir/gzwrite.c.s\n\nthird-party/zlib/CMakeFiles/zlib.dir/inflate.c.o: third-party/zlib/CMakeFiles/zlib.dir/flags.make\nthird-party/zlib/CMakeFiles/zlib.dir/inflate.c.o: third-party/zlib/inflate.c\nthird-party/zlib/CMakeFiles/zlib.dir/inflate.c.o: third-party/zlib/CMakeFiles/zlib.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_9) \"Building C object third-party/zlib/CMakeFiles/zlib.dir/inflate.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlib.dir/inflate.c.o -MF CMakeFiles/zlib.dir/inflate.c.o.d -o CMakeFiles/zlib.dir/inflate.c.o -c /mold/third-party/zlib/inflate.c\n\nthird-party/zlib/CMakeFiles/zlib.dir/inflate.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlib.dir/inflate.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/inflate.c > CMakeFiles/zlib.dir/inflate.c.i\n\nthird-party/zlib/CMakeFiles/zlib.dir/inflate.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlib.dir/inflate.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/inflate.c -o CMakeFiles/zlib.dir/inflate.c.s\n\nthird-party/zlib/CMakeFiles/zlib.dir/infback.c.o: third-party/zlib/CMakeFiles/zlib.dir/flags.make\nthird-party/zlib/CMakeFiles/zlib.dir/infback.c.o: third-party/zlib/infback.c\nthird-party/zlib/CMakeFiles/zlib.dir/infback.c.o: third-party/zlib/CMakeFiles/zlib.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_10) \"Building C object third-party/zlib/CMakeFiles/zlib.dir/infback.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlib.dir/infback.c.o -MF CMakeFiles/zlib.dir/infback.c.o.d -o CMakeFiles/zlib.dir/infback.c.o -c /mold/third-party/zlib/infback.c\n\nthird-party/zlib/CMakeFiles/zlib.dir/infback.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlib.dir/infback.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/infback.c > CMakeFiles/zlib.dir/infback.c.i\n\nthird-party/zlib/CMakeFiles/zlib.dir/infback.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlib.dir/infback.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/infback.c -o CMakeFiles/zlib.dir/infback.c.s\n\nthird-party/zlib/CMakeFiles/zlib.dir/inftrees.c.o: third-party/zlib/CMakeFiles/zlib.dir/flags.make\nthird-party/zlib/CMakeFiles/zlib.dir/inftrees.c.o: third-party/zlib/inftrees.c\nthird-party/zlib/CMakeFiles/zlib.dir/inftrees.c.o: third-party/zlib/CMakeFiles/zlib.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_11) \"Building C object third-party/zlib/CMakeFiles/zlib.dir/inftrees.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlib.dir/inftrees.c.o -MF CMakeFiles/zlib.dir/inftrees.c.o.d -o CMakeFiles/zlib.dir/inftrees.c.o -c /mold/third-party/zlib/inftrees.c\n\nthird-party/zlib/CMakeFiles/zlib.dir/inftrees.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlib.dir/inftrees.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/inftrees.c > CMakeFiles/zlib.dir/inftrees.c.i\n\nthird-party/zlib/CMakeFiles/zlib.dir/inftrees.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlib.dir/inftrees.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/inftrees.c -o CMakeFiles/zlib.dir/inftrees.c.s\n\nthird-party/zlib/CMakeFiles/zlib.dir/inffast.c.o: third-party/zlib/CMakeFiles/zlib.dir/flags.make\nthird-party/zlib/CMakeFiles/zlib.dir/inffast.c.o: third-party/zlib/inffast.c\nthird-party/zlib/CMakeFiles/zlib.dir/inffast.c.o: third-party/zlib/CMakeFiles/zlib.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_12) \"Building C object third-party/zlib/CMakeFiles/zlib.dir/inffast.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlib.dir/inffast.c.o -MF CMakeFiles/zlib.dir/inffast.c.o.d -o CMakeFiles/zlib.dir/inffast.c.o -c /mold/third-party/zlib/inffast.c\n\nthird-party/zlib/CMakeFiles/zlib.dir/inffast.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlib.dir/inffast.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/inffast.c > CMakeFiles/zlib.dir/inffast.c.i\n\nthird-party/zlib/CMakeFiles/zlib.dir/inffast.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlib.dir/inffast.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/inffast.c -o CMakeFiles/zlib.dir/inffast.c.s\n\nthird-party/zlib/CMakeFiles/zlib.dir/trees.c.o: third-party/zlib/CMakeFiles/zlib.dir/flags.make\nthird-party/zlib/CMakeFiles/zlib.dir/trees.c.o: third-party/zlib/trees.c\nthird-party/zlib/CMakeFiles/zlib.dir/trees.c.o: third-party/zlib/CMakeFiles/zlib.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_13) \"Building C object third-party/zlib/CMakeFiles/zlib.dir/trees.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlib.dir/trees.c.o -MF CMakeFiles/zlib.dir/trees.c.o.d -o CMakeFiles/zlib.dir/trees.c.o -c /mold/third-party/zlib/trees.c\n\nthird-party/zlib/CMakeFiles/zlib.dir/trees.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlib.dir/trees.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/trees.c > CMakeFiles/zlib.dir/trees.c.i\n\nthird-party/zlib/CMakeFiles/zlib.dir/trees.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlib.dir/trees.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/trees.c -o CMakeFiles/zlib.dir/trees.c.s\n\nthird-party/zlib/CMakeFiles/zlib.dir/uncompr.c.o: third-party/zlib/CMakeFiles/zlib.dir/flags.make\nthird-party/zlib/CMakeFiles/zlib.dir/uncompr.c.o: third-party/zlib/uncompr.c\nthird-party/zlib/CMakeFiles/zlib.dir/uncompr.c.o: third-party/zlib/CMakeFiles/zlib.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_14) \"Building C object third-party/zlib/CMakeFiles/zlib.dir/uncompr.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlib.dir/uncompr.c.o -MF CMakeFiles/zlib.dir/uncompr.c.o.d -o CMakeFiles/zlib.dir/uncompr.c.o -c /mold/third-party/zlib/uncompr.c\n\nthird-party/zlib/CMakeFiles/zlib.dir/uncompr.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlib.dir/uncompr.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/uncompr.c > CMakeFiles/zlib.dir/uncompr.c.i\n\nthird-party/zlib/CMakeFiles/zlib.dir/uncompr.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlib.dir/uncompr.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/uncompr.c -o CMakeFiles/zlib.dir/uncompr.c.s\n\nthird-party/zlib/CMakeFiles/zlib.dir/zutil.c.o: third-party/zlib/CMakeFiles/zlib.dir/flags.make\nthird-party/zlib/CMakeFiles/zlib.dir/zutil.c.o: third-party/zlib/zutil.c\nthird-party/zlib/CMakeFiles/zlib.dir/zutil.c.o: third-party/zlib/CMakeFiles/zlib.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_15) \"Building C object third-party/zlib/CMakeFiles/zlib.dir/zutil.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlib.dir/zutil.c.o -MF CMakeFiles/zlib.dir/zutil.c.o.d -o CMakeFiles/zlib.dir/zutil.c.o -c /mold/third-party/zlib/zutil.c\n\nthird-party/zlib/CMakeFiles/zlib.dir/zutil.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlib.dir/zutil.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/zutil.c > CMakeFiles/zlib.dir/zutil.c.i\n\nthird-party/zlib/CMakeFiles/zlib.dir/zutil.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlib.dir/zutil.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/zutil.c -o CMakeFiles/zlib.dir/zutil.c.s\n\n# Object files for target zlib\nzlib_OBJECTS = \\\n\"CMakeFiles/zlib.dir/adler32.c.o\" \\\n\"CMakeFiles/zlib.dir/compress.c.o\" \\\n\"CMakeFiles/zlib.dir/crc32.c.o\" \\\n\"CMakeFiles/zlib.dir/deflate.c.o\" \\\n\"CMakeFiles/zlib.dir/gzclose.c.o\" \\\n\"CMakeFiles/zlib.dir/gzlib.c.o\" \\\n\"CMakeFiles/zlib.dir/gzread.c.o\" \\\n\"CMakeFiles/zlib.dir/gzwrite.c.o\" \\\n\"CMakeFiles/zlib.dir/inflate.c.o\" \\\n\"CMakeFiles/zlib.dir/infback.c.o\" \\\n\"CMakeFiles/zlib.dir/inftrees.c.o\" \\\n\"CMakeFiles/zlib.dir/inffast.c.o\" \\\n\"CMakeFiles/zlib.dir/trees.c.o\" \\\n\"CMakeFiles/zlib.dir/uncompr.c.o\" \\\n\"CMakeFiles/zlib.dir/zutil.c.o\"\n\n# External object files for target zlib\nzlib_EXTERNAL_OBJECTS =\n\nthird-party/zlib/libz.so.1.3.1: third-party/zlib/CMakeFiles/zlib.dir/adler32.c.o\nthird-party/zlib/libz.so.1.3.1: third-party/zlib/CMakeFiles/zlib.dir/compress.c.o\nthird-party/zlib/libz.so.1.3.1: third-party/zlib/CMakeFiles/zlib.dir/crc32.c.o\nthird-party/zlib/libz.so.1.3.1: third-party/zlib/CMakeFiles/zlib.dir/deflate.c.o\nthird-party/zlib/libz.so.1.3.1: third-party/zlib/CMakeFiles/zlib.dir/gzclose.c.o\nthird-party/zlib/libz.so.1.3.1: third-party/zlib/CMakeFiles/zlib.dir/gzlib.c.o\nthird-party/zlib/libz.so.1.3.1: third-party/zlib/CMakeFiles/zlib.dir/gzread.c.o\nthird-party/zlib/libz.so.1.3.1: third-party/zlib/CMakeFiles/zlib.dir/gzwrite.c.o\nthird-party/zlib/libz.so.1.3.1: third-party/zlib/CMakeFiles/zlib.dir/inflate.c.o\nthird-party/zlib/libz.so.1.3.1: third-party/zlib/CMakeFiles/zlib.dir/infback.c.o\nthird-party/zlib/libz.so.1.3.1: third-party/zlib/CMakeFiles/zlib.dir/inftrees.c.o\nthird-party/zlib/libz.so.1.3.1: third-party/zlib/CMakeFiles/zlib.dir/inffast.c.o\nthird-party/zlib/libz.so.1.3.1: third-party/zlib/CMakeFiles/zlib.dir/trees.c.o\nthird-party/zlib/libz.so.1.3.1: third-party/zlib/CMakeFiles/zlib.dir/uncompr.c.o\nthird-party/zlib/libz.so.1.3.1: third-party/zlib/CMakeFiles/zlib.dir/zutil.c.o\nthird-party/zlib/libz.so.1.3.1: third-party/zlib/CMakeFiles/zlib.dir/build.make\nthird-party/zlib/libz.so.1.3.1: third-party/zlib/CMakeFiles/zlib.dir/link.txt\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --bold --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_16) \"Linking C shared library libz.so\"\n\tcd /mold/third-party/zlib && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/zlib.dir/link.txt --verbose=$(VERBOSE)\n\tcd /mold/third-party/zlib && $(CMAKE_COMMAND) -E cmake_symlink_library libz.so.1.3.1 libz.so.1 libz.so\n\nthird-party/zlib/libz.so.1: third-party/zlib/libz.so.1.3.1\n\t@$(CMAKE_COMMAND) -E touch_nocreate third-party/zlib/libz.so.1\n\nthird-party/zlib/libz.so: third-party/zlib/libz.so.1.3.1\n\t@$(CMAKE_COMMAND) -E touch_nocreate third-party/zlib/libz.so\n\n# Rule to build all files generated by this target.\nthird-party/zlib/CMakeFiles/zlib.dir/build: third-party/zlib/libz.so\n.PHONY : third-party/zlib/CMakeFiles/zlib.dir/build\n\nthird-party/zlib/CMakeFiles/zlib.dir/clean:\n\tcd /mold/third-party/zlib && $(CMAKE_COMMAND) -P CMakeFiles/zlib.dir/cmake_clean.cmake\n.PHONY : third-party/zlib/CMakeFiles/zlib.dir/clean\n\nthird-party/zlib/CMakeFiles/zlib.dir/depend:\n\tcd /mold && $(CMAKE_COMMAND) -E cmake_depends \"Unix Makefiles\" /mold /mold/third-party/zlib /mold /mold/third-party/zlib /mold/third-party/zlib/CMakeFiles/zlib.dir/DependInfo.cmake \"--color=$(COLOR)\"\n.PHONY : third-party/zlib/CMakeFiles/zlib.dir/depend\n\n"
  },
  {
    "path": "third-party/zlib/CMakeFiles/zlibstatic.dir/build.make",
    "content": "# CMAKE generated file: DO NOT EDIT!\n# Generated by \"Unix Makefiles\" Generator, CMake Version 3.28\n\n# Delete rule output on recipe failure.\n.DELETE_ON_ERROR:\n\n#=============================================================================\n# Special targets provided by cmake.\n\n# Disable implicit rules so canonical targets will work.\n.SUFFIXES:\n\n# Disable VCS-based implicit rules.\n% : %,v\n\n# Disable VCS-based implicit rules.\n% : RCS/%\n\n# Disable VCS-based implicit rules.\n% : RCS/%,v\n\n# Disable VCS-based implicit rules.\n% : SCCS/s.%\n\n# Disable VCS-based implicit rules.\n% : s.%\n\n.SUFFIXES: .hpux_make_needs_suffix_list\n\n# Command-line flag to silence nested $(MAKE).\n$(VERBOSE)MAKESILENT = -s\n\n#Suppress display of executed commands.\n$(VERBOSE).SILENT:\n\n# A target that is always out of date.\ncmake_force:\n.PHONY : cmake_force\n\n#=============================================================================\n# Set environment variables for the build.\n\n# The shell in which to execute make rules.\nSHELL = /bin/sh\n\n# The CMake executable.\nCMAKE_COMMAND = /usr/bin/cmake\n\n# The command to remove a file.\nRM = /usr/bin/cmake -E rm -f\n\n# Escaping for special characters.\nEQUALS = =\n\n# The top-level source directory on which CMake was run.\nCMAKE_SOURCE_DIR = /mold\n\n# The top-level build directory on which CMake was run.\nCMAKE_BINARY_DIR = /mold\n\n# Include any dependencies generated for this target.\ninclude third-party/zlib/CMakeFiles/zlibstatic.dir/depend.make\n# Include any dependencies generated by the compiler for this target.\ninclude third-party/zlib/CMakeFiles/zlibstatic.dir/compiler_depend.make\n\n# Include the progress variables for this target.\ninclude third-party/zlib/CMakeFiles/zlibstatic.dir/progress.make\n\n# Include the compile flags for this target's objects.\ninclude third-party/zlib/CMakeFiles/zlibstatic.dir/flags.make\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/adler32.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/flags.make\nthird-party/zlib/CMakeFiles/zlibstatic.dir/adler32.c.o: third-party/zlib/adler32.c\nthird-party/zlib/CMakeFiles/zlibstatic.dir/adler32.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) \"Building C object third-party/zlib/CMakeFiles/zlibstatic.dir/adler32.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlibstatic.dir/adler32.c.o -MF CMakeFiles/zlibstatic.dir/adler32.c.o.d -o CMakeFiles/zlibstatic.dir/adler32.c.o -c /mold/third-party/zlib/adler32.c\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/adler32.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlibstatic.dir/adler32.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/adler32.c > CMakeFiles/zlibstatic.dir/adler32.c.i\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/adler32.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlibstatic.dir/adler32.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/adler32.c -o CMakeFiles/zlibstatic.dir/adler32.c.s\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/compress.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/flags.make\nthird-party/zlib/CMakeFiles/zlibstatic.dir/compress.c.o: third-party/zlib/compress.c\nthird-party/zlib/CMakeFiles/zlibstatic.dir/compress.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) \"Building C object third-party/zlib/CMakeFiles/zlibstatic.dir/compress.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlibstatic.dir/compress.c.o -MF CMakeFiles/zlibstatic.dir/compress.c.o.d -o CMakeFiles/zlibstatic.dir/compress.c.o -c /mold/third-party/zlib/compress.c\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/compress.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlibstatic.dir/compress.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/compress.c > CMakeFiles/zlibstatic.dir/compress.c.i\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/compress.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlibstatic.dir/compress.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/compress.c -o CMakeFiles/zlibstatic.dir/compress.c.s\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/crc32.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/flags.make\nthird-party/zlib/CMakeFiles/zlibstatic.dir/crc32.c.o: third-party/zlib/crc32.c\nthird-party/zlib/CMakeFiles/zlibstatic.dir/crc32.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) \"Building C object third-party/zlib/CMakeFiles/zlibstatic.dir/crc32.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlibstatic.dir/crc32.c.o -MF CMakeFiles/zlibstatic.dir/crc32.c.o.d -o CMakeFiles/zlibstatic.dir/crc32.c.o -c /mold/third-party/zlib/crc32.c\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/crc32.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlibstatic.dir/crc32.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/crc32.c > CMakeFiles/zlibstatic.dir/crc32.c.i\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/crc32.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlibstatic.dir/crc32.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/crc32.c -o CMakeFiles/zlibstatic.dir/crc32.c.s\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/deflate.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/flags.make\nthird-party/zlib/CMakeFiles/zlibstatic.dir/deflate.c.o: third-party/zlib/deflate.c\nthird-party/zlib/CMakeFiles/zlibstatic.dir/deflate.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) \"Building C object third-party/zlib/CMakeFiles/zlibstatic.dir/deflate.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlibstatic.dir/deflate.c.o -MF CMakeFiles/zlibstatic.dir/deflate.c.o.d -o CMakeFiles/zlibstatic.dir/deflate.c.o -c /mold/third-party/zlib/deflate.c\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/deflate.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlibstatic.dir/deflate.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/deflate.c > CMakeFiles/zlibstatic.dir/deflate.c.i\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/deflate.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlibstatic.dir/deflate.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/deflate.c -o CMakeFiles/zlibstatic.dir/deflate.c.s\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/gzclose.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/flags.make\nthird-party/zlib/CMakeFiles/zlibstatic.dir/gzclose.c.o: third-party/zlib/gzclose.c\nthird-party/zlib/CMakeFiles/zlibstatic.dir/gzclose.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_5) \"Building C object third-party/zlib/CMakeFiles/zlibstatic.dir/gzclose.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlibstatic.dir/gzclose.c.o -MF CMakeFiles/zlibstatic.dir/gzclose.c.o.d -o CMakeFiles/zlibstatic.dir/gzclose.c.o -c /mold/third-party/zlib/gzclose.c\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/gzclose.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlibstatic.dir/gzclose.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/gzclose.c > CMakeFiles/zlibstatic.dir/gzclose.c.i\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/gzclose.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlibstatic.dir/gzclose.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/gzclose.c -o CMakeFiles/zlibstatic.dir/gzclose.c.s\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/gzlib.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/flags.make\nthird-party/zlib/CMakeFiles/zlibstatic.dir/gzlib.c.o: third-party/zlib/gzlib.c\nthird-party/zlib/CMakeFiles/zlibstatic.dir/gzlib.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_6) \"Building C object third-party/zlib/CMakeFiles/zlibstatic.dir/gzlib.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlibstatic.dir/gzlib.c.o -MF CMakeFiles/zlibstatic.dir/gzlib.c.o.d -o CMakeFiles/zlibstatic.dir/gzlib.c.o -c /mold/third-party/zlib/gzlib.c\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/gzlib.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlibstatic.dir/gzlib.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/gzlib.c > CMakeFiles/zlibstatic.dir/gzlib.c.i\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/gzlib.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlibstatic.dir/gzlib.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/gzlib.c -o CMakeFiles/zlibstatic.dir/gzlib.c.s\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/gzread.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/flags.make\nthird-party/zlib/CMakeFiles/zlibstatic.dir/gzread.c.o: third-party/zlib/gzread.c\nthird-party/zlib/CMakeFiles/zlibstatic.dir/gzread.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_7) \"Building C object third-party/zlib/CMakeFiles/zlibstatic.dir/gzread.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlibstatic.dir/gzread.c.o -MF CMakeFiles/zlibstatic.dir/gzread.c.o.d -o CMakeFiles/zlibstatic.dir/gzread.c.o -c /mold/third-party/zlib/gzread.c\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/gzread.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlibstatic.dir/gzread.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/gzread.c > CMakeFiles/zlibstatic.dir/gzread.c.i\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/gzread.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlibstatic.dir/gzread.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/gzread.c -o CMakeFiles/zlibstatic.dir/gzread.c.s\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/gzwrite.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/flags.make\nthird-party/zlib/CMakeFiles/zlibstatic.dir/gzwrite.c.o: third-party/zlib/gzwrite.c\nthird-party/zlib/CMakeFiles/zlibstatic.dir/gzwrite.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_8) \"Building C object third-party/zlib/CMakeFiles/zlibstatic.dir/gzwrite.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlibstatic.dir/gzwrite.c.o -MF CMakeFiles/zlibstatic.dir/gzwrite.c.o.d -o CMakeFiles/zlibstatic.dir/gzwrite.c.o -c /mold/third-party/zlib/gzwrite.c\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/gzwrite.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlibstatic.dir/gzwrite.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/gzwrite.c > CMakeFiles/zlibstatic.dir/gzwrite.c.i\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/gzwrite.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlibstatic.dir/gzwrite.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/gzwrite.c -o CMakeFiles/zlibstatic.dir/gzwrite.c.s\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/inflate.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/flags.make\nthird-party/zlib/CMakeFiles/zlibstatic.dir/inflate.c.o: third-party/zlib/inflate.c\nthird-party/zlib/CMakeFiles/zlibstatic.dir/inflate.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_9) \"Building C object third-party/zlib/CMakeFiles/zlibstatic.dir/inflate.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlibstatic.dir/inflate.c.o -MF CMakeFiles/zlibstatic.dir/inflate.c.o.d -o CMakeFiles/zlibstatic.dir/inflate.c.o -c /mold/third-party/zlib/inflate.c\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/inflate.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlibstatic.dir/inflate.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/inflate.c > CMakeFiles/zlibstatic.dir/inflate.c.i\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/inflate.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlibstatic.dir/inflate.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/inflate.c -o CMakeFiles/zlibstatic.dir/inflate.c.s\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/infback.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/flags.make\nthird-party/zlib/CMakeFiles/zlibstatic.dir/infback.c.o: third-party/zlib/infback.c\nthird-party/zlib/CMakeFiles/zlibstatic.dir/infback.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_10) \"Building C object third-party/zlib/CMakeFiles/zlibstatic.dir/infback.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlibstatic.dir/infback.c.o -MF CMakeFiles/zlibstatic.dir/infback.c.o.d -o CMakeFiles/zlibstatic.dir/infback.c.o -c /mold/third-party/zlib/infback.c\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/infback.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlibstatic.dir/infback.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/infback.c > CMakeFiles/zlibstatic.dir/infback.c.i\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/infback.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlibstatic.dir/infback.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/infback.c -o CMakeFiles/zlibstatic.dir/infback.c.s\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/inftrees.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/flags.make\nthird-party/zlib/CMakeFiles/zlibstatic.dir/inftrees.c.o: third-party/zlib/inftrees.c\nthird-party/zlib/CMakeFiles/zlibstatic.dir/inftrees.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_11) \"Building C object third-party/zlib/CMakeFiles/zlibstatic.dir/inftrees.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlibstatic.dir/inftrees.c.o -MF CMakeFiles/zlibstatic.dir/inftrees.c.o.d -o CMakeFiles/zlibstatic.dir/inftrees.c.o -c /mold/third-party/zlib/inftrees.c\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/inftrees.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlibstatic.dir/inftrees.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/inftrees.c > CMakeFiles/zlibstatic.dir/inftrees.c.i\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/inftrees.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlibstatic.dir/inftrees.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/inftrees.c -o CMakeFiles/zlibstatic.dir/inftrees.c.s\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/inffast.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/flags.make\nthird-party/zlib/CMakeFiles/zlibstatic.dir/inffast.c.o: third-party/zlib/inffast.c\nthird-party/zlib/CMakeFiles/zlibstatic.dir/inffast.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_12) \"Building C object third-party/zlib/CMakeFiles/zlibstatic.dir/inffast.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlibstatic.dir/inffast.c.o -MF CMakeFiles/zlibstatic.dir/inffast.c.o.d -o CMakeFiles/zlibstatic.dir/inffast.c.o -c /mold/third-party/zlib/inffast.c\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/inffast.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlibstatic.dir/inffast.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/inffast.c > CMakeFiles/zlibstatic.dir/inffast.c.i\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/inffast.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlibstatic.dir/inffast.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/inffast.c -o CMakeFiles/zlibstatic.dir/inffast.c.s\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/trees.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/flags.make\nthird-party/zlib/CMakeFiles/zlibstatic.dir/trees.c.o: third-party/zlib/trees.c\nthird-party/zlib/CMakeFiles/zlibstatic.dir/trees.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_13) \"Building C object third-party/zlib/CMakeFiles/zlibstatic.dir/trees.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlibstatic.dir/trees.c.o -MF CMakeFiles/zlibstatic.dir/trees.c.o.d -o CMakeFiles/zlibstatic.dir/trees.c.o -c /mold/third-party/zlib/trees.c\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/trees.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlibstatic.dir/trees.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/trees.c > CMakeFiles/zlibstatic.dir/trees.c.i\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/trees.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlibstatic.dir/trees.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/trees.c -o CMakeFiles/zlibstatic.dir/trees.c.s\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/uncompr.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/flags.make\nthird-party/zlib/CMakeFiles/zlibstatic.dir/uncompr.c.o: third-party/zlib/uncompr.c\nthird-party/zlib/CMakeFiles/zlibstatic.dir/uncompr.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_14) \"Building C object third-party/zlib/CMakeFiles/zlibstatic.dir/uncompr.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlibstatic.dir/uncompr.c.o -MF CMakeFiles/zlibstatic.dir/uncompr.c.o.d -o CMakeFiles/zlibstatic.dir/uncompr.c.o -c /mold/third-party/zlib/uncompr.c\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/uncompr.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlibstatic.dir/uncompr.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/uncompr.c > CMakeFiles/zlibstatic.dir/uncompr.c.i\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/uncompr.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlibstatic.dir/uncompr.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/uncompr.c -o CMakeFiles/zlibstatic.dir/uncompr.c.s\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/zutil.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/flags.make\nthird-party/zlib/CMakeFiles/zlibstatic.dir/zutil.c.o: third-party/zlib/zutil.c\nthird-party/zlib/CMakeFiles/zlibstatic.dir/zutil.c.o: third-party/zlib/CMakeFiles/zlibstatic.dir/compiler_depend.ts\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_15) \"Building C object third-party/zlib/CMakeFiles/zlibstatic.dir/zutil.c.o\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT third-party/zlib/CMakeFiles/zlibstatic.dir/zutil.c.o -MF CMakeFiles/zlibstatic.dir/zutil.c.o.d -o CMakeFiles/zlibstatic.dir/zutil.c.o -c /mold/third-party/zlib/zutil.c\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/zutil.c.i: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Preprocessing C source to CMakeFiles/zlibstatic.dir/zutil.c.i\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /mold/third-party/zlib/zutil.c > CMakeFiles/zlibstatic.dir/zutil.c.i\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/zutil.c.s: cmake_force\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green \"Compiling C source to assembly CMakeFiles/zlibstatic.dir/zutil.c.s\"\n\tcd /mold/third-party/zlib && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /mold/third-party/zlib/zutil.c -o CMakeFiles/zlibstatic.dir/zutil.c.s\n\n# Object files for target zlibstatic\nzlibstatic_OBJECTS = \\\n\"CMakeFiles/zlibstatic.dir/adler32.c.o\" \\\n\"CMakeFiles/zlibstatic.dir/compress.c.o\" \\\n\"CMakeFiles/zlibstatic.dir/crc32.c.o\" \\\n\"CMakeFiles/zlibstatic.dir/deflate.c.o\" \\\n\"CMakeFiles/zlibstatic.dir/gzclose.c.o\" \\\n\"CMakeFiles/zlibstatic.dir/gzlib.c.o\" \\\n\"CMakeFiles/zlibstatic.dir/gzread.c.o\" \\\n\"CMakeFiles/zlibstatic.dir/gzwrite.c.o\" \\\n\"CMakeFiles/zlibstatic.dir/inflate.c.o\" \\\n\"CMakeFiles/zlibstatic.dir/infback.c.o\" \\\n\"CMakeFiles/zlibstatic.dir/inftrees.c.o\" \\\n\"CMakeFiles/zlibstatic.dir/inffast.c.o\" \\\n\"CMakeFiles/zlibstatic.dir/trees.c.o\" \\\n\"CMakeFiles/zlibstatic.dir/uncompr.c.o\" \\\n\"CMakeFiles/zlibstatic.dir/zutil.c.o\"\n\n# External object files for target zlibstatic\nzlibstatic_EXTERNAL_OBJECTS =\n\nthird-party/zlib/libz.a: third-party/zlib/CMakeFiles/zlibstatic.dir/adler32.c.o\nthird-party/zlib/libz.a: third-party/zlib/CMakeFiles/zlibstatic.dir/compress.c.o\nthird-party/zlib/libz.a: third-party/zlib/CMakeFiles/zlibstatic.dir/crc32.c.o\nthird-party/zlib/libz.a: third-party/zlib/CMakeFiles/zlibstatic.dir/deflate.c.o\nthird-party/zlib/libz.a: third-party/zlib/CMakeFiles/zlibstatic.dir/gzclose.c.o\nthird-party/zlib/libz.a: third-party/zlib/CMakeFiles/zlibstatic.dir/gzlib.c.o\nthird-party/zlib/libz.a: third-party/zlib/CMakeFiles/zlibstatic.dir/gzread.c.o\nthird-party/zlib/libz.a: third-party/zlib/CMakeFiles/zlibstatic.dir/gzwrite.c.o\nthird-party/zlib/libz.a: third-party/zlib/CMakeFiles/zlibstatic.dir/inflate.c.o\nthird-party/zlib/libz.a: third-party/zlib/CMakeFiles/zlibstatic.dir/infback.c.o\nthird-party/zlib/libz.a: third-party/zlib/CMakeFiles/zlibstatic.dir/inftrees.c.o\nthird-party/zlib/libz.a: third-party/zlib/CMakeFiles/zlibstatic.dir/inffast.c.o\nthird-party/zlib/libz.a: third-party/zlib/CMakeFiles/zlibstatic.dir/trees.c.o\nthird-party/zlib/libz.a: third-party/zlib/CMakeFiles/zlibstatic.dir/uncompr.c.o\nthird-party/zlib/libz.a: third-party/zlib/CMakeFiles/zlibstatic.dir/zutil.c.o\nthird-party/zlib/libz.a: third-party/zlib/CMakeFiles/zlibstatic.dir/build.make\nthird-party/zlib/libz.a: third-party/zlib/CMakeFiles/zlibstatic.dir/link.txt\n\t@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" --green --bold --progress-dir=/mold/CMakeFiles --progress-num=$(CMAKE_PROGRESS_16) \"Linking C static library libz.a\"\n\tcd /mold/third-party/zlib && $(CMAKE_COMMAND) -P CMakeFiles/zlibstatic.dir/cmake_clean_target.cmake\n\tcd /mold/third-party/zlib && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/zlibstatic.dir/link.txt --verbose=$(VERBOSE)\n\n# Rule to build all files generated by this target.\nthird-party/zlib/CMakeFiles/zlibstatic.dir/build: third-party/zlib/libz.a\n.PHONY : third-party/zlib/CMakeFiles/zlibstatic.dir/build\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/clean:\n\tcd /mold/third-party/zlib && $(CMAKE_COMMAND) -P CMakeFiles/zlibstatic.dir/cmake_clean.cmake\n.PHONY : third-party/zlib/CMakeFiles/zlibstatic.dir/clean\n\nthird-party/zlib/CMakeFiles/zlibstatic.dir/depend:\n\tcd /mold && $(CMAKE_COMMAND) -E cmake_depends \"Unix Makefiles\" /mold /mold/third-party/zlib /mold /mold/third-party/zlib /mold/third-party/zlib/CMakeFiles/zlibstatic.dir/DependInfo.cmake \"--color=$(COLOR)\"\n.PHONY : third-party/zlib/CMakeFiles/zlibstatic.dir/depend\n\n"
  },
  {
    "path": "third-party/zlib/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 2.4.4...3.15.0)\nset(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)\n\nproject(zlib C)\n\nset(VERSION \"1.3.1\")\n\noption(ZLIB_BUILD_EXAMPLES \"Enable Zlib Examples\" ON)\n\nset(INSTALL_BIN_DIR \"${CMAKE_INSTALL_PREFIX}/bin\" CACHE PATH \"Installation directory for executables\")\nset(INSTALL_LIB_DIR \"${CMAKE_INSTALL_PREFIX}/lib\" CACHE PATH \"Installation directory for libraries\")\nset(INSTALL_INC_DIR \"${CMAKE_INSTALL_PREFIX}/include\" CACHE PATH \"Installation directory for headers\")\nset(INSTALL_MAN_DIR \"${CMAKE_INSTALL_PREFIX}/share/man\" CACHE PATH \"Installation directory for manual pages\")\nset(INSTALL_PKGCONFIG_DIR \"${CMAKE_INSTALL_PREFIX}/share/pkgconfig\" CACHE PATH \"Installation directory for pkgconfig (.pc) files\")\n\ninclude(CheckTypeSize)\ninclude(CheckFunctionExists)\ninclude(CheckIncludeFile)\ninclude(CheckCSourceCompiles)\nenable_testing()\n\ncheck_include_file(sys/types.h HAVE_SYS_TYPES_H)\ncheck_include_file(stdint.h    HAVE_STDINT_H)\ncheck_include_file(stddef.h    HAVE_STDDEF_H)\n\n#\n# Check to see if we have large file support\n#\nset(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1)\n# We add these other definitions here because CheckTypeSize.cmake\n# in CMake 2.4.x does not automatically do so and we want\n# compatibility with CMake 2.4.x.\nif(HAVE_SYS_TYPES_H)\n    list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H)\nendif()\nif(HAVE_STDINT_H)\n    list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H)\nendif()\nif(HAVE_STDDEF_H)\n    list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H)\nendif()\ncheck_type_size(off64_t OFF64_T)\nif(HAVE_OFF64_T)\n   add_definitions(-D_LARGEFILE64_SOURCE=1)\nendif()\nset(CMAKE_REQUIRED_DEFINITIONS) # clear variable\n\n#\n# Check for fseeko\n#\ncheck_function_exists(fseeko HAVE_FSEEKO)\nif(NOT HAVE_FSEEKO)\n    add_definitions(-DNO_FSEEKO)\nendif()\n\n#\n# Check for unistd.h\n#\ncheck_include_file(unistd.h Z_HAVE_UNISTD_H)\n\nif(MSVC)\n    set(CMAKE_DEBUG_POSTFIX \"d\")\n    add_definitions(-D_CRT_SECURE_NO_DEPRECATE)\n    add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)\n    include_directories(${CMAKE_CURRENT_SOURCE_DIR})\nendif()\n\nif(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)\n    # If we're doing an out of source build and the user has a zconf.h\n    # in their source tree...\n    if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h)\n        message(STATUS \"Renaming\")\n        message(STATUS \"    ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h\")\n        message(STATUS \"to 'zconf.h.included' because this file is included with zlib\")\n        message(STATUS \"but CMake generates it automatically in the build directory.\")\n        file(RENAME ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.included)\n  endif()\nendif()\n\nset(ZLIB_PC ${CMAKE_CURRENT_BINARY_DIR}/zlib.pc)\nconfigure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zlib.pc.cmakein\n\t\t${ZLIB_PC} @ONLY)\nconfigure_file(\t${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein\n\t\t${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)\ninclude_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})\n\n\n#============================================================================\n# zlib\n#============================================================================\n\nset(ZLIB_PUBLIC_HDRS\n    ${CMAKE_CURRENT_BINARY_DIR}/zconf.h\n    zlib.h\n)\nset(ZLIB_PRIVATE_HDRS\n    crc32.h\n    deflate.h\n    gzguts.h\n    inffast.h\n    inffixed.h\n    inflate.h\n    inftrees.h\n    trees.h\n    zutil.h\n)\nset(ZLIB_SRCS\n    adler32.c\n    compress.c\n    crc32.c\n    deflate.c\n    gzclose.c\n    gzlib.c\n    gzread.c\n    gzwrite.c\n    inflate.c\n    infback.c\n    inftrees.c\n    inffast.c\n    trees.c\n    uncompr.c\n    zutil.c\n)\n\nif(NOT MINGW)\n    set(ZLIB_DLL_SRCS\n        win32/zlib1.rc # If present will override custom build rule below.\n    )\nendif()\n\n# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION\nfile(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)\nstring(REGEX REPLACE \".*#define[ \\t]+ZLIB_VERSION[ \\t]+\\\"([-0-9A-Za-z.]+)\\\".*\"\n    \"\\\\1\" ZLIB_FULL_VERSION ${_zlib_h_contents})\n\nif(MINGW)\n    # This gets us DLL resource information when compiling on MinGW.\n    if(NOT CMAKE_RC_COMPILER)\n        set(CMAKE_RC_COMPILER windres.exe)\n    endif()\n\n    add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj\n                       COMMAND ${CMAKE_RC_COMPILER}\n                            -D GCC_WINDRES\n                            -I ${CMAKE_CURRENT_SOURCE_DIR}\n                            -I ${CMAKE_CURRENT_BINARY_DIR}\n                            -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj\n                            -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)\n    set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)\nendif(MINGW)\n\nadd_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})\ntarget_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})\nadd_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})\ntarget_include_directories(zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})\nset_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)\nset_target_properties(zlib PROPERTIES SOVERSION 1)\n\nif(NOT CYGWIN)\n    # This property causes shared libraries on Linux to have the full version\n    # encoded into their final filename.  We disable this on Cygwin because\n    # it causes cygz-${ZLIB_FULL_VERSION}.dll to be created when cygz.dll\n    # seems to be the default.\n    #\n    # This has no effect with MSVC, on that platform the version info for\n    # the DLL comes from the resource file win32/zlib1.rc\n    set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION})\nendif()\n\nif(UNIX)\n    # On unix-like platforms the library is almost always called libz\n   set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z)\n   if(NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX))\n     set_target_properties(zlib PROPERTIES LINK_FLAGS \"-Wl,--version-script,\\\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\\\"\")\n   endif()\nelseif(BUILD_SHARED_LIBS AND WIN32)\n    # Creates zlib1.dll when building shared library version\n    set_target_properties(zlib PROPERTIES SUFFIX \"1.dll\")\nendif()\n\nif(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )\n    install(TARGETS zlib zlibstatic\n        RUNTIME DESTINATION \"${INSTALL_BIN_DIR}\"\n        ARCHIVE DESTINATION \"${INSTALL_LIB_DIR}\"\n        LIBRARY DESTINATION \"${INSTALL_LIB_DIR}\" )\nendif()\nif(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )\n    install(FILES ${ZLIB_PUBLIC_HDRS} DESTINATION \"${INSTALL_INC_DIR}\")\nendif()\nif(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )\n    install(FILES zlib.3 DESTINATION \"${INSTALL_MAN_DIR}/man3\")\nendif()\nif(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )\n    install(FILES ${ZLIB_PC} DESTINATION \"${INSTALL_PKGCONFIG_DIR}\")\nendif()\n\n#============================================================================\n# Example binaries\n#============================================================================\nif(ZLIB_BUILD_EXAMPLES)\n    add_executable(example test/example.c)\n    target_link_libraries(example zlib)\n    add_test(example example)\n\n    add_executable(minigzip test/minigzip.c)\n    target_link_libraries(minigzip zlib)\n\n    if(HAVE_OFF64_T)\n        add_executable(example64 test/example.c)\n        target_link_libraries(example64 zlib)\n        set_target_properties(example64 PROPERTIES COMPILE_FLAGS \"-D_FILE_OFFSET_BITS=64\")\n        add_test(example64 example64)\n\n        add_executable(minigzip64 test/minigzip.c)\n        target_link_libraries(minigzip64 zlib)\n        set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS \"-D_FILE_OFFSET_BITS=64\")\n    endif()\nendif()\n"
  },
  {
    "path": "third-party/zlib/ChangeLog",
    "content": "\n                ChangeLog file for zlib\n\nChanges in 1.3.1 (22 Jan 2024)\n- Reject overflows of zip header fields in minizip\n- Fix bug in inflateSync() for data held in bit buffer\n- Add LIT_MEM define to use more memory for a small deflate speedup\n- Fix decision on the emission of Zip64 end records in minizip\n- Add bounds checking to ERR_MSG() macro, used by zError()\n- Neutralize zip file traversal attacks in miniunz\n- Fix a bug in ZLIB_DEBUG compiles in check_match()\n- Various portability and appearance improvements\n\nChanges in 1.3 (18 Aug 2023)\n- Remove K&R function definitions and zlib2ansi\n- Fix bug in deflateBound() for level 0 and memLevel 9\n- Fix bug when gzungetc() is used immediately after gzopen()\n- Fix bug when using gzflush() with a very small buffer\n- Fix crash when gzsetparams() attempted for transparent write\n- Fix test/example.c to work with FORCE_STORED\n- Rewrite of zran in examples (see zran.c version history)\n- Fix minizip to allow it to open an empty zip file\n- Fix reading disk number start on zip64 files in minizip\n- Fix logic error in minizip argument processing\n- Add minizip testing to Makefile\n- Read multiple bytes instead of byte-by-byte in minizip unzip.c\n- Add memory sanitizer to configure (--memory)\n- Various portability improvements\n- Various documentation improvements\n- Various spelling and typo corrections\n\nChanges in 1.2.13 (13 Oct 2022)\n- Fix configure issue that discarded provided CC definition\n- Correct incorrect inputs provided to the CRC functions\n- Repair prototypes and exporting of new CRC functions\n- Fix inflateBack to detect invalid input with distances too far\n- Have infback() deliver all of the available output up to any error\n- Fix a bug when getting a gzip header extra field with inflate()\n- Fix bug in block type selection when Z_FIXED used\n- Tighten deflateBound bounds\n- Remove deleted assembler code references\n- Various portability and appearance improvements\n\nChanges in 1.2.12 (27 Mar 2022)\n- Cygwin does not have _wopen(), so do not create gzopen_w() there\n- Permit a deflateParams() parameter change as soon as possible\n- Limit hash table inserts after switch from stored deflate\n- Fix bug when window full in deflate_stored()\n- Fix CLEAR_HASH macro to be usable as a single statement\n- Avoid a conversion error in gzseek when off_t type too small\n- Have Makefile return non-zero error code on test failure\n- Avoid some conversion warnings in gzread.c and gzwrite.c\n- Update use of errno for newer Windows CE versions\n- Small speedup to inflate [psumbera]\n- Return an error if the gzputs string length can't fit in an int\n- Add address checking in clang to -w option of configure\n- Don't compute check value for raw inflate if asked to validate\n- Handle case where inflateSync used when header never processed\n- Avoid the use of ptrdiff_t\n- Avoid an undefined behavior of memcpy() in gzappend()\n- Avoid undefined behaviors of memcpy() in gz*printf()\n- Avoid an undefined behavior of memcpy() in _tr_stored_block()\n- Make the names in functions declarations identical to definitions\n- Remove old assembler code in which bugs have manifested\n- Fix deflateEnd() to not report an error at start of raw deflate\n- Add legal disclaimer to README\n- Emphasize the need to continue decompressing gzip members\n- Correct the initialization requirements for deflateInit2()\n- Fix a bug that can crash deflate on some input when using Z_FIXED\n- Assure that the number of bits for deflatePrime() is valid\n- Use a structure to make globals in enough.c evident\n- Use a macro for the printf format of big_t in enough.c\n- Clean up code style in enough.c, update version\n- Use inline function instead of macro for index in enough.c\n- Clarify that prefix codes are counted in enough.c\n- Show all the codes for the maximum tables size in enough.c\n- Add gznorm.c example, which normalizes gzip files\n- Fix the zran.c example to work on a multiple-member gzip file\n- Add tables for crc32_combine(), to speed it up by a factor of 200\n- Add crc32_combine_gen() and crc32_combine_op() for fast combines\n- Speed up software CRC-32 computation by a factor of 1.5 to 3\n- Use atomic test and set, if available, for dynamic CRC tables\n- Don't bother computing check value after successful inflateSync()\n- Correct comment in crc32.c\n- Add use of the ARMv8 crc32 instructions when requested\n- Use ARM crc32 instructions if the ARM architecture has them\n- Explicitly note that the 32-bit check values are 32 bits\n- Avoid adding empty gzip member after gzflush with Z_FINISH\n- Fix memory leak on error in gzlog.c\n- Fix error in comment on the polynomial representation of a byte\n- Clarify gz* function interfaces, referring to parameter names\n- Change macro name in inflate.c to avoid collision in VxWorks\n- Correct typo in blast.c\n- Improve portability of contrib/minizip\n- Fix indentation in minizip's zip.c\n- Replace black/white with allow/block. (theresa-m)\n- minizip warning fix if MAXU32 already defined. (gvollant)\n- Fix unztell64() in minizip to work past 4GB. (Daniël Hörchner)\n- Clean up minizip to reduce warnings for testing\n- Add fallthrough comments for gcc\n- Eliminate use of ULL constants\n- Separate out address sanitizing from warnings in configure\n- Remove destructive aspects of make distclean\n- Check for cc masquerading as gcc or clang in configure\n- Fix crc32.c to compile local functions only if used\n\nChanges in 1.2.11 (15 Jan 2017)\n- Fix deflate stored bug when pulling last block from window\n- Permit immediate deflateParams changes before any deflate input\n\nChanges in 1.2.10 (2 Jan 2017)\n- Avoid warnings on snprintf() return value\n- Fix bug in deflate_stored() for zero-length input\n- Fix bug in gzwrite.c that produced corrupt gzip files\n- Remove files to be installed before copying them in Makefile.in\n- Add warnings when compiling with assembler code\n\nChanges in 1.2.9 (31 Dec 2016)\n- Fix contrib/minizip to permit unzipping with desktop API [Zouzou]\n- Improve contrib/blast to return unused bytes\n- Assure that gzoffset() is correct when appending\n- Improve compress() and uncompress() to support large lengths\n- Fix bug in test/example.c where error code not saved\n- Remedy Coverity warning [Randers-Pehrson]\n- Improve speed of gzprintf() in transparent mode\n- Fix inflateInit2() bug when windowBits is 16 or 32\n- Change DEBUG macro to ZLIB_DEBUG\n- Avoid uninitialized access by gzclose_w()\n- Allow building zlib outside of the source directory\n- Fix bug that accepted invalid zlib header when windowBits is zero\n- Fix gzseek() problem on MinGW due to buggy _lseeki64 there\n- Loop on write() calls in gzwrite.c in case of non-blocking I/O\n- Add --warn (-w) option to ./configure for more compiler warnings\n- Reject a window size of 256 bytes if not using the zlib wrapper\n- Fix bug when level 0 used with Z_HUFFMAN or Z_RLE\n- Add --debug (-d) option to ./configure to define ZLIB_DEBUG\n- Fix bugs in creating a very large gzip header\n- Add uncompress2() function, which returns the input size used\n- Assure that deflateParams() will not switch functions mid-block\n- Dramatically speed up deflation for level 0 (storing)\n- Add gzfread(), duplicating the interface of fread()\n- Add gzfwrite(), duplicating the interface of fwrite()\n- Add deflateGetDictionary() function\n- Use snprintf() for later versions of Microsoft C\n- Fix *Init macros to use z_ prefix when requested\n- Replace as400 with os400 for OS/400 support [Monnerat]\n- Add crc32_z() and adler32_z() functions with size_t lengths\n- Update Visual Studio project files [AraHaan]\n\nChanges in 1.2.8 (28 Apr 2013)\n- Update contrib/minizip/iowin32.c for Windows RT [Vollant]\n- Do not force Z_CONST for C++\n- Clean up contrib/vstudio [Roß]\n- Correct spelling error in zlib.h\n- Fix mixed line endings in contrib/vstudio\n\nChanges in 1.2.7.3 (13 Apr 2013)\n- Fix version numbers and DLL names in contrib/vstudio/*/zlib.rc\n\nChanges in 1.2.7.2 (13 Apr 2013)\n- Change check for a four-byte type back to hexadecimal\n- Fix typo in win32/Makefile.msc\n- Add casts in gzwrite.c for pointer differences\n\nChanges in 1.2.7.1 (24 Mar 2013)\n- Replace use of unsafe string functions with snprintf if available\n- Avoid including stddef.h on Windows for Z_SOLO compile [Niessink]\n- Fix gzgetc undefine when Z_PREFIX set [Turk]\n- Eliminate use of mktemp in Makefile (not always available)\n- Fix bug in 'F' mode for gzopen()\n- Add inflateGetDictionary() function\n- Correct comment in deflate.h\n- Use _snprintf for snprintf in Microsoft C\n- On Darwin, only use /usr/bin/libtool if libtool is not Apple\n- Delete \"--version\" file if created by \"ar --version\" [Richard G.]\n- Fix configure check for veracity of compiler error return codes\n- Fix CMake compilation of static lib for MSVC2010 x64\n- Remove unused variable in infback9.c\n- Fix argument checks in gzlog_compress() and gzlog_write()\n- Clean up the usage of z_const and respect const usage within zlib\n- Clean up examples/gzlog.[ch] comparisons of different types\n- Avoid shift equal to bits in type (caused endless loop)\n- Fix uninitialized value bug in gzputc() introduced by const patches\n- Fix memory allocation error in examples/zran.c [Nor]\n- Fix bug where gzopen(), gzclose() would write an empty file\n- Fix bug in gzclose() when gzwrite() runs out of memory\n- Check for input buffer malloc failure in examples/gzappend.c\n- Add note to contrib/blast to use binary mode in stdio\n- Fix comparisons of differently signed integers in contrib/blast\n- Check for invalid code length codes in contrib/puff\n- Fix serious but very rare decompression bug in inftrees.c\n- Update inflateBack() comments, since inflate() can be faster\n- Use underscored I/O function names for WINAPI_FAMILY\n- Add _tr_flush_bits to the external symbols prefixed by --zprefix\n- Add contrib/vstudio/vc10 pre-build step for static only\n- Quote --version-script argument in CMakeLists.txt\n- Don't specify --version-script on Apple platforms in CMakeLists.txt\n- Fix casting error in contrib/testzlib/testzlib.c\n- Fix types in contrib/minizip to match result of get_crc_table()\n- Simplify contrib/vstudio/vc10 with 'd' suffix\n- Add TOP support to win32/Makefile.msc\n- Support i686 and amd64 assembler builds in CMakeLists.txt\n- Fix typos in the use of _LARGEFILE64_SOURCE in zconf.h\n- Add vc11 and vc12 build files to contrib/vstudio\n- Add gzvprintf() as an undocumented function in zlib\n- Fix configure for Sun shell\n- Remove runtime check in configure for four-byte integer type\n- Add casts and consts to ease user conversion to C++\n- Add man pages for minizip and miniunzip\n- In Makefile uninstall, don't rm if preceding cd fails\n- Do not return Z_BUF_ERROR if deflateParam() has nothing to write\n\nChanges in 1.2.7 (2 May 2012)\n- Replace use of memmove() with a simple copy for portability\n- Test for existence of strerror\n- Restore gzgetc_ for backward compatibility with 1.2.6\n- Fix build with non-GNU make on Solaris\n- Require gcc 4.0 or later on Mac OS X to use the hidden attribute\n- Include unistd.h for Watcom C\n- Use __WATCOMC__ instead of __WATCOM__\n- Do not use the visibility attribute if NO_VIZ defined\n- Improve the detection of no hidden visibility attribute\n- Avoid using __int64 for gcc or solo compilation\n- Cast to char * in gzprintf to avoid warnings [Zinser]\n- Fix make_vms.com for VAX [Zinser]\n- Don't use library or built-in byte swaps\n- Simplify test and use of gcc hidden attribute\n- Fix bug in gzclose_w() when gzwrite() fails to allocate memory\n- Add \"x\" (O_EXCL) and \"e\" (O_CLOEXEC) modes support to gzopen()\n- Fix bug in test/minigzip.c for configure --solo\n- Fix contrib/vstudio project link errors [Mohanathas]\n- Add ability to choose the builder in make_vms.com [Schweda]\n- Add DESTDIR support to mingw32 win32/Makefile.gcc\n- Fix comments in win32/Makefile.gcc for proper usage\n- Allow overriding the default install locations for cmake\n- Generate and install the pkg-config file with cmake\n- Build both a static and a shared version of zlib with cmake\n- Include version symbols for cmake builds\n- If using cmake with MSVC, add the source directory to the includes\n- Remove unneeded EXTRA_CFLAGS from win32/Makefile.gcc [Truta]\n- Move obsolete emx makefile to old [Truta]\n- Allow the use of -Wundef when compiling or using zlib\n- Avoid the use of the -u option with mktemp\n- Improve inflate() documentation on the use of Z_FINISH\n- Recognize clang as gcc\n- Add gzopen_w() in Windows for wide character path names\n- Rename zconf.h in CMakeLists.txt to move it out of the way\n- Add source directory in CMakeLists.txt for building examples\n- Look in build directory for zlib.pc in CMakeLists.txt\n- Remove gzflags from zlibvc.def in vc9 and vc10\n- Fix contrib/minizip compilation in the MinGW environment\n- Update ./configure for Solaris, support --64 [Mooney]\n- Remove -R. from Solaris shared build (possible security issue)\n- Avoid race condition for parallel make (-j) running example\n- Fix type mismatch between get_crc_table() and crc_table\n- Fix parsing of version with \"-\" in CMakeLists.txt [Snider, Ziegler]\n- Fix the path to zlib.map in CMakeLists.txt\n- Force the native libtool in Mac OS X to avoid GNU libtool [Beebe]\n- Add instructions to win32/Makefile.gcc for shared install [Torri]\n\nChanges in 1.2.6.1 (12 Feb 2012)\n- Avoid the use of the Objective-C reserved name \"id\"\n- Include io.h in gzguts.h for Microsoft compilers\n- Fix problem with ./configure --prefix and gzgetc macro\n- Include gz_header definition when compiling zlib solo\n- Put gzflags() functionality back in zutil.c\n- Avoid library header include in crc32.c for Z_SOLO\n- Use name in GCC_CLASSIC as C compiler for coverage testing, if set\n- Minor cleanup in contrib/minizip/zip.c [Vollant]\n- Update make_vms.com [Zinser]\n- Remove unnecessary gzgetc_ function\n- Use optimized byte swap operations for Microsoft and GNU [Snyder]\n- Fix minor typo in zlib.h comments [Rzesniowiecki]\n\nChanges in 1.2.6 (29 Jan 2012)\n- Update the Pascal interface in contrib/pascal\n- Fix function numbers for gzgetc_ in zlibvc.def files\n- Fix configure.ac for contrib/minizip [Schiffer]\n- Fix large-entry detection in minizip on 64-bit systems [Schiffer]\n- Have ./configure use the compiler return code for error indication\n- Fix CMakeLists.txt for cross compilation [McClure]\n- Fix contrib/minizip/zip.c for 64-bit architectures [Dalsnes]\n- Fix compilation of contrib/minizip on FreeBSD [Marquez]\n- Correct suggested usages in win32/Makefile.msc [Shachar, Horvath]\n- Include io.h for Turbo C / Borland C on all platforms [Truta]\n- Make version explicit in contrib/minizip/configure.ac [Bosmans]\n- Avoid warning for no encryption in contrib/minizip/zip.c [Vollant]\n- Minor cleanup up contrib/minizip/unzip.c [Vollant]\n- Fix bug when compiling minizip with C++ [Vollant]\n- Protect for long name and extra fields in contrib/minizip [Vollant]\n- Avoid some warnings in contrib/minizip [Vollant]\n- Add -I../.. -L../.. to CFLAGS for minizip and miniunzip\n- Add missing libs to minizip linker command\n- Add support for VPATH builds in contrib/minizip\n- Add an --enable-demos option to contrib/minizip/configure\n- Add the generation of configure.log by ./configure\n- Exit when required parameters not provided to win32/Makefile.gcc\n- Have gzputc return the character written instead of the argument\n- Use the -m option on ldconfig for BSD systems [Tobias]\n- Correct in zlib.map when deflateResetKeep was added\n\nChanges in 1.2.5.3 (15 Jan 2012)\n- Restore gzgetc function for binary compatibility\n- Do not use _lseeki64 under Borland C++ [Truta]\n- Update win32/Makefile.msc to build test/*.c [Truta]\n- Remove old/visualc6 given CMakefile and other alternatives\n- Update AS400 build files and documentation [Monnerat]\n- Update win32/Makefile.gcc to build test/*.c [Truta]\n- Permit stronger flushes after Z_BLOCK flushes\n- Avoid extraneous empty blocks when doing empty flushes\n- Permit Z_NULL arguments to deflatePending\n- Allow deflatePrime() to insert bits in the middle of a stream\n- Remove second empty static block for Z_PARTIAL_FLUSH\n- Write out all of the available bits when using Z_BLOCK\n- Insert the first two strings in the hash table after a flush\n\nChanges in 1.2.5.2 (17 Dec 2011)\n- fix ld error: unable to find version dependency 'ZLIB_1.2.5'\n- use relative symlinks for shared libs\n- Avoid searching past window for Z_RLE strategy\n- Assure that high-water mark initialization is always applied in deflate\n- Add assertions to fill_window() in deflate.c to match comments\n- Update python link in README\n- Correct spelling error in gzread.c\n- Fix bug in gzgets() for a concatenated empty gzip stream\n- Correct error in comment for gz_make()\n- Change gzread() and related to ignore junk after gzip streams\n- Allow gzread() and related to continue after gzclearerr()\n- Allow gzrewind() and gzseek() after a premature end-of-file\n- Simplify gzseek() now that raw after gzip is ignored\n- Change gzgetc() to a macro for speed (~40% speedup in testing)\n- Fix gzclose() to return the actual error last encountered\n- Always add large file support for windows\n- Include zconf.h for windows large file support\n- Include zconf.h.cmakein for windows large file support\n- Update zconf.h.cmakein on make distclean\n- Merge vestigial vsnprintf determination from zutil.h to gzguts.h\n- Clarify how gzopen() appends in zlib.h comments\n- Correct documentation of gzdirect() since junk at end now ignored\n- Add a transparent write mode to gzopen() when 'T' is in the mode\n- Update python link in zlib man page\n- Get inffixed.h and MAKEFIXED result to match\n- Add a ./config --solo option to make zlib subset with no library use\n- Add undocumented inflateResetKeep() function for CAB file decoding\n- Add --cover option to ./configure for gcc coverage testing\n- Add #define ZLIB_CONST option to use const in the z_stream interface\n- Add comment to gzdopen() in zlib.h to use dup() when using fileno()\n- Note behavior of uncompress() to provide as much data as it can\n- Add files in contrib/minizip to aid in building libminizip\n- Split off AR options in Makefile.in and configure\n- Change ON macro to Z_ARG to avoid application conflicts\n- Facilitate compilation with Borland C++ for pragmas and vsnprintf\n- Include io.h for Turbo C / Borland C++\n- Move example.c and minigzip.c to test/\n- Simplify incomplete code table filling in inflate_table()\n- Remove code from inflate.c and infback.c that is impossible to execute\n- Test the inflate code with full coverage\n- Allow deflateSetDictionary, inflateSetDictionary at any time (in raw)\n- Add deflateResetKeep and fix inflateResetKeep to retain dictionary\n- Fix gzwrite.c to accommodate reduced memory zlib compilation\n- Have inflate() with Z_FINISH avoid the allocation of a window\n- Do not set strm->adler when doing raw inflate\n- Fix gzeof() to behave just like feof() when read is not past end of file\n- Fix bug in gzread.c when end-of-file is reached\n- Avoid use of Z_BUF_ERROR in gz* functions except for premature EOF\n- Document gzread() capability to read concurrently written files\n- Remove hard-coding of resource compiler in CMakeLists.txt [Blammo]\n\nChanges in 1.2.5.1 (10 Sep 2011)\n- Update FAQ entry on shared builds (#13)\n- Avoid symbolic argument to chmod in Makefile.in\n- Fix bug and add consts in contrib/puff [Oberhumer]\n- Update contrib/puff/zeros.raw test file to have all block types\n- Add full coverage test for puff in contrib/puff/Makefile\n- Fix static-only-build install in Makefile.in\n- Fix bug in unzGetCurrentFileInfo() in contrib/minizip [Kuno]\n- Add libz.a dependency to shared in Makefile.in for parallel builds\n- Spell out \"number\" (instead of \"nb\") in zlib.h for total_in, total_out\n- Replace $(...) with `...` in configure for non-bash sh [Bowler]\n- Add darwin* to Darwin* and solaris* to SunOS\\ 5* in configure [Groffen]\n- Add solaris* to Linux* in configure to allow gcc use [Groffen]\n- Add *bsd* to Linux* case in configure [Bar-Lev]\n- Add inffast.obj to dependencies in win32/Makefile.msc\n- Correct spelling error in deflate.h [Kohler]\n- Change libzdll.a again to libz.dll.a (!) in win32/Makefile.gcc\n- Add test to configure for GNU C looking for gcc in output of $cc -v\n- Add zlib.pc generation to win32/Makefile.gcc [Weigelt]\n- Fix bug in zlib.h for _FILE_OFFSET_BITS set and _LARGEFILE64_SOURCE not\n- Add comment in zlib.h that adler32_combine with len2 < 0 makes no sense\n- Make NO_DIVIDE option in adler32.c much faster (thanks to John Reiser)\n- Make stronger test in zconf.h to include unistd.h for LFS\n- Apply Darwin patches for 64-bit file offsets to contrib/minizip [Slack]\n- Fix zlib.h LFS support when Z_PREFIX used\n- Add updated as400 support (removed from old) [Monnerat]\n- Avoid deflate sensitivity to volatile input data\n- Avoid division in adler32_combine for NO_DIVIDE\n- Clarify the use of Z_FINISH with deflateBound() amount of space\n- Set binary for output file in puff.c\n- Use u4 type for crc_table to avoid conversion warnings\n- Apply casts in zlib.h to avoid conversion warnings\n- Add OF to prototypes for adler32_combine_ and crc32_combine_ [Miller]\n- Improve inflateSync() documentation to note indeterminacy\n- Add deflatePending() function to return the amount of pending output\n- Correct the spelling of \"specification\" in FAQ [Randers-Pehrson]\n- Add a check in configure for stdarg.h, use for gzprintf()\n- Check that pointers fit in ints when gzprint() compiled old style\n- Add dummy name before $(SHAREDLIBV) in Makefile [Bar-Lev, Bowler]\n- Delete line in configure that adds -L. libz.a to LDFLAGS [Weigelt]\n- Add debug records in assembler code [Londer]\n- Update RFC references to use http://tools.ietf.org/html/... [Li]\n- Add --archs option, use of libtool to configure for Mac OS X [Borstel]\n\nChanges in 1.2.5 (19 Apr 2010)\n- Disable visibility attribute in win32/Makefile.gcc [Bar-Lev]\n- Default to libdir as sharedlibdir in configure [Nieder]\n- Update copyright dates on modified source files\n- Update trees.c to be able to generate modified trees.h\n- Exit configure for MinGW, suggesting win32/Makefile.gcc\n- Check for NULL path in gz_open [Homurlu]\n\nChanges in 1.2.4.5 (18 Apr 2010)\n- Set sharedlibdir in configure [Torok]\n- Set LDFLAGS in Makefile.in [Bar-Lev]\n- Avoid mkdir objs race condition in Makefile.in [Bowler]\n- Add ZLIB_INTERNAL in front of internal inter-module functions and arrays\n- Define ZLIB_INTERNAL to hide internal functions and arrays for GNU C\n- Don't use hidden attribute when it is a warning generator (e.g. Solaris)\n\nChanges in 1.2.4.4 (18 Apr 2010)\n- Fix CROSS_PREFIX executable testing, CHOST extract, mingw* [Torok]\n- Undefine _LARGEFILE64_SOURCE in zconf.h if it is zero, but not if empty\n- Try to use bash or ksh regardless of functionality of /bin/sh\n- Fix configure incompatibility with NetBSD sh\n- Remove attempt to run under bash or ksh since have better NetBSD fix\n- Fix win32/Makefile.gcc for MinGW [Bar-Lev]\n- Add diagnostic messages when using CROSS_PREFIX in configure\n- Added --sharedlibdir option to configure [Weigelt]\n- Use hidden visibility attribute when available [Frysinger]\n\nChanges in 1.2.4.3 (10 Apr 2010)\n- Only use CROSS_PREFIX in configure for ar and ranlib if they exist\n- Use CROSS_PREFIX for nm [Bar-Lev]\n- Assume _LARGEFILE64_SOURCE defined is equivalent to true\n- Avoid use of undefined symbols in #if with && and ||\n- Make *64 prototypes in gzguts.h consistent with functions\n- Add -shared load option for MinGW in configure [Bowler]\n- Move z_off64_t to public interface, use instead of off64_t\n- Remove ! from shell test in configure (not portable to Solaris)\n- Change +0 macro tests to -0 for possibly increased portability\n\nChanges in 1.2.4.2 (9 Apr 2010)\n- Add consistent carriage returns to readme.txt's in masmx86 and masmx64\n- Really provide prototypes for *64 functions when building without LFS\n- Only define unlink() in minigzip.c if unistd.h not included\n- Update README to point to contrib/vstudio project files\n- Move projects/vc6 to old/ and remove projects/\n- Include stdlib.h in minigzip.c for setmode() definition under WinCE\n- Clean up assembler builds in win32/Makefile.msc [Rowe]\n- Include sys/types.h for Microsoft for off_t definition\n- Fix memory leak on error in gz_open()\n- Symbolize nm as $NM in configure [Weigelt]\n- Use TEST_LDSHARED instead of LDSHARED to link test programs [Weigelt]\n- Add +0 to _FILE_OFFSET_BITS and _LFS64_LARGEFILE in case not defined\n- Fix bug in gzeof() to take into account unused input data\n- Avoid initialization of structures with variables in puff.c\n- Updated win32/README-WIN32.txt [Rowe]\n\nChanges in 1.2.4.1 (28 Mar 2010)\n- Remove the use of [a-z] constructs for sed in configure [gentoo 310225]\n- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech]\n- Restore \"for debugging\" comment on sprintf() in gzlib.c\n- Remove fdopen for MVS from gzguts.h\n- Put new README-WIN32.txt in win32 [Rowe]\n- Add check for shell to configure and invoke another shell if needed\n- Fix big fat stinking bug in gzseek() on uncompressed files\n- Remove vestigial F_OPEN64 define in zutil.h\n- Set and check the value of _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE\n- Avoid errors on non-LFS systems when applications define LFS macros\n- Set EXE to \".exe\" in configure for MINGW [Kahle]\n- Match crc32() in crc32.c exactly to the prototype in zlib.h [Sherrill]\n- Add prefix for cross-compilation in win32/makefile.gcc [Bar-Lev]\n- Add DLL install in win32/makefile.gcc [Bar-Lev]\n- Allow Linux* or linux* from uname in configure [Bar-Lev]\n- Allow ldconfig to be redefined in configure and Makefile.in [Bar-Lev]\n- Add cross-compilation prefixes to configure [Bar-Lev]\n- Match type exactly in gz_load() invocation in gzread.c\n- Match type exactly of zcalloc() in zutil.c to zlib.h alloc_func\n- Provide prototypes for *64 functions when building zlib without LFS\n- Don't use -lc when linking shared library on MinGW\n- Remove errno.h check in configure and vestigial errno code in zutil.h\n\nChanges in 1.2.4 (14 Mar 2010)\n- Fix VER3 extraction in configure for no fourth subversion\n- Update zlib.3, add docs to Makefile.in to make .pdf out of it\n- Add zlib.3.pdf to distribution\n- Don't set error code in gzerror() if passed pointer is NULL\n- Apply destination directory fixes to CMakeLists.txt [Lowman]\n- Move #cmakedefine's to a new zconf.in.cmakein\n- Restore zconf.h for builds that don't use configure or cmake\n- Add distclean to dummy Makefile for convenience\n- Update and improve INDEX, README, and FAQ\n- Update CMakeLists.txt for the return of zconf.h [Lowman]\n- Update contrib/vstudio/vc9 and vc10 [Vollant]\n- Change libz.dll.a back to libzdll.a in win32/Makefile.gcc\n- Apply license and readme changes to contrib/asm686 [Raiter]\n- Check file name lengths and add -c option in minigzip.c [Li]\n- Update contrib/amd64 and contrib/masmx86/ [Vollant]\n- Avoid use of \"eof\" parameter in trees.c to not shadow library variable\n- Update make_vms.com for removal of zlibdefs.h [Zinser]\n- Update assembler code and vstudio projects in contrib [Vollant]\n- Remove outdated assembler code contrib/masm686 and contrib/asm586\n- Remove old vc7 and vc8 from contrib/vstudio\n- Update win32/Makefile.msc, add ZLIB_VER_SUBREVISION [Rowe]\n- Fix memory leaks in gzclose_r() and gzclose_w(), file leak in gz_open()\n- Add contrib/gcc_gvmat64 for longest_match and inflate_fast [Vollant]\n- Remove *64 functions from win32/zlib.def (they're not 64-bit yet)\n- Fix bug in void-returning vsprintf() case in gzwrite.c\n- Fix name change from inflate.h in contrib/inflate86/inffas86.c\n- Check if temporary file exists before removing in make_vms.com [Zinser]\n- Fix make install and uninstall for --static option\n- Fix usage of _MSC_VER in gzguts.h and zutil.h [Truta]\n- Update readme.txt in contrib/masmx64 and masmx86 to assemble\n\nChanges in 1.2.3.9 (21 Feb 2010)\n- Expunge gzio.c\n- Move as400 build information to old\n- Fix updates in contrib/minizip and contrib/vstudio\n- Add const to vsnprintf test in configure to avoid warnings [Weigelt]\n- Delete zconf.h (made by configure) [Weigelt]\n- Change zconf.in.h to zconf.h.in per convention [Weigelt]\n- Check for NULL buf in gzgets()\n- Return empty string for gzgets() with len == 1 (like fgets())\n- Fix description of gzgets() in zlib.h for end-of-file, NULL return\n- Update minizip to 1.1 [Vollant]\n- Avoid MSVC loss of data warnings in gzread.c, gzwrite.c\n- Note in zlib.h that gzerror() should be used to distinguish from EOF\n- Remove use of snprintf() from gzlib.c\n- Fix bug in gzseek()\n- Update contrib/vstudio, adding vc9 and vc10 [Kuno, Vollant]\n- Fix zconf.h generation in CMakeLists.txt [Lowman]\n- Improve comments in zconf.h where modified by configure\n\nChanges in 1.2.3.8 (13 Feb 2010)\n- Clean up text files (tabs, trailing whitespace, etc.) [Oberhumer]\n- Use z_off64_t in gz_zero() and gz_skip() to match state->skip\n- Avoid comparison problem when sizeof(int) == sizeof(z_off64_t)\n- Revert to Makefile.in from 1.2.3.6 (live with the clutter)\n- Fix missing error return in gzflush(), add zlib.h note\n- Add *64 functions to zlib.map [Levin]\n- Fix signed/unsigned comparison in gz_comp()\n- Use SFLAGS when testing shared linking in configure\n- Add --64 option to ./configure to use -m64 with gcc\n- Fix ./configure --help to correctly name options\n- Have make fail if a test fails [Levin]\n- Avoid buffer overrun in contrib/masmx64/gvmat64.asm [Simpson]\n- Remove assembler object files from contrib\n\nChanges in 1.2.3.7 (24 Jan 2010)\n- Always gzopen() with O_LARGEFILE if available\n- Fix gzdirect() to work immediately after gzopen() or gzdopen()\n- Make gzdirect() more precise when the state changes while reading\n- Improve zlib.h documentation in many places\n- Catch memory allocation failure in gz_open()\n- Complete close operation if seek forward in gzclose_w() fails\n- Return Z_ERRNO from gzclose_r() if close() fails\n- Return Z_STREAM_ERROR instead of EOF for gzclose() being passed NULL\n- Return zero for gzwrite() errors to match zlib.h description\n- Return -1 on gzputs() error to match zlib.h description\n- Add zconf.in.h to allow recovery from configure modification [Weigelt]\n- Fix static library permissions in Makefile.in [Weigelt]\n- Avoid warnings in configure tests that hide functionality [Weigelt]\n- Add *BSD and DragonFly to Linux case in configure [gentoo 123571]\n- Change libzdll.a to libz.dll.a in win32/Makefile.gcc [gentoo 288212]\n- Avoid access of uninitialized data for first inflateReset2 call [Gomes]\n- Keep object files in subdirectories to reduce the clutter somewhat\n- Remove default Makefile and zlibdefs.h, add dummy Makefile\n- Add new external functions to Z_PREFIX, remove duplicates, z_z_ -> z_\n- Remove zlibdefs.h completely -- modify zconf.h instead\n\nChanges in 1.2.3.6 (17 Jan 2010)\n- Avoid void * arithmetic in gzread.c and gzwrite.c\n- Make compilers happier with const char * for gz_error message\n- Avoid unused parameter warning in inflate.c\n- Avoid signed-unsigned comparison warning in inflate.c\n- Indent #pragma's for traditional C\n- Fix usage of strwinerror() in glib.c, change to gz_strwinerror()\n- Correct email address in configure for system options\n- Update make_vms.com and add make_vms.com to contrib/minizip [Zinser]\n- Update zlib.map [Brown]\n- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [Torok]\n- Apply various fixes to CMakeLists.txt [Lowman]\n- Add checks on len in gzread() and gzwrite()\n- Add error message for no more room for gzungetc()\n- Remove zlib version check in gzwrite()\n- Defer compression of gzprintf() result until need to\n- Use snprintf() in gzdopen() if available\n- Remove USE_MMAP configuration determination (only used by minigzip)\n- Remove examples/pigz.c (available separately)\n- Update examples/gun.c to 1.6\n\nChanges in 1.2.3.5 (8 Jan 2010)\n- Add space after #if in zutil.h for some compilers\n- Fix relatively harmless bug in deflate_fast() [Exarevsky]\n- Fix same problem in deflate_slow()\n- Add $(SHAREDLIBV) to LIBS in Makefile.in [Brown]\n- Add deflate_rle() for faster Z_RLE strategy run-length encoding\n- Add deflate_huff() for faster Z_HUFFMAN_ONLY encoding\n- Change name of \"write\" variable in inffast.c to avoid library collisions\n- Fix premature EOF from gzread() in gzio.c [Brown]\n- Use zlib header window size if windowBits is 0 in inflateInit2()\n- Remove compressBound() call in deflate.c to avoid linking compress.o\n- Replace use of errno in gz* with functions, support WinCE [Alves]\n- Provide alternative to perror() in minigzip.c for WinCE [Alves]\n- Don't use _vsnprintf on later versions of MSVC [Lowman]\n- Add CMake build script and input file [Lowman]\n- Update contrib/minizip to 1.1 [Svensson, Vollant]\n- Moved nintendods directory from contrib to root\n- Replace gzio.c with a new set of routines with the same functionality\n- Add gzbuffer(), gzoffset(), gzclose_r(), gzclose_w() as part of above\n- Update contrib/minizip to 1.1b\n- Change gzeof() to return 0 on error instead of -1 to agree with zlib.h\n\nChanges in 1.2.3.4 (21 Dec 2009)\n- Use old school .SUFFIXES in Makefile.in for FreeBSD compatibility\n- Update comments in configure and Makefile.in for default --shared\n- Fix test -z's in configure [Marquess]\n- Build examplesh and minigzipsh when not testing\n- Change NULL's to Z_NULL's in deflate.c and in comments in zlib.h\n- Import LDFLAGS from the environment in configure\n- Fix configure to populate SFLAGS with discovered CFLAGS options\n- Adapt make_vms.com to the new Makefile.in [Zinser]\n- Add zlib2ansi script for C++ compilation [Marquess]\n- Add _FILE_OFFSET_BITS=64 test to make test (when applicable)\n- Add AMD64 assembler code for longest match to contrib [Teterin]\n- Include options from $SFLAGS when doing $LDSHARED\n- Simplify 64-bit file support by introducing z_off64_t type\n- Make shared object files in objs directory to work around old Sun cc\n- Use only three-part version number for Darwin shared compiles\n- Add rc option to ar in Makefile.in for when ./configure not run\n- Add -WI,-rpath,. to LDFLAGS for OSF 1 V4*\n- Set LD_LIBRARYN32_PATH for SGI IRIX shared compile\n- Protect against _FILE_OFFSET_BITS being defined when compiling zlib\n- Rename Makefile.in targets allstatic to static and allshared to shared\n- Fix static and shared Makefile.in targets to be independent\n- Correct error return bug in gz_open() by setting state [Brown]\n- Put spaces before ;;'s in configure for better sh compatibility\n- Add pigz.c (parallel implementation of gzip) to examples/\n- Correct constant in crc32.c to UL [Leventhal]\n- Reject negative lengths in crc32_combine()\n- Add inflateReset2() function to work like inflateEnd()/inflateInit2()\n- Include sys/types.h for _LARGEFILE64_SOURCE [Brown]\n- Correct typo in doc/algorithm.txt [Janik]\n- Fix bug in adler32_combine() [Zhu]\n- Catch missing-end-of-block-code error in all inflates and in puff\n    Assures that random input to inflate eventually results in an error\n- Added enough.c (calculation of ENOUGH for inftrees.h) to examples/\n- Update ENOUGH and its usage to reflect discovered bounds\n- Fix gzerror() error report on empty input file [Brown]\n- Add ush casts in trees.c to avoid pedantic runtime errors\n- Fix typo in zlib.h uncompress() description [Reiss]\n- Correct inflate() comments with regard to automatic header detection\n- Remove deprecation comment on Z_PARTIAL_FLUSH (it stays)\n- Put new version of gzlog (2.0) in examples with interruption recovery\n- Add puff compile option to permit invalid distance-too-far streams\n- Add puff TEST command options, ability to read piped input\n- Prototype the *64 functions in zlib.h when _FILE_OFFSET_BITS == 64, but\n  _LARGEFILE64_SOURCE not defined\n- Fix Z_FULL_FLUSH to truly erase the past by resetting s->strstart\n- Fix deflateSetDictionary() to use all 32K for output consistency\n- Remove extraneous #define MIN_LOOKAHEAD in deflate.c (in deflate.h)\n- Clear bytes after deflate lookahead to avoid use of uninitialized data\n- Change a limit in inftrees.c to be more transparent to Coverity Prevent\n- Update win32/zlib.def with exported symbols from zlib.h\n- Correct spelling errors in zlib.h [Willem, Sobrado]\n- Allow Z_BLOCK for deflate() to force a new block\n- Allow negative bits in inflatePrime() to delete existing bit buffer\n- Add Z_TREES flush option to inflate() to return at end of trees\n- Add inflateMark() to return current state information for random access\n- Add Makefile for NintendoDS to contrib [Costa]\n- Add -w in configure compile tests to avoid spurious warnings [Beucler]\n- Fix typos in zlib.h comments for deflateSetDictionary()\n- Fix EOF detection in transparent gzread() [Maier]\n\nChanges in 1.2.3.3 (2 October 2006)\n- Make --shared the default for configure, add a --static option\n- Add compile option to permit invalid distance-too-far streams\n- Add inflateUndermine() function which is required to enable above\n- Remove use of \"this\" variable name for C++ compatibility [Marquess]\n- Add testing of shared library in make test, if shared library built\n- Use ftello() and fseeko() if available instead of ftell() and fseek()\n- Provide two versions of all functions that use the z_off_t type for\n  binary compatibility -- a normal version and a 64-bit offset version,\n  per the Large File Support Extension when _LARGEFILE64_SOURCE is\n  defined; use the 64-bit versions by default when _FILE_OFFSET_BITS\n  is defined to be 64\n- Add a --uname= option to configure to perhaps help with cross-compiling\n\nChanges in 1.2.3.2 (3 September 2006)\n- Turn off silly Borland warnings [Hay]\n- Use off64_t and define _LARGEFILE64_SOURCE when present\n- Fix missing dependency on inffixed.h in Makefile.in\n- Rig configure --shared to build both shared and static [Teredesai, Truta]\n- Remove zconf.in.h and instead create a new zlibdefs.h file\n- Fix contrib/minizip/unzip.c non-encrypted after encrypted [Vollant]\n- Add treebuild.xml (see http://treebuild.metux.de/) [Weigelt]\n\nChanges in 1.2.3.1 (16 August 2006)\n- Add watcom directory with OpenWatcom make files [Daniel]\n- Remove #undef of FAR in zconf.in.h for MVS [Fedtke]\n- Update make_vms.com [Zinser]\n- Use -fPIC for shared build in configure [Teredesai, Nicholson]\n- Use only major version number for libz.so on IRIX and OSF1 [Reinholdtsen]\n- Use fdopen() (not _fdopen()) for Interix in zutil.h [Bäck]\n- Add some FAQ entries about the contrib directory\n- Update the MVS question in the FAQ\n- Avoid extraneous reads after EOF in gzio.c [Brown]\n- Correct spelling of \"successfully\" in gzio.c [Randers-Pehrson]\n- Add comments to zlib.h about gzerror() usage [Brown]\n- Set extra flags in gzip header in gzopen() like deflate() does\n- Make configure options more compatible with double-dash conventions\n  [Weigelt]\n- Clean up compilation under Solaris SunStudio cc [Rowe, Reinholdtsen]\n- Fix uninstall target in Makefile.in [Truta]\n- Add pkgconfig support [Weigelt]\n- Use $(DESTDIR) macro in Makefile.in [Reinholdtsen, Weigelt]\n- Replace set_data_type() with a more accurate detect_data_type() in\n  trees.c, according to the txtvsbin.txt document [Truta]\n- Swap the order of #include <stdio.h> and #include \"zlib.h\" in\n  gzio.c, example.c and minigzip.c [Truta]\n- Shut up annoying VS2005 warnings about standard C deprecation [Rowe,\n  Truta] (where?)\n- Fix target \"clean\" from win32/Makefile.bor [Truta]\n- Create .pdb and .manifest files in win32/makefile.msc [Ziegler, Rowe]\n- Update zlib www home address in win32/DLL_FAQ.txt [Truta]\n- Update contrib/masmx86/inffas32.asm for VS2005 [Vollant, Van Wassenhove]\n- Enable browse info in the \"Debug\" and \"ASM Debug\" configurations in\n  the Visual C++ 6 project, and set (non-ASM) \"Debug\" as default [Truta]\n- Add pkgconfig support [Weigelt]\n- Add ZLIB_VER_MAJOR, ZLIB_VER_MINOR and ZLIB_VER_REVISION in zlib.h,\n  for use in win32/zlib1.rc [Polushin, Rowe, Truta]\n- Add a document that explains the new text detection scheme to\n  doc/txtvsbin.txt [Truta]\n- Add rfc1950.txt, rfc1951.txt and rfc1952.txt to doc/ [Truta]\n- Move algorithm.txt into doc/ [Truta]\n- Synchronize FAQ with website\n- Fix compressBound(), was low for some pathological cases [Fearnley]\n- Take into account wrapper variations in deflateBound()\n- Set examples/zpipe.c input and output to binary mode for Windows\n- Update examples/zlib_how.html with new zpipe.c (also web site)\n- Fix some warnings in examples/gzlog.c and examples/zran.c (it seems\n  that gcc became pickier in 4.0)\n- Add zlib.map for Linux: \"All symbols from zlib-1.1.4 remain\n  un-versioned, the patch adds versioning only for symbols introduced in\n  zlib-1.2.0 or later.  It also declares as local those symbols which are\n  not designed to be exported.\" [Levin]\n- Update Z_PREFIX list in zconf.in.h, add --zprefix option to configure\n- Do not initialize global static by default in trees.c, add a response\n  NO_INIT_GLOBAL_POINTERS to initialize them if needed [Marquess]\n- Don't use strerror() in gzio.c under WinCE [Yakimov]\n- Don't use errno.h in zutil.h under WinCE [Yakimov]\n- Move arguments for AR to its usage to allow replacing ar [Marot]\n- Add HAVE_VISIBILITY_PRAGMA in zconf.in.h for Mozilla [Randers-Pehrson]\n- Improve inflateInit() and inflateInit2() documentation\n- Fix structure size comment in inflate.h\n- Change configure help option from --h* to --help [Santos]\n\nChanges in 1.2.3 (18 July 2005)\n- Apply security vulnerability fixes to contrib/infback9 as well\n- Clean up some text files (carriage returns, trailing space)\n- Update testzlib, vstudio, masmx64, and masmx86 in contrib [Vollant]\n\nChanges in 1.2.2.4 (11 July 2005)\n- Add inflatePrime() function for starting inflation at bit boundary\n- Avoid some Visual C warnings in deflate.c\n- Avoid more silly Visual C warnings in inflate.c and inftrees.c for 64-bit\n  compile\n- Fix some spelling errors in comments [Betts]\n- Correct inflateInit2() error return documentation in zlib.h\n- Add zran.c example of compressed data random access to examples\n  directory, shows use of inflatePrime()\n- Fix cast for assignments to strm->state in inflate.c and infback.c\n- Fix zlibCompileFlags() in zutil.c to use 1L for long shifts [Oberhumer]\n- Move declarations of gf2 functions to right place in crc32.c [Oberhumer]\n- Add cast in trees.c t avoid a warning [Oberhumer]\n- Avoid some warnings in fitblk.c, gun.c, gzjoin.c in examples [Oberhumer]\n- Update make_vms.com [Zinser]\n- Initialize state->write in inflateReset() since copied in inflate_fast()\n- Be more strict on incomplete code sets in inflate_table() and increase\n  ENOUGH and MAXD -- this repairs a possible security vulnerability for\n  invalid inflate input.  Thanks to Tavis Ormandy and Markus Oberhumer for\n  discovering the vulnerability and providing test cases\n- Add ia64 support to configure for HP-UX [Smith]\n- Add error return to gzread() for format or i/o error [Levin]\n- Use malloc.h for OS/2 [Necasek]\n\nChanges in 1.2.2.3 (27 May 2005)\n- Replace 1U constants in inflate.c and inftrees.c for 64-bit compile\n- Typecast fread() return values in gzio.c [Vollant]\n- Remove trailing space in minigzip.c outmode (VC++ can't deal with it)\n- Fix crc check bug in gzread() after gzungetc() [Heiner]\n- Add the deflateTune() function to adjust internal compression parameters\n- Add a fast gzip decompressor, gun.c, to examples (use of inflateBack)\n- Remove an incorrect assertion in examples/zpipe.c\n- Add C++ wrapper in infback9.h [Donais]\n- Fix bug in inflateCopy() when decoding fixed codes\n- Note in zlib.h how much deflateSetDictionary() actually uses\n- Remove USE_DICT_HEAD in deflate.c (would mess up inflate if used)\n- Add _WIN32_WCE to define WIN32 in zconf.in.h [Spencer]\n- Don't include stderr.h or errno.h for _WIN32_WCE in zutil.h [Spencer]\n- Add gzdirect() function to indicate transparent reads\n- Update contrib/minizip [Vollant]\n- Fix compilation of deflate.c when both ASMV and FASTEST [Oberhumer]\n- Add casts in crc32.c to avoid warnings [Oberhumer]\n- Add contrib/masmx64 [Vollant]\n- Update contrib/asm586, asm686, masmx86, testzlib, vstudio [Vollant]\n\nChanges in 1.2.2.2 (30 December 2004)\n- Replace structure assignments in deflate.c and inflate.c with zmemcpy to\n  avoid implicit memcpy calls (portability for no-library compilation)\n- Increase sprintf() buffer size in gzdopen() to allow for large numbers\n- Add INFLATE_STRICT to check distances against zlib header\n- Improve WinCE errno handling and comments [Chang]\n- Remove comment about no gzip header processing in FAQ\n- Add Z_FIXED strategy option to deflateInit2() to force fixed trees\n- Add updated make_vms.com [Coghlan], update README\n- Create a new \"examples\" directory, move gzappend.c there, add zpipe.c,\n  fitblk.c, gzlog.[ch], gzjoin.c, and zlib_how.html\n- Add FAQ entry and comments in deflate.c on uninitialized memory access\n- Add Solaris 9 make options in configure [Gilbert]\n- Allow strerror() usage in gzio.c for STDC\n- Fix DecompressBuf in contrib/delphi/ZLib.pas [ManChesTer]\n- Update contrib/masmx86/inffas32.asm and gvmat32.asm [Vollant]\n- Use z_off_t for adler32_combine() and crc32_combine() lengths\n- Make adler32() much faster for small len\n- Use OS_CODE in deflate() default gzip header\n\nChanges in 1.2.2.1 (31 October 2004)\n- Allow inflateSetDictionary() call for raw inflate\n- Fix inflate header crc check bug for file names and comments\n- Add deflateSetHeader() and gz_header structure for custom gzip headers\n- Add inflateGetheader() to retrieve gzip headers\n- Add crc32_combine() and adler32_combine() functions\n- Add alloc_func, free_func, in_func, out_func to Z_PREFIX list\n- Use zstreamp consistently in zlib.h (inflate_back functions)\n- Remove GUNZIP condition from definition of inflate_mode in inflate.h\n  and in contrib/inflate86/inffast.S [Truta, Anderson]\n- Add support for AMD64 in contrib/inflate86/inffas86.c [Anderson]\n- Update projects/README.projects and projects/visualc6 [Truta]\n- Update win32/DLL_FAQ.txt [Truta]\n- Avoid warning under NO_GZCOMPRESS in gzio.c; fix typo [Truta]\n- Deprecate Z_ASCII; use Z_TEXT instead [Truta]\n- Use a new algorithm for setting strm->data_type in trees.c [Truta]\n- Do not define an exit() prototype in zutil.c unless DEBUG defined\n- Remove prototype of exit() from zutil.c, example.c, minigzip.c [Truta]\n- Add comment in zlib.h for Z_NO_FLUSH parameter to deflate()\n- Fix Darwin build version identification [Peterson]\n\nChanges in 1.2.2 (3 October 2004)\n- Update zlib.h comments on gzip in-memory processing\n- Set adler to 1 in inflateReset() to support Java test suite [Walles]\n- Add contrib/dotzlib [Ravn]\n- Update win32/DLL_FAQ.txt [Truta]\n- Update contrib/minizip [Vollant]\n- Move contrib/visual-basic.txt to old/ [Truta]\n- Fix assembler builds in projects/visualc6/ [Truta]\n\nChanges in 1.2.1.2 (9 September 2004)\n- Update INDEX file\n- Fix trees.c to update strm->data_type (no one ever noticed!)\n- Fix bug in error case in inflate.c, infback.c, and infback9.c [Brown]\n- Add \"volatile\" to crc table flag declaration (for DYNAMIC_CRC_TABLE)\n- Add limited multitasking protection to DYNAMIC_CRC_TABLE\n- Add NO_vsnprintf for VMS in zutil.h [Mozilla]\n- Don't declare strerror() under VMS [Mozilla]\n- Add comment to DYNAMIC_CRC_TABLE to use get_crc_table() to initialize\n- Update contrib/ada [Anisimkov]\n- Update contrib/minizip [Vollant]\n- Fix configure to not hardcode directories for Darwin [Peterson]\n- Fix gzio.c to not return error on empty files [Brown]\n- Fix indentation; update version in contrib/delphi/ZLib.pas and\n  contrib/pascal/zlibpas.pas [Truta]\n- Update mkasm.bat in contrib/masmx86 [Truta]\n- Update contrib/untgz [Truta]\n- Add projects/README.projects [Truta]\n- Add project for MS Visual C++ 6.0 in projects/visualc6 [Cadieux, Truta]\n- Update win32/DLL_FAQ.txt [Truta]\n- Update list of Z_PREFIX symbols in zconf.h [Randers-Pehrson, Truta]\n- Remove an unnecessary assignment to curr in inftrees.c [Truta]\n- Add OS/2 to exe builds in configure [Poltorak]\n- Remove err dummy parameter in zlib.h [Kientzle]\n\nChanges in 1.2.1.1 (9 January 2004)\n- Update email address in README\n- Several FAQ updates\n- Fix a big fat bug in inftrees.c that prevented decoding valid\n  dynamic blocks with only literals and no distance codes --\n  Thanks to \"Hot Emu\" for the bug report and sample file\n- Add a note to puff.c on no distance codes case\n\nChanges in 1.2.1 (17 November 2003)\n- Remove a tab in contrib/gzappend/gzappend.c\n- Update some interfaces in contrib for new zlib functions\n- Update zlib version number in some contrib entries\n- Add Windows CE definition for ptrdiff_t in zutil.h [Mai, Truta]\n- Support shared libraries on Hurd and KFreeBSD [Brown]\n- Fix error in NO_DIVIDE option of adler32.c\n\nChanges in 1.2.0.8 (4 November 2003)\n- Update version in contrib/delphi/ZLib.pas and contrib/pascal/zlibpas.pas\n- Add experimental NO_DIVIDE #define in adler32.c\n    - Possibly faster on some processors (let me know if it is)\n- Correct Z_BLOCK to not return on first inflate call if no wrap\n- Fix strm->data_type on inflate() return to correctly indicate EOB\n- Add deflatePrime() function for appending in the middle of a byte\n- Add contrib/gzappend for an example of appending to a stream\n- Update win32/DLL_FAQ.txt [Truta]\n- Delete Turbo C comment in README [Truta]\n- Improve some indentation in zconf.h [Truta]\n- Fix infinite loop on bad input in configure script [Church]\n- Fix gzeof() for concatenated gzip files [Johnson]\n- Add example to contrib/visual-basic.txt [Michael B.]\n- Add -p to mkdir's in Makefile.in [vda]\n- Fix configure to properly detect presence or lack of printf functions\n- Add AS400 support [Monnerat]\n- Add a little Cygwin support [Wilson]\n\nChanges in 1.2.0.7 (21 September 2003)\n- Correct some debug formats in contrib/infback9\n- Cast a type in a debug statement in trees.c\n- Change search and replace delimiter in configure from % to # [Beebe]\n- Update contrib/untgz to 0.2 with various fixes [Truta]\n- Add build support for Amiga [Nikl]\n- Remove some directories in old that have been updated to 1.2\n- Add dylib building for Mac OS X in configure and Makefile.in\n- Remove old distribution stuff from Makefile\n- Update README to point to DLL_FAQ.txt, and add comment on Mac OS X\n- Update links in README\n\nChanges in 1.2.0.6 (13 September 2003)\n- Minor FAQ updates\n- Update contrib/minizip to 1.00 [Vollant]\n- Remove test of gz functions in example.c when GZ_COMPRESS defined [Truta]\n- Update POSTINC comment for 68060 [Nikl]\n- Add contrib/infback9 with deflate64 decoding (unsupported)\n- For MVS define NO_vsnprintf and undefine FAR [van Burik]\n- Add pragma for fdopen on MVS [van Burik]\n\nChanges in 1.2.0.5 (8 September 2003)\n- Add OF to inflateBackEnd() declaration in zlib.h\n- Remember start when using gzdopen in the middle of a file\n- Use internal off_t counters in gz* functions to properly handle seeks\n- Perform more rigorous check for distance-too-far in inffast.c\n- Add Z_BLOCK flush option to return from inflate at block boundary\n- Set strm->data_type on return from inflate\n    - Indicate bits unused, if at block boundary, and if in last block\n- Replace size_t with ptrdiff_t in crc32.c, and check for correct size\n- Add condition so old NO_DEFLATE define still works for compatibility\n- FAQ update regarding the Windows DLL [Truta]\n- INDEX update: add qnx entry, remove aix entry [Truta]\n- Install zlib.3 into mandir [Wilson]\n- Move contrib/zlib_dll_FAQ.txt to win32/DLL_FAQ.txt; update [Truta]\n- Adapt the zlib interface to the new DLL convention guidelines [Truta]\n- Introduce ZLIB_WINAPI macro to allow the export of functions using\n  the WINAPI calling convention, for Visual Basic [Vollant, Truta]\n- Update msdos and win32 scripts and makefiles [Truta]\n- Export symbols by name, not by ordinal, in win32/zlib.def [Truta]\n- Add contrib/ada [Anisimkov]\n- Move asm files from contrib/vstudio/vc70_32 to contrib/asm386 [Truta]\n- Rename contrib/asm386 to contrib/masmx86 [Truta, Vollant]\n- Add contrib/masm686 [Truta]\n- Fix offsets in contrib/inflate86 and contrib/masmx86/inffas32.asm\n  [Truta, Vollant]\n- Update contrib/delphi; rename to contrib/pascal; add example [Truta]\n- Remove contrib/delphi2; add a new contrib/delphi [Truta]\n- Avoid inclusion of the nonstandard <memory.h> in contrib/iostream,\n  and fix some method prototypes [Truta]\n- Fix the ZCR_SEED2 constant to avoid warnings in contrib/minizip\n  [Truta]\n- Avoid the use of backslash (\\) in contrib/minizip [Vollant]\n- Fix file time handling in contrib/untgz; update makefiles [Truta]\n- Update contrib/vstudio/vc70_32 to comply with the new DLL guidelines\n  [Vollant]\n- Remove contrib/vstudio/vc15_16 [Vollant]\n- Rename contrib/vstudio/vc70_32 to contrib/vstudio/vc7 [Truta]\n- Update README.contrib [Truta]\n- Invert the assignment order of match_head and s->prev[...] in\n  INSERT_STRING [Truta]\n- Compare TOO_FAR with 32767 instead of 32768, to avoid 16-bit warnings\n  [Truta]\n- Compare function pointers with 0, not with NULL or Z_NULL [Truta]\n- Fix prototype of syncsearch in inflate.c [Truta]\n- Introduce ASMINF macro to be enabled when using an ASM implementation\n  of inflate_fast [Truta]\n- Change NO_DEFLATE to NO_GZCOMPRESS [Truta]\n- Modify test_gzio in example.c to take a single file name as a\n  parameter [Truta]\n- Exit the example.c program if gzopen fails [Truta]\n- Add type casts around strlen in example.c [Truta]\n- Remove casting to sizeof in minigzip.c; give a proper type\n  to the variable compared with SUFFIX_LEN [Truta]\n- Update definitions of STDC and STDC99 in zconf.h [Truta]\n- Synchronize zconf.h with the new Windows DLL interface [Truta]\n- Use SYS16BIT instead of __32BIT__ to distinguish between\n  16- and 32-bit platforms [Truta]\n- Use far memory allocators in small 16-bit memory models for\n  Turbo C [Truta]\n- Add info about the use of ASMV, ASMINF and ZLIB_WINAPI in\n  zlibCompileFlags [Truta]\n- Cygwin has vsnprintf [Wilson]\n- In Windows16, OS_CODE is 0, as in MSDOS [Truta]\n- In Cygwin, OS_CODE is 3 (Unix), not 11 (Windows32) [Wilson]\n\nChanges in 1.2.0.4 (10 August 2003)\n- Minor FAQ updates\n- Be more strict when checking inflateInit2's windowBits parameter\n- Change NO_GUNZIP compile option to NO_GZIP to cover deflate as well\n- Add gzip wrapper option to deflateInit2 using windowBits\n- Add updated QNX rule in configure and qnx directory [Bonnefoy]\n- Make inflate distance-too-far checks more rigorous\n- Clean up FAR usage in inflate\n- Add casting to sizeof() in gzio.c and minigzip.c\n\nChanges in 1.2.0.3 (19 July 2003)\n- Fix silly error in gzungetc() implementation [Vollant]\n- Update contrib/minizip and contrib/vstudio [Vollant]\n- Fix printf format in example.c\n- Correct cdecl support in zconf.in.h [Anisimkov]\n- Minor FAQ updates\n\nChanges in 1.2.0.2 (13 July 2003)\n- Add ZLIB_VERNUM in zlib.h for numerical preprocessor comparisons\n- Attempt to avoid warnings in crc32.c for pointer-int conversion\n- Add AIX to configure, remove aix directory [Bakker]\n- Add some casts to minigzip.c\n- Improve checking after insecure sprintf() or vsprintf() calls\n- Remove #elif's from crc32.c\n- Change leave label to inf_leave in inflate.c and infback.c to avoid\n  library conflicts\n- Remove inflate gzip decoding by default--only enable gzip decoding by\n  special request for stricter backward compatibility\n- Add zlibCompileFlags() function to return compilation information\n- More typecasting in deflate.c to avoid warnings\n- Remove leading underscore from _Capital #defines [Truta]\n- Fix configure to link shared library when testing\n- Add some Windows CE target adjustments [Mai]\n- Remove #define ZLIB_DLL in zconf.h [Vollant]\n- Add zlib.3 [Rodgers]\n- Update RFC URL in deflate.c and algorithm.txt [Mai]\n- Add zlib_dll_FAQ.txt to contrib [Truta]\n- Add UL to some constants [Truta]\n- Update minizip and vstudio [Vollant]\n- Remove vestigial NEED_DUMMY_RETURN from zconf.in.h\n- Expand use of NO_DUMMY_DECL to avoid all dummy structures\n- Added iostream3 to contrib [Schwardt]\n- Replace rewind() with fseek() for WinCE [Truta]\n- Improve setting of zlib format compression level flags\n    - Report 0 for huffman and rle strategies and for level == 0 or 1\n    - Report 2 only for level == 6\n- Only deal with 64K limit when necessary at compile time [Truta]\n- Allow TOO_FAR check to be turned off at compile time [Truta]\n- Add gzclearerr() function [Souza]\n- Add gzungetc() function\n\nChanges in 1.2.0.1 (17 March 2003)\n- Add Z_RLE strategy for run-length encoding [Truta]\n    - When Z_RLE requested, restrict matches to distance one\n    - Update zlib.h, minigzip.c, gzopen(), gzdopen() for Z_RLE\n- Correct FASTEST compilation to allow level == 0\n- Clean up what gets compiled for FASTEST\n- Incorporate changes to zconf.in.h [Vollant]\n    - Refine detection of Turbo C need for dummy returns\n    - Refine ZLIB_DLL compilation\n    - Include additional header file on VMS for off_t typedef\n- Try to use _vsnprintf where it supplants vsprintf [Vollant]\n- Add some casts in inffast.c\n- Enhance comments in zlib.h on what happens if gzprintf() tries to\n  write more than 4095 bytes before compression\n- Remove unused state from inflateBackEnd()\n- Remove exit(0) from minigzip.c, example.c\n- Get rid of all those darn tabs\n- Add \"check\" target to Makefile.in that does the same thing as \"test\"\n- Add \"mostlyclean\" and \"maintainer-clean\" targets to Makefile.in\n- Update contrib/inflate86 [Anderson]\n- Update contrib/testzlib, contrib/vstudio, contrib/minizip [Vollant]\n- Add msdos and win32 directories with makefiles [Truta]\n- More additions and improvements to the FAQ\n\nChanges in 1.2.0 (9 March 2003)\n- New and improved inflate code\n    - About 20% faster\n    - Does not allocate 32K window unless and until needed\n    - Automatically detects and decompresses gzip streams\n    - Raw inflate no longer needs an extra dummy byte at end\n    - Added inflateBack functions using a callback interface--even faster\n      than inflate, useful for file utilities (gzip, zip)\n    - Added inflateCopy() function to record state for random access on\n      externally generated deflate streams (e.g. in gzip files)\n    - More readable code (I hope)\n- New and improved crc32()\n    - About 50% faster, thanks to suggestions from Rodney Brown\n- Add deflateBound() and compressBound() functions\n- Fix memory leak in deflateInit2()\n- Permit setting dictionary for raw deflate (for parallel deflate)\n- Fix const declaration for gzwrite()\n- Check for some malloc() failures in gzio.c\n- Fix bug in gzopen() on single-byte file 0x1f\n- Fix bug in gzread() on concatenated file with 0x1f at end of buffer\n  and next buffer doesn't start with 0x8b\n- Fix uncompress() to return Z_DATA_ERROR on truncated input\n- Free memory at end of example.c\n- Remove MAX #define in trees.c (conflicted with some libraries)\n- Fix static const's in deflate.c, gzio.c, and zutil.[ch]\n- Declare malloc() and free() in gzio.c if STDC not defined\n- Use malloc() instead of calloc() in zutil.c if int big enough\n- Define STDC for AIX\n- Add aix/ with approach for compiling shared library on AIX\n- Add HP-UX support for shared libraries in configure\n- Add OpenUNIX support for shared libraries in configure\n- Use $cc instead of gcc to build shared library\n- Make prefix directory if needed when installing\n- Correct Macintosh avoidance of typedef Byte in zconf.h\n- Correct Turbo C memory allocation when under Linux\n- Use libz.a instead of -lz in Makefile (assure use of compiled library)\n- Update configure to check for snprintf or vsnprintf functions and their\n  return value, warn during make if using an insecure function\n- Fix configure problem with compile-time knowledge of HAVE_UNISTD_H that\n  is lost when library is used--resolution is to build new zconf.h\n- Documentation improvements (in zlib.h):\n    - Document raw deflate and inflate\n    - Update RFCs URL\n    - Point out that zlib and gzip formats are different\n    - Note that Z_BUF_ERROR is not fatal\n    - Document string limit for gzprintf() and possible buffer overflow\n    - Note requirement on avail_out when flushing\n    - Note permitted values of flush parameter of inflate()\n- Add some FAQs (and even answers) to the FAQ\n- Add contrib/inflate86/ for x86 faster inflate\n- Add contrib/blast/ for PKWare Data Compression Library decompression\n- Add contrib/puff/ simple inflate for deflate format description\n\nChanges in 1.1.4 (11 March 2002)\n- ZFREE was repeated on same allocation on some error conditions\n  This creates a security problem described in\n  http://www.zlib.org/advisory-2002-03-11.txt\n- Returned incorrect error (Z_MEM_ERROR) on some invalid data\n- Avoid accesses before window for invalid distances with inflate window\n  less than 32K\n- force windowBits > 8 to avoid a bug in the encoder for a window size\n  of 256 bytes. (A complete fix will be available in 1.1.5)\n\nChanges in 1.1.3 (9 July 1998)\n- fix \"an inflate input buffer bug that shows up on rare but persistent\n  occasions\" (Mark)\n- fix gzread and gztell for concatenated .gz files (Didier Le Botlan)\n- fix gzseek(..., SEEK_SET) in write mode\n- fix crc check after a gzeek (Frank Faubert)\n- fix miniunzip when the last entry in a zip file is itself a zip file\n  (J Lillge)\n- add contrib/asm586 and contrib/asm686 (Brian Raiter)\n  See http://www.muppetlabs.com/~breadbox/software/assembly.html\n- add support for Delphi 3 in contrib/delphi (Bob Dellaca)\n- add support for C++Builder 3 and Delphi 3 in contrib/delphi2 (Davide Moretti)\n- do not exit prematurely in untgz if 0 at start of block (Magnus Holmgren)\n- use macro EXTERN instead of extern to support DLL for BeOS (Sander Stoks)\n- added a FAQ file\n\n- Support gzdopen on Mac with Metrowerks (Jason Linhart)\n- Do not redefine Byte on Mac (Brad Pettit & Jason Linhart)\n- define SEEK_END too if SEEK_SET is not defined (Albert Chin-A-Young)\n- avoid some warnings with Borland C (Tom Tanner)\n- fix a problem in contrib/minizip/zip.c for 16-bit MSDOS (Gilles Vollant)\n- emulate utime() for WIN32 in contrib/untgz  (Gilles Vollant)\n- allow several arguments to configure (Tim Mooney, Frodo Looijaard)\n- use libdir and includedir in Makefile.in (Tim Mooney)\n- support shared libraries on OSF1 V4 (Tim Mooney)\n- remove so_locations in \"make clean\"  (Tim Mooney)\n- fix maketree.c compilation error (Glenn, Mark)\n- Python interface to zlib now in Python 1.5 (Jeremy Hylton)\n- new Makefile.riscos (Rich Walker)\n- initialize static descriptors in trees.c for embedded targets (Nick Smith)\n- use \"foo-gz\" in example.c for RISCOS and VMS (Nick Smith)\n- add the OS/2 files in Makefile.in too (Andrew Zabolotny)\n- fix fdopen and halloc macros for Microsoft C 6.0 (Tom Lane)\n- fix maketree.c to allow clean compilation of inffixed.h (Mark)\n- fix parameter check in deflateCopy (Gunther Nikl)\n- cleanup trees.c, use compressed_len only in debug mode (Christian Spieler)\n- Many portability patches by Christian Spieler:\n  . zutil.c, zutil.h: added \"const\" for zmem*\n  . Make_vms.com: fixed some typos\n  . Make_vms.com: msdos/Makefile.*: removed zutil.h from some dependency lists\n  . msdos/Makefile.msc: remove \"default rtl link library\" info from obj files\n  . msdos/Makefile.*: use model-dependent name for the built zlib library\n  . msdos/Makefile.emx, nt/Makefile.emx, nt/Makefile.gcc:\n     new makefiles, for emx (DOS/OS2), emx&rsxnt and mingw32 (Windows 9x / NT)\n- use define instead of typedef for Bytef also for MSC small/medium (Tom Lane)\n- replace __far with _far for better portability (Christian Spieler, Tom Lane)\n- fix test for errno.h in configure (Tim Newsham)\n\nChanges in 1.1.2 (19 March 98)\n- added contrib/minzip, mini zip and unzip based on zlib (Gilles Vollant)\n  See http://www.winimage.com/zLibDll/unzip.html\n- preinitialize the inflate tables for fixed codes, to make the code\n  completely thread safe (Mark)\n- some simplifications and slight speed-up to the inflate code (Mark)\n- fix gzeof on non-compressed files (Allan Schrum)\n- add -std1 option in configure for OSF1 to fix gzprintf (Martin Mokrejs)\n- use default value of 4K for Z_BUFSIZE for 16-bit MSDOS (Tim Wegner + Glenn)\n- added os2/Makefile.def and os2/zlib.def (Andrew Zabolotny)\n- add shared lib support for UNIX_SV4.2MP (MATSUURA Takanori)\n- do not wrap extern \"C\" around system includes (Tom Lane)\n- mention zlib binding for TCL in README (Andreas Kupries)\n- added amiga/Makefile.pup for Amiga powerUP SAS/C PPC (Andreas Kleinert)\n- allow \"make install prefix=...\" even after configure (Glenn Randers-Pehrson)\n- allow \"configure --prefix $HOME\" (Tim Mooney)\n- remove warnings in example.c and gzio.c (Glenn Randers-Pehrson)\n- move Makefile.sas to amiga/Makefile.sas\n\nChanges in 1.1.1 (27 Feb 98)\n- fix macros _tr_tally_* in deflate.h for debug mode  (Glenn Randers-Pehrson)\n- remove block truncation heuristic which had very marginal effect for zlib\n  (smaller lit_bufsize than in gzip 1.2.4) and degraded a little the\n  compression ratio on some files. This also allows inlining _tr_tally for\n  matches in deflate_slow\n- added msdos/Makefile.w32 for WIN32 Microsoft Visual C++ (Bob Frazier)\n\nChanges in 1.1.0 (24 Feb 98)\n- do not return STREAM_END prematurely in inflate (John Bowler)\n- revert to the zlib 1.0.8 inflate to avoid the gcc 2.8.0 bug (Jeremy Buhler)\n- compile with -DFASTEST to get compression code optimized for speed only\n- in minigzip, try mmap'ing the input file first (Miguel Albrecht)\n- increase size of I/O buffers in minigzip.c and gzio.c (not a big gain\n  on Sun but significant on HP)\n\n- add a pointer to experimental unzip library in README (Gilles Vollant)\n- initialize variable gcc in configure (Chris Herborth)\n\nChanges in 1.0.9 (17 Feb 1998)\n- added gzputs and gzgets functions\n- do not clear eof flag in gzseek (Mark Diekhans)\n- fix gzseek for files in transparent mode (Mark Diekhans)\n- do not assume that vsprintf returns the number of bytes written (Jens Krinke)\n- replace EXPORT with ZEXPORT to avoid conflict with other programs\n- added compress2 in zconf.h, zlib.def, zlib.dnt\n- new asm code from Gilles Vollant in contrib/asm386\n- simplify the inflate code (Mark):\n . Replace ZALLOC's in huft_build() with single ZALLOC in inflate_blocks_new()\n . ZALLOC the length list in inflate_trees_fixed() instead of using stack\n . ZALLOC the value area for huft_build() instead of using stack\n . Simplify Z_FINISH check in inflate()\n\n- Avoid gcc 2.8.0 comparison bug a little differently than zlib 1.0.8\n- in inftrees.c, avoid cc -O bug on HP (Farshid Elahi)\n- in zconf.h move the ZLIB_DLL stuff earlier to avoid problems with\n  the declaration of FAR (Gilles Vollant)\n- install libz.so* with mode 755 (executable) instead of 644 (Marc Lehmann)\n- read_buf buf parameter of type Bytef* instead of charf*\n- zmemcpy parameters are of type Bytef*, not charf* (Joseph Strout)\n- do not redeclare unlink in minigzip.c for WIN32 (John Bowler)\n- fix check for presence of directories in \"make install\" (Ian Willis)\n\nChanges in 1.0.8 (27 Jan 1998)\n- fixed offsets in contrib/asm386/gvmat32.asm (Gilles Vollant)\n- fix gzgetc and gzputc for big endian systems (Markus Oberhumer)\n- added compress2() to allow setting the compression level\n- include sys/types.h to get off_t on some systems (Marc Lehmann & QingLong)\n- use constant arrays for the static trees in trees.c instead of computing\n  them at run time (thanks to Ken Raeburn for this suggestion). To create\n  trees.h, compile with GEN_TREES_H and run \"make test\"\n- check return code of example in \"make test\" and display result\n- pass minigzip command line options to file_compress\n- simplifying code of inflateSync to avoid gcc 2.8 bug\n\n- support CC=\"gcc -Wall\" in configure -s (QingLong)\n- avoid a flush caused by ftell in gzopen for write mode (Ken Raeburn)\n- fix test for shared library support to avoid compiler warnings\n- zlib.lib -> zlib.dll in msdos/zlib.rc (Gilles Vollant)\n- check for TARGET_OS_MAC in addition to MACOS (Brad Pettit)\n- do not use fdopen for Metrowerks on Mac (Brad Pettit))\n- add checks for gzputc and gzputc in example.c\n- avoid warnings in gzio.c and deflate.c (Andreas Kleinert)\n- use const for the CRC table (Ken Raeburn)\n- fixed \"make uninstall\" for shared libraries\n- use Tracev instead of Trace in infblock.c\n- in example.c use correct compressed length for test_sync\n- suppress +vnocompatwarnings in configure for HPUX (not always supported)\n\nChanges in 1.0.7 (20 Jan 1998)\n- fix gzseek which was broken in write mode\n- return error for gzseek to negative absolute position\n- fix configure for Linux (Chun-Chung Chen)\n- increase stack space for MSC (Tim Wegner)\n- get_crc_table and inflateSyncPoint are EXPORTed (Gilles Vollant)\n- define EXPORTVA for gzprintf (Gilles Vollant)\n- added man page zlib.3 (Rick Rodgers)\n- for contrib/untgz, fix makedir() and improve Makefile\n\n- check gzseek in write mode in example.c\n- allocate extra buffer for seeks only if gzseek is actually called\n- avoid signed/unsigned comparisons (Tim Wegner, Gilles Vollant)\n- add inflateSyncPoint in zconf.h\n- fix list of exported functions in nt/zlib.dnt and mdsos/zlib.def\n\nChanges in 1.0.6 (19 Jan 1998)\n- add functions gzprintf, gzputc, gzgetc, gztell, gzeof, gzseek, gzrewind and\n  gzsetparams (thanks to Roland Giersig and Kevin Ruland for some of this code)\n- Fix a deflate bug occurring only with compression level 0 (thanks to\n  Andy Buckler for finding this one)\n- In minigzip, pass transparently also the first byte for .Z files\n- return Z_BUF_ERROR instead of Z_OK if output buffer full in uncompress()\n- check Z_FINISH in inflate (thanks to Marc Schluper)\n- Implement deflateCopy (thanks to Adam Costello)\n- make static libraries by default in configure, add --shared option\n- move MSDOS or Windows specific files to directory msdos\n- suppress the notion of partial flush to simplify the interface\n  (but the symbol Z_PARTIAL_FLUSH is kept for compatibility with 1.0.4)\n- suppress history buffer provided by application to simplify the interface\n  (this feature was not implemented anyway in 1.0.4)\n- next_in and avail_in must be initialized before calling inflateInit or\n  inflateInit2\n- add EXPORT in all exported functions (for Windows DLL)\n- added Makefile.nt (thanks to Stephen Williams)\n- added the unsupported \"contrib\" directory:\n   contrib/asm386/ by Gilles Vollant <info@winimage.com>\n        386 asm code replacing longest_match()\n   contrib/iostream/ by Kevin Ruland <kevin@rodin.wustl.edu>\n        A C++ I/O streams interface to the zlib gz* functions\n   contrib/iostream2/  by Tyge Løvset <Tyge.Lovset@cmr.no>\n        Another C++ I/O streams interface\n   contrib/untgz/  by \"Pedro A. Aranda Guti\\irrez\" <paag@tid.es>\n        A very simple tar.gz file extractor using zlib\n   contrib/visual-basic.txt by Carlos Rios <c_rios@sonda.cl>\n        How to use compress(), uncompress() and the gz* functions from VB\n- pass params -f (filtered data), -h (huffman only), -1 to -9 (compression\n  level) in minigzip (thanks to Tom Lane)\n\n- use const for rommable constants in deflate\n- added test for gzseek and gztell in example.c\n- add undocumented function inflateSyncPoint() (hack for Paul Mackerras)\n- add undocumented function zError to convert error code to string\n  (for Tim Smithers)\n- Allow compilation of gzio with -DNO_DEFLATE to avoid the compression code\n- Use default memcpy for Symantec MSDOS compiler\n- Add EXPORT keyword for check_func (needed for Windows DLL)\n- add current directory to LD_LIBRARY_PATH for \"make test\"\n- create also a link for libz.so.1\n- added support for FUJITSU UXP/DS (thanks to Toshiaki Nomura)\n- use $(SHAREDLIB) instead of libz.so in Makefile.in (for HPUX)\n- added -soname for Linux in configure (Chun-Chung Chen,\n- assign numbers to the exported functions in zlib.def (for Windows DLL)\n- add advice in zlib.h for best usage of deflateSetDictionary\n- work around compiler bug on Atari (cast Z_NULL in call of s->checkfn)\n- allow compilation with ANSI keywords only enabled for TurboC in large model\n- avoid \"versionString\"[0] (Borland bug)\n- add NEED_DUMMY_RETURN for Borland\n- use variable z_verbose for tracing in debug mode (L. Peter Deutsch)\n- allow compilation with CC\n- defined STDC for OS/2 (David Charlap)\n- limit external names to 8 chars for MVS (Thomas Lund)\n- in minigzip.c, use static buffers only for 16-bit systems\n- fix suffix check for \"minigzip -d foo.gz\"\n- do not return an error for the 2nd of two consecutive gzflush() (Felix Lee)\n- use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau)\n- added makelcc.bat for lcc-win32 (Tom St Denis)\n- in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe)\n- Avoid expanded $Id$. Use \"rcs -kb\" or \"cvs admin -kb\" to avoid Id expansion\n- check for unistd.h in configure (for off_t)\n- remove useless check parameter in inflate_blocks_free\n- avoid useless assignment of s->check to itself in inflate_blocks_new\n- do not flush twice in gzclose (thanks to Ken Raeburn)\n- rename FOPEN as F_OPEN to avoid clash with /usr/include/sys/file.h\n- use NO_ERRNO_H instead of enumeration of operating systems with errno.h\n- work around buggy fclose on pipes for HP/UX\n- support zlib DLL with BORLAND C++ 5.0 (thanks to Glenn Randers-Pehrson)\n- fix configure if CC is already equal to gcc\n\nChanges in 1.0.5 (3 Jan 98)\n- Fix inflate to terminate gracefully when fed corrupted or invalid data\n- Use const for rommable constants in inflate\n- Eliminate memory leaks on error conditions in inflate\n- Removed some vestigial code in inflate\n- Update web address in README\n\nChanges in 1.0.4 (24 Jul 96)\n- In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF\n  bit, so the decompressor could decompress all the correct data but went\n  on to attempt decompressing extra garbage data. This affected minigzip too\n- zlibVersion and gzerror return const char* (needed for DLL)\n- port to RISCOS (no fdopen, no multiple dots, no unlink, no fileno)\n- use z_error only for DEBUG (avoid problem with DLLs)\n\nChanges in 1.0.3 (2 Jul 96)\n- use z_streamp instead of z_stream *, which is now a far pointer in MSDOS\n  small and medium models; this makes the library incompatible with previous\n  versions for these models. (No effect in large model or on other systems.)\n- return OK instead of BUF_ERROR if previous deflate call returned with\n  avail_out as zero but there is nothing to do\n- added memcmp for non STDC compilers\n- define NO_DUMMY_DECL for more Mac compilers (.h files merged incorrectly)\n- define __32BIT__ if __386__ or i386 is defined (pb. with Watcom and SCO)\n- better check for 16-bit mode MSC (avoids problem with Symantec)\n\nChanges in 1.0.2 (23 May 96)\n- added Windows DLL support\n- added a function zlibVersion (for the DLL support)\n- fixed declarations using Bytef in infutil.c (pb with MSDOS medium model)\n- Bytef is define's instead of typedef'd only for Borland C\n- avoid reading uninitialized memory in example.c\n- mention in README that the zlib format is now RFC1950\n- updated Makefile.dj2\n- added algorithm.doc\n\nChanges in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion]\n- fix array overlay in deflate.c which sometimes caused bad compressed data\n- fix inflate bug with empty stored block\n- fix MSDOS medium model which was broken in 0.99\n- fix deflateParams() which could generate bad compressed data\n- Bytef is define'd instead of typedef'ed (work around Borland bug)\n- added an INDEX file\n- new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32),\n  Watcom (Makefile.wat), Amiga SAS/C (Makefile.sas)\n- speed up adler32 for modern machines without auto-increment\n- added -ansi for IRIX in configure\n- static_init_done in trees.c is an int\n- define unlink as delete for VMS\n- fix configure for QNX\n- add configure branch for SCO and HPUX\n- avoid many warnings (unused variables, dead assignments, etc...)\n- no fdopen for BeOS\n- fix the Watcom fix for 32 bit mode (define FAR as empty)\n- removed redefinition of Byte for MKWERKS\n- work around an MWKERKS bug (incorrect merge of all .h files)\n\nChanges in 0.99 (27 Jan 96)\n- allow preset dictionary shared between compressor and decompressor\n- allow compression level 0 (no compression)\n- add deflateParams in zlib.h: allow dynamic change of compression level\n  and compression strategy\n- test large buffers and deflateParams in example.c\n- add optional \"configure\" to build zlib as a shared library\n- suppress Makefile.qnx, use configure instead\n- fixed deflate for 64-bit systems (detected on Cray)\n- fixed inflate_blocks for 64-bit systems (detected on Alpha)\n- declare Z_DEFLATED in zlib.h (possible parameter for deflateInit2)\n- always return Z_BUF_ERROR when deflate() has nothing to do\n- deflateInit and inflateInit are now macros to allow version checking\n- prefix all global functions and types with z_ with -DZ_PREFIX\n- make falloc completely reentrant (inftrees.c)\n- fixed very unlikely race condition in ct_static_init\n- free in reverse order of allocation to help memory manager\n- use zlib-1.0/* instead of zlib/* inside the tar.gz\n- make zlib warning-free with \"gcc -O3 -Wall -Wwrite-strings -Wpointer-arith\n  -Wconversion -Wstrict-prototypes -Wmissing-prototypes\"\n- allow gzread on concatenated .gz files\n- deflateEnd now returns Z_DATA_ERROR if it was premature\n- deflate is finally (?) fully deterministic (no matches beyond end of input)\n- Document Z_SYNC_FLUSH\n- add uninstall in Makefile\n- Check for __cpluplus in zlib.h\n- Better test in ct_align for partial flush\n- avoid harmless warnings for Borland C++\n- initialize hash_head in deflate.c\n- avoid warning on fdopen (gzio.c) for HP cc -Aa\n- include stdlib.h for STDC compilers\n- include errno.h for Cray\n- ignore error if ranlib doesn't exist\n- call ranlib twice for NeXTSTEP\n- use exec_prefix instead of prefix for libz.a\n- renamed ct_* as _tr_* to avoid conflict with applications\n- clear z->msg in inflateInit2 before any error return\n- initialize opaque in example.c, gzio.c, deflate.c and inflate.c\n- fixed typo in zconf.h (_GNUC__ => __GNUC__)\n- check for WIN32 in zconf.h and zutil.c (avoid farmalloc in 32-bit mode)\n- fix typo in Make_vms.com (f$trnlnm -> f$getsyi)\n- in fcalloc, normalize pointer if size > 65520 bytes\n- don't use special fcalloc for 32 bit Borland C++\n- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc.\n- use Z_BINARY instead of BINARY\n- document that gzclose after gzdopen will close the file\n- allow \"a\" as mode in gzopen\n- fix error checking in gzread\n- allow skipping .gz extra-field on pipes\n- added reference to Perl interface in README\n- put the crc table in FAR data (I dislike more and more the medium model :)\n- added get_crc_table\n- added a dimension to all arrays (Borland C can't count)\n- workaround Borland C bug in declaration of inflate_codes_new & inflate_fast\n- guard against multiple inclusion of *.h (for precompiled header on Mac)\n- Watcom C pretends to be Microsoft C small model even in 32 bit mode\n- don't use unsized arrays to avoid silly warnings by Visual C++:\n     warning C4746: 'inflate_mask' : unsized array treated as  '__far'\n     (what's wrong with far data in far model?)\n- define enum out of inflate_blocks_state to allow compilation with C++\n\nChanges in 0.95 (16 Aug 95)\n- fix MSDOS small and medium model (now easier to adapt to any compiler)\n- inlined send_bits\n- fix the final (:-) bug for deflate with flush (output was correct but\n  not completely flushed in rare occasions)\n- default window size is same for compression and decompression\n  (it's now sufficient to set MAX_WBITS in zconf.h)\n- voidp -> voidpf and voidnp -> voidp (for consistency with other\n  typedefs and because voidnp was not near in large model)\n\nChanges in 0.94 (13 Aug 95)\n- support MSDOS medium model\n- fix deflate with flush (could sometimes generate bad output)\n- fix deflateReset (zlib header was incorrectly suppressed)\n- added support for VMS\n- allow a compression level in gzopen()\n- gzflush now calls fflush\n- For deflate with flush, flush even if no more input is provided\n- rename libgz.a as libz.a\n- avoid complex expression in infcodes.c triggering Turbo C bug\n- work around a problem with gcc on Alpha (in INSERT_STRING)\n- don't use inline functions (problem with some gcc versions)\n- allow renaming of Byte, uInt, etc... with #define\n- avoid warning about (unused) pointer before start of array in deflate.c\n- avoid various warnings in gzio.c, example.c, infblock.c, adler32.c, zutil.c\n- avoid reserved word 'new' in trees.c\n\nChanges in 0.93 (25 June 95)\n- temporarily disable inline functions\n- make deflate deterministic\n- give enough lookahead for PARTIAL_FLUSH\n- Set binary mode for stdin/stdout in minigzip.c for OS/2\n- don't even use signed char in inflate (not portable enough)\n- fix inflate memory leak for segmented architectures\n\nChanges in 0.92 (3 May 95)\n- don't assume that char is signed (problem on SGI)\n- Clear bit buffer when starting a stored block\n- no memcpy on Pyramid\n- suppressed inftest.c\n- optimized fill_window, put longest_match inline for gcc\n- optimized inflate on stored blocks\n- untabify all sources to simplify patches\n\nChanges in 0.91 (2 May 95)\n- Default MEM_LEVEL is 8 (not 9 for Unix) as documented in zlib.h\n- Document the memory requirements in zconf.h\n- added \"make install\"\n- fix sync search logic in inflateSync\n- deflate(Z_FULL_FLUSH) now works even if output buffer too short\n- after inflateSync, don't scare people with just \"lo world\"\n- added support for DJGPP\n\nChanges in 0.9 (1 May 95)\n- don't assume that zalloc clears the allocated memory (the TurboC bug\n  was Mark's bug after all :)\n- let again gzread copy uncompressed data unchanged (was working in 0.71)\n- deflate(Z_FULL_FLUSH), inflateReset and inflateSync are now fully implemented\n- added a test of inflateSync in example.c\n- moved MAX_WBITS to zconf.h because users might want to change that\n- document explicitly that zalloc(64K) on MSDOS must return a normalized\n  pointer (zero offset)\n- added Makefiles for Microsoft C, Turbo C, Borland C++\n- faster crc32()\n\nChanges in 0.8 (29 April 95)\n- added fast inflate (inffast.c)\n- deflate(Z_FINISH) now returns Z_STREAM_END when done. Warning: this\n  is incompatible with previous versions of zlib which returned Z_OK\n- work around a TurboC compiler bug (bad code for b << 0, see infutil.h)\n  (actually that was not a compiler bug, see 0.81 above)\n- gzread no longer reads one extra byte in certain cases\n- In gzio destroy(), don't reference a freed structure\n- avoid many warnings for MSDOS\n- avoid the ERROR symbol which is used by MS Windows\n\nChanges in 0.71 (14 April 95)\n- Fixed more MSDOS compilation problems :( There is still a bug with\n  TurboC large model\n\nChanges in 0.7 (14 April 95)\n- Added full inflate support\n- Simplified the crc32() interface. The pre- and post-conditioning\n  (one's complement) is now done inside crc32(). WARNING: this is\n  incompatible with previous versions; see zlib.h for the new usage\n\nChanges in 0.61 (12 April 95)\n- workaround for a bug in TurboC. example and minigzip now work on MSDOS\n\nChanges in 0.6 (11 April 95)\n- added minigzip.c\n- added gzdopen to reopen a file descriptor as gzFile\n- added transparent reading of non-gziped files in gzread\n- fixed bug in gzread (don't read crc as data)\n- fixed bug in destroy (gzio.c) (don't return Z_STREAM_END for gzclose)\n- don't allocate big arrays in the stack (for MSDOS)\n- fix some MSDOS compilation problems\n\nChanges in 0.5:\n- do real compression in deflate.c. Z_PARTIAL_FLUSH is supported but\n  not yet Z_FULL_FLUSH\n- support decompression but only in a single step (forced Z_FINISH)\n- added opaque object for zalloc and zfree\n- added deflateReset and inflateReset\n- added a variable zlib_version for consistency checking\n- renamed the 'filter' parameter of deflateInit2 as 'strategy'\n  Added Z_FILTERED and Z_HUFFMAN_ONLY constants\n\nChanges in 0.4:\n- avoid \"zip\" everywhere, use zlib instead of ziplib\n- suppress Z_BLOCK_FLUSH, interpret Z_PARTIAL_FLUSH as block flush\n  if compression method == 8\n- added adler32 and crc32\n- renamed deflateOptions as deflateInit2, call one or the other but not both\n- added the method parameter for deflateInit2\n- added inflateInit2\n- simplified considerably deflateInit and inflateInit by not supporting\n  user-provided history buffer. This is supported only in deflateInit2\n  and inflateInit2\n\nChanges in 0.3:\n- prefix all macro names with Z_\n- use Z_FINISH instead of deflateEnd to finish compression\n- added Z_HUFFMAN_ONLY\n- added gzerror()\n"
  },
  {
    "path": "third-party/zlib/FAQ",
    "content": "\n                Frequently Asked Questions about zlib\n\n\nIf your question is not there, please check the zlib home page\nhttp://zlib.net/ which may have more recent information.\nThe latest zlib FAQ is at http://zlib.net/zlib_faq.html\n\n\n 1. Is zlib Y2K-compliant?\n\n    Yes. zlib doesn't handle dates.\n\n 2. Where can I get a Windows DLL version?\n\n    The zlib sources can be compiled without change to produce a DLL.  See the\n    file win32/DLL_FAQ.txt in the zlib distribution.\n\n 3. Where can I get a Visual Basic interface to zlib?\n\n    See\n        * http://marknelson.us/1997/01/01/zlib-engine/\n        * win32/DLL_FAQ.txt in the zlib distribution\n\n 4. compress() returns Z_BUF_ERROR.\n\n    Make sure that before the call of compress(), the length of the compressed\n    buffer is equal to the available size of the compressed buffer and not\n    zero.  For Visual Basic, check that this parameter is passed by reference\n    (\"as any\"), not by value (\"as long\").\n\n 5. deflate() or inflate() returns Z_BUF_ERROR.\n\n    Before making the call, make sure that avail_in and avail_out are not zero.\n    When setting the parameter flush equal to Z_FINISH, also make sure that\n    avail_out is big enough to allow processing all pending input.  Note that a\n    Z_BUF_ERROR is not fatal--another call to deflate() or inflate() can be\n    made with more input or output space.  A Z_BUF_ERROR may in fact be\n    unavoidable depending on how the functions are used, since it is not\n    possible to tell whether or not there is more output pending when\n    strm.avail_out returns with zero.  See http://zlib.net/zlib_how.html for a\n    heavily annotated example.\n\n 6. Where's the zlib documentation (man pages, etc.)?\n\n    It's in zlib.h .  Examples of zlib usage are in the files test/example.c\n    and test/minigzip.c, with more in examples/ .\n\n 7. Why don't you use GNU autoconf or libtool or ...?\n\n    Because we would like to keep zlib as a very small and simple package.\n    zlib is rather portable and doesn't need much configuration.\n\n 8. I found a bug in zlib.\n\n    Most of the time, such problems are due to an incorrect usage of zlib.\n    Please try to reproduce the problem with a small program and send the\n    corresponding source to us at zlib@gzip.org .  Do not send multi-megabyte\n    data files without prior agreement.\n\n 9. Why do I get \"undefined reference to gzputc\"?\n\n    If \"make test\" produces something like\n\n       example.o(.text+0x154): undefined reference to `gzputc'\n\n    check that you don't have old files libz.* in /usr/lib, /usr/local/lib or\n    /usr/X11R6/lib. Remove any old versions, then do \"make install\".\n\n10. I need a Delphi interface to zlib.\n\n    See the contrib/delphi directory in the zlib distribution.\n\n11. Can zlib handle .zip archives?\n\n    Not by itself, no.  See the directory contrib/minizip in the zlib\n    distribution.\n\n12. Can zlib handle .Z files?\n\n    No, sorry.  You have to spawn an uncompress or gunzip subprocess, or adapt\n    the code of uncompress on your own.\n\n13. How can I make a Unix shared library?\n\n    By default a shared (and a static) library is built for Unix.  So:\n\n    make distclean\n    ./configure\n    make\n\n14. How do I install a shared zlib library on Unix?\n\n    After the above, then:\n\n    make install\n\n    However, many flavors of Unix come with a shared zlib already installed.\n    Before going to the trouble of compiling a shared version of zlib and\n    trying to install it, you may want to check if it's already there!  If you\n    can #include <zlib.h>, it's there.  The -lz option will probably link to\n    it.  You can check the version at the top of zlib.h or with the\n    ZLIB_VERSION symbol defined in zlib.h .\n\n15. I have a question about OttoPDF.\n\n    We are not the authors of OttoPDF. The real author is on the OttoPDF web\n    site: Joel Hainley, jhainley@myndkryme.com.\n\n16. Can zlib decode Flate data in an Adobe PDF file?\n\n    Yes. See http://www.pdflib.com/ . To modify PDF forms, see\n    http://sourceforge.net/projects/acroformtool/ .\n\n17. Why am I getting this \"register_frame_info not found\" error on Solaris?\n\n    After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib\n    generates an error such as:\n\n        ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so:\n        symbol __register_frame_info: referenced symbol not found\n\n    The symbol __register_frame_info is not part of zlib, it is generated by\n    the C compiler (cc or gcc).  You must recompile applications using zlib\n    which have this problem.  This problem is specific to Solaris.  See\n    http://www.sunfreeware.com for Solaris versions of zlib and applications\n    using zlib.\n\n18. Why does gzip give an error on a file I make with compress/deflate?\n\n    The compress and deflate functions produce data in the zlib format, which\n    is different and incompatible with the gzip format.  The gz* functions in\n    zlib on the other hand use the gzip format.  Both the zlib and gzip formats\n    use the same compressed data format internally, but have different headers\n    and trailers around the compressed data.\n\n19. Ok, so why are there two different formats?\n\n    The gzip format was designed to retain the directory information about a\n    single file, such as the name and last modification date.  The zlib format\n    on the other hand was designed for in-memory and communication channel\n    applications, and has a much more compact header and trailer and uses a\n    faster integrity check than gzip.\n\n20. Well that's nice, but how do I make a gzip file in memory?\n\n    You can request that deflate write the gzip format instead of the zlib\n    format using deflateInit2().  You can also request that inflate decode the\n    gzip format using inflateInit2().  Read zlib.h for more details.\n\n21. Is zlib thread-safe?\n\n    Yes.  However any library routines that zlib uses and any application-\n    provided memory allocation routines must also be thread-safe.  zlib's gz*\n    functions use stdio library routines, and most of zlib's functions use the\n    library memory allocation routines by default.  zlib's *Init* functions\n    allow for the application to provide custom memory allocation routines.\n\n    Of course, you should only operate on any given zlib or gzip stream from a\n    single thread at a time.\n\n22. Can I use zlib in my commercial application?\n\n    Yes.  Please read the license in zlib.h.\n\n23. Is zlib under the GNU license?\n\n    No.  Please read the license in zlib.h.\n\n24. The license says that altered source versions must be \"plainly marked\". So\n    what exactly do I need to do to meet that requirement?\n\n    You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h.  In\n    particular, the final version number needs to be changed to \"f\", and an\n    identification string should be appended to ZLIB_VERSION.  Version numbers\n    x.x.x.f are reserved for modifications to zlib by others than the zlib\n    maintainers.  For example, if the version of the base zlib you are altering\n    is \"1.2.3.4\", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and\n    ZLIB_VERSION to something like \"1.2.3.f-zachary-mods-v3\".  You can also\n    update the version strings in deflate.c and inftrees.c.\n\n    For altered source distributions, you should also note the origin and\n    nature of the changes in zlib.h, as well as in ChangeLog and README, along\n    with the dates of the alterations.  The origin should include at least your\n    name (or your company's name), and an email address to contact for help or\n    issues with the library.\n\n    Note that distributing a compiled zlib library along with zlib.h and\n    zconf.h is also a source distribution, and so you should change\n    ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes\n    in zlib.h as you would for a full source distribution.\n\n25. Will zlib work on a big-endian or little-endian architecture, and can I\n    exchange compressed data between them?\n\n    Yes and yes.\n\n26. Will zlib work on a 64-bit machine?\n\n    Yes.  It has been tested on 64-bit machines, and has no dependence on any\n    data types being limited to 32-bits in length.  If you have any\n    difficulties, please provide a complete problem report to zlib@gzip.org\n\n27. Will zlib decompress data from the PKWare Data Compression Library?\n\n    No.  The PKWare DCL uses a completely different compressed data format than\n    does PKZIP and zlib.  However, you can look in zlib's contrib/blast\n    directory for a possible solution to your problem.\n\n28. Can I access data randomly in a compressed stream?\n\n    No, not without some preparation.  If when compressing you periodically use\n    Z_FULL_FLUSH, carefully write all the pending data at those points, and\n    keep an index of those locations, then you can start decompression at those\n    points.  You have to be careful to not use Z_FULL_FLUSH too often, since it\n    can significantly degrade compression.  Alternatively, you can scan a\n    deflate stream once to generate an index, and then use that index for\n    random access.  See examples/zran.c .\n\n29. Does zlib work on MVS, OS/390, CICS, etc.?\n\n    It has in the past, but we have not heard of any recent evidence.  There\n    were working ports of zlib 1.1.4 to MVS, but those links no longer work.\n    If you know of recent, successful applications of zlib on these operating\n    systems, please let us know.  Thanks.\n\n30. Is there some simpler, easier to read version of inflate I can look at to\n    understand the deflate format?\n\n    First off, you should read RFC 1951.  Second, yes.  Look in zlib's\n    contrib/puff directory.\n\n31. Does zlib infringe on any patents?\n\n    As far as we know, no.  In fact, that was originally the whole point behind\n    zlib.  Look here for some more information:\n\n    http://www.gzip.org/#faq11\n\n32. Can zlib work with greater than 4 GB of data?\n\n    Yes.  inflate() and deflate() will process any amount of data correctly.\n    Each call of inflate() or deflate() is limited to input and output chunks\n    of the maximum value that can be stored in the compiler's \"unsigned int\"\n    type, but there is no limit to the number of chunks.  Note however that the\n    strm.total_in and strm_total_out counters may be limited to 4 GB.  These\n    counters are provided as a convenience and are not used internally by\n    inflate() or deflate().  The application can easily set up its own counters\n    updated after each call of inflate() or deflate() to count beyond 4 GB.\n    compress() and uncompress() may be limited to 4 GB, since they operate in a\n    single call.  gzseek() and gztell() may be limited to 4 GB depending on how\n    zlib is compiled.  See the zlibCompileFlags() function in zlib.h.\n\n    The word \"may\" appears several times above since there is a 4 GB limit only\n    if the compiler's \"long\" type is 32 bits.  If the compiler's \"long\" type is\n    64 bits, then the limit is 16 exabytes.\n\n33. Does zlib have any security vulnerabilities?\n\n    The only one that we are aware of is potentially in gzprintf().  If zlib is\n    compiled to use sprintf() or vsprintf(), then there is no protection\n    against a buffer overflow of an 8K string space (or other value as set by\n    gzbuffer()), other than the caller of gzprintf() assuring that the output\n    will not exceed 8K.  On the other hand, if zlib is compiled to use\n    snprintf() or vsnprintf(), which should normally be the case, then there is\n    no vulnerability.  The ./configure script will display warnings if an\n    insecure variation of sprintf() will be used by gzprintf().  Also the\n    zlibCompileFlags() function will return information on what variant of\n    sprintf() is used by gzprintf().\n\n    If you don't have snprintf() or vsnprintf() and would like one, you can\n    find a portable implementation here:\n\n        http://www.ijs.si/software/snprintf/\n\n    Note that you should be using the most recent version of zlib.  Versions\n    1.1.3 and before were subject to a double-free vulnerability, and versions\n    1.2.1 and 1.2.2 were subject to an access exception when decompressing\n    invalid compressed data.\n\n34. Is there a Java version of zlib?\n\n    Probably what you want is to use zlib in Java. zlib is already included\n    as part of the Java SDK in the java.util.zip package. If you really want\n    a version of zlib written in the Java language, look on the zlib home\n    page for links: http://zlib.net/ .\n\n35. I get this or that compiler or source-code scanner warning when I crank it\n    up to maximally-pedantic. Can't you guys write proper code?\n\n    Many years ago, we gave up attempting to avoid warnings on every compiler\n    in the universe.  It just got to be a waste of time, and some compilers\n    were downright silly as well as contradicted each other.  So now, we simply\n    make sure that the code always works.\n\n36. Valgrind (or some similar memory access checker) says that deflate is\n    performing a conditional jump that depends on an uninitialized value.\n    Isn't that a bug?\n\n    No.  That is intentional for performance reasons, and the output of deflate\n    is not affected.  This only started showing up recently since zlib 1.2.x\n    uses malloc() by default for allocations, whereas earlier versions used\n    calloc(), which zeros out the allocated memory.  Even though the code was\n    correct, versions 1.2.4 and later was changed to not stimulate these\n    checkers.\n\n37. Will zlib read the (insert any ancient or arcane format here) compressed\n    data format?\n\n    Probably not. Look in the comp.compression FAQ for pointers to various\n    formats and associated software.\n\n38. How can I encrypt/decrypt zip files with zlib?\n\n    zlib doesn't support encryption.  The original PKZIP encryption is very\n    weak and can be broken with freely available programs.  To get strong\n    encryption, use GnuPG, http://www.gnupg.org/ , which already includes zlib\n    compression.  For PKZIP compatible \"encryption\", look at\n    http://www.info-zip.org/\n\n39. What's the difference between the \"gzip\" and \"deflate\" HTTP 1.1 encodings?\n\n    \"gzip\" is the gzip format, and \"deflate\" is the zlib format.  They should\n    probably have called the second one \"zlib\" instead to avoid confusion with\n    the raw deflate compressed data format.  While the HTTP 1.1 RFC 2616\n    correctly points to the zlib specification in RFC 1950 for the \"deflate\"\n    transfer encoding, there have been reports of servers and browsers that\n    incorrectly produce or expect raw deflate data per the deflate\n    specification in RFC 1951, most notably Microsoft.  So even though the\n    \"deflate\" transfer encoding using the zlib format would be the more\n    efficient approach (and in fact exactly what the zlib format was designed\n    for), using the \"gzip\" transfer encoding is probably more reliable due to\n    an unfortunate choice of name on the part of the HTTP 1.1 authors.\n\n    Bottom line: use the gzip format for HTTP 1.1 encoding.\n\n40. Does zlib support the new \"Deflate64\" format introduced by PKWare?\n\n    No.  PKWare has apparently decided to keep that format proprietary, since\n    they have not documented it as they have previous compression formats.  In\n    any case, the compression improvements are so modest compared to other more\n    modern approaches, that it's not worth the effort to implement.\n\n41. I'm having a problem with the zip functions in zlib, can you help?\n\n    There are no zip functions in zlib.  You are probably using minizip by\n    Giles Vollant, which is found in the contrib directory of zlib.  It is not\n    part of zlib.  In fact none of the stuff in contrib is part of zlib.  The\n    files in there are not supported by the zlib authors.  You need to contact\n    the authors of the respective contribution for help.\n\n42. The match.asm code in contrib is under the GNU General Public License.\n    Since it's part of zlib, doesn't that mean that all of zlib falls under the\n    GNU GPL?\n\n    No.  The files in contrib are not part of zlib.  They were contributed by\n    other authors and are provided as a convenience to the user within the zlib\n    distribution.  Each item in contrib has its own license.\n\n43. Is zlib subject to export controls?  What is its ECCN?\n\n    zlib is not subject to export controls, and so is classified as EAR99.\n\n44. Can you please sign these lengthy legal documents and fax them back to us\n    so that we can use your software in our product?\n\n    No. Go away. Shoo.\n"
  },
  {
    "path": "third-party/zlib/INDEX",
    "content": "CMakeLists.txt  cmake build file\nChangeLog       history of changes\nFAQ             Frequently Asked Questions about zlib\nINDEX           this file\nMakefile        dummy Makefile that tells you to ./configure\nMakefile.in     template for Unix Makefile\nREADME          guess what\nconfigure       configure script for Unix\nmake_vms.com    makefile for VMS\ntest/example.c  zlib usages examples for build testing\ntest/minigzip.c minimal gzip-like functionality for build testing\ntest/infcover.c inf*.c code coverage for build coverage testing\ntreebuild.xml   XML description of source file dependencies\nzconf.h.cmakein zconf.h template for cmake\nzconf.h.in      zconf.h template for configure\nzlib.3          Man page for zlib\nzlib.3.pdf      Man page in PDF format\nzlib.map        Linux symbol information\nzlib.pc.in      Template for pkg-config descriptor\nzlib.pc.cmakein zlib.pc template for cmake\nzlib2ansi       perl script to convert source files for C++ compilation\n\namiga/          makefiles for Amiga SAS C\nas400/          makefiles for AS/400\ndoc/            documentation for formats and algorithms\nmsdos/          makefiles for MSDOS\nnintendods/     makefile for Nintendo DS\nold/            makefiles for various architectures and zlib documentation\n                files that have not yet been updated for zlib 1.2.x\nqnx/            makefiles for QNX\nwatcom/         makefiles for OpenWatcom\nwin32/          makefiles for Windows\n\n                zlib public header files (required for library use):\nzconf.h\nzlib.h\n\n                private source files used to build the zlib library:\nadler32.c\ncompress.c\ncrc32.c\ncrc32.h\ndeflate.c\ndeflate.h\ngzclose.c\ngzguts.h\ngzlib.c\ngzread.c\ngzwrite.c\ninfback.c\ninffast.c\ninffast.h\ninffixed.h\ninflate.c\ninflate.h\ninftrees.c\ninftrees.h\ntrees.c\ntrees.h\nuncompr.c\nzutil.c\nzutil.h\n\n                source files for sample programs\nSee examples/README.examples\n\n                unsupported contributions by third parties\nSee contrib/README.contrib\n"
  },
  {
    "path": "third-party/zlib/LICENSE",
    "content": "Copyright notice:\n\n (C) 1995-2022 Jean-loup Gailly and Mark Adler\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n\n  Jean-loup Gailly        Mark Adler\n  jloup@gzip.org          madler@alumni.caltech.edu\n"
  },
  {
    "path": "third-party/zlib/Makefile",
    "content": "all:\n\t-@echo \"Please use ./configure first.  Thank you.\"\n\ndistclean:\n\tmake -f Makefile.in distclean\n"
  },
  {
    "path": "third-party/zlib/README",
    "content": "ZLIB DATA COMPRESSION LIBRARY\n\nzlib 1.3.1 is a general purpose data compression library.  All the code is\nthread safe.  The data format used by the zlib library is described by RFCs\n(Request for Comments) 1950 to 1952 in the files\nhttp://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and\nrfc1952 (gzip format).\n\nAll functions of the compression library are documented in the file zlib.h\n(volunteer to write man pages welcome, contact zlib@gzip.org).  A usage example\nof the library is given in the file test/example.c which also tests that\nthe library is working correctly.  Another example is given in the file\ntest/minigzip.c.  The compression library itself is composed of all source\nfiles in the root directory.\n\nTo compile all files and run the test program, follow the instructions given at\nthe top of Makefile.in.  In short \"./configure; make test\", and if that goes\nwell, \"make install\" should work for most flavors of Unix.  For Windows, use\none of the special makefiles in win32/ or contrib/vstudio/ .  For VMS, use\nmake_vms.com.\n\nQuestions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant\n<info@winimage.com> for the Windows DLL version.  The zlib home page is\nhttp://zlib.net/ .  Before reporting a problem, please check this site to\nverify that you have the latest version of zlib; otherwise get the latest\nversion and check whether the problem still exists or not.\n\nPLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help.\n\nMark Nelson <markn@ieee.org> wrote an article about zlib for the Jan.  1997\nissue of Dr.  Dobb's Journal; a copy of the article is available at\nhttps://marknelson.us/posts/1997/01/01/zlib-engine.html .\n\nThe changes made in version 1.3.1 are documented in the file ChangeLog.\n\nUnsupported third party contributions are provided in directory contrib/ .\n\nzlib is available in Java using the java.util.zip package. Follow the API\nDocumentation link at: https://docs.oracle.com/search/?q=java.util.zip .\n\nA Perl interface to zlib and bzip2 written by Paul Marquess <pmqs@cpan.org>\ncan be found at https://github.com/pmqs/IO-Compress .\n\nA Python interface to zlib written by A.M. Kuchling <amk@amk.ca> is\navailable in Python 1.5 and later versions, see\nhttp://docs.python.org/library/zlib.html .\n\nzlib is built into tcl: http://wiki.tcl.tk/4610 .\n\nAn experimental package to read and write files in .zip format, written on top\nof zlib by Gilles Vollant <info@winimage.com>, is available in the\ncontrib/minizip directory of zlib.\n\n\nNotes for some targets:\n\n- For Windows DLL versions, please see win32/DLL_FAQ.txt\n\n- For 64-bit Irix, deflate.c must be compiled without any optimization. With\n  -O, one libpng test fails. The test works in 32 bit mode (with the -n32\n  compiler flag). The compiler bug has been reported to SGI.\n\n- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works\n  when compiled with cc.\n\n- On Digital Unix 4.0D (formerly OSF/1) on AlphaServer, the cc option -std1 is\n  necessary to get gzprintf working correctly. This is done by configure.\n\n- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with\n  other compilers. Use \"make test\" to check your compiler.\n\n- gzdopen is not supported on RISCOS or BEOS.\n\n- For PalmOs, see http://palmzlib.sourceforge.net/\n\n\nAcknowledgments:\n\n  The deflate format used by zlib was defined by Phil Katz.  The deflate and\n  zlib specifications were written by L.  Peter Deutsch.  Thanks to all the\n  people who reported problems and suggested various improvements in zlib; they\n  are too numerous to cite here.\n\nCopyright notice:\n\n (C) 1995-2024 Jean-loup Gailly and Mark Adler\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n\n  Jean-loup Gailly        Mark Adler\n  jloup@gzip.org          madler@alumni.caltech.edu\n\nIf you use the zlib library in a product, we would appreciate *not* receiving\nlengthy legal documents to sign.  The sources are provided for free but without\nwarranty of any kind.  The library has been entirely written by Jean-loup\nGailly and Mark Adler; it does not include third-party code.  We make all\ncontributions to and distributions of this project solely in our personal\ncapacity, and are not conveying any rights to any intellectual property of\nany third parties.\n\nIf you redistribute modified sources, we would appreciate that you include in\nthe file ChangeLog history information documenting your changes.  Please read\nthe FAQ for more information on the distribution of modified source versions.\n"
  },
  {
    "path": "third-party/zlib/adler32.c",
    "content": "/* adler32.c -- compute the Adler-32 checksum of a data stream\n * Copyright (C) 1995-2011, 2016 Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* @(#) $Id$ */\n\n#include \"zutil.h\"\n\n#define BASE 65521U     /* largest prime smaller than 65536 */\n#define NMAX 5552\n/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */\n\n#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}\n#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);\n#define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);\n#define DO8(buf,i)  DO4(buf,i); DO4(buf,i+4);\n#define DO16(buf)   DO8(buf,0); DO8(buf,8);\n\n/* use NO_DIVIDE if your processor does not do division in hardware --\n   try it both ways to see which is faster */\n#ifdef NO_DIVIDE\n/* note that this assumes BASE is 65521, where 65536 % 65521 == 15\n   (thank you to John Reiser for pointing this out) */\n#  define CHOP(a) \\\n    do { \\\n        unsigned long tmp = a >> 16; \\\n        a &= 0xffffUL; \\\n        a += (tmp << 4) - tmp; \\\n    } while (0)\n#  define MOD28(a) \\\n    do { \\\n        CHOP(a); \\\n        if (a >= BASE) a -= BASE; \\\n    } while (0)\n#  define MOD(a) \\\n    do { \\\n        CHOP(a); \\\n        MOD28(a); \\\n    } while (0)\n#  define MOD63(a) \\\n    do { /* this assumes a is not negative */ \\\n        z_off64_t tmp = a >> 32; \\\n        a &= 0xffffffffL; \\\n        a += (tmp << 8) - (tmp << 5) + tmp; \\\n        tmp = a >> 16; \\\n        a &= 0xffffL; \\\n        a += (tmp << 4) - tmp; \\\n        tmp = a >> 16; \\\n        a &= 0xffffL; \\\n        a += (tmp << 4) - tmp; \\\n        if (a >= BASE) a -= BASE; \\\n    } while (0)\n#else\n#  define MOD(a) a %= BASE\n#  define MOD28(a) a %= BASE\n#  define MOD63(a) a %= BASE\n#endif\n\n/* ========================================================================= */\nuLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, z_size_t len) {\n    unsigned long sum2;\n    unsigned n;\n\n    /* split Adler-32 into component sums */\n    sum2 = (adler >> 16) & 0xffff;\n    adler &= 0xffff;\n\n    /* in case user likes doing a byte at a time, keep it fast */\n    if (len == 1) {\n        adler += buf[0];\n        if (adler >= BASE)\n            adler -= BASE;\n        sum2 += adler;\n        if (sum2 >= BASE)\n            sum2 -= BASE;\n        return adler | (sum2 << 16);\n    }\n\n    /* initial Adler-32 value (deferred check for len == 1 speed) */\n    if (buf == Z_NULL)\n        return 1L;\n\n    /* in case short lengths are provided, keep it somewhat fast */\n    if (len < 16) {\n        while (len--) {\n            adler += *buf++;\n            sum2 += adler;\n        }\n        if (adler >= BASE)\n            adler -= BASE;\n        MOD28(sum2);            /* only added so many BASE's */\n        return adler | (sum2 << 16);\n    }\n\n    /* do length NMAX blocks -- requires just one modulo operation */\n    while (len >= NMAX) {\n        len -= NMAX;\n        n = NMAX / 16;          /* NMAX is divisible by 16 */\n        do {\n            DO16(buf);          /* 16 sums unrolled */\n            buf += 16;\n        } while (--n);\n        MOD(adler);\n        MOD(sum2);\n    }\n\n    /* do remaining bytes (less than NMAX, still just one modulo) */\n    if (len) {                  /* avoid modulos if none remaining */\n        while (len >= 16) {\n            len -= 16;\n            DO16(buf);\n            buf += 16;\n        }\n        while (len--) {\n            adler += *buf++;\n            sum2 += adler;\n        }\n        MOD(adler);\n        MOD(sum2);\n    }\n\n    /* return recombined sums */\n    return adler | (sum2 << 16);\n}\n\n/* ========================================================================= */\nuLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len) {\n    return adler32_z(adler, buf, len);\n}\n\n/* ========================================================================= */\nlocal uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) {\n    unsigned long sum1;\n    unsigned long sum2;\n    unsigned rem;\n\n    /* for negative len, return invalid adler32 as a clue for debugging */\n    if (len2 < 0)\n        return 0xffffffffUL;\n\n    /* the derivation of this formula is left as an exercise for the reader */\n    MOD63(len2);                /* assumes len2 >= 0 */\n    rem = (unsigned)len2;\n    sum1 = adler1 & 0xffff;\n    sum2 = rem * sum1;\n    MOD(sum2);\n    sum1 += (adler2 & 0xffff) + BASE - 1;\n    sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;\n    if (sum1 >= BASE) sum1 -= BASE;\n    if (sum1 >= BASE) sum1 -= BASE;\n    if (sum2 >= ((unsigned long)BASE << 1)) sum2 -= ((unsigned long)BASE << 1);\n    if (sum2 >= BASE) sum2 -= BASE;\n    return sum1 | (sum2 << 16);\n}\n\n/* ========================================================================= */\nuLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2) {\n    return adler32_combine_(adler1, adler2, len2);\n}\n\nuLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2) {\n    return adler32_combine_(adler1, adler2, len2);\n}\n"
  },
  {
    "path": "third-party/zlib/amiga/Makefile.pup",
    "content": "# Amiga powerUP (TM) Makefile\n# makefile for libpng and SAS C V6.58/7.00 PPC compiler\n# Copyright (C) 1998 by Andreas R. Kleinert\n\nLIBNAME\t= libzip.a\n\nCC\t= scppc\nCFLAGS\t= NOSTKCHK NOSINT OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL \\\n\t  OPTLOOP OPTRDEP=8 OPTDEP=8 OPTCOMP=8 NOVER\nAR\t= ppc-amigaos-ar cr\nRANLIB\t= ppc-amigaos-ranlib\nLD\t= ppc-amigaos-ld -r\nLDFLAGS\t= -o\nLDLIBS\t= LIB:scppc.a LIB:end.o\nRM\t= delete quiet\n\nOBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \\\n       uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o\n\nTEST_OBJS = example.o minigzip.o\n\nall: example minigzip\n\ncheck: test\ntest: all\n\texample\n\techo hello world | minigzip | minigzip -d\n\n$(LIBNAME): $(OBJS)\n\t$(AR) $@ $(OBJS)\n\t-$(RANLIB) $@\n\nexample: example.o $(LIBNAME)\n\t$(LD) $(LDFLAGS) $@ LIB:c_ppc.o $@.o $(LIBNAME) $(LDLIBS)\n\nminigzip: minigzip.o $(LIBNAME)\n\t$(LD) $(LDFLAGS) $@ LIB:c_ppc.o $@.o $(LIBNAME) $(LDLIBS)\n\nmostlyclean: clean\nclean:\n\t$(RM) *.o example minigzip $(LIBNAME) foo.gz\n\nzip:\n\tzip -ul9 zlib README ChangeLog Makefile Make????.??? Makefile.?? \\\n\t  descrip.mms *.[ch]\n\ntgz:\n\tcd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \\\n\t  zlib/Make????.??? zlib/Makefile.?? zlib/descrip.mms zlib/*.[ch]\n\n# DO NOT DELETE THIS LINE -- make depend depends on it.\n\nadler32.o: zlib.h zconf.h\ncompress.o: zlib.h zconf.h\ncrc32.o: crc32.h zlib.h zconf.h\ndeflate.o: deflate.h zutil.h zlib.h zconf.h\nexample.o: zlib.h zconf.h\ngzclose.o: zlib.h zconf.h gzguts.h\ngzlib.o: zlib.h zconf.h gzguts.h\ngzread.o: zlib.h zconf.h gzguts.h\ngzwrite.o: zlib.h zconf.h gzguts.h\ninffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h\ninflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h\ninfback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h\ninftrees.o: zutil.h zlib.h zconf.h inftrees.h\nminigzip.o: zlib.h zconf.h\ntrees.o: deflate.h zutil.h zlib.h zconf.h trees.h\nuncompr.o: zlib.h zconf.h\nzutil.o: zutil.h zlib.h zconf.h\n"
  },
  {
    "path": "third-party/zlib/amiga/Makefile.sas",
    "content": "# SMakefile for zlib\n# Modified from the standard UNIX Makefile Copyright Jean-loup Gailly\n# Osma Ahvenlampi <Osma.Ahvenlampi@hut.fi>\n# Amiga, SAS/C 6.56 & Smake\n\nCC=sc\nCFLAGS=OPT\n#CFLAGS=OPT CPU=68030\n#CFLAGS=DEBUG=LINE\nLDFLAGS=LIB z.lib\n\nSCOPTIONS=OPTSCHED OPTINLINE OPTALIAS OPTTIME OPTINLOCAL STRMERGE \\\n       NOICONS PARMS=BOTH NOSTACKCHECK UTILLIB NOVERSION ERRORREXX \\\n       DEF=POSTINC\n\nOBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \\\n       uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o\n\nTEST_OBJS = example.o minigzip.o\n\nall: SCOPTIONS example minigzip\n\ncheck: test\ntest: all\n\texample\n\techo hello world | minigzip | minigzip -d\n\ninstall: z.lib\n\tcopy clone zlib.h zconf.h INCLUDE:\n\tcopy clone z.lib LIB:\n\nz.lib: $(OBJS)\n\toml z.lib r $(OBJS)\n\nexample: example.o z.lib\n\t$(CC) $(CFLAGS) LINK TO $@ example.o $(LDFLAGS)\n\nminigzip: minigzip.o z.lib\n\t$(CC) $(CFLAGS) LINK TO $@ minigzip.o $(LDFLAGS)\n\nmostlyclean: clean\nclean:\n\t-delete force quiet example minigzip *.o z.lib foo.gz *.lnk SCOPTIONS\n\nSCOPTIONS: Makefile.sas\n\tcopy to $@ <from <\n$(SCOPTIONS)\n<\n\n# DO NOT DELETE THIS LINE -- make depend depends on it.\n\nadler32.o: zlib.h zconf.h\ncompress.o: zlib.h zconf.h\ncrc32.o: crc32.h zlib.h zconf.h\ndeflate.o: deflate.h zutil.h zlib.h zconf.h\nexample.o: zlib.h zconf.h\ngzclose.o: zlib.h zconf.h gzguts.h\ngzlib.o: zlib.h zconf.h gzguts.h\ngzread.o: zlib.h zconf.h gzguts.h\ngzwrite.o: zlib.h zconf.h gzguts.h\ninffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h\ninflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h\ninfback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h\ninftrees.o: zutil.h zlib.h zconf.h inftrees.h\nminigzip.o: zlib.h zconf.h\ntrees.o: deflate.h zutil.h zlib.h zconf.h trees.h\nuncompr.o: zlib.h zconf.h\nzutil.o: zutil.h zlib.h zconf.h\n"
  },
  {
    "path": "third-party/zlib/compress.c",
    "content": "/* compress.c -- compress a memory buffer\n * Copyright (C) 1995-2005, 2014, 2016 Jean-loup Gailly, Mark Adler\n * For conditions of distribution and use, see copyright notice in zlib.h\n */\n\n/* @(#) $Id$ */\n\n#define ZLIB_INTERNAL\n#include \"zlib.h\"\n\n/* ===========================================================================\n     Compresses the source buffer into the destination buffer. The level\n   parameter has the same meaning as in deflateInit.  sourceLen is the byte\n   length of the source buffer. Upon entry, destLen is the total size of the\n   destination buffer, which must be at least 0.1% larger than sourceLen plus\n   12 bytes. Upon exit, destLen is the actual size of the compressed buffer.\n\n     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough\n   memory, Z_BUF_ERROR if there was not enough room in the output buffer,\n   Z_STREAM_ERROR if the level parameter is invalid.\n*/\nint ZEXPORT compress2(Bytef *dest, uLongf *destLen, const Bytef *source,\n                      uLong sourceLen, int level) {\n    z_stream stream;\n    int err;\n    const uInt max = (uInt)-1;\n    uLong left;\n\n    left = *destLen;\n    *destLen = 0;\n\n    stream.zalloc = (alloc_func)0;\n    stream.zfree = (free_func)0;\n    stream.opaque = (voidpf)0;\n\n    err = deflateInit(&stream, level);\n    if (err != Z_OK) return err;\n\n    stream.next_out = dest;\n    stream.avail_out = 0;\n    stream.next_in = (z_const Bytef *)source;\n    stream.avail_in = 0;\n\n    do {\n        if (stream.avail_out == 0) {\n            stream.avail_out = left > (uLong)max ? max : (uInt)left;\n            left -= stream.avail_out;\n        }\n        if (stream.avail_in == 0) {\n            stream.avail_in = sourceLen > (uLong)max ? max : (uInt)sourceLen;\n            sourceLen -= stream.avail_in;\n        }\n        err = deflate(&stream, sourceLen ? Z_NO_FLUSH : Z_FINISH);\n    } while (err == Z_OK);\n\n    *destLen = stream.total_out;\n    deflateEnd(&stream);\n    return err == Z_STREAM_END ? Z_OK : err;\n}\n\n/* ===========================================================================\n */\nint ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source,\n                     uLong sourceLen) {\n    return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);\n}\n\n/* ===========================================================================\n     If the default memLevel or windowBits for deflateInit() is changed, then\n   this function needs to be updated.\n */\nuLong ZEXPORT compressBound(uLong sourceLen) {\n    return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +\n           (sourceLen >> 25) + 13;\n}\n"
  },
  {
    "path": "third-party/zlib/configure",
    "content": "#!/bin/sh\n# configure script for zlib.\n#\n# Normally configure builds both a static and a shared library.\n# If you want to build just a static library, use: ./configure --static\n#\n# To impose specific compiler or flags or install directory, use for example:\n#    prefix=$HOME CC=cc CFLAGS=\"-O4\" ./configure\n# or for csh/tcsh users:\n#    (setenv prefix $HOME; setenv CC cc; setenv CFLAGS \"-O4\"; ./configure)\n\n# Incorrect settings of CC or CFLAGS may prevent creating a shared library.\n# If you have problems, try without defining CC and CFLAGS before reporting\n# an error.\n\n# start off configure.log\necho -------------------- >> configure.log\necho $0 $* >> configure.log\ndate >> configure.log\n\n# get source directory\nSRCDIR=`dirname $0`\nif test $SRCDIR = \".\"; then\n    ZINC=\"\"\n    ZINCOUT=\"-I.\"\n    SRCDIR=\"\"\nelse\n    ZINC='-I. -include zconf.h'\n    ZINCOUT='-I. -I$(SRCDIR)'\n    SRCDIR=\"$SRCDIR/\"\nfi\n\n# set command prefix for cross-compilation\nif [ -n \"${CHOST}\" ]; then\n    uname=${CHOST}\n    mname=${CHOST}\n    CROSS_PREFIX=\"${CHOST}-\"\nelse\n    mname=`(uname -a || echo unknown) 2>/dev/null`\nfi\n\n# destination name for static library\nSTATICLIB=libz.a\n\n# extract zlib version numbers from zlib.h\nVER=`sed -n -e '/VERSION \"/s/.*\"\\(.*\\)\".*/\\1/p' < ${SRCDIR}zlib.h`\nVER3=`echo ${VER}|sed -n -e 's/\\([0-9]\\{1,\\}\\(\\\\.[0-9]\\{1,\\}\\)\\{1,2\\}\\).*/\\1/p'`\nVER1=`echo ${VER}|sed -n -e 's/\\([0-9]\\{1,\\}\\)\\\\..*/\\1/p'`\n\n# establish commands for library building\nif \"${CROSS_PREFIX}ar\" --version >/dev/null 2>/dev/null || test $? -lt 126; then\n    AR=${AR-\"${CROSS_PREFIX}ar\"}\n    test -n \"${CROSS_PREFIX}\" && echo Using ${AR} | tee -a configure.log\nelse\n    AR=${AR-\"ar\"}\n    test -n \"${CROSS_PREFIX}\" && echo Using ${AR} | tee -a configure.log\nfi\nARFLAGS=${ARFLAGS-\"rc\"}\nif \"${CROSS_PREFIX}ranlib\" --version >/dev/null 2>/dev/null || test $? -lt 126; then\n    RANLIB=${RANLIB-\"${CROSS_PREFIX}ranlib\"}\n    test -n \"${CROSS_PREFIX}\" && echo Using ${RANLIB} | tee -a configure.log\nelse\n    RANLIB=${RANLIB-\"ranlib\"}\nfi\nif \"${CROSS_PREFIX}nm\" --version >/dev/null 2>/dev/null || test $? -lt 126; then\n    NM=${NM-\"${CROSS_PREFIX}nm\"}\n    test -n \"${CROSS_PREFIX}\" && echo Using ${NM} | tee -a configure.log\nelse\n    NM=${NM-\"nm\"}\nfi\n\n# set defaults before processing command line options\nLDCONFIG=${LDCONFIG-\"ldconfig\"}\nLDSHAREDLIBC=\"${LDSHAREDLIBC--lc}\"\nARCHS=\nprefix=${prefix-/usr/local}\nexec_prefix=${exec_prefix-'${prefix}'}\nlibdir=${libdir-'${exec_prefix}/lib'}\nsharedlibdir=${sharedlibdir-'${libdir}'}\nincludedir=${includedir-'${prefix}/include'}\nmandir=${mandir-'${prefix}/share/man'}\nshared_ext='.so'\nshared=1\nsolo=0\ncover=0\nzprefix=0\nzconst=0\nbuild64=0\ngcc=0\nwarn=0\ndebug=0\naddress=0\nmemory=0\nold_cc=\"$CC\"\nold_cflags=\"$CFLAGS\"\nOBJC='$(OBJZ) $(OBJG)'\nPIC_OBJC='$(PIC_OBJZ) $(PIC_OBJG)'\n\n# leave this script, optionally in a bad way\nleave()\n{\n  if test \"$*\" != \"0\"; then\n    echo \"** $0 aborting.\" | tee -a configure.log\n  fi\n  rm -rf $test.[co] $test $test$shared_ext $test.gcno $test.dSYM ./--version\n  echo -------------------- >> configure.log\n  echo >> configure.log\n  echo >> configure.log\n  exit $1\n}\n\n# process command line options\nwhile test $# -ge 1\ndo\ncase \"$1\" in\n    -h* | --help)\n      echo 'usage:' | tee -a configure.log\n      echo '  configure [--const] [--zprefix] [--prefix=PREFIX]  [--eprefix=EXPREFIX]' | tee -a configure.log\n      echo '    [--static] [--64] [--libdir=LIBDIR] [--sharedlibdir=LIBDIR]' | tee -a configure.log\n      echo '    [--includedir=INCLUDEDIR] [--archs=\"-arch i386 -arch x86_64\"]' | tee -a configure.log\n        exit 0 ;;\n    -p*=* | --prefix=*) prefix=`echo $1 | sed 's/.*=//'`; shift ;;\n    -e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/.*=//'`; shift ;;\n    -l*=* | --libdir=*) libdir=`echo $1 | sed 's/.*=//'`; shift ;;\n    --sharedlibdir=*) sharedlibdir=`echo $1 | sed 's/.*=//'`; shift ;;\n    -i*=* | --includedir=*) includedir=`echo $1 | sed 's/.*=//'`;shift ;;\n    -u*=* | --uname=*) uname=`echo $1 | sed 's/.*=//'`;shift ;;\n    -p* | --prefix) prefix=\"$2\"; shift; shift ;;\n    -e* | --eprefix) exec_prefix=\"$2\"; shift; shift ;;\n    -l* | --libdir) libdir=\"$2\"; shift; shift ;;\n    -i* | --includedir) includedir=\"$2\"; shift; shift ;;\n    -s* | --shared | --enable-shared) shared=1; shift ;;\n    -t | --static) shared=0; shift ;;\n    --solo) solo=1; shift ;;\n    --cover) cover=1; shift ;;\n    -z* | --zprefix) zprefix=1; shift ;;\n    -6* | --64) build64=1; shift ;;\n    -a*=* | --archs=*) ARCHS=`echo $1 | sed 's/.*=//'`; shift ;;\n    --sysconfdir=*) echo \"ignored option: --sysconfdir\" | tee -a configure.log; shift ;;\n    --localstatedir=*) echo \"ignored option: --localstatedir\" | tee -a configure.log; shift ;;\n    -c* | --const) zconst=1; shift ;;\n    -w* | --warn) warn=1; shift ;;\n    -d* | --debug) debug=1; shift ;;\n    --sanitize) address=1; shift ;;\n    --address) address=1; shift ;;\n    --memory) memory=1; shift ;;\n    *)\n      echo \"unknown option: $1\" | tee -a configure.log\n      echo \"$0 --help for help\" | tee -a configure.log\n      leave 1;;\n    esac\ndone\n\n# temporary file name\ntest=ztest$$\n\n# put arguments in log, also put test file in log if used in arguments\nshow()\n{\n  case \"$*\" in\n    *$test.c*)\n      echo === $test.c === >> configure.log\n      cat $test.c >> configure.log\n      echo === >> configure.log;;\n  esac\n  echo $* >> configure.log\n}\n\n# check for gcc vs. cc and set compile and link flags based on the system identified by uname\ncat > $test.c <<EOF\nextern int getchar();\nint hello() {return getchar();}\nEOF\n\nif test -z \"$CC\"; then\n  echo Checking for ${CROSS_PREFIX}gcc... | tee -a configure.log\n  if ${CROSS_PREFIX}gcc -v >/dev/null 2>&1; then\n    cc=${CROSS_PREFIX}gcc\n  else\n    cc=${CROSS_PREFIX}cc\n  fi\nelse\n  cc=${CC}\nfi\n\ncase \"$cc\" in\n  *gcc*) gcc=1 ;;\n  *clang*) gcc=1 ;;\nesac\ncase `$cc -v 2>&1` in\n  *gcc*) gcc=1 ;;\n  *clang*) gcc=1 ;;\nesac\n\nshow $cc -c $test.c\nif test \"$gcc\" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then\n  echo ... using gcc >> configure.log\n  CC=\"$cc\"\n  CFLAGS=\"${CFLAGS--O3}\"\n  SFLAGS=\"${CFLAGS--O3} -fPIC\"\n  if test \"$ARCHS\"; then\n    CFLAGS=\"${CFLAGS} ${ARCHS}\"\n    LDFLAGS=\"${LDFLAGS} ${ARCHS}\"\n  fi\n  if test $build64 -eq 1; then\n    CFLAGS=\"${CFLAGS} -m64\"\n    SFLAGS=\"${SFLAGS} -m64\"\n  fi\n  if test \"$warn\" -eq 1; then\n    if test \"$zconst\" -eq 1; then\n      CFLAGS=\"${CFLAGS} -Wall -Wextra -Wcast-qual -DZLIB_CONST\"\n    else\n      CFLAGS=\"${CFLAGS} -Wall -Wextra\"\n    fi\n  fi\n  if test $address -eq 1; then\n    CFLAGS=\"${CFLAGS} -g -fsanitize=address -fno-omit-frame-pointer\"\n  fi\n  if test $memory -eq 1; then\n    CFLAGS=\"${CFLAGS} -g -fsanitize=memory -fno-omit-frame-pointer\"\n  fi\n  if test $debug -eq 1; then\n    CFLAGS=\"${CFLAGS} -DZLIB_DEBUG\"\n    SFLAGS=\"${SFLAGS} -DZLIB_DEBUG\"\n  fi\n  if test -z \"$uname\"; then\n    uname=`(uname -s || echo unknown) 2>/dev/null`\n  fi\n  case \"$uname\" in\n  Linux* | linux* | *-linux* | GNU | GNU/* | solaris*)\n        case \"$mname\" in\n        *sparc*)\n            LDFLAGS=\"${LDFLAGS} -Wl,--no-warn-rwx-segments\" ;;\n        esac\n        LDSHARED=${LDSHARED-\"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map\"} ;;\n  *BSD | *bsd* | DragonFly)\n        LDSHARED=${LDSHARED-\"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map\"}\n        LDCONFIG=\"ldconfig -m\" ;;\n  CYGWIN* | Cygwin* | cygwin* | *-cygwin* | OS/2*)\n        EXE='.exe' ;;\n  MINGW* | mingw* | *-mingw*)\n        rm -f $test.[co] $test $test$shared_ext\n        echo \"If this doesn't work for you, try win32/Makefile.gcc.\" | tee -a configure.log\n        LDSHARED=${LDSHARED-\"$cc -shared\"}\n        LDSHAREDLIBC=\"\"\n        EXE='.exe' ;;\n  QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4\n        # (alain.bonnefoy@icbt.com)\n        LDSHARED=${LDSHARED-\"$cc -shared -Wl,-hlibz.so.1\"} ;;\n  HP-UX*)\n        LDSHARED=${LDSHARED-\"$cc -shared $SFLAGS\"}\n        case `(uname -m || echo unknown) 2>/dev/null` in\n        ia64)\n            shared_ext='.so'\n            SHAREDLIB='libz.so' ;;\n        *)\n            shared_ext='.sl'\n            SHAREDLIB='libz.sl' ;;\n        esac ;;\n  AIX*)\n        LDFLAGS=\"${LDFLAGS} -Wl,-brtl\" ;;\n  Darwin* | darwin* | *-darwin*)\n        shared_ext='.dylib'\n        SHAREDLIB=libz$shared_ext\n        SHAREDLIBV=libz.$VER$shared_ext\n        SHAREDLIBM=libz.$VER1$shared_ext\n        LDSHARED=${LDSHARED-\"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3\"}\n        if \"${CROSS_PREFIX}libtool\" -V 2>&1 | grep Apple > /dev/null; then\n            AR=\"${CROSS_PREFIX}libtool\"\n        elif libtool -V 2>&1 | grep Apple > /dev/null; then\n            AR=\"libtool\"\n        else\n            AR=\"/usr/bin/libtool\"\n        fi\n        ARFLAGS=\"-o\" ;;\n  *)\n        LDSHARED=${LDSHARED-\"$cc -shared\"} ;;\n  esac\nelse\n  # find system name and corresponding cc options\n  CC=${CC-cc}\n  gcc=0\n  echo ... using $CC >> configure.log\n  if test -z \"$uname\"; then\n    uname=`(uname -sr || echo unknown) 2>/dev/null`\n  fi\n  case \"$uname\" in\n  HP-UX*)    SFLAGS=${CFLAGS-\"-O +z\"}\n             CFLAGS=${CFLAGS-\"-O\"}\n#            LDSHARED=${LDSHARED-\"ld -b +vnocompatwarnings\"}\n             LDSHARED=${LDSHARED-\"ld -b\"}\n         case `(uname -m || echo unknown) 2>/dev/null` in\n         ia64)\n             shared_ext='.so'\n             SHAREDLIB='libz.so' ;;\n         *)\n             shared_ext='.sl'\n             SHAREDLIB='libz.sl' ;;\n         esac ;;\n  IRIX*)     SFLAGS=${CFLAGS-\"-ansi -O2 -rpath .\"}\n             CFLAGS=${CFLAGS-\"-ansi -O2\"}\n             LDSHARED=${LDSHARED-\"cc -shared -Wl,-soname,libz.so.1\"} ;;\n  OSF1\\ V4*) SFLAGS=${CFLAGS-\"-O -std1\"}\n             CFLAGS=${CFLAGS-\"-O -std1\"}\n             LDFLAGS=\"${LDFLAGS} -Wl,-rpath,.\"\n             LDSHARED=${LDSHARED-\"cc -shared  -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0\"} ;;\n  OSF1*)     SFLAGS=${CFLAGS-\"-O -std1\"}\n             CFLAGS=${CFLAGS-\"-O -std1\"}\n             LDSHARED=${LDSHARED-\"cc -shared -Wl,-soname,libz.so.1\"} ;;\n  QNX*)      SFLAGS=${CFLAGS-\"-4 -O\"}\n             CFLAGS=${CFLAGS-\"-4 -O\"}\n             LDSHARED=${LDSHARED-\"cc\"}\n             RANLIB=${RANLIB-\"true\"}\n             AR=\"cc\"\n             ARFLAGS=\"-A\" ;;\n  SCO_SV\\ 3.2*) SFLAGS=${CFLAGS-\"-O3 -dy -KPIC \"}\n             CFLAGS=${CFLAGS-\"-O3\"}\n             LDSHARED=${LDSHARED-\"cc -dy -KPIC -G\"} ;;\n  SunOS\\ 5* | solaris*)\n         LDSHARED=${LDSHARED-\"cc -G -h libz$shared_ext.$VER1\"}\n         SFLAGS=${CFLAGS-\"-fast -KPIC\"}\n         CFLAGS=${CFLAGS-\"-fast\"}\n         if test $build64 -eq 1; then\n             # old versions of SunPRO/Workshop/Studio don't support -m64,\n             # but newer ones do.  Check for it.\n             flag64=`$CC -flags | egrep -- '^-m64'`\n             if test x\"$flag64\" != x\"\" ; then\n                 CFLAGS=\"${CFLAGS} -m64\"\n                 SFLAGS=\"${SFLAGS} -m64\"\n             else\n                 case `(uname -m || echo unknown) 2>/dev/null` in\n                   i86*)\n                     SFLAGS=\"$SFLAGS -xarch=amd64\"\n                     CFLAGS=\"$CFLAGS -xarch=amd64\" ;;\n                   *)\n                     SFLAGS=\"$SFLAGS -xarch=v9\"\n                     CFLAGS=\"$CFLAGS -xarch=v9\" ;;\n                 esac\n             fi\n         fi\n         if test -n \"$ZINC\"; then\n             ZINC='-I- -I. -I$(SRCDIR)'\n         fi\n         ;;\n  SunOS\\ 4*) SFLAGS=${CFLAGS-\"-O2 -PIC\"}\n             CFLAGS=${CFLAGS-\"-O2\"}\n             LDSHARED=${LDSHARED-\"ld\"} ;;\n  SunStudio\\ 9*) SFLAGS=${CFLAGS-\"-fast -xcode=pic32 -xtarget=ultra3 -xarch=v9b\"}\n             CFLAGS=${CFLAGS-\"-fast -xtarget=ultra3 -xarch=v9b\"}\n             LDSHARED=${LDSHARED-\"cc -xarch=v9b\"} ;;\n  UNIX_System_V\\ 4.2.0)\n             SFLAGS=${CFLAGS-\"-KPIC -O\"}\n             CFLAGS=${CFLAGS-\"-O\"}\n             LDSHARED=${LDSHARED-\"cc -G\"} ;;\n  UNIX_SV\\ 4.2MP)\n             SFLAGS=${CFLAGS-\"-Kconform_pic -O\"}\n             CFLAGS=${CFLAGS-\"-O\"}\n             LDSHARED=${LDSHARED-\"cc -G\"} ;;\n  OpenUNIX\\ 5)\n             SFLAGS=${CFLAGS-\"-KPIC -O\"}\n             CFLAGS=${CFLAGS-\"-O\"}\n             LDSHARED=${LDSHARED-\"cc -G\"} ;;\n  AIX*)  # Courtesy of dbakker@arrayasolutions.com\n             SFLAGS=${CFLAGS-\"-O -qmaxmem=8192\"}\n             CFLAGS=${CFLAGS-\"-O -qmaxmem=8192\"}\n             LDSHARED=${LDSHARED-\"xlc -G\"} ;;\n  # send working options for other systems to zlib@gzip.org\n  *)         SFLAGS=${CFLAGS-\"-O\"}\n             CFLAGS=${CFLAGS-\"-O\"}\n             LDSHARED=${LDSHARED-\"cc -shared\"} ;;\n  esac\nfi\n\n# destination names for shared library if not defined above\nSHAREDLIB=${SHAREDLIB-\"libz$shared_ext\"}\nSHAREDLIBV=${SHAREDLIBV-\"libz$shared_ext.$VER\"}\nSHAREDLIBM=${SHAREDLIBM-\"libz$shared_ext.$VER1\"}\n\necho >> configure.log\n\n# define functions for testing compiler and library characteristics and logging the results\n\ncat > $test.c <<EOF\n#error error\nEOF\nif ($CC -c $CFLAGS $test.c) 2>/dev/null; then\n  try()\n  {\n    show $*\n    test \"`( $* ) 2>&1 | tee -a configure.log`\" = \"\"\n  }\n  echo - using any output from compiler to indicate an error >> configure.log\nelse\n  try()\n  {\n    show $*\n    got=`( $* ) 2>&1`\n    ret=$?\n    if test \"$got\" != \"\"; then\n      printf \"%s\\n\" \"$got\" >> configure.log\n    fi\n    if test $ret -ne 0; then\n      echo \"(exit code \"$ret\")\" >> configure.log\n    fi\n    return $ret\n  }\nfi\n\ntryboth()\n{\n  show $*\n  got=`( $* ) 2>&1`\n  ret=$?\n  if test \"$got\" != \"\"; then\n    printf \"%s\\n\" \"$got\" >> configure.log\n  fi\n  if test $ret -ne 0; then\n    echo \"(exit code \"$ret\")\" >> configure.log\n    return $ret\n  fi\n  test \"$got\" = \"\"\n}\n\ncat > $test.c << EOF\nint foo() { return 0; }\nEOF\necho \"Checking for obsessive-compulsive compiler options...\" >> configure.log\nif try $CC -c $CFLAGS $test.c; then\n  :\nelse\n  echo \"Compiler error reporting is too harsh for $0 (perhaps remove -Werror).\" | tee -a configure.log\n  leave 1\nfi\n\necho >> configure.log\n\n# see if shared library build supported\ncat > $test.c <<EOF\nextern int getchar();\nint hello() {return getchar();}\nEOF\nif test $shared -eq 1; then\n  echo Checking for shared library support... | tee -a configure.log\n  # we must test in two steps (cc then ld), required at least on SunOS 4.x\n  if try $CC -c $SFLAGS $test.c &&\n     try $LDSHARED $SFLAGS -o $test$shared_ext $test.o; then\n    echo Building shared library $SHAREDLIBV with $CC. | tee -a configure.log\n  elif test -z \"$old_cc\" -a -z \"$old_cflags\"; then\n    echo No shared library support. | tee -a configure.log\n    shared=0;\n  else\n    echo 'No shared library support; try without defining CC and CFLAGS' | tee -a configure.log\n    shared=0;\n  fi\nfi\nif test $shared -eq 0; then\n  LDSHARED=\"$CC\"\n  ALL=\"static\"\n  TEST=\"all teststatic\"\n  SHAREDLIB=\"\"\n  SHAREDLIBV=\"\"\n  SHAREDLIBM=\"\"\n  echo Building static library $STATICLIB version $VER with $CC. | tee -a configure.log\nelse\n  ALL=\"static shared\"\n  TEST=\"all teststatic testshared\"\nfi\n\necho >> configure.log\n\n# check for size_t\ncat > $test.c <<EOF\n#include <stdio.h>\n#include <stdlib.h>\nsize_t dummy = 0;\nEOF\nif try $CC -c $CFLAGS $test.c; then\n  echo \"Checking for size_t... Yes.\" | tee -a configure.log\nelse\n  echo \"Checking for size_t... No.\" | tee -a configure.log\n  # find a size_t integer type\n  # check for long long\n  cat > $test.c << EOF\nlong long dummy = 0;\nEOF\n  if try $CC -c $CFLAGS $test.c; then\n    echo \"Checking for long long... Yes.\" | tee -a configure.log\n    cat > $test.c <<EOF\n#include <stdio.h>\nint main(void) {\n    if (sizeof(void *) <= sizeof(int)) puts(\"int\");\n    else if (sizeof(void *) <= sizeof(long)) puts(\"long\");\n    else puts(\"z_longlong\");\n    return 0;\n}\nEOF\n  else\n    echo \"Checking for long long... No.\" | tee -a configure.log\n    cat > $test.c <<EOF\n#include <stdio.h>\nint main(void) {\n    if (sizeof(void *) <= sizeof(int)) puts(\"int\");\n    else puts(\"long\");\n    return 0;\n}\nEOF\n  fi\n  if try $CC $CFLAGS -o $test $test.c; then\n    sizet=`./$test`\n    echo \"Checking for a pointer-size integer type...\" $sizet\".\" | tee -a configure.log\n    CFLAGS=\"${CFLAGS} -DNO_SIZE_T=${sizet}\"\n    SFLAGS=\"${SFLAGS} -DNO_SIZE_T=${sizet}\"\n  else\n    echo \"Checking for a pointer-size integer type... not found.\" | tee -a configure.log\n  fi\nfi\n\necho >> configure.log\n\n# check for large file support, and if none, check for fseeko()\ncat > $test.c <<EOF\n#include <sys/types.h>\noff64_t dummy = 0;\nEOF\nif try $CC -c $CFLAGS -D_LARGEFILE64_SOURCE=1 $test.c; then\n  CFLAGS=\"${CFLAGS} -D_LARGEFILE64_SOURCE=1\"\n  SFLAGS=\"${SFLAGS} -D_LARGEFILE64_SOURCE=1\"\n  ALL=\"${ALL} all64\"\n  TEST=\"${TEST} test64\"\n  echo \"Checking for off64_t... Yes.\" | tee -a configure.log\n  echo \"Checking for fseeko... Yes.\" | tee -a configure.log\nelse\n  echo \"Checking for off64_t... No.\" | tee -a configure.log\n  echo >> configure.log\n  cat > $test.c <<EOF\n#include <stdio.h>\nint main(void) {\n  fseeko(NULL, 0, 0);\n  return 0;\n}\nEOF\n  if try $CC $CFLAGS -o $test $test.c; then\n    echo \"Checking for fseeko... Yes.\" | tee -a configure.log\n  else\n    CFLAGS=\"${CFLAGS} -DNO_FSEEKO\"\n    SFLAGS=\"${SFLAGS} -DNO_FSEEKO\"\n    echo \"Checking for fseeko... No.\" | tee -a configure.log\n  fi\nfi\n\necho >> configure.log\n\n# check for strerror() for use by gz* functions\ncat > $test.c <<EOF\n#include <string.h>\n#include <errno.h>\nint main() { return strlen(strerror(errno)); }\nEOF\nif try $CC $CFLAGS -o $test $test.c; then\n  echo \"Checking for strerror... Yes.\" | tee -a configure.log\nelse\n  CFLAGS=\"${CFLAGS} -DNO_STRERROR\"\n  SFLAGS=\"${SFLAGS} -DNO_STRERROR\"\n  echo \"Checking for strerror... No.\" | tee -a configure.log\nfi\n\n# copy clean zconf.h for subsequent edits\ncp -p ${SRCDIR}zconf.h.in zconf.h\n\necho >> configure.log\n\n# check for unistd.h and save result in zconf.h\ncat > $test.c <<EOF\n#include <unistd.h>\nint main() { return 0; }\nEOF\nif try $CC -c $CFLAGS $test.c; then\n  sed < zconf.h \"/^#ifdef HAVE_UNISTD_H.* may be/s/def HAVE_UNISTD_H\\(.*\\) may be/ 1\\1 was/\" > zconf.temp.h\n  mv zconf.temp.h zconf.h\n  echo \"Checking for unistd.h... Yes.\" | tee -a configure.log\nelse\n  echo \"Checking for unistd.h... No.\" | tee -a configure.log\nfi\n\necho >> configure.log\n\n# check for stdarg.h and save result in zconf.h\ncat > $test.c <<EOF\n#include <stdarg.h>\nint main() { return 0; }\nEOF\nif try $CC -c $CFLAGS $test.c; then\n  sed < zconf.h \"/^#ifdef HAVE_STDARG_H.* may be/s/def HAVE_STDARG_H\\(.*\\) may be/ 1\\1 was/\" > zconf.temp.h\n  mv zconf.temp.h zconf.h\n  echo \"Checking for stdarg.h... Yes.\" | tee -a configure.log\nelse\n  echo \"Checking for stdarg.h... No.\" | tee -a configure.log\nfi\n\n# if the z_ prefix was requested, save that in zconf.h\nif test $zprefix -eq 1; then\n  sed < zconf.h \"/#ifdef Z_PREFIX.* may be/s/def Z_PREFIX\\(.*\\) may be/ 1\\1 was/\" > zconf.temp.h\n  mv zconf.temp.h zconf.h\n  echo >> configure.log\n  echo \"Using z_ prefix on all symbols.\" | tee -a configure.log\nfi\n\n# if --solo compilation was requested, save that in zconf.h and remove gz stuff from object lists\nif test $solo -eq 1; then\n  sed '/#define ZCONF_H/a\\\n#define Z_SOLO\n\n' < zconf.h > zconf.temp.h\n  mv zconf.temp.h zconf.h\nOBJC='$(OBJZ)'\nPIC_OBJC='$(PIC_OBJZ)'\nfi\n\n# if code coverage testing was requested, use older gcc if defined, e.g. \"gcc-4.2\" on Mac OS X\nif test $cover -eq 1; then\n  CFLAGS=\"${CFLAGS} -fprofile-arcs -ftest-coverage\"\n  if test -n \"$GCC_CLASSIC\"; then\n    CC=$GCC_CLASSIC\n  fi\nfi\n\necho >> configure.log\n\n# conduct a series of tests to resolve eight possible cases of using \"vs\" or \"s\" printf functions\n# (using stdarg or not), with or without \"n\" (proving size of buffer), and with or without a\n# return value.  The most secure result is vsnprintf() with a return value.  snprintf() with a\n# return value is secure as well, but then gzprintf() will be limited to 20 arguments.\ncat > $test.c <<EOF\n#include <stdio.h>\n#include <stdarg.h>\n#include \"zconf.h\"\nint main()\n{\n#ifndef STDC\n  choke me\n#endif\n  return 0;\n}\nEOF\nif try $CC -c $CFLAGS $test.c; then\n  echo \"Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().\" | tee -a configure.log\n\n  echo >> configure.log\n  cat > $test.c <<EOF\n#include <stdio.h>\n#include <stdarg.h>\nint mytest(const char *fmt, ...)\n{\n  char buf[20];\n  va_list ap;\n  va_start(ap, fmt);\n  vsnprintf(buf, sizeof(buf), fmt, ap);\n  va_end(ap);\n  return 0;\n}\nint main()\n{\n  return (mytest(\"Hello%d\\n\", 1));\n}\nEOF\n  if try $CC $CFLAGS -o $test $test.c; then\n    echo \"Checking for vsnprintf() in stdio.h... Yes.\" | tee -a configure.log\n\n    echo >> configure.log\n    cat >$test.c <<EOF\n#include <stdio.h>\n#include <stdarg.h>\nint mytest(const char *fmt, ...)\n{\n  int n;\n  char buf[20];\n  va_list ap;\n  va_start(ap, fmt);\n  n = vsnprintf(buf, sizeof(buf), fmt, ap);\n  va_end(ap);\n  return n;\n}\nint main()\n{\n  return (mytest(\"Hello%d\\n\", 1));\n}\nEOF\n\n    if try $CC -c $CFLAGS $test.c; then\n      echo \"Checking for return value of vsnprintf()... Yes.\" | tee -a configure.log\n    else\n      CFLAGS=\"$CFLAGS -DHAS_vsnprintf_void\"\n      SFLAGS=\"$SFLAGS -DHAS_vsnprintf_void\"\n      echo \"Checking for return value of vsnprintf()... No.\" | tee -a configure.log\n      echo \"  WARNING: apparently vsnprintf() does not return a value. zlib\" | tee -a configure.log\n      echo \"  can build but will be open to possible string-format security\" | tee -a configure.log\n      echo \"  vulnerabilities.\" | tee -a configure.log\n    fi\n  else\n    CFLAGS=\"$CFLAGS -DNO_vsnprintf\"\n    SFLAGS=\"$SFLAGS -DNO_vsnprintf\"\n    echo \"Checking for vsnprintf() in stdio.h... No.\" | tee -a configure.log\n    echo \"  WARNING: vsnprintf() not found, falling back to vsprintf(). zlib\" | tee -a configure.log\n    echo \"  can build but will be open to possible buffer-overflow security\" | tee -a configure.log\n    echo \"  vulnerabilities.\" | tee -a configure.log\n\n    echo >> configure.log\n    cat >$test.c <<EOF\n#include <stdio.h>\n#include <stdarg.h>\nint mytest(const char *fmt, ...)\n{\n  int n;\n  char buf[20];\n  va_list ap;\n  va_start(ap, fmt);\n  n = vsprintf(buf, fmt, ap);\n  va_end(ap);\n  return n;\n}\nint main()\n{\n  return (mytest(\"Hello%d\\n\", 1));\n}\nEOF\n\n    if try $CC -c $CFLAGS $test.c; then\n      echo \"Checking for return value of vsprintf()... Yes.\" | tee -a configure.log\n    else\n      CFLAGS=\"$CFLAGS -DHAS_vsprintf_void\"\n      SFLAGS=\"$SFLAGS -DHAS_vsprintf_void\"\n      echo \"Checking for return value of vsprintf()... No.\" | tee -a configure.log\n      echo \"  WARNING: apparently vsprintf() does not return a value. zlib\" | tee -a configure.log\n      echo \"  can build but will be open to possible string-format security\" | tee -a configure.log\n      echo \"  vulnerabilities.\" | tee -a configure.log\n    fi\n  fi\nelse\n  echo \"Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf().\" | tee -a configure.log\n\n  echo >> configure.log\n  cat >$test.c <<EOF\n#include <stdio.h>\nint mytest()\n{\n  char buf[20];\n  snprintf(buf, sizeof(buf), \"%s\", \"foo\");\n  return 0;\n}\nint main()\n{\n  return (mytest());\n}\nEOF\n\n  if try $CC $CFLAGS -o $test $test.c; then\n    echo \"Checking for snprintf() in stdio.h... Yes.\" | tee -a configure.log\n\n    echo >> configure.log\n    cat >$test.c <<EOF\n#include <stdio.h>\nint mytest()\n{\n  char buf[20];\n  return snprintf(buf, sizeof(buf), \"%s\", \"foo\");\n}\nint main()\n{\n  return (mytest());\n}\nEOF\n\n    if try $CC -c $CFLAGS $test.c; then\n      echo \"Checking for return value of snprintf()... Yes.\" | tee -a configure.log\n    else\n      CFLAGS=\"$CFLAGS -DHAS_snprintf_void\"\n      SFLAGS=\"$SFLAGS -DHAS_snprintf_void\"\n      echo \"Checking for return value of snprintf()... No.\" | tee -a configure.log\n      echo \"  WARNING: apparently snprintf() does not return a value. zlib\" | tee -a configure.log\n      echo \"  can build but will be open to possible string-format security\" | tee -a configure.log\n      echo \"  vulnerabilities.\" | tee -a configure.log\n    fi\n  else\n    CFLAGS=\"$CFLAGS -DNO_snprintf\"\n    SFLAGS=\"$SFLAGS -DNO_snprintf\"\n    echo \"Checking for snprintf() in stdio.h... No.\" | tee -a configure.log\n    echo \"  WARNING: snprintf() not found, falling back to sprintf(). zlib\" | tee -a configure.log\n    echo \"  can build but will be open to possible buffer-overflow security\" | tee -a configure.log\n    echo \"  vulnerabilities.\" | tee -a configure.log\n\n    echo >> configure.log\n    cat >$test.c <<EOF\n#include <stdio.h>\nint mytest()\n{\n  char buf[20];\n  return sprintf(buf, \"%s\", \"foo\");\n}\nint main()\n{\n  return (mytest());\n}\nEOF\n\n    if try $CC -c $CFLAGS $test.c; then\n      echo \"Checking for return value of sprintf()... Yes.\" | tee -a configure.log\n    else\n      CFLAGS=\"$CFLAGS -DHAS_sprintf_void\"\n      SFLAGS=\"$SFLAGS -DHAS_sprintf_void\"\n      echo \"Checking for return value of sprintf()... No.\" | tee -a configure.log\n      echo \"  WARNING: apparently sprintf() does not return a value. zlib\" | tee -a configure.log\n      echo \"  can build but will be open to possible string-format security\" | tee -a configure.log\n      echo \"  vulnerabilities.\" | tee -a configure.log\n    fi\n  fi\nfi\n\n# see if we can hide zlib internal symbols that are linked between separate source files\nif test \"$gcc\" -eq 1; then\n  echo >> configure.log\n  cat > $test.c <<EOF\n#define ZLIB_INTERNAL __attribute__((visibility (\"hidden\")))\nint ZLIB_INTERNAL foo;\nint main()\n{\n  return 0;\n}\nEOF\n  if tryboth $CC -c $CFLAGS $test.c; then\n    CFLAGS=\"$CFLAGS -DHAVE_HIDDEN\"\n    SFLAGS=\"$SFLAGS -DHAVE_HIDDEN\"\n    echo \"Checking for attribute(visibility) support... Yes.\" | tee -a configure.log\n  else\n    echo \"Checking for attribute(visibility) support... No.\" | tee -a configure.log\n  fi\nfi\n\n# show the results in the log\necho >> configure.log\necho ALL = $ALL >> configure.log\necho AR = $AR >> configure.log\necho ARFLAGS = $ARFLAGS >> configure.log\necho CC = $CC >> configure.log\necho CFLAGS = $CFLAGS >> configure.log\necho CPP = $CPP >> configure.log\necho EXE = $EXE >> configure.log\necho LDCONFIG = $LDCONFIG >> configure.log\necho LDFLAGS = $LDFLAGS >> configure.log\necho LDSHARED = $LDSHARED >> configure.log\necho LDSHAREDLIBC = $LDSHAREDLIBC >> configure.log\necho OBJC = $OBJC >> configure.log\necho PIC_OBJC = $PIC_OBJC >> configure.log\necho RANLIB = $RANLIB >> configure.log\necho SFLAGS = $SFLAGS >> configure.log\necho SHAREDLIB = $SHAREDLIB >> configure.log\necho SHAREDLIBM = $SHAREDLIBM >> configure.log\necho SHAREDLIBV = $SHAREDLIBV >> configure.log\necho STATICLIB = $STATICLIB >> configure.log\necho TEST = $TEST >> configure.log\necho VER = $VER >> configure.log\necho SRCDIR = $SRCDIR >> configure.log\necho exec_prefix = $exec_prefix >> configure.log\necho includedir = $includedir >> configure.log\necho libdir = $libdir >> configure.log\necho mandir = $mandir >> configure.log\necho prefix = $prefix >> configure.log\necho sharedlibdir = $sharedlibdir >> configure.log\necho uname = $uname >> configure.log\n\n# update Makefile with the configure results\nsed < ${SRCDIR}Makefile.in \"\n/^CC *=/s#=.*#=$CC#\n/^CFLAGS *=/s#=.*#=$CFLAGS#\n/^SFLAGS *=/s#=.*#=$SFLAGS#\n/^LDFLAGS *=/s#=.*#=$LDFLAGS#\n/^LDSHARED *=/s#=.*#=$LDSHARED#\n/^CPP *=/s#=.*#=$CPP#\n/^STATICLIB *=/s#=.*#=$STATICLIB#\n/^SHAREDLIB *=/s#=.*#=$SHAREDLIB#\n/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV#\n/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#\n/^AR *=/s#=.*#=$AR#\n/^ARFLAGS *=/s#=.*#=$ARFLAGS#\n/^RANLIB *=/s#=.*#=$RANLIB#\n/^LDCONFIG *=/s#=.*#=$LDCONFIG#\n/^LDSHAREDLIBC *=/s#=.*#=$LDSHAREDLIBC#\n/^EXE *=/s#=.*#=$EXE#\n/^SRCDIR *=/s#=.*#=$SRCDIR#\n/^ZINC *=/s#=.*#=$ZINC#\n/^ZINCOUT *=/s#=.*#=$ZINCOUT#\n/^prefix *=/s#=.*#=$prefix#\n/^exec_prefix *=/s#=.*#=$exec_prefix#\n/^libdir *=/s#=.*#=$libdir#\n/^sharedlibdir *=/s#=.*#=$sharedlibdir#\n/^includedir *=/s#=.*#=$includedir#\n/^mandir *=/s#=.*#=$mandir#\n/^OBJC *=/s#=.*#= $OBJC#\n/^PIC_OBJC *=/s#=.*#= $PIC_OBJC#\n/^all: */s#:.*#: $ALL#\n/^test: */s#:.*#: $TEST#\n\" > Makefile\n\n# create zlib.pc with the configure results\nsed < ${SRCDIR}zlib.pc.in \"\n/^CC *=/s#=.*#=$CC#\n/^CFLAGS *=/s#=.*#=$CFLAGS#\n/^CPP *=/s#=.*#=$CPP#\n/^LDSHARED *=/s#=.*#=$LDSHARED#\n/^STATICLIB *=/s#=.*#=$STATICLIB#\n/^SHAREDLIB *=/s#=.*#=$SHAREDLIB#\n/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV#\n/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#\n/^AR *=/s#=.*#=$AR#\n/^ARFLAGS *=/s#=.*#=$ARFLAGS#\n/^RANLIB *=/s#=.*#=$RANLIB#\n/^EXE *=/s#=.*#=$EXE#\n/^prefix *=/s#=.*#=$prefix#\n/^exec_prefix *=/s#=.*#=$exec_prefix#\n/^libdir *=/s#=.*#=$libdir#\n/^sharedlibdir *=/s#=.*#=$sharedlibdir#\n/^includedir *=/s#=.*#=$includedir#\n/^mandir *=/s#=.*#=$mandir#\n/^LDFLAGS *=/s#=.*#=$LDFLAGS#\n\" | sed -e \"\ns/\\@VERSION\\@/$VER/g;\n\" > zlib.pc\n\n# done\nleave 0\n"
  },
  {
    "path": "third-party/zlib/contrib/README.contrib",
    "content": "All files under this contrib directory are UNSUPPORTED. They were\nprovided by users of zlib and were not tested by the authors of zlib.\nUse at your own risk. Please contact the authors of the contributions\nfor help about these, not the zlib authors. Thanks.\n\n\nada/        by Dmitriy Anisimkov <anisimkov@yahoo.com>\n        Support for Ada\n        See http://zlib-ada.sourceforge.net/\n\nblast/      by Mark Adler <madler@alumni.caltech.edu>\n        Decompressor for output of PKWare Data Compression Library (DCL)\n\ndelphi/     by Cosmin Truta <cosmint@cs.ubbcluj.ro>\n        Support for Delphi and C++ Builder\n\ndotzlib/    by Henrik Ravn <henrik@ravn.com>\n        Support for Microsoft .Net and Visual C++ .Net\n\ngcc_gvmat64/by Gilles Vollant <info@winimage.com>\n        GCC Version of x86 64-bit (AMD64 and Intel EM64t) code for x64\n        assembler to replace longest_match() and inflate_fast()\n\ninfback9/   by Mark Adler <madler@alumni.caltech.edu>\n        Unsupported diffs to infback to decode the deflate64 format\n\niostream/   by Kevin Ruland <kevin@rodin.wustl.edu>\n        A C++ I/O streams interface to the zlib gz* functions\n\niostream2/  by Tyge Løvset <Tyge.Lovset@cmr.no>\n        Another C++ I/O streams interface\n\niostream3/  by Ludwig Schwardt <schwardt@sun.ac.za>\n            and Kevin Ruland <kevin@rodin.wustl.edu>\n        Yet another C++ I/O streams interface\n\nminizip/    by Gilles Vollant <info@winimage.com>\n        Mini zip and unzip based on zlib\n        Includes Zip64 support by Mathias Svensson <mathias@result42.com>\n        See http://www.winimage.com/zLibDll/minizip.html\n\npascal/     by Bob Dellaca <bobdl@xtra.co.nz> et al.\n        Support for Pascal\n\npuff/       by Mark Adler <madler@alumni.caltech.edu>\n        Small, low memory usage inflate.  Also serves to provide an\n        unambiguous description of the deflate format.\n\ntestzlib/   by Gilles Vollant <info@winimage.com>\n        Example of the use of zlib\n\nuntgz/      by Pedro A. Aranda Gutierrez <paag@tid.es>\n        A very simple tar.gz file extractor using zlib\n\nvstudio/    by Gilles Vollant <info@winimage.com>\n        Building a minizip-enhanced zlib with Microsoft Visual Studio\n        Includes vc11 from kreuzerkrieg and vc12 from davispuh\n"
  },
  {
    "path": "third-party/zlib/contrib/ada/buffer_demo.adb",
    "content": "----------------------------------------------------------------\n--  ZLib for Ada thick binding.                               --\n--                                                            --\n--  Copyright (C) 2002-2004 Dmitriy Anisimkov                 --\n--                                                            --\n--  Open source license information is in the zlib.ads file.  --\n----------------------------------------------------------------\n--\n--  $Id: buffer_demo.adb,v 1.3 2004/09/06 06:55:35 vagul Exp $\n\n--  This demo program provided by Dr Steve Sangwine <sjs@essex.ac.uk>\n--\n--  Demonstration of a problem with Zlib-Ada (already fixed) when a buffer\n--  of exactly the correct size is used for decompressed data, and the last\n--  few bytes passed in to Zlib are checksum bytes.\n\n--  This program compresses a string of text, and then decompresses the\n--  compressed text into a buffer of the same size as the original text.\n\nwith Ada.Streams; use Ada.Streams;\nwith Ada.Text_IO;\n\nwith ZLib; use ZLib;\n\nprocedure Buffer_Demo is\n   EOL  : Character renames ASCII.LF;\n   Text : constant String\n     := \"Four score and seven years ago our fathers brought forth,\" & EOL &\n        \"upon this continent, a new nation, conceived in liberty,\" & EOL &\n        \"and dedicated to the proposition that `all men are created equal'.\";\n\n   Source : Stream_Element_Array (1 .. Text'Length);\n   for Source'Address use Text'Address;\n\nbegin\n   Ada.Text_IO.Put (Text);\n   Ada.Text_IO.New_Line;\n   Ada.Text_IO.Put_Line\n     (\"Uncompressed size : \" & Positive'Image (Text'Length) & \" bytes\");\n\n   declare\n      Compressed_Data : Stream_Element_Array (1 .. Text'Length);\n      L               : Stream_Element_Offset;\n   begin\n      Compress : declare\n         Compressor : Filter_Type;\n         I : Stream_Element_Offset;\n      begin\n         Deflate_Init (Compressor);\n\n         --  Compress the whole of T at once.\n\n         Translate (Compressor, Source, I, Compressed_Data, L, Finish);\n         pragma Assert (I = Source'Last);\n\n         Close (Compressor);\n\n         Ada.Text_IO.Put_Line\n           (\"Compressed size :   \"\n            & Stream_Element_Offset'Image (L) & \" bytes\");\n      end Compress;\n\n      --  Now we decompress the data, passing short blocks of data to Zlib\n      --  (because this demonstrates the problem - the last block passed will\n      --  contain checksum information and there will be no output, only a\n      --  check inside Zlib that the checksum is correct).\n\n      Decompress : declare\n         Decompressor : Filter_Type;\n\n         Uncompressed_Data : Stream_Element_Array (1 .. Text'Length);\n\n         Block_Size : constant := 4;\n         --  This makes sure that the last block contains\n         --  only Adler checksum data.\n\n         P : Stream_Element_Offset := Compressed_Data'First - 1;\n         O : Stream_Element_Offset;\n      begin\n         Inflate_Init (Decompressor);\n\n         loop\n            Translate\n              (Decompressor,\n               Compressed_Data\n                 (P + 1 .. Stream_Element_Offset'Min (P + Block_Size, L)),\n               P,\n               Uncompressed_Data\n                 (Total_Out (Decompressor) + 1 .. Uncompressed_Data'Last),\n               O,\n               No_Flush);\n\n               Ada.Text_IO.Put_Line\n                 (\"Total in : \" & Count'Image (Total_In (Decompressor)) &\n                  \", out : \" & Count'Image (Total_Out (Decompressor)));\n\n               exit when P = L;\n         end loop;\n\n         Ada.Text_IO.New_Line;\n         Ada.Text_IO.Put_Line\n           (\"Decompressed text matches original text : \"\n             & Boolean'Image (Uncompressed_Data = Source));\n      end Decompress;\n   end;\nend Buffer_Demo;\n"
  },
  {
    "path": "third-party/zlib/contrib/ada/mtest.adb",
    "content": "----------------------------------------------------------------\n--  ZLib for Ada thick binding.                               --\n--                                                            --\n--  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --\n--                                                            --\n--  Open source license information is in the zlib.ads file.  --\n----------------------------------------------------------------\n--  Continuous test for ZLib multithreading. If the test would fail\n--  we should provide thread safe allocation routines for the Z_Stream.\n--\n--  $Id: mtest.adb,v 1.4 2004/07/23 07:49:54 vagul Exp $\n\nwith ZLib;\nwith Ada.Streams;\nwith Ada.Numerics.Discrete_Random;\nwith Ada.Text_IO;\nwith Ada.Exceptions;\nwith Ada.Task_Identification;\n\nprocedure MTest is\n   use Ada.Streams;\n   use ZLib;\n\n   Stop : Boolean := False;\n\n   pragma Atomic (Stop);\n\n   subtype Visible_Symbols is Stream_Element range 16#20# .. 16#7E#;\n\n   package Random_Elements is\n      new Ada.Numerics.Discrete_Random (Visible_Symbols);\n\n   task type Test_Task;\n\n   task body Test_Task is\n      Buffer : Stream_Element_Array (1 .. 100_000);\n      Gen : Random_Elements.Generator;\n\n      Buffer_First  : Stream_Element_Offset;\n      Compare_First : Stream_Element_Offset;\n\n      Deflate : Filter_Type;\n      Inflate : Filter_Type;\n\n      procedure Further (Item : in Stream_Element_Array);\n\n      procedure Read_Buffer\n        (Item : out Ada.Streams.Stream_Element_Array;\n         Last : out Ada.Streams.Stream_Element_Offset);\n\n      -------------\n      -- Further --\n      -------------\n\n      procedure Further (Item : in Stream_Element_Array) is\n\n         procedure Compare (Item : in Stream_Element_Array);\n\n         -------------\n         -- Compare --\n         -------------\n\n         procedure Compare (Item : in Stream_Element_Array) is\n            Next_First : Stream_Element_Offset := Compare_First + Item'Length;\n         begin\n            if Buffer (Compare_First .. Next_First - 1) /= Item then\n               raise Program_Error;\n            end if;\n\n            Compare_First := Next_First;\n         end Compare;\n\n         procedure Compare_Write is new ZLib.Write (Write => Compare);\n      begin\n         Compare_Write (Inflate, Item, No_Flush);\n      end Further;\n\n      -----------------\n      -- Read_Buffer --\n      -----------------\n\n      procedure Read_Buffer\n        (Item : out Ada.Streams.Stream_Element_Array;\n         Last : out Ada.Streams.Stream_Element_Offset)\n      is\n         Buff_Diff   : Stream_Element_Offset := Buffer'Last - Buffer_First;\n         Next_First : Stream_Element_Offset;\n      begin\n         if Item'Length <= Buff_Diff then\n            Last := Item'Last;\n\n            Next_First := Buffer_First + Item'Length;\n\n            Item := Buffer (Buffer_First .. Next_First - 1);\n\n            Buffer_First := Next_First;\n         else\n            Last := Item'First + Buff_Diff;\n            Item (Item'First .. Last) := Buffer (Buffer_First .. Buffer'Last);\n            Buffer_First := Buffer'Last + 1;\n         end if;\n      end Read_Buffer;\n\n      procedure Translate is new Generic_Translate\n                                   (Data_In  => Read_Buffer,\n                                    Data_Out => Further);\n\n   begin\n      Random_Elements.Reset (Gen);\n\n      Buffer := (others => 20);\n\n      Main : loop\n         for J in Buffer'Range loop\n            Buffer (J) := Random_Elements.Random (Gen);\n\n            Deflate_Init (Deflate);\n            Inflate_Init (Inflate);\n\n            Buffer_First  := Buffer'First;\n            Compare_First := Buffer'First;\n\n            Translate (Deflate);\n\n            if Compare_First /= Buffer'Last + 1 then\n               raise Program_Error;\n            end if;\n\n            Ada.Text_IO.Put_Line\n              (Ada.Task_Identification.Image\n                 (Ada.Task_Identification.Current_Task)\n               & Stream_Element_Offset'Image (J)\n               & ZLib.Count'Image (Total_Out (Deflate)));\n\n            Close (Deflate);\n            Close (Inflate);\n\n            exit Main when Stop;\n         end loop;\n      end loop Main;\n   exception\n      when E : others =>\n         Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Information (E));\n         Stop := True;\n   end Test_Task;\n\n   Test : array (1 .. 4) of Test_Task;\n\n   pragma Unreferenced (Test);\n\n   Dummy : Character;\n\nbegin\n   Ada.Text_IO.Get_Immediate (Dummy);\n   Stop := True;\nend MTest;\n"
  },
  {
    "path": "third-party/zlib/contrib/ada/read.adb",
    "content": "----------------------------------------------------------------\n--  ZLib for Ada thick binding.                               --\n--                                                            --\n--  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --\n--                                                            --\n--  Open source license information is in the zlib.ads file.  --\n----------------------------------------------------------------\n\n--  $Id: read.adb,v 1.8 2004/05/31 10:53:40 vagul Exp $\n\n--  Test/demo program for the generic read interface.\n\nwith Ada.Numerics.Discrete_Random;\nwith Ada.Streams;\nwith Ada.Text_IO;\n\nwith ZLib;\n\nprocedure Read is\n\n   use Ada.Streams;\n\n   ------------------------------------\n   --  Test configuration parameters --\n   ------------------------------------\n\n   File_Size   : Stream_Element_Offset := 100_000;\n\n   Continuous  : constant Boolean          := False;\n   --  If this constant is True, the test would be repeated again and again,\n   --  with increment File_Size for every iteration.\n\n   Header      : constant ZLib.Header_Type := ZLib.Default;\n   --  Do not use Header other than Default in ZLib versions 1.1.4 and older.\n\n   Init_Random : constant := 8;\n   --  We are using the same random sequence, in case of we catch bug,\n   --  so we would be able to reproduce it.\n\n   -- End --\n\n   Pack_Size : Stream_Element_Offset;\n   Offset    : Stream_Element_Offset;\n\n   Filter     : ZLib.Filter_Type;\n\n   subtype Visible_Symbols\n      is Stream_Element range 16#20# .. 16#7E#;\n\n   package Random_Elements is new\n      Ada.Numerics.Discrete_Random (Visible_Symbols);\n\n   Gen : Random_Elements.Generator;\n   Period  : constant Stream_Element_Offset := 200;\n   --  Period constant variable for random generator not to be very random.\n   --  Bigger period, harder random.\n\n   Read_Buffer : Stream_Element_Array (1 .. 2048);\n   Read_First  : Stream_Element_Offset;\n   Read_Last   : Stream_Element_Offset;\n\n   procedure Reset;\n\n   procedure Read\n     (Item : out Stream_Element_Array;\n      Last : out Stream_Element_Offset);\n   --  this procedure is for generic instantiation of\n   --  ZLib.Read\n   --  reading data from the File_In.\n\n   procedure Read is new ZLib.Read\n                           (Read,\n                            Read_Buffer,\n                            Rest_First => Read_First,\n                            Rest_Last  => Read_Last);\n\n   ----------\n   -- Read --\n   ----------\n\n   procedure Read\n     (Item : out Stream_Element_Array;\n      Last : out Stream_Element_Offset) is\n   begin\n      Last := Stream_Element_Offset'Min\n               (Item'Last,\n                Item'First + File_Size - Offset);\n\n      for J in Item'First .. Last loop\n         if J < Item'First + Period then\n            Item (J) := Random_Elements.Random (Gen);\n         else\n            Item (J) := Item (J - Period);\n         end if;\n\n         Offset   := Offset + 1;\n      end loop;\n   end Read;\n\n   -----------\n   -- Reset --\n   -----------\n\n   procedure Reset is\n   begin\n      Random_Elements.Reset (Gen, Init_Random);\n      Pack_Size := 0;\n      Offset := 1;\n      Read_First := Read_Buffer'Last + 1;\n      Read_Last  := Read_Buffer'Last;\n   end Reset;\n\nbegin\n   Ada.Text_IO.Put_Line (\"ZLib \" & ZLib.Version);\n\n   loop\n      for Level in ZLib.Compression_Level'Range loop\n\n         Ada.Text_IO.Put (\"Level =\"\n            & ZLib.Compression_Level'Image (Level));\n\n         --  Deflate using generic instantiation.\n\n         ZLib.Deflate_Init\n               (Filter,\n                Level,\n                Header => Header);\n\n         Reset;\n\n         Ada.Text_IO.Put\n           (Stream_Element_Offset'Image (File_Size) & \" ->\");\n\n         loop\n            declare\n               Buffer : Stream_Element_Array (1 .. 1024);\n               Last   : Stream_Element_Offset;\n            begin\n               Read (Filter, Buffer, Last);\n\n               Pack_Size := Pack_Size + Last - Buffer'First + 1;\n\n               exit when Last < Buffer'Last;\n            end;\n         end loop;\n\n         Ada.Text_IO.Put_Line (Stream_Element_Offset'Image (Pack_Size));\n\n         ZLib.Close (Filter);\n      end loop;\n\n      exit when not Continuous;\n\n      File_Size := File_Size + 1;\n   end loop;\nend Read;\n"
  },
  {
    "path": "third-party/zlib/contrib/ada/test.adb",
    "content": "----------------------------------------------------------------\n--  ZLib for Ada thick binding.                               --\n--                                                            --\n--  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --\n--                                                            --\n--  Open source license information is in the zlib.ads file.  --\n----------------------------------------------------------------\n\n--  $Id: test.adb,v 1.17 2003/08/12 12:13:30 vagul Exp $\n\n--  The program has a few aims.\n--  1. Test ZLib.Ada95 thick binding functionality.\n--  2. Show the example of use main functionality of the ZLib.Ada95 binding.\n--  3. Build this program automatically compile all ZLib.Ada95 packages under\n--     GNAT Ada95 compiler.\n\nwith ZLib.Streams;\nwith Ada.Streams.Stream_IO;\nwith Ada.Numerics.Discrete_Random;\n\nwith Ada.Text_IO;\n\nwith Ada.Calendar;\n\nprocedure Test is\n\n   use Ada.Streams;\n   use Stream_IO;\n\n   ------------------------------------\n   --  Test configuration parameters --\n   ------------------------------------\n\n   File_Size   : Count   := 100_000;\n   Continuous  : constant Boolean := False;\n\n   Header      : constant ZLib.Header_Type := ZLib.Default;\n                                              --  ZLib.None;\n                                              --  ZLib.Auto;\n                                              --  ZLib.GZip;\n   --  Do not use Header other then Default in ZLib versions 1.1.4\n   --  and older.\n\n   Strategy    : constant ZLib.Strategy_Type := ZLib.Default_Strategy;\n   Init_Random : constant := 10;\n\n   -- End --\n\n   In_File_Name  : constant String := \"testzlib.in\";\n   --  Name of the input file\n\n   Z_File_Name   : constant String := \"testzlib.zlb\";\n   --  Name of the compressed file.\n\n   Out_File_Name : constant String := \"testzlib.out\";\n   --  Name of the decompressed file.\n\n   File_In   : File_Type;\n   File_Out  : File_Type;\n   File_Back : File_Type;\n   File_Z    : ZLib.Streams.Stream_Type;\n\n   Filter : ZLib.Filter_Type;\n\n   Time_Stamp : Ada.Calendar.Time;\n\n   procedure Generate_File;\n   --  Generate file of specified size with some random data.\n   --  The random data is repeatable, for the good compression.\n\n   procedure Compare_Streams\n     (Left, Right : in out Root_Stream_Type'Class);\n   --  The procedure comparing data in 2 streams.\n   --  It is for compare data before and after compression/decompression.\n\n   procedure Compare_Files (Left, Right : String);\n   --  Compare files. Based on the Compare_Streams.\n\n   procedure Copy_Streams\n     (Source, Target : in out Root_Stream_Type'Class;\n      Buffer_Size    : in     Stream_Element_Offset := 1024);\n   --  Copying data from one stream to another. It is for test stream\n   --  interface of the library.\n\n   procedure Data_In\n     (Item : out Stream_Element_Array;\n      Last : out Stream_Element_Offset);\n   --  this procedure is for generic instantiation of\n   --  ZLib.Generic_Translate.\n   --  reading data from the File_In.\n\n   procedure Data_Out (Item : in Stream_Element_Array);\n   --  this procedure is for generic instantiation of\n   --  ZLib.Generic_Translate.\n   --  writing data to the File_Out.\n\n   procedure Stamp;\n   --  Store the timestamp to the local variable.\n\n   procedure Print_Statistic (Msg : String; Data_Size : ZLib.Count);\n   --  Print the time statistic with the message.\n\n   procedure Translate is new ZLib.Generic_Translate\n                                (Data_In  => Data_In,\n                                 Data_Out => Data_Out);\n   --  This procedure is moving data from File_In to File_Out\n   --  with compression or decompression, depend on initialization of\n   --  Filter parameter.\n\n   -------------------\n   -- Compare_Files --\n   -------------------\n\n   procedure Compare_Files (Left, Right : String) is\n      Left_File, Right_File : File_Type;\n   begin\n      Open (Left_File, In_File, Left);\n      Open (Right_File, In_File, Right);\n      Compare_Streams (Stream (Left_File).all, Stream (Right_File).all);\n      Close (Left_File);\n      Close (Right_File);\n   end Compare_Files;\n\n   ---------------------\n   -- Compare_Streams --\n   ---------------------\n\n   procedure Compare_Streams\n     (Left, Right : in out Ada.Streams.Root_Stream_Type'Class)\n   is\n      Left_Buffer, Right_Buffer : Stream_Element_Array (0 .. 16#FFF#);\n      Left_Last, Right_Last : Stream_Element_Offset;\n   begin\n      loop\n         Read (Left, Left_Buffer, Left_Last);\n         Read (Right, Right_Buffer, Right_Last);\n\n         if Left_Last /= Right_Last then\n            Ada.Text_IO.Put_Line (\"Compare error :\"\n              & Stream_Element_Offset'Image (Left_Last)\n              & \" /= \"\n              & Stream_Element_Offset'Image (Right_Last));\n\n            raise Constraint_Error;\n\n         elsif Left_Buffer (0 .. Left_Last)\n               /= Right_Buffer (0 .. Right_Last)\n         then\n            Ada.Text_IO.Put_Line (\"ERROR: IN and OUT files is not equal.\");\n            raise Constraint_Error;\n\n         end if;\n\n         exit when Left_Last < Left_Buffer'Last;\n      end loop;\n   end Compare_Streams;\n\n   ------------------\n   -- Copy_Streams --\n   ------------------\n\n   procedure Copy_Streams\n     (Source, Target : in out Ada.Streams.Root_Stream_Type'Class;\n      Buffer_Size    : in     Stream_Element_Offset := 1024)\n   is\n      Buffer : Stream_Element_Array (1 .. Buffer_Size);\n      Last   : Stream_Element_Offset;\n   begin\n      loop\n         Read  (Source, Buffer, Last);\n         Write (Target, Buffer (1 .. Last));\n\n         exit when Last < Buffer'Last;\n      end loop;\n   end Copy_Streams;\n\n   -------------\n   -- Data_In --\n   -------------\n\n   procedure Data_In\n     (Item : out Stream_Element_Array;\n      Last : out Stream_Element_Offset) is\n   begin\n      Read (File_In, Item, Last);\n   end Data_In;\n\n   --------------\n   -- Data_Out --\n   --------------\n\n   procedure Data_Out (Item : in Stream_Element_Array) is\n   begin\n      Write (File_Out, Item);\n   end Data_Out;\n\n   -------------------\n   -- Generate_File --\n   -------------------\n\n   procedure Generate_File is\n      subtype Visible_Symbols is Stream_Element range 16#20# .. 16#7E#;\n\n      package Random_Elements is\n         new Ada.Numerics.Discrete_Random (Visible_Symbols);\n\n      Gen    : Random_Elements.Generator;\n      Buffer : Stream_Element_Array := (1 .. 77 => 16#20#) & 10;\n\n      Buffer_Count : constant Count := File_Size / Buffer'Length;\n      --  Number of same buffers in the packet.\n\n      Density : constant Count := 30; --  from 0 to Buffer'Length - 2;\n\n      procedure Fill_Buffer (J, D : in Count);\n      --  Change the part of the buffer.\n\n      -----------------\n      -- Fill_Buffer --\n      -----------------\n\n      procedure Fill_Buffer (J, D : in Count) is\n      begin\n         for K in 0 .. D loop\n            Buffer\n              (Stream_Element_Offset ((J + K) mod (Buffer'Length - 1) + 1))\n             := Random_Elements.Random (Gen);\n\n         end loop;\n      end Fill_Buffer;\n\n   begin\n      Random_Elements.Reset (Gen, Init_Random);\n\n      Create (File_In, Out_File, In_File_Name);\n\n      Fill_Buffer (1, Buffer'Length - 2);\n\n      for J in 1 .. Buffer_Count loop\n         Write (File_In, Buffer);\n\n         Fill_Buffer (J, Density);\n      end loop;\n\n      --  fill remain size.\n\n      Write\n        (File_In,\n         Buffer\n           (1 .. Stream_Element_Offset\n                   (File_Size - Buffer'Length * Buffer_Count)));\n\n      Flush (File_In);\n      Close (File_In);\n   end Generate_File;\n\n   ---------------------\n   -- Print_Statistic --\n   ---------------------\n\n   procedure Print_Statistic (Msg : String; Data_Size : ZLib.Count) is\n      use Ada.Calendar;\n      use Ada.Text_IO;\n\n      package Count_IO is new Integer_IO (ZLib.Count);\n\n      Curr_Dur : Duration := Clock - Time_Stamp;\n   begin\n      Put (Msg);\n\n      Set_Col (20);\n      Ada.Text_IO.Put (\"size =\");\n\n      Count_IO.Put\n        (Data_Size,\n         Width => Stream_IO.Count'Image (File_Size)'Length);\n\n      Put_Line (\" duration =\" & Duration'Image (Curr_Dur));\n   end Print_Statistic;\n\n   -----------\n   -- Stamp --\n   -----------\n\n   procedure Stamp is\n   begin\n      Time_Stamp := Ada.Calendar.Clock;\n   end Stamp;\n\nbegin\n   Ada.Text_IO.Put_Line (\"ZLib \" & ZLib.Version);\n\n   loop\n      Generate_File;\n\n      for Level in ZLib.Compression_Level'Range loop\n\n         Ada.Text_IO.Put_Line (\"Level =\"\n            & ZLib.Compression_Level'Image (Level));\n\n         --  Test generic interface.\n         Open   (File_In, In_File, In_File_Name);\n         Create (File_Out, Out_File, Z_File_Name);\n\n         Stamp;\n\n         --  Deflate using generic instantiation.\n\n         ZLib.Deflate_Init\n               (Filter   => Filter,\n                Level    => Level,\n                Strategy => Strategy,\n                Header   => Header);\n\n         Translate (Filter);\n         Print_Statistic (\"Generic compress\", ZLib.Total_Out (Filter));\n         ZLib.Close (Filter);\n\n         Close (File_In);\n         Close (File_Out);\n\n         Open   (File_In, In_File, Z_File_Name);\n         Create (File_Out, Out_File, Out_File_Name);\n\n         Stamp;\n\n         --  Inflate using generic instantiation.\n\n         ZLib.Inflate_Init (Filter, Header => Header);\n\n         Translate (Filter);\n         Print_Statistic (\"Generic decompress\", ZLib.Total_Out (Filter));\n\n         ZLib.Close (Filter);\n\n         Close (File_In);\n         Close (File_Out);\n\n         Compare_Files (In_File_Name, Out_File_Name);\n\n         --  Test stream interface.\n\n         --  Compress to the back stream.\n\n         Open   (File_In, In_File, In_File_Name);\n         Create (File_Back, Out_File, Z_File_Name);\n\n         Stamp;\n\n         ZLib.Streams.Create\n           (Stream          => File_Z,\n            Mode            => ZLib.Streams.Out_Stream,\n            Back            => ZLib.Streams.Stream_Access\n                                 (Stream (File_Back)),\n            Back_Compressed => True,\n            Level           => Level,\n            Strategy        => Strategy,\n            Header          => Header);\n\n         Copy_Streams\n           (Source => Stream (File_In).all,\n            Target => File_Z);\n\n         --  Flushing internal buffers to the back stream.\n\n         ZLib.Streams.Flush (File_Z, ZLib.Finish);\n\n         Print_Statistic (\"Write compress\",\n                          ZLib.Streams.Write_Total_Out (File_Z));\n\n         ZLib.Streams.Close (File_Z);\n\n         Close (File_In);\n         Close (File_Back);\n\n         --  Compare reading from original file and from\n         --  decompression stream.\n\n         Open (File_In,   In_File, In_File_Name);\n         Open (File_Back, In_File, Z_File_Name);\n\n         ZLib.Streams.Create\n           (Stream          => File_Z,\n            Mode            => ZLib.Streams.In_Stream,\n            Back            => ZLib.Streams.Stream_Access\n                                 (Stream (File_Back)),\n            Back_Compressed => True,\n            Header          => Header);\n\n         Stamp;\n         Compare_Streams (Stream (File_In).all, File_Z);\n\n         Print_Statistic (\"Read decompress\",\n                          ZLib.Streams.Read_Total_Out (File_Z));\n\n         ZLib.Streams.Close (File_Z);\n         Close (File_In);\n         Close (File_Back);\n\n         --  Compress by reading from compression stream.\n\n         Open (File_Back, In_File, In_File_Name);\n         Create (File_Out, Out_File, Z_File_Name);\n\n         ZLib.Streams.Create\n           (Stream          => File_Z,\n            Mode            => ZLib.Streams.In_Stream,\n            Back            => ZLib.Streams.Stream_Access\n                                 (Stream (File_Back)),\n            Back_Compressed => False,\n            Level           => Level,\n            Strategy        => Strategy,\n            Header          => Header);\n\n         Stamp;\n         Copy_Streams\n           (Source => File_Z,\n            Target => Stream (File_Out).all);\n\n         Print_Statistic (\"Read compress\",\n                          ZLib.Streams.Read_Total_Out (File_Z));\n\n         ZLib.Streams.Close (File_Z);\n\n         Close (File_Out);\n         Close (File_Back);\n\n         --  Decompress to decompression stream.\n\n         Open   (File_In,   In_File, Z_File_Name);\n         Create (File_Back, Out_File, Out_File_Name);\n\n         ZLib.Streams.Create\n           (Stream          => File_Z,\n            Mode            => ZLib.Streams.Out_Stream,\n            Back            => ZLib.Streams.Stream_Access\n                                 (Stream (File_Back)),\n            Back_Compressed => False,\n            Header          => Header);\n\n         Stamp;\n\n         Copy_Streams\n           (Source => Stream (File_In).all,\n            Target => File_Z);\n\n         Print_Statistic (\"Write decompress\",\n                          ZLib.Streams.Write_Total_Out (File_Z));\n\n         ZLib.Streams.Close (File_Z);\n         Close (File_In);\n         Close (File_Back);\n\n         Compare_Files (In_File_Name, Out_File_Name);\n      end loop;\n\n      Ada.Text_IO.Put_Line (Count'Image (File_Size) & \" Ok.\");\n\n      exit when not Continuous;\n\n      File_Size := File_Size + 1;\n   end loop;\nend Test;\n"
  },
  {
    "path": "third-party/zlib/contrib/ada/zlib-streams.adb",
    "content": "----------------------------------------------------------------\n--  ZLib for Ada thick binding.                               --\n--                                                            --\n--  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --\n--                                                            --\n--  Open source license information is in the zlib.ads file.  --\n----------------------------------------------------------------\n\n--  $Id: zlib-streams.adb,v 1.10 2004/05/31 10:53:40 vagul Exp $\n\nwith Ada.Unchecked_Deallocation;\n\npackage body ZLib.Streams is\n\n   -----------\n   -- Close --\n   -----------\n\n   procedure Close (Stream : in out Stream_Type) is\n      procedure Free is new Ada.Unchecked_Deallocation\n         (Stream_Element_Array, Buffer_Access);\n   begin\n      if Stream.Mode = Out_Stream or Stream.Mode = Duplex then\n         --  We should flush the data written by the writer.\n\n         Flush (Stream, Finish);\n\n         Close (Stream.Writer);\n      end if;\n\n      if Stream.Mode = In_Stream or Stream.Mode = Duplex then\n         Close (Stream.Reader);\n         Free (Stream.Buffer);\n      end if;\n   end Close;\n\n   ------------\n   -- Create --\n   ------------\n\n   procedure Create\n     (Stream            :    out Stream_Type;\n      Mode              : in     Stream_Mode;\n      Back              : in     Stream_Access;\n      Back_Compressed   : in     Boolean;\n      Level             : in     Compression_Level := Default_Compression;\n      Strategy          : in     Strategy_Type     := Default_Strategy;\n      Header            : in     Header_Type       := Default;\n      Read_Buffer_Size  : in     Ada.Streams.Stream_Element_Offset\n                                    := Default_Buffer_Size;\n      Write_Buffer_Size : in     Ada.Streams.Stream_Element_Offset\n                                    := Default_Buffer_Size)\n   is\n\n      subtype Buffer_Subtype is Stream_Element_Array (1 .. Read_Buffer_Size);\n\n      procedure Init_Filter\n         (Filter   : in out Filter_Type;\n          Compress : in     Boolean);\n\n      -----------------\n      -- Init_Filter --\n      -----------------\n\n      procedure Init_Filter\n         (Filter   : in out Filter_Type;\n          Compress : in     Boolean) is\n      begin\n         if Compress then\n            Deflate_Init\n              (Filter, Level, Strategy, Header => Header);\n         else\n            Inflate_Init (Filter, Header => Header);\n         end if;\n      end Init_Filter;\n\n   begin\n      Stream.Back := Back;\n      Stream.Mode := Mode;\n\n      if Mode = Out_Stream or Mode = Duplex then\n         Init_Filter (Stream.Writer, Back_Compressed);\n         Stream.Buffer_Size := Write_Buffer_Size;\n      else\n         Stream.Buffer_Size := 0;\n      end if;\n\n      if Mode = In_Stream or Mode = Duplex then\n         Init_Filter (Stream.Reader, not Back_Compressed);\n\n         Stream.Buffer     := new Buffer_Subtype;\n         Stream.Rest_First := Stream.Buffer'Last + 1;\n         Stream.Rest_Last  := Stream.Buffer'Last;\n      end if;\n   end Create;\n\n   -----------\n   -- Flush --\n   -----------\n\n   procedure Flush\n     (Stream : in out Stream_Type;\n      Mode   : in     Flush_Mode := Sync_Flush)\n   is\n      Buffer : Stream_Element_Array (1 .. Stream.Buffer_Size);\n      Last   : Stream_Element_Offset;\n   begin\n      loop\n         Flush (Stream.Writer, Buffer, Last, Mode);\n\n         Ada.Streams.Write (Stream.Back.all, Buffer (1 .. Last));\n\n         exit when Last < Buffer'Last;\n      end loop;\n   end Flush;\n\n   -------------\n   -- Is_Open --\n   -------------\n\n   function Is_Open (Stream : Stream_Type) return Boolean is\n   begin\n      return Is_Open (Stream.Reader) or else Is_Open (Stream.Writer);\n   end Is_Open;\n\n   ----------\n   -- Read --\n   ----------\n\n   procedure Read\n     (Stream : in out Stream_Type;\n      Item   :    out Stream_Element_Array;\n      Last   :    out Stream_Element_Offset)\n   is\n\n      procedure Read\n        (Item : out Stream_Element_Array;\n         Last : out Stream_Element_Offset);\n\n      ----------\n      -- Read --\n      ----------\n\n      procedure Read\n        (Item : out Stream_Element_Array;\n         Last : out Stream_Element_Offset) is\n      begin\n         Ada.Streams.Read (Stream.Back.all, Item, Last);\n      end Read;\n\n      procedure Read is new ZLib.Read\n         (Read       => Read,\n          Buffer     => Stream.Buffer.all,\n          Rest_First => Stream.Rest_First,\n          Rest_Last  => Stream.Rest_Last);\n\n   begin\n      Read (Stream.Reader, Item, Last);\n   end Read;\n\n   -------------------\n   -- Read_Total_In --\n   -------------------\n\n   function Read_Total_In (Stream : in Stream_Type) return Count is\n   begin\n      return Total_In (Stream.Reader);\n   end Read_Total_In;\n\n   --------------------\n   -- Read_Total_Out --\n   --------------------\n\n   function Read_Total_Out (Stream : in Stream_Type) return Count is\n   begin\n      return Total_Out (Stream.Reader);\n   end Read_Total_Out;\n\n   -----------\n   -- Write --\n   -----------\n\n   procedure Write\n     (Stream : in out Stream_Type;\n      Item   : in     Stream_Element_Array)\n   is\n\n      procedure Write (Item : in Stream_Element_Array);\n\n      -----------\n      -- Write --\n      -----------\n\n      procedure Write (Item : in Stream_Element_Array) is\n      begin\n         Ada.Streams.Write (Stream.Back.all, Item);\n      end Write;\n\n      procedure Write is new ZLib.Write\n         (Write       => Write,\n          Buffer_Size => Stream.Buffer_Size);\n\n   begin\n      Write (Stream.Writer, Item, No_Flush);\n   end Write;\n\n   --------------------\n   -- Write_Total_In --\n   --------------------\n\n   function Write_Total_In (Stream : in Stream_Type) return Count is\n   begin\n      return Total_In (Stream.Writer);\n   end Write_Total_In;\n\n   ---------------------\n   -- Write_Total_Out --\n   ---------------------\n\n   function Write_Total_Out (Stream : in Stream_Type) return Count is\n   begin\n      return Total_Out (Stream.Writer);\n   end Write_Total_Out;\n\nend ZLib.Streams;\n"
  },
  {
    "path": "third-party/zlib/contrib/ada/zlib-streams.ads",
    "content": "----------------------------------------------------------------\n--  ZLib for Ada thick binding.                               --\n--                                                            --\n--  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --\n--                                                            --\n--  Open source license information is in the zlib.ads file.  --\n----------------------------------------------------------------\n\n--  $Id: zlib-streams.ads,v 1.12 2004/05/31 10:53:40 vagul Exp $\n\npackage ZLib.Streams is\n\n   type Stream_Mode is (In_Stream, Out_Stream, Duplex);\n\n   type Stream_Access is access all Ada.Streams.Root_Stream_Type'Class;\n\n   type Stream_Type is\n      new Ada.Streams.Root_Stream_Type with private;\n\n   procedure Read\n     (Stream : in out Stream_Type;\n      Item   :    out Ada.Streams.Stream_Element_Array;\n      Last   :    out Ada.Streams.Stream_Element_Offset);\n\n   procedure Write\n     (Stream : in out Stream_Type;\n      Item   : in     Ada.Streams.Stream_Element_Array);\n\n   procedure Flush\n     (Stream : in out Stream_Type;\n      Mode   : in     Flush_Mode := Sync_Flush);\n   --  Flush the written data to the back stream,\n   --  all data placed to the compressor is flushing to the Back stream.\n   --  Should not be used until necessary, because it is decreasing\n   --  compression.\n\n   function Read_Total_In (Stream : in Stream_Type) return Count;\n   pragma Inline (Read_Total_In);\n   --  Return total number of bytes read from back stream so far.\n\n   function Read_Total_Out (Stream : in Stream_Type) return Count;\n   pragma Inline (Read_Total_Out);\n   --  Return total number of bytes read so far.\n\n   function Write_Total_In (Stream : in Stream_Type) return Count;\n   pragma Inline (Write_Total_In);\n   --  Return total number of bytes written so far.\n\n   function Write_Total_Out (Stream : in Stream_Type) return Count;\n   pragma Inline (Write_Total_Out);\n   --  Return total number of bytes written to the back stream.\n\n   procedure Create\n     (Stream            :    out Stream_Type;\n      Mode              : in     Stream_Mode;\n      Back              : in     Stream_Access;\n      Back_Compressed   : in     Boolean;\n      Level             : in     Compression_Level := Default_Compression;\n      Strategy          : in     Strategy_Type     := Default_Strategy;\n      Header            : in     Header_Type       := Default;\n      Read_Buffer_Size  : in     Ada.Streams.Stream_Element_Offset\n                                    := Default_Buffer_Size;\n      Write_Buffer_Size : in     Ada.Streams.Stream_Element_Offset\n                                    := Default_Buffer_Size);\n   --  Create the Compression/Decompression stream.\n   --  If mode is In_Stream then Write operation is disabled.\n   --  If mode is Out_Stream then Read operation is disabled.\n\n   --  If Back_Compressed is true then\n   --  Data written to the Stream is compressing to the Back stream\n   --  and data read from the Stream is decompressed data from the Back stream.\n\n   --  If Back_Compressed is false then\n   --  Data written to the Stream is decompressing to the Back stream\n   --  and data read from the Stream is compressed data from the Back stream.\n\n   --  !!! When the Need_Header is False ZLib-Ada is using undocumented\n   --  ZLib 1.1.4 functionality to do not create/wait for ZLib headers.\n\n   function Is_Open (Stream : Stream_Type) return Boolean;\n\n   procedure Close (Stream : in out Stream_Type);\n\nprivate\n\n   use Ada.Streams;\n\n   type Buffer_Access is access all Stream_Element_Array;\n\n   type Stream_Type\n     is new Root_Stream_Type with\n   record\n      Mode       : Stream_Mode;\n\n      Buffer     : Buffer_Access;\n      Rest_First : Stream_Element_Offset;\n      Rest_Last  : Stream_Element_Offset;\n      --  Buffer for Read operation.\n      --  We need to have this buffer in the record\n      --  because not all read data from back stream\n      --  could be processed during the read operation.\n\n      Buffer_Size : Stream_Element_Offset;\n      --  Buffer size for write operation.\n      --  We do not need to have this buffer\n      --  in the record because all data could be\n      --  processed in the write operation.\n\n      Back       : Stream_Access;\n      Reader     : Filter_Type;\n      Writer     : Filter_Type;\n   end record;\n\nend ZLib.Streams;\n"
  },
  {
    "path": "third-party/zstd/tests/cli-tests/compression/window-resize.sh.stderr.ignore",
    "content": ""
  },
  {
    "path": "third-party/zstd/tests/cli-tests/file-handling/directory-mirror.sh.stderr.exact",
    "content": ""
  },
  {
    "path": "third-party/zstd/tests/cli-tests/file-handling/directory-mirror.sh.stdout.exact",
    "content": ""
  }
]